ruby 1.9.0 (2006-01-06)

Last updated Sat Jan 07 15:13:01 東京 (標準時) 2006
This hypertext was generated by GLOBAL-4.8.7.

MAINS

main               57 ext/digest/md5/md5.c main()
main               97 ext/digest/md5/md5.c main()
main              692 ext/nkf/nkf-utf8/nkf.c main(argc, argv)
main              471 ext/openssl/ossl.c main(int argc, char *argv[], char *env[])
main              247 ext/syck/yaml2byte.c int main() {
main               26 main.c         main(int argc, char **argv, char **envp)
main              879 missing/strftime.c main(argc, argv)
main              258 wince/time_wce.c int main()
main              309 wince/winsock2.c int main()

DEFINITIONS

FILES

  1. array.c
  2. ascii.c
  3. bignum.c
  4. class.c
  5. compar.c
  6. defines.h
  7. dir.c
  8. dln.c
  9. dln.h
  10. dmydln.c
  11. dmyext.c
  12. enum.c
  13. enumerator.c
  14. env.h
  15. error.c
  16. euc_jp.c
  17. eval.c
  18. ext/
  19. file.c
  20. gc.c
  21. hash.c
  22. ia64.s
  23. inits.c
  24. intern.h
  25. io.c
  26. lex.c
  27. main.c
  28. marshal.c
  29. math.c
  30. missing.h
  31. missing/
  32. node.h
  33. numeric.c
  34. object.c
  35. oniguruma.h
  36. pack.c
  37. parse.y
  38. prec.c
  39. process.c
  40. random.c
  41. range.c
  42. re.c
  43. re.h
  44. regcomp.c
  45. regenc.c
  46. regenc.h
  47. regerror.c
  48. regex.h
  49. regexec.c
  50. regint.h
  51. regparse.c
  52. regparse.h
  53. ruby.c
  54. ruby.h
  55. rubyio.h
  56. rubysig.h
  57. signal.c
  58. sjis.c
  59. sprintf.c
  60. st.c
  61. st.h
  62. string.c
  63. struct.c
  64. time.c
  65. utf8.c
  66. util.c
  67. util.h
  68. variable.c
  69. version.c
  70. version.h
  71. vms/
  72. win32/
  73. wince/
  74. x68/


DEFINITIONS

[..]
  1. A
  2. ADD2HEAP
  3. ADDINC128
  4. ADDR_INFO_H
  5. ADD_ALL_MULTI_BYTE_RANGE
  6. ADD_BYTE_LEVEL
  7. ADD_DIRECT
  8. ADD_LEVEL
  9. ADJ
  10. AF_UNSPEC
  11. AI_ADDRCONFIG
  12. AI_ALL
  13. AI_CANONNAME
  14. AI_DEFAULT
  15. AI_MASK
  16. AI_NUMERICHOST
  17. AI_PASSIVE
  18. AI_V4MAPPED
  19. AI_V4MAPPED_CFG
  20. ALIGNMENT_RIGHT
  21. ALIGN_CHAR
  22. ALIGN_DOUBLE
  23. ALIGN_FLOAT
  24. ALIGN_INT
  25. ALIGN_LONG
  26. ALIGN_LONG_LONG
  27. ALIGN_SHORT
  28. ALIGN_SIZE
  29. ALIGN_VOIDP
  30. ALLOC
  31. ALLOCA_N
  32. ALLOC_CT
  33. ALLOC_N
  34. ALLOWED_ANCHOR_IN_LB
  35. ALLOWED_ANCHOR_IN_LB_NOT
  36. ALLOWED_EFFECT_IN_LB
  37. ALLOWED_EFFECT_IN_LB_NOT
  38. ALLOWED_TYPE_IN_LB
  39. ALLOW_INTS
  40. ALT
  41. ANCHOR_ANYCHAR_STAR
  42. ANCHOR_ANYCHAR_STAR_MASK
  43. ANCHOR_ANYCHAR_STAR_PL
  44. ANCHOR_BEGIN_BUF
  45. ANCHOR_BEGIN_LINE
  46. ANCHOR_BEGIN_POSITION
  47. ANCHOR_END_BUF
  48. ANCHOR_END_BUF_MASK
  49. ANCHOR_END_LINE
  50. ANCHOR_LOOK_BEHIND
  51. ANCHOR_LOOK_BEHIND_NOT
  52. ANCHOR_NOT_WORD_BOUND
  53. ANCHOR_PREC_READ
  54. ANCHOR_PREC_READ_NOT
  55. ANCHOR_SEMI_END_BUF
  56. ANCHOR_WORD_BEGIN
  57. ANCHOR_WORD_BOUND
  58. ANCHOR_WORD_END
  59. ANSI_C_PROTOTYPE
  60. ANY
  61. ANYARGS
  62. AREF
  63. ARGF_FORWARD
  64. ARG_ABSADDR
  65. ARG_FLUSH
  66. ARG_LENGTH
  67. ARG_LEVEL
  68. ARG_MEMLEVEL
  69. ARG_MEMNUM
  70. ARG_NON
  71. ARG_OPTION
  72. ARG_RELADDR
  73. ARG_SPECIAL
  74. ARG_STRATEGY
  75. ARG_WBITS
  76. ARY_DEFAULT_SIZE
  77. ARY_TMPLOCK
  78. ASCII
  79. ASSERT
  80. AT
  81. ATOMIC_DEC
  82. ATOMIC_INC
  83. ATOMIC_SET
  84. ATOMIC_TEST
  85. Abs
  86. AbsAddrType
  87. AddExponent
  88. AnchorNode
  89. B
  90. B64
  91. BACKREFS_P
  92. BADEXIT
  93. BADMESS
  94. BBUF_ADD
  95. BBUF_ADD1
  96. BBUF_ENSURE_SIZE
  97. BBUF_EXPAND
  98. BBUF_GET_ADD_ADDRESS
  99. BBUF_GET_BYTE
  100. BBUF_GET_OFFSET_POS
  101. BBUF_INIT
  102. BBUF_INSERT
  103. BBUF_MOVE_LEFT
  104. BBUF_MOVE_LEFT_REDUCE
  105. BBUF_MOVE_RIGHT
  106. BBUF_SIZE_INC
  107. BBUF_WRITE
  108. BBUF_WRITE1
  109. BBUF_WRITE_CODE_POINT
  110. BBuf
  111. BDIGIT
  112. BDIGITS
  113. BDIGIT_DBL
  114. BDIGIT_DBL_SIGNED
  115. BDIGMAX
  116. BEG
  117. BEGIN_CALLARGS
  118. BIGDN
  119. BIGLO
  120. BIGNUM_1c
  121. BIGNUM_2
  122. BIGNUM_2c
  123. BIGNUM_3c
  124. BIGNUM_BIT
  125. BIGNUM_BOOL1
  126. BIGNUM_CMP
  127. BIGNUM_NUM
  128. BIGNUM_RAND
  129. BIGNUM_RAND_RANGE
  130. BIGNUM_SHIFT
  131. BIGRAD
  132. BIGUP
  133. BIGZEROP
  134. BIG_CRITERIA
  135. BIG_CRITERIA_BIT
  136. BIG_ENDIAN
  137. BIG_GET32
  138. BIG_SET32
  139. BITSET_AT
  140. BITSET_CLEAR
  141. BITSET_CLEAR_BIT
  142. BITSET_INVERT_BIT
  143. BITSET_IS_EMPTY
  144. BITSET_SET_BIT
  145. BITSET_SIZE
  146. BITSPERDIG
  147. BITSPERSHORT
  148. BITSTACK_LEXPOP
  149. BITSTACK_POP
  150. BITSTACK_PUSH
  151. BITSTACK_SET_P
  152. BITS_IN_ROOM
  153. BITS_PER_BYTE
  154. BIT_DIGITS
  155. BIT_STATUS_AT
  156. BIT_STATUS_BITS_NUM
  157. BIT_STATUS_CLEAR
  158. BIT_STATUS_ON_ALL
  159. BIT_STATUS_ON_AT
  160. BIT_STATUS_ON_AT_SIMPLE
  161. BLOCK_D_SCOPE
  162. BLOCK_FOLD
  163. BLOCK_FROM_METHOD
  164. BLOCK_LAMBDA
  165. BLOCK_LIT
  166. BLOCK_PLAIN
  167. BM_BACKWARD_SEARCH_LENGTH_THRESHOLD
  168. BNEG
  169. BN_mod_add
  170. BN_mod_sqr
  171. BN_mod_sub
  172. BN_nnmod
  173. BN_pseudo_rand_range
  174. BN_rand_range
  175. BOOL2INT
  176. BROKEN_SETREGID
  177. BROKEN_SETREUID
  178. BS
  179. BSD__sbprintf
  180. BSD__sfvwrite
  181. BSD__sprint
  182. BSD__ultoa
  183. BSD_vfprintf
  184. BS_BIT
  185. BS_ROOM
  186. BUF
  187. BUFCHECK
  188. BUFINIT
  189. BUFSIZE
  190. BUILTIN_TYPE
  191. BYTESIZ
  192. BYTES_TO_DWORD
  193. BYTEWIDTH
  194. BYTE_ORDER
  195. B_MASK
  196. B_SHIFT
  197. BackrefNode
  198. BigDecimalCmp
  199. BigDecimal_DoDivmod
  200. BigDecimal_IsFinite
  201. BigDecimal_IsInfinite
  202. BigDecimal_IsNaN
  203. BigDecimal_abs
  204. BigDecimal_add
  205. BigDecimal_add2
  206. BigDecimal_ceil
  207. BigDecimal_coerce
  208. BigDecimal_comp
  209. BigDecimal_delete
  210. BigDecimal_div
  211. BigDecimal_div2
  212. BigDecimal_divide
  213. BigDecimal_divmod
  214. BigDecimal_divremain
  215. BigDecimal_double_fig
  216. BigDecimal_dump
  217. BigDecimal_eq
  218. BigDecimal_exponent
  219. BigDecimal_fix
  220. BigDecimal_floor
  221. BigDecimal_frac
  222. BigDecimal_ge
  223. BigDecimal_global_new
  224. BigDecimal_gt
  225. BigDecimal_hash
  226. BigDecimal_induced_from
  227. BigDecimal_inspect
  228. BigDecimal_le
  229. BigDecimal_limit
  230. BigDecimal_load
  231. BigDecimal_lt
  232. BigDecimal_mod
  233. BigDecimal_mode
  234. BigDecimal_mult
  235. BigDecimal_mult2
  236. BigDecimal_ne
  237. BigDecimal_neg
  238. BigDecimal_new
  239. BigDecimal_nonzero
  240. BigDecimal_power
  241. BigDecimal_prec
  242. BigDecimal_remainder
  243. BigDecimal_round
  244. BigDecimal_sign
  245. BigDecimal_split
  246. BigDecimal_sqrt
  247. BigDecimal_sub
  248. BigDecimal_sub2
  249. BigDecimal_to_f
  250. BigDecimal_to_i
  251. BigDecimal_to_s
  252. BigDecimal_truncate
  253. BigDecimal_uplus
  254. BigDecimal_version
  255. BigDecimal_zero
  256. BitSetRef
  257. BitStatusType
  258. Bits
  259. C
  260. CACHE_MASK
  261. CACHE_SIZE
  262. CALLING_FCALL
  263. CALLING_NORMAL
  264. CALLING_SUPER
  265. CALLING_VCALL
  266. CALLNODE_REFNUM_UNDEF
  267. CALL_CASE
  268. CASE
  269. CASEFOLD_FILESYSTEM
  270. CAT
  271. CCEND_ESC_WARN
  272. CCLASS_CLEAR_NOT
  273. CCLASS_SET_NOT
  274. CCLASS_SET_SHARE
  275. CC_ESC_WARN
  276. CClassNode
  277. CFUNC_CDECL
  278. CFUNC_STDCALL
  279. CH2FIX
  280. CHAR64LONG16
  281. CHARP
  282. CHAR_BIT
  283. CHECK
  284. CHECK_DLERROR
  285. CHECK_INTERRUPT
  286. CHECK_INTERRUPT_IN_MATCH_AT
  287. CHECK_INTS
  288. CHECK_NULL_RETURN
  289. CHECK_NULL_RETURN_VAL
  290. CHECK_OPTION
  291. CHECK_STACK
  292. CHK_NL
  293. CHR2FIX
  294. CHUNKBITS
  295. CHUNKSIZE
  296. CIPHER_0ARG_INT
  297. CLASS_MASK
  298. CLASS_OF
  299. CLASS_UTF16
  300. CLEAR_EFFECT_STATUS
  301. CLEAR_MATCH_STATUS
  302. CLONESETUP
  303. CLOSED
  304. CMDARG_LEXPOP
  305. CMDARG_P
  306. CMDARG_POP
  307. CMDARG_PUSH
  308. COLLISION
  309. COMMAND
  310. COMPILE_INIT_SIZE
  311. COMPLETION_CASE_FOLD
  312. COMPLETION_PROC
  313. COMP_EM_BASE
  314. COND_LEXPOP
  315. COND_P
  316. COND_POP
  317. COND_PUSH
  318. CONF_get1_default_config_file
  319. CONST
  320. CONST84
  321. CONTEXT_FLOATING_POINT
  322. COPY
  323. COPY_RIGHT
  324. CP932INV_TABLE_BEGIN
  325. CP932INV_TABLE_END
  326. CP932_TABLE_BEGIN
  327. CP932_TABLE_END
  328. CP_FIN_ACCEPT
  329. CP_FIN_CANTPOP
  330. CP_FIN_EOT
  331. CR
  332. CRLF
  333. CRUNCH
  334. CR_SB_SET
  335. CR_SET
  336. CSTAT_PRIV
  337. CSTAT_PROT
  338. CSTAT_SUPER
  339. CSTAT_VCALL
  340. CTRL_C_EVENT
  341. CTYPE_DIGIT
  342. CTYPE_NOT_DIGIT
  343. CTYPE_NOT_WHITE_SPACE
  344. CTYPE_NOT_WORD
  345. CTYPE_NOT_XDIGIT
  346. CTYPE_WHITE_SPACE
  347. CTYPE_WORD
  348. CTYPE_XDIGIT
  349. CURPTR
  350. CURRENT_LEVEL
  351. CUT_TAIL
  352. C_block
  353. CallFrame
  354. CallNode
  355. Calloc
  356. Ch
  357. CharNext
  358. CharNextA
  359. CharPrev
  360. CharPrevA
  361. Check_SafeStr
  362. Check_Type
  363. CloseChildHandle
  364. Compare
  365. CompareImpl
  366. CreateChild
  367. CreateEventA
  368. CreateFile
  369. CreateFileA
  370. CreatePipe
  371. CreateProcess
  372. CreateProcessA
  373. CreateSignal
  374. D
  375. DATA_ENSURE
  376. DATA_ENSURE_CHECK
  377. DATA_PTR
  378. DBLKSIZ
  379. DBL_DIG
  380. DBL_EPSILON
  381. DBL_MANT_DIG
  382. DBL_MAX
  383. DBL_MAX_10_EXP
  384. DBL_MAX_EXP
  385. DBL_MIN
  386. DBL_MIN_10_EXP
  387. DBL_MIN_EXP
  388. DBM
  389. DBM_INSERT
  390. DBM_IOERR
  391. DBM_RDONLY
  392. DBM_REPLACE
  393. DCL_BLOCK
  394. DECIMAL_MANT
  395. DECLARE_ALGO_CLASS
  396. DECL_FUNC
  397. DEFAULT_ANCHOR_FORMAT
  398. DEFAULT_CODE_JIS
  399. DEFAULT_CODE_SJIS
  400. DEFAULT_CONV
  401. DEFAULT_EVENTLOOP_DEPTH
  402. DEFAULT_EVENT_LOOP_MAX
  403. DEFAULT_FOLD
  404. DEFAULT_J
  405. DEFAULT_KCODE
  406. DEFAULT_MATCH_STACK_LIMIT_SIZE
  407. DEFAULT_NO_EVENT_TICK
  408. DEFAULT_NO_EVENT_WAIT
  409. DEFAULT_OBJECT_TYPE
  410. DEFAULT_R
  411. DEFAULT_TIMER_TICK
  412. DEFAULT_TOKEN
  413. DEFAULT_VERB_WARN_FUNCTION
  414. DEFAULT_WARN_FUNCTION
  415. DEFER_INTS
  416. DEFINES_H
  417. DEFINE_ALGO_CLASS
  418. DEFINE_ALGO_METADATA
  419. DEFINE_MOUSE_GET_MEMBER
  420. DEFMETH
  421. DEFPREC
  422. DEFS_H
  423. DEF_MEM_LEVEL
  424. DEF_OSSL_PKEY_BN
  425. DEL
  426. DELAY_INFTY
  427. DEPRECATED
  428. DEVICELEN
  429. DH_HAS_PRIVATE
  430. DH_PRIVATE
  431. DIGITVAL
  432. DIGSPERLL
  433. DIGSPERLONG
  434. DIR
  435. DIRECT_H
  436. DIRFEXT
  437. DIV
  438. DLALIGN
  439. DLEXT
  440. DLEXT2
  441. DLN_DEFAULT_LIB_PATH
  442. DLN_DEFINED
  443. DLN_EBADLIB
  444. DLN_ECONFL
  445. DLN_EINIT
  446. DLN_ENOEXEC
  447. DLN_ENOINIT
  448. DLN_ENOTLIB
  449. DLN_ERROR
  450. DLN_EUNDEF
  451. DLN_H
  452. DLSTACK_ARGS
  453. DLSTACK_ARGS0
  454. DLSTACK_ARGS1
  455. DLSTACK_ARGS10
  456. DLSTACK_ARGS11
  457. DLSTACK_ARGS12
  458. DLSTACK_ARGS13
  459. DLSTACK_ARGS14
  460. DLSTACK_ARGS15
  461. DLSTACK_ARGS16
  462. DLSTACK_ARGS17
  463. DLSTACK_ARGS18
  464. DLSTACK_ARGS19
  465. DLSTACK_ARGS2
  466. DLSTACK_ARGS20
  467. DLSTACK_ARGS3
  468. DLSTACK_ARGS4
  469. DLSTACK_ARGS5
  470. DLSTACK_ARGS6
  471. DLSTACK_ARGS7
  472. DLSTACK_ARGS8
  473. DLSTACK_ARGS9
  474. DLSTACK_PROTO
  475. DLSTACK_PROTO0
  476. DLSTACK_PROTO1
  477. DLSTACK_PROTO10
  478. DLSTACK_PROTO11
  479. DLSTACK_PROTO12
  480. DLSTACK_PROTO13
  481. DLSTACK_PROTO14
  482. DLSTACK_PROTO15
  483. DLSTACK_PROTO16
  484. DLSTACK_PROTO17
  485. DLSTACK_PROTO18
  486. DLSTACK_PROTO19
  487. DLSTACK_PROTO2
  488. DLSTACK_PROTO20
  489. DLSTACK_PROTO3
  490. DLSTACK_PROTO4
  491. DLSTACK_PROTO5
  492. DLSTACK_PROTO6
  493. DLSTACK_PROTO7
  494. DLSTACK_PROTO8
  495. DLSTACK_PROTO9
  496. DLSTACK_SIZE
  497. DLSTACK_TYPE
  498. DLTYPE_CHAR
  499. DLTYPE_DOUBLE
  500. DLTYPE_FLOAT
  501. DLTYPE_INT
  502. DLTYPE_LONG
  503. DLTYPE_LONG_LONG
  504. DLTYPE_SHORT
  505. DLTYPE_VOID
  506. DLTYPE_VOIDP
  507. DL_HANDLE
  508. DL_OPEN
  509. DL_SYM
  510. DOSISH
  511. DOSISH_DRIVE_LETTER
  512. DOSISH_UNC
  513. DOUBLE_CONVWITH
  514. DOUT
  515. DOUTD
  516. DOUTI
  517. DOUTMSG
  518. DOUTS
  519. DOXOR
  520. DO_IT_VIA_RUBY
  521. DSAPrivateKey_dup
  522. DSAPublicKey_dup
  523. DSA_HAS_PRIVATE
  524. DSA_PRIVATE
  525. DUMP1
  526. DUMP2
  527. DUMP3
  528. DUPSETUP
  529. DVAR_DONT_RECYCLE
  530. DWORD
  531. D_printf
  532. D_puts
  533. Data_Get_Struct
  534. Data_Make_Struct
  535. Data_Wrap_Struct
  536. Debug
  537. DefEngineConst
  538. DefOCSPConst
  539. DefOCSPVConst
  540. DefPKCS7Const
  541. DefRSAConst
  542. DefX509Const
  543. DefX509Default
  544. DeleteFile
  545. DeleteFileA
  546. DoSomeOne
  547. DummyInterp
  548. DupConfigPtr
  549. DupPKCS7RecipientPtr
  550. DupPKCS7SignerPtr
  551. DupPKeyPtr
  552. DupPrivPKeyPtr
  553. DupX509AttrPtr
  554. DupX509CRLPtr
  555. DupX509CertPtr
  556. DupX509ExtPtr
  557. DupX509ReqPtr
  558. DupX509RevokedPtr
  559. DupX509StorePtr
  560. DuplicateHandle
  561. E
  562. E2BIG
  563. EACCES
  564. EADDRINUSE
  565. EADDRNOTAVAIL
  566. EAFNOSUPPORT
  567. EAGAIN
  568. EAI_ADDRFAMILY
  569. EAI_AGAIN
  570. EAI_BADFLAGS
  571. EAI_BADHINTS
  572. EAI_FAIL
  573. EAI_FAMILY
  574. EAI_MAX
  575. EAI_MEMORY
  576. EAI_NODATA
  577. EAI_NONAME
  578. EAI_PROTOCOL
  579. EAI_SERVICE
  580. EAI_SOCKTYPE
  581. EAI_SYSTEM
  582. EALREADY
  583. EASYWIN
  584. EBADF
  585. EBUSY
  586. ECHILD
  587. ECONNABORTED
  588. ECONNREFUSED
  589. ECONNRESET
  590. EDEADLK
  591. EDESTADDRREQ
  592. EDOM
  593. EDQUOT
  594. EEXIST
  595. EFAULT
  596. EFBIG
  597. EFFECT_MEMORY
  598. EFFECT_OPTION
  599. EFFECT_STOP_BACKTRACK
  600. EHOSTDOWN
  601. EHOSTUNREACH
  602. EINPROGRESS
  603. EINTR
  604. EINVAL
  605. EIO
  606. EISCONN
  607. EISDIR
  608. ELOOP
  609. ELTS_SHARED
  610. EMFILE
  611. EMLINK
  612. EMSGSIZE
  613. ENABLE_INTS
  614. END
  615. END_CALLARGS
  616. END_FOREACH
  617. END_FOREACH_CHILD
  618. END_FOREACH_FROM
  619. ENETDOWN
  620. ENETRESET
  621. ENETUNREACH
  622. ENFILE
  623. ENI_FAMILY
  624. ENI_MEMORY
  625. ENI_NOHOSTNAME
  626. ENI_NOSERVNAME
  627. ENI_NOSOCKET
  628. ENI_SALEN
  629. ENI_SYSTEM
  630. ENOBUFS
  631. ENODEV
  632. ENOENT
  633. ENOEXEC
  634. ENOMEM
  635. ENOPROTOOPT
  636. ENOSPC
  637. ENOSYS
  638. ENOTCONN
  639. ENOTDIR
  640. ENOTSOCK
  641. ENOTTY
  642. ENSURE_YAML_IEND
  643. ENSURE_YAML_IOPEN
  644. ENTER
  645. ENV_H
  646. ENV_IGNORECASE
  647. ENXIO
  648. EOF
  649. EOPNOTSUPP
  650. EOSERR
  651. EOS_P
  652. EPERM
  653. EPFNOSUPPORT
  654. EPIPE
  655. EPROCLIM
  656. EPROTONOSUPPORT
  657. EPROTOTYPE
  658. EQUAL
  659. ERANGE
  660. EREMOTE
  661. EROFS
  662. ERR
  663. ERRBUF_APPEND
  664. ERRNO_H
  665. ERROR_TOKEN
  666. ESC
  667. ESHUTDOWN
  668. ESOCKTNOSUPPORT
  669. ESPIPE
  670. ESRCH
  671. ESTALE
  672. ETIMEDOUT
  673. ETOOMANYREFS
  674. EUSERS
  675. EVENTSINK_Constructor
  676. EVENTSINK_Destructor
  677. EVENTSINK_GetIDsOfNames
  678. EVENTSINK_GetTypeInfo
  679. EVENTSINK_GetTypeInfoCount
  680. EVENTSINK_Invoke
  681. EVENTSINK_QueryInterface
  682. EVLOOP_WAKEUP_CHANCE
  683. EVP_CIPHER_CTX_copy
  684. EVP_CIPHER_name
  685. EVP_CipherFinal_ex
  686. EVP_CipherInit_ex
  687. EVP_DigestFinal_ex
  688. EVP_DigestInit_ex
  689. EVP_MD_CTX_cleanup
  690. EVP_MD_CTX_create
  691. EVP_MD_CTX_destroy
  692. EVP_MD_CTX_init
  693. EVP_MD_name
  694. EWOULDBLOCK
  695. EXCL
  696. EXDEV
  697. EXEC_EVENT_HOOK
  698. EXEC_TAG
  699. EXIT_FAILURE
  700. EXIT_SUCCESS
  701. EXPAND_STRING_MAX_LENGTH
  702. EXPR1
  703. EXTEND16
  704. EXTEND32
  705. EXTERN
  706. EffectNode
  707. F
  708. FAILED_MAXLEN
  709. FAIL_CreateInterp
  710. FAIL_Tcl_InitStubs
  711. FAIL_Tk_Init
  712. FAIL_Tk_InitStubs
  713. FAITH
  714. FALSE
  715. FAPPEND
  716. FCNTL_H
  717. FDEV
  718. FD_CLR
  719. FD_ISSET
  720. FD_PASSING_BY_MSG_ACCRIGHTS
  721. FD_PASSING_BY_MSG_CONTROL
  722. FD_SET
  723. FD_ZERO
  724. FF
  725. FFF
  726. FILE
  727. FILL
  728. FINAL_TOKEN
  729. FIND_ENTRY
  730. FIONREAD_POSSIBLE_P
  731. FIX2INT
  732. FIX2LONG
  733. FIX2UINT
  734. FIX2ULONG
  735. FIXABLE
  736. FIXED_MIME
  737. FIXME
  738. FIXNUMARG
  739. FIXNUM_FLAG
  740. FIXNUM_MAX
  741. FIXNUM_MIN
  742. FIXNUM_P
  743. FLAG_CCLASS_NOT
  744. FLAG_CCLASS_SHARE
  745. FLAG_MATCHED
  746. FLOAT_CONVWITH
  747. FLOAT_DIG
  748. FLT_RADIX
  749. FLT_ROUNDS
  750. FLUSH
  751. FLUSH_REGISTER_WINDOWS
  752. FL_ABLE
  753. FL_EXIVAR
  754. FL_FINALIZE
  755. FL_FREEZE
  756. FL_MARK
  757. FL_RESERVED
  758. FL_REVERSE
  759. FL_SET
  760. FL_SINGLETON
  761. FL_TAINT
  762. FL_TEST
  763. FL_UNSET
  764. FL_USER0
  765. FL_USER1
  766. FL_USER2
  767. FL_USER3
  768. FL_USER4
  769. FL_USER5
  770. FL_USER6
  771. FL_USER7
  772. FL_USHIFT
  773. FMINUS
  774. FMODE_APPEND
  775. FMODE_BINMODE
  776. FMODE_CREATE
  777. FMODE_DUPLEX
  778. FMODE_NOREVLOOKUP
  779. FMODE_PREP
  780. FMODE_READABLE
  781. FMODE_READWRITE
  782. FMODE_SYNC
  783. FMODE_SYNCWRITE
  784. FMODE_TTY
  785. FMODE_WRITABLE
  786. FMODE_WSPLIT
  787. FMODE_WSPLIT_INITIALIZED
  788. FNM_CASEFOLD
  789. FNM_DOTMATCH
  790. FNM_ERROR
  791. FNM_NOESCAPE
  792. FNM_NOMATCH
  793. FNM_PATHNAME
  794. FNM_SYSCASE
  795. FNOINHERIT
  796. FNONE
  797. FOLD_MARGIN
  798. FOPEN
  799. FORCE_NEXT_TOKEN
  800. FOREACH_BITLEN
  801. FOREACH_CHILD
  802. FOREACH_THREAD
  803. FOREACH_THREAD_FROM
  804. FOUND_CALLED_NODE
  805. FPLUS
  806. FPREC
  807. FPT
  808. FRAME_DMETH
  809. FRAME_FUNC
  810. FREE_ENVIRON
  811. FREE_MIN
  812. FSHARP
  813. FSPACE
  814. FTEXT
  815. FUNCNAME_PATTERN
  816. FUNCTION_CALL_MAY_RETURN_TWICE
  817. FWIDTH
  818. FZERO
  819. F_GETFL
  820. F_LOCK
  821. F_OK
  822. F_SETFD
  823. F_SETFL
  824. F_TEST
  825. F_TLOCK
  826. F_ULOCK
  827. Fifo
  828. FilePathValue
  829. FindChildSlot
  830. FindFirstChildSlot
  831. FindFirstFile
  832. FindFirstFileA
  833. FindFreeChildSlot
  834. FindNextFile
  835. FindNextFileA
  836. FormatMessage
  837. FormatMessageA
  838. FreeEnvironmentStrings
  839. FreeNode
  840. FunctionNum_of_GetCurrentNamespace
  841. FunctionNum_of_GetFrame
  842. FunctionNum_of_PopCallFrame
  843. G
  844. GCC_VERSION_BEFORE
  845. GC_DEBUG
  846. GC_LEVEL_MAX
  847. GC_MALLOC_LIMIT
  848. GC_WATER_MARK
  849. GETA1
  850. GETA2
  851. GETARG
  852. GETASTER
  853. GETGROUPS_T
  854. GETIOV
  855. GETNTHARG
  856. GETPGRP_VOID
  857. GETPOSARG
  858. GETTIME
  859. GET_2BYTE_INT_INC
  860. GET_4BYTE_INT_INC
  861. GET_8BYTE_INT_INC
  862. GET_ABSADDR_INC
  863. GET_AI
  864. GET_ALIGNMENT_PAD_SIZE
  865. GET_BYTE_INC
  866. GET_CANONNAME
  867. GET_CHAR_LEN_TOP_ALT_VARLEN
  868. GET_CHAR_LEN_VARLEN
  869. GET_CODE_POINT
  870. GET_ENVIRON
  871. GET_INT_INC
  872. GET_LENGTH_INC
  873. GET_MEMNUM_INC
  874. GET_OPTION_INC
  875. GET_POINTER_INC
  876. GET_RELADDR_INC
  877. GET_REPEATNUM_INC
  878. GET_SCANNER
  879. GET_SHORT
  880. GET_SHORT_INC
  881. GET_STACK_INDEX
  882. GET_TAIL
  883. GET_TRUE_YAML_INDENT
  884. GET_UINT_INC
  885. GG
  886. GGG
  887. GLOB_VERBOSE
  888. GOBBLE_UP_YAML_INDENT
  889. GUARD_OBJ
  890. GZFILE_FLAG_FOOTER_FINISHED
  891. GZFILE_FLAG_HEADER_FINISHED
  892. GZFILE_FLAG_SYNC
  893. GZFILE_IS_FINISHED
  894. GZFILE_READ_SIZE
  895. GZIP_SUPPORT
  896. GZ_EXTRAFLAG_FAST
  897. GZ_EXTRAFLAG_SLOW
  898. GZ_FLAG_COMMENT
  899. GZ_FLAG_ENCRYPT
  900. GZ_FLAG_EXTRA
  901. GZ_FLAG_MULTIPART
  902. GZ_FLAG_ORIG_NAME
  903. GZ_FLAG_UNKNOWN_MASK
  904. GZ_MAGIC1
  905. GZ_MAGIC2
  906. GZ_METHOD_DEFLATE
  907. GenerateConsoleCtrlEvent
  908. GetAddSubPrec
  909. GetBN
  910. GetBNPtr
  911. GetBit
  912. GetCipher
  913. GetCipherPtr
  914. GetCommandLine
  915. GetCommandLineA
  916. GetConfig
  917. GetConfigPtr
  918. GetCurrentThreadHandle
  919. GetDBM
  920. GetDBM2
  921. GetDIR
  922. GetDigest
  923. GetDigestPtr
  924. GetEngine
  925. GetEnvironmentStrings
  926. GetEnvironmentVariable
  927. GetFileAttributes
  928. GetFileAttributesA
  929. GetHMAC
  930. GetLogicalDrives
  931. GetMOUSE
  932. GetModuleFileName
  933. GetModuleFileNameA
  934. GetOCSPBasicRes
  935. GetOCSPCertId
  936. GetOCSPReq
  937. GetOCSPRes
  938. GetOpenFile
  939. GetPKCS12
  940. GetPKCS7
  941. GetPKCS7ri
  942. GetPKCS7si
  943. GetPKey
  944. GetPKeyDH
  945. GetPKeyDSA
  946. GetPKeyPtr
  947. GetPKeyRSA
  948. GetPositiveInt
  949. GetPrivPKeyPtr
  950. GetProcAddress
  951. GetProcAddressA
  952. GetProcessTimes
  953. GetSPKI
  954. GetStdHandle
  955. GetTimeval
  956. GetUserName
  957. GetVersionExA
  958. GetVpValue
  959. GetWINDOW
  960. GetX509
  961. GetX509Attr
  962. GetX509CRL
  963. GetX509CRLPtr
  964. GetX509CertPtr
  965. GetX509Ext
  966. GetX509ExtFactory
  967. GetX509ExtPtr
  968. GetX509Name
  969. GetX509NamePtr
  970. GetX509Req
  971. GetX509ReqPtr
  972. GetX509Rev
  973. GetX509StCtx
  974. GetX509Store
  975. GetX509StorePtr
  976. GroupNumRemap
  977. H
  978. HASH
  979. HASHC
  980. HASH_DELETED
  981. HASH_PROC_DEFAULT
  982. HAVE_44BSD_SETGID
  983. HAVE_44BSD_SETUID
  984. HAVE_ACOSH
  985. HAVE_COSH
  986. HAVE_DAYLIGHT
  987. HAVE_DECL_SYS_NERR
  988. HAVE_DIRENT_H
  989. HAVE_DLOPEN
  990. HAVE_DUP2
  991. HAVE_FCNTL
  992. HAVE_FCNTL_H
  993. HAVE_FINITE
  994. HAVE_FLOCK
  995. HAVE_FMOD
  996. HAVE_FREXP
  997. HAVE_FSYNC
  998. HAVE_GETCWD
  999. HAVE_GETPGRP
  1000. HAVE_GETRLIMIT
  1001. HAVE_GID_T
  1002. HAVE_HYPOT
  1003. HAVE_ISASCII
  1004. HAVE_ISNAN
  1005. HAVE_LONG_LONG
  1006. HAVE_MEMCMP
  1007. HAVE_MEMMOVE
  1008. HAVE_MKDIR
  1009. HAVE_MKTIME
  1010. HAVE_MODF
  1011. HAVE_NATIVETHREAD
  1012. HAVE_NATIVETHREAD_KILL
  1013. HAVE_OFF_T
  1014. HAVE_PAUSE
  1015. HAVE_PID_T
  1016. HAVE_PROTOTYPES
  1017. HAVE_RB_DEFINE_ALLOC_FUNC
  1018. HAVE_SEEKDIR
  1019. HAVE_SETRGID
  1020. HAVE_SETRUID
  1021. HAVE_SIGPROCMASK
  1022. HAVE_SINH
  1023. HAVE_SPAWNV
  1024. HAVE_STDARG_PROTOTYPES
  1025. HAVE_STDLIB_H
  1026. HAVE_STRCASECMP
  1027. HAVE_STRCHR
  1028. HAVE_STRERROR
  1029. HAVE_STRFTIME
  1030. HAVE_STRING_H
  1031. HAVE_STRNCASECMP
  1032. HAVE_STRSTR
  1033. HAVE_STRTOD
  1034. HAVE_STRTOL
  1035. HAVE_STRTOUL
  1036. HAVE_STRUCT_TM_TM_GMTOFF
  1037. HAVE_ST_RDEV
  1038. HAVE_SYS_FILE_H
  1039. HAVE_SYS_RESOURCE_H
  1040. HAVE_SYS_TIMES_H
  1041. HAVE_SYS_TIME_H
  1042. HAVE_SYS_WAIT_H
  1043. HAVE_TANH
  1044. HAVE_TELLDIR
  1045. HAVE_TIMES
  1046. HAVE_TM_ZONE
  1047. HAVE_TRUNCATE
  1048. HAVE_TZNAME
  1049. HAVE_UID_T
  1050. HAVE_UNISTD_H
  1051. HAVE_UTIMES
  1052. HAVE_UTIME_H
  1053. HAVE_WAIT4
  1054. HAVE_WAITPID
  1055. HAVE__SETJMP
  1056. HEAPCNT
  1057. HEAPS_INCREMENT
  1058. HEAP_MIN_SLOTS
  1059. HEXPREFIX
  1060. HH
  1061. HHH
  1062. HIGH_PRIORITY_CLASS
  1063. HISTORY_TREE_INIT_ALLOC_SIZE
  1064. HMAC_CTX_cleanup
  1065. HMAC_CTX_copy
  1066. HMAC_CTX_init
  1067. HMAC_Init_ex
  1068. HOLD_SIZE
  1069. HTOND
  1070. HTONF
  1071. HTOVD
  1072. HTOVF
  1073. HZ
  1074. HashDataType
  1075. I
  1076. IA64_INIT
  1077. ICONV2VALUE
  1078. ICONV_FREE
  1079. ICONV_INPTR_CAST
  1080. ID
  1081. ID2SYM
  1082. IDLE_PRIORITY_CLASS
  1083. ID_ALLOCATOR
  1084. ID_ATTRSET
  1085. ID_CLASS
  1086. ID_CONST
  1087. ID_GLOBAL
  1088. ID_INSTANCE
  1089. ID_INTERNAL
  1090. ID_JUNK
  1091. ID_LOCAL
  1092. ID_SCOPE_MASK
  1093. ID_SCOPE_SHIFT
  1094. IEVENTSINKOBJ
  1095. IEventSink
  1096. IEventSinkVtbl
  1097. II
  1098. III
  1099. IMMEDIATE_MASK
  1100. IMMEDIATE_P
  1101. INCL_DOS
  1102. INCR
  1103. INCSIZE
  1104. INET_CLIENT
  1105. INET_SERVER
  1106. INET_SOCKS
  1107. INIT_MATCH_STACK_SIZE
  1108. INIT_MULTI_BYTE_RANGE_SIZE
  1109. INIT_NAMES_ALLOC_NUM
  1110. INIT_NAME_BACKREFS_ALLOC_NUM
  1111. INIT_SCANENV_MEMNODES_ALLOC_SIZE
  1112. INPUT_CODE_FIX
  1113. INPUT_OPTION
  1114. INSPECT_LENGTH
  1115. INT2BOOL
  1116. INT2FIX
  1117. INT2NUM
  1118. INT_MAX_LIMIT
  1119. INVALID_CODE_FE
  1120. INVALID_CODE_FF
  1121. INVALID_OBJECT
  1122. INVALID_STACK_INDEX
  1123. IN_ALT
  1124. IN_CLASSA_NSHIFT
  1125. IN_CLASSD
  1126. IN_EXPERIMENTAL
  1127. IN_LOOPBACKNET
  1128. IN_MAIN_CONTEXT
  1129. IN_MULTICAST
  1130. IN_NOT
  1131. IN_REPEAT
  1132. IN_VAR_REPEAT
  1133. INamesArg
  1134. IOBUF_SIZE
  1135. IOCPARM_LEN
  1136. IOINFO_ARRAY_ELTS
  1137. IOINFO_L2E
  1138. ISALNUM
  1139. ISALPHA
  1140. ISASCII
  1141. ISDIGIT
  1142. ISEND
  1143. ISLOWER
  1144. ISO2022JP
  1145. ISO8859_1
  1146. ISO_DATE_EXT
  1147. ISPRINT
  1148. ISSPACE
  1149. ISUPPER
  1150. ISXDIGIT
  1151. IS_ARG
  1152. IS_BACKREF_NAME_REF
  1153. IS_BEG
  1154. IS_CALL_NAME_REF
  1155. IS_CALL_RECURSION
  1156. IS_CCLASS_NOT
  1157. IS_CCLASS_SHARE
  1158. IS_DLEXT
  1159. IS_DYNAMIC_OPTION
  1160. IS_EFFECT_ADDR_FIXED
  1161. IS_EFFECT_CALLED
  1162. IS_EFFECT_CLEN_FIXED
  1163. IS_EFFECT_MARK1
  1164. IS_EFFECT_MARK2
  1165. IS_EFFECT_MAX_FIXED
  1166. IS_EFFECT_MIN_FIXED
  1167. IS_EFFECT_NAMED_GROUP
  1168. IS_EFFECT_RECURSION
  1169. IS_EFFECT_STOP_BT_SIMPLE_REPEAT
  1170. IS_EMPTY_STR
  1171. IS_EVSTR
  1172. IS_EXTEND
  1173. IS_FIND_CONDITION
  1174. IS_FIND_LONGEST
  1175. IS_FIND_NOT_EMPTY
  1176. IS_IGNORECASE
  1177. IS_MULTILINE
  1178. IS_NEED_STR_LEN_OP_EXACT
  1179. IS_NODE_TYPE_SIMPLE
  1180. IS_NOTBOL
  1181. IS_NOTEOL
  1182. IS_NOT_NULL
  1183. IS_NULL
  1184. IS_POSIXLINE
  1185. IS_POSIX_REGION
  1186. IS_PREP_STDIO
  1187. IS_QUALIFIER_IN_REPEAT
  1188. IS_REPEAT_INFINITE
  1189. IS_SINGLELINE
  1190. IS_SOEXT
  1191. IS_STRIO
  1192. IS_SYNTAX_BV
  1193. IS_SYNTAX_OP
  1194. IS_SYNTAX_OP2
  1195. IS_TO_VOID_TARGET
  1196. ITER_CUR
  1197. ITER_NOT
  1198. ITER_PAS
  1199. ITER_PRE
  1200. Inc
  1201. Indent
  1202. Init_Array
  1203. Init_Bignum
  1204. Init_Binding
  1205. Init_Comparable
  1206. Init_Dir
  1207. Init_Enumerable
  1208. Init_Enumerator
  1209. Init_Exception
  1210. Init_File
  1211. Init_GC
  1212. Init_Hash
  1213. Init_IO
  1214. Init_Math
  1215. Init_Numeric
  1216. Init_Object
  1217. Init_Precision
  1218. Init_Proc
  1219. Init_Random
  1220. Init_Range
  1221. Init_Regexp
  1222. Init_String
  1223. Init_Struct
  1224. Init_Thread
  1225. Init_Time
  1226. Init_Win32API
  1227. Init_bigdecimal
  1228. Init_cparse
  1229. Init_curses
  1230. Init_dbm
  1231. Init_digest
  1232. Init_dl
  1233. Init_dlcfunc
  1234. Init_dlhandle
  1235. Init_dlptr
  1236. Init_etc
  1237. Init_eval
  1238. Init_ext
  1239. Init_fcntl
  1240. Init_gdbm
  1241. Init_heap
  1242. Init_iconv
  1243. Init_load
  1244. Init_marshal
  1245. Init_md5
  1246. Init_nkf
  1247. Init_openssl
  1248. Init_ossl_bn
  1249. Init_ossl_config
  1250. Init_ossl_dh
  1251. Init_ossl_digest
  1252. Init_ossl_dsa
  1253. Init_ossl_engine
  1254. Init_ossl_hmac
  1255. Init_ossl_ns_spki
  1256. Init_ossl_ocsp
  1257. Init_ossl_pkcs12
  1258. Init_ossl_pkcs7
  1259. Init_ossl_pkey
  1260. Init_ossl_rand
  1261. Init_ossl_rsa
  1262. Init_ossl_ssl
  1263. Init_ossl_x509
  1264. Init_ossl_x509attr
  1265. Init_ossl_x509cert
  1266. Init_ossl_x509crl
  1267. Init_ossl_x509ext
  1268. Init_ossl_x509name
  1269. Init_ossl_x509req
  1270. Init_ossl_x509revoked
  1271. Init_ossl_x509store
  1272. Init_pack
  1273. Init_process
  1274. Init_pty
  1275. Init_readline
  1276. Init_ripper
  1277. Init_rmd160
  1278. Init_sdbm
  1279. Init_sha1
  1280. Init_signal
  1281. Init_socket
  1282. Init_stack
  1283. Init_stringio
  1284. Init_strscan
  1285. Init_syck
  1286. Init_sym
  1287. Init_syserr
  1288. Init_syslog
  1289. Init_tcltklib
  1290. Init_tkutil
  1291. Init_var_tables
  1292. Init_version
  1293. Init_wait
  1294. Init_win32ole
  1295. Init_zlib
  1296. Int32x32To64
  1297. IsWin95
  1298. IsWinNT
  1299. J
  1300. JAPANESE_EUC
  1301. JIS_INPUT
  1302. JJ
  1303. JJJ
  1304. JUMP_TAG
  1305. KCODE_EUC
  1306. KCODE_FIXED
  1307. KCODE_MASK
  1308. KCODE_NONE
  1309. KCODE_SJIS
  1310. KCODE_UTF8
  1311. KR_REHASH
  1312. KS_SIZE
  1313. LADJUST
  1314. LARGEDATA
  1315. LAST
  1316. LAST_I
  1317. LATIN1_INPUT
  1318. LGCHUNKBITS
  1319. LIBC_NAME
  1320. LITTLE_ENDIAN
  1321. LK_ERR
  1322. LK_LEN
  1323. LL2NUM
  1324. LLONG_MAX
  1325. LLONG_MIN
  1326. LMASK
  1327. LOAD
  1328. LOADREG
  1329. LOAD_ERRTAB_LEN
  1330. LOAD_RELATIVE
  1331. LOCKFILE_EXCLUSIVE_LOCK
  1332. LOCKFILE_FAIL_IMMEDIATELY
  1333. LOCK_EX
  1334. LOCK_NB
  1335. LOCK_SH
  1336. LOCK_UN
  1337. LOG_PI_OVER_2
  1338. LONG2FIX
  1339. LONG2NUM
  1340. LONGDBL
  1341. LONGINT
  1342. LONG_IS_32_BITS
  1343. LONG_LONG
  1344. LONG_MAX
  1345. LONG_MIN
  1346. LOOKUP_ORDERS
  1347. L_CURR
  1348. L_INCR
  1349. L_SET
  1350. L_XTND
  1351. LengthType
  1352. LoadLibrary
  1353. LoadLibraryA
  1354. LoadLibraryExA
  1355. LockFile
  1356. LockFileEx
  1357. M
  1358. MAILHEADER_EXT
  1359. MANT_BITS
  1360. MARK_STACK_EMPTY
  1361. MARK_STACK_MAX
  1362. MARSHAL_MAJOR
  1363. MARSHAL_MINOR
  1364. MATCHED
  1365. MATCHED_P
  1366. MATCH_AND_RETURN_CHECK
  1367. MATCH_ARG_FREE
  1368. MATCH_ARG_INIT
  1369. MATCH_BUSY
  1370. MATCH_DATA
  1371. MATRIX_A
  1372. MAX
  1373. MAXCHILDNUM
  1374. MAXEXP
  1375. MAXFRACT
  1376. MAXPATHLEN
  1377. MAXRECOVER
  1378. MAXTIME
  1379. MAX_CALLBACK
  1380. MAX_DLTYPE
  1381. MAX_ERROR_PAR_LEN
  1382. MAX_HASH_VALUE
  1383. MAX_NODE_OPT_INFO_REF_COUNT
  1384. MAX_WORD_LENGTH
  1385. MBCODE_START_POS
  1386. MBCTYPE_ASCII
  1387. MBCTYPE_EUC
  1388. MBCTYPE_SJIS
  1389. MBCTYPE_UTF8
  1390. MC_ANYCHAR
  1391. MC_ANYCHAR_ANYTIME
  1392. MC_ANYTIME
  1393. MC_ESC
  1394. MC_ONE_OR_MORE_TIME
  1395. MC_ZERO_OR_ONE_TIME
  1396. MD5OSSL_H_INCLUDED
  1397. MD5_BLOCK_LENGTH
  1398. MD5_CTX
  1399. MD5_DIGEST_LENGTH
  1400. MD5_DIGEST_STRING_LENGTH
  1401. MD5_End
  1402. MD5_Equal
  1403. MD5_Final
  1404. MD5_INCLUDED
  1405. MD5_Init
  1406. MD5_Update
  1407. MEMCMP
  1408. MEMCPY
  1409. MEMCPY_BCOPY
  1410. MEMMOVE
  1411. MEMSET_BZERO
  1412. MEMZERO
  1413. MIDST_DECL_CDECL
  1414. MIDST_DECL_STDCALL
  1415. MIMEOUT_BUF_LENGTH
  1416. MIME_BUF_MASK
  1417. MIME_BUF_SIZE
  1418. MIN
  1419. MINSIZE
  1420. MIN_HASH_VALUE
  1421. MIN_WORD_LENGTH
  1422. MISSING_H
  1423. MIXBITS
  1424. MODENUM_MAX
  1425. MODE_BINARY
  1426. MODE_BINMODE
  1427. MOVB
  1428. MOVEFILE_REPLACE_EXISTING
  1429. MSDOS
  1430. MSVCRT_THREADS
  1431. MTHREAD_ONLY
  1432. MUST_ALIGN
  1433. MY_BLOCK_SIZE
  1434. MY_FATAL_FUNC
  1435. Maj
  1436. MakeCipher
  1437. MakeHMAC
  1438. MakeOpenFile
  1439. MakeX509ExtFactory
  1440. MatchArg
  1441. Max
  1442. MemCmp
  1443. MemNumType
  1444. Min
  1445. MinMaxLen
  1446. MoveFile
  1447. MoveFileA
  1448. MoveFileEx
  1449. N
  1450. NAMEBUF_SIZE
  1451. NAMEBUF_SIZE_1
  1452. NAMLEN
  1453. NANCHOR
  1454. NATINT_HTONL
  1455. NATINT_HTONS
  1456. NATINT_HTOVL
  1457. NATINT_HTOVS
  1458. NATINT_LEN
  1459. NATINT_PACK
  1460. NATIVETHREAD_CURRENT
  1461. NATIVETHREAD_EQUAL
  1462. NATIVETHREAD_KILL
  1463. NBACKREF
  1464. NCALL
  1465. NCCLASS
  1466. NCONS
  1467. NCTYPE
  1468. NDIV
  1469. NEFFECT
  1470. NEGFIXABLE
  1471. NEWHEAP
  1472. NEWLINE
  1473. NEWLINE_CODE
  1474. NEWOBJ
  1475. NEW_ALIAS
  1476. NEW_ARGS
  1477. NEW_ARGSCAT
  1478. NEW_ARGSPUSH
  1479. NEW_ARRAY
  1480. NEW_ATTRASGN
  1481. NEW_ATTRSET
  1482. NEW_BACK_REF
  1483. NEW_BEGIN
  1484. NEW_BLOCK
  1485. NEW_BLOCK_ARG
  1486. NEW_BLOCK_PARAM
  1487. NEW_BLOCK_PASS
  1488. NEW_BMETHOD
  1489. NEW_BREAK
  1490. NEW_CALL
  1491. NEW_CASE
  1492. NEW_CDECL
  1493. NEW_CFUNC
  1494. NEW_CLASS
  1495. NEW_COLON2
  1496. NEW_COLON3
  1497. NEW_CONST
  1498. NEW_CREF
  1499. NEW_CVAR
  1500. NEW_CVASGN
  1501. NEW_CVDECL
  1502. NEW_DASGN
  1503. NEW_DASGN_CURR
  1504. NEW_DEFINED
  1505. NEW_DEFN
  1506. NEW_DEFS
  1507. NEW_DOT2
  1508. NEW_DOT3
  1509. NEW_DSTR
  1510. NEW_DSYM
  1511. NEW_DVAR
  1512. NEW_DXSTR
  1513. NEW_ENSURE
  1514. NEW_ERRINFO
  1515. NEW_EVSTR
  1516. NEW_FALSE
  1517. NEW_FBODY
  1518. NEW_FCALL
  1519. NEW_FOR
  1520. NEW_GASGN
  1521. NEW_GVAR
  1522. NEW_HASH
  1523. NEW_IASGN
  1524. NEW_IF
  1525. NEW_IFUNC
  1526. NEW_ITER
  1527. NEW_IVAR
  1528. NEW_LAMBDA
  1529. NEW_LASGN
  1530. NEW_LIST
  1531. NEW_LIT
  1532. NEW_LVAR
  1533. NEW_MASGN
  1534. NEW_MATCH
  1535. NEW_MATCH2
  1536. NEW_MATCH3
  1537. NEW_METHOD
  1538. NEW_MODULE
  1539. NEW_NEXT
  1540. NEW_NIL
  1541. NEW_NODE
  1542. NEW_NOT
  1543. NEW_NTH_REF
  1544. NEW_OPT_N
  1545. NEW_OP_ASGN1
  1546. NEW_OP_ASGN2
  1547. NEW_OP_ASGN22
  1548. NEW_OP_ASGN_AND
  1549. NEW_OP_ASGN_OR
  1550. NEW_POSTEXE
  1551. NEW_PREEXE
  1552. NEW_PRELUDE
  1553. NEW_REDO
  1554. NEW_RESBODY
  1555. NEW_RESCUE
  1556. NEW_RETRY
  1557. NEW_RETURN
  1558. NEW_RFUNC
  1559. NEW_SCLASS
  1560. NEW_SCOPE
  1561. NEW_SELF
  1562. NEW_SPLAT
  1563. NEW_STACK
  1564. NEW_STR
  1565. NEW_STRTERM
  1566. NEW_STRTERM0
  1567. NEW_SUPER
  1568. NEW_SVALUE
  1569. NEW_TO_ARY
  1570. NEW_TRUE
  1571. NEW_UNDEF
  1572. NEW_UNLESS
  1573. NEW_UNTIL
  1574. NEW_VALIAS
  1575. NEW_VCALL
  1576. NEW_WHEN
  1577. NEW_WHILE
  1578. NEW_XSTR
  1579. NEW_YIELD
  1580. NEW_ZARRAY
  1581. NEW_ZSUPER
  1582. NEXT
  1583. NEXTFROM
  1584. NEXT_ARGF_FORWARD
  1585. NGROUPS
  1586. NIL_P
  1587. NIOV
  1588. NI_DGRAM
  1589. NI_MAXHOST
  1590. NI_MAXSERV
  1591. NI_NAMEREQD
  1592. NI_NOFQDN
  1593. NI_NUMERICHOST
  1594. NI_NUMERICSERV
  1595. NKF_RELEASE_DATE
  1596. NKF_VERSION
  1597. NL
  1598. NL_CHOMP
  1599. NL_KEEP
  1600. NMOD
  1601. NO
  1602. NODE
  1603. NODE_BACKREFS_SIZE
  1604. NODE_H
  1605. NODE_HEREDOC
  1606. NODE_LMASK
  1607. NODE_LSHIFT
  1608. NODE_NEWLINE
  1609. NODE_STRTERM
  1610. NODE_STR_BUF_SIZE
  1611. NODE_STR_MARGIN
  1612. NODE_TYPEMASK
  1613. NODE_TYPESHIFT
  1614. NOEX_MASK
  1615. NOEX_NOSUPER
  1616. NOEX_PRIVATE
  1617. NOEX_PROTECTED
  1618. NOEX_PUBLIC
  1619. NOEX_RECV
  1620. NOEX_SAFE
  1621. NOEX_UNDEF
  1622. NOEX_WITH
  1623. NOEX_WITH_SAFE
  1624. NOFILE
  1625. NOINLINE
  1626. NONBLOCKING
  1627. NORETURN
  1628. NORETURN_STYLE_NEW
  1629. NORMALIZATION_TABLE_LENGTH
  1630. NORMALIZATION_TABLE_NFC_LENGTH
  1631. NORMALIZATION_TABLE_NFD_LENGTH
  1632. NORMAL_PRIORITY_CLASS
  1633. NO_CreateInterp
  1634. NO_DLN_LOAD
  1635. NO_DeleteInterp
  1636. NO_FindExecutable
  1637. NO_LONG_FNAME
  1638. NO_SAFE_RENAME
  1639. NO_TCL_DLL
  1640. NO_THREAD_INTERRUPT_TIME
  1641. NO_TK_DLL
  1642. NO_Tk_Init
  1643. NO_UINT64_T
  1644. NO_WAITPID
  1645. NO_X0201
  1646. NQUALIFIER
  1647. NQ_TARGET_ISNOT_EMPTY
  1648. NQ_TARGET_IS_EMPTY
  1649. NQ_TARGET_IS_EMPTY_MEM
  1650. NQ_TARGET_IS_EMPTY_REC
  1651. NSIG
  1652. NSLINKMODULE_OPTION_BINDNOW
  1653. NSTRING
  1654. NSTRING_CLEAR_RAW
  1655. NSTRING_IS_AMBIG
  1656. NSTRING_IS_AMBIG_REDUCE
  1657. NSTRING_IS_RAW
  1658. NSTRING_LEN
  1659. NSTRING_SET_AMBIG
  1660. NSTRING_SET_AMBIG_REDUCE
  1661. NSTRING_SET_RAW
  1662. NSTR_AMBIG
  1663. NSTR_AMBIG_REDUCE
  1664. NSTR_RAW
  1665. NST_ADDR_FIXED
  1666. NST_CALLED
  1667. NST_CLEN_FIXED
  1668. NST_IN_REPEAT
  1669. NST_MARK1
  1670. NST_MARK2
  1671. NST_MAX_FIXED
  1672. NST_MEM_BACKREFED
  1673. NST_MIN_FIXED
  1674. NST_NAMED_GROUP
  1675. NST_NAME_REF
  1676. NST_RECURSION
  1677. NST_STOP_BT_SIMPLE_REPEAT
  1678. NT
  1679. NTGLOB
  1680. NTMALLOC
  1681. NTOHD
  1682. NTOHF
  1683. NTSTRING
  1684. NTYPE
  1685. NULL
  1686. NULL_NODE
  1687. NULL_UCHARP
  1688. NUM2CH
  1689. NUM2CHR
  1690. NUM2DBL
  1691. NUM2INT
  1692. NUM2LL
  1693. NUM2LONG
  1694. NUM2OFFT
  1695. NUM2PTR
  1696. NUM2RLIM
  1697. NUM2UINT
  1698. NUM2ULL
  1699. NUM2ULONG
  1700. NUMCHAR_OPTION
  1701. N_ALT
  1702. N_ANCHOR
  1703. N_ANYCHAR
  1704. N_BACKREF
  1705. N_CALL
  1706. N_CCLASS
  1707. N_COMM
  1708. N_CTYPE
  1709. N_EFFECT
  1710. N_INET
  1711. N_INET6
  1712. N_LIST
  1713. N_MAGIC
  1714. N_QUALIFIER
  1715. N_REF_FUNC
  1716. N_STRING
  1717. NameEntry
  1718. NameTable
  1719. Need_Float
  1720. Need_Float2
  1721. Next
  1722. Node
  1723. NodeOptInfo
  1724. NtCmdLineElement
  1725. NtInitialize
  1726. OBJECT_TYPE_TEMPLATE
  1727. OBJSETUP
  1728. OBJ_FREEZE
  1729. OBJ_FROZEN
  1730. OBJ_INFECT
  1731. OBJ_IS_FREED
  1732. OBJ_TAINT
  1733. OBJ_TAINTED
  1734. OBSOLETE_SETREGID
  1735. OBSOLETE_SETREUID
  1736. ODIGITVAL
  1737. OFF16
  1738. OFF16B
  1739. OFF32
  1740. OFF32B
  1741. OFFT2NUM
  1742. OFF_DIR
  1743. OFF_PAG
  1744. OLEData_Get_Struct
  1745. OLE_ADDREF
  1746. OLE_FREE
  1747. OLE_GET_TYPEATTR
  1748. OLE_RELEASE
  1749. OLE_RELEASE_TYPEATTR
  1750. ONIGENCERR_INVALID_WIDE_CHAR_VALUE
  1751. ONIGENCERR_MEMORY
  1752. ONIGENCERR_TOO_BIG_WIDE_CHAR_VALUE
  1753. ONIGENCERR_TYPE_BUG
  1754. ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE
  1755. ONIGENC_AMBIGUOUS_MATCH_COMPOUND
  1756. ONIGENC_AMBIGUOUS_MATCH_DEFAULT
  1757. ONIGENC_AMBIGUOUS_MATCH_FULL
  1758. ONIGENC_AMBIGUOUS_MATCH_LIMIT
  1759. ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE
  1760. ONIGENC_AMBIGUOUS_MATCH_NONE
  1761. ONIGENC_ASCII_CODE_TO_LOWER_CASE
  1762. ONIGENC_ASCII_CODE_TO_UPPER_CASE
  1763. ONIGENC_CODE_RANGE_FROM
  1764. ONIGENC_CODE_RANGE_NUM
  1765. ONIGENC_CODE_RANGE_TO
  1766. ONIGENC_CODE_TO_MBC
  1767. ONIGENC_CODE_TO_MBCLEN
  1768. ONIGENC_CODE_TO_MBC_MAXLEN
  1769. ONIGENC_CTYPE_ALNUM
  1770. ONIGENC_CTYPE_ALPHA
  1771. ONIGENC_CTYPE_ASCII
  1772. ONIGENC_CTYPE_BLANK
  1773. ONIGENC_CTYPE_CNTRL
  1774. ONIGENC_CTYPE_DIGIT
  1775. ONIGENC_CTYPE_GRAPH
  1776. ONIGENC_CTYPE_LOWER
  1777. ONIGENC_CTYPE_NEWLINE
  1778. ONIGENC_CTYPE_PRINT
  1779. ONIGENC_CTYPE_PUNCT
  1780. ONIGENC_CTYPE_SPACE
  1781. ONIGENC_CTYPE_UPPER
  1782. ONIGENC_CTYPE_WORD
  1783. ONIGENC_CTYPE_XDIGIT
  1784. ONIGENC_GET_ALL_COMP_AMBIG_CODES
  1785. ONIGENC_GET_ALL_PAIR_AMBIG_CODES
  1786. ONIGENC_GET_CTYPE_CODE_RANGE
  1787. ONIGENC_ISO_8859_1_TO_LOWER_CASE
  1788. ONIGENC_ISO_8859_1_TO_UPPER_CASE
  1789. ONIGENC_IS_ALLOWED_REVERSE_MATCH
  1790. ONIGENC_IS_ASCII_CODE_CASE_AMBIG
  1791. ONIGENC_IS_ASCII_CODE_CTYPE
  1792. ONIGENC_IS_CODE_ALNUM
  1793. ONIGENC_IS_CODE_ALPHA
  1794. ONIGENC_IS_CODE_ASCII
  1795. ONIGENC_IS_CODE_BLANK
  1796. ONIGENC_IS_CODE_CNTRL
  1797. ONIGENC_IS_CODE_CTYPE
  1798. ONIGENC_IS_CODE_DIGIT
  1799. ONIGENC_IS_CODE_GRAPH
  1800. ONIGENC_IS_CODE_LOWER
  1801. ONIGENC_IS_CODE_NEWLINE
  1802. ONIGENC_IS_CODE_PRINT
  1803. ONIGENC_IS_CODE_PUNCT
  1804. ONIGENC_IS_CODE_SB_WORD
  1805. ONIGENC_IS_CODE_SPACE
  1806. ONIGENC_IS_CODE_UPPER
  1807. ONIGENC_IS_CODE_WORD
  1808. ONIGENC_IS_CODE_XDIGIT
  1809. ONIGENC_IS_MBC_AMBIGUOUS
  1810. ONIGENC_IS_MBC_ASCII
  1811. ONIGENC_IS_MBC_HEAD
  1812. ONIGENC_IS_MBC_NEWLINE
  1813. ONIGENC_IS_MBC_WORD
  1814. ONIGENC_IS_SINGLEBYTE
  1815. ONIGENC_IS_UNDEF
  1816. ONIGENC_IS_UNICODE_ISO_8859_1_CTYPE
  1817. ONIGENC_LEFT_ADJUST_CHAR_HEAD
  1818. ONIGENC_MAX_COMP_AMBIG_CODE_ITEM_NUM
  1819. ONIGENC_MAX_COMP_AMBIG_CODE_LEN
  1820. ONIGENC_MBC_ENC_LEN
  1821. ONIGENC_MBC_MAXLEN
  1822. ONIGENC_MBC_MAXLEN_DIST
  1823. ONIGENC_MBC_MINLEN
  1824. ONIGENC_MBC_NORMALIZE_MAXLEN
  1825. ONIGENC_MBC_TO_CODE
  1826. ONIGENC_MBC_TO_NORMALIZE
  1827. ONIGENC_NAME
  1828. ONIGENC_STEP_BACK
  1829. ONIGENC_SUPPORT_AMBIG_FLAG
  1830. ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE
  1831. ONIGERR_CHAR_CLASS_VALUE_AT_START_OF_RANGE
  1832. ONIGERR_CONTROL_CODE_SYNTAX
  1833. ONIGERR_DEFAULT_ENCODING_IS_NOT_SETTED
  1834. ONIGERR_EMPTY_CHAR_CLASS
  1835. ONIGERR_EMPTY_GROUP_NAME
  1836. ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS
  1837. ONIGERR_END_PATTERN_AT_CONTROL
  1838. ONIGERR_END_PATTERN_AT_ESCAPE
  1839. ONIGERR_END_PATTERN_AT_LEFT_BRACE
  1840. ONIGERR_END_PATTERN_AT_LEFT_BRACKET
  1841. ONIGERR_END_PATTERN_AT_META
  1842. ONIGERR_END_PATTERN_IN_GROUP
  1843. ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS
  1844. ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY
  1845. ONIGERR_INVALID_ARGUMENT
  1846. ONIGERR_INVALID_BACKREF
  1847. ONIGERR_INVALID_CHAR_IN_GROUP_NAME
  1848. ONIGERR_INVALID_CHAR_PROPERTY_NAME
  1849. ONIGERR_INVALID_GROUP_NAME
  1850. ONIGERR_INVALID_LOOK_BEHIND_PATTERN
  1851. ONIGERR_INVALID_POSIX_BRACKET_TYPE
  1852. ONIGERR_INVALID_REPEAT_RANGE_PATTERN
  1853. ONIGERR_INVALID_WIDE_CHAR_VALUE
  1854. ONIGERR_MATCH_STACK_LIMIT_OVER
  1855. ONIGERR_MEMORY
  1856. ONIGERR_META_CODE_SYNTAX
  1857. ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE
  1858. ONIGERR_MULTIPLEX_DEFINED_NAME
  1859. ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL
  1860. ONIGERR_NESTED_REPEAT_OPERATOR
  1861. ONIGERR_NEVER_ENDING_RECURSION
  1862. ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION
  1863. ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED
  1864. ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT
  1865. ONIGERR_PARSER_BUG
  1866. ONIGERR_PREMATURE_END_OF_CHAR_CLASS
  1867. ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR
  1868. ONIGERR_STACK_BUG
  1869. ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID
  1870. ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED
  1871. ONIGERR_TOO_BIG_BACKREF_NUMBER
  1872. ONIGERR_TOO_BIG_NUMBER
  1873. ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE
  1874. ONIGERR_TOO_BIG_WIDE_CHAR_VALUE
  1875. ONIGERR_TOO_LONG_WIDE_CHAR_VALUE
  1876. ONIGERR_TOO_MANY_MULTI_BYTE_RANGES
  1877. ONIGERR_TOO_SHORT_MULTI_BYTE_STRING
  1878. ONIGERR_TYPE_BUG
  1879. ONIGERR_UNDEFINED_BYTECODE
  1880. ONIGERR_UNDEFINED_GROUP_OPTION
  1881. ONIGERR_UNDEFINED_GROUP_REFERENCE
  1882. ONIGERR_UNDEFINED_NAME_REFERENCE
  1883. ONIGERR_UNEXPECTED_BYTECODE
  1884. ONIGERR_UNMATCHED_CLOSE_PARENTHESIS
  1885. ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS
  1886. ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE
  1887. ONIGURUMA
  1888. ONIGURUMA_H
  1889. ONIGURUMA_VERSION_MAJOR
  1890. ONIGURUMA_VERSION_MINOR
  1891. ONIGURUMA_VERSION_TEENY
  1892. ONIG_CHAR_TABLE_SIZE
  1893. ONIG_CHECK_NULL_RETURN
  1894. ONIG_CHECK_NULL_RETURN_VAL
  1895. ONIG_DEBUG
  1896. ONIG_ENCODING_ASCII
  1897. ONIG_ENCODING_BIG5
  1898. ONIG_ENCODING_EUC_CN
  1899. ONIG_ENCODING_EUC_JP
  1900. ONIG_ENCODING_EUC_KR
  1901. ONIG_ENCODING_EUC_TW
  1902. ONIG_ENCODING_INIT_DEFAULT
  1903. ONIG_ENCODING_ISO_8859_1
  1904. ONIG_ENCODING_ISO_8859_10
  1905. ONIG_ENCODING_ISO_8859_11
  1906. ONIG_ENCODING_ISO_8859_13
  1907. ONIG_ENCODING_ISO_8859_14
  1908. ONIG_ENCODING_ISO_8859_15
  1909. ONIG_ENCODING_ISO_8859_16
  1910. ONIG_ENCODING_ISO_8859_2
  1911. ONIG_ENCODING_ISO_8859_3
  1912. ONIG_ENCODING_ISO_8859_4
  1913. ONIG_ENCODING_ISO_8859_5
  1914. ONIG_ENCODING_ISO_8859_6
  1915. ONIG_ENCODING_ISO_8859_7
  1916. ONIG_ENCODING_ISO_8859_8
  1917. ONIG_ENCODING_ISO_8859_9
  1918. ONIG_ENCODING_KOI8
  1919. ONIG_ENCODING_KOI8_R
  1920. ONIG_ENCODING_SJIS
  1921. ONIG_ENCODING_UNDEF
  1922. ONIG_ENCODING_UTF16_BE
  1923. ONIG_ENCODING_UTF16_LE
  1924. ONIG_ENCODING_UTF32_BE
  1925. ONIG_ENCODING_UTF32_LE
  1926. ONIG_ENCODING_UTF8
  1927. ONIG_EXTERN
  1928. ONIG_INEFFECTIVE_META_CHAR
  1929. ONIG_INFINITE_DISTANCE
  1930. ONIG_IS_CAPTURE_HISTORY_GROUP
  1931. ONIG_IS_NOT_NULL
  1932. ONIG_IS_NULL
  1933. ONIG_IS_OPTION_ON
  1934. ONIG_IS_PATTERN_ERROR
  1935. ONIG_MAX_BACKREF_NUM
  1936. ONIG_MAX_CAPTURE_HISTORY_GROUP
  1937. ONIG_MAX_ERROR_MESSAGE_LEN
  1938. ONIG_MAX_MULTI_BYTE_RANGES_NUM
  1939. ONIG_MAX_REPEAT_NUM
  1940. ONIG_META_CHAR_ANYCHAR
  1941. ONIG_META_CHAR_ANYCHAR_ANYTIME
  1942. ONIG_META_CHAR_ANYTIME
  1943. ONIG_META_CHAR_ESCAPE
  1944. ONIG_META_CHAR_ONE_OR_MORE_TIME
  1945. ONIG_META_CHAR_ZERO_OR_ONE_TIME
  1946. ONIG_MISMATCH
  1947. ONIG_NORMAL
  1948. ONIG_NO_SUPPORT_CONFIG
  1949. ONIG_NREGION
  1950. ONIG_NULL_WARN
  1951. ONIG_OPTIMIZE_EXACT
  1952. ONIG_OPTIMIZE_EXACT_BM
  1953. ONIG_OPTIMIZE_EXACT_BM_NOT_REV
  1954. ONIG_OPTIMIZE_EXACT_IC
  1955. ONIG_OPTIMIZE_MAP
  1956. ONIG_OPTIMIZE_NONE
  1957. ONIG_OPTION_CAPTURE_GROUP
  1958. ONIG_OPTION_DEFAULT
  1959. ONIG_OPTION_DONT_CAPTURE_GROUP
  1960. ONIG_OPTION_EXTEND
  1961. ONIG_OPTION_FIND_LONGEST
  1962. ONIG_OPTION_FIND_NOT_EMPTY
  1963. ONIG_OPTION_IGNORECASE
  1964. ONIG_OPTION_MULTILINE
  1965. ONIG_OPTION_NEGATE_SINGLELINE
  1966. ONIG_OPTION_NONE
  1967. ONIG_OPTION_NOTBOL
  1968. ONIG_OPTION_NOTEOL
  1969. ONIG_OPTION_OFF
  1970. ONIG_OPTION_ON
  1971. ONIG_OPTION_POSIX_REGION
  1972. ONIG_OPTION_SINGLELINE
  1973. ONIG_REGION_NOTPOS
  1974. ONIG_RUBY_M17N
  1975. ONIG_STATE
  1976. ONIG_STATE_COMPILING
  1977. ONIG_STATE_DEC
  1978. ONIG_STATE_INC
  1979. ONIG_STATE_MODIFY
  1980. ONIG_STATE_NORMAL
  1981. ONIG_STATE_SEARCHING
  1982. ONIG_SYNTAX_DEFAULT
  1983. ONIG_SYNTAX_EMACS
  1984. ONIG_SYNTAX_GNU_REGEX
  1985. ONIG_SYNTAX_GREP
  1986. ONIG_SYNTAX_JAVA
  1987. ONIG_SYNTAX_PERL
  1988. ONIG_SYNTAX_POSIX_BASIC
  1989. ONIG_SYNTAX_POSIX_EXTENDED
  1990. ONIG_SYNTAX_RUBY
  1991. ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC
  1992. ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC
  1993. ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV
  1994. ONIG_SYN_ALLOW_INVALID_INTERVAL
  1995. ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME
  1996. ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP
  1997. ONIG_SYN_BACKSLASH_ESCAPE_IN_CC
  1998. ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP
  1999. ONIG_SYN_CONTEXT_INDEP_ANCHORS
  2000. ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS
  2001. ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS
  2002. ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND
  2003. ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY
  2004. ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC
  2005. ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY
  2006. ONIG_SYN_OP2_CCLASS_SET_OP
  2007. ONIG_SYN_OP2_CHAR_PROPERTY_PREFIX_IS
  2008. ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL
  2009. ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META
  2010. ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE
  2011. ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR
  2012. ONIG_SYN_OP2_ESC_G_SUBEXP_CALL
  2013. ONIG_SYN_OP2_ESC_H_XDIGIT
  2014. ONIG_SYN_OP2_ESC_K_NAMED_BACKREF
  2015. ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY
  2016. ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT
  2017. ONIG_SYN_OP2_ESC_U_HEX4
  2018. ONIG_SYN_OP2_ESC_V_VTAB
  2019. ONIG_SYN_OP2_OPTION_PERL
  2020. ONIG_SYN_OP2_OPTION_RUBY
  2021. ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL
  2022. ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT
  2023. ONIG_SYN_OP2_QMARK_GROUP_EFFECT
  2024. ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP
  2025. ONIG_SYN_OP_ASTERISK_ZERO_INF
  2026. ONIG_SYN_OP_BRACE_INTERVAL
  2027. ONIG_SYN_OP_BRACKET_CC
  2028. ONIG_SYN_OP_DECIMAL_BACKREF
  2029. ONIG_SYN_OP_DOT_ANYCHAR
  2030. ONIG_SYN_OP_ESC_ASTERISK_ZERO_INF
  2031. ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR
  2032. ONIG_SYN_OP_ESC_BRACE_INTERVAL
  2033. ONIG_SYN_OP_ESC_B_WORD_BOUND
  2034. ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR
  2035. ONIG_SYN_OP_ESC_CONTROL_CHARS
  2036. ONIG_SYN_OP_ESC_C_CONTROL
  2037. ONIG_SYN_OP_ESC_D_DIGIT
  2038. ONIG_SYN_OP_ESC_LPAREN_SUBEXP
  2039. ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END
  2040. ONIG_SYN_OP_ESC_OCTAL3
  2041. ONIG_SYN_OP_ESC_PLUS_ONE_INF
  2042. ONIG_SYN_OP_ESC_QMARK_ZERO_ONE
  2043. ONIG_SYN_OP_ESC_S_WHITE_SPACE
  2044. ONIG_SYN_OP_ESC_VBAR_ALT
  2045. ONIG_SYN_OP_ESC_W_WORD
  2046. ONIG_SYN_OP_ESC_X_BRACE_HEX8
  2047. ONIG_SYN_OP_ESC_X_HEX2
  2048. ONIG_SYN_OP_LINE_ANCHOR
  2049. ONIG_SYN_OP_LPAREN_SUBEXP
  2050. ONIG_SYN_OP_PLUS_ONE_INF
  2051. ONIG_SYN_OP_POSIX_BRACKET
  2052. ONIG_SYN_OP_QMARK_NON_GREEDY
  2053. ONIG_SYN_OP_QMARK_ZERO_ONE
  2054. ONIG_SYN_OP_VARIABLE_META_CHARACTERS
  2055. ONIG_SYN_OP_VBAR_ALT
  2056. ONIG_SYN_STRICT_CHECK_BACKREF
  2057. ONIG_SYN_WARN_CC_OP_NOT_ESCAPED
  2058. ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT
  2059. ONIG_TRAVERSE_CALLBACK_AT_BOTH
  2060. ONIG_TRAVERSE_CALLBACK_AT_FIRST
  2061. ONIG_TRAVERSE_CALLBACK_AT_LAST
  2062. ONOFF
  2063. ON_STR_BEGIN
  2064. ON_STR_END
  2065. OPENSSL_CONF
  2066. OPENSSL_cleanse
  2067. OPT_EXACT_MAXLEN
  2068. OR
  2069. OSSL_ASN1_DEFINE_CLASS
  2070. OSSL_ASN1_IMPL_FACTORY_METHOD
  2071. OSSL_Check_Instance
  2072. OSSL_Check_Kind
  2073. OSSL_Check_Same_Class
  2074. OSSL_Debug
  2075. OSSL_ENGINE_ENABLED
  2076. OSSL_ENGINE_H
  2077. OSSL_ENGINE_LOAD_IF_MATCH
  2078. OSSL_ErrMsg
  2079. OSSL_IMPL_SK2ARY
  2080. OSSL_NO_CONF_API
  2081. OSSL_OCSP_ENABLED
  2082. OSSL_PASS_MIN_LENGTH
  2083. OSSL_PKEY_BN
  2084. OSSL_PKEY_IS_PRIVATE
  2085. OSSL_PKEY_SET_PRIVATE
  2086. OSSL_PKEY_SET_PUBLIC
  2087. OSSL_SSL_METHOD_ENTRY
  2088. OSSL_VERSION
  2089. OSSL_Warn
  2090. OSSL_Warning
  2091. OSSL_X509ATTR_IS_SINGLE
  2092. OSSL_X509ATTR_SET_SINGLE
  2093. OSSL_X509_REVOKED_cmp
  2094. OS_AMIGA
  2095. OS_ATARI
  2096. OS_CODE
  2097. OS_CPM
  2098. OS_MACOS
  2099. OS_MSDOS
  2100. OS_OS2
  2101. OS_QDOS
  2102. OS_RISCOS
  2103. OS_TOPS20
  2104. OS_UNIX
  2105. OS_UNKNOWN
  2106. OS_VMCMS
  2107. OS_VMS
  2108. OS_WIN32
  2109. OS_ZSYSTEM
  2110. OVERWRITE
  2111. O_ACCMODE
  2112. O_APPEND
  2113. O_BINARY
  2114. O_CREAT
  2115. O_EXCL
  2116. O_NOINHERIT
  2117. O_NONBLOCK
  2118. O_RDONLY
  2119. O_RDWR
  2120. O_TEXT
  2121. O_TRUNC
  2122. O_WRONLY
  2123. One
  2124. OnigAmbigType
  2125. OnigCaptureTreeNode
  2126. OnigCodePoint
  2127. OnigCompAmbigCodeItem
  2128. OnigCompAmbigCodes
  2129. OnigCompileInfo
  2130. OnigDistance
  2131. OnigEncoding
  2132. OnigEncodingType
  2133. OnigErrorInfo
  2134. OnigMetaCharTableType
  2135. OnigOpInfoType
  2136. OnigOptionType
  2137. OnigPairAmbigCodes
  2138. OnigRegion
  2139. OnigRepeatRange
  2140. OnigSyntaxType
  2141. OnigToken
  2142. OpenFile
  2143. OptAncInfo
  2144. OptEnv
  2145. OptExactInfo
  2146. OptMapInfo
  2147. PACK_ITEM_ADJUST
  2148. PACK_LENGTH_ADJUST
  2149. PACK_LENGTH_ADJUST_SIZE
  2150. PAD
  2151. PADSIZE
  2152. PAGFEXT
  2153. PAIRMAX
  2154. PARSER_ARG
  2155. PATHLEN
  2156. PATH_ENV
  2157. PATH_MAX
  2158. PATH_SEP
  2159. PATH_SEP_CHAR
  2160. PBLKSIZ
  2161. PEM_def_callback
  2162. PEM_read_bio_DSAPublicKey
  2163. PEM_write_bio_DSAPublicKey
  2164. PEND
  2165. PEND_VALUE
  2166. PERL_XS
  2167. PERM3264
  2168. PERM6464
  2169. PEVENTSINK
  2170. PFETCH
  2171. PFETCH_READY
  2172. PF_INET
  2173. PF_UNSPEC
  2174. PIEVENTSINKOBJ
  2175. PINC
  2176. PIPE_BUF
  2177. PKCS7_RECIP_INFO_dup
  2178. PKCS7_SIGNER_INFO
  2179. PKCS7_SIGNER_INFO_dup
  2180. PKCS7_is_detached
  2181. PKCS7_type_is_encrypted
  2182. PLAIN_IS_INL
  2183. PLAIN_NOT_INL
  2184. PLATFORM_GET_INC
  2185. PLATFORM_UNALIGNED_WORD_ACCESS
  2186. POP
  2187. POP_BLOCK
  2188. POP_CLASS
  2189. POP_CREF
  2190. POP_FRAME
  2191. POP_ITER
  2192. POP_LEVEL
  2193. POP_SCOPE
  2194. POP_TAG
  2195. POP_THREAD_TAG
  2196. POP_VARS
  2197. POSFIXABLE
  2198. POSIX2_DATE
  2199. POSIX_BRACKET_CHECK_LIMIT_LENGTH
  2200. POSIX_BRACKET_NAME_MAX_LEN
  2201. POSIX_SEMANTICS
  2202. POST_DECL_CDECL
  2203. POST_DECL_STDCALL
  2204. PPEEK
  2205. PPEEK_IS
  2206. PREP_STDIO_NAME
  2207. PRE_DECL_CDECL
  2208. PRE_DECL_STDCALL
  2209. PRINT
  2210. PRINTF_ARGS
  2211. PROCESS_H
  2212. PROC_SAFE_SAVED
  2213. PROC_TMASK
  2214. PROC_TMAX
  2215. PROC_TSHIFT
  2216. PROTO
  2217. PROT_FUNC
  2218. PROT_LAMBDA
  2219. PROT_LOOP
  2220. PROT_NONE
  2221. PROT_THREAD
  2222. PROT_TOP
  2223. PROT_YIELD
  2224. PTON_MAX
  2225. PTR2NUM
  2226. PTR_NOT_EQUAL
  2227. PUNFETCH
  2228. PUSH
  2229. PUSH_BLOCK
  2230. PUSH_CLASS
  2231. PUSH_CREF
  2232. PUSH_FRAME
  2233. PUSH_ITER
  2234. PUSH_SCOPE
  2235. PUSH_TAG
  2236. PUSH_THREAD_TAG
  2237. PUSH_VARS
  2238. PUT_SHORT
  2239. PV_
  2240. P_
  2241. P_DETACH
  2242. P_NOWAIT
  2243. P_OVERLAY
  2244. P_WAIT
  2245. PointerType
  2246. PosixBracketEntryType
  2247. QUADINT
  2248. QUAD_SIZE
  2249. QUALIFIER_EXPAND_LIMIT_SIZE
  2250. QUOTECAT
  2251. QUOTECATS
  2252. QUOTELEN
  2253. Qfalse
  2254. Qnil
  2255. Qtrue
  2256. QualifierNode
  2257. Qundef
  2258. R
  2259. R0
  2260. R1
  2261. R2
  2262. R3
  2263. R4
  2264. RACC_VERSION
  2265. RANGE_NUM_MAX
  2266. RANY
  2267. RARRAY
  2268. RBASIC
  2269. RBIGNUM
  2270. RB_CVAR_SET_4ARGS
  2271. RCFUNC_DATA
  2272. RCLASS
  2273. RDATA
  2274. RDL_HANDLE
  2275. READABLE
  2276. READ_CHECK
  2277. READ_DATA_BUFFERED
  2278. READ_DATA_PENDING
  2279. READ_DATA_PENDING_COUNT
  2280. READ_DATA_PENDING_PTR
  2281. REALLOC_N
  2282. REALTIME_PRIORITY_CLASS
  2283. RECURSION_EXIST
  2284. RECURSION_INFINITE
  2285. REDUCE
  2286. REGENC_H
  2287. REGEX_CHAIN_HEAD
  2288. REGEX_H
  2289. REGEX_TRANSFER
  2290. REGINT_H
  2291. REGPARSE_H
  2292. REG_CASESTATE
  2293. RELOC_ADDRESS
  2294. RELOC_EXTERN_P
  2295. RELOC_MEMORY_SUB_P
  2296. RELOC_PCREL_P
  2297. RELOC_SYMBOL
  2298. RELOC_TARGET_SIZE
  2299. REPEAT_INFINITE
  2300. REPEAT_RANGE_ALLOC
  2301. RESIZE_CAPA
  2302. RESTORE_EXIT
  2303. RESTORE_FATAL
  2304. RESTORE_INTERRUPT
  2305. RESTORE_NORMAL
  2306. RESTORE_RAISE
  2307. RESTORE_SIGNAL
  2308. RESTORE_TRAP
  2309. RETSIGTYPE
  2310. RETURN
  2311. RETURN_ENUMERATOR
  2312. RETURN_IF
  2313. RETURN_IMPLICIT
  2314. RETURN_YAML_BLOCK
  2315. REVERSE32
  2316. REVERSE64
  2317. RE_H
  2318. RE_OPTION_ONCE
  2319. RFILE
  2320. RFLOAT
  2321. RHASH
  2322. RIPPER_VERSION
  2323. RLIM2NUM
  2324. RMATCH
  2325. RMD160OSSL_H_INCLUDED
  2326. RMD160_BLOCK_LENGTH
  2327. RMD160_CTX
  2328. RMD160_DIGEST_LENGTH
  2329. RMD160_DIGEST_STRING_LENGTH
  2330. RMD160_Data
  2331. RMD160_End
  2332. RMD160_Equal
  2333. RMD160_File
  2334. RMD160_Final
  2335. RMD160_Init
  2336. RMD160_Transform
  2337. RMD160_Update
  2338. RMODULE
  2339. RNODE
  2340. ROBJECT
  2341. ROL
  2342. ROOT_GID
  2343. ROOT_UID
  2344. ROTATE_LEFT
  2345. ROUND256
  2346. ROUND256_0_TO_15
  2347. ROUND512
  2348. ROUND512_0_TO_15
  2349. RPTR_DATA
  2350. RREGC_SIZE
  2351. RREGEXP
  2352. RSA_HAS_PRIVATE
  2353. RSA_PRIVATE
  2354. RSHIFT
  2355. RSTRING
  2356. RSTRUCT
  2357. RTEST
  2358. RTLD_GLOBAL
  2359. RTLD_LAZY
  2360. RTLD_NOW
  2361. RUBY
  2362. RUBYIO_H
  2363. RUBYSIG_H
  2364. RUBY_ARCHLIB
  2365. RUBY_CRITICAL
  2366. RUBY_DBM_RW_BIT
  2367. RUBY_DL_H
  2368. RUBY_DOMAIN
  2369. RUBY_EVENT_ALL
  2370. RUBY_EVENT_CALL
  2371. RUBY_EVENT_CLASS
  2372. RUBY_EVENT_C_CALL
  2373. RUBY_EVENT_C_RETURN
  2374. RUBY_EVENT_END
  2375. RUBY_EVENT_LINE
  2376. RUBY_EVENT_NONE
  2377. RUBY_EVENT_RAISE
  2378. RUBY_EVENT_RETURN
  2379. RUBY_EXPORT
  2380. RUBY_EXTERN
  2381. RUBY_GDBM_RW_BIT
  2382. RUBY_H
  2383. RUBY_INIT_STACK
  2384. RUBY_INTERN_H
  2385. RUBY_LIB
  2386. RUBY_MBCHAR_MAXSIZE
  2387. RUBY_METHOD_FUNC
  2388. RUBY_NKF_REVISION
  2389. RUBY_NKF_VERSION
  2390. RUBY_PLATFORM
  2391. RUBY_RELATIVE
  2392. RUBY_RELEASE_CODE
  2393. RUBY_RELEASE_DATE
  2394. RUBY_RELEASE_DAY
  2395. RUBY_RELEASE_MONTH
  2396. RUBY_RELEASE_YEAR
  2397. RUBY_SITE_ARCHLIB
  2398. RUBY_SITE_LIB
  2399. RUBY_SITE_LIB2
  2400. RUBY_VERSION
  2401. RUBY_VERSION_CODE
  2402. RUBY_VERSION_MAJOR
  2403. RUBY_VERSION_MINOR
  2404. RUBY_VERSION_TEENY
  2405. RUBY_WIN32_DIR_H
  2406. RUBY_WIN32_H
  2407. RUBY_ZLIB_VERSION
  2408. RVALUE
  2409. R_BITSIZE
  2410. R_CAST
  2411. R_LENGTH
  2412. R_MEMORY_SUB
  2413. R_OK
  2414. R_PCREL
  2415. R_RIGHTSHIFT
  2416. R_SYMBOL
  2417. ReadDataPending
  2418. Real
  2419. Regexp
  2420. RelAddrType
  2421. Renew
  2422. RepeatNumType
  2423. ResetSignal
  2424. S32
  2425. S64
  2426. SAFE_LEVEL_MAX
  2427. SALT
  2428. SARG
  2429. SAVE
  2430. SAVE_WIN32_EXCEPTION_LIST
  2431. SA_INTERRUPT
  2432. SA_LEN
  2433. SA_NOCLDSTOP
  2434. SA_NOMASK
  2435. SA_ONESHOT
  2436. SA_RESTART
  2437. SA_SHIRQ
  2438. SA_STACK
  2439. SCANENV_MEMNODES_SIZE
  2440. SCANENV_MEM_NODES
  2441. SCAN_DOCSEP
  2442. SCAN_DOUBLEQ
  2443. SCAN_FLOWMAP
  2444. SCAN_FLOWSEQ
  2445. SCAN_INDENTED
  2446. SCAN_INDIC_C
  2447. SCAN_INDIC_S
  2448. SCAN_MANYNL_E
  2449. SCAN_NEWLINE
  2450. SCAN_NONE
  2451. SCAN_NONL_E
  2452. SCAN_NONPRINT
  2453. SCAN_SINGLEQ
  2454. SCAN_WHITEEDGE
  2455. SCAN_WIDE
  2456. SCOPE_ALLOCA
  2457. SCOPE_DONT_RECYCLE
  2458. SCOPE_MALLOC
  2459. SCOPE_MASK
  2460. SCOPE_MODFUNC
  2461. SCOPE_NOSTACK
  2462. SCOPE_PRIVATE
  2463. SCOPE_PROTECTED
  2464. SCOPE_PUBLIC
  2465. SCOPE_SET
  2466. SCOPE_TEST
  2467. SCORE_CP932
  2468. SCORE_DEPEND
  2469. SCORE_ERROR
  2470. SCORE_INIT
  2471. SCORE_KANA
  2472. SCORE_L2
  2473. SCORE_NO_EXIST
  2474. SCORE_iMIME
  2475. SEEDUPS
  2476. SEEK_CUR
  2477. SEEK_END
  2478. SEEK_SET
  2479. SEND
  2480. SERIALIZE_2BYTE_INT
  2481. SERIALIZE_4BYTE_INT
  2482. SERIALIZE_8BYTE_INT
  2483. SERIALIZE_INT
  2484. SERIALIZE_SHORT
  2485. SERIALIZE_UINT
  2486. SET
  2487. SETUP_ARGS
  2488. SETUP_ARGS0
  2489. SET_ALL_MULTI_BYTE_RANGE
  2490. SET_CALL_RECURSION
  2491. SET_CURRENT_SOURCE
  2492. SET_EFFECT_STATUS
  2493. SET_EXCL
  2494. SET_SA_LEN
  2495. SET_SIN_LEN
  2496. SET_STACK_END
  2497. SHA1HANDSOFF
  2498. SHA1OSSL_H_INCLUDED
  2499. SHA1_BLOCK_LENGTH
  2500. SHA1_CTX
  2501. SHA1_DIGEST_LENGTH
  2502. SHA1_DIGEST_STRING_LENGTH
  2503. SHA1_Data
  2504. SHA1_End
  2505. SHA1_Equal
  2506. SHA1_File
  2507. SHA1_Final
  2508. SHA1_Init
  2509. SHA1_Transform
  2510. SHA1_Update
  2511. SHA256_BLOCK_LENGTH
  2512. SHA256_CTX
  2513. SHA256_DIGEST_LENGTH
  2514. SHA256_DIGEST_STRING_LENGTH
  2515. SHA256_Data
  2516. SHA256_End
  2517. SHA256_Equal
  2518. SHA256_File
  2519. SHA256_Final
  2520. SHA256_Init
  2521. SHA256_SHORT_BLOCK_LENGTH
  2522. SHA256_Transform
  2523. SHA256_Update
  2524. SHA2_USE_MEMSET_MEMCPY
  2525. SHA384_BLOCK_LENGTH
  2526. SHA384_CTX
  2527. SHA384_DIGEST_LENGTH
  2528. SHA384_DIGEST_STRING_LENGTH
  2529. SHA384_Data
  2530. SHA384_End
  2531. SHA384_Equal
  2532. SHA384_File
  2533. SHA384_Final
  2534. SHA384_Init
  2535. SHA384_SHORT_BLOCK_LENGTH
  2536. SHA384_Update
  2537. SHA512_BLOCK_LENGTH
  2538. SHA512_CTX
  2539. SHA512_DIGEST_LENGTH
  2540. SHA512_DIGEST_STRING_LENGTH
  2541. SHA512_Data
  2542. SHA512_End
  2543. SHA512_Equal
  2544. SHA512_File
  2545. SHA512_Final
  2546. SHA512_Init
  2547. SHA512_Last
  2548. SHA512_SHORT_BLOCK_LENGTH
  2549. SHA512_Transform
  2550. SHA512_Update
  2551. SHIFT
  2552. SHIFTJIS_CP932
  2553. SHIFT_JIS
  2554. SHORTDN
  2555. SHORTINT
  2556. SHORTLEN
  2557. SHORTMASK
  2558. SHUT_RD
  2559. SHUT_WR
  2560. SI
  2561. SIGABRT
  2562. SIGBREAK
  2563. SIGBUS
  2564. SIGCHLD
  2565. SIGFPE
  2566. SIGHUP
  2567. SIGILL
  2568. SIGINT
  2569. SIGKILL
  2570. SIGNAL_H
  2571. SIGN_EXTEND
  2572. SIGN_EXTEND_CHAR
  2573. SIGPIPE
  2574. SIGQUIT
  2575. SIGSEGV
  2576. SIGTERM
  2577. SIGTSTP
  2578. SIGUSR1
  2579. SIGUSR2
  2580. SIG_ACK
  2581. SIG_BLOCK
  2582. SIG_DFL
  2583. SIG_ERR
  2584. SIG_IGN
  2585. SIG_SETMASK
  2586. SIG_SGE
  2587. SIG_UNBLOCK
  2588. SINGLE_BYTE_SIZE
  2589. SIN_LEN
  2590. SIZE16
  2591. SIZE32
  2592. SIZEOF_BDIGITS
  2593. SIZEOF_DOUBLE
  2594. SIZEOF_FLOAT
  2595. SIZEOF_INT
  2596. SIZEOF_LONG
  2597. SIZEOF_LONG_LONG
  2598. SIZEOF_SHORT
  2599. SIZEOF_VOIDP
  2600. SIZE_ABSADDR
  2601. SIZE_BITSET
  2602. SIZE_CODE_POINT
  2603. SIZE_LENGTH
  2604. SIZE_MEMNUM
  2605. SIZE_OPCODE
  2606. SIZE_OPTION
  2607. SIZE_OP_ANYCHAR_STAR
  2608. SIZE_OP_ANYCHAR_STAR_PEEK_NEXT
  2609. SIZE_OP_CALL
  2610. SIZE_OP_FAIL
  2611. SIZE_OP_FAIL_LOOK_BEHIND_NOT
  2612. SIZE_OP_FAIL_POS
  2613. SIZE_OP_JUMP
  2614. SIZE_OP_LOOK_BEHIND
  2615. SIZE_OP_MEMORY_END
  2616. SIZE_OP_MEMORY_END_PUSH
  2617. SIZE_OP_MEMORY_END_PUSH_REC
  2618. SIZE_OP_MEMORY_END_REC
  2619. SIZE_OP_MEMORY_START
  2620. SIZE_OP_MEMORY_START_PUSH
  2621. SIZE_OP_NULL_CHECK_END
  2622. SIZE_OP_NULL_CHECK_START
  2623. SIZE_OP_POP
  2624. SIZE_OP_POP_POS
  2625. SIZE_OP_POP_STOP_BT
  2626. SIZE_OP_PUSH
  2627. SIZE_OP_PUSH_IF_PEEK_NEXT
  2628. SIZE_OP_PUSH_LOOK_BEHIND_NOT
  2629. SIZE_OP_PUSH_OR_JUMP_EXACT1
  2630. SIZE_OP_PUSH_POS
  2631. SIZE_OP_PUSH_POS_NOT
  2632. SIZE_OP_PUSH_STOP_BT
  2633. SIZE_OP_REPEAT_INC
  2634. SIZE_OP_REPEAT_INC_NG
  2635. SIZE_OP_RETURN
  2636. SIZE_OP_SET_OPTION
  2637. SIZE_OP_SET_OPTION_PUSH
  2638. SIZE_POINTER
  2639. SIZE_RELADDR
  2640. SIZE_REPEATNUM
  2641. SJ0162
  2642. SJ6394
  2643. SJIS_INPUT
  2644. SJIS_ISMB_FIRST
  2645. SJIS_ISMB_TRAIL
  2646. SMALLBUF
  2647. SMALL_CRITERIA
  2648. SMALL_CRITERIA_BIT
  2649. SO
  2650. SOCKPORT_H
  2651. SO_SYNCHRONOUS_NONALERT
  2652. SPACE
  2653. SPECIAL_CONST_P
  2654. SPECIAL_SINGLETON
  2655. SPLTMAX
  2656. SPTAB
  2657. SS3
  2658. SSO
  2659. SSP
  2660. STACK
  2661. STACK_AT
  2662. STACK_BASE_CHECK
  2663. STACK_DIR
  2664. STACK_DIRECTION
  2665. STACK_END
  2666. STACK_ENSURE
  2667. STACK_GET_MEM_RANGE
  2668. STACK_GET_MEM_START
  2669. STACK_GET_REPEAT
  2670. STACK_INC
  2671. STACK_INIT
  2672. STACK_INIT_LEN
  2673. STACK_LENGTH
  2674. STACK_LEVEL_MAX
  2675. STACK_NULL_CHECK
  2676. STACK_NULL_CHECK_MEMST
  2677. STACK_NULL_CHECK_MEMST_REC
  2678. STACK_NULL_CHECK_REC
  2679. STACK_OF
  2680. STACK_PAD_SIZE
  2681. STACK_POP
  2682. STACK_POP_LEVEL_ALL
  2683. STACK_POP_LEVEL_FREE
  2684. STACK_POP_LEVEL_MEM_START
  2685. STACK_POP_ONE
  2686. STACK_POP_TIL_LOOK_BEHIND_NOT
  2687. STACK_POP_TIL_POS_NOT
  2688. STACK_POS_END
  2689. STACK_PUSH
  2690. STACK_PUSH_ALT
  2691. STACK_PUSH_CALL_FRAME
  2692. STACK_PUSH_ENSURED
  2693. STACK_PUSH_LOOK_BEHIND_NOT
  2694. STACK_PUSH_MEM_END
  2695. STACK_PUSH_MEM_END_MARK
  2696. STACK_PUSH_MEM_START
  2697. STACK_PUSH_NULL_CHECK_END
  2698. STACK_PUSH_NULL_CHECK_START
  2699. STACK_PUSH_POS
  2700. STACK_PUSH_POS_NOT
  2701. STACK_PUSH_REPEAT
  2702. STACK_PUSH_REPEAT_INC
  2703. STACK_PUSH_RETURN
  2704. STACK_PUSH_STOP_BT
  2705. STACK_PUSH_TYPE
  2706. STACK_RETURN
  2707. STACK_SAVE
  2708. STACK_STOP_BT_END
  2709. STACK_UPPER
  2710. STARTF_FORCEOFFFEEDBACK
  2711. STARTF_FORCEONFEEDBACK
  2712. STARTF_RUNFULLSCREEN
  2713. STARTF_USECOUNTCHARS
  2714. STARTF_USEFILLATTRIBUTE
  2715. STARTF_USEPOSITION
  2716. STARTF_USESHOWWINDOW
  2717. STARTF_USESIZE
  2718. STARTF_USESTDHANDLES
  2719. STATIC
  2720. STATIC_FILE_LENGTH
  2721. STAT_OP_IN
  2722. STAT_OP_OUT
  2723. STDIO_READ_DATA_PENDING
  2724. STDMETHODIMP_
  2725. STD_ERROR_HANDLE
  2726. STD_GC_BUFSIZE
  2727. STD_INPUT_HANDLE
  2728. STD_OUTPUT_HANDLE
  2729. STHREAD_ONLY
  2730. STK_ALT
  2731. STK_CALL_FRAME
  2732. STK_LOOK_BEHIND_NOT
  2733. STK_MASK_POP_USED
  2734. STK_MEM_END
  2735. STK_MEM_END_MARK
  2736. STK_MEM_START
  2737. STK_NULL_CHECK_END
  2738. STK_NULL_CHECK_START
  2739. STK_POS
  2740. STK_POS_NOT
  2741. STK_REPEAT
  2742. STK_REPEAT_INC
  2743. STK_RETURN
  2744. STK_STOP_BT
  2745. STK_VOID
  2746. STORE
  2747. STR2CSTR
  2748. STRICT_MIME
  2749. STRING_CMP
  2750. STRING_CMP_IC
  2751. STRING_CMP_VALUE
  2752. STRING_CMP_VALUE_IC
  2753. STRSCAN_VERSION
  2754. STR_ASSOC
  2755. STR_BUF_MIN_SIZE
  2756. STR_FUNC_ESCAPE
  2757. STR_FUNC_EXPAND
  2758. STR_FUNC_INDENT
  2759. STR_FUNC_QWORDS
  2760. STR_FUNC_REGEXP
  2761. STR_FUNC_SYMBOL
  2762. STR_NOCAPA
  2763. STR_TMPLOCK
  2764. ST_DATA_T_DEFINED
  2765. ST_DEFAULT_INIT_TABLE_SIZE
  2766. ST_DEFAULT_MAX_DENSITY
  2767. ST_INCLUDED
  2768. ST_NUMCMP
  2769. ST_NUMHASH
  2770. SUCCESS
  2771. SUFFIX
  2772. SUNOS_EXT
  2773. SWAP_BBUF_NOT
  2774. SYCK_BUFFERSIZE
  2775. SYCK_H
  2776. SYCK_VERSION
  2777. SYCK_YAML_MAJOR
  2778. SYCK_YAML_MINOR
  2779. SYM2ID
  2780. SYMBOL_FLAG
  2781. SYMBOL_P
  2782. SYMID
  2783. SYN_GNU_REGEX_BV
  2784. SYN_GNU_REGEX_OP
  2785. SYN_POSIX_COMMON_OP
  2786. SYSV_EXT
  2787. SYS_STAT_H
  2788. SYS_TIMEB_H
  2789. SYS_TYPES_H
  2790. SYS_UTIME_H
  2791. SZ_INF
  2792. SZ_NINF
  2793. SZ_NaN
  2794. SZ_PINF
  2795. S_ALLOC
  2796. S_ALLOCA_N
  2797. S_ALLOC_N
  2798. S_FREE
  2799. S_IEXEC
  2800. S_IFCHR
  2801. S_IFDIR
  2802. S_IFIFO
  2803. S_IFMT
  2804. S_IFREG
  2805. S_INT
  2806. S_IREAD
  2807. S_IRGRP
  2808. S_IROTH
  2809. S_IRUGO
  2810. S_IRUSR
  2811. S_IRWXG
  2812. S_IRWXO
  2813. S_IRWXU
  2814. S_ISBLK
  2815. S_ISCHR
  2816. S_ISDIR
  2817. S_ISFIFO
  2818. S_ISLNK
  2819. S_ISREG
  2820. S_ISSOCK
  2821. S_IWGRP
  2822. S_IWOTH
  2823. S_IWRITE
  2824. S_IWUGO
  2825. S_IWUSR
  2826. S_IXGRP
  2827. S_IXOTH
  2828. S_IXUGO
  2829. S_IXUSR
  2830. S_LEN
  2831. S_LONG
  2832. S_MEMCMP
  2833. S_MEMCPY
  2834. S_MEMMOVE
  2835. S_MEMZERO
  2836. S_PBEG
  2837. S_PEND
  2838. S_REALLOC_N
  2839. S_RESTLEN
  2840. S_inf
  2841. S_nan
  2842. S_one
  2843. S_zero
  2844. SafeGetBN
  2845. SafeGetCipher
  2846. SafeGetConfig
  2847. SafeGetDigest
  2848. SafeGetEngine
  2849. SafeGetHMAC
  2850. SafeGetOCSPBasicRes
  2851. SafeGetOCSPCertId
  2852. SafeGetOCSPReq
  2853. SafeGetOCSPRes
  2854. SafeGetPKCS12
  2855. SafeGetPKCS7
  2856. SafeGetPKCS7ri
  2857. SafeGetPKCS7si
  2858. SafeGetPKey
  2859. SafeGetX509
  2860. SafeGetX509Attr
  2861. SafeGetX509CRL
  2862. SafeGetX509Ext
  2863. SafeGetX509Name
  2864. SafeGetX509Req
  2865. SafeGetX509Rev
  2866. SafeGetX509StCtx
  2867. SafeGetX509Store
  2868. SafeStringValue
  2869. ScanEnv
  2870. SetBit
  2871. SetEnvironmentVariable
  2872. SetFileAttributes
  2873. SetFileAttributesA
  2874. SetSignal
  2875. SetStdHandle
  2876. Sigma0_256
  2877. Sigma0_512
  2878. Sigma1_256
  2879. Sigma1_512
  2880. Sleep
  2881. StackIndex
  2882. StackType
  2883. StartSockets
  2884. StrCmp
  2885. StrNode
  2886. StringIO
  2887. StringValue
  2888. StringValueCStr
  2889. StringValuePtr
  2890. SyckEmitter
  2891. SyckEmitterNode
  2892. SyckIoFile
  2893. SyckIoStr
  2894. SyckLevel
  2895. SyckNode
  2896. SyckParser
  2897. T1
  2898. T10
  2899. T11
  2900. T12
  2901. T13
  2902. T14
  2903. T15
  2904. T16
  2905. T17
  2906. T18
  2907. T19
  2908. T2
  2909. T20
  2910. T21
  2911. T22
  2912. T23
  2913. T24
  2914. T25
  2915. T26
  2916. T27
  2917. T28
  2918. T29
  2919. T3
  2920. T30
  2921. T31
  2922. T32
  2923. T33
  2924. T34
  2925. T35
  2926. T36
  2927. T37
  2928. T38
  2929. T39
  2930. T4
  2931. T40
  2932. T41
  2933. T42
  2934. T43
  2935. T44
  2936. T45
  2937. T46
  2938. T47
  2939. T48
  2940. T49
  2941. T5
  2942. T50
  2943. T51
  2944. T52
  2945. T53
  2946. T54
  2947. T55
  2948. T56
  2949. T57
  2950. T58
  2951. T59
  2952. T6
  2953. T60
  2954. T61
  2955. T62
  2956. T63
  2957. T64
  2958. T7
  2959. T8
  2960. T9
  2961. TAB
  2962. TAG_BREAK
  2963. TAG_CONTCALL
  2964. TAG_DST
  2965. TAG_FATAL
  2966. TAG_MASK
  2967. TAG_NEXT
  2968. TAG_RAISE
  2969. TAG_REDO
  2970. TAG_RETRY
  2971. TAG_RETURN
  2972. TAG_THREAD
  2973. TAG_THROW
  2974. TCLTKLIB_RELEASE_DATE
  2975. TCLTK_STUBS_OK
  2976. TCL_ALPHA_RELEASE
  2977. TCL_BETA_RELEASE
  2978. TCL_FINAL_RELEASE
  2979. TCL_INDEX
  2980. TCL_NAME
  2981. TCL_NAMESPACE_DEBUG
  2982. THISFROM
  2983. THREAD_ALLOC
  2984. THREAD_ATOMIC_END
  2985. THREAD_ATOMIC_START
  2986. THREAD_COPY_STATUS
  2987. THREAD_FLAGS_MASK
  2988. THREAD_PASS
  2989. THREAD_PASS_LIMIT_COUNT
  2990. THREAD_RAISED
  2991. THREAD_SAVE_CONTEXT
  2992. THREAD_TERMINATING
  2993. THREAD_TICK
  2994. THRESHOLD_RANGE_NUM_FOR_SHARE_CCLASS
  2995. TIMEDIFF
  2996. TKUTIL_RELEASE_DATE
  2997. TKWAIT_MODE_DESTROY
  2998. TKWAIT_MODE_VISIBILITY
  2999. TK_INDEX
  3000. TK_NAME
  3001. TMP_ALLOC
  3002. TMP_PROTECT
  3003. TOLOWER
  3004. TOTAL_KEYWORDS
  3005. TO_SIX_BIT
  3006. TO_SOCKET
  3007. TRACE0
  3008. TRACE1
  3009. TRACE2
  3010. TRACE3
  3011. TRACE_HEAD
  3012. TRACE_MAX
  3013. TRACE_TAIL
  3014. TRAP_BEG
  3015. TRAP_END
  3016. TRUE
  3017. TWIST
  3018. TYPE
  3019. TYPE_ARRAY
  3020. TYPE_BIGNUM
  3021. TYPE_CLASS
  3022. TYPE_DATA
  3023. TYPE_EXTENDED
  3024. TYPE_FALSE
  3025. TYPE_FIXNUM
  3026. TYPE_FLOAT
  3027. TYPE_HASH
  3028. TYPE_HASH_DEF
  3029. TYPE_IVAR
  3030. TYPE_LINK
  3031. TYPE_MODULE
  3032. TYPE_MODULE_OLD
  3033. TYPE_NIL
  3034. TYPE_OBJECT
  3035. TYPE_REGEXP
  3036. TYPE_STRING
  3037. TYPE_STRUCT
  3038. TYPE_SYMBOL
  3039. TYPE_SYMLINK
  3040. TYPE_TRUE
  3041. TYPE_UCLASS
  3042. TYPE_USERDEF
  3043. TYPE_USRMARSHAL
  3044. T_ARRAY
  3045. T_BIGNUM
  3046. T_BLOCK
  3047. T_CLASS
  3048. T_DATA
  3049. T_FALSE
  3050. T_FILE
  3051. T_FIXNUM
  3052. T_FLOAT
  3053. T_HASH
  3054. T_ICLASS
  3055. T_MASK
  3056. T_MATCH
  3057. T_MODULE
  3058. T_NIL
  3059. T_NODE
  3060. T_NONE
  3061. T_OBJECT
  3062. T_REGEXP
  3063. T_SCOPE
  3064. T_STRING
  3065. T_STRUCT
  3066. T_SYMBOL
  3067. T_TRUE
  3068. T_UNDEF
  3069. T_VARMAP
  3070. TclGetFrame
  3071. Tcl_CallFrame
  3072. Tcl_DecrRefCount
  3073. Tcl_Eval
  3074. Tcl_GetCurrentNamespace
  3075. Tcl_GetStringResult
  3076. Tcl_GetVar2Ex
  3077. Tcl_GlobalEval
  3078. Tcl_IncrRefCount
  3079. Tcl_Namespace
  3080. Tcl_PopCallFrame
  3081. Tcl_PushCallFrame
  3082. Tcl_SetVar2Ex
  3083. TkStringValue
  3084. ToValue
  3085. TrapEnsureArg
  3086. UARG
  3087. UChar
  3088. UINT2NUM
  3089. ULL
  3090. ULL2NUM
  3091. ULONG
  3092. ULONG2NUM
  3093. UMASK
  3094. UNESCAPE
  3095. UNICODE_NORMALIZATION
  3096. USE_APPLICATION_TO_LOWER_CASE_TABLE
  3097. USE_CAPTURE_HISTORY
  3098. USE_COLOR
  3099. USE_CONTEXT
  3100. USE_DLN_A_OUT
  3101. USE_DLN_DLOPEN
  3102. USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK
  3103. USE_INTERRUPT_WINSOCK
  3104. USE_INVALID_CODE_SCHEME
  3105. USE_MOUSE
  3106. USE_MULTI_THREAD_SYSTEM
  3107. USE_NAMED_GROUP
  3108. USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE
  3109. USE_OP_PUSH_OR_JUMP_EXACT
  3110. USE_POSIX_REGION_OPTION
  3111. USE_QUALIFIER_PEEK_NEXT
  3112. USE_RECYCLE_NODE
  3113. USE_SETVBUF
  3114. USE_SHARED_CCLASS_TABLE
  3115. USE_ST_HASH_TABLE
  3116. USE_SUBEXP_CALL
  3117. USE_TIMEOFDAY
  3118. USE_UNICODE_FULL_RANGE_CTYPE
  3119. USE_VARIABLE_META_CHARS
  3120. USE_WARNING_REDUNDANT_NESTED_REPEAT_OPERATOR
  3121. USE_WORD_BEGIN_END
  3122. USHORT
  3123. USTR
  3124. UTF16BE_INPUT
  3125. UTF16LE_INPUT
  3126. UTF8
  3127. UTF8_INPUT
  3128. UTF8_INPUT_ENABLE
  3129. UTF8_OUTPUT_ENABLE
  3130. UTF8_TRAIL0
  3131. UTF8_TRAILS
  3132. UTIL_H
  3133. U_INT
  3134. U_LONG
  3135. UnlockFile
  3136. UnlockFileEx
  3137. UnsetAddr
  3138. UnsetAddrList
  3139. VALID_CODE_LIMIT
  3140. VALUE
  3141. VALUE2ICONV
  3142. VARARGS_H
  3143. VISI
  3144. VISI_CHECK
  3145. VMSRUBY_H_INCLUDED
  3146. VMS_EXT
  3147. VP_EXCEPTION_ALL
  3148. VP_EXCEPTION_INFINITY
  3149. VP_EXCEPTION_MEMORY
  3150. VP_EXCEPTION_NaN
  3151. VP_EXCEPTION_OP
  3152. VP_EXCEPTION_OVERFLOW
  3153. VP_EXCEPTION_UNDERFLOW
  3154. VP_EXCEPTION_ZERODIVIDE
  3155. VP_EXPORT
  3156. VP_ROUND_CEIL
  3157. VP_ROUND_DOWN
  3158. VP_ROUND_FLOOR
  3159. VP_ROUND_HALF_DOWN
  3160. VP_ROUND_HALF_EVEN
  3161. VP_ROUND_HALF_UP
  3162. VP_ROUND_MODE
  3163. VP_ROUND_UP
  3164. VP_SIGN_NEGATIVE_FINITE
  3165. VP_SIGN_NEGATIVE_INFINITE
  3166. VP_SIGN_NEGATIVE_ZERO
  3167. VP_SIGN_NaN
  3168. VP_SIGN_POSITIVE_FINITE
  3169. VP_SIGN_POSITIVE_INFINITE
  3170. VP_SIGN_POSITIVE_ZERO
  3171. VPrint
  3172. VTOHD
  3173. VTOHF
  3174. V_BOOL
  3175. V_UNION
  3176. V_UNION1
  3177. V_VT
  3178. VpActiveRound
  3179. VpAddAbs
  3180. VpAddSub
  3181. VpAlloc
  3182. VpAsgn
  3183. VpBaseFig
  3184. VpBaseVal
  3185. VpChangeSign
  3186. VpComp
  3187. VpCreateRbObject
  3188. VpCtoV
  3189. VpDblFig
  3190. VpDivd
  3191. VpDtoV
  3192. VpException
  3193. VpExponent
  3194. VpExponent10
  3195. VpFormatSt
  3196. VpFrac
  3197. VpFree
  3198. VpGetDoubleNaN
  3199. VpGetDoubleNegInf
  3200. VpGetDoubleNegZero
  3201. VpGetDoublePosInf
  3202. VpGetException
  3203. VpGetFlag
  3204. VpGetPrecLimit
  3205. VpGetRoundMode
  3206. VpGetSign
  3207. VpHasVal
  3208. VpInit
  3209. VpInternalRound
  3210. VpIsDef
  3211. VpIsDefOP
  3212. VpIsInf
  3213. VpIsNaN
  3214. VpIsNegDoubleZero
  3215. VpIsNegInf
  3216. VpIsNegZero
  3217. VpIsOne
  3218. VpIsPosInf
  3219. VpIsPosZero
  3220. VpIsRoundMode
  3221. VpIsZero
  3222. VpItoV
  3223. VpLeftRound
  3224. VpLimitRound
  3225. VpMaxPrec
  3226. VpMemAlloc
  3227. VpMidRound
  3228. VpMult
  3229. VpNewRbClass
  3230. VpNmlz
  3231. VpNumOfChars
  3232. VpOne
  3233. VpPower
  3234. VpPrec
  3235. VpRdup
  3236. VpSetException
  3237. VpSetInf
  3238. VpSetNaN
  3239. VpSetNegInf
  3240. VpSetNegZero
  3241. VpSetOne
  3242. VpSetPTR
  3243. VpSetPosInf
  3244. VpSetPosZero
  3245. VpSetPrecLimit
  3246. VpSetRoundMode
  3247. VpSetSign
  3248. VpSetZero
  3249. VpSqrt
  3250. VpSubAbs
  3251. VpSzMantissa
  3252. VpToFString
  3253. VpToSpecialString
  3254. VpToString
  3255. VpVarCheck
  3256. VpVtoD
  3257. VwaitVarProc
  3258. WAIT_FD
  3259. WAIT_IN_PROGRESS
  3260. WAIT_JOIN
  3261. WAIT_PID
  3262. WAIT_SELECT
  3263. WAIT_TIME
  3264. WARN_BUFSIZE
  3265. WATCHDOG_INTERVAL
  3266. WC2VSTR
  3267. WEXITSTATUS
  3268. WIFEXITED
  3269. WIFSIGNALED
  3270. WIFSTOPPED
  3271. WIN32OLE_VERSION
  3272. WIN32_DIR_H_
  3273. WIN32_FIND_DATA
  3274. WIN32_LEAN_AND_MEAN
  3275. WIN95
  3276. WISH_TRUE
  3277. WNOHANG
  3278. WORDS_BIGENDIAN
  3279. WORD_ALIGNMENT_SIZE
  3280. WRITABLE
  3281. WSTOPSIG
  3282. WTERMSIG
  3283. WUNTRACED
  3284. W_OK
  3285. WaitForMultipleEvents
  3286. WaitForMultipleObjectsEx
  3287. WaitVariableProc
  3288. WaitVisibilityProc
  3289. WaitWindowProc
  3290. Win32API
  3291. Win32API_Call
  3292. Win32API_FreeLibrary
  3293. Win32API_initialize
  3294. Win32OLEIDispatch
  3295. WinMain
  3296. WrapBN
  3297. WrapConfig
  3298. WrapEngine
  3299. WrapOCSPBasicRes
  3300. WrapOCSPCertId
  3301. WrapOCSPReq
  3302. WrapOCSPRes
  3303. WrapPKCS12
  3304. WrapPKCS7
  3305. WrapPKCS7ri
  3306. WrapPKCS7si
  3307. WrapPKey
  3308. WrapSPKI
  3309. WrapX509
  3310. WrapX509Attr
  3311. WrapX509CRL
  3312. WrapX509Ext
  3313. WrapX509Name
  3314. WrapX509Req
  3315. WrapX509Rev
  3316. WrapX509StCtx
  3317. WrapX509Store
  3318. X0201
  3319. X0208
  3320. X0212
  3321. X0212_ENABLE
  3322. X509_CRL_add0_revoked
  3323. X509_CRL_set_issuer_name
  3324. X509_CRL_set_version
  3325. X509_CRL_sort
  3326. X509_NAME
  3327. X509_REVOKED_dup
  3328. X509_STORE_get_ex_data
  3329. X509_STORE_set_ex_data
  3330. XDIGITVAL
  3331. XFD_ISSET
  3332. X_OK
  3333. YAMLBYTE_ALIAS
  3334. YAMLBYTE_ALLOC
  3335. YAMLBYTE_ANCHOR
  3336. YAMLBYTE_BLOCK
  3337. YAMLBYTE_COMMENT
  3338. YAMLBYTE_CONTINUE
  3339. YAMLBYTE_DIRECTIVE
  3340. YAMLBYTE_DOCUMENT
  3341. YAMLBYTE_DOUBLE_QUOTED
  3342. YAMLBYTE_END_BRANCH
  3343. YAMLBYTE_E_MEMORY
  3344. YAMLBYTE_E_OTHER
  3345. YAMLBYTE_E_PARSE
  3346. YAMLBYTE_E_READ
  3347. YAMLBYTE_E_WRITE
  3348. YAMLBYTE_FINISH
  3349. YAMLBYTE_FLOW
  3350. YAMLBYTE_H
  3351. YAMLBYTE_INDENT
  3352. YAMLBYTE_INLINE_MAPPING
  3353. YAMLBYTE_INLINE_SEQUENCE
  3354. YAMLBYTE_LINE_NUMBER
  3355. YAMLBYTE_LITERAL
  3356. YAMLBYTE_MAPPING
  3357. YAMLBYTE_NEWLINE
  3358. YAMLBYTE_NOTICE
  3359. YAMLBYTE_NULLCHAR
  3360. YAMLBYTE_OK
  3361. YAMLBYTE_PAUSE
  3362. YAMLBYTE_PLAIN
  3363. YAMLBYTE_PULL2PUSH
  3364. YAMLBYTE_SCALAR
  3365. YAMLBYTE_SEQUENCE
  3366. YAMLBYTE_SINGLE_QUOTED
  3367. YAMLBYTE_SPAN
  3368. YAMLBYTE_STYLE
  3369. YAMLBYTE_TRANSFER
  3370. YAMLBYTE_UTF8
  3371. YAMLBYTE_WHOLE_SCALAR
  3372. YAML_ALIAS
  3373. YAML_ANCHOR
  3374. YAML_BLOCK
  3375. YAML_DOCSEP
  3376. YAML_DOMAIN
  3377. YAML_IEND
  3378. YAML_INDENT
  3379. YAML_IOPEN
  3380. YAML_ITRANSFER
  3381. YAML_PLAIN
  3382. YAML_TAGURI
  3383. YAML_TRANSFER
  3384. YAML_WORD
  3385. YES
  3386. YIELD_FUNC_AVALUE
  3387. YIELD_FUNC_SVALUE
  3388. YIELD_LAMBDA_CALL
  3389. YIELD_PROC_CALL
  3390. YIELD_PUBLIC_DEF
  3391. YYABORT
  3392. YYACCEPT
  3393. YYBACKUP
  3394. YYBISON
  3395. YYCALLOC
  3396. YYCOPY
  3397. YYCTYPE
  3398. YYCURSOR
  3399. YYDEBUG
  3400. YYDPRINTF
  3401. YYDSYMPRINT
  3402. YYDSYMPRINTF
  3403. YYEMPTY
  3404. YYEOF
  3405. YYERRCODE
  3406. YYERROR
  3407. YYERROR_VERBOSE
  3408. YYFAIL
  3409. YYFILL
  3410. YYFINAL
  3411. YYFPRINTF
  3412. YYFREE
  3413. YYINITDEPTH
  3414. YYLAST
  3415. YYLEX
  3416. YYLEX_PARAM
  3417. YYLIMIT
  3418. YYLINE
  3419. YYLINECTPTR
  3420. YYLINEPTR
  3421. YYLLOC_DEFAULT
  3422. YYLSP_NEEDED
  3423. YYMALLOC
  3424. YYMARKER
  3425. YYMAXDEPTH
  3426. YYMAXUTOK
  3427. YYNNTS
  3428. YYNRULES
  3429. YYNSTATES
  3430. YYNTOKENS
  3431. YYPACT_NINF
  3432. YYPARSE_PARAM
  3433. YYPOPSTACK
  3434. YYPOS
  3435. YYPURE
  3436. YYREALLOC
  3437. YYRECOVERING
  3438. YYSIZE_T
  3439. YYSKELETON_NAME
  3440. YYSTACK_ALLOC
  3441. YYSTACK_BYTES
  3442. YYSTACK_FREE
  3443. YYSTACK_GAP_MAXIMUM
  3444. YYSTACK_RELOCATE
  3445. YYSTACK_USE_ALLOCA
  3446. YYSTYPE
  3447. YYSTYPE_IS_DECLARED
  3448. YYSTYPE_IS_TRIVIAL
  3449. YYTABLE_NINF
  3450. YYTERROR
  3451. YYTOKEN
  3452. YYTOKENTYPE
  3453. YYTOKTMP
  3454. YYTRANSLATE
  3455. YYUNDEFTOK
  3456. YY_REDUCE_PRINT
  3457. YY_STACK_PRINT
  3458. ZERO
  3459. ZEROPAD
  3460. ZSTREAM_AVAIL_OUT_STEP_MAX
  3461. ZSTREAM_AVAIL_OUT_STEP_MIN
  3462. ZSTREAM_FLAG_CLOSED
  3463. ZSTREAM_FLAG_FINALIZE
  3464. ZSTREAM_FLAG_FINISHED
  3465. ZSTREAM_FLAG_IN_STREAM
  3466. ZSTREAM_FLAG_READY
  3467. ZSTREAM_FLAG_UNUSED
  3468. ZSTREAM_INITIAL_BUFSIZE
  3469. ZSTREAM_IS_CLOSED
  3470. ZSTREAM_IS_FINALIZE
  3471. ZSTREAM_IS_FINISHED
  3472. ZSTREAM_IS_READY
  3473. ZSTREAM_READY
  3474. Zero
  3475. ZeroMemory
  3476. _
  3477. _ASCII
  3478. _ASSERT_H_
  3479. _AUTO
  3480. _BASE_DOW
  3481. _BASE_YEAR
  3482. _BINARY
  3483. _BSD_VA_LIST_
  3484. _CADDR_T_DEFINED_
  3485. _CONFIG_H_
  3486. _CRTIMP
  3487. _DAY_SEC
  3488. _DEC_SEC
  3489. _DIAGASSERT
  3490. _EUC
  3491. _EXT_CE_
  3492. _FILE_H_
  3493. _FINDDATA_T_DEFINED
  3494. _FOUR_YEAR_SEC
  3495. _FSIZE_T_DEFINED
  3496. _HAVE_LLP64_
  3497. _HAVE_SANE_QUAD_
  3498. _IEEE
  3499. _INTPTR_T_DEFINED
  3500. _INTSIZEOF
  3501. _IO_WINCE_H_
  3502. _JIS
  3503. _LEAP_YEAR_ADJUST
  3504. _MAX_YEAR
  3505. _MODE_T_DEFINED_
  3506. _NOCONV
  3507. _OSSL_ASN1_H_
  3508. _OSSL_BIO_H_
  3509. _OSSL_BN_H_
  3510. _OSSL_CIPHER_H_
  3511. _OSSL_CONFIG_H_
  3512. _OSSL_DIGEST_H_
  3513. _OSSL_HMAC_H_
  3514. _OSSL_H_
  3515. _OSSL_NS_SPKI_H_
  3516. _OSSL_OCSP_H_
  3517. _OSSL_OPENSSL_MISSING_H_
  3518. _OSSL_PKCS12_H_
  3519. _OSSL_PKCS7_H_
  3520. _OSSL_PKEY_H_
  3521. _OSSL_RAND_H_
  3522. _OSSL_SSL_H_
  3523. _OSSL_VERSION_H_
  3524. _OSSL_X509_H_
  3525. _OSS_RUBY_MISSING_H_
  3526. _OTHER
  3527. _O_ACCMODE
  3528. _O_APPEND
  3529. _O_BINARY
  3530. _O_CREAT
  3531. _O_EXCL
  3532. _O_NOINHERIT
  3533. _O_NONBLOCK
  3534. _O_RDONLY
  3535. _O_RDWR
  3536. _O_TEXT
  3537. _O_TRUNC
  3538. _O_WRONLY
  3539. _PASSWORD_EFMT1
  3540. _POSIX_FD_SETSIZE
  3541. _PTRDIFF_T_DEFINED
  3542. _P_DETACH
  3543. _P_NOWAIT
  3544. _P_OVERLAY
  3545. _P_WAIT
  3546. _RMD160_H_
  3547. _SDBM_H_
  3548. _SIZE_T_DEFINED_
  3549. _SJIS
  3550. _SS_ALIGNSIZE
  3551. _SS_MAXSIZE
  3552. _SS_PAD1SIZE
  3553. _SS_PAD2SIZE
  3554. _STAT_DEFINED
  3555. _STDDEF_H_
  3556. _SYS_SHA1_H_
  3557. _S_IEXEC
  3558. _S_IFCHR
  3559. _S_IFDIR
  3560. _S_IFIFO
  3561. _S_IFMT
  3562. _S_IFREG
  3563. _S_IREAD
  3564. _S_IWRITE
  3565. _TIME_T_DEFINED
  3566. _TIME_WINCE_H
  3567. _TM_DEFINED
  3568. _T_INTEGER
  3569. _T_NUMBER
  3570. _T_POINTER
  3571. _T_VOID
  3572. _UNKNOWN
  3573. _UTF16
  3574. _UTF32
  3575. _UTF8
  3576. _VA_LIST_DEFINED
  3577. _WIN32
  3578. _WINCON_H_
  3579. _YEAR_SEC
  3580. __
  3581. __BEGIN_DECLS
  3582. __DOS_DOSCALL__
  3583. __DOS_INLINE__
  3584. __END_DECLS
  3585. __FAST_SETJMP
  3586. __IOCS_INLINE__
  3587. __MacOS_X__
  3588. __SAPP
  3589. __SEOF
  3590. __SERR
  3591. __SHA2_H__
  3592. __SLBF
  3593. __SMBF
  3594. __SMOD
  3595. __SNBF
  3596. __SNPT
  3597. __SOFF
  3598. __SOPT
  3599. __SRD
  3600. __SRW
  3601. __SSTR
  3602. __SWR
  3603. __WIN16__
  3604. __WIN32__
  3605. ____BIG_DECIMAL__H____
  3606. __crt0_glob_function
  3607. __sFILE
  3608. __sbuf
  3609. __sclearerr
  3610. __sfeof
  3611. __sferror
  3612. __sfileno
  3613. _access
  3614. _begx
  3615. _begy
  3616. _chdir
  3617. _chmod
  3618. _chsize
  3619. _close
  3620. _cmpd
  3621. _cwait
  3622. _dtos18
  3623. _execl
  3624. _fgetc
  3625. _filbuf
  3626. _findclose
  3627. _findfirst
  3628. _findnext
  3629. _flsbuf
  3630. _fputc
  3631. _fsize_t
  3632. _fullpath
  3633. _get_osfhandle
  3634. _getpid
  3635. _isatty
  3636. _lseek
  3637. _macinit
  3638. _maxx
  3639. _maxy
  3640. _mkdir
  3641. _nativethread_consistency_check
  3642. _open
  3643. _open_osfhandle
  3644. _osfhnd
  3645. _osfile
  3646. _pioinfo
  3647. _pipe
  3648. _pipech
  3649. _read
  3650. _rename
  3651. _rmdir
  3652. _round
  3653. _set_osfhnd
  3654. _set_osflags
  3655. _spawnle
  3656. _spawnvpe
  3657. _stat
  3658. _thread_call_proc
  3659. _thread_call_proc_arg_mark
  3660. _thread_call_proc_core
  3661. _thread_call_proc_ensure
  3662. _thread_call_proc_value
  3663. _timer_for_tcl
  3664. _umask
  3665. _unlink
  3666. _utimbuf
  3667. _vmsruby_init
  3668. _vmsruby_set_switch
  3669. _write
  3670. abort
  3671. accept
  3672. access
  3673. acosh
  3674. add_abs_addr
  3675. add_bitset
  3676. add_bytes
  3677. add_char_amb_opt_map_info
  3678. add_char_opt_map_info
  3679. add_code_range
  3680. add_code_range_to_buf
  3681. add_compile_string
  3682. add_compile_string_length
  3683. add_ctype_to_cc
  3684. add_ctype_to_cc_by_range
  3685. add_event_call_back
  3686. add_final
  3687. add_heap
  3688. add_len_mml
  3689. add_length
  3690. add_mem_num
  3691. add_mml
  3692. add_modules
  3693. add_multi_byte_cclass
  3694. add_opcode
  3695. add_opcode_option
  3696. add_opcode_rel_addr
  3697. add_opt_anc_info
  3698. add_option
  3699. add_pointer
  3700. add_rel_addr
  3701. adddecl
  3702. addrinfo
  3703. adjust_registers_to_matched
  3704. after_exec
  3705. aix_loaderror
  3706. algo_t
  3707. all_i
  3708. all_iter_i
  3709. alloc
  3710. alloc_invoke_arguments
  3711. alloca
  3712. alt_merge_mml
  3713. alt_merge_node_opt_info
  3714. alt_merge_opt_anc_info
  3715. alt_merge_opt_exact_info
  3716. alt_merge_opt_map_info
  3717. always_gc
  3718. and_cclass
  3719. and_code_range1
  3720. and_code_range_buf
  3721. anode
  3722. any_i
  3723. any_iter_i
  3724. appendline
  3725. apply2files
  3726. apply_seq_in_map
  3727. arg_add
  3728. arg_add_assocs
  3729. arg_add_block
  3730. arg_add_optblock
  3731. arg_add_star
  3732. arg_ambiguous
  3733. arg_blk_pass
  3734. arg_concat
  3735. arg_defined
  3736. arg_dup_check
  3737. arg_new
  3738. arg_prepend
  3739. argf_binmode
  3740. argf_close
  3741. argf_close_m
  3742. argf_closed
  3743. argf_each_byte
  3744. argf_each_line
  3745. argf_eof
  3746. argf_file
  3747. argf_filename
  3748. argf_fileno
  3749. argf_forward
  3750. argf_getc
  3751. argf_getline
  3752. argf_lineno
  3753. argf_read
  3754. argf_readchar
  3755. argf_readpartial
  3756. argf_readpartial_rescue
  3757. argf_rewind
  3758. argf_seek_m
  3759. argf_set_lineno
  3760. argf_set_pos
  3761. argf_skip
  3762. argf_tell
  3763. argf_to_io
  3764. argf_to_s
  3765. args2mrhs
  3766. ary2list
  3767. ary2list2
  3768. ary2ptr_dispparams
  3769. ary_alloc
  3770. ary_make_hash
  3771. ary_make_shared
  3772. ary_new
  3773. ary_shared_array
  3774. ary_shared_first
  3775. ary_shared_last
  3776. ary_sort_check
  3777. aryset
  3778. aryset_gen
  3779. ascii_is_code_ctype
  3780. asctime
  3781. asinh
  3782. asn1integer_to_num
  3783. asn1str_to_str
  3784. asn1time_to_time
  3785. assert
  3786. assert_array
  3787. assert_hash
  3788. assert_integer
  3789. assign
  3790. assign_in_cond
  3791. assignable
  3792. assignable_gen
  3793. assoc2kv
  3794. assoc2kv_enc
  3795. atanh
  3796. attrset
  3797. attrset_gen
  3798. autoload_delete
  3799. autoload_file
  3800. avalue_splat
  3801. avalue_to_svalue
  3802. backtrace
  3803. backward_search_range
  3804. bad
  3805. bare_assoc
  3806. base64_conv
  3807. base64decode
  3808. bbuf_clone
  3809. bbuf_free
  3810. be_chown
  3811. be_fchown
  3812. before_exec
  3813. big2ull
  3814. big2ulong
  3815. bigadd
  3816. bigdivmod
  3817. bigdivrem
  3818. bignew
  3819. bignew_1
  3820. bignorm
  3821. bigsub
  3822. bind
  3823. bind_eval
  3824. bitset_and
  3825. bitset_copy
  3826. bitset_invert
  3827. bitset_invert_to
  3828. bitset_is_empty
  3829. bitset_on_num
  3830. bitset_or
  3831. bitset_set_all
  3832. bitset_set_range
  3833. blk
  3834. blk0
  3835. blk_copy_prev
  3836. blk_dup
  3837. blk_free
  3838. blk_mark
  3839. block_append
  3840. block_dup_check
  3841. block_orphan
  3842. block_pass
  3843. blockvar_add_block
  3844. blockvar_add_star
  3845. blockvar_new
  3846. bm_init_skip
  3847. bm_mark
  3848. bm_search
  3849. bm_search_backward
  3850. bm_search_notrev
  3851. bmcall
  3852. bn_rand_range
  3853. boot_defclass
  3854. bracket
  3855. break_jump
  3856. broken_getc
  3857. broken_ungetc
  3858. bsearch
  3859. bsock_close_read
  3860. bsock_close_write
  3861. bsock_do_not_rev_lookup
  3862. bsock_do_not_rev_lookup_set
  3863. bsock_do_not_reverse_lookup
  3864. bsock_do_not_reverse_lookup_set
  3865. bsock_getpeername
  3866. bsock_getsockname
  3867. bsock_getsockopt
  3868. bsock_recv
  3869. bsock_s_for_fd
  3870. bsock_send
  3871. bsock_setsockopt
  3872. bsock_shutdown
  3873. bytestring_alloc
  3874. bytestring_append
  3875. bytestring_extend
  3876. bytestring_t
  3877. caddr_t
  3878. call_DoOneEvent
  3879. call_asynchronous
  3880. call_block
  3881. call_cfunc
  3882. call_end_proc
  3883. call_final
  3884. call_lexer
  3885. call_op
  3886. call_op_gen
  3887. call_original_exit
  3888. call_queue_handler
  3889. call_queue_mark
  3890. call_tcl_eval
  3891. call_trace_func
  3892. calling_scope_t
  3893. calloc
  3894. callq_safelevel_handler
  3895. cap_getc
  3896. cap_ungetc
  3897. catch_i
  3898. catch_interrupt
  3899. catch_iter
  3900. catch_timer
  3901. cbsubst_def_attr_aliases
  3902. cbsubst_get_all_subst_keys
  3903. cbsubst_get_extra_args_tbl
  3904. cbsubst_get_subst_arg
  3905. cbsubst_get_subst_key
  3906. cbsubst_init
  3907. cbsubst_initialize
  3908. cbsubst_inspect
  3909. cbsubst_ret_val
  3910. cbsubst_scan_args
  3911. cbsubst_table_setup
  3912. char_size
  3913. charset_map_get
  3914. chdir
  3915. chdir_restore
  3916. chdir_yield
  3917. check3rdbyte
  3918. check_autoload_table
  3919. check_backtrace
  3920. check_dirname
  3921. check_gid_switch
  3922. check_iconv
  3923. check_int
  3924. check_modifiable
  3925. check_strio
  3926. check_strscan
  3927. check_type_tree
  3928. check_uid_switch
  3929. check_uint
  3930. chkpage
  3931. chmod
  3932. chmod_internal
  3933. chompdirsep
  3934. chown
  3935. chown_internal
  3936. chsize
  3937. civil2jd
  3938. class2path
  3939. class_instance_method_list
  3940. class_nest
  3941. class_prefix
  3942. classname
  3943. clear_i
  3944. clear_mml
  3945. clear_node_opt_info
  3946. clear_not_flag_cclass
  3947. clear_opt_anc_info
  3948. clear_opt_exact_info
  3949. clear_opt_map_info
  3950. clear_optimize_info
  3951. clearerr
  3952. clock
  3953. clock_t
  3954. clone_method
  3955. close
  3956. close_mime
  3957. closed_dbm
  3958. closed_sdbm
  3959. closedir
  3960. clr_code_score
  3961. clsid_from_remote
  3962. cmdarg_stack
  3963. cmdglob
  3964. cmp_between
  3965. cmp_eq
  3966. cmp_equal
  3967. cmp_failed
  3968. cmp_ge
  3969. cmp_gt
  3970. cmp_le
  3971. cmp_lt
  3972. code_exist_check
  3973. code_is_in_cclass_node
  3974. code_score
  3975. code_status
  3976. coerce_body
  3977. coerce_rescue
  3978. collect_all
  3979. collect_i
  3980. command_start
  3981. comp_distance_value
  3982. comp_opt_exact_or_map_info
  3983. compare
  3984. compile
  3985. compile_anchor_node
  3986. compile_call
  3987. compile_cclass_node
  3988. compile_effect_node
  3989. compile_error
  3990. compile_for_eval
  3991. compile_length_anchor_node
  3992. compile_length_cclass_node
  3993. compile_length_effect_node
  3994. compile_length_option_node
  3995. compile_length_qualifier_node
  3996. compile_length_string_node
  3997. compile_length_string_raw_node
  3998. compile_length_tree
  3999. compile_option_node
  4000. compile_qualifier_node
  4001. compile_range_repeat_node
  4002. compile_string_node
  4003. compile_string_raw_node
  4004. compile_tree
  4005. compile_tree_empty_check
  4006. compile_tree_n_times
  4007. concat_left_node_opt_info
  4008. concat_opt_anc_info
  4009. concat_opt_exact_info
  4010. concat_opt_exact_info_str
  4011. cond
  4012. cond0
  4013. cond_gen
  4014. cond_negative
  4015. cond_stack
  4016. connect
  4017. const_missing
  4018. conv_backslash_value
  4019. conv_to_posix_path
  4020. convert_type
  4021. copy_fds
  4022. copy_mml
  4023. copy_node_opt_info
  4024. copy_node_scope
  4025. copy_opt_anc_info
  4026. copy_opt_env
  4027. copy_opt_exact_info
  4028. copy_opt_map_info
  4029. copysign
  4030. cosh
  4031. count_i
  4032. count_iter_i
  4033. cr_conv
  4034. creat
  4035. create_ip_exc
  4036. create_win32ole_object
  4037. crypt
  4038. ctime
  4039. cur_mid
  4040. curses_addch
  4041. curses_addstr
  4042. curses_attroff
  4043. curses_attron
  4044. curses_attrset
  4045. curses_beep
  4046. curses_bkgd
  4047. curses_bkgdset
  4048. curses_can_change_color
  4049. curses_cbreak
  4050. curses_clear
  4051. curses_close_screen
  4052. curses_closed
  4053. curses_clrtoeol
  4054. curses_color_content
  4055. curses_color_pair
  4056. curses_cols
  4057. curses_curs_set
  4058. curses_def_prog_mode
  4059. curses_delch
  4060. curses_deleteln
  4061. curses_doupdate
  4062. curses_echo
  4063. curses_finalize
  4064. curses_flash
  4065. curses_getch
  4066. curses_getmouse
  4067. curses_getstr
  4068. curses_has_colors
  4069. curses_inch
  4070. curses_init_color
  4071. curses_init_pair
  4072. curses_init_screen
  4073. curses_insch
  4074. curses_insertln
  4075. curses_keyname
  4076. curses_lines
  4077. curses_mousedata_free
  4078. curses_mouseinterval
  4079. curses_mousemask
  4080. curses_nl
  4081. curses_nocbreak
  4082. curses_noecho
  4083. curses_nonl
  4084. curses_noraw
  4085. curses_pair_content
  4086. curses_pair_number
  4087. curses_raw
  4088. curses_refresh
  4089. curses_reset_prog_mode
  4090. curses_resizeterm
  4091. curses_scrl
  4092. curses_setpos
  4093. curses_setscrreg
  4094. curses_standend
  4095. curses_standout
  4096. curses_start_color
  4097. curses_stdscr
  4098. curses_ungetch
  4099. curses_ungetmouse
  4100. cut_stack_tail
  4101. cv_i
  4102. cvar_cbase
  4103. cvt
  4104. d2time
  4105. date2time_str
  4106. datum
  4107. dbl2big
  4108. debug
  4109. decode_bool
  4110. decode_bstr
  4111. decode_enum
  4112. decode_int
  4113. decode_null
  4114. decode_obj
  4115. decode_time
  4116. deferr_setter
  4117. define_filetest_function
  4118. define_final
  4119. define_swapx
  4120. define_syslog_shortcut_method
  4121. deflate_run
  4122. defout_setter
  4123. delete_if_i
  4124. delete_never
  4125. delete_slaves
  4126. deleted_ip
  4127. delpair
  4128. des_cipher
  4129. des_setkey
  4130. detach_process_watcher
  4131. dev_t
  4132. dh_generate
  4133. dh_instance
  4134. digest_final
  4135. dir_chdir
  4136. dir_close
  4137. dir_closed
  4138. dir_each
  4139. dir_entries
  4140. dir_foreach
  4141. dir_globs
  4142. dir_initialize
  4143. dir_inspect
  4144. dir_open_dir
  4145. dir_path
  4146. dir_read
  4147. dir_rewind
  4148. dir_s_alloc
  4149. dir_s_aref
  4150. dir_s_chdir
  4151. dir_s_chroot
  4152. dir_s_getwd
  4153. dir_s_glob
  4154. dir_s_mkdir
  4155. dir_s_open
  4156. dir_s_rmdir
  4157. dir_seek
  4158. dir_set_pos
  4159. dir_tell
  4160. dirent
  4161. disable_noname_group_capture
  4162. dispatch0
  4163. dispatch1
  4164. dispatch2
  4165. dispatch3
  4166. dispatch4
  4167. dispatch5
  4168. dispose_string
  4169. distance_add
  4170. distance_multiply
  4171. distance_value
  4172. divide_ambig_string_node
  4173. divide_look_behind_alternatives
  4174. dlcfunc_free
  4175. dlclose
  4176. dlerror
  4177. dlhandle_free
  4178. dln_find_1
  4179. dln_find_exe
  4180. dln_find_file
  4181. dln_init
  4182. dln_load
  4183. dln_print_undef
  4184. dln_strerror
  4185. dln_sym
  4186. dln_undefined
  4187. dlopen
  4188. dlptr_free
  4189. dlptr_init
  4190. dlptr_mark
  4191. dlsym
  4192. do_R01
  4193. do_R2
  4194. do_R3
  4195. do_R4
  4196. do_checksum
  4197. do_coerce
  4198. do_deflate
  4199. do_hash
  4200. do_hash_bin
  4201. do_inflate
  4202. do_lstat
  4203. do_opendir
  4204. do_select
  4205. do_spawn
  4206. do_stat
  4207. double2time
  4208. double_ne
  4209. downcase
  4210. dsa_generate
  4211. dsa_instance
  4212. dump
  4213. dump_conf
  4214. dump_conf_value
  4215. dump_ensure
  4216. dup
  4217. dup2
  4218. duppair
  4219. dvar_asgn
  4220. dvar_asgn_curr
  4221. dvar_asgn_internal
  4222. dyna_check
  4223. dyna_check_gen
  4224. dyna_in_block
  4225. dyna_in_block_gen
  4226. dyna_init
  4227. dyna_init_gen
  4228. dyna_pop
  4229. dyna_pop_gen
  4230. dyna_push
  4231. dyna_push_gen
  4232. dyna_var
  4233. dyna_var_gen
  4234. e2s_conv
  4235. e2w_conv
  4236. e_iconv
  4237. e_oconv
  4238. e_option_supplied
  4239. e_status
  4240. eaccess
  4241. each_attr_def
  4242. each_conf_value
  4243. each_cons_i
  4244. each_i
  4245. each_key_i
  4246. each_pair
  4247. each_pair_i
  4248. each_slice_i
  4249. each_value_i
  4250. each_with_index_i
  4251. eat_comments
  4252. echild_status
  4253. emx_mblen
  4254. enc_len
  4255. encodes
  4256. encrypt
  4257. endhostent
  4258. endnetent
  4259. endprotoent
  4260. endservent
  4261. enough_to_get
  4262. enough_to_put
  4263. entry_repeat_range
  4264. enum_all
  4265. enum_any
  4266. enum_collect
  4267. enum_count
  4268. enum_each_cons
  4269. enum_each_slice
  4270. enum_each_with_index
  4271. enum_find
  4272. enum_find_all
  4273. enum_grep
  4274. enum_inject
  4275. enum_max
  4276. enum_max_by
  4277. enum_member
  4278. enum_min
  4279. enum_min_by
  4280. enum_none
  4281. enum_one
  4282. enum_partition
  4283. enum_reject
  4284. enum_sort
  4285. enum_sort_by
  4286. enum_to_a
  4287. enum_zip
  4288. enumerator_allocate
  4289. enumerator_each
  4290. enumerator_enum_cons
  4291. enumerator_enum_slice
  4292. enumerator_enum_with_index
  4293. enumerator_init
  4294. enumerator_initialize
  4295. enumerator_iter
  4296. enumerator_iter_i
  4297. enumerator_mark
  4298. enumerator_ptr
  4299. enumerator_with_index
  4300. enumerator_with_index_i
  4301. env_aset
  4302. env_clear
  4303. env_delete
  4304. env_delete_if
  4305. env_delete_m
  4306. env_each
  4307. env_each_i
  4308. env_each_key
  4309. env_each_pair
  4310. env_each_value
  4311. env_empty_p
  4312. env_fetch
  4313. env_has_key
  4314. env_has_value
  4315. env_index
  4316. env_inspect
  4317. env_invert
  4318. env_key
  4319. env_keys
  4320. env_none
  4321. env_reject
  4322. env_reject_bang
  4323. env_replace
  4324. env_replace_i
  4325. env_select
  4326. env_shift
  4327. env_size
  4328. env_str_new
  4329. env_str_new2
  4330. env_to_a
  4331. env_to_hash
  4332. env_to_s
  4333. env_update
  4334. env_update_i
  4335. env_values
  4336. env_values_at
  4337. environ
  4338. envix
  4339. eof
  4340. eof_mime
  4341. eql
  4342. equal_i
  4343. erf
  4344. erfc
  4345. err_append
  4346. err_position
  4347. err_print
  4348. err_snprintf
  4349. errat_getter
  4350. errat_setter
  4351. errinfo_setter
  4352. errno_missing
  4353. error_handle
  4354. error_inval
  4355. error_pos
  4356. error_print
  4357. escape_Qundef
  4358. escape_seq
  4359. establishShell
  4360. etc_endgrent
  4361. etc_endpwent
  4362. etc_getgrent
  4363. etc_getgrgid
  4364. etc_getgrnam
  4365. etc_getlogin
  4366. etc_getpwent
  4367. etc_getpwnam
  4368. etc_getpwuid
  4369. etc_group
  4370. etc_passwd
  4371. etc_setgrent
  4372. etc_setpwent
  4373. eucjp_code_to_mbc
  4374. eucjp_code_to_mbc_first
  4375. eucjp_code_to_mbclen
  4376. eucjp_is_allowed_reverse_match
  4377. eucjp_is_code_ctype
  4378. eucjp_is_mbc_ambiguous
  4379. eucjp_islead
  4380. eucjp_left_adjust_char_head
  4381. eucjp_mbc_enc_len
  4382. eucjp_mbc_to_code
  4383. eucjp_mbc_to_normalize
  4384. ev_const_defined
  4385. ev_const_get
  4386. ev_on_event
  4387. eval
  4388. eval_node
  4389. eval_queue_handler
  4390. eval_queue_mark
  4391. eval_under
  4392. eval_under_i
  4393. eventloop_sleep
  4394. evq_safelevel_handler
  4395. evstr2dstr
  4396. exc_backtrace
  4397. exc_equal
  4398. exc_exception
  4399. exc_initialize
  4400. exc_inspect
  4401. exc_message
  4402. exc_set_backtrace
  4403. exc_to_s
  4404. except
  4405. exec_under
  4406. execl
  4407. execv
  4408. exhash
  4409. exit_initialize
  4410. exit_status
  4411. exit_success_p
  4412. expand_include_path
  4413. exponent
  4414. ext
  4415. extract_beg_len
  4416. extract_fd
  4417. extract_range
  4418. extract_user_token
  4419. false_and
  4420. false_or
  4421. false_to_s
  4422. false_xor
  4423. fc_i
  4424. fc_path
  4425. fchown
  4426. fclose
  4427. fcntl
  4428. fconvert
  4429. fdbm_alloc
  4430. fdbm_aref
  4431. fdbm_clear
  4432. fdbm_close
  4433. fdbm_closed
  4434. fdbm_delete
  4435. fdbm_delete_if
  4436. fdbm_each_key
  4437. fdbm_each_pair
  4438. fdbm_each_value
  4439. fdbm_empty_p
  4440. fdbm_fetch
  4441. fdbm_fetch_m
  4442. fdbm_has_key
  4443. fdbm_has_value
  4444. fdbm_index
  4445. fdbm_initialize
  4446. fdbm_invert
  4447. fdbm_keys
  4448. fdbm_length
  4449. fdbm_modify
  4450. fdbm_reject
  4451. fdbm_replace
  4452. fdbm_s_open
  4453. fdbm_select
  4454. fdbm_shift
  4455. fdbm_store
  4456. fdbm_to_a
  4457. fdbm_to_hash
  4458. fdbm_update
  4459. fdbm_values
  4460. fdbm_values_at
  4461. fdopen
  4462. feof
  4463. ferror
  4464. fetch_char_property_to_ctype
  4465. fetch_escaped_value
  4466. fetch_name
  4467. fetch_range_qualifier
  4468. fetch_token
  4469. fetch_token_in_cc
  4470. fev_initialize
  4471. fev_on_event
  4472. fev_on_event_with_outargs
  4473. fev_s_allocate
  4474. fev_s_msg_loop
  4475. fgdbm_aref
  4476. fgdbm_clear
  4477. fgdbm_close
  4478. fgdbm_closed
  4479. fgdbm_delete
  4480. fgdbm_delete_if
  4481. fgdbm_each_key
  4482. fgdbm_each_pair
  4483. fgdbm_each_value
  4484. fgdbm_empty_p
  4485. fgdbm_fetch
  4486. fgdbm_fetch_m
  4487. fgdbm_has_key
  4488. fgdbm_has_value
  4489. fgdbm_index
  4490. fgdbm_initialize
  4491. fgdbm_invert
  4492. fgdbm_keys
  4493. fgdbm_length
  4494. fgdbm_reject
  4495. fgdbm_reorganize
  4496. fgdbm_replace
  4497. fgdbm_s_alloc
  4498. fgdbm_s_open
  4499. fgdbm_select
  4500. fgdbm_set_cachesize
  4501. fgdbm_set_fastmode
  4502. fgdbm_set_syncmode
  4503. fgdbm_shift
  4504. fgdbm_store
  4505. fgdbm_sync
  4506. fgdbm_to_a
  4507. fgdbm_to_hash
  4508. fgdbm_update
  4509. fgdbm_values
  4510. fgdbm_values_at
  4511. fgetc
  4512. fgetchar
  4513. file_expand_path
  4514. file_inspect_join
  4515. file_load_ok
  4516. file_s_fnmatch
  4517. fileattr_to_unixmode
  4518. filelength
  4519. filename_completion_proc_call
  4520. fileno
  4521. filetime_to_clock
  4522. filetime_to_unixtime
  4523. finalize_list
  4524. finally
  4525. finals
  4526. find_all_i
  4527. find_bad_fds
  4528. find_class_path
  4529. find_default_source
  4530. find_dirsep
  4531. find_i
  4532. find_iid
  4533. find_inputcode_byfunc
  4534. find_stack_direction
  4535. find_str_position
  4536. finite
  4537. fitpair
  4538. fix_abs
  4539. fix_and
  4540. fix_aref
  4541. fix_cmp
  4542. fix_div
  4543. fix_divide
  4544. fix_divmod
  4545. fix_equal
  4546. fix_ge
  4547. fix_gt
  4548. fix_id2name
  4549. fix_idiv
  4550. fix_le
  4551. fix_lshift
  4552. fix_lt
  4553. fix_minus
  4554. fix_mod
  4555. fix_mul
  4556. fix_or
  4557. fix_plus
  4558. fix_pow
  4559. fix_quo
  4560. fix_rev
  4561. fix_rshift
  4562. fix_size
  4563. fix_to_f
  4564. fix_to_s
  4565. fix_to_sym
  4566. fix_uminus
  4567. fix_xor
  4568. fix_zero_p
  4569. fixdivmod
  4570. fixpos
  4571. flatten
  4572. flo_abs
  4573. flo_ceil
  4574. flo_cmp
  4575. flo_coerce
  4576. flo_div
  4577. flo_divmod
  4578. flo_eq
  4579. flo_eql
  4580. flo_floor
  4581. flo_ge
  4582. flo_gt
  4583. flo_hash
  4584. flo_is_finite_p
  4585. flo_is_infinite_p
  4586. flo_is_nan_p
  4587. flo_le
  4588. flo_lt
  4589. flo_minus
  4590. flo_mod
  4591. flo_mul
  4592. flo_plus
  4593. flo_pow
  4594. flo_round
  4595. flo_to_f
  4596. flo_to_s
  4597. flo_truncate
  4598. flo_uminus
  4599. flo_zero_p
  4600. flock
  4601. flock_win95
  4602. flock_winnt
  4603. flodivmod
  4604. flush_before_seek
  4605. flush_register_windows
  4606. fmt_setup
  4607. fnmatch
  4608. fnmatch_helper
  4609. fold_conv
  4610. fole_each
  4611. fole_free
  4612. fole_func_methods
  4613. fole_get_methods
  4614. fole_getproperty
  4615. fole_getproperty2
  4616. fole_initialize
  4617. fole_invoke
  4618. fole_invoke2
  4619. fole_method_help
  4620. fole_methods
  4621. fole_missing
  4622. fole_put_methods
  4623. fole_s_allocate
  4624. fole_s_connect
  4625. fole_s_const_load
  4626. fole_s_free
  4627. fole_s_get_code_page
  4628. fole_s_reference_count
  4629. fole_s_set_code_page
  4630. fole_s_show_help
  4631. fole_setproperty
  4632. fole_setproperty2
  4633. fole_type
  4634. fole_typelib
  4635. folemethod_dispid
  4636. folemethod_event
  4637. folemethod_event_interface
  4638. folemethod_helpcontext
  4639. folemethod_helpfile
  4640. folemethod_helpstring
  4641. folemethod_initialize
  4642. folemethod_invkind
  4643. folemethod_invoke_kind
  4644. folemethod_name
  4645. folemethod_offset_vtbl
  4646. folemethod_params
  4647. folemethod_return_type
  4648. folemethod_return_type_detail
  4649. folemethod_return_vtype
  4650. folemethod_s_allocate
  4651. folemethod_size_opt_params
  4652. folemethod_size_params
  4653. folemethod_visible
  4654. foleparam_default
  4655. foleparam_input
  4656. foleparam_name
  4657. foleparam_ole_type
  4658. foleparam_ole_type_detail
  4659. foleparam_optional
  4660. foleparam_output
  4661. foleparam_retval
  4662. foletype_guid
  4663. foletype_helpcontext
  4664. foletype_helpfile
  4665. foletype_helpstring
  4666. foletype_impl_ole_types
  4667. foletype_initialize
  4668. foletype_major_version
  4669. foletype_methods
  4670. foletype_minor_version
  4671. foletype_name
  4672. foletype_ole_type
  4673. foletype_ole_typelib
  4674. foletype_progid
  4675. foletype_s_allocate
  4676. foletype_s_ole_classes
  4677. foletype_s_progids
  4678. foletype_s_typelibs
  4679. foletype_src_type
  4680. foletype_typekind
  4681. foletype_variables
  4682. foletype_visible
  4683. foletypelib_guid
  4684. foletypelib_initialize
  4685. foletypelib_major_version
  4686. foletypelib_minor_version
  4687. foletypelib_name
  4688. foletypelib_ole_classes
  4689. foletypelib_path
  4690. foletypelib_s_typelibs
  4691. foletypelib_version
  4692. folevariable_name
  4693. folevariable_ole_type
  4694. folevariable_ole_type_detail
  4695. folevariable_value
  4696. folevariable_variable_kind
  4697. folevariable_varkind
  4698. folevariable_visible
  4699. folevariant_initialize
  4700. folevariant_s_allocate
  4701. folevariant_value
  4702. fopen
  4703. forbid_setid
  4704. foreach_safe_i
  4705. formal_assign
  4706. forward_search_range
  4707. fpath_check
  4708. fprintf
  4709. fptr_finalize
  4710. fputc
  4711. fputchar
  4712. frame_dup
  4713. frame_free
  4714. free
  4715. freeDevice
  4716. free_any_io
  4717. free_dbm
  4718. free_dir
  4719. free_invoke_arguments
  4720. free_sdbm
  4721. free_unused_heaps
  4722. free_window
  4723. freeaddrinfo
  4724. freehostent
  4725. freopen
  4726. fromDefaultEnc_toUTF8
  4727. fromUTF8_toDefaultEnc
  4728. fsdbm_alloc
  4729. fsdbm_aref
  4730. fsdbm_clear
  4731. fsdbm_close
  4732. fsdbm_closed
  4733. fsdbm_delete
  4734. fsdbm_delete_if
  4735. fsdbm_each_key
  4736. fsdbm_each_pair
  4737. fsdbm_each_value
  4738. fsdbm_empty_p
  4739. fsdbm_fetch
  4740. fsdbm_fetch_m
  4741. fsdbm_has_key
  4742. fsdbm_has_value
  4743. fsdbm_index
  4744. fsdbm_initialize
  4745. fsdbm_invert
  4746. fsdbm_keys
  4747. fsdbm_length
  4748. fsdbm_reject
  4749. fsdbm_replace
  4750. fsdbm_s_open
  4751. fsdbm_select
  4752. fsdbm_shift
  4753. fsdbm_store
  4754. fsdbm_to_a
  4755. fsdbm_to_hash
  4756. fsdbm_update
  4757. fsdbm_values
  4758. fsdbm_values_at
  4759. fsopen
  4760. fstat
  4761. fsync
  4762. ftime
  4763. gai_strerror
  4764. garbage_collect
  4765. gc_mark
  4766. gc_mark_all
  4767. gc_mark_children
  4768. gc_mark_rest
  4769. gc_sweep
  4770. generic_ivar_defined
  4771. generic_ivar_get
  4772. generic_ivar_remove
  4773. generic_ivar_set
  4774. genrand_int32
  4775. genrand_real
  4776. get2comp
  4777. getDevice
  4778. get_addr
  4779. get_backtrace
  4780. get_char_length_tree
  4781. get_char_length_tree1
  4782. get_conf_section
  4783. get_digest_base_metadata
  4784. get_eval_string_core
  4785. get_event_name
  4786. get_eventloop_tick
  4787. get_eventloop_weight
  4788. get_gzfile
  4789. get_head_value_node
  4790. get_iconv_opt
  4791. get_iconv_opt_i
  4792. get_inline
  4793. get_ip
  4794. get_max_match_length
  4795. get_min_match_length
  4796. get_name
  4797. get_no_event_wait
  4798. get_obj_from_str
  4799. get_osfhandle
  4800. get_pat
  4801. get_pid
  4802. get_ppid
  4803. get_stack_tail
  4804. get_stat
  4805. get_str_from_obj
  4806. get_strio
  4807. get_syserr
  4808. get_zstream
  4809. getaddrinfo
  4810. getc
  4811. getchar
  4812. getcwd
  4813. getcwdofdrv
  4814. getdbit
  4815. getegid
  4816. getenv
  4817. geteuid
  4818. getgid
  4819. gethostbyaddr
  4820. gethostbyname
  4821. gethostname
  4822. getlogin
  4823. getnameinfo
  4824. getnetbyaddr
  4825. getnetbyname
  4826. getnetent
  4827. getnext
  4828. getnkey
  4829. getpage
  4830. getpair
  4831. getpeername
  4832. getpid
  4833. getprotobyname
  4834. getprotobynumber
  4835. getprotoent
  4836. getservbyname
  4837. getservbyport
  4838. getservent
  4839. getsockname
  4840. getsockopt
  4841. gettable
  4842. gettable_gen
  4843. gettimeofday
  4844. getuid
  4845. givar_i
  4846. givar_mark_i
  4847. glob_brace
  4848. glob_call_func
  4849. glob_free_pattern
  4850. glob_func_caller
  4851. glob_helper
  4852. glob_make_pattern
  4853. global_id
  4854. gmtime
  4855. grep_i
  4856. grep_iter_i
  4857. group_ensure
  4858. group_iterate
  4859. group_member
  4860. gvar_i
  4861. gzfile_calc_crc
  4862. gzfile_check_footer
  4863. gzfile_close
  4864. gzfile_ensure_close
  4865. gzfile_finalize
  4866. gzfile_free
  4867. gzfile_get16
  4868. gzfile_get32
  4869. gzfile_make_footer
  4870. gzfile_make_header
  4871. gzfile_mark
  4872. gzfile_new
  4873. gzfile_read
  4874. gzfile_read_all
  4875. gzfile_read_header
  4876. gzfile_read_more
  4877. gzfile_read_raw
  4878. gzfile_read_raw_ensure
  4879. gzfile_read_raw_partial
  4880. gzfile_read_raw_rescue
  4881. gzfile_read_raw_until_zero
  4882. gzfile_reader_end
  4883. gzfile_reader_get_unused
  4884. gzfile_reader_new
  4885. gzfile_reader_rewind
  4886. gzfile_readpartial
  4887. gzfile_reset
  4888. gzfile_s_open
  4889. gzfile_set32
  4890. gzfile_ungetc
  4891. gzfile_write
  4892. gzfile_write_raw
  4893. gzfile_writer_end
  4894. gzfile_writer_new
  4895. gzreader_gets
  4896. gzreader_skip_linebreaks
  4897. h_conv
  4898. handle_rescue
  4899. has_drive_letter
  4900. has_magic
  4901. has_redirection
  4902. hash
  4903. hash2kv
  4904. hash2kv_enc
  4905. hash2list
  4906. hash2list_enc
  4907. hash2named_arg
  4908. hash_alloc
  4909. hash_each
  4910. hash_equal
  4911. hash_foreach_call
  4912. hash_foreach_ensure
  4913. hash_foreach_iter
  4914. header
  4915. here_document
  4916. heredoc_end
  4917. heredoc_identifier
  4918. heredoc_restore
  4919. hex
  4920. hex2bin
  4921. hex2num
  4922. hex_getc
  4923. hira_conv
  4924. hist_delete_at
  4925. hist_each
  4926. hist_empty_p
  4927. hist_get
  4928. hist_length
  4929. hist_pop
  4930. hist_push
  4931. hist_push_method
  4932. hist_set
  4933. hist_shift
  4934. hist_to_s
  4935. history_node_new
  4936. history_root_free
  4937. history_tree_add_child
  4938. history_tree_clear
  4939. history_tree_clone
  4940. history_tree_free
  4941. hmac_final
  4942. host_str
  4943. hton16
  4944. hton32
  4945. htond
  4946. htonf
  4947. htonl
  4948. htons
  4949. htov16
  4950. htov32
  4951. htovd
  4952. htovf
  4953. htovl
  4954. htovs
  4955. hypot
  4956. i_free_name_entry
  4957. i_free_shared_class
  4958. i_names
  4959. i_print_name_entry
  4960. i_renumber_name
  4961. iconv_conv
  4962. iconv_convert
  4963. iconv_create
  4964. iconv_ctl
  4965. iconv_dfree
  4966. iconv_fail
  4967. iconv_failure_failed
  4968. iconv_failure_initialize
  4969. iconv_failure_inspect
  4970. iconv_failure_success
  4971. iconv_finish
  4972. iconv_free
  4973. iconv_get_discard_ilseq
  4974. iconv_get_transliterate
  4975. iconv_iconv
  4976. iconv_init_state
  4977. iconv_initialize
  4978. iconv_s_allocate
  4979. iconv_s_conv
  4980. iconv_s_convert
  4981. iconv_s_ctlmethods
  4982. iconv_s_iconv
  4983. iconv_s_list
  4984. iconv_s_open
  4985. iconv_set_discard_ilseq
  4986. iconv_set_transliterate
  4987. iconv_trivialp
  4988. iconv_try
  4989. id2ref
  4990. id_to_value
  4991. identical_path
  4992. ifndef_ripper
  4993. ignorecase_getter
  4994. ignorecase_setter
  4995. in_def
  4996. in_defined
  4997. in_single
  4998. include_class_new
  4999. index
  5000. inet_ntop
  5001. inet_pton
  5002. inetsock_cleanup
  5003. inf
  5004. infect
  5005. infected_str_new
  5006. inflate_run
  5007. init_by_array
  5008. init_copy
  5009. init_des
  5010. init_env
  5011. init_funcname
  5012. init_funcname_len
  5013. init_genrand
  5014. init_ids
  5015. init_inetsock
  5016. init_inetsock_internal
  5017. init_mark_stack
  5018. init_perm
  5019. init_sigchld
  5020. init_sock
  5021. init_stdhandle
  5022. init_unixsock
  5023. initialize_cclass
  5024. initialize_params
  5025. inject_i
  5026. ino_t
  5027. ins_methods_i
  5028. ins_methods_priv_i
  5029. ins_methods_prot_i
  5030. ins_methods_pub_i
  5031. ins_methods_push
  5032. insert
  5033. inspect1
  5034. inspect2
  5035. inspect_ary
  5036. inspect_hash
  5037. inspect_i
  5038. inspect_obj
  5039. inspect_struct
  5040. install_nativethread_sighandler
  5041. install_sighandler
  5042. int_chr
  5043. int_dotimes
  5044. int_downto
  5045. int_int_p
  5046. int_succ
  5047. int_to_i
  5048. int_upto
  5049. internal_id
  5050. internal_match
  5051. intersect_fds
  5052. intptr_t
  5053. invoke_queue_handler
  5054. invoke_queue_mark
  5055. invoke_tcl_proc
  5056. io_alloc
  5057. io_check_tty
  5058. io_close
  5059. io_cntl
  5060. io_fflush
  5061. io_fread
  5062. io_fwrite
  5063. io_getc
  5064. io_getpartial
  5065. io_new_instance
  5066. io_puts_ary
  5067. io_read
  5068. io_readpartial
  5069. io_ready_p
  5070. io_reopen
  5071. io_s_foreach
  5072. io_s_read
  5073. io_s_readlines
  5074. io_seek
  5075. io_tell
  5076. io_ungetc
  5077. io_unread
  5078. io_wait
  5079. io_write
  5080. ioctl
  5081. ioctl_arg
  5082. ioctl_arg2num
  5083. ioctlsocket
  5084. ioerr
  5085. ioinfo
  5086. ip_CallWhenDeleted
  5087. ip_InterpExitObjCmd
  5088. ip_RubyExitObjCmd
  5089. ip_addr
  5090. ip_alloc
  5091. ip_allow_ruby_exit_p
  5092. ip_allow_ruby_exit_set
  5093. ip_create_console
  5094. ip_create_console_core
  5095. ip_create_slave
  5096. ip_create_slave_core
  5097. ip_delete
  5098. ip_do_one_event
  5099. ip_eval
  5100. ip_eval_real
  5101. ip_evloop_abort_on_exc
  5102. ip_evloop_abort_on_exc_set
  5103. ip_finalize
  5104. ip_free
  5105. ip_fromUTF8
  5106. ip_get_eventloop_tick
  5107. ip_get_eventloop_weight
  5108. ip_get_global_var
  5109. ip_get_global_var2
  5110. ip_get_no_event_wait
  5111. ip_get_result_string_obj
  5112. ip_get_variable
  5113. ip_get_variable2
  5114. ip_get_variable2_core
  5115. ip_has_invalid_namespace_p
  5116. ip_has_mainwindow_p
  5117. ip_init
  5118. ip_invoke
  5119. ip_invoke_core
  5120. ip_invoke_immediate
  5121. ip_invoke_real
  5122. ip_invoke_with_position
  5123. ip_is_deleted_p
  5124. ip_is_safe_p
  5125. ip_is_slave_of_p
  5126. ip_mainloop
  5127. ip_mainloop_watchdog
  5128. ip_make_safe
  5129. ip_make_safe_core
  5130. ip_null_namespace
  5131. ip_peeraddr
  5132. ip_rbNamespaceObjCmd
  5133. ip_rbTkWaitObjCmd
  5134. ip_rbUpdateObjCmd
  5135. ip_rbVwaitObjCmd
  5136. ip_rb_threadTkWaitObjCmd
  5137. ip_rb_threadUpdateObjCmd
  5138. ip_rb_threadVwaitObjCmd
  5139. ip_recvfrom
  5140. ip_replace_wait_commands
  5141. ip_restart
  5142. ip_retval
  5143. ip_ruby_cmd
  5144. ip_ruby_cmd_core
  5145. ip_ruby_eval
  5146. ip_s_getaddress
  5147. ip_set_eventloop_tick
  5148. ip_set_eventloop_weight
  5149. ip_set_exc_message
  5150. ip_set_global_var
  5151. ip_set_global_var2
  5152. ip_set_no_event_wait
  5153. ip_set_variable
  5154. ip_set_variable2
  5155. ip_set_variable2_core
  5156. ip_split_tklist
  5157. ip_thread_tkwait
  5158. ip_thread_vwait
  5159. ip_toUTF8
  5160. ip_unset_global_var
  5161. ip_unset_global_var2
  5162. ip_unset_variable
  5163. ip_unset_variable2
  5164. ip_unset_variable2_core
  5165. ip_wrap_namespace_command
  5166. ipaddr
  5167. isInternalCmd
  5168. isUNCRoot
  5169. is_absolute_path
  5170. is_alnum
  5171. is_anychar_star_qualifier
  5172. is_asgn_or_id
  5173. is_attrset_id
  5174. is_class_id
  5175. is_console
  5176. is_const_id
  5177. is_defined
  5178. is_digit
  5179. is_equal_mml
  5180. is_full_opt_exact_info
  5181. is_global_id
  5182. is_identchar
  5183. is_instance_id
  5184. is_invalid_qualifier_target
  5185. is_junk_id
  5186. is_left_anchor
  5187. is_local_id
  5188. is_macos_native_path
  5189. is_newline
  5190. is_not_included
  5191. is_not_socket
  5192. is_notop_id
  5193. is_pipe
  5194. is_pointer_to_heap
  5195. is_readable_console
  5196. is_readable_pipe
  5197. is_ruby_native_thread
  5198. is_set_opt_anc_info
  5199. is_socket
  5200. is_special_global_name
  5201. isalnum
  5202. isalpha
  5203. isascii
  5204. isatty
  5205. iscntrl
  5206. isdigit
  5207. isdirsep
  5208. isinf
  5209. isleap
  5210. islower
  5211. ismbchar
  5212. isnan
  5213. iso2022jp_check_conv
  5214. iso8601wknum
  5215. isprint
  5216. ispunct
  5217. isreadable
  5218. isspace
  5219. isupper
  5220. iswritable
  5221. isxdigit
  5222. itoh4
  5223. ivar_get
  5224. ivar_i
  5225. ivq_safelevel_handler
  5226. j_oconv
  5227. jd2civil
  5228. jmp_buf
  5229. join_der
  5230. join_der_i
  5231. join_path
  5232. jump_tag_but_local_jump
  5233. k__END__
  5234. k_strcat_capa
  5235. k_strcpy
  5236. k_strdup
  5237. kanji_convert
  5238. kcode_euc
  5239. kcode_getter
  5240. kcode_none
  5241. kcode_reset_option
  5242. kcode_set_option
  5243. kcode_setter
  5244. kcode_sjis
  5245. kcode_utf8
  5246. key2keyname
  5247. key_i
  5248. keys_i
  5249. keyword_id_to_str
  5250. kill
  5251. last_match_getter
  5252. last_paren_match_getter
  5253. last_status_set
  5254. lchmod_internal
  5255. lchown_internal
  5256. leap_year_p
  5257. leave
  5258. lesser
  5259. lex_get_str
  5260. lex_getline
  5261. lex_gets
  5262. lex_gets_ptr
  5263. lex_goto_eol
  5264. lex_input
  5265. lex_io_gets
  5266. lex_lastline
  5267. lex_p
  5268. lex_pbeg
  5269. lex_pend
  5270. lex_state
  5271. lex_strterm
  5272. lexer_i
  5273. lexer_iter
  5274. lib_Tcl_backslash
  5275. lib_UTF_backslash
  5276. lib_UTF_backslash_core
  5277. lib_conv_listelement
  5278. lib_do_one_event
  5279. lib_do_one_event_core
  5280. lib_eventloop_core
  5281. lib_eventloop_ensure
  5282. lib_eventloop_launcher
  5283. lib_eventloop_main
  5284. lib_eventloop_main_core
  5285. lib_evloop_abort_on_exc
  5286. lib_evloop_abort_on_exc_set
  5287. lib_evloop_thread_p
  5288. lib_fromUTF8
  5289. lib_fromUTF8_core
  5290. lib_get_system_encoding
  5291. lib_mainloop
  5292. lib_mainloop_watchdog
  5293. lib_merge_tklist
  5294. lib_num_of_mainwindows
  5295. lib_restart
  5296. lib_restart_core
  5297. lib_set_system_encoding
  5298. lib_split_tklist
  5299. lib_split_tklist_core
  5300. lib_thread_callback
  5301. lib_toUTF8
  5302. lib_toUTF8_core
  5303. lib_watchdog_core
  5304. lib_watchdog_ensure
  5305. limited_big_rand
  5306. limited_rand
  5307. lineno_setter
  5308. link
  5309. link_undef
  5310. list_append
  5311. list_concat
  5312. list_i
  5313. list_iconv
  5314. list_iconv_i
  5315. listen
  5316. literal_concat
  5317. literal_node
  5318. load
  5319. load_1
  5320. load_ensure
  5321. load_failed
  5322. load_file
  5323. load_header
  5324. load_lib
  5325. load_mantissa
  5326. load_reloc
  5327. load_stdin
  5328. load_sym
  5329. load_text_data
  5330. load_wait
  5331. local_append
  5332. local_append_gen
  5333. local_cnt
  5334. local_cnt_gen
  5335. local_id
  5336. local_id_gen
  5337. local_pop
  5338. local_pop_gen
  5339. local_push
  5340. local_push_gen
  5341. local_tbl
  5342. local_tbl_gen
  5343. localjump_error
  5344. localjump_reason
  5345. localjump_xvalue
  5346. localtime
  5347. log
  5348. log10
  5349. logop
  5350. logop_gen
  5351. long_toobig
  5352. lpar_beg
  5353. lseek
  5354. lstat
  5355. lvar_defined
  5356. lvar_defined_gen
  5357. lvtbl
  5358. mSyslogConstants_LOG_UPTO
  5359. mSyslog_close
  5360. mSyslog_facility
  5361. mSyslog_get_mask
  5362. mSyslog_ident
  5363. mSyslog_inspect
  5364. mSyslog_instance
  5365. mSyslog_isopen
  5366. mSyslog_log
  5367. mSyslog_open
  5368. mSyslog_options
  5369. mSyslog_reopen
  5370. mSyslog_set_mask
  5371. main
  5372. main_to_s
  5373. make_addrinfo
  5374. make_backtrace
  5375. make_capture_history_tree
  5376. make_compound_alt_node_from_cc
  5377. make_dbcs_table
  5378. make_hostent
  5379. make_hostent_internal
  5380. make_inetaddr
  5381. make_ipaddr
  5382. make_ipaddr0
  5383. make_mask
  5384. make_oletypelib_obj
  5385. make_regexp
  5386. make_struct
  5387. make_time_t
  5388. make_version_str
  5389. makroom
  5390. malloc
  5391. map_charset
  5392. map_errno
  5393. map_position_value
  5394. map_search
  5395. map_search_backward
  5396. mark_entry
  5397. mark_global_entry
  5398. mark_hash
  5399. mark_keyvalue
  5400. mark_loading_thread
  5401. mark_locations_array
  5402. mark_source_filename
  5403. mark_tbl
  5404. marshal_dump
  5405. marshal_load
  5406. massign
  5407. match_alloc
  5408. match_aref
  5409. match_array
  5410. match_at
  5411. match_begin
  5412. match_captures
  5413. match_end
  5414. match_entry
  5415. match_fds
  5416. match_getter
  5417. match_init_copy
  5418. match_offset
  5419. match_op
  5420. match_op_gen
  5421. match_select
  5422. match_setter
  5423. match_size
  5424. match_string
  5425. match_to_a
  5426. match_to_s
  5427. match_values_at
  5428. math_acos
  5429. math_acosh
  5430. math_asin
  5431. math_asinh
  5432. math_atan
  5433. math_atan2
  5434. math_atanh
  5435. math_cos
  5436. math_cosh
  5437. math_erf
  5438. math_erfc
  5439. math_exp
  5440. math_frexp
  5441. math_hypot
  5442. math_ldexp
  5443. math_log
  5444. math_log10
  5445. math_sin
  5446. math_sinh
  5447. math_sqrt
  5448. math_tan
  5449. math_tanh
  5450. max
  5451. max_by_i
  5452. max_i
  5453. max_ii
  5454. mbclen
  5455. mbclen2
  5456. mblen
  5457. md5_process
  5458. med3
  5459. member_i
  5460. memcmp
  5461. memcpy
  5462. memfill
  5463. memmove
  5464. memset
  5465. method_arg
  5466. method_arity
  5467. method_arity_m
  5468. method_call
  5469. method_clone
  5470. method_entry
  5471. method_eq
  5472. method_hash
  5473. method_inspect
  5474. method_missing
  5475. method_optarg
  5476. method_proc
  5477. method_unbind
  5478. mime_begin
  5479. mime_begin_strict
  5480. mime_getc
  5481. mime_getc_buf
  5482. mime_integrity
  5483. mime_prechar
  5484. mime_putc
  5485. mime_ungetc
  5486. mime_ungetc_buf
  5487. mimeout_addchar
  5488. min_by_i
  5489. min_i
  5490. min_ii
  5491. mkdir
  5492. mktemp
  5493. mktime
  5494. mlhs_add
  5495. mlhs_add_star
  5496. mlhs_new
  5497. mmarg
  5498. mmprepare
  5499. mmrot3
  5500. mmrot3_
  5501. mmswap
  5502. mmswap_
  5503. mnew
  5504. mod_av_set
  5505. mode_t
  5506. module_connection
  5507. module_setup
  5508. moreswitches
  5509. move_to_next_entry
  5510. mproc
  5511. mrhs_add
  5512. mrhs_add_star
  5513. mrhs_new
  5514. must_respond_to
  5515. my_getcwd
  5516. nR0
  5517. nR1
  5518. nR2
  5519. nR3
  5520. nR4
  5521. name_add
  5522. name_err_initialize
  5523. name_err_mesg_equal
  5524. name_err_mesg_load
  5525. name_err_mesg_mark
  5526. name_err_mesg_new
  5527. name_err_mesg_to_str
  5528. name_err_name
  5529. name_err_to_s
  5530. name_find
  5531. names_clear
  5532. nan
  5533. nd_1st
  5534. nd_2nd
  5535. nd_aid
  5536. nd_alen
  5537. nd_argc
  5538. nd_args
  5539. nd_beg
  5540. nd_body
  5541. nd_cflag
  5542. nd_cfnc
  5543. nd_clss
  5544. nd_cnt
  5545. nd_cond
  5546. nd_cpath
  5547. nd_cval
  5548. nd_defn
  5549. nd_else
  5550. nd_end
  5551. nd_ensr
  5552. nd_entry
  5553. nd_frml
  5554. nd_func
  5555. nd_head
  5556. nd_ibdy
  5557. nd_iter
  5558. nd_line
  5559. nd_lit
  5560. nd_mid
  5561. nd_modl
  5562. nd_nest
  5563. nd_next
  5564. nd_noex
  5565. nd_nth
  5566. nd_opt
  5567. nd_orig
  5568. nd_paren
  5569. nd_recv
  5570. nd_resq
  5571. nd_rest
  5572. nd_rval
  5573. nd_set_line
  5574. nd_set_type
  5575. nd_state
  5576. nd_stts
  5577. nd_super
  5578. nd_tag
  5579. nd_tbl
  5580. nd_term
  5581. nd_tval
  5582. nd_type
  5583. nd_value
  5584. nd_var
  5585. nd_vid
  5586. negate_lit
  5587. new_args
  5588. new_args_gen
  5589. new_bv
  5590. new_bv_gen
  5591. new_call
  5592. new_code_range
  5593. new_dvar
  5594. new_evstr
  5595. new_fcall
  5596. new_fcall_gen
  5597. new_size
  5598. new_super
  5599. new_yield
  5600. newline_len
  5601. newline_node
  5602. newtok
  5603. next_argv
  5604. next_setup
  5605. next_state
  5606. next_state_class
  5607. next_state_val
  5608. nextc
  5609. nextdirsep
  5610. nfc_getc
  5611. nfc_ungetc
  5612. nil_inspect
  5613. nil_plus
  5614. nil_to_a
  5615. nil_to_f
  5616. nil_to_i
  5617. nil_to_s
  5618. nkf_isalnum
  5619. nkf_isalpha
  5620. nkf_isblank
  5621. nkf_isdigit
  5622. nkf_isspace
  5623. nkf_isxdigit
  5624. nkf_toupper
  5625. no_blockarg
  5626. no_connection
  5627. no_connection2
  5628. no_mevent
  5629. no_putc
  5630. no_window
  5631. noconvert
  5632. node_assign
  5633. node_assign_gen
  5634. node_new
  5635. node_new_alt
  5636. node_new_anychar
  5637. node_new_backref
  5638. node_new_call
  5639. node_new_cclass
  5640. node_new_cclass_by_codepoint_range
  5641. node_new_ctype
  5642. node_new_effect
  5643. node_new_effect_memory
  5644. node_new_empty
  5645. node_new_list
  5646. node_new_option
  5647. node_new_qualifier
  5648. node_new_str
  5649. node_new_str_raw
  5650. node_new_str_raw_char
  5651. node_str_cat_char
  5652. nodeline
  5653. nodetype
  5654. nometh_err_args
  5655. nometh_err_initialize
  5656. noname_disable_map
  5657. none_i
  5658. none_iter_i
  5659. not_code_range_buf
  5660. ntohd
  5661. ntohf
  5662. ntohl
  5663. ntohs
  5664. num2i32
  5665. num_abs
  5666. num_ceil
  5667. num_cmp
  5668. num_coerce
  5669. num_div
  5670. num_divmod
  5671. num_eql
  5672. num_equal
  5673. num_floor
  5674. num_init_copy
  5675. num_int_p
  5676. num_modulo
  5677. num_nonzero_p
  5678. num_quo
  5679. num_remainder
  5680. num_round
  5681. num_sadded
  5682. num_scalar_p
  5683. num_step
  5684. num_to_asn1integer
  5685. num_to_int
  5686. num_to_long
  5687. num_truncate
  5688. num_uminus
  5689. num_uplus
  5690. num_zero_p
  5691. numbered_ref_check
  5692. numberof
  5693. numchar_getc
  5694. numchar_ungetc
  5695. numcmp
  5696. numhash
  5697. obj2long
  5698. obj_free
  5699. obj_respond_to
  5700. obj_to_asn1bool
  5701. obj_to_asn1bstr
  5702. obj_to_asn1derstr
  5703. obj_to_asn1gtime
  5704. obj_to_asn1int
  5705. obj_to_asn1null
  5706. obj_to_asn1obj
  5707. obj_to_asn1str
  5708. obj_to_asn1utime
  5709. obj_to_enum
  5710. objcdummyfunction
  5711. off_t
  5712. offsetof
  5713. ole_ary_m_entry
  5714. ole_bind_obj
  5715. ole_classes_from_typelib
  5716. ole_const_load
  5717. ole_create_dcom
  5718. ole_docinfo_from_type
  5719. ole_each_sub
  5720. ole_event_free
  5721. ole_excepinfo2msg
  5722. ole_free
  5723. ole_hresult2msg
  5724. ole_ienum_free
  5725. ole_initialize
  5726. ole_invoke
  5727. ole_invoke2
  5728. ole_mb2wc
  5729. ole_method_dispid
  5730. ole_method_docinfo_from_type
  5731. ole_method_event
  5732. ole_method_helpcontext
  5733. ole_method_helpfile
  5734. ole_method_helpstring
  5735. ole_method_invkind
  5736. ole_method_invoke_kind
  5737. ole_method_offset_vtbl
  5738. ole_method_params
  5739. ole_method_return_type
  5740. ole_method_return_type_detail
  5741. ole_method_return_vtype
  5742. ole_method_size_opt_params
  5743. ole_method_size_params
  5744. ole_method_sub
  5745. ole_method_visible
  5746. ole_methods
  5747. ole_methods_from_typeinfo
  5748. ole_methods_sub
  5749. ole_msg_loop
  5750. ole_ole_type
  5751. ole_param_default
  5752. ole_param_flag_mask
  5753. ole_param_ole_type
  5754. ole_param_ole_type_detail
  5755. ole_propertyput
  5756. ole_ptrtype2val
  5757. ole_raise
  5758. ole_search_event
  5759. ole_search_event_at
  5760. ole_set_member
  5761. ole_set_safe_array
  5762. ole_show_help
  5763. ole_type_from_itypeinfo
  5764. ole_type_guid
  5765. ole_type_helpcontext
  5766. ole_type_helpfile
  5767. ole_type_helpstring
  5768. ole_type_impl_ole_types
  5769. ole_type_major_version
  5770. ole_type_minor_version
  5771. ole_type_progid
  5772. ole_type_src_type
  5773. ole_type_typekind
  5774. ole_type_visible
  5775. ole_typedesc2val
  5776. ole_typelib_from_itypeinfo
  5777. ole_uninitialize
  5778. ole_usertype2val
  5779. ole_val2olevariantdata
  5780. ole_val2ptr_variant
  5781. ole_val2variant
  5782. ole_val2variant2
  5783. ole_var2ptr_var
  5784. ole_variable_kind
  5785. ole_variable_ole_type
  5786. ole_variable_ole_type_detail
  5787. ole_variable_value
  5788. ole_variable_varkind
  5789. ole_variable_visible
  5790. ole_variables
  5791. ole_variant2val
  5792. ole_wc2mb
  5793. ole_wc2vstr
  5794. oleclass_from_typelib
  5795. olemethod_free
  5796. olemethod_from_typeinfo
  5797. olemethod_set_member
  5798. oleparam_free
  5799. oletype_free
  5800. oletype_set_member
  5801. oletypelib_path
  5802. oletypelib_search_registry
  5803. oletypelib_search_registry2
  5804. oletypelib_set_member
  5805. olevariable_free
  5806. olevariant_free
  5807. one
  5808. one_i
  5809. one_iter_i
  5810. onig_alloc_init
  5811. onig_bbuf_init
  5812. onig_chain_link_add
  5813. onig_chain_reduce
  5814. onig_clone
  5815. onig_compile
  5816. onig_copy_encoding
  5817. onig_end
  5818. onig_error_code_to_format
  5819. onig_error_code_to_str
  5820. onig_exec_trap
  5821. onig_foreach_name
  5822. onig_free
  5823. onig_free_body
  5824. onig_free_node_list
  5825. onig_free_shared_cclass_table
  5826. onig_get_ambig_flag
  5827. onig_get_capture_tree
  5828. onig_get_default_ambig_flag
  5829. onig_get_encoding
  5830. onig_get_match_stack_limit_size
  5831. onig_get_options
  5832. onig_get_syntax
  5833. onig_init
  5834. onig_is_code_in_cc
  5835. onig_is_in_code_range
  5836. onig_match
  5837. onig_name_to_backref_number
  5838. onig_name_to_group_numbers
  5839. onig_names_free
  5840. onig_new
  5841. onig_node_conv_to_str_node
  5842. onig_node_free
  5843. onig_node_new_anchor
  5844. onig_node_new_effect
  5845. onig_node_new_list
  5846. onig_node_new_str
  5847. onig_node_str_cat
  5848. onig_node_str_clear
  5849. onig_null_warn
  5850. onig_number_of_capture_histories
  5851. onig_number_of_captures
  5852. onig_number_of_names
  5853. onig_parse_make_tree
  5854. onig_print_compiled_byte_code
  5855. onig_print_names
  5856. onig_print_statistics
  5857. onig_recompile
  5858. onig_reduce_nested_qualifier
  5859. onig_region_clear
  5860. onig_region_copy
  5861. onig_region_free
  5862. onig_region_init
  5863. onig_region_new
  5864. onig_region_resize
  5865. onig_region_resize_clear
  5866. onig_region_set
  5867. onig_renumber_name_table
  5868. onig_scan_env_set_error_string
  5869. onig_scan_unsigned_number
  5870. onig_search
  5871. onig_set_default_ambig_flag
  5872. onig_set_match_stack_limit_size
  5873. onig_set_verb_warn_func
  5874. onig_set_warn_func
  5875. onig_snprintf_with_pattern
  5876. onig_st_add_direct
  5877. onig_st_add_direct_strend
  5878. onig_st_cleanup_safe
  5879. onig_st_copy
  5880. onig_st_delete
  5881. onig_st_delete_safe
  5882. onig_st_foreach
  5883. onig_st_free_table
  5884. onig_st_init_numtable
  5885. onig_st_init_numtable_with_size
  5886. onig_st_init_strend_table_with_size
  5887. onig_st_init_strtable
  5888. onig_st_init_strtable_with_size
  5889. onig_st_init_table
  5890. onig_st_init_table_with_size
  5891. onig_st_insert
  5892. onig_st_insert_strend
  5893. onig_st_is_member
  5894. onig_st_lookup
  5895. onig_st_lookup_strend
  5896. onig_st_nothing_key_clone
  5897. onig_st_nothing_key_free
  5898. onig_stat_print
  5899. onig_statistics_init
  5900. onig_strncmp
  5901. onig_transfer
  5902. onigenc_always_false_is_allowed_reverse_match
  5903. onigenc_always_true_is_allowed_reverse_match
  5904. onigenc_ascii_get_all_pair_ambig_codes
  5905. onigenc_ascii_is_mbc_ambiguous
  5906. onigenc_ascii_mbc_to_normalize
  5907. onigenc_code_to_mbc
  5908. onigenc_ess_tsett_get_all_comp_ambig_codes
  5909. onigenc_get_default_encoding
  5910. onigenc_get_left_adjust_char_head
  5911. onigenc_get_prev_char_head
  5912. onigenc_get_right_adjust_char_head
  5913. onigenc_get_right_adjust_char_head_with_prev
  5914. onigenc_init
  5915. onigenc_is_allowed_reverse_match
  5916. onigenc_is_code_ctype
  5917. onigenc_is_mbc_ambiguous
  5918. onigenc_is_mbc_newline_0x0a
  5919. onigenc_iso_8859_1_get_all_pair_ambig_codes
  5920. onigenc_mb2_code_to_mbc
  5921. onigenc_mb2_code_to_mbc_first
  5922. onigenc_mb2_code_to_mbclen
  5923. onigenc_mb2_is_code_ctype
  5924. onigenc_mb4_code_to_mbc
  5925. onigenc_mb4_code_to_mbc_first
  5926. onigenc_mb4_code_to_mbclen
  5927. onigenc_mb4_is_code_ctype
  5928. onigenc_mbc_to_lower
  5929. onigenc_mbn_is_mbc_ambiguous
  5930. onigenc_mbn_mbc_to_code
  5931. onigenc_mbn_mbc_to_normalize
  5932. onigenc_not_support_get_ctype_code_range
  5933. onigenc_nothing_get_all_comp_ambig_codes
  5934. onigenc_set_default_caseconv_table
  5935. onigenc_set_default_encoding
  5936. onigenc_single_byte_code_to_mbc
  5937. onigenc_single_byte_code_to_mbc_first
  5938. onigenc_single_byte_code_to_mbclen
  5939. onigenc_single_byte_left_adjust_char_head
  5940. onigenc_single_byte_mbc_enc_len
  5941. onigenc_single_byte_mbc_to_code
  5942. onigenc_step
  5943. onigenc_step_back
  5944. onigenc_str_bytelen_null
  5945. onigenc_strlen
  5946. onigenc_strlen_null
  5947. onigenc_with_ascii_strncmp
  5948. op2arg_type
  5949. op2name
  5950. open
  5951. open_ifs_socket
  5952. open_mime
  5953. opendir
  5954. opt_W_getter
  5955. opt_i_get
  5956. opt_i_set
  5957. optimize_node_left
  5958. options
  5959. or_cclass
  5960. or_code_range_buf
  5961. os_each_obj
  5962. os_live_obj
  5963. os_obj_of
  5964. ossl_ASN1_TYPE_free
  5965. ossl_asn1_class2sym
  5966. ossl_asn1_decode
  5967. ossl_asn1_decode0
  5968. ossl_asn1_decode_all
  5969. ossl_asn1_default_tag
  5970. ossl_asn1_get_asn1type
  5971. ossl_asn1_get_tag
  5972. ossl_asn1_get_tag_class
  5973. ossl_asn1_get_tagging
  5974. ossl_asn1_get_value
  5975. ossl_asn1_info_t
  5976. ossl_asn1_initialize
  5977. ossl_asn1_is_explicit
  5978. ossl_asn1_set_tag
  5979. ossl_asn1_set_tag_class
  5980. ossl_asn1_set_tagging
  5981. ossl_asn1_set_value
  5982. ossl_asn1_tag
  5983. ossl_asn1_tag_class
  5984. ossl_asn1_traverse
  5985. ossl_asn1cons_each
  5986. ossl_asn1cons_to_der
  5987. ossl_asn1data_initialize
  5988. ossl_asn1data_to_der
  5989. ossl_asn1obj_get_ln
  5990. ossl_asn1obj_get_oid
  5991. ossl_asn1obj_get_sn
  5992. ossl_asn1obj_s_register
  5993. ossl_asn1prim_to_der
  5994. ossl_bn_alloc
  5995. ossl_bn_coerce
  5996. ossl_bn_copy
  5997. ossl_bn_div
  5998. ossl_bn_eql
  5999. ossl_bn_initialize
  6000. ossl_bn_is_bit_set
  6001. ossl_bn_is_prime
  6002. ossl_bn_is_prime_fasttest
  6003. ossl_bn_new
  6004. ossl_bn_s_generate_prime
  6005. ossl_bn_to_bn
  6006. ossl_bn_to_i
  6007. ossl_bn_to_s
  6008. ossl_buf2str
  6009. ossl_call_client_cert_cb
  6010. ossl_call_tmp_dh_callback
  6011. ossl_call_verify_cb_proc
  6012. ossl_cipher_alloc
  6013. ossl_cipher_copy
  6014. ossl_cipher_decrypt
  6015. ossl_cipher_encrypt
  6016. ossl_cipher_final
  6017. ossl_cipher_free
  6018. ossl_cipher_init
  6019. ossl_cipher_initialize
  6020. ossl_cipher_name
  6021. ossl_cipher_new
  6022. ossl_cipher_pkcs5_keyivgen
  6023. ossl_cipher_reset
  6024. ossl_cipher_set_iv
  6025. ossl_cipher_set_key
  6026. ossl_cipher_set_key_length
  6027. ossl_cipher_set_padding
  6028. ossl_cipher_update
  6029. ossl_client_cert_cb
  6030. ossl_config_add_value
  6031. ossl_config_copy
  6032. ossl_config_each
  6033. ossl_config_get_section
  6034. ossl_config_get_section_old
  6035. ossl_config_get_sections
  6036. ossl_config_get_value
  6037. ossl_config_get_value_old
  6038. ossl_config_initialize
  6039. ossl_config_inspect
  6040. ossl_config_s_alloc
  6041. ossl_config_s_parse
  6042. ossl_config_set_section
  6043. ossl_config_to_s
  6044. ossl_create_dh
  6045. ossl_debug
  6046. ossl_debug_get
  6047. ossl_debug_set
  6048. ossl_default_tmp_dh_callback
  6049. ossl_dh_check_params
  6050. ossl_dh_compute_key
  6051. ossl_dh_export
  6052. ossl_dh_generate_key
  6053. ossl_dh_get_params
  6054. ossl_dh_initialize
  6055. ossl_dh_is_private
  6056. ossl_dh_is_public
  6057. ossl_dh_new
  6058. ossl_dh_s_generate
  6059. ossl_dh_to_der
  6060. ossl_dh_to_public_key
  6061. ossl_dh_to_text
  6062. ossl_digest_alloc
  6063. ossl_digest_copy
  6064. ossl_digest_digest
  6065. ossl_digest_equal
  6066. ossl_digest_hexdigest
  6067. ossl_digest_initialize
  6068. ossl_digest_name
  6069. ossl_digest_new
  6070. ossl_digest_reset
  6071. ossl_digest_s_digest
  6072. ossl_digest_s_hexdigest
  6073. ossl_digest_size
  6074. ossl_digest_update
  6075. ossl_dsa_buf_size
  6076. ossl_dsa_export
  6077. ossl_dsa_get_params
  6078. ossl_dsa_initialize
  6079. ossl_dsa_is_private
  6080. ossl_dsa_is_public
  6081. ossl_dsa_new
  6082. ossl_dsa_s_generate
  6083. ossl_dsa_sign
  6084. ossl_dsa_to_der
  6085. ossl_dsa_to_public_key
  6086. ossl_dsa_to_text
  6087. ossl_dsa_verify
  6088. ossl_engine_cmd_flag_to_name
  6089. ossl_engine_ctrl_cmd
  6090. ossl_engine_finish
  6091. ossl_engine_get_cipher
  6092. ossl_engine_get_cmds
  6093. ossl_engine_get_digest
  6094. ossl_engine_get_id
  6095. ossl_engine_get_name
  6096. ossl_engine_inspect
  6097. ossl_engine_load_privkey
  6098. ossl_engine_load_pubkey
  6099. ossl_engine_s_alloc
  6100. ossl_engine_s_by_id
  6101. ossl_engine_s_cleanup
  6102. ossl_engine_s_engines
  6103. ossl_engine_s_load
  6104. ossl_engine_set_default
  6105. ossl_generate_cb
  6106. ossl_get_errors
  6107. ossl_hmac_alloc
  6108. ossl_hmac_copy
  6109. ossl_hmac_digest
  6110. ossl_hmac_free
  6111. ossl_hmac_hexdigest
  6112. ossl_hmac_initialize
  6113. ossl_hmac_s_digest
  6114. ossl_hmac_s_hexdigest
  6115. ossl_hmac_update
  6116. ossl_i2d_ASN1_TYPE
  6117. ossl_membio2str
  6118. ossl_membio2str0
  6119. ossl_obj2bio
  6120. ossl_ocspbres_add_nonce
  6121. ossl_ocspbres_add_status
  6122. ossl_ocspbres_alloc
  6123. ossl_ocspbres_copy_nonce
  6124. ossl_ocspbres_get_status
  6125. ossl_ocspbres_initialize
  6126. ossl_ocspbres_sign
  6127. ossl_ocspbres_verify
  6128. ossl_ocspcertid_new
  6129. ossl_ocspcid_alloc
  6130. ossl_ocspcid_cmp
  6131. ossl_ocspcid_cmp_issuer
  6132. ossl_ocspcid_get_serial
  6133. ossl_ocspcid_initialize
  6134. ossl_ocspreq_add_certid
  6135. ossl_ocspreq_add_nonce
  6136. ossl_ocspreq_alloc
  6137. ossl_ocspreq_check_nonce
  6138. ossl_ocspreq_get_certid
  6139. ossl_ocspreq_initialize
  6140. ossl_ocspreq_sign
  6141. ossl_ocspreq_to_der
  6142. ossl_ocspreq_verify
  6143. ossl_ocspres_alloc
  6144. ossl_ocspres_get_basic
  6145. ossl_ocspres_initialize
  6146. ossl_ocspres_s_create
  6147. ossl_ocspres_status
  6148. ossl_ocspres_status_string
  6149. ossl_ocspres_to_der
  6150. ossl_pem_passwd_cb
  6151. ossl_pem_passwd_cb0
  6152. ossl_pkcs12_get_ca_certs
  6153. ossl_pkcs12_get_cert
  6154. ossl_pkcs12_get_key
  6155. ossl_pkcs12_initialize
  6156. ossl_pkcs12_s_allocate
  6157. ossl_pkcs12_s_create
  6158. ossl_pkcs12_set_ca_certs
  6159. ossl_pkcs12_set_cert
  6160. ossl_pkcs12_set_key
  6161. ossl_pkcs12_to_der
  6162. ossl_pkcs7_add_certificate
  6163. ossl_pkcs7_add_crl
  6164. ossl_pkcs7_add_data
  6165. ossl_pkcs7_add_recipient
  6166. ossl_pkcs7_add_signer
  6167. ossl_pkcs7_alloc
  6168. ossl_pkcs7_copy
  6169. ossl_pkcs7_decrypt
  6170. ossl_pkcs7_detached_p
  6171. ossl_pkcs7_get_certificates
  6172. ossl_pkcs7_get_crls
  6173. ossl_pkcs7_get_data
  6174. ossl_pkcs7_get_detached
  6175. ossl_pkcs7_get_err_string
  6176. ossl_pkcs7_get_recipient
  6177. ossl_pkcs7_get_signer
  6178. ossl_pkcs7_get_type
  6179. ossl_pkcs7_initialize
  6180. ossl_pkcs7_s_encrypt
  6181. ossl_pkcs7_s_read_smime
  6182. ossl_pkcs7_s_sign
  6183. ossl_pkcs7_s_write_smime
  6184. ossl_pkcs7_set_certificates
  6185. ossl_pkcs7_set_certs_i
  6186. ossl_pkcs7_set_cipher
  6187. ossl_pkcs7_set_crls
  6188. ossl_pkcs7_set_crls_i
  6189. ossl_pkcs7_set_data
  6190. ossl_pkcs7_set_detached
  6191. ossl_pkcs7_set_err_string
  6192. ossl_pkcs7_set_type
  6193. ossl_pkcs7_sym2typeid
  6194. ossl_pkcs7_to_der
  6195. ossl_pkcs7_to_pem
  6196. ossl_pkcs7_verify
  6197. ossl_pkcs7ri_alloc
  6198. ossl_pkcs7ri_get_enc_key
  6199. ossl_pkcs7ri_get_issuer
  6200. ossl_pkcs7ri_get_serial
  6201. ossl_pkcs7ri_initialize
  6202. ossl_pkcs7ri_new
  6203. ossl_pkcs7si_alloc
  6204. ossl_pkcs7si_get_issuer
  6205. ossl_pkcs7si_get_serial
  6206. ossl_pkcs7si_get_signed_time
  6207. ossl_pkcs7si_initialize
  6208. ossl_pkcs7si_new
  6209. ossl_pkey_alloc
  6210. ossl_pkey_initialize
  6211. ossl_pkey_new
  6212. ossl_pkey_new_from_file
  6213. ossl_pkey_sign
  6214. ossl_pkey_verify
  6215. ossl_protect_membio2str
  6216. ossl_protect_obj2bio
  6217. ossl_raise
  6218. ossl_rand_bytes
  6219. ossl_rand_egd
  6220. ossl_rand_egd_bytes
  6221. ossl_rand_load_file
  6222. ossl_rand_pseudo_bytes
  6223. ossl_rand_seed
  6224. ossl_rand_write_file
  6225. ossl_rsa_buf_size
  6226. ossl_rsa_export
  6227. ossl_rsa_get_params
  6228. ossl_rsa_initialize
  6229. ossl_rsa_is_private
  6230. ossl_rsa_is_public
  6231. ossl_rsa_new
  6232. ossl_rsa_private_decrypt
  6233. ossl_rsa_private_encrypt
  6234. ossl_rsa_public_decrypt
  6235. ossl_rsa_public_encrypt
  6236. ossl_rsa_s_generate
  6237. ossl_rsa_to_der
  6238. ossl_rsa_to_public_key
  6239. ossl_rsa_to_text
  6240. ossl_spki_alloc
  6241. ossl_spki_get_challenge
  6242. ossl_spki_get_public_key
  6243. ossl_spki_initialize
  6244. ossl_spki_print
  6245. ossl_spki_set_challenge
  6246. ossl_spki_set_public_key
  6247. ossl_spki_sign
  6248. ossl_spki_to_der
  6249. ossl_spki_to_pem
  6250. ossl_spki_verify
  6251. ossl_ssl_accept
  6252. ossl_ssl_cipher_to_ary
  6253. ossl_ssl_close
  6254. ossl_ssl_connect
  6255. ossl_ssl_def_const
  6256. ossl_ssl_free
  6257. ossl_ssl_get_cert
  6258. ossl_ssl_get_cipher
  6259. ossl_ssl_get_ctx
  6260. ossl_ssl_get_io
  6261. ossl_ssl_get_key
  6262. ossl_ssl_get_peer_cert
  6263. ossl_ssl_get_peer_cert_chain
  6264. ossl_ssl_get_state
  6265. ossl_ssl_get_sync_close
  6266. ossl_ssl_get_tmp_dh
  6267. ossl_ssl_get_x509
  6268. ossl_ssl_initialize
  6269. ossl_ssl_pending
  6270. ossl_ssl_read
  6271. ossl_ssl_s_alloc
  6272. ossl_ssl_set_ctx
  6273. ossl_ssl_set_io
  6274. ossl_ssl_set_key
  6275. ossl_ssl_set_sync_close
  6276. ossl_ssl_set_tmp_dh
  6277. ossl_ssl_set_x509
  6278. ossl_ssl_setup
  6279. ossl_ssl_shutdown
  6280. ossl_ssl_verify_callback
  6281. ossl_ssl_write
  6282. ossl_sslctx_add_extra_chain_cert_i
  6283. ossl_sslctx_free
  6284. ossl_sslctx_get_ca_file
  6285. ossl_sslctx_get_ca_path
  6286. ossl_sslctx_get_cert
  6287. ossl_sslctx_get_cert_store
  6288. ossl_sslctx_get_ciphers
  6289. ossl_sslctx_get_client_ca
  6290. ossl_sslctx_get_client_cert_cb
  6291. ossl_sslctx_get_extra_cert
  6292. ossl_sslctx_get_key
  6293. ossl_sslctx_get_options
  6294. ossl_sslctx_get_sess_id_ctx
  6295. ossl_sslctx_get_timeout
  6296. ossl_sslctx_get_tmp_dh_cb
  6297. ossl_sslctx_get_verify_cb
  6298. ossl_sslctx_get_verify_dep
  6299. ossl_sslctx_get_verify_mode
  6300. ossl_sslctx_initialize
  6301. ossl_sslctx_s_alloc
  6302. ossl_sslctx_set_ca_file
  6303. ossl_sslctx_set_ca_path
  6304. ossl_sslctx_set_cert
  6305. ossl_sslctx_set_cert_store
  6306. ossl_sslctx_set_ciphers
  6307. ossl_sslctx_set_client_ca
  6308. ossl_sslctx_set_client_cert_cb
  6309. ossl_sslctx_set_extra_cert
  6310. ossl_sslctx_set_key
  6311. ossl_sslctx_set_options
  6312. ossl_sslctx_set_sess_id_ctx
  6313. ossl_sslctx_set_timeout
  6314. ossl_sslctx_set_tmp_dh_cb
  6315. ossl_sslctx_set_verify_cb
  6316. ossl_sslctx_set_verify_dep
  6317. ossl_sslctx_set_verify_mode
  6318. ossl_sslctx_setup
  6319. ossl_start_ssl
  6320. ossl_str_adjust
  6321. ossl_tmp_dh_callback
  6322. ossl_to_der
  6323. ossl_to_der_if_possible
  6324. ossl_verify_cb
  6325. ossl_x509_add_extension
  6326. ossl_x509_alloc
  6327. ossl_x509_check_private_key
  6328. ossl_x509_copy
  6329. ossl_x509_get_extensions
  6330. ossl_x509_get_issuer
  6331. ossl_x509_get_not_after
  6332. ossl_x509_get_not_before
  6333. ossl_x509_get_public_key
  6334. ossl_x509_get_serial
  6335. ossl_x509_get_signature_algorithm
  6336. ossl_x509_get_subject
  6337. ossl_x509_get_version
  6338. ossl_x509_initialize
  6339. ossl_x509_inspect
  6340. ossl_x509_new
  6341. ossl_x509_new_from_file
  6342. ossl_x509_set_extensions
  6343. ossl_x509_set_issuer
  6344. ossl_x509_set_not_after
  6345. ossl_x509_set_not_before
  6346. ossl_x509_set_public_key
  6347. ossl_x509_set_serial
  6348. ossl_x509_set_subject
  6349. ossl_x509_set_version
  6350. ossl_x509_sign
  6351. ossl_x509_to_der
  6352. ossl_x509_to_pem
  6353. ossl_x509_to_req
  6354. ossl_x509_to_text
  6355. ossl_x509_verify
  6356. ossl_x509attr_alloc
  6357. ossl_x509attr_get_oid
  6358. ossl_x509attr_get_value
  6359. ossl_x509attr_initialize
  6360. ossl_x509attr_new
  6361. ossl_x509attr_set_oid
  6362. ossl_x509attr_set_value
  6363. ossl_x509attr_to_der
  6364. ossl_x509crl_add_extension
  6365. ossl_x509crl_add_revoked
  6366. ossl_x509crl_alloc
  6367. ossl_x509crl_copy
  6368. ossl_x509crl_get_extensions
  6369. ossl_x509crl_get_issuer
  6370. ossl_x509crl_get_last_update
  6371. ossl_x509crl_get_next_update
  6372. ossl_x509crl_get_revoked
  6373. ossl_x509crl_get_signature_algorithm
  6374. ossl_x509crl_get_version
  6375. ossl_x509crl_initialize
  6376. ossl_x509crl_new
  6377. ossl_x509crl_set_extensions
  6378. ossl_x509crl_set_issuer
  6379. ossl_x509crl_set_last_update
  6380. ossl_x509crl_set_next_update
  6381. ossl_x509crl_set_revoked
  6382. ossl_x509crl_set_version
  6383. ossl_x509crl_sign
  6384. ossl_x509crl_to_der
  6385. ossl_x509crl_to_pem
  6386. ossl_x509crl_to_text
  6387. ossl_x509crl_verify
  6388. ossl_x509ext_alloc
  6389. ossl_x509ext_get_critical
  6390. ossl_x509ext_get_oid
  6391. ossl_x509ext_get_value
  6392. ossl_x509ext_initialize
  6393. ossl_x509ext_new
  6394. ossl_x509ext_set_critical
  6395. ossl_x509ext_set_oid
  6396. ossl_x509ext_set_value
  6397. ossl_x509ext_to_der
  6398. ossl_x509extfactory_alloc
  6399. ossl_x509extfactory_create_ext
  6400. ossl_x509extfactory_free
  6401. ossl_x509extfactory_initialize
  6402. ossl_x509extfactory_set_config
  6403. ossl_x509extfactory_set_crl
  6404. ossl_x509extfactory_set_issuer_cert
  6405. ossl_x509extfactory_set_subject_cert
  6406. ossl_x509extfactory_set_subject_req
  6407. ossl_x509name_add_entry
  6408. ossl_x509name_alloc
  6409. ossl_x509name_cmp
  6410. ossl_x509name_cmp0
  6411. ossl_x509name_eql
  6412. ossl_x509name_hash
  6413. ossl_x509name_init_i
  6414. ossl_x509name_initialize
  6415. ossl_x509name_new
  6416. ossl_x509name_to_a
  6417. ossl_x509name_to_der
  6418. ossl_x509name_to_s
  6419. ossl_x509name_to_s_old
  6420. ossl_x509req_add_attribute
  6421. ossl_x509req_alloc
  6422. ossl_x509req_copy
  6423. ossl_x509req_get_attributes
  6424. ossl_x509req_get_public_key
  6425. ossl_x509req_get_signature_algorithm
  6426. ossl_x509req_get_subject
  6427. ossl_x509req_get_version
  6428. ossl_x509req_initialize
  6429. ossl_x509req_new
  6430. ossl_x509req_set_attributes
  6431. ossl_x509req_set_public_key
  6432. ossl_x509req_set_subject
  6433. ossl_x509req_set_version
  6434. ossl_x509req_sign
  6435. ossl_x509req_to_der
  6436. ossl_x509req_to_pem
  6437. ossl_x509req_to_text
  6438. ossl_x509req_to_x509
  6439. ossl_x509req_verify
  6440. ossl_x509revoked_add_extension
  6441. ossl_x509revoked_alloc
  6442. ossl_x509revoked_get_extensions
  6443. ossl_x509revoked_get_serial
  6444. ossl_x509revoked_get_time
  6445. ossl_x509revoked_initialize
  6446. ossl_x509revoked_new
  6447. ossl_x509revoked_set_extensions
  6448. ossl_x509revoked_set_serial
  6449. ossl_x509revoked_set_time
  6450. ossl_x509stctx_alloc
  6451. ossl_x509stctx_cleanup
  6452. ossl_x509stctx_clear_ptr
  6453. ossl_x509stctx_free
  6454. ossl_x509stctx_get_chain
  6455. ossl_x509stctx_get_curr_cert
  6456. ossl_x509stctx_get_curr_crl
  6457. ossl_x509stctx_get_err
  6458. ossl_x509stctx_get_err_depth
  6459. ossl_x509stctx_get_err_string
  6460. ossl_x509stctx_initialize
  6461. ossl_x509stctx_new
  6462. ossl_x509stctx_set_error
  6463. ossl_x509stctx_set_flags
  6464. ossl_x509stctx_set_purpose
  6465. ossl_x509stctx_set_time
  6466. ossl_x509stctx_set_trust
  6467. ossl_x509stctx_verify
  6468. ossl_x509store_add_cert
  6469. ossl_x509store_add_crl
  6470. ossl_x509store_add_file
  6471. ossl_x509store_add_path
  6472. ossl_x509store_alloc
  6473. ossl_x509store_initialize
  6474. ossl_x509store_new
  6475. ossl_x509store_set_default_paths
  6476. ossl_x509store_set_flags
  6477. ossl_x509store_set_purpose
  6478. ossl_x509store_set_time
  6479. ossl_x509store_set_trust
  6480. ossl_x509store_set_vfy_cb
  6481. ossl_x509store_verify
  6482. p_gamma
  6483. p_gid_change_privilege
  6484. p_gid_exchange
  6485. p_gid_exchangeable
  6486. p_gid_grant_privilege
  6487. p_gid_have_saved_id
  6488. p_gid_sw_ensure
  6489. p_gid_switch
  6490. p_len_string
  6491. p_string
  6492. p_sys_issetugid
  6493. p_sys_setegid
  6494. p_sys_seteuid
  6495. p_sys_setgid
  6496. p_sys_setregid
  6497. p_sys_setresgid
  6498. p_sys_setresuid
  6499. p_sys_setreuid
  6500. p_sys_setrgid
  6501. p_sys_setruid
  6502. p_sys_setuid
  6503. p_uid_change_privilege
  6504. p_uid_exchange
  6505. p_uid_exchangeable
  6506. p_uid_grant_privilege
  6507. p_uid_have_saved_id
  6508. p_uid_sw_ensure
  6509. p_uid_switch
  6510. pack_pack
  6511. pack_unpack
  6512. params
  6513. paren_nest
  6514. parse_branch
  6515. parse_char_class
  6516. parse_char_property
  6517. parse_config
  6518. parse_ctype_to_enc_ctype
  6519. parse_effect
  6520. parse_exp
  6521. parse_main
  6522. parse_posix_bracket
  6523. parse_regexp
  6524. parse_string
  6525. parse_subexp
  6526. parser
  6527. parser_free
  6528. parser_here_document
  6529. parser_heredoc_identifier
  6530. parser_heredoc_restore
  6531. parser_initialize
  6532. parser_mark
  6533. parser_new
  6534. parser_newtok
  6535. parser_nextc
  6536. parser_parse_string
  6537. parser_pragma
  6538. parser_prepare
  6539. parser_pushback
  6540. parser_read_escape
  6541. parser_regx_options
  6542. parser_tokadd
  6543. parser_tokadd_escape
  6544. parser_tokadd_string
  6545. parser_warn
  6546. parser_warning
  6547. parser_whole_match_p
  6548. parser_yyerror
  6549. parser_yylex
  6550. partition_i
  6551. passwd_ensure
  6552. passwd_iterate
  6553. path2class
  6554. path2module
  6555. path_check_0
  6556. path_tainted_p
  6557. pause
  6558. peek
  6559. pending_exception_check0
  6560. pending_exception_check1
  6561. permute
  6562. pipe
  6563. pipe_add_fptr
  6564. pipe_atexit
  6565. pipe_del_fptr
  6566. pipe_finalize
  6567. pipe_open
  6568. pkcs7_get_certs_or_crls
  6569. pointer
  6570. poll_child_status
  6571. pop_thread_anchor
  6572. popen_exec
  6573. popen_redirect
  6574. popular_qualifier_num
  6575. port_str
  6576. posix_nativethread_signal
  6577. posix_regmatch_t
  6578. posix_signal
  6579. postmatch_getter
  6580. pragma_encoding
  6581. pragma_marker
  6582. prec_included
  6583. prec_induced_from
  6584. prec_prec
  6585. prec_prec_f
  6586. prec_prec_i
  6587. prematch_getter
  6588. prep_io
  6589. prep_stdio
  6590. prep_window
  6591. preserving_errno
  6592. print_anchor
  6593. print_compiled_byte_code_list
  6594. print_distance_range
  6595. print_guessed_code
  6596. print_indent_tree
  6597. print_optimize_info
  6598. print_tree
  6599. print_undef
  6600. proc_alloc
  6601. proc_arity
  6602. proc_binding
  6603. proc_call
  6604. proc_clone
  6605. proc_daemon
  6606. proc_detach
  6607. proc_dup
  6608. proc_eq
  6609. proc_exec_v
  6610. proc_get_safe_level
  6611. proc_getegid
  6612. proc_geteuid
  6613. proc_getgid
  6614. proc_getgroups
  6615. proc_getmaxgroups
  6616. proc_getpgid
  6617. proc_getpgrp
  6618. proc_getpriority
  6619. proc_getrlimit
  6620. proc_getuid
  6621. proc_hash
  6622. proc_initgroups
  6623. proc_invoke
  6624. proc_jump_error
  6625. proc_lambda
  6626. proc_options
  6627. proc_s_new
  6628. proc_safe_level_p
  6629. proc_save_safe_level
  6630. proc_set_safe_level
  6631. proc_setegid
  6632. proc_seteuid
  6633. proc_setgid
  6634. proc_setgroups
  6635. proc_setmaxgroups
  6636. proc_setpgid
  6637. proc_setpgrp
  6638. proc_setpriority
  6639. proc_setrlimit
  6640. proc_setsid
  6641. proc_setuid
  6642. proc_spawn
  6643. proc_spawn_n
  6644. proc_spawn_v
  6645. proc_syswait
  6646. proc_to_s
  6647. proc_to_self
  6648. proc_wait
  6649. proc_wait2
  6650. proc_waitall
  6651. process_sflag
  6652. property_name_to_ctype
  6653. proto
  6654. prtab
  6655. pst_bitand
  6656. pst_equal
  6657. pst_inspect
  6658. pst_pid
  6659. pst_rshift
  6660. pst_success_p
  6661. pst_to_i
  6662. pst_to_s
  6663. pst_wcoredump
  6664. pst_wexitstatus
  6665. pst_wifexited
  6666. pst_wifsignaled
  6667. pst_wifstopped
  6668. pst_wstopsig
  6669. pst_wtermsig
  6670. ptrdiff_t
  6671. pty_exec
  6672. pty_finalize_syswait
  6673. pty_getpty
  6674. pty_protect
  6675. pty_reset_signal
  6676. pty_syswait
  6677. push_element
  6678. push_glob
  6679. push_hold_buf
  6680. push_kv
  6681. push_kv_enc
  6682. push_pattern
  6683. push_thread_anchor
  6684. pushback
  6685. putc
  6686. putchar
  6687. putpair
  6688. q_gamma
  6689. qpencode
  6690. quad_t
  6691. qualifiers_memory_node_info
  6692. r_byte
  6693. r_bytes
  6694. r_bytes0
  6695. r_entry
  6696. r_ivar
  6697. r_le
  6698. r_long
  6699. r_lt
  6700. r_object
  6701. r_object0
  6702. r_string
  6703. r_symbol
  6704. r_symlink
  6705. r_symreal
  6706. r_unique
  6707. racc_cparse
  6708. racc_yyparse
  6709. raise
  6710. raise_from_wait
  6711. raise_socket_error
  6712. raise_zlib_error
  6713. rand_init
  6714. random_seed
  6715. range_check
  6716. range_cover
  6717. range_each
  6718. range_each_func
  6719. range_eq
  6720. range_eql
  6721. range_exclude_end_p
  6722. range_failed
  6723. range_first
  6724. range_hash
  6725. range_include
  6726. range_init
  6727. range_initialize
  6728. range_inspect
  6729. range_last
  6730. range_max
  6731. range_min
  6732. range_op
  6733. range_step
  6734. range_to_s
  6735. rb_Array
  6736. rb_Float
  6737. rb_Integer
  6738. rb_String
  6739. rb_add_event_hook
  6740. rb_add_method
  6741. rb_alias
  6742. rb_alias_variable
  6743. rb_any_cmp
  6744. rb_any_hash
  6745. rb_any_to_s
  6746. rb_apply
  6747. rb_aref
  6748. rb_ary_and
  6749. rb_ary_aref
  6750. rb_ary_aset
  6751. rb_ary_assoc
  6752. rb_ary_at
  6753. rb_ary_clear
  6754. rb_ary_cmp
  6755. rb_ary_collect
  6756. rb_ary_collect_bang
  6757. rb_ary_compact
  6758. rb_ary_compact_bang
  6759. rb_ary_concat
  6760. rb_ary_delete
  6761. rb_ary_delete_at
  6762. rb_ary_delete_at_m
  6763. rb_ary_delete_if
  6764. rb_ary_diff
  6765. rb_ary_dup
  6766. rb_ary_each
  6767. rb_ary_each_index
  6768. rb_ary_elt
  6769. rb_ary_empty_p
  6770. rb_ary_entry
  6771. rb_ary_eql
  6772. rb_ary_equal
  6773. rb_ary_fetch
  6774. rb_ary_fill
  6775. rb_ary_first
  6776. rb_ary_flatten
  6777. rb_ary_flatten_bang
  6778. rb_ary_freeze
  6779. rb_ary_from_values
  6780. rb_ary_frozen_p
  6781. rb_ary_hash
  6782. rb_ary_includes
  6783. rb_ary_index
  6784. rb_ary_initialize
  6785. rb_ary_insert
  6786. rb_ary_inspect
  6787. rb_ary_join
  6788. rb_ary_join_m
  6789. rb_ary_last
  6790. rb_ary_length
  6791. rb_ary_modify
  6792. rb_ary_modify_check
  6793. rb_ary_new
  6794. rb_ary_new2
  6795. rb_ary_new3
  6796. rb_ary_new4
  6797. rb_ary_nitems
  6798. rb_ary_or
  6799. rb_ary_plus
  6800. rb_ary_pop
  6801. rb_ary_pop_m
  6802. rb_ary_push
  6803. rb_ary_push_m
  6804. rb_ary_rassoc
  6805. rb_ary_reject
  6806. rb_ary_reject_bang
  6807. rb_ary_replace
  6808. rb_ary_reverse
  6809. rb_ary_reverse_bang
  6810. rb_ary_reverse_each
  6811. rb_ary_reverse_m
  6812. rb_ary_rindex
  6813. rb_ary_s_create
  6814. rb_ary_select
  6815. rb_ary_shift
  6816. rb_ary_shift_m
  6817. rb_ary_slice_bang
  6818. rb_ary_sort
  6819. rb_ary_sort_bang
  6820. rb_ary_splice
  6821. rb_ary_store
  6822. rb_ary_subseq
  6823. rb_ary_times
  6824. rb_ary_to_a
  6825. rb_ary_to_ary
  6826. rb_ary_to_ary_m
  6827. rb_ary_to_s
  6828. rb_ary_transpose
  6829. rb_ary_uniq
  6830. rb_ary_uniq_bang
  6831. rb_ary_unshift
  6832. rb_ary_unshift_m
  6833. rb_ary_values_at
  6834. rb_ary_zip
  6835. rb_assoc_new
  6836. rb_atomic_t
  6837. rb_attr
  6838. rb_attr_get
  6839. rb_autoload
  6840. rb_autoload_load
  6841. rb_autoload_p
  6842. rb_backref_error
  6843. rb_backref_get
  6844. rb_backref_set
  6845. rb_backtrace
  6846. rb_big2dbl
  6847. rb_big2int
  6848. rb_big2ll
  6849. rb_big2long
  6850. rb_big2str
  6851. rb_big2uint
  6852. rb_big2ull
  6853. rb_big2ulong
  6854. rb_big2ulong_pack
  6855. rb_big_2comp
  6856. rb_big_abs
  6857. rb_big_and
  6858. rb_big_aref
  6859. rb_big_clone
  6860. rb_big_cmp
  6861. rb_big_coerce
  6862. rb_big_div
  6863. rb_big_divmod
  6864. rb_big_eq
  6865. rb_big_eql
  6866. rb_big_hash
  6867. rb_big_lshift
  6868. rb_big_minus
  6869. rb_big_modulo
  6870. rb_big_mul
  6871. rb_big_mul0
  6872. rb_big_neg
  6873. rb_big_norm
  6874. rb_big_or
  6875. rb_big_plus
  6876. rb_big_pow
  6877. rb_big_quo
  6878. rb_big_remainder
  6879. rb_big_rshift
  6880. rb_big_size
  6881. rb_big_to_f
  6882. rb_big_to_s
  6883. rb_big_uminus
  6884. rb_big_xor
  6885. rb_block_given_p
  6886. rb_block_pass
  6887. rb_block_proc
  6888. rb_bug
  6889. rb_call
  6890. rb_call0
  6891. rb_call_inits
  6892. rb_call_super
  6893. rb_callcc
  6894. rb_catch
  6895. rb_check_argv
  6896. rb_check_array_type
  6897. rb_check_convert_type
  6898. rb_check_frozen
  6899. rb_check_inheritable
  6900. rb_check_safe_obj
  6901. rb_check_safe_str
  6902. rb_check_string_type
  6903. rb_check_to_integer
  6904. rb_check_type
  6905. rb_class2name
  6906. rb_class_allocate_instance
  6907. rb_class_boot
  6908. rb_class_inherited
  6909. rb_class_inherited_p
  6910. rb_class_init_copy
  6911. rb_class_initialize
  6912. rb_class_instance_methods
  6913. rb_class_name
  6914. rb_class_new
  6915. rb_class_new_instance
  6916. rb_class_path
  6917. rb_class_private_instance_methods
  6918. rb_class_protected_instance_methods
  6919. rb_class_public_instance_methods
  6920. rb_class_real
  6921. rb_class_s_alloc
  6922. rb_class_superclass
  6923. rb_clear_cache
  6924. rb_clear_cache_by_class
  6925. rb_clear_cache_by_id
  6926. rb_clear_cache_for_undef
  6927. rb_cmperr
  6928. rb_cmpint
  6929. rb_compile_cstr
  6930. rb_compile_error
  6931. rb_compile_error_append
  6932. rb_compile_file
  6933. rb_compile_string
  6934. rb_const_defined
  6935. rb_const_defined_0
  6936. rb_const_defined_at
  6937. rb_const_defined_from
  6938. rb_const_get
  6939. rb_const_get_0
  6940. rb_const_get_at
  6941. rb_const_get_from
  6942. rb_const_list
  6943. rb_const_set
  6944. rb_cont_call
  6945. rb_convert_type
  6946. rb_copy_generic_ivar
  6947. rb_cstr2inum
  6948. rb_cstr_to_dbl
  6949. rb_cstr_to_inum
  6950. rb_curses_define_const
  6951. rb_cv_get
  6952. rb_cv_set
  6953. rb_cvar_defined
  6954. rb_cvar_get
  6955. rb_cvar_set
  6956. rb_data_object_alloc
  6957. rb_dbl2big
  6958. rb_dbl_cmp
  6959. rb_define_alias
  6960. rb_define_alloc_func
  6961. rb_define_attr
  6962. rb_define_class
  6963. rb_define_class_id
  6964. rb_define_class_under
  6965. rb_define_class_variable
  6966. rb_define_const
  6967. rb_define_copy_func
  6968. rb_define_global_const
  6969. rb_define_global_function
  6970. rb_define_hooked_variable
  6971. rb_define_method
  6972. rb_define_method_id
  6973. rb_define_module
  6974. rb_define_module_function
  6975. rb_define_module_id
  6976. rb_define_module_under
  6977. rb_define_private_method
  6978. rb_define_protected_method
  6979. rb_define_readonly_variable
  6980. rb_define_singleton_method
  6981. rb_define_syslog_const
  6982. rb_define_syslog_shortcut
  6983. rb_define_variable
  6984. rb_define_virtual_variable
  6985. rb_deflate_addstr
  6986. rb_deflate_deflate
  6987. rb_deflate_flush
  6988. rb_deflate_init_copy
  6989. rb_deflate_initialize
  6990. rb_deflate_params
  6991. rb_deflate_s_allocate
  6992. rb_deflate_s_deflate
  6993. rb_deflate_set_dictionary
  6994. rb_defout
  6995. rb_detach_process
  6996. rb_digest_base_alloc
  6997. rb_digest_base_copy
  6998. rb_digest_base_digest
  6999. rb_digest_base_equal
  7000. rb_digest_base_hexdigest
  7001. rb_digest_base_init
  7002. rb_digest_base_s_digest
  7003. rb_digest_base_s_hexdigest
  7004. rb_digest_base_update
  7005. rb_disable_super
  7006. rb_dl_dlopen
  7007. rb_dl_free
  7008. rb_dl_get_last_error
  7009. rb_dl_get_win32_last_error
  7010. rb_dl_malloc
  7011. rb_dl_ptr2value
  7012. rb_dl_realloc
  7013. rb_dl_set_last_error
  7014. rb_dl_set_win32_last_error
  7015. rb_dl_value2ptr
  7016. rb_dlcfunc2ptr
  7017. rb_dlcfunc_call
  7018. rb_dlcfunc_calltype
  7019. rb_dlcfunc_ctype
  7020. rb_dlcfunc_initialize
  7021. rb_dlcfunc_inspect
  7022. rb_dlcfunc_name
  7023. rb_dlcfunc_new
  7024. rb_dlcfunc_ptr
  7025. rb_dlcfunc_s_allocate
  7026. rb_dlcfunc_set_calltype
  7027. rb_dlcfunc_set_ctype
  7028. rb_dlcfunc_set_ptr
  7029. rb_dlcfunc_to_i
  7030. rb_dlhandle_close
  7031. rb_dlhandle_disable_close
  7032. rb_dlhandle_enable_close
  7033. rb_dlhandle_initialize
  7034. rb_dlhandle_s_allocate
  7035. rb_dlhandle_sym
  7036. rb_dlhandle_to_i
  7037. rb_dlptr2cptr
  7038. rb_dlptr_aref
  7039. rb_dlptr_aset
  7040. rb_dlptr_cmp
  7041. rb_dlptr_eql
  7042. rb_dlptr_free_get
  7043. rb_dlptr_free_set
  7044. rb_dlptr_initialize
  7045. rb_dlptr_inspect
  7046. rb_dlptr_malloc
  7047. rb_dlptr_minus
  7048. rb_dlptr_new
  7049. rb_dlptr_new2
  7050. rb_dlptr_null_p
  7051. rb_dlptr_plus
  7052. rb_dlptr_ptr
  7053. rb_dlptr_ref
  7054. rb_dlptr_s_allocate
  7055. rb_dlptr_s_malloc
  7056. rb_dlptr_s_to_ptr
  7057. rb_dlptr_size
  7058. rb_dlptr_to_i
  7059. rb_dlptr_to_s
  7060. rb_dlptr_to_str
  7061. rb_dlptr_to_value
  7062. rb_dvar_curr
  7063. rb_dvar_defined
  7064. rb_dvar_push
  7065. rb_dvar_ref
  7066. rb_each
  7067. rb_enable_super
  7068. rb_ensure
  7069. rb_enumeratorize
  7070. rb_env_path_tainted
  7071. rb_eof_error
  7072. rb_eql
  7073. rb_equal
  7074. rb_error_frozen
  7075. rb_eval
  7076. rb_eval_cmd
  7077. rb_eval_string
  7078. rb_eval_string_protect
  7079. rb_eval_string_wrap
  7080. rb_event_hook_t
  7081. rb_event_t
  7082. rb_exc_fatal
  7083. rb_exc_new
  7084. rb_exc_new2
  7085. rb_exc_new3
  7086. rb_exc_raise
  7087. rb_exec
  7088. rb_exec_end_proc
  7089. rb_exec_recursive
  7090. rb_exit
  7091. rb_export_method
  7092. rb_extend_object
  7093. rb_f_END
  7094. rb_f_abort
  7095. rb_f_array
  7096. rb_f_at_exit
  7097. rb_f_autoload
  7098. rb_f_autoload_p
  7099. rb_f_backquote
  7100. rb_f_binding
  7101. rb_f_block_given_p
  7102. rb_f_caller
  7103. rb_f_catch
  7104. rb_f_eval
  7105. rb_f_exec
  7106. rb_f_exit
  7107. rb_f_exit_bang
  7108. rb_f_float
  7109. rb_f_fork
  7110. rb_f_funcall
  7111. rb_f_getc
  7112. rb_f_getenv
  7113. rb_f_gets
  7114. rb_f_global_variables
  7115. rb_f_integer
  7116. rb_f_kill
  7117. rb_f_lambda
  7118. rb_f_load
  7119. rb_f_local_variables
  7120. rb_f_loop
  7121. rb_f_open
  7122. rb_f_p
  7123. rb_f_print
  7124. rb_f_printf
  7125. rb_f_putc
  7126. rb_f_puts
  7127. rb_f_raise
  7128. rb_f_rand
  7129. rb_f_readline
  7130. rb_f_readlines
  7131. rb_f_require
  7132. rb_f_select
  7133. rb_f_send
  7134. rb_f_sleep
  7135. rb_f_spawn
  7136. rb_f_sprintf
  7137. rb_f_srand
  7138. rb_f_string
  7139. rb_f_syscall
  7140. rb_f_system
  7141. rb_f_test
  7142. rb_f_throw
  7143. rb_f_trace_var
  7144. rb_f_untrace_var
  7145. rb_false
  7146. rb_fatal
  7147. rb_fd_clr
  7148. rb_fd_copy
  7149. rb_fd_init
  7150. rb_fd_isset
  7151. rb_fd_max
  7152. rb_fd_ptr
  7153. rb_fd_resize
  7154. rb_fd_select
  7155. rb_fd_set
  7156. rb_fd_term
  7157. rb_fd_zero
  7158. rb_fdopen
  7159. rb_fdset_t
  7160. rb_feature_p
  7161. rb_file_atime
  7162. rb_file_chmod
  7163. rb_file_chown
  7164. rb_file_const
  7165. rb_file_ctime
  7166. rb_file_expand_path
  7167. rb_file_flock
  7168. rb_file_ftype
  7169. rb_file_initialize
  7170. rb_file_join
  7171. rb_file_lstat
  7172. rb_file_mtime
  7173. rb_file_open
  7174. rb_file_open_internal
  7175. rb_file_path
  7176. rb_file_s_atime
  7177. rb_file_s_basename
  7178. rb_file_s_chmod
  7179. rb_file_s_chown
  7180. rb_file_s_ctime
  7181. rb_file_s_dirname
  7182. rb_file_s_expand_path
  7183. rb_file_s_extname
  7184. rb_file_s_ftype
  7185. rb_file_s_join
  7186. rb_file_s_lchmod
  7187. rb_file_s_lchown
  7188. rb_file_s_link
  7189. rb_file_s_lstat
  7190. rb_file_s_mtime
  7191. rb_file_s_path
  7192. rb_file_s_readlink
  7193. rb_file_s_rename
  7194. rb_file_s_size
  7195. rb_file_s_split
  7196. rb_file_s_stat
  7197. rb_file_s_symlink
  7198. rb_file_s_truncate
  7199. rb_file_s_umask
  7200. rb_file_s_unlink
  7201. rb_file_s_utime
  7202. rb_file_sysopen
  7203. rb_file_sysopen_internal
  7204. rb_file_truncate
  7205. rb_find_file
  7206. rb_find_file_ext
  7207. rb_fix2int
  7208. rb_fix2str
  7209. rb_fix2uint
  7210. rb_fix_induced_from
  7211. rb_fix_new
  7212. rb_flo_induced_from
  7213. rb_float_new
  7214. rb_fopen
  7215. rb_fork
  7216. rb_frame_this_func
  7217. rb_free_generic_ivar
  7218. rb_frozen_class_p
  7219. rb_funcall
  7220. rb_funcall2
  7221. rb_funcall3
  7222. rb_gc
  7223. rb_gc_abort_threads
  7224. rb_gc_call_finalizer_at_exit
  7225. rb_gc_copy_finalizer
  7226. rb_gc_disable
  7227. rb_gc_enable
  7228. rb_gc_finalize_deferred
  7229. rb_gc_force_recycle
  7230. rb_gc_mark
  7231. rb_gc_mark_frame
  7232. rb_gc_mark_global_tbl
  7233. rb_gc_mark_locations
  7234. rb_gc_mark_maybe
  7235. rb_gc_mark_parser
  7236. rb_gc_mark_threads
  7237. rb_gc_mark_trap_list
  7238. rb_gc_register_address
  7239. rb_gc_start
  7240. rb_gc_unregister_address
  7241. rb_gdbm_delete
  7242. rb_gdbm_fatal
  7243. rb_gdbm_fetch
  7244. rb_gdbm_fetch2
  7245. rb_gdbm_fetch3
  7246. rb_gdbm_firstkey
  7247. rb_gdbm_modify
  7248. rb_gdbm_nextkey
  7249. rb_generic_ivar_table
  7250. rb_get_kcode
  7251. rb_get_method_body
  7252. rb_get_path
  7253. rb_get_values_at
  7254. rb_getc
  7255. rb_gets
  7256. rb_glob
  7257. rb_glob2
  7258. rb_glob_caller
  7259. rb_global_entry
  7260. rb_global_variable
  7261. rb_gv_get
  7262. rb_gv_set
  7263. rb_gvar_defined
  7264. rb_gvar_get
  7265. rb_gvar_set
  7266. rb_gzfile_close
  7267. rb_gzfile_closed_p
  7268. rb_gzfile_comment
  7269. rb_gzfile_crc
  7270. rb_gzfile_eof_p
  7271. rb_gzfile_finish
  7272. rb_gzfile_level
  7273. rb_gzfile_lineno
  7274. rb_gzfile_mtime
  7275. rb_gzfile_orig_name
  7276. rb_gzfile_os_code
  7277. rb_gzfile_s_wrap
  7278. rb_gzfile_set_comment
  7279. rb_gzfile_set_lineno
  7280. rb_gzfile_set_mtime
  7281. rb_gzfile_set_orig_name
  7282. rb_gzfile_set_sync
  7283. rb_gzfile_sync
  7284. rb_gzfile_to_io
  7285. rb_gzfile_total_in
  7286. rb_gzfile_total_out
  7287. rb_gzreader_each
  7288. rb_gzreader_each_byte
  7289. rb_gzreader_getc
  7290. rb_gzreader_gets
  7291. rb_gzreader_initialize
  7292. rb_gzreader_read
  7293. rb_gzreader_readchar
  7294. rb_gzreader_readline
  7295. rb_gzreader_readlines
  7296. rb_gzreader_readpartial
  7297. rb_gzreader_rewind
  7298. rb_gzreader_s_allocate
  7299. rb_gzreader_s_open
  7300. rb_gzreader_ungetc
  7301. rb_gzreader_unused
  7302. rb_gzwriter_addstr
  7303. rb_gzwriter_flush
  7304. rb_gzwriter_initialize
  7305. rb_gzwriter_print
  7306. rb_gzwriter_printf
  7307. rb_gzwriter_putc
  7308. rb_gzwriter_puts
  7309. rb_gzwriter_s_allocate
  7310. rb_gzwriter_s_open
  7311. rb_gzwriter_write
  7312. rb_hash
  7313. rb_hash_aref
  7314. rb_hash_aset
  7315. rb_hash_clear
  7316. rb_hash_default
  7317. rb_hash_default_proc
  7318. rb_hash_delete
  7319. rb_hash_delete_if
  7320. rb_hash_each
  7321. rb_hash_each_key
  7322. rb_hash_each_pair
  7323. rb_hash_each_value
  7324. rb_hash_empty_p
  7325. rb_hash_equal
  7326. rb_hash_fetch
  7327. rb_hash_foreach
  7328. rb_hash_freeze
  7329. rb_hash_has_key
  7330. rb_hash_has_value
  7331. rb_hash_index
  7332. rb_hash_initialize
  7333. rb_hash_inspect
  7334. rb_hash_invert
  7335. rb_hash_invert_i
  7336. rb_hash_key
  7337. rb_hash_keys
  7338. rb_hash_merge
  7339. rb_hash_modify
  7340. rb_hash_new
  7341. rb_hash_rehash
  7342. rb_hash_rehash_i
  7343. rb_hash_reject
  7344. rb_hash_reject_bang
  7345. rb_hash_replace
  7346. rb_hash_s_create
  7347. rb_hash_search_value
  7348. rb_hash_select
  7349. rb_hash_set_default
  7350. rb_hash_shift
  7351. rb_hash_size
  7352. rb_hash_sort
  7353. rb_hash_to_a
  7354. rb_hash_to_hash
  7355. rb_hash_to_s
  7356. rb_hash_update
  7357. rb_hash_update_block_i
  7358. rb_hash_update_i
  7359. rb_hash_values
  7360. rb_hash_values_at
  7361. rb_id2name
  7362. rb_id_attrset
  7363. rb_include_module
  7364. rb_inflate_addstr
  7365. rb_inflate_inflate
  7366. rb_inflate_initialize
  7367. rb_inflate_s_allocate
  7368. rb_inflate_s_inflate
  7369. rb_inflate_set_dictionary
  7370. rb_inflate_sync
  7371. rb_inflate_sync_point_p
  7372. rb_inspect
  7373. rb_int2big
  7374. rb_int2inum
  7375. rb_int_induced_from
  7376. rb_int_new
  7377. rb_intern
  7378. rb_interrupt
  7379. rb_invalid_str
  7380. rb_io_addstr
  7381. rb_io_binmode
  7382. rb_io_check_closed
  7383. rb_io_check_initialized
  7384. rb_io_check_io
  7385. rb_io_check_readable
  7386. rb_io_check_writable
  7387. rb_io_close
  7388. rb_io_close_m
  7389. rb_io_close_read
  7390. rb_io_close_write
  7391. rb_io_closed
  7392. rb_io_ctl
  7393. rb_io_each_byte
  7394. rb_io_each_line
  7395. rb_io_eof
  7396. rb_io_fcntl
  7397. rb_io_fileno
  7398. rb_io_flags_mode
  7399. rb_io_flush
  7400. rb_io_fptr_cleanup
  7401. rb_io_fptr_finalize
  7402. rb_io_fread
  7403. rb_io_fsync
  7404. rb_io_fwrite
  7405. rb_io_get_io
  7406. rb_io_getc
  7407. rb_io_getline
  7408. rb_io_getline_fast
  7409. rb_io_gets
  7410. rb_io_gets_m
  7411. rb_io_init_copy
  7412. rb_io_initialize
  7413. rb_io_inspect
  7414. rb_io_ioctl
  7415. rb_io_isatty
  7416. rb_io_lineno
  7417. rb_io_mode_flags
  7418. rb_io_mode_modenum
  7419. rb_io_modenum_flags
  7420. rb_io_modenum_mode
  7421. rb_io_open
  7422. rb_io_pid
  7423. rb_io_print
  7424. rb_io_printf
  7425. rb_io_putc
  7426. rb_io_puts
  7427. rb_io_read_check
  7428. rb_io_read_pending
  7429. rb_io_readchar
  7430. rb_io_readline
  7431. rb_io_readlines
  7432. rb_io_reopen
  7433. rb_io_rewind
  7434. rb_io_s_for_fd
  7435. rb_io_s_foreach
  7436. rb_io_s_new
  7437. rb_io_s_open
  7438. rb_io_s_pipe
  7439. rb_io_s_popen
  7440. rb_io_s_read
  7441. rb_io_s_readlines
  7442. rb_io_s_sysopen
  7443. rb_io_seek
  7444. rb_io_seek_m
  7445. rb_io_set_lineno
  7446. rb_io_set_pos
  7447. rb_io_set_sync
  7448. rb_io_stat
  7449. rb_io_stdio_file
  7450. rb_io_sync
  7451. rb_io_synchronized
  7452. rb_io_sysread
  7453. rb_io_sysseek
  7454. rb_io_syswrite
  7455. rb_io_taint_check
  7456. rb_io_tell
  7457. rb_io_to_io
  7458. rb_io_unbuffered
  7459. rb_io_ungetc
  7460. rb_io_wait_readable
  7461. rb_io_wait_writable
  7462. rb_io_write
  7463. rb_is_class_id
  7464. rb_is_const_id
  7465. rb_is_instance_id
  7466. rb_is_junk_id
  7467. rb_is_local_id
  7468. rb_iter_break
  7469. rb_iterate
  7470. rb_iterator_p
  7471. rb_iv_get
  7472. rb_iv_set
  7473. rb_ivar_defined
  7474. rb_ivar_get
  7475. rb_ivar_set
  7476. rb_jmp_buf
  7477. rb_jmpbuf_t
  7478. rb_jump_context
  7479. rb_jump_tag
  7480. rb_kcode
  7481. rb_lastline_get
  7482. rb_lastline_set
  7483. rb_ll2big
  7484. rb_ll2inum
  7485. rb_load
  7486. rb_load_fail
  7487. rb_load_file
  7488. rb_load_protect
  7489. rb_loaderror
  7490. rb_longjmp
  7491. rb_make_exception
  7492. rb_make_metaclass
  7493. rb_mark_end_proc
  7494. rb_mark_generic_ivar
  7495. rb_mark_generic_ivar_tbl
  7496. rb_mark_hash
  7497. rb_mark_tbl
  7498. rb_marshal_dump
  7499. rb_marshal_load
  7500. rb_match_busy
  7501. rb_mem_clear
  7502. rb_memcicmp
  7503. rb_memcmp
  7504. rb_memerror
  7505. rb_memsearch
  7506. rb_method_boundp
  7507. rb_method_call
  7508. rb_method_missing
  7509. rb_method_node
  7510. rb_mod_alias_method
  7511. rb_mod_ancestors
  7512. rb_mod_append_features
  7513. rb_mod_attr
  7514. rb_mod_attr_accessor
  7515. rb_mod_attr_reader
  7516. rb_mod_attr_writer
  7517. rb_mod_autoload
  7518. rb_mod_autoload_p
  7519. rb_mod_class_variables
  7520. rb_mod_cmp
  7521. rb_mod_const_at
  7522. rb_mod_const_defined
  7523. rb_mod_const_get
  7524. rb_mod_const_missing
  7525. rb_mod_const_of
  7526. rb_mod_const_set
  7527. rb_mod_constants
  7528. rb_mod_cvar_get
  7529. rb_mod_cvar_set
  7530. rb_mod_define_method
  7531. rb_mod_eqq
  7532. rb_mod_extend_object
  7533. rb_mod_freeze
  7534. rb_mod_ge
  7535. rb_mod_gt
  7536. rb_mod_include
  7537. rb_mod_include_p
  7538. rb_mod_included_modules
  7539. rb_mod_init_copy
  7540. rb_mod_initialize
  7541. rb_mod_lt
  7542. rb_mod_method
  7543. rb_mod_method_arity
  7544. rb_mod_method_defined
  7545. rb_mod_modfunc
  7546. rb_mod_module_eval
  7547. rb_mod_module_exec
  7548. rb_mod_name
  7549. rb_mod_nesting
  7550. rb_mod_private
  7551. rb_mod_private_method
  7552. rb_mod_private_method_defined
  7553. rb_mod_protected
  7554. rb_mod_protected_method_defined
  7555. rb_mod_public
  7556. rb_mod_public_method
  7557. rb_mod_public_method_defined
  7558. rb_mod_remove_const
  7559. rb_mod_remove_cvar
  7560. rb_mod_remove_method
  7561. rb_mod_s_constants
  7562. rb_mod_to_s
  7563. rb_mod_undef_method
  7564. rb_module_new
  7565. rb_module_s_alloc
  7566. rb_name_class
  7567. rb_name_error
  7568. rb_nativethread_t
  7569. rb_need_block
  7570. rb_newobj
  7571. rb_nkf_guess1
  7572. rb_nkf_guess2
  7573. rb_nkf_kconv
  7574. rb_nkf_putchar
  7575. rb_node_arity
  7576. rb_node_newnode
  7577. rb_notimplement
  7578. rb_num2dbl
  7579. rb_num2fix
  7580. rb_num2int
  7581. rb_num2ll
  7582. rb_num2long
  7583. rb_num2uint
  7584. rb_num2ull
  7585. rb_num2ulong
  7586. rb_num_coerce_bin
  7587. rb_num_coerce_cmp
  7588. rb_num_coerce_relop
  7589. rb_num_zerodiv
  7590. rb_obj_alloc
  7591. rb_obj_as_string
  7592. rb_obj_call_init
  7593. rb_obj_class
  7594. rb_obj_classname
  7595. rb_obj_clone
  7596. rb_obj_display
  7597. rb_obj_dummy
  7598. rb_obj_dup
  7599. rb_obj_equal
  7600. rb_obj_extend
  7601. rb_obj_freeze
  7602. rb_obj_frozen_p
  7603. rb_obj_id
  7604. rb_obj_infect
  7605. rb_obj_init_copy
  7606. rb_obj_inspect
  7607. rb_obj_instance_eval
  7608. rb_obj_instance_exec
  7609. rb_obj_instance_variables
  7610. rb_obj_is_instance_of
  7611. rb_obj_is_kind_of
  7612. rb_obj_is_method
  7613. rb_obj_is_proc
  7614. rb_obj_ivar_get
  7615. rb_obj_ivar_set
  7616. rb_obj_method
  7617. rb_obj_method_arity
  7618. rb_obj_methods
  7619. rb_obj_pattern_match
  7620. rb_obj_private_methods
  7621. rb_obj_protected_methods
  7622. rb_obj_public_methods
  7623. rb_obj_remove_instance_variable
  7624. rb_obj_respond_to
  7625. rb_obj_singleton_methods
  7626. rb_obj_taint
  7627. rb_obj_tainted
  7628. rb_obj_untaint
  7629. rb_open_file
  7630. rb_p
  7631. rb_parser_append_print
  7632. rb_parser_calloc
  7633. rb_parser_compile_cstr
  7634. rb_parser_compile_file
  7635. rb_parser_compile_string
  7636. rb_parser_end_seen_p
  7637. rb_parser_free
  7638. rb_parser_malloc
  7639. rb_parser_new
  7640. rb_parser_realloc
  7641. rb_parser_while_loop
  7642. rb_path2class
  7643. rb_path_check
  7644. rb_path_end
  7645. rb_path_last_separator
  7646. rb_path_next
  7647. rb_path_skip_prefix
  7648. rb_proc_arity
  7649. rb_proc_call
  7650. rb_proc_exec
  7651. rb_proc_exec_n
  7652. rb_proc_new
  7653. rb_proc_times
  7654. rb_protect
  7655. rb_provide
  7656. rb_provide_feature
  7657. rb_provided
  7658. rb_push_glob
  7659. rb_quad_pack
  7660. rb_quad_unpack
  7661. rb_raise
  7662. rb_raise_jump
  7663. rb_range_beg_len
  7664. rb_range_new
  7665. rb_read_check
  7666. rb_read_pending
  7667. rb_reg_adjust_startpos
  7668. rb_reg_casefold_p
  7669. rb_reg_check
  7670. rb_reg_compile
  7671. rb_reg_cur_kcode
  7672. rb_reg_desc
  7673. rb_reg_eqq
  7674. rb_reg_equal
  7675. rb_reg_expr_str
  7676. rb_reg_get_kcode
  7677. rb_reg_hash
  7678. rb_reg_init_copy
  7679. rb_reg_initialize
  7680. rb_reg_initialize_m
  7681. rb_reg_inspect
  7682. rb_reg_kcode_m
  7683. rb_reg_last_match
  7684. rb_reg_match
  7685. rb_reg_match2
  7686. rb_reg_match_last
  7687. rb_reg_match_m
  7688. rb_reg_match_pos
  7689. rb_reg_match_post
  7690. rb_reg_match_pre
  7691. rb_reg_mbclen2
  7692. rb_reg_new
  7693. rb_reg_nth_defined
  7694. rb_reg_nth_match
  7695. rb_reg_options
  7696. rb_reg_options_m
  7697. rb_reg_prepare_re
  7698. rb_reg_quote
  7699. rb_reg_raise
  7700. rb_reg_regcomp
  7701. rb_reg_regsub
  7702. rb_reg_s_alloc
  7703. rb_reg_s_last_match
  7704. rb_reg_s_quote
  7705. rb_reg_s_union
  7706. rb_reg_search
  7707. rb_reg_source
  7708. rb_reg_to_s
  7709. rb_remove_event_hook
  7710. rb_remove_history
  7711. rb_remove_method
  7712. rb_require
  7713. rb_require_safe
  7714. rb_rescue
  7715. rb_rescue2
  7716. rb_reserved_word
  7717. rb_respond_to
  7718. rb_safe_level
  7719. rb_scan_args
  7720. rb_secure
  7721. rb_secure_update
  7722. rb_set_class_path
  7723. rb_set_end_proc
  7724. rb_set_kcode
  7725. rb_set_safe_level
  7726. rb_setegid_core
  7727. rb_seteuid_core
  7728. rb_singleton_class
  7729. rb_singleton_class_attached
  7730. rb_singleton_class_clone
  7731. rb_source_filename
  7732. rb_spawn
  7733. rb_sprintf
  7734. rb_stat
  7735. rb_stat_R
  7736. rb_stat_S
  7737. rb_stat_W
  7738. rb_stat_X
  7739. rb_stat_atime
  7740. rb_stat_b
  7741. rb_stat_blksize
  7742. rb_stat_blocks
  7743. rb_stat_c
  7744. rb_stat_cmp
  7745. rb_stat_ctime
  7746. rb_stat_d
  7747. rb_stat_dev
  7748. rb_stat_dev_major
  7749. rb_stat_dev_minor
  7750. rb_stat_f
  7751. rb_stat_ftype
  7752. rb_stat_gid
  7753. rb_stat_grpowned
  7754. rb_stat_init
  7755. rb_stat_init_copy
  7756. rb_stat_ino
  7757. rb_stat_inspect
  7758. rb_stat_l
  7759. rb_stat_mode
  7760. rb_stat_mtime
  7761. rb_stat_nlink
  7762. rb_stat_owned
  7763. rb_stat_p
  7764. rb_stat_r
  7765. rb_stat_rdev
  7766. rb_stat_rdev_major
  7767. rb_stat_rdev_minor
  7768. rb_stat_rowned
  7769. rb_stat_s
  7770. rb_stat_s_alloc
  7771. rb_stat_sgid
  7772. rb_stat_size
  7773. rb_stat_sticky
  7774. rb_stat_suid
  7775. rb_stat_uid
  7776. rb_stat_w
  7777. rb_stat_wr
  7778. rb_stat_ww
  7779. rb_stat_x
  7780. rb_stat_z
  7781. rb_str2cstr
  7782. rb_str2inum
  7783. rb_str_append
  7784. rb_str_aref
  7785. rb_str_aref_m
  7786. rb_str_aset
  7787. rb_str_aset_m
  7788. rb_str_associate
  7789. rb_str_associated
  7790. rb_str_buf_append
  7791. rb_str_buf_cat
  7792. rb_str_buf_cat2
  7793. rb_str_buf_new
  7794. rb_str_buf_new2
  7795. rb_str_capitalize
  7796. rb_str_capitalize_bang
  7797. rb_str_casecmp
  7798. rb_str_cat
  7799. rb_str_cat2
  7800. rb_str_center
  7801. rb_str_chomp
  7802. rb_str_chomp_bang
  7803. rb_str_chop
  7804. rb_str_chop_bang
  7805. rb_str_clear
  7806. rb_str_cmp
  7807. rb_str_cmp_m
  7808. rb_str_concat
  7809. rb_str_count
  7810. rb_str_crypt
  7811. rb_str_delete
  7812. rb_str_delete_bang
  7813. rb_str_derive
  7814. rb_str_downcase
  7815. rb_str_downcase_bang
  7816. rb_str_dump
  7817. rb_str_dup
  7818. rb_str_dup_frozen
  7819. rb_str_each_byte
  7820. rb_str_each_line
  7821. rb_str_empty
  7822. rb_str_eql
  7823. rb_str_equal
  7824. rb_str_format
  7825. rb_str_format_m
  7826. rb_str_freeze
  7827. rb_str_gsub
  7828. rb_str_gsub_bang
  7829. rb_str_hash
  7830. rb_str_hash_m
  7831. rb_str_hex
  7832. rb_str_include
  7833. rb_str_index
  7834. rb_str_index_m
  7835. rb_str_init
  7836. rb_str_insert
  7837. rb_str_inspect
  7838. rb_str_intern
  7839. rb_str_justify
  7840. rb_str_length
  7841. rb_str_ljust
  7842. rb_str_locktmp
  7843. rb_str_lstrip
  7844. rb_str_lstrip_bang
  7845. rb_str_match
  7846. rb_str_match_m
  7847. rb_str_modify
  7848. rb_str_new
  7849. rb_str_new2
  7850. rb_str_new3
  7851. rb_str_new4
  7852. rb_str_new5
  7853. rb_str_oct
  7854. rb_str_plus
  7855. rb_str_replace
  7856. rb_str_resize
  7857. rb_str_reverse
  7858. rb_str_reverse_bang
  7859. rb_str_rindex
  7860. rb_str_rindex_m
  7861. rb_str_rjust
  7862. rb_str_rstrip
  7863. rb_str_rstrip_bang
  7864. rb_str_scan
  7865. rb_str_setter
  7866. rb_str_shared_replace
  7867. rb_str_slice_bang
  7868. rb_str_splice
  7869. rb_str_split
  7870. rb_str_split_m
  7871. rb_str_squeeze
  7872. rb_str_squeeze_bang
  7873. rb_str_strip
  7874. rb_str_strip_bang
  7875. rb_str_sub
  7876. rb_str_sub_bang
  7877. rb_str_subpat
  7878. rb_str_subpat_set
  7879. rb_str_substr
  7880. rb_str_succ
  7881. rb_str_succ_bang
  7882. rb_str_sum
  7883. rb_str_swapcase
  7884. rb_str_swapcase_bang
  7885. rb_str_times
  7886. rb_str_to_dbl
  7887. rb_str_to_f
  7888. rb_str_to_i
  7889. rb_str_to_inum
  7890. rb_str_to_s
  7891. rb_str_to_str
  7892. rb_str_tr
  7893. rb_str_tr_bang
  7894. rb_str_tr_s
  7895. rb_str_tr_s_bang
  7896. rb_str_unlocktmp
  7897. rb_str_upcase
  7898. rb_str_upcase_bang
  7899. rb_str_update
  7900. rb_str_upto
  7901. rb_str_upto_m
  7902. rb_strftime
  7903. rb_string_value
  7904. rb_string_value_cstr
  7905. rb_string_value_ptr
  7906. rb_struct_alloc
  7907. rb_struct_aref
  7908. rb_struct_aref_id
  7909. rb_struct_aset
  7910. rb_struct_aset_id
  7911. rb_struct_define
  7912. rb_struct_each
  7913. rb_struct_each_pair
  7914. rb_struct_eql
  7915. rb_struct_equal
  7916. rb_struct_getmember
  7917. rb_struct_hash
  7918. rb_struct_init_copy
  7919. rb_struct_initialize
  7920. rb_struct_inspect
  7921. rb_struct_iv_get
  7922. rb_struct_members
  7923. rb_struct_members_m
  7924. rb_struct_modify
  7925. rb_struct_new
  7926. rb_struct_ref
  7927. rb_struct_ref0
  7928. rb_struct_ref1
  7929. rb_struct_ref2
  7930. rb_struct_ref3
  7931. rb_struct_ref4
  7932. rb_struct_ref5
  7933. rb_struct_ref6
  7934. rb_struct_ref7
  7935. rb_struct_ref8
  7936. rb_struct_ref9
  7937. rb_struct_s_def
  7938. rb_struct_s_members
  7939. rb_struct_s_members_m
  7940. rb_struct_select
  7941. rb_struct_set
  7942. rb_struct_size
  7943. rb_struct_to_a
  7944. rb_struct_values_at
  7945. rb_svar
  7946. rb_syck_bad_anchor_handler
  7947. rb_syck_compile
  7948. rb_syck_emitter_handler
  7949. rb_syck_err_handler
  7950. rb_syck_free_emitter
  7951. rb_syck_free_parser
  7952. rb_syck_io_str_read
  7953. rb_syck_load_handler
  7954. rb_syck_mktime
  7955. rb_syck_output_handler
  7956. rb_sym_all_symbols
  7957. rb_symname_p
  7958. rb_sys_fail
  7959. rb_sys_warning
  7960. rb_sysopen
  7961. rb_syswait
  7962. rb_tainted_str_new
  7963. rb_tainted_str_new2
  7964. rb_threadUpdateProc
  7965. rb_threadVwaitProc
  7966. rb_threadWaitVisibilityProc
  7967. rb_threadWaitWindowProc
  7968. rb_thread_abort_exc
  7969. rb_thread_abort_exc_set
  7970. rb_thread_alive_p
  7971. rb_thread_alloc
  7972. rb_thread_alone
  7973. rb_thread_aref
  7974. rb_thread_aset
  7975. rb_thread_atfork
  7976. rb_thread_check
  7977. rb_thread_cleanup
  7978. rb_thread_create
  7979. rb_thread_critical_get
  7980. rb_thread_critical_set
  7981. rb_thread_current
  7982. rb_thread_dead
  7983. rb_thread_deadlock
  7984. rb_thread_die
  7985. rb_thread_exit
  7986. rb_thread_fd_close
  7987. rb_thread_fd_writable
  7988. rb_thread_flock
  7989. rb_thread_group
  7990. rb_thread_initialize
  7991. rb_thread_inspect
  7992. rb_thread_interrupt
  7993. rb_thread_join
  7994. rb_thread_join_m
  7995. rb_thread_key_p
  7996. rb_thread_keys
  7997. rb_thread_kill
  7998. rb_thread_list
  7999. rb_thread_local_aref
  8000. rb_thread_local_aset
  8001. rb_thread_main
  8002. rb_thread_main_jump
  8003. rb_thread_pass
  8004. rb_thread_polling
  8005. rb_thread_priority
  8006. rb_thread_priority_set
  8007. rb_thread_raise
  8008. rb_thread_raise_m
  8009. rb_thread_ready
  8010. rb_thread_remove
  8011. rb_thread_restore_context
  8012. rb_thread_restore_context_0
  8013. rb_thread_run
  8014. rb_thread_s_abort_exc
  8015. rb_thread_s_abort_exc_set
  8016. rb_thread_s_kill
  8017. rb_thread_s_new
  8018. rb_thread_safe_level
  8019. rb_thread_save_context
  8020. rb_thread_schedule
  8021. rb_thread_select
  8022. rb_thread_signal_exit
  8023. rb_thread_signal_raise
  8024. rb_thread_sleep
  8025. rb_thread_sleep_forever
  8026. rb_thread_start
  8027. rb_thread_start_0
  8028. rb_thread_start_1
  8029. rb_thread_start_timer
  8030. rb_thread_status
  8031. rb_thread_stop
  8032. rb_thread_stop_p
  8033. rb_thread_stop_timer
  8034. rb_thread_switch
  8035. rb_thread_t
  8036. rb_thread_terminated
  8037. rb_thread_trap_eval
  8038. rb_thread_value
  8039. rb_thread_wait_fd
  8040. rb_thread_wait_for
  8041. rb_thread_wait_other_threads
  8042. rb_thread_wakeup
  8043. rb_thread_yield
  8044. rb_thread_yield_0
  8045. rb_throw
  8046. rb_time_interval
  8047. rb_time_new
  8048. rb_time_timeval
  8049. rb_to_id
  8050. rb_to_int
  8051. rb_to_integer
  8052. rb_trace_eval
  8053. rb_trap_eval
  8054. rb_trap_exec
  8055. rb_trap_exit
  8056. rb_trap_restore_mask
  8057. rb_true
  8058. rb_uint2big
  8059. rb_uint2inum
  8060. rb_uint_new
  8061. rb_ull2big
  8062. rb_ull2inum
  8063. rb_undef
  8064. rb_undef_alloc_func
  8065. rb_undef_method
  8066. rb_values_from_ary
  8067. rb_values_new
  8068. rb_values_new2
  8069. rb_vsprintf
  8070. rb_w32_Sleep
  8071. rb_w32_accept
  8072. rb_w32_argv_size
  8073. rb_w32_aspawn
  8074. rb_w32_asynchronize
  8075. rb_w32_bind
  8076. rb_w32_call_handler
  8077. rb_w32_close
  8078. rb_w32_closedir
  8079. rb_w32_cmdvector
  8080. rb_w32_connect
  8081. rb_w32_enter_critical
  8082. rb_w32_fclose
  8083. rb_w32_fdclr
  8084. rb_w32_fdisset
  8085. rb_w32_fdopen
  8086. rb_w32_fdset
  8087. rb_w32_fopen
  8088. rb_w32_free_environ
  8089. rb_w32_fsopen
  8090. rb_w32_fstat
  8091. rb_w32_get_environ
  8092. rb_w32_get_osfhandle
  8093. rb_w32_getc
  8094. rb_w32_getcwd
  8095. rb_w32_getenv
  8096. rb_w32_gethostbyaddr
  8097. rb_w32_gethostbyname
  8098. rb_w32_gethostname
  8099. rb_w32_getpeername
  8100. rb_w32_getpid
  8101. rb_w32_getprotobyname
  8102. rb_w32_getprotobynumber
  8103. rb_w32_getservbyname
  8104. rb_w32_getservbyport
  8105. rb_w32_getsockname
  8106. rb_w32_getsockopt
  8107. rb_w32_ioctlsocket
  8108. rb_w32_is_socket
  8109. rb_w32_isatty
  8110. rb_w32_iswin95
  8111. rb_w32_iswinnt
  8112. rb_w32_join_argv
  8113. rb_w32_leave_critical
  8114. rb_w32_listen
  8115. rb_w32_main_context
  8116. rb_w32_mkdir
  8117. rb_w32_open_osfhandle
  8118. rb_w32_opendir
  8119. rb_w32_osid
  8120. rb_w32_pipe_exec
  8121. rb_w32_putc
  8122. rb_w32_readdir
  8123. rb_w32_recv
  8124. rb_w32_recvfrom
  8125. rb_w32_rename
  8126. rb_w32_rewinddir
  8127. rb_w32_rmdir
  8128. rb_w32_seekdir
  8129. rb_w32_select
  8130. rb_w32_send
  8131. rb_w32_sendto
  8132. rb_w32_setsockopt
  8133. rb_w32_shutdown
  8134. rb_w32_sleep
  8135. rb_w32_snprintf
  8136. rb_w32_socket
  8137. rb_w32_socketpair
  8138. rb_w32_spawn
  8139. rb_w32_stat
  8140. rb_w32_strerror
  8141. rb_w32_telldir
  8142. rb_w32_times
  8143. rb_w32_unlink
  8144. rb_w32_utime
  8145. rb_w32_vsnprintf
  8146. rb_waitpid
  8147. rb_warn
  8148. rb_warn0
  8149. rb_warnI
  8150. rb_warnS
  8151. rb_warn_m
  8152. rb_warning
  8153. rb_warning0
  8154. rb_warningS
  8155. rb_with_disable_interrupt
  8156. rb_write_error
  8157. rb_write_error2
  8158. rb_yield
  8159. rb_yield_0
  8160. rb_yield_splat
  8161. rb_yield_values
  8162. rb_zlib_adler32
  8163. rb_zlib_crc32
  8164. rb_zlib_crc_table
  8165. rb_zlib_version
  8166. rb_zstream_adler
  8167. rb_zstream_avail_in
  8168. rb_zstream_avail_out
  8169. rb_zstream_closed_p
  8170. rb_zstream_data_type
  8171. rb_zstream_end
  8172. rb_zstream_finish
  8173. rb_zstream_finished_p
  8174. rb_zstream_flush_next_in
  8175. rb_zstream_flush_next_out
  8176. rb_zstream_reset
  8177. rb_zstream_set_avail_out
  8178. rb_zstream_total_in
  8179. rb_zstream_total_out
  8180. rbtk_invalid_namespace
  8181. rbtk_preserve_ip
  8182. rbtk_release_ip
  8183. read
  8184. read_all
  8185. read_buffered_data
  8186. read_escape
  8187. readable
  8188. readdir
  8189. readline_attempted_completion_function
  8190. readline_event
  8191. readline_readline
  8192. readline_s_emacs_editing_mode
  8193. readline_s_get_basic_quote_characters
  8194. readline_s_get_basic_word_break_characters
  8195. readline_s_get_completer_quote_characters
  8196. readline_s_get_completer_word_break_characters
  8197. readline_s_get_completion_append_character
  8198. readline_s_get_completion_case_fold
  8199. readline_s_get_completion_proc
  8200. readline_s_get_filename_quote_characters
  8201. readline_s_set_basic_quote_characters
  8202. readline_s_set_basic_word_break_characters
  8203. readline_s_set_completer_quote_characters
  8204. readline_s_set_completer_word_break_characters
  8205. readline_s_set_completion_append_character
  8206. readline_s_set_completion_case_fold
  8207. readline_s_set_completion_proc
  8208. readline_s_set_filename_quote_characters
  8209. readline_s_set_input
  8210. readline_s_set_output
  8211. readline_s_vi_editing_mode
  8212. readonly_setter
  8213. realloc
  8214. recursive_check
  8215. recursive_hash
  8216. recursive_join
  8217. recursive_pop
  8218. recursive_push
  8219. recv
  8220. recvfrom
  8221. reduce
  8222. reduce0
  8223. reduce_nodes
  8224. reference_count
  8225. reg_enum_key
  8226. reg_get_typelib_file_path
  8227. reg_get_val
  8228. reg_open_key
  8229. reg_open_vkey
  8230. regex_t
  8231. register_stack_extend
  8232. regoff_t
  8233. regx_options
  8234. rehash
  8235. reinit
  8236. reject_i
  8237. reloc_repl
  8238. reloc_undef
  8239. relocation_info
  8240. remain_size
  8241. remove_backslashes
  8242. remove_begin
  8243. remove_method
  8244. remove_opt_anc_info
  8245. remove_sign_bits
  8246. remove_trace
  8247. rename
  8248. renumber_by_map
  8249. renumber_node_backref
  8250. replace_i
  8251. require_libraries
  8252. ret_args
  8253. return_jump
  8254. return_value
  8255. rewinddir
  8256. ripper_arg_ambiguous
  8257. ripper_assert_Qundef
  8258. ripper_column
  8259. ripper_compile_error
  8260. ripper_dispatch0
  8261. ripper_dispatch1
  8262. ripper_dispatch2
  8263. ripper_dispatch3
  8264. ripper_dispatch4
  8265. ripper_dispatch5
  8266. ripper_dispatch_delayed_token
  8267. ripper_dispatch_scan_event
  8268. ripper_ensure
  8269. ripper_flush
  8270. ripper_id2sym
  8271. ripper_init_eventids2
  8272. ripper_initialize
  8273. ripper_initialized_p
  8274. ripper_intern
  8275. ripper_lex_get_generic
  8276. ripper_lineno
  8277. ripper_new_strterm
  8278. ripper_parse
  8279. ripper_parse0
  8280. ripper_s_allocate
  8281. ripper_s_get_yydebug
  8282. ripper_s_set_yydebug
  8283. ripper_token2eventid
  8284. ripper_validate_object
  8285. ripper_value
  8286. ripper_warn0
  8287. ripper_warnI
  8288. ripper_warnS
  8289. ripper_warning0
  8290. ripper_warningS
  8291. rl_completion_matches
  8292. rl_filename_completion_function
  8293. rl_username_completion_function
  8294. rm_final
  8295. rmdir
  8296. rmext
  8297. rol
  8298. rot13
  8299. rot47
  8300. rot_conv
  8301. rsa_generate
  8302. rsa_instance
  8303. rscheck
  8304. ruby__end__seen
  8305. ruby__sfvwrite
  8306. ruby_add_suffix
  8307. ruby_brace_expand
  8308. ruby_brace_glob
  8309. ruby_brace_glob0
  8310. ruby_cbase
  8311. ruby_cleanup
  8312. ruby_connect
  8313. ruby_debug_lines
  8314. ruby_dup
  8315. ruby_eval_tree
  8316. ruby_eval_tree_begin
  8317. ruby_exec
  8318. ruby_exec_internal
  8319. ruby_finalize
  8320. ruby_finalize_0
  8321. ruby_finalize_1
  8322. ruby_getaddrinfo
  8323. ruby_getaddrinfo__aix
  8324. ruby_getcwd
  8325. ruby_glob
  8326. ruby_glob0
  8327. ruby_glob_func
  8328. ruby_incpush
  8329. ruby_incpush_expand
  8330. ruby_init
  8331. ruby_init_loadpath
  8332. ruby_init_stack
  8333. ruby_longjmp
  8334. ruby_native_thread_kill
  8335. ruby_nativethread_signal
  8336. ruby_open_tcl_dll
  8337. ruby_open_tcltk_dll
  8338. ruby_open_tk_dll
  8339. ruby_options
  8340. ruby_process_options
  8341. ruby_prog_init
  8342. ruby_push_include
  8343. ruby_qsort
  8344. ruby_run
  8345. ruby_scan_hex
  8346. ruby_scan_oct
  8347. ruby_script
  8348. ruby_set_argv
  8349. ruby_set_current_source
  8350. ruby_set_stack_size
  8351. ruby_setenv
  8352. ruby_setjmp
  8353. ruby_show_copyright
  8354. ruby_show_version
  8355. ruby_signal
  8356. ruby_signal_name
  8357. ruby_socket
  8358. ruby_sourcefile
  8359. ruby_sourceline
  8360. ruby_stack_check
  8361. ruby_stack_length
  8362. ruby_stop
  8363. ruby_strdup
  8364. ruby_strtod
  8365. ruby_tcl_create_ip_and_stubs_init
  8366. ruby_tcl_stubs_init
  8367. ruby_tcltk_stubs
  8368. ruby_tk_stubs_init
  8369. ruby_tk_stubs_safeinit
  8370. ruby_unsetenv
  8371. ruby_xcalloc
  8372. ruby_xfree
  8373. ruby_xmalloc
  8374. ruby_xmalloc2
  8375. ruby_xrealloc
  8376. ruby_xrealloc2
  8377. rubylib_mangle
  8378. rubylib_mangled_path
  8379. rubylib_mangled_path2
  8380. run_final
  8381. run_single_final
  8382. run_trap_eval
  8383. s2e_conv
  8384. s_accept
  8385. s_double
  8386. s_float
  8387. s_iconv
  8388. s_int
  8389. s_long
  8390. s_long_long
  8391. s_oconv
  8392. s_recvfrom
  8393. s_short
  8394. s_status
  8395. s_voidp
  8396. safe_getter
  8397. safe_setter
  8398. safe_setup_str
  8399. save_mantissa
  8400. scalb
  8401. scan_env_add_mem_entry
  8402. scan_env_clear
  8403. scan_env_set_mem_node
  8404. scan_hex
  8405. scan_oct
  8406. scan_once
  8407. scan_unsigned_hexadecimal_number
  8408. scan_unsigned_octal_number
  8409. scope_dup
  8410. sdbm_clearerr
  8411. sdbm_close
  8412. sdbm_delete
  8413. sdbm_dirfno
  8414. sdbm_error
  8415. sdbm_fetch
  8416. sdbm_firstkey
  8417. sdbm_hash
  8418. sdbm_nextkey
  8419. sdbm_open
  8420. sdbm_pagfno
  8421. sdbm_prep
  8422. sdbm_rdonly
  8423. sdbm_store
  8424. search_method
  8425. search_required
  8426. search_time_t
  8427. search_undef
  8428. secure_visibility
  8429. security
  8430. seekdir
  8431. seepair
  8432. select
  8433. select_call
  8434. select_end
  8435. select_i
  8436. select_internal
  8437. select_opt_exact_info
  8438. select_opt_map_info
  8439. select_str_opcode
  8440. send
  8441. send_funcall
  8442. sendto
  8443. set_arg0
  8444. set_arg0space
  8445. set_argv
  8446. set_backtrace
  8447. set_bm_backward_skip
  8448. set_bm_skip
  8449. set_bound_node_opt_info
  8450. set_code_score
  8451. set_conf_section_i
  8452. set_eventloop_tick
  8453. set_eventloop_weight
  8454. set_iconv
  8455. set_input_codename
  8456. set_max_block_time
  8457. set_method_visibility
  8458. set_mml
  8459. set_no_event_wait
  8460. set_optimize_exact_info
  8461. set_optimize_info_from_tree
  8462. set_optimize_map_info
  8463. set_qualifier
  8464. set_stack_end
  8465. set_sub_anchor
  8466. set_syserr
  8467. set_trace_func
  8468. set_yylval_id
  8469. set_yylval_literal
  8470. set_yylval_node
  8471. set_yylval_num
  8472. set_yylval_str
  8473. setbinmode
  8474. setdbit
  8475. setenv
  8476. seteuid
  8477. setgid
  8478. sethostent
  8479. setjmp
  8480. setkey
  8481. setmode
  8482. setnetent
  8483. setprotoent
  8484. setservent
  8485. setsockopt
  8486. setuid
  8487. setup_call
  8488. setup_domain_and_type
  8489. setup_group
  8490. setup_handler
  8491. setup_look_behind
  8492. setup_passwd
  8493. setup_subexp_call
  8494. setup_tree
  8495. setvbuffer
  8496. sha2_byte
  8497. sha2_word32
  8498. sha2_word64
  8499. shadowing_lvar
  8500. shadowing_lvar_gen
  8501. shift
  8502. shift_i
  8503. shortlen
  8504. shutdown
  8505. sig_atomic_t
  8506. sig_list
  8507. sig_trap
  8508. sigbus
  8509. sighandler
  8510. sighandler_t
  8511. sigma0_256
  8512. sigma0_512
  8513. sigma1_256
  8514. sigma1_512
  8515. sign_bits
  8516. signal
  8517. signal_exec
  8518. signm2signo
  8519. signo2signm
  8520. sigpipe
  8521. sigsegv
  8522. sigsend_to_ruby_thread
  8523. sigset_t
  8524. sinh
  8525. size_t
  8526. sizeof_euc_to_utf8_1byte
  8527. sizeof_euc_to_utf8_2bytes
  8528. sizeof_euc_utf8
  8529. sizeof_utf8_to_euc_2bytes
  8530. sizeof_utf8_to_euc_3bytes
  8531. sizeof_utf8_to_euc_C2
  8532. sizeof_utf8_to_euc_E5B8
  8533. sjis_code_to_mbc
  8534. sjis_code_to_mbclen
  8535. sjis_is_allowed_reverse_match
  8536. sjis_is_code_ctype
  8537. sjis_is_mbc_ambiguous
  8538. sjis_left_adjust_char_head
  8539. sjis_mbc_enc_len
  8540. sjis_mbc_to_code
  8541. sjis_mbc_to_normalize
  8542. skipprefix
  8543. skiproot
  8544. skipspace
  8545. sleep
  8546. slow_search
  8547. slow_search_backward
  8548. slow_search_backward_ic
  8549. slow_search_ic
  8550. snprintf
  8551. sock_accept
  8552. sock_addrinfo
  8553. sock_bind
  8554. sock_connect
  8555. sock_define_const
  8556. sock_gethostname
  8557. sock_initialize
  8558. sock_listen
  8559. sock_recvfrom
  8560. sock_s_getaddrinfo
  8561. sock_s_gethostbyaddr
  8562. sock_s_gethostbyname
  8563. sock_s_getnameinfo
  8564. sock_s_getservbyname
  8565. sock_s_getservbyport
  8566. sock_s_pack_sockaddr_in
  8567. sock_s_pack_sockaddr_un
  8568. sock_s_socketpair
  8569. sock_s_unpack_sockaddr_in
  8570. sock_s_unpack_sockaddr_un
  8571. sock_sockaddr
  8572. sock_sysaccept
  8573. socket
  8574. socketpair
  8575. socketpair_internal
  8576. socks_init
  8577. socks_s_close
  8578. sopen
  8579. sort_1
  8580. sort_2
  8581. sort_by_cmp
  8582. sort_by_i
  8583. sort_internal
  8584. sort_unlock
  8585. special_local_set
  8586. specific_eval
  8587. splat_value
  8588. splpage
  8589. ssl_get_error
  8590. st_add_direct
  8591. st_add_direct_strend
  8592. st_cleanup_safe
  8593. st_copy
  8594. st_data_t
  8595. st_delete
  8596. st_delete_safe
  8597. st_foreach
  8598. st_foreach_safe
  8599. st_free_table
  8600. st_init_numtable
  8601. st_init_numtable_with_size
  8602. st_init_strend_table_with_size
  8603. st_init_strtable
  8604. st_init_strtable_with_size
  8605. st_init_table
  8606. st_init_table_with_size
  8607. st_insert
  8608. st_insert_strend
  8609. st_is_member
  8610. st_lookup
  8611. st_lookup_strend
  8612. st_nothing_key_clone
  8613. st_nothing_key_free
  8614. st_numcmp
  8615. st_numhash
  8616. st_strend_key
  8617. st_table
  8618. st_table_entry
  8619. stack_check
  8620. stack_double
  8621. stack_extend
  8622. stack_grow_direction
  8623. stack_growup_p
  8624. stack_node
  8625. stack_type
  8626. stat
  8627. stat_col
  8628. stat_new
  8629. stat_new_0
  8630. status_check
  8631. status_clear
  8632. status_disable
  8633. status_push_ch
  8634. status_reinit
  8635. status_reset
  8636. std_getc
  8637. std_putc
  8638. std_ungetc
  8639. stdout_setter
  8640. step_i
  8641. strEQ
  8642. str_alloc
  8643. str_copy
  8644. str_exist_check_with_esc
  8645. str_frozen_check
  8646. str_gsub
  8647. str_independent
  8648. str_isnumber
  8649. str_lower_case_match
  8650. str_make_independent
  8651. str_mod_check
  8652. str_new
  8653. str_new3
  8654. str_new4
  8655. str_node_can_be_split
  8656. str_node_split_last_char
  8657. str_step
  8658. str_to_id
  8659. strcasecmp
  8660. strcat_capa_from_static
  8661. strchr
  8662. strdup
  8663. strdup_with_null
  8664. strend_cmp
  8665. strend_hash
  8666. strerror
  8667. strftime
  8668. strhash
  8669. stricmp
  8670. string2hex
  8671. string_cmp_ic
  8672. strio_0
  8673. strio_addstr
  8674. strio_alloc
  8675. strio_binmode
  8676. strio_close
  8677. strio_close_read
  8678. strio_close_write
  8679. strio_closed
  8680. strio_closed_read
  8681. strio_closed_write
  8682. strio_copy
  8683. strio_each
  8684. strio_each_byte
  8685. strio_eof
  8686. strio_extend
  8687. strio_false
  8688. strio_fcntl
  8689. strio_fileno
  8690. strio_finalize
  8691. strio_first
  8692. strio_flush
  8693. strio_free
  8694. strio_fsync
  8695. strio_get_lineno
  8696. strio_get_pos
  8697. strio_get_string
  8698. strio_get_sync
  8699. strio_getc
  8700. strio_getline
  8701. strio_gets
  8702. strio_initialize
  8703. strio_isatty
  8704. strio_mark
  8705. strio_nil
  8706. strio_path
  8707. strio_pid
  8708. strio_print
  8709. strio_printf
  8710. strio_putc
  8711. strio_puts
  8712. strio_read
  8713. strio_readchar
  8714. strio_readline
  8715. strio_readlines
  8716. strio_reopen
  8717. strio_rewind
  8718. strio_s_allocate
  8719. strio_s_open
  8720. strio_seek
  8721. strio_self
  8722. strio_set_lineno
  8723. strio_set_pos
  8724. strio_set_string
  8725. strio_set_sync
  8726. strio_size
  8727. strio_sysread
  8728. strio_syswrite
  8729. strio_tell
  8730. strio_truncate
  8731. strio_ungetc
  8732. strio_unimpl
  8733. strio_write
  8734. strncasecmp
  8735. strnicmp
  8736. strpbrk
  8737. strrchr
  8738. strrdirsep
  8739. strscan_aref
  8740. strscan_bol_p
  8741. strscan_check
  8742. strscan_check_until
  8743. strscan_clear
  8744. strscan_concat
  8745. strscan_do_scan
  8746. strscan_empty_p
  8747. strscan_eos_p
  8748. strscan_exist_p
  8749. strscan_free
  8750. strscan_get_byte
  8751. strscan_get_pos
  8752. strscan_get_string
  8753. strscan_getbyte
  8754. strscan_getch
  8755. strscan_init_copy
  8756. strscan_initialize
  8757. strscan_inspect
  8758. strscan_mark
  8759. strscan_match_p
  8760. strscan_matched
  8761. strscan_matched_p
  8762. strscan_matched_size
  8763. strscan_matchedsize
  8764. strscan_peek
  8765. strscan_peep
  8766. strscan_post_match
  8767. strscan_pre_match
  8768. strscan_prepare_re
  8769. strscan_reset
  8770. strscan_rest
  8771. strscan_rest_p
  8772. strscan_rest_size
  8773. strscan_restsize
  8774. strscan_s_allocate
  8775. strscan_s_mustc
  8776. strscan_scan
  8777. strscan_scan_full
  8778. strscan_scan_until
  8779. strscan_search_full
  8780. strscan_set_pos
  8781. strscan_set_string
  8782. strscan_skip
  8783. strscan_skip_until
  8784. strscan_terminate
  8785. strscan_unscan
  8786. strstr
  8787. strtod
  8788. strtol
  8789. strtoul
  8790. struct_alloc
  8791. struct_entry
  8792. subexp_inf_recursive_check
  8793. subexp_inf_recursive_check_trav
  8794. subexp_recursive_check
  8795. subexp_recursive_check_trav
  8796. subnodes
  8797. subst
  8798. subst_free
  8799. subst_mark
  8800. substinfo_inspect
  8801. succ_char
  8802. sv_i
  8803. svalue_to_avalue
  8804. svalue_to_mrhs
  8805. swallow
  8806. swap16
  8807. swap_node
  8808. swapd
  8809. swaps
  8810. sweep_source_filename
  8811. switch_mime_getc
  8812. syck_add_sym
  8813. syck_add_transfer
  8814. syck_alloc_map
  8815. syck_alloc_node
  8816. syck_alloc_seq
  8817. syck_alloc_str
  8818. syck_assert
  8819. syck_badalias_cmp
  8820. syck_badalias_initialize
  8821. syck_base64dec
  8822. syck_base64enc
  8823. syck_check_limit
  8824. syck_const_find
  8825. syck_default_error_handler
  8826. syck_defaultresolver_detect_implicit
  8827. syck_defaultresolver_node_import
  8828. syck_domaintype_initialize
  8829. syck_emit
  8830. syck_emit_1quoted
  8831. syck_emit_2quoted
  8832. syck_emit_end
  8833. syck_emit_folded
  8834. syck_emit_indent
  8835. syck_emit_item
  8836. syck_emit_literal
  8837. syck_emit_map
  8838. syck_emit_scalar
  8839. syck_emit_seq
  8840. syck_emit_tag
  8841. syck_emitter_add_level
  8842. syck_emitter_clear
  8843. syck_emitter_current_level
  8844. syck_emitter_emit
  8845. syck_emitter_escape
  8846. syck_emitter_flush
  8847. syck_emitter_handler
  8848. syck_emitter_mark_node
  8849. syck_emitter_node_export
  8850. syck_emitter_parent_level
  8851. syck_emitter_pop_level
  8852. syck_emitter_reset
  8853. syck_emitter_reset_levels
  8854. syck_emitter_s_alloc
  8855. syck_emitter_set_resolver
  8856. syck_emitter_st_free
  8857. syck_emitter_write
  8858. syck_free_emitter
  8859. syck_free_members
  8860. syck_free_node
  8861. syck_free_parser
  8862. syck_genericresolver_node_import
  8863. syck_get_hash_aref
  8864. syck_hdlr_add_anchor
  8865. syck_hdlr_add_node
  8866. syck_hdlr_get_anchor
  8867. syck_hdlr_remove_anchor
  8868. syck_io_file_read
  8869. syck_io_str_read
  8870. syck_lookup_sym
  8871. syck_map_add
  8872. syck_map_add_m
  8873. syck_map_alloc
  8874. syck_map_assign
  8875. syck_map_count
  8876. syck_map_empty
  8877. syck_map_initialize
  8878. syck_map_read
  8879. syck_map_style_set
  8880. syck_map_update
  8881. syck_map_value_set
  8882. syck_mark_emitter
  8883. syck_mark_parser
  8884. syck_match_implicit
  8885. syck_merge_i
  8886. syck_move_tokens
  8887. syck_new_emitter
  8888. syck_new_map
  8889. syck_new_parser
  8890. syck_new_seq
  8891. syck_new_str
  8892. syck_new_str2
  8893. syck_node_init_copy
  8894. syck_node_mark
  8895. syck_node_transform
  8896. syck_node_type_id_set
  8897. syck_out_initialize
  8898. syck_out_map
  8899. syck_out_mark
  8900. syck_out_scalar
  8901. syck_out_seq
  8902. syck_output_handler
  8903. syck_parse
  8904. syck_parser_add_level
  8905. syck_parser_assign_io
  8906. syck_parser_bad_anchor_handler
  8907. syck_parser_bufsize_get
  8908. syck_parser_bufsize_set
  8909. syck_parser_current_level
  8910. syck_parser_error_handler
  8911. syck_parser_file
  8912. syck_parser_handler
  8913. syck_parser_implicit_typing
  8914. syck_parser_initialize
  8915. syck_parser_load
  8916. syck_parser_load_documents
  8917. syck_parser_pop_level
  8918. syck_parser_read
  8919. syck_parser_readlen
  8920. syck_parser_reset_cursor
  8921. syck_parser_reset_levels
  8922. syck_parser_s_alloc
  8923. syck_parser_set_input_type
  8924. syck_parser_set_resolver
  8925. syck_parser_set_root_on_error
  8926. syck_parser_str
  8927. syck_parser_str_auto
  8928. syck_parser_taguri_expansion
  8929. syck_privatetype_initialize
  8930. syck_replace_str
  8931. syck_replace_str2
  8932. syck_resolver_add_type
  8933. syck_resolver_detect_implicit
  8934. syck_resolver_initialize
  8935. syck_resolver_node_import
  8936. syck_resolver_tagurize
  8937. syck_resolver_transfer
  8938. syck_resolver_use_types_at
  8939. syck_scalar_alloc
  8940. syck_scalar_initialize
  8941. syck_scalar_style_set
  8942. syck_scalar_value_set
  8943. syck_scan_scalar
  8944. syck_seq_add
  8945. syck_seq_add_m
  8946. syck_seq_alloc
  8947. syck_seq_assign
  8948. syck_seq_count
  8949. syck_seq_empty
  8950. syck_seq_initialize
  8951. syck_seq_read
  8952. syck_seq_style_set
  8953. syck_seq_value_set
  8954. syck_set_ivars
  8955. syck_set_model
  8956. syck_st_free
  8957. syck_st_free_anchors
  8958. syck_st_free_nodes
  8959. syck_st_mark_nodes
  8960. syck_str_blow_away_commas
  8961. syck_str_read
  8962. syck_strndup
  8963. syck_tagcmp
  8964. syck_taguri
  8965. syck_try_implicit
  8966. syck_type_id_to_uri
  8967. syck_xprivate
  8968. syck_yaml2byte
  8969. syck_yaml2byte_handler
  8970. syck_yobject_initialize
  8971. syckerror
  8972. sycklex
  8973. sycklex_bytecode_utf8
  8974. sycklex_yaml_utf8
  8975. syckwrap
  8976. sym_hash
  8977. sym_inspect
  8978. sym_to_i
  8979. sym_to_s
  8980. sym_to_sym
  8981. symbols_i
  8982. sys_fail2
  8983. sys_nerr
  8984. sys_warning
  8985. syserr_eqq
  8986. syserr_errno
  8987. syserr_initialize
  8988. sysexit_status
  8989. syslog_write
  8990. system_state
  8991. tCHAR
  8992. tCOMMENT
  8993. tEMBDOC
  8994. tEMBDOC_BEG
  8995. tEMBDOC_END
  8996. tHEREDOC_BEG
  8997. tHEREDOC_END
  8998. tIGNORED_NL
  8999. tSP
  9000. tanh
  9001. tcl2rb_bool
  9002. tcl2rb_num_or_str
  9003. tcl2rb_number
  9004. tcl2rb_string
  9005. tcl_eval
  9006. tcl_global_eval
  9007. tcl_protect
  9008. tcl_protect_core
  9009. tcl_stubs_check
  9010. tcl_stubs_init_p
  9011. tcltkip_init_tk
  9012. tcltklib_compile_info
  9013. tcp_accept
  9014. tcp_init
  9015. tcp_s_gethostbyname
  9016. tcp_sockaddr
  9017. tcp_svr_init
  9018. tcp_sysaccept
  9019. tell
  9020. telldir
  9021. terminate_process
  9022. test_R
  9023. test_S
  9024. test_W
  9025. test_X
  9026. test_b
  9027. test_c
  9028. test_check
  9029. test_d
  9030. test_e
  9031. test_f
  9032. test_grpowned
  9033. test_identical
  9034. test_l
  9035. test_owned
  9036. test_p
  9037. test_r
  9038. test_rowned
  9039. test_s
  9040. test_sgid
  9041. test_sticky
  9042. test_suid
  9043. test_w
  9044. test_wr
  9045. test_ww
  9046. test_x
  9047. test_z
  9048. thgroup_add
  9049. thgroup_enclose
  9050. thgroup_enclosed_p
  9051. thgroup_list
  9052. thgroup_s_alloc
  9053. thread_free
  9054. thread_insert
  9055. thread_keys_i
  9056. thread_mark
  9057. thread_reset_raised
  9058. thread_set_raised
  9059. thread_status_name
  9060. thread_timer
  9061. time
  9062. time2d
  9063. time_add
  9064. time_arg
  9065. time_asctime
  9066. time_cmp
  9067. time_dump
  9068. time_dup
  9069. time_eql
  9070. time_free
  9071. time_friday
  9072. time_get_tm
  9073. time_getgmtime
  9074. time_getlocaltime
  9075. time_gmtime
  9076. time_hash
  9077. time_hour
  9078. time_init
  9079. time_init_copy
  9080. time_isdst
  9081. time_load
  9082. time_localtime
  9083. time_mday
  9084. time_mdump
  9085. time_min
  9086. time_minus
  9087. time_mload
  9088. time_modify
  9089. time_mon
  9090. time_monday
  9091. time_new_internal
  9092. time_object2date
  9093. time_overflow_p
  9094. time_plus
  9095. time_s_alloc
  9096. time_s_at
  9097. time_s_mktime
  9098. time_s_mkutc
  9099. time_s_times
  9100. time_saturday
  9101. time_sec
  9102. time_strftime
  9103. time_succ
  9104. time_sunday
  9105. time_t
  9106. time_thursday
  9107. time_timeval
  9108. time_to_a
  9109. time_to_f
  9110. time_to_i
  9111. time_to_s
  9112. time_to_time_t
  9113. time_tuesday
  9114. time_usec
  9115. time_utc_offset
  9116. time_utc_or_local
  9117. time_utc_p
  9118. time_wday
  9119. time_wednesday
  9120. time_yday
  9121. time_year
  9122. time_zone
  9123. timeb
  9124. timegm_noleapsecond
  9125. timeofday
  9126. times
  9127. tkNone_to_s
  9128. tk_cbe_inspect
  9129. tk_conv_args
  9130. tk_do_callback
  9131. tk_eval_cmd
  9132. tk_fromUTF8
  9133. tk_funcall
  9134. tk_get_eval_enc_str
  9135. tk_get_eval_string
  9136. tk_hash_kv
  9137. tk_install_cmd
  9138. tk_install_cmd_core
  9139. tk_s_new
  9140. tk_stubs_init_p
  9141. tk_symbolkey2str
  9142. tk_toUTF8
  9143. tk_uninstall_cmd
  9144. tkobj_path
  9145. tkstr_invalid_numstr
  9146. tkstr_rescue_float
  9147. tkstr_to_dec
  9148. tkstr_to_float
  9149. tkstr_to_int
  9150. tkstr_to_number
  9151. tkstr_to_str
  9152. tmcmp
  9153. to_a
  9154. to_a_i
  9155. to_ary
  9156. to_char
  9157. to_digit
  9158. to_hash
  9159. to_s_hash
  9160. to_strkey
  9161. tok
  9162. tokadd
  9163. tokadd_escape
  9164. tokadd_string
  9165. tokenbuf
  9166. tokfix
  9167. tokidx
  9168. toklast
  9169. toklen
  9170. toksiz
  9171. too_many_files
  9172. top_include
  9173. top_local_init
  9174. top_local_init_gen
  9175. top_local_setup
  9176. top_local_setup_gen
  9177. top_private
  9178. top_public
  9179. tr_setup_table
  9180. tr_trans
  9181. trace_en
  9182. trace_ev
  9183. transitionTime
  9184. translate_char
  9185. trap
  9186. trap_ensure
  9187. trap_exec
  9188. trnext
  9189. true_and
  9190. true_or
  9191. true_to_s
  9192. true_xor
  9193. try
  9194. try_tag_implicit
  9195. try_wait_connectable
  9196. type_cclass_cmp
  9197. type_cclass_hash
  9198. type_cclass_key
  9199. typeinfo_from_ole
  9200. typelib_file
  9201. typelib_file_from_clsid
  9202. typelib_file_from_typelib
  9203. tzset
  9204. u_int
  9205. u_long
  9206. u_quad_t
  9207. u_short
  9208. udp_bind
  9209. udp_connect
  9210. udp_connect_internal
  9211. udp_init
  9212. udp_send
  9213. uid_t
  9214. uint32_t
  9215. uint64_t
  9216. uint8_t
  9217. umask
  9218. umethod_bind
  9219. undef_getter
  9220. undef_marker
  9221. undef_print
  9222. undef_setter
  9223. undefine_final
  9224. ungetc
  9225. uninitialized_constant
  9226. unix_accept
  9227. unix_addr
  9228. unix_init
  9229. unix_path
  9230. unix_peeraddr
  9231. unix_recv_io
  9232. unix_recvfrom
  9233. unix_s_socketpair
  9234. unix_send_io
  9235. unix_svr_init
  9236. unix_sysaccept
  9237. unixaddr
  9238. unixsock_connect_internal
  9239. unixtime_to_filetime
  9240. unknown_node
  9241. unlink
  9242. unlink_internal
  9243. unlink_undef
  9244. unset_addr_list_add
  9245. unset_addr_list_end
  9246. unset_addr_list_fix
  9247. unset_addr_list_init
  9248. unsetenv
  9249. unsigned_time_t
  9250. unswitch_mime_getc
  9251. update_i
  9252. url_getc
  9253. url_ungetc
  9254. usage
  9255. username_completion_proc_call
  9256. utf8_code_to_mbc
  9257. utf8_code_to_mbc_first
  9258. utf8_code_to_mbclen
  9259. utf8_get_ctype_code_range
  9260. utf8_is_code_ctype
  9261. utf8_is_mbc_ambiguous
  9262. utf8_islead
  9263. utf8_left_adjust_char_head
  9264. utf8_mbc_enc_len
  9265. utf8_mbc_to_code
  9266. utf8_mbc_to_normalize
  9267. utf8_to_uv
  9268. utime
  9269. utime_internal
  9270. uv_to_utf8
  9271. vDEFAULT_TOKEN
  9272. vERROR_TOKEN
  9273. vFINAL_TOKEN
  9274. va_alist
  9275. va_arg
  9276. va_dcl
  9277. va_end
  9278. va_init_list
  9279. va_list
  9280. va_start
  9281. val2dispatch
  9282. val_getter
  9283. val_marker
  9284. val_setter
  9285. valid_filename
  9286. validate
  9287. value_expr
  9288. value_expr_gen
  9289. value_to_id
  9290. values_i
  9291. var_getter
  9292. var_marker
  9293. var_setter
  9294. verbose_setter
  9295. version
  9296. void_expr
  9297. void_expr_gen
  9298. void_stmts
  9299. void_stmts_gen
  9300. vsnprintf
  9301. vtohd
  9302. vtohf
  9303. vtohl
  9304. vtohs
  9305. w16_status
  9306. w16e_conv
  9307. w16w_conv
  9308. w2e_conv
  9309. w32_io_info
  9310. w_byte
  9311. w_bytes
  9312. w_class
  9313. w_extended
  9314. w_float
  9315. w_iconv
  9316. w_iconv16
  9317. w_iconv_common
  9318. w_ivar
  9319. w_long
  9320. w_nbyte
  9321. w_obj_each
  9322. w_object
  9323. w_oconv
  9324. w_oconv16
  9325. w_short
  9326. w_status
  9327. w_symbol
  9328. w_uclass
  9329. w_unique
  9330. wait
  9331. wait_connectable
  9332. wait_connectable0
  9333. wait_connectable_ensure
  9334. wait_each
  9335. wait_events
  9336. wait_readable
  9337. wait_writable
  9338. waitall_each
  9339. waitpid
  9340. warn_print
  9341. warn_print2
  9342. warn_printf
  9343. warn_unless_e_option
  9344. warning_unless_e_option
  9345. was_bol
  9346. watchdog_evloop_launcher
  9347. wce_FILETIME2int64
  9348. wce_FILETIME2time_t
  9349. wce_FreeCommandLine
  9350. wce_SYSTEMTIME2tm
  9351. wce_SetCommandLine
  9352. wce_SetCurrentDir
  9353. wce_fopen
  9354. wce_getFILETIMEFromYear
  9355. wce_getYdayFromSYSTEMTIME
  9356. wce_int642FILETIME
  9357. wce_mbtowc
  9358. wce_replaceRelativeDir
  9359. wce_time_t2FILETIME
  9360. wce_tm2SYSTEMTIME
  9361. wce_wctomb
  9362. wday_p
  9363. weeknumber
  9364. whole_match_p
  9365. win32_get_exception_list
  9366. win32_set_exception_list
  9367. window_addch
  9368. window_addstr
  9369. window_addstr2
  9370. window_attroff
  9371. window_attron
  9372. window_attrset
  9373. window_begx
  9374. window_begy
  9375. window_bkgd
  9376. window_bkgdset
  9377. window_box
  9378. window_clear
  9379. window_close
  9380. window_clrtoeol
  9381. window_color_set
  9382. window_curx
  9383. window_cury
  9384. window_delch
  9385. window_deleteln
  9386. window_getbkgd
  9387. window_getch
  9388. window_getstr
  9389. window_idlok
  9390. window_inch
  9391. window_initialize
  9392. window_insch
  9393. window_insertln
  9394. window_keypad
  9395. window_maxx
  9396. window_maxy
  9397. window_move
  9398. window_nodelay
  9399. window_noutrefresh
  9400. window_refresh
  9401. window_resize
  9402. window_s_allocate
  9403. window_scrl
  9404. window_scroll
  9405. window_scrollok
  9406. window_setpos
  9407. window_setscrreg
  9408. window_standend
  9409. window_standout
  9410. window_subwin
  9411. window_timeout
  9412. winnt_stat
  9413. writable
  9414. write
  9415. wsplit_p
  9416. ww16_conv
  9417. x0212_shift
  9418. x0212_unshift
  9419. xalloca
  9420. xcalloc
  9421. xfree
  9422. xmalloc
  9423. xmalloc2
  9424. xmemcpy
  9425. xmemmove
  9426. xmemset
  9427. xrealloc
  9428. xrealloc2
  9429. yaml_org_handler
  9430. yamlbyte_buff_t
  9431. yamlbyte_char_t
  9432. yamlbyte_consumer_t
  9433. yamlbyte_inst_t
  9434. yamlbyte_producer_t
  9435. yamlbyte_result_t
  9436. yamlbyte_utf16_t
  9437. yamlbyte_utf8_t
  9438. yield_once
  9439. yield_under
  9440. yield_under_i
  9441. yield_until
  9442. yy_reduce_print
  9443. yy_stack_print
  9444. yychar
  9445. yyclearin
  9446. yycompile
  9447. yydebug
  9448. yydestruct
  9449. yyerrok
  9450. yyerror
  9451. yylex
  9452. yylval
  9453. yylval_id
  9454. yynerrs
  9455. yyparse
  9456. yysigned_char
  9457. yystpcpy
  9458. yystrlen
  9459. yystype
  9460. yysymprint
  9461. z_conv
  9462. zero
  9463. zip_i
  9464. zlib_mem_alloc
  9465. zlib_mem_free
  9466. zstream_append_buffer
  9467. zstream_append_buffer2
  9468. zstream_append_input
  9469. zstream_append_input2
  9470. zstream_buffer_ungetc
  9471. zstream_deflate_new
  9472. zstream_detach_buffer
  9473. zstream_detach_input
  9474. zstream_discard_input
  9475. zstream_end
  9476. zstream_expand_buffer
  9477. zstream_expand_buffer_into
  9478. zstream_free
  9479. zstream_inflate_new
  9480. zstream_init
  9481. zstream_init_deflate
  9482. zstream_init_inflate
  9483. zstream_mark
  9484. zstream_new
  9485. zstream_passthrough_input
  9486. zstream_reset
  9487. zstream_reset_input
  9488. zstream_run
  9489. zstream_shift_buffer
  9490. zstream_sync
[..]


FILES

  1. array.c
  2. ascii.c
  3. bignum.c
  4. class.c
  5. compar.c
  6. defines.h
  7. dir.c
  8. dln.c
  9. dln.h
  10. dmydln.c
  11. dmyext.c
  12. enum.c
  13. enumerator.c
  14. env.h
  15. error.c
  16. euc_jp.c
  17. eval.c
  18. ext/
  19. file.c
  20. gc.c
  21. hash.c
  22. ia64.s
  23. inits.c
  24. intern.h
  25. io.c
  26. lex.c
  27. main.c
  28. marshal.c
  29. math.c
  30. missing.h
  31. missing/
  32. node.h
  33. numeric.c
  34. object.c
  35. oniguruma.h
  36. pack.c
  37. parse.y
  38. prec.c
  39. process.c
  40. random.c
  41. range.c
  42. re.c
  43. re.h
  44. regcomp.c
  45. regenc.c
  46. regenc.h
  47. regerror.c
  48. regex.h
  49. regexec.c
  50. regint.h
  51. regparse.c
  52. regparse.h
  53. ruby.c
  54. ruby.h
  55. rubyio.h
  56. rubysig.h
  57. signal.c
  58. sjis.c
  59. sprintf.c
  60. st.c
  61. st.h
  62. string.c
  63. struct.c
  64. time.c
  65. utf8.c
  66. util.c
  67. util.h
  68. variable.c
  69. version.c
  70. version.h
  71. vms/
  72. win32/
  73. wince/
  74. x68/


HELP

Usage of Links

/* [<][>][^][v][top][bottom][index][help] */
[<]
Previous definition.
[>]
Next definition.
[^]
First definition in this file.
[v]
Last definition in this file.
[top]
Top of this file.
[bottom]
Bottom of this file.
[index]
Return to index page.
[help]
You are seeing now.


ADD_LEVEL

ADD_LEVEL          49 ext/syck/bytecode.c #define ADD_LEVEL(len, status)  syck_parser_add_level( parser, len, status )
ADD_LEVEL          48 ext/syck/token.c #define ADD_LEVEL(len, status)  syck_parser_add_level( parser, len, status )


AI_ADDRCONFIG

AI_ADDRCONFIG      54 ext/socket/addrinfo.h #undef AI_ADDRCONFIG
AI_ADDRCONFIG     110 ext/socket/addrinfo.h #define	AI_ADDRCONFIG	0x00000400 /* only if any address is assigned */


AI_ALL

AI_ALL             53 ext/socket/addrinfo.h #undef AI_ALL
AI_ALL            108 ext/socket/addrinfo.h #define	AI_ALL		0x00000100 /* IPv6 and IPv4-mapped (with AI_V4MAPPED) */


AI_CANONNAME

AI_CANONNAME       51 ext/socket/addrinfo.h #undef AI_CANONNAME
AI_CANONNAME      103 ext/socket/addrinfo.h #define	AI_CANONNAME	0x00000002 /* fill ai_canonname */


AI_DEFAULT

AI_DEFAULT         56 ext/socket/addrinfo.h #undef AI_DEFAULT
AI_DEFAULT        113 ext/socket/addrinfo.h #define	AI_DEFAULT	(AI_V4MAPPED_CFG | AI_ADDRCONFIG)


AI_NUMERICHOST

AI_NUMERICHOST     52 ext/socket/addrinfo.h #undef AI_NUMERICHOST
AI_NUMERICHOST    104 ext/socket/addrinfo.h #define	AI_NUMERICHOST	0x00000004 /* prevent name resolution */


AI_PASSIVE

AI_PASSIVE         50 ext/socket/addrinfo.h #undef AI_PASSIVE
AI_PASSIVE        102 ext/socket/addrinfo.h #define	AI_PASSIVE	0x00000001 /* get address to use bind() */


AI_V4MAPPED

AI_V4MAPPED        55 ext/socket/addrinfo.h #undef AI_V4MAPPED
AI_V4MAPPED       111 ext/socket/addrinfo.h #define	AI_V4MAPPED	0x00000800 /* accept IPv4-mapped IPv6 address */


ALLOCA_N

ALLOCA_N         2109 eval.c         # define TMP_ALLOC(n) ALLOCA_N(VALUE,n)
ALLOCA_N          486 ruby.h         #define ALLOCA_N(type,n) (type*)alloca(sizeof(type)*(n))


ANY

ANY                87 ext/socket/getaddrinfo.c #define ANY 0
ANY                77 ext/socket/getnameinfo.c #define ANY 0


ANYARGS

ANYARGS            39 defines.h      #define ANYARGS ...
ANYARGS            41 defines.h      #define ANYARGS
ANYARGS            35 st.h           #   define ANYARGS ...
ANYARGS            37 st.h           #   define ANYARGS


ASSERT

ASSERT             36 ext/syck/syck.h # define ASSERT(f) \
ASSERT             42 ext/syck/syck.h # define ASSERT(f)


ATOMIC_DEC

ATOMIC_DEC         23 rubysig.h      # define ATOMIC_DEC(var) InterlockedDecrement(&(var))
ATOMIC_DEC         46 rubysig.h      # define ATOMIC_DEC(var) (--(var))


ATOMIC_INC

ATOMIC_INC         22 rubysig.h      # define ATOMIC_INC(var) InterlockedIncrement(&(var))
ATOMIC_INC         45 rubysig.h      # define ATOMIC_INC(var) (++(var))


ATOMIC_SET

ATOMIC_SET         21 rubysig.h      # define ATOMIC_SET(var, val) InterlockedExchange(&(var), (val))
ATOMIC_SET         44 rubysig.h      # define ATOMIC_SET(var, val) ((var) = (val))


ATOMIC_TEST

ATOMIC_TEST        20 rubysig.h      # define ATOMIC_TEST(var) InterlockedExchange(&(var), 0)
ATOMIC_TEST        43 rubysig.h      # define ATOMIC_TEST(var) ((var) ? ((var) = 0, 1) : 0)


B64

B64                95 missing/crypt.c #define	B64	long
B64                98 missing/crypt.c #define	B64	long long


BDIGIT

BDIGIT             68 defines.h      # define BDIGIT unsigned int
BDIGIT             73 defines.h      # define BDIGIT unsigned int
BDIGIT             78 defines.h      # define BDIGIT unsigned short
BDIGIT             83 defines.h      # define BDIGIT unsigned short


BDIGIT_DBL

BDIGIT_DBL         70 defines.h      # define BDIGIT_DBL unsigned LONG_LONG
BDIGIT_DBL         75 defines.h      # define BDIGIT_DBL unsigned long
BDIGIT_DBL         80 defines.h      # define BDIGIT_DBL unsigned long
BDIGIT_DBL         85 defines.h      # define BDIGIT_DBL unsigned long


BDIGIT_DBL_SIGNED

BDIGIT_DBL_SIGNED   71 defines.h      # define BDIGIT_DBL_SIGNED LONG_LONG
BDIGIT_DBL_SIGNED   76 defines.h      # define BDIGIT_DBL_SIGNED long
BDIGIT_DBL_SIGNED   81 defines.h      # define BDIGIT_DBL_SIGNED long
BDIGIT_DBL_SIGNED   86 defines.h      # define BDIGIT_DBL_SIGNED long


BEG

BEG                24 re.c           #define BEG(no) regs->beg[no]
BEG                18 string.c       #define BEG(no) regs->beg[no]


BIG_CRITERIA

BIG_CRITERIA       23 missing/acosh.c #define BIG_CRITERIA (1.0*BIG_CRITERIA_BIT)
BIG_CRITERIA       25 missing/acosh.c #define BIG_CRITERIA (1.0*(1<<DBL_MANT_DIG/4)*(1<<(DBL_MANT_DIG/2+1-DBL_MANT_DIG/4)))


BIG_GET32

BIG_GET32         379 random.c       # define BIG_GET32(big,i) (((BDIGIT *)(big)->digits)[(i)*2] | \
BIG_GET32         387 random.c       # define BIG_GET32(big,i) (((BDIGIT *)(big)->digits)[i])


BIG_SET32

BIG_SET32         382 random.c       # define BIG_SET32(big,i,d) ((((BDIGIT *)(big)->digits)[(i)*2] = (d) & 0xffff), \
BIG_SET32         388 random.c       # define BIG_SET32(big,i,d) (((BDIGIT *)(big)->digits)[i] = (d))


BITSET_SIZE

BITSET_SIZE       398 regint.h       #define BITSET_SIZE        (SINGLE_BYTE_SIZE / BITS_IN_ROOM)
BITSET_SIZE       405 regint.h       typedef Bits           BitSet[BITSET_SIZE];


BUF

BUF               437 missing/vsnprintf.c #define	BUF		(MAXEXP+MAXFRACT+1)	/* + decimal point */
BUF               445 missing/vsnprintf.c #define	BUF		68


Bits

Bits              401 regint.h       typedef unsigned int   Bits;
Bits              403 regint.h       typedef unsigned char  Bits;


C

C                10255 eval.c         #define C(a) rse_##a##0, rse_##a##1, rse_##a##2, rse_##a##3, rse_##a##4
C                10282 eval.c         #undef C
C                 378 util.c         #define C ((int*)c)


CASE

CASE              275 ext/dl/cfunc.c #define CASE(n) case n: { \
CASE              281 ext/dl/cfunc.c #undef CASE
CASE              284 ext/dl/cfunc.c #define CASE(n) case n: { \
CASE              291 ext/dl/cfunc.c #undef CASE
CASE              294 ext/dl/cfunc.c #define CASE(n) case n: { \
CASE              301 ext/dl/cfunc.c #undef CASE
CASE              304 ext/dl/cfunc.c #define CASE(n) case n: { \
CASE              311 ext/dl/cfunc.c #undef CASE
CASE              314 ext/dl/cfunc.c #define CASE(n) case n: { \
CASE              321 ext/dl/cfunc.c #undef CASE
CASE              324 ext/dl/cfunc.c #define CASE(n) case n: { \
CASE              331 ext/dl/cfunc.c #undef CASE
CASE              335 ext/dl/cfunc.c #define CASE(n) case n: { \
CASE              342 ext/dl/cfunc.c #undef CASE
CASE              346 ext/dl/cfunc.c #define CASE(n) case n: { \
CASE              353 ext/dl/cfunc.c #undef CASE
CASE              356 ext/dl/cfunc.c #define CASE(n) case n: { \
CASE              363 ext/dl/cfunc.c #undef CASE
CASE              373 ext/dl/cfunc.c #define CASE(n) case n: { \
CASE              379 ext/dl/cfunc.c #undef CASE
CASE              382 ext/dl/cfunc.c #define CASE(n) case n: { \
CASE              389 ext/dl/cfunc.c #undef CASE
CASE              392 ext/dl/cfunc.c #define CASE(n) case n: { \
CASE              399 ext/dl/cfunc.c #undef CASE
CASE              402 ext/dl/cfunc.c #define CASE(n) case n: { \
CASE              409 ext/dl/cfunc.c #undef CASE
CASE              412 ext/dl/cfunc.c #define CASE(n) case n: { \
CASE              419 ext/dl/cfunc.c #undef CASE
CASE              422 ext/dl/cfunc.c #define CASE(n) case n: { \
CASE              429 ext/dl/cfunc.c #undef CASE
CASE              433 ext/dl/cfunc.c #define CASE(n) case n: { \
CASE              440 ext/dl/cfunc.c #undef CASE
CASE              444 ext/dl/cfunc.c #define CASE(n) case n: { \
CASE              451 ext/dl/cfunc.c #undef CASE
CASE              454 ext/dl/cfunc.c #define CASE(n) case n: { \
CASE              461 ext/dl/cfunc.c #undef CASE


CASEFOLD_FILESYSTEM

CASEFOLD_FILESYSTEM   72 dir.c          #   define CASEFOLD_FILESYSTEM 1
CASEFOLD_FILESYSTEM   74 dir.c          #   define CASEFOLD_FILESYSTEM 0


CClassNode

CClassNode        763 regint.h       } CClassNode;
CClassNode        118 regparse.h     } CClassNode;


CHECK

CHECK              73 ext/curses/curses.c #define CHECK(c) c
CHECK            3156 file.c         #define CHECK(n) test_check((n), argc, argv)
CHECK              82 sprintf.c      #define CHECK(l) do {\


CHECK_DLERROR

CHECK_DLERROR     136 ext/dl/handle.c # define CHECK_DLERROR if( err = dlerror() ){ func = 0; }
CHECK_DLERROR     138 ext/dl/handle.c # define CHECK_DLERROR


CHECK_INTERRUPT

CHECK_INTERRUPT    86 regint.h       #define CHECK_INTERRUPT             /* depend on application */
CHECK_INTERRUPT   100 regint.h       #define CHECK_INTERRUPT do {\


CHECK_INTERRUPT_IN_MATCH_AT

CHECK_INTERRUPT_IN_MATCH_AT 1042 regexec.c      #define CHECK_INTERRUPT_IN_MATCH_AT do {\
CHECK_INTERRUPT_IN_MATCH_AT 1050 regexec.c      #define CHECK_INTERRUPT_IN_MATCH_AT


CHECK_INTS

CHECK_INTS         84 rubysig.h      # define CHECK_INTS do {\
CHECK_INTS         94 rubysig.h      #define CHECK_INTS do {\


CHUNKBITS

CHUNKBITS         278 missing/crypt.c #define	CHUNKBITS	(1<<LGCHUNKBITS)
CHUNKBITS         296 missing/crypt.c #define	CHUNKBITS	(1<<LGCHUNKBITS)


CIPHER_0ARG_INT

CIPHER_0ARG_INT   331 ext/openssl/ossl_cipher.c #define CIPHER_0ARG_INT(func)					\
CIPHER_0ARG_INT   339 ext/openssl/ossl_cipher.c CIPHER_0ARG_INT(key_length)


COLLISION

COLLISION         217 st.c           #define COLLISION collision++
COLLISION         219 st.c           #define COLLISION


COMMAND

COMMAND           933 process.c      #define COMMAND "command.x"
COMMAND           936 process.c      #define COMMAND "cmd.exe"
COMMAND           939 process.c      #define COMMAND "command.com"


CONST

CONST             270 ext/nkf/nkf-utf8/nkf.c #define CONST const
CONST             274 ext/nkf/nkf-utf8/nkf.c #define CONST
CONST              49 ext/tk/tcltklib.c #  define CONST


CONST84

CONST84            36 ext/tk/tcltklib.c #   define CONST84
CONST84            39 ext/tk/tcltklib.c #    define CONST84 CONST
CONST84            41 ext/tk/tcltklib.c #    define CONST84
CONST84            47 ext/tk/tcltklib.c #  define CONST84 CONST
CONST84            50 ext/tk/tcltklib.c #  define CONST84


CURRENT_LEVEL

CURRENT_LEVEL      51 ext/syck/bytecode.c #define CURRENT_LEVEL() syck_parser_current_level( parser )
CURRENT_LEVEL      50 ext/syck/token.c #define CURRENT_LEVEL() syck_parser_current_level( parser )


CallFrame

CallFrame         432 ext/tk/tcltklib.c } CallFrame;
CallFrame         487 ext/tk/tcltklib.c } CallFrame;


CharNext

CharNext         2241 file.c         #   define CharNext(p) ((p) + mblen(p, RUBY_MBCHAR_MAXSIZE))
CharNext         2243 file.c         #   define CharNext(p) ((p) + 1)
CharNext           32 win32/win32.h  #undef CharNext
CharNext           33 win32/win32.h  #define CharNext CharNextA
CharNext           86 wince/wince.h  #undef CharNext
CharNext           87 wince/wince.h  #define CharNext CharNextA


CharPrev

CharPrev           89 wince/wince.h  #undef CharPrev
CharPrev           90 wince/wince.h  #define CharPrev CharPrevA


Compare

Compare           116 dir.c          # define Compare(p1, p2) (compare(downcase(*(p1)), downcase(*(p2))))
Compare           119 dir.c          # define Compare(p1, p2) (CompareImpl(p1, p2, nocase))


CreateFile

CreateFile         74 wince/wince.h  #undef CreateFile
CreateFile         75 wince/wince.h  #define CreateFile CreateFileA


CreateProcess

CreateProcess      83 wince/wince.h  #undef CreateProcess
CreateProcess      84 wince/wince.h  #define CreateProcess CreateProcessA


CreateSignal

CreateSignal       63 win32/win32.c  # define CreateSignal() (HANDLE)WSACreateEvent()
CreateSignal       68 win32/win32.c  # define CreateSignal() CreateEvent(NULL, FALSE, FALSE, NULL);


DBL_MANT_DIG

DBL_MANT_DIG       19 missing/acosh.c #define DBL_MANT_DIG 53		/* in this case, at least 12 digit precision */
DBL_MANT_DIG       60 numeric.c      #define DBL_MANT_DIG 53


DECL_FUNC

DECL_FUNC         226 ext/dl/cfunc.c # define DECL_FUNC(f,ret,args,calltype)  ret (__attribute__((calltype)) *f)(args)
DECL_FUNC         229 ext/dl/cfunc.c # define DECL_FUNC(f,ret,args,calltype)  ret (__##calltype *f)(args)


DEFAULT_CONV

DEFAULT_CONV      529 ext/nkf/nkf-utf8/nkf.c #   define  DEFAULT_CONV j_oconv
DEFAULT_CONV      532 ext/nkf/nkf-utf8/nkf.c #   define  DEFAULT_CONV s_oconv
DEFAULT_CONV      535 ext/nkf/nkf-utf8/nkf.c #   define  DEFAULT_CONV e_oconv
DEFAULT_CONV      538 ext/nkf/nkf-utf8/nkf.c #   define  DEFAULT_CONV w_oconv


DEFAULT_KCODE

DEFAULT_KCODE     103 defines.h      #define DEFAULT_KCODE KCODE_SJIS
DEFAULT_KCODE     105 defines.h      #define DEFAULT_KCODE KCODE_EUC
DEFAULT_KCODE     100 vms/config.h   #define DEFAULT_KCODE KCODE_EUC


DEFINE_MOUSE_GET_MEMBER

DEFINE_MOUSE_GET_MEMBER  711 ext/curses/curses.c #define DEFINE_MOUSE_GET_MEMBER(func_name,mem) \
DEFINE_MOUSE_GET_MEMBER  719 ext/curses/curses.c DEFINE_MOUSE_GET_MEMBER(curs_mouse_id, id)


DEF_MEM_LEVEL

DEF_MEM_LEVEL      25 ext/zlib/zlib.c #define DEF_MEM_LEVEL  8
DEF_MEM_LEVEL      27 ext/zlib/zlib.c #define DEF_MEM_LEVEL  MAX_MEM_LEVEL


DH_PRIVATE

DH_PRIVATE         25 ext/openssl/ossl_pkey_dh.c #  define DH_PRIVATE(dh) (DH_HAS_PRIVATE(dh) || (dh)->engine)
DH_PRIVATE         27 ext/openssl/ossl_pkey_dh.c #  define DH_PRIVATE(dh) DH_HAS_PRIVATE(dh)


DLEXT

DLEXT              72 ext/tk/stubs.c # undef DLEXT
DLEXT              73 ext/tk/stubs.c # define DLEXT ".dll"
DLEXT             101 vms/config.h   #define DLEXT ".EXE"


DLN_DEFINED

DLN_DEFINED      1314 dln.c          #define DLN_DEFINED
DLN_DEFINED      1349 dln.c          #define DLN_DEFINED
DLN_DEFINED      1375 dln.c          #define DLN_DEFINED
DLN_DEFINED      1392 dln.c          #define DLN_DEFINED
DLN_DEFINED      1469 dln.c          # define DLN_DEFINED
DLN_DEFINED      1516 dln.c          # define DLN_DEFINED
DLN_DEFINED      1563 dln.c          #define DLN_DEFINED


DLSTACK_PROTO14

DLSTACK_PROTO14    60 ext/dl/dl.h    #define DLSTACK_PROTO14 DLSTACK_PROTO13, DLSTACK_TYPE
DLSTACK_PROTO14    61 ext/dl/dl.h    #define DLSTACK_PROTO14 DLSTACK_PROTO13, DLSTACK_TYPE


DLSTACK_PROTO4

DLSTACK_PROTO4     49 ext/dl/dl.h    #define DLSTACK_PROTO4 DLSTACK_PROTO3, DLSTACK_TYPE
DLSTACK_PROTO4     50 ext/dl/dl.h    #define DLSTACK_PROTO4 DLSTACK_PROTO3, DLSTACK_TYPE


DL_HANDLE

DL_HANDLE          65 ext/tk/stubs.c   typedef HINSTANCE DL_HANDLE;
DL_HANDLE          76 ext/tk/stubs.c   typedef void *DL_HANDLE;


DL_OPEN

DL_OPEN            66 ext/tk/stubs.c # define DL_OPEN LoadLibrary
DL_OPEN            77 ext/tk/stubs.c # define DL_OPEN(file) dlopen(file, RTLD_LAZY|RTLD_GLOBAL)


DL_SYM

DL_SYM             67 ext/tk/stubs.c # define DL_SYM GetProcAddress
DL_SYM             78 ext/tk/stubs.c # define DL_SYM dlsym


DOSISH

DOSISH             94 defines.h      #define DOSISH 1
DOSISH           2248 file.c         #undef DOSISH


DOSISH_DRIVE_LETTER

DOSISH_DRIVE_LETTER   96 defines.h      # define DOSISH_DRIVE_LETTER
DOSISH_DRIVE_LETTER 2250 file.c         #define DOSISH_DRIVE_LETTER


DOSISH_UNC

DOSISH_UNC       2234 file.c         #define DOSISH_UNC
DOSISH_UNC       2249 file.c         #define DOSISH_UNC


DOUBLE_CONVWITH

DOUBLE_CONVWITH   308 pack.c         #define DOUBLE_CONVWITH(y)	DOUBLE_SWAPPER y;
DOUBLE_CONVWITH   326 pack.c         #define DOUBLE_CONVWITH(y)


DOXOR

DOXOR             679 missing/crypt.c #define	DOXOR(x,y,i)	x^=SPTAB(SPE[0][i],B.b[i]); y^=SPTAB(SPE[1][i],B.b[i]);
DOXOR             683 missing/crypt.c #define	DOXOR(x,y,i)	j=B.b[i]; x^=SPTAB(SPE[0][i],j); y^=SPTAB(SPE[1][i],j);
DOXOR             686 missing/crypt.c #define	DOXOR(x,y,i)	k=B.b[i]; x^=SPTAB(SPE[0][i],k); y^=SPTAB(SPE[1][i],k);


D_printf

D_printf          227 ext/racc/cparse/cparse.c # define D_printf(fmt,arg)  if (v->sys_debug) printf(fmt,arg)
D_printf          230 ext/racc/cparse/cparse.c # define D_printf(fmt,arg)


D_puts

D_puts            226 ext/racc/cparse/cparse.c # define D_puts(msg)        if (v->sys_debug) puts(msg)
D_puts            229 ext/racc/cparse/cparse.c # define D_puts(msg)


Debug

Debug              74 win32/win32.c  #define Debug(something) something
Debug              76 win32/win32.c  #define Debug(something) /* nothing */


DeleteFile

DeleteFile         80 wince/wince.h  #undef DeleteFile
DeleteFile         81 wince/wince.h  #define DeleteFile DeleteFileA


E

E                10256 eval.c         #define E(a) rse_##a##0= rse_##a##1= rse_##a##2= rse_##a##3= rse_##a##4
E                10283 eval.c         #undef E


EAI_ADDRFAMILY

EAI_ADDRFAMILY     35 ext/socket/addrinfo.h #undef EAI_ADDRFAMILY
EAI_ADDRFAMILY     84 ext/socket/addrinfo.h #define	EAI_ADDRFAMILY	 1	/* address family for hostname not supported */


EAI_AGAIN

EAI_AGAIN          36 ext/socket/addrinfo.h #undef EAI_AGAIN
EAI_AGAIN          85 ext/socket/addrinfo.h #define	EAI_AGAIN	 2	/* temporary failure in name resolution */


EAI_BADFLAGS

EAI_BADFLAGS       37 ext/socket/addrinfo.h #undef EAI_BADFLAGS
EAI_BADFLAGS       86 ext/socket/addrinfo.h #define	EAI_BADFLAGS	 3	/* invalid value for ai_flags */


EAI_BADHINTS

EAI_BADHINTS       46 ext/socket/addrinfo.h #undef EAI_BADHINTS
EAI_BADHINTS       95 ext/socket/addrinfo.h #define EAI_BADHINTS	12


EAI_FAIL

EAI_FAIL           38 ext/socket/addrinfo.h #undef EAI_FAIL
EAI_FAIL           87 ext/socket/addrinfo.h #define	EAI_FAIL	 4	/* non-recoverable failure in name resolution */


EAI_FAMILY

EAI_FAMILY         39 ext/socket/addrinfo.h #undef EAI_FAMILY
EAI_FAMILY         88 ext/socket/addrinfo.h #define	EAI_FAMILY	 5	/* ai_family not supported */


EAI_MAX

EAI_MAX            48 ext/socket/addrinfo.h #undef EAI_MAX
EAI_MAX            97 ext/socket/addrinfo.h #define EAI_MAX		14


EAI_MEMORY

EAI_MEMORY         40 ext/socket/addrinfo.h #undef EAI_MEMORY
EAI_MEMORY         89 ext/socket/addrinfo.h #define	EAI_MEMORY	 6	/* memory allocation failure */


EAI_NODATA

EAI_NODATA         41 ext/socket/addrinfo.h #undef EAI_NODATA
EAI_NODATA         90 ext/socket/addrinfo.h #define	EAI_NODATA	 7	/* no address associated with hostname */


EAI_NONAME

EAI_NONAME         42 ext/socket/addrinfo.h #undef EAI_NONAME
EAI_NONAME         91 ext/socket/addrinfo.h #define	EAI_NONAME	 8	/* hostname nor servname provided, or not known */


EAI_PROTOCOL

EAI_PROTOCOL       47 ext/socket/addrinfo.h #undef EAI_PROTOCOL
EAI_PROTOCOL       96 ext/socket/addrinfo.h #define EAI_PROTOCOL	13


EAI_SERVICE

EAI_SERVICE        43 ext/socket/addrinfo.h #undef EAI_SERVICE
EAI_SERVICE        92 ext/socket/addrinfo.h #define	EAI_SERVICE	 9	/* servname not supported for ai_socktype */


EAI_SOCKTYPE

EAI_SOCKTYPE       44 ext/socket/addrinfo.h #undef EAI_SOCKTYPE
EAI_SOCKTYPE       93 ext/socket/addrinfo.h #define	EAI_SOCKTYPE	10	/* ai_socktype not supported */


EAI_SYSTEM

EAI_SYSTEM         45 ext/socket/addrinfo.h #undef EAI_SYSTEM
EAI_SYSTEM         94 ext/socket/addrinfo.h #define	EAI_SYSTEM	11	/* system error returned in errno */


END

END                25 re.c           #define END(no) regs->end[no]
END                19 string.c       #define END(no) regs->end[no]


ENSURE_YAML_IEND

ENSURE_YAML_IEND  108 ext/syck/bytecode.c #define ENSURE_YAML_IEND(last_lvl, to_len) \
ENSURE_YAML_IEND   80 ext/syck/token.c #define ENSURE_YAML_IEND(last_lvl, to_len) \


ENSURE_YAML_IOPEN

ENSURE_YAML_IOPEN   89 ext/syck/bytecode.c #define ENSURE_YAML_IOPEN(last_lvl, lvl_type, to_len, reset) \
ENSURE_YAML_IOPEN   61 ext/syck/token.c #define ENSURE_YAML_IOPEN(last_lvl, to_len, reset) \


EPERM

EPERM              91 ext/sdbm/_sdbm.c #define EPERM	EACCES
EPERM               5 wince/errno.h  #define EPERM           1


EWOULDBLOCK

EWOULDBLOCK        66 ext/socket/socket.c #define EWOULDBLOCK EAGAIN
EWOULDBLOCK       335 win32/win32.h  #define EWOULDBLOCK	WSAEWOULDBLOCK


EXIT_FAILURE

EXIT_FAILURE       28 eval.c         #define EXIT_FAILURE 1
EXIT_FAILURE       40 process.c      #define EXIT_FAILURE 1


EXIT_SUCCESS

EXIT_SUCCESS       23 error.c        #define EXIT_SUCCESS 0
EXIT_SUCCESS       25 eval.c         #define EXIT_SUCCESS 0
EXIT_SUCCESS       37 process.c      #define EXIT_SUCCESS 0


EXTEND16

EXTEND16          355 pack.c         # define EXTEND16(x)
EXTEND16          357 pack.c         # define EXTEND16(x) do { if (!natint) {(x) = (short)(((1<<15)-1-(x))^~(~0<<15));}} while(0)


EXTEND32

EXTEND32          349 pack.c         # define EXTEND32(x)
EXTEND32          352 pack.c         # define EXTEND32(x) do {if (!natint) {(x) = (I32)(((1<<31)-1-(x))^~(~0<<31));}} while(0)


EXTERN

EXTERN            207 defines.h      #define EXTERN RUBY_EXTERN	/* deprecated */
EXTERN             12 ext/tk/tcltklib.c #undef EXTERN   /* avoid conflict with tcl.h of tcl8.2 or before */


F

F                 235 ext/digest/md5/md5.c #define F(x, y, z) (((x) & (y)) | (~(x) & (z)))
F                  67 ext/digest/rmd160/rmd160.c #define F(x, y, z)	((x) ^ (y) ^ (z))


FALSE

FALSE             174 ext/nkf/nkf-utf8/nkf.c #define         FALSE   0
FALSE              43 ext/nkf/nkf.c  #undef FALSE
FALSE              38 missing/strtod.c #define FALSE 0
FALSE              46 regenc.h       #define FALSE   0
FALSE             668 util.c         #define FALSE 0


FD_CLR

FD_CLR           9678 eval.c         #undef FD_CLR
FD_CLR           9683 eval.c         #define FD_CLR(i, f)	rb_fd_clr(i, f)
FD_CLR           1863 win32/win32.c  #undef FD_CLR
FD_CLR            379 win32/win32.h  #undef FD_CLR
FD_CLR            380 win32/win32.h  #define FD_CLR(f, s)		rb_w32_fdclr(f, s)


FD_ISSET

FD_ISSET         9679 eval.c         #undef FD_ISSET
FD_ISSET         9684 eval.c         #define FD_ISSET(i, f)	rb_fd_isset(i, f)
FD_ISSET         1883 win32/win32.c  #undef FD_ISSET
FD_ISSET          382 win32/win32.h  #undef FD_ISSET
FD_ISSET          383 win32/win32.h  #define FD_ISSET(f, s)		rb_w32_fdisset(f, s)


FD_PASSING_BY_MSG_ACCRIGHTS

FD_PASSING_BY_MSG_ACCRIGHTS 1738 ext/socket/socket.c #define FD_PASSING_BY_MSG_ACCRIGHTS 1
FD_PASSING_BY_MSG_ACCRIGHTS 1740 ext/socket/socket.c #define FD_PASSING_BY_MSG_ACCRIGHTS 0


FD_PASSING_BY_MSG_CONTROL

FD_PASSING_BY_MSG_CONTROL 1732 ext/socket/socket.c #define FD_PASSING_BY_MSG_CONTROL 1
FD_PASSING_BY_MSG_CONTROL 1734 ext/socket/socket.c #define FD_PASSING_BY_MSG_CONTROL 0


FD_SET

FD_SET           9677 eval.c         #undef FD_SET
FD_SET           9682 eval.c         #define FD_SET(i, f)	rb_fd_set(i, f)
FD_SET           1842 win32/win32.c  #undef FD_SET
FD_SET            376 win32/win32.h  #undef FD_SET
FD_SET            377 win32/win32.h  #define FD_SET(f, s)		rb_w32_fdset(f, s)


FD_ZERO

FD_ZERO          9676 eval.c         #undef FD_ZERO
FD_ZERO          9681 eval.c         #define FD_ZERO(f)	rb_fd_zero(f)


FILE

FILE              176 missing/vsnprintf.c } FILE;
FILE              824 sprintf.c      #undef FILE
FILE              825 sprintf.c      #define FILE rb_printf_buffer


FIONREAD_POSSIBLE_P

FIONREAD_POSSIBLE_P   32 ext/io/wait/wait.c #define FIONREAD_POSSIBLE_P(fd) rb_w32_is_socket(fd)
FIONREAD_POSSIBLE_P   34 ext/io/wait/wait.c #define FIONREAD_POSSIBLE_P(fd) ((fd),Qtrue)


FIX2INT

FIX2INT           273 ruby.h         #define FIX2INT(x) rb_fix2int((VALUE)x)
FIX2INT           281 ruby.h         #define FIX2INT(x) ((int)FIX2LONG(x))


FIX2UINT

FIX2UINT          277 ruby.h         #define FIX2UINT(x) rb_fix2uint(x)
FIX2UINT          282 ruby.h         #define FIX2UINT(x) ((unsigned int)FIX2ULONG(x))


FLOAT_CONVWITH

FLOAT_CONVWITH    282 pack.c         #define FLOAT_CONVWITH(y)	FLOAT_SWAPPER y;
FLOAT_CONVWITH    300 pack.c         #define FLOAT_CONVWITH(y)


FLOAT_DIG

FLOAT_DIG         271 marshal.c      #define FLOAT_DIG (DBL_DIG+2)
FLOAT_DIG         273 marshal.c      #define FLOAT_DIG 17


FLUSH_REGISTER_WINDOWS

FLUSH_REGISTER_WINDOWS  232 defines.h      #  define FLUSH_REGISTER_WINDOWS flush_register_windows()
FLUSH_REGISTER_WINDOWS  236 defines.h      #  define FLUSH_REGISTER_WINDOWS rb_ia64_flushrs()
FLUSH_REGISTER_WINDOWS  238 defines.h      #  define FLUSH_REGISTER_WINDOWS ((void)0)


FNM_SYSCASE

FNM_SYSCASE        83 dir.c          #define FNM_SYSCASE	FNM_CASEFOLD
FNM_SYSCASE        85 dir.c          #define FNM_SYSCASE	0


FORCE_NEXT_TOKEN

FORCE_NEXT_TOKEN   56 ext/syck/bytecode.c #define FORCE_NEXT_TOKEN(tok)    parser->force_token = tok;
FORCE_NEXT_TOKEN   55 ext/syck/token.c #define FORCE_NEXT_TOKEN(tok)    parser->force_token = tok;


FOREACH_BITLEN

FOREACH_BITLEN      7 ext/digest/sha2/sha2init.c #define FOREACH_BITLEN(func)	func(256) func(384) func(512)
FOREACH_BITLEN     20 ext/digest/sha2/sha2init.c FOREACH_BITLEN(DEFINE_ALGO_METADATA)


FREE_ENVIRON

FREE_ENVIRON     1501 hash.c         #define FREE_ENVIRON(e) rb_w32_free_environ(e)
FREE_ENVIRON     1509 hash.c         #define FREE_ENVIRON(e)
FREE_ENVIRON     1513 hash.c         #define FREE_ENVIRON(e)


FUNCNAME_PATTERN

FUNCNAME_PATTERN  103 dln.c          #  define FUNCNAME_PATTERN "_Init_%s"
FUNCNAME_PATTERN  105 dln.c          #  define FUNCNAME_PATTERN "Init_%s"


FUNCTION_CALL_MAY_RETURN_TWICE

FUNCTION_CALL_MAY_RETURN_TWICE  142 eval.c         #define FUNCTION_CALL_MAY_RETURN_TWICE \
FUNCTION_CALL_MAY_RETURN_TWICE  150 eval.c         #define FUNCTION_CALL_MAY_RETURN_TWICE \
FUNCTION_CALL_MAY_RETURN_TWICE  155 eval.c         #define FUNCTION_CALL_MAY_RETURN_TWICE 0
FUNCTION_CALL_MAY_RETURN_TWICE  158 eval.c         #define FUNCTION_CALL_MAY_RETURN_TWICE 0


F_SETFL

F_SETFL           373 win32/win32.h  #define F_SETFL 1
F_SETFL             6 wince/fcntl.h  #define F_SETFL         1


FindFirstFile

FindFirstFile      95 wince/wince.h  #undef FindFirstFile
FindFirstFile      96 wince/wince.h  #define FindFirstFile FindFirstFileA


FindNextFile

FindNextFile       98 wince/wince.h  #undef FindNextFile
FindNextFile       99 wince/wince.h  #define FindNextFile FindNextFileA


FormatMessage

FormatMessage    1153 dln.c          #undef FormatMessage
FormatMessage    1154 dln.c          #define FormatMessage FormatMessageA
FormatMessage      68 wince/wince.h  #undef FormatMessage
FormatMessage      69 wince/wince.h  #define FormatMessage FormatMessageA


G

G                 261 ext/digest/md5/md5.c #define G(x, y, z) (((x) & (z)) | ((y) & ~(z)))
G                  68 ext/digest/rmd160/rmd160.c #define G(x, y, z)	(((x) & (y)) | (~(x) & (z)))


GC_MALLOC_LIMIT

GC_MALLOC_LIMIT    66 gc.c           #define GC_MALLOC_LIMIT 200000
GC_MALLOC_LIMIT    68 gc.c           #define GC_MALLOC_LIMIT 8000000


GETTIME

GETTIME          1065 regexec.c      #define GETTIME(t)        gettimeofday(&(t), (struct timezone* )0)
GETTIME          1073 regexec.c      #define GETTIME(t)         times(&(t))


GET_ENVIRON

GET_ENVIRON      1500 hash.c         #define GET_ENVIRON(e) (e = rb_w32_get_environ())
GET_ENVIRON      1508 hash.c         #define GET_ENVIRON(e) (e)
GET_ENVIRON      1512 hash.c         #define GET_ENVIRON(e) (e)


GET_INT_INC

GET_INT_INC       310 regint.h       #define GET_INT_INC(i,p)       GET_2BYTE_INT_INC(int,i,p)
GET_INT_INC       315 regint.h       #define GET_INT_INC(i,p)       GET_4BYTE_INT_INC(int,i,p)
GET_INT_INC       320 regint.h       #define GET_INT_INC(i,p)       GET_8BYTE_INT_INC(int,i,p)


GET_SHORT

GET_SHORT          53 ext/sdbm/_sdbm.c #define GET_SHORT(p, i)	(((unsigned)((unsigned char *)(p))[(i)*2] << 8) + (((unsigned char *)(p))[(i)*2 + 1]))
GET_SHORT          56 ext/sdbm/_sdbm.c #define GET_SHORT(p, i)	((p)[i])


GET_SHORT_INC

GET_SHORT_INC     299 regint.h       #define GET_SHORT_INC(i,p)     GET_2BYTE_INT_INC(short,i,p)
GET_SHORT_INC     302 regint.h       #define GET_SHORT_INC(i,p)     GET_4BYTE_INT_INC(short,i,p)
GET_SHORT_INC     305 regint.h       #define GET_SHORT_INC(i,p)     GET_8BYTE_INT_INC(short,i,p)


GET_UINT_INC

GET_UINT_INC      311 regint.h       #define GET_UINT_INC(i,p)      GET_2BYTE_INT_INC(unsigned,i,p)
GET_UINT_INC      316 regint.h       #define GET_UINT_INC(i,p)      GET_4BYTE_INT_INC(unsigned,i,p)
GET_UINT_INC      321 regint.h       #define GET_UINT_INC(i,p)      GET_8BYTE_INT_INC(unsigned,i,p)


GetCommandLine

GetCommandLine     59 wince/wince.h  #undef GetCommandLine
GetCommandLine     60 wince/wince.h  #define GetCommandLine GetCommandLineA


GetDBM

GetDBM             40 ext/dbm/dbm.c  #define GetDBM(obj, dbmp) {\
GetDBM             41 ext/gdbm/gdbm.c #define GetDBM(obj, dbmp) do {\
GetDBM             32 ext/sdbm/init.c #define GetDBM(obj, dbmp) {\


GetDBM2

GetDBM2            46 ext/dbm/dbm.c  #define GetDBM2(obj, data, dbm) {\
GetDBM2            47 ext/gdbm/gdbm.c #define GetDBM2(obj, data, dbm) {\
GetDBM2            38 ext/sdbm/init.c #define GetDBM2(obj, data, dbm) {\


GetFileAttributes

GetFileAttributes   65 wince/wince.h  #undef GetFileAttributes
GetFileAttributes   66 wince/wince.h  #define GetFileAttributes GetFileAttributesA


GetModuleFileName

GetModuleFileName   71 wince/wince.h  #undef GetModuleFileName
GetModuleFileName   72 wince/wince.h  #define GetModuleFileName GetModuleFileNameA


GetProcAddress

GetProcAddress   1157 dln.c          #undef GetProcAddress
GetProcAddress   1158 dln.c          #define GetProcAddress GetProcAddressA


H

H                 287 ext/digest/md5/md5.c #define H(x, y, z) ((x) ^ (y) ^ (z))
H                  69 ext/digest/rmd160/rmd160.c #define H(x, y, z)	(((x) | ~(y)) ^ (z))


HAVE_DLOPEN

HAVE_DLOPEN        21 dln.c          #undef HAVE_DLOPEN
HAVE_DLOPEN         9 vms/config.h   #define HAVE_DLOPEN 1


HAVE_GETPGRP

HAVE_GETPGRP       54 process.c      #undef HAVE_GETPGRP
HAVE_GETPGRP       23 vms/config.h   #define HAVE_GETPGRP 1


HAVE_LONG_LONG

HAVE_LONG_LONG     61 defines.h      # define HAVE_LONG_LONG 1
HAVE_LONG_LONG     35 vms/config.h   #define HAVE_LONG_LONG 1


HAVE_NATIVETHREAD

HAVE_NATIVETHREAD  721 ruby.h         # define HAVE_NATIVETHREAD
HAVE_NATIVETHREAD  729 ruby.h         # define HAVE_NATIVETHREAD


HAVE_PROTOTYPES

HAVE_PROTOTYPES    17 defines.h      #  define HAVE_PROTOTYPES 1
HAVE_PROTOTYPES    18 dln.h          #  define HAVE_PROTOTYPES 1
HAVE_PROTOTYPES    43 oniguruma.h    #  define HAVE_PROTOTYPES 1
HAVE_PROTOTYPES    19 util.h         #  define HAVE_PROTOTYPES 1


HAVE_STDARG_PROTOTYPES

HAVE_STDARG_PROTOTYPES   20 defines.h      #  define HAVE_STDARG_PROTOTYPES 1
HAVE_STDARG_PROTOTYPES   21 dln.h          #  define HAVE_STDARG_PROTOTYPES 1
HAVE_STDARG_PROTOTYPES   70 missing/vsnprintf.c #define HAVE_STDARG_PROTOTYPES 1
HAVE_STDARG_PROTOTYPES   46 oniguruma.h    #  define HAVE_STDARG_PROTOTYPES 1
HAVE_STDARG_PROTOTYPES   22 util.h         #  define HAVE_STDARG_PROTOTYPES 1
HAVE_STDARG_PROTOTYPES   55 vms/config.h   #define HAVE_STDARG_PROTOTYPES 1


HTOND

HTOND             309 pack.c         #define HTOND(x,y)	(memcpy(&y,&x,sizeof(double)),	\
HTOND             327 pack.c         #define HTOND(x,y)	htond(x)


HTONF

HTONF             283 pack.c         #define HTONF(x,y)	(memcpy(&y,&x,sizeof(float)),	\
HTONF             301 pack.c         #define HTONF(x,y)	htonf(x)


HTOVD

HTOVD             313 pack.c         #define HTOVD(x,y)	(memcpy(&y,&x,sizeof(double)),	\
HTOVD             328 pack.c         #define HTOVD(x,y)	htovd(x)


HTOVF

HTOVF             287 pack.c         #define HTOVF(x,y)	(memcpy(&y,&x,sizeof(float)),	\
HTOVF             302 pack.c         #define HTOVF(x,y)	htovf(x)


HZ

HZ               3529 process.c      #   define HZ CLK_TCK
HZ               3531 process.c      #   define HZ 60


I

I                 313 ext/digest/md5/md5.c #define I(x, y, z) ((y) ^ ((x) | ~(z)))
I                  70 ext/digest/rmd160/rmd160.c #define I(x, y, z)	(((x) & (z)) | ((y) & ~(z)))


IA64_INIT

IA64_INIT        11507 eval.c         # define IA64_INIT(x) x
IA64_INIT        11509 eval.c         # define IA64_INIT(x)


ICONV_INPTR_CAST

ICONV_INPTR_CAST  234 ext/iconv/iconv.c #define ICONV_INPTR_CAST
ICONV_INPTR_CAST  236 ext/iconv/iconv.c #define ICONV_INPTR_CAST (char **)


ID

ID                 92 ruby.h         typedef unsigned long ID;
ID                 95 ruby.h         typedef unsigned LONG_LONG ID;


IN_MAIN_CONTEXT

IN_MAIN_CONTEXT   444 signal.c       #define IN_MAIN_CONTEXT(f, a) (rb_w32_main_context(a, f) ? (void)0 : f(a))
IN_MAIN_CONTEXT   446 signal.c       #define IN_MAIN_CONTEXT(f, a) f(a)


ISPRINT

ISPRINT            66 ruby.h         #undef ISPRINT
ISPRINT            67 ruby.h         #define ISPRINT(c) (ISASCII(c) && isprint((int)(unsigned char)(c)))


IS_DLEXT

IS_DLEXT         6683 eval.c         #define IS_DLEXT(e) (strcmp(e, DLEXT) == 0 || strcmp(e, DLEXT2) == 0)
IS_DLEXT         6685 eval.c         #define IS_DLEXT(e) (strcmp(e, DLEXT) == 0)


Inc

Inc               115 dir.c          # define Inc(p) (++(p))
Inc               118 dir.c          # define Inc(p) ((p) = Next(p))


Init_ossl_dh

Init_ossl_dh      419 ext/openssl/ossl_pkey_dh.c Init_ossl_dh()
Init_ossl_dh      453 ext/openssl/ossl_pkey_dh.c Init_ossl_dh()


Init_ossl_dsa

Init_ossl_dsa     379 ext/openssl/ossl_pkey_dsa.c Init_ossl_dsa()
Init_ossl_dsa     412 ext/openssl/ossl_pkey_dsa.c Init_ossl_dsa()


Init_ossl_engine

Init_ossl_engine  345 ext/openssl/ossl_engine.c Init_ossl_engine()
Init_ossl_engine  390 ext/openssl/ossl_engine.c Init_ossl_engine()


Init_ossl_hmac

Init_ossl_hmac    192 ext/openssl/ossl_hmac.c Init_ossl_hmac()
Init_ossl_hmac    216 ext/openssl/ossl_hmac.c Init_ossl_hmac()


Init_ossl_ocsp

Init_ossl_ocsp    680 ext/openssl/ossl_ocsp.c Init_ossl_ocsp()
Init_ossl_ocsp    766 ext/openssl/ossl_ocsp.c Init_ossl_ocsp()


Init_ossl_rsa

Init_ossl_rsa     460 ext/openssl/ossl_pkey_rsa.c Init_ossl_rsa()
Init_ossl_rsa     508 ext/openssl/ossl_pkey_rsa.c Init_ossl_rsa()


LGCHUNKBITS

LGCHUNKBITS       277 missing/crypt.c #define	LGCHUNKBITS	3
LGCHUNKBITS       295 missing/crypt.c #define	LGCHUNKBITS	2


LK_ERR

LK_ERR            248 win32/win32.c  #define LK_ERR(f,i) ((f) ? (i = 0) : (errno = GetLastError() == ERROR_LOCK_VIOLATION ? EWOULDBLOCK : EACCES))
LK_ERR            316 win32/win32.c  #undef LK_ERR


LLONG_MAX

LLONG_MAX         122 ruby.h         #   define LLONG_MAX  LONG_LONG_MAX
LLONG_MAX         125 ruby.h         #    define LLONG_MAX _I64_MAX
LLONG_MAX         128 ruby.h         #    define LLONG_MAX 9223372036854775807LL


LLONG_MIN

LLONG_MIN         134 ruby.h         #   define LLONG_MIN  LONG_LONG_MIN
LLONG_MIN         137 ruby.h         #    define LLONG_MIN _I64_MIN
LLONG_MIN         139 ruby.h         #    define LLONG_MIN (-LLONG_MAX-1)


LOCK_EX

LOCK_EX          3031 file.c         #  define LOCK_EX 2
LOCK_EX            12 missing/flock.c #  define LOCK_EX 2
LOCK_EX            81 missing/flock.c #  define LOCK_EX 2
LOCK_EX           318 win32/win32.h  #define LOCK_EX 2


LOCK_NB

LOCK_NB          3034 file.c         #  define LOCK_NB 4
LOCK_NB            15 missing/flock.c #  define LOCK_NB 4
LOCK_NB            84 missing/flock.c #  define LOCK_NB 4
LOCK_NB           319 win32/win32.h  #define LOCK_NB 4


LOCK_SH

LOCK_SH          3028 file.c         #  define LOCK_SH 1
LOCK_SH             9 missing/flock.c #  define LOCK_SH 1
LOCK_SH            78 missing/flock.c #  define LOCK_SH 1
LOCK_SH           317 win32/win32.h  #define LOCK_SH 1


LOCK_UN

LOCK_UN          3037 file.c         #  define LOCK_UN 8
LOCK_UN            18 missing/flock.c #  define LOCK_UN 8
LOCK_UN            87 missing/flock.c #  define LOCK_UN 8
LOCK_UN           320 win32/win32.h  #define LOCK_UN 8


LONG2NUM

LONG2NUM           87 ext/racc/cparse/cparse.c #  define LONG2NUM(i) INT2NUM(i)
LONG2NUM          154 ruby.h         #define LONG2NUM(v) INT2NUM(v)


LONG_LONG

LONG_LONG          59 defines.h      # define LONG_LONG long long
LONG_LONG          62 defines.h      # define LONG_LONG __int64
LONG_LONG          12 vms/vms.h      #define LONG_LONG long long


LONG_MAX

LONG_MAX           99 missing/vsnprintf.c #   define LONG_MAX 2147483647
LONG_MAX          108 ruby.h         #   define LONG_MAX 2147483647


LoadLibrary

LoadLibrary      1155 dln.c          #undef LoadLibrary
LoadLibrary      1156 dln.c          #define LoadLibrary LoadLibraryA


M

M                  65 random.c       #define M 397
M                 175 random.c       #undef M


MANT_BITS

MANT_BITS         197 marshal.c      #define MANT_BITS 32
MANT_BITS         199 marshal.c      #define MANT_BITS 24
MANT_BITS         201 marshal.c      #define MANT_BITS 16
MANT_BITS         203 marshal.c      #define MANT_BITS 8


MAX

MAX               221 regint.h       #undef MAX
MAX               224 regint.h       #define MAX(a,b) (((a)<(b))?(b):(a))


MAXPATHLEN

MAXPATHLEN         65 dln.c          # define MAXPATHLEN 1024
MAXPATHLEN         39 file.c         # define MAXPATHLEN 1024
MAXPATHLEN         40 ruby.c         # define MAXPATHLEN 1024
MAXPATHLEN       1029 win32/win32.c  # define MAXPATHLEN 512


MD5_End

MD5_End           417 ext/digest/md5/md5.c MD5_End(MD5_CTX *pctx, uint8_t *hexdigest)
MD5_End            69 ext/digest/md5/md5.h #define MD5_End		rb_Digest_MD5_End
MD5_End             9 ext/digest/md5/md5ossl.c MD5_End(MD5_CTX *pctx, unsigned char *hexdigest)


MD5_Equal

MD5_Equal         428 ext/digest/md5/md5.c int MD5_Equal(MD5_CTX* pctx1, MD5_CTX* pctx2) {
MD5_Equal          70 ext/digest/md5/md5.h #define MD5_Equal	rb_Digest_MD5_Equal
MD5_Equal          21 ext/digest/md5/md5ossl.c MD5_Equal(MD5_CTX* pctx1, MD5_CTX* pctx2) {


MD5_Final

MD5_Final         394 ext/digest/md5/md5.c MD5_Final(uint8_t *digest, MD5_CTX *pms)
MD5_Final          68 ext/digest/md5/md5.h #define MD5_Final	rb_Digest_MD5_Final


MD5_Init

MD5_Init          346 ext/digest/md5/md5.c MD5_Init(MD5_CTX *pms)
MD5_Init           66 ext/digest/md5/md5.h #define MD5_Init	rb_Digest_MD5_Init


MD5_Update

MD5_Update        356 ext/digest/md5/md5.c MD5_Update(MD5_CTX *pms, const uint8_t *data, size_t nbytes)
MD5_Update         67 ext/digest/md5/md5.h #define MD5_Update	rb_Digest_MD5_Update


MEMCPY_BCOPY

MEMCPY_BCOPY      133 ext/digest/sha2/sha2.c #define MEMCPY_BCOPY(d,s,l)	memcpy((d), (s), (l))
MEMCPY_BCOPY      137 ext/digest/sha2/sha2.c #define MEMCPY_BCOPY(d,s,l)	bcopy((s), (d), (l))


MEMSET_BZERO

MEMSET_BZERO      132 ext/digest/sha2/sha2.c #define MEMSET_BZERO(p,l)	memset((p), 0, (l))
MEMSET_BZERO      136 ext/digest/sha2/sha2.c #define MEMSET_BZERO(p,l)	bzero((p), (l))


MIDST_DECL_CDECL

MIDST_DECL_CDECL   62 ext/dl/dl.c    # define MIDST_DECL_CDECL
MIDST_DECL_CDECL   69 ext/dl/dl.c    # define MIDST_DECL_CDECL     __cdecl


MIDST_DECL_STDCALL

MIDST_DECL_STDCALL   63 ext/dl/dl.c    # define MIDST_DECL_STDCALL
MIDST_DECL_STDCALL   70 ext/dl/dl.c    # define MIDST_DECL_STDCALL   __stdcall


MIN

MIN               248 missing/vsnprintf.c #define	MIN(a, b) ((a) < (b) ? (a) : (b))
MIN               218 regint.h       #undef MIN
MIN               223 regint.h       #define MIN(a,b) (((a)>(b))?(b):(a))


MODE_BINARY

MODE_BINARY      2535 io.c           # define MODE_BINARY(a,b) ((flags & O_BINARY) ? (b) : (a))
MODE_BINARY      2537 io.c           # define MODE_BINARY(a,b) (a)


MODE_BINMODE

MODE_BINMODE     2396 io.c           # define MODE_BINMODE(a,b) ((flags & FMODE_BINMODE) ? (b) : (a))
MODE_BINMODE     2398 io.c           # define MODE_BINMODE(a,b) (a)


MTHREAD_ONLY

MTHREAD_ONLY     1573 win32/win32.c  # define MTHREAD_ONLY(x) x
MTHREAD_ONLY     1576 win32/win32.c  # define MTHREAD_ONLY(x)
MTHREAD_ONLY     1579 win32/win32.c  # define MTHREAD_ONLY(x)


MoveFile

MoveFile           77 wince/wince.h  #undef MoveFile
MoveFile           78 wince/wince.h  #define MoveFile MoveFileA


N

N                  64 random.c       #define N 624
N                 174 random.c       #undef N


NAMLEN

NAMLEN             26 dir.c          # define NAMLEN(dirent) strlen((dirent)->d_name)
NAMLEN             29 dir.c          # define NAMLEN(dirent) strlen((dirent)->d_name)
NAMLEN             33 dir.c          #  define NAMLEN(dirent) (dirent)->d_namlen
NAMLEN             36 dir.c          #  define NAMLEN(dirent) strlen((dirent)->d_name)


NATINT_HTONL

NATINT_HTONL       35 pack.c         # define NATINT_HTONL(x) (natint?htonl(x):hton32(x))
NATINT_HTONL       41 pack.c         # define NATINT_HTONL(x) htonl(x)


NATINT_HTONS

NATINT_HTONS       34 pack.c         # define NATINT_HTONS(x) (natint?htons(x):hton16(x))
NATINT_HTONS       40 pack.c         # define NATINT_HTONS(x) htons(x)


NATINT_HTOVL

NATINT_HTOVL       33 pack.c         # define NATINT_HTOVL(x) (natint?htovl(x):htov32(x))
NATINT_HTOVL       39 pack.c         # define NATINT_HTOVL(x) htovl(x)


NATINT_HTOVS

NATINT_HTOVS       32 pack.c         # define NATINT_HTOVS(x) (natint?htovs(x):htov16(x))
NATINT_HTOVS       38 pack.c         # define NATINT_HTOVS(x) htovs(x)


NATINT_LEN

NATINT_LEN         27 pack.c         # define NATINT_LEN(type,len) (natint?sizeof(type):(len))
NATINT_LEN         37 pack.c         # define NATINT_LEN(type,len) sizeof(type)


NATIVETHREAD_CURRENT

NATIVETHREAD_CURRENT  719 ruby.h         # define NATIVETHREAD_CURRENT() pthread_self()
NATIVETHREAD_CURRENT  727 ruby.h         # define NATIVETHREAD_CURRENT() GetCurrentThreadId()


NATIVETHREAD_EQUAL

NATIVETHREAD_EQUAL  720 ruby.h         # define NATIVETHREAD_EQUAL(t1,t2) pthread_equal((t1),(t2))
NATIVETHREAD_EQUAL  728 ruby.h         # define NATIVETHREAD_EQUAL(t1,t2) ((t1) == (t2))


NEW_STRTERM

NEW_STRTERM      5144 parse.y        # define NEW_STRTERM(func, term, paren) NEW_STRTERM0(func, term, paren)
NEW_STRTERM      5146 parse.y        # define NEW_STRTERM(func, term, paren) ripper_new_strterm(parser, func, term, paren)


NGROUPS

NGROUPS           798 file.c         #    define NGROUPS NGROUPS_MAX
NGROUPS           800 file.c         #    define NGROUPS 32


NI_DGRAM

NI_DGRAM           62 ext/socket/addrinfo.h #undef NI_DGRAM
NI_DGRAM          130 ext/socket/addrinfo.h #define	NI_DGRAM	0x00000010


NI_NAMEREQD

NI_NAMEREQD        60 ext/socket/addrinfo.h #undef NI_NAMEREQD
NI_NAMEREQD       128 ext/socket/addrinfo.h #define	NI_NAMEREQD	0x00000004


NI_NOFQDN

NI_NOFQDN          58 ext/socket/addrinfo.h #undef NI_NOFQDN
NI_NOFQDN         126 ext/socket/addrinfo.h #define	NI_NOFQDN	0x00000001


NI_NUMERICHOST

NI_NUMERICHOST     59 ext/socket/addrinfo.h #undef NI_NUMERICHOST
NI_NUMERICHOST    127 ext/socket/addrinfo.h #define	NI_NUMERICHOST	0x00000002


NI_NUMERICSERV

NI_NUMERICSERV     61 ext/socket/addrinfo.h #undef NI_NUMERICSERV
NI_NUMERICSERV    129 ext/socket/addrinfo.h #define	NI_NUMERICSERV	0x00000008


NO

NO                 89 ext/socket/getaddrinfo.c #define NO  0
NO                 79 ext/socket/getnameinfo.c #define NO  0


NOFILE

NOFILE             68 io.c           # define NOFILE 64
NOFILE             85 io.c           #  define NOFILE (OPEN_MAX)


NONBLOCKING

NONBLOCKING      1033 ext/socket/socket.c # define NONBLOCKING O_NDELAY
NONBLOCKING      1036 ext/socket/socket.c # define NONBLOCKING O_NBIO
NONBLOCKING      1038 ext/socket/socket.c # define NONBLOCKING O_NONBLOCK


NSIG

NSIG               26 signal.c       #  define NSIG SIGMAX
NSIG               28 signal.c       #  define NSIG (_SIGMAX + 1)      /* For QNX */
NSIG               20 wince/signal.h #define NSIG        22


NTOHD

NTOHD             317 pack.c         #define NTOHD(x,y)	(memcpy(&y,&x,sizeof(double)),	\
NTOHD             329 pack.c         #define NTOHD(x,y)	ntohd(x)


NTOHF

NTOHF             291 pack.c         #define NTOHF(x,y)	(memcpy(&y,&x,sizeof(float)),	\
NTOHF             303 pack.c         #define NTOHF(x,y)	ntohf(x)


NULL

NULL              100 ext/sdbm/_sdbm.c #define NULL	0
NULL               46 ext/syck/syck.h # define NULL (void *)0
NULL               53 missing/alloca.c #define	NULL	0			/* null pointer constant */
NULL               41 missing/strtod.c #define NULL 0
NULL              123 missing/vsnprintf.c #define	NULL	0
NULL               38 regenc.h       #define NULL   ((void* )0)


NULL_NODE

NULL_NODE         106 ext/syck/gram.c #define NULL_NODE(parser, node) \
NULL_NODE         245 regparse.h     #define NULL_NODE  ((Node* )0)


NUM2INT

NUM2INT           271 ruby.h         #define NUM2INT(x) (FIXNUM_P(x)?FIX2INT(x):rb_num2int((VALUE)x))
NUM2INT           279 ruby.h         #define NUM2INT(x) ((int)NUM2LONG(x))


NUM2OFFT

NUM2OFFT          293 ruby.h         # define NUM2OFFT(x) ((off_t)NUM2LL(x))
NUM2OFFT          295 ruby.h         # define NUM2OFFT(x) NUM2LONG(x)


NUM2PTR

NUM2PTR           138 ext/dl/dl.h    # define NUM2PTR(x)   ((void*)(NUM2ULONG(x)))
NUM2PTR           142 ext/dl/dl.h    # define NUM2PTR(x)   ((void*)(NUM2ULL(x)))
NUM2PTR          1874 gc.c           #define NUM2PTR(x) NUM2ULONG(x)
NUM2PTR          1876 gc.c           #define NUM2PTR(x) NUM2ULL(x)


NUM2RLIM

NUM2RLIM         1896 process.c      # define NUM2RLIM(v) NUM2UINT(v)
NUM2RLIM         1899 process.c      # define NUM2RLIM(v) NUM2ULONG(v)
NUM2RLIM         1902 process.c      # define NUM2RLIM(v) NUM2ULL(v)


NUM2UINT

NUM2UINT          275 ruby.h         #define NUM2UINT(x) rb_num2uint(x)
NUM2UINT          280 ruby.h         #define NUM2UINT(x) ((unsigned int)NUM2ULONG(x))


N_INET

N_INET            125 ext/socket/getaddrinfo.c #define N_INET  1
N_INET            127 ext/socket/getaddrinfo.c #define N_INET  0
N_INET             98 ext/socket/getnameinfo.c #define N_INET  1
N_INET            100 ext/socket/getnameinfo.c #define N_INET  0


N_INET6

N_INET6           120 ext/socket/getaddrinfo.c #define N_INET6 0
N_INET6            94 ext/socket/getnameinfo.c #define N_INET6 0


NameTable

NameTable         390 regparse.c     typedef st_table  NameTable;
NameTable         572 regparse.c     } NameTable;


Next

Next               99 dir.c          # define Next(p) CharNext(p)
Next              101 dir.c          # define Next(p) ((p) + mblen(p, RUBY_MBCHAR_MAXSIZE))
Next              103 dir.c          # define Next(p) ((p) + emx_mblen(p))
Next              114 dir.c          # define Next(p) ((p) + 1)


OFF16

OFF16              29 pack.c         #   define OFF16(p) OFF16B(p)
OFF16              45 pack.c         # define OFF16(p) (char*)(p)


OFF16B

OFF16B             25 pack.c         # define OFF16B(p) ((char*)(p) + (natint?0:(sizeof(short) - SIZE16)))
OFF16B             49 pack.c         # define OFF16B(p) (char*)(p)


OFF32

OFF32              30 pack.c         #   define OFF32(p) OFF32B(p)
OFF32              46 pack.c         # define OFF32(p) (char*)(p)


OFF32B

OFF32B             26 pack.c         # define OFF32B(p) ((char*)(p) + (natint?0:(sizeof(long) - SIZE32)))
OFF32B             50 pack.c         # define OFF32B(p) (char*)(p)


OFFT2NUM

OFFT2NUM          169 ruby.h         # define OFFT2NUM(v) LL2NUM(v)
OFFT2NUM          171 ruby.h         # define OFFT2NUM(v) INT2NUM(v)


ONIGENC_CODE_TO_MBC

ONIGENC_CODE_TO_MBC  299 oniguruma.h    #define ONIGENC_CODE_TO_MBC(enc,code,buf)  onigenc_code_to_mbc(enc, code, buf)
ONIGENC_CODE_TO_MBC  371 oniguruma.h    #define ONIGENC_CODE_TO_MBC(enc,code,buf)      (enc)->code_to_mbc(code,buf)


ONIGENC_CODE_TO_MBCLEN

ONIGENC_CODE_TO_MBCLEN  298 oniguruma.h    #define ONIGENC_CODE_TO_MBCLEN(enc,code)   m17n_codelen((enc),(code))
ONIGENC_CODE_TO_MBCLEN  370 oniguruma.h    #define ONIGENC_CODE_TO_MBCLEN(enc,code)       (enc)->code_to_mbclen(code)


ONIGENC_GET_ALL_COMP_AMBIG_CODES

ONIGENC_GET_ALL_COMP_AMBIG_CODES  288 oniguruma.h    #define ONIGENC_GET_ALL_COMP_AMBIG_CODES(enc, ambig_flag, acs)    0
ONIGENC_GET_ALL_COMP_AMBIG_CODES  359 oniguruma.h    #define ONIGENC_GET_ALL_COMP_AMBIG_CODES(enc,ambig_flag,acs) \


ONIGENC_GET_ALL_PAIR_AMBIG_CODES

ONIGENC_GET_ALL_PAIR_AMBIG_CODES  287 oniguruma.h    #define ONIGENC_GET_ALL_PAIR_AMBIG_CODES(enc, ambig_flag, acs)    0
ONIGENC_GET_ALL_PAIR_AMBIG_CODES  357 oniguruma.h    #define ONIGENC_GET_ALL_PAIR_AMBIG_CODES(enc,ambig_flag,acs) \


ONIGENC_GET_CTYPE_CODE_RANGE

ONIGENC_GET_CTYPE_CODE_RANGE  289 oniguruma.h    #define ONIGENC_GET_CTYPE_CODE_RANGE(enc,ctype,sbr,mbr) \
ONIGENC_GET_CTYPE_CODE_RANGE  404 oniguruma.h    #define ONIGENC_GET_CTYPE_CODE_RANGE(enc,ctype,sbr,mbr) \


ONIGENC_IS_ALLOWED_REVERSE_MATCH

ONIGENC_IS_ALLOWED_REVERSE_MATCH  283 oniguruma.h    #define ONIGENC_IS_ALLOWED_REVERSE_MATCH(enc,s,end) \
ONIGENC_IS_ALLOWED_REVERSE_MATCH  353 oniguruma.h    #define ONIGENC_IS_ALLOWED_REVERSE_MATCH(enc,s,end) \


ONIGENC_IS_CODE_ALNUM

ONIGENC_IS_CODE_ALNUM  322 oniguruma.h    #define ONIGENC_IS_CODE_ALNUM(enc,code)     m17n_isalnum(enc,code)
ONIGENC_IS_CODE_ALNUM  381 oniguruma.h    #define ONIGENC_IS_CODE_ALNUM(enc,code) \


ONIGENC_IS_CODE_ALPHA

ONIGENC_IS_CODE_ALPHA  323 oniguruma.h    #define ONIGENC_IS_CODE_ALPHA(enc,code)     m17n_isalpha(enc,code)
ONIGENC_IS_CODE_ALPHA  383 oniguruma.h    #define ONIGENC_IS_CODE_ALPHA(enc,code) \


ONIGENC_IS_CODE_BLANK

ONIGENC_IS_CODE_BLANK  310 oniguruma.h    # define ONIGENC_IS_CODE_BLANK(enc,code) isblank((int )code)
ONIGENC_IS_CODE_BLANK  312 oniguruma.h    # define ONIGENC_IS_CODE_BLANK(enc,code) ((code) == ' ' || (code) == '\t')
ONIGENC_IS_CODE_BLANK  395 oniguruma.h    #define ONIGENC_IS_CODE_BLANK(enc,code) \


ONIGENC_IS_CODE_CNTRL

ONIGENC_IS_CODE_CNTRL  326 oniguruma.h    #define ONIGENC_IS_CODE_CNTRL(enc,code)     m17n_iscntrl(enc,code)
ONIGENC_IS_CODE_CNTRL  389 oniguruma.h    #define ONIGENC_IS_CODE_CNTRL(enc,code) \


ONIGENC_IS_CODE_CTYPE

ONIGENC_IS_CODE_CTYPE  306 oniguruma.h    #define ONIGENC_IS_CODE_CTYPE(enc,code,ctype) \
ONIGENC_IS_CODE_CTYPE  373 oniguruma.h    #define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype)


ONIGENC_IS_CODE_DIGIT

ONIGENC_IS_CODE_DIGIT  329 oniguruma.h    #define ONIGENC_IS_CODE_DIGIT(enc,code)     m17n_isdigit(enc,code)
ONIGENC_IS_CODE_DIGIT  397 oniguruma.h    #define ONIGENC_IS_CODE_DIGIT(enc,code) \


ONIGENC_IS_CODE_GRAPH

ONIGENC_IS_CODE_GRAPH  315 oniguruma.h    # define ONIGENC_IS_CODE_GRAPH(enc,code) isgraph((int )code)
ONIGENC_IS_CODE_GRAPH  317 oniguruma.h    # define ONIGENC_IS_CODE_GRAPH(enc,code) \
ONIGENC_IS_CODE_GRAPH  377 oniguruma.h    #define ONIGENC_IS_CODE_GRAPH(enc,code) \


ONIGENC_IS_CODE_LOWER

ONIGENC_IS_CODE_LOWER  324 oniguruma.h    #define ONIGENC_IS_CODE_LOWER(enc,code)     m17n_islower(enc,code)
ONIGENC_IS_CODE_LOWER  385 oniguruma.h    #define ONIGENC_IS_CODE_LOWER(enc,code) \


ONIGENC_IS_CODE_PRINT

ONIGENC_IS_CODE_PRINT  321 oniguruma.h    #define ONIGENC_IS_CODE_PRINT(enc,code)     m17n_isprint(enc,code)
ONIGENC_IS_CODE_PRINT  379 oniguruma.h    #define ONIGENC_IS_CODE_PRINT(enc,code) \


ONIGENC_IS_CODE_PUNCT

ONIGENC_IS_CODE_PUNCT  327 oniguruma.h    #define ONIGENC_IS_CODE_PUNCT(enc,code)     m17n_ispunct(enc,code)
ONIGENC_IS_CODE_PUNCT  391 oniguruma.h    #define ONIGENC_IS_CODE_PUNCT(enc,code) \


ONIGENC_IS_CODE_SPACE

ONIGENC_IS_CODE_SPACE  328 oniguruma.h    #define ONIGENC_IS_CODE_SPACE(enc,code)     m17n_isspace(enc,code)
ONIGENC_IS_CODE_SPACE  393 oniguruma.h    #define ONIGENC_IS_CODE_SPACE(enc,code) \


ONIGENC_IS_CODE_UPPER

ONIGENC_IS_CODE_UPPER  325 oniguruma.h    #define ONIGENC_IS_CODE_UPPER(enc,code)     m17n_isupper(enc,code)
ONIGENC_IS_CODE_UPPER  387 oniguruma.h    #define ONIGENC_IS_CODE_UPPER(enc,code) \


ONIGENC_IS_CODE_WORD

ONIGENC_IS_CODE_WORD  331 oniguruma.h    #define ONIGENC_IS_CODE_WORD(enc,code)      m17n_iswchar(enc,code)
ONIGENC_IS_CODE_WORD  401 oniguruma.h    #define ONIGENC_IS_CODE_WORD(enc,code) \


ONIGENC_IS_CODE_XDIGIT

ONIGENC_IS_CODE_XDIGIT  330 oniguruma.h    #define ONIGENC_IS_CODE_XDIGIT(enc,code)    m17n_isxdigit(enc,code)
ONIGENC_IS_CODE_XDIGIT  399 oniguruma.h    #define ONIGENC_IS_CODE_XDIGIT(enc,code) \


ONIGENC_IS_MBC_AMBIGUOUS

ONIGENC_IS_MBC_AMBIGUOUS  279 oniguruma.h    #define ONIGENC_IS_MBC_AMBIGUOUS(enc,flag,pp,end) \
ONIGENC_IS_MBC_AMBIGUOUS  350 oniguruma.h    #define ONIGENC_IS_MBC_AMBIGUOUS(enc,flag,pp,end) \


ONIGENC_IS_MBC_NEWLINE

ONIGENC_IS_MBC_NEWLINE  302 oniguruma.h    #define ONIGENC_IS_MBC_NEWLINE(enc,p,end)
ONIGENC_IS_MBC_NEWLINE  368 oniguruma.h    #define ONIGENC_IS_MBC_NEWLINE(enc,p,end)      (enc)->is_mbc_newline((p),(end))


ONIGENC_LEFT_ADJUST_CHAR_HEAD

ONIGENC_LEFT_ADJUST_CHAR_HEAD  285 oniguruma.h    #define ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc,start,s) \
ONIGENC_LEFT_ADJUST_CHAR_HEAD  355 oniguruma.h    #define ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc,start,s) \


ONIGENC_MBC_ENC_LEN

ONIGENC_MBC_ENC_LEN  291 oniguruma.h    #define ONIGENC_MBC_ENC_LEN(enc,p)            m17n_mbclen(enc,(int )(*p))
ONIGENC_MBC_ENC_LEN  364 oniguruma.h    #define ONIGENC_MBC_ENC_LEN(enc,p)             (enc)->mbc_enc_len(p)


ONIGENC_MBC_MAXLEN

ONIGENC_MBC_MAXLEN  292 oniguruma.h    #define ONIGENC_MBC_MAXLEN(enc)               m17n_mbmaxlen(enc)
ONIGENC_MBC_MAXLEN  365 oniguruma.h    #define ONIGENC_MBC_MAXLEN(enc)               ((enc)->max_enc_len)


ONIGENC_MBC_MAXLEN_DIST

ONIGENC_MBC_MAXLEN_DIST  293 oniguruma.h    #define ONIGENC_MBC_MAXLEN_DIST(enc) \
ONIGENC_MBC_MAXLEN_DIST  366 oniguruma.h    #define ONIGENC_MBC_MAXLEN_DIST(enc)           ONIGENC_MBC_MAXLEN(enc)


ONIGENC_MBC_MINLEN

ONIGENC_MBC_MINLEN  296 oniguruma.h    #define ONIGENC_MBC_MINLEN(enc)            1
ONIGENC_MBC_MINLEN  367 oniguruma.h    #define ONIGENC_MBC_MINLEN(enc)               ((enc)->min_enc_len)


ONIGENC_MBC_TO_CODE

ONIGENC_MBC_TO_CODE  297 oniguruma.h    #define ONIGENC_MBC_TO_CODE(enc,p,e)       m17n_codepoint((enc),(p),(e))
ONIGENC_MBC_TO_CODE  369 oniguruma.h    #define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end))


ONIGENC_MBC_TO_NORMALIZE

ONIGENC_MBC_TO_NORMALIZE  277 oniguruma.h    #define ONIGENC_MBC_TO_NORMALIZE(enc,flag,pp,end,buf) \
ONIGENC_MBC_TO_NORMALIZE  348 oniguruma.h    #define ONIGENC_MBC_TO_NORMALIZE(enc,flag,pp,end,buf) \


ONIGENC_STEP_BACK

ONIGENC_STEP_BACK  303 oniguruma.h    #define ONIGENC_STEP_BACK(enc,start,s,n)
ONIGENC_STEP_BACK  361 oniguruma.h    #define ONIGENC_STEP_BACK(enc,start,s,n) \


ONIGENC_SUPPORT_AMBIG_FLAG

ONIGENC_SUPPORT_AMBIG_FLAG  282 oniguruma.h    #define ONIGENC_SUPPORT_AMBIG_FLAG(enc)     ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE
ONIGENC_SUPPORT_AMBIG_FLAG  352 oniguruma.h    #define ONIGENC_SUPPORT_AMBIG_FLAG(enc)        ((enc)->support_ambig_flag)


ONIG_ENCODING_INIT_DEFAULT

ONIG_ENCODING_INIT_DEFAULT   63 regenc.h       #define ONIG_ENCODING_INIT_DEFAULT            ONIG_ENCODING_UNDEF
ONIG_ENCODING_INIT_DEFAULT   69 regenc.h       #define ONIG_ENCODING_INIT_DEFAULT           ONIG_ENCODING_ASCII


ONIG_EXTERN

ONIG_EXTERN        69 oniguruma.h    #define ONIG_EXTERN   extern __declspec(dllexport)
ONIG_EXTERN        71 oniguruma.h    #define ONIG_EXTERN   extern __declspec(dllimport)
ONIG_EXTERN        77 oniguruma.h    #define ONIG_EXTERN   extern


ONIG_STATE_DEC

ONIG_STATE_DEC    129 regint.h       #define ONIG_STATE_DEC(reg)    (reg)->state--
ONIG_STATE_DEC    132 regint.h       #define ONIG_STATE_DEC(reg)    /* Nothing */


ONIG_STATE_INC

ONIG_STATE_INC    128 regint.h       #define ONIG_STATE_INC(reg)    (reg)->state++
ONIG_STATE_INC    131 regint.h       #define ONIG_STATE_INC(reg)    /* Nothing */


OSSL_ASN1_IMPL_FACTORY_METHOD

OSSL_ASN1_IMPL_FACTORY_METHOD 1057 ext/openssl/ossl_asn1.c #define OSSL_ASN1_IMPL_FACTORY_METHOD(klass) \
OSSL_ASN1_IMPL_FACTORY_METHOD 1061 ext/openssl/ossl_asn1.c OSSL_ASN1_IMPL_FACTORY_METHOD(Boolean)


OSSL_Debug

OSSL_Debug        164 ext/openssl/ossl.h #define OSSL_Debug(fmt, ...) do { \
OSSL_Debug        183 ext/openssl/ossl.h #define OSSL_Debug ossl_debug


OSSL_IMPL_SK2ARY

OSSL_IMPL_SK2ARY   93 ext/openssl/ossl.c #define OSSL_IMPL_SK2ARY(name, type)	        \
OSSL_IMPL_SK2ARY  118 ext/openssl/ossl.c OSSL_IMPL_SK2ARY(x509, X509)


OSSL_SSL_METHOD_ENTRY

OSSL_SSL_METHOD_ENTRY   96 ext/openssl/ossl_ssl.c #define OSSL_SSL_METHOD_ENTRY(name) { #name, name##_method }
OSSL_SSL_METHOD_ENTRY  109 ext/openssl/ossl_ssl.c #undef OSSL_SSL_METHOD_ENTRY


OSSL_Warn

OSSL_Warn         177 ext/openssl/ossl.h #define OSSL_Warn(fmt, ...) do { \
OSSL_Warn         185 ext/openssl/ossl.h #define OSSL_Warn rb_warn


OSSL_Warning

OSSL_Warning      172 ext/openssl/ossl.h #define OSSL_Warning(fmt, ...) do { \
OSSL_Warning      184 ext/openssl/ossl.h #define OSSL_Warning rb_warning


OSSL_X509ATTR_IS_SINGLE

OSSL_X509ATTR_IS_SINGLE  152 ext/openssl/ossl_x509attr.c #  define OSSL_X509ATTR_IS_SINGLE(attr)  ((attr)->single)
OSSL_X509ATTR_IS_SINGLE  155 ext/openssl/ossl_x509attr.c #  define OSSL_X509ATTR_IS_SINGLE(attr)  (!(attr)->set)


OSSL_X509ATTR_SET_SINGLE

OSSL_X509ATTR_SET_SINGLE  153 ext/openssl/ossl_x509attr.c #  define OSSL_X509ATTR_SET_SINGLE(attr) ((attr)->single = 1)
OSSL_X509ATTR_SET_SINGLE  156 ext/openssl/ossl_x509attr.c #  define OSSL_X509ATTR_SET_SINGLE(attr) ((attr)->set = 0)


OVERWRITE

OVERWRITE          16 ext/nkf/nkf-utf8/config.h #define OVERWRITE
OVERWRITE         106 ext/nkf/nkf-utf8/nkf.c #undef OVERWRITE


O_ACCMODE

O_ACCMODE          93 io.c           #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
O_ACCMODE          39 wince/fcntl.h  #define O_ACCMODE       _O_ACCMODE


O_BINARY

O_BINARY           86 ext/sdbm/_sdbm.c #define O_BINARY	0
O_BINARY           38 wince/fcntl.h  #define O_BINARY        _O_BINARY


O_NONBLOCK

O_NONBLOCK        374 win32/win32.h  #define O_NONBLOCK 1
O_NONBLOCK         31 wince/fcntl.h  #define O_NONBLOCK      _O_NONBLOCK


OnigEncoding

OnigEncoding      147 oniguruma.h    typedef m17n_encoding*        OnigEncoding;
OnigEncoding      172 oniguruma.h    typedef OnigEncodingType* OnigEncoding;


OpenFile

OpenFile           32 ext/openssl/ossl.h #  define OpenFile WINAPI_OpenFile
OpenFile           58 ext/openssl/ossl.h #  undef OpenFile
OpenFile           40 rubyio.h       } OpenFile;
OpenFile           24 win32/win32.h  #define OpenFile  WINAPI_OpenFile
OpenFile           26 win32/win32.h  #undef OpenFile


PACK_LENGTH_ADJUST

PACK_LENGTH_ADJUST 1130 pack.c         #define PACK_LENGTH_ADJUST(type,sz) do {	\
PACK_LENGTH_ADJUST 1135 pack.c         #define PACK_LENGTH_ADJUST(type,sz) 		\


PARSER_ARG

PARSER_ARG        444 parse.y        # define PARSER_ARG parser,
PARSER_ARG        447 parse.y        # define PARSER_ARG


PATH_ENV

PATH_ENV          251 defines.h      #define PATH_ENV "path"
PATH_ENV          253 defines.h      #define PATH_ENV "PATH"


PATH_SEP

PATH_SEP          242 defines.h      #define PATH_SEP ";"
PATH_SEP          244 defines.h      #define PATH_SEP ","
PATH_SEP          246 defines.h      #define PATH_SEP ":"


PERM3264

PERM3264          288 missing/crypt.c #define	PERM3264(d,d0,d1,cpp,p)				\
PERM3264          299 missing/crypt.c #define	PERM3264(d,d0,d1,cpp,p)				\


PERM6464

PERM6464          279 missing/crypt.c #define	PERM6464(d,d0,d1,cpp,p)				\
PERM6464          297 missing/crypt.c #define	PERM6464(d,d0,d1,cpp,p)				\


PIPE_BUF

PIPE_BUF          102 io.c           #  define PIPE_BUF _POSIX_PIPE_BUF
PIPE_BUF          104 io.c           #  define PIPE_BUF 512 /* is this ok? */
PIPE_BUF          315 win32/win32.h  #define PIPE_BUF 1024


PLATFORM_GET_INC

PLATFORM_GET_INC  653 regint.h       #define PLATFORM_GET_INC(val,p,type) do{\
PLATFORM_GET_INC  660 regint.h       #define PLATFORM_GET_INC(val,p,type) do{\


POP

POP               132 ext/racc/cparse/cparse.c #define POP(s) rb_ary_pop(s)
POP               456 util.c         #define POP(ll,rr)  do { --top; ll = top->LL; rr = top->RR; } while (0)      /* Pop L,l,R,r */


POP_LEVEL

POP_LEVEL          50 ext/syck/bytecode.c #define POP_LEVEL()     syck_parser_pop_level( parser )
POP_LEVEL          49 ext/syck/token.c #define POP_LEVEL()     syck_parser_pop_level( parser )


POSIX2_DATE

POSIX2_DATE        64 missing/strftime.c #define POSIX2_DATE	1	/* stuff in Posix 1003.2 date command */
POSIX2_DATE        74 missing/strftime.c #define POSIX2_DATE	1


POST_DECL_CDECL

POST_DECL_CDECL    64 ext/dl/dl.c    # define POST_DECL_CDECL
POST_DECL_CDECL    71 ext/dl/dl.c    # define POST_DECL_CDECL


POST_DECL_STDCALL

POST_DECL_STDCALL   65 ext/dl/dl.c    # define POST_DECL_STDCALL
POST_DECL_STDCALL   72 ext/dl/dl.c    # define POST_DECL_STDCALL


PRE_DECL_CDECL

PRE_DECL_CDECL     60 ext/dl/dl.c    # define PRE_DECL_CDECL     __attribute__((cdecl))
PRE_DECL_CDECL     67 ext/dl/dl.c    # define PRE_DECL_CDECL


PRE_DECL_STDCALL

PRE_DECL_STDCALL   61 ext/dl/dl.c    # define PRE_DECL_STDCALL   __attribute__((stdcall))
PRE_DECL_STDCALL   68 ext/dl/dl.c    # define PRE_DECL_STDCALL


PRINTF_ARGS

PRINTF_ARGS        38 ruby.h         #define PRINTF_ARGS(decl, string_index, first_to_check) \
PRINTF_ARGS        41 ruby.h         #define PRINTF_ARGS(decl, string_index, first_to_check) decl


PROTO

PROTO             268 ext/nkf/nkf-utf8/nkf.c #define PROTO(x)  x
PROTO             272 ext/nkf/nkf-utf8/nkf.c #define PROTO(x)  ()


PTON_MAX

PTON_MAX          137 ext/socket/getaddrinfo.c #define PTON_MAX	16
PTON_MAX          139 ext/socket/getaddrinfo.c #define PTON_MAX	4


PTR2NUM

PTR2NUM           137 ext/dl/dl.h    # define PTR2NUM(x)   (ULONG2NUM((unsigned long)(x)))
PTR2NUM           141 ext/dl/dl.h    # define PTR2NUM(x)   (ULL2NUM((unsigned long long)(x)))


PUSH

PUSH               35 ext/bigdecimal/bigdecimal.c #define PUSH(x)  vStack[iStack++] = (unsigned long)(x);
PUSH              131 ext/racc/cparse/cparse.c #define PUSH(s, i) rb_ary_store(s, RARRAY(s)->len, i)
PUSH               90 sprintf.c      #define PUSH(s, l) do { \
PUSH              455 util.c         #define PUSH(ll,rr) do { top->LL = (ll); top->RR = (rr); ++top; } while (0)  /* Push L,l,R,r */


PUT_SHORT

PUT_SHORT          54 ext/sdbm/_sdbm.c #define PUT_SHORT(p, i, s) (((unsigned char *)(p))[(i)*2] = (unsigned char)((s) >> 8), ((unsigned char *)(p))[(i)*2 + 1] = (unsigned char)(s))
PUT_SHORT          57 ext/sdbm/_sdbm.c #define PUT_SHORT(p, i, s)	((p)[i] = (s))


PV_

PV_                60 oniguruma.h    # define PV_(args) args
PV_                62 oniguruma.h    # define PV_(args) ()


P_

P_                 52 oniguruma.h    # define P_(args) args
P_                 54 oniguruma.h    # define P_(args) ()
P_                707 oniguruma.h    typedef void (*OnigWarnFunc) P_((const char* s, ...));


QUAD_SIZE

QUAD_SIZE         246 bignum.c       #define QUAD_SIZE 8
QUAD_SIZE         361 pack.c         # define QUAD_SIZE sizeof(LONG_LONG)
QUAD_SIZE         363 pack.c         # define QUAD_SIZE 8


QUOTELEN

QUOTELEN           15 ext/syck/bytecode.c #define QUOTELEN 128
QUOTELEN           18 ext/syck/token.c #define QUOTELEN    1024


RELOC_MEMORY_SUB_P

RELOC_MEMORY_SUB_P  213 dln.c          #define RELOC_MEMORY_SUB_P(r)		((r)->r_bsr)
RELOC_MEMORY_SUB_P  223 dln.c          #define RELOC_MEMORY_SUB_P(r)		0


RELOC_PCREL_P

RELOC_PCREL_P     214 dln.c          #define RELOC_PCREL_P(r)		((r)->r_pcrel || (r)->r_bsr)
RELOC_PCREL_P     224 dln.c          #define RELOC_PCREL_P(r)		((r)->r_pcrel)


RELOC_SYMBOL

RELOC_SYMBOL      212 dln.c          #define RELOC_SYMBOL(r)			((r)->r_symbolnum)
RELOC_SYMBOL      222 dln.c          #define RELOC_SYMBOL(r)			((r)->r_symbolnum)


RELOC_TARGET_SIZE

RELOC_TARGET_SIZE  215 dln.c          #define RELOC_TARGET_SIZE(r)		((r)->r_length)
RELOC_TARGET_SIZE  225 dln.c          #define RELOC_TARGET_SIZE(r)		((r)->r_length)


RETURN

RETURN            225 dir.c          #define RETURN(val) return *pcur = p, *scur = s, (val);
RETURN           2711 eval.c         #define RETURN(v) do { \


RETURN_IF

RETURN_IF        1679 dln.c          #define RETURN_IF(expr) if (expr) return (char *)fname;
RETURN_IF        1694 dln.c          #undef RETURN_IF


RFILE

RFILE              65 ext/openssl/ossl.h #  undef RFILE
RFILE             446 ruby.h         #define RFILE(obj)   (R_CAST(RFile)(obj))


RLIM2NUM

RLIM2NUM         1895 process.c      # define RLIM2NUM(v) UINT2NUM(v)
RLIM2NUM         1898 process.c      # define RLIM2NUM(v) ULONG2NUM(v)
RLIM2NUM         1901 process.c      # define RLIM2NUM(v) ULL2NUM(v)


RMD160_BLOCK_LENGTH

RMD160_BLOCK_LENGTH   64 ext/digest/rmd160/rmd160.h #define RMD160_BLOCK_LENGTH             64
RMD160_BLOCK_LENGTH   15 ext/digest/rmd160/rmd160ossl.h #define RMD160_BLOCK_LENGTH		RIPEMD160_CBLOCK


RMD160_CTX

RMD160_CTX         36 ext/digest/rmd160/rmd160.h } RMD160_CTX;
RMD160_CTX          9 ext/digest/rmd160/rmd160ossl.h #define RMD160_CTX	RIPEMD160_CTX


RMD160_DIGEST_LENGTH

RMD160_DIGEST_LENGTH   65 ext/digest/rmd160/rmd160.h #define RMD160_DIGEST_LENGTH            20
RMD160_DIGEST_LENGTH   16 ext/digest/rmd160/rmd160ossl.h #define RMD160_DIGEST_LENGTH		RIPEMD160_DIGEST_LENGTH


RMD160_Data

RMD160_Data        47 ext/digest/rmd160/rmd160.h #define RMD160_Data	rb_Digest_RMD160_Data
RMD160_Data        86 ext/digest/rmd160/rmd160hl.c RMD160_Data(const uint8_t *data, size_t len, char *buf)


RMD160_End

RMD160_End         45 ext/digest/rmd160/rmd160.h #define RMD160_End	rb_Digest_RMD160_End
RMD160_End         39 ext/digest/rmd160/rmd160hl.c RMD160_End(RMD160_CTX *ctx, char *buf)
RMD160_End         13 ext/digest/rmd160/rmd160ossl.c RMD160_End(RMD160_CTX *ctx, char *buf)


RMD160_Equal

RMD160_Equal      457 ext/digest/rmd160/rmd160.c int RMD160_Equal(RMD160_CTX* pctx1, RMD160_CTX* pctx2) {
RMD160_Equal       43 ext/digest/rmd160/rmd160.h #define RMD160_Equal	rb_Digest_RMD160_Equal
RMD160_Equal       35 ext/digest/rmd160/rmd160ossl.c int RMD160_Equal(RMD160_CTX* pctx1, RMD160_CTX* pctx2) {


RMD160_File

RMD160_File        46 ext/digest/rmd160/rmd160.h #define RMD160_File	rb_Digest_RMD160_File
RMD160_File        62 ext/digest/rmd160/rmd160hl.c RMD160_File(char *filename, char *buf)


RMD160_Final

RMD160_Final      412 ext/digest/rmd160/rmd160.c RMD160_Final(uint8_t digest[20], RMD160_CTX *context)
RMD160_Final       42 ext/digest/rmd160/rmd160.h #define RMD160_Final	rb_Digest_RMD160_Final
RMD160_Final       13 ext/digest/rmd160/rmd160ossl.h #define RMD160_Final	RIPEMD160_Final


RMD160_Init

RMD160_Init       128 ext/digest/rmd160/rmd160.c RMD160_Init(RMD160_CTX *context)
RMD160_Init        39 ext/digest/rmd160/rmd160.h #define RMD160_Init	rb_Digest_RMD160_Init
RMD160_Init        11 ext/digest/rmd160/rmd160ossl.h #define RMD160_Init	RIPEMD160_Init


RMD160_Transform

RMD160_Transform  146 ext/digest/rmd160/rmd160.c RMD160_Transform(uint32_t state[5], const uint32_t block[16])
RMD160_Transform   40 ext/digest/rmd160/rmd160.h #define RMD160_Transform	rb_Digest_RMD160_Transform


RMD160_Update

RMD160_Update     352 ext/digest/rmd160/rmd160.c RMD160_Update(RMD160_CTX *context, const uint8_t *data, size_t nbytes)
RMD160_Update      41 ext/digest/rmd160/rmd160.h #define RMD160_Update	rb_Digest_RMD160_Update
RMD160_Update      12 ext/digest/rmd160/rmd160ossl.h #define RMD160_Update	RIPEMD160_Update


ROUND256_0_TO_15

ROUND256_0_TO_15  301 ext/digest/sha2/sha2.c #define ROUND256_0_TO_15(a,b,c,d,e,f,g,h)	\
ROUND256_0_TO_15  312 ext/digest/sha2/sha2.c #define ROUND256_0_TO_15(a,b,c,d,e,f,g,h)	\


ROUND512_0_TO_15

ROUND512_0_TO_15  602 ext/digest/sha2/sha2.c #define ROUND512_0_TO_15(a,b,c,d,e,f,g,h)	\
ROUND512_0_TO_15  613 ext/digest/sha2/sha2.c #define ROUND512_0_TO_15(a,b,c,d,e,f,g,h)	\


RTLD_GLOBAL

RTLD_GLOBAL      1323 dln.c          # undef RTLD_GLOBAL
RTLD_GLOBAL      1326 dln.c          # define RTLD_GLOBAL 0
RTLD_GLOBAL        13 ext/dl/dl.h    #define RTLD_GLOBAL 0
RTLD_GLOBAL        27 ext/dl/dl.h    #   define RTLD_GLOBAL -1


RTLD_LAZY

RTLD_LAZY        1320 dln.c          # define RTLD_LAZY 1
RTLD_LAZY          10 ext/dl/dl.h    #define RTLD_LAZY 0
RTLD_LAZY          25 ext/dl/dl.h    #   define RTLD_LAZY -1


RTLD_NOW

RTLD_NOW           16 ext/dl/dl.h    #define RTLD_NOW 0
RTLD_NOW           26 ext/dl/dl.h    #   define RTLD_NOW  -1


RUBY_CRITICAL

RUBY_CRITICAL      35 rubysig.h      # define RUBY_CRITICAL(statements) do {\
RUBY_CRITICAL      58 rubysig.h      # define RUBY_CRITICAL(statements) do {\


RUBY_EXTERN

RUBY_EXTERN       199 defines.h      #undef RUBY_EXTERN
RUBY_EXTERN       203 defines.h      #define RUBY_EXTERN extern


RUBY_INIT_STACK

RUBY_INIT_STACK   588 ruby.h         #define RUBY_INIT_STACK \
RUBY_INIT_STACK   593 ruby.h         #define RUBY_INIT_STACK \


RUBY_PLATFORM

RUBY_PLATFORM     261 defines.h      #define RUBY_PLATFORM "unknown-unknown"
RUBY_PLATFORM     116 vms/config.h   #define RUBY_PLATFORM "vax-vms"
RUBY_PLATFORM     118 vms/config.h   #define RUBY_PLATFORM "alpha-vms"
RUBY_PLATFORM     120 vms/config.h   #define RUBY_PLATFORM "ia64-vms"
RUBY_PLATFORM     122 vms/config.h   #define RUBY_PLATFORM "vms"


RUBY_RELATIVE

RUBY_RELATIVE     301 ruby.c         #define RUBY_RELATIVE(path) (strncpy(p, (path), rest), libpath)
RUBY_RELATIVE     303 ruby.c         #define RUBY_RELATIVE(path) (path)


RVALUE

RVALUE             37 ext/syck/rubyext.c } RVALUE;
RVALUE            311 gc.c           } RVALUE;


R_LENGTH

R_LENGTH          234 dln.c          #  define R_LENGTH(r)		(reloc_r_length[(r)->r_type])
R_LENGTH          253 dln.c          #define R_LENGTH(r)		((r)->r_length)
R_LENGTH          260 dln.c          #  define R_LENGTH(r) 		((r)->r_length)


R_MEMORY_SUB

R_MEMORY_SUB      251 dln.c          #define R_MEMORY_SUB(r)		((r)->r_bsr)
R_MEMORY_SUB      258 dln.c          #  define R_MEMORY_SUB(r)	0


R_PCREL

R_PCREL           244 dln.c          #  define R_PCREL(r) \
R_PCREL           252 dln.c          #define R_PCREL(r)		((r)->r_pcrel || (r)->r_bsr)
R_PCREL           259 dln.c          #  define R_PCREL(r)  		((r)->r_pcrel)


R_SYMBOL

R_SYMBOL          246 dln.c          #  define R_SYMBOL(r) ((r)->r_index)
R_SYMBOL          250 dln.c          #define R_SYMBOL(r)		((r)->r_symbolnum)
R_SYMBOL          257 dln.c          #  define R_SYMBOL(r) 		((r)->r_symbolnum)


ResetSignal

ResetSignal        65 win32/win32.c  # define ResetSignal(ev) WSAResetEvent(ev)
ResetSignal        70 win32/win32.c  # define ResetSignal(ev) (void)0


SALT

SALT              637 missing/crypt.c #define	SALT (~salt)
SALT              639 missing/crypt.c #define	SALT salt


SAVE_WIN32_EXCEPTION_LIST

SAVE_WIN32_EXCEPTION_LIST 9490 eval.c         #undef SAVE_WIN32_EXCEPTION_LIST
SAVE_WIN32_EXCEPTION_LIST 9502 eval.c         #   define SAVE_WIN32_EXCEPTION_LIST
SAVE_WIN32_EXCEPTION_LIST 9512 eval.c         #   define SAVE_WIN32_EXCEPTION_LIST
SAVE_WIN32_EXCEPTION_LIST 9516 eval.c         #   define SAVE_WIN32_EXCEPTION_LIST


SA_LEN

SA_LEN             16 ext/socket/sockport.h #  define SA_LEN(sa) (sa)->sa_len
SA_LEN             19 ext/socket/sockport.h #   define SA_LEN(sa) \
SA_LEN             24 ext/socket/sockport.h #   define SA_LEN(sa)	(sizeof(struct sockaddr))


SCORE_NO_EXIST

SCORE_NO_EXIST   1433 ext/nkf/nkf-utf8/nkf.c #define SCORE_NO_EXIST (SCORE_CP932 << 1)    /* $BB8:_$7$J$$J8;z(B */
SCORE_NO_EXIST   1435 ext/nkf/nkf-utf8/nkf.c #define SCORE_NO_EXIST (SCORE_DEPEND << 1)   /* $BB8:_$7$J$$J8;z(B */


SEEK_SET

SEEK_SET           30 ext/sdbm/_sdbm.c #define SEEK_SET	L_SET
SEEK_SET          299 io.c           # define SEEK_SET 0


SERIALIZE_INT

SERIALIZE_INT     312 regint.h       #define SERIALIZE_INT(i,p)     SERIALIZE_2BYTE_INT(i,p)
SERIALIZE_INT     317 regint.h       #define SERIALIZE_INT(i,p)     SERIALIZE_4BYTE_INT(i,p)
SERIALIZE_INT     322 regint.h       #define SERIALIZE_INT(i,p)     SERIALIZE_8BYTE_INT(i,p)


SERIALIZE_SHORT

SERIALIZE_SHORT   300 regint.h       #define SERIALIZE_SHORT(i,p)   SERIALIZE_2BYTE_INT(i,p)
SERIALIZE_SHORT   303 regint.h       #define SERIALIZE_SHORT(i,p)   SERIALIZE_4BYTE_INT(i,p)
SERIALIZE_SHORT   306 regint.h       #define SERIALIZE_SHORT(i,p)   SERIALIZE_8BYTE_INT(i,p)


SERIALIZE_UINT

SERIALIZE_UINT    313 regint.h       #define SERIALIZE_UINT(i,p)    SERIALIZE_2BYTE_INT(i,p)
SERIALIZE_UINT    318 regint.h       #define SERIALIZE_UINT(i,p)    SERIALIZE_4BYTE_INT(i,p)
SERIALIZE_UINT    323 regint.h       #define SERIALIZE_UINT(i,p)    SERIALIZE_8BYTE_INT(i,p)


SET

SET               236 ext/digest/md5/md5.c #define SET(a, b, c, d, k, s, Ti)\
SET               256 ext/digest/md5/md5.c #undef SET
SET               262 ext/digest/md5/md5.c #define SET(a, b, c, d, k, s, Ti)\
SET               282 ext/digest/md5/md5.c #undef SET
SET               288 ext/digest/md5/md5.c #define SET(a, b, c, d, k, s, Ti)\
SET               308 ext/digest/md5/md5.c #undef SET
SET               314 ext/digest/md5/md5.c #define SET(a, b, c, d, k, s, Ti)\
SET               334 ext/digest/md5/md5.c #undef SET


SET_CURRENT_SOURCE

SET_CURRENT_SOURCE 1068 eval.c         #define SET_CURRENT_SOURCE() (ruby_sourcefile = ruby_current_node->nd_file, \
SET_CURRENT_SOURCE 1071 eval.c         #define SET_CURRENT_SOURCE() ((void)0)


SET_SA_LEN

SET_SA_LEN         30 ext/socket/sockport.h # define SET_SA_LEN(sa, len) (sa)->sa_len = (len)
SET_SA_LEN         32 ext/socket/sockport.h # define SET_SA_LEN(sa, len) (len)


SET_SIN_LEN

SET_SIN_LEN        37 ext/socket/sockport.h # define SET_SIN_LEN(si,len) (si)->sin_len = (len)
SET_SIN_LEN        40 ext/socket/sockport.h # define SET_SIN_LEN(si,len)


SHA1_BLOCK_LENGTH

SHA1_BLOCK_LENGTH   46 ext/digest/sha1/sha1.h #define SHA1_BLOCK_LENGTH		64
SHA1_BLOCK_LENGTH   11 ext/digest/sha1/sha1ossl.h #define SHA1_BLOCK_LENGTH	SHA_BLOCK_LENGTH


SHA1_CTX

SHA1_CTX           20 ext/digest/sha1/sha1.h } SHA1_CTX;
SHA1_CTX            9 ext/digest/sha1/sha1ossl.h #define SHA1_CTX	SHA_CTX


SHA1_DIGEST_LENGTH

SHA1_DIGEST_LENGTH   47 ext/digest/sha1/sha1.h #define SHA1_DIGEST_LENGTH		20
SHA1_DIGEST_LENGTH   12 ext/digest/sha1/sha1ossl.h #define SHA1_DIGEST_LENGTH	SHA_DIGEST_LENGTH


SHA1_Data

SHA1_Data          31 ext/digest/sha1/sha1.h #define SHA1_Data	rb_Digest_SHA1_Data
SHA1_Data          89 ext/digest/sha1/sha1hl.c SHA1_Data (data, len, buf)


SHA1_End

SHA1_End           29 ext/digest/sha1/sha1.h #define SHA1_End	rb_Digest_SHA1_End
SHA1_End           38 ext/digest/sha1/sha1hl.c SHA1_End(ctx, buf)
SHA1_End           13 ext/digest/sha1/sha1ossl.c SHA1_End(SHA1_CTX *ctx, char *buf)


SHA1_Equal

SHA1_Equal        279 ext/digest/sha1/sha1.c int SHA1_Equal(SHA1_CTX* pctx1, SHA1_CTX* pctx2) {
SHA1_Equal         27 ext/digest/sha1/sha1.h #define SHA1_Equal	rb_Digest_SHA1_Equal
SHA1_Equal         35 ext/digest/sha1/sha1ossl.c int SHA1_Equal(SHA1_CTX* pctx1, SHA1_CTX* pctx2) {


SHA1_File

SHA1_File          30 ext/digest/sha1/sha1.h #define SHA1_File	rb_Digest_SHA1_File
SHA1_File          63 ext/digest/sha1/sha1hl.c SHA1_File (filename, buf)


SHA1_Final

SHA1_Final        253 ext/digest/sha1/sha1.c void SHA1_Final(digest, context)
SHA1_Final         26 ext/digest/sha1/sha1.h #define SHA1_Final	rb_Digest_SHA1_Final


SHA1_Init

SHA1_Init         204 ext/digest/sha1/sha1.c void SHA1_Init(context)
SHA1_Init          24 ext/digest/sha1/sha1.h #define SHA1_Init	rb_Digest_SHA1_Init


SHA1_Transform

SHA1_Transform    132 ext/digest/sha1/sha1.c void SHA1_Transform(state, buffer)
SHA1_Transform     23 ext/digest/sha1/sha1.h #define SHA1_Transform	rb_Digest_SHA1_Transform


SHA1_Update

SHA1_Update       223 ext/digest/sha1/sha1.c void SHA1_Update(context, data, len)
SHA1_Update        25 ext/digest/sha1/sha1.h #define SHA1_Update	rb_Digest_SHA1_Update


SHA256_Data

SHA256_Data        82 ext/digest/sha2/sha2.h #define SHA256_Data		rb_Digest_SHA256_Data
SHA256_Data       125 ext/digest/sha2/sha2hl.c SHA256_Data(const uint8_t * data, size_t len, char *digest)


SHA256_End

SHA256_End         81 ext/digest/sha2/sha2.h #define SHA256_End		rb_Digest_SHA256_End
SHA256_End         99 ext/digest/sha2/sha2hl.c SHA256_End(SHA256_CTX *ctx, char buffer[])


SHA256_Equal

SHA256_Equal      581 ext/digest/sha2/sha2.c int SHA256_Equal(SHA256_CTX* pctx1, SHA256_CTX* pctx2) {
SHA256_Equal       84 ext/digest/sha2/sha2.h #define SHA256_Equal		rb_Digest_SHA256_Equal


SHA256_File

SHA256_File        83 ext/digest/sha2/sha2.h #define SHA256_File		rb_Digest_SHA256_File
SHA256_File        74 ext/digest/sha2/sha2hl.c SHA256_File(char *filename, char *buf)


SHA256_Final

SHA256_Final      518 ext/digest/sha2/sha2.c void SHA256_Final(sha2_byte digest[], SHA256_CTX* context) {
SHA256_Final       80 ext/digest/sha2/sha2.h #define SHA256_Final		rb_Digest_SHA256_Final


SHA256_Init

SHA256_Init       286 ext/digest/sha2/sha2.c void SHA256_Init(SHA256_CTX* context) {
SHA256_Init        78 ext/digest/sha2/sha2.h #define SHA256_Init		rb_Digest_SHA256_Init


SHA256_Transform

SHA256_Transform  332 ext/digest/sha2/sha2.c void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
SHA256_Transform  390 ext/digest/sha2/sha2.c void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {


SHA256_Update

SHA256_Update     470 ext/digest/sha2/sha2.c void SHA256_Update(SHA256_CTX* context, const sha2_byte *data, size_t len) {
SHA256_Update      79 ext/digest/sha2/sha2.h #define SHA256_Update		rb_Digest_SHA256_Update


SHA384_Data

SHA384_Data        90 ext/digest/sha2/sha2.h #define SHA384_Data		rb_Digest_SHA384_Data
SHA384_Data       185 ext/digest/sha2/sha2hl.c SHA384_Data(const uint8_t * data, size_t len, char *digest)


SHA384_End

SHA384_End         89 ext/digest/sha2/sha2.h #define SHA384_End		rb_Digest_SHA384_End
SHA384_End        159 ext/digest/sha2/sha2hl.c SHA384_End(SHA384_CTX * ctx, char buffer[])


SHA384_Equal

SHA384_Equal      933 ext/digest/sha2/sha2.c int SHA384_Equal(SHA384_CTX* pctx1, SHA384_CTX* pctx2) {
SHA384_Equal       92 ext/digest/sha2/sha2.h #define SHA384_Equal		rb_Digest_SHA384_Equal


SHA384_File

SHA384_File        91 ext/digest/sha2/sha2.h #define SHA384_File		rb_Digest_SHA384_File
SHA384_File       135 ext/digest/sha2/sha2hl.c SHA384_File(char *filename, char *buf)


SHA384_Final

SHA384_Final      904 ext/digest/sha2/sha2.c void SHA384_Final(sha2_byte digest[], SHA384_CTX* context) {
SHA384_Final       88 ext/digest/sha2/sha2.h #define SHA384_Final		rb_Digest_SHA384_Final


SHA384_Init

SHA384_Init       891 ext/digest/sha2/sha2.c void SHA384_Init(SHA384_CTX* context) {
SHA384_Init        86 ext/digest/sha2/sha2.h #define SHA384_Init		rb_Digest_SHA384_Init


SHA384_Update

SHA384_Update     900 ext/digest/sha2/sha2.c void SHA384_Update(SHA384_CTX* context, const sha2_byte* data, size_t len) {
SHA384_Update      87 ext/digest/sha2/sha2.h #define SHA384_Update		rb_Digest_SHA384_Update


SHA512_Data

SHA512_Data        98 ext/digest/sha2/sha2.h #define SHA512_Data		rb_Digest_SHA512_Data
SHA512_Data       245 ext/digest/sha2/sha2hl.c SHA512_Data(const uint8_t * data, size_t len, char *digest)


SHA512_End

SHA512_End         97 ext/digest/sha2/sha2.h #define SHA512_End		rb_Digest_SHA512_End
SHA512_End        219 ext/digest/sha2/sha2hl.c SHA512_End(SHA512_CTX * ctx, char buffer[])


SHA512_Equal

SHA512_Equal      884 ext/digest/sha2/sha2.c int SHA512_Equal(SHA512_CTX* pctx1, SHA512_CTX* pctx2) {
SHA512_Equal      100 ext/digest/sha2/sha2.h #define SHA512_Equal		rb_Digest_SHA512_Equal


SHA512_File

SHA512_File        99 ext/digest/sha2/sha2.h #define SHA512_File		rb_Digest_SHA512_File
SHA512_File       195 ext/digest/sha2/sha2hl.c SHA512_File(char *filename, char *buf)


SHA512_Final

SHA512_Final      855 ext/digest/sha2/sha2.c void SHA512_Final(sha2_byte digest[], SHA512_CTX* context) {
SHA512_Final       96 ext/digest/sha2/sha2.h #define SHA512_Final		rb_Digest_SHA512_Final


SHA512_Init

SHA512_Init       588 ext/digest/sha2/sha2.c void SHA512_Init(SHA512_CTX* context) {
SHA512_Init        94 ext/digest/sha2/sha2.h #define SHA512_Init		rb_Digest_SHA512_Init


SHA512_Transform

SHA512_Transform  633 ext/digest/sha2/sha2.c void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
SHA512_Transform  688 ext/digest/sha2/sha2.c void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {


SHA512_Update

SHA512_Update     766 ext/digest/sha2/sha2.c void SHA512_Update(SHA512_CTX* context, const sha2_byte *data, size_t len) {
SHA512_Update      95 ext/digest/sha2/sha2.h #define SHA512_Update		rb_Digest_SHA512_Update


SHORTLEN

SHORTLEN           31 marshal.c      #define SHORTLEN(x) (x)
SHORTLEN           46 marshal.c      #define SHORTLEN(x) shortlen((x),d)


SIGINT

SIGINT            324 win32/win32.h  #define SIGINT 2
SIGINT              7 wince/signal.h #define SIGINT      2


SIGN_EXTEND_CHAR

SIGN_EXTEND_CHAR  772 marshal.c      #undef SIGN_EXTEND_CHAR
SIGN_EXTEND_CHAR  774 marshal.c      # define SIGN_EXTEND_CHAR(c) ((signed char)(c))
SIGN_EXTEND_CHAR  777 marshal.c      # define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128)
SIGN_EXTEND_CHAR 4488 parse.y        #undef SIGN_EXTEND_CHAR
SIGN_EXTEND_CHAR 4490 parse.y        # define SIGN_EXTEND_CHAR(c) ((signed char)(c))
SIGN_EXTEND_CHAR 4493 parse.y        # define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128)


SIN_LEN

SIN_LEN            36 ext/socket/sockport.h # define SIN_LEN(si) (si)->sin_len
SIN_LEN            39 ext/socket/sockport.h # define SIN_LEN(si) sizeof(struct sockaddr_in)


SIZEOF_BDIGITS

SIZEOF_BDIGITS     69 defines.h      # define SIZEOF_BDIGITS SIZEOF_INT
SIZEOF_BDIGITS     74 defines.h      # define SIZEOF_BDIGITS SIZEOF_INT
SIZEOF_BDIGITS     79 defines.h      # define SIZEOF_BDIGITS SIZEOF_SHORT
SIZEOF_BDIGITS     84 defines.h      # define SIZEOF_BDIGITS (SIZEOF_LONG/2)


SIZEOF_LONG_LONG

SIZEOF_LONG_LONG   63 defines.h      # undef SIZEOF_LONG_LONG
SIZEOF_LONG_LONG   64 defines.h      # define SIZEOF_LONG_LONG SIZEOF___INT64
SIZEOF_LONG_LONG   13 vms/vms.h      #define SIZEOF_LONG_LONG sizeof(long long)


SMALLBUF

SMALLBUF         1181 io.c           #define SMALLBUF 100
SMALLBUF         1774 time.c         #define SMALLBUF 100


SMALL_CRITERIA

SMALL_CRITERIA     29 missing/acosh.c #define SMALL_CRITERIA (1.0/SMALL_CRITERIA_BIT)
SMALL_CRITERIA     31 missing/acosh.c #define SMALL_CRITERIA (1.0*(1<<DBL_MANT_DIG/4)*(1<<(DBL_MANT_DIG/3+1-DBL_MANT_DIG/4)))


STACK_BASE_CHECK

STACK_BASE_CHECK  606 regexec.c      #define STACK_BASE_CHECK(p) \
STACK_BASE_CHECK  609 regexec.c      #define STACK_BASE_CHECK(p)


STACK_DIR

STACK_DIR          79 missing/alloca.c #define	STACK_DIR	STACK_DIRECTION	/* known at compile-time */
STACK_DIR          84 missing/alloca.c #define	STACK_DIR	stack_dir


STACK_INC

STACK_INC        1133 regexec.c      #define STACK_INC do {\
STACK_INC        1140 regexec.c      #define STACK_INC     stk++


STACK_LENGTH

STACK_LENGTH      448 gc.c           # define STACK_LENGTH  (rb_gc_stack_start - STACK_END + 0x80)
STACK_LENGTH      450 gc.c           # define STACK_LENGTH  (rb_gc_stack_start - STACK_END)
STACK_LENGTH      452 gc.c           # define STACK_LENGTH  (STACK_END - rb_gc_stack_start + 1)
STACK_LENGTH      454 gc.c           # define STACK_LENGTH  ((STACK_END < rb_gc_stack_start) ? rb_gc_stack_start - STACK_END\


STACK_LEVEL_MAX

STACK_LEVEL_MAX   428 gc.c           # define STACK_LEVEL_MAX (_stacksize - 4096)
STACK_LEVEL_MAX   433 gc.c           # define STACK_LEVEL_MAX 655300


STACK_OF

STACK_OF           50 ext/openssl/ossl.c STACK_OF(X509) *
STACK_OF           74 ext/openssl/ossl.c STACK_OF(X509) *
STACK_OF           81 ext/openssl/ossl.c STACK_OF(X509) *


STACK_UPPER

STACK_UPPER       458 gc.c           # define STACK_UPPER(x, a, b) a
STACK_UPPER       460 gc.c           # define STACK_UPPER(x, a, b) b
STACK_UPPER       473 gc.c           # define STACK_UPPER(x, a, b) (stack_growup_p(x) ? a : b)


STATIC

STATIC            269 ext/nkf/nkf-utf8/nkf.c #define STATIC static
STATIC            273 ext/nkf/nkf-utf8/nkf.c #define STATIC
STATIC            112 missing/crypt.c #define	STATIC	static


STAT_OP_IN

STAT_OP_IN       1084 regexec.c      #define STAT_OP_IN(opcode) do {\
STAT_OP_IN       1142 regexec.c      #define STAT_OP_IN(opcode)


STAT_OP_OUT

STAT_OP_OUT      1091 regexec.c      #define STAT_OP_OUT do {\
STAT_OP_OUT      1143 regexec.c      #define STAT_OP_OUT


STDIO_READ_DATA_PENDING

STDIO_READ_DATA_PENDING  136 io.c           #    define STDIO_READ_DATA_PENDING(fp) ((fp)->_IO_read_ptr != (fp)->_IO_read_end)
STDIO_READ_DATA_PENDING  138 io.c           #    define STDIO_READ_DATA_PENDING(fp) ((fp)->_gptr < (fp)->_egptr)
STDIO_READ_DATA_PENDING  141 io.c           #  define STDIO_READ_DATA_PENDING(fp) ((fp)->FILE_COUNT > 0)
STDIO_READ_DATA_PENDING  143 io.c           #  define STDIO_READ_DATA_PENDING(fp) ((fp)->FILE_READPTR < (fp)->FILE_READEND)
STDIO_READ_DATA_PENDING  145 io.c           #  define STDIO_READ_DATA_PENDING(fp) (fp->_state._eof == 0)
STDIO_READ_DATA_PENDING  147 io.c           #  define STDIO_READ_DATA_PENDING(fp) (((unsigned int)(*(fp))->_cnt) > 0)
STDIO_READ_DATA_PENDING  149 io.c           #  define STDIO_READ_DATA_PENDING(fp) (!feof(fp))


STDMETHODIMP_

STDMETHODIMP_    6191 ext/win32ole/win32ole.c STDMETHODIMP_(ULONG)
STDMETHODIMP_    6199 ext/win32ole/win32ole.c STDMETHODIMP_(ULONG) EVENTSINK_Release(


STHREAD_ONLY

STHREAD_ONLY     1574 win32/win32.c  # define STHREAD_ONLY(x)
STHREAD_ONLY     1577 win32/win32.c  # define STHREAD_ONLY(x)
STHREAD_ONLY     1580 win32/win32.c  # define STHREAD_ONLY(x) x


STR_ASSOC

STR_ASSOC         906 gc.c           #define STR_ASSOC FL_USER3   /* copied from string.c */
STR_ASSOC          31 string.c       #define STR_ASSOC   FL_USER3


SUCCESS

SUCCESS            86 ext/socket/getaddrinfo.c #define SUCCESS 0
SUCCESS            76 ext/socket/getnameinfo.c #define SUCCESS 0


SUNOS_EXT

SUNOS_EXT          63 missing/strftime.c #define SUNOS_EXT	1	/* stuff in SunOS strftime routine */
SUNOS_EXT          83 missing/strftime.c #define SUNOS_EXT	1


SYMBOL_P

SYMBOL_P           74 ext/racc/cparse/cparse.c #  define SYMBOL_P(v) FIXNUM_P(v)
SYMBOL_P          185 ruby.h         #define SYMBOL_P(x) (((VALUE)(x)&0xff)==SYMBOL_FLAG)


SYSV_EXT

SYSV_EXT           62 missing/strftime.c #define SYSV_EXT	1	/* stuff in System V ascftime routine */
SYSV_EXT           80 missing/strftime.c #define SYSV_EXT	1


S_IRGRP

S_IRGRP           115 defines.h      #define S_IRGRP 0000040        /* read permission, group */
S_IRGRP           266 win32/win32.h  #define S_IRGRP 0040


S_IROTH

S_IROTH           118 defines.h      #define S_IROTH 0000004        /* read permission, other */
S_IROTH           269 win32/win32.h  #define S_IROTH 0004


S_IRUSR

S_IRUSR           112 defines.h      #define S_IRUSR 0000400        /* read permission, owner */
S_IRUSR           263 win32/win32.h  #define S_IRUSR 0400


S_ISBLK

S_ISBLK           148 defines.h      #define S_ISBLK(mode)  (((mode) & (0170000)) == (0060000))
S_ISBLK          1003 file.c         #	define S_ISBLK(m) ((m & S_IFMT) == S_IFBLK)
S_ISBLK          1005 file.c         #	define S_ISBLK(m) (0)  /* anytime false */
S_ISBLK           252 win32/win32.h  #undef S_ISBLK
S_ISBLK           257 win32/win32.h  #define S_ISBLK(m)  (((unsigned short)(m) & S_IFMT) == S_IFBLK)


S_ISCHR

S_ISCHR           151 defines.h      #define S_ISCHR(mode)  (((mode) & (0170000)) == (0020000))
S_ISCHR          1029 file.c         #   define S_ISCHR(m) ((m & S_IFMT) == S_IFCHR)
S_ISCHR           253 win32/win32.h  #undef S_ISCHR
S_ISCHR           258 win32/win32.h  #define S_ISCHR(m)  (((unsigned short)(m) & S_IFMT) == S_IFCHR)


S_ISDIR

S_ISDIR           154 defines.h      #define S_ISDIR(mode)  (((mode) & (0170000)) == (0040000))
S_ISDIR          1118 dir.c          #   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
S_ISDIR            58 dln.c          #   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
S_ISDIR           887 file.c         #   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
S_ISDIR            66 util.c         #   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
S_ISDIR           250 win32/win32.h  #undef S_ISDIR
S_ISDIR           255 win32/win32.h  #define S_ISDIR(m)  (((unsigned short)(m) & S_IFMT) == S_IFDIR)
S_ISDIR            24 wince/sys/stat.h #define S_ISDIR(X) (((X) & S_IFMT) == S_IFDIR)


S_ISFIFO

S_ISFIFO          157 defines.h      #define S_ISFIFO(mode) (((mode) & (0170000)) == (0010000))
S_ISFIFO          909 file.c         #    define S_ISFIFO(m) ((m & S_IFMT) == S_IFIFO)
S_ISFIFO          251 win32/win32.h  #undef S_ISFIFO
S_ISFIFO          256 win32/win32.h  #define S_ISFIFO(m) (((unsigned short)(m) & S_IFMT) == S_IFIFO)


S_ISLNK

S_ISLNK          1123 dir.c          #    define S_ISLNK(m) (0)
S_ISLNK          1125 dir.c          #    define S_ISLNK(m) ((m & S_IFMT) == S_IFLNK)
S_ISLNK           933 file.c         #    define S_ISLNK(m) _S_ISLNK(m)
S_ISLNK           936 file.c         #      define S_ISLNK(m) ((m & S_IFMT) == _S_IFLNK)
S_ISLNK           939 file.c         #	 define S_ISLNK(m) ((m & S_IFMT) == S_IFLNK)


S_ISREG

S_ISREG           160 defines.h      #define S_ISREG(mode)  (((mode) & (0170000)) == (0100000))
S_ISREG          1225 file.c         #   define S_ISREG(m) ((m & S_IFMT) == S_IFREG)
S_ISREG           389 io.c           #   define S_ISREG(m) ((m & S_IFMT) == S_IFREG)
S_ISREG           254 win32/win32.h  #undef S_ISREG
S_ISREG           259 win32/win32.h  #define S_ISREG(m)  (((unsigned short)(m) & S_IFMT) == S_IFREG)
S_ISREG            27 wince/sys/stat.h #define S_ISREG(X) (((X) & S_IFMT) == S_IFREG)


S_ISSOCK

S_ISSOCK          969 file.c         #    define S_ISSOCK(m) _S_ISSOCK(m)
S_ISSOCK          972 file.c         #      define S_ISSOCK(m) ((m & S_IFMT) == _S_IFSOCK)
S_ISSOCK          975 file.c         #	 define S_ISSOCK(m) ((m & S_IFMT) == S_IFSOCK)
S_ISSOCK          171 io.c           #    define S_ISSOCK(m) _S_ISSOCK(m)
S_ISSOCK          174 io.c           #      define S_ISSOCK(m) ((m & S_IFMT) == _S_IFSOCK)
S_ISSOCK          177 io.c           #	 define S_ISSOCK(m) ((m & S_IFMT) == S_IFSOCK)


S_IWGRP

S_IWGRP           124 defines.h      #define S_IWGRP 0000020        /* write permission, group */
S_IWGRP           276 win32/win32.h  #define S_IWGRP 0020


S_IWOTH

S_IWOTH           127 defines.h      #define S_IWOTH 0000002        /* write permission, other */
S_IWOTH          4018 file.c         # define S_IWOTH 002
S_IWOTH           279 win32/win32.h  #define S_IWOTH 0002


S_IWUSR

S_IWUSR           121 defines.h      #define S_IWUSR 0000200        /* write permission, owner */
S_IWUSR           273 win32/win32.h  #define S_IWUSR 0200


S_IXGRP

S_IXGRP           133 defines.h      #define S_IXGRP 0000010        /* execute/search permission, group */
S_IXGRP           286 win32/win32.h  #define S_IXGRP 0010


S_IXOTH

S_IXOTH           136 defines.h      #define S_IXOTH 0000001        /* execute/search permission, other */
S_IXOTH           289 win32/win32.h  #define S_IXOTH 0001


S_IXUSR

S_IXUSR           130 defines.h      #define S_IXUSR 0000100        /* execute/search permission, owner */
S_IXUSR           283 win32/win32.h  #define S_IXUSR 0100


SetFileAttributes

SetFileAttributes   62 wince/wince.h  #undef SetFileAttributes
SetFileAttributes   63 wince/wince.h  #define SetFileAttributes SetFileAttributesA


SetSignal

SetSignal          64 win32/win32.c  # define SetSignal(ev) WSASetEvent(ev)
SetSignal          69 win32/win32.c  # define SetSignal(ev) SetEvent(ev)


Sleep

Sleep            3358 win32/win32.c  #undef Sleep
Sleep             113 win32/win32.h  #define Sleep(msec)		(void)rb_w32_Sleep(msec)


TAG_BREAK

TAG_BREAK         937 eval.c         #define TAG_BREAK	0x2
TAG_BREAK          56 ext/tk/tcltklib.c #define TAG_BREAK       0x2


TAG_FATAL

TAG_FATAL         943 eval.c         #define TAG_FATAL	0x8
TAG_FATAL          62 ext/tk/tcltklib.c #define TAG_FATAL       0x8


TAG_NEXT

TAG_NEXT          938 eval.c         #define TAG_NEXT	0x3
TAG_NEXT           57 ext/tk/tcltklib.c #define TAG_NEXT        0x3


TAG_RAISE

TAG_RAISE         941 eval.c         #define TAG_RAISE	0x6
TAG_RAISE          60 ext/tk/tcltklib.c #define TAG_RAISE       0x6


TAG_REDO

TAG_REDO          940 eval.c         #define TAG_REDO	0x5
TAG_REDO           59 ext/tk/tcltklib.c #define TAG_REDO        0x5


TAG_RETRY

TAG_RETRY         939 eval.c         #define TAG_RETRY	0x4
TAG_RETRY          58 ext/tk/tcltklib.c #define TAG_RETRY       0x4


TAG_RETURN

TAG_RETURN        936 eval.c         #define TAG_RETURN	0x1
TAG_RETURN         55 ext/tk/tcltklib.c #define TAG_RETURN      0x1


TAG_THROW

TAG_THROW         942 eval.c         #define TAG_THROW	0x7
TAG_THROW          61 ext/tk/tcltklib.c #define TAG_THROW       0x7


TCL_INDEX

TCL_INDEX          68 ext/tk/stubs.c # define TCL_INDEX 4
TCL_INDEX          79 ext/tk/stubs.c # define TCL_INDEX 8


TCL_NAME

TCL_NAME           70 ext/tk/stubs.c # define TCL_NAME "tcl89%s"
TCL_NAME           81 ext/tk/stubs.c # define TCL_NAME "libtcl8.9%s"


THREAD_ATOMIC_END

THREAD_ATOMIC_END   84 regint.h       #define THREAD_ATOMIC_END           /* depend on thread system */
THREAD_ATOMIC_END   98 regint.h       #define THREAD_ATOMIC_END            ENABLE_INTS


THREAD_ATOMIC_START

THREAD_ATOMIC_START   83 regint.h       #define THREAD_ATOMIC_START         /* depend on thread system */
THREAD_ATOMIC_START   97 regint.h       #define THREAD_ATOMIC_START          DEFER_INTS


THREAD_PASS

THREAD_PASS        85 regint.h       #define THREAD_PASS                 /* depend on thread system */
THREAD_PASS        99 regint.h       #define THREAD_PASS                  rb_thread_schedule()


TIMEDIFF

TIMEDIFF         1066 regexec.c      #define TIMEDIFF(te,ts)   (((te).tv_usec - (ts).tv_usec) + \
TIMEDIFF         1074 regexec.c      #define TIMEDIFF(te,ts)   ((te).tms_utime - (ts).tms_utime)


TK_INDEX

TK_INDEX           69 ext/tk/stubs.c # define TK_INDEX 3
TK_INDEX           80 ext/tk/stubs.c # define TK_INDEX 7


TK_NAME

TK_NAME            71 ext/tk/stubs.c # define TK_NAME "tk89%s"
TK_NAME            82 ext/tk/stubs.c # define TK_NAME "libtk8.9%s"


TMP_PROTECT

TMP_PROTECT      2102 eval.c         # define TMP_PROTECT NODE * volatile tmp__protect_tmp=0
TMP_PROTECT      2108 eval.c         # define TMP_PROTECT typedef int foobazzz


TOLOWER

TOLOWER            28 ext/readline/readline.c #define TOLOWER(c) (isupper(c) ? tolower(c) : c)
TOLOWER          2392 file.c         #define TOLOWER(c) (ISUPPER(c) ? tolower(c) : (c))


TO_SOCKET

TO_SOCKET          23 ext/openssl/ossl_ssl.c #  define TO_SOCKET(s) _get_osfhandle(s)
TO_SOCKET          25 ext/openssl/ossl_ssl.c #  define TO_SOCKET(s) s
TO_SOCKET          79 win32/win32.c  #define TO_SOCKET(x)	_get_osfhandle(x)


TRAP_BEG

TRAP_BEG           26 rubysig.h      # define TRAP_BEG do {\
TRAP_BEG           48 rubysig.h      # define TRAP_BEG do {\


TRAP_END

TRAP_END           29 rubysig.h      # define TRAP_END\
TRAP_END           52 rubysig.h      # define TRAP_END rb_trap_immediate = trap_immediate;\


TRUE

TRUE              175 ext/nkf/nkf-utf8/nkf.c #define         TRUE    1
TRUE               42 ext/nkf/nkf.c  #undef TRUE
TRUE               37 missing/strtod.c #define TRUE 1
TRUE               42 regenc.h       #define TRUE    1
TRUE              667 util.c         #define TRUE 1


T_MASK

T_MASK            121 ext/digest/md5/md5.c #undef T_MASK
T_MASK            123 ext/digest/md5/md5.c #define T_MASK ((uint32_t)~0)
T_MASK            229 ruby.h         #define T_MASK   0x1f


Tcl_Eval

Tcl_Eval          137 ext/tk/tcltklib.c #undef Tcl_Eval
Tcl_Eval          138 ext/tk/tcltklib.c #define Tcl_Eval tcl_eval


Tcl_GlobalEval

Tcl_GlobalEval    151 ext/tk/tcltklib.c #undef Tcl_GlobalEval
Tcl_GlobalEval    152 ext/tk/tcltklib.c #define Tcl_GlobalEval tcl_global_eval


Tcl_PopCallFrame

Tcl_PopCallFrame  471 ext/tk/tcltklib.c #define Tcl_PopCallFrame \
Tcl_PopCallFrame  512 ext/tk/tcltklib.c Tcl_PopCallFrame(interp)


Tcl_PushCallFrame

Tcl_PushCallFrame  473 ext/tk/tcltklib.c #define Tcl_PushCallFrame \
Tcl_PushCallFrame  529 ext/tk/tcltklib.c Tcl_PushCallFrame(interp, framePtr, nsPtr, isProcCallFrame)


ULL

ULL                71 ext/digest/sha2/sha2.c #define ULL(number)	number##ULL
ULL                73 ext/digest/sha2/sha2.c #define ULL(number)	(uint64_t)(number)


ULONG

ULONG             236 ext/win32ole/win32ole.c static ULONG ( STDMETHODCALLTYPE AddRef )(
ULONG             243 ext/win32ole/win32ole.c static ULONG ( STDMETHODCALLTYPE Release )(


USE_DLN_DLOPEN

USE_DLN_DLOPEN     23 dln.c          #undef USE_DLN_DLOPEN
USE_DLN_DLOPEN     98 dln.c          # define USE_DLN_DLOPEN


UTF8_INPUT_ENABLE

UTF8_INPUT_ENABLE    5 ext/nkf/nkf-utf8/config.h #define UTF8_INPUT_ENABLE
UTF8_INPUT_ENABLE   63 ext/nkf/nkf-utf8/config.h #define UTF8_INPUT_ENABLE
UTF8_INPUT_ENABLE   68 ext/nkf/nkf-utf8/config.h #define UTF8_INPUT_ENABLE


VALUE

VALUE              91 ruby.h         typedef unsigned long VALUE;
VALUE              94 ruby.h         typedef unsigned LONG_LONG VALUE;


VISI_CHECK

VISI_CHECK        493 class.c        #define VISI_CHECK(x,f) (VISI(x) == (f))
VISI_CHECK       4089 eval.c         #define VISI_CHECK(x,f) (((x)&NOEX_MASK) == (f))


VTOHD

VTOHD             321 pack.c         #define VTOHD(x,y)	(memcpy(&y,&x,sizeof(double)),	\
VTOHD             330 pack.c         #define VTOHD(x,y)	vtohd(x)


VTOHF

VTOHF             295 pack.c         #define VTOHF(x,y)	(memcpy(&y,&x,sizeof(float)),	\
VTOHF             304 pack.c         #define VTOHF(x,y)	vtohf(x)


V_BOOL

V_BOOL             53 ext/win32ole/win32ole.c #undef V_BOOL
V_BOOL             54 ext/win32ole/win32ole.c #define V_BOOL(X) V_UNION(X,boolVal)


V_UNION

V_UNION            47 ext/win32ole/win32ole.c #undef V_UNION
V_UNION            48 ext/win32ole/win32ole.c #define V_UNION(X,Y) ((X)->n1.n2.n3.Y)


V_UNION1

V_UNION1           41 ext/win32ole/win32ole.c #define V_UNION1(X, Y) ((X)->u.Y)
V_UNION1           43 ext/win32ole/win32ole.c #define V_UNION1(X, Y) ((X)->Y)


V_VT

V_VT               50 ext/win32ole/win32ole.c #undef V_VT
V_VT               51 ext/win32ole/win32ole.c #define V_VT(X) ((X)->n1.n2.vt)


WAIT_IN_PROGRESS

WAIT_IN_PROGRESS  997 ext/socket/socket.c #define WAIT_IN_PROGRESS 10
WAIT_IN_PROGRESS 1000 ext/socket/socket.c #define WAIT_IN_PROGRESS 10
WAIT_IN_PROGRESS 1004 ext/socket/socket.c #define WAIT_IN_PROGRESS 0
WAIT_IN_PROGRESS 1008 ext/socket/socket.c #define WAIT_IN_PROGRESS 1


WIFSTOPPED

WIFSTOPPED         21 ext/pty/pty.c  #define WIFSTOPPED(status)    (((status) & 0xff) == 0x7f)
WIFSTOPPED         76 process.c      #define WIFSTOPPED(w)   (((w) & 0xff) == 0x7f)


WIN32_FIND_DATA

WIN32_FIND_DATA    92 wince/wince.h  #undef WIN32_FIND_DATA
WIN32_FIND_DATA    93 wince/wince.h  #define WIN32_FIND_DATA WIN32_FIND_DATAA


WIN95

WIN95              72 win32/win32.h  # define WIN95 1
WIN95              74 win32/win32.h  # undef  WIN95


WNOHANG

WNOHANG           175 defines.h      #define WNOHANG 01
WNOHANG          2795 win32/win32.c  #define WNOHANG -1
WNOHANG            86 win32/win32.h  #define WNOHANG -1


WORDS_BIGENDIAN

WORDS_BIGENDIAN   165 defines.h      #undef WORDS_BIGENDIAN
WORDS_BIGENDIAN   167 defines.h      #define WORDS_BIGENDIAN


WaitForMultipleEvents

WaitForMultipleEvents   62 win32/win32.c  # define WaitForMultipleEvents WSAWaitForMultipleEvents
WaitForMultipleEvents   67 win32/win32.c  # define WaitForMultipleEvents WaitForMultipleObjectsEx


WinMain

WinMain             7 win32/winmain.c WinMain(HINSTANCE current, HINSTANCE prev, LPSTR cmdline, int showcmd)
WinMain             9 wince/wincemain.c WinMain(HINSTANCE current, HINSTANCE prev, LPWSTR wcmd, int showcmd)


X_OK

X_OK              181 defines.h      #define X_OK 1
X_OK               18 missing/file.h # define X_OK  1        /* test whether execubale. */


YAML_ALIAS

YAML_ALIAS         80 ext/syck/gram.c #define YAML_ALIAS 259
YAML_ALIAS         47 ext/syck/gram.h #define YAML_ALIAS 259


YAML_ANCHOR

YAML_ANCHOR        79 ext/syck/gram.c #define YAML_ANCHOR 258
YAML_ANCHOR        46 ext/syck/gram.h #define YAML_ANCHOR 258


YAML_BLOCK

YAML_BLOCK         86 ext/syck/gram.c #define YAML_BLOCK 265
YAML_BLOCK         53 ext/syck/gram.h #define YAML_BLOCK 265


YAML_DOCSEP

YAML_DOCSEP        87 ext/syck/gram.c #define YAML_DOCSEP 266
YAML_DOCSEP        54 ext/syck/gram.h #define YAML_DOCSEP 266


YAML_IEND

YAML_IEND          90 ext/syck/gram.c #define YAML_IEND 269
YAML_IEND          57 ext/syck/gram.h #define YAML_IEND 269


YAML_INDENT

YAML_INDENT        89 ext/syck/gram.c #define YAML_INDENT 268
YAML_INDENT        56 ext/syck/gram.h #define YAML_INDENT 268


YAML_IOPEN

YAML_IOPEN         88 ext/syck/gram.c #define YAML_IOPEN 267
YAML_IOPEN         55 ext/syck/gram.h #define YAML_IOPEN 267


YAML_ITRANSFER

YAML_ITRANSFER     83 ext/syck/gram.c #define YAML_ITRANSFER 262
YAML_ITRANSFER     50 ext/syck/gram.h #define YAML_ITRANSFER 262


YAML_PLAIN

YAML_PLAIN         85 ext/syck/gram.c #define YAML_PLAIN 264
YAML_PLAIN         52 ext/syck/gram.h #define YAML_PLAIN 264


YAML_TAGURI

YAML_TAGURI        82 ext/syck/gram.c #define YAML_TAGURI 261
YAML_TAGURI        49 ext/syck/gram.h #define YAML_TAGURI 261


YAML_TRANSFER

YAML_TRANSFER      81 ext/syck/gram.c #define YAML_TRANSFER 260
YAML_TRANSFER      48 ext/syck/gram.h #define YAML_TRANSFER 260


YAML_WORD

YAML_WORD          84 ext/syck/gram.c #define YAML_WORD 263
YAML_WORD          51 ext/syck/gram.h #define YAML_WORD 263


YES

YES                88 ext/socket/getaddrinfo.c #define YES 1
YES                78 ext/socket/getnameinfo.c #define YES 1


YYCOPY

YYCOPY            216 ext/syck/gram.c #   define YYCOPY(To, From, Count) \
YYCOPY            219 ext/syck/gram.c #   define YYCOPY(To, From, Count)		\


YYCTYPE

YYCTYPE            20 ext/syck/bytecode.c #define YYCTYPE     char
YYCTYPE            15 ext/syck/implicit.c #define YYCTYPE     char
YYCTYPE            23 ext/syck/token.c #define YYCTYPE     char


YYCURSOR

YYCURSOR           21 ext/syck/bytecode.c #define YYCURSOR    parser->cursor
YYCURSOR           16 ext/syck/implicit.c #define YYCURSOR    cursor
YYCURSOR           24 ext/syck/token.c #define YYCURSOR    parser->cursor


YYDEBUG

YYDEBUG           120 ext/syck/gram.c # define YYDEBUG 1
YYDEBUG            15 parse.y        #define YYDEBUG 1


YYDPRINTF

YYDPRINTF         669 ext/syck/gram.c # define YYDPRINTF(Args)			\
YYDPRINTF         753 ext/syck/gram.c # define YYDPRINTF(Args)


YYDSYMPRINT

YYDSYMPRINT       675 ext/syck/gram.c # define YYDSYMPRINT(Args)			\
YYDSYMPRINT       754 ext/syck/gram.c # define YYDSYMPRINT(Args)


YYDSYMPRINTF

YYDSYMPRINTF      681 ext/syck/gram.c # define YYDSYMPRINTF(Title, Token, Value, Location)		\
YYDSYMPRINTF      755 ext/syck/gram.c # define YYDSYMPRINTF(Title, Token, Value, Location)


YYERROR_VERBOSE

YYERROR_VERBOSE   125 ext/syck/gram.c # undef YYERROR_VERBOSE
YYERROR_VERBOSE   126 ext/syck/gram.c # define YYERROR_VERBOSE 1
YYERROR_VERBOSE   128 ext/syck/gram.c # define YYERROR_VERBOSE 0
YYERROR_VERBOSE    16 parse.y        #define YYERROR_VERBOSE 1


YYFILL

YYFILL             29 ext/syck/bytecode.c #define YYFILL(n)   syck_parser_read(parser)
YYFILL             19 ext/syck/implicit.c #define YYFILL(n)
YYFILL             32 ext/syck/token.c #define YYFILL(n)   syck_parser_read(parser)


YYFREE

YYFREE            156 ext/syck/gram.c #  define YYFREE free
YYFREE             31 parse.y        #define YYFREE(ptr)		rb_parser_free(parser, ptr)


YYLEX

YYLEX             656 ext/syck/gram.c # define YYLEX yylex (&yylval, YYLEX_PARAM)
YYLEX             658 ext/syck/gram.c # define YYLEX yylex (&yylval)


YYLEX_PARAM

YYLEX_PARAM       104 ext/syck/gram.c #define YYLEX_PARAM     parser
YYLEX_PARAM       198 parse.y        #define YYLEX_PARAM parser_v


YYLIMIT

YYLIMIT            23 ext/syck/bytecode.c #define YYLIMIT     parser->limit
YYLIMIT            18 ext/syck/implicit.c #define YYLIMIT     limit
YYLIMIT            26 ext/syck/token.c #define YYLIMIT     parser->limit


YYLINE

YYLINE             28 ext/syck/bytecode.c #define YYLINE      parser->linect
YYLINE             31 ext/syck/token.c #define YYLINE      parser->linect


YYLINECTPTR

YYLINECTPTR        27 ext/syck/bytecode.c #define YYLINECTPTR parser->linectptr
YYLINECTPTR        30 ext/syck/token.c #define YYLINECTPTR parser->linectptr


YYLINEPTR

YYLINEPTR          26 ext/syck/bytecode.c #define YYLINEPTR   parser->lineptr
YYLINEPTR          29 ext/syck/token.c #define YYLINEPTR   parser->lineptr


YYMALLOC

YYMALLOC          159 ext/syck/gram.c #  define YYMALLOC malloc
YYMALLOC           28 parse.y        #define YYMALLOC(size)		rb_parser_malloc(parser, size)


YYMARKER

YYMARKER           22 ext/syck/bytecode.c #define YYMARKER    parser->marker
YYMARKER           17 ext/syck/implicit.c #define YYMARKER    marker
YYMARKER           25 ext/syck/token.c #define YYMARKER    parser->marker


YYMAXDEPTH

YYMAXDEPTH        774 ext/syck/gram.c # undef YYMAXDEPTH
YYMAXDEPTH        778 ext/syck/gram.c # define YYMAXDEPTH 10000
YYMAXDEPTH        457 parse.y        #define YYMAXDEPTH 10000


YYPARSE_PARAM

YYPARSE_PARAM     103 ext/syck/gram.c #define YYPARSE_PARAM   parser
YYPARSE_PARAM     197 parse.y        #define YYPARSE_PARAM parser_v


YYPOS

YYPOS              39 ext/syck/bytecode.c #define YYPOS(n)    YYCURSOR = YYTOKEN + n
YYPOS              38 ext/syck/token.c #define YYPOS(n)    YYCURSOR = YYTOKEN + n


YYSIZE_T

YYSIZE_T          184 ext/syck/gram.c #   define YYSIZE_T size_t
YYSIZE_T          589 ext/syck/gram.c # define YYSIZE_T __SIZE_TYPE__
YYSIZE_T          592 ext/syck/gram.c # define YYSIZE_T size_t
YYSIZE_T          597 ext/syck/gram.c #  define YYSIZE_T size_t
YYSIZE_T          601 ext/syck/gram.c # define YYSIZE_T unsigned int


YYSTACK_ALLOC

YYSTACK_ALLOC     166 ext/syck/gram.c #   define YYSTACK_ALLOC alloca
YYSTACK_ALLOC     170 ext/syck/gram.c #   define YYSTACK_ALLOC alloca
YYSTACK_ALLOC     173 ext/syck/gram.c #    define YYSTACK_ALLOC __builtin_alloca
YYSTACK_ALLOC     186 ext/syck/gram.c #  define YYSTACK_ALLOC YYMALLOC


YYSTACK_FREE

YYSTACK_FREE      180 ext/syck/gram.c #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
YYSTACK_FREE      187 ext/syck/gram.c #  define YYSTACK_FREE YYFREE


YYSTACK_RELOCATE

YYSTACK_RELOCATE  235 ext/syck/gram.c # define YYSTACK_RELOCATE(Stack)					\
YYSTACK_RELOCATE 1072 ext/syck/gram.c #  undef YYSTACK_RELOCATE


YYSTYPE

YYSTYPE           137 ext/syck/gram.c } YYSTYPE;
YYSTYPE            68 ext/syck/gram.h } YYSTYPE;
YYSTYPE           465 parse.y        %union {


YYSTYPE_IS_DECLARED

YYSTYPE_IS_DECLARED  141 ext/syck/gram.c # define YYSTYPE_IS_DECLARED 1
YYSTYPE_IS_DECLARED   72 ext/syck/gram.h # define YYSTYPE_IS_DECLARED 1


YYSTYPE_IS_TRIVIAL

YYSTYPE_IS_TRIVIAL  142 ext/syck/gram.c # define YYSTYPE_IS_TRIVIAL 1
YYSTYPE_IS_TRIVIAL   73 ext/syck/gram.h # define YYSTYPE_IS_TRIVIAL 1


YYTOKEN

YYTOKEN            24 ext/syck/bytecode.c #define YYTOKEN     parser->token
YYTOKEN            27 ext/syck/token.c #define YYTOKEN     parser->token


YYTOKENTYPE

YYTOKENTYPE        61 ext/syck/gram.c # define YYTOKENTYPE
YYTOKENTYPE        28 ext/syck/gram.h # define YYTOKENTYPE


YYTOKTMP

YYTOKTMP           25 ext/syck/bytecode.c #define YYTOKTMP    parser->toktmp
YYTOKTMP           28 ext/syck/token.c #define YYTOKTMP    parser->toktmp


YY_REDUCE_PRINT

YY_REDUCE_PRINT   743 ext/syck/gram.c # define YY_REDUCE_PRINT(Rule)		\
YY_REDUCE_PRINT   757 ext/syck/gram.c # define YY_REDUCE_PRINT(Rule)


YY_STACK_PRINT

YY_STACK_PRINT    713 ext/syck/gram.c # define YY_STACK_PRINT(Bottom, Top)				\
YY_STACK_PRINT    756 ext/syck/gram.c # define YY_STACK_PRINT(Bottom, Top)


_

_                  24 defines.h      #undef _
_                  26 defines.h      # define _(args) args
_                  28 defines.h      # define _(args) ()
_                  25 dln.h          #undef _
_                  27 dln.h          # define _(args) args
_                  29 dln.h          # define _(args) ()
_                  31 st.h           # define _(args) args
_                  26 util.h         # define _(args) args
_                  28 util.h         # define _(args) ()


_CRTIMP

_CRTIMP          1598 win32/win32.c  #undef _CRTIMP
_CRTIMP          1599 win32/win32.c  #define _CRTIMP __declspec(dllimport)


_DIAGASSERT

_DIAGASSERT        47 ext/digest/rmd160/rmd160.c #define _DIAGASSERT(cond)	assert(cond)
_DIAGASSERT        34 ext/digest/rmd160/rmd160hl.c #define _DIAGASSERT(cond)	assert(cond)
_DIAGASSERT         9 ext/digest/rmd160/rmd160ossl.c #define _DIAGASSERT(cond)	assert(cond)
_DIAGASSERT        27 ext/digest/sha1/sha1.c #define _DIAGASSERT(x)	(void)0
_DIAGASSERT        35 ext/digest/sha1/sha1.c #define _DIAGASSERT(cond)	assert(cond)
_DIAGASSERT        32 ext/digest/sha1/sha1hl.c #define _DIAGASSERT(cond)	assert(cond)
_DIAGASSERT         9 ext/digest/sha1/sha1ossl.c #define _DIAGASSERT(cond)	assert(cond)
_DIAGASSERT        64 ext/digest/sha2/sha2hl.c #define _DIAGASSERT(cond)	assert(cond)


__

__                 31 defines.h      #undef __
__                 33 defines.h      # define __(args) args
__                 35 defines.h      # define __(args) ()
__                 31 util.h         # define __(args) args
__                 33 util.h         # define __(args) ()


_open

_open             121 win32/win32.h  #define _open			_sopen
_open              53 wince/io_wce.c int _open(const char *file, int mode, va_list arg)


_set_osfhnd

_set_osfhnd      1612 win32/win32.c  #define _set_osfhnd(fh, osfh) (void)(_osfhnd(fh) = osfh)
_set_osfhnd      1677 win32/win32.c  #define _set_osfhnd(fh, osfh) (void)((fh), (osfh))


_set_osflags

_set_osflags     1613 win32/win32.c  #define _set_osflags(fh, flags) (_osfile(fh) = (flags))
_set_osflags     1678 win32/win32.c  #define _set_osflags(fh, flags) (void)((fh), (flags))


_stat

_stat              17 wince/sys/stat.c int _stat(const char *filename, struct _stat *st)
_stat              57 wince/sys/stat.h #define _stat stat


accept

accept           2191 win32/win32.c  #undef accept
accept            386 win32/win32.h  #undef accept
accept            387 win32/win32.h  #define accept(s, a, l)		rb_w32_accept(s, a, l)


adddecl

adddecl            88 missing/strftime.c #define adddecl(stuff)	stuff
adddecl            90 missing/strftime.c #define adddecl(stuff)
adddecl            99 missing/strftime.c adddecl(static int iso8601wknum();)


after_exec

after_exec        900 process.c      #define after_exec() rb_thread_start_timer()
after_exec        903 process.c      #define after_exec()


alloca

alloca             49 eval.c         #   define alloca __builtin_alloca
alloca             47 gc.c           #   define alloca __builtin_alloca
alloca            143 missing/alloca.c alloca (size)			/* returns pointer to storage */
alloca             87 ruby.h         # define alloca __alloca


arg_add

arg_add           386 parse.y        #define arg_add(l,a) dispatch2(arglist_add, l, a)
arg_add          7344 parse.y        arg_add(NODE *node1, NODE *node2)


arg_ambiguous

arg_ambiguous    5405 parse.y        arg_ambiguous(void)
arg_ambiguous    5415 parse.y        #define arg_ambiguous() ripper_arg_ambiguous(parser)


arg_prepend

arg_prepend       387 parse.y        #define arg_prepend(l,a) dispatch2(arglist_prepend, l, a)
arg_prepend      7886 parse.y        arg_prepend(NODE *node1, NODE *node2)


assert

assert             28 ext/openssl/ossl.h #  define assert(condition)
assert              6 wince/assert.c void assert( int expression )


before_exec

before_exec       899 process.c      #define before_exec() rb_thread_stop_timer()
before_exec       902 process.c      #define before_exec()


bind

bind             2214 win32/win32.c  #undef bind
bind              389 win32/win32.h  #undef bind
bind              390 win32/win32.h  #define bind(s, a, l)		rb_w32_bind(s, a, l)


blk0

blk0               53 ext/digest/sha1/sha1.c # define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \
blk0               56 ext/digest/sha1/sha1.c # define blk0(i) block->l[i]


bm_search

bm_search         801 ext/stringio/stringio.c bm_search(little, llen, big, blen, skip)
bm_search        2794 regexec.c      bm_search(regex_t* reg, const UChar* target, const UChar* target_end,


bytestring_t

bytestring_t       45 ext/syck/rubyext.c } bytestring_t;
bytestring_t       37 ext/syck/yaml2byte.c } bytestring_t;


catch_timer

catch_timer      11577 eval.c         catch_timer(sig)
catch_timer      11625 eval.c         catch_timer(sig)


chdir

chdir              44 missing/os2.c  chdir(__const__ char *path)
chdir              18 wince/direct.h #define chdir      _chdir


chown

chown              79 file.c         #define chown be_chown
chown              15 missing/os2.c  chown(char *path, int owner, int group)
chown            2936 win32/win32.c  chown(const char *path, int owner, int group)


clearerr

clearerr          206 missing/vsnprintf.c #undef clearerr
clearerr          209 missing/vsnprintf.c #define	clearerr(p)	__sclearerr(p)
clearerr          830 sprintf.c      #undef clearerr


close

close             197 ext/socket/socket.c #undef close
close             198 ext/socket/socket.c #define close closesocket
close              44 win32/win32.c  #undef close
close             109 win32/win32.h  #define close(h)		rb_w32_close(h)
close              80 wince/io_wce.c int close(int fd)


closed_dbm

closed_dbm         35 ext/dbm/dbm.c  closed_dbm()
closed_dbm         36 ext/gdbm/gdbm.c closed_dbm()


compile_error

compile_error    1553 eval.c         compile_error(const char *at)
compile_error     443 parse.y        # define compile_error ripper_compile_error
compile_error     446 parse.y        # define compile_error rb_compile_error


connect

connect          2232 win32/win32.c  #undef connect
connect           392 win32/win32.h  #undef connect
connect           393 win32/win32.h  #define connect(s, a, l)	rb_w32_connect(s, a, l)


debug

debug            3784 ext/nkf/nkf-utf8/nkf.c void debug(str)
debug              47 ext/sdbm/_sdbm.c #define debug(x)	printf x
debug              49 ext/sdbm/_sdbm.c #define debug(x)


define_swapx

define_swapx       53 pack.c         #define define_swapx(x, xtype)		\
define_swapx       88 pack.c         define_swapx(s,short)
define_swapx      171 pack.c         define_swapx(d, double)


define_syslog_shortcut_method

define_syslog_shortcut_method  189 ext/syslog/syslog.c #define define_syslog_shortcut_method(pri, name) \
define_syslog_shortcut_method  198 ext/syslog/syslog.c define_syslog_shortcut_method(LOG_EMERG, emerg)


delete_slaves

delete_slaves    4262 ext/tk/tcltklib.c delete_slaves(ip)
delete_slaves    4311 ext/tk/tcltklib.c delete_slaves(ip)


dyna_in_block

dyna_in_block     324 parse.y        #define dyna_in_block() dyna_in_block_gen(parser)
dyna_in_block    4432 parse.y        # define dyna_in_block()   1


each_i

each_i           1021 hash.c         each_i(VALUE key, VALUE value)
each_i            345 range.c        each_i(VALUE v, void *arg)


each_pair

each_pair         432 ext/dbm/dbm.c  each_pair(obj)
each_pair         534 ext/gdbm/gdbm.c each_pair(obj)
each_pair         410 ext/sdbm/init.c each_pair(obj)


enough_to_get

enough_to_get      50 win32/win32.c  #  define enough_to_get(n) (--(n) >= 0)
enough_to_get      53 win32/win32.c  #  define enough_to_get(n) (--(n) >= 0)


enough_to_put

enough_to_put      51 win32/win32.c  #  define enough_to_put(n) (++(n) < 0)
enough_to_put      54 win32/win32.c  #  define enough_to_put(n) (--(n) >= 0)


environ

environ          1239 eval.c         #define environ (*_NSGetEnviron())
environ          1503 hash.c         #undef environ
environ          1504 hash.c         #define environ my_environ
environ          1506 hash.c         #undef environ
environ          1507 hash.c         #define environ (*_NSGetEnviron())


execv

execv             135 win32/win32.h  #undef execv
execv             136 win32/win32.h  #define execv(path,argv)	rb_w32_aspawn(P_OVERLAY,path,argv)
execv              43 wince/process.h #define execv	   _execv
execv              20 wince/process_wce.c int execv(const char *path, char *const argv[])


exhash

exhash            123 ext/sdbm/_sdbm.c #define exhash(item)	sdbm_hash((item).dptr, (item).dsize)
exhash            636 ext/sdbm/_sdbm.c #define exhash(item)	sdbm_hash((item).dptr, (item).dsize)


fclose

fclose             43 win32/win32.c  #undef fclose
fclose            110 win32/win32.h  #define fclose(f)		rb_w32_fclose(f)


fdbm_modify

fdbm_modify       282 ext/dbm/dbm.c  fdbm_modify(obj)
fdbm_modify       259 ext/sdbm/init.c fdbm_modify(obj)


fdopen

fdopen            127 win32/win32.h  #undef fdopen
fdopen            128 win32/win32.h  #define fdopen(h, m)		rb_w32_fdopen(h, m)
fdopen             25 wince/stdio.c  FILE *fdopen( int handle, const char *mode )


feof

feof              204 missing/vsnprintf.c #undef feof
feof              207 missing/vsnprintf.c #define	feof(p)		__sfeof(p)
feof              828 sprintf.c      #undef feof


ferror

ferror            205 missing/vsnprintf.c #undef ferror
ferror            208 missing/vsnprintf.c #define	ferror(p)	__sferror(p)
ferror            829 sprintf.c      #undef ferror


fetch_name

fetch_name       2394 regparse.c     fetch_name(UChar** src, UChar* end, UChar** rname_end, ScanEnv* env, int ref)
fetch_name       2470 regparse.c     fetch_name(UChar** src, UChar* end, UChar** rname_end, ScanEnv* env, int ref)


fgetc

fgetc            3587 win32/win32.c  #undef fgetc
fgetc              90 win32/win32.h  #undef fgetc
fgetc             102 win32/win32.h  #define fgetc(_stream)		getc(_stream)


fgetchar

fgetchar           94 win32/win32.h  #undef fgetchar
fgetchar          104 win32/win32.h  #define fgetchar()		getchar()


fileno

fileno            212 missing/vsnprintf.c #define	fileno(p)	__sfileno(p)
fileno            831 sprintf.c      #undef fileno


finite

finite             19 missing/erf.c  #   define finite(x) _finite(x)
finite              4 missing/finite.c finite(double n)
finite            235 win32/win32.h  #define finite(x) _finite(x)


flock

flock            3068 file.c         #define flock(fd, op) rb_thread_flock(fd, op, fptr)
flock            3134 file.c         #undef flock
flock              26 missing/flock.c flock(int fd, int operation)
flock              91 missing/flock.c flock(int fd, int operation)
flock             123 missing/flock.c flock(int fd, int operation)
flock             319 win32/win32.c  flock(int fd, int oper)


fopen

fopen             153 io.c           #define fopen(file_spec, mode)  fopen(file_spec, mode, "rfm=stmlf")
fopen            3988 win32/win32.c  #undef fopen
fopen             125 win32/win32.h  #undef fopen
fopen             126 win32/win32.h  #define fopen(p, m)		rb_w32_fopen(p, m)


fputc

fputc            3612 win32/win32.c  #undef fputc
fputc              91 win32/win32.h  #undef fputc
fputc             103 win32/win32.h  #define fputc(_c, _stream)	putc(_c, _stream)


fputchar

fputchar           95 win32/win32.h  #undef fputchar
fputchar          105 win32/win32.h  #define fputchar(_c)		putchar(_c)


free_dbm

free_dbm           52 ext/dbm/dbm.c  free_dbm(dbmp)
free_dbm           53 ext/gdbm/gdbm.c free_dbm(dbmp)


freeaddrinfo

freeaddrinfo       68 ext/socket/addrinfo.h #define freeaddrinfo freeaddrinfo__compat
freeaddrinfo      210 ext/socket/getaddrinfo.c freeaddrinfo(ai)


fsopen

fsopen            129 win32/win32.h  #undef fsopen
fsopen            130 win32/win32.h  #define fsopen(p, m, sh)	rb_w32_fsopen(p, m, sh)


fstat

fstat            3164 win32/win32.c  #undef fstat
fstat             123 win32/win32.h  #undef fstat
fstat             124 win32/win32.h  #define fstat(fd,st)		rb_w32_fstat(fd,st)
fstat              79 wince/sys/stat.c int fstat(int file, struct stat *sbuf)


getDevice

getDevice         313 ext/pty/pty.c  getDevice(master,slave)
getDevice         324 ext/pty/pty.c  getDevice(master,slave)
getDevice         338 ext/pty/pty.c  getDevice(master,slave)


get_osfhandle

get_osfhandle     458 win32/win32.h  #undef get_osfhandle
get_osfhandle     459 win32/win32.h  #define get_osfhandle(h)	rb_w32_get_osfhandle(h)


getaddrinfo

getaddrinfo        65 ext/socket/addrinfo.h #define getaddrinfo getaddrinfo__compat
getaddrinfo       271 ext/socket/getaddrinfo.c getaddrinfo(hostname, servname, hints, res)
getaddrinfo       169 ext/socket/socket.c #define getaddrinfo(node,serv,hints,res) ruby_getaddrinfo((node),(serv),(hints),(res))
getaddrinfo       192 ext/socket/socket.c #undef getaddrinfo
getaddrinfo       193 ext/socket/socket.c #define getaddrinfo(node,serv,hints,res) ruby_getaddrinfo__aix((node),(serv),(hints),(res))


getc

getc               35 ext/nkf/nkf.c  #undef getc
getc               37 ext/nkf/nkf.c  #define getc(f)         (input_ctr>=i_len?-1:input[input_ctr++])
getc               88 win32/win32.h  #undef getc
getc               97 win32/win32.h  #define getc(_stream)		rb_w32_getc(_stream)


getchar

getchar            92 win32/win32.h  #undef getchar
getchar            98 win32/win32.h  #define getchar()		rb_w32_getc(stdin)


getcwd

getcwd             35 missing/os2.c  getcwd(char *path, size_t len)
getcwd           2915 win32/win32.c  #undef getcwd
getcwd           2917 win32/win32.c  #define getcwd _getcwd
getcwd            461 win32/win32.h  #undef getcwd
getcwd            462 win32/win32.h  #define getcwd(b, s)		rb_w32_getcwd(b, s)
getcwd             14 wince/direct.c char *getcwd(char* buffer, int maxlen)


getenv

getenv            464 win32/win32.h  #undef getenv
getenv            465 win32/win32.h  #define getenv(n)		rb_w32_getenv(n)
getenv             11 wince/stdlib.c char *getenv(const char *env)


gethostbyaddr

gethostbyaddr    2509 win32/win32.c  #undef gethostbyaddr
gethostbyaddr     434 win32/win32.h  #undef gethostbyaddr
gethostbyaddr     435 win32/win32.h  #define gethostbyaddr(a, l, t)	rb_w32_gethostbyaddr(a, l, t)


gethostbyname

gethostbyname    2526 win32/win32.c  #undef gethostbyname
gethostbyname     437 win32/win32.h  #undef gethostbyname
gethostbyname     438 win32/win32.h  #define gethostbyname(n)	rb_w32_gethostbyname(n)


gethostname

gethostname      2543 win32/win32.c  #undef gethostname
gethostname       440 win32/win32.h  #undef gethostname
gethostname       441 win32/win32.h  #define gethostname(n, l)	rb_w32_gethostname(n, l)


getnameinfo

getnameinfo        66 ext/socket/addrinfo.h #define getnameinfo getnameinfo__compat
getnameinfo       139 ext/socket/getnameinfo.c getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)


getpeername

getpeername      2258 win32/win32.c  #undef getpeername
getpeername       398 win32/win32.h  #undef getpeername
getpeername       399 win32/win32.h  #define getpeername(s, a, l)	rb_w32_getpeername(s, a, l)


getpid

getpid           3764 win32/win32.c  #undef getpid
getpid            111 win32/win32.h  #define getpid()		rb_w32_getpid()


getprotobyname

getprotobyname   2560 win32/win32.c  #undef getprotobyname
getprotobyname    443 win32/win32.h  #undef getprotobyname
getprotobyname    444 win32/win32.h  #define getprotobyname(n)	rb_w32_getprotobyname(n)
getprotobyname    197 wince/winsock2.c struct protoent* getprotobyname(const char* name)


getprotobynumber

getprotobynumber 2577 win32/win32.c  #undef getprotobynumber
getprotobynumber  446 win32/win32.h  #undef getprotobynumber
getprotobynumber  447 win32/win32.h  #define getprotobynumber(n)	rb_w32_getprotobynumber(n)
getprotobynumber  218 wince/winsock2.c struct protoent* getprotobynumber(int proto)


getservbyname

getservbyname    2594 win32/win32.c  #undef getservbyname
getservbyname     449 win32/win32.h  #undef getservbyname
getservbyname     450 win32/win32.h  #define getservbyname(n, p)	rb_w32_getservbyname(n, p)
getservbyname     239 wince/winsock2.c struct servent* getservbyname(const char* name,


getservbyport

getservbyport    2611 win32/win32.c  #undef getservbyport
getservbyport     452 win32/win32.h  #undef getservbyport
getservbyport     453 win32/win32.h  #define getservbyport(p, pr)	rb_w32_getservbyport(p, pr)
getservbyport     271 wince/winsock2.c struct servent* getservbyport(int port, const char* proto)


getsockname

getsockname      2275 win32/win32.c  #undef getsockname
getsockname       401 win32/win32.h  #undef getsockname
getsockname       402 win32/win32.h  #define getsockname(s, a, l)	rb_w32_getsockname(s, a, l)


getsockopt

getsockopt       1699 win32/win32.c  #undef getsockopt
getsockopt        404 win32/win32.h  #undef getsockopt
getsockopt        405 win32/win32.h  #define getsockopt(s, v, n, o, l) rb_w32_getsockopt(s, v, n, o, l)


gettimeofday

gettimeofday       33 missing/x68.c  gettimeofday(struct timeval *tv, struct timezone *tz)
gettimeofday     2888 win32/win32.c  gettimeofday(struct timeval *tv, struct timezone *tz)


hton16

hton16            220 pack.c         #define hton16(x) (endian()?(x):swap16(x))
hton16            246 pack.c         #define hton16(x) (x)
hton16            275 pack.c         #define hton16(x) swap16(x)


hton32

hton32            221 pack.c         #define hton32(x) (endian()?(x):swap32(x))
hton32            247 pack.c         #define hton32(x) (x)
hton32            276 pack.c         #define hton32(x) swap32(x)


htond

htond             208 pack.c         #define htond(x) (endian()?(x):swapd(x))
htond             234 pack.c         #define htond(x) (x)
htond             263 pack.c         #define htond(x) swapd(x)


htonf

htonf             207 pack.c         #define htonf(x) (endian()?(x):swapf(x))
htonf             233 pack.c         #define htonf(x) (x)
htonf             262 pack.c         #define htonf(x) swapf(x)


htonl

htonl             206 pack.c         #define htonl(x) (endian()?(x):swapl(x))
htonl             229 pack.c         #define htonl(x) (x)
htonl             254 pack.c         #undef htonl
htonl             259 pack.c         #define htonl(x) swapl(x)


htons

htons             205 pack.c         #define htons(x) (endian()?(x):swaps(x))
htons             228 pack.c         #define htons(x) (x)
htons             253 pack.c         #undef htons
htons             258 pack.c         #define htons(x) swaps(x)


htov16

htov16            218 pack.c         #define htov16(x) (endian()?swap16(x):(x))
htov16            244 pack.c         #define htov16(x) swap16(x)
htov16            273 pack.c         #define htov16(x) (x)


htov32

htov32            219 pack.c         #define htov32(x) (endian()?swap32(x):(x))
htov32            245 pack.c         #define htov32(x) swap32(x)
htov32            274 pack.c         #define htov32(x) (x)


htovd

htovd             212 pack.c         #define htovd(x) (endian()?swapd(x):(x))
htovd             238 pack.c         #define htovd(x) swapd(x)
htovd             267 pack.c         #define htovd(x) (x)


htovf

htovf             211 pack.c         #define htovf(x) (endian()?swapf(x):(x))
htovf             237 pack.c         #define htovf(x) swapf(x)
htovf             266 pack.c         #define htovf(x) (x)


htovl

htovl             210 pack.c         #define htovl(x) (endian()?swapl(x):(x))
htovl             236 pack.c         #define htovl(x) swapl(x)
htovl             265 pack.c         #define htovl(x) (x)


htovs

htovs             209 pack.c         #define htovs(x) (endian()?swaps(x):(x))
htovs             235 pack.c         #define htovs(x) swaps(x)
htovs             264 pack.c         #define htovs(x) (x)


id_to_value

id_to_value        64 ext/racc/cparse/cparse.c # define id_to_value(i) ID2SYM(i)
id_to_value        66 ext/racc/cparse/cparse.c # define id_to_value(i) ULONG2NUM(i)


ifndef_ripper

ifndef_ripper     416 parse.y        # define ifndef_ripper(x) x
ifndef_ripper     418 parse.y        # define ifndef_ripper(x)


init_stdhandle

init_stdhandle   1663 win32/win32.c  init_stdhandle(void)
init_stdhandle   1681 win32/win32.c  init_stdhandle(void)


inspect_i

inspect_i        1111 hash.c         inspect_i(VALUE key, VALUE value, VALUE str)
inspect_i         305 object.c       inspect_i(ID id, VALUE value, VALUE str)


ioctl

ioctl              23 ext/io/wait/wait.c #define ioctl ioctlsocket
ioctl            1836 win32/win32.c  ioctl(int i, int u, ...)


ioctl_arg

ioctl_arg          24 ext/io/wait/wait.c #define ioctl_arg u_long
ioctl_arg          27 ext/io/wait/wait.c #define ioctl_arg int


ioctl_arg2num

ioctl_arg2num      25 ext/io/wait/wait.c #define ioctl_arg2num(i) ULONG2NUM(i)
ioctl_arg2num      28 ext/io/wait/wait.c #define ioctl_arg2num(i) INT2NUM(i)


ioctlsocket

ioctlsocket      2307 win32/win32.c  #undef ioctlsocket
ioctlsocket       407 win32/win32.h  #undef ioctlsocket
ioctlsocket       408 win32/win32.h  #define ioctlsocket(s, c, a)	rb_w32_ioctlsocket(s, c, a)


ip_null_namespace

ip_null_namespace  403 ext/tk/tcltklib.c #define ip_null_namespace(interp) (0)
ip_null_namespace  405 ext/tk/tcltklib.c #define ip_null_namespace(interp) \


is_ruby_native_thread

is_ruby_native_thread 1253 eval.c         is_ruby_native_thread(void)
is_ruby_native_thread  734 ruby.h         #define is_ruby_native_thread() (1)


is_socket

is_socket         184 io.c           #define is_socket(fd, path)	rb_w32_is_socket(fd)
is_socket         186 io.c           #define is_socket(fd, path)	0
is_socket         190 io.c           is_socket(int fd, const char *path)
is_socket        1702 win32/win32.c  is_socket(SOCKET sock)


isatty

isatty            138 win32/win32.h  #undef isatty
isatty            139 win32/win32.h  #define isatty(h)		rb_w32_isatty(h)
isatty             67 wince/io.h     #define isatty	   _isatty


isdirsep

isdirsep         2235 file.c         #define isdirsep(x) ((x) == '/' || (x) == '\\')
isdirsep         2237 file.c         #define isdirsep(x) ((x) == '/')
isdirsep           40 win32/win32.c  #define isdirsep(x) ((x) == '/' || (x) == '\\')


isinf

isinf              68 missing.h      #  define isinf(x) (!finite(x) && !isnan(x))
isinf              16 missing/erf.c  #   define isinf(x) (!_finite(x) && !_isnan(x))
isinf               9 missing/isinf.c isinf(double n)
isinf              31 missing/isinf.c isinf(double n)
isinf              49 missing/isinf.c isinf(double n)


ismbchar

ismbchar           21 regex.h        #undef ismbchar
ismbchar           22 regex.h        #define ismbchar(c) (mbclen((c)) != 1)


isnan

isnan              13 missing/erf.c  #   define isnan(x) _isnan(x)
isnan               6 missing/isnan.c isnan(double n)
isnan             232 win32/win32.h  #define isnan(x) _isnan(x)


link

link               22 missing/os2.c  link(char *from, char *to)
link               18 missing/x68.c  link(const char *src, const char *dst)
link             3026 win32/win32.c  link(const char *from, const char *to)


listen

listen           2324 win32/win32.c  #undef listen
listen            410 win32/win32.h  #undef listen
listen            411 win32/win32.h  #define listen(s, b)		rb_w32_listen(s, b)


load

load             1080 dln.c          load(file)
load             1290 marshal.c      load(struct load_arg *arg)


load_mantissa

load_mantissa     236 marshal.c      load_mantissa(double d, const char *buf, int len)
load_mantissa     266 marshal.c      #define load_mantissa(d, buf, len) (d)


local_cnt

local_cnt         312 parse.y        #define local_cnt(id) local_cnt_gen(parser, id)
local_cnt        4430 parse.y        # define local_cnt(x)      3


local_id

local_id          314 parse.y        #define local_id(id) local_id_gen(parser, id)
local_id         4431 parse.y        # define local_id(x)       1


lstat

lstat              67 dir.c          #define lstat stat
lstat              64 file.c         #define lstat stat


main

main               57 ext/digest/md5/md5.c main()
main               97 ext/digest/md5/md5.c main()
main              692 ext/nkf/nkf-utf8/nkf.c main(argc, argv)
main              471 ext/openssl/ossl.c main(int argc, char *argv[], char *env[])
main              247 ext/syck/yaml2byte.c int main() {
main               26 main.c         main(int argc, char **argv, char **envp)
main              879 missing/strftime.c main(argc, argv)
main              258 wince/time_wce.c int main()
main              309 wince/winsock2.c int main()


max

max               148 missing/strftime.c #undef max	/* also, just in case */
max               154 missing/strftime.c max(a, b)


mblen

mblen             278 util.c         mblen(const char *s, size_t n)
mblen              23 wince/stdlib.c int mblen(const char *mbstr, size_t count)


memcmp

memcmp             33 ext/sdbm/_sdbm.c #define	memcmp(s1,s2,n)	bcmp(s1,s2,n)
memcmp              6 missing/memcmp.c memcmp(const void *s1, const void *s2, size_t len)


memcpy

memcpy             43 ext/digest/sha1/sha1.c #define	memcpy(s, d, l)		bcopy((d), (s), (l))
memcpy             32 ext/sdbm/_sdbm.c #define	memcpy(s1,s2,n)	bcopy(s2, s1, n)


mkdir

mkdir             142 win32/win32.h  #undef mkdir
mkdir             143 win32/win32.h  #define mkdir(p, m)		rb_w32_mkdir(p, m)
mkdir              20 wince/direct.h #define mkdir      _mkdir


name_find

name_find         469 regparse.c     name_find(regex_t* reg, const UChar* name, const UChar* name_end)
name_find         653 regparse.c     name_find(regex_t* reg, UChar* name, UChar* name_end)


names_clear

names_clear       443 regparse.c     names_clear(regex_t* reg)
names_clear       609 regparse.c     names_clear(regex_t* reg)


nd_term

nd_term           349 parse.y        #define nd_term(node) ((signed short)(node)->u2.id)
nd_term           351 parse.y        #define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2)


ntohd

ntohd             204 pack.c         #define ntohd(x) (endian()?(x):swapd(x))
ntohd             232 pack.c         #define ntohd(x) (x)
ntohd             261 pack.c         #define ntohd(x) swapd(x)


ntohf

ntohf             203 pack.c         #define ntohf(x) (endian()?(x):swapf(x))
ntohf             231 pack.c         #define ntohf(x) (x)
ntohf             260 pack.c         #define ntohf(x) swapf(x)


ntohl

ntohl             202 pack.c         #define ntohl(x) (endian()?(x):swapl(x))
ntohl             227 pack.c         #define ntohl(x) (x)
ntohl             252 pack.c         #undef ntohl
ntohl             257 pack.c         #define ntohl(x) swapl(x)


ntohs

ntohs             201 pack.c         #define ntohs(x) (endian()?(x):swaps(x))
ntohs             226 pack.c         #define ntohs(x) (x)
ntohs             251 pack.c         #undef ntohs
ntohs             256 pack.c         #define ntohs(x) swaps(x)


num_to_asn1integer

num_to_asn1integer  123 ext/openssl/ossl_asn1.c num_to_asn1integer(VALUE obj, ASN1_INTEGER *ai)
num_to_asn1integer  144 ext/openssl/ossl_asn1.c num_to_asn1integer(VALUE obj, ASN1_INTEGER *ai)


numberof

numberof           64 ext/openssl/ossl_pkcs7.c #define numberof(ary) (sizeof(ary)/sizeof(ary[0]))
numberof           20 ext/openssl/ossl_ssl.c #define numberof(ary) (sizeof(ary)/sizeof(ary[0]))


off_t

off_t              57 io.c           # define off_t  long
off_t              29 wince/sys/types.h typedef long off_t;


onig_foreach_name

onig_foreach_name  506 regparse.c     onig_foreach_name(regex_t* reg,
onig_foreach_name  671 regparse.c     onig_foreach_name(regex_t* reg,
onig_foreach_name  874 regparse.c     onig_foreach_name(regex_t* reg,


onig_name_to_backref_number

onig_name_to_backref_number  834 regparse.c     onig_name_to_backref_number(regex_t* reg, const UChar* name,
onig_name_to_backref_number  867 regparse.c     onig_name_to_backref_number(regex_t* reg, const UChar* name,


onig_name_to_group_numbers

onig_name_to_group_numbers  812 regparse.c     onig_name_to_group_numbers(regex_t* reg, const UChar* name,
onig_name_to_group_numbers  860 regparse.c     onig_name_to_group_numbers(regex_t* reg, const UChar* name,


onig_names_free

onig_names_free   454 regparse.c     onig_names_free(regex_t* reg)
onig_names_free   638 regparse.c     onig_names_free(regex_t* reg)


onig_number_of_names

onig_number_of_names  554 regparse.c     onig_number_of_names(regex_t* reg)
onig_number_of_names  692 regparse.c     onig_number_of_names(regex_t* reg)
onig_number_of_names  882 regparse.c     onig_number_of_names(regex_t* reg)


onig_print_names

onig_print_names  419 regparse.c     onig_print_names(FILE* fp, regex_t* reg)
onig_print_names  577 regparse.c     onig_print_names(FILE* fp, regex_t* reg)


onig_st_init_strend_table_with_size

onig_st_init_strend_table_with_size  170 regint.h       #define onig_st_init_strend_table_with_size st_init_strend_table_with_size
onig_st_init_strend_table_with_size  322 regparse.c     onig_st_init_strend_table_with_size(int size)


onig_st_insert_strend

onig_st_insert_strend  174 regint.h       #define onig_st_insert_strend               st_insert_strend
onig_st_insert_strend  339 regparse.c     onig_st_insert_strend(st_table *table, const UChar* str_key, const UChar* end_key, st_data_t value)


onig_st_lookup_strend

onig_st_lookup_strend  176 regint.h       #define onig_st_lookup_strend               st_lookup_strend
onig_st_lookup_strend  328 regparse.c     onig_st_lookup_strend(st_table *table, const UChar* str_key, const UChar* end_key, st_data_t *value)


onigenc_get_left_adjust_char_head

onigenc_get_left_adjust_char_head  415 regenc.c       onigenc_get_left_adjust_char_head(OnigEncoding enc, const UChar* start, const UChar* s)
onigenc_get_left_adjust_char_head 1010 regenc.c       onigenc_get_left_adjust_char_head(OnigEncoding enc, UChar* start, UChar* s)


onigenc_set_default_caseconv_table

onigenc_set_default_caseconv_table  399 regenc.c       onigenc_set_default_caseconv_table(const UChar* table)
onigenc_set_default_caseconv_table 1034 regenc.c       onigenc_set_default_caseconv_table(UChar* table) { }


open

open              154 io.c           #define open(file_spec, flags, mode)  open(file_spec, flags, mode, "rfm=stmlf")
open               61 wince/io.h     #define open	   _open


ossl_config_each

ossl_config_each  385 ext/openssl/ossl_config.c ossl_config_each(VALUE self)
ossl_config_each  410 ext/openssl/ossl_config.c ossl_config_each(VALUE self)


ossl_config_get_sections

ossl_config_get_sections  303 ext/openssl/ossl_config.c ossl_config_get_sections(VALUE self)
ossl_config_get_sections  396 ext/openssl/ossl_config.c ossl_config_get_sections(VALUE self)


ossl_config_to_s

ossl_config_to_s  352 ext/openssl/ossl_config.c ossl_config_to_s(VALUE self)
ossl_config_to_s  403 ext/openssl/ossl_config.c ossl_config_to_s(VALUE self)


p_gid_sw_ensure

p_gid_sw_ensure  3426 process.c      p_gid_sw_ensure(id)
p_gid_sw_ensure  3480 process.c      p_gid_sw_ensure(VALUE obj)


p_gid_switch

p_gid_switch     3448 process.c      p_gid_switch(obj)
p_gid_switch     3487 process.c      p_gid_switch(VALUE obj)


p_uid_sw_ensure

p_uid_sw_ensure  3317 process.c      p_uid_sw_ensure(id)
p_uid_sw_ensure  3372 process.c      p_uid_sw_ensure(VALUE obj)


p_uid_switch

p_uid_switch     3339 process.c      p_uid_switch(obj)
p_uid_switch     3379 process.c      p_uid_switch(VALUE obj)


parser

parser            199 parse.y        #define parser ((struct parser_params*)parser_v)
parser           4404 parse.y        # undef parser


pause

pause            9570 eval.c         #  define pause() Sleep(INFINITE)
pause            9572 eval.c         #  define pause() sleep(0x7fffffff)


pipe

pipe              108 win32/win32.h  #define pipe(p)			_pipe(p, 2048L, O_BINARY)
pipe               69 wince/io.h     #define pipe       _pipe


pointer

pointer            48 missing/alloca.c typedef void	*pointer;		/* generic pointer type */
pointer            50 missing/alloca.c typedef char	*pointer;		/* generic pointer type */


posix_nativethread_signal

posix_nativethread_signal  461 intern.h       #define posix_nativethread_signal ruby_posix_nativethread_signal
posix_nativethread_signal  363 signal.c       posix_nativethread_signal(int signum, sighandler_t handler)


posix_signal

posix_signal      458 intern.h       #define posix_signal ruby_posix_signal
posix_signal      346 signal.c       posix_signal(int signum, sighandler_t handler)


proc_spawn

proc_spawn       1131 process.c      #define proc_spawn(str) rb_w32_spawn(P_NOWAIT, str, 0)
proc_spawn       1134 process.c      proc_spawn(str)


proc_spawn_v

proc_spawn_v     1065 process.c      #define proc_spawn_v(argv, prog) rb_w32_aspawn(P_NOWAIT, prog, argv)
proc_spawn_v     1068 process.c      proc_spawn_v(argv, prog)


proc_syswait

proc_syswait     1266 process.c      #define proc_syswait (VALUE (*)(VALUE))rb_syswait
proc_syswait     1269 process.c      proc_syswait(pid)


proto

proto              56 ext/sdbm/sdbm.h #define proto(p) p
proto              58 ext/sdbm/sdbm.h #define proto(p) ()


putc

putc               89 win32/win32.h  #undef putc
putc               99 win32/win32.h  #define putc(_c, _stream)	rb_w32_putc(_c, _stream)


putchar

putchar            41 ext/nkf/nkf.c  #undef putchar
putchar            44 ext/nkf/nkf.c  #define putchar(c)      rb_nkf_putchar(c)
putchar            93 win32/win32.h  #undef putchar
putchar           100 win32/win32.h  #define putchar(_c)		rb_w32_putc(_c, stdout)


rb_atomic_t

rb_atomic_t        18 rubysig.h      typedef LONG rb_atomic_t;
rb_atomic_t        41 rubysig.h      typedef int rb_atomic_t;


rb_compile_error

rb_compile_error   67 error.c        rb_compile_error(const char *fmt, ...)
rb_compile_error  442 parse.y        # define rb_compile_error ripper_compile_error


rb_curses_define_const

rb_curses_define_const 1581 ext/curses/curses.c #define rb_curses_define_const(c) rb_define_const(mCurses,#c,UINT2NUM(c))
rb_curses_define_const 2099 ext/curses/curses.c #undef rb_curses_define_const


rb_disable_super

rb_disable_super  570 eval.c         #undef rb_disable_super
rb_disable_super  574 eval.c         rb_disable_super(VALUE klass, const char *name)
rb_disable_super  205 intern.h       #define rb_disable_super(klass, name) ((void)0)


rb_enable_super

rb_enable_super   571 eval.c         #undef rb_enable_super
rb_enable_super   580 eval.c         rb_enable_super(VALUE klass, const char *name)
rb_enable_super   206 intern.h       #define rb_enable_super(klass, name) ((void)0)


rb_fd_clr

rb_fd_clr        9633 eval.c         rb_fd_clr(n, fds)
rb_fd_clr         187 intern.h       #define rb_fd_clr(n, f)	FD_CLR(n, f)


rb_fd_copy

rb_fd_copy       9651 eval.c         rb_fd_copy(dst, src, max)
rb_fd_copy        189 intern.h       #define rb_fd_copy(d, s, n) (*(d) = *(s))


rb_fd_init

rb_fd_init       9578 eval.c         rb_fd_init(fds)
rb_fd_init        191 intern.h       #define rb_fd_init(f)	FD_ZERO(f)


rb_fd_isset

rb_fd_isset      9642 eval.c         rb_fd_isset(n, fds)
rb_fd_isset       188 intern.h       #define rb_fd_isset(n, f) FD_ISSET(n, f)


rb_fd_max

rb_fd_max         180 intern.h       #define rb_fd_max(f)	((f)->maxfd)
rb_fd_max         193 intern.h       #define rb_fd_max(f)	FD_SETSIZE


rb_fd_ptr

rb_fd_ptr         179 intern.h       #define rb_fd_ptr(f)	((f)->fdset)
rb_fd_ptr         190 intern.h       #define rb_fd_ptr(f)	(f)


rb_fd_select

rb_fd_select     9665 eval.c         rb_fd_select(n, readfds, writefds, exceptfds, timeout)
rb_fd_select      194 intern.h       #define rb_fd_select(n, rfds, wfds, efds, timeout)	select(n, rfds, wfds, efds, timeout)


rb_fd_set

rb_fd_set        9624 eval.c         rb_fd_set(n, fds)
rb_fd_set         186 intern.h       #define rb_fd_set(n, f)	FD_SET(n, f)


rb_fd_term

rb_fd_term       9587 eval.c         rb_fd_term(fds)
rb_fd_term        192 intern.h       #define rb_fd_term(f)	(f)


rb_fd_zero

rb_fd_zero       9596 eval.c         rb_fd_zero(fds)
rb_fd_zero        185 intern.h       #define rb_fd_zero(f)	FD_ZERO(f)


rb_fdset_t

rb_fdset_t        168 intern.h       } rb_fdset_t;
rb_fdset_t        184 intern.h       typedef fd_set rb_fdset_t;


rb_file_s_lchmod

rb_file_s_lchmod 1771 file.c         rb_file_s_lchmod(int argc, VALUE *argv)
rb_file_s_lchmod 1786 file.c         rb_file_s_lchmod(int argc, VALUE *argv)


rb_file_s_lchown

rb_file_s_lchown 1905 file.c         rb_file_s_lchown(int argc, VALUE *argv)
rb_file_s_lchown 1931 file.c         rb_file_s_lchown(int argc, VALUE *argv)


rb_file_s_utime

rb_file_s_utime  1959 file.c         rb_file_s_utime(int argc, VALUE *argv)
rb_file_s_utime  1992 file.c         rb_file_s_utime(int argc, VALUE *argv)


rb_fix2int

rb_fix2int       1536 numeric.c      rb_fix2int(val)
rb_fix2int       1580 numeric.c      rb_fix2int(VALUE val)


rb_jmp_buf

rb_jmp_buf       1228 gc.c           typedef unsigned long rb_jmp_buf[8];
rb_jmp_buf       1240 gc.c           typedef unsigned long rb_jmp_buf[6];


rb_jmpbuf_t

rb_jmpbuf_t        88 eval.c         } rb_jmpbuf_t[1];
rb_jmpbuf_t       167 eval.c         typedef jmp_buf rb_jmpbuf_t;


rb_nativethread_t

rb_nativethread_t  718 ruby.h         typedef pthread_t rb_nativethread_t;
rb_nativethread_t  726 ruby.h         typedef DWORD rb_nativethread_t;


rb_num2int

rb_num2int       1526 numeric.c      rb_num2int(val)
rb_num2int       1574 numeric.c      rb_num2int(VALUE val)


rb_quad_pack

rb_quad_pack      179 bignum.c       rb_quad_pack(char *buf, VALUE val)
rb_quad_pack      249 bignum.c       rb_quad_pack(buf, val)


rb_quad_unpack

rb_quad_unpack    206 bignum.c       rb_quad_unpack(const char *buf, int sign)
rb_quad_unpack    277 bignum.c       rb_quad_unpack(buf, sign)


rb_thread_start_timer

rb_thread_start_timer 11615 eval.c         rb_thread_start_timer()
rb_thread_start_timer 11638 eval.c         rb_thread_start_timer()


rb_thread_stop_timer

rb_thread_stop_timer 11620 eval.c         rb_thread_stop_timer()
rb_thread_stop_timer 11650 eval.c         rb_thread_stop_timer()


rb_w32_iswin95

rb_w32_iswin95     80 win32/win32.h  #define rb_w32_iswin95()  (rb_w32_osid() == VER_PLATFORM_WIN32_WINDOWS)
rb_w32_iswin95     83 win32/win32.h  #define rb_w32_iswin95()  FALSE


rb_w32_iswinnt

rb_w32_iswinnt     79 win32/win32.h  #define rb_w32_iswinnt()  (rb_w32_osid() == VER_PLATFORM_WIN32_NT)
rb_w32_iswinnt     82 win32/win32.h  #define rb_w32_iswinnt()  TRUE


rb_w32_open_osfhandle

rb_w32_open_osfhandle   88 win32/win32.c  #define rb_w32_open_osfhandle(osfhandle, flags) _open_osfhandle(osfhandle, flags)
rb_w32_open_osfhandle 1622 win32/win32.c  rb_w32_open_osfhandle(long osfhandle, int flags)
rb_w32_open_osfhandle 1688 win32/win32.c  rb_w32_open_osfhandle(long osfhandle, int flags)


rb_warn0

rb_warn0          422 parse.y        # define rb_warn0(fmt)    rb_warn(fmt)
rb_warn0          428 parse.y        # define rb_warn0(fmt)    ripper_warn0(parser, fmt)


rb_warnI

rb_warnI          423 parse.y        # define rb_warnI(fmt,a)  rb_warn(fmt,a)
rb_warnI          429 parse.y        # define rb_warnI(fmt,a)  ripper_warnI(parser, fmt, a)


rb_warnS

rb_warnS          424 parse.y        # define rb_warnS(fmt,a)  rb_warn(fmt,a)
rb_warnS          430 parse.y        # define rb_warnS(fmt,a)  ripper_warnS(parser, fmt, a)


rb_warning0

rb_warning0       425 parse.y        # define rb_warning0(fmt) rb_warning(fmt)
rb_warning0       431 parse.y        # define rb_warning0(fmt) ripper_warning0(parser, fmt)


rb_warningS

rb_warningS       426 parse.y        # define rb_warningS(fmt,a) rb_warning(fmt,a)
rb_warningS       432 parse.y        # define rb_warningS(fmt,a) ripper_warningS(parser, fmt, a)


rbtk_invalid_namespace

rbtk_invalid_namespace  411 ext/tk/tcltklib.c #define rbtk_invalid_namespace(ptr) (0)
rbtk_invalid_namespace  413 ext/tk/tcltklib.c #define rbtk_invalid_namespace(ptr) \


read

read             3571 win32/win32.c  #undef read
read             3573 win32/win32.c  read(int fd, void *buf, size_t size)
read               63 wince/io.h     #define read	   _read


recv

recv             2341 win32/win32.c  #undef recv
recv              413 win32/win32.h  #undef recv
recv              414 win32/win32.h  #define recv(s, b, l, f)	rb_w32_recv(s, b, l, f)


recvfrom

recvfrom         2358 win32/win32.c  #undef recvfrom
recvfrom          416 win32/win32.h  #undef recvfrom
recvfrom          417 win32/win32.h  #define recvfrom(s, b, l, f, fr, frl) rb_w32_recvfrom(s, b, l, f, fr, frl)


relocation_info

relocation_info   230 dln.c          #  undef relocation_info
relocation_info   231 dln.c          #  define relocation_info reloc_info_sparc


remove_begin

remove_begin      337 parse.y        #define remove_begin(node) (node)
remove_begin     7543 parse.y        remove_begin(NODE *node)


rename

rename            467 win32/win32.h  #undef rename
rename            468 win32/win32.h  #define rename(o, n)		rb_w32_rename(o, n)
rename             59 wince/io.h     #define rename     _rename


rmdir

rmdir             144 win32/win32.h  #undef rmdir
rmdir             145 win32/win32.h  #define rmdir(p)		rb_w32_rmdir(p)
rmdir              19 wince/direct.h #define rmdir      _rmdir


rscheck

rscheck          3173 ext/zlib/zlib.c rscheck(rsptr, rslen, rs)
rscheck          1541 io.c           rscheck(char *rsptr, long rslen, VALUE rs)


ruby_longjmp

ruby_longjmp      160 eval.c         #define ruby_longjmp(env, val) rb_jump_context(env, val)
ruby_longjmp      170 eval.c         #define ruby_longjmp(env,val) _longjmp(env,val)
ruby_longjmp      173 eval.c         #define ruby_longjmp(env,val) longjmp(env,val)


ruby_nativethread_signal

ruby_nativethread_signal  353 signal.c       ruby_nativethread_signal(int signum, sighandler_t handler)
ruby_nativethread_signal  372 signal.c       ruby_nativethread_signal(int signum, sighandler_t handler)


ruby_open_tcl_dll

ruby_open_tcl_dll   89 ext/tk/stubs.c ruby_open_tcl_dll(appname)
ruby_open_tcl_dll  394 ext/tk/stubs.c ruby_open_tcl_dll(appname)


ruby_open_tcltk_dll

ruby_open_tcltk_dll  171 ext/tk/stubs.c ruby_open_tcltk_dll(appname)
ruby_open_tcltk_dll  416 ext/tk/stubs.c int ruby_open_tcltk_dll(appname)


ruby_open_tk_dll

ruby_open_tk_dll  137 ext/tk/stubs.c ruby_open_tk_dll()
ruby_open_tk_dll  407 ext/tk/stubs.c int ruby_open_tk_dll()


ruby_setjmp

ruby_setjmp       161 eval.c         #define ruby_setjmp(just_before_setjmp, j) ((j)->status = 0, \
ruby_setjmp       169 eval.c         #define ruby_setjmp(just_before_setjmp, env) ((just_before_setjmp), _setjmp(env))
ruby_setjmp       172 eval.c         #define ruby_setjmp(just_before_setjmp, env) ((just_before_setjmp), setjmp(env))


ruby_signal

ruby_signal       328 signal.c       ruby_signal(int signum, sighandler_t handler)
ruby_signal       369 signal.c       #define ruby_signal(sig,handler) (rb_trap_accept_nativethreads[sig] = 0, signal((sig),(handler)))


ruby_tcl_create_ip_and_stubs_init

ruby_tcl_create_ip_and_stubs_init  191 ext/tk/stubs.c ruby_tcl_create_ip_and_stubs_init(st)
ruby_tcl_create_ip_and_stubs_init  435 ext/tk/stubs.c ruby_tcl_create_ip_and_stubs_init(st)


ruby_tcl_stubs_init

ruby_tcl_stubs_init  255 ext/tk/stubs.c ruby_tcl_stubs_init()
ruby_tcl_stubs_init  457 ext/tk/stubs.c ruby_tcl_stubs_init()


ruby_tcltk_stubs

ruby_tcltk_stubs  343 ext/tk/stubs.c ruby_tcltk_stubs()
ruby_tcltk_stubs  503 ext/tk/stubs.c ruby_tcltk_stubs()


ruby_tk_stubs_init

ruby_tk_stubs_init  272 ext/tk/stubs.c ruby_tk_stubs_init(tcl_ip)
ruby_tk_stubs_init  463 ext/tk/stubs.c ruby_tk_stubs_init(tcl_ip)


ruby_tk_stubs_safeinit

ruby_tk_stubs_safeinit  308 ext/tk/stubs.c ruby_tk_stubs_safeinit(tcl_ip)
ruby_tk_stubs_safeinit  480 ext/tk/stubs.c ruby_tk_stubs_safeinit(tcl_ip)


rubylib_mangled_path

rubylib_mangled_path  164 ruby.c         #define rubylib_mangled_path(s, l) rb_str_new2(rubylib_mangle((s), (l)))
rubylib_mangled_path  167 ruby.c         #define rubylib_mangled_path(s, l) rb_str_new((s), (l))


rubylib_mangled_path2

rubylib_mangled_path2  165 ruby.c         #define rubylib_mangled_path2(s) rb_str_new2(rubylib_mangle((s), 0))
rubylib_mangled_path2  168 ruby.c         #define rubylib_mangled_path2(s) rb_str_new2(s)


save_mantissa

save_mantissa     207 marshal.c      save_mantissa(double d, char *buf)
save_mantissa     267 marshal.c      #define save_mantissa(d, buf) 0


select

select            196 eval.c         #define select(n, r, w, e, t) select_large_fdset(n, r, w, e, t)
select           1902 win32/win32.c  #undef select
select            395 win32/win32.h  #undef select
select            396 win32/win32.h  #define select(n, r, w, e, t)	rb_w32_select(n, r, w, e, t)
select             41 x68/select.c   select (int fds, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeval *timeout)


send

send             2376 win32/win32.c  #undef send
send              419 win32/win32.h  #undef send
send              420 win32/win32.h  #define send(s, b, l, f)	rb_w32_send(s, b, l, f)


sendto

sendto           2393 win32/win32.c  #undef sendto
sendto            422 win32/win32.h  #undef sendto
sendto            423 win32/win32.h  #define sendto(s, b, l, f, t, tl) rb_w32_sendto(s, b, l, f, t, tl)


set_arg0space

set_arg0space     997 ruby.c         set_arg0space()
set_arg0space    1014 ruby.c         #define set_arg0space() ((void)0)


set_yylval_id

set_yylval_id    4438 parse.y        # define set_yylval_id(x)  yylval.id = x
set_yylval_id    4445 parse.y        # define set_yylval_id(x) (void)(x)


set_yylval_literal

set_yylval_literal 4439 parse.y        # define set_yylval_literal(x) yylval.node = NEW_LIT(x)
set_yylval_literal 4446 parse.y        # define set_yylval_literal(x) (void)(x)


set_yylval_node

set_yylval_node  4440 parse.y        # define set_yylval_node(x) yylval.node = x
set_yylval_node  4447 parse.y        # define set_yylval_node(x) (void)(x)


set_yylval_num

set_yylval_num   4437 parse.y        # define set_yylval_num(x) yylval.num = x
set_yylval_num   4444 parse.y        # define set_yylval_num(x) (void)(x)


set_yylval_str

set_yylval_str   4436 parse.y        # define set_yylval_str(x) yylval.node = NEW_STR(x)
set_yylval_str   4443 parse.y        # define set_yylval_str(x) (void)(x)


setbinmode

setbinmode        123 ext/nkf/nkf-utf8/nkf.c #define setbinmode(fp) fsetbin(fp)
setbinmode        125 ext/nkf/nkf-utf8/nkf.c #define setbinmode(fp) setmode(fileno(fp), O_BINARY)
setbinmode        128 ext/nkf/nkf-utf8/nkf.c #define setbinmode(fp)


setenv

setenv           1694 hash.c         #undef setenv
setenv             50 util.h         #undef setenv
setenv             52 util.h         #define setenv(name,val) ruby_setenv(name,val)


seteuid

seteuid           108 ext/pty/pty.c  #  define seteuid(e)	setreuid(-1, (e))
seteuid           111 ext/pty/pty.c  #   define seteuid(e)	setresuid(-1, (e), -1)


setjmp

setjmp             40 gc.c           #define setjmp(env) _setjmp(env)
setjmp           1236 gc.c           #undef setjmp
setjmp           1259 gc.c           #define setjmp rb_setjmp


setsockopt

setsockopt         45 win32/win32.c  #undef setsockopt
setsockopt       2411 win32/win32.c  #undef setsockopt
setsockopt        425 win32/win32.h  #undef setsockopt
setsockopt        426 win32/win32.h  #define setsockopt(s, v, n, o, l) rb_w32_setsockopt(s, v, n, o, l)


setvbuffer

setvbuffer        132 ext/nkf/nkf-utf8/nkf.c #define       setvbuffer(fp, buf, size)       setvbuf(fp, buf, _IOFBF, size)
setvbuffer        134 ext/nkf/nkf-utf8/nkf.c #define       setvbuffer(fp, buf, size)       setbuffer(fp, buf, size)


shutdown

shutdown          187 io.c           #define shutdown(a,b)	0
shutdown         2428 win32/win32.c  #undef shutdown
shutdown          428 win32/win32.h  #undef shutdown
shutdown          429 win32/win32.h  #define shutdown(s, h)		rb_w32_shutdown(s, h)


signal

signal           1484 process.c      #define signal(a,b) sigset(a,b)
signal             21 wince/signal_wce.c void (* signal(int sig, void (__cdecl *func)(int)))(int)


skipprefix

skipprefix       2314 file.c         #define skipprefix rb_path_skip_prefix
skipprefix       2316 file.c         #define skipprefix(path) (path)


snprintf

snprintf           63 ext/socket/getnameinfo.c #define snprintf _snprintf
snprintf         1115 missing/vsnprintf.c snprintf(char *str, size_t n, char const *fmt, ...)
snprintf          841 sprintf.c      #undef snprintf
snprintf          199 win32/win32.h  #define snprintf   rb_w32_snprintf


sock_gethostname

sock_gethostname 2633 ext/socket/socket.c sock_gethostname(obj)
sock_gethostname 2651 ext/socket/socket.c sock_gethostname(obj)
sock_gethostname 2662 ext/socket/socket.c sock_gethostname(obj)


socket

socket           2485 win32/win32.c  #undef socket
socket            431 win32/win32.h  #undef socket
socket            432 win32/win32.h  #define socket(s, t, p)		rb_w32_socket(s, t, p)


socketpair

socketpair        455 win32/win32.h  #undef socketpair
socketpair        456 win32/win32.h  #define socketpair(a, t, p, s)	rb_w32_socketpair(a, t, p, s)


ssl_get_error

ssl_get_error     567 ext/openssl/ossl_ssl.c #define ssl_get_error(ssl, ret) (errno = WSAGetLastError(), SSL_get_error(ssl, ret))
ssl_get_error     569 ext/openssl/ossl_ssl.c #define ssl_get_error(ssl, ret) SSL_get_error(ssl, ret)


st_add_direct

st_add_direct     154 regint.h       #define st_add_direct                  onig_st_add_direct
st_add_direct     290 st.c           st_add_direct(st_table *table, st_data_t key, st_data_t value)


st_cleanup_safe

st_cleanup_safe   157 regint.h       #define st_cleanup_safe                onig_st_cleanup_safe
st_cleanup_safe   438 st.c           st_cleanup_safe(st_table *table, st_data_t never)


st_copy

st_copy           158 regint.h       #define st_copy                        onig_st_copy
st_copy           325 st.c           st_copy(st_table *old_table)


st_data_t

st_data_t          73 ext/syck/syck.h typedef long st_data_t;
st_data_t           9 st.h           typedef unsigned long st_data_t;


st_delete

st_delete         147 regint.h       #define st_delete                      onig_st_delete
st_delete         365 st.c           st_delete(register st_table *table, register st_data_t *key, st_data_t *value)


st_delete_safe

st_delete_safe    148 regint.h       #define st_delete_safe                 onig_st_delete_safe
st_delete_safe    404 st.c           st_delete_safe(register st_table *table, register st_data_t *key, st_data_t *value, st_data_t never)


st_foreach

st_foreach        153 regint.h       #define st_foreach                     onig_st_foreach
st_foreach        447 st.c           st_foreach(st_table *table, int (*func)(ANYARGS), st_data_t arg)


st_free_table

st_free_table     156 regint.h       #define st_free_table                  onig_st_free_table
st_free_table     196 st.c           st_free_table(st_table *table)


st_init_numtable

st_init_numtable  142 regint.h       #define st_init_numtable               onig_st_init_numtable
st_init_numtable  172 st.c           st_init_numtable(void)


st_init_numtable_with_size

st_init_numtable_with_size  143 regint.h       #define st_init_numtable_with_size     onig_st_init_numtable_with_size
st_init_numtable_with_size  178 st.c           st_init_numtable_with_size(int size)


st_init_strtable

st_init_strtable  144 regint.h       #define st_init_strtable               onig_st_init_strtable
st_init_strtable  184 st.c           st_init_strtable(void)


st_init_strtable_with_size

st_init_strtable_with_size  145 regint.h       #define st_init_strtable_with_size     onig_st_init_strtable_with_size
st_init_strtable_with_size  190 st.c           st_init_strtable_with_size(int size)


st_init_table

st_init_table     140 regint.h       #define st_init_table                  onig_st_init_table
st_init_table     166 st.c           st_init_table(struct st_hash_type *type)


st_init_table_with_size

st_init_table_with_size  141 regint.h       #define st_init_table_with_size        onig_st_init_table_with_size
st_init_table_with_size  143 st.c           st_init_table_with_size(struct st_hash_type *type, int size)


st_insert

st_insert         149 regint.h       #define st_insert                      onig_st_insert
st_insert         271 st.c           st_insert(register st_table *table, register st_data_t key, st_data_t value)


st_lookup

st_lookup         151 regint.h       #define st_lookup                      onig_st_lookup
st_lookup         235 st.c           st_lookup(st_table *table, register st_data_t key, st_data_t *value)


stack_type

stack_type         82 parse.y        typedef unsigned LONG_LONG stack_type;
stack_type         84 parse.y        typedef unsigned long stack_type;


stat

stat               42 win32/win32.c  #undef stat
stat              133 win32/win32.h  #undef stat
stat              134 win32/win32.h  #define stat(path,st)		rb_w32_stat(path,st)


str_isnumber

str_isnumber      225 ext/socket/getaddrinfo.c str_isnumber(p)
str_isnumber      708 ext/socket/socket.c str_isnumber(p)


strcasecmp

strcasecmp          6 missing/strcasecmp.c strcasecmp(const char *p1, const char *p2)
strcasecmp        150 win32/win32.h  #define strcasecmp(s1, s2)	stricmp(s1, s2)


strchr

strchr              4 missing/strchr.c strchr(const char *s, int c)
strchr             93 missing/strftime.c #undef strchr	/* avoid AIX weirdness */


strdup

strdup             56 util.h         #undef strdup
strdup             57 util.h         #define strdup(s) ruby_strdup(s)
strdup              9 wince/string_wce.c char *strdup(const char * str)


strerror

strerror            9 missing/strerror.c strerror(int error)
strerror         1739 win32/win32.c  #undef strerror
strerror          312 win32/win32.h  #define strerror(e) rb_w32_strerror(e)
strerror           18 wince/string_wce.c char* strerror(int errno)


strftime

strftime          168 missing/strftime.c strftime(s, maxsize, format, timeptr)
strftime          776 missing/strftime.c in a process of fixing of strftime() in libraries on Atari ST I grabbed


stricmp

stricmp            54 wince/string_wce.c int stricmp( const char *s1, const char *s2 )
stricmp           117 wince/wince.h  #define stricmp _stricmp


strncasecmp

strncasecmp         7 missing/strncasecmp.c strncasecmp(const char *p1, const char *p2, size_t len)
strncasecmp       151 win32/win32.h  #define strncasecmp(s1, s2, n)	strnicmp(s1, s2, n)


strrchr

strrchr            16 missing/strchr.c strrchr(const char *s, int c)
strrchr            44 wince/string_wce.c char *strrchr( const char *p, int c )


strtod

strtod             83 missing/strtod.c strtod(string, endPtr)
strtod             63 util.h         #undef strtod
strtod             64 util.h         #define strtod(s,e) ruby_strtod(s,e)


subnodes

subnodes         7564 parse.y        #define subnodes(n1, n2) \
subnodes         7605 parse.y        #undef subnodes


swaps

swaps              80 pack.c         #define swaps(x)	swap16(x)
swaps              83 pack.c         #define swaps(x)	((((x)&0xFF)<<24)	\


tcl_stubs_init_p

tcl_stubs_init_p  178 ext/tk/stubs.c tcl_stubs_init_p()
tcl_stubs_init_p  423 ext/tk/stubs.c tcl_stubs_init_p()


time_t

time_t             18 missing.h      #  define time_t long
time_t              6 wince/io.h     typedef unsigned long time_t;


times

times             470 win32/win32.h  #undef times
times             471 win32/win32.h  #define times(t)		rb_w32_times(t)


tk_stubs_init_p

tk_stubs_init_p   184 ext/tk/stubs.c tk_stubs_init_p()
tk_stubs_init_p   429 ext/tk/stubs.c tk_stubs_init_p()


trap_ensure

trap_ensure      1001 regexec.c      trap_ensure(VALUE arg)
trap_ensure       701 signal.c       trap_ensure(struct trap_arg *arg)


uint64_t

uint64_t           25 ext/digest/defs.h   typedef unsigned long uint64_t;
uint64_t           27 ext/digest/defs.h   typedef unsigned LONG_LONG uint64_t;


ungetc

ungetc             36 ext/nkf/nkf.c  #undef ungetc
ungetc             38 ext/nkf/nkf.c  #define ungetc(c,f)     input_ctr--


unlink

unlink            146 win32/win32.h  #undef unlink
unlink            147 win32/win32.h  #define unlink(p)		rb_w32_unlink(p)
unlink             60 wince/io.h     #define unlink	   _unlink


unsetenv

unsetenv         1695 hash.c         #undef unsetenv
unsetenv           51 util.h         #undef unsetenv
unsetenv           53 util.h         #define unsetenv(name,val) ruby_unsetenv(name);


unsigned_time_t

unsigned_time_t  1205 time.c         typedef unsigned long unsigned_time_t;
unsigned_time_t  1207 time.c         typedef unsigned int unsigned_time_t;
unsigned_time_t  1209 time.c         typedef unsigned LONG_LONG unsigned_time_t;


update_i

update_i          441 ext/dbm/dbm.c  update_i(pair, dbm)
update_i          543 ext/gdbm/gdbm.c update_i(pair, dbm)
update_i          419 ext/sdbm/init.c update_i(pair, dbm)


usage

usage            4862 ext/nkf/nkf-utf8/nkf.c usage()
usage              71 ruby.c         usage(const char *name)


utime

utime              96 win32/win32.h  #undef utime
utime             106 win32/win32.h  #define utime(_p, _t)		rb_w32_utime(_p, _t)
utime              17 wince/sys/utime.c int utime(const char *f, struct utimbuf *t)


utime_internal

utime_internal   1942 file.c         utime_internal(const char *path, void *arg)
utime_internal   1984 file.c         utime_internal(const char *path, void *arg)


va_arg

va_arg             19 wince/varargs.h #define va_arg(list, mode) ((mode *)(list =\
va_arg             26 wince/varargs.h #define va_arg(ap,t) ( *(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) )


va_dcl

va_dcl             16 wince/varargs.h #define va_dcl int __va_alist, __va_alist2, __va_alist3, __va_alist4;
va_dcl             24 wince/varargs.h #define va_dcl va_list va_alist;


va_end

va_end             18 wince/varargs.h #define va_end(list)
va_end             27 wince/varargs.h #define va_end(ap) ap = (va_list)0


va_init_list

va_init_list       16 ext/tk/tcltklib.c #define va_init_list(a,b) va_start(a,b)
va_init_list       19 ext/tk/tcltklib.c #define va_init_list(a,b) va_start(a)
va_init_list       28 ext/win32ole/win32ole.c #define va_init_list(a,b) va_start(a,b)
va_init_list       31 ext/win32ole/win32ole.c #define va_init_list(a,b) va_start(a)


va_start

va_start           17 wince/varargs.h #define va_start(list) list = (char *) &__va_alist
va_start           25 wince/varargs.h #define va_start(ap) ap = (va_list)&va_alist


vsnprintf

vsnprintf        1087 missing/vsnprintf.c vsnprintf(str, n, fmt, ap)
vsnprintf         120 regint.h       #define vsnprintf   _vsnprintf
vsnprintf         840 sprintf.c      #undef vsnprintf
vsnprintf         198 win32/win32.h  #define vsnprintf(s,n,f,l) rb_w32_vsnprintf(s,n,f,l)


vtohd

vtohd             216 pack.c         #define vtohd(x) (endian()?swapd(x):(x))
vtohd             242 pack.c         #define vtohd(x) swapd(x)
vtohd             271 pack.c         #define vtohd(x) (x)


vtohf

vtohf             215 pack.c         #define vtohf(x) (endian()?swapf(x):(x))
vtohf             241 pack.c         #define vtohf(x) swapf(x)
vtohf             270 pack.c         #define vtohf(x) (x)


vtohl

vtohl             214 pack.c         #define vtohl(x) (endian()?swapl(x):(x))
vtohl             240 pack.c         #define vtohl(x) swapl(x)
vtohl             269 pack.c         #define vtohl(x) (x)


vtohs

vtohs             213 pack.c         #define vtohs(x) (endian()?swaps(x):(x))
vtohs             239 pack.c         #define vtohs(x) swaps(x)
vtohs             268 pack.c         #define vtohs(x) (x)


wait_readable

wait_readable      78 ext/io/wait/wait.c wait_readable(p)
wait_readable     458 io.c           wait_readable(p)


warn_print

warn_print         90 error.c        warn_print(const char *fmt, va_list args)
warn_print       1095 eval.c         #define warn_print(x) rb_write_error(x)


write

write             120 win32/win32.h  #define write(h, b, l)		_write(h, b, l)
write              64 wince/io.h     #define write	   _write


xalloca

xalloca           118 regint.h       #define xalloca     _alloca
xalloca           123 regint.h       #define xalloca     alloca


xcalloc

xcalloc            46 defines.h      #define xcalloc ruby_xcalloc
xcalloc            89 regint.h       #define xcalloc     calloc


xfree

xfree              49 defines.h      #define xfree ruby_xfree
xfree              57 missing/alloca.c #define xfree ruby_xfree
xfree              90 regint.h       #define xfree       free


xmalloc

xmalloc            44 defines.h      #define xmalloc ruby_xmalloc
xmalloc            56 missing/alloca.c #define xmalloc ruby_xmalloc
xmalloc            87 regint.h       #define xmalloc     malloc


xrealloc

xrealloc           47 defines.h      #define xrealloc ruby_xrealloc
xrealloc           88 regint.h       #define xrealloc    realloc


yamlbyte_char_t

yamlbyte_char_t    19 ext/syck/yamlbyte.h   typedef yamlbyte_utf8_t yamlbyte_char_t;
yamlbyte_char_t    22 ext/syck/yamlbyte.h     typedef yamlbyte_utf16_t yamlbyte_char_t;


yydebug

yydebug            55 ext/syck/gram.c #define yydebug syckdebug
yydebug           240 parse.y        #define yydebug ruby_yydebug
yydebug           380 parse.y        #define yydebug ripper_yydebug


yyerror

yyerror            52 ext/syck/gram.c #define yyerror syckerror
yyerror           195 parse.y        #define yyerror(msg) parser_yyerror(parser, msg)


yylex

yylex              51 ext/syck/gram.c #define yylex   sycklex
yylex            4405 parse.y        # undef yylex
yylex            6851 parse.y        yylex(void *lval, void *p)


yylval

yylval             53 ext/syck/gram.c #define yylval  sycklval
yylval           4406 parse.y        # undef yylval
yylval           4407 parse.y        # define yylval  (*((YYSTYPE*)(parser->parser_yylval)))


yylval_id

yylval_id        4441 parse.y        # define yylval_id() yylval.id
yylval_id        4448 parse.y        # define yylval_id() SYM2ID(yylval.val)


yyparse

yyparse            50 ext/syck/gram.c #define yyparse syckparse
yyparse           929 ext/syck/gram.c int yyparse (void *YYPARSE_PARAM)
yyparse           239 parse.y        #define yyparse ruby_yyparse
yyparse           379 parse.y        #define yyparse ripper_yyparse
yyparse           616 parse.y        %%


yysigned_char

yysigned_char     249 ext/syck/gram.c    typedef signed char yysigned_char;
yysigned_char     251 ext/syck/gram.c    typedef short int yysigned_char;


yystpcpy

yystpcpy          810 ext/syck/gram.c #   define yystpcpy stpcpy
yystpcpy          816 ext/syck/gram.c yystpcpy (char *yydest, const char *yysrc)


yystrlen

yystrlen          787 ext/syck/gram.c #   define yystrlen strlen
yystrlen          792 ext/syck/gram.c yystrlen (const char *yystr)


yystype

yystype           140 ext/syck/gram.c # define yystype YYSTYPE /* obsolescent; will be withdrawn */
yystype            71 ext/syck/gram.h # define yystype YYSTYPE /* obsolescent; will be withdrawn */


ext/

root/ext/

[..]
  1. Win32API/
  2. bigdecimal/
  3. curses/
  4. dbm/
  5. digest/
  6. dl/
  7. etc/
  8. fcntl/
  9. gdbm/
  10. iconv/
  11. io/
  12. nkf/
  13. openssl/
  14. pty/
  15. racc/
  16. readline/
  17. ripper/
  18. sdbm/
  19. socket/
  20. stringio/
  21. strscan/
  22. syck/
  23. syslog/
  24. tk/
  25. win32ole/
  26. zlib/
[..]


ext/Win32API/

root/ext/Win32API/

[..]
  1. Win32API.c
[..]


ext/bigdecimal/

root/ext/bigdecimal/

[..]
  1. bigdecimal.c
  2. bigdecimal.h
[..]


ext/curses/

root/ext/curses/

[..]
  1. curses.c
[..]


ext/dbm/

root/ext/dbm/

[..]
  1. dbm.c
[..]


ext/digest/

root/ext/digest/

[..]
  1. defs.h
  2. digest.c
  3. digest.h
  4. md5/
  5. rmd160/
  6. sha1/
  7. sha2/
[..]


ext/digest/md5/

root/ext/digest/md5/

[..]
  1. md5.c
  2. md5.h
  3. md5init.c
  4. md5ossl.c
  5. md5ossl.h
[..]


ext/digest/rmd160/

root/ext/digest/rmd160/

[..]
  1. rmd160.c
  2. rmd160.h
  3. rmd160hl.c
  4. rmd160init.c
  5. rmd160ossl.c
  6. rmd160ossl.h
[..]


ext/digest/sha1/

root/ext/digest/sha1/

[..]
  1. sha1.c
  2. sha1.h
  3. sha1hl.c
  4. sha1init.c
  5. sha1ossl.c
  6. sha1ossl.h
[..]


ext/digest/sha2/

root/ext/digest/sha2/

[..]
  1. sha2.c
  2. sha2.h
  3. sha2hl.c
  4. sha2init.c
[..]


ext/dl/

root/ext/dl/

[..]
  1. cfunc.c
  2. cptr.c
  3. dl.c
  4. dl.h
  5. handle.c
[..]


ext/etc/

root/ext/etc/

[..]
  1. etc.c
[..]


ext/fcntl/

root/ext/fcntl/

[..]
  1. fcntl.c
[..]


ext/gdbm/

root/ext/gdbm/

[..]
  1. gdbm.c
[..]


ext/iconv/

root/ext/iconv/

[..]
  1. iconv.c
[..]


ext/io/

root/ext/io/

[..]
  1. wait/
[..]


ext/io/wait/

root/ext/io/wait/

[..]
  1. wait.c
[..]


ext/nkf/

root/ext/nkf/

[..]
  1. nkf-utf8/
  2. nkf.c
[..]


ext/nkf/nkf-utf8/

root/ext/nkf/nkf-utf8/

[..]
  1. config.h
  2. nkf.c
  3. utf8tbl.c
[..]


ext/openssl/

root/ext/openssl/

[..]
  1. openssl_missing.c
  2. openssl_missing.h
  3. ossl.c
  4. ossl.h
  5. ossl_asn1.c
  6. ossl_asn1.h
  7. ossl_bio.c
  8. ossl_bio.h
  9. ossl_bn.c
  10. ossl_bn.h
  11. ossl_cipher.c
  12. ossl_cipher.h
  13. ossl_config.c
  14. ossl_config.h
  15. ossl_digest.c
  16. ossl_digest.h
  17. ossl_engine.c
  18. ossl_engine.h
  19. ossl_hmac.c
  20. ossl_hmac.h
  21. ossl_ns_spki.c
  22. ossl_ns_spki.h
  23. ossl_ocsp.c
  24. ossl_ocsp.h
  25. ossl_pkcs12.c
  26. ossl_pkcs12.h
  27. ossl_pkcs7.c
  28. ossl_pkcs7.h
  29. ossl_pkey.c
  30. ossl_pkey.h
  31. ossl_pkey_dh.c
  32. ossl_pkey_dsa.c
  33. ossl_pkey_rsa.c
  34. ossl_rand.c
  35. ossl_rand.h
  36. ossl_ssl.c
  37. ossl_ssl.h
  38. ossl_version.h
  39. ossl_x509.c
  40. ossl_x509.h
  41. ossl_x509attr.c
  42. ossl_x509cert.c
  43. ossl_x509crl.c
  44. ossl_x509ext.c
  45. ossl_x509name.c
  46. ossl_x509req.c
  47. ossl_x509revoked.c
  48. ossl_x509store.c
  49. ruby_missing.h
[..]


ext/pty/

root/ext/pty/

[..]
  1. pty.c
[..]


ext/racc/

root/ext/racc/

[..]
  1. cparse/
[..]


ext/racc/cparse/

root/ext/racc/cparse/

[..]
  1. cparse.c
[..]


ext/readline/

root/ext/readline/

[..]
  1. readline.c
[..]


ext/ripper/

root/ext/ripper/

[..]
  1. eventids2.c
[..]


ext/sdbm/

root/ext/sdbm/

[..]
  1. _sdbm.c
  2. init.c
  3. sdbm.h
[..]


ext/socket/

root/ext/socket/

[..]
  1. addrinfo.h
  2. getaddrinfo.c
  3. getnameinfo.c
  4. socket.c
  5. sockport.h
[..]


ext/stringio/

root/ext/stringio/

[..]
  1. stringio.c
[..]


ext/strscan/

root/ext/strscan/

[..]
  1. strscan.c
[..]


ext/syck/

root/ext/syck/

[..]
  1. bytecode.c
  2. emitter.c
  3. gram.c
  4. gram.h
  5. handler.c
  6. implicit.c
  7. node.c
  8. rubyext.c
  9. syck.c
  10. syck.h
  11. token.c
  12. yaml2byte.c
  13. yamlbyte.h
[..]


ext/syslog/

root/ext/syslog/

[..]
  1. syslog.c
[..]


ext/tk/

root/ext/tk/

[..]
  1. stubs.c
  2. stubs.h
  3. tcltklib.c
  4. tkutil/
[..]


ext/tk/tkutil/

root/ext/tk/tkutil/

[..]
  1. tkutil.c
[..]


ext/win32ole/

root/ext/win32ole/

[..]
  1. win32ole.c
[..]


ext/zlib/

root/ext/zlib/

[..]
  1. zlib.c
[..]


missing/

root/missing/

[..]
  1. acosh.c
  2. alloca.c
  3. crypt.c
  4. dup2.c
  5. erf.c
  6. file.h
  7. fileblocks.c
  8. finite.c
  9. flock.c
  10. hypot.c
  11. isinf.c
  12. isnan.c
  13. memcmp.c
  14. memmove.c
  15. os2.c
  16. strcasecmp.c
  17. strchr.c
  18. strerror.c
  19. strftime.c
  20. strncasecmp.c
  21. strstr.c
  22. strtod.c
  23. strtol.c
  24. strtoul.c
  25. vsnprintf.c
  26. x68.c
[..]


vms/

root/vms/

[..]
  1. config.h
  2. vms.h
  3. vmsruby_private.c
  4. vmsruby_private.h
[..]


win32/

root/win32/

[..]
  1. dir.h
  2. win32.c
  3. win32.h
  4. winmain.c
[..]


wince/

root/wince/

[..]
  1. assert.c
  2. assert.h
  3. direct.c
  4. direct.h
  5. errno.c
  6. errno.h
  7. fcntl.h
  8. io.h
  9. io_wce.c
  10. process.h
  11. process_wce.c
  12. signal.h
  13. signal_wce.c
  14. stddef.h
  15. stdio.c
  16. stdlib.c
  17. string_wce.c
  18. sys/
  19. time.h
  20. time_wce.c
  21. varargs.h
  22. wince.c
  23. wince.h
  24. wincemain.c
  25. wincon.h
  26. winsock2.c
[..]


wince/sys/

root/wince/sys/

[..]
  1. stat.c
  2. stat.h
  3. timeb.c
  4. timeb.h
  5. types.h
  6. utime.c
  7. utime.h
[..]


x68/

root/x68/

[..]
  1. _dtos18.c
  2. _round.c
  3. fconvert.c
  4. select.c
[..]


config.h

ext/nkf/nkf-utf8/config.h
vms/config.h


dln.h

dln.h   14 dln.c          #include "dln.h"
dln.h   39 eval.c         #include "dln.h"
dln.h   23 file.c         #include "dln.h"
dln.h   23 ruby.c         #include "dln.h"
dln.h   15 win32/win32.c  #include "dln.h"


env.h

env.h   14 error.c        #include "env.h"
env.h   17 eval.c         #include "env.h"
env.h   19 gc.c           #include "env.h"
env.h   14 numeric.c      #include "env.h"
env.h   20 parse.y        #include "env.h"
env.h   16 variable.c     #include "env.h"


defs.h

defs.h   49 ext/digest/md5/md5.h #include "defs.h"
defs.h   29 ext/digest/rmd160/rmd160.h #include "defs.h"
defs.h    4 ext/digest/rmd160/rmd160ossl.c #include "defs.h"
defs.h   14 ext/digest/sha1/sha1.h #include "defs.h"
defs.h    4 ext/digest/sha1/sha1ossl.c #include "defs.h"
defs.h   46 ext/digest/sha2/sha2.h #include "defs.h"


digest.h

digest.h   34 ext/digest/digest.c #include "digest.h"
digest.h    4 ext/digest/md5/md5init.c #include "digest.h"
digest.h    4 ext/digest/rmd160/rmd160init.c #include "digest.h"
digest.h    4 ext/digest/sha1/sha1init.c #include "digest.h"
digest.h    4 ext/digest/sha2/sha2init.c #include "digest.h"


md5.h

md5.h   48 ext/digest/md5/md5.c #include "md5.h"
md5.h    8 ext/digest/md5/md5init.c #include "md5.h"
md5.h    7 ext/digest/md5/md5ossl.h #include <openssl/md5.h>


md5ossl.h

md5ossl.h    6 ext/digest/md5/md5init.c #include "md5ossl.h"
md5ossl.h    3 ext/digest/md5/md5ossl.c #include "md5ossl.h"


rmd160.h

rmd160.h   23 ext/digest/rmd160/rmd160.c #include "rmd160.h"
rmd160.h   16 ext/digest/rmd160/rmd160hl.c #include "rmd160.h"
rmd160.h    8 ext/digest/rmd160/rmd160init.c #include "rmd160.h"


rmd160ossl.h

rmd160ossl.h    6 ext/digest/rmd160/rmd160init.c #include "rmd160ossl.h"
rmd160ossl.h    3 ext/digest/rmd160/rmd160ossl.c #include "rmd160ossl.h"


sha1.h

sha1.h   20 ext/digest/sha1/sha1.c #include "sha1.h"
sha1.h   16 ext/digest/sha1/sha1hl.c #include "sha1.h"
sha1.h    8 ext/digest/sha1/sha1init.c #include "sha1.h"


sha1ossl.h

sha1ossl.h    6 ext/digest/sha1/sha1init.c #include "sha1ossl.h"
sha1ossl.h    3 ext/digest/sha1/sha1ossl.c #include "sha1ossl.h"


sha2.h

sha2.h   39 ext/digest/sha2/sha2.c #include "sha2.h"
sha2.h   45 ext/digest/sha2/sha2hl.c #include "sha2.h"
sha2.h    5 ext/digest/sha2/sha2init.c #include "sha2.h"


dl.h

dl.h 1124 dln.c          #include "dl.h"
dl.h    7 ext/dl/cfunc.c #include "dl.h"
dl.h    9 ext/dl/cptr.c  #include "dl.h"
dl.h    5 ext/dl/dl.c    #include "dl.h"
dl.h    6 ext/dl/handle.c #include "dl.h"


config.h

config.h   45 ext/nkf/nkf-utf8/nkf.c #include "config.h"
config.h    1 ext/nkf/nkf-utf8/utf8tbl.c #include "config.h"
config.h   77 ext/nkf/nkf.c  #include "nkf-utf8/config.h"
config.h    1 ext/pty/pty.c  #include	"config.h"
config.h   15 ext/sdbm/_sdbm.c #include "config.h"
config.h   41 ext/socket/getaddrinfo.c #include "config.h"
config.h   37 ext/socket/getnameinfo.c #include "config.h"
config.h   32 missing/alloca.c #include "config.h"
config.h   14 missing/dup2.c #include "config.h"
config.h    1 missing/flock.c #include "config.h"
config.h   21 missing/isinf.c #include "config.h"
config.h   48 missing/strftime.c #include "config.h"
config.h   20 missing/strtod.c #include "config.h"
config.h    3 missing/x68.c  #include "config.h"
config.h   33 regenc.h       #include "config.h"
config.h   77 regint.h       #include "config.h"
config.h   24 ruby.h         #include "config.h"
config.h    5 st.c           #include "config.h"


ossl.h

ossl.h   11 ext/openssl/ossl.c #include "ossl.h"
ossl.h   11 ext/openssl/ossl_asn1.c #include "ossl.h"
ossl.h   11 ext/openssl/ossl_bio.c #include "ossl.h"
ossl.h   12 ext/openssl/ossl_bn.c #include "ossl.h"
ossl.h   11 ext/openssl/ossl_cipher.c #include "ossl.h"
ossl.h   11 ext/openssl/ossl_config.c #include "ossl.h"
ossl.h   11 ext/openssl/ossl_digest.c #include "ossl.h"
ossl.h   11 ext/openssl/ossl_engine.c #include "ossl.h"
ossl.h   13 ext/openssl/ossl_hmac.c #include "ossl.h"
ossl.h   11 ext/openssl/ossl_ns_spki.c #include "ossl.h"
ossl.h   12 ext/openssl/ossl_ocsp.c #include "ossl.h"
ossl.h    6 ext/openssl/ossl_pkcs12.c #include "ossl.h"
ossl.h   11 ext/openssl/ossl_pkcs7.c #include "ossl.h"
ossl.h   11 ext/openssl/ossl_pkey.c #include "ossl.h"
ossl.h   13 ext/openssl/ossl_pkey_dh.c #include "ossl.h"
ossl.h   13 ext/openssl/ossl_pkey_dsa.c #include "ossl.h"
ossl.h   13 ext/openssl/ossl_pkey_rsa.c #include "ossl.h"
ossl.h   11 ext/openssl/ossl_rand.c #include "ossl.h"
ossl.h   12 ext/openssl/ossl_ssl.c #include "ossl.h"
ossl.h   11 ext/openssl/ossl_x509.c #include "ossl.h"
ossl.h   11 ext/openssl/ossl_x509attr.c #include "ossl.h"
ossl.h   11 ext/openssl/ossl_x509cert.c #include "ossl.h"
ossl.h   11 ext/openssl/ossl_x509crl.c #include "ossl.h"
ossl.h   11 ext/openssl/ossl_x509ext.c #include "ossl.h"
ossl.h   11 ext/openssl/ossl_x509name.c #include "ossl.h"
ossl.h   11 ext/openssl/ossl_x509req.c #include "ossl.h"
ossl.h   11 ext/openssl/ossl_x509revoked.c #include "ossl.h"
ossl.h   11 ext/openssl/ossl_x509store.c #include "ossl.h"


sdbm.h

sdbm.h   14 ext/sdbm/_sdbm.c #include "sdbm.h"
sdbm.h   15 ext/sdbm/init.c #include "sdbm.h"


addrinfo.h

addrinfo.h   79 ext/socket/getaddrinfo.c #include "addrinfo.h"
addrinfo.h   73 ext/socket/getnameinfo.c #include "addrinfo.h"
addrinfo.h   69 ext/socket/socket.c # include "addrinfo.h"


sockport.h

sockport.h   80 ext/socket/getaddrinfo.c #include "sockport.h"
sockport.h   74 ext/socket/getnameinfo.c #include "sockport.h"
sockport.h   71 ext/socket/socket.c #include "sockport.h"


gram.h

gram.h   13 ext/syck/bytecode.c #include "gram.h"
gram.h   13 ext/syck/token.c #include "gram.h"


syck.h

syck.h   12 ext/syck/bytecode.c #include "syck.h"
syck.h   17 ext/syck/emitter.c #include "syck.h"
syck.h   99 ext/syck/gram.c #include "syck.h"
syck.h   11 ext/syck/handler.c #include "syck.h"
syck.h   13 ext/syck/implicit.c #include "syck.h"
syck.h   11 ext/syck/node.c #include "syck.h"
syck.h   12 ext/syck/rubyext.c #include "syck.h"
syck.h   14 ext/syck/syck.c #include "syck.h"
syck.h   12 ext/syck/token.c #include "syck.h"
syck.h   13 ext/syck/yaml2byte.c #include <syck.h>


stubs.h

stubs.h    1 ext/tk/stubs.c #include "stubs.h"
stubs.h   25 ext/tk/tcltklib.c #include "stubs.h"


intern.h

intern.h   22 ext/iconv/iconv.c #include "intern.h"
intern.h   21 parse.y        #include "intern.h"
intern.h  707 ruby.h         #include "intern.h"


file.h

file.h   52 dln.c          #include "missing/file.h"
file.h    5 ext/pty/pty.c  #include	<sys/file.h>
file.h   80 ext/sdbm/_sdbm.c #include <sys/file.h>
file.h   16 file.c         #include "missing/file.h"
file.h   30 file.c         # include <sys/file.h>
file.h   20 util.c         #include "missing/file.h"


node.h

node.h   18 array.c        #include "node.h"
node.h   15 class.c        #include "node.h"
node.h   14 enum.c         #include "node.h"
node.h   16 eval.c         #include "node.h"
node.h   18 gc.c           #include "node.h"
node.h   22 parse.y        #include "node.h"
node.h   24 ruby.c         #include "node.h"
node.h   17 variable.c     #include "node.h"


oniguruma.h

oniguruma.h   35 regenc.h       #include "oniguruma.h"
oniguruma.h   15 regex.h        #include "oniguruma.h"
oniguruma.h  215 regint.h       #include "oniguruma.h"


re.h

re.h   12 ext/strscan/strscan.c #include "re.h"
re.h   20 gc.c           #include "re.h"
re.h   13 re.c           #include "re.h"
re.h   16 string.c       #include "re.h"


regenc.h

regenc.h   30 ascii.c        #include "regenc.h"
regenc.h   30 euc_jp.c       #include "regenc.h"
regenc.h  214 regint.h       #include "regenc.h"
regenc.h   30 sjis.c         #include "regenc.h"
regenc.h   30 utf8.c         #include "regenc.h"


regex.h

regex.h 4481 parse.y        #include "regex.h"
regex.h   19 re.h           #include "regex.h"


regint.h

regint.h   14 re.c           #include "regint.h"
regint.h   30 regenc.c       #include "regint.h"
regint.h   30 regerror.c     #include "regint.h"
regint.h   30 regexec.c      #include "regint.h"
regint.h   32 regparse.h     #include "regint.h"
regint.h   13 st.c           #include "regint.h"


regparse.h

regparse.h   30 regcomp.c      #include "regparse.h"
regparse.h   30 regparse.c     #include "regparse.h"


ruby.h

ruby.h   15 array.c        #include "ruby.h"
ruby.h   13 bignum.c       #include "ruby.h"
ruby.h   13 class.c        #include "ruby.h"
ruby.h   13 compar.c       #include "ruby.h"
ruby.h   15 dir.c          #include "ruby.h"
ruby.h   13 dln.c          #include "ruby.h"
ruby.h   13 enum.c         #include "ruby.h"
ruby.h   15 enumerator.c   #include "ruby.h"
ruby.h   13 error.c        #include "ruby.h"
ruby.h   15 eval.c         #include "ruby.h"
ruby.h   16 ext/Win32API/Win32API.c #include "ruby.h"
ruby.h   23 ext/bigdecimal/bigdecimal.c #include "ruby.h"
ruby.h   16 ext/curses/curses.c #include "ruby.h"
ruby.h   13 ext/dbm/dbm.c  #include "ruby.h"
ruby.h    8 ext/digest/defs.h #include "ruby.h"
ruby.h   16 ext/digest/digest.h #include "ruby.h"
ruby.h    5 ext/dl/cfunc.c #include <ruby.h>
ruby.h    5 ext/dl/cptr.c  #include <ruby.h>
ruby.h    1 ext/dl/dl.c    #include <ruby.h>
ruby.h    4 ext/dl/dl.h    #include <ruby.h>
ruby.h    5 ext/dl/handle.c #include <ruby.h>
ruby.h   11 ext/etc/etc.c  #include "ruby.h"
ruby.h   34 ext/fcntl/fcntl.c #include "ruby.h"
ruby.h   11 ext/gdbm/gdbm.c #include "ruby.h"
ruby.h   17 ext/iconv/iconv.c #include "ruby.h"
ruby.h   14 ext/io/wait/wait.c #include "ruby.h"
ruby.h   13 ext/nkf/nkf.c  #include "ruby.h"
ruby.h   67 ext/openssl/ossl.h #include <ruby.h>
ruby.h   25 ext/pty/pty.c  #include "ruby.h"
ruby.h   14 ext/racc/cparse/cparse.c #include "ruby.h"
ruby.h   18 ext/readline/readline.c #include "ruby.h"
ruby.h   13 ext/sdbm/init.c #include "ruby.h"
ruby.h   13 ext/socket/socket.c #include "ruby.h"
ruby.h   15 ext/stringio/stringio.c #include "ruby.h"
ruby.h   11 ext/strscan/strscan.c #include "ruby.h"
ruby.h   11 ext/syck/bytecode.c #include "ruby.h"
ruby.h   12 ext/syck/emitter.c #include "ruby.h"
ruby.h   10 ext/syck/handler.c #include "ruby.h"
ruby.h   12 ext/syck/implicit.c #include "ruby.h"
ruby.h   10 ext/syck/node.c #include "ruby.h"
ruby.h   11 ext/syck/rubyext.c #include "ruby.h"
ruby.h    9 ext/syck/syck.c #include "ruby.h"
ruby.h   11 ext/syck/token.c #include "ruby.h"
ruby.h   12 ext/syck/yaml2byte.c #include "ruby.h"
ruby.h   10 ext/syslog/syslog.c #include "ruby.h"
ruby.h    2 ext/tk/stubs.c #include "ruby.h"
ruby.h    9 ext/tk/tcltklib.c #include "ruby.h"
ruby.h   13 ext/tk/tkutil/tkutil.c #include "ruby.h"
ruby.h   19 ext/win32ole/win32ole.c #include "ruby.h"
ruby.h    9 ext/zlib/zlib.c #include <ruby.h>
ruby.h   19 file.c         #include "ruby.h"
ruby.h   15 gc.c           #include "ruby.h"
ruby.h   15 hash.c         #include "ruby.h"
ruby.h   13 inits.c        #include "ruby.h"
ruby.h   15 io.c           #include "ruby.h"
ruby.h   14 main.c         #include "ruby.h"
ruby.h   13 marshal.c      #include "ruby.h"
ruby.h   13 math.c         #include "ruby.h"
ruby.h    3 missing/os2.c  #include "ruby.h"
ruby.h   13 numeric.c      #include "ruby.h"
ruby.h   15 object.c       #include "ruby.h"
ruby.h   13 pack.c         #include "ruby.h"
ruby.h   19 parse.y        #include "ruby.h"
ruby.h   13 prec.c         #include "ruby.h"
ruby.h   15 process.c      #include "ruby.h"
ruby.h  179 random.c       #include "ruby.h"
ruby.h   13 range.c        #include "ruby.h"
ruby.h   12 re.c           #include "ruby.h"
ruby.h   92 regint.h       #include "ruby.h"
ruby.h   22 ruby.c         #include "ruby.h"
ruby.h   15 signal.c       #include "ruby.h"
ruby.h   15 sprintf.c      #include "ruby.h"
ruby.h   15 string.c       #include "ruby.h"
ruby.h   13 struct.c       #include "ruby.h"
ruby.h   13 time.c         #include "ruby.h"
ruby.h   13 util.c         #include "ruby.h"
ruby.h   15 variable.c     #include "ruby.h"
ruby.h   13 version.c      #include "ruby.h"
ruby.h   13 win32/win32.c  #include "ruby.h"


rubyio.h

rubyio.h   17 ext/curses/curses.c #include "rubyio.h"
rubyio.h    6 ext/dl/cptr.c  #include <rubyio.h>
rubyio.h    2 ext/dl/dl.c    #include <rubyio.h>
rubyio.h   15 ext/io/wait/wait.c #include "rubyio.h"
rubyio.h   68 ext/openssl/ossl.h #include <rubyio.h>
rubyio.h   14 ext/openssl/ossl_ssl.c #include <rubyio.h>
rubyio.h   26 ext/pty/pty.c  #include "rubyio.h"
rubyio.h   19 ext/readline/readline.c #include "rubyio.h"
rubyio.h   14 ext/socket/socket.c #include "rubyio.h"
rubyio.h   16 ext/stringio/stringio.c #include "rubyio.h"
rubyio.h   20 file.c         #include "rubyio.h"
rubyio.h   16 io.c           #include "rubyio.h"
rubyio.h   14 marshal.c      #include "rubyio.h"


rubysig.h

rubysig.h   14 class.c        #include "rubysig.h"
rubysig.h   19 eval.c         #include "rubysig.h"
rubysig.h   13 ext/openssl/ossl_ssl.c #include <rubysig.h>
rubysig.h   12 ext/openssl/ossl_x509store.c #include <rubysig.h>
rubysig.h   20 ext/readline/readline.c #include "rubysig.h"
rubysig.h   15 ext/socket/socket.c #include "rubysig.h"
rubysig.h   10 ext/tk/tcltklib.c #include "rubysig.h"
rubysig.h   14 ext/tk/tkutil/tkutil.c #include "rubysig.h"
rubysig.h   21 file.c         #include "rubysig.h"
rubysig.h   16 gc.c           #include "rubysig.h"
rubysig.h   18 hash.c         #include "rubysig.h"
rubysig.h   17 io.c           #include "rubysig.h"
rubysig.h   16 process.c      #include "rubysig.h"
rubysig.h   94 regint.h       #include "rubysig.h"      /* for DEFER_INTS, ENABLE_INTS */
rubysig.h   16 signal.c       #include "rubysig.h"
rubysig.h   14 win32/win32.c  #include "rubysig.h"


st.h

st.h   17 array.c        #include "st.h"
st.h   16 class.c        #include "st.h"
st.h  183 dln.c          #include "st.h"
st.h   15 error.c        #include "st.h"
st.h   38 eval.c         #include "st.h"
st.h   21 ext/iconv/iconv.c #include "st.h"
st.h   21 ext/syck/syck.h #include "st.h"
st.h   15 ext/tk/tkutil/tkutil.c #include "st.h"
st.h   20 ext/win32ole/win32ole.c #include "st.h"
st.h   17 gc.c           #include "st.h"
st.h   16 hash.c         #include "st.h"
st.h   15 marshal.c      #include "st.h"
st.h   16 object.c       #include "st.h"
st.h   23 parse.y        #include "st.h"
st.h   51 process.c      #include "st.h"
st.h  306 regparse.c     #include "st.h"
st.h   16 st.c           #include "st.h"
st.h   18 variable.c     #include "st.h"


util.h

util.h   16 array.c        #include "util.h"
util.h   64 dir.c          #include "util.h"
util.h  182 dln.c          #include "util.h"
util.h   15 enum.c         #include "util.h"
util.h   18 eval.c         #include "util.h"
util.h   27 ext/pty/pty.c  #include "util.h"
util.h   16 ext/socket/socket.c #include "util.h"
util.h   11 ext/syslog/syslog.c #include "util.h"
util.h   63 ext/tk/stubs.c # include "util.h"
util.h   22 file.c         #include "util.h"
util.h   17 hash.c         #include "util.h"
util.h   90 io.c           #include "util.h"
util.h   16 marshal.c      #include "util.h"
util.h   17 object.c       #include "util.h"
util.h 4482 parse.y        #include "util.h"
util.h   43 ruby.c         #include "util.h"
util.h   23 util.c         #include "util.h"
util.h   19 variable.c     #include "util.h"


version.h

version.h   25 ext/bigdecimal/bigdecimal.c #include "version.h"
version.h    8 ext/dl/cptr.c  #include <version.h> /* for ruby version code */
version.h    3 ext/dl/dl.c    #include <version.h>
version.h   11 ext/tk/tcltklib.c #include "version.h"
version.h  290 math.c         # include <cygwin/version.h>
version.h   93 regint.h       #include "version.h"
version.h   14 version.c      #include "version.h"


vmsruby_private.h

vmsruby_private.h   81 eval.c         #include "vmsruby_private.h"
vmsruby_private.h    1 vms/vmsruby_private.c #include "vmsruby_private.h"


dir.h

dir.h   42 dir.c          #  include <sys/dir.h>
dir.h   48 dir.c          #  include "win32/dir.h"
dir.h   33 win32/win32.c  #include "win32/dir.h"


win32.h

win32.h  187 defines.h      #include "win32/win32.h"
win32.h   32 win32/win32.c  #include "win32.h"


assert.h

assert.h   41 ext/digest/rmd160/rmd160.c #include <assert.h>
assert.h   24 ext/digest/rmd160/rmd160hl.c #include <assert.h>
assert.h    5 ext/digest/rmd160/rmd160ossl.c #include <assert.h>
assert.h   30 ext/digest/sha1/sha1.c #include <assert.h>
assert.h   19 ext/digest/sha1/sha1hl.c #include <assert.h>
assert.h    5 ext/digest/sha1/sha1ossl.c #include <assert.h>
assert.h   42 ext/digest/sha2/sha2.c #include <assert.h>	/* assert() */
assert.h   53 ext/digest/sha2/sha2hl.c #include <assert.h>
assert.h   20 ext/iconv/iconv.c #include <assert.h>
assert.h   26 ext/openssl/ossl.h #  include <assert.h>
assert.h   14 ext/syck/yaml2byte.c #include <assert.h>
assert.h   23 win32/win32.c  #include <assert.h>
assert.h    3 wince/assert.c #include "assert.h"


direct.h

direct.h   28 dir.c          # include <direct.h>
direct.h   52 win32/win32.h  #include <direct.h>
direct.h    7 wince/direct.c #include <direct.h>


errno.h

errno.h   52 dir.c          #include <errno.h>
errno.h  157 dln.c          #include <errno.h>
errno.h 1123 dln.c          #include <errno.h>
errno.h 1129 dln.c          #include <errno.h>	/* for global errno	*/
errno.h  239 error.c        #include <errno.h>
errno.h  179 eval.c         #include <errno.h>
errno.h   20 ext/bigdecimal/bigdecimal.c #include <errno.h>
errno.h   23 ext/dbm/dbm.c  #include <errno.h>
errno.h   25 ext/digest/rmd160/rmd160hl.c #include <errno.h>
errno.h   20 ext/digest/sha1/sha1hl.c #include <errno.h>
errno.h   54 ext/digest/sha2/sha2hl.c #include <errno.h>
errno.h    6 ext/dl/cfunc.c #include <errno.h>
errno.h   15 ext/gdbm/gdbm.c #include <errno.h>
errno.h   18 ext/iconv/iconv.c #include <errno.h>
errno.h   36 ext/openssl/ossl.h #include <errno.h>
errno.h    7 ext/pty/pty.c  #include	<errno.h>
errno.h    4 ext/readline/readline.c #include <errno.h>
errno.h   89 ext/sdbm/_sdbm.c #include <errno.h>
errno.h   17 ext/sdbm/init.c #include <errno.h>
errno.h   46 ext/socket/socket.c #include <errno.h>
errno.h   19 io.c           #include <errno.h>
errno.h   15 math.c         #include <errno.h>
errno.h   13 missing/acosh.c #include <errno.h>
errno.h   21 missing/dup2.c # include <errno.h>
errno.h   23 missing/flock.c #include <errno.h>
errno.h   53 missing/flock.c #include <errno.h>
errno.h    9 missing/os2.c  #include <errno.h>
errno.h   25 missing/strtod.c #include <errno.h>
errno.h   19 object.c       #include <errno.h>
errno.h   25 parse.y        #include <errno.h>
errno.h   18 process.c      #include <errno.h>
errno.h   17 rubyio.h       #include <errno.h>
errno.h   15 rubysig.h      #include <errno.h>
errno.h   17 util.c         #include <errno.h>
errno.h   22 win32/win32.c  #include <errno.h>
errno.h    5 wince/errno.c  #include <errno.h>
errno.h   16 wince/io_wce.c #include <errno.h>
errno.h   18 x68/select.c   #include <errno.h>


fcntl.h

fcntl.h   22 ext/dbm/dbm.c  #include <fcntl.h>
fcntl.h   26 ext/digest/rmd160/rmd160hl.c #include <fcntl.h>
fcntl.h   17 ext/digest/sha1/sha1hl.c #include <fcntl.h>
fcntl.h   55 ext/digest/sha2/sha2hl.c #include <fcntl.h>
fcntl.h   35 ext/fcntl/fcntl.c #include <fcntl.h>
fcntl.h   14 ext/gdbm/gdbm.c #include <fcntl.h>
fcntl.h  117 ext/nkf/nkf-utf8/nkf.c #include <fcntl.h>
fcntl.h    6 ext/pty/pty.c  #include	<fcntl.h>
fcntl.h   82 ext/sdbm/_sdbm.c #include <fcntl.h>
fcntl.h   16 ext/sdbm/init.c #include <fcntl.h>
fcntl.h   62 ext/socket/socket.c #include <fcntl.h>
fcntl.h   18 ext/stringio/stringio.c #include <fcntl.h>
fcntl.h   20 ext/stringio/stringio.c #include <sys/fcntl.h>
fcntl.h   51 io.c           #include <fcntl.h>
fcntl.h   53 io.c           #include <sys/fcntl.h>
fcntl.h   17 missing/dup2.c # include <fcntl.h>
fcntl.h    6 missing/file.h #include <fcntl.h>
fcntl.h   21 missing/flock.c #include <fcntl.h>
fcntl.h    6 missing/os2.c  #include <fcntl.h>
fcntl.h   27 process.c      #include <fcntl.h>
fcntl.h  188 random.c       #include <fcntl.h>
fcntl.h   62 util.c         #include <fcntl.h>
fcntl.h   16 win32/win32.c  #include <fcntl.h>
fcntl.h   14 wince/io_wce.c #include <fcntl.h>
fcntl.h   19 x68/select.c   #include <fcntl.h>


io.h

io.h  118 ext/nkf/nkf-utf8/nkf.c #include <io.h>
io.h   75 ext/sdbm/_sdbm.c #include <io.h>
io.h   67 ext/socket/getaddrinfo.c #include <io.h>
io.h   64 win32/win32.h  #include <io.h>
io.h   13 wince/io_wce.c #include <io.h>


process.h

process.h    7 missing/os2.c  #include <process.h>
process.h   30 process.c      #include <process.h>
process.h   17 win32/win32.c  #include <process.h>
process.h   53 win32/win32.h  #include <process.h>
process.h    6 wince/process_wce.c #include "process.h"


signal.h

signal.h  178 eval.c         #include <signal.h>
signal.h   29 ext/pty/pty.c  #include <signal.h>
signal.h   19 process.c      #include <signal.h>
signal.h   17 signal.c       #include <signal.h>
signal.h   56 win32/win32.h  #include <signal.h>
signal.h    6 wince/signal_wce.c #include "signal.h"


stddef.h

stddef.h    6 ext/digest/md5/md5ossl.h #include <stddef.h>
stddef.h    6 ext/digest/rmd160/rmd160ossl.h #include <stddef.h>
stddef.h    6 ext/digest/sha1/sha1ossl.h #include <stddef.h>
stddef.h   96 ext/sdbm/_sdbm.c #include <stddef.h>
stddef.h   72 ext/socket/getaddrinfo.c #include <stddef.h>
stddef.h   67 ext/socket/getnameinfo.c #include <stddef.h>
stddef.h  596 ext/syck/gram.c #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
stddef.h   10 ext/syck/yamlbyte.h #include <stddef.h>
stddef.h    3 missing/memcmp.c #include <stddef.h>
stddef.h    3 missing/memmove.c #include <stddef.h>
stddef.h    4 missing/strncasecmp.c #include <stddef.h>
stddef.h  113 missing/vsnprintf.c #include <stddef.h>
stddef.h   58 ruby.h         #include <stddef.h>


stat.h

stat.h   18 dir.c          #include <sys/stat.h>
stat.h   55 dln.c          #include <sys/stat.h>
stat.h  203 eval.c         #include <sys/stat.h>
stat.h  148 ext/nkf/nkf-utf8/nkf.c #include <sys/stat.h>
stat.h    4 ext/pty/pty.c  #include	<sys/stat.h>
stat.h   78 ext/sdbm/_sdbm.c #include <sys/stat.h>
stat.h   57 file.c         #include <sys/stat.h>
stat.h   60 io.c           #include <sys/stat.h>
stat.h  186 random.c       #include <sys/stat.h>
stat.h   57 util.c         #include <sys/stat.h>
stat.h   18 win32/win32.c  #include <sys/stat.h>
stat.h   57 win32/win32.h  #include <sys/stat.h>
stat.h   12 wince/sys/stat.c #include <sys/stat.h>


timeb.h

timeb.h 2885 win32/win32.c  #include <sys/timeb.h>
timeb.h    7 wince/sys/timeb.c #include <sys/timeb.h>


types.h

types.h   17 dir.c          #include <sys/types.h>
types.h   54 dln.c          #include <sys/types.h>
types.h  177 eval.c         #include <sys/types.h>
types.h    9 ext/digest/defs.h #include <sys/types.h>
types.h    4 ext/digest/md5/md5ossl.c #include <sys/types.h>
types.h   13 ext/etc/etc.c  #include <sys/types.h>
types.h   17 ext/io/wait/wait.c #include <sys/types.h>
types.h    3 ext/pty/pty.c  #include	<sys/types.h>
types.h   77 ext/sdbm/_sdbm.c #include <sys/types.h>
types.h   42 ext/socket/getaddrinfo.c #include <sys/types.h>
types.h   38 ext/socket/getnameinfo.c #include <sys/types.h>
types.h   18 ext/socket/socket.c #include <sys/types.h>
types.h   56 ext/socket/socket.c #include <sys/types.h>
types.h   13 ext/syck/rubyext.c #include <sys/types.h>
types.h   56 file.c         #include <sys/types.h>
types.h   23 gc.c           #include <sys/types.h>
types.h   21 io.c           #include <sys/types.h>
types.h   46 io.c           #include <sys/types.h>
types.h   25 missing.h      #  include <sys/types.h>
types.h   57 missing/strftime.c #include <sys/types.h>
types.h   63 missing/vsnprintf.c #include <sys/types.h>
types.h   14 pack.c         #include <sys/types.h>
types.h  185 random.c       #include <sys/types.h>
types.h   16 re.h           #include <sys/types.h>
types.h  206 regint.h       #include <sys/types.h>
types.h   26 ruby.c         #include <sys/types.h>
types.h   14 time.c         #include <sys/types.h>
types.h   56 util.c         #include <sys/types.h>
types.h    7 win32/dir.h    #    include <sys/types.h>
types.h   58 win32/win32.h  #include <sys/types.h>
types.h    4 wince/signal.h #include <sys/types.h>
types.h    4 wince/sys/stat.h #include <sys/types.h>
types.h    4 wince/sys/timeb.h #include <sys/types.h>
types.h    5 wince/time.h   #include <sys/types.h>
types.h   24 x68/select.c   #include <sys/types.h>


utime.h

utime.h  151 ext/nkf/nkf-utf8/nkf.c #include <utime.h>
utime.h  155 ext/nkf/nkf-utf8/nkf.c #include <utime.h>
utime.h  157 ext/nkf/nkf-utf8/nkf.c #include <sys/utime.h>
utime.h  161 ext/nkf/nkf-utf8/nkf.c #include <sys/utime.h>
utime.h  163 ext/nkf/nkf-utf8/nkf.c #include <utime.h>
utime.h   47 file.c         #include <utime.h>
utime.h   49 file.c         #include <sys/utime.h>
utime.h   60 win32/win32.h  # include <sys/utime.h>
utime.h   62 win32/win32.h  # include <utime.h>
utime.h    6 wince/sys/utime.c #include <sys/utime.h>


time.h

time.h   14 ext/openssl/ossl_asn1.c #  include <sys/time.h>
time.h   59 ext/socket/socket.c #include <sys/time.h>
time.h   14 ext/syck/rubyext.c #include <time.h>
time.h   11 ext/zlib/zlib.c #include <time.h>
time.h   42 file.c         #include <time.h>
time.h   26 gc.c           #include <sys/time.h>
time.h   16 missing.h      #  include <sys/time.h>
time.h   54 missing/strftime.c #include <time.h>
time.h   58 missing/strftime.c #include <sys/time.h>
time.h  826 missing/strftime.c #include	<sys/time.h>
time.h   24 missing/x68.c  #include <time.h>
time.h   25 missing/x68.c  #include <sys/time.h>
time.h   33 process.c      #include <time.h>
time.h  184 random.c       #include <time.h>
time.h 1059 regexec.c      #include <sys/time.h>
time.h   15 time.c         #include <time.h>
time.h   54 win32/win32.h  #include <time.h>
time.h   15 wince/io_wce.c #include <time.h>
time.h   13 wince/sys/stat.c #include <time.h>
time.h    6 wince/sys/timeb.c #include <time.h>
time.h    4 wince/sys/utime.h #include <time.h>
time.h   15 wince/time_wce.c #include <time.h>
time.h   23 x68/select.c   #include <sys/time.h>


varargs.h

varargs.h   27 ext/curses/curses.c #  include <varargs.h>
varargs.h   18 ext/tk/tcltklib.c #include <varargs.h>
varargs.h   30 ext/win32ole/win32ole.c #include <varargs.h>
varargs.h   21 intern.h       # include <varargs.h>
varargs.h   85 missing/vsnprintf.c # include <varargs.h>


wince.h

wince.h   20 ruby.c         #include "wince.h"
wince.h   35 win32/win32.c  #include "wince.h"
wince.h    8 wince/direct.c #include "wince.h" /* for wce_mbtowc */
wince.h   17 wince/io_wce.c #include "wince.h" /* for wce_mbtowc */
wince.h    6 wince/stdio.c  #include "wince.h" /* for wce_mbtowc */
wince.h    6 wince/string_wce.c #include "wince.h" /* for wce_mbtowc */
wince.h   13 wince/wince.c  #include "wince.h"
wince.h    3 wince/wincemain.c #include "wince.h"
wince.h    8 wince/winsock2.c #include "wince.h"


A

A                  23 ext/digest/md5/md5ossl.c       && pctx1->A == pctx2->A
A                  37 ext/digest/rmd160/rmd160ossl.c 	  && pctx1->A == pctx2->A
A                 402 util.c                s = A[0]; A[0] = B[0]; B[0] = s;
A                 403 util.c                s = A[1]; A[1] = B[1]; B[1] = s;
A                 404 util.c                s = A[2]; A[2] = B[2]; B[2] = s;
A                 405 util.c                s = A[3]; A[3] = B[3]; B[3] = s;  a += 16; b += 16;
A                 408 util.c            if (low != 0) { s = A[0]; A[0] = B[0]; B[0] = s;
A                 409 util.c              if (low >= 8) { s = A[1]; A[1] = B[1]; B[1] = s;
A                 410 util.c                if (low == 12) {s = A[2]; A[2] = B[2]; B[2] = s;}}}
A                 428 util.c                s = A[0]; A[0] = B[0]; B[0] = C[0]; C[0] = s;
A                 429 util.c                s = A[1]; A[1] = B[1]; B[1] = C[1]; C[1] = s;
A                 430 util.c                s = A[2]; A[2] = B[2]; B[2] = C[2]; C[2] = s;
A                 431 util.c                s = A[3]; A[3] = B[3]; B[3] = C[3]; C[3] = s; a += 16; b += 16; c += 16;
A                 434 util.c            if (low != 0) { s = A[0]; A[0] = B[0]; B[0] = C[0]; C[0] = s;
A                 435 util.c              if (low >= 8) { s = A[1]; A[1] = B[1]; B[1] = C[1]; C[1] = s;
A                 436 util.c                if (low == 12) {s = A[2]; A[2] = B[2]; B[2] = C[2]; C[2] = s;}}}


ADD2HEAP

ADD2HEAP         8783 parse.y            return ADD2HEAP(n, cnt, ptr);
ADD2HEAP         8793 parse.y            return ADD2HEAP(n, cnt, ptr);
ADD2HEAP         8813 parse.y            return ADD2HEAP(n, cnt, ptr);


ADDINC128

ADDINC128         785 ext/digest/sha2/sha2.c 			ADDINC128(context->bitcount, freespace << 3);
ADDINC128         792 ext/digest/sha2/sha2.c 			ADDINC128(context->bitcount, len << 3);
ADDINC128         801 ext/digest/sha2/sha2.c 		ADDINC128(context->bitcount, SHA512_BLOCK_LENGTH << 3);
ADDINC128         808 ext/digest/sha2/sha2.c 		ADDINC128(context->bitcount, len << 3);


ADD_ALL_MULTI_BYTE_RANGE

ADD_ALL_MULTI_BYTE_RANGE 3496 regparse.c           ADD_ALL_MULTI_BYTE_RANGE(enc, cc->mbuf);
ADD_ALL_MULTI_BYTE_RANGE 3519 regparse.c           ADD_ALL_MULTI_BYTE_RANGE(enc, cc->mbuf);
ADD_ALL_MULTI_BYTE_RANGE 3528 regparse.c           ADD_ALL_MULTI_BYTE_RANGE(enc, cc->mbuf);


ADD_BYTE_LEVEL

ADD_BYTE_LEVEL    293 ext/syck/bytecode.c {   ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
ADD_BYTE_LEVEL    301 ext/syck/bytecode.c {   ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
ADD_BYTE_LEVEL    312 ext/syck/bytecode.c {   ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
ADD_BYTE_LEVEL    324 ext/syck/bytecode.c             ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
ADD_BYTE_LEVEL    474 ext/syck/bytecode.c             ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_seq);
ADD_BYTE_LEVEL    498 ext/syck/bytecode.c             ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_map);


ADD_DIRECT

ADD_DIRECT        280 st.c           	ADD_DIRECT(table, key, value, hash_val, bin_pos);
ADD_DIRECT        296 st.c               ADD_DIRECT(table, key, value, hash_val, bin_pos);


ADD_LEVEL

ADD_LEVEL          67 ext/syck/bytecode.c                 ADD_LEVEL(len, syck_lvl_open); \
ADD_LEVEL          73 ext/syck/bytecode.c                 ADD_LEVEL(len, s); \
ADD_LEVEL          81 ext/syck/bytecode.c                 ADD_LEVEL(len, s); \
ADD_LEVEL          98 ext/syck/bytecode.c                 ADD_LEVEL( to_len, lvl_type ); \
ADD_LEVEL          70 ext/syck/token.c                 ADD_LEVEL( to_len, syck_lvl_doc ); \
ADD_LEVEL         596 ext/syck/token.c                         ADD_LEVEL(lvl->spaces + 1, syck_lvl_iseq);
ADD_LEVEL         606 ext/syck/token.c                         ADD_LEVEL(lvl->spaces + 1, syck_lvl_imap);
ADD_LEVEL        1046 ext/syck/token.c                             ADD_LEVEL((YYTOKEN + 1) - YYLINEPTR, syck_lvl_seq);
ADD_LEVEL        1050 ext/syck/token.c                             ADD_LEVEL(YYCURSOR - YYLINEPTR, syck_lvl_seq);
ADD_LEVEL        1776 ext/syck/token.c                             ADD_LEVEL( indt_len, syck_lvl_str );
ADD_LEVEL        1931 ext/syck/token.c                             ADD_LEVEL( indt_len, syck_lvl_str );
ADD_LEVEL        2413 ext/syck/token.c                                 ADD_LEVEL( new_spaces, syck_lvl_block );


ADJ

ADJ              9965 eval.c         	frame = ADJ(frame);
ADJ              9971 eval.c         		tmp = ADJ(tmp);
ADJ              9980 eval.c         	block = ADJ(block);


AF_UNSPEC

AF_UNSPEC         606 ext/socket/getaddrinfo.c 	if (af == AF_UNSPEC) {
AF_UNSPEC         811 ext/socket/socket.c     hints.ai_family = AF_UNSPEC;
AF_UNSPEC         853 ext/socket/socket.c     case AF_UNSPEC:
AF_UNSPEC          60 ext/socket/sockport.h #ifndef AF_UNSPEC
AF_UNSPEC          65 ext/socket/sockport.h # define PF_UNSPEC AF_UNSPEC
AF_UNSPEC        2465 win32/win32.c  		    if ((af != AF_UNSPEC && af != proto_buffers[i].iAddressFamily) ||


AI_ADDRCONFIG

AI_ADDRCONFIG     113 ext/socket/addrinfo.h #define	AI_DEFAULT	(AI_V4MAPPED_CFG | AI_ADDRCONFIG)
AI_ADDRCONFIG     608 ext/socket/getaddrinfo.c 				AI_ADDRCONFIG|AI_ALL|AI_V4MAPPED, &h_error);
AI_ADDRCONFIG     610 ext/socket/getaddrinfo.c 		hp = getipnodebyname(hostname, af, AI_ADDRCONFIG, &h_error);


AI_CANONNAME

AI_CANONNAME      106 ext/socket/addrinfo.h #define	AI_MASK		(AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST)
AI_CANONNAME      168 ext/socket/getaddrinfo.c if (pai->ai_flags & AI_CANONNAME) {\
AI_CANONNAME      479 ext/socket/getaddrinfo.c 					pai->ai_flags &= ~AI_CANONNAME;
AI_CANONNAME      482 ext/socket/getaddrinfo.c 					pai->ai_flags &= ~AI_CANONNAME;
AI_CANONNAME      492 ext/socket/getaddrinfo.c 					pai->ai_flags &= ~AI_CANONNAME;
AI_CANONNAME      499 ext/socket/getaddrinfo.c 				if (! (pai->ai_flags & AI_CANONNAME)) {
AI_CANONNAME     1368 ext/socket/socket.c     return make_hostent(host, sock_addrinfo(host, Qnil, SOCK_STREAM, AI_CANONNAME), tcp_sockaddr);
AI_CANONNAME     2724 ext/socket/socket.c     return make_hostent(host, sock_addrinfo(host, Qnil, SOCK_STREAM, AI_CANONNAME), sock_sockaddr);


AI_NUMERICHOST

AI_NUMERICHOST    106 ext/socket/addrinfo.h #define	AI_MASK		(AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST)
AI_NUMERICHOST    519 ext/socket/getaddrinfo.c 	if (pai->ai_flags & AI_NUMERICHOST)
AI_NUMERICHOST   2955 ext/socket/socket.c #ifdef AI_NUMERICHOST /* AIX 4.3.3 doesn't have AI_NUMERICHOST. */
AI_NUMERICHOST   2956 ext/socket/socket.c 		hints.ai_flags |= AI_NUMERICHOST;


AI_PASSIVE

AI_PASSIVE        106 ext/socket/addrinfo.h #define	AI_MASK		(AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST)
AI_PASSIVE        446 ext/socket/getaddrinfo.c 			if (pai->ai_flags & AI_PASSIVE) {
AI_PASSIVE       1163 ext/socket/socket.c 				    (type == INET_SERVER) ? AI_PASSIVE : 0);


ALIGNMENT_RIGHT

ALIGNMENT_RIGHT  5267 regcomp.c            ALIGNMENT_RIGHT(q);
ALIGNMENT_RIGHT  5281 regcomp.c            ALIGNMENT_RIGHT(q);
ALIGNMENT_RIGHT  1637 regexec.c      	ALIGNMENT_RIGHT(q);
ALIGNMENT_RIGHT  1702 regexec.c      	ALIGNMENT_RIGHT(q);


ALIGN_SIZE

ALIGN_SIZE        117 missing/alloca.c #ifndef	ALIGN_SIZE
ALIGN_SIZE        123 missing/alloca.c   char	align[ALIGN_SIZE];	/* to force sizeof(header) */


ALLOC

ALLOC            1051 dir.c          	tmp = ALLOC(struct glob_pattern);
ALLOC            1079 dir.c              tmp = ALLOC(struct glob_pattern);
ALLOC            2385 eval.c             hook = ALLOC(rb_event_hook_t);
ALLOC            7463 eval.c             struct end_proc_data *link = ALLOC(struct end_proc_data);
ALLOC            7877 eval.c         	tmp = ALLOC(struct FRAME);
ALLOC            9582 eval.c             fds->fdset = ALLOC(fd_set);
ALLOC            11513 eval.c             th = ALLOC(struct thread);\
ALLOC             145 ext/dbm/dbm.c      dbmp = ALLOC(struct dbmdata);
ALLOC             154 ext/gdbm/gdbm.c     dbmp = ALLOC(struct dbmdata);
ALLOC             123 ext/sdbm/init.c     dbmp = ALLOC(struct dbmdata);
ALLOC              46 ext/stringio/stringio.c     struct StringIO *ptr = ALLOC(struct StringIO);
ALLOC             177 ext/strscan/strscan.c     p = ALLOC(struct strscanner);
ALLOC            1740 ext/tk/tcltklib.c     struct evloop_params *args = ALLOC(struct evloop_params);
ALLOC            1999 ext/tk/tcltklib.c     q = (struct thread_call_proc_arg *)ALLOC(struct thread_call_proc_arg);
ALLOC            2001 ext/tk/tcltklib.c     q->done = (int*)ALLOC(int);
ALLOC            2532 ext/tk/tcltklib.c     arg = ALLOC(struct cmd_body_arg);
ALLOC            4683 ext/tk/tcltklib.c     ptr = ALLOC(struct tcltkip);
ALLOC            4866 ext/tk/tcltklib.c     struct tcltkip *slave = ALLOC(struct tcltkip);
ALLOC            5504 ext/tk/tcltklib.c     alloc_done = (int*)ALLOC(int);
ALLOC            5814 ext/tk/tcltklib.c     alloc_done = (int*)ALLOC(int);
ALLOC            6897 ext/tk/tcltklib.c     alloc_done = (int*)ALLOC(int);
ALLOC            1116 ext/tk/tkutil/tkutil.c     inf = ALLOC(struct cbsubst_info);
ALLOC            1361 ext/tk/tkutil/tkutil.c     subst_inf = ALLOC(struct cbsubst_info);
ALLOC             334 ext/win32ole/win32ole.c         pdisp = ALLOC(Win32OLEIDispatch);
ALLOC             168 file.c         	nst = ALLOC(struct stat);
ALLOC            3396 file.c             nst = ALLOC(struct stat);
ALLOC            3420 file.c         	nst = ALLOC(struct stat);
ALLOC             248 gc.c               tmp = ALLOC(struct gc_list);
ALLOC            2698 io.c               list = ALLOC(struct pipe_list);
ALLOC            3390 io.c           	fptr = RFILE(file)->fptr = ALLOC(OpenFile);
ALLOC            7985 parse.y            local = ALLOC(struct local_vars);
ALLOC             658 re.c               match->regs = ALLOC(struct re_registers);
ALLOC             343 ruby.c             list = ALLOC(struct req_list);
ALLOC             410 ruby.h             sval = ALLOC(type),\
ALLOC              63 rubyio.h           fp = RFILE(obj)->fptr = ALLOC(OpenFile);\
ALLOC             312 util.c             p = ALLOC(struct PathList);
ALLOC             326 variable.c     	entry = ALLOC(struct global_entry);
ALLOC             327 variable.c     	var = ALLOC(struct global_variable);
ALLOC             534 variable.c         trace = ALLOC(struct trace_var);
ALLOC             736 variable.c     	entry1 = ALLOC(struct global_entry);
ALLOC            1014 win32/win32.c      tmpcurr = ALLOC(NtCmdLineElement);
ALLOC            1276 win32/win32.c  	curr = ALLOC(NtCmdLineElement);


ALLOCA_N

ALLOCA_N          508 bignum.c       	    char *p = ALLOCA_N(char, len+1);
ALLOCA_N          137 dln.c              char *tmp = ALLOCA_N(char, len+1);\
ALLOCA_N         1271 dln.c          #define DLN_ERROR() (error = dln_strerror(), strcpy(ALLOCA_N(char, strlen(error) + 1), error))
ALLOCA_N          666 eval.c             buf = ALLOCA_N(char,len);
ALLOCA_N         2139 eval.c         	argv = ALLOCA_N(VALUE, argc);\
ALLOCA_N         3361 eval.c         		VALUE *vars = ALLOCA_N(VALUE, node->nd_tbl[0]+1);
ALLOCA_N         5412 eval.c             nargv = ALLOCA_N(VALUE, argc+1);
ALLOCA_N         5826 eval.c             argv = ALLOCA_N(VALUE, argc);
ALLOCA_N         5905 eval.c         	argv = ALLOCA_N(VALUE, n);
ALLOCA_N         6743 eval.c         	buf = ALLOCA_N(char, strlen(feature)+8);
ALLOCA_N          185 ext/bigdecimal/bigdecimal.c     psz = ALLOCA_N(char,(unsigned int)VpNumOfChars(vp,"E")+strlen(sz));
ALLOCA_N          369 ext/bigdecimal/bigdecimal.c     psz = ALLOCA_N(char,(unsigned int)(e+nf+2));
ALLOCA_N         1090 ext/bigdecimal/bigdecimal.c     psz = ALLOCA_N(char,(unsigned int)nc);
ALLOCA_N         1111 ext/bigdecimal/bigdecimal.c     psz1 = ALLOCA_N(char,(unsigned int)VpNumOfChars(vp,"E"));
ALLOCA_N         1149 ext/bigdecimal/bigdecimal.c     psz1   = ALLOCA_N(char,nc);
ALLOCA_N         1150 ext/bigdecimal/bigdecimal.c     pszAll = ALLOCA_N(char,nc+256);
ALLOCA_N         1909 ext/bigdecimal/bigdecimal.c     psz = ALLOCA_N(char,strlen(szVal)+1);
ALLOCA_N          436 ext/socket/socket.c     buf = ALLOCA_N(char,len);
ALLOCA_N          305 ext/win32ole/win32ole.c     VALUE* parg = ALLOCA_N(VALUE, args);
ALLOCA_N         2219 ext/win32ole/win32ole.c         op.pNamedArgs = ALLOCA_N(OLECHAR*, cNamedArgs + 1);
ALLOCA_N         2220 ext/win32ole/win32ole.c         op.dp.rgvarg = ALLOCA_N(VARIANTARG, op.dp.cArgs);
ALLOCA_N         2223 ext/win32ole/win32ole.c         pDispID = ALLOCA_N(DISPID, cNamedArgs + 1);
ALLOCA_N         2248 ext/win32ole/win32ole.c         op.pNamedArgs = ALLOCA_N(OLECHAR*, cNamedArgs + 1);
ALLOCA_N         2250 ext/win32ole/win32ole.c             op.dp.rgvarg  = ALLOCA_N(VARIANTARG, op.dp.cArgs);
ALLOCA_N         2257 ext/win32ole/win32ole.c         realargs = ALLOCA_N(VARIANTARG, op.dp.cArgs-cNamedArgs+1);
ALLOCA_N         2279 ext/win32ole/win32ole.c         op.dp.rgdispidNamedArgs = ALLOCA_N( DISPID, 1 );
ALLOCA_N         2415 ext/win32ole/win32ole.c     dispParams.rgvarg = ALLOCA_N(VARIANTARG, dispParams.cArgs);
ALLOCA_N         2416 ext/win32ole/win32ole.c     realargs = ALLOCA_N(VARIANTARG, dispParams.cArgs);
ALLOCA_N         2553 ext/win32ole/win32ole.c         dispParams.rgdispidNamedArgs = ALLOCA_N( DISPID, 1 );
ALLOCA_N         5844 ext/win32ole/win32ole.c     bstrs = ALLOCA_N(BSTR, pFuncDesc->cParams + 1);
ALLOCA_N         2020 file.c             buf = ALLOCA_N(char, len);
ALLOCA_N         2913 io.c           	char **args = ALLOCA_N(char *, argc+1);
ALLOCA_N         2920 io.c           	cmd = ALLOCA_N(char, rb_w32_argv_size(args));
ALLOCA_N         3029 io.c           	VALUE *argv = ALLOCA_N(VALUE, RARRAY(tmp)->len);
ALLOCA_N         3140 io.c               path = ALLOCA_N(char, strlen(RSTRING(fname)->ptr)+1);
ALLOCA_N         2079 object.c       	char *buf = ALLOCA_N(char, strlen(p)+1);
ALLOCA_N         2129 object.c       	    char *p = ALLOCA_N(char, len+1);
ALLOCA_N         1010 pack.c             char *buff = ALLOCA_N(char, len * 4 / 3 + 6);
ALLOCA_N         4522 parse.y        	buf = ALLOCA_N(char, len+2);
ALLOCA_N         8451 parse.y        	    char *buf = ALLOCA_N(char,last+1);
ALLOCA_N         8509 parse.y        	    char *buf = ALLOCA_N(char, strlen(name)+2);
ALLOCA_N          950 process.c      	    new_argv = ALLOCA_N(char*, n + 2);
ALLOCA_N          953 process.c      	    new_argv[1] = strcpy(ALLOCA_N(char, strlen(argv[0]) + 1), argv[0]);
ALLOCA_N          979 process.c          args = ALLOCA_N(char*, argc+1);
ALLOCA_N         1041 process.c          a = argv = ALLOCA_N(char*, (s-str)/2+2);
ALLOCA_N         1042 process.c          ss = ALLOCA_N(char, s-str+1);
ALLOCA_N         1090 process.c      	new_argv = ALLOCA_N(char*, n + 2);
ALLOCA_N         1093 process.c      	new_argv[1] = strcpy(ALLOCA_N(char, strlen(argv[0]) + 1), argv[0]);
ALLOCA_N         1120 process.c          args = ALLOCA_N(char*, argc + 1);
ALLOCA_N         1151 process.c          a = argv = ALLOCA_N(char*, (s - str) / 2 + 2);
ALLOCA_N         1152 process.c          s = ALLOCA_N(char, s - str + 1);
ALLOCA_N         2591 process.c          groups = ALLOCA_N(rb_gid_t, maxgroups);
ALLOCA_N         2637 process.c          groups = ALLOCA_N(rb_gid_t, ngroups);
ALLOCA_N          458 ruby.c             argv[1] = ALLOCA_N(char, s-p+2);
ALLOCA_N          921 ruby.c         			argv = ALLOCA_N(char*, origargc+3);
ALLOCA_N          359 struct.c           mem = ALLOCA_N(VALUE, size);
ALLOCA_N          439 variable.c     	char *buf = ALLOCA_N(char, strlen(name)+2);
ALLOCA_N          834 win32/win32.c      char *cmd = ALLOCA_N(char, len);
ALLOCA_N          919 win32/win32.c  	    char *tmp = ALLOCA_N(char, strlen(shell) + len + sizeof(" -c ") + 2);
ALLOCA_N          926 win32/win32.c  	    char *tmp = ALLOCA_N(char, strlen(shell) + len + sizeof(" /c "));
ALLOCA_N          940 win32/win32.c  			char *tmp = ALLOCA_N(char, len + 1);
ALLOCA_N          949 win32/win32.c  		    p = ALLOCA_N(char, len + 1);
ALLOCA_N         3298 win32/win32.c      buf1 = ALLOCA_N(char, strlen(path) + 2);


ALLOC_CT

ALLOC_CT          134 ext/syck/emitter.c     e->lvl_capa = ALLOC_CT;
ALLOC_CT          207 ext/syck/emitter.c         e->lvl_capa += ALLOC_CT;
ALLOC_CT           57 ext/syck/node.c     m->capa = ALLOC_CT;
ALLOC_CT           76 ext/syck/node.c     s->capa = ALLOC_CT;
ALLOC_CT          192 ext/syck/node.c     m->capa = ALLOC_CT;
ALLOC_CT          211 ext/syck/node.c         m->capa += ALLOC_CT;
ALLOC_CT          236 ext/syck/node.c         new_capa += ALLOC_CT;
ALLOC_CT          316 ext/syck/node.c     s->capa = ALLOC_CT;
ALLOC_CT          334 ext/syck/node.c         s->capa += ALLOC_CT;
ALLOC_CT          163 ext/syck/syck.c     p->lvl_capa = ALLOC_CT;
ALLOC_CT          367 ext/syck/syck.c         p->lvl_capa += ALLOC_CT;


ALLOC_N

ALLOC_N            61 array.c        	ptr = ALLOC_N(VALUE, RARRAY(ary)->len);
ALLOC_N           118 array.c            RARRAY(ary)->ptr = ALLOC_N(VALUE, len);
ALLOC_N           381 array.c        	RARRAY(ary)->ptr = ALLOC_N(VALUE, argc);
ALLOC_N            48 bignum.c           big->digits = ALLOC_N(BDIGIT, len);
ALLOC_N          1061 dir.c          	    char *buf = ALLOC_N(char, m-p+1);
ALLOC_N          1104 dir.c              char *buf = ALLOC_N(char, len+strlen(name)+(dirsep?1:0)+1);
ALLOC_N          1244 dir.c          	    new_beg = new_end = ALLOC_N(struct glob_pattern *, (end - beg) * 2);
ALLOC_N          1270 dir.c          	copy_beg = copy_end = ALLOC_N(struct glob_pattern *, end - beg);
ALLOC_N          1278 dir.c          		name = ALLOC_N(char, strlen((*cur)->str) + 1);
ALLOC_N          1282 dir.c          		new_beg = new_end = ALLOC_N(struct glob_pattern *, end - beg);
ALLOC_N          1324 dir.c              buf = ALLOC_N(char, n + 1);
ALLOC_N          1405 dir.c          	char *buf = ALLOC_N(char, strlen(s) + 1);
ALLOC_N           648 error.c            VALUE *ptr = ALLOC_N(VALUE, 3);
ALLOC_N          2092 eval.c         	copy->nd_tbl = ALLOC_N(ID, node->nd_tbl[0]+1);
ALLOC_N          2105 eval.c         				 ALLOC_N(VALUE,n),tmp__protect_tmp,n),	\
ALLOC_N          7818 eval.c         	vars = ALLOC_N(VALUE, tbl[0]+1);
ALLOC_N          7891 eval.c         	tmp = ALLOC_N(struct BLOCK, 1);
ALLOC_N           183 ext/readline/readline.c     result = ALLOC_N(char *, matches + 2);
ALLOC_N           186 ext/readline/readline.c 	result[i + 1] = ALLOC_N(char, RSTRING(temp)->len + 1);
ALLOC_N           218 ext/readline/readline.c 	result[0] = ALLOC_N(char, low + 1);
ALLOC_N           309 ext/readline/readline.c 	    ALLOC_N(char, RSTRING(str)->len + 1);
ALLOC_N           351 ext/readline/readline.c 	    ALLOC_N(char, RSTRING(str)->len + 1);
ALLOC_N           393 ext/readline/readline.c 	    ALLOC_N(char, RSTRING(str)->len + 1);
ALLOC_N           436 ext/readline/readline.c 	    ALLOC_N(char, RSTRING(str)->len + 1);
ALLOC_N           479 ext/readline/readline.c 	    ALLOC_N(char, RSTRING(str)->len + 1);
ALLOC_N           862 ext/tk/tcltklib.c         argv = (Tcl_Obj **)ALLOC_N(Tcl_Obj *, 3);
ALLOC_N           875 ext/tk/tcltklib.c         argv = (char **)ALLOC_N(char *, 3);
ALLOC_N           893 ext/tk/tcltklib.c         argv = (char **)ALLOC_N(char *, 3);
ALLOC_N          2151 ext/tk/tcltklib.c     buf = ALLOC_N(char, (RSTRING(msg)->len)+1);
ALLOC_N          2279 ext/tk/tcltklib.c             buf = ALLOC_N(char, 256);
ALLOC_N          2444 ext/tk/tcltklib.c       arg = ALLOC_N(char, len + 1);
ALLOC_N          2557 ext/tk/tcltklib.c         buf = ALLOC_N(char, len + 2);
ALLOC_N          5498 ext/tk/tcltklib.c         VALUE *temp = ALLOC_N(VALUE, argc);
ALLOC_N          5817 ext/tk/tcltklib.c     eval_str = ALLOC_N(char, RSTRING(str)->len + 1);
ALLOC_N          6066 ext/tk/tcltklib.c     buf = ALLOC_N(char,(RSTRING(str)->len)+1);
ALLOC_N          6224 ext/tk/tcltklib.c     buf = ALLOC_N(char,strlen(RSTRING(str)->ptr)+1);
ALLOC_N          6303 ext/tk/tcltklib.c     src_buf = ALLOC_N(char,(RSTRING(str)->len)+1);
ALLOC_N          6307 ext/tk/tcltklib.c     dst_buf = ALLOC_N(char,(RSTRING(str)->len)+1);
ALLOC_N          6414 ext/tk/tcltklib.c         argv = (char **)ALLOC_N(char *, argc+1);
ALLOC_N          6544 ext/tk/tcltklib.c             unknown_objv = (Tcl_Obj **)ALLOC_N(Tcl_Obj *, objc+2);
ALLOC_N          6551 ext/tk/tcltklib.c             unknown_argv = (char **)ALLOC_N(char *, argc+2);
ALLOC_N          6605 ext/tk/tcltklib.c         argv = (char **)ALLOC_N(char *, argc+1);
ALLOC_N          6705 ext/tk/tcltklib.c     av = ALLOC_N(Tcl_Obj *, argc+1);
ALLOC_N          6714 ext/tk/tcltklib.c     av = ALLOC_N(char *, argc+1);
ALLOC_N          7543 ext/tk/tcltklib.c     flagPtr = ALLOC_N(int, argc);
ALLOC_N          7651 ext/tk/tcltklib.c     info = ALLOC_N(char, size);
ALLOC_N          1120 ext/tk/tkutil/tkutil.c     inf->key = ALLOC_N(char, 1);
ALLOC_N          1123 ext/tk/tkutil/tkutil.c     inf->type = ALLOC_N(char, 1);
ALLOC_N          1126 ext/tk/tkutil/tkutil.c     ivar = ALLOC_N(ID, 1);
ALLOC_N          1238 ext/tk/tkutil/tkutil.c     buf = ALLOC_N(char, 3*argc + 1);
ALLOC_N          1297 ext/tk/tkutil/tkutil.c     buf = ALLOC_N(char, len + 1);
ALLOC_N          1327 ext/tk/tkutil/tkutil.c     buf = ALLOC_N(char, 3*len + 1);
ALLOC_N          1353 ext/tk/tkutil/tkutil.c     char *key = ALLOC_N(char, len + 1);
ALLOC_N          1354 ext/tk/tkutil/tkutil.c     char *type = ALLOC_N(char, len + 1);
ALLOC_N          1355 ext/tk/tkutil/tkutil.c     ID *ivar = ALLOC_N(ID, len + 1);
ALLOC_N           489 ext/win32ole/win32ole.c         pm = ALLOC_N(char, size);
ALLOC_N           493 ext/win32ole/win32ole.c         pm = ALLOC_N(char, 1);
ALLOC_N           781 ext/win32ole/win32ole.c         psab = ALLOC_N(SAFEARRAYBOUND, dim);
ALLOC_N           782 ext/win32ole/win32ole.c         pub  = ALLOC_N(long, dim);
ALLOC_N           783 ext/win32ole/win32ole.c         pid  = ALLOC_N(long, dim);
ALLOC_N          1105 ext/win32ole/win32ole.c         pID = ALLOC_N(long, dim);
ALLOC_N          1106 ext/win32ole/win32ole.c         pLB = ALLOC_N(long, dim);
ALLOC_N          1107 ext/win32ole/win32ole.c         pUB = ALLOC_N(long, dim);
ALLOC_N          6398 ext/win32ole/win32ole.c     pEv = ALLOC_N(IEVENTSINKOBJ, 1);
ALLOC_N           523 gc.c           	char *ptr = name = ALLOC_N(char, len + 1);
ALLOC_N          1710 hash.c         	tmpenv = ALLOC_N(char*, max+2);
ALLOC_N          1735 hash.c             environ[i] = ALLOC_N(char, len);
ALLOC_N           271 io.c                   fptr->rbuf = ALLOC_N(char, fptr->rbuf_capa);
ALLOC_N           554 io.c                   fptr->wbuf = ALLOC_N(char, fptr->wbuf_capa);
ALLOC_N           877 io.c                   fptr->rbuf = ALLOC_N(char, fptr->rbuf_capa);
ALLOC_N          1053 marshal.c      	    big->digits = digits = ALLOC_N(BDIGIT, big->len);
ALLOC_N           115 missing/os2.c      argv = ALLOC_N(CHARP,(strlen(cmd) / 2 + 2));
ALLOC_N           116 missing/os2.c      cmd2 = ALLOC_N(char, (strlen(cmd) + 1));
ALLOC_N          4784 parse.y        	tokenbuf = ALLOC_N(char, 60);
ALLOC_N          8030 parse.y        	lvtbl->tbl = ALLOC_N(ID, 4);
ALLOC_N          8077 parse.y        	lvtbl->tbl = ALLOC_N(ID, lvtbl->cnt+3);
ALLOC_N          8100 parse.y        		VALUE *vars = ALLOC_N(VALUE, len+1);
ALLOC_N          8139 parse.y        	lvtbl->dnames = ALLOC_N(ID, 1);
ALLOC_N          8740 parse.y            p = ALLOC_N(struct parser_params, 1);
ALLOC_N          9081 parse.y            p = ALLOC_N(struct parser_params, 1);
ALLOC_N           217 random.c           buf = ALLOC_N(unsigned long, len); /* allocate longs for init_by_array */
ALLOC_N           270 random.c           digits = big->digits = ALLOC_N(BDIGIT, big->len);
ALLOC_N          1340 re.c               re->str = ALLOC_N(char, len+1);
ALLOC_N           344 ruby.c             list->name = ALLOC_N(char, strlen(mod)+1);
ALLOC_N            83 string.c           RSTRING(str)->ptr = ALLOC_N(char,len+1);
ALLOC_N           209 string.c           RSTRING(str)->ptr = ALLOC_N(char, capa+1);
ALLOC_N           436 string.c           ptr = ALLOC_N(char, RSTRING(str)->len+1);
ALLOC_N           337 struct.c           st->ptr = ALLOC_N(VALUE, n);
ALLOC_N           511 struct.c           RSTRUCT(copy)->ptr = ALLOC_N(VALUE, RSTRUCT(s)->len);
ALLOC_N           393 win32/win32.c      NTLoginName = ALLOC_N(char, len+1);
ALLOC_N          1017 win32/win32.c      tmpcurr->str = ALLOC_N(char, tmpcurr->len + 1);
ALLOC_N          1302 win32/win32.c      buffer = ALLOC_N(char, len);
ALLOC_N          1411 win32/win32.c      p->start = ALLOC_N(char, idx);
ALLOC_N          1413 win32/win32.c      p->bits = ALLOC_N(char, 1);
ALLOC_N          3073 win32/win32.c  	curitem = ALLOC_N(char, curlen);
ALLOC_N          3741 win32/win32.c      myenvtop = ALLOC_N(char*, num + 1);
ALLOC_N          3744 win32/win32.c  	    *myenv = ALLOC_N(char, strlen(env) + 1);


ALLOWED_TYPE_IN_LB

ALLOWED_TYPE_IN_LB 3274 regcomp.c      	  r = check_type_tree(an->target, ALLOWED_TYPE_IN_LB,
ALLOWED_TYPE_IN_LB 3286 regcomp.c      	  r = check_type_tree(an->target, ALLOWED_TYPE_IN_LB,


ALLOW_INTS

ALLOW_INTS        796 class.c            ALLOW_INTS;
ALLOW_INTS       1315 eval.c         	ALLOW_INTS;
ALLOW_INTS       6604 eval.c         	ALLOW_INTS;


ALT

ALT               603 missing/vsnprintf.c 			flags |= ALT;
ALT               705 missing/vsnprintf.c 				flags |= ALT;
ALT               737 missing/vsnprintf.c 				if (ndig > 1 || flags & ALT)
ALT               742 missing/vsnprintf.c 					if (prec || flags & ALT)
ALT               748 missing/vsnprintf.c 				if (flags & ALT)
ALT               855 missing/vsnprintf.c 			if (flags & ALT &&
ALT               883 missing/vsnprintf.c 					    flags & ALT, xdigs);
ALT               890 missing/vsnprintf.c 					    flags & ALT, xdigs);
ALT               955 missing/vsnprintf.c 					    (flags & ALT) == 0) {
ALT               968 missing/vsnprintf.c 					if (flags & ALT)
ALT               977 missing/vsnprintf.c 				if (ndig > 1 || flags & ALT) {
ALT               981 missing/vsnprintf.c 					if (_double || flags & ALT == 0) {
ALT              1037 missing/vsnprintf.c 	if (flags & ALT) {	/* Print trailing zeros */


ANCHOR_ANYCHAR_STAR

ANCHOR_ANYCHAR_STAR 4203 regcomp.c      	    add_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR);
ANCHOR_ANYCHAR_STAR 4394 regcomp.c              ANCHOR_BEGIN_POSITION | ANCHOR_ANYCHAR_STAR | ANCHOR_ANYCHAR_STAR_PL);
ANCHOR_ANYCHAR_STAR 4501 regcomp.c        if (anchor & ANCHOR_ANYCHAR_STAR) {
ANCHOR_ANYCHAR_STAR 3371 regexec.c      	  if ((reg->anchor & ANCHOR_ANYCHAR_STAR) != 0) {
ANCHOR_ANYCHAR_STAR   70 regparse.h     #define ANCHOR_ANYCHAR_STAR_MASK (ANCHOR_ANYCHAR_STAR | ANCHOR_ANYCHAR_STAR_PL)


ANCHOR_ANYCHAR_STAR_MASK

ANCHOR_ANYCHAR_STAR_MASK 4272 regcomp.c      	  if (is_set_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR_MASK)) {
ANCHOR_ANYCHAR_STAR_MASK 4274 regcomp.c      	      remove_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR_MASK);


ANCHOR_ANYCHAR_STAR_PL

ANCHOR_ANYCHAR_STAR_PL 4201 regcomp.c      	    add_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR_PL);
ANCHOR_ANYCHAR_STAR_PL 4394 regcomp.c              ANCHOR_BEGIN_POSITION | ANCHOR_ANYCHAR_STAR | ANCHOR_ANYCHAR_STAR_PL);
ANCHOR_ANYCHAR_STAR_PL 4506 regcomp.c        if (anchor & ANCHOR_ANYCHAR_STAR_PL) {
ANCHOR_ANYCHAR_STAR_PL 3308 regexec.c          else if ((reg->anchor & ANCHOR_ANYCHAR_STAR_PL)) {
ANCHOR_ANYCHAR_STAR_PL   70 regparse.h     #define ANCHOR_ANYCHAR_STAR_MASK (ANCHOR_ANYCHAR_STAR | ANCHOR_ANYCHAR_STAR_PL)


ANCHOR_BEGIN_BUF

ANCHOR_BEGIN_BUF 1143 regcomp.c        case ANCHOR_BEGIN_BUF:      r = add_opcode(reg, OP_BEGIN_BUF);      break;
ANCHOR_BEGIN_BUF 3266 regcomp.c      ( ANCHOR_LOOK_BEHIND | ANCHOR_BEGIN_LINE | ANCHOR_END_LINE | ANCHOR_BEGIN_BUF )
ANCHOR_BEGIN_BUF 3268 regcomp.c      ( ANCHOR_LOOK_BEHIND_NOT | ANCHOR_BEGIN_LINE | ANCHOR_END_LINE | ANCHOR_BEGIN_BUF )
ANCHOR_BEGIN_BUF 4110 regcomp.c          case ANCHOR_BEGIN_BUF:
ANCHOR_BEGIN_BUF 4393 regcomp.c        reg->anchor = opt.anc.left_anchor & (ANCHOR_BEGIN_BUF |
ANCHOR_BEGIN_BUF 4472 regcomp.c        if (anchor & ANCHOR_BEGIN_BUF) {
ANCHOR_BEGIN_BUF 5453 regcomp.c          case ANCHOR_BEGIN_BUF:      fputs("begin buf",      f); break;
ANCHOR_BEGIN_BUF 3246 regexec.c          else if (reg->anchor & ANCHOR_BEGIN_BUF) {
ANCHOR_BEGIN_BUF 2998 regparse.c           tok->u.subtype = ANCHOR_BEGIN_BUF;
ANCHOR_BEGIN_BUF 3351 regparse.c     			? ANCHOR_BEGIN_BUF : ANCHOR_BEGIN_LINE);


ANCHOR_BEGIN_LINE

ANCHOR_BEGIN_LINE 1145 regcomp.c        case ANCHOR_BEGIN_LINE:     r = add_opcode(reg, OP_BEGIN_LINE);     break;
ANCHOR_BEGIN_LINE 3266 regcomp.c      ( ANCHOR_LOOK_BEHIND | ANCHOR_BEGIN_LINE | ANCHOR_END_LINE | ANCHOR_BEGIN_BUF )
ANCHOR_BEGIN_LINE 3268 regcomp.c      ( ANCHOR_LOOK_BEHIND_NOT | ANCHOR_BEGIN_LINE | ANCHOR_END_LINE | ANCHOR_BEGIN_BUF )
ANCHOR_BEGIN_LINE 4112 regcomp.c          case ANCHOR_BEGIN_LINE:
ANCHOR_BEGIN_LINE 4319 regcomp.c          if (e->anc.left_anchor & ANCHOR_BEGIN_LINE)
ANCHOR_BEGIN_LINE 4368 regcomp.c        reg->sub_anchor |= anc->left_anchor  & ANCHOR_BEGIN_LINE;
ANCHOR_BEGIN_LINE 4420 regcomp.c          reg->sub_anchor |= opt.anc.left_anchor & ANCHOR_BEGIN_LINE;
ANCHOR_BEGIN_LINE 4476 regcomp.c        if (anchor & ANCHOR_BEGIN_LINE) {
ANCHOR_BEGIN_LINE 5455 regcomp.c          case ANCHOR_BEGIN_LINE:     fputs("begin line",     f); break;
ANCHOR_BEGIN_LINE 3016 regexec.c            case ANCHOR_BEGIN_LINE:
ANCHOR_BEGIN_LINE 3133 regexec.c            case ANCHOR_BEGIN_LINE:
ANCHOR_BEGIN_LINE 3351 regparse.c     			? ANCHOR_BEGIN_BUF : ANCHOR_BEGIN_LINE);


ANCHOR_BEGIN_POSITION

ANCHOR_BEGIN_POSITION 1148 regcomp.c        case ANCHOR_BEGIN_POSITION: r = add_opcode(reg, OP_BEGIN_POSITION); break;
ANCHOR_BEGIN_POSITION 4111 regcomp.c          case ANCHOR_BEGIN_POSITION:
ANCHOR_BEGIN_POSITION 4394 regcomp.c              ANCHOR_BEGIN_POSITION | ANCHOR_ANYCHAR_STAR | ANCHOR_ANYCHAR_STAR_PL);
ANCHOR_BEGIN_POSITION 4481 regcomp.c        if (anchor & ANCHOR_BEGIN_POSITION) {
ANCHOR_BEGIN_POSITION 5458 regcomp.c          case ANCHOR_BEGIN_POSITION: fputs("begin position", f); break;
ANCHOR_BEGIN_POSITION 3238 regexec.c          if (reg->anchor & ANCHOR_BEGIN_POSITION) {
ANCHOR_BEGIN_POSITION 3017 regparse.c           tok->u.subtype = ANCHOR_BEGIN_POSITION;


ANCHOR_END_BUF

ANCHOR_END_BUF   1144 regcomp.c        case ANCHOR_END_BUF:        r = add_opcode(reg, OP_END_BUF);        break;
ANCHOR_END_BUF   3542 regcomp.c        if (anc == ANCHOR_END_BUF || anc == ANCHOR_SEMI_END_BUF ||
ANCHOR_END_BUF   4113 regcomp.c          case ANCHOR_END_BUF:
ANCHOR_END_BUF   4396 regcomp.c        reg->anchor |= opt.anc.right_anchor & (ANCHOR_END_BUF | ANCHOR_SEMI_END_BUF);
ANCHOR_END_BUF   4398 regcomp.c        if (reg->anchor & (ANCHOR_END_BUF | ANCHOR_SEMI_END_BUF)) {
ANCHOR_END_BUF   4486 regcomp.c        if (anchor & ANCHOR_END_BUF) {
ANCHOR_END_BUF   5454 regcomp.c          case ANCHOR_END_BUF:        fputs("end buf",        f); break;
ANCHOR_END_BUF   3261 regexec.c          else if (reg->anchor & ANCHOR_END_BUF) {
ANCHOR_END_BUF   3011 regparse.c           tok->u.subtype = ANCHOR_END_BUF;
ANCHOR_END_BUF   3358 regparse.c     			? ANCHOR_END_BUF : ANCHOR_END_LINE);
ANCHOR_END_BUF     71 regparse.h     #define ANCHOR_END_BUF_MASK      (ANCHOR_END_BUF | ANCHOR_SEMI_END_BUF)


ANCHOR_END_LINE

ANCHOR_END_LINE  1146 regcomp.c        case ANCHOR_END_LINE:       r = add_opcode(reg, OP_END_LINE);       break;
ANCHOR_END_LINE  3266 regcomp.c      ( ANCHOR_LOOK_BEHIND | ANCHOR_BEGIN_LINE | ANCHOR_END_LINE | ANCHOR_BEGIN_BUF )
ANCHOR_END_LINE  3268 regcomp.c      ( ANCHOR_LOOK_BEHIND_NOT | ANCHOR_BEGIN_LINE | ANCHOR_END_LINE | ANCHOR_BEGIN_BUF )
ANCHOR_END_LINE  3543 regcomp.c            anc == ANCHOR_END_LINE || anc == ANCHOR_PREC_READ ||
ANCHOR_END_LINE  4115 regcomp.c          case ANCHOR_END_LINE:
ANCHOR_END_LINE  4369 regcomp.c        reg->sub_anchor |= anc->right_anchor & ANCHOR_END_LINE;
ANCHOR_END_LINE  4422 regcomp.c            reg->sub_anchor |= opt.anc.right_anchor & ANCHOR_END_LINE;
ANCHOR_END_LINE  4496 regcomp.c        if (anchor & ANCHOR_END_LINE) {
ANCHOR_END_LINE  5456 regcomp.c          case ANCHOR_END_LINE:       fputs("end line",       f); break;
ANCHOR_END_LINE  3025 regexec.c            case ANCHOR_END_LINE:
ANCHOR_END_LINE  3143 regexec.c            case ANCHOR_END_LINE:
ANCHOR_END_LINE  3358 regparse.c     			? ANCHOR_END_BUF : ANCHOR_END_LINE);


ANCHOR_LOOK_BEHIND

ANCHOR_LOOK_BEHIND 1122 regcomp.c        case ANCHOR_LOOK_BEHIND:
ANCHOR_LOOK_BEHIND 1175 regcomp.c        case ANCHOR_LOOK_BEHIND:
ANCHOR_LOOK_BEHIND 2527 regcomp.c            case ANCHOR_LOOK_BEHIND:
ANCHOR_LOOK_BEHIND 2583 regcomp.c            case ANCHOR_LOOK_BEHIND:
ANCHOR_LOOK_BEHIND 2638 regcomp.c            case ANCHOR_LOOK_BEHIND:
ANCHOR_LOOK_BEHIND 2707 regcomp.c            case ANCHOR_LOOK_BEHIND:
ANCHOR_LOOK_BEHIND 2831 regcomp.c            case ANCHOR_LOOK_BEHIND:
ANCHOR_LOOK_BEHIND 3266 regcomp.c      ( ANCHOR_LOOK_BEHIND | ANCHOR_BEGIN_LINE | ANCHOR_END_LINE | ANCHOR_BEGIN_BUF )
ANCHOR_LOOK_BEHIND 3272 regcomp.c            case ANCHOR_LOOK_BEHIND:
ANCHOR_LOOK_BEHIND 4139 regcomp.c          case ANCHOR_LOOK_BEHIND: /* Sorry, I can't make use of it. */
ANCHOR_LOOK_BEHIND 5468 regcomp.c          case ANCHOR_LOOK_BEHIND:     fputs("look_behind",    f); break;
ANCHOR_LOOK_BEHIND 4283 regparse.c     	*np = onig_node_new_anchor(ANCHOR_LOOK_BEHIND);


ANCHOR_LOOK_BEHIND_NOT

ANCHOR_LOOK_BEHIND_NOT 1125 regcomp.c        case ANCHOR_LOOK_BEHIND_NOT:
ANCHOR_LOOK_BEHIND_NOT 1192 regcomp.c        case ANCHOR_LOOK_BEHIND_NOT:
ANCHOR_LOOK_BEHIND_NOT 2528 regcomp.c            case ANCHOR_LOOK_BEHIND_NOT:
ANCHOR_LOOK_BEHIND_NOT 2584 regcomp.c            case ANCHOR_LOOK_BEHIND_NOT:
ANCHOR_LOOK_BEHIND_NOT 2639 regcomp.c            case ANCHOR_LOOK_BEHIND_NOT:
ANCHOR_LOOK_BEHIND_NOT 2708 regcomp.c            case ANCHOR_LOOK_BEHIND_NOT:
ANCHOR_LOOK_BEHIND_NOT 2832 regcomp.c            case ANCHOR_LOOK_BEHIND_NOT:
ANCHOR_LOOK_BEHIND_NOT 2873 regcomp.c        if (anc_type == ANCHOR_LOOK_BEHIND_NOT) {
ANCHOR_LOOK_BEHIND_NOT 3268 regcomp.c      ( ANCHOR_LOOK_BEHIND_NOT | ANCHOR_BEGIN_LINE | ANCHOR_END_LINE | ANCHOR_BEGIN_BUF )
ANCHOR_LOOK_BEHIND_NOT 3284 regcomp.c            case ANCHOR_LOOK_BEHIND_NOT:
ANCHOR_LOOK_BEHIND_NOT 4140 regcomp.c          case ANCHOR_LOOK_BEHIND_NOT:
ANCHOR_LOOK_BEHIND_NOT 5469 regcomp.c          case ANCHOR_LOOK_BEHIND_NOT: fputs("look_behind_not",f); break;
ANCHOR_LOOK_BEHIND_NOT 4285 regparse.c     	*np = onig_node_new_anchor(ANCHOR_LOOK_BEHIND_NOT);


ANCHOR_NOT_WORD_BOUND

ANCHOR_NOT_WORD_BOUND 1151 regcomp.c        case ANCHOR_NOT_WORD_BOUND: r = add_opcode(reg, OP_NOT_WORD_BOUND); break;
ANCHOR_NOT_WORD_BOUND 5461 regcomp.c          case ANCHOR_NOT_WORD_BOUND:  fputs("not word bound", f); break;
ANCHOR_NOT_WORD_BOUND 2941 regparse.c           tok->u.anchor = ANCHOR_NOT_WORD_BOUND;


ANCHOR_PREC_READ

ANCHOR_PREC_READ 1116 regcomp.c        case ANCHOR_PREC_READ:
ANCHOR_PREC_READ 1157 regcomp.c        case ANCHOR_PREC_READ:
ANCHOR_PREC_READ 2413 regcomp.c          if (NANCHOR(node).type == ANCHOR_PREC_READ)
ANCHOR_PREC_READ 2525 regcomp.c            case ANCHOR_PREC_READ:
ANCHOR_PREC_READ 2581 regcomp.c            case ANCHOR_PREC_READ:
ANCHOR_PREC_READ 2636 regcomp.c            case ANCHOR_PREC_READ:
ANCHOR_PREC_READ 2705 regcomp.c            case ANCHOR_PREC_READ:
ANCHOR_PREC_READ 2829 regcomp.c            case ANCHOR_PREC_READ:
ANCHOR_PREC_READ 3250 regcomp.c            case ANCHOR_PREC_READ:
ANCHOR_PREC_READ 3543 regcomp.c            anc == ANCHOR_END_LINE || anc == ANCHOR_PREC_READ ||
ANCHOR_PREC_READ 4119 regcomp.c          case ANCHOR_PREC_READ:
ANCHOR_PREC_READ 5466 regcomp.c          case ANCHOR_PREC_READ:       fputs("prec read",      f); break;
ANCHOR_PREC_READ 4271 regparse.c           *np = onig_node_new_anchor(ANCHOR_PREC_READ);


ANCHOR_PREC_READ_NOT

ANCHOR_PREC_READ_NOT 1119 regcomp.c        case ANCHOR_PREC_READ_NOT:
ANCHOR_PREC_READ_NOT 1165 regcomp.c        case ANCHOR_PREC_READ_NOT:
ANCHOR_PREC_READ_NOT 2526 regcomp.c            case ANCHOR_PREC_READ_NOT:
ANCHOR_PREC_READ_NOT 2582 regcomp.c            case ANCHOR_PREC_READ_NOT:
ANCHOR_PREC_READ_NOT 2637 regcomp.c            case ANCHOR_PREC_READ_NOT:
ANCHOR_PREC_READ_NOT 2706 regcomp.c            case ANCHOR_PREC_READ_NOT:
ANCHOR_PREC_READ_NOT 2830 regcomp.c            case ANCHOR_PREC_READ_NOT:
ANCHOR_PREC_READ_NOT 3253 regcomp.c            case ANCHOR_PREC_READ_NOT:
ANCHOR_PREC_READ_NOT 3544 regcomp.c            anc == ANCHOR_PREC_READ_NOT)
ANCHOR_PREC_READ_NOT 4138 regcomp.c          case ANCHOR_PREC_READ_NOT:
ANCHOR_PREC_READ_NOT 5467 regcomp.c          case ANCHOR_PREC_READ_NOT:   fputs("prec read not",  f); break;
ANCHOR_PREC_READ_NOT 4274 regparse.c           *np = onig_node_new_anchor(ANCHOR_PREC_READ_NOT);


ANCHOR_SEMI_END_BUF

ANCHOR_SEMI_END_BUF 1147 regcomp.c        case ANCHOR_SEMI_END_BUF:   r = add_opcode(reg, OP_SEMI_END_BUF);   break;
ANCHOR_SEMI_END_BUF 3542 regcomp.c        if (anc == ANCHOR_END_BUF || anc == ANCHOR_SEMI_END_BUF ||
ANCHOR_SEMI_END_BUF 4114 regcomp.c          case ANCHOR_SEMI_END_BUF:
ANCHOR_SEMI_END_BUF 4396 regcomp.c        reg->anchor |= opt.anc.right_anchor & (ANCHOR_END_BUF | ANCHOR_SEMI_END_BUF);
ANCHOR_SEMI_END_BUF 4398 regcomp.c        if (reg->anchor & (ANCHOR_END_BUF | ANCHOR_SEMI_END_BUF)) {
ANCHOR_SEMI_END_BUF 4491 regcomp.c        if (anchor & ANCHOR_SEMI_END_BUF) {
ANCHOR_SEMI_END_BUF 5457 regcomp.c          case ANCHOR_SEMI_END_BUF:   fputs("semi end buf",   f); break;
ANCHOR_SEMI_END_BUF 3294 regexec.c          else if (reg->anchor & ANCHOR_SEMI_END_BUF) {
ANCHOR_SEMI_END_BUF 3004 regparse.c           tok->u.subtype = ANCHOR_SEMI_END_BUF;
ANCHOR_SEMI_END_BUF   71 regparse.h     #define ANCHOR_END_BUF_MASK      (ANCHOR_END_BUF | ANCHOR_SEMI_END_BUF)


ANCHOR_WORD_BEGIN

ANCHOR_WORD_BEGIN 1153 regcomp.c        case ANCHOR_WORD_BEGIN:     r = add_opcode(reg, OP_WORD_BEGIN);     break;
ANCHOR_WORD_BEGIN 5463 regcomp.c          case ANCHOR_WORD_BEGIN:      fputs("word begin", f);     break;
ANCHOR_WORD_BEGIN 2948 regparse.c           tok->u.anchor = ANCHOR_WORD_BEGIN;


ANCHOR_WORD_BOUND

ANCHOR_WORD_BOUND 1150 regcomp.c        case ANCHOR_WORD_BOUND:     r = add_opcode(reg, OP_WORD_BOUND);     break;
ANCHOR_WORD_BOUND 5460 regcomp.c          case ANCHOR_WORD_BOUND:      fputs("word bound",     f); break;
ANCHOR_WORD_BOUND 2935 regparse.c           tok->u.anchor = ANCHOR_WORD_BOUND;


ANCHOR_WORD_END

ANCHOR_WORD_END  1154 regcomp.c        case ANCHOR_WORD_END:       r = add_opcode(reg, OP_WORD_END);       break;
ANCHOR_WORD_END  5464 regcomp.c          case ANCHOR_WORD_END:        fputs("word end", f);       break;
ANCHOR_WORD_END  2954 regparse.c           tok->u.anchor = ANCHOR_WORD_END;


ANSI_C_PROTOTYPE

ANSI_C_PROTOTYPE  267 ext/nkf/nkf-utf8/nkf.c #ifdef ANSI_C_PROTOTYPE
ANSI_C_PROTOTYPE 1375 ext/nkf/nkf-utf8/nkf.c #ifdef ANSI_C_PROTOTYPE
ANSI_C_PROTOTYPE 1394 ext/nkf/nkf-utf8/nkf.c #ifdef ANSI_C_PROTOTYPE
ANSI_C_PROTOTYPE 3836 ext/nkf/nkf-utf8/nkf.c #ifdef ANSI_C_PROTOTYPE


ANY

ANY               305 ext/socket/getaddrinfo.c 	pai->ai_socktype = ANY;
ANY               306 ext/socket/getaddrinfo.c 	pai->ai_protocol = ANY;
ANY               311 ext/socket/getaddrinfo.c 	port = ANY;
ANY               334 ext/socket/getaddrinfo.c 		case ANY:
ANY               336 ext/socket/getaddrinfo.c 			case ANY:
ANY               357 ext/socket/getaddrinfo.c 			    pai->ai_protocol != ANY)
ANY               363 ext/socket/getaddrinfo.c 			    pai->ai_protocol != ANY)
ANY               378 ext/socket/getaddrinfo.c 			if (pai->ai_socktype == ANY) {
ANY               390 ext/socket/getaddrinfo.c 			case ANY:
ANY               406 ext/socket/getaddrinfo.c 			if (pai->ai_socktype == ANY)


ANYARGS

ANYARGS           731 class.c        rb_define_method_id(VALUE klass, ID name, VALUE (*func)(ANYARGS), int argc)
ANYARGS           737 class.c        rb_define_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc)
ANYARGS           743 class.c        rb_define_protected_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc)
ANYARGS           749 class.c        rb_define_private_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc)
ANYARGS           802 class.c        rb_define_singleton_method(VALUE obj, const char *name, VALUE (*func)(ANYARGS), int argc)
ANYARGS           808 class.c        rb_define_module_function(VALUE module, const char *name, VALUE (*func)(ANYARGS), int argc)
ANYARGS           815 class.c        rb_define_global_function(const char *name, VALUE (*func)(ANYARGS), int argc)
ANYARGS          5103 eval.c         rb_iterate(VALUE (*it_proc)(VALUE), VALUE data1, VALUE (*bl_proc)(ANYARGS), VALUE data2)
ANYARGS          5164 eval.c         rb_rescue2(VALUE (*b_proc)(ANYARGS), VALUE data1, VALUE (*r_proc)(ANYARGS), VALUE data2, ...)
ANYARGS          5213 eval.c         rb_rescue(VALUE (*b_proc)(ANYARGS), VALUE data1, VALUE (*r_proc)(ANYARGS), VALUE data2)
ANYARGS          5247 eval.c         rb_ensure(VALUE (*b_proc)(ANYARGS), VALUE data1, VALUE (*e_proc)(ANYARGS), VALUE data2)
ANYARGS          5266 eval.c         rb_with_disable_interrupt(VALUE (*proc)(ANYARGS), VALUE data)
ANYARGS          5420 eval.c         call_cfunc(VALUE (*func)(ANYARGS), VALUE recv, int len, int argc, const VALUE *argv)
ANYARGS          9209 eval.c             VALUE (*func)(ANYARGS), /* VALUE yieldarg[, VALUE procarg] */
ANYARGS          11701 eval.c         rb_thread_start_0(VALUE (*fn)(ANYARGS), VALUE arg, rb_thread_t th)
ANYARGS          11867 eval.c         rb_thread_create(VALUE (*fn)(ANYARGS), void *arg)
ANYARGS          12961 eval.c         rb_catch(const char *tag, VALUE (*func)(ANYARGS), VALUE data)
ANYARGS          4225 file.c         define_filetest_function(const char *name, VALUE (*func)(ANYARGS), int argc)
ANYARGS           122 hash.c         st_foreach_safe(st_table *table, int (*func)(ANYARGS), st_data_t a)
ANYARGS           188 hash.c         rb_hash_foreach(VALUE hash, int (*func)(ANYARGS), VALUE farg)
ANYARGS           132 intern.h       void rb_define_method_id(VALUE, ID, VALUE (*)(ANYARGS), int);
ANYARGS           135 intern.h       void rb_define_protected_method(VALUE, const char*, VALUE (*)(ANYARGS), int);
ANYARGS           136 intern.h       void rb_define_private_method(VALUE, const char*, VALUE (*)(ANYARGS), int);
ANYARGS           137 intern.h       void rb_define_singleton_method(VALUE, const char*, VALUE(*)(ANYARGS), int);
ANYARGS           241 intern.h       VALUE rb_proc_new(VALUE (*)(ANYARGS/* VALUE yieldarg[, VALUE procarg] */), VALUE);
ANYARGS           271 intern.h       VALUE rb_thread_create(VALUE (*)(ANYARGS), void*);
ANYARGS           315 intern.h       void st_foreach_safe(struct st_table *, int (*)(ANYARGS), unsigned long);
ANYARGS           316 intern.h       void rb_hash_foreach(VALUE, int (*)(ANYARGS), VALUE);
ANYARGS           137 node.h         	VALUE (*cfunc)(ANYARGS);
ANYARGS           510 ruby.h         void rb_define_virtual_variable(const char*,VALUE(*)(ANYARGS),void(*)(ANYARGS));
ANYARGS           511 ruby.h         void rb_define_hooked_variable(const char*,VALUE*,VALUE(*)(ANYARGS),void(*)(ANYARGS));
ANYARGS           516 ruby.h         #define RUBY_METHOD_FUNC(func) ((VALUE (*)(ANYARGS))func)
ANYARGS           517 ruby.h         void rb_define_method(VALUE,const char*,VALUE(*)(ANYARGS),int);
ANYARGS           518 ruby.h         void rb_define_module_function(VALUE,const char*,VALUE(*)(ANYARGS),int);
ANYARGS           519 ruby.h         void rb_define_global_function(const char*,VALUE(*)(ANYARGS),int);
ANYARGS           577 ruby.h         VALUE rb_iterate(VALUE(*)(VALUE),VALUE,VALUE(*)(ANYARGS),VALUE);
ANYARGS           578 ruby.h         VALUE rb_rescue(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE);
ANYARGS           579 ruby.h         VALUE rb_rescue2(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE,...);
ANYARGS           580 ruby.h         VALUE rb_ensure(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE);
ANYARGS           581 ruby.h         VALUE rb_catch(const char*,VALUE(*)(ANYARGS),VALUE);
ANYARGS            75 rubysig.h      VALUE rb_with_disable_interrupt(VALUE(*)(ANYARGS),VALUE);
ANYARGS           447 st.c           st_foreach(st_table *table, int (*func)(ANYARGS), st_data_t arg)
ANYARGS            33 st.h           #ifndef ANYARGS
ANYARGS            51 st.h           int st_foreach(st_table *, int (*)(ANYARGS), st_data_t);
ANYARGS           451 variable.c         VALUE (*getter)(ANYARGS),
ANYARGS           452 variable.c         void  (*setter)(ANYARGS))
ANYARGS           479 variable.c         VALUE (*getter)(ANYARGS),
ANYARGS           480 variable.c         void  (*setter)(ANYARGS))


AREF

AREF              409 ext/racc/cparse/cparse.c     *tok = AREF(block_args, 0);
AREF              410 ext/racc/cparse/cparse.c     *val = AREF(block_args, 1);
AREF              449 ext/racc/cparse/cparse.c         tmp = AREF(v->action_pointer, v->curstate);
AREF              485 ext/racc/cparse/cparse.c         act_value = AREF(v->action_table, i);
AREF              490 ext/racc/cparse/cparse.c         tmp = AREF(v->action_check, i);
AREF              502 ext/racc/cparse/cparse.c         act_value = AREF(v->action_default, v->curstate);
AREF              572 ext/racc/cparse/cparse.c         tmp = AREF(v->action_pointer, v->curstate);
AREF              580 ext/racc/cparse/cparse.c         act_value = AREF(v->action_table, i);
AREF              588 ext/racc/cparse/cparse.c         tmp = AREF(v->action_check, i);
AREF              742 ext/racc/cparse/cparse.c     tmp = AREF(v->goto_pointer, k1);
AREF              749 ext/racc/cparse/cparse.c     goto_state = AREF(v->goto_table, i);
AREF              756 ext/racc/cparse/cparse.c     tmp = AREF(v->goto_check, i);
AREF              776 ext/racc/cparse/cparse.c     goto_state = AREF(v->goto_default, k1);


ARGF_FORWARD

ARGF_FORWARD     4066 io.c                ARGF_FORWARD(argc, argv);\
ARGF_FORWARD     4315 io.c               ARGF_FORWARD(argc, argv);
ARGF_FORWARD     5045 io.c               ARGF_FORWARD(0, 0);
ARGF_FORWARD     5055 io.c               ARGF_FORWARD(argc, argv);
ARGF_FORWARD     5065 io.c               ARGF_FORWARD(1, &offset);
ARGF_FORWARD     5075 io.c               ARGF_FORWARD(0, 0);
ARGF_FORWARD     5085 io.c               ARGF_FORWARD(0, 0);
ARGF_FORWARD     5093 io.c               ARGF_FORWARD(0, 0);
ARGF_FORWARD     5102 io.c           	ARGF_FORWARD(0, 0);
ARGF_FORWARD     5285 io.c               ARGF_FORWARD(0, 0);
ARGF_FORWARD     5316 io.c               ARGF_FORWARD(0, 0);


ARG_ABSADDR

ARG_ABSADDR      5095 regcomp.c        { OP_CALL,                 "call",            ARG_ABSADDR },
ARG_ABSADDR      5169 regcomp.c          case ARG_ABSADDR:


ARG_LEVEL

ARG_LEVEL        1152 ext/zlib/zlib.c     err = deflateInit2(&z->stream, ARG_LEVEL(level), Z_DEFLATED,
ARG_LEVEL        1226 ext/zlib/zlib.c     lev = ARG_LEVEL(level);
ARG_LEVEL        1354 ext/zlib/zlib.c     level = ARG_LEVEL(v_level);
ARG_LEVEL        2792 ext/zlib/zlib.c     gz->level = ARG_LEVEL(level);


ARG_MEMNUM

ARG_MEMNUM       5058 regcomp.c        { OP_BACKREFN,          "backrefn",        ARG_MEMNUM  },
ARG_MEMNUM       5062 regcomp.c        { OP_MEMORY_START_PUSH, "mem-start-push",  ARG_MEMNUM  },
ARG_MEMNUM       5063 regcomp.c        { OP_MEMORY_START,      "mem-start",       ARG_MEMNUM  },
ARG_MEMNUM       5064 regcomp.c        { OP_MEMORY_END_PUSH,     "mem-end-push",     ARG_MEMNUM  },
ARG_MEMNUM       5065 regcomp.c        { OP_MEMORY_END_PUSH_REC, "mem-end-push-rec", ARG_MEMNUM  },
ARG_MEMNUM       5066 regcomp.c        { OP_MEMORY_END,          "mem-end",          ARG_MEMNUM  },
ARG_MEMNUM       5067 regcomp.c        { OP_MEMORY_END_REC,      "mem-end-rec",      ARG_MEMNUM  },
ARG_MEMNUM       5078 regcomp.c        { OP_REPEAT_INC,        "repeat-inc",      ARG_MEMNUM  },
ARG_MEMNUM       5079 regcomp.c        { OP_REPEAT_INC_NG,     "repeat-inc-ng",   ARG_MEMNUM  },
ARG_MEMNUM       5080 regcomp.c        { OP_REPEAT_INC_SG,     "repeat-inc-sg",    ARG_MEMNUM  },
ARG_MEMNUM       5081 regcomp.c        { OP_REPEAT_INC_NG_SG,  "repeat-inc-ng-sg", ARG_MEMNUM  },
ARG_MEMNUM       5082 regcomp.c        { OP_NULL_CHECK_START,  "null-check-start",ARG_MEMNUM  },
ARG_MEMNUM       5083 regcomp.c        { OP_NULL_CHECK_END,    "null-check-end",  ARG_MEMNUM  },
ARG_MEMNUM       5084 regcomp.c        { OP_NULL_CHECK_END_MEMST,"null-check-end-memst",  ARG_MEMNUM  },
ARG_MEMNUM       5085 regcomp.c        { OP_NULL_CHECK_END_MEMST_PUSH,"null-check-end-memst-push",  ARG_MEMNUM  },
ARG_MEMNUM       5177 regcomp.c          case ARG_MEMNUM:


ARG_NON

ARG_NON          5012 regcomp.c        { OP_FINISH,            "finish",          ARG_NON },
ARG_NON          5013 regcomp.c        { OP_END,               "end",             ARG_NON },
ARG_NON          5035 regcomp.c        { OP_ANYCHAR,           "anychar",         ARG_NON },
ARG_NON          5036 regcomp.c        { OP_ANYCHAR_ML,        "anychar-ml",      ARG_NON },
ARG_NON          5037 regcomp.c        { OP_ANYCHAR_STAR,      "anychar*",        ARG_NON },
ARG_NON          5038 regcomp.c        { OP_ANYCHAR_ML_STAR,   "anychar-ml*",     ARG_NON },
ARG_NON          5041 regcomp.c        { OP_WORD,              "word",            ARG_NON },
ARG_NON          5042 regcomp.c        { OP_NOT_WORD,          "not-word",        ARG_NON },
ARG_NON          5043 regcomp.c        { OP_WORD_SB,           "word-sb",         ARG_NON },
ARG_NON          5044 regcomp.c        { OP_WORD_MB,           "word-mb",         ARG_NON },
ARG_NON          5045 regcomp.c        { OP_WORD_BOUND,        "word-bound",      ARG_NON },
ARG_NON          5046 regcomp.c        { OP_NOT_WORD_BOUND,    "not-word-bound",  ARG_NON },
ARG_NON          5047 regcomp.c        { OP_WORD_BEGIN,        "word-begin",      ARG_NON },
ARG_NON          5048 regcomp.c        { OP_WORD_END,          "word-end",        ARG_NON },
ARG_NON          5049 regcomp.c        { OP_BEGIN_BUF,         "begin-buf",       ARG_NON },
ARG_NON          5050 regcomp.c        { OP_END_BUF,           "end-buf",         ARG_NON },
ARG_NON          5051 regcomp.c        { OP_BEGIN_LINE,        "begin-line",      ARG_NON },
ARG_NON          5052 regcomp.c        { OP_END_LINE,          "end-line",        ARG_NON },
ARG_NON          5053 regcomp.c        { OP_SEMI_END_BUF,      "semi-end-buf",    ARG_NON },
ARG_NON          5054 regcomp.c        { OP_BEGIN_POSITION,    "begin-position",  ARG_NON },
ARG_NON          5055 regcomp.c        { OP_BACKREF1,          "backref1",        ARG_NON },
ARG_NON          5056 regcomp.c        { OP_BACKREF2,          "backref2",        ARG_NON },
ARG_NON          5057 regcomp.c        { OP_BACKREF3,          "backref3",        ARG_NON },
ARG_NON          5070 regcomp.c        { OP_FAIL,              "fail",            ARG_NON },
ARG_NON          5073 regcomp.c        { OP_POP,               "pop",             ARG_NON },
ARG_NON          5086 regcomp.c        { OP_PUSH_POS,          "push-pos",        ARG_NON },
ARG_NON          5087 regcomp.c        { OP_POP_POS,           "pop-pos",         ARG_NON },
ARG_NON          5089 regcomp.c        { OP_FAIL_POS,          "fail-pos",        ARG_NON },
ARG_NON          5090 regcomp.c        { OP_PUSH_STOP_BT,      "push-stop-bt",    ARG_NON },
ARG_NON          5091 regcomp.c        { OP_POP_STOP_BT,       "pop-stop-bt",     ARG_NON },
ARG_NON          5094 regcomp.c        { OP_FAIL_LOOK_BEHIND_NOT, "fail-look-behind-not", ARG_NON },
ARG_NON          5096 regcomp.c        { OP_RETURN,               "return",          ARG_NON },
ARG_NON          5097 regcomp.c        { -1, "", ARG_NON }
ARG_NON          5163 regcomp.c          case ARG_NON:


ARG_OPTION

ARG_OPTION       5068 regcomp.c        { OP_SET_OPTION_PUSH,   "set-option-push", ARG_OPTION  },
ARG_OPTION       5069 regcomp.c        { OP_SET_OPTION,        "set-option",      ARG_OPTION  },
ARG_OPTION       5182 regcomp.c          case ARG_OPTION:


ARG_RELADDR

ARG_RELADDR      5071 regcomp.c        { OP_JUMP,              "jump",            ARG_RELADDR },
ARG_RELADDR      5072 regcomp.c        { OP_PUSH,              "push",            ARG_RELADDR },
ARG_RELADDR      5088 regcomp.c        { OP_PUSH_POS_NOT,      "push-pos-not",    ARG_RELADDR },
ARG_RELADDR      5165 regcomp.c          case ARG_RELADDR:


ARG_SPECIAL

ARG_SPECIAL      5014 regcomp.c        { OP_EXACT1,            "exact1",          ARG_SPECIAL },
ARG_SPECIAL      5015 regcomp.c        { OP_EXACT2,            "exact2",          ARG_SPECIAL },
ARG_SPECIAL      5016 regcomp.c        { OP_EXACT3,            "exact3",          ARG_SPECIAL },
ARG_SPECIAL      5017 regcomp.c        { OP_EXACT4,            "exact4",          ARG_SPECIAL },
ARG_SPECIAL      5018 regcomp.c        { OP_EXACT5,            "exact5",          ARG_SPECIAL },
ARG_SPECIAL      5019 regcomp.c        { OP_EXACTN,            "exactn",          ARG_SPECIAL },
ARG_SPECIAL      5020 regcomp.c        { OP_EXACTMB2N1,        "exactmb2-n1",     ARG_SPECIAL },
ARG_SPECIAL      5021 regcomp.c        { OP_EXACTMB2N2,        "exactmb2-n2",     ARG_SPECIAL },
ARG_SPECIAL      5022 regcomp.c        { OP_EXACTMB2N3,        "exactmb2-n3",     ARG_SPECIAL },
ARG_SPECIAL      5023 regcomp.c        { OP_EXACTMB2N,         "exactmb2-n",      ARG_SPECIAL },
ARG_SPECIAL      5024 regcomp.c        { OP_EXACTMB3N,         "exactmb3n"  ,     ARG_SPECIAL },
ARG_SPECIAL      5025 regcomp.c        { OP_EXACTMBN,          "exactmbn",        ARG_SPECIAL },
ARG_SPECIAL      5026 regcomp.c        { OP_EXACT1_IC,         "exact1-ic",       ARG_SPECIAL },
ARG_SPECIAL      5027 regcomp.c        { OP_EXACTN_IC,         "exactn-ic",       ARG_SPECIAL },
ARG_SPECIAL      5028 regcomp.c        { OP_CCLASS,            "cclass",          ARG_SPECIAL },
ARG_SPECIAL      5029 regcomp.c        { OP_CCLASS_MB,         "cclass-mb",       ARG_SPECIAL },
ARG_SPECIAL      5030 regcomp.c        { OP_CCLASS_MIX,        "cclass-mix",      ARG_SPECIAL },
ARG_SPECIAL      5031 regcomp.c        { OP_CCLASS_NOT,        "cclass-not",      ARG_SPECIAL },
ARG_SPECIAL      5032 regcomp.c        { OP_CCLASS_MB_NOT,     "cclass-mb-not",   ARG_SPECIAL },
ARG_SPECIAL      5033 regcomp.c        { OP_CCLASS_MIX_NOT,    "cclass-mix-not",  ARG_SPECIAL },
ARG_SPECIAL      5034 regcomp.c        { OP_CCLASS_NODE,       "cclass-node",     ARG_SPECIAL },
ARG_SPECIAL      5039 regcomp.c        { OP_ANYCHAR_STAR_PEEK_NEXT, "anychar*-peek-next", ARG_SPECIAL },
ARG_SPECIAL      5040 regcomp.c        { OP_ANYCHAR_ML_STAR_PEEK_NEXT, "anychar-ml*-peek-next", ARG_SPECIAL },
ARG_SPECIAL      5059 regcomp.c        { OP_BACKREFN_IC,       "backrefn-ic",     ARG_SPECIAL },
ARG_SPECIAL      5060 regcomp.c        { OP_BACKREF_MULTI,     "backref_multi",   ARG_SPECIAL },
ARG_SPECIAL      5061 regcomp.c        { OP_BACKREF_MULTI_IC,  "backref_multi-ic",ARG_SPECIAL },
ARG_SPECIAL      5074 regcomp.c        { OP_PUSH_OR_JUMP_EXACT1, "push-or-jump-e1", ARG_SPECIAL },
ARG_SPECIAL      5075 regcomp.c        { OP_PUSH_IF_PEEK_NEXT, "push-if-peek-next", ARG_SPECIAL },
ARG_SPECIAL      5076 regcomp.c        { OP_REPEAT,            "repeat",          ARG_SPECIAL },
ARG_SPECIAL      5077 regcomp.c        { OP_REPEAT_NG,         "repeat-ng",       ARG_SPECIAL },
ARG_SPECIAL      5092 regcomp.c        { OP_LOOK_BEHIND,       "look-behind",     ARG_SPECIAL },
ARG_SPECIAL      5093 regcomp.c        { OP_PUSH_LOOK_BEHIND_NOT, "push-look-behind-not", ARG_SPECIAL },
ARG_SPECIAL      5121 regcomp.c        return ARG_SPECIAL;
ARG_SPECIAL      5160 regcomp.c        if (arg_type != ARG_SPECIAL) {


ARG_STRATEGY

ARG_STRATEGY     1154 ext/zlib/zlib.c 		       ARG_STRATEGY(strategy));
ARG_STRATEGY     1355 ext/zlib/zlib.c     strategy = ARG_STRATEGY(v_strategy);
ARG_STRATEGY     2794 ext/zlib/zlib.c 		       -MAX_WBITS, DEF_MEM_LEVEL, ARG_STRATEGY(strategy));


ARG_WBITS

ARG_WBITS        1153 ext/zlib/zlib.c 		       ARG_WBITS(wbits), ARG_MEMLEVEL(memlevel),
ARG_WBITS        1441 ext/zlib/zlib.c     err = inflateInit2(&z->stream, ARG_WBITS(wbits));


ARY_DEFAULT_SIZE

ARY_DEFAULT_SIZE  134 array.c            return rb_ary_new2(ARY_DEFAULT_SIZE);
ARY_DEFAULT_SIZE  404 array.c        	if (new_capa < ARY_DEFAULT_SIZE) {
ARY_DEFAULT_SIZE  405 array.c        	    new_capa = ARY_DEFAULT_SIZE;
ARY_DEFAULT_SIZE  502 array.c        	    RARRAY(ary)->aux.capa > ARY_DEFAULT_SIZE) {
ARY_DEFAULT_SIZE  596 array.c        	if (capa_inc < ARY_DEFAULT_SIZE) {
ARY_DEFAULT_SIZE  597 array.c        	    capa_inc = ARY_DEFAULT_SIZE;
ARY_DEFAULT_SIZE 1756 array.c        	    RARRAY(ary)->aux.capa > ARY_DEFAULT_SIZE) {
ARY_DEFAULT_SIZE 2067 array.c            if (ARY_DEFAULT_SIZE * 2 < RARRAY(ary)->aux.capa) {
ARY_DEFAULT_SIZE 2068 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, ARY_DEFAULT_SIZE * 2);
ARY_DEFAULT_SIZE 2069 array.c        	RARRAY(ary)->aux.capa = ARY_DEFAULT_SIZE * 2;


ARY_TMPLOCK

ARY_TMPLOCK        48 array.c            if (FL_TEST(ary, ARY_TMPLOCK))
ARY_TMPLOCK        87 array.c            if (FL_TEST(ary, ARY_TMPLOCK)) return Qtrue;
ARY_TMPLOCK      1526 array.c            FL_UNSET(ary, ARY_TMPLOCK);
ARY_TMPLOCK      1551 array.c        	FL_SET(ary, ARY_TMPLOCK);	/* prohibit modification during sort */


ASCII

ASCII             576 ext/nkf/nkf-utf8/nkf.c STATIC int output_mode = ASCII,    /* output kanji mode */
ASCII             577 ext/nkf/nkf-utf8/nkf.c            input_mode =  ASCII,    /* input kanji mode */
ASCII            1951 ext/nkf/nkf-utf8/nkf.c     input_mode = ASCII;
ASCII            1952 ext/nkf/nkf-utf8/nkf.c     output_mode = ASCII;
ASCII            2176 ext/nkf/nkf-utf8/nkf.c                             input_mode = ASCII; shift_mode = FALSE;
ASCII            2179 ext/nkf/nkf-utf8/nkf.c                             input_mode = ASCII; shift_mode = FALSE;
ASCII            2207 ext/nkf/nkf-utf8/nkf.c                 input_mode = ASCII; set_iconv(FALSE, 0);
ASCII            2788 ext/nkf/nkf-utf8/nkf.c 	output_mode = ASCII;
ASCII            2872 ext/nkf/nkf-utf8/nkf.c 	output_mode = ASCII;
ASCII            2995 ext/nkf/nkf-utf8/nkf.c 	output_mode = ASCII;
ASCII            3051 ext/nkf/nkf-utf8/nkf.c         if (output_mode !=ASCII && output_mode!=ISO8859_1) {
ASCII            3055 ext/nkf/nkf-utf8/nkf.c 	    output_mode = ASCII;
ASCII            3085 ext/nkf/nkf-utf8/nkf.c         if (output_mode !=ASCII && output_mode!=ISO8859_1) {
ASCII            3089 ext/nkf/nkf-utf8/nkf.c             output_mode = ASCII;
ASCII            3132 ext/nkf/nkf-utf8/nkf.c             && (input_mode==ASCII || input_mode==X0201)) {
ASCII            3594 ext/nkf/nkf-utf8/nkf.c     ASCII,
ASCII            4166 ext/nkf/nkf-utf8/nkf.c         if (mimebuf_f!=FIXED_MIME) input_mode = ASCII;
ASCII            4170 ext/nkf/nkf-utf8/nkf.c         input_mode = ASCII;
ASCII            4244 ext/nkf/nkf-utf8/nkf.c         if (mimebuf_f!=FIXED_MIME) input_mode = ASCII;
ASCII            4252 ext/nkf/nkf-utf8/nkf.c         if (mimebuf_f!=FIXED_MIME) input_mode = ASCII;
ASCII            4580 ext/nkf/nkf-utf8/nkf.c         if (c <= DEL && (output_mode==ASCII ||output_mode == ISO8859_1 ) ) {
ASCII            4599 ext/nkf/nkf-utf8/nkf.c         if (c <= DEL && (output_mode==ASCII ||output_mode == ISO8859_1)) {
ASCII            4650 ext/nkf/nkf-utf8/nkf.c         if ( c<=DEL && (output_mode==ASCII ||output_mode == ISO8859_1 ) ) {
ASCII            4821 ext/nkf/nkf-utf8/nkf.c     output_mode = ASCII;
ASCII            4822 ext/nkf/nkf-utf8/nkf.c     input_mode =  ASCII;


ASSERT

ASSERT            192 ext/syck/emitter.c     ASSERT( e != NULL );
ASSERT            204 ext/syck/emitter.c     ASSERT( e != NULL );
ASSERT            211 ext/syck/emitter.c     ASSERT( len > e->levels[e->lvl_idx-1].spaces );
ASSERT            288 ext/syck/emitter.c     ASSERT( str != NULL )
ASSERT            166 ext/syck/node.c     ASSERT( n != NULL );
ASSERT            185 ext/syck/node.c     ASSERT( n != NULL );
ASSERT            186 ext/syck/node.c     ASSERT( n->data.list != NULL );
ASSERT            203 ext/syck/node.c     ASSERT( map != NULL );
ASSERT            204 ext/syck/node.c     ASSERT( map->data.pairs != NULL );
ASSERT            224 ext/syck/node.c     ASSERT( map1 != NULL );
ASSERT            225 ext/syck/node.c     ASSERT( map2 != NULL );
ASSERT            254 ext/syck/node.c     ASSERT( map != NULL );
ASSERT            255 ext/syck/node.c     ASSERT( map->data.pairs != NULL );
ASSERT            264 ext/syck/node.c     ASSERT( map != NULL );
ASSERT            266 ext/syck/node.c     ASSERT( m != NULL );
ASSERT            282 ext/syck/node.c     ASSERT( map != NULL );
ASSERT            284 ext/syck/node.c     ASSERT( m != NULL );
ASSERT            310 ext/syck/node.c     ASSERT( n != NULL );
ASSERT            311 ext/syck/node.c     ASSERT( n->data.list != NULL );
ASSERT            326 ext/syck/node.c     ASSERT( arr != NULL );
ASSERT            327 ext/syck/node.c     ASSERT( arr->data.list != NULL );
ASSERT            343 ext/syck/node.c     ASSERT( seq != NULL );
ASSERT            344 ext/syck/node.c     ASSERT( seq->data.list != NULL );
ASSERT            353 ext/syck/node.c     ASSERT( map != NULL );
ASSERT            355 ext/syck/node.c     ASSERT( m != NULL );
ASSERT            364 ext/syck/node.c     ASSERT( seq != NULL );
ASSERT            366 ext/syck/node.c     ASSERT( s != NULL );
ASSERT            138 ext/syck/rubyext.c     ASSERT( str != NULL );
ASSERT             51 ext/syck/syck.c     ASSERT( file != NULL );
ASSERT             70 ext/syck/syck.c     ASSERT( str != NULL );
ASSERT            260 ext/syck/syck.c     ASSERT( p != NULL );
ASSERT            279 ext/syck/syck.c     ASSERT( p != NULL );
ASSERT            286 ext/syck/syck.c     ASSERT( p != NULL );
ASSERT            293 ext/syck/syck.c     ASSERT( p != NULL );
ASSERT            300 ext/syck/syck.c     ASSERT( p != NULL );
ASSERT            319 ext/syck/syck.c     ASSERT( p != NULL );
ASSERT            352 ext/syck/syck.c     ASSERT( p != NULL );
ASSERT            364 ext/syck/syck.c     ASSERT( p != NULL );
ASSERT            371 ext/syck/syck.c     ASSERT( len > p->levels[p->lvl_idx-1].spaces );
ASSERT            382 ext/syck/syck.c     ASSERT( p != NULL );
ASSERT            407 ext/syck/syck.c     ASSERT( p->buffer != NULL );
ASSERT            448 ext/syck/syck.c     ASSERT( p != NULL );
ASSERT            470 ext/syck/syck.c     ASSERT( p != NULL );
ASSERT            490 ext/syck/syck.c     ASSERT( p != NULL );


ATOMIC_INC

ATOMIC_INC        472 signal.c       	ATOMIC_INC(rb_trap_pending);
ATOMIC_INC        473 signal.c       	ATOMIC_INC(trap_pending_list[sig]);


ATOMIC_SET

ATOMIC_SET         28 rubysig.h          rb_atomic_t trap_immediate = ATOMIC_SET(rb_trap_immediate, 1)
ATOMIC_SET         30 rubysig.h          ATOMIC_SET(rb_trap_immediate, trap_immediate);\
ATOMIC_SET        469 signal.c       	ATOMIC_SET(rb_trap_immediate, 1);


AbsAddrType

AbsAddrType       201 regcomp.c        AbsAddrType ra = (AbsAddrType )addr;
AbsAddrType      1649 regcomp.c        AbsAddrType addr;
AbsAddrType       642 regint.h       #define SIZE_ABSADDR       sizeof(AbsAddrType)
AbsAddrType       668 regint.h       #define GET_ABSADDR_INC(addr,p)    PLATFORM_GET_INC(addr,   p, AbsAddrType)
AbsAddrType       176 regparse.h       AbsAddrType call_addr;


AddExponent

AddExponent      1386 ext/bigdecimal/bigdecimal.c static int AddExponent(Real *a,S_INT n);
AddExponent      2464 ext/bigdecimal/bigdecimal.c     if(!AddExponent(c,(S_LONG)1)) return (-1L);
AddExponent      2536 ext/bigdecimal/bigdecimal.c     if(!AddExponent(c,b->exponent)) return 0;
AddExponent      2779 ext/bigdecimal/bigdecimal.c     if(!AddExponent(c,(S_LONG)2))   return 0;
AddExponent      2780 ext/bigdecimal/bigdecimal.c     if(!AddExponent(c,-(b->exponent))) return 0;
AddExponent      2786 ext/bigdecimal/bigdecimal.c     if(!AddExponent(r,(S_LONG)1)) return 0;
AddExponent      2833 ext/bigdecimal/bigdecimal.c                 if(!AddExponent(a,-((S_INT)i))) return 0;
AddExponent      3908 ext/bigdecimal/bigdecimal.c         if(!AddExponent(m,(S_LONG)1)) return 0;


AnchorNode

AnchorNode       2523 regcomp.c            AnchorNode* an = &(NANCHOR(node));
AnchorNode       2579 regcomp.c            AnchorNode* an = &(NANCHOR(node));
AnchorNode       2634 regcomp.c            AnchorNode* an = &(NANCHOR(node));
AnchorNode       2703 regcomp.c            AnchorNode* an = &(NANCHOR(node));
AnchorNode       2826 regcomp.c            AnchorNode* an = &(NANCHOR(node));
AnchorNode       2856 regcomp.c        AnchorNode* an = &(NANCHOR(node));
AnchorNode       2886 regcomp.c        AnchorNode* an = &(NANCHOR(node));
AnchorNode       3247 regcomp.c            AnchorNode* an = &(NANCHOR(node));
AnchorNode        234 regparse.h         AnchorNode    anchor;


B

B                  24 ext/digest/md5/md5ossl.c       && pctx1->B == pctx2->B
B                  38 ext/digest/rmd160/rmd160ossl.c 	  && pctx1->B == pctx2->B
B                 630 missing/crypt.c 	C_block B;
B                 643 missing/crypt.c 	B.b[0] = in[0]; B.b[1] = in[1]; B.b[2] = in[2]; B.b[3] = in[3];
B                 644 missing/crypt.c 	B.b[4] = in[4]; B.b[5] = in[5]; B.b[6] = in[6]; B.b[7] = in[7];
B                 645 missing/crypt.c 	LOAD(L,L0,L1,B);
B                 656 missing/crypt.c 	STORE(L,L0,L1,B);
B                 657 missing/crypt.c 	PERM3264(L,L0,L1,B.b,  (C_block *)IE3264);	/* even bits */
B                 658 missing/crypt.c 	PERM3264(R,R0,R1,B.b+4,(C_block *)IE3264);	/* odd bits */
B                 679 missing/crypt.c #define	DOXOR(x,y,i)	x^=SPTAB(SPE[0][i],B.b[i]); y^=SPTAB(SPE[1][i],B.b[i]);
B                 683 missing/crypt.c #define	DOXOR(x,y,i)	j=B.b[i]; x^=SPTAB(SPE[0][i],j); y^=SPTAB(SPE[1][i],j);
B                 686 missing/crypt.c #define	DOXOR(x,y,i)	k=B.b[i]; x^=SPTAB(SPE[0][i],k); y^=SPTAB(SPE[1][i],k);
B                 692 missing/crypt.c 			B.b32.i0 = k ^ q0 ^ kp->b32.i0;		\
B                 693 missing/crypt.c 			B.b32.i1 = k ^ q1 ^ kp->b32.i1;		\
B                 720 missing/crypt.c 	STORE(L,L0,L1,B);
B                 721 missing/crypt.c 	PERM6464(L,L0,L1,B.b, (C_block *)CF6464);
B                 723 missing/crypt.c 	STORE(L,L0,L1,B);
B                 724 missing/crypt.c 	out[0] = B.b[0]; out[1] = B.b[1]; out[2] = B.b[2]; out[3] = B.b[3];
B                 725 missing/crypt.c 	out[4] = B.b[4]; out[5] = B.b[5]; out[6] = B.b[6]; out[7] = B.b[7];
B                 402 util.c                s = A[0]; A[0] = B[0]; B[0] = s;
B                 403 util.c                s = A[1]; A[1] = B[1]; B[1] = s;
B                 404 util.c                s = A[2]; A[2] = B[2]; B[2] = s;
B                 405 util.c                s = A[3]; A[3] = B[3]; B[3] = s;  a += 16; b += 16;
B                 408 util.c            if (low != 0) { s = A[0]; A[0] = B[0]; B[0] = s;
B                 409 util.c              if (low >= 8) { s = A[1]; A[1] = B[1]; B[1] = s;
B                 410 util.c                if (low == 12) {s = A[2]; A[2] = B[2]; B[2] = s;}}}
B                 428 util.c                s = A[0]; A[0] = B[0]; B[0] = C[0]; C[0] = s;
B                 429 util.c                s = A[1]; A[1] = B[1]; B[1] = C[1]; C[1] = s;
B                 430 util.c                s = A[2]; A[2] = B[2]; B[2] = C[2]; C[2] = s;
B                 431 util.c                s = A[3]; A[3] = B[3]; B[3] = C[3]; C[3] = s; a += 16; b += 16; c += 16;
B                 434 util.c            if (low != 0) { s = A[0]; A[0] = B[0]; B[0] = C[0]; C[0] = s;
B                 435 util.c              if (low >= 8) { s = A[1]; A[1] = B[1]; B[1] = C[1]; C[1] = s;
B                 436 util.c                if (low == 12) {s = A[2]; A[2] = B[2]; B[2] = C[2]; C[2] = s;}}}


B64

B64               247 missing/crypt.c #if defined(B64)
B64               248 missing/crypt.c 	B64	b64;


BACKREFS_P

BACKREFS_P       1420 regcomp.c      	p = BACKREFS_P(br);
BACKREFS_P       1748 regcomp.c            backs = BACKREFS_P(br);
BACKREFS_P       1917 regcomp.c            backs = BACKREFS_P(br);
BACKREFS_P       3114 regcomp.c            p = BACKREFS_P(br);
BACKREFS_P       4157 regcomp.c            backs = BACKREFS_P(br);
BACKREFS_P       5481 regcomp.c            p = BACKREFS_P(br);


BADEXIT

BADEXIT            33 missing/dup2.c 			return BADEXIT;
BADEXIT            40 missing/dup2.c 			return BADEXIT;
BADEXIT            58 missing/dup2.c 	return BADEXIT;


BBUF_ADD

BBUF_ADD          194 regcomp.c        BBUF_ADD(reg, &ra, SIZE_RELADDR);
BBUF_ADD          203 regcomp.c        BBUF_ADD(reg, &ra, SIZE_ABSADDR);
BBUF_ADD          212 regcomp.c        BBUF_ADD(reg, &l, SIZE_LENGTH);
BBUF_ADD          221 regcomp.c        BBUF_ADD(reg, &n, SIZE_MEMNUM);
BBUF_ADD          230 regcomp.c        BBUF_ADD(reg, &ptr, SIZE_POINTER);
BBUF_ADD          237 regcomp.c        BBUF_ADD(reg, &option, SIZE_OPTION);
BBUF_ADD          255 regcomp.c        BBUF_ADD(reg, bytes, len);
BBUF_ADD          262 regcomp.c        BBUF_ADD(reg, bs, SIZE_BITSET);


BBUF_EXPAND

BBUF_EXPAND       456 regint.h         if ((buf)->alloc < (unsigned int )used) BBUF_EXPAND((buf),used);\
BBUF_EXPAND       463 regint.h         if ((buf)->alloc < (unsigned int )used) BBUF_EXPAND((buf),used);\
BBUF_EXPAND       475 regint.h         if ((unsigned int )((to)+(n)) > (buf)->alloc) BBUF_EXPAND((buf),(to) + (n));\


BBUF_GET_OFFSET_POS

BBUF_GET_OFFSET_POS  369 regcomp.c        r = unset_addr_list_add(node->unset_addr_list, BBUF_GET_OFFSET_POS(reg),
BBUF_GET_OFFSET_POS 1017 regcomp.c            node->call_addr = BBUF_GET_OFFSET_POS(reg) + SIZE_ABSADDR + SIZE_OP_JUMP;


BBUF_INIT

BBUF_INIT        4745 regcomp.c          r = BBUF_INIT(reg, init_size);
BBUF_INIT         102 regparse.c       r = BBUF_INIT(to, from->alloc);
BBUF_INIT        1579 regparse.c       r = BBUF_INIT(*pbuf, INIT_MULTI_BYTE_RANGE_SIZE);


BBUF_MOVE_RIGHT

BBUF_MOVE_RIGHT   496 regint.h           BBUF_MOVE_RIGHT((buf),(pos),(pos) + (n),((buf)->used - (pos)));\
BBUF_MOVE_RIGHT  1645 regparse.c           BBUF_MOVE_RIGHT(bbuf, from_pos, to_pos, size);


BBUF_WRITE

BBUF_WRITE       1657 regcomp.c          BBUF_WRITE(reg, offset, &addr, SIZE_ABSADDR);
BBUF_WRITE        468 regint.h       #define BBUF_ADD(buf,bytes,n)       BBUF_WRITE((buf),(buf)->used,(bytes),(n))
BBUF_WRITE        493 regint.h           BBUF_WRITE(buf,pos,bytes,n);\
BBUF_WRITE       1563 regparse.c         BBUF_WRITE(bbuf, pos, &(code), SIZE_CODE_POINT)


BBUF_WRITE_CODE_POINT

BBUF_WRITE_CODE_POINT 1583 regparse.c       BBUF_WRITE_CODE_POINT(bbuf, 0, n);
BBUF_WRITE_CODE_POINT 1654 regparse.c       BBUF_WRITE_CODE_POINT(bbuf, pos, from);
BBUF_WRITE_CODE_POINT 1655 regparse.c       BBUF_WRITE_CODE_POINT(bbuf, pos + SIZE_CODE_POINT, to);
BBUF_WRITE_CODE_POINT 1657 regparse.c       BBUF_WRITE_CODE_POINT(bbuf, 0, n);


BBuf

BBuf             5427 regcomp.c            BBuf* bbuf = NCCLASS(node).mbuf;
BBuf             1177 regexec.c          UChar* p = ((BBuf* )(cc->mbuf))->p;
BBuf              430 regint.h       #define BBUF_INIT(buf,size)    onig_bbuf_init((BBuf* )(buf), (size))
BBuf              762 regint.h         BBuf*  mbuf;     /* multi-byte info or NULL */
BBuf               98 regparse.c       BBuf *to;
BBuf              100 regparse.c       *rto = to = (BBuf* )xmalloc(sizeof(BBuf));
BBuf             1138 regparse.c         BBuf* bbuf;
BBuf             1143 regparse.c         bbuf = (BBuf* )xmalloc(sizeof(BBuf));
BBuf             1575 regparse.c       BBuf* bbuf;
BBuf             1577 regparse.c       bbuf = *pbuf = (BBuf* )xmalloc(sizeof(BBuf));
BBuf             1593 regparse.c       BBuf* bbuf;
BBuf             1681 regparse.c       *pbuf = (BBuf* )NULL;
BBuf             1711 regparse.c       BBuf *tbuf; \
BBuf             1725 regparse.c       *pbuf = (BBuf* )NULL;
BBuf             1821 regparse.c       *pbuf = (BBuf* )NULL;
BBuf             1874 regparse.c       BBuf *tbuf;
BBuf             1898 regparse.c       BBuf *buf1, *buf2, *pbuf;
BBuf             1933 regparse.c     	BBuf *tbuf;
BBuf             1956 regparse.c       BBuf *buf1, *buf2, *pbuf;
BBuf             1991 regparse.c     	BBuf *tbuf;
BBuf              117 regparse.h       BBuf*  mbuf;     /* multi-byte info or NULL */


BDIGIT

BDIGIT             27 bignum.c       #define BDIGITS(x) ((BDIGIT*)RBIGNUM(x)->digits)
BDIGIT             36 bignum.c       #define BIGLO(x) ((BDIGIT)((x) & (BIGRAD-1)))
BDIGIT             37 bignum.c       #define BDIGMAX ((BDIGIT)-1)
BDIGIT             48 bignum.c           big->digits = ALLOC_N(BDIGIT, len);
BDIGIT             60 bignum.c           MEMCPY(BDIGITS(z), BDIGITS(x), BDIGIT, RBIGNUM(x)->len);
BDIGIT             69 bignum.c           BDIGIT *ds = BDIGITS(x);
BDIGIT             80 bignum.c       	REALLOC_N(RBIGNUM(x)->digits, BDIGIT, ++RBIGNUM(x)->len);
BDIGIT             97 bignum.c       	BDIGIT *ds = BDIGITS(x);
BDIGIT            129 bignum.c           BDIGIT *digits;
BDIGIT            189 bignum.c       	BDIGIT *ds;
BDIGIT            211 bignum.c           BDIGIT *digits;
BDIGIT            274 bignum.c       #define BNEG(b) (RSHIFT(((BDIGIT*)b)[QUAD_SIZE/SIZEOF_BDIGITS-1],BITSPERDIG-1) != 0)
BDIGIT            311 bignum.c           BDIGIT *zds;
BDIGIT            525 bignum.c           BDIGIT *digits;
BDIGIT            591 bignum.c           BDIGIT *ds;
BDIGIT            649 bignum.c       	    ds[k] = (BDIGIT)(num / hbase);
BDIGIT            700 bignum.c           BDIGIT *ds;
BDIGIT            759 bignum.c           BDIGIT *ds;
BDIGIT            800 bignum.c           BDIGIT c;
BDIGIT            801 bignum.c           BDIGIT *digits;
BDIGIT            820 bignum.c       	c = (BDIGIT)u;
BDIGIT            839 bignum.c           BDIGIT *ds = BDIGITS(x);
BDIGIT            945 bignum.c           if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM(y)->len) != 0) return Qfalse;
BDIGIT            966 bignum.c           if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM(y)->len) != 0) return Qfalse;
BDIGIT           1003 bignum.c           BDIGIT *ds;
BDIGIT           1022 bignum.c           BDIGIT *zds;
BDIGIT           1102 bignum.c           BDIGITS(z)[i] = (BDIGIT)num;
BDIGIT           1163 bignum.c           BDIGIT *zds;
BDIGIT           1220 bignum.c           BDIGIT *xds, *yds, *zds, *tds;
BDIGIT           1223 bignum.c           BDIGIT dd, q;
BDIGIT           1240 bignum.c       	    zds[i] = (BDIGIT)(t2 / dd);
BDIGIT           1280 bignum.c       	zds[j] = (BDIGIT)t2;
BDIGIT           1291 bignum.c       	else q = (BDIGIT)((BIGUP(zds[j]) + zds[j-1])/yds[ny-1]);
BDIGIT           1581 bignum.c           BDIGIT *ds1, *ds2, *zds;
BDIGIT           1636 bignum.c           BDIGIT *ds1, *ds2, *zds;
BDIGIT           1694 bignum.c           BDIGIT *ds1, *ds2, *zds;
BDIGIT           1754 bignum.c           BDIGIT *xds, *zds;
BDIGIT           1789 bignum.c           BDIGIT *xds, *zds;
BDIGIT           1850 bignum.c           BDIGIT *xds;
BDIGIT           1889 bignum.c           BDIGIT *digits;
BDIGIT             34 marshal.c      shortlen(long len, BDIGIT *ds)
BDIGIT             36 marshal.c          BDIGIT num;
BDIGIT             44 marshal.c          return (len - 1)*sizeof(BDIGIT)/2 + offset;
BDIGIT            516 marshal.c      		BDIGIT *d = RBIGNUM(obj)->digits;
BDIGIT            522 marshal.c      		    BDIGIT num = *d;
BDIGIT           1040 marshal.c      	    BDIGIT *digits;
BDIGIT           1051 marshal.c      	    big->len = (len + 1) * 2 / sizeof(BDIGIT);
BDIGIT           1053 marshal.c      	    big->digits = digits = ALLOC_N(BDIGIT, big->len);
BDIGIT           1057 marshal.c      		    big->len * sizeof(BDIGIT) - len * 2);
BDIGIT           1062 marshal.c      		BDIGIT num = 0;
BDIGIT            232 random.c                   buf[j] |= ((BDIGIT *)RBIGNUM(seed)->digits)[i];
BDIGIT            262 random.c           BDIGIT *digits;
BDIGIT            270 random.c           digits = big->digits = ALLOC_N(BDIGIT, big->len);
BDIGIT            379 random.c       # define BIG_GET32(big,i) (((BDIGIT *)(big)->digits)[(i)*2] | \
BDIGIT            380 random.c                                  ((i)*2+1 < (big)->len ? (((BDIGIT *)(big)->digits)[(i)*2+1] << 16) \
BDIGIT            382 random.c       # define BIG_SET32(big,i,d) ((((BDIGIT *)(big)->digits)[(i)*2] = (d) & 0xffff), \
BDIGIT            383 random.c                                    ((i)*2+1 < (big)->len ? (((BDIGIT *)(big)->digits)[(i)*2+1] = (d) >> 16) \
BDIGIT            387 random.c       # define BIG_GET32(big,i) (((BDIGIT *)(big)->digits)[i])
BDIGIT            388 random.c       # define BIG_SET32(big,i,d) (((BDIGIT *)(big)->digits)[i] = (d))


BDIGITS

BDIGITS            39 bignum.c       #define BIGZEROP(x) (RBIGNUM(x)->len == 0 || (RBIGNUM(x)->len == 1 && BDIGITS(x)[0] == 0))
BDIGITS            60 bignum.c           MEMCPY(BDIGITS(z), BDIGITS(x), BDIGIT, RBIGNUM(x)->len);
BDIGITS            69 bignum.c           BDIGIT *ds = BDIGITS(x);
BDIGITS            81 bignum.c       	ds = BDIGITS(x);
BDIGITS            97 bignum.c       	BDIGIT *ds = BDIGITS(x);
BDIGITS           133 bignum.c           digits = BDIGITS(big);
BDIGITS           194 bignum.c       	ds = BDIGITS(val);
BDIGITS           228 bignum.c           digits = BDIGITS(big);
BDIGITS           264 bignum.c           memcpy(buf, (char*)BDIGITS(val), len);
BDIGITS           283 bignum.c           memcpy((char*)BDIGITS(big), buf, QUAD_SIZE);
BDIGITS           286 bignum.c       	char *tmp = (char*)BDIGITS(big);
BDIGITS           437 bignum.c           zds = BDIGITS(z);
BDIGITS           529 bignum.c           digits = BDIGITS(big);
BDIGITS           638 bignum.c           ds = BDIGITS(t);
BDIGITS           707 bignum.c           ds = BDIGITS(x);
BDIGITS           763 bignum.c           ds = BDIGITS(x);
BDIGITS           817 bignum.c           digits = BDIGITS(z);
BDIGITS           839 bignum.c           BDIGIT *ds = BDIGITS(x);
BDIGITS           904 bignum.c           while(xlen-- && (BDIGITS(x)[xlen]==BDIGITS(y)[xlen]));
BDIGITS           906 bignum.c           return (BDIGITS(x)[xlen] > BDIGITS(y)[xlen]) ?
BDIGITS           945 bignum.c           if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM(y)->len) != 0) return Qfalse;
BDIGITS           966 bignum.c           if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM(y)->len) != 0) return Qfalse;
BDIGITS          1007 bignum.c           ds = BDIGITS(z);
BDIGITS          1033 bignum.c       	    if (BDIGITS(x)[i] > BDIGITS(y)[i]) {
BDIGITS          1036 bignum.c       	    if (BDIGITS(x)[i] < BDIGITS(y)[i]) {
BDIGITS          1044 bignum.c           zds = BDIGITS(z);
BDIGITS          1047 bignum.c       	num += (BDIGIT_DBL_SIGNED)BDIGITS(x)[i] - BDIGITS(y)[i];
BDIGITS          1052 bignum.c       	num += BDIGITS(x)[i];
BDIGITS          1057 bignum.c       	zds[i] = BDIGITS(x)[i];
BDIGITS          1088 bignum.c       	num += (BDIGIT_DBL)BDIGITS(x)[i] + BDIGITS(y)[i];
BDIGITS          1089 bignum.c       	BDIGITS(z)[i] = BIGLO(num);
BDIGITS          1094 bignum.c       	num += BDIGITS(y)[i];
BDIGITS          1095 bignum.c       	BDIGITS(z)[i++] = BIGLO(num);
BDIGITS          1099 bignum.c       	BDIGITS(z)[i] = BDIGITS(y)[i];
BDIGITS          1102 bignum.c           BDIGITS(z)[i] = (BDIGIT)num;
BDIGITS          1182 bignum.c           zds = BDIGITS(z);
BDIGITS          1185 bignum.c       	BDIGIT_DBL dd = BDIGITS(x)[i];
BDIGITS          1189 bignum.c       	    BDIGIT_DBL ee = n + (BDIGIT_DBL)dd * BDIGITS(y)[j];
BDIGITS          1226 bignum.c           yds = BDIGITS(y);
BDIGITS          1227 bignum.c           if (nx < ny || (nx == ny && BDIGITS(x)[nx - 1] < BDIGITS(y)[ny - 1])) {
BDIGITS          1232 bignum.c           xds = BDIGITS(x);
BDIGITS          1236 bignum.c       	zds = BDIGITS(z);
BDIGITS          1252 bignum.c           zds = BDIGITS(z);
BDIGITS          1264 bignum.c       	tds = BDIGITS(yy);
BDIGITS          1319 bignum.c       	zds = BDIGITS(*divp);
BDIGITS          1326 bignum.c       	zds = BDIGITS(*modp);
BDIGITS          1601 bignum.c       	ds1 = BDIGITS(y);
BDIGITS          1602 bignum.c       	ds2 = BDIGITS(x);
BDIGITS          1608 bignum.c       	ds1 = BDIGITS(x);
BDIGITS          1609 bignum.c       	ds2 = BDIGITS(y);
BDIGITS          1613 bignum.c           zds = BDIGITS(z);
BDIGITS          1657 bignum.c       	ds1 = BDIGITS(y);
BDIGITS          1658 bignum.c       	ds2 = BDIGITS(x);
BDIGITS          1664 bignum.c       	ds1 = BDIGITS(x);
BDIGITS          1665 bignum.c       	ds2 = BDIGITS(y);
BDIGITS          1669 bignum.c           zds = BDIGITS(z);
BDIGITS          1715 bignum.c       	ds1 = BDIGITS(y);
BDIGITS          1716 bignum.c       	ds2 = BDIGITS(x);
BDIGITS          1722 bignum.c       	ds1 = BDIGITS(x);
BDIGITS          1723 bignum.c       	ds2 = BDIGITS(y);
BDIGITS          1729 bignum.c           zds = BDIGITS(z);
BDIGITS          1765 bignum.c           zds = BDIGITS(z);
BDIGITS          1769 bignum.c           xds = BDIGITS(x);
BDIGITS          1810 bignum.c           xds = BDIGITS(x);
BDIGITS          1816 bignum.c           zds = BDIGITS(z);
BDIGITS          1872 bignum.c           xds = BDIGITS(x);
BDIGITS          1891 bignum.c           key = 0; digits = BDIGITS(x); len = RBIGNUM(x)->len;


BDIGIT_DBL

BDIGIT_DBL         29 bignum.c       #define BIGRAD ((BDIGIT_DBL)1 << BITSPERDIG)
BDIGIT_DBL         34 bignum.c       #define BIGUP(x) ((BDIGIT_DBL)(x) << BITSPERDIG)
BDIGIT_DBL         70 bignum.c           BDIGIT_DBL num;
BDIGIT_DBL        127 bignum.c           BDIGIT_DBL num = n;
BDIGIT_DBL        307 bignum.c           BDIGIT_DBL num;
BDIGIT_DBL        468 bignum.c       		num += (BDIGIT_DBL)zds[i]*base;
BDIGIT_DBL        523 bignum.c           BDIGIT_DBL num = n;
BDIGIT_DBL        645 bignum.c       	BDIGIT_DBL num = 0;
BDIGIT_DBL        699 bignum.c           BDIGIT_DBL num;
BDIGIT_DBL        758 bignum.c           BDIGIT_DBL num;
BDIGIT_DBL       1068 bignum.c           BDIGIT_DBL num;
BDIGIT_DBL       1088 bignum.c       	num += (BDIGIT_DBL)BDIGITS(x)[i] + BDIGITS(y)[i];
BDIGIT_DBL       1161 bignum.c           BDIGIT_DBL n = 0;
BDIGIT_DBL       1185 bignum.c       	BDIGIT_DBL dd = BDIGITS(x)[i];
BDIGIT_DBL       1189 bignum.c       	    BDIGIT_DBL ee = n + (BDIGIT_DBL)dd * BDIGITS(y)[j];
BDIGIT_DBL       1221 bignum.c           BDIGIT_DBL t2;
BDIGIT_DBL       1268 bignum.c       	    t2 += (BDIGIT_DBL)yds[j]<<dd;
BDIGIT_DBL       1276 bignum.c       	    t2 += (BDIGIT_DBL)xds[j]<<dd;
BDIGIT_DBL       1295 bignum.c       		BDIGIT_DBL ee;
BDIGIT_DBL       1296 bignum.c       		t2 += (BDIGIT_DBL)yds[i] * q;
BDIGIT_DBL       1298 bignum.c       		num = (BDIGIT_DBL)zds[j - ny + i] + ee;
BDIGIT_DBL       1307 bignum.c       		    BDIGIT_DBL ee = num + yds[i];
BDIGIT_DBL       1308 bignum.c       		    num = (BDIGIT_DBL)zds[j - ny + i] + ee;
BDIGIT_DBL       1759 bignum.c           BDIGIT_DBL num = 0;
BDIGIT_DBL       1771 bignum.c       	num = num | (BDIGIT_DBL)*xds++<<s2;
BDIGIT_DBL       1794 bignum.c           BDIGIT_DBL num = 0;
BDIGIT_DBL       1814 bignum.c       	num = ((BDIGIT_DBL)~0) << BITSPERDIG;


BDIGIT_DBL_SIGNED

BDIGIT_DBL_SIGNED 1023 bignum.c           BDIGIT_DBL_SIGNED num;
BDIGIT_DBL_SIGNED 1047 bignum.c       	num += (BDIGIT_DBL_SIGNED)BDIGITS(x)[i] - BDIGITS(y)[i];
BDIGIT_DBL_SIGNED 1222 bignum.c           BDIGIT_DBL_SIGNED num;


BEG

BEG               963 re.c               if (RMATCH(match)->BEG(nth) == -1) return Qfalse;
BEG               981 re.c               start = RMATCH(match)->BEG(nth);
BEG              1014 re.c               if (RMATCH(match)->BEG(0) == -1) return Qnil;
BEG              1015 re.c               str = rb_str_substr(RMATCH(match)->str, 0, RMATCH(match)->BEG(0));
BEG              1039 re.c               if (RMATCH(match)->BEG(0) == -1) return Qnil;
BEG              1053 re.c               if (RMATCH(match)->BEG(0) == -1) return Qnil;
BEG              1055 re.c               for (i=RMATCH(match)->regs->num_regs-1; RMATCH(match)->BEG(i) == -1 && i > 0; i--)
BEG              2022 re.c           	    rb_str_buf_cat(val, RSTRING(src)->ptr, BEG(0));
BEG              2031 re.c           	    while (BEG(no) == -1 && no > 0) no--;
BEG              2046 re.c           	    if (BEG(no) == -1) continue;
BEG              2047 re.c           	    rb_str_buf_cat(val, RSTRING(src)->ptr+BEG(no), END(no)-BEG(no));
BEG              1591 string.c           start = RMATCH(match)->BEG(nth);
BEG              1854 string.c       	plen = END(0) - BEG(0);
BEG              1859 string.c       	    memmove(RSTRING(str)->ptr + BEG(0) + RSTRING(repl)->len,
BEG              1860 string.c       		    RSTRING(str)->ptr + BEG(0) + plen,
BEG              1861 string.c       		    RSTRING(str)->len - BEG(0) - plen);
BEG              1863 string.c       	memcpy(RSTRING(str)->ptr + BEG(0),
BEG              1987 string.c       	if (BEG(0) == END(0)) {
BEG              3291 string.c       	    if (start == end && BEG(0) == END(0)) {
BEG              3313 string.c       		if (BEG(idx) == -1) continue;
BEG              3314 string.c       		if (BEG(idx) == END(idx))
BEG              3317 string.c       		    tmp = rb_str_substr(str, BEG(idx), END(idx)-BEG(idx));
BEG              3781 string.c       	if (BEG(0) == END(0)) {


BEGIN_CALLARGS

BEGIN_CALLARGS   3012 eval.c         		    BEGIN_CALLARGS;
BEGIN_CALLARGS   3246 eval.c         	    BEGIN_CALLARGS;
BEGIN_CALLARGS   3271 eval.c         	    BEGIN_CALLARGS;
BEGIN_CALLARGS   3287 eval.c         	    BEGIN_CALLARGS;
BEGIN_CALLARGS   3334 eval.c         		BEGIN_CALLARGS;
BEGIN_CALLARGS   5149 eval.c             BEGIN_CALLARGS;


BIGDN

BIGDN              77 bignum.c       	num = BIGDN(num);
BIGDN             136 bignum.c       	num = BIGDN(num);
BIGDN             231 bignum.c       	q = BIGDN(q);
BIGDN             470 bignum.c       		num = BIGDN(num);
BIGDN             532 bignum.c       	num = BIGDN(num);
BIGDN            1049 bignum.c       	num = BIGDN(num);
BIGDN            1054 bignum.c       	num = BIGDN(num);
BIGDN            1090 bignum.c       	num = BIGDN(num);
BIGDN            1096 bignum.c       	num = BIGDN(num);
BIGDN            1192 bignum.c       	    n = BIGDN(n);
BIGDN            1270 bignum.c       	    t2 = BIGDN(t2);
BIGDN            1278 bignum.c       	    t2 = BIGDN(t2);
BIGDN            1300 bignum.c       		num = BIGDN(num);
BIGDN            1301 bignum.c       		t2 = BIGDN(t2);
BIGDN            1310 bignum.c       		    num = BIGDN(num);
BIGDN            1773 bignum.c       	num = BIGDN(num);


BIGLO

BIGLO              76 bignum.c       	ds[i++] = BIGLO(num);
BIGLO             135 bignum.c       	digits[i++] = BIGLO(num);
BIGLO             230 bignum.c       	digits[i++] = BIGLO(q);
BIGLO             469 bignum.c       		zds[i++] = BIGLO(num);
BIGLO             531 bignum.c       	digits[i++] = BIGLO(num);
BIGLO            1048 bignum.c       	zds[i] = BIGLO(num);
BIGLO            1053 bignum.c       	zds[i++] = BIGLO(num);
BIGLO            1089 bignum.c       	BDIGITS(z)[i] = BIGLO(num);
BIGLO            1095 bignum.c       	BDIGITS(z)[i++] = BIGLO(num);
BIGLO            1191 bignum.c       	    if (ee) zds[i + j] = BIGLO(n);
BIGLO            1269 bignum.c       	    tds[j++] = BIGLO(t2);
BIGLO            1277 bignum.c       	    zds[j++] = BIGLO(t2);
BIGLO            1297 bignum.c       		ee = num - BIGLO(t2);
BIGLO            1299 bignum.c       		if (ee) zds[j - ny + i] = BIGLO(num);
BIGLO            1309 bignum.c       		    if (ee) zds[j - ny + i] = BIGLO(num);
BIGLO            1333 bignum.c       		zds[i] = BIGLO(t2);
BIGLO            1772 bignum.c       	*zds++ = BIGLO(num);
BIGLO            1775 bignum.c           *zds = BIGLO(num);
BIGLO            1819 bignum.c       	zds[j] = BIGLO(num);


BIGNUM_2

BIGNUM_2          286 ext/openssl/ossl_bn.c BIGNUM_2(add);
BIGNUM_2          287 ext/openssl/ossl_bn.c BIGNUM_2(sub);


BIGNUM_2c

BIGNUM_2c         306 ext/openssl/ossl_bn.c BIGNUM_2c(mul);
BIGNUM_2c         307 ext/openssl/ossl_bn.c BIGNUM_2c(mod);
BIGNUM_2c         308 ext/openssl/ossl_bn.c BIGNUM_2c(exp);
BIGNUM_2c         309 ext/openssl/ossl_bn.c BIGNUM_2c(gcd);
BIGNUM_2c         310 ext/openssl/ossl_bn.c BIGNUM_2c(mod_sqr);
BIGNUM_2c         311 ext/openssl/ossl_bn.c BIGNUM_2c(mod_inverse);


BIGNUM_3c

BIGNUM_3c         357 ext/openssl/ossl_bn.c BIGNUM_3c(mod_add);
BIGNUM_3c         358 ext/openssl/ossl_bn.c BIGNUM_3c(mod_sub);
BIGNUM_3c         359 ext/openssl/ossl_bn.c BIGNUM_3c(mod_mul);
BIGNUM_3c         360 ext/openssl/ossl_bn.c BIGNUM_3c(mod_exp);


BIGNUM_BIT

BIGNUM_BIT        373 ext/openssl/ossl_bn.c BIGNUM_BIT(set_bit);
BIGNUM_BIT        374 ext/openssl/ossl_bn.c BIGNUM_BIT(clear_bit);
BIGNUM_BIT        375 ext/openssl/ossl_bn.c BIGNUM_BIT(mask_bits);


BIGNUM_BOOL1

BIGNUM_BOOL1      246 ext/openssl/ossl_bn.c BIGNUM_BOOL1(is_zero);
BIGNUM_BOOL1      247 ext/openssl/ossl_bn.c BIGNUM_BOOL1(is_one);
BIGNUM_BOOL1      248 ext/openssl/ossl_bn.c BIGNUM_BOOL1(is_odd);


BIGNUM_CMP

BIGNUM_CMP        532 ext/openssl/ossl_bn.c BIGNUM_CMP(cmp);
BIGNUM_CMP        533 ext/openssl/ossl_bn.c BIGNUM_CMP(ucmp);


BIGNUM_NUM

BIGNUM_NUM        503 ext/openssl/ossl_bn.c BIGNUM_NUM(num_bytes);
BIGNUM_NUM        504 ext/openssl/ossl_bn.c BIGNUM_NUM(num_bits);


BIGNUM_RAND

BIGNUM_RAND       439 ext/openssl/ossl_bn.c BIGNUM_RAND(rand);
BIGNUM_RAND       440 ext/openssl/ossl_bn.c BIGNUM_RAND(pseudo_rand);


BIGNUM_RAND_RANGE

BIGNUM_RAND_RANGE  458 ext/openssl/ossl_bn.c BIGNUM_RAND_RANGE(rand);
BIGNUM_RAND_RANGE  459 ext/openssl/ossl_bn.c BIGNUM_RAND_RANGE(pseudo_rand);


BIGNUM_SHIFT

BIGNUM_SHIFT      410 ext/openssl/ossl_bn.c BIGNUM_SHIFT(lshift);
BIGNUM_SHIFT      411 ext/openssl/ossl_bn.c BIGNUM_SHIFT(rshift);


BIGRAD

BIGRAD             36 bignum.c       #define BIGLO(x) ((BDIGIT)((x) & (BIGRAD-1)))
BIGRAD            813 bignum.c       	u /= (double)(BIGRAD);
BIGRAD            819 bignum.c       	u *= BIGRAD;
BIGRAD            842 bignum.c       	d = ds[i] + BIGRAD*d;
BIGRAD           1290 bignum.c       	if (zds[j] ==  yds[ny-1]) q = BIGRAD-1;
BIGRAD           1675 bignum.c       	zds[i] = sign?ds2[i]:(BIGRAD-1);


BIGUP

BIGUP             105 bignum.c       		num = BIGUP(num) + ds[len];
BIGUP             197 bignum.c       	    q = BIGUP(q);
BIGUP             648 bignum.c       	    num = BIGUP(num) + ds[k];
BIGUP             710 bignum.c       	num = BIGUP(num);
BIGUP             766 bignum.c       	num = BIGUP(num);
BIGUP            1239 bignum.c       	    t2 = BIGUP(t2) + zds[i];
BIGUP            1291 bignum.c       	else q = (BDIGIT)((BIGUP(zds[j]) + zds[j-1])/yds[ny-1]);
BIGUP            1334 bignum.c       		t2 = BIGUP(q);
BIGUP            1820 bignum.c       	num = BIGUP(xds[i]);


BIGZEROP

BIGZEROP          600 bignum.c           if (BIGZEROP(x)) {
BIGZEROP         1225 bignum.c           if (BIGZEROP(y)) rb_num_zerodiv();
BIGZEROP         1348 bignum.c           if (RBIGNUM(x)->sign != RBIGNUM(y)->sign && !BIGZEROP(mod)) {


BIG_CRITERIA

BIG_CRITERIA       42 missing/acosh.c     else if (x > BIG_CRITERIA)
BIG_CRITERIA       62 missing/acosh.c     else if (z > BIG_CRITERIA) {


BIG_CRITERIA_BIT

BIG_CRITERIA_BIT   22 missing/acosh.c #if BIG_CRITERIA_BIT > 0
BIG_CRITERIA_BIT   23 missing/acosh.c #define BIG_CRITERIA (1.0*BIG_CRITERIA_BIT)


BITSET_AT

BITSET_AT         120 regcomp.c          if (BITSET_AT(bs, i)) n++;
BITSET_AT        2137 regcomp.c          found = (BITSET_AT(cc->bs, code) == 0 ? 0 : 1);
BITSET_AT        2208 regcomp.c      	      if (BITSET_AT(xc->bs, i)) {
BITSET_AT        2220 regcomp.c      		if (BITSET_AT(xc->bs, i))
BITSET_AT        2224 regcomp.c      		if (! BITSET_AT(xc->bs, i))
BITSET_AT        2243 regcomp.c      	    v = BITSET_AT(xc->bs, i);
BITSET_AT        2246 regcomp.c      	      v = BITSET_AT(yc->bs, i);
BITSET_AT        4056 regcomp.c                z = BITSET_AT(cc->bs, i);
BITSET_AT        1174 regexec.c          in_cc = BITSET_AT(cc->bs, code);
BITSET_AT        1610 regexec.c            if (BITSET_AT(((BitSetRef )p), *s) == 0) goto fail;
BITSET_AT        1652 regexec.c      	if (BITSET_AT(((BitSetRef )p), *s) == 0)
BITSET_AT        1665 regexec.c            if (BITSET_AT(((BitSetRef )p), *s) != 0) goto fail;
BITSET_AT        1719 regexec.c      	if (BITSET_AT(((BitSetRef )p), *s) != 0)
BITSET_AT        4923 regparse.c                     if (BITSET_AT(bs, ccs[i].from)) {
BITSET_AT        4927 regparse.c                     if (BITSET_AT(bs, ccs[i].to)) {


BITSET_CLEAR

BITSET_CLEAR     1091 regparse.c       BITSET_CLEAR(cc->bs);
BITSET_CLEAR     1122 regparse.c       BITSET_CLEAR(cc->bs);


BITSET_SET_BIT

BITSET_SET_BIT    140 regparse.c         BITSET_SET_BIT(bs, i);
BITSET_SET_BIT   1128 regparse.c             BITSET_SET_BIT(cc->bs, j);
BITSET_SET_BIT   3415 regparse.c             BITSET_SET_BIT(cc->bs, j);
BITSET_SET_BIT   3433 regparse.c               BITSET_SET_BIT(cc->bs, j);
BITSET_SET_BIT   3439 regparse.c               BITSET_SET_BIT(cc->bs, j);
BITSET_SET_BIT   3494 regparse.c     	  BITSET_SET_BIT(cc->bs, c);
BITSET_SET_BIT   3501 regparse.c     	  BITSET_SET_BIT(cc->bs, c);
BITSET_SET_BIT   3511 regparse.c     	  BITSET_SET_BIT(cc->bs, c);
BITSET_SET_BIT   3517 regparse.c     	  BITSET_SET_BIT(cc->bs, c);
BITSET_SET_BIT   3526 regparse.c     	if (ONIGENC_IS_CODE_SB_WORD(enc, c)) BITSET_SET_BIT(cc->bs, c);
BITSET_SET_BIT   3534 regparse.c     	  BITSET_SET_BIT(cc->bs, c);
BITSET_SET_BIT   3796 regparse.c           BITSET_SET_BIT(cc->bs, (int )(*vs));
BITSET_SET_BIT   3819 regparse.c           BITSET_SET_BIT(cc->bs, (int )(*vs));
BITSET_SET_BIT   4217 regparse.c               BITSET_SET_BIT(cc->bs, NEWLINE_CODE);
BITSET_SET_BIT   4925 regparse.c                       BITSET_SET_BIT(bs, ccs[i].to);
BITSET_SET_BIT   4928 regparse.c                       BITSET_SET_BIT(bs, ccs[i].from);


BITSET_SIZE

BITSET_SIZE       106 regcomp.c        for (i = 0; i < BITSET_SIZE; i++) {
BITSET_SIZE       412 regint.h         for (i = 0; i < BITSET_SIZE; i++) { (bs)[i] = 0; }\
BITSET_SIZE       128 regparse.c       for (i = 0; i < BITSET_SIZE; i++) {\
BITSET_SIZE       149 regparse.c       for (i = 0; i < BITSET_SIZE; i++) {
BITSET_SIZE       159 regparse.c       for (i = 0; i < BITSET_SIZE; i++) {
BITSET_SIZE       168 regparse.c       for (i = 0; i < BITSET_SIZE; i++) {
BITSET_SIZE       177 regparse.c       for (i = 0; i < BITSET_SIZE; i++) {
BITSET_SIZE       186 regparse.c       for (i = 0; i < BITSET_SIZE; i++) {
BITSET_SIZE       195 regparse.c       for (i = 0; i < BITSET_SIZE; i++) {


BITSPERDIG

BITSPERDIG         29 bignum.c       #define BIGRAD ((BDIGIT_DBL)1 << BITSPERDIG)
BITSPERDIG         34 bignum.c       #define BIGUP(x) ((BDIGIT_DBL)(x) << BITSPERDIG)
BITSPERDIG         35 bignum.c       #define BIGDN(x) RSHIFT(x,BITSPERDIG)
BITSPERDIG        274 bignum.c       #define BNEG(b) (RSHIFT(((BDIGIT*)b)[QUAD_SIZE/SIZEOF_BDIGITS-1],BITSPERDIG-1) != 0)
BITSPERDIG        433 bignum.c           len = (len/BITSPERDIG)+1;
BITSPERDIG       1258 bignum.c           while ((q & (1<<(BITSPERDIG-1))) == 0) {
BITSPERDIG       1756 bignum.c           int s1 = shift/BITSPERDIG;
BITSPERDIG       1757 bignum.c           int s2 = shift%BITSPERDIG;
BITSPERDIG       1791 bignum.c           long s1 = shift/BITSPERDIG;
BITSPERDIG       1792 bignum.c           long s2 = shift%BITSPERDIG;
BITSPERDIG       1814 bignum.c       	num = ((BDIGIT_DBL)~0) << BITSPERDIG;
BITSPERDIG       1861 bignum.c           s1 = shift/BITSPERDIG;
BITSPERDIG       1862 bignum.c           s2 = shift%BITSPERDIG;


BITSPERSHORT

BITSPERSHORT       27 marshal.c      #define SHORTMASK ((1<<BITSPERSHORT)-1)
BITSPERSHORT       28 marshal.c      #define SHORTDN(x) RSHIFT(x,BITSPERSHORT)


BITSTACK_LEXPOP

BITSTACK_LEXPOP    94 parse.y        #define COND_LEXPOP()	BITSTACK_LEXPOP(cond_stack)
BITSTACK_LEXPOP    99 parse.y        #define CMDARG_LEXPOP()	BITSTACK_LEXPOP(cmdarg_stack)


BITSTACK_POP

BITSTACK_POP       93 parse.y        #define COND_POP()	BITSTACK_POP(cond_stack)
BITSTACK_POP       98 parse.y        #define CMDARG_POP()	BITSTACK_POP(cmdarg_stack)


BITSTACK_PUSH

BITSTACK_PUSH      92 parse.y        #define COND_PUSH(n)	BITSTACK_PUSH(cond_stack, n)
BITSTACK_PUSH      97 parse.y        #define CMDARG_PUSH(n)	BITSTACK_PUSH(cmdarg_stack, n)


BITSTACK_SET_P

BITSTACK_SET_P     95 parse.y        #define COND_P()	BITSTACK_SET_P(cond_stack)
BITSTACK_SET_P    100 parse.y        #define CMDARG_P()	BITSTACK_SET_P(cmdarg_stack)


BITS_IN_ROOM

BITS_IN_ROOM      398 regint.h       #define BITSET_SIZE        (SINGLE_BYTE_SIZE / BITS_IN_ROOM)
BITS_IN_ROOM      415 regint.h       #define BS_ROOM(bs,pos)            (bs)[pos / BITS_IN_ROOM]
BITS_IN_ROOM      416 regint.h       #define BS_BIT(pos)                (1 << (pos % BITS_IN_ROOM))


BITS_PER_BYTE

BITS_PER_BYTE     396 regint.h       #define SINGLE_BYTE_SIZE   (1 << BITS_PER_BYTE)
BITS_PER_BYTE     397 regint.h       #define BITS_IN_ROOM       (sizeof(Bits) * BITS_PER_BYTE)


BIT_STATUS_AT

BIT_STATUS_AT     959 regcomp.c            if (BIT_STATUS_AT(reg->bt_mem_end, node->regnum))
BIT_STATUS_AT     969 regcomp.c            if (BIT_STATUS_AT(reg->bt_mem_start, node->regnum))
BIT_STATUS_AT     974 regcomp.c            len += tlen + (BIT_STATUS_AT(reg->bt_mem_end, node->regnum)
BIT_STATUS_AT    1023 regcomp.c            if (BIT_STATUS_AT(reg->bt_mem_end, node->regnum))
BIT_STATUS_AT    1034 regcomp.c          if (BIT_STATUS_AT(reg->bt_mem_start, node->regnum))
BIT_STATUS_AT    1045 regcomp.c            if (BIT_STATUS_AT(reg->bt_mem_end, node->regnum))
BIT_STATUS_AT    1060 regcomp.c            if (BIT_STATUS_AT(reg->bt_mem_end, node->regnum))
BIT_STATUS_AT    1631 regcomp.c          if (BIT_STATUS_AT(loc, i)) {
BIT_STATUS_AT    4273 regcomp.c      	    if (BIT_STATUS_AT(env->scan_env->backrefed_mem, en->regnum))
BIT_STATUS_AT     780 regexec.c                    if (BIT_STATUS_AT(reg->bt_mem_end, k->u.mem.num))\
BIT_STATUS_AT     821 regexec.c                      if (BIT_STATUS_AT(reg->bt_mem_end, k->u.mem.num))\
BIT_STATUS_AT     962 regexec.c                BIT_STATUS_AT(reg->capture_history, n) != 0) {
BIT_STATUS_AT    1284 regexec.c      		if (BIT_STATUS_AT(reg->bt_mem_start, i))
BIT_STATUS_AT    1289 regexec.c      		rmt[i].rm_eo = (BIT_STATUS_AT(reg->bt_mem_end, i)
BIT_STATUS_AT    1304 regexec.c      		if (BIT_STATUS_AT(reg->bt_mem_start, i))
BIT_STATUS_AT    1309 regexec.c      		region->end[i] = (BIT_STATUS_AT(reg->bt_mem_end, i)
BIT_STATUS_AT    2023 regexec.c            if (BIT_STATUS_AT(reg->bt_mem_start, mem))
BIT_STATUS_AT    2062 regexec.c      	if (BIT_STATUS_AT(reg->bt_mem_start, mem))
BIT_STATUS_AT    2067 regexec.c      	pend = (BIT_STATUS_AT(reg->bt_mem_end, mem)
BIT_STATUS_AT    2094 regexec.c      	if (BIT_STATUS_AT(reg->bt_mem_start, mem))
BIT_STATUS_AT    2099 regexec.c      	pend = (BIT_STATUS_AT(reg->bt_mem_end, mem)
BIT_STATUS_AT    2126 regexec.c      	  if (BIT_STATUS_AT(reg->bt_mem_start, mem))
BIT_STATUS_AT    2131 regexec.c      	  pend = (BIT_STATUS_AT(reg->bt_mem_end, mem)
BIT_STATUS_AT    2165 regexec.c      	  if (BIT_STATUS_AT(reg->bt_mem_start, mem))
BIT_STATUS_AT    2170 regexec.c      	  pend = (BIT_STATUS_AT(reg->bt_mem_end, mem)
BIT_STATUS_AT    3529 regexec.c          if (BIT_STATUS_AT(reg->capture_history, i) != 0)


BIT_STATUS_BITS_NUM

BIT_STATUS_BITS_NUM  348 regint.h         ((n) < BIT_STATUS_BITS_NUM  ?  ((stats) & (1 << n)) : ((stats) & 1))
BIT_STATUS_BITS_NUM  351 regint.h         if ((n) < BIT_STATUS_BITS_NUM)\
BIT_STATUS_BITS_NUM  358 regint.h         if ((n) < BIT_STATUS_BITS_NUM)\
BIT_STATUS_BITS_NUM 4301 regparse.c     	if (list_capture != 0 && num >= BIT_STATUS_BITS_NUM)
BIT_STATUS_BITS_NUM 4337 regparse.c     	else if (num >= BIT_STATUS_BITS_NUM) {


BIT_STATUS_CLEAR

BIT_STATUS_CLEAR 1629 regcomp.c        BIT_STATUS_CLEAR(env->capture_history);
BIT_STATUS_CLEAR  896 regparse.c       BIT_STATUS_CLEAR(env->capture_history);
BIT_STATUS_CLEAR  897 regparse.c       BIT_STATUS_CLEAR(env->bt_mem_start);
BIT_STATUS_CLEAR  898 regparse.c       BIT_STATUS_CLEAR(env->bt_mem_end);
BIT_STATUS_CLEAR  899 regparse.c       BIT_STATUS_CLEAR(env->backrefed_mem);


BIT_STATUS_ON_AT

BIT_STATUS_ON_AT 2818 regcomp.c      	BIT_STATUS_ON_AT(env->bt_mem_start, cn->ref_num);
BIT_STATUS_ON_AT 3117 regcomp.c      	BIT_STATUS_ON_AT(env->backrefed_mem, p[i]);
BIT_STATUS_ON_AT 3118 regcomp.c      	BIT_STATUS_ON_AT(env->bt_mem_start, p[i]);
BIT_STATUS_ON_AT 3220 regcomp.c      	  BIT_STATUS_ON_AT(env->bt_mem_start, en->regnum);


BIT_STATUS_ON_AT_SIMPLE

BIT_STATUS_ON_AT_SIMPLE 1632 regcomp.c            BIT_STATUS_ON_AT_SIMPLE(env->capture_history, map[i].new_val);
BIT_STATUS_ON_AT_SIMPLE 4310 regparse.c     	  BIT_STATUS_ON_AT_SIMPLE(env->capture_history, num);
BIT_STATUS_ON_AT_SIMPLE 4342 regparse.c     	BIT_STATUS_ON_AT_SIMPLE(env->capture_history, num);


BLOCK_D_SCOPE

BLOCK_D_SCOPE     725 eval.c             _block.flags = BLOCK_D_SCOPE;	\
BLOCK_D_SCOPE    3011 eval.c         		    _block.flags &= ~BLOCK_D_SCOPE;
BLOCK_D_SCOPE    4680 eval.c             if (block->flags & BLOCK_D_SCOPE) {
BLOCK_D_SCOPE    4850 eval.c             if (ruby_dyna_vars && (block->flags & BLOCK_D_SCOPE) &&


BLOCK_FOLD

BLOCK_FOLD       2352 ext/syck/token.c             case '>': blockType = BLOCK_FOLD; break;
BLOCK_FOLD       2429 ext/syck/token.c                         if ( blockType == BLOCK_FOLD && lastIndent == 0 && ( indt_len - lvl->spaces ) == 0 )
BLOCK_FOLD       2543 ext/syck/token.c                             if ( blockType == BLOCK_FOLD && qidx > 0 )


BLOCK_FROM_METHOD

BLOCK_FROM_METHOD 4804 eval.c         	    if ((block->flags&BLOCK_FROM_METHOD) && RTEST(block->block_obj)) {
BLOCK_FROM_METHOD 9243 eval.c             bdata->flags |= BLOCK_FROM_METHOD;


BLOCK_LAMBDA

BLOCK_LAMBDA     8118 eval.c         	data->flags |= BLOCK_LAMBDA;
BLOCK_LAMBDA     8213 eval.c             pcall = (data->flags & BLOCK_LAMBDA) ? YIELD_LAMBDA_CALL : 0;


BLOCK_LIT

BLOCK_LIT         170 ext/syck/token.c         if ( blockType == BLOCK_LIT ) { \
BLOCK_LIT        2351 ext/syck/token.c             case '|': blockType = BLOCK_LIT; break;


BN_nnmod

BN_nnmod          219 ext/openssl/openssl_missing.c     return BN_nnmod(r, r, m, ctx);
BN_nnmod          228 ext/openssl/openssl_missing.c     return BN_nnmod(r, r, m, ctx);


BSD__sfvwrite

BSD__sfvwrite    1101 missing/vsnprintf.c 	f.vwrite = BSD__sfvwrite;
BSD__sfvwrite    1138 missing/vsnprintf.c 	f.vwrite = BSD__sfvwrite;


BSD__sprint

BSD__sprint       526 missing/vsnprintf.c 		if (BSD__sprint(fp, &uio)) \
BSD__sprint       541 missing/vsnprintf.c 	if (uio.uio_resid && BSD__sprint(fp, &uio)) \


BSD_vfprintf

BSD_vfprintf     1102 missing/vsnprintf.c 	ret = BSD_vfprintf(&f, fmt, ap);
BSD_vfprintf     1139 missing/vsnprintf.c 	ret = BSD_vfprintf(&f, fmt, ap);
BSD_vfprintf      884 sprintf.c          BSD_vfprintf(&f, fmt, ap);


BS_BIT

BS_BIT            418 regint.h       #define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
BS_BIT            419 regint.h       #define BITSET_SET_BIT(bs, pos)     BS_ROOM(bs,pos) |= BS_BIT(pos)
BS_BIT            420 regint.h       #define BITSET_CLEAR_BIT(bs, pos)   BS_ROOM(bs,pos) &= ~(BS_BIT(pos))
BS_BIT            421 regint.h       #define BITSET_INVERT_BIT(bs, pos)  BS_ROOM(bs,pos) ^= BS_BIT(pos)


BS_ROOM

BS_ROOM           418 regint.h       #define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
BS_ROOM           419 regint.h       #define BITSET_SET_BIT(bs, pos)     BS_ROOM(bs,pos) |= BS_BIT(pos)
BS_ROOM           420 regint.h       #define BITSET_CLEAR_BIT(bs, pos)   BS_ROOM(bs,pos) &= ~(BS_BIT(pos))
BS_ROOM           421 regint.h       #define BITSET_INVERT_BIT(bs, pos)  BS_ROOM(bs,pos) ^= BS_BIT(pos)


BUF

BUF               503 missing/vsnprintf.c 	char buf[BUF];		/* space for %c, %[diouxX], %[eEfgG] */
BUF               878 missing/vsnprintf.c 			cp = buf + BUF;
BUF               892 missing/vsnprintf.c 			size = buf + BUF - cp;


BUFCHECK

BUFCHECK         2417 file.c         	    BUFCHECK(dirlen > buflen);
BUFCHECK         2437 file.c         	    BUFCHECK(bdiff + (s-b) >= buflen);
BUFCHECK         2448 file.c         	    BUFCHECK(dirlen > buflen);
BUFCHECK         2461 file.c         	    BUFCHECK(bdiff + 2 >= buflen);
BUFCHECK         2482 file.c         		BUFCHECK(dirlen > buflen);
BUFCHECK         2501 file.c         	    BUFCHECK(dirlen > buflen);
BUFCHECK         2519 file.c         	BUFCHECK(bdiff >= buflen);
BUFCHECK         2570 file.c         		BUFCHECK(bdiff + (s-b+1) >= buflen);
BUFCHECK         2585 file.c         	BUFCHECK(bdiff + (s-b) >= buflen);


BUFINIT

BUFINIT          2406 file.c             BUFINIT();
BUFINIT          2471 file.c         		BUFINIT();
BUFINIT          2494 file.c         	    BUFINIT();


BUFSIZE

BUFSIZE          1113 ext/strscan/strscan.c     char buf[BUFSIZE];
BUFSIZE          1119 ext/strscan/strscan.c         len = snprintf(buf, BUFSIZE, "#<%s (uninitialized)>",
BUFSIZE          1124 ext/strscan/strscan.c         len = snprintf(buf, BUFSIZE, "#<%s fin>",
BUFSIZE          1130 ext/strscan/strscan.c         len = snprintf(buf, BUFSIZE, "#<%s %ld/%ld @ %s>",
BUFSIZE          1138 ext/strscan/strscan.c     len = snprintf(buf, BUFSIZE, "#<%s %ld/%ld %s @ %s>",
BUFSIZE          1150 ext/strscan/strscan.c     char buf[BUFSIZE];
BUFSIZE          1170 ext/strscan/strscan.c     char buf[BUFSIZE];


BUILTIN_TYPE

BUILTIN_TYPE      118 class.c        	if (BUILTIN_TYPE(obj) == T_CLASS) {
BUILTIN_TYPE      154 class.c            if (BUILTIN_TYPE(obj) == T_CLASS && FL_TEST(obj, FL_SINGLETON)) {
BUILTIN_TYPE      323 class.c            if (BUILTIN_TYPE(module) == T_ICLASS) {
BUILTIN_TYPE      371 class.c        	    switch (BUILTIN_TYPE(p)) {
BUILTIN_TYPE      418 class.c        	if (BUILTIN_TYPE(p) == T_ICLASS) {
BUILTIN_TYPE      451 class.c        	if (BUILTIN_TYPE(p) == T_ICLASS) {
BUILTIN_TYPE      482 class.c        	if (BUILTIN_TYPE(p) == T_ICLASS) {
BUILTIN_TYPE      572 class.c        	if (BUILTIN_TYPE(mod) == T_ICLASS) continue;
BUILTIN_TYPE     2695 eval.c             else if (BUILTIN_TYPE(node) != T_NODE) {
BUILTIN_TYPE     2696 eval.c                 rb_bug("not a node 0x%02lx (%p)", BUILTIN_TYPE(node), node);
BUILTIN_TYPE     1836 gc.c           	    if (BUILTIN_TYPE(p) == T_DATA &&
BUILTIN_TYPE     1847 gc.c           	    else if (BUILTIN_TYPE(p) == T_FILE) {
BUILTIN_TYPE     1894 gc.c               if (!is_pointer_to_heap((void *)ptr)|| BUILTIN_TYPE(ptr) >= T_BLOCK) {
BUILTIN_TYPE     1897 gc.c               if (BUILTIN_TYPE(ptr) == 0 || RBASIC(ptr)->klass == 0) {
BUILTIN_TYPE      352 marshal.c          while (BUILTIN_TYPE(klass) == T_ICLASS) {
BUILTIN_TYPE      486 marshal.c      	switch (BUILTIN_TYPE(obj)) {
BUILTIN_TYPE      469 ruby.h         #define FL_ABLE(x) (!SPECIAL_CONST_P(x) && BUILTIN_TYPE(x) != T_NODE)
BUILTIN_TYPE      696 ruby.h             return BUILTIN_TYPE(obj);
BUILTIN_TYPE     1300 variable.c         if (!exclude && !mod_retry && BUILTIN_TYPE(klass) == T_MODULE) {
BUILTIN_TYPE     1455 variable.c         if (!exclude && !mod_retry && BUILTIN_TYPE(klass) == T_MODULE) {
BUILTIN_TYPE     1489 variable.c     	if (BUILTIN_TYPE(klass) == T_MODULE) {


BYTESIZ

BYTESIZ           220 ext/sdbm/_sdbm.c 				db->maxbno = dstat.st_size * (long) BYTESIZ;
BYTESIZ           536 ext/sdbm/_sdbm.c 	c = dbit / BYTESIZ;
BYTESIZ           548 ext/sdbm/_sdbm.c 	return db->dirbuf[c % DBLKSIZ] & (1 << (dbit % BYTESIZ));
BYTESIZ           559 ext/sdbm/_sdbm.c 	c = dbit / BYTESIZ;
BYTESIZ           571 ext/sdbm/_sdbm.c 	db->dirbuf[c % DBLKSIZ] |= (1 << (dbit % BYTESIZ));
BYTESIZ           574 ext/sdbm/_sdbm.c 		db->maxbno += (long) DBLKSIZ * BYTESIZ;


BYTES_TO_DWORD

BYTES_TO_DWORD    385 ext/digest/rmd160/rmd160.c                         X[j] = BYTES_TO_DWORD(context->bbuffer + (4 * j));
BYTES_TO_DWORD    396 ext/digest/rmd160/rmd160.c                                 X[j] = BYTES_TO_DWORD(data + (64 * i) + (4 * j) + ofs);
BYTES_TO_DWORD    432 ext/digest/rmd160/rmd160.c 		X[j] = BYTES_TO_DWORD(context->bbuffer + (4 * j));


B_MASK

B_MASK            251 regint.h         *(p)     = ((i) >> B_SHIFT) & B_MASK;\
B_MASK            252 regint.h         *((p)+1) = (i) & B_MASK;\
B_MASK            256 regint.h         *(p)     = ((i) >> B_SHIFT*3) & B_MASK;\
B_MASK            257 regint.h         *((p)+1) = ((i) >> B_SHIFT*2) & B_MASK;\
B_MASK            258 regint.h         *((p)+2) = ((i) >> B_SHIFT  ) & B_MASK;\
B_MASK            259 regint.h         *((p)+3) = (i) & B_MASK;\
B_MASK            263 regint.h         *(p)     = ((i) >> B_SHIFT*7) & B_MASK;\
B_MASK            264 regint.h         *((p)+1) = ((i) >> B_SHIFT*6) & B_MASK;\
B_MASK            265 regint.h         *((p)+2) = ((i) >> B_SHIFT*5) & B_MASK;\
B_MASK            266 regint.h         *((p)+3) = ((i) >> B_SHIFT*4) & B_MASK;\
B_MASK            267 regint.h         *((p)+4) = ((i) >> B_SHIFT*3) & B_MASK;\
B_MASK            268 regint.h         *((p)+5) = ((i) >> B_SHIFT*2) & B_MASK;\
B_MASK            269 regint.h         *((p)+6) = ((i) >> B_SHIFT  ) & B_MASK;\
B_MASK            270 regint.h         *((p)+7) = (i) & B_MASK;\


B_SHIFT

B_SHIFT           251 regint.h         *(p)     = ((i) >> B_SHIFT) & B_MASK;\
B_SHIFT           256 regint.h         *(p)     = ((i) >> B_SHIFT*3) & B_MASK;\
B_SHIFT           257 regint.h         *((p)+1) = ((i) >> B_SHIFT*2) & B_MASK;\
B_SHIFT           258 regint.h         *((p)+2) = ((i) >> B_SHIFT  ) & B_MASK;\
B_SHIFT           263 regint.h         *(p)     = ((i) >> B_SHIFT*7) & B_MASK;\
B_SHIFT           264 regint.h         *((p)+1) = ((i) >> B_SHIFT*6) & B_MASK;\
B_SHIFT           265 regint.h         *((p)+2) = ((i) >> B_SHIFT*5) & B_MASK;\
B_SHIFT           266 regint.h         *((p)+3) = ((i) >> B_SHIFT*4) & B_MASK;\
B_SHIFT           267 regint.h         *((p)+4) = ((i) >> B_SHIFT*3) & B_MASK;\
B_SHIFT           268 regint.h         *((p)+5) = ((i) >> B_SHIFT*2) & B_MASK;\
B_SHIFT           269 regint.h         *((p)+6) = ((i) >> B_SHIFT  ) & B_MASK;\
B_SHIFT           274 regint.h         (i) = (type )(((unsigned int )(*(p)) << B_SHIFT) | (unsigned int )((p)[1]));\
B_SHIFT           279 regint.h         (i) = (type )(((unsigned int )((p)[0]) << B_SHIFT*3) | \
B_SHIFT           280 regint.h       		((unsigned int )((p)[1]) << B_SHIFT*2) | \
B_SHIFT           281 regint.h       		((unsigned int )((p)[2]) << B_SHIFT  ) | \
B_SHIFT           287 regint.h         (i) = (type )(((unsigned long )((p)[0]) << B_SHIFT*7) | \
B_SHIFT           288 regint.h       		((unsigned long )((p)[1]) << B_SHIFT*6) | \
B_SHIFT           289 regint.h       		((unsigned long )((p)[2]) << B_SHIFT*5) | \
B_SHIFT           290 regint.h       		((unsigned long )((p)[3]) << B_SHIFT*4) | \
B_SHIFT           291 regint.h       		((unsigned long )((p)[4]) << B_SHIFT*3) | \
B_SHIFT           292 regint.h       		((unsigned long )((p)[5]) << B_SHIFT*2) | \
B_SHIFT           293 regint.h       		((unsigned long )((p)[6]) << B_SHIFT  ) | \


BackrefNode

BackrefNode      1269 regcomp.c            BackrefNode* br = &(NBACKREF(node));
BackrefNode      1385 regcomp.c            BackrefNode* br = &(NBACKREF(node));
BackrefNode      1518 regcomp.c        BackrefNode* bn = &(NBACKREF(node));
BackrefNode      1745 regcomp.c            BackrefNode* br = &(NBACKREF(node));
BackrefNode      1912 regcomp.c            BackrefNode* br = &(NBACKREF(node));
BackrefNode      3113 regcomp.c            BackrefNode* br = &(NBACKREF(node));
BackrefNode      4151 regcomp.c            BackrefNode* br = &(NBACKREF(node));
BackrefNode      5480 regcomp.c            BackrefNode* br = &(NBACKREF(node));
BackrefNode       233 regparse.h         BackrefNode   backref;


BigDecimalCmp

BigDecimalCmp     542 ext/bigdecimal/bigdecimal.c     return BigDecimalCmp(self, r, '*');
BigDecimalCmp     548 ext/bigdecimal/bigdecimal.c     return BigDecimalCmp(self, r, '=');
BigDecimalCmp     554 ext/bigdecimal/bigdecimal.c     return BigDecimalCmp(self, r, '!');
BigDecimalCmp     560 ext/bigdecimal/bigdecimal.c     return BigDecimalCmp(self, r, '<');
BigDecimalCmp     566 ext/bigdecimal/bigdecimal.c     return BigDecimalCmp(self, r, 'L');
BigDecimalCmp     572 ext/bigdecimal/bigdecimal.c     return BigDecimalCmp(self, r, '>');
BigDecimalCmp     578 ext/bigdecimal/bigdecimal.c     return BigDecimalCmp(self, r, 'G');


BigDecimal_DoDivmod

BigDecimal_DoDivmod  715 ext/bigdecimal/bigdecimal.c     obj = BigDecimal_DoDivmod(self,r,&div,&mod);
BigDecimal_DoDivmod  775 ext/bigdecimal/bigdecimal.c     obj = BigDecimal_DoDivmod(self,r,&div,&mod);
BigDecimal_DoDivmod  792 ext/bigdecimal/bigdecimal.c        obj = BigDecimal_DoDivmod(self,b,&div,&mod);


BigDecimal_add

BigDecimal_add    824 ext/bigdecimal/bigdecimal.c     if(mx==0) return BigDecimal_add(self,b);
BigDecimal_add    827 ext/bigdecimal/bigdecimal.c        VALUE   c = BigDecimal_add(self,b);
BigDecimal_add   1307 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "+", BigDecimal_add, 1);


BigDecimal_delete

BigDecimal_delete   98 ext/bigdecimal/bigdecimal.c         if(RDATA(v)->dfree ==(void *) BigDecimal_delete) {
BigDecimal_delete  300 ext/bigdecimal/bigdecimal.c     pv->obj = (VALUE)Data_Wrap_Struct(klass, 0, BigDecimal_delete, pv);
BigDecimal_delete  308 ext/bigdecimal/bigdecimal.c     pv->obj = (VALUE)Data_Wrap_Struct(rb_cBigDecimal, 0, BigDecimal_delete, pv);


BigDecimal_div

BigDecimal_div    797 ext/bigdecimal/bigdecimal.c        if(ix==0) return BigDecimal_div(self,b);
BigDecimal_div   1312 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "/", BigDecimal_div, 1);
BigDecimal_div   1313 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "quo", BigDecimal_div, 1);


BigDecimal_eq

BigDecimal_eq    1330 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "==", BigDecimal_eq, 1);
BigDecimal_eq    1331 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "===", BigDecimal_eq, 1);
BigDecimal_eq    1332 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "eql?", BigDecimal_eq, 1);


BigDecimal_mod

BigDecimal_mod   1314 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "%", BigDecimal_mod, 1);
BigDecimal_mod   1315 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "modulo", BigDecimal_mod, 1);


BigDecimal_mult

BigDecimal_mult   858 ext/bigdecimal/bigdecimal.c     if(mx==0) return BigDecimal_mult(self,b);
BigDecimal_mult   861 ext/bigdecimal/bigdecimal.c        VALUE   c = BigDecimal_mult(self,b);
BigDecimal_mult  1311 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "*", BigDecimal_mult, 1);


BigDecimal_power

BigDecimal_power 1327 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "power", BigDecimal_power, 1);
BigDecimal_power 1328 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "**", BigDecimal_power, 1);


BigDecimal_sub

BigDecimal_sub    841 ext/bigdecimal/bigdecimal.c     if(mx==0) return BigDecimal_sub(self,b);
BigDecimal_sub    844 ext/bigdecimal/bigdecimal.c        VALUE   c = BigDecimal_sub(self,b);
BigDecimal_sub   1308 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "-", BigDecimal_sub, 1);


BigDecimal_to_f

BigDecimal_to_f   429 ext/bigdecimal/bigdecimal.c        obj = rb_assoc_new(other, BigDecimal_to_f(self));
BigDecimal_to_f  1319 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "to_f", BigDecimal_to_f, 0);


BigDecimal_to_i

BigDecimal_to_i  1304 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "to_i", BigDecimal_to_i, 0);
BigDecimal_to_i  1305 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "to_int", BigDecimal_to_i, 0);


BitSetRef

BitSetRef        5251 regcomp.c            n = bitset_on_num((BitSetRef )bp);
BitSetRef        5257 regcomp.c            n = bitset_on_num((BitSetRef )bp);
BitSetRef        5276 regcomp.c            n = bitset_on_num((BitSetRef )bp);
BitSetRef        1610 regexec.c            if (BITSET_AT(((BitSetRef )p), *s) == 0) goto fail;
BitSetRef        1652 regexec.c      	if (BITSET_AT(((BitSetRef )p), *s) == 0)
BitSetRef        1665 regexec.c            if (BITSET_AT(((BitSetRef )p), *s) != 0) goto fail;
BitSetRef        1719 regexec.c      	if (BITSET_AT(((BitSetRef )p), *s) != 0)
BitSetRef        1899 regparse.c       BitSetRef bsr1, bsr2;
BitSetRef        1957 regparse.c       BitSetRef bsr1, bsr2;
BitSetRef        4905 regparse.c             BitSetRef bs = cc->bs;


BitStatusType

BitStatusType    1606 regcomp.c        BitStatusType loc;
BitStatusType     344 regint.h       #define BIT_STATUS_BITS_NUM          (sizeof(BitStatusType) * 8)
BitStatusType     346 regint.h       #define BIT_STATUS_ON_ALL(stats)     (stats) = ~((BitStatusType )0)
BitStatusType     257 regparse.h       BitStatusType   capture_history;
BitStatusType     258 regparse.h       BitStatusType   bt_mem_start;
BitStatusType     259 regparse.h       BitStatusType   bt_mem_end;
BitStatusType     260 regparse.h       BitStatusType   backrefed_mem;


Bits

Bits              397 regint.h       #define BITS_IN_ROOM       (sizeof(Bits) * BITS_PER_BYTE)
Bits              405 regint.h       typedef Bits           BitSet[BITSET_SIZE];
Bits              406 regint.h       typedef Bits*          BitSetRef;
Bits              150 regparse.c         bs[i] = ~((Bits )0);


C

C                10257 eval.c         static volatile int C(a), C(b), C(c), C(d), C(e);
C                10258 eval.c         static volatile int C(f), C(g), C(h), C(i), C(j);
C                10259 eval.c         static volatile int C(k), C(l), C(m), C(n), C(o);
C                10260 eval.c         static volatile int C(p), C(q), C(r), C(s), C(t);
C                  25 ext/digest/md5/md5ossl.c       && pctx1->C == pctx2->C
C                  39 ext/digest/rmd160/rmd160ossl.c 	  && pctx1->C == pctx2->C
C                 428 util.c                s = A[0]; A[0] = B[0]; B[0] = C[0]; C[0] = s;
C                 429 util.c                s = A[1]; A[1] = B[1]; B[1] = C[1]; C[1] = s;
C                 430 util.c                s = A[2]; A[2] = B[2]; B[2] = C[2]; C[2] = s;
C                 431 util.c                s = A[3]; A[3] = B[3]; B[3] = C[3]; C[3] = s; a += 16; b += 16; c += 16;
C                 434 util.c            if (low != 0) { s = A[0]; A[0] = B[0]; B[0] = C[0]; C[0] = s;
C                 435 util.c              if (low >= 8) { s = A[1]; A[1] = B[1]; B[1] = C[1]; C[1] = s;
C                 436 util.c                if (low == 12) {s = A[2]; A[2] = B[2]; B[2] = C[2]; C[2] = s;}}}


CACHE_SIZE

CACHE_SIZE        312 eval.c         static struct cache_entry cache[CACHE_SIZE];
CACHE_SIZE        321 eval.c             ent = cache; end = ent + CACHE_SIZE;
CACHE_SIZE        334 eval.c             ent = cache; end = ent + CACHE_SIZE;
CACHE_SIZE        349 eval.c             ent = cache; end = ent + CACHE_SIZE;
CACHE_SIZE        364 eval.c             ent = cache; end = ent + CACHE_SIZE;


CALLING_FCALL

CALLING_FCALL    3249 eval.c         		scope = CALLING_FCALL;
CALLING_FCALL    3293 eval.c         	    result = rb_call(CLASS_OF(self),self,node->nd_mid,argc,argv,CALLING_FCALL);
CALLING_FCALL    5070 eval.c         		scope = CALLING_FCALL;
CALLING_FCALL    5828 eval.c             return rb_call(CLASS_OF(recv), recv, mid, argc, argv, CALLING_FCALL);
CALLING_FCALL    5872 eval.c             calling_scope_t scope = (ruby_frame->flags & FRAME_FUNC) ? CALLING_FCALL : CALLING_NORMAL;
CALLING_FCALL    5892 eval.c             return send_funcall(argc, argv, recv, CALLING_FCALL);
CALLING_FCALL    5916 eval.c             return rb_call(CLASS_OF(recv), recv, mid, n, argv, CALLING_FCALL);
CALLING_FCALL    5922 eval.c             return rb_call(CLASS_OF(recv), recv, mid, argc, argv, CALLING_FCALL);


CALLING_NORMAL

CALLING_NORMAL   3017 eval.c         		    result = rb_call(CLASS_OF(recv),recv,each,0,0,CALLING_NORMAL);
CALLING_NORMAL   3253 eval.c         		scope = CALLING_NORMAL;
CALLING_NORMAL   3278 eval.c         	    result = rb_call(CLASS_OF(recv),recv,node->nd_mid,argc,argv,CALLING_NORMAL);
CALLING_NORMAL   5074 eval.c         		scope = CALLING_NORMAL;
CALLING_NORMAL   5797 eval.c             if (mid != missing && scope == CALLING_NORMAL) {
CALLING_NORMAL   5813 eval.c             if (scope > CALLING_NORMAL) { /* pass receiver info */
CALLING_NORMAL   5872 eval.c             calling_scope_t scope = (ruby_frame->flags & FRAME_FUNC) ? CALLING_FCALL : CALLING_NORMAL;
CALLING_NORMAL   5928 eval.c             return rb_call(CLASS_OF(recv), recv, mid, argc, argv, CALLING_NORMAL);


CALLING_SUPER

CALLING_SUPER    5791 eval.c         	if (scope == CALLING_SUPER) {
CALLING_SUPER    5948 eval.c             result = rb_call(RCLASS(klass)->super, self, ruby_frame->this_func, argc, argv, CALLING_SUPER);


CALLING_VCALL

CALLING_VCALL    3299 eval.c         	result = rb_call(CLASS_OF(self),self,node->nd_mid,0,0,CALLING_VCALL);
CALLING_VCALL    5784 eval.c         	    return method_missing(recv, mid, argc, argv, scope==CALLING_VCALL?CSTAT_VCALL:0);
CALLING_VCALL    5794 eval.c         	return method_missing(recv, mid, argc, argv, scope==CALLING_VCALL?CSTAT_VCALL:0);


CALL_CASE

CALL_CASE         280 ext/dl/cfunc.c 	    CALL_CASE;
CALL_CASE         290 ext/dl/cfunc.c 	    CALL_CASE;
CALL_CASE         300 ext/dl/cfunc.c 	    CALL_CASE;
CALL_CASE         310 ext/dl/cfunc.c 	    CALL_CASE;
CALL_CASE         320 ext/dl/cfunc.c 	    CALL_CASE;
CALL_CASE         330 ext/dl/cfunc.c 	    CALL_CASE;
CALL_CASE         341 ext/dl/cfunc.c 	    CALL_CASE;
CALL_CASE         352 ext/dl/cfunc.c 	    CALL_CASE;
CALL_CASE         362 ext/dl/cfunc.c 	    CALL_CASE;
CALL_CASE         378 ext/dl/cfunc.c 	    CALL_CASE;
CALL_CASE         388 ext/dl/cfunc.c 	    CALL_CASE;
CALL_CASE         398 ext/dl/cfunc.c 	    CALL_CASE;
CALL_CASE         408 ext/dl/cfunc.c 	    CALL_CASE;
CALL_CASE         418 ext/dl/cfunc.c 	    CALL_CASE;
CALL_CASE         428 ext/dl/cfunc.c 	    CALL_CASE;
CALL_CASE         439 ext/dl/cfunc.c 	    CALL_CASE;
CALL_CASE         450 ext/dl/cfunc.c 	    CALL_CASE;
CALL_CASE         460 ext/dl/cfunc.c 	    CALL_CASE;


CASE

CASE              235 ext/dl/cfunc.c   CASE(0); break; \
CASE              236 ext/dl/cfunc.c   CASE(1); break; CASE(2); break; CASE(3); break; CASE(4); break; CASE(5); break; \
CASE              237 ext/dl/cfunc.c   CASE(6); break; CASE(7); break; CASE(8); break; CASE(9); break; CASE(10);break; \
CASE              238 ext/dl/cfunc.c   CASE(11);break; CASE(12);break; CASE(13);break; CASE(14);break; CASE(15);break; \
CASE              239 ext/dl/cfunc.c   CASE(16);break; CASE(17);break; CASE(18);break; CASE(19);break; CASE(20);break; \


CASEFOLD_FILESYSTEM

CASEFOLD_FILESYSTEM   70 dir.c          #ifndef CASEFOLD_FILESYSTEM
CASEFOLD_FILESYSTEM   82 dir.c          #if CASEFOLD_FILESYSTEM


CAT

CAT              1004 ext/syck/bytecode.c {   CAT(str, cap, idx, tok[0]);
CAT              1059 ext/syck/bytecode.c                     CAT(str, cap, idx, '\n');
CAT              1064 ext/syck/bytecode.c                 CAT(str, cap, idx, '\n');
CAT              1074 ext/syck/bytecode.c             CAT(str, cap, idx, '\0');
CAT              1142 ext/syck/bytecode.c {   CAT(str, cap, idx, tok[0]);


CCLASS_CLEAR_NOT

CCLASS_CLEAR_NOT 1888 regparse.c         CCLASS_CLEAR_NOT(cc);
CCLASS_CLEAR_NOT 4203 regparse.c         CCLASS_CLEAR_NOT(cc);


CCLASS_SET_NOT

CCLASS_SET_NOT   1120 regparse.c       if (not != 0) CCLASS_SET_NOT(cc);
CCLASS_SET_NOT   3766 regparse.c       if (tok->u.prop.not != 0) CCLASS_SET_NOT(cc);
CCLASS_SET_NOT   4201 regparse.c         CCLASS_SET_NOT(cc);
CCLASS_SET_NOT   4874 regparse.c                 if (not != 0) CCLASS_SET_NOT(cc);


CC_ESC_WARN

CC_ESC_WARN      2797 regparse.c     	CC_ESC_WARN(env, "[");
CC_ESC_WARN      3938 regparse.c         CC_ESC_WARN(env, "]");
CC_ESC_WARN      4041 regparse.c     	CC_ESC_WARN(env, "[");
CC_ESC_WARN      4087 regparse.c     	  CC_ESC_WARN(env, "-");
CC_ESC_WARN      4102 regparse.c     	  CC_ESC_WARN(env, "-");
CC_ESC_WARN      4107 regparse.c     	CC_ESC_WARN(env, "-");
CC_ESC_WARN      4116 regparse.c     	  CC_ESC_WARN(env, "-");
CC_ESC_WARN      4121 regparse.c     	  CC_ESC_WARN(env, "-");


CClassNode

CClassNode       2201 regcomp.c            CClassNode* xc = &(NCCLASS(x));
CClassNode       2240 regcomp.c      	  CClassNode* yc = &(NCCLASS(y));
CClassNode       2292 regcomp.c      	  CClassNode* cc = &(NCCLASS(y));
CClassNode       4044 regcomp.c            CClassNode* cc = &(NCCLASS(node));
CClassNode       5290 regcomp.c              CClassNode *cc;
CClassNode       1171 regexec.c        CClassNode* cc = (CClassNode* )node;
CClassNode       1006 regparse.c           CClassNode* cc = &(NCCLASS(node));
CClassNode       1111 regparse.c       CClassNode* cc;
CClassNode       3756 regparse.c       CClassNode* cc;
CClassNode       3914 regparse.c       CClassNode *cc, *prev_cc;
CClassNode       3915 regparse.c       CClassNode work_cc;
CClassNode       3921 regparse.c       prev_cc = (CClassNode* )NULL;
CClassNode       4132 regparse.c     	CClassNode* acc;
CClassNode       4657 regparse.c         CClassNode* cc = &(NCCLASS(node));
CClassNode       4818 regparse.c     	  CClassNode* cc;
CClassNode       4895 regparse.c           CClassNode* cc;
CClassNode        227 regparse.h         CClassNode    cclass;


CFUNC_CDECL

CFUNC_CDECL       105 ext/dl/cfunc.c   data->calltype = CFUNC_CDECL;
CFUNC_CDECL       128 ext/dl/cfunc.c     data->calltype = (calltype == Qnil) ? CFUNC_CDECL : SYM2ID(calltype);
CFUNC_CDECL       272 ext/dl/cfunc.c     if( cfunc->calltype == CFUNC_CDECL ){
CFUNC_CDECL       241 ext/dl/cptr.c    return rb_dlcfunc_new(pdata->free, DLTYPE_VOID, "free<anonymous>", CFUNC_CDECL);


CH2FIX

CH2FIX            377 ext/curses/curses.c     return CH2FIX(inch());
CH2FIX           1086 ext/curses/curses.c     return CH2FIX(winch(winp->window));
CH2FIX           1367 ext/curses/curses.c   return (c = getbkgd(winp->window) != ERR) ? CH2FIX(c) : Qnil;


CHAR64LONG16

CHAR64LONG16       77 ext/digest/sha1/sha1.c void do_R01(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *);
CHAR64LONG16       78 ext/digest/sha1/sha1.c void do_R2(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *);
CHAR64LONG16       79 ext/digest/sha1/sha1.c void do_R3(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *);
CHAR64LONG16       80 ext/digest/sha1/sha1.c void do_R4(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *);
CHAR64LONG16       89 ext/digest/sha1/sha1.c do_R01(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *block)
CHAR64LONG16       99 ext/digest/sha1/sha1.c do_R2(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *block)
CHAR64LONG16      109 ext/digest/sha1/sha1.c do_R3(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *block)
CHAR64LONG16      119 ext/digest/sha1/sha1.c do_R4(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *block)
CHAR64LONG16      137 ext/digest/sha1/sha1.c     CHAR64LONG16 *block;
CHAR64LONG16      140 ext/digest/sha1/sha1.c     CHAR64LONG16 workspace;
CHAR64LONG16      150 ext/digest/sha1/sha1.c     block = (CHAR64LONG16 *)(void *)buffer;


CHAR_BIT

CHAR_BIT           28 bignum.c       #define BITSPERDIG (SIZEOF_BDIGITS*CHAR_BIT)
CHAR_BIT          409 bignum.c           if (len <= (sizeof(VALUE)*CHAR_BIT)) {
CHAR_BIT          603 bignum.c           j = SIZEOF_BDIGITS*CHAR_BIT*i;
CHAR_BIT          906 dir.c          #define GLOB_VERBOSE	(1 << (sizeof(int) * CHAR_BIT - 1))
CHAR_BIT          792 ext/stringio/stringio.c     for (c = 0; c < (1 << CHAR_BIT); c++) {
CHAR_BIT          884 ext/stringio/stringio.c 		long skip[1 << CHAR_BIT], pos;
CHAR_BIT           26 marshal.c      #define BITSPERSHORT (2*CHAR_BIT)
CHAR_BIT          792 missing/vsnprintf.c 		        prec = sizeof(void*)*CHAR_BIT/4;
CHAR_BIT          169 node.h         #define NODE_LMASK  (((long)1<<(sizeof(NODE*)*CHAR_BIT-NODE_LSHIFT))-1)
CHAR_BIT         1835 numeric.c          char buf[SIZEOF_LONG*CHAR_BIT + 2], *b = buf + sizeof buf;
CHAR_BIT         2478 numeric.c          if (width > (sizeof(VALUE)*CHAR_BIT-1)
CHAR_BIT         2479 numeric.c      	|| ((unsigned long)val)>>(sizeof(VALUE)*CHAR_BIT-1-width) > 0) {
CHAR_BIT         2503 numeric.c          if (i >= sizeof(long)*CHAR_BIT-1) {
CHAR_BIT         2544 numeric.c          if (sizeof(VALUE)*CHAR_BIT-1 < i) {
CHAR_BIT          351 parse.y        #define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2)
CHAR_BIT          353 parse.y        #define nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2)
CHAR_BIT         5142 parse.y        	rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0)
CHAR_BIT          116 re.c               d = sizeof(hx) * CHAR_BIT - 1;
CHAR_BIT          114 ruby.h         # ifndef CHAR_BIT
CHAR_BIT         4003 string.c           if (bits >= sizeof(long)*CHAR_BIT) {


CHECK

CHECK            3231 file.c         	CHECK(1);
CHECK            3305 file.c         	CHECK(1);
CHECK            3321 file.c         	CHECK(2);
CHECK            3328 file.c         	CHECK(2);
CHECK              91 sprintf.c          CHECK(l);\
CHECK              97 sprintf.c          CHECK(l);\
CHECK             425 sprintf.c      			CHECK(width);
CHECK             660 sprintf.c      		    CHECK(width);
CHECK             670 sprintf.c      		CHECK(prec - len);
CHECK             689 sprintf.c      		CHECK(width);
CHECK             723 sprintf.c      		    CHECK(need);
CHECK             777 sprintf.c      		CHECK(need);
CHECK             858 sprintf.c          CHECK(len);


CHECK_DLERROR

CHECK_DLERROR     162 ext/dl/handle.c     CHECK_DLERROR;
CHECK_DLERROR     173 ext/dl/handle.c 	    CHECK_DLERROR;
CHECK_DLERROR     181 ext/dl/handle.c 		    CHECK_DLERROR;
CHECK_DLERROR     187 ext/dl/handle.c 		CHECK_DLERROR;
CHECK_DLERROR     200 ext/dl/handle.c 	    CHECK_DLERROR;
CHECK_DLERROR     205 ext/dl/handle.c 	CHECK_DLERROR;


CHECK_INTERRUPT_IN_MATCH_AT

CHECK_INTERRUPT_IN_MATCH_AT 2301 regexec.c            CHECK_INTERRUPT_IN_MATCH_AT;
CHECK_INTERRUPT_IN_MATCH_AT 2398 regexec.c            CHECK_INTERRUPT_IN_MATCH_AT;
CHECK_INTERRUPT_IN_MATCH_AT 2433 regexec.c            CHECK_INTERRUPT_IN_MATCH_AT;


CHECK_INTS

CHECK_INTS       3045 eval.c         	CHECK_INTS;
CHECK_INTS       3051 eval.c         	CHECK_INTS;
CHECK_INTS       3056 eval.c         	CHECK_INTS;
CHECK_INTS       3950 eval.c             CHECK_INTS;
CHECK_INTS       4828 eval.c         	    CHECK_INTS;
CHECK_INTS       4960 eval.c         	CHECK_INTS;
CHECK_INTS       5599 eval.c         	CHECK_INTS;		/* better than nothing */
CHECK_INTS       6781 eval.c         	CHECK_INTS;
CHECK_INTS         47 ext/readline/readline.c     CHECK_INTS;
CHECK_INTS       1614 ext/tk/tcltklib.c         if (update_flag == 0) CHECK_INTS;
CHECK_INTS         32 rubysig.h          CHECK_INTS;\
CHECK_INTS         54 rubysig.h          CHECK_INTS;\
CHECK_INTS         71 rubysig.h          CHECK_INTS;\
CHECK_INTS       3558 win32/win32.c      CHECK_INTS;
CHECK_INTS       3567 win32/win32.c      CHECK_INTS;
CHECK_INTS       3715 win32/win32.c  	CHECK_INTS;


CHECK_NULL_RETURN

CHECK_NULL_RETURN   61 regcomp.c          CHECK_NULL_RETURN(r);
CHECK_NULL_RETURN   78 regexec.c        CHECK_NULL_RETURN(node);
CHECK_NULL_RETURN  127 regexec.c        CHECK_NULL_RETURN(clone);
CHECK_NULL_RETURN  232 regparse.c       CHECK_NULL_RETURN(r);
CHECK_NULL_RETURN  272 regparse.c       CHECK_NULL_RETURN(r);
CHECK_NULL_RETURN  285 regparse.c       CHECK_NULL_RETURN(r);
CHECK_NULL_RETURN 1100 regparse.c       CHECK_NULL_RETURN(node);
CHECK_NULL_RETURN 1115 regparse.c       CHECK_NULL_RETURN(node);
CHECK_NULL_RETURN 1159 regparse.c       CHECK_NULL_RETURN(node);
CHECK_NULL_RETURN 1169 regparse.c       CHECK_NULL_RETURN(node);
CHECK_NULL_RETURN 1178 regparse.c       CHECK_NULL_RETURN(node);
CHECK_NULL_RETURN 1195 regparse.c       CHECK_NULL_RETURN(node);
CHECK_NULL_RETURN 1206 regparse.c       CHECK_NULL_RETURN(node);
CHECK_NULL_RETURN 1220 regparse.c       CHECK_NULL_RETURN(node);
CHECK_NULL_RETURN 1258 regparse.c       CHECK_NULL_RETURN(node);
CHECK_NULL_RETURN 1274 regparse.c       CHECK_NULL_RETURN(node);
CHECK_NULL_RETURN 1293 regparse.c       CHECK_NULL_RETURN(node);
CHECK_NULL_RETURN 1315 regparse.c       CHECK_NULL_RETURN(node);
CHECK_NULL_RETURN 1329 regparse.c       CHECK_NULL_RETURN(node);
CHECK_NULL_RETURN 1408 regparse.c       CHECK_NULL_RETURN(node);


CHECK_NULL_RETURN_VAL

CHECK_NULL_RETURN_VAL  146 regcomp.c        CHECK_NULL_RETURN_VAL(p, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL  169 regcomp.c          CHECK_NULL_RETURN_VAL(p, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL  629 regcomp.c          CHECK_NULL_RETURN_VAL(p, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL  638 regcomp.c          CHECK_NULL_RETURN_VAL(p, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 1610 regcomp.c        CHECK_NULL_RETURN_VAL(map, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 2868 regcomp.c          CHECK_NULL_RETURN_VAL(insert_node, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 2926 regcomp.c      	      CHECK_NULL_RETURN_VAL(en, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 2975 regcomp.c              CHECK_NULL_RETURN_VAL(snode, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 2981 regcomp.c              CHECK_NULL_RETURN_VAL(snode, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 2986 regcomp.c      	CHECK_NULL_RETURN_VAL(root, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 2991 regcomp.c      	CHECK_NULL_RETURN_VAL(*tailp, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 3022 regcomp.c            CHECK_NULL_RETURN_VAL(snode, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 3028 regcomp.c            CHECK_NULL_RETURN_VAL(snode, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 3033 regcomp.c            CHECK_NULL_RETURN_VAL(root, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 3038 regcomp.c            CHECK_NULL_RETURN_VAL(*tailp, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 4307 regcomp.c          CHECK_NULL_RETURN_VAL(reg->exact, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 4316 regcomp.c          CHECK_NULL_RETURN_VAL(reg->exact, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL  108 regexec.c          CHECK_NULL_RETURN_VAL(parent->childs, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL  964 regexec.c              CHECK_NULL_RETURN_VAL(child, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 1325 regexec.c                      CHECK_NULL_RETURN_VAL(node, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL  101 regparse.c       CHECK_NULL_RETURN_VAL(to, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL  722 regparse.c         CHECK_NULL_RETURN_VAL(e, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL  739 regparse.c           CHECK_NULL_RETURN_VAL(t, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL  758 regparse.c           CHECK_NULL_RETURN_VAL(t->e, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL  792 regparse.c           CHECK_NULL_RETURN_VAL(e->back_refs, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL  801 regparse.c     	CHECK_NULL_RETURN_VAL(e->back_refs, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL  933 regparse.c           CHECK_NULL_RETURN_VAL(p, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 1144 regparse.c         CHECK_NULL_RETURN_VAL(bbuf, NULL);
CHECK_NULL_RETURN_VAL 1356 regparse.c     	CHECK_NULL_RETURN_VAL(p, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 1578 regparse.c       CHECK_NULL_RETURN_VAL(*pbuf, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 3762 regparse.c       CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 3943 regparse.c       CHECK_NULL_RETURN_VAL(node, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 4307 regparse.c     	CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 4331 regparse.c     	CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 4394 regparse.c     	    CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 4408 regparse.c     	    CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 4430 regparse.c         CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 4436 regparse.c       CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 4582 regparse.c                     CHECK_NULL_RETURN_VAL(snode, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 4591 regparse.c                 CHECK_NULL_RETURN_VAL(*ptail, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 4728 regparse.c           CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 4749 regparse.c           CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 4780 regparse.c           CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 4797 regparse.c           CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 4808 regparse.c     	CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 4871 regparse.c                 CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 4958 regparse.c         CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 4963 regparse.c         CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 4965 regparse.c         CHECK_NULL_RETURN_VAL(qn, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 4975 regparse.c         CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 4981 regparse.c         CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 5022 regparse.c           CHECK_NULL_RETURN_VAL(qn, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 5030 regparse.c     	CHECK_NULL_RETURN_VAL(en, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 5042 regparse.c     	CHECK_NULL_RETURN_VAL(*targetp, ONIGERR_MEMORY);
CHECK_NULL_RETURN_VAL 5044 regparse.c     	CHECK_NULL_RETURN_VAL(tmp, ONIGERR_MEMORY);


CHECK_OPTION

CHECK_OPTION      444 ext/nkf/nkf-utf8/nkf.c #ifdef CHECK_OPTION
CHECK_OPTION      773 ext/nkf/nkf-utf8/nkf.c #ifdef CHECK_OPTION
CHECK_OPTION      981 ext/nkf/nkf-utf8/nkf.c #ifdef CHECK_OPTION
CHECK_OPTION     1052 ext/nkf/nkf-utf8/nkf.c #ifdef CHECK_OPTION
CHECK_OPTION     1416 ext/nkf/nkf-utf8/nkf.c #ifdef CHECK_OPTION
CHECK_OPTION     1844 ext/nkf/nkf-utf8/nkf.c #ifdef CHECK_OPTION
CHECK_OPTION     2121 ext/nkf/nkf-utf8/nkf.c #ifdef CHECK_OPTION
CHECK_OPTION     3776 ext/nkf/nkf-utf8/nkf.c #ifdef CHECK_OPTION
CHECK_OPTION     4768 ext/nkf/nkf-utf8/nkf.c #ifdef CHECK_OPTION
CHECK_OPTION     4831 ext/nkf/nkf-utf8/nkf.c #ifdef CHECK_OPTION


CHK_NL

CHK_NL            204 ext/syck/bytecode.c                 CHK_NL(YYCURSOR);
CHK_NL            304 ext/syck/bytecode.c             CHK_NL(YYCURSOR);
CHK_NL            326 ext/syck/bytecode.c             CHK_NL(YYCURSOR);
CHK_NL            393 ext/syck/bytecode.c {   CHK_NL(YYCURSOR);
CHK_NL            456 ext/syck/bytecode.c             CHK_NL(YYCURSOR);
CHK_NL            475 ext/syck/bytecode.c             CHK_NL(YYCURSOR);
CHK_NL            499 ext/syck/bytecode.c             CHK_NL(YYCURSOR);
CHK_NL            897 ext/syck/bytecode.c {   CHK_NL(YYCURSOR);
CHK_NL            934 ext/syck/bytecode.c {   CHK_NL(YYCURSOR);
CHK_NL           1029 ext/syck/bytecode.c {   CHK_NL(tok+1);
CHK_NL           1051 ext/syck/bytecode.c {   CHK_NL(tok+1);
CHK_NL           1073 ext/syck/bytecode.c {   CHK_NL(tok+1);
CHK_NL           1132 ext/syck/bytecode.c {   CHK_NL(YYCURSOR);


CHR2FIX

CHR2FIX           298 ext/dl/cfunc.c 	    result = CHR2FIX(ret); \
CHR2FIX           396 ext/dl/cfunc.c 	    result = CHR2FIX(ret); \
CHR2FIX           695 ext/stringio/stringio.c 	rb_yield(CHR2FIX(c));
CHR2FIX           716 ext/stringio/stringio.c     return CHR2FIX(c);


CHUNKBITS

CHUNKBITS         280 missing/crypt.c 	LOAD(d,d0,d1,(p)[(0<<CHUNKBITS)+(cpp)[0]]);		\
CHUNKBITS         281 missing/crypt.c 	OR (d,d0,d1,(p)[(1<<CHUNKBITS)+(cpp)[1]]);		\
CHUNKBITS         282 missing/crypt.c 	OR (d,d0,d1,(p)[(2<<CHUNKBITS)+(cpp)[2]]);		\
CHUNKBITS         283 missing/crypt.c 	OR (d,d0,d1,(p)[(3<<CHUNKBITS)+(cpp)[3]]);		\
CHUNKBITS         284 missing/crypt.c 	OR (d,d0,d1,(p)[(4<<CHUNKBITS)+(cpp)[4]]);		\
CHUNKBITS         285 missing/crypt.c 	OR (d,d0,d1,(p)[(5<<CHUNKBITS)+(cpp)[5]]);		\
CHUNKBITS         286 missing/crypt.c 	OR (d,d0,d1,(p)[(6<<CHUNKBITS)+(cpp)[6]]);		\
CHUNKBITS         287 missing/crypt.c 	OR (d,d0,d1,(p)[(7<<CHUNKBITS)+(cpp)[7]]);
CHUNKBITS         289 missing/crypt.c 	LOAD(d,d0,d1,(p)[(0<<CHUNKBITS)+(cpp)[0]]);		\
CHUNKBITS         290 missing/crypt.c 	OR (d,d0,d1,(p)[(1<<CHUNKBITS)+(cpp)[1]]);		\
CHUNKBITS         291 missing/crypt.c 	OR (d,d0,d1,(p)[(2<<CHUNKBITS)+(cpp)[2]]);		\
CHUNKBITS         292 missing/crypt.c 	OR (d,d0,d1,(p)[(3<<CHUNKBITS)+(cpp)[3]]);
CHUNKBITS         316 missing/crypt.c 		tp = &p[t&0xf]; OR(D,D0,D1,*tp); p += (1<<CHUNKBITS);
CHUNKBITS         317 missing/crypt.c 		tp = &p[t>>4];  OR(D,D0,D1,*tp); p += (1<<CHUNKBITS);
CHUNKBITS         455 missing/crypt.c static C_block	PC1ROT[64/CHUNKBITS][1<<CHUNKBITS];
CHUNKBITS         458 missing/crypt.c static C_block	PC2ROT[2][64/CHUNKBITS][1<<CHUNKBITS];
CHUNKBITS         461 missing/crypt.c static C_block	IE3264[32/CHUNKBITS][1<<CHUNKBITS];
CHUNKBITS         467 missing/crypt.c static C_block	CF6464[64/CHUNKBITS][1<<CHUNKBITS];
CHUNKBITS         883 missing/crypt.c 	C_block perm[64/CHUNKBITS][1<<CHUNKBITS];
CHUNKBITS         894 missing/crypt.c 		l = 1<<(l&(CHUNKBITS-1));	/* mask for this bit */
CHUNKBITS         895 missing/crypt.c 		for (j = 0; j < (1<<CHUNKBITS); j++) {	/* each chunk value */


CHUNKSIZE

CHUNKSIZE          43 ext/syck/yaml2byte.c     ret->length = CHUNKSIZE;
CHUNKSIZE          64 ext/syck/yaml2byte.c         grow = (length - str->remaining) + CHUNKSIZE;
CHUNKSIZE         101 ext/syck/yaml2byte.c             grow = (length - str->remaining) + CHUNKSIZE;


CIPHER_0ARG_INT

CIPHER_0ARG_INT   340 ext/openssl/ossl_cipher.c CIPHER_0ARG_INT(iv_length)
CIPHER_0ARG_INT   341 ext/openssl/ossl_cipher.c CIPHER_0ARG_INT(block_size)


CLASS_MASK

CLASS_MASK       1556 ext/nkf/nkf-utf8/nkf.c           }else if ((c & CLASS_MASK) == CLASS_UTF16){
CLASS_MASK       1622 ext/nkf/nkf-utf8/nkf.c           }else if ((c & CLASS_MASK) == CLASS_UTF16){
CLASS_MASK       1719 ext/nkf/nkf-utf8/nkf.c           }else if ((c & CLASS_MASK) == CLASS_UTF16){
CLASS_MASK       2003 ext/nkf/nkf-utf8/nkf.c             } else if ((c1 & CLASS_MASK) == CLASS_UTF16){
CLASS_MASK       2337 ext/nkf/nkf-utf8/nkf.c             || (c2 & CLASS_MASK) == CLASS_UTF16
CLASS_MASK       2776 ext/nkf/nkf-utf8/nkf.c     if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16){
CLASS_MASK       2835 ext/nkf/nkf-utf8/nkf.c     } else if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16) {
CLASS_MASK       2861 ext/nkf/nkf-utf8/nkf.c     if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16){
CLASS_MASK       2863 ext/nkf/nkf-utf8/nkf.c         if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16){
CLASS_MASK       2987 ext/nkf/nkf-utf8/nkf.c     if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16){
CLASS_MASK       3046 ext/nkf/nkf-utf8/nkf.c     if ((c1 & CLASS_MASK) == CLASS_UTF16){


CLASS_OF

CLASS_OF           58 bignum.c           VALUE z = bignew_1(CLASS_OF(x), RBIGNUM(x)->len, RBIGNUM(x)->sign);
CLASS_OF           71 class.c            if (!FL_TEST(CLASS_OF(clone), FL_SINGLETON)) {
CLASS_OF          711 class.c            klass = CLASS_OF(obj);
CLASS_OF          346 error.c            if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc));
CLASS_OF          379 error.c            klass = CLASS_OF(exc);
CLASS_OF          609 error.c            if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc));
CLASS_OF          900 error.c        	VALUE klass = CLASS_OF(exc);
CLASS_OF          419 eval.c             rb_add_method(CLASS_OF(klass), ID_ALLOCATOR, NEW_CFUNC(func, 0), NOEX_PRIVATE);
CLASS_OF          426 eval.c             rb_add_method(CLASS_OF(klass), ID_ALLOCATOR, 0, NOEX_UNDEF);
CLASS_OF         1168 eval.c             eclass = CLASS_OF(ruby_errinfo);
CLASS_OF         2227 eval.c         	    val = CLASS_OF(val);
CLASS_OF         2324 eval.c         	    if (rb_method_boundp(CLASS_OF(val), node->nd_mid, 1)) {
CLASS_OF         3017 eval.c         		    result = rb_call(CLASS_OF(recv),recv,each,0,0,CALLING_NORMAL);
CLASS_OF         3260 eval.c         	    rb_call(CLASS_OF(recv),recv,node->nd_mid,argc,argv,scope);
CLASS_OF         3278 eval.c         	    result = rb_call(CLASS_OF(recv),recv,node->nd_mid,argc,argv,CALLING_NORMAL);
CLASS_OF         3293 eval.c         	    result = rb_call(CLASS_OF(self),self,node->nd_mid,argc,argv,CALLING_FCALL);
CLASS_OF         3299 eval.c         	result = rb_call(CLASS_OF(self),self,node->nd_mid,0,0,CALLING_VCALL);
CLASS_OF         4014 eval.c             VALUE klass = CLASS_OF(obj);
CLASS_OF         4051 eval.c             if (rb_method_boundp(CLASS_OF(obj), id, !RTEST(priv))) {
CLASS_OF         5080 eval.c         		rb_call(CLASS_OF(recv), recv, lhs->nd_mid, 1, &val, scope);
CLASS_OF         5090 eval.c         		rb_call(CLASS_OF(recv), recv, lhs->nd_mid,
CLASS_OF         5828 eval.c             return rb_call(CLASS_OF(recv), recv, mid, argc, argv, CALLING_FCALL);
CLASS_OF         5840 eval.c             vid = rb_call(CLASS_OF(recv), recv, rb_to_id(vid), argc, argv, scope);
CLASS_OF         5916 eval.c             return rb_call(CLASS_OF(recv), recv, mid, n, argv, CALLING_FCALL);
CLASS_OF         5922 eval.c             return rb_call(CLASS_OF(recv), recv, mid, argc, argv, CALLING_FCALL);
CLASS_OF         5928 eval.c             return rb_call(CLASS_OF(recv), recv, mid, argc, argv, CALLING_NORMAL);
CLASS_OF         7097 eval.c             set_method_visibility(CLASS_OF(obj), argc, argv, NOEX_PUBLIC);
CLASS_OF         7120 eval.c             set_method_visibility(CLASS_OF(obj), argc, argv, NOEX_PRIVATE);
CLASS_OF         8088 eval.c         	if (CLASS_OF(obj) != klass) {
CLASS_OF         8249 eval.c         	result = rb_yield_0(args, self, (self!=Qundef)?CLASS_OF(self):0,
CLASS_OF         8405 eval.c             if (CLASS_OF(self) != CLASS_OF(other)) return Qfalse;
CLASS_OF         8716 eval.c             if (CLASS_OF(method) != CLASS_OF(other))
CLASS_OF         8810 eval.c             return mnew(CLASS_OF(obj), obj, rb_to_id(vid), rb_cMethod);
CLASS_OF         8862 eval.c             clone = Data_Make_Struct(CLASS_OF(self),struct METHOD, bm_mark, free, data);
CLASS_OF         9000 eval.c             VALUE rklass = CLASS_OF(recv), klass = rklass;
CLASS_OF         9120 eval.c             return rb_mod_method_arity(CLASS_OF(obj), id);
CLASS_OF         9414 eval.c             rb_undef_method(CLASS_OF(rb_cMethod), "new");
CLASS_OF         9430 eval.c             rb_undef_method(CLASS_OF(rb_cUnboundMethod), "new");
CLASS_OF         9482 eval.c             rb_undef_method(CLASS_OF(rb_cBinding), "new");
CLASS_OF         12880 eval.c             rb_undef_method(CLASS_OF(rb_cCont), "new");
CLASS_OF         1452 ext/curses/curses.c     rb_undef_method(CLASS_OF(cMouseEvent),"new");
CLASS_OF          298 ext/dl/cptr.c  	   rb_class2name(CLASS_OF(self)), data, data->ptr, data->size, data->free);
CLASS_OF          225 ext/iconv/iconv.c 	rb_raise(rb_eArgError, "Iconv expected (%s)", rb_class2name(CLASS_OF(obj)));
CLASS_OF          998 ext/iconv/iconv.c     char *cname = rb_class2name(CLASS_OF(self));
CLASS_OF          578 ext/openssl/ossl_asn1.c 	       rb_class2name(CLASS_OF(obj)));
CLASS_OF          264 ext/openssl/ossl_bn.c 	WrapBN(CLASS_OF(self), obj, result);		\
CLASS_OF          283 ext/openssl/ossl_bn.c 	WrapBN(CLASS_OF(self), obj, result);		\
CLASS_OF          303 ext/openssl/ossl_bn.c 	WrapBN(CLASS_OF(self), obj, result);			\
CLASS_OF          333 ext/openssl/ossl_bn.c     WrapBN(CLASS_OF(self), obj1, r1);
CLASS_OF          334 ext/openssl/ossl_bn.c     WrapBN(CLASS_OF(self), obj2, r2);
CLASS_OF          354 ext/openssl/ossl_bn.c 	WrapBN(CLASS_OF(self), obj, result);			\
CLASS_OF          407 ext/openssl/ossl_bn.c 	WrapBN(CLASS_OF(self), obj, result);		\
CLASS_OF          445 ext/openssl/ossl_config.c     rb_define_alias(CLASS_OF(cConfig), "load", "new");
CLASS_OF          355 ext/openssl/ossl_engine.c     rb_undef_method(CLASS_OF(cEngine), "new");
CLASS_OF          284 ext/openssl/ossl_pkey_dh.c     obj = dh_instance(CLASS_OF(self), dh);
CLASS_OF          314 ext/openssl/ossl_pkey_dsa.c     obj = dsa_instance(CLASS_OF(self), dsa);
CLASS_OF          408 ext/openssl/ossl_pkey_rsa.c     obj = rsa_instance(CLASS_OF(self), rsa);
CLASS_OF          263 ext/openssl/ossl_x509name.c     if(CLASS_OF(other) != cX509Name) return Qfalse;
CLASS_OF          400 ext/racc/cparse/cparse.c                  rb_class2name(CLASS_OF(block_args)));
CLASS_OF           80 ext/stringio/stringio.c 		 rb_class2name(CLASS_OF(self)));
CLASS_OF         1120 ext/strscan/strscan.c                        rb_class2name(CLASS_OF(self)));
CLASS_OF         1125 ext/strscan/strscan.c                        rb_class2name(CLASS_OF(self)));
CLASS_OF         1131 ext/strscan/strscan.c                        rb_class2name(CLASS_OF(self)),
CLASS_OF         1139 ext/strscan/strscan.c                    rb_class2name(CLASS_OF(self)),
CLASS_OF          156 ext/syslog/syslog.c       rb_raise(rb_eTypeError, "type mismatch: %s given", rb_class2name(CLASS_OF(pri)));
CLASS_OF         4952 ext/tk/tcltklib.c     return Data_Wrap_Struct(CLASS_OF(interp), 0, ip_free, slave);
CLASS_OF          365 marshal.c          VALUE klass = CLASS_OF(obj);
CLASS_OF          375 marshal.c          VALUE klass = CLASS_OF(obj);
CLASS_OF          102 numeric.c          if (CLASS_OF(x) == CLASS_OF(y))
CLASS_OF         2840 numeric.c          rb_undef_method(CLASS_OF(rb_cInteger), "new");
CLASS_OF         2904 numeric.c          rb_undef_method(CLASS_OF(rb_cFloat), "new");
CLASS_OF          163 object.c           return rb_class_real(CLASS_OF(obj));
CLASS_OF          311 object.c           if (CLASS_OF(value) == 0) return ST_CONTINUE;
CLASS_OF          430 object.c           VALUE cl = CLASS_OF(obj);
CLASS_OF         1722 object.c       	return rb_class_instance_methods(1, args, CLASS_OF(obj));
CLASS_OF         1752 object.c       	return rb_class_protected_instance_methods(1, args, CLASS_OF(obj));
CLASS_OF         1754 object.c           return rb_class_protected_instance_methods(argc, argv, CLASS_OF(obj));
CLASS_OF         1773 object.c       	return rb_class_private_instance_methods(1, args, CLASS_OF(obj));
CLASS_OF         1775 object.c           return rb_class_private_instance_methods(argc, argv, CLASS_OF(obj));
CLASS_OF         1794 object.c       	return rb_class_public_instance_methods(1, args, CLASS_OF(obj));
CLASS_OF         1796 object.c           return rb_class_public_instance_methods(argc, argv, CLASS_OF(obj));
CLASS_OF         2455 object.c           rb_undef_method(CLASS_OF(rb_cNilClass), "new");
CLASS_OF         2461 object.c           rb_undef_method(CLASS_OF(rb_cSymbol), "new");
CLASS_OF         2537 object.c           rb_undef_method(CLASS_OF(rb_cTrueClass), "new");
CLASS_OF         2546 object.c           rb_undef_method(CLASS_OF(rb_cFalseClass), "new");
CLASS_OF          278 process.c          str = rb_sprintf("#<%s: pid=%ld", rb_class2name(CLASS_OF(st)), NUM2LONG(pid));
CLASS_OF         3602 process.c          rb_undef_method(CLASS_OF(rb_cProcStatus), "new");
CLASS_OF         2261 re.c               rb_undef_method(CLASS_OF(rb_cMatch), "new");
CLASS_OF          282 variable.c         return rb_class2name(CLASS_OF(obj));


CLASS_UTF16

CLASS_UTF16      1556 ext/nkf/nkf-utf8/nkf.c           }else if ((c & CLASS_MASK) == CLASS_UTF16){
CLASS_UTF16      1622 ext/nkf/nkf-utf8/nkf.c           }else if ((c & CLASS_MASK) == CLASS_UTF16){
CLASS_UTF16      1719 ext/nkf/nkf-utf8/nkf.c           }else if ((c & CLASS_MASK) == CLASS_UTF16){
CLASS_UTF16      2003 ext/nkf/nkf-utf8/nkf.c             } else if ((c1 & CLASS_MASK) == CLASS_UTF16){
CLASS_UTF16      2337 ext/nkf/nkf-utf8/nkf.c             || (c2 & CLASS_MASK) == CLASS_UTF16
CLASS_UTF16      2520 ext/nkf/nkf-utf8/nkf.c             if (p1) *p1 = CLASS_UTF16 | ww16_conv(c2, c1, c0);
CLASS_UTF16      2642 ext/nkf/nkf-utf8/nkf.c             *p1 = CLASS_UTF16 | val;
CLASS_UTF16      2776 ext/nkf/nkf-utf8/nkf.c     if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16){
CLASS_UTF16      2835 ext/nkf/nkf-utf8/nkf.c     } else if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16) {
CLASS_UTF16      2861 ext/nkf/nkf-utf8/nkf.c     if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16){
CLASS_UTF16      2863 ext/nkf/nkf-utf8/nkf.c         if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16){
CLASS_UTF16      2987 ext/nkf/nkf-utf8/nkf.c     if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16){
CLASS_UTF16      3046 ext/nkf/nkf-utf8/nkf.c     if ((c1 & CLASS_MASK) == CLASS_UTF16){
CLASS_UTF16      3944 ext/nkf/nkf-utf8/nkf.c         return CLASS_UTF16 | c;


CLEAR_EFFECT_STATUS

CLEAR_EFFECT_STATUS 2547 regcomp.c            CLEAR_EFFECT_STATUS(node, NST_MARK2);
CLEAR_EFFECT_STATUS 2599 regcomp.c      	CLEAR_EFFECT_STATUS(node, NST_MARK1);
CLEAR_EFFECT_STATUS 2659 regcomp.c            CLEAR_EFFECT_STATUS(node, NST_MARK2);
CLEAR_EFFECT_STATUS 2724 regcomp.c      	  CLEAR_EFFECT_STATUS(node, NST_MARK1);


CLEAR_MATCH_STATUS

CLEAR_MATCH_STATUS  179 ext/strscan/strscan.c     CLEAR_MATCH_STATUS(p);
CLEAR_MATCH_STATUS  273 ext/strscan/strscan.c     CLEAR_MATCH_STATUS(p);
CLEAR_MATCH_STATUS  292 ext/strscan/strscan.c     CLEAR_MATCH_STATUS(p);
CLEAR_MATCH_STATUS  338 ext/strscan/strscan.c     CLEAR_MATCH_STATUS(p);
CLEAR_MATCH_STATUS  431 ext/strscan/strscan.c     CLEAR_MATCH_STATUS(p);
CLEAR_MATCH_STATUS  698 ext/strscan/strscan.c     CLEAR_MATCH_STATUS(p);
CLEAR_MATCH_STATUS  737 ext/strscan/strscan.c     CLEAR_MATCH_STATUS(p);
CLEAR_MATCH_STATUS  823 ext/strscan/strscan.c     CLEAR_MATCH_STATUS(p);


CLONESETUP

CLONESETUP       7933 eval.c             CLONESETUP(bind, self);
CLONESETUP       8863 eval.c             CLONESETUP(clone, self);


CLOSED

CLOSED            383 ext/stringio/stringio.c     if (CLOSED(ptr)) {
CLOSED            439 ext/stringio/stringio.c     if (!CLOSED(ptr)) return Qfalse;


CMDARG_LEXPOP

CMDARG_LEXPOP    3803 parse.y        			CMDARG_LEXPOP();
CMDARG_LEXPOP    6306 parse.y        	CMDARG_LEXPOP();


CMDARG_PUSH

CMDARG_PUSH      2376 parse.y        			CMDARG_PUSH(1);
CMDARG_PUSH      3797 parse.y        			CMDARG_PUSH(0);
CMDARG_PUSH      6424 parse.y        	CMDARG_PUSH(0);
CMDARG_PUSH      6450 parse.y        	CMDARG_PUSH(0);
CMDARG_PUSH      6467 parse.y        	CMDARG_PUSH(0);


COMMAND

COMMAND           957 process.c      	    new_argv[0] = COMMAND;
COMMAND          1097 process.c      	new_argv[0] = COMMAND;


COMP_EM_BASE

COMP_EM_BASE     3825 regcomp.c        ve = COMP_EM_BASE * e->len * (e->ignore_case ? 1 : 2);
COMP_EM_BASE     3826 regcomp.c        vm = COMP_EM_BASE * 5 * 2 / m->value;


COND_LEXPOP

COND_LEXPOP      3802 parse.y        			COND_LEXPOP();
COND_LEXPOP      6305 parse.y        	COND_LEXPOP();


COND_POP

COND_POP         2667 parse.y        		| kWHILE {COND_PUSH(1);} expr_value do {COND_POP();}
COND_POP         2681 parse.y        		| kUNTIL {COND_PUSH(1);} expr_value do {COND_POP();}
COND_POP         2730 parse.y        		| kFOR for_var kIN {COND_PUSH(1);} expr_value do {COND_POP();}


COND_PUSH

COND_PUSH        2667 parse.y        		| kWHILE {COND_PUSH(1);} expr_value do {COND_POP();}
COND_PUSH        2681 parse.y        		| kUNTIL {COND_PUSH(1);} expr_value do {COND_POP();}
COND_PUSH        2730 parse.y        		| kFOR for_var kIN {COND_PUSH(1);} expr_value do {COND_POP();}
COND_PUSH        3796 parse.y        			COND_PUSH(0);
COND_PUSH        6423 parse.y        	COND_PUSH(0);
COND_PUSH        6449 parse.y        	COND_PUSH(0);
COND_PUSH        6466 parse.y        	COND_PUSH(0);


CONF_get1_default_config_file

CONF_get1_default_config_file  121 ext/openssl/openssl_missing.h char *CONF_get1_default_config_file(void);
CONF_get1_default_config_file  442 ext/openssl/ossl_config.c 		    rb_str_new2(CONF_get1_default_config_file()));


CONST

CONST              38 ext/tk/tcltklib.c #   ifdef CONST
CONST              39 ext/tk/tcltklib.c #    define CONST84 CONST
CONST              46 ext/tk/tcltklib.c # ifdef CONST
CONST              47 ext/tk/tcltklib.c #  define CONST84 CONST
CONST             170 ext/tk/tcltklib.c     CONST char *name1;
CONST             171 ext/tk/tcltklib.c     CONST char *name2;
CONST             198 ext/tk/tcltklib.c     CONST char *name1;
CONST             199 ext/tk/tcltklib.c     CONST char *name2;
CONST             348 ext/tk/tcltklib.c static int ip_ruby_eval _((ClientData, Tcl_Interp *, int, Tcl_Obj *CONST*));
CONST             349 ext/tk/tcltklib.c static int ip_ruby_cmd _((ClientData, Tcl_Interp *, int, Tcl_Obj *CONST*));
CONST             436 ext/tk/tcltklib.c EXTERN int  TclGetFrame _((Tcl_Interp *, CONST char *, CallFrame **));
CONST             447 ext/tk/tcltklib.c     int (*tclGetFrame) _((Tcl_Interp *, CONST char *, CallFrame **));
CONST             494 ext/tk/tcltklib.c EXTERN int  TclGetFrame _((Tcl_Interp *, CONST char *, CallFrame **));
CONST            2398 ext/tk/tcltklib.c     Tcl_Obj *CONST argv[];
CONST            2493 ext/tk/tcltklib.c     Tcl_Obj *CONST argv[];
CONST            2625 ext/tk/tcltklib.c     Tcl_Obj *CONST argv[];
CONST            2657 ext/tk/tcltklib.c     Tcl_Obj *CONST argv[];
CONST            2758 ext/tk/tcltklib.c                                Tcl_Obj *CONST []));
CONST            2764 ext/tk/tcltklib.c     Tcl_Obj *CONST objv[];
CONST            2778 ext/tk/tcltklib.c     static CONST char *updateOptions[] = {"idletasks", (char *) NULL};
CONST            2903 ext/tk/tcltklib.c                                        Tcl_Obj *CONST []));
CONST            2909 ext/tk/tcltklib.c     Tcl_Obj *CONST objv[];
CONST            2924 ext/tk/tcltklib.c     static CONST char *updateOptions[] = {"idletasks", (char *) NULL};
CONST            3025 ext/tk/tcltklib.c                                Tcl_Obj *CONST []));
CONST            3027 ext/tk/tcltklib.c                                       Tcl_Obj *CONST []));
CONST            3029 ext/tk/tcltklib.c                                 Tcl_Obj *CONST []));
CONST            3031 ext/tk/tcltklib.c                                        Tcl_Obj *CONST []));
CONST            3074 ext/tk/tcltklib.c     Tcl_Obj *CONST objv[];
CONST            3310 ext/tk/tcltklib.c     Tcl_Obj *CONST objv[];
CONST            3323 ext/tk/tcltklib.c     static CONST char *optionStrings[] = { "variable", "visibility", "window",
CONST            3751 ext/tk/tcltklib.c     Tcl_Obj *CONST objv[];
CONST            3880 ext/tk/tcltklib.c     Tcl_Obj *CONST objv[];
CONST            3894 ext/tk/tcltklib.c     static CONST char *optionStrings[] = { "variable", "visibility", "window",
CONST            4564 ext/tk/tcltklib.c                                    Tcl_Obj *CONST []));
CONST            4570 ext/tk/tcltklib.c     Tcl_Obj *CONST objv[];
CONST            6368 ext/tk/tcltklib.c         Tcl_SetSystemEncoding((Tcl_Interp *)NULL, (CONST char *)NULL);
CONST            7189 ext/tk/tcltklib.c         CONST char *ret;


CONST84

CONST84            34 ext/tk/tcltklib.c # ifndef CONST84
CONST84           882 ext/tk/tcltklib.c                                             2, (CONST84 char **)argv);
CONST84          2798 ext/tk/tcltklib.c         if (Tcl_GetIndexFromObj(interp, objv[1], (CONST84 char **)updateOptions,
CONST84          2958 ext/tk/tcltklib.c         if (Tcl_GetIndexFromObj(interp, objv[1], (CONST84 char **)updateOptions,
CONST84          3043 ext/tk/tcltklib.c                              CONST84 char *,CONST84 char *, int));
CONST84          3048 ext/tk/tcltklib.c     CONST84 char *name1;        /* Name of variable. */
CONST84          3049 ext/tk/tcltklib.c     CONST84 char *name2;        /* Second part of variable name. */
CONST84          3249 ext/tk/tcltklib.c                                  CONST84 char *,CONST84 char *, int));
CONST84          3254 ext/tk/tcltklib.c     CONST84 char *name1;        /* Name of variable. */
CONST84          3255 ext/tk/tcltklib.c     CONST84 char *name2;        /* Second part of variable name. */
CONST84          3390 ext/tk/tcltklib.c                               (CONST84 char **)optionStrings,
CONST84          3679 ext/tk/tcltklib.c                                    CONST84 char *,CONST84 char *, int));
CONST84          3684 ext/tk/tcltklib.c     CONST84 char *name1;        /* Name of variable. */
CONST84          3685 ext/tk/tcltklib.c     CONST84 char *name2;        /* Second part of variable name. */
CONST84          3959 ext/tk/tcltklib.c                               (CONST84 char **)optionStrings,
CONST84          4601 ext/tk/tcltklib.c                               objc, (CONST84 char **)argv);
CONST84          6437 ext/tk/tcltklib.c                                      argc, (CONST84 char **)argv);
CONST84          6632 ext/tk/tcltklib.c                                          argc, (CONST84 char **)argv);


CONTEXT_FLOATING_POINT

CONTEXT_FLOATING_POINT 3504 win32/win32.c  	ctx.ContextFlags = CONTEXT_FULL | CONTEXT_FLOATING_POINT;
CONTEXT_FLOATING_POINT 3534 win32/win32.c  	    ctx_orig.ContextFlags = CONTEXT_FULL | CONTEXT_FLOATING_POINT;


CP932INV_TABLE_BEGIN

CP932INV_TABLE_BEGIN 3022 ext/nkf/nkf-utf8/nkf.c             && CP932INV_TABLE_BEGIN <= c2 && c2 <= CP932INV_TABLE_END){
CP932INV_TABLE_BEGIN 3024 ext/nkf/nkf-utf8/nkf.c             int c = cp932inv[c2 - CP932INV_TABLE_BEGIN][c1 - 0x40];


CP932_TABLE_BEGIN

CP932_TABLE_BEGIN 1569 ext/nkf/nkf-utf8/nkf.c                     && CP932_TABLE_BEGIN <= c && c <= CP932_TABLE_END){
CP932_TABLE_BEGIN 2395 ext/nkf/nkf-utf8/nkf.c     if (cp932_f && CP932_TABLE_BEGIN <= c2 && c2 <= CP932_TABLE_END){
CP932_TABLE_BEGIN 2397 ext/nkf/nkf-utf8/nkf.c         val = shiftjis_cp932[c2 - CP932_TABLE_BEGIN][c1 - 0x40];


CP932_TABLE_END

CP932_TABLE_END  1569 ext/nkf/nkf-utf8/nkf.c                     && CP932_TABLE_BEGIN <= c && c <= CP932_TABLE_END){
CP932_TABLE_END  2395 ext/nkf/nkf-utf8/nkf.c     if (cp932_f && CP932_TABLE_BEGIN <= c2 && c2 <= CP932_TABLE_END){


CP_FIN_ACCEPT

CP_FIN_ACCEPT     301 ext/racc/cparse/cparse.c     if (v->fin && v->fin != CP_FIN_ACCEPT)
CP_FIN_ACCEPT     545 ext/racc/cparse/cparse.c     v->fin = CP_FIN_ACCEPT;


CR

CR               1352 ext/nkf/nkf-utf8/nkf.c                 crmode_f = CR; cp++;
CR               2206 ext/nkf/nkf-utf8/nkf.c             } else if ((c1 == NL || c1 == CR) && broken_f&4) {
CR               2218 ext/nkf/nkf-utf8/nkf.c 	    } else if (c1 == CR && mime_decode_f && !mime_decode_mode ) {
CR               2233 ext/nkf/nkf-utf8/nkf.c 		c1 = CR;
CR               3190 ext/nkf/nkf-utf8/nkf.c 	} else if (crmode_f==CR) {
CR               3615 ext/nkf/nkf-utf8/nkf.c #define nkf_isspace(c) (nkf_isblank(c) || c == CR || c == NL)
CR               4064 ext/nkf/nkf-utf8/nkf.c 		case CR:
CR               4085 ext/nkf/nkf-utf8/nkf.c 			c1 = CR;
CR               4180 ext/nkf/nkf-utf8/nkf.c 	    case CR:
CR               4204 ext/nkf/nkf-utf8/nkf.c 		    c1 = CR;
CR               4388 ext/nkf/nkf-utf8/nkf.c 	    	|| mimeout_buf[i]==CR || mimeout_buf[i]==NL )) {
CR               4395 ext/nkf/nkf-utf8/nkf.c 		|| mimeout_buf[i]==CR || mimeout_buf[i]==NL ) {
CR               4461 ext/nkf/nkf-utf8/nkf.c 	} else if (c==CR||c==NL) {
CR               4537 ext/nkf/nkf-utf8/nkf.c                 if (c!=CR && c!=NL) {
CR               4601 ext/nkf/nkf-utf8/nkf.c                 if (c==CR || c==NL) {
CR               4606 ext/nkf/nkf-utf8/nkf.c                     if (mimeout_buf[i] == CR || mimeout_buf[i] == NL){
CR               4631 ext/nkf/nkf-utf8/nkf.c             if (lastchar==CR || lastchar == NL){
CR               4651 ext/nkf/nkf-utf8/nkf.c             if (lastchar == CR || lastchar == NL){
CR               4666 ext/nkf/nkf-utf8/nkf.c             if (c==SPACE || c==TAB || c==CR || c==NL) {
CR               4705 ext/nkf/nkf-utf8/nkf.c 	    if (mimeout_buf[i]==CR || mimeout_buf[i]==NL)


CRLF

CRLF             1340 ext/nkf/nkf-utf8/nkf.c             crmode_f = CRLF;
CRLF             1354 ext/nkf/nkf-utf8/nkf.c                 crmode_f = CRLF; cp++;
CRLF             3188 ext/nkf/nkf-utf8/nkf.c         if (crmode_f==CRLF) {


CRUNCH

CRUNCH            705 missing/crypt.c 			CRUNCH(L0, L1, R0, R1);
CRUNCH            706 missing/crypt.c 			CRUNCH(R0, R1, L0, L1);


CR_SB_SET

CR_SB_SET        3601 utf8.c             CR_SB_SET(SBXDigit);
CR_SB_SET        3607 utf8.c             CR_SB_SET(SBASCII);


CR_SET

CR_SET           3571 utf8.c             CR_SET(SBAlpha, MBAlpha);
CR_SET           3574 utf8.c             CR_SET(SBBlank, MBBlank);
CR_SET           3577 utf8.c             CR_SET(SBCntrl, MBCntrl);
CR_SET           3580 utf8.c             CR_SET(SBDigit, MBDigit);
CR_SET           3583 utf8.c             CR_SET(SBGraph, MBGraph);
CR_SET           3586 utf8.c             CR_SET(SBLower, MBLower);
CR_SET           3589 utf8.c             CR_SET(SBPrint, MBPrint);
CR_SET           3592 utf8.c             CR_SET(SBPunct, MBPunct);
CR_SET           3595 utf8.c             CR_SET(SBSpace, MBSpace);
CR_SET           3598 utf8.c             CR_SET(SBUpper, MBUpper);
CR_SET           3604 utf8.c             CR_SET(SBWord, MBWord);
CR_SET           3610 utf8.c             CR_SET(SBAlnum, MBAlnum);


CSTAT_PRIV

CSTAT_PRIV       5360 eval.c             if (last_call_status & CSTAT_PRIV) {
CSTAT_PRIV       5800 eval.c         	    return method_missing(recv, mid, argc, argv, CSTAT_PRIV);


CSTAT_PROT

CSTAT_PROT       5363 eval.c             else if (last_call_status & CSTAT_PROT) {
CSTAT_PROT       5810 eval.c         		return method_missing(recv, mid, argc, argv, CSTAT_PROT);


CSTAT_SUPER

CSTAT_SUPER      5370 eval.c             else if (last_call_status & CSTAT_SUPER) {
CSTAT_SUPER      5792 eval.c         	    return method_missing(recv, mid, argc, argv, CSTAT_SUPER);
CSTAT_SUPER      5944 eval.c         	return method_missing(self, ruby_frame->this_func, argc, argv, CSTAT_SUPER);


CSTAT_VCALL

CSTAT_VCALL      5366 eval.c             else if (last_call_status & CSTAT_VCALL) {
CSTAT_VCALL      5784 eval.c         	    return method_missing(recv, mid, argc, argv, scope==CALLING_VCALL?CSTAT_VCALL:0);
CSTAT_VCALL      5794 eval.c         	return method_missing(recv, mid, argc, argv, scope==CALLING_VCALL?CSTAT_VCALL:0);


CTYPE_DIGIT

CTYPE_DIGIT      2652 regparse.c           tok->u.subtype = CTYPE_DIGIT;
CTYPE_DIGIT      2973 regparse.c           tok->u.subtype = CTYPE_DIGIT;
CTYPE_DIGIT      3569 regparse.c       case CTYPE_DIGIT:
CTYPE_DIGIT      4813 regparse.c           case CTYPE_DIGIT:


CTYPE_NOT_DIGIT

CTYPE_NOT_DIGIT  2656 regparse.c           tok->u.subtype = CTYPE_NOT_DIGIT;
CTYPE_NOT_DIGIT  2979 regparse.c           tok->u.subtype = CTYPE_NOT_DIGIT;
CTYPE_NOT_DIGIT  3573 regparse.c       case CTYPE_NOT_DIGIT:
CTYPE_NOT_DIGIT  4814 regparse.c           case CTYPE_NOT_DIGIT:


CTYPE_NOT_WHITE_SPACE

CTYPE_NOT_WHITE_SPACE 2664 regparse.c           tok->u.subtype = CTYPE_NOT_WHITE_SPACE;
CTYPE_NOT_WHITE_SPACE 2967 regparse.c           tok->u.subtype = CTYPE_NOT_WHITE_SPACE;
CTYPE_NOT_WHITE_SPACE 3565 regparse.c       case CTYPE_NOT_WHITE_SPACE:
CTYPE_NOT_WHITE_SPACE 4812 regparse.c           case CTYPE_NOT_WHITE_SPACE:


CTYPE_NOT_WORD

CTYPE_NOT_WORD   1366 regcomp.c            case CTYPE_NOT_WORD:        op = OP_NOT_WORD;       break;
CTYPE_NOT_WORD   1804 regcomp.c          case CTYPE_NOT_WORD: *min = 1; break;
CTYPE_NOT_WORD   1893 regcomp.c          case CTYPE_NOT_WORD:
CTYPE_NOT_WORD   2068 regcomp.c          case CTYPE_NOT_WORD:
CTYPE_NOT_WORD   2164 regcomp.c      	  if (NCTYPE(y).type == CTYPE_NOT_WORD)
CTYPE_NOT_WORD   2169 regcomp.c      	case CTYPE_NOT_WORD:
CTYPE_NOT_WORD   2216 regcomp.c      	case CTYPE_NOT_WORD:
CTYPE_NOT_WORD   2282 regcomp.c      	case CTYPE_NOT_WORD:
CTYPE_NOT_WORD   4076 regcomp.c      	case CTYPE_NOT_WORD:
CTYPE_NOT_WORD   5439 regcomp.c          case CTYPE_NOT_WORD:        fputs("not word",       f); break;
CTYPE_NOT_WORD   2648 regparse.c           tok->u.subtype = CTYPE_NOT_WORD;
CTYPE_NOT_WORD   2929 regparse.c           tok->u.subtype = CTYPE_NOT_WORD;
CTYPE_NOT_WORD   3557 regparse.c       case CTYPE_NOT_WORD:
CTYPE_NOT_WORD   4806 regparse.c           case CTYPE_NOT_WORD:


CTYPE_NOT_XDIGIT

CTYPE_NOT_XDIGIT 2674 regparse.c           tok->u.subtype = CTYPE_NOT_XDIGIT;
CTYPE_NOT_XDIGIT 2991 regparse.c           tok->u.subtype = CTYPE_NOT_XDIGIT;
CTYPE_NOT_XDIGIT 3581 regparse.c       case CTYPE_NOT_XDIGIT:
CTYPE_NOT_XDIGIT 4816 regparse.c           case CTYPE_NOT_XDIGIT:


CTYPE_WHITE_SPACE

CTYPE_WHITE_SPACE 2660 regparse.c           tok->u.subtype = CTYPE_WHITE_SPACE;
CTYPE_WHITE_SPACE 2961 regparse.c           tok->u.subtype = CTYPE_WHITE_SPACE;
CTYPE_WHITE_SPACE 3561 regparse.c       case CTYPE_WHITE_SPACE:
CTYPE_WHITE_SPACE 4811 regparse.c           case CTYPE_WHITE_SPACE:


CTYPE_WORD

CTYPE_WORD       1365 regcomp.c            case CTYPE_WORD:            op = OP_WORD;           break;
CTYPE_WORD       1803 regcomp.c          case CTYPE_WORD:     *min = 1; break;
CTYPE_WORD       1892 regcomp.c          case CTYPE_WORD:
CTYPE_WORD       2067 regcomp.c          case CTYPE_WORD:
CTYPE_WORD       2163 regcomp.c      	case CTYPE_WORD:
CTYPE_WORD       2170 regcomp.c      	  if (NCTYPE(y).type == CTYPE_WORD)
CTYPE_WORD       2205 regcomp.c      	case CTYPE_WORD:
CTYPE_WORD       2279 regcomp.c      	case CTYPE_WORD:
CTYPE_WORD       4084 regcomp.c      	case CTYPE_WORD:
CTYPE_WORD       5438 regcomp.c          case CTYPE_WORD:            fputs("word",           f); break;
CTYPE_WORD       2644 regparse.c           tok->u.subtype = CTYPE_WORD;
CTYPE_WORD       2923 regparse.c           tok->u.subtype = CTYPE_WORD;
CTYPE_WORD       3553 regparse.c       case CTYPE_WORD:
CTYPE_WORD       4805 regparse.c           case CTYPE_WORD:


CTYPE_XDIGIT

CTYPE_XDIGIT     2669 regparse.c           tok->u.subtype = CTYPE_XDIGIT;
CTYPE_XDIGIT     2985 regparse.c           tok->u.subtype = CTYPE_XDIGIT;
CTYPE_XDIGIT     3577 regparse.c       case CTYPE_XDIGIT:
CTYPE_XDIGIT     4815 regparse.c           case CTYPE_XDIGIT:


CURPTR

CURPTR            437 ext/strscan/strscan.c         ret = onig_match(RREGEXP(regex)->ptr, (UChar* )CURPTR(p),
CURPTR            438 ext/strscan/strscan.c                          (UChar* )(CURPTR(p) + S_RESTLEN(p)),
CURPTR            439 ext/strscan/strscan.c                          (UChar* )CURPTR(p), &(p->regs), ONIG_OPTION_NONE);
CURPTR            443 ext/strscan/strscan.c                           (UChar* )CURPTR(p), (UChar* )(CURPTR(p) + S_RESTLEN(p)),
CURPTR            444 ext/strscan/strscan.c                           (UChar* )CURPTR(p), (UChar* )(CURPTR(p) + S_RESTLEN(p)),
CURPTR            702 ext/strscan/strscan.c     len = mbclen(*CURPTR(p));
CURPTR            846 ext/strscan/strscan.c     if (CURPTR(p) > S_PEND(p)) return Qnil;
CURPTR            848 ext/strscan/strscan.c     return (*(CURPTR(p) - 1) == '\n') ? Qtrue : Qfalse;
CURPTR           1162 ext/strscan/strscan.c     memcpy(bp, CURPTR(p) - len, len); bp += len;
CURPTR           1178 ext/strscan/strscan.c         memcpy(bp, CURPTR(p), len); bp += len;
CURPTR           1182 ext/strscan/strscan.c         memcpy(bp, CURPTR(p), len); bp += len;


CURRENT_LEVEL

CURRENT_LEVEL     154 ext/syck/bytecode.c     lvl = CURRENT_LEVEL();
CURRENT_LEVEL     226 ext/syck/bytecode.c         lvl = CURRENT_LEVEL();
CURRENT_LEVEL     336 ext/syck/bytecode.c                 lvl = CURRENT_LEVEL();
CURRENT_LEVEL     440 ext/syck/bytecode.c             lvl = CURRENT_LEVEL();
CURRENT_LEVEL     219 ext/syck/token.c         SyckLevel *lvl_deep = CURRENT_LEVEL(); \
CURRENT_LEVEL     225 ext/syck/token.c             lvl_over = CURRENT_LEVEL(); \
CURRENT_LEVEL     356 ext/syck/token.c {   SyckLevel *lvl = CURRENT_LEVEL();
CURRENT_LEVEL     433 ext/syck/token.c {   SyckLevel *lvl = CURRENT_LEVEL();
CURRENT_LEVEL     476 ext/syck/token.c {   SyckLevel *lvl = CURRENT_LEVEL();
CURRENT_LEVEL     509 ext/syck/token.c         SyckLevel *lvl = CURRENT_LEVEL();
CURRENT_LEVEL     554 ext/syck/token.c                         lvl = CURRENT_LEVEL();
CURRENT_LEVEL     595 ext/syck/token.c                         lvl = CURRENT_LEVEL();
CURRENT_LEVEL     605 ext/syck/token.c                         lvl = CURRENT_LEVEL();
CURRENT_LEVEL    1500 ext/syck/token.c         plvl = CURRENT_LEVEL();
CURRENT_LEVEL    1539 ext/syck/token.c                         lvl = CURRENT_LEVEL();
CURRENT_LEVEL    1772 ext/syck/token.c                         lvl = CURRENT_LEVEL();
CURRENT_LEVEL    1828 ext/syck/token.c                         lvl = CURRENT_LEVEL();
CURRENT_LEVEL    1927 ext/syck/token.c                         lvl = CURRENT_LEVEL();
CURRENT_LEVEL    1996 ext/syck/token.c                         lvl = CURRENT_LEVEL();
CURRENT_LEVEL    2181 ext/syck/token.c                         lvl = CURRENT_LEVEL();
CURRENT_LEVEL    2346 ext/syck/token.c         SyckLevel *lvl = CURRENT_LEVEL();
CURRENT_LEVEL    2404 ext/syck/token.c                         lvl = CURRENT_LEVEL();
CURRENT_LEVEL    2416 ext/syck/token.c                                 lvl = CURRENT_LEVEL();
CURRENT_LEVEL    2490 ext/syck/token.c {   lvl = CURRENT_LEVEL();


CUT_TAIL

CUT_TAIL          708 ext/racc/cparse/cparse.c         CUT_TAIL(v->vstack, len);
CUT_TAIL          711 ext/racc/cparse/cparse.c             CUT_TAIL(v->tstack, len);
CUT_TAIL          713 ext/racc/cparse/cparse.c         CUT_TAIL(v->state, len);


C_block

C_block           257 missing/crypt.c 		C_block cvt;				\
C_block           298 missing/crypt.c 	{ C_block tblk; permute(cpp,&tblk,p,8); LOAD (d,d0,d1,tblk); }
C_block           300 missing/crypt.c 	{ C_block tblk; permute(cpp,&tblk,p,4); LOAD (d,d0,d1,tblk); }
C_block           310 missing/crypt.c 	register C_block *tp;
C_block           455 missing/crypt.c static C_block	PC1ROT[64/CHUNKBITS][1<<CHUNKBITS];
C_block           458 missing/crypt.c static C_block	PC2ROT[2][64/CHUNKBITS][1<<CHUNKBITS];
C_block           461 missing/crypt.c static C_block	IE3264[32/CHUNKBITS][1<<CHUNKBITS];
C_block           467 missing/crypt.c static C_block	CF6464[64/CHUNKBITS][1<<CHUNKBITS];
C_block           473 missing/crypt.c static C_block	constdatablock;			/* encryption constant */
C_block           490 missing/crypt.c 	C_block keyblock, rsltblock;
C_block           578 missing/crypt.c static C_block	KS[KS_SIZE];
C_block           587 missing/crypt.c 	register C_block *ptabp;
C_block           596 missing/crypt.c 	PERM6464(K,K0,K1,(unsigned char *)key,(C_block *)PC1ROT);
C_block           598 missing/crypt.c 	STORE(K&~0x03030303L, K0&~0x03030303L, K1, *(C_block *)key);
C_block           600 missing/crypt.c 		key += sizeof(C_block);
C_block           601 missing/crypt.c 		STORE(K,K0,K1,*(C_block *)key);
C_block           602 missing/crypt.c 		ptabp = (C_block *)PC2ROT[Rotates[i]-1];
C_block           604 missing/crypt.c 		STORE(K&~0x03030303L, K0&~0x03030303L, K1, *(C_block *)key);
C_block           628 missing/crypt.c 	register C_block *kp;
C_block           630 missing/crypt.c 	C_block B;
C_block           647 missing/crypt.c 	LOAD(L,L0,L1,*(C_block *)in);
C_block           657 missing/crypt.c 	PERM3264(L,L0,L1,B.b,  (C_block *)IE3264);	/* even bits */
C_block           658 missing/crypt.c 	PERM3264(R,R0,R1,B.b+4,(C_block *)IE3264);	/* odd bits */
C_block           694 missing/crypt.c 			kp = (C_block *)((char *)kp+ks_inc);	\
C_block           708 missing/crypt.c 		kp = (C_block *)((char *)kp-(ks_inc*KS_SIZE));
C_block           721 missing/crypt.c 	PERM6464(L,L0,L1,B.b, (C_block *)CF6464);
C_block           727 missing/crypt.c 	STORE(L,L0,L1,*(C_block *)out);
C_block           909 missing/crypt.c 	C_block keyblock;
C_block           930 missing/crypt.c 	C_block cblock;


CallFrame

CallFrame         419 ext/tk/tcltklib.c #  ifndef CallFrame
CallFrame         425 ext/tk/tcltklib.c     struct CallFrame *callerPtr;
CallFrame         426 ext/tk/tcltklib.c     struct CallFrame *callerVarPtr;
CallFrame         447 ext/tk/tcltklib.c     int (*tclGetFrame) _((Tcl_Interp *, CONST char *, CallFrame **));
CallFrame         479 ext/tk/tcltklib.c #  ifndef CallFrame
CallFrame         485 ext/tk/tcltklib.c     struct CallFrame *callerPtr;
CallFrame         486 ext/tk/tcltklib.c     struct CallFrame *callerVarPtr;
CallFrame         490 ext/tk/tcltklib.c #define Tcl_CallFrame CallFrame
CallFrame         507 ext/tk/tcltklib.c     CallFrame *framePtr;
CallFrame         508 ext/tk/tcltklib.c     CallFrame *varFramePtr;
CallFrame         516 ext/tk/tcltklib.c     CallFrame *frame = iPtr->varFramePtr;
CallFrame         536 ext/tk/tcltklib.c     CallFrame *frame = (CallFrame *)framePtr;


CallNode

CallNode         2771 regcomp.c            CallNode* cn = &(NCALL(node));
CallNode         5493 regcomp.c            CallNode* cn = &(NCALL(node));
CallNode          231 regparse.h         CallNode      call;


Calloc

Calloc            160 st.c               tbl->bins = (st_table_entry **)Calloc(size, sizeof(st_table_entry*));
Calloc            307 st.c               new_bins = (st_table_entry**)Calloc(new_num_bins, sizeof(st_table_entry*));
Calloc            338 st.c           	Calloc((unsigned)num_bins, sizeof(st_table_entry*));


Ch

Ch                303 ext/digest/sha2/sha2.c 	T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + \
Ch                313 ext/digest/sha2/sha2.c 	T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + \
Ch                326 ext/digest/sha2/sha2.c 	T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + K256[j] + \
Ch                413 ext/digest/sha2/sha2.c 		T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + W256[j];
Ch                416 ext/digest/sha2/sha2.c 		T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + (W256[j] = *data++);
Ch                439 ext/digest/sha2/sha2.c 		T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] +
Ch                604 ext/digest/sha2/sha2.c 	T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + \
Ch                614 ext/digest/sha2/sha2.c 	T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + \
Ch                627 ext/digest/sha2/sha2.c 	T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + K512[j] + \
Ch                709 ext/digest/sha2/sha2.c 		T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + W512[j];
Ch                712 ext/digest/sha2/sha2.c 		T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + (W512[j] = *data++);
Ch                735 ext/digest/sha2/sha2.c 		T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] +


CharNext

CharNext           98 dir.c          #if defined(CharNext)
CharNext           99 dir.c          # define Next(p) CharNext(p)
CharNext         2239 file.c         #ifndef CharNext		/* defined as CharNext[AW] on Windows. */
CharNext         2308 file.c         	s = CharNext(s);
CharNext         2352 file.c         	    path = CharNext(path);
CharNext         2369 file.c         	    path = CharNext(path);
CharNext         2420 file.c         	    for (p = buf; *p; p = CharNext(p)) {
CharNext         2579 file.c         	    s = CharNext(s);
CharNext          246 ruby.c         #ifdef CharNext		/* defined as CharNext[AW] on Windows. */
CharNext          247 ruby.c         	p = CharNext(p);
CharNext          370 win32/win32.c  		p = CharNext(p);
CharNext          625 win32/win32.c  		p = CharNext(p) - 1;
CharNext          660 win32/win32.c  		p = CharNext(p) - 1;
CharNext          907 win32/win32.c  	for (prog = cmd; *prog; prog = CharNext(prog)) {
CharNext          964 win32/win32.c  	    p = CharNext(p);
CharNext         1045 win32/win32.c      for (p = buf; *p; p = CharNext(p))
CharNext         1097 win32/win32.c  	    ptr = CharNext(ptr);
CharNext         1212 win32/win32.c  		ptr = CharNext(ptr);
CharNext         1269 win32/win32.c  		    p = CharNext(p);
CharNext         2927 win32/win32.c      for (bp = buffer; *bp != '\0'; bp = CharNext(bp)) {
CharNext         3147 win32/win32.c  	for (p = path + 2; *p; p = CharNext(p)) {
CharNext         3152 win32/win32.c  	    for (p++; *p; p = CharNext(p)) {


CharNextA

CharNextA          33 win32/win32.h  #define CharNext CharNextA
CharNextA          87 wince/wince.h  #define CharNext CharNextA


CharPrev

CharPrev         1390 win32/win32.c      if (index("/\\:", *CharPrev(scanname, scanname + strlen(scanname))) == NULL)
CharPrev         3228 win32/win32.c  	    end = CharPrev(path, end);
CharPrev         3311 win32/win32.c      end = CharPrev(buf1, buf1 + len);


Check_SafeStr

Check_SafeStr    7724 eval.c             Check_SafeStr(file);
Check_SafeStr     208 ext/openssl/ossl_x509store.c         Check_SafeStr(file);
Check_SafeStr     229 ext/openssl/ossl_x509store.c         Check_SafeStr(dir);
Check_SafeStr      71 ext/syslog/syslog.c     Check_SafeStr(ident);
Check_SafeStr    3542 ext/win32ole/win32ole.c     Check_SafeStr(cmdname);
Check_SafeStr    3997 ext/win32ole/win32ole.c     Check_SafeStr(typelib);
Check_SafeStr    4213 ext/win32ole/win32ole.c     Check_SafeStr(oleclass);
Check_SafeStr    4214 ext/win32ole/win32ole.c     Check_SafeStr(typelib);
Check_SafeStr    5193 ext/win32ole/win32ole.c         Check_SafeStr(method);
Check_SafeStr    6703 ext/win32ole/win32ole.c         Check_SafeStr(itf);
Check_SafeStr    6799 ext/win32ole/win32ole.c         Check_SafeStr(event);


Check_Type

Check_Type         51 class.c            Check_Type(super, T_CLASS);
Check_Type        359 class.c        	Check_Type(module, T_MODULE);
Check_Type        449 class.c            Check_Type(mod2, T_MODULE);
Check_Type        418 eval.c             Check_Type(klass, T_CLASS);
Check_Type        425 eval.c             Check_Type(klass, T_CLASS);
Check_Type       7243 eval.c         	Check_Type(dest, T_CLASS);
Check_Type       7263 eval.c             for (i=0; i<argc; i++) Check_Type(argv[i], T_MODULE);
Check_Type       7352 eval.c             for (i=0; i<argc; i++) Check_Type(argv[i], T_MODULE);
Check_Type        225 ext/bigdecimal/bigdecimal.c     Check_Type(which, T_FIXNUM);
Check_Type        251 ext/bigdecimal/bigdecimal.c         Check_Type(val, T_FIXNUM);
Check_Type        288 ext/bigdecimal/bigdecimal.c     Check_Type(v, T_FIXNUM);
Check_Type        934 ext/bigdecimal/bigdecimal.c         Check_Type(vLoc, T_FIXNUM);
Check_Type        938 ext/bigdecimal/bigdecimal.c         Check_Type(vLoc, T_FIXNUM);
Check_Type        940 ext/bigdecimal/bigdecimal.c         Check_Type(vRound, T_FIXNUM);
Check_Type        971 ext/bigdecimal/bigdecimal.c         Check_Type(vLoc, T_FIXNUM);
Check_Type       1010 ext/bigdecimal/bigdecimal.c         Check_Type(vLoc, T_FIXNUM);
Check_Type       1035 ext/bigdecimal/bigdecimal.c         Check_Type(vLoc, T_FIXNUM);
Check_Type       1164 ext/bigdecimal/bigdecimal.c     Check_Type(p, T_FIXNUM);
Check_Type       1228 ext/bigdecimal/bigdecimal.c         Check_Type(nFig, T_FIXNUM);
Check_Type        444 ext/dbm/dbm.c      Check_Type(pair, T_ARRAY);
Check_Type        255 ext/dl/cfunc.c     Check_Type(ary, T_ARRAY);
Check_Type        546 ext/gdbm/gdbm.c     Check_Type(pair, T_ARRAY);
Check_Type        223 ext/iconv/iconv.c     Check_Type(obj, T_DATA);
Check_Type         58 ext/openssl/ossl.c     Check_Type(ary, T_ARRAY);
Check_Type        237 ext/openssl/ossl_config.c     Check_Type(i, T_ARRAY);
Check_Type        463 ext/openssl/ossl_ocsp.c 	Check_Type(ext, T_ARRAY);
Check_Type        188 ext/openssl/ossl_ssl.c     Check_Type(ary, T_ARRAY);
Check_Type        520 ext/openssl/ossl_ssl.c     Check_Type(io, T_FILE);
Check_Type        558 ext/openssl/ossl_x509cert.c     Check_Type(ary, T_ARRAY);
Check_Type        288 ext/openssl/ossl_x509crl.c     Check_Type(ary, T_ARRAY);
Check_Type        462 ext/openssl/ossl_x509crl.c     Check_Type(ary, T_ARRAY);
Check_Type        101 ext/openssl/ossl_x509name.c     Check_Type(i, T_ARRAY);
Check_Type        405 ext/openssl/ossl_x509req.c     Check_Type(ary, T_ARRAY);
Check_Type        177 ext/openssl/ossl_x509revoked.c     Check_Type(ary, T_ARRAY);
Check_Type        310 ext/racc/cparse/cparse.c     Check_Type(a, T_ARRAY);
Check_Type        318 ext/racc/cparse/cparse.c     Check_Type(h, T_HASH);
Check_Type        343 ext/racc/cparse/cparse.c     Check_Type(arg, T_ARRAY);
Check_Type        104 ext/readline/readline.c     Check_Type(input, T_FILE);
Check_Type        117 ext/readline/readline.c     Check_Type(output, T_FILE);
Check_Type        422 ext/sdbm/init.c     Check_Type(pair, T_ARRAY);
Check_Type         77 ext/stringio/stringio.c     Check_Type(self, T_DATA);
Check_Type        428 ext/strscan/strscan.c     Check_Type(regex, T_REGEXP);
Check_Type        787 ext/syck/rubyext.c         Check_Type(options, T_HASH);
Check_Type       1995 ext/syck/rubyext.c         Check_Type(options, T_HASH);
Check_Type       2060 ext/tk/tcltklib.c         Check_Type(vflags, T_FIXNUM);
Check_Type       2124 ext/win32ole/win32ole.c         Check_Type(key, T_STRING);
Check_Type       2145 ext/win32ole/win32ole.c     Check_Type(argv, T_ARRAY);
Check_Type       2406 ext/win32ole/win32ole.c     Check_Type(args, T_ARRAY);
Check_Type       2407 ext/win32ole/win32ole.c     Check_Type(types, T_ARRAY);
Check_Type       2443 ext/win32ole/win32ole.c                 Check_Type(param, T_ARRAY);
Check_Type       1021 ext/zlib/zlib.c     Check_Type(size, T_FIXNUM);
Check_Type       1114 ext/zlib/zlib.c     : ((void)Check_Type((val), T_FIXNUM), FIX2INT((val))))
Check_Type       1838 ext/zlib/zlib.c     Check_Type(str, T_STRING);
Check_Type       1851 ext/zlib/zlib.c             Check_Type(str, T_STRING);
Check_Type       3078 ext/zlib/zlib.c         Check_Type(outbuf, T_STRING);
Check_Type       3201 ext/zlib/zlib.c 	    Check_Type(rs, T_STRING);
Check_Type       4125 file.c             Check_Type(rb_load_path, T_ARRAY);
Check_Type       4185 file.c         	Check_Type(rb_load_path, T_ARRAY);
Check_Type        403 gc.c               if (klass) Check_Type(klass, T_CLASS);
Check_Type       4408 io.c           	Check_Type(read, T_ARRAY);
Check_Type       4428 io.c           	Check_Type(write, T_ARRAY);
Check_Type       4440 io.c           	Check_Type(except, T_ARRAY);
Check_Type        110 prec.c                Check_Type(include, T_CLASS);
Check_Type       2631 process.c          Check_Type(ary, T_ARRAY);
Check_Type       2154 re.c           	Check_Type(val, T_MATCH);
Check_Type        416 ruby.h             Check_Type(obj, T_DATA); \
Check_Type        289 signal.c       	    Check_Type(argv[i], T_FIXNUM);
Check_Type       1791 string.c       	    Check_Type(pat, T_REGEXP);
Check_Type       1155 variable.c         Check_Type(av, T_DATA);
Check_Type       1244 variable.c         Check_Type(file, T_STRING);


CloseChildHandle

CloseChildHandle  781 win32/win32.c  	    CloseChildHandle(child);
CloseChildHandle  823 win32/win32.c  	CloseChildHandle(child);
CloseChildHandle 2811 win32/win32.c  	CloseChildHandle(child);
CloseChildHandle 2817 win32/win32.c  	CloseChildHandle(child);


Compare

Compare           207 dir.c          	    if (!ok && Compare(t1, s) <= 0 && Compare(s, t2) <= 0)
Compare           211 dir.c          	    if (!ok && Compare(t1, s) == 0)
Compare           287 dir.c          	if (Compare(p, s) != 0)


CreateChild

CreateChild        81 win32/win32.c  static struct ChildRecord *CreateChild(const char *, const char *, SECURITY_ATTRIBUTES *, HANDLE, HANDLE, HANDLE);
CreateChild       769 win32/win32.c  	child = CreateChild(cmd, prog, &sa, hIn, hOut, NULL);
CreateChild       809 win32/win32.c      child = CreateChild(cmd, prog, NULL, NULL, NULL, NULL);


CreateFile

CreateFile        656 file.c         	f = CreateFile(StringValueCStr(*file), 0,
CreateFile       1641 win32/win32.c      hF = CreateFile("NUL", 0, 0, NULL, OPEN_ALWAYS, 0, NULL);
CreateFile       3861 win32/win32.c  	hFile = CreateFile(path, GENERIC_WRITE, 0, 0, OPEN_EXISTING,


CreatePipe

CreatePipe        736 win32/win32.c  	    if (!CreatePipe(&hIn, &hOut, &sa, 2048L)) {
CreatePipe        752 win32/win32.c  	    if (!CreatePipe(&hIn, &hOut, &sa, 2048L)) {
CreatePipe        141 wince/wince.h  BOOL CreatePipe(PHANDLE hReadPipe, PHANDLE hWritePipe,


D

D                  26 ext/digest/md5/md5ossl.c       && pctx1->D == pctx2->D
D                  40 ext/digest/rmd160/rmd160ossl.c 	  && pctx1->D == pctx2->D
D                 309 missing/crypt.c 	register DCL_BLOCK(D,D0,D1);
D                 313 missing/crypt.c 	ZERO(D,D0,D1);
D                 316 missing/crypt.c 		tp = &p[t&0xf]; OR(D,D0,D1,*tp); p += (1<<CHUNKBITS);
D                 317 missing/crypt.c 		tp = &p[t>>4];  OR(D,D0,D1,*tp); p += (1<<CHUNKBITS);
D                 319 missing/crypt.c 	STORE(D,D0,D1,*out);


DATA_ENSURE

DATA_ENSURE      1368 regexec.c            DATA_ENSURE(1);
DATA_ENSURE      1373 regexec.c            DATA_ENSURE(0);
DATA_ENSURE      1383 regexec.c      	DATA_ENSURE(1);
DATA_ENSURE      1389 regexec.c      	DATA_ENSURE(0);
DATA_ENSURE      1413 regexec.c            DATA_ENSURE(2);
DATA_ENSURE      1424 regexec.c            DATA_ENSURE(3);
DATA_ENSURE      1437 regexec.c            DATA_ENSURE(4);
DATA_ENSURE      1452 regexec.c            DATA_ENSURE(5);
DATA_ENSURE      1470 regexec.c            DATA_ENSURE(tlen);
DATA_ENSURE      1489 regexec.c      	  DATA_ENSURE(1);
DATA_ENSURE      1495 regexec.c      	  DATA_ENSURE(0);
DATA_ENSURE      1522 regexec.c            DATA_ENSURE(2);
DATA_ENSURE      1531 regexec.c            DATA_ENSURE(4);
DATA_ENSURE      1546 regexec.c            DATA_ENSURE(6);
DATA_ENSURE      1566 regexec.c            DATA_ENSURE(tlen * 2);
DATA_ENSURE      1580 regexec.c            DATA_ENSURE(tlen * 3);
DATA_ENSURE      1598 regexec.c            DATA_ENSURE(tlen2);
DATA_ENSURE      1609 regexec.c            DATA_ENSURE(1);
DATA_ENSURE      1626 regexec.c      	DATA_ENSURE(1);
DATA_ENSURE      1628 regexec.c      	DATA_ENSURE(mb_len);
DATA_ENSURE      1646 regexec.c            DATA_ENSURE(1);
DATA_ENSURE      1664 regexec.c            DATA_ENSURE(1);
DATA_ENSURE      1672 regexec.c            DATA_ENSURE(1);
DATA_ENSURE      1688 regexec.c                DATA_ENSURE(1);
DATA_ENSURE      1713 regexec.c            DATA_ENSURE(1);
DATA_ENSURE      1737 regexec.c              DATA_ENSURE(1);
DATA_ENSURE      1749 regexec.c            DATA_ENSURE(1);
DATA_ENSURE      1751 regexec.c            DATA_ENSURE(n);
DATA_ENSURE      1758 regexec.c            DATA_ENSURE(1);
DATA_ENSURE      1760 regexec.c            DATA_ENSURE(n);
DATA_ENSURE      1769 regexec.c              DATA_ENSURE(n);
DATA_ENSURE      1782 regexec.c      	  DATA_ENSURE(n);
DATA_ENSURE      1800 regexec.c              DATA_ENSURE(n);
DATA_ENSURE      1816 regexec.c      	  DATA_ENSURE(n);
DATA_ENSURE      1830 regexec.c            DATA_ENSURE(1);
DATA_ENSURE      1839 regexec.c            DATA_ENSURE(1);
DATA_ENSURE      1849 regexec.c      	DATA_ENSURE(1);
DATA_ENSURE      2071 regexec.c      	DATA_ENSURE(n);
DATA_ENSURE      2103 regexec.c      	DATA_ENSURE(n);
DATA_ENSURE      2135 regexec.c      	  DATA_ENSURE(n);
DATA_ENSURE      2174 regexec.c      	  DATA_ENSURE(n);


DATA_ENSURE_CHECK

DATA_ENSURE_CHECK 1868 regexec.c      	if (DATA_ENSURE_CHECK(1) && ONIGENC_IS_MBC_WORD(encode, s, end))
DATA_ENSURE_CHECK 1886 regexec.c            if (DATA_ENSURE_CHECK(1) && ONIGENC_IS_MBC_WORD(encode, s, end)) {
DATA_ENSURE_CHECK 2320 regexec.c            if (*p == *s && DATA_ENSURE_CHECK(1)) {


DATA_PTR

DATA_PTR         9318 eval.c         	struct METHOD *method = (struct METHOD *)DATA_PTR(body);
DATA_PTR         11840 eval.c             ruby_dyna_vars = ((struct BLOCK *)DATA_PTR(proc))->dyna_vars;
DATA_PTR          146 ext/dbm/dbm.c      DATA_PTR(obj) = dbmp;
DATA_PTR          174 ext/dl/dl.h    #define RDL_HANDLE(obj) ((struct dl_handle *)(DATA_PTR(obj)))
DATA_PTR          175 ext/dl/dl.h    #define RCFUNC_DATA(obj) ((struct cfunc_data *)(DATA_PTR(obj)))
DATA_PTR          176 ext/dl/dl.h    #define RPTR_DATA(obj) ((struct ptr_data *)(DATA_PTR(obj)))
DATA_PTR          155 ext/gdbm/gdbm.c     free_dbm(DATA_PTR(obj));
DATA_PTR          156 ext/gdbm/gdbm.c     DATA_PTR(obj) = dbmp;
DATA_PTR          227 ext/iconv/iconv.c     return (VALUE)DATA_PTR(obj);
DATA_PTR          561 ext/iconv/iconv.c     DATA_PTR(self) = NULL;
DATA_PTR          562 ext/iconv/iconv.c     DATA_PTR(self) = (void *)ICONV2VALUE(iconv_create(to, from, &opt));
DATA_PTR          754 ext/iconv/iconv.c     DATA_PTR(self) = NULL;
DATA_PTR           71 ext/openssl/ossl_ns_spki.c     NETSCAPE_SPKI_free(DATA_PTR(self));
DATA_PTR           72 ext/openssl/ossl_ns_spki.c     DATA_PTR(self) = spki;
DATA_PTR          113 ext/openssl/ossl_ocsp.c 	if(!d2i_OCSP_REQUEST((OCSP_REQUEST**)&DATA_PTR(self), &p,
DATA_PTR          320 ext/openssl/ossl_ocsp.c 	if(!d2i_OCSP_RESPONSE((OCSP_RESPONSE**)&DATA_PTR(self), &p,
DATA_PTR           92 ext/openssl/ossl_pkcs12.c     d2i_PKCS12_bio(in, (PKCS12 **)&DATA_PTR(self));
DATA_PTR           96 ext/openssl/ossl_pkcs12.c     if(!PKCS12_parse((PKCS12*)DATA_PTR(self), passphrase, &key, &x509, &x509s))
DATA_PTR          301 ext/openssl/ossl_pkcs7.c     p7 = PEM_read_bio_PKCS7(in, (PKCS7 **)&DATA_PTR(self), NULL, NULL);
DATA_PTR          304 ext/openssl/ossl_pkcs7.c         p7 = d2i_PKCS7_bio(in, (PKCS7 **)&DATA_PTR(self));
DATA_PTR          328 ext/openssl/ossl_pkcs7.c     DATA_PTR(self) = pkcs7;
DATA_PTR          547 ext/openssl/ossl_ssl.c         DATA_PTR(self) = ssl;
DATA_PTR           99 ext/openssl/ossl_x509attr.c 	if(!d2i_X509_ATTRIBUTE((X509_ATTRIBUTE**)&DATA_PTR(self),
DATA_PTR          141 ext/openssl/ossl_x509cert.c     x509 = PEM_read_bio_X509(in, (X509 **)&DATA_PTR(self), NULL, NULL);
DATA_PTR          144 ext/openssl/ossl_x509cert.c 	x509 = d2i_X509_bio(in, (X509 **)&DATA_PTR(self));
DATA_PTR          166 ext/openssl/ossl_x509cert.c     DATA_PTR(self) = x509;
DATA_PTR          102 ext/openssl/ossl_x509crl.c     crl = PEM_read_bio_X509_CRL(in, (X509_CRL **)&DATA_PTR(self), NULL, NULL);
DATA_PTR          105 ext/openssl/ossl_x509crl.c 	crl = d2i_X509_CRL_bio(in, (X509_CRL **)&DATA_PTR(self));
DATA_PTR          126 ext/openssl/ossl_x509crl.c     DATA_PTR(self) = crl;
DATA_PTR          284 ext/openssl/ossl_x509ext.c 	if(!d2i_X509_EXTENSION((X509_EXTENSION**)&DATA_PTR(self),
DATA_PTR          135 ext/openssl/ossl_x509name.c 	    if(!d2i_X509_NAME((X509_NAME**)&DATA_PTR(self), &p, RSTRING(str)->len)){
DATA_PTR          110 ext/openssl/ossl_x509req.c     req = PEM_read_bio_X509_REQ(in, (X509_REQ **)&DATA_PTR(self), NULL, NULL);
DATA_PTR          113 ext/openssl/ossl_x509req.c 	req = d2i_X509_REQ_bio(in, (X509_REQ **)&DATA_PTR(self));
DATA_PTR          134 ext/openssl/ossl_x509req.c     DATA_PTR(self) = req;
DATA_PTR          124 ext/sdbm/init.c     DATA_PTR(obj) = dbmp;
DATA_PTR           82 ext/stringio/stringio.c     return DATA_PTR(self);
DATA_PTR          222 ext/stringio/stringio.c 	DATA_PTR(self) = ptr = strio_alloc();
DATA_PTR          501 ext/stringio/stringio.c 	strio_free(DATA_PTR(copy));
DATA_PTR          503 ext/stringio/stringio.c     DATA_PTR(copy) = ptr;
DATA_PTR         1792 ext/syck/rubyext.c                 DATA_PTR(t) = n = syck_alloc_map();
DATA_PTR         1804 ext/syck/rubyext.c                 DATA_PTR(t) = n = syck_alloc_seq();
DATA_PTR         1813 ext/syck/rubyext.c             DATA_PTR(t) = n = syck_new_str2( orig_n->data.str->ptr, orig_n->data.str->len, orig_n->data.str->style );
DATA_PTR         4684 ext/tk/tcltklib.c     DATA_PTR(self) = ptr;
DATA_PTR          250 ext/win32ole/win32ole.c         st_delete(DATA_PTR(com_hash), &key, 0);
DATA_PTR          325 ext/win32ole/win32ole.c     struct st_table *tbl = DATA_PTR(com_hash);
DATA_PTR         3392 file.c             if (DATA_PTR(obj)) {
DATA_PTR         3393 file.c         	free(DATA_PTR(obj));
DATA_PTR         3394 file.c         	DATA_PTR(obj) = NULL;
DATA_PTR         3398 file.c             DATA_PTR(obj) = nst;
DATA_PTR         3415 file.c             if (DATA_PTR(copy)) {
DATA_PTR         3416 file.c         	free(DATA_PTR(copy));
DATA_PTR         3417 file.c         	DATA_PTR(copy) = 0;
DATA_PTR         3419 file.c             if (DATA_PTR(orig)) {
DATA_PTR         3421 file.c         	*nst = *(struct stat*)DATA_PTR(orig);
DATA_PTR         3422 file.c         	DATA_PTR(copy) = nst;
DATA_PTR          914 gc.c           	if (obj->as.data.dmark) (*obj->as.data.dmark)(DATA_PTR(obj));
DATA_PTR         1149 gc.c           	if (DATA_PTR(obj)) {
DATA_PTR         1151 gc.c           		RUBY_CRITICAL(free(DATA_PTR(obj)));
DATA_PTR         1154 gc.c           		(*RANY(obj)->as.data.dfree)(DATA_PTR(obj));
DATA_PTR         1837 gc.c           		DATA_PTR(p) && RANY(p)->as.data.dfree &&
DATA_PTR         1841 gc.c           		    RUBY_CRITICAL(free(DATA_PTR(p)));
DATA_PTR         1844 gc.c           		    (*RANY(p)->as.data.dfree)(DATA_PTR(p));
DATA_PTR          417 ruby.h             sval = (type*)DATA_PTR(obj);\
DATA_PTR         1160 variable.c         return (struct st_table *)DATA_PTR(av);
DATA_PTR         1187 variable.c     	DATA_PTR(av) = tbl = st_init_numtable();
DATA_PTR         1208 variable.c     	    DATA_PTR(val) = 0;
DATA_PTR         1255 variable.c     	DATA_PTR(val) = 0;


DBLKSIZ

DBLKSIZ           127 ext/sdbm/_sdbm.c #define OFF_DIR(off)	(long) (off) * DBLKSIZ
DBLKSIZ           223 ext/sdbm/_sdbm.c 				(void) memset(db->dirbuf, 0, DBLKSIZ);
DBLKSIZ           537 ext/sdbm/_sdbm.c 	dirb = c / DBLKSIZ;
DBLKSIZ           541 ext/sdbm/_sdbm.c 		    || read(db->dirf, db->dirbuf, DBLKSIZ) < 0)
DBLKSIZ           548 ext/sdbm/_sdbm.c 	return db->dirbuf[c % DBLKSIZ] & (1 << (dbit % BYTESIZ));
DBLKSIZ           560 ext/sdbm/_sdbm.c 	dirb = c / DBLKSIZ;
DBLKSIZ           564 ext/sdbm/_sdbm.c 		    || read(db->dirf, db->dirbuf, DBLKSIZ) < 0)
DBLKSIZ           571 ext/sdbm/_sdbm.c 	db->dirbuf[c % DBLKSIZ] |= (1 << (dbit % BYTESIZ));
DBLKSIZ           574 ext/sdbm/_sdbm.c 		db->maxbno += (long) DBLKSIZ * BYTESIZ;
DBLKSIZ           577 ext/sdbm/_sdbm.c 	    || write(db->dirf, db->dirbuf, DBLKSIZ) < 0)
DBLKSIZ            31 ext/sdbm/sdbm.h 	char dirbuf[DBLKSIZ];	       /* directory file block buffer */


DBL_DIG

DBL_DIG           270 marshal.c      #ifdef DBL_DIG
DBL_DIG           271 marshal.c      #define FLOAT_DIG (DBL_DIG+2)
DBL_DIG            56 numeric.c      #ifndef DBL_DIG
DBL_DIG          2912 numeric.c          rb_define_const(rb_cFloat, "DIG", INT2FIX(DBL_DIG));


DBL_EPSILON

DBL_EPSILON        62 numeric.c      #ifndef DBL_EPSILON
DBL_EPSILON      1422 numeric.c      	const double epsilon = DBL_EPSILON;
DBL_EPSILON      2919 numeric.c          rb_define_const(rb_cFloat, "EPSILON", rb_float_new(DBL_EPSILON));


DBL_MANT_DIG

DBL_MANT_DIG      193 marshal.c      #ifdef DBL_MANT_DIG
DBL_MANT_DIG      196 marshal.c      #if DBL_MANT_DIG > 32
DBL_MANT_DIG      198 marshal.c      #elif DBL_MANT_DIG > 24
DBL_MANT_DIG      200 marshal.c      #elif DBL_MANT_DIG > 16
DBL_MANT_DIG       18 missing/acosh.c #ifndef DBL_MANT_DIG
DBL_MANT_DIG       21 missing/acosh.c #define BIG_CRITERIA_BIT (1<<DBL_MANT_DIG/2)
DBL_MANT_DIG       25 missing/acosh.c #define BIG_CRITERIA (1.0*(1<<DBL_MANT_DIG/4)*(1<<(DBL_MANT_DIG/2+1-DBL_MANT_DIG/4)))
DBL_MANT_DIG       27 missing/acosh.c #define SMALL_CRITERIA_BIT (1<<(DBL_MANT_DIG/3))
DBL_MANT_DIG       31 missing/acosh.c #define SMALL_CRITERIA (1.0*(1<<DBL_MANT_DIG/4)*(1<<(DBL_MANT_DIG/3+1-DBL_MANT_DIG/4)))
DBL_MANT_DIG       58 missing/acosh.c     if (z < (1.0/(1<<DBL_MANT_DIG/5))) {
DBL_MANT_DIG       59 numeric.c      #ifndef DBL_MANT_DIG
DBL_MANT_DIG     2911 numeric.c          rb_define_const(rb_cFloat, "MANT_DIG", INT2FIX(DBL_MANT_DIG));


DBL_MAX

DBL_MAX           414 ext/bigdecimal/bigdecimal.c     if((errno == ERANGE && e>0) || (d2>1.0 && (fabs(d) > (DBL_MAX / d2)))) {
DBL_MAX           416 ext/bigdecimal/bigdecimal.c        if(d>0.0) return rb_float_new(DBL_MAX);
DBL_MAX           417 ext/bigdecimal/bigdecimal.c        else      return rb_float_new(-DBL_MAX);
DBL_MAX            41 numeric.c      #ifndef DBL_MAX
DBL_MAX          2918 numeric.c          rb_define_const(rb_cFloat, "MAX", rb_float_new(DBL_MAX));


DBL_MAX_10_EXP

DBL_MAX_10_EXP     53 numeric.c      #ifndef DBL_MAX_10_EXP
DBL_MAX_10_EXP   2916 numeric.c          rb_define_const(rb_cFloat, "MAX_10_EXP", INT2FIX(DBL_MAX_10_EXP));


DBL_MAX_EXP

DBL_MAX_EXP        47 numeric.c      #ifndef DBL_MAX_EXP
DBL_MAX_EXP      2914 numeric.c          rb_define_const(rb_cFloat, "MAX_EXP", INT2FIX(DBL_MAX_EXP));


DBL_MIN

DBL_MIN            38 numeric.c      #ifndef DBL_MIN
DBL_MIN          2917 numeric.c          rb_define_const(rb_cFloat, "MIN", rb_float_new(DBL_MIN));


DBL_MIN_10_EXP

DBL_MIN_10_EXP     50 numeric.c      #ifndef DBL_MIN_10_EXP
DBL_MIN_10_EXP   2915 numeric.c          rb_define_const(rb_cFloat, "MIN_10_EXP", INT2FIX(DBL_MIN_10_EXP));


DBL_MIN_EXP

DBL_MIN_EXP        44 numeric.c      #ifndef DBL_MIN_EXP
DBL_MIN_EXP      2913 numeric.c          rb_define_const(rb_cFloat, "MIN_EXP", INT2FIX(DBL_MIN_EXP));


DBM

DBM                31 ext/dbm/dbm.c      DBM *di_dbm;
DBM               104 ext/dbm/dbm.c      DBM *dbm;
DBM               178 ext/dbm/dbm.c      DBM *dbm;
DBM               223 ext/dbm/dbm.c      DBM *dbm;
DBM               246 ext/dbm/dbm.c      DBM *dbm;
DBM               295 ext/dbm/dbm.c      DBM *dbm;
DBM               330 ext/dbm/dbm.c      DBM *dbm;
DBM               353 ext/dbm/dbm.c      DBM *dbm;
DBM               394 ext/dbm/dbm.c      DBM *dbm;
DBM               415 ext/dbm/dbm.c      DBM *dbm;
DBM               475 ext/dbm/dbm.c      DBM *dbm;
DBM               506 ext/dbm/dbm.c      DBM *dbm;
DBM               526 ext/dbm/dbm.c      DBM *dbm;
DBM               550 ext/dbm/dbm.c      DBM *dbm;
DBM               567 ext/dbm/dbm.c      DBM *dbm;
DBM               582 ext/dbm/dbm.c      DBM *dbm;
DBM               605 ext/dbm/dbm.c      DBM *dbm;
DBM               624 ext/dbm/dbm.c      DBM *dbm;
DBM               643 ext/dbm/dbm.c      DBM *dbm;
DBM               661 ext/dbm/dbm.c      DBM *dbm;
DBM               683 ext/dbm/dbm.c      DBM *dbm;
DBM               703 ext/dbm/dbm.c      DBM *dbm;
DBM               113 ext/sdbm/_sdbm.c static int getdbit proto((DBM *, long));
DBM               114 ext/sdbm/_sdbm.c static int setdbit proto((DBM *, long));
DBM               115 ext/sdbm/_sdbm.c static int getpage proto((DBM *, long));
DBM               116 ext/sdbm/_sdbm.c static datum getnext proto((DBM *));
DBM               117 ext/sdbm/_sdbm.c static int makroom proto((DBM *, long, int));
DBM               145 ext/sdbm/_sdbm.c DBM *
DBM               151 ext/sdbm/_sdbm.c 	register DBM *db;
DBM               157 ext/sdbm/_sdbm.c 		return errno = EINVAL, (DBM *) NULL;
DBM               164 ext/sdbm/_sdbm.c 		return errno = ENOMEM, (DBM *) NULL;
DBM               177 ext/sdbm/_sdbm.c DBM *
DBM               184 ext/sdbm/_sdbm.c 	register DBM *db;
DBM               187 ext/sdbm/_sdbm.c 	if ((db = (DBM *) malloc(sizeof(DBM))) == NULL)
DBM               188 ext/sdbm/_sdbm.c 		return errno = ENOMEM, (DBM *) NULL;
DBM               234 ext/sdbm/_sdbm.c 	return (DBM *) NULL;
DBM               239 ext/sdbm/_sdbm.c register DBM *db;
DBM               252 ext/sdbm/_sdbm.c register DBM *db;
DBM               266 ext/sdbm/_sdbm.c register DBM *db;
DBM               292 ext/sdbm/_sdbm.c register DBM *db;
DBM               354 ext/sdbm/_sdbm.c register DBM *db;
DBM               454 ext/sdbm/_sdbm.c register DBM *db;
DBM               474 ext/sdbm/_sdbm.c register DBM *db;
DBM               486 ext/sdbm/_sdbm.c register DBM *db;
DBM               530 ext/sdbm/_sdbm.c register DBM *db;
DBM               553 ext/sdbm/_sdbm.c register DBM *db;
DBM               589 ext/sdbm/_sdbm.c register DBM *db;
DBM                23 ext/sdbm/init.c     DBM *di_dbm;
DBM                95 ext/sdbm/init.c     DBM *dbm;
DBM               156 ext/sdbm/init.c     DBM *dbm;
DBM               201 ext/sdbm/init.c     DBM *dbm;
DBM               223 ext/sdbm/init.c     DBM *dbm;
DBM               272 ext/sdbm/init.c     DBM *dbm;
DBM               308 ext/sdbm/init.c     DBM *dbm;
DBM               332 ext/sdbm/init.c     DBM *dbm;
DBM               372 ext/sdbm/init.c     DBM *dbm;
DBM               393 ext/sdbm/init.c     DBM *dbm;
DBM               453 ext/sdbm/init.c     DBM *dbm;
DBM               489 ext/sdbm/init.c     DBM *dbm;
DBM               509 ext/sdbm/init.c     DBM *dbm;
DBM               533 ext/sdbm/init.c     DBM *dbm;
DBM               550 ext/sdbm/init.c     DBM *dbm;
DBM               565 ext/sdbm/init.c     DBM *dbm;
DBM               587 ext/sdbm/init.c     DBM *dbm;
DBM               605 ext/sdbm/init.c     DBM *dbm;
DBM               624 ext/sdbm/init.c     DBM *dbm;
DBM               642 ext/sdbm/init.c     DBM *dbm;
DBM               664 ext/sdbm/init.c     DBM *dbm;
DBM               684 ext/sdbm/init.c     DBM *dbm;
DBM                70 ext/sdbm/sdbm.h extern DBM *sdbm_open proto((char *, int, int));
DBM                71 ext/sdbm/sdbm.h extern void sdbm_close proto((DBM *));
DBM                72 ext/sdbm/sdbm.h extern datum sdbm_fetch proto((DBM *, datum));
DBM                73 ext/sdbm/sdbm.h extern int sdbm_delete proto((DBM *, datum));
DBM                74 ext/sdbm/sdbm.h extern int sdbm_store proto((DBM *, datum, datum, int));
DBM                75 ext/sdbm/sdbm.h extern datum sdbm_firstkey proto((DBM *));
DBM                76 ext/sdbm/sdbm.h extern datum sdbm_nextkey proto((DBM *));
DBM                81 ext/sdbm/sdbm.h extern DBM *sdbm_prep proto((char *, char *, int, int));


DBM_IOERR

DBM_IOERR         124 ext/sdbm/_sdbm.c #define ioerr(db)	((db)->flags |= DBM_IOERR)
DBM_IOERR          41 ext/sdbm/sdbm.h #define sdbm_error(db)		((db)->flags & DBM_IOERR)
DBM_IOERR          43 ext/sdbm/sdbm.h #define sdbm_clearerr(db)	((db)->flags &= ~DBM_IOERR)  /* ouch */


DBM_RDONLY

DBM_RDONLY        202 ext/sdbm/_sdbm.c 		db->flags = DBM_RDONLY;
DBM_RDONLY         40 ext/sdbm/sdbm.h #define sdbm_rdonly(db)		((db)->flags & DBM_RDONLY)


DBM_REPLACE

DBM_REPLACE       489 ext/dbm/dbm.c      if (dbm_store(dbm, key, val, DBM_REPLACE)) {
DBM_REPLACE       317 ext/sdbm/_sdbm.c 		if (flags == DBM_REPLACE)
DBM_REPLACE       472 ext/sdbm/init.c     if (sdbm_store(dbm, key, val, DBM_REPLACE)) {


DCL_BLOCK

DCL_BLOCK         309 missing/crypt.c 	register DCL_BLOCK(D,D0,D1);
DCL_BLOCK         586 missing/crypt.c 	register DCL_BLOCK(K, K0, K1);


DECIMAL_MANT

DECIMAL_MANT      213 marshal.c          d = modf(ldexp(frexp(fabs(d), &e), DECIMAL_MANT), &d);
DECIMAL_MANT      242 marshal.c      	modf(ldexp(frexp(fabs(d), &e), DECIMAL_MANT), &d);
DECIMAL_MANT      260 marshal.c      	d = ldexp(d, e - DECIMAL_MANT);


DECL_FUNC

DECL_FUNC         276 ext/dl/cfunc.c             DECL_FUNC(f,void,DLSTACK_PROTO##n,cdecl) = cfunc->ptr; \
DECL_FUNC         285 ext/dl/cfunc.c 	    DECL_FUNC(f,void*,DLSTACK_PROTO##n,cdecl) = cfunc->ptr; \
DECL_FUNC         295 ext/dl/cfunc.c 	    DECL_FUNC(f,char,DLSTACK_PROTO##n,cdecl) = cfunc->ptr; \
DECL_FUNC         305 ext/dl/cfunc.c 	    DECL_FUNC(f,short,DLSTACK_PROTO##n,cdecl) = cfunc->ptr; \
DECL_FUNC         315 ext/dl/cfunc.c 	    DECL_FUNC(f,int,DLSTACK_PROTO##n,cdecl) = cfunc->ptr; \
DECL_FUNC         325 ext/dl/cfunc.c 	    DECL_FUNC(f,long,DLSTACK_PROTO##n,cdecl) = cfunc->ptr; \
DECL_FUNC         336 ext/dl/cfunc.c 	    DECL_FUNC(f,LONG_LONG,DLSTACK_PROTO,cdecl) = cfunc->ptr; \
DECL_FUNC         347 ext/dl/cfunc.c 	    DECL_FUNC(f,float,DLSTACK_PROTO,cdecl) = cfunc->ptr; \
DECL_FUNC         357 ext/dl/cfunc.c 	    DECL_FUNC(f,double,DLSTACK_PROTO,cdecl) = cfunc->ptr; \
DECL_FUNC         374 ext/dl/cfunc.c             DECL_FUNC(f,void,DLSTACK_PROTO##n,stdcall) = cfunc->ptr; \
DECL_FUNC         383 ext/dl/cfunc.c 	    DECL_FUNC(f,void*,DLSTACK_PROTO##n,stdcall) = cfunc->ptr; \
DECL_FUNC         393 ext/dl/cfunc.c 	    DECL_FUNC(f,char,DLSTACK_PROTO##n,stdcall) = cfunc->ptr; \
DECL_FUNC         403 ext/dl/cfunc.c 	    DECL_FUNC(f,short,DLSTACK_PROTO##n,stdcall) = cfunc->ptr; \
DECL_FUNC         413 ext/dl/cfunc.c 	    DECL_FUNC(f,int,DLSTACK_PROTO##n,stdcall) = cfunc->ptr; \
DECL_FUNC         423 ext/dl/cfunc.c 	    DECL_FUNC(f,long,DLSTACK_PROTO##n,stdcall) = cfunc->ptr; \
DECL_FUNC         434 ext/dl/cfunc.c 	    DECL_FUNC(f,LONG_LONG,DLSTACK_PROTO,stdcall) = cfunc->ptr; \
DECL_FUNC         445 ext/dl/cfunc.c 	    DECL_FUNC(f,float,DLSTACK_PROTO,stdcall) = cfunc->ptr; \
DECL_FUNC         455 ext/dl/cfunc.c 	    DECL_FUNC(f,double,DLSTACK_PROTO,stdcall) = cfunc->ptr; \


DEFAULT_CODE_JIS

DEFAULT_CODE_JIS  528 ext/nkf/nkf-utf8/nkf.c #ifdef DEFAULT_CODE_JIS
DEFAULT_CODE_JIS 4870 ext/nkf/nkf-utf8/nkf.c #ifdef DEFAULT_CODE_JIS


DEFAULT_CODE_SJIS

DEFAULT_CODE_SJIS  531 ext/nkf/nkf-utf8/nkf.c #ifdef DEFAULT_CODE_SJIS
DEFAULT_CODE_SJIS 4867 ext/nkf/nkf-utf8/nkf.c #ifdef DEFAULT_CODE_SJIS


DEFAULT_CONV

DEFAULT_CONV      542 ext/nkf/nkf-utf8/nkf.c STATIC void (*output_conv)PROTO((int c2,int c1)) = DEFAULT_CONV;
DEFAULT_CONV     4802 ext/nkf/nkf-utf8/nkf.c     output_conv = DEFAULT_CONV;
DEFAULT_CONV     4803 ext/nkf/nkf-utf8/nkf.c     oconv = DEFAULT_CONV;


DEFAULT_EVENTLOOP_DEPTH

DEFAULT_EVENTLOOP_DEPTH 7914 ext/tk/tcltklib.c #ifndef DEFAULT_EVENTLOOP_DEPTH
DEFAULT_EVENTLOOP_DEPTH 7917 ext/tk/tcltklib.c     eventloop_stack = rb_ary_new2(DEFAULT_EVENTLOOP_DEPTH);


DEFAULT_J

DEFAULT_J         516 ext/nkf/nkf-utf8/nkf.c STATIC unsigned char   kanji_intro = DEFAULT_J;
DEFAULT_J        4799 ext/nkf/nkf-utf8/nkf.c     kanji_intro = DEFAULT_J;


DEFAULT_KCODE

DEFAULT_KCODE     101 defines.h      #ifndef DEFAULT_KCODE
DEFAULT_KCODE     162 re.c           static int reg_kcode = DEFAULT_KCODE;
DEFAULT_KCODE    2204 re.c           #if DEFAULT_KCODE == KCODE_EUC
DEFAULT_KCODE    2207 re.c           #if DEFAULT_KCODE == KCODE_SJIS
DEFAULT_KCODE    2210 re.c           #if DEFAULT_KCODE == KCODE_UTF8


DEFAULT_R

DEFAULT_R         517 ext/nkf/nkf-utf8/nkf.c STATIC unsigned char   ascii_intro = DEFAULT_R;
DEFAULT_R        4800 ext/nkf/nkf-utf8/nkf.c     ascii_intro = DEFAULT_R;


DEFAULT_TIMER_TICK

DEFAULT_TIMER_TICK  335 ext/tk/tcltklib.c static int timer_tick     = DEFAULT_TIMER_TICK;
DEFAULT_TIMER_TICK  336 ext/tk/tcltklib.c static int req_timer_tick = DEFAULT_TIMER_TICK;


DEFAULT_VERB_WARN_FUNCTION

DEFAULT_VERB_WARN_FUNCTION   69 regparse.c     #ifdef DEFAULT_VERB_WARN_FUNCTION
DEFAULT_VERB_WARN_FUNCTION   70 regparse.c     static OnigWarnFunc onig_verb_warn = (OnigWarnFunc )DEFAULT_VERB_WARN_FUNCTION;


DEFAULT_WARN_FUNCTION

DEFAULT_WARN_FUNCTION   63 regparse.c     #ifdef DEFAULT_WARN_FUNCTION
DEFAULT_WARN_FUNCTION   64 regparse.c     static OnigWarnFunc onig_warn = (OnigWarnFunc )DEFAULT_WARN_FUNCTION;


DEFER_INTS

DEFER_INTS        781 class.c            DEFER_INTS;
DEFER_INTS       5271 eval.c             DEFER_INTS;
DEFER_INTS       6596 eval.c         	DEFER_INTS;
DEFER_INTS         97 regint.h       #define THREAD_ATOMIC_START          DEFER_INTS


DEFINE_MOUSE_GET_MEMBER

DEFINE_MOUSE_GET_MEMBER  720 ext/curses/curses.c DEFINE_MOUSE_GET_MEMBER(curs_mouse_x, x)
DEFINE_MOUSE_GET_MEMBER  721 ext/curses/curses.c DEFINE_MOUSE_GET_MEMBER(curs_mouse_y, y)
DEFINE_MOUSE_GET_MEMBER  722 ext/curses/curses.c DEFINE_MOUSE_GET_MEMBER(curs_mouse_z, z)
DEFINE_MOUSE_GET_MEMBER  723 ext/curses/curses.c DEFINE_MOUSE_GET_MEMBER(curs_mouse_bstate, bstate)


DEFMETH

DEFMETH           122 ext/openssl/ossl_rand.c     DEFMETH(mRandom, "seed", ossl_rand_seed, 1);
DEFMETH           123 ext/openssl/ossl_rand.c     DEFMETH(mRandom, "load_random_file", ossl_rand_load_file, 1);
DEFMETH           124 ext/openssl/ossl_rand.c     DEFMETH(mRandom, "write_random_file", ossl_rand_write_file, 1);
DEFMETH           125 ext/openssl/ossl_rand.c     DEFMETH(mRandom, "random_bytes", ossl_rand_bytes, 1);
DEFMETH           126 ext/openssl/ossl_rand.c     DEFMETH(mRandom, "pseudo_bytes", ossl_rand_pseudo_bytes, 1);
DEFMETH           127 ext/openssl/ossl_rand.c     DEFMETH(mRandom, "egd", ossl_rand_egd, 1);
DEFMETH           128 ext/openssl/ossl_rand.c     DEFMETH(mRandom, "egd_bytes", ossl_rand_egd_bytes, 2);


DEFPREC

DEFPREC           700 missing/vsnprintf.c 				DEFPREC + 1 : prec + 1;
DEFPREC           709 missing/vsnprintf.c 				prec = DEFPREC;


DEF_MEM_LEVEL

DEF_MEM_LEVEL      23 ext/zlib/zlib.c #ifndef DEF_MEM_LEVEL
DEF_MEM_LEVEL    1118 ext/zlib/zlib.c #define ARG_MEMLEVEL(val)  FIXNUMARG((val), DEF_MEM_LEVEL)
DEF_MEM_LEVEL    2794 ext/zlib/zlib.c 		       -MAX_WBITS, DEF_MEM_LEVEL, ARG_STRATEGY(strategy));
DEF_MEM_LEVEL    3494 ext/zlib/zlib.c     rb_define_const(mZlib, "DEF_MEM_LEVEL", INT2FIX(DEF_MEM_LEVEL));


DEF_OSSL_PKEY_BN

DEF_OSSL_PKEY_BN  436 ext/openssl/ossl_pkey_dh.c     DEF_OSSL_PKEY_BN(cDH, dh, p);
DEF_OSSL_PKEY_BN  437 ext/openssl/ossl_pkey_dh.c     DEF_OSSL_PKEY_BN(cDH, dh, g);
DEF_OSSL_PKEY_BN  438 ext/openssl/ossl_pkey_dh.c     DEF_OSSL_PKEY_BN(cDH, dh, pub_key);
DEF_OSSL_PKEY_BN  439 ext/openssl/ossl_pkey_dh.c     DEF_OSSL_PKEY_BN(cDH, dh, priv_key);
DEF_OSSL_PKEY_BN  399 ext/openssl/ossl_pkey_dsa.c     DEF_OSSL_PKEY_BN(cDSA, dsa, p);
DEF_OSSL_PKEY_BN  400 ext/openssl/ossl_pkey_dsa.c     DEF_OSSL_PKEY_BN(cDSA, dsa, q);
DEF_OSSL_PKEY_BN  401 ext/openssl/ossl_pkey_dsa.c     DEF_OSSL_PKEY_BN(cDSA, dsa, g);
DEF_OSSL_PKEY_BN  402 ext/openssl/ossl_pkey_dsa.c     DEF_OSSL_PKEY_BN(cDSA, dsa, pub_key);
DEF_OSSL_PKEY_BN  403 ext/openssl/ossl_pkey_dsa.c     DEF_OSSL_PKEY_BN(cDSA, dsa, priv_key);
DEF_OSSL_PKEY_BN  482 ext/openssl/ossl_pkey_rsa.c     DEF_OSSL_PKEY_BN(cRSA, rsa, n);
DEF_OSSL_PKEY_BN  483 ext/openssl/ossl_pkey_rsa.c     DEF_OSSL_PKEY_BN(cRSA, rsa, e);
DEF_OSSL_PKEY_BN  484 ext/openssl/ossl_pkey_rsa.c     DEF_OSSL_PKEY_BN(cRSA, rsa, d);
DEF_OSSL_PKEY_BN  485 ext/openssl/ossl_pkey_rsa.c     DEF_OSSL_PKEY_BN(cRSA, rsa, p);
DEF_OSSL_PKEY_BN  486 ext/openssl/ossl_pkey_rsa.c     DEF_OSSL_PKEY_BN(cRSA, rsa, q);
DEF_OSSL_PKEY_BN  487 ext/openssl/ossl_pkey_rsa.c     DEF_OSSL_PKEY_BN(cRSA, rsa, dmp1);
DEF_OSSL_PKEY_BN  488 ext/openssl/ossl_pkey_rsa.c     DEF_OSSL_PKEY_BN(cRSA, rsa, dmq1);
DEF_OSSL_PKEY_BN  489 ext/openssl/ossl_pkey_rsa.c     DEF_OSSL_PKEY_BN(cRSA, rsa, iqmp);


DEL

DEL              1539 ext/nkf/nkf-utf8/nkf.c     if (c <= DEL && estab_f){
DEL              1553 ext/nkf/nkf-utf8/nkf.c           if (c <= DEL){
DEL              1619 ext/nkf/nkf-utf8/nkf.c           if (c <= DEL){
DEL              1716 ext/nkf/nkf-utf8/nkf.c           if (c <= DEL){
DEL              1778 ext/nkf/nkf-utf8/nkf.c         }else if (c <= DEL){
DEL              1963 ext/nkf/nkf-utf8/nkf.c             if (c2 > DEL) {
DEL              1984 ext/nkf/nkf-utf8/nkf.c                 if ((c1 == DEL) || (c1 <= SPACE)) {
DEL              2006 ext/nkf/nkf-utf8/nkf.c 	    } else if (c1 > DEL) {
DEL              2050 ext/nkf/nkf-utf8/nkf.c             } else if ((c1 > SPACE) && (c1 != DEL)) {
DEL              2335 ext/nkf/nkf-utf8/nkf.c         if (c2 <= DEL
DEL              2424 ext/nkf/nkf-utf8/nkf.c         c1 = c1 - ((c1 > DEL) ? SPACE : 0x1f);
DEL              4042 ext/nkf/nkf-utf8/nkf.c 	if (c1<=' ' || DEL<=c1) {
DEL              4464 ext/nkf/nkf-utf8/nkf.c 	} else if(c<SPACE||c=='='||c=='?'||c=='_'||DEL<=c) {
DEL              4580 ext/nkf/nkf-utf8/nkf.c         if (c <= DEL && (output_mode==ASCII ||output_mode == ISO8859_1 ) ) {
DEL              4599 ext/nkf/nkf-utf8/nkf.c         if (c <= DEL && (output_mode==ASCII ||output_mode == ISO8859_1)) {
DEL              4650 ext/nkf/nkf-utf8/nkf.c         if ( c<=DEL && (output_mode==ASCII ||output_mode == ISO8859_1 ) ) {
DEL              4657 ext/nkf/nkf-utf8/nkf.c                 } else if (SPACE<c && c<DEL) {
DEL              4668 ext/nkf/nkf-utf8/nkf.c                     if (SPACE<mimeout_buf[i] && mimeout_buf[i]<DEL) {


DELAY_INFTY

DELAY_INFTY      10508 eval.c             delay = DELAY_INFTY;
DELAY_INFTY      10551 eval.c         	    else if (th->delay == DELAY_INFTY) {
DELAY_INFTY      10567 eval.c         	else if (delay == DELAY_INFTY) {
DELAY_INFTY      10656 eval.c         	if (!found && delay != DELAY_INFTY)
DELAY_INFTY      10929 eval.c         	if (limit < DELAY_INFTY) curr_thread->wait_for |= WAIT_TIME;
DELAY_INFTY      10995 eval.c             double delay = DELAY_INFTY;
DELAY_INFTY      11311 eval.c             curr_thread->delay = DELAY_INFTY;
DELAY_INFTY      12006 eval.c             while (!rb_thread_join(th, DELAY_INFTY));


DEPRECATED

DEPRECATED         30 ruby.h         #ifndef DEPRECATED
DEPRECATED        104 rubyio.h       DEPRECATED(int rb_getc(FILE*));
DEPRECATED        105 rubyio.h       DEPRECATED(long rb_io_fread(char *, long, FILE *));
DEPRECATED        106 rubyio.h       DEPRECATED(long rb_io_fwrite(const char *, long, FILE *));
DEPRECATED        107 rubyio.h       DEPRECATED(int rb_read_pending(FILE*));


DEVICELEN

DEVICELEN         104 ext/pty/pty.c  static char SlaveName[DEVICELEN];
DEVICELEN         379 ext/pty/pty.c      char MasterName[DEVICELEN];


DH_HAS_PRIVATE

DH_HAS_PRIVATE     25 ext/openssl/ossl_pkey_dh.c #  define DH_PRIVATE(dh) (DH_HAS_PRIVATE(dh) || (dh)->engine)
DH_HAS_PRIVATE     27 ext/openssl/ossl_pkey_dh.c #  define DH_PRIVATE(dh) DH_HAS_PRIVATE(dh)


DIGITVAL

DIGITVAL          366 regint.h       #define ODIGITVAL(code)   DIGITVAL(code)
DIGITVAL          368 regint.h         (ONIGENC_IS_CODE_DIGIT(enc,code) ? DIGITVAL(code) \
DIGITVAL         1490 regparse.c           val = (unsigned int )DIGITVAL(c);


DIGSPERLL

DIGSPERLL         227 bignum.c           big = bignew(DIGSPERLL, 1);
DIGSPERLL         229 bignum.c           while (i < DIGSPERLL) {
DIGSPERLL         234 bignum.c           i = DIGSPERLL;
DIGSPERLL         528 bignum.c           big = bignew(DIGSPERLL, 1);
DIGSPERLL         530 bignum.c           while (i < DIGSPERLL) {
DIGSPERLL         535 bignum.c           i = DIGSPERLL;


DIGSPERLONG

DIGSPERLONG       132 bignum.c           big = bignew(DIGSPERLONG, 1);
DIGSPERLONG       134 bignum.c           while (i < DIGSPERLONG) {
DIGSPERLONG       139 bignum.c           i = DIGSPERLONG;


DIR

DIR               353 dir.c              DIR *dir;
DIR               932 dir.c          static DIR *
DIR               935 dir.c              DIR *dirp = opendir(path);
DIR              1225 dir.c          	DIR *dirp = do_opendir(*path ? path : ".", flags);
DIR                30 win32/dir.h    DIR*           rb_w32_opendir(const char*);
DIR                31 win32/dir.h    struct direct* rb_w32_readdir(DIR *);
DIR                32 win32/dir.h    long           rb_w32_telldir(DIR *);
DIR                33 win32/dir.h    void           rb_w32_seekdir(DIR *, long);
DIR                34 win32/dir.h    void           rb_w32_rewinddir(DIR *);
DIR                35 win32/dir.h    void           rb_w32_closedir(DIR *);
DIR              1351 win32/win32.c  DIR *
DIR              1354 win32/win32.c      DIR               *p;
DIR              1380 win32/win32.c      p = xcalloc(sizeof(DIR), 1);
DIR              1469 win32/win32.c  move_to_next_entry(DIR *dirp)
DIR              1486 win32/win32.c  rb_w32_readdir(DIR *dirp)
DIR              1527 win32/win32.c  rb_w32_telldir(DIR *dirp)
DIR              1537 win32/win32.c  rb_w32_seekdir(DIR *dirp, long loc)
DIR              1551 win32/win32.c  rb_w32_rewinddir(DIR *dirp)
DIR              1562 win32/win32.c  rb_w32_closedir(DIR *dirp)


DIRFEXT

DIRFEXT           161 ext/sdbm/_sdbm.c 	n = strlen(file) * 2 + strlen(DIRFEXT) + strlen(PAGFEXT) + 2;
DIRFEXT           168 ext/sdbm/_sdbm.c 	dirname = strcat(strcpy(dirname, file), DIRFEXT);


DIV

DIV               438 time.c         		    DIV(tm_year-69,4) -
DIV               439 time.c         		    DIV(tm_year-1,100) +
DIV               440 time.c         		    DIV(tm_year+299,400))*86400;


DLEXT

DLEXT            6683 eval.c         #define IS_DLEXT(e) (strcmp(e, DLEXT) == 0 || strcmp(e, DLEXT2) == 0)
DLEXT            6685 eval.c         #define IS_DLEXT(e) (strcmp(e, DLEXT) == 0)
DLEXT            6723 eval.c             ".rb", DLEXT,
DLEXT            6848 eval.c         	    rb_str_cat2(tmp, DLEXT);
DLEXT             106 ext/tk/stubs.c         snprintf(tcl_name, sizeof tcl_name, TCL_NAME, DLEXT);
DLEXT             154 ext/tk/stubs.c         snprintf(tk_name, sizeof tk_name, TK_NAME, DLEXT);


DLEXT2

DLEXT2           6682 eval.c         #ifdef DLEXT2
DLEXT2           6683 eval.c         #define IS_DLEXT(e) (strcmp(e, DLEXT) == 0 || strcmp(e, DLEXT2) == 0)
DLEXT2           6724 eval.c         #ifdef DLEXT2
DLEXT2           6725 eval.c             DLEXT2,
DLEXT2           6838 eval.c         #ifdef DLEXT2


DLN_DEFAULT_LIB_PATH

DLN_DEFAULT_LIB_PATH  153 dln.c          #ifndef DLN_DEFAULT_LIB_PATH
DLN_DEFAULT_LIB_PATH  939 dln.c          char *dln_librrb_ary_path = DLN_DEFAULT_LIB_PATH;


DLN_EBADLIB

DLN_EBADLIB       960 dln.c              dln_errno = DLN_EBADLIB;
DLN_EBADLIB      1176 dln.c                case DLN_EBADLIB:


DLN_ECONFL

DLN_ECONFL        754 dln.c          		dln_errno = DLN_ECONFL;
DLN_ECONFL       1168 dln.c                case DLN_ECONFL:


DLN_ENOEXEC

DLN_ENOEXEC       205 dln.c          	dln_errno = DLN_ENOEXEC;
DLN_ENOEXEC       329 dln.c              dln_errno = DLN_ENOEXEC;
DLN_ENOEXEC       426 dln.c              dln_errno = DLN_ENOEXEC;
DLN_ENOEXEC       655 dln.c          	dln_errno = DLN_ENOEXEC;


DLN_ENOINIT

DLN_ENOINIT       900 dln.c          	    dln_errno = DLN_ENOINIT;
DLN_ENOINIT       955 dln.c          	dln_errno = DLN_ENOINIT;
DLN_ENOINIT      1170 dln.c                case DLN_ENOINIT:


DLN_ENOTLIB

DLN_ENOTLIB       983 dln.c          	dln_errno = DLN_ENOTLIB;
DLN_ENOTLIB      1174 dln.c                case DLN_ENOTLIB:


DLN_ERROR

DLN_ERROR        1337 dln.c          	    error = DLN_ERROR();
DLN_ERROR        1581 dln.c          	    error = DLN_ERROR();


DLN_EUNDEF

DLN_EUNDEF        906 dln.c          		dln_errno = DLN_EUNDEF;
DLN_EUNDEF       1172 dln.c                case DLN_EUNDEF:


DLSTACK_ARGS

DLSTACK_ARGS      277 ext/dl/cfunc.c 	    f(DLSTACK_ARGS##n(stack)); \
DLSTACK_ARGS      287 ext/dl/cfunc.c 	    ret = f(DLSTACK_ARGS##n(stack)); \
DLSTACK_ARGS      297 ext/dl/cfunc.c 	    ret = f(DLSTACK_ARGS##n(stack)); \
DLSTACK_ARGS      307 ext/dl/cfunc.c 	    ret = f(DLSTACK_ARGS##n(stack)); \
DLSTACK_ARGS      317 ext/dl/cfunc.c 	    ret = f(DLSTACK_ARGS##n(stack)); \
DLSTACK_ARGS      327 ext/dl/cfunc.c 	    ret = f(DLSTACK_ARGS##n(stack)); \
DLSTACK_ARGS      338 ext/dl/cfunc.c 	    ret = f(DLSTACK_ARGS(stack)); \
DLSTACK_ARGS      349 ext/dl/cfunc.c 	    ret = f(DLSTACK_ARGS(stack)); \
DLSTACK_ARGS      359 ext/dl/cfunc.c 	    ret = f(DLSTACK_ARGS(stack)); \
DLSTACK_ARGS      375 ext/dl/cfunc.c 	    f(DLSTACK_ARGS##n(stack)); \
DLSTACK_ARGS      385 ext/dl/cfunc.c 	    ret = f(DLSTACK_ARGS##n(stack)); \
DLSTACK_ARGS      395 ext/dl/cfunc.c 	    ret = f(DLSTACK_ARGS##n(stack)); \
DLSTACK_ARGS      405 ext/dl/cfunc.c 	    ret = f(DLSTACK_ARGS##n(stack)); \
DLSTACK_ARGS      415 ext/dl/cfunc.c 	    ret = f(DLSTACK_ARGS##n(stack)); \
DLSTACK_ARGS      425 ext/dl/cfunc.c 	    ret = f(DLSTACK_ARGS##n(stack)); \
DLSTACK_ARGS      436 ext/dl/cfunc.c 	    ret = f(DLSTACK_ARGS(stack)); \
DLSTACK_ARGS      447 ext/dl/cfunc.c 	    ret = f(DLSTACK_ARGS(stack)); \
DLSTACK_ARGS      457 ext/dl/cfunc.c 	    ret = f(DLSTACK_ARGS(stack)); \


DLSTACK_PROTO

DLSTACK_PROTO     276 ext/dl/cfunc.c             DECL_FUNC(f,void,DLSTACK_PROTO##n,cdecl) = cfunc->ptr; \
DLSTACK_PROTO     285 ext/dl/cfunc.c 	    DECL_FUNC(f,void*,DLSTACK_PROTO##n,cdecl) = cfunc->ptr; \
DLSTACK_PROTO     295 ext/dl/cfunc.c 	    DECL_FUNC(f,char,DLSTACK_PROTO##n,cdecl) = cfunc->ptr; \
DLSTACK_PROTO     305 ext/dl/cfunc.c 	    DECL_FUNC(f,short,DLSTACK_PROTO##n,cdecl) = cfunc->ptr; \
DLSTACK_PROTO     315 ext/dl/cfunc.c 	    DECL_FUNC(f,int,DLSTACK_PROTO##n,cdecl) = cfunc->ptr; \
DLSTACK_PROTO     325 ext/dl/cfunc.c 	    DECL_FUNC(f,long,DLSTACK_PROTO##n,cdecl) = cfunc->ptr; \
DLSTACK_PROTO     336 ext/dl/cfunc.c 	    DECL_FUNC(f,LONG_LONG,DLSTACK_PROTO,cdecl) = cfunc->ptr; \
DLSTACK_PROTO     347 ext/dl/cfunc.c 	    DECL_FUNC(f,float,DLSTACK_PROTO,cdecl) = cfunc->ptr; \
DLSTACK_PROTO     357 ext/dl/cfunc.c 	    DECL_FUNC(f,double,DLSTACK_PROTO,cdecl) = cfunc->ptr; \
DLSTACK_PROTO     374 ext/dl/cfunc.c             DECL_FUNC(f,void,DLSTACK_PROTO##n,stdcall) = cfunc->ptr; \
DLSTACK_PROTO     383 ext/dl/cfunc.c 	    DECL_FUNC(f,void*,DLSTACK_PROTO##n,stdcall) = cfunc->ptr; \
DLSTACK_PROTO     393 ext/dl/cfunc.c 	    DECL_FUNC(f,char,DLSTACK_PROTO##n,stdcall) = cfunc->ptr; \
DLSTACK_PROTO     403 ext/dl/cfunc.c 	    DECL_FUNC(f,short,DLSTACK_PROTO##n,stdcall) = cfunc->ptr; \
DLSTACK_PROTO     413 ext/dl/cfunc.c 	    DECL_FUNC(f,int,DLSTACK_PROTO##n,stdcall) = cfunc->ptr; \
DLSTACK_PROTO     423 ext/dl/cfunc.c 	    DECL_FUNC(f,long,DLSTACK_PROTO##n,stdcall) = cfunc->ptr; \
DLSTACK_PROTO     434 ext/dl/cfunc.c 	    DECL_FUNC(f,LONG_LONG,DLSTACK_PROTO,stdcall) = cfunc->ptr; \
DLSTACK_PROTO     445 ext/dl/cfunc.c 	    DECL_FUNC(f,float,DLSTACK_PROTO,stdcall) = cfunc->ptr; \
DLSTACK_PROTO     455 ext/dl/cfunc.c 	    DECL_FUNC(f,double,DLSTACK_PROTO,stdcall) = cfunc->ptr; \


DLSTACK_PROTO13

DLSTACK_PROTO13    60 ext/dl/dl.h    #define DLSTACK_PROTO14 DLSTACK_PROTO13, DLSTACK_TYPE
DLSTACK_PROTO13    61 ext/dl/dl.h    #define DLSTACK_PROTO14 DLSTACK_PROTO13, DLSTACK_TYPE


DLSTACK_PROTO3

DLSTACK_PROTO3     49 ext/dl/dl.h    #define DLSTACK_PROTO4 DLSTACK_PROTO3, DLSTACK_TYPE
DLSTACK_PROTO3     50 ext/dl/dl.h    #define DLSTACK_PROTO4 DLSTACK_PROTO3, DLSTACK_TYPE


DLSTACK_SIZE

DLSTACK_SIZE      249 ext/dl/cfunc.c     DLSTACK_TYPE stack[DLSTACK_SIZE];
DLSTACK_SIZE      254 ext/dl/cfunc.c     memset(stack, 0, sizeof(DLSTACK_TYPE) * DLSTACK_SIZE);
DLSTACK_SIZE      265 ext/dl/cfunc.c 	if( i >= DLSTACK_SIZE ){
DLSTACK_SIZE       94 ext/dl/dl.c        rb_define_const(rb_mDL, "DLSTACK_SIZE", INT2NUM(DLSTACK_SIZE));


DLSTACK_TYPE

DLSTACK_TYPE      249 ext/dl/cfunc.c     DLSTACK_TYPE stack[DLSTACK_SIZE];
DLSTACK_TYPE      254 ext/dl/cfunc.c     memset(stack, 0, sizeof(DLSTACK_TYPE) * DLSTACK_SIZE);
DLSTACK_TYPE       35 ext/dl/dl.h        DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,\
DLSTACK_TYPE       36 ext/dl/dl.h        DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,\
DLSTACK_TYPE       37 ext/dl/dl.h        DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,\
DLSTACK_TYPE       38 ext/dl/dl.h        DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE
DLSTACK_TYPE       46 ext/dl/dl.h    #define DLSTACK_PROTO1 DLSTACK_TYPE
DLSTACK_TYPE       47 ext/dl/dl.h    #define DLSTACK_PROTO2 DLSTACK_PROTO1, DLSTACK_TYPE
DLSTACK_TYPE       48 ext/dl/dl.h    #define DLSTACK_PROTO3 DLSTACK_PROTO2, DLSTACK_TYPE
DLSTACK_TYPE       49 ext/dl/dl.h    #define DLSTACK_PROTO4 DLSTACK_PROTO3, DLSTACK_TYPE
DLSTACK_TYPE       50 ext/dl/dl.h    #define DLSTACK_PROTO4 DLSTACK_PROTO3, DLSTACK_TYPE
DLSTACK_TYPE       51 ext/dl/dl.h    #define DLSTACK_PROTO5 DLSTACK_PROTO4, DLSTACK_TYPE
DLSTACK_TYPE       52 ext/dl/dl.h    #define DLSTACK_PROTO6 DLSTACK_PROTO5, DLSTACK_TYPE
DLSTACK_TYPE       53 ext/dl/dl.h    #define DLSTACK_PROTO7 DLSTACK_PROTO6, DLSTACK_TYPE
DLSTACK_TYPE       54 ext/dl/dl.h    #define DLSTACK_PROTO8 DLSTACK_PROTO7, DLSTACK_TYPE
DLSTACK_TYPE       55 ext/dl/dl.h    #define DLSTACK_PROTO9 DLSTACK_PROTO8, DLSTACK_TYPE
DLSTACK_TYPE       56 ext/dl/dl.h    #define DLSTACK_PROTO10 DLSTACK_PROTO9, DLSTACK_TYPE
DLSTACK_TYPE       57 ext/dl/dl.h    #define DLSTACK_PROTO11 DLSTACK_PROTO10, DLSTACK_TYPE
DLSTACK_TYPE       58 ext/dl/dl.h    #define DLSTACK_PROTO12 DLSTACK_PROTO11, DLSTACK_TYPE
DLSTACK_TYPE       59 ext/dl/dl.h    #define DLSTACK_PROTO13 DLSTACK_PROTO12, DLSTACK_TYPE
DLSTACK_TYPE       60 ext/dl/dl.h    #define DLSTACK_PROTO14 DLSTACK_PROTO13, DLSTACK_TYPE
DLSTACK_TYPE       61 ext/dl/dl.h    #define DLSTACK_PROTO14 DLSTACK_PROTO13, DLSTACK_TYPE
DLSTACK_TYPE       62 ext/dl/dl.h    #define DLSTACK_PROTO15 DLSTACK_PROTO14, DLSTACK_TYPE
DLSTACK_TYPE       63 ext/dl/dl.h    #define DLSTACK_PROTO16 DLSTACK_PROTO15, DLSTACK_TYPE
DLSTACK_TYPE       64 ext/dl/dl.h    #define DLSTACK_PROTO17 DLSTACK_PROTO16, DLSTACK_TYPE
DLSTACK_TYPE       65 ext/dl/dl.h    #define DLSTACK_PROTO18 DLSTACK_PROTO17, DLSTACK_TYPE
DLSTACK_TYPE       66 ext/dl/dl.h    #define DLSTACK_PROTO19 DLSTACK_PROTO18, DLSTACK_TYPE
DLSTACK_TYPE       67 ext/dl/dl.h    #define DLSTACK_PROTO20 DLSTACK_PROTO19, DLSTACK_TYPE


DLTYPE_CHAR

DLTYPE_CHAR       293 ext/dl/cfunc.c 	case DLTYPE_CHAR:
DLTYPE_CHAR       391 ext/dl/cfunc.c 	case DLTYPE_CHAR:
DLTYPE_CHAR       104 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_CHAR",  INT2NUM(DLTYPE_CHAR));


DLTYPE_DOUBLE

DLTYPE_DOUBLE     355 ext/dl/cfunc.c 	case DLTYPE_DOUBLE:
DLTYPE_DOUBLE     453 ext/dl/cfunc.c 	case DLTYPE_DOUBLE:
DLTYPE_DOUBLE     112 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_DOUBLE",  INT2NUM(DLTYPE_DOUBLE));


DLTYPE_FLOAT

DLTYPE_FLOAT      345 ext/dl/cfunc.c 	case DLTYPE_FLOAT:
DLTYPE_FLOAT      443 ext/dl/cfunc.c 	case DLTYPE_FLOAT:
DLTYPE_FLOAT      111 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_FLOAT",  INT2NUM(DLTYPE_FLOAT));


DLTYPE_INT

DLTYPE_INT        313 ext/dl/cfunc.c 	case DLTYPE_INT:
DLTYPE_INT        411 ext/dl/cfunc.c 	case DLTYPE_INT:
DLTYPE_INT        106 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_INT",  INT2NUM(DLTYPE_INT));


DLTYPE_LONG

DLTYPE_LONG       323 ext/dl/cfunc.c 	case DLTYPE_LONG:
DLTYPE_LONG       421 ext/dl/cfunc.c 	case DLTYPE_LONG:
DLTYPE_LONG       107 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_LONG",  INT2NUM(DLTYPE_LONG));


DLTYPE_LONG_LONG

DLTYPE_LONG_LONG  334 ext/dl/cfunc.c 	case DLTYPE_LONG_LONG:
DLTYPE_LONG_LONG  432 ext/dl/cfunc.c 	case DLTYPE_LONG_LONG:
DLTYPE_LONG_LONG  109 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_LONG_LONG",  INT2NUM(DLTYPE_LONG_LONG));


DLTYPE_SHORT

DLTYPE_SHORT      303 ext/dl/cfunc.c 	case DLTYPE_SHORT:
DLTYPE_SHORT      401 ext/dl/cfunc.c 	case DLTYPE_SHORT:
DLTYPE_SHORT      105 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_SHORT",  INT2NUM(DLTYPE_SHORT));


DLTYPE_VOID

DLTYPE_VOID       127 ext/dl/cfunc.c     data->type = (type == Qnil) ? DLTYPE_VOID : NUM2INT(type);
DLTYPE_VOID       274 ext/dl/cfunc.c 	case DLTYPE_VOID:
DLTYPE_VOID       372 ext/dl/cfunc.c 	case DLTYPE_VOID:
DLTYPE_VOID       241 ext/dl/cptr.c    return rb_dlcfunc_new(pdata->free, DLTYPE_VOID, "free<anonymous>", CFUNC_CDECL);
DLTYPE_VOID       102 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_VOID",  INT2NUM(DLTYPE_VOID));


DLTYPE_VOIDP

DLTYPE_VOIDP      283 ext/dl/cfunc.c 	case DLTYPE_VOIDP:
DLTYPE_VOIDP      381 ext/dl/cfunc.c 	case DLTYPE_VOIDP:
DLTYPE_VOIDP      103 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_VOIDP",  INT2NUM(DLTYPE_VOIDP));


DL_HANDLE

DL_HANDLE          85 ext/tk/stubs.c static DL_HANDLE tcl_dll = (DL_HANDLE)0;
DL_HANDLE          86 ext/tk/stubs.c static DL_HANDLE tk_dll  = (DL_HANDLE)0;
DL_HANDLE         104 ext/tk/stubs.c         tcl_dll = (DL_HANDLE)DL_OPEN(ruby_tcl_dll);
DL_HANDLE         110 ext/tk/stubs.c             tcl_dll = (DL_HANDLE)DL_OPEN(tcl_name);
DL_HANDLE         152 ext/tk/stubs.c         tk_dll = (DL_HANDLE)DL_OPEN(ruby_tk_dll);
DL_HANDLE         158 ext/tk/stubs.c             tk_dll = (DL_HANDLE)DL_OPEN(tk_name);


DL_OPEN

DL_OPEN           104 ext/tk/stubs.c         tcl_dll = (DL_HANDLE)DL_OPEN(ruby_tcl_dll);
DL_OPEN           110 ext/tk/stubs.c             tcl_dll = (DL_HANDLE)DL_OPEN(tcl_name);
DL_OPEN           152 ext/tk/stubs.c         tk_dll = (DL_HANDLE)DL_OPEN(ruby_tk_dll);
DL_OPEN           158 ext/tk/stubs.c             tk_dll = (DL_HANDLE)DL_OPEN(tk_name);


DL_SYM

DL_SYM            123 ext/tk/stubs.c     p_Tcl_FindExecutable = (void (*)(const char *))DL_SYM(tcl_dll, "Tcl_FindExecutable");
DL_SYM            223 ext/tk/stubs.c             = (Tcl_Interp *(*)())DL_SYM(tcl_dll, "Tcl_CreateInterp");
DL_SYM            230 ext/tk/stubs.c             = (Tcl_Interp *(*)())DL_SYM(tcl_dll, "Tcl_DeleteInterp");
DL_SYM            289 ext/tk/stubs.c         p_Tk_Init = (int (*)(Tcl_Interp *))DL_SYM(tk_dll, "Tk_Init");
DL_SYM            324 ext/tk/stubs.c         p_Tk_SafeInit = (int (*)(Tcl_Interp *))DL_SYM(tk_dll, "Tk_SafeInit");


DOSISH

DOSISH            102 defines.h      #if defined(DOSISH) || defined(__CYGWIN__) || defined(__MACOS__) || defined(OS2)
DOSISH            241 defines.h      #if defined(DOSISH)
DOSISH            256 defines.h      #if defined(DOSISH) && !defined(__human68k__) && !defined(__EMX__)
DOSISH             71 dir.c          # if defined DOSISH || defined __VMS
DOSISH           1317 dir.c          #if defined DOSISH
DOSISH           1685 dln.c          #ifdef DOSISH
DOSISH           1720 dln.c          #if defined(DOSISH)
DOSISH           1778 dln.c          #if defined(DOSISH)
DOSISH           1417 file.c         #ifndef DOSISH
DOSISH           2181 file.c         #elif defined DOSISH && !defined _WIN32
DOSISH           2233 file.c         #if defined DOSISH
DOSISH           2419 file.c         #if defined DOSISH || defined __CYGWIN__
DOSISH           2505 file.c         #if defined DOSISH || defined __CYGWIN__
DOSISH           2553 file.c         #if defined DOSISH || defined __CYGWIN__
DOSISH           2565 file.c         #if defined DOSISH || defined __CYGWIN__
DOSISH           3991 file.c         #ifndef DOSISH
DOSISH           3997 file.c         #ifndef DOSISH
DOSISH           4041 file.c         #ifndef DOSISH
DOSISH           4051 file.c         #ifndef DOSISH
DOSISH           4336 file.c         #ifdef DOSISH
DOSISH            235 ruby.c         #if defined DOSISH || defined __CYGWIN__
DOSISH            239 ruby.c         #if defined DOSISH || defined __CYGWIN__
DOSISH            283 ruby.c         #if defined DOSISH || defined __CYGWIN__
DOSISH            813 ruby.c         #if defined DOSISH || defined __CYGWIN__
DOSISH            867 ruby.c         #if defined DOSISH || defined __CYGWIN__
DOSISH            990 ruby.c         #if !defined(PSTAT_SETCMD) && !defined(HAVE_SETPROCTITLE) && !defined(DOSISH)
DOSISH           1064 ruby.c         #ifndef DOSISH


DOSISH_DRIVE_LETTER

DOSISH_DRIVE_LETTER 1687 dln.c          # ifdef DOSISH_DRIVE_LETTER
DOSISH_DRIVE_LETTER 2253 file.c         #ifdef DOSISH_DRIVE_LETTER
DOSISH_DRIVE_LETTER 2296 file.c         #ifdef DOSISH_DRIVE_LETTER
DOSISH_DRIVE_LETTER 2313 file.c         #if defined(DOSISH_UNC) || defined(DOSISH_DRIVE_LETTER)
DOSISH_DRIVE_LETTER 2321 file.c         #if defined(DOSISH_UNC) || defined(DOSISH_DRIVE_LETTER)
DOSISH_DRIVE_LETTER 2331 file.c         #ifdef DOSISH_DRIVE_LETTER
DOSISH_DRIVE_LETTER 2455 file.c         #ifdef DOSISH_DRIVE_LETTER
DOSISH_DRIVE_LETTER 2674 file.c         #if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC
DOSISH_DRIVE_LETTER 2686 file.c         #if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC
DOSISH_DRIVE_LETTER 2694 file.c         #if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC
DOSISH_DRIVE_LETTER 2698 file.c         #ifdef DOSISH_DRIVE_LETTER
DOSISH_DRIVE_LETTER 2762 file.c         #ifdef DOSISH_DRIVE_LETTER
DOSISH_DRIVE_LETTER 2770 file.c         #ifdef DOSISH_DRIVE_LETTER
DOSISH_DRIVE_LETTER 3985 file.c         #ifdef DOSISH_DRIVE_LETTER


DOSISH_UNC

DOSISH_UNC       2313 file.c         #if defined(DOSISH_UNC) || defined(DOSISH_DRIVE_LETTER)
DOSISH_UNC       2321 file.c         #if defined(DOSISH_UNC) || defined(DOSISH_DRIVE_LETTER)
DOSISH_UNC       2322 file.c         #ifdef DOSISH_UNC
DOSISH_UNC       2674 file.c         #if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC
DOSISH_UNC       2686 file.c         #if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC
DOSISH_UNC       2694 file.c         #if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC
DOSISH_UNC       2704 file.c         #ifdef DOSISH_UNC
DOSISH_UNC       2749 file.c         #ifdef DOSISH_UNC
DOSISH_UNC       3988 file.c         #ifdef DOSISH_UNC


DOUBLE_CONVWITH

DOUBLE_CONVWITH   792 pack.c         		DOUBLE_CONVWITH(dtmp);
DOUBLE_CONVWITH   827 pack.c         		DOUBLE_CONVWITH(dtmp);
DOUBLE_CONVWITH  1652 pack.c         		DOUBLE_CONVWITH(dtmp);
DOUBLE_CONVWITH  1692 pack.c         		DOUBLE_CONVWITH(dtmp);


DOXOR

DOXOR             696 missing/crypt.c 			DOXOR(p0, p1, 0);		\
DOXOR             697 missing/crypt.c 			DOXOR(p0, p1, 1);		\
DOXOR             698 missing/crypt.c 			DOXOR(p0, p1, 2);		\
DOXOR             699 missing/crypt.c 			DOXOR(p0, p1, 3);		\
DOXOR             700 missing/crypt.c 			DOXOR(p0, p1, 4);		\
DOXOR             701 missing/crypt.c 			DOXOR(p0, p1, 5);		\
DOXOR             702 missing/crypt.c 			DOXOR(p0, p1, 6);		\
DOXOR             703 missing/crypt.c 			DOXOR(p0, p1, 7);


DO_IT_VIA_RUBY

DO_IT_VIA_RUBY     95 ext/openssl/ossl_asn1.c #if DO_IT_VIA_RUBY
DO_IT_VIA_RUBY    106 ext/openssl/ossl_asn1.c #if DO_IT_VIA_RUBY
DO_IT_VIA_RUBY    121 ext/openssl/ossl_asn1.c #if DO_IT_VIA_RUBY


DSAPublicKey_dup

DSAPublicKey_dup   39 ext/openssl/openssl_missing.h #if !defined(DSAPublicKey_dup)
DSAPublicKey_dup  313 ext/openssl/ossl_pkey_dsa.c     dsa = DSAPublicKey_dup(pkey->pkey.dsa);


DSA_HAS_PRIVATE

DSA_HAS_PRIVATE    23 ext/openssl/ossl_pkey_dsa.c #define DSA_PRIVATE(obj,dsa) (DSA_HAS_PRIVATE(dsa)||OSSL_PKEY_IS_PRIVATE(obj))
DSA_HAS_PRIVATE   210 ext/openssl/ossl_pkey_dsa.c     if (DSA_HAS_PRIVATE(pkey->pkey.dsa)) {
DSA_HAS_PRIVATE   237 ext/openssl/ossl_pkey_dsa.c     if(DSA_HAS_PRIVATE(pkey->pkey.dsa))


DSA_PRIVATE

DSA_PRIVATE       187 ext/openssl/ossl_pkey_dsa.c     return (DSA_PRIVATE(self, pkey->pkey.dsa)) ? Qtrue : Qfalse;
DSA_PRIVATE       333 ext/openssl/ossl_pkey_dsa.c     if (!DSA_PRIVATE(self, pkey->pkey.dsa)) {


DUMP1

DUMP1             599 ext/tk/tcltklib.c         DUMP1("ip is deleted");
DUMP1             705 ext/tk/tcltklib.c         DUMP1("Tk_SafeInit");
DUMP1             726 ext/tk/tcltklib.c         DUMP1("Tk_Init");
DUMP1             749 ext/tk/tcltklib.c     DUMP1("Tk_Init");
DUMP1             770 ext/tk/tcltklib.c         DUMP1("find a pending exception");
DUMP1             777 ext/tk/tcltklib.c                 DUMP1("pending_exception_check0: call rb_jump_tag(retry)");
DUMP1             780 ext/tk/tcltklib.c                 DUMP1("pending_exception_check0: call rb_jump_tag(redo)");
DUMP1             783 ext/tk/tcltklib.c                 DUMP1("pending_exception_check0: call rb_jump_tag(throw)");
DUMP1             802 ext/tk/tcltklib.c         DUMP1("find a pending exception");
DUMP1             817 ext/tk/tcltklib.c                 DUMP1("pending_exception_check1: call rb_jump_tag(retry)");
DUMP1             820 ext/tk/tcltklib.c                 DUMP1("pending_exception_check1: call rb_jump_tag(redo)");
DUMP1             823 ext/tk/tcltklib.c                 DUMP1("pending_exception_check1: call rb_jump_tag(throw)");
DUMP1             922 ext/tk/tcltklib.c     DUMP1("call _timer_for_tcl");
DUMP1            1289 ext/tk/tcltklib.c     if (update_flag) DUMP1("update loop start!!");
DUMP1            1308 ext/tk/tcltklib.c             DUMP1("no other thread");
DUMP1            1374 ext/tk/tcltklib.c                 DUMP1("exception on wait");
DUMP1            1385 ext/tk/tcltklib.c                 DUMP1("next update loop");
DUMP1            1388 ext/tk/tcltklib.c                 DUMP1("update complete");
DUMP1            1393 ext/tk/tcltklib.c             DUMP1("trap check");
DUMP1            1404 ext/tk/tcltklib.c             DUMP1("check Root Widget");
DUMP1            1426 ext/tk/tcltklib.c             DUMP1("there are other threads");
DUMP1            1495 ext/tk/tcltklib.c                     DUMP1("trap check");
DUMP1            1508 ext/tk/tcltklib.c                         DUMP1("exception on wait");
DUMP1            1521 ext/tk/tcltklib.c                             DUMP1("update complete");
DUMP1            1573 ext/tk/tcltklib.c                 DUMP1("trap check");
DUMP1            1584 ext/tk/tcltklib.c                 DUMP1("check Root Widget");
DUMP1            1613 ext/tk/tcltklib.c         DUMP1("trap check & thread scheduling");
DUMP1            1757 ext/tk/tcltklib.c         DUMP1("succeed to stop parent");
DUMP1            2237 ext/tk/tcltklib.c                 DUMP1("rb_protect: retry");
DUMP1            2246 ext/tk/tcltklib.c                 DUMP1("rb_protect: redo");
DUMP1            2271 ext/tk/tcltklib.c                 DUMP1("rb_protect: throw");
DUMP1            2300 ext/tk/tcltklib.c         DUMP1("(failed)");
DUMP1            2305 ext/tk/tcltklib.c         DUMP1("set backtrace");
DUMP1            2359 ext/tk/tcltklib.c         DUMP1("Tcl_AppendResult");
DUMP1            2476 ext/tk/tcltklib.c     DUMP1("call ip_ruby_cmd_core");
DUMP1            2481 ext/tk/tcltklib.c     DUMP1("finish ip_ruby_cmd_core");
DUMP1            2634 ext/tk/tcltklib.c     DUMP1("start ip_InterpExitCommand");
DUMP1            2673 ext/tk/tcltklib.c     DUMP1("start ip_RubyExitCommand");
DUMP1            2781 ext/tk/tcltklib.c     DUMP1("Ruby's 'update' is called");
DUMP1            2874 ext/tk/tcltklib.c     DUMP1("finish Ruby's 'update'");
DUMP1            2894 ext/tk/tcltklib.c     DUMP1("threadUpdateProc is called");
DUMP1            2928 ext/tk/tcltklib.c     DUMP1("Ruby's 'thread_update' is called");
DUMP1            2943 ext/tk/tcltklib.c         DUMP1("call ip_rbUpdateObjCmd");
DUMP1            2946 ext/tk/tcltklib.c         DUMP1("call ip_rbUpdateCommand");
DUMP1            2951 ext/tk/tcltklib.c     DUMP1("start Ruby's 'thread_update' body");
DUMP1            2997 ext/tk/tcltklib.c     DUMP1("pass argument check");
DUMP1            3004 ext/tk/tcltklib.c     DUMP1("set idle proc");
DUMP1            3008 ext/tk/tcltklib.c         DUMP1("wait for complete idle proc");
DUMP1            3015 ext/tk/tcltklib.c     DUMP1("finish Ruby's 'thread_update'");
DUMP1            3089 ext/tk/tcltklib.c     DUMP1("Ruby's 'vwait' is called");
DUMP1            3101 ext/tk/tcltklib.c         DUMP1("call ip_rb_threadVwaitObjCmd");
DUMP1            3104 ext/tk/tcltklib.c         DUMP1("call ip_rb_threadVwaitCommand");
DUMP1            3330 ext/tk/tcltklib.c     DUMP1("Ruby's 'tkwait' is called");
DUMP1            3342 ext/tk/tcltklib.c         DUMP1("call ip_rb_threadTkWaitObjCmd");
DUMP1            3345 ext/tk/tcltklib.c         DUMP1("call ip_rb_threadTkWaitCommand");
DUMP1            3767 ext/tk/tcltklib.c     DUMP1("Ruby's 'thread_vwait' is called");
DUMP1            3776 ext/tk/tcltklib.c         DUMP1("call ip_rbVwaitObjCmd");
DUMP1            3779 ext/tk/tcltklib.c         DUMP1("call ip_rbVwaitCommand");
DUMP1            3902 ext/tk/tcltklib.c     DUMP1("Ruby's 'thread_tkwait' is called");
DUMP1            3911 ext/tk/tcltklib.c         DUMP1("call ip_rbTkWaitObjCmd");
DUMP1            3914 ext/tk/tcltklib.c         DUMP1("call rb_VwaitCommand");
DUMP1            4271 ext/tk/tcltklib.c     DUMP1("delete slaves");
DUMP1            4322 ext/tk/tcltklib.c     DUMP1("delete slaves");
DUMP1            4366 ext/tk/tcltklib.c     DUMP1("start ip_finalize");
DUMP1            4369 ext/tk/tcltklib.c         DUMP1("ip is NULL");
DUMP1            4392 ext/tk/tcltklib.c     DUMP1("check `destroy'");
DUMP1            4394 ext/tk/tcltklib.c         DUMP1("call `destroy'");
DUMP1            4399 ext/tk/tcltklib.c     DUMP1("destroy root widget");
DUMP1            4401 ext/tk/tcltklib.c         DUMP1("call Tk_DestroyWindow");
DUMP1            4409 ext/tk/tcltklib.c     DUMP1("check `finalize-hook-proc'");
DUMP1            4417 ext/tk/tcltklib.c     DUMP1("check `foreach' & `after'");
DUMP1            4420 ext/tk/tcltklib.c         DUMP1("cancel after callbacks");
DUMP1            4428 ext/tk/tcltklib.c     DUMP1("finish ip_finalize");
DUMP1            4460 ext/tk/tcltklib.c             DUMP1("ip_free is called for deleted IP");
DUMP1            4475 ext/tk/tcltklib.c     DUMP1("complete freeing Tcl Interp");
DUMP1            4495 ext/tk/tcltklib.c     DUMP1("Tcl_CreateObjCommand(\"vwait\")");
DUMP1            4499 ext/tk/tcltklib.c     DUMP1("Tcl_CreateCommand(\"vwait\")");
DUMP1            4506 ext/tk/tcltklib.c     DUMP1("Tcl_CreateObjCommand(\"tkwait\")");
DUMP1            4510 ext/tk/tcltklib.c     DUMP1("Tcl_CreateCommand(\"tkwait\")");
DUMP1            4517 ext/tk/tcltklib.c     DUMP1("Tcl_CreateObjCommand(\"thread_vwait\")");
DUMP1            4521 ext/tk/tcltklib.c     DUMP1("Tcl_CreateCommand(\"thread_vwait\")");
DUMP1            4528 ext/tk/tcltklib.c     DUMP1("Tcl_CreateObjCommand(\"thread_tkwait\")");
DUMP1            4532 ext/tk/tcltklib.c     DUMP1("Tcl_CreateCommand(\"thread_tkwait\")");
DUMP1            4539 ext/tk/tcltklib.c     DUMP1("Tcl_CreateObjCommand(\"update\")");
DUMP1            4543 ext/tk/tcltklib.c     DUMP1("Tcl_CreateCommand(\"update\")");
DUMP1            4550 ext/tk/tcltklib.c     DUMP1("Tcl_CreateObjCommand(\"thread_update\")");
DUMP1            4554 ext/tk/tcltklib.c     DUMP1("Tcl_CreateCommand(\"thread_update\")");
DUMP1            4649 ext/tk/tcltklib.c     DUMP1("start ip_CallWhenDeleted");
DUMP1            4655 ext/tk/tcltklib.c     DUMP1("finish ip_CallWhenDeleted");
DUMP1            4690 ext/tk/tcltklib.c     DUMP1("Tcl_CreateInterp");
DUMP1            4715 ext/tk/tcltklib.c     DUMP1("get current namespace");
DUMP1            4731 ext/tk/tcltklib.c     DUMP1("Tcl_Init");
DUMP1            4767 ext/tk/tcltklib.c         DUMP1("Tk_Init");
DUMP1            4784 ext/tk/tcltklib.c         DUMP1("Tcl_StaticPackage(\"Tk\")");
DUMP1            4799 ext/tk/tcltklib.c     DUMP1("Tcl_CreateObjCommand(\"ruby\")");
DUMP1            4802 ext/tk/tcltklib.c     DUMP1("Tcl_CreateObjCommand(\"ruby_eval\")");
DUMP1            4805 ext/tk/tcltklib.c     DUMP1("Tcl_CreateObjCommand(\"ruby_cmd\")");
DUMP1            4809 ext/tk/tcltklib.c     DUMP1("Tcl_CreateCommand(\"ruby\")");
DUMP1            4812 ext/tk/tcltklib.c     DUMP1("Tcl_CreateCommand(\"ruby_eval\")");
DUMP1            4815 ext/tk/tcltklib.c     DUMP1("Tcl_CreateCommand(\"ruby_cmd\")");
DUMP1            4822 ext/tk/tcltklib.c     DUMP1("Tcl_CreateObjCommand(\"interp_exit\")");
DUMP1            4825 ext/tk/tcltklib.c     DUMP1("Tcl_CreateObjCommand(\"ruby_exit\")");
DUMP1            4828 ext/tk/tcltklib.c     DUMP1("Tcl_CreateObjCommand(\"exit\") --> \"ruby_exit\"");
DUMP1            4832 ext/tk/tcltklib.c     DUMP1("Tcl_CreateCommand(\"interp_exit\")");
DUMP1            4835 ext/tk/tcltklib.c     DUMP1("Tcl_CreateCommand(\"ruby_exit\")");
DUMP1            4838 ext/tk/tcltklib.c     DUMP1("Tcl_CreateCommand(\"exit\") --> \"ruby_exit\"");
DUMP1            4932 ext/tk/tcltklib.c     DUMP1("Tcl_CreateObjCommand(\"exit\") --> \"interp_exit\"");
DUMP1            4936 ext/tk/tcltklib.c     DUMP1("Tcl_CreateCommand(\"exit\") --> \"interp_exit\"");
DUMP1            5110 ext/tk/tcltklib.c     DUMP1("Tcl_CreateObjCommand(\"exit\") --> \"interp_exit\"");
DUMP1            5114 ext/tk/tcltklib.c     DUMP1("Tcl_CreateCommand(\"exit\") --> \"interp_exit\"");
DUMP1            5199 ext/tk/tcltklib.c         DUMP1("Tcl_CreateObjCommand(\"exit\") --> \"ruby_exit\"");
DUMP1            5203 ext/tk/tcltklib.c         DUMP1("Tcl_CreateCommand(\"exit\") --> \"ruby_exit\"");
DUMP1            5212 ext/tk/tcltklib.c         DUMP1("Tcl_CreateObjCommand(\"exit\") --> \"interp_exit\"");
DUMP1            5216 ext/tk/tcltklib.c         DUMP1("Tcl_CreateCommand(\"exit\") --> \"interp_exit\"");
DUMP1            5233 ext/tk/tcltklib.c         DUMP1("delete deleted IP");
DUMP1            5240 ext/tk/tcltklib.c     DUMP1("call ip_finalize");
DUMP1            5243 ext/tk/tcltklib.c     DUMP1("delete interp");
DUMP1            5413 ext/tk/tcltklib.c         DUMP1("processed by another event-loop");
DUMP1            5416 ext/tk/tcltklib.c         DUMP1("process it on current event-loop");
DUMP1            5452 ext/tk/tcltklib.c     DUMP1("finish back to caller");
DUMP1            5528 ext/tk/tcltklib.c     DUMP1("add handler");
DUMP1            5549 ext/tk/tcltklib.c         DUMP1("raise exception");
DUMP1            5553 ext/tk/tcltklib.c     DUMP1("exit tk_funcall");
DUMP1            5734 ext/tk/tcltklib.c         DUMP1("processed by another event-loop");
DUMP1            5737 ext/tk/tcltklib.c         DUMP1("process it on current event-loop");
DUMP1            5769 ext/tk/tcltklib.c     DUMP1("finish back to caller");
DUMP1            5843 ext/tk/tcltklib.c     DUMP1("add handler");
DUMP1            6506 ext/tk/tcltklib.c         DUMP1("error Tcl_GetCommandInfo");
DUMP1            6507 ext/tk/tcltklib.c         DUMP1("try auto_load (call 'unknown' command)");
DUMP1            6515 ext/tk/tcltklib.c             DUMP1("fail to get 'unknown' command");
DUMP1            6540 ext/tk/tcltklib.c             DUMP1("find 'unknown' command -> set arguemnts");
DUMP1            6559 ext/tk/tcltklib.c     DUMP1("end Tcl_GetCommandInfo");
DUMP1            6813 ext/tk/tcltklib.c         DUMP1("processed by another event-loop");
DUMP1            6816 ext/tk/tcltklib.c         DUMP1("process it on current event-loop");
DUMP1            6845 ext/tk/tcltklib.c     DUMP1("finish back to caller");
DUMP1            6920 ext/tk/tcltklib.c     DUMP1("add handler");
DUMP1            6943 ext/tk/tcltklib.c         DUMP1("raise exception");
DUMP1            6947 ext/tk/tcltklib.c     DUMP1("exit ip_invoke");


DUMP2

DUMP2            1369 ext/tk/tcltklib.c                 DUMP2("DoOneEvent(1) abnormal exit!! %d",
DUMP2            1490 ext/tk/tcltklib.c                         DUMP2("DoOneEvent(2) abnormal exit!! %d",
DUMP2            1564 ext/tk/tcltklib.c                     DUMP2("sleep eventloop %lx", current);
DUMP2            1565 ext/tk/tcltklib.c                     DUMP2("eventloop thread is %lx", eventloop_thread);
DUMP2            1689 ext/tk/tcltklib.c     DUMP2("eventloop_ensure: current-thread : %lx", current_evloop);
DUMP2            1690 ext/tk/tcltklib.c     DUMP2("eventloop_ensure: eventloop-thread : %lx", eventloop_thread);
DUMP2            1692 ext/tk/tcltklib.c         DUMP2("finish eventloop %lx (NOT current eventloop)", current_evloop);
DUMP2            1700 ext/tk/tcltklib.c         DUMP2("eventloop-ensure: new eventloop-thread -> %lx",
DUMP2            1705 ext/tk/tcltklib.c             DUMP2("eventloop %lx : back from recursive call", current_evloop);
DUMP2            1717 ext/tk/tcltklib.c             DUMP2("eventloop-enshure: wake up parent %lx", eventloop_thread);
DUMP2            1728 ext/tk/tcltklib.c     DUMP2("finish current eventloop %lx", current_evloop);
DUMP2            1747 ext/tk/tcltklib.c         DUMP2("eventloop: recursive call on %lx", parent_evloop);
DUMP2            1752 ext/tk/tcltklib.c         DUMP2("wait for stop of parent_evloop %lx", parent_evloop);
DUMP2            1754 ext/tk/tcltklib.c             DUMP2("parent_evloop %lx doesn't stop", parent_evloop);
DUMP2            1863 ext/tk/tcltklib.c             DUMP2("eventloop thread %lx is sleeping or dead",
DUMP2            1867 ext/tk/tcltklib.c             DUMP2("create new eventloop thread %lx", evloop);
DUMP2            2160 ext/tk/tcltklib.c     DUMP2("error message:%s", Tcl_DStringValue(&dstr));
DUMP2            2365 ext/tk/tcltklib.c     DUMP2("(result) %s", NIL_P(ret) ? "nil" : RSTRING(ret)->ptr);
DUMP2            2456 ext/tk/tcltklib.c     DUMP2("rb_eval_string(%s)", arg);
DUMP2            2545 ext/tk/tcltklib.c     DUMP2("receiver:%s",str);
DUMP2            2592 ext/tk/tcltklib.c         DUMP2("arg:%s",str);
DUMP2            2595 ext/tk/tcltklib.c         DUMP2("arg:%s",argv[i]);
DUMP2            2870 ext/tk/tcltklib.c     DUMP2("last result '%s'", Tcl_GetStringResult(interp));
DUMP2            4289 ext/tk/tcltklib.c                 DUMP2("delete slave:'%s'", slave_name);
DUMP2            4333 ext/tk/tcltklib.c                 DUMP2("delete slave:'%s'", slave_name);
DUMP2            4375 ext/tk/tcltklib.c         DUMP2("ip(%lx) has null namespace", ip);
DUMP2            4411 ext/tk/tcltklib.c         DUMP2("call finalize hook proc '%s'", finalize_hook_name);
DUMP2            4441 ext/tk/tcltklib.c     DUMP2("free Tcl Interp %lx", (unsigned long)ptr->ip);
DUMP2            4450 ext/tk/tcltklib.c             DUMP2("parent IP(%lx) is not deleted",
DUMP2            4452 ext/tk/tcltklib.c             DUMP2("slave IP(%lx) should not be deleted",
DUMP2            4583 ext/tk/tcltklib.c     DUMP2("namespace wrapper enter depth == %d", rbtk_eventloop_depth);
DUMP2            4606 ext/tk/tcltklib.c     DUMP2("namespace wrapper exit depth == %d", rbtk_eventloop_depth);
DUMP2            4724 ext/tk/tcltklib.c     DUMP2("IP ref_count = %d", ptr->ref_count);
DUMP2            5392 ext/tk/tcltklib.c     DUMP2("(safe-level handler) $SAFE = %d", q->safe_level);
DUMP2            5408 ext/tk/tcltklib.c     DUMP2("do_call_queue_handler : evPtr = %p", evPtr);
DUMP2            5409 ext/tk/tcltklib.c     DUMP2("queue_handler thread : %lx", rb_thread_current());
DUMP2            5410 ext/tk/tcltklib.c     DUMP2("added by thread : %lx", q->thread);
DUMP2            5437 ext/tk/tcltklib.c         DUMP2("call function (for caller thread:%lx)", q->thread);
DUMP2            5438 ext/tk/tcltklib.c         DUMP2("call function (current thread:%lx)", rb_thread_current());
DUMP2            5449 ext/tk/tcltklib.c     DUMP2("back to caller (caller thread:%lx)", q->thread);
DUMP2            5450 ext/tk/tcltklib.c     DUMP2("               (current thread:%lx)", rb_thread_current());
DUMP2            5480 ext/tk/tcltklib.c             DUMP2("tk_funcall from thread:%lx but no eventloop", current);
DUMP2            5482 ext/tk/tcltklib.c             DUMP2("tk_funcall from current eventloop %lx", current);
DUMP2            5491 ext/tk/tcltklib.c     DUMP2("tk_funcall from thread %lx (NOT current eventloop)", current);
DUMP2            5534 ext/tk/tcltklib.c     DUMP2("wait for handler (current thread:%lx)", current);
DUMP2            5538 ext/tk/tcltklib.c     DUMP2("back from handler (current thread:%lx)", current);
DUMP2            5675 ext/tk/tcltklib.c     DUMP2("Tcl_Eval(%s)", cmd_str);
DUMP2            5701 ext/tk/tcltklib.c     DUMP2("(TCL_Eval result) %d", ptr->return_value);
DUMP2            5718 ext/tk/tcltklib.c     DUMP2("(safe-level handler) $SAFE = %d", q->safe_level);
DUMP2            5766 ext/tk/tcltklib.c     DUMP2("back to caller (caller thread:%lx)", q->thread);
DUMP2            5767 ext/tk/tcltklib.c     DUMP2("               (current thread:%lx)", rb_thread_current());
DUMP2            5797 ext/tk/tcltklib.c             DUMP2("eval from thread:%lx but no eventloop", current);
DUMP2            5799 ext/tk/tcltklib.c             DUMP2("eval from current eventloop %lx", current);
DUMP2            5808 ext/tk/tcltklib.c     DUMP2("eval from thread %lx (NOT current eventloop)", current);
DUMP2            5849 ext/tk/tcltklib.c     DUMP2("wait for handler (current thread:%lx)", current);
DUMP2            5853 ext/tk/tcltklib.c     DUMP2("back from handler (current thread:%lx)", current);
DUMP2            5899 ext/tk/tcltklib.c     DUMP2("(TCL_Eval result) %d", ptr->return_value);
DUMP2            5906 ext/tk/tcltklib.c     DUMP2("(TCL_Eval result) %d", ptr->return_value);
DUMP2            5913 ext/tk/tcltklib.c     DUMP2("(TCL_Eval result) %d", ptr->return_value);
DUMP2            6504 ext/tk/tcltklib.c     DUMP2("call Tcl_GetCommandInfo, %s", cmd);
DUMP2            6762 ext/tk/tcltklib.c     DUMP2("invoke_real called by thread:%lx", rb_thread_current());
DUMP2            6793 ext/tk/tcltklib.c     DUMP2("(safe-level handler) $SAFE = %d", q->safe_level);
DUMP2            6808 ext/tk/tcltklib.c     DUMP2("do_invoke_queue_handler : evPtr = %p", evPtr);
DUMP2            6809 ext/tk/tcltklib.c     DUMP2("invoke queue_thread : %lx", rb_thread_current());
DUMP2            6810 ext/tk/tcltklib.c     DUMP2("added by thread : %lx", q->thread);
DUMP2            6830 ext/tk/tcltklib.c         DUMP2("call invoke_real (for caller thread:%lx)", q->thread);
DUMP2            6831 ext/tk/tcltklib.c         DUMP2("call invoke_real (current thread:%lx)", rb_thread_current());
DUMP2            6842 ext/tk/tcltklib.c     DUMP2("back to caller (caller thread:%lx)", q->thread);
DUMP2            6843 ext/tk/tcltklib.c     DUMP2("               (current thread:%lx)", rb_thread_current());
DUMP2            6877 ext/tk/tcltklib.c             DUMP2("invoke from thread:%lx but no eventloop", current);
DUMP2            6879 ext/tk/tcltklib.c             DUMP2("invoke from current eventloop %lx", current);
DUMP2            6888 ext/tk/tcltklib.c     DUMP2("invoke from thread %lx (NOT current eventloop)", current);
DUMP2            6926 ext/tk/tcltklib.c     DUMP2("wait for handler (current thread:%lx)", current);
DUMP2            6930 ext/tk/tcltklib.c     DUMP2("back from handler (current thread:%lx)", current);


DVAR_DONT_RECYCLE

DVAR_DONT_RECYCLE  748 eval.c         	    FL_SET(_old, DVAR_DONT_RECYCLE); \
DVAR_DONT_RECYCLE 4851 eval.c         	!FL_TEST(ruby_dyna_vars, DVAR_DONT_RECYCLE)) {
DVAR_DONT_RECYCLE 6189 eval.c         		FL_SET(vars, DVAR_DONT_RECYCLE);
DVAR_DONT_RECYCLE 7897 eval.c         	    if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
DVAR_DONT_RECYCLE 7898 eval.c         	    FL_SET(vars, DVAR_DONT_RECYCLE);
DVAR_DONT_RECYCLE 8002 eval.c         	    if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
DVAR_DONT_RECYCLE 8003 eval.c         	    FL_SET(vars, DVAR_DONT_RECYCLE);
DVAR_DONT_RECYCLE 8111 eval.c         	    if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
DVAR_DONT_RECYCLE 8112 eval.c         	    FL_SET(vars, DVAR_DONT_RECYCLE);
DVAR_DONT_RECYCLE 11567 eval.c         	if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
DVAR_DONT_RECYCLE 11568 eval.c         	FL_SET(vars, DVAR_DONT_RECYCLE);
DVAR_DONT_RECYCLE 12581 eval.c         	if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
DVAR_DONT_RECYCLE 12582 eval.c         	FL_SET(vars, DVAR_DONT_RECYCLE);


DWORD

DWORD            9496 eval.c         static inline DWORD
DWORD            9499 eval.c             DWORD p;
DWORD            9524 eval.c         win32_set_exception_list(DWORD p)
DWORD            9694 eval.c             DWORD win32_exception_list;
DWORD             132 ext/win32ole/win32ole.c     DWORD m_cRef;
DWORD             135 ext/win32ole/win32ole.c     DWORD m_dwCookie;
DWORD             208 ext/win32ole/win32ole.c static HRESULT ole_docinfo_from_type _((ITypeInfo *, BSTR *, BSTR *, DWORD *, BSTR *));
DWORD             506 ext/win32ole/win32ole.c     DWORD dwCount;
DWORD            1309 ext/win32ole/win32ole.c     DWORD i;
DWORD            1312 ext/win32ole/win32ole.c     DWORD size_buf = sizeof(buf);
DWORD            1389 ext/win32ole/win32ole.c     DWORD i, j, k;
DWORD            1531 ext/win32ole/win32ole.c     DWORD len;
DWORD            1532 ext/win32ole/win32ole.c     DWORD dwtype;
DWORD            1573 ext/win32ole/win32ole.c     DWORD clsctx = CLSCTX_REMOTE_SERVER;
DWORD            3315 ext/win32ole/win32ole.c     DWORD *helpcontext;
DWORD            3612 ext/win32ole/win32ole.c     DWORD i, j;
DWORD            3664 ext/win32ole/win32ole.c     DWORD i;
DWORD            3787 ext/win32ole/win32ole.c     DWORD i, j;
DWORD            3848 ext/win32ole/win32ole.c     DWORD j;
DWORD            3916 ext/win32ole/win32ole.c     DWORD i, j;
DWORD            4621 ext/win32ole/win32ole.c     DWORD helpcontext;
DWORD            5575 ext/win32ole/win32ole.c     DWORD *helpcontext;
DWORD            5664 ext/win32ole/win32ole.c     DWORD helpcontext = 0;
DWORD            6688 ext/win32ole/win32ole.c     DWORD dwCookie;
DWORD             726 ruby.h         typedef DWORD rb_nativethread_t;
DWORD              84 win32/win32.c  static DWORD wait_events(HANDLE event, DWORD timeout);
DWORD              93 win32/win32.c      DWORD winerr;
DWORD             178 win32/win32.c  map_errno(DWORD winerr)
DWORD             201 win32/win32.c  static DWORD Win32System = (DWORD)-1;
DWORD             203 win32/win32.c  DWORD
DWORD             224 win32/win32.c      DWORD id;
DWORD             336 win32/win32.c  			      (DWORD)-1);
DWORD             343 win32/win32.c      DWORD len;
DWORD             797 win32/win32.c      DWORD exitcode;
DWORD             845 win32/win32.c      DWORD  dwCreationFlags;
DWORD            1748 win32/win32.c      DWORD source = 0;
DWORD            1957 win32/win32.c      DWORD n = 0;
DWORD            1975 win32/win32.c      DWORD n = 0;
DWORD            1989 win32/win32.c      DWORD n = 0;
DWORD            2801 win32/win32.c      DWORD exitcode;
DWORD            2802 win32/win32.c      DWORD err;
DWORD            2827 win32/win32.c      DWORD timeout;
DWORD            2837 win32/win32.c  	DWORD ret;
DWORD            2945 win32/win32.c      DWORD err;
DWORD            2966 win32/win32.c  		OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, (DWORD)pid);
DWORD            2984 win32/win32.c  	    if (!GenerateConsoleCtrlEvent(CTRL_C_EVENT, (DWORD)pid)) {
DWORD            2996 win32/win32.c  	    HANDLE hProc = OpenProcess(PROCESS_TERMINATE, FALSE, (DWORD)pid);
DWORD            3068 win32/win32.c      static DWORD curlen = 0;
DWORD            3069 win32/win32.c      DWORD needlen;
DWORD            3207 win32/win32.c  fileattr_to_unixmode(DWORD attr, const char *path)
DWORD            3272 win32/win32.c  	DWORD attr = GetFileAttributes(path);
DWORD            3362 win32/win32.c  static DWORD
DWORD            3363 win32/win32.c  wait_events(HANDLE event, DWORD timeout)
DWORD            3367 win32/win32.c      DWORD ret;
DWORD            3398 win32/win32.c  static volatile DWORD tlsi_interrupt = TLS_OUT_OF_INDEXES;
DWORD            3413 win32/win32.c  	DWORD ti = (DWORD)TlsGetValue(tlsi_interrupt);
DWORD            3431 win32/win32.c      TlsSetValue(tlsi_interrupt, (PVOID)((DWORD)TlsGetValue(tlsi_interrupt) - 1));
DWORD            3472 win32/win32.c      DWORD *esp = (DWORD *)ctx->Esp;
DWORD            3473 win32/win32.c      *--esp = (DWORD)harg;
DWORD            3475 win32/win32.c      ctx->Esp = (DWORD)esp;
DWORD            3476 win32/win32.c      ctx->Eip = (DWORD)rb_w32_call_handler;
DWORD            3555 win32/win32.c      DWORD ret;
DWORD            3644 win32/win32.c  static DWORD WINAPI
DWORD            3647 win32/win32.c      DWORD ret;
DWORD            3650 win32/win32.c      ret = (DWORD)arg->func(arg->self, arg->argc, arg->argv);
DWORD            3659 win32/win32.c      DWORD val;
DWORD            3922 win32/win32.c  	const DWORD attr = GetFileAttributes(path);
DWORD            3923 win32/win32.c  	if (attr != (DWORD)-1 && (attr & FILE_ATTRIBUTE_READONLY)) {
DWORD            3929 win32/win32.c  	    if (attr != (DWORD)-1 && (attr & FILE_ATTRIBUTE_READONLY)) {
DWORD            3942 win32/win32.c  	const DWORD attr = GetFileAttributes(path);
DWORD            3943 win32/win32.c  	if (attr != (DWORD)-1 && (attr & FILE_ATTRIBUTE_READONLY)) {
DWORD            3949 win32/win32.c  	    if (attr != (DWORD)-1 && (attr & FILE_ATTRIBUTE_READONLY)) {
DWORD              78 win32/win32.h  extern DWORD rb_w32_osid(void);
DWORD             503 win32/win32.h  typedef DWORD (*asynchronous_func_t)(DWORD self, int argc, DWORD* argv);
DWORD             504 win32/win32.h  DWORD rb_w32_asynchronize(asynchronous_func_t func, DWORD self, int argc, DWORD* argv, DWORD intrval);
DWORD              56 wince/io_wce.c 	DWORD access=0, share=0, create=0;
DWORD              88 wince/io_wce.c 	DWORD dw;
DWORD              95 wince/io_wce.c 	DWORD dw;
DWORD             102 wince/io_wce.c 	DWORD flag, ret;
DWORD              19 wince/sys/stat.c 	DWORD dwAttribute;
DWORD              21 wince/sys/stat.c 	DWORD dwSizeLow=0, dwSizeHigh=0, dwError=0;
DWORD              82 wince/sys/stat.c 	DWORD dwSize;
DWORD              35 wince/sys/utime.c 	atime.dwLowDateTime  = (DWORD)time64;
DWORD              36 wince/sys/utime.c 	atime.dwHighDateTime = (DWORD)(time64 >> 32);
DWORD              38 wince/sys/utime.c 	mtime.dwLowDateTime  = (DWORD)time64;
DWORD              39 wince/sys/utime.c 	mtime.dwHighDateTime = (DWORD)(time64 >> 32);
DWORD              39 wince/time_wce.c 	f.dwHighDateTime = (DWORD)((t >> 32) & 0x00000000FFFFFFFF);
DWORD              40 wince/time_wce.c 	f.dwLowDateTime  = (DWORD)( t        & 0x00000000FFFFFFFF);
DWORD              22 wince/wince.c  DWORD GetModuleFileNameA(
DWORD              24 wince/wince.c  	DWORD size )
DWORD              87 wince/wince.c  DWORD GetFileAttributesA(LPCSTR lpFileName)
DWORD              90 wince/wince.c  	DWORD dw;
DWORD              99 wince/wince.c  	LPCSTR lpFileName, DWORD attributes)
DWORD             124 wince/wince.c  BOOL MoveFileEx(LPCSTR oldname, LPCSTR newname, DWORD dwFlags)
DWORD             155 wince/wince.c  DWORD GetEnvironmentVariable(
DWORD             156 wince/wince.c  	LPCSTR name, LPSTR value, DWORD size)
DWORD             162 wince/wince.c  	DWORD	dwType=REG_SZ, cbData;
DWORD             206 wince/wince.c  	DWORD	ret, dwType=REG_SZ, cbData;
DWORD             241 wince/wince.c  BOOL GenerateConsoleCtrlEvent(DWORD dwCtrlEvent,
DWORD             242 wince/wince.c  		DWORD dwProcessGroupID)
DWORD             250 wince/wince.c  	DWORD access, BOOL inherit, DWORD options)
DWORD             256 wince/wince.c  	DWORD dwFileOffsetLow, DWORD dwFileOffsetHigh,
DWORD             257 wince/wince.c  	DWORD nNumberOfBytesToLockLow, DWORD nNumberOfBytesToLockHigh)
DWORD             263 wince/wince.c  	DWORD dwFlags, DWORD dwReserved,
DWORD             264 wince/wince.c  	DWORD nNumberOfBytesToLockLow, DWORD nNumberOfBytesToLockHigh,
DWORD             271 wince/wince.c  	DWORD dwFileOffsetLow, DWORD dwFileOffsetHigh,
DWORD             272 wince/wince.c  	DWORD nNumberOfBytesToUnlockLow, DWORD nNumberOfBytesToUnlockHigh)
DWORD             278 wince/wince.c  	DWORD dwReserved, DWORD nNumberOfBytesToUnlockLow,
DWORD             279 wince/wince.c  	DWORD nNumberOfBytesToUnlockHigh, LPOVERLAPPED lpOverlapped)
DWORD             299 wince/wince.c  DWORD WaitForMultipleObjectsEx(DWORD count,
DWORD             301 wince/wince.c  	DWORD timeout, BOOL alertable)
DWORD             310 wince/wince.c  	BOOL bOpt, DWORD dwFlag, LPVOID lpEnv, LPSTR dir,
DWORD             345 wince/wince.c  DWORD FormatMessageA(DWORD dwFlags, LPCVOID lpSource,
DWORD             346 wince/wince.c  	DWORD dwMessageId, DWORD dwLanguageId, LPSTR lpBuffer,
DWORD             347 wince/wince.c  	DWORD nSize, va_list* args)
DWORD             349 wince/wince.c  	DWORD dw;
DWORD             398 wince/wince.c  HANDLE CreateFileA(LPCSTR filename, DWORD access,
DWORD             399 wince/wince.c  	DWORD sharing, LPSECURITY_ATTRIBUTES sa,
DWORD             400 wince/wince.c  	DWORD creation, DWORD attributes, HANDLE template)
DWORD             436 wince/wince.c  DWORD GetLogicalDrives(VOID)
DWORD             463 wince/wince.c  			DWORD dwFlags)
DWORD             482 wince/wince.c  	LPSECURITY_ATTRIBUTES lpPipeAttributes, DWORD nSize)
DWORD             488 wince/wince.c  HANDLE GetStdHandle(DWORD nStdHandle)
DWORD             493 wince/wince.c  BOOL SetStdHandle(DWORD nStdHandle, HANDLE h)
DWORD             499 wince/wince.c  VOID ZeroMemory(PVOID p, DWORD length)
DWORD             573 wince/wince.c  	DWORD charlength;
DWORD              27 wince/wince.h  #define STD_INPUT_HANDLE    (DWORD)-10
DWORD              28 wince/wince.h  #define STD_OUTPUT_HANDLE   (DWORD)-11
DWORD              29 wince/wince.h  #define STD_ERROR_HANDLE    (DWORD)-12
DWORD             122 wince/wince.h  BOOL MoveFileEx(LPCSTR oldname, LPCSTR newname, DWORD dwFlags);
DWORD             126 wince/wince.h  	DWORD access, BOOL inherit, DWORD options);
DWORD             128 wince/wince.h  	DWORD dwFileOffsetLow, DWORD dwFileOffsetHigh,
DWORD             129 wince/wince.h  	DWORD nNumberOfBytesToLockLow, DWORD nNumberOfBytesToLockHigh);
DWORD             131 wince/wince.h  	DWORD dwFlags, DWORD dwReserved,
DWORD             132 wince/wince.h  	DWORD nNumberOfBytesToLockLow, DWORD nNumberOfBytesToLockHigh,
DWORD             135 wince/wince.h  	DWORD dwFileOffsetLow, DWORD dwFileOffsetHigh,
DWORD             136 wince/wince.h  	DWORD nNumberOfBytesToUnlockLow, DWORD nNumberOfBytesToUnlockHigh);
DWORD             138 wince/wince.h  	DWORD dwReserved, DWORD nNumberOfBytesToUnlockLow,
DWORD             139 wince/wince.h  	DWORD nNumberOfBytesToUnlockHigh, LPOVERLAPPED lpOverlapped);
DWORD             142 wince/wince.h  	LPSECURITY_ATTRIBUTES lpPipeAttributes, DWORD nSize);
DWORD             143 wince/wince.h  HANDLE GetStdHandle(DWORD nStdHandle);
DWORD             144 wince/wince.h  BOOL SetStdHandle(DWORD nStdHandle, HANDLE h);
DWORD             145 wince/wince.h  DWORD GetLogicalDrives(VOID);
DWORD             146 wince/wince.h  DWORD WaitForMultipleObjectsEx(DWORD count,
DWORD             148 wince/wince.h  	DWORD timeout, BOOL alertable);
DWORD             149 wince/wince.h  DWORD GetEnvironmentVariable(LPCSTR name, LPSTR value, DWORD size);
DWORD             152 wince/wince.h  BOOL GenerateConsoleCtrlEvent(DWORD dwCtrlEvent,
DWORD             153 wince/wince.h  		DWORD dwProcessGroupID);
DWORD             171 wince/wince.h    VOID ZeroMemory(PVOID p, DWORD length);


D_printf

D_printf          448 ext/racc/cparse/cparse.c         D_printf("(act) k1=%ld\n", v->curstate);
D_printf          454 ext/racc/cparse/cparse.c         D_printf("read_next=%d\n", read_next);
D_printf          473 ext/racc/cparse/cparse.c             D_printf("(act) t(k2)=%ld\n", NUM2LONG(v->t));
D_printf          482 ext/racc/cparse/cparse.c         D_printf("(act) i=%ld\n", i);
D_printf          488 ext/racc/cparse/cparse.c         D_printf("(act) table[i]=%ld\n", act);
D_printf          493 ext/racc/cparse/cparse.c         D_printf("(act) check[i]=%ld\n", NUM2LONG(tmp));
D_printf          497 ext/racc/cparse/cparse.c         D_printf("act=%ld\n", act);
D_printf          550 ext/racc/cparse/cparse.c     D_printf("error detected, status=%ld\n", v->errstatus);
D_printf          569 ext/racc/cparse/cparse.c     D_printf("(err) k1=%ld\n", v->curstate);
D_printf          570 ext/racc/cparse/cparse.c     D_printf("(err) k2=%d (error)\n", ERROR_TOKEN);
D_printf          577 ext/racc/cparse/cparse.c         D_printf("(err) i=%ld\n", i);
D_printf          586 ext/racc/cparse/cparse.c         D_printf("(err) table[i]=%ld\n", act);
D_printf          739 ext/racc/cparse/cparse.c     D_printf("(goto) k1=%ld\n", k1);
D_printf          740 ext/racc/cparse/cparse.c     D_printf("(goto) k2=%ld\n", k2);
D_printf          746 ext/racc/cparse/cparse.c     D_printf("(goto) i=%ld\n", i);
D_printf          754 ext/racc/cparse/cparse.c     D_printf("(goto) table[i]=%ld (goto_state)\n", NUM2LONG(goto_state));
D_printf          765 ext/racc/cparse/cparse.c     D_printf("(goto) check[i]=%ld\n", NUM2LONG(tmp));


D_puts

D_puts            240 ext/racc/cparse/cparse.c     D_puts("starting cparse");
D_puts            257 ext/racc/cparse/cparse.c     D_puts("start C yyparse");
D_puts            260 ext/racc/cparse/cparse.c     D_puts("params initialized");
D_puts            421 ext/racc/cparse/cparse.c         D_puts("u accept");   \
D_puts            444 ext/racc/cparse/cparse.c         D_puts("");
D_puts            445 ext/racc/cparse/cparse.c         D_puts("---- enter new loop ----");
D_puts            446 ext/racc/cparse/cparse.c         D_puts("");
D_puts            451 ext/racc/cparse/cparse.c         D_puts("(act) pointer[k1] ok");
D_puts            457 ext/racc/cparse/cparse.c                 D_puts("resuming...");
D_puts            462 ext/racc/cparse/cparse.c                 D_puts("resumed");
D_puts            466 ext/racc/cparse/cparse.c                 D_puts("next_token");
D_puts            495 ext/racc/cparse/cparse.c         D_puts("(act) found");
D_puts            501 ext/racc/cparse/cparse.c         D_puts("(act) not found: use default");
D_puts            509 ext/racc/cparse/cparse.c             D_puts("shift");
D_puts            518 ext/racc/cparse/cparse.c             D_puts("reduce");
D_puts            527 ext/racc/cparse/cparse.c             D_puts("accept");
D_puts            574 ext/racc/cparse/cparse.c         D_puts("(err) pointer[k1] ok");
D_puts            582 ext/racc/cparse/cparse.c             D_puts("(err) table[i] == nil");
D_puts            590 ext/racc/cparse/cparse.c             D_puts("(err) check[i] == nil");
D_puts            594 ext/racc/cparse/cparse.c             D_puts("(err) check[i] != k1");
D_puts            598 ext/racc/cparse/cparse.c         D_puts("(err) found: can handle error token");
D_puts            602 ext/racc/cparse/cparse.c         D_puts("(err) act not found: can't handle error token; pop");
D_puts            621 ext/racc/cparse/cparse.c         D_puts("e shift");
D_puts            625 ext/racc/cparse/cparse.c         D_puts("e reduce");
D_puts            629 ext/racc/cparse/cparse.c         D_puts("e accept");
D_puts            751 ext/racc/cparse/cparse.c         D_puts("(goto) table[i] == nil");
D_puts            758 ext/racc/cparse/cparse.c         D_puts("(goto) check[i] == nil");
D_puts            762 ext/racc/cparse/cparse.c         D_puts("(goto) check[i] != table[i]");
D_puts            767 ext/racc/cparse/cparse.c     D_puts("(goto) found");
D_puts            774 ext/racc/cparse/cparse.c     D_puts("(goto) not found: use default");


Data_Get_Struct

Data_Get_Struct   393 dir.c              Data_Get_Struct(dir, struct dir_data, dp);
Data_Get_Struct   445 dir.c              Data_Get_Struct(obj, struct dir_data, dirp);\
Data_Get_Struct    68 enumerator.c       Data_Get_Struct(obj, struct enumerator, ptr);
Data_Get_Struct   667 error.c            Data_Get_Struct(obj1, VALUE, ptr1);
Data_Get_Struct   668 error.c            Data_Get_Struct(obj2, VALUE, ptr2);
Data_Get_Struct   681 error.c            Data_Get_Struct(obj, VALUE, ptr);
Data_Get_Struct  4806 eval.c         		Data_Get_Struct(block->block_obj, struct BLOCK, data);
Data_Get_Struct  6109 eval.c         	Data_Get_Struct(scope, struct BLOCK, data);
Data_Get_Struct  7931 eval.c             Data_Get_Struct(self, struct BLOCK, orig);
Data_Get_Struct  7949 eval.c             Data_Get_Struct(self, struct BLOCK, orig);
Data_Get_Struct  8036 eval.c             Data_Get_Struct(bind, struct BLOCK, data);
Data_Get_Struct  8212 eval.c             Data_Get_Struct(proc, struct BLOCK, data);
Data_Get_Struct  8331 eval.c             Data_Get_Struct(proc, struct BLOCK, data);
Data_Get_Struct  8406 eval.c             Data_Get_Struct(self, struct BLOCK, data);
Data_Get_Struct  8407 eval.c             Data_Get_Struct(other, struct BLOCK, data2);
Data_Get_Struct  8430 eval.c             Data_Get_Struct(self, struct BLOCK, data);
Data_Get_Struct  8455 eval.c             Data_Get_Struct(self, struct BLOCK, data);
Data_Get_Struct  8506 eval.c             Data_Get_Struct(proc, struct BLOCK, orig);
Data_Get_Struct  8559 eval.c             Data_Get_Struct(proc, struct BLOCK, data);
Data_Get_Struct  8719 eval.c             Data_Get_Struct(method, struct METHOD, m1);
Data_Get_Struct  8720 eval.c             Data_Get_Struct(other, struct METHOD, m2);
Data_Get_Struct  8742 eval.c             Data_Get_Struct(method, struct METHOD, m);
Data_Get_Struct  8766 eval.c             Data_Get_Struct(obj, struct METHOD, orig);
Data_Get_Struct  8861 eval.c             Data_Get_Struct(self, struct METHOD, orig);
Data_Get_Struct  8889 eval.c             Data_Get_Struct(method, struct METHOD, data);
Data_Get_Struct  9002 eval.c             Data_Get_Struct(method, struct METHOD, data);
Data_Get_Struct  9106 eval.c             Data_Get_Struct(method, struct METHOD, data);
Data_Get_Struct  9141 eval.c             Data_Get_Struct(method, struct METHOD, data);
Data_Get_Struct  9215 eval.c             Data_Get_Struct(proc, struct BLOCK, data);
Data_Get_Struct  9234 eval.c             Data_Get_Struct(method, struct METHOD, mdata);
Data_Get_Struct  9239 eval.c             Data_Get_Struct(proc, struct BLOCK, bdata);
Data_Get_Struct  9336 eval.c         	Data_Get_Struct(body, struct BLOCK, block);
Data_Get_Struct  12685 eval.c             Data_Get_Struct(group, struct thgroup, data);
Data_Get_Struct  12722 eval.c             Data_Get_Struct(group, struct thgroup, data);
Data_Get_Struct  12742 eval.c             Data_Get_Struct(group, struct thgroup, data);
Data_Get_Struct  12790 eval.c             Data_Get_Struct(group, struct thgroup, data);
Data_Get_Struct  12801 eval.c             Data_Get_Struct(th->thgroup, struct thgroup, data);
Data_Get_Struct    99 ext/bigdecimal/bigdecimal.c             Data_Get_Struct(v, Real, pv);
Data_Get_Struct    88 ext/curses/curses.c     Data_Get_Struct(obj, struct windata, winp);\
Data_Get_Struct   114 ext/curses/curses.c     Data_Get_Struct(obj, struct windata, winp);
Data_Get_Struct   667 ext/curses/curses.c     Data_Get_Struct(obj, struct mousedata, data);\
Data_Get_Struct   783 ext/curses/curses.c     Data_Get_Struct(obj, struct windata, winp);
Data_Get_Struct    41 ext/dbm/dbm.c      Data_Get_Struct(obj, struct dbmdata, dbmp);\
Data_Get_Struct    80 ext/dbm/dbm.c      Data_Get_Struct(obj, struct dbmdata, dbmp);
Data_Get_Struct    55 ext/digest/digest.c     Data_Get_Struct(obj, algo_t, algo);
Data_Get_Struct    90 ext/digest/digest.c     Data_Get_Struct(obj, void, pctx);
Data_Get_Struct   109 ext/digest/digest.c     Data_Get_Struct(obj, void, pctx);
Data_Get_Struct   132 ext/digest/digest.c     Data_Get_Struct(obj, void, pctx1);
Data_Get_Struct   133 ext/digest/digest.c     Data_Get_Struct(copy, void, pctx2);
Data_Get_Struct   147 ext/digest/digest.c     Data_Get_Struct(self, void, pctx);
Data_Get_Struct   175 ext/digest/digest.c     Data_Get_Struct(self, void, pctx1);
Data_Get_Struct   198 ext/digest/digest.c     Data_Get_Struct(self, void, pctx1);
Data_Get_Struct   225 ext/digest/digest.c 	Data_Get_Struct(self, void, pctx1);
Data_Get_Struct   226 ext/digest/digest.c 	Data_Get_Struct(other, void, pctx2);
Data_Get_Struct    82 ext/dl/cfunc.c     Data_Get_Struct(val, struct cfunc_data, data);
Data_Get_Struct   123 ext/dl/cfunc.c     Data_Get_Struct(self, struct cfunc_data, data);
Data_Get_Struct   138 ext/dl/cfunc.c     Data_Get_Struct(self, struct cfunc_data, cfunc);
Data_Get_Struct   147 ext/dl/cfunc.c     Data_Get_Struct(self, struct cfunc_data, cfunc);
Data_Get_Struct   156 ext/dl/cfunc.c     Data_Get_Struct(self, struct cfunc_data, cfunc);
Data_Get_Struct   166 ext/dl/cfunc.c     Data_Get_Struct(self, struct cfunc_data, cfunc);
Data_Get_Struct   175 ext/dl/cfunc.c     Data_Get_Struct(self, struct cfunc_data, cfunc);
Data_Get_Struct   186 ext/dl/cfunc.c     Data_Get_Struct(self, struct cfunc_data, cfunc);
Data_Get_Struct   195 ext/dl/cfunc.c     Data_Get_Struct(self, struct cfunc_data, cfunc);
Data_Get_Struct   209 ext/dl/cfunc.c     Data_Get_Struct(self, struct cfunc_data, cfunc);
Data_Get_Struct   257 ext/dl/cfunc.c     Data_Get_Struct(self, struct cfunc_data, cfunc);
Data_Get_Struct   484 ext/dl/cfunc.c   Data_Get_Struct(self, struct cfunc_data, cfunc);
Data_Get_Struct    35 ext/dl/cptr.c    Data_Get_Struct(val, struct ptr_data, data);
Data_Get_Struct    80 ext/dl/cptr.c      Data_Get_Struct(val, struct ptr_data, data);
Data_Get_Struct   135 ext/dl/cptr.c      Data_Get_Struct(self, struct ptr_data, data);
Data_Get_Struct   178 ext/dl/cptr.c    Data_Get_Struct(self, struct ptr_data, data);
Data_Get_Struct   186 ext/dl/cptr.c      Data_Get_Struct(self, struct ptr_data, data);
Data_Get_Struct   195 ext/dl/cptr.c    Data_Get_Struct(self, struct ptr_data, data);
Data_Get_Struct   204 ext/dl/cptr.c    Data_Get_Struct(self, struct ptr_data, data);
Data_Get_Struct   213 ext/dl/cptr.c    Data_Get_Struct(self, struct ptr_data, data);
Data_Get_Struct   223 ext/dl/cptr.c    Data_Get_Struct(self, struct ptr_data, data);
Data_Get_Struct   239 ext/dl/cptr.c    Data_Get_Struct(self, struct ptr_data, pdata);
Data_Get_Struct   251 ext/dl/cptr.c    Data_Get_Struct(self, struct ptr_data, data);
Data_Get_Struct   274 ext/dl/cptr.c    Data_Get_Struct(self, struct ptr_data, data);
Data_Get_Struct   296 ext/dl/cptr.c    Data_Get_Struct(self, struct ptr_data, data);
Data_Get_Struct    23 ext/dl/handle.c   Data_Get_Struct(self, struct dl_handle, dlhandle);
Data_Get_Struct    81 ext/dl/handle.c   Data_Get_Struct(self, struct dl_handle, dlhandle);
Data_Get_Struct   101 ext/dl/handle.c   Data_Get_Struct(self, struct dl_handle, dlhandle);
Data_Get_Struct   111 ext/dl/handle.c   Data_Get_Struct(self, struct dl_handle, dlhandle);
Data_Get_Struct   121 ext/dl/handle.c   Data_Get_Struct(self, struct dl_handle, dlhandle);
Data_Get_Struct   155 ext/dl/handle.c     Data_Get_Struct(self, struct dl_handle, dlhandle);
Data_Get_Struct    42 ext/gdbm/gdbm.c     Data_Get_Struct(obj, struct dbmdata, dbmp);\
Data_Get_Struct    81 ext/gdbm/gdbm.c     Data_Get_Struct(obj, struct dbmdata, dbmp);
Data_Get_Struct    22 ext/openssl/ossl_bn.c   Data_Get_Struct(obj, BIGNUM, bn); \
Data_Get_Struct    16 ext/openssl/ossl_cipher.c     Data_Get_Struct(obj, EVP_CIPHER_CTX, ctx); \
Data_Get_Struct    20 ext/openssl/ossl_config.c     Data_Get_Struct(obj, CONF, conf); \
Data_Get_Struct    14 ext/openssl/ossl_digest.c     Data_Get_Struct(obj, EVP_MD_CTX, ctx); \
Data_Get_Struct    22 ext/openssl/ossl_engine.c     Data_Get_Struct(obj, ENGINE, engine); \
Data_Get_Struct    18 ext/openssl/ossl_hmac.c     Data_Get_Struct(obj, HMAC_CTX, ctx); \
Data_Get_Struct    20 ext/openssl/ossl_ns_spki.c     Data_Get_Struct(obj, NETSCAPE_SPKI, spki); \
Data_Get_Struct    21 ext/openssl/ossl_ocsp.c     Data_Get_Struct(obj, OCSP_REQUEST, req); \
Data_Get_Struct    34 ext/openssl/ossl_ocsp.c     Data_Get_Struct(obj, OCSP_RESPONSE, res); \
Data_Get_Struct    47 ext/openssl/ossl_ocsp.c     Data_Get_Struct(obj, OCSP_BASICRESP, res); \
Data_Get_Struct    60 ext/openssl/ossl_ocsp.c     Data_Get_Struct(obj, OCSP_CERTID, cid); \
Data_Get_Struct    14 ext/openssl/ossl_pkcs12.c     Data_Get_Struct(obj, PKCS12, p12); \
Data_Get_Struct    20 ext/openssl/ossl_pkcs7.c     Data_Get_Struct(obj, PKCS7, pkcs7); \
Data_Get_Struct    37 ext/openssl/ossl_pkcs7.c     Data_Get_Struct(obj, PKCS7_SIGNER_INFO, p7si); \
Data_Get_Struct    54 ext/openssl/ossl_pkcs7.c     Data_Get_Struct(obj, PKCS7_RECIP_INFO, p7ri); \
Data_Get_Struct    31 ext/openssl/ossl_pkey.h     Data_Get_Struct(obj, EVP_PKEY, pkey);\
Data_Get_Struct   170 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL_CTX, ctx);
Data_Get_Struct   184 ext/openssl/ossl_ssl.c     Data_Get_Struct(obj, SSL, ssl);
Data_Get_Struct   221 ext/openssl/ossl_ssl.c     Data_Get_Struct(args[0], SSL, ssl);
Data_Get_Struct   279 ext/openssl/ossl_ssl.c     Data_Get_Struct(arg, SSL_CTX, ctx);
Data_Get_Struct   300 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL_CTX, ctx);
Data_Get_Struct   431 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL_CTX, ctx);
Data_Get_Struct   474 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL_CTX, ctx);
Data_Get_Struct   538 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL, ssl);
Data_Get_Struct   541 ext/openssl/ossl_ssl.c         Data_Get_Struct(v_ctx, SSL_CTX, ctx);
Data_Get_Struct   579 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL, ssl);
Data_Get_Struct   632 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL, ssl);
Data_Get_Struct   680 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL, ssl);
Data_Get_Struct   717 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL, ssl);
Data_Get_Struct   731 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL, ssl);
Data_Get_Struct   756 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL, ssl);
Data_Get_Struct   783 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL, ssl);
Data_Get_Struct   806 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL, ssl);
Data_Get_Struct   822 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL, ssl);
Data_Get_Struct   840 ext/openssl/ossl_ssl.c     Data_Get_Struct(self, SSL, ssl);
Data_Get_Struct    20 ext/openssl/ossl_x509attr.c     Data_Get_Struct(obj, X509_ATTRIBUTE, attr); \
Data_Get_Struct    20 ext/openssl/ossl_x509cert.c     Data_Get_Struct(obj, X509, x509); \
Data_Get_Struct    20 ext/openssl/ossl_x509crl.c     Data_Get_Struct(obj, X509_CRL, crl); \
Data_Get_Struct    20 ext/openssl/ossl_x509ext.c     Data_Get_Struct(obj, X509_EXTENSION, ext); \
Data_Get_Struct    36 ext/openssl/ossl_x509ext.c     Data_Get_Struct(obj, X509V3_CTX, ctx); \
Data_Get_Struct    20 ext/openssl/ossl_x509name.c     Data_Get_Struct(obj, X509_NAME, name); \
Data_Get_Struct    20 ext/openssl/ossl_x509req.c     Data_Get_Struct(obj, X509_REQ, req); \
Data_Get_Struct    20 ext/openssl/ossl_x509revoked.c     Data_Get_Struct(obj, X509_REVOKED, rev); \
Data_Get_Struct    21 ext/openssl/ossl_x509store.c     Data_Get_Struct(obj, X509_STORE, st); \
Data_Get_Struct    38 ext/openssl/ossl_x509store.c     Data_Get_Struct(obj, X509_STORE_CTX, ctx); \
Data_Get_Struct   284 ext/racc/cparse/cparse.c     Data_Get_Struct(data, struct cparse_params, v);
Data_Get_Struct   296 ext/racc/cparse/cparse.c     Data_Get_Struct(data, struct cparse_params, v);
Data_Get_Struct   685 ext/racc/cparse/cparse.c     Data_Get_Struct(data, struct cparse_params, v);
Data_Get_Struct    33 ext/sdbm/init.c     Data_Get_Struct(obj, struct dbmdata, dbmp);\
Data_Get_Struct    71 ext/sdbm/init.c     Data_Get_Struct(obj, struct dbmdata, dbmp);
Data_Get_Struct    53 ext/strscan/strscan.c     Data_Get_Struct(obj, struct strscanner, var);\
Data_Get_Struct   200 ext/strscan/strscan.c     Data_Get_Struct(self, struct strscanner, p);
Data_Get_Struct   232 ext/strscan/strscan.c     Data_Get_Struct(vself, struct strscanner, self);
Data_Get_Struct   234 ext/strscan/strscan.c     Data_Get_Struct(vorig, struct strscanner, orig);
Data_Get_Struct   333 ext/strscan/strscan.c     Data_Get_Struct(self, struct strscanner, p);
Data_Get_Struct  1117 ext/strscan/strscan.c     Data_Get_Struct(self, struct strscanner, p);
Data_Get_Struct   682 ext/syck/rubyext.c     Data_Get_Struct(p, SyckParser, parser);
Data_Get_Struct   805 ext/syck/rubyext.c         Data_Get_Struct(self, SyckParser, parser);
Data_Get_Struct   820 ext/syck/rubyext.c     Data_Get_Struct(self, SyckParser, parser);
Data_Get_Struct   841 ext/syck/rubyext.c     Data_Get_Struct(self, SyckParser, parser);
Data_Get_Struct   871 ext/syck/rubyext.c     Data_Get_Struct(self, SyckParser, parser);
Data_Get_Struct   965 ext/syck/rubyext.c     Data_Get_Struct(node, SyckNode, n);
Data_Get_Struct  1240 ext/syck/rubyext.c     Data_Get_Struct( node, SyckNode, n );
Data_Get_Struct  1258 ext/syck/rubyext.c     Data_Get_Struct(node, SyckNode, n);
Data_Get_Struct  1453 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
Data_Get_Struct  1492 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
Data_Get_Struct  1526 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
Data_Get_Struct  1543 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
Data_Get_Struct  1568 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
Data_Get_Struct  1587 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
Data_Get_Struct  1625 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
Data_Get_Struct  1660 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
Data_Get_Struct  1694 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
Data_Get_Struct  1714 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
Data_Get_Struct  1747 ext/syck/rubyext.c     Data_Get_Struct( orig, SyckNode, orig_n );
Data_Get_Struct  1748 ext/syck/rubyext.c     Data_Get_Struct( copy, SyckNode, copy_n );
Data_Get_Struct  1761 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
Data_Get_Struct  1784 ext/syck/rubyext.c     Data_Get_Struct(self, SyckNode, orig_n);
Data_Get_Struct  1840 ext/syck/rubyext.c     Data_Get_Struct((VALUE)data, SyckNode, n);
Data_Get_Struct  1905 ext/syck/rubyext.c     Data_Get_Struct(emitter, SyckEmitter, emitterPtr);
Data_Get_Struct  1973 ext/syck/rubyext.c     Data_Get_Struct(self, SyckEmitter, emitter);
Data_Get_Struct  2023 ext/syck/rubyext.c     Data_Get_Struct(self, SyckEmitter, emitter);
Data_Get_Struct   578 ext/tk/tcltklib.c     Data_Get_Struct(self, struct tcltkip, ptr);
Data_Get_Struct  4682 ext/tk/tcltklib.c     Data_Get_Struct(self, struct tcltkip, ptr);
Data_Get_Struct  5391 ext/tk/tcltklib.c     Data_Get_Struct(callq, struct call_queue, q);
Data_Get_Struct  5717 ext/tk/tcltklib.c     Data_Get_Struct(evq, struct eval_queue, q);
Data_Get_Struct  6792 ext/tk/tcltklib.c     Data_Get_Struct(ivq, struct invoke_queue, q);
Data_Get_Struct  1148 ext/tk/tkutil/tkutil.c     Data_Get_Struct(rb_const_get(rb_obj_class(self), ID_SUBST_INFO),
Data_Get_Struct  1215 ext/tk/tkutil/tkutil.c     Data_Get_Struct(rb_const_get(self, ID_SUBST_INFO),
Data_Get_Struct  1235 ext/tk/tkutil/tkutil.c     Data_Get_Struct(rb_const_get(self, ID_SUBST_INFO),
Data_Get_Struct  1323 ext/tk/tkutil/tkutil.c     Data_Get_Struct(rb_const_get(self, ID_SUBST_INFO),
Data_Get_Struct  1443 ext/tk/tkutil/tkutil.c     Data_Get_Struct(rb_const_get(self, ID_SUBST_INFO),
Data_Get_Struct    74 ext/win32ole/win32ole.c     Data_Get_Struct(obj, struct oledata, pole);\
Data_Get_Struct   753 ext/win32ole/win32ole.c         Data_Get_Struct(val, struct oledata, pole);
Data_Get_Struct  1050 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oledata, pole);
Data_Get_Struct  2264 ext/win32ole/win32ole.c                 Data_Get_Struct(param, struct olevariantdata, pvar);
Data_Get_Struct  3710 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  4308 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  4345 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  4380 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  4417 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  4449 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  4481 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  4514 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  4544 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  4581 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  4612 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  4642 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  4660 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  4717 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  4791 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  4814 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oletypedata, ptype);
Data_Get_Struct  4892 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olevariabledata, pvar);
Data_Get_Struct  4929 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olevariabledata, pvar);
Data_Get_Struct  4976 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olevariabledata, pvar);
Data_Get_Struct  5025 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olevariabledata, pvar);
Data_Get_Struct  5084 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olevariabledata, pvar);
Data_Get_Struct  5127 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olevariabledata, pvar);
Data_Get_Struct  5146 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  5194 ext/win32ole/win32ole.c         Data_Get_Struct(oletype, struct oletypedata, ptype);
Data_Get_Struct  5258 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  5295 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  5332 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  5389 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  5409 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  5449 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  5535 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  5559 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  5620 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  5653 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  5686 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  5720 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  5754 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  5789 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  5823 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  5887 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olemethoddata, pmethod);
Data_Get_Struct  5948 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oleparamdata, pparam);
Data_Get_Struct  5986 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oleparamdata, pparam);
Data_Get_Struct  6024 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oleparamdata, pparam);
Data_Get_Struct  6052 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oleparamdata, pparam);
Data_Get_Struct  6071 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oleparamdata, pparam);
Data_Get_Struct  6091 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oleparamdata, pparam);
Data_Get_Struct  6155 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oleparamdata, pparam);
Data_Get_Struct  6742 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct oleeventdata, poleev);
Data_Get_Struct  6882 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olevariantdata, pvar);
Data_Get_Struct  6899 ext/win32ole/win32ole.c     Data_Get_Struct(self, struct olevariantdata, pvar);
Data_Get_Struct   851 ext/zlib/zlib.c     Data_Get_Struct(obj, struct zstream, z);
Data_Get_Struct   974 ext/zlib/zlib.c     Data_Get_Struct(obj, struct zstream, z);
Data_Get_Struct   990 ext/zlib/zlib.c     Data_Get_Struct(obj, struct zstream, z);
Data_Get_Struct  1005 ext/zlib/zlib.c     Data_Get_Struct(obj, struct zstream, z);
Data_Get_Struct  1034 ext/zlib/zlib.c     Data_Get_Struct(obj, struct zstream, z);
Data_Get_Struct  1098 ext/zlib/zlib.c     Data_Get_Struct(obj, struct zstream, z);
Data_Get_Struct  1150 ext/zlib/zlib.c     Data_Get_Struct(obj, struct zstream, z);
Data_Get_Struct  1439 ext/zlib/zlib.c     Data_Get_Struct(obj, struct zstream, z);
Data_Get_Struct  2358 ext/zlib/zlib.c     Data_Get_Struct(obj, struct gzfile, gz);
Data_Get_Struct  2385 ext/zlib/zlib.c     Data_Get_Struct(obj, struct gzfile, gz);
Data_Get_Struct  2649 ext/zlib/zlib.c     Data_Get_Struct(obj, struct gzfile, gz);
Data_Get_Struct  2789 ext/zlib/zlib.c     Data_Get_Struct(obj, struct gzfile, gz);
Data_Get_Struct  2986 ext/zlib/zlib.c     Data_Get_Struct(obj, struct gzfile, gz);
Data_Get_Struct  3022 ext/zlib/zlib.c     Data_Get_Struct(obj, struct gzfile, gz);
Data_Get_Struct   184 file.c             Data_Get_Struct(self, struct stat, st);
Data_Get_Struct  4557 parse.y            Data_Get_Struct(vparser, struct parser_params, parser);
Data_Get_Struct  4652 parse.y            Data_Get_Struct(vparser, struct parser_params, parser);
Data_Get_Struct  4693 parse.y            Data_Get_Struct(vparser, struct parser_params, parser);
Data_Get_Struct  8598 parse.y            Data_Get_Struct(vparser, struct parser_params, parser);
Data_Get_Struct  8766 parse.y            Data_Get_Struct(vparser, struct parser_params, parser);
Data_Get_Struct  9106 parse.y            Data_Get_Struct(self, struct parser_params, parser);
Data_Get_Struct  9168 parse.y            Data_Get_Struct(parser_v, struct parser_params, parser);
Data_Get_Struct  9179 parse.y            Data_Get_Struct(parser_v, struct parser_params, parser);
Data_Get_Struct  9195 parse.y            Data_Get_Struct(self, struct parser_params, parser);
Data_Get_Struct  9224 parse.y            Data_Get_Struct(self, struct parser_params, parser);
Data_Get_Struct  9245 parse.y            Data_Get_Struct(self, struct parser_params, parser);
Data_Get_Struct    33 time.c             Data_Get_Struct(obj, struct time_object, tobj)


Data_Make_Struct

Data_Make_Struct  373 dir.c              VALUE obj = Data_Make_Struct(klass, struct dir_data, 0, free_dir, dirp);
Data_Make_Struct  428 dir.c              VALUE dir = Data_Make_Struct(klass, struct dir_data, 0, free_dir, dp);
Data_Make_Struct  260 enumerator.c       return Data_Make_Struct(klass, struct enumerator,
Data_Make_Struct 7932 eval.c             bind = Data_Make_Struct(rb_obj_class(self),struct BLOCK,blk_mark,blk_free,data);
Data_Make_Struct 7950 eval.c             bind = Data_Make_Struct(rb_obj_class(self),struct BLOCK,blk_mark,blk_free,data);
Data_Make_Struct 7980 eval.c             bind = Data_Make_Struct(rb_cBinding,struct BLOCK,blk_mark,blk_free,data);
Data_Make_Struct 8094 eval.c             block = Data_Make_Struct(klass, struct BLOCK, blk_mark, blk_free, data);
Data_Make_Struct 8507 eval.c             bind = Data_Make_Struct(rb_cBinding,struct BLOCK,blk_mark,blk_free,data);
Data_Make_Struct 8662 eval.c             method = Data_Make_Struct(mklass, struct METHOD, bm_mark, -1, data);
Data_Make_Struct 8767 eval.c             method = Data_Make_Struct(rb_cUnboundMethod, struct METHOD, bm_mark, free, data);
Data_Make_Struct 8862 eval.c             clone = Data_Make_Struct(CLASS_OF(self),struct METHOD, bm_mark, free, data);
Data_Make_Struct 9021 eval.c             method = Data_Make_Struct(rb_cMethod,struct METHOD,bm_mark,free,bound);
Data_Make_Struct 12660 eval.c             group = Data_Make_Struct(klass, struct thgroup, 0, free, data);
Data_Make_Struct  684 ext/curses/curses.c   val = Data_Make_Struct(cMouseEvent,struct mousedata,
Data_Make_Struct  766 ext/curses/curses.c     return Data_Make_Struct(class, struct windata, 0, free_window, winp);
Data_Make_Struct   62 ext/dl/cfunc.c     val = Data_Make_Struct(rb_cDLCFunc, struct cfunc_data, 0, dlcfunc_free, data);
Data_Make_Struct  101 ext/dl/cfunc.c   obj = Data_Make_Struct(klass, struct cfunc_data, 0, dlcfunc_free, data);
Data_Make_Struct   46 ext/dl/cptr.c    val = Data_Make_Struct(klass, struct ptr_data,
Data_Make_Struct  100 ext/dl/cptr.c    obj = Data_Make_Struct(klass, struct ptr_data, dlptr_mark, dlptr_free, data);
Data_Make_Struct   34 ext/dl/handle.c   obj = Data_Make_Struct(rb_cDLHandle, struct dl_handle, 0,
Data_Make_Struct   14 ext/openssl/ossl_cipher.c     obj = Data_Make_Struct(klass, EVP_CIPHER_CTX, 0, ossl_cipher_free, ctx)
Data_Make_Struct   16 ext/openssl/ossl_hmac.c     obj = Data_Make_Struct(klass, HMAC_CTX, 0, ossl_hmac_free, ctx)
Data_Make_Struct 1067 ext/win32ole/win32ole.c     obj = Data_Make_Struct(klass,struct oledata,0,ole_free,pole);
Data_Make_Struct 3698 ext/win32ole/win32ole.c     obj = Data_Make_Struct(klass,struct oletypedata,0,oletype_free,poletype);
Data_Make_Struct 4751 ext/win32ole/win32ole.c         var = Data_Make_Struct(cWIN32OLE_VARIABLE, struct olevariabledata,
Data_Make_Struct 5162 ext/win32ole/win32ole.c     obj = Data_Make_Struct(klass,
Data_Make_Struct 5855 ext/win32ole/win32ole.c             param = Data_Make_Struct(cWIN32OLE_PARAM, struct oleparamdata, 0,
Data_Make_Struct 6657 ext/win32ole/win32ole.c     obj = Data_Make_Struct(klass,struct oleeventdata,0,ole_event_free,poleev);
Data_Make_Struct 6858 ext/win32ole/win32ole.c     obj = Data_Make_Struct(klass,struct olevariantdata,0,olevariant_free,pvar);
Data_Make_Struct  836 ext/zlib/zlib.c     obj = Data_Make_Struct(klass, struct zstream,
Data_Make_Struct 1769 ext/zlib/zlib.c     obj = Data_Make_Struct(klass, struct gzfile, gzfile_mark, gzfile_free, gz);
Data_Make_Struct   47 time.c             obj = Data_Make_Struct(klass, struct time_object, 0, time_free, tobj);


Data_Wrap_Struct

Data_Wrap_Struct  653 error.c            return Data_Wrap_Struct(rb_cNameErrorMesg, name_err_mesg_mark, -1, ptr);
Data_Wrap_Struct 11564 eval.c             th->thread = Data_Wrap_Struct(klass, thread_mark, thread_free, th);
Data_Wrap_Struct 12571 eval.c             cont = Data_Wrap_Struct(rb_cCont, thread_mark, thread_free, th);
Data_Wrap_Struct   56 ext/Win32API/Win32API.c     rb_iv_set(self, "__hdll__", Data_Wrap_Struct(rb_cData, 0, Win32API_FreeLibrary, (void*)hdll));
Data_Wrap_Struct  300 ext/bigdecimal/bigdecimal.c     pv->obj = (VALUE)Data_Wrap_Struct(klass, 0, BigDecimal_delete, pv);
Data_Wrap_Struct  308 ext/bigdecimal/bigdecimal.c     pv->obj = (VALUE)Data_Wrap_Struct(rb_cBigDecimal, 0, BigDecimal_delete, pv);
Data_Wrap_Struct   94 ext/dbm/dbm.c      return Data_Wrap_Struct(klass, 0, free_dbm, 0);
Data_Wrap_Struct  159 ext/dbm/dbm.c      VALUE obj = Data_Wrap_Struct(klass, 0, free_dbm, 0);
Data_Wrap_Struct   77 ext/digest/digest.c     obj = Data_Wrap_Struct(klass, 0, free, pctx);
Data_Wrap_Struct   34 ext/digest/md5/md5init.c 		Data_Wrap_Struct(rb_cObject, 0, 0, &md5), Qtrue);
Data_Wrap_Struct   37 ext/digest/rmd160/rmd160init.c 		Data_Wrap_Struct(rb_cObject, 0, 0, &rmd160), Qtrue);
Data_Wrap_Struct   34 ext/digest/sha1/sha1init.c 		Data_Wrap_Struct(rb_cObject, 0, 0, &sha1), Qtrue);
Data_Wrap_Struct   44 ext/digest/sha2/sha2init.c 		Data_Wrap_Struct(rb_cObject, 0, 0, &sha##bitlen), Qtrue);
Data_Wrap_Struct   96 ext/gdbm/gdbm.c     return Data_Wrap_Struct(klass, 0, free_dbm, 0);
Data_Wrap_Struct  169 ext/gdbm/gdbm.c     VALUE obj = Data_Wrap_Struct(klass, 0, free_dbm, 0);
Data_Wrap_Struct  463 ext/iconv/iconv.c     return Data_Wrap_Struct(klass, 0, ICONV_FREE, 0);
Data_Wrap_Struct  584 ext/iconv/iconv.c     self = Data_Wrap_Struct(self, NULL, ICONV_FREE, (void *)cd);
Data_Wrap_Struct   18 ext/openssl/ossl_bn.c   obj = Data_Wrap_Struct(klass, 0, BN_clear_free, bn); \
Data_Wrap_Struct   17 ext/openssl/ossl_config.c     obj = Data_Wrap_Struct(klass, 0, NCONF_free, conf); \
Data_Wrap_Struct   73 ext/openssl/ossl_digest.c     obj = Data_Wrap_Struct(klass, 0, EVP_MD_CTX_destroy, ctx);
Data_Wrap_Struct   19 ext/openssl/ossl_engine.c     obj = Data_Wrap_Struct(klass, 0, ENGINE_free, engine); \
Data_Wrap_Struct   17 ext/openssl/ossl_ns_spki.c     obj = Data_Wrap_Struct(klass, 0, NETSCAPE_SPKI_free, spki); \
Data_Wrap_Struct   18 ext/openssl/ossl_ocsp.c     obj = Data_Wrap_Struct(klass, 0, OCSP_REQUEST_free, req); \
Data_Wrap_Struct   31 ext/openssl/ossl_ocsp.c     obj = Data_Wrap_Struct(klass, 0, OCSP_RESPONSE_free, res); \
Data_Wrap_Struct   44 ext/openssl/ossl_ocsp.c     obj = Data_Wrap_Struct(klass, 0, OCSP_BASICRESP_free, res); \
Data_Wrap_Struct   57 ext/openssl/ossl_ocsp.c     obj = Data_Wrap_Struct(klass, 0, OCSP_CERTID_free, cid); \
Data_Wrap_Struct   10 ext/openssl/ossl_pkcs12.c     obj = Data_Wrap_Struct(klass, 0, PKCS12_free, p12); \
Data_Wrap_Struct   17 ext/openssl/ossl_pkcs7.c     obj = Data_Wrap_Struct(klass, 0, PKCS7_free, pkcs7); \
Data_Wrap_Struct   34 ext/openssl/ossl_pkcs7.c     obj = Data_Wrap_Struct(klass, 0, PKCS7_SIGNER_INFO_free, p7si); \
Data_Wrap_Struct   51 ext/openssl/ossl_pkcs7.c     obj = Data_Wrap_Struct(klass, 0, PKCS7_RECIP_INFO_free, p7ri); \
Data_Wrap_Struct   27 ext/openssl/ossl_pkey.h     obj = Data_Wrap_Struct(klass, 0, EVP_PKEY_free, pkey); \
Data_Wrap_Struct  137 ext/openssl/ossl_ssl.c     return Data_Wrap_Struct(klass, 0, ossl_sslctx_free, ctx);
Data_Wrap_Struct  508 ext/openssl/ossl_ssl.c     return Data_Wrap_Struct(klass, 0, ossl_ssl_free, NULL);
Data_Wrap_Struct   17 ext/openssl/ossl_x509attr.c     obj = Data_Wrap_Struct(klass, 0, X509_ATTRIBUTE_free, attr); \
Data_Wrap_Struct   17 ext/openssl/ossl_x509cert.c     obj = Data_Wrap_Struct(klass, 0, X509_free, x509); \
Data_Wrap_Struct   17 ext/openssl/ossl_x509crl.c     obj = Data_Wrap_Struct(klass, 0, X509_CRL_free, crl); \
Data_Wrap_Struct   17 ext/openssl/ossl_x509ext.c     obj = Data_Wrap_Struct(klass, 0, X509_EXTENSION_free, ext); \
Data_Wrap_Struct   33 ext/openssl/ossl_x509ext.c     obj = Data_Wrap_Struct(klass, 0, ossl_x509extfactory_free, ctx); \
Data_Wrap_Struct   17 ext/openssl/ossl_x509name.c     obj = Data_Wrap_Struct(klass, 0, X509_NAME_free, name); \
Data_Wrap_Struct   17 ext/openssl/ossl_x509req.c     obj = Data_Wrap_Struct(klass, 0, X509_REQ_free, req); \
Data_Wrap_Struct   17 ext/openssl/ossl_x509revoked.c     obj = Data_Wrap_Struct(klass, 0, X509_REVOKED_free, rev); \
Data_Wrap_Struct   18 ext/openssl/ossl_x509store.c     obj = Data_Wrap_Struct(klass, 0, X509_STORE_free, st); \
Data_Wrap_Struct   35 ext/openssl/ossl_x509store.c     obj = Data_Wrap_Struct(klass, 0, ossl_x509stctx_free, ctx); \
Data_Wrap_Struct  334 ext/racc/cparse/cparse.c     v->value_v = Data_Wrap_Struct(CparseParams, 0, 0, v);
Data_Wrap_Struct   85 ext/sdbm/init.c     return Data_Wrap_Struct(klass, 0, free_sdbm, 0);
Data_Wrap_Struct  137 ext/sdbm/init.c     VALUE obj = Data_Wrap_Struct(klass, 0, free_sdbm, 0);
Data_Wrap_Struct  185 ext/stringio/stringio.c     return Data_Wrap_Struct(klass, strio_mark, strio_free, 0);
Data_Wrap_Struct  182 ext/strscan/strscan.c     return Data_Wrap_Struct(klass, strscan_mark, strscan_free, p);
Data_Wrap_Struct  620 ext/syck/rubyext.c     obj = rb_funcall( resolver, s_node_import, 1, Data_Wrap_Struct( cNode, NULL, NULL, n ) );
Data_Wrap_Struct  764 ext/syck/rubyext.c     pobj = Data_Wrap_Struct( class, syck_mark_parser, rb_syck_free_parser, parser );
Data_Wrap_Struct 1426 ext/syck/rubyext.c     VALUE obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node );
Data_Wrap_Struct 1513 ext/syck/rubyext.c     obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node );
Data_Wrap_Struct 1612 ext/syck/rubyext.c     obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node );
Data_Wrap_Struct 1785 ext/syck/rubyext.c     t = Data_Wrap_Struct( cNode, syck_node_mark, syck_free_node, 0 );
Data_Wrap_Struct 1952 ext/syck/rubyext.c     pobj = Data_Wrap_Struct( class, syck_mark_emitter, rb_syck_free_emitter, emitter );
Data_Wrap_Struct 4485 ext/tk/tcltklib.c     return Data_Wrap_Struct(self, 0, ip_free, 0);
Data_Wrap_Struct 4952 ext/tk/tcltklib.c     return Data_Wrap_Struct(CLASS_OF(interp), 0, ip_free, slave);
Data_Wrap_Struct 5432 ext/tk/tcltklib.c         q_dat = Data_Wrap_Struct(rb_cData,call_queue_mark,0,q);
Data_Wrap_Struct 5751 ext/tk/tcltklib.c         q_dat = Data_Wrap_Struct(rb_cData,eval_queue_mark,0,q);
Data_Wrap_Struct 6825 ext/tk/tcltklib.c         q_dat = Data_Wrap_Struct(rb_cData,invoke_queue_mark,0,q);
Data_Wrap_Struct 1136 ext/tk/tkutil/tkutil.c                  Data_Wrap_Struct(cSUBST_INFO, subst_mark, subst_free, inf));
Data_Wrap_Struct 1409 ext/tk/tkutil/tkutil.c                  Data_Wrap_Struct(cSUBST_INFO, subst_mark,
Data_Wrap_Struct 6919 ext/win32ole/win32ole.c     com_hash = Data_Wrap_Struct(rb_cData, rb_mark_hash, st_free_table, st_init_numtable());
Data_Wrap_Struct  171 file.c             return Data_Wrap_Struct(klass, NULL, free, nst);
Data_Wrap_Struct 8751 parse.y            return Data_Wrap_Struct(0, parser_mark, parser_free, p);
Data_Wrap_Struct 9083 parse.y            self = Data_Wrap_Struct(klass, parser_mark, parser_free, p);
Data_Wrap_Struct  412 ruby.h             Data_Wrap_Struct(klass,mark,free,sval)\
Data_Wrap_Struct 1185 variable.c     	av = Data_Wrap_Struct(0, rb_mark_tbl, st_free_table, 0);


Debug

Debug            3695 win32/win32.c  		    Debug(fprintf(stderr, "couldn't get stack base:%p:%d\n",
Debug            3699 win32/win32.c  		    Debug(fprintf(stderr, "couldn't release stack:%p:%d\n",


DefEngineConst

DefEngineConst    369 ext/openssl/ossl_engine.c     DefEngineConst(METHOD_RSA);
DefEngineConst    370 ext/openssl/ossl_engine.c     DefEngineConst(METHOD_DSA);
DefEngineConst    371 ext/openssl/ossl_engine.c     DefEngineConst(METHOD_DH);
DefEngineConst    372 ext/openssl/ossl_engine.c     DefEngineConst(METHOD_RAND);
DefEngineConst    374 ext/openssl/ossl_engine.c     DefEngineConst(METHOD_BN_MOD_EXP);
DefEngineConst    377 ext/openssl/ossl_engine.c     DefEngineConst(METHOD_BN_MOD_EXP_CRT);
DefEngineConst    380 ext/openssl/ossl_engine.c     DefEngineConst(METHOD_CIPHERS);
DefEngineConst    383 ext/openssl/ossl_engine.c     DefEngineConst(METHOD_DIGESTS);
DefEngineConst    385 ext/openssl/ossl_engine.c     DefEngineConst(METHOD_ALL);
DefEngineConst    386 ext/openssl/ossl_engine.c     DefEngineConst(METHOD_NONE);


DefOCSPConst

DefOCSPConst      725 ext/openssl/ossl_ocsp.c     DefOCSPConst(RESPONSE_STATUS_SUCCESSFUL);
DefOCSPConst      726 ext/openssl/ossl_ocsp.c     DefOCSPConst(RESPONSE_STATUS_MALFORMEDREQUEST);
DefOCSPConst      727 ext/openssl/ossl_ocsp.c     DefOCSPConst(RESPONSE_STATUS_INTERNALERROR);
DefOCSPConst      728 ext/openssl/ossl_ocsp.c     DefOCSPConst(RESPONSE_STATUS_TRYLATER);
DefOCSPConst      729 ext/openssl/ossl_ocsp.c     DefOCSPConst(RESPONSE_STATUS_SIGREQUIRED);
DefOCSPConst      730 ext/openssl/ossl_ocsp.c     DefOCSPConst(RESPONSE_STATUS_UNAUTHORIZED);
DefOCSPConst      732 ext/openssl/ossl_ocsp.c     DefOCSPConst(REVOKED_STATUS_NOSTATUS);
DefOCSPConst      733 ext/openssl/ossl_ocsp.c     DefOCSPConst(REVOKED_STATUS_UNSPECIFIED);
DefOCSPConst      734 ext/openssl/ossl_ocsp.c     DefOCSPConst(REVOKED_STATUS_KEYCOMPROMISE);
DefOCSPConst      735 ext/openssl/ossl_ocsp.c     DefOCSPConst(REVOKED_STATUS_CACOMPROMISE);
DefOCSPConst      736 ext/openssl/ossl_ocsp.c     DefOCSPConst(REVOKED_STATUS_AFFILIATIONCHANGED);
DefOCSPConst      737 ext/openssl/ossl_ocsp.c     DefOCSPConst(REVOKED_STATUS_SUPERSEDED);
DefOCSPConst      738 ext/openssl/ossl_ocsp.c     DefOCSPConst(REVOKED_STATUS_CESSATIONOFOPERATION);
DefOCSPConst      739 ext/openssl/ossl_ocsp.c     DefOCSPConst(REVOKED_STATUS_CERTIFICATEHOLD);
DefOCSPConst      740 ext/openssl/ossl_ocsp.c     DefOCSPConst(REVOKED_STATUS_REMOVEFROMCRL);
DefOCSPConst      742 ext/openssl/ossl_ocsp.c     DefOCSPConst(NOCERTS);
DefOCSPConst      743 ext/openssl/ossl_ocsp.c     DefOCSPConst(NOINTERN);
DefOCSPConst      744 ext/openssl/ossl_ocsp.c     DefOCSPConst(NOSIGS);
DefOCSPConst      745 ext/openssl/ossl_ocsp.c     DefOCSPConst(NOCHAIN);
DefOCSPConst      746 ext/openssl/ossl_ocsp.c     DefOCSPConst(NOVERIFY);
DefOCSPConst      747 ext/openssl/ossl_ocsp.c     DefOCSPConst(NOEXPLICIT);
DefOCSPConst      748 ext/openssl/ossl_ocsp.c     DefOCSPConst(NOCASIGN);
DefOCSPConst      749 ext/openssl/ossl_ocsp.c     DefOCSPConst(NODELEGATED);
DefOCSPConst      750 ext/openssl/ossl_ocsp.c     DefOCSPConst(NOCHECKS);
DefOCSPConst      751 ext/openssl/ossl_ocsp.c     DefOCSPConst(TRUSTOTHER);
DefOCSPConst      752 ext/openssl/ossl_ocsp.c     DefOCSPConst(RESPID_KEY);
DefOCSPConst      753 ext/openssl/ossl_ocsp.c     DefOCSPConst(NOTIME);


DefOCSPVConst

DefOCSPVConst     757 ext/openssl/ossl_ocsp.c     DefOCSPVConst(CERTSTATUS_GOOD);
DefOCSPVConst     758 ext/openssl/ossl_ocsp.c     DefOCSPVConst(CERTSTATUS_REVOKED);
DefOCSPVConst     759 ext/openssl/ossl_ocsp.c     DefOCSPVConst(CERTSTATUS_UNKNOWN);
DefOCSPVConst     760 ext/openssl/ossl_ocsp.c     DefOCSPVConst(RESPID_NAME);
DefOCSPVConst     761 ext/openssl/ossl_ocsp.c     DefOCSPVConst(RESPID_KEY);


DefPKCS7Const

DefPKCS7Const     983 ext/openssl/ossl_pkcs7.c     DefPKCS7Const(TEXT);
DefPKCS7Const     984 ext/openssl/ossl_pkcs7.c     DefPKCS7Const(NOCERTS);
DefPKCS7Const     985 ext/openssl/ossl_pkcs7.c     DefPKCS7Const(NOSIGS);
DefPKCS7Const     986 ext/openssl/ossl_pkcs7.c     DefPKCS7Const(NOCHAIN);
DefPKCS7Const     987 ext/openssl/ossl_pkcs7.c     DefPKCS7Const(NOINTERN);
DefPKCS7Const     988 ext/openssl/ossl_pkcs7.c     DefPKCS7Const(NOVERIFY);
DefPKCS7Const     989 ext/openssl/ossl_pkcs7.c     DefPKCS7Const(DETACHED);
DefPKCS7Const     990 ext/openssl/ossl_pkcs7.c     DefPKCS7Const(BINARY);
DefPKCS7Const     991 ext/openssl/ossl_pkcs7.c     DefPKCS7Const(NOATTR);
DefPKCS7Const     992 ext/openssl/ossl_pkcs7.c     DefPKCS7Const(NOSMIMECAP);


DefRSAConst

DefRSAConst       493 ext/openssl/ossl_pkey_rsa.c     DefRSAConst(PKCS1_PADDING);
DefRSAConst       494 ext/openssl/ossl_pkey_rsa.c     DefRSAConst(SSLV23_PADDING);
DefRSAConst       495 ext/openssl/ossl_pkey_rsa.c     DefRSAConst(NO_PADDING);
DefRSAConst       496 ext/openssl/ossl_pkey_rsa.c     DefRSAConst(PKCS1_OAEP_PADDING);


DefX509Const

DefX509Const       33 ext/openssl/ossl_x509.c     DefX509Const(V_OK);
DefX509Const       34 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_UNABLE_TO_GET_ISSUER_CERT);
DefX509Const       35 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_UNABLE_TO_GET_CRL);
DefX509Const       36 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE);
DefX509Const       37 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE);
DefX509Const       38 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY);
DefX509Const       39 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_CERT_SIGNATURE_FAILURE);
DefX509Const       40 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_CRL_SIGNATURE_FAILURE);
DefX509Const       41 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_CERT_NOT_YET_VALID);
DefX509Const       42 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_CERT_HAS_EXPIRED);
DefX509Const       43 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_CRL_NOT_YET_VALID);
DefX509Const       44 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_CRL_HAS_EXPIRED);
DefX509Const       45 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD);
DefX509Const       46 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD);
DefX509Const       47 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD);
DefX509Const       48 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD);
DefX509Const       49 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_OUT_OF_MEM);
DefX509Const       50 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT);
DefX509Const       51 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_SELF_SIGNED_CERT_IN_CHAIN);
DefX509Const       52 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY);
DefX509Const       53 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE);
DefX509Const       54 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_CERT_CHAIN_TOO_LONG);
DefX509Const       55 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_CERT_REVOKED);
DefX509Const       56 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_INVALID_CA);
DefX509Const       57 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_PATH_LENGTH_EXCEEDED);
DefX509Const       58 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_INVALID_PURPOSE);
DefX509Const       59 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_CERT_UNTRUSTED);
DefX509Const       60 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_CERT_REJECTED);
DefX509Const       61 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_SUBJECT_ISSUER_MISMATCH);
DefX509Const       62 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_AKID_SKID_MISMATCH);
DefX509Const       63 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_AKID_ISSUER_SERIAL_MISMATCH);
DefX509Const       64 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_KEYUSAGE_NO_CERTSIGN);
DefX509Const       65 ext/openssl/ossl_x509.c     DefX509Const(V_ERR_APPLICATION_VERIFICATION);
DefX509Const       68 ext/openssl/ossl_x509.c     DefX509Const(V_FLAG_CRL_CHECK);
DefX509Const       71 ext/openssl/ossl_x509.c     DefX509Const(V_FLAG_CRL_CHECK_ALL);
DefX509Const       74 ext/openssl/ossl_x509.c     DefX509Const(PURPOSE_SSL_CLIENT);
DefX509Const       75 ext/openssl/ossl_x509.c     DefX509Const(PURPOSE_SSL_SERVER);
DefX509Const       76 ext/openssl/ossl_x509.c     DefX509Const(PURPOSE_NS_SSL_SERVER);
DefX509Const       77 ext/openssl/ossl_x509.c     DefX509Const(PURPOSE_SMIME_SIGN);
DefX509Const       78 ext/openssl/ossl_x509.c     DefX509Const(PURPOSE_SMIME_ENCRYPT);
DefX509Const       79 ext/openssl/ossl_x509.c     DefX509Const(PURPOSE_CRL_SIGN);
DefX509Const       80 ext/openssl/ossl_x509.c     DefX509Const(PURPOSE_ANY);
DefX509Const       82 ext/openssl/ossl_x509.c     DefX509Const(PURPOSE_OCSP_HELPER);
DefX509Const       85 ext/openssl/ossl_x509.c     DefX509Const(TRUST_COMPAT);
DefX509Const       86 ext/openssl/ossl_x509.c     DefX509Const(TRUST_SSL_CLIENT);
DefX509Const       87 ext/openssl/ossl_x509.c     DefX509Const(TRUST_SSL_SERVER);
DefX509Const       88 ext/openssl/ossl_x509.c     DefX509Const(TRUST_EMAIL);
DefX509Const       89 ext/openssl/ossl_x509.c     DefX509Const(TRUST_OBJECT_SIGN);
DefX509Const       91 ext/openssl/ossl_x509.c     DefX509Const(TRUST_OCSP_SIGN);
DefX509Const       94 ext/openssl/ossl_x509.c     DefX509Const(TRUST_OCSP_REQUEST);


DefX509Default

DefX509Default     97 ext/openssl/ossl_x509.c     DefX509Default(CERT_AREA, cert_area);
DefX509Default     98 ext/openssl/ossl_x509.c     DefX509Default(CERT_DIR, cert_dir);
DefX509Default     99 ext/openssl/ossl_x509.c     DefX509Default(CERT_FILE, cert_file);
DefX509Default    100 ext/openssl/ossl_x509.c     DefX509Default(CERT_DIR_ENV, cert_dir_env);
DefX509Default    101 ext/openssl/ossl_x509.c     DefX509Default(CERT_FILE_ENV, cert_file_env);
DefX509Default    102 ext/openssl/ossl_x509.c     DefX509Default(PRIVATE_DIR, private_dir);


DeleteFile

DeleteFile       3122 win32/win32.c  			if (!DeleteFile(newpath) && GetLastError() != ERROR_FILE_NOT_FOUND)
DeleteFile       3946 win32/win32.c  	if (DeleteFile(path) == FALSE) {


DoSomeOne

DoSomeOne         451 ext/bigdecimal/bigdecimal.c     if(!b) return DoSomeOne(self,r);
DoSomeOne         479 ext/bigdecimal/bigdecimal.c     if(!b) return DoSomeOne(self,r);
DoSomeOne         601 ext/bigdecimal/bigdecimal.c     if(!b) return DoSomeOne(self,r);
DoSomeOne         620 ext/bigdecimal/bigdecimal.c     if(!b) return DoSomeOne(self,r);
DoSomeOne         664 ext/bigdecimal/bigdecimal.c     if(!b) return DoSomeOne(self,r);
DoSomeOne         731 ext/bigdecimal/bigdecimal.c     if(!b) return DoSomeOne(self,r);


DummyInterp

DummyInterp       515 ext/tk/tcltklib.c     DummyInterp *iPtr = (DummyInterp*)interp;
DummyInterp       535 ext/tk/tcltklib.c     DummyInterp *iPtr = (DummyInterp*)interp;


DupPKeyPtr

DupPKeyPtr         46 ext/openssl/ossl_pkey.h EVP_PKEY *DupPKeyPtr(VALUE);
DupPKeyPtr        208 ext/openssl/ossl_ssl.c     *pkey = DupPKeyPtr(ossl_ssl_get_key(obj));


DupX509AttrPtr

DupX509AttrPtr     28 ext/openssl/ossl_x509.h X509_ATTRIBUTE *DupX509AttrPtr(VALUE);
DupX509AttrPtr    414 ext/openssl/ossl_x509req.c 	attr = DupX509AttrPtr(item);
DupX509AttrPtr    428 ext/openssl/ossl_x509req.c     if (!X509_REQ_add1_attr(req, DupX509AttrPtr(attr))) {


DupX509CertPtr

DupX509CertPtr     68 ext/openssl/ossl.c         x509 = DupX509CertPtr(val); /* NEED TO DUP */
DupX509CertPtr    207 ext/openssl/ossl_ssl.c     *x509 = DupX509CertPtr(ossl_ssl_get_x509(obj));
DupX509CertPtr    280 ext/openssl/ossl_ssl.c     x509 = DupX509CertPtr(i);
DupX509CertPtr     40 ext/openssl/ossl_x509.h X509 *DupX509CertPtr(VALUE);
DupX509CertPtr    377 ext/openssl/ossl_x509store.c     if(!NIL_P(cert)) x509 = DupX509CertPtr(cert); /* NEED TO DUP */


DupX509ExtPtr

DupX509ExtPtr     494 ext/openssl/ossl_ocsp.c 	    x509ext = DupX509ExtPtr(RARRAY(ext)->ptr[i]);
DupX509ExtPtr      63 ext/openssl/ossl_x509.h X509_EXTENSION *DupX509ExtPtr(VALUE);
DupX509ExtPtr     567 ext/openssl/ossl_x509cert.c 	ext = DupX509ExtPtr(RARRAY(ary)->ptr[i]);
DupX509ExtPtr     586 ext/openssl/ossl_x509cert.c     ext = DupX509ExtPtr(extension);
DupX509ExtPtr     471 ext/openssl/ossl_x509crl.c 	ext = DupX509ExtPtr(RARRAY(ary)->ptr[i]);
DupX509ExtPtr     489 ext/openssl/ossl_x509crl.c     ext = DupX509ExtPtr(extension);
DupX509ExtPtr     186 ext/openssl/ossl_x509revoked.c 	ext = DupX509ExtPtr(item);
DupX509ExtPtr     201 ext/openssl/ossl_x509revoked.c     if(!X509_REVOKED_add_ext(rev, DupX509ExtPtr(ext), -1)) {


DupX509RevokedPtr

DupX509RevokedPtr   94 ext/openssl/ossl_x509.h X509_REVOKED *DupX509RevokedPtr(VALUE);
DupX509RevokedPtr  297 ext/openssl/ossl_x509crl.c 	rev = DupX509RevokedPtr(RARRAY(ary)->ptr[i]);
DupX509RevokedPtr  314 ext/openssl/ossl_x509crl.c     rev = DupX509RevokedPtr(revoked);


DuplicateHandle

DuplicateHandle   238 win32/win32.c      if (!DuplicateHandle(current_process_handle, GetCurrentThread(),
DuplicateHandle   723 win32/win32.c  	    if (!DuplicateHandle(hCurProc, (HANDLE)pair[1], hCurProc,
DuplicateHandle   740 win32/win32.c  	    if (!DuplicateHandle(hCurProc, hIn, hCurProc, &hDupFile, 0,
DuplicateHandle   756 win32/win32.c  	    if (!DuplicateHandle(hCurProc, hOut, hCurProc, &hDupFile, 0,
DuplicateHandle   123 wince/wince.h  BOOL DuplicateHandle(


E

E                10268 eval.c                 E(a) = E(b) = E(c) = E(d) = E(e) =
E                10269 eval.c                 E(f) = E(g) = E(h) = E(i) = E(j) =
E                10270 eval.c                 E(k) = E(l) = E(m) = E(n) = E(o) =
E                10271 eval.c                 E(p) = E(q) = E(r) = E(s) = E(t) = 0;
E                10272 eval.c                 E(a) = E(b) = E(c) = E(d) = E(e) =
E                10273 eval.c                 E(f) = E(g) = E(h) = E(i) = E(j) =
E                10274 eval.c                 E(k) = E(l) = E(m) = E(n) = E(o) =
E                10275 eval.c                 E(p) = E(q) = E(r) = E(s) = E(t) = 0;
E                  41 ext/digest/rmd160/rmd160ossl.c 	  && pctx1->E == pctx2->E


E2BIG

E2BIG            1119 error.c        #ifdef E2BIG
E2BIG            1120 error.c            set_syserr(E2BIG, "E2BIG");
E2BIG             246 ext/iconv/iconv.c 	  case E2BIG:
E2BIG             105 win32/win32.c      {	ERROR_BAD_ENVIRONMENT,		E2BIG		},


EACCES

EACCES           1137 error.c        #ifdef EACCES
EACCES           1138 error.c            set_syserr(EACCES, "EACCES");
EACCES             91 ext/sdbm/_sdbm.c #define EPERM	EACCES
EACCES            239 ext/stringio/stringio.c 	    errno = EACCES;
EACCES           2184 file.c         	    || errno == EACCES
EACCES           3055 file.c         	  case EACCES:
EACCES           3118 file.c         	  case EACCES:
EACCES            100 win32/win32.c      {	ERROR_ACCESS_DENIED,		EACCES		},
EACCES            110 win32/win32.c      {	ERROR_CURRENT_DIRECTORY,	EACCES		},
EACCES            116 win32/win32.c      {	ERROR_BAD_COMMAND,		EACCES		},
EACCES            117 win32/win32.c      {	ERROR_CRC,			EACCES		},
EACCES            118 win32/win32.c      {	ERROR_BAD_LENGTH,		EACCES		},
EACCES            120 win32/win32.c      {	ERROR_NOT_DOS_DISK,		EACCES		},
EACCES            121 win32/win32.c      {	ERROR_SECTOR_NOT_FOUND,		EACCES		},
EACCES            122 win32/win32.c      {	ERROR_OUT_OF_PAPER,		EACCES		},
EACCES            125 win32/win32.c      {	ERROR_GEN_FAILURE,		EACCES		},
EACCES            126 win32/win32.c      {	ERROR_LOCK_VIOLATION,		EACCES		},
EACCES            127 win32/win32.c      {	ERROR_SHARING_VIOLATION,	EACCES		},
EACCES            128 win32/win32.c      {	ERROR_WRONG_DISK,		EACCES		},
EACCES            129 win32/win32.c      {	ERROR_SHARING_BUFFER_EXCEEDED,	EACCES		},
EACCES            131 win32/win32.c      {	ERROR_NETWORK_ACCESS_DENIED,	EACCES		},
EACCES            134 win32/win32.c      {	ERROR_CANNOT_MAKE,		EACCES		},
EACCES            135 win32/win32.c      {	ERROR_FAIL_I24,			EACCES		},
EACCES            138 win32/win32.c      {	ERROR_DRIVE_LOCKED,		EACCES		},
EACCES            147 win32/win32.c      {	ERROR_SEEK_ON_DEVICE,		EACCES		},
EACCES            150 win32/win32.c      {	ERROR_NOT_LOCKED,		EACCES		},
EACCES            153 win32/win32.c      {	ERROR_LOCK_FAILED,		EACCES		},
EACCES            248 win32/win32.c  #define LK_ERR(f,i) ((f) ? (i = 0) : (errno = GetLastError() == ERROR_LOCK_VIOLATION ? EWOULDBLOCK : EACCES))
EACCES            172 wince/io_wce.c 	errno = EACCES;


EADDRINUSE

EADDRINUSE       1392 error.c        #ifdef EADDRINUSE
EADDRINUSE       1393 error.c            set_syserr(EADDRINUSE, "EADDRINUSE");


EADDRNOTAVAIL

EADDRNOTAVAIL    1395 error.c        #ifdef EADDRNOTAVAIL
EADDRNOTAVAIL    1396 error.c            set_syserr(EADDRNOTAVAIL, "EADDRNOTAVAIL");


EAFNOSUPPORT

EAFNOSUPPORT     1389 error.c        #ifdef EAFNOSUPPORT
EAFNOSUPPORT     1390 error.c            set_syserr(EAFNOSUPPORT, "EAFNOSUPPORT");
EAFNOSUPPORT     2666 win32/win32.c  	errno = EAFNOSUPPORT;


EAGAIN

EAGAIN           1131 error.c        #ifdef EAGAIN
EAGAIN           1132 error.c            set_syserr(EAGAIN, "EAGAIN");
EAGAIN             66 ext/socket/socket.c #define EWOULDBLOCK EAGAIN
EAGAIN           1059 ext/socket/socket.c 	      case EAGAIN:
EAGAIN           3054 file.c         	  case EAGAIN:
EAGAIN           3056 file.c         #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
EAGAIN           3117 file.c         	  case EAGAIN:
EAGAIN           3119 file.c         #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
EAGAIN            447 io.c                   errno = EAGAIN;
EAGAIN            480 io.c                 case EAGAIN:
EAGAIN            481 io.c           #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
EAGAIN            523 io.c                 case EAGAIN:
EAGAIN            524 io.c           #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
EAGAIN            593 io.c                       errno = EAGAIN;
EAGAIN           2930 io.c           	  case EAGAIN:
EAGAIN           2931 io.c           #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
EAGAIN           1325 process.c      	  case EAGAIN:
EAGAIN           1326 process.c      #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
EAGAIN            137 win32/win32.c      {	ERROR_NO_PROC_SLOTS,		EAGAIN		},
EAGAIN            152 win32/win32.c      {	ERROR_MAX_THRDS_REACHED,	EAGAIN		},
EAGAIN            171 win32/win32.c      {	ERROR_NESTING_NOT_ALLOWED,	EAGAIN		},
EAGAIN            860 win32/win32.c  	errno = EAGAIN;


EAI_BADHINTS

EAI_BADHINTS      319 ext/socket/getaddrinfo.c 			ERR(EAI_BADHINTS); /* xxx */
EAI_BADHINTS      358 ext/socket/getaddrinfo.c 				ERR(EAI_BADHINTS);	/*xxx*/
EAI_BADHINTS      364 ext/socket/getaddrinfo.c 				ERR(EAI_BADHINTS);	/*xxx*/


EAI_FAIL

EAI_FAIL          530 ext/socket/getaddrinfo.c 			error = EAI_FAIL;
EAI_FAIL          626 ext/socket/getaddrinfo.c 			error = EAI_FAIL;
EAI_FAIL          634 ext/socket/getaddrinfo.c 		ERR(EAI_FAIL);


EAI_FAMILY

EAI_FAMILY        330 ext/socket/getaddrinfo.c 			ERR(EAI_FAMILY);
EAI_FAMILY        464 ext/socket/getaddrinfo.c 			ERR(EAI_FAMILY);
EAI_FAMILY        515 ext/socket/getaddrinfo.c 				ERR(EAI_FAMILY);	/*xxx*/


EAI_MAX

EAI_MAX           204 ext/socket/getaddrinfo.c 	if (ecode < 0 || ecode > EAI_MAX)
EAI_MAX           205 ext/socket/getaddrinfo.c 		ecode = EAI_MAX;


EAI_MEMORY

EAI_MEMORY        172 ext/socket/getaddrinfo.c 		error = EAI_MEMORY;\
EAI_MEMORY        182 ext/socket/getaddrinfo.c 		error = EAI_MEMORY;\


EAI_NONAME

EAI_NONAME        314 ext/socket/getaddrinfo.c 		return EAI_NONAME;
EAI_NONAME        520 ext/socket/getaddrinfo.c 		ERR(EAI_NONAME);


EAI_SYSTEM

EAI_SYSTEM        662 ext/socket/socket.c #ifdef EAI_SYSTEM
EAI_SYSTEM        663 ext/socket/socket.c     if (error == EAI_SYSTEM) rb_sys_fail(reason);


EALREADY

EALREADY         1440 error.c        #ifdef EALREADY
EALREADY         1441 error.c            set_syserr(EALREADY, "EALREADY");
EALREADY         1073 ext/socket/socket.c #ifdef EALREADY
EALREADY         1074 ext/socket/socket.c 	      case EALREADY:


EASYWIN

EASYWIN           261 ext/nkf/nkf-utf8/nkf.c #ifdef EASYWIN /*Easy Win */
EASYWIN           679 ext/nkf/nkf-utf8/nkf.c #ifdef EASYWIN /*Easy Win */
EASYWIN           702 ext/nkf/nkf-utf8/nkf.c #ifdef EASYWIN /*Easy Win */
EASYWIN           913 ext/nkf/nkf-utf8/nkf.c #ifdef EASYWIN /*Easy Win */


EBADF

EBADF            1125 error.c        #ifdef EBADF
EBADF            1126 error.c            set_syserr(EBADF, "EBADF");
EBADF              69 ext/readline/readline.c     if (!isatty(0) && errno == EBADF) rb_raise(rb_eIOError, "stdin closed");
EBADF             101 win32/win32.c      {	ERROR_INVALID_HANDLE,		EBADF		},
EBADF             141 win32/win32.c      {	ERROR_INVALID_TARGET_HANDLE,	EBADF		},
EBADF             145 win32/win32.c      {	ERROR_DIRECT_ACCESS_HANDLE,	EBADF		},
EBADF            2767 win32/win32.c  	errno = EBADF;
EBADF            3962 win32/win32.c  	errno = EBADF;
EBADF            4006 win32/win32.c  	    errno = EBADF;
EBADF             190 wince/io_wce.c 	errno = EBADF;


EBUSY

EBUSY            1146 error.c        #ifdef EBUSY
EBUSY            1147 error.c            set_syserr(EBUSY, "EBUSY");


ECHILD

ECHILD           1128 error.c        #ifdef ECHILD
ECHILD           1129 error.c            set_syserr(ECHILD, "ECHILD");
ECHILD            796 process.c      	    if (errno == ECHILD)
ECHILD            812 process.c      	    if (errno == ECHILD)
ECHILD            143 win32/win32.c      {	ERROR_WAIT_NO_CHILDREN,		ECHILD		},
ECHILD            144 win32/win32.c      {	ERROR_CHILD_NOT_COMPLETE,	ECHILD		},
ECHILD           2808 win32/win32.c  	    errno = ECHILD;
ECHILD           2846 win32/win32.c  	    errno = ECHILD;
ECHILD           2868 win32/win32.c  	    errno = ECHILD;


ECONNABORTED

ECONNABORTED     1407 error.c        #ifdef ECONNABORTED
ECONNABORTED     1408 error.c            set_syserr(ECONNABORTED, "ECONNABORTED");


ECONNREFUSED

ECONNREFUSED     1431 error.c        #ifdef ECONNREFUSED
ECONNREFUSED     1432 error.c            set_syserr(ECONNREFUSED, "ECONNREFUSED");


ECONNRESET

ECONNRESET       1410 error.c        #ifdef ECONNRESET
ECONNRESET       1411 error.c            set_syserr(ECONNRESET, "ECONNRESET");


EDEADLK

EDEADLK          1203 error.c        #ifdef EDEADLK
EDEADLK          1204 error.c            set_syserr(EDEADLK, "EDEADLK");


EDESTADDRREQ

EDESTADDRREQ     1365 error.c        #ifdef EDESTADDRREQ
EDESTADDRREQ     1366 error.c            set_syserr(EDESTADDRREQ, "EDESTADDRREQ");


EDOM

EDOM             1197 error.c        #ifdef EDOM
EDOM             1198 error.c            set_syserr(EDOM, "EDOM");


EDQUOT

EDQUOT           1464 error.c        #ifdef EDQUOT
EDQUOT           1465 error.c            set_syserr(EDQUOT, "EDQUOT");


EEXIST

EEXIST           1149 error.c        #ifdef EEXIST
EEXIST           1150 error.c            set_syserr(EEXIST, "EEXIST");
EEXIST           2182 file.c         	if (errno == EEXIST
EEXIST            133 win32/win32.c      {	ERROR_FILE_EXISTS,		EEXIST		},
EEXIST            154 win32/win32.c      {	ERROR_ALREADY_EXISTS,		EEXIST		},


EFAULT

EFAULT           1140 error.c        #ifdef EFAULT
EFAULT           1141 error.c            set_syserr(EFAULT, "EFAULT");
EFAULT            854 win32/win32.c  	errno = EFAULT;
EFAULT           3295 win32/win32.c  	errno = EFAULT;


EFBIG

EFBIG            1179 error.c        #ifdef EFBIG
EFBIG            1180 error.c            set_syserr(EFBIG, "EFBIG");


EFFECT_MEMORY

EFFECT_MEMORY     954 regcomp.c        case EFFECT_MEMORY:
EFFECT_MEMORY    1012 regcomp.c        case EFFECT_MEMORY:
EFFECT_MEMORY    1487 regcomp.c            if (en->type == EFFECT_MEMORY) {
EFFECT_MEMORY    1704 regcomp.c            case EFFECT_MEMORY:
EFFECT_MEMORY    1831 regcomp.c            case EFFECT_MEMORY:
EFFECT_MEMORY    1956 regcomp.c            case EFFECT_MEMORY:
EFFECT_MEMORY    2083 regcomp.c            case EFFECT_MEMORY:
EFFECT_MEMORY    2404 regcomp.c            case EFFECT_MEMORY:
EFFECT_MEMORY    2938 regcomp.c          if (en->type == EFFECT_MEMORY) {
EFFECT_MEMORY    3218 regcomp.c            case EFFECT_MEMORY:
EFFECT_MEMORY    3262 regcomp.c      #define ALLOWED_EFFECT_IN_LB       ( EFFECT_MEMORY )
EFFECT_MEMORY    4255 regcomp.c            case EFFECT_MEMORY:
EFFECT_MEMORY    5514 regcomp.c          case EFFECT_MEMORY:
EFFECT_MEMORY    1314 regparse.c       Node* node = node_new_effect(EFFECT_MEMORY);
EFFECT_MEMORY    4446 regparse.c         if (NEFFECT(*np).type == EFFECT_MEMORY) {


EFFECT_OPTION

EFFECT_OPTION     943 regcomp.c        if (node->type == EFFECT_OPTION)
EFFECT_OPTION    1008 regcomp.c        if (node->type == EFFECT_OPTION)
EFFECT_OPTION    1708 regcomp.c            case EFFECT_OPTION:
EFFECT_OPTION    1844 regcomp.c            case EFFECT_OPTION:
EFFECT_OPTION    1969 regcomp.c            case EFFECT_OPTION:
EFFECT_OPTION    2096 regcomp.c            case EFFECT_OPTION:
EFFECT_OPTION    2394 regcomp.c            case EFFECT_OPTION:
EFFECT_OPTION    3209 regcomp.c            case EFFECT_OPTION:
EFFECT_OPTION    4245 regcomp.c            case EFFECT_OPTION:
EFFECT_OPTION    5510 regcomp.c          case EFFECT_OPTION:
EFFECT_OPTION    1328 regparse.c       Node* node = node_new_effect(EFFECT_OPTION);
EFFECT_OPTION    2044 regparse.c         if (NEFFECT(node).type == EFFECT_OPTION)


EFFECT_STOP_BACKTRACK

EFFECT_STOP_BACKTRACK  979 regcomp.c        case EFFECT_STOP_BACKTRACK:
EFFECT_STOP_BACKTRACK 1069 regcomp.c        case EFFECT_STOP_BACKTRACK:
EFFECT_STOP_BACKTRACK 1709 regcomp.c            case EFFECT_STOP_BACKTRACK:
EFFECT_STOP_BACKTRACK 1845 regcomp.c            case EFFECT_STOP_BACKTRACK:
EFFECT_STOP_BACKTRACK 1970 regcomp.c            case EFFECT_STOP_BACKTRACK:
EFFECT_STOP_BACKTRACK 2097 regcomp.c            case EFFECT_STOP_BACKTRACK:
EFFECT_STOP_BACKTRACK 2405 regcomp.c            case EFFECT_STOP_BACKTRACK:
EFFECT_STOP_BACKTRACK 2925 regcomp.c      	      Node* en = onig_node_new_effect(EFFECT_STOP_BACKTRACK);
EFFECT_STOP_BACKTRACK 3226 regcomp.c            case EFFECT_STOP_BACKTRACK:
EFFECT_STOP_BACKTRACK 4279 regcomp.c            case EFFECT_STOP_BACKTRACK:
EFFECT_STOP_BACKTRACK 5517 regcomp.c          case EFFECT_STOP_BACKTRACK:
EFFECT_STOP_BACKTRACK 4277 regparse.c           *np = node_new_effect(EFFECT_STOP_BACKTRACK);
EFFECT_STOP_BACKTRACK 5029 regparse.c     	en = node_new_effect(EFFECT_STOP_BACKTRACK);


EHOSTDOWN

EHOSTDOWN        1434 error.c        #ifdef EHOSTDOWN
EHOSTDOWN        1435 error.c            set_syserr(EHOSTDOWN, "EHOSTDOWN");


EHOSTUNREACH

EHOSTUNREACH     1437 error.c        #ifdef EHOSTUNREACH
EHOSTUNREACH     1438 error.c            set_syserr(EHOSTUNREACH, "EHOSTUNREACH");


EINPROGRESS

EINPROGRESS      1443 error.c        #ifdef EINPROGRESS
EINPROGRESS      1444 error.c            set_syserr(EINPROGRESS, "EINPROGRESS");
EINPROGRESS      1060 ext/socket/socket.c #ifdef EINPROGRESS
EINPROGRESS      1061 ext/socket/socket.c 	      case EINPROGRESS:
EINPROGRESS      2249 win32/win32.c  		errno = EINPROGRESS;


EINTR

EINTR            1110 error.c        #ifdef EINTR
EINTR            1111 error.c            set_syserr(EINTR, "EINTR");
EINTR            9860 eval.c             errno = EINTR;
EINTR            10590 eval.c         	    if (e == EINTR) goto again;
EINTR            10784 eval.c         		  case EINTR:
EINTR            10865 eval.c         		  case EINTR:
EINTR            3123 file.c         	  case EINTR:
EINTR             473 io.c                 case EINTR:
EINTR             516 io.c                 case EINTR:
EINTR             570 process.c      	if (errno == EINTR) {
EINTR             598 process.c      	    if (errno == EINTR) {
EINTR             798 process.c      	    if (errno == EINTR) {
EINTR            1515 process.c          } while (i == -1 && errno == EINTR);
EINTR            2156 win32/win32.c  	errno = EINTR;
EINTR            2855 win32/win32.c  	    errno = EINTR;
EINTR            3378 win32/win32.c  	errno = EINTR;
EINTR            3702 win32/win32.c  		errno = EINTR;


EINVAL

EINVAL           1164 error.c        #ifdef EINVAL
EINVAL           1165 error.c            set_syserr(EINVAL, "EINVAL");
EINVAL            168 ext/iconv/iconv.c 	    int inval = errno == EINVAL;
EINVAL            251 ext/iconv/iconv.c 	  case EINVAL:
EINVAL            157 ext/sdbm/_sdbm.c 		return errno = EINVAL, (DBM *) NULL;
EINVAL            242 ext/sdbm/_sdbm.c 		errno = EINVAL;
EINVAL            256 ext/sdbm/_sdbm.c 		return errno = EINVAL, nullitem;
EINVAL            270 ext/sdbm/_sdbm.c 		return errno = EINVAL, -1;
EINVAL            301 ext/sdbm/_sdbm.c 		return errno = EINVAL, -1;
EINVAL            310 ext/sdbm/_sdbm.c 		return errno = EINVAL, -1;
EINVAL            457 ext/sdbm/_sdbm.c 		return errno = EINVAL, nullitem;
EINVAL            477 ext/sdbm/_sdbm.c 		return errno = EINVAL, nullitem;
EINVAL           1087 ext/socket/socket.c 	      case EINVAL:
EINVAL             41 ext/stringio/stringio.c #define error_inval(msg) (errno = EINVAL, rb_sys_fail(msg))
EINVAL           2623 io.c           	    if (errno == 0) errno = EINVAL;
EINVAL             41 missing/flock.c 	errno = EINVAL;
EINVAL            117 missing/flock.c 	errno = EINVAL;
EINVAL             96 win32/win32.c      {	ERROR_INVALID_FUNCTION,		EINVAL		},
EINVAL            107 win32/win32.c      {	ERROR_INVALID_ACCESS,		EINVAL		},
EINVAL            108 win32/win32.c      {	ERROR_INVALID_DATA,		EINVAL		},
EINVAL            136 win32/win32.c      {	ERROR_INVALID_PARAMETER,	EINVAL		},
EINVAL            142 win32/win32.c      {	ERROR_INVALID_HANDLE,		EINVAL		},
EINVAL            146 win32/win32.c      {	ERROR_NEGATIVE_SEEK,		EINVAL		},
EINVAL            195 win32/win32.c      return EINVAL;
EINVAL            281 win32/win32.c  	errno = EINVAL;
EINVAL            309 win32/win32.c  	errno = EINVAL;
EINVAL            693 win32/win32.c  	    errno = EINVAL;
EINVAL            805 win32/win32.c  	errno = EINVAL;
EINVAL           1838 win32/win32.c      errno = EINVAL;
EINVAL           2071 win32/win32.c  	errno = EINVAL;
EINVAL           2771 win32/win32.c  	errno = EINVAL;
EINVAL           2948 win32/win32.c  	errno = EINVAL;
EINVAL           2957 win32/win32.c  	    errno = EINVAL;
EINVAL           3017 win32/win32.c  	errno = EINVAL;
EINVAL            126 wince/io_wce.c 		errno = EINVAL; return -1;
EINVAL             49 x68/select.c         errno = EINVAL;
EINVAL             65 x68/select.c   	  errno = EINVAL;


EIO

EIO              1113 error.c        #ifdef EIO
EIO              1114 error.c            set_syserr(EIO, "EIO");
EIO               119 win32/win32.c      {	ERROR_SEEK,			EIO		},
EIO               123 win32/win32.c      {	ERROR_WRITE_FAULT,		EIO		},
EIO               124 win32/win32.c      {	ERROR_READ_FAULT,		EIO		},


EISCONN

EISCONN          1416 error.c        #ifdef EISCONN
EISCONN          1417 error.c            set_syserr(EISCONN, "EISCONN");
EISCONN          1107 ext/socket/socket.c #ifdef EISCONN
EISCONN          1108 ext/socket/socket.c 	      case EISCONN:


EISDIR

EISDIR           1161 error.c        #ifdef EISDIR
EISDIR           1162 error.c            set_syserr(EISDIR, "EISDIR");


ELOOP

ELOOP            1218 error.c        #ifdef ELOOP
ELOOP            1219 error.c            set_syserr(ELOOP, "ELOOP");


ELTS_SHARED

ELTS_SHARED        60 array.c            if (FL_TEST(ary, ELTS_SHARED)) {
ELTS_SHARED        62 array.c        	FL_UNSET(ary, ELTS_SHARED);
ELTS_SHARED       207 array.c            if (!FL_TEST(ary, ELTS_SHARED)) {
ELTS_SHARED       215 array.c        	FL_SET(ary, ELTS_SHARED);
ELTS_SHARED       233 array.c            FL_SET(val, ELTS_SHARED);
ELTS_SHARED       500 array.c            if (!FL_TEST(ary, ELTS_SHARED) &&
ELTS_SHARED       684 array.c            FL_SET(ary2, ELTS_SHARED);
ELTS_SHARED      2042 array.c            if (RARRAY(copy)->ptr && !FL_TEST(copy, ELTS_SHARED))
ELTS_SHARED      2047 array.c            FL_SET(copy, ELTS_SHARED);
ELTS_SHARED       886 gc.c           	if (FL_TEST(obj, ELTS_SHARED)) {
ELTS_SHARED       907 gc.c           	if (FL_TEST(obj, ELTS_SHARED|STR_ASSOC)) {
ELTS_SHARED      1126 gc.c           	if (RANY(obj)->as.string.ptr && !FL_TEST(obj, ELTS_SHARED)) {
ELTS_SHARED      1131 gc.c           	if (RANY(obj)->as.array.ptr && !FL_TEST(obj, ELTS_SHARED)) {
ELTS_SHARED        32 string.c       #define STR_NOCAPA  (ELTS_SHARED|STR_ASSOC)
ELTS_SHARED       132 string.c           FL_SET(str2, ELTS_SHARED);
ELTS_SHARED       151 string.c           if (FL_TEST(str, ELTS_SHARED)) {
ELTS_SHARED       152 string.c       	FL_SET(str2, ELTS_SHARED);
ELTS_SHARED       156 string.c       	FL_SET(str, ELTS_SHARED);
ELTS_SHARED       170 string.c           if (FL_TEST(orig, ELTS_SHARED) && (str = RSTRING(orig)->aux.shared) && klass == RBASIC(str)->klass) {
ELTS_SHARED       238 string.c           if (!FL_TEST(str, ELTS_SHARED)) free(RSTRING(str)->ptr);
ELTS_SHARED       427 string.c           if (!FL_TEST(str, ELTS_SHARED)) return 1;
ELTS_SHARED       461 string.c       	if (FL_TEST(str, ELTS_SHARED)) {
ELTS_SHARED       492 string.c       	FL_SET(s, ELTS_SHARED);
ELTS_SHARED       521 string.c       	FL_SET(str, ELTS_SHARED);
ELTS_SHARED       570 string.c           if (FL_TEST(str, ELTS_SHARED) && RSTRING(str)->aux.shared) {
ELTS_SHARED      2109 string.c           if (FL_TEST(str2, ELTS_SHARED)) {
ELTS_SHARED      2115 string.c       	FL_SET(str, ELTS_SHARED);
ELTS_SHARED      2152 string.c           FL_SET(str, ELTS_SHARED);


EMFILE

EMFILE            400 dir.c          	if (errno == EMFILE || errno == ENFILE) {
EMFILE           1170 error.c        #ifdef EMFILE
EMFILE           1171 error.c            set_syserr(EMFILE, "EMFILE");
EMFILE            161 ext/iconv/iconv.c 	  case EMFILE:
EMFILE            910 ext/socket/socket.c 	if (errno == EMFILE || errno == ENFILE) {
EMFILE           1407 ext/socket/socket.c 	  case EMFILE:
EMFILE           2105 ext/socket/socket.c 	if (errno == EMFILE || errno == ENFILE) {
EMFILE            366 io.c           	if (errno == EMFILE || errno == ENFILE) {
EMFILE           2564 io.c           	if (errno == EMFILE || errno == ENFILE) {
EMFILE           2582 io.c           	if (errno == EMFILE || errno == ENFILE) {
EMFILE           2614 io.c           	    errno == EMFILE || errno == ENFILE) {
EMFILE           2625 io.c           	    if (errno == 0) errno = EMFILE;
EMFILE             57 missing/dup2.c 	errno = EMFILE;
EMFILE             99 win32/win32.c      {	ERROR_TOO_MANY_OPEN_FILES,	EMFILE		},
EMFILE           1645 win32/win32.c  	errno = EMFILE;		/* too many open files */
EMFILE           1692 win32/win32.c  	errno = EMFILE;		/* too many open files */
EMFILE           3995 win32/win32.c  	    errno = EMFILE;
EMFILE           4008 win32/win32.c  	    errno = EMFILE;
EMFILE           4019 win32/win32.c  	    errno = EMFILE;


EMLINK

EMLINK           1191 error.c        #ifdef EMLINK
EMLINK           1192 error.c            set_syserr(EMLINK, "EMLINK");


EMSGSIZE

EMSGSIZE         1368 error.c        #ifdef EMSGSIZE
EMSGSIZE         1369 error.c            set_syserr(EMSGSIZE, "EMSGSIZE");


ENABLE_INTS

ENABLE_INTS      5283 eval.c             ENABLE_INTS;
ENABLE_INTS        98 regint.h       #define THREAD_ATOMIC_END            ENABLE_INTS


END

END               983 re.c               end = RMATCH(match)->END(nth);
END              1041 re.c               pos = RMATCH(match)->END(0);
END              2026 re.c           	    rb_str_buf_cat(val, RSTRING(src)->ptr+END(0), RSTRING(src)->len-END(0));
END              2047 re.c           	    rb_str_buf_cat(val, RSTRING(src)->ptr+BEG(no), END(no)-BEG(no));
END              1595 string.c           end = RMATCH(match)->END(nth);
END              1854 string.c       	plen = END(0) - BEG(0);
END              1986 string.c       	offset = END(0);
END              1987 string.c       	if (BEG(0) == END(0)) {
END              1992 string.c       	    if (RSTRING(str)->len <= END(0)) break;
END              1993 string.c       	    len = mbclen2(RSTRING(str)->ptr[END(0)], pat);
END              1994 string.c       	    memcpy(bp, RSTRING(str)->ptr+END(0), len);
END              1996 string.c       	    offset = END(0) + len;
END              3291 string.c       	    if (start == end && BEG(0) == END(0)) {
END              3308 string.c       		beg = start = END(0);
END              3314 string.c       		if (BEG(idx) == END(idx))
END              3317 string.c       		    tmp = rb_str_substr(str, BEG(idx), END(idx)-BEG(idx));
END              3781 string.c       	if (BEG(0) == END(0)) {
END              3785 string.c       	    if (RSTRING(str)->len > END(0))
END              3786 string.c       		*start = END(0)+mbclen2(RSTRING(str)->ptr[END(0)],pat);
END              3788 string.c       		*start = END(0)+1;
END              3791 string.c       	    *start = END(0);


END_CALLARGS

END_CALLARGS     3014 eval.c         		    END_CALLARGS;
END_CALLARGS     3256 eval.c         	    END_CALLARGS;
END_CALLARGS     3274 eval.c         	    END_CALLARGS;
END_CALLARGS     3289 eval.c         	    END_CALLARGS;
END_CALLARGS     3336 eval.c         		END_CALLARGS;
END_CALLARGS     5151 eval.c             END_CALLARGS;


END_FOREACH

END_FOREACH      10371 eval.c             END_FOREACH(th);
END_FOREACH      11074 eval.c             END_FOREACH(th);
END_FOREACH      12109 eval.c         	END_FOREACH(th);
END_FOREACH      12491 eval.c             END_FOREACH(th);
END_FOREACH      12693 eval.c             END_FOREACH(th);


END_FOREACH_CHILD

END_FOREACH_CHILD  457 win32/win32.c      } END_FOREACH_CHILD;
END_FOREACH_CHILD  469 win32/win32.c      } END_FOREACH_CHILD;
END_FOREACH_CHILD  491 win32/win32.c      } END_FOREACH_CHILD;
END_FOREACH_CHILD 2844 win32/win32.c  	} END_FOREACH_CHILD;


END_FOREACH_FROM

END_FOREACH_FROM 9760 eval.c         #define END_FOREACH(x)    END_FOREACH_FROM(curr_thread,x)
END_FOREACH_FROM 10020 eval.c             } END_FOREACH_FROM(main_thread, th);
END_FOREACH_FROM 10043 eval.c             } END_FOREACH_FROM(main_thread, th);
END_FOREACH_FROM 10556 eval.c             END_FOREACH_FROM(curr, th);
END_FOREACH_FROM 10607 eval.c         	    END_FOREACH_FROM(curr, th);
END_FOREACH_FROM 10623 eval.c         	    END_FOREACH_FROM(curr, th);
END_FOREACH_FROM 10652 eval.c         	    END_FOREACH_FROM(curr, th);
END_FOREACH_FROM 10674 eval.c             END_FOREACH_FROM(curr, th);
END_FOREACH_FROM 10698 eval.c         	END_FOREACH_FROM(curr, th);
END_FOREACH_FROM 12136 eval.c             END_FOREACH_FROM(curr, th);


ENETDOWN

ENETDOWN         1398 error.c        #ifdef ENETDOWN
ENETDOWN         1399 error.c            set_syserr(ENETDOWN, "ENETDOWN");


ENETRESET

ENETRESET        1404 error.c        #ifdef ENETRESET
ENETRESET        1405 error.c            set_syserr(ENETRESET, "ENETRESET");


ENETUNREACH

ENETUNREACH      1401 error.c        #ifdef ENETUNREACH
ENETUNREACH      1402 error.c            set_syserr(ENETUNREACH, "ENETUNREACH");


ENFILE

ENFILE            400 dir.c          	if (errno == EMFILE || errno == ENFILE) {
ENFILE           1167 error.c        #ifdef ENFILE
ENFILE           1168 error.c            set_syserr(ENFILE, "ENFILE");
ENFILE            162 ext/iconv/iconv.c 	  case ENFILE:
ENFILE            910 ext/socket/socket.c 	if (errno == EMFILE || errno == ENFILE) {
ENFILE           1408 ext/socket/socket.c 	  case ENFILE:
ENFILE           2105 ext/socket/socket.c 	if (errno == EMFILE || errno == ENFILE) {
ENFILE            366 io.c           	if (errno == EMFILE || errno == ENFILE) {
ENFILE           2564 io.c           	if (errno == EMFILE || errno == ENFILE) {
ENFILE           2582 io.c           	if (errno == EMFILE || errno == ENFILE) {
ENFILE           2614 io.c           	    errno == EMFILE || errno == ENFILE) {


ENI_MEMORY

ENI_MEMORY        187 ext/socket/getnameinfo.c 			return ENI_MEMORY;
ENI_MEMORY        194 ext/socket/getnameinfo.c 				return ENI_MEMORY;
ENI_MEMORY        231 ext/socket/getnameinfo.c 			return ENI_MEMORY;
ENI_MEMORY        250 ext/socket/getnameinfo.c 				return ENI_MEMORY;
ENI_MEMORY        263 ext/socket/getnameinfo.c 				return ENI_MEMORY;


ENI_NOHOSTNAME

ENI_NOHOSTNAME    258 ext/socket/getnameinfo.c 				return ENI_NOHOSTNAME;
ENI_NOHOSTNAME    261 ext/socket/getnameinfo.c 				return ENI_NOHOSTNAME;


ENI_NOSERVNAME

ENI_NOSERVNAME    197 ext/socket/getnameinfo.c 			return ENI_NOSERVNAME;
ENI_NOSERVNAME    199 ext/socket/getnameinfo.c 		return ENI_NOSERVNAME;


ENI_SALEN

ENI_SALEN         166 ext/socket/getnameinfo.c 	if (len != salen) return ENI_SALEN;
ENI_SALEN         177 ext/socket/getnameinfo.c 	if (len != afd->a_socklen) return ENI_SALEN;


ENOBUFS

ENOBUFS          1413 error.c        #ifdef ENOBUFS
ENOBUFS          1414 error.c            set_syserr(ENOBUFS, "ENOBUFS");


ENODEV

ENODEV           1155 error.c        #ifdef ENODEV
ENODEV           1156 error.c            set_syserr(ENODEV, "ENODEV");
ENODEV            114 win32/win32.c      {	ERROR_BAD_UNIT,			ENODEV		},


ENOENT

ENOENT            916 dir.c              if (ret < 0 && errno != ENOENT)
ENOENT            926 dir.c              if (ret < 0 && errno != ENOENT)
ENOENT            936 dir.c              if (dirp == NULL && errno != ENOENT && errno != ENOTDIR)
ENOENT           1104 error.c        #ifdef ENOENT
ENOENT           1105 error.c            set_syserr(ENOENT, "ENOENT");
ENOENT            926 process.c      	errno = ENOENT;
ENOENT            961 process.c      		errno = ENOENT;
ENOENT           1054 process.c          errno = ENOENT;
ENOENT           1101 process.c      	    errno = ENOENT;
ENOENT             97 win32/win32.c      {	ERROR_FILE_NOT_FOUND,		ENOENT		},
ENOENT             98 win32/win32.c      {	ERROR_PATH_NOT_FOUND,		ENOENT		},
ENOENT            109 win32/win32.c      {	ERROR_INVALID_DRIVE,		ENOENT		},
ENOENT            112 win32/win32.c      {	ERROR_NO_MORE_FILES,		ENOENT		},
ENOENT            130 win32/win32.c      {	ERROR_BAD_NETPATH,		ENOENT		},
ENOENT            132 win32/win32.c      {	ERROR_BAD_NET_NAME,		ENOENT		},
ENOENT            151 win32/win32.c      {	ERROR_BAD_PATHNAME,		ENOENT		},
ENOENT            170 win32/win32.c      {	ERROR_FILENAME_EXCED_RANGE,	ENOENT		},
ENOENT           3257 win32/win32.c  	errno = ENOENT;
ENOENT           3308 win32/win32.c  	errno = ENOENT;
ENOENT            148 wince/io_wce.c 		errno = ENOENT; return -1;


ENOEXEC

ENOEXEC           161 dln.c          #define DLN_ENOEXEC	ENOEXEC	/* Exec format error */
ENOEXEC          1122 error.c        #ifdef ENOEXEC
ENOEXEC          1123 error.c            set_syserr(ENOEXEC, "ENOEXEC");
ENOEXEC           106 win32/win32.c      {	ERROR_BAD_FORMAT,		ENOEXEC		},
ENOEXEC           155 win32/win32.c      {	ERROR_INVALID_STARTING_CODESEG,	ENOEXEC		},
ENOEXEC           156 win32/win32.c      {	ERROR_INVALID_STACKSEG,		ENOEXEC		},
ENOEXEC           157 win32/win32.c      {	ERROR_INVALID_MODULETYPE,	ENOEXEC		},
ENOEXEC           158 win32/win32.c      {	ERROR_INVALID_EXE_SIGNATURE,	ENOEXEC		},
ENOEXEC           159 win32/win32.c      {	ERROR_EXE_MARKED_INVALID,	ENOEXEC		},
ENOEXEC           160 win32/win32.c      {	ERROR_BAD_EXE_FORMAT,		ENOEXEC		},
ENOEXEC           161 win32/win32.c      {	ERROR_ITERATED_DATA_EXCEEDS_64k,ENOEXEC		},
ENOEXEC           162 win32/win32.c      {	ERROR_INVALID_MINALLOCSIZE,	ENOEXEC		},
ENOEXEC           163 win32/win32.c      {	ERROR_DYNLINK_FROM_INVALID_RING,ENOEXEC		},
ENOEXEC           164 win32/win32.c      {	ERROR_IOPL_NOT_ENABLED,		ENOEXEC		},
ENOEXEC           165 win32/win32.c      {	ERROR_INVALID_SEGDPL,		ENOEXEC		},
ENOEXEC           166 win32/win32.c      {	ERROR_AUTODATASEG_EXCEEDS_64k,	ENOEXEC		},
ENOEXEC           167 win32/win32.c      {	ERROR_RING2SEG_MUST_BE_MOVABLE,	ENOEXEC		},
ENOEXEC           168 win32/win32.c      {	ERROR_RELOC_CHAIN_XEEDS_SEGLIM,	ENOEXEC		},
ENOEXEC           169 win32/win32.c      {	ERROR_INFLOOP_IN_RELOC_CHAIN,	ENOEXEC		},


ENOMEM

ENOMEM           1134 error.c        #ifdef ENOMEM
ENOMEM           1135 error.c            set_syserr(ENOMEM, "ENOMEM");
ENOMEM            163 ext/iconv/iconv.c 	  case ENOMEM:
ENOMEM            164 ext/sdbm/_sdbm.c 		return errno = ENOMEM, (DBM *) NULL;
ENOMEM            188 ext/sdbm/_sdbm.c 		return errno = ENOMEM, (DBM *) NULL;
ENOMEM            102 win32/win32.c      {	ERROR_ARENA_TRASHED,		ENOMEM		},
ENOMEM            103 win32/win32.c      {	ERROR_NOT_ENOUGH_MEMORY,	ENOMEM		},
ENOMEM            104 win32/win32.c      {	ERROR_INVALID_BLOCK,		ENOMEM		},
ENOMEM            172 win32/win32.c      {	ERROR_NOT_ENOUGH_QUOTA,		ENOMEM		},


ENOPROTOOPT

ENOPROTOOPT      1374 error.c        #ifdef ENOPROTOOPT
ENOPROTOOPT      1375 error.c            set_syserr(ENOPROTOOPT, "ENOPROTOOPT");


ENOSPC

ENOSPC           1182 error.c        #ifdef ENOSPC
ENOSPC           1183 error.c            set_syserr(ENOSPC, "ENOSPC");
ENOSPC            140 win32/win32.c      {	ERROR_DISK_FULL,		ENOSPC		},


ENOSYS

ENOSYS           1212 error.c        #ifdef ENOSYS
ENOSYS           1213 error.c            set_syserr(ENOSYS, "ENOSYS");


ENOTCONN

ENOTCONN         1419 error.c        #ifdef ENOTCONN
ENOTCONN         1420 error.c            set_syserr(ENOTCONN, "ENOTCONN");


ENOTDIR

ENOTDIR           936 dir.c              if (dirp == NULL && errno != ENOENT && errno != ENOTDIR)
ENOTDIR          1158 error.c        #ifdef ENOTDIR
ENOTDIR          1159 error.c            set_syserr(ENOTDIR, "ENOTDIR");
ENOTDIR           149 win32/win32.c      {	ERROR_DIRECTORY,		ENOTDIR		},
ENOTDIR          1372 win32/win32.c  	errno = ENOTDIR;


ENOTSOCK

ENOTSOCK         1362 error.c        #ifdef ENOTSOCK
ENOTSOCK         1363 error.c            set_syserr(ENOTSOCK, "ENOTSOCK");


ENOTTY

ENOTTY           1173 error.c        #ifdef ENOTTY
ENOTTY           1174 error.c            set_syserr(ENOTTY, "ENOTTY");
ENOTTY           3966 win32/win32.c  	errno = ENOTTY;


ENSURE_YAML_IEND

ENSURE_YAML_IEND  209 ext/syck/bytecode.c                 ENSURE_YAML_IEND(lvl, -1);
ENSURE_YAML_IEND  415 ext/syck/bytecode.c {   ENSURE_YAML_IEND(lvl, -1);
ENSURE_YAML_IEND  517 ext/syck/bytecode.c {   ENSURE_YAML_IEND(lvl, -1);
ENSURE_YAML_IEND  357 ext/syck/token.c                         ENSURE_YAML_IEND(lvl, -1);
ENSURE_YAML_IEND  440 ext/syck/token.c                             ENSURE_YAML_IEND(lvl, -1);
ENSURE_YAML_IEND  484 ext/syck/token.c                             ENSURE_YAML_IEND(lvl, -1);
ENSURE_YAML_IEND  570 ext/syck/token.c                         ENSURE_YAML_IEND(lvl, indt_len);
ENSURE_YAML_IEND  819 ext/syck/token.c {   ENSURE_YAML_IEND(lvl, -1);


ENSURE_YAML_IOPEN

ENSURE_YAML_IOPEN  571 ext/syck/token.c                         ENSURE_YAML_IOPEN(lvl, indt_len, 0);
ENSURE_YAML_IOPEN  586 ext/syck/token.c {   ENSURE_YAML_IOPEN(lvl, doc_level, 1);
ENSURE_YAML_IOPEN  594 ext/syck/token.c {   ENSURE_YAML_IOPEN(lvl, doc_level, 1);
ENSURE_YAML_IOPEN  604 ext/syck/token.c {   ENSURE_YAML_IOPEN(lvl, doc_level, 1);
ENSURE_YAML_IOPEN  772 ext/syck/token.c {   ENSURE_YAML_IOPEN(lvl, doc_level, 1);
ENSURE_YAML_IOPEN  779 ext/syck/token.c {   ENSURE_YAML_IOPEN(lvl, doc_level, 1);
ENSURE_YAML_IOPEN  952 ext/syck/token.c {   ENSURE_YAML_IOPEN(lvl, doc_level, 1);
ENSURE_YAML_IOPEN 1041 ext/syck/token.c {   ENSURE_YAML_IOPEN(lvl, YYTOKEN - YYLINEPTR, 1);


ENTER

ENTER             144 ext/bigdecimal/bigdecimal.c     ENTER(1);
ENTER             157 ext/bigdecimal/bigdecimal.c     ENTER(1);
ENTER             177 ext/bigdecimal/bigdecimal.c     ENTER(5);
ENTER             194 ext/bigdecimal/bigdecimal.c     ENTER(2);
ENTER             342 ext/bigdecimal/bigdecimal.c     ENTER(5);
ENTER             405 ext/bigdecimal/bigdecimal.c     ENTER(1);
ENTER             425 ext/bigdecimal/bigdecimal.c     ENTER(2);
ENTER             446 ext/bigdecimal/bigdecimal.c     ENTER(5);
ENTER             473 ext/bigdecimal/bigdecimal.c     ENTER(5);
ENTER             503 ext/bigdecimal/bigdecimal.c     ENTER(5);
ENTER             584 ext/bigdecimal/bigdecimal.c     ENTER(5);
ENTER             595 ext/bigdecimal/bigdecimal.c     ENTER(5);
ENTER             614 ext/bigdecimal/bigdecimal.c     ENTER(5);
ENTER             634 ext/bigdecimal/bigdecimal.c     ENTER(5);
ENTER             657 ext/bigdecimal/bigdecimal.c     ENTER(8);
ENTER             711 ext/bigdecimal/bigdecimal.c     ENTER(3);
ENTER             724 ext/bigdecimal/bigdecimal.c     ENTER(10);
ENTER             771 ext/bigdecimal/bigdecimal.c     ENTER(5);
ENTER             785 ext/bigdecimal/bigdecimal.c     ENTER(5);
ENTER             821 ext/bigdecimal/bigdecimal.c     ENTER(2);
ENTER             838 ext/bigdecimal/bigdecimal.c     ENTER(2);
ENTER             855 ext/bigdecimal/bigdecimal.c     ENTER(2);
ENTER             872 ext/bigdecimal/bigdecimal.c     ENTER(5);
ENTER             887 ext/bigdecimal/bigdecimal.c     ENTER(5);
ENTER             904 ext/bigdecimal/bigdecimal.c     ENTER(5);
ENTER             918 ext/bigdecimal/bigdecimal.c     ENTER(5);
ENTER             961 ext/bigdecimal/bigdecimal.c     ENTER(5);
ENTER             986 ext/bigdecimal/bigdecimal.c     ENTER(5);
ENTER            1000 ext/bigdecimal/bigdecimal.c     ENTER(5);
ENTER            1025 ext/bigdecimal/bigdecimal.c     ENTER(5);
ENTER            1050 ext/bigdecimal/bigdecimal.c     ENTER(5);
ENTER            1103 ext/bigdecimal/bigdecimal.c     ENTER(5);
ENTER            1138 ext/bigdecimal/bigdecimal.c     ENTER(5);
ENTER            1160 ext/bigdecimal/bigdecimal.c     ENTER(5);
ENTER            1184 ext/bigdecimal/bigdecimal.c     ENTER(5);
ENTER            1203 ext/bigdecimal/bigdecimal.c     ENTER(5);


ENV_IGNORECASE

ENV_IGNORECASE   1548 hash.c         #ifdef ENV_IGNORECASE
ENV_IGNORECASE   1584 hash.c         #ifdef ENV_IGNORECASE
ENV_IGNORECASE   1626 hash.c         #ifdef ENV_IGNORECASE
ENV_IGNORECASE   1659 hash.c         #ifdef ENV_IGNORECASE
ENV_IGNORECASE   1776 hash.c         #ifdef ENV_IGNORECASE


ENXIO

ENXIO            1116 error.c        #ifdef ENXIO
ENXIO            1117 error.c            set_syserr(ENXIO, "ENXIO");
ENXIO             115 win32/win32.c      {	ERROR_NOT_READY,		ENXIO		},


EOF

EOF              1685 ext/nkf/nkf-utf8/nkf.c           if (c == EOF){
EOF              1806 ext/nkf/nkf-utf8/nkf.c         return EOF;
EOF              1817 ext/nkf/nkf-utf8/nkf.c     if(c!=EOF)
EOF              1829 ext/nkf/nkf-utf8/nkf.c     while ((c = (*i_getc)(f)) != EOF)
EOF              1959 ext/nkf/nkf-utf8/nkf.c     while ((c1 = (*i_getc)(f)) != EOF) {
EOF              1968 ext/nkf/nkf-utf8/nkf.c                     if (h_conv(f, c2, c1)==EOF)
EOF              2076 ext/nkf/nkf-utf8/nkf.c                     if ((c1 = (*i_getc)(f)) == EOF) {
EOF              2083 ext/nkf/nkf-utf8/nkf.c 			    if (mime_begin_strict(f) == EOF)
EOF              2087 ext/nkf/nkf-utf8/nkf.c 			} else if (mime_begin(f) == EOF)
EOF              2107 ext/nkf/nkf-utf8/nkf.c                 if ((c1 = (*i_getc)(f)) == EOF) {
EOF              2111 ext/nkf/nkf-utf8/nkf.c                     if ((c1 = (*i_getc)(f)) == EOF) {
EOF              2126 ext/nkf/nkf-utf8/nkf.c                         if ((c1 = (*i_getc)(f)) == EOF) {
EOF              2164 ext/nkf/nkf-utf8/nkf.c                     if ((c1 = (*i_getc)(f)) == EOF) {
EOF              2210 ext/nkf/nkf-utf8/nkf.c 		if ((c1=(*i_getc)(f))!=EOF && c1 == SPACE) {
EOF              2219 ext/nkf/nkf-utf8/nkf.c 		if ((c1=(*i_getc)(f))!=EOF) {
EOF              2223 ext/nkf/nkf-utf8/nkf.c 		    } else if (c1 == NL && (c1=(*i_getc)(f))!=EOF && c1 == SPACE) {
EOF              2249 ext/nkf/nkf-utf8/nkf.c             if (c0 != EOF){
EOF              2261 ext/nkf/nkf-utf8/nkf.c     (*iconv)(EOF, 0, 0);
EOF              2295 ext/nkf/nkf-utf8/nkf.c     while ((c1 = (*i_getc)(f)) != EOF) {
EOF              2301 ext/nkf/nkf-utf8/nkf.c         if (push_hold_buf(c1) == EOF || estab_f){
EOF              2309 ext/nkf/nkf-utf8/nkf.c         if (c1 == EOF){
EOF              2350 ext/nkf/nkf-utf8/nkf.c             if (c1 == EOF){
EOF              2351 ext/nkf/nkf-utf8/nkf.c                 c3 = EOF;
EOF              2362 ext/nkf/nkf-utf8/nkf.c                 if (c0 == EOF){
EOF              2363 ext/nkf/nkf-utf8/nkf.c                     c3 = EOF;
EOF              2382 ext/nkf/nkf-utf8/nkf.c         return (EOF);
EOF              2384 ext/nkf/nkf-utf8/nkf.c     return ((hold_count >= HOLD_SIZE*2) ? EOF : hold_count);
EOF              2447 ext/nkf/nkf-utf8/nkf.c     } else if ((c2 == EOF) || (c2 == 0) || c2 < SPACE) {
EOF              2487 ext/nkf/nkf-utf8/nkf.c     } else if ((c2 == EOF) || (c2 == 0) || c2 < SPACE) {
EOF              2555 ext/nkf/nkf-utf8/nkf.c     if (c2 == EOF);
EOF              2666 ext/nkf/nkf-utf8/nkf.c     if (c2 != EOF && utf16_mode == UTF16LE_INPUT) {
EOF              2670 ext/nkf/nkf-utf8/nkf.c     if ((c2==0 && c1 < 0x80) || c2==EOF) {
EOF              2763 ext/nkf/nkf-utf8/nkf.c     if (c2 == EOF) {
EOF              2764 ext/nkf/nkf-utf8/nkf.c         (*o_putc)(EOF);
EOF              2814 ext/nkf/nkf-utf8/nkf.c     if (c2 == EOF) {
EOF              2815 ext/nkf/nkf-utf8/nkf.c         (*o_putc)(EOF);
EOF              2868 ext/nkf/nkf-utf8/nkf.c     if (c2 == EOF) {
EOF              2869 ext/nkf/nkf-utf8/nkf.c         (*o_putc)(EOF);
EOF              2991 ext/nkf/nkf-utf8/nkf.c     if (c2 == EOF) {
EOF              2992 ext/nkf/nkf-utf8/nkf.c         (*o_putc)(EOF);
EOF              3050 ext/nkf/nkf-utf8/nkf.c     if (c2 == EOF) {
EOF              3057 ext/nkf/nkf-utf8/nkf.c         (*o_putc)(EOF);
EOF              3237 ext/nkf/nkf-utf8/nkf.c     } else if (c2==EOF && f_line != 0) {    /* close open last line */
EOF              3418 ext/nkf/nkf-utf8/nkf.c     if (c2==EOF) {
EOF              3661 ext/nkf/nkf-utf8/nkf.c         if ( ((r[i] = c1 = (*i_getc)(f))==EOF) || nkf_toupper(c1) != p[i] ) {
EOF              3746 ext/nkf/nkf-utf8/nkf.c             if (!(++i<MAXRECOVER) || c1==EOF) break;
EOF              3755 ext/nkf/nkf-utf8/nkf.c             if (!(++i<MAXRECOVER) || c1==EOF) break;
EOF              4039 ext/nkf/nkf-utf8/nkf.c         if ((c1 = (*i_mgetc)(f)) == EOF) return (EOF);
EOF              4051 ext/nkf/nkf-utf8/nkf.c         if ((c2 = (*i_mgetc)(f)) == EOF) return (EOF);
EOF              4061 ext/nkf/nkf-utf8/nkf.c 	    while ((c1=(*i_getc)(f))!=EOF) {
EOF              4066 ext/nkf/nkf-utf8/nkf.c 			if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
EOF              4074 ext/nkf/nkf-utf8/nkf.c 			if ((c1=(*i_getc)(f))!=EOF && c1 == NL) {
EOF              4075 ext/nkf/nkf-utf8/nkf.c 			    if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
EOF              4122 ext/nkf/nkf-utf8/nkf.c 		if ((c1 = (*i_mgetc)(f)) == EOF) return (EOF);
EOF              4132 ext/nkf/nkf-utf8/nkf.c         if ((c3 = (*i_mgetc)(f)) == EOF) return (EOF);
EOF              4158 ext/nkf/nkf-utf8/nkf.c         if (c1==EOF)
EOF              4159 ext/nkf/nkf-utf8/nkf.c             return (EOF);
EOF              4163 ext/nkf/nkf-utf8/nkf.c         if (c2==EOF)
EOF              4164 ext/nkf/nkf-utf8/nkf.c             return (EOF);
EOF              4177 ext/nkf/nkf-utf8/nkf.c 	while ((c1=(*i_getc)(f))!=EOF) {
EOF              4182 ext/nkf/nkf-utf8/nkf.c 		    if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
EOF              4190 ext/nkf/nkf-utf8/nkf.c 		    if ((c1=(*i_getc)(f))!=EOF) {
EOF              4194 ext/nkf/nkf-utf8/nkf.c 			} else if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
EOF              4241 ext/nkf/nkf-utf8/nkf.c         if (c3==EOF)
EOF              4242 ext/nkf/nkf-utf8/nkf.c             return (EOF);
EOF              4249 ext/nkf/nkf-utf8/nkf.c         if (c4==EOF)
EOF              4250 ext/nkf/nkf-utf8/nkf.c             return (EOF);
EOF              4304 ext/nkf/nkf-utf8/nkf.c     while((c=(*i_getc)(f))!=EOF) {
EOF              4507 ext/nkf/nkf-utf8/nkf.c                 (*o_base64conv)(EOF,0);
EOF              4549 ext/nkf/nkf-utf8/nkf.c             if (c == EOF) { /* c==EOF */
EOF              4553 ext/nkf/nkf-utf8/nkf.c         if (c != EOF) { /* c==EOF */
EOF              4561 ext/nkf/nkf-utf8/nkf.c     if (c == EOF) { /* c==EOF */
EOF               756 ext/stringio/stringio.c     if (cc != EOF && pos > 0) {
EOF               944 io.c               if (ch != EOF) {
EOF              1438 io.c               int c = EOF;
EOF              1445 io.c           	    long last = 0, len = (c != EOF);
EOF              1457 io.c           	    if (c != EOF) {
EOF              1463 io.c           	else if (c != EOF) {
EOF              1519 io.c               } while (c != EOF);
EOF              1529 io.c               while ((c = appendline(fptr, delim, &str)) != EOF && c != delim);
EOF              1584 io.c           	while ((c = appendline(fptr, newline, &str)) != EOF) {
EOF              1594 io.c           	    if (c != EOF) {
EOF              1950 io.c               if (io_ungetc(cc, fptr) == EOF && cc != EOF) {
EOF              1006 missing/vsnprintf.c 	return (__sferror(fp) ? EOF : ret);
EOF              1097 missing/vsnprintf.c 		return (EOF);
EOF              1128 missing/vsnprintf.c 		return (EOF);
EOF              1052 pack.c             long i = 0, n = 0, prev = EOF;
EOF              1064 pack.c                     prev = EOF;
EOF              5584 parse.y              case EOF:
EOF              3602 win32/win32.c          if ((c == EOF) && (errno == EPIPE)) {


EOPNOTSUPP

EOPNOTSUPP       1383 error.c        #ifdef EOPNOTSUPP
EOPNOTSUPP       1384 error.c            set_syserr(EOPNOTSUPP, "EOPNOTSUPP");


EOS_P

EOS_P             432 ext/strscan/strscan.c     if (EOS_P(p)) {
EOS_P             699 ext/strscan/strscan.c     if (EOS_P(p))
EOS_P             738 ext/strscan/strscan.c     if (EOS_P(p))
EOS_P             782 ext/strscan/strscan.c     if (EOS_P(p))
EOS_P             868 ext/strscan/strscan.c     return EOS_P(p) ? Qtrue : Qfalse;
EOS_P             898 ext/strscan/strscan.c     return EOS_P(p) ? Qfalse : Qtrue;
EOS_P            1058 ext/strscan/strscan.c     if (EOS_P(p)) {
EOS_P            1075 ext/strscan/strscan.c     if (EOS_P(p)) {
EOS_P            1123 ext/strscan/strscan.c     if (EOS_P(p)) {
EOS_P            1174 ext/strscan/strscan.c     if (EOS_P(p)) return rb_str_new2("");


EPERM

EPERM            1101 error.c        #ifdef EPERM
EPERM            1102 error.c            set_syserr(EPERM, "EPERM");
EPERM             493 ext/dbm/dbm.c  	if (errno == EPERM) rb_sys_fail(0);
EPERM             592 ext/gdbm/gdbm.c 	if (errno == EPERM) rb_sys_fail(0);
EPERM              90 ext/sdbm/_sdbm.c #ifndef EPERM
EPERM             272 ext/sdbm/_sdbm.c 		return errno = EPERM, -1;
EPERM             303 ext/sdbm/_sdbm.c 		return errno = EPERM, -1;
EPERM             476 ext/sdbm/init.c 	if (errno == EPERM) rb_sys_fail(0);
EPERM            2336 process.c      	    errno = EPERM;
EPERM            2345 process.c      	    errno = EPERM;
EPERM            2352 process.c      	    errno = EPERM;
EPERM            2359 process.c      	    errno = EPERM;
EPERM            2929 process.c      	    errno = EPERM;
EPERM            2938 process.c      	    errno = EPERM;
EPERM            2945 process.c      	    errno = EPERM;
EPERM            2952 process.c      	    errno = EPERM;
EPERM            3366 process.c      	errno = EPERM;
EPERM            3389 process.c      	errno = EPERM;
EPERM            3475 process.c      	errno = EPERM;
EPERM            3497 process.c      	errno = EPERM;
EPERM            2972 win32/win32.c  		    errno = EPERM;
EPERM            2986 win32/win32.c  		    errno = EPERM;
EPERM            3002 win32/win32.c  		    errno = EPERM;
EPERM            3008 win32/win32.c  		    errno = EPERM;


EPFNOSUPPORT

EPFNOSUPPORT     1386 error.c        #ifdef EPFNOSUPPORT
EPFNOSUPPORT     1387 error.c            set_syserr(EPFNOSUPPORT, "EPFNOSUPPORT");


EPIPE

EPIPE            1194 error.c        #ifdef EPIPE
EPIPE            1195 error.c            set_syserr(EPIPE, "EPIPE");
EPIPE             139 win32/win32.c      {	ERROR_BROKEN_PIPE,		EPIPE		},
EPIPE            3577 win32/win32.c      if ((ret < 0) && (errno == EPIPE)) {
EPIPE            3602 win32/win32.c          if ((c == EOF) && (errno == EPIPE)) {


EPROTONOSUPPORT

EPROTONOSUPPORT  1377 error.c        #ifdef EPROTONOSUPPORT
EPROTONOSUPPORT  1378 error.c            set_syserr(EPROTONOSUPPORT, "EPROTONOSUPPORT");


EPROTOTYPE

EPROTOTYPE       1371 error.c        #ifdef EPROTOTYPE
EPROTOTYPE       1372 error.c            set_syserr(EPROTOTYPE, "EPROTOTYPE");
EPROTOTYPE       2670 win32/win32.c  	errno = EPROTOTYPE;


EQUAL

EQUAL             214 st.c           ((ptr) != 0 && (ptr->hash != (hash_val) || !EQUAL((table), (key), (ptr)->key)))
EQUAL             379 st.c               if (EQUAL(table, *key, ptr->key)) {
EQUAL             389 st.c           	if (EQUAL(table, ptr->next->key, *key)) {
EQUAL             418 st.c           	if ((ptr->key != never) && EQUAL(table, ptr->key, *key)) {


ERANGE

ERANGE           1200 error.c        #ifdef ERANGE
ERANGE           1201 error.c            set_syserr(ERANGE, "ERANGE");
ERANGE            414 ext/bigdecimal/bigdecimal.c     if((errno == ERANGE && e>0) || (d2>1.0 && (fabs(d) > (DBL_MAX / d2)))) {
ERANGE           2110 file.c         	    || (rv < 0 && errno == ERANGE) /* quirky behavior of GPFS */
ERANGE            248 missing/strtod.c 	errno = ERANGE;
ERANGE           2067 object.c           if (errno == ERANGE) {
ERANGE           2101 object.c       	if (errno == ERANGE) {
ERANGE           2111 object.c           if (errno == ERANGE) {
ERANGE           6290 parse.y        		if (errno == ERANGE) {
ERANGE            631 util.c         	if (errno != ERANGE) {
ERANGE            872 util.c         	    errno = ERANGE;
ERANGE            876 util.c         	    errno = ERANGE;


EREMOTE

EREMOTE          1296 error.c        #ifdef EREMOTE
EREMOTE          1297 error.c            set_syserr(EREMOTE, "EREMOTE");


EROFS

EROFS            1188 error.c        #ifdef EROFS
EROFS            1189 error.c            set_syserr(EROFS, "EROFS");
EROFS             113 win32/win32.c      {	ERROR_WRITE_PROTECT,		EROFS		},


ERR

ERR               509 ext/curses/curses.c   return (n = curs_set(NUM2INT(visibility)) != ERR) ? INT2FIX(n) : Qnil;
ERR              1367 ext/curses/curses.c   return (c = getbkgd(winp->window) != ERR) ? CH2FIX(c) : Qnil;
ERR               319 ext/socket/getaddrinfo.c 			ERR(EAI_BADHINTS); /* xxx */
ERR               321 ext/socket/getaddrinfo.c 			ERR(EAI_BADFLAGS);
ERR               330 ext/socket/getaddrinfo.c 			ERR(EAI_FAMILY);
ERR               358 ext/socket/getaddrinfo.c 				ERR(EAI_BADHINTS);	/*xxx*/
ERR               364 ext/socket/getaddrinfo.c 				ERR(EAI_BADHINTS);	/*xxx*/
ERR               368 ext/socket/getaddrinfo.c 			ERR(EAI_SOCKTYPE);
ERR               404 ext/socket/getaddrinfo.c 				ERR(EAI_SERVICE);
ERR               414 ext/socket/getaddrinfo.c 					ERR(EAI_PROTOCOL);	/*xxx*/
ERR               464 ext/socket/getaddrinfo.c 			ERR(EAI_FAMILY);
ERR               515 ext/socket/getaddrinfo.c 				ERR(EAI_FAMILY);	/*xxx*/
ERR               520 ext/socket/getaddrinfo.c 		ERR(EAI_NONAME);
ERR               634 ext/socket/getaddrinfo.c 		ERR(EAI_FAIL);


ERRBUF_APPEND

ERRBUF_APPEND    1243 dln.c          	ERRBUF_APPEND(strerror(errno));
ERRBUF_APPEND    1248 dln.c          		ERRBUF_APPEND(load_errtab[i].errstr);
ERRBUF_APPEND    1251 dln.c          	ERRBUF_APPEND(message[i]);
ERRBUF_APPEND    1252 dln.c          	ERRBUF_APPEND("\n");


ERROR_TOKEN

ERROR_TOKEN        29 ext/racc/cparse/cparse.c #define vERROR_TOKEN    INT2FIX(ERROR_TOKEN)
ERROR_TOKEN       570 ext/racc/cparse/cparse.c     D_printf("(err) k2=%d (error)\n", ERROR_TOKEN);
ERROR_TOKEN       576 ext/racc/cparse/cparse.c         i = NUM2LONG(tmp) + ERROR_TOKEN;
ERROR_TOKEN       622 ext/racc/cparse/cparse.c         SHIFT(v, act, ERROR_TOKEN, val);


ESC

ESC              2106 ext/nkf/nkf-utf8/nkf.c             } else if (c1 == ESC ) {
ESC              2146 ext/nkf/nkf-utf8/nkf.c                             (*oconv)(0, ESC);
ESC              2158 ext/nkf/nkf-utf8/nkf.c                         (*oconv)(0, ESC);
ESC              2182 ext/nkf/nkf-utf8/nkf.c                             (*oconv)(0, ESC);
ESC              2198 ext/nkf/nkf-utf8/nkf.c                        (*oconv)(0, ESC);
ESC              2203 ext/nkf/nkf-utf8/nkf.c                     (*oconv)(0, ESC);
ESC              2296 ext/nkf/nkf-utf8/nkf.c         if (c1 == ESC){
ESC              3052 ext/nkf/nkf-utf8/nkf.c             (*o_putc)(ESC);
ESC              3062 ext/nkf/nkf-utf8/nkf.c             (*o_putc)(ESC);
ESC              3073 ext/nkf/nkf-utf8/nkf.c             (*o_putc)(ESC);
ESC              3086 ext/nkf/nkf-utf8/nkf.c             (*o_putc)(ESC);
ESC              3095 ext/nkf/nkf-utf8/nkf.c             (*o_putc)(ESC);
ESC              3131 ext/nkf/nkf-utf8/nkf.c     if (c=='$' && broken_last != ESC
ESC              3138 ext/nkf/nkf-utf8/nkf.c 	    return ESC;
ESC              3143 ext/nkf/nkf-utf8/nkf.c     } else if (c=='(' && broken_last != ESC
ESC              3150 ext/nkf/nkf-utf8/nkf.c 	    return ESC;


ESHUTDOWN

ESHUTDOWN        1422 error.c        #ifdef ESHUTDOWN
ESHUTDOWN        1423 error.c            set_syserr(ESHUTDOWN, "ESHUTDOWN");


ESOCKTNOSUPPORT

ESOCKTNOSUPPORT  1380 error.c        #ifdef ESOCKTNOSUPPORT
ESOCKTNOSUPPORT  1381 error.c            set_syserr(ESOCKTNOSUPPORT, "ESOCKTNOSUPPORT");


ESPIPE

ESPIPE           1185 error.c        #ifdef ESPIPE
ESPIPE           1186 error.c            set_syserr(ESPIPE, "ESPIPE");
ESPIPE            255 io.c                   if (errno == ESPIPE)


ESRCH

ESRCH            1107 error.c        #ifdef ESRCH
ESRCH            1108 error.c            set_syserr(ESRCH, "ESRCH");
ESRCH            2969 win32/win32.c  		    errno = ESRCH;
ESRCH            2999 win32/win32.c  		    errno = ESRCH;


ESTALE

ESTALE           1446 error.c        #ifdef ESTALE
ESTALE           1447 error.c            set_syserr(ESTALE, "ESTALE");


ETIMEDOUT

ETIMEDOUT        1428 error.c        #ifdef ETIMEDOUT
ETIMEDOUT        1429 error.c            set_syserr(ETIMEDOUT, "ETIMEDOUT");


ETOOMANYREFS

ETOOMANYREFS     1425 error.c        #ifdef ETOOMANYREFS
ETOOMANYREFS     1426 error.c            set_syserr(ETOOMANYREFS, "ETOOMANYREFS");


EUSERS

EUSERS           1359 error.c        #ifdef EUSERS
EUSERS           1360 error.c            set_syserr(EUSERS, "EUSERS");


EVENTSINK_Destructor

EVENTSINK_Destructor 6170 ext/win32ole/win32ole.c void EVENTSINK_Destructor(PIEVENTSINKOBJ);
EVENTSINK_Destructor 6206 ext/win32ole/win32ole.c     EVENTSINK_Destructor(pEVObj);


EVP_CIPHER_CTX_copy

EVP_CIPHER_CTX_copy   69 ext/openssl/openssl_missing.h int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, EVP_CIPHER_CTX *in);
EVP_CIPHER_CTX_copy  114 ext/openssl/ossl_cipher.c     if (EVP_CIPHER_CTX_copy(ctx1, ctx2) != 1)


EVP_CIPHER_name

EVP_CIPHER_name    86 ext/openssl/openssl_missing.h #if !defined(EVP_CIPHER_name)
EVP_CIPHER_name   265 ext/openssl/ossl_cipher.c     return rb_str_new2(EVP_CIPHER_name(EVP_CIPHER_CTX_cipher(ctx)));


EVP_CipherInit_ex

EVP_CipherInit_ex   57 ext/openssl/ossl_cipher.c     if (EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL, -1) != 1)
EVP_CipherInit_ex   99 ext/openssl/ossl_cipher.c     if (EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL, -1) != 1)
EVP_CipherInit_ex  126 ext/openssl/ossl_cipher.c     if (EVP_CipherInit_ex(ctx, NULL, NULL, NULL, NULL, -1) != 1)
EVP_CipherInit_ex  168 ext/openssl/ossl_cipher.c     if (EVP_CipherInit_ex(ctx, NULL, NULL, p_key, p_iv, mode) != 1) {
EVP_CipherInit_ex  209 ext/openssl/ossl_cipher.c     if (EVP_CipherInit_ex(ctx, NULL, NULL, key, iv, -1) != 1)
EVP_CipherInit_ex  279 ext/openssl/ossl_cipher.c     if (EVP_CipherInit_ex(ctx, NULL, NULL, RSTRING(key)->ptr, NULL, -1) != 1)
EVP_CipherInit_ex  296 ext/openssl/ossl_cipher.c     if (EVP_CipherInit_ex(ctx, NULL, NULL, NULL, RSTRING(iv)->ptr, -1) != 1)


EVP_DigestInit_ex

EVP_DigestInit_ex   55 ext/openssl/ossl_digest.c     EVP_DigestInit_ex(ctx, md, NULL);
EVP_DigestInit_ex   98 ext/openssl/ossl_digest.c     EVP_DigestInit_ex(ctx, md, NULL);
EVP_DigestInit_ex  127 ext/openssl/ossl_digest.c     EVP_DigestInit_ex(ctx, EVP_MD_CTX_md(ctx), NULL);


EVP_MD_CTX_cleanup

EVP_MD_CTX_cleanup   77 ext/openssl/openssl_missing.c     EVP_MD_CTX_cleanup(ctx);
EVP_MD_CTX_cleanup  104 ext/openssl/openssl_missing.c     EVP_MD_CTX_cleanup(&ctx->i_ctx);
EVP_MD_CTX_cleanup  105 ext/openssl/openssl_missing.c     EVP_MD_CTX_cleanup(&ctx->o_ctx);
EVP_MD_CTX_cleanup  106 ext/openssl/openssl_missing.c     EVP_MD_CTX_cleanup(&ctx->md_ctx);
EVP_MD_CTX_cleanup   65 ext/openssl/openssl_missing.h int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx);
EVP_MD_CTX_cleanup  153 ext/openssl/ossl_digest.c 	EVP_MD_CTX_cleanup(&final);
EVP_MD_CTX_cleanup  157 ext/openssl/ossl_digest.c     EVP_MD_CTX_cleanup(&final);


EVP_MD_CTX_create

EVP_MD_CTX_create   63 ext/openssl/openssl_missing.h EVP_MD_CTX *EVP_MD_CTX_create(void);
EVP_MD_CTX_create   69 ext/openssl/ossl_digest.c     ctx = EVP_MD_CTX_create();


EVP_MD_CTX_destroy

EVP_MD_CTX_destroy   66 ext/openssl/openssl_missing.h void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx);
EVP_MD_CTX_destroy   73 ext/openssl/ossl_digest.c     obj = Data_Wrap_Struct(klass, 0, EVP_MD_CTX_destroy, ctx);


EVP_MD_CTX_init

EVP_MD_CTX_init    94 ext/openssl/openssl_missing.c     EVP_MD_CTX_init(&ctx->i_ctx);
EVP_MD_CTX_init    95 ext/openssl/openssl_missing.c     EVP_MD_CTX_init(&ctx->o_ctx);
EVP_MD_CTX_init    96 ext/openssl/openssl_missing.c     EVP_MD_CTX_init(&ctx->md_ctx);
EVP_MD_CTX_init    64 ext/openssl/openssl_missing.h void EVP_MD_CTX_init(EVP_MD_CTX *ctx);
EVP_MD_CTX_init    54 ext/openssl/ossl_digest.c     EVP_MD_CTX_init(ctx);
EVP_MD_CTX_init    72 ext/openssl/ossl_digest.c     EVP_MD_CTX_init(ctx);


EVP_MD_name

EVP_MD_name        90 ext/openssl/openssl_missing.h #if !defined(EVP_MD_name)
EVP_MD_name       248 ext/openssl/ossl_digest.c     return rb_str_new2(EVP_MD_name(EVP_MD_CTX_md(ctx)));


EWOULDBLOCK

EWOULDBLOCK      1221 error.c        #ifdef EWOULDBLOCK
EWOULDBLOCK      1222 error.c            set_syserr(EWOULDBLOCK, "EWOULDBLOCK");
EWOULDBLOCK        65 ext/socket/socket.c #ifndef EWOULDBLOCK
EWOULDBLOCK      1413 ext/socket/socket.c 	  case EWOULDBLOCK:
EWOULDBLOCK      3056 file.c         #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
EWOULDBLOCK      3057 file.c         	  case EWOULDBLOCK:
EWOULDBLOCK      3119 file.c         #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
EWOULDBLOCK      3120 file.c         	  case EWOULDBLOCK:
EWOULDBLOCK       481 io.c           #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
EWOULDBLOCK       482 io.c                 case EWOULDBLOCK:
EWOULDBLOCK       524 io.c           #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
EWOULDBLOCK       525 io.c                 case EWOULDBLOCK:
EWOULDBLOCK      2931 io.c           #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
EWOULDBLOCK      2932 io.c           	  case EWOULDBLOCK:
EWOULDBLOCK      1326 process.c      #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
EWOULDBLOCK      1327 process.c      	  case EWOULDBLOCK:
EWOULDBLOCK       248 win32/win32.c  #define LK_ERR(f,i) ((f) ? (i = 0) : (errno = GetLastError() == ERROR_LOCK_VIOLATION ? EWOULDBLOCK : EACCES))
EWOULDBLOCK       299 win32/win32.c  	} while (i && errno == EWOULDBLOCK);


EXCL

EXCL               97 range.c            return EXCL(range) ? Qtrue : Qfalse;
EXCL              127 range.c            if (EXCL(range) != EXCL(obj)) return Qfalse;
EXCL              182 range.c            if (EXCL(range) != EXCL(obj)) return Qfalse;
EXCL              199 range.c            long hash = EXCL(range);
EXCL              206 range.c            hash ^= EXCL(range) << 24;
EXCL              216 range.c            return rb_str_upto(args[0], args[1], EXCL(args[2]));
EXCL              224 range.c            if (EXCL(range)) {
EXCL              303 range.c        	if (!EXCL(range)) end += 1;
EXCL              321 range.c        	    ID c = rb_intern(EXCL(range) ? "<" : "<=");
EXCL              387 range.c        	if (!EXCL(range)) lim += 1;
EXCL              485 range.c            if (rb_block_given_p() || (EXCL(range) && !ip)) {
EXCL              493 range.c        	if (EXCL(range)) {
EXCL              512 range.c        	excl = EXCL(range);
EXCL              564 range.c            rb_str_cat(str, "...", EXCL(range)?3:2);
EXCL              589 range.c            rb_str_cat(str, "...", EXCL(range)?3:2);
EXCL              631 range.c        	    if (EXCL(range)) {
EXCL              665 range.c        	if (EXCL(range)) {


EXDEV

EXDEV            1152 error.c        #ifdef EXDEV
EXDEV            1153 error.c            set_syserr(EXDEV, "EXDEV");
EXDEV             111 win32/win32.c      {	ERROR_NOT_SAME_DEVICE,		EXDEV		},


EXEC_EVENT_HOOK

EXEC_EVENT_HOOK  2721 eval.c         	EXEC_EVENT_HOOK(RUBY_EVENT_LINE, node, self,
EXEC_EVENT_HOOK  2817 eval.c         	EXEC_EVENT_HOOK(RUBY_EVENT_LINE, node, self,
EXEC_EVENT_HOOK  2835 eval.c         		EXEC_EVENT_HOOK(RUBY_EVENT_LINE, tag, self,
EXEC_EVENT_HOOK  2876 eval.c         		    EXEC_EVENT_HOOK(RUBY_EVENT_LINE, tag, self,
EXEC_EVENT_HOOK  3991 eval.c         	EXEC_EVENT_HOOK(RUBY_EVENT_CLASS, n, ruby_cbase,
EXEC_EVENT_HOOK  4002 eval.c             EXEC_EVENT_HOOK(RUBY_EVENT_END, n, 0, ruby_frame->this_func,
EXEC_EVENT_HOOK  4391 eval.c         	EXEC_EVENT_HOOK(RUBY_EVENT_RAISE, ruby_current_node,
EXEC_EVENT_HOOK  5630 eval.c         		EXEC_EVENT_HOOK(RUBY_EVENT_C_CALL, ruby_current_node,
EXEC_EVENT_HOOK  5638 eval.c         		EXEC_EVENT_HOOK(RUBY_EVENT_C_RETURN, ruby_current_node,
EXEC_EVENT_HOOK  5722 eval.c         		    EXEC_EVENT_HOOK(RUBY_EVENT_CALL, b2, recv, id, klass);
EXEC_EVENT_HOOK  5737 eval.c         		EXEC_EVENT_HOOK(RUBY_EVENT_RETURN, body, recv, id, klass);


EXEC_TAG

EXEC_TAG         1142 eval.c             if (EXEC_TAG() == 0) {
EXEC_TAG         1148 eval.c             if (EXEC_TAG()) goto error;
EXEC_TAG         1169 eval.c             if (EXEC_TAG() == 0) {
EXEC_TAG         1179 eval.c             if (EXEC_TAG()) goto error;
EXEC_TAG         1302 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         1424 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         1444 eval.c             if (EXEC_TAG() == 0) {
EXEC_TAG         1478 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         1514 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         1722 eval.c         	if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         1744 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         2354 eval.c         	if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         2548 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         2777 eval.c         	switch (state = EXEC_TAG()) {
EXEC_TAG         2907 eval.c         	switch (state = EXEC_TAG()) {
EXEC_TAG         2942 eval.c         	switch (state = EXEC_TAG()) {
EXEC_TAG         2982 eval.c         	state = EXEC_TAG();
EXEC_TAG         2997 eval.c         	    state = EXEC_TAG();
EXEC_TAG         3091 eval.c         	    if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         3141 eval.c         	if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         3371 eval.c         	    if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         3990 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         4372 eval.c         	if ((status = EXEC_TAG()) == 0) {
EXEC_TAG         4697 eval.c         	if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         4789 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         5113 eval.c             state = EXEC_TAG();
EXEC_TAG         5174 eval.c             switch (state = EXEC_TAG()) {
EXEC_TAG         5228 eval.c             if ((status = EXEC_TAG()) == 0) {
EXEC_TAG         5254 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         5277 eval.c         	if ((status = EXEC_TAG()) == 0) {
EXEC_TAG         5298 eval.c         	if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         5633 eval.c         		if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         5706 eval.c         	    if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         6151 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         6304 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         6584 eval.c             state = EXEC_TAG();
EXEC_TAG         6642 eval.c             if ((status = EXEC_TAG()) == 0) {
EXEC_TAG         6917 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         7568 eval.c         	    if ((status = EXEC_TAG()) == 0) {
EXEC_TAG         7586 eval.c         	    if ((status = EXEC_TAG()) == 0) {
EXEC_TAG         8246 eval.c             state = EXEC_TAG();
EXEC_TAG         8572 eval.c             state = EXEC_TAG();
EXEC_TAG         11758 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         11846 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         12941 eval.c             if ((state = EXEC_TAG()) == 0) {
EXEC_TAG         13093 eval.c         	if ((state = EXEC_TAG()) == 0) {


EXIT_FAILURE

EXIT_FAILURE       27 eval.c         #ifndef EXIT_FAILURE
EXIT_FAILURE     1320 eval.c         	exit(EXIT_FAILURE);
EXIT_FAILURE     1361 eval.c             int status = EXIT_FAILURE;
EXIT_FAILURE     1363 eval.c             if (thread_set_raised()) return EXIT_FAILURE;
EXIT_FAILURE     1546 eval.c             if (ruby_nerrs > 0) exit(EXIT_FAILURE);
EXIT_FAILURE     4281 eval.c         	    istatus = EXIT_FAILURE;
EXIT_FAILURE     4318 eval.c         	rb_exit(EXIT_FAILURE);
EXIT_FAILURE     4326 eval.c         	terminate_process(EXIT_FAILURE, mesg);
EXIT_FAILURE     10189 eval.c         	    terminate_process(EXIT_FAILURE, ruby_errinfo);
EXIT_FAILURE       39 process.c      #ifndef EXIT_FAILURE
EXIT_FAILURE     1359 process.c      	    _exit(EXIT_FAILURE);
EXIT_FAILURE     1468 process.c      	    istatus = EXIT_FAILURE;
EXIT_FAILURE     1476 process.c      	istatus = EXIT_FAILURE;


EXIT_SUCCESS

EXIT_SUCCESS       22 error.c        #ifndef EXIT_SUCCESS
EXIT_SUCCESS      505 error.c            VALUE status = INT2FIX(EXIT_SUCCESS);
EXIT_SUCCESS      542 error.c            if (status == INT2FIX(EXIT_SUCCESS)) return Qtrue;
EXIT_SUCCESS       24 eval.c         #ifndef EXIT_SUCCESS
EXIT_SUCCESS     1366 eval.c         	status = EXIT_SUCCESS;
EXIT_SUCCESS     4278 eval.c         	    istatus = EXIT_SUCCESS;
EXIT_SUCCESS     4285 eval.c         #if EXIT_SUCCESS != 0
EXIT_SUCCESS     4286 eval.c         	    if (istatus == 0) istatus = EXIT_SUCCESS;
EXIT_SUCCESS     4292 eval.c         	istatus = EXIT_SUCCESS;
EXIT_SUCCESS     11160 eval.c             if (th == th->next || th == main_thread) rb_exit(EXIT_SUCCESS);
EXIT_SUCCESS     12242 eval.c         	rb_exit(EXIT_SUCCESS);
EXIT_SUCCESS     12244 eval.c             args[0] = INT2NUM(EXIT_SUCCESS);
EXIT_SUCCESS       36 process.c      #ifndef EXIT_SUCCESS
EXIT_SUCCESS      519 process.c          return WEXITSTATUS(status) == EXIT_SUCCESS ? Qtrue : Qfalse;
EXIT_SUCCESS     1353 process.c      	    if (!(*chfunc)(charg)) _exit(EXIT_SUCCESS);
EXIT_SUCCESS     1358 process.c      #if EXIT_SUCCESS == 127
EXIT_SUCCESS     1465 process.c      	    istatus = EXIT_SUCCESS;
EXIT_SUCCESS     1600 process.c          if (status == EXIT_SUCCESS) return Qtrue;


EXPAND_STRING_MAX_LENGTH

EXPAND_STRING_MAX_LENGTH 3170 regcomp.c      	    qn->lower > 1 && qn->lower <= EXPAND_STRING_MAX_LENGTH) {
EXPAND_STRING_MAX_LENGTH 3174 regcomp.c      	  if (len * qn->lower <= EXPAND_STRING_MAX_LENGTH) {


EXPR1

EXPR1             455 eval.c         	ent = cache + EXPR1(klass, id);
EXPR1             467 eval.c         	ent = cache + EXPR1(klass, id);
EXPR1             508 eval.c             ent = cache + EXPR1(klass, id);
EXPR1             618 eval.c             ent = cache + EXPR1(klass, id);
EXPR1            5781 eval.c             ent = cache + EXPR1(klass, mid);


EXTERN

EXTERN            206 defines.h      #ifndef EXTERN
EXTERN             41 ext/io/wait/wait.c EXTERN struct timeval rb_time_interval _((VALUE time));
EXTERN            372 ext/tk/tcltklib.c EXTERN struct TclIntStubs *tclIntStubsPtr;
EXTERN            380 ext/tk/tcltklib.c EXTERN Tcl_Namespace *  Tcl_GetCurrentNamespace _((Tcl_Interp *));
EXTERN            436 ext/tk/tcltklib.c EXTERN int  TclGetFrame _((Tcl_Interp *, CONST char *, CallFrame **));
EXTERN            455 ext/tk/tcltklib.c EXTERN void Tcl_PopCallFrame _((Tcl_Interp *));
EXTERN            456 ext/tk/tcltklib.c EXTERN int  Tcl_PushCallFrame _((Tcl_Interp *, Tcl_CallFrame *, Tcl_Namespace *, int));
EXTERN            494 ext/tk/tcltklib.c EXTERN int  TclGetFrame _((Tcl_Interp *, CONST char *, CallFrame **));
EXTERN           5014 ext/tk/tcltklib.c EXTERN void TkConsoleCreate _((void));
EXTERN           5021 ext/tk/tcltklib.c EXTERN void TkConsoleCreate_ _((void));


EffectNode

EffectNode       1486 regcomp.c            EffectNode* en = &(NEFFECT(node));
EffectNode       1648 regcomp.c        EffectNode* en;
EffectNode       1702 regcomp.c            EffectNode* en = &(NEFFECT(node));
EffectNode       1764 regcomp.c            EffectNode* en = &(NEFFECT(NCALL(node).target));
EffectNode       1829 regcomp.c            EffectNode* en = &(NEFFECT(node));
EffectNode       1954 regcomp.c            EffectNode* en = &(NEFFECT(node));
EffectNode       2081 regcomp.c            EffectNode* en = &(NEFFECT(node));
EffectNode       2392 regcomp.c            EffectNode* en = &(NEFFECT(node));
EffectNode       2448 regcomp.c            EffectNode* en = &(NEFFECT(node));
EffectNode       2593 regcomp.c            EffectNode* en = &(NEFFECT(node));
EffectNode       2717 regcomp.c            EffectNode* en = &(NEFFECT(node));
EffectNode       2937 regcomp.c          EffectNode* en = &(NEFFECT(node));
EffectNode       3206 regcomp.c            EffectNode* en = &(NEFFECT(node));
EffectNode       4242 regcomp.c            EffectNode* en = &(NEFFECT(node));
EffectNode        229 regparse.h         EffectNode    effect;


F

F                 237 ext/digest/md5/md5.c   t = a + F(b,c,d) + X[k] + Ti;\
F                  75 ext/digest/rmd160/rmd160.c       (a) += F((b), (c), (d)) + (x);			\
F                 100 ext/digest/rmd160/rmd160.c       (a) += F((b), (c), (d)) + (x);			\


FAILED_MAXLEN

FAILED_MAXLEN     287 ext/iconv/iconv.c     else if (TYPE(failed) != T_STRING || RSTRING(failed)->len < FAILED_MAXLEN) {
FAILED_MAXLEN     291 ext/iconv/iconv.c 	args[0] = rb_inspect(rb_str_substr(failed, 0, FAILED_MAXLEN));


FAIL_CreateInterp

FAIL_CreateInterp  202 ext/tk/stubs.c             if (st) *st = FAIL_CreateInterp;
FAIL_CreateInterp  238 ext/tk/stubs.c             if (st) *st = FAIL_CreateInterp;
FAIL_CreateInterp  363 ext/tk/stubs.c         case FAIL_CreateInterp:
FAIL_CreateInterp  447 ext/tk/stubs.c         if (st) *st = FAIL_CreateInterp;
FAIL_CreateInterp  684 ext/tk/tcltklib.c         case FAIL_CreateInterp:
FAIL_CreateInterp 4704 ext/tk/tcltklib.c         case FAIL_CreateInterp:


FAIL_Tcl_InitStubs

FAIL_Tcl_InitStubs  243 ext/tk/stubs.c             if (st) *st = FAIL_Tcl_InitStubs;
FAIL_Tcl_InitStubs  365 ext/tk/stubs.c         case FAIL_Tcl_InitStubs:
FAIL_Tcl_InitStubs  686 ext/tk/tcltklib.c         case FAIL_Tcl_InitStubs:
FAIL_Tcl_InitStubs 4706 ext/tk/tcltklib.c         case FAIL_Tcl_InitStubs:


FAIL_Tk_Init

FAIL_Tk_Init      279 ext/tk/stubs.c             return FAIL_Tk_Init;
FAIL_Tk_Init      294 ext/tk/stubs.c             return FAIL_Tk_Init;
FAIL_Tk_Init      315 ext/tk/stubs.c             return FAIL_Tk_Init;
FAIL_Tk_Init      329 ext/tk/stubs.c             return FAIL_Tk_Init;
FAIL_Tk_Init      375 ext/tk/stubs.c     case FAIL_Tk_Init:
FAIL_Tk_Init      467 ext/tk/stubs.c         return FAIL_Tk_Init;
FAIL_Tk_Init      485 ext/tk/stubs.c         return FAIL_Tk_Init;
FAIL_Tk_Init      498 ext/tk/stubs.c     return FAIL_Tk_Init;
FAIL_Tk_Init      713 ext/tk/tcltklib.c         case FAIL_Tk_Init:
FAIL_Tk_Init      734 ext/tk/tcltklib.c         case FAIL_Tk_Init:
FAIL_Tk_Init     4774 ext/tk/tcltklib.c         case FAIL_Tk_Init:


FAIL_Tk_InitStubs

FAIL_Tk_InitStubs  297 ext/tk/stubs.c             return FAIL_Tk_InitStubs;
FAIL_Tk_InitStubs  332 ext/tk/stubs.c             return FAIL_Tk_InitStubs;
FAIL_Tk_InitStubs  376 ext/tk/stubs.c     case FAIL_Tk_InitStubs:
FAIL_Tk_InitStubs  717 ext/tk/tcltklib.c         case FAIL_Tk_InitStubs:
FAIL_Tk_InitStubs  738 ext/tk/tcltklib.c         case FAIL_Tk_InitStubs:
FAIL_Tk_InitStubs 4777 ext/tk/tcltklib.c         case FAIL_Tk_InitStubs:


FAITH

FAITH              91 ext/socket/getaddrinfo.c #ifdef FAITH
FAITH             285 ext/socket/getaddrinfo.c #ifdef FAITH
FAITH             660 ext/socket/getaddrinfo.c #ifdef FAITH


FALSE

FALSE              38 ascii.c            return FALSE;
FALSE             165 euc_jp.c             return (eucjp_code_to_mbclen(code) > 1 ? TRUE : FALSE);
FALSE             168 euc_jp.c           if (ctype == 0) return FALSE;
FALSE             174 euc_jp.c           return FALSE;
FALSE             203 euc_jp.c           return FALSE;
FALSE            1218 ext/curses/curses.c   scrollok(winp->window, RTEST(bf) ? TRUE : FALSE);
FALSE            1228 ext/curses/curses.c   idlok(winp->window, RTEST(bf) ? TRUE : FALSE);
FALSE            1396 ext/curses/curses.c   keypad(winp->window,(RTEST(val) ? TRUE : FALSE));
FALSE            1400 ext/curses/curses.c   return (keypad(winp->window,RTEST(val) ? TRUE : FALSE)) == OK ?
FALSE            1417 ext/curses/curses.c   nodelay(winp->window, RTEST(val) ? TRUE : FALSE);
FALSE            1420 ext/curses/curses.c   return nodelay(winp->window,RTEST(val) ? TRUE : FALSE) == OK ? Qtrue : Qfalse;
FALSE             383 ext/nkf/nkf-utf8/nkf.c STATIC int             unbuf_f = FALSE;
FALSE             384 ext/nkf/nkf-utf8/nkf.c STATIC int             estab_f = FALSE;
FALSE             385 ext/nkf/nkf-utf8/nkf.c STATIC int             nop_f = FALSE;
FALSE             387 ext/nkf/nkf-utf8/nkf.c STATIC int             rot_f = FALSE;          /* rot14/43 mode */
FALSE             388 ext/nkf/nkf-utf8/nkf.c STATIC int             hira_f = FALSE;          /* hira/kata henkan */
FALSE             389 ext/nkf/nkf-utf8/nkf.c STATIC int             input_f = FALSE;        /* non fixed input code  */
FALSE             390 ext/nkf/nkf-utf8/nkf.c STATIC int             alpha_f = FALSE;        /* convert JIx0208 alphbet to ASCII */
FALSE             392 ext/nkf/nkf-utf8/nkf.c STATIC int             mime_decode_f = FALSE;  /* mime decode is explicitly on */
FALSE             393 ext/nkf/nkf-utf8/nkf.c STATIC int             mimebuf_f = FALSE;      /* MIME buffered input */
FALSE             394 ext/nkf/nkf-utf8/nkf.c STATIC int             broken_f = FALSE;       /* convert ESC-less broken JIS */
FALSE             395 ext/nkf/nkf-utf8/nkf.c STATIC int             iso8859_f = FALSE;      /* ISO8859 through */
FALSE             396 ext/nkf/nkf-utf8/nkf.c STATIC int             mimeout_f = FALSE;       /* base64 mode */
FALSE             402 ext/nkf/nkf-utf8/nkf.c STATIC int             iso2022jp_f = FALSE;    /* convert ISO-2022-JP */
FALSE             404 ext/nkf/nkf-utf8/nkf.c STATIC int             internal_unicode_f = FALSE;   /* Internal Unicode Processing */
FALSE             409 ext/nkf/nkf-utf8/nkf.c STATIC int             ms_ucs_map_f = FALSE;   /* Microsoft UCS Mapping Compatible */
FALSE             413 ext/nkf/nkf-utf8/nkf.c STATIC int nfc_f = FALSE;
FALSE             421 ext/nkf/nkf-utf8/nkf.c STATIC int cap_f = FALSE;
FALSE             427 ext/nkf/nkf-utf8/nkf.c STATIC int url_f = FALSE;
FALSE             437 ext/nkf/nkf-utf8/nkf.c STATIC int numchar_f = FALSE;
FALSE             445 ext/nkf/nkf-utf8/nkf.c STATIC int noout_f = FALSE;
FALSE             447 ext/nkf/nkf-utf8/nkf.c STATIC int debug_f = FALSE;
FALSE             452 ext/nkf/nkf-utf8/nkf.c STATIC int guess_f = FALSE;
FALSE             457 ext/nkf/nkf-utf8/nkf.c STATIC int is_inputcode_mixed = FALSE;
FALSE             458 ext/nkf/nkf-utf8/nkf.c STATIC int is_inputcode_set   = FALSE;
FALSE             477 ext/nkf/nkf-utf8/nkf.c STATIC int x0212_f = FALSE;
FALSE             511 ext/nkf/nkf-utf8/nkf.c STATIC int             fold_preserve_f = FALSE; /* preserve new lines */
FALSE             512 ext/nkf/nkf-utf8/nkf.c STATIC int             fold_f  = FALSE;
FALSE             578 ext/nkf/nkf-utf8/nkf.c            shift_mode =  FALSE;    /* TRUE shift out, or X0201  */
FALSE             579 ext/nkf/nkf-utf8/nkf.c STATIC int mime_decode_mode =   FALSE;    /* MIME mode B base64, Q hex */
FALSE             673 ext/nkf/nkf-utf8/nkf.c STATIC int             file_out = FALSE;
FALSE             675 ext/nkf/nkf-utf8/nkf.c STATIC int             overwrite = FALSE;
FALSE             770 ext/nkf/nkf-utf8/nkf.c 	    is_inputcode_mixed = FALSE;
FALSE             771 ext/nkf/nkf-utf8/nkf.c 	    is_inputcode_set   = FALSE;
FALSE             914 ext/nkf/nkf-utf8/nkf.c     if (file_out == FALSE)
FALSE            1074 ext/nkf/nkf-utf8/nkf.c                     cp932_f = FALSE;
FALSE            1075 ext/nkf/nkf-utf8/nkf.c                     cp932inv_f = FALSE;
FALSE            1078 ext/nkf/nkf-utf8/nkf.c                     ms_ucs_map_f = FALSE;
FALSE            1136 ext/nkf/nkf-utf8/nkf.c             unbuf_f = FALSE;
FALSE            1181 ext/nkf/nkf-utf8/nkf.c             binmode_f = FALSE;
FALSE            1263 ext/nkf/nkf-utf8/nkf.c             x0201_f = FALSE;    /* No X0201->X0208 conversion */
FALSE            1309 ext/nkf/nkf-utf8/nkf.c                 mime_decode_f = FALSE;
FALSE            1310 ext/nkf/nkf-utf8/nkf.c                 mime_f = FALSE; cp++;
FALSE            1504 ext/nkf/nkf-utf8/nkf.c     if (iconv == ptr->iconv_func) set_iconv(FALSE, 0);
FALSE            1924 ext/nkf/nkf-utf8/nkf.c         set_iconv(FALSE, e_iconv);
FALSE            1945 ext/nkf/nkf-utf8/nkf.c     int is_8bit = FALSE;
FALSE            1953 ext/nkf/nkf-utf8/nkf.c     shift_mode = FALSE;
FALSE            2101 ext/nkf/nkf-utf8/nkf.c                 shift_mode = FALSE;
FALSE            2119 ext/nkf/nkf-utf8/nkf.c                         shift_mode = FALSE;
FALSE            2136 ext/nkf/nkf-utf8/nkf.c                             shift_mode = FALSE;
FALSE            2141 ext/nkf/nkf-utf8/nkf.c                             shift_mode = FALSE;
FALSE            2155 ext/nkf/nkf-utf8/nkf.c                         shift_mode = FALSE;
FALSE            2176 ext/nkf/nkf-utf8/nkf.c                             input_mode = ASCII; shift_mode = FALSE;
FALSE            2179 ext/nkf/nkf-utf8/nkf.c                             input_mode = ASCII; shift_mode = FALSE;
FALSE            2207 ext/nkf/nkf-utf8/nkf.c                 input_mode = ASCII; set_iconv(FALSE, 0);
FALSE            2318 ext/nkf/nkf-utf8/nkf.c         set_iconv(FALSE, result->iconv_func);
FALSE            2905 ext/nkf/nkf-utf8/nkf.c             set_iconv(FALSE, 0);
FALSE            3014 ext/nkf/nkf-utf8/nkf.c             set_iconv(FALSE, 0);
FALSE            3641 ext/nkf/nkf-utf8/nkf.c     if(mime_iconv_back)set_iconv(FALSE, mime_iconv_back);
FALSE            3654 ext/nkf/nkf-utf8/nkf.c     mime_decode_mode = FALSE;
FALSE            3681 ext/nkf/nkf-utf8/nkf.c     set_iconv(FALSE, mime_priority_func[j]);
FALSE            3757 ext/nkf/nkf-utf8/nkf.c                 mime_decode_mode = FALSE;
FALSE            4028 ext/nkf/nkf-utf8/nkf.c     if (mime_decode_mode==1 ||mime_decode_mode==FALSE) {
FALSE            4029 ext/nkf/nkf-utf8/nkf.c 	mime_decode_mode=FALSE;
FALSE            4037 ext/nkf/nkf-utf8/nkf.c         exit_mode = FALSE;
FALSE            4141 ext/nkf/nkf-utf8/nkf.c         mime_decode_mode = FALSE;
FALSE            4403 ext/nkf/nkf-utf8/nkf.c     mimeout_preserve_space = FALSE;
FALSE            4732 ext/nkf/nkf-utf8/nkf.c     unbuf_f = FALSE;
FALSE            4733 ext/nkf/nkf-utf8/nkf.c     estab_f = FALSE;
FALSE            4734 ext/nkf/nkf-utf8/nkf.c     nop_f = FALSE;
FALSE            4736 ext/nkf/nkf-utf8/nkf.c     rot_f = FALSE;
FALSE            4737 ext/nkf/nkf-utf8/nkf.c     hira_f = FALSE;
FALSE            4738 ext/nkf/nkf-utf8/nkf.c     input_f = FALSE;
FALSE            4739 ext/nkf/nkf-utf8/nkf.c     alpha_f = FALSE;
FALSE            4741 ext/nkf/nkf-utf8/nkf.c     mime_decode_f = FALSE;
FALSE            4742 ext/nkf/nkf-utf8/nkf.c     mimebuf_f = FALSE;
FALSE            4743 ext/nkf/nkf-utf8/nkf.c     broken_f = FALSE;
FALSE            4744 ext/nkf/nkf-utf8/nkf.c     iso8859_f = FALSE;
FALSE            4745 ext/nkf/nkf-utf8/nkf.c     mimeout_f = FALSE;
FALSE            4751 ext/nkf/nkf-utf8/nkf.c     iso2022jp_f = FALSE;
FALSE            4753 ext/nkf/nkf-utf8/nkf.c     internal_unicode_f = FALSE;
FALSE            4758 ext/nkf/nkf-utf8/nkf.c     ms_ucs_map_f = FALSE;
FALSE            4761 ext/nkf/nkf-utf8/nkf.c     nfc_f = FALSE;
FALSE            4764 ext/nkf/nkf-utf8/nkf.c     cap_f = FALSE;
FALSE            4765 ext/nkf/nkf-utf8/nkf.c     url_f = FALSE;
FALSE            4766 ext/nkf/nkf-utf8/nkf.c     numchar_f = FALSE;
FALSE            4769 ext/nkf/nkf-utf8/nkf.c     noout_f = FALSE;
FALSE            4770 ext/nkf/nkf-utf8/nkf.c     debug_f = FALSE;
FALSE            4772 ext/nkf/nkf-utf8/nkf.c     guess_f = FALSE;
FALSE            4773 ext/nkf/nkf-utf8/nkf.c     is_inputcode_mixed = FALSE;
FALSE            4774 ext/nkf/nkf-utf8/nkf.c     is_inputcode_set   = FALSE;
FALSE            4796 ext/nkf/nkf-utf8/nkf.c     fold_preserve_f = FALSE;
FALSE            4797 ext/nkf/nkf-utf8/nkf.c     fold_f = FALSE;
FALSE            4823 ext/nkf/nkf-utf8/nkf.c     shift_mode =  FALSE;
FALSE            4824 ext/nkf/nkf-utf8/nkf.c     mime_decode_mode = FALSE;
FALSE            4825 ext/nkf/nkf-utf8/nkf.c     file_out = FALSE;
FALSE             240 ext/nkf/nkf.c    guess_f = FALSE;
FALSE            1391 ext/win32ole/win32ole.c     BOOL found = FALSE;
FALSE            3263 ext/win32ole/win32ole.c         guid = ole_wc2vstr(bstr, FALSE);
FALSE            4326 ext/win32ole/win32ole.c         guid = ole_wc2vstr(bstr, FALSE);
FALSE            6168 ext/win32ole/win32ole.c static BOOL g_IsEventSinkVtblInitialized = FALSE;
FALSE            6278 ext/win32ole/win32ole.c     *is_default = FALSE;
FALSE            6289 ext/win32ole/win32ole.c             *is_default = FALSE;
FALSE            6331 ext/win32ole/win32ole.c     BOOL is_default_handler = FALSE;
FALSE            6442 ext/win32ole/win32ole.c     BOOL is_found = FALSE;
FALSE              99 missing/strtod.c     int sign, expSign = FALSE;
FALSE             134 missing/strtod.c 	sign = FALSE;
FALSE             220 missing/strtod.c 	    expSign = FALSE;
FALSE             244 missing/strtod.c 	expSign = FALSE;
FALSE             637 regenc.c           return FALSE;
FALSE             687 regenc.c         return FALSE;
FALSE             750 regenc.c             return FALSE;
FALSE             755 regenc.c         return FALSE;
FALSE             856 regenc.c             return (ONIGENC_CODE_TO_MBCLEN(enc, code) > 1 ? TRUE : FALSE);
FALSE             859 regenc.c           if (ctype == 0) return FALSE;
FALSE             865 regenc.c           return FALSE;
FALSE             876 regenc.c             return (ONIGENC_CODE_TO_MBCLEN(enc, code) > 1 ? TRUE : FALSE);
FALSE             879 regenc.c           if (ctype == 0) return FALSE;
FALSE             885 regenc.c           return FALSE;
FALSE             954 regenc.c           return (code < 128 ? TRUE : FALSE);
FALSE            1006 regenc.c         return FALSE;
FALSE              45 regenc.h       #ifndef FALSE
FALSE             174 sjis.c               return (sjis_code_to_mbclen(code) > 1 ? TRUE : FALSE);
FALSE             178 sjis.c             if (ctype == 0) return FALSE;
FALSE             184 sjis.c             return FALSE;
FALSE             214 sjis.c           return (SJIS_ISMB_TRAIL(c) ? FALSE : TRUE);
FALSE             290 utf8.c                     if (c == (UChar )'\227') return FALSE;
FALSE             294 utf8.c                     if (c == (UChar )'\267') return FALSE;
FALSE             306 utf8.c           return FALSE;
FALSE            3666 utf8.c             return FALSE;
FALSE            3672 utf8.c             return FALSE;
FALSE            3695 utf8.c           return FALSE;
FALSE             723 util.c             int sign, expSign = FALSE;
FALSE             738 util.c             int hasPoint = FALSE;	/* Decimal point exists. */
FALSE             739 util.c             int hasDigit = FALSE;	/* I or F exists. */
FALSE             762 util.c         	sign = FALSE;
FALSE             849 util.c         		expSign = FALSE;
FALSE             885 util.c         	    expSign = FALSE;
FALSE             905 util.c         	    expSign = FALSE;
FALSE              68 win32/win32.c  # define CreateSignal() CreateEvent(NULL, FALSE, FALSE, NULL);
FALSE             240 win32/win32.c  			 0, FALSE, DUPLICATE_SAME_ACCESS))
FALSE             348 win32/win32.c  	f = FALSE;
FALSE             700 win32/win32.c  	reading = FALSE;
FALSE             706 win32/win32.c  	writing = FALSE;
FALSE             724 win32/win32.c  				 &hDupFile, 0, FALSE,
FALSE             741 win32/win32.c  				 FALSE, DUPLICATE_SAME_ACCESS)) {
FALSE             757 win32/win32.c  				 FALSE, DUPLICATE_SAME_ACCESS)) {
FALSE            1101 win32/win32.c      return FALSE;
FALSE            1716 win32/win32.c  		result = FALSE;
FALSE            2851 win32/win32.c  	ret = WaitForMultipleEvents(count + 1, events, FALSE, timeout, TRUE);
FALSE            2966 win32/win32.c  		OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, (DWORD)pid);
FALSE            2996 win32/win32.c  	    HANDLE hProc = OpenProcess(PROCESS_TERMINATE, FALSE, (DWORD)pid);
FALSE            3374 win32/win32.c      ret = WaitForMultipleEvents(count, events, FALSE, timeout, TRUE);
FALSE            3493 win32/win32.c      if (GetCurrentThreadId() == main_thread.id) return FALSE;
FALSE            3510 win32/win32.c  	    interrupt_done = CreateEvent(NULL, FALSE, FALSE, NULL);
FALSE            3660 win32/win32.c      BOOL interrupted = FALSE;
FALSE            3904 win32/win32.c  	if (CreateDirectory(path, NULL) == FALSE) {
FALSE            3926 win32/win32.c  	if (RemoveDirectory(path) == FALSE) {
FALSE            3946 win32/win32.c  	if (DeleteFile(path) == FALSE) {
FALSE              83 win32/win32.h  #define rb_w32_iswin95()  FALSE
FALSE             146 wince/io_wce.c 	if( b==FALSE )
FALSE             165 wince/io_wce.c 	return b==FALSE ? -1 : 0;
FALSE             214 wince/wince.c  		return FALSE;
FALSE             236 wince/wince.c  	return FALSE;
FALSE             259 wince/wince.c  	return FALSE;
FALSE             267 wince/wince.c  	return FALSE;
FALSE             274 wince/wince.c  	return FALSE;
FALSE             281 wince/wince.c  	return FALSE;
FALSE             484 wince/wince.c  	return FALSE;
FALSE             495 wince/wince.c  	return FALSE;


FDEV

FDEV             1629 win32/win32.c      fileflags = FDEV;
FDEV             3965 win32/win32.c      if (!(_osfile(fd) & FDEV)) {


FD_CLR

FD_CLR           9638 eval.c             FD_CLR(n, fds->fdset);
FD_CLR           10439 eval.c         		FD_CLR(i, src);
FD_CLR           10443 eval.c         		FD_CLR(i, dst);
FD_CLR           10458 eval.c         	    FD_CLR(i, src);
FD_CLR           10632 eval.c         		    FD_CLR(th->fd, &readfds);
FD_CLR            187 intern.h       #define rb_fd_clr(n, f)	FD_CLR(n, f)


FD_ISSET

FD_ISSET         9647 eval.c             return FD_ISSET(n, fds->fdset) != 0; /* "!= 0" avoids BSD bug */
FD_ISSET         10364 eval.c         	     (FD_ISSET(fd, &th->readfds) ||
FD_ISSET         10365 eval.c         	      FD_ISSET(fd, &th->writefds) ||
FD_ISSET         10366 eval.c         	      FD_ISSET(fd, &th->exceptfds)))) {
FD_ISSET         10407 eval.c         	if (FD_ISSET(i, src)) {
FD_ISSET         10422 eval.c         	if (FD_ISSET(i, src) && FD_ISSET(i, dst)) {
FD_ISSET         10436 eval.c         	if (FD_ISSET(i, dst)) {
FD_ISSET         10437 eval.c         	    if (FD_ISSET(i, src)) {
FD_ISSET         10457 eval.c         	if (FD_ISSET(i, src) && !FD_ISSET(i, dst)) {
FD_ISSET         10630 eval.c         		if ((th->wait_for&WAIT_FD) && FD_ISSET(th->fd, &readfds)) {
FD_ISSET          188 intern.h       #define rb_fd_isset(n, f) FD_ISSET(n, f)
FD_ISSET           32 x68/select.c   #define XFD_ISSET(fd,fds) ((fds) && FD_ISSET ((fd), (fds)))


FD_PASSING_BY_MSG_ACCRIGHTS

FD_PASSING_BY_MSG_ACCRIGHTS 1747 ext/socket/socket.c #if defined(HAVE_SENDMSG) && (FD_PASSING_BY_MSG_CONTROL || FD_PASSING_BY_MSG_ACCRIGHTS)
FD_PASSING_BY_MSG_ACCRIGHTS 1814 ext/socket/socket.c #if defined(HAVE_RECVMSG) && (FD_PASSING_BY_MSG_CONTROL || FD_PASSING_BY_MSG_ACCRIGHTS)


FD_PASSING_BY_MSG_CONTROL

FD_PASSING_BY_MSG_CONTROL 1747 ext/socket/socket.c #if defined(HAVE_SENDMSG) && (FD_PASSING_BY_MSG_CONTROL || FD_PASSING_BY_MSG_ACCRIGHTS)
FD_PASSING_BY_MSG_CONTROL 1754 ext/socket/socket.c #if FD_PASSING_BY_MSG_CONTROL
FD_PASSING_BY_MSG_CONTROL 1785 ext/socket/socket.c #if FD_PASSING_BY_MSG_CONTROL
FD_PASSING_BY_MSG_CONTROL 1814 ext/socket/socket.c #if defined(HAVE_RECVMSG) && (FD_PASSING_BY_MSG_CONTROL || FD_PASSING_BY_MSG_ACCRIGHTS)
FD_PASSING_BY_MSG_CONTROL 1822 ext/socket/socket.c #if FD_PASSING_BY_MSG_CONTROL
FD_PASSING_BY_MSG_CONTROL 1847 ext/socket/socket.c #if FD_PASSING_BY_MSG_CONTROL
FD_PASSING_BY_MSG_CONTROL 1864 ext/socket/socket.c #if FD_PASSING_BY_MSG_CONTROL
FD_PASSING_BY_MSG_CONTROL 1893 ext/socket/socket.c #if FD_PASSING_BY_MSG_CONTROL


FD_SET

FD_SET           9629 eval.c             FD_SET(n, fds->fdset);
FD_SET           10409 eval.c         	    FD_SET(i, dst);
FD_SET           10523 eval.c         	    FD_SET(th->fd, &readfds);
FD_SET           10753 eval.c             FD_SET(fd, &curr_thread->writefds);
FD_SET            186 intern.h       #define rb_fd_set(n, f)	FD_SET(n, f)
FD_SET             89 x68/select.c   		    FD_SET (fd, &oread);
FD_SET             95 x68/select.c   		    FD_SET (fd, &owrite);
FD_SET            104 x68/select.c   		    FD_SET (fd, &oread);
FD_SET            110 x68/select.c   		    FD_SET (fd, &owrite);
FD_SET            119 x68/select.c   		    FD_SET (fd, &oread);
FD_SET            125 x68/select.c   		    FD_SET (fd, &owrite);


FD_ZERO

FD_ZERO          9583 eval.c             FD_ZERO(fds->fdset);
FD_ZERO          9601 eval.c         	FD_ZERO(fds->fdset);
FD_ZERO          10505 eval.c             FD_ZERO(&readfds);
FD_ZERO          10506 eval.c             FD_ZERO(&writefds);
FD_ZERO          10507 eval.c             FD_ZERO(&exceptfds);
FD_ZERO          10751 eval.c             FD_ZERO(&curr_thread->readfds);
FD_ZERO          10752 eval.c             FD_ZERO(&curr_thread->writefds);
FD_ZERO          10754 eval.c             FD_ZERO(&curr_thread->exceptfds);
FD_ZERO          10890 eval.c             else FD_ZERO(&curr_thread->readfds);
FD_ZERO          10892 eval.c             else FD_ZERO(&curr_thread->writefds);
FD_ZERO          10894 eval.c             else FD_ZERO(&curr_thread->exceptfds);
FD_ZERO           185 intern.h       #define rb_fd_zero(f)	FD_ZERO(f)
FD_ZERO           191 intern.h       #define rb_fd_init(f)	FD_ZERO(f)
FD_ZERO            53 x68/select.c     FD_ZERO (&oread);
FD_ZERO            54 x68/select.c     FD_ZERO (&owrite);
FD_ZERO            55 x68/select.c     FD_ZERO (&oexcept);


FF

FF                161 ext/digest/rmd160/rmd160.c 	FF(aa, bb, cc, dd, ee, block[ 0], 11);
FF                162 ext/digest/rmd160/rmd160.c 	FF(ee, aa, bb, cc, dd, block[ 1], 14);
FF                163 ext/digest/rmd160/rmd160.c 	FF(dd, ee, aa, bb, cc, block[ 2], 15);
FF                164 ext/digest/rmd160/rmd160.c 	FF(cc, dd, ee, aa, bb, block[ 3], 12);
FF                165 ext/digest/rmd160/rmd160.c 	FF(bb, cc, dd, ee, aa, block[ 4],  5);
FF                166 ext/digest/rmd160/rmd160.c 	FF(aa, bb, cc, dd, ee, block[ 5],  8);
FF                167 ext/digest/rmd160/rmd160.c 	FF(ee, aa, bb, cc, dd, block[ 6],  7);
FF                168 ext/digest/rmd160/rmd160.c 	FF(dd, ee, aa, bb, cc, block[ 7],  9);
FF                169 ext/digest/rmd160/rmd160.c 	FF(cc, dd, ee, aa, bb, block[ 8], 11);
FF                170 ext/digest/rmd160/rmd160.c 	FF(bb, cc, dd, ee, aa, block[ 9], 13);
FF                171 ext/digest/rmd160/rmd160.c 	FF(aa, bb, cc, dd, ee, block[10], 14);
FF                172 ext/digest/rmd160/rmd160.c 	FF(ee, aa, bb, cc, dd, block[11], 15);
FF                173 ext/digest/rmd160/rmd160.c 	FF(dd, ee, aa, bb, cc, block[12],  6);
FF                174 ext/digest/rmd160/rmd160.c 	FF(cc, dd, ee, aa, bb, block[13],  7);
FF                175 ext/digest/rmd160/rmd160.c 	FF(bb, cc, dd, ee, aa, block[14],  9);
FF                176 ext/digest/rmd160/rmd160.c 	FF(aa, bb, cc, dd, ee, block[15],  8);


FFF

FFF               323 ext/digest/rmd160/rmd160.c 	FFF(bbb, ccc, ddd, eee, aaa, block[12] ,  8);
FFF               324 ext/digest/rmd160/rmd160.c 	FFF(aaa, bbb, ccc, ddd, eee, block[15] ,  5);
FFF               325 ext/digest/rmd160/rmd160.c 	FFF(eee, aaa, bbb, ccc, ddd, block[10] , 12);
FFF               326 ext/digest/rmd160/rmd160.c 	FFF(ddd, eee, aaa, bbb, ccc, block[ 4] ,  9);
FFF               327 ext/digest/rmd160/rmd160.c 	FFF(ccc, ddd, eee, aaa, bbb, block[ 1] , 12);
FFF               328 ext/digest/rmd160/rmd160.c 	FFF(bbb, ccc, ddd, eee, aaa, block[ 5] ,  5);
FFF               329 ext/digest/rmd160/rmd160.c 	FFF(aaa, bbb, ccc, ddd, eee, block[ 8] , 14);
FFF               330 ext/digest/rmd160/rmd160.c 	FFF(eee, aaa, bbb, ccc, ddd, block[ 7] ,  6);
FFF               331 ext/digest/rmd160/rmd160.c 	FFF(ddd, eee, aaa, bbb, ccc, block[ 6] ,  8);
FFF               332 ext/digest/rmd160/rmd160.c 	FFF(ccc, ddd, eee, aaa, bbb, block[ 2] , 13);
FFF               333 ext/digest/rmd160/rmd160.c 	FFF(bbb, ccc, ddd, eee, aaa, block[13] ,  6);
FFF               334 ext/digest/rmd160/rmd160.c 	FFF(aaa, bbb, ccc, ddd, eee, block[14] ,  5);
FFF               335 ext/digest/rmd160/rmd160.c 	FFF(eee, aaa, bbb, ccc, ddd, block[ 0] , 15);
FFF               336 ext/digest/rmd160/rmd160.c 	FFF(ddd, eee, aaa, bbb, ccc, block[ 3] , 13);
FFF               337 ext/digest/rmd160/rmd160.c 	FFF(ccc, ddd, eee, aaa, bbb, block[ 9] , 11);
FFF               338 ext/digest/rmd160/rmd160.c 	FFF(bbb, ccc, ddd, eee, aaa, block[11] , 11);


FILE

FILE              155 error.c            FILE *out = stderr;
FILE             2952 ext/bigdecimal/bigdecimal.c VPrint(FILE *fp, char *cntl_chr, Real *a)
FILE              210 ext/bigdecimal/bigdecimal.h VP_EXPORT int VPrint(FILE *fp,char *cntl_chr,Real *a);
FILE              422 ext/dl/cptr.c  	FILE *fp;
FILE              294 ext/nkf/nkf-utf8/nkf.c STATIC  int     noconvert PROTO((FILE *f));
FILE              296 ext/nkf/nkf-utf8/nkf.c STATIC  int     kanji_convert PROTO((FILE *f));
FILE              297 ext/nkf/nkf-utf8/nkf.c STATIC  int     h_conv PROTO((FILE *f,int c2,int c1));
FILE              333 ext/nkf/nkf-utf8/nkf.c STATIC  int     std_getc PROTO((FILE *f));
FILE              334 ext/nkf/nkf-utf8/nkf.c STATIC  int     std_ungetc PROTO((int c,FILE *f));
FILE              336 ext/nkf/nkf-utf8/nkf.c STATIC  int     broken_getc PROTO((FILE *f));
FILE              337 ext/nkf/nkf-utf8/nkf.c STATIC  int     broken_ungetc PROTO((int c,FILE *f));
FILE              339 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_begin PROTO((FILE *f));
FILE              340 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_getc PROTO((FILE *f));
FILE              341 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_ungetc PROTO((int c,FILE *f));
FILE              343 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_begin_strict PROTO((FILE *f));
FILE              344 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_getc_buf PROTO((FILE *f));
FILE              345 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_ungetc_buf  PROTO((int c,FILE *f));
FILE              346 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_integrity PROTO((FILE *f,const unsigned char *p));
FILE              414 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_nfc_getc)PROTO((FILE *)) = std_getc; /* input of ugetc */
FILE              415 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_nfc_ungetc)PROTO((int c ,FILE *f)) = std_ungetc;
FILE              416 ext/nkf/nkf-utf8/nkf.c STATIC int nfc_getc PROTO((FILE *f));
FILE              417 ext/nkf/nkf-utf8/nkf.c STATIC int nfc_ungetc PROTO((int c,FILE *f));
FILE              422 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_cgetc)PROTO((FILE *)) = std_getc; /* input of cgetc */
FILE              423 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_cungetc)PROTO((int c ,FILE *f)) = std_ungetc;
FILE              424 ext/nkf/nkf-utf8/nkf.c STATIC int cap_getc PROTO((FILE *f));
FILE              425 ext/nkf/nkf-utf8/nkf.c STATIC int cap_ungetc PROTO((int c,FILE *f));
FILE              428 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_ugetc)PROTO((FILE *)) = std_getc; /* input of ugetc */
FILE              429 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_uungetc)PROTO((int c ,FILE *f)) = std_ungetc;
FILE              430 ext/nkf/nkf-utf8/nkf.c STATIC int url_getc PROTO((FILE *f));
FILE              431 ext/nkf/nkf-utf8/nkf.c STATIC int url_ungetc PROTO((int c,FILE *f));
FILE              438 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_ngetc)PROTO((FILE *)) = std_getc; /* input of ugetc */
FILE              439 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_nungetc)PROTO((int c ,FILE *f)) = std_ungetc;
FILE              440 ext/nkf/nkf-utf8/nkf.c STATIC int numchar_getc PROTO((FILE *f));
FILE              441 ext/nkf/nkf-utf8/nkf.c STATIC int numchar_ungetc PROTO((int c,FILE *f));
FILE              560 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_getc)PROTO((FILE *f)) = std_getc; /* general input */
FILE              561 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_ungetc)PROTO((int c,FILE *f)) =std_ungetc;
FILE              563 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_bgetc)PROTO((FILE *)) = std_getc; /* input of mgetc */
FILE              564 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_bungetc)PROTO((int c ,FILE *f)) = std_ungetc;
FILE              568 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_mgetc)PROTO((FILE *)) = std_getc; /* input of mgetc */
FILE              569 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_mungetc)PROTO((int c ,FILE *f)) = std_ungetc;
FILE              572 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_mgetc_buf)PROTO((FILE *)) = std_getc; /* input of mgetc_buf */
FILE              573 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_mungetc_buf)PROTO((int c,FILE *f)) = std_ungetc;
FILE              696 ext/nkf/nkf-utf8/nkf.c     FILE  *fin;
FILE             1791 ext/nkf/nkf-utf8/nkf.c FILE *f;
FILE             1803 ext/nkf/nkf-utf8/nkf.c FILE *f;
FILE             1825 ext/nkf/nkf-utf8/nkf.c     FILE  *f;
FILE             1941 ext/nkf/nkf-utf8/nkf.c     FILE  *f;
FILE             2279 ext/nkf/nkf-utf8/nkf.c     FILE  *f;
FILE             3123 ext/nkf/nkf-utf8/nkf.c FILE *f;
FILE             3164 ext/nkf/nkf-utf8/nkf.c FILE *f;
FILE             3647 ext/nkf/nkf-utf8/nkf.c FILE *f;
FILE             3698 ext/nkf/nkf-utf8/nkf.c FILE *f;
FILE             3708 ext/nkf/nkf-utf8/nkf.c FILE *f;
FILE             3720 ext/nkf/nkf-utf8/nkf.c FILE *f;
FILE             3837 ext/nkf/nkf-utf8/nkf.c int hex_getc(int ch, FILE *f, int (*g)(FILE *f), int (*u)(int c, FILE *f))
FILE             3842 ext/nkf/nkf-utf8/nkf.c      FILE *f;
FILE             3868 ext/nkf/nkf-utf8/nkf.c      FILE *f;
FILE             3876 ext/nkf/nkf-utf8/nkf.c      FILE *f;
FILE             3883 ext/nkf/nkf-utf8/nkf.c      FILE *f;
FILE             3891 ext/nkf/nkf-utf8/nkf.c      FILE *f;
FILE             3900 ext/nkf/nkf-utf8/nkf.c      FILE *f;
FILE             3956 ext/nkf/nkf-utf8/nkf.c      FILE *f;
FILE             3967 ext/nkf/nkf-utf8/nkf.c      FILE *f;
FILE             4007 ext/nkf/nkf-utf8/nkf.c      FILE *f;
FILE             4016 ext/nkf/nkf-utf8/nkf.c FILE *f;
FILE             4283 ext/nkf/nkf-utf8/nkf.c FILE  *f;
FILE             4291 ext/nkf/nkf-utf8/nkf.c     FILE *f;
FILE               23 ext/openssl/ossl_bio.c 	FILE *fp;
FILE               67 ext/openssl/ossl_pkey.c     FILE *fp;
FILE               62 ext/openssl/ossl_x509cert.c     FILE *fp;
FILE              845 ext/syck/gram.c yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
FILE              849 ext/syck/gram.c     FILE *yyoutput;
FILE              298 ext/syck/syck.c syck_parser_file( SyckParser *p, FILE *fp, SyckIoFileRead read )
FILE              197 ext/syck/syck.h     FILE *ptr;
FILE              402 ext/syck/syck.h void syck_parser_file( SyckParser *, FILE *, SyckIoFileRead );
FILE              331 io.c           rb_read_pending(FILE *fp)
FILE              343 io.c           rb_read_check(FILE *fp)
FILE              614 io.c           rb_io_fwrite(const char *ptr, long len, FILE *f)
FILE             1166 io.c           rb_io_fread(char *ptr, long len, FILE *f)
FILE             1892 io.c           rb_getc(FILE *f)
FILE             2575 io.c           FILE *
FILE             2578 io.c               FILE *file;
FILE             2600 io.c           FILE *
FILE             2603 io.c               FILE *file;
FILE             2841 io.c               FILE *fp = 0;
FILE             3863 io.c           prep_stdio(FILE *f, int mode, VALUE klass, const char *path)
FILE             3874 io.c           FILE *rb_io_stdio_file(OpenFile *fptr)
FILE              237 missing/vsnprintf.c 	register FILE *fp;
FILE              318 missing/vsnprintf.c 	FILE *fp;
FILE              341 missing/vsnprintf.c 	register FILE *fp;
FILE              468 missing/vsnprintf.c 	FILE *fp;
FILE             1094 missing/vsnprintf.c 	FILE f;
FILE             1125 missing/vsnprintf.c 	FILE f;
FILE             4373 regcomp.c      static void print_optimize_info(FILE* f, regex_t* reg);
FILE             4450 regcomp.c      print_distance_range(FILE* f, OnigDistance a, OnigDistance b)
FILE             4466 regcomp.c      print_anchor(FILE* f, int anchor)
FILE             4515 regcomp.c      print_optimize_info(FILE* f, regex_t* reg)
FILE             4721 regcomp.c      static void print_compiled_byte_code_list P_((FILE* f, regex_t* reg));
FILE             4724 regcomp.c      static void print_tree P_((FILE* f, Node* node));
FILE             5125 regcomp.c      Indent(FILE* f, int indent)
FILE             5132 regcomp.c      p_string(FILE* f, int len, UChar* s)
FILE             5139 regcomp.c      p_len_string(FILE* f, LengthType len, int mb_len, UChar* s)
FILE             5148 regcomp.c      onig_print_compiled_byte_code(FILE* f, UChar* bp, UChar** nextp,
FILE             5356 regcomp.c      print_compiled_byte_code_list(FILE* f, regex_t* reg)
FILE             5380 regcomp.c      print_indent_tree(FILE* f, Node* node, int indent)
FILE             5542 regcomp.c      print_tree(FILE* f, Node* node)
FILE             1122 regexec.c      onig_print_statistics(FILE* f)
FILE              776 regint.h       extern void onig_print_compiled_byte_code P_((FILE* f, UChar* bp, UChar** nextp, OnigEncoding enc));
FILE              780 regint.h       extern void onig_print_statistics P_((FILE* f));
FILE              401 regparse.c       FILE* fp = (FILE* )arg;
FILE              419 regparse.c     onig_print_names(FILE* fp, regex_t* reg)
FILE              577 regparse.c     onig_print_names(FILE* fp, regex_t* reg)
FILE              312 regparse.h     extern int onig_print_names(FILE*, regex_t*);
FILE              859 ruby.c         	FILE *fp = fopen(fname, "r");
FILE               25 rubyio.h           FILE *stdio_file;		/* stdio ptr for read/write if available */
FILE               82 rubyio.h       FILE *rb_io_stdio_file(OpenFile *fptr);
FILE               84 rubyio.h       FILE *rb_fopen(const char*, const char*);
FILE               85 rubyio.h       FILE *rb_fdopen(int, const char*);
FILE              102 rubyio.h       void rb_read_check(FILE*);
FILE              104 rubyio.h       DEPRECATED(int rb_getc(FILE*));
FILE              105 rubyio.h       DEPRECATED(long rb_io_fread(char *, long, FILE *));
FILE              106 rubyio.h       DEPRECATED(long rb_io_fwrite(const char *, long, FILE *));
FILE              107 rubyio.h       DEPRECATED(int rb_read_pending(FILE*));
FILE              136 st.c               FILE *f = fopen("/tmp/col", "w");
FILE             3589 win32/win32.c  rb_w32_getc(FILE* stream)
FILE             3614 win32/win32.c  rb_w32_putc(int c, FILE* stream)
FILE             3778 win32/win32.c  rb_w32_fclose(FILE *fp)
FILE             3981 win32/win32.c      FILE *f;
FILE             3989 win32/win32.c  FILE *
FILE             3992 win32/win32.c      FILE *f = (errno = 0, fopen(path, mode));
FILE             4000 win32/win32.c  FILE *
FILE             4003 win32/win32.c      FILE *f = (errno = 0, _fdopen(handle, (char *)type));
FILE             4013 win32/win32.c  FILE *
FILE             4016 win32/win32.c      FILE *f = (errno = 0, _fsopen(path, mode, shflags));
FILE              224 win32/win32.h  extern FILE *rb_w32_fopen(const char *, const char *);
FILE              225 win32/win32.h  extern FILE *rb_w32_fdopen(int, const char *);
FILE              226 win32/win32.h  extern FILE *rb_w32_fsopen(const char *, const char *, int);
FILE              489 win32/win32.h  int  rb_w32_putc(int, FILE*);
FILE              490 win32/win32.h  int  rb_w32_getc(FILE*);
FILE              492 win32/win32.h  int  rb_w32_fclose(FILE*);
FILE                9 wince/stdio.c  FILE *freopen(const char *filename, const char *mode, FILE *file)
FILE               12 wince/stdio.c  	FILE *fp;
FILE               25 wince/stdio.c  FILE *fdopen( int handle, const char *mode )
FILE               28 wince/stdio.c  	FILE* fp;
FILE              513 wince/wince.c  FILE *wce_fopen( const char *fname, const char *mode )
FILE              517 wince/wince.c  	FILE* fp = _tfopen(tfname, tmode);
FILE              102 wince/wince.h  FILE *freopen(const char *filename, const char *mode, FILE *file);
FILE              103 wince/wince.h  FILE *fdopen( int handle, const char *mode );


FINAL_TOKEN

FINAL_TOKEN        30 ext/racc/cparse/cparse.c #define vFINAL_TOKEN    INT2FIX(FINAL_TOKEN)
FINAL_TOKEN       371 ext/racc/cparse/cparse.c     v->t = INT2FIX(FINAL_TOKEN + 1);   /* must not init to FINAL_TOKEN */


FIND_ENTRY

FIND_ENTRY        241 st.c               FIND_ENTRY(table, ptr, hash_val, bin_pos);
FIND_ENTRY        277 st.c               FIND_ENTRY(table, ptr, hash_val, bin_pos);


FIONREAD_POSSIBLE_P

FIONREAD_POSSIBLE_P   65 ext/io/wait/wait.c     if (!FIONREAD_POSSIBLE_P(fptr->fd)) return Qfalse;
FIONREAD_POSSIBLE_P  120 ext/io/wait/wait.c     if (!FIONREAD_POSSIBLE_P(fptr->fd)) return Qfalse;


FIX2INT

FIX2INT            25 compar.c           if (FIXNUM_P(val)) return FIX2INT(val);
FIX2INT           171 ext/Win32API/Win32API.c 	switch (FIX2INT(rb_ary_entry(obj_import, i))) {
FIX2INT           196 ext/Win32API/Win32API.c     switch (FIX2INT(obj_export)) {
FIX2INT           226 ext/bigdecimal/bigdecimal.c     f = (unsigned long)FIX2INT(which);
FIX2INT           252 ext/bigdecimal/bigdecimal.c         if(!VpIsRoundMode(FIX2INT(val))) {
FIX2INT           256 ext/bigdecimal/bigdecimal.c         fo = VpSetRoundMode((unsigned long)FIX2INT(val));
FIX2INT           289 ext/bigdecimal/bigdecimal.c     n = FIX2INT(v);
FIX2INT           935 ext/bigdecimal/bigdecimal.c         iLoc = FIX2INT(vLoc);
FIX2INT           939 ext/bigdecimal/bigdecimal.c         iLoc = FIX2INT(vLoc);
FIX2INT           941 ext/bigdecimal/bigdecimal.c         sw   = FIX2INT(vRound);
FIX2INT           972 ext/bigdecimal/bigdecimal.c         iLoc = FIX2INT(vLoc);
FIX2INT          1011 ext/bigdecimal/bigdecimal.c         iLoc = FIX2INT(vLoc);
FIX2INT          1036 ext/bigdecimal/bigdecimal.c         iLoc = FIX2INT(vLoc);
FIX2INT          1165 ext/bigdecimal/bigdecimal.c     n = FIX2INT(p);
FIX2INT          1229 ext/bigdecimal/bigdecimal.c         nf = FIX2INT(nFig);
FIX2INT           837 ext/gdbm/gdbm.c     optval = FIX2INT(val);
FIX2INT           355 ext/iconv/iconv.c 	    if (FIXNUM_P(str) && (i = FIX2INT(str)) <= 0xff) {
FIX2INT           426 ext/openssl/ossl_bn.c 	    top = FIX2INT(fill);				\
FIX2INT           110 ext/openssl/ossl_pkey_dh.c 	g = FIX2INT(gen);
FIX2INT           112 ext/openssl/ossl_pkey_dh.c     dh = dh_generate(FIX2INT(size), g);
FIX2INT           137 ext/openssl/ossl_pkey_dh.c 	    g = FIX2INT(gen);
FIX2INT           139 ext/openssl/ossl_pkey_dh.c 	if (!(dh = dh_generate(FIX2INT(arg), g))) {
FIX2INT           105 ext/openssl/ossl_pkey_dsa.c     DSA *dsa = dsa_generate(FIX2INT(size)); /* err handled by dsa_instance */
FIX2INT           130 ext/openssl/ossl_pkey_dsa.c 	if (!(dsa = dsa_generate(FIX2INT(arg)))) {
FIX2INT           121 ext/openssl/ossl_pkey_rsa.c 	rsa = rsa_generate(FIX2INT(arg), NIL_P(pass) ? RSA_F4 : NUM2INT(pass));
FIX2INT            65 ext/openssl/ossl_rand.c     str = rb_str_new(0, FIX2INT(len));
FIX2INT            66 ext/openssl/ossl_rand.c     if (!RAND_bytes(RSTRING(str)->ptr, FIX2INT(len))) {
FIX2INT            78 ext/openssl/ossl_rand.c     str = rb_str_new(0, FIX2INT(len));
FIX2INT            79 ext/openssl/ossl_rand.c     if (!RAND_pseudo_bytes(RSTRING(str)->ptr, FIX2INT(len))) {
FIX2INT           102 ext/openssl/ossl_rand.c     if (!RAND_egd_bytes(RSTRING(filename)->ptr, FIX2INT(len))) {
FIX2INT           454 ext/openssl/ossl_x509store.c     X509_STORE_CTX_set_error(ctx, FIX2INT(err));
FIX2INT           359 ext/socket/socket.c 	i = FIX2INT(val);
FIX2INT          1767 ext/socket/socket.c         fd = FIX2INT(val);
FIX2INT          2867 ext/socket/socket.c 	hints.ai_family = FIX2INT(family);
FIX2INT          2993 ext/socket/socket.c 	    hints.ai_family = FIX2INT(af);
FIX2INT           228 ext/stringio/stringio.c 	    int flags = FIX2INT(mode);
FIX2INT          2019 ext/syck/rubyext.c     int level = FIX2INT(rb_ivar_get(self, s_level)) + 1;
FIX2INT           159 ext/syslog/syslog.c     syslog_write(FIX2INT(pri), argc, argv);
FIX2INT           224 ext/syslog/syslog.c     return INT2FIX(LOG_MASK(FIX2INT(pri)));
FIX2INT           229 ext/syslog/syslog.c     return INT2FIX(LOG_UPTO(FIX2INT(pri)));
FIX2INT          1238 ext/tk/tcltklib.c     flag = FIX2INT(flag_val);
FIX2INT          2061 ext/tk/tcltklib.c         flags = FIX2INT(vflags);
FIX2INT          7028 ext/tk/tcltklib.c                                 FIX2INT(flag));
FIX2INT          7063 ext/tk/tcltklib.c                               FIX2INT(flag));
FIX2INT          7162 ext/tk/tcltklib.c                                 valobj, FIX2INT(flag));
FIX2INT          7200 ext/tk/tcltklib.c                               RSTRING(value)->ptr, FIX2INT(flag));
FIX2INT          7282 ext/tk/tcltklib.c                                       FIX2INT(flag));
FIX2INT          7285 ext/tk/tcltklib.c         if (FIX2INT(flag) & TCL_LEAVE_ERR_MSG) {
FIX2INT           455 ext/win32ole/win32ole.c     y = FIX2INT(rb_funcall(tmobj, rb_intern("year"), 0));
FIX2INT           456 ext/win32ole/win32ole.c     m = FIX2INT(rb_funcall(tmobj, rb_intern("month"), 0));
FIX2INT           457 ext/win32ole/win32ole.c     d = FIX2INT(rb_funcall(tmobj, rb_intern("mday"), 0));
FIX2INT           458 ext/win32ole/win32ole.c     hh = FIX2INT(rb_funcall(tmobj, rb_intern("hour"), 0));
FIX2INT           459 ext/win32ole/win32ole.c     mm = FIX2INT(rb_funcall(tmobj, rb_intern("min"), 0));
FIX2INT           460 ext/win32ole/win32ole.c     ss = FIX2INT(rb_funcall(tmobj, rb_intern("sec"), 0));
FIX2INT          2003 ext/win32ole/win32ole.c     UINT cp = FIX2INT(vcp);
FIX2INT          2422 ext/win32ole/win32ole.c         vt = (VARTYPE)FIX2INT(tp);
FIX2INT          5359 ext/win32ole/win32ole.c     if((FIX2INT(invkind) & INVOKE_PROPERTYGET) &&
FIX2INT          5360 ext/win32ole/win32ole.c        (FIX2INT(invkind) & INVOKE_PROPERTYPUT) ) {
FIX2INT          5362 ext/win32ole/win32ole.c     } else if(FIX2INT(invkind) & INVOKE_PROPERTYGET) {
FIX2INT          5364 ext/win32ole/win32ole.c     } else if(FIX2INT(invkind) & INVOKE_PROPERTYPUT) {
FIX2INT          5366 ext/win32ole/win32ole.c     } else if(FIX2INT(invkind) & INVOKE_PROPERTYPUTREF) {
FIX2INT          5368 ext/win32ole/win32ole.c     } else if(FIX2INT(invkind) & INVOKE_FUNC) {
FIX2INT          1022 ext/zlib/zlib.c     zstream_expand_buffer_into(z, FIX2INT(size));
FIX2INT          1114 ext/zlib/zlib.c     : ((void)Check_Type((val), T_FIXNUM), FIX2INT((val))))
FIX2INT          2553 ext/zlib/zlib.c 	gz->mtime = FIX2INT(mtime);
FIX2INT          2557 ext/zlib/zlib.c 	gz->mtime = FIXNUM_P(val) ? FIX2INT(val) : rb_big2ulong(val);
FIX2INT          1790 gc.c           	    args[2] = FIX2INT(RARRAY(final)->ptr[0]);
FIX2INT          3022 io.c           	mode = rb_io_modenum_mode(FIX2INT(pmode));
FIX2INT          3068 io.c           	    flags = FIX2INT(vmode);
FIX2INT          3132 io.c               else if (FIXNUM_P(vmode)) flags = FIX2INT(vmode);
FIX2INT           441 marshal.c      	w_long(FIX2INT(obj), arg);
FIX2INT           696 marshal.c      	if (FIXNUM_P(a1)) limit = FIX2INT(a1);
FIX2INT           760 marshal.c      	c = (unsigned char)FIX2INT(v);
FIX2INT          1582 numeric.c          return FIX2INT(val);
FIX2INT          1887 numeric.c      	return rb_big2str(rb_int2big(FIX2INT(x)), 2);
FIX2INT          2298 numeric.c      	return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) > 0 ? Qtrue : Qfalse;
FIX2INT          2325 numeric.c      	return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) >= 0 ? Qtrue : Qfalse;
FIX2INT          2352 numeric.c      	return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) < 0 ? Qtrue : Qfalse;
FIX2INT          2379 numeric.c      	return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) <= 0 ? Qtrue : Qfalse;
FIX2INT          2643 process.c      	    groups[i] = FIX2INT(g);
FIX2INT          2733 process.c          size_t  ngroups = FIX2INT(val);
FIX2INT           495 range.c        		return INT2NUM(FIX2INT(e)-1);
FIX2INT          1186 re.c               if (!NIL_P(rest) || !FIXNUM_P(idx) || FIX2INT(idx) < 0) {
FIX2INT          1189 re.c               return rb_reg_nth_match(FIX2INT(idx), match);
FIX2INT          1681 re.c           	    if (FIXNUM_P(argv[1])) flags = FIX2INT(argv[1]);
FIX2INT           271 ruby.h         #define NUM2INT(x) (FIXNUM_P(x)?FIX2INT(x):rb_num2int((VALUE)x))
FIX2INT           236 signal.c       	sig = FIX2INT(argv[0]);
FIX2INT           290 signal.c       	    if (kill(FIX2INT(argv[i]), sig) < 0)
FIX2INT           614 signal.c       	sig = FIX2INT(arg->sig);
FIX2INT           757 string.c       	int i = FIX2INT(str2);
FIX2INT          1034 string.c       	  int c = FIX2INT(sub);
FIX2INT          1152 string.c       	  int c = FIX2INT(sub);
FIX2INT          1624 string.c       	    RSTRING(str)->ptr[idx] = FIX2INT(val) & 0xff;
FIX2INT          2234 string.c       	if (memchr(RSTRING(str)->ptr, FIX2INT(arg), RSTRING(str)->len))


FIX2LONG

FIX2LONG          741 array.c        	return rb_ary_entry(ary, FIX2LONG(arg));
FIX2LONG         1071 array.c        	offset = FIX2LONG(argv[0]);
FIX2LONG         1644 array.c        	    rb_ary_push(result, (*func)(obj, FIX2LONG(argv[i])));
FIX2LONG          185 bignum.c       	q = FIX2LONG(val);
FIX2LONG          258 bignum.c       	val = rb_int2big(FIX2LONG(val));
FIX2LONG          884 bignum.c       	y = rb_int2big(FIX2LONG(y));
FIX2LONG          927 bignum.c       	y = rb_int2big(FIX2LONG(y));
FIX2LONG         1119 bignum.c       	y = rb_int2big(FIX2LONG(y));
FIX2LONG         1144 bignum.c       	y = rb_int2big(FIX2LONG(y));
FIX2LONG         1167 bignum.c       	y = rb_int2big(FIX2LONG(y));
FIX2LONG         1373 bignum.c       	y = rb_int2big(FIX2LONG(y));
FIX2LONG         1406 bignum.c       	y = rb_int2big(FIX2LONG(y));
FIX2LONG         1436 bignum.c       	y = rb_int2big(FIX2LONG(y));
FIX2LONG         1464 bignum.c       	y = rb_int2big(FIX2LONG(y));
FIX2LONG         1498 bignum.c       	dy = (double)FIX2LONG(y);
FIX2LONG         1546 bignum.c       	yy = FIX2LONG(y);
FIX2LONG         1588 bignum.c       	y = rb_int2big(FIX2LONG(y));
FIX2LONG         1643 bignum.c       	y = rb_int2big(FIX2LONG(y));
FIX2LONG         1701 bignum.c       	y = rb_int2big(FIX2LONG(y));
FIX2LONG         1906 bignum.c       	return rb_assoc_new(rb_int2big(FIX2LONG(y)), x);
FIX2LONG          106 ext/bigdecimal/bigdecimal.c         sprintf(szD, "%ld", FIX2LONG(v));
FIX2LONG          243 ext/openssl/ossl_x509req.c     if ((ver = FIX2LONG(version)) < 0) {
FIX2LONG          769 ext/socket/socket.c 	snprintf(pbuf, len, "%ld", FIX2LONG(port));
FIX2LONG         2853 ext/socket/socket.c 	snprintf(pbuf, sizeof(pbuf), "%ld", FIX2LONG(port));
FIX2LONG           93 hash.c         	return (int)FIX2LONG(hval);
FIX2LONG         3914 io.c           	    flags = FIX2LONG(mode);
FIX2LONG         4611 io.c           	narg = FIX2LONG(arg);
FIX2LONG          445 marshal.c      	    w_long(FIX2LONG(obj), arg);
FIX2LONG          448 marshal.c      	    w_object(rb_int2big(FIX2LONG(obj)), arg, limit);
FIX2LONG          546 numeric.c      	return rb_float_new(RFLOAT(x)->value + (double)FIX2LONG(y));
FIX2LONG          569 numeric.c      	return rb_float_new(RFLOAT(x)->value - (double)FIX2LONG(y));
FIX2LONG          592 numeric.c      	return rb_float_new(RFLOAT(x)->value * (double)FIX2LONG(y));
FIX2LONG          618 numeric.c      	f_y = FIX2LONG(y);
FIX2LONG          674 numeric.c      	fy = (double)FIX2LONG(y);
FIX2LONG          704 numeric.c      	fy = (double)FIX2LONG(y);
FIX2LONG          734 numeric.c              return rb_float_new(pow(RFLOAT(x)->value, (double)FIX2LONG(y)));
FIX2LONG          805 numeric.c      	b = FIX2LONG(y);
FIX2LONG          873 numeric.c      	b = (double)FIX2LONG(y);
FIX2LONG          905 numeric.c      	b = (double)FIX2LONG(y);
FIX2LONG          940 numeric.c      	b = (double)FIX2LONG(y);
FIX2LONG          974 numeric.c      	b = (double)FIX2LONG(y);
FIX2LONG         1009 numeric.c      	b = (double)FIX2LONG(y);
FIX2LONG         1404 numeric.c      	i = FIX2LONG(from);
FIX2LONG         1405 numeric.c      	end = FIX2LONG(to);
FIX2LONG         1406 numeric.c      	diff = FIX2LONG(step);
FIX2LONG         1462 numeric.c          if (FIXNUM_P(val)) return FIX2LONG(val);
FIX2LONG         1539 numeric.c          long num = FIXNUM_P(val)?FIX2LONG(val):rb_num2long(val);
FIX2LONG         1567 numeric.c          if (FIX2LONG(val) > 0) {
FIX2LONG         1608 numeric.c          if (FIXNUM_P(val)) return (LONG_LONG)FIX2LONG(val);
FIX2LONG         1711 numeric.c      	long i = FIX2LONG(num) + 1;
FIX2LONG         1828 numeric.c          return LONG2NUM(-FIX2LONG(num));
FIX2LONG         1836 numeric.c          long val = FIX2LONG(x);
FIX2LONG         1908 numeric.c      	a = FIX2LONG(x);
FIX2LONG         1909 numeric.c      	b = FIX2LONG(y);
FIX2LONG         1913 numeric.c      	if (FIX2LONG(r) != c) {
FIX2LONG         1922 numeric.c      	return rb_float_new((double)FIX2LONG(x) + RFLOAT(y)->value);
FIX2LONG         1944 numeric.c      	a = FIX2LONG(x);
FIX2LONG         1945 numeric.c      	b = FIX2LONG(y);
FIX2LONG         1949 numeric.c      	if (FIX2LONG(r) != c) {
FIX2LONG         1956 numeric.c      	x = rb_int2big(FIX2LONG(x));
FIX2LONG         1959 numeric.c      	return rb_float_new((double)FIX2LONG(x) - RFLOAT(y)->value);
FIX2LONG         1985 numeric.c      	a = FIX2LONG(x);
FIX2LONG         1988 numeric.c      	b = FIX2LONG(y);
FIX2LONG         1992 numeric.c      	if (FIX2LONG(r) != c || c/a != b) {
FIX2LONG         2001 numeric.c      	return rb_float_new((double)FIX2LONG(x) * RFLOAT(y)->value);
FIX2LONG         2050 numeric.c      	return rb_float_new((double)FIX2LONG(x) / (double)FIX2LONG(y));
FIX2LONG         2054 numeric.c      	return rb_float_new((double)FIX2LONG(y) / rb_big2dbl(y));
FIX2LONG         2056 numeric.c      	return rb_float_new((double)FIX2LONG(x) / RFLOAT(y)->value);
FIX2LONG         2068 numeric.c      	fixdivmod(FIX2LONG(x), FIX2LONG(y), &div, 0);
FIX2LONG         2073 numeric.c      	x = rb_int2big(FIX2LONG(x));
FIX2LONG         2077 numeric.c      	    return rb_float_new((double)FIX2LONG(x) / RFLOAT(y)->value);
FIX2LONG         2080 numeric.c      	    long div = (double)FIX2LONG(x) / RFLOAT(y)->value;
FIX2LONG         2131 numeric.c      	fixdivmod(FIX2LONG(x), FIX2LONG(y), 0, &mod);
FIX2LONG         2136 numeric.c      	x = rb_int2big(FIX2LONG(x));
FIX2LONG         2142 numeric.c      	    flodivmod((double)FIX2LONG(x), RFLOAT(y)->value, 0, &mod);
FIX2LONG         2162 numeric.c      	fixdivmod(FIX2LONG(x), FIX2LONG(y), &div, &mod);
FIX2LONG         2168 numeric.c      	x = rb_int2big(FIX2LONG(x));
FIX2LONG         2175 numeric.c      	    flodivmod((double)FIX2LONG(x), RFLOAT(y)->value, &div, &mod);
FIX2LONG         2203 numeric.c      	b = FIX2LONG(y);
FIX2LONG         2206 numeric.c      	a = FIX2LONG(x);
FIX2LONG         2214 numeric.c      	x = rb_int2big(FIX2LONG(x));
FIX2LONG         2217 numeric.c      	return rb_float_new(pow((double)FIX2LONG(x), RFLOAT(y)->value));
FIX2LONG         2238 numeric.c      	return (FIX2LONG(x) == FIX2LONG(y))?Qtrue:Qfalse;
FIX2LONG         2244 numeric.c      	return (double)FIX2LONG(x) == RFLOAT(y)->value ? Qtrue : Qfalse;
FIX2LONG         2263 numeric.c      	long a = FIX2LONG(x), b = FIX2LONG(y);
FIX2LONG         2271 numeric.c      	return rb_big_cmp(rb_int2big(FIX2LONG(x)), y);
FIX2LONG         2273 numeric.c      	return rb_dbl_cmp((double)FIX2LONG(x), RFLOAT(y)->value);
FIX2LONG         2291 numeric.c      	long a = FIX2LONG(x), b = FIX2LONG(y);
FIX2LONG         2298 numeric.c      	return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) > 0 ? Qtrue : Qfalse;
FIX2LONG         2300 numeric.c      	return (double)FIX2LONG(x) > RFLOAT(y)->value ? Qtrue : Qfalse;
FIX2LONG         2318 numeric.c      	long a = FIX2LONG(x), b = FIX2LONG(y);
FIX2LONG         2325 numeric.c      	return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) >= 0 ? Qtrue : Qfalse;
FIX2LONG         2327 numeric.c      	return (double)FIX2LONG(x) >= RFLOAT(y)->value ? Qtrue : Qfalse;
FIX2LONG         2345 numeric.c      	long a = FIX2LONG(x), b = FIX2LONG(y);
FIX2LONG         2352 numeric.c      	return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) < 0 ? Qtrue : Qfalse;
FIX2LONG         2354 numeric.c      	return (double)FIX2LONG(x) < RFLOAT(y)->value ? Qtrue : Qfalse;
FIX2LONG         2372 numeric.c      	long a = FIX2LONG(x), b = FIX2LONG(y);
FIX2LONG         2379 numeric.c      	return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) <= 0 ? Qtrue : Qfalse;
FIX2LONG         2381 numeric.c      	return (double)FIX2LONG(x) <= RFLOAT(y)->value ? Qtrue : Qfalse;
FIX2LONG         2397 numeric.c          long val = FIX2LONG(num);
FIX2LONG         2418 numeric.c          val = FIX2LONG(x) & NUM2LONG(y);
FIX2LONG         2437 numeric.c          val = FIX2LONG(x) | NUM2LONG(y);
FIX2LONG         2456 numeric.c          val = FIX2LONG(x) ^ NUM2LONG(y);
FIX2LONG         2502 numeric.c          val = FIX2LONG(x);
FIX2LONG         2530 numeric.c          long val = FIX2LONG(fix);
FIX2LONG         2566 numeric.c          val = (double)FIX2LONG(num);
FIX2LONG         2585 numeric.c          long i = FIX2LONG(fix);
FIX2LONG         2678 numeric.c      	end = FIX2LONG(to);
FIX2LONG         2679 numeric.c      	for (i = FIX2LONG(from); i <= end; i++) {
FIX2LONG         2716 numeric.c      	end = FIX2LONG(to);
FIX2LONG         2717 numeric.c      	for (i=FIX2LONG(from); i >= end; i--) {
FIX2LONG         2755 numeric.c      	end = FIX2LONG(num);
FIX2LONG         2783 numeric.c          if (FIX2LONG(num) == 0) {
FIX2LONG         1512 object.c       	id = FIX2LONG(name);
FIX2LONG         2147 object.c       	return rb_float_new((double)FIX2LONG(val));
FIX2LONG          340 pack.c             if (FIXNUM_P(x)) return FIX2LONG(x);
FIX2LONG         7861 parse.y        	node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit));
FIX2LONG          464 random.c                       if (FIX2LONG((VALUE)limit) == -1)
FIX2LONG          466 random.c                       return LONG2NUM(limited_rand(FIX2LONG((VALUE)limit)));
FIX2LONG          477 random.c       	max = FIX2LONG(vmax);
FIX2LONG          300 range.c        	long end = FIX2LONG(e);
FIX2LONG          304 range.c        	for (i=FIX2LONG(b); i<end; i+=unit) {
FIX2LONG          384 range.c        	long lim = FIX2LONG(end);
FIX2LONG          388 range.c        	for (i=FIX2LONG(beg); i<lim; i++) {
FIX2LONG          267 ruby.h         #define NUM2LONG(x) (FIXNUM_P(x)?FIX2LONG(x):rb_num2long((VALUE)x))
FIX2LONG          281 ruby.h         #define FIX2INT(x) ((int)FIX2LONG(x))
FIX2LONG          288 ruby.h         # define NUM2LL(x) (FIXNUM_P(x)?FIX2LONG(x):rb_num2ll((VALUE)x))
FIX2LONG          510 sprintf.c      		    v = FIX2LONG(val);
FIX2LONG          927 string.c       	    result = -FIX2LONG(tmp);
FIX2LONG         1414 string.c       	idx = FIX2LONG(indx);
FIX2LONG         1608 string.c       	idx = FIX2LONG(indx);
FIX2LONG          314 struct.c           n = FIX2LONG(size);
FIX2LONG          335 struct.c           n = FIX2LONG(size);
FIX2LONG          358 struct.c           size = FIX2LONG(sz);
FIX2LONG          168 time.c         	t.tv_sec = FIX2LONG(time);


FIX2UINT

FIX2UINT         2610 numeric.c          char *name = rb_id2name(FIX2UINT(fix));
FIX2UINT         2631 numeric.c          ID id = FIX2UINT(fix);


FIX2ULONG

FIX2ULONG        1566 numeric.c          num = FIX2ULONG(val);
FIX2ULONG         220 random.c               buf[0] = FIX2ULONG(seed) & 0xffffffff;
FIX2ULONG         222 random.c               buf[1] = FIX2ULONG(seed) >> 32;
FIX2ULONG         282 ruby.h         #define FIX2UINT(x) ((unsigned int)FIX2ULONG(x))


FIXABLE

FIXABLE           172 bignum.c           if (FIXABLE(n)) return LONG2FIX(n);
FIXABLE           216 bignum.c       	if (FIXABLE((LONG_LONG)q)) return LONG2FIX((LONG_LONG)q);
FIXABLE           568 bignum.c           if (FIXABLE(n)) return LONG2FIX(n);
FIXABLE          1189 numeric.c          if (!FIXABLE(f)) {
FIXABLE          1215 numeric.c          if (!FIXABLE(f)) {
FIXABLE          1248 numeric.c          if (!FIXABLE(f)) {
FIXABLE          1273 numeric.c          if (!FIXABLE(f)) {
FIXABLE          1594 numeric.c          if (!FIXABLE(v))


FIXED_MIME

FIXED_MIME       1303 ext/nkf/nkf-utf8/nkf.c                 mimebuf_f = FIXED_MIME;
FIXED_MIME       1316 ext/nkf/nkf-utf8/nkf.c                 mimeout_f = FIXED_MIME; cp++;
FIXED_MIME       1319 ext/nkf/nkf-utf8/nkf.c                 mimeout_f = FIXED_MIME; cp++;
FIXED_MIME       1903 ext/nkf/nkf-utf8/nkf.c     if (mime_f && mimebuf_f==FIXED_MIME) {
FIXED_MIME       4034 ext/nkf/nkf-utf8/nkf.c     if (mimebuf_f == FIXED_MIME)
FIXED_MIME       4052 ext/nkf/nkf-utf8/nkf.c         if (c1=='?'&&c2=='=' && mimebuf_f != FIXED_MIME) {
FIXED_MIME       4166 ext/nkf/nkf-utf8/nkf.c         if (mimebuf_f!=FIXED_MIME) input_mode = ASCII;
FIXED_MIME       4244 ext/nkf/nkf-utf8/nkf.c         if (mimebuf_f!=FIXED_MIME) input_mode = ASCII;
FIXED_MIME       4252 ext/nkf/nkf-utf8/nkf.c         if (mimebuf_f!=FIXED_MIME) input_mode = ASCII;
FIXED_MIME       4445 ext/nkf/nkf-utf8/nkf.c 	if (mimeout_f!=FIXED_MIME) {
FIXED_MIME       4534 ext/nkf/nkf-utf8/nkf.c     if (mimeout_f == FIXED_MIME){


FIXNUMARG

FIXNUMARG        1116 ext/zlib/zlib.c #define ARG_LEVEL(val)     FIXNUMARG((val), Z_DEFAULT_COMPRESSION)
FIXNUMARG        1117 ext/zlib/zlib.c #define ARG_WBITS(val)     FIXNUMARG((val), MAX_WBITS)
FIXNUMARG        1118 ext/zlib/zlib.c #define ARG_MEMLEVEL(val)  FIXNUMARG((val), DEF_MEM_LEVEL)
FIXNUMARG        1119 ext/zlib/zlib.c #define ARG_STRATEGY(val)  FIXNUMARG((val), Z_DEFAULT_STRATEGY)
FIXNUMARG        1120 ext/zlib/zlib.c #define ARG_FLUSH(val)     FIXNUMARG((val), Z_NO_FLUSH)
FIXNUMARG        1327 ext/zlib/zlib.c     flush = FIXNUMARG(v_flush, Z_SYNC_FLUSH);
FIXNUMARG        2823 ext/zlib/zlib.c     flush = FIXNUMARG(v_flush, Z_SYNC_FLUSH);


FIXNUM_FLAG

FIXNUM_FLAG       330 ext/win32ole/win32ole.c         pdisp = (Win32OLEIDispatch *)(data & ~FIXNUM_FLAG);
FIXNUM_FLAG       338 ext/win32ole/win32ole.c         st_insert(tbl, val, (VALUE)pdisp | FIXNUM_FLAG);
FIXNUM_FLAG      1893 gc.c               ptr = id ^ FIXNUM_FLAG;	/* unset FIXNUM_FLAG */
FIXNUM_FLAG       134 object.c           return (VALUE)((long)obj|FIXNUM_FLAG);
FIXNUM_FLAG       149 ruby.h         #define INT2FIX(i) ((VALUE)(((long)(i))<<1 | FIXNUM_FLAG))
FIXNUM_FLAG       176 ruby.h         #define FIXNUM_P(f) (((long)(f))&FIXNUM_FLAG)


FIXNUM_MAX

FIXNUM_MAX       2005 object.c       	if (RFLOAT(val)->value <= (double)FIXNUM_MAX
FIXNUM_MAX        177 ruby.h         #define POSFIXABLE(f) ((f) <= FIXNUM_MAX)


FIXNUM_MIN

FIXNUM_MIN       2006 object.c       	    && RFLOAT(val)->value >= (double)FIXNUM_MIN) {
FIXNUM_MIN        178 ruby.h         #define NEGFIXABLE(f) ((f) >= FIXNUM_MIN)


FIXNUM_P

FIXNUM_P          327 array.c            if (argc == 1 && !FIXNUM_P(size)) {
FIXNUM_P          740 array.c            if (FIXNUM_P(arg)) {
FIXNUM_P         1070 array.c            if (FIXNUM_P(argv[0])) {
FIXNUM_P         1495 array.c            if (FIXNUM_P(a) && FIXNUM_P(b)) {
FIXNUM_P         1643 array.c        	if (FIXNUM_P(argv[i])) {
FIXNUM_P         1850 array.c            if (!FIXNUM_P(arg1) && rb_range_beg_len(arg1, &pos, &len, RARRAY(ary)->len, 1)) {
FIXNUM_P           95 bignum.c           if (!FIXNUM_P(x)) {
FIXNUM_P          184 bignum.c           if (FIXNUM_P(val)) {
FIXNUM_P          257 bignum.c           if (FIXNUM_P(val)) {
FIXNUM_P          596 bignum.c           if (FIXNUM_P(x)) {
FIXNUM_P         1587 bignum.c           if (FIXNUM_P(y)) {
FIXNUM_P         1642 bignum.c           if (FIXNUM_P(y)) {
FIXNUM_P         1700 bignum.c           if (FIXNUM_P(y)) {
FIXNUM_P         1905 bignum.c           if (FIXNUM_P(y)) {
FIXNUM_P          771 class.c            if (FIXNUM_P(obj) || SYMBOL_P(obj)) {
FIXNUM_P           25 compar.c           if (FIXNUM_P(val)) return FIX2INT(val);
FIXNUM_P          217 error.c        		else if (FIXNUM_P(x)) {
FIXNUM_P          506 error.c            if (argc > 0 && FIXNUM_P(argv[0])) {
FIXNUM_P          837 error.c        	if (argc == 1 && FIXNUM_P(mesg)) {
FIXNUM_P          908 error.c            if (FIXNUM_P(num) ? num == e : rb_equal(num, e))
FIXNUM_P         3778 eval.c         	    if (FIXNUM_P(recv) || SYMBOL_P(recv)) {
FIXNUM_P         3919 eval.c         	    if (FIXNUM_P(result) || SYMBOL_P(result)) {
FIXNUM_P         6435 eval.c             if (FIXNUM_P(self) || SYMBOL_P(self)) {
FIXNUM_P         6467 eval.c             if (FIXNUM_P(self) || SYMBOL_P(self)) {
FIXNUM_P          182 ext/Win32API/Win32API.c 	    } else if (FIXNUM_P(str)) {
FIXNUM_P          355 ext/iconv/iconv.c 	    if (FIXNUM_P(str) && (i = FIX2INT(str)) <= 0xff) {
FIXNUM_P          135 ext/openssl/ossl_pkey_dh.c     else if (FIXNUM_P(arg)) {
FIXNUM_P          129 ext/openssl/ossl_pkey_dsa.c     else if (FIXNUM_P(arg)) {
FIXNUM_P          120 ext/openssl/ossl_pkey_rsa.c     else if (FIXNUM_P(arg)) {
FIXNUM_P           74 ext/racc/cparse/cparse.c #  define SYMBOL_P(v) FIXNUM_P(v)
FIXNUM_P          768 ext/socket/socket.c     else if (FIXNUM_P(port)) {
FIXNUM_P         1766 ext/socket/socket.c     else if (FIXNUM_P(val)) {
FIXNUM_P         2852 ext/socket/socket.c     else if (FIXNUM_P(port)) {
FIXNUM_P         2866 ext/socket/socket.c     else if (FIXNUM_P(family)) {
FIXNUM_P         2978 ext/socket/socket.c 	else if (FIXNUM_P(port)) {
FIXNUM_P         2992 ext/socket/socket.c 	else if (FIXNUM_P(af)) {
FIXNUM_P          227 ext/stringio/stringio.c 	if (FIXNUM_P(mode)) {
FIXNUM_P          155 ext/syslog/syslog.c     if (!FIXNUM_P(pri)) {
FIXNUM_P         2552 ext/zlib/zlib.c     if (FIXNUM_P(time)) {
FIXNUM_P         2557 ext/zlib/zlib.c 	gz->mtime = FIXNUM_P(val) ? FIX2INT(val) : rb_big2ulong(val);
FIXNUM_P         1888 gc.c               if (FIXNUM_P(ptr)) return (VALUE)ptr;
FIXNUM_P           50 hash.c             if (FIXNUM_P(a) && FIXNUM_P(b)) {
FIXNUM_P           90 hash.c         	if (!FIXNUM_P(hval)) {
FIXNUM_P         3021 io.c               else if (FIXNUM_P(pmode)) {
FIXNUM_P         3066 io.c               if (FIXNUM_P(vmode) || !NIL_P(perm)) {
FIXNUM_P         3067 io.c           	if (FIXNUM_P(vmode)) {
FIXNUM_P         3132 io.c               else if (FIXNUM_P(vmode)) flags = FIX2INT(vmode);
FIXNUM_P         3913 io.c           	if (FIXNUM_P(mode)) {
FIXNUM_P         3949 io.c           		if (FIXNUM_P(mode)) {
FIXNUM_P         4610 io.c               else if (FIXNUM_P(arg)) {
FIXNUM_P          438 marshal.c          else if (FIXNUM_P(obj)) {
FIXNUM_P          696 marshal.c      	if (FIXNUM_P(a1)) limit = FIX2INT(a1);
FIXNUM_P         1401 numeric.c          if (FIXNUM_P(from) && FIXNUM_P(to) && FIXNUM_P(step)) {
FIXNUM_P         1462 numeric.c          if (FIXNUM_P(val)) return FIX2LONG(val);
FIXNUM_P         1539 numeric.c          long num = FIXNUM_P(val)?FIX2LONG(val):rb_num2long(val);
FIXNUM_P         1563 numeric.c          if (!FIXNUM_P(val)) {
FIXNUM_P         1591 numeric.c          if (FIXNUM_P(val)) return val;
FIXNUM_P         1608 numeric.c          if (FIXNUM_P(val)) return (LONG_LONG)FIX2LONG(val);
FIXNUM_P         1710 numeric.c          if (FIXNUM_P(num)) {
FIXNUM_P         1904 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         1940 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         1977 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2049 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2065 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2128 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2159 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2200 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2237 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2262 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2290 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2317 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2344 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2371 numeric.c          if (FIXNUM_P(y)) {
FIXNUM_P         2535 numeric.c      	if (!FIXNUM_P(idx)) {
FIXNUM_P         2675 numeric.c          if (FIXNUM_P(from) && FIXNUM_P(to)) {
FIXNUM_P         2713 numeric.c          if (FIXNUM_P(from) && FIXNUM_P(to)) {
FIXNUM_P         2752 numeric.c          if (FIXNUM_P(num)) {
FIXNUM_P          340 pack.c             if (FIXNUM_P(x)) return FIX2LONG(x);
FIXNUM_P         1793 parse.y        			if (nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) &&
FIXNUM_P         1794 parse.y        			    nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) {
FIXNUM_P         1810 parse.y        			if (nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) &&
FIXNUM_P         1811 parse.y        			    nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) {
FIXNUM_P         7680 parse.y            if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) {
FIXNUM_P         8847 parse.y            if (FIXNUM_P(x)) return x;
FIXNUM_P         2642 process.c      	if (FIXNUM_P(g)) {
FIXNUM_P          219 random.c           if (FIXNUM_P(seed)) {
FIXNUM_P          463 random.c                   if (FIXNUM_P((VALUE)limit)) {
FIXNUM_P           42 range.c            if (!FIXNUM_P(beg) || !FIXNUM_P(end)) {
FIXNUM_P          299 range.c            if (FIXNUM_P(b) && FIXNUM_P(e)) { /* fixnums are special */
FIXNUM_P          383 range.c            if (FIXNUM_P(beg) && FIXNUM_P(end)) { /* fixnums are special */
FIXNUM_P          483 range.c            int ip = FIXNUM_P(e) || rb_obj_is_kind_of(e, rb_cInteger);
FIXNUM_P          494 range.c        	    if (FIXNUM_P(e)) {
FIXNUM_P          623 range.c            int nv = FIXNUM_P(beg) || FIXNUM_P(end) ||
FIXNUM_P         1186 re.c               if (!NIL_P(rest) || !FIXNUM_P(idx) || FIX2INT(idx) < 0) {
FIXNUM_P         1681 re.c           	    if (FIXNUM_P(argv[1])) flags = FIX2INT(argv[1]);
FIXNUM_P          267 ruby.h         #define NUM2LONG(x) (FIXNUM_P(x)?FIX2LONG(x):rb_num2long((VALUE)x))
FIXNUM_P          271 ruby.h         #define NUM2INT(x) (FIXNUM_P(x)?FIX2INT(x):rb_num2int((VALUE)x))
FIXNUM_P          288 ruby.h         # define NUM2LL(x) (FIXNUM_P(x)?FIX2LONG(x):rb_num2ll((VALUE)x))
FIXNUM_P          672 ruby.h         	if (FIXNUM_P(obj)) return rb_cFixnum;
FIXNUM_P          687 ruby.h         	if (FIXNUM_P(obj)) return T_FIXNUM;
FIXNUM_P          500 sprintf.c      		    if (FIXNUM_P(val)) goto bin_retry;
FIXNUM_P          756 string.c           if (FIXNUM_P(str2)) {
FIXNUM_P          924 string.c       	    if (!FIXNUM_P(tmp)) {
FIXNUM_P         1618 string.c       	if (FIXNUM_P(val)) {
FIXNUM_P         2233 string.c           if (FIXNUM_P(arg)) {


FLAG_CCLASS_NOT

FLAG_CCLASS_NOT   753 regint.h       #define CCLASS_SET_NOT(cc)      (cc)->flags |= FLAG_CCLASS_NOT
FLAG_CCLASS_NOT   754 regint.h       #define CCLASS_CLEAR_NOT(cc)    (cc)->flags &= ~FLAG_CCLASS_NOT
FLAG_CCLASS_NOT   756 regint.h       #define IS_CCLASS_NOT(cc)     (((cc)->flags & FLAG_CCLASS_NOT) != 0)


FLAG_CCLASS_SHARE

FLAG_CCLASS_SHARE  755 regint.h       #define CCLASS_SET_SHARE(cc)    (cc)->flags |= FLAG_CCLASS_SHARE
FLAG_CCLASS_SHARE  757 regint.h       #define IS_CCLASS_SHARE(cc)   (((cc)->flags & FLAG_CCLASS_SHARE) != 0)


FLAG_MATCHED

FLAG_MATCHED       40 ext/strscan/strscan.c #define MATCHED_P(s)          ((s)->flags & FLAG_MATCHED)
FLAG_MATCHED       41 ext/strscan/strscan.c #define MATCHED(s)             (s)->flags |= FLAG_MATCHED
FLAG_MATCHED       42 ext/strscan/strscan.c #define CLEAR_MATCH_STATUS(s)  (s)->flags &= ~FLAG_MATCHED


FLOAT_CONVWITH

FLOAT_CONVWITH    780 pack.c         		FLOAT_CONVWITH(ftmp);
FLOAT_CONVWITH    815 pack.c         		FLOAT_CONVWITH(ftmp);
FLOAT_CONVWITH   1638 pack.c         		FLOAT_CONVWITH(ftmp);
FLOAT_CONVWITH   1678 pack.c         		FLOAT_CONVWITH(ftmp;)


FLT_RADIX

FLT_RADIX          32 numeric.c      #ifndef FLT_RADIX
FLT_RADIX        2910 numeric.c          rb_define_const(rb_cFloat, "RADIX", INT2FIX(FLT_RADIX));


FLT_ROUNDS

FLT_ROUNDS         35 numeric.c      #ifndef FLT_ROUNDS
FLT_ROUNDS       2909 numeric.c          rb_define_const(rb_cFloat, "ROUNDS", INT2FIX(FLT_ROUNDS));


FLUSH

FLUSH            1001 missing/vsnprintf.c 		FLUSH();	/* copy out the I/O vectors */
FLUSH            1004 missing/vsnprintf.c 	FLUSH();


FLUSH_REGISTER_WINDOWS

FLUSH_REGISTER_WINDOWS  922 eval.c         #define EXEC_TAG()    (FLUSH_REGISTER_WINDOWS, ruby_setjmp(((void)0), prot_tag->buf))
FLUSH_REGISTER_WINDOWS 10114 eval.c             FLUSH_REGISTER_WINDOWS;
FLUSH_REGISTER_WINDOWS 10201 eval.c             (rb_thread_switch((FLUSH_REGISTER_WINDOWS, ruby_setjmp(rb_thread_save_context(th), (th)->context))))
FLUSH_REGISTER_WINDOWS 10238 eval.c             FLUSH_REGISTER_WINDOWS;
FLUSH_REGISTER_WINDOWS 1304 gc.c               FLUSH_REGISTER_WINDOWS;


FL_ABLE

FL_ABLE           470 ruby.h         #define FL_TEST(x,f) (FL_ABLE(x)?(RBASIC(x)->flags&(f)):0)
FL_ABLE           471 ruby.h         #define FL_SET(x,f) do {if (FL_ABLE(x)) RBASIC(x)->flags |= (f);} while (0)
FL_ABLE           472 ruby.h         #define FL_UNSET(x,f) do {if (FL_ABLE(x)) RBASIC(x)->flags &= ~(f);} while (0)
FL_ABLE           473 ruby.h         #define FL_REVERSE(x,f) do {if (FL_ABLE(x)) RBASIC(x)->flags ^= (f);} while (0)
FL_ABLE           477 ruby.h         #define OBJ_INFECT(x,s) do {if (FL_ABLE(x) && FL_ABLE(s)) RBASIC(x)->flags |= RBASIC(s)->flags & FL_TAINT;} while (0)


FL_EXIVAR

FL_EXIVAR         730 gc.c               if (FL_TEST(obj, FL_EXIVAR)) {
FL_EXIVAR        1107 gc.c               if (FL_TEST(obj, FL_EXIVAR)) {
FL_EXIVAR         172 object.c           RBASIC(dest)->flags &= ~(T_MASK|FL_EXIVAR);
FL_EXIVAR         173 object.c           RBASIC(dest)->flags |= RBASIC(obj)->flags & (T_MASK|FL_EXIVAR|FL_TAINT);
FL_EXIVAR         320 ruby.h             if (FL_TEST(obj, FL_EXIVAR)) rb_copy_generic_ivar((VALUE)clone,(VALUE)obj);\
FL_EXIVAR         323 ruby.h             OBJSETUP(dup,rb_obj_class(obj),(RBASIC(obj)->flags)&(T_MASK|FL_EXIVAR|FL_TAINT));\
FL_EXIVAR         324 ruby.h             if (FL_TEST(obj, FL_EXIVAR)) rb_copy_generic_ivar((VALUE)dup,(VALUE)obj);\
FL_EXIVAR         771 variable.c         if (!FL_TEST(obj, FL_EXIVAR)) return 0;
FL_EXIVAR         809 variable.c     	FL_SET(obj, FL_EXIVAR);
FL_EXIVAR         899 variable.c         if (!FL_TEST(obj, FL_EXIVAR)) return;
FL_EXIVAR         909 variable.c     	    FL_SET(clone, FL_EXIVAR);
FL_EXIVAR         927 variable.c     	if (FL_TEST(obj, FL_EXIVAR) || rb_special_const_p(obj))
FL_EXIVAR         980 variable.c     	if (FL_TEST(obj, FL_EXIVAR) || rb_special_const_p(obj))
FL_EXIVAR        1029 variable.c     	if (FL_TEST(obj, FL_EXIVAR) || rb_special_const_p(obj)) {
FL_EXIVAR        1085 variable.c     	if (FL_TEST(obj, FL_EXIVAR) || rb_special_const_p(obj)) {


FL_FINALIZE

FL_FINALIZE      1034 gc.c           		if (need_call_final && FL_TEST(p, FL_FINALIZE)) {
FL_FINALIZE      1689 gc.c               FL_SET(obj, FL_FINALIZE);
FL_FINALIZE      1733 gc.c               FL_SET(obj, FL_FINALIZE);
FL_FINALIZE      1755 gc.c               if (!FL_TEST(obj, FL_FINALIZE)) return;
FL_FINALIZE      1759 gc.c               FL_SET(dest, FL_FINALIZE);
FL_FINALIZE      1823 gc.c           		if (FL_TEST(p, FL_FINALIZE)) {
FL_FINALIZE      1824 gc.c           		    FL_UNSET(p, FL_FINALIZE);
FL_FINALIZE       225 object.c           RBASIC(clone)->flags = (RBASIC(obj)->flags | FL_TEST(clone, FL_TAINT)) & ~(FL_FREEZE|FL_FINALIZE);


FL_FREEZE

FL_FREEZE         225 object.c           RBASIC(clone)->flags = (RBASIC(obj)->flags | FL_TEST(clone, FL_TAINT)) & ~(FL_FREEZE|FL_FINALIZE);
FL_FREEZE         227 object.c           RBASIC(clone)->flags |= RBASIC(obj)->flags & FL_FREEZE;
FL_FREEZE         479 ruby.h         #define OBJ_FROZEN(x) FL_TEST((x), FL_FREEZE)
FL_FREEZE         480 ruby.h         #define OBJ_FREEZE(x) FL_SET((x), FL_FREEZE)


FL_MARK

FL_MARK          10038 eval.c         	if (FL_TEST(th->thread, FL_MARK)) continue;
FL_MARK           566 gc.c           	    if ((p->as.basic.flags & FL_MARK) &&
FL_MARK           567 gc.c           		(p->as.basic.flags != FL_MARK)) {
FL_MARK           691 gc.c               if (obj->as.basic.flags & FL_MARK) return;  /* already marked */
FL_MARK           692 gc.c               obj->as.basic.flags |= FL_MARK;
FL_MARK           726 gc.c               if (obj->as.basic.flags & FL_MARK) return;  /* already marked */
FL_MARK           727 gc.c               obj->as.basic.flags |= FL_MARK;
FL_MARK          1030 gc.c           	    if (!(p->as.basic.flags & FL_MARK)) {
FL_MARK          1035 gc.c           		    p->as.free.flags = FL_MARK; /* remain marked */
FL_MARK          1046 gc.c           	    else if (RBASIC(p)->flags == FL_MARK) {
FL_MARK          1051 gc.c           		RBASIC(p)->flags &= ~FL_MARK;


FL_SET

FL_SET            215 array.c        	FL_SET(ary, ELTS_SHARED);
FL_SET            233 array.c            FL_SET(val, ELTS_SHARED);
FL_SET            684 array.c            FL_SET(ary2, ELTS_SHARED);
FL_SET           1551 array.c        	FL_SET(ary, ARY_TMPLOCK);	/* prohibit modification during sort */
FL_SET           2047 array.c            FL_SET(copy, ELTS_SHARED);
FL_SET            135 class.c        	FL_SET(clone, FL_SINGLETON);
FL_SET            161 class.c        	FL_SET(klass, FL_SINGLETON);
FL_SET            748 eval.c         	    FL_SET(_old, DVAR_DONT_RECYCLE); \
FL_SET           6189 eval.c         		FL_SET(vars, DVAR_DONT_RECYCLE);
FL_SET           7898 eval.c         	    FL_SET(vars, DVAR_DONT_RECYCLE);
FL_SET           8003 eval.c         	    FL_SET(vars, DVAR_DONT_RECYCLE);
FL_SET           8055 eval.c             FL_SET(data, (safe << PROC_TSHIFT) & PROC_TMASK);
FL_SET           8056 eval.c             FL_SET(data, PROC_SAFE_SAVED);
FL_SET           8112 eval.c         	    FL_SET(vars, DVAR_DONT_RECYCLE);
FL_SET           11568 eval.c         	FL_SET(vars, DVAR_DONT_RECYCLE);
FL_SET           12582 eval.c         	FL_SET(vars, DVAR_DONT_RECYCLE);
FL_SET           1689 gc.c               FL_SET(obj, FL_FINALIZE);
FL_SET           1733 gc.c               FL_SET(obj, FL_FINALIZE);
FL_SET           1759 gc.c               FL_SET(dest, FL_FINALIZE);
FL_SET            155 hash.c         	FL_SET(arg->hash, HASH_DELETED);
FL_SET            274 hash.c         	FL_SET(hash, HASH_PROC_DEFAULT);
FL_SET            606 hash.c         	    FL_SET(hash, HASH_DELETED);
FL_SET            877 hash.c         	FL_SET(hash, HASH_PROC_DEFAULT);
FL_SET            168 re.c               FL_SET(re, KCODE_EUC);
FL_SET            169 re.c               FL_SET(re, KCODE_FIXED);
FL_SET            176 re.c               FL_SET(re, KCODE_SJIS);
FL_SET            177 re.c               FL_SET(re, KCODE_FIXED);
FL_SET            184 re.c               FL_SET(re, KCODE_UTF8);
FL_SET            185 re.c               FL_SET(re, KCODE_FIXED);
FL_SET            192 re.c               FL_SET(re, KCODE_FIXED);
FL_SET            787 re.c               FL_SET(match, MATCH_BUSY);
FL_SET            803 re.c           	FL_SET(re, REG_CASESTATE);
FL_SET           1316 re.c           	FL_SET(re, reg_kcode);
FL_SET           1337 re.c           	FL_SET(re, REG_CASESTATE);
FL_SET            315 ruby.h             if (rb_safe_level() >= 3) FL_SET(obj, FL_TAINT);\
FL_SET            476 ruby.h         #define OBJ_TAINT(x) FL_SET((x), FL_TAINT)
FL_SET            480 ruby.h         #define OBJ_FREEZE(x) FL_SET((x), FL_FREEZE)
FL_SET            132 string.c           FL_SET(str2, ELTS_SHARED);
FL_SET            152 string.c       	FL_SET(str2, ELTS_SHARED);
FL_SET            156 string.c       	FL_SET(str, ELTS_SHARED);
FL_SET            243 string.c       	FL_SET(str, RBASIC(str2)->flags & STR_NOCAPA);
FL_SET            468 string.c       	FL_SET(str, STR_ASSOC);
FL_SET            492 string.c       	FL_SET(s, ELTS_SHARED);
FL_SET            521 string.c       	FL_SET(str, ELTS_SHARED);
FL_SET            589 string.c           FL_SET(str, STR_TMPLOCK);
FL_SET           2115 string.c       	FL_SET(str, ELTS_SHARED);
FL_SET           2124 string.c       	    FL_SET(str, STR_ASSOC);
FL_SET           2152 string.c           FL_SET(str, ELTS_SHARED);
FL_SET            809 variable.c     	FL_SET(obj, FL_EXIVAR);
FL_SET            909 variable.c     	    FL_SET(clone, FL_EXIVAR);


FL_SINGLETON

FL_SINGLETON       43 class.c            if (RBASIC(super)->flags & FL_SINGLETON) {
FL_SINGLETON       71 class.c            if (!FL_TEST(CLASS_OF(clone), FL_SINGLETON)) {
FL_SINGLETON      100 class.c            if (FL_TEST(orig, FL_SINGLETON)) {
FL_SINGLETON      111 class.c            if (!FL_TEST(klass, FL_SINGLETON))
FL_SINGLETON      135 class.c        	FL_SET(clone, FL_SINGLETON);
FL_SINGLETON      143 class.c            if (FL_TEST(klass, FL_SINGLETON)) {
FL_SINGLETON      154 class.c            if (BUILTIN_TYPE(obj) == T_CLASS && FL_TEST(obj, FL_SINGLETON)) {
FL_SINGLETON      161 class.c        	FL_SET(klass, FL_SINGLETON);
FL_SINGLETON      480 class.c        	if (FL_TEST(p, FL_SINGLETON))
FL_SINGLETON      573 class.c        	if (FL_TEST(mod, FL_SINGLETON)) continue;
FL_SINGLETON      713 class.c            if (klass && FL_TEST(klass, FL_SINGLETON)) {
FL_SINGLETON      718 class.c        	while (klass && (FL_TEST(klass, FL_SINGLETON) || TYPE(klass) == T_ICLASS)) {
FL_SINGLETON      782 class.c            if (FL_TEST(RBASIC(obj)->klass, FL_SINGLETON) &&
FL_SINGLETON      902 error.c        	while (TYPE(klass) == T_ICLASS || FL_TEST(klass, FL_SINGLETON)) {
FL_SINGLETON      390 eval.c             if (!FL_TEST(klass, FL_SINGLETON) &&
FL_SINGLETON      395 eval.c             else if (FL_TEST(klass, FL_SINGLETON) && node && nd_type(node) == NODE_CFUNC &&
FL_SINGLETON      406 eval.c         	if (FL_TEST(klass, FL_SINGLETON)) {
FL_SINGLETON      537 eval.c             if (FL_TEST(klass, FL_SINGLETON)) {
FL_SINGLETON     1811 eval.c             while (cref && cref->nd_next && (NIL_P(cref->nd_clss) || FL_TEST(cref->nd_clss, FL_SINGLETON))) {
FL_SINGLETON     1893 eval.c         	if (FL_TEST(klass, FL_SINGLETON))
FL_SINGLETON     1929 eval.c         	if (FL_TEST(c, FL_SINGLETON)) {
FL_SINGLETON     1946 eval.c             if (FL_TEST(klass, FL_SINGLETON)) {
FL_SINGLETON     2030 eval.c             if (FL_TEST(klass, FL_SINGLETON)) {
FL_SINGLETON     2542 eval.c         	else if (FL_TEST(klass, FL_SINGLETON)) {
FL_SINGLETON     5049 eval.c         	if (RTEST(ruby_verbose) && FL_TEST(ruby_cbase, FL_SINGLETON)) {
FL_SINGLETON     8658 eval.c         	   (FL_TEST(rklass, FL_SINGLETON) || TYPE(rklass) == T_ICLASS)) {
FL_SINGLETON     9004 eval.c         	if (FL_TEST(data->rklass, FL_SINGLETON)) {
FL_SINGLETON     9147 eval.c             if (FL_TEST(data->klass, FL_SINGLETON)) {
FL_SINGLETON     9321 eval.c         	    if (FL_TEST(rklass, FL_SINGLETON)) {
FL_SINGLETON      977 gc.c           	if (!FL_TEST(p, FL_SINGLETON)) { /* not freeing page */
FL_SINGLETON     1061 gc.c           		p->as.free.flags |= FL_SINGLETON; /* freeing page mark */
FL_SINGLETON     1548 gc.c           		    if (FL_TEST(p, FL_SINGLETON)) continue;
FL_SINGLETON     1580 gc.c           		    if (FL_TEST(p, FL_SINGLETON)) continue;
FL_SINGLETON      345 marshal.c          if (FL_TEST(klass, FL_SINGLETON)) {
FL_SINGLETON      488 marshal.c      	    if (FL_TEST(obj, FL_SINGLETON)) {
FL_SINGLETON      976 marshal.c      	    if (FL_TEST(c, FL_SINGLETON)) {
FL_SINGLETON      140 object.c           while (FL_TEST(cl, FL_SINGLETON) || TYPE(cl) == T_ICLASS) {
FL_SINGLETON     1138 object.c           if (FL_TEST(klass, FL_SINGLETON)) {
FL_SINGLETON     1419 object.c           if (FL_TEST(klass, FL_SINGLETON)) {


FL_TAINT

FL_TAINT          793 class.c        	FL_UNSET(klass, FL_TAINT);
FL_TAINT         1921 hash.c         		FL_UNSET(RARRAY(keys)->ptr[i], FL_TAINT);
FL_TAINT          173 object.c           RBASIC(dest)->flags |= RBASIC(obj)->flags & (T_MASK|FL_EXIVAR|FL_TAINT);
FL_TAINT          225 object.c           RBASIC(clone)->flags = (RBASIC(obj)->flags | FL_TEST(clone, FL_TAINT)) & ~(FL_FREEZE|FL_FINALIZE);
FL_TAINT          616 object.c       	FL_UNSET(obj, FL_TAINT);
FL_TAINT          940 re.c           	    FL_UNSET(match, FL_TAINT);
FL_TAINT          841 ruby.c         	FL_UNSET(rb_argv, FL_TAINT);
FL_TAINT          842 ruby.c         	FL_UNSET(rb_load_path, FL_TAINT);
FL_TAINT          315 ruby.h             if (rb_safe_level() >= 3) FL_SET(obj, FL_TAINT);\
FL_TAINT          323 ruby.h             OBJSETUP(dup,rb_obj_class(obj),(RBASIC(obj)->flags)&(T_MASK|FL_EXIVAR|FL_TAINT));\
FL_TAINT          475 ruby.h         #define OBJ_TAINTED(x) FL_TEST((x), FL_TAINT)
FL_TAINT          476 ruby.h         #define OBJ_TAINT(x) FL_SET((x), FL_TAINT)
FL_TAINT          477 ruby.h         #define OBJ_INFECT(x,s) do {if (FL_ABLE(x) && FL_ABLE(s)) RBASIC(x)->flags |= RBASIC(s)->flags & FL_TAINT;} while (0)
FL_TAINT         1190 variable.c         FL_UNSET(fn, FL_TAINT);


FL_TEST

FL_TEST            48 array.c            if (FL_TEST(ary, ARY_TMPLOCK))
FL_TEST            60 array.c            if (FL_TEST(ary, ELTS_SHARED)) {
FL_TEST            87 array.c            if (FL_TEST(ary, ARY_TMPLOCK)) return Qtrue;
FL_TEST           207 array.c            if (!FL_TEST(ary, ELTS_SHARED)) {
FL_TEST           500 array.c            if (!FL_TEST(ary, ELTS_SHARED) &&
FL_TEST          2042 array.c            if (RARRAY(copy)->ptr && !FL_TEST(copy, ELTS_SHARED))
FL_TEST            71 class.c            if (!FL_TEST(CLASS_OF(clone), FL_SINGLETON)) {
FL_TEST           100 class.c            if (FL_TEST(orig, FL_SINGLETON)) {
FL_TEST           111 class.c            if (!FL_TEST(klass, FL_SINGLETON))
FL_TEST           143 class.c            if (FL_TEST(klass, FL_SINGLETON)) {
FL_TEST           154 class.c            if (BUILTIN_TYPE(obj) == T_CLASS && FL_TEST(obj, FL_SINGLETON)) {
FL_TEST           480 class.c        	if (FL_TEST(p, FL_SINGLETON))
FL_TEST           573 class.c        	if (FL_TEST(mod, FL_SINGLETON)) continue;
FL_TEST           713 class.c            if (klass && FL_TEST(klass, FL_SINGLETON)) {
FL_TEST           718 class.c        	while (klass && (FL_TEST(klass, FL_SINGLETON) || TYPE(klass) == T_ICLASS)) {
FL_TEST           782 class.c            if (FL_TEST(RBASIC(obj)->klass, FL_SINGLETON) &&
FL_TEST           902 error.c        	while (TYPE(klass) == T_ICLASS || FL_TEST(klass, FL_SINGLETON)) {
FL_TEST           390 eval.c             if (!FL_TEST(klass, FL_SINGLETON) &&
FL_TEST           395 eval.c             else if (FL_TEST(klass, FL_SINGLETON) && node && nd_type(node) == NODE_CFUNC &&
FL_TEST           406 eval.c         	if (FL_TEST(klass, FL_SINGLETON)) {
FL_TEST           537 eval.c             if (FL_TEST(klass, FL_SINGLETON)) {
FL_TEST          1811 eval.c             while (cref && cref->nd_next && (NIL_P(cref->nd_clss) || FL_TEST(cref->nd_clss, FL_SINGLETON))) {
FL_TEST          1893 eval.c         	if (FL_TEST(klass, FL_SINGLETON))
FL_TEST          1929 eval.c         	if (FL_TEST(c, FL_SINGLETON)) {
FL_TEST          1946 eval.c             if (FL_TEST(klass, FL_SINGLETON)) {
FL_TEST          2030 eval.c             if (FL_TEST(klass, FL_SINGLETON)) {
FL_TEST          2542 eval.c         	else if (FL_TEST(klass, FL_SINGLETON)) {
FL_TEST          4851 eval.c         	!FL_TEST(ruby_dyna_vars, DVAR_DONT_RECYCLE)) {
FL_TEST          5049 eval.c         	if (RTEST(ruby_verbose) && FL_TEST(ruby_cbase, FL_SINGLETON)) {
FL_TEST          7897 eval.c         	    if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
FL_TEST          8002 eval.c         	    if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
FL_TEST          8111 eval.c         	    if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
FL_TEST          8658 eval.c         	   (FL_TEST(rklass, FL_SINGLETON) || TYPE(rklass) == T_ICLASS)) {
FL_TEST          9004 eval.c         	if (FL_TEST(data->rklass, FL_SINGLETON)) {
FL_TEST          9147 eval.c             if (FL_TEST(data->klass, FL_SINGLETON)) {
FL_TEST          9321 eval.c         	    if (FL_TEST(rklass, FL_SINGLETON)) {
FL_TEST          10038 eval.c         	if (FL_TEST(th->thread, FL_MARK)) continue;
FL_TEST          11567 eval.c         	if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
FL_TEST          12581 eval.c         	if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
FL_TEST           730 gc.c               if (FL_TEST(obj, FL_EXIVAR)) {
FL_TEST           886 gc.c           	if (FL_TEST(obj, ELTS_SHARED)) {
FL_TEST           907 gc.c           	if (FL_TEST(obj, ELTS_SHARED|STR_ASSOC)) {
FL_TEST           977 gc.c           	if (!FL_TEST(p, FL_SINGLETON)) { /* not freeing page */
FL_TEST          1034 gc.c           		if (need_call_final && FL_TEST(p, FL_FINALIZE)) {
FL_TEST          1107 gc.c               if (FL_TEST(obj, FL_EXIVAR)) {
FL_TEST          1126 gc.c           	if (RANY(obj)->as.string.ptr && !FL_TEST(obj, ELTS_SHARED)) {
FL_TEST          1131 gc.c           	if (RANY(obj)->as.array.ptr && !FL_TEST(obj, ELTS_SHARED)) {
FL_TEST          1548 gc.c           		    if (FL_TEST(p, FL_SINGLETON)) continue;
FL_TEST          1580 gc.c           		    if (FL_TEST(p, FL_SINGLETON)) continue;
FL_TEST          1755 gc.c               if (!FL_TEST(obj, FL_FINALIZE)) return;
FL_TEST          1823 gc.c           		if (FL_TEST(p, FL_FINALIZE)) {
FL_TEST           170 hash.c         	if (FL_TEST(hash, HASH_DELETED)) {
FL_TEST           478 hash.c             if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
FL_TEST           531 hash.c             if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
FL_TEST           660 hash.c             else if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
FL_TEST           876 hash.c             if (FL_TEST(hash2, HASH_PROC_DEFAULT)) {
FL_TEST          1357 hash.c         	      FL_TEST(hash1, HASH_PROC_DEFAULT) == FL_TEST(hash2, HASH_PROC_DEFAULT)))
FL_TEST           345 marshal.c          if (FL_TEST(klass, FL_SINGLETON)) {
FL_TEST           488 marshal.c      	    if (FL_TEST(obj, FL_SINGLETON)) {
FL_TEST           571 marshal.c      	    else if (FL_TEST(obj, FL_USER2)) {
FL_TEST           976 marshal.c      	    if (FL_TEST(c, FL_SINGLETON)) {
FL_TEST           140 object.c           while (FL_TEST(cl, FL_SINGLETON) || TYPE(cl) == T_ICLASS) {
FL_TEST           225 object.c           RBASIC(clone)->flags = (RBASIC(obj)->flags | FL_TEST(clone, FL_TAINT)) & ~(FL_FREEZE|FL_FINALIZE);
FL_TEST          1138 object.c           if (FL_TEST(klass, FL_SINGLETON)) {
FL_TEST          1419 object.c           if (FL_TEST(klass, FL_SINGLETON)) {
FL_TEST           200 re.c               if (!FL_TEST(re, KCODE_FIXED)) return;
FL_TEST           246 re.c               if (!FL_TEST(re, KCODE_FIXED))
FL_TEST           331 re.c           	if (FL_TEST(re, KCODE_FIXED)) {
FL_TEST           580 re.c               if (FL_TEST(re, KCODE_FIXED)) {
FL_TEST           800 re.c               state = FL_TEST(re, REG_CASESTATE);
FL_TEST           813 re.c               if (!FL_TEST(re, KCODE_FIXED) &&
FL_TEST           827 re.c           	if (FL_TEST(re, KCODE_FIXED))
FL_TEST           853 re.c               if (FL_TEST(re, KCODE_FIXED))
FL_TEST           898 re.c               if (FL_TEST(re, KCODE_FIXED))
FL_TEST           917 re.c               if (FL_TEST(re, KCODE_FIXED))
FL_TEST           933 re.c               if (NIL_P(match) || FL_TEST(match, MATCH_BUSY)) {
FL_TEST          1403 re.c               if (FL_TEST(re, KCODE_FIXED)) {
FL_TEST          1658 re.c           	if (FL_TEST(argv[0], KCODE_FIXED)) {
FL_TEST          1869 re.c               if (FL_TEST(re, KCODE_FIXED)) {
FL_TEST          1920 re.c                           if (FL_TEST(v, KCODE_FIXED)) {
FL_TEST           320 ruby.h             if (FL_TEST(obj, FL_EXIVAR)) rb_copy_generic_ivar((VALUE)clone,(VALUE)obj);\
FL_TEST           324 ruby.h             if (FL_TEST(obj, FL_EXIVAR)) rb_copy_generic_ivar((VALUE)dup,(VALUE)obj);\
FL_TEST           475 ruby.h         #define OBJ_TAINTED(x) FL_TEST((x), FL_TAINT)
FL_TEST           479 ruby.h         #define OBJ_FROZEN(x) FL_TEST((x), FL_FREEZE)
FL_TEST            36 string.c           if (!FL_TEST(str, STR_NOCAPA))\
FL_TEST           151 string.c           if (FL_TEST(str, ELTS_SHARED)) {
FL_TEST           170 string.c           if (FL_TEST(orig, ELTS_SHARED) && (str = RSTRING(orig)->aux.shared) && klass == RBASIC(str)->klass) {
FL_TEST           179 string.c           else if (FL_TEST(orig, STR_ASSOC)) {
FL_TEST           238 string.c           if (!FL_TEST(str, ELTS_SHARED)) free(RSTRING(str)->ptr);
FL_TEST           242 string.c           if (FL_TEST(str2, STR_NOCAPA)) {
FL_TEST           421 string.c           if (FL_TEST(str, STR_TMPLOCK)) {
FL_TEST           427 string.c           if (!FL_TEST(str, ELTS_SHARED)) return 1;
FL_TEST           456 string.c           if (FL_TEST(str, STR_ASSOC)) {
FL_TEST           461 string.c       	if (FL_TEST(str, ELTS_SHARED)) {
FL_TEST           475 string.c           if (FL_TEST(str, STR_ASSOC)) {
FL_TEST           548 string.c       	beg + len == RSTRING(str)->len && !FL_TEST(str, STR_ASSOC)) {
FL_TEST           570 string.c           if (FL_TEST(str, ELTS_SHARED) && RSTRING(str)->aux.shared) {
FL_TEST           586 string.c           if (FL_TEST(str, STR_TMPLOCK)) {
FL_TEST           596 string.c           if (!FL_TEST(str, STR_TMPLOCK)) {
FL_TEST           614 string.c       	    if (!FL_TEST(str, STR_NOCAPA)) {
FL_TEST           634 string.c           if (FL_TEST(str, STR_ASSOC)) {
FL_TEST           667 string.c           if (FL_TEST(str, STR_ASSOC)) {
FL_TEST           691 string.c           if (FL_TEST(str, STR_ASSOC)) {
FL_TEST           720 string.c       	if (FL_TEST(str, STR_ASSOC)) {
FL_TEST          2109 string.c           if (FL_TEST(str2, ELTS_SHARED)) {
FL_TEST          2123 string.c       	if (FL_TEST(str2, STR_ASSOC)) {
FL_TEST           771 variable.c         if (!FL_TEST(obj, FL_EXIVAR)) return 0;
FL_TEST           899 variable.c         if (!FL_TEST(obj, FL_EXIVAR)) return;
FL_TEST           927 variable.c     	if (FL_TEST(obj, FL_EXIVAR) || rb_special_const_p(obj))
FL_TEST           980 variable.c     	if (FL_TEST(obj, FL_EXIVAR) || rb_special_const_p(obj))
FL_TEST          1029 variable.c     	if (FL_TEST(obj, FL_EXIVAR) || rb_special_const_p(obj)) {
FL_TEST          1085 variable.c     	if (FL_TEST(obj, FL_EXIVAR) || rb_special_const_p(obj)) {


FL_UNSET

FL_UNSET           62 array.c        	FL_UNSET(ary, ELTS_SHARED);
FL_UNSET         1526 array.c            FL_UNSET(ary, ARY_TMPLOCK);
FL_UNSET          793 class.c        	FL_UNSET(klass, FL_TAINT);
FL_UNSET         1824 gc.c           		    FL_UNSET(p, FL_FINALIZE);
FL_UNSET          172 hash.c         	    FL_UNSET(hash, HASH_DELETED);
FL_UNSET          509 hash.c             FL_UNSET(hash, HASH_PROC_DEFAULT);
FL_UNSET          880 hash.c         	FL_UNSET(hash, HASH_PROC_DEFAULT);
FL_UNSET         1921 hash.c         		FL_UNSET(RARRAY(keys)->ptr[i], FL_TAINT);
FL_UNSET          616 object.c       	FL_UNSET(obj, FL_TAINT);
FL_UNSET          167 re.c               FL_UNSET(re, KCODE_MASK);
FL_UNSET          175 re.c               FL_UNSET(re, KCODE_MASK);
FL_UNSET          183 re.c               FL_UNSET(re, KCODE_MASK);
FL_UNSET          191 re.c               FL_UNSET(re, KCODE_MASK);
FL_UNSET          808 re.c           	FL_UNSET(re, REG_CASESTATE);
FL_UNSET          940 re.c           	    FL_UNSET(match, FL_TAINT);
FL_UNSET          841 ruby.c         	FL_UNSET(rb_argv, FL_TAINT);
FL_UNSET          842 ruby.c         	FL_UNSET(rb_load_path, FL_TAINT);
FL_UNSET          241 string.c           FL_UNSET(str, STR_NOCAPA);
FL_UNSET          252 string.c           FL_UNSET(str2, STR_NOCAPA);
FL_UNSET          443 string.c           FL_UNSET(str, STR_NOCAPA);
FL_UNSET          599 string.c           FL_UNSET(str, STR_TMPLOCK);
FL_UNSET          635 string.c       	FL_UNSET(str, STR_ASSOC);
FL_UNSET          692 string.c       	FL_UNSET(str, STR_ASSOC);
FL_UNSET         2020 string.c       	FL_UNSET(str, STR_NOCAPA);
FL_UNSET         2116 string.c       	FL_UNSET(str, STR_ASSOC);
FL_UNSET         2151 string.c           FL_UNSET(str, STR_NOCAPA);
FL_UNSET         1190 variable.c         FL_UNSET(fn, FL_TAINT);


FL_USER0

FL_USER0          154 re.c           #define REG_CASESTATE  FL_USER0
FL_USER0          448 ruby.h         #define FL_SINGLETON FL_USER0


FL_USER1

FL_USER1           42 array.c        #define ARY_TMPLOCK  FL_USER1
FL_USER1         8042 eval.c         #define PROC_TMASK  (FL_USER1|FL_USER2|FL_USER3)
FL_USER1           24 hash.c         #define HASH_DELETED  FL_USER1
FL_USER1          156 re.c           #define KCODE_EUC   FL_USER1
FL_USER1           30 string.c       #define STR_TMPLOCK FL_USER1


FL_USER2

FL_USER2          753 eval.c         #define DVAR_DONT_RECYCLE FL_USER2
FL_USER2         8042 eval.c         #define PROC_TMASK  (FL_USER1|FL_USER2|FL_USER3)
FL_USER2           25 hash.c         #define HASH_PROC_DEFAULT FL_USER2
FL_USER2          571 marshal.c      	    else if (FL_TEST(obj, FL_USER2)) {
FL_USER2          157 re.c           #define KCODE_SJIS  FL_USER2
FL_USER2          782 re.c           #define MATCH_BUSY FL_USER2
FL_USER2          349 ruby.h         #define ELTS_SHARED FL_USER2


FL_USER3

FL_USER3         8042 eval.c         #define PROC_TMASK  (FL_USER1|FL_USER2|FL_USER3)
FL_USER3          906 gc.c           #define STR_ASSOC FL_USER3   /* copied from string.c */
FL_USER3          158 re.c           #define KCODE_UTF8  FL_USER3
FL_USER3           31 string.c       #define STR_ASSOC   FL_USER3


FL_USER4

FL_USER4         8044 eval.c         #define PROC_SAFE_SAVED FL_USER4
FL_USER4          159 re.c           #define KCODE_FIXED FL_USER4


FL_USHIFT

FL_USHIFT        8041 eval.c         #define PROC_TSHIFT (FL_USHIFT+1)
FL_USHIFT         458 ruby.h         #define FL_USER0     (1<<(FL_USHIFT+0))
FL_USHIFT         459 ruby.h         #define FL_USER1     (1<<(FL_USHIFT+1))
FL_USHIFT         460 ruby.h         #define FL_USER2     (1<<(FL_USHIFT+2))
FL_USHIFT         461 ruby.h         #define FL_USER3     (1<<(FL_USHIFT+3))
FL_USHIFT         462 ruby.h         #define FL_USER4     (1<<(FL_USHIFT+4))
FL_USHIFT         463 ruby.h         #define FL_USER5     (1<<(FL_USHIFT+5))
FL_USHIFT         464 ruby.h         #define FL_USER6     (1<<(FL_USHIFT+6))
FL_USHIFT         465 ruby.h         #define FL_USER7     (1<<(FL_USHIFT+7))


FMINUS

FMINUS            310 sprintf.c      	    flags |= FMINUS;
FMINUS            351 sprintf.c      		flags |= FMINUS;
FMINUS            403 sprintf.c      		    buf[blen - ((flags & FMINUS) ? width : 1)] = c;
FMINUS            427 sprintf.c      			if (!(flags&FMINUS)) {
FMINUS            434 sprintf.c      			if (flags&FMINUS) {
FMINUS            659 sprintf.c      		if (!(flags&FMINUS)) {
FMINUS            725 sprintf.c      		    if (flags & FMINUS) {
FMINUS            806 sprintf.c          if (flags & FMINUS) *buf++ = '-';


FMODE_APPEND

FMODE_APPEND      999 ext/stringio/stringio.c     if (ptr->flags & FMODE_APPEND) {
FMODE_APPEND     1055 ext/stringio/stringio.c     if (ptr->flags & FMODE_APPEND) {
FMODE_APPEND     2400 io.c               if (flags & FMODE_APPEND) {
FMODE_APPEND     2435 io.c           	flags |= FMODE_WRITABLE | FMODE_APPEND | FMODE_CREATE;
FMODE_APPEND     2476 io.c           	flags |= FMODE_APPEND;


FMODE_BINMODE

FMODE_BINMODE    2381 io.c               if (!(fptr->mode & FMODE_BINMODE) && READ_DATA_BUFFERED(fptr)) {
FMODE_BINMODE    2387 io.c               fptr->mode |= FMODE_BINMODE;
FMODE_BINMODE    2396 io.c           # define MODE_BINMODE(a,b) ((flags & FMODE_BINMODE) ? (b) : (a))
FMODE_BINMODE    2445 io.c                       flags |= FMODE_BINMODE;
FMODE_BINMODE    2483 io.c           	flags |= FMODE_BINMODE;
FMODE_BINMODE    3347 io.c               if (fptr->mode & FMODE_BINMODE) {
FMODE_BINMODE    3463 io.c               if (fptr->mode & FMODE_BINMODE) {
FMODE_BINMODE    3948 io.c           	    if ((ofp->mode ^ fmode) & (FMODE_READWRITE|FMODE_BINMODE)) {
FMODE_BINMODE    4088 io.c                   if (fptr->mode & FMODE_BINMODE)


FMODE_CREATE

FMODE_CREATE     2412 io.c           	if (flags & FMODE_CREATE) {
FMODE_CREATE     2432 io.c           	flags |= FMODE_WRITABLE | FMODE_CREATE;
FMODE_CREATE     2435 io.c           	flags |= FMODE_WRITABLE | FMODE_APPEND | FMODE_CREATE;
FMODE_CREATE     2479 io.c           	flags |= FMODE_CREATE;


FMODE_DUPLEX

FMODE_DUPLEX      210 ext/socket/socket.c     fp->mode = FMODE_READWRITE|FMODE_DUPLEX;
FMODE_DUPLEX      250 io.c               if (fptr->rbuf_len == 0 || fptr->mode & FMODE_DUPLEX)
FMODE_DUPLEX      256 io.c                       fptr->mode |= FMODE_DUPLEX;
FMODE_DUPLEX     2643 io.c                   fptr->mode |= FMODE_TTY|FMODE_DUPLEX;
FMODE_DUPLEX     2953 io.c               fptr->mode = modef | FMODE_SYNC|FMODE_DUPLEX;


FMODE_NOREVLOOKUP

FMODE_NOREVLOOKUP  212 ext/socket/socket.c 	fp->mode |= FMODE_NOREVLOOKUP;
FMODE_NOREVLOOKUP  523 ext/socket/socket.c     return (fptr->mode & FMODE_NOREVLOOKUP) ? Qtrue : Qfalse;
FMODE_NOREVLOOKUP  536 ext/socket/socket.c 	fptr->mode |= FMODE_NOREVLOOKUP;
FMODE_NOREVLOOKUP  539 ext/socket/socket.c 	fptr->mode &= ~FMODE_NOREVLOOKUP;
FMODE_NOREVLOOKUP  617 ext/socket/socket.c 	  return rb_assoc_new(str, ipaddr((struct sockaddr*)buf, fptr->mode & FMODE_NOREVLOOKUP));
FMODE_NOREVLOOKUP 1529 ext/socket/socket.c     return ipaddr((struct sockaddr*)&addr, fptr->mode & FMODE_NOREVLOOKUP);
FMODE_NOREVLOOKUP 1544 ext/socket/socket.c     return ipaddr((struct sockaddr*)&addr, fptr->mode & FMODE_NOREVLOOKUP);


FMODE_PREP

FMODE_PREP       1980 io.c           #define IS_PREP_STDIO(f) ((f)->mode & FMODE_PREP)
FMODE_PREP       3454 io.c               fptr->mode = orig->mode & ~FMODE_PREP;
FMODE_PREP       3866 io.c               VALUE io = prep_io(fileno(f), mode|FMODE_PREP, klass, path);


FMODE_READABLE

FMODE_READABLE    274 ext/socket/socket.c     fptr->mode &= ~FMODE_READABLE;
FMODE_READABLE    289 ext/socket/socket.c     if (!(fptr->mode & FMODE_READABLE)) {
FMODE_READABLE    100 ext/stringio/stringio.c #define READABLE(ptr) ((ptr)->flags & FMODE_READABLE)
FMODE_READABLE    248 ext/stringio/stringio.c 	ptr->flags = OBJ_FROZEN(string) ? FMODE_READABLE : FMODE_READWRITE;
FMODE_READABLE    365 ext/stringio/stringio.c     ptr->flags = OBJ_FROZEN(string) ? FMODE_READABLE : FMODE_READWRITE;
FMODE_READABLE    405 ext/stringio/stringio.c     ptr->flags &= ~FMODE_READABLE;
FMODE_READABLE    310 io.c               if (!(fptr->mode & FMODE_READABLE)) {
FMODE_READABLE    728 io.c               if (fptr->mode & FMODE_READABLE) {
FMODE_READABLE   1174 io.c               of.mode = FMODE_READABLE;
FMODE_READABLE   2009 io.c               fptr->mode &= ~(FMODE_READABLE|FMODE_WRITABLE);
FMODE_READABLE   2162 io.c                   fptr->mode &= ~FMODE_READABLE;
FMODE_READABLE   2208 io.c                   if (!(fptr->mode & FMODE_READABLE))
FMODE_READABLE   2213 io.c               if (fptr->mode & FMODE_READABLE) {
FMODE_READABLE   2245 io.c               if ((fptr->mode & FMODE_READABLE) && READ_DATA_BUFFERED(fptr)) {
FMODE_READABLE   2407 io.c                 case FMODE_READABLE:
FMODE_READABLE   2429 io.c           	flags |= FMODE_READABLE;
FMODE_READABLE   2465 io.c           	flags = FMODE_READABLE;
FMODE_READABLE   2783 io.c               if ((p->modef & FMODE_READABLE) && (p->modef & FMODE_WRITABLE)) {
FMODE_READABLE   2790 io.c               else if (p->modef & FMODE_READABLE) {
FMODE_READABLE   2860 io.c               if ((modef & FMODE_READABLE) && (modef & FMODE_WRITABLE)) {
FMODE_READABLE   2864 io.c               else if (modef & FMODE_READABLE) {
FMODE_READABLE   2899 io.c               if ((modef & FMODE_READABLE) && (modef & FMODE_WRITABLE)) {
FMODE_READABLE   2903 io.c               else if (modef & FMODE_READABLE) {
FMODE_READABLE   3294 io.c               if (orig->mode & FMODE_READABLE) {
FMODE_READABLE   3337 io.c           	if ((orig->mode & FMODE_READABLE) && pos >= 0) {
FMODE_READABLE   4176 io.c           		current_file = prep_io(fr, FMODE_READABLE, rb_cFile, fn);
FMODE_READABLE   5562 io.c               rb_stdin = prep_stdio(stdin, FMODE_READABLE, rb_cIO, "<STDIN>");


FMODE_READWRITE

FMODE_READWRITE   210 ext/socket/socket.c     fp->mode = FMODE_READWRITE|FMODE_DUPLEX;
FMODE_READWRITE    99 ext/stringio/stringio.c #define CLOSED(ptr) (!((ptr)->flags & FMODE_READWRITE))
FMODE_READWRITE   248 ext/stringio/stringio.c 	ptr->flags = OBJ_FROZEN(string) ? FMODE_READABLE : FMODE_READWRITE;
FMODE_READWRITE   252 ext/stringio/stringio.c 	ptr->flags = FMODE_READWRITE;
FMODE_READWRITE   265 ext/stringio/stringio.c     ptr->flags &= ~FMODE_READWRITE;
FMODE_READWRITE   363 ext/stringio/stringio.c     ptr->flags &= ~FMODE_READWRITE;
FMODE_READWRITE   365 ext/stringio/stringio.c     ptr->flags = OBJ_FROZEN(string) ? FMODE_READABLE : FMODE_READWRITE;
FMODE_READWRITE   386 ext/stringio/stringio.c     ptr->flags &= ~FMODE_READWRITE;
FMODE_READWRITE  2401 io.c           	if ((flags & FMODE_READWRITE) == FMODE_READWRITE) {
FMODE_READWRITE  2406 io.c               switch (flags & FMODE_READWRITE) {
FMODE_READWRITE  2411 io.c                 case FMODE_READWRITE:
FMODE_READWRITE  2448 io.c                       flags |= FMODE_READWRITE;
FMODE_READWRITE  2471 io.c           	flags = FMODE_READWRITE;
FMODE_READWRITE  3286 io.c           	if ((fptr->mode & FMODE_READWRITE) != (orig->mode & FMODE_READWRITE)) {
FMODE_READWRITE  3397 io.c           	    (fptr->mode & FMODE_READWRITE) != (flags & FMODE_READWRITE)) {
FMODE_READWRITE  3948 io.c           	    if ((ofp->mode ^ fmode) & (FMODE_READWRITE|FMODE_BINMODE)) {


FMODE_SYNC

FMODE_SYNC        431 ext/pty/pty.c      wfptr->mode = rb_io_mode_flags("w") | FMODE_SYNC;
FMODE_SYNC        304 io.c           #define FMODE_SYNCWRITE (FMODE_SYNC|FMODE_WRITABLE)
FMODE_SYNC        550 io.c               if (fptr->wbuf == NULL && !(fptr->mode & FMODE_SYNC)) {
FMODE_SYNC        556 io.c               if ((fptr->mode & FMODE_SYNC) ||
FMODE_SYNC        970 io.c               return (fptr->mode & FMODE_SYNC) ? Qtrue : Qfalse;
FMODE_SYNC        995 io.c           	fptr->mode |= FMODE_SYNC;
FMODE_SYNC        998 io.c           	fptr->mode &= ~FMODE_SYNC;
FMODE_SYNC       2765 io.c               fptr->mode |= FMODE_SYNC;
FMODE_SYNC       2953 io.c               fptr->mode = modef | FMODE_SYNC|FMODE_DUPLEX;
FMODE_SYNC       5566 io.c               rb_stderr = prep_stdio(stderr, FMODE_WRITABLE|FMODE_SYNC, rb_cIO, "<STDERR>");


FMODE_TTY

FMODE_TTY         558 io.c                   ((fptr->mode & FMODE_TTY) && memchr(RSTRING(str)->ptr+offset, '\n', len))) {
FMODE_TTY         866 io.c               if (fptr->fd == 0 && (fptr->mode & FMODE_TTY) && TYPE(rb_stdout) == T_FILE) {
FMODE_TTY         869 io.c                   if (ofp->mode & FMODE_TTY) {
FMODE_TTY        2643 io.c                   fptr->mode |= FMODE_TTY|FMODE_DUPLEX;


FMODE_WRITABLE

FMODE_WRITABLE    271 ext/socket/socket.c     if (!(fptr->mode & FMODE_WRITABLE)) {
FMODE_WRITABLE    293 ext/socket/socket.c     fptr->mode &= ~FMODE_WRITABLE;
FMODE_WRITABLE    101 ext/stringio/stringio.c #define WRITABLE(ptr) ((ptr)->flags & FMODE_WRITABLE)
FMODE_WRITABLE    238 ext/stringio/stringio.c 	if ((ptr->flags & FMODE_WRITABLE) && OBJ_FROZEN(string)) {
FMODE_WRITABLE    424 ext/stringio/stringio.c     ptr->flags &= ~FMODE_WRITABLE;
FMODE_WRITABLE   3009 file.c             if (!(fptr->mode & FMODE_WRITABLE)) {
FMODE_WRITABLE   3111 file.c             if (fptr->mode & FMODE_WRITABLE) {
FMODE_WRITABLE    304 io.c           #define FMODE_SYNCWRITE (FMODE_SYNC|FMODE_WRITABLE)
FMODE_WRITABLE    322 io.c               if (!(fptr->mode & FMODE_WRITABLE)) {
FMODE_WRITABLE    620 io.c               of.mode = FMODE_WRITABLE;
FMODE_WRITABLE    725 io.c               if (fptr->mode & FMODE_WRITABLE) {
FMODE_WRITABLE   2009 io.c               fptr->mode &= ~(FMODE_READABLE|FMODE_WRITABLE);
FMODE_WRITABLE   2163 io.c                   if (!(fptr->mode & FMODE_WRITABLE))
FMODE_WRITABLE   2167 io.c               if (fptr->mode & FMODE_WRITABLE) {
FMODE_WRITABLE   2207 io.c                   fptr->mode &= ~FMODE_WRITABLE;
FMODE_WRITABLE   2248 io.c               if ((fptr->mode & FMODE_WRITABLE) && fptr->wbuf_len) {
FMODE_WRITABLE   2409 io.c                 case FMODE_WRITABLE:
FMODE_WRITABLE   2432 io.c           	flags |= FMODE_WRITABLE | FMODE_CREATE;
FMODE_WRITABLE   2435 io.c           	flags |= FMODE_WRITABLE | FMODE_APPEND | FMODE_CREATE;
FMODE_WRITABLE   2468 io.c           	flags = FMODE_WRITABLE;
FMODE_WRITABLE   2783 io.c               if ((p->modef & FMODE_READABLE) && (p->modef & FMODE_WRITABLE)) {
FMODE_WRITABLE   2860 io.c               if ((modef & FMODE_READABLE) && (modef & FMODE_WRITABLE)) {
FMODE_WRITABLE   2868 io.c               else if (modef & FMODE_WRITABLE) {
FMODE_WRITABLE   2899 io.c               if ((modef & FMODE_READABLE) && (modef & FMODE_WRITABLE)) {
FMODE_WRITABLE   3297 io.c               if (orig->mode & FMODE_WRITABLE) {
FMODE_WRITABLE   3300 io.c               if (fptr->mode & FMODE_WRITABLE) {
FMODE_WRITABLE   4173 io.c           		    rb_stdout = prep_io(fw, FMODE_WRITABLE, rb_cFile, fn);
FMODE_WRITABLE   5564 io.c               rb_stdout = prep_stdio(stdout, FMODE_WRITABLE, rb_cIO, "<STDOUT>");
FMODE_WRITABLE   5566 io.c               rb_stderr = prep_stdio(stderr, FMODE_WRITABLE|FMODE_SYNC, rb_cIO, "<STDERR>");


FMODE_WSPLIT

FMODE_WSPLIT      405 io.c                       fptr->mode |= FMODE_WSPLIT;
FMODE_WSPLIT      409 io.c               return fptr->mode & FMODE_WSPLIT;
FMODE_WSPLIT     4656 io.c                   fptr->mode &= ~FMODE_WSPLIT;
FMODE_WSPLIT     4659 io.c                   fptr->mode &= ~(FMODE_WSPLIT_INITIALIZED|FMODE_WSPLIT);


FMODE_WSPLIT_INITIALIZED

FMODE_WSPLIT_INITIALIZED  396 io.c               if (!(fptr->mode & FMODE_WSPLIT_INITIALIZED)) {
FMODE_WSPLIT_INITIALIZED  407 io.c                   fptr->mode |= FMODE_WSPLIT_INITIALIZED;
FMODE_WSPLIT_INITIALIZED 4655 io.c                   fptr->mode |= FMODE_WSPLIT_INITIALIZED;
FMODE_WSPLIT_INITIALIZED 4659 io.c                   fptr->mode &= ~(FMODE_WSPLIT_INITIALIZED|FMODE_WSPLIT);


FNM_CASEFOLD

FNM_CASEFOLD       83 dir.c          #define FNM_SYSCASE	FNM_CASEFOLD
FNM_CASEFOLD      183 dir.c              const int nocase = flags & FNM_CASEFOLD;
FNM_CASEFOLD      236 dir.c              const int nocase = flags & FNM_CASEFOLD;
FNM_CASEFOLD      947 dir.c              const int nocase = flags & FNM_CASEFOLD;
FNM_CASEFOLD     1840 dir.c              rb_file_const("FNM_CASEFOLD", INT2FIX(FNM_CASEFOLD));


FNM_DOTMATCH

FNM_DOTMATCH      233 dir.c              const int period = !(flags & FNM_DOTMATCH);
FNM_DOTMATCH      310 dir.c              const int period = !(flags & FNM_DOTMATCH);
FNM_DOTMATCH     1839 dir.c              rb_file_const("FNM_DOTMATCH", INT2FIX(FNM_DOTMATCH));


FNM_NOESCAPE

FNM_NOESCAPE      184 dir.c              const int escape = !(flags & FNM_NOESCAPE);
FNM_NOESCAPE      235 dir.c              const int escape = !(flags & FNM_NOESCAPE);
FNM_NOESCAPE      946 dir.c              const int escape = !(flags & FNM_NOESCAPE);
FNM_NOESCAPE      979 dir.c              const int escape = !(flags & FNM_NOESCAPE);
FNM_NOESCAPE     1162 dir.c              int escape = !(flags & FNM_NOESCAPE);
FNM_NOESCAPE     1384 dir.c              const int escape = !(flags & FNM_NOESCAPE);
FNM_NOESCAPE     1837 dir.c              rb_file_const("FNM_NOESCAPE", INT2FIX(FNM_NOESCAPE));


FNM_NOMATCH

FNM_NOMATCH       245 dir.c          	RETURN(FNM_NOMATCH);
FNM_NOMATCH       256 dir.c          		RETURN(FNM_NOMATCH);
FNM_NOMATCH       263 dir.c          		RETURN(FNM_NOMATCH);
FNM_NOMATCH       271 dir.c          		RETURN(FNM_NOMATCH);
FNM_NOMATCH       284 dir.c          	    RETURN(ISEND(p) ? 0 : FNM_NOMATCH);
FNM_NOMATCH       300 dir.c          	RETURN(FNM_NOMATCH);
FNM_NOMATCH       343 dir.c          	    return FNM_NOMATCH;


FNM_PATHNAME

FNM_PATHNAME      234 dir.c              const int pathname = flags & FNM_PATHNAME;
FNM_PATHNAME      311 dir.c              const int pathname = flags & FNM_PATHNAME;
FNM_PATHNAME     1838 dir.c              rb_file_const("FNM_PATHNAME", INT2FIX(FNM_PATHNAME));


FNM_SYSCASE

FNM_SYSCASE       965 dir.c          	    if (!FNM_SYSCASE && ISALPHA(c) && nocase)
FNM_SYSCASE      1316 dir.c              flags |= FNM_SYSCASE;
FNM_SYSCASE      1361 dir.c              if (flags & FNM_SYSCASE) {
FNM_SYSCASE      1841 dir.c              rb_file_const("FNM_SYSCASE", INT2FIX(FNM_SYSCASE));


FNONE

FNONE             251 sprintf.c          int width, prec, flags = FNONE;
FNONE             386 sprintf.c      	    if (flags != FNONE) {
FNONE             783 sprintf.c      	flags = FNONE;


FOLD_MARGIN

FOLD_MARGIN       524 ext/nkf/nkf-utf8/nkf.c STATIC int             fold_margin  = FOLD_MARGIN;
FOLD_MARGIN      4801 ext/nkf/nkf-utf8/nkf.c     fold_margin  = FOLD_MARGIN;


FOPEN

FOPEN            1654 win32/win32.c  	fileflags |= FOPEN;		/* mark as open */
FOPEN            3961 win32/win32.c      if (!(_osfile(fd) & FOPEN)) {


FORCE_NEXT_TOKEN

FORCE_NEXT_TOKEN  428 ext/syck/bytecode.c                 FORCE_NEXT_TOKEN( ']' );
FORCE_NEXT_TOKEN  435 ext/syck/bytecode.c                 FORCE_NEXT_TOKEN( '}' );
FORCE_NEXT_TOKEN  443 ext/syck/bytecode.c                 FORCE_NEXT_TOKEN(YAML_INDENT);
FORCE_NEXT_TOKEN  449 ext/syck/bytecode.c                     FORCE_NEXT_TOKEN(':');
FORCE_NEXT_TOKEN  453 ext/syck/bytecode.c                     FORCE_NEXT_TOKEN(YAML_INDENT);
FORCE_NEXT_TOKEN  478 ext/syck/bytecode.c                 FORCE_NEXT_TOKEN( YAML_IOPEN );
FORCE_NEXT_TOKEN  502 ext/syck/bytecode.c                 FORCE_NEXT_TOKEN( YAML_IOPEN );
FORCE_NEXT_TOKEN 1042 ext/syck/token.c                         FORCE_NEXT_TOKEN(YAML_IOPEN);


FOREACH_BITLEN

FOREACH_BITLEN     31 ext/digest/sha2/sha2init.c     FOREACH_BITLEN(DECLARE_ALGO_CLASS)
FOREACH_BITLEN     46 ext/digest/sha2/sha2init.c     FOREACH_BITLEN(DEFINE_ALGO_CLASS)


FOREACH_CHILD

FOREACH_CHILD     455 win32/win32.c      FOREACH_CHILD(child) {
FOREACH_CHILD     465 win32/win32.c      FOREACH_CHILD(child) {
FOREACH_CHILD     485 win32/win32.c      FOREACH_CHILD(child) {
FOREACH_CHILD    2840 win32/win32.c  	FOREACH_CHILD(child) {


FOREACH_THREAD

FOREACH_THREAD   10361 eval.c             FOREACH_THREAD(th) {
FOREACH_THREAD   11064 eval.c             FOREACH_THREAD(th) {
FOREACH_THREAD   12103 eval.c         	FOREACH_THREAD(th) {
FOREACH_THREAD   12486 eval.c             FOREACH_THREAD(th) {
FOREACH_THREAD   12688 eval.c             FOREACH_THREAD(th) {


FOREACH_THREAD_FROM

FOREACH_THREAD_FROM 9759 eval.c         #define FOREACH_THREAD(x) FOREACH_THREAD_FROM(curr_thread,x)
FOREACH_THREAD_FROM 10009 eval.c             FOREACH_THREAD_FROM(main_thread, th) {
FOREACH_THREAD_FROM 10037 eval.c             FOREACH_THREAD_FROM(main_thread, th) {
FOREACH_THREAD_FROM 10511 eval.c             FOREACH_THREAD_FROM(curr, th) {
FOREACH_THREAD_FROM 10594 eval.c         	    FOREACH_THREAD_FROM(curr, th) {
FOREACH_THREAD_FROM 10611 eval.c          	    FOREACH_THREAD_FROM(curr, th) {
FOREACH_THREAD_FROM 10629 eval.c         	    FOREACH_THREAD_FROM(curr, th) {
FOREACH_THREAD_FROM 10664 eval.c             FOREACH_THREAD_FROM(curr, th) {
FOREACH_THREAD_FROM 10684 eval.c         	FOREACH_THREAD_FROM(curr, th) {
FOREACH_THREAD_FROM 12125 eval.c             FOREACH_THREAD_FROM(curr, th) {


FOUND_CALLED_NODE

FOUND_CALLED_NODE 2687 regcomp.c      	if (ret == FOUND_CALLED_NODE) r = FOUND_CALLED_NODE;
FOUND_CALLED_NODE 2696 regcomp.c            if (r == FOUND_CALLED_NODE)
FOUND_CALLED_NODE 2729 regcomp.c      	r |= FOUND_CALLED_NODE;


FPLUS

FPLUS             305 sprintf.c      	    flags |= FPLUS;
FPLUS             475 sprintf.c      		    if (flags&(FPLUS|FSPACE)) sign = 1;
FPLUS             546 sprintf.c      			else if (flags & FPLUS) {
FPLUS             597 sprintf.c      			else if (flags & FPLUS) {
FPLUS             718 sprintf.c      		    if ((!isnan(fval) && fval < 0.0) || (flags & FPLUS))
FPLUS             728 sprintf.c      			else if (flags & FPLUS)
FPLUS             739 sprintf.c      			else if (flags & FPLUS) {
FPLUS             755 sprintf.c      			else if (flags & FPLUS)
FPLUS             805 sprintf.c          if (flags & FPLUS)  *buf++ = '+';


FPREC

FPREC             358 sprintf.c      	    if (flags & FPREC) {
FPREC             361 sprintf.c      	    flags |= FPREC;
FPREC             368 sprintf.c      		    flags &= ~FPREC;
FPREC             418 sprintf.c      		if (flags&FPREC) {
FPREC             563 sprintf.c      			    else if (!(flags&(FPREC|FZERO))) {
FPREC             622 sprintf.c      				if (!(flags&(FPREC|FZERO))) {
FPREC             651 sprintf.c      		if ((flags&(FZERO|FPREC)) == FZERO) {
FPREC             772 sprintf.c      		need += (flags&FPREC) ? prec : 6;
FPREC             815 sprintf.c          if (flags & FPREC) {


FPT

FPT               724 missing/vsnprintf.c 			flags |= FPT;
FPT               948 missing/vsnprintf.c 		if ((flags & FPT) == 0) {


FRAME_DMETH

FRAME_DMETH      3321 eval.c                             (ruby_frame->prev->flags & FRAME_DMETH)) {
FRAME_DMETH      5667 eval.c         	ruby_frame->flags |= FRAME_DMETH;
FRAME_DMETH      8234 eval.c             if (_block.frame.argc && (ruby_frame->flags & FRAME_DMETH)) {


FRAME_FUNC

FRAME_FUNC       5616 eval.c             ruby_frame->flags = (flags & NOEX_RECV) ? FRAME_FUNC : 0;
FRAME_FUNC       5872 eval.c             calling_scope_t scope = (ruby_frame->flags & FRAME_FUNC) ? CALLING_FCALL : CALLING_NORMAL;


FREE_ENVIRON

FREE_ENVIRON     1667 hash.c             FREE_ENVIRON(environ);
FREE_ENVIRON     1809 hash.c             FREE_ENVIRON(environ);
FREE_ENVIRON     1844 hash.c             FREE_ENVIRON(environ);
FREE_ENVIRON     1881 hash.c             FREE_ENVIRON(environ);
FREE_ENVIRON     1973 hash.c             FREE_ENVIRON(environ);
FREE_ENVIRON     2025 hash.c             FREE_ENVIRON(environ);
FREE_ENVIRON     2049 hash.c             FREE_ENVIRON(environ);
FREE_ENVIRON     2069 hash.c             FREE_ENVIRON(environ);
FREE_ENVIRON     2081 hash.c         	FREE_ENVIRON(environ);
FREE_ENVIRON     2084 hash.c             FREE_ENVIRON(environ);
FREE_ENVIRON     2114 hash.c         		FREE_ENVIRON(environ);
FREE_ENVIRON     2120 hash.c             FREE_ENVIRON(environ);
FREE_ENVIRON     2139 hash.c         		FREE_ENVIRON(environ);
FREE_ENVIRON     2145 hash.c             FREE_ENVIRON(environ);
FREE_ENVIRON     2173 hash.c             FREE_ENVIRON(environ);
FREE_ENVIRON     2199 hash.c             FREE_ENVIRON(environ);


FREE_MIN

FREE_MIN         1056 gc.c           	if (n == heaps[i].limit && freed > FREE_MIN) {
FREE_MIN         1074 gc.c               if (freed < FREE_MIN) {


FSHARP

FSHARP            300 sprintf.c      	    flags |= FSHARP;
FSHARP            478 sprintf.c      		if (flags & FSHARP) {
FSHARP            804 sprintf.c          if (flags & FSHARP) *buf++ = '#';


FSPACE

FSPACE            295 sprintf.c      	    flags |= FSPACE;
FSPACE            475 sprintf.c      		    if (flags&(FPLUS|FSPACE)) sign = 1;
FSPACE            550 sprintf.c      			else if (flags & FSPACE) {
FSPACE            601 sprintf.c      			else if (flags & FSPACE) {
FSPACE            730 sprintf.c      			else if (flags & FSPACE)
FSPACE            743 sprintf.c      			else if (flags & FSPACE) {
FSPACE            808 sprintf.c          if (flags & FSPACE) *buf++ = ' ';


FUNCNAME_PATTERN

FUNCNAME_PATTERN  101 dln.c          #ifndef FUNCNAME_PATTERN
FUNCNAME_PATTERN  124 dln.c              len = strlen(FUNCNAME_PATTERN) + strlen(slash + 1);
FUNCNAME_PATTERN  126 dln.c              snprintf(*buf, len, FUNCNAME_PATTERN, slash + 1);


FWIDTH

FWIDTH            341 sprintf.c      	    flags |= FWIDTH;
FWIDTH            345 sprintf.c      	    if (flags & FWIDTH) {
FWIDTH            348 sprintf.c      	    flags |= FWIDTH;
FWIDTH            398 sprintf.c      		if (!(flags & FWIDTH)) {
FWIDTH            423 sprintf.c      		if (flags&FWIDTH) {
FWIDTH            720 sprintf.c      		    if ((flags & FWIDTH) && need < width)
FWIDTH            773 sprintf.c      		if ((flags&FWIDTH) && need < width)
FWIDTH            810 sprintf.c          if (flags & FWIDTH) {


FZERO

FZERO             315 sprintf.c      	    flags |= FZERO;
FZERO             563 sprintf.c      			    else if (!(flags&(FPREC|FZERO))) {
FZERO             622 sprintf.c      				if (!(flags&(FPREC|FZERO))) {
FZERO             651 sprintf.c      		if ((flags&(FZERO|FPREC)) == FZERO) {
FZERO             734 sprintf.c      		    else if (flags & FZERO) {
FZERO             807 sprintf.c          if (flags & FZERO)  *buf++ = '0';


F_GETFL

F_GETFL           128 ext/fcntl/fcntl.c #ifdef F_GETFL
F_GETFL           129 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "F_GETFL", INT2NUM(F_GETFL));
F_GETFL          1026 ext/socket/socket.c # if defined(F_GETFL)
F_GETFL          1027 ext/socket/socket.c     mode = fcntl(fd, F_GETFL, 0);
F_GETFL           400 io.c           #if defined(HAVE_FCNTL) && defined(F_GETFL) && defined(O_NONBLOCK)
F_GETFL           401 io.c                       && (r = fcntl(fptr->fd, F_GETFL)) != -1 &&
F_GETFL          3925 io.c           #if defined(HAVE_FCNTL) && defined(F_GETFL)
F_GETFL          3926 io.c           	    flags = fcntl(fd, F_GETFL);
F_GETFL            31 missing/dup2.c #ifdef F_GETFL
F_GETFL            32 missing/dup2.c 		if (fcntl(fd1, F_GETFL) < 0)
F_GETFL            34 missing/dup2.c 		if (fcntl(fd2, F_GETFL) >= 0)


F_LOCK

F_LOCK             64 missing/flock.c # ifndef F_LOCK
F_LOCK            101 missing/flock.c 	return lockf (fd, F_LOCK, 0);


F_SETFD

F_SETFD           125 ext/fcntl/fcntl.c #ifdef F_SETFD
F_SETFD           126 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "F_SETFD", INT2NUM(F_SETFD));
F_SETFD          1317 process.c      	if (fcntl(ep[1], F_SETFD, FD_CLOEXEC)) {


F_SETFL

F_SETFL           131 ext/fcntl/fcntl.c #ifdef F_SETFL
F_SETFL           132 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "F_SETFL", INT2NUM(F_SETFL));
F_SETFL          1044 ext/socket/socket.c     fcntl(fd, F_SETFL, mode|NONBLOCKING);
F_SETFL          1118 ext/socket/socket.c 	fcntl(fd, F_SETFL, mode);
F_SETFL          2816 io.c           	fcntl(fd, F_SETFL, FD_CLOEXEC);
F_SETFL          4653 io.c               if (!io_p && cmd == F_SETFL) {
F_SETFL          2770 win32/win32.c      if (cmd != F_SETFL) {


F_TLOCK

F_TLOCK            67 missing/flock.c # ifndef F_TLOCK
F_TLOCK           109 missing/flock.c 	return lockf (fd, F_TLOCK, 0);


F_ULOCK

F_ULOCK            61 missing/flock.c # ifndef F_ULOCK
F_ULOCK           113 missing/flock.c 	return lockf (fd, F_ULOCK, 0);


Fifo

Fifo             3703 ext/nkf/nkf-utf8/nkf.c         (*i_mgetc_buf)(f):Fifo(mime_input++));
Fifo             3714 ext/nkf/nkf-utf8/nkf.c 	Fifo(--mime_input)=c;
Fifo             3730 ext/nkf/nkf-utf8/nkf.c     Fifo(mime_last++)='='; Fifo(mime_last++)='?';
Fifo             3733 ext/nkf/nkf-utf8/nkf.c         c1 = (*i_getc)(f); Fifo(mime_last++)= c1 ;
Fifo             3745 ext/nkf/nkf-utf8/nkf.c             c1 = (*i_getc)(f); Fifo(mime_last++) = c1;
Fifo             3754 ext/nkf/nkf-utf8/nkf.c             c1 = (*i_getc)(f); Fifo(mime_last++) = c1;
Fifo             4026 ext/nkf/nkf-utf8/nkf.c         return  Fifo(mime_top++);
Fifo             4266 ext/nkf/nkf-utf8/nkf.c         Fifo(mime_last++) = cc;
Fifo             4269 ext/nkf/nkf-utf8/nkf.c             Fifo(mime_last++) = cc;
Fifo             4272 ext/nkf/nkf-utf8/nkf.c                 Fifo(mime_last++) = cc;
Fifo             4277 ext/nkf/nkf-utf8/nkf.c     return  Fifo(mime_top++);
Fifo             4285 ext/nkf/nkf-utf8/nkf.c     Fifo(--mime_top) = c;
Fifo             4301 ext/nkf/nkf-utf8/nkf.c     while(*p) Fifo(mime_input++) = *p++;
Fifo             4310 ext/nkf/nkf-utf8/nkf.c             Fifo(mime_input++) = c;
Fifo             4319 ext/nkf/nkf-utf8/nkf.c         Fifo(mime_input++) = c;
Fifo             4323 ext/nkf/nkf-utf8/nkf.c     Fifo(mime_input++) = c;


FilePathValue

FilePathValue     392 dir.c              FilePathValue(dirname);
FilePathValue     761 dir.c          	FilePathValue(path);
FilePathValue     822 dir.c              FilePathValue(*dir);
FilePathValue    1483 dir.c              FilePathValue(str);
FilePathValue    1512 dir.c          	FilePathValue(str);
FilePathValue    6550 eval.c             FilePathValue(fname);
FilePathValue    6923 eval.c         	FilePathValue(fname);
FilePathValue     635 file.c             FilePathValue(file);
FilePathValue     655 file.c         	FilePathValue(*file);
FilePathValue     688 file.c             FilePathValue(fname);
FilePathValue     744 file.c             FilePathValue(fname);
FilePathValue     949 file.c             FilePathValue(fname);
FilePathValue    1070 file.c             FilePathValue(fname);
FilePathValue    1087 file.c             FilePathValue(fname);
FilePathValue    1140 file.c             FilePathValue(fname);
FilePathValue    1157 file.c             FilePathValue(fname);
FilePathValue    1202 file.c             FilePathValue(fname);
FilePathValue    1219 file.c             FilePathValue(fname);
FilePathValue    1339 file.c             FilePathValue(fname);
FilePathValue    1446 file.c             FilePathValue(fname1);
FilePathValue    1448 file.c             FilePathValue(fname2);
FilePathValue    1540 file.c             FilePathValue(fname);
FilePathValue    2042 file.c             FilePathValue(from);
FilePathValue    2043 file.c             FilePathValue(to);
FilePathValue    2072 file.c             FilePathValue(from);
FilePathValue    2073 file.c             FilePathValue(to);
FilePathValue    2106 file.c             FilePathValue(path);
FilePathValue    2173 file.c             FilePathValue(from);
FilePathValue    2174 file.c             FilePathValue(to);
FilePathValue    2404 file.c             FilePathValue(fname);
FilePathValue    2898 file.c         	    FilePathValue(tmp);
FilePathValue    2955 file.c             FilePathValue(path);
FilePathValue    3148 file.c         	    FilePathValue(argv[i]);
FilePathValue    3388 file.c             FilePathValue(fname);
FilePathValue    4129 file.c         	FilePathValue(str);
FilePathValue    4189 file.c         	    FilePathValue(str);
FilePathValue    3064 io.c               FilePathValue(fname);
FilePathValue    3129 io.c               FilePathValue(fname);
FilePathValue    3386 io.c               FilePathValue(fname);
FilePathValue    4957 io.c               FilePathValue(fname);
FilePathValue    4996 io.c               FilePathValue(fname);
FilePathValue    5029 io.c               FilePathValue(fname);


FindFirstFile

FindFirstFile    1399 win32/win32.c      fh = FindFirstFile(scanname, &fd);
FindFirstFile    3260 win32/win32.c      h = FindFirstFile(path, &wfd);


FindFirstFileA

FindFirstFileA    123 wince/io_wce.c 	h = FindFirstFileA( file, &fda );
FindFirstFileA     96 wince/wince.h  #define FindFirstFile FindFirstFileA


FindNextFileA

FindNextFileA     144 wince/io_wce.c 	b = FindNextFileA( (HANDLE)handle, &fda );
FindNextFileA      99 wince/wince.h  #define FindNextFile FindNextFileA


FormatMessage

FormatMessage    1194 dln.c              FormatMessage(
FormatMessage     512 ext/win32ole/win32ole.c     dwCount = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FormatMessage    1763 win32/win32.c  	if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |


FormatMessageA

FormatMessageA   1154 dln.c          #define FormatMessage FormatMessageA
FormatMessageA     69 wince/wince.h  #define FormatMessage FormatMessageA


FreeEnvironmentStrings

FreeEnvironmentStrings 3750 win32/win32.c      FreeEnvironmentStrings(envtop);
FreeEnvironmentStrings  151 wince/wince.h  BOOL FreeEnvironmentStrings(LPSTR lpszEnvironmentBlock);


FreeNode

FreeNode          963 regparse.c     static FreeNode* FreeNodeList = (FreeNode* )NULL;
FreeNode          988 regparse.c     	FreeNode* n = (FreeNode* )node;
FreeNode         1039 regparse.c         FreeNode* n = (FreeNode* )node;
FreeNode         1055 regparse.c       FreeNode* n;


FunctionNum_of_GetCurrentNamespace

FunctionNum_of_GetCurrentNamespace  384 ext/tk/tcltklib.c #      ifndef FunctionNum_of_GetCurrentNamespace
FunctionNum_of_GetCurrentNamespace  390 ext/tk/tcltklib.c     void (*func[FunctionNum_of_GetCurrentNamespace])();


FunctionNum_of_GetFrame

FunctionNum_of_GetFrame  440 ext/tk/tcltklib.c #      ifndef FunctionNum_of_GetFrame
FunctionNum_of_GetFrame  446 ext/tk/tcltklib.c     void (*func[FunctionNum_of_GetFrame])();


FunctionNum_of_PopCallFrame

FunctionNum_of_PopCallFrame  460 ext/tk/tcltklib.c #      ifndef FunctionNum_of_PopCallFrame
FunctionNum_of_PopCallFrame  466 ext/tk/tcltklib.c     void (*func[FunctionNum_of_PopCallFrame])();


G

G                 263 ext/digest/md5/md5.c   t = a + G(b,c,d) + X[k] + Ti;\
G                  80 ext/digest/rmd160/rmd160.c       (a) += G((b), (c), (d)) + (x) + 0x5a827999U;	\
G                 105 ext/digest/rmd160/rmd160.c       (a) += G((b), (c), (d)) + (x) + 0x7a6d76e9U;	\


GC_DEBUG

GC_DEBUG          307 gc.c           #ifdef GC_DEBUG
GC_DEBUG          392 gc.c           #ifdef GC_DEBUG


GC_MALLOC_LIMIT

GC_MALLOC_LIMIT    64 gc.c           #ifndef GC_MALLOC_LIMIT
GC_MALLOC_LIMIT    73 gc.c           static unsigned long malloc_limit = GC_MALLOC_LIMIT;
GC_MALLOC_LIMIT  1071 gc.c           	if (malloc_limit < GC_MALLOC_LIMIT) malloc_limit = GC_MALLOC_LIMIT;


GETA1

GETA1            2021 ext/nkf/nkf-utf8/nkf.c                             (*oconv)(GETA1, GETA2);
GETA1            2034 ext/nkf/nkf-utf8/nkf.c 				(*oconv)(GETA1, GETA2);
GETA1            2060 ext/nkf/nkf-utf8/nkf.c 			    (*oconv)(GETA1, GETA2);
GETA1            3541 ext/nkf/nkf-utf8/nkf.c 	c2 = GETA1;
GETA1            3545 ext/nkf/nkf-utf8/nkf.c 	c2 = GETA1;
GETA1            3554 ext/nkf/nkf-utf8/nkf.c 	    c2 = GETA1;


GETA2

GETA2            2021 ext/nkf/nkf-utf8/nkf.c                             (*oconv)(GETA1, GETA2);
GETA2            2034 ext/nkf/nkf-utf8/nkf.c 				(*oconv)(GETA1, GETA2);
GETA2            2060 ext/nkf/nkf-utf8/nkf.c 			    (*oconv)(GETA1, GETA2);
GETA2            3542 ext/nkf/nkf-utf8/nkf.c 	c1 = GETA2;
GETA2            3546 ext/nkf/nkf-utf8/nkf.c 	c1 = GETA2;
GETA2            3555 ext/nkf/nkf-utf8/nkf.c 	    c1 = GETA2;


GETARG

GETARG            132 sprintf.c      	tmp = GETARG(); \
GETARG            394 sprintf.c      		VALUE val = GETARG();
GETARG            411 sprintf.c      		VALUE arg = GETARG();
GETARG            455 sprintf.c      		volatile VALUE val = GETARG();
GETARG            702 sprintf.c      		VALUE val = GETARG();


GETASTER

GETASTER          349 sprintf.c      	    GETASTER(width);
GETASTER          366 sprintf.c      		GETASTER(prec);


GETGROUPS_T

GETGROUPS_T       789 file.c         group_member(GETGROUPS_T gid)
GETGROUPS_T       804 file.c         	GETGROUPS_T gary[NGROUPS];


GETNTHARG

GETNTHARG         105 sprintf.c          (posarg = nextarg++, GETNTHARG(posarg)))
GETNTHARG         110 sprintf.c      	       (posarg = -1, GETNTHARG(n))))
GETNTHARG         240 sprintf.c          return rb_str_format(argc - 1, argv + 1, GETNTHARG(0));


GETPGRP_VOID

GETPGRP_VOID      171 defines.h      #ifndef GETPGRP_VOID
GETPGRP_VOID     1683 process.c      #if defined(HAVE_GETPGRP) && defined(GETPGRP_VOID)


GETPOSARG

GETPOSARG         129 sprintf.c      	tmp = GETPOSARG(n); \
GETPOSARG         336 sprintf.c      		nextvalue = GETPOSARG(n);


GETTIME

GETTIME          1088 regexec.c        GETTIME(ts);\
GETTIME          1092 regexec.c        GETTIME(te);\


GET_2BYTE_INT_INC

GET_2BYTE_INT_INC  299 regint.h       #define GET_SHORT_INC(i,p)     GET_2BYTE_INT_INC(short,i,p)
GET_2BYTE_INT_INC  310 regint.h       #define GET_INT_INC(i,p)       GET_2BYTE_INT_INC(int,i,p)
GET_2BYTE_INT_INC  311 regint.h       #define GET_UINT_INC(i,p)      GET_2BYTE_INT_INC(unsigned,i,p)


GET_4BYTE_INT_INC

GET_4BYTE_INT_INC  302 regint.h       #define GET_SHORT_INC(i,p)     GET_4BYTE_INT_INC(short,i,p)
GET_4BYTE_INT_INC  315 regint.h       #define GET_INT_INC(i,p)       GET_4BYTE_INT_INC(int,i,p)
GET_4BYTE_INT_INC  316 regint.h       #define GET_UINT_INC(i,p)      GET_4BYTE_INT_INC(unsigned,i,p)


GET_8BYTE_INT_INC

GET_8BYTE_INT_INC  305 regint.h       #define GET_SHORT_INC(i,p)     GET_8BYTE_INT_INC(short,i,p)
GET_8BYTE_INT_INC  320 regint.h       #define GET_INT_INC(i,p)       GET_8BYTE_INT_INC(int,i,p)
GET_8BYTE_INT_INC  321 regint.h       #define GET_UINT_INC(i,p)      GET_8BYTE_INT_INC(unsigned,i,p)


GET_ABSADDR_INC

GET_ABSADDR_INC  5170 regcomp.c            GET_ABSADDR_INC(addr, bp);
GET_ABSADDR_INC  2519 regexec.c            GET_ABSADDR_INC(addr, p);


GET_AI

GET_AI            447 ext/socket/getaddrinfo.c 				GET_AI(cur->ai_next, afd, afd->a_addrany, port);
GET_AI            452 ext/socket/getaddrinfo.c 				GET_AI(cur->ai_next, afd, afd->a_loopback,
GET_AI            500 ext/socket/getaddrinfo.c 					GET_AI(top, &afdl[i], pton, port);
GET_AI            563 ext/socket/getaddrinfo.c 		GET_AI(cur, afd, hp->h_addr_list[0], port);
GET_AI            566 ext/socket/getaddrinfo.c 		GET_AI(cur, afd, numaddr, port);
GET_AI            664 ext/socket/getaddrinfo.c 			GET_AI(cur->ai_next, &afdl[N_INET6], ap, port);
GET_AI            671 ext/socket/getaddrinfo.c 		GET_AI(cur->ai_next, afd, ap, port);


GET_CANONNAME

GET_CANONNAME     564 ext/socket/getaddrinfo.c 		GET_CANONNAME(cur, hp->h_name);
GET_CANONNAME     674 ext/socket/getaddrinfo.c 			GET_CANONNAME(top, hp->h_name);


GET_CHAR_LEN_TOP_ALT_VARLEN

GET_CHAR_LEN_TOP_ALT_VARLEN 2022 regcomp.c      	    r = GET_CHAR_LEN_TOP_ALT_VARLEN;
GET_CHAR_LEN_TOP_ALT_VARLEN 2893 regcomp.c        else if (r == GET_CHAR_LEN_TOP_ALT_VARLEN) {


GET_CHAR_LEN_VARLEN

GET_CHAR_LEN_VARLEN 2024 regcomp.c      	    r = GET_CHAR_LEN_VARLEN;
GET_CHAR_LEN_VARLEN 2052 regcomp.c      	r = GET_CHAR_LEN_VARLEN;
GET_CHAR_LEN_VARLEN 2061 regcomp.c            r = GET_CHAR_LEN_VARLEN;
GET_CHAR_LEN_VARLEN 2110 regcomp.c          r = GET_CHAR_LEN_VARLEN;
GET_CHAR_LEN_VARLEN 2891 regcomp.c        else if (r == GET_CHAR_LEN_VARLEN)


GET_CODE_POINT

GET_CODE_POINT   5269 regcomp.c            GET_CODE_POINT(code, q);
GET_CODE_POINT   5283 regcomp.c            GET_CODE_POINT(code, q);
GET_CODE_POINT   1152 regexec.c        GET_CODE_POINT(n, p);
GET_CODE_POINT   1607 regparse.c         GET_CODE_POINT(n, bbuf->p);
GET_CODE_POINT   1688 regparse.c       GET_CODE_POINT(n, data);
GET_CODE_POINT   1754 regparse.c       GET_CODE_POINT(n1, data1);
GET_CODE_POINT   1838 regparse.c       GET_CODE_POINT(n1, data1);
GET_CODE_POINT   1839 regparse.c       GET_CODE_POINT(n2, data2);


GET_ENVIRON

GET_ENVIRON      1656 hash.c             env = GET_ENVIRON(environ);
GET_ENVIRON      1801 hash.c             env = GET_ENVIRON(environ);
GET_ENVIRON      1836 hash.c             env = GET_ENVIRON(environ);
GET_ENVIRON      1872 hash.c             env = GET_ENVIRON(environ);
GET_ENVIRON      1961 hash.c             env = GET_ENVIRON(environ);
GET_ENVIRON      2009 hash.c             env = GET_ENVIRON(environ);
GET_ENVIRON      2040 hash.c             env = GET_ENVIRON(environ);
GET_ENVIRON      2066 hash.c             env = GET_ENVIRON(environ);
GET_ENVIRON      2079 hash.c             env = GET_ENVIRON(environ);
GET_ENVIRON      2108 hash.c             env = GET_ENVIRON(environ);
GET_ENVIRON      2132 hash.c             env = GET_ENVIRON(environ);
GET_ENVIRON      2164 hash.c             env = GET_ENVIRON(environ);
GET_ENVIRON      2189 hash.c             env = GET_ENVIRON(environ);


GET_LENGTH_INC

GET_LENGTH_INC   5174 regcomp.c            GET_LENGTH_INC(len, bp);
GET_LENGTH_INC   5206 regcomp.c            GET_LENGTH_INC(len, bp);
GET_LENGTH_INC   5218 regcomp.c            GET_LENGTH_INC(len, bp);
GET_LENGTH_INC   5223 regcomp.c            GET_LENGTH_INC(len, bp);
GET_LENGTH_INC   5231 regcomp.c      	GET_LENGTH_INC(mb_len, bp);
GET_LENGTH_INC   5232 regcomp.c      	GET_LENGTH_INC(len, bp);
GET_LENGTH_INC   5245 regcomp.c            GET_LENGTH_INC(len, bp);
GET_LENGTH_INC   5264 regcomp.c            GET_LENGTH_INC(len, bp);
GET_LENGTH_INC   5278 regcomp.c            GET_LENGTH_INC(len, bp);
GET_LENGTH_INC   5307 regcomp.c            GET_LENGTH_INC(len, bp);
GET_LENGTH_INC   5336 regcomp.c            GET_LENGTH_INC(len, bp);
GET_LENGTH_INC   5342 regcomp.c            GET_LENGTH_INC(len, bp);
GET_LENGTH_INC   1469 regexec.c            GET_LENGTH_INC(tlen, p);
GET_LENGTH_INC   1484 regexec.c      	GET_LENGTH_INC(tlen, p);
GET_LENGTH_INC   1565 regexec.c            GET_LENGTH_INC(tlen, p);
GET_LENGTH_INC   1579 regexec.c            GET_LENGTH_INC(tlen, p);
GET_LENGTH_INC   1595 regexec.c            GET_LENGTH_INC(tlen,  p);  /* mb-len */
GET_LENGTH_INC   1596 regexec.c            GET_LENGTH_INC(tlen2, p);  /* string len */
GET_LENGTH_INC   1620 regexec.c            GET_LENGTH_INC(tlen, p);
GET_LENGTH_INC   1656 regexec.c      	GET_LENGTH_INC(tlen, p);
GET_LENGTH_INC   1675 regexec.c      	GET_LENGTH_INC(tlen, p);
GET_LENGTH_INC   1681 regexec.c            GET_LENGTH_INC(tlen, p);
GET_LENGTH_INC   1723 regexec.c      	GET_LENGTH_INC(tlen, p);
GET_LENGTH_INC   2119 regexec.c      	GET_LENGTH_INC(tlen, p);
GET_LENGTH_INC   2158 regexec.c      	GET_LENGTH_INC(tlen, p);
GET_LENGTH_INC   2485 regexec.c            GET_LENGTH_INC(tlen, p);
GET_LENGTH_INC   2495 regexec.c            GET_LENGTH_INC(tlen, p);


GET_MEMNUM_INC

GET_MEMNUM_INC   5309 regcomp.c      	GET_MEMNUM_INC(mem, bp);
GET_MEMNUM_INC   1981 regexec.c            GET_MEMNUM_INC(mem, p);
GET_MEMNUM_INC   1988 regexec.c            GET_MEMNUM_INC(mem, p);
GET_MEMNUM_INC   1995 regexec.c            GET_MEMNUM_INC(mem, p);
GET_MEMNUM_INC   2002 regexec.c            GET_MEMNUM_INC(mem, p);
GET_MEMNUM_INC   2010 regexec.c            GET_MEMNUM_INC(mem, p);
GET_MEMNUM_INC   2019 regexec.c            GET_MEMNUM_INC(mem, p);
GET_MEMNUM_INC   2050 regexec.c            GET_MEMNUM_INC(mem, p);
GET_MEMNUM_INC   2083 regexec.c            GET_MEMNUM_INC(mem, p);
GET_MEMNUM_INC   2121 regexec.c      	  GET_MEMNUM_INC(mem, p);
GET_MEMNUM_INC   2160 regexec.c      	  GET_MEMNUM_INC(mem, p);
GET_MEMNUM_INC   2207 regexec.c            GET_MEMNUM_INC(mem, p);    /* mem: null check id */
GET_MEMNUM_INC   2217 regexec.c      	GET_MEMNUM_INC(mem, p); /* mem: null check id */
GET_MEMNUM_INC   2252 regexec.c      	GET_MEMNUM_INC(mem, p); /* mem: null check id */
GET_MEMNUM_INC   2274 regexec.c      	GET_MEMNUM_INC(mem, p); /* mem: null check id */
GET_MEMNUM_INC   2346 regexec.c      	GET_MEMNUM_INC(mem, p);    /* mem: OP_REPEAT ID */
GET_MEMNUM_INC   2363 regexec.c      	GET_MEMNUM_INC(mem, p);    /* mem: OP_REPEAT ID */
GET_MEMNUM_INC   2380 regexec.c            GET_MEMNUM_INC(mem, p); /* mem: OP_REPEAT ID */
GET_MEMNUM_INC   2403 regexec.c            GET_MEMNUM_INC(mem, p); /* mem: OP_REPEAT ID */
GET_MEMNUM_INC   2410 regexec.c            GET_MEMNUM_INC(mem, p); /* mem: OP_REPEAT ID */
GET_MEMNUM_INC   2438 regexec.c            GET_MEMNUM_INC(mem, p); /* mem: OP_REPEAT ID */


GET_OPTION_INC

GET_OPTION_INC   2193 regexec.c            GET_OPTION_INC(option, p);
GET_OPTION_INC   2201 regexec.c            GET_OPTION_INC(option, p);


GET_POINTER_INC

GET_POINTER_INC  5292 regcomp.c              GET_POINTER_INC(cc, bp);
GET_POINTER_INC  1738 regexec.c              GET_POINTER_INC(node, p);


GET_RELADDR_INC

GET_RELADDR_INC  5166 regcomp.c            GET_RELADDR_INC(addr, bp);
GET_RELADDR_INC  5341 regcomp.c            GET_RELADDR_INC(addr, bp);
GET_RELADDR_INC  2298 regexec.c            GET_RELADDR_INC(addr, p);
GET_RELADDR_INC  2306 regexec.c            GET_RELADDR_INC(addr, p);
GET_RELADDR_INC  2319 regexec.c            GET_RELADDR_INC(addr, p);
GET_RELADDR_INC  2332 regexec.c            GET_RELADDR_INC(addr, p);
GET_RELADDR_INC  2347 regexec.c      	GET_RELADDR_INC(addr, p);
GET_RELADDR_INC  2364 regexec.c      	GET_RELADDR_INC(addr, p);
GET_RELADDR_INC  2461 regexec.c            GET_RELADDR_INC(addr, p);
GET_RELADDR_INC  2494 regexec.c            GET_RELADDR_INC(addr, p);


GET_SCANNER

GET_SCANNER       271 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       290 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       317 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       362 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       388 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       408 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       429 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       697 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       736 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       779 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       819 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       845 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       867 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       897 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       916 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       933 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       955 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER       993 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER      1022 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER      1042 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER      1057 ext/strscan/strscan.c     GET_SCANNER(self, p);
GET_SCANNER      1074 ext/strscan/strscan.c     GET_SCANNER(self, p);


GET_SHORT

GET_SHORT         673 ext/sdbm/_sdbm.c 	off = ((n = GET_SHORT(ino,0)) > 0) ? GET_SHORT(ino,n) : PBLKSIZ;
GET_SHORT         692 ext/sdbm/_sdbm.c 	off = ((n = GET_SHORT(ino,0)) > 0) ? GET_SHORT(ino,n) : PBLKSIZ;
GET_SHORT         710 ext/sdbm/_sdbm.c 	PUT_SHORT(ino,0,GET_SHORT(ino,0) + 2);
GET_SHORT         723 ext/sdbm/_sdbm.c 	if ((n = GET_SHORT(ino,0)) == 0)
GET_SHORT         729 ext/sdbm/_sdbm.c 	val.dptr = pag + GET_SHORT(ino,i + 1);
GET_SHORT         730 ext/sdbm/_sdbm.c 	val.dsize = GET_SHORT(ino,i) - GET_SHORT(ino,i + 1);
GET_SHORT         741 ext/sdbm/_sdbm.c 	return GET_SHORT(ino,0) > 0 &&
GET_SHORT         742 ext/sdbm/_sdbm.c 		   seepair(pag, GET_SHORT(ino,0), key.dptr, key.dsize) > 0;
GET_SHORT         756 ext/sdbm/_sdbm.c 	if (GET_SHORT(ino,0) == 0 || num > GET_SHORT(ino,0))
GET_SHORT         759 ext/sdbm/_sdbm.c 	off = (num > 1) ? GET_SHORT(ino,num - 1) : PBLKSIZ;
GET_SHORT         761 ext/sdbm/_sdbm.c 	key.dptr = pag + GET_SHORT(ino,num);
GET_SHORT         762 ext/sdbm/_sdbm.c 	key.dsize = off - GET_SHORT(ino,num);
GET_SHORT         776 ext/sdbm/_sdbm.c 	if ((n = GET_SHORT(ino,0)) == 0)
GET_SHORT         790 ext/sdbm/_sdbm.c 		register char *dst = pag + (i == 1 ? PBLKSIZ : GET_SHORT(ino,i - 1));
GET_SHORT         791 ext/sdbm/_sdbm.c 		register char *src = pag + GET_SHORT(ino,i + 1);
GET_SHORT         798 ext/sdbm/_sdbm.c 		m = GET_SHORT(ino,i + 1) - GET_SHORT(ino,n);
GET_SHORT         826 ext/sdbm/_sdbm.c 			PUT_SHORT(ino,i, GET_SHORT(ino,i + 2) + zoo);
GET_SHORT         830 ext/sdbm/_sdbm.c 	PUT_SHORT(ino, 0, GET_SHORT(ino, 0) - 2);
GET_SHORT         851 ext/sdbm/_sdbm.c 		if (siz == off - GET_SHORT(ino,i) &&
GET_SHORT         852 ext/sdbm/_sdbm.c 		    memcmp(key, pag + GET_SHORT(ino,i), siz) == 0)
GET_SHORT         854 ext/sdbm/_sdbm.c 		off = GET_SHORT(ino,i + 1);
GET_SHORT         877 ext/sdbm/_sdbm.c 	n = GET_SHORT(ino,0);
GET_SHORT         879 ext/sdbm/_sdbm.c 		key.dptr = cur + GET_SHORT(ino,0);
GET_SHORT         880 ext/sdbm/_sdbm.c 		key.dsize = off - GET_SHORT(ino,0);
GET_SHORT         881 ext/sdbm/_sdbm.c 		val.dptr = cur + GET_SHORT(ino,1);
GET_SHORT         882 ext/sdbm/_sdbm.c 		val.dsize = GET_SHORT(ino,0) - GET_SHORT(ino,1);
GET_SHORT         888 ext/sdbm/_sdbm.c 		off = GET_SHORT(ino,1);
GET_SHORT         911 ext/sdbm/_sdbm.c 	if ((n = GET_SHORT(ino,0)) < 0 || n > PBLKSIZ / sizeof(short))
GET_SHORT         917 ext/sdbm/_sdbm.c 			if (GET_SHORT(ino,0) > off || GET_SHORT(ino,1) > off ||
GET_SHORT         918 ext/sdbm/_sdbm.c 			    GET_SHORT(ino,1) > GET_SHORT(ino,0))
GET_SHORT         920 ext/sdbm/_sdbm.c 			off = GET_SHORT(ino,1);


GET_STACK_INDEX

GET_STACK_INDEX   519 regexec.c        mem_start_stk[mnum] = GET_STACK_INDEX(stk);\
GET_STACK_INDEX   531 regexec.c        mem_end_stk[mnum] = GET_STACK_INDEX(stk);\
GET_STACK_INDEX  2013 regexec.c            mem_start_stk[mem] = GET_STACK_INDEX(stkp);
GET_STACK_INDEX  2024 regexec.c      	mem_start_stk[mem] = GET_STACK_INDEX(stkp);
GET_STACK_INDEX  2350 regexec.c      	repeat_stk[mem] = GET_STACK_INDEX(stk);
GET_STACK_INDEX  2367 regexec.c      	repeat_stk[mem] = GET_STACK_INDEX(stk);
GET_STACK_INDEX  2405 regexec.c            si = GET_STACK_INDEX(stkp);
GET_STACK_INDEX  2440 regexec.c            si = GET_STACK_INDEX(stkp);


GET_TAIL

GET_TAIL          702 ext/racc/cparse/cparse.c             tmp_v = GET_TAIL(v->vstack, len);
GET_TAIL          710 ext/racc/cparse/cparse.c             tmp_t = GET_TAIL(v->tstack, len);


GET_TRUE_YAML_INDENT

GET_TRUE_YAML_INDENT 1501 ext/syck/token.c         GET_TRUE_YAML_INDENT(parentIndent);
GET_TRUE_YAML_INDENT 2408 ext/syck/token.c                             GET_TRUE_YAML_INDENT(parentIndent);


GG

GG                179 ext/digest/rmd160/rmd160.c 	GG(ee, aa, bb, cc, dd, block[ 7],  7);
GG                180 ext/digest/rmd160/rmd160.c 	GG(dd, ee, aa, bb, cc, block[ 4],  6);
GG                181 ext/digest/rmd160/rmd160.c 	GG(cc, dd, ee, aa, bb, block[13],  8);
GG                182 ext/digest/rmd160/rmd160.c 	GG(bb, cc, dd, ee, aa, block[ 1], 13);
GG                183 ext/digest/rmd160/rmd160.c 	GG(aa, bb, cc, dd, ee, block[10], 11);
GG                184 ext/digest/rmd160/rmd160.c 	GG(ee, aa, bb, cc, dd, block[ 6],  9);
GG                185 ext/digest/rmd160/rmd160.c 	GG(dd, ee, aa, bb, cc, block[15],  7);
GG                186 ext/digest/rmd160/rmd160.c 	GG(cc, dd, ee, aa, bb, block[ 3], 15);
GG                187 ext/digest/rmd160/rmd160.c 	GG(bb, cc, dd, ee, aa, block[12],  7);
GG                188 ext/digest/rmd160/rmd160.c 	GG(aa, bb, cc, dd, ee, block[ 0], 12);
GG                189 ext/digest/rmd160/rmd160.c 	GG(ee, aa, bb, cc, dd, block[ 9], 15);
GG                190 ext/digest/rmd160/rmd160.c 	GG(dd, ee, aa, bb, cc, block[ 5],  9);
GG                191 ext/digest/rmd160/rmd160.c 	GG(cc, dd, ee, aa, bb, block[ 2], 11);
GG                192 ext/digest/rmd160/rmd160.c 	GG(bb, cc, dd, ee, aa, block[14],  7);
GG                193 ext/digest/rmd160/rmd160.c 	GG(aa, bb, cc, dd, ee, block[11], 13);
GG                194 ext/digest/rmd160/rmd160.c 	GG(ee, aa, bb, cc, dd, block[ 8], 12);


GGG

GGG               305 ext/digest/rmd160/rmd160.c 	GGG(ccc, ddd, eee, aaa, bbb, block[ 8], 15);
GGG               306 ext/digest/rmd160/rmd160.c 	GGG(bbb, ccc, ddd, eee, aaa, block[ 6],  5);
GGG               307 ext/digest/rmd160/rmd160.c 	GGG(aaa, bbb, ccc, ddd, eee, block[ 4],  8);
GGG               308 ext/digest/rmd160/rmd160.c 	GGG(eee, aaa, bbb, ccc, ddd, block[ 1], 11);
GGG               309 ext/digest/rmd160/rmd160.c 	GGG(ddd, eee, aaa, bbb, ccc, block[ 3], 14);
GGG               310 ext/digest/rmd160/rmd160.c 	GGG(ccc, ddd, eee, aaa, bbb, block[11], 14);
GGG               311 ext/digest/rmd160/rmd160.c 	GGG(bbb, ccc, ddd, eee, aaa, block[15],  6);
GGG               312 ext/digest/rmd160/rmd160.c 	GGG(aaa, bbb, ccc, ddd, eee, block[ 0], 14);
GGG               313 ext/digest/rmd160/rmd160.c 	GGG(eee, aaa, bbb, ccc, ddd, block[ 5],  6);
GGG               314 ext/digest/rmd160/rmd160.c 	GGG(ddd, eee, aaa, bbb, ccc, block[12],  9);
GGG               315 ext/digest/rmd160/rmd160.c 	GGG(ccc, ddd, eee, aaa, bbb, block[ 2], 12);
GGG               316 ext/digest/rmd160/rmd160.c 	GGG(bbb, ccc, ddd, eee, aaa, block[13],  9);
GGG               317 ext/digest/rmd160/rmd160.c 	GGG(aaa, bbb, ccc, ddd, eee, block[ 9], 12);
GGG               318 ext/digest/rmd160/rmd160.c 	GGG(eee, aaa, bbb, ccc, ddd, block[ 7],  5);
GGG               319 ext/digest/rmd160/rmd160.c 	GGG(ddd, eee, aaa, bbb, ccc, block[10], 15);
GGG               320 ext/digest/rmd160/rmd160.c 	GGG(ccc, ddd, eee, aaa, bbb, block[14],  8);


GLOB_VERBOSE

GLOB_VERBOSE      908 dir.c              ((flags & GLOB_VERBOSE) && rb_protect((VALUE (*)(VALUE))rb_sys_warning, (VALUE)(val), 0))
GLOB_VERBOSE     1339 dir.c              return ruby_glob0(path, flags & ~GLOB_VERBOSE, func, arg);
GLOB_VERBOSE     1365 dir.c              return ruby_glob0(path, flags | GLOB_VERBOSE, rb_glob_caller, (VALUE)&args);
GLOB_VERBOSE     1464 dir.c              return ruby_brace_glob0(str, flags & ~GLOB_VERBOSE, func, arg);
GLOB_VERBOSE     1474 dir.c              return ruby_brace_glob0(str, flags | GLOB_VERBOSE, rb_glob_caller, (VALUE)&args);


GOBBLE_UP_YAML_INDENT

GOBBLE_UP_YAML_INDENT  367 ext/syck/token.c {   GOBBLE_UP_YAML_INDENT( doc_level, YYTOKEN );
GOBBLE_UP_YAML_INDENT  553 ext/syck/token.c                         GOBBLE_UP_YAML_INDENT( indt_len, YYTOKEN );
GOBBLE_UP_YAML_INDENT 1538 ext/syck/token.c                         GOBBLE_UP_YAML_INDENT( indt_len, tok );
GOBBLE_UP_YAML_INDENT 1771 ext/syck/token.c                         GOBBLE_UP_YAML_INDENT( indt_len, YYTOKEN );
GOBBLE_UP_YAML_INDENT 1926 ext/syck/token.c                         GOBBLE_UP_YAML_INDENT( indt_len, YYTOKEN );
GOBBLE_UP_YAML_INDENT 2403 ext/syck/token.c                         GOBBLE_UP_YAML_INDENT( indt_len, tok );


GUARD_OBJ

GUARD_OBJ         148 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(p,GetVpValue(self,1));
GUARD_OBJ         161 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(p,GetVpValue(self,1));
GUARD_OBJ         183 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(vp,GetVpValue(self,1));
GUARD_OBJ         210 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(pv,VpNewRbClass(m,pch,self));
GUARD_OBJ         348 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(p,GetVpValue(self,1));
GUARD_OBJ         410 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(p,GetVpValue(self,1));
GUARD_OBJ         431 ext/bigdecimal/bigdecimal.c        GUARD_OBJ(b,GetVpValue(other,1));
GUARD_OBJ         449 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GUARD_OBJ         457 ext/bigdecimal/bigdecimal.c         GUARD_OBJ(c,VpCreateRbObject(VpBaseFig() + 1, "0"));
GUARD_OBJ         460 ext/bigdecimal/bigdecimal.c         GUARD_OBJ(c,VpCreateRbObject(mx *(VpBaseFig() + 1), "0"));
GUARD_OBJ         477 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GUARD_OBJ         487 ext/bigdecimal/bigdecimal.c         GUARD_OBJ(c,VpCreateRbObject(VpBaseFig() + 1, "0"));
GUARD_OBJ         490 ext/bigdecimal/bigdecimal.c         GUARD_OBJ(c,VpCreateRbObject(mx *(VpBaseFig() + 1), "0"));
GUARD_OBJ         506 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GUARD_OBJ         586 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GUARD_OBJ         587 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(a->Prec *(VpBaseFig() + 1), "0"));
GUARD_OBJ         599 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GUARD_OBJ         605 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(mx *(VpBaseFig() + 1), "0"));
GUARD_OBJ         618 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GUARD_OBJ         624 ext/bigdecimal/bigdecimal.c     GUARD_OBJ((*c),VpCreateRbObject(mx, "#0"));
GUARD_OBJ         625 ext/bigdecimal/bigdecimal.c     GUARD_OBJ((*res),VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
GUARD_OBJ         662 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GUARD_OBJ         671 ext/bigdecimal/bigdecimal.c        GUARD_OBJ(c,VpCreateRbObject(1, "0"));
GUARD_OBJ         672 ext/bigdecimal/bigdecimal.c        GUARD_OBJ(d,VpCreateRbObject(1, "0"));
GUARD_OBJ         681 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
GUARD_OBJ         682 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(res,VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
GUARD_OBJ         685 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(d,VpCreateRbObject(mx, "0"));
GUARD_OBJ         701 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(1, "NaN"));
GUARD_OBJ         702 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(d,VpCreateRbObject(1, "NaN"));
GUARD_OBJ         729 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GUARD_OBJ         735 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c  ,VpCreateRbObject(mx, "0"));
GUARD_OBJ         736 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(res,VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
GUARD_OBJ         737 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(rr ,VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
GUARD_OBJ         738 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(ff ,VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
GUARD_OBJ         744 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(d,VpCreateRbObject(mx, "0"));
GUARD_OBJ         745 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(f,VpCreateRbObject(mx, "0"));
GUARD_OBJ         804 ext/bigdecimal/bigdecimal.c           GUARD_OBJ(cv,VpCreateRbObject(mx,"0"));
GUARD_OBJ         805 ext/bigdecimal/bigdecimal.c           GUARD_OBJ(av,GetVpValue(self,1));
GUARD_OBJ         806 ext/bigdecimal/bigdecimal.c           GUARD_OBJ(bv,GetVpValue(b,1));
GUARD_OBJ         809 ext/bigdecimal/bigdecimal.c           GUARD_OBJ(res,VpCreateRbObject((mx * 2  + 2)*VpBaseFig(), "#0"));
GUARD_OBJ         829 ext/bigdecimal/bigdecimal.c        GUARD_OBJ(cv,GetVpValue(c,1));
GUARD_OBJ         846 ext/bigdecimal/bigdecimal.c        GUARD_OBJ(cv,GetVpValue(c,1));
GUARD_OBJ         863 ext/bigdecimal/bigdecimal.c        GUARD_OBJ(cv,GetVpValue(c,1));
GUARD_OBJ         876 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GUARD_OBJ         878 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
GUARD_OBJ         891 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GUARD_OBJ         896 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
GUARD_OBJ         908 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GUARD_OBJ         910 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
GUARD_OBJ         950 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GUARD_OBJ         952 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
GUARD_OBJ         975 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GUARD_OBJ         977 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
GUARD_OBJ         990 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GUARD_OBJ         992 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
GUARD_OBJ        1014 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GUARD_OBJ        1016 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
GUARD_OBJ        1039 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GUARD_OBJ        1041 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
GUARD_OBJ        1060 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(vp,GetVpValue(self,1));
GUARD_OBJ        1110 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(vp,GetVpValue(self,1));
GUARD_OBJ        1145 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(vp,GetVpValue(self,1));
GUARD_OBJ        1170 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(x,GetVpValue(self,1));
GUARD_OBJ        1173 ext/bigdecimal/bigdecimal.c         GUARD_OBJ(y,VpCreateRbObject(mp *(ma + 1), "0"));
GUARD_OBJ        1175 ext/bigdecimal/bigdecimal.c         GUARD_OBJ(y,VpCreateRbObject(1, "0"));
GUARD_OBJ        1196 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(pv,VpCreateRbObject(mf, RSTRING(iniValue)->ptr));
GUARD_OBJ        1215 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(pv,VpNewRbClass(mf, RSTRING(iniValue)->ptr,self));


GZFILE_FLAG_FOOTER_FINISHED

GZFILE_FLAG_FOOTER_FINISHED 1990 ext/zlib/zlib.c     gz->z.flags |= GZFILE_FLAG_FOOTER_FINISHED;
GZFILE_FLAG_FOOTER_FINISHED 2075 ext/zlib/zlib.c     gz->z.flags |= GZFILE_FLAG_FOOTER_FINISHED;
GZFILE_FLAG_FOOTER_FINISHED 2166 ext/zlib/zlib.c 	if (!(gz->z.flags & GZFILE_FLAG_FOOTER_FINISHED)) {
GZFILE_FLAG_FOOTER_FINISHED 2205 ext/zlib/zlib.c 	if (!(gz->z.flags & GZFILE_FLAG_FOOTER_FINISHED)) {
GZFILE_FLAG_FOOTER_FINISHED 2237 ext/zlib/zlib.c 	if (!(gz->z.flags & GZFILE_FLAG_FOOTER_FINISHED)) {
GZFILE_FLAG_FOOTER_FINISHED 2312 ext/zlib/zlib.c 	&& !(gz->z.flags & GZFILE_FLAG_FOOTER_FINISHED)) {
GZFILE_FLAG_FOOTER_FINISHED 2342 ext/zlib/zlib.c     if (!(gz->z.flags & GZFILE_FLAG_FOOTER_FINISHED)) {


GZFILE_FLAG_HEADER_FINISHED

GZFILE_FLAG_HEADER_FINISHED 1978 ext/zlib/zlib.c     gz->z.flags |= GZFILE_FLAG_HEADER_FINISHED;
GZFILE_FLAG_HEADER_FINISHED 2101 ext/zlib/zlib.c     if (!(gz->z.flags & GZFILE_FLAG_HEADER_FINISHED)) {
GZFILE_FLAG_HEADER_FINISHED 2277 ext/zlib/zlib.c     if (!(gz->z.flags & GZFILE_FLAG_HEADER_FINISHED)) {
GZFILE_FLAG_HEADER_FINISHED 2548 ext/zlib/zlib.c     if (gz->z.flags & GZFILE_FLAG_HEADER_FINISHED) {
GZFILE_FLAG_HEADER_FINISHED 2573 ext/zlib/zlib.c     if (gz->z.flags & GZFILE_FLAG_HEADER_FINISHED) {
GZFILE_FLAG_HEADER_FINISHED 2596 ext/zlib/zlib.c     if (gz->z.flags & GZFILE_FLAG_HEADER_FINISHED) {


GZFILE_FLAG_SYNC

GZFILE_FLAG_SYNC 1824 ext/zlib/zlib.c 	if ((gz->z.flags & GZFILE_FLAG_SYNC)
GZFILE_FLAG_SYNC 2105 ext/zlib/zlib.c     if (len > 0 || (gz->z.flags & GZFILE_FLAG_SYNC)) {
GZFILE_FLAG_SYNC 2107 ext/zlib/zlib.c 	zstream_run(&gz->z, str, len, (gz->z.flags & GZFILE_FLAG_SYNC)
GZFILE_FLAG_SYNC 2671 ext/zlib/zlib.c     return (get_gzfile(obj)->z.flags & GZFILE_FLAG_SYNC) ? Qtrue : Qfalse;
GZFILE_FLAG_SYNC 2688 ext/zlib/zlib.c 	gz->z.flags |= GZFILE_FLAG_SYNC;
GZFILE_FLAG_SYNC 2691 ext/zlib/zlib.c 	gz->z.flags &= ~GZFILE_FLAG_SYNC;


GZFILE_IS_FINISHED

GZFILE_IS_FINISHED 2165 ext/zlib/zlib.c     if (GZFILE_IS_FINISHED(gz)) {
GZFILE_IS_FINISHED 2204 ext/zlib/zlib.c     if (GZFILE_IS_FINISHED(gz)) {
GZFILE_IS_FINISHED 2236 ext/zlib/zlib.c     if (GZFILE_IS_FINISHED(gz)) {
GZFILE_IS_FINISHED 2310 ext/zlib/zlib.c     if (GZFILE_IS_FINISHED(gz)
GZFILE_IS_FINISHED 2341 ext/zlib/zlib.c     if (!GZFILE_IS_FINISHED(gz)) return Qnil;
GZFILE_IS_FINISHED 2661 ext/zlib/zlib.c     return GZFILE_IS_FINISHED(gz) ? Qtrue : Qfalse;
GZFILE_IS_FINISHED 3149 ext/zlib/zlib.c 	if (GZFILE_IS_FINISHED(gz)) return;
GZFILE_IS_FINISHED 3160 ext/zlib/zlib.c 		if (GZFILE_IS_FINISHED(gz)) return;


GZFILE_READ_SIZE

GZFILE_READ_SIZE 1837 ext/zlib/zlib.c     str = rb_funcall(gz->io, id_readpartial, 1, INT2FIX(GZFILE_READ_SIZE));
GZFILE_READ_SIZE 1849 ext/zlib/zlib.c         str = rb_funcall(gz->io, id_read, 1, INT2FIX(GZFILE_READ_SIZE));


GZIP_SUPPORT

GZIP_SUPPORT       18 ext/zlib/zlib.c #ifndef GZIP_SUPPORT
GZIP_SUPPORT      104 ext/zlib/zlib.c #if GZIP_SUPPORT
GZIP_SUPPORT     1664 ext/zlib/zlib.c #if GZIP_SUPPORT
GZIP_SUPPORT     3415 ext/zlib/zlib.c #if GZIP_SUPPORT
GZIP_SUPPORT     3502 ext/zlib/zlib.c #if GZIP_SUPPORT


GZ_EXTRAFLAG_FAST

GZ_EXTRAFLAG_FAST 1954 ext/zlib/zlib.c 	extraflags |= GZ_EXTRAFLAG_FAST;
GZ_EXTRAFLAG_FAST 2025 ext/zlib/zlib.c     if (head[8] & GZ_EXTRAFLAG_FAST) {


GZ_EXTRAFLAG_SLOW

GZ_EXTRAFLAG_SLOW 1957 ext/zlib/zlib.c 	extraflags |= GZ_EXTRAFLAG_SLOW;
GZ_EXTRAFLAG_SLOW 2028 ext/zlib/zlib.c     else if (head[8] & GZ_EXTRAFLAG_SLOW) {


GZ_FLAG_COMMENT

GZ_FLAG_COMMENT  1947 ext/zlib/zlib.c 	flags |= GZ_FLAG_COMMENT;
GZ_FLAG_COMMENT  2056 ext/zlib/zlib.c     if (flags & GZ_FLAG_COMMENT) {


GZ_FLAG_ORIG_NAME

GZ_FLAG_ORIG_NAME 1944 ext/zlib/zlib.c 	flags |= GZ_FLAG_ORIG_NAME;
GZ_FLAG_ORIG_NAME 2049 ext/zlib/zlib.c     if (flags & GZ_FLAG_ORIG_NAME) {


GZ_MAGIC1

GZ_MAGIC1        1960 ext/zlib/zlib.c     buf[0] = GZ_MAGIC1;
GZ_MAGIC1        2007 ext/zlib/zlib.c     if (head[0] != GZ_MAGIC1 || head[1] != GZ_MAGIC2) {


GZ_MAGIC2

GZ_MAGIC2        1961 ext/zlib/zlib.c     buf[1] = GZ_MAGIC2;
GZ_MAGIC2        2007 ext/zlib/zlib.c     if (head[0] != GZ_MAGIC1 || head[1] != GZ_MAGIC2) {


GZ_METHOD_DEFLATE

GZ_METHOD_DEFLATE 1962 ext/zlib/zlib.c     buf[2] = GZ_METHOD_DEFLATE;
GZ_METHOD_DEFLATE 2010 ext/zlib/zlib.c     if (head[2] != GZ_METHOD_DEFLATE) {


GenerateConsoleCtrlEvent

GenerateConsoleCtrlEvent 2984 win32/win32.c  	    if (!GenerateConsoleCtrlEvent(CTRL_C_EVENT, (DWORD)pid)) {
GenerateConsoleCtrlEvent  152 wince/wince.h  BOOL GenerateConsoleCtrlEvent(DWORD dwCtrlEvent,


GetAddSubPrec

GetAddSubPrec     455 ext/bigdecimal/bigdecimal.c     mx = GetAddSubPrec(a,b);
GetAddSubPrec     485 ext/bigdecimal/bigdecimal.c     mx = GetAddSubPrec(a,b);


GetBN

GetBN              30 ext/openssl/ossl_bn.c   GetBN(obj, bn); \
GetBN              63 ext/openssl/ossl_bn.c 	GetBN(obj, bn);
GetBN             114 ext/openssl/ossl_bn.c     GetBN(self, bn);
GetBN             118 ext/openssl/ossl_bn.c 	GetBN(str, other); /* Safe - we checked kind_of? above */
GetBN             163 ext/openssl/ossl_bn.c     GetBN(self, bn);
GetBN             199 ext/openssl/ossl_bn.c     GetBN(self, bn);
GetBN             240 ext/openssl/ossl_bn.c 	GetBN(self, bn);				\
GetBN             256 ext/openssl/ossl_bn.c 	GetBN(self, bn);				\
GetBN             275 ext/openssl/ossl_bn.c 	GetBN(self, bn1);				\
GetBN             295 ext/openssl/ossl_bn.c 	GetBN(self, bn1);					\
GetBN             319 ext/openssl/ossl_bn.c     GetBN(self, bn1);
GetBN             346 ext/openssl/ossl_bn.c 	GetBN(self, bn1);					\
GetBN             367 ext/openssl/ossl_bn.c 	GetBN(self, bn);				\
GetBN             384 ext/openssl/ossl_bn.c     GetBN(self, bn);
GetBN             399 ext/openssl/ossl_bn.c 	GetBN(self, bn);				\
GetBN             500 ext/openssl/ossl_bn.c 	GetBN(self, bn);			\
GetBN             515 ext/openssl/ossl_bn.c     GetBN(self, bn1);
GetBN             529 ext/openssl/ossl_bn.c 	GetBN(self, bn1);				\
GetBN             554 ext/openssl/ossl_bn.c     GetBN(self, bn);
GetBN             579 ext/openssl/ossl_bn.c     GetBN(self, bn);


GetBNPtr

GetBNPtr          128 ext/openssl/ossl_asn1.c 	bn = GetBNPtr(obj);
GetBNPtr          146 ext/openssl/ossl_asn1.c     BIGNUM *bn = GetBNPtr(obj);
GetBNPtr          273 ext/openssl/ossl_bn.c 	BIGNUM *bn1, *bn2 = GetBNPtr(other), *result;	\
GetBNPtr          293 ext/openssl/ossl_bn.c 	BIGNUM *bn1, *bn2 = GetBNPtr(other), *result;		\
GetBNPtr          316 ext/openssl/ossl_bn.c     BIGNUM *bn1, *bn2 = GetBNPtr(other), *r1, *r2;
GetBNPtr          343 ext/openssl/ossl_bn.c 	BIGNUM *bn1, *bn2 = GetBNPtr(other1);			\
GetBNPtr          344 ext/openssl/ossl_bn.c 	BIGNUM *bn3 = GetBNPtr(other2), *result;		\
GetBNPtr          446 ext/openssl/ossl_bn.c 	BIGNUM *bn = GetBNPtr(range), *result;			\
GetBNPtr          480 ext/openssl/ossl_bn.c 	add = GetBNPtr(vadd);
GetBNPtr          481 ext/openssl/ossl_bn.c 	rem = GetBNPtr(vrem);
GetBNPtr          516 ext/openssl/ossl_bn.c     bn2 = GetBNPtr(other);
GetBNPtr          528 ext/openssl/ossl_bn.c 	BIGNUM *bn1, *bn2 = GetBNPtr(other);		\
GetBNPtr           18 ext/openssl/ossl_bn.h BIGNUM *GetBNPtr(VALUE);
GetBNPtr          104 ext/openssl/ossl_pkey.h 	bn = GetBNPtr(bignum);						\
GetBNPtr          335 ext/openssl/ossl_pkey_dh.c     pub_key = GetBNPtr(pub);


GetBit

GetBit           1507 win32/win32.c  	dirp->dirstr.d_isdir = GetBit(dirp->bits, dirp->loc * 2);
GetBit           1508 win32/win32.c  	dirp->dirstr.d_isrep = GetBit(dirp->bits, dirp->loc * 2 + 1);


GetCipher

GetCipher          23 ext/openssl/ossl_cipher.c     GetCipher(obj, ctx); \
GetCipher          55 ext/openssl/ossl_cipher.c     GetCipher(ret, ctx);
GetCipher          95 ext/openssl/ossl_cipher.c     GetCipher(self, ctx);
GetCipher         112 ext/openssl/ossl_cipher.c     GetCipher(self, ctx1);
GetCipher         125 ext/openssl/ossl_cipher.c     GetCipher(self, ctx);
GetCipher         147 ext/openssl/ossl_cipher.c 	GetCipher(self, ctx);
GetCipher         166 ext/openssl/ossl_cipher.c 	GetCipher(self, ctx);
GetCipher         206 ext/openssl/ossl_cipher.c     GetCipher(self, ctx);
GetCipher         229 ext/openssl/ossl_cipher.c     GetCipher(self, ctx);
GetCipher         247 ext/openssl/ossl_cipher.c     GetCipher(self, ctx);
GetCipher         263 ext/openssl/ossl_cipher.c     GetCipher(self, ctx);
GetCipher         274 ext/openssl/ossl_cipher.c     GetCipher(self, ctx);
GetCipher         291 ext/openssl/ossl_cipher.c     GetCipher(self, ctx);
GetCipher         308 ext/openssl/ossl_cipher.c     GetCipher(self, ctx);
GetCipher         322 ext/openssl/ossl_cipher.c     GetCipher(self, ctx);
GetCipher         336 ext/openssl/ossl_cipher.c 	GetCipher(self, ctx);					\


GetCipherPtr

GetCipherPtr       18 ext/openssl/ossl_cipher.h const EVP_CIPHER *GetCipherPtr(VALUE);
GetCipherPtr      255 ext/openssl/ossl_pkcs7.c     else ciph = GetCipherPtr(cipher); /* NO NEED TO DUP */
GetCipherPtr      434 ext/openssl/ossl_pkcs7.c     if (!PKCS7_set_cipher(pkcs7, GetCipherPtr(cipher))) {
GetCipherPtr      202 ext/openssl/ossl_pkey_dsa.c 	ciph = GetCipherPtr(cipher);
GetCipherPtr      197 ext/openssl/ossl_pkey_rsa.c 	ciph = GetCipherPtr(cipher);


GetConfig

GetConfig          27 ext/openssl/ossl_config.c     GetConfig(obj, conf); \
GetConfig         123 ext/openssl/ossl_config.c     GetConfig(other, conf);
GetConfig         141 ext/openssl/ossl_config.c 	GetConfig(self, conf);
GetConfig         153 ext/openssl/ossl_config.c 	GetConfig(self, conf);
GetConfig         173 ext/openssl/ossl_config.c     GetConfig(self, conf);
GetConfig         203 ext/openssl/ossl_config.c     GetConfig(self, conf);
GetConfig         268 ext/openssl/ossl_config.c     GetConfig(self, conf);
GetConfig         308 ext/openssl/ossl_config.c     GetConfig(self, conf);
GetConfig         356 ext/openssl/ossl_config.c     GetConfig(self, conf);
GetConfig         389 ext/openssl/ossl_config.c     GetConfig(self, conf);


GetConfigPtr

GetConfigPtr       17 ext/openssl/ossl_config.h CONF* GetConfigPtr(VALUE obj);
GetConfigPtr      174 ext/openssl/ossl_x509ext.c     conf = GetConfigPtr(config);  /* NO DUP NEEDED */
GetConfigPtr      240 ext/openssl/ossl_x509ext.c     conf = NIL_P(rconf) ? NULL : GetConfigPtr(rconf);


GetCurrentThreadHandle

GetCurrentThreadHandle 2182 win32/win32.c      main_thread.handle = GetCurrentThreadHandle();
GetCurrentThreadHandle  484 win32/win32.h  HANDLE GetCurrentThreadHandle(void);


GetDBM

GetDBM             47 ext/dbm/dbm.c      GetDBM(obj, data);\
GetDBM             67 ext/dbm/dbm.c      GetDBM(obj, dbmp);
GetDBM             48 ext/gdbm/gdbm.c     GetDBM(obj, data);\
GetDBM             68 ext/gdbm/gdbm.c     GetDBM(obj, dbmp);
GetDBM            629 ext/gdbm/gdbm.c     GetDBM(obj, dbmp);
GetDBM             39 ext/sdbm/init.c     GetDBM(obj, data);\
GetDBM             58 ext/sdbm/init.c     GetDBM(obj, dbmp);
GetDBM            512 ext/sdbm/init.c     GetDBM(obj, dbmp);


GetDBM2

GetDBM2           184 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           229 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           249 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           259 ext/dbm/dbm.c  	GetDBM2(obj, dbmp, dbm);
GetDBM2           303 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           334 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           359 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           370 ext/dbm/dbm.c  	GetDBM2(obj, dbmp, dbm);
GetDBM2           397 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           419 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           487 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           509 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           529 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           552 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           556 ext/dbm/dbm.c  	GetDBM2(obj, dbmp, dbm);
GetDBM2           569 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           572 ext/dbm/dbm.c  	GetDBM2(obj, dbmp, dbm);
GetDBM2           586 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           593 ext/dbm/dbm.c  	GetDBM2(obj, dbmp, dbm);
GetDBM2           608 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           627 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           649 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           667 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           686 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           706 ext/dbm/dbm.c      GetDBM2(obj, dbmp, dbm);
GetDBM2           225 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           321 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           345 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           354 ext/gdbm/gdbm.c 	GetDBM2(obj, dbmp, dbm);
GetDBM2           397 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           432 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           452 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           463 ext/gdbm/gdbm.c 	GetDBM2(obj, dbmp, dbm);
GetDBM2           483 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           521 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           589 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           608 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           653 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           658 ext/gdbm/gdbm.c 	GetDBM2(obj, dbmp, dbm);
GetDBM2           671 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           676 ext/gdbm/gdbm.c 	GetDBM2(obj, dbmp, dbm);
GetDBM2           689 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           694 ext/gdbm/gdbm.c 	GetDBM2(obj, dbmp, dbm);
GetDBM2           708 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           728 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           752 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           767 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           791 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           810 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           823 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           836 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           852 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           875 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           895 ext/gdbm/gdbm.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           162 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           207 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           226 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           236 ext/sdbm/init.c 	GetDBM2(obj, dbmp, dbm);
GetDBM2           280 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           312 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           338 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           348 ext/sdbm/init.c 	GetDBM2(obj, dbmp, dbm);
GetDBM2           375 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           397 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           470 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           492 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           535 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           539 ext/sdbm/init.c 	GetDBM2(obj, dbmp, dbm);
GetDBM2           552 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           555 ext/sdbm/init.c 	GetDBM2(obj, dbmp, dbm);
GetDBM2           569 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           575 ext/sdbm/init.c 	GetDBM2(obj, dbmp, dbm);
GetDBM2           590 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           608 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           630 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           648 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           667 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);
GetDBM2           687 ext/sdbm/init.c     GetDBM2(obj, dbmp, dbm);


GetDIR

GetDIR            460 dir.c              GetDIR(dir, dirp);
GetDIR            485 dir.c              GetDIR(dir, dirp);
GetDIR            508 dir.c              GetDIR(dir, dirp);
GetDIR            547 dir.c              GetDIR(dir, dirp);
GetDIR            576 dir.c              GetDIR(dir, dirp);
GetDIR            604 dir.c              GetDIR(dir, dirp);
GetDIR            650 dir.c              GetDIR(dir, dirp);
GetDIR            670 dir.c              GetDIR(dir, dirp);


GetDigest

GetDigest          21 ext/openssl/ossl_digest.c     GetDigest(obj, ctx); \
GetDigest          53 ext/openssl/ossl_digest.c     GetDigest(ret, ctx);
GetDigest          97 ext/openssl/ossl_digest.c     GetDigest(self, ctx);
GetDigest         112 ext/openssl/ossl_digest.c     GetDigest(self, ctx1);
GetDigest         126 ext/openssl/ossl_digest.c     GetDigest(self, ctx);
GetDigest         138 ext/openssl/ossl_digest.c     GetDigest(self, ctx);
GetDigest         168 ext/openssl/ossl_digest.c     GetDigest(self, ctx);
GetDigest         183 ext/openssl/ossl_digest.c     GetDigest(self, ctx);
GetDigest         227 ext/openssl/ossl_digest.c     GetDigest(self, ctx);
GetDigest         246 ext/openssl/ossl_digest.c     GetDigest(self, ctx);
GetDigest         256 ext/openssl/ossl_digest.c     GetDigest(self, ctx);


GetDigestPtr

GetDigestPtr      205 ext/openssl/ossl_cipher.c     digest = NIL_P(vdigest) ? EVP_md5() : GetDigestPtr(vdigest);
GetDigestPtr       18 ext/openssl/ossl_digest.h const EVP_MD *GetDigestPtr(VALUE);
GetDigestPtr       68 ext/openssl/ossl_hmac.c 		 GetDigestPtr(digest), NULL);
GetDigestPtr      162 ext/openssl/ossl_hmac.c     buf = HMAC(GetDigestPtr(digest), RSTRING(key)->ptr, RSTRING(key)->len,
GetDigestPtr      178 ext/openssl/ossl_hmac.c     buf = HMAC(GetDigestPtr(digest), RSTRING(key)->ptr, RSTRING(key)->len,
GetDigestPtr      201 ext/openssl/ossl_ns_spki.c     md = GetDigestPtr(digest);
GetDigestPtr      807 ext/openssl/ossl_pkcs7.c     md = GetDigestPtr(digest);
GetDigestPtr      170 ext/openssl/ossl_pkey.c     EVP_SignInit(&ctx, GetDigestPtr(digest));
GetDigestPtr      190 ext/openssl/ossl_pkey.c     EVP_VerifyInit(&ctx, GetDigestPtr(digest));
GetDigestPtr      472 ext/openssl/ossl_x509cert.c     md = GetDigestPtr(digest);
GetDigestPtr      332 ext/openssl/ossl_x509crl.c     md = GetDigestPtr(digest);
GetDigestPtr      343 ext/openssl/ossl_x509req.c     md = GetDigestPtr(digest);


GetEngine

GetEngine         146 ext/openssl/ossl_engine.c     GetEngine(self, e);
GetEngine         154 ext/openssl/ossl_engine.c     GetEngine(self, e);
GetEngine         163 ext/openssl/ossl_engine.c     GetEngine(self, e);
GetEngine         182 ext/openssl/ossl_engine.c     GetEngine(self, e);
GetEngine         205 ext/openssl/ossl_engine.c     GetEngine(self, e);
GetEngine         226 ext/openssl/ossl_engine.c     GetEngine(self, e);
GetEngine         250 ext/openssl/ossl_engine.c     GetEngine(self, e);
GetEngine         267 ext/openssl/ossl_engine.c     GetEngine(self, e);
GetEngine         280 ext/openssl/ossl_engine.c     GetEngine(self, e);
GetEngine         310 ext/openssl/ossl_engine.c     GetEngine(self, e);


GetEnvironmentStrings

GetEnvironmentStrings 3737 win32/win32.c      envtop = GetEnvironmentStrings();
GetEnvironmentStrings  150 wince/wince.h  LPVOID GetEnvironmentStrings(VOID);


GetEnvironmentVariable

GetEnvironmentVariable  347 win32/win32.c      if (!GetEnvironmentVariable("HOME", env, sizeof(env))) {
GetEnvironmentVariable  349 win32/win32.c  	if (GetEnvironmentVariable("HOMEDRIVE", env, sizeof(env)))
GetEnvironmentVariable  353 win32/win32.c  	if (GetEnvironmentVariable("HOMEPATH", env + len, sizeof(env) - len) || len) {
GetEnvironmentVariable  356 win32/win32.c  	else if (GetEnvironmentVariable("USERPROFILE", env, sizeof(env))) {
GetEnvironmentVariable  379 win32/win32.c      if (GetEnvironmentVariable("USER", env, sizeof env)) {
GetEnvironmentVariable  382 win32/win32.c      if (GetEnvironmentVariable("USERNAME", env, sizeof env)) {
GetEnvironmentVariable 3076 win32/win32.c      needlen = GetEnvironmentVariable(name, curitem, curlen);
GetEnvironmentVariable 3081 win32/win32.c  	    needlen = GetEnvironmentVariable(name, curitem, curlen);
GetEnvironmentVariable  149 wince/wince.h  DWORD GetEnvironmentVariable(LPCSTR name, LPSTR value, DWORD size);


GetFileAttributes

GetFileAttributes 3098 win32/win32.c      oldatts = GetFileAttributes(oldpath);
GetFileAttributes 3099 win32/win32.c      newatts = GetFileAttributes(newpath);
GetFileAttributes 3272 win32/win32.c  	DWORD attr = GetFileAttributes(path);
GetFileAttributes 3922 win32/win32.c  	const DWORD attr = GetFileAttributes(path);
GetFileAttributes 3942 win32/win32.c  	const DWORD attr = GetFileAttributes(path);


GetHMAC

GetHMAC            25 ext/openssl/ossl_hmac.c     GetHMAC(obj, ctx); \
GetHMAC            66 ext/openssl/ossl_hmac.c     GetHMAC(self, ctx);
GetHMAC            81 ext/openssl/ossl_hmac.c     GetHMAC(self, ctx1);
GetHMAC            96 ext/openssl/ossl_hmac.c     GetHMAC(self, ctx);
GetHMAC           127 ext/openssl/ossl_hmac.c     GetHMAC(self, ctx);
GetHMAC           142 ext/openssl/ossl_hmac.c     GetHMAC(self, ctx);


GetLogicalDrives

GetLogicalDrives 1371 win32/win32.c  	((1 << (filename[0] & 0x5f) - 'A') & GetLogicalDrives()) == 0)) {
GetLogicalDrives  145 wince/wince.h  DWORD GetLogicalDrives(VOID);


GetMOUSE

GetMOUSE          695 ext/curses/curses.c   GetMOUSE(mevent,mdata);
GetMOUSE          715 ext/curses/curses.c   GetMOUSE(mouse, mdata); \


GetOCSPBasicRes

GetOCSPBasicRes    52 ext/openssl/ossl_ocsp.c     GetOCSPBasicRes(obj, res); \
GetOCSPBasicRes   288 ext/openssl/ossl_ocsp.c     else GetOCSPBasicRes(basic_resp, bs); /* NO NEED TO DUP */
GetOCSPBasicRes   417 ext/openssl/ossl_ocsp.c     GetOCSPBasicRes(self, bs);
GetOCSPBasicRes   433 ext/openssl/ossl_ocsp.c 	GetOCSPBasicRes(self, bs);
GetOCSPBasicRes   438 ext/openssl/ossl_ocsp.c 	GetOCSPBasicRes(self, bs);
GetOCSPBasicRes   482 ext/openssl/ossl_ocsp.c     GetOCSPBasicRes(self, bs);
GetOCSPBasicRes   526 ext/openssl/ossl_ocsp.c     GetOCSPBasicRes(self, bs);
GetOCSPBasicRes   581 ext/openssl/ossl_ocsp.c     GetOCSPBasicRes(self, bs);
GetOCSPBasicRes   602 ext/openssl/ossl_ocsp.c     GetOCSPBasicRes(self, bs);


GetOCSPCertId

GetOCSPCertId      65 ext/openssl/ossl_ocsp.c     GetOCSPCertId(obj, cid); \
GetOCSPCertId     177 ext/openssl/ossl_ocsp.c     GetOCSPCertId(certid, id);
GetOCSPCertId     636 ext/openssl/ossl_ocsp.c     GetOCSPCertId(self, id);
GetOCSPCertId     649 ext/openssl/ossl_ocsp.c     GetOCSPCertId(self, id);
GetOCSPCertId     662 ext/openssl/ossl_ocsp.c     GetOCSPCertId(self, id);
GetOCSPCertId     674 ext/openssl/ossl_ocsp.c     GetOCSPCertId(self, id);


GetOCSPReq

GetOCSPReq         26 ext/openssl/ossl_ocsp.c     GetOCSPReq(obj, req); \
GetOCSPReq        131 ext/openssl/ossl_ocsp.c 	GetOCSPReq(self, req);
GetOCSPReq        136 ext/openssl/ossl_ocsp.c 	GetOCSPReq(self, req);
GetOCSPReq        163 ext/openssl/ossl_ocsp.c     GetOCSPReq(self, req);
GetOCSPReq        176 ext/openssl/ossl_ocsp.c     GetOCSPReq(self, req);
GetOCSPReq        193 ext/openssl/ossl_ocsp.c     GetOCSPReq(self, req);
GetOCSPReq        227 ext/openssl/ossl_ocsp.c     GetOCSPReq(self, req);
GetOCSPReq        248 ext/openssl/ossl_ocsp.c     GetOCSPReq(self, req);
GetOCSPReq        264 ext/openssl/ossl_ocsp.c     GetOCSPReq(self, req);


GetOCSPRes

GetOCSPRes         39 ext/openssl/ossl_ocsp.c     GetOCSPRes(obj, res); \
GetOCSPRes        335 ext/openssl/ossl_ocsp.c     GetOCSPRes(self, res);
GetOCSPRes        347 ext/openssl/ossl_ocsp.c     GetOCSPRes(self, res);
GetOCSPRes        360 ext/openssl/ossl_ocsp.c     GetOCSPRes(self, res);
GetOCSPRes        376 ext/openssl/ossl_ocsp.c     GetOCSPRes(self, res);


GetOpenFile

GetOpenFile       423 ext/dl/cptr.c  	GetOpenFile(val, fptr);
GetOpenFile        62 ext/io/wait/wait.c     GetOpenFile(io, fptr);
GetOpenFile       108 ext/io/wait/wait.c     GetOpenFile(io, fptr);
GetOpenFile        26 ext/openssl/ossl_bio.c 	GetOpenFile(obj, fptr);
GetOpenFile       550 ext/openssl/ossl_ssl.c         GetOpenFile(io, fptr);
GetOpenFile       580 ext/openssl/ossl_ssl.c     GetOpenFile(ossl_ssl_get_io(self), fptr);
GetOpenFile       633 ext/openssl/ossl_ssl.c     GetOpenFile(ossl_ssl_get_io(self), fptr);
GetOpenFile       681 ext/openssl/ossl_ssl.c     GetOpenFile(ossl_ssl_get_io(self), fptr);
GetOpenFile       105 ext/readline/readline.c     GetOpenFile(input, ifp);
GetOpenFile       118 ext/readline/readline.c     GetOpenFile(output, ofp);
GetOpenFile       226 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile       253 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile       269 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile       288 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile       376 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile       438 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile       456 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile       470 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile       492 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile       522 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile       534 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile       578 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1283 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1434 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1448 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1510 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1525 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1540 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1623 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1640 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1672 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1704 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1763 ext/socket/socket.c 	GetOpenFile(val, valfptr);
GetOpenFile      1773 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1835 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1924 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1938 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1961 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      1978 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      2260 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      2356 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      2442 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      2572 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile      2625 ext/socket/socket.c     GetOpenFile(sock, fptr);
GetOpenFile       632 file.c         	GetOpenFile(tmp, fptr);
GetOpenFile       650 file.c         	GetOpenFile(tmp, fptr);
GetOpenFile       716 file.c             GetOpenFile(obj, fptr);
GetOpenFile       777 file.c             GetOpenFile(obj, fptr);
GetOpenFile      1585 file.c             GetOpenFile(obj, fptr);
GetOpenFile      1628 file.c             GetOpenFile(obj, fptr);
GetOpenFile      1674 file.c             GetOpenFile(obj, fptr);
GetOpenFile      1739 file.c             GetOpenFile(obj, fptr);
GetOpenFile      1870 file.c             GetOpenFile(obj, fptr);
GetOpenFile      3008 file.c             GetOpenFile(obj, fptr);
GetOpenFile      3109 file.c             GetOpenFile(obj, fptr);
GetOpenFile       660 io.c               GetOpenFile(io, fptr);
GetOpenFile       723 io.c               GetOpenFile(io, fptr);
GetOpenFile       754 io.c               GetOpenFile(io, fptr);
GetOpenFile       767 io.c               GetOpenFile(io, fptr);
GetOpenFile       826 io.c               GetOpenFile(io, fptr);
GetOpenFile       852 io.c               GetOpenFile(io, fptr);
GetOpenFile       868 io.c                   GetOpenFile(rb_stdout, ofp);
GetOpenFile       937 io.c               GetOpenFile(io, fptr);
GetOpenFile       969 io.c               GetOpenFile(io, fptr);
GetOpenFile       993 io.c               GetOpenFile(io, fptr);
GetOpenFile      1021 io.c               GetOpenFile(io, fptr);
GetOpenFile      1051 io.c               GetOpenFile(io, fptr);
GetOpenFile      1082 io.c               GetOpenFile(io, fptr);
GetOpenFile      1264 io.c               GetOpenFile(io, fptr);
GetOpenFile      1394 io.c           	GetOpenFile(io, fptr);
GetOpenFile      1412 io.c               GetOpenFile(io, fptr);
GetOpenFile      1554 io.c               GetOpenFile(io, fptr);
GetOpenFile      1614 io.c               GetOpenFile(io, fptr);
GetOpenFile      1678 io.c               GetOpenFile(io, fptr);
GetOpenFile      1705 io.c               GetOpenFile(io, fptr);
GetOpenFile      1847 io.c               GetOpenFile(io, fptr);
GetOpenFile      1879 io.c               GetOpenFile(io, fptr);
GetOpenFile      1947 io.c               GetOpenFile(io, fptr);
GetOpenFile      1973 io.c               GetOpenFile(io, fptr);
GetOpenFile      2155 io.c               GetOpenFile(io, fptr);
GetOpenFile      2200 io.c               GetOpenFile(io, fptr);
GetOpenFile      2244 io.c               GetOpenFile(io, fptr);
GetOpenFile      2280 io.c               GetOpenFile(io, fptr);
GetOpenFile      2334 io.c               GetOpenFile(io, fptr);
GetOpenFile      2380 io.c               GetOpenFile(io, fptr);
GetOpenFile      3280 io.c               GetOpenFile(io, fptr);
GetOpenFile      3281 io.c               GetOpenFile(nfile, orig);
GetOpenFile      3448 io.c               GetOpenFile(io, orig);
GetOpenFile      3868 io.c               GetOpenFile(io, fptr);
GetOpenFile      3941 io.c           	GetOpenFile(orig, ofp);
GetOpenFile      4087 io.c                   GetOpenFile(rb_stdout, fptr);
GetOpenFile      4384 io.c               GetOpenFile(port, fptr);
GetOpenFile      4410 io.c           	    GetOpenFile(rb_io_get_io(RARRAY(read)->ptr[i]), fptr);
GetOpenFile      4430 io.c           	    GetOpenFile(rb_io_get_io(RARRAY(write)->ptr[i]), fptr);
GetOpenFile      4442 io.c           	    GetOpenFile(rb_io_get_io(RARRAY(except)->ptr[i]), fptr);
GetOpenFile      4469 io.c           		GetOpenFile(rb_io_get_io(RARRAY(read)->ptr[i]), fptr);
GetOpenFile      4480 io.c           		GetOpenFile(rb_io_get_io(RARRAY(write)->ptr[i]), fptr);
GetOpenFile      4490 io.c           		GetOpenFile(rb_io_get_io(RARRAY(except)->ptr[i]), fptr);
GetOpenFile      4646 io.c               GetOpenFile(io, fptr);


GetPKCS12

GetPKCS12          20 ext/openssl/ossl_pkcs12.c     GetPKCS12(obj, p12); \
GetPKCS12         128 ext/openssl/ossl_pkcs12.c     GetPKCS12(self, p12);


GetPKCS7

GetPKCS7           29 ext/openssl/ossl_engine.c     GetPKCS7(obj, engine); \
GetPKCS7           27 ext/openssl/ossl_pkcs7.c     GetPKCS7(obj, pkcs7); \
GetPKCS7          321 ext/openssl/ossl_pkcs7.c     GetPKCS7(self, a);
GetPKCS7          372 ext/openssl/ossl_pkcs7.c     GetPKCS7(self, p7);
GetPKCS7          384 ext/openssl/ossl_pkcs7.c     GetPKCS7(self, p7);
GetPKCS7          403 ext/openssl/ossl_pkcs7.c     GetPKCS7(self, p7);
GetPKCS7          416 ext/openssl/ossl_pkcs7.c     GetPKCS7(self, p7);
GetPKCS7          424 ext/openssl/ossl_pkcs7.c     GetPKCS7(self, p7);
GetPKCS7          433 ext/openssl/ossl_pkcs7.c     GetPKCS7(self, pkcs7);
GetPKCS7          448 ext/openssl/ossl_pkcs7.c     GetPKCS7(self, pkcs7);
GetPKCS7          470 ext/openssl/ossl_pkcs7.c     GetPKCS7(self, pkcs7);
GetPKCS7          494 ext/openssl/ossl_pkcs7.c     GetPKCS7(self, pkcs7);
GetPKCS7          512 ext/openssl/ossl_pkcs7.c     GetPKCS7(self, pkcs7);
GetPKCS7          537 ext/openssl/ossl_pkcs7.c     GetPKCS7(self, pkcs7);
GetPKCS7          554 ext/openssl/ossl_pkcs7.c     GetPKCS7(self, pkcs7);
GetPKCS7          603 ext/openssl/ossl_pkcs7.c     GetPKCS7(self, pkcs7); /* NO DUP needed! */
GetPKCS7          662 ext/openssl/ossl_pkcs7.c     GetPKCS7(self, p7);
GetPKCS7          694 ext/openssl/ossl_pkcs7.c     GetPKCS7(self, p7);
GetPKCS7          715 ext/openssl/ossl_pkcs7.c     GetPKCS7(self, pkcs7);
GetPKCS7          748 ext/openssl/ossl_pkcs7.c     GetPKCS7(self, pkcs7);
GetPKCS7          767 ext/openssl/ossl_pkcs7.c     GetPKCS7(self, pkcs7);


GetPKCS7ri

GetPKCS7ri         61 ext/openssl/ossl_pkcs7.c     GetPKCS7ri(obj, p7ri); \
GetPKCS7ri        883 ext/openssl/ossl_pkcs7.c     GetPKCS7ri(self, p7ri);
GetPKCS7ri        896 ext/openssl/ossl_pkcs7.c     GetPKCS7ri(self, p7ri);
GetPKCS7ri        906 ext/openssl/ossl_pkcs7.c     GetPKCS7ri(self, p7ri);
GetPKCS7ri        916 ext/openssl/ossl_pkcs7.c     GetPKCS7ri(self, p7ri);


GetPKCS7si

GetPKCS7si         44 ext/openssl/ossl_pkcs7.c     GetPKCS7si(obj, p7si); \
GetPKCS7si        808 ext/openssl/ossl_pkcs7.c     GetPKCS7si(self, p7si);
GetPKCS7si        821 ext/openssl/ossl_pkcs7.c     GetPKCS7si(self, p7si);
GetPKCS7si        831 ext/openssl/ossl_pkcs7.c     GetPKCS7si(self, p7si);
GetPKCS7si        842 ext/openssl/ossl_pkcs7.c     GetPKCS7si(self, p7si);


GetPKey

GetPKey           169 ext/openssl/ossl_pkey.c     GetPKey(self, pkey);
GetPKey           189 ext/openssl/ossl_pkey.c     GetPKey(self, pkey);
GetPKey            38 ext/openssl/ossl_pkey.h     GetPKey(obj, pkey); \
GetPKey            86 ext/openssl/ossl_pkey.h 	GetPKey(self, pkey);						\
GetPKey            97 ext/openssl/ossl_pkey.h 	GetPKey(self, pkey);						\
GetPKey            16 ext/openssl/ossl_pkey_dh.c     GetPKey(obj, pkey); \
GetPKey           131 ext/openssl/ossl_pkey_dh.c     GetPKey(self, pkey);
GetPKey            16 ext/openssl/ossl_pkey_dsa.c     GetPKey(obj, pkey); \
GetPKey           125 ext/openssl/ossl_pkey_dsa.c     GetPKey(self, pkey);
GetPKey            16 ext/openssl/ossl_pkey_rsa.c     GetPKey(obj, pkey); \
GetPKey           116 ext/openssl/ossl_pkey_rsa.c     GetPKey(self, pkey);


GetPKeyDH

GetPKeyDH         166 ext/openssl/ossl_pkey_dh.c     GetPKeyDH(self, pkey);
GetPKeyDH         179 ext/openssl/ossl_pkey_dh.c     GetPKeyDH(self, pkey);
GetPKeyDH         191 ext/openssl/ossl_pkey_dh.c     GetPKeyDH(self, pkey);
GetPKeyDH         212 ext/openssl/ossl_pkey_dh.c     GetPKeyDH(self, pkey);
GetPKeyDH         235 ext/openssl/ossl_pkey_dh.c     GetPKeyDH(self, pkey);
GetPKeyDH         259 ext/openssl/ossl_pkey_dh.c     GetPKeyDH(self, pkey);
GetPKeyDH         282 ext/openssl/ossl_pkey_dh.c     GetPKeyDH(self, pkey);
GetPKeyDH         300 ext/openssl/ossl_pkey_dh.c     GetPKeyDH(self, pkey);
GetPKeyDH         316 ext/openssl/ossl_pkey_dh.c     GetPKeyDH(self, pkey);
GetPKeyDH         333 ext/openssl/ossl_pkey_dh.c     GetPKeyDH(self, pkey);


GetPKeyDSA

GetPKeyDSA        171 ext/openssl/ossl_pkey_dsa.c     GetPKeyDSA(self, pkey);
GetPKeyDSA        185 ext/openssl/ossl_pkey_dsa.c     GetPKeyDSA(self, pkey);
GetPKeyDSA        199 ext/openssl/ossl_pkey_dsa.c     GetPKeyDSA(self, pkey);
GetPKeyDSA        236 ext/openssl/ossl_pkey_dsa.c     GetPKeyDSA(self, pkey);
GetPKeyDSA        263 ext/openssl/ossl_pkey_dsa.c     GetPKeyDSA(self, pkey);
GetPKeyDSA        288 ext/openssl/ossl_pkey_dsa.c     GetPKeyDSA(self, pkey);
GetPKeyDSA        311 ext/openssl/ossl_pkey_dsa.c     GetPKeyDSA(self, pkey);
GetPKeyDSA        331 ext/openssl/ossl_pkey_dsa.c     GetPKeyDSA(self, pkey);
GetPKeyDSA        353 ext/openssl/ossl_pkey_dsa.c     GetPKeyDSA(self, pkey);


GetPKeyPtr

GetPKeyPtr        156 ext/openssl/ossl_ns_spki.c     if (!NETSCAPE_SPKI_set_pubkey(spki, GetPKeyPtr(key))) { /* NO NEED TO DUP */
GetPKeyPtr        219 ext/openssl/ossl_ns_spki.c     switch (NETSCAPE_SPKI_verify(spki, GetPKeyPtr(key))) { /* NO NEED TO DUP */
GetPKeyPtr         66 ext/openssl/ossl_pkcs12.c     key = GetPKeyPtr(pkey);
GetPKeyPtr         45 ext/openssl/ossl_pkey.h EVP_PKEY *GetPKeyPtr(VALUE);
GetPKeyPtr        190 ext/openssl/ossl_ssl.c     GetPKeyPtr(key = rb_ary_entry(ary, 1));
GetPKeyPtr        225 ext/openssl/ossl_ssl.c     pkey = GetPKeyPtr(dh);
GetPKeyPtr        245 ext/openssl/ossl_ssl.c     return GetPKeyPtr(ossl_ssl_get_tmp_dh(args[0]))->pkey.dh;
GetPKeyPtr        334 ext/openssl/ossl_ssl.c     key = NIL_P(val) ? NULL : GetPKeyPtr(val); /* NO DUP NEEDED */
GetPKeyPtr        457 ext/openssl/ossl_x509cert.c     if (!X509_set_pubkey(x509, GetPKeyPtr(key))) { /* DUPs pkey */
GetPKeyPtr        491 ext/openssl/ossl_x509cert.c     pkey = GetPKeyPtr(key); /* NO NEED TO DUP */
GetPKeyPtr        347 ext/openssl/ossl_x509crl.c     if ((ret = X509_CRL_verify(crl, GetPKeyPtr(key))) < 0) {
GetPKeyPtr        326 ext/openssl/ossl_x509req.c     pkey = GetPKeyPtr(key); /* NO NEED TO DUP */
GetPKeyPtr        362 ext/openssl/ossl_x509req.c     pkey = GetPKeyPtr(key); /* NO NEED TO DUP */


GetPKeyRSA

GetPKeyRSA        165 ext/openssl/ossl_pkey_rsa.c     GetPKeyRSA(self, pkey);
GetPKeyRSA        178 ext/openssl/ossl_pkey_rsa.c     GetPKeyRSA(self, pkey);
GetPKeyRSA        192 ext/openssl/ossl_pkey_rsa.c     GetPKeyRSA(self, pkey);
GetPKeyRSA        231 ext/openssl/ossl_pkey_rsa.c     GetPKeyRSA(self, pkey);
GetPKeyRSA        256 ext/openssl/ossl_pkey_rsa.c     GetPKeyRSA(self, pkey);
GetPKeyRSA        278 ext/openssl/ossl_pkey_rsa.c     GetPKeyRSA(self, pkey);
GetPKeyRSA        300 ext/openssl/ossl_pkey_rsa.c     GetPKeyRSA(self, pkey);
GetPKeyRSA        325 ext/openssl/ossl_pkey_rsa.c     GetPKeyRSA(self, pkey);
GetPKeyRSA        354 ext/openssl/ossl_pkey_rsa.c     GetPKeyRSA(self, pkey);
GetPKeyRSA        382 ext/openssl/ossl_pkey_rsa.c     GetPKeyRSA(self, pkey);
GetPKeyRSA        405 ext/openssl/ossl_pkey_rsa.c     GetPKeyRSA(self, pkey);


GetPositiveInt

GetPositiveInt    796 ext/bigdecimal/bigdecimal.c        U_LONG ix = (U_LONG)GetPositiveInt(n);
GetPositiveInt    823 ext/bigdecimal/bigdecimal.c     U_LONG mx = (U_LONG)GetPositiveInt(n);
GetPositiveInt    840 ext/bigdecimal/bigdecimal.c     U_LONG mx = (U_LONG)GetPositiveInt(n);
GetPositiveInt    857 ext/bigdecimal/bigdecimal.c     U_LONG mx = (U_LONG)GetPositiveInt(n);
GetPositiveInt    894 ext/bigdecimal/bigdecimal.c     n = GetPositiveInt(nFig) + VpDblFig() + 1;
GetPositiveInt   1080 ext/bigdecimal/bigdecimal.c             mc  = GetPositiveInt(f);
GetPositiveInt   1193 ext/bigdecimal/bigdecimal.c         mf = GetPositiveInt(nFig);
GetPositiveInt   1212 ext/bigdecimal/bigdecimal.c         mf = GetPositiveInt(nFig);


GetPrivPKeyPtr

GetPrivPKeyPtr    200 ext/openssl/ossl_ns_spki.c     pkey = GetPrivPKeyPtr(key); /* NO NEED TO DUP */
GetPrivPKeyPtr    220 ext/openssl/ossl_ocsp.c     key = GetPrivPKeyPtr(signer_key);
GetPrivPKeyPtr    572 ext/openssl/ossl_ocsp.c     key = GetPrivPKeyPtr(signer_key);
GetPrivPKeyPtr    204 ext/openssl/ossl_pkcs7.c     pkey = GetPrivPKeyPtr(key); /* NO NEED TO DUP */
GetPrivPKeyPtr    691 ext/openssl/ossl_pkcs7.c     key = GetPrivPKeyPtr(pkey); /* NO NEED TO DUP */
GetPrivPKeyPtr    805 ext/openssl/ossl_pkcs7.c     pkey = GetPrivPKeyPtr(key); /* NO NEED TO DUP */
GetPrivPKeyPtr     47 ext/openssl/ossl_pkey.h EVP_PKEY *GetPrivPKeyPtr(VALUE);
GetPrivPKeyPtr    471 ext/openssl/ossl_x509cert.c     pkey = GetPrivPKeyPtr(key); /* NO NEED TO DUP */
GetPrivPKeyPtr    513 ext/openssl/ossl_x509cert.c     pkey = GetPrivPKeyPtr(key); /* NO NEED TO DUP */
GetPrivPKeyPtr    331 ext/openssl/ossl_x509crl.c     pkey = GetPrivPKeyPtr(key); /* NO NEED TO DUP */
GetPrivPKeyPtr    342 ext/openssl/ossl_x509req.c     pkey = GetPrivPKeyPtr(key); /* NO NEED TO DUP */


GetProcAddress

GetProcAddress   1293 dln.c              if ((init_fct = (void(*)())GetProcAddress(handle, buf)) == NULL) {
GetProcAddress     57 ext/Win32API/Win32API.c     hproc = (HANDLE)GetProcAddress(hdll, RSTRING(proc)->ptr);
GetProcAddress     61 ext/Win32API/Win32API.c 	hproc = (HANDLE)GetProcAddress(hdll, RSTRING(str)->ptr);
GetProcAddress     24 ext/dl/dl.h    #   define dlsym(handle,name) ((void*)GetProcAddress(handle,name))
GetProcAddress     67 ext/tk/stubs.c # define DL_SYM GetProcAddress
GetProcAddress   1581 ext/win32ole/win32ole.c             GetProcAddress(gole32, "CoCreateInstanceEx");
GetProcAddress   1920 ext/win32ole/win32ole.c     pfnHtmlHelp = (FNHTMLHELP*)GetProcAddress(ghhctrl, "HtmlHelpA");
GetProcAddress   3036 win32/win32.c  	    pCreateHardLink = (BOOL (WINAPI *)(LPCTSTR, LPCTSTR, LPSECURITY_ATTRIBUTES))GetProcAddress(hKernel, "CreateHardLinkA");


GetProcessTimes

GetProcessTimes  3343 win32/win32.c      if (GetProcessTimes(GetCurrentProcess(),&create, &exit, &kernel, &user)) {
GetProcessTimes   154 wince/wince.h  BOOL GetProcessTimes(HANDLE hprocess,


GetSPKI

GetSPKI            85 ext/openssl/ossl_ns_spki.c     GetSPKI(self, spki);
GetSPKI           104 ext/openssl/ossl_ns_spki.c     GetSPKI(self, spki);
GetSPKI           121 ext/openssl/ossl_ns_spki.c     GetSPKI(self, spki);
GetSPKI           142 ext/openssl/ossl_ns_spki.c     GetSPKI(self, spki);
GetSPKI           155 ext/openssl/ossl_ns_spki.c     GetSPKI(self, spki);
GetSPKI           168 ext/openssl/ossl_ns_spki.c     GetSPKI(self, spki);
GetSPKI           184 ext/openssl/ossl_ns_spki.c     GetSPKI(self, spki);
GetSPKI           202 ext/openssl/ossl_ns_spki.c     GetSPKI(self, spki);
GetSPKI           218 ext/openssl/ossl_ns_spki.c     GetSPKI(self, spki);


GetStdHandle

GetStdHandle      880 win32/win32.c  	    aStartupInfo.hStdInput  = GetStdHandle(STD_INPUT_HANDLE);
GetStdHandle      886 win32/win32.c  	    aStartupInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
GetStdHandle      892 win32/win32.c  	    aStartupInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE);
GetStdHandle      143 wince/wince.h  HANDLE GetStdHandle(DWORD nStdHandle);


GetTimeval

GetTimeval         93 time.c             GetTimeval(time, tobj);
GetTimeval        142 time.c             GetTimeval(time, tobj);
GetTimeval        217 time.c         	GetTimeval(time, tobj);
GetTimeval        256 time.c         	GetTimeval(time, tobj);
GetTimeval        257 time.c         	GetTimeval(t, tobj2);
GetTimeval        837 time.c             GetTimeval(time, tobj);
GetTimeval        858 time.c             GetTimeval(time, tobj);
GetTimeval        879 time.c             GetTimeval(time, tobj);
GetTimeval        904 time.c             GetTimeval(time1, tobj1);
GetTimeval        906 time.c         	GetTimeval(time2, tobj2);
GetTimeval        933 time.c             GetTimeval(time1, tobj1);
GetTimeval        935 time.c         	GetTimeval(time2, tobj2);
GetTimeval        967 time.c             GetTimeval(time, tobj);
GetTimeval        985 time.c             GetTimeval(time, tobj);
GetTimeval       1001 time.c             GetTimeval(time, tobj);
GetTimeval       1002 time.c             GetTimeval(copy, tcopy);
GetTimeval       1036 time.c             GetTimeval(time, tobj);
GetTimeval       1079 time.c             GetTimeval(time, tobj);
GetTimeval       1161 time.c             GetTimeval(time, tobj);
GetTimeval       1191 time.c             GetTimeval(time, tobj);
GetTimeval       1248 time.c         	GetTimeval(result, tobj);
GetTimeval       1269 time.c             GetTimeval(time1, tobj);
GetTimeval       1297 time.c             GetTimeval(time1, tobj);
GetTimeval       1302 time.c         	GetTimeval(time2, tobj2);
GetTimeval       1324 time.c             GetTimeval(time, tobj);
GetTimeval       1346 time.c             GetTimeval(time, tobj);
GetTimeval       1368 time.c             GetTimeval(time, tobj);
GetTimeval       1390 time.c             GetTimeval(time, tobj);
GetTimeval       1414 time.c             GetTimeval(time, tobj);
GetTimeval       1438 time.c             GetTimeval(time, tobj);
GetTimeval       1460 time.c             GetTimeval(time, tobj);
GetTimeval       1483 time.c             GetTimeval(time, tobj);
GetTimeval       1492 time.c             GetTimeval(time, tobj);\
GetTimeval       1608 time.c             GetTimeval(time, tobj);
GetTimeval       1634 time.c             GetTimeval(time, tobj);
GetTimeval       1663 time.c             GetTimeval(time, tobj);
GetTimeval       1701 time.c             GetTimeval(time, tobj);
GetTimeval       1757 time.c             GetTimeval(time, tobj);
GetTimeval       1856 time.c             GetTimeval(time, tobj);
GetTimeval       1921 time.c             GetTimeval(time, tobj);
GetTimeval       2020 time.c             GetTimeval(time, tobj);


GetUserName

GetUserName       386 win32/win32.c      else if (GetUserName(env, (len = sizeof env, &len))) {
GetUserName       140 wince/wince.h  BOOL GetUserName(LPSTR lpBuffer, LPDWORD nSize);


GetVpValue

GetVpValue        148 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(p,GetVpValue(self,1));
GetVpValue        161 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(p,GetVpValue(self,1));
GetVpValue        183 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(vp,GetVpValue(self,1));
GetVpValue        316 ext/bigdecimal/bigdecimal.c     Real *p = GetVpValue(self,1);
GetVpValue        324 ext/bigdecimal/bigdecimal.c     Real *p = GetVpValue(self,1);
GetVpValue        333 ext/bigdecimal/bigdecimal.c     Real *p = GetVpValue(self,1);
GetVpValue        348 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(p,GetVpValue(self,1));
GetVpValue        398 ext/bigdecimal/bigdecimal.c     Real *p = GetVpValue(x,1);
GetVpValue        410 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(p,GetVpValue(self,1));
GetVpValue        431 ext/bigdecimal/bigdecimal.c        GUARD_OBJ(b,GetVpValue(other,1));
GetVpValue        449 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GetVpValue        450 ext/bigdecimal/bigdecimal.c     b = GetVpValue(r,0);
GetVpValue        477 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GetVpValue        478 ext/bigdecimal/bigdecimal.c     b = GetVpValue(r,0);
GetVpValue        506 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GetVpValue        507 ext/bigdecimal/bigdecimal.c     b = GetVpValue(r,0);
GetVpValue        528 ext/bigdecimal/bigdecimal.c     Real *a = GetVpValue(self,1);
GetVpValue        535 ext/bigdecimal/bigdecimal.c     Real *a = GetVpValue(self,1);
GetVpValue        586 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GetVpValue        599 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GetVpValue        600 ext/bigdecimal/bigdecimal.c     b = GetVpValue(r,0);
GetVpValue        618 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GetVpValue        619 ext/bigdecimal/bigdecimal.c     b = GetVpValue(r,0);
GetVpValue        662 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GetVpValue        663 ext/bigdecimal/bigdecimal.c     b = GetVpValue(r,0);
GetVpValue        729 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GetVpValue        730 ext/bigdecimal/bigdecimal.c     b = GetVpValue(r,0);
GetVpValue        805 ext/bigdecimal/bigdecimal.c           GUARD_OBJ(av,GetVpValue(self,1));
GetVpValue        806 ext/bigdecimal/bigdecimal.c           GUARD_OBJ(bv,GetVpValue(b,1));
GetVpValue        829 ext/bigdecimal/bigdecimal.c        GUARD_OBJ(cv,GetVpValue(c,1));
GetVpValue        846 ext/bigdecimal/bigdecimal.c        GUARD_OBJ(cv,GetVpValue(c,1));
GetVpValue        863 ext/bigdecimal/bigdecimal.c        GUARD_OBJ(cv,GetVpValue(c,1));
GetVpValue        876 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GetVpValue        891 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GetVpValue        908 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GetVpValue        950 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GetVpValue        975 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GetVpValue        990 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GetVpValue       1014 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GetVpValue       1039 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(a,GetVpValue(self,1));
GetVpValue       1060 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(vp,GetVpValue(self,1));
GetVpValue       1110 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(vp,GetVpValue(self,1));
GetVpValue       1131 ext/bigdecimal/bigdecimal.c     S_LONG e = VpExponent10(GetVpValue(self,1));
GetVpValue       1145 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(vp,GetVpValue(self,1));
GetVpValue       1170 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(x,GetVpValue(self,1));
GetVpValue       1241 ext/bigdecimal/bigdecimal.c     int s = GetVpValue(self,1)->sign;


GetWINDOW

GetWINDOW         810 ext/curses/curses.c     GetWINDOW(obj, winp);
GetWINDOW         824 ext/curses/curses.c     GetWINDOW(obj, winp);
GetWINDOW         838 ext/curses/curses.c     GetWINDOW(obj, winp);
GetWINDOW         851 ext/curses/curses.c     GetWINDOW(obj, winp);
GetWINDOW         864 ext/curses/curses.c     GetWINDOW(obj, winp);
GetWINDOW         877 ext/curses/curses.c     GetWINDOW(obj, winp);
GetWINDOW         896 ext/curses/curses.c     GetWINDOW(obj, winp);
GetWINDOW         911 ext/curses/curses.c     GetWINDOW(obj, winp);
GetWINDOW         924 ext/curses/curses.c     GetWINDOW(obj, winp);
GetWINDOW         937 ext/curses/curses.c     GetWINDOW(obj, winp);
GetWINDOW         949 ext/curses/curses.c     GetWINDOW(obj, winp);
GetWINDOW         970 ext/curses/curses.c     GetWINDOW(obj, winp);
GetWINDOW         992 ext/curses/curses.c     GetWINDOW(obj, winp);
GetWINDOW        1009 ext/curses/curses.c     GetWINDOW(obj, winp);
GetWINDOW        1029 ext/curses/curses.c     GetWINDOW(self, winp);
GetWINDOW        1061 ext/curses/curses.c     GetWINDOW(obj, winp);
GetWINDOW        1073 ext/curses/curses.c     GetWINDOW(obj, winp);
GetWINDOW        1085 ext/curses/curses.c     GetWINDOW(obj, winp);
GetWINDOW        1097 ext/curses/curses.c     GetWINDOW(obj, winp);
GetWINDOW        1111 ext/curses/curses.c     GetWINDOW(obj, winp);
GetWINDOW        1126 ext/curses/curses.c 	GetWINDOW(obj, winp);
GetWINDOW        1150 ext/curses/curses.c     GetWINDOW(obj, winp);
GetWINDOW        1162 ext/curses/curses.c     GetWINDOW(obj, winp);
GetWINDOW        1179 ext/curses/curses.c     GetWINDOW(obj, winp);
GetWINDOW        1192 ext/curses/curses.c     GetWINDOW(obj, winp);
GetWINDOW        1206 ext/curses/curses.c     GetWINDOW(obj, winp);
GetWINDOW        1217 ext/curses/curses.c   GetWINDOW(obj, winp);
GetWINDOW        1227 ext/curses/curses.c   GetWINDOW(obj, winp);
GetWINDOW        1239 ext/curses/curses.c   GetWINDOW(obj, winp);
GetWINDOW        1255 ext/curses/curses.c   GetWINDOW(obj, winp);
GetWINDOW        1267 ext/curses/curses.c   GetWINDOW(obj, winp);
GetWINDOW        1278 ext/curses/curses.c   GetWINDOW(obj, winp);
GetWINDOW        1292 ext/curses/curses.c   GetWINDOW(obj,winp);
GetWINDOW        1306 ext/curses/curses.c   GetWINDOW(obj,winp);
GetWINDOW        1327 ext/curses/curses.c   GetWINDOW(obj,winp);
GetWINDOW        1340 ext/curses/curses.c   GetWINDOW(obj,winp);
GetWINDOW        1352 ext/curses/curses.c   GetWINDOW(obj,winp);
GetWINDOW        1366 ext/curses/curses.c   GetWINDOW(obj,winp);
GetWINDOW        1379 ext/curses/curses.c   GetWINDOW(obj,winp);
GetWINDOW        1393 ext/curses/curses.c   GetWINDOW(obj,winp);
GetWINDOW        1413 ext/curses/curses.c   GetWINDOW(obj,winp);
GetWINDOW        1432 ext/curses/curses.c   GetWINDOW(obj,winp);


GetX509

GetX509            27 ext/openssl/ossl_x509cert.c     GetX509(obj, x509); \
GetX509           160 ext/openssl/ossl_x509cert.c     GetX509(self, a);
GetX509           180 ext/openssl/ossl_x509cert.c     GetX509(self, x509);
GetX509           199 ext/openssl/ossl_x509cert.c     GetX509(self, x509);
GetX509           219 ext/openssl/ossl_x509cert.c     GetX509(self, x509);
GetX509           244 ext/openssl/ossl_x509cert.c     GetX509(self, x509);
GetX509           260 ext/openssl/ossl_x509cert.c     GetX509(self, x509);
GetX509           274 ext/openssl/ossl_x509cert.c     GetX509(self, x509);
GetX509           287 ext/openssl/ossl_x509cert.c     GetX509(self, x509);
GetX509           297 ext/openssl/ossl_x509cert.c     GetX509(self, x509);
GetX509           312 ext/openssl/ossl_x509cert.c     GetX509(self, x509);
GetX509           331 ext/openssl/ossl_x509cert.c     GetX509(self, x509);
GetX509           344 ext/openssl/ossl_x509cert.c     GetX509(self, x509);
GetX509           358 ext/openssl/ossl_x509cert.c     GetX509(self, x509);
GetX509           371 ext/openssl/ossl_x509cert.c     GetX509(self, x509);
GetX509           385 ext/openssl/ossl_x509cert.c     GetX509(self, x509);
GetX509           400 ext/openssl/ossl_x509cert.c     GetX509(self, x509);
GetX509           414 ext/openssl/ossl_x509cert.c     GetX509(self, x509);
GetX509           429 ext/openssl/ossl_x509cert.c     GetX509(self, x509);
GetX509           443 ext/openssl/ossl_x509cert.c     GetX509(self, x509);
GetX509           456 ext/openssl/ossl_x509cert.c     GetX509(self, x509);
GetX509           473 ext/openssl/ossl_x509cert.c     GetX509(self, x509);
GetX509           492 ext/openssl/ossl_x509cert.c     GetX509(self, x509);
GetX509           514 ext/openssl/ossl_x509cert.c     GetX509(self, x509);
GetX509           534 ext/openssl/ossl_x509cert.c     GetX509(self, x509);
GetX509           563 ext/openssl/ossl_x509cert.c     GetX509(self, x509);
GetX509           585 ext/openssl/ossl_x509cert.c     GetX509(self, x509);


GetX509Attr

GetX509Attr        27 ext/openssl/ossl_x509attr.c     GetX509Attr(obj, attr); \
GetX509Attr        94 ext/openssl/ossl_x509attr.c     GetX509Attr(self, attr);
GetX509Attr       122 ext/openssl/ossl_x509attr.c     GetX509Attr(self, attr);
GetX509Attr       137 ext/openssl/ossl_x509attr.c     GetX509Attr(self, attr);
GetX509Attr       171 ext/openssl/ossl_x509attr.c     GetX509Attr(self, attr);
GetX509Attr       190 ext/openssl/ossl_x509attr.c     GetX509Attr(self, attr);
GetX509Attr       221 ext/openssl/ossl_x509attr.c     GetX509Attr(self, attr);


GetX509CRL

GetX509CRL         27 ext/openssl/ossl_x509crl.c     GetX509CRL(obj, crl); \
GetX509CRL        120 ext/openssl/ossl_x509crl.c     GetX509CRL(self, a);
GetX509CRL        137 ext/openssl/ossl_x509crl.c     GetX509CRL(self, crl);
GetX509CRL        152 ext/openssl/ossl_x509crl.c     GetX509CRL(self, crl);
GetX509CRL        168 ext/openssl/ossl_x509crl.c     GetX509CRL(self, crl);
GetX509CRL        187 ext/openssl/ossl_x509crl.c     GetX509CRL(self, crl);
GetX509CRL        197 ext/openssl/ossl_x509crl.c     GetX509CRL(self, crl);
GetX509CRL        210 ext/openssl/ossl_x509crl.c     GetX509CRL(self, crl);
GetX509CRL        222 ext/openssl/ossl_x509crl.c     GetX509CRL(self, crl);
GetX509CRL        235 ext/openssl/ossl_x509crl.c     GetX509CRL(self, crl);
GetX509CRL        247 ext/openssl/ossl_x509crl.c     GetX509CRL(self, crl);
GetX509CRL        264 ext/openssl/ossl_x509crl.c     GetX509CRL(self, crl);
GetX509CRL        293 ext/openssl/ossl_x509crl.c     GetX509CRL(self, crl);
GetX509CRL        313 ext/openssl/ossl_x509crl.c     GetX509CRL(self, crl);
GetX509CRL        330 ext/openssl/ossl_x509crl.c     GetX509CRL(self, crl);
GetX509CRL        346 ext/openssl/ossl_x509crl.c     GetX509CRL(self, crl);
GetX509CRL        365 ext/openssl/ossl_x509crl.c     GetX509CRL(self, crl);
GetX509CRL        388 ext/openssl/ossl_x509crl.c     GetX509CRL(self, crl);
GetX509CRL        411 ext/openssl/ossl_x509crl.c     GetX509CRL(self, crl);
GetX509CRL        437 ext/openssl/ossl_x509crl.c     GetX509CRL(self, crl);
GetX509CRL        467 ext/openssl/ossl_x509crl.c     GetX509CRL(self, crl);
GetX509CRL        488 ext/openssl/ossl_x509crl.c     GetX509CRL(self, crl);


GetX509CRLPtr

GetX509CRLPtr     604 ext/openssl/ossl_pkcs7.c     x509crl = GetX509CRLPtr(crl);
GetX509CRLPtr      50 ext/openssl/ossl_x509.h X509_CRL *GetX509CRLPtr(VALUE);
GetX509CRLPtr     160 ext/openssl/ossl_x509ext.c     ctx->crl = GetX509CRLPtr(crl); /* NO DUP NEEDED */
GetX509CRLPtr     276 ext/openssl/ossl_x509store.c     crl = GetX509CRLPtr(arg); /* NO NEED TO DUP */


GetX509CertPtr

GetX509CertPtr    219 ext/openssl/ossl_ocsp.c     signer = GetX509CertPtr(signer_cert);
GetX509CertPtr    571 ext/openssl/ossl_ocsp.c     signer = GetX509CertPtr(signer_cert);
GetX509CertPtr    632 ext/openssl/ossl_ocsp.c     x509s = GetX509CertPtr(subject); /* NO NEED TO DUP */
GetX509CertPtr    633 ext/openssl/ossl_ocsp.c     x509i = GetX509CertPtr(issuer); /* NO NEED TO DUP */
GetX509CertPtr     67 ext/openssl/ossl_pkcs12.c     x509 = GetX509CertPtr(cert);
GetX509CertPtr    203 ext/openssl/ossl_pkcs7.c     x509 = GetX509CertPtr(cert); /* NO NEED TO DUP */
GetX509CertPtr    538 ext/openssl/ossl_pkcs7.c     x509 = GetX509CertPtr(cert);  /* NO NEED TO DUP */
GetX509CertPtr    692 ext/openssl/ossl_pkcs7.c     x509 = GetX509CertPtr(cert); /* NO NEED TO DUP */
GetX509CertPtr    806 ext/openssl/ossl_pkcs7.c     x509 = GetX509CertPtr(cert); /* NO NEED TO DUP */
GetX509CertPtr    882 ext/openssl/ossl_pkcs7.c     x509 = GetX509CertPtr(cert); /* NO NEED TO DUP */
GetX509CertPtr    189 ext/openssl/ossl_ssl.c     GetX509CertPtr(cert = rb_ary_entry(ary, 0));
GetX509CertPtr    332 ext/openssl/ossl_ssl.c     cert = NIL_P(val) ? NULL : GetX509CertPtr(val); /* NO DUP NEEDED */
GetX509CertPtr    353 ext/openssl/ossl_ssl.c 		client_ca = GetX509CertPtr(RARRAY(val)->ptr[i]);
GetX509CertPtr    361 ext/openssl/ossl_ssl.c 	    client_ca = GetX509CertPtr(val); /* NO DUP NEEDED. */
GetX509CertPtr     39 ext/openssl/ossl_x509.h X509 *GetX509CertPtr(VALUE);
GetX509CertPtr    124 ext/openssl/ossl_x509ext.c     ctx->issuer_cert = GetX509CertPtr(cert); /* NO DUP NEEDED */
GetX509CertPtr    136 ext/openssl/ossl_x509ext.c     ctx->subject_cert = GetX509CertPtr(cert); /* NO DUP NEEDED */
GetX509CertPtr    261 ext/openssl/ossl_x509store.c     cert = GetX509CertPtr(arg); /* NO NEED TO DUP */


GetX509Ext

GetX509Ext         27 ext/openssl/ossl_x509ext.c     GetX509Ext(obj, ext); \
GetX509Ext        279 ext/openssl/ossl_x509ext.c     GetX509Ext(self, ext);
GetX509Ext        307 ext/openssl/ossl_x509ext.c     GetX509Ext(self, ext);
GetX509Ext        334 ext/openssl/ossl_x509ext.c     GetX509Ext(self, ext);
GetX509Ext        345 ext/openssl/ossl_x509ext.c     GetX509Ext(self, ext);
GetX509Ext        360 ext/openssl/ossl_x509ext.c     GetX509Ext(obj, ext);
GetX509Ext        381 ext/openssl/ossl_x509ext.c     GetX509Ext(obj, ext);
GetX509Ext        396 ext/openssl/ossl_x509ext.c     GetX509Ext(obj, ext);
GetX509Ext        408 ext/openssl/ossl_x509ext.c     GetX509Ext(obj, ext);


GetX509ExtFactory

GetX509ExtFactory  122 ext/openssl/ossl_x509ext.c     GetX509ExtFactory(self, ctx);
GetX509ExtFactory  134 ext/openssl/ossl_x509ext.c     GetX509ExtFactory(self, ctx);
GetX509ExtFactory  146 ext/openssl/ossl_x509ext.c     GetX509ExtFactory(self, ctx);
GetX509ExtFactory  158 ext/openssl/ossl_x509ext.c     GetX509ExtFactory(self, ctx);
GetX509ExtFactory  172 ext/openssl/ossl_x509ext.c     GetX509ExtFactory(self, ctx);
GetX509ExtFactory  237 ext/openssl/ossl_x509ext.c     GetX509ExtFactory(self, ctx);


GetX509Name

GetX509Name        27 ext/openssl/ossl_x509name.c     GetX509Name(obj, name); \
GetX509Name       118 ext/openssl/ossl_x509name.c     GetX509Name(self, name);
GetX509Name       154 ext/openssl/ossl_x509name.c     GetX509Name(self, name);
GetX509Name       170 ext/openssl/ossl_x509name.c     GetX509Name(self, name);
GetX509Name       192 ext/openssl/ossl_x509name.c     GetX509Name(self, name);
GetX509Name       212 ext/openssl/ossl_x509name.c     GetX509Name(self, name);
GetX509Name       240 ext/openssl/ossl_x509name.c     GetX509Name(self, name1);
GetX509Name       275 ext/openssl/ossl_x509name.c     GetX509Name(self, name);
GetX509Name       290 ext/openssl/ossl_x509name.c     GetX509Name(self, name);


GetX509NamePtr

GetX509NamePtr     73 ext/openssl/ossl_x509.h X509_NAME *GetX509NamePtr(VALUE);
GetX509NamePtr    345 ext/openssl/ossl_x509cert.c     if (!X509_set_subject_name(x509, GetX509NamePtr(subject))) { /* DUPs name */
GetX509NamePtr    372 ext/openssl/ossl_x509cert.c     if (!X509_set_issuer_name(x509, GetX509NamePtr(issuer))) { /* DUPs name */
GetX509NamePtr    199 ext/openssl/ossl_x509crl.c     if (!X509_CRL_set_issuer_name(crl, GetX509NamePtr(issuer))) { /* DUPs name */
GetX509NamePtr    275 ext/openssl/ossl_x509req.c     if (!X509_REQ_set_subject_name(req, GetX509NamePtr(subject))) {


GetX509Req

GetX509Req         27 ext/openssl/ossl_x509req.c     GetX509Req(obj, req); \
GetX509Req        128 ext/openssl/ossl_x509req.c     GetX509Req(self, a);
GetX509Req        147 ext/openssl/ossl_x509req.c     GetX509Req(self, req);
GetX509Req        170 ext/openssl/ossl_x509req.c     GetX509Req(self, req);
GetX509Req        190 ext/openssl/ossl_x509req.c     GetX509Req(self, req);
GetX509Req        215 ext/openssl/ossl_x509req.c     GetX509Req(self, req);
GetX509Req        231 ext/openssl/ossl_x509req.c     GetX509Req(self, req);
GetX509Req        246 ext/openssl/ossl_x509req.c     GetX509Req(self, req);
GetX509Req        260 ext/openssl/ossl_x509req.c     GetX509Req(self, req);
GetX509Req        273 ext/openssl/ossl_x509req.c     GetX509Req(self, req);
GetX509Req        290 ext/openssl/ossl_x509req.c     GetX509Req(self, req);
GetX509Req        311 ext/openssl/ossl_x509req.c     GetX509Req(self, req);
GetX509Req        325 ext/openssl/ossl_x509req.c     GetX509Req(self, req);
GetX509Req        341 ext/openssl/ossl_x509req.c     GetX509Req(self, req);
GetX509Req        361 ext/openssl/ossl_x509req.c     GetX509Req(self, req);
GetX509Req        381 ext/openssl/ossl_x509req.c     GetX509Req(self, req);
GetX509Req        409 ext/openssl/ossl_x509req.c     GetX509Req(self, req);
GetX509Req        427 ext/openssl/ossl_x509req.c     GetX509Req(self, req);


GetX509ReqPtr

GetX509ReqPtr      83 ext/openssl/ossl_x509.h X509_REQ *GetX509ReqPtr(VALUE);
GetX509ReqPtr     148 ext/openssl/ossl_x509ext.c     ctx->subject_req = GetX509ReqPtr(req); /* NO DUP NEEDED */


GetX509Rev

GetX509Rev         27 ext/openssl/ossl_x509revoked.c     GetX509Rev(obj, rev); \
GetX509Rev        100 ext/openssl/ossl_x509revoked.c     GetX509Rev(self, rev);
GetX509Rev        110 ext/openssl/ossl_x509revoked.c     GetX509Rev(self, rev);
GetX509Rev        121 ext/openssl/ossl_x509revoked.c     GetX509Rev(self, rev);
GetX509Rev        133 ext/openssl/ossl_x509revoked.c     GetX509Rev(self, rev);
GetX509Rev        151 ext/openssl/ossl_x509revoked.c     GetX509Rev(self, rev);
GetX509Rev        181 ext/openssl/ossl_x509revoked.c     GetX509Rev(self, rev);
GetX509Rev        200 ext/openssl/ossl_x509revoked.c     GetX509Rev(self, rev);


GetX509StCtx

GetX509StCtx      375 ext/openssl/ossl_x509store.c     GetX509StCtx(self, ctx);
GetX509StCtx      404 ext/openssl/ossl_x509store.c     GetX509StCtx(self, ctx);
GetX509StCtx      421 ext/openssl/ossl_x509store.c     GetX509StCtx(self, ctx);
GetX509StCtx      443 ext/openssl/ossl_x509store.c     GetX509StCtx(self, ctx);
GetX509StCtx      453 ext/openssl/ossl_x509store.c     GetX509StCtx(self, ctx);
GetX509StCtx      465 ext/openssl/ossl_x509store.c     GetX509StCtx(self, ctx);
GetX509StCtx      476 ext/openssl/ossl_x509store.c     GetX509StCtx(self, ctx);
GetX509StCtx      486 ext/openssl/ossl_x509store.c     GetX509StCtx(self, ctx);
GetX509StCtx      497 ext/openssl/ossl_x509store.c     GetX509StCtx(self, ctx);
GetX509StCtx      511 ext/openssl/ossl_x509store.c     GetX509StCtx(self, ctx);
GetX509StCtx      523 ext/openssl/ossl_x509store.c     GetX509StCtx(self, store);
GetX509StCtx      535 ext/openssl/ossl_x509store.c     GetX509StCtx(self, store);
GetX509StCtx      547 ext/openssl/ossl_x509store.c     GetX509StCtx(self, store);
GetX509StCtx      560 ext/openssl/ossl_x509store.c     GetX509StCtx(self, store);


GetX509Store

GetX509Store       28 ext/openssl/ossl_x509store.c     GetX509Store(obj, st); \
GetX509Store       45 ext/openssl/ossl_x509store.c     GetX509Store(obj, ctx); \
GetX509Store      114 ext/openssl/ossl_x509store.c     GetX509Store(self, store);
GetX509Store      126 ext/openssl/ossl_x509store.c     GetX509Store(self, store);
GetX509Store      152 ext/openssl/ossl_x509store.c     GetX509Store(self, store);
GetX509Store      168 ext/openssl/ossl_x509store.c     GetX509Store(self, store);
GetX509Store      184 ext/openssl/ossl_x509store.c     GetX509Store(self, store);
GetX509Store      211 ext/openssl/ossl_x509store.c     GetX509Store(self, store);
GetX509Store      232 ext/openssl/ossl_x509store.c     GetX509Store(self, store);
GetX509Store      247 ext/openssl/ossl_x509store.c     GetX509Store(self, store);
GetX509Store      262 ext/openssl/ossl_x509store.c     GetX509Store(self, store);
GetX509Store      277 ext/openssl/ossl_x509store.c     GetX509Store(self, store);


GetX509StorePtr

GetX509StorePtr   245 ext/openssl/ossl_ocsp.c     x509st = GetX509StorePtr(store);
GetX509StorePtr   599 ext/openssl/ossl_ocsp.c     x509st = GetX509StorePtr(store);
GetX509StorePtr   661 ext/openssl/ossl_pkcs7.c     x509st = GetX509StorePtr(store);
GetX509StorePtr   320 ext/openssl/ossl_ssl.c         store = GetX509StorePtr(val); /* NO NEED TO DUP */
GetX509StorePtr   105 ext/openssl/ossl_x509.h X509_STORE *GetX509StorePtr(VALUE);


GroupNumRemap

GroupNumRemap    1607 regcomp.c        GroupNumRemap* map;
GroupNumRemap    1609 regcomp.c        map = (GroupNumRemap* )xalloca(sizeof(GroupNumRemap) * (env->num_mem + 1));


H

H                 289 ext/digest/md5/md5.c   t = a + H(b,c,d) + X[k] + Ti;\
H                  85 ext/digest/rmd160/rmd160.c       (a) += H((b), (c), (d)) + (x) + 0x6ed9eba1U;	\
H                 110 ext/digest/rmd160/rmd160.c       (a) += H((b), (c), (d)) + (x) + 0x6d703ef3U;	\


HASH

HASH               42 ext/syck/yaml2byte.c     ret->hash   = HASH;
HASH               56 ext/syck/yaml2byte.c     assert(str && HASH == str->hash);
HASH               89 ext/syck/yaml2byte.c     assert(str && HASH == str->hash);
HASH               90 ext/syck/yaml2byte.c     assert(ext && HASH == ext->hash);


HASHC

HASHC             960 ext/sdbm/_sdbm.c 			HASHC;	case 7:	HASHC;
HASHC             961 ext/sdbm/_sdbm.c 		case 6:	HASHC;	case 5:	HASHC;
HASHC             962 ext/sdbm/_sdbm.c 		case 4:	HASHC;	case 3:	HASHC;
HASHC             963 ext/sdbm/_sdbm.c 		case 2:	HASHC;	case 1:	HASHC;


HASH_DELETED

HASH_DELETED      155 hash.c         	FL_SET(arg->hash, HASH_DELETED);
HASH_DELETED      170 hash.c         	if (FL_TEST(hash, HASH_DELETED)) {
HASH_DELETED      172 hash.c         	    FL_UNSET(hash, HASH_DELETED);
HASH_DELETED      606 hash.c         	    FL_SET(hash, HASH_DELETED);


HASH_PROC_DEFAULT

HASH_PROC_DEFAULT  274 hash.c         	FL_SET(hash, HASH_PROC_DEFAULT);
HASH_PROC_DEFAULT  478 hash.c             if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
HASH_PROC_DEFAULT  509 hash.c             FL_UNSET(hash, HASH_PROC_DEFAULT);
HASH_PROC_DEFAULT  531 hash.c             if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
HASH_PROC_DEFAULT  660 hash.c             else if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
HASH_PROC_DEFAULT  876 hash.c             if (FL_TEST(hash2, HASH_PROC_DEFAULT)) {
HASH_PROC_DEFAULT  877 hash.c         	FL_SET(hash, HASH_PROC_DEFAULT);
HASH_PROC_DEFAULT  880 hash.c         	FL_UNSET(hash, HASH_PROC_DEFAULT);
HASH_PROC_DEFAULT 1357 hash.c         	      FL_TEST(hash1, HASH_PROC_DEFAULT) == FL_TEST(hash2, HASH_PROC_DEFAULT)))


HAVE_44BSD_SETUID

HAVE_44BSD_SETUID  107 process.c      #if defined(HAVE_44BSD_SETUID) || defined(__MacOS_X__)
HAVE_44BSD_SETUID 2339 process.c      #elif defined HAVE_44BSD_SETUID


HAVE_ACOSH

HAVE_ACOSH         28 missing.h      #ifndef HAVE_ACOSH
HAVE_ACOSH         34 missing/acosh.c #ifndef HAVE_ACOSH


HAVE_DAYLIGHT

HAVE_DAYLIGHT    1658 time.c         #if !defined(HAVE_TM_ZONE) && (!defined(HAVE_TZNAME) || !defined(HAVE_DAYLIGHT))
HAVE_DAYLIGHT    1673 time.c         #elif defined(HAVE_TZNAME) && defined(HAVE_DAYLIGHT)


HAVE_DLOPEN

HAVE_DLOPEN        96 dln.c          #if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX) && !defined(__APPLE__) && !defined(_UNICOSMP)
HAVE_DLOPEN        74 ext/tk/stubs.c #elif defined HAVE_DLOPEN


HAVE_FCNTL

HAVE_FCNTL         51 ext/socket/socket.c #if defined(HAVE_FCNTL)
HAVE_FCNTL       1025 ext/socket/socket.c #if defined(HAVE_FCNTL)
HAVE_FCNTL       1117 ext/socket/socket.c #ifdef HAVE_FCNTL
HAVE_FCNTL        400 io.c           #if defined(HAVE_FCNTL) && defined(F_GETFL) && defined(O_NONBLOCK)
HAVE_FCNTL       3925 io.c           #if defined(HAVE_FCNTL) && defined(F_GETFL)
HAVE_FCNTL       4575 io.c           #ifdef HAVE_FCNTL
HAVE_FCNTL       4708 io.c           #ifdef HAVE_FCNTL
HAVE_FCNTL         16 missing/dup2.c #if defined(HAVE_FCNTL)
HAVE_FCNTL         20 missing/dup2.c #if !defined(HAVE_FCNTL) || !defined(F_DUPFD)
HAVE_FCNTL         29 missing/dup2.c #if defined(HAVE_FCNTL) && defined(F_DUPFD)
HAVE_FCNTL          3 missing/flock.c #if defined HAVE_FCNTL && defined HAVE_FCNTL_H


HAVE_FCNTL_H

HAVE_FCNTL_H       61 ext/socket/socket.c #ifdef HAVE_FCNTL_H
HAVE_FCNTL_H       17 ext/stringio/stringio.c #if defined(HAVE_FCNTL_H) || defined(_WIN32)
HAVE_FCNTL_H       50 io.c           #if defined(HAVE_FCNTL_H) || defined(_WIN32)
HAVE_FCNTL_H        3 missing/flock.c #if defined HAVE_FCNTL && defined HAVE_FCNTL_H
HAVE_FCNTL_H       26 process.c      #ifdef HAVE_FCNTL_H
HAVE_FCNTL_H      187 random.c       #ifdef HAVE_FCNTL_H
HAVE_FCNTL_H       61 util.c         #if defined(HAVE_FCNTL_H)


HAVE_FINITE

HAVE_FINITE        42 missing.h      #ifndef HAVE_FINITE
HAVE_FINITE        67 missing.h      #  if defined(HAVE_FINITE) && defined(HAVE_ISNAN)
HAVE_FINITE        23 missing/isinf.c #if defined(HAVE_FINITE) && defined(HAVE_ISNAN)
HAVE_FINITE      1160 numeric.c      #if HAVE_FINITE


HAVE_GETRLIMIT

HAVE_GETRLIMIT    430 gc.c           #elif defined(HAVE_GETRLIMIT)
HAVE_GETRLIMIT   1443 gc.c           #ifdef HAVE_GETRLIMIT
HAVE_GETRLIMIT   1475 gc.c           #ifdef HAVE_GETRLIMIT
HAVE_GETRLIMIT   1927 process.c      #if defined(HAVE_GETRLIMIT) && defined(RLIM2NUM)
HAVE_GETRLIMIT   3642 process.c      #ifdef HAVE_GETRLIMIT


HAVE_ISNAN

HAVE_ISNAN         67 missing.h      #  if defined(HAVE_FINITE) && defined(HAVE_ISNAN)
HAVE_ISNAN         75 missing.h      #ifndef HAVE_ISNAN
HAVE_ISNAN         23 missing/isinf.c #if defined(HAVE_FINITE) && defined(HAVE_ISNAN)


HAVE_LONG_LONG

HAVE_LONG_LONG     31 bignum.c       #if HAVE_LONG_LONG
HAVE_LONG_LONG    176 bignum.c       #ifdef HAVE_LONG_LONG
HAVE_LONG_LONG    518 bignum.c       #if HAVE_LONG_LONG
HAVE_LONG_LONG    752 bignum.c       #if HAVE_LONG_LONG
HAVE_LONG_LONG    333 ext/dl/cfunc.c #if HAVE_LONG_LONG  /* used in ruby.h */
HAVE_LONG_LONG    431 ext/dl/cfunc.c #if HAVE_LONG_LONG  /* used in ruby.h */
HAVE_LONG_LONG    108 ext/dl/dl.c    #if HAVE_LONG_LONG
HAVE_LONG_LONG    119 ext/dl/dl.c    #if HAVE_LONG_LONG
HAVE_LONG_LONG    130 ext/dl/dl.c    #if HAVE_LONG_LONG
HAVE_LONG_LONG    103 ext/dl/dl.h    #if HAVE_LONG_LONG
HAVE_LONG_LONG    112 ext/dl/dl.h    #if HAVE_LONG_LONG
HAVE_LONG_LONG    129 ext/dl/dl.h    #if HAVE_LONG_LONG
HAVE_LONG_LONG     88 intern.h       #if HAVE_LONG_LONG
HAVE_LONG_LONG     96 io.c           #if SIZEOF_OFF_T > SIZEOF_LONG && !defined(HAVE_LONG_LONG)
HAVE_LONG_LONG   1599 numeric.c      #if HAVE_LONG_LONG
HAVE_LONG_LONG    360 pack.c         #ifdef HAVE_LONG_LONG
HAVE_LONG_LONG     81 parse.y        # ifdef HAVE_LONG_LONG
HAVE_LONG_LONG    119 ruby.h         #if HAVE_LONG_LONG
HAVE_LONG_LONG    161 ruby.h         #if HAVE_LONG_LONG
HAVE_LONG_LONG    168 ruby.h         #if SIZEOF_OFF_T > SIZEOF_LONG && defined(HAVE_LONG_LONG)
HAVE_LONG_LONG    285 ruby.h         #if HAVE_LONG_LONG
HAVE_LONG_LONG    292 ruby.h         #if HAVE_LONG_LONG && SIZEOF_OFF_T > SIZEOF_LONG


HAVE_NATIVETHREAD

HAVE_NATIVETHREAD 1250 eval.c         #ifdef HAVE_NATIVETHREAD
HAVE_NATIVETHREAD 1281 eval.c         #ifdef HAVE_NATIVETHREAD
HAVE_NATIVETHREAD 10482 eval.c         #ifdef HAVE_NATIVETHREAD
HAVE_NATIVETHREAD   40 ext/tk/stubs.c #ifdef HAVE_NATIVETHREAD
HAVE_NATIVETHREAD   46 ext/tk/stubs.c #ifdef HAVE_NATIVETHREAD
HAVE_NATIVETHREAD 1255 ext/tk/tcltklib.c #ifdef HAVE_NATIVETHREAD
HAVE_NATIVETHREAD 1263 ext/tk/tcltklib.c #ifdef HAVE_NATIVETHREAD
HAVE_NATIVETHREAD 2379 ext/tk/tcltklib.c #ifdef HAVE_NATIVETHREAD
HAVE_NATIVETHREAD 2787 ext/tk/tcltklib.c #ifdef HAVE_NATIVETHREAD
HAVE_NATIVETHREAD 2934 ext/tk/tcltklib.c #ifdef HAVE_NATIVETHREAD
HAVE_NATIVETHREAD 3111 ext/tk/tcltklib.c #ifdef HAVE_NATIVETHREAD
HAVE_NATIVETHREAD 5745 ext/tk/tcltklib.c #ifdef HAVE_NATIVETHREAD
HAVE_NATIVETHREAD 7656 ext/tk/tcltklib.c #ifdef HAVE_NATIVETHREAD
HAVE_NATIVETHREAD 1272 gc.c           #ifdef HAVE_NATIVETHREAD
HAVE_NATIVETHREAD  460 intern.h       #ifdef HAVE_NATIVETHREAD
HAVE_NATIVETHREAD  731 ruby.h         #ifdef HAVE_NATIVETHREAD
HAVE_NATIVETHREAD  351 signal.c       #ifdef HAVE_NATIVETHREAD
HAVE_NATIVETHREAD  370 signal.c       #ifdef HAVE_NATIVETHREAD
HAVE_NATIVETHREAD  418 signal.c       #if defined(HAVE_NATIVETHREAD) && defined(HAVE_NATIVETHREAD_KILL)
HAVE_NATIVETHREAD  452 signal.c       #if defined(HAVE_NATIVETHREAD) && defined(HAVE_NATIVETHREAD_KILL)
HAVE_NATIVETHREAD  481 signal.c       #if defined(HAVE_NATIVETHREAD) && defined(HAVE_NATIVETHREAD_KILL)
HAVE_NATIVETHREAD  496 signal.c       #if defined(HAVE_NATIVETHREAD) && defined(HAVE_NATIVETHREAD_KILL)
HAVE_NATIVETHREAD  822 signal.c       #ifdef HAVE_NATIVETHREAD


HAVE_NATIVETHREAD_KILL

HAVE_NATIVETHREAD_KILL 1258 eval.c         # ifdef HAVE_NATIVETHREAD_KILL
HAVE_NATIVETHREAD_KILL  736 ruby.h         #ifdef HAVE_NATIVETHREAD_KILL
HAVE_NATIVETHREAD_KILL  418 signal.c       #if defined(HAVE_NATIVETHREAD) && defined(HAVE_NATIVETHREAD_KILL)
HAVE_NATIVETHREAD_KILL  452 signal.c       #if defined(HAVE_NATIVETHREAD) && defined(HAVE_NATIVETHREAD_KILL)
HAVE_NATIVETHREAD_KILL  481 signal.c       #if defined(HAVE_NATIVETHREAD) && defined(HAVE_NATIVETHREAD_KILL)
HAVE_NATIVETHREAD_KILL  496 signal.c       #if defined(HAVE_NATIVETHREAD) && defined(HAVE_NATIVETHREAD_KILL)


HAVE_PROTOTYPES

HAVE_PROTOTYPES    16 defines.h      # ifndef  HAVE_PROTOTYPES
HAVE_PROTOTYPES    25 defines.h      #ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES    17 dln.h          # ifndef  HAVE_PROTOTYPES
HAVE_PROTOTYPES    26 dln.h          #ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES    71 ext/socket/addrinfo.h # ifdef HAVE_PROTOTYPES
HAVE_PROTOTYPES    42 oniguruma.h    # ifndef  HAVE_PROTOTYPES
HAVE_PROTOTYPES    18 util.h         # ifndef  HAVE_PROTOTYPES
HAVE_PROTOTYPES    25 util.h         #ifdef HAVE_PROTOTYPES


HAVE_SETRGID

HAVE_SETRGID     2405 process.c      #if defined HAVE_SETRGID
HAVE_SETRGID     2550 process.c      #elif defined HAVE_SETRGID
HAVE_SETRGID     2861 process.c      #elif defined(HAVE_SETRGID) && defined (HAVE_SETEGID)
HAVE_SETRGID     2910 process.c      #elif defined(HAVE_SETRGID) && defined(HAVE_SETEGID)


HAVE_SETRUID

HAVE_SETRUID     2070 process.c      #if defined HAVE_SETRUID
HAVE_SETRUID     2187 process.c      #elif defined HAVE_SETRUID
HAVE_SETRUID     2269 process.c      #elif defined(HAVE_SETRUID) && defined(HAVE_SETEUID)
HAVE_SETRUID     2317 process.c      #elif defined(HAVE_SETRUID) && defined(HAVE_SETEUID)


HAVE_SIGPROCMASK

HAVE_SIGPROCMASK  422 signal.c       #ifdef HAVE_SIGPROCMASK
HAVE_SIGPROCMASK  428 signal.c       #ifdef HAVE_SIGPROCMASK
HAVE_SIGPROCMASK  546 signal.c       # ifdef HAVE_SIGPROCMASK
HAVE_SIGPROCMASK  555 signal.c       # ifdef HAVE_SIGPROCMASK
HAVE_SIGPROCMASK  690 signal.c       #ifdef HAVE_SIGPROCMASK
HAVE_SIGPROCMASK  704 signal.c       #ifdef HAVE_SIGPROCMASK
HAVE_SIGPROCMASK  718 signal.c       # ifdef HAVE_SIGPROCMASK
HAVE_SIGPROCMASK  777 signal.c       # ifdef HAVE_SIGPROCMASK
HAVE_SIGPROCMASK  846 signal.c       # ifdef HAVE_SIGPROCMASK
HAVE_SIGPROCMASK  855 signal.c       # ifdef HAVE_SIGPROCMASK
HAVE_SIGPROCMASK  871 signal.c       #ifdef HAVE_SIGPROCMASK


HAVE_SPAWNV

HAVE_SPAWNV      1063 process.c      #if !defined(HAVE_FORK) && defined(HAVE_SPAWNV)
HAVE_SPAWNV      1550 process.c      #elif defined HAVE_SPAWNV
HAVE_SPAWNV      1596 process.c      #if defined(HAVE_FORK) || defined(HAVE_SPAWNV)
HAVE_SPAWNV      1619 process.c      #if defined(HAVE_FORK) || defined(HAVE_SPAWNV)


HAVE_STDARG_PROTOTYPES

HAVE_STDARG_PROTOTYPES   19 defines.h      # ifndef  HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES   32 defines.h      #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES   20 dln.h          # ifndef  HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES   24 ext/curses/curses.c # ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES   14 ext/tk/tcltklib.c #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES  638 ext/tk/tcltklib.c #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES   26 ext/win32ole/win32ole.c #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES  579 ext/win32ole/win32ole.c #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES   18 intern.h       #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES   68 missing/vsnprintf.c #if !defined(HAVE_STDARG_PROTOTYPES)
HAVE_STDARG_PROTOTYPES   75 missing/vsnprintf.c #if defined(HAVE_STDARG_PROTOTYPES)
HAVE_STDARG_PROTOTYPES 1114 missing/vsnprintf.c #if defined(HAVE_STDARG_PROTOTYPES)
HAVE_STDARG_PROTOTYPES 1130 missing/vsnprintf.c #if defined(HAVE_STDARG_PROTOTYPES)
HAVE_STDARG_PROTOTYPES   45 oniguruma.h    # ifndef  HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES   59 oniguruma.h    #ifdef HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES   21 util.h         # ifndef  HAVE_STDARG_PROTOTYPES
HAVE_STDARG_PROTOTYPES   30 util.h         #ifdef HAVE_STDARG_PROTOTYPES


HAVE_STDLIB_H

HAVE_STDLIB_H      54 dir.c          #ifndef HAVE_STDLIB_H
HAVE_STDLIB_H      16 dln.c          #ifdef HAVE_STDLIB_H
HAVE_STDLIB_H      19 error.c        #ifdef HAVE_STDLIB_H
HAVE_STDLIB_H      21 eval.c         #ifdef HAVE_STDLIB_H
HAVE_STDLIB_H      21 missing/strtod.c #ifdef HAVE_STDLIB_H
HAVE_STDLIB_H      20 process.c      #ifdef HAVE_STDLIB_H
HAVE_STDLIB_H     189 regint.h       #ifdef HAVE_STDLIB_H
HAVE_STDLIB_H      45 ruby.c         #ifndef HAVE_STDLIB_H
HAVE_STDLIB_H      44 ruby.h         #ifdef HAVE_STDLIB_H
HAVE_STDLIB_H       7 st.c           #ifdef HAVE_STDLIB_H


HAVE_STRING_H

HAVE_STRING_H      58 dir.c          #ifndef HAVE_STRING_H
HAVE_STRING_H      38 dln.c          #ifdef HAVE_STRING_H
HAVE_STRING_H      38 missing/isinf.c #ifdef HAVE_STRING_H
HAVE_STRING_H     894 process.c      #ifndef HAVE_STRING_H
HAVE_STRING_H     197 regint.h       #ifdef HAVE_STRING_H
HAVE_STRING_H      48 ruby.h         #ifdef HAVE_STRING_H


HAVE_ST_RDEV

HAVE_ST_RDEV      389 file.c         #ifdef HAVE_ST_RDEV
HAVE_ST_RDEV      410 file.c         #if defined(HAVE_ST_RDEV) && defined(major)
HAVE_ST_RDEV      432 file.c         #if defined(HAVE_ST_RDEV) && defined(minor)


HAVE_SYS_RESOURCE_H

HAVE_SYS_RESOURCE_H   29 gc.c           #ifdef HAVE_SYS_RESOURCE_H
HAVE_SYS_RESOURCE_H   48 process.c      #ifdef HAVE_SYS_RESOURCE_H


HAVE_SYS_TIMES_H

HAVE_SYS_TIMES_H   57 process.c      #ifdef HAVE_SYS_TIMES_H
HAVE_SYS_TIMES_H 1069 regexec.c      #ifdef HAVE_SYS_TIMES_H


HAVE_SYS_TIME_H

HAVE_SYS_TIME_H    13 ext/openssl/ossl_asn1.c #if defined(HAVE_SYS_TIME_H)
HAVE_SYS_TIME_H    58 ext/socket/socket.c #ifdef HAVE_SYS_TIME_H
HAVE_SYS_TIME_H    25 gc.c           #ifdef HAVE_SYS_TIME_H
HAVE_SYS_TIME_H    15 missing.h      #if defined(HAVE_SYS_TIME_H)
HAVE_SYS_TIME_H  1058 regexec.c      #ifdef HAVE_SYS_TIME_H


HAVE_SYS_WAIT_H

HAVE_SYS_WAIT_H    18 ext/pty/pty.c  #ifdef HAVE_SYS_WAIT_H
HAVE_SYS_WAIT_H    45 process.c      #ifdef HAVE_SYS_WAIT_H


HAVE_TIMES

HAVE_TIMES         65 process.c      #if defined(HAVE_TIMES) || defined(_WIN32)
HAVE_TIMES       3526 process.c      #if defined(HAVE_TIMES) && !defined(__CHECKER__)
HAVE_TIMES       3711 process.c      #if defined(HAVE_TIMES) || defined(_WIN32)


HAVE_TM_ZONE

HAVE_TM_ZONE      190 missing/strftime.c #ifndef HAVE_TM_ZONE
HAVE_TM_ZONE      418 missing/strftime.c #ifdef HAVE_TM_ZONE
HAVE_TM_ZONE      457 missing/strftime.c #ifdef HAVE_TM_ZONE
HAVE_TM_ZONE     1658 time.c         #if !defined(HAVE_TM_ZONE) && (!defined(HAVE_TZNAME) || !defined(HAVE_DAYLIGHT))
HAVE_TM_ZONE     1671 time.c         #if defined(HAVE_TM_ZONE)


HAVE_TRUNCATE

HAVE_TRUNCATE    2956 file.c         #ifdef HAVE_TRUNCATE
HAVE_TRUNCATE    3013 file.c         #ifdef HAVE_TRUNCATE


HAVE_TZNAME

HAVE_TZNAME       118 missing/strftime.c #if !defined(OS2) && !defined(MSDOS) && defined(HAVE_TZNAME)
HAVE_TZNAME       192 missing/strftime.c #ifndef HAVE_TZNAME
HAVE_TZNAME       425 missing/strftime.c #if HAVE_TZNAME
HAVE_TZNAME       453 missing/strftime.c #ifdef HAVE_TZNAME
HAVE_TZNAME      1658 time.c         #if !defined(HAVE_TM_ZONE) && (!defined(HAVE_TZNAME) || !defined(HAVE_DAYLIGHT))
HAVE_TZNAME      1673 time.c         #elif defined(HAVE_TZNAME) && defined(HAVE_DAYLIGHT)


HAVE_UNISTD_H

HAVE_UNISTD_H      20 dir.c          #ifdef HAVE_UNISTD_H
HAVE_UNISTD_H      68 dln.c          #ifdef HAVE_UNISTD_H
HAVE_UNISTD_H      68 eval.c         #ifdef HAVE_UNISTD_H
HAVE_UNISTD_H      29 ext/digest/rmd160/rmd160hl.c #if defined(HAVE_UNISTD_H)
HAVE_UNISTD_H      23 ext/digest/sha1/sha1hl.c #if defined(HAVE_UNISTD_H)
HAVE_UNISTD_H      59 ext/digest/sha2/sha2hl.c #if defined(HAVE_UNISTD_H)
HAVE_UNISTD_H      14 ext/etc/etc.c  #ifdef HAVE_UNISTD_H
HAVE_UNISTD_H      12 ext/openssl/ossl_bio.c #ifdef HAVE_UNISTD_H
HAVE_UNISTD_H      16 ext/openssl/ossl_ssl.c #if defined(HAVE_UNISTD_H)
HAVE_UNISTD_H      34 ext/pty/pty.c  #ifdef HAVE_UNISTD_H
HAVE_UNISTD_H      22 ext/readline/readline.c #ifdef HAVE_UNISTD_H
HAVE_UNISTD_H      25 ext/sdbm/_sdbm.c #ifdef HAVE_UNISTD_H
HAVE_UNISTD_H      20 ext/socket/socket.c #ifdef HAVE_UNISTD_H
HAVE_UNISTD_H      25 file.c         #ifdef HAVE_UNISTD_H
HAVE_UNISTD_H      71 io.c           #ifdef HAVE_UNISTD_H
HAVE_UNISTD_H      37 missing/crypt.c #ifdef HAVE_UNISTD_H
HAVE_UNISTD_H      23 process.c      #ifdef HAVE_UNISTD_H
HAVE_UNISTD_H     181 random.c       #ifdef HAVE_UNISTD_H
HAVE_UNISTD_H    1061 regexec.c      #ifdef HAVE_UNISTD_H
HAVE_UNISTD_H      33 ruby.c         #ifdef HAVE_UNISTD_H
HAVE_UNISTD_H      24 string.c       #ifdef HAVE_UNISTD_H
HAVE_UNISTD_H      17 time.c         #ifdef HAVE_UNISTD_H
HAVE_UNISTD_H      58 util.c         #ifdef HAVE_UNISTD_H


HAVE_UTIME_H

HAVE_UTIME_H       46 file.c         #ifdef HAVE_UTIME_H
HAVE_UTIME_H     1976 file.c         #if !defined HAVE_UTIME_H && !defined HAVE_SYS_UTIME_H


HAVE_WAITPID

HAVE_WAITPID      546 process.c      #if !defined(HAVE_WAITPID) && !defined(HAVE_WAIT4)
HAVE_WAITPID      563 process.c      #ifdef HAVE_WAITPID


HAVE__SETJMP

HAVE__SETJMP      168 eval.c         #if !defined(setjmp) && defined(HAVE__SETJMP)
HAVE__SETJMP       39 gc.c           #if !defined(setjmp) && defined(HAVE__SETJMP)


HEAPCNT

HEAPCNT          8779 parse.y            size_t cnt = HEAPCNT(1, size);
HEAPCNT          8789 parse.y            size_t cnt = HEAPCNT(nelem, size);
HEAPCNT          8800 parse.y            size_t cnt = HEAPCNT(1, size);


HEAP_MIN_SLOTS

HEAP_MIN_SLOTS    325 gc.c           static int heap_slots = HEAP_MIN_SLOTS;
HEAP_MIN_SLOTS    358 gc.c           	    if (heap_slots == HEAP_MIN_SLOTS) {
HEAP_MIN_SLOTS    361 gc.c           	    heap_slots = HEAP_MIN_SLOTS;


HEXPREFIX

HEXPREFIX         795 missing/vsnprintf.c 			flags = (flags) | QUADINT | HEXPREFIX;
HEXPREFIX         799 missing/vsnprintf.c 			flags = (flags & ~QUADINT) | HEXPREFIX;
HEXPREFIX         801 missing/vsnprintf.c 			flags = (flags) | HEXPREFIX;
HEXPREFIX         861 missing/vsnprintf.c 				flags |= HEXPREFIX;
HEXPREFIX         922 missing/vsnprintf.c 		else if (flags & HEXPREFIX)
HEXPREFIX         933 missing/vsnprintf.c 		} else if (flags & HEXPREFIX) {


HH

HH                197 ext/digest/rmd160/rmd160.c 	HH(dd, ee, aa, bb, cc, block[ 3], 11);
HH                198 ext/digest/rmd160/rmd160.c 	HH(cc, dd, ee, aa, bb, block[10], 13);
HH                199 ext/digest/rmd160/rmd160.c 	HH(bb, cc, dd, ee, aa, block[14],  6);
HH                200 ext/digest/rmd160/rmd160.c 	HH(aa, bb, cc, dd, ee, block[ 4],  7);
HH                201 ext/digest/rmd160/rmd160.c 	HH(ee, aa, bb, cc, dd, block[ 9], 14);
HH                202 ext/digest/rmd160/rmd160.c 	HH(dd, ee, aa, bb, cc, block[15],  9);
HH                203 ext/digest/rmd160/rmd160.c 	HH(cc, dd, ee, aa, bb, block[ 8], 13);
HH                204 ext/digest/rmd160/rmd160.c 	HH(bb, cc, dd, ee, aa, block[ 1], 15);
HH                205 ext/digest/rmd160/rmd160.c 	HH(aa, bb, cc, dd, ee, block[ 2], 14);
HH                206 ext/digest/rmd160/rmd160.c 	HH(ee, aa, bb, cc, dd, block[ 7],  8);
HH                207 ext/digest/rmd160/rmd160.c 	HH(dd, ee, aa, bb, cc, block[ 0], 13);
HH                208 ext/digest/rmd160/rmd160.c 	HH(cc, dd, ee, aa, bb, block[ 6],  6);
HH                209 ext/digest/rmd160/rmd160.c 	HH(bb, cc, dd, ee, aa, block[13],  5);
HH                210 ext/digest/rmd160/rmd160.c 	HH(aa, bb, cc, dd, ee, block[11], 12);
HH                211 ext/digest/rmd160/rmd160.c 	HH(ee, aa, bb, cc, dd, block[ 5],  7);
HH                212 ext/digest/rmd160/rmd160.c 	HH(dd, ee, aa, bb, cc, block[12],  5);


HHH

HHH               287 ext/digest/rmd160/rmd160.c 	HHH(ddd, eee, aaa, bbb, ccc, block[15],  9);
HHH               288 ext/digest/rmd160/rmd160.c 	HHH(ccc, ddd, eee, aaa, bbb, block[ 5],  7);
HHH               289 ext/digest/rmd160/rmd160.c 	HHH(bbb, ccc, ddd, eee, aaa, block[ 1], 15);
HHH               290 ext/digest/rmd160/rmd160.c 	HHH(aaa, bbb, ccc, ddd, eee, block[ 3], 11);
HHH               291 ext/digest/rmd160/rmd160.c 	HHH(eee, aaa, bbb, ccc, ddd, block[ 7],  8);
HHH               292 ext/digest/rmd160/rmd160.c 	HHH(ddd, eee, aaa, bbb, ccc, block[14],  6);
HHH               293 ext/digest/rmd160/rmd160.c 	HHH(ccc, ddd, eee, aaa, bbb, block[ 6],  6);
HHH               294 ext/digest/rmd160/rmd160.c 	HHH(bbb, ccc, ddd, eee, aaa, block[ 9], 14);
HHH               295 ext/digest/rmd160/rmd160.c 	HHH(aaa, bbb, ccc, ddd, eee, block[11], 12);
HHH               296 ext/digest/rmd160/rmd160.c 	HHH(eee, aaa, bbb, ccc, ddd, block[ 8], 13);
HHH               297 ext/digest/rmd160/rmd160.c 	HHH(ddd, eee, aaa, bbb, ccc, block[12],  5);
HHH               298 ext/digest/rmd160/rmd160.c 	HHH(ccc, ddd, eee, aaa, bbb, block[ 2], 14);
HHH               299 ext/digest/rmd160/rmd160.c 	HHH(bbb, ccc, ddd, eee, aaa, block[10], 13);
HHH               300 ext/digest/rmd160/rmd160.c 	HHH(aaa, bbb, ccc, ddd, eee, block[ 0], 13);
HHH               301 ext/digest/rmd160/rmd160.c 	HHH(eee, aaa, bbb, ccc, ddd, block[ 4],  7);
HHH               302 ext/digest/rmd160/rmd160.c 	HHH(ddd, eee, aaa, bbb, ccc, block[13],  5);


HMAC_CTX_cleanup

HMAC_CTX_cleanup   61 ext/openssl/openssl_missing.h void HMAC_CTX_cleanup(HMAC_CTX *ctx);
HMAC_CTX_cleanup   44 ext/openssl/ossl_hmac.c     HMAC_CTX_cleanup(ctx);
HMAC_CTX_cleanup  111 ext/openssl/ossl_hmac.c 	HMAC_CTX_cleanup(&final);
HMAC_CTX_cleanup  116 ext/openssl/ossl_hmac.c     HMAC_CTX_cleanup(&final);


HMAC_CTX_copy

HMAC_CTX_copy      60 ext/openssl/openssl_missing.h int HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in);
HMAC_CTX_copy      84 ext/openssl/ossl_hmac.c     if (!HMAC_CTX_copy(ctx1, ctx2)) {
HMAC_CTX_copy     107 ext/openssl/ossl_hmac.c     if (!HMAC_CTX_copy(&final, ctx)) {


HMAC_CTX_init

HMAC_CTX_init      59 ext/openssl/openssl_missing.h void HMAC_CTX_init(HMAC_CTX *ctx);
HMAC_CTX_init      55 ext/openssl/ossl_hmac.c     HMAC_CTX_init(ctx);


HOLD_SIZE

HOLD_SIZE         368 ext/nkf/nkf-utf8/nkf.c STATIC unsigned char   hold_buf[HOLD_SIZE*2];
HOLD_SIZE        2381 ext/nkf/nkf-utf8/nkf.c     if (hold_count >= HOLD_SIZE*2)
HOLD_SIZE        2384 ext/nkf/nkf-utf8/nkf.c     return ((hold_count >= HOLD_SIZE*2) ? EOF : hold_count);


HZ

HZ               3527 process.c      #ifndef HZ
HZ               3539 process.c      			 utime = rb_float_new((double)buf.tms_utime / HZ),
HZ               3540 process.c      			 stime = rb_float_new((double)buf.tms_stime / HZ),
HZ               3541 process.c      			 cutime = rb_float_new((double)buf.tms_cutime / HZ),
HZ               3542 process.c      			 sctime = rb_float_new((double)buf.tms_cstime / HZ));


HashDataType

HashDataType      425 regparse.c         onig_st_foreach(t, i_print_name_entry, (HashDataType )fp);
HashDataType      476 regparse.c         onig_st_lookup_strend(t, name, name_end, (HashDataType* )((void* )(&e)));
HashDataType      519 regparse.c         onig_st_foreach(t, i_names, (HashDataType )&narg);
HashDataType      547 regparse.c         onig_st_foreach(t, i_renumber_name, (HashDataType )map);
HashDataType      727 regparse.c                               (HashDataType )e);


I

I                 315 ext/digest/md5/md5.c   t = a + I(b,c,d) + X[k] + Ti;\
I                  90 ext/digest/rmd160/rmd160.c       (a) += I((b), (c), (d)) + (x) + 0x8f1bbcdcU;	\
I                 115 ext/digest/rmd160/rmd160.c       (a) += I((b), (c), (d)) + (x) + 0x5c4dd124U;	\
I                 776 missing/strftime.c in a process of fixing of strftime() in libraries on Atari ST I grabbed


IA64_INIT

IA64_INIT        11526 eval.c             IA64_INIT(th->bstr_ptr = 0);\
IA64_INIT        11527 eval.c             IA64_INIT(th->bstr_len = 0);\
IA64_INIT        11528 eval.c             IA64_INIT(th->bstr_max = 0);\


ICONV2VALUE

ICONV2VALUE       562 ext/iconv/iconv.c     DATA_PTR(self) = (void *)ICONV2VALUE(iconv_create(to, from, &opt));
ICONV2VALUE       582 ext/iconv/iconv.c     cd = ICONV2VALUE(iconv_create(to, from, &opt));
ICONV2VALUE       643 ext/iconv/iconv.c     return rb_ensure(iconv_s_convert, (VALUE)&arg, iconv_free, ICONV2VALUE(arg.cd));
ICONV2VALUE       664 ext/iconv/iconv.c     return rb_ensure(iconv_s_convert, (VALUE)&arg, iconv_free, ICONV2VALUE(arg.cd));


ICONV_FREE

ICONV_FREE        224 ext/iconv/iconv.c     if (RDATA(obj)->dfree != ICONV_FREE) {
ICONV_FREE        463 ext/iconv/iconv.c     return Data_Wrap_Struct(klass, 0, ICONV_FREE, 0);
ICONV_FREE        584 ext/iconv/iconv.c     self = Data_Wrap_Struct(self, NULL, ICONV_FREE, (void *)cd);


ID

ID                 22 array.c        static ID id_cmp;
ID                 60 class.c        clone_method(ID mid, NODE *body, st_table *tbl)
ID                 76 class.c        	ID id;
ID                175 class.c        rb_define_class_id(ID id, VALUE super)
ID                197 class.c            ID id;
ID                226 class.c            ID id;
ID                266 class.c        rb_define_module_id(ID id)
ID                280 class.c            ID id;
ID                300 class.c            ID id;
ID                496 class.c        ins_methods_push(ID name, long type, VALUE ary, long visi)
ID                516 class.c        ins_methods_i(ID name, long type, VALUE ary)
ID                522 class.c        ins_methods_prot_i(ID name, long type, VALUE ary)
ID                528 class.c        ins_methods_priv_i(ID name, long type, VALUE ary)
ID                534 class.c        ins_methods_pub_i(ID name, long type, VALUE ary)
ID                540 class.c        method_entry(ID key, NODE *body, st_table *list)
ID                554 class.c        class_instance_method_list(int argc, VALUE *argv, VALUE mod, int (*func) (ID, long, VALUE))
ID                731 class.c        rb_define_method_id(VALUE klass, ID name, VALUE (*func)(ANYARGS), int argc)
ID                 17 compar.c       static ID cmp;
ID                 18 enum.c         static ID id_each, id_eqq, id_cmp;
ID                 19 env.h              ID callee;
ID                 20 env.h              ID this_func;
ID                 37 env.h              ID *local_tbl;
ID                 53 env.h              ID id;
ID                 62 env.h              ID id, oid;
ID                427 error.c            ID bt = rb_intern("bt");
ID                483 error.c            ID id_mesg = rb_intern("mesg");
ID                547 error.c        rb_name_error(ID id, const char *fmt, ...)
ID                287 eval.c         NORETURN(static void print_undef(VALUE, ID));
ID                289 eval.c         print_undef(VALUE klass, ID id)
ID                297 eval.c         static ID removed, singleton_removed, undefined, singleton_undefined;
ID                304 eval.c             ID mid;			/* method's id */
ID                305 eval.c             ID mid0;			/* method's original id */
ID                329 eval.c         rb_clear_cache_for_undef(VALUE klass, ID id)
ID                344 eval.c         rb_clear_cache_by_id(ID id)
ID                373 eval.c         static ID init, eqq, each, aref, aset, match, missing;
ID                374 eval.c         static ID added, singleton_added;
ID                375 eval.c         static ID __id__, __send__, respond_to;
ID                382 eval.c         rb_add_method(VALUE klass, ID mid, NODE *node, int noex)
ID                430 eval.c         search_method(VALUE klass, ID id, VALUE *origin)
ID                445 eval.c         rb_get_method_body(VALUE *klassp, ID *idp, int *noexp)
ID                447 eval.c             ID id = *idp;
ID                503 eval.c         rb_method_node(VALUE klass, ID id)
ID                517 eval.c         remove_method(VALUE klass, ID mid)
ID                586 eval.c         rb_export_method(VALUE klass, ID name, ID noex)
ID                612 eval.c         rb_method_boundp(VALUE klass, ID id, int ex)
ID                634 eval.c         rb_attr(VALUE klass, ID id, int read, int write, int ex)
ID                638 eval.c             ID attriv;
ID                756 eval.c         new_dvar(ID id, VALUE value, struct RVarmap *prev)
ID                768 eval.c         rb_dvar_defined(ID id)
ID                780 eval.c         rb_dvar_curr(ID id)
ID                793 eval.c         rb_dvar_ref(ID id)
ID                807 eval.c         rb_dvar_push(ID id, VALUE value)
ID                813 eval.c         dvar_asgn_internal(ID id, VALUE value, int curr)
ID                840 eval.c         dvar_asgn(ID id, VALUE value)
ID                846 eval.c         dvar_asgn_curr(ID id, VALUE value)
ID                855 eval.c             ID id;
ID               1038 eval.c         static VALUE rb_call(VALUE,VALUE,ID,int,const VALUE*,calling_scope_t);
ID               1065 eval.c         static void call_trace_func(rb_event_t,NODE*,VALUE,ID,VALUE);
ID               1630 eval.c             ID id;
ID               1761 eval.c         ev_const_defined(NODE *cref, ID id, VALUE self)
ID               1783 eval.c         ev_const_get(NODE *cref, ID id, VALUE self)
ID               1909 eval.c         rb_undef(VALUE klass, ID id)
ID               2010 eval.c         rb_alias(VALUE klass, ID name, ID def)
ID               2092 eval.c         	copy->nd_tbl = ALLOC_N(ID, node->nd_tbl[0]+1);
ID               2093 eval.c         	MEMCPY(copy->nd_tbl, node->nd_tbl, ID, node->nd_tbl[0]+1);
ID               2230 eval.c         		ID id = node->nd_mid;
ID               2509 eval.c         call_trace_func(rb_event_t event, NODE *node, VALUE self, ID id, VALUE klass /* OK */)
ID               3414 eval.c         	    ID id = node->nd_next->nd_vid;
ID               3827 eval.c         	    ID cname;
ID               3883 eval.c         	    ID cname;
ID               4012 eval.c         rb_obj_respond_to(VALUE obj, ID id, int priv)
ID               4029 eval.c         rb_respond_to(VALUE obj, ID id)
ID               4047 eval.c             ID id;
ID               4120 eval.c             ID id = rb_to_id(mid);
ID               4159 eval.c             ID id = rb_to_id(mid);
ID               4198 eval.c             ID id = rb_to_id(mid);
ID               4456 eval.c             ID exception;
ID               5347 eval.c             ID id;
ID               5397 eval.c         method_missing(VALUE obj, ID id, int argc, const VALUE *argv, int call_status)
ID               5576 eval.c         rb_call0(VALUE klass, VALUE recv, ID id, ID oid,
ID               5768 eval.c         rb_call(VALUE klass, VALUE recv, ID mid,
ID               5773 eval.c             ID     id = mid;
ID               5820 eval.c         rb_apply(VALUE recv, ID mid, VALUE args)
ID               5896 eval.c         rb_funcall(VALUE recv, ID mid, int n, ...)
ID               5920 eval.c         rb_funcall2(VALUE recv, ID mid, int argc, const VALUE *argv)
ID               5926 eval.c         rb_funcall3(VALUE recv, ID mid, int argc, const VALUE *argv)
ID               6063 eval.c         ID
ID               6542 eval.c             volatile ID callee, this_func;
ID               6906 eval.c         	ID this_func, callee;
ID               6998 eval.c         set_method_visibility(VALUE self, int argc, VALUE *argv, ID ex)
ID               7186 eval.c             ID id;
ID               7384 eval.c         errinfo_setter(VALUE val, ID id, VALUE *var)
ID               7393 eval.c         errat_getter(ID id)
ID               7399 eval.c         errat_setter(VALUE val, ID id, VALUE *var)
ID               7423 eval.c             ID *tbl;
ID               7722 eval.c             ID id = rb_to_id(sym);
ID               7810 eval.c             volatile ID *tbl;
ID               8638 eval.c         mnew(VALUE klass, VALUE obj, ID id, VALUE mklass)
ID               8645 eval.c             ID oid = id;
ID               9111 eval.c         rb_mod_method_arity(VALUE mod, ID id)
ID               9118 eval.c         rb_obj_method_arity(VALUE obj, ID id)
ID               9297 eval.c             ID id;
ID               9992 eval.c         mark_loading_thread(ID key, VALUE value, int lev)
ID               11876 eval.c             const ID *tbl;
ID               11884 eval.c         	    ID id = *tbl++;
ID               12319 eval.c         rb_thread_local_aref(VALUE thread, ID id)
ID               12364 eval.c         rb_thread_local_aset(VALUE thread, ID id, VALUE val)
ID               12426 eval.c         thread_keys_i(ID key, VALUE value, VALUE ary)
ID               12811 eval.c         static ID recursive_key;
ID                 37 ext/digest/digest.c static ID id_metadata;
ID                 25 ext/digest/rmd160/rmd160init.c     ID id_metadata;
ID                 26 ext/digest/sha2/sha2init.c     ID id_metadata;
ID                 11 ext/dl/cfunc.c static ID id_last_error;
ID                 28 ext/dl/cfunc.c static ID id_win32_last_error;
ID                 55 ext/dl/cfunc.c rb_dlcfunc_new(void (*func)(), int type, const char *name, ID calltype)
ID                 13 ext/dl/cptr.c  static ID id_to_ptr;
ID                 11 ext/dl/dl.c    ID rbdl_id_cdecl;
ID                 12 ext/dl/dl.c    ID rbdl_id_stdcall;
ID                161 ext/dl/dl.h        ID   calltype;
ID                163 ext/dl/dl.h    extern ID rbdl_id_cdecl;
ID                164 ext/dl/dl.h    extern ID rbdl_id_stdcall;
ID                178 ext/dl/dl.h    VALUE rb_dlcfunc_new(void (*func)(), int dltype, const char * name, ID calltype);
ID                 92 ext/iconv/iconv.c static ID id_transliterate, id_discard_ilseq;
ID                101 ext/iconv/iconv.c static ID rb_success, rb_failed;
ID                476 ext/iconv/iconv.c 	    ID id = SYM2ID(name);
ID                251 ext/openssl/ossl.c ID ossl_s_to_der;
ID                154 ext/openssl/ossl.h extern ID ossl_s_to_der;
ID                190 ext/openssl/ossl_asn1.c static ID sIMPLICIT, sEXPLICIT;
ID                191 ext/openssl/ossl_asn1.c static ID sUNIVERSAL, sAPPLICATION, sCONTEXT_SPECIFIC, sPRIVATE;
ID                 19 ext/openssl/ossl_pkey.c ID id_private_q;
ID                 17 ext/openssl/ossl_pkey.h extern ID id_private_q;
ID                659 ext/openssl/ossl_ssl.c         ID id_sysread = rb_intern("sysread");
ID                703 ext/openssl/ossl_ssl.c         ID id_syswrite = rb_intern("syswrite");
ID                 40 ext/racc/cparse/cparse.c static ID id_yydebug;
ID                 41 ext/racc/cparse/cparse.c static ID id_nexttoken;
ID                 42 ext/racc/cparse/cparse.c static ID id_onerror;
ID                 43 ext/racc/cparse/cparse.c static ID id_noreduce;
ID                 44 ext/racc/cparse/cparse.c static ID id_catch;
ID                 46 ext/racc/cparse/cparse.c static ID id_errstatus;
ID                 48 ext/racc/cparse/cparse.c static ID id_d_shift;
ID                 49 ext/racc/cparse/cparse.c static ID id_d_reduce;
ID                 50 ext/racc/cparse/cparse.c static ID id_d_accept;
ID                 51 ext/racc/cparse/cparse.c static ID id_d_read_token;
ID                 52 ext/racc/cparse/cparse.c static ID id_d_next_state;
ID                 53 ext/racc/cparse/cparse.c static ID id_d_e_pop;
ID                 60 ext/racc/cparse/cparse.c static ID value_to_id _((VALUE v));
ID                 69 ext/racc/cparse/cparse.c static ID
ID                 82 ext/racc/cparse/cparse.c     return (ID)NUM2ULONG(v);
ID                150 ext/racc/cparse/cparse.c     ID    lexmid;          /* name of scanner method (must be an iterator) */
ID                680 ext/racc/cparse/cparse.c     ID mid;
ID                789 ext/racc/cparse/cparse.c     ID id_racc = rb_intern("Racc");
ID                 32 ext/readline/readline.c static ID completion_proc, completion_case_fold;
ID                 12 ext/ripper/eventids2.c static ID ripper_id_backref;
ID                 13 ext/ripper/eventids2.c static ID ripper_id_backtick;
ID                 14 ext/ripper/eventids2.c static ID ripper_id_comma;
ID                 15 ext/ripper/eventids2.c static ID ripper_id_const;
ID                 16 ext/ripper/eventids2.c static ID ripper_id_cvar;
ID                 17 ext/ripper/eventids2.c static ID ripper_id_embexpr_beg;
ID                 18 ext/ripper/eventids2.c static ID ripper_id_embexpr_end;
ID                 19 ext/ripper/eventids2.c static ID ripper_id_embvar;
ID                 20 ext/ripper/eventids2.c static ID ripper_id_float;
ID                 21 ext/ripper/eventids2.c static ID ripper_id_gvar;
ID                 22 ext/ripper/eventids2.c static ID ripper_id_ident;
ID                 23 ext/ripper/eventids2.c static ID ripper_id_int;
ID                 24 ext/ripper/eventids2.c static ID ripper_id_ivar;
ID                 25 ext/ripper/eventids2.c static ID ripper_id_kw;
ID                 26 ext/ripper/eventids2.c static ID ripper_id_lbrace;
ID                 27 ext/ripper/eventids2.c static ID ripper_id_lbracket;
ID                 28 ext/ripper/eventids2.c static ID ripper_id_lparen;
ID                 29 ext/ripper/eventids2.c static ID ripper_id_nl;
ID                 30 ext/ripper/eventids2.c static ID ripper_id_op;
ID                 31 ext/ripper/eventids2.c static ID ripper_id_period;
ID                 32 ext/ripper/eventids2.c static ID ripper_id_rbrace;
ID                 33 ext/ripper/eventids2.c static ID ripper_id_rbracket;
ID                 34 ext/ripper/eventids2.c static ID ripper_id_rparen;
ID                 35 ext/ripper/eventids2.c static ID ripper_id_semicolon;
ID                 36 ext/ripper/eventids2.c static ID ripper_id_symbeg;
ID                 37 ext/ripper/eventids2.c static ID ripper_id_tstring_beg;
ID                 38 ext/ripper/eventids2.c static ID ripper_id_tstring_content;
ID                 39 ext/ripper/eventids2.c static ID ripper_id_tstring_end;
ID                 40 ext/ripper/eventids2.c static ID ripper_id_words_beg;
ID                 41 ext/ripper/eventids2.c static ID ripper_id_qwords_beg;
ID                 42 ext/ripper/eventids2.c static ID ripper_id_words_sep;
ID                 43 ext/ripper/eventids2.c static ID ripper_id_regexp_beg;
ID                 44 ext/ripper/eventids2.c static ID ripper_id_regexp_end;
ID                 45 ext/ripper/eventids2.c static ID ripper_id_label;
ID                 46 ext/ripper/eventids2.c static ID ripper_id_tlambda;
ID                 47 ext/ripper/eventids2.c static ID ripper_id_tlambda_arg;
ID                 48 ext/ripper/eventids2.c static ID ripper_id_tlambeg;
ID                 50 ext/ripper/eventids2.c static ID ripper_id_ignored_nl;
ID                 51 ext/ripper/eventids2.c static ID ripper_id_comment;
ID                 52 ext/ripper/eventids2.c static ID ripper_id_embdoc_beg;
ID                 53 ext/ripper/eventids2.c static ID ripper_id_embdoc;
ID                 54 ext/ripper/eventids2.c static ID ripper_id_embdoc_end;
ID                 55 ext/ripper/eventids2.c static ID ripper_id_sp;
ID                 56 ext/ripper/eventids2.c static ID ripper_id_heredoc_beg;
ID                 57 ext/ripper/eventids2.c static ID ripper_id_heredoc_end;
ID                 58 ext/ripper/eventids2.c static ID ripper_id___end__;
ID                 59 ext/ripper/eventids2.c static ID ripper_id_CHAR;
ID                120 ext/ripper/eventids2.c     ID *id;
ID                267 ext/ripper/eventids2.c static ID
ID               1900 ext/socket/socket.c 	static ID for_fd = 0;
ID               1297 ext/strscan/strscan.c     ID id_scanerr = rb_intern("ScanError");
ID                 52 ext/syck/rubyext.c static ID s_new, s_utc, s_at, s_to_f, s_to_i, s_read, s_binmode, s_call, s_cmp, s_transfer, s_update, s_dup, s_haskey, s_match, s_keys, s_unpack, s_tr_bang, s_default_set, s_tag_read_class, s_tag_subclasses, s_resolver, s_push, s_emitter, s_level, s_detect_implicit, s_node_import, s_out, s_input, s_intern, s_transform, s_yaml_new, s_yaml_initialize, s_node_export, s_to_yaml, s_write, s_set_resolver;
ID                 53 ext/syck/rubyext.c static ID s_tags, s_domain, s_kind, s_name, s_options, s_type_id, s_type_id_set, s_style, s_style_set, s_value, s_value_set;
ID                 99 ext/tk/tcltklib.c static ID ID_at_enc;
ID                100 ext/tk/tcltklib.c static ID ID_at_interp;
ID                102 ext/tk/tcltklib.c static ID ID_stop_p;
ID                103 ext/tk/tcltklib.c static ID ID_alive_p;
ID                104 ext/tk/tcltklib.c static ID ID_kill;
ID                105 ext/tk/tcltklib.c static ID ID_join;
ID                106 ext/tk/tcltklib.c static ID ID_value;
ID                108 ext/tk/tcltklib.c static ID ID_call;
ID                109 ext/tk/tcltklib.c static ID ID_backtrace;
ID                110 ext/tk/tcltklib.c static ID ID_message;
ID                112 ext/tk/tcltklib.c static ID ID_at_reason;
ID                113 ext/tk/tcltklib.c static ID ID_return;
ID                114 ext/tk/tcltklib.c static ID ID_break;
ID                115 ext/tk/tcltklib.c static ID ID_next;
ID                117 ext/tk/tcltklib.c static ID ID_to_s;
ID                118 ext/tk/tcltklib.c static ID ID_inspect;
ID                357 ext/tk/tcltklib.c     ID    method;
ID               2503 ext/tk/tcltklib.c     volatile ID method;
ID                 29 ext/tk/tkutil/tkutil.c static ID ID_split_tklist;
ID                 30 ext/tk/tkutil/tkutil.c static ID ID_toUTF8;
ID                 31 ext/tk/tkutil/tkutil.c static ID ID_fromUTF8;
ID                 32 ext/tk/tkutil/tkutil.c static ID ID_path;
ID                 33 ext/tk/tkutil/tkutil.c static ID ID_at_path;
ID                 34 ext/tk/tkutil/tkutil.c static ID ID_at_enc;
ID                 35 ext/tk/tkutil/tkutil.c static ID ID_to_eval;
ID                 36 ext/tk/tkutil/tkutil.c static ID ID_to_s;
ID                 37 ext/tk/tkutil/tkutil.c static ID ID_source;
ID                 38 ext/tk/tkutil/tkutil.c static ID ID_downcase;
ID                 39 ext/tk/tkutil/tkutil.c static ID ID_install_cmd;
ID                 40 ext/tk/tkutil/tkutil.c static ID ID_merge_tklist;
ID                 41 ext/tk/tkutil/tkutil.c static ID ID_encoding;
ID                 42 ext/tk/tkutil/tkutil.c static ID ID_encoding_system;
ID                 43 ext/tk/tkutil/tkutil.c static ID ID_call;
ID                 45 ext/tk/tkutil/tkutil.c static ID ID_SUBST_INFO;
ID               1084 ext/tk/tkutil/tkutil.c     ID    *ivar;
ID               1104 ext/tk/tkutil/tkutil.c         if (ptr->ivar != (ID*)NULL) free(ptr->ivar);
ID               1113 ext/tk/tkutil/tkutil.c     ID *ivar;
ID               1126 ext/tk/tkutil/tkutil.c     ivar = ALLOC_N(ID, 1);
ID               1171 ext/tk/tkutil/tkutil.c     ID key_id, value_id;
ID               1232 ext/tk/tkutil/tkutil.c     ID id;
ID               1355 ext/tk/tkutil/tkutil.c     ID *ivar = ALLOC_N(ID, len + 1);
ID                153 ext/win32ole/win32ole.c static ID id_events;
ID               1471 ext/win32ole/win32ole.c     ID id;
ID               2865 ext/win32ole/win32ole.c     ID id;
ID               1708 ext/zlib/zlib.c static ID id_write, id_read, id_readpartial, id_flush, id_seek, id_close;
ID                102 file.c             static ID to_path;
ID                633 gc.c           mark_entry(ID key, VALUE value, int lev)
ID                 36 hash.c         static ID id_hash, id_call, id_default;
ID                121 intern.h       VALUE rb_define_class_id(ID, VALUE);
ID                123 intern.h       VALUE rb_define_module_id(ID);
ID                132 intern.h       void rb_define_method_id(VALUE, ID, VALUE (*)(ANYARGS), int);
ID                134 intern.h       void rb_undef(VALUE, ID);
ID                156 intern.h       PRINTF_ARGS(NORETURN(void rb_name_error(ID, const char*, ...)), 2, 3);
ID                212 intern.h       void rb_alias(VALUE, ID, ID);
ID                213 intern.h       void rb_attr(VALUE,ID,int,int,int);
ID                214 intern.h       int rb_method_boundp(VALUE, ID, int);
ID                215 intern.h       VALUE rb_dvar_defined(ID);
ID                216 intern.h       VALUE rb_dvar_curr(ID);
ID                217 intern.h       VALUE rb_dvar_ref(ID);
ID                218 intern.h       void rb_dvar_asgn(ID, VALUE);
ID                219 intern.h       void rb_dvar_push(ID, VALUE);
ID                222 intern.h       int rb_obj_respond_to(VALUE, ID, int);
ID                223 intern.h       int rb_respond_to(VALUE, ID);
ID                225 intern.h       VALUE rb_apply(VALUE, ID, VALUE);
ID                227 intern.h       ID rb_frame_this_func(void);
ID                246 intern.h       int rb_mod_method_arity(VALUE, ID);
ID                247 intern.h       int rb_obj_method_arity(VALUE, ID);
ID                280 intern.h       VALUE rb_thread_local_aref(VALUE, ID);
ID                281 intern.h       VALUE rb_thread_local_aset(VALUE, ID, VALUE);
ID                392 intern.h       ID rb_id_attrset(ID);
ID                394 intern.h       int rb_is_const_id(ID);
ID                395 intern.h       int rb_is_instance_id(ID);
ID                396 intern.h       int rb_is_class_id(ID);
ID                397 intern.h       int rb_is_local_id(ID);
ID                398 intern.h       int rb_is_junk_id(ID);
ID                511 intern.h       void rb_str_setter(VALUE, ID, VALUE*);
ID                519 intern.h       VALUE rb_struct_getmember(VALUE, ID);
ID                530 intern.h       void rb_name_class(VALUE, ID);
ID                532 intern.h       void rb_autoload(VALUE, ID, const char*);
ID                533 intern.h       VALUE rb_autoload_load(VALUE, ID);
ID                534 intern.h       VALUE rb_autoload_p(VALUE, ID);
ID                539 intern.h       void rb_alias_variable(ID, ID);
ID                545 intern.h       VALUE rb_ivar_get(VALUE, ID);
ID                546 intern.h       VALUE rb_ivar_set(VALUE, ID, VALUE);
ID                547 intern.h       VALUE rb_ivar_defined(VALUE, ID);
ID                550 intern.h       VALUE rb_attr_get(VALUE, ID);
ID                558 intern.h       int rb_const_defined(VALUE, ID);
ID                559 intern.h       int rb_const_defined_at(VALUE, ID);
ID                560 intern.h       int rb_const_defined_from(VALUE, ID);
ID                561 intern.h       VALUE rb_const_get(VALUE, ID);
ID                562 intern.h       VALUE rb_const_get_at(VALUE, ID);
ID                563 intern.h       VALUE rb_const_get_from(VALUE, ID);
ID                564 intern.h       void rb_const_set(VALUE, ID, VALUE);
ID                567 intern.h       VALUE rb_cvar_defined(VALUE, ID);
ID                569 intern.h       void rb_cvar_set(VALUE, ID, VALUE, int);
ID                570 intern.h       VALUE rb_cvar_get(VALUE, ID);
ID                123 io.c           static ID id_write, id_read, id_getc, id_flush;
ID               1712 io.c           lineno_setter(VALUE val, ID id, VALUE *var)
ID               3232 io.c           	ID to_open = rb_intern("to_open");
ID               3811 io.c           must_respond_to(ID mid, VALUE val, ID id)
ID               3821 io.c           stdout_setter(VALUE val, ID id, VALUE *variable)
ID               3828 io.c           defout_setter(VALUE val, ID id, VALUE *variable)
ID               3835 io.c           deferr_setter(VALUE val, ID id, VALUE *variable)
ID                 81 marshal.c      static ID s_dump, s_load, s_mdump, s_mload;
ID                 82 marshal.c      static ID s_dump_data, s_load_data, s_alloc;
ID                 83 marshal.c      static ID s_getc, s_read, s_write, s_binmode;
ID                305 marshal.c      w_symbol(ID id, struct dump_arg *arg)
ID                386 marshal.c      w_obj_each(ID id, VALUE value, struct dump_call_arg *arg)
ID                843 marshal.c      static ID
ID                846 marshal.c          ID id;
ID                855 marshal.c      static ID
ID                858 marshal.c          ID id;
ID                866 marshal.c      static ID
ID                903 marshal.c      	    ID id = r_symbol(arg);
ID               1129 marshal.c      	    ID slot;
ID                135 node.h         	ID id;
ID                138 node.h         	ID *tbl;
ID                142 node.h         	ID id;
ID                148 node.h         	ID id;
ID                364 node.h         void rb_add_method(VALUE, ID, NODE *, int);
ID                367 node.h         NODE* rb_method_node(VALUE klass, ID id);
ID                370 node.h         struct global_entry *rb_global_entry(ID);
ID                 66 numeric.c      static ID id_coerce, id_to_i, id_eq;
ID               1438 numeric.c      	ID cmp;
ID               2631 numeric.c          ID id = FIX2UINT(fix);
ID                 34 object.c       static ID id_eq, id_eql, id_inspect, id_init_copy;
ID                305 object.c       inspect_i(ID id, VALUE value, VALUE str)
ID               1030 object.c           ID id = SYM2ID(sym);
ID               1050 object.c           ID id = SYM2ID(sym);
ID               1489 object.c       static ID
ID               1501 object.c       ID
ID               1505 object.c           ID id;
ID               1641 object.c           ID id = rb_to_id(name);
ID               1664 object.c           ID id = rb_to_id(name);
ID               1686 object.c           ID id = rb_to_id(name);
ID               1820 object.c           ID id = rb_to_id(iv);
ID               1852 object.c           ID id = rb_to_id(iv);
ID               1877 object.c           ID id = rb_to_id(iv);
ID               1906 object.c           ID id = rb_to_id(iv);
ID               1918 object.c           ID m;
ID               2281 object.c           ID id = rb_intern(name);
ID                112 parse.y            ID *tbl;
ID                117 parse.y            ID *dnames;
ID                270 parse.y        static NODE *call_op_gen(struct parser_params*,NODE*,ID,int,NODE*);
ID                275 parse.y        static void shadowing_lvar_gen(struct parser_params*,ID);
ID                281 parse.y        static NODE *new_call(NODE*,ID,NODE*);
ID                282 parse.y        static NODE *new_fcall_gen(struct parser_params*,ID,NODE*);
ID                287 parse.y        static NODE *gettable_gen(struct parser_params*,ID);
ID                289 parse.y        static NODE *assignable_gen(struct parser_params*,ID,NODE*);
ID                291 parse.y        static NODE *new_bv_gen(struct parser_params*,ID,NODE*);
ID                295 parse.y        static NODE *attrset_gen(struct parser_params*,NODE*,ID);
ID                309 parse.y        static int  local_append_gen(struct parser_params*, ID);
ID                311 parse.y        static int  local_cnt_gen(struct parser_params*, ID);
ID                313 parse.y        static int  local_id_gen(struct parser_params*, ID);
ID                315 parse.y        static ID  *local_tbl_gen(struct parser_params*);
ID                317 parse.y        static ID   internal_id(void);
ID                327 parse.y        static void dyna_var_gen(struct parser_params*,ID);
ID                329 parse.y        static void dyna_check_gen(struct parser_params*,ID);
ID                339 parse.y        static int lvar_defined_gen(struct parser_params*, ID);
ID                363 parse.y        static ID ripper_id_gets;
ID                365 parse.y        static VALUE ripper_dispatch0(struct parser_params*,ID);
ID                366 parse.y        static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
ID                367 parse.y        static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
ID                368 parse.y        static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
ID                369 parse.y        static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
ID                370 parse.y        static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
ID                383 parse.y        static VALUE ripper_id2sym(ID);
ID                468 parse.y            ID id;
ID                901 parse.y        			    ID vid = $1->nd_vid;
ID               1656 parse.y        			    ID vid = $1->nd_vid;
ID               5419 parse.y        lvar_defined_gen(struct parser_params *parser, ID id)
ID               6838 parse.y        	    ID ident = rb_intern(tok());
ID               7115 parse.y        call_op_gen(struct parser_params *parser, NODE *recv, ID id, int narg, NODE *arg1)
ID               7165 parse.y        gettable_gen(struct parser_params *parser, ID id)
ID               7209 parse.y        assignable_gen(struct parser_params *parser, ID id, NODE *val)
ID               7267 parse.y        shadowing_lvar_gen(struct parser_params *parser, ID name)
ID               7275 parse.y        new_bv_gen(struct parser_params *parser, ID name, NODE *val)
ID               7305 parse.y        ID
ID               7306 parse.y        rb_id_attrset(ID id)
ID               7314 parse.y        attrset_gen(struct parser_params *parser, NODE *recv, ID id)
ID               7906 parse.y        arg_dup_check(ID vid, VALUE m, VALUE list, NODE *node)
ID               7951 parse.y        new_call(NODE *r, ID m, NODE *a)
ID               7961 parse.y        new_fcall_gen(struct parser_params *parser, ID m, NODE *a)
ID               8019 parse.y        static ID*
ID               8027 parse.y        local_append_gen(struct parser_params *parser, ID id)
ID               8030 parse.y        	lvtbl->tbl = ALLOC_N(ID, 4);
ID               8039 parse.y        	REALLOC_N(lvtbl->tbl, ID, lvtbl->cnt+2);
ID               8047 parse.y        local_cnt_gen(struct parser_params *parser, ID id)
ID               8060 parse.y        local_id_gen(struct parser_params *parser, ID id)
ID               8077 parse.y        	lvtbl->tbl = ALLOC_N(ID, lvtbl->cnt+3);
ID               8078 parse.y        	MEMCPY(lvtbl->tbl, ruby_scope->local_tbl, ID, lvtbl->cnt+1);
ID               8130 parse.y        dyna_var_gen(struct parser_params *parser, ID id)
ID               8139 parse.y        	lvtbl->dnames = ALLOC_N(ID, 1);
ID               8142 parse.y        	REALLOC_N(lvtbl->dnames, ID, lvtbl->dname_size+1);
ID               8148 parse.y        dyna_check_gen(struct parser_params *parser, ID id)
ID               8249 parse.y            ID token;
ID               8295 parse.y            ID last_id;
ID               8307 parse.y        static ID
ID               8408 parse.y        ID
ID               8412 parse.y            ID id;
ID               8486 parse.y        rb_id2name(ID id)
ID               8504 parse.y        	ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL;
ID               8525 parse.y        symbols_i(char *key, ID value, VALUE ary)
ID               8557 parse.y        rb_is_const_id(ID id)
ID               8564 parse.y        rb_is_class_id(ID id)
ID               8571 parse.y        rb_is_instance_id(ID id)
ID               8578 parse.y        rb_is_local_id(ID id)
ID               8585 parse.y        rb_is_junk_id(ID id)
ID               8871 parse.y        ripper_dispatch0(struct parser_params *parser, ID mid)
ID               8877 parse.y        ripper_dispatch1(struct parser_params *parser, ID mid, VALUE a)
ID               8884 parse.y        ripper_dispatch2(struct parser_params *parser, ID mid, VALUE a, VALUE b)
ID               8892 parse.y        ripper_dispatch3(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c)
ID               8901 parse.y        ripper_dispatch4(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
ID               8911 parse.y        ripper_dispatch5(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
ID               8922 parse.y            ID id;
ID               8976 parse.y        keyword_id_to_str(ID id)
ID               8988 parse.y        ripper_id2sym(ID id)
ID                 17 prec.c         static ID prc_pr, prc_if;
ID                 16 range.c        static ID id_cmp, id_succ, id_beg, id_end, id_excl;
ID                321 range.c        	    ID c = rb_intern(EXCL(range) ? "<" : "<=");
ID               2133 re.c           ignorecase_setter(VALUE val, ID id)
ID               1018 ruby.c         set_arg0(VALUE val, ID id)
ID               1130 ruby.c         verbose_setter(VALUE val, ID id, VALUE *variable)
ID               1136 ruby.c         opt_W_getter(VALUE val, ID id)
ID                529 ruby.h         ID rb_intern(const char*);
ID                530 ruby.h         char *rb_id2name(ID);
ID                531 ruby.h         ID rb_to_id(VALUE);
ID                541 ruby.h         VALUE rb_funcall(VALUE, ID, int, ...);
ID                542 ruby.h         VALUE rb_funcall2(VALUE, ID, int, const VALUE*);
ID                543 ruby.h         VALUE rb_funcall3(VALUE, ID, int, const VALUE*);
ID                256 string.c       static ID id_to_s;
ID               1349 string.c           ID succ = rb_intern("succ");
ID               3964 string.c           ID id;
ID               4161 string.c       rb_str_setter(VALUE val, ID id, VALUE *var)
ID                 22 struct.c           ID id;
ID                 93 struct.c       rb_struct_getmember(VALUE obj, ID id)
ID                172 struct.c           ID id;
ID                202 struct.c       	ID id = SYM2ID(RARRAY(members)->ptr[i]);
ID                230 struct.c       	ID slot = rb_intern(mem);
ID                278 struct.c           ID id;
ID                446 struct.c       	ID id;
ID                519 struct.c       rb_struct_aref_id(VALUE s, ID id)
ID                575 struct.c       rb_struct_aset_id(VALUE s, ID id, VALUE val)
ID                 23 variable.c     static ID autoload, classpath, tmp_classpath;
ID                 36 variable.c         ID name;
ID                 44 variable.c     fc_path(struct fc_result *fc, ID name)
ID                 69 variable.c     fc_i(ID key, VALUE value, struct fc_result *res)
ID                145 variable.c     	    ID classid = rb_intern("__classid__");
ID                226 variable.c         ID id;
ID                262 variable.c     rb_name_class(VALUE klass, ID id)
ID                304 variable.c         ID id;
ID                307 variable.c     static VALUE undef_getter(ID id);
ID                308 variable.c     static void  undef_setter(VALUE val, ID id, void *data, struct global_variable *var);
ID                311 variable.c     static VALUE val_getter(ID id, VALUE val);
ID                312 variable.c     static void  val_setter(VALUE val, ID id, void *data, struct global_variable *var);
ID                315 variable.c     static VALUE var_getter(ID id, VALUE *var);
ID                316 variable.c     static void  var_setter(VALUE val, ID id, VALUE *var);
ID                320 variable.c     rb_global_entry(ID id)
ID                344 variable.c     undef_getter(ID id)
ID                352 variable.c     undef_setter(VALUE val, ID id, void *data, struct global_variable *var)
ID                367 variable.c     val_getter(ID id, VALUE val)
ID                373 variable.c     val_setter(VALUE val, ID id, void *data, struct global_variable *var)
ID                385 variable.c     var_getter(ID id, VALUE *var)
ID                392 variable.c     var_setter(VALUE val, ID id, VALUE *var)
ID                404 variable.c     readonly_setter(VALUE val, ID id, void *var)
ID                410 variable.c     mark_global_entry(ID key, struct global_entry *entry)
ID                432 variable.c     static ID
ID                435 variable.c         ID id;
ID                455 variable.c         ID id = global_id(name);
ID                580 variable.c         ID id;
ID                694 variable.c     gvar_i(ID key, struct global_entry *entry, VALUE ary)
ID                727 variable.c     rb_alias_variable(ID name1, ID name2)
ID                778 variable.c     generic_ivar_get(VALUE obj, ID id, int warn)
ID                797 variable.c     generic_ivar_set(VALUE obj, ID id, VALUE val)
ID                819 variable.c     generic_ivar_defined(VALUE obj, ID id)
ID                833 variable.c     generic_ivar_remove(VALUE obj, ID id, VALUE *valp)
ID                860 variable.c     givar_mark_i(ID key, VALUE value)
ID                915 variable.c     ivar_get(VALUE obj, ID id, int warn)
ID                938 variable.c     rb_ivar_get(VALUE obj, ID id)
ID                944 variable.c     rb_attr_get(VALUE obj, ID id)
ID                950 variable.c     rb_ivar_set(VALUE obj, ID id, VALUE val)
ID                970 variable.c     rb_ivar_defined(VALUE obj, ID id)
ID                988 variable.c     ivar_i(ID key, struct global_entry *entry, VALUE ary)
ID               1067 variable.c         ID id = rb_to_id(name);
ID               1096 variable.c     NORETURN(static void uninitialized_constant(VALUE, ID));
ID               1098 variable.c     uninitialized_constant(VALUE klass, ID id)
ID               1110 variable.c     const_missing(VALUE klass, ID id)
ID               1164 variable.c     rb_autoload(VALUE mod, ID id, const char *file)
ID               1196 variable.c     autoload_delete(VALUE mod, ID id)
ID               1221 variable.c     rb_autoload_load(VALUE klass, ID id)
ID               1233 variable.c     autoload_file(VALUE mod, ID id)
ID               1266 variable.c     rb_autoload_p(VALUE mod, ID id)
ID               1278 variable.c     rb_const_get_0(VALUE klass, ID id, int exclude, int recurse)
ID               1310 variable.c     rb_const_get_from(VALUE klass, ID id)
ID               1316 variable.c     rb_const_get(VALUE klass, ID id)
ID               1322 variable.c     rb_const_get_at(VALUE klass, ID id)
ID               1339 variable.c         ID id = rb_to_id(name);
ID               1366 variable.c     sv_i(ID key, VALUE value, st_table *tbl)
ID               1403 variable.c     list_i(ID key, ID value, VALUE ary)
ID               1439 variable.c     rb_const_defined_0(VALUE klass, ID id, int exclude, int recurse)
ID               1464 variable.c     rb_const_defined_from(VALUE klass, ID id)
ID               1470 variable.c     rb_const_defined(VALUE klass, ID id)
ID               1476 variable.c     rb_const_defined_at(VALUE klass, ID id)
ID               1482 variable.c     mod_av_set(VALUE klass, ID id, VALUE val, int isconst)
ID               1514 variable.c     rb_const_set(VALUE klass, ID id, VALUE val)
ID               1522 variable.c         ID id = rb_intern(name);
ID               1540 variable.c     rb_cvar_set(VALUE klass, ID id, VALUE val, int warn)
ID               1546 variable.c     rb_cvar_get(VALUE klass, ID id)
ID               1560 variable.c     rb_cvar_defined(VALUE klass, ID id)
ID               1571 variable.c         ID id = rb_intern(name);
ID               1581 variable.c         ID id = rb_intern(name);
ID               1591 variable.c         ID id = rb_intern(name);
ID               1600 variable.c     cv_i(ID key, VALUE value, VALUE ary)
ID               1661 variable.c         ID id = rb_to_id(name);
ID               1686 variable.c         ID id = rb_intern(name);
ID               1694 variable.c         ID id = rb_intern(name);


ID2SYM

ID2SYM            388 enumerator.c       sym_each		= ID2SYM(rb_intern("each"));
ID2SYM            389 enumerator.c       sym_each_with_index	= ID2SYM(rb_intern("each_with_index"));
ID2SYM            390 enumerator.c       sym_each_slice	= ID2SYM(rb_intern("each_slice"));
ID2SYM            391 enumerator.c       sym_each_cons	= ID2SYM(rb_intern("each_cons"));
ID2SYM            558 error.c            argv[1] = ID2SYM(id);
ID2SYM            407 eval.c         	    rb_funcall(rb_iv_get(klass, "__attached__"), singleton_added, 1, ID2SYM(mid));
ID2SYM            410 eval.c         	    rb_funcall(klass, added, 1, ID2SYM(mid));
ID2SYM            538 eval.c         	rb_funcall(rb_iv_get(klass, "__attached__"), singleton_removed, 1, ID2SYM(mid));
ID2SYM            541 eval.c         	rb_funcall(klass, removed, 1, ID2SYM(mid));
ID2SYM           1647 eval.c             rb_iv_set(exc, "@reason", ID2SYM(id));
ID2SYM           1948 eval.c         		   singleton_undefined, 1, ID2SYM(id));
ID2SYM           1951 eval.c         	rb_funcall(klass, undefined, 1, ID2SYM(id));
ID2SYM           2050 eval.c         	rb_funcall(singleton, singleton_added, 1, ID2SYM(name));
ID2SYM           2053 eval.c         	rb_funcall(klass, added, 1, ID2SYM(name));
ID2SYM           2554 eval.c         					    id?ID2SYM(id):Qnil,
ID2SYM           4022 eval.c         	args[n++] = ID2SYM(id);
ID2SYM           5413 eval.c             nargv[0] = ID2SYM(id);
ID2SYM           12428 eval.c             rb_ary_push(ary, ID2SYM(key));
ID2SYM           12939 eval.c             tag = ID2SYM(rb_to_id(tag));
ID2SYM           12963 eval.c             return rb_iterate((VALUE(*)(VALUE))catch_i, ID2SYM(rb_intern(tag)), func, data);
ID2SYM           12985 eval.c             tag = ID2SYM(rb_to_id(tag));
ID2SYM           13015 eval.c             argv[0] = ID2SYM(rb_intern(tag));
ID2SYM           13029 eval.c         	VALUE list = rb_hash_aref(hash, ID2SYM(ruby_frame->this_func));
ID2SYM           13042 eval.c             sym = ID2SYM(ruby_frame->this_func);
ID2SYM           13064 eval.c             sym = ID2SYM(ruby_frame->this_func);
ID2SYM            167 ext/dl/cfunc.c     return ID2SYM(cfunc->calltype);
ID2SYM            938 ext/iconv/iconv.c     rb_ary_push(ary, ID2SYM(rb_intern("trivial?")));
ID2SYM            941 ext/iconv/iconv.c     rb_ary_push(ary, ID2SYM(rb_intern("transliterate?")));
ID2SYM            944 ext/iconv/iconv.c     rb_ary_push(ary, ID2SYM(rb_intern("transliterate=")));
ID2SYM            947 ext/iconv/iconv.c     rb_ary_push(ary, ID2SYM(rb_intern("discard_ilseq?")));
ID2SYM            950 ext/iconv/iconv.c     rb_ary_push(ary, ID2SYM(rb_intern("discard_ilseq=")));
ID2SYM            645 ext/openssl/ossl_asn1.c 	return ID2SYM(sPRIVATE);
ID2SYM            647 ext/openssl/ossl_asn1.c 	return ID2SYM(sCONTEXT_SPECIFIC);
ID2SYM            649 ext/openssl/ossl_asn1.c 	return ID2SYM(sAPPLICATION);
ID2SYM            651 ext/openssl/ossl_asn1.c 	return ID2SYM(sUNIVERSAL);
ID2SYM            806 ext/openssl/ossl_asn1.c 				  value, INT2NUM(tag), ID2SYM(tag_class));
ID2SYM            876 ext/openssl/ossl_asn1.c 	    tagging = ID2SYM(sEXPLICIT);
ID2SYM            880 ext/openssl/ossl_asn1.c 	    tag_class = ID2SYM(sCONTEXT_SPECIFIC);
ID2SYM            889 ext/openssl/ossl_asn1.c 	tag_class = ID2SYM(sUNIVERSAL);
ID2SYM            386 ext/openssl/ossl_pkcs7.c 	return ID2SYM(rb_intern("signed"));
ID2SYM            388 ext/openssl/ossl_pkcs7.c 	return ID2SYM(rb_intern("encrypted"));
ID2SYM            390 ext/openssl/ossl_pkcs7.c 	return ID2SYM(rb_intern("enveloped"));
ID2SYM            392 ext/openssl/ossl_pkcs7.c 	return ID2SYM(rb_intern("signedAndEnveloped"));
ID2SYM            394 ext/openssl/ossl_pkcs7.c 	return ID2SYM(rb_intern("data"));
ID2SYM             63 ext/racc/cparse/cparse.c #ifdef ID2SYM
ID2SYM             64 ext/racc/cparse/cparse.c # define id_to_value(i) ID2SYM(i)
ID2SYM           2201 ext/syck/rubyext.c     sym_model = ID2SYM(rb_intern("Model"));
ID2SYM           2202 ext/syck/rubyext.c     sym_generic = ID2SYM(rb_intern("Generic"));
ID2SYM           2203 ext/syck/rubyext.c     sym_bytecode = ID2SYM(rb_intern("bytecode"));
ID2SYM           2204 ext/syck/rubyext.c     sym_map = ID2SYM(rb_intern("map"));
ID2SYM           2205 ext/syck/rubyext.c     sym_scalar = ID2SYM(rb_intern("scalar"));
ID2SYM           2206 ext/syck/rubyext.c     sym_seq = ID2SYM(rb_intern("seq"));
ID2SYM           2207 ext/syck/rubyext.c     sym_1quote = ID2SYM(rb_intern("quote1"));
ID2SYM           2208 ext/syck/rubyext.c     sym_2quote = ID2SYM(rb_intern("quote2"));
ID2SYM           2209 ext/syck/rubyext.c     sym_fold = ID2SYM(rb_intern("fold"));
ID2SYM           2210 ext/syck/rubyext.c     sym_literal = ID2SYM(rb_intern("literal"));
ID2SYM           2211 ext/syck/rubyext.c     sym_plain = ID2SYM(rb_intern("plain"));
ID2SYM           2212 ext/syck/rubyext.c     sym_inline = ID2SYM(rb_intern("inline"));
ID2SYM           1246 ext/tk/tkutil/tkutil.c             arg_sym = ID2SYM(rb_intern(str));
ID2SYM            147 intern.h       	    return rb_enumeratorize(obj, ID2SYM(rb_frame_this_func()),	\
ID2SYM           1147 marshal.c      		if (RARRAY(mem)->ptr[i] != ID2SYM(slot)) {
ID2SYM           1267 marshal.c      	v = ID2SYM(r_symreal(arg));
ID2SYM           1271 marshal.c      	return ID2SYM(r_symlink(arg));
ID2SYM           2634 numeric.c      	return ID2SYM(id);
ID2SYM           1572 parse.y        			$$ = NEW_LIT(ID2SYM($1));
ID2SYM           3546 parse.y        			$$ = NEW_LIT(ID2SYM($1));
ID2SYM           3879 parse.y        				    $$->nd_lit = ID2SYM(rb_intern(RSTRING($$->nd_lit)->ptr));
ID2SYM           4125 parse.y        			VALUE arg = ID2SYM($1);
ID2SYM           4134 parse.y        			VALUE arg = ID2SYM($3);
ID2SYM           4335 parse.y        			$$ = list_append(NEW_LIST(NEW_LIT(ID2SYM($1))), $2);
ID2SYM           7908 parse.y            VALUE sym = ID2SYM(vid);
ID2SYM           8527 parse.y            rb_ary_push(ary, ID2SYM(value));
ID2SYM           8996 parse.y        	return ID2SYM(rb_intern(buf));
ID2SYM           8999 parse.y        	return ID2SYM(rb_intern(name));
ID2SYM           9015 parse.y            return ID2SYM(rb_intern(name));
ID2SYM           9021 parse.y            return ID2SYM(rb_intern(s));
ID2SYM           3972 string.c           return ID2SYM(id);
ID2SYM             99 struct.c           slot = ID2SYM(id);
ID2SYM            190 struct.c       	    rb_mod_remove_const(klass, ID2SYM(id));
ID2SYM            231 struct.c       	rb_ary_push(ary, ID2SYM(slot));
ID2SYM            283 struct.c       	RARRAY(rest)->ptr[i] = ID2SYM(id);
ID2SYM            290 struct.c       	    rb_ary_unshift(rest, ID2SYM(id));
ID2SYM            264 variable.c         rb_iv_set(klass, "__classid__", ID2SYM(id));
ID2SYM           1112 variable.c         return rb_funcall(klass, rb_intern("const_missing"), 1, ID2SYM(id));


ID_ALLOCATOR

ID_ALLOCATOR      544 class.c            if (key == ID_ALLOCATOR) return ST_CONTINUE;
ID_ALLOCATOR      399 eval.c         	mid = ID_ALLOCATOR;
ID_ALLOCATOR      405 eval.c             if (node && mid != ID_ALLOCATOR && ruby_running) {
ID_ALLOCATOR      419 eval.c             rb_add_method(CLASS_OF(klass), ID_ALLOCATOR, NEW_CFUNC(func, 0), NOEX_PRIVATE);
ID_ALLOCATOR      426 eval.c             rb_add_method(CLASS_OF(klass), ID_ALLOCATOR, 0, NOEX_UNDEF);
ID_ALLOCATOR     2519 eval.c             if (id == ID_ALLOCATOR) return;
ID_ALLOCATOR     5408 eval.c             else if (id == ID_ALLOCATOR) {
ID_ALLOCATOR     5963 eval.c             if (frame->this_func == ID_ALLOCATOR) {
ID_ALLOCATOR     1422 object.c           obj = rb_funcall(klass, ID_ALLOCATOR, 0, 0);


ID_ATTRSET

ID_ATTRSET         52 parse.y        #define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET)
ID_ATTRSET       7309 parse.y            id |= ID_ATTRSET;
ID_ATTRSET       8460 parse.y        	    id = ID_ATTRSET;


ID_CLASS

ID_CLASS           54 parse.y        #define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS)
ID_CLASS           60 parse.y        	 ((id)&ID_SCOPE_MASK) == ID_CLASS))
ID_CLASS         8428 parse.y        	    id |= ID_CLASS;


ID_CONST

ID_CONST           53 parse.y        #define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST)
ID_CONST         8463 parse.y        	    id = ID_CONST;
ID_CONST         8517 parse.y        	    id2 = (id & ~ID_SCOPE_MASK) | ID_CONST;


ID_GLOBAL

ID_GLOBAL          50 parse.y        #define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL)
ID_GLOBAL          58 parse.y        	(((id)&ID_SCOPE_MASK) == ID_GLOBAL || \
ID_GLOBAL        8422 parse.y        	id |= ID_GLOBAL;


ID_INSTANCE

ID_INSTANCE        51 parse.y        #define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE)
ID_INSTANCE        59 parse.y        	 ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \
ID_INSTANCE      8431 parse.y        	    id |= ID_INSTANCE;


ID_JUNK

ID_JUNK            46 parse.y        #define ID_INTERNAL ID_JUNK
ID_JUNK            55 parse.y        #define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK)
ID_JUNK          8475 parse.y            if (*m) id = ID_JUNK;


ID_LOCAL

ID_LOCAL           49 parse.y        #define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL)
ID_LOCAL         8466 parse.y        	    id = ID_LOCAL;
ID_LOCAL         8504 parse.y        	ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL;


ID_SCOPE_MASK

ID_SCOPE_MASK      49 parse.y        #define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL)
ID_SCOPE_MASK      50 parse.y        #define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL)
ID_SCOPE_MASK      51 parse.y        #define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE)
ID_SCOPE_MASK      52 parse.y        #define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET)
ID_SCOPE_MASK      53 parse.y        #define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST)
ID_SCOPE_MASK      54 parse.y        #define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS)
ID_SCOPE_MASK      55 parse.y        #define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK)
ID_SCOPE_MASK      58 parse.y        	(((id)&ID_SCOPE_MASK) == ID_GLOBAL || \
ID_SCOPE_MASK      59 parse.y        	 ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \
ID_SCOPE_MASK      60 parse.y        	 ((id)&ID_SCOPE_MASK) == ID_CLASS))
ID_SCOPE_MASK    7308 parse.y            id &= ~ID_SCOPE_MASK;
ID_SCOPE_MASK    8504 parse.y        	ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL;
ID_SCOPE_MASK    8517 parse.y        	    id2 = (id & ~ID_SCOPE_MASK) | ID_CONST;


ID_SCOPE_SHIFT

ID_SCOPE_SHIFT   8310 parse.y            return ID_INTERNAL | (++global_symbols.last_id << ID_SCOPE_SHIFT);
ID_SCOPE_SHIFT   8477 parse.y            id |= ++global_symbols.last_id << ID_SCOPE_SHIFT;


IEVENTSINKOBJ

IEVENTSINKOBJ     189 ext/win32ole/win32ole.c     IEVENTSINKOBJ *pEvent;
IEVENTSINKOBJ    6398 ext/win32ole/win32ole.c     pEv = ALLOC_N(IEVENTSINKOBJ, 1);
IEVENTSINKOBJ    6687 ext/win32ole/win32ole.c     IEVENTSINKOBJ *pIEV;


IEventSinkVtbl

IEventSinkVtbl     90 ext/win32ole/win32ole.c     struct IEventSinkVtbl * lpVtbl;
IEventSinkVtbl    131 ext/win32ole/win32ole.c     IEventSinkVtbl *lpVtbl;
IEventSinkVtbl   6167 ext/win32ole/win32ole.c static IEventSinkVtbl vtEventSink;


II

II                215 ext/digest/rmd160/rmd160.c 	II(cc, dd, ee, aa, bb, block[ 1], 11);
II                216 ext/digest/rmd160/rmd160.c 	II(bb, cc, dd, ee, aa, block[ 9], 12);
II                217 ext/digest/rmd160/rmd160.c 	II(aa, bb, cc, dd, ee, block[11], 14);
II                218 ext/digest/rmd160/rmd160.c 	II(ee, aa, bb, cc, dd, block[10], 15);
II                219 ext/digest/rmd160/rmd160.c 	II(dd, ee, aa, bb, cc, block[ 0], 14);
II                220 ext/digest/rmd160/rmd160.c 	II(cc, dd, ee, aa, bb, block[ 8], 15);
II                221 ext/digest/rmd160/rmd160.c 	II(bb, cc, dd, ee, aa, block[12],  9);
II                222 ext/digest/rmd160/rmd160.c 	II(aa, bb, cc, dd, ee, block[ 4],  8);
II                223 ext/digest/rmd160/rmd160.c 	II(ee, aa, bb, cc, dd, block[13],  9);
II                224 ext/digest/rmd160/rmd160.c 	II(dd, ee, aa, bb, cc, block[ 3], 14);
II                225 ext/digest/rmd160/rmd160.c 	II(cc, dd, ee, aa, bb, block[ 7],  5);
II                226 ext/digest/rmd160/rmd160.c 	II(bb, cc, dd, ee, aa, block[15],  6);
II                227 ext/digest/rmd160/rmd160.c 	II(aa, bb, cc, dd, ee, block[14],  8);
II                228 ext/digest/rmd160/rmd160.c 	II(ee, aa, bb, cc, dd, block[ 5],  6);
II                229 ext/digest/rmd160/rmd160.c 	II(dd, ee, aa, bb, cc, block[ 6],  5);
II                230 ext/digest/rmd160/rmd160.c 	II(cc, dd, ee, aa, bb, block[ 2], 12);


III

III               269 ext/digest/rmd160/rmd160.c 	III(eee, aaa, bbb, ccc, ddd, block[ 6],  9);
III               270 ext/digest/rmd160/rmd160.c 	III(ddd, eee, aaa, bbb, ccc, block[11], 13);
III               271 ext/digest/rmd160/rmd160.c 	III(ccc, ddd, eee, aaa, bbb, block[ 3], 15);
III               272 ext/digest/rmd160/rmd160.c 	III(bbb, ccc, ddd, eee, aaa, block[ 7],  7);
III               273 ext/digest/rmd160/rmd160.c 	III(aaa, bbb, ccc, ddd, eee, block[ 0], 12);
III               274 ext/digest/rmd160/rmd160.c 	III(eee, aaa, bbb, ccc, ddd, block[13],  8);
III               275 ext/digest/rmd160/rmd160.c 	III(ddd, eee, aaa, bbb, ccc, block[ 5],  9);
III               276 ext/digest/rmd160/rmd160.c 	III(ccc, ddd, eee, aaa, bbb, block[10], 11);
III               277 ext/digest/rmd160/rmd160.c 	III(bbb, ccc, ddd, eee, aaa, block[14],  7);
III               278 ext/digest/rmd160/rmd160.c 	III(aaa, bbb, ccc, ddd, eee, block[15],  7);
III               279 ext/digest/rmd160/rmd160.c 	III(eee, aaa, bbb, ccc, ddd, block[ 8], 12);
III               280 ext/digest/rmd160/rmd160.c 	III(ddd, eee, aaa, bbb, ccc, block[12],  7);
III               281 ext/digest/rmd160/rmd160.c 	III(ccc, ddd, eee, aaa, bbb, block[ 4],  6);
III               282 ext/digest/rmd160/rmd160.c 	III(bbb, ccc, ddd, eee, aaa, block[ 9], 15);
III               283 ext/digest/rmd160/rmd160.c 	III(aaa, bbb, ccc, ddd, eee, block[ 1], 13);
III               284 ext/digest/rmd160/rmd160.c 	III(eee, aaa, bbb, ccc, ddd, block[ 2], 11);


IMMEDIATE_P

IMMEDIATE_P       467 ruby.h         #define SPECIAL_CONST_P(x) (IMMEDIATE_P(x) || !RTEST(x))
IMMEDIATE_P       671 ruby.h             if (IMMEDIATE_P(obj)) {
IMMEDIATE_P       686 ruby.h             if (IMMEDIATE_P(obj)) {


INCR

INCR              170 ext/nkf/nkf.c        INCR;
INCR              177 ext/nkf/nkf.c        INCR;
INCR              190 ext/nkf/nkf.c  	  INCR;
INCR              201 ext/nkf/nkf.c        INCR;
INCR              210 ext/nkf/nkf.c      INCR;


INET_SERVER

INET_SERVER      1163 ext/socket/socket.c 				    (type == INET_SERVER) ? AI_PASSIVE : 0);
INET_SERVER      1168 ext/socket/socket.c     if (type != INET_SERVER && (!NIL_P(arg->local.host) || !NIL_P(arg->local.serv))) {
INET_SERVER      1181 ext/socket/socket.c 	if (type == INET_SERVER) {
INET_SERVER      1216 ext/socket/socket.c     if (type == INET_SERVER)
INET_SERVER      1380 ext/socket/socket.c 	return init_inetsock(sock, arg1, arg2, Qnil, Qnil, INET_SERVER);
INET_SERVER      1382 ext/socket/socket.c 	return init_inetsock(sock, Qnil, arg1, Qnil, Qnil, INET_SERVER);


INET_SOCKS

INET_SOCKS       1198 ext/socket/socket.c 				      (type == INET_SOCKS));
INET_SOCKS       1270 ext/socket/socket.c     return init_inetsock(sock, host, serv, Qnil, Qnil, INET_SOCKS);


INPUT_CODE_FIX

INPUT_CODE_FIX   1402 ext/nkf/nkf-utf8/nkf.c #ifdef INPUT_CODE_FIX
INPUT_CODE_FIX   1410 ext/nkf/nkf-utf8/nkf.c #ifdef INPUT_CODE_FIX


INPUT_OPTION

INPUT_OPTION      420 ext/nkf/nkf-utf8/nkf.c #ifdef INPUT_OPTION
INPUT_OPTION      974 ext/nkf/nkf-utf8/nkf.c #ifdef INPUT_OPTION
INPUT_OPTION     1036 ext/nkf/nkf-utf8/nkf.c #ifdef INPUT_OPTION
INPUT_OPTION     1881 ext/nkf/nkf-utf8/nkf.c #ifdef INPUT_OPTION
INPUT_OPTION     3834 ext/nkf/nkf-utf8/nkf.c #ifdef INPUT_OPTION
INPUT_OPTION     4763 ext/nkf/nkf-utf8/nkf.c #ifdef INPUT_OPTION
INPUT_OPTION     4913 ext/nkf/nkf-utf8/nkf.c #ifdef INPUT_OPTION


INSPECT_LENGTH

INSPECT_LENGTH   1155 ext/strscan/strscan.c     if (p->curr > INSPECT_LENGTH) {
INSPECT_LENGTH   1157 ext/strscan/strscan.c         len = INSPECT_LENGTH;
INSPECT_LENGTH   1176 ext/strscan/strscan.c     if (len > INSPECT_LENGTH) {
INSPECT_LENGTH   1177 ext/strscan/strscan.c         len = INSPECT_LENGTH;


INT2FIX

INT2FIX          2471 array.c        	if (v != INT2FIX(0)) {
INT2FIX          2476 array.c            if (len == 0) return INT2FIX(0);
INT2FIX          2477 array.c            if (len > 0) return INT2FIX(1);
INT2FIX          2478 array.c            return INT2FIX(-1);
INT2FIX           315 bignum.c       	return INT2FIX(0);
INT2FIX           333 bignum.c       	return INT2FIX(0);
INT2FIX           897 bignum.c           if (RBIGNUM(x)->sign > RBIGNUM(y)->sign) return INT2FIX(1);
INT2FIX           898 bignum.c           if (RBIGNUM(x)->sign < RBIGNUM(y)->sign) return INT2FIX(-1);
INT2FIX           900 bignum.c       	return (RBIGNUM(x)->sign) ? INT2FIX(-1) : INT2FIX(1);
INT2FIX           902 bignum.c       	return (RBIGNUM(x)->sign) ? INT2FIX(1) : INT2FIX(-1);
INT2FIX           905 bignum.c           if (-1 == xlen) return INT2FIX(0);
INT2FIX           907 bignum.c       	(RBIGNUM(x)->sign ? INT2FIX(1) : INT2FIX(-1)) :
INT2FIX           908 bignum.c       	    (RBIGNUM(x)->sign ? INT2FIX(-1) : INT2FIX(1));
INT2FIX          1534 bignum.c           if (y == INT2FIX(0)) return INT2FIX(1);
INT2FIX          1762 bignum.c           if (shift < 0) return rb_big_rshift(x, INT2FIX(-shift));
INT2FIX          1798 bignum.c           if (shift < 0) return rb_big_lshift(x, INT2FIX(-shift));
INT2FIX          1802 bignum.c       	    return INT2FIX(0);
INT2FIX          1804 bignum.c       	    return INT2FIX(-1);
INT2FIX          1856 bignum.c       	    return INT2FIX(0);
INT2FIX          1857 bignum.c       	return INT2FIX(1);
INT2FIX          1860 bignum.c           if (shift < 0) return INT2FIX(0);
INT2FIX          1865 bignum.c       	if (s1 >= RBIGNUM(x)->len) return INT2FIX(1);
INT2FIX          1870 bignum.c       	if (s1 >= RBIGNUM(x)->len) return INT2FIX(0);
INT2FIX          1874 bignum.c       	return INT2FIX(1);
INT2FIX          1875 bignum.c           return INT2FIX(0);
INT2FIX            30 compar.c           if (RTEST(rb_funcall(val, '>', 1, INT2FIX(0)))) return 1;
INT2FIX            31 compar.c           if (RTEST(rb_funcall(val, '<', 1, INT2FIX(0)))) return -1;
INT2FIX           788 dir.c              return INT2FIX(0);
INT2FIX           847 dir.c              return INT2FIX(0);
INT2FIX           884 dir.c              return INT2FIX(0);
INT2FIX           903 dir.c              return INT2FIX(0);
INT2FIX          1837 dir.c              rb_file_const("FNM_NOESCAPE", INT2FIX(FNM_NOESCAPE));
INT2FIX          1838 dir.c              rb_file_const("FNM_PATHNAME", INT2FIX(FNM_PATHNAME));
INT2FIX          1839 dir.c              rb_file_const("FNM_DOTMATCH", INT2FIX(FNM_DOTMATCH));
INT2FIX          1840 dir.c              rb_file_const("FNM_CASEFOLD", INT2FIX(FNM_CASEFOLD));
INT2FIX          1841 dir.c              rb_file_const("FNM_SYSCASE", INT2FIX(FNM_SYSCASE));
INT2FIX           969 enum.c             rb_yield_values(2, val, INT2FIX(*memo));
INT2FIX           345 enumerator.c       val = rb_yield_values(2, val, INT2FIX(*memo));
INT2FIX           505 error.c            VALUE status = INT2FIX(EXIT_SUCCESS);
INT2FIX           542 error.c            if (status == INT2FIX(EXIT_SUCCESS)) return Qtrue;
INT2FIX           916 eval.c         #define PROT_FUNC   INT2FIX(0)	/* 1 */
INT2FIX           917 eval.c         #define PROT_LOOP   INT2FIX(1)	/* 3 */
INT2FIX           918 eval.c         #define PROT_LAMBDA INT2FIX(2)	/* 5 */
INT2FIX           919 eval.c         #define PROT_YIELD  INT2FIX(3)	/* 7 */
INT2FIX           920 eval.c         #define PROT_TOP    INT2FIX(4)	/* 9 */
INT2FIX          2553 eval.c         					    INT2FIX(ruby_sourceline),
INT2FIX          8386 eval.c             return INT2FIX(arity);
INT2FIX          8436 eval.c             return INT2FIX(hash);
INT2FIX          8748 eval.c             return INT2FIX(hash);
INT2FIX          9098 eval.c             return INT2FIX(n);
INT2FIX          9843 eval.c             arg[1] = rb_ary_new3(1, INT2FIX(sig));
INT2FIX          11294 eval.c             rb_thread_wait_for(rb_time_timeval(INT2FIX(sec)));
INT2FIX            80 ext/Win32API/Win32API.c 		rb_ary_push(a_import, INT2FIX(_T_NUMBER));
INT2FIX            83 ext/Win32API/Win32API.c 		rb_ary_push(a_import, INT2FIX(_T_POINTER));
INT2FIX            86 ext/Win32API/Win32API.c 		rb_ary_push(a_import, INT2FIX(_T_INTEGER));
INT2FIX            97 ext/Win32API/Win32API.c 		rb_ary_push(a_import, INT2FIX(_T_NUMBER));
INT2FIX           100 ext/Win32API/Win32API.c 		rb_ary_push(a_import, INT2FIX(_T_POINTER));
INT2FIX           103 ext/Win32API/Win32API.c 		rb_ary_push(a_import, INT2FIX(_T_INTEGER));
INT2FIX           135 ext/Win32API/Win32API.c     rb_iv_set(self, "__export__", INT2FIX(ex));
INT2FIX           138 ext/bigdecimal/bigdecimal.c     return INT2FIX(VpDblFig());
INT2FIX           171 ext/bigdecimal/bigdecimal.c     return INT2FIX(hash);
INT2FIX           231 ext/bigdecimal/bigdecimal.c         if(val==Qnil) return INT2FIX(fo);
INT2FIX           245 ext/bigdecimal/bigdecimal.c         return INT2FIX(fo);
INT2FIX           250 ext/bigdecimal/bigdecimal.c         if(val==Qnil) return INT2FIX(fo);
INT2FIX           257 ext/bigdecimal/bigdecimal.c         return INT2FIX(fo);
INT2FIX           325 ext/bigdecimal/bigdecimal.c     if(VpIsPosInf(p)) return INT2FIX(1);
INT2FIX           326 ext/bigdecimal/bigdecimal.c     if(VpIsNegInf(p)) return INT2FIX(-1);
INT2FIX           363 ext/bigdecimal/bigdecimal.c     if(e<=0) return INT2FIX(0);
INT2FIX           367 ext/bigdecimal/bigdecimal.c         return INT2FIX(e);
INT2FIX           514 ext/bigdecimal/bigdecimal.c     case '*': return   INT2FIX(e); /* any op */
INT2FIX          1121 ext/bigdecimal/bigdecimal.c     rb_ary_push(obj, INT2FIX(s));
INT2FIX          1123 ext/bigdecimal/bigdecimal.c     rb_ary_push(obj, INT2FIX(10));
INT2FIX          1242 ext/bigdecimal/bigdecimal.c     return INT2FIX(s);
INT2FIX          1267 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "BASE", INT2FIX((S_INT)VpBaseVal()));
INT2FIX          1270 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "EXCEPTION_ALL",INT2FIX(VP_EXCEPTION_ALL));
INT2FIX          1271 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "EXCEPTION_NaN",INT2FIX(VP_EXCEPTION_NaN));
INT2FIX          1272 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "EXCEPTION_INFINITY",INT2FIX(VP_EXCEPTION_INFINITY));
INT2FIX          1273 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "EXCEPTION_UNDERFLOW",INT2FIX(VP_EXCEPTION_UNDERFLOW));
INT2FIX          1274 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "EXCEPTION_OVERFLOW",INT2FIX(VP_EXCEPTION_OVERFLOW));
INT2FIX          1275 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "EXCEPTION_ZERODIVIDE",INT2FIX(VP_EXCEPTION_ZERODIVIDE));
INT2FIX          1278 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "ROUND_MODE",INT2FIX(VP_ROUND_MODE));
INT2FIX          1279 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "ROUND_UP",INT2FIX(VP_ROUND_UP));
INT2FIX          1280 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "ROUND_DOWN",INT2FIX(VP_ROUND_DOWN));
INT2FIX          1281 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "ROUND_HALF_UP",INT2FIX(VP_ROUND_HALF_UP));
INT2FIX          1282 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "ROUND_HALF_DOWN",INT2FIX(VP_ROUND_HALF_DOWN));
INT2FIX          1283 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "ROUND_CEILING",INT2FIX(VP_ROUND_CEIL));
INT2FIX          1284 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "ROUND_FLOOR",INT2FIX(VP_ROUND_FLOOR));
INT2FIX          1285 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "ROUND_HALF_EVEN",INT2FIX(VP_ROUND_HALF_EVEN));
INT2FIX          1288 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "SIGN_NaN",INT2FIX(VP_SIGN_NaN));
INT2FIX          1289 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_ZERO",INT2FIX(VP_SIGN_POSITIVE_ZERO));
INT2FIX          1290 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_ZERO",INT2FIX(VP_SIGN_NEGATIVE_ZERO));
INT2FIX          1291 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_FINITE",INT2FIX(VP_SIGN_POSITIVE_FINITE));
INT2FIX          1292 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_FINITE",INT2FIX(VP_SIGN_NEGATIVE_FINITE));
INT2FIX          1293 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_INFINITE",INT2FIX(VP_SIGN_POSITIVE_INFINITE));
INT2FIX          1294 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_INFINITE",INT2FIX(VP_SIGN_NEGATIVE_INFINITE));
INT2FIX           495 ext/curses/curses.c     return INT2FIX(LINES);
INT2FIX           501 ext/curses/curses.c     return INT2FIX(COLS);
INT2FIX           509 ext/curses/curses.c   return (n = curs_set(NUM2INT(visibility)) != ERR) ? INT2FIX(n) : Qnil;
INT2FIX           628 ext/curses/curses.c   return rb_ary_new3(3,INT2FIX(r),INT2FIX(g),INT2FIX(b));
INT2FIX           637 ext/curses/curses.c   return rb_ary_new3(2,INT2FIX(f),INT2FIX(b));
INT2FIX           643 ext/curses/curses.c   return INT2FIX(COLOR_PAIR(NUM2INT(attrs)));
INT2FIX           649 ext/curses/curses.c   return INT2FIX(PAIR_NUMBER(NUM2INT(attrs)));
INT2FIX           926 ext/curses/curses.c     return INT2FIX(y);
INT2FIX           939 ext/curses/curses.c     return INT2FIX(x);
INT2FIX           951 ext/curses/curses.c     return INT2FIX(getmaxy(winp->window));
INT2FIX           956 ext/curses/curses.c 	return INT2FIX(y);
INT2FIX           959 ext/curses/curses.c     return INT2FIX(winp->window->_maxy+1);
INT2FIX           972 ext/curses/curses.c     return INT2FIX(getmaxx(winp->window));
INT2FIX           977 ext/curses/curses.c 	return INT2FIX(x);
INT2FIX           980 ext/curses/curses.c     return INT2FIX(winp->window->_maxx+1);
INT2FIX           995 ext/curses/curses.c     return INT2FIX(y);
INT2FIX           997 ext/curses/curses.c     return INT2FIX(winp->window->_begy);
INT2FIX          1012 ext/curses/curses.c     return INT2FIX(x);
INT2FIX          1014 ext/curses/curses.c     return INT2FIX(winp->window->_begx);
INT2FIX          1293 ext/curses/curses.c   return INT2FIX(wattroff(winp->window,NUM2INT(attrs)));
INT2FIX          1307 ext/curses/curses.c   val = INT2FIX(wattron(winp->window,NUM2INT(attrs)));
INT2FIX          1328 ext/curses/curses.c   return INT2FIX(wattrset(winp->window,NUM2INT(attrs)));
INT2FIX          2096 ext/curses/curses.c 	rb_define_const(mCurses, name, INT2FIX(c - 'A' + 1));
INT2FIX           510 ext/dbm/dbm.c      if (dbmp->di_size > 0) return INT2FIX(dbmp->di_size);
INT2FIX           517 ext/dbm/dbm.c      return INT2FIX(i);
INT2FIX           774 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "READER",  INT2FIX(O_RDONLY|RUBY_DBM_RW_BIT));
INT2FIX           775 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "WRITER",  INT2FIX(O_RDWR|RUBY_DBM_RW_BIT));
INT2FIX           776 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "WRCREAT", INT2FIX(O_RDWR|O_CREAT|RUBY_DBM_RW_BIT));
INT2FIX           777 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "NEWDB",   INT2FIX(O_RDWR|O_CREAT|O_TRUNC|RUBY_DBM_RW_BIT));
INT2FIX            82 ext/etc/etc.c  			 INT2FIX(pwd->pw_uid),
INT2FIX            83 ext/etc/etc.c  			 INT2FIX(pwd->pw_gid),
INT2FIX            90 ext/etc/etc.c  			 INT2FIX(pwd->pw_change),
INT2FIX            93 ext/etc/etc.c  			 INT2FIX(pwd->pw_quota),
INT2FIX           105 ext/etc/etc.c  			 INT2FIX(pwd->pw_expire),
INT2FIX           316 ext/etc/etc.c  			 INT2FIX(grp->gr_gid),
INT2FIX           183 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_ACCMODE", INT2FIX(O_ACCMODE));
INT2FIX           185 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_ACCMODE", INT2FIX(O_RDONLY | O_WRONLY | O_RDWR));
INT2FIX           609 ext/gdbm/gdbm.c     if (dbmp->di_size > 0) return INT2FIX(dbmp->di_size);
INT2FIX           618 ext/gdbm/gdbm.c     return INT2FIX(i);
INT2FIX           970 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "READER",  INT2FIX(GDBM_READER|RUBY_GDBM_RW_BIT));
INT2FIX           971 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "WRITER",  INT2FIX(GDBM_WRITER|RUBY_GDBM_RW_BIT));
INT2FIX           972 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "WRCREAT", INT2FIX(GDBM_WRCREAT|RUBY_GDBM_RW_BIT));
INT2FIX           973 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "NEWDB",   INT2FIX(GDBM_NEWDB|RUBY_GDBM_RW_BIT));
INT2FIX           975 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "FAST", INT2FIX(GDBM_FAST));
INT2FIX           981 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "SYNC",    INT2FIX(GDBM_SYNC));
INT2FIX           984 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "NOLOCK",  INT2FIX(GDBM_NOLOCK));
INT2FIX           139 ext/nkf/nkf.c    if (p == pend) return INT2FIX(_UNKNOWN);
INT2FIX           143 ext/nkf/nkf.c        if (p==pend) return INT2FIX(_UNKNOWN);\
INT2FIX           149 ext/nkf/nkf.c  	  return INT2FIX(_EUC);\
INT2FIX           158 ext/nkf/nkf.c        return INT2FIX(_JIS);
INT2FIX           161 ext/nkf/nkf.c        return INT2FIX(_BINARY);
INT2FIX           164 ext/nkf/nkf.c        return INT2FIX(_SJIS);
INT2FIX           167 ext/nkf/nkf.c        return INT2FIX(_SJIS);
INT2FIX           174 ext/nkf/nkf.c  	return INT2FIX(_SJIS);
INT2FIX           179 ext/nkf/nkf.c  	return INT2FIX(_EUC);
INT2FIX           184 ext/nkf/nkf.c  	      return INT2FIX(_SJIS);
INT2FIX           187 ext/nkf/nkf.c  	      return INT2FIX(_EUC);
INT2FIX           194 ext/nkf/nkf.c  	return INT2FIX(_SJIS);
INT2FIX           198 ext/nkf/nkf.c        return INT2FIX(_EUC);
INT2FIX           204 ext/nkf/nkf.c  	return INT2FIX(_SJIS);
INT2FIX           207 ext/nkf/nkf.c  	return INT2FIX(_EUC);
INT2FIX           212 ext/nkf/nkf.c    return INT2FIX(_UNKNOWN);
INT2FIX           260 ext/nkf/nkf.c    return INT2FIX( code );
INT2FIX           276 ext/nkf/nkf.c    rb_define_const(mKconv, "AUTO", INT2FIX(_AUTO));
INT2FIX           277 ext/nkf/nkf.c    rb_define_const(mKconv, "JIS", INT2FIX(_JIS));
INT2FIX           278 ext/nkf/nkf.c    rb_define_const(mKconv, "EUC", INT2FIX(_EUC));
INT2FIX           279 ext/nkf/nkf.c    rb_define_const(mKconv, "SJIS", INT2FIX(_SJIS));
INT2FIX           280 ext/nkf/nkf.c    rb_define_const(mKconv, "BINARY", INT2FIX(_BINARY));
INT2FIX           281 ext/nkf/nkf.c    rb_define_const(mKconv, "NOCONV", INT2FIX(_NOCONV));
INT2FIX           282 ext/nkf/nkf.c    rb_define_const(mKconv, "ASCII", INT2FIX(_ASCII));
INT2FIX           283 ext/nkf/nkf.c    rb_define_const(mKconv, "UTF8", INT2FIX(_UTF8));
INT2FIX           284 ext/nkf/nkf.c    rb_define_const(mKconv, "UTF16", INT2FIX(_UTF16));
INT2FIX           285 ext/nkf/nkf.c    rb_define_const(mKconv, "UTF32", INT2FIX(_UTF32));
INT2FIX           286 ext/nkf/nkf.c    rb_define_const(mKconv, "UNKNOWN", INT2FIX(_UNKNOWN));
INT2FIX           501 ext/openssl/ossl_bn.c 	return INT2FIX(BN_##func(bn));		\
INT2FIX           530 ext/openssl/ossl_bn.c 	return INT2FIX(BN_##func(bn1, bn2));		\
INT2FIX           538 ext/openssl/ossl_bn.c     if (ossl_bn_cmp(self, other) == INT2FIX(0)) {
INT2FIX           457 ext/openssl/ossl_pkey_rsa.c #define DefRSAConst(x) rb_define_const(cRSA, #x,INT2FIX(RSA_##x))
INT2FIX           239 ext/openssl/ossl_ssl.c     args[1] = INT2FIX(is_export);
INT2FIX           240 ext/openssl/ossl_ssl.c     args[2] = INT2FIX(keylength);
INT2FIX           416 ext/openssl/ossl_ssl.c     rb_ary_push(ary, INT2FIX(bits));
INT2FIX           417 ext/openssl/ossl_ssl.c     rb_ary_push(ary, INT2FIX(alg_bits));
INT2FIX           895 ext/openssl/ossl_ssl.c #define ossl_ssl_def_const(x) rb_define_const(mSSL, #x, INT2FIX(SSL_##x))
INT2FIX            15 ext/openssl/ossl_x509.c #define DefX509Const(x) rb_define_const(mX509, #x,INT2FIX(X509_##x))
INT2FIX           229 ext/openssl/ossl_x509name.c         		  INT2FIX(entry->value->type));
INT2FIX           252 ext/openssl/ossl_x509name.c     if (result < 0) return INT2FIX(-1);
INT2FIX           253 ext/openssl/ossl_x509name.c     if (result > 1) return INT2FIX(1);
INT2FIX           255 ext/openssl/ossl_x509name.c     return INT2FIX(0);
INT2FIX           445 ext/openssl/ossl_x509store.c     return INT2FIX(X509_STORE_CTX_get_error(ctx));
INT2FIX           478 ext/openssl/ossl_x509store.c     return INT2FIX(X509_STORE_CTX_get_error_depth(ctx));
INT2FIX           438 ext/pty/pty.c      rb_ary_store(res,2,INT2FIX(info.child_pid));
INT2FIX            28 ext/racc/cparse/cparse.c #define vDEFAULT_TOKEN  INT2FIX(DEFAULT_TOKEN)
INT2FIX            29 ext/racc/cparse/cparse.c #define vERROR_TOKEN    INT2FIX(ERROR_TOKEN)
INT2FIX            30 ext/racc/cparse/cparse.c #define vFINAL_TOKEN    INT2FIX(FINAL_TOKEN)
INT2FIX           370 ext/racc/cparse/cparse.c     PUSH(v->state, INT2FIX(0));
INT2FIX           371 ext/racc/cparse/cparse.c     v->t = INT2FIX(FINAL_TOKEN + 1);   /* must not init to FINAL_TOKEN */
INT2FIX           771 ext/racc/cparse/cparse.c     return INT2FIX(0);
INT2FIX           493 ext/sdbm/init.c     if (dbmp->di_size > 0) return INT2FIX(dbmp->di_size);
INT2FIX           500 ext/sdbm/init.c     return INT2FIX(i);
INT2FIX           257 ext/socket/socket.c     return INT2FIX(0);
INT2FIX           380 ext/socket/socket.c     return INT2FIX(0);
INT2FIX           513 ext/socket/socket.c     return INT2FIX(n);
INT2FIX           896 ext/socket/socket.c     port = INT2FIX(atoi(pbuf));
INT2FIX          1628 ext/socket/socket.c     return INT2FIX(0);
INT2FIX          1646 ext/socket/socket.c 	return INT2FIX(0);
INT2FIX          1650 ext/socket/socket.c     return INT2FIX(0);
INT2FIX          1679 ext/socket/socket.c 	    return INT2FIX(n);
INT2FIX          1687 ext/socket/socket.c     return INT2FIX(n);
INT2FIX          1898 ext/socket/socket.c 	return INT2FIX(fd);
INT2FIX          1906 ext/socket/socket.c 	ff_argv[0] = INT2FIX(fd);
INT2FIX          2127 ext/socket/socket.c     domain = INT2FIX(PF_UNIX);
INT2FIX          2131 ext/socket/socket.c 	type = INT2FIX(SOCK_STREAM);
INT2FIX          2133 ext/socket/socket.c 	protocol = INT2FIX(0);
INT2FIX          2267 ext/socket/socket.c     return INT2FIX(n);
INT2FIX          2360 ext/socket/socket.c     return INT2FIX(0);
INT2FIX          2446 ext/socket/socket.c     return INT2FIX(0);
INT2FIX          2686 ext/socket/socket.c 	rb_ary_push(ary, INT2FIX(res->ai_family));
INT2FIX          2687 ext/socket/socket.c 	rb_ary_push(ary, INT2FIX(res->ai_socktype));
INT2FIX          2688 ext/socket/socket.c 	rb_ary_push(ary, INT2FIX(res->ai_protocol));
INT2FIX          2806 ext/socket/socket.c     return INT2FIX(port);
INT2FIX          3113 ext/socket/socket.c     rb_define_const(rb_cSocket, name, INT2FIX(value));
INT2FIX          3114 ext/socket/socket.c     rb_define_const(mConst, name, INT2FIX(value));
INT2FIX           310 ext/stringio/stringio.c     return INT2FIX(0);
INT2FIX           622 ext/stringio/stringio.c     return INT2FIX(0);
INT2FIX           660 ext/stringio/stringio.c     return INT2FIX(0);
INT2FIX           996 ext/stringio/stringio.c     if (!len) return INT2FIX(0);
INT2FIX           389 ext/strscan/strscan.c     return INT2FIX(p->curr);
INT2FIX           463 ext/strscan/strscan.c         return INT2FIX(p->regs.end[0]);
INT2FIX          1076 ext/strscan/strscan.c         return INT2FIX(0);
INT2FIX          1079 ext/strscan/strscan.c     return INT2FIX(i);
INT2FIX           217 ext/syck/rubyext.c     VALUE year = INT2FIX(0);
INT2FIX           218 ext/syck/rubyext.c     VALUE mon = INT2FIX(0);
INT2FIX           219 ext/syck/rubyext.c     VALUE day = INT2FIX(0);
INT2FIX           220 ext/syck/rubyext.c     VALUE hour = INT2FIX(0);
INT2FIX           221 ext/syck/rubyext.c     VALUE min = INT2FIX(0);
INT2FIX           222 ext/syck/rubyext.c     VALUE sec = INT2FIX(0);
INT2FIX           227 ext/syck/rubyext.c         year = INT2FIX(strtol(ptr, NULL, 10));
INT2FIX           234 ext/syck/rubyext.c         mon = INT2FIX(strtol(ptr, NULL, 10));
INT2FIX           241 ext/syck/rubyext.c         day = INT2FIX(strtol(ptr, NULL, 10));
INT2FIX           248 ext/syck/rubyext.c         hour = INT2FIX(strtol(ptr, NULL, 10));
INT2FIX           255 ext/syck/rubyext.c         min = INT2FIX(strtol(ptr, NULL, 10));
INT2FIX           262 ext/syck/rubyext.c         sec = INT2FIX(strtol(ptr, NULL, 10));
INT2FIX           409 ext/syck/rubyext.c                 obj = INT2FIX(total);
INT2FIX           475 ext/syck/rubyext.c                 year = INT2FIX(strtol(ptr, NULL, 10));
INT2FIX           480 ext/syck/rubyext.c                 mon = INT2FIX(strtol(ptr, NULL, 10));
INT2FIX           485 ext/syck/rubyext.c                 day = INT2FIX(strtol(ptr, NULL, 10));
INT2FIX           635 ext/syck/rubyext.c     rb_hash_aset(bonus->data, INT2FIX(RHASH(bonus->data)->tbl->num_entries), obj);
INT2FIX           821 ext/syck/rubyext.c     return INT2FIX( parser->bufsize );
INT2FIX          2000 ext/syck/rubyext.c     rb_ivar_set(self, s_level, INT2FIX(0));
INT2FIX          2020 ext/syck/rubyext.c     rb_ivar_set(self, s_level, INT2FIX(level));
INT2FIX          2037 ext/syck/rubyext.c     rb_ivar_set(self, s_level, INT2FIX(level));
INT2FIX           224 ext/syslog/syslog.c     return INT2FIX(LOG_MASK(FIX2INT(pri)));
INT2FIX           229 ext/syslog/syslog.c     return INT2FIX(LOG_UPTO(FIX2INT(pri)));
INT2FIX          1138 ext/tk/tcltklib.c         divmod = rb_funcall(time, rb_intern("divmod"), 1, INT2FIX(1));
INT2FIX          1225 ext/tk/tcltklib.c         return INT2FIX(Tk_GetNumMainWindows());
INT2FIX          1227 ext/tk/tcltklib.c         return INT2FIX(0);
INT2FIX          1337 ext/tk/tcltklib.c                                            INT2FIX(event_flag), &status));
INT2FIX          1457 ext/tk/tcltklib.c                                           INT2FIX(event_flag), &status));
INT2FIX          2707 ext/tk/tcltklib.c         rb_iv_set(rbtk_pending_exception, "status", INT2FIX(0));
INT2FIX          2735 ext/tk/tcltklib.c         rb_iv_set(rbtk_pending_exception, "status", INT2FIX(state));
INT2FIX          6967 ext/tk/tcltklib.c     return (INT2FIX(ptr->return_value));
INT2FIX          7334 ext/tk/tcltklib.c                            INT2FIX(TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG));
INT2FIX          7344 ext/tk/tcltklib.c                             INT2FIX(TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG));
INT2FIX          7354 ext/tk/tcltklib.c                            INT2FIX(TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG));
INT2FIX          7365 ext/tk/tcltklib.c                             INT2FIX(TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG));
INT2FIX          7374 ext/tk/tcltklib.c                              INT2FIX(TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG));
INT2FIX          7384 ext/tk/tcltklib.c                               INT2FIX(TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG));
INT2FIX          7732 ext/tk/tcltklib.c     rb_define_const(ev_flag, "NONE",      INT2FIX(0));
INT2FIX          7733 ext/tk/tcltklib.c     rb_define_const(ev_flag, "WINDOW",    INT2FIX(TCL_WINDOW_EVENTS));
INT2FIX          7734 ext/tk/tcltklib.c     rb_define_const(ev_flag, "FILE",      INT2FIX(TCL_FILE_EVENTS));
INT2FIX          7735 ext/tk/tcltklib.c     rb_define_const(ev_flag, "TIMER",     INT2FIX(TCL_TIMER_EVENTS));
INT2FIX          7736 ext/tk/tcltklib.c     rb_define_const(ev_flag, "IDLE",      INT2FIX(TCL_IDLE_EVENTS));
INT2FIX          7737 ext/tk/tcltklib.c     rb_define_const(ev_flag, "ALL",       INT2FIX(TCL_ALL_EVENTS));
INT2FIX          7738 ext/tk/tcltklib.c     rb_define_const(ev_flag, "DONT_WAIT", INT2FIX(TCL_DONT_WAIT));
INT2FIX          7742 ext/tk/tcltklib.c     rb_define_const(var_flag, "NONE",           INT2FIX(0));
INT2FIX          7743 ext/tk/tcltklib.c     rb_define_const(var_flag, "GLOBAL_ONLY",    INT2FIX(TCL_GLOBAL_ONLY));
INT2FIX          7745 ext/tk/tcltklib.c     rb_define_const(var_flag, "NAMESPACE_ONLY", INT2FIX(TCL_NAMESPACE_ONLY));
INT2FIX          7747 ext/tk/tcltklib.c     rb_define_const(var_flag, "NAMESPACE_ONLY", INT2FIX(0));
INT2FIX          7749 ext/tk/tcltklib.c     rb_define_const(var_flag, "LEAVE_ERR_MSG",  INT2FIX(TCL_LEAVE_ERR_MSG));
INT2FIX          7750 ext/tk/tcltklib.c     rb_define_const(var_flag, "APPEND_VALUE",   INT2FIX(TCL_APPEND_VALUE));
INT2FIX          7751 ext/tk/tcltklib.c     rb_define_const(var_flag, "LIST_ELEMENT",   INT2FIX(TCL_LIST_ELEMENT));
INT2FIX          7753 ext/tk/tcltklib.c     rb_define_const(var_flag, "PARSE_VARNAME",  INT2FIX(TCL_PARSE_PART1));
INT2FIX          7755 ext/tk/tcltklib.c     rb_define_const(var_flag, "PARSE_VARNAME",  INT2FIX(0));
INT2FIX          1020 ext/tk/tkutil/tkutil.c     if (RSTRING(value)->ptr == (char*)NULL) return INT2FIX(0);
INT2FIX          1458 ext/tk/tkutil/tkutil.c             proc = rb_hash_aref(inf->proc, INT2FIX(c));
INT2FIX          1988 ext/win32ole/win32ole.c     return INT2FIX(cWIN32OLE_cp);
INT2FIX          3516 ext/win32ole/win32ole.c         rb_str_concat(str, rb_fix2str(INT2FIX(pTypeDesc->vt), 10));
INT2FIX          4431 ext/win32ole/win32ole.c     ver = INT2FIX(pTypeAttr->wMajorVerNum);
INT2FIX          4463 ext/win32ole/win32ole.c     ver = INT2FIX(pTypeAttr->wMinorVerNum);
INT2FIX          4495 ext/win32ole/win32ole.c     typekind = INT2FIX(pTypeAttr->typekind);
INT2FIX          4626 ext/win32ole/win32ole.c     return INT2FIX(helpcontext);
INT2FIX          5100 ext/win32ole/win32ole.c     kind = INT2FIX(pVarDesc->varkind);
INT2FIX          5275 ext/win32ole/win32ole.c     vt = INT2FIX(pFuncDesc->elemdescFunc.tdesc.vt);
INT2FIX          5347 ext/win32ole/win32ole.c     invkind = INT2FIX(pFuncDesc->invkind);
INT2FIX          5669 ext/win32ole/win32ole.c     return INT2FIX(helpcontext);
INT2FIX          5735 ext/win32ole/win32ole.c     offset_vtbl = INT2FIX(pFuncDesc->oVft);
INT2FIX          5769 ext/win32ole/win32ole.c     size_params = INT2FIX(pFuncDesc->cParams);
INT2FIX          5804 ext/win32ole/win32ole.c     size_opt_params = INT2FIX(pFuncDesc->cParamsOpt);
INT2FIX          6966 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_ACP"       ,INT2FIX(CP_ACP));
INT2FIX          6967 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_OEMCP"     ,INT2FIX(CP_OEMCP));
INT2FIX          6968 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_MACCP"     ,INT2FIX(CP_MACCP));
INT2FIX          6969 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_THREAD_ACP",INT2FIX(CP_THREAD_ACP));
INT2FIX          6970 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_SYMBOL"    ,INT2FIX(CP_SYMBOL));
INT2FIX          6971 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_UTF7"      ,INT2FIX(CP_UTF7));
INT2FIX          6972 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_UTF8"      ,INT2FIX(CP_UTF8));
INT2FIX          6975 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_I2", INT2FIX(VT_I2));
INT2FIX          6976 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_I4", INT2FIX(VT_I4));
INT2FIX          6977 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_R4", INT2FIX(VT_R4));
INT2FIX          6978 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_R8", INT2FIX(VT_R8));
INT2FIX          6979 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_CY", INT2FIX(VT_CY));
INT2FIX          6980 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_DATE", INT2FIX(VT_DATE));
INT2FIX          6981 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_BSTR", INT2FIX(VT_BSTR));
INT2FIX          6982 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_USERDEFINED", INT2FIX(VT_USERDEFINED));
INT2FIX          6983 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_PTR", INT2FIX(VT_PTR));
INT2FIX          6984 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_DISPATCH", INT2FIX(VT_DISPATCH));
INT2FIX          6985 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_ERROR", INT2FIX(VT_ERROR));
INT2FIX          6986 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_BOOL", INT2FIX(VT_BOOL));
INT2FIX          6987 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_VARIANT", INT2FIX(VT_VARIANT));
INT2FIX          6988 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_UNKNOWN", INT2FIX(VT_UNKNOWN));
INT2FIX          6989 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_I1", INT2FIX(VT_I1));
INT2FIX          6990 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_UI1", INT2FIX(VT_UI1));
INT2FIX          6991 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_UI2", INT2FIX(VT_UI2));
INT2FIX          6992 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_UI4", INT2FIX(VT_UI4));
INT2FIX          6993 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_INT", INT2FIX(VT_INT));
INT2FIX          6994 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_UINT", INT2FIX(VT_UINT));
INT2FIX          6995 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_ARRAY", INT2FIX(VT_ARRAY));
INT2FIX          6996 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_BYREF", INT2FIX(VT_BYREF));
INT2FIX          1035 ext/zlib/zlib.c     return INT2FIX(NIL_P(z->input) ? 0 : (int)(RSTRING(z->input)->len));
INT2FIX          1067 ext/zlib/zlib.c     return INT2FIX(get_zstream(obj)->stream.data_type);
INT2FIX          1837 ext/zlib/zlib.c     str = rb_funcall(gz->io, id_readpartial, 1, INT2FIX(GZFILE_READ_SIZE));
INT2FIX          1849 ext/zlib/zlib.c         str = rb_funcall(gz->io, id_read, 1, INT2FIX(GZFILE_READ_SIZE));
INT2FIX          2330 ext/zlib/zlib.c     rb_funcall(gz->io, id_seek, 2, rb_int2inum(-n), INT2FIX(1));
INT2FIX          2471 ext/zlib/zlib.c     return INT2FIX(get_gzfile(obj)->level);
INT2FIX          2481 ext/zlib/zlib.c     return INT2FIX(get_gzfile(obj)->os_code);
INT2FIX          2848 ext/zlib/zlib.c     return INT2FIX(RSTRING(str)->len);
INT2FIX          3010 ext/zlib/zlib.c     return INT2FIX(0);
INT2FIX          3094 ext/zlib/zlib.c 	dst = INT2FIX((unsigned int)(RSTRING(dst)->ptr[0]) & 0xff);
INT2FIX          3458 ext/zlib/zlib.c     rb_define_const(mZlib, "BINARY", INT2FIX(Z_BINARY));
INT2FIX          3459 ext/zlib/zlib.c     rb_define_const(mZlib, "ASCII", INT2FIX(Z_ASCII));
INT2FIX          3460 ext/zlib/zlib.c     rb_define_const(mZlib, "UNKNOWN", INT2FIX(Z_UNKNOWN));
INT2FIX          3483 ext/zlib/zlib.c     rb_define_const(mZlib, "NO_COMPRESSION", INT2FIX(Z_NO_COMPRESSION));
INT2FIX          3484 ext/zlib/zlib.c     rb_define_const(mZlib, "BEST_SPEED", INT2FIX(Z_BEST_SPEED));
INT2FIX          3485 ext/zlib/zlib.c     rb_define_const(mZlib, "BEST_COMPRESSION", INT2FIX(Z_BEST_COMPRESSION));
INT2FIX          3487 ext/zlib/zlib.c 		    INT2FIX(Z_DEFAULT_COMPRESSION));
INT2FIX          3489 ext/zlib/zlib.c     rb_define_const(mZlib, "FILTERED", INT2FIX(Z_FILTERED));
INT2FIX          3490 ext/zlib/zlib.c     rb_define_const(mZlib, "HUFFMAN_ONLY", INT2FIX(Z_HUFFMAN_ONLY));
INT2FIX          3491 ext/zlib/zlib.c     rb_define_const(mZlib, "DEFAULT_STRATEGY", INT2FIX(Z_DEFAULT_STRATEGY));
INT2FIX          3493 ext/zlib/zlib.c     rb_define_const(mZlib, "MAX_WBITS", INT2FIX(MAX_WBITS));
INT2FIX          3494 ext/zlib/zlib.c     rb_define_const(mZlib, "DEF_MEM_LEVEL", INT2FIX(DEF_MEM_LEVEL));
INT2FIX          3495 ext/zlib/zlib.c     rb_define_const(mZlib, "MAX_MEM_LEVEL", INT2FIX(MAX_MEM_LEVEL));
INT2FIX          3497 ext/zlib/zlib.c     rb_define_const(mZlib, "NO_FLUSH", INT2FIX(Z_NO_FLUSH));
INT2FIX          3498 ext/zlib/zlib.c     rb_define_const(mZlib, "SYNC_FLUSH", INT2FIX(Z_SYNC_FLUSH));
INT2FIX          3499 ext/zlib/zlib.c     rb_define_const(mZlib, "FULL_FLUSH", INT2FIX(Z_FULL_FLUSH));
INT2FIX          3500 ext/zlib/zlib.c     rb_define_const(mZlib, "FINISH", INT2FIX(Z_FINISH));
INT2FIX          3575 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_CODE", INT2FIX(OS_CODE));
INT2FIX          3576 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_MSDOS", INT2FIX(OS_MSDOS));
INT2FIX          3577 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_AMIGA", INT2FIX(OS_AMIGA));
INT2FIX          3578 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_VMS", INT2FIX(OS_VMS));
INT2FIX          3579 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_UNIX", INT2FIX(OS_UNIX));
INT2FIX          3580 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_ATARI", INT2FIX(OS_ATARI));
INT2FIX          3581 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_OS2", INT2FIX(OS_OS2));
INT2FIX          3582 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_MACOS", INT2FIX(OS_MACOS));
INT2FIX          3583 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_TOPS20", INT2FIX(OS_TOPS20));
INT2FIX          3584 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_WIN32", INT2FIX(OS_WIN32));
INT2FIX          3586 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_VMCMS", INT2FIX(OS_VMCMS));
INT2FIX          3587 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_ZSYSTEM", INT2FIX(OS_ZSYSTEM));
INT2FIX          3588 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_CPM", INT2FIX(OS_CPM));
INT2FIX          3589 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_QDOS", INT2FIX(OS_QDOS));
INT2FIX          3590 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_RISCOS", INT2FIX(OS_RISCOS));
INT2FIX          3591 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_UNKNOWN", INT2FIX(OS_UNKNOWN));
INT2FIX           209 file.c         	    return INT2FIX(0);
INT2FIX           211 file.c         	    return INT2FIX(-1);
INT2FIX           213 file.c         	    return INT2FIX(1);
INT2FIX          1749 file.c             return INT2FIX(0);
INT2FIX          1880 file.c             return INT2FIX(0);
INT2FIX          2048 file.c             return INT2FIX(0);
INT2FIX          2078 file.c             return INT2FIX(0);
INT2FIX          2190 file.c         		return INT2FIX(0);
INT2FIX          2196 file.c             return INT2FIX(0);
INT2FIX          2230 file.c             return INT2FIX(omask);
INT2FIX          2983 file.c             return INT2FIX(0);
INT2FIX          3024 file.c             return INT2FIX(0);
INT2FIX          3132 file.c             return INT2FIX(0);
INT2FIX          4358 file.c             rb_file_const("LOCK_SH", INT2FIX(LOCK_SH));
INT2FIX          4359 file.c             rb_file_const("LOCK_EX", INT2FIX(LOCK_EX));
INT2FIX          4360 file.c             rb_file_const("LOCK_UN", INT2FIX(LOCK_UN));
INT2FIX          4361 file.c             rb_file_const("LOCK_NB", INT2FIX(LOCK_NB));
INT2FIX          1558 gc.c               return INT2FIX(n);
INT2FIX          1592 gc.c               return INT2FIX(n);
INT2FIX          1735 gc.c               block = rb_ary_new3(2, INT2FIX(ruby_safe_level), block);
INT2FIX            91 hash.c         	    hval = rb_funcall(hval, '%', 1, INT2FIX(536870923));
INT2FIX           902 hash.c             return INT2FIX(RHASH(hash)->tbl->num_entries);
INT2FIX          2070 hash.c             return INT2FIX(i);
INT2FIX           132 io.c           static VALUE lineno = INT2FIX(0);
INT2FIX           658 io.c               if (RSTRING(str)->len == 0) return INT2FIX(0);
INT2FIX           771 io.c               return INT2FIX(0);
INT2FIX           859 io.c               return INT2FIX(0);
INT2FIX          1026 io.c               return INT2FIX(0);
INT2FIX          1053 io.c               return INT2FIX(fd);
INT2FIX          1085 io.c               return INT2FIX(fptr->pid);
INT2FIX          1533 io.c           	lineno = INT2FIX(fptr->lineno);
INT2FIX          1602 io.c           	lineno = INT2FIX(fptr->lineno);
INT2FIX          1715 io.c               *var = INT2FIX(gets_lineno);
INT2FIX          1722 io.c               lineno = INT2FIX(gets_lineno);
INT2FIX          1856 io.c           	rb_yield(INT2FIX(c & 0xff));
INT2FIX          1888 io.c               return INT2FIX(c & 0xff);
INT2FIX          2754 io.c               rb_last_status = INT2FIX(status);
INT2FIX          4225 io.c           	lineno = INT2FIX(gets_lineno);
INT2FIX          4295 io.c           	lineno = INT2FIX(gets_lineno);
INT2FIX          4891 io.c               args[2] = INT2FIX(O_RDONLY);
INT2FIX          4899 io.c               args[2] = INT2FIX(O_WRONLY);
INT2FIX          5537 io.c               rb_define_const(rb_cIO, "SEEK_SET", INT2FIX(SEEK_SET));
INT2FIX          5538 io.c               rb_define_const(rb_cIO, "SEEK_CUR", INT2FIX(SEEK_CUR));
INT2FIX          5539 io.c               rb_define_const(rb_cIO, "SEEK_END", INT2FIX(SEEK_END));
INT2FIX          5635 io.c               rb_file_const("RDONLY", INT2FIX(O_RDONLY));
INT2FIX          5636 io.c               rb_file_const("WRONLY", INT2FIX(O_WRONLY));
INT2FIX          5637 io.c               rb_file_const("RDWR", INT2FIX(O_RDWR));
INT2FIX          5638 io.c               rb_file_const("APPEND", INT2FIX(O_APPEND));
INT2FIX          5639 io.c               rb_file_const("CREAT", INT2FIX(O_CREAT));
INT2FIX          5640 io.c               rb_file_const("EXCL", INT2FIX(O_EXCL));
INT2FIX          5643 io.c               rb_file_const("NONBLOCK", INT2FIX(O_NONBLOCK));
INT2FIX          5645 io.c               rb_file_const("NONBLOCK", INT2FIX(O_NDELAY));
INT2FIX          5648 io.c               rb_file_const("TRUNC", INT2FIX(O_TRUNC));
INT2FIX          5650 io.c               rb_file_const("NOCTTY", INT2FIX(O_NOCTTY));
INT2FIX          5653 io.c               rb_file_const("BINARY", INT2FIX(O_BINARY));
INT2FIX          5656 io.c               rb_file_const("SYNC", INT2FIX(O_SYNC));
INT2FIX           890 marshal.c          rb_hash_aset(arg->data, INT2FIX(RHASH(arg->data)->tbl->num_entries), v);
INT2FIX          1414 marshal.c          rb_define_const(rb_mMarshal, "MAJOR_VERSION", INT2FIX(MARSHAL_MAJOR));
INT2FIX          1415 marshal.c          rb_define_const(rb_mMarshal, "MINOR_VERSION", INT2FIX(MARSHAL_MINOR));
INT2FIX           226 numeric.c          zero = INT2FIX(0);
INT2FIX           341 numeric.c          if ((!rb_equal(z, INT2FIX(0))) &&
INT2FIX           342 numeric.c      	((RTEST(rb_funcall(x, '<', 1, INT2FIX(0))) &&
INT2FIX           343 numeric.c      	  RTEST(rb_funcall(y, '>', 1, INT2FIX(0)))) ||
INT2FIX           344 numeric.c      	 (RTEST(rb_funcall(x, '>', 1, INT2FIX(0))) &&
INT2FIX           345 numeric.c      	  RTEST(rb_funcall(y, '<', 1, INT2FIX(0)))))) {
INT2FIX           393 numeric.c          if (RTEST(rb_funcall(num, '<', 1, INT2FIX(0)))) {
INT2FIX           410 numeric.c          if (rb_equal(num, INT2FIX(0))) {
INT2FIX           775 numeric.c          if (x == y) return INT2FIX(0);
INT2FIX           843 numeric.c          return INT2FIX(hash);
INT2FIX           850 numeric.c          if (a == b) return INT2FIX(0);
INT2FIX           851 numeric.c          if (a > b) return INT2FIX(1);
INT2FIX           852 numeric.c          if (a < b) return INT2FIX(-1);
INT2FIX          1139 numeric.c      	return INT2FIX( value < 0 ? -1 : 1 );
INT2FIX          1386 numeric.c      	step = INT2FIX(1);
INT2FIX          1396 numeric.c      	if (rb_equal(step, INT2FIX(0))) {
INT2FIX          1440 numeric.c      	if (RTEST(rb_funcall(step, '>', 1, INT2FIX(0)))) {
INT2FIX          1551 numeric.c          if (RTEST(rb_funcall(INT2FIX(0), '<', 1, val))) {
INT2FIX          1714 numeric.c          return rb_funcall(num, '+', 1, INT2FIX(1));
INT2FIX          2204 numeric.c      	if (b == 0) return INT2FIX(1);
INT2FIX          2265 numeric.c      	if (a == b) return INT2FIX(0);
INT2FIX          2266 numeric.c      	if (a > b) return INT2FIX(1);
INT2FIX          2267 numeric.c      	return INT2FIX(-1);
INT2FIX          2504 numeric.c      	if (val < 0) return INT2FIX(-1);
INT2FIX          2505 numeric.c      	return INT2FIX(0);
INT2FIX          2537 numeric.c      		return INT2FIX(0);
INT2FIX          2538 numeric.c      	    return INT2FIX(1);
INT2FIX          2543 numeric.c          if (i < 0) return INT2FIX(0);
INT2FIX          2545 numeric.c      	if (val < 0) return INT2FIX(1);
INT2FIX          2546 numeric.c      	return INT2FIX(0);
INT2FIX          2549 numeric.c      	return INT2FIX(1);
INT2FIX          2550 numeric.c          return INT2FIX(0);
INT2FIX          2655 numeric.c          return INT2FIX(sizeof(long));
INT2FIX          2688 numeric.c      	    i = rb_funcall(i, '+', 1, INT2FIX(1));
INT2FIX          2726 numeric.c      	    i = rb_funcall(i, '-', 1, INT2FIX(1));
INT2FIX          2761 numeric.c      	VALUE i = INT2FIX(0);
INT2FIX          2766 numeric.c      	    i = rb_funcall(i, '+', 1, INT2FIX(1));
INT2FIX          2909 numeric.c          rb_define_const(rb_cFloat, "ROUNDS", INT2FIX(FLT_ROUNDS));
INT2FIX          2910 numeric.c          rb_define_const(rb_cFloat, "RADIX", INT2FIX(FLT_RADIX));
INT2FIX          2911 numeric.c          rb_define_const(rb_cFloat, "MANT_DIG", INT2FIX(DBL_MANT_DIG));
INT2FIX          2912 numeric.c          rb_define_const(rb_cFloat, "DIG", INT2FIX(DBL_DIG));
INT2FIX          2913 numeric.c          rb_define_const(rb_cFloat, "MIN_EXP", INT2FIX(DBL_MIN_EXP));
INT2FIX          2914 numeric.c          rb_define_const(rb_cFloat, "MAX_EXP", INT2FIX(DBL_MAX_EXP));
INT2FIX          2915 numeric.c          rb_define_const(rb_cFloat, "MIN_10_EXP", INT2FIX(DBL_MIN_10_EXP));
INT2FIX          2916 numeric.c          rb_define_const(rb_cFloat, "MAX_10_EXP", INT2FIX(DBL_MAX_10_EXP));
INT2FIX           697 object.c           return INT2FIX(0);
INT2FIX          1306 object.c           if (mod == arg) return INT2FIX(0);
INT2FIX          1318 object.c       	return INT2FIX(-1);
INT2FIX          1320 object.c           return INT2FIX(1);
INT2FIX          1479 pack.c         		rb_ary_push(ary, INT2FIX(c));
INT2FIX          1488 pack.c         		rb_ary_push(ary, INT2FIX(c));
INT2FIX          1500 pack.c         		rb_ary_push(ary, INT2FIX(tmp));
INT2FIX          1511 pack.c         		rb_ary_push(ary, INT2FIX(tmp));
INT2FIX          5932 parse.y        	set_yylval_literal(INT2FIX(c));
INT2FIX          6215 parse.y        		    set_yylval_literal(INT2FIX(0));
INT2FIX          7183 parse.y        	return NEW_LIT(INT2FIX(ruby_sourceline));
INT2FIX           134 process.c          return INT2FIX(getpid());
INT2FIX           159 process.c          return INT2FIX(0);
INT2FIX           161 process.c          return INT2FIX(getppid());
INT2FIX           203 process.c          rb_iv_set(rb_last_status, "status", INT2FIX(status));
INT2FIX           204 process.c          rb_iv_set(rb_last_status, "pid", INT2FIX(pid));
INT2FIX           730 process.c          return INT2FIX(pid);
INT2FIX          1436 process.c      	return INT2FIX(pid);
INT2FIX          1662 process.c          return INT2FIX(end);
INT2FIX          1686 process.c          return INT2FIX(pgrp);
INT2FIX          1691 process.c          return INT2FIX(pgrp);
INT2FIX          1722 process.c          return INT2FIX(0);
INT2FIX          1771 process.c          return INT2FIX(0);
INT2FIX          1798 process.c          return INT2FIX(pid);
INT2FIX          1819 process.c        return INT2FIX(pid);
INT2FIX          1856 process.c          return INT2FIX(prio);
INT2FIX          1888 process.c          return INT2FIX(0);
INT2FIX          2165 process.c          return INT2FIX(uid);
INT2FIX          2201 process.c          return INT2FIX(uid);
INT2FIX          2366 process.c          return INT2FIX(uid);
INT2FIX          2529 process.c          return INT2FIX(gid);
INT2FIX          2564 process.c          return INT2FIX(gid);
INT2FIX          2718 process.c          return INT2FIX(maxgroups);
INT2FIX          2740 process.c          return INT2FIX(maxgroups);
INT2FIX          2768 process.c          return INT2FIX(n);
INT2FIX          2791 process.c          return INT2FIX(0);
INT2FIX          2959 process.c          return INT2FIX(gid);
INT2FIX          2978 process.c          return INT2FIX(euid);
INT2FIX          3045 process.c          return INT2FIX(euid);
INT2FIX          3087 process.c          return INT2FIX(egid);
INT2FIX          3155 process.c          return INT2FIX(egid);
INT2FIX          3233 process.c          return INT2FIX(uid);
INT2FIX          3290 process.c          return INT2FIX(gid);
INT2FIX          3350 process.c      	proc_seteuid(obj, INT2FIX(uid));
INT2FIX          3355 process.c      	    return INT2FIX(euid);
INT2FIX          3358 process.c      	proc_seteuid(obj, INT2FIX(SAVED_USER_ID));
INT2FIX          3363 process.c      	    return INT2FIX(uid);
INT2FIX          3397 process.c      	return INT2FIX(euid);
INT2FIX          3459 process.c      	proc_setegid(obj, INT2FIX(gid));
INT2FIX          3464 process.c      	    return INT2FIX(egid);
INT2FIX          3467 process.c      	proc_setegid(obj, INT2FIX(SAVED_GROUP_ID));
INT2FIX          3472 process.c      	    return INT2FIX(gid);
INT2FIX          3505 process.c      	return INT2FIX(egid);
INT2FIX          3575 process.c          rb_define_const(rb_mProcess, "WNOHANG", INT2FIX(WNOHANG));
INT2FIX          3577 process.c          rb_define_const(rb_mProcess, "WNOHANG", INT2FIX(0));
INT2FIX          3580 process.c          rb_define_const(rb_mProcess, "WUNTRACED", INT2FIX(WUNTRACED));
INT2FIX          3582 process.c          rb_define_const(rb_mProcess, "WUNTRACED", INT2FIX(0));
INT2FIX          3637 process.c          rb_define_const(rb_mProcess, "PRIO_PROCESS", INT2FIX(PRIO_PROCESS));
INT2FIX          3638 process.c          rb_define_const(rb_mProcess, "PRIO_PGRP", INT2FIX(PRIO_PGRP));
INT2FIX          3639 process.c          rb_define_const(rb_mProcess, "PRIO_USER", INT2FIX(PRIO_USER));
INT2FIX          3659 process.c          rb_define_const(rb_mProcess, "RLIMIT_CORE", INT2FIX(RLIMIT_CORE));
INT2FIX          3662 process.c          rb_define_const(rb_mProcess, "RLIMIT_CPU", INT2FIX(RLIMIT_CPU));
INT2FIX          3665 process.c          rb_define_const(rb_mProcess, "RLIMIT_DATA", INT2FIX(RLIMIT_DATA));
INT2FIX          3668 process.c          rb_define_const(rb_mProcess, "RLIMIT_FSIZE", INT2FIX(RLIMIT_FSIZE));
INT2FIX          3671 process.c          rb_define_const(rb_mProcess, "RLIMIT_NOFILE", INT2FIX(RLIMIT_NOFILE));
INT2FIX          3674 process.c          rb_define_const(rb_mProcess, "RLIMIT_STACK", INT2FIX(RLIMIT_STACK));
INT2FIX          3677 process.c          rb_define_const(rb_mProcess, "RLIMIT_AS", INT2FIX(RLIMIT_AS));
INT2FIX          3680 process.c          rb_define_const(rb_mProcess, "RLIMIT_MEMLOCK", INT2FIX(RLIMIT_MEMLOCK));
INT2FIX          3683 process.c          rb_define_const(rb_mProcess, "RLIMIT_NPROC", INT2FIX(RLIMIT_NPROC));
INT2FIX          3686 process.c          rb_define_const(rb_mProcess, "RLIMIT_RSS", INT2FIX(RLIMIT_RSS));
INT2FIX          3689 process.c          rb_define_const(rb_mProcess, "RLIMIT_SBSIZE", INT2FIX(RLIMIT_SBSIZE));
INT2FIX           192 random.c       static VALUE saved_seed = INT2FIX(0);
INT2FIX           462 random.c                   limit = (struct RBignum *)rb_big_minus((VALUE)limit, INT2FIX(1));
INT2FIX           150 range.c            if (c == 0) return INT2FIX(0);
INT2FIX           233 range.c        	    if (c == INT2FIX(0)) break;
INT2FIX           291 range.c        	step = INT2FIX(1);
INT2FIX           323 range.c        	    if (rb_equal(step, INT2FIX(0))) rb_raise(rb_eArgError, "step can't be 0");
INT2FIX           497 range.c        	    return rb_funcall(e, '-', 1, INT2FIX(1));
INT2FIX           697 re.c               return INT2FIX(RMATCH(match)->regs->num_regs);
INT2FIX           724 re.c               return rb_assoc_new(INT2FIX(RMATCH(match)->regs->beg[i]),
INT2FIX           725 re.c           			INT2FIX(RMATCH(match)->regs->end[i]));
INT2FIX           752 re.c               return INT2FIX(RMATCH(match)->regs->beg[i]);
INT2FIX           779 re.c               return INT2FIX(RMATCH(match)->regs->end[i]);
INT2FIX          1431 re.c               return INT2FIX(hashval);
INT2FIX          2252 re.c               rb_define_const(rb_cRegexp, "IGNORECASE", INT2FIX(ONIG_OPTION_IGNORECASE));
INT2FIX          2253 re.c               rb_define_const(rb_cRegexp, "EXTENDED", INT2FIX(ONIG_OPTION_EXTEND));
INT2FIX          2254 re.c               rb_define_const(rb_cRegexp, "MULTILINE", INT2FIX(ONIG_OPTION_MULTILINE));
INT2FIX           898 ruby.c         	if (c == INT2FIX('#')) {
INT2FIX           900 ruby.c         	    if (c == INT2FIX('!')) {
INT2FIX           949 ruby.c         		rb_io_ungetc(f, INT2FIX('\n'));
INT2FIX           950 ruby.c         		rb_io_ungetc(f, INT2FIX('!'));
INT2FIX           955 ruby.c         	    rb_io_ungetc(f, INT2FIX('#'));
INT2FIX          1138 ruby.c             if (ruby_verbose == Qnil) return INT2FIX(0);
INT2FIX          1139 ruby.c             if (ruby_verbose == Qfalse) return INT2FIX(1);
INT2FIX          1140 ruby.c             if (ruby_verbose == Qtrue) return INT2FIX(2);
INT2FIX           150 ruby.h         #define LONG2FIX(i) INT2FIX(i)
INT2FIX           151 ruby.h         #define rb_fix_new(v) INT2FIX(v)
INT2FIX           308 ruby.h         #define CHR2FIX(x) INT2FIX((long)((x)&0xff))
INT2FIX           294 signal.c           return INT2FIX(i-1);
INT2FIX           523 signal.c       	rb_eval_cmd(trap_exit, rb_ary_new3(1, INT2FIX(0)), trap_list[0].safe);
INT2FIX           806 signal.c       	rb_hash_aset(h, rb_str_new2(sigs->signm), INT2FIX(sigs->signo));
INT2FIX           814 string.c           return INT2FIX(key);
INT2FIX           958 string.c       	if (RSTRING(str1)->len == RSTRING(str2)->len) return INT2FIX(0);
INT2FIX           959 string.c       	if (RSTRING(str1)->len > RSTRING(str2)->len) return INT2FIX(1);
INT2FIX           960 string.c       	return INT2FIX(-1);
INT2FIX           962 string.c           if (retval == 0) return INT2FIX(0);
INT2FIX           963 string.c           if (retval > 0) return INT2FIX(1);
INT2FIX           964 string.c           return INT2FIX(-1);
INT2FIX          1423 string.c       	return INT2FIX(RSTRING(str)->ptr[idx] & 0xff);
INT2FIX          3155 string.c           if (!s || RSTRING(str)->len == 0) return INT2FIX(0);
INT2FIX          3458 string.c       	rb_yield(INT2FIX(RSTRING(str)->ptr[i] & 0xff));
INT2FIX          4004 string.c       	VALUE sum = INT2FIX(0);
INT2FIX          4008 string.c       	    sum = rb_funcall(sum, '+', 1, INT2FIX((unsigned char)*p));
INT2FIX          4014 string.c       	    mod = rb_funcall(INT2FIX(1), rb_intern("<<"), 1, INT2FIX(bits));
INT2FIX          4015 string.c       	    mod = rb_funcall(mod, '-', 1, INT2FIX(1));
INT2FIX           908 time.c         	    if (tobj1->tv.tv_usec == tobj2->tv.tv_usec) return INT2FIX(0);
INT2FIX           909 time.c         	    if (tobj1->tv.tv_usec > tobj2->tv.tv_usec) return INT2FIX(1);
INT2FIX           910 time.c         	    return INT2FIX(-1);
INT2FIX           912 time.c         	if (tobj1->tv.tv_sec > tobj2->tv.tv_sec) return INT2FIX(1);
INT2FIX           913 time.c         	return INT2FIX(-1);
INT2FIX          1350 time.c             return INT2FIX(tobj->tm.tm_sec);
INT2FIX          1372 time.c             return INT2FIX(tobj->tm.tm_min);
INT2FIX          1394 time.c             return INT2FIX(tobj->tm.tm_hour);
INT2FIX          1418 time.c             return INT2FIX(tobj->tm.tm_mday);
INT2FIX          1442 time.c             return INT2FIX(tobj->tm.tm_mon+1);
INT2FIX          1487 time.c             return INT2FIX(tobj->tm.tm_wday);
INT2FIX          1612 time.c             return INT2FIX(tobj->tm.tm_yday+1);
INT2FIX          1707 time.c         	return INT2FIX(0);
INT2FIX          1762 time.c         		    INT2FIX(tobj->tm.tm_sec),
INT2FIX          1763 time.c         		    INT2FIX(tobj->tm.tm_min),
INT2FIX          1764 time.c         		    INT2FIX(tobj->tm.tm_hour),
INT2FIX          1765 time.c         		    INT2FIX(tobj->tm.tm_mday),
INT2FIX          1766 time.c         		    INT2FIX(tobj->tm.tm_mon+1),
INT2FIX          1768 time.c         		    INT2FIX(tobj->tm.tm_wday),
INT2FIX          1769 time.c         		    INT2FIX(tobj->tm.tm_yday+1),


INT2NUM

INT2NUM           121 enum.c         	return INT2NUM(args[1]);
INT2NUM           127 enum.c         	return INT2NUM(n);
INT2NUM           791 error.c        	rb_define_const(error, "Errno", INT2NUM(n));
INT2NUM          4213 eval.c             args[0] = INT2NUM(status);
INT2NUM          9896 eval.c             return INT2NUM(ruby_safe_level);
INT2NUM          11331 eval.c             return INT2NUM(rb_thread_check(thread)->priority);
INT2NUM          11391 eval.c         	return INT2NUM(ruby_safe_level);
INT2NUM          11393 eval.c             return INT2NUM(th->safe);
INT2NUM          12244 eval.c             args[0] = INT2NUM(EXIT_SUCCESS);
INT2NUM           199 ext/Win32API/Win32API.c 	return INT2NUM(ret);
INT2NUM           204 ext/Win32API/Win32API.c 	return INT2NUM(0);
INT2NUM           149 ext/bigdecimal/bigdecimal.c     obj = rb_assoc_new(INT2NUM(p->Prec*VpBaseFig()),
INT2NUM           150 ext/bigdecimal/bigdecimal.c 		       INT2NUM(p->MaxPrec*VpBaseFig()));
INT2NUM          1124 ext/bigdecimal/bigdecimal.c     rb_ary_push(obj, INT2NUM(e));
INT2NUM          1132 ext/bigdecimal/bigdecimal.c     return INT2NUM(e);
INT2NUM          1223 ext/bigdecimal/bigdecimal.c     VALUE  nCur = INT2NUM(VpGetPrecLimit());
INT2NUM           708 ext/curses/curses.c   return INT2NUM(mousemask(NUM2UINT(mask),NULL));
INT2NUM          1712 ext/curses/curses.c     rb_define_const(mKey, "MOUSE", INT2NUM(KEY_MOUSE));
INT2NUM          1716 ext/curses/curses.c     rb_define_const(mKey, "MIN", INT2NUM(KEY_MIN));
INT2NUM          1720 ext/curses/curses.c     rb_define_const(mKey, "BREAK", INT2NUM(KEY_BREAK));
INT2NUM          1724 ext/curses/curses.c     rb_define_const(mKey, "DOWN", INT2NUM(KEY_DOWN));
INT2NUM          1728 ext/curses/curses.c     rb_define_const(mKey, "UP", INT2NUM(KEY_UP));
INT2NUM          1732 ext/curses/curses.c     rb_define_const(mKey, "LEFT", INT2NUM(KEY_LEFT));
INT2NUM          1736 ext/curses/curses.c     rb_define_const(mKey, "RIGHT", INT2NUM(KEY_RIGHT));
INT2NUM          1740 ext/curses/curses.c     rb_define_const(mKey, "HOME", INT2NUM(KEY_HOME));
INT2NUM          1744 ext/curses/curses.c     rb_define_const(mKey, "BACKSPACE", INT2NUM(KEY_BACKSPACE));
INT2NUM          1753 ext/curses/curses.c 	rb_define_const(mCurses, c, INT2NUM(KEY_F(i)));
INT2NUM          1755 ext/curses/curses.c 	rb_define_const(mKey, c, INT2NUM(KEY_F(i)));
INT2NUM          1761 ext/curses/curses.c     rb_define_const(mKey, "DL", INT2NUM(KEY_DL));
INT2NUM          1765 ext/curses/curses.c     rb_define_const(mKey, "IL", INT2NUM(KEY_IL));
INT2NUM          1769 ext/curses/curses.c     rb_define_const(mKey, "DC", INT2NUM(KEY_DC));
INT2NUM          1773 ext/curses/curses.c     rb_define_const(mKey, "IC", INT2NUM(KEY_IC));
INT2NUM          1777 ext/curses/curses.c     rb_define_const(mKey, "EIC", INT2NUM(KEY_EIC));
INT2NUM          1781 ext/curses/curses.c     rb_define_const(mKey, "CLEAR", INT2NUM(KEY_CLEAR));
INT2NUM          1785 ext/curses/curses.c     rb_define_const(mKey, "EOS", INT2NUM(KEY_EOS));
INT2NUM          1789 ext/curses/curses.c     rb_define_const(mKey, "EOL", INT2NUM(KEY_EOL));
INT2NUM          1793 ext/curses/curses.c     rb_define_const(mKey, "SF", INT2NUM(KEY_SF));
INT2NUM          1797 ext/curses/curses.c     rb_define_const(mKey, "SR", INT2NUM(KEY_SR));
INT2NUM          1801 ext/curses/curses.c     rb_define_const(mKey, "NPAGE", INT2NUM(KEY_NPAGE));
INT2NUM          1805 ext/curses/curses.c     rb_define_const(mKey, "PPAGE", INT2NUM(KEY_PPAGE));
INT2NUM          1809 ext/curses/curses.c     rb_define_const(mKey, "STAB", INT2NUM(KEY_STAB));
INT2NUM          1813 ext/curses/curses.c     rb_define_const(mKey, "CTAB", INT2NUM(KEY_CTAB));
INT2NUM          1817 ext/curses/curses.c     rb_define_const(mKey, "CATAB", INT2NUM(KEY_CATAB));
INT2NUM          1821 ext/curses/curses.c     rb_define_const(mKey, "ENTER", INT2NUM(KEY_ENTER));
INT2NUM          1825 ext/curses/curses.c     rb_define_const(mKey, "SRESET", INT2NUM(KEY_SRESET));
INT2NUM          1829 ext/curses/curses.c     rb_define_const(mKey, "RESET", INT2NUM(KEY_RESET));
INT2NUM          1833 ext/curses/curses.c     rb_define_const(mKey, "PRINT", INT2NUM(KEY_PRINT));
INT2NUM          1837 ext/curses/curses.c     rb_define_const(mKey, "LL", INT2NUM(KEY_LL));
INT2NUM          1841 ext/curses/curses.c     rb_define_const(mKey, "A1", INT2NUM(KEY_A1));
INT2NUM          1845 ext/curses/curses.c     rb_define_const(mKey, "A3", INT2NUM(KEY_A3));
INT2NUM          1849 ext/curses/curses.c     rb_define_const(mKey, "B2", INT2NUM(KEY_B2));
INT2NUM          1853 ext/curses/curses.c     rb_define_const(mKey, "C1", INT2NUM(KEY_C1));
INT2NUM          1857 ext/curses/curses.c     rb_define_const(mKey, "C3", INT2NUM(KEY_C3));
INT2NUM          1861 ext/curses/curses.c     rb_define_const(mKey, "BTAB", INT2NUM(KEY_BTAB));
INT2NUM          1865 ext/curses/curses.c     rb_define_const(mKey, "BEG", INT2NUM(KEY_BEG));
INT2NUM          1869 ext/curses/curses.c     rb_define_const(mKey, "CANCEL", INT2NUM(KEY_CANCEL));
INT2NUM          1873 ext/curses/curses.c     rb_define_const(mKey, "CLOSE", INT2NUM(KEY_CLOSE));
INT2NUM          1877 ext/curses/curses.c     rb_define_const(mKey, "COMMAND", INT2NUM(KEY_COMMAND));
INT2NUM          1881 ext/curses/curses.c     rb_define_const(mKey, "COPY", INT2NUM(KEY_COPY));
INT2NUM          1885 ext/curses/curses.c     rb_define_const(mKey, "CREATE", INT2NUM(KEY_CREATE));
INT2NUM          1889 ext/curses/curses.c     rb_define_const(mKey, "END", INT2NUM(KEY_END));
INT2NUM          1893 ext/curses/curses.c     rb_define_const(mKey, "EXIT", INT2NUM(KEY_EXIT));
INT2NUM          1897 ext/curses/curses.c     rb_define_const(mKey, "FIND", INT2NUM(KEY_FIND));
INT2NUM          1901 ext/curses/curses.c     rb_define_const(mKey, "HELP", INT2NUM(KEY_HELP));
INT2NUM          1905 ext/curses/curses.c     rb_define_const(mKey, "MARK", INT2NUM(KEY_MARK));
INT2NUM          1909 ext/curses/curses.c     rb_define_const(mKey, "MESSAGE", INT2NUM(KEY_MESSAGE));
INT2NUM          1913 ext/curses/curses.c     rb_define_const(mKey, "MOVE", INT2NUM(KEY_MOVE));
INT2NUM          1917 ext/curses/curses.c     rb_define_const(mKey, "NEXT", INT2NUM(KEY_NEXT));
INT2NUM          1921 ext/curses/curses.c     rb_define_const(mKey, "OPEN", INT2NUM(KEY_OPEN));
INT2NUM          1925 ext/curses/curses.c     rb_define_const(mKey, "OPTIONS", INT2NUM(KEY_OPTIONS));
INT2NUM          1929 ext/curses/curses.c     rb_define_const(mKey, "PREVIOUS", INT2NUM(KEY_PREVIOUS));
INT2NUM          1933 ext/curses/curses.c     rb_define_const(mKey, "REDO", INT2NUM(KEY_REDO));
INT2NUM          1937 ext/curses/curses.c     rb_define_const(mKey, "REFERENCE", INT2NUM(KEY_REFERENCE));
INT2NUM          1941 ext/curses/curses.c     rb_define_const(mKey, "REFRESH", INT2NUM(KEY_REFRESH));
INT2NUM          1945 ext/curses/curses.c     rb_define_const(mKey, "REPLACE", INT2NUM(KEY_REPLACE));
INT2NUM          1949 ext/curses/curses.c     rb_define_const(mKey, "RESTART", INT2NUM(KEY_RESTART));
INT2NUM          1953 ext/curses/curses.c     rb_define_const(mKey, "RESUME", INT2NUM(KEY_RESUME));
INT2NUM          1957 ext/curses/curses.c     rb_define_const(mKey, "SAVE", INT2NUM(KEY_SAVE));
INT2NUM          1961 ext/curses/curses.c     rb_define_const(mKey, "SBEG", INT2NUM(KEY_SBEG));
INT2NUM          1965 ext/curses/curses.c     rb_define_const(mKey, "SCANCEL", INT2NUM(KEY_SCANCEL));
INT2NUM          1969 ext/curses/curses.c     rb_define_const(mKey, "SCOMMAND", INT2NUM(KEY_SCOMMAND));
INT2NUM          1973 ext/curses/curses.c     rb_define_const(mKey, "SCOPY", INT2NUM(KEY_SCOPY));
INT2NUM          1977 ext/curses/curses.c     rb_define_const(mKey, "SCREATE", INT2NUM(KEY_SCREATE));
INT2NUM          1981 ext/curses/curses.c     rb_define_const(mKey, "SDC", INT2NUM(KEY_SDC));
INT2NUM          1985 ext/curses/curses.c     rb_define_const(mKey, "SDL", INT2NUM(KEY_SDL));
INT2NUM          1989 ext/curses/curses.c     rb_define_const(mKey, "SELECT", INT2NUM(KEY_SELECT));
INT2NUM          1993 ext/curses/curses.c     rb_define_const(mKey, "SEND", INT2NUM(KEY_SEND));
INT2NUM          1997 ext/curses/curses.c     rb_define_const(mKey, "SEOL", INT2NUM(KEY_SEOL));
INT2NUM          2001 ext/curses/curses.c     rb_define_const(mKey, "SEXIT", INT2NUM(KEY_SEXIT));
INT2NUM          2005 ext/curses/curses.c     rb_define_const(mKey, "SFIND", INT2NUM(KEY_SFIND));
INT2NUM          2009 ext/curses/curses.c     rb_define_const(mKey, "SHELP", INT2NUM(KEY_SHELP));
INT2NUM          2013 ext/curses/curses.c     rb_define_const(mKey, "SHOME", INT2NUM(KEY_SHOME));
INT2NUM          2017 ext/curses/curses.c     rb_define_const(mKey, "SIC", INT2NUM(KEY_SIC));
INT2NUM          2021 ext/curses/curses.c     rb_define_const(mKey, "SLEFT", INT2NUM(KEY_SLEFT));
INT2NUM          2025 ext/curses/curses.c     rb_define_const(mKey, "SMESSAGE", INT2NUM(KEY_SMESSAGE));
INT2NUM          2029 ext/curses/curses.c     rb_define_const(mKey, "SMOVE", INT2NUM(KEY_SMOVE));
INT2NUM          2033 ext/curses/curses.c     rb_define_const(mKey, "SNEXT", INT2NUM(KEY_SNEXT));
INT2NUM          2037 ext/curses/curses.c     rb_define_const(mKey, "SOPTIONS", INT2NUM(KEY_SOPTIONS));
INT2NUM          2041 ext/curses/curses.c     rb_define_const(mKey, "SPREVIOUS", INT2NUM(KEY_SPREVIOUS));
INT2NUM          2045 ext/curses/curses.c     rb_define_const(mKey, "SPRINT", INT2NUM(KEY_SPRINT));
INT2NUM          2049 ext/curses/curses.c     rb_define_const(mKey, "SREDO", INT2NUM(KEY_SREDO));
INT2NUM          2053 ext/curses/curses.c     rb_define_const(mKey, "SREPLACE", INT2NUM(KEY_SREPLACE));
INT2NUM          2057 ext/curses/curses.c     rb_define_const(mKey, "SRIGHT", INT2NUM(KEY_SRIGHT));
INT2NUM          2061 ext/curses/curses.c     rb_define_const(mKey, "SRSUME", INT2NUM(KEY_SRSUME));
INT2NUM          2065 ext/curses/curses.c     rb_define_const(mKey, "SSAVE", INT2NUM(KEY_SSAVE));
INT2NUM          2069 ext/curses/curses.c     rb_define_const(mKey, "SSUSPEND", INT2NUM(KEY_SSUSPEND));
INT2NUM          2073 ext/curses/curses.c     rb_define_const(mKey, "SUNDO", INT2NUM(KEY_SUNDO));
INT2NUM          2077 ext/curses/curses.c     rb_define_const(mKey, "SUSPEND", INT2NUM(KEY_SUSPEND));
INT2NUM          2081 ext/curses/curses.c     rb_define_const(mKey, "UNDO", INT2NUM(KEY_UNDO));
INT2NUM          2085 ext/curses/curses.c     rb_define_const(mKey, "RESIZE", INT2NUM(KEY_RESIZE));
INT2NUM          2089 ext/curses/curses.c     rb_define_const(mKey, "MAX", INT2NUM(KEY_MAX));
INT2NUM           148 ext/dl/cfunc.c     return INT2NUM(cfunc->type);
INT2NUM           308 ext/dl/cfunc.c 	    result = INT2NUM((int)ret); \
INT2NUM           318 ext/dl/cfunc.c 	    result = INT2NUM(ret); \
INT2NUM           406 ext/dl/cfunc.c 	    result = INT2NUM((int)ret); \
INT2NUM           416 ext/dl/cfunc.c 	    result = INT2NUM(ret); \
INT2NUM           471 ext/dl/cfunc.c     rb_dl_set_last_error(self, INT2NUM(errno));
INT2NUM           473 ext/dl/cfunc.c     rb_dl_set_win32_last_error(self, INT2NUM(GetLastError()));
INT2NUM           355 ext/dl/cptr.c  	retval = INT2NUM(*((char*)RPTR_DATA(self)->ptr + offset));
INT2NUM            93 ext/dl/dl.c        rb_define_const(rb_mDL, "MAX_CALLBACK", INT2NUM(MAX_CALLBACK));
INT2NUM            94 ext/dl/dl.c        rb_define_const(rb_mDL, "DLSTACK_SIZE", INT2NUM(DLSTACK_SIZE));
INT2NUM            98 ext/dl/dl.c        rb_define_const(rb_mDL, "RTLD_GLOBAL", INT2NUM(RTLD_GLOBAL));
INT2NUM            99 ext/dl/dl.c        rb_define_const(rb_mDL, "RTLD_LAZY",   INT2NUM(RTLD_LAZY));
INT2NUM           100 ext/dl/dl.c        rb_define_const(rb_mDL, "RTLD_NOW",    INT2NUM(RTLD_NOW));
INT2NUM           102 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_VOID",  INT2NUM(DLTYPE_VOID));
INT2NUM           103 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_VOIDP",  INT2NUM(DLTYPE_VOIDP));
INT2NUM           104 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_CHAR",  INT2NUM(DLTYPE_CHAR));
INT2NUM           105 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_SHORT",  INT2NUM(DLTYPE_SHORT));
INT2NUM           106 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_INT",  INT2NUM(DLTYPE_INT));
INT2NUM           107 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_LONG",  INT2NUM(DLTYPE_LONG));
INT2NUM           109 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_LONG_LONG",  INT2NUM(DLTYPE_LONG_LONG));
INT2NUM           111 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_FLOAT",  INT2NUM(DLTYPE_FLOAT));
INT2NUM           112 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_DOUBLE",  INT2NUM(DLTYPE_DOUBLE));
INT2NUM           114 ext/dl/dl.c        rb_define_const(rb_mDL, "ALIGN_VOIDP", INT2NUM(ALIGN_VOIDP));
INT2NUM           115 ext/dl/dl.c        rb_define_const(rb_mDL, "ALIGN_CHAR",  INT2NUM(ALIGN_CHAR));
INT2NUM           116 ext/dl/dl.c        rb_define_const(rb_mDL, "ALIGN_SHORT", INT2NUM(ALIGN_SHORT));
INT2NUM           117 ext/dl/dl.c        rb_define_const(rb_mDL, "ALIGN_INT",   INT2NUM(ALIGN_INT));
INT2NUM           118 ext/dl/dl.c        rb_define_const(rb_mDL, "ALIGN_LONG",  INT2NUM(ALIGN_LONG));
INT2NUM           120 ext/dl/dl.c        rb_define_const(rb_mDL, "ALIGN_LONG_LONG",  INT2NUM(ALIGN_LONG_LONG));
INT2NUM           122 ext/dl/dl.c        rb_define_const(rb_mDL, "ALIGN_FLOAT", INT2NUM(ALIGN_FLOAT));
INT2NUM           123 ext/dl/dl.c        rb_define_const(rb_mDL, "ALIGN_DOUBLE",INT2NUM(ALIGN_DOUBLE));
INT2NUM           125 ext/dl/dl.c        rb_define_const(rb_mDL, "SIZEOF_VOIDP", INT2NUM(sizeof(void*)));
INT2NUM           126 ext/dl/dl.c        rb_define_const(rb_mDL, "SIZEOF_CHAR",  INT2NUM(sizeof(char)));
INT2NUM           127 ext/dl/dl.c        rb_define_const(rb_mDL, "SIZEOF_SHORT", INT2NUM(sizeof(short)));
INT2NUM           128 ext/dl/dl.c        rb_define_const(rb_mDL, "SIZEOF_INT",   INT2NUM(sizeof(int)));
INT2NUM           129 ext/dl/dl.c        rb_define_const(rb_mDL, "SIZEOF_LONG",  INT2NUM(sizeof(long)));
INT2NUM           131 ext/dl/dl.c        rb_define_const(rb_mDL, "SIZEOF_LONG_LONG",  INT2NUM(sizeof(LONG_LONG)));
INT2NUM           133 ext/dl/dl.c        rb_define_const(rb_mDL, "SIZEOF_FLOAT", INT2NUM(sizeof(float)));
INT2NUM           134 ext/dl/dl.c        rb_define_const(rb_mDL, "SIZEOF_DOUBLE",INT2NUM(sizeof(double)));
INT2NUM            25 ext/dl/handle.c   return INT2NUM(dlclose(dlhandle->ptr));
INT2NUM           117 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "F_DUPFD", INT2NUM(F_DUPFD));
INT2NUM           120 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "F_GETFD", INT2NUM(F_GETFD));
INT2NUM           123 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "F_GETLK", INT2NUM(F_GETLK));
INT2NUM           126 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "F_SETFD", INT2NUM(F_SETFD));
INT2NUM           129 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "F_GETFL", INT2NUM(F_GETFL));
INT2NUM           132 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "F_SETFL", INT2NUM(F_SETFL));
INT2NUM           135 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "F_SETLK", INT2NUM(F_SETLK));
INT2NUM           138 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "F_SETLKW", INT2NUM(F_SETLKW));
INT2NUM           141 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "FD_CLOEXEC", INT2NUM(FD_CLOEXEC));
INT2NUM           144 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "F_RDLCK", INT2NUM(F_RDLCK));
INT2NUM           147 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "F_UNLCK", INT2NUM(F_UNLCK));
INT2NUM           150 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "F_WRLCK", INT2NUM(F_WRLCK));
INT2NUM           153 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_CREAT", INT2NUM(O_CREAT));
INT2NUM           156 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_EXCL", INT2NUM(O_EXCL));
INT2NUM           159 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_NOCTTY", INT2NUM(O_NOCTTY));
INT2NUM           162 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_TRUNC", INT2NUM(O_TRUNC));
INT2NUM           165 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_APPEND", INT2NUM(O_APPEND));
INT2NUM           168 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_NONBLOCK", INT2NUM(O_NONBLOCK));
INT2NUM           171 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_NDELAY", INT2NUM(O_NDELAY));
INT2NUM           174 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_RDONLY", INT2NUM(O_RDONLY));
INT2NUM           177 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_RDWR", INT2NUM(O_RDWR));
INT2NUM           180 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_WRONLY", INT2NUM(O_WRONLY));
INT2NUM            28 ext/io/wait/wait.c #define ioctl_arg2num(i) INT2NUM(i)
INT2NUM           419 ext/openssl/ossl.c     rb_define_const(mOSSL, "OPENSSL_VERSION_NUMBER", INT2NUM(OPENSSL_VERSION_NUMBER));
INT2NUM            56 ext/openssl/ossl_asn1.c     argv[0] = INT2NUM(tm.tm_year);
INT2NUM            57 ext/openssl/ossl_asn1.c     argv[1] = INT2NUM(tm.tm_mon);
INT2NUM            58 ext/openssl/ossl_asn1.c     argv[2] = INT2NUM(tm.tm_mday);
INT2NUM            59 ext/openssl/ossl_asn1.c     argv[3] = INT2NUM(tm.tm_hour);
INT2NUM            60 ext/openssl/ossl_asn1.c     argv[4] = INT2NUM(tm.tm_min);
INT2NUM            61 ext/openssl/ossl_asn1.c     argv[5] = INT2NUM(tm.tm_sec);
INT2NUM           738 ext/openssl/ossl_asn1.c 	    rb_ary_push(arg, INT2NUM(tag));
INT2NUM           806 ext/openssl/ossl_asn1.c 				  value, INT2NUM(tag), ID2SYM(tag_class));
INT2NUM           887 ext/openssl/ossl_asn1.c 	tag = INT2NUM(ossl_asn1_default_tag(self));
INT2NUM          1106 ext/openssl/ossl_asn1.c 	rb_define_const(mASN1, ossl_asn1_info[i].name, INT2NUM(i));
INT2NUM           337 ext/openssl/ossl_cipher.c 	return INT2NUM(EVP_CIPHER_##func(EVP_CIPHER_CTX_cipher(ctx)));	\
INT2NUM           258 ext/openssl/ossl_digest.c     return INT2NUM(EVP_MD_CTX_size(ctx));
INT2NUM           342 ext/openssl/ossl_engine.c #define DefEngineConst(x) rb_define_const(cEngine, #x, INT2NUM(ENGINE_##x))
INT2NUM           167 ext/openssl/ossl_ocsp.c     return INT2NUM(res);
INT2NUM           246 ext/openssl/ossl_ocsp.c     flg = NIL_P(flags) ? 0 : INT2NUM(flags);
INT2NUM           338 ext/openssl/ossl_ocsp.c     return INT2NUM(st);
INT2NUM           421 ext/openssl/ossl_ocsp.c     return INT2NUM(ret);
INT2NUM           541 ext/openssl/ossl_ocsp.c 	rb_ary_push(ary, INT2NUM(status));
INT2NUM           542 ext/openssl/ossl_ocsp.c 	rb_ary_push(ary, INT2NUM(reason));
INT2NUM           600 ext/openssl/ossl_ocsp.c     flg = NIL_P(flags) ? 0 : INT2NUM(flags);
INT2NUM           723 ext/openssl/ossl_ocsp.c #define DefOCSPConst(x) rb_define_const(mOCSP, #x, INT2NUM(OCSP_##x))
INT2NUM           755 ext/openssl/ossl_ocsp.c #define DefOCSPVConst(x) rb_define_const(mOCSP, "V_" #x, INT2NUM(V_OCSP_##x))
INT2NUM           981 ext/openssl/ossl_pkcs7.c #define DefPKCS7Const(x) rb_define_const(mPKCS7, #x, INT2NUM(PKCS7_##x))
INT2NUM            30 ext/openssl/ossl_pkey.c     rb_ary_store(ary, 0, INT2NUM(p));
INT2NUM            31 ext/openssl/ossl_pkey.c     rb_ary_store(ary, 1, INT2NUM(n));
INT2NUM           709 ext/openssl/ossl_ssl.c     return INT2NUM(nwrite);
INT2NUM           846 ext/openssl/ossl_ssl.c     return INT2NUM(SSL_pending(ssl));
INT2NUM           325 ext/openssl/ossl_x509name.c     utf8str = INT2NUM(V_ASN1_UTF8STRING);
INT2NUM           326 ext/openssl/ossl_x509name.c     ptrstr = INT2NUM(V_ASN1_PRINTABLESTRING);
INT2NUM           327 ext/openssl/ossl_x509name.c     ia5str = INT2NUM(V_ASN1_IA5STRING);
INT2NUM           131 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@flags", INT2NUM(0));
INT2NUM           132 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@purpose", INT2NUM(0));
INT2NUM           133 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@trust", INT2NUM(0));
INT2NUM            87 ext/racc/cparse/cparse.c #  define LONG2NUM(i) INT2NUM(i)
INT2NUM           662 ext/readline/readline.c     return INT2NUM(history_length);
INT2NUM          1332 ext/socket/socket.c     rb_ary_push(ary, INT2NUM(addr->ai_family));
INT2NUM          1422 ext/socket/socket.c     if (!klass) return INT2NUM(fd2);
INT2NUM          2767 ext/socket/socket.c     rb_ary_push(ary, INT2NUM(h->h_addrtype));
INT2NUM          3067 ext/socket/socket.c     return rb_assoc_new(INT2NUM(ntohs(sockaddr->sin_port)), host);
INT2NUM           414 ext/strscan/strscan.c     return INT2NUM(i);
INT2NUM           957 ext/strscan/strscan.c     return INT2NUM(p->regs.end[0] - p->regs.beg[0]);
INT2NUM           120 ext/syslog/syslog.c     return syslog_opened ? INT2NUM(syslog_options) : Qnil;
INT2NUM           125 ext/syslog/syslog.c     return syslog_opened ? INT2NUM(syslog_facility) : Qnil;
INT2NUM           130 ext/syslog/syslog.c     return syslog_opened ? INT2NUM(syslog_mask) : Qnil;
INT2NUM           265 ext/syslog/syslog.c     rb_define_const(mSyslogConstants, #id, INT2NUM(id))
INT2NUM           895 ext/tk/tcltklib.c         argv[1] = RSTRING(rb_fix2str(INT2NUM(state), 10))->ptr;
INT2NUM           983 ext/tk/tcltklib.c     return INT2NUM(timer_tick);
INT2NUM          1035 ext/tk/tcltklib.c     return INT2NUM(no_event_wait);
INT2NUM          1089 ext/tk/tcltklib.c     return rb_ary_new3(2, INT2NUM(event_loop_max), INT2NUM(no_event_tick));
INT2NUM          1161 ext/win32ole/win32ole.c             obj = INT2NUM((long)*V_UI1REF(pvar));
INT2NUM          1163 ext/win32ole/win32ole.c             obj = INT2NUM((long)V_UI1(pvar));
INT2NUM          1168 ext/win32ole/win32ole.c             obj = INT2NUM((long)*V_I2REF(pvar));
INT2NUM          1170 ext/win32ole/win32ole.c             obj = INT2NUM((long)V_I2(pvar));
INT2NUM          1175 ext/win32ole/win32ole.c             obj = INT2NUM((long)*V_I4REF(pvar));
INT2NUM          1177 ext/win32ole/win32ole.c             obj = INT2NUM((long)V_I4(pvar));
INT2NUM          1208 ext/win32ole/win32ole.c             obj = INT2NUM(*V_ERRORREF(pvar));
INT2NUM          1210 ext/win32ole/win32ole.c             obj = INT2NUM(V_ERROR(pvar));
INT2NUM          1880 ext/win32ole/win32ole.c     return INT2NUM(reference_count(pole));
INT2NUM          1905 ext/win32ole/win32ole.c     return INT2NUM(n);
INT2NUM          3265 ext/win32ole/win32ole.c     major = INT2NUM(pTLibAttr->wMajorVerNum);
INT2NUM          3266 ext/win32ole/win32ole.c     minor = INT2NUM(pTLibAttr->wMinorVerNum);
INT2NUM          5701 ext/win32ole/win32ole.c     dispid = INT2NUM(pFuncDesc->memid);
INT2NUM          2523 ext/zlib/zlib.c     return INT2NUM(get_gzfile(obj)->lineno);
INT2NUM           231 file.c             return INT2NUM(get_stat(self)->st_dev);
INT2NUM          1680 io.c               return INT2NUM(fptr->lineno);
INT2NUM          3143 io.c               return INT2NUM(fd);
INT2NUM          4663 io.c               return INT2NUM(retval);
INT2NUM          4830 io.c               return INT2NUM(retval);
INT2NUM          4890 io.c               args[1] = INT2NUM(pipes[0]);
INT2NUM          4898 io.c               args[1] = INT2NUM(pipes[1]);
INT2NUM          5148 io.c           	    argv[0] = INT2NUM(len);
INT2NUM           471 marshal.c      	    v = rb_funcall(obj, s_dump, 1, INT2NUM(limit));
INT2NUM           383 math.c             return rb_assoc_new(rb_float_new(d), INT2NUM(exp));
INT2NUM          1522 pack.c         		rb_ary_push(ary, INT2NUM(tmp));
INT2NUM          9046 parse.y        	       rb_str_new2(fmt), INT2NUM(a));
INT2NUM          9250 parse.y            return INT2NUM(parser->parser_ruby_sourceline);
INT2NUM           348 process.c          return INT2NUM(status);
INT2NUM           369 process.c          return INT2NUM(status);
INT2NUM           408 process.c      	return INT2NUM(WSTOPSIG(status));
INT2NUM           448 process.c      	return INT2NUM(WTERMSIG(status));
INT2NUM           499 process.c      	return INT2NUM(WEXITSTATUS(status));
INT2NUM           643 process.c          rb_ary_push(ary, rb_assoc_new(INT2NUM(pid), rb_last_status));
INT2NUM           805 process.c      	rb_ary_push(result, rb_assoc_new(INT2NUM(pid), rb_last_status));
INT2NUM           816 process.c      	rb_ary_push(result, rb_assoc_new(INT2NUM(pid), rb_last_status));
INT2NUM          1620 process.c          return INT2NUM(pid);
INT2NUM          1745 process.c          return INT2NUM(i);
INT2NUM          2599 process.c      	rb_ary_push(ary, INT2NUM(groups[i]));
INT2NUM           495 range.c        		return INT2NUM(FIX2INT(e)-1);
INT2NUM           564 re.c               return INT2NUM(options);
INT2NUM           154 ruby.h         #define LONG2NUM(v) INT2NUM(v)
INT2NUM           171 ruby.h         # define OFFT2NUM(v) INT2NUM(v)
INT2NUM          3163 string.c           return INT2NUM(i);
INT2NUM          1711 time.c         	return INT2NUM(tobj->tm.tm_gmtoff);


INT_MAX_LIMIT

INT_MAX_LIMIT    1491 regparse.c           if ((INT_MAX_LIMIT - val) / 10UL < num)
INT_MAX_LIMIT    1519 regparse.c           if ((INT_MAX_LIMIT - val) / 16UL < num)
INT_MAX_LIMIT    1547 regparse.c           if ((INT_MAX_LIMIT - val) / 8UL < num)


INVALID_CODE_FE

INVALID_CODE_FE    88 utf8.c               return ((c == 0xfe) ? INVALID_CODE_FE : INVALID_CODE_FF);
INVALID_CODE_FE   109 utf8.c           else if (code == INVALID_CODE_FE) return 1;
INVALID_CODE_FE   179 utf8.c             else if (code == INVALID_CODE_FE) {


INVALID_CODE_FF

INVALID_CODE_FF    88 utf8.c               return ((c == 0xfe) ? INVALID_CODE_FE : INVALID_CODE_FF);
INVALID_CODE_FF   110 utf8.c           else if (code == INVALID_CODE_FF) return 1;
INVALID_CODE_FF   183 utf8.c             else if (code == INVALID_CODE_FF) {


INVALID_STACK_INDEX

INVALID_STACK_INDEX  520 regexec.c        mem_end_stk[mnum]   = INVALID_STACK_INDEX;\
INVALID_STACK_INDEX  777 regexec.c                    if (k->u.mem.end == INVALID_STACK_INDEX) {\
INVALID_STACK_INDEX  818 regexec.c                      if (k->u.mem.end == INVALID_STACK_INDEX) {\
INVALID_STACK_INDEX 1234 regexec.c          mem_start_stk[i] = mem_end_stk[i] = INVALID_STACK_INDEX;
INVALID_STACK_INDEX 1283 regexec.c      	      if (mem_end_stk[i] != INVALID_STACK_INDEX) {
INVALID_STACK_INDEX 1303 regexec.c      	      if (mem_end_stk[i] != INVALID_STACK_INDEX) {
INVALID_STACK_INDEX 2059 regexec.c      	if (mem_end_stk[mem]   == INVALID_STACK_INDEX) goto fail;
INVALID_STACK_INDEX 2060 regexec.c      	if (mem_start_stk[mem] == INVALID_STACK_INDEX) goto fail;
INVALID_STACK_INDEX 2091 regexec.c      	if (mem_end_stk[mem]   == INVALID_STACK_INDEX) goto fail;
INVALID_STACK_INDEX 2092 regexec.c      	if (mem_start_stk[mem] == INVALID_STACK_INDEX) goto fail;
INVALID_STACK_INDEX 2123 regexec.c      	  if (mem_end_stk[mem]   == INVALID_STACK_INDEX) continue;
INVALID_STACK_INDEX 2124 regexec.c      	  if (mem_start_stk[mem] == INVALID_STACK_INDEX) continue;
INVALID_STACK_INDEX 2162 regexec.c      	  if (mem_end_stk[mem]   == INVALID_STACK_INDEX) continue;
INVALID_STACK_INDEX 2163 regexec.c      	  if (mem_start_stk[mem] == INVALID_STACK_INDEX) continue;


IN_ALT

IN_ALT           3086 regcomp.c            r = setup_tree(NCONS(node).left, reg, (state | IN_ALT), env);
IN_ALT           3219 regcomp.c      	if ((state & (IN_ALT | IN_NOT | IN_VAR_REPEAT)) != 0) {


IN_CLASSA_NSHIFT

IN_CLASSA_NSHIFT  480 ext/socket/getaddrinfo.c 				v4a >>= IN_CLASSA_NSHIFT;
IN_CLASSA_NSHIFT  208 ext/socket/getnameinfo.c 		v4a >>= IN_CLASSA_NSHIFT;
IN_CLASSA_NSHIFT   52 ext/socket/sockport.h #ifndef IN_CLASSA_NSHIFT


IN_EXPERIMENTAL

IN_EXPERIMENTAL   478 ext/socket/getaddrinfo.c 				if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a))
IN_EXPERIMENTAL   206 ext/socket/getnameinfo.c 		if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a))
IN_EXPERIMENTAL    48 ext/socket/sockport.h #ifndef IN_EXPERIMENTAL


IN_LOOPBACKNET

IN_LOOPBACKNET    481 ext/socket/getaddrinfo.c 				if (v4a == 0 || v4a == IN_LOOPBACKNET)
IN_LOOPBACKNET     56 ext/socket/sockport.h #ifndef IN_LOOPBACKNET


IN_MULTICAST

IN_MULTICAST      478 ext/socket/getaddrinfo.c 				if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a))
IN_MULTICAST      206 ext/socket/getnameinfo.c 		if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a))
IN_MULTICAST       43 ext/socket/sockport.h #ifndef IN_MULTICAST


IN_NOT

IN_NOT           3219 regcomp.c      	if ((state & (IN_ALT | IN_NOT | IN_VAR_REPEAT)) != 0) {
IN_NOT           3254 regcomp.c      	r = setup_tree(an->target, reg, (state | IN_NOT), env);
IN_NOT           3292 regcomp.c      	  r = setup_tree(an->target, reg, (state | IN_NOT), env);


IN_REPEAT

IN_REPEAT        3130 regcomp.c            if ((state & IN_REPEAT) != 0) {
IN_REPEAT        3160 regcomp.c            state |= IN_REPEAT;


IN_VAR_REPEAT

IN_VAR_REPEAT    3162 regcomp.c      	state |= IN_VAR_REPEAT;
IN_VAR_REPEAT    3219 regcomp.c      	if ((state & (IN_ALT | IN_NOT | IN_VAR_REPEAT)) != 0) {


IOBUF_SIZE

IOBUF_SIZE        365 ext/nkf/nkf-utf8/nkf.c STATIC unsigned char   stdibuf[IOBUF_SIZE];
IOBUF_SIZE        366 ext/nkf/nkf-utf8/nkf.c STATIC unsigned char   stdobuf[IOBUF_SIZE];
IOBUF_SIZE        751 ext/nkf/nkf-utf8/nkf.c       setvbuffer(stdout, stdobuf, IOBUF_SIZE);
IOBUF_SIZE        760 ext/nkf/nkf-utf8/nkf.c       setvbuffer(stdin, stdibuf, IOBUF_SIZE);
IOBUF_SIZE        852 ext/nkf/nkf-utf8/nkf.c               setvbuffer(fin, stdibuf, IOBUF_SIZE);


IOCPARM_LEN

IOCPARM_LEN      4625 io.c           #ifndef IOCPARM_LEN
IOCPARM_LEN      4629 io.c           #ifdef IOCPARM_LEN
IOCPARM_LEN      4630 io.c           	    len = IOCPARM_LEN(cmd);	/* on BSDish systems we're safe */


IOINFO_L2E

IOINFO_L2E       1606 win32/win32.c  #define IOINFO_ARRAY_ELTS	(1 << IOINFO_L2E)
IOINFO_L2E       1607 win32/win32.c  #define _pioinfo(i)	(__pioinfo[i >> IOINFO_L2E] + (i & (IOINFO_ARRAY_ELTS - 1)))


ISALNUM

ISALNUM          4495 parse.y        #define is_identchar(c) (SIGN_EXTEND_CHAR(c)!=-1&&(ISALNUM(c) || (c) == '_' || ismbchar(c)))
ISALNUM          5924 parse.y        	else if ((ISALNUM(c) || c == '_') && lex_p < lex_pend && is_identchar(*lex_p)) {
ISALNUM          6490 parse.y        	    if (!ISALNUM(c)) {
ISALNUM          6497 parse.y        		if (ISALNUM(term) || ismbchar(uc)) {
ISALNUM          8436 parse.y        	if (name[0] != '_' && ISASCII(name[0]) && !ISALNUM(name[0])) {
ISALNUM           418 ruby.c         		else if (*p != '_' && !ISALNUM(*p)) {
ISALNUM          1301 string.c       	if (ISALNUM(*s)) {


ISALPHA

ISALPHA           965 dir.c          	    if (!FNM_SYSCASE && ISALPHA(c) && nocase)
ISALPHA          2257 file.c             if (ISALPHA(buf[0]) && buf[1] == ':') {
ISALPHA           613 pack.c         			if (ISALPHA(*ptr))
ISALPHA           644 pack.c         			if (ISALPHA(*ptr))
ISALPHA          4995 parse.y            while (c = nextc(), ISALPHA(c)) {
ISALPHA          8396 parse.y        	if (*m != '_' && !ISALPHA(*m) && !ismbchar(*m)) return Qfalse;
ISALPHA          1014 process.c      	if (*s != ' ' && !ISALPHA(*s) && strchr("*?{}[]<>()~&|\\$;'`\"\n",*s)) {
ISALPHA          1142 process.c      	if (*s != ' ' && !ISALPHA(*s) && strchr("*?{}[]<>()~&|\\$;'`\"\n",*s)) {
ISALPHA          1370 win32/win32.c  	(!ISALPHA(filename[0]) || filename[1] != ':' || filename[2] != '\0' ||


ISASCII

ISASCII           447 bignum.c       	else if (!ISASCII(c)) {
ISASCII          8436 parse.y        	if (name[0] != '_' && ISASCII(name[0]) && !ISALNUM(name[0])) {
ISASCII            67 ruby.h         #define ISPRINT(c) (ISASCII(c) && isprint((int)(unsigned char)(c)))
ISASCII            68 ruby.h         #define ISSPACE(c) (ISASCII(c) && isspace((int)(unsigned char)(c)))
ISASCII            69 ruby.h         #define ISUPPER(c) (ISASCII(c) && isupper((int)(unsigned char)(c)))
ISASCII            70 ruby.h         #define ISLOWER(c) (ISASCII(c) && islower((int)(unsigned char)(c)))
ISASCII            71 ruby.h         #define ISALNUM(c) (ISASCII(c) && isalnum((int)(unsigned char)(c)))
ISASCII            72 ruby.h         #define ISALPHA(c) (ISASCII(c) && isalpha((int)(unsigned char)(c)))
ISASCII            73 ruby.h         #define ISDIGIT(c) (ISASCII(c) && isdigit((int)(unsigned char)(c)))
ISASCII            74 ruby.h         #define ISXDIGIT(c) (ISASCII(c) && isxdigit((int)(unsigned char)(c)))


ISDIGIT

ISDIGIT           846 class.c            if (ISDIGIT(*p)) {
ISDIGIT           860 class.c            if (ISDIGIT(*p)) {
ISDIGIT           204 ext/bigdecimal/bigdecimal.c         if(!ISDIGIT(ch)) {
ISDIGIT          1073 ext/bigdecimal/bigdecimal.c                 if(!ISDIGIT(ch)) {
ISDIGIT          1946 ext/bigdecimal/bigdecimal.c         if(!ISDIGIT(v)) break;
ISDIGIT          1960 ext/bigdecimal/bigdecimal.c                 if(!ISDIGIT(v)) break;
ISDIGIT          1978 ext/bigdecimal/bigdecimal.c                 if(!ISDIGIT(v)) break;
ISDIGIT           233 ext/syck/rubyext.c         while ( !ISDIGIT( *ptr ) ) ptr++;
ISDIGIT           240 ext/syck/rubyext.c         while ( !ISDIGIT( *ptr ) ) ptr++;
ISDIGIT           247 ext/syck/rubyext.c         while ( !ISDIGIT( *ptr ) ) ptr++;
ISDIGIT           254 ext/syck/rubyext.c         while ( !ISDIGIT( *ptr ) ) ptr++;
ISDIGIT           261 ext/syck/rubyext.c         while ( !ISDIGIT( *ptr ) ) ptr++;
ISDIGIT           479 ext/syck/rubyext.c                 while ( !ISDIGIT( *ptr ) ) ptr++;
ISDIGIT           484 ext/syck/rubyext.c                 while ( !ISDIGIT( *ptr ) ) ptr++;
ISDIGIT           497 numeric.c          if (!ISDIGIT(e[-1])) { /* reformat if ended with decimal point (ex 111111111111111.) */
ISDIGIT           504 numeric.c          while (p[-1]=='0' && ISDIGIT(p[-2]))
ISDIGIT          2087 object.c       		    if (n == buf || !ISDIGIT(n[-1])) goto bad;
ISDIGIT          2089 object.c       		    if (!ISDIGIT(*p)) goto bad;
ISDIGIT           496 pack.c         	else if (ISDIGIT(*p)) {
ISDIGIT          1344 pack.c         	else if (ISDIGIT(*p)) {
ISDIGIT          6015 parse.y        	    if (ISDIGIT(c)) {
ISDIGIT          6058 parse.y        	    if (ISDIGIT(c)) {
ISDIGIT          6077 parse.y        	if (ISDIGIT(c)) {
ISDIGIT          6150 parse.y        		    if (ISDIGIT(c)) {
ISDIGIT          6157 parse.y        			    if (!ISDIGIT(c)) break;
ISDIGIT          6235 parse.y        			if (!ISDIGIT(c0)) {
ISDIGIT          6649 parse.y        	    } while (ISDIGIT(c));
ISDIGIT          6675 parse.y        	if (ISDIGIT(c)) {
ISDIGIT          8329 parse.y        	if (!ISDIGIT(*m)) return 0;
ISDIGIT          8330 parse.y        	do ++m; while (ISDIGIT(*m));
ISDIGIT          8470 parse.y            if (!ISDIGIT(*m)) {
ISDIGIT           118 sprintf.c          for (; p < end && ISDIGIT(*p); p++) { \
ISDIGIT           322 sprintf.c      	    for (; p < end && ISDIGIT(*p); p++) {
ISDIGIT           374 sprintf.c      	    for (; p < end && ISDIGIT(*p); p++) {
ISDIGIT           771 util.c         	if (!ISDIGIT(c)) {
ISDIGIT           851 util.c         	    while (ISDIGIT(*p)) {


ISEND

ISEND             251 dir.c          	    if (ISEND(UNESCAPE(p))) {
ISEND             255 dir.c          	    if (ISEND(s))
ISEND             262 dir.c          	    if (ISEND(s))
ISEND             270 dir.c          	    if (ISEND(s))
ISEND             283 dir.c          	if (ISEND(s))
ISEND             284 dir.c          	    RETURN(ISEND(p) ? 0 : FNM_NOMATCH);
ISEND             285 dir.c          	if (ISEND(p))


ISLOWER

ISLOWER          2525 string.c       	else if (ISLOWER(*s)) {
ISLOWER          2631 string.c           if (ISLOWER(*s)) {
ISLOWER          2694 string.c       	else if (ISLOWER(*s)) {


ISO8859_1

ISO8859_1        2015 ext/nkf/nkf-utf8/nkf.c                         c2 = ISO8859_1;
ISO8859_1        2055 ext/nkf/nkf-utf8/nkf.c                         c2 = ISO8859_1;
ISO8859_1        2790 ext/nkf/nkf-utf8/nkf.c     } else if (c2 == ISO8859_1) {
ISO8859_1        2791 ext/nkf/nkf-utf8/nkf.c 	output_mode = ISO8859_1;
ISO8859_1        2831 ext/nkf/nkf-utf8/nkf.c     } else if (c2 == ISO8859_1) {
ISO8859_1        2877 ext/nkf/nkf-utf8/nkf.c     } else if (c2 == ISO8859_1) {
ISO8859_1        2878 ext/nkf/nkf-utf8/nkf.c 	output_mode = ISO8859_1;
ISO8859_1        3000 ext/nkf/nkf-utf8/nkf.c     } else if (c2 == ISO8859_1) {
ISO8859_1        3001 ext/nkf/nkf-utf8/nkf.c 	output_mode = ISO8859_1;
ISO8859_1        3051 ext/nkf/nkf-utf8/nkf.c         if (output_mode !=ASCII && output_mode!=ISO8859_1) {
ISO8859_1        3078 ext/nkf/nkf-utf8/nkf.c     } else if (c2==ISO8859_1) {
ISO8859_1        3082 ext/nkf/nkf-utf8/nkf.c 	output_mode = ISO8859_1;
ISO8859_1        3085 ext/nkf/nkf-utf8/nkf.c         if (output_mode !=ASCII && output_mode!=ISO8859_1) {
ISO8859_1        3491 ext/nkf/nkf-utf8/nkf.c     if (c2==0 || c2==X0201 || c2==ISO8859_1) {
ISO8859_1        3590 ext/nkf/nkf-utf8/nkf.c     JAPANESE_EUC, SHIFT_JIS,ISO8859_1, ISO8859_1, X0208, X0201,
ISO8859_1        4580 ext/nkf/nkf-utf8/nkf.c         if (c <= DEL && (output_mode==ASCII ||output_mode == ISO8859_1 ) ) {
ISO8859_1        4599 ext/nkf/nkf-utf8/nkf.c         if (c <= DEL && (output_mode==ASCII ||output_mode == ISO8859_1)) {
ISO8859_1        4650 ext/nkf/nkf-utf8/nkf.c         if ( c<=DEL && (output_mode==ASCII ||output_mode == ISO8859_1 ) ) {


ISO_DATE_EXT

ISO_DATE_EXT       72 missing/strftime.c #if defined(ISO_DATE_EXT)
ISO_DATE_EXT      558 missing/strftime.c #ifdef ISO_DATE_EXT


ISPRINT

ISPRINT           270 re.c           	if (*p == '/' || (!ISPRINT(*p) && !ismbchar(*p))) {
ISPRINT           298 re.c           	    else if (ISPRINT(*p)) {
ISPRINT           728 ruby.c         		if (ISPRINT(*s)) {
ISPRINT            64 ruby.h         #ifndef ISPRINT
ISPRINT           288 sprintf.c      	    if (ISPRINT(*p))
ISPRINT          2358 string.c       	else if (ISPRINT(c)) {
ISPRINT          2435 string.c       	    if (ISPRINT(c)) {
ISPRINT          2461 string.c       	else if (ISPRINT(c)) {


ISSPACE

ISSPACE           318 bignum.c       	while (ISSPACE(*str)) str++;
ISSPACE           321 bignum.c       	while (ISSPACE(*str) || *str == '_') str++;
ISSPACE           415 bignum.c       	    while (*end && ISSPACE(*end)) end++;
ISSPACE           482 bignum.c       	while (*str && ISSPACE(*str)) str++;
ISSPACE          1072 ext/bigdecimal/bigdecimal.c                 if(ISSPACE(ch)) continue;
ISSPACE          1886 ext/bigdecimal/bigdecimal.c         while(ISSPACE(*szVal)) szVal++;
ISSPACE          1913 ext/bigdecimal/bigdecimal.c         if(ISSPACE(szVal[ipn])) {ipn++;continue;}
ISSPACE          3059 ext/bigdecimal/bigdecimal.c         if(ISSPACE(ch) || ch=='-' || ch=='+') continue;
ISSPACE          2061 object.c       	while (ISSPACE(*p)) p++;
ISSPACE          2064 object.c       	while (ISSPACE(*p) || *p == '_') p++;
ISSPACE          2107 object.c       	    while (*end && ISSPACE(*end)) end++;
ISSPACE           472 pack.c         	if (ISSPACE(type)) continue;
ISSPACE          1316 pack.c         	if (ISSPACE(type)) continue;
ISSPACE          5111 parse.y        		else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
ISSPACE          5127 parse.y        	else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
ISSPACE          5166 parse.y            if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
ISSPACE          5167 parse.y        	do {c = nextc();} while (ISSPACE(c));
ISSPACE          5311 parse.y        	while (*p && ISSPACE(*p)) p++;
ISSPACE          5511 parse.y        	    if (!ISSPACE(*str)) break;
ISSPACE          5518 parse.y        		if (ISSPACE(*str)) break;
ISSPACE          5523 parse.y        	for (end = str; len > 0 && ISSPACE(*str); str++, --len);
ISSPACE          5527 parse.y        	do str++; while (--len > 0 && ISSPACE(*str));
ISSPACE          5543 parse.y        	    for (vbeg = str; len > 0 && *str != '"' && !ISSPACE(*str); --len, str++);
ISSPACE          5546 parse.y        	while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
ISSPACE          5704 parse.y        	    if (IS_ARG() && space_seen && !ISSPACE(c)){
ISSPACE          5737 parse.y        	    if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) {
ISSPACE          5759 parse.y        			(lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) {
ISSPACE          5888 parse.y        	if (ISSPACE(c)){
ISSPACE          5952 parse.y        	if (IS_ARG() && space_seen && !ISSPACE(c)){
ISSPACE          6011 parse.y        	    (IS_ARG() && space_seen && !ISSPACE(c))) {
ISSPACE          6054 parse.y        	    (IS_ARG() && space_seen && !ISSPACE(c))) {
ISSPACE          6322 parse.y        	    lex_state == EXPR_ENDARG || ISSPACE(c)) {
ISSPACE          6353 parse.y        	    if (!ISSPACE(c)) {
ISSPACE          6524 parse.y        		do {c = nextc();} while (ISSPACE(c));
ISSPACE          6530 parse.y        		do {c = nextc();} while (ISSPACE(c));
ISSPACE          6557 parse.y        	if (IS_ARG() && space_seen && !ISSPACE(c)) {
ISSPACE           997 process.c          while (*str && ISSPACE(*str))
ISSPACE          1006 process.c      	if (ISSPACE(*s)) {
ISSPACE          1008 process.c      	    for (p = s; ISSPACE(*p); p++) {
ISSPACE           301 re.c           	    else if (!ISSPACE(*p)) {
ISSPACE           127 ruby.c         	    while (*newp && !ISSPACE(*newp) && *newp != ';') {
ISSPACE           130 ruby.c         	    while (*newp && (ISSPACE(*newp) || *newp == ';')) {
ISSPACE           456 ruby.c             while (*s && !ISSPACE(*s))
ISSPACE           463 ruby.c             while (*s && ISSPACE(*s))
ISSPACE           747 ruby.c         	while (ISSPACE(*s)) s++;
ISSPACE           763 ruby.c         		    if (ISSPACE(*s)) {
ISSPACE           764 ruby.c         			do {s++;} while (ISSPACE(*s));
ISSPACE           914 ruby.c         		    while (p < pend && ISSPACE(*p))
ISSPACE           917 ruby.c         		    while (p < pend && !ISSPACE(*p))
ISSPACE          3261 string.c       		if (ISSPACE(*ptr)) {
ISSPACE          3271 string.c       		if (ISSPACE(*ptr)) {
ISSPACE          3644 string.c           while (s < t && ISSPACE(*s)) s++;
ISSPACE          3702 string.c           while (s < t && ISSPACE(*(t-1))) t--;
ISSPACE           751 util.c             while (ISSPACE(*p)) {
ISSPACE           906 win32/win32.c  	while (ISSPACE(*cmd)) cmd++;
ISSPACE           908 win32/win32.c  	    if (ISSPACE(*prog)) {
ISSPACE           910 win32/win32.c  		do ++prog; while (ISSPACE(*prog));
ISSPACE           947 win32/win32.c  		if (ISSPACE(*prog) || strchr("<>|", *prog)) {
ISSPACE          1107 win32/win32.c      while (ISSPACE(*ptr))
ISSPACE          1128 win32/win32.c      while (ISSPACE(*cmd))


ISUPPER

ISUPPER            91 dir.c          #define downcase(c) (nocase && ISUPPER(c) ? tolower(c) : (c))
ISUPPER          2392 file.c         #define TOLOWER(c) (ISUPPER(c) ? tolower(c) : (c))
ISUPPER          6771 parse.y        		if (result == 0 && ISUPPER(tok()[0])) {
ISUPPER          8394 parse.y        	localid = !ISUPPER(*m);
ISUPPER          8462 parse.y        	else if (ISUPPER(name[0])) {
ISUPPER          2577 string.c       	else if (ISUPPER(*s)) {
ISUPPER          2639 string.c       	else if (ISUPPER(*s)) {
ISUPPER          2690 string.c       	else if (ISUPPER(*s)) {


ISXDIGIT

ISXDIGIT         6102 parse.y        		    if (ISXDIGIT(c)) {
ISXDIGIT         6109 parse.y        			    if (!ISXDIGIT(c)) break;


IS_ARG

IS_ARG           5704 parse.y        	    if (IS_ARG() && space_seen && !ISSPACE(c)){
IS_ARG           5801 parse.y        	    (!IS_ARG() || space_seen)) {
IS_ARG           5889 parse.y        	    if (!IS_ARG()){
IS_ARG           5952 parse.y        	if (IS_ARG() && space_seen && !ISSPACE(c)){
IS_ARG           6011 parse.y        	    (IS_ARG() && space_seen && !ISSPACE(c))) {
IS_ARG           6012 parse.y        	    if (IS_ARG()) arg_ambiguous();
IS_ARG           6054 parse.y        	    (IS_ARG() && space_seen && !ISSPACE(c))) {
IS_ARG           6055 parse.y        	    if (IS_ARG()) arg_ambiguous();
IS_ARG           6314 parse.y        		lex_state == EXPR_CLASS || (IS_ARG() && space_seen)) {
IS_ARG           6352 parse.y        	if (IS_ARG() && space_seen) {
IS_ARG           6445 parse.y        	else if (IS_ARG() && space_seen) {
IS_ARG           6460 parse.y        	if (IS_ARG() || lex_state == EXPR_END || lex_state == EXPR_END2)
IS_ARG           6557 parse.y        	if (IS_ARG() && space_seen && !ISSPACE(c)) {
IS_ARG           6825 parse.y        		IS_ARG()) {


IS_BACKREF_NAME_REF

IS_BACKREF_NAME_REF 1520 regcomp.c        if (! IS_BACKREF_NAME_REF(bn))
IS_BACKREF_NAME_REF 1591 regcomp.c          if (! IS_BACKREF_NAME_REF(&(NBACKREF(node))))


IS_BEG

IS_BEG           5708 parse.y        	    else if (IS_BEG()) {
IS_BEG           5956 parse.y        	else if (IS_BEG()) {
IS_BEG           6010 parse.y        	if (IS_BEG() ||
IS_BEG           6053 parse.y        	if (IS_BEG() ||
IS_BEG           6313 parse.y        	    if (IS_BEG() ||
IS_BEG           6342 parse.y        	if (IS_BEG()) {
IS_BEG           6410 parse.y        	if (IS_BEG()) {
IS_BEG           6442 parse.y        	else if (IS_BEG()) {
IS_BEG           6484 parse.y        	if (IS_BEG()) {
IS_BEG           6823 parse.y        	    if (IS_BEG() ||


IS_CALL_RECURSION

IS_CALL_RECURSION 1683 regcomp.c          if (IS_CALL_RECURSION(&NCALL(node))) {
IS_CALL_RECURSION 1763 regcomp.c          if (IS_CALL_RECURSION(&NCALL(node))) {
IS_CALL_RECURSION 1929 regcomp.c          if (! IS_CALL_RECURSION(&(NCALL(node))))
IS_CALL_RECURSION 2058 regcomp.c          if (! IS_CALL_RECURSION(&(NCALL(node))))
IS_CALL_RECURSION 4176 regcomp.c          if (IS_CALL_RECURSION(&(NCALL(node))))


IS_CCLASS_NOT

IS_CCLASS_NOT     589 regcomp.c          if (IS_CCLASS_NOT(cc))
IS_CCLASS_NOT     598 regcomp.c            if (IS_CCLASS_NOT(cc))
IS_CCLASS_NOT     606 regcomp.c            if (IS_CCLASS_NOT(cc))
IS_CCLASS_NOT    2140 regcomp.c        if (IS_CCLASS_NOT(cc))
IS_CCLASS_NOT    2206 regcomp.c      	  if (IS_NULL(xc->mbuf) && !IS_CCLASS_NOT(xc)) {
IS_CCLASS_NOT    2219 regcomp.c      	      if (!IS_CCLASS_NOT(xc)) {
IS_CCLASS_NOT    2244 regcomp.c      	    if ((v != 0 && !IS_CCLASS_NOT(xc)) ||
IS_CCLASS_NOT    2245 regcomp.c                      (v == 0 && IS_CCLASS_NOT(xc))) {
IS_CCLASS_NOT    2247 regcomp.c      	      if ((v != 0 && !IS_CCLASS_NOT(yc)) ||
IS_CCLASS_NOT    2248 regcomp.c                        (v == 0 && IS_CCLASS_NOT(yc)))
IS_CCLASS_NOT    2252 regcomp.c      	  if ((IS_NULL(xc->mbuf) && !IS_CCLASS_NOT(xc)) ||
IS_CCLASS_NOT    2253 regcomp.c      	      (IS_NULL(yc->mbuf) && !IS_CCLASS_NOT(yc)))
IS_CCLASS_NOT    4048 regcomp.c            if (IS_NOT_NULL(cc->mbuf) || IS_CCLASS_NOT(cc)) {
IS_CCLASS_NOT    4057 regcomp.c                if ((z && !IS_CCLASS_NOT(cc)) || (!z && IS_CCLASS_NOT(cc))) {
IS_CCLASS_NOT    5425 regcomp.c          if (IS_CCLASS_NOT(&NCCLASS(node))) fputs(" not", f);
IS_CCLASS_NOT    1181 regexec.c        if (IS_CCLASS_NOT(cc)) {
IS_CCLASS_NOT    1877 regparse.c       if (IS_CCLASS_NOT(cc)) {
IS_CCLASS_NOT    1902 regparse.c       not1 = IS_CCLASS_NOT(dest);
IS_CCLASS_NOT    1905 regparse.c       not2 = IS_CCLASS_NOT(cc);
IS_CCLASS_NOT    1960 regparse.c       not1 = IS_CCLASS_NOT(dest);
IS_CCLASS_NOT    1963 regparse.c       not2 = IS_CCLASS_NOT(cc);
IS_CCLASS_NOT    4204 regparse.c       if (IS_CCLASS_NOT(cc) &&
IS_CCLASS_NOT    4574 regparse.c                 if (IS_CCLASS_NOT(cc)) clear_not_flag_cclass(cc, enc);
IS_CCLASS_NOT    4915 regparse.c                 if ((in_cc != 0 && !IS_CCLASS_NOT(cc)) ||
IS_CCLASS_NOT    4916 regparse.c                     (in_cc == 0 && IS_CCLASS_NOT(cc))) {


IS_CCLASS_SHARE

IS_CCLASS_SHARE   552 regcomp.c        if (IS_CCLASS_SHARE(cc)) {
IS_CCLASS_SHARE   582 regcomp.c        if (IS_CCLASS_SHARE(cc)) {
IS_CCLASS_SHARE  1008 regparse.c           if (IS_CCLASS_SHARE(cc))


IS_DLEXT

IS_DLEXT         6712 eval.c         	if ((!rb || !ext) && (IS_SOEXT(e) || IS_DLEXT(e))) {
IS_DLEXT         6859 eval.c         	else if (IS_DLEXT(ext)) {


IS_DYNAMIC_OPTION

IS_DYNAMIC_OPTION  903 regcomp.c        if (IS_DYNAMIC_OPTION(prev ^ node->option)) {
IS_DYNAMIC_OPTION  917 regcomp.c        if (IS_DYNAMIC_OPTION(prev ^ node->option)) {
IS_DYNAMIC_OPTION  930 regcomp.c        if (IS_DYNAMIC_OPTION(prev ^ node->option)) {


IS_EFFECT_CALLED

IS_EFFECT_CALLED  956 regcomp.c          if (IS_EFFECT_CALLED(node)) {
IS_EFFECT_CALLED 1014 regcomp.c          if (IS_EFFECT_CALLED(node)) {
IS_EFFECT_CALLED 1044 regcomp.c          if (IS_EFFECT_CALLED(node)) {
IS_EFFECT_CALLED 2720 regcomp.c      	if (IS_EFFECT_CALLED(en)) {
IS_EFFECT_CALLED 2728 regcomp.c            if (IS_EFFECT_CALLED(en))


IS_EFFECT_MARK1

IS_EFFECT_MARK1  2542 regcomp.c          else if (IS_EFFECT_MARK1(&(NEFFECT(node))))
IS_EFFECT_MARK1  2654 regcomp.c          else if (IS_EFFECT_MARK1(&(NEFFECT(node))))


IS_EFFECT_MARK2

IS_EFFECT_MARK2  2540 regcomp.c          if (IS_EFFECT_MARK2(&(NEFFECT(node))))
IS_EFFECT_MARK2  2652 regcomp.c          if (IS_EFFECT_MARK2(&(NEFFECT(node))))


IS_EFFECT_MAX_FIXED

IS_EFFECT_MAX_FIXED 1958 regcomp.c      	if (IS_EFFECT_MAX_FIXED(en))
IS_EFFECT_MAX_FIXED 4264 regcomp.c      	  if (IS_EFFECT_MAX_FIXED(en)) max = en->max_len;


IS_EFFECT_MIN_FIXED

IS_EFFECT_MIN_FIXED 1765 regcomp.c            if (IS_EFFECT_MIN_FIXED(en))
IS_EFFECT_MIN_FIXED 1833 regcomp.c      	if (IS_EFFECT_MIN_FIXED(en))
IS_EFFECT_MIN_FIXED 4263 regcomp.c      	  if (IS_EFFECT_MIN_FIXED(en)) min = en->min_len;


IS_EFFECT_RECURSION

IS_EFFECT_RECURSION  960 regcomp.c      	len += (IS_EFFECT_RECURSION(node)
IS_EFFECT_RECURSION  963 regcomp.c      	len += (IS_EFFECT_RECURSION(node)
IS_EFFECT_RECURSION 1024 regcomp.c      	len += (IS_EFFECT_RECURSION(node)
IS_EFFECT_RECURSION 1027 regcomp.c      	len += (IS_EFFECT_RECURSION(node)
IS_EFFECT_RECURSION 1046 regcomp.c      	r = add_opcode(reg, (IS_EFFECT_RECURSION(node)
IS_EFFECT_RECURSION 1049 regcomp.c      	r = add_opcode(reg, (IS_EFFECT_RECURSION(node)
IS_EFFECT_RECURSION 2595 regcomp.c            if (IS_EFFECT_RECURSION(en)) {
IS_EFFECT_RECURSION 2719 regcomp.c            if (! IS_EFFECT_RECURSION(en)) {


IS_EFFECT_STOP_BT_SIMPLE_REPEAT

IS_EFFECT_STOP_BT_SIMPLE_REPEAT  980 regcomp.c          if (IS_EFFECT_STOP_BT_SIMPLE_REPEAT(node)) {
IS_EFFECT_STOP_BT_SIMPLE_REPEAT 1070 regcomp.c          if (IS_EFFECT_STOP_BT_SIMPLE_REPEAT(node)) {


IS_EMPTY_STR

IS_EMPTY_STR     1936 regexec.c      	if (IS_EMPTY_STR || !ONIGENC_IS_MBC_NEWLINE(encode, sprev, end)) {
IS_EMPTY_STR     1955 regexec.c      	if (IS_EMPTY_STR || !ONIGENC_IS_MBC_NEWLINE(encode, sprev, end)) {


IS_EVSTR

IS_EVSTR         2354 string.c       	else if (c == '"'|| c == '\\' || (c == '#' && IS_EVSTR(p, pend))) {
IS_EVSTR         2431 string.c       	    len += IS_EVSTR(p, pend) ? 2 : 1;
IS_EVSTR         2458 string.c       	    if (IS_EVSTR(p, pend)) *q++ = '\\';


IS_EXTEND

IS_EXTEND        3372 regparse.c           if (IS_EXTEND(env->option)) {
IS_EXTEND        3384 regparse.c           if (IS_EXTEND(env->option))


IS_FIND_CONDITION

IS_FIND_CONDITION 4802 regcomp.c        if (IS_FIND_CONDITION(reg->options))
IS_FIND_CONDITION 1352 regexec.c            if (IS_FIND_CONDITION(option)) {


IS_FIND_NOT_EMPTY

IS_FIND_NOT_EMPTY 1353 regexec.c      	if (IS_FIND_NOT_EMPTY(option) && s == sstart) {
IS_FIND_NOT_EMPTY 3461 regexec.c        if (IS_FIND_NOT_EMPTY(reg->options) && region


IS_IGNORECASE

IS_IGNORECASE    1272 regcomp.c      	r = ((!IS_IGNORECASE(reg->options) && br->back_static[0] <= 3)
IS_IGNORECASE    1389 regcomp.c      	if (IS_IGNORECASE(reg->options)) {
IS_IGNORECASE    1410 regcomp.c              if (IS_IGNORECASE(reg->options)) {
IS_IGNORECASE    2364 regcomp.c      	  !NSTRING_IS_RAW(node) && IS_IGNORECASE(reg->options)) {
IS_IGNORECASE    3094 regcomp.c          if (IS_IGNORECASE(reg->options) && !NSTRING_IS_RAW(node)) {
IS_IGNORECASE    4902 regparse.c           if (IS_IGNORECASE(env->option)) {
IS_IGNORECASE    4936 regparse.c           if (IS_IGNORECASE(env->option) &&


IS_MULTILINE

IS_MULTILINE      778 regcomp.c            if (IS_MULTILINE(reg->options))
IS_MULTILINE      786 regcomp.c            if (IS_MULTILINE(reg->options))
IS_MULTILINE     1376 regcomp.c          if (IS_MULTILINE(reg->options))
IS_MULTILINE      377 regint.h       #define IS_POSIXLINE(option)      (IS_SINGLELINE(option) && IS_MULTILINE(option))


IS_NEED_STR_LEN_OP_EXACT

IS_NEED_STR_LEN_OP_EXACT  399 regcomp.c        if (IS_NEED_STR_LEN_OP_EXACT(op))
IS_NEED_STR_LEN_OP_EXACT  416 regcomp.c        if (IS_NEED_STR_LEN_OP_EXACT(op)) {


IS_NODE_TYPE_SIMPLE

IS_NODE_TYPE_SIMPLE 2919 regcomp.c      	if (IS_NODE_TYPE_SIMPLE(ttype)) {
IS_NODE_TYPE_SIMPLE 3235 regcomp.c      	      if (IS_NODE_TYPE_SIMPLE(qtype))


IS_NOTEOL

IS_NOTEOL        1938 regexec.c      	  if (IS_NOTEOL(msa->options)) goto fail;
IS_NOTEOL        1957 regexec.c      	  if (IS_NOTEOL(msa->options)) goto fail;   /* Is it needed? */


IS_NOT_NULL

IS_NOT_NULL       156 regcomp.c        if (IS_NOT_NULL(uslist->us))
IS_NOT_NULL       702 regcomp.c            if (IS_NOT_NULL(qn->next_head_exact))
IS_NOT_NULL       724 regcomp.c            if (IS_NOT_NULL(qn->head_exact))
IS_NOT_NULL       726 regcomp.c            else if (IS_NOT_NULL(qn->next_head_exact))
IS_NOT_NULL       777 regcomp.c          if (IS_NOT_NULL(qn->next_head_exact)) {
IS_NOT_NULL       802 regcomp.c      	if (IS_NOT_NULL(qn->head_exact))
IS_NOT_NULL       804 regcomp.c      	else if (IS_NOT_NULL(qn->next_head_exact))
IS_NOT_NULL       820 regcomp.c            if (IS_NOT_NULL(qn->head_exact)) {
IS_NOT_NULL       830 regcomp.c            else if (IS_NOT_NULL(qn->next_head_exact)) {
IS_NOT_NULL      1234 regcomp.c          } while (IS_NOT_NULL(node = NCONS(node).right));
IS_NOT_NULL      1246 regcomp.c            } while (IS_NOT_NULL(node = NCONS(node).right));
IS_NOT_NULL      1317 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
IS_NOT_NULL      1329 regcomp.c            } while (IS_NOT_NULL(x = NCONS(x).right));
IS_NOT_NULL      1334 regcomp.c      	if (IS_NOT_NULL(NCONS(node).right)) {
IS_NOT_NULL      1340 regcomp.c      	if (IS_NOT_NULL(NCONS(node).right)) {
IS_NOT_NULL      1345 regcomp.c            } while (IS_NOT_NULL(node = NCONS(node).right));
IS_NOT_NULL      1470 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
IS_NOT_NULL      1551 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
IS_NOT_NULL      1581 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
IS_NOT_NULL      1677 regcomp.c            } while (v >= 0 && IS_NOT_NULL(node = NCONS(node).right));
IS_NOT_NULL      1777 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
IS_NOT_NULL      1790 regcomp.c            } while (r == 0 && IS_NOT_NULL(y = NCONS(y).right));
IS_NOT_NULL      1873 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
IS_NOT_NULL      1880 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
IS_NOT_NULL      2003 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
IS_NOT_NULL      2012 regcomp.c            while (r == 0 && IS_NOT_NULL(node = NCONS(node).right)) {
IS_NOT_NULL      2382 regcomp.c      	if (IS_NOT_NULL(qn->head_exact))
IS_NOT_NULL      2438 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
IS_NOT_NULL      2501 regcomp.c            } while (IS_NOT_NULL(x = NCONS(x).right));
IS_NOT_NULL      2513 regcomp.c            } while (IS_NOT_NULL(node = NCONS(node).right));
IS_NOT_NULL      2570 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
IS_NOT_NULL      2625 regcomp.c          } while (IS_NOT_NULL(node = NCONS(node).right));
IS_NOT_NULL      2689 regcomp.c            } while (IS_NOT_NULL(node = NCONS(node).right));
IS_NOT_NULL      2751 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
IS_NOT_NULL      2757 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
IS_NOT_NULL      2922 regcomp.c      	  if (IS_NOT_NULL(x)) {
IS_NOT_NULL      2924 regcomp.c      	    if (IS_NOT_NULL(y) && is_not_included(x, y, reg)) {
IS_NOT_NULL      3076 regcomp.c      	if (IS_NOT_NULL(prev) && r == 0) {
IS_NOT_NULL      3080 regcomp.c            } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
IS_NOT_NULL      3087 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
IS_NOT_NULL      3191 regcomp.c      	  if (IS_NOT_NULL(tqn->head_exact)) {
IS_NOT_NULL      3980 regcomp.c            } while (r == 0 && IS_NOT_NULL(nd = NCONS(nd).right));
IS_NOT_NULL      3995 regcomp.c            } while ((r == 0) && IS_NOT_NULL(nd = NCONS(nd).right));
IS_NOT_NULL      4048 regcomp.c            if (IS_NOT_NULL(cc->mbuf) || IS_CCLASS_NOT(cc)) {
IS_NOT_NULL      4441 regcomp.c        if (IS_NOT_NULL(reg->exact)) {
IS_NOT_NULL      4571 regcomp.c        if (IS_NOT_NULL(reg->p))                xfree(reg->p);
IS_NOT_NULL      4572 regcomp.c        if (IS_NOT_NULL(reg->exact))            xfree(reg->exact);
IS_NOT_NULL      4573 regcomp.c        if (IS_NOT_NULL(reg->int_map))          xfree(reg->int_map);
IS_NOT_NULL      4574 regcomp.c        if (IS_NOT_NULL(reg->int_map_backward)) xfree(reg->int_map_backward);
IS_NOT_NULL      4575 regcomp.c        if (IS_NOT_NULL(reg->repeat_range))     xfree(reg->repeat_range);
IS_NOT_NULL      4576 regcomp.c        if (IS_NOT_NULL(reg->chain))            onig_free(reg->chain);
IS_NOT_NULL      4586 regcomp.c        if (IS_NOT_NULL(reg)) {
IS_NOT_NULL      4608 regcomp.c        while (IS_NOT_NULL((reg)->chain)) {\
IS_NOT_NULL      4630 regcomp.c        if (IS_NOT_NULL(head)) {
IS_NOT_NULL      4632 regcomp.c          while (IS_NOT_NULL(head->chain)) {
IS_NOT_NULL      4652 regcomp.c          if (IS_NOT_NULL(from->chain) && ONIG_STATE(reg) == ONIG_STATE_NORMAL) {
IS_NOT_NULL      4815 regcomp.c        if (IS_NOT_NULL(scan_env.mem_nodes_dynamic)) {
IS_NOT_NULL      4865 regcomp.c        if (IS_NOT_NULL(scan_env.error)) {
IS_NOT_NULL      4866 regcomp.c          if (IS_NOT_NULL(einfo)) {
IS_NOT_NULL      4872 regcomp.c        if (IS_NOT_NULL(root)) onig_node_free(root);
IS_NOT_NULL      4873 regcomp.c        if (IS_NOT_NULL(scan_env.mem_nodes_dynamic))
IS_NOT_NULL      4947 regcomp.c        if (IS_NOT_NULL(einfo)) einfo->par = (UChar* )NULL;
IS_NOT_NULL      5402 regcomp.c          while (IS_NOT_NULL(node = NCONS(node).right)) {
IS_NOT_NULL        40 regexec.c        if (IS_NOT_NULL(node)) {
IS_NOT_NULL        42 regexec.c            if (IS_NOT_NULL(node->childs[i])) {
IS_NOT_NULL        66 regexec.c        if (IS_NOT_NULL(r->history_root)) {
IS_NOT_NULL       285 regexec.c        if (IS_NOT_NULL(from->history_root)) {
IS_NOT_NULL      2921 regexec.c          if (IS_NOT_NULL(reg->chain) && ONIG_STATE(reg) == ONIG_STATE_NORMAL) {
IS_NOT_NULL      3194 regexec.c          if (IS_NOT_NULL(reg->chain) && ONIG_STATE(reg) == ONIG_STATE_NORMAL) {
IS_NOT_NULL      3372 regexec.c      	    if (IS_NOT_NULL(prev)) {
IS_NOT_NULL        88 regparse.c       if (IS_NOT_NULL(bbuf)) {
IS_NOT_NULL        89 regparse.c         if (IS_NOT_NULL(bbuf->p)) xfree(bbuf->p);
IS_NOT_NULL       423 regparse.c       if (IS_NOT_NULL(t)) {
IS_NOT_NULL       436 regparse.c       if (IS_NOT_NULL(e->back_refs)) xfree(e->back_refs);
IS_NOT_NULL       447 regparse.c       if (IS_NOT_NULL(t)) {
IS_NOT_NULL       463 regparse.c       if (IS_NOT_NULL(t)) onig_st_free_table(t);
IS_NOT_NULL       475 regparse.c       if (IS_NOT_NULL(t)) {
IS_NOT_NULL       514 regparse.c       if (IS_NOT_NULL(t)) {
IS_NOT_NULL       546 regparse.c       if (IS_NOT_NULL(t)) {
IS_NOT_NULL       558 regparse.c       if (IS_NOT_NULL(t))
IS_NOT_NULL       583 regparse.c       if (IS_NOT_NULL(t) && t->num > 0) {
IS_NOT_NULL       615 regparse.c       if (IS_NOT_NULL(t)) {
IS_NOT_NULL       618 regparse.c           if (IS_NOT_NULL(e->name)) {
IS_NOT_NULL       624 regparse.c     	if (IS_NOT_NULL(e->back_refs)) xfree(e->back_refs);
IS_NOT_NULL       628 regparse.c         if (IS_NOT_NULL(t->e)) {
IS_NOT_NULL       647 regparse.c       if (IS_NOT_NULL(t)) xfree(t);
IS_NOT_NULL       659 regparse.c       if (IS_NOT_NULL(t)) {
IS_NOT_NULL       679 regparse.c       if (IS_NOT_NULL(t)) {
IS_NOT_NULL       696 regparse.c       if (IS_NOT_NULL(t))
IS_NOT_NULL       847 regparse.c         if (IS_NOT_NULL(region)) {
IS_NOT_NULL       974 regparse.c         if (IS_NOT_NULL(NSTRING(node).s) && NSTRING(node).s != NSTRING(node).buf) {
IS_NOT_NULL      1027 regparse.c         if (IS_NOT_NULL(NBACKREF(node).back_dynamic))
IS_NOT_NULL      1074 regparse.c       if (IS_NOT_NULL(FreeNodeList)) {
IS_NOT_NULL      1123 regparse.c       if (IS_NOT_NULL(sbr)) {
IS_NOT_NULL      1394 regparse.c           IS_NOT_NULL(NSTRING(node).s) && NSTRING(node).s != NSTRING(node).buf) {
IS_NOT_NULL      1823 regparse.c         if (not1 != 0 && IS_NOT_NULL(bbuf2)) /* not1 != 0 -> not2 == 0 */
IS_NOT_NULL      2051 regparse.c         } while (IS_NOT_NULL(node = NCONS(node).right));
IS_NOT_NULL      2058 regparse.c         } while (IS_NOT_NULL(node = NCONS(node).right));
IS_NOT_NULL      2556 regparse.c     	if (IS_NOT_NULL(next))
IS_NOT_NULL      3638 regparse.c       for (pb = PBS; IS_NOT_NULL(pb->name); pb++) {
IS_NOT_NULL      3696 regparse.c       for (pb = PBS; IS_NOT_NULL(pb->name); pb++) {
IS_NOT_NULL      4156 regparse.c     	if (IS_NOT_NULL(prev_cc)) {
IS_NOT_NULL      4193 regparse.c       if (IS_NOT_NULL(prev_cc)) {
IS_NOT_NULL      4481 regparse.c     	if (IS_NOT_NULL(n)) {
IS_NOT_NULL      4656 regparse.c       if (IS_NOT_NULL(node)) {
IS_NOT_NULL      4658 regparse.c         if (IS_NOT_NULL(cc->mbuf)) xfree(cc->mbuf);
IS_NOT_NULL      4667 regparse.c       if (IS_NOT_NULL(OnigTypeCClassTable)) {
IS_NOT_NULL      5077 regparse.c     	while (IS_NOT_NULL(NCONS(node).right)) node = NCONS(node).right;
IS_NOT_NULL        96 regparse.h       (IS_NOT_NULL((br)->back_dynamic) ? (br)->back_dynamic : (br)->back_static);
IS_NOT_NULL       249 regparse.h      (IS_NOT_NULL((senv)->mem_nodes_dynamic) ? \


IS_NULL

IS_NULL           130 regcomp.c        if (IS_NULL(buf->p)) return(ONIGERR_MEMORY);
IS_NULL           557 regcomp.c        if (IS_NULL(cc->mbuf)) {
IS_NULL           588 regcomp.c        if (IS_NULL(cc->mbuf)) {
IS_NULL          1524 regcomp.c        if (IS_NULL(bn->back_dynamic))
IS_NULL          2129 regcomp.c          if (IS_NULL(cc->mbuf)) {
IS_NULL          2206 regcomp.c      	  if (IS_NULL(xc->mbuf) && !IS_CCLASS_NOT(xc)) {
IS_NULL          2252 regcomp.c      	  if ((IS_NULL(xc->mbuf) && !IS_CCLASS_NOT(xc)) ||
IS_NULL          2253 regcomp.c      	      (IS_NULL(yc->mbuf) && !IS_CCLASS_NOT(yc)))
IS_NULL          2812 regcomp.c      	if (IS_NULL(cn->target)) {
IS_NULL          3321 regcomp.c          if (IS_NULL(*int_skip)) {
IS_NULL          3323 regcomp.c            if (IS_NULL(*int_skip)) return ONIGERR_MEMORY;
IS_NULL          4681 regcomp.c          if (IS_NULL(reg->p)) goto mem_error;
IS_NULL          4687 regcomp.c          if (IS_NULL(reg->exact)) goto mem_error;
IS_NULL          4695 regcomp.c          if (IS_NULL(reg->int_map)) goto mem_error;
IS_NULL          4702 regcomp.c          if (IS_NULL(reg->int_map_backward)) goto mem_error;
IS_NULL          4910 regcomp.c        if (IS_NULL(*reg)) return ONIGERR_MEMORY;
IS_NULL          5387 regcomp.c        if (IS_NULL(node)) {
IS_NULL            97 regexec.c          if (IS_NULL(parent->childs)) {
IS_NULL           133 regexec.c          if (IS_NULL(child)) {
IS_NULL           429 regexec.c        if (stk_base == stk_alloc && IS_NULL(msa->stack_p)) {
IS_NULL           431 regexec.c          if (IS_NULL(x)) {
IS_NULL           447 regexec.c          if (IS_NULL(x)) {
IS_NULL          1007 regexec.c          if (! IS_NULL(ta->msa->stack_p) && ta->stk_base != ta->msa->stack_p)
IS_NULL          1323 regexec.c                    if (IS_NULL(region->history_root)) {
IS_NULL          2487 regexec.c            if (IS_NULL(s)) goto fail;
IS_NULL          2497 regexec.c            if (IS_NULL(q)) {
IS_NULL          2750 regexec.c        if (IS_NULL(reg->int_map)) {
IS_NULL          2806 regexec.c        if (IS_NULL(reg->int_map)) {
IS_NULL          2837 regexec.c        if (IS_NULL(*skip)) {
IS_NULL          2839 regexec.c          if (IS_NULL(*skip)) return ONIGERR_MEMORY;
IS_NULL          3054 regexec.c      	  if (low_prev && IS_NULL(*low_prev))
IS_NULL          3111 regexec.c          if (IS_NULL(reg->int_map_backward)) {
IS_NULL          3146 regexec.c      	  if (IS_NULL(prev)) goto fail;
IS_NULL          3154 regexec.c      	  if (IS_NULL(p)) goto fail;
IS_NULL           228 regint.h       #define CHECK_NULL_RETURN(p)          if (IS_NULL(p)) return NULL
IS_NULL           229 regint.h       #define CHECK_NULL_RETURN_VAL(p,val)  if (IS_NULL(p)) return (val)
IS_NULL           435 regint.h         if (IS_NULL((buf)->p)) return(ONIGERR_MEMORY);\
IS_NULL           441 regint.h         if (IS_NULL((buf)->p)) return(ONIGERR_MEMORY);\
IS_NULL           449 regint.h           if (IS_NULL((buf)->p)) return(ONIGERR_MEMORY);\
IS_NULL           715 regparse.c       if (IS_NULL(e)) {
IS_NULL           717 regparse.c         if (IS_NULL(t)) {
IS_NULL           725 regparse.c         if (IS_NULL(e->name)) return ONIGERR_MEMORY;
IS_NULL           736 regparse.c         if (IS_NULL(t)) {
IS_NULL           745 regparse.c           if (IS_NULL(t->e)) {
IS_NULL           818 regparse.c       if (IS_NULL(e)) return ONIGERR_UNDEFINED_NAME_REFERENCE;
IS_NULL           923 regparse.c           if (IS_NULL(env->mem_nodes_dynamic)) {
IS_NULL           970 regparse.c       if (IS_NULL(node)) return ;
IS_NULL          1133 regparse.c       if (IS_NULL(mbr)) {
IS_NULL          1230 regparse.c     	IS_NULL(SCANENV_MEM_NODES(env)[backrefs[i]])) {
IS_NULL          1242 regparse.c         if (IS_NULL(p)) {
IS_NULL          1599 regparse.c       if (IS_NULL(*pbuf)) {
IS_NULL          1682 regparse.c       if (IS_NULL(bbuf)) {
IS_NULL          1726 regparse.c       if (IS_NULL(bbuf1) && IS_NULL(bbuf2)) {
IS_NULL          1733 regparse.c       if (IS_NULL(bbuf2))
IS_NULL          1736 regparse.c       if (IS_NULL(bbuf1)) {
IS_NULL          1822 regparse.c       if (IS_NULL(bbuf1)) {
IS_NULL          1827 regparse.c       else if (IS_NULL(bbuf2)) {
IS_NULL          3093 regparse.c     	  if (num > env->num_mem || IS_NULL(SCANENV_MEM_NODES(env)[num]))
IS_NULL          3151 regparse.c     		  IS_NULL(SCANENV_MEM_NODES(env)[backs[i]]))
IS_NULL          4208 regparse.c         is_empty = (IS_NULL(cc->mbuf) ? 1 : 0);
IS_NULL          4793 regparse.c           if (IS_NULL(qend)) {
IS_NULL          4838 regparse.c                 if (IS_NULL(OnigTypeCClassTable)) {
IS_NULL          4841 regparse.c                   if (IS_NULL(OnigTypeCClassTable)) {
IS_NULL          4855 regparse.c                 if (IS_NULL(*np)) {
IS_NULL          4946 regparse.c               if (IS_NULL(work)) {


IS_POSIX_REGION

IS_POSIX_REGION  1277 regexec.c      	  if (IS_POSIX_REGION(msa->options)) {
IS_POSIX_REGION  2941 regexec.c            && !IS_POSIX_REGION(option)
IS_POSIX_REGION  3218 regexec.c            && !IS_POSIX_REGION(option)
IS_POSIX_REGION  3463 regexec.c            && !IS_POSIX_REGION(option)


IS_PREP_STDIO

IS_PREP_STDIO    1989 io.c               if (IS_PREP_STDIO(fptr) ||
IS_PREP_STDIO    3285 io.c               if (IS_PREP_STDIO(fptr)) {
IS_PREP_STDIO    3317 io.c           	if (IS_PREP_STDIO(fptr)) {
IS_PREP_STDIO    3396 io.c           	if (IS_PREP_STDIO(fptr) &&


IS_REPEAT_INFINITE

IS_REPEAT_INFINITE  693 regcomp.c        int infinite = IS_REPEAT_INFINITE(qn->upper);
IS_REPEAT_INFINITE  757 regcomp.c        if (qn->greedy && IS_REPEAT_INFINITE(qn->upper) &&
IS_REPEAT_INFINITE  768 regcomp.c        int infinite = IS_REPEAT_INFINITE(qn->upper);
IS_REPEAT_INFINITE 1943 regcomp.c      	  if (! IS_REPEAT_INFINITE(qn->upper))
IS_REPEAT_INFINITE 2912 regcomp.c          if (qn->greedy && IS_REPEAT_INFINITE(qn->upper)) {
IS_REPEAT_INFINITE 3134 regcomp.c            if (IS_REPEAT_INFINITE(qn->upper) || qn->upper >= 1) {
IS_REPEAT_INFINITE 3169 regcomp.c      	if (!IS_REPEAT_INFINITE(qn->lower) && qn->lower == qn->upper &&
IS_REPEAT_INFINITE 3232 regcomp.c      	    if (IS_REPEAT_INFINITE(tqn->upper) && tqn->lower <= 1 &&
IS_REPEAT_INFINITE 4197 regcomp.c            if (qn->lower == 0 && IS_REPEAT_INFINITE(qn->upper)) {
IS_REPEAT_INFINITE 4231 regcomp.c            if (IS_REPEAT_INFINITE(qn->upper))
IS_REPEAT_INFINITE 2417 regexec.c      	  IS_REPEAT_INFINITE(reg->repeat_range[mem].upper)) {
IS_REPEAT_INFINITE 2074 regparse.c           else if (IS_REPEAT_INFINITE(qf->upper)) return 1;
IS_REPEAT_INFINITE 2077 regparse.c           if (IS_REPEAT_INFINITE(qf->upper)) return 2;
IS_REPEAT_INFINITE 2083 regparse.c           else if (IS_REPEAT_INFINITE(qf->upper)) return 4;
IS_REPEAT_INFINITE 2086 regparse.c           if (IS_REPEAT_INFINITE(qf->upper)) return 5;
IS_REPEAT_INFINITE 2297 regparse.c       if (!IS_REPEAT_INFINITE(up) && low > up) {


IS_SINGLELINE

IS_SINGLELINE     377 regint.h       #define IS_POSIXLINE(option)      (IS_SINGLELINE(option) && IS_MULTILINE(option))
IS_SINGLELINE    3350 regparse.c           tok->u.subtype = (IS_SINGLELINE(env->option)
IS_SINGLELINE    3357 regparse.c           tok->u.subtype = (IS_SINGLELINE(env->option)


IS_SOEXT

IS_SOEXT         6712 eval.c         	if ((!rb || !ext) && (IS_SOEXT(e) || IS_DLEXT(e))) {
IS_SOEXT         6835 eval.c         	else if (IS_SOEXT(ext)) {


IS_SYNTAX_BV

IS_SYNTAX_BV     2790 regcomp.c      	    IS_SYNTAX_BV(env->syntax, ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP) &&
IS_SYNTAX_BV     2894 regcomp.c          if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND))
IS_SYNTAX_BV     4763 regcomp.c            IS_SYNTAX_BV(scan_env.syntax, ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP) &&
IS_SYNTAX_BV      778 regparse.c           ! IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME)) {
IS_SYNTAX_BV     1666 regparse.c         if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC))
IS_SYNTAX_BV     2234 regparse.c       syn_allow = IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_INVALID_INTERVAL);
IS_SYNTAX_BV     2256 regparse.c         if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV)) {
IS_SYNTAX_BV     2513 regparse.c       if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_WARN_CC_OP_NOT_ESCAPED) &&
IS_SYNTAX_BV     2514 regparse.c           IS_SYNTAX_BV(env->syntax, ONIG_SYN_BACKSLASH_ESCAPE_IN_CC)) {
IS_SYNTAX_BV     2528 regparse.c       if (IS_SYNTAX_BV((env)->syntax, ONIG_SYN_WARN_CC_OP_NOT_ESCAPED)) {
IS_SYNTAX_BV     2633 regparse.c         if (! IS_SYNTAX_BV(syn, ONIG_SYN_BACKSLASH_ESCAPE_IN_CC))
IS_SYNTAX_BV     2897 regparse.c     	if (IS_SYNTAX_BV(syn, ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY))
IS_SYNTAX_BV     3092 regparse.c     	if (IS_SYNTAX_BV(syn, ONIG_SYN_STRICT_CHECK_BACKREF)) {
IS_SYNTAX_BV     3147 regparse.c     	  if (IS_SYNTAX_BV(syn, ONIG_SYN_STRICT_CHECK_BACKREF)) {
IS_SYNTAX_BV     3304 regparse.c     	if (IS_SYNTAX_BV(syn, ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY))
IS_SYNTAX_BV     3833 regparse.c     	  if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC))
IS_SYNTAX_BV     3850 regparse.c     	  if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC))
IS_SYNTAX_BV     4120 regparse.c     	if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC)) {
IS_SYNTAX_BV     4205 regparse.c           IS_SYNTAX_BV(env->syntax, ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC)) {
IS_SYNTAX_BV     4496 regparse.c     	  IS_SYNTAX_BV(env->syntax, ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT)) {
IS_SYNTAX_BV     4717 regparse.c         if (! IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP))
IS_SYNTAX_BV     4992 regparse.c         if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS)) {
IS_SYNTAX_BV     4993 regparse.c           if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS))


IS_SYNTAX_OP

IS_SYNTAX_OP     2014 regparse.c       if (IS_SYNTAX_OP(env->syntax, ONIG_SYN_OP_ESC_CONTROL_CHARS)) {
IS_SYNTAX_OP     2291 regparse.c       if (IS_SYNTAX_OP(env->syntax, ONIG_SYN_OP_ESC_BRACE_INTERVAL)) {
IS_SYNTAX_OP     2357 regparse.c         if (IS_SYNTAX_OP(env->syntax, ONIG_SYN_OP_ESC_C_CONTROL)) {
IS_SYNTAX_OP     2701 regparse.c           if (PPEEK_IS('{') && IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_BRACE_HEX8)) {
IS_SYNTAX_OP     2722 regparse.c           else if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_HEX2)) {
IS_SYNTAX_OP     2752 regparse.c           if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_OCTAL3)) {
IS_SYNTAX_OP     2778 regparse.c         if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_POSIX_BRACKET) && (PPEEK_IS(':'))) {
IS_SYNTAX_OP     2846 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_ASTERISK_ZERO_INF)) break;
IS_SYNTAX_OP     2854 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_PLUS_ONE_INF)) break;
IS_SYNTAX_OP     2862 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_QMARK_ZERO_ONE)) break;
IS_SYNTAX_OP     2868 regparse.c     	  IS_SYNTAX_OP(syn, ONIG_SYN_OP_QMARK_NON_GREEDY)) {
IS_SYNTAX_OP     2892 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_BRACE_INTERVAL)) break;
IS_SYNTAX_OP     2906 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_VBAR_ALT)) break;
IS_SYNTAX_OP     2911 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_LPAREN_SUBEXP)) break;
IS_SYNTAX_OP     2916 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_LPAREN_SUBEXP)) break;
IS_SYNTAX_OP     2921 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_W_WORD)) break;
IS_SYNTAX_OP     2927 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_W_WORD)) break;
IS_SYNTAX_OP     2933 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_B_WORD_BOUND)) break;
IS_SYNTAX_OP     2939 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_B_WORD_BOUND)) break;
IS_SYNTAX_OP     2946 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END)) break;
IS_SYNTAX_OP     2952 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END)) break;
IS_SYNTAX_OP     2959 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_S_WHITE_SPACE)) break;
IS_SYNTAX_OP     2965 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_S_WHITE_SPACE)) break;
IS_SYNTAX_OP     2971 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_D_DIGIT)) break;
IS_SYNTAX_OP     2977 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_D_DIGIT)) break;
IS_SYNTAX_OP     2995 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR)) break;
IS_SYNTAX_OP     3002 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR)) break;
IS_SYNTAX_OP     3008 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR)) break;
IS_SYNTAX_OP     3015 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR)) break;
IS_SYNTAX_OP     3034 regparse.c           if (PPEEK_IS('{') && IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_BRACE_HEX8)) {
IS_SYNTAX_OP     3053 regparse.c           else if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_HEX2)) {
IS_SYNTAX_OP     3090 regparse.c           if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_DECIMAL_BACKREF) &&
IS_SYNTAX_OP     3114 regparse.c           if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_OCTAL3)) {
IS_SYNTAX_OP     3240 regparse.c     	IS_SYNTAX_OP(syn, ONIG_SYN_OP_VARIABLE_META_CHARACTERS)) {
IS_SYNTAX_OP     3258 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_DOT_ANYCHAR)) break;
IS_SYNTAX_OP     3266 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ASTERISK_ZERO_INF)) break;
IS_SYNTAX_OP     3277 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_PLUS_ONE_INF)) break;
IS_SYNTAX_OP     3288 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_QMARK_ZERO_ONE)) break;
IS_SYNTAX_OP     3299 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_BRACE_INTERVAL)) break;
IS_SYNTAX_OP     3313 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_VBAR_ALT)) break;
IS_SYNTAX_OP     3338 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_LPAREN_SUBEXP)) break;
IS_SYNTAX_OP     3343 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_LPAREN_SUBEXP)) break;
IS_SYNTAX_OP     3348 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_LINE_ANCHOR)) break;
IS_SYNTAX_OP     3355 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_LINE_ANCHOR)) break;
IS_SYNTAX_OP     3362 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_BRACKET_CC)) break;


IS_SYNTAX_OP2

IS_SYNTAX_OP2    2024 regparse.c           if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ESC_V_VTAB))
IS_SYNTAX_OP2    2329 regparse.c         if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META)) {
IS_SYNTAX_OP2    2347 regparse.c         if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL)) {
IS_SYNTAX_OP2    2667 regparse.c           if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break;
IS_SYNTAX_OP2    2672 regparse.c           if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break;
IS_SYNTAX_OP2    2681 regparse.c     	  IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY)) {
IS_SYNTAX_OP2    2686 regparse.c     	if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT)) {
IS_SYNTAX_OP2    2738 regparse.c           if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_U_HEX4)) {
IS_SYNTAX_OP2    2793 regparse.c           if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_CCLASS_SET_OP)) {
IS_SYNTAX_OP2    2802 regparse.c         if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_CCLASS_SET_OP) &&
IS_SYNTAX_OP2    2876 regparse.c     	    ((IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT) &&
IS_SYNTAX_OP2    2878 regparse.c     	     (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL) &&
IS_SYNTAX_OP2    2983 regparse.c           if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break;
IS_SYNTAX_OP2    2989 regparse.c           if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break;
IS_SYNTAX_OP2    3021 regparse.c           if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR)) break;
IS_SYNTAX_OP2    3026 regparse.c           if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR)) break;
IS_SYNTAX_OP2    3069 regparse.c           if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_U_HEX4)) {
IS_SYNTAX_OP2    3132 regparse.c           if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_K_NAMED_BACKREF)) {
IS_SYNTAX_OP2    3175 regparse.c           if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_G_SUBEXP_CALL)) {
IS_SYNTAX_OP2    3195 regparse.c           if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE)) {
IS_SYNTAX_OP2    3203 regparse.c     	  IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY)) {
IS_SYNTAX_OP2    3208 regparse.c     	if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT)) {
IS_SYNTAX_OP2    3319 regparse.c               IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_QMARK_GROUP_EFFECT)) {
IS_SYNTAX_OP2    3716 regparse.c           IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_CHAR_PROPERTY_PREFIX_IS)) {
IS_SYNTAX_OP2    4254 regparse.c           IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_GROUP_EFFECT)) {
IS_SYNTAX_OP2    4287 regparse.c           else if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP)) {
IS_SYNTAX_OP2    4319 regparse.c           if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY)) {
IS_SYNTAX_OP2    4321 regparse.c     	if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP)) {
IS_SYNTAX_OP2    4366 regparse.c     	    if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_PERL)) {
IS_SYNTAX_OP2    4374 regparse.c     	    if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_PERL)) {
IS_SYNTAX_OP2    4377 regparse.c     	    else if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_RUBY)) {


IS_TO_VOID_TARGET

IS_TO_VOID_TARGET  701 regexec.c          if (IS_TO_VOID_TARGET(k)) {\
IS_TO_VOID_TARGET  716 regexec.c          if (IS_TO_VOID_TARGET(k)) {\


ITER_CUR

ITER_CUR         2984 eval.c         	ruby_iter->iter = ruby_frame->iter = ITER_CUR;
ITER_CUR         3005 eval.c         		    ruby_iter->iter = ruby_frame->iter = ITER_CUR;
ITER_CUR         4518 eval.c             if (ruby_frame->iter == ITER_CUR && ruby_block)
ITER_CUR         4554 eval.c             if (ruby_frame->prev && ruby_frame->prev->iter == ITER_CUR && ruby_block)
ITER_CUR         4812 eval.c         		ruby_frame->iter = ITER_CUR;
ITER_CUR         5590 eval.c         	itr = ITER_CUR;
ITER_CUR         5592 eval.c               case ITER_CUR:
ITER_CUR         7517 eval.c             ruby_frame->iter = ITER_CUR;
ITER_CUR         8243 eval.c             PUSH_ITER(ITER_CUR);
ITER_CUR         8244 eval.c             ruby_frame->iter = ITER_CUR;
ITER_CUR         9186 eval.c             PUSH_ITER(ITER_CUR);
ITER_CUR         11844 eval.c             ruby_frame->iter = ITER_CUR;


ITER_NOT

ITER_NOT         1477 eval.c             PUSH_ITER(ITER_NOT);
ITER_NOT         1511 eval.c             PUSH_ITER(ITER_NOT);
ITER_NOT         1719 eval.c         	PUSH_ITER(ITER_NOT);
ITER_NOT         2153 eval.c         	tmp_iter = ITER_NOT;\
ITER_NOT         5594 eval.c         	itr = ITER_NOT;
ITER_NOT         5839 eval.c             PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
ITER_NOT         5947 eval.c             PUSH_ITER(ruby_iter->iter ? ITER_PRE : ITER_NOT);
ITER_NOT         6574 eval.c             PUSH_ITER(ITER_NOT);
ITER_NOT         7274 eval.c             PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
ITER_NOT         7500 eval.c             PUSH_ITER(ITER_NOT);
ITER_NOT         8533 eval.c         	PUSH_ITER(ITER_NOT);
ITER_NOT         8568 eval.c             if (ruby_frame->iter == ITER_NOT)
ITER_NOT         8899 eval.c             PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
ITER_NOT         9847 eval.c             PUSH_ITER(ITER_NOT);


ITER_PAS

ITER_PAS         2152 eval.c               case ITER_PAS:\
ITER_PAS         5589 eval.c               case ITER_PAS:
ITER_PAS         8553 eval.c         	PUSH_ITER(ITER_PAS);


ITER_PRE

ITER_PRE         2150 eval.c               case ITER_PRE:\
ITER_PRE         2983 eval.c         	PUSH_ITER(ITER_PRE);
ITER_PRE         3000 eval.c         		PUSH_ITER(ITER_PRE);
ITER_PRE         4811 eval.c         		PUSH_ITER(ITER_PRE);
ITER_PRE         5110 eval.c             PUSH_ITER(ITER_PRE);
ITER_PRE         5588 eval.c               case ITER_PRE:
ITER_PRE         5839 eval.c             PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
ITER_PRE         5947 eval.c             PUSH_ITER(ruby_iter->iter ? ITER_PRE : ITER_NOT);
ITER_PRE         7274 eval.c             PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
ITER_PRE         8567 eval.c             PUSH_ITER(ITER_PRE);
ITER_PRE         8569 eval.c         	ruby_frame->iter = ITER_PRE;
ITER_PRE         8899 eval.c             PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);


Inc

Inc               265 dir.c          	    Inc(s);
Inc               274 dir.c          		Inc(s);
Inc               289 dir.c          	Inc(p);
Inc               290 dir.c          	Inc(s);
Inc               296 dir.c          	    Inc(stmp); /* !ISEND(*stmp) */
Inc               324 dir.c          		while (*s && *s != '/') Inc(s);
Inc               335 dir.c          		while (*stmp && *stmp != '/') Inc(stmp);
Inc              1026 dir.c          	Inc(p);
Inc              1401 dir.c          	Inc(p);
Inc              1420 dir.c          		Inc(p);


Init_Array

Init_Array         15 inits.c        void Init_Array(void);
Init_Array         66 inits.c            Init_Array();


Init_Bignum

Init_Bignum        16 inits.c        void Init_Bignum(void);
Init_Bignum        64 inits.c            Init_Bignum();


Init_Binding

Init_Binding       17 inits.c        void Init_Binding(void);
Init_Binding       80 inits.c            Init_Binding();


Init_Comparable

Init_Comparable    18 inits.c        void Init_Comparable(void);
Init_Comparable    56 inits.c            Init_Comparable();


Init_Dir

Init_Dir           19 inits.c        void Init_Dir(void);
Init_Dir           73 inits.c            Init_Dir();


Init_Enumerable

Init_Enumerable    20 inits.c        void Init_Enumerable(void);
Init_Enumerable    57 inits.c            Init_Enumerable();


Init_Enumerator

Init_Enumerator    21 inits.c        void Init_Enumerator(void);
Init_Enumerator    84 inits.c            Init_Enumerator();


Init_Exception

Init_Exception     22 inits.c        void Init_Exception(void);
Init_Exception     61 inits.c            Init_Exception();


Init_File

Init_File          28 inits.c        void Init_File(void);
Init_File          81 io.c           extern void Init_File(void);
Init_File        5631 io.c               Init_File();


Init_GC

Init_GC            29 inits.c        void Init_GC(void);
Init_GC            82 inits.c            Init_GC();


Init_Hash

Init_Hash          30 inits.c        void Init_Hash(void);
Init_Hash          67 inits.c            Init_Hash();


Init_IO

Init_IO            31 inits.c        void Init_IO(void);
Init_IO            72 inits.c            Init_IO();


Init_Math

Init_Math          32 inits.c        void Init_Math(void);
Init_Math          81 inits.c            Init_Math();


Init_Numeric

Init_Numeric       34 inits.c        void Init_Numeric(void);
Init_Numeric       63 inits.c            Init_Numeric();


Init_Object

Init_Object        35 inits.c        void Init_Object(void);
Init_Object        55 inits.c            Init_Object();


Init_Precision

Init_Precision     37 inits.c        void Init_Precision(void);
Init_Precision     58 inits.c            Init_Precision();


Init_Proc

Init_Proc          26 inits.c        void Init_Proc(void);
Init_Proc          79 inits.c            Init_Proc();


Init_Random

Init_Random        40 inits.c        void Init_Random(void);
Init_Random        75 inits.c            Init_Random();


Init_Range

Init_Range         41 inits.c        void Init_Range(void);
Init_Range         71 inits.c            Init_Range();


Init_Regexp

Init_Regexp        42 inits.c        void Init_Regexp(void);
Init_Regexp        69 inits.c            Init_Regexp();


Init_String

Init_String        44 inits.c        void Init_String(void);
Init_String        60 inits.c            Init_String();


Init_Struct

Init_Struct        45 inits.c        void Init_Struct(void);
Init_Struct        68 inits.c            Init_Struct();


Init_Thread

Init_Thread        27 inits.c        void Init_Thread(void);
Init_Thread        62 inits.c            Init_Thread();


Init_Time

Init_Time          46 inits.c        void Init_Time(void);
Init_Time          74 inits.c            Init_Time();


Init_dlcfunc

Init_dlcfunc       83 ext/dl/dl.c        void Init_dlcfunc();
Init_dlcfunc      149 ext/dl/dl.c        Init_dlcfunc();


Init_dlhandle

Init_dlhandle      82 ext/dl/dl.c        void Init_dlhandle();
Init_dlhandle     148 ext/dl/dl.c        Init_dlhandle();


Init_dlptr

Init_dlptr         84 ext/dl/dl.c        void Init_dlptr();
Init_dlptr        150 ext/dl/dl.c        Init_dlptr();


Init_eval

Init_eval          24 inits.c        void Init_eval(void);
Init_eval          59 inits.c            Init_eval();


Init_ext

Init_ext         1248 eval.c         void Init_ext(void);
Init_ext          351 ruby.c         extern void Init_ext(void);
Init_ext          365 ruby.c             Init_ext();		/* should be called here for some reason :-( */


Init_heap

Init_heap        1247 eval.c         void Init_heap(void);
Init_heap        1295 eval.c             Init_heap();


Init_load

Init_load          25 inits.c        void Init_load(void);
Init_load          78 inits.c            Init_load();


Init_marshal

Init_marshal       33 inits.c        void Init_marshal(void);
Init_marshal       83 inits.c            Init_marshal();


Init_ossl_bn

Init_ossl_bn      449 ext/openssl/ossl.c     Init_ossl_bn();
Init_ossl_bn       19 ext/openssl/ossl_bn.h void Init_ossl_bn(void);


Init_ossl_config

Init_ossl_config  451 ext/openssl/ossl.c     Init_ossl_config();
Init_ossl_config   19 ext/openssl/ossl_config.h void Init_ossl_config(void);


Init_ossl_dh

Init_ossl_dh      230 ext/openssl/ossl_pkey.c     Init_ossl_dh();
Init_ossl_dh       78 ext/openssl/ossl_pkey.h void Init_ossl_dh(void);


Init_ossl_digest

Init_ossl_digest  452 ext/openssl/ossl.c     Init_ossl_digest();
Init_ossl_digest   20 ext/openssl/ossl_digest.h void Init_ossl_digest(void);


Init_ossl_dsa

Init_ossl_dsa     229 ext/openssl/ossl_pkey.c     Init_ossl_dsa();
Init_ossl_dsa      67 ext/openssl/ossl_pkey.h void Init_ossl_dsa(void);


Init_ossl_engine

Init_ossl_engine  462 ext/openssl/ossl.c     Init_ossl_engine();
Init_ossl_engine   18 ext/openssl/ossl_engine.h void Init_ossl_engine(void);


Init_ossl_hmac

Init_ossl_hmac    453 ext/openssl/ossl.c     Init_ossl_hmac();
Init_ossl_hmac     17 ext/openssl/ossl_hmac.h void Init_ossl_hmac(void);


Init_ossl_ns_spki

Init_ossl_ns_spki  454 ext/openssl/ossl.c     Init_ossl_ns_spki();
Init_ossl_ns_spki   18 ext/openssl/ossl_ns_spki.h void Init_ossl_ns_spki(void);


Init_ossl_ocsp

Init_ossl_ocsp    461 ext/openssl/ossl.c     Init_ossl_ocsp();
Init_ossl_ocsp     22 ext/openssl/ossl_ocsp.h void Init_ossl_ocsp(void);


Init_ossl_pkcs12

Init_ossl_pkcs12  455 ext/openssl/ossl.c     Init_ossl_pkcs12();
Init_ossl_pkcs12   13 ext/openssl/ossl_pkcs12.h void Init_ossl_pkcs12(void);


Init_ossl_pkcs7

Init_ossl_pkcs7   456 ext/openssl/ossl.c     Init_ossl_pkcs7();
Init_ossl_pkcs7    20 ext/openssl/ossl_pkcs7.h void Init_ossl_pkcs7(void);


Init_ossl_pkey

Init_ossl_pkey    457 ext/openssl/ossl.c     Init_ossl_pkey();
Init_ossl_pkey     49 ext/openssl/ossl_pkey.h void Init_ossl_pkey(void);


Init_ossl_rand

Init_ossl_rand    458 ext/openssl/ossl.c     Init_ossl_rand();
Init_ossl_rand     17 ext/openssl/ossl_rand.h void Init_ossl_rand(void);


Init_ossl_rsa

Init_ossl_rsa     228 ext/openssl/ossl_pkey.c     Init_ossl_rsa();
Init_ossl_rsa      58 ext/openssl/ossl_pkey.h void Init_ossl_rsa(void);


Init_ossl_ssl

Init_ossl_ssl     459 ext/openssl/ossl.c     Init_ossl_ssl();
Init_ossl_ssl      19 ext/openssl/ossl_ssl.h void Init_ossl_ssl(void);


Init_ossl_x509

Init_ossl_x509    460 ext/openssl/ossl.c     Init_ossl_x509();
Init_ossl_x509     19 ext/openssl/ossl_x509.h void Init_ossl_x509(void);


Init_ossl_x509attr

Init_ossl_x509attr   24 ext/openssl/ossl_x509.c     Init_ossl_x509attr();
Init_ossl_x509attr   29 ext/openssl/ossl_x509.h void Init_ossl_x509attr(void);


Init_ossl_x509cert

Init_ossl_x509cert   25 ext/openssl/ossl_x509.c     Init_ossl_x509cert();
Init_ossl_x509cert   41 ext/openssl/ossl_x509.h void Init_ossl_x509cert(void);


Init_ossl_x509crl

Init_ossl_x509crl   26 ext/openssl/ossl_x509.c     Init_ossl_x509crl();
Init_ossl_x509crl   52 ext/openssl/ossl_x509.h void Init_ossl_x509crl(void);


Init_ossl_x509ext

Init_ossl_x509ext   27 ext/openssl/ossl_x509.c     Init_ossl_x509ext();
Init_ossl_x509ext   64 ext/openssl/ossl_x509.h void Init_ossl_x509ext(void);


Init_ossl_x509name

Init_ossl_x509name   28 ext/openssl/ossl_x509.c     Init_ossl_x509name();
Init_ossl_x509name   74 ext/openssl/ossl_x509.h void Init_ossl_x509name(void);


Init_ossl_x509req

Init_ossl_x509req   29 ext/openssl/ossl_x509.c     Init_ossl_x509req();
Init_ossl_x509req   85 ext/openssl/ossl_x509.h void Init_ossl_x509req(void);


Init_ossl_x509revoked

Init_ossl_x509revoked   30 ext/openssl/ossl_x509.c     Init_ossl_x509revoked();
Init_ossl_x509revoked   95 ext/openssl/ossl_x509.h void Init_ossl_x509revoked(void);


Init_ossl_x509store

Init_ossl_x509store   31 ext/openssl/ossl_x509.c     Init_ossl_x509store();
Init_ossl_x509store  112 ext/openssl/ossl_x509.h void Init_ossl_x509store(void);


Init_pack

Init_pack          36 inits.c        void Init_pack(void);
Init_pack          70 inits.c            Init_pack();


Init_process

Init_process       39 inits.c        void Init_process(void);
Init_process       77 inits.c            Init_process();


Init_signal

Init_signal        43 inits.c        void Init_signal(void);
Init_signal        76 inits.c            Init_signal();


Init_stack

Init_stack       1246 eval.c         void Init_stack(VALUE*);
Init_stack       1294 eval.c             Init_stack((void*)&state);
Init_stack       1422 eval.c             Init_stack((void*)&state);
Init_stack       1475 eval.c             Init_stack((void*)&state);
Init_stack       1530 eval.c             Init_stack((void*)&tmp);
Init_stack       11869 eval.c             Init_stack((VALUE*)&arg);
Init_stack       1524 gc.c           	Init_stack(0);


Init_sym

Init_sym           38 inits.c        void Init_sym(void);
Init_sym           53 inits.c            Init_sym();


Init_syserr

Init_syserr        23 inits.c        void Init_syserr(void);
Init_syserr        65 inits.c            Init_syserr();


Init_var_tables

Init_var_tables    47 inits.c        void Init_var_tables(void);
Init_var_tables    54 inits.c            Init_var_tables();


Init_version

Init_version       48 inits.c        void Init_version(void);
Init_version       85 inits.c            Init_version();


Int32x32To64

Int32x32To64       34 wince/sys/utime.c 	time64 = Int32x32To64(t->actime, 10000000) + 116444736000000000;
Int32x32To64       37 wince/sys/utime.c 	time64 = Int32x32To64(t->modtime, 10000000) + 116444736000000000;


IsWin95

IsWin95           692 win32/win32.c  	if (IsWin95()) {
IsWin95          2952 win32/win32.c      if (IsWin95()) pid = -pid;
IsWin95          3772 win32/win32.c      if (IsWin95()) pid = -pid;
IsWin95          3862 win32/win32.c  			   IsWin95() ? 0 : FILE_FLAG_BACKUP_SEMANTICS, 0);


IsWinNT

IsWinNT           325 win32/win32.c  	if (IsWinNT())
IsWinNT           985 win32/win32.c      if (!IsWinNT()) {
IsWinNT          3117 win32/win32.c  		if (IsWinNT()) {
IsWinNT          3321 win32/win32.c      ret = IsWinNT() ? winnt_stat(buf1, st) : stat(buf1, st);
IsWinNT          3403 win32/win32.c      if (IsWinNT()) {
IsWinNT          3425 win32/win32.c      if (IsWinNT()) {


J

J                  95 ext/digest/rmd160/rmd160.c       (a) += J((b), (c), (d)) + (x) + 0xa953fd4eU;	\
J                 120 ext/digest/rmd160/rmd160.c       (a) += J((b), (c), (d)) + (x) + 0x50a28be6U;	\


JAPANESE_EUC

JAPANESE_EUC     2875 ext/nkf/nkf-utf8/nkf.c 	output_mode = JAPANESE_EUC;
JAPANESE_EUC     2882 ext/nkf/nkf-utf8/nkf.c 	output_mode = JAPANESE_EUC;
JAPANESE_EUC     2908 ext/nkf/nkf-utf8/nkf.c 	output_mode = JAPANESE_EUC;
JAPANESE_EUC     3590 ext/nkf/nkf-utf8/nkf.c     JAPANESE_EUC, SHIFT_JIS,ISO8859_1, ISO8859_1, X0208, X0201,


JIS_INPUT

JIS_INPUT        1245 ext/nkf/nkf-utf8/nkf.c             input_f = JIS_INPUT;
JIS_INPUT        1911 ext/nkf/nkf-utf8/nkf.c     if (input_f == JIS_INPUT || input_f == LATIN1_INPUT) {


JJ

JJ                233 ext/digest/rmd160/rmd160.c 	JJ(bb, cc, dd, ee, aa, block[ 4],  9);
JJ                234 ext/digest/rmd160/rmd160.c 	JJ(aa, bb, cc, dd, ee, block[ 0], 15);
JJ                235 ext/digest/rmd160/rmd160.c 	JJ(ee, aa, bb, cc, dd, block[ 5],  5);
JJ                236 ext/digest/rmd160/rmd160.c 	JJ(dd, ee, aa, bb, cc, block[ 9], 11);
JJ                237 ext/digest/rmd160/rmd160.c 	JJ(cc, dd, ee, aa, bb, block[ 7],  6);
JJ                238 ext/digest/rmd160/rmd160.c 	JJ(bb, cc, dd, ee, aa, block[12],  8);
JJ                239 ext/digest/rmd160/rmd160.c 	JJ(aa, bb, cc, dd, ee, block[ 2], 13);
JJ                240 ext/digest/rmd160/rmd160.c 	JJ(ee, aa, bb, cc, dd, block[10], 12);
JJ                241 ext/digest/rmd160/rmd160.c 	JJ(dd, ee, aa, bb, cc, block[14],  5);
JJ                242 ext/digest/rmd160/rmd160.c 	JJ(cc, dd, ee, aa, bb, block[ 1], 12);
JJ                243 ext/digest/rmd160/rmd160.c 	JJ(bb, cc, dd, ee, aa, block[ 3], 13);
JJ                244 ext/digest/rmd160/rmd160.c 	JJ(aa, bb, cc, dd, ee, block[ 8], 14);
JJ                245 ext/digest/rmd160/rmd160.c 	JJ(ee, aa, bb, cc, dd, block[11], 11);
JJ                246 ext/digest/rmd160/rmd160.c 	JJ(dd, ee, aa, bb, cc, block[ 6],  8);
JJ                247 ext/digest/rmd160/rmd160.c 	JJ(cc, dd, ee, aa, bb, block[15],  5);
JJ                248 ext/digest/rmd160/rmd160.c 	JJ(bb, cc, dd, ee, aa, block[13],  6);


JJJ

JJJ               251 ext/digest/rmd160/rmd160.c 	JJJ(aaa, bbb, ccc, ddd, eee, block[ 5],  8);
JJJ               252 ext/digest/rmd160/rmd160.c 	JJJ(eee, aaa, bbb, ccc, ddd, block[14],  9);
JJJ               253 ext/digest/rmd160/rmd160.c 	JJJ(ddd, eee, aaa, bbb, ccc, block[ 7],  9);
JJJ               254 ext/digest/rmd160/rmd160.c 	JJJ(ccc, ddd, eee, aaa, bbb, block[ 0], 11);
JJJ               255 ext/digest/rmd160/rmd160.c 	JJJ(bbb, ccc, ddd, eee, aaa, block[ 9], 13);
JJJ               256 ext/digest/rmd160/rmd160.c 	JJJ(aaa, bbb, ccc, ddd, eee, block[ 2], 15);
JJJ               257 ext/digest/rmd160/rmd160.c 	JJJ(eee, aaa, bbb, ccc, ddd, block[11], 15);
JJJ               258 ext/digest/rmd160/rmd160.c 	JJJ(ddd, eee, aaa, bbb, ccc, block[ 4],  5);
JJJ               259 ext/digest/rmd160/rmd160.c 	JJJ(ccc, ddd, eee, aaa, bbb, block[13],  7);
JJJ               260 ext/digest/rmd160/rmd160.c 	JJJ(bbb, ccc, ddd, eee, aaa, block[ 6],  7);
JJJ               261 ext/digest/rmd160/rmd160.c 	JJJ(aaa, bbb, ccc, ddd, eee, block[15],  8);
JJJ               262 ext/digest/rmd160/rmd160.c 	JJJ(eee, aaa, bbb, ccc, ddd, block[ 8], 11);
JJJ               263 ext/digest/rmd160/rmd160.c 	JJJ(ddd, eee, aaa, bbb, ccc, block[ 1], 14);
JJJ               264 ext/digest/rmd160/rmd160.c 	JJJ(ccc, ddd, eee, aaa, bbb, block[10], 14);
JJJ               265 ext/digest/rmd160/rmd160.c 	JJJ(bbb, ccc, ddd, eee, aaa, block[ 3], 12);
JJJ               266 ext/digest/rmd160/rmd160.c 	JJJ(aaa, bbb, ccc, ddd, eee, block[12],  6);


JUMP_TAG

JUMP_TAG         1620 eval.c         	JUMP_TAG(status);
JUMP_TAG         1704 eval.c             JUMP_TAG(state);
JUMP_TAG         1728 eval.c         	if (state) JUMP_TAG(state);
JUMP_TAG         2566 eval.c             if (state) JUMP_TAG(state);
JUMP_TAG         2798 eval.c         	if (state) JUMP_TAG(state);
JUMP_TAG         2936 eval.c         	if (state) JUMP_TAG(state);
JUMP_TAG         2971 eval.c         	if (state) JUMP_TAG(state);
JUMP_TAG         3035 eval.c         		JUMP_TAG(state);
JUMP_TAG         3047 eval.c         	JUMP_TAG(TAG_NEXT);
JUMP_TAG         3052 eval.c         	JUMP_TAG(TAG_REDO);
JUMP_TAG         3057 eval.c         	JUMP_TAG(TAG_RETRY);
JUMP_TAG         3130 eval.c         		JUMP_TAG(state);
JUMP_TAG         3153 eval.c         	if (state) JUMP_TAG(state);
JUMP_TAG         3379 eval.c         	    if (state) JUMP_TAG(state);
JUMP_TAG         4004 eval.c             if (state) JUMP_TAG(state);
JUMP_TAG         4347 eval.c         	JUMP_TAG(TAG_FATAL);
JUMP_TAG         4385 eval.c         	    JUMP_TAG(status);
JUMP_TAG         4400 eval.c             JUMP_TAG(tag);
JUMP_TAG         4512 eval.c             JUMP_TAG(tag);
JUMP_TAG         4600 eval.c         	    JUMP_TAG(TAG_RETURN);
JUMP_TAG         4624 eval.c         	    JUMP_TAG(TAG_BREAK);
JUMP_TAG         4884 eval.c         		    JUMP_TAG(TAG_BREAK);
JUMP_TAG         4892 eval.c         	JUMP_TAG(state);
JUMP_TAG         5134 eval.c         	JUMP_TAG(state);
JUMP_TAG         5207 eval.c             if (state) JUMP_TAG(state);
JUMP_TAG         5261 eval.c             if (state) JUMP_TAG(state);
JUMP_TAG         5284 eval.c             if (status) JUMP_TAG(status);
JUMP_TAG         5303 eval.c         	JUMP_TAG(state);
JUMP_TAG         5640 eval.c         		if (state) JUMP_TAG(state);
JUMP_TAG         5745 eval.c         		JUMP_TAG(state);
JUMP_TAG         5749 eval.c         		if (rb_block_given_p()) JUMP_TAG(state);
JUMP_TAG         6215 eval.c         	JUMP_TAG(state);
JUMP_TAG         6312 eval.c             if (state) JUMP_TAG(state);
JUMP_TAG         6972 eval.c             if (state) JUMP_TAG(state);
JUMP_TAG         8267 eval.c         	JUMP_TAG(state);
JUMP_TAG         8279 eval.c         	JUMP_TAG(state);
JUMP_TAG         8601 eval.c         	JUMP_TAG(state);
JUMP_TAG         9854 eval.c         	JUMP_TAG(state);
JUMP_TAG         10168 eval.c         	JUMP_TAG(TAG_FATAL);
JUMP_TAG         12949 eval.c             if (state) JUMP_TAG(state);
JUMP_TAG         13004 eval.c             JUMP_TAG(TAG_THROW);
JUMP_TAG         13098 eval.c         	if (state) JUMP_TAG(state);


KCODE_EUC

KCODE_EUC         105 defines.h      #define DEFAULT_KCODE KCODE_EUC
KCODE_EUC         160 re.c           #define KCODE_MASK (KCODE_EUC|KCODE_SJIS|KCODE_UTF8)
KCODE_EUC         168 re.c               FL_SET(re, KCODE_EUC);
KCODE_EUC         208 re.c                 case KCODE_EUC:
KCODE_EUC         228 re.c                 case KCODE_EUC:
KCODE_EUC         336 re.c           	      case KCODE_EUC:
KCODE_EUC         584 re.c           	  case KCODE_EUC:
KCODE_EUC        1663 re.c           	      case KCODE_EUC:
KCODE_EUC        1832 re.c                 case KCODE_EUC:
KCODE_EUC        1850 re.c                 case KCODE_EUC:
KCODE_EUC        1950 re.c                     case KCODE_EUC:
KCODE_EUC        2071 re.c                 case KCODE_EUC:
KCODE_EUC        2094 re.c           	reg_kcode = KCODE_EUC;
KCODE_EUC        2204 re.c           #if DEFAULT_KCODE == KCODE_EUC
KCODE_EUC         100 vms/config.h   #define DEFAULT_KCODE KCODE_EUC


KCODE_FIXED

KCODE_FIXED       169 re.c               FL_SET(re, KCODE_FIXED);
KCODE_FIXED       177 re.c               FL_SET(re, KCODE_FIXED);
KCODE_FIXED       185 re.c               FL_SET(re, KCODE_FIXED);
KCODE_FIXED       192 re.c               FL_SET(re, KCODE_FIXED);
KCODE_FIXED       200 re.c               if (!FL_TEST(re, KCODE_FIXED)) return;
KCODE_FIXED       246 re.c               if (!FL_TEST(re, KCODE_FIXED))
KCODE_FIXED       331 re.c           	if (FL_TEST(re, KCODE_FIXED)) {
KCODE_FIXED       580 re.c               if (FL_TEST(re, KCODE_FIXED)) {
KCODE_FIXED       813 re.c               if (!FL_TEST(re, KCODE_FIXED) &&
KCODE_FIXED       827 re.c           	if (FL_TEST(re, KCODE_FIXED))
KCODE_FIXED       853 re.c               if (FL_TEST(re, KCODE_FIXED))
KCODE_FIXED       898 re.c               if (FL_TEST(re, KCODE_FIXED))
KCODE_FIXED       917 re.c               if (FL_TEST(re, KCODE_FIXED))
KCODE_FIXED      1403 re.c               if (FL_TEST(re, KCODE_FIXED)) {
KCODE_FIXED      1658 re.c           	if (FL_TEST(argv[0], KCODE_FIXED)) {
KCODE_FIXED      1869 re.c               if (FL_TEST(re, KCODE_FIXED)) {
KCODE_FIXED      1920 re.c                           if (FL_TEST(v, KCODE_FIXED)) {


KCODE_MASK

KCODE_MASK        167 re.c               FL_UNSET(re, KCODE_MASK);
KCODE_MASK        175 re.c               FL_UNSET(re, KCODE_MASK);
KCODE_MASK        183 re.c               FL_UNSET(re, KCODE_MASK);
KCODE_MASK        191 re.c               FL_UNSET(re, KCODE_MASK);
KCODE_MASK        202 re.c               curr_kcode = RBASIC(re)->flags & KCODE_MASK;
KCODE_MASK        332 re.c           	    switch ((RBASIC(re)->flags & KCODE_MASK)) {
KCODE_MASK        581 re.c           	switch (RBASIC(re)->flags & KCODE_MASK) {
KCODE_MASK        814 re.c           	(RBASIC(re)->flags & KCODE_MASK) != reg_kcode) {
KCODE_MASK        816 re.c           	RBASIC(re)->flags &= ~KCODE_MASK;
KCODE_MASK       1404 re.c           	return RBASIC(re)->flags & KCODE_MASK;
KCODE_MASK       1659 re.c           	    switch (RBASIC(argv[0])->flags & KCODE_MASK) {
KCODE_MASK       1847 re.c               switch (RBASIC(re)->flags & KCODE_MASK) {
KCODE_MASK       1923 re.c                                   kcode = RBASIC(v)->flags & KCODE_MASK;
KCODE_MASK       1925 re.c                               else if ((RBASIC(v)->flags & KCODE_MASK) != kcode) {


KCODE_NONE

KCODE_NONE        205 re.c                 case KCODE_NONE:
KCODE_NONE        225 re.c                 case KCODE_NONE:
KCODE_NONE        333 re.c           	      case KCODE_NONE:
KCODE_NONE        582 re.c           	  case KCODE_NONE:
KCODE_NONE       1660 re.c           	      case KCODE_NONE:
KCODE_NONE       1838 re.c                 case KCODE_NONE:
KCODE_NONE       1848 re.c                 case KCODE_NONE:
KCODE_NONE       1947 re.c                     case KCODE_NONE:
KCODE_NONE       2113 re.c           	reg_kcode = KCODE_NONE;


KCODE_SJIS

KCODE_SJIS        103 defines.h      #define DEFAULT_KCODE KCODE_SJIS
KCODE_SJIS        160 re.c           #define KCODE_MASK (KCODE_EUC|KCODE_SJIS|KCODE_UTF8)
KCODE_SJIS        176 re.c               FL_SET(re, KCODE_SJIS);
KCODE_SJIS        211 re.c                 case KCODE_SJIS:
KCODE_SJIS        231 re.c                 case KCODE_SJIS:
KCODE_SJIS        339 re.c           	      case KCODE_SJIS:
KCODE_SJIS        586 re.c           	  case KCODE_SJIS:
KCODE_SJIS       1666 re.c           	      case KCODE_SJIS:
KCODE_SJIS       1834 re.c                 case KCODE_SJIS:
KCODE_SJIS       1852 re.c                 case KCODE_SJIS:
KCODE_SJIS       1953 re.c                     case KCODE_SJIS:
KCODE_SJIS       2069 re.c                 case KCODE_SJIS:
KCODE_SJIS       2099 re.c           	reg_kcode = KCODE_SJIS;
KCODE_SJIS       2207 re.c           #if DEFAULT_KCODE == KCODE_SJIS


KCODE_UTF8

KCODE_UTF8        160 re.c           #define KCODE_MASK (KCODE_EUC|KCODE_SJIS|KCODE_UTF8)
KCODE_UTF8        184 re.c               FL_SET(re, KCODE_UTF8);
KCODE_UTF8        214 re.c                 case KCODE_UTF8:
KCODE_UTF8        234 re.c                 case KCODE_UTF8:
KCODE_UTF8        342 re.c           	      case KCODE_UTF8:
KCODE_UTF8        588 re.c           	  case KCODE_UTF8:
KCODE_UTF8       1669 re.c           	      case KCODE_UTF8:
KCODE_UTF8       1836 re.c                 case KCODE_UTF8:
KCODE_UTF8       1854 re.c                 case KCODE_UTF8:
KCODE_UTF8       1956 re.c                     case KCODE_UTF8:
KCODE_UTF8       2073 re.c                 case KCODE_UTF8:
KCODE_UTF8       2104 re.c           	reg_kcode = KCODE_UTF8;
KCODE_UTF8       2210 re.c           #if DEFAULT_KCODE == KCODE_UTF8


KR_REHASH

KR_REHASH         125 re.c           	    hx = KR_REHASH(0, casetable[x[i]], hx);
KR_REHASH         126 re.c           	    hy = KR_REHASH(0, casetable[s[i]], hy);
KR_REHASH         131 re.c           	    hy = KR_REHASH(casetable[*s], casetable[*(s+d)], hy);
KR_REHASH         141 re.c           	    hx = KR_REHASH(0, x[i], hx);
KR_REHASH         142 re.c           	    hy = KR_REHASH(0, s[i], hy);
KR_REHASH         147 re.c           	    hy = KR_REHASH(*s, *(s+d), hy);


KS_SIZE

KS_SIZE           578 missing/crypt.c static C_block	KS[KS_SIZE];
KS_SIZE           668 missing/crypt.c 		kp = &KS[KS_SIZE-1];
KS_SIZE           708 missing/crypt.c 		kp = (C_block *)((char *)kp-(ks_inc*KS_SIZE));


LADJUST

LADJUST           617 missing/vsnprintf.c 			flags |= LADJUST;
LADJUST           927 missing/vsnprintf.c 		if ((flags & (LADJUST|ZEROPAD)) == 0)
LADJUST           940 missing/vsnprintf.c 		if ((flags & (LADJUST|ZEROPAD)) == ZEROPAD)
LADJUST           995 missing/vsnprintf.c 		if (flags & LADJUST)


LAST

LAST             1969 ext/nkf/nkf-utf8/nkf.c                         LAST;
LAST             2078 ext/nkf/nkf-utf8/nkf.c                         LAST;
LAST             2084 ext/nkf/nkf-utf8/nkf.c 				LAST;
LAST             2088 ext/nkf/nkf-utf8/nkf.c                             LAST;
LAST             2109 ext/nkf/nkf-utf8/nkf.c                     LAST;
LAST             2115 ext/nkf/nkf-utf8/nkf.c                         LAST;
LAST             2132 ext/nkf/nkf-utf8/nkf.c                             LAST;
LAST             2168 ext/nkf/nkf-utf8/nkf.c                         LAST;


LAST_I

LAST_I            611 ext/racc/cparse/cparse.c         v->curstate = num_to_long(LAST_I(v->state));
LAST_I            737 ext/racc/cparse/cparse.c     k2 = num_to_long(LAST_I(v->state));


LATIN1_INPUT

LATIN1_INPUT     1156 ext/nkf/nkf-utf8/nkf.c             input_f = LATIN1_INPUT;
LATIN1_INPUT     1911 ext/nkf/nkf-utf8/nkf.c     if (input_f == JIS_INPUT || input_f == LATIN1_INPUT) {


LGCHUNKBITS

LGCHUNKBITS       278 missing/crypt.c #define	CHUNKBITS	(1<<LGCHUNKBITS)
LGCHUNKBITS       296 missing/crypt.c #define	CHUNKBITS	(1<<LGCHUNKBITS)
LGCHUNKBITS       893 missing/crypt.c 		i = l>>LGCHUNKBITS;	/* which chunk this bit comes from */


LIBC_NAME

LIBC_NAME         149 dln.c          #ifndef LIBC_NAME
LIBC_NAME         643 dln.c              static char *libc = LIBC_NAME;


LK_ERR

LK_ERR            263 win32/win32.c  	LK_ERR(LockFileEx(fh, 0, 0, LK_LEN, LK_LEN, &o), i);
LK_ERR            266 win32/win32.c  	LK_ERR(LockFileEx(fh, LOCKFILE_EXCLUSIVE_LOCK, 0, LK_LEN, LK_LEN, &o), i);
LK_ERR            269 win32/win32.c  	LK_ERR(LockFileEx(fh, LOCKFILE_FAIL_IMMEDIATELY, 0, LK_LEN, LK_LEN, &o), i);
LK_ERR            272 win32/win32.c  	LK_ERR(LockFileEx(fh,
LK_ERR            278 win32/win32.c  	LK_ERR(UnlockFileEx(fh, 0, LK_LEN, LK_LEN, &o), i);
LK_ERR            298 win32/win32.c  	    LK_ERR(LockFile(fh, 0, 0, LK_LEN, LK_LEN), i);
LK_ERR            302 win32/win32.c  	LK_ERR(LockFile(fh, 0, 0, LK_LEN, LK_LEN), i);
LK_ERR            306 win32/win32.c  	LK_ERR(UnlockFile(fh, 0, 0, LK_LEN, LK_LEN), i);


LK_LEN

LK_LEN            263 win32/win32.c  	LK_ERR(LockFileEx(fh, 0, 0, LK_LEN, LK_LEN, &o), i);
LK_LEN            266 win32/win32.c  	LK_ERR(LockFileEx(fh, LOCKFILE_EXCLUSIVE_LOCK, 0, LK_LEN, LK_LEN, &o), i);
LK_LEN            269 win32/win32.c  	LK_ERR(LockFileEx(fh, LOCKFILE_FAIL_IMMEDIATELY, 0, LK_LEN, LK_LEN, &o), i);
LK_LEN            274 win32/win32.c  			  0, LK_LEN, LK_LEN, &o), i);
LK_LEN            278 win32/win32.c  	LK_ERR(UnlockFileEx(fh, 0, LK_LEN, LK_LEN, &o), i);
LK_LEN            298 win32/win32.c  	    LK_ERR(LockFile(fh, 0, 0, LK_LEN, LK_LEN), i);
LK_LEN            302 win32/win32.c  	LK_ERR(LockFile(fh, 0, 0, LK_LEN, LK_LEN), i);
LK_LEN            306 win32/win32.c  	LK_ERR(UnlockFile(fh, 0, 0, LK_LEN, LK_LEN), i);
LK_LEN           3785 win32/win32.c  	UnlockFile((HANDLE)sock, 0, 0, LK_LEN, LK_LEN);
LK_LEN           3803 win32/win32.c  	UnlockFile((HANDLE)sock, 0, 0, LK_LEN, LK_LEN);


LL2NUM

LL2NUM            339 ext/dl/cfunc.c 	    result = LL2NUM(ret); \
LL2NUM            437 ext/dl/cfunc.c 	    result = LL2NUM(ret); \
LL2NUM            169 ruby.h         # define OFFT2NUM(v) LL2NUM(v)


LLONG_MAX

LLONG_MAX        1612 numeric.c      	if (RFLOAT(val)->value <= (double)LLONG_MAX
LLONG_MAX         120 ruby.h         # ifndef LLONG_MAX
LLONG_MAX         139 ruby.h         #    define LLONG_MIN (-LLONG_MAX-1)


LLONG_MIN

LLONG_MIN         787 bignum.c       			       || (LONG_LONG)num != LLONG_MIN)) {
LLONG_MIN        1613 numeric.c      	    && RFLOAT(val)->value >= (double)LLONG_MIN) {
LLONG_MIN         132 ruby.h         # ifndef LLONG_MIN


LOAD

LOAD              280 missing/crypt.c 	LOAD(d,d0,d1,(p)[(0<<CHUNKBITS)+(cpp)[0]]);		\
LOAD              289 missing/crypt.c 	LOAD(d,d0,d1,(p)[(0<<CHUNKBITS)+(cpp)[0]]);		\
LOAD              298 missing/crypt.c 	{ C_block tblk; permute(cpp,&tblk,p,8); LOAD (d,d0,d1,tblk); }
LOAD              300 missing/crypt.c 	{ C_block tblk; permute(cpp,&tblk,p,4); LOAD (d,d0,d1,tblk); }
LOAD              645 missing/crypt.c 	LOAD(L,L0,L1,B);
LOAD              647 missing/crypt.c 	LOAD(L,L0,L1,*(C_block *)in);


LOCKFILE_EXCLUSIVE_LOCK

LOCKFILE_EXCLUSIVE_LOCK  266 win32/win32.c  	LK_ERR(LockFileEx(fh, LOCKFILE_EXCLUSIVE_LOCK, 0, LK_LEN, LK_LEN, &o), i);
LOCKFILE_EXCLUSIVE_LOCK  273 win32/win32.c  			  LOCKFILE_EXCLUSIVE_LOCK|LOCKFILE_FAIL_IMMEDIATELY,


LOCKFILE_FAIL_IMMEDIATELY

LOCKFILE_FAIL_IMMEDIATELY  269 win32/win32.c  	LK_ERR(LockFileEx(fh, LOCKFILE_FAIL_IMMEDIATELY, 0, LK_LEN, LK_LEN, &o), i);
LOCKFILE_FAIL_IMMEDIATELY  273 win32/win32.c  			  LOCKFILE_EXCLUSIVE_LOCK|LOCKFILE_FAIL_IMMEDIATELY,


LOCK_EX

LOCK_EX          3030 file.c         # ifndef LOCK_EX
LOCK_EX          4359 file.c             rb_file_const("LOCK_EX", INT2FIX(LOCK_EX));
LOCK_EX            11 missing/flock.c # ifndef LOCK_EX
LOCK_EX            34 missing/flock.c     case LOCK_EX:
LOCK_EX            80 missing/flock.c # ifndef LOCK_EX
LOCK_EX           100 missing/flock.c       case LOCK_EX:
LOCK_EX           108 missing/flock.c       case LOCK_EX|LOCK_NB:
LOCK_EX           265 win32/win32.c        case LOCK_EX:		/* exclusive lock */
LOCK_EX           271 win32/win32.c        case LOCK_EX|LOCK_NB:	/* non-blocking exclusive lock */
LOCK_EX           296 win32/win32.c        case LOCK_EX:
LOCK_EX           301 win32/win32.c        case LOCK_EX|LOCK_NB:


LOCK_NB

LOCK_NB          3033 file.c         # ifndef LOCK_NB
LOCK_NB          3044 file.c             if (rb_thread_alone() || (op & LOCK_NB)) {
LOCK_NB          3051 file.c             op |= LOCK_NB;
LOCK_NB          4361 file.c             rb_file_const("LOCK_NB", INT2FIX(LOCK_NB));
LOCK_NB            14 missing/flock.c # ifndef LOCK_NB
LOCK_NB            30 missing/flock.c     switch (operation & ~LOCK_NB) {
LOCK_NB            47 missing/flock.c     return fcntl(fd, (operation & LOCK_NB) ? F_SETLK : F_SETLKW, &lock);
LOCK_NB            83 missing/flock.c # ifndef LOCK_NB
LOCK_NB           104 missing/flock.c       case LOCK_SH|LOCK_NB:
LOCK_NB           108 missing/flock.c       case LOCK_EX|LOCK_NB:
LOCK_NB           268 win32/win32.c        case LOCK_SH|LOCK_NB:	/* non-blocking shared lock */
LOCK_NB           271 win32/win32.c        case LOCK_EX|LOCK_NB:	/* non-blocking exclusive lock */
LOCK_NB           277 win32/win32.c        case LOCK_UN|LOCK_NB:	/* unlock is always non-blocking, I hope */
LOCK_NB           301 win32/win32.c        case LOCK_EX|LOCK_NB:
LOCK_NB           305 win32/win32.c        case LOCK_UN|LOCK_NB:


LOCK_SH

LOCK_SH          3027 file.c         # ifndef LOCK_SH
LOCK_SH          4358 file.c             rb_file_const("LOCK_SH", INT2FIX(LOCK_SH));
LOCK_SH             8 missing/flock.c # ifndef LOCK_SH
LOCK_SH            31 missing/flock.c     case LOCK_SH:
LOCK_SH            77 missing/flock.c # ifndef LOCK_SH
LOCK_SH            96 missing/flock.c       case LOCK_SH:
LOCK_SH           104 missing/flock.c       case LOCK_SH|LOCK_NB:
LOCK_SH           262 win32/win32.c        case LOCK_SH:		/* shared lock */
LOCK_SH           268 win32/win32.c        case LOCK_SH|LOCK_NB:	/* non-blocking shared lock */


LOCK_UN

LOCK_UN          3036 file.c         # ifndef LOCK_UN
LOCK_UN          4360 file.c             rb_file_const("LOCK_UN", INT2FIX(LOCK_UN));
LOCK_UN            17 missing/flock.c # ifndef LOCK_UN
LOCK_UN            37 missing/flock.c     case LOCK_UN:
LOCK_UN            86 missing/flock.c # ifndef LOCK_UN
LOCK_UN           112 missing/flock.c       case LOCK_UN:
LOCK_UN           276 win32/win32.c        case LOCK_UN:		/* unlock lock */
LOCK_UN           277 win32/win32.c        case LOCK_UN|LOCK_NB:	/* unlock is always non-blocking, I hope */
LOCK_UN           304 win32/win32.c        case LOCK_UN:
LOCK_UN           305 win32/win32.c        case LOCK_UN|LOCK_NB:


LOG_PI_OVER_2

LOG_PI_OVER_2      76 missing/erf.c      if (x >= 0) return   p_gamma(0.5, x * x, LOG_PI_OVER_2);
LOG_PI_OVER_2      77 missing/erf.c      else        return - p_gamma(0.5, x * x, LOG_PI_OVER_2);
LOG_PI_OVER_2      86 missing/erf.c      if (x >= 0) return  q_gamma(0.5, x * x, LOG_PI_OVER_2);
LOG_PI_OVER_2      87 missing/erf.c      else        return  1 + p_gamma(0.5, x * x, LOG_PI_OVER_2);


LONG2FIX

LONG2FIX         2387 array.c        	return LONG2FIX(0);
LONG2FIX         2395 array.c            return LONG2FIX(h);
LONG2FIX          109 bignum.c       		    if (POSFIXABLE(num)) return LONG2FIX(num);
LONG2FIX          111 bignum.c       		else if (NEGFIXABLE(-(long)num)) return LONG2FIX(-(long)num);
LONG2FIX          165 bignum.c           if (POSFIXABLE(n)) return LONG2FIX(n);
LONG2FIX          172 bignum.c           if (FIXABLE(n)) return LONG2FIX(n);
LONG2FIX          216 bignum.c       	if (FIXABLE((LONG_LONG)q)) return LONG2FIX((LONG_LONG)q);
LONG2FIX          223 bignum.c       	if (POSFIXABLE(q)) return LONG2FIX(q);
LONG2FIX          420 bignum.c       	    if (sign) return LONG2FIX(val);
LONG2FIX          423 bignum.c       		return LONG2FIX(result);
LONG2FIX          561 bignum.c           if (POSFIXABLE(n)) return LONG2FIX(n);
LONG2FIX          568 bignum.c           if (FIXABLE(n)) return LONG2FIX(n);
LONG2FIX         1895 bignum.c           return LONG2FIX(key);
LONG2FIX         1953 bignum.c           return LONG2FIX(RBIGNUM(big)->len*SIZEOF_BDIGITS);
LONG2FIX           58 ext/curses/curses.c #define CH2FIX LONG2FIX
LONG2FIX          234 ext/openssl/ossl_x509req.c     return LONG2FIX(version);
LONG2FIX         1714 file.c             return LONG2FIX(n);
LONG2FIX         1782 file.c             return LONG2FIX(n);
LONG2FIX         1843 file.c             return LONG2FIX(n);
LONG2FIX         1927 file.c             return LONG2FIX(n);
LONG2FIX         1971 file.c             return LONG2FIX(n);
LONG2FIX         2007 file.c             return LONG2FIX(n);
LONG2FIX         2154 file.c             return LONG2FIX(n);
LONG2FIX          666 io.c               return LONG2FIX(n);
LONG2FIX         2295 io.c               return LONG2FIX(n);
LONG2FIX          942 marshal.c      	v = rb_hash_aref(arg->data, LONG2FIX(id));
LONG2FIX         1008 marshal.c      	    v = LONG2FIX(i);
LONG2FIX         1153 marshal.c      		rb_struct_aset(v, LONG2FIX(i), r_object(arg));
LONG2FIX         1193 numeric.c          return LONG2FIX(val);
LONG2FIX         1219 numeric.c          return LONG2FIX(val);
LONG2FIX         1252 numeric.c          return LONG2FIX(val);
LONG2FIX         1277 numeric.c          return LONG2FIX(val);
LONG2FIX         1410 numeric.c      		rb_yield(LONG2FIX(i));
LONG2FIX         1416 numeric.c      		rb_yield(LONG2FIX(i));
LONG2FIX         1596 numeric.c          return LONG2FIX(v);
LONG2FIX         1911 numeric.c      	r = LONG2FIX(c);
LONG2FIX         1947 numeric.c      	r = LONG2FIX(c);
LONG2FIX         1990 numeric.c      	r = LONG2FIX(c);
LONG2FIX         2477 numeric.c      	return fix_rshift(x, LONG2FIX(-width));
LONG2FIX         2500 numeric.c      	return fix_lshift(x, LONG2FIX(-i));
LONG2FIX         2508 numeric.c          return LONG2FIX(val);
LONG2FIX         2680 numeric.c      	    rb_yield(LONG2FIX(i));
LONG2FIX         2718 numeric.c      	    rb_yield(LONG2FIX(i));
LONG2FIX         2757 numeric.c      	    rb_yield(LONG2FIX(i));
LONG2FIX         1032 object.c           return LONG2FIX(id);
LONG2FIX         7861 parse.y        	node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit));
LONG2FIX          208 range.c            return LONG2FIX(hash);
LONG2FIX         1485 re.c               return LONG2FIX(pos);
LONG2FIX         1568 re.c               return LONG2FIX(start);
LONG2FIX          925 string.c       		return rb_funcall(LONG2FIX(0), '-', 1, tmp);
LONG2FIX          761 struct.c           return LONG2FIX(h);
LONG2FIX          805 struct.c           return LONG2FIX(RSTRUCT(s)->len);
LONG2FIX          987 time.c             return LONG2FIX(hash);
LONG2FIX         1732 time.c         	return LONG2FIX(off);


LONG2NUM

LONG2NUM          354 array.c        	    rb_ary_store(ary, i, rb_yield(LONG2NUM(i)));
LONG2NUM          900 array.c        		return LONG2NUM(i);
LONG2NUM          907 array.c        		return LONG2NUM(i);
LONG2NUM          938 array.c        		return LONG2NUM(i);
LONG2NUM          947 array.c        		return LONG2NUM(i);
LONG2NUM         1167 array.c        	rb_yield(LONG2NUM(i));
LONG2NUM         1214 array.c            return LONG2NUM(RARRAY(ary)->len);
LONG2NUM         2149 array.c        	    v = rb_yield(LONG2NUM(i));
LONG2NUM         2738 array.c            return LONG2NUM(n);
LONG2NUM         6952 eval.c         		    rb_ary_push(ruby_dln_librefs, LONG2NUM(handle));
LONG2NUM          328 ext/dl/cfunc.c 	    result = LONG2NUM(ret); \
LONG2NUM          426 ext/dl/cfunc.c 	    result = LONG2NUM(ret); \
LONG2NUM          409 ext/dl/cptr.c      return LONG2NUM(RPTR_DATA(self)->size);
LONG2NUM          732 ext/openssl/ossl_asn1.c 	    rb_ary_push(arg, LONG2NUM(depth));
LONG2NUM          733 ext/openssl/ossl_asn1.c 	    rb_ary_push(arg, LONG2NUM(off));
LONG2NUM          734 ext/openssl/ossl_asn1.c 	    rb_ary_push(arg, LONG2NUM(hlen));
LONG2NUM          735 ext/openssl/ossl_asn1.c 	    rb_ary_push(arg, LONG2NUM(len));
LONG2NUM          801 ext/openssl/ossl_asn1.c 		rb_iv_set(asn1data, "@unused_bits", LONG2NUM(flag));
LONG2NUM          262 ext/openssl/ossl_x509cert.c     return LONG2NUM(X509_get_version(x509));
LONG2NUM          140 ext/openssl/ossl_x509crl.c     return LONG2NUM(ver);
LONG2NUM           86 ext/racc/cparse/cparse.c #ifndef LONG2NUM
LONG2NUM          374 ext/racc/cparse/cparse.c     rb_ivar_set(parser, id_errstatus, LONG2NUM(v->errstatus));
LONG2NUM          512 ext/racc/cparse/cparse.c                 rb_ivar_set(v->parser, id_errstatus, LONG2NUM(v->errstatus));
LONG2NUM          536 ext/racc/cparse/cparse.c                        2, LONG2NUM(v->curstate), v->state);
LONG2NUM          566 ext/racc/cparse/cparse.c     rb_ivar_set(v->parser, id_errstatus, LONG2NUM(v->errstatus));
LONG2NUM          651 ext/racc/cparse/cparse.c     PUSH(v->state, LONG2NUM(v->curstate));
LONG2NUM          761 ext/racc/cparse/cparse.c     if (tmp != LONG2NUM(k1)) {
LONG2NUM          523 ext/stringio/stringio.c     return LONG2NUM(StringIO(self)->lineno);
LONG2NUM          585 ext/stringio/stringio.c     return LONG2NUM(StringIO(self)->pos);
LONG2NUM         1011 ext/stringio/stringio.c     return LONG2NUM(len);
LONG2NUM          148 ext/syck/rubyext.c         VALUE n = LONG2NUM(max_size);
LONG2NUM          304 ext/syck/rubyext.c         return rb_funcall(rb_cTime, s_at, 2, LONG2NUM(tmp), LONG2NUM(usec));
LONG2NUM          309 ext/syck/rubyext.c         return rb_funcall(rb_cTime, s_utc, 7, year, mon, day, hour, min, sec, LONG2NUM(usec));
LONG2NUM         1131 ext/tk/tcltklib.c         divmod = rb_funcall(time, rb_intern("divmod"), 1, LONG2NUM(1000000));
LONG2NUM          833 marshal.c      	VALUE n = LONG2NUM(len);
LONG2NUM         1712 numeric.c      	return LONG2NUM(i);
LONG2NUM         1828 numeric.c          return LONG2NUM(-FIX2LONG(num));
LONG2NUM         2069 numeric.c      	return LONG2NUM(div);
LONG2NUM         2081 numeric.c      	    return LONG2NUM(div);
LONG2NUM         2132 numeric.c      	return LONG2NUM(mod);
LONG2NUM         2164 numeric.c      	return rb_assoc_new(LONG2NUM(div), LONG2NUM(mod));
LONG2NUM         2400 numeric.c          return LONG2NUM(val);
LONG2NUM         2419 numeric.c          return LONG2NUM(val);
LONG2NUM         2438 numeric.c          return LONG2NUM(val);
LONG2NUM         2457 numeric.c          return LONG2NUM(val);
LONG2NUM         2483 numeric.c          return LONG2NUM(val);
LONG2NUM         2589 numeric.c          return LONG2NUM(i);
LONG2NUM          132 object.c       	return LONG2NUM((long)obj);
LONG2NUM         1545 pack.c         		rb_ary_push(ary, LONG2NUM(tmp));
LONG2NUM         9230 parse.y            return LONG2NUM(col);
LONG2NUM          466 random.c                       return LONG2NUM(limited_rand(FIX2LONG((VALUE)limit)));
LONG2NUM          486 random.c           return LONG2NUM(val);
LONG2NUM          305 range.c        	    rb_yield(LONG2NUM(i));
LONG2NUM          389 range.c        	    rb_yield(LONG2NUM(i));
LONG2NUM          311 string.c           return LONG2NUM(RSTRING(str)->len);
LONG2NUM          933 string.c           return LONG2NUM(result);
LONG2NUM         1039 string.c       	      if ((unsigned char)p[pos] == c) return LONG2NUM(pos);
LONG2NUM         1061 string.c           return LONG2NUM(pos);
LONG2NUM         1142 string.c       	if (pos >= 0) return LONG2NUM(pos);
LONG2NUM         1147 string.c       	if (pos >= 0) return LONG2NUM(pos);
LONG2NUM         1162 string.c       		  return LONG2NUM((char*)p - RSTRING(str)->ptr);
LONG2NUM          194 struct.c           rb_iv_set(nstr, "__size__", LONG2NUM(RARRAY(members)->len));
LONG2NUM          643 struct.c           return rb_struct_aref(s, LONG2NUM(n));
LONG2NUM          838 time.c             return LONG2NUM(tobj->tv.tv_sec);
LONG2NUM          880 time.c             return LONG2NUM(tobj->tv.tv_usec);
LONG2NUM         1464 time.c             return LONG2NUM((long)tobj->tm.tm_year+1900);
LONG2NUM         1767 time.c         		    LONG2NUM((long)tobj->tm.tm_year+1900),


LONGINT

LONGINT           552 missing/vsnprintf.c 	(flags&LONGINT ? va_arg(ap, long) : \
LONGINT           556 missing/vsnprintf.c 	(flags&LONGINT ? va_arg(ap, u_long) : \
LONGINT           661 missing/vsnprintf.c 			flags |= LONGINT;
LONGINT           674 missing/vsnprintf.c 			flags |= LONGINT;
LONGINT           762 missing/vsnprintf.c 			else if (flags & LONGINT)
LONGINT           764 missing/vsnprintf.c 			if (flags & LONGINT)
LONGINT           773 missing/vsnprintf.c 			flags |= LONGINT;
LONGINT           830 missing/vsnprintf.c 			flags |= LONGINT;


LONG_LONG

LONG_LONG         181 bignum.c           LONG_LONG q;
LONG_LONG         208 bignum.c           unsigned LONG_LONG q;
LONG_LONG         216 bignum.c       	if (FIXABLE((LONG_LONG)q)) return LONG2FIX((LONG_LONG)q);
LONG_LONG         217 bignum.c       	if ((LONG_LONG)q < 0) {
LONG_LONG         218 bignum.c       	    q = -(LONG_LONG)q;
LONG_LONG         521 bignum.c       rb_ull2big(unsigned LONG_LONG n)
LONG_LONG         542 bignum.c       rb_ll2big(LONG_LONG n)
LONG_LONG         559 bignum.c       rb_ull2inum(unsigned LONG_LONG n)
LONG_LONG         566 bignum.c       rb_ll2inum(LONG_LONG n)
LONG_LONG         754 bignum.c       static unsigned LONG_LONG
LONG_LONG         772 bignum.c       unsigned LONG_LONG
LONG_LONG         775 bignum.c           unsigned LONG_LONG num = big2ull(x, "unsigned long long");
LONG_LONG         781 bignum.c       LONG_LONG
LONG_LONG         784 bignum.c           unsigned LONG_LONG num = big2ull(x, "long long");
LONG_LONG         786 bignum.c           if ((LONG_LONG)num < 0 && (RBIGNUM(x)->sign
LONG_LONG         787 bignum.c       			       || (LONG_LONG)num != LLONG_MIN)) {
LONG_LONG         790 bignum.c           if (!RBIGNUM(x)->sign) return -(LONG_LONG)num;
LONG_LONG          70 defines.h      # define BDIGIT_DBL unsigned LONG_LONG
LONG_LONG          71 defines.h      # define BDIGIT_DBL_SIGNED LONG_LONG
LONG_LONG         336 ext/dl/cfunc.c 	    DECL_FUNC(f,LONG_LONG,DLSTACK_PROTO,cdecl) = cfunc->ptr; \
LONG_LONG         337 ext/dl/cfunc.c 	    LONG_LONG ret; \
LONG_LONG         434 ext/dl/cfunc.c 	    DECL_FUNC(f,LONG_LONG,DLSTACK_PROTO,stdcall) = cfunc->ptr; \
LONG_LONG         435 ext/dl/cfunc.c 	    LONG_LONG ret; \
LONG_LONG         131 ext/dl/dl.c        rb_define_const(rb_mDL, "SIZEOF_LONG_LONG",  INT2NUM(sizeof(LONG_LONG)));
LONG_LONG         104 ext/dl/dl.h    typedef struct { char c; LONG_LONG x; } s_long_long;
LONG_LONG         113 ext/dl/dl.h    #define ALIGN_LONG_LONG (sizeof(s_long_long) - sizeof(LONG_LONG))
LONG_LONG          89 intern.h       VALUE rb_ll2inum(LONG_LONG);
LONG_LONG          90 intern.h       VALUE rb_ull2inum(unsigned LONG_LONG);
LONG_LONG          91 intern.h       LONG_LONG rb_big2ll(VALUE);
LONG_LONG          92 intern.h       unsigned LONG_LONG rb_big2ull(VALUE);
LONG_LONG        1601 numeric.c      LONG_LONG
LONG_LONG        1608 numeric.c          if (FIXNUM_P(val)) return (LONG_LONG)FIX2LONG(val);
LONG_LONG        1614 numeric.c      	    return (LONG_LONG)(RFLOAT(val)->value);
LONG_LONG        1643 numeric.c      unsigned LONG_LONG
LONG_LONG        1649 numeric.c          return (unsigned LONG_LONG)rb_num2ll(val);
LONG_LONG         361 pack.c         # define QUAD_SIZE sizeof(LONG_LONG)
LONG_LONG         162 ruby.h         VALUE rb_ll2inum(LONG_LONG);
LONG_LONG         164 ruby.h         VALUE rb_ull2inum(unsigned LONG_LONG);
LONG_LONG         286 ruby.h         LONG_LONG rb_num2ll(VALUE);
LONG_LONG         287 ruby.h         unsigned LONG_LONG rb_num2ull(VALUE);
LONG_LONG         836 sprintf.c      #  define quad_t LONG_LONG
LONG_LONG         837 sprintf.c      #  define u_quad_t unsigned LONG_LONG


LONG_MAX

LONG_MAX         2241 array.c            if (LONG_MAX/len < RARRAY(ary)->len) {
LONG_MAX         1200 io.c           	    if (siz > LONG_MAX) {
LONG_MAX         3942 io.c           	if (ofp->refcnt == LONG_MAX) {
LONG_MAX           94 missing/vsnprintf.c # ifndef LONG_MAX
LONG_MAX          389 missing/vsnprintf.c 		if (val > LONG_MAX) {
LONG_MAX         1466 numeric.c      	if (RFLOAT(val)->value <= (double)LONG_MAX
LONG_MAX          445 random.c       	if (RFLOAT(vmax)->value <= LONG_MAX && RFLOAT(vmax)->value >= LONG_MIN) {
LONG_MAX          103 ruby.h         # ifndef LONG_MAX
LONG_MAX          112 ruby.h         #  define LONG_MIN (-LONG_MAX-1)
LONG_MAX          145 ruby.h         #define FIXNUM_MAX (LONG_MAX>>1)
LONG_MAX          379 string.c           if (len && LONG_MAX/len <  RSTRING(str)->len) {


LONG_MIN

LONG_MIN          745 bignum.c           if ((long)num < 0 && (RBIGNUM(x)->sign || (long)num != LONG_MIN)) {
LONG_MIN         1467 numeric.c      	    && RFLOAT(val)->value >= (double)LONG_MIN) {
LONG_MIN          445 random.c       	if (RFLOAT(vmax)->value <= LONG_MAX && RFLOAT(vmax)->value >= LONG_MIN) {
LONG_MIN          111 ruby.h         # ifndef LONG_MIN
LONG_MIN          146 ruby.h         #define FIXNUM_MIN RSHIFT((long)LONG_MIN,1)


LOOKUP_ORDERS

LOOKUP_ORDERS     128 ext/socket/socket.c static int lookup_order_table[LOOKUP_ORDERS] = {
LOOKUP_ORDERS     152 ext/socket/socket.c     for (i = 0; i < LOOKUP_ORDERS; i++) {


L_SET

L_SET              30 ext/sdbm/_sdbm.c #define SEEK_SET	L_SET
L_SET               8 missing/file.h #ifndef L_SET


LengthType

LengthType        210 regcomp.c        LengthType l = (LengthType )len;
LengthType       5153 regcomp.c        LengthType len;
LengthType       1206 regexec.c        LengthType tlen, tlen2;
LengthType        643 regint.h       #define SIZE_LENGTH        sizeof(LengthType)
LengthType        669 regint.h       #define GET_LENGTH_INC(len,p)      PLATFORM_GET_INC(len,    p, LengthType)


LoadLibrary

LoadLibrary      1288 dln.c              if ((handle = LoadLibrary(winfile)) == NULL) {
LoadLibrary        53 ext/Win32API/Win32API.c     hdll = LoadLibrary(RSTRING(dllname)->ptr);
LoadLibrary        22 ext/dl/dl.h    #   define dlopen(name,flag) ((void*)LoadLibrary(name))
LoadLibrary        66 ext/tk/stubs.c # define DL_OPEN LoadLibrary
LoadLibrary      1576 ext/win32ole/win32ole.c         gole32 = LoadLibrary("OLE32");
LoadLibrary      1917 ext/win32ole/win32ole.c         ghhctrl = LoadLibrary("HHCTRL.OCX");


LockFile

LockFile          298 win32/win32.c  	    LK_ERR(LockFile(fh, 0, 0, LK_LEN, LK_LEN), i);
LockFile          302 win32/win32.c  	LK_ERR(LockFile(fh, 0, 0, LK_LEN, LK_LEN), i);
LockFile          127 wince/wince.h  BOOL LockFile(HANDLE hFile,


LockFileEx

LockFileEx        263 win32/win32.c  	LK_ERR(LockFileEx(fh, 0, 0, LK_LEN, LK_LEN, &o), i);
LockFileEx        266 win32/win32.c  	LK_ERR(LockFileEx(fh, LOCKFILE_EXCLUSIVE_LOCK, 0, LK_LEN, LK_LEN, &o), i);
LockFileEx        269 win32/win32.c  	LK_ERR(LockFileEx(fh, LOCKFILE_FAIL_IMMEDIATELY, 0, LK_LEN, LK_LEN, &o), i);
LockFileEx        272 win32/win32.c  	LK_ERR(LockFileEx(fh,
LockFileEx        130 wince/wince.h  BOOL LockFileEx(HANDLE hFile,


M

M                 138 random.c           for (j=N-M+1; --j; p++)
M                 139 random.c               *p = p[M] ^ TWIST(p[0], p[1]);
M                 141 random.c           for (j=M; --j; p++)
M                 142 random.c               *p = p[M-N] ^ TWIST(p[0], p[1]);
M                 144 random.c           *p = p[M-N] ^ TWIST(p[0], state[0]);


MANT_BITS

MANT_BITS         217 marshal.c      	    d = modf(ldexp(d, MANT_BITS), &n);
MANT_BITS         219 marshal.c      #if MANT_BITS > 24
MANT_BITS         222 marshal.c      #if MANT_BITS > 16
MANT_BITS         225 marshal.c      #if MANT_BITS > 8
MANT_BITS         247 marshal.c      #if MANT_BITS > 24
MANT_BITS         250 marshal.c      #if MANT_BITS > 16
MANT_BITS         253 marshal.c      #if MANT_BITS > 8
MANT_BITS         257 marshal.c      	    dig -= len < MANT_BITS / 8 ? 8 * (unsigned)len : MANT_BITS;
MANT_BITS         259 marshal.c      	} while ((len -= MANT_BITS / 8) > 0);


MARK_STACK_EMPTY

MARK_STACK_EMPTY 1346 gc.c           	while (!MARK_STACK_EMPTY) {
MARK_STACK_EMPTY 1355 gc.c               } while (!MARK_STACK_EMPTY);


MARK_STACK_MAX

MARK_STACK_MAX    501 gc.c           static VALUE mark_stack[MARK_STACK_MAX];
MARK_STACK_MAX    578 gc.c               VALUE tmp_arry[MARK_STACK_MAX];
MARK_STACK_MAX    582 gc.c               MEMCPY(tmp_arry, mark_stack, VALUE, MARK_STACK_MAX);
MARK_STACK_MAX    696 gc.c           	    if (mark_stack_ptr - mark_stack < MARK_STACK_MAX) {


MARSHAL_MAJOR

MARSHAL_MAJOR     724 marshal.c          w_byte(MARSHAL_MAJOR, &arg);
MARSHAL_MAJOR    1340 marshal.c          if (major != MARSHAL_MAJOR || minor > MARSHAL_MINOR) {
MARSHAL_MAJOR    1343 marshal.c      		 MARSHAL_MAJOR, MARSHAL_MINOR, major, minor);
MARSHAL_MAJOR    1348 marshal.c      		MARSHAL_MAJOR, MARSHAL_MINOR, major, minor);
MARSHAL_MAJOR    1414 marshal.c          rb_define_const(rb_mMarshal, "MAJOR_VERSION", INT2FIX(MARSHAL_MAJOR));


MARSHAL_MINOR

MARSHAL_MINOR     725 marshal.c          w_byte(MARSHAL_MINOR, &arg);
MARSHAL_MINOR    1340 marshal.c          if (major != MARSHAL_MAJOR || minor > MARSHAL_MINOR) {
MARSHAL_MINOR    1343 marshal.c      		 MARSHAL_MAJOR, MARSHAL_MINOR, major, minor);
MARSHAL_MINOR    1345 marshal.c          if (RTEST(ruby_verbose) && minor != MARSHAL_MINOR) {
MARSHAL_MINOR    1348 marshal.c      		MARSHAL_MAJOR, MARSHAL_MINOR, major, minor);
MARSHAL_MINOR    1415 marshal.c          rb_define_const(rb_mMarshal, "MINOR_VERSION", INT2FIX(MARSHAL_MINOR));


MATCHED

MATCHED           454 ext/strscan/strscan.c     MATCHED(p);
MATCHED           708 ext/strscan/strscan.c     MATCHED(p);
MATCHED           743 ext/strscan/strscan.c     MATCHED(p);


MATCHED_P

MATCHED_P         820 ext/strscan/strscan.c     if (! MATCHED_P(p))
MATCHED_P         917 ext/strscan/strscan.c     return MATCHED_P(p) ? Qtrue : Qfalse;
MATCHED_P         934 ext/strscan/strscan.c     if (! MATCHED_P(p)) return Qnil;
MATCHED_P         956 ext/strscan/strscan.c     if (! MATCHED_P(p)) return Qnil;
MATCHED_P         994 ext/strscan/strscan.c     if (! MATCHED_P(p))        return Qnil;
MATCHED_P        1023 ext/strscan/strscan.c     if (! MATCHED_P(p)) return Qnil;
MATCHED_P        1043 ext/strscan/strscan.c     if (! MATCHED_P(p)) return Qnil;


MATCH_AND_RETURN_CHECK

MATCH_AND_RETURN_CHECK 3325 regexec.c            MATCH_AND_RETURN_CHECK;
MATCH_AND_RETURN_CHECK 3367 regexec.c      	    MATCH_AND_RETURN_CHECK;
MATCH_AND_RETURN_CHECK 3391 regexec.c            MATCH_AND_RETURN_CHECK;
MATCH_AND_RETURN_CHECK 3419 regexec.c      	    MATCH_AND_RETURN_CHECK;
MATCH_AND_RETURN_CHECK 3447 regexec.c            MATCH_AND_RETURN_CHECK;


MATCH_ARG_FREE

MATCH_ARG_FREE   1010 regexec.c          MATCH_ARG_FREE(*(ta->msa));
MATCH_ARG_FREE   2954 regexec.c        MATCH_ARG_FREE(msa);
MATCH_ARG_FREE   3456 regexec.c        MATCH_ARG_FREE(msa);
MATCH_ARG_FREE   3487 regexec.c        MATCH_ARG_FREE(msa);


MATCH_ARG_INIT

MATCH_ARG_INIT   2937 regexec.c        MATCH_ARG_INIT(msa, option, region, at);
MATCH_ARG_INIT   3324 regexec.c            MATCH_ARG_INIT(msa, option, region, start);
MATCH_ARG_INIT   3336 regexec.c        MATCH_ARG_INIT(msa, option, region, start);


MATCH_BUSY

MATCH_BUSY        787 re.c               FL_SET(match, MATCH_BUSY);
MATCH_BUSY        933 re.c               if (NIL_P(match) || FL_TEST(match, MATCH_BUSY)) {


MATCH_DATA

MATCH_DATA       2337 eval.c         	if (RTEST(rb_reg_nth_defined(node->nd_nth, MATCH_DATA))) {
MATCH_DATA       2345 eval.c         	if (RTEST(rb_reg_nth_defined(0, MATCH_DATA))) {
MATCH_DATA       3576 eval.c         	result = rb_reg_nth_match(node->nd_nth, MATCH_DATA);
MATCH_DATA       3582 eval.c         	    result = rb_reg_last_match(MATCH_DATA);
MATCH_DATA       3585 eval.c         	    result = rb_reg_match_pre(MATCH_DATA);
MATCH_DATA       3588 eval.c         	    result = rb_reg_match_post(MATCH_DATA);
MATCH_DATA       3591 eval.c         	    result = rb_reg_match_last(MATCH_DATA);


MAX

MAX               220 regint.h       #ifdef MAX
MAX              1852 regparse.c     	from = MAX(from1, from2);


MAXCHILDNUM

MAXCHILDNUM       445 win32/win32.c  } ChildRecord[MAXCHILDNUM];
MAXCHILDNUM      2838 win32/win32.c  	HANDLE events[MAXCHILDNUM + 1];


MAXEXP

MAXEXP            429 missing/vsnprintf.c #ifndef MAXEXP
MAXEXP            437 missing/vsnprintf.c #define	BUF		(MAXEXP+MAXFRACT+1)	/* + decimal point */
MAXEXP           1059 missing/vsnprintf.c 	char expbuf[MAXEXP];
MAXEXP           1069 missing/vsnprintf.c 	t = expbuf + MAXEXP;
MAXEXP           1075 missing/vsnprintf.c 		for (; t < expbuf + MAXEXP; *p++ = *t++);


MAXFRACT

MAXFRACT          433 missing/vsnprintf.c #ifndef MAXFRACT
MAXFRACT          437 missing/vsnprintf.c #define	BUF		(MAXEXP+MAXFRACT+1)	/* + decimal point */


MAXPATHLEN

MAXPATHLEN         64 dln.c          #ifndef MAXPATHLEN
MAXPATHLEN        381 dln.c          	char buf[MAXPATHLEN];
MAXPATHLEN        410 dln.c          	    if (p-buf >= MAXPATHLEN) {
MAXPATHLEN       1276 dln.c              char winfile[MAXPATHLEN];
MAXPATHLEN       1280 dln.c              if (strlen(file) >= MAXPATHLEN) rb_loaderror("filename too long");
MAXPATHLEN       1491 dln.c          	char real_name[MAXPATHLEN];
MAXPATHLEN       1528 dln.c                char fullpath[MAXPATHLEN];
MAXPATHLEN       1666 dln.c          static char fbuf[MAXPATHLEN];
MAXPATHLEN         38 file.c         #ifndef MAXPATHLEN
MAXPATHLEN       2600 file.c             return file_expand_path(fname, dname, rb_str_new(0, MAXPATHLEN + 2));
MAXPATHLEN         39 ruby.c         #ifndef MAXPATHLEN
MAXPATHLEN        259 ruby.c             char libpath[MAXPATHLEN+1];
MAXPATHLEN       1036 win32/win32.c      char buffer[MAXPATHLEN], *buf = buffer;
MAXPATHLEN       1040 win32/win32.c      if (patt->len >= MAXPATHLEN)


MAXRECOVER

MAXRECOVER       3652 ext/nkf/nkf-utf8/nkf.c     int r[MAXRECOVER];    /* recovery buffer, max mime pattern lenght */
MAXRECOVER       3731 ext/nkf/nkf-utf8/nkf.c     for(i=2;i<MAXRECOVER;i++) {                   /* start at =? */
MAXRECOVER       3746 ext/nkf/nkf-utf8/nkf.c             if (!(++i<MAXRECOVER) || c1==EOF) break;
MAXRECOVER       3755 ext/nkf/nkf-utf8/nkf.c             if (!(++i<MAXRECOVER) || c1==EOF) break;


MAXTIME

MAXTIME           886 missing/strftime.c 	char string[MAXTIME];
MAXTIME           901 missing/strftime.c 		length = strftime(string, MAXTIME, next, tm);


MAX_ERROR_PAR_LEN

MAX_ERROR_PAR_LEN  207 regerror.c     	  if (len > MAX_ERROR_PAR_LEN) {
MAX_ERROR_PAR_LEN  208 regerror.c     	    xmemcpy(p, einfo->par, MAX_ERROR_PAR_LEN - 3);
MAX_ERROR_PAR_LEN  209 regerror.c     	    p += (MAX_ERROR_PAR_LEN - 3);


MBCODE_START_POS

MBCODE_START_POS  115 regparse.c       add_code_range_to_buf(pbuf, MBCODE_START_POS(enc), ~((OnigCodePoint )0))
MBCODE_START_POS 1693 regparse.c       pre = MBCODE_START_POS(enc);


MC_ESC

MC_ESC            265 regerror.c           if (*p == MC_ESC(enc)) {
MC_ESC            271 regerror.c     	*s++ = (unsigned char )MC_ESC(enc);
MC_ESC           2292 regparse.c         if (c != MC_ESC(enc)) goto invalid;
MC_ESC           2335 regparse.c           if (c == MC_ESC(enc)) {
MC_ESC           2361 regparse.c           if (c == MC_ESC(enc)) {
MC_ESC           2596 regparse.c     	else if (x == MC_ESC(enc)) in_esc = 1;
MC_ESC           2632 regparse.c       else if (c == MC_ESC(enc)) {
MC_ESC           2836 regparse.c       if (c == MC_ESC(enc)) {
MC_ESC           3326 regparse.c                 if (c == MC_ESC(enc)) {
MC_ESC           3900 regparse.c           if (code == MC_ESC(enc)) in_esc = 1;
MC_ESC           4789 regparse.c           end_op[0] = (OnigCodePoint )MC_ESC(env->enc);


MD5_CTX

MD5_CTX            72 ext/digest/md5/md5.c 	MD5_CTX state;
MD5_CTX           191 ext/digest/md5/md5.c md5_process(MD5_CTX *pms, const uint8_t *data /*[64]*/)
MD5_CTX           346 ext/digest/md5/md5.c MD5_Init(MD5_CTX *pms)
MD5_CTX           356 ext/digest/md5/md5.c MD5_Update(MD5_CTX *pms, const uint8_t *data, size_t nbytes)
MD5_CTX           394 ext/digest/md5/md5.c MD5_Final(uint8_t *digest, MD5_CTX *pms)
MD5_CTX           417 ext/digest/md5/md5.c MD5_End(MD5_CTX *pctx, uint8_t *hexdigest)
MD5_CTX           428 ext/digest/md5/md5.c int MD5_Equal(MD5_CTX* pctx1, MD5_CTX* pctx2) {
MD5_CTX            73 ext/digest/md5/md5.h void	MD5_Init _((MD5_CTX *pms));
MD5_CTX            74 ext/digest/md5/md5.h void	MD5_Update _((MD5_CTX *pms, const uint8_t *data, size_t nbytes));
MD5_CTX            75 ext/digest/md5/md5.h void	MD5_Final _((uint8_t *digest, MD5_CTX *pms));
MD5_CTX            76 ext/digest/md5/md5.h void	MD5_End _((MD5_CTX *pctx, uint8_t *hexdigest));
MD5_CTX            77 ext/digest/md5/md5.h int	MD5_Equal _((MD5_CTX *pctx1, MD5_CTX *pctx2));
MD5_CTX            13 ext/digest/md5/md5init.c     sizeof(MD5_CTX),
MD5_CTX             9 ext/digest/md5/md5ossl.c MD5_End(MD5_CTX *pctx, unsigned char *hexdigest)
MD5_CTX            21 ext/digest/md5/md5ossl.c MD5_Equal(MD5_CTX* pctx1, MD5_CTX* pctx2) {
MD5_CTX             9 ext/digest/md5/md5ossl.h void MD5_End(MD5_CTX *pctx, unsigned char *hexdigest);
MD5_CTX            10 ext/digest/md5/md5ossl.h int MD5_Equal(MD5_CTX *pctx1, MD5_CTX *pctx2);


MD5_DIGEST_LENGTH

MD5_DIGEST_LENGTH   81 ext/digest/md5/md5.h #define MD5_DIGEST_STRING_LENGTH	(MD5_DIGEST_LENGTH * 2 + 1)
MD5_DIGEST_LENGTH   12 ext/digest/md5/md5init.c     MD5_DIGEST_LENGTH,


MD5_End

MD5_End            76 ext/digest/md5/md5.h void	MD5_End _((MD5_CTX *pctx, uint8_t *hexdigest));
MD5_End            16 ext/digest/md5/md5init.c     (hash_end_func_t)MD5_End,
MD5_End             9 ext/digest/md5/md5ossl.h void MD5_End(MD5_CTX *pctx, unsigned char *hexdigest);


MD5_Equal

MD5_Equal          77 ext/digest/md5/md5.h int	MD5_Equal _((MD5_CTX *pctx1, MD5_CTX *pctx2));
MD5_Equal          18 ext/digest/md5/md5init.c     (hash_equal_func_t)MD5_Equal,
MD5_Equal          10 ext/digest/md5/md5ossl.h int MD5_Equal(MD5_CTX *pctx1, MD5_CTX *pctx2);


MD5_Final

MD5_Final          79 ext/digest/md5/md5.c 	MD5_Final(digest, &state);
MD5_Final         422 ext/digest/md5/md5.c     MD5_Final(digest, pctx);
MD5_Final          75 ext/digest/md5/md5.h void	MD5_Final _((uint8_t *digest, MD5_CTX *pms));
MD5_Final          17 ext/digest/md5/md5init.c     (hash_final_func_t)MD5_Final,
MD5_Final          14 ext/digest/md5/md5ossl.c     MD5_Final(digest, pctx);


MD5_Init

MD5_Init           77 ext/digest/md5/md5.c 	MD5_Init(&state);
MD5_Init           73 ext/digest/md5/md5.h void	MD5_Init _((MD5_CTX *pms));
MD5_Init           14 ext/digest/md5/md5init.c     (hash_init_func_t)MD5_Init,


MD5_Update

MD5_Update         78 ext/digest/md5/md5.c 	MD5_Update(&state, (const uint8_t *)test[i], strlen(test[i]));
MD5_Update        409 ext/digest/md5/md5.c     MD5_Update(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1);
MD5_Update        411 ext/digest/md5/md5.c     MD5_Update(pms, data, 8);
MD5_Update         74 ext/digest/md5/md5.h void	MD5_Update _((MD5_CTX *pms, const uint8_t *data, size_t nbytes));
MD5_Update         15 ext/digest/md5/md5init.c     (hash_update_func_t)MD5_Update,


MEMCMP

MEMCMP            945 bignum.c           if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM(y)->len) != 0) return Qfalse;
MEMCMP            966 bignum.c           if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM(y)->len) != 0) return Qfalse;
MEMCMP            877 ext/stringio/stringio.c 		    if (MEMCMP(p, RSTRING(str)->ptr, char, n) == 0) {
MEMCMP            225 ext/win32ole/win32ole.c     if (MEMCMP(riid, &IID_IUnknown, GUID, 1) == 0
MEMCMP            226 ext/win32ole/win32ole.c         || MEMCMP(riid, &IID_IDispatch, GUID, 1) == 0)


MEMCPY

MEMCPY             64 array.c        	MEMCPY(ptr, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
MEMCPY            165 array.c        	MEMCPY(RARRAY(ary)->ptr, elts, VALUE, n);
MEMCPY            198 array.c        	MEMCPY(RARRAY(val)->ptr, elts, VALUE, n);
MEMCPY            382 array.c        	MEMCPY(RARRAY(ary)->ptr, argv, VALUE, argc);
MEMCPY            636 array.c            MEMCPY(RARRAY(ary)->ptr, argv, VALUE, argc);
MEMCPY           1002 array.c        	    MEMCPY(RARRAY(ary)->ptr + beg, RARRAY(rpl)->ptr, VALUE, rlen);
MEMCPY           1240 array.c            MEMCPY(RARRAY(dup)->ptr, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
MEMCPY           2183 array.c            MEMCPY(RARRAY(z)->ptr, RARRAY(x)->ptr, VALUE, RARRAY(x)->len);
MEMCPY           2184 array.c            MEMCPY(RARRAY(z)->ptr + RARRAY(x)->len, RARRAY(y)->ptr, VALUE, RARRAY(y)->len);
MEMCPY           2250 array.c        	MEMCPY(RARRAY(ary2)->ptr+i, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
MEMCPY             60 bignum.c           MEMCPY(BDIGITS(z), BDIGITS(x), BDIGIT, RBIGNUM(x)->len);
MEMCPY            510 bignum.c       	    MEMCPY(p, s, char, len);
MEMCPY           1325 dir.c              MEMCPY(buf, start, char, n);
MEMCPY           2093 eval.c         	MEMCPY(copy->nd_tbl, node->nd_tbl, ID, node->nd_tbl[0]+1);
MEMCPY           2140 eval.c         	MEMCPY(argv, RARRAY(args)->ptr, VALUE, argc);\
MEMCPY           5414 eval.c             MEMCPY(nargv+1, argv, VALUE, argc);
MEMCPY           5532 eval.c         	    MEMCPY(local_vars+2, argv, VALUE, i);
MEMCPY           5827 eval.c             MEMCPY(argv, RARRAY(args)->ptr, VALUE, argc);
MEMCPY           7820 eval.c         	MEMCPY(vars, scope->local_vars, VALUE, tbl[0]);
MEMCPY           7892 eval.c         	MEMCPY(tmp, block->prev, struct BLOCK, 1);
MEMCPY           7910 eval.c             MEMCPY(dup, orig, struct BLOCK, 1);
MEMCPY           8508 eval.c             MEMCPY(data, orig, struct BLOCK, 1);
MEMCPY           10115 eval.c             MEMCPY(th->stk_ptr, th->stk_pos, VALUE, th->stk_len);
MEMCPY           10128 eval.c             MEMCPY(th->bstr_ptr, th->bstr_pos, VALUE, th->bstr_len);
MEMCPY           10239 eval.c             MEMCPY(tmp->stk_pos, tmp->stk_ptr, VALUE, tmp->stk_len);
MEMCPY           10241 eval.c             MEMCPY(tmp->bstr_pos, tmp->bstr_ptr, VALUE, tmp->bstr_len);
MEMCPY            154 ext/socket/socket.c 	MEMCPY(&tmp_hints, hints, struct addrinfo, 1);
MEMCPY           1132 ext/stringio/stringio.c 	MEMCPY(RSTRING(str)->ptr, RSTRING(ptr->string)->ptr + ptr->pos, char, len);
MEMCPY            272 ext/syck/rubyext.c         MEMCPY(padded, ptr + 1, char, end - (ptr + 1));
MEMCPY            627 ext/syck/rubyext.c         MEMCPY((void *)n->id, (void *)obj, RVALUE, 1);
MEMCPY           1749 ext/syck/rubyext.c     MEMCPY( copy_n, orig_n, SyckNode, 1 );
MEMCPY           5499 ext/tk/tcltklib.c         MEMCPY(temp, argv, VALUE, argc);
MEMCPY            525 gc.c           	MEMCPY(ptr, f, char, len);
MEMCPY            582 gc.c               MEMCPY(tmp_arry, mark_stack, VALUE, MARK_STACK_MAX);
MEMCPY           1177 io.c               MEMCPY(ptr, RSTRING(str)->ptr, char, n);
MEMCPY           3031 io.c           	MEMCPY(argv, RARRAY(tmp)->ptr, VALUE, RARRAY(tmp)->len);
MEMCPY           1054 marshal.c      	    MEMCPY(digits, RSTRING(data)->ptr, char, len * 2);
MEMCPY           2131 object.c       	    MEMCPY(p, s, char, len);
MEMCPY           4523 parse.y        	MEMCPY(buf, p, char, len);
MEMCPY           5490 parse.y        	   MEMCPY(RSTRING(_s)->ptr, (_p), char, (_n)), (_s)) \
MEMCPY           8078 parse.y        	MEMCPY(lvtbl->tbl, ruby_scope->local_tbl, ID, lvtbl->cnt+1);
MEMCPY           8103 parse.y        		    MEMCPY(vars, ruby_scope->local_vars, VALUE, i);
MEMCPY            923 ruby.c         			MEMCPY(argv+2, origargv+1, char*, origargc);
MEMCPY            862 sprintf.c      	MEMCPY(buf, iov->iov_base, char, n = iov->iov_len);
MEMCPY            318 struct.c           MEMCPY(RSTRUCT(self)->ptr, RARRAY(values)->ptr, VALUE, RARRAY(values)->len);
MEMCPY            513 struct.c           MEMCPY(RSTRUCT(copy)->ptr, RSTRUCT(s)->ptr, VALUE, RSTRUCT(copy)->len);
MEMCPY           1003 time.c             MEMCPY(tcopy, tobj, struct time_object, 1);


MEMCPY_BCOPY

MEMCPY_BCOPY      290 ext/digest/sha2/sha2.c 	MEMCPY_BCOPY(context->state, sha256_initial_hash_value, SHA256_DIGEST_LENGTH);
MEMCPY_BCOPY      488 ext/digest/sha2/sha2.c 			MEMCPY_BCOPY(&context->buffer[usedspace], data, freespace);
MEMCPY_BCOPY      495 ext/digest/sha2/sha2.c 			MEMCPY_BCOPY(&context->buffer[usedspace], data, len);
MEMCPY_BCOPY      511 ext/digest/sha2/sha2.c 		MEMCPY_BCOPY(context->buffer, data, len);
MEMCPY_BCOPY      572 ext/digest/sha2/sha2.c 		MEMCPY_BCOPY(d, context->state, SHA256_DIGEST_LENGTH);
MEMCPY_BCOPY      592 ext/digest/sha2/sha2.c 	MEMCPY_BCOPY(context->state, sha512_initial_hash_value, SHA512_DIGEST_LENGTH);
MEMCPY_BCOPY      784 ext/digest/sha2/sha2.c 			MEMCPY_BCOPY(&context->buffer[usedspace], data, freespace);
MEMCPY_BCOPY      791 ext/digest/sha2/sha2.c 			MEMCPY_BCOPY(&context->buffer[usedspace], data, len);
MEMCPY_BCOPY      807 ext/digest/sha2/sha2.c 		MEMCPY_BCOPY(context->buffer, data, len);
MEMCPY_BCOPY      876 ext/digest/sha2/sha2.c 		MEMCPY_BCOPY(d, context->state, SHA512_DIGEST_LENGTH);
MEMCPY_BCOPY      895 ext/digest/sha2/sha2.c 	MEMCPY_BCOPY(context->state, sha384_initial_hash_value, SHA512_DIGEST_LENGTH);
MEMCPY_BCOPY      925 ext/digest/sha2/sha2.c 		MEMCPY_BCOPY(d, context->state, SHA384_DIGEST_LENGTH);


MEMMOVE

MEMMOVE           604 array.c            MEMMOVE(RARRAY(ary)->ptr + 1, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
MEMMOVE           635 array.c            MEMMOVE(RARRAY(ary)->ptr + argc, RARRAY(ary)->ptr, VALUE, len);
MEMMOVE          1020 array.c        	    MEMMOVE(RARRAY(ary)->ptr + beg + rlen, RARRAY(ary)->ptr + beg + len,
MEMMOVE          1025 array.c        	    MEMMOVE(RARRAY(ary)->ptr + beg, RARRAY(rpl)->ptr, VALUE, rlen);
MEMMOVE           815 ext/sdbm/_sdbm.c #ifdef MEMMOVE
MEMMOVE           278 io.c                       MEMMOVE(fptr->rbuf+1, fptr->rbuf, char, fptr->rbuf_len);
MEMMOVE           562 io.c                           MEMMOVE(fptr->wbuf, fptr->wbuf+fptr->wbuf_off, char, fptr->wbuf_len);
MEMMOVE           565 io.c                       MEMMOVE(fptr->wbuf+fptr->wbuf_off+fptr->wbuf_len, RSTRING(str)->ptr+offset, char, len);
MEMMOVE           605 io.c                       MEMMOVE(fptr->wbuf, fptr->wbuf+fptr->wbuf_off, char, fptr->wbuf_len);
MEMMOVE           608 io.c               MEMMOVE(fptr->wbuf+fptr->wbuf_off+fptr->wbuf_len, RSTRING(str)->ptr+offset, char, len);
MEMMOVE          1133 io.c               MEMMOVE(ptr, fptr->rbuf+fptr->rbuf_off, char, n);


MEMSET_BZERO

MEMSET_BZERO      291 ext/digest/sha2/sha2.c 	MEMSET_BZERO(context->buffer, SHA256_BLOCK_LENGTH);
MEMSET_BZERO      538 ext/digest/sha2/sha2.c 				MEMSET_BZERO(&context->buffer[usedspace], SHA256_SHORT_BLOCK_LENGTH - usedspace);
MEMSET_BZERO      541 ext/digest/sha2/sha2.c 					MEMSET_BZERO(&context->buffer[usedspace], SHA256_BLOCK_LENGTH - usedspace);
MEMSET_BZERO      547 ext/digest/sha2/sha2.c 				MEMSET_BZERO(context->buffer, SHA256_SHORT_BLOCK_LENGTH);
MEMSET_BZERO      551 ext/digest/sha2/sha2.c 			MEMSET_BZERO(context->buffer, SHA256_SHORT_BLOCK_LENGTH);
MEMSET_BZERO      577 ext/digest/sha2/sha2.c 	MEMSET_BZERO(context, sizeof(SHA256_CTX));
MEMSET_BZERO      593 ext/digest/sha2/sha2.c 	MEMSET_BZERO(context->buffer, SHA512_BLOCK_LENGTH);
MEMSET_BZERO      829 ext/digest/sha2/sha2.c 			MEMSET_BZERO(&context->buffer[usedspace], SHA512_SHORT_BLOCK_LENGTH - usedspace);
MEMSET_BZERO      832 ext/digest/sha2/sha2.c 				MEMSET_BZERO(&context->buffer[usedspace], SHA512_BLOCK_LENGTH - usedspace);
MEMSET_BZERO      838 ext/digest/sha2/sha2.c 			MEMSET_BZERO(context->buffer, SHA512_BLOCK_LENGTH - 2);
MEMSET_BZERO      842 ext/digest/sha2/sha2.c 		MEMSET_BZERO(context->buffer, SHA512_SHORT_BLOCK_LENGTH);
MEMSET_BZERO      881 ext/digest/sha2/sha2.c 	MEMSET_BZERO(context, sizeof(SHA512_CTX));
MEMSET_BZERO      896 ext/digest/sha2/sha2.c 	MEMSET_BZERO(context->buffer, SHA384_BLOCK_LENGTH);
MEMSET_BZERO      930 ext/digest/sha2/sha2.c 	MEMSET_BZERO(context, sizeof(SHA384_CTX));


MEMZERO

MEMZERO          9600 eval.c         	MEMZERO(fds->fdset, fd_mask, howmany(fds->maxfd, NFDBITS));
MEMZERO           700 ext/socket/socket.c     MEMZERO(&sin, struct sockaddr_in, 1);
MEMZERO           810 ext/socket/socket.c     MEMZERO(&hints, struct addrinfo, 1);
MEMZERO          1482 ext/socket/socket.c     MEMZERO(&sockaddr, struct sockaddr_un, 1);
MEMZERO          2862 ext/socket/socket.c     MEMZERO(&hints, struct addrinfo, 1);
MEMZERO          2937 ext/socket/socket.c 	MEMZERO(&hints, struct addrinfo, 1);
MEMZERO          3078 ext/socket/socket.c     MEMZERO(&sockaddr, struct sockaddr_un, 1);
MEMZERO           731 ext/stringio/stringio.c 	    MEMZERO(RSTRING(ptr->string)->ptr + olen, char, pos - olen);
MEMZERO          1219 ext/stringio/stringio.c 	MEMZERO(RSTRING(string)->ptr + plen, char, l - plen);
MEMZERO           178 ext/strscan/strscan.c     MEMZERO(p, struct strscanner, 1);
MEMZERO           628 ext/syck/rubyext.c         MEMZERO((void *)obj, RVALUE, 1);
MEMZERO           391 gc.c               MEMZERO((void*)obj, RVALUE, 1);
MEMZERO          3391 io.c           	MEMZERO(fptr, OpenFile, 1);
MEMZERO          1056 marshal.c      	    MEMZERO((char *)digits + len * 2, char,
MEMZERO          8741 parse.y            MEMZERO(p, struct parser_params, 1);
MEMZERO          9082 parse.y            MEMZERO(p, struct parser_params, 1);
MEMZERO           659 re.c               MEMZERO(match->regs, struct re_registers, 1);
MEMZERO          1552 string.c       	MEMZERO(RSTRING(str)->ptr + RSTRING(str)->len, char, -len);
MEMZERO           285 time.c             MEMZERO(tm, struct tm, 1);
MEMZERO           313 util.c             MEMZERO(p, struct PathList, 1);
MEMZERO          1015 win32/win32.c      MEMZERO(tmpcurr, NtCmdLineElement, 1);
MEMZERO          1277 win32/win32.c  	MEMZERO(curr, NtCmdLineElement, 1);


MIMEOUT_BUF_LENGTH

MIMEOUT_BUF_LENGTH 4356 ext/nkf/nkf-utf8/nkf.c char mimeout_buf[MIMEOUT_BUF_LENGTH+1];
MIMEOUT_BUF_LENGTH 4625 ext/nkf/nkf-utf8/nkf.c                 if (mimeout_buf_count>MIMEOUT_BUF_LENGTH) {
MIMEOUT_BUF_LENGTH 4678 ext/nkf/nkf-utf8/nkf.c                 if (mimeout_buf_count>MIMEOUT_BUF_LENGTH) {
MIMEOUT_BUF_LENGTH 4690 ext/nkf/nkf-utf8/nkf.c                 if (mimeout_buf_count>MIMEOUT_BUF_LENGTH) {


MIME_BUF_MASK

MIME_BUF_MASK     375 ext/nkf/nkf-utf8/nkf.c #define Fifo(n)         mime_buf[(n)&MIME_BUF_MASK]
MIME_BUF_MASK    4305 ext/nkf/nkf-utf8/nkf.c         if (((mime_input-mime_top)&MIME_BUF_MASK)==0) {


MIME_BUF_SIZE

MIME_BUF_SIZE     374 ext/nkf/nkf-utf8/nkf.c #define MIME_BUF_MASK   (MIME_BUF_SIZE-1)
MIME_BUF_SIZE     376 ext/nkf/nkf-utf8/nkf.c STATIC unsigned char           mime_buf[MIME_BUF_SIZE];


MIN

MIN               217 regint.h       #ifdef MIN
MIN              1853 regparse.c     	to   = MIN(to1, to2);


MODE_BINARY

MODE_BINARY      2541 io.c           	    return MODE_BINARY("a+", "ab+");
MODE_BINARY      2543 io.c           	return MODE_BINARY("a", "ab");
MODE_BINARY      2547 io.c           	return MODE_BINARY("r", "rb");
MODE_BINARY      2549 io.c           	return MODE_BINARY("w", "wb");
MODE_BINARY      2551 io.c           	return MODE_BINARY("r+", "rb+");


MODE_BINMODE

MODE_BINMODE     2402 io.c           	    return MODE_BINMODE("a+", "ab+");
MODE_BINMODE     2404 io.c           	return MODE_BINMODE("a", "ab");
MODE_BINMODE     2408 io.c           	return MODE_BINMODE("r", "rb");
MODE_BINMODE     2410 io.c           	return MODE_BINMODE("w", "wb");
MODE_BINMODE     2413 io.c           	    return MODE_BINMODE("w+", "wb+");
MODE_BINMODE     2415 io.c           	return MODE_BINMODE("r+", "rb+");


MOVB

MOVB              807 ext/sdbm/_sdbm.c 				MOVB;	case 7:	MOVB;
MOVB              808 ext/sdbm/_sdbm.c 			case 6:	MOVB;	case 5:	MOVB;
MOVB              809 ext/sdbm/_sdbm.c 			case 4:	MOVB;	case 3:	MOVB;
MOVB              810 ext/sdbm/_sdbm.c 			case 2:	MOVB;	case 1:	MOVB;


MOVEFILE_REPLACE_EXISTING

MOVEFILE_REPLACE_EXISTING 3118 win32/win32.c  		    if (MoveFileEx(oldpath, newpath, MOVEFILE_REPLACE_EXISTING))
MOVEFILE_REPLACE_EXISTING  132 wince/wince.c  	if( (dwFlags&MOVEFILE_REPLACE_EXISTING)!=0 )


MSDOS

MSDOS              93 defines.h      #if defined(MSDOS) || defined(_WIN32) || defined(__human68k__) || defined(__EMX__)
MSDOS            1616 dln.c          #if defined(MSDOS) || defined(_WIN32) || defined(__human68k__) || defined(__MACOS__)
MSDOS            1781 dln.c          #if defined(MSDOS)
MSDOS              98 ext/nkf/nkf-utf8/nkf.c #if (defined(__TURBOC__) || defined(_MSC_VER) || defined(LSI_C) || defined(__MINGW32__)) && !defined(MSDOS)
MSDOS             116 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) || defined(__OS2__)
MSDOS             121 ext/nkf/nkf-utf8/nkf.c #ifdef MSDOS
MSDOS             149 ext/nkf/nkf-utf8/nkf.c #ifndef MSDOS /* UNIX, OS/2 */
MSDOS             397 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) || defined(__OS2__)
MSDOS             797 ext/nkf/nkf-utf8/nkf.c #ifdef MSDOS
MSDOS             865 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) && !defined(__MINGW32__) && !defined(__WIN32__)
MSDOS             885 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) && !defined(__MINGW32__) && !defined(__WIN32__)
MSDOS             897 ext/nkf/nkf-utf8/nkf.c #ifdef MSDOS
MSDOS            1179 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) || defined(__OS2__)
MSDOS            4746 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) || defined(__OS2__)
MSDOS            4899 ext/nkf/nkf-utf8/nkf.c #ifdef MSDOS
MSDOS            4937 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) && !defined(__WIN32__) && !defined(__WIN16__)
MSDOS            4940 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) && defined(__WIN16__)
MSDOS            4943 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) && defined(__WIN32__)
MSDOS              74 ext/sdbm/_sdbm.c #ifdef MSDOS
MSDOS             106 ext/sdbm/_sdbm.c #if !defined sun && !defined MSDOS && !defined _WIN32 && !defined __CYGWIN__ && !defined(errno)
MSDOS             360 ext/sdbm/_sdbm.c #if defined MSDOS || (defined _WIN32 && !defined __CYGWIN__)
MSDOS             387 ext/sdbm/_sdbm.c #if defined MSDOS || (defined _WIN32 && !defined __CYGWIN__)
MSDOS              55 ext/sdbm/sdbm.h #if defined(__STDC__) || defined(MSDOS)
MSDOS              65 gc.c           #if defined(MSDOS) || defined(__human68k__)
MSDOS            1736 hash.c         #ifndef MSDOS
MSDOS              30 io.c           #if defined(MSDOS) || defined(__BOW__) || defined(__CYGWIN__) || defined(_WIN32) || defined(__human68k__) || defined(__EMX__) || defined(__BEOS__)
MSDOS              34 io.c           #if defined(MSDOS) || defined(__CYGWIN__) || defined(_WIN32)
MSDOS            4569 io.c           #if !defined(MSDOS) && !defined(__human68k__)
MSDOS            4598 io.c           #if !defined(MSDOS) && !defined(__human68k__)
MSDOS             118 missing/strftime.c #if !defined(OS2) && !defined(MSDOS) && defined(HAVE_TZNAME)
MSDOS             930 process.c      #if (defined(MSDOS) && !defined(DJGPP)) || defined(__human68k__) || defined(__EMX__) || defined(OS2)
MSDOS             938 process.c      #if (defined(MSDOS) && !defined(DJGPP))
MSDOS            1015 process.c      #if defined(MSDOS)
MSDOS            1168 ruby.c         #ifdef MSDOS
MSDOS              69 util.c         #if defined(MSDOS) || defined(__CYGWIN32__) || defined(_WIN32)
MSDOS              42 util.h         #if defined(MSDOS) || defined(__CYGWIN32__) || defined(_WIN32)


MSVCRT_THREADS

MSVCRT_THREADS   1572 win32/win32.c  #ifdef MSVCRT_THREADS
MSVCRT_THREADS   1587 win32/win32.c  #ifdef MSVCRT_THREADS


MTHREAD_ONLY

MTHREAD_ONLY     1650 win32/win32.c  	MTHREAD_ONLY(EnterCriticalSection(&(_pioinfo(fh)->lock)));
MTHREAD_ONLY     1657 win32/win32.c  	MTHREAD_ONLY(LeaveCriticalSection(&_pioinfo(fh)->lock));


MUST_ALIGN

MUST_ALIGN        642 missing/crypt.c #if defined(MUST_ALIGN)
MUST_ALIGN        722 missing/crypt.c #if defined(MUST_ALIGN)


MY_BLOCK_SIZE

MY_BLOCK_SIZE     127 ext/gdbm/gdbm.c 	dbm = gdbm_open(RSTRING(file)->ptr, MY_BLOCK_SIZE,
MY_BLOCK_SIZE     133 ext/gdbm/gdbm.c             dbm = gdbm_open(RSTRING(file)->ptr, MY_BLOCK_SIZE,
MY_BLOCK_SIZE     136 ext/gdbm/gdbm.c             dbm = gdbm_open(RSTRING(file)->ptr, MY_BLOCK_SIZE,
MY_BLOCK_SIZE     139 ext/gdbm/gdbm.c             dbm = gdbm_open(RSTRING(file)->ptr, MY_BLOCK_SIZE,


MY_FATAL_FUNC

MY_FATAL_FUNC     128 ext/gdbm/gdbm.c 			flags, mode, MY_FATAL_FUNC);
MY_FATAL_FUNC     134 ext/gdbm/gdbm.c                             GDBM_WRCREAT|flags, mode, MY_FATAL_FUNC);
MY_FATAL_FUNC     137 ext/gdbm/gdbm.c                             GDBM_WRITER|flags, 0, MY_FATAL_FUNC);
MY_FATAL_FUNC     140 ext/gdbm/gdbm.c                             GDBM_READER|flags, 0, MY_FATAL_FUNC);


Maj

Maj               306 ext/digest/sha2/sha2.c 	(h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
Maj               316 ext/digest/sha2/sha2.c 	(h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
Maj               329 ext/digest/sha2/sha2.c 	(h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
Maj               418 ext/digest/sha2/sha2.c 		T2 = Sigma0_256(a) + Maj(a, b, c);
Maj               441 ext/digest/sha2/sha2.c 		T2 = Sigma0_256(a) + Maj(a, b, c);
Maj               607 ext/digest/sha2/sha2.c 	(h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)), \
Maj               617 ext/digest/sha2/sha2.c 	(h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)); \
Maj               630 ext/digest/sha2/sha2.c 	(h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)); \
Maj               714 ext/digest/sha2/sha2.c 		T2 = Sigma0_512(a) + Maj(a, b, c);
Maj               737 ext/digest/sha2/sha2.c 		T2 = Sigma0_512(a) + Maj(a, b, c);


MakeOpenFile

MakeOpenFile      422 ext/pty/pty.c      MakeOpenFile(rport, rfptr);
MakeOpenFile      423 ext/pty/pty.c      MakeOpenFile(wport, wfptr);
MakeOpenFile      208 ext/socket/socket.c     MakeOpenFile(sock, fp);
MakeOpenFile     2651 io.c               MakeOpenFile(io, fptr);
MakeOpenFile     2671 io.c               MakeOpenFile(io, fptr);
MakeOpenFile     2950 io.c               MakeOpenFile(port, fptr);
MakeOpenFile     3449 io.c               MakeOpenFile(dest, fptr);
MakeOpenFile     3847 io.c               MakeOpenFile(io, fp);
MakeOpenFile     3932 io.c           	MakeOpenFile(io, fp);


MatchArg

MatchArg          996 regexec.c        MatchArg* msa;
MatchArg         2916 regexec.c        MatchArg msa;
MatchArg         3189 regexec.c        MatchArg msa;


Max

Max              1990 ext/bigdecimal/bigdecimal.c     nalloc = Max(nalloc, mx);
Max              2396 ext/bigdecimal/bigdecimal.c     right_word = Max((a->Prec),left_word);


MemNumType

MemNumType        219 regcomp.c        MemNumType n = (MemNumType )num;
MemNumType       5154 regcomp.c        MemNumType mem;
MemNumType       5178 regcomp.c            mem = *((MemNumType* )bp);
MemNumType       5299 regcomp.c            mem = *((MemNumType* )bp);
MemNumType       5318 regcomp.c      	mem = *((MemNumType* )bp);
MemNumType       1207 regexec.c        MemNumType mem;
MemNumType        644 regint.h       #define SIZE_MEMNUM        sizeof(MemNumType)
MemNumType        670 regint.h       #define GET_MEMNUM_INC(num,p)      PLATFORM_GET_INC(num,    p, MemNumType)


Min

Min              2112 ext/bigdecimal/bigdecimal.c         n = Min(na, nb);
Min              2678 ext/bigdecimal/bigdecimal.c     nLoop = Min(word_c,ind_c);
Min              3453 ext/bigdecimal/bigdecimal.c     mm = Min(fig,(m->Prec));
Min              3667 ext/bigdecimal/bigdecimal.c     y->MaxPrec = (U_LONG)Min(n , y_prec);
Min              3938 ext/bigdecimal/bigdecimal.c     y->Prec = Min(y->Prec, y->MaxPrec);


MinMaxLen

MinMaxLen        3341 regcomp.c        MinMaxLen       mmd;
MinMaxLen        3354 regcomp.c        MinMaxLen  mmd; /* info position */
MinMaxLen        3364 regcomp.c        MinMaxLen mmd; /* info position */
MinMaxLen        3372 regcomp.c        MinMaxLen    len;


MoveFile

MoveFile         3110 win32/win32.c  	if (!MoveFile(oldpath, newpath))
MoveFile         3124 win32/win32.c  			else if (MoveFile(oldpath, newpath)) {


MoveFileEx

MoveFileEx       3118 win32/win32.c  		    if (MoveFileEx(oldpath, newpath, MOVEFILE_REPLACE_EXISTING))
MoveFileEx        122 wince/wince.h  BOOL MoveFileEx(LPCSTR oldname, LPCSTR newname, DWORD dwFlags);


N

N                 209 ext/syck/gram.c      ((N) * (sizeof (short int) + sizeof (YYSTYPE))			\
N                 649 ext/syck/gram.c     (Current).last_line    = (Rhs)[N].last_line,	\
N                 650 ext/syck/gram.c     (Current).last_column  = (Rhs)[N].last_column)
N                  72 random.c       static unsigned long state[N]; /* the array for the state vector  */
N                  83 random.c           for (j=1; j<N; j++) {
N                 104 random.c           k = (N>key_length ? N : key_length);
N                 110 random.c               if (i>=N) { state[0] = state[N-1]; i=1; }
N                 113 random.c           for (k=N-1; k; k--) {
N                 118 random.c               if (i>=N) { state[0] = state[N-1]; i=1; }
N                 135 random.c           left = N;
N                 138 random.c           for (j=N-M+1; --j; p++)
N                 142 random.c               *p = p[M-N] ^ TWIST(p[0], p[1]);
N                 144 random.c           *p = p[M-N] ^ TWIST(p[0], state[0]);
N                  20 sprintf.c      #define BIT_DIGITS(N)   (((N)*146)/485 + 1)  /* log2(10) =~ 146/485 */


NAMLEN

NAMLEN            512 dir.c          	return rb_tainted_str_new(dp->d_name, NAMLEN(dp));
NAMLEN            550 dir.c          	rb_yield(rb_tainted_str_new(dp->d_name, NAMLEN(dp)));


NANCHOR

NANCHOR          1296 regcomp.c          r = compile_length_anchor_node(&(NANCHOR(node)), reg);
NANCHOR          1444 regcomp.c          r = compile_anchor_node(&(NANCHOR(node)), reg);
NANCHOR          2413 regcomp.c          if (NANCHOR(node).type == ANCHOR_PREC_READ)
NANCHOR          2414 regcomp.c            n = get_head_value_node(NANCHOR(node).target, exact, reg);
NANCHOR          2457 regcomp.c          type = NANCHOR(node).type;
NANCHOR          2461 regcomp.c          if (NANCHOR(node).target)
NANCHOR          2462 regcomp.c            r = check_type_tree(NANCHOR(node).target,
NANCHOR          2523 regcomp.c            AnchorNode* an = &(NANCHOR(node));
NANCHOR          2579 regcomp.c            AnchorNode* an = &(NANCHOR(node));
NANCHOR          2634 regcomp.c            AnchorNode* an = &(NANCHOR(node));
NANCHOR          2703 regcomp.c            AnchorNode* an = &(NANCHOR(node));
NANCHOR          2826 regcomp.c            AnchorNode* an = &(NANCHOR(node));
NANCHOR          2856 regcomp.c        AnchorNode* an = &(NANCHOR(node));
NANCHOR          2863 regcomp.c        NANCHOR(head).target = np;
NANCHOR          2869 regcomp.c          NANCHOR(insert_node).target = NCONS(np).left;
NANCHOR          2886 regcomp.c        AnchorNode* an = &(NANCHOR(node));
NANCHOR          3247 regcomp.c            AnchorNode* an = &(NANCHOR(node));
NANCHOR          4109 regcomp.c          switch (NANCHOR(node).type) {
NANCHOR          4116 regcomp.c            add_opt_anc_info(&opt->anc, NANCHOR(node).type);
NANCHOR          4123 regcomp.c      	r = optimize_node_left(NANCHOR(node).target, &nopt, env);
NANCHOR          5452 regcomp.c          switch (NANCHOR(node).type) {
NANCHOR          1032 regparse.c         if (NANCHOR(node).target)
NANCHOR          1033 regparse.c           onig_node_free(NANCHOR(node).target);
NANCHOR          1208 regparse.c       NANCHOR(node).type     = type;
NANCHOR          1209 regparse.c       NANCHOR(node).target   = NULL;
NANCHOR          1210 regparse.c       NANCHOR(node).char_len = -1;
NANCHOR          4443 regparse.c         NANCHOR(*np).target = target;


NATINT_LEN

NATINT_LEN        685 pack.c         		rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2));
NATINT_LEN        696 pack.c         		rb_str_buf_cat(res, OFF32(&i), NATINT_LEN(int,4));
NATINT_LEN        707 pack.c         		rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4));
NATINT_LEN        729 pack.c         		rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2));
NATINT_LEN        740 pack.c         		rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4));
NATINT_LEN        751 pack.c         		rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2));
NATINT_LEN        762 pack.c         		rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4));
NATINT_LEN       1131 pack.c             int t__len = NATINT_LEN(type,(sz));		\
NATINT_LEN       1497 pack.c         		memcpy(OFF16(&tmp), s, NATINT_LEN(short,2));
NATINT_LEN       1499 pack.c         		s += NATINT_LEN(short,2);
NATINT_LEN       1509 pack.c         		memcpy(OFF16(&tmp), s, NATINT_LEN(unsigned short,2));
NATINT_LEN       1510 pack.c         		s += NATINT_LEN(unsigned short,2);
NATINT_LEN       1542 pack.c         		memcpy(OFF32(&tmp), s, NATINT_LEN(long,4));
NATINT_LEN       1544 pack.c         		s += NATINT_LEN(long,4);
NATINT_LEN       1553 pack.c         		memcpy(OFF32(&tmp), s, NATINT_LEN(unsigned long,4));
NATINT_LEN       1554 pack.c         		s += NATINT_LEN(unsigned long,4);
NATINT_LEN       1582 pack.c         		memcpy(OFF16B(&tmp), s, NATINT_LEN(unsigned short,2));
NATINT_LEN       1583 pack.c         		s += NATINT_LEN(unsigned short,2);
NATINT_LEN       1593 pack.c         		memcpy(OFF32B(&tmp), s, NATINT_LEN(unsigned long,4));
NATINT_LEN       1594 pack.c         		s += NATINT_LEN(unsigned long,4);
NATINT_LEN       1604 pack.c         		memcpy(OFF16(&tmp), s, NATINT_LEN(unsigned short,2));
NATINT_LEN       1605 pack.c         		s += NATINT_LEN(unsigned short,2);
NATINT_LEN       1615 pack.c         		memcpy(OFF32(&tmp), s, NATINT_LEN(long,4));
NATINT_LEN       1616 pack.c         		s += NATINT_LEN(long,4);


NATINT_PACK

NATINT_PACK        24 pack.c         #ifdef NATINT_PACK
NATINT_PACK       217 pack.c         # ifdef NATINT_PACK
NATINT_PACK       243 pack.c         # ifdef NATINT_PACK
NATINT_PACK       272 pack.c         # ifdef NATINT_PACK
NATINT_PACK       448 pack.c         #ifdef NATINT_PACK
NATINT_PACK       468 pack.c         #ifdef NATINT_PACK
NATINT_PACK       483 pack.c         #ifdef NATINT_PACK
NATINT_PACK      1129 pack.c         #ifdef NATINT_PACK
NATINT_PACK      1298 pack.c         #ifdef NATINT_PACK
NATINT_PACK      1312 pack.c         #ifdef NATINT_PACK
NATINT_PACK      1328 pack.c         #ifdef NATINT_PACK


NATIVETHREAD_CURRENT

NATIVETHREAD_CURRENT 1255 eval.c             return NATIVETHREAD_EQUAL(ruby_thid, NATIVETHREAD_CURRENT());
NATIVETHREAD_CURRENT 1282 eval.c             ruby_thid = NATIVETHREAD_CURRENT();


NBACKREF

NBACKREF         1269 regcomp.c            BackrefNode* br = &(NBACKREF(node));
NBACKREF         1385 regcomp.c            BackrefNode* br = &(NBACKREF(node));
NBACKREF         1518 regcomp.c        BackrefNode* bn = &(NBACKREF(node));
NBACKREF         1591 regcomp.c          if (! IS_BACKREF_NAME_REF(&(NBACKREF(node))))
NBACKREF         1745 regcomp.c            BackrefNode* br = &(NBACKREF(node));
NBACKREF         1912 regcomp.c            BackrefNode* br = &(NBACKREF(node));
NBACKREF         3113 regcomp.c            BackrefNode* br = &(NBACKREF(node));
NBACKREF         4151 regcomp.c            BackrefNode* br = &(NBACKREF(node));
NBACKREF         5480 regcomp.c            BackrefNode* br = &(NBACKREF(node));
NBACKREF         1027 regparse.c         if (IS_NOT_NULL(NBACKREF(node).back_dynamic))
NBACKREF         1028 regparse.c           xfree(NBACKREF(node).back_dynamic);
NBACKREF         1222 regparse.c       NBACKREF(node).state    = 0;
NBACKREF         1223 regparse.c       NBACKREF(node).back_num = back_num;
NBACKREF         1224 regparse.c       NBACKREF(node).back_dynamic = (int* )NULL;
NBACKREF         1226 regparse.c         NBACKREF(node).state |= NST_NAME_REF;
NBACKREF         1231 regparse.c           NBACKREF(node).state |= NST_RECURSION;   /* /...(\1).../ */
NBACKREF         1238 regparse.c           NBACKREF(node).back_static[i] = backrefs[i];
NBACKREF         1246 regparse.c         NBACKREF(node).back_dynamic = p;


NCALL

NCALL            1431 regcomp.c          r = compile_call(&(NCALL(node)), reg);
NCALL            1683 regcomp.c          if (IS_CALL_RECURSION(&NCALL(node))) {
NCALL            1687 regcomp.c            r = qualifiers_memory_node_info(NCALL(node).target);
NCALL            1763 regcomp.c          if (IS_CALL_RECURSION(&NCALL(node))) {
NCALL            1764 regcomp.c            EffectNode* en = &(NEFFECT(NCALL(node).target));
NCALL            1769 regcomp.c            r = get_min_match_length(NCALL(node).target, min, env);
NCALL            1929 regcomp.c          if (! IS_CALL_RECURSION(&(NCALL(node))))
NCALL            1930 regcomp.c            r = get_max_match_length(NCALL(node).target, max, env);
NCALL            2058 regcomp.c          if (! IS_CALL_RECURSION(&(NCALL(node))))
NCALL            2059 regcomp.c            r = get_char_length_tree1(NCALL(node).target, reg, len, level);
NCALL            2536 regcomp.c          r = subexp_inf_recursive_check(NCALL(node).target, env, head);
NCALL            2647 regcomp.c          r = subexp_recursive_check(NCALL(node).target);
NCALL            2771 regcomp.c            CallNode* cn = &(NCALL(node));
NCALL            4176 regcomp.c          if (IS_CALL_RECURSION(&(NCALL(node))))
NCALL            4180 regcomp.c            env->options = NEFFECT(NCALL(node).target).option;
NCALL            4181 regcomp.c            r = optimize_node_left(NCALL(node).target, opt, env);
NCALL            5493 regcomp.c            CallNode* cn = &(NCALL(node));
NCALL            1261 regparse.c       NCALL(node).state    = 0;
NCALL            1262 regparse.c       NCALL(node).ref_num  = CALLNODE_REFNUM_UNDEF;
NCALL            1263 regparse.c       NCALL(node).target   = NULL_NODE;
NCALL            1264 regparse.c       NCALL(node).name     = name;
NCALL            1265 regparse.c       NCALL(node).name_end = name_end;


NCCLASS

NCCLASS          1259 regcomp.c          r = compile_length_cclass_node(&(NCCLASS(node)), reg);
NCCLASS          1357 regcomp.c          r = compile_cclass_node(&(NCCLASS(node)), reg);
NCCLASS          2201 regcomp.c            CClassNode* xc = &(NCCLASS(x));
NCCLASS          2240 regcomp.c      	  CClassNode* yc = &(NCCLASS(y));
NCCLASS          2292 regcomp.c      	  CClassNode* cc = &(NCCLASS(y));
NCCLASS          4044 regcomp.c            CClassNode* cc = &(NCCLASS(node));
NCCLASS          5425 regcomp.c          if (IS_CCLASS_NOT(&NCCLASS(node))) fputs(" not", f);
NCCLASS          5426 regcomp.c          if (NCCLASS(node).mbuf) {
NCCLASS          5427 regcomp.c            BBuf* bbuf = NCCLASS(node).mbuf;
NCCLASS          1006 regparse.c           CClassNode* cc = &(NCCLASS(node));
NCCLASS          1103 regparse.c       initialize_cclass(&(NCCLASS(node)));
NCCLASS          1118 regparse.c       cc = &(NCCLASS(node));
NCCLASS          3763 regparse.c       cc = &(NCCLASS(*np));
NCCLASS          3944 regparse.c       cc = &(NCCLASS(node));
NCCLASS          4136 regparse.c     	acc = &(NCCLASS(anode));
NCCLASS          4227 regparse.c       if (cc != &(NCCLASS(*np)))
NCCLASS          4657 regparse.c         CClassNode* cc = &(NCCLASS(node));
NCCLASS          4860 regparse.c                 CCLASS_SET_SHARE(&(NCCLASS(*np)));
NCCLASS          4872 regparse.c                 cc = &(NCCLASS(*np));
NCCLASS          4900 regparse.c           cc = &(NCCLASS(*np));


NCONS

NCONS            1231 regcomp.c            r = compile_length_tree(NCONS(node).left, reg);
NCONS            1234 regcomp.c          } while (IS_NOT_NULL(node = NCONS(node).right));
NCONS            1244 regcomp.c      	r += compile_length_tree(NCONS(node).left, reg);
NCONS            1246 regcomp.c            } while (IS_NOT_NULL(node = NCONS(node).right));
NCONS            1316 regcomp.c            r = compile_tree(NCONS(node).left, reg);
NCONS            1317 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
NCONS            1325 regcomp.c      	len += compile_length_tree(NCONS(x).left, reg);
NCONS            1326 regcomp.c      	if (NCONS(x).right != NULL) {
NCONS            1329 regcomp.c            } while (IS_NOT_NULL(x = NCONS(x).right));
NCONS            1333 regcomp.c      	len = compile_length_tree(NCONS(node).left, reg);
NCONS            1334 regcomp.c      	if (IS_NOT_NULL(NCONS(node).right)) {
NCONS            1338 regcomp.c      	r = compile_tree(NCONS(node).left, reg);
NCONS            1340 regcomp.c      	if (IS_NOT_NULL(NCONS(node).right)) {
NCONS            1345 regcomp.c            } while (IS_NOT_NULL(node = NCONS(node).right));
NCONS            1469 regcomp.c            r = noname_disable_map(&(NCONS(node).left), map, counter);
NCONS            1470 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
NCONS            1550 regcomp.c            r = renumber_by_map(NCONS(node).left, map);
NCONS            1551 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
NCONS            1580 regcomp.c            r = numbered_ref_check(NCONS(node).left);
NCONS            1581 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
NCONS            1675 regcomp.c      	v = qualifiers_memory_node_info(NCONS(node).left);
NCONS            1677 regcomp.c            } while (v >= 0 && IS_NOT_NULL(node = NCONS(node).right));
NCONS            1775 regcomp.c            r = get_min_match_length(NCONS(node).left, &tmin, env);
NCONS            1777 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
NCONS            1785 regcomp.c      	x = NCONS(y).left;
NCONS            1790 regcomp.c            } while (r == 0 && IS_NOT_NULL(y = NCONS(y).right));
NCONS            1870 regcomp.c            r = get_max_match_length(NCONS(node).left, &tmax, env);
NCONS            1873 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
NCONS            1878 regcomp.c            r = get_max_match_length(NCONS(node).left, &tmax, env);
NCONS            1880 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
NCONS            2000 regcomp.c            r = get_char_length_tree1(NCONS(node).left, reg, &tlen, level);
NCONS            2003 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
NCONS            2011 regcomp.c            r = get_char_length_tree1(NCONS(node).left, reg, &tlen, level);
NCONS            2012 regcomp.c            while (r == 0 && IS_NOT_NULL(node = NCONS(node).right)) {
NCONS            2013 regcomp.c      	r = get_char_length_tree1(NCONS(node).left, reg, &tlen2, level);
NCONS            2353 regcomp.c          n = get_head_value_node(NCONS(node).left, exact, reg);
NCONS            2437 regcomp.c            r = check_type_tree(NCONS(node).left, type_mask, effect_mask, anchor_mask);
NCONS            2438 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
NCONS            2493 regcomp.c      	ret = subexp_inf_recursive_check(NCONS(x).left, env, head);
NCONS            2497 regcomp.c      	  ret = get_min_match_length(NCONS(x).left, &min, env);
NCONS            2501 regcomp.c            } while (IS_NOT_NULL(x = NCONS(x).right));
NCONS            2510 regcomp.c      	ret = subexp_inf_recursive_check(NCONS(node).left, env, head);
NCONS            2513 regcomp.c            } while (IS_NOT_NULL(node = NCONS(node).right));
NCONS            2569 regcomp.c            r = subexp_inf_recursive_check_trav(NCONS(node).left, env);
NCONS            2570 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
NCONS            2624 regcomp.c            r |= subexp_recursive_check(NCONS(node).left);
NCONS            2625 regcomp.c          } while (IS_NOT_NULL(node = NCONS(node).right));
NCONS            2686 regcomp.c      	ret = subexp_recursive_check_trav(NCONS(node).left, env);
NCONS            2689 regcomp.c            } while (IS_NOT_NULL(node = NCONS(node).right));
NCONS            2750 regcomp.c            r = setup_subexp_call(NCONS(node).left, env);
NCONS            2751 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
NCONS            2756 regcomp.c            r = setup_subexp_call(NCONS(node).left, env);
NCONS            2757 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
NCONS            2860 regcomp.c        np = NCONS(head).left;
NCONS            2862 regcomp.c        NCONS(node).left = head;
NCONS            2866 regcomp.c        while ((np = NCONS(np).right) != NULL_NODE) {
NCONS            2869 regcomp.c          NANCHOR(insert_node).target = NCONS(np).left;
NCONS            2870 regcomp.c          NCONS(np).left = insert_node;
NCONS            2877 regcomp.c          } while ((np = NCONS(np).right) != NULL_NODE);
NCONS            2987 regcomp.c      	tailp = &(NCONS(root).right);
NCONS            2992 regcomp.c      	tailp = &(NCONS(*tailp).right);
NCONS            3034 regcomp.c            tailp = &(NCONS(node).right);
NCONS            3039 regcomp.c            tailp = &(NCONS(*tailp).right);
NCONS            3075 regcomp.c      	r = setup_tree(NCONS(node).left, reg, state, env);
NCONS            3077 regcomp.c      	  r = next_setup(prev, NCONS(node).left, reg);
NCONS            3079 regcomp.c      	prev = NCONS(node).left;
NCONS            3080 regcomp.c            } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
NCONS            3086 regcomp.c            r = setup_tree(NCONS(node).left, reg, (state | IN_ALT), env);
NCONS            3087 regcomp.c          } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
NCONS            3975 regcomp.c      	r = optimize_node_left(NCONS(nd).left, &nopt, &nenv);
NCONS            3980 regcomp.c            } while (r == 0 && IS_NOT_NULL(nd = NCONS(nd).right));
NCONS            3990 regcomp.c      	r = optimize_node_left(NCONS(nd).left, &nopt, env);
NCONS            3995 regcomp.c            } while ((r == 0) && IS_NOT_NULL(nd = NCONS(nd).right));
NCONS            5401 regcomp.c          print_indent_tree(f, NCONS(node).left, indent + add);
NCONS            5402 regcomp.c          while (IS_NOT_NULL(node = NCONS(node).right)) {
NCONS            5407 regcomp.c            print_indent_tree(f, NCONS(node).left, indent + add);
NCONS             981 regparse.c         onig_node_free(NCONS(node).left);
NCONS             984 regparse.c           Node* next_node = NCONS(node).right;
NCONS            1180 regparse.c       NCONS(node).left  = left;
NCONS            1181 regparse.c       NCONS(node).right = right;
NCONS            1197 regparse.c       NCONS(node).left  = left;
NCONS            1198 regparse.c       NCONS(node).right = right;
NCONS            2050 regparse.c           if (! is_invalid_qualifier_target(NCONS(node).left)) return 0;
NCONS            2051 regparse.c         } while (IS_NOT_NULL(node = NCONS(node).right));
NCONS            2057 regparse.c           if (is_invalid_qualifier_target(NCONS(node).left)) return 1;
NCONS            2058 regparse.c         } while (IS_NOT_NULL(node = NCONS(node).right));
NCONS            4592 regparse.c                 ptail = &(NCONS(*ptail).right);
NCONS            5043 regparse.c     	tmp = NCONS(*targetp).right = node_new_list(qn, NULL);
NCONS            5045 regparse.c     	targetp = &(NCONS(tmp).left);
NCONS            5070 regparse.c         headp = &(NCONS(*top).right);
NCONS            5077 regparse.c     	while (IS_NOT_NULL(NCONS(node).right)) node = NCONS(node).right;
NCONS            5078 regparse.c     	headp = &(NCONS(node).right);
NCONS            5082 regparse.c     	headp = &(NCONS(*headp).right);
NCONS            5110 regparse.c         headp = &(NCONS(*top).right);
NCONS            5118 regparse.c           headp = &(NCONS(*headp).right);


NCTYPE

NCTYPE           1364 regcomp.c            switch (NCTYPE(node).type) {
NCTYPE           1802 regcomp.c          switch (NCTYPE(node).type) {
NCTYPE           1891 regcomp.c          switch (NCTYPE(node).type) {
NCTYPE           2066 regcomp.c          switch (NCTYPE(node).type) {
NCTYPE           2162 regcomp.c      	switch (NCTYPE(x).type) {
NCTYPE           2164 regcomp.c      	  if (NCTYPE(y).type == CTYPE_NOT_WORD)
NCTYPE           2170 regcomp.c      	  if (NCTYPE(y).type == CTYPE_WORD)
NCTYPE           2204 regcomp.c      	switch (NCTYPE(y).type) {
NCTYPE           2278 regcomp.c      	switch (NCTYPE(y).type) {
NCTYPE           4075 regcomp.c      	switch (NCTYPE(node).type) {
NCTYPE           5437 regcomp.c          switch (NCTYPE(node).type) {
NCTYPE           1161 regparse.c       NCTYPE(node).type = type;


NDIV

NDIV              121 time.c         	tmp = sec + NDIV(usec,1000000); /* negative div */
NDIV              386 time.c         #define DIV(n,d) ((n)<0 ? NDIV((n),(d)) : (n)/(d))


NEFFECT

NEFFECT          1292 regcomp.c          r = compile_length_effect_node(&NEFFECT(node), reg);
NEFFECT          1440 regcomp.c          r = compile_effect_node(&NEFFECT(node), reg);
NEFFECT          1486 regcomp.c            EffectNode* en = &(NEFFECT(node));
NEFFECT          1557 regcomp.c          r = renumber_by_map(NEFFECT(node).target, map);
NEFFECT          1587 regcomp.c          r = numbered_ref_check(NEFFECT(node).target);
NEFFECT          1652 regcomp.c          en = &(NEFFECT(uslist->us[i].target));
NEFFECT          1702 regcomp.c            EffectNode* en = &(NEFFECT(node));
NEFFECT          1764 regcomp.c            EffectNode* en = &(NEFFECT(NCALL(node).target));
NEFFECT          1829 regcomp.c            EffectNode* en = &(NEFFECT(node));
NEFFECT          1954 regcomp.c            EffectNode* en = &(NEFFECT(node));
NEFFECT          2081 regcomp.c            EffectNode* en = &(NEFFECT(node));
NEFFECT          2392 regcomp.c            EffectNode* en = &(NEFFECT(node));
NEFFECT          2398 regcomp.c      	  reg->options = NEFFECT(node).option;
NEFFECT          2399 regcomp.c      	  n = get_head_value_node(NEFFECT(node).target, exact, reg);
NEFFECT          2448 regcomp.c            EffectNode* en = &(NEFFECT(node));
NEFFECT          2540 regcomp.c          if (IS_EFFECT_MARK2(&(NEFFECT(node))))
NEFFECT          2542 regcomp.c          else if (IS_EFFECT_MARK1(&(NEFFECT(node))))
NEFFECT          2546 regcomp.c            r = subexp_inf_recursive_check(NEFFECT(node).target, env, head);
NEFFECT          2593 regcomp.c            EffectNode* en = &(NEFFECT(node));
NEFFECT          2652 regcomp.c          if (IS_EFFECT_MARK2(&(NEFFECT(node))))
NEFFECT          2654 regcomp.c          else if (IS_EFFECT_MARK1(&(NEFFECT(node))))
NEFFECT          2658 regcomp.c            r = subexp_recursive_check(NEFFECT(node).target);
NEFFECT          2717 regcomp.c            EffectNode* en = &(NEFFECT(node));
NEFFECT          2764 regcomp.c          r = setup_subexp_call(NEFFECT(node).target, env);
NEFFECT          2929 regcomp.c      	      NEFFECT(node).target = en;
NEFFECT          2937 regcomp.c          EffectNode* en = &(NEFFECT(node));
NEFFECT          3206 regcomp.c            EffectNode* en = &(NEFFECT(node));
NEFFECT          3212 regcomp.c      	  reg->options = NEFFECT(node).option;
NEFFECT          3213 regcomp.c      	  r = setup_tree(NEFFECT(node).target, reg, state, env);
NEFFECT          4180 regcomp.c            env->options = NEFFECT(NCALL(node).target).option;
NEFFECT          4242 regcomp.c            EffectNode* en = &(NEFFECT(node));
NEFFECT          5509 regcomp.c          switch (NEFFECT(node).type) {
NEFFECT          5511 regcomp.c            fprintf(f, "option:%d\n", NEFFECT(node).option);
NEFFECT          5512 regcomp.c            print_indent_tree(f, NEFFECT(node).target, indent + add);
NEFFECT          5515 regcomp.c            fprintf(f, "memory:%d", NEFFECT(node).regnum);
NEFFECT          5525 regcomp.c          print_indent_tree(f, NEFFECT(node).target, indent + add);
NEFFECT          1022 regparse.c         if (NEFFECT(node).target)
NEFFECT          1023 regparse.c           onig_node_free(NEFFECT(node).target);
NEFFECT          1295 regparse.c       NEFFECT(node).type      = type;
NEFFECT          1296 regparse.c       NEFFECT(node).state     =  0;
NEFFECT          1297 regparse.c       NEFFECT(node).regnum    =  0;
NEFFECT          1298 regparse.c       NEFFECT(node).option    =  0;
NEFFECT          1299 regparse.c       NEFFECT(node).target    = NULL;
NEFFECT          1300 regparse.c       NEFFECT(node).call_addr = -1;
NEFFECT          1301 regparse.c       NEFFECT(node).opt_count =  0;
NEFFECT          1320 regparse.c       NEFFECT(node).option = option;
NEFFECT          1330 regparse.c       NEFFECT(node).option = option;
NEFFECT          2044 regparse.c         if (NEFFECT(node).type == EFFECT_OPTION)
NEFFECT          2045 regparse.c           return is_invalid_qualifier_target(NEFFECT(node).target);
NEFFECT          4308 regparse.c     	NEFFECT(*np).regnum = num;
NEFFECT          4341 regparse.c     	NEFFECT(*np).regnum = num;
NEFFECT          4409 regparse.c     	    NEFFECT(*np).target = target;
NEFFECT          4433 regparse.c         NEFFECT(*np).regnum = num;
NEFFECT          4445 regparse.c         NEFFECT(*np).target = target;
NEFFECT          4446 regparse.c         if (NEFFECT(*np).type == EFFECT_MEMORY) {
NEFFECT          4448 regparse.c           r = scan_env_set_mem_node(env, NEFFECT(*np).regnum, *np);
NEFFECT          4705 regparse.c           env->option = NEFFECT(*np).option;
NEFFECT          4711 regparse.c           NEFFECT(*np).target = target;
NEFFECT          5031 regparse.c     	NEFFECT(en).target = qn;


NEGFIXABLE

NEGFIXABLE        111 bignum.c       		else if (NEGFIXABLE(-(long)num)) return LONG2FIX(-(long)num);
NEGFIXABLE        179 ruby.h         #define FIXABLE(f) (POSFIXABLE(f) && NEGFIXABLE(f))


NEWHEAP

NEWHEAP          8780 parse.y            NODE *n = NEWHEAP();
NEWHEAP          8790 parse.y            NODE *n = NEWHEAP();
NEWHEAP          8811 parse.y            n = NEWHEAP();


NEWLINE

NEWLINE           195 ext/syck/token.c     NEWLINE(indent); \
NEWLINE           200 ext/syck/token.c             NEWLINE(indent); \


NEWLINE_CODE

NEWLINE_CODE     4215 regparse.c           if (ONIGENC_IS_CODE_NEWLINE(env->enc, NEWLINE_CODE)) {
NEWLINE_CODE     4216 regparse.c             if (ONIGENC_CODE_TO_MBCLEN(env->enc, NEWLINE_CODE) == 1)
NEWLINE_CODE     4217 regparse.c               BITSET_SET_BIT(cc->bs, NEWLINE_CODE);
NEWLINE_CODE     4219 regparse.c               add_code_range(&(cc->mbuf), env, NEWLINE_CODE, NEWLINE_CODE);


NEWOBJ

NEWOBJ             94 array.c            NEWOBJ(ary, struct RArray);
NEWOBJ            208 array.c        	NEWOBJ(shared, struct RArray);
NEWOBJ             44 bignum.c           NEWOBJ(big, struct RBignum);
NEWOBJ             24 class.c            NEWOBJ(klass, struct RClass);
NEWOBJ            115 class.c        	NEWOBJ(clone, struct RClass);
NEWOBJ            254 class.c            NEWOBJ(mdl, struct RClass);
NEWOBJ            320 class.c            NEWOBJ(klass, struct RClass);
NEWOBJ            758 eval.c             NEWOBJ(vars, struct RVarmap);
NEWOBJ            966 eval.c             NEWOBJ(_scope, struct SCOPE);	\
NEWOBJ           8235 eval.c                 NEWOBJ(scope, struct SCOPE);
NEWOBJ            402 gc.c               NEWOBJ(data, struct RData);
NEWOBJ            204 hash.c             NEWOBJ(hash, struct RHash);
NEWOBJ            380 io.c               NEWOBJ(io, struct RFile);
NEWOBJ           1043 marshal.c      	    NEWOBJ(big, struct RBignum);
NEWOBJ            464 numeric.c          NEWOBJ(flt, struct RFloat);
NEWOBJ           1432 object.c           NEWOBJ(obj, struct RObject);
NEWOBJ            264 random.c           NEWOBJ(big, struct RBignum);
NEWOBJ            653 re.c               NEWOBJ(match, struct RMatch);
NEWOBJ           1352 re.c               NEWOBJ(re, struct RRegexp);
NEWOBJ             61 string.c           NEWOBJ(str, struct RString);
NEWOBJ            331 struct.c           NEWOBJ(st, struct RStruct);


NEW_ARRAY

NEW_ARRAY         270 node.h         #define NEW_LIST(a)  NEW_ARRAY(a)
NEW_ARRAY         890 parse.y        			$1->nd_value = ($1->nd_head) ? NEW_TO_ARY($3) : NEW_ARRAY($3);
NEW_ARRAY        1021 parse.y        			$1->nd_value = ($1->nd_head) ? NEW_TO_ARY($3) : NEW_ARRAY($3);
NEW_ARRAY        8213 parse.y        				  NEW_ARRAY(NEW_GVAR(rb_intern("$_")))));


NEW_ATTRASGN

NEW_ATTRASGN     7294 parse.y            return NEW_ATTRASGN(recv, tASET, idx);
NEW_ATTRASGN     7320 parse.y            return NEW_ATTRASGN(recv, rb_id_attrset(id), 0);


NEW_BEGIN

NEW_BEGIN        2523 eval.c         	node_save = NEW_BEGIN(0);
NEW_BEGIN        6589 eval.c         	last_node = NEW_BEGIN(0);
NEW_BEGIN        2502 parse.y        			    $$ = NEW_BEGIN($3);
NEW_BEGIN         362 ruby.c             save[1] = NEW_BEGIN(0);
NEW_BEGIN         811 ruby.c         		script_node = NEW_BEGIN(0);


NEW_BLOCK

NEW_BLOCK        4165 parse.y        			$$ = NEW_BLOCK($1);
NEW_BLOCK        6961 parse.y        	h = end = NEW_BLOCK(head);
NEW_BLOCK        6988 parse.y        	tail = NEW_BLOCK(tail);


NEW_BLOCK_PARAM

NEW_BLOCK_PARAM  3040 parse.y        			$$ = NEW_BLOCK_PARAM($4, NEW_MASGN($1, 0));
NEW_BLOCK_PARAM  3048 parse.y        			$$ = NEW_BLOCK_PARAM($7, NEW_MASGN($1, $4));
NEW_BLOCK_PARAM  3057 parse.y        			$$ = NEW_BLOCK_PARAM($6, NEW_MASGN($1, -1));
NEW_BLOCK_PARAM  3082 parse.y        			$$ = NEW_BLOCK_PARAM($5, NEW_MASGN(0, $2));
NEW_BLOCK_PARAM  3091 parse.y        			$$ = NEW_BLOCK_PARAM($4, NEW_MASGN(0, -1));
NEW_BLOCK_PARAM  3116 parse.y        			$$ = NEW_BLOCK_PARAM($2, (NODE*)1);


NEW_BREAK

NEW_BREAK        1099 parse.y        			$$ = NEW_BREAK(ret_args($2));
NEW_BREAK        2895 parse.y        			$$ = NEW_BREAK(0);


NEW_CALL

NEW_CALL         3384 parse.y        			    $$ = NEW_CALL($1, tAREF, $3);
NEW_CALL         7125 parse.y            return NEW_CALL(recv, id, arg1);
NEW_CALL         7161 parse.y            return NEW_CALL(node1, tMATCH, NEW_LIST(node2));
NEW_CALL         7954 parse.y        	a->nd_iter = NEW_CALL(r,m,a->nd_head);
NEW_CALL         7957 parse.y            return NEW_CALL(r,m,a);
NEW_CALL         8232 parse.y        				      NEW_CALL(NEW_GVAR(rb_intern("$_")),
NEW_CALL         8237 parse.y        	node = block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")),


NEW_CDECL

NEW_CDECL        1397 parse.y        			$$ = NEW_CDECL(0, 0, NEW_COLON2($1, $3));
NEW_CDECL        1409 parse.y        			$$ = NEW_CDECL(0, 0, NEW_COLON3($2));
NEW_CDECL        1471 parse.y        			$$ = NEW_CDECL(0, 0, NEW_COLON2($1, $3));
NEW_CDECL        1484 parse.y        			$$ = NEW_CDECL(0, 0, NEW_COLON3($2));
NEW_CDECL        7254 parse.y        	return NEW_CDECL(id, val, 0);


NEW_CFUNC

NEW_CFUNC         733 class.c            rb_add_method(klass, name, NEW_CFUNC(func,argc), NOEX_PUBLIC);
NEW_CFUNC         739 class.c            rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PUBLIC);
NEW_CFUNC         745 class.c            rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PROTECTED);
NEW_CFUNC         751 class.c            rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PRIVATE);
NEW_CFUNC         419 eval.c             rb_add_method(CLASS_OF(klass), ID_ALLOCATOR, NEW_CFUNC(func, 0), NOEX_PRIVATE);


NEW_COLON2

NEW_COLON2       1397 parse.y        			$$ = NEW_CDECL(0, 0, NEW_COLON2($1, $3));
NEW_COLON2       1471 parse.y        			$$ = NEW_CDECL(0, 0, NEW_COLON2($1, $3));
NEW_COLON2       1525 parse.y        			$$ = NEW_COLON2(0, $$);
NEW_COLON2       1533 parse.y        			$$ = NEW_COLON2($1, $3);
NEW_COLON2       2530 parse.y        			$$ = NEW_COLON2($1, $3);


NEW_COLON3

NEW_COLON3       1409 parse.y        			$$ = NEW_CDECL(0, 0, NEW_COLON3($2));
NEW_COLON3       1484 parse.y        			$$ = NEW_CDECL(0, 0, NEW_COLON3($2));
NEW_COLON3       1517 parse.y        			$$ = NEW_COLON3($2);
NEW_COLON3       2538 parse.y        			$$ = NEW_COLON3($2);


NEW_CVAR

NEW_CVAR         3832 parse.y        			$$ = NEW_CVAR($1);
NEW_CVAR         7202 parse.y        	return NEW_CVAR(id);


NEW_DASGN_CURR

NEW_DASGN_CURR   4203 parse.y        			    $$ = NEW_DASGN_CURR(internal_id(), 0);
NEW_DASGN_CURR   7232 parse.y        	    return NEW_DASGN_CURR(id, val);
NEW_DASGN_CURR   7242 parse.y        	    return NEW_DASGN_CURR(id, val);
NEW_DASGN_CURR   7284 parse.y            return NEW_DASGN_CURR(name, val);
NEW_DASGN_CURR   8192 parse.y        	var = NEW_DASGN_CURR(post->id, var);


NEW_DEFINED

NEW_DEFINED      2065 parse.y        			$$ = NEW_DEFINED($4);
NEW_DEFINED      2600 parse.y        			$$ = NEW_DEFINED($5);


NEW_DSTR

NEW_DSTR         7052 parse.y        	NODE *node = NEW_DSTR(rb_str_new(0, 0));
NEW_DSTR         7095 parse.y        	node = list_append(NEW_DSTR(rb_str_new(0, 0)), node);


NEW_EVSTR

NEW_EVSTR        3785 parse.y        			$$ = NEW_EVSTR($3);
NEW_EVSTR        7111 parse.y            return NEW_EVSTR(head);


NEW_FCALL

NEW_FCALL        2479 parse.y        			$$ = NEW_FCALL($1, 0);
NEW_FCALL        2609 parse.y        			$2->nd_iter = NEW_FCALL($1, 0);
NEW_FCALL        3382 parse.y        			    $$ = NEW_FCALL(tAREF, $3);
NEW_FCALL        7964 parse.y        	a->nd_iter = NEW_FCALL(m,a->nd_head);
NEW_FCALL        7967 parse.y            return NEW_FCALL(m, a);
NEW_FCALL        8212 parse.y        			NEW_FCALL(rb_intern("print"),


NEW_GASGN

NEW_GASGN        7246 parse.y        	return NEW_GASGN(id, val);
NEW_GASGN        8231 parse.y        	node = block_append(NEW_GASGN(rb_intern("$F"),


NEW_GVAR

NEW_GVAR         3816 parse.y        			$$ = NEW_GVAR($1);
NEW_GVAR         7193 parse.y        	return NEW_GVAR(id);
NEW_GVAR         7682 parse.y        	return call_op(node,tEQ,1,NEW_GVAR(rb_intern("$.")));
NEW_GVAR         7726 parse.y        	return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_")));
NEW_GVAR         8213 parse.y        				  NEW_ARRAY(NEW_GVAR(rb_intern("$_")))));
NEW_GVAR         8232 parse.y        				      NEW_CALL(NEW_GVAR(rb_intern("$_")),
NEW_GVAR         8237 parse.y        	node = block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")),


NEW_HASH

NEW_HASH         2124 parse.y        			$$ = NEW_LIST(NEW_HASH($1));
NEW_HASH         2212 parse.y        			$$ = NEW_LIST(NEW_HASH($1));
NEW_HASH         2222 parse.y        			$$ = arg_concat(NEW_LIST(NEW_HASH($1)), $4);
NEW_HASH         2232 parse.y        			$$ = list_append($1, NEW_HASH($3));
NEW_HASH         2242 parse.y        			$$ = arg_concat(list_append($1, NEW_HASH($3)), $6);
NEW_HASH         2305 parse.y        			$$ = NEW_LIST(NEW_HASH($1));
NEW_HASH         2314 parse.y        			$$ = arg_concat(NEW_LIST(NEW_HASH($1)), $4);
NEW_HASH         2324 parse.y        			$$ = list_append(NEW_LIST($1), NEW_HASH($3));
NEW_HASH         2334 parse.y        			$$ = list_append(list_concat(NEW_LIST($1),$3), NEW_HASH($5));
NEW_HASH         2344 parse.y        			$$ = arg_concat(list_append(NEW_LIST($1), NEW_HASH($3)), $6);
NEW_HASH         2355 parse.y        			$$ = arg_concat(list_append(list_concat(NEW_LIST($1), $3), NEW_HASH($5)), $8);
NEW_HASH         2559 parse.y        			$$ = NEW_HASH($2);


NEW_IF

NEW_IF            251 node.h         #define NEW_UNLESS(c,t,e) NEW_IF(c,e,t)
NEW_IF            776 parse.y        			$$ = NEW_IF(cond($3), $1, 0);
NEW_IF           2074 parse.y        			$$ = NEW_IF(cond($1), $3, $5);
NEW_IF           2639 parse.y        			$$ = NEW_IF(cond($2), $4, $5);
NEW_IF           2974 parse.y        			$$ = NEW_IF(cond($2), $4, $5);


NEW_ITER

NEW_ITER          870 parse.y        			$$ = NEW_ITER(0, NEW_POSTEXE(), $3);
NEW_ITER         3126 parse.y        			$$ = NEW_ITER(0, 0, 0);
NEW_ITER         3136 parse.y        			$$ = NEW_ITER((NODE*)1, 0, $2);
NEW_ITER         3144 parse.y        			$$ = NEW_ITER((NODE*)1, 0, 0);
NEW_ITER         3152 parse.y        			$$ = NEW_ITER($2, 0, $3);


NEW_IVAR

NEW_IVAR          670 eval.c         	rb_add_method(klass, id, NEW_IVAR(attriv), noex);
NEW_IVAR         3824 parse.y        			$$ = NEW_IVAR($1);
NEW_IVAR         7196 parse.y        	return NEW_IVAR(id);


NEW_LAMBDA

NEW_LAMBDA       3229 parse.y        			$$ = NEW_LAMBDA($2, $3);
NEW_LAMBDA       3237 parse.y        			$$ = NEW_LAMBDA($1, $2);


NEW_LIST

NEW_LIST          931 parse.y        			args = NEW_LIST($6);
NEW_LIST          933 parse.y        			    $3 = NEW_LIST($3);
NEW_LIST         1266 parse.y        			$$ = NEW_MASGN(NEW_LIST($2), 0);
NEW_LIST         1337 parse.y        			$$ = NEW_LIST($1);
NEW_LIST         1686 parse.y        			args = NEW_LIST($6);
NEW_LIST         1688 parse.y        			    $3 = NEW_LIST($3);
NEW_LIST         2102 parse.y        			$$ = NEW_LIST($1);
NEW_LIST         2124 parse.y        			$$ = NEW_LIST(NEW_HASH($1));
NEW_LIST         2160 parse.y        			$$ = NEW_LIST($2);
NEW_LIST         2186 parse.y        			$$ = NEW_LIST($1);
NEW_LIST         2212 parse.y        			$$ = NEW_LIST(NEW_HASH($1));
NEW_LIST         2222 parse.y        			$$ = arg_concat(NEW_LIST(NEW_HASH($1)), $4);
NEW_LIST         2269 parse.y        			$$ = arg_blk_pass(list_concat(NEW_LIST($1),$3), $4);
NEW_LIST         2285 parse.y        			$$ = arg_concat(NEW_LIST($1), $4);
NEW_LIST         2295 parse.y        			$$ = arg_concat(list_concat(NEW_LIST($1),$3), $6);
NEW_LIST         2305 parse.y        			$$ = NEW_LIST(NEW_HASH($1));
NEW_LIST         2314 parse.y        			$$ = arg_concat(NEW_LIST(NEW_HASH($1)), $4);
NEW_LIST         2324 parse.y        			$$ = list_append(NEW_LIST($1), NEW_HASH($3));
NEW_LIST         2334 parse.y        			$$ = list_append(list_concat(NEW_LIST($1),$3), NEW_HASH($5));
NEW_LIST         2344 parse.y        			$$ = arg_concat(list_append(NEW_LIST($1), NEW_HASH($3)), $6);
NEW_LIST         2355 parse.y        			$$ = arg_concat(list_append(list_concat(NEW_LIST($1), $3), NEW_HASH($5)), $8);
NEW_LIST         2427 parse.y        			$$ = NEW_LIST($1);
NEW_LIST         3000 parse.y        			$$ = NEW_LIST($1);
NEW_LIST         3479 parse.y        			$$ = NEW_LIST(NEW_WHEN($2, 0, 0));
NEW_LIST         3515 parse.y        			$$ = NEW_LIST($1);
NEW_LIST         3608 parse.y        				node = NEW_NODE(NODE_DXSTR, rb_str_new(0, 0), 1, NEW_LIST(node));
NEW_LIST         3638 parse.y        			    node = NEW_NODE(NODE_DSTR, rb_str_new(0, 0), 1, NEW_LIST(node));
NEW_LIST         3885 parse.y        				$$ = NEW_NODE(NODE_DSYM, rb_str_new(0, 0), 1, NEW_LIST($$));
NEW_LIST         4327 parse.y        			$$ = list_append(NEW_LIST($1), $3);
NEW_LIST         4335 parse.y        			$$ = list_append(NEW_LIST(NEW_LIT(ID2SYM($1))), $2);
NEW_LIST         7002 parse.y            if (list == 0) return NEW_LIST(item);
NEW_LIST         7011 parse.y            last->nd_next = NEW_LIST(item);
NEW_LIST         7120 parse.y        	arg1 = NEW_LIST(arg1);
NEW_LIST         7161 parse.y            return NEW_CALL(node1, tMATCH, NEW_LIST(node2));
NEW_LIST         7346 parse.y            if (!node1) return NEW_LIST(node2);
NEW_LIST         7890 parse.y        	return list_concat(NEW_LIST(node1), node2);


NEW_LIT

NEW_LIT          1572 parse.y        			$$ = NEW_LIT(ID2SYM($1));
NEW_LIT          3546 parse.y        			$$ = NEW_LIT(ID2SYM($1));
NEW_LIT          3625 parse.y        			    node = NEW_LIT(rb_reg_compile("", 0, options & ~RE_OPTION_ONCE));
NEW_LIT          4335 parse.y        			$$ = list_append(NEW_LIST(NEW_LIT(ID2SYM($1))), $2);
NEW_LIT          4439 parse.y        # define set_yylval_literal(x) yylval.node = NEW_LIT(x)
NEW_LIT          7183 parse.y        	return NEW_LIT(INT2FIX(ruby_sourceline));


NEW_MASGN

NEW_MASGN        1266 parse.y        			$$ = NEW_MASGN(NEW_LIST($2), 0);
NEW_MASGN        1276 parse.y        			$$ = NEW_MASGN($1, 0);
NEW_MASGN        1284 parse.y        			$$ = NEW_MASGN(list_append($1,$2), 0);
NEW_MASGN        1292 parse.y        			$$ = NEW_MASGN($1, $3);
NEW_MASGN        1300 parse.y        			$$ = NEW_MASGN($1, -1);
NEW_MASGN        1308 parse.y        			$$ = NEW_MASGN(0, $2);
NEW_MASGN        1316 parse.y        			$$ = NEW_MASGN(0, -1);
NEW_MASGN        3023 parse.y        			    $$ = NEW_MASGN($1, 0);
NEW_MASGN        3032 parse.y        			$$ = NEW_MASGN($1, 0);
NEW_MASGN        3040 parse.y        			$$ = NEW_BLOCK_PARAM($4, NEW_MASGN($1, 0));
NEW_MASGN        3048 parse.y        			$$ = NEW_BLOCK_PARAM($7, NEW_MASGN($1, $4));
NEW_MASGN        3057 parse.y        			$$ = NEW_BLOCK_PARAM($6, NEW_MASGN($1, -1));
NEW_MASGN        3066 parse.y        			$$ = NEW_MASGN($1, $4);
NEW_MASGN        3074 parse.y        			$$ = NEW_MASGN($1, -1);
NEW_MASGN        3082 parse.y        			$$ = NEW_BLOCK_PARAM($5, NEW_MASGN(0, $2));
NEW_MASGN        3091 parse.y        			$$ = NEW_BLOCK_PARAM($4, NEW_MASGN(0, -1));
NEW_MASGN        3100 parse.y        			$$ = NEW_MASGN(0, $2);
NEW_MASGN        3108 parse.y        			$$ = NEW_MASGN(0, -1);


NEW_MATCH2

NEW_MATCH2       7139 parse.y        	    return NEW_MATCH2(node1, node2);
NEW_MATCH2       7143 parse.y        		return NEW_MATCH2(node1, node2);
NEW_MATCH2       7726 parse.y        	return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_")));


NEW_MATCH3

NEW_MATCH3       7152 parse.y        	    return NEW_MATCH3(node2, node1);
NEW_MATCH3       7156 parse.y        		return NEW_MATCH3(node2, node1);


NEW_METHOD

NEW_METHOD         62 class.c            st_insert(tbl, mid, (st_data_t)NEW_METHOD(body->nd_body, body->nd_noex));
NEW_METHOD        403 eval.c             body = NEW_METHOD(node, NOEX_WITH_SAFE(noex));
NEW_METHOD       2048 eval.c               (st_data_t)NEW_METHOD(NEW_FBODY(body, def, origin), orig->nd_noex));


NEW_NEXT

NEW_NEXT         1107 parse.y        			$$ = NEW_NEXT(ret_args($2));
NEW_NEXT         2903 parse.y        			$$ = NEW_NEXT(0);


NEW_NIL

NEW_NIL           673 parse.y        				$$ = block_append($4, NEW_NIL());
NEW_NIL           934 parse.y        			$3 = list_append($3, NEW_NIL());
NEW_NIL          1689 parse.y        			$3 = list_append($3, NEW_NIL());
NEW_NIL          2496 parse.y        			    $$ = NEW_NIL();
NEW_NIL          2521 parse.y        			if (!$2) $$ = NEW_NIL();
NEW_NIL          3192 parse.y        			$$ = new_bv($1, NEW_NIL());
NEW_NIL          3369 parse.y        			if (!$2) $2 = NEW_NIL();
NEW_NIL          7171 parse.y        	return NEW_NIL();
NEW_NIL          7561 parse.y        	*body = NEW_NIL();


NEW_NODE

NEW_NODE          960 eval.c         #define PUSH_CREF(c) ruby_cref = NEW_NODE(NODE_CREF,(c),0,ruby_cref)
NEW_NODE         2089 eval.c             NODE *copy = NEW_NODE(NODE_SCOPE,0,rval,node->nd_next);
NEW_NODE         2104 eval.c             (tmp__protect_tmp = NEW_NODE(NODE_ALLOCA,				\
NEW_NODE          241 node.h         #define NEW_METHOD(n,x) NEW_NODE(NODE_METHOD,x,n,0)
NEW_NODE          242 node.h         #define NEW_FBODY(n,i,o) NEW_NODE(NODE_FBODY,n,i,o)
NEW_NODE          243 node.h         #define NEW_DEFN(i,a,d,p) NEW_NODE(NODE_DEFN,p,i,NEW_RFUNC(a,d))
NEW_NODE          244 node.h         #define NEW_DEFS(r,i,a,d) NEW_NODE(NODE_DEFS,r,i,NEW_RFUNC(a,d))
NEW_NODE          245 node.h         #define NEW_CFUNC(f,c) NEW_NODE(NODE_CFUNC,f,c,0)
NEW_NODE          246 node.h         #define NEW_IFUNC(f,c) NEW_NODE(NODE_IFUNC,f,c,0)
NEW_NODE          248 node.h         #define NEW_SCOPE(b) NEW_NODE(NODE_SCOPE,local_tbl(),0,(b))
NEW_NODE          249 node.h         #define NEW_BLOCK(a) NEW_NODE(NODE_BLOCK,a,0,0)
NEW_NODE          250 node.h         #define NEW_IF(c,t,e) NEW_NODE(NODE_IF,c,t,e)
NEW_NODE          252 node.h         #define NEW_CASE(h,b) NEW_NODE(NODE_CASE,h,b,0)
NEW_NODE          253 node.h         #define NEW_WHEN(c,t,e) NEW_NODE(NODE_WHEN,c,t,e)
NEW_NODE          254 node.h         #define NEW_OPT_N(b) NEW_NODE(NODE_OPT_N,0,b,0)
NEW_NODE          255 node.h         #define NEW_WHILE(c,b,n) NEW_NODE(NODE_WHILE,c,b,n)
NEW_NODE          256 node.h         #define NEW_UNTIL(c,b,n) NEW_NODE(NODE_UNTIL,c,b,n)
NEW_NODE          257 node.h         #define NEW_FOR(v,i,b) NEW_NODE(NODE_FOR,v,b,i)
NEW_NODE          258 node.h         #define NEW_ITER(v,i,b) NEW_NODE(NODE_ITER,v,b,i)
NEW_NODE          259 node.h         #define NEW_LAMBDA(a,b) NEW_NODE(NODE_LAMBDA,a,b,0)
NEW_NODE          260 node.h         #define NEW_BREAK(s) NEW_NODE(NODE_BREAK,s,0,0)
NEW_NODE          261 node.h         #define NEW_NEXT(s) NEW_NODE(NODE_NEXT,s,0,0)
NEW_NODE          262 node.h         #define NEW_REDO() NEW_NODE(NODE_REDO,0,0,0)
NEW_NODE          263 node.h         #define NEW_RETRY() NEW_NODE(NODE_RETRY,0,0,0)
NEW_NODE          264 node.h         #define NEW_BEGIN(b) NEW_NODE(NODE_BEGIN,0,b,0)
NEW_NODE          265 node.h         #define NEW_RESCUE(b,res,e) NEW_NODE(NODE_RESCUE,b,res,e)
NEW_NODE          266 node.h         #define NEW_RESBODY(a,ex,n) NEW_NODE(NODE_RESBODY,n,ex,a)
NEW_NODE          267 node.h         #define NEW_ENSURE(b,en) NEW_NODE(NODE_ENSURE,b,0,en)
NEW_NODE          268 node.h         #define NEW_RETURN(s) NEW_NODE(NODE_RETURN,s,0,0)
NEW_NODE          269 node.h         #define NEW_YIELD(a,s) NEW_NODE(NODE_YIELD,a,0,s)
NEW_NODE          271 node.h         #define NEW_ARRAY(a) NEW_NODE(NODE_ARRAY,a,1,0)
NEW_NODE          272 node.h         #define NEW_ZARRAY() NEW_NODE(NODE_ZARRAY,0,0,0)
NEW_NODE          273 node.h         #define NEW_HASH(a)  NEW_NODE(NODE_HASH,a,0,0)
NEW_NODE          274 node.h         #define NEW_NOT(a)   NEW_NODE(NODE_NOT,0,a,0)
NEW_NODE          275 node.h         #define NEW_MASGN(l,r)   NEW_NODE(NODE_MASGN,l,0,r)
NEW_NODE          276 node.h         #define NEW_GASGN(v,val) NEW_NODE(NODE_GASGN,v,val,rb_global_entry(v))
NEW_NODE          277 node.h         #define NEW_LASGN(v,val) NEW_NODE(NODE_LASGN,v,val,local_cnt(v))
NEW_NODE          278 node.h         #define NEW_DASGN(v,val) NEW_NODE(NODE_DASGN,v,val,0)
NEW_NODE          279 node.h         #define NEW_DASGN_CURR(v,val) NEW_NODE(NODE_DASGN_CURR,v,val,0)
NEW_NODE          280 node.h         #define NEW_IASGN(v,val) NEW_NODE(NODE_IASGN,v,val,0)
NEW_NODE          281 node.h         #define NEW_CDECL(v,val,path) NEW_NODE(NODE_CDECL,v,val,path)
NEW_NODE          282 node.h         #define NEW_CVASGN(v,val) NEW_NODE(NODE_CVASGN,v,val,0)
NEW_NODE          283 node.h         #define NEW_CVDECL(v,val) NEW_NODE(NODE_CVDECL,v,val,0)
NEW_NODE          284 node.h         #define NEW_OP_ASGN1(p,id,a) NEW_NODE(NODE_OP_ASGN1,p,id,a)
NEW_NODE          285 node.h         #define NEW_OP_ASGN2(r,i,o,val) NEW_NODE(NODE_OP_ASGN2,r,val,NEW_OP_ASGN22(i,o))
NEW_NODE          286 node.h         #define NEW_OP_ASGN22(i,o) NEW_NODE(NODE_OP_ASGN2,i,o,rb_id_attrset(i))
NEW_NODE          287 node.h         #define NEW_OP_ASGN_OR(i,val) NEW_NODE(NODE_OP_ASGN_OR,i,val,0)
NEW_NODE          288 node.h         #define NEW_OP_ASGN_AND(i,val) NEW_NODE(NODE_OP_ASGN_AND,i,val,0)
NEW_NODE          289 node.h         #define NEW_GVAR(v) NEW_NODE(NODE_GVAR,v,0,rb_global_entry(v))
NEW_NODE          290 node.h         #define NEW_LVAR(v) NEW_NODE(NODE_LVAR,v,0,local_cnt(v))
NEW_NODE          291 node.h         #define NEW_DVAR(v) NEW_NODE(NODE_DVAR,v,0,0)
NEW_NODE          292 node.h         #define NEW_IVAR(v) NEW_NODE(NODE_IVAR,v,0,0)
NEW_NODE          293 node.h         #define NEW_CONST(v) NEW_NODE(NODE_CONST,v,0,0)
NEW_NODE          294 node.h         #define NEW_CVAR(v) NEW_NODE(NODE_CVAR,v,0,0)
NEW_NODE          295 node.h         #define NEW_NTH_REF(n)  NEW_NODE(NODE_NTH_REF,0,n,local_cnt('~'))
NEW_NODE          296 node.h         #define NEW_BACK_REF(n) NEW_NODE(NODE_BACK_REF,0,n,local_cnt('~'))
NEW_NODE          297 node.h         #define NEW_MATCH(c) NEW_NODE(NODE_MATCH,c,0,0)
NEW_NODE          298 node.h         #define NEW_MATCH2(n1,n2) NEW_NODE(NODE_MATCH2,n1,n2,0)
NEW_NODE          299 node.h         #define NEW_MATCH3(r,n2) NEW_NODE(NODE_MATCH3,r,n2,0)
NEW_NODE          300 node.h         #define NEW_LIT(l) NEW_NODE(NODE_LIT,l,0,0)
NEW_NODE          301 node.h         #define NEW_STR(s) NEW_NODE(NODE_STR,s,0,0)
NEW_NODE          302 node.h         #define NEW_DSTR(s) NEW_NODE(NODE_DSTR,s,1,0)
NEW_NODE          303 node.h         #define NEW_XSTR(s) NEW_NODE(NODE_XSTR,s,0,0)
NEW_NODE          304 node.h         #define NEW_DXSTR(s) NEW_NODE(NODE_DXSTR,s,0,0)
NEW_NODE          305 node.h         #define NEW_DSYM(s) NEW_NODE(NODE_DSYM,s,0,0)
NEW_NODE          306 node.h         #define NEW_EVSTR(n) NEW_NODE(NODE_EVSTR,0,(n),0)
NEW_NODE          307 node.h         #define NEW_CALL(r,m,a) NEW_NODE(NODE_CALL,r,m,a)
NEW_NODE          308 node.h         #define NEW_FCALL(m,a) NEW_NODE(NODE_FCALL,0,m,a)
NEW_NODE          309 node.h         #define NEW_VCALL(m) NEW_NODE(NODE_VCALL,0,m,0)
NEW_NODE          310 node.h         #define NEW_SUPER(a) NEW_NODE(NODE_SUPER,0,0,a)
NEW_NODE          311 node.h         #define NEW_ZSUPER() NEW_NODE(NODE_ZSUPER,0,0,0)
NEW_NODE          312 node.h         #define NEW_ARGS(f,o,r) NEW_NODE(NODE_ARGS,o,r,f)
NEW_NODE          313 node.h         #define NEW_ARGSCAT(a,b) NEW_NODE(NODE_ARGSCAT,a,b,0)
NEW_NODE          314 node.h         #define NEW_ARGSPUSH(a,b) NEW_NODE(NODE_ARGSPUSH,a,b,0)
NEW_NODE          315 node.h         #define NEW_SPLAT(a) NEW_NODE(NODE_SPLAT,a,0,0)
NEW_NODE          316 node.h         #define NEW_TO_ARY(a) NEW_NODE(NODE_TO_ARY,a,0,0)
NEW_NODE          317 node.h         #define NEW_SVALUE(a) NEW_NODE(NODE_SVALUE,a,0,0)
NEW_NODE          318 node.h         #define NEW_BLOCK_ARG(v) NEW_NODE(NODE_BLOCK_ARG,v,0,local_cnt(v))
NEW_NODE          319 node.h         #define NEW_BLOCK_PASS(b) NEW_NODE(NODE_BLOCK_PASS,0,b,0)
NEW_NODE          320 node.h         #define NEW_ALIAS(n,o) NEW_NODE(NODE_ALIAS,n,o,0)
NEW_NODE          321 node.h         #define NEW_VALIAS(n,o) NEW_NODE(NODE_VALIAS,n,o,0)
NEW_NODE          322 node.h         #define NEW_UNDEF(i) NEW_NODE(NODE_UNDEF,0,i,0)
NEW_NODE          323 node.h         #define NEW_CLASS(n,b,s) NEW_NODE(NODE_CLASS,n,NEW_SCOPE(b),(s))
NEW_NODE          324 node.h         #define NEW_SCLASS(r,b) NEW_NODE(NODE_SCLASS,r,NEW_SCOPE(b),0)
NEW_NODE          325 node.h         #define NEW_MODULE(n,b) NEW_NODE(NODE_MODULE,n,NEW_SCOPE(b),0)
NEW_NODE          326 node.h         #define NEW_COLON2(c,i) NEW_NODE(NODE_COLON2,c,i,0)
NEW_NODE          327 node.h         #define NEW_COLON3(i) NEW_NODE(NODE_COLON3,0,i,0)
NEW_NODE          328 node.h         #define NEW_CREF(c) (NEW_NODE(NODE_CREF,0,0,c))
NEW_NODE          329 node.h         #define NEW_DOT2(b,e) NEW_NODE(NODE_DOT2,b,e,0)
NEW_NODE          330 node.h         #define NEW_DOT3(b,e) NEW_NODE(NODE_DOT3,b,e,0)
NEW_NODE          331 node.h         #define NEW_ATTRSET(a) NEW_NODE(NODE_ATTRSET,a,0,0)
NEW_NODE          332 node.h         #define NEW_SELF() NEW_NODE(NODE_SELF,0,0,0)
NEW_NODE          333 node.h         #define NEW_NIL() NEW_NODE(NODE_NIL,0,0,0)
NEW_NODE          334 node.h         #define NEW_TRUE() NEW_NODE(NODE_TRUE,0,0,0)
NEW_NODE          335 node.h         #define NEW_FALSE() NEW_NODE(NODE_FALSE,0,0,0)
NEW_NODE          336 node.h         #define NEW_ERRINFO() NEW_NODE(NODE_ERRINFO,0,0,0)
NEW_NODE          337 node.h         #define NEW_DEFINED(e) NEW_NODE(NODE_DEFINED,e,0,0)
NEW_NODE          339 node.h         #define NEW_POSTEXE() NEW_NODE(NODE_POSTEXE,0,0,0)
NEW_NODE          340 node.h         #define NEW_BMETHOD(b) NEW_NODE(NODE_BMETHOD,0,0,b)
NEW_NODE          341 node.h         #define NEW_ATTRASGN(r,m,a) NEW_NODE(NODE_ATTRASGN,r,m,a)
NEW_NODE          342 node.h         #define NEW_PRELUDE(p,b) NEW_NODE(NODE_PRELUDE,p,b,0)
NEW_NODE          450 parse.y        #define NEW_BLOCK_PARAM(b, v) NEW_NODE(NODE_BLOCK_PASS, 0, b, v)
NEW_NODE         3608 parse.y        				node = NEW_NODE(NODE_DXSTR, rb_str_new(0, 0), 1, NEW_LIST(node));
NEW_NODE         3638 parse.y        			    node = NEW_NODE(NODE_DSTR, rb_str_new(0, 0), 1, NEW_LIST(node));
NEW_NODE         3885 parse.y        				$$ = NEW_NODE(NODE_DSYM, rb_str_new(0, 0), 1, NEW_LIST($$));
NEW_NODE         4206 parse.y        			    $$ = NEW_NODE(NODE_LASGN,0,0,local_append(0));
NEW_NODE         7787 parse.y        	node->nd_2nd = NEW_NODE(type, second, right, 0);
NEW_NODE         7790 parse.y            return NEW_NODE(type, left, right, 0);


NEW_NOT

NEW_NOT          1059 parse.y        			$$ = NEW_NOT(cond($2));
NEW_NOT          1067 parse.y        			$$ = NEW_NOT(cond($2));
NEW_NOT          1992 parse.y        			$$ = NEW_NOT(call_op($1, tEQ, 1, $3));
NEW_NOT          2008 parse.y        			$$ = NEW_NOT(match_op($1, $3));
NEW_NOT          2016 parse.y        			$$ = NEW_NOT(cond($2));


NEW_OP_ASGN1

NEW_OP_ASGN1      942 parse.y        			$$ = NEW_OP_ASGN1($1, $5, args);
NEW_OP_ASGN1     1697 parse.y        			$$ = NEW_OP_ASGN1($1, $5, args);


NEW_OP_ASGN2

NEW_OP_ASGN2      959 parse.y        			$$ = NEW_OP_ASGN2($1, $3, $4, $5);
NEW_OP_ASGN2      976 parse.y        			$$ = NEW_OP_ASGN2($1, $3, $4, $5);
NEW_OP_ASGN2      993 parse.y        			$$ = NEW_OP_ASGN2($1, $3, $4, $5);
NEW_OP_ASGN2     1714 parse.y        			$$ = NEW_OP_ASGN2($1, $3, $4, $5);
NEW_OP_ASGN2     1731 parse.y        			$$ = NEW_OP_ASGN2($1, $3, $4, $5);
NEW_OP_ASGN2     1748 parse.y        			$$ = NEW_OP_ASGN2($1, $3, $4, $5);


NEW_OP_ASGN_AND

NEW_OP_ASGN_AND   911 parse.y        				$$ = NEW_OP_ASGN_AND(gettable(vid), $1);
NEW_OP_ASGN_AND  1666 parse.y        				$$ = NEW_OP_ASGN_AND(gettable(vid), $1);


NEW_OP_ASGN_OR

NEW_OP_ASGN_OR    904 parse.y        				$$ = NEW_OP_ASGN_OR(gettable(vid), $1);
NEW_OP_ASGN_OR   1659 parse.y        				$$ = NEW_OP_ASGN_OR(gettable(vid), $1);


NEW_RESBODY

NEW_RESBODY       834 parse.y        			$$ = NEW_RESCUE($1, NEW_RESBODY(0,$3,0), 0);
NEW_RESBODY      1646 parse.y        			$$ = node_assign($1, NEW_RESCUE($3, NEW_RESBODY(0,$5,0), 0));
NEW_RESBODY      3499 parse.y        			$$ = NEW_RESBODY($2, $5, $6);


NEW_RESCUE

NEW_RESCUE        662 parse.y        			    $$ = NEW_RESCUE($1, $2, $3);
NEW_RESCUE        834 parse.y        			$$ = NEW_RESCUE($1, NEW_RESBODY(0,$3,0), 0);
NEW_RESCUE       1646 parse.y        			$$ = node_assign($1, NEW_RESCUE($3, NEW_RESBODY(0,$5,0), 0));


NEW_RETURN

NEW_RETURN       1091 parse.y        			$$ = NEW_RETURN(ret_args($2));
NEW_RETURN       2567 parse.y        			$$ = NEW_RETURN(0);


NEW_RFUNC

NEW_RFUNC         243 node.h         #define NEW_DEFN(i,a,d,p) NEW_NODE(NODE_DEFN,p,i,NEW_RFUNC(a,d))
NEW_RFUNC         244 node.h         #define NEW_DEFS(r,i,a,d) NEW_NODE(NODE_DEFS,r,i,NEW_RFUNC(a,d))


NEW_SCOPE

NEW_SCOPE         247 node.h         #define NEW_RFUNC(b1,b2) NEW_SCOPE(block_append(b1,b2))
NEW_SCOPE         323 node.h         #define NEW_CLASS(n,b,s) NEW_NODE(NODE_CLASS,n,NEW_SCOPE(b),(s))
NEW_SCOPE         324 node.h         #define NEW_SCLASS(r,b) NEW_NODE(NODE_SCLASS,r,NEW_SCOPE(b),0)
NEW_SCOPE         325 node.h         #define NEW_MODULE(n,b) NEW_NODE(NODE_MODULE,n,NEW_SCOPE(b),0)
NEW_SCOPE         338 node.h         #define NEW_PREEXE(b) NEW_SCOPE(b)


NEW_SELF

NEW_SELF         4250 parse.y        			    $$ = NEW_SELF();
NEW_SELF         7168 parse.y        	return NEW_SELF();


NEW_SPLAT

NEW_SPLAT        2133 parse.y        			$$ = newline_node(NEW_SPLAT($2));
NEW_SPLAT        2252 parse.y        			$$ = arg_blk_pass(NEW_SPLAT($2), $3);
NEW_SPLAT        2366 parse.y        			$$ = arg_blk_pass(NEW_SPLAT($2), $3);
NEW_SPLAT        2461 parse.y        			$$ = NEW_SPLAT($2);


NEW_STACK

NEW_STACK         366 ext/racc/cparse/cparse.c     v->tstack = v->debug ? NEW_STACK() : Qnil;
NEW_STACK         367 ext/racc/cparse/cparse.c     v->vstack = NEW_STACK();
NEW_STACK         368 ext/racc/cparse/cparse.c     v->state = NEW_STACK();


NEW_STR

NEW_STR          3559 parse.y        			    node = NEW_STR(rb_str_new(0, 0));
NEW_STR          4436 parse.y        # define set_yylval_str(x) yylval.node = NEW_STR(x)
NEW_STR          7075 parse.y        	    tail->nd_head = NEW_STR(tail->nd_lit);
NEW_STR          7180 parse.y        	return NEW_STR(rb_str_new2(ruby_sourcefile));


NEW_STRTERM

NEW_STRTERM      5396 parse.y            lex_strterm = NEW_STRTERM(-1, 0, 0);
NEW_STRTERM      5853 parse.y        	lex_strterm = NEW_STRTERM(str_dquote, '"', 0);
NEW_STRTERM      5868 parse.y        	lex_strterm = NEW_STRTERM(str_xquote, '`', 0);
NEW_STRTERM      5872 parse.y        	lex_strterm = NEW_STRTERM(str_squote, '\'', 0);
NEW_STRTERM      6329 parse.y        	    lex_strterm = NEW_STRTERM(str_ssym, c, 0);
NEW_STRTERM      6332 parse.y        	    lex_strterm = NEW_STRTERM(str_dsym, c, 0);
NEW_STRTERM      6343 parse.y        	    lex_strterm = NEW_STRTERM(str_regexp, '/', 0);
NEW_STRTERM      6355 parse.y        		lex_strterm = NEW_STRTERM(str_regexp, '/', 0);
NEW_STRTERM      6515 parse.y        		lex_strterm = NEW_STRTERM(str_dquote, term, paren);
NEW_STRTERM      6519 parse.y        		lex_strterm = NEW_STRTERM(str_squote, term, paren);
NEW_STRTERM      6523 parse.y        		lex_strterm = NEW_STRTERM(str_dquote | STR_FUNC_QWORDS, term, paren);
NEW_STRTERM      6529 parse.y        		lex_strterm = NEW_STRTERM(str_squote | STR_FUNC_QWORDS, term, paren);
NEW_STRTERM      6535 parse.y        		lex_strterm = NEW_STRTERM(str_xquote, term, paren);
NEW_STRTERM      6539 parse.y        		lex_strterm = NEW_STRTERM(str_regexp, term, paren);
NEW_STRTERM      6543 parse.y        		lex_strterm = NEW_STRTERM(str_ssym, term, paren);


NEW_STRTERM0

NEW_STRTERM0     5144 parse.y        # define NEW_STRTERM(func, term, paren) NEW_STRTERM0(func, term, paren)
NEW_STRTERM0     5150 parse.y            NODE *node = NEW_STRTERM0(func, term, paren);


NEW_SUPER

NEW_SUPER        7974 parse.y        	a->nd_iter = NEW_SUPER(a->nd_head);
NEW_SUPER        7977 parse.y            return NEW_SUPER(a);


NEW_SVALUE

NEW_SVALUE       1013 parse.y        			$$ = node_assign($1, NEW_SVALUE($3));
NEW_SVALUE       7829 parse.y        	    node = NEW_SVALUE(node);


NEW_TO_ARY

NEW_TO_ARY        890 parse.y        			$1->nd_value = ($1->nd_head) ? NEW_TO_ARY($3) : NEW_ARRAY($3);
NEW_TO_ARY       1021 parse.y        			$1->nd_value = ($1->nd_head) ? NEW_TO_ARY($3) : NEW_ARRAY($3);


NEW_UNDEF

NEW_UNDEF        1583 parse.y        			$$ = NEW_UNDEF($1);
NEW_UNDEF        1591 parse.y        			$$ = block_append($1, NEW_UNDEF($4));


NEW_UNLESS

NEW_UNLESS        789 parse.y        			$$ = NEW_UNLESS(cond($3), $1, 0);
NEW_UNLESS       2656 parse.y        			$$ = NEW_UNLESS(cond($2), $4, $5);


NEW_UNTIL

NEW_UNTIL         819 parse.y        			    $$ = NEW_UNTIL(cond($3), $1->nd_body, 0);
NEW_UNTIL         822 parse.y        			    $$ = NEW_UNTIL(cond($3), $1, 1);
NEW_UNTIL        2686 parse.y        			$$ = NEW_UNTIL(cond($3), $6, 1);


NEW_VALIAS

NEW_VALIAS        739 parse.y        			$$ = NEW_VALIAS($2, $3);
NEW_VALIAS        750 parse.y        			$$ = NEW_VALIAS($2, rb_intern(buf));


NEW_WHEN

NEW_WHEN         3461 parse.y        			$$ = NEW_WHEN($2, $4, $5);
NEW_WHEN         3471 parse.y        			$$ = list_append($1, NEW_WHEN($4, 0, 0));
NEW_WHEN         3479 parse.y        			$$ = NEW_LIST(NEW_WHEN($2, 0, 0));


NEW_WHILE

NEW_WHILE         803 parse.y        			    $$ = NEW_WHILE(cond($3), $1->nd_body, 0);
NEW_WHILE         806 parse.y        			    $$ = NEW_WHILE(cond($3), $1, 1);
NEW_WHILE        2672 parse.y        			$$ = NEW_WHILE(cond($3), $6, 1);


NEW_YIELD

NEW_YIELD        2583 parse.y        			$$ = NEW_YIELD(0, Qfalse);
NEW_YIELD        2591 parse.y        			$$ = NEW_YIELD(0, Qfalse);
NEW_YIELD        7853 parse.y            return NEW_YIELD(node, state);


NEW_ZARRAY

NEW_ZARRAY       2547 parse.y        			    $$ = NEW_ZARRAY(); /* zero length array*/
NEW_ZARRAY       3659 parse.y        			$$ = NEW_ZARRAY();
NEW_ZARRAY       3709 parse.y        			$$ = NEW_ZARRAY();


NEW_ZSUPER

NEW_ZSUPER        606 eval.c         	    rb_add_method(klass, name, NEW_ZSUPER(), noex);
NEW_ZSUPER       3361 parse.y        			$$ = NEW_ZSUPER();


NEXT

NEXT             1972 ext/nkf/nkf-utf8/nkf.c                     NEXT;
NEXT             1978 ext/nkf/nkf-utf8/nkf.c                         NEXT;
NEXT             1987 ext/nkf/nkf-utf8/nkf.c                     NEXT;
NEXT             2012 ext/nkf/nkf-utf8/nkf.c                     NEXT;
NEXT             2022 ext/nkf/nkf-utf8/nkf.c                             NEXT;
NEXT             2035 ext/nkf/nkf-utf8/nkf.c 				NEXT;
NEXT             2042 ext/nkf/nkf-utf8/nkf.c                             NEXT;
NEXT             2047 ext/nkf/nkf-utf8/nkf.c                        NEXT;
NEXT             2061 ext/nkf/nkf-utf8/nkf.c 			    NEXT;
NEXT             2068 ext/nkf/nkf-utf8/nkf.c                         NEXT;
NEXT             2073 ext/nkf/nkf-utf8/nkf.c                     NEXT;
NEXT             2086 ext/nkf/nkf-utf8/nkf.c 				NEXT;
NEXT             2090 ext/nkf/nkf-utf8/nkf.c                             NEXT;
NEXT             2094 ext/nkf/nkf-utf8/nkf.c                         NEXT;
NEXT             2102 ext/nkf/nkf-utf8/nkf.c                 NEXT;
NEXT             2105 ext/nkf/nkf-utf8/nkf.c                 NEXT;
NEXT             2124 ext/nkf/nkf-utf8/nkf.c                         NEXT;
NEXT             2137 ext/nkf/nkf-utf8/nkf.c                             NEXT;
NEXT             2142 ext/nkf/nkf-utf8/nkf.c                             NEXT;
NEXT             2150 ext/nkf/nkf-utf8/nkf.c                             NEXT;
NEXT             2156 ext/nkf/nkf-utf8/nkf.c                         NEXT;
NEXT             2161 ext/nkf/nkf-utf8/nkf.c                         NEXT;
NEXT             2173 ext/nkf/nkf-utf8/nkf.c                             NEXT;
NEXT             2177 ext/nkf/nkf-utf8/nkf.c                             NEXT;
NEXT             2180 ext/nkf/nkf-utf8/nkf.c                             NEXT;


NEXTFROM

NEXTFROM          507 pack.c         	    from = NEXTFROM;
NEXTFROM          672 pack.c         		from = NEXTFROM;
NEXTFROM          683 pack.c         		from = NEXTFROM;
NEXTFROM          694 pack.c         		from = NEXTFROM;
NEXTFROM          705 pack.c         		from = NEXTFROM;
NEXTFROM          716 pack.c         		from = NEXTFROM;
NEXTFROM          726 pack.c         		from = NEXTFROM;
NEXTFROM          737 pack.c         		from = NEXTFROM;
NEXTFROM          748 pack.c         		from = NEXTFROM;
NEXTFROM          759 pack.c         		from = NEXTFROM;
NEXTFROM          771 pack.c         		from = NEXTFROM;
NEXTFROM          782 pack.c         		from = NEXTFROM;
NEXTFROM          794 pack.c         		from = NEXTFROM;
NEXTFROM          806 pack.c         		from = NEXTFROM;
NEXTFROM          817 pack.c         		from = NEXTFROM;
NEXTFROM          829 pack.c         		from = NEXTFROM;
NEXTFROM          871 pack.c         		from = NEXTFROM;
NEXTFROM          884 pack.c         	    from = NEXTFROM;
NEXTFROM          907 pack.c         	    from = rb_obj_as_string(NEXTFROM);
NEXTFROM          927 pack.c         		from = NEXTFROM;
NEXTFROM          948 pack.c         		from = NEXTFROM;


NEXT_ARGF_FORWARD

NEXT_ARGF_FORWARD 4350 io.c               NEXT_ARGF_FORWARD(argc, argv);
NEXT_ARGF_FORWARD 5226 io.c               NEXT_ARGF_FORWARD(0, 0);


NGROUPS

NGROUPS           796 file.c         #  ifndef NGROUPS
NGROUPS           804 file.c         	GETGROUPS_T gary[NGROUPS];
NGROUPS           807 file.c         	anum = getgroups(NGROUPS, gary);


NIL_P

NIL_P             329 array.c        	if (!NIL_P(val)) {
NIL_P            1269 array.c        	len += NIL_P(tmp) ? 10 : RSTRING(tmp)->len;
NIL_P            1271 array.c            if (!NIL_P(sep)) {
NIL_P            1293 array.c        	if (i > 0 && !NIL_P(sep))
NIL_P            1320 array.c            if (NIL_P(sep)) sep = rb_output_fs;
NIL_P            2125 array.c        	beg = NIL_P(arg1) ? 0 : NUM2LONG(arg1);
NIL_P            2130 array.c        	len = NIL_P(arg2) ? RARRAY(ary)->len - beg : NUM2LONG(arg2);
NIL_P            2232 array.c            if (!NIL_P(tmp)) {
NIL_P            2671 array.c        	if (NIL_P(*t)) t++;
NIL_P            2734 array.c         	    if (!NIL_P(*p)) n++;
NIL_P            2758 array.c        	if (!NIL_P(tmp)) {
NIL_P            2795 array.c        	if (!NIL_P(tmp)) {
NIL_P            2796 array.c        	    if (NIL_P(memo)) {
NIL_P             355 class.c            if (NIL_P(module)) return;
NIL_P              22 compar.c           if (NIL_P(val)) {
NIL_P              56 compar.c           if (NIL_P(c)) return Qfalse;
NIL_P            1611 dir.c              if (NIL_P(ary)) {
NIL_P             168 enum.c             if (!NIL_P(if_none)) {
NIL_P             107 error.c            if (NIL_P(ruby_verbose)) return;
NIL_P             143 error.c            if (!NIL_P(ruby_verbose)) {
NIL_P             214 error.c        		if (NIL_P(x)) {
NIL_P             346 error.c            if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc));
NIL_P             439 error.c            if (!NIL_P(bt)) {
NIL_P             541 error.c            if (NIL_P(status)) return Qtrue;
NIL_P             609 error.c            if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc));
NIL_P             684 error.c            if (NIL_P(mesg)) return Qnil;
NIL_P             702 error.c        	    if (NIL_P(d) || RSTRING(d)->len > 65) {
NIL_P             840 error.c        	if (!NIL_P(error) && st_lookup(syserr_tbl, NUM2LONG(error), &klass)) {
NIL_P             852 error.c            if (!NIL_P(error)) err = strerror(NUM2LONG(error));
NIL_P             854 error.c            if (!NIL_P(mesg)) {
NIL_P             899 error.c            if (NIL_P(num)) {
NIL_P            1476 error.c        	if (NIL_P(ruby_errinfo)) {
NIL_P             386 eval.c             if (NIL_P(klass)) klass = rb_cObject;
NIL_P            1119 eval.c             if (NIL_P(info)) return Qnil;
NIL_P            1121 eval.c             if (NIL_P(info)) return Qnil;
NIL_P            1139 eval.c             if (NIL_P(ruby_errinfo)) return;
NIL_P            1149 eval.c             if (NIL_P(errat)){
NIL_P            1162 eval.c         	if (NIL_P(mesg)) error_pos();
NIL_P            1214 eval.c             if (!NIL_P(errat)) {
NIL_P            1564 eval.c             if (!NIL_P(ruby_errinfo)) {
NIL_P            1769 eval.c         	if (!NIL_P(klass)) {
NIL_P            1771 eval.c         		if (result == Qundef && NIL_P(rb_autoload_p((VALUE)klass, id))) {
NIL_P            1791 eval.c         	if (!NIL_P(klass)) {
NIL_P            1811 eval.c             while (cref && cref->nd_next && (NIL_P(cref->nd_clss) || FL_TEST(cref->nd_clss, FL_SINGLETON))) {
NIL_P            1817 eval.c             if (NIL_P(cref->nd_clss)) {
NIL_P            1845 eval.c         	if (!NIL_P(cbase->nd_clss)) rb_ary_push(ary, cbase->nd_clss);
NIL_P            1875 eval.c         	if (!NIL_P(cbase->nd_clss)) {
NIL_P            1881 eval.c             if (!NIL_P(ruby_cbase)) {
NIL_P            2466 eval.c             if (NIL_P(trace)) {
NIL_P            2575 eval.c             if (NIL_P(tmp)) {
NIL_P            2583 eval.c         	if (NIL_P(top)) {
NIL_P            2601 eval.c             if (NIL_P(tmp)) {
NIL_P            2606 eval.c         	if (!NIL_P(top) && RARRAY(top)->len > 1) {
NIL_P            2621 eval.c             if (NIL_P(tmp)) {
NIL_P            2780 eval.c         	    while (!NIL_P(rb_gets())) {
NIL_P            3489 eval.c         	    if (NIL_P(ruby_cbase)) {
NIL_P            3497 eval.c         	if (NIL_P(ruby_cbase)) {
NIL_P            3728 eval.c         	    if (NIL_P(ruby_class)) {
NIL_P            3803 eval.c         	if (NIL_P(ruby_class)) {
NIL_P            3811 eval.c         	if (NIL_P(ruby_class)) {
NIL_P            3833 eval.c         	    if (NIL_P(ruby_cbase)) {
NIL_P            3885 eval.c         	    if (NIL_P(ruby_cbase)) {
NIL_P            4315 eval.c         	if (!NIL_P(ruby_errinfo)) {
NIL_P            4349 eval.c             if (NIL_P(mesg)) mesg = ruby_errinfo;
NIL_P            4350 eval.c             if (NIL_P(mesg)) {
NIL_P            4355 eval.c             if (ruby_sourcefile && !NIL_P(mesg)) {
NIL_P            4357 eval.c         	if (NIL_P(at)) {
NIL_P            4362 eval.c             if (!NIL_P(mesg)) {
NIL_P            4366 eval.c             if (RTEST(ruby_debug) && !NIL_P(ruby_errinfo)
NIL_P            4465 eval.c         	if (NIL_P(argv[0])) break;
NIL_P            6038 eval.c             if (NIL_P(level)) lev = 1;
NIL_P            6103 eval.c             if (!NIL_P(scope)) {
NIL_P            6162 eval.c         	if (!NIL_P(result)) ruby_errinfo = result;
NIL_P            6169 eval.c             if (!NIL_P(scope)) {
NIL_P            6205 eval.c         		if (!NIL_P(errat) && TYPE(errat) == T_ARRAY) {
NIL_P            6206 eval.c         		    if (!NIL_P(mesg) && TYPE(mesg) == T_STRING) {
NIL_P            6250 eval.c         	if (!NIL_P(scope) && !OBJ_TAINTED(scope)) {
NIL_P            6264 eval.c             if (!NIL_P(vfile)) file = RSTRING(vfile)->ptr;
NIL_P            6265 eval.c             if (NIL_P(scope) && ruby_frame->prev) {
NIL_P            6632 eval.c             if (!NIL_P(ruby_errinfo))	/* exception during load */
NIL_P            6973 eval.c             if (NIL_P(result)) {
NIL_P            7386 eval.c             if (!NIL_P(val) && !rb_obj_is_kind_of(val, rb_eException)) {
NIL_P            7401 eval.c             if (NIL_P(ruby_errinfo)) {
NIL_P            8532 eval.c             if (NIL_P(proc)) {
NIL_P            10935 eval.c             if (!NIL_P(th->errinfo) && (th->flags & THREAD_RAISED)) {
NIL_P            10999 eval.c             if (!NIL_P(limit)) delay = rb_num2dbl(limit);
NIL_P            11786 eval.c             if (state && status != THREAD_TO_KILL && !NIL_P(ruby_errinfo)) {
NIL_P            12041 eval.c         	if (!NIL_P(th->errinfo) && (th->flags & THREAD_RAISED))
NIL_P            12376 eval.c             if (NIL_P(val)) {
NIL_P            13025 eval.c             if (NIL_P(hash) || TYPE(hash) != T_HASH) {
NIL_P            13031 eval.c         	if (NIL_P(list) || TYPE(list) != T_ARRAY) return Qfalse;
NIL_P            13043 eval.c             if (NIL_P(hash) || TYPE(hash) != T_HASH) {
NIL_P            13051 eval.c             if (NIL_P(list) || TYPE(list) != T_ARRAY) {
NIL_P            13065 eval.c             if (NIL_P(hash) || TYPE(hash) != T_HASH) {
NIL_P            13072 eval.c             if (NIL_P(list) || TYPE(list) != T_ARRAY) {
NIL_P             116 ext/Win32API/Win32API.c     if (NIL_P(export)) {
NIL_P             180 ext/Win32API/Win32API.c 	    if (NIL_P(str)) {
NIL_P             409 ext/curses/curses.c     if (!NIL_P(str)) {
NIL_P            1032 ext/curses/curses.c     if (!NIL_P(corn)) {
NIL_P            1123 ext/curses/curses.c     if (!NIL_P(str)) {
NIL_P             111 ext/dbm/dbm.c      else if (NIL_P(vmode)) {
NIL_P             118 ext/dbm/dbm.c      if (!NIL_P(vflags))
NIL_P             161 ext/dbm/dbm.c      if (NIL_P(fdbm_initialize(argc, argv, obj))) {
NIL_P             211 ext/dbm/dbm.c      if (argc == 1 && !rb_block_given_p() && NIL_P(valstr))
NIL_P             161 ext/digest/digest.c     if (!NIL_P(arg)) rb_digest_base_update(self, arg);
NIL_P             121 ext/dl/cfunc.c     sname = NIL_P(name) ? NULL : StringValuePtr(name);
NIL_P             128 ext/dl/cptr.c      f = NIL_P(sym) ? NULL : RCFUNC_DATA(sym)->ptr;
NIL_P              59 ext/dl/handle.c     clib = NIL_P(lib) ? NULL : StringValuePtr(lib);
NIL_P              63 ext/dl/handle.c     clib = NIL_P(lib) ? NULL : StringValuePtr(lib);
NIL_P             113 ext/gdbm/gdbm.c     else if (NIL_P(vmode)) {
NIL_P             120 ext/gdbm/gdbm.c     if (!NIL_P(vflags))
NIL_P             171 ext/gdbm/gdbm.c     if (NIL_P(fgdbm_initialize(argc, argv, obj))) {
NIL_P             281 ext/gdbm/gdbm.c     if (NIL_P(valstr)) {
NIL_P             306 ext/gdbm/gdbm.c     if (argc == 1 && !rb_block_given_p() && NIL_P(valstr))
NIL_P             326 ext/gdbm/gdbm.c         if (!NIL_P(valstr2) &&
NIL_P             434 ext/gdbm/gdbm.c     if (NIL_P(keystr)) return Qnil;
NIL_P             773 ext/gdbm/gdbm.c         if (!NIL_P(valstr2) &&
NIL_P             314 ext/iconv/iconv.c     if (NIL_P(str))
NIL_P             342 ext/iconv/iconv.c     if (NIL_P(str)) {
NIL_P             359 ext/iconv/iconv.c 	    else if (!NIL_P(str)) {
NIL_P             397 ext/iconv/iconv.c 	    if (NIL_P(error) ||	/* something converted */
NIL_P             402 ext/iconv/iconv.c 		if (NIL_P(str)) {
NIL_P             439 ext/iconv/iconv.c 		if (len > 1 && !NIL_P(str = RARRAY(rescue)->ptr[1])) {
NIL_P             446 ext/iconv/iconv.c 	    else if (!NIL_P(rescue)) {
NIL_P             524 ext/iconv/iconv.c     if (!NIL_P(options)) {
NIL_P             603 ext/iconv/iconv.c     if (!NIL_P(last)) {
NIL_P             796 ext/iconv/iconv.c 			 NIL_P(n1) ? 0 : NUM2INT(n1),
NIL_P             797 ext/iconv/iconv.c 			 NIL_P(n2) ? -1 : NUM2INT(n2),
NIL_P             111 ext/io/wait/wait.c     if (NIL_P(timeout)) {
NIL_P             134 ext/openssl/ossl.c     if(!NIL_P(str)) memcpy(RSTRING(str)->ptr, buf, len);
NIL_P             212 ext/openssl/ossl.c     if (!NIL_P(proc)) {
NIL_P             242 ext/openssl/ossl_asn1.c     if(!NIL_P(obj))
NIL_P             513 ext/openssl/ossl_asn1.c         flag = NIL_P(rflag) ? -1 : NUM2INT(rflag);
NIL_P             589 ext/openssl/ossl_asn1.c     if(NIL_P(tag))
NIL_P             602 ext/openssl/ossl_asn1.c     if(NIL_P(s)) return 0;
NIL_P             623 ext/openssl/ossl_asn1.c     if(NIL_P(s)) ret = V_ASN1_UNIVERSAL;
NIL_P             873 ext/openssl/ossl_asn1.c 	if(NIL_P(tag))
NIL_P             875 ext/openssl/ossl_asn1.c         if(NIL_P(tagging))
NIL_P             879 ext/openssl/ossl_asn1.c 	if(NIL_P(tag_class))
NIL_P             475 ext/openssl/ossl_bn.c     if (!NIL_P(vadd)) {
NIL_P             476 ext/openssl/ossl_bn.c 	if (NIL_P(vrem)) {
NIL_P             576 ext/openssl/ossl_bn.c     if (!NIL_P(vchecks)) {
NIL_P             148 ext/openssl/ossl_cipher.c 	if (NIL_P(init_v)) memcpy(iv, "OpenSSL for Ruby rulez!", sizeof(iv));
NIL_P             198 ext/openssl/ossl_cipher.c     if(!NIL_P(vsalt)){
NIL_P             204 ext/openssl/ossl_cipher.c     iter = NIL_P(viter) ? 2048 : NUM2INT(viter);
NIL_P             205 ext/openssl/ossl_cipher.c     digest = NIL_P(vdigest) ? EVP_md5() : GetDigestPtr(vdigest);
NIL_P             138 ext/openssl/ossl_config.c     if(!NIL_P(path)){
NIL_P             221 ext/openssl/ossl_config.c     if (NIL_P(section)) section = rb_str_new2("");
NIL_P             223 ext/openssl/ossl_config.c     if (NIL_P(name)) {
NIL_P              90 ext/openssl/ossl_digest.c     if (!NIL_P(data)) StringValue(data);
NIL_P             100 ext/openssl/ossl_digest.c     if (!NIL_P(data)) return ossl_digest_update(self, data);
NIL_P              58 ext/openssl/ossl_engine.c     if(NIL_P(name)){
NIL_P             224 ext/openssl/ossl_engine.c     sid = NIL_P(id) ? NULL : StringValuePtr(id);
NIL_P             225 ext/openssl/ossl_engine.c     sdata = NIL_P(data) ? NULL : StringValuePtr(data);
NIL_P             248 ext/openssl/ossl_engine.c     sid = NIL_P(id) ? NULL : StringValuePtr(id);
NIL_P             249 ext/openssl/ossl_engine.c     sdata = NIL_P(data) ? NULL : StringValuePtr(data);
NIL_P             283 ext/openssl/ossl_engine.c     if (!NIL_P(val)) StringValue(val);
NIL_P             285 ext/openssl/ossl_engine.c 				 NIL_P(val) ? NULL : RSTRING(val)->ptr, 0);
NIL_P             109 ext/openssl/ossl_ocsp.c     if(!NIL_P(arg)){
NIL_P             130 ext/openssl/ossl_ocsp.c     if(NIL_P(val)) {
NIL_P             221 ext/openssl/ossl_ocsp.c     flg = NIL_P(flags) ? 0 : NUM2INT(flags);
NIL_P             222 ext/openssl/ossl_ocsp.c     if(NIL_P(certs)){
NIL_P             246 ext/openssl/ossl_ocsp.c     flg = NIL_P(flags) ? 0 : INT2NUM(flags);
NIL_P             287 ext/openssl/ossl_ocsp.c     if(NIL_P(basic_resp)) bs = NULL;
NIL_P             316 ext/openssl/ossl_ocsp.c     if(!NIL_P(arg)){
NIL_P             432 ext/openssl/ossl_ocsp.c     if(NIL_P(val)) {
NIL_P             460 ext/openssl/ossl_ocsp.c     rsn = NIL_P(status) ? 0 : NUM2INT(reason);
NIL_P             461 ext/openssl/ossl_ocsp.c     if(!NIL_P(ext)){
NIL_P             470 ext/openssl/ossl_ocsp.c     if(!NIL_P(revtime)){
NIL_P             489 ext/openssl/ossl_ocsp.c     if(!NIL_P(ext)){
NIL_P             573 ext/openssl/ossl_ocsp.c     flg = NIL_P(flags) ? 0 : NUM2INT(flags);
NIL_P             574 ext/openssl/ossl_ocsp.c     if(NIL_P(certs)){
NIL_P             600 ext/openssl/ossl_ocsp.c     flg = NIL_P(flags) ? 0 : INT2NUM(flags);
NIL_P              64 ext/openssl/ossl_pkcs12.c     passphrase = NIL_P(pass) ? NULL : StringValuePtr(pass);
NIL_P              65 ext/openssl/ossl_pkcs12.c     friendlyname = NIL_P(name) ? NULL : StringValuePtr(name);
NIL_P              68 ext/openssl/ossl_pkcs12.c     x509s = NIL_P(ca) ? NULL : ossl_x509_ary2sk(ca);
NIL_P              90 ext/openssl/ossl_pkcs12.c     passphrase = NIL_P(pass) ? NULL : StringValuePtr(pass);
NIL_P             169 ext/openssl/ossl_pkcs7.c     flg = NIL_P(flags) ? 0 : NUM2INT(flags);
NIL_P             170 ext/openssl/ossl_pkcs7.c     if(NIL_P(data)) data = ossl_pkcs7_get_data(pkcs7);
NIL_P             172 ext/openssl/ossl_pkcs7.c     if(!NIL_P(data) && PKCS7_is_detached(p7))
NIL_P             174 ext/openssl/ossl_pkcs7.c     in = NIL_P(data) ? NULL : ossl_obj2bio(data);
NIL_P             205 ext/openssl/ossl_pkcs7.c     flg = NIL_P(flags) ? 0 : NUM2INT(flags);
NIL_P             207 ext/openssl/ossl_pkcs7.c     if(NIL_P(certs)) x509s = NULL;
NIL_P             241 ext/openssl/ossl_pkcs7.c     if(NIL_P(cipher)){
NIL_P             256 ext/openssl/ossl_pkcs7.c     flg = NIL_P(flags) ? 0 : NUM2INT(flags);
NIL_P             650 ext/openssl/ossl_pkcs7.c     flg = NIL_P(flags) ? 0 : NUM2INT(flags);
NIL_P             651 ext/openssl/ossl_pkcs7.c     if(NIL_P(indata)) indata = ossl_pkcs7_get_data(self);
NIL_P             652 ext/openssl/ossl_pkcs7.c     in = NIL_P(indata) ? NULL : ossl_obj2bio(indata);
NIL_P             653 ext/openssl/ossl_pkcs7.c     if(NIL_P(certs)) x509s = NULL;
NIL_P             693 ext/openssl/ossl_pkcs7.c     flg = NIL_P(flags) ? 0 : NUM2INT(flags);
NIL_P              98 ext/openssl/ossl_pkey.h 	if (NIL_P(bignum)) {						\
NIL_P             136 ext/openssl/ossl_pkey_dh.c 	if (!NIL_P(gen)) {
NIL_P             135 ext/openssl/ossl_pkey_dsa.c 	if (!NIL_P(pass)) passwd = StringValuePtr(pass);
NIL_P             201 ext/openssl/ossl_pkey_dsa.c     if (!NIL_P(cipher)) {
NIL_P             203 ext/openssl/ossl_pkey_dsa.c 	if (!NIL_P(pass)) {
NIL_P              96 ext/openssl/ossl_pkey_rsa.c     rsa = rsa_generate(NUM2INT(size), NIL_P(exp) ? RSA_F4 : NUM2INT(exp)); /* err handled by rsa_instance */
NIL_P             121 ext/openssl/ossl_pkey_rsa.c 	rsa = rsa_generate(FIX2INT(arg), NIL_P(pass) ? RSA_F4 : NUM2INT(pass));
NIL_P             125 ext/openssl/ossl_pkey_rsa.c 	if (!NIL_P(pass)) passwd = StringValuePtr(pass);
NIL_P             196 ext/openssl/ossl_pkey_rsa.c     if (!NIL_P(cipher)) {
NIL_P             198 ext/openssl/ossl_pkey_rsa.c 	if (!NIL_P(pass)) {
NIL_P             186 ext/openssl/ossl_ssl.c     if (NIL_P(cb)) return Qfalse;
NIL_P             223 ext/openssl/ossl_ssl.c     if (NIL_P(cb)) return Qfalse;
NIL_P             313 ext/openssl/ossl_ssl.c     if(!NIL_P(val)){
NIL_P             326 ext/openssl/ossl_ssl.c     if(!NIL_P(val)){
NIL_P             332 ext/openssl/ossl_ssl.c     cert = NIL_P(val) ? NULL : GetX509CertPtr(val); /* NO DUP NEEDED */
NIL_P             334 ext/openssl/ossl_ssl.c     key = NIL_P(val) ? NULL : GetPKeyPtr(val); /* NO DUP NEEDED */
NIL_P             350 ext/openssl/ossl_ssl.c     if(!NIL_P(val)){
NIL_P             370 ext/openssl/ossl_ssl.c     ca_file = NIL_P(val) ? NULL : StringValuePtr(val);
NIL_P             372 ext/openssl/ossl_ssl.c     ca_path = NIL_P(val) ? NULL : StringValuePtr(val);
NIL_P             379 ext/openssl/ossl_ssl.c     verify_mode = NIL_P(val) ? SSL_VERIFY_NONE : NUM2INT(val);
NIL_P             385 ext/openssl/ossl_ssl.c     if(!NIL_P(val)) SSL_CTX_set_timeout(ctx, NUM2LONG(val));
NIL_P             388 ext/openssl/ossl_ssl.c     if(!NIL_P(val)) SSL_CTX_set_verify_depth(ctx, NUM2LONG(val));
NIL_P             391 ext/openssl/ossl_ssl.c     if(!NIL_P(val)) SSL_CTX_set_options(ctx, NUM2LONG(val));
NIL_P             395 ext/openssl/ossl_ssl.c     if (!NIL_P(val)){
NIL_P             458 ext/openssl/ossl_ssl.c     if (NIL_P(v))
NIL_P             624 ext/openssl/ossl_ssl.c     if(NIL_P(str)) str = rb_str_new(0, ilen);
NIL_P             193 ext/openssl/ossl_x509ext.c     if (!NIL_P(issuer_cert))
NIL_P             195 ext/openssl/ossl_x509ext.c     if (!NIL_P(subject_cert))
NIL_P             197 ext/openssl/ossl_x509ext.c     if (!NIL_P(subject_req))
NIL_P             199 ext/openssl/ossl_x509ext.c     if (!NIL_P(crl))
NIL_P             230 ext/openssl/ossl_x509ext.c     if(NIL_P(critical)) critical = Qfalse;
NIL_P             240 ext/openssl/ossl_x509ext.c     conf = NIL_P(rconf) ? NULL : GetConfigPtr(rconf);
NIL_P             105 ext/openssl/ossl_x509name.c     if(NIL_P(entry[2])) entry[2] = rb_aref(template, entry[0]);
NIL_P             106 ext/openssl/ossl_x509name.c     if(NIL_P(entry[2])) entry[2] = DEFAULT_OBJECT_TYPE;
NIL_P             124 ext/openssl/ossl_x509name.c 	if (!NIL_P(tmp)) {
NIL_P             126 ext/openssl/ossl_x509name.c 	    if(NIL_P(template)) template = OBJECT_TYPE_TEMPLATE;
NIL_P             153 ext/openssl/ossl_x509name.c     if(NIL_P(type)) type = rb_aref(OBJECT_TYPE_TEMPLATE, oid);
NIL_P             187 ext/openssl/ossl_x509name.c     if (NIL_P(flag))
NIL_P             377 ext/openssl/ossl_x509store.c     if(!NIL_P(cert)) x509 = DupX509CertPtr(cert); /* NEED TO DUP */
NIL_P             378 ext/openssl/ossl_x509store.c     if(!NIL_P(chain)) x509s = ossl_x509_ary2sk(chain);
NIL_P             390 ext/openssl/ossl_x509store.c     if (!NIL_P(t = rb_iv_get(store, "@time")))
NIL_P             338 ext/racc/cparse/cparse.c     if (! NIL_P(lexmid))
NIL_P             388 ext/racc/cparse/cparse.c     if (NIL_P(block_args)) {
NIL_P             450 ext/racc/cparse/cparse.c         if (NIL_P(tmp)) goto notfound;
NIL_P             472 ext/racc/cparse/cparse.c             v->t = NIL_P(tmp) ? vERROR_TOKEN : tmp;
NIL_P             486 ext/racc/cparse/cparse.c         if (NIL_P(act_value)) goto notfound;
NIL_P             491 ext/racc/cparse/cparse.c         if (NIL_P(tmp)) goto notfound;
NIL_P             573 ext/racc/cparse/cparse.c         if (NIL_P(tmp)) goto error_pop;
NIL_P             581 ext/racc/cparse/cparse.c         if (NIL_P(act_value)) {
NIL_P             589 ext/racc/cparse/cparse.c         if (NIL_P(tmp)) {
NIL_P             743 ext/racc/cparse/cparse.c     if (NIL_P(tmp)) goto notfound;
NIL_P             750 ext/racc/cparse/cparse.c     if (NIL_P(goto_state)) {
NIL_P             757 ext/racc/cparse/cparse.c     if (NIL_P(tmp)) {
NIL_P             171 ext/readline/readline.c     if (NIL_P(proc))
NIL_P             260 ext/readline/readline.c     if (NIL_P(str)) {
NIL_P             102 ext/sdbm/init.c     else if (NIL_P(vmode)) {
NIL_P             139 ext/sdbm/init.c     if (NIL_P(fsdbm_initialize(argc, argv, obj))) {
NIL_P             189 ext/sdbm/init.c     if (argc == 1 && !rb_block_given_p() && NIL_P(valstr))
NIL_P             491 ext/socket/socket.c     if (!NIL_P(to)) StringValue(to);
NIL_P             496 ext/socket/socket.c     if (!NIL_P(to)) {
NIL_P             729 ext/socket/socket.c     if (NIL_P(host)) {
NIL_P             765 ext/socket/socket.c     if (NIL_P(port)) {
NIL_P            1168 ext/socket/socket.c     if (type != INET_SERVER && (!NIL_P(arg->local.host) || !NIL_P(arg->local.serv))) {
NIL_P            1997 ext/socket/socket.c     if (!NIL_P(tmp)) {
NIL_P            2048 ext/socket/socket.c     if (!NIL_P(tmp)) {
NIL_P            2741 ext/socket/socket.c     if (!NIL_P(type)) {
NIL_P            2789 ext/socket/socket.c     if (NIL_P(proto)) proto = rb_str_new2("tcp");
NIL_P            2818 ext/socket/socket.c     if (NIL_P(proto)) proto = rb_str_new2("tcp");
NIL_P            2841 ext/socket/socket.c     if (NIL_P(host)) {
NIL_P            2849 ext/socket/socket.c     if (NIL_P(port)) {
NIL_P            2863 ext/socket/socket.c     if (NIL_P(family)) {
NIL_P            2880 ext/socket/socket.c     if (!NIL_P(socktype)) {
NIL_P            2883 ext/socket/socket.c     if (!NIL_P(protocol)) {
NIL_P            2886 ext/socket/socket.c     if (!NIL_P(flags)) {
NIL_P            2918 ext/socket/socket.c     if (!NIL_P(flags)) {
NIL_P            2922 ext/socket/socket.c     if (!NIL_P(tmp)) {
NIL_P            2935 ext/socket/socket.c     if (!NIL_P(tmp)) {
NIL_P            2947 ext/socket/socket.c 	    if (NIL_P(host)) {
NIL_P            2965 ext/socket/socket.c 	if (NIL_P(host)) {
NIL_P            2974 ext/socket/socket.c 	if (NIL_P(port)) {
NIL_P            2989 ext/socket/socket.c 	if (NIL_P(af)) {
NIL_P             644 ext/stringio/stringio.c     switch (NIL_P(whence) ? 0 : NUM2LONG(whence)) {
NIL_P             780 ext/stringio/stringio.c     if (NIL_P(c)) rb_eof_error();
NIL_P             839 ext/stringio/stringio.c 	if (!NIL_P(str)) StringValue(str);
NIL_P             848 ext/stringio/stringio.c     if (NIL_P(str)) {
NIL_P             930 ext/stringio/stringio.c     if (NIL_P(line)) rb_eof_error();
NIL_P             950 ext/stringio/stringio.c     while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) {
NIL_P             970 ext/stringio/stringio.c     while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) {
NIL_P            1094 ext/stringio/stringio.c 	if (!NIL_P(argv[0])) {
NIL_P            1100 ext/stringio/stringio.c 		if (!NIL_P(str)) rb_str_resize(str, 0);
NIL_P            1110 ext/stringio/stringio.c 	    if (NIL_P(str)) {
NIL_P            1125 ext/stringio/stringio.c     if (NIL_P(str)) {
NIL_P            1134 ext/stringio/stringio.c     if (NIL_P(str)) {
NIL_P            1158 ext/stringio/stringio.c     if (NIL_P(val) || RSTRING(val)->len == 0) {
NIL_P            1194 ext/stringio/stringio.c     if (NIL_P(string)) {
NIL_P              54 ext/strscan/strscan.c     if (NIL_P(var->str)) rb_raise(rb_eArgError, "uninitialized StringScanner object");\
NIL_P            1118 ext/strscan/strscan.c     if (NIL_P(p->str)) {
NIL_P             150 ext/syck/rubyext.c         if (!NIL_P(str2))
NIL_P             173 ext/syck/rubyext.c     if (!NIL_P(tmp = rb_check_string_type(port))) {
NIL_P             199 ext/syck/rubyext.c    if ( NIL_P( val ) )
NIL_P             322 ext/syck/rubyext.c     if ( !NIL_P(tmp = rb_check_convert_type(entry, T_HASH, "Hash", "to_hash")) )
NIL_P             558 ext/syck/rubyext.c                     if ( !NIL_P(tmp = rb_check_convert_type(v, T_HASH, "Hash", "to_hash")) )
NIL_P             565 ext/syck/rubyext.c                     else if ( !NIL_P(tmp = rb_check_array_type(v)) )
NIL_P             569 ext/syck/rubyext.c                         if ( !NIL_P(tmph) )
NIL_P             612 ext/syck/rubyext.c     if ( NIL_P( resolver ) )
NIL_P             625 ext/syck/rubyext.c     if (n->id > 0 && !NIL_P(obj))
NIL_P             692 ext/syck/rubyext.c     if ( NIL_P( input ) )
NIL_P             848 ext/syck/rubyext.c     if ( NIL_P( proc ) ) bonus->proc = 0;
NIL_P            1079 ext/syck/rubyext.c     if (NIL_P(type) || RSTRING(StringValue(type))->len == 0)
NIL_P            1084 ext/syck/rubyext.c     if ( ! (NIL_P(type) || RSTRING(StringValue(type))->len == 0) )
NIL_P            1096 ext/syck/rubyext.c         if ( NIL_P( target_class ) )
NIL_P            1107 ext/syck/rubyext.c                 if ( NIL_P( target_class ) )
NIL_P            1116 ext/syck/rubyext.c                 if ( ! NIL_P( target_class ) )
NIL_P            1157 ext/syck/rubyext.c             else if ( !NIL_P( target_class ) )
NIL_P            1164 ext/syck/rubyext.c                 else if ( !NIL_P( obj ) && rb_obj_is_instance_of( val, rb_cHash ) )
NIL_P            1201 ext/syck/rubyext.c     if ( !NIL_P(tmp) )
NIL_P            1221 ext/syck/rubyext.c     if ( !NIL_P(tmp) )
NIL_P            1455 ext/syck/rubyext.c     if ( NIL_P( style ) )
NIL_P            1546 ext/syck/rubyext.c     if ( !NIL_P( val ) ) {
NIL_P            1627 ext/syck/rubyext.c     if ( !NIL_P( val ) )
NIL_P            1632 ext/syck/rubyext.c         if ( NIL_P(hsh) )
NIL_P            1662 ext/syck/rubyext.c     if ( !NIL_P( val ) )
NIL_P            1667 ext/syck/rubyext.c         if ( NIL_P(hsh) )
NIL_P            1765 ext/syck/rubyext.c     if ( !NIL_P( type_id ) ) {
NIL_P            1909 ext/syck/rubyext.c     if ( !NIL_P( bonus->oid ) ) {
NIL_P            1985 ext/syck/rubyext.c     else if ( !NIL_P(tmp = rb_check_string_type(options)) )
NIL_P            2028 ext/syck/rubyext.c     if ( !NIL_P( oid ) && RTEST( rb_funcall( bonus->data, s_haskey, 1, oid ) ) ) {
NIL_P              65 ext/syslog/syslog.c     if (NIL_P(ident)) {
NIL_P              75 ext/syslog/syslog.c     if (NIL_P(opt)) {
NIL_P              81 ext/syslog/syslog.c     if (NIL_P(fac)) {
NIL_P             769 ext/tk/tcltklib.c     if (!NIL_P(exc) && rb_obj_is_kind_of(exc, rb_eException)) {
NIL_P             801 ext/tk/tcltklib.c     if (!NIL_P(exc) && rb_obj_is_kind_of(exc, rb_eException)) {
NIL_P            1156 ext/tk/tcltklib.c     if (NIL_P(eventloop_thread)) {
NIL_P            1192 ext/tk/tcltklib.c     } else if (NIL_P(val)) {
NIL_P            1341 ext/tk/tcltklib.c                     if (NIL_P(ruby_errinfo)) {
NIL_P            1347 ext/tk/tcltklib.c                         if (!NIL_P(rbtk_pending_exception)) {
NIL_P            1360 ext/tk/tcltklib.c                     if (NIL_P(ruby_errinfo)) {
NIL_P            1373 ext/tk/tcltklib.c             if (check_var != (int*)NULL && !NIL_P(rbtk_pending_exception)) {
NIL_P            1451 ext/tk/tcltklib.c                 if (NIL_P(eventloop_thread) || current == eventloop_thread) {
NIL_P            1461 ext/tk/tcltklib.c                             if (NIL_P(ruby_errinfo)) {
NIL_P            1468 ext/tk/tcltklib.c                                 if (!NIL_P(rbtk_pending_exception)) {
NIL_P            1481 ext/tk/tcltklib.c                             if (NIL_P(ruby_errinfo)) {
NIL_P            1507 ext/tk/tcltklib.c                         && !NIL_P(rbtk_pending_exception)) {
NIL_P            1533 ext/tk/tcltklib.c                                 if (NIL_P(ruby_errinfo)) {
NIL_P            1540 ext/tk/tcltklib.c                                     if (!NIL_P(rbtk_pending_exception)) {
NIL_P            1553 ext/tk/tcltklib.c                                 if (NIL_P(ruby_errinfo)) {
NIL_P            1569 ext/tk/tcltklib.c                 if (!NIL_P(watchdog_thread) && eventloop_thread != current) {
NIL_P            1661 ext/tk/tcltklib.c         if (NIL_P(ruby_errinfo)) {
NIL_P            1670 ext/tk/tcltklib.c         if (NIL_P(ruby_errinfo)) {
NIL_P            1709 ext/tk/tcltklib.c         if (NIL_P(eventloop_thread)) {
NIL_P            1751 ext/tk/tcltklib.c     if (!NIL_P(parent_evloop) && parent_evloop != eventloop_thread) {
NIL_P            1849 ext/tk/tcltklib.c     if (!NIL_P(watchdog_thread)) {
NIL_P            1860 ext/tk/tcltklib.c         if (NIL_P(eventloop_thread)
NIL_P            2023 ext/tk/tcltklib.c     if (NIL_P(rbtk_pending_exception)) {
NIL_P            2051 ext/tk/tcltklib.c     if (!NIL_P(eventloop_thread)) {
NIL_P            2138 ext/tk/tcltklib.c     if (NIL_P(enc)) {
NIL_P            2141 ext/tk/tcltklib.c     if (NIL_P(enc)) {
NIL_P            2236 ext/tk/tcltklib.c             if (NIL_P(ruby_errinfo)) {
NIL_P            2245 ext/tk/tcltklib.c             if (NIL_P(ruby_errinfo)) {
NIL_P            2254 ext/tk/tcltklib.c             if (NIL_P(ruby_errinfo)) {
NIL_P            2262 ext/tk/tcltklib.c             if (NIL_P(ruby_errinfo)) {
NIL_P            2270 ext/tk/tcltklib.c             if (NIL_P(ruby_errinfo)) {
NIL_P            2296 ext/tk/tcltklib.c     if (!NIL_P(exc)) {
NIL_P            2306 ext/tk/tcltklib.c         if (!NIL_P(backtrace = rb_funcall(exc, ID_backtrace, 0, 0))) {
NIL_P            2353 ext/tk/tcltklib.c     if (!NIL_P(ret)) {
NIL_P            2365 ext/tk/tcltklib.c     DUMP2("(result) %s", NIL_P(ret) ? "nil" : RSTRING(ret)->ptr);
NIL_P            2564 ext/tk/tcltklib.c     if (NIL_P(receiver)) {
NIL_P            2844 ext/tk/tcltklib.c     if (!NIL_P(rbtk_pending_exception)) {
NIL_P            2941 ext/tk/tcltklib.c         || NIL_P(eventloop_thread) || eventloop_thread == current_thread) {
NIL_P            3187 ext/tk/tcltklib.c     if (!NIL_P(rbtk_pending_exception)) {
NIL_P            3478 ext/tk/tcltklib.c         if (!NIL_P(rbtk_pending_exception)) {
NIL_P            3534 ext/tk/tcltklib.c         if (!NIL_P(rbtk_pending_exception)) {
NIL_P            3631 ext/tk/tcltklib.c         if (!NIL_P(rbtk_pending_exception)) {
NIL_P            4741 ext/tk/tcltklib.c         if (NIL_P(opts) || opts == Qfalse) {
NIL_P            4750 ext/tk/tcltklib.c         if (!NIL_P(argv0)) {
NIL_P            4884 ext/tk/tcltklib.c     } else if (safemode == Qfalse || NIL_P(safemode)) {
NIL_P            4900 ext/tk/tcltklib.c             if (!NIL_P(exc)) {
NIL_P            4977 ext/tk/tcltklib.c         && (safemode == Qfalse || NIL_P(safemode))) {
NIL_P            5344 ext/tk/tcltklib.c     if (!NIL_P(enc)) {
NIL_P            5474 ext/tk/tcltklib.c     if (!NIL_P(ip_obj) && deleted_ip(get_ip(ip_obj))) {
NIL_P            5478 ext/tk/tcltklib.c     if (NIL_P(eventloop_thread) || current == eventloop_thread) {
NIL_P            5479 ext/tk/tcltklib.c         if (NIL_P(eventloop_thread)) {
NIL_P            5620 ext/tk/tcltklib.c               if (NIL_P(ruby_errinfo)) {
NIL_P            5629 ext/tk/tcltklib.c               if (NIL_P(ruby_errinfo)) {
NIL_P            5795 ext/tk/tcltklib.c     if (NIL_P(eventloop_thread) || current == eventloop_thread) {
NIL_P            5796 ext/tk/tcltklib.c         if (NIL_P(eventloop_thread)) {
NIL_P            5918 ext/tk/tcltklib.c     if (!NIL_P(exc)) {
NIL_P            5994 ext/tk/tcltklib.c     if (NIL_P(src)) {
NIL_P            5999 ext/tk/tcltklib.c     if (NIL_P(ip_obj)) {
NIL_P            6015 ext/tk/tcltklib.c     if (NIL_P(encodename)) {
NIL_P            6019 ext/tk/tcltklib.c             if (NIL_P(enc)) {
NIL_P            6020 ext/tk/tcltklib.c                 if (NIL_P(ip_obj)) {
NIL_P            6024 ext/tk/tcltklib.c                     if (NIL_P(enc)) {
NIL_P            6141 ext/tk/tcltklib.c     if (NIL_P(src)) {
NIL_P            6146 ext/tk/tcltklib.c     if (NIL_P(ip_obj)) {
NIL_P            6157 ext/tk/tcltklib.c     if (NIL_P(encodename)) {
NIL_P            6162 ext/tk/tcltklib.c             if (!NIL_P(enc)) {
NIL_P            6171 ext/tk/tcltklib.c         if (NIL_P(ip_obj)) {
NIL_P            6175 ext/tk/tcltklib.c             if (NIL_P(enc)) {
NIL_P            6367 ext/tk/tcltklib.c     if (NIL_P(enc_name)) {
NIL_P            6581 ext/tk/tcltklib.c         if (NIL_P(ruby_errinfo)) {
NIL_P            6590 ext/tk/tcltklib.c         if (NIL_P(ruby_errinfo)) {
NIL_P            6875 ext/tk/tcltklib.c     if (NIL_P(eventloop_thread) || current == eventloop_thread) {
NIL_P            6876 ext/tk/tcltklib.c         if (NIL_P(eventloop_thread)) {
NIL_P            7027 ext/tk/tcltklib.c                                 NIL_P(index) ? NULL : RSTRING(index)->ptr,
NIL_P            7062 ext/tk/tcltklib.c                               NIL_P(index) ? NULL : RSTRING(index)->ptr,
NIL_P            7096 ext/tk/tcltklib.c     if (!NIL_P(index)) StringValue(index);
NIL_P            7104 ext/tk/tcltklib.c     if (NIL_P(retval)) {
NIL_P            7161 ext/tk/tcltklib.c                                 NIL_P(index) ? NULL : RSTRING(index)->ptr,
NIL_P            7199 ext/tk/tcltklib.c                               NIL_P(index) ? NULL : RSTRING(index)->ptr,
NIL_P            7230 ext/tk/tcltklib.c     if (!NIL_P(index)) StringValue(index);
NIL_P            7240 ext/tk/tcltklib.c     if (NIL_P(retval)) {
NIL_P            7281 ext/tk/tcltklib.c                                       NIL_P(index) ? NULL : RSTRING(index)->ptr,
NIL_P            7304 ext/tk/tcltklib.c     if (!NIL_P(index)) StringValue(index);
NIL_P            7312 ext/tk/tcltklib.c     if (NIL_P(retval)) {
NIL_P            7403 ext/tk/tcltklib.c     if (NIL_P(ip_obj)) {
NIL_P             221 ext/tk/tkutil/tkutil.c     if NIL_P(keys) return new_keys;
NIL_P             247 ext/tk/tkutil/tkutil.c     if (NIL_P(sys_enc)) {
NIL_P             252 ext/tk/tkutil/tkutil.c     if NIL_P(enc_flag) {
NIL_P             285 ext/tk/tkutil/tkutil.c                 if (!NIL_P(str_enc)) {
NIL_P             332 ext/tk/tkutil/tkutil.c                     if (!NIL_P(str_enc)) {
NIL_P             352 ext/tk/tkutil/tkutil.c                     if (!NIL_P(str_enc)) {
NIL_P             366 ext/tk/tkutil/tkutil.c     if (RTEST(dst_enc) && !NIL_P(sys_enc)) {
NIL_P             401 ext/tk/tkutil/tkutil.c     if NIL_P(sys_enc) {
NIL_P             406 ext/tk/tkutil/tkutil.c     if NIL_P(enc_flag) {
NIL_P             442 ext/tk/tkutil/tkutil.c         if (!NIL_P(str_val)) {
NIL_P             447 ext/tk/tkutil/tkutil.c                 if (!NIL_P(str_enc)) {
NIL_P             460 ext/tk/tkutil/tkutil.c     if (RTEST(dst_enc) && !NIL_P(sys_enc)) {
NIL_P             534 ext/tk/tkutil/tkutil.c     if (NIL_P(ary)) {
NIL_P             587 ext/tk/tkutil/tkutil.c     if (NIL_P(ary)) {
NIL_P             635 ext/tk/tkutil/tkutil.c     if (NIL_P(ary)) {
NIL_P             686 ext/tk/tkutil/tkutil.c     if (NIL_P(ary)) {
NIL_P             750 ext/tk/tkutil/tkutil.c         if (NIL_P(ary)) {
NIL_P             758 ext/tk/tkutil/tkutil.c             if (NIL_P(ary)) {
NIL_P            1256 ext/tk/tkutil/tkutil.c         if (!NIL_P(ret = rb_hash_aref(inf->aliases, arg_sym))) {
NIL_P            1462 ext/tk/tkutil/tkutil.c         if (NIL_P(proc)) {
NIL_P            2067 ext/win32ole/win32ole.c     if (!NIL_P(host)) {
NIL_P            6254 ext/win32ole/win32ole.c         if(NIL_P(event_name) && NIL_P(ev)) {
NIL_P            6284 ext/win32ole/win32ole.c         if(NIL_P(event_name)) {
NIL_P            6342 ext/win32ole/win32ole.c     if (NIL_P(ary) || TYPE(ary) != T_ARRAY) {
NIL_P            6352 ext/win32ole/win32ole.c     if (NIL_P(event)) {
NIL_P            6778 ext/win32ole/win32ole.c     if (NIL_P(events) || TYPE(events) != T_ARRAY) {
NIL_P            6798 ext/win32ole/win32ole.c     if(!NIL_P(event)) {
NIL_P             272 ext/zlib/zlib.c     if (!NIL_P(vsum)) {
NIL_P             275 ext/zlib/zlib.c     else if (NIL_P(str)) {
NIL_P             282 ext/zlib/zlib.c     if (NIL_P(str)) {
NIL_P             437 ext/zlib/zlib.c     if (NIL_P(z->buf)) {
NIL_P             469 ext/zlib/zlib.c     if (NIL_P(z->buf)) {
NIL_P             491 ext/zlib/zlib.c     if (NIL_P(z->buf)) {
NIL_P             527 ext/zlib/zlib.c     if (NIL_P(z->buf)) {
NIL_P             573 ext/zlib/zlib.c     if (NIL_P(z->buf) || RSTRING(z->buf)->len - z->buf_filled == 0) {
NIL_P             594 ext/zlib/zlib.c     if (NIL_P(z->input)) {
NIL_P             612 ext/zlib/zlib.c     if (NIL_P(z->input) || RSTRING(z->input)->len <= len) {
NIL_P             633 ext/zlib/zlib.c     if (!NIL_P(z->input)) {
NIL_P             645 ext/zlib/zlib.c     if (NIL_P(z->input)) {
NIL_P             714 ext/zlib/zlib.c     if (NIL_P(z->input) && len == 0) {
NIL_P             778 ext/zlib/zlib.c     if (!NIL_P(z->input)) {
NIL_P            1035 ext/zlib/zlib.c     return INT2FIX(NIL_P(z->input) ? 0 : (int)(RSTRING(z->input)->len));
NIL_P            1113 ext/zlib/zlib.c     (NIL_P((val)) ? (ifnil) \
NIL_P            1249 ext/zlib/zlib.c     if (NIL_P(src)) {
NIL_P            1508 ext/zlib/zlib.c     if (NIL_P(src)) {
NIL_P            1542 ext/zlib/zlib.c 	if (NIL_P(src)) {
NIL_P            1579 ext/zlib/zlib.c 	if (!NIL_P(src)) {
NIL_P            1850 ext/zlib/zlib.c         if (!NIL_P(str)) {
NIL_P            1873 ext/zlib/zlib.c     while (NIL_P(gz->z.input) || RSTRING(gz->z.input)->len < size) {
NIL_P            1875 ext/zlib/zlib.c 	if (NIL_P(str)) return Qfalse;
NIL_P            1894 ext/zlib/zlib.c 	if (NIL_P(str)) {
NIL_P            1943 ext/zlib/zlib.c     if (!NIL_P(gz->orig_name)) {
NIL_P            1946 ext/zlib/zlib.c     if (!NIL_P(gz->comment)) {
NIL_P            1969 ext/zlib/zlib.c     if (!NIL_P(gz->orig_name)) {
NIL_P            1973 ext/zlib/zlib.c     if (!NIL_P(gz->comment)) {
NIL_P            2121 ext/zlib/zlib.c 	if (NIL_P(str)) {
NIL_P            2190 ext/zlib/zlib.c     if (!NIL_P(outbuf))
NIL_P            2194 ext/zlib/zlib.c         if (NIL_P(outbuf))
NIL_P            2208 ext/zlib/zlib.c         if (!NIL_P(outbuf))
NIL_P            2216 ext/zlib/zlib.c     if (NIL_P(outbuf)) {
NIL_P            2285 ext/zlib/zlib.c 	if (NIL_P(gz->io)) return;
NIL_P            2326 ext/zlib/zlib.c     if (!NIL_P(gz->z.input)) {
NIL_P            2345 ext/zlib/zlib.c     if (NIL_P(gz->z.input)) return Qnil;
NIL_P            2493 ext/zlib/zlib.c     if (!NIL_P(str)) {
NIL_P            2509 ext/zlib/zlib.c     if (!NIL_P(str)) {
NIL_P            2650 ext/zlib/zlib.c     return NIL_P(gz->io) ? Qtrue : Qfalse;
NIL_P            3040 ext/zlib/zlib.c     if (NIL_P(vlen)) {
NIL_P            3077 ext/zlib/zlib.c     if (!NIL_P(outbuf))
NIL_P            3093 ext/zlib/zlib.c     if (!NIL_P(dst)) {
NIL_P            3108 ext/zlib/zlib.c     if (NIL_P(dst)) {
NIL_P            3122 ext/zlib/zlib.c     while (!NIL_P(c = rb_gzreader_getc(obj))) {
NIL_P            3200 ext/zlib/zlib.c 	if (!NIL_P(rs)) {
NIL_P            3205 ext/zlib/zlib.c     if (NIL_P(rs)) {
NIL_P            3273 ext/zlib/zlib.c     if (!NIL_P(dst)) {
NIL_P            3290 ext/zlib/zlib.c     if (NIL_P(dst)) {
NIL_P            3306 ext/zlib/zlib.c     while (!NIL_P(str = gzreader_gets(argc, argv, obj))) {
NIL_P            3323 ext/zlib/zlib.c     while (!NIL_P(str = gzreader_gets(argc, argv, obj))) {
NIL_P             106 file.c             if (!NIL_P(tmp)) goto exit;
NIL_P             629 file.c             if (!NIL_P(tmp)) {
NIL_P             647 file.c             if (!NIL_P(tmp)) {
NIL_P            1829 file.c             if (NIL_P(o)) {
NIL_P            1835 file.c             if (NIL_P(g)) {
NIL_P            1868 file.c             o = NIL_P(owner) ? -1 : NUM2INT(owner);
NIL_P            1869 file.c             g = NIL_P(group) ? -1 : NUM2INT(group);
NIL_P            1913 file.c             if (NIL_P(o)) {
NIL_P            1919 file.c             if (NIL_P(g)) {
NIL_P            2469 file.c         	    if (!NIL_P(dname)) {
NIL_P            2492 file.c         	if (!NIL_P(dname)) {
NIL_P            2712 file.c         	if (NIL_P(fext) || !(f = rmext(name, StringValueCStr(fext)))) {
NIL_P            2720 file.c         	if (NIL_P(fext) || !(f = rmext(p, StringValueCStr(fext)))) {
NIL_P            2878 file.c             if (!NIL_P(sep) && TYPE(sep) == T_STRING) {
NIL_P            2901 file.c         	if (i > 0 && !NIL_P(sep)) {
NIL_P            1567 hash.c             if (NIL_P(val) && rb_block_given_p()) rb_yield(name);
NIL_P            1919 hash.c         	if (!NIL_P(val)) {
NIL_P            1988 hash.c         	if (!NIL_P(val)) {
NIL_P             653 io.c               if (NIL_P(tmp)) {
NIL_P            1218 io.c               if (NIL_P(str)) {
NIL_P            1254 io.c               if (NIL_P(str)) {
NIL_P            1355 io.c               if (NIL_P(ret))
NIL_P            1392 io.c               if (NIL_P(length)) {
NIL_P            1393 io.c           	if (!NIL_P(str)) StringValue(str);
NIL_P            1403 io.c               if (NIL_P(str)) {
NIL_P            1448 io.c           	    if (!NIL_P(str)) {
NIL_P            1464 io.c           	    if (!NIL_P(str)) {
NIL_P            1483 io.c           	if (!NIL_P(str)) {
NIL_P            1531 io.c               if (!NIL_P(str)) {
NIL_P            1556 io.c               if (NIL_P(rs)) {
NIL_P            1600 io.c               if (!NIL_P(str)) {
NIL_P            1646 io.c           	if (!NIL_P(rs)) StringValue(rs);
NIL_P            1745 io.c               if (NIL_P(line)) {
NIL_P            1777 io.c           	if (!NIL_P(rs)) StringValue(rs);
NIL_P            1780 io.c               while (!NIL_P(line = rb_io_getline(rs, io))) {
NIL_P            1818 io.c           	if (!NIL_P(rs)) StringValue(rs);
NIL_P            1820 io.c               while (!NIL_P(str = rb_io_getline(rs, io))) {
NIL_P            1919 io.c               if (NIL_P(c)) {
NIL_P            2324 io.c               if (NIL_P(str)) {
NIL_P            3028 io.c               if (!NIL_P(tmp)) {
NIL_P            3039 io.c               if (NIL_P(port)) {
NIL_P            3066 io.c               if (FIXNUM_P(vmode) || !NIL_P(perm)) {
NIL_P            3074 io.c           	fmode = NIL_P(perm) ? 0666 :  NUM2INT(perm);
NIL_P            3079 io.c           	mode = NIL_P(vmode) ? "r" : StringValuePtr(vmode);
NIL_P            3131 io.c               if (NIL_P(vmode)) flags = O_RDONLY;
NIL_P            3137 io.c               if (NIL_P(perm)) fmode = 0666;
NIL_P            3244 io.c           	    if (!NIL_P(tmp)) {
NIL_P            3381 io.c           	if (!NIL_P(tmp)) {
NIL_P            3394 io.c               if (!NIL_P(nmode)) {
NIL_P            3549 io.c           	if (!NIL_P(rb_output_fs) && i>0) {
NIL_P            3561 io.c               if (!NIL_P(rb_output_rs)) {
NIL_P            3686 io.c           	if (NIL_P(argv[i])) {
NIL_P            3691 io.c           	    if (!NIL_P(line)) {
NIL_P            3922 io.c               if (NIL_P(orig)) {
NIL_P            3995 io.c           	if (!NIL_P(fd)) {
NIL_P            4214 io.c           	    if (!NIL_P(rs)) StringValue(rs);
NIL_P            4218 io.c               if (NIL_P(line) && next_p != -1) {
NIL_P            4223 io.c               if (!NIL_P(line)) {
NIL_P            4287 io.c               if (NIL_P(line) && next_p != -1) {
NIL_P            4293 io.c               if (!NIL_P(line)) {
NIL_P            4317 io.c               if (NIL_P(line)) {
NIL_P            4352 io.c               while (!NIL_P(line = argf_getline(argc, argv))) {
NIL_P            4382 io.c               if (NIL_P(port)) return rb_str_new(0,0);
NIL_P            4407 io.c               if (!NIL_P(read)) {
NIL_P            4427 io.c               if (!NIL_P(write)) {
NIL_P            4439 io.c               if (!NIL_P(except)) {
NIL_P            4549 io.c               if (NIL_P(timeout)) {
NIL_P            4607 io.c               if (NIL_P(arg) || arg == Qfalse) {
NIL_P            4619 io.c           	if (NIL_P(tmp)) {
NIL_P            4763 io.c           	if (!NIL_P(v)) {
NIL_P            4903 io.c           	if (!NIL_P(r)) rb_io_close(r);
NIL_P            4926 io.c               while (!NIL_P(str = rb_io_getline(arg->sep, arg->io))) {
NIL_P            4961 io.c               else if (!NIL_P(arg.sep)) {
NIL_P            4965 io.c               if (NIL_P(arg.io)) return Qnil;
NIL_P            4999 io.c               if (NIL_P(arg.io)) return Qnil;
NIL_P            5032 io.c               if (NIL_P(arg.io)) return Qnil;
NIL_P            5033 io.c               if (!NIL_P(offset)) {
NIL_P            5117 io.c               if (!NIL_P(length)) {
NIL_P            5120 io.c               if (!NIL_P(str)) {
NIL_P            5136 io.c               if (NIL_P(str)) str = tmp;
NIL_P            5137 io.c               else if (!NIL_P(tmp)) rb_str_append(str, tmp);
NIL_P            5138 io.c               if (NIL_P(tmp) || NIL_P(length)) {
NIL_P            5167 io.c               if (!NIL_P(str)) {
NIL_P            5184 io.c               if (NIL_P(tmp)) {
NIL_P            5192 io.c                   if (NIL_P(str))
NIL_P            5212 io.c               if (NIL_P(byte) && next_p != -1) {
NIL_P            5228 io.c               if (NIL_P(c)) {
NIL_P            5248 io.c               while (!NIL_P(str = argf_getline(argc, argv))) {
NIL_P            5260 io.c               while (!NIL_P(byte = argf_getc())) {
NIL_P             568 marshal.c      	    if (NIL_P(RHASH(obj)->ifnone)) {
NIL_P             580 marshal.c      	    if (!NIL_P(RHASH(obj)->ifnone)) {
NIL_P             691 marshal.c      	if (!NIL_P(a2)) limit = NUM2INT(a2);
NIL_P             692 marshal.c      	if (NIL_P(a1)) goto type_error;
NIL_P             697 marshal.c      	else if (NIL_P(a1)) goto type_error;
NIL_P             701 marshal.c          if (!NIL_P(port)) {
NIL_P             759 marshal.c      	if (NIL_P(v)) rb_eof_error();
NIL_P             835 marshal.c      	if (NIL_P(str)) goto too_short;
NIL_P             943 marshal.c      	if (NIL_P(v)) {
NIL_P             961 marshal.c                  if (NIL_P(extmod)) extmod = rb_ary_new2(0);
NIL_P            1183 marshal.c                  if (! NIL_P(extmod)) {
NIL_P            1353 marshal.c          if (NIL_P(proc)) arg.proc = 0;
NIL_P            1426 marshal.c          if (!NIL_P(port)) argc = 2;
NIL_P             168 numeric.c      	NIL_P(c = rb_funcall(x, rb_frame_this_func(), 1, y))) {
NIL_P            1458 numeric.c          if (NIL_P(val)) {
NIL_P            1604 numeric.c          if (NIL_P(val)) {
NIL_P            2690 numeric.c      	if (NIL_P(c)) rb_cmperr(i, to);
NIL_P            2728 numeric.c      	if (NIL_P(c)) rb_cmperr(i, to);
NIL_P            1316 object.c           if (NIL_P(cmp)) return Qnil;
NIL_P            1522 object.c       	if (!NIL_P(tmp)) {
NIL_P            1924 object.c       		     NIL_P(val) ? "nil" :
NIL_P            1960 object.c           if (NIL_P(v)) return Qnil;
NIL_P            2022 object.c           if (NIL_P(tmp)) {
NIL_P            2254 object.c           if (NIL_P(tmp)) {
NIL_P             508 pack.c         	    if (NIL_P(from)) {
NIL_P             915 pack.c         	    if (!NIL_P(from)) {
NIL_P             928 pack.c         		if (NIL_P(from)) {
NIL_P            4566 parse.y        	    if (NIL_P(ruby_debug_lines)) {
NIL_P            4631 parse.y            if (ruby_debug_lines && !NIL_P(line)) {
NIL_P            4713 parse.y        	    if (NIL_P(v)) {
NIL_P            4719 parse.y        		if (NIL_P(parser->delayed)) {
NIL_P            5284 parse.y            if (!NIL_P(parser->delayed))
NIL_P            6865 parse.y            if (!NIL_P(parser->delayed)) {
NIL_P            9117 parse.y            if (NIL_P(fname)) {
NIL_P            9125 parse.y            parser->parser_ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1;
NIL_P            9199 parse.y            if (!NIL_P(parser->parsing_thread)) {
NIL_P            9228 parse.y            if (NIL_P(parser->parsing_thread)) return Qnil;
NIL_P            9249 parse.y            if (NIL_P(parser->parsing_thread)) return Qnil;
NIL_P             721 process.c      	if (argc == 2 && !NIL_P(vflags)) {
NIL_P             755 process.c          if (NIL_P(pid)) return Qnil;
NIL_P            1176 process.c          if (!NIL_P(tmp)) {
NIL_P            2648 process.c      	    if (NIL_P(tmp)) {
NIL_P              46 range.c        	if (NIL_P(v)) range_failed();
NIL_P             137 range.c            if (NIL_P(r)) return Qfalse;
NIL_P             148 range.c            if (NIL_P(r)) return Qfalse;
NIL_P             311 range.c        	if (!NIL_P(tmp)) {
NIL_P             516 range.c        	if (NIL_P(b)) return Qfalse;
NIL_P             518 range.c        	if (NIL_P(e)) return Qfalse;
NIL_P             628 range.c        	!NIL_P(rb_check_to_integer(beg, "to_int")) ||
NIL_P             629 range.c        	!NIL_P(rb_check_to_integer(end, "to_int"))) {
NIL_P             933 re.c               if (NIL_P(match) || FL_TEST(match, MATCH_BUSY)) {
NIL_P             955 re.c               if (NIL_P(match)) return Qnil;
NIL_P             973 re.c               if (NIL_P(match)) return Qnil;
NIL_P            1013 re.c               if (NIL_P(match)) return Qnil;
NIL_P            1038 re.c               if (NIL_P(match)) return Qnil;
NIL_P            1052 re.c               if (NIL_P(match)) return Qnil;
NIL_P            1186 re.c               if (!NIL_P(rest) || !FIXNUM_P(idx) || FIX2INT(idx) < 0) {
NIL_P            1270 re.c               if (NIL_P(str)) str = rb_str_new(0,0);
NIL_P            1467 re.c               if (NIL_P(str)) {
NIL_P            1528 re.c           	if (NIL_P(str)) {
NIL_P            1601 re.c               if (NIL_P(result)) {
NIL_P            1684 re.c           	if (argc == 3 && !NIL_P(argv[2])) {
NIL_P            1817 re.c               if (!NIL_P(kcode)) {
NIL_P            1901 re.c                   if (!NIL_P(v))
NIL_P            1919 re.c                       if (!NIL_P(v)) {
NIL_P            2145 re.c               if (NIL_P(match)) return Qnil;
NIL_P            2153 re.c               if (!NIL_P(val)) {
NIL_P             884 ruby.c         	    while (!NIL_P(line = rb_io_gets(f))) {
NIL_P             902 ruby.c         		if (NIL_P(line)) return;
NIL_P             952 ruby.c         	    else if (!NIL_P(c)) {
NIL_P             957 ruby.c         	else if (!NIL_P(c)) {
NIL_P             961 ruby.c         	if (NIL_P(c)) return;
NIL_P             265 signal.c       	    if (!NIL_P(str)) {
NIL_P             570 signal.c           if (NIL_P(arg->cmd)) {
NIL_P             575 signal.c       	if (!NIL_P(command)) {
NIL_P             520 string.c           if (!NIL_P(str) && !RSTRING(str)->ptr) {
NIL_P             923 string.c       	    if (NIL_P(tmp)) return Qnil;
NIL_P            1048 string.c       	  if (NIL_P(tmp)) {
NIL_P            1770 string.c           if (!NIL_P(result)) {
NIL_P            1790 string.c       	if (NIL_P(val)) {
NIL_P            3229 string.c           if (NIL_P(spat)) {
NIL_P            3230 string.c       	if (!NIL_P(rb_fs)) {
NIL_P            3267 string.c       		    if (!NIL_P(limit) && lim <= i) break;
NIL_P            3275 string.c       		    if (!NIL_P(limit)) ++i;
NIL_P            3320 string.c       	    if (!NIL_P(limit) && lim <= ++i) break;
NIL_P            3323 string.c           if (RSTRING(str)->len > 0 && (!NIL_P(limit) || RSTRING(str)->len > beg || lim < 0)) {
NIL_P            3330 string.c           if (NIL_P(limit) && lim == 0) {
NIL_P            3398 string.c           if (NIL_P(rs)) {
NIL_P            3559 string.c           if (NIL_P(rs)) return Qnil;
NIL_P            3748 string.c           if (NIL_P(l) && NIL_P(r)) return Qnil;
NIL_P            3849 string.c       	while (!NIL_P(result = scan_once(str, pat, &start))) {
NIL_P            3857 string.c           while (!NIL_P(result = scan_once(str, pat, &start))) {
NIL_P            4163 string.c           if (!NIL_P(val) && TYPE(val) != T_STRING) {
NIL_P              39 struct.c           if (NIL_P(members)) {
NIL_P             176 struct.c           if (NIL_P(name)) {
NIL_P             285 struct.c           if (!NIL_P(name)) {
NIL_P             288 struct.c       	if (NIL_P(tmp)) {
NIL_P             320 time.c             if (NIL_P(v[1])) {
NIL_P             325 time.c         	if (!NIL_P(s)) {
NIL_P             346 time.c             if (NIL_P(v[2])) {
NIL_P             352 time.c             tm->tm_hour = NIL_P(v[3])?0:obj2long(v[3]);
NIL_P             353 time.c             tm->tm_min  = NIL_P(v[4])?0:obj2long(v[4]);
NIL_P             354 time.c             tm->tm_sec  = NIL_P(v[5])?0:obj2long(v[5]);
NIL_P             355 time.c             if (!NIL_P(v[6])) {
NIL_P             174 variable.c         if (!NIL_P(path)) return rb_str_dup(path);
NIL_P             183 variable.c         if (!NIL_P(path)) return path;
NIL_P             527 variable.c         if (NIL_P(cmd)) {
NIL_P             591 variable.c         if (NIL_P(cmd)) {
NIL_P             717 variable.c         if (!NIL_P(rb_backref_get())) {
NIL_P            1448 variable.c     	    if (value == Qundef && NIL_P(autoload_file(klass, id)))


NIOV

NIOV              502 missing/vsnprintf.c 	struct __siov iov[NIOV];/* ... and individual io vectors */
NIOV              525 missing/vsnprintf.c 	if (++uio.uio_iovcnt >= NIOV) { \


NI_DGRAM

NI_DGRAM          191 ext/socket/getnameinfo.c 		sp = getservbyport(port, (flags & NI_DGRAM) ? "udp" : "tcp");
NI_DGRAM         2987 ext/socket/socket.c 	hints.ai_socktype = (fl & NI_DGRAM) ? SOCK_DGRAM : SOCK_STREAM;


NI_MAXHOST

NI_MAXHOST        118 ext/socket/addrinfo.h #ifndef NI_MAXHOST
NI_MAXHOST        785 ext/socket/socket.c #ifndef NI_MAXHOST
NI_MAXHOST        801 ext/socket/socket.c     char hbuf[NI_MAXHOST], pbuf[NI_MAXSERV];
NI_MAXHOST       1309 ext/socket/socket.c     char hbuf[NI_MAXHOST];


NI_MAXSERV

NI_MAXSERV        788 ext/socket/socket.c #ifndef NI_MAXSERV
NI_MAXSERV        801 ext/socket/socket.c     char hbuf[NI_MAXHOST], pbuf[NI_MAXSERV];


NI_NUMERICHOST

NI_NUMERICHOST    207 ext/socket/getnameinfo.c 			flags |= NI_NUMERICHOST;
NI_NUMERICHOST    210 ext/socket/getnameinfo.c 			flags |= NI_NUMERICHOST;
NI_NUMERICHOST    220 ext/socket/getnameinfo.c 			flags |= NI_NUMERICHOST;
NI_NUMERICHOST    226 ext/socket/getnameinfo.c 	} else if (flags & NI_NUMERICHOST) {
NI_NUMERICHOST    676 ext/socket/socket.c     error = getnameinfo(addr, SA_LEN(addr), buf, len, NULL, 0, NI_NUMERICHOST);
NI_NUMERICHOST    888 ext/socket/socket.c 			pbuf, sizeof(pbuf), NI_NUMERICHOST | NI_NUMERICSERV);


NI_NUMERICSERV

NI_NUMERICSERV    184 ext/socket/getnameinfo.c 	} else if (flags & NI_NUMERICSERV) {
NI_NUMERICSERV    888 ext/socket/socket.c 			pbuf, sizeof(pbuf), NI_NUMERICHOST | NI_NUMERICSERV);


NKF_RELEASE_DATE

NKF_RELEASE_DATE 4949 ext/nkf/nkf-utf8/nkf.c                   ,NKF_VERSION,NKF_RELEASE_DATE);
NKF_RELEASE_DATE   11 ext/nkf/nkf.c  #define RUBY_NKF_VERSION NKF_VERSION " (" NKF_RELEASE_DATE ")"
NKF_RELEASE_DATE  290 ext/nkf/nkf.c    rb_define_const(mKconv, "NKF_RELEASE_DATE", rb_str_new2(NKF_RELEASE_DATE));


NKF_VERSION

NKF_VERSION      4949 ext/nkf/nkf-utf8/nkf.c                   ,NKF_VERSION,NKF_RELEASE_DATE);
NKF_VERSION        11 ext/nkf/nkf.c  #define RUBY_NKF_VERSION NKF_VERSION " (" NKF_RELEASE_DATE ")"
NKF_VERSION       289 ext/nkf/nkf.c    rb_define_const(mKconv, "NKF_VERSION", rb_str_new2(NKF_VERSION));


NL

NL               1343 ext/nkf/nkf-utf8/nkf.c             crmode_f = NL;
NL               1350 ext/nkf/nkf-utf8/nkf.c                 crmode_f = NL; cp++;
NL               2206 ext/nkf/nkf-utf8/nkf.c             } else if ((c1 == NL || c1 == CR) && broken_f&4) {
NL               2209 ext/nkf/nkf-utf8/nkf.c 	    } else if (c1 == NL && mime_decode_f && !mime_decode_mode ) {
NL               2216 ext/nkf/nkf-utf8/nkf.c 		c1 = NL;
NL               2223 ext/nkf/nkf-utf8/nkf.c 		    } else if (c1 == NL && (c1=(*i_getc)(f))!=EOF && c1 == SPACE) {
NL               2229 ext/nkf/nkf-utf8/nkf.c 		    i_ungetc(NL,f);
NL               3179 ext/nkf/nkf-utf8/nkf.c 	if (! (c2==0&&c1==NL) ) {
NL               3194 ext/nkf/nkf-utf8/nkf.c 	(*o_crconv)(0,NL);
NL               3195 ext/nkf/nkf-utf8/nkf.c     } else if (c1!='\032' || crmode_f!=NL){
NL               3615 ext/nkf/nkf-utf8/nkf.c #define nkf_isspace(c) (nkf_isblank(c) || c == CR || c == NL)
NL               4063 ext/nkf/nkf-utf8/nkf.c 		case NL:
NL               4065 ext/nkf/nkf-utf8/nkf.c 		    if (c1==NL) {
NL               4072 ext/nkf/nkf-utf8/nkf.c 			c1 = NL;
NL               4074 ext/nkf/nkf-utf8/nkf.c 			if ((c1=(*i_getc)(f))!=EOF && c1 == NL) {
NL               4081 ext/nkf/nkf-utf8/nkf.c 			    i_ungetc(NL,f);
NL               4179 ext/nkf/nkf-utf8/nkf.c 	    case NL:
NL               4181 ext/nkf/nkf-utf8/nkf.c 		if (c1==NL) {
NL               4188 ext/nkf/nkf-utf8/nkf.c 		    c1 = NL;
NL               4200 ext/nkf/nkf-utf8/nkf.c 			i_ungetc(NL,f);
NL               4383 ext/nkf/nkf-utf8/nkf.c 	(*o_mputc)(NL);
NL               4388 ext/nkf/nkf-utf8/nkf.c 	    	|| mimeout_buf[i]==CR || mimeout_buf[i]==NL )) {
NL               4395 ext/nkf/nkf-utf8/nkf.c 		|| mimeout_buf[i]==CR || mimeout_buf[i]==NL ) {
NL               4461 ext/nkf/nkf-utf8/nkf.c 	} else if (c==CR||c==NL) {
NL               4508 ext/nkf/nkf-utf8/nkf.c                 (*o_base64conv)(0,NL);
NL               4537 ext/nkf/nkf-utf8/nkf.c                 if (c!=CR && c!=NL) {
NL               4539 ext/nkf/nkf-utf8/nkf.c                     (*o_mputc)(NL);
NL               4546 ext/nkf/nkf-utf8/nkf.c                 (*o_mputc)(NL);
NL               4601 ext/nkf/nkf-utf8/nkf.c                 if (c==CR || c==NL) {
NL               4606 ext/nkf/nkf-utf8/nkf.c                     if (mimeout_buf[i] == CR || mimeout_buf[i] == NL){
NL               4617 ext/nkf/nkf-utf8/nkf.c                     (*o_mputc)(NL);
NL               4631 ext/nkf/nkf-utf8/nkf.c             if (lastchar==CR || lastchar == NL){
NL               4651 ext/nkf/nkf-utf8/nkf.c             if (lastchar == CR || lastchar == NL){
NL               4666 ext/nkf/nkf-utf8/nkf.c             if (c==SPACE || c==TAB || c==CR || c==NL) {
NL               4705 ext/nkf/nkf-utf8/nkf.c 	    if (mimeout_buf[i]==CR || mimeout_buf[i]==NL)


NL_CHOMP

NL_CHOMP          740 ext/syck/emitter.c         keep_nl = NL_CHOMP;
NL_CHOMP          919 ext/syck/emitter.c     if ( keep_nl == NL_CHOMP ) {
NL_CHOMP          954 ext/syck/emitter.c     if ( keep_nl == NL_CHOMP ) {
NL_CHOMP          181 ext/syck/token.c                 if ( nlDoWhat != NL_CHOMP && fc < n->data.str->ptr + n->data.str->len - 1 ) \
NL_CHOMP         2359 ext/syck/token.c                 nlDoWhat = NL_CHOMP;


NL_KEEP

NL_KEEP           742 ext/syck/emitter.c         keep_nl = NL_KEEP;
NL_KEEP           921 ext/syck/emitter.c     } else if ( keep_nl == NL_KEEP ) {
NL_KEEP           931 ext/syck/emitter.c                 if ( keep_nl != NL_KEEP ) syck_emitter_write( e, "\n", 1 );
NL_KEEP           956 ext/syck/emitter.c     } else if ( keep_nl == NL_KEEP ) {
NL_KEEP           970 ext/syck/emitter.c                     if ( keep_nl != NL_KEEP ) syck_emitter_write( e, "\n", 1 );
NL_KEEP           177 ext/syck/token.c             if ( nlDoWhat != NL_KEEP ) \
NL_KEEP          2363 ext/syck/token.c                 nlDoWhat = NL_KEEP;


NO

NO               1115 dir.c          enum answer { YES, NO, UNKNOWN };
NO               1192 dir.c          		isdir = S_ISDIR(st.st_mode) ? YES : S_ISLNK(st.st_mode) ? UNKNOWN : NO;
NO               1195 dir.c          		exist = NO;
NO               1196 dir.c          		isdir = NO;
NO               1202 dir.c          		isdir = S_ISDIR(st.st_mode) ? YES : NO;
NO               1205 dir.c          		exist = NO;
NO               1206 dir.c          		isdir = NO;
NO               1221 dir.c              if (exist == NO || isdir == NO) return 0;
NO               1236 dir.c          		    new_isdir = S_ISDIR(st.st_mode) ? YES : S_ISLNK(st.st_mode) ? UNKNOWN : NO;
NO               1238 dir.c          		    new_isdir = NO;
NO               1240 dir.c          		new_isdir = dp->d_isdir ? (!dp->d_isrep ? YES : UNKNOWN) : NO;
NO                 92 ext/socket/getaddrinfo.c static int translate = NO;
NO                231 ext/socket/getaddrinfo.c 			return NO;


NODE

NODE               60 class.c        clone_method(ID mid, NODE *body, st_table *tbl)
NODE              540 class.c        method_entry(ID key, NODE *body, st_table *list)
NODE              424 enum.c             NODE *memo;
NODE              438 enum.c             VALUE a = (*(NODE *const *)ap)->u1.value;
NODE              439 enum.c             VALUE b = (*(NODE *const *)bp)->u1.value;
NODE              212 eval.c         static VALUE block_pass(VALUE,NODE*);
NODE              229 eval.c         NODE* ruby_current_node;
NODE              308 eval.c             NODE *method;
NODE              382 eval.c         rb_add_method(VALUE klass, ID mid, NODE *node, int noex)
NODE              384 eval.c             NODE *body;
NODE              429 eval.c         static NODE*
NODE              432 eval.c             NODE *body;
NODE              444 eval.c         static NODE*
NODE              450 eval.c             NODE * volatile body;
NODE              502 eval.c         NODE*
NODE              519 eval.c             NODE *body;
NODE              588 eval.c             NODE *body;
NODE              958 eval.c         static NODE *ruby_cref = 0;
NODE              959 eval.c         static NODE *top_cref;
NODE             1004 eval.c             NODE *cref;
NODE             1019 eval.c         static VALUE rb_eval(VALUE,NODE*);
NODE             1021 eval.c         static NODE *compile(VALUE, const char*, int);
NODE             1039 eval.c         static VALUE module_setup(VALUE,NODE*);
NODE             1041 eval.c         static VALUE massign(VALUE,NODE*,VALUE,int);
NODE             1042 eval.c         static void assign(VALUE,NODE*,VALUE,int);
NODE             1043 eval.c         static int formal_assign(VALUE, NODE*, int, const VALUE*, VALUE*);
NODE             1065 eval.c         static void call_trace_func(rb_event_t,NODE*,VALUE,ID,VALUE);
NODE             1329 eval.c         eval_node(VALUE self, NODE *node)
NODE             1391 eval.c         	    NODE *tag = prot_tag->frame->node;
NODE             1503 eval.c         extern NODE *ruby_eval_tree;
NODE             1528 eval.c             volatile NODE *tmp;
NODE             1574 eval.c             NODE *oldsrc = ruby_current_node;
NODE             1761 eval.c         ev_const_defined(NODE *cref, ID id, VALUE self)
NODE             1763 eval.c             NODE *cbase = cref;
NODE             1783 eval.c         ev_const_get(NODE *cref, ID id, VALUE self)
NODE             1785 eval.c             NODE *cbase = cref;
NODE             1809 eval.c             NODE *cref = ruby_cref;
NODE             1841 eval.c             NODE *cbase = ruby_cref;
NODE             1871 eval.c             NODE *cbase = ruby_cref;
NODE             1912 eval.c             NODE *body;
NODE             2013 eval.c             NODE *orig, *body, *node;
NODE             2086 eval.c         static NODE*
NODE             2087 eval.c         copy_node_scope(NODE *node, NODE *rval)
NODE             2089 eval.c             NODE *copy = NEW_NODE(NODE_SCOPE,0,rval,node->nd_next);
NODE             2102 eval.c         # define TMP_PROTECT NODE * volatile tmp__protect_tmp=0
NODE             2164 eval.c         static const char* is_defined(VALUE, NODE*, char*, int);
NODE             2167 eval.c         arg_defined(VALUE self, NODE *node, char *buf, char *type)
NODE             2190 eval.c         is_defined(VALUE self, NODE *node /* OK */, char *buf, int noeval)
NODE             2218 eval.c         	if (node->nd_recv == (NODE *)1) goto check_bound;
NODE             2367 eval.c         static int handle_rescue(VALUE,NODE*);
NODE             2509 eval.c         call_trace_func(rb_event_t event, NODE *node, VALUE self, ID id, VALUE klass /* OK */)
NODE             2513 eval.c             NODE *node_save;
NODE             2615 eval.c         svalue_to_mrhs(VALUE v, NODE *lhs)
NODE             2650 eval.c         class_prefix(VALUE self, NODE *cpath)
NODE             2686 eval.c         NORETURN(static void unknown_node(NODE * volatile));
NODE             2689 eval.c         unknown_node(NODE *volatile node)
NODE             2704 eval.c         rb_eval(VALUE self, NODE *n)
NODE             2706 eval.c             NODE * volatile contnode = 0;
NODE             2707 eval.c             NODE * volatile node = n;
NODE             2830 eval.c         	    NODE *tag;
NODE             2869 eval.c         		NODE *tag;
NODE             3109 eval.c         		NODE *resq = node->nd_resq;
NODE             3247 eval.c         	    if (node->nd_recv == (NODE *)1) {
NODE             3348 eval.c         	    NODE *saved_cref = 0;
NODE             3358 eval.c         		ruby_cref = (NODE*)node->nd_rval;
NODE             3387 eval.c         	    NODE *rval;
NODE             3600 eval.c         	    NODE *list;
NODE             3669 eval.c         	    NODE *list = node->nd_next;
NODE             3724 eval.c         	    NODE *body,  *defn;
NODE             3773 eval.c         	    NODE *body = 0, *defn;
NODE             3960 eval.c         module_setup(VALUE module, NODE *n)
NODE             3962 eval.c             NODE * volatile node = n->nd_body;
NODE             4009 eval.c         static NODE *basic_respond_to = 0;
NODE             4651 eval.c             NODE *node, *var;
NODE             4659 eval.c             NODE *cnode = ruby_current_node;
NODE             4698 eval.c         	    NODE *bvar = NULL;
NODE             4700 eval.c         	    if (var == (NODE*)1) { /* no parameter || */
NODE             4706 eval.c         	    else if (var == (NODE*)2) {
NODE             4867 eval.c             ruby_cref = (NODE*)old_cref;
NODE             4966 eval.c         massign(VALUE self, NODE *node, VALUE val, int pcall)
NODE             4968 eval.c             NODE *list;
NODE             5009 eval.c         assign(VALUE self, NODE *lhs, VALUE val, int pcall)
NODE             5068 eval.c         	    if (lhs->nd_recv == (NODE *)1) {
NODE             5107 eval.c             NODE *node = NEW_IFUNC(bl_proc, data2);
NODE             5140 eval.c         handle_rescue(VALUE self, NODE *node)
NODE             5234 eval.c             cont_protect = ((NODE *)cont_protect)->u1.value;
NODE             5350 eval.c             NODE *cnode = ruby_current_node;
NODE             5504 eval.c         formal_assign(VALUE recv, NODE *node, int argc, const VALUE *argv, VALUE *local_vars)
NODE             5518 eval.c         	NODE *optnode = node->nd_opt;
NODE             5545 eval.c         	NODE *opt = node->nd_opt;
NODE             5577 eval.c             int argc /* OK */, const VALUE *argv /* OK */, NODE *volatile body, int flags)
NODE             5579 eval.c             NODE *b2;		/* OK */
NODE             5675 eval.c         	    NODE *saved_cref = 0;
NODE             5680 eval.c         		ruby_cref = (NODE*)body->nd_rval;
NODE             5707 eval.c         		NODE *node = 0;
NODE             5771 eval.c             NODE  *body;		/* OK */
NODE             5960 eval.c             NODE *n;
NODE             6069 eval.c         static NODE*
NODE             6072 eval.c             NODE *node;
NODE             6098 eval.c             NODE *nodesave = ruby_current_node;
NODE             6152 eval.c         	NODE *node;
NODE             6173 eval.c         	ruby_cref  = (NODE*)old_cref;
NODE             6545 eval.c             NODE * volatile last_node;
NODE             6546 eval.c             NODE *saved_cref = ruby_cref;
NODE             6593 eval.c         	NODE * volatile node;
NODE             6905 eval.c         	NODE *node;
NODE             7187 eval.c             NODE *body;
NODE             8328 eval.c             NODE *var, *list;
NODE             8340 eval.c             if (var == (NODE*)1) return 0;
NODE             8341 eval.c             if (var == (NODE*)2) return 0;
NODE             8344 eval.c         	if (var == (NODE*)1) return 0;
NODE             8345 eval.c         	if (var == (NODE*)2) return 0;
NODE             8451 eval.c             NODE *node;
NODE             8609 eval.c             NODE *iter;
NODE             8619 eval.c         block_pass(VALUE self, NODE *node)
NODE             8641 eval.c             NODE *body;
NODE             9031 eval.c         rb_node_arity(NODE *body)
NODE             9113 eval.c             NODE *node = rb_method_node(mod, id);
NODE             9299 eval.c             NODE *node;
NODE             9718 eval.c             NODE *cref;
NODE             9723 eval.c             NODE *node;
NODE             9763 eval.c             NODE *node;
NODE             10079 eval.c         static NODE *th_raise_node;
NODE             11959 eval.c         	NODE *node = th->node;
NODE              169 node.h         #define NODE_LMASK  (((long)1<<(sizeof(NODE*)*CHAR_BIT-NODE_LSHIFT))-1)
NODE              356 node.h         NODE *rb_parser_compile_cstr(VALUE, const char*, const char*, int, int);
NODE              357 node.h         NODE *rb_parser_compile_string(VALUE, const char*, VALUE, int);
NODE              358 node.h         NODE *rb_parser_compile_file(VALUE, const char*, VALUE, int);
NODE              360 node.h         NODE *rb_compile_cstr(const char*, const char*, int, int);
NODE              361 node.h         NODE *rb_compile_string(const char*, VALUE, int);
NODE              362 node.h         NODE *rb_compile_file(const char*, VALUE, int);
NODE              364 node.h         void rb_add_method(VALUE, ID, NODE *, int);
NODE              365 node.h         NODE *rb_node_newnode(enum node_type,VALUE,VALUE,VALUE);
NODE              367 node.h         NODE* rb_method_node(VALUE klass, ID id);
NODE              368 node.h         int rb_node_arity(NODE* node);
NODE              105 parse.y            NODE *node;
NODE              132 parse.y            NODE *heap;
NODE              137 parse.y            NODE *parser_lex_strterm;
NODE              168 parse.y            NODE *parser_eval_tree_begin;
NODE              169 parse.y            NODE *parser_eval_tree;
NODE              242 parse.y        static NODE *cond_gen(struct parser_params*,NODE*);
NODE              244 parse.y        static NODE *logop_gen(struct parser_params*,enum node_type,NODE*,NODE*);
NODE              247 parse.y        static int cond_negative(NODE**);
NODE              249 parse.y        static NODE *newline_node(NODE*);
NODE              250 parse.y        static void fixpos(NODE*,NODE*);
NODE              252 parse.y        static int value_expr_gen(struct parser_params*,NODE*);
NODE              253 parse.y        static void void_expr_gen(struct parser_params*,NODE*);
NODE              254 parse.y        static NODE *remove_begin(NODE*);
NODE              257 parse.y        static void void_stmts_gen(struct parser_params*,NODE*);
NODE              259 parse.y        static void reduce_nodes(NODE**);
NODE              260 parse.y        static void block_dup_check(NODE*);
NODE              262 parse.y        static NODE *block_append(NODE*,NODE*);
NODE              263 parse.y        static NODE *list_append(NODE*,NODE*);
NODE              264 parse.y        static NODE *list_concat(NODE*,NODE*);
NODE              265 parse.y        static NODE *arg_concat(NODE*,NODE*);
NODE              266 parse.y        static NODE *literal_concat(NODE*,NODE*);
NODE              267 parse.y        static NODE *new_evstr(NODE*);
NODE              268 parse.y        static NODE *evstr2dstr(NODE*);
NODE              270 parse.y        static NODE *call_op_gen(struct parser_params*,NODE*,ID,int,NODE*);
NODE              273 parse.y        static NODE *new_args_gen(struct parser_params*,VALUE,NODE*,NODE*,NODE*);
NODE              278 parse.y        static NODE *negate_lit(NODE*);
NODE              279 parse.y        static NODE *ret_args(NODE*);
NODE              280 parse.y        static NODE *arg_blk_pass(NODE*,NODE*);
NODE              281 parse.y        static NODE *new_call(NODE*,ID,NODE*);
NODE              282 parse.y        static NODE *new_fcall_gen(struct parser_params*,ID,NODE*);
NODE              284 parse.y        static NODE *new_super(NODE*);
NODE              285 parse.y        static NODE *new_yield(NODE*);
NODE              287 parse.y        static NODE *gettable_gen(struct parser_params*,ID);
NODE              289 parse.y        static NODE *assignable_gen(struct parser_params*,ID,NODE*);
NODE              291 parse.y        static NODE *new_bv_gen(struct parser_params*,ID,NODE*);
NODE              293 parse.y        static NODE *aryset_gen(struct parser_params*,NODE*,NODE*);
NODE              295 parse.y        static NODE *attrset_gen(struct parser_params*,NODE*,ID);
NODE              298 parse.y        static void rb_backref_error(NODE*);
NODE              299 parse.y        static NODE *node_assign_gen(struct parser_params*,NODE*,NODE*);
NODE              302 parse.y        static NODE *match_op_gen(struct parser_params*,NODE*,NODE*);
NODE              325 parse.y        static NODE *dyna_init_gen(struct parser_params*, NODE*, struct RVarmap *);
NODE              467 parse.y            NODE *node;
NODE              636 parse.y        				NODE *node = $2;
NODE              928 parse.y        			NODE *args;
NODE             1683 parse.y        			NODE *args;
NODE             2642 parse.y        			    NODE *tmp = $$->nd_body;
NODE             2659 parse.y        			    NODE *tmp = $$->nd_body;
NODE             2852 parse.y        			NODE *body = remove_begin($5);
NODE             2881 parse.y        			NODE *body = remove_begin($8);
NODE             3116 parse.y        			$$ = NEW_BLOCK_PARAM($2, (NODE*)1);
NODE             3136 parse.y        			$$ = NEW_ITER((NODE*)1, 0, $2);
NODE             3144 parse.y        			$$ = NEW_ITER((NODE*)1, 0, 0);
NODE             3557 parse.y        			NODE *node = $1;
NODE             3595 parse.y        			NODE *node = $2;
NODE             3623 parse.y        			NODE *node = $2;
NODE             4411 parse.y        static int parser_parse_string(struct parser_params*,NODE*);
NODE             4412 parse.y        static int parser_here_document(struct parser_params*,NODE*);
NODE             4547 parse.y        static NODE*
NODE             4639 parse.y        NODE*
NODE             4647 parse.y        NODE*
NODE             4662 parse.y        NODE*
NODE             4668 parse.y        NODE*
NODE             4680 parse.y        NODE*
NODE             4688 parse.y        NODE*
NODE             5147 parse.y        static NODE *
NODE             5150 parse.y            NODE *node = NEW_STRTERM0(func, term, paren);
NODE             5157 parse.y        parser_parse_string(struct parser_params *parser, NODE *quote)
NODE             5279 parse.y        parser_heredoc_restore(struct parser_params *parser, NODE *here)
NODE             5320 parse.y        parser_here_document(struct parser_params *parser, NODE *here)
NODE             6877 parse.y        NODE*
NODE             6880 parse.y            NODE *n = (NODE*)rb_newobj();
NODE             6895 parse.y        nodetype(NODE *node)			/* for debug */
NODE             6901 parse.y        nodeline(NODE *node)
NODE             6906 parse.y        static NODE*
NODE             6907 parse.y        newline_node(NODE *node)
NODE             6916 parse.y        fixpos(NODE *node, NODE *orig)
NODE             6920 parse.y            if (orig == (NODE*)1) return;
NODE             6926 parse.y        parser_warning(NODE *node, const char *mesg)
NODE             6935 parse.y        parser_warn(NODE *node, const char *mesg)
NODE             6943 parse.y        static NODE*
NODE             6944 parse.y        block_append(NODE *head, NODE *tail)
NODE             6946 parse.y            NODE *end, *h = head, *nd;
NODE             6997 parse.y        static NODE*
NODE             6998 parse.y        list_append(NODE *list, NODE *item)
NODE             7000 parse.y            NODE *last;
NODE             7017 parse.y        static NODE*
NODE             7018 parse.y        list_concat(NODE *head, NODE *tail)
NODE             7020 parse.y            NODE *last;
NODE             7042 parse.y        static NODE *
NODE             7043 parse.y        literal_concat(NODE *head, NODE *tail)
NODE             7052 parse.y        	NODE *node = NEW_DSTR(rb_str_new(0, 0));
NODE             7091 parse.y        static NODE *
NODE             7092 parse.y        evstr2dstr(NODE *node)
NODE             7100 parse.y        static NODE *
NODE             7101 parse.y        new_evstr(NODE *node)
NODE             7103 parse.y            NODE *head = node;
NODE             7114 parse.y        static NODE *
NODE             7115 parse.y        call_op_gen(struct parser_params *parser, NODE *recv, ID id, int narg, NODE *arg1)
NODE             7128 parse.y        static NODE*
NODE             7129 parse.y        match_op_gen(struct parser_params *parser, NODE *node1, NODE *node2)
NODE             7164 parse.y        static NODE*
NODE             7208 parse.y        static NODE*
NODE             7209 parse.y        assignable_gen(struct parser_params *parser, ID id, NODE *val)
NODE             7274 parse.y        static NODE*
NODE             7275 parse.y        new_bv_gen(struct parser_params *parser, ID name, NODE *val)
NODE             7287 parse.y        static NODE *
NODE             7288 parse.y        aryset_gen(struct parser_params *parser, NODE *recv, NODE *idx)
NODE             7291 parse.y        	recv = (NODE *)1;
NODE             7298 parse.y        block_dup_check(NODE *node)
NODE             7313 parse.y        static NODE *
NODE             7314 parse.y        attrset_gen(struct parser_params *parser, NODE *recv, ID id)
NODE             7317 parse.y        	recv = (NODE *)1;
NODE             7324 parse.y        rb_backref_error(NODE *node)
NODE             7336 parse.y        static NODE *
NODE             7337 parse.y        arg_concat(NODE *node1, NODE *node2)
NODE             7343 parse.y        static NODE *
NODE             7344 parse.y        arg_add(NODE *node1, NODE *node2)
NODE             7355 parse.y        static NODE*
NODE             7356 parse.y        node_assign_gen(struct parser_params *parser, NODE *lhs, NODE *rhs)
NODE             7388 parse.y        value_expr_gen(struct parser_params *parser, NODE *node)
NODE             7439 parse.y        void_expr_gen(struct parser_params *parser, NODE *node)
NODE             7529 parse.y        void_stmts_gen(struct parser_params *parser, NODE *node)
NODE             7542 parse.y        static NODE *
NODE             7543 parse.y        remove_begin(NODE *node)
NODE             7545 parse.y            NODE **n = &node;
NODE             7556 parse.y        reduce_nodes(NODE **body)
NODE             7558 parse.y            NODE *node = *body;
NODE             7609 parse.y        assign_in_cond(struct parser_params *parser, NODE *node)
NODE             7656 parse.y        warn_unless_e_option(NODE *node, const char *str)
NODE             7662 parse.y        warning_unless_e_option(NODE *node, const char *str)
NODE             7667 parse.y        static NODE *cond0(struct parser_params*,NODE*);
NODE             7669 parse.y        static NODE*
NODE             7670 parse.y        range_op(struct parser_params *parser, NODE *node)
NODE             7688 parse.y        literal_node(NODE *node)
NODE             7708 parse.y        static NODE*
NODE             7709 parse.y        cond0(struct parser_params *parser, NODE *node)
NODE             7770 parse.y        static NODE*
NODE             7771 parse.y        cond_gen(struct parser_params *parser, NODE *node)
NODE             7778 parse.y        static NODE*
NODE             7779 parse.y        logop_gen(struct parser_params *parser, enum node_type type, NODE *left, NODE *right)
NODE             7783 parse.y        	NODE *node = left, *second;
NODE             7794 parse.y        cond_negative(NODE **nodep)
NODE             7796 parse.y            NODE *c = *nodep;
NODE             7808 parse.y        no_blockarg(NODE *node)
NODE             7815 parse.y        static NODE *
NODE             7816 parse.y        ret_args(NODE *node)
NODE             7835 parse.y        static NODE *
NODE             7836 parse.y        new_yield(NODE *node)
NODE             7856 parse.y        static NODE*
NODE             7857 parse.y        negate_lit(NODE *node)
NODE             7875 parse.y        static NODE *
NODE             7876 parse.y        arg_blk_pass(NODE *node1, NODE *node2)
NODE             7885 parse.y        static NODE*
NODE             7886 parse.y        arg_prepend(NODE *node1, NODE *node2)
NODE             7906 parse.y        arg_dup_check(ID vid, VALUE m, VALUE list, NODE *node)
NODE             7917 parse.y        static NODE*
NODE             7918 parse.y        new_args_gen(struct parser_params *parser, VALUE m, NODE *o, NODE *r, NODE *b)
NODE             7921 parse.y            NODE *tmp;
NODE             7950 parse.y        static NODE*
NODE             7951 parse.y        new_call(NODE *r, ID m, NODE *a)
NODE             7960 parse.y        static NODE*
NODE             7961 parse.y        new_fcall_gen(struct parser_params *parser, ID m, NODE *a)
NODE             7970 parse.y        static NODE*
NODE             7971 parse.y        new_super(NODE *a)
NODE             8184 parse.y        static NODE *
NODE             8185 parse.y        dyna_init_gen(struct parser_params *parser, NODE *node, struct RVarmap *pre)
NODE             8188 parse.y            NODE *var;
NODE             8202 parse.y        NODE*
NODE             8203 parse.y        rb_parser_append_print(NODE *node)
NODE             8205 parse.y            NODE *prelude = 0;
NODE             8221 parse.y        NODE *
NODE             8222 parse.y        rb_parser_while_loop(NODE *node, int chop, int split)
NODE             8224 parse.y            NODE *prelude = 0;
NODE             8780 parse.y            NODE *n = NEWHEAP();
NODE             8790 parse.y            NODE *n = NEWHEAP();
NODE             8799 parse.y            NODE *n;
NODE             8819 parse.y            NODE **prev = &parserp->heap, *n;
NODE              356 ruby.c             extern NODE *ruby_eval_tree;
NODE              357 ruby.c             NODE *save[3];
NODE              468 ruby.c         NODE *ruby_eval_tree;
NODE              476 ruby.c             NODE *volatile script_node = 0;
NODE             1196 ruby.c         NODE *rb_parser_append_print(NODE*);
NODE             1197 ruby.c         NODE *rb_parser_while_loop(NODE*, int, int);
NODE             1195 variable.c     static NODE*
NODE             1217 variable.c         return (NODE *)load;
NODE             1224 variable.c         NODE *load = autoload_delete(klass, id);
NODE             1243 variable.c         file = ((NODE *)load)->nd_lit;


NODE_BACKREFS_SIZE

NODE_BACKREFS_SIZE 1236 regparse.c       if (back_num <= NODE_BACKREFS_SIZE) {
NODE_BACKREFS_SIZE  213 regparse.h       int     back_static[NODE_BACKREFS_SIZE];


NODE_HEREDOC

NODE_HEREDOC     5267 parse.y            lex_strterm = rb_node_newnode(NODE_HEREDOC,
NODE_HEREDOC     5607 parse.y        	if (nd_type(lex_strterm) == NODE_HEREDOC) {


NODE_LMASK

NODE_LMASK        170 node.h         #define nd_line(n) ((unsigned int)(((RNODE(n))->flags>>NODE_LSHIFT)&NODE_LMASK))
NODE_LMASK        172 node.h             RNODE(n)->flags=((RNODE(n)->flags&~(-1<<NODE_LSHIFT))|(((l)&NODE_LMASK)<<NODE_LSHIFT))


NODE_LSHIFT

NODE_LSHIFT       169 node.h         #define NODE_LMASK  (((long)1<<(sizeof(NODE*)*CHAR_BIT-NODE_LSHIFT))-1)
NODE_LSHIFT       170 node.h         #define nd_line(n) ((unsigned int)(((RNODE(n))->flags>>NODE_LSHIFT)&NODE_LMASK))
NODE_LSHIFT       172 node.h             RNODE(n)->flags=((RNODE(n)->flags&~(-1<<NODE_LSHIFT))|(((l)&NODE_LMASK)<<NODE_LSHIFT))


NODE_NEWLINE

NODE_NEWLINE     2720 eval.c             if (node->flags & NODE_NEWLINE) {
NODE_NEWLINE     3805 parse.y        			if ($3) $3->flags &= ~NODE_NEWLINE;
NODE_NEWLINE     6910 parse.y        	node->flags |= NODE_NEWLINE;


NODE_STR_BUF_SIZE

NODE_STR_BUF_SIZE 1342 regparse.c         if (NSTRING(node).capa > 0 || (len + addlen > NODE_STR_BUF_SIZE - 1)) {
NODE_STR_BUF_SIZE  109 regparse.h       UChar  buf[NODE_STR_BUF_SIZE];


NODE_TYPEMASK

NODE_TYPEMASK     164 node.h         #define nd_type(n) ((int) (((RNODE(n))->flags & NODE_TYPEMASK)>>NODE_TYPESHIFT))
NODE_TYPEMASK     166 node.h             RNODE(n)->flags=((RNODE(n)->flags&~NODE_TYPEMASK)|(((t)<<NODE_TYPESHIFT)&NODE_TYPEMASK))


NODE_TYPESHIFT

NODE_TYPESHIFT    162 node.h         #define NODE_TYPEMASK  (0x7f<<NODE_TYPESHIFT)
NODE_TYPESHIFT    164 node.h         #define nd_type(n) ((int) (((RNODE(n))->flags & NODE_TYPEMASK)>>NODE_TYPESHIFT))
NODE_TYPESHIFT    166 node.h             RNODE(n)->flags=((RNODE(n)->flags&~NODE_TYPEMASK)|(((t)<<NODE_TYPESHIFT)&NODE_TYPEMASK))
NODE_TYPESHIFT    168 node.h         #define NODE_LSHIFT (NODE_TYPESHIFT+7)


NOEX_MASK

NOEX_MASK         492 class.c        #define VISI(x) ((x)&NOEX_MASK)
NOEX_MASK        4089 eval.c         #define VISI_CHECK(x,f) (((x)&NOEX_MASK) == (f))


NOEX_NOSUPER

NOEX_NOSUPER     3756 eval.c         		noex |= NOEX_NOSUPER;
NOEX_NOSUPER     5613 eval.c             ruby_frame->this_class = (flags & NOEX_NOSUPER)?0:klass;
NOEX_NOSUPER      350 node.h         #define NOEX_UNDEF     NOEX_NOSUPER


NOEX_PRIVATE

NOEX_PRIVATE      500 class.c              case NOEX_PRIVATE:
NOEX_PRIVATE      506 class.c        	visi = (type != NOEX_PRIVATE);
NOEX_PRIVATE      530 class.c            return ins_methods_push(name, type, ary, NOEX_PRIVATE);
NOEX_PRIVATE      751 class.c            rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PRIVATE);
NOEX_PRIVATE      393 eval.c         	noex = NOEX_PRIVATE | noex;
NOEX_PRIVATE      419 eval.c             rb_add_method(CLASS_OF(klass), ID_ALLOCATOR, NEW_CFUNC(func, 0), NOEX_PRIVATE);
NOEX_PRIVATE      620 eval.c         	if (ex && (ent->noex & NOEX_PRIVATE))
NOEX_PRIVATE      626 eval.c         	if (ex && (noex & NOEX_PRIVATE))
NOEX_PRIVATE      645 eval.c         	    noex = NOEX_PRIVATE;
NOEX_PRIVATE     2234 eval.c         		if ((noex & NOEX_PRIVATE))
NOEX_PRIVATE     3747 eval.c         		noex = NOEX_PRIVATE;
NOEX_PRIVATE     4163 eval.c         	if (VISI_CHECK(noex, NOEX_PRIVATE))
NOEX_PRIVATE     5799 eval.c         	if (noex & NOEX_PRIVATE)
NOEX_PRIVATE     7082 eval.c         	set_method_visibility(module, argc, argv, NOEX_PRIVATE);
NOEX_PRIVATE     7120 eval.c             set_method_visibility(CLASS_OF(obj), argc, argv, NOEX_PRIVATE);
NOEX_PRIVATE     7199 eval.c             set_method_visibility(module, argc, argv, NOEX_PRIVATE);
NOEX_PRIVATE     9348 eval.c         	noex = NOEX_PRIVATE;
NOEX_PRIVATE     2854 parse.y        			$$ = NEW_DEFN($2, $4, body, NOEX_PRIVATE);


NOEX_PROTECTED

NOEX_PROTECTED    501 class.c              case NOEX_PROTECTED:
NOEX_PROTECTED    524 class.c            return ins_methods_push(name, type, ary, NOEX_PROTECTED);
NOEX_PROTECTED    745 class.c            rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PROTECTED);
NOEX_PROTECTED    651 eval.c         	    noex = NOEX_PROTECTED;
NOEX_PROTECTED   2236 eval.c         		if ((noex & NOEX_PROTECTED) &&
NOEX_PROTECTED   3750 eval.c         		noex = NOEX_PROTECTED;
NOEX_PROTECTED   4202 eval.c         	if (VISI_CHECK(noex, NOEX_PROTECTED))
NOEX_PROTECTED   5803 eval.c         	if (noex & NOEX_PROTECTED) {
NOEX_PROTECTED   7050 eval.c         	set_method_visibility(module, argc, argv, NOEX_PROTECTED);
NOEX_PROTECTED   9351 eval.c         	noex = NOEX_PROTECTED;


NOEX_PUBLIC

NOEX_PUBLIC       502 class.c              case NOEX_PUBLIC:
NOEX_PUBLIC       536 class.c            return ins_methods_push(name, type, ary, NOEX_PUBLIC);
NOEX_PUBLIC       733 class.c            rb_add_method(klass, name, NEW_CFUNC(func,argc), NOEX_PUBLIC);
NOEX_PUBLIC       739 class.c            rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PUBLIC);
NOEX_PUBLIC       642 eval.c             if (!ex) noex = NOEX_PUBLIC;
NOEX_PUBLIC       654 eval.c         	    noex = NOEX_PUBLIC;
NOEX_PUBLIC      1945 eval.c             rb_add_method(klass, id, 0, NOEX_PUBLIC);
NOEX_PUBLIC      3753 eval.c         		noex = NOEX_PUBLIC;
NOEX_PUBLIC      3763 eval.c         			      node->nd_mid, defn, NOEX_PUBLIC);
NOEX_PUBLIC      3797 eval.c         			  NOEX_PUBLIC|(body?body->nd_noex&NOEX_UNDEF:0));
NOEX_PUBLIC      4124 eval.c         	if (VISI_CHECK(noex, NOEX_PUBLIC))
NOEX_PUBLIC      7027 eval.c         	set_method_visibility(module, argc, argv, NOEX_PUBLIC);
NOEX_PUBLIC      7097 eval.c             set_method_visibility(CLASS_OF(obj), argc, argv, NOEX_PUBLIC);
NOEX_PUBLIC      7218 eval.c         	rb_add_method(rb_singleton_class(module), id, body->nd_body, NOEX_PUBLIC);
NOEX_PUBLIC      9354 eval.c         	noex = NOEX_PUBLIC;


NOEX_RECV

NOEX_RECV        5616 eval.c             ruby_frame->flags = (flags & NOEX_RECV) ? FRAME_FUNC : 0;
NOEX_RECV        5814 eval.c         	noex |= NOEX_RECV;


NOEX_SAFE

NOEX_SAFE        5696 eval.c         	    if (NOEX_SAFE(flags) > ruby_safe_level) {
NOEX_SAFE        5697 eval.c         		if (ruby_safe_level == 0 && NOEX_SAFE(flags) > 2) {
NOEX_SAFE        5702 eval.c         		ruby_safe_level = NOEX_SAFE(flags);


NOEX_UNDEF

NOEX_UNDEF        757 class.c            rb_add_method(klass, rb_intern(name), 0, NOEX_UNDEF);
NOEX_UNDEF        426 eval.c             rb_add_method(CLASS_OF(klass), ID_ALLOCATOR, 0, NOEX_UNDEF);
NOEX_UNDEF       3797 eval.c         			  NOEX_PUBLIC|(body?body->nd_noex&NOEX_UNDEF:0));


NOEX_WITH

NOEX_WITH         379 eval.c         #define NOEX_WITH_SAFE(n) NOEX_WITH(n, ruby_safe_level)
NOEX_WITH        8894 eval.c                 safe = NOEX_WITH(data->safe_level, 4);


NOEX_WITH_SAFE

NOEX_WITH_SAFE    403 eval.c             body = NEW_METHOD(node, NOEX_WITH_SAFE(noex));
NOEX_WITH_SAFE   8669 eval.c             data->safe_level = NOEX_WITH_SAFE(0);


NOFILE

NOFILE             67 io.c           #if !defined NOFILE
NOFILE             84 io.c           # ifndef NOFILE
NOFILE           2814 io.c               for (fd = 3; fd < NOFILE; fd++) {


NOINLINE

NOINLINE         10204 eval.c         NORETURN(NOINLINE(static void rb_thread_restore_context_0(rb_thread_t,int,void*)));
NOINLINE         10205 eval.c         NORETURN(NOINLINE(static void stack_extend(rb_thread_t, int, VALUE *)));
NOINLINE         10262 eval.c         NORETURN(NOINLINE(static void register_stack_extend(rb_thread_t, int, void *, VALUE *)));
NOINLINE          436 gc.c           NOINLINE(static void set_stack_end(VALUE **stack_end_p));
NOINLINE           33 ruby.h         #ifndef NOINLINE


NORETURN

NORETURN           90 eval.c         NORETURN(static void rb_jump_context(rb_jmpbuf_t, int));
NORETURN          217 eval.c         NORETURN(static void rb_raise_jump(VALUE));
NORETURN          287 eval.c         NORETURN(static void print_undef(VALUE, ID));
NORETURN         1268 eval.c         NORETURN(static void rb_thread_start_1(void));
NORETURN         1625 eval.c         NORETURN(static void localjump_error(const char*, VALUE, int));
NORETURN         1677 eval.c         NORETURN(static void jump_tag_but_local_jump(int,VALUE));
NORETURN         2684 eval.c         NORETURN(static void return_jump(VALUE));
NORETURN         2685 eval.c         NORETURN(static void break_jump(VALUE));
NORETURN         2686 eval.c         NORETURN(static void unknown_node(NODE * volatile));
NORETURN         4208 eval.c         NORETURN(static VALUE terminate_process(int, VALUE));
NORETURN         4337 eval.c         NORETURN(static void rb_longjmp(int, VALUE));
NORETURN         4561 eval.c         NORETURN(static void proc_jump_error(int, VALUE));
NORETURN         4582 eval.c         NORETURN(static void return_jump(VALUE));
NORETURN         6534 eval.c         NORETURN(static void load_failed(VALUE));
NORETURN         7449 eval.c         NORETURN(static VALUE rb_f_throw(int,VALUE*));
NORETURN         10203 eval.c         NORETURN(static void rb_thread_restore_context(rb_thread_t,int));
NORETURN         10204 eval.c         NORETURN(NOINLINE(static void rb_thread_restore_context_0(rb_thread_t,int,void*)));
NORETURN         10205 eval.c         NORETURN(NOINLINE(static void stack_extend(rb_thread_t, int, VALUE *)));
NORETURN         10262 eval.c         NORETURN(NOINLINE(static void register_stack_extend(rb_thread_t, int, void *, VALUE *)));
NORETURN         10374 eval.c         NORETURN(static void rb_thread_main_jump(VALUE, int));
NORETURN         10384 eval.c         NORETURN(static void rb_thread_deadlock(void));
NORETURN         11664 eval.c         NORETURN(static void rb_thread_terminated(rb_thread_t, int, enum thread_status));
NORETURN          135 ext/openssl/ossl.h NORETURN(void ossl_raise(VALUE, const char *, ...));
NORETURN          656 ext/socket/socket.c NORETURN(static void raise_socket_error _((char *, int)));
NORETURN           34 ext/zlib/zlib.c static NORETURN(void raise_zlib_error _((int, const char *)));
NORETURN         2012 file.c         NORETURN(static void sys_fail2(VALUE,VALUE));
NORETURN          141 intern.h       NORETURN(void rb_cmperr(VALUE, VALUE));
NORETURN          155 intern.h       PRINTF_ARGS(NORETURN(void rb_loaderror(const char*, ...)), 1, 2);
NORETURN          156 intern.h       PRINTF_ARGS(NORETURN(void rb_name_error(ID, const char*, ...)), 2, 3);
NORETURN          157 intern.h       NORETURN(void rb_invalid_str(const char*, const char*));
NORETURN          160 intern.h       NORETURN(void rb_load_fail(const char*));
NORETURN          161 intern.h       NORETURN(void rb_error_frozen(const char*));
NORETURN          200 intern.h       NORETURN(void rb_exc_raise(VALUE));
NORETURN          201 intern.h       NORETURN(void rb_exc_fatal(VALUE));
NORETURN          232 intern.h       NORETURN(void rb_jump_tag(int));
NORETURN          253 intern.h       NORETURN(void ruby_stop(int));
NORETURN          297 intern.h       NORETURN(void rb_memerror(void));
NORETURN           27 ruby.h         #ifndef NORETURN
NORETURN          556 ruby.h         PRINTF_ARGS(NORETURN(void rb_raise(VALUE, const char*, ...)), 2, 3);
NORETURN          557 ruby.h         PRINTF_ARGS(NORETURN(void rb_fatal(const char*, ...)), 1, 2);
NORETURN          558 ruby.h         PRINTF_ARGS(NORETURN(void rb_bug(const char*, ...)), 1, 2);
NORETURN          559 ruby.h         NORETURN(void rb_sys_fail(const char*));
NORETURN          560 ruby.h         NORETURN(void rb_iter_break(void));
NORETURN          561 ruby.h         NORETURN(void rb_exit(int));
NORETURN          562 ruby.h         NORETURN(void rb_notimplement(void));
NORETURN          582 ruby.h         NORETURN(void rb_throw(const char*,VALUE));
NORETURN          599 ruby.h         NORETURN(void ruby_run(void));
NORETURN           98 rubyio.h       NORETURN(void rb_eof_error(void));
NORETURN         1096 variable.c     NORETURN(static void uninitialized_constant(VALUE, ID));


NORMALIZATION_TABLE_NFC_LENGTH

NORMALIZATION_TABLE_NFC_LENGTH   74 ext/nkf/nkf-utf8/config.h     const int nfc[NORMALIZATION_TABLE_NFC_LENGTH];
NORMALIZATION_TABLE_NFC_LENGTH 3992 ext/nkf/nkf-utf8/nkf.c 		for (i=0; i < NORMALIZATION_TABLE_NFC_LENGTH && array[i]; i++)


NORMALIZATION_TABLE_NFD_LENGTH

NORMALIZATION_TABLE_NFD_LENGTH   75 ext/nkf/nkf-utf8/config.h     const int nfd[NORMALIZATION_TABLE_NFD_LENGTH];
NORMALIZATION_TABLE_NFD_LENGTH 3982 ext/nkf/nkf-utf8/nkf.c 	    for (k=0; k < NORMALIZATION_TABLE_NFD_LENGTH && array[k]; k++){


NO_CreateInterp

NO_CreateInterp   225 ext/tk/stubs.c             if (st) *st = NO_CreateInterp;
NO_CreateInterp   360 ext/tk/stubs.c         case NO_CreateInterp:
NO_CreateInterp   680 ext/tk/tcltklib.c         case NO_CreateInterp:
NO_CreateInterp  4700 ext/tk/tcltklib.c         case NO_CreateInterp:


NO_DLN_LOAD

NO_DLN_LOAD        94 dln.c          #ifndef NO_DLN_LOAD
NO_DLN_LOAD      1265 dln.c          #ifdef NO_DLN_LOAD


NO_DeleteInterp

NO_DeleteInterp   232 ext/tk/stubs.c             if (st) *st = NO_DeleteInterp;
NO_DeleteInterp   361 ext/tk/stubs.c         case NO_DeleteInterp:
NO_DeleteInterp   682 ext/tk/tcltklib.c         case NO_DeleteInterp:
NO_DeleteInterp  4702 ext/tk/tcltklib.c         case NO_DeleteInterp:


NO_FindExecutable

NO_FindExecutable  125 ext/tk/stubs.c         return NO_FindExecutable;
NO_FindExecutable  350 ext/tk/stubs.c     case NO_FindExecutable:
NO_FindExecutable  678 ext/tk/tcltklib.c         case NO_FindExecutable:
NO_FindExecutable 4698 ext/tk/tcltklib.c         case NO_FindExecutable:
NO_FindExecutable 7938 ext/tk/tcltklib.c     case NO_FindExecutable:


NO_SAFE_RENAME

NO_SAFE_RENAME   4135 io.c           #ifdef NO_SAFE_RENAME
NO_SAFE_RENAME   4150 io.c           #ifdef NO_SAFE_RENAME
NO_SAFE_RENAME   4162 io.c           #ifndef NO_SAFE_RENAME


NO_TCL_DLL

NO_TCL_DLL        121 ext/tk/stubs.c         return NO_TCL_DLL;
NO_TCL_DLL        352 ext/tk/stubs.c     case NO_TCL_DLL:
NO_TCL_DLL        676 ext/tk/tcltklib.c         case NO_TCL_DLL:
NO_TCL_DLL       4696 ext/tk/tcltklib.c         case NO_TCL_DLL:
NO_TCL_DLL       7936 ext/tk/tcltklib.c     case NO_TCL_DLL:


NO_THREAD_INTERRUPT_TIME

NO_THREAD_INTERRUPT_TIME 1318 ext/tk/tcltklib.c                 timer_tick = NO_THREAD_INTERRUPT_TIME;
NO_THREAD_INTERRUPT_TIME 1844 ext/tk/tcltklib.c     t0.tv_usec = (time_t)((NO_THREAD_INTERRUPT_TIME)*1000.0);


NO_TK_DLL

NO_TK_DLL         165 ext/tk/stubs.c         return NO_TK_DLL;
NO_TK_DLL         353 ext/tk/stubs.c     case NO_TK_DLL:


NO_Tk_Init

NO_Tk_Init        291 ext/tk/stubs.c             return NO_Tk_Init;
NO_Tk_Init        326 ext/tk/stubs.c             return NO_Tk_Init;
NO_Tk_Init        372 ext/tk/stubs.c     case NO_Tk_Init:
NO_Tk_Init        710 ext/tk/tcltklib.c         case NO_Tk_Init:
NO_Tk_Init        731 ext/tk/tcltklib.c         case NO_Tk_Init:
NO_Tk_Init       4772 ext/tk/tcltklib.c         case NO_Tk_Init:


NO_WAITPID

NO_WAITPID        555 process.c      #ifndef NO_WAITPID
NO_WAITPID        619 process.c      #ifdef NO_WAITPID
NO_WAITPID        788 process.c      #ifdef NO_WAITPID


NO_X0201

NO_X0201          400 ext/nkf/nkf-utf8/nkf.c STATIC int             x0201_f = NO_X0201;     /* Assume NO JISX0201 */
NO_X0201          738 ext/nkf/nkf-utf8/nkf.c          x0201_f = ((!iso2022jp_f)? TRUE : NO_X0201);
NO_X0201         1249 ext/nkf/nkf-utf8/nkf.c             if (x0201_f==NO_X0201) x0201_f=TRUE;
NO_X0201         2020 ext/nkf/nkf-utf8/nkf.c                         if(iso2022jp_f && x0201_f==NO_X0201) {
NO_X0201         2033 ext/nkf/nkf-utf8/nkf.c 			    if(iso2022jp_f &&  x0201_f==NO_X0201) {
NO_X0201         2059 ext/nkf/nkf-utf8/nkf.c 			if(iso2022jp_f && x0201_f==NO_X0201) {
NO_X0201         4749 ext/nkf/nkf-utf8/nkf.c      x0201_f = NO_X0201;
NO_X0201          109 ext/nkf/nkf.c      x0201_f = ((!iso2022jp_f)? TRUE : NO_X0201);
NO_X0201          236 ext/nkf/nkf.c      x0201_f = ((!iso2022jp_f)? TRUE : NO_X0201);


NQUALIFIER

NQUALIFIER        981 regcomp.c            QualifierNode* qn = &NQUALIFIER(node->target);
NQUALIFIER       1071 regcomp.c            QualifierNode* qn = &NQUALIFIER(node->target);
NQUALIFIER       1288 regcomp.c          r = compile_length_qualifier_node(&(NQUALIFIER(node)), reg);
NQUALIFIER       1436 regcomp.c          r = compile_qualifier_node(&(NQUALIFIER(node)), reg);
NQUALIFIER       1475 regcomp.c            Node** ptarget = &(NQUALIFIER(node).target);
NQUALIFIER       1554 regcomp.c          r = renumber_by_map(NQUALIFIER(node).target, map);
NQUALIFIER       1584 regcomp.c          r = numbered_ref_check(NQUALIFIER(node).target);
NQUALIFIER       1693 regcomp.c            QualifierNode* qn = &(NQUALIFIER(node));
NQUALIFIER       1817 regcomp.c            QualifierNode* qn = &(NQUALIFIER(node));
NQUALIFIER       1938 regcomp.c            QualifierNode* qn = &(NQUALIFIER(node));
NQUALIFIER       2045 regcomp.c            QualifierNode* qn = &(NQUALIFIER(node));
NQUALIFIER       2380 regcomp.c            QualifierNode* qn = &(NQUALIFIER(node));
NQUALIFIER       2442 regcomp.c          r = check_type_tree(NQUALIFIER(node).target, type_mask, effect_mask,
NQUALIFIER       2518 regcomp.c          r = subexp_inf_recursive_check(NQUALIFIER(node).target, env, head);
NQUALIFIER       2574 regcomp.c          r = subexp_inf_recursive_check_trav(NQUALIFIER(node).target, env);
NQUALIFIER       2629 regcomp.c          r = subexp_recursive_check(NQUALIFIER(node).target);
NQUALIFIER       2694 regcomp.c          r = subexp_recursive_check_trav(NQUALIFIER(node).target, env);
NQUALIFIER       2695 regcomp.c          if (NQUALIFIER(node).upper == 0) {
NQUALIFIER       2697 regcomp.c      	NQUALIFIER(node).is_refered = 1;
NQUALIFIER       2761 regcomp.c          r = setup_subexp_call(NQUALIFIER(node).target, env);
NQUALIFIER       2911 regcomp.c          QualifierNode* qn = &(NQUALIFIER(node));
NQUALIFIER       3127 regcomp.c            QualifierNode* qn = &(NQUALIFIER(node));
NQUALIFIER       3190 regcomp.c      	  QualifierNode* tqn = &(NQUALIFIER(target));
NQUALIFIER       3231 regcomp.c      	    QualifierNode* tqn = &(NQUALIFIER(target));
NQUALIFIER       4192 regcomp.c            QualifierNode* qn = &(NQUALIFIER(node));
NQUALIFIER       5502 regcomp.c      	    NQUALIFIER(node).lower, NQUALIFIER(node).upper,
NQUALIFIER       5503 regcomp.c      	    (NQUALIFIER(node).greedy ? "" : "?"));
NQUALIFIER       5504 regcomp.c          print_indent_tree(f, NQUALIFIER(node).target, indent + add);
NQUALIFIER       1017 regparse.c         if (NQUALIFIER(node).target)
NQUALIFIER       1018 regparse.c           onig_node_free(NQUALIFIER(node).target);
NQUALIFIER       1276 regparse.c       NQUALIFIER(node).state  = 0;
NQUALIFIER       1277 regparse.c       NQUALIFIER(node).target = NULL;
NQUALIFIER       1278 regparse.c       NQUALIFIER(node).lower  = lower;
NQUALIFIER       1279 regparse.c       NQUALIFIER(node).upper  = upper;
NQUALIFIER       1280 regparse.c       NQUALIFIER(node).greedy = 1;
NQUALIFIER       1281 regparse.c       NQUALIFIER(node).by_number         = by_number;
NQUALIFIER       1282 regparse.c       NQUALIFIER(node).target_empty_info = NQ_TARGET_ISNOT_EMPTY;
NQUALIFIER       1283 regparse.c       NQUALIFIER(node).head_exact        = NULL_NODE;
NQUALIFIER       1284 regparse.c       NQUALIFIER(node).next_head_exact   = NULL_NODE;
NQUALIFIER       1285 regparse.c       NQUALIFIER(node).is_refered        = 0;
NQUALIFIER       2118 regparse.c       p = &(NQUALIFIER(pnode));
NQUALIFIER       2119 regparse.c       c = &(NQUALIFIER(cnode));
NQUALIFIER       4470 regparse.c       qn = &(NQUALIFIER(qnode));
NQUALIFIER       4492 regparse.c           QualifierNode* qnt = &(NQUALIFIER(target));
NQUALIFIER       4966 regparse.c         NQUALIFIER(qn).target = *np;
NQUALIFIER       5023 regparse.c           NQUALIFIER(qn).greedy = tok->u.repeat.greedy;


NQ_TARGET_IS_EMPTY

NQ_TARGET_IS_EMPTY  348 regcomp.c          if (empty_info == NQ_TARGET_IS_EMPTY)
NQ_TARGET_IS_EMPTY 3138 regcomp.c      	  qn->target_empty_info = NQ_TARGET_IS_EMPTY;


NQ_TARGET_IS_EMPTY_MEM

NQ_TARGET_IS_EMPTY_MEM  350 regcomp.c          else if (empty_info == NQ_TARGET_IS_EMPTY_MEM)
NQ_TARGET_IS_EMPTY_MEM 1705 regcomp.c      	return NQ_TARGET_IS_EMPTY_MEM;


NQ_TARGET_IS_EMPTY_REC

NQ_TARGET_IS_EMPTY_REC  352 regcomp.c          else if (empty_info == NQ_TARGET_IS_EMPTY_REC)
NQ_TARGET_IS_EMPTY_REC 1684 regcomp.c            return NQ_TARGET_IS_EMPTY_REC; /* tiny version */


NSIG

NSIG               24 signal.c       #ifndef NSIG
NSIG              300 signal.c       } trap_list[NSIG];
NSIG              301 signal.c       static rb_atomic_t trap_pending_list[NSIG];
NSIG              302 signal.c       static char rb_trap_accept_nativethreads[NSIG];
NSIG              313 signal.c           for (i=0; i<NSIG; i++) {
NSIG              448 signal.c           if (sig >= NSIG) {
NSIG              534 signal.c           for (i=0; i<NSIG; i++) {
NSIG              633 signal.c           if (sig < 0 || sig > NSIG) {


NSLINKMODULE_OPTION_BINDNOW

NSLINKMODULE_OPTION_BINDNOW 1138 dln.c          #ifndef NSLINKMODULE_OPTION_BINDNOW
NSLINKMODULE_OPTION_BINDNOW 1454 dln.c          	NSLinkModule(obj_file, file, NSLINKMODULE_OPTION_BINDNOW);


NSTRING

NSTRING           436 regcomp.c        sn = &(NSTRING(node));
NSTRING           484 regcomp.c        sn = &(NSTRING(node));
NSTRING           783 regcomp.c            return add_bytes(reg, NSTRING(qn->next_head_exact).s, 1);
NSTRING           824 regcomp.c      	add_bytes(reg, NSTRING(qn->head_exact).s, 1);
NSTRING           834 regcomp.c      	add_bytes(reg, NSTRING(qn->next_head_exact).s, 1);
NSTRING          1253 regcomp.c            r = compile_length_string_raw_node(&(NSTRING(node)), reg);
NSTRING          1351 regcomp.c            r = compile_string_raw_node(&(NSTRING(node)), reg);
NSTRING          1796 regcomp.c            StrNode* sn = &(NSTRING(node));
NSTRING          1885 regcomp.c            StrNode* sn = &(NSTRING(node));
NSTRING          2034 regcomp.c            StrNode* sn = &(NSTRING(node));
NSTRING          2271 regcomp.c            StrNode* xs = &(NSTRING(x));
NSTRING          2303 regcomp.c      	  StrNode* ys = &(NSTRING(y));
NSTRING          2358 regcomp.c            StrNode* sn = &(NSTRING(node));
NSTRING          2949 regcomp.c        StrNode* sn = &NSTRING(node);
NSTRING          3172 regcomp.c      	  StrNode* sn = &(NSTRING(target));
NSTRING          3176 regcomp.c      	    onig_node_conv_to_str_node(node, NSTRING(target).flag);
NSTRING          4001 regcomp.c            StrNode* sn = &(NSTRING(node));
NSTRING          5414 regcomp.c          for (p = NSTRING(node).s; p < NSTRING(node).end; p++) {
NSTRING           974 regparse.c         if (IS_NOT_NULL(NSTRING(node).s) && NSTRING(node).s != NSTRING(node).buf) {
NSTRING           975 regparse.c           xfree(NSTRING(node).s);
NSTRING          1340 regparse.c         int len  = NSTRING(node).end - NSTRING(node).s;
NSTRING          1342 regparse.c         if (NSTRING(node).capa > 0 || (len + addlen > NODE_STR_BUF_SIZE - 1)) {
NSTRING          1346 regparse.c           if (capa <= NSTRING(node).capa) {
NSTRING          1347 regparse.c     	k_strcpy(NSTRING(node).s + len, s, end);
NSTRING          1350 regparse.c     	if (NSTRING(node).s == NSTRING(node).buf)
NSTRING          1351 regparse.c     	  p = strcat_capa_from_static(NSTRING(node).s, NSTRING(node).end,
NSTRING          1354 regparse.c     	  p = k_strcat_capa(NSTRING(node).s, NSTRING(node).end, s, end, capa);
NSTRING          1357 regparse.c     	NSTRING(node).s    = p;
NSTRING          1358 regparse.c     	NSTRING(node).capa = capa;
NSTRING          1362 regparse.c           k_strcpy(NSTRING(node).s + len, s, end);
NSTRING          1364 regparse.c         NSTRING(node).end = NSTRING(node).s + len + addlen;
NSTRING          1384 regparse.c       NSTRING(node).flag = flag;
NSTRING          1385 regparse.c       NSTRING(node).capa = 0;
NSTRING          1386 regparse.c       NSTRING(node).s    = NSTRING(node).buf;
NSTRING          1387 regparse.c       NSTRING(node).end  = NSTRING(node).buf;
NSTRING          1393 regparse.c       if (NSTRING(node).capa != 0 &&
NSTRING          1394 regparse.c           IS_NOT_NULL(NSTRING(node).s) && NSTRING(node).s != NSTRING(node).buf) {
NSTRING          1395 regparse.c         xfree(NSTRING(node).s);
NSTRING          1398 regparse.c       NSTRING(node).capa = 0;
NSTRING          1399 regparse.c       NSTRING(node).flag = 0;
NSTRING          1400 regparse.c       NSTRING(node).s    = NSTRING(node).buf;
NSTRING          1401 regparse.c       NSTRING(node).end  = NSTRING(node).buf;
NSTRING          1411 regparse.c       NSTRING(node).capa = 0;
NSTRING          1412 regparse.c       NSTRING(node).flag = 0;
NSTRING          1413 regparse.c       NSTRING(node).s    = NSTRING(node).buf;
NSTRING          1414 regparse.c       NSTRING(node).end  = NSTRING(node).buf;
NSTRING          4478 regparse.c           StrNode* sn = &(NSTRING(target));
NSTRING          4756 regparse.c     	  if (len >= enc_len(env->enc, NSTRING(*np).s)) {


NSTRING_IS_AMBIG

NSTRING_IS_AMBIG  440 regcomp.c        ambig = NSTRING_IS_AMBIG(node);
NSTRING_IS_AMBIG  489 regcomp.c        ambig = NSTRING_IS_AMBIG(node);
NSTRING_IS_AMBIG 2306 regcomp.c      	  if (NSTRING_IS_AMBIG(x) || NSTRING_IS_AMBIG(y)) {
NSTRING_IS_AMBIG 4005 regcomp.c            if (! NSTRING_IS_AMBIG(node)) {


NSTRING_IS_RAW

NSTRING_IS_RAW   1252 regcomp.c          if (NSTRING_IS_RAW(node))
NSTRING_IS_RAW   1350 regcomp.c          if (NSTRING_IS_RAW(node))
NSTRING_IS_RAW   2364 regcomp.c      	  !NSTRING_IS_RAW(node) && IS_IGNORECASE(reg->options)) {
NSTRING_IS_RAW   3094 regcomp.c          if (IS_IGNORECASE(reg->options) && !NSTRING_IS_RAW(node)) {
NSTRING_IS_RAW   4003 regcomp.c            int is_raw = NSTRING_IS_RAW(node);
NSTRING_IS_RAW   4007 regcomp.c      				  NSTRING_IS_RAW(node), env->enc);
NSTRING_IS_RAW   5413 regcomp.c      	    (NSTRING_IS_RAW(node) ? "-raw" : ""), (int )node);


NSTRING_LEN

NSTRING_LEN      2272 regcomp.c            if (NSTRING_LEN(x) == 0)
NSTRING_LEN      2304 regcomp.c      	  len = NSTRING_LEN(x);
NSTRING_LEN      2305 regcomp.c      	  if (len > NSTRING_LEN(y)) len = NSTRING_LEN(y);
NSTRING_LEN      3171 regcomp.c      	  int len = NSTRING_LEN(target);


NSTRING_SET_AMBIG

NSTRING_SET_AMBIG 2976 regcomp.c              NSTRING_SET_AMBIG(snode);
NSTRING_SET_AMBIG 3002 regcomp.c            NSTRING_SET_AMBIG(node);
NSTRING_SET_AMBIG 3023 regcomp.c            NSTRING_SET_AMBIG(snode);


NSTRING_SET_AMBIG_REDUCE

NSTRING_SET_AMBIG_REDUCE 2977 regcomp.c              if (wp != prev) NSTRING_SET_AMBIG_REDUCE(snode);
NSTRING_SET_AMBIG_REDUCE 3009 regcomp.c            if (wp != sn->end) NSTRING_SET_AMBIG_REDUCE(node);
NSTRING_SET_AMBIG_REDUCE 3024 regcomp.c            if (wp != end) NSTRING_SET_AMBIG_REDUCE(snode);


NSTRING_SET_RAW

NSTRING_SET_RAW  1432 regparse.c       NSTRING_SET_RAW(node);
NSTRING_SET_RAW  1462 regparse.c     	NSTRING_SET_RAW(n);


NSTR_AMBIG

NSTR_AMBIG         88 regparse.h     #define NSTRING_SET_AMBIG(node)        (node)->u.str.flag |= NSTR_AMBIG
NSTR_AMBIG         91 regparse.h     #define NSTRING_IS_AMBIG(node)        (((node)->u.str.flag & NSTR_AMBIG) != 0)


NSTR_AMBIG_REDUCE

NSTR_AMBIG_REDUCE   89 regparse.h     #define NSTRING_SET_AMBIG_REDUCE(node) (node)->u.str.flag |= NSTR_AMBIG_REDUCE
NSTR_AMBIG_REDUCE   93 regparse.h       (((node)->u.str.flag & NSTR_AMBIG_REDUCE) != 0)


NSTR_RAW

NSTR_RAW         1461 regparse.c           if ((sn->flag & NSTR_RAW) != 0)
NSTR_RAW           86 regparse.h     #define NSTRING_SET_RAW(node)          (node)->u.str.flag |= NSTR_RAW
NSTR_RAW           87 regparse.h     #define NSTRING_CLEAR_RAW(node)        (node)->u.str.flag &= ~NSTR_RAW
NSTR_RAW           90 regparse.h     #define NSTRING_IS_RAW(node)          (((node)->u.str.flag & NSTR_RAW)   != 0)


NST_ADDR_FIXED

NST_ADDR_FIXED   1018 regcomp.c            node->state |= NST_ADDR_FIXED;
NST_ADDR_FIXED    153 regparse.h     #define IS_EFFECT_ADDR_FIXED(en)       (((en)->state & NST_ADDR_FIXED)    != 0)


NST_CALLED

NST_CALLED       2817 regcomp.c      	SET_EFFECT_STATUS(cn->target, NST_CALLED);
NST_CALLED        152 regparse.h     #define IS_EFFECT_CALLED(en)           (((en)->state & NST_CALLED)        != 0)


NST_CLEN_FIXED

NST_CLEN_FIXED   2091 regcomp.c      	    SET_EFFECT_STATUS(node, NST_CLEN_FIXED);
NST_CLEN_FIXED    159 regparse.h     #define IS_EFFECT_CLEN_FIXED(en)       (((en)->state & NST_CLEN_FIXED)    != 0)


NST_IN_REPEAT

NST_IN_REPEAT    3131 regcomp.c              qn->state |= NST_IN_REPEAT;
NST_IN_REPEAT     168 regparse.h     #define IS_QUALIFIER_IN_REPEAT(qn)     (((qn)->state & NST_IN_REPEAT)  != 0)


NST_MARK1

NST_MARK1        2596 regcomp.c      	SET_EFFECT_STATUS(node, NST_MARK1);
NST_MARK1        2599 regcomp.c      	CLEAR_EFFECT_STATUS(node, NST_MARK1);
NST_MARK1        2721 regcomp.c      	  SET_EFFECT_STATUS(node, NST_MARK1);
NST_MARK1        2724 regcomp.c      	  CLEAR_EFFECT_STATUS(node, NST_MARK1);
NST_MARK1         155 regparse.h     #define IS_EFFECT_MARK1(en)            (((en)->state & NST_MARK1)         != 0)


NST_MARK2

NST_MARK2        2545 regcomp.c            SET_EFFECT_STATUS(node, NST_MARK2);
NST_MARK2        2547 regcomp.c            CLEAR_EFFECT_STATUS(node, NST_MARK2);
NST_MARK2        2657 regcomp.c            SET_EFFECT_STATUS(node, NST_MARK2);
NST_MARK2        2659 regcomp.c            CLEAR_EFFECT_STATUS(node, NST_MARK2);
NST_MARK2         156 regparse.h     #define IS_EFFECT_MARK2(en)            (((en)->state & NST_MARK2)         != 0)


NST_MAX_FIXED

NST_MAX_FIXED    1964 regcomp.c      	    SET_EFFECT_STATUS(node, NST_MAX_FIXED);
NST_MAX_FIXED     158 regparse.h     #define IS_EFFECT_MAX_FIXED(en)        (((en)->state & NST_MAX_FIXED)     != 0)


NST_MIN_FIXED

NST_MIN_FIXED    1839 regcomp.c      	    SET_EFFECT_STATUS(node, NST_MIN_FIXED);
NST_MIN_FIXED     157 regparse.h     #define IS_EFFECT_MIN_FIXED(en)        (((en)->state & NST_MIN_FIXED)     != 0)


NST_NAMED_GROUP

NST_NAMED_GROUP  1317 regparse.c         SET_EFFECT_STATUS(node, NST_NAMED_GROUP);
NST_NAMED_GROUP   162 regparse.h     #define IS_EFFECT_NAMED_GROUP(en)      (((en)->state & NST_NAMED_GROUP)   != 0)


NST_NAME_REF

NST_NAME_REF     1226 regparse.c         NBACKREF(node).state |= NST_NAME_REF;
NST_NAME_REF      166 regparse.h     #define IS_CALL_NAME_REF(cn)           (((cn)->state & NST_NAME_REF)   != 0)
NST_NAME_REF      167 regparse.h     #define IS_BACKREF_NAME_REF(bn)        (((bn)->state & NST_NAME_REF)   != 0)


NST_RECURSION

NST_RECURSION    1746 regcomp.c            if (br->state & NST_RECURSION) break;
NST_RECURSION    1913 regcomp.c            if (br->state & NST_RECURSION) {
NST_RECURSION    2723 regcomp.c      	  if (r != 0) SET_EFFECT_STATUS(node, NST_RECURSION);
NST_RECURSION    4153 regcomp.c            if (br->state & NST_RECURSION) {
NST_RECURSION    1231 regparse.c           NBACKREF(node).state |= NST_RECURSION;   /* /...(\1).../ */
NST_RECURSION     154 regparse.h     #define IS_EFFECT_RECURSION(en)        (((en)->state & NST_RECURSION)     != 0)
NST_RECURSION     164 regparse.h     #define SET_CALL_RECURSION(node)       (node)->u.call.state |= NST_RECURSION
NST_RECURSION     165 regparse.h     #define IS_CALL_RECURSION(cn)          (((cn)->state & NST_RECURSION)  != 0)


NST_STOP_BT_SIMPLE_REPEAT

NST_STOP_BT_SIMPLE_REPEAT 2927 regcomp.c      	      SET_EFFECT_STATUS(en, NST_STOP_BT_SIMPLE_REPEAT);
NST_STOP_BT_SIMPLE_REPEAT 3236 regcomp.c      		SET_EFFECT_STATUS(node, NST_STOP_BT_SIMPLE_REPEAT);
NST_STOP_BT_SIMPLE_REPEAT  161 regparse.h         (((en)->state & NST_STOP_BT_SIMPLE_REPEAT) != 0)


NTMALLOC

NTMALLOC         1018 win32/win32.c      tmpcurr->flags |= NTMALLOC;
NTMALLOC         1053 win32/win32.c      if (patt->flags & NTMALLOC)
NTMALLOC         1326 win32/win32.c  	if (curr->flags & NTMALLOC) free(curr->str);


NTYPE

NTYPE             700 regcomp.c        if (NTYPE(qn->target) == N_ANYCHAR) {
NTYPE             758 regcomp.c            NTYPE(qn->target) == N_ANYCHAR)
NTYPE            1226 regcomp.c        type = NTYPE(node);
NTYPE            1312 regcomp.c        type = NTYPE(node);
NTYPE            1449 regcomp.c          fprintf(stderr, "compile_tree: undefined node type %d\n", NTYPE(node));
NTYPE            1465 regcomp.c        switch (NTYPE(node)) {
NTYPE            1478 regcomp.c            if (*ptarget != old && NTYPE(*ptarget) == N_QUALIFIER) {
NTYPE            1546 regcomp.c        switch (NTYPE(node)) {
NTYPE            1576 regcomp.c        switch (NTYPE(node)) {
NTYPE            1669 regcomp.c        switch (NTYPE(node)) {
NTYPE            1739 regcomp.c        switch (NTYPE(node)) {
NTYPE            1867 regcomp.c        switch (NTYPE(node)) {
NTYPE            1997 regcomp.c        switch (NTYPE(node)) {
NTYPE            2156 regcomp.c        ytype = NTYPE(y);
NTYPE            2157 regcomp.c        switch (NTYPE(x)) {
NTYPE            2336 regcomp.c        switch (NTYPE(node)) {
NTYPE            2429 regcomp.c        type = NTYPE(node);
NTYPE            2483 regcomp.c        type = NTYPE(node);
NTYPE            2564 regcomp.c        type = NTYPE(node);
NTYPE            2619 regcomp.c        type = NTYPE(node);
NTYPE            2679 regcomp.c        type = NTYPE(node);
NTYPE            2746 regcomp.c        type = NTYPE(node);
NTYPE            2909 regcomp.c        type = NTYPE(node);
NTYPE            2918 regcomp.c      	int ttype = NTYPE(qn->target);
NTYPE            3069 regcomp.c        type = NTYPE(node);
NTYPE            3152 regcomp.c      	    if (NTYPE(target) == N_STRING) {
NTYPE            3168 regcomp.c            if (NTYPE(target) == N_STRING) {
NTYPE            3189 regcomp.c      	if (NTYPE(target) == N_QUALIFIER) {
NTYPE            3230 regcomp.c      	  if (NTYPE(target) == N_QUALIFIER) {
NTYPE            3234 regcomp.c      	      int qtype = NTYPE(tqn->target);
NTYPE            3965 regcomp.c        type = NTYPE(node);
NTYPE            4199 regcomp.c      	    NTYPE(qn->target) == N_ANYCHAR && qn->greedy) {
NTYPE            4289 regcomp.c      	    NTYPE(node));
NTYPE            5392 regcomp.c        type = NTYPE(node);
NTYPE            5396 regcomp.c          if (NTYPE(node) == N_LIST)
NTYPE            5403 regcomp.c            if (NTYPE(node) != type) {
NTYPE            5404 regcomp.c      	fprintf(f, "ERROR: list/alt right is not a cons. %d\n", NTYPE(node));
NTYPE            5529 regcomp.c          fprintf(f, "print_indent_tree: undefined node type %d\n", NTYPE(node));
NTYPE             972 regparse.c       switch (NTYPE(node)) {
NTYPE            2038 regparse.c       switch (NTYPE(node)) {
NTYPE            4442 regparse.c       if (NTYPE(*np) == N_ANCHOR)
NTYPE            4475 regparse.c       switch (NTYPE(target)) {
NTYPE            5075 regparse.c           if (NTYPE(node) == N_LIST) {


NULL

NULL              198 dir.c          	    return NULL;
NULL              205 dir.c          		return NULL;
NULL              215 dir.c              return ok == not ? NULL : (char *)p + 1;
NULL              375 dir.c              dirp->dir = NULL;
NULL              376 dir.c              dirp->path = NULL;
NULL              396 dir.c              dp->dir = NULL;
NULL              397 dir.c              dp->path = NULL;
NULL              399 dir.c              if (dp->dir == NULL) {
NULL              404 dir.c          	if (dp->dir == NULL) {
NULL              446 dir.c              if (dirp->dir == NULL) dir_closed();\
NULL              549 dir.c              for (dp = readdir(dirp->dir); dp != NULL; dp = readdir(dirp->dir)) {
NULL              551 dir.c          	if (dirp->dir == NULL) dir_closed();
NULL              672 dir.c              dirp->dir = NULL;
NULL              936 dir.c              if (dirp == NULL && errno != ENOENT && errno != ENOTDIR)
NULL             1226 dir.c          	if (dirp == NULL) return 0;
NULL             1228 dir.c          	for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp)) {
NULL              275 dln.c              if (reloc == NULL) {
NULL              277 dln.c          	return NULL;
NULL              283 dln.c          	return NULL;
NULL              307 dln.c              if (buffer == NULL) {
NULL              309 dln.c          	return NULL;
NULL              330 dln.c              return NULL;
NULL              343 dln.c              if (tbl == NULL) {
NULL              345 dln.c          	return NULL;
NULL              366 dln.c              file = dln_find_exe(prog, NULL);
NULL              367 dln.c              if (file == NULL || (fd = open(file, O_RDONLY)) < 0) {
NULL              374 dln.c              if (syms == NULL) {
NULL              379 dln.c              if (sym_tbl == NULL) {	/* file may be start with #! */
NULL              447 dln.c              if (addr == NULL) {
NULL              480 dln.c              st_foreach(undef_tbl, undef_print, NULL);
NULL              505 dln.c          static st_table *reloc_tbl = NULL;
NULL              531 dln.c              if (reloc_tbl == NULL) {
NULL              645 dln.c              struct relocation_info *reloc = NULL;
NULL              648 dln.c              struct nlist *syms = NULL;
NULL              659 dln.c              if (reloc == NULL) return -1;
NULL              662 dln.c              if (syms == NULL) {
NULL              678 dln.c          		if (st_delete(undef_tbl, (st_data_t*)&key, NULL)) {
NULL              690 dln.c          		st_insert(undef_tbl, strdup(sym[1].n_un.n_name), NULL);
NULL              691 dln.c          		if (st_delete(undef_tbl, (st_data_t*)&key, NULL)) {
NULL              701 dln.c          		old_sym = NULL;
NULL              729 dln.c          		    st_insert(undef_tbl, strdup(sym->n_un.n_name), NULL);
NULL              759 dln.c          	    if (st_delete(undef_tbl, (st_data_t*)&key, NULL) != 0) {
NULL              949 dln.c              st_table *lib_tbl = NULL;
NULL              974 dln.c              if (path == NULL) path = dln_librrb_ary_path;
NULL              997 dln.c          	if (data == NULL) goto syserr;
NULL             1046 dln.c          		if (syms == NULL) goto badlib;
NULL             1051 dln.c          			&& st_lookup(undef_tbl, sym->n_un.n_name, NULL)) {
NULL             1113 dln.c              return NULL;
NULL             1196 dln.c          	NULL,
NULL             1201 dln.c          	NULL);
NULL             1234 dln.c          	{L_ERROR_ERRNO,		NULL}
NULL             1288 dln.c              if ((handle = LoadLibrary(winfile)) == NULL) {
NULL             1293 dln.c              if ((init_fct = (void(*)())GetProcAddress(handle, buf)) == NULL) {
NULL             1330 dln.c          	if ((handle = (void*)dlopen(file, RTLD_LAZY|RTLD_GLOBAL)) == NULL) {
NULL             1336 dln.c          	if (init_fct == NULL) {
NULL             1351 dln.c          	shl_t lib = NULL;
NULL             1357 dln.c          	if (lib == NULL) {
NULL             1362 dln.c          	if (init_fct == NULL) {
NULL             1364 dln.c          	    if (init_fct == NULL) {
NULL             1380 dln.c          	if (init_fct == NULL) {
NULL             1407 dln.c          	char *object_files[2] = {NULL, NULL};
NULL             1416 dln.c          	if(rld_load(s, NULL, object_files, NULL) == 0) {
NULL             1575 dln.c          	if ((handle = (void*)dlopen(fname, 0)) == NULL) {
NULL             1580 dln.c          	if ((init_fct = (void (*)())dlsym(handle, buf)) == NULL) {
NULL             1703 dln.c          	if (ep == NULL)
NULL             1727 dln.c          		if (home != NULL) {
NULL             1793 dln.c          		(char *) NULL
NULL             1820 dln.c          	    return NULL;
NULL              857 eval.c             if (!ruby_scope->local_tbl) return NULL;
NULL              858 eval.c             if (cnt >= ruby_scope->local_tbl[0]) return NULL;
NULL              864 eval.c             if (ruby_scope->local_vars == 0) return NULL;
NULL             2397 eval.c             prev = NULL;
NULL             4698 eval.c         	    NODE *bvar = NULL;
NULL             6089 eval.c             struct BLOCK *data = NULL;
NULL             9918 eval.c             gettimeofday(&tv, NULL);
NULL             11603 eval.c         	select(0, NULL, NULL, NULL, &tv);
NULL             11646 eval.c             setitimer(ITIMER_VIRTUAL, &tval, NULL);
NULL             11658 eval.c             setitimer(ITIMER_VIRTUAL, &tval, NULL);
NULL             12132 eval.c         		RDATA(th->thread)->dfree = NULL;
NULL              132 ext/bigdecimal/bigdecimal.c     return NULL; /* NULL means to coerce */
NULL              635 ext/bigdecimal/bigdecimal.c     Real *c=NULL, *res=NULL, *div = NULL;
NULL              658 ext/bigdecimal/bigdecimal.c     Real *c=NULL, *d=NULL, *res=NULL;
NULL              713 ext/bigdecimal/bigdecimal.c     Real *div=NULL, *mod=NULL;
NULL              726 ext/bigdecimal/bigdecimal.c     Real *a=NULL, *b=NULL, *c=NULL, *res=NULL, *d=NULL, *rr=NULL, *ff=NULL;
NULL              727 ext/bigdecimal/bigdecimal.c     Real *f=NULL;
NULL              773 ext/bigdecimal/bigdecimal.c     Real *div=NULL, *mod=NULL;
NULL              790 ext/bigdecimal/bigdecimal.c        Real *div=NULL;
NULL              799 ext/bigdecimal/bigdecimal.c           Real *res=NULL;
NULL              800 ext/bigdecimal/bigdecimal.c           Real *av=NULL, *bv=NULL, *cv=NULL;
NULL             1415 ext/bigdecimal/bigdecimal.c     if(pv != NULL) {
NULL             1728 ext/bigdecimal/bigdecimal.c     if(vp == NULL)   return BASE_FIG*2+6;
NULL             1881 ext/bigdecimal/bigdecimal.c     Real *vp = NULL;
NULL             2521 ext/bigdecimal/bigdecimal.c     w = NULL;
NULL             2584 ext/bigdecimal/bigdecimal.c     if(w != NULL) {        /* free work variable */
NULL             3611 ext/bigdecimal/bigdecimal.c     Real *f = NULL;
NULL             3612 ext/bigdecimal/bigdecimal.c     Real *r = NULL;
NULL             3969 ext/bigdecimal/bigdecimal.c     Real *w1 = NULL;
NULL             3970 ext/bigdecimal/bigdecimal.c     Real *w2 = NULL;
NULL              109 ext/curses/curses.c     if (window == NULL) {
NULL              708 ext/curses/curses.c   return INT2NUM(mousemask(NUM2UINT(mask),NULL));
NULL             1256 ext/curses/curses.c   res = wcolor_set(winp->window, NUM2INT(col), NULL);
NULL              131 ext/digest/rmd160/rmd160.c 	_DIAGASSERT(context != NULL);
NULL              151 ext/digest/rmd160/rmd160.c 	_DIAGASSERT(state != NULL);
NULL              152 ext/digest/rmd160/rmd160.c 	_DIAGASSERT(block != NULL);
NULL              361 ext/digest/rmd160/rmd160.c 	_DIAGASSERT(context != NULL);
NULL              362 ext/digest/rmd160/rmd160.c 	_DIAGASSERT(data != NULL);
NULL              420 ext/digest/rmd160/rmd160.c 	_DIAGASSERT(digest != NULL);
NULL              421 ext/digest/rmd160/rmd160.c 	_DIAGASSERT(context != NULL);
NULL              446 ext/digest/rmd160/rmd160.c 	if (digest != NULL) {
NULL               46 ext/digest/rmd160/rmd160hl.c     _DIAGASSERT(ctx != NULL);
NULL               49 ext/digest/rmd160/rmd160hl.c     if (p == NULL && (p = malloc(41)) == NULL)
NULL               68 ext/digest/rmd160/rmd160hl.c     _DIAGASSERT(filename != NULL);
NULL               90 ext/digest/rmd160/rmd160hl.c     _DIAGASSERT(data != NULL);
NULL               20 ext/digest/rmd160/rmd160ossl.c     _DIAGASSERT(ctx != NULL);
NULL               23 ext/digest/rmd160/rmd160ossl.c     if (p == NULL && (p = malloc(41)) == NULL)
NULL               47 ext/digest/sha1/sha1hl.c     _DIAGASSERT(ctx != NULL);
NULL               50 ext/digest/sha1/sha1hl.c     if (p == NULL && (p = malloc(41)) == NULL)
NULL               71 ext/digest/sha1/sha1hl.c     _DIAGASSERT(filename != NULL);
NULL               96 ext/digest/sha1/sha1hl.c     _DIAGASSERT(data != NULL);
NULL               20 ext/digest/sha1/sha1ossl.c     _DIAGASSERT(ctx != NULL);
NULL               23 ext/digest/sha1/sha1ossl.c     if (p == NULL && (p = malloc(41)) == NULL)
NULL              479 ext/digest/sha2/sha2.c 	assert(context != NULL && data != NULL);
NULL              523 ext/digest/sha2/sha2.c 	assert(context != NULL);
NULL              775 ext/digest/sha2/sha2.c 	assert(context != NULL && data != NULL);
NULL              859 ext/digest/sha2/sha2.c 	assert(context != NULL);
NULL              908 ext/digest/sha2/sha2.c 	assert(context != NULL);
NULL               80 ext/digest/sha2/sha2hl.c 	_DIAGASSERT(filename != NULL);
NULL              106 ext/digest/sha2/sha2hl.c 	assert(ctx != NULL);
NULL              108 ext/digest/sha2/sha2hl.c 	if ((ret = buffer) != NULL) {
NULL              141 ext/digest/sha2/sha2hl.c 	_DIAGASSERT(filename != NULL);
NULL              166 ext/digest/sha2/sha2hl.c 	assert(ctx != NULL);
NULL              168 ext/digest/sha2/sha2hl.c 	if ((ret = buffer) != NULL) {
NULL              201 ext/digest/sha2/sha2hl.c 	_DIAGASSERT(filename != NULL);
NULL              226 ext/digest/sha2/sha2hl.c 	assert(ctx != NULL);
NULL              228 ext/digest/sha2/sha2hl.c 	if ((ret = buffer) != NULL) {
NULL               64 ext/dl/cfunc.c     data->name = name ? strdup(name) : NULL;
NULL               86 ext/dl/cfunc.c     func = NULL;
NULL              121 ext/dl/cfunc.c     sname = NIL_P(name) ? NULL : StringValuePtr(name);
NULL               84 ext/dl/cptr.c      ptr = NULL;
NULL              113 ext/dl/cptr.c    void *p = NULL;
NULL              114 ext/dl/cptr.c    freefunc_t f = NULL;
NULL              128 ext/dl/cptr.c      f = NIL_P(sym) ? NULL : RCFUNC_DATA(sym)->ptr;
NULL              158 ext/dl/cptr.c      f = NULL;
NULL              429 ext/dl/cptr.c  	return rb_dlptr_new(fp, 0, NULL);
NULL              433 ext/dl/cptr.c          return rb_dlptr_new(ptr, RSTRING(val)->len, NULL);
NULL              445 ext/dl/cptr.c  	return rb_dlptr_new(NUM2PTR(rb_Integer(val)), 0, NULL);
NULL               55 ext/dl/handle.c     clib = NULL;
NULL               59 ext/dl/handle.c     clib = NIL_P(lib) ? NULL : StringValuePtr(lib);
NULL               63 ext/dl/handle.c     clib = NIL_P(lib) ? NULL : StringValuePtr(lib);
NULL              147 ext/dl/handle.c 	name = NULL;
NULL              549 ext/etc/etc.c  				NULL);
NULL              557 ext/etc/etc.c  			      "gid", "mem", NULL);
NULL              179 ext/iconv/iconv.c 		       Qnil, rb_ary_new3(2, to, from), NULL, s);
NULL              364 ext/iconv/iconv.c 	inptr = NULL;
NULL              561 ext/iconv/iconv.c     DATA_PTR(self) = NULL;
NULL              584 ext/iconv/iconv.c     self = Data_Wrap_Struct(self, NULL, ICONV_FREE, (void *)cd);
NULL              642 ext/iconv/iconv.c     arg.cd = iconv_create(argv[0], argv[1], NULL);
NULL              663 ext/iconv/iconv.c     arg.cd = iconv_create(to, from, NULL);
NULL              745 ext/iconv/iconv.c     return iconv_convert(VALUE2ICONV(cd), Qnil, 0, 0, NULL);
NULL              754 ext/iconv/iconv.c     DATA_PTR(self) = NULL;
NULL              798 ext/iconv/iconv.c 			 NULL);
NULL              815 ext/iconv/iconv.c     str = iconv_convert(cd, Qnil, 0, 0, NULL);
NULL              818 ext/iconv/iconv.c 	    s = iconv_convert(cd, *argv++, 0, -1, NULL);
NULL              824 ext/iconv/iconv.c 	s = iconv_convert(cd, Qnil, 0, 0, NULL);
NULL               84 ext/io/wait/wait.c     return (VALUE)rb_thread_select(rb_fd_max(fds), rb_fd_ptr(fds), NULL, NULL, arg->timeout);
NULL              128 ext/io/wait/wait.c     i = rb_thread_select(fd + 1, rb_fd_ptr(&arg.fds), NULL, NULL, arg.timeout);
NULL              380 ext/nkf/nkf-utf8/nkf.c STATIC int (*mime_iconv_back)PROTO((int c2,int c1,int c0)) = NULL;
NULL              699 ext/nkf/nkf-utf8/nkf.c     char *outfname = NULL;
NULL              742 ext/nkf/nkf-utf8/nkf.c     if (freopen("","wb",stdout) == NULL)
NULL              749 ext/nkf/nkf-utf8/nkf.c       setbuf(stdout, (char *) NULL);
NULL              756 ext/nkf/nkf-utf8/nkf.c       if (freopen("","rb",stdin) == NULL) return (-1);
NULL              765 ext/nkf/nkf-utf8/nkf.c           if (guess_f) print_guessed_code(NULL);
NULL              776 ext/nkf/nkf-utf8/nkf.c           if ((fin = fopen((origfname = *argv++), "r")) == NULL) {
NULL              832 ext/nkf/nkf-utf8/nkf.c 		  if(freopen(outfname, "w", stdout) == NULL) {
NULL              838 ext/nkf/nkf-utf8/nkf.c                       if (freopen("","wb",stdout) == NULL)
NULL              847 ext/nkf/nkf-utf8/nkf.c                  if (freopen("","rb",fin) == NULL)
NULL              856 ext/nkf/nkf-utf8/nkf.c                   char *filename = NULL;
NULL             1002 ext/nkf/nkf-utf8/nkf.c     unsigned char *p = NULL;
NULL             3576 ext/nkf/nkf-utf8/nkf.c     NULL
NULL             3642 ext/nkf/nkf-utf8/nkf.c     mime_iconv_back = NULL;
NULL             3821 ext/nkf/nkf-utf8/nkf.c     if (filename != NULL) printf("%s:", filename);
NULL             3973 ext/nkf/nkf-utf8/nkf.c     const int *array = NULL;
NULL             4057 ext/nkf/nkf-utf8/nkf.c 	    if (lwsp_buf==NULL) {
NULL             4094 ext/nkf/nkf-utf8/nkf.c 			if (lwsp_buf_new==NULL) {
NULL             4096 ext/nkf/nkf-utf8/nkf.c 			    lwsp_buf = NULL;
NULL             4117 ext/nkf/nkf-utf8/nkf.c 	    lwsp_buf = NULL;
NULL             4173 ext/nkf/nkf-utf8/nkf.c 	if (lwsp_buf==NULL) {
NULL             4213 ext/nkf/nkf-utf8/nkf.c 		    if (lwsp_buf_new==NULL) {
NULL             4215 ext/nkf/nkf-utf8/nkf.c 			lwsp_buf = NULL;
NULL             4236 ext/nkf/nkf-utf8/nkf.c 	lwsp_buf = NULL;
NULL              111 ext/nkf/nkf.c    kanji_convert(NULL);
NULL              239 ext/nkf/nkf.c    kanji_convert( NULL );
NULL               54 ext/openssl/openssl_missing.c     if (!ctx) return NULL;
NULL              138 ext/openssl/openssl_missing.c     if (x == NULL || x->crl == NULL) return 0;
NULL              139 ext/openssl/openssl_missing.c     if (x->crl->version == NULL) {
NULL              141 ext/openssl/openssl_missing.c 	if (x->crl->version == NULL) return 0;
NULL              151 ext/openssl/openssl_missing.c     if (x == NULL || x->crl == NULL) return 0;
NULL              296 ext/openssl/openssl_missing.c     if (!file) return NULL;
NULL              323 ext/openssl/openssl_missing.c     if (prompt == NULL) prompt = "Enter PEM pass phrase:";
NULL               31 ext/openssl/openssl_missing.h 		bp,(char *)x, NULL, NULL, 0, NULL, NULL)
NULL               60 ext/openssl/ossl.c     if (!sk) ossl_raise(eOSSLError, NULL);
NULL              296 ext/openssl/ossl.c 	    msg = ERR_error_string(e, NULL);
NULL              304 ext/openssl/ossl.c 	    rb_warn("error on stack: %s", ERR_error_string(e, NULL));
NULL              321 ext/openssl/ossl.c         rb_ary_push(ary, rb_str_new2(ERR_error_string(e, NULL)));
NULL              103 ext/openssl/ossl_asn1.c     if (!(bn = ASN1_INTEGER_to_BN(ai, NULL))) {
NULL              104 ext/openssl/ossl_asn1.c 	ossl_raise(eOSSLError, NULL);
NULL              109 ext/openssl/ossl_asn1.c 	ossl_raise(eOSSLError, NULL);
NULL              125 ext/openssl/ossl_asn1.c     BIGNUM *bn = NULL;
NULL              132 ext/openssl/ossl_asn1.c 	    ossl_raise(eOSSLError, NULL);
NULL              137 ext/openssl/ossl_asn1.c 	ossl_raise(eOSSLError, NULL);
NULL              149 ext/openssl/ossl_asn1.c 	ossl_raise(eOSSLError, NULL);
NULL              205 ext/openssl/ossl_asn1.c     return num_to_asn1integer(obj, NULL);
NULL              216 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
NULL              231 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
NULL              245 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
NULL              270 ext/openssl/ossl_asn1.c     if(!(t = ASN1_UTCTIME_set(NULL, sec)))
NULL              271 ext/openssl/ossl_asn1.c         ossl_raise(eASN1Error, NULL);
NULL              283 ext/openssl/ossl_asn1.c     if(!(t =ASN1_GENERALIZEDTIME_set(NULL, sec)))
NULL              284 ext/openssl/ossl_asn1.c         ossl_raise(eASN1Error, NULL);
NULL              297 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
NULL              313 ext/openssl/ossl_asn1.c     if((bool = d2i_ASN1_BOOLEAN(NULL, &p, length)) < 0)
NULL              314 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
NULL              328 ext/openssl/ossl_asn1.c     if(!(ai = d2i_ASN1_INTEGER(NULL, &p, length)))
NULL              329 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
NULL              347 ext/openssl/ossl_asn1.c     if(!(bstr = d2i_ASN1_BIT_STRING(NULL, &p, length)))
NULL              348 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
NULL              352 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
NULL              373 ext/openssl/ossl_asn1.c     if(!(ai = d2i_ASN1_ENUMERATED(NULL, &p, length)))
NULL              374 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
NULL              390 ext/openssl/ossl_asn1.c     if(!(null = d2i_ASN1_NULL(NULL, &p, length)))
NULL              391 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
NULL              407 ext/openssl/ossl_asn1.c     if(!(obj = d2i_ASN1_OBJECT(NULL, &p, length)))
NULL              408 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
NULL              416 ext/openssl/ossl_asn1.c 	    ossl_raise(eASN1Error, NULL);
NULL              435 ext/openssl/ossl_asn1.c     if(!(time = d2i_ASN1_TIME(NULL, &p, length)))
NULL              436 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
NULL              453 ext/openssl/ossl_asn1.c     { "EOC",               NULL,                  },  /*  0 */
NULL              460 ext/openssl/ossl_asn1.c     { "OBJECT_DESCRIPTOR", NULL,                  },  /*  7 */
NULL              461 ext/openssl/ossl_asn1.c     { "EXTERNAL",          NULL,                  },  /*  8 */
NULL              462 ext/openssl/ossl_asn1.c     { "REAL",              NULL,                  },  /*  9 */
NULL              464 ext/openssl/ossl_asn1.c     { "EMBEDDED_PDV",      NULL,                  },  /* 11 */
NULL              466 ext/openssl/ossl_asn1.c     { "RELATIVE_OID",      NULL,                  },  /* 13 */
NULL              467 ext/openssl/ossl_asn1.c     { "[UNIVERSAL 14]",    NULL,                  },  /* 14 */
NULL              468 ext/openssl/ossl_asn1.c     { "[UNIVERSAL 15]",    NULL,                  },  /* 15 */
NULL              482 ext/openssl/ossl_asn1.c     { "CHARACTER_STRING",  NULL,                  },  /* 29 */
NULL              504 ext/openssl/ossl_asn1.c 	free_func = NULL;
NULL              703 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
NULL              728 ext/openssl/ossl_asn1.c 	if(j & 0x80) ossl_raise(eASN1Error, NULL);
NULL              937 ext/openssl/ossl_asn1.c     length = ASN1_object_size(1, ossl_i2d_ASN1_TYPE(asn1, NULL), tn);
NULL              946 ext/openssl/ossl_asn1.c 	    ASN1_put_object(&p, 1, ossl_i2d_ASN1_TYPE(asn1, NULL), tn, tc);
NULL             1011 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
NULL               37 ext/openssl/ossl_bio.c 	    ossl_raise(eOSSLError, NULL);
NULL               43 ext/openssl/ossl_bio.c 	if (!bio) ossl_raise(eOSSLError, NULL);
NULL               52 ext/openssl/ossl_bio.c      BIO *ret = NULL;
NULL               50 ext/openssl/ossl_bn.c 	ossl_raise(eBNError, NULL);
NULL               60 ext/openssl/ossl_bn.c     BIGNUM *bn = NULL;
NULL               69 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);
NULL               96 ext/openssl/ossl_bn.c 	ossl_raise(eBNError, NULL);
NULL              120 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);
NULL              128 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);
NULL              133 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);
NULL              138 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);
NULL              143 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);
NULL              166 ext/openssl/ossl_bn.c 	len = BN_bn2mpi(bn, NULL);
NULL              169 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);
NULL              175 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);
NULL              178 ext/openssl/ossl_bn.c 	if (!(buf = BN_bn2dec(bn))) ossl_raise(eBNError, NULL);
NULL              182 ext/openssl/ossl_bn.c 	if (!(buf = BN_bn2hex(bn))) ossl_raise(eBNError, NULL);
NULL              202 ext/openssl/ossl_bn.c 	ossl_raise(eBNError, NULL);
NULL              221 ext/openssl/ossl_bn.c 	self = ossl_bn_to_s(0, NULL, self);
NULL              258 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);			\
NULL              262 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);			\
NULL              277 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);			\
NULL              281 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);			\
NULL              297 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);				\
NULL              301 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);				\
NULL              322 ext/openssl/ossl_bn.c 	ossl_raise(eBNError, NULL);
NULL              326 ext/openssl/ossl_bn.c 	ossl_raise(eBNError, NULL);
NULL              331 ext/openssl/ossl_bn.c 	ossl_raise(eBNError, NULL);
NULL              348 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);				\
NULL              352 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);				\
NULL              369 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);			\
NULL              401 ext/openssl/ossl_bn.c 		ossl_raise(eBNError, NULL);		\
NULL              405 ext/openssl/ossl_bn.c 		ossl_raise(eBNError, NULL);		\
NULL              430 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);				\
NULL              434 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);				\
NULL              449 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);				\
NULL              453 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);				\
NULL              464 ext/openssl/ossl_bn.c     BIGNUM *add = NULL, *rem = NULL, *result;
NULL              484 ext/openssl/ossl_bn.c 	ossl_raise(eBNError, NULL);
NULL              486 ext/openssl/ossl_bn.c     if (!BN_generate_prime(result, num, safe, add, rem, NULL, NULL)) {
NULL              488 ext/openssl/ossl_bn.c 	ossl_raise(eBNError, NULL);
NULL              519 ext/openssl/ossl_bn.c 	ossl_raise(eBNError, NULL);
NULL              555 ext/openssl/ossl_bn.c     switch (BN_is_prime(bn, checks, NULL, ossl_bn_ctx, NULL)) {
NULL              561 ext/openssl/ossl_bn.c 	ossl_raise(eBNError, NULL);
NULL              584 ext/openssl/ossl_bn.c     switch (BN_is_prime_fasttest(bn, checks, NULL, ossl_bn_ctx, NULL, do_trial_division)) {
NULL              590 ext/openssl/ossl_bn.c 	ossl_raise(eBNError, NULL);
NULL               57 ext/openssl/ossl_cipher.c     if (EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL, -1) != 1)
NULL               58 ext/openssl/ossl_cipher.c 	ossl_raise(eCipherError, NULL);
NULL               99 ext/openssl/ossl_cipher.c     if (EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL, -1) != 1)
NULL              100 ext/openssl/ossl_cipher.c 	ossl_raise(eCipherError, NULL);
NULL              115 ext/openssl/ossl_cipher.c 	ossl_raise(eCipherError, NULL);
NULL              126 ext/openssl/ossl_cipher.c     if (EVP_CipherInit_ex(ctx, NULL, NULL, NULL, NULL, -1) != 1)
NULL              127 ext/openssl/ossl_cipher.c 	ossl_raise(eCipherError, NULL);
NULL              136 ext/openssl/ossl_cipher.c     unsigned char key[EVP_MAX_KEY_LENGTH], *p_key = NULL;
NULL              137 ext/openssl/ossl_cipher.c     unsigned char iv[EVP_MAX_IV_LENGTH], *p_iv = NULL;
NULL              161 ext/openssl/ossl_cipher.c 		       RSTRING(pass)->ptr, RSTRING(pass)->len, 1, key, NULL);
NULL              168 ext/openssl/ossl_cipher.c     if (EVP_CipherInit_ex(ctx, NULL, NULL, p_key, p_iv, mode) != 1) {
NULL              169 ext/openssl/ossl_cipher.c 	ossl_raise(eCipherError, NULL);
NULL              193 ext/openssl/ossl_cipher.c     unsigned char key[EVP_MAX_KEY_LENGTH], iv[EVP_MAX_IV_LENGTH], *salt = NULL;
NULL              209 ext/openssl/ossl_cipher.c     if (EVP_CipherInit_ex(ctx, NULL, NULL, key, iv, -1) != 1)
NULL              210 ext/openssl/ossl_cipher.c 	ossl_raise(eCipherError, NULL);
NULL              232 ext/openssl/ossl_cipher.c 	ossl_raise(eCipherError, NULL);
NULL              250 ext/openssl/ossl_cipher.c 	ossl_raise(eCipherError, NULL);
NULL              279 ext/openssl/ossl_cipher.c     if (EVP_CipherInit_ex(ctx, NULL, NULL, RSTRING(key)->ptr, NULL, -1) != 1)
NULL              280 ext/openssl/ossl_cipher.c         ossl_raise(eCipherError, NULL);
NULL              296 ext/openssl/ossl_cipher.c     if (EVP_CipherInit_ex(ctx, NULL, NULL, NULL, RSTRING(iv)->ptr, -1) != 1)
NULL              297 ext/openssl/ossl_cipher.c 	ossl_raise(eCipherError, NULL);
NULL              310 ext/openssl/ossl_cipher.c         ossl_raise(eCipherError, NULL);
NULL              324 ext/openssl/ossl_cipher.c 	ossl_raise(eCipherError, NULL);
NULL               60 ext/openssl/ossl_config.c     return parse_config(str, NULL);
NULL               74 ext/openssl/ossl_config.c     conf = dst ? dst : NCONF_new(NULL);
NULL               77 ext/openssl/ossl_config.c 	ossl_raise(eConfigError, NULL);
NULL               84 ext/openssl/ossl_config.c 	ossl_raise(eConfigError, NULL);
NULL               97 ext/openssl/ossl_config.c     conf = parse_config(str, NULL);
NULL              109 ext/openssl/ossl_config.c     if(!(conf = NCONF_new(NULL)))
NULL              110 ext/openssl/ossl_config.c 	ossl_raise(eConfigError, NULL);
NULL              176 ext/openssl/ossl_config.c 	    ossl_raise(eConfigError, NULL);
NULL              180 ext/openssl/ossl_config.c 	ossl_raise(eConfigError, NULL);
NULL              390 ext/openssl/ossl_config.c     lh_doall_arg(conf->data, LHASH_DOALL_ARG_FN(each_conf_value), (void*)NULL);
NULL               55 ext/openssl/ossl_digest.c     EVP_DigestInit_ex(ctx, md, NULL);
NULL               70 ext/openssl/ossl_digest.c     if (ctx == NULL)
NULL               98 ext/openssl/ossl_digest.c     EVP_DigestInit_ex(ctx, md, NULL);
NULL              116 ext/openssl/ossl_digest.c 	ossl_raise(eDigestError, NULL);
NULL              127 ext/openssl/ossl_digest.c     EVP_DigestInit_ex(ctx, EVP_MD_CTX_md(ctx), NULL);
NULL              150 ext/openssl/ossl_digest.c 	ossl_raise(eDigestError, NULL);
NULL              185 ext/openssl/ossl_digest.c     if (string2hex(buf, buf_len, &hexbuf, NULL) != 2 * buf_len) {
NULL              116 ext/openssl/ossl_engine.c 	ossl_raise(eEngineError, NULL);
NULL              120 ext/openssl/ossl_engine.c 	ossl_raise(eEngineError, NULL);
NULL              122 ext/openssl/ossl_engine.c 		0, NULL, (void(*)())ossl_pem_passwd_cb);
NULL              135 ext/openssl/ossl_engine.c        ossl_raise(eEngineError, NULL);
NULL              164 ext/openssl/ossl_engine.c     if(!ENGINE_finish(e)) ossl_raise(eEngineError, NULL);
NULL              184 ext/openssl/ossl_engine.c     if(!ciph) ossl_raise(eEngineError, NULL);
NULL              207 ext/openssl/ossl_engine.c     if(!md) ossl_raise(eEngineError, NULL);
NULL              224 ext/openssl/ossl_engine.c     sid = NIL_P(id) ? NULL : StringValuePtr(id);
NULL              225 ext/openssl/ossl_engine.c     sdata = NIL_P(data) ? NULL : StringValuePtr(data);
NULL              230 ext/openssl/ossl_engine.c     pkey = ENGINE_load_private_key(e, sid, NULL, sdata);
NULL              232 ext/openssl/ossl_engine.c     if (!pkey) ossl_raise(eEngineError, NULL);
NULL              248 ext/openssl/ossl_engine.c     sid = NIL_P(id) ? NULL : StringValuePtr(id);
NULL              249 ext/openssl/ossl_engine.c     sdata = NIL_P(data) ? NULL : StringValuePtr(data);
NULL              254 ext/openssl/ossl_engine.c     pkey = ENGINE_load_public_key(e, sid, NULL, sdata);
NULL              256 ext/openssl/ossl_engine.c     if (!pkey) ossl_raise(eEngineError, NULL);
NULL              285 ext/openssl/ossl_engine.c 				 NIL_P(val) ? NULL : RSTRING(val)->ptr, 0);
NULL              286 ext/openssl/ossl_engine.c     if (!ret) ossl_raise(eEngineError, NULL);
NULL              312 ext/openssl/ossl_engine.c     if ((defn = ENGINE_get_cmd_defns(e)) != NULL){
NULL               68 ext/openssl/ossl_hmac.c 		 GetDigestPtr(digest), NULL);
NULL               85 ext/openssl/ossl_hmac.c 	ossl_raise(eHMACError, NULL);
NULL              108 ext/openssl/ossl_hmac.c 	ossl_raise(eHMACError, NULL);
NULL              144 ext/openssl/ossl_hmac.c     if (string2hex(buf, buf_len, &hexbuf, NULL) != 2 * buf_len) {
NULL              163 ext/openssl/ossl_hmac.c 	       RSTRING(data)->ptr, RSTRING(data)->len, NULL, &buf_len);
NULL              179 ext/openssl/ossl_hmac.c 	       RSTRING(data)->ptr, RSTRING(data)->len, NULL, &buf_len);
NULL              180 ext/openssl/ossl_hmac.c     if (string2hex(buf, buf_len, &hexbuf, NULL) != 2 * buf_len) {
NULL               47 ext/openssl/ossl_ns_spki.c 	ossl_raise(eSPKIError, NULL);
NULL               67 ext/openssl/ossl_ns_spki.c 	if (!(spki = d2i_NETSCAPE_SPKI(NULL, &p, RSTRING(buffer)->len))) {
NULL               68 ext/openssl/ossl_ns_spki.c 	    ossl_raise(eSPKIError, NULL);
NULL               86 ext/openssl/ossl_ns_spki.c     if ((len = i2d_NETSCAPE_SPKI(spki, NULL)) <= 0)
NULL               87 ext/openssl/ossl_ns_spki.c         ossl_raise(eX509CertError, NULL);
NULL               91 ext/openssl/ossl_ns_spki.c         ossl_raise(eX509CertError, NULL);
NULL              106 ext/openssl/ossl_ns_spki.c 	ossl_raise(eSPKIError, NULL);
NULL              123 ext/openssl/ossl_ns_spki.c 	ossl_raise(eSPKIError, NULL);
NULL              127 ext/openssl/ossl_ns_spki.c 	ossl_raise(eSPKIError, NULL);
NULL              144 ext/openssl/ossl_ns_spki.c 	ossl_raise(eSPKIError, NULL);
NULL              157 ext/openssl/ossl_ns_spki.c 	ossl_raise(eSPKIError, NULL);
NULL              171 ext/openssl/ossl_ns_spki.c 	return rb_str_new2(NULL);
NULL              187 ext/openssl/ossl_ns_spki.c 	ossl_raise(eSPKIError, NULL);
NULL              204 ext/openssl/ossl_ns_spki.c 	ossl_raise(eSPKIError, NULL);
NULL              225 ext/openssl/ossl_ns_spki.c 	ossl_raise(eSPKIError, NULL);
NULL               96 ext/openssl/ossl_ocsp.c 	ossl_raise(eOCSPError, NULL);
NULL              132 ext/openssl/ossl_ocsp.c 	ret = OCSP_request_add1_nonce(req, NULL, -1);
NULL              139 ext/openssl/ossl_ocsp.c     if(!ret) ossl_raise(eOCSPError, NULL);
NULL              179 ext/openssl/ossl_ocsp.c 	ossl_raise(eOCSPError, NULL);
NULL              199 ext/openssl/ossl_ocsp.c 	    ossl_raise(eOCSPError, NULL);
NULL              230 ext/openssl/ossl_ocsp.c     if(!ret) ossl_raise(eOCSPError, NULL);
NULL              251 ext/openssl/ossl_ocsp.c     if(!result) rb_warn("%s", ERR_error_string(ERR_peek_error(), NULL));
NULL              265 ext/openssl/ossl_ocsp.c     if((len = i2d_OCSP_REQUEST(req, NULL)) <= 0)
NULL              266 ext/openssl/ossl_ocsp.c 	ossl_raise(eOCSPError, NULL);
NULL              270 ext/openssl/ossl_ocsp.c 	ossl_raise(eOCSPError, NULL);
NULL              287 ext/openssl/ossl_ocsp.c     if(NIL_P(basic_resp)) bs = NULL;
NULL              290 ext/openssl/ossl_ocsp.c 	ossl_raise(eOCSPError, NULL);
NULL              303 ext/openssl/ossl_ocsp.c 	ossl_raise(eOCSPError, NULL);
NULL              377 ext/openssl/ossl_ocsp.c     if((len = i2d_OCSP_RESPONSE(res, NULL)) <= 0)
NULL              378 ext/openssl/ossl_ocsp.c 	ossl_raise(eOCSPError, NULL);
NULL              381 ext/openssl/ossl_ocsp.c     if(i2d_OCSP_RESPONSE(res, NULL) <= 0)
NULL              382 ext/openssl/ossl_ocsp.c 	ossl_raise(eOCSPError, NULL);
NULL              398 ext/openssl/ossl_ocsp.c 	ossl_raise(eOCSPError, NULL);
NULL              434 ext/openssl/ossl_ocsp.c 	ret = OCSP_basic_add1_nonce(bs, NULL, -1);
NULL              441 ext/openssl/ossl_ocsp.c     if(!ret) ossl_raise(eOCSPError, NULL);
NULL              469 ext/openssl/ossl_ocsp.c     ths = nxt = rev = NULL;
NULL              473 ext/openssl/ossl_ocsp.c 	rev = X509_gmtime_adj(NULL, NUM2INT(tmp));
NULL              477 ext/openssl/ossl_ocsp.c     ths = X509_gmtime_adj(NULL, NUM2INT(tmp));
NULL              480 ext/openssl/ossl_ocsp.c     nxt = X509_gmtime_adj(NULL, NUM2INT(tmp));
NULL              492 ext/openssl/ossl_ocsp.c 	single->singleExtensions = NULL;
NULL              508 ext/openssl/ossl_ocsp.c     if(error) ossl_raise(eOCSPError, NULL);
NULL              533 ext/openssl/ossl_ocsp.c 	revtime = thisupd = nextupd = NULL;
NULL              538 ext/openssl/ossl_ocsp.c 	    ossl_raise(eOCSPError, NULL);
NULL              584 ext/openssl/ossl_ocsp.c     if(!ret) ossl_raise(eOCSPError, NULL);
NULL              605 ext/openssl/ossl_ocsp.c     if(!result) rb_warn("%s", ERR_error_string(ERR_peek_error(), NULL));
NULL              620 ext/openssl/ossl_ocsp.c 	ossl_raise(eOCSPError, NULL);
NULL              634 ext/openssl/ossl_ocsp.c     if(!(newid = OCSP_cert_to_id(NULL, x509s, x509i)))
NULL              635 ext/openssl/ossl_ocsp.c 	ossl_raise(eOCSPError, NULL);
NULL               46 ext/openssl/ossl_pkcs12.c     if(!(p12 = PKCS12_new())) ossl_raise(ePKCS12Error, NULL);
NULL               64 ext/openssl/ossl_pkcs12.c     passphrase = NIL_P(pass) ? NULL : StringValuePtr(pass);
NULL               65 ext/openssl/ossl_pkcs12.c     friendlyname = NIL_P(name) ? NULL : StringValuePtr(name);
NULL               68 ext/openssl/ossl_pkcs12.c     x509s = NIL_P(ca) ? NULL : ossl_x509_ary2sk(ca);
NULL               72 ext/openssl/ossl_pkcs12.c     if(!p12) ossl_raise(ePKCS12Error, NULL);
NULL               86 ext/openssl/ossl_pkcs12.c     STACK_OF(X509) *x509s = NULL;
NULL               90 ext/openssl/ossl_pkcs12.c     passphrase = NIL_P(pass) ? NULL : StringValuePtr(pass);
NULL               97 ext/openssl/ossl_pkcs12.c 	ossl_raise(ePKCS12Error, NULL);
NULL              129 ext/openssl/ossl_pkcs12.c     if((len = i2d_PKCS12(p12, NULL)) <= 0)
NULL              130 ext/openssl/ossl_pkcs12.c 	ossl_raise(ePKCS12Error, NULL);
NULL              134 ext/openssl/ossl_pkcs12.c 	ossl_raise(ePKCS12Error, NULL);
NULL               91 ext/openssl/ossl_pkcs7.c     if (!pkcs7) ossl_raise(ePKCS7Error, NULL);
NULL              104 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
NULL              117 ext/openssl/ossl_pkcs7.c     if (!pkcs7) ossl_raise(ePKCS7Error, NULL);
NULL              130 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
NULL              147 ext/openssl/ossl_pkcs7.c     out = NULL;
NULL              150 ext/openssl/ossl_pkcs7.c     if(!pkcs7) ossl_raise(ePKCS7Error, NULL);
NULL              174 ext/openssl/ossl_pkcs7.c     in = NIL_P(data) ? NULL : ossl_obj2bio(data);
NULL              177 ext/openssl/ossl_pkcs7.c         ossl_raise(ePKCS7Error, NULL);
NULL              182 ext/openssl/ossl_pkcs7.c         ossl_raise(ePKCS7Error, NULL);
NULL              207 ext/openssl/ossl_pkcs7.c     if(NIL_P(certs)) x509s = NULL;
NULL              218 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
NULL              266 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
NULL              283 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
NULL              301 ext/openssl/ossl_pkcs7.c     p7 = PEM_read_bio_PKCS7(in, (PKCS7 **)&DATA_PTR(self), NULL, NULL);
NULL              326 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
NULL              350 ext/openssl/ossl_pkcs7.c         { NULL,                 0 },
NULL              356 ext/openssl/ossl_pkcs7.c 	if(p7_type_tab[i].name == NULL)
NULL              374 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
NULL              407 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
NULL              435 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
NULL              517 ext/openssl/ossl_pkcs7.c     else sk = NULL;
NULL              540 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
NULL              566 ext/openssl/ossl_pkcs7.c         certs = crls = NULL;
NULL              606 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
NULL              652 ext/openssl/ossl_pkcs7.c     in = NIL_P(indata) ? NULL : ossl_obj2bio(indata);
NULL              653 ext/openssl/ossl_pkcs7.c     if(NIL_P(certs)) x509s = NULL;
NULL              666 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
NULL              696 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
NULL              699 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
NULL              718 ext/openssl/ossl_pkcs7.c 	    ossl_raise(ePKCS7Error, NULL);
NULL              720 ext/openssl/ossl_pkcs7.c     if(!(out = PKCS7_dataInit(pkcs7, NULL))) goto err;
NULL              734 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
NULL              749 ext/openssl/ossl_pkcs7.c     if((len = i2d_PKCS7(pkcs7, NULL)) <= 0)
NULL              750 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
NULL              754 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
NULL              769 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
NULL              773 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
NULL              790 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
NULL              810 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
NULL              845 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
NULL              869 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
NULL              885 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
NULL               75 ext/openssl/ossl_pkey.c     pkey = PEM_read_PrivateKey(fp, NULL, ossl_pem_passwd_cb, NULL);
NULL               78 ext/openssl/ossl_pkey.c 	ossl_raise(ePKeyError, NULL);
NULL               99 ext/openssl/ossl_pkey.c     if (rb_funcall(obj, id_private_q, 0, NULL) != Qtrue) {
NULL              123 ext/openssl/ossl_pkey.c     if (rb_funcall(obj, id_private_q, 0, NULL) != Qtrue) {
NULL              142 ext/openssl/ossl_pkey.c 	ossl_raise(ePKeyError, NULL);
NULL              166 ext/openssl/ossl_pkey.c     if (rb_funcall(self, id_private_q, 0, NULL) != Qtrue) {
NULL              175 ext/openssl/ossl_pkey.c 	ossl_raise(ePKeyError, NULL);
NULL              200 ext/openssl/ossl_pkey.c 	ossl_raise(ePKeyError, NULL);
NULL               88 ext/openssl/ossl_pkey.h 	if (bn == NULL)							\
NULL              100 ext/openssl/ossl_pkey.h 		pkey->pkey.keytype->name = NULL;			\
NULL              105 ext/openssl/ossl_pkey.h 	if (pkey->pkey.keytype->name == NULL)				\
NULL              107 ext/openssl/ossl_pkey.h 	if (pkey->pkey.keytype->name == NULL)				\
NULL              108 ext/openssl/ossl_pkey.h 		ossl_raise(eBNError, NULL);				\
NULL              109 ext/openssl/ossl_pkey.h 	if (BN_copy(pkey->pkey.keytype->name, bn) == NULL)		\
NULL              110 ext/openssl/ossl_pkey.h 		ossl_raise(eBNError, NULL);				\
NULL               75 ext/openssl/ossl_pkey_dh.c 	ossl_raise(eDHError, NULL);
NULL               90 ext/openssl/ossl_pkey_dh.c 	    rb_block_given_p() ? ossl_generate_cb : NULL,
NULL               91 ext/openssl/ossl_pkey_dh.c 	    NULL);
NULL              116 ext/openssl/ossl_pkey_dh.c 	ossl_raise(eDHError, NULL);
NULL              140 ext/openssl/ossl_pkey_dh.c 	    ossl_raise(eDHError, NULL);
NULL              146 ext/openssl/ossl_pkey_dh.c 	dh = PEM_read_bio_DHparams(in, NULL, NULL, NULL);
NULL              149 ext/openssl/ossl_pkey_dh.c 	    dh = d2i_DHparams_bio(in, NULL);
NULL              152 ext/openssl/ossl_pkey_dh.c 	if (!dh) ossl_raise(eDHError, NULL);
NULL              156 ext/openssl/ossl_pkey_dh.c 	ossl_raise(eDHError, NULL);
NULL              193 ext/openssl/ossl_pkey_dh.c 	ossl_raise(eDHError, NULL);
NULL              197 ext/openssl/ossl_pkey_dh.c 	ossl_raise(eDHError, NULL);
NULL              213 ext/openssl/ossl_pkey_dh.c     if((len = i2d_DHparams(pkey->pkey.dh, NULL)) <= 0)
NULL              214 ext/openssl/ossl_pkey_dh.c 	ossl_raise(eDHError, NULL);
NULL              218 ext/openssl/ossl_pkey_dh.c 	ossl_raise(eDHError, NULL);
NULL              261 ext/openssl/ossl_pkey_dh.c 	ossl_raise(eDHError, NULL);
NULL              265 ext/openssl/ossl_pkey_dh.c 	ossl_raise(eDHError, NULL);
NULL              287 ext/openssl/ossl_pkey_dh.c 	ossl_raise(eDHError, NULL);
NULL              339 ext/openssl/ossl_pkey_dh.c 	ossl_raise(eDHError, NULL);
NULL              369 ext/openssl/ossl_pkey_dh.c DH *OSSL_DEFAULT_DH_512 = NULL;
NULL              397 ext/openssl/ossl_pkey_dh.c DH *OSSL_DEFAULT_DH_1024 = NULL;
NULL              404 ext/openssl/ossl_pkey_dh.c     if ((dh = DH_new()) == NULL) ossl_raise(eDHError, NULL);
NULL              405 ext/openssl/ossl_pkey_dh.c     dh->p = BN_bin2bn(p, plen, NULL);
NULL              406 ext/openssl/ossl_pkey_dh.c     dh->g = BN_bin2bn(g, glen, NULL);
NULL              407 ext/openssl/ossl_pkey_dh.c     if (dh->p == NULL || dh->g == NULL){
NULL              409 ext/openssl/ossl_pkey_dh.c 	ossl_raise(eDHError, NULL);
NULL               69 ext/openssl/ossl_pkey_dsa.c 	ossl_raise(eDSAError, NULL);
NULL               90 ext/openssl/ossl_pkey_dsa.c 	    rb_block_given_p() ? ossl_generate_cb : NULL,
NULL               91 ext/openssl/ossl_pkey_dsa.c 	    NULL);
NULL              110 ext/openssl/ossl_pkey_dsa.c 	ossl_raise(eDSAError, NULL);
NULL              122 ext/openssl/ossl_pkey_dsa.c     char *passwd = NULL;
NULL              131 ext/openssl/ossl_pkey_dsa.c 	    ossl_raise(eDSAError, NULL);
NULL              138 ext/openssl/ossl_pkey_dsa.c 	dsa = PEM_read_bio_DSAPrivateKey(in, NULL, ossl_pem_passwd_cb, passwd);
NULL              141 ext/openssl/ossl_pkey_dsa.c 	    dsa = PEM_read_bio_DSAPublicKey(in, NULL, NULL, NULL);
NULL              145 ext/openssl/ossl_pkey_dsa.c 	    dsa = PEM_read_bio_DSA_PUBKEY(in, NULL, NULL, NULL);
NULL              149 ext/openssl/ossl_pkey_dsa.c 	    dsa = d2i_DSAPrivateKey_bio(in, NULL);
NULL              153 ext/openssl/ossl_pkey_dsa.c 	    dsa = d2i_DSA_PUBKEY_bio(in, NULL);
NULL              160 ext/openssl/ossl_pkey_dsa.c 	ossl_raise(eDSAError, NULL);
NULL              195 ext/openssl/ossl_pkey_dsa.c     const EVP_CIPHER *ciph = NULL;
NULL              196 ext/openssl/ossl_pkey_dsa.c     char *passwd = NULL;
NULL              208 ext/openssl/ossl_pkey_dsa.c 	ossl_raise(eDSAError, NULL);
NULL              212 ext/openssl/ossl_pkey_dsa.c 					 NULL, 0, ossl_pem_passwd_cb, passwd)){
NULL              214 ext/openssl/ossl_pkey_dsa.c 	    ossl_raise(eDSAError, NULL);
NULL              219 ext/openssl/ossl_pkey_dsa.c 	    ossl_raise(eDSAError, NULL);
NULL              241 ext/openssl/ossl_pkey_dsa.c     if((len = i2d_func(pkey->pkey.dsa, NULL)) <= 0)
NULL              242 ext/openssl/ossl_pkey_dsa.c 	ossl_raise(eDSAError, NULL);
NULL              246 ext/openssl/ossl_pkey_dsa.c 	ossl_raise(eDSAError, NULL);
NULL              290 ext/openssl/ossl_pkey_dsa.c 	ossl_raise(eDSAError, NULL);
NULL              294 ext/openssl/ossl_pkey_dsa.c 	ossl_raise(eDSAError, NULL);
NULL              317 ext/openssl/ossl_pkey_dsa.c 	ossl_raise(eDSAError, NULL);
NULL              339 ext/openssl/ossl_pkey_dsa.c 	ossl_raise(eDSAError, NULL);
NULL              360 ext/openssl/ossl_pkey_dsa.c 	ossl_raise(eDSAError, NULL);
NULL               70 ext/openssl/ossl_pkey_rsa.c 	ossl_raise(eRSAError, NULL);
NULL               83 ext/openssl/ossl_pkey_rsa.c 	    rb_block_given_p() ? ossl_generate_cb : NULL,
NULL               84 ext/openssl/ossl_pkey_rsa.c 	    NULL);
NULL              101 ext/openssl/ossl_pkey_rsa.c 	ossl_raise(eRSAError, NULL);
NULL              113 ext/openssl/ossl_pkey_rsa.c     char *passwd = NULL;
NULL              122 ext/openssl/ossl_pkey_rsa.c 	if (!rsa) ossl_raise(eRSAError, NULL);
NULL              128 ext/openssl/ossl_pkey_rsa.c 	rsa = PEM_read_bio_RSAPrivateKey(in, NULL, ossl_pem_passwd_cb, passwd);
NULL              131 ext/openssl/ossl_pkey_rsa.c 	    rsa = PEM_read_bio_RSAPublicKey(in, NULL, NULL, NULL);
NULL              135 ext/openssl/ossl_pkey_rsa.c 	    rsa = PEM_read_bio_RSA_PUBKEY(in, NULL, NULL, NULL);
NULL              139 ext/openssl/ossl_pkey_rsa.c 	    rsa = d2i_RSAPrivateKey_bio(in, NULL);
NULL              143 ext/openssl/ossl_pkey_rsa.c 	    rsa = d2i_RSAPublicKey_bio(in, NULL);
NULL              147 ext/openssl/ossl_pkey_rsa.c 	    rsa = d2i_RSA_PUBKEY_bio(in, NULL);
NULL              154 ext/openssl/ossl_pkey_rsa.c 	ossl_raise(eRSAError, NULL);
NULL              188 ext/openssl/ossl_pkey_rsa.c     const EVP_CIPHER *ciph = NULL;
NULL              189 ext/openssl/ossl_pkey_rsa.c     char *passwd = NULL;
NULL              203 ext/openssl/ossl_pkey_rsa.c 	ossl_raise(eRSAError, NULL);
NULL              207 ext/openssl/ossl_pkey_rsa.c 					 NULL, 0, ossl_pem_passwd_cb, passwd)) {
NULL              209 ext/openssl/ossl_pkey_rsa.c 	    ossl_raise(eRSAError, NULL);
NULL              214 ext/openssl/ossl_pkey_rsa.c 	    ossl_raise(eRSAError, NULL);
NULL              236 ext/openssl/ossl_pkey_rsa.c     if((len = i2d_func(pkey->pkey.rsa, NULL)) <= 0)
NULL              237 ext/openssl/ossl_pkey_rsa.c 	ossl_raise(eRSAError, NULL);
NULL              241 ext/openssl/ossl_pkey_rsa.c 	ossl_raise(eRSAError, NULL);
NULL              264 ext/openssl/ossl_pkey_rsa.c     if (buf_len < 0) ossl_raise(eRSAError, NULL);
NULL              286 ext/openssl/ossl_pkey_rsa.c     if (buf_len < 0) ossl_raise(eRSAError, NULL);
NULL              311 ext/openssl/ossl_pkey_rsa.c     if (buf_len < 0) ossl_raise(eRSAError, NULL);
NULL              336 ext/openssl/ossl_pkey_rsa.c     if (buf_len < 0) ossl_raise(eRSAError, NULL);
NULL              384 ext/openssl/ossl_pkey_rsa.c 	ossl_raise(eRSAError, NULL);
NULL              388 ext/openssl/ossl_pkey_rsa.c 	ossl_raise(eRSAError, NULL);
NULL              411 ext/openssl/ossl_pkey_rsa.c 	ossl_raise(eRSAError, NULL);
NULL               45 ext/openssl/ossl_rand.c 	ossl_raise(eRandomError, NULL);
NULL               55 ext/openssl/ossl_rand.c 	ossl_raise(eRandomError, NULL);
NULL               67 ext/openssl/ossl_rand.c 	ossl_raise(eRandomError, NULL);
NULL               80 ext/openssl/ossl_rand.c 	ossl_raise(eRandomError, NULL);
NULL               92 ext/openssl/ossl_rand.c 	ossl_raise(eRandomError, NULL);
NULL              103 ext/openssl/ossl_rand.c 	ossl_raise(eRandomError, NULL);
NULL              122 ext/openssl/ossl_ssl.c 	ctx->cert_store = NULL;
NULL              144 ext/openssl/ossl_ssl.c     SSL_METHOD *method = NULL;
NULL              243 ext/openssl/ossl_ssl.c     if (status || !success) return NULL;
NULL              257 ext/openssl/ossl_ssl.c     return NULL;
NULL              282 ext/openssl/ossl_ssl.c 	ossl_raise(eSSLError, NULL);
NULL              292 ext/openssl/ossl_ssl.c     X509 *cert = NULL, *client_ca = NULL;
NULL              294 ext/openssl/ossl_ssl.c     EVP_PKEY *key = NULL;
NULL              295 ext/openssl/ossl_ssl.c     char *ca_path = NULL, *ca_file = NULL;
NULL              332 ext/openssl/ossl_ssl.c     cert = NIL_P(val) ? NULL : GetX509CertPtr(val); /* NO DUP NEEDED */
NULL              334 ext/openssl/ossl_ssl.c     key = NIL_P(val) ? NULL : GetPKeyPtr(val); /* NO DUP NEEDED */
NULL              370 ext/openssl/ossl_ssl.c     ca_file = NIL_P(val) ? NULL : StringValuePtr(val);
NULL              372 ext/openssl/ossl_ssl.c     ca_path = NIL_P(val) ? NULL : StringValuePtr(val);
NULL              461 ext/openssl/ossl_ssl.c         str = rb_str_new2(NULL);
NULL              508 ext/openssl/ossl_ssl.c     return Data_Wrap_Struct(klass, 0, ossl_ssl_free, NULL);
NULL              593 ext/openssl/ossl_ssl.c 	    ossl_raise(eSSLError, NULL);
NULL              729 ext/openssl/ossl_ssl.c     X509 *cert = NULL;
NULL              753 ext/openssl/ossl_ssl.c     X509 *cert = NULL;
NULL               51 ext/openssl/ossl_x509attr.c 	ossl_raise(eX509AttrError, NULL);
NULL               65 ext/openssl/ossl_x509attr.c 	ossl_raise(eX509AttrError, NULL);
NULL               81 ext/openssl/ossl_x509attr.c 	ossl_raise(eX509AttrError, NULL);
NULL              101 ext/openssl/ossl_x509attr.c 	    ossl_raise(eX509AttrError, NULL);
NULL              121 ext/openssl/ossl_x509attr.c     if(!obj) ossl_raise(eX509AttrError, NULL);
NULL              143 ext/openssl/ossl_x509attr.c 	    ossl_raise(eX509AttrError, NULL);
NULL              191 ext/openssl/ossl_x509attr.c     if(attr->value.ptr == NULL) return Qnil;
NULL              193 ext/openssl/ossl_x509attr.c 	length = i2d_ASN1_TYPE(attr->value.single, NULL);
NULL              200 ext/openssl/ossl_x509attr.c 	length = i2d_ASN1_SET_OF_ASN1_TYPE(attr->value.set, NULL,
NULL              222 ext/openssl/ossl_x509attr.c     if((len = i2d_X509_ATTRIBUTE(attr, NULL)) <= 0)
NULL              223 ext/openssl/ossl_x509attr.c 	ossl_raise(eX509AttrError, NULL);
NULL              227 ext/openssl/ossl_x509attr.c 	ossl_raise(eX509AttrError, NULL);
NULL               51 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
NULL               69 ext/openssl/ossl_x509cert.c     x509 = PEM_read_X509(fp, NULL, NULL, NULL);
NULL               82 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
NULL              121 ext/openssl/ossl_x509cert.c     if (!x509) ossl_raise(eX509CertError, NULL);
NULL              141 ext/openssl/ossl_x509cert.c     x509 = PEM_read_bio_X509(in, (X509 **)&DATA_PTR(self), NULL, NULL);
NULL              147 ext/openssl/ossl_x509cert.c     if (!x509) ossl_raise(eX509CertError, NULL);
NULL              164 ext/openssl/ossl_x509cert.c     if (!x509) ossl_raise(eX509CertError, NULL);
NULL              181 ext/openssl/ossl_x509cert.c     if ((len = i2d_X509(x509, NULL)) <= 0)
NULL              182 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
NULL              186 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
NULL              201 ext/openssl/ossl_x509cert.c     if (!out) ossl_raise(eX509CertError, NULL);
NULL              205 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
NULL              222 ext/openssl/ossl_x509cert.c     if (!out) ossl_raise(eX509CertError, NULL);
NULL              226 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
NULL              245 ext/openssl/ossl_x509cert.c     if (!(req = X509_to_X509_REQ(x509, NULL, EVP_md5()))) {
NULL              246 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
NULL              276 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
NULL              314 ext/openssl/ossl_x509cert.c     if (!out) ossl_raise(eX509CertError, NULL);
NULL              318 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
NULL              333 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
NULL              346 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
NULL              360 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
NULL              373 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
NULL              387 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
NULL              402 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
NULL              416 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
NULL              431 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
NULL              445 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
NULL              458 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
NULL              475 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
NULL              494 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
NULL              565 ext/openssl/ossl_x509cert.c     x509->cert_info->extensions = NULL;
NULL              571 ext/openssl/ossl_x509cert.c 	    ossl_raise(eX509CertError, NULL);
NULL              589 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
NULL               67 ext/openssl/ossl_x509crl.c     if(!tmp) ossl_raise(eX509CRLError, NULL);
NULL               83 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
NULL              102 ext/openssl/ossl_x509crl.c     crl = PEM_read_bio_X509_CRL(in, (X509_CRL **)&DATA_PTR(self), NULL, NULL);
NULL              108 ext/openssl/ossl_x509crl.c     if (!crl) ossl_raise(eX509CRLError, NULL);
NULL              123 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
NULL              154 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
NULL              170 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
NULL              174 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
NULL              200 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
NULL              224 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
NULL              250 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
NULL              295 ext/openssl/ossl_x509crl.c     crl->crl->revoked = NULL;
NULL              299 ext/openssl/ossl_x509crl.c 	    ossl_raise(eX509CRLError, NULL);
NULL              316 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
NULL              334 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
NULL              348 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
NULL              367 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
NULL              371 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
NULL              390 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
NULL              394 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
NULL              413 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
NULL              417 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
NULL              469 ext/openssl/ossl_x509crl.c     crl->crl->extensions = NULL;
NULL              474 ext/openssl/ossl_x509crl.c 	    ossl_raise(eX509CRLError, NULL);
NULL              492 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
NULL               32 ext/openssl/ossl_x509ext.c     X509V3_set_ctx(ctx, NULL, NULL, NULL, NULL, 0); \
NULL               64 ext/openssl/ossl_x509ext.c 	ossl_raise(eX509ExtError, NULL);
NULL               88 ext/openssl/ossl_x509ext.c 	ossl_raise(eX509ExtError, NULL);
NULL              240 ext/openssl/ossl_x509ext.c     conf = NIL_P(rconf) ? NULL : GetConfigPtr(rconf);
NULL              243 ext/openssl/ossl_x509ext.c     if (!empty_lhash) empty_lhash = lh_new(NULL, NULL);
NULL              265 ext/openssl/ossl_x509ext.c 	ossl_raise(eX509ExtError, NULL);
NULL              286 ext/openssl/ossl_x509ext.c 	    ossl_raise(eX509ExtError, NULL);
NULL              306 ext/openssl/ossl_x509ext.c     if(!obj) ossl_raise(eX509ExtError, NULL);
NULL              327 ext/openssl/ossl_x509ext.c 	ossl_raise(eX509ExtError, NULL);
NULL              332 ext/openssl/ossl_x509ext.c 	ossl_raise(eX509ExtError, NULL);
NULL              366 ext/openssl/ossl_x509ext.c 	    ossl_raise(eX509ExtError, NULL);
NULL              383 ext/openssl/ossl_x509ext.c 	ossl_raise(eX509ExtError, NULL);
NULL              409 ext/openssl/ossl_x509ext.c     if((len = i2d_X509_EXTENSION(ext, NULL)) <= 0)
NULL              410 ext/openssl/ossl_x509ext.c 	ossl_raise(eX509ExtError, NULL);
NULL              414 ext/openssl/ossl_x509ext.c 	ossl_raise(eX509ExtError, NULL);
NULL               56 ext/openssl/ossl_x509name.c 	ossl_raise(eX509NameError, NULL);
NULL               83 ext/openssl/ossl_x509name.c 	ossl_raise(eX509NameError, NULL);
NULL              136 ext/openssl/ossl_x509name.c 		ossl_raise(eX509NameError, NULL);
NULL              157 ext/openssl/ossl_x509name.c 	ossl_raise(eX509NameError, NULL);
NULL              171 ext/openssl/ossl_x509name.c     buf = X509_NAME_oneline(name, NULL, 0);
NULL              191 ext/openssl/ossl_x509name.c 	rb_raise(eX509NameError, NULL);
NULL              195 ext/openssl/ossl_x509name.c 	rb_raise(eX509NameError, NULL);
NULL              221 ext/openssl/ossl_x509name.c 	    ossl_raise(eX509NameError, NULL);
NULL              224 ext/openssl/ossl_x509name.c 	    ossl_raise(eX509NameError, NULL);
NULL              291 ext/openssl/ossl_x509name.c     if((len = i2d_X509_NAME(name, NULL)) <= 0)
NULL              292 ext/openssl/ossl_x509name.c 	ossl_raise(eX509NameError, NULL);
NULL              296 ext/openssl/ossl_x509name.c 	ossl_raise(eX509NameError, NULL);
NULL               51 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
NULL               75 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
NULL               91 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
NULL              110 ext/openssl/ossl_x509req.c     req = PEM_read_bio_X509_REQ(in, (X509_REQ **)&DATA_PTR(self), NULL, NULL);
NULL              116 ext/openssl/ossl_x509req.c     if (!req) ossl_raise(eX509ReqError, NULL);
NULL              131 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
NULL              149 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
NULL              153 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
NULL              171 ext/openssl/ossl_x509req.c     if ((len = i2d_X509_REQ(req, NULL)) <= 0)
NULL              172 ext/openssl/ossl_x509req.c 	ossl_raise(eX509CertError, NULL);
NULL              176 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
NULL              192 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
NULL              196 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
NULL              218 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
NULL              248 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
NULL              262 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
NULL              276 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
NULL              293 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
NULL              297 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
NULL              313 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
NULL              328 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
NULL              345 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
NULL              364 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
NULL              411 ext/openssl/ossl_x509req.c     req->req_info->attributes = NULL;
NULL              416 ext/openssl/ossl_x509req.c 	    ossl_raise(eX509ReqError, NULL);
NULL              429 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
NULL               51 ext/openssl/ossl_x509revoked.c 	ossl_raise(eX509RevError, NULL);
NULL               65 ext/openssl/ossl_x509revoked.c 	ossl_raise(eX509RevError, NULL);
NULL               81 ext/openssl/ossl_x509revoked.c 	ossl_raise(eX509RevError, NULL);
NULL              135 ext/openssl/ossl_x509revoked.c 	ossl_raise(eX509RevError, NULL);
NULL              183 ext/openssl/ossl_x509revoked.c     rev->extensions = NULL;
NULL              188 ext/openssl/ossl_x509revoked.c 	    ossl_raise(eX509RevError, NULL);
NULL              202 ext/openssl/ossl_x509revoked.c 	ossl_raise(eX509RevError, NULL);
NULL               98 ext/openssl/ossl_x509store.c     if((store = X509_STORE_new()) == NULL){
NULL               99 ext/openssl/ossl_x509store.c         ossl_raise(eX509StoreError, NULL);
NULL              205 ext/openssl/ossl_x509store.c     char *path = NULL;
NULL              213 ext/openssl/ossl_x509store.c     if(lookup == NULL) ossl_raise(eX509StoreError, NULL);
NULL              215 ext/openssl/ossl_x509store.c         ossl_raise(eX509StoreError, NULL);
NULL              226 ext/openssl/ossl_x509store.c     char *path = NULL;
NULL              234 ext/openssl/ossl_x509store.c     if(lookup == NULL) ossl_raise(eX509StoreError, NULL);
NULL              236 ext/openssl/ossl_x509store.c         ossl_raise(eX509StoreError, NULL);
NULL              249 ext/openssl/ossl_x509store.c         ossl_raise(eX509StoreError, NULL);
NULL              264 ext/openssl/ossl_x509store.c         ossl_raise(eX509StoreError, NULL);
NULL              279 ext/openssl/ossl_x509store.c         ossl_raise(eX509StoreError, NULL);
NULL              328 ext/openssl/ossl_x509store.c     RDATA(obj)->data = NULL;
NULL              352 ext/openssl/ossl_x509store.c     if((ctx = X509_STORE_CTX_new()) == NULL){
NULL              353 ext/openssl/ossl_x509store.c         ossl_raise(eX509StoreError, NULL);
NULL              371 ext/openssl/ossl_x509store.c     X509 *x509 = NULL;
NULL              372 ext/openssl/ossl_x509store.c     STACK_OF(X509) *x509s = NULL;
NULL              382 ext/openssl/ossl_x509store.c         ossl_raise(eX509StoreError, NULL);
NULL              422 ext/openssl/ossl_x509store.c     if((chain = X509_STORE_CTX_get_chain(ctx)) == NULL){
NULL              209 ext/pty/pty.c  	if ((p = getenv("SHELL")) != NULL) {
NULL              356 ext/pty/pty.c  		if((pn = ptsname(i)) != NULL) {
NULL              381 ext/pty/pty.c      for (p = deviceNo; *p != NULL; p++) {
NULL               59 ext/readline/readline.c     char *prompt = NULL;
NULL              172 ext/readline/readline.c 	return NULL;
NULL              182 ext/readline/readline.c 	return NULL;
NULL              189 ext/readline/readline.c     result[matches + 1] = NULL;
NULL              303 ext/readline/readline.c     static char *basic_word_break_characters = NULL;
NULL              307 ext/readline/readline.c     if (basic_word_break_characters == NULL) {
NULL              331 ext/readline/readline.c     if (rl_basic_word_break_characters == NULL)
NULL              345 ext/readline/readline.c     static char *completer_word_break_characters = NULL;
NULL              349 ext/readline/readline.c     if (completer_word_break_characters == NULL) {
NULL              373 ext/readline/readline.c     if (rl_completer_word_break_characters == NULL)
NULL              387 ext/readline/readline.c     static char *basic_quote_characters = NULL;
NULL              391 ext/readline/readline.c     if (basic_quote_characters == NULL) {
NULL              416 ext/readline/readline.c     if (rl_basic_quote_characters == NULL)
NULL              430 ext/readline/readline.c     static char *completer_quote_characters = NULL;
NULL              434 ext/readline/readline.c     if (completer_quote_characters == NULL) {
NULL              459 ext/readline/readline.c     if (rl_completer_quote_characters == NULL)
NULL              473 ext/readline/readline.c     static char *filename_quote_characters = NULL;
NULL              477 ext/readline/readline.c     if (filename_quote_characters == NULL) {
NULL              502 ext/readline/readline.c     if (rl_filename_quote_characters == NULL)
NULL              532 ext/readline/readline.c     if (entry == NULL) {
NULL              554 ext/readline/readline.c     entry = replace_history_entry(i, RSTRING(str)->ptr, NULL);
NULL              555 ext/readline/readline.c     if (entry == NULL) {
NULL              650 ext/readline/readline.c         if (entry == NULL)
NULL              264 ext/ripper/eventids2.c     {0, NULL}
NULL              273 ext/ripper/eventids2.c     for (a = token_to_eventid; a->id != NULL; a++) {
NULL               99 ext/sdbm/_sdbm.c #ifndef NULL
NULL              122 ext/sdbm/_sdbm.c #define bad(x)		((x).dptr == NULL || (x).dsize < 0)
NULL              143 ext/sdbm/_sdbm.c datum nullitem = {NULL, 0};
NULL              156 ext/sdbm/_sdbm.c 	if (file == NULL || !*file)
NULL              157 ext/sdbm/_sdbm.c 		return errno = EINVAL, (DBM *) NULL;
NULL              163 ext/sdbm/_sdbm.c 	if ((dirname = malloc((unsigned) n)) == NULL)
NULL              164 ext/sdbm/_sdbm.c 		return errno = ENOMEM, (DBM *) NULL;
NULL              187 ext/sdbm/_sdbm.c 	if ((db = (DBM *) malloc(sizeof(DBM))) == NULL)
NULL              188 ext/sdbm/_sdbm.c 		return errno = ENOMEM, (DBM *) NULL;
NULL              234 ext/sdbm/_sdbm.c 	return (DBM *) NULL;
NULL              241 ext/sdbm/_sdbm.c 	if (db == NULL)
NULL              255 ext/sdbm/_sdbm.c 	if (db == NULL || bad(key))
NULL              269 ext/sdbm/_sdbm.c 	if (db == NULL || bad(key))
NULL              300 ext/sdbm/_sdbm.c 	if (db == NULL || bad(key))
NULL              456 ext/sdbm/_sdbm.c 	if (db == NULL)
NULL              476 ext/sdbm/_sdbm.c 	if (db == NULL)
NULL              596 ext/sdbm/_sdbm.c 		if (key.dptr != NULL)
NULL              133 ext/socket/getaddrinfo.c 	{0, 0, 0, 0, NULL, NULL},
NULL              169 ext/socket/getaddrinfo.c 	if (((ai)->ai_canonname = (char *)malloc(strlen(str) + 1)) != NULL) {\
NULL              181 ext/socket/getaddrinfo.c 	    == NULL) {\
NULL              221 ext/socket/getaddrinfo.c 	} while ((ai = next) != NULL);
NULL              277 ext/socket/getaddrinfo.c 	struct addrinfo *top = NULL;
NULL              300 ext/socket/getaddrinfo.c 	sentinel.ai_next = NULL;
NULL              308 ext/socket/getaddrinfo.c 	pai->ai_canonname = NULL;
NULL              309 ext/socket/getaddrinfo.c 	pai->ai_addr = NULL;
NULL              310 ext/socket/getaddrinfo.c 	pai->ai_next = NULL;
NULL              313 ext/socket/getaddrinfo.c 	if (hostname == NULL && servname == NULL)
NULL              388 ext/socket/getaddrinfo.c 			proto = NULL;
NULL              391 ext/socket/getaddrinfo.c 				proto = NULL;
NULL              403 ext/socket/getaddrinfo.c 			if ((sp = getservbyname((char*)servname, proto)) == NULL)
NULL              423 ext/socket/getaddrinfo.c 	if (hostname == NULL) {
NULL              536 ext/socket/getaddrinfo.c 	*res = NULL;
NULL              582 ext/socket/getaddrinfo.c 	*res = NULL;
NULL              602 ext/socket/getaddrinfo.c 	top = NULL;
NULL              603 ext/socket/getaddrinfo.c 	sentinel.ai_next = NULL;
NULL              615 ext/socket/getaddrinfo.c 	if (hp == NULL) {
NULL              632 ext/socket/getaddrinfo.c 	if ((hp->h_name == NULL) || (hp->h_name[0] == 0) ||
NULL              633 ext/socket/getaddrinfo.c 	    (hp->h_addr_list[0] == NULL))
NULL              636 ext/socket/getaddrinfo.c 	for (i = 0; (ap = hp->h_addr_list[i]) != NULL; i++) {
NULL              691 ext/socket/getaddrinfo.c 	*res = NULL;
NULL              162 ext/socket/getnameinfo.c 	if (sa == NULL)
NULL              182 ext/socket/getnameinfo.c 	if (serv == NULL || servlen == 0) {
NULL              224 ext/socket/getnameinfo.c 	if (host == NULL || hostlen == 0) {
NULL              228 ext/socket/getnameinfo.c 		    == NULL)
NULL              260 ext/socket/getnameinfo.c 			    == NULL)
NULL              184 ext/socket/socket.c     for (r = *res; r != NULL; r = r->ai_next) {
NULL              676 ext/socket/socket.c     error = getnameinfo(addr, SA_LEN(addr), buf, len, NULL, 0, NI_NUMERICHOST);
NULL              715 ext/socket/socket.c     ep = NULL;
NULL              730 ext/socket/socket.c 	return NULL;
NULL              798 ext/socket/socket.c     struct addrinfo* res = NULL;
NULL              882 ext/socket/socket.c 			    NULL, 0, 0);
NULL             1322 ext/socket/socket.c 	if (h->h_aliases != NULL) {
NULL             1775 ext/socket/socket.c     msg.msg_name = NULL;
NULL             1839 ext/socket/socket.c     msg.msg_name = NULL;
NULL             2677 ext/socket/socket.c     if (res0 == NULL) {
NULL             2750 ext/socket/socket.c     if (h == NULL) {
NULL             2762 ext/socket/socket.c     if (h->h_aliases != NULL) {
NULL             2842 ext/socket/socket.c 	hptr = NULL;
NULL             2850 ext/socket/socket.c 	pptr = NULL;
NULL             2908 ext/socket/socket.c     struct addrinfo hints, *res = NULL, *r;
NULL             2966 ext/socket/socket.c 	    hptr = NULL;
NULL             2976 ext/socket/socket.c 	    pptr = NULL;
NULL              642 ext/stringio/stringio.c     rb_scan_args(argc, argv, "11", NULL, &whence);
NULL              139 ext/syck/bytecode.c     if ( YYCURSOR == NULL )
NULL             1055 ext/syck/bytecode.c                 int total = strtod( count, NULL );
NULL              117 ext/syck/emitter.c     e->anchor_format = NULL;
NULL              124 ext/syck/emitter.c     e->anchors = NULL;
NULL              125 ext/syck/emitter.c     e->markers = NULL;
NULL              126 ext/syck/emitter.c     e->anchored = NULL;
NULL              128 ext/syck/emitter.c     e->buffer = NULL;
NULL              129 ext/syck/emitter.c     e->marker = NULL;
NULL              131 ext/syck/emitter.c     e->emitter_handler = NULL;
NULL              132 ext/syck/emitter.c     e->output_handler = NULL;
NULL              137 ext/syck/emitter.c     e->bonus = NULL;
NULL              154 ext/syck/emitter.c     if ( e->anchors != NULL )
NULL              158 ext/syck/emitter.c         e->anchors = NULL;
NULL              161 ext/syck/emitter.c     if ( e->anchored != NULL )
NULL              164 ext/syck/emitter.c         e->anchored = NULL;
NULL              170 ext/syck/emitter.c     if ( e->markers != NULL )
NULL              173 ext/syck/emitter.c         e->markers = NULL;
NULL              192 ext/syck/emitter.c     ASSERT( e != NULL );
NULL              204 ext/syck/emitter.c     ASSERT( e != NULL );
NULL              261 ext/syck/emitter.c     if ( e->buffer != NULL )
NULL              271 ext/syck/emitter.c     if ( e->buffer == NULL )
NULL              288 ext/syck/emitter.c     ASSERT( str != NULL )
NULL              289 ext/syck/emitter.c     if ( e->buffer == NULL )
NULL              361 ext/syck/emitter.c     char *anchor_name = NULL;
NULL              394 ext/syck/emitter.c     if ( e->anchors != NULL &&
NULL              398 ext/syck/emitter.c         if ( e->anchored == NULL )
NULL              445 ext/syck/emitter.c     if ( tag == NULL ) return;
NULL              446 ext/syck/emitter.c     if ( ignore != NULL && syck_tagcmp( tag, ignore ) == 0 && e->explicit_typing == 0 ) return;
NULL              652 ext/syck/emitter.c     if ( str == NULL ) str = "";
NULL              672 ext/syck/emitter.c              ( !( tag == NULL ||
NULL              673 ext/syck/emitter.c              ( implicit != NULL && syck_tagcmp( tag, implicit ) == 0 && e->explicit_typing == 0 ) ) ) )
NULL             1198 ext/syck/emitter.c     char *anchor_name = NULL;
NULL             1203 ext/syck/emitter.c     if ( e->markers == NULL )
NULL             1223 ext/syck/emitter.c         if ( e->anchors == NULL )
NULL             1231 ext/syck/emitter.c             char *anc = ( e->anchor_format == NULL ? DEFAULT_ANCHOR_FORMAT : e->anchor_format );
NULL             1573 ext/syck/gram.c                     if ( yyvsp[-2].nodeData->shortcut == NULL )
NULL             1591 ext/syck/gram.c                     yyvsp[0].nodeData = NULL;
NULL             1631 ext/syck/gram.c                     yyvsp[0].nodeData = NULL;
NULL             1882 ext/syck/gram.c     if ( n->shortcut == NULL )
NULL             1891 ext/syck/gram.c     n->shortcut = NULL;
NULL               24 ext/syck/handler.c     if ( n->anchor == NULL )
NULL               34 ext/syck/handler.c     SyckNode *ntmp = NULL;
NULL               37 ext/syck/handler.c     if ( p->bad_anchors != NULL )
NULL               49 ext/syck/handler.c     if ( p->anchors == NULL )
NULL               69 ext/syck/handler.c     if ( p->anchors == NULL )
NULL               86 ext/syck/handler.c     SyckNode *n = NULL;
NULL               88 ext/syck/handler.c     if ( p->anchors != NULL )
NULL               99 ext/syck/handler.c                 if ( p->bad_anchors == NULL )
NULL              112 ext/syck/handler.c     if ( n == NULL )
NULL              132 ext/syck/handler.c     if ( n->type_id != NULL )
NULL               39 ext/syck/implicit.c     if ( n->type_id != NULL ) S_FREE( n->type_id );
NULL             1591 ext/syck/implicit.c     if ( tag1 == NULL || tag2 == NULL ) return 0;
NULL             1598 ext/syck/implicit.c 		if ( othorpe != NULL ) {
NULL             1602 ext/syck/implicit.c 		if ( othorpe != NULL ) {
NULL               24 ext/syck/node.c     s->type_id = NULL;
NULL               25 ext/syck/node.c     s->anchor = NULL;
NULL               26 ext/syck/node.c     s->shortcut = NULL;
NULL               35 ext/syck/node.c     if ( n->type_id != NULL )
NULL               38 ext/syck/node.c         n->type_id = NULL;
NULL               40 ext/syck/node.c     if ( n->anchor != NULL )
NULL               43 ext/syck/node.c         n->anchor = NULL;
NULL               93 ext/syck/node.c     s->ptr = NULL;
NULL              132 ext/syck/node.c     if ( n->data.str != NULL )
NULL              135 ext/syck/node.c         n->data.str->ptr = NULL;
NULL              166 ext/syck/node.c     ASSERT( n != NULL );
NULL              185 ext/syck/node.c     ASSERT( n != NULL );
NULL              186 ext/syck/node.c     ASSERT( n->data.list != NULL );
NULL              203 ext/syck/node.c     ASSERT( map != NULL );
NULL              204 ext/syck/node.c     ASSERT( map->data.pairs != NULL );
NULL              224 ext/syck/node.c     ASSERT( map1 != NULL );
NULL              225 ext/syck/node.c     ASSERT( map2 != NULL );
NULL              254 ext/syck/node.c     ASSERT( map != NULL );
NULL              255 ext/syck/node.c     ASSERT( map->data.pairs != NULL );
NULL              264 ext/syck/node.c     ASSERT( map != NULL );
NULL              266 ext/syck/node.c     ASSERT( m != NULL );
NULL              282 ext/syck/node.c     ASSERT( map != NULL );
NULL              284 ext/syck/node.c     ASSERT( m != NULL );
NULL              310 ext/syck/node.c     ASSERT( n != NULL );
NULL              311 ext/syck/node.c     ASSERT( n->data.list != NULL );
NULL              326 ext/syck/node.c     ASSERT( arr != NULL );
NULL              327 ext/syck/node.c     ASSERT( arr->data.list != NULL );
NULL              343 ext/syck/node.c     ASSERT( seq != NULL );
NULL              344 ext/syck/node.c     ASSERT( seq->data.list != NULL );
NULL              353 ext/syck/node.c     ASSERT( map != NULL );
NULL              355 ext/syck/node.c     ASSERT( m != NULL );
NULL              364 ext/syck/node.c     ASSERT( seq != NULL );
NULL              366 ext/syck/node.c     ASSERT( s != NULL );
NULL              373 ext/syck/node.c     if ( n == NULL ) return;
NULL              378 ext/syck/node.c             if ( n->data.str != NULL )
NULL              381 ext/syck/node.c                 n->data.str->ptr = NULL;
NULL              384 ext/syck/node.c                 n->data.str = NULL;
NULL              389 ext/syck/node.c             if ( n->data.list != NULL )
NULL              393 ext/syck/node.c                 n->data.list = NULL;
NULL              398 ext/syck/node.c             if ( n->data.pairs != NULL )
NULL              403 ext/syck/node.c                 n->data.pairs = NULL;
NULL              112 ext/syck/rubyext.c     syck_parser_error_handler( parser, NULL );
NULL              138 ext/syck/rubyext.c     ASSERT( str != NULL );
NULL              176 ext/syck/rubyext.c         syck_parser_str( parser, RSTRING(port)->ptr, RSTRING(port)->len, NULL );
NULL              227 ext/syck/rubyext.c         year = INT2FIX(strtol(ptr, NULL, 10));
NULL              234 ext/syck/rubyext.c         mon = INT2FIX(strtol(ptr, NULL, 10));
NULL              241 ext/syck/rubyext.c         day = INT2FIX(strtol(ptr, NULL, 10));
NULL              248 ext/syck/rubyext.c         hour = INT2FIX(strtol(ptr, NULL, 10));
NULL              255 ext/syck/rubyext.c         min = INT2FIX(strtol(ptr, NULL, 10));
NULL              262 ext/syck/rubyext.c         sec = INT2FIX(strtol(ptr, NULL, 10));
NULL              273 ext/syck/rubyext.c         usec = strtol(padded, NULL, 10);
NULL              284 ext/syck/rubyext.c         time_t tz_offset = strtol(ptr, NULL, 10) * 3600;
NULL              293 ext/syck/rubyext.c                 tz_offset -= strtol(ptr, NULL, 10) * 60;
NULL              297 ext/syck/rubyext.c                 tz_offset += strtol(ptr, NULL, 10) * 60;
NULL              343 ext/syck/rubyext.c     if ( type_id != NULL && strncmp( type_id, "tag:yaml.org,2002:", 18 ) == 0 )
NULL              352 ext/syck/rubyext.c             if ( type_id == NULL )
NULL              404 ext/syck/rubyext.c                     bnum = strtol( colon + 1, NULL, 10 );
NULL              434 ext/syck/rubyext.c                     bnum = strtod( colon + 1, NULL );
NULL              457 ext/syck/rubyext.c                 f = strtod( n->data.str->ptr, NULL );
NULL              475 ext/syck/rubyext.c                 year = INT2FIX(strtol(ptr, NULL, 10));
NULL              480 ext/syck/rubyext.c                 mon = INT2FIX(strtol(ptr, NULL, 10));
NULL              485 ext/syck/rubyext.c                 day = INT2FIX(strtol(ptr, NULL, 10));
NULL              529 ext/syck/rubyext.c             if ( type_id == NULL || strcmp( type_id, "seq" ) == 0 )
NULL              541 ext/syck/rubyext.c             if ( type_id == NULL || strcmp( type_id, "map" ) == 0 )
NULL              620 ext/syck/rubyext.c     obj = rb_funcall( resolver, s_node_import, 1, Data_Wrap_Struct( cNode, NULL, NULL, n ) );
NULL              729 ext/syck/rubyext.c     if ( parser->anchors != NULL )
NULL              733 ext/syck/rubyext.c     if ( parser->bad_anchors != NULL )
NULL             1029 ext/syck/rubyext.c     if ( n->type_id != NULL )
NULL             1260 ext/syck/rubyext.c     if ( n->type_id != NULL )
NULL             1817 ext/syck/rubyext.c     if ( orig_n->type_id != NULL )
NULL             1821 ext/syck/rubyext.c     if ( orig_n->anchor != NULL )
NULL               24 ext/syck/syck.c     fflush( NULL );
NULL               51 ext/syck/syck.c     ASSERT( file != NULL );
NULL               70 ext/syck/syck.c     ASSERT( str != NULL );
NULL              122 ext/syck/syck.c     if ( p->buffer == NULL )
NULL              129 ext/syck/syck.c     p->cursor = NULL;
NULL              130 ext/syck/syck.c     p->lineptr = NULL;
NULL              131 ext/syck/syck.c     p->linectptr = NULL;
NULL              132 ext/syck/syck.c     p->token = NULL;
NULL              133 ext/syck/syck.c     p->toktmp = NULL;
NULL              134 ext/syck/syck.c     p->marker = NULL;
NULL              135 ext/syck/syck.c     p->limit = NULL;
NULL              167 ext/syck/syck.c     p->io.str = NULL;
NULL              168 ext/syck/syck.c     p->syms = NULL;
NULL              169 ext/syck/syck.c     p->anchors = NULL;
NULL              170 ext/syck/syck.c     p->bad_anchors = NULL;
NULL              174 ext/syck/syck.c     p->buffer = NULL;
NULL              184 ext/syck/syck.c     if ( p->syms == NULL )
NULL              196 ext/syck/syck.c     if ( p->syms == NULL ) return 0;
NULL              204 ext/syck/syck.c     n = NULL;
NULL              214 ext/syck/syck.c     if ( p->anchors != NULL )
NULL              218 ext/syck/syck.c         p->anchors = NULL;
NULL              221 ext/syck/syck.c     if ( p->bad_anchors != NULL )
NULL              225 ext/syck/syck.c         p->bad_anchors = NULL;
NULL              235 ext/syck/syck.c     if ( p->syms != NULL )
NULL              238 ext/syck/syck.c         p->syms = NULL;
NULL              249 ext/syck/syck.c     if ( p->buffer != NULL )
NULL              260 ext/syck/syck.c     ASSERT( p != NULL );
NULL              279 ext/syck/syck.c     ASSERT( p != NULL );
NULL              286 ext/syck/syck.c     ASSERT( p != NULL );
NULL              293 ext/syck/syck.c     ASSERT( p != NULL );
NULL              300 ext/syck/syck.c     ASSERT( p != NULL );
NULL              306 ext/syck/syck.c     if ( read != NULL )
NULL              319 ext/syck/syck.c     ASSERT( p != NULL );
NULL              327 ext/syck/syck.c     if ( read != NULL )
NULL              352 ext/syck/syck.c     ASSERT( p != NULL );
NULL              364 ext/syck/syck.c     ASSERT( p != NULL );
NULL              382 ext/syck/syck.c     ASSERT( p != NULL );
NULL              386 ext/syck/syck.c             if ( p->io.str != NULL )
NULL              389 ext/syck/syck.c                 p->io.str = NULL;
NULL              394 ext/syck/syck.c             if ( p->io.file != NULL )
NULL              397 ext/syck/syck.c                 p->io.file = NULL;
NULL              407 ext/syck/syck.c     ASSERT( p->buffer != NULL );
NULL              409 ext/syck/syck.c     if ( p->token == NULL )
NULL              433 ext/syck/syck.c     if ( p->cursor == NULL )
NULL              448 ext/syck/syck.c     ASSERT( p != NULL );
NULL              470 ext/syck/syck.c     ASSERT( p != NULL );
NULL              490 ext/syck/syck.c     ASSERT( p != NULL );
NULL               45 ext/syck/syck.h #ifndef NULL
NULL               54 ext/syck/syck.h #define S_FREE(n) if (n) { free(n); n = NULL; }
NULL              234 ext/syck/token.c SyckParser *syck_parser_ptr = NULL;
NULL              282 ext/syck/token.c     if ( YYCURSOR == NULL )
NULL             2114 ext/syck/token.c                         ch = strtol( chr_text, NULL, 16 );
NULL             2317 ext/syck/token.c                         ch = strtol( chr_text, NULL, 16 );
NULL             2367 ext/syck/token.c                 forceIndent = strtol( yyt, NULL, 10 );
NULL             2719 ext/syck/token.c     if ( syck_parser_ptr->error_handler == NULL )
NULL              130 ext/syck/yaml2byte.c     bytestring_t *val = NULL;
NULL              131 ext/syck/yaml2byte.c     bytestring_t *sav = NULL;
NULL              134 ext/syck/yaml2byte.c     if(n->anchor) bytestring_append(val,YAMLBYTE_ANCHOR, n->anchor, NULL);
NULL              139 ext/syck/yaml2byte.c             bytestring_append(val,YAMLBYTE_TRANSFER, n->type_id, NULL);
NULL              147 ext/syck/yaml2byte.c             bytestring_append( val, YAMLBYTE_TRANSFER, type_tag, NULL);
NULL              172 ext/syck/yaml2byte.c                         bytestring_append(val,YAMLBYTE_NEWLINE,NULL,NULL);
NULL              176 ext/syck/yaml2byte.c                         bytestring_append(val,YAMLBYTE_NULLCHAR,NULL,NULL);
NULL              187 ext/syck/yaml2byte.c             bytestring_append(val,YAMLBYTE_SEQUENCE,NULL,NULL);
NULL              194 ext/syck/yaml2byte.c             bytestring_append(val,YAMLBYTE_END_BRANCH,NULL,NULL);
NULL              197 ext/syck/yaml2byte.c             bytestring_append(val,YAMLBYTE_MAPPING,NULL,NULL);
NULL              207 ext/syck/yaml2byte.c             bytestring_append(val,YAMLBYTE_END_BRANCH,NULL,NULL);
NULL              223 ext/syck/yaml2byte.c     syck_parser_str_auto( parser, yamlstr, NULL );
NULL              225 ext/syck/yaml2byte.c     syck_parser_error_handler( parser, NULL );
NULL              238 ext/syck/yaml2byte.c         ret = NULL;
NULL              159 ext/syck/yamlbyte.h             yamlbyte_buff_t buff = NULL;                           \
NULL              161 ext/syck/yamlbyte.h             if(YAMLBYTE_OK != result || NULL == buff)                \
NULL               16 ext/syslog/syslog.c static const char *syslog_ident = NULL;
NULL               48 ext/syslog/syslog.c     syslog_ident = NULL;
NULL               33 ext/tk/stubs.c     if (nativethread_checked || ip == (Tcl_Interp *)NULL) {
NULL               39 ext/tk/stubs.c     if (Tcl_GetVar2(ip, "tcl_platform", "threaded", TCL_GLOBAL_ONLY) != (char*)NULL) {
NULL              180 ext/tk/stubs.c     return(tclStubsPtr != (TclStubs*)NULL);
NULL              186 ext/tk/stubs.c     return(tkStubsPtr != (TkStubs*)NULL);
NULL              203 ext/tk/stubs.c             return (Tcl_Interp*)NULL;
NULL              218 ext/tk/stubs.c                 return (Tcl_Interp*)NULL;
NULL              226 ext/tk/stubs.c             return (Tcl_Interp*)NULL;
NULL              233 ext/tk/stubs.c             return (Tcl_Interp*)NULL;
NULL              239 ext/tk/stubs.c             return (Tcl_Interp*)NULL;
NULL              245 ext/tk/stubs.c             return (Tcl_Interp*)NULL;
NULL              448 ext/tk/stubs.c         return (Tcl_Interp*)NULL;
NULL              174 ext/tk/tcltklib.c     Tcl_Obj *nameObj1, *nameObj2 = NULL, *retObj;
NULL              203 ext/tk/tcltklib.c     Tcl_Obj *nameObj1, *nameObj2 = NULL, *retObj;
NULL              406 ext/tk/tcltklib.c     (Tcl_GetCurrentNamespace(interp) == (Tcl_Namespace *)NULL)
NULL              414 ext/tk/tcltklib.c     ((ptr)->default_ns == (Tcl_Namespace*)NULL || Tcl_GetCurrentNamespace((ptr)->ip) != (ptr)->default_ns)
NULL              540 ext/tk/tcltklib.c     if (iPtr->varFramePtr != NULL) {
NULL              581 ext/tk/tcltklib.c         return((struct tcltkip *)NULL);
NULL              583 ext/tk/tcltklib.c     if (ptr->ip == (Tcl_Interp*)NULL) {
NULL              585 ext/tk/tcltklib.c         return((struct tcltkip *)NULL);
NULL              611 ext/tk/tcltklib.c     if (ptr->ip == (Tcl_Interp*)NULL) {
NULL              627 ext/tk/tcltklib.c     } else if (ptr->ip == (Tcl_Interp*)NULL) {
NULL              809 ext/tk/tcltklib.c             if (ptr != (struct tcltkip *)NULL) {
NULL              865 ext/tk/tcltklib.c         argv[2] = (Tcl_Obj *)NULL;
NULL              878 ext/tk/tcltklib.c         argv[1] = Tcl_GetStringFromObj(state_obj, (int*)NULL);
NULL              879 ext/tk/tcltklib.c         argv[2] = (char *)NULL;
NULL              896 ext/tk/tcltklib.c         argv[2] = (char *)NULL;
NULL              909 ext/tk/tcltklib.c static Tcl_TimerToken timer_token = (Tcl_TimerToken)NULL;
NULL              935 ext/tk/tcltklib.c         timer_token = (Tcl_TimerToken)NULL;
NULL              971 ext/tk/tcltklib.c         timer_token = (Tcl_TimerToken)NULL;
NULL              998 ext/tk/tcltklib.c     if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
NULL             1050 ext/tk/tcltklib.c     if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
NULL             1105 ext/tk/tcltklib.c     if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
NULL             1213 ext/tk/tcltklib.c     if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
NULL             1303 ext/tk/tcltklib.c         timer_token = (Tcl_TimerToken)NULL;
NULL             1324 ext/tk/tcltklib.c             if (check_var != (int *)NULL) {
NULL             1328 ext/tk/tcltklib.c                 if (interp != (Tcl_Interp*)NULL
NULL             1373 ext/tk/tcltklib.c             if (check_var != (int*)NULL && !NIL_P(rbtk_pending_exception)) {
NULL             1396 ext/tk/tcltklib.c                 if (rb_prohibit_interrupt || check_var != (int*)NULL) {
NULL             1408 ext/tk/tcltklib.c                     if (rb_prohibit_interrupt || check_var != (int*)NULL) {
NULL             1440 ext/tk/tcltklib.c                 if (check_var != (int *)NULL) {
NULL             1444 ext/tk/tcltklib.c                     if (interp != (Tcl_Interp*)NULL
NULL             1498 ext/tk/tcltklib.c                         if (rb_prohibit_interrupt || check_var != (int*)NULL) {
NULL             1506 ext/tk/tcltklib.c                     if (check_var != (int*)NULL
NULL             1576 ext/tk/tcltklib.c                     if (rb_prohibit_interrupt || check_var != (int*)NULL) {
NULL             1588 ext/tk/tcltklib.c                         if (rb_prohibit_interrupt || check_var != (int*)NULL) {
NULL             1711 ext/tk/tcltklib.c           timer_token = (Tcl_TimerToken)NULL;
NULL             1799 ext/tk/tcltklib.c                                   (int*)NULL, (Tcl_Interp*)NULL);
NULL             1815 ext/tk/tcltklib.c     if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
NULL             1828 ext/tk/tcltklib.c                                   (int*)NULL, (Tcl_Interp*)NULL);
NULL             1931 ext/tk/tcltklib.c     if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
NULL             2011 ext/tk/tcltklib.c                                               q->done, (Tcl_Interp*)NULL));
NULL             2077 ext/tk/tcltklib.c         if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
NULL             2142 ext/tk/tcltklib.c         encoding = (Tcl_Encoding)NULL;
NULL             2159 ext/tk/tcltklib.c     Tcl_AppendResult(interp, Tcl_DStringValue(&dstr), (char*)NULL);
NULL             2165 ext/tk/tcltklib.c     Tcl_AppendResult(interp, RSTRING(msg)->ptr, (char*)NULL);
NULL             2360 ext/tk/tcltklib.c         Tcl_AppendResult(interp, RSTRING(ret)->ptr, (char *)NULL);
NULL             2411 ext/tk/tcltklib.c     if (interp == (Tcl_Interp*)NULL) {
NULL             2427 ext/tk/tcltklib.c                          buf, " for 1)", (char *)NULL);
NULL             2513 ext/tk/tcltklib.c     if (interp == (Tcl_Interp*)NULL) {
NULL             2524 ext/tk/tcltklib.c         Tcl_AppendResult(interp, "too few arguments", (char *)NULL);
NULL             2571 ext/tk/tcltklib.c                          str, "'", (char *)NULL);
NULL             2635 ext/tk/tcltklib.c     if (interp != (Tcl_Interp*)NULL
NULL             2677 ext/tk/tcltklib.c     cmd = Tcl_GetStringFromObj(argv[0], (int*)NULL);
NULL             2684 ext/tk/tcltklib.c                          cmd, " ?returnCode?\"", (char *)NULL);
NULL             2688 ext/tk/tcltklib.c     if (interp == (Tcl_Interp*)NULL) return TCL_OK;
NULL             2703 ext/tk/tcltklib.c                          "fail to call \"", cmd, "\"", (char *)NULL);
NULL             2717 ext/tk/tcltklib.c         param = Tcl_GetStringFromObj(argv[1], (int*)NULL);
NULL             2723 ext/tk/tcltklib.c                              argv[1], "\"", (char *)NULL);
NULL             2731 ext/tk/tcltklib.c                          param, "\"", (char *)NULL);
NULL             2743 ext/tk/tcltklib.c                          cmd, " ?returnCode?\"", (char *)NULL);
NULL             2778 ext/tk/tcltklib.c     static CONST char *updateOptions[] = {"idletasks", (char *) NULL};
NULL             2782 ext/tk/tcltklib.c     if (interp == (Tcl_Interp*)NULL) {
NULL             2814 ext/tk/tcltklib.c                     "\": must be idletasks", (char *) NULL);
NULL             2828 ext/tk/tcltklib.c                          (char *) NULL);
NULL             2831 ext/tk/tcltklib.c                          objv[0], " [ idletasks ]\"", (char *) NULL);
NULL             2841 ext/tk/tcltklib.c     ret = RTEST(lib_eventloop_launcher(0, flags, (int *)NULL, interp)); /* ignore result */
NULL             2924 ext/tk/tcltklib.c     static CONST char *updateOptions[] = {"idletasks", (char *) NULL};
NULL             2929 ext/tk/tcltklib.c     if (interp == (Tcl_Interp*)NULL) {
NULL             2974 ext/tk/tcltklib.c                     "\": must be idletasks", (char *) NULL);
NULL             2988 ext/tk/tcltklib.c                          (char *) NULL);
NULL             2991 ext/tk/tcltklib.c                          objv[0], " [ idletasks ]\"", (char *) NULL);
NULL             3065 ext/tk/tcltklib.c     return (char *) NULL;
NULL             3090 ext/tk/tcltklib.c     if (interp == (Tcl_Interp*)NULL) {
NULL             3131 ext/tk/tcltklib.c                          nameString, " name\"", (char *) NULL);
NULL             3225 ext/tk/tcltklib.c                          "\":  would wait forever", (char *) NULL);
NULL             3272 ext/tk/tcltklib.c     return (char *) NULL;
NULL             3324 ext/tk/tcltklib.c                                            (char *) NULL };
NULL             3331 ext/tk/tcltklib.c     if (interp == (Tcl_Interp*)NULL) {
NULL             3364 ext/tk/tcltklib.c                          (char *) NULL);
NULL             3368 ext/tk/tcltklib.c                          (char *) NULL);
NULL             3415 ext/tk/tcltklib.c                              (char *) NULL);
NULL             3505 ext/tk/tcltklib.c         if (!tk_stubs_init_p() || Tk_MainWindow(interp) == (Tk_Window)NULL) {
NULL             3506 ext/tk/tcltklib.c             window = NULL;
NULL             3511 ext/tk/tcltklib.c         if (window == NULL) {
NULL             3514 ext/tk/tcltklib.c                              (char*)NULL);
NULL             3572 ext/tk/tcltklib.c                              (char *) NULL);
NULL             3602 ext/tk/tcltklib.c         if (!tk_stubs_init_p() || Tk_MainWindow(interp) == (Tk_Window)NULL) {
NULL             3603 ext/tk/tcltklib.c             window = NULL;
NULL             3612 ext/tk/tcltklib.c         if (window == NULL) {
NULL             3615 ext/tk/tcltklib.c                              (char*)NULL);
NULL             3708 ext/tk/tcltklib.c     return (char *)NULL;
NULL             3768 ext/tk/tcltklib.c     if (interp == (Tcl_Interp*)NULL) {
NULL             3800 ext/tk/tcltklib.c                          nameString, " name\"", (char *) NULL);
NULL             3895 ext/tk/tcltklib.c                                            (char *) NULL };
NULL             3903 ext/tk/tcltklib.c     if (interp == (Tcl_Interp*)NULL) {
NULL             3933 ext/tk/tcltklib.c                          (char *) NULL);
NULL             3937 ext/tk/tcltklib.c                          (char *) NULL);
NULL             3985 ext/tk/tcltklib.c                              (char *) NULL);
NULL             4067 ext/tk/tcltklib.c         if (!tk_stubs_init_p() || Tk_MainWindow(interp) == (Tk_Window)NULL) {
NULL             4068 ext/tk/tcltklib.c             window = NULL;
NULL             4073 ext/tk/tcltklib.c         if (window == NULL) {
NULL             4076 ext/tk/tcltklib.c                              (char*)NULL);
NULL             4124 ext/tk/tcltklib.c                              (char *) NULL);
NULL             4156 ext/tk/tcltklib.c         if (!tk_stubs_init_p() || Tk_MainWindow(interp) == (Tk_Window)NULL) {
NULL             4157 ext/tk/tcltklib.c             window = NULL;
NULL             4166 ext/tk/tcltklib.c         if (window == NULL) {
NULL             4169 ext/tk/tcltklib.c                              (char*)NULL);
NULL             4279 ext/tk/tcltklib.c         if (Tcl_ListObjLength((Tcl_Interp*)NULL, slave_list, &len) == TCL_OK) {
NULL             4281 ext/tk/tcltklib.c                 Tcl_ListObjIndex((Tcl_Interp*)NULL, slave_list, i, &elem);
NULL             4284 ext/tk/tcltklib.c                 if (elem == (Tcl_Obj*)NULL) continue;
NULL             4288 ext/tk/tcltklib.c                 slave_name = Tcl_GetStringFromObj(elem, (int*)NULL);
NULL             4294 ext/tk/tcltklib.c                 if (slave == (Tcl_Interp*)NULL) continue;
NULL             4328 ext/tk/tcltklib.c         if (Tcl_SplitList((Tcl_Interp*)NULL,
NULL             4336 ext/tk/tcltklib.c                 if (slave == (Tcl_Interp*)NULL) continue;
NULL             4368 ext/tk/tcltklib.c     if (ip == (Tcl_Interp*)NULL) {
NULL             4400 ext/tk/tcltklib.c     if (tk_stubs_init_p() && Tk_MainWindow(ip) != (Tk_Window)NULL) {
NULL             4446 ext/tk/tcltklib.c         if ( ptr->ip != (Tcl_Interp*)NULL
NULL             4448 ext/tk/tcltklib.c              && Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL
NULL             4459 ext/tk/tcltklib.c         if (ptr->ip == (Tcl_Interp*)NULL) {
NULL             4497 ext/tk/tcltklib.c                          (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             4501 ext/tk/tcltklib.c                       (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             4508 ext/tk/tcltklib.c                          (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             4512 ext/tk/tcltklib.c                       (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             4519 ext/tk/tcltklib.c                          (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             4523 ext/tk/tcltklib.c                       (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             4530 ext/tk/tcltklib.c                          (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             4534 ext/tk/tcltklib.c                       (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             4541 ext/tk/tcltklib.c                          (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             4545 ext/tk/tcltklib.c                       (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             4552 ext/tk/tcltklib.c                          (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             4556 ext/tk/tcltklib.c                       (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             4578 ext/tk/tcltklib.c                          "invalid command name \"namespace\"", (char*)NULL);
NULL             4596 ext/tk/tcltklib.c             argv[i] = Tcl_GetStringFromObj(objv[i], (int*)NULL);
NULL             4598 ext/tk/tcltklib.c         argv[objc] = (char *)NULL;
NULL             4635 ext/tk/tcltklib.c                          (ClientData) 0, (Tcl_CmdDeleteProc *)NULL);
NULL             4672 ext/tk/tcltklib.c     Tk_Window mainWin = (Tk_Window)NULL;
NULL             4692 ext/tk/tcltklib.c     if (ptr->ip == NULL) {
NULL             4717 ext/tk/tcltklib.c         == (Tcl_Namespace*)NULL) {
NULL             4789 ext/tk/tcltklib.c                           (Tcl_PackageInitProc *) NULL);
NULL             4800 ext/tk/tcltklib.c     Tcl_CreateObjCommand(ptr->ip, "ruby", ip_ruby_eval, (ClientData)NULL,
NULL             4801 ext/tk/tcltklib.c                          (Tcl_CmdDeleteProc *)NULL);
NULL             4803 ext/tk/tcltklib.c     Tcl_CreateObjCommand(ptr->ip, "ruby_eval", ip_ruby_eval, (ClientData)NULL,
NULL             4804 ext/tk/tcltklib.c                          (Tcl_CmdDeleteProc *)NULL);
NULL             4806 ext/tk/tcltklib.c     Tcl_CreateObjCommand(ptr->ip, "ruby_cmd", ip_ruby_cmd, (ClientData)NULL,
NULL             4807 ext/tk/tcltklib.c                          (Tcl_CmdDeleteProc *)NULL);
NULL             4810 ext/tk/tcltklib.c     Tcl_CreateCommand(ptr->ip, "ruby", ip_ruby_eval, (ClientData)NULL,
NULL             4811 ext/tk/tcltklib.c                       (Tcl_CmdDeleteProc *)NULL);
NULL             4813 ext/tk/tcltklib.c     Tcl_CreateCommand(ptr->ip, "ruby_eval", ip_ruby_eval, (ClientData)NULL,
NULL             4814 ext/tk/tcltklib.c                       (Tcl_CmdDeleteProc *)NULL);
NULL             4816 ext/tk/tcltklib.c     Tcl_CreateCommand(ptr->ip, "ruby_cmd", ip_ruby_cmd, (ClientData)NULL,
NULL             4817 ext/tk/tcltklib.c                       (Tcl_CmdDeleteProc *)NULL);
NULL             4824 ext/tk/tcltklib.c                          (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             4827 ext/tk/tcltklib.c                          (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             4830 ext/tk/tcltklib.c                          (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             4834 ext/tk/tcltklib.c                       (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             4837 ext/tk/tcltklib.c                       (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             4840 ext/tk/tcltklib.c                       (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             4852 ext/tk/tcltklib.c     if (mainWin != (Tk_Window)NULL) {
NULL             4914 ext/tk/tcltklib.c     if (slave->ip == NULL) {
NULL             4930 ext/tk/tcltklib.c     mainWin = (tk_stubs_init_p())? Tk_MainWindow(slave->ip): (Tk_Window)NULL;
NULL             4934 ext/tk/tcltklib.c                          (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             4938 ext/tk/tcltklib.c                       (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             5036 ext/tk/tcltklib.c     if (Tcl_GetVar(ptr->ip,"tcl_interactive",TCL_GLOBAL_ONLY) == (char*)NULL) {
NULL             5083 ext/tk/tcltklib.c     return tk_funcall(ip_create_console_core, 0, (VALUE*)NULL, self);
NULL             5108 ext/tk/tcltklib.c     mainWin = (tk_stubs_init_p())? Tk_MainWindow(ptr->ip): (Tk_Window)NULL;
NULL             5112 ext/tk/tcltklib.c                          (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             5116 ext/tk/tcltklib.c                       (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             5133 ext/tk/tcltklib.c     return tk_funcall(ip_make_safe_core, 0, (VALUE*)NULL, self);
NULL             5194 ext/tk/tcltklib.c     mainWin = (tk_stubs_init_p())? Tk_MainWindow(ptr->ip): (Tk_Window)NULL;
NULL             5201 ext/tk/tcltklib.c                              (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             5205 ext/tk/tcltklib.c                           (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             5214 ext/tk/tcltklib.c                              (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             5218 ext/tk/tcltklib.c                           (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
NULL             5232 ext/tk/tcltklib.c     if (ptr == (struct tcltkip *)NULL || ptr->ip == (Tcl_Interp*)NULL) {
NULL             5247 ext/tk/tcltklib.c     ptr->ip = (Tcl_Interp*)NULL;
NULL             5262 ext/tk/tcltklib.c     if (ptr == (struct tcltkip *)NULL || ptr->ip == (Tcl_Interp *)NULL) {
NULL             5299 ext/tk/tcltklib.c     } else if (Tk_MainWindow(ptr->ip) == (Tk_Window)NULL) {
NULL             5948 ext/tk/tcltklib.c     return tk_funcall(lib_restart_core, 0, (VALUE*)NULL, self);
NULL             5967 ext/tk/tcltklib.c     if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
NULL             6000 ext/tk/tcltklib.c         interp = (Tcl_Interp *)NULL;
NULL             6006 ext/tk/tcltklib.c             interp = (Tcl_Interp *)NULL;
NULL             6021 ext/tk/tcltklib.c                     encoding = (Tcl_Encoding)NULL;
NULL             6025 ext/tk/tcltklib.c                         encoding = (Tcl_Encoding)NULL;
NULL             6029 ext/tk/tcltklib.c                         if (encoding == (Tcl_Encoding)NULL) {
NULL             6041 ext/tk/tcltklib.c                 if (encoding == (Tcl_Encoding)NULL) {
NULL             6046 ext/tk/tcltklib.c             encoding = (Tcl_Encoding)NULL;
NULL             6051 ext/tk/tcltklib.c         if (encoding == (Tcl_Encoding)NULL) {
NULL             6081 ext/tk/tcltklib.c     if (encoding != (Tcl_Encoding)NULL) {
NULL             6147 ext/tk/tcltklib.c         interp = (Tcl_Interp *)NULL;
NULL             6148 ext/tk/tcltklib.c     } else if (get_ip(ip_obj) == (struct tcltkip *)NULL) {
NULL             6149 ext/tk/tcltklib.c         interp = (Tcl_Interp *)NULL;
NULL             6172 ext/tk/tcltklib.c             encoding = (Tcl_Encoding)NULL;
NULL             6176 ext/tk/tcltklib.c                 encoding = (Tcl_Encoding)NULL;
NULL             6180 ext/tk/tcltklib.c                 if (encoding == (Tcl_Encoding)NULL) {
NULL             6206 ext/tk/tcltklib.c         if (encoding == (Tcl_Encoding)NULL) {
NULL             6240 ext/tk/tcltklib.c     if (encoding != (Tcl_Encoding)NULL) {
NULL             6353 ext/tk/tcltklib.c     return rb_str_new2(Tcl_GetEncodingName((Tcl_Encoding)NULL));
NULL             6368 ext/tk/tcltklib.c         Tcl_SetSystemEncoding((Tcl_Interp *)NULL, (CONST char *)NULL);
NULL             6373 ext/tk/tcltklib.c     if (Tcl_SetSystemEncoding((Tcl_Interp *)NULL,
NULL             6407 ext/tk/tcltklib.c     char **argv = (char **)NULL;
NULL             6418 ext/tk/tcltklib.c         argv[argc] = (char *)NULL;
NULL             6480 ext/tk/tcltklib.c     char **argv = (char **)NULL;
NULL             6548 ext/tk/tcltklib.c             unknown_objv[++objc] = (Tcl_Obj*)NULL;
NULL             6554 ext/tk/tcltklib.c             unknown_argv[++argc] = (char *)NULL;
NULL             6609 ext/tk/tcltklib.c         argv[argc] = (char *)NULL;
NULL             6710 ext/tk/tcltklib.c     av[argc] = NULL;
NULL             6718 ext/tk/tcltklib.c     av[argc] = NULL;
NULL             6757 ext/tk/tcltklib.c     Tcl_Obj **av = (Tcl_Obj **)NULL;
NULL             6759 ext/tk/tcltklib.c     char **av = (char **)NULL;
NULL             6867 ext/tk/tcltklib.c     Tcl_Obj **av = (Tcl_Obj **)NULL;
NULL             6869 ext/tk/tcltklib.c     char **av = (char **)NULL;
NULL             7027 ext/tk/tcltklib.c                                 NIL_P(index) ? NULL : RSTRING(index)->ptr,
NULL             7031 ext/tk/tcltklib.c         if (ret == (Tcl_Obj*)NULL) {
NULL             7062 ext/tk/tcltklib.c                               NIL_P(index) ? NULL : RSTRING(index)->ptr,
NULL             7066 ext/tk/tcltklib.c         if (ret == (char*)NULL) {
NULL             7161 ext/tk/tcltklib.c                                 NIL_P(index) ? NULL : RSTRING(index)->ptr,
NULL             7167 ext/tk/tcltklib.c         if (ret == (Tcl_Obj*)NULL) {
NULL             7199 ext/tk/tcltklib.c                               NIL_P(index) ? NULL : RSTRING(index)->ptr,
NULL             7203 ext/tk/tcltklib.c         if (ret == (char*)NULL) {
NULL             7281 ext/tk/tcltklib.c                                       NIL_P(index) ? NULL : RSTRING(index)->ptr,
NULL             7404 ext/tk/tcltklib.c         interp = (Tcl_Interp *)NULL;
NULL             7405 ext/tk/tcltklib.c     } else if (get_ip(ip_obj) == (struct tcltkip *)NULL) {
NULL             7406 ext/tk/tcltklib.c         interp = (Tcl_Interp *)NULL;
NULL             7429 ext/tk/tcltklib.c             if (interp == (Tcl_Interp*)NULL) {
NULL             7473 ext/tk/tcltklib.c             if (interp == (Tcl_Interp*)NULL) {
NULL              962 ext/tk/tkutil/tkutil.c     if (RSTRING(value)->ptr == (char*)NULL) return Qnil;
NULL             1020 ext/tk/tkutil/tkutil.c     if (RSTRING(value)->ptr == (char*)NULL) return INT2FIX(0);
NULL             1058 ext/tk/tkutil/tkutil.c     if (RSTRING(value)->ptr == (char*)NULL) return rb_tainted_str_new2("");
NULL             1070 ext/tk/tkutil/tkutil.c     if (RSTRING(value)->ptr == (char*)NULL) return rb_tainted_str_new2("");
NULL             1102 ext/tk/tkutil/tkutil.c         if (ptr->key != (char*)NULL) free(ptr->key);
NULL             1103 ext/tk/tkutil/tkutil.c         if (ptr->type != (char*)NULL) free(ptr->type);
NULL             1104 ext/tk/tkutil/tkutil.c         if (ptr->ivar != (ID*)NULL) free(ptr->ivar);
NULL             1454 ext/tk/tkutil/tkutil.c           if (ptr == (char*)NULL) {
NULL              155 ext/win32ole/win32ole.c static HINSTANCE ghhctrl = NULL;
NULL              156 ext/win32ole/win32ole.c static HINSTANCE gole32 = NULL;
NULL              157 ext/win32ole/win32ole.c static FNCOCREATEINSTANCEEX *gCoCreateInstanceEx = NULL;
NULL              487 ext/win32ole/win32ole.c     size = WideCharToMultiByte(cWIN32OLE_cp, 0, pw, -1, NULL, 0, NULL, NULL);
NULL              490 ext/win32ole/win32ole.c         WideCharToMultiByte(cWIN32OLE_cp, 0, pw, -1, pm, size, NULL, NULL);
NULL              504 ext/win32ole/win32ole.c     char *p_msg = NULL;
NULL              505 ext/win32ole/win32ole.c     char *term = NULL;
NULL              515 ext/win32ole/win32ole.c                             NULL, hr, LOCALE_SYSTEM_DEFAULT,
NULL              516 ext/win32ole/win32ole.c                             (LPTSTR)&p_msg, 0, NULL);
NULL              538 ext/win32ole/win32ole.c     char *pSource = NULL;
NULL              539 ext/win32ole/win32ole.c     char *pDescription = NULL;
NULL              541 ext/win32ole/win32ole.c     if(pExInfo->pfnDeferredFillIn != NULL) {
NULL              544 ext/win32ole/win32ole.c     if (pExInfo->bstrSource != NULL) {
NULL              547 ext/win32ole/win32ole.c     if (pExInfo->bstrDescription != NULL) {
NULL              557 ext/win32ole/win32ole.c     if(pSource != NULL) {
NULL              564 ext/win32ole/win32ole.c     if(pDescription != NULL) {
NULL              618 ext/win32ole/win32ole.c         hr = OleInitialize(NULL);
NULL              635 ext/win32ole/win32ole.c     while(PeekMessage(&msg,NULL,0,0,PM_REMOVE)) {
NULL              684 ext/win32ole/win32ole.c     size = MultiByteToWideChar(cWIN32OLE_cp, 0, pm, len, NULL, 0);
NULL              685 ext/win32ole/win32ole.c     pw = SysAllocStringLen(NULL, size - 1);
NULL              803 ext/win32ole/win32ole.c         if (psa == NULL)
NULL              819 ext/win32ole/win32ole.c         else if (psa != NULL)
NULL             1053 ext/win32ole/win32ole.c         pole->pDispatch = NULL;
NULL             1068 ext/win32ole/win32ole.c     pole->pDispatch = NULL;
NULL             1229 ext/win32ole/win32ole.c         if (pDispatch != NULL ) {
NULL             1249 ext/win32ole/win32ole.c         if(punk != NULL) {
NULL             1315 ext/win32ole/win32ole.c                             NULL, NULL, NULL, &ft);
NULL             1418 ext/win32ole/win32ole.c             typelib = reg_get_val(hversion, NULL);
NULL             1468 ext/win32ole/win32ole.c     char *pName = NULL;
NULL             1508 ext/win32ole/win32ole.c                     pName = NULL;
NULL             1545 ext/win32ole/win32ole.c         err = RegQueryValueEx(hpid, "", NULL, &dwtype, clsid, &len);
NULL             1601 ext/win32ole/win32ole.c     hr = gCoCreateInstanceEx(&clsid, NULL, clsctx, &serverinfo, 1, &multi_qi);
NULL             1644 ext/win32ole/win32ole.c     hr = pMoniker->lpVtbl->BindToObject(pMoniker, pBindCtx, NULL,
NULL             1836 ext/win32ole/win32ole.c                                                 &bstr, NULL, NULL, NULL);
NULL             2089 ext/win32ole/win32ole.c     hr = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER,
NULL             2176 ext/win32ole/win32ole.c     VARIANTARG* realargs = NULL;
NULL             2187 ext/win32ole/win32ole.c     op.dp.rgvarg = NULL;
NULL             2188 ext/win32ole/win32ole.c     op.dp.rgdispidNamedArgs = NULL;
NULL             2232 ext/win32ole/win32ole.c             op.pNamedArgs[i] = NULL;
NULL             2399 ext/win32ole/win32ole.c     VARIANTARG* realargs = NULL;
NULL             2717 ext/win32ole/win32ole.c     pBuf[0] = NULL;
NULL             2728 ext/win32ole/win32ole.c                                          NULL, &excepinfo, &argErr);
NULL             2757 ext/win32ole/win32ole.c     pole->pDispatch = NULL;
NULL             2769 ext/win32ole/win32ole.c     while(pEnum->lpVtbl->Next(pEnum, 1, &variant, NULL) == S_OK) {
NULL             2814 ext/win32ole/win32ole.c     IEnumVARIANT *pEnum = NULL;
NULL             2817 ext/win32ole/win32ole.c     dispParams.rgvarg = NULL;
NULL             2818 ext/win32ole/win32ole.c     dispParams.rgdispidNamedArgs = NULL;
NULL             2909 ext/win32ole/win32ole.c                                                  &bstr, NULL, NULL, NULL);
NULL             2920 ext/win32ole/win32ole.c         pFuncDesc=NULL;
NULL             2979 ext/win32ole/win32ole.c         pstr = NULL;
NULL             2985 ext/win32ole/win32ole.c                                                  &bstr, NULL, NULL, NULL);
NULL             2997 ext/win32ole/win32ole.c         pFuncDesc=NULL;
NULL             3055 ext/win32ole/win32ole.c                                              NULL, NULL, NULL);
NULL             3065 ext/win32ole/win32ole.c                                                 &bstr, NULL, NULL, NULL);
NULL             3184 ext/win32ole/win32ole.c                                              &bstr, NULL, NULL, NULL);
NULL             3354 ext/win32ole/win32ole.c     hr = ole_docinfo_from_type(pRefTypeInfo, &bstr, NULL, NULL, NULL);
NULL             3699 ext/win32ole/win32ole.c     poletype->pTypeInfo = NULL;
NULL             3739 ext/win32ole/win32ole.c                                                 &bstr, NULL, NULL, NULL);
NULL             3872 ext/win32ole/win32ole.c             tlib = reg_get_val(hversion, NULL);
NULL             3888 ext/win32ole/win32ole.c 	        tlib = reg_get_val(hversion, NULL);
NULL             3941 ext/win32ole/win32ole.c             tlib = reg_get_val(hversion, NULL);
NULL             4524 ext/win32ole/win32ole.c     hr = ole_docinfo_from_type(pTypeInfo, NULL, &bhelpstr, NULL, NULL);
NULL             4591 ext/win32ole/win32ole.c     hr = ole_docinfo_from_type(pTypeInfo, NULL, NULL, NULL, &bhelpfile);
NULL             4622 ext/win32ole/win32ole.c     hr = ole_docinfo_from_type(pTypeInfo, NULL, NULL,
NULL             4623 ext/win32ole/win32ole.c                                &helpcontext, NULL);
NULL             4745 ext/win32ole/win32ole.c         pstr = NULL;
NULL             4760 ext/win32ole/win32ole.c         pVarDesc = NULL;
NULL             5165 ext/win32ole/win32ole.c     pmethod->pTypeInfo = NULL;
NULL             5166 ext/win32ole/win32ole.c     pmethod->pOwnerTypeInfo = NULL;
NULL             5500 ext/win32ole/win32ole.c                                                         &bstr, NULL, NULL, NULL);
NULL             5561 ext/win32ole/win32ole.c         hr = ole_docinfo_from_type(pmethod->pTypeInfo, &name, NULL, NULL, NULL);
NULL             5597 ext/win32ole/win32ole.c     hr = ole_method_docinfo_from_type(pTypeInfo, method_index, NULL, &bhelpstring,
NULL             5598 ext/win32ole/win32ole.c                                       NULL, NULL);
NULL             5631 ext/win32ole/win32ole.c     hr = ole_method_docinfo_from_type(pTypeInfo, method_index, NULL, NULL,
NULL             5632 ext/win32ole/win32ole.c                                       NULL, &bhelpfile);
NULL             5665 ext/win32ole/win32ole.c     hr = ole_method_docinfo_from_type(pTypeInfo, method_index, NULL, NULL,
NULL             5666 ext/win32ole/win32ole.c                                       &helpcontext, NULL);
NULL             6184 ext/win32ole/win32ole.c         *ppv = NULL;
NULL             6224 ext/win32ole/win32ole.c     *pInfo = NULL;
NULL             6399 ext/win32ole/win32ole.c     if(pEv == NULL) return NULL;
NULL             6404 ext/win32ole/win32ole.c     pEv->pConnectionPoint = NULL;
NULL             6405 ext/win32ole/win32ole.c     pEv->pTypeInfo = NULL;
NULL             6406 ext/win32ole/win32ole.c     pEv->ptr_freed = NULL;
NULL             6413 ext/win32ole/win32ole.c     if(pEVObj != NULL) {
NULL             6496 ext/win32ole/win32ole.c                                                              NULL, NULL, NULL);
NULL             6563 ext/win32ole/win32ole.c         return find_iid(ole, NULL, piid, ppTypeInfo);
NULL             6633 ext/win32ole/win32ole.c     ITypeInfo *pti = NULL;
NULL             6634 ext/win32ole/win32ole.c     IConnectionPoint *pcp = NULL;
NULL             6658 ext/win32ole/win32ole.c     poleev->pEvent = NULL;
NULL              171 file.c             return Data_Wrap_Struct(klass, NULL, free, nst);
NULL              657 file.c         	               FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING,
NULL              658 file.c         	               rb_w32_iswin95() ? 0 : FILE_FLAG_BACKUP_SEMANTICS, NULL);
NULL             2343 file.c             char *last = NULL;
NULL             3394 file.c         	DATA_PTR(obj) = NULL;
NULL             2385 hash.c         	envtbl = rb_hash_s_new(0, NULL, rb_cHash);
NULL              267 io.c               if (fptr->rbuf == NULL) {
NULL              463 io.c               return rb_thread_select(rb_fd_max(rfds), rb_fd_ptr(rfds), NULL, NULL, NULL);
NULL              490 io.c           	rb_thread_select(f + 1, &rfds, NULL, NULL, NULL);
NULL              506 io.c               return rb_thread_select(rb_fd_max(wfds), NULL, rb_fd_ptr(wfds), NULL, NULL);
NULL              533 io.c           	rb_thread_select(f + 1, NULL, &wfds, NULL, NULL);
NULL              550 io.c               if (fptr->wbuf == NULL && !(fptr->mode & FMODE_SYNC)) {
NULL              621 io.c               of.path = NULL;
NULL              873 io.c               if (fptr->rbuf == NULL) {
NULL             2418 io.c               return NULL;		/* not reached */
NULL             2554 io.c               return NULL;		/* not reached */
NULL             2591 io.c               if (setvbuf(file, NULL, _IOFBF, 0) != 0)
NULL             2633 io.c               if (setvbuf(file, NULL, _IOFBF, 0) != 0)
NULL             2838 io.c               char *exename = NULL;
NULL             2919 io.c           	args[i] = NULL;
NULL             3425 io.c                   if (setvbuf(fptr->stdio_file, NULL, _IOFBF, 0) != 0)
NULL             3907 io.c               OpenFile *fp, *ofp = NULL;
NULL             5193 io.c                       str = rb_str_new(NULL, 0);
NULL             5434 io.c           	{NULL, 0}
NULL               30 main.c             always_gc = getenv("RUBY_ALWAYS_GC") != NULL;
NULL               89 missing/alloca.c   static char	*addr = NULL;	/* address of first
NULL               93 missing/alloca.c   if (addr == NULL)
NULL              140 missing/alloca.c static header *last_alloca_header = NULL; /* -> last alloca header */
NULL              159 missing/alloca.c     for (hp = last_alloca_header; hp != NULL;)
NULL              176 missing/alloca.c     return NULL;		/* no allocation required */
NULL              498 missing/crypt.c 		return (NULL);
NULL              509 missing/crypt.c 				return (NULL);
NULL              516 missing/crypt.c 				return (NULL);
NULL              548 missing/crypt.c 		return (NULL);
NULL               63 missing/os2.c      if ((shell = getenv("RUBYSHELL")) != NULL && *shell != '\0') {
NULL               72 missing/os2.c      } else if ((shell = getenv("SHELL")) != NULL && *shell != '\0') {
NULL               81 missing/os2.c      } else if ((shell = getenv("COMSPEC")) != NULL && *shell != '\0') {
NULL              111 missing/os2.c  	    status = spawnlp(P_WAIT,shell,shell,sw,cmd,(char*)NULL);
NULL              127 missing/os2.c      *a = NULL;
NULL              186 missing/strftime.c 	static char *savetz = NULL;
NULL              225 missing/strftime.c 	if (s == NULL || format == NULL || timeptr == NULL || maxsize == 0)
NULL              229 missing/strftime.c 	if (strchr(format, '%') == NULL && strlen(format) + 1 >= maxsize)
NULL              240 missing/strftime.c 		if (tz != NULL) {
NULL              244 missing/strftime.c 			if (savetz != NULL) {
NULL              823 missing/strftime.c #ifndef NULL
NULL              873 missing/strftime.c 	(char *) NULL
NULL               40 missing/strtod.c #ifndef NULL
NULL              263 missing/strtod.c     if (endPtr != NULL) {
NULL              122 missing/vsnprintf.c #ifndef NULL
NULL              809 missing/vsnprintf.c 			if ((cp = va_arg(ap, char *)) == NULL)
NULL              819 missing/vsnprintf.c 				if (p != NULL) {
NULL             2495 parse.y        			if ($3 == NULL) {
NULL             5385 parse.y        	    if ((c = tokadd_string(func, '\n', 0, NULL)) == -1) goto error;
NULL             8666 parse.y            parser->parser_tokenbuf = NULL;
NULL             8688 parse.y            parser->heap = NULL;
NULL             8802 parse.y            if (ptr && (n = parserp->heap) != NULL) {
NULL             8809 parse.y        	} while ((n = n->u2.node) != NULL);
NULL             8821 parse.y            while ((n = *prev) != NULL) {
NULL             8972 parse.y            {0, NULL}
NULL             8984 parse.y            return NULL;
NULL              566 process.c          result = wait4(pid, st, flags, NULL);
NULL              585 process.c      	st_delete(pid_tbl, (st_data_t*)&pid, NULL);
NULL              943 process.c      	if ((extension = strrchr(prog, '.')) != NULL && strcasecmp(extension, ".bat") == 0) {
NULL             1007 process.c      	    const char *p, *nl = NULL;
NULL             1027 process.c      		execl(shell, "sh", "-c", str, (char *) NULL);
NULL             1035 process.c      	    execl("/bin/sh", "sh", "-c", str, (char *)NULL);
NULL             1046 process.c      	while (t = strtok(NULL, " \t")) {
NULL             1049 process.c      	*a = NULL;
NULL             1083 process.c          if ((extension = strrchr(prog, '.')) != NULL && strcasecmp(extension, ".bat") == 0) {
NULL             1145 process.c      	    status = shell?spawnl(P_WAIT,shell,"sh","-c",str,(char*)NULL):system(str);
NULL             1155 process.c      	while (t = strtok(NULL, " \t"))
NULL             1157 process.c      	*a = NULL;
NULL             1816 process.c          ioctl(fd, TIOCNOTTY, NULL);
NULL             2653 process.c      		if (gr == NULL)
NULL             3712 process.c          S_Tms = rb_struct_define("Tms", "utime", "stime", "cutime", "cstime", NULL);
NULL              401 range.c        	range_each_func(range, each_i, beg, end, NULL);
NULL              478 re.c           		 err = (onig_compile(rp, ptr, ptr + len, NULL) != 0);
NULL               66 regcomp.c        else return NULL;
NULL             1326 regcomp.c      	if (NCONS(x).right != NULL) {
NULL             2985 regcomp.c              root = onig_node_new_list(snode, NULL);
NULL             2990 regcomp.c      	*tailp = onig_node_new_list(snode, NULL);
NULL             3032 regcomp.c            root = onig_node_new_list(snode, NULL);
NULL             3037 regcomp.c            *tailp = onig_node_new_list(snode, NULL);
NULL             3193 regcomp.c      	    tqn->head_exact = NULL;
NULL             4439 regcomp.c        reg->exact_end     = (UChar* )NULL;
NULL             4443 regcomp.c          reg->exact = (UChar* )NULL;
NULL             4636 regcomp.c          prev->chain = (regex_t* )NULL;
NULL             4676 regcomp.c        reg->chain = (regex_t* )NULL;
NULL             4755 regcomp.c        reg->repeat_range       = (OnigRepeatRange* )NULL;
NULL             4817 regcomp.c          scan_env.mem_nodes_dynamic = (Node** )NULL;
NULL             4924 regcomp.c        (*reg)->exact            = (UChar* )NULL;
NULL             4925 regcomp.c        (*reg)->int_map          = (int* )NULL;
NULL             4926 regcomp.c        (*reg)->int_map_backward = (int* )NULL;
NULL             4927 regcomp.c        (*reg)->chain            = (regex_t* )NULL;
NULL             4929 regcomp.c        (*reg)->p                = (UChar* )NULL;
NULL             4932 regcomp.c        (*reg)->name_table       = (void* )NULL;
NULL             4947 regcomp.c        if (IS_NOT_NULL(einfo)) einfo->par = (UChar* )NULL;
NULL             4956 regcomp.c          *reg = NULL;
NULL               74 regenc.c           if (prev) *prev = (const UChar* )NULL; /* Sorry */
NULL               83 regenc.c           return (UChar* )NULL;
NULL               93 regenc.c             return (UChar* )NULL;
NULL              107 regenc.c         return (q <= end ? q : NULL);
NULL               37 regenc.h       #ifndef NULL
NULL               57 regenc.h       #define ONIG_CHECK_NULL_RETURN(p)          if (ONIG_IS_NULL(p)) return NULL
NULL             1263 regexec.c            onig_print_compiled_byte_code(stderr, p, NULL, encode);
NULL             2605 regexec.c        return (UChar* )NULL;
NULL             2664 regexec.c        return (UChar* )NULL;
NULL             2696 regexec.c        return (UChar* )NULL;
NULL             2722 regexec.c        return (UChar* )NULL;
NULL             2761 regexec.c            if (p >= text_end) return (UChar* )NULL;
NULL             2781 regexec.c            if (p >= text_end) return (UChar* )NULL;
NULL             2790 regexec.c        return (UChar* )NULL;
NULL             2828 regexec.c        return (UChar* )NULL;
NULL             2878 regexec.c        return (UChar* )NULL;
NULL             2892 regexec.c        return (UChar* )NULL;
NULL             2907 regexec.c        return (UChar* )NULL;
NULL             2963 regexec.c        UChar *p, *pprev = (UChar* )NULL;
NULL             3322 regexec.c            prev = (UChar* )NULL;
NULL             3343 regexec.c            prev = (UChar* )NULL;
NULL             3386 regexec.c      				   &low, &high, (UChar** )NULL)) goto mismatch;
NULL              228 regint.h       #define CHECK_NULL_RETURN(p)          if (IS_NULL(p)) return NULL
NULL              464 regparse.c       reg->name_table = (void* )NULL;
NULL              474 regparse.c       e = (NameEntry* )NULL;
NULL              620 regparse.c     	e->name       = NULL;
NULL              625 regparse.c     	e->back_refs = (int* )NULL;
NULL              630 regparse.c           t->e = NULL;
NULL              648 regparse.c       reg->name_table = NULL;
NULL              667 regparse.c       return (NameEntry* )NULL;
NULL              732 regparse.c         e->back_refs  = (int* )NULL;
NULL              740 regparse.c           t->e     = NULL;
NULL              763 regparse.c     	t->e[i].name       = NULL;
NULL              767 regparse.c     	t->e[i].back_refs  = (int* )NULL;
NULL              900 regparse.c       env->error             = (UChar* )NULL;
NULL              901 regparse.c       env->error_end         = (UChar* )NULL;
NULL              908 regparse.c       env->mem_nodes_dynamic = (Node** )NULL;
NULL              963 regparse.c     static FreeNode* FreeNodeList = (FreeNode* )NULL;
NULL             1093 regparse.c       cc->mbuf  = NULL;
NULL             1135 regparse.c         cc->mbuf = NULL;
NULL             1144 regparse.c         CHECK_NULL_RETURN_VAL(bbuf, NULL);
NULL             1209 regparse.c       NANCHOR(node).target   = NULL;
NULL             1224 regparse.c       NBACKREF(node).back_dynamic = (int* )NULL;
NULL             1244 regparse.c           return NULL;
NULL             1277 regparse.c       NQUALIFIER(node).target = NULL;
NULL             1299 regparse.c       NEFFECT(node).target    = NULL;
NULL             1417 regparse.c         return NULL;
NULL             1439 regparse.c       return node_new_str(NULL, NULL);
NULL             1681 regparse.c       *pbuf = (BBuf* )NULL;
NULL             1725 regparse.c       *pbuf = (BBuf* )NULL;
NULL             1821 regparse.c       *pbuf = (BBuf* )NULL;
NULL             3618 regparse.c         { (UChar* )NULL, -1, 0 }
NULL             3689 regparse.c         { (UChar* )NULL, -1, 0 }
NULL             3921 regparse.c       prev_cc = (CClassNode* )NULL;
NULL             4249 regparse.c       *np = NULL;
NULL             4685 regparse.c       *np = NULL;
NULL             5041 regparse.c     	*targetp = node_new_list(*targetp, NULL);
NULL             5043 regparse.c     	tmp = NCONS(*targetp).right = node_new_list(qn, NULL);
NULL             5061 regparse.c       *top = NULL;
NULL             5069 regparse.c         *top  = node_new_list(node, NULL);
NULL             5081 regparse.c     	*headp = node_new_list(node, NULL);
NULL             5098 regparse.c       *top = NULL;
NULL             5109 regparse.c         *top  = node_new_alt(node, NULL);
NULL             5117 regparse.c           *headp = node_new_alt(node, NULL);
NULL             5168 regparse.c       *root = NULL;
NULL              100 ruby.c         NULL
NULL              263 ruby.c             HMODULE libruby = NULL;
NULL              861 ruby.c         	if (fp == NULL) {
NULL             1002 ruby.c             if (!environ || (s = environ[0]) == NULL) return;
NULL             1067 ruby.c         	    ruby_setenv("", NULL); /* duplicate environ vars */
NULL               65 rubyio.h           fp->stdio_file = NULL;\
NULL               69 rubyio.h           fp->path = NULL;\
NULL               72 rubyio.h           fp->wbuf = NULL;\
NULL               76 rubyio.h           fp->rbuf = NULL;\
NULL              168 signal.c           {NULL, 0}
NULL              705 signal.c           sigprocmask(SIG_SETMASK, &arg->mask, NULL);
NULL              719 signal.c           sigprocmask(SIG_SETMASK, &trap_last_mask, NULL);
NULL              873 signal.c           sigprocmask(SIG_SETMASK, &mask, NULL);
NULL              495 time.c         	    (tm = (utc_p ? gmtime : localtime)(&guess)) != NULL) {
NULL              921 util.c             if (endPtr != NULL) {
NULL               33 vms/vmsruby_private.c     itemlist[i].retlen = NULL;
NULL               68 win32/win32.c  # define CreateSignal() CreateEvent(NULL, FALSE, FALSE, NULL);
NULL              233 win32/win32.c      static HANDLE current_process_handle = NULL;
NULL              241 win32/win32.c  	return NULL;
NULL              322 win32/win32.c      static asynchronous_func_t locker = NULL;
NULL              335 win32/win32.c  			      (VALUE)_get_osfhandle(fd), oper, NULL,
NULL              359 win32/win32.c  	else if (SHGetSpecialFolderLocation(NULL, CSIDL_PERSONAL, &pidl) == 0) {
NULL              458 win32/win32.c      return NULL;
NULL              470 win32/win32.c      return NULL;
NULL              477 win32/win32.c      child->hProcess = NULL;
NULL              488 win32/win32.c  	    child->hProcess = NULL;
NULL              492 win32/win32.c      return NULL;
NULL              712 win32/win32.c      sa.lpSecurityDescriptor = NULL;
NULL              748 win32/win32.c  	    hIn = NULL;
NULL              764 win32/win32.c  	    hOut = NULL;
NULL              769 win32/win32.c  	child = CreateChild(cmd, prog, &sa, hIn, hOut, NULL);
NULL              809 win32/win32.c      child = CreateChild(cmd, prog, NULL, NULL, NULL, NULL);
NULL              851 win32/win32.c      char *p = NULL;
NULL              855 win32/win32.c  	return NULL;
NULL              861 win32/win32.c  	return NULL;
NULL              866 win32/win32.c  	sa.lpSecurityDescriptor = NULL;
NULL              899 win32/win32.c  	if (!(p = dln_find_exe(prog, NULL))) {
NULL              931 win32/win32.c  	    shell = NULL;
NULL              935 win32/win32.c  		    p = dln_find_exe(cmd, NULL);
NULL              952 win32/win32.c  		    p = dln_find_exe(p, NULL);
NULL              970 win32/win32.c  			     psa->bInheritHandle, dwCreationFlags, NULL, NULL,
NULL              977 win32/win32.c  	return NULL;
NULL             1122 win32/win32.c      NtCmdLineElement *cmdhead = NULL, **cmdtail = &cmdhead;
NULL             1131 win32/win32.c  	*vec = NULL;
NULL             1368 win32/win32.c  	return NULL;
NULL             1373 win32/win32.c  	return NULL;
NULL             1381 win32/win32.c      if (p == NULL)
NULL             1382 win32/win32.c  	return NULL;
NULL             1390 win32/win32.c      if (index("/\\:", *CharPrev(scanname, scanname + strlen(scanname))) == NULL)
NULL             1402 win32/win32.c  	return NULL;
NULL             1438 win32/win32.c  	if (p->start == NULL) {
NULL             1445 win32/win32.c  	    if (p->bits == NULL) {
NULL             1475 win32/win32.c  	    dirp->curr = NULL;
NULL             1519 win32/win32.c  	return NULL;
NULL             1641 win32/win32.c      hF = CreateFile("NUL", 0, 0, NULL, OPEN_ALWAYS, 0, NULL);
NULL             1765 win32/win32.c  			  buffer, 512, NULL) == 0) {
NULL             1775 win32/win32.c      while ((p = strpbrk(p, "\r\n")) != NULL) {
NULL             1960 win32/win32.c  	if (PeekNamedPipe((HANDLE)sock, NULL, 0, NULL, &n, NULL)) {
NULL             2129 win32/win32.c  		r += extract_fd(rd, &else_rd, NULL); // move all
NULL             2130 win32/win32.c  		r += extract_fd(wr, &else_wr, NULL); // move all
NULL             2452 win32/win32.c      if (WSAEnumProtocols(NULL, NULL, &proto_buffers_len) == SOCKET_ERROR) {
NULL             2461 win32/win32.c  		WSAEnumProtocols(NULL, proto_buffers, &proto_buffers_len);
NULL             2520 win32/win32.c  	if (r == NULL)
NULL             2537 win32/win32.c  	if (r == NULL)
NULL             2571 win32/win32.c  	if (r == NULL)
NULL             2588 win32/win32.c  	if (r == NULL)
NULL             2605 win32/win32.c  	if (r == NULL)
NULL             2622 win32/win32.c  	if (r == NULL)
NULL             2631 win32/win32.c      const char *localhost = NULL;
NULL             2739 win32/win32.c  struct netent *getnetent (void) {return (struct netent *) NULL;}
NULL             2741 win32/win32.c  struct netent *getnetbyaddr(long net, int type) {return (struct netent *)NULL;}
NULL             2743 win32/win32.c  struct netent *getnetbyname(const char *name) {return (struct netent *)NULL;}
NULL             2745 win32/win32.c  struct protoent *getprotoent (void) {return (struct protoent *) NULL;}
NULL             2747 win32/win32.c  struct servent *getservent (void) {return (struct servent *) NULL;}
NULL             2919 win32/win32.c      if (getcwd(buffer, size) == NULL) {
NULL             2920 win32/win32.c          return NULL;
NULL             2924 win32/win32.c          return NULL;
NULL             2967 win32/win32.c  	    if (hProc == NULL || hProc == INVALID_HANDLE_VALUE) {
NULL             2997 win32/win32.c  	    if (hProc == NULL || hProc == INVALID_HANDLE_VALUE) {
NULL             3028 win32/win32.c      static BOOL (WINAPI *pCreateHardLink)(LPCTSTR, LPCTSTR, LPSECURITY_ATTRIBUTES) = NULL;
NULL             3050 win32/win32.c      if (!pCreateHardLink(to, from, NULL)) {
NULL             3067 win32/win32.c      static char *curitem = NULL;
NULL             3071 win32/win32.c      if (curitem == NULL || curlen == 0) {
NULL             3085 win32/win32.c  	return NULL;
NULL             3487 win32/win32.c      static HANDLE interrupt_done = NULL;
NULL             3510 win32/win32.c  	    interrupt_done = CreateEvent(NULL, FALSE, FALSE, NULL);
NULL             3556 win32/win32.c      RUBY_CRITICAL(ret = wait_events(NULL, msec));
NULL             3566 win32/win32.c      RUBY_CRITICAL(wait_events(NULL, 0));
NULL             3666 win32/win32.c  	arg.stackaddr = NULL;
NULL             3673 win32/win32.c  	thr = CreateThread(NULL, 0, call_asynchronous, &arg, 0, &val);
NULL             3749 win32/win32.c      *myenv = NULL;
NULL             3868 win32/win32.c  	    if (!SetFileTime(hFile, NULL, &atime, &mtime)) {
NULL             3904 win32/win32.c  	if (CreateDirectory(path, NULL) == FALSE) {
NULL             3993 win32/win32.c      if (f == NULL && errno == 0) {
NULL             4004 win32/win32.c      if (f == NULL && errno == 0) {
NULL             4017 win32/win32.c      if (f == NULL && errno == 0) {
NULL                9 win32/winmain.c     return main(0, NULL, NULL);
NULL               49 wince/direct.c 	rc = CreateDirectoryW(wdir, NULL);
NULL               73 wince/io_wce.c 	h = CreateFileW(wfile, access, share, NULL,
NULL               74 wince/io_wce.c 			create, 0, NULL );
NULL               89 wince/io_wce.c 	ReadFile( (HANDLE)fd, buffer, length, &dw, NULL );
NULL               96 wince/io_wce.c 	WriteFile( (HANDLE)fd, buffer, count, &dw, NULL );
NULL              112 wince/io_wce.c 	ret = SetFilePointer( (HANDLE)handle, offset, NULL, flag );
NULL              124 wince/io_wce.c 	if( h==NULL )
NULL               55 wince/stdlib.c 	return NULL;
NULL               51 wince/string_wce.c 	return pp==p ? NULL : pp;
NULL               73 wince/string_wce.c 	char *s = NULL;
NULL               80 wince/string_wce.c 	if( w!=NULL )
NULL               85 wince/sys/stat.c 	dwSize = GetFileSize( (HANDLE)file, NULL );
NULL               28 wince/sys/utime.c 			NULL, OPEN_EXISTING, 0, 0);
NULL               41 wince/sys/utime.c 	rc = SetFileTime(h, NULL, &atime, &mtime);
NULL              145 wince/time_wce.c 	if( timer==NULL ) return 0;
NULL               75 wince/wince.c  	_commandLine = NULL;
NULL              182 wince/wince.c  		NULL, &dwType, lpData, &cbData );
NULL              212 wince/wince.c  			0, NULL, &hk, &ret );
NULL              231 wince/wince.c  	return NULL;
NULL              407 wince/wince.c  			NULL, creation, 0, NULL);
NULL              490 wince/wince.c  	return NULL;
NULL              528 wince/wince.c  	GetModuleFileNameW( NULL, tbuf, MAX_PATH );
NULL              530 wince/wince.c  	if( tp!=NULL ) *tp=_T('\0');
NULL              562 wince/wince.c  		a, -1, NULL, 0);
NULL              577 wince/wince.c  					-1, NULL, 0, NULL, NULL);
NULL              580 wince/wince.c  		-1, pChar, charlength, NULL, NULL);
NULL               17 wince/wincemain.c     return main(0, NULL, NULL);
NULL              248 wince/winsock2.c 	if( proto==NULL ) return NULL;
NULL              251 wince/winsock2.c 		return NULL;
NULL              286 wince/winsock2.c 	if( proto==NULL ) return NULL;
NULL              289 wince/winsock2.c 		return NULL;


NULL_NODE

NULL_NODE        1262 ext/syck/gram.c                     NULL_NODE( parser, n );
NULL_NODE        1639 ext/syck/gram.c                     NULL_NODE( parser, n );
NULL_NODE        1496 regcomp.c      	  en->target = NULL_NODE;
NULL_NODE        2334 regcomp.c        Node* n = NULL_NODE;
NULL_NODE        2866 regcomp.c        while ((np = NCONS(np).right) != NULL_NODE) {
NULL_NODE        2877 regcomp.c          } while ((np = NCONS(np).right) != NULL_NODE);
NULL_NODE        2953 regcomp.c        Node *root = NULL_NODE;
NULL_NODE        3073 regcomp.c            Node* prev = NULL_NODE;
NULL_NODE         911 regparse.c         env->mem_nodes_static[i] = NULL_NODE;
NULL_NODE         936 regparse.c     	p[i] = NULL_NODE;
NULL_NODE        1263 regparse.c       NCALL(node).target   = NULL_NODE;
NULL_NODE        1283 regparse.c       NQUALIFIER(node).head_exact        = NULL_NODE;
NULL_NODE        1284 regparse.c       NQUALIFIER(node).next_head_exact   = NULL_NODE;
NULL_NODE        1455 regparse.c       Node* n = NULL_NODE;
NULL_NODE        2157 regparse.c       c->target = NULL_NODE;
NULL_NODE        3922 regparse.c       *np = NULL_NODE;
NULL_NODE        4555 regparse.c       Node **ptail, *snode = NULL_NODE;
NULL_NODE        4561 regparse.c       *root = NULL_NODE;
NULL_NODE        4590 regparse.c                 *ptail = node_new_alt(snode, NULL_NODE);


NULL_UCHARP

NULL_UCHARP       490 regexec.c      #define STACK_PUSH_POS(s,sprev)         STACK_PUSH(STK_POS,NULL_UCHARP,s,sprev)
NULL_UCHARP      2563 regparse.c       return NULL_UCHARP;


NUM2CH

NUM2CH            387 ext/curses/curses.c     addch(NUM2CH(ch));
NUM2CH            398 ext/curses/curses.c     insch(NUM2CH(ch));
NUM2CH            562 ext/curses/curses.c   bkgdset(NUM2CH(ch));
NUM2CH            571 ext/curses/curses.c   return (bkgd(NUM2CH(ch)) == OK) ? Qtrue : Qfalse;
NUM2CH           1030 ext/curses/curses.c     box(winp->window, NUM2CH(vert), NUM2CH(hor));
NUM2CH           1036 ext/curses/curses.c       c = NUM2CH(corn);
NUM2CH           1098 ext/curses/curses.c     waddch(winp->window, NUM2CH(ch));
NUM2CH           1112 ext/curses/curses.c     winsch(winp->window, NUM2CH(ch));
NUM2CH           1341 ext/curses/curses.c   wbkgdset(winp->window, NUM2CH(ch));
NUM2CH           1353 ext/curses/curses.c   return (wbkgd(winp->window, NUM2CH(ch)) == OK) ? Qtrue : Qfalse;


NUM2CHR

NUM2CHR          1050 ext/stringio/stringio.c     int c = NUM2CHR(ch);
NUM2CHR           876 ext/win32ole/win32ole.c             *V_UI1REF(var) = NUM2CHR(val);
NUM2CHR          2859 ext/zlib/zlib.c     char c = NUM2CHR(ch);
NUM2CHR          3136 ext/zlib/zlib.c     gzfile_ungetc(gz, NUM2CHR(ch));
NUM2CHR          3228 file.c             cmd = NUM2CHR(argv[0]);
NUM2CHR          3617 io.c               char c = NUM2CHR(ch);


NUM2DBL

NUM2DBL          1140 ext/tk/tcltklib.c         tcl_time.usec = (long)(NUM2DBL(RARRAY(divmod)->ptr[1]) * 1000000);
NUM2DBL           837 ext/win32ole/win32ole.c         V_R8(var) = NUM2DBL(val);
NUM2DBL           903 ext/win32ole/win32ole.c             *V_R4REF(var) = (float)NUM2DBL(val);
NUM2DBL           906 ext/win32ole/win32ole.c             *V_R8REF(var) = NUM2DBL(val);
NUM2DBL          1423 numeric.c      	double beg = NUM2DBL(from);
NUM2DBL          1424 numeric.c      	double end = NUM2DBL(to);
NUM2DBL          1425 numeric.c      	double unit = NUM2DBL(step);
NUM2DBL          1217 time.c             double v = NUM2DBL(offset);


NUM2INT

NUM2INT           691 bignum.c           else base = NUM2INT(b);
NUM2INT          1755 bignum.c           int shift = NUM2INT(y);
NUM2INT          1790 bignum.c           int shift = NUM2INT(y);
NUM2INT          1859 bignum.c           shift = NUM2INT(y);
NUM2INT           874 dir.c          	mode = NUM2INT(vmode);
NUM2INT          1606 dir.c          	flags = NUM2INT(rflags);
NUM2INT          1774 dir.c          	flags = NUM2INT(rflags);
NUM2INT          1355 eval.c             return NUM2INT(st);
NUM2INT          1498 eval.c         	return NUM2INT(st);
NUM2INT          4284 eval.c         	    istatus = NUM2INT(status);
NUM2INT          6039 eval.c             else lev = NUM2INT(level);
NUM2INT          6261 eval.c         	line = NUM2INT(vline);
NUM2INT          6398 eval.c         	    if (argc > 2) line = NUM2INT(argv[2]);
NUM2INT          9902 eval.c             int level = NUM2INT(val);
NUM2INT          11366 eval.c             th->priority = NUM2INT(prio);
NUM2INT           334 ext/curses/curses.c     ungetch(NUM2INT(ch));
NUM2INT           349 ext/curses/curses.c     move(NUM2INT(y), NUM2INT(x));
NUM2INT           481 ext/curses/curses.c   name = keyname(NUM2INT(c));
NUM2INT           509 ext/curses/curses.c   return (n = curs_set(NUM2INT(visibility)) != ERR) ? INT2FIX(n) : Qnil;
NUM2INT           520 ext/curses/curses.c   return (scrl(NUM2INT(n)) == OK) ? Qtrue : Qfalse;
NUM2INT           531 ext/curses/curses.c   return (setscrreg(NUM2INT(top), NUM2INT(bottom)) == OK) ? Qtrue : Qfalse;
NUM2INT           581 ext/curses/curses.c   return (resizeterm(NUM2INT(lin),NUM2INT(col)) == OK) ? Qtrue : Qfalse;
NUM2INT           599 ext/curses/curses.c   return (init_pair(NUM2INT(pair),NUM2INT(f),NUM2INT(b)) == OK) ? Qtrue : Qfalse;
NUM2INT           606 ext/curses/curses.c   return (init_color(NUM2INT(color),NUM2INT(r),
NUM2INT           607 ext/curses/curses.c 		     NUM2INT(g),NUM2INT(b)) == OK) ? Qtrue : Qfalse;
NUM2INT           627 ext/curses/curses.c   color_content(NUM2INT(color),&r,&g,&b);
NUM2INT           636 ext/curses/curses.c   pair_content(NUM2INT(pair),&f,&b);
NUM2INT           643 ext/curses/curses.c   return INT2FIX(COLOR_PAIR(NUM2INT(attrs)));
NUM2INT           649 ext/curses/curses.c   return INT2FIX(PAIR_NUMBER(NUM2INT(attrs)));
NUM2INT           702 ext/curses/curses.c   return mouseinterval(NUM2INT(interval)) ? Qtrue : Qfalse;
NUM2INT           731 ext/curses/curses.c   timeout(NUM2INT(delay));
NUM2INT           785 ext/curses/curses.c     window = newwin(NUM2INT(h), NUM2INT(w), NUM2INT(top), NUM2INT(left));
NUM2INT           806 ext/curses/curses.c     h = NUM2INT(height);
NUM2INT           807 ext/curses/curses.c     w = NUM2INT(width);
NUM2INT           808 ext/curses/curses.c     t = NUM2INT(top);
NUM2INT           809 ext/curses/curses.c     l = NUM2INT(left);
NUM2INT           897 ext/curses/curses.c     mvwin(winp->window, NUM2INT(y), NUM2INT(x));
NUM2INT           912 ext/curses/curses.c     wmove(winp->window, NUM2INT(y), NUM2INT(x));
NUM2INT          1038 ext/curses/curses.c       x = NUM2INT(window_maxx(self)) - 1;
NUM2INT          1039 ext/curses/curses.c       y = NUM2INT(window_maxy(self)) - 1;
NUM2INT          1240 ext/curses/curses.c   res = wsetscrreg(winp->window, NUM2INT(top), NUM2INT(bottom));
NUM2INT          1256 ext/curses/curses.c   res = wcolor_set(winp->window, NUM2INT(col), NULL);
NUM2INT          1280 ext/curses/curses.c   return (wscrl(winp->window,NUM2INT(n)) == OK) ? Qtrue : Qfalse;
NUM2INT          1293 ext/curses/curses.c   return INT2FIX(wattroff(winp->window,NUM2INT(attrs)));
NUM2INT          1307 ext/curses/curses.c   val = INT2FIX(wattron(winp->window,NUM2INT(attrs)));
NUM2INT          1310 ext/curses/curses.c     wattroff(winp->window,NUM2INT(attrs));
NUM2INT          1328 ext/curses/curses.c   return INT2FIX(wattrset(winp->window,NUM2INT(attrs)));
NUM2INT          1380 ext/curses/curses.c   return wresize(winp->window, NUM2INT(lin), NUM2INT(col)) == OK ? Qtrue : Qfalse;
NUM2INT          1434 ext/curses/curses.c   wtimeout(winp->window,NUM2INT(delay));
NUM2INT           115 ext/dbm/dbm.c  	mode = NUM2INT(vmode);
NUM2INT           119 ext/dbm/dbm.c          flags = NUM2INT(vflags);
NUM2INT           127 ext/dl/cfunc.c     data->type = (type == Qnil) ? DLTYPE_VOID : NUM2INT(type);
NUM2INT           157 ext/dl/cfunc.c     cfunc->type = NUM2INT(ctype);
NUM2INT           257 ext/dl/cptr.c      len = NUM2INT(arg1);
NUM2INT           280 ext/dl/cptr.c      len = NUM2INT(arg1);
NUM2INT            26 ext/dl/dl.c        ptr = (void*)ruby_xmalloc(NUM2INT(size));
NUM2INT            35 ext/dl/dl.c        ptr = (void*)ruby_xrealloc(ptr, NUM2INT(size));
NUM2INT            64 ext/dl/handle.c     cflag = NUM2INT(flag);
NUM2INT           134 ext/etc/etc.c  	uid = NUM2INT(id);
NUM2INT           340 ext/etc/etc.c      gid = NUM2INT(id);
NUM2INT           117 ext/gdbm/gdbm.c 	mode = NUM2INT(vmode);
NUM2INT           121 ext/gdbm/gdbm.c         flags = NUM2INT(vflags);
NUM2INT           796 ext/iconv/iconv.c 			 NIL_P(n1) ? 0 : NUM2INT(n1),
NUM2INT           797 ext/iconv/iconv.c 			 NIL_P(n2) ? -1 : NUM2INT(n2),
NUM2INT           513 ext/openssl/ossl_asn1.c         flag = NIL_P(rflag) ? -1 : NUM2INT(rflag);
NUM2INT           592 ext/openssl/ossl_asn1.c     return NUM2INT(tag);
NUM2INT           659 ext/openssl/ossl_asn1.c     if((SYM2ID(tag_class) == sUNIVERSAL) && NUM2INT(tag) > 31)
NUM2INT           883 ext/openssl/ossl_asn1.c 	if(SYM2ID(tagging) == sIMPLICIT && NUM2INT(tag) > 31)
NUM2INT           932 ext/openssl/ossl_asn1.c     tn = NUM2INT(ossl_asn1_get_tag(self));
NUM2INT           971 ext/openssl/ossl_asn1.c     tn = NUM2INT(ossl_asn1_get_tag(self));
NUM2INT           111 ext/openssl/ossl_bn.c 	base = NUM2INT(bs);
NUM2INT           161 ext/openssl/ossl_bn.c 	base = NUM2INT(bs);
NUM2INT           368 ext/openssl/ossl_bn.c 	if (!BN_##func(bn, NUM2INT(bit))) {		\
NUM2INT           383 ext/openssl/ossl_bn.c     b = NUM2INT(bit);
NUM2INT           398 ext/openssl/ossl_bn.c 	b = NUM2INT(bits);				\
NUM2INT           428 ext/openssl/ossl_bn.c 	b = NUM2INT(bits);					\
NUM2INT           470 ext/openssl/ossl_bn.c     num = NUM2INT(vnum);
NUM2INT           552 ext/openssl/ossl_bn.c 	checks = NUM2INT(vchecks);
NUM2INT           577 ext/openssl/ossl_bn.c 	checks = NUM2INT(vchecks);
NUM2INT           204 ext/openssl/ossl_cipher.c     iter = NIL_P(viter) ? 2048 : NUM2INT(viter);
NUM2INT           305 ext/openssl/ossl_cipher.c     int len = NUM2INT(key_length);
NUM2INT           320 ext/openssl/ossl_cipher.c     int pad = NUM2INT(padding);
NUM2INT           265 ext/openssl/ossl_engine.c     int f = NUM2INT(flag);
NUM2INT           221 ext/openssl/ossl_ocsp.c     flg = NIL_P(flags) ? 0 : NUM2INT(flags);
NUM2INT           285 ext/openssl/ossl_ocsp.c     int st = NUM2INT(status);
NUM2INT           459 ext/openssl/ossl_ocsp.c     st = NUM2INT(status);
NUM2INT           460 ext/openssl/ossl_ocsp.c     rsn = NIL_P(status) ? 0 : NUM2INT(reason);
NUM2INT           473 ext/openssl/ossl_ocsp.c 	rev = X509_gmtime_adj(NULL, NUM2INT(tmp));
NUM2INT           477 ext/openssl/ossl_ocsp.c     ths = X509_gmtime_adj(NULL, NUM2INT(tmp));
NUM2INT           480 ext/openssl/ossl_ocsp.c     nxt = X509_gmtime_adj(NULL, NUM2INT(tmp));
NUM2INT           573 ext/openssl/ossl_ocsp.c     flg = NIL_P(flags) ? 0 : NUM2INT(flags);
NUM2INT           169 ext/openssl/ossl_pkcs7.c     flg = NIL_P(flags) ? 0 : NUM2INT(flags);
NUM2INT           205 ext/openssl/ossl_pkcs7.c     flg = NIL_P(flags) ? 0 : NUM2INT(flags);
NUM2INT           256 ext/openssl/ossl_pkcs7.c     flg = NIL_P(flags) ? 0 : NUM2INT(flags);
NUM2INT           650 ext/openssl/ossl_pkcs7.c     flg = NIL_P(flags) ? 0 : NUM2INT(flags);
NUM2INT           693 ext/openssl/ossl_pkcs7.c     flg = NIL_P(flags) ? 0 : NUM2INT(flags);
NUM2INT            96 ext/openssl/ossl_pkey_rsa.c     rsa = rsa_generate(NUM2INT(size), NIL_P(exp) ? RSA_F4 : NUM2INT(exp)); /* err handled by rsa_instance */
NUM2INT           121 ext/openssl/ossl_pkey_rsa.c 	rsa = rsa_generate(FIX2INT(arg), NIL_P(pass) ? RSA_F4 : NUM2INT(pass));
NUM2INT           258 ext/openssl/ossl_pkey_rsa.c     pad = (argc == 1) ? RSA_PKCS1_PADDING : NUM2INT(padding);
NUM2INT           280 ext/openssl/ossl_pkey_rsa.c     pad = (argc == 1) ? RSA_PKCS1_PADDING : NUM2INT(padding);
NUM2INT           305 ext/openssl/ossl_pkey_rsa.c     pad = (argc == 1) ? RSA_PKCS1_PADDING : NUM2INT(padding);
NUM2INT           330 ext/openssl/ossl_pkey_rsa.c     pad = (argc == 1) ? RSA_PKCS1_PADDING : NUM2INT(padding);
NUM2INT           379 ext/openssl/ossl_ssl.c     verify_mode = NIL_P(val) ? SSL_VERIFY_NONE : NUM2INT(val);
NUM2INT           623 ext/openssl/ossl_ssl.c     ilen = NUM2INT(len);
NUM2INT           155 ext/openssl/ossl_x509name.c     if (!X509_NAME_add_entry_by_txt(name, RSTRING(oid)->ptr, NUM2INT(type),
NUM2INT           663 ext/racc/cparse/cparse.c     return NUM2INT(code);
NUM2INT           527 ext/readline/readline.c     i = NUM2INT(index);
NUM2INT           549 ext/readline/readline.c     i = NUM2INT(index);
NUM2INT           681 ext/readline/readline.c     i = NUM2INT(index);
NUM2INT           106 ext/sdbm/init.c 	mode = NUM2INT(vmode);
NUM2INT           224 ext/socket/socket.c     VALUE sock = init_sock(rb_obj_alloc(klass), NUM2INT(fd));
NUM2INT           248 ext/socket/socket.c 	how = NUM2INT(howto);
NUM2INT           354 ext/socket/socket.c     level = NUM2INT(lev);
NUM2INT           355 ext/socket/socket.c     option = NUM2INT(optname);
NUM2INT           433 ext/socket/socket.c     level = NUM2INT(lev);
NUM2INT           434 ext/socket/socket.c     option = NUM2INT(optname);
NUM2INT           498 ext/socket/socket.c 	n = sendto(fd, RSTRING(mesg)->ptr, RSTRING(mesg)->len, NUM2INT(flags),
NUM2INT           504 ext/socket/socket.c 	n = send(fd, RSTRING(mesg)->ptr, RSTRING(mesg)->len, NUM2INT(flags));
NUM2INT           575 ext/socket/socket.c     else             flags = NUM2INT(flg);
NUM2INT           576 ext/socket/socket.c     buflen = NUM2INT(len);
NUM2INT          1582 ext/socket/socket.c 	socktype = NUM2INT(arg);
NUM2INT          1675 ext/socket/socket.c 	n = sendto(fptr->fd, RSTRING(mesg)->ptr, RSTRING(mesg)->len, NUM2INT(flags),
NUM2INT          2045 ext/socket/socket.c 	*dv = NUM2INT(domain);
NUM2INT          2076 ext/socket/socket.c 	*tv = NUM2INT(type);
NUM2INT          2089 ext/socket/socket.c     fd = ruby_socket(d, t, NUM2INT(protocol));
NUM2INT          2104 ext/socket/socket.c     if (socketpair(d, t, NUM2INT(protocol), sp) < 0) {
NUM2INT          2441 ext/socket/socket.c     backlog = NUM2INT(log);
NUM2INT          2742 ext/socket/socket.c 	t = NUM2INT(type);
NUM2INT          2821 ext/socket/socket.c     sp = getservbyport(NUM2INT(port),  StringValueCStr(proto));
NUM2INT          2823 ext/socket/socket.c 	rb_raise(rb_eSocket, "no such service for port %d/%s", NUM2INT(port), RSTRING(proto)->ptr);
NUM2INT          2881 ext/socket/socket.c 	hints.ai_socktype = NUM2INT(socktype);
NUM2INT          2884 ext/socket/socket.c 	hints.ai_protocol = NUM2INT(protocol);
NUM2INT          2887 ext/socket/socket.c 	hints.ai_flags = NUM2INT(flags);
NUM2INT          2919 ext/socket/socket.c 	fl = NUM2INT(flags);
NUM2INT           753 ext/stringio/stringio.c     int cc = NUM2INT(ch);
NUM2INT           409 ext/strscan/strscan.c     i = NUM2INT(v);
NUM2INT           804 ext/syck/rubyext.c         int n = NUM2INT(rb_funcall(size, s_to_i, 0));
NUM2INT            78 ext/syslog/syslog.c 	syslog_options = NUM2INT(opt);
NUM2INT            84 ext/syslog/syslog.c 	syslog_facility = NUM2INT(fac);
NUM2INT           139 ext/syslog/syslog.c     setlogmask(syslog_mask = NUM2INT(mask));
NUM2INT           949 ext/tk/tcltklib.c     int ttick = NUM2INT(tick);
NUM2INT          1017 ext/tk/tcltklib.c     int t_wait = NUM2INT(wait);
NUM2INT          1070 ext/tk/tcltklib.c     int lpmax = NUM2INT(loop_max);
NUM2INT          1071 ext/tk/tcltklib.c     int no_ev = NUM2INT(no_event);
NUM2INT           947 ext/tk/tkutil/tkutil.c         if (NUM2INT(value) == 0) {
NUM2INT          1378 ext/tk/tkutil/tkutil.c         *(key  + real_len) = (char)NUM2INT(RARRAY(inf)->ptr[0]);
NUM2INT          1379 ext/tk/tkutil/tkutil.c         *(type + real_len) = (char)NUM2INT(RARRAY(inf)->ptr[1]);
NUM2INT           829 ext/win32ole/win32ole.c         V_I4(var) = NUM2INT(val);
NUM2INT           879 ext/win32ole/win32ole.c             *V_I2REF(var) = (short)NUM2INT(val);
NUM2INT           882 ext/win32ole/win32ole.c             *V_I4REF(var) = NUM2INT(val);
NUM2INT           885 ext/win32ole/win32ole.c             *V_R4REF(var) = (float)NUM2INT(val);
NUM2INT           888 ext/win32ole/win32ole.c             *V_R8REF(var) = NUM2INT(val);
NUM2INT           897 ext/win32ole/win32ole.c             *V_I2REF(var) = (short)NUM2INT(val);
NUM2INT           900 ext/win32ole/win32ole.c             *V_I4REF(var) = NUM2INT(val);
NUM2INT          1924 ext/win32ole/win32ole.c                     0x0f, NUM2INT(helpcontext));
NUM2INT          1927 ext/win32ole/win32ole.c                  0,  NUM2INT(helpcontext));
NUM2INT          2217 ext/win32ole/win32ole.c         cNamedArgs = NUM2INT(rb_funcall(param, rb_intern("length"), 0));
NUM2INT          2557 ext/win32ole/win32ole.c     hr = pole->pDispatch->lpVtbl->Invoke(pole->pDispatch, NUM2INT(dispid),
NUM2INT          6745 ext/win32ole/win32ole.c         = NUM2INT(rb_funcall(ary_ole_event, rb_intern("length"), 0));
NUM2INT          6887 ext/win32ole/win32ole.c         vt = NUM2INT(vvt);
NUM2INT          2534 ext/zlib/zlib.c     gz->lineno = NUM2INT(lineno);
NUM2INT          3044 ext/zlib/zlib.c     len = NUM2INT(vlen);
NUM2INT          3073 ext/zlib/zlib.c     len = NUM2INT(vlen);
NUM2INT          1711 file.c             mode = NUM2INT(vmode);
NUM2INT          1737 file.c             mode = NUM2INT(vmode);
NUM2INT          1779 file.c             mode = NUM2INT(vmode);
NUM2INT          1833 file.c         	arg.owner = NUM2INT(o);
NUM2INT          1839 file.c         	arg.group = NUM2INT(g);
NUM2INT          1868 file.c             o = NIL_P(owner) ? -1 : NUM2INT(owner);
NUM2INT          1869 file.c             g = NIL_P(group) ? -1 : NUM2INT(group);
NUM2INT          1917 file.c         	arg.owner = NUM2INT(o);
NUM2INT          1923 file.c         	arg.group = NUM2INT(g);
NUM2INT          2225 file.c         	omask = umask(NUM2INT(argv[0]));
NUM2INT          3108 file.c             op = NUM2INT(operation);
NUM2INT           802 io.c           	whence = NUM2INT(ptrname);
NUM2INT          1707 io.c               fptr->lineno = NUM2INT(lineno);
NUM2INT          1714 io.c               gets_lineno = NUM2INT(val);
NUM2INT          1721 io.c               gets_lineno = NUM2INT(val);
NUM2INT          1945 io.c               int cc = NUM2INT(c);
NUM2INT          2241 io.c           	whence = NUM2INT(ptrname);
NUM2INT          3074 io.c           	fmode = NIL_P(perm) ? 0666 :  NUM2INT(perm);
NUM2INT          3138 io.c               else             fmode = NUM2INT(perm);
NUM2INT          3923 io.c           	fd = NUM2INT(fnum);
NUM2INT           691 marshal.c      	if (!NIL_P(a2)) limit = NUM2INT(a2);
NUM2INT           400 math.c             return rb_float_new(ldexp(RFLOAT(x)->value, NUM2INT(n)));
NUM2INT          1883 numeric.c          else base = NUM2INT(b);
NUM2INT           873 pack.c         		l = NUM2INT(from);
NUM2INT           953 pack.c         			c = NUM2INT(RARRAY(from)->ptr[1]) | 0x80; /* mod */
NUM2INT          9125 parse.y            parser->parser_ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1;
NUM2INT           276 process.c          status = NUM2INT(st);
NUM2INT           346 process.c          int status = NUM2INT(st1) & NUM2INT(st2);
NUM2INT           367 process.c          int status = NUM2INT(st1) >> NUM2INT(st2);
NUM2INT           385 process.c          int status = NUM2INT(st);
NUM2INT           405 process.c          int status = NUM2INT(st);
NUM2INT           424 process.c          int status = NUM2INT(st);
NUM2INT           445 process.c          int status = NUM2INT(st);
NUM2INT           465 process.c          int status = NUM2INT(st);
NUM2INT           496 process.c          int status = NUM2INT(st);
NUM2INT           515 process.c          int status = NUM2INT(st);
NUM2INT           535 process.c          int status = NUM2INT(st);
NUM2INT           720 process.c      	pid = NUM2INT(vpid);
NUM2INT           891 process.c          return rb_detach_process(NUM2INT(pid));
NUM2INT          1471 process.c      	    istatus = NUM2INT(status);
NUM2INT          1598 process.c          status = NUM2INT(rb_last_status);
NUM2INT          1743 process.c          i = getpgid(NUM2INT(pid));
NUM2INT          1767 process.c          ipid = NUM2INT(pid);
NUM2INT          1768 process.c          ipgrp = NUM2INT(pgrp);
NUM2INT          1850 process.c          iwhich = NUM2INT(which);
NUM2INT          1851 process.c          iwho   = NUM2INT(who);
NUM2INT          1882 process.c          iwhich = NUM2INT(which);
NUM2INT          1883 process.c          iwho   = NUM2INT(who);
NUM2INT          1884 process.c          iprio  = NUM2INT(prio);
NUM2INT          1932 process.c          if (getrlimit(NUM2INT(resource), &rlim) < 0) {
NUM2INT          1994 process.c          if (setrlimit(NUM2INT(resource), &rlim) < 0) {
NUM2INT          2049 process.c          if (setuid(NUM2INT(id)) != 0) rb_sys_fail(0);
NUM2INT          2072 process.c          if (setruid(NUM2INT(id)) != 0) rb_sys_fail(0);
NUM2INT          2094 process.c          if (seteuid(NUM2INT(id)) != 0) rb_sys_fail(0);
NUM2INT          2118 process.c          if (setreuid(NUM2INT(rid),NUM2INT(eid)) != 0) rb_sys_fail(0);
NUM2INT          2142 process.c          if (setresuid(NUM2INT(rid),NUM2INT(eid),NUM2INT(sid)) != 0) rb_sys_fail(0);
NUM2INT          2180 process.c          int uid = NUM2INT(id);
NUM2INT          2238 process.c          uid = NUM2INT(id);
NUM2INT          2385 process.c          if (setgid(NUM2INT(id)) != 0) rb_sys_fail(0);
NUM2INT          2407 process.c          if (setrgid(NUM2INT(id)) != 0) rb_sys_fail(0);
NUM2INT          2430 process.c          if (setegid(NUM2INT(id)) != 0) rb_sys_fail(0);
NUM2INT          2454 process.c          if (setregid(NUM2INT(rid),NUM2INT(eid)) != 0) rb_sys_fail(0);
NUM2INT          2477 process.c          if (setresgid(NUM2INT(rid),NUM2INT(eid),NUM2INT(sid)) != 0) rb_sys_fail(0);
NUM2INT          2543 process.c          int gid = NUM2INT(id);
NUM2INT          2649 process.c      		groups[i] = NUM2INT(g);
NUM2INT          2694 process.c          if (initgroups(StringValuePtr(uname), (rb_gid_t)NUM2INT(base_grp)) != 0) {
NUM2INT          2830 process.c          gid = NUM2INT(id);
NUM2INT          2995 process.c          if (setresuid(-1, NUM2INT(euid), -1) < 0) rb_sys_fail(0);
NUM2INT          2997 process.c          if (setreuid(-1, NUM2INT(euid)) < 0) rb_sys_fail(0);
NUM2INT          2999 process.c          if (seteuid(NUM2INT(euid)) < 0) rb_sys_fail(0);
NUM2INT          3001 process.c          euid = NUM2INT(euid);
NUM2INT          3066 process.c          return rb_seteuid_core(NUM2INT(id));
NUM2INT          3105 process.c          if (setresgid(-1, NUM2INT(egid), -1) < 0) rb_sys_fail(0);
NUM2INT          3107 process.c          if (setregid(-1, NUM2INT(egid)) < 0) rb_sys_fail(0);
NUM2INT          3109 process.c          if (setegid(NUM2INT(egid)) < 0) rb_sys_fail(0);
NUM2INT          3111 process.c          egid = NUM2INT(egid);
NUM2INT          3176 process.c          return rb_setegid_core(NUM2INT(id));
NUM2INT           716 re.c               int i = NUM2INT(n);
NUM2INT           744 re.c               int i = NUM2INT(n);
NUM2INT           771 re.c               int i = NUM2INT(n);
NUM2INT          2182 re.c           	return rb_reg_nth_match(NUM2INT(nth), rb_backref_get());
NUM2INT           307 ruby.h                              RSTRING(x)->ptr[0]:(char)(NUM2INT(x)&0xff))
NUM2INT           278 signal.c       	    int pid = NUM2INT(argv[i]);
NUM2INT           135 sprintf.c          val = NUM2INT(tmp); \
NUM2INT           397 sprintf.c      		c = NUM2INT(val) & 0xff;
NUM2INT          1509 string.c       	    return rb_str_subpat(str, argv[0], NUM2INT(argv[1]));
NUM2INT          1687 string.c       	    rb_str_subpat_set(str, argv[0], NUM2INT(argv[1]), argv[2]);
NUM2INT          2276 string.c           else base = NUM2INT(b);
NUM2INT          3219 string.c       	lim = NUM2INT(limit);
NUM2INT          3998 string.c           else bits = NUM2INT(vbits);
NUM2INT           817 win32/win32.c  	return NUM2INT(rb_last_status);


NUM2LL

NUM2LL           1639 numeric.c      	  return NUM2LL(val);
NUM2LL            293 ruby.h         # define NUM2OFFT(x) ((off_t)NUM2LL(x))


NUM2LONG

NUM2LONG          335 array.c            len = NUM2LONG(size);
NUM2LONG          432 array.c            n = NUM2LONG(nv);
NUM2LONG          728 array.c        	beg = NUM2LONG(argv[0]);
NUM2LONG          729 array.c        	len = NUM2LONG(argv[1]);
NUM2LONG          752 array.c            return rb_ary_entry(ary, NUM2LONG(arg));
NUM2LONG          773 array.c            return rb_ary_entry(ary, NUM2LONG(pos));
NUM2LONG          859 array.c            idx = NUM2LONG(pos);
NUM2LONG         1064 array.c        	rb_ary_splice(ary, NUM2LONG(argv[0]), NUM2LONG(argv[1]), argv[2]);
NUM2LONG         1080 array.c            offset = NUM2LONG(argv[0]);
NUM2LONG         1107 array.c            pos = NUM2LONG(argv[0]);
NUM2LONG         1659 array.c        	rb_ary_push(result, (*func)(obj, NUM2LONG(argv[i])));
NUM2LONG         1804 array.c            return rb_ary_delete_at(ary, NUM2LONG(pos));
NUM2LONG         1839 array.c        	pos = NUM2LONG(arg1);
NUM2LONG         1840 array.c        	len = NUM2LONG(arg2);
NUM2LONG         1854 array.c            return rb_ary_delete_at(ary, NUM2LONG(arg1));
NUM2LONG         2125 array.c        	beg = NIL_P(arg1) ? 0 : NUM2LONG(arg1);
NUM2LONG         2130 array.c        	len = NIL_P(arg2) ? RARRAY(ary)->len - beg : NUM2LONG(arg2);
NUM2LONG         2236 array.c            len = NUM2LONG(times);
NUM2LONG         2393 array.c        	h ^= NUM2LONG(n);
NUM2LONG          163 enumerator.c       long size = NUM2LONG(n);
NUM2LONG          231 enumerator.c       long size = NUM2LONG(n);
NUM2LONG          840 error.c        	if (!NIL_P(error) && st_lookup(syserr_tbl, NUM2LONG(error), &klass)) {
NUM2LONG          852 error.c            if (!NIL_P(error)) err = strerror(NUM2LONG(error));
NUM2LONG           57 ext/curses/curses.c #define NUM2CH NUM2LONG
NUM2LONG          268 ext/dl/cfunc.c 	stack[i] = NUM2LONG(RARRAY(ary)->ptr[i]);
NUM2LONG          123 ext/dl/cptr.c      s = NUM2LONG(size);
NUM2LONG          127 ext/dl/cptr.c      s = NUM2LONG(size);
NUM2LONG          157 ext/dl/cptr.c      s = NUM2LONG(size);
NUM2LONG          161 ext/dl/cptr.c      s = NUM2LONG(size);
NUM2LONG          329 ext/dl/cptr.c    num = NUM2LONG(other);
NUM2LONG          341 ext/dl/cptr.c    num = NUM2LONG(other);
NUM2LONG          412 ext/dl/cptr.c      RPTR_DATA(self)->size = NUM2LONG(size);
NUM2LONG           74 ext/openssl/ossl_asn1.c     return (time_t)NUM2LONG(rb_Integer(time));
NUM2LONG          385 ext/openssl/ossl_ssl.c     if(!NIL_P(val)) SSL_CTX_set_timeout(ctx, NUM2LONG(val));
NUM2LONG          388 ext/openssl/ossl_ssl.c     if(!NIL_P(val)) SSL_CTX_set_verify_depth(ctx, NUM2LONG(val));
NUM2LONG          391 ext/openssl/ossl_ssl.c     if(!NIL_P(val)) SSL_CTX_set_options(ctx, NUM2LONG(val));
NUM2LONG          271 ext/openssl/ossl_x509cert.c     if ((ver = NUM2LONG(version)) < 0) {
NUM2LONG          149 ext/openssl/ossl_x509crl.c     if ((ver = NUM2LONG(version)) < 0) {
NUM2LONG          150 ext/openssl/ossl_x509store.c     long f = NUM2LONG(flags);
NUM2LONG          166 ext/openssl/ossl_x509store.c     long p = NUM2LONG(purpose);
NUM2LONG          182 ext/openssl/ossl_x509store.c     long t = NUM2LONG(trust);
NUM2LONG          521 ext/openssl/ossl_x509store.c     long f = NUM2LONG(flags);
NUM2LONG          533 ext/openssl/ossl_x509store.c     long p = NUM2LONG(purpose);
NUM2LONG          545 ext/openssl/ossl_x509store.c     long t = NUM2LONG(trust);
NUM2LONG          559 ext/openssl/ossl_x509store.c     t = NUM2LONG(rb_Integer(time));
NUM2LONG           94 ext/racc/cparse/cparse.c     return NUM2LONG(n);
NUM2LONG          326 ext/racc/cparse/cparse.c     return NUM2LONG(n);
NUM2LONG          452 ext/racc/cparse/cparse.c         i = NUM2LONG(tmp);
NUM2LONG          473 ext/racc/cparse/cparse.c             D_printf("(act) t(k2)=%ld\n", NUM2LONG(v->t));
NUM2LONG          481 ext/racc/cparse/cparse.c         i += NUM2LONG(v->t);
NUM2LONG          487 ext/racc/cparse/cparse.c         act = NUM2LONG(act_value);
NUM2LONG          492 ext/racc/cparse/cparse.c         if (NUM2LONG(tmp) != v->curstate) goto notfound;
NUM2LONG          493 ext/racc/cparse/cparse.c         D_printf("(act) check[i]=%ld\n", NUM2LONG(tmp));
NUM2LONG          503 ext/racc/cparse/cparse.c         act = NUM2LONG(act_value);
NUM2LONG          576 ext/racc/cparse/cparse.c         i = NUM2LONG(tmp) + ERROR_TOKEN;
NUM2LONG          585 ext/racc/cparse/cparse.c         act = NUM2LONG(act_value);
NUM2LONG          593 ext/racc/cparse/cparse.c         if (NUM2LONG(tmp) != v->curstate) {
NUM2LONG          689 ext/racc/cparse/cparse.c     len = NUM2LONG(reduce_len);
NUM2LONG          745 ext/racc/cparse/cparse.c     i = NUM2LONG(tmp) + k2;
NUM2LONG          754 ext/racc/cparse/cparse.c     D_printf("(goto) table[i]=%ld (goto_state)\n", NUM2LONG(goto_state));
NUM2LONG          765 ext/racc/cparse/cparse.c     D_printf("(goto) check[i]=%ld\n", NUM2LONG(tmp));
NUM2LONG          770 ext/racc/cparse/cparse.c     v->curstate = NUM2LONG(goto_state);
NUM2LONG          733 ext/socket/socket.c 	long i = NUM2LONG(host);
NUM2LONG         2979 ext/socket/socket.c 	    snprintf(pbuf, sizeof(pbuf), "%ld", NUM2LONG(port));
NUM2LONG          537 ext/stringio/stringio.c     StringIO(self)->lineno = NUM2LONG(lineno);
NUM2LONG          600 ext/stringio/stringio.c     long p = NUM2LONG(pos);
NUM2LONG          643 ext/stringio/stringio.c     offset = NUM2LONG(argv[0]);
NUM2LONG          644 ext/stringio/stringio.c     switch (NIL_P(whence) ? 0 : NUM2LONG(whence)) {
NUM2LONG          654 ext/stringio/stringio.c 	rb_raise(rb_eArgError, "invalid whence %ld", NUM2LONG(whence));
NUM2LONG         1095 ext/stringio/stringio.c 	    len = olen = NUM2LONG(argv[0]);
NUM2LONG         1212 ext/stringio/stringio.c     long l = NUM2LONG(len);
NUM2LONG          781 ext/strscan/strscan.c     len = NUM2LONG(vlen);
NUM2LONG          996 ext/strscan/strscan.c     i = NUM2LONG(idx);
NUM2LONG          303 ext/syck/rubyext.c         tmp = NUM2LONG(rb_funcall(time, s_to_i, 0)) - tz_offset;
NUM2LONG         1132 ext/tk/tcltklib.c         tcl_time.sec  = NUM2LONG(RARRAY(divmod)->ptr[0]);
NUM2LONG         1133 ext/tk/tcltklib.c         tcl_time.usec = NUM2LONG(RARRAY(divmod)->ptr[1]);
NUM2LONG         1139 ext/tk/tcltklib.c         tcl_time.sec  = NUM2LONG(RARRAY(divmod)->ptr[0]);
NUM2LONG         1250 io.c               if ((len = NUM2LONG(length)) < 0) {
NUM2LONG         1398 io.c               len = NUM2LONG(length);
NUM2LONG         2322 io.c               ilen = NUM2LONG(len);
NUM2LONG         4620 io.c           	    narg = NUM2LONG(arg);
NUM2LONG         4759 io.c               arg[0] = NUM2LONG(argv[0]); argv++;
NUM2LONG         4769 io.c           	    arg[i] = (unsigned long)NUM2LONG(*argv);
NUM2LONG         5118 io.c           	len = NUM2LONG(argv[0]);
NUM2LONG         1484 numeric.c      	return NUM2LONG(val);
NUM2LONG         1733 numeric.c          long i = NUM2LONG(num);
NUM2LONG         2418 numeric.c          val = FIX2LONG(x) & NUM2LONG(y);
NUM2LONG         2437 numeric.c          val = FIX2LONG(x) | NUM2LONG(y);
NUM2LONG         2456 numeric.c          val = FIX2LONG(x) ^ NUM2LONG(y);
NUM2LONG         2474 numeric.c          val = NUM2LONG(x);
NUM2LONG         2475 numeric.c          width = NUM2LONG(y);
NUM2LONG         2498 numeric.c          i = NUM2LONG(y);
NUM2LONG         2541 numeric.c          i = NUM2LONG(idx);
NUM2LONG          960 pack.c         		    long l = NUM2LONG(from);
NUM2LONG          278 process.c          str = rb_sprintf("#<%s: pid=%ld", rb_class2name(CLASS_OF(st)), NUM2LONG(pid));
NUM2LONG          294 range.c            unit = NUM2LONG(step);
NUM2LONG          521 range.c            beg = NUM2LONG(b);
NUM2LONG          522 range.c            end = NUM2LONG(e);
NUM2LONG         1594 re.c           	pos = NUM2LONG(initpos);
NUM2LONG          279 ruby.h         #define NUM2INT(x) ((int)NUM2LONG(x))
NUM2LONG          295 ruby.h         # define NUM2OFFT(x) NUM2LONG(x)
NUM2LONG          375 string.c           len = NUM2LONG(times);
NUM2LONG         1011 string.c       	pos = NUM2LONG(initpos);
NUM2LONG         1120 string.c       	pos = NUM2LONG(position);
NUM2LONG         1450 string.c       	idx = NUM2LONG(indx);
NUM2LONG         1511 string.c       	return rb_str_substr(str, NUM2LONG(argv[0]), NUM2LONG(argv[1]));
NUM2LONG         1652 string.c       	idx = NUM2LONG(indx);
NUM2LONG         1690 string.c       	    rb_str_splice(str, NUM2LONG(argv[0]), NUM2LONG(argv[1]), argv[2]);
NUM2LONG         1720 string.c           long pos = NUM2LONG(idx);
NUM2LONG         4046 string.c           width = NUM2LONG(w);
NUM2LONG          563 struct.c           i = NUM2LONG(idx);
NUM2LONG          626 struct.c           i = NUM2LONG(idx);
NUM2LONG          759 struct.c       	h ^= NUM2LONG(n);
NUM2LONG          190 time.c         	t.tv_sec = NUM2LONG(time);
NUM2LONG          246 time.c         	tv.tv_sec = NUM2LONG(time);
NUM2LONG          247 time.c         	tv.tv_usec = NUM2LONG(t);
NUM2LONG          275 time.c             return NUM2LONG(obj);


NUM2OFFT

NUM2OFFT          602 dir.c              off_t p = NUM2OFFT(pos);
NUM2OFFT         2954 file.c             pos = NUM2OFFT(len);
NUM2OFFT         3007 file.c             pos = NUM2OFFT(len);
NUM2OFFT          766 io.c               pos = NUM2OFFT(offset);
NUM2OFFT          825 io.c               pos = NUM2OFFT(offset);
NUM2OFFT         2243 io.c               pos = NUM2OFFT(offset);


NUM2PTR

NUM2PTR           120 ext/dl/cfunc.c     saddr = (void*)(NUM2PTR(rb_Integer(addr)));
NUM2PTR           196 ext/dl/cfunc.c     cfunc->ptr = NUM2PTR(addr);
NUM2PTR           119 ext/dl/cptr.c      p = (void*)(NUM2PTR(rb_Integer(ptr)));
NUM2PTR           122 ext/dl/cptr.c      p = (void*)(NUM2PTR(rb_Integer(ptr)));
NUM2PTR           126 ext/dl/cptr.c      p = (void*)(NUM2PTR(rb_Integer(ptr)));
NUM2PTR           228 ext/dl/cptr.c        data->free = NUM2PTR(rb_Integer(val));
NUM2PTR           392 ext/dl/cptr.c  	    mem    = NUM2PTR(arg2);
NUM2PTR           445 ext/dl/cptr.c  	return rb_dlptr_new(NUM2PTR(rb_Integer(val)), 0, NULL);
NUM2PTR            33 ext/dl/dl.c        void *ptr = NUM2PTR(addr);
NUM2PTR            42 ext/dl/dl.c        void *ptr = NUM2PTR(addr);
NUM2PTR            50 ext/dl/dl.c        return (VALUE)NUM2PTR(addr);
NUM2PTR          1882 gc.c               ptr = NUM2PTR(id);


NUM2RLIM

NUM2RLIM         1981 process.c      #if defined(HAVE_SETRLIMIT) && defined(NUM2RLIM)
NUM2RLIM         1991 process.c          rlim.rlim_cur = NUM2RLIM(rlim_cur);
NUM2RLIM         1992 process.c          rlim.rlim_max = NUM2RLIM(rlim_max);


NUM2UINT

NUM2UINT          708 ext/curses/curses.c   return INT2NUM(mousemask(NUM2UINT(mask),NULL));
NUM2UINT          379 ext/dl/cptr.c  	((char*)RPTR_DATA(self)->ptr)[offset] = NUM2UINT(arg1);
NUM2UINT          722 process.c      	    flags = NUM2UINT(vflags);
NUM2UINT         1896 process.c      # define NUM2RLIM(v) NUM2UINT(v)


NUM2ULL

NUM2ULL           142 ext/dl/dl.h    # define NUM2PTR(x)   ((void*)(NUM2ULL(x)))
NUM2ULL          1876 gc.c           #define NUM2PTR(x) NUM2ULL(x)
NUM2ULL          1902 process.c      # define NUM2RLIM(v) NUM2ULL(v)


NUM2ULONG

NUM2ULONG         160 ext/Win32API/Win32API.c     FARPROC ApiFunction = (FARPROC)NUM2ULONG(obj_proc);
NUM2ULONG         176 ext/Win32API/Win32API.c 	    lParam = NUM2ULONG(rb_ary_entry(args, i));
NUM2ULONG         183 ext/Win32API/Win32API.c 		lParam = NUM2ULONG(str);
NUM2ULONG         354 ext/dl/cptr.c  	offset = NUM2ULONG(arg0);
NUM2ULONG         358 ext/dl/cptr.c  	offset = NUM2ULONG(arg0);
NUM2ULONG         359 ext/dl/cptr.c  	len    = NUM2ULONG(arg1);
NUM2ULONG         378 ext/dl/cptr.c  	offset = NUM2ULONG(arg0);
NUM2ULONG         383 ext/dl/cptr.c  	offset = NUM2ULONG(arg0);
NUM2ULONG         384 ext/dl/cptr.c  	len    = NUM2ULONG(arg1);
NUM2ULONG         138 ext/dl/dl.h    # define NUM2PTR(x)   ((void*)(NUM2ULONG(x)))
NUM2ULONG         189 ext/openssl/ossl_x509name.c     else iflag = NUM2ULONG(flag);
NUM2ULONG          82 ext/racc/cparse/cparse.c     return (ID)NUM2ULONG(v);
NUM2ULONG         273 ext/zlib/zlib.c 	sum = NUM2ULONG(vsum);
NUM2ULONG         603 file.c         	    sprintf(buf, "0%lo", NUM2ULONG(v));
NUM2ULONG         609 file.c         	    sprintf(buf, "0x%lx", NUM2ULONG(v));
NUM2ULONG        1874 gc.c           #define NUM2PTR(x) NUM2ULONG(x)
NUM2ULONG        4599 io.c               int cmd = NUM2ULONG(req);
NUM2ULONG        1899 process.c      # define NUM2RLIM(v) NUM2ULONG(v)
NUM2ULONG         280 ruby.h         #define NUM2UINT(x) ((unsigned int)NUM2ULONG(x))


NUMCHAR_OPTION

NUMCHAR_OPTION     62 ext/nkf/nkf-utf8/config.h #if defined(NUMCHAR_OPTION) && !defined(UTF8_INPUT_ENABLE)
NUMCHAR_OPTION    434 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION    978 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   1046 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   1555 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   1621 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   1718 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   1891 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   2002 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   2336 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   2517 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   2639 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   2775 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   2834 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   2860 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   2986 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   3045 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   3897 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION
NUMCHAR_OPTION   4916 ext/nkf/nkf-utf8/nkf.c #ifdef NUMCHAR_OPTION


N_ALT

N_ALT            1238 regcomp.c        case N_ALT:
N_ALT            1320 regcomp.c        case N_ALT:
N_ALT            1467 regcomp.c        case N_ALT:
N_ALT            1548 regcomp.c        case N_ALT:
N_ALT            1578 regcomp.c        case N_ALT:
N_ALT            1671 regcomp.c        case N_ALT:
N_ALT            1780 regcomp.c        case N_ALT:
N_ALT            1876 regcomp.c        case N_ALT:
N_ALT            2006 regcomp.c        case N_ALT:
N_ALT            2338 regcomp.c        case N_ALT:
N_ALT            2435 regcomp.c        case N_ALT:
N_ALT            2505 regcomp.c        case N_ALT:
N_ALT            2567 regcomp.c        case N_ALT:
N_ALT            2622 regcomp.c        case N_ALT:
N_ALT            2682 regcomp.c        case N_ALT:
N_ALT            2754 regcomp.c        case N_ALT:
N_ALT            3084 regcomp.c        case N_ALT:
N_ALT            3259 regcomp.c        ( N_LIST | N_ALT | N_STRING | N_CCLASS | N_CTYPE | \
N_ALT            3984 regcomp.c        case N_ALT:
N_ALT            5395 regcomp.c        case N_ALT:
N_ALT            5533 regcomp.c        if (type != N_LIST && type != N_ALT && type != N_QUALIFIER &&
N_ALT             980 regparse.c       case N_ALT:
N_ALT            1196 regparse.c       node->type = N_ALT;
N_ALT            2055 regparse.c       case N_ALT:  /* ex. (?:abc|\A)* */


N_ANCHOR

N_ANCHOR         1295 regcomp.c        case N_ANCHOR:
N_ANCHOR         1443 regcomp.c        case N_ANCHOR:
N_ANCHOR         1723 regcomp.c        case N_ANCHOR:
N_ANCHOR         1852 regcomp.c        case N_ANCHOR:
N_ANCHOR         1977 regcomp.c        case N_ANCHOR:
N_ANCHOR         2106 regcomp.c        case N_ANCHOR:
N_ANCHOR         2412 regcomp.c        case N_ANCHOR:
N_ANCHOR         2456 regcomp.c        case N_ANCHOR:
N_ANCHOR         2521 regcomp.c        case N_ANCHOR:
N_ANCHOR         2577 regcomp.c        case N_ANCHOR:
N_ANCHOR         2632 regcomp.c        case N_ANCHOR:
N_ANCHOR         2701 regcomp.c        case N_ANCHOR:
N_ANCHOR         2824 regcomp.c        case N_ANCHOR:
N_ANCHOR         3245 regcomp.c        case N_ANCHOR:
N_ANCHOR         3260 regcomp.c          N_ANYCHAR | N_ANCHOR | N_EFFECT | N_QUALIFIER | N_CALL )
N_ANCHOR         4108 regcomp.c        case N_ANCHOR:
N_ANCHOR         5450 regcomp.c        case N_ANCHOR:
N_ANCHOR         1031 regparse.c       case N_ANCHOR:
N_ANCHOR         1207 regparse.c       node->type = N_ANCHOR;
N_ANCHOR         2039 regparse.c       case N_ANCHOR:
N_ANCHOR         4442 regparse.c       if (NTYPE(*np) == N_ANCHOR)


N_ANYCHAR

N_ANYCHAR         700 regcomp.c        if (NTYPE(qn->target) == N_ANYCHAR) {
N_ANYCHAR         758 regcomp.c            NTYPE(qn->target) == N_ANYCHAR)
N_ANYCHAR        1263 regcomp.c        case N_ANYCHAR:
N_ANYCHAR        1375 regcomp.c        case N_ANYCHAR:
N_ANYCHAR        1722 regcomp.c        case N_ANYCHAR:
N_ANYCHAR        1811 regcomp.c        case N_ANYCHAR:
N_ANYCHAR        1903 regcomp.c        case N_ANYCHAR:
N_ANYCHAR        2075 regcomp.c        case N_ANYCHAR:
N_ANYCHAR        2339 regcomp.c        case N_ANYCHAR:
N_ANYCHAR        3100 regcomp.c        case N_ANYCHAR:
N_ANYCHAR        3260 regcomp.c          N_ANYCHAR | N_ANCHOR | N_EFFECT | N_QUALIFIER | N_CALL )
N_ANYCHAR        4100 regcomp.c        case N_ANYCHAR:
N_ANYCHAR        4199 regcomp.c      	    NTYPE(qn->target) == N_ANYCHAR && qn->greedy) {
N_ANYCHAR        5446 regcomp.c        case N_ANYCHAR:
N_ANYCHAR        1170 regparse.c       node->type = N_ANYCHAR;
N_ANYCHAR          48 regparse.h       (((type) & (N_STRING | N_CCLASS | N_CTYPE | N_ANYCHAR | N_BACKREF)) != 0)


N_BACKREF

N_BACKREF        1267 regcomp.c        case N_BACKREF:
N_BACKREF        1382 regcomp.c        case N_BACKREF:
N_BACKREF        1560 regcomp.c        case N_BACKREF:
N_BACKREF        1590 regcomp.c        case N_BACKREF:
N_BACKREF        1718 regcomp.c        case N_BACKREF:
N_BACKREF        1740 regcomp.c        case N_BACKREF:
N_BACKREF        1907 regcomp.c        case N_BACKREF:
N_BACKREF        2337 regcomp.c        case N_BACKREF:
N_BACKREF        3108 regcomp.c        case N_BACKREF:
N_BACKREF        4145 regcomp.c        case N_BACKREF:
N_BACKREF        5477 regcomp.c        case N_BACKREF:
N_BACKREF        1026 regparse.c       case N_BACKREF:
N_BACKREF        1221 regparse.c       node->type = N_BACKREF;
N_BACKREF          48 regparse.h       (((type) & (N_STRING | N_CCLASS | N_CTYPE | N_ANYCHAR | N_BACKREF)) != 0)


N_CALL

N_CALL           1282 regcomp.c        case N_CALL:
N_CALL           1430 regcomp.c        case N_CALL:
N_CALL           1682 regcomp.c        case N_CALL:
N_CALL           1762 regcomp.c        case N_CALL:
N_CALL           1928 regcomp.c        case N_CALL:
N_CALL           2057 regcomp.c        case N_CALL:
N_CALL           2341 regcomp.c        case N_CALL:
N_CALL           2535 regcomp.c        case N_CALL:
N_CALL           2646 regcomp.c        case N_CALL:
N_CALL           2767 regcomp.c        case N_CALL:
N_CALL           3104 regcomp.c        case N_CALL:
N_CALL           3260 regcomp.c          N_ANYCHAR | N_ANCHOR | N_EFFECT | N_QUALIFIER | N_CALL )
N_CALL           4175 regcomp.c        case N_CALL:
N_CALL           5491 regcomp.c        case N_CALL:
N_CALL           1260 regparse.c       node->type = N_CALL;


N_CCLASS

N_CCLASS         1258 regcomp.c        case N_CCLASS:
N_CCLASS         1356 regcomp.c        case N_CCLASS:
N_CCLASS         1721 regcomp.c        case N_CCLASS:
N_CCLASS         1810 regcomp.c        case N_CCLASS:
N_CCLASS         1902 regcomp.c        case N_CCLASS:
N_CCLASS         2074 regcomp.c        case N_CCLASS:
N_CCLASS         2180 regcomp.c            case N_CCLASS:
N_CCLASS         2199 regcomp.c        case N_CCLASS:
N_CCLASS         2237 regcomp.c            case N_CCLASS:
N_CCLASS         2290 regcomp.c            case N_CCLASS:
N_CCLASS         2346 regcomp.c        case N_CCLASS:
N_CCLASS         3090 regcomp.c        case N_CCLASS:
N_CCLASS         3259 regcomp.c        ( N_LIST | N_ALT | N_STRING | N_CCLASS | N_CTYPE | \
N_CCLASS         4041 regcomp.c        case N_CCLASS:
N_CCLASS         5423 regcomp.c        case N_CCLASS:
N_CCLASS         1004 regparse.c       case N_CCLASS:
N_CCLASS         1101 regparse.c       node->type = N_CCLASS;
N_CCLASS         1116 regparse.c       node->type = N_CCLASS;
N_CCLASS           48 regparse.h       (((type) & (N_STRING | N_CCLASS | N_CTYPE | N_ANYCHAR | N_BACKREF)) != 0)


N_COMM

N_COMM            173 dln.c          #ifndef N_COMM
N_COMM            706 dln.c          		    sym->n_type = N_EXT | N_COMM;
N_COMM            715 dln.c          		    sym->n_type = N_COMM;
N_COMM            724 dln.c          		    sym->n_type = N_EXT | N_COMM;
N_COMM            745 dln.c          	  case N_COMM:
N_COMM            803 dln.c          		  case N_EXT|N_COMM:
N_COMM            804 dln.c          		  case N_COMM:


N_CTYPE

N_CTYPE          1262 regcomp.c        case N_CTYPE:
N_CTYPE          1360 regcomp.c        case N_CTYPE:
N_CTYPE          1720 regcomp.c        case N_CTYPE:
N_CTYPE          1801 regcomp.c        case N_CTYPE:
N_CTYPE          1890 regcomp.c        case N_CTYPE:
N_CTYPE          2065 regcomp.c        case N_CTYPE:
N_CTYPE          2158 regcomp.c        case N_CTYPE:
N_CTYPE          2161 regcomp.c            case N_CTYPE:
N_CTYPE          2203 regcomp.c            case N_CTYPE:
N_CTYPE          2277 regcomp.c            case N_CTYPE:
N_CTYPE          2345 regcomp.c        case N_CTYPE:
N_CTYPE          3099 regcomp.c        case N_CTYPE:
N_CTYPE          3259 regcomp.c        ( N_LIST | N_ALT | N_STRING | N_CCLASS | N_CTYPE | \
N_CTYPE          4066 regcomp.c        case N_CTYPE:
N_CTYPE          5435 regcomp.c        case N_CTYPE:
N_CTYPE          1160 regparse.c       node->type = N_CTYPE;
N_CTYPE            48 regparse.h       (((type) & (N_STRING | N_CCLASS | N_CTYPE | N_ANYCHAR | N_BACKREF)) != 0)


N_EFFECT

N_EFFECT         1291 regcomp.c        case N_EFFECT:
N_EFFECT         1439 regcomp.c        case N_EFFECT:
N_EFFECT         1484 regcomp.c        case N_EFFECT:
N_EFFECT         1556 regcomp.c        case N_EFFECT:
N_EFFECT         1586 regcomp.c        case N_EFFECT:
N_EFFECT         1700 regcomp.c        case N_EFFECT:
N_EFFECT         1827 regcomp.c        case N_EFFECT:
N_EFFECT         1952 regcomp.c        case N_EFFECT:
N_EFFECT         2079 regcomp.c        case N_EFFECT:
N_EFFECT         2390 regcomp.c        case N_EFFECT:
N_EFFECT         2446 regcomp.c        case N_EFFECT:
N_EFFECT         2539 regcomp.c        case N_EFFECT:
N_EFFECT         2591 regcomp.c        case N_EFFECT:
N_EFFECT         2651 regcomp.c        case N_EFFECT:
N_EFFECT         2715 regcomp.c        case N_EFFECT:
N_EFFECT         2763 regcomp.c        case N_EFFECT:
N_EFFECT         2936 regcomp.c        else if (type == N_EFFECT) {
N_EFFECT         3204 regcomp.c        case N_EFFECT:
N_EFFECT         3260 regcomp.c          N_ANYCHAR | N_ANCHOR | N_EFFECT | N_QUALIFIER | N_CALL )
N_EFFECT         4240 regcomp.c        case N_EFFECT:
N_EFFECT         5507 regcomp.c        case N_EFFECT:
N_EFFECT         5534 regcomp.c            type != N_EFFECT)
N_EFFECT         1021 regparse.c       case N_EFFECT:
N_EFFECT         1294 regparse.c       node->type = N_EFFECT;
N_EFFECT         2043 regparse.c       case N_EFFECT:


N_INET

N_INET            647 ext/socket/getaddrinfo.c 			afd = &afdl[N_INET];
N_INET            654 ext/socket/getaddrinfo.c 				afd = &afdl[N_INET];


N_INET6

N_INET6           640 ext/socket/getaddrinfo.c 			afd = &afdl[N_INET6];
N_INET6           656 ext/socket/getaddrinfo.c 				afd = &afdl[N_INET6];
N_INET6           664 ext/socket/getaddrinfo.c 			GET_AI(cur->ai_next, &afdl[N_INET6], ap, port);


N_LIST

N_LIST           1228 regcomp.c        case N_LIST:
N_LIST           1314 regcomp.c        case N_LIST:
N_LIST           1466 regcomp.c        case N_LIST:
N_LIST           1547 regcomp.c        case N_LIST:
N_LIST           1577 regcomp.c        case N_LIST:
N_LIST           1670 regcomp.c        case N_LIST:
N_LIST           1773 regcomp.c        case N_LIST:
N_LIST           1868 regcomp.c        case N_LIST:
N_LIST           1998 regcomp.c        case N_LIST:
N_LIST           2352 regcomp.c        case N_LIST:
N_LIST           2434 regcomp.c        case N_LIST:
N_LIST           2485 regcomp.c        case N_LIST:
N_LIST           2566 regcomp.c        case N_LIST:
N_LIST           2621 regcomp.c        case N_LIST:
N_LIST           2681 regcomp.c        case N_LIST:
N_LIST           2748 regcomp.c        case N_LIST:
N_LIST           2876 regcomp.c            np->type = N_LIST;  /* alt -> list */
N_LIST           3071 regcomp.c        case N_LIST:
N_LIST           3259 regcomp.c        ( N_LIST | N_ALT | N_STRING | N_CCLASS | N_CTYPE | \
N_LIST           3967 regcomp.c        case N_LIST:
N_LIST           5394 regcomp.c        case N_LIST:
N_LIST           5396 regcomp.c          if (NTYPE(node) == N_LIST)
N_LIST           5533 regcomp.c        if (type != N_LIST && type != N_ALT && type != N_QUALIFIER &&
N_LIST            979 regparse.c       case N_LIST:
N_LIST           1179 regparse.c       node->type = N_LIST;
N_LIST           2048 regparse.c       case N_LIST: /* ex. (?:\G\A)* */
N_LIST           5075 regparse.c           if (NTYPE(node) == N_LIST) {


N_MAGIC

N_MAGIC           176 dln.c          #ifndef N_MAGIC
N_MAGIC           180 dln.c          #define INVALID_OBJECT(h) (N_MAGIC(h) != OMAGIC)


N_QUALIFIER

N_QUALIFIER      1287 regcomp.c        case N_QUALIFIER:
N_QUALIFIER      1435 regcomp.c        case N_QUALIFIER:
N_QUALIFIER      1473 regcomp.c        case N_QUALIFIER:
N_QUALIFIER      1478 regcomp.c            if (*ptarget != old && NTYPE(*ptarget) == N_QUALIFIER) {
N_QUALIFIER      1553 regcomp.c        case N_QUALIFIER:
N_QUALIFIER      1583 regcomp.c        case N_QUALIFIER:
N_QUALIFIER      1691 regcomp.c        case N_QUALIFIER:
N_QUALIFIER      1815 regcomp.c        case N_QUALIFIER:
N_QUALIFIER      1936 regcomp.c        case N_QUALIFIER:
N_QUALIFIER      2043 regcomp.c        case N_QUALIFIER:
N_QUALIFIER      2378 regcomp.c        case N_QUALIFIER:
N_QUALIFIER      2441 regcomp.c        case N_QUALIFIER:
N_QUALIFIER      2517 regcomp.c        case N_QUALIFIER:
N_QUALIFIER      2573 regcomp.c        case N_QUALIFIER:
N_QUALIFIER      2628 regcomp.c        case N_QUALIFIER:
N_QUALIFIER      2693 regcomp.c        case N_QUALIFIER:
N_QUALIFIER      2760 regcomp.c        case N_QUALIFIER:
N_QUALIFIER      2910 regcomp.c        if (type == N_QUALIFIER) {
N_QUALIFIER      3124 regcomp.c        case N_QUALIFIER:
N_QUALIFIER      3189 regcomp.c      	if (NTYPE(target) == N_QUALIFIER) {
N_QUALIFIER      3230 regcomp.c      	  if (NTYPE(target) == N_QUALIFIER) {
N_QUALIFIER      3260 regcomp.c          N_ANYCHAR | N_ANCHOR | N_EFFECT | N_QUALIFIER | N_CALL )
N_QUALIFIER      4187 regcomp.c        case N_QUALIFIER:
N_QUALIFIER      5500 regcomp.c        case N_QUALIFIER:
N_QUALIFIER      5533 regcomp.c        if (type != N_LIST && type != N_ALT && type != N_QUALIFIER &&
N_QUALIFIER      1016 regparse.c       case N_QUALIFIER:
N_QUALIFIER      1275 regparse.c       node->type = N_QUALIFIER;
N_QUALIFIER      4489 regparse.c       case N_QUALIFIER:


N_STRING

N_STRING         1251 regcomp.c        case N_STRING:
N_STRING         1349 regcomp.c        case N_STRING:
N_STRING         1719 regcomp.c        case N_STRING:
N_STRING         1794 regcomp.c        case N_STRING:
N_STRING         1883 regcomp.c        case N_STRING:
N_STRING         2032 regcomp.c        case N_STRING:
N_STRING         2189 regcomp.c            case N_STRING:
N_STRING         2259 regcomp.c            case N_STRING:
N_STRING         2269 regcomp.c        case N_STRING:
N_STRING         2300 regcomp.c            case N_STRING:
N_STRING         2356 regcomp.c        case N_STRING:
N_STRING         3093 regcomp.c        case N_STRING:
N_STRING         3152 regcomp.c      	    if (NTYPE(target) == N_STRING) {
N_STRING         3168 regcomp.c            if (NTYPE(target) == N_STRING) {
N_STRING         3259 regcomp.c        ( N_LIST | N_ALT | N_STRING | N_CCLASS | N_CTYPE | \
N_STRING         3999 regcomp.c        case N_STRING:
N_STRING         5411 regcomp.c        case N_STRING:
N_STRING          973 regparse.c       case N_STRING:
N_STRING         1382 regparse.c       node->type = N_STRING;
N_STRING         1410 regparse.c       node->type = N_STRING;
N_STRING         4476 regparse.c       case N_STRING:
N_STRING           48 regparse.h       (((type) & (N_STRING | N_CCLASS | N_CTYPE | N_ANYCHAR | N_BACKREF)) != 0)


NameEntry

NameEntry         468 regparse.c     static NameEntry*
NameEntry         471 regparse.c       NameEntry* e;
NameEntry         474 regparse.c       e = (NameEntry* )NULL;
NameEntry         569 regparse.c       NameEntry* e;
NameEntry         580 regparse.c       NameEntry* e;
NameEntry         612 regparse.c       NameEntry* e;
NameEntry         652 regparse.c     static NameEntry*
NameEntry         656 regparse.c       NameEntry* e;
NameEntry         667 regparse.c       return (NameEntry* )NULL;
NameEntry         676 regparse.c       NameEntry* e;
NameEntry         708 regparse.c       NameEntry* e;
NameEntry         721 regparse.c         e = (NameEntry* )xmalloc(sizeof(NameEntry));
NameEntry         744 regparse.c           t->e = (NameEntry* )xmalloc(sizeof(NameEntry) * alloc);
NameEntry         757 regparse.c           t->e = (NameEntry* )xrealloc(t->e, sizeof(NameEntry) * alloc);
NameEntry         815 regparse.c       NameEntry* e;


NameTable

NameTable         421 regparse.c       NameTable* t = (NameTable* )reg->name_table;
NameTable         445 regparse.c       NameTable* t = (NameTable* )reg->name_table;
NameTable         457 regparse.c       NameTable* t;
NameTable         462 regparse.c       t = (NameTable* )reg->name_table;
NameTable         472 regparse.c       NameTable* t = (NameTable* )reg->name_table;
NameTable         511 regparse.c       NameTable* t = (NameTable* )reg->name_table;
NameTable         544 regparse.c       NameTable* t = (NameTable* )reg->name_table;
NameTable         556 regparse.c       NameTable* t = (NameTable* )reg->name_table;
NameTable         581 regparse.c       NameTable* t = (NameTable* )reg->name_table;
NameTable         613 regparse.c       NameTable* t = (NameTable* )reg->name_table;
NameTable         641 regparse.c       NameTable* t;
NameTable         646 regparse.c       t = (NameTable* )reg->name_table;
NameTable         657 regparse.c       NameTable* t = (NameTable* )reg->name_table;
NameTable         677 regparse.c       NameTable* t = (NameTable* )reg->name_table;
NameTable         694 regparse.c       NameTable* t = (NameTable* )reg->name_table;
NameTable         709 regparse.c       NameTable* t = (NameTable* )reg->name_table;
NameTable         738 regparse.c           t = (NameTable* )xmalloc(sizeof(NameTable));


Need_Float

Need_Float         21 math.c             Need_Float(x);\
Need_Float         22 math.c             Need_Float(y);\
Need_Float         55 math.c             Need_Float(x);
Need_Float         70 math.c             Need_Float(x);
Need_Float         86 math.c             Need_Float(x);
Need_Float        103 math.c             Need_Float(x);
Need_Float        124 math.c             Need_Float(x);
Need_Float        143 math.c             Need_Float(x);
Need_Float        166 math.c             Need_Float(x);
Need_Float        191 math.c             Need_Float(x);
Need_Float        215 math.c             Need_Float(x);
Need_Float        231 math.c             Need_Float(x);
Need_Float        250 math.c             Need_Float(x);
Need_Float        266 math.c             Need_Float(x);
Need_Float        285 math.c             Need_Float(x);
Need_Float        310 math.c             Need_Float(x);
Need_Float        331 math.c             Need_Float(x);
Need_Float        353 math.c             Need_Float(x);
Need_Float        380 math.c             Need_Float(x);
Need_Float        399 math.c             Need_Float(x);
Need_Float        430 math.c             Need_Float(x);
Need_Float        444 math.c             Need_Float(x);


Need_Float2

Need_Float2        38 math.c             Need_Float2(y, x);
Need_Float2       416 math.c             Need_Float2(x, y);


Next

Next              113 dir.c          #ifndef Next /* single byte environment */
Next              118 dir.c          # define Inc(p) ((p) = Next(p))
Next              123 dir.c              const int len1 = Next(p1) - p1;
Next              124 dir.c              const int len2 = Next(p2) - p2;
Next              199 dir.c          	p = Next(t1);
Next              206 dir.c          	    p = Next(t2);
Next              969 dir.c          	p = Next(p-1);
Next             1005 dir.c          	p = Next(p-1);
Next             2769 ext/win32ole/win32ole.c     while(pEnum->lpVtbl->Next(pEnum, 1, &variant, NULL) == S_OK) {


Node

Node               76 regcomp.c        Node c;
Node             1322 regcomp.c            Node* x = node;
Node             1463 regcomp.c        Node* node = *plink;
Node             1475 regcomp.c            Node** ptarget = &(NQUALIFIER(node).target);
Node             1476 regcomp.c            Node*  old = *ptarget;
Node             1744 regcomp.c            Node** nodes = SCANENV_MEM_NODES(env);
Node             1782 regcomp.c            Node *x, *y;
Node             1911 regcomp.c            Node** nodes = SCANENV_MEM_NODES(env);
Node             2183 regcomp.c      	  Node* tmp;
Node             2331 regcomp.c      static Node*
Node             2334 regcomp.c        Node* n = NULL_NODE;
Node             2487 regcomp.c            Node *x;
Node             2772 regcomp.c            Node** nodes = SCANENV_MEM_NODES(env);
Node             2854 regcomp.c        Node tmp_node;
Node             2855 regcomp.c        Node *head, *np, *insert_node;
Node             2920 regcomp.c      	  Node *x, *y;
Node             2925 regcomp.c      	      Node* en = onig_node_new_effect(EFFECT_STOP_BACKTRACK);
Node             2952 regcomp.c        Node *snode;
Node             2953 regcomp.c        Node *root = NULL_NODE;
Node             2954 regcomp.c        Node **tailp = (Node** )0;
Node             2984 regcomp.c            if (tailp == (Node** )0) {
Node             3031 regcomp.c          if (tailp == (Node** )0) {
Node             3073 regcomp.c            Node* prev = NULL_NODE;
Node             3112 regcomp.c            Node** nodes = SCANENV_MEM_NODES(env);
Node             3128 regcomp.c            Node* target = qn->target;
Node             3228 regcomp.c      	  Node* target = en->target;
Node             3971 regcomp.c            Node* nd = node;
Node             3987 regcomp.c            Node* nd = node;
Node             4150 regcomp.c            Node** nodes = SCANENV_MEM_NODES(env->scan_env);
Node             4734 regcomp.c        Node*  root;
Node             4817 regcomp.c          scan_env.mem_nodes_dynamic = (Node** )NULL;
Node              908 regparse.c       env->mem_nodes_dynamic = (Node** )NULL;
Node              918 regparse.c       Node** p;
Node              925 regparse.c     	p = (Node** )xmalloc(sizeof(Node*) * alloc);
Node              927 regparse.c     		sizeof(Node*) * SCANENV_MEMNODES_SIZE);
Node              931 regparse.c     	p = (Node** )xrealloc(env->mem_nodes_dynamic, sizeof(Node*) * alloc);
Node              984 regparse.c           Node* next_node = NCONS(node).right;
Node             1068 regparse.c     static Node*
Node             1071 regparse.c       Node* node;
Node             1076 regparse.c         node = (Node* )FreeNodeList;
Node             1083 regparse.c       node = (Node* )xmalloc(sizeof(Node));
Node             1096 regparse.c     static Node*
Node             1099 regparse.c       Node* node = node_new();
Node             1107 regparse.c     static Node*
Node             1114 regparse.c       Node* node = node_new();
Node             1155 regparse.c     static Node*
Node             1158 regparse.c       Node* node = node_new();
Node             1165 regparse.c     static Node*
Node             1168 regparse.c       Node* node = node_new();
Node             1174 regparse.c     static Node*
Node             1177 regparse.c       Node* node = node_new();
Node             1185 regparse.c     extern Node*
Node             1191 regparse.c     static Node*
Node             1194 regparse.c       Node* node = node_new();
Node             1202 regparse.c     extern Node*
Node             1205 regparse.c       Node* node = node_new();
Node             1214 regparse.c     static Node*
Node             1218 regparse.c       Node* node = node_new();
Node             1254 regparse.c     static Node*
Node             1257 regparse.c       Node* node = node_new();
Node             1270 regparse.c     static Node*
Node             1273 regparse.c       Node* node = node_new();
Node             1289 regparse.c     static Node*
Node             1292 regparse.c       Node* node = node_new();
Node             1305 regparse.c     extern Node*
Node             1311 regparse.c     static Node*
Node             1314 regparse.c       Node* node = node_new_effect(EFFECT_MEMORY);
Node             1325 regparse.c     static Node*
Node             1328 regparse.c       Node* node = node_new_effect(EFFECT_OPTION);
Node             1404 regparse.c     static Node*
Node             1407 regparse.c       Node* node = node_new();
Node             1422 regparse.c     extern Node*
Node             1428 regparse.c     static Node*
Node             1431 regparse.c       Node* node = node_new_str(s, end);
Node             1436 regparse.c     static Node*
Node             1442 regparse.c     static Node*
Node             1451 regparse.c     static Node*
Node             1455 regparse.c       Node* n = NULL_NODE;
Node             3913 regparse.c       Node* node;
Node             4131 regparse.c     	Node *anode;
Node             4242 regparse.c       Node *target;
Node             4480 regparse.c     	Node* n = str_node_split_last_char(sn, env->enc);
Node             4555 regparse.c       Node **ptail, *snode = NULL_NODE;
Node             4682 regparse.c       Node* qn;
Node             4683 regparse.c       Node** targetp;
Node             4702 regparse.c           Node* target;
Node             4939 regparse.c             Node *alt_root, *work;
Node             5028 regparse.c     	Node* en;
Node             5039 regparse.c     	Node *tmp;
Node             5059 regparse.c       Node *node, **headp;
Node             5096 regparse.c       Node *node, **headp;
Node              245 regparse.h     #define NULL_NODE  ((Node* )0)
Node              275 regparse.h       Node*           mem_nodes_static[SCANENV_MEMNODES_SIZE];
Node              276 regparse.h       Node**          mem_nodes_dynamic;
Node              301 regparse.h     extern Node*  onig_node_new_effect P_((int type));
Node              302 regparse.h     extern Node*  onig_node_new_anchor P_((int type));
Node              303 regparse.h     extern Node*  onig_node_new_str P_((const UChar* s, const UChar* end));
Node              304 regparse.h     extern Node*  onig_node_new_list P_((Node* left, Node* right));


NodeOptInfo

NodeOptInfo      3970 regcomp.c            NodeOptInfo nopt;
NodeOptInfo      3986 regcomp.c            NodeOptInfo nopt;
NodeOptInfo      4121 regcomp.c      	NodeOptInfo nopt;
NodeOptInfo      4191 regcomp.c            NodeOptInfo nopt;
NodeOptInfo      4381 regcomp.c        NodeOptInfo opt;


NtCmdLineElement

NtCmdLineElement 1011 win32/win32.c      NtCmdLineElement *tmpcurr;
NtCmdLineElement 1012 win32/win32.c      NtCmdLineElement ***tail = (NtCmdLineElement ***)vinfo;
NtCmdLineElement 1014 win32/win32.c      tmpcurr = ALLOC(NtCmdLineElement);
NtCmdLineElement 1015 win32/win32.c      MEMZERO(tmpcurr, NtCmdLineElement, 1);
NtCmdLineElement 1033 win32/win32.c  static NtCmdLineElement **
NtCmdLineElement 1038 win32/win32.c      NtCmdLineElement **last = tail;
NtCmdLineElement 1121 win32/win32.c      NtCmdLineElement *curr, **tail;
NtCmdLineElement 1122 win32/win32.c      NtCmdLineElement *cmdhead = NULL, **cmdtail = &cmdhead;
NtCmdLineElement 1276 win32/win32.c  	curr = ALLOC(NtCmdLineElement);
NtCmdLineElement 1277 win32/win32.c  	MEMZERO(curr, NtCmdLineElement, 1);


NtInitialize

NtInitialize       33 main.c             NtInitialize(&argc, &argv);
NtInitialize      160 win32/win32.h  extern void   NtInitialize(int *, char ***);


OBJECT_TYPE_TEMPLATE

OBJECT_TYPE_TEMPLATE  126 ext/openssl/ossl_x509name.c 	    if(NIL_P(template)) template = OBJECT_TYPE_TEMPLATE;
OBJECT_TYPE_TEMPLATE  153 ext/openssl/ossl_x509name.c     if(NIL_P(type)) type = rb_aref(OBJECT_TYPE_TEMPLATE, oid);


OBJSETUP

OBJSETUP           95 array.c            OBJSETUP(ary, klass, T_ARRAY);
OBJSETUP          209 array.c        	OBJSETUP(shared, rb_cArray, T_ARRAY);
OBJSETUP           45 bignum.c           OBJSETUP(big, klass, T_BIGNUM);
OBJSETUP           25 class.c            OBJSETUP(klass, rb_cClass, T_CLASS);
OBJSETUP          116 class.c        	OBJSETUP(clone, 0, RBASIC(klass)->flags);
OBJSETUP          255 class.c            OBJSETUP(mdl, rb_cModule, T_MODULE);
OBJSETUP          321 class.c            OBJSETUP(klass, rb_cClass, T_ICLASS);
OBJSETUP          759 eval.c             OBJSETUP(vars, 0, T_VARMAP);
OBJSETUP          967 eval.c             OBJSETUP(_scope, 0, T_SCOPE);	\
OBJSETUP         8236 eval.c                 OBJSETUP(scope, tmp, T_SCOPE);
OBJSETUP          404 gc.c               OBJSETUP(data, klass, T_DATA);
OBJSETUP          205 hash.c             OBJSETUP(hash, klass, T_HASH);
OBJSETUP          381 io.c               OBJSETUP(io, klass, T_FILE);
OBJSETUP         1044 marshal.c      	    OBJSETUP(big, rb_cBignum, T_BIGNUM);
OBJSETUP          465 numeric.c          OBJSETUP(flt, rb_cFloat, T_FLOAT);
OBJSETUP         1433 object.c           OBJSETUP(obj, klass, T_OBJECT);
OBJSETUP          265 random.c           OBJSETUP(big, rb_cBignum, T_BIGNUM);
OBJSETUP          654 re.c               OBJSETUP(match, klass, T_MATCH);
OBJSETUP         1353 re.c               OBJSETUP(re, klass, T_REGEXP);
OBJSETUP          318 ruby.h             OBJSETUP(clone,rb_singleton_class_clone((VALUE)obj),RBASIC(obj)->flags);\
OBJSETUP          323 ruby.h             OBJSETUP(dup,rb_obj_class(obj),(RBASIC(obj)->flags)&(T_MASK|FL_EXIVAR|FL_TAINT));\
OBJSETUP           62 string.c           OBJSETUP(str, klass, T_STRING);
OBJSETUP          332 struct.c           OBJSETUP(st, klass, T_STRUCT);


OBJ_FREEZE

OBJ_FREEZE        216 array.c        	OBJ_FREEZE(shared);
OBJ_FREEZE        795 class.c            if (OBJ_FROZEN(obj)) OBJ_FREEZE(klass);
OBJ_FREEZE       6839 eval.c         	    OBJ_FREEZE(tmp);
OBJ_FREEZE       6849 eval.c         	    OBJ_FREEZE(tmp);
OBJ_FREEZE       6985 eval.c             OBJ_FREEZE(fn);
OBJ_FREEZE       1594 ext/tk/tkutil/tkutil.c     OBJ_FREEZE(TK_None);
OBJ_FREEZE       4105 file.c         	OBJ_FREEZE(fname);
OBJ_FREEZE       4114 file.c         	    OBJ_FREEZE(fname);
OBJ_FREEZE       4135 file.c         	    OBJ_FREEZE(fname);
OBJ_FREEZE       4158 file.c         	OBJ_FREEZE(path);
OBJ_FREEZE       4218 file.c         	OBJ_FREEZE(tmp);
OBJ_FREEZE       5489 io.c               OBJ_FREEZE(rb_default_rs);	/* avoid modifying RS_default */
OBJ_FREEZE        654 object.c       	OBJ_FREEZE(obj);
OBJ_FREEZE       1191 ruby.c         	OBJ_FREEZE(arg);
OBJ_FREEZE        186 string.c           OBJ_FREEZE(str);
OBJ_FREEZE        573 string.c       	    OBJ_FREEZE(shared);
OBJ_FREEZE        579 string.c           OBJ_FREEZE(str);
OBJ_FREEZE        175 struct.c           OBJ_FREEZE(members);
OBJ_FREEZE       1191 variable.c         OBJ_FREEZE(fn);


OBJ_FROZEN

OBJ_FROZEN         47 array.c            if (OBJ_FROZEN(ary)) rb_error_frozen("array");
OBJ_FROZEN         86 array.c            if (OBJ_FROZEN(ary)) return Qtrue;
OBJ_FROZEN        795 class.c            if (OBJ_FROZEN(obj)) OBJ_FREEZE(klass);
OBJ_FROZEN       1095 error.c            if (OBJ_FROZEN(obj)) rb_error_frozen(rb_obj_classname(obj));
OBJ_FROZEN        401 eval.c             if (OBJ_FROZEN(klass)) rb_error_frozen("class/module");
OBJ_FROZEN        527 eval.c             if (OBJ_FROZEN(klass)) rb_error_frozen("class/module");
OBJ_FROZEN       1892 eval.c             if (OBJ_FROZEN(klass)) {
OBJ_FROZEN       3785 eval.c         	    if (OBJ_FROZEN(recv)) rb_error_frozen("object");
OBJ_FROZEN       11709 eval.c             if (OBJ_FROZEN(curr_thread->thgroup)) {
OBJ_FROZEN       12371 eval.c             if (OBJ_FROZEN(thread)) rb_error_frozen("thread locals");
OBJ_FROZEN       12787 eval.c             if (OBJ_FROZEN(group)) {
OBJ_FROZEN       12798 eval.c             if (OBJ_FROZEN(th->thgroup)) {
OBJ_FROZEN        286 ext/dbm/dbm.c      if (OBJ_FROZEN(obj)) rb_error_frozen("DBM");
OBJ_FROZEN        381 ext/gdbm/gdbm.c     if (OBJ_FROZEN(obj)) rb_error_frozen("GDBM");
OBJ_FROZEN        299 ext/openssl/ossl_ssl.c     if(OBJ_FROZEN(self)) return Qnil;
OBJ_FROZEN        263 ext/sdbm/init.c     if (OBJ_FROZEN(obj)) rb_error_frozen("SDBM");
OBJ_FROZEN        130 ext/stringio/stringio.c     if (OBJ_FROZEN(ptr->string)) {
OBJ_FROZEN        238 ext/stringio/stringio.c 	if ((ptr->flags & FMODE_WRITABLE) && OBJ_FROZEN(string)) {
OBJ_FROZEN        248 ext/stringio/stringio.c 	ptr->flags = OBJ_FROZEN(string) ? FMODE_READABLE : FMODE_READWRITE;
OBJ_FROZEN        365 ext/stringio/stringio.c     ptr->flags = OBJ_FROZEN(string) ? FMODE_READABLE : FMODE_READWRITE;
OBJ_FROZEN        223 hash.c             if (OBJ_FROZEN(hash)) rb_error_frozen("hash");
OBJ_FROZEN        169 object.c           if (OBJ_FROZEN(dest)) {
OBJ_FROZEN        592 object.c       	if (OBJ_FROZEN(obj)) {
OBJ_FROZEN        613 object.c       	if (OBJ_FROZEN(obj)) {
OBJ_FROZEN        650 object.c           if (!OBJ_FROZEN(obj)) {
OBJ_FROZEN        673 object.c           if (OBJ_FROZEN(obj)) return Qtrue;
OBJ_FROZEN         53 string.c           if (OBJ_FROZEN(s)) {
OBJ_FROZEN        168 string.c           if (OBJ_FROZEN(orig)) return orig;
OBJ_FROZEN        424 string.c           if (OBJ_FROZEN(str)) rb_error_frozen("string");
OBJ_FROZEN        577 string.c           if (OBJ_FROZEN(str)) return str;
OBJ_FROZEN        144 struct.c           if (OBJ_FROZEN(s)) rb_error_frozen("Struct");
OBJ_FROZEN        954 variable.c         if (OBJ_FROZEN(obj)) rb_error_frozen("object");
OBJ_FROZEN       1071 variable.c         if (OBJ_FROZEN(obj)) rb_error_frozen("object");
OBJ_FROZEN       1347 variable.c         if (OBJ_FROZEN(mod)) rb_error_frozen("class/module");
OBJ_FROZEN       1488 variable.c         if (OBJ_FROZEN(klass)) {
OBJ_FROZEN       1669 variable.c         if (OBJ_FROZEN(mod)) rb_error_frozen("class/module");


OBJ_INFECT

OBJ_INFECT       2252 array.c            OBJ_INFECT(ary2, ary);
OBJ_INFECT         32 class.c            OBJ_INFECT(klass, super);
OBJ_INFECT        338 class.c            OBJ_INFECT(klass, module);
OBJ_INFECT        339 class.c            OBJ_INFECT(klass, super);
OBJ_INFECT        362 class.c            OBJ_INFECT(klass, module);
OBJ_INFECT       3683 eval.c         		    OBJ_INFECT(str, str2);
OBJ_INFECT       8670 eval.c             OBJ_INFECT(method, klass);
OBJ_INFECT       8774 eval.c             OBJ_INFECT(method, obj);
OBJ_INFECT       12475 eval.c             OBJ_INFECT(str, thread);
OBJ_INFECT        322 ext/iconv/iconv.c     OBJ_INFECT(ret, str);
OBJ_INFECT        411 ext/iconv/iconv.c 			OBJ_INFECT(ret, str);
OBJ_INFECT        114 ext/nkf/nkf.c    OBJ_INFECT(result, src);
OBJ_INFECT       3051 ext/socket/socket.c     OBJ_INFECT(addr, port);
OBJ_INFECT       3052 ext/socket/socket.c     OBJ_INFECT(addr, host);
OBJ_INFECT       3066 ext/socket/socket.c     OBJ_INFECT(host, addr);
OBJ_INFECT       3082 ext/socket/socket.c     OBJ_INFECT(addr, path);
OBJ_INFECT       3101 ext/socket/socket.c     OBJ_INFECT(path, addr);
OBJ_INFECT        504 ext/stringio/stringio.c     OBJ_INFECT(copy, orig);
OBJ_INFECT        762 ext/stringio/stringio.c 	    OBJ_INFECT(ptr->string, self);
OBJ_INFECT       1009 ext/stringio/stringio.c     OBJ_INFECT(ptr->string, self);
OBJ_INFECT       1060 ext/stringio/stringio.c     OBJ_INFECT(ptr->string, self);
OBJ_INFECT        126 ext/strscan/strscan.c     OBJ_INFECT(str, p->str);
OBJ_INFECT        960 ext/zlib/zlib.c     OBJ_INFECT(dst, obj);
OBJ_INFECT        976 ext/zlib/zlib.c     OBJ_INFECT(dst, obj);
OBJ_INFECT        992 ext/zlib/zlib.c     OBJ_INFECT(dst, obj);
OBJ_INFECT       1239 ext/zlib/zlib.c     OBJ_INFECT(dst, src);
OBJ_INFECT       1283 ext/zlib/zlib.c     OBJ_INFECT(obj, src);
OBJ_INFECT       1287 ext/zlib/zlib.c     OBJ_INFECT(dst, obj);
OBJ_INFECT       1302 ext/zlib/zlib.c     OBJ_INFECT(obj, src);
OBJ_INFECT       1333 ext/zlib/zlib.c     OBJ_INFECT(dst, obj);
OBJ_INFECT       1389 ext/zlib/zlib.c     OBJ_INFECT(obj, dic);
OBJ_INFECT       1499 ext/zlib/zlib.c     OBJ_INFECT(dst, src);
OBJ_INFECT       1539 ext/zlib/zlib.c     OBJ_INFECT(obj, src);
OBJ_INFECT       1559 ext/zlib/zlib.c     OBJ_INFECT(dst, obj);
OBJ_INFECT       1576 ext/zlib/zlib.c     OBJ_INFECT(obj, src);
OBJ_INFECT       1608 ext/zlib/zlib.c     OBJ_INFECT(obj, src);
OBJ_INFECT       1651 ext/zlib/zlib.c     OBJ_INFECT(obj, dic);
OBJ_INFECT        617 file.c             OBJ_INFECT(str, self);
OBJ_INFECT       2725 file.c             OBJ_INFECT(basename, fname);
OBJ_INFECT       2774 file.c             OBJ_INFECT(dirname, fname);
OBJ_INFECT       2809 file.c             OBJ_INFECT(extname, fname);
OBJ_INFECT       2882 file.c             OBJ_INFECT(result, ary);
OBJ_INFECT       1121 hash.c             OBJ_INFECT(str, str2);
OBJ_INFECT       1125 hash.c             OBJ_INFECT(str, str2);
OBJ_INFECT       1139 hash.c             OBJ_INFECT(str, hash);
OBJ_INFECT       3248 io.c           		    OBJ_INFECT(argv[0], tmp);
OBJ_INFECT        325 object.c           OBJ_INFECT(str, str2);
OBJ_INFECT        341 object.c           OBJ_INFECT(str, obj);
OBJ_INFECT        624 object.c           OBJ_INFECT(obj1, obj2);
OBJ_INFECT        516 pack.c         		OBJ_INFECT(res, from);
OBJ_INFECT       1146 pack.c             OBJ_INFECT(s, str);
OBJ_INFECT       1927 pack.c         			OBJ_INFECT(tmp, str);
OBJ_INFECT        566 range.c            OBJ_INFECT(str, str2);
OBJ_INFECT        591 range.c            OBJ_INFECT(str, str2);
OBJ_INFECT        348 re.c               OBJ_INFECT(str, re);
OBJ_INFECT        505 re.c               OBJ_INFECT(str, re);
OBJ_INFECT        947 re.c               OBJ_INFECT(match, re);
OBJ_INFECT        948 re.c               OBJ_INFECT(match, str);
OBJ_INFECT        986 re.c               OBJ_INFECT(str, match);
OBJ_INFECT       1792 re.c               OBJ_INFECT(tmp, str);
OBJ_INFECT        133 string.c           OBJ_INFECT(str2, str);
OBJ_INFECT        185 string.c           OBJ_INFECT(str, orig);
OBJ_INFECT        390 string.c           OBJ_INFECT(str2, str);
OBJ_INFECT        556 string.c           OBJ_INFECT(str2, str);
OBJ_INFECT        709 string.c           OBJ_INFECT(str, str2);
OBJ_INFECT        732 string.c           OBJ_INFECT(str, str2);
OBJ_INFECT       1295 string.c           OBJ_INFECT(str, orig);
OBJ_INFECT       1446 string.c       		OBJ_INFECT(tmp, indx);
OBJ_INFECT       1561 string.c           OBJ_INFECT(str, val);
OBJ_INFECT       2028 string.c       	OBJ_INFECT(dest, str);
OBJ_INFECT       2129 string.c           OBJ_INFECT(str, str2);
OBJ_INFECT       2209 string.c           OBJ_INFECT(obj, str);
OBJ_INFECT       2397 string.c           OBJ_INFECT(result, str);
OBJ_INFECT       2500 string.c           OBJ_INFECT(result, str);
OBJ_INFECT       3420 string.c       	    OBJ_INFECT(line, str);
OBJ_INFECT       3430 string.c       	OBJ_INFECT(line, str);
OBJ_INFECT       3934 string.c           OBJ_INFECT(result, str);
OBJ_INFECT       3935 string.c           OBJ_INFECT(result, salt);
OBJ_INFECT       4095 string.c           OBJ_INFECT(res, str);
OBJ_INFECT       4096 string.c           if (flen > 0) OBJ_INFECT(res, pad);
OBJ_INFECT        465 struct.c           OBJ_INFECT(str, s);


OBJ_TAINT

OBJ_TAINT        1299 array.c            if (taint) OBJ_TAINT(result);
OBJ_TAINT        1359 array.c            if (tainted) OBJ_TAINT(str);
OBJ_TAINT         790 class.c        	OBJ_TAINT(klass);
OBJ_TAINT         347 error.c            if (OBJ_TAINTED(exc)) OBJ_TAINT(mesg);
OBJ_TAINT         614 error.c            if (OBJ_TAINTED(exc)) OBJ_TAINT(mesg);
OBJ_TAINT         718 error.c            if (OBJ_TAINTED(obj)) OBJ_TAINT(mesg);
OBJ_TAINT        8463 eval.c             if (OBJ_TAINTED(self)) OBJ_TAINT(str);
OBJ_TAINT        9391 eval.c             OBJ_TAINT(sysstack_error);
OBJ_TAINT          36 ext/dl/cptr.c    OBJ_TAINT(val);
OBJ_TAINT         200 ext/gdbm/gdbm.c     OBJ_TAINT(str);
OBJ_TAINT         246 ext/gdbm/gdbm.c     OBJ_TAINT(str);
OBJ_TAINT         270 ext/gdbm/gdbm.c     OBJ_TAINT(str);
OBJ_TAINT         667 ext/openssl/ossl_ssl.c     OBJ_TAINT(str);
OBJ_TAINT         126 ext/syck/rubyext.c     if ( taint )      OBJ_TAINT( bc );
OBJ_TAINT         632 ext/syck/rubyext.c     if ( bonus->taint)      OBJ_TAINT( obj );
OBJ_TAINT        5375 ext/tk/tcltklib.c     OBJ_TAINT(strval);
OBJ_TAINT        6079 ext/tk/tcltklib.c     if (taint_flag) OBJ_TAINT(str);
OBJ_TAINT        6238 ext/tk/tcltklib.c     if (taint_flag) OBJ_TAINT(str);
OBJ_TAINT        6320 ext/tk/tcltklib.c     if (taint_flag) OBJ_TAINT(str);
OBJ_TAINT        7042 ext/tk/tcltklib.c         OBJ_TAINT(strval);
OBJ_TAINT        7178 ext/tk/tcltklib.c         OBJ_TAINT(strval);
OBJ_TAINT        7444 ext/tk/tcltklib.c         if (taint_flag) OBJ_TAINT(ary);
OBJ_TAINT        7450 ext/tk/tcltklib.c             if (taint_flag) OBJ_TAINT(elem);
OBJ_TAINT        7481 ext/tk/tcltklib.c         if (taint_flag) OBJ_TAINT(ary);
OBJ_TAINT        7583 ext/tk/tcltklib.c     if (taint_flag) OBJ_TAINT(str);
OBJ_TAINT        7623 ext/tk/tcltklib.c     if (taint_flag) OBJ_TAINT(dst);
OBJ_TAINT        7918 ext/tk/tcltklib.c     OBJ_TAINT(eventloop_stack);
OBJ_TAINT         257 ext/zlib/zlib.c     OBJ_TAINT(str);  /* for safe */
OBJ_TAINT        1822 ext/zlib/zlib.c 	OBJ_TAINT(str);  /* for safe */
OBJ_TAINT        2053 ext/zlib/zlib.c 	OBJ_TAINT(gz->orig_name);  /* for safe */
OBJ_TAINT        2060 ext/zlib/zlib.c 	OBJ_TAINT(gz->comment);  /* for safe */
OBJ_TAINT        2175 ext/zlib/zlib.c     OBJ_TAINT(dst);  /* for safe */
OBJ_TAINT        2191 ext/zlib/zlib.c             OBJ_TAINT(outbuf);
OBJ_TAINT        2217 ext/zlib/zlib.c         OBJ_TAINT(dst);  /* for safe */
OBJ_TAINT        2246 ext/zlib/zlib.c     OBJ_TAINT(dst);  /* for safe */
OBJ_TAINT        2348 ext/zlib/zlib.c     OBJ_TAINT(str);  /* for safe */
OBJ_TAINT        2496 ext/zlib/zlib.c     OBJ_TAINT(str);  /* for safe */
OBJ_TAINT        2512 ext/zlib/zlib.c     OBJ_TAINT(str);  /* for safe */
OBJ_TAINT        2591 file.c             if (tainted) OBJ_TAINT(result);
OBJ_TAINT        1082 hash.c             if (OBJ_TAINTED(hash)) OBJ_TAINT(ary);
OBJ_TAINT        2027 hash.c             OBJ_TAINT(str);
OBJ_TAINT        1236 io.c               OBJ_TAINT(str);
OBJ_TAINT        1262 io.c               OBJ_TAINT(str);
OBJ_TAINT        1429 io.c               OBJ_TAINT(str);
OBJ_TAINT        1534 io.c           	OBJ_TAINT(str);
OBJ_TAINT        1603 io.c           	OBJ_TAINT(str);
OBJ_TAINT        2360 io.c               OBJ_TAINT(str);
OBJ_TAINT         124 marshal.c      	if (arg->taint) OBJ_TAINT(buf);
OBJ_TAINT         649 marshal.c      	OBJ_TAINT(arg->str);
OBJ_TAINT         891 marshal.c          if (arg->taint) OBJ_TAINT(v);
OBJ_TAINT         293 object.c           if (OBJ_TAINTED(obj)) OBJ_TAINT(str);
OBJ_TAINT         595 object.c       	OBJ_TAINT(obj);
OBJ_TAINT         369 re.c               if (OBJ_TAINTED(re)) OBJ_TAINT(str);
OBJ_TAINT         938 re.c           	    OBJ_TAINT(match);
OBJ_TAINT        1016 re.c               if (OBJ_TAINTED(match)) OBJ_TAINT(str);
OBJ_TAINT        1043 re.c               if (OBJ_TAINTED(match)) OBJ_TAINT(str);
OBJ_TAINT        1100 re.c           	    if (taint) OBJ_TAINT(str);
OBJ_TAINT        1245 re.c           	    if (taint) OBJ_TAINT(str);
OBJ_TAINT        1271 re.c               if (OBJ_TAINTED(match)) OBJ_TAINT(str);
OBJ_TAINT        1272 re.c               if (OBJ_TAINTED(RMATCH(match)->str)) OBJ_TAINT(str);
OBJ_TAINT         785 ruby.c         	OBJ_TAINT(rb_argv);
OBJ_TAINT         786 ruby.c         	OBJ_TAINT(rb_load_path);
OBJ_TAINT         796 sprintf.c          if (tainted) OBJ_TAINT(result);
OBJ_TAINT         111 string.c           OBJ_TAINT(str);
OBJ_TAINT         120 string.c           OBJ_TAINT(str);
OBJ_TAINT         253 string.c           if (OBJ_TAINTED(str2)) OBJ_TAINT(str);
OBJ_TAINT         269 string.c           if (OBJ_TAINTED(obj)) OBJ_TAINT(str);
OBJ_TAINT         355 string.c       	OBJ_TAINT(str3);
OBJ_TAINT        1867 string.c       	if (tainted) OBJ_TAINT(str);
OBJ_TAINT        2033 string.c           if (tainted) OBJ_TAINT(str);


OBJ_TAINTED

OBJ_TAINTED        50 array.c            if (!OBJ_TAINTED(ary) && rb_safe_level() >= 4)
OBJ_TAINTED      1265 array.c            if (OBJ_TAINTED(ary) || OBJ_TAINTED(sep)) taint = Qtrue;
OBJ_TAINTED      1296 array.c        	if (OBJ_TAINTED(tmp)) taint = Qtrue;
OBJ_TAINTED      1346 array.c            int tainted = OBJ_TAINTED(ary);
OBJ_TAINTED      1354 array.c        	if (OBJ_TAINTED(s)) tainted = Qtrue;
OBJ_TAINTED       351 class.c            if (!OBJ_TAINTED(klass)) {
OBJ_TAINTED       789 class.c            if (OBJ_TAINTED(obj)) {
OBJ_TAINTED       347 error.c            if (OBJ_TAINTED(exc)) OBJ_TAINT(mesg);
OBJ_TAINTED       614 error.c            if (OBJ_TAINTED(exc)) OBJ_TAINT(mesg);
OBJ_TAINTED       718 error.c            if (OBJ_TAINTED(obj)) OBJ_TAINT(mesg);
OBJ_TAINTED       259 eval.c             if (!OBJ_TAINTED(obj)) rb_secure(4);
OBJ_TAINTED       265 eval.c             if (ruby_safe_level > 0 && OBJ_TAINTED(x)){
OBJ_TAINTED       387 eval.c             if (ruby_safe_level >= 4 && (klass == rb_cObject || !OBJ_TAINTED(klass))) {
OBJ_TAINTED       524 eval.c             if (ruby_safe_level >= 4 && !OBJ_TAINTED(klass)) {
OBJ_TAINTED      1715 eval.c             if (OBJ_TAINTED(cmd)) {
OBJ_TAINTED      1917 eval.c             if (ruby_safe_level >= 4 && !OBJ_TAINTED(klass)) {
OBJ_TAINTED      3775 eval.c         	    if (ruby_safe_level >= 4 && !OBJ_TAINTED(recv)) {
OBJ_TAINTED      3923 eval.c         	    if (ruby_safe_level >= 4 && !OBJ_TAINTED(result))
OBJ_TAINTED      6250 eval.c         	if (!NIL_P(scope) && !OBJ_TAINTED(scope)) {
OBJ_TAINTED      6992 eval.c             if (ruby_safe_level >= 4 && !OBJ_TAINTED(self)) {
OBJ_TAINTED      8463 eval.c             if (OBJ_TAINTED(self)) OBJ_TAINT(str);
OBJ_TAINTED      8547 eval.c             if (ruby_safe_level >= 1 && OBJ_TAINTED(proc) &&
OBJ_TAINTED      8893 eval.c             if (OBJ_TAINTED(method)) {
OBJ_TAINTED        86 ext/curses/curses.c     if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4)\
OBJ_TAINTED       665 ext/curses/curses.c     if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4)\
OBJ_TAINTED       241 ext/socket/socket.c     if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) {
OBJ_TAINTED       266 ext/socket/socket.c     if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) {
OBJ_TAINTED       285 ext/socket/socket.c     if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) {
OBJ_TAINTED      1280 ext/socket/socket.c     if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) {
OBJ_TAINTED       120 ext/stringio/stringio.c     if (!OBJ_TAINTED(ptr->string)) {
OBJ_TAINTED       362 ext/stringio/stringio.c     if (!OBJ_TAINTED(self)) rb_secure(4);
OBJ_TAINTED       567 ext/stringio/stringio.c     if (!OBJ_TAINTED(self)) rb_secure(4);
OBJ_TAINTED       174 ext/syck/rubyext.c         taint = OBJ_TAINTED(port); /* original taintedness */
OBJ_TAINTED      2064 ext/tk/tcltklib.c     if (rb_safe_level() >= 4 || (rb_safe_level() >=1 && OBJ_TAINTED(vflags))) {
OBJ_TAINTED      5986 ext/tk/tcltklib.c     int taint_flag = OBJ_TAINTED(str);
OBJ_TAINTED      6134 ext/tk/tcltklib.c     int taint_flag = OBJ_TAINTED(str);
OBJ_TAINTED      6290 ext/tk/tcltklib.c     int taint_flag = OBJ_TAINTED(str);
OBJ_TAINTED      7397 ext/tk/tcltklib.c     int taint_flag = OBJ_TAINTED(list_str);
OBJ_TAINTED      7548 ext/tk/tcltklib.c         if (OBJ_TAINTED(argv[num])) taint_flag = 1;
OBJ_TAINTED      7599 ext/tk/tcltklib.c     int   taint_flag = OBJ_TAINTED(src);
OBJ_TAINTED      1686 ext/win32ole/win32ole.c     if (ruby_safe_level > 0 && OBJ_TAINTED(svr_name)) {
OBJ_TAINTED      2063 ext/win32ole/win32ole.c     if (ruby_safe_level > 0 && OBJ_TAINTED(svr_name)) {
OBJ_TAINTED      2068 ext/win32ole/win32ole.c         if (ruby_safe_level > 0 && OBJ_TAINTED(host)) {
OBJ_TAINTED      6699 ext/win32ole/win32ole.c         if (ruby_safe_level > 0 && OBJ_TAINTED(itf)) {
OBJ_TAINTED      2407 file.c             tainted = OBJ_TAINTED(fname);
OBJ_TAINTED      4102 file.c         	if (rb_safe_level() >= 2 && OBJ_TAINTED(fname)) {
OBJ_TAINTED      4155 file.c         	if (rb_safe_level() >= 1 && OBJ_TAINTED(path)) {
OBJ_TAINTED       224 hash.c             if (!OBJ_TAINTED(hash) && rb_safe_level() >= 4)
OBJ_TAINTED      1082 hash.c             if (OBJ_TAINTED(hash)) OBJ_TAINT(ary);
OBJ_TAINTED      1781 hash.c         	if (OBJ_TAINTED(val)) {
OBJ_TAINTED       208 io.c               if (!OBJ_TAINTED(io) && rb_safe_level() >= 4)
OBJ_TAINTED      2082 io.c               if (rb_safe_level() >= 4 && !OBJ_TAINTED(io)) {
OBJ_TAINTED      2152 io.c               if (rb_safe_level() >= 4 && !OBJ_TAINTED(io)) {
OBJ_TAINTED      2197 io.c               if (rb_safe_level() >= 4 && !OBJ_TAINTED(io)) {
OBJ_TAINTED      3277 io.c               if (rb_safe_level() >= 4 && (!OBJ_TAINTED(io) || !OBJ_TAINTED(nfile))) {
OBJ_TAINTED       456 marshal.c      	if (OBJ_TAINTED(obj)) arg->taint = Qtrue;
OBJ_TAINTED       838 marshal.c      	if (OBJ_TAINTED(str)) arg->taint = Qtrue;
OBJ_TAINTED      1323 marshal.c      	arg.taint = OBJ_TAINTED(port); /* original taintedness */
OBJ_TAINTED       293 object.c           if (OBJ_TAINTED(obj)) OBJ_TAINT(str);
OBJ_TAINTED       573 object.c           if (OBJ_TAINTED(obj))
OBJ_TAINTED       591 object.c           if (!OBJ_TAINTED(obj)) {
OBJ_TAINTED       612 object.c           if (OBJ_TAINTED(obj)) {
OBJ_TAINTED       651 object.c       	if (rb_safe_level() >= 4 && !OBJ_TAINTED(obj)) {
OBJ_TAINTED       369 re.c               if (OBJ_TAINTED(re)) OBJ_TAINT(str);
OBJ_TAINTED      1016 re.c               if (OBJ_TAINTED(match)) OBJ_TAINT(str);
OBJ_TAINTED      1043 re.c               if (OBJ_TAINTED(match)) OBJ_TAINT(str);
OBJ_TAINTED      1092 re.c               int taint = OBJ_TAINTED(match);
OBJ_TAINTED      1241 re.c           	int taint = OBJ_TAINTED(match);
OBJ_TAINTED      1271 re.c               if (OBJ_TAINTED(match)) OBJ_TAINT(str);
OBJ_TAINTED      1272 re.c               if (OBJ_TAINTED(RMATCH(match)->str)) OBJ_TAINT(str);
OBJ_TAINTED       772 signal.c           if (OBJ_TAINTED(arg.cmd)) {
OBJ_TAINTED       261 sprintf.c          if (OBJ_TAINTED(fmt)) tainted = 1;
OBJ_TAINTED       416 sprintf.c      		if (OBJ_TAINTED(str)) tainted = 1;
OBJ_TAINTED       253 string.c           if (OBJ_TAINTED(str2)) OBJ_TAINT(str);
OBJ_TAINTED       269 string.c           if (OBJ_TAINTED(obj)) OBJ_TAINT(str);
OBJ_TAINTED       354 string.c           if (OBJ_TAINTED(str1) || OBJ_TAINTED(str2))
OBJ_TAINTED       425 string.c           if (!OBJ_TAINTED(str) && rb_safe_level() >= 4)
OBJ_TAINTED      1829 string.c       	if (OBJ_TAINTED(repl)) tainted = 1;
OBJ_TAINTED      1853 string.c       	if (OBJ_TAINTED(repl)) tainted = 1;
OBJ_TAINTED      1932 string.c       	if (OBJ_TAINTED(repl)) tainted = 1;
OBJ_TAINTED      1971 string.c       	if (OBJ_TAINTED(val)) tainted = 1;
OBJ_TAINTED       145 struct.c           if (!OBJ_TAINTED(s) && rb_safe_level() >= 4)
OBJ_TAINTED        59 time.c             if (!OBJ_TAINTED(time) && rb_safe_level() >= 4)
OBJ_TAINTED       531 variable.c         if (OBJ_TAINTED(cmd)) {
OBJ_TAINTED       952 variable.c         if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4)
OBJ_TAINTED      1069 variable.c         if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4)
OBJ_TAINTED      1345 variable.c         if (!OBJ_TAINTED(mod) && rb_safe_level() >= 4)
OBJ_TAINTED      1486 variable.c         if (!OBJ_TAINTED(klass) && rb_safe_level() >= 4)
OBJ_TAINTED      1667 variable.c         if (!OBJ_TAINTED(mod) && rb_safe_level() >= 4)


OBSOLETE_SETREGID

OBSOLETE_SETREGID 2839 process.c      #elif defined(HAVE_SETREGID) && !defined(OBSOLETE_SETREGID)
OBSOLETE_SETREGID 2893 process.c      #elif defined(HAVE_SETREGID) && !defined(OBSOLETE_SETREGID)
OBSOLETE_SETREGID 3140 process.c      #elif defined(HAVE_SETREGID) && !defined(OBSOLETE_SETREGID)
OBSOLETE_SETREGID 3251 process.c      #elif defined(HAVE_SETREGID) && !defined(OBSOLETE_SETREGID)
OBSOLETE_SETREGID 3284 process.c      #elif defined(HAVE_SETREGID) && !defined(OBSOLETE_SETREGID)


OBSOLETE_SETREUID

OBSOLETE_SETREUID 2247 process.c      #elif defined(HAVE_SETREUID) && !defined(OBSOLETE_SETREUID)
OBSOLETE_SETREUID 2300 process.c      #elif defined(HAVE_SETREUID) && !defined(OBSOLETE_SETREUID)
OBSOLETE_SETREUID 3030 process.c      #elif defined(HAVE_SETREUID) && !defined(OBSOLETE_SETREUID)
OBSOLETE_SETREUID 3194 process.c      #elif defined(HAVE_SETREUID) && !defined(OBSOLETE_SETREUID)
OBSOLETE_SETREUID 3227 process.c      #elif defined(HAVE_SETREUID) && !defined(OBSOLETE_SETREUID)


OFF16

OFF16              44 pack.c         #ifndef OFF16
OFF16             685 pack.c         		rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2));
OFF16             729 pack.c         		rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2));
OFF16             751 pack.c         		rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2));
OFF16            1497 pack.c         		memcpy(OFF16(&tmp), s, NATINT_LEN(short,2));
OFF16            1509 pack.c         		memcpy(OFF16(&tmp), s, NATINT_LEN(unsigned short,2));
OFF16            1604 pack.c         		memcpy(OFF16(&tmp), s, NATINT_LEN(unsigned short,2));


OFF16B

OFF16B             29 pack.c         #   define OFF16(p) OFF16B(p)
OFF16B             48 pack.c         #ifndef OFF16B
OFF16B           1582 pack.c         		memcpy(OFF16B(&tmp), s, NATINT_LEN(unsigned short,2));


OFF32

OFF32             696 pack.c         		rb_str_buf_cat(res, OFF32(&i), NATINT_LEN(int,4));
OFF32             707 pack.c         		rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4));
OFF32             740 pack.c         		rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4));
OFF32             762 pack.c         		rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4));
OFF32            1542 pack.c         		memcpy(OFF32(&tmp), s, NATINT_LEN(long,4));
OFF32            1553 pack.c         		memcpy(OFF32(&tmp), s, NATINT_LEN(unsigned long,4));
OFF32            1615 pack.c         		memcpy(OFF32(&tmp), s, NATINT_LEN(long,4));


OFF32B

OFF32B             30 pack.c         #   define OFF32(p) OFF32B(p)
OFF32B           1593 pack.c         		memcpy(OFF32B(&tmp), s, NATINT_LEN(unsigned long,4));


OFFT2NUM

OFFT2NUM          452 file.c             return OFFT2NUM(get_stat(self)->st_size);
OFFT2NUM         1279 file.c             return OFFT2NUM(st.st_size);
OFFT2NUM         1475 file.c             return OFFT2NUM(st.st_size);
OFFT2NUM         3909 file.c             return OFFT2NUM(size);
OFFT2NUM          757 io.c               return OFFT2NUM(pos);
OFFT2NUM          830 io.c               return OFFT2NUM(pos);
OFFT2NUM         2254 io.c               return OFFT2NUM(pos);


OFF_DIR

OFF_DIR           540 ext/sdbm/_sdbm.c 		if (lseek(db->dirf, OFF_DIR(dirb), SEEK_SET) < 0
OFF_DIR           563 ext/sdbm/_sdbm.c 		if (lseek(db->dirf, OFF_DIR(dirb), SEEK_SET) < 0
OFF_DIR           576 ext/sdbm/_sdbm.c 	if (lseek(db->dirf, OFF_DIR(dirb), SEEK_SET) < 0


OFF_PAG

OFF_PAG           280 ext/sdbm/_sdbm.c 		if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0
OFF_PAG           335 ext/sdbm/_sdbm.c 		if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0
OFF_PAG           394 ext/sdbm/_sdbm.c 	while (OFF_PAG(newp) > oldtail) {
OFF_PAG           405 ext/sdbm/_sdbm.c 			if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0
OFF_PAG           411 ext/sdbm/_sdbm.c 		else if (lseek(db->pagf, OFF_PAG(newp), SEEK_SET) < 0
OFF_PAG           432 ext/sdbm/_sdbm.c 		if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0
OFF_PAG           462 ext/sdbm/_sdbm.c 	if (lseek(db->pagf, OFF_PAG(0), SEEK_SET) < 0
OFF_PAG           515 ext/sdbm/_sdbm.c 		if (lseek(db->pagf, OFF_PAG(pagb), SEEK_SET) < 0
OFF_PAG           605 ext/sdbm/_sdbm.c 			if (lseek(db->pagf, OFF_PAG(db->blkptr), SEEK_SET) < 0)


OLEData_Get_Struct

OLEData_Get_Struct 1775 ext/win32ole/win32ole.c         OLEData_Get_Struct(ole, pole);
OLEData_Get_Struct 1879 ext/win32ole/win32ole.c     OLEData_Get_Struct(obj, pole);
OLEData_Get_Struct 1899 ext/win32ole/win32ole.c     OLEData_Get_Struct(obj, pole);
OLEData_Get_Struct 2193 ext/win32ole/win32ole.c     OLEData_Get_Struct(self, pole);
OLEData_Get_Struct 2412 ext/win32ole/win32ole.c     OLEData_Get_Struct(self, pole);
OLEData_Get_Struct 2710 ext/win32ole/win32ole.c     OLEData_Get_Struct(self, pole);
OLEData_Get_Struct 2755 ext/win32ole/win32ole.c     OLEData_Get_Struct(self, pole);
OLEData_Get_Struct 2823 ext/win32ole/win32ole.c     OLEData_Get_Struct(self, pole);
OLEData_Get_Struct 3088 ext/win32ole/win32ole.c     OLEData_Get_Struct(self, pole);
OLEData_Get_Struct 3213 ext/win32ole/win32ole.c     OLEData_Get_Struct(self, pole);
OLEData_Get_Struct 3296 ext/win32ole/win32ole.c     OLEData_Get_Struct(self, pole);
OLEData_Get_Struct 3543 ext/win32ole/win32ole.c     OLEData_Get_Struct(self, pole);
OLEData_Get_Struct 6445 ext/win32ole/win32ole.c     OLEData_Get_Struct(ole, pole);
OLEData_Get_Struct 6553 ext/win32ole/win32ole.c     OLEData_Get_Struct(ole, pole);
OLEData_Get_Struct 6714 ext/win32ole/win32ole.c     OLEData_Get_Struct(ole, pole);


OLE_ADDREF

OLE_ADDREF        754 ext/win32ole/win32ole.c         OLE_ADDREF(pole->pDispatch);
OLE_ADDREF       1230 ext/win32ole/win32ole.c             OLE_ADDREF(pDispatch);
OLE_ADDREF       1859 ext/win32ole/win32ole.c         OLE_ADDREF(pole->pDispatch);
OLE_ADDREF       3713 ext/win32ole/win32ole.c     if(pTypeInfo) OLE_ADDREF(pTypeInfo);
OLE_ADDREF       4754 ext/win32ole/win32ole.c         OLE_ADDREF(pTypeInfo);
OLE_ADDREF       5148 ext/win32ole/win32ole.c     OLE_ADDREF(pTypeInfo);
OLE_ADDREF       5150 ext/win32ole/win32ole.c     if(pOwnerTypeInfo) OLE_ADDREF(pOwnerTypeInfo);
OLE_ADDREF       5858 ext/win32ole/win32ole.c             OLE_ADDREF(pTypeInfo);


OLE_FREE

OLE_FREE          645 ext/win32ole/win32ole.c     OLE_FREE(pole->pDispatch);
OLE_FREE          652 ext/win32ole/win32ole.c     OLE_FREE(poletype->pTypeInfo);
OLE_FREE          659 ext/win32ole/win32ole.c     OLE_FREE(polemethod->pTypeInfo);
OLE_FREE          660 ext/win32ole/win32ole.c     OLE_FREE(polemethod->pOwnerTypeInfo);
OLE_FREE          667 ext/win32ole/win32ole.c     OLE_FREE(polevar->pTypeInfo);
OLE_FREE          674 ext/win32ole/win32ole.c     OLE_FREE(pole->pTypeInfo);
OLE_FREE         2756 ext/win32ole/win32ole.c     OLE_FREE(pole->pDispatch);


OLE_GET_TYPEATTR

OLE_GET_TYPEATTR 1478 ext/win32ole/win32ole.c         hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 2899 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 2938 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 2974 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 3015 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 4255 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 4321 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 4357 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 4392 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 4428 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 4460 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 4492 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 4555 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 4677 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 4735 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 5470 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 6474 ext/win32ole/win32ole.c         hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
OLE_GET_TYPEATTR 6577 ext/win32ole/win32ole.c     hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);


OLE_RELEASE

OLE_RELEASE        67 ext/win32ole/win32ole.c             OLE_RELEASE(x);\
OLE_RELEASE      1052 ext/win32ole/win32ole.c         OLE_RELEASE(pole->pDispatch);
OLE_RELEASE      1480 ext/win32ole/win32ole.c             OLE_RELEASE(pTypeInfo);
OLE_RELEASE      1514 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeInfo);
OLE_RELEASE      1639 ext/win32ole/win32ole.c         OLE_RELEASE(pBindCtx);
OLE_RELEASE      1647 ext/win32ole/win32ole.c     OLE_RELEASE(pMoniker);
OLE_RELEASE      1648 ext/win32ole/win32ole.c     OLE_RELEASE(pBindCtx);
OLE_RELEASE      1710 ext/win32ole/win32ole.c         OLE_RELEASE(pUnknown);
OLE_RELEASE      1716 ext/win32ole/win32ole.c     OLE_RELEASE(pUnknown);
OLE_RELEASE      1783 ext/win32ole/win32ole.c             OLE_RELEASE(pTypeInfo);
OLE_RELEASE      1786 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeInfo);
OLE_RELEASE      1793 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeLib);
OLE_RELEASE      1811 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeLib);
OLE_RELEASE      1848 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeInfo);
OLE_RELEASE      1860 ext/win32ole/win32ole.c         n = OLE_RELEASE(pole->pDispatch);
OLE_RELEASE      1902 ext/win32ole/win32ole.c             n = OLE_RELEASE(pole->pDispatch);
OLE_RELEASE      2783 ext/win32ole/win32ole.c     OLE_RELEASE(pEnum);
OLE_RELEASE      2954 ext/win32ole/win32ole.c        OLE_RELEASE(pRefTypeInfo);
OLE_RELEASE      3029 ext/win32ole/win32ole.c        OLE_RELEASE(pRefTypeInfo);
OLE_RELEASE      3058 ext/win32ole/win32ole.c     OLE_RELEASE(pTypeInfo);
OLE_RELEASE      3074 ext/win32ole/win32ole.c     OLE_RELEASE(pTypeLib);
OLE_RELEASE      3095 ext/win32ole/win32ole.c     OLE_RELEASE(pTypeInfo);
OLE_RELEASE      3185 ext/win32ole/win32ole.c     OLE_RELEASE(pTypeLib);
OLE_RELEASE      3220 ext/win32ole/win32ole.c     OLE_RELEASE(pTypeInfo);
OLE_RELEASE      3268 ext/win32ole/win32ole.c     OLE_RELEASE(pTypeLib);
OLE_RELEASE      3303 ext/win32ole/win32ole.c     OLE_RELEASE(pTypeInfo);
OLE_RELEASE      3331 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeLib);
OLE_RELEASE      3334 ext/win32ole/win32ole.c     OLE_RELEASE(pTypeLib);
OLE_RELEASE      3356 ext/win32ole/win32ole.c         OLE_RELEASE(pRefTypeInfo);
OLE_RELEASE      3359 ext/win32ole/win32ole.c     OLE_RELEASE(pRefTypeInfo);
OLE_RELEASE      3549 ext/win32ole/win32ole.c     OLE_RELEASE(pTypeInfo);
OLE_RELEASE      3591 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeLib);
OLE_RELEASE      3747 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeInfo);
OLE_RELEASE      4177 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeLib);
OLE_RELEASE      4225 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeLib);
OLE_RELEASE      4229 ext/win32ole/win32ole.c     OLE_RELEASE(pTypeLib);
OLE_RELEASE      4697 ext/win32ole/win32ole.c         OLE_RELEASE(pRefTypeInfo);
OLE_RELEASE      5494 ext/win32ole/win32ole.c                 OLE_RELEASE(pRefTypeInfo);
OLE_RELEASE      5503 ext/win32ole/win32ole.c                 OLE_RELEASE(pRefTypeInfo);
OLE_RELEASE      5509 ext/win32ole/win32ole.c             OLE_RELEASE(pRefTypeInfo);
OLE_RELEASE      6456 ext/win32ole/win32ole.c     OLE_RELEASE(pTypeInfo);
OLE_RELEASE      6464 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeLib);
OLE_RELEASE      6477 ext/win32ole/win32ole.c             OLE_RELEASE(pTypeInfo);
OLE_RELEASE      6498 ext/win32ole/win32ole.c                     OLE_RELEASE(pImplTypeInfo);
OLE_RELEASE      6517 ext/win32ole/win32ole.c                 OLE_RELEASE(pImplTypeInfo);
OLE_RELEASE      6524 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeInfo);
OLE_RELEASE      6528 ext/win32ole/win32ole.c     OLE_RELEASE(pTypeLib);
OLE_RELEASE      6562 ext/win32ole/win32ole.c         OLE_RELEASE(pProvideClassInfo2);
OLE_RELEASE      6573 ext/win32ole/win32ole.c     OLE_RELEASE(pProvideClassInfo);
OLE_RELEASE      6579 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeInfo);
OLE_RELEASE      6607 ext/win32ole/win32ole.c     OLE_RELEASE(pTypeInfo);
OLE_RELEASE      6623 ext/win32ole/win32ole.c         OLE_RELEASE(*ppTypeInfo);
OLE_RELEASE      6641 ext/win32ole/win32ole.c         if(pti) OLE_RELEASE(pti);
OLE_RELEASE      6645 ext/win32ole/win32ole.c             OLE_RELEASE(pcp);
OLE_RELEASE      6720 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeInfo);
OLE_RELEASE      6728 ext/win32ole/win32ole.c     OLE_RELEASE(pContainer);
OLE_RELEASE      6730 ext/win32ole/win32ole.c         OLE_RELEASE(pTypeInfo);


OLE_RELEASE_TYPEATTR

OLE_RELEASE_TYPEATTR 2922 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 2956 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 2999 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 3031 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 4291 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 4328 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 4363 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 4400 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 4432 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 4464 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 4496 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 4559 ext/win32ole/win32ole.c         OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 4563 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 4699 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 4762 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 5516 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 6523 ext/win32ole/win32ole.c         OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
OLE_RELEASE_TYPEATTR 6606 ext/win32ole/win32ole.c     OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);


ONIGENCERR_INVALID_WIDE_CHAR_VALUE

ONIGENCERR_INVALID_WIDE_CHAR_VALUE  116 euc_jp.c           return ONIGENCERR_INVALID_WIDE_CHAR_VALUE;
ONIGENCERR_INVALID_WIDE_CHAR_VALUE  820 regenc.c           return ONIGENCERR_INVALID_WIDE_CHAR_VALUE;
ONIGENCERR_INVALID_WIDE_CHAR_VALUE  843 regenc.c           return ONIGENCERR_INVALID_WIDE_CHAR_VALUE;


ONIGENCERR_TOO_BIG_WIDE_CHAR_VALUE

ONIGENCERR_TOO_BIG_WIDE_CHAR_VALUE  113 utf8.c             return ONIGENCERR_TOO_BIG_WIDE_CHAR_VALUE;
ONIGENCERR_TOO_BIG_WIDE_CHAR_VALUE  134 utf8.c               return ONIGENCERR_TOO_BIG_WIDE_CHAR_VALUE;
ONIGENCERR_TOO_BIG_WIDE_CHAR_VALUE  189 utf8.c               return ONIGENCERR_TOO_BIG_WIDE_CHAR_VALUE;


ONIGENCERR_TYPE_BUG

ONIGENCERR_TYPE_BUG 3614 utf8.c             return ONIGENCERR_TYPE_BUG;
ONIGENCERR_TYPE_BUG 3679 utf8.c             return ONIGENCERR_TYPE_BUG;


ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE

ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE   46 ascii.c          ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE,
ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE  129 euc_jp.c           if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE  211 euc_jp.c         ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE,
ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE  104 oniguruma.h      ( ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE | \
ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE  282 oniguruma.h    #define ONIGENC_SUPPORT_AMBIG_FLAG(enc)     ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE
ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE   33 regcomp.c        (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE |
ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE  480 regenc.c         if (flag == ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) {
ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE  566 regenc.c         if (flag == ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) {
ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE  615 regenc.c         if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE  633 regenc.c         if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE  716 regenc.c           if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE  746 regenc.c           if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE 1001 regenc.c         if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE  136 sjis.c             if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE  222 sjis.c           ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE,
ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE  206 utf8.c         	 ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE  214 utf8.c             if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE  271 utf8.c         	 ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE  278 utf8.c             if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE 3715 utf8.c           (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE |


ONIGENC_AMBIGUOUS_MATCH_COMPOUND

ONIGENC_AMBIGUOUS_MATCH_COMPOUND  106 oniguruma.h        ONIGENC_AMBIGUOUS_MATCH_COMPOUND )
ONIGENC_AMBIGUOUS_MATCH_COMPOUND 3780 regcomp.c          if ((ambig_flag & ONIGENC_AMBIGUOUS_MATCH_COMPOUND) != 0) {
ONIGENC_AMBIGUOUS_MATCH_COMPOUND 1394 regexec.c                  if ((ambig_flag & ONIGENC_AMBIGUOUS_MATCH_COMPOUND) != 0) {
ONIGENC_AMBIGUOUS_MATCH_COMPOUND 1395 regexec.c                    ambig_flag &= ~ONIGENC_AMBIGUOUS_MATCH_COMPOUND;
ONIGENC_AMBIGUOUS_MATCH_COMPOUND 1500 regexec.c                    if ((ambig_flag & ONIGENC_AMBIGUOUS_MATCH_COMPOUND) != 0) {
ONIGENC_AMBIGUOUS_MATCH_COMPOUND 1501 regexec.c                      ambig_flag &= ~ONIGENC_AMBIGUOUS_MATCH_COMPOUND;
ONIGENC_AMBIGUOUS_MATCH_COMPOUND 2627 regexec.c              if ((ambig_flag & ONIGENC_AMBIGUOUS_MATCH_COMPOUND) != 0) {
ONIGENC_AMBIGUOUS_MATCH_COMPOUND 2628 regexec.c                ambig_flag &= ~ONIGENC_AMBIGUOUS_MATCH_COMPOUND;
ONIGENC_AMBIGUOUS_MATCH_COMPOUND 4937 regparse.c               (env->ambig_flag & ONIGENC_AMBIGUOUS_MATCH_COMPOUND) != 0) {
ONIGENC_AMBIGUOUS_MATCH_COMPOUND  204 utf8.c                 (flag & ONIGENC_AMBIGUOUS_MATCH_COMPOUND) != 0 &&
ONIGENC_AMBIGUOUS_MATCH_COMPOUND  240 utf8.c                          (flag & ONIGENC_AMBIGUOUS_MATCH_COMPOUND) != 0) {
ONIGENC_AMBIGUOUS_MATCH_COMPOUND  269 utf8.c                 (flag & ONIGENC_AMBIGUOUS_MATCH_COMPOUND) != 0 &&
ONIGENC_AMBIGUOUS_MATCH_COMPOUND  299 utf8.c                          (flag & ONIGENC_AMBIGUOUS_MATCH_COMPOUND) != 0) {
ONIGENC_AMBIGUOUS_MATCH_COMPOUND 3717 utf8.c            ONIGENC_AMBIGUOUS_MATCH_COMPOUND),


ONIGENC_AMBIGUOUS_MATCH_DEFAULT

ONIGENC_AMBIGUOUS_MATCH_DEFAULT  472 re.c                                           ONIGENC_AMBIGUOUS_MATCH_DEFAULT,
ONIGENC_AMBIGUOUS_MATCH_DEFAULT  615 re.c                                   ONIGENC_AMBIGUOUS_MATCH_DEFAULT,
ONIGENC_AMBIGUOUS_MATCH_DEFAULT 4668 regcomp.c        r = onig_alloc_init(&reg, ONIG_OPTION_NONE, ONIGENC_AMBIGUOUS_MATCH_DEFAULT,
ONIGENC_AMBIGUOUS_MATCH_DEFAULT 4949 regcomp.c        r = onig_alloc_init(reg, option, ONIGENC_AMBIGUOUS_MATCH_DEFAULT,


ONIGENC_AMBIGUOUS_MATCH_LIMIT

ONIGENC_AMBIGUOUS_MATCH_LIMIT 3768 regcomp.c        for (amb = 0x01; amb <= ONIGENC_AMBIGUOUS_MATCH_LIMIT; amb <<= 1) {
ONIGENC_AMBIGUOUS_MATCH_LIMIT 4565 regparse.c       for (amb = 0x01; amb <= ONIGENC_AMBIGUOUS_MATCH_LIMIT; amb <<= 1) {
ONIGENC_AMBIGUOUS_MATCH_LIMIT 4908 regparse.c             for (amb = 0x01; amb <= ONIGENC_AMBIGUOUS_MATCH_LIMIT; amb <<= 1) {


ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE

ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE  105 oniguruma.h        ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE | \
ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE   34 regcomp.c         ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE);
ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE  570 regenc.c         else if (flag == ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) {
ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE  586 regenc.c         if (flag == ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) {
ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE  230 utf8.c                     (flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0) {
ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE  288 utf8.c                 if ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0) {
ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE 3716 utf8.c            ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE |


ONIGENC_ASCII_CODE_TO_LOWER_CASE

ONIGENC_ASCII_CODE_TO_LOWER_CASE  130 euc_jp.c             *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
ONIGENC_ASCII_CODE_TO_LOWER_CASE  616 regenc.c           *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(**p);
ONIGENC_ASCII_CODE_TO_LOWER_CASE  717 regenc.c             *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
ONIGENC_ASCII_CODE_TO_LOWER_CASE  137 sjis.c               *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
ONIGENC_ASCII_CODE_TO_LOWER_CASE  215 utf8.c               *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);


ONIGENC_CODE_RANGE_FROM

ONIGENC_CODE_RANGE_FROM 1126 regparse.c           for (j  = ONIGENC_CODE_RANGE_FROM(sbr, i);
ONIGENC_CODE_RANGE_FROM 3413 regparse.c           for (j  = ONIGENC_CODE_RANGE_FROM(sbr, i);
ONIGENC_CODE_RANGE_FROM 3421 regparse.c                                     ONIGENC_CODE_RANGE_FROM(mbr, i),
ONIGENC_CODE_RANGE_FROM 3432 regparse.c                  j < ONIGENC_CODE_RANGE_FROM(sbr, i); j++) {
ONIGENC_CODE_RANGE_FROM 3447 regparse.c           if (prev < ONIGENC_CODE_RANGE_FROM(mbr, i)) {
ONIGENC_CODE_RANGE_FROM 3449 regparse.c                                       ONIGENC_CODE_RANGE_FROM(mbr, i) - 1);


ONIGENC_CODE_RANGE_NUM

ONIGENC_CODE_RANGE_NUM 1124 regparse.c         n = ONIGENC_CODE_RANGE_NUM(sbr);
ONIGENC_CODE_RANGE_NUM 1140 regparse.c         n = ONIGENC_CODE_RANGE_NUM(mbr);
ONIGENC_CODE_RANGE_NUM 3408 regparse.c       int nsb = ONIGENC_CODE_RANGE_NUM(sbr);
ONIGENC_CODE_RANGE_NUM 3409 regparse.c       int nmb = ONIGENC_CODE_RANGE_NUM(mbr);
ONIGENC_CODE_RANGE_NUM 4827 regparse.c                   ONIGENC_CODE_RANGE_NUM(mbr)


ONIGENC_CODE_RANGE_TO

ONIGENC_CODE_RANGE_TO 1127 regparse.c                j <= (int )ONIGENC_CODE_RANGE_TO(sbr, i); j++) {
ONIGENC_CODE_RANGE_TO 3414 regparse.c                j <= ONIGENC_CODE_RANGE_TO(sbr, i); j++) {
ONIGENC_CODE_RANGE_TO 3422 regparse.c                                     ONIGENC_CODE_RANGE_TO(mbr, i));
ONIGENC_CODE_RANGE_TO 3435 regparse.c             prev = ONIGENC_CODE_RANGE_TO(sbr, i) + 1;
ONIGENC_CODE_RANGE_TO 3452 regparse.c           prev = ONIGENC_CODE_RANGE_TO(mbr, i) + 1;


ONIGENC_CODE_TO_MBC

ONIGENC_CODE_TO_MBC 3774 regcomp.c              len = ONIGENC_CODE_TO_MBC(enc, pccs[i].to, buf);
ONIGENC_CODE_TO_MBC 3786 regcomp.c                  len = ONIGENC_CODE_TO_MBC(enc, ccode, buf);
ONIGENC_CODE_TO_MBC 4578 regparse.c                   len = ONIGENC_CODE_TO_MBC(enc, ci->code[k], buf);
ONIGENC_CODE_TO_MBC 4773 regparse.c           int num = ONIGENC_CODE_TO_MBC(env->enc, tok->u.code, buf);


ONIGENC_CODE_TO_MBCLEN

ONIGENC_CODE_TO_MBCLEN  856 regenc.c             return (ONIGENC_CODE_TO_MBCLEN(enc, code) > 1 ? TRUE : FALSE);
ONIGENC_CODE_TO_MBCLEN  876 regenc.c             return (ONIGENC_CODE_TO_MBCLEN(enc, code) > 1 ? TRUE : FALSE);
ONIGENC_CODE_TO_MBCLEN 3532 regparse.c             if ((ONIGENC_CODE_TO_MBCLEN(enc, c) > 0)  /* 0: invalid code point */
ONIGENC_CODE_TO_MBCLEN 3953 regparse.c           len = ONIGENC_CODE_TO_MBCLEN(env->enc, tok->u.c);
ONIGENC_CODE_TO_MBCLEN 4025 regparse.c           len = ONIGENC_CODE_TO_MBCLEN(env->enc, v);
ONIGENC_CODE_TO_MBCLEN 4216 regparse.c             if (ONIGENC_CODE_TO_MBCLEN(env->enc, NEWLINE_CODE) == 1)


ONIGENC_CODE_TO_MBC_MAXLEN

ONIGENC_CODE_TO_MBC_MAXLEN  241 oniguruma.h    #define ONIGENC_MBC_NORMALIZE_MAXLEN    ONIGENC_CODE_TO_MBC_MAXLEN
ONIGENC_CODE_TO_MBC_MAXLEN 3969 regparse.c     	UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN];
ONIGENC_CODE_TO_MBC_MAXLEN 3970 regparse.c     	UChar* bufe = buf + ONIGENC_CODE_TO_MBC_MAXLEN;
ONIGENC_CODE_TO_MBC_MAXLEN 4554 regparse.c       UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN];
ONIGENC_CODE_TO_MBC_MAXLEN 4772 regparse.c           UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN];


ONIGENC_CTYPE_ALNUM

ONIGENC_CTYPE_ALNUM  382 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_ALNUM)
ONIGENC_CTYPE_ALNUM  956 regenc.c         case ONIGENC_CTYPE_ALNUM:
ONIGENC_CTYPE_ALNUM 3490 regparse.c       case ONIGENC_CTYPE_ALNUM:
ONIGENC_CTYPE_ALNUM 3605 regparse.c         { "alnum",  ONIGENC_CTYPE_ALNUM,  5 },
ONIGENC_CTYPE_ALNUM 3676 regparse.c         { "Alnum",  ONIGENC_CTYPE_ALNUM,  5 },
ONIGENC_CTYPE_ALNUM 3609 utf8.c           case ONIGENC_CTYPE_ALNUM:
ONIGENC_CTYPE_ALNUM 3674 utf8.c           case ONIGENC_CTYPE_ALNUM:


ONIGENC_CTYPE_ALPHA

ONIGENC_CTYPE_ALPHA  258 oniguruma.h    #define ONIGENC_CTYPE_ALNUM    (ONIGENC_CTYPE_ALPHA | ONIGENC_CTYPE_DIGIT)
ONIGENC_CTYPE_ALPHA  384 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_ALPHA)
ONIGENC_CTYPE_ALPHA  917 regenc.c         case ONIGENC_CTYPE_ALPHA:
ONIGENC_CTYPE_ALPHA 3480 regparse.c       case ONIGENC_CTYPE_ALPHA:
ONIGENC_CTYPE_ALPHA 3606 regparse.c         { "alpha",  ONIGENC_CTYPE_ALPHA,  5 },
ONIGENC_CTYPE_ALPHA 3677 regparse.c         { "Alpha",  ONIGENC_CTYPE_ALPHA,  5 },
ONIGENC_CTYPE_ALPHA 3570 utf8.c           case ONIGENC_CTYPE_ALPHA:
ONIGENC_CTYPE_ALPHA 3635 utf8.c           case ONIGENC_CTYPE_ALPHA:


ONIGENC_CTYPE_ASCII

ONIGENC_CTYPE_ASCII  953 regenc.c         case ONIGENC_CTYPE_ASCII:
ONIGENC_CTYPE_ASCII 3489 regparse.c       case ONIGENC_CTYPE_ASCII:
ONIGENC_CTYPE_ASCII 3617 regparse.c         { "ascii",  ONIGENC_CTYPE_ASCII,  5 }, /* I don't know origin. Perl? */
ONIGENC_CTYPE_ASCII 3688 regparse.c         { "ASCII",  ONIGENC_CTYPE_ASCII,  5 },
ONIGENC_CTYPE_ASCII 3606 utf8.c           case ONIGENC_CTYPE_ASCII:
ONIGENC_CTYPE_ASCII 3671 utf8.c           case ONIGENC_CTYPE_ASCII:


ONIGENC_CTYPE_BLANK

ONIGENC_CTYPE_BLANK  396 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_BLANK)
ONIGENC_CTYPE_BLANK  920 regenc.c         case ONIGENC_CTYPE_BLANK:
ONIGENC_CTYPE_BLANK 3481 regparse.c       case ONIGENC_CTYPE_BLANK:
ONIGENC_CTYPE_BLANK 3607 regparse.c         { "blank",  ONIGENC_CTYPE_BLANK,  5 },
ONIGENC_CTYPE_BLANK 3678 regparse.c         { "Blank",  ONIGENC_CTYPE_BLANK,  5 },
ONIGENC_CTYPE_BLANK 3573 utf8.c           case ONIGENC_CTYPE_BLANK:
ONIGENC_CTYPE_BLANK 3638 utf8.c           case ONIGENC_CTYPE_BLANK:


ONIGENC_CTYPE_CNTRL

ONIGENC_CTYPE_CNTRL  390 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_CNTRL)
ONIGENC_CTYPE_CNTRL  923 regenc.c         case ONIGENC_CTYPE_CNTRL:
ONIGENC_CTYPE_CNTRL 3482 regparse.c       case ONIGENC_CTYPE_CNTRL:
ONIGENC_CTYPE_CNTRL 3608 regparse.c         { "cntrl",  ONIGENC_CTYPE_CNTRL,  5 },
ONIGENC_CTYPE_CNTRL 3679 regparse.c         { "Cntrl",  ONIGENC_CTYPE_CNTRL,  5 },
ONIGENC_CTYPE_CNTRL 3576 utf8.c           case ONIGENC_CTYPE_CNTRL:
ONIGENC_CTYPE_CNTRL 3641 utf8.c           case ONIGENC_CTYPE_CNTRL:


ONIGENC_CTYPE_DIGIT

ONIGENC_CTYPE_DIGIT  258 oniguruma.h    #define ONIGENC_CTYPE_ALNUM    (ONIGENC_CTYPE_ALPHA | ONIGENC_CTYPE_DIGIT)
ONIGENC_CTYPE_DIGIT  398 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_DIGIT)
ONIGENC_CTYPE_DIGIT  926 regenc.c         case ONIGENC_CTYPE_DIGIT:
ONIGENC_CTYPE_DIGIT 3483 regparse.c       case ONIGENC_CTYPE_DIGIT:
ONIGENC_CTYPE_DIGIT 3570 regparse.c         ctype = ONIGENC_CTYPE_DIGIT;
ONIGENC_CTYPE_DIGIT 3574 regparse.c         ctype = ONIGENC_CTYPE_DIGIT;
ONIGENC_CTYPE_DIGIT 3609 regparse.c         { "digit",  ONIGENC_CTYPE_DIGIT,  5 },
ONIGENC_CTYPE_DIGIT 3680 regparse.c         { "Digit",  ONIGENC_CTYPE_DIGIT,  5 },
ONIGENC_CTYPE_DIGIT 3579 utf8.c           case ONIGENC_CTYPE_DIGIT:
ONIGENC_CTYPE_DIGIT 3644 utf8.c           case ONIGENC_CTYPE_DIGIT:


ONIGENC_CTYPE_GRAPH

ONIGENC_CTYPE_GRAPH  378 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_GRAPH)
ONIGENC_CTYPE_GRAPH  929 regenc.c         case ONIGENC_CTYPE_GRAPH:
ONIGENC_CTYPE_GRAPH 3506 regparse.c       case ONIGENC_CTYPE_GRAPH:
ONIGENC_CTYPE_GRAPH 3610 regparse.c         { "graph",  ONIGENC_CTYPE_GRAPH,  5 },
ONIGENC_CTYPE_GRAPH 3681 regparse.c         { "Graph",  ONIGENC_CTYPE_GRAPH,  5 },
ONIGENC_CTYPE_GRAPH 3582 utf8.c           case ONIGENC_CTYPE_GRAPH:
ONIGENC_CTYPE_GRAPH 3647 utf8.c           case ONIGENC_CTYPE_GRAPH:


ONIGENC_CTYPE_LOWER

ONIGENC_CTYPE_LOWER  386 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_LOWER)
ONIGENC_CTYPE_LOWER  932 regenc.c         case ONIGENC_CTYPE_LOWER:
ONIGENC_CTYPE_LOWER  143 regenc.h           ONIGENC_IS_ASCII_CODE_CTYPE(code, (ONIGENC_CTYPE_UPPER | ONIGENC_CTYPE_LOWER))
ONIGENC_CTYPE_LOWER 3484 regparse.c       case ONIGENC_CTYPE_LOWER:
ONIGENC_CTYPE_LOWER 3611 regparse.c         { "lower",  ONIGENC_CTYPE_LOWER,  5 },
ONIGENC_CTYPE_LOWER 3682 regparse.c         { "Lower",  ONIGENC_CTYPE_LOWER,  5 },
ONIGENC_CTYPE_LOWER 3585 utf8.c           case ONIGENC_CTYPE_LOWER:
ONIGENC_CTYPE_LOWER 3650 utf8.c           case ONIGENC_CTYPE_LOWER:


ONIGENC_CTYPE_NEWLINE

ONIGENC_CTYPE_NEWLINE  376 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_NEWLINE)
ONIGENC_CTYPE_NEWLINE  913 regenc.c         case ONIGENC_CTYPE_NEWLINE:


ONIGENC_CTYPE_PRINT

ONIGENC_CTYPE_PRINT  380 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_PRINT)
ONIGENC_CTYPE_PRINT  935 regenc.c         case ONIGENC_CTYPE_PRINT:
ONIGENC_CTYPE_PRINT 3507 regparse.c       case ONIGENC_CTYPE_PRINT:
ONIGENC_CTYPE_PRINT 3612 regparse.c         { "print",  ONIGENC_CTYPE_PRINT,  5 },
ONIGENC_CTYPE_PRINT 3683 regparse.c         { "Print",  ONIGENC_CTYPE_PRINT,  5 },
ONIGENC_CTYPE_PRINT 3588 utf8.c           case ONIGENC_CTYPE_PRINT:
ONIGENC_CTYPE_PRINT 3653 utf8.c           case ONIGENC_CTYPE_PRINT:


ONIGENC_CTYPE_PUNCT

ONIGENC_CTYPE_PUNCT  392 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_PUNCT)
ONIGENC_CTYPE_PUNCT  938 regenc.c         case ONIGENC_CTYPE_PUNCT:
ONIGENC_CTYPE_PUNCT 3485 regparse.c       case ONIGENC_CTYPE_PUNCT:
ONIGENC_CTYPE_PUNCT 3613 regparse.c         { "punct",  ONIGENC_CTYPE_PUNCT,  5 },
ONIGENC_CTYPE_PUNCT 3684 regparse.c         { "Punct",  ONIGENC_CTYPE_PUNCT,  5 },
ONIGENC_CTYPE_PUNCT 3591 utf8.c           case ONIGENC_CTYPE_PUNCT:
ONIGENC_CTYPE_PUNCT 3656 utf8.c           case ONIGENC_CTYPE_PUNCT:


ONIGENC_CTYPE_SPACE

ONIGENC_CTYPE_SPACE  394 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_SPACE)
ONIGENC_CTYPE_SPACE  941 regenc.c         case ONIGENC_CTYPE_SPACE:
ONIGENC_CTYPE_SPACE 3486 regparse.c       case ONIGENC_CTYPE_SPACE:
ONIGENC_CTYPE_SPACE 3562 regparse.c         ctype = ONIGENC_CTYPE_SPACE;
ONIGENC_CTYPE_SPACE 3566 regparse.c         ctype = ONIGENC_CTYPE_SPACE;
ONIGENC_CTYPE_SPACE 3614 regparse.c         { "space",  ONIGENC_CTYPE_SPACE,  5 },
ONIGENC_CTYPE_SPACE 3685 regparse.c         { "Space",  ONIGENC_CTYPE_SPACE,  5 },
ONIGENC_CTYPE_SPACE 3594 utf8.c           case ONIGENC_CTYPE_SPACE:
ONIGENC_CTYPE_SPACE 3659 utf8.c           case ONIGENC_CTYPE_SPACE:


ONIGENC_CTYPE_UPPER

ONIGENC_CTYPE_UPPER  388 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_UPPER)
ONIGENC_CTYPE_UPPER  944 regenc.c         case ONIGENC_CTYPE_UPPER:
ONIGENC_CTYPE_UPPER  143 regenc.h           ONIGENC_IS_ASCII_CODE_CTYPE(code, (ONIGENC_CTYPE_UPPER | ONIGENC_CTYPE_LOWER))
ONIGENC_CTYPE_UPPER 3487 regparse.c       case ONIGENC_CTYPE_UPPER:
ONIGENC_CTYPE_UPPER 3615 regparse.c         { "upper",  ONIGENC_CTYPE_UPPER,  5 },
ONIGENC_CTYPE_UPPER 3686 regparse.c         { "Upper",  ONIGENC_CTYPE_UPPER,  5 },
ONIGENC_CTYPE_UPPER 3597 utf8.c           case ONIGENC_CTYPE_UPPER:
ONIGENC_CTYPE_UPPER 3662 utf8.c           case ONIGENC_CTYPE_UPPER:


ONIGENC_CTYPE_WORD

ONIGENC_CTYPE_WORD  161 euc_jp.c         if ((ctype & ONIGENC_CTYPE_WORD) != 0) {
ONIGENC_CTYPE_WORD  167 euc_jp.c           ctype &= ~ONIGENC_CTYPE_WORD;
ONIGENC_CTYPE_WORD  402 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_WORD)
ONIGENC_CTYPE_WORD  852 regenc.c         if ((ctype & ONIGENC_CTYPE_WORD) != 0) {
ONIGENC_CTYPE_WORD  858 regenc.c           ctype &= ~ONIGENC_CTYPE_WORD;
ONIGENC_CTYPE_WORD  872 regenc.c         if ((ctype & ONIGENC_CTYPE_WORD) != 0) {
ONIGENC_CTYPE_WORD  878 regenc.c           ctype &= ~ONIGENC_CTYPE_WORD;
ONIGENC_CTYPE_WORD  950 regenc.c         case ONIGENC_CTYPE_WORD:
ONIGENC_CTYPE_WORD 3523 regparse.c       case ONIGENC_CTYPE_WORD:
ONIGENC_CTYPE_WORD 3554 regparse.c         ctype = ONIGENC_CTYPE_WORD;
ONIGENC_CTYPE_WORD 3558 regparse.c         ctype = ONIGENC_CTYPE_WORD;
ONIGENC_CTYPE_WORD  170 sjis.c           if ((ctype & ONIGENC_CTYPE_WORD) != 0) {
ONIGENC_CTYPE_WORD  177 sjis.c             ctype &= ~ONIGENC_CTYPE_WORD;
ONIGENC_CTYPE_WORD 3603 utf8.c           case ONIGENC_CTYPE_WORD:
ONIGENC_CTYPE_WORD 3668 utf8.c           case ONIGENC_CTYPE_WORD:
ONIGENC_CTYPE_WORD 3687 utf8.c           if ((ctype & ONIGENC_CTYPE_WORD) != 0) {


ONIGENC_CTYPE_XDIGIT

ONIGENC_CTYPE_XDIGIT  400 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_XDIGIT)
ONIGENC_CTYPE_XDIGIT  947 regenc.c         case ONIGENC_CTYPE_XDIGIT:
ONIGENC_CTYPE_XDIGIT 3488 regparse.c       case ONIGENC_CTYPE_XDIGIT:
ONIGENC_CTYPE_XDIGIT 3578 regparse.c         ctype = ONIGENC_CTYPE_XDIGIT;
ONIGENC_CTYPE_XDIGIT 3582 regparse.c         ctype = ONIGENC_CTYPE_XDIGIT;
ONIGENC_CTYPE_XDIGIT 3616 regparse.c         { "xdigit", ONIGENC_CTYPE_XDIGIT, 6 },
ONIGENC_CTYPE_XDIGIT 3687 regparse.c         { "XDigit", ONIGENC_CTYPE_XDIGIT, 6 },
ONIGENC_CTYPE_XDIGIT 3600 utf8.c           case ONIGENC_CTYPE_XDIGIT:
ONIGENC_CTYPE_XDIGIT 3665 utf8.c           case ONIGENC_CTYPE_XDIGIT:


ONIGENC_GET_ALL_COMP_AMBIG_CODES

ONIGENC_GET_ALL_COMP_AMBIG_CODES 3781 regcomp.c            n = ONIGENC_GET_ALL_COMP_AMBIG_CODES(enc, amb, &ccs);
ONIGENC_GET_ALL_COMP_AMBIG_CODES 4568 regparse.c         ncode = ONIGENC_GET_ALL_COMP_AMBIG_CODES(enc, amb, &ccs);


ONIGENC_GET_ALL_PAIR_AMBIG_CODES

ONIGENC_GET_ALL_PAIR_AMBIG_CODES 3771 regcomp.c          n = ONIGENC_GET_ALL_PAIR_AMBIG_CODES(enc, amb, &pccs);
ONIGENC_GET_ALL_PAIR_AMBIG_CODES 4911 regparse.c               n = ONIGENC_GET_ALL_PAIR_AMBIG_CODES(env->enc, amb, &ccs);


ONIGENC_GET_CTYPE_CODE_RANGE

ONIGENC_GET_CTYPE_CODE_RANGE 3470 regparse.c       r = ONIGENC_GET_CTYPE_CODE_RANGE(enc, ctype, &sbr, &mbr);
ONIGENC_GET_CTYPE_CODE_RANGE 4825 regparse.c               r = ONIGENC_GET_CTYPE_CODE_RANGE(env->enc, ctype, &sbr, &mbr);


ONIGENC_IS_ASCII_CODE_CASE_AMBIG

ONIGENC_IS_ASCII_CODE_CASE_AMBIG  634 regenc.c           return ONIGENC_IS_ASCII_CODE_CASE_AMBIG(*p);
ONIGENC_IS_ASCII_CODE_CASE_AMBIG  747 regenc.c             return ONIGENC_IS_ASCII_CODE_CASE_AMBIG(*p);
ONIGENC_IS_ASCII_CODE_CASE_AMBIG  279 utf8.c               return ONIGENC_IS_ASCII_CODE_CASE_AMBIG(*p);


ONIGENC_IS_ASCII_CODE_CTYPE

ONIGENC_IS_ASCII_CODE_CTYPE   36 ascii.c            return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
ONIGENC_IS_ASCII_CODE_CTYPE  163 euc_jp.c             return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
ONIGENC_IS_ASCII_CODE_CTYPE  172 euc_jp.c           return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
ONIGENC_IS_ASCII_CODE_CTYPE  854 regenc.c             return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
ONIGENC_IS_ASCII_CODE_CTYPE  863 regenc.c           return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
ONIGENC_IS_ASCII_CODE_CTYPE  874 regenc.c             return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
ONIGENC_IS_ASCII_CODE_CTYPE  883 regenc.c           return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
ONIGENC_IS_ASCII_CODE_CTYPE  143 regenc.h           ONIGENC_IS_ASCII_CODE_CTYPE(code, (ONIGENC_CTYPE_UPPER | ONIGENC_CTYPE_LOWER))
ONIGENC_IS_ASCII_CODE_CTYPE  172 sjis.c               return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
ONIGENC_IS_ASCII_CODE_CTYPE  182 sjis.c             return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);


ONIGENC_IS_CODE_ASCII

ONIGENC_IS_CODE_ASCII   80 euc_jp.c         if (ONIGENC_IS_CODE_ASCII(code)) return 1;
ONIGENC_IS_CODE_ASCII  268 oniguruma.h      (ONIGENC_IS_CODE_ASCII(code) && ONIGENC_IS_CODE_WORD(enc,code))
ONIGENC_IS_CODE_ASCII 2453 regparse.c         if (ONIGENC_IS_CODE_ASCII(first_code) &&


ONIGENC_IS_CODE_CTYPE

ONIGENC_IS_CODE_CTYPE  376 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_NEWLINE)
ONIGENC_IS_CODE_CTYPE  378 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_GRAPH)
ONIGENC_IS_CODE_CTYPE  380 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_PRINT)
ONIGENC_IS_CODE_CTYPE  382 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_ALNUM)
ONIGENC_IS_CODE_CTYPE  384 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_ALPHA)
ONIGENC_IS_CODE_CTYPE  386 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_LOWER)
ONIGENC_IS_CODE_CTYPE  388 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_UPPER)
ONIGENC_IS_CODE_CTYPE  390 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_CNTRL)
ONIGENC_IS_CODE_CTYPE  392 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_PUNCT)
ONIGENC_IS_CODE_CTYPE  394 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_SPACE)
ONIGENC_IS_CODE_CTYPE  396 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_BLANK)
ONIGENC_IS_CODE_CTYPE  398 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_DIGIT)
ONIGENC_IS_CODE_CTYPE  400 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_XDIGIT)
ONIGENC_IS_CODE_CTYPE  402 oniguruma.h            ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_WORD)
ONIGENC_IS_CODE_CTYPE 3493 regparse.c     	if (! ONIGENC_IS_CODE_CTYPE(enc, (OnigCodePoint )c, ctype))
ONIGENC_IS_CODE_CTYPE 3500 regparse.c     	if (ONIGENC_IS_CODE_CTYPE(enc, (OnigCodePoint )c, ctype))
ONIGENC_IS_CODE_CTYPE 3510 regparse.c     	if (! ONIGENC_IS_CODE_CTYPE(enc, (OnigCodePoint )c, ctype))
ONIGENC_IS_CODE_CTYPE 3516 regparse.c     	if (ONIGENC_IS_CODE_CTYPE(enc, (OnigCodePoint )c, ctype))


ONIGENC_IS_CODE_DIGIT

ONIGENC_IS_CODE_DIGIT  368 regint.h         (ONIGENC_IS_CODE_DIGIT(enc,code) ? DIGITVAL(code) \
ONIGENC_IS_CODE_DIGIT 1489 regparse.c         if (ONIGENC_IS_CODE_DIGIT(enc, c)) {
ONIGENC_IS_CODE_DIGIT 1545 regparse.c         if (ONIGENC_IS_CODE_DIGIT(enc, c) && c < '8') {
ONIGENC_IS_CODE_DIGIT 2416 regparse.c         if (ONIGENC_IS_CODE_DIGIT(enc, c)) {
ONIGENC_IS_CODE_DIGIT 2434 regparse.c           if (! ONIGENC_IS_CODE_DIGIT(enc, c)) {
ONIGENC_IS_CODE_DIGIT 2487 regparse.c         if (! ONIGENC_IS_CODE_DIGIT(enc, c))


ONIGENC_IS_CODE_NEWLINE

ONIGENC_IS_CODE_NEWLINE 3375 regparse.c     	  if (ONIGENC_IS_CODE_NEWLINE(enc, c))
ONIGENC_IS_CODE_NEWLINE 4215 regparse.c           if (ONIGENC_IS_CODE_NEWLINE(env->enc, NEWLINE_CODE)) {


ONIGENC_IS_CODE_PRINT

ONIGENC_IS_CODE_PRINT 4555 regcomp.c                    ONIGENC_IS_CODE_PRINT(reg->enc, (OnigCodePoint )i))
ONIGENC_IS_CODE_PRINT  290 regerror.c           else if (!ONIGENC_IS_CODE_PRINT(enc, *p) &&


ONIGENC_IS_CODE_SB_WORD

ONIGENC_IS_CODE_SB_WORD 2209 regcomp.c      		if (ONIGENC_IS_CODE_SB_WORD(reg->enc, i)) return 0;
ONIGENC_IS_CODE_SB_WORD 2218 regcomp.c      	    if (! ONIGENC_IS_CODE_SB_WORD(reg->enc, i)) {
ONIGENC_IS_CODE_SB_WORD 3526 regparse.c     	if (ONIGENC_IS_CODE_SB_WORD(enc, c)) BITSET_SET_BIT(cc->bs, c);


ONIGENC_IS_CODE_UPPER

ONIGENC_IS_CODE_UPPER  369 regint.h          : (ONIGENC_IS_CODE_UPPER(enc,code) ? (code) - 'A' + 10 : (code) - 'a' + 10))
ONIGENC_IS_CODE_UPPER 2454 regparse.c             ONIGENC_IS_CODE_UPPER(enc, first_code))


ONIGENC_IS_CODE_WORD

ONIGENC_IS_CODE_WORD  268 oniguruma.h      (ONIGENC_IS_CODE_ASCII(code) && ONIGENC_IS_CODE_WORD(enc,code))
ONIGENC_IS_CODE_WORD  270 oniguruma.h       ONIGENC_IS_CODE_WORD(enc,ONIGENC_MBC_TO_CODE(enc,s,end))
ONIGENC_IS_CODE_WORD 4078 regcomp.c                  if (! ONIGENC_IS_CODE_WORD(env->enc, i)) {
ONIGENC_IS_CODE_WORD 4086 regcomp.c                  if (ONIGENC_IS_CODE_WORD(env->enc, i)) {
ONIGENC_IS_CODE_WORD 2423 regparse.c         else if (!ONIGENC_IS_CODE_WORD(enc, c)) {
ONIGENC_IS_CODE_WORD 2435 regparse.c     	if (!ONIGENC_IS_CODE_WORD(enc, c))
ONIGENC_IS_CODE_WORD 2442 regparse.c           if (!ONIGENC_IS_CODE_WORD(enc, c)) {
ONIGENC_IS_CODE_WORD 3533 regparse.c     	    && ! ONIGENC_IS_CODE_WORD(enc, c))


ONIGENC_IS_CODE_XDIGIT

ONIGENC_IS_CODE_XDIGIT 1517 regparse.c         if (ONIGENC_IS_CODE_XDIGIT(enc, c)) {
ONIGENC_IS_CODE_XDIGIT 2707 regparse.c               if (ONIGENC_IS_CODE_XDIGIT(enc, c2))
ONIGENC_IS_CODE_XDIGIT 3039 regparse.c               if (ONIGENC_IS_CODE_XDIGIT(enc, PPEEK))


ONIGENC_IS_MBC_AMBIGUOUS

ONIGENC_IS_MBC_AMBIGUOUS 2367 regcomp.c      	if (! ONIGENC_IS_MBC_AMBIGUOUS(reg->enc, reg->ambig_flag,
ONIGENC_IS_MBC_AMBIGUOUS 2960 regcomp.c        prev_ambig = ONIGENC_IS_MBC_AMBIGUOUS(reg->enc, reg->ambig_flag, &p, end);
ONIGENC_IS_MBC_AMBIGUOUS 2964 regcomp.c          if (prev_ambig != (ambig = ONIGENC_IS_MBC_AMBIGUOUS(reg->enc,


ONIGENC_IS_MBC_ASCII

ONIGENC_IS_MBC_ASCII  128 euc_jp.c         if (ONIGENC_IS_MBC_ASCII(p)) {
ONIGENC_IS_MBC_ASCII  715 regenc.c         if (ONIGENC_IS_MBC_ASCII(p)) {
ONIGENC_IS_MBC_ASCII  744 regenc.c         if (ONIGENC_IS_MBC_ASCII(p)) {
ONIGENC_IS_MBC_ASCII  135 sjis.c           if (ONIGENC_IS_MBC_ASCII(p)) {
ONIGENC_IS_MBC_ASCII  202 utf8.c           if (ONIGENC_IS_MBC_ASCII(p)) {
ONIGENC_IS_MBC_ASCII  267 utf8.c           if (ONIGENC_IS_MBC_ASCII(p)) {


ONIGENC_IS_MBC_HEAD

ONIGENC_IS_MBC_HEAD  274 regerror.c           else if (ONIGENC_IS_MBC_HEAD(enc, p)) {
ONIGENC_IS_MBC_HEAD 1617 regexec.c            if (! ONIGENC_IS_MBC_HEAD(encode, s)) goto fail;
ONIGENC_IS_MBC_HEAD 1647 regexec.c            if (ONIGENC_IS_MBC_HEAD(encode, s)) {
ONIGENC_IS_MBC_HEAD 1673 regexec.c            if (! ONIGENC_IS_MBC_HEAD(encode, s)) {
ONIGENC_IS_MBC_HEAD 1714 regexec.c            if (ONIGENC_IS_MBC_HEAD(encode, s)) {


ONIGENC_IS_MBC_NEWLINE

ONIGENC_IS_MBC_NEWLINE 1752 regexec.c            if (ONIGENC_IS_MBC_NEWLINE(encode, s, end)) goto fail;
ONIGENC_IS_MBC_NEWLINE 1770 regexec.c              if (ONIGENC_IS_MBC_NEWLINE(encode, s, end))  goto fail;
ONIGENC_IS_MBC_NEWLINE 1801 regexec.c              if (ONIGENC_IS_MBC_NEWLINE(encode, s, end))  goto fail;
ONIGENC_IS_MBC_NEWLINE 1926 regexec.c            else if (ONIGENC_IS_MBC_NEWLINE(encode, sprev, end) && !ON_STR_END(s)) {
ONIGENC_IS_MBC_NEWLINE 1936 regexec.c      	if (IS_EMPTY_STR || !ONIGENC_IS_MBC_NEWLINE(encode, sprev, end)) {
ONIGENC_IS_MBC_NEWLINE 1945 regexec.c            else if (ONIGENC_IS_MBC_NEWLINE(encode, s, end)) {
ONIGENC_IS_MBC_NEWLINE 1955 regexec.c      	if (IS_EMPTY_STR || !ONIGENC_IS_MBC_NEWLINE(encode, sprev, end)) {
ONIGENC_IS_MBC_NEWLINE 1964 regexec.c            else if (ONIGENC_IS_MBC_NEWLINE(encode, s, end) &&
ONIGENC_IS_MBC_NEWLINE 3020 regexec.c      	  if (!ONIGENC_IS_MBC_NEWLINE(reg->enc, prev, end))
ONIGENC_IS_MBC_NEWLINE 3029 regexec.c      	  if (prev && ONIGENC_IS_MBC_NEWLINE(reg->enc, prev, end))
ONIGENC_IS_MBC_NEWLINE 3032 regexec.c      	else if (!ONIGENC_IS_MBC_NEWLINE(reg->enc, p, end))
ONIGENC_IS_MBC_NEWLINE 3136 regexec.c      	  if (!ONIGENC_IS_MBC_NEWLINE(reg->enc, prev, end)) {
ONIGENC_IS_MBC_NEWLINE 3147 regexec.c      	  if (ONIGENC_IS_MBC_NEWLINE(reg->enc, prev, end)) {
ONIGENC_IS_MBC_NEWLINE 3152 regexec.c      	else if (!ONIGENC_IS_MBC_NEWLINE(reg->enc, p, end)) {
ONIGENC_IS_MBC_NEWLINE 3297 regexec.c            if (ONIGENC_IS_MBC_NEWLINE(reg->enc, pre_end, end)) {
ONIGENC_IS_MBC_NEWLINE 3373 regexec.c      	      while (!ONIGENC_IS_MBC_NEWLINE(reg->enc, prev, end) &&


ONIGENC_IS_MBC_WORD

ONIGENC_IS_MBC_WORD 2280 regcomp.c      	  return (ONIGENC_IS_MBC_WORD(reg->enc, xs->s, xs->end) ? 0 : 1);
ONIGENC_IS_MBC_WORD 2283 regcomp.c      	  return (ONIGENC_IS_MBC_WORD(reg->enc, xs->s, xs->end) ? 1 : 0);
ONIGENC_IS_MBC_WORD 1831 regexec.c            if (! ONIGENC_IS_MBC_WORD(encode, s, end))
ONIGENC_IS_MBC_WORD 1840 regexec.c            if (ONIGENC_IS_MBC_WORD(encode, s, end))
ONIGENC_IS_MBC_WORD 1850 regexec.c      	if (! ONIGENC_IS_MBC_WORD(encode, s, end))
ONIGENC_IS_MBC_WORD 1854 regexec.c      	if (! ONIGENC_IS_MBC_WORD(encode, sprev, end))
ONIGENC_IS_MBC_WORD 1858 regexec.c      	if (ONIGENC_IS_MBC_WORD(encode, s, end)
ONIGENC_IS_MBC_WORD 1859 regexec.c      	    == ONIGENC_IS_MBC_WORD(encode, sprev, end))
ONIGENC_IS_MBC_WORD 1868 regexec.c      	if (DATA_ENSURE_CHECK(1) && ONIGENC_IS_MBC_WORD(encode, s, end))
ONIGENC_IS_MBC_WORD 1872 regexec.c      	if (ONIGENC_IS_MBC_WORD(encode, sprev, end))
ONIGENC_IS_MBC_WORD 1876 regexec.c      	if (ONIGENC_IS_MBC_WORD(encode, s, end)
ONIGENC_IS_MBC_WORD 1877 regexec.c      	    != ONIGENC_IS_MBC_WORD(encode, sprev, end))
ONIGENC_IS_MBC_WORD 1886 regexec.c            if (DATA_ENSURE_CHECK(1) && ONIGENC_IS_MBC_WORD(encode, s, end)) {
ONIGENC_IS_MBC_WORD 1887 regexec.c      	if (ON_STR_BEGIN(s) || !ONIGENC_IS_MBC_WORD(encode, sprev, end)) {
ONIGENC_IS_MBC_WORD 1896 regexec.c            if (!ON_STR_BEGIN(s) && ONIGENC_IS_MBC_WORD(encode, sprev, end)) {
ONIGENC_IS_MBC_WORD 1897 regexec.c      	if (ON_STR_END(s) || !ONIGENC_IS_MBC_WORD(encode, s, end)) {


ONIGENC_IS_SINGLEBYTE

ONIGENC_IS_SINGLEBYTE 1030 regenc.c         return ONIGENC_IS_SINGLEBYTE(enc);
ONIGENC_IS_SINGLEBYTE 2972 regexec.c          if (ONIGENC_IS_SINGLEBYTE(reg->enc)) {
ONIGENC_IS_SINGLEBYTE  118 regparse.c       if (! ONIGENC_IS_SINGLEBYTE(enc)) {\
ONIGENC_IS_SINGLEBYTE 1880 regparse.c         if (! ONIGENC_IS_SINGLEBYTE(enc)) {
ONIGENC_IS_SINGLEBYTE 1926 regparse.c       if (! ONIGENC_IS_SINGLEBYTE(enc)) {
ONIGENC_IS_SINGLEBYTE 1984 regparse.c       if (! ONIGENC_IS_SINGLEBYTE(enc)) {
ONIGENC_IS_SINGLEBYTE 3968 regparse.c           if (! ONIGENC_IS_SINGLEBYTE(env->enc) && tok->base != 0) {


ONIGENC_LEFT_ADJUST_CHAR_HEAD

ONIGENC_LEFT_ADJUST_CHAR_HEAD  874 re.c           	      p = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, string, string + pos);
ONIGENC_LEFT_ADJUST_CHAR_HEAD   56 regenc.c         UChar* p = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s);
ONIGENC_LEFT_ADJUST_CHAR_HEAD   67 regenc.c         UChar* p = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s);
ONIGENC_LEFT_ADJUST_CHAR_HEAD   85 regenc.c         return ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s - 1);
ONIGENC_LEFT_ADJUST_CHAR_HEAD   95 regenc.c           s = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s - 1);
ONIGENC_LEFT_ADJUST_CHAR_HEAD  417 regenc.c         return ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s);
ONIGENC_LEFT_ADJUST_CHAR_HEAD 2679 regexec.c          s = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, adjust_text, s);
ONIGENC_LEFT_ADJUST_CHAR_HEAD 2712 regexec.c          s = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, adjust_text, s);
ONIGENC_LEFT_ADJUST_CHAR_HEAD 2863 regexec.c          s = ONIGENC_LEFT_ADJUST_CHAR_HEAD(reg->enc, adjust_text, s);
ONIGENC_LEFT_ADJUST_CHAR_HEAD 2875 regexec.c          s = ONIGENC_LEFT_ADJUST_CHAR_HEAD(reg->enc, adjust_text, s);
ONIGENC_LEFT_ADJUST_CHAR_HEAD 3289 regexec.c      	  start = ONIGENC_LEFT_ADJUST_CHAR_HEAD(reg->enc, str, start);
ONIGENC_LEFT_ADJUST_CHAR_HEAD 3401 regexec.c      	adjrange = ONIGENC_LEFT_ADJUST_CHAR_HEAD(reg->enc, str, range);
ONIGENC_LEFT_ADJUST_CHAR_HEAD 3436 regexec.c      	      sch_start = ONIGENC_LEFT_ADJUST_CHAR_HEAD(reg->enc,


ONIGENC_MBC_ENC_LEN

ONIGENC_MBC_ENC_LEN  260 oniguruma.h    #define enc_len(enc,p)                ONIGENC_MBC_ENC_LEN(enc, p)
ONIGENC_MBC_ENC_LEN  264 oniguruma.h    #define ONIGENC_IS_MBC_HEAD(enc,p)     (ONIGENC_MBC_ENC_LEN(enc,p) != 1)
ONIGENC_MBC_ENC_LEN  105 regenc.c           q += ONIGENC_MBC_ENC_LEN(enc, q);
ONIGENC_MBC_ENC_LEN  117 regenc.c           q += ONIGENC_MBC_ENC_LEN(enc, q);
ONIGENC_MBC_ENC_LEN  143 regenc.c           p += ONIGENC_MBC_ENC_LEN(enc, p);
ONIGENC_MBC_ENC_LEN  168 regenc.c           p += ONIGENC_MBC_ENC_LEN(enc, p);
ONIGENC_MBC_ENC_LEN   24 regex.h          ONIGENC_MBC_ENC_LEN(OnigEncDefaultCharEncoding, (UChar* )(&c))
ONIGENC_MBC_ENC_LEN  250 regparse.c       p += ONIGENC_MBC_ENC_LEN(enc, p); \
ONIGENC_MBC_ENC_LEN  255 regparse.c       p += ONIGENC_MBC_ENC_LEN(enc, p); \


ONIGENC_MBC_MAXLEN

ONIGENC_MBC_MAXLEN  263 oniguruma.h    #define ONIGENC_IS_SINGLEBYTE(enc)     (ONIGENC_MBC_MAXLEN(enc) == 1)
ONIGENC_MBC_MAXLEN  294 oniguruma.h        (ONIGENC_MBC_MAXLEN(enc) > 0 ? ONIGENC_MBC_MAXLEN(enc) \
ONIGENC_MBC_MAXLEN  366 oniguruma.h    #define ONIGENC_MBC_MAXLEN_DIST(enc)           ONIGENC_MBC_MAXLEN(enc)
ONIGENC_MBC_MAXLEN  867 re.c               if (pos > 0 && ONIGENC_MBC_MAXLEN(enc) != 1 && pos < RSTRING(str)->len) {
ONIGENC_MBC_MAXLEN 2295 regcomp.c      				     xs->s + ONIGENC_MBC_MAXLEN(reg->enc));
ONIGENC_MBC_MAXLEN 4554 regcomp.c                if (ONIGENC_MBC_MAXLEN(reg->enc) == 1 &&
ONIGENC_MBC_MAXLEN 3975 regparse.c     	for (i = 1; i < ONIGENC_MBC_MAXLEN(env->enc); i++) {


ONIGENC_MBC_MAXLEN_DIST

ONIGENC_MBC_MAXLEN_DIST 1894 regcomp.c            *max = ONIGENC_MBC_MAXLEN_DIST(env->enc);
ONIGENC_MBC_MAXLEN_DIST 1904 regcomp.c          *max = ONIGENC_MBC_MAXLEN_DIST(env->enc);
ONIGENC_MBC_MAXLEN_DIST 4028 regcomp.c                max = ONIGENC_MBC_MAXLEN_DIST(env->enc) * n;
ONIGENC_MBC_MAXLEN_DIST 4050 regcomp.c      	OnigDistance max = ONIGENC_MBC_MAXLEN_DIST(env->enc);
ONIGENC_MBC_MAXLEN_DIST 4070 regcomp.c            max = ONIGENC_MBC_MAXLEN_DIST(env->enc);
ONIGENC_MBC_MAXLEN_DIST 4103 regcomp.c            OnigDistance max = ONIGENC_MBC_MAXLEN_DIST(env->enc);


ONIGENC_MBC_MINLEN

ONIGENC_MBC_MINLEN  561 regcomp.c          if (ONIGENC_MBC_MINLEN(reg->enc) > 1 || bitset_is_empty(cc->bs)) {
ONIGENC_MBC_MINLEN  597 regcomp.c          if (ONIGENC_MBC_MINLEN(reg->enc) > 1 || bitset_is_empty(cc->bs)) {
ONIGENC_MBC_MINLEN 2128 regcomp.c        if (ONIGENC_MBC_MINLEN(enc) > 1 || (code >= SINGLE_BYTE_SIZE)) {
ONIGENC_MBC_MINLEN 3398 regcomp.c          if (i == 0 && ONIGENC_MBC_MINLEN(enc) > 1)
ONIGENC_MBC_MINLEN 4049 regcomp.c              OnigDistance min = ONIGENC_MBC_MINLEN(env->enc);
ONIGENC_MBC_MINLEN 4094 regcomp.c              min = ONIGENC_MBC_MINLEN(env->enc);
ONIGENC_MBC_MINLEN 4102 regcomp.c            OnigDistance min = ONIGENC_MBC_MINLEN(env->enc);
ONIGENC_MBC_MINLEN  132 regenc.c             int len = ONIGENC_MBC_MINLEN(enc);
ONIGENC_MBC_MINLEN  157 regenc.c             int len = ONIGENC_MBC_MINLEN(enc);
ONIGENC_MBC_MINLEN  276 regerror.c             if (ONIGENC_MBC_MINLEN(enc) == 1) {
ONIGENC_MBC_MINLEN  112 regparse.c       (OnigCodePoint )(ONIGENC_MBC_MINLEN(enc) > 1 ? 0 : 0x80)
ONIGENC_MBC_MINLEN  229 regparse.c       term_len = ONIGENC_MBC_MINLEN(enc);
ONIGENC_MBC_MINLEN 3429 regparse.c         if (ONIGENC_MBC_MINLEN(enc) == 1) {
ONIGENC_MBC_MINLEN 3985 regparse.c     	if (i < ONIGENC_MBC_MINLEN(env->enc)) {
ONIGENC_MBC_MINLEN 4917 regparse.c                   if (ONIGENC_MBC_MINLEN(env->enc) > 1 ||


ONIGENC_MBC_NORMALIZE_MAXLEN

ONIGENC_MBC_NORMALIZE_MAXLEN 3759 regcomp.c        UChar buf[ONIGENC_MBC_NORMALIZE_MAXLEN];
ONIGENC_MBC_NORMALIZE_MAXLEN  899 regexec.c        UChar buf1[ONIGENC_MBC_NORMALIZE_MAXLEN];
ONIGENC_MBC_NORMALIZE_MAXLEN  900 regexec.c        UChar buf2[ONIGENC_MBC_NORMALIZE_MAXLEN];
ONIGENC_MBC_NORMALIZE_MAXLEN 1381 regexec.c      	UChar *q, *ss, *sp, lowbuf[ONIGENC_MBC_NORMALIZE_MAXLEN];
ONIGENC_MBC_NORMALIZE_MAXLEN 1482 regexec.c      	UChar *ss, *sp, *q, *endp, lowbuf[ONIGENC_MBC_NORMALIZE_MAXLEN];
ONIGENC_MBC_NORMALIZE_MAXLEN 2614 regexec.c        UChar *q, lowbuf[ONIGENC_MBC_NORMALIZE_MAXLEN];


ONIGENC_MBC_TO_CODE

ONIGENC_MBC_TO_CODE  270 oniguruma.h       ONIGENC_IS_CODE_WORD(enc,ONIGENC_MBC_TO_CODE(enc,s,end))
ONIGENC_MBC_TO_CODE 2294 regcomp.c      	  code = ONIGENC_MBC_TO_CODE(reg->enc, xs->s,
ONIGENC_MBC_TO_CODE 3766 regcomp.c        code = ONIGENC_MBC_TO_CODE(enc, p, end);
ONIGENC_MBC_TO_CODE  897 regenc.c           c = (int )ONIGENC_MBC_TO_CODE(enc, p, end);
ONIGENC_MBC_TO_CODE 1631 regexec.c      	code = ONIGENC_MBC_TO_CODE(encode, ss, s);
ONIGENC_MBC_TO_CODE 1696 regexec.c      	code = ONIGENC_MBC_TO_CODE(encode, ss, s);
ONIGENC_MBC_TO_CODE 1742 regexec.c      	code = ONIGENC_MBC_TO_CODE(encode, ss, s);
ONIGENC_MBC_TO_CODE  253 regparse.c       c = ONIGENC_MBC_TO_CODE(enc, p, end); \
ONIGENC_MBC_TO_CODE  258 regparse.c     #define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
ONIGENC_MBC_TO_CODE 2547 regparse.c         x = ONIGENC_MBC_TO_CODE(enc, p, to);
ONIGENC_MBC_TO_CODE 2551 regparse.c     	x = ONIGENC_MBC_TO_CODE(enc, q, to);
ONIGENC_MBC_TO_CODE 2582 regparse.c           x = ONIGENC_MBC_TO_CODE(enc, p, to);
ONIGENC_MBC_TO_CODE 2586 regparse.c     	  x = ONIGENC_MBC_TO_CODE(enc, q, to);
ONIGENC_MBC_TO_CODE 2594 regparse.c     	x = ONIGENC_MBC_TO_CODE(enc, p, to);
ONIGENC_MBC_TO_CODE 4008 regparse.c     	  v = ONIGENC_MBC_TO_CODE(env->enc, buf, bufe);


ONIGENC_MBC_TO_NORMALIZE

ONIGENC_MBC_TO_NORMALIZE 2971 regcomp.c                wp += ONIGENC_MBC_TO_NORMALIZE(reg->enc, reg->ambig_flag,
ONIGENC_MBC_TO_NORMALIZE 3006 regcomp.c              wp += ONIGENC_MBC_TO_NORMALIZE(reg->enc, reg->ambig_flag,
ONIGENC_MBC_TO_NORMALIZE 3018 regcomp.c              wp += ONIGENC_MBC_TO_NORMALIZE(reg->enc, reg->ambig_flag,
ONIGENC_MBC_TO_NORMALIZE  908 regexec.c          len1 = ONIGENC_MBC_TO_NORMALIZE(enc, ambig_flag, &s1, end, buf1);
ONIGENC_MBC_TO_NORMALIZE  909 regexec.c          len2 = ONIGENC_MBC_TO_NORMALIZE(enc, ambig_flag, &s2, end2, buf2);
ONIGENC_MBC_TO_NORMALIZE 1388 regexec.c      	len = ONIGENC_MBC_TO_NORMALIZE(encode, ambig_flag, &s, end, lowbuf);
ONIGENC_MBC_TO_NORMALIZE 1494 regexec.c      	  len = ONIGENC_MBC_TO_NORMALIZE(encode, ambig_flag, &s, end, lowbuf);
ONIGENC_MBC_TO_NORMALIZE 2623 regexec.c          lowlen = ONIGENC_MBC_TO_NORMALIZE(enc, ambig_flag, &p, end, lowbuf);


ONIGENC_STEP_BACK

ONIGENC_STEP_BACK 2486 regexec.c            s = (UChar* )ONIGENC_STEP_BACK(encode, str, s, (int )tlen);
ONIGENC_STEP_BACK 2496 regexec.c            q = (UChar* )ONIGENC_STEP_BACK(encode, str, s, (int )tlen);
ONIGENC_STEP_BACK 3295 regexec.c            UChar* pre_end = ONIGENC_STEP_BACK(reg->enc, str, end, 1);


ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE

ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE   85 regerror.c       case ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE:
ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE 3792 regparse.c         return ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE;


ONIGERR_CONTROL_CODE_SYNTAX

ONIGERR_CONTROL_CODE_SYNTAX   83 regerror.c       case ONIGERR_CONTROL_CODE_SYNTAX:
ONIGERR_CONTROL_CODE_SYNTAX 2350 regparse.c           if (c != '-') return ONIGERR_CONTROL_CODE_SYNTAX;


ONIGERR_DEFAULT_ENCODING_IS_NOT_SETTED

ONIGERR_DEFAULT_ENCODING_IS_NOT_SETTED 4907 regcomp.c          return ONIGERR_DEFAULT_ENCODING_IS_NOT_SETTED;
ONIGERR_DEFAULT_ENCODING_IS_NOT_SETTED   61 regerror.c       case ONIGERR_DEFAULT_ENCODING_IS_NOT_SETTED:


ONIGERR_EMPTY_CHAR_CLASS

ONIGERR_EMPTY_CHAR_CLASS   71 regerror.c       case ONIGERR_EMPTY_CHAR_CLASS:
ONIGERR_EMPTY_CHAR_CLASS 3936 regparse.c           return ONIGERR_EMPTY_CHAR_CLASS;


ONIGERR_EMPTY_GROUP_NAME

ONIGERR_EMPTY_GROUP_NAME  141 regerror.c       case ONIGERR_EMPTY_GROUP_NAME:
ONIGERR_EMPTY_GROUP_NAME  712 regparse.c         return ONIGERR_EMPTY_GROUP_NAME;
ONIGERR_EMPTY_GROUP_NAME 2408 regparse.c         return ONIGERR_EMPTY_GROUP_NAME;
ONIGERR_EMPTY_GROUP_NAME 2414 regparse.c           return ONIGERR_EMPTY_GROUP_NAME;


ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS

ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS  117 regerror.c       case ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS:
ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS 1669 regparse.c           return ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS;
ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS 3836 regparse.c     	    return ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS;
ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS 3853 regparse.c     	    return ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS;


ONIGERR_END_PATTERN_AT_CONTROL

ONIGERR_END_PATTERN_AT_CONTROL   79 regerror.c       case ONIGERR_END_PATTERN_AT_CONTROL:
ONIGERR_END_PATTERN_AT_CONTROL 2348 regparse.c           if (PEND) return ONIGERR_END_PATTERN_AT_CONTROL;
ONIGERR_END_PATTERN_AT_CONTROL 2359 regparse.c           if (PEND) return ONIGERR_END_PATTERN_AT_CONTROL;


ONIGERR_END_PATTERN_AT_ESCAPE

ONIGERR_END_PATTERN_AT_ESCAPE   75 regerror.c       case ONIGERR_END_PATTERN_AT_ESCAPE:
ONIGERR_END_PATTERN_AT_ESCAPE 2324 regparse.c       if (PEND) return ONIGERR_END_PATTERN_AT_ESCAPE;
ONIGERR_END_PATTERN_AT_ESCAPE 2636 regparse.c         if (PEND) return ONIGERR_END_PATTERN_AT_ESCAPE;
ONIGERR_END_PATTERN_AT_ESCAPE 2837 regparse.c         if (PEND) return ONIGERR_END_PATTERN_AT_ESCAPE;


ONIGERR_END_PATTERN_AT_LEFT_BRACE

ONIGERR_END_PATTERN_AT_LEFT_BRACE   67 regerror.c       case ONIGERR_END_PATTERN_AT_LEFT_BRACE:
ONIGERR_END_PATTERN_AT_LEFT_BRACE 2240 regparse.c           return ONIGERR_END_PATTERN_AT_LEFT_BRACE;  /* "....{" syntax error */
ONIGERR_END_PATTERN_AT_LEFT_BRACE 2246 regparse.c           return ONIGERR_END_PATTERN_AT_LEFT_BRACE;


ONIGERR_END_PATTERN_AT_META

ONIGERR_END_PATTERN_AT_META   77 regerror.c       case ONIGERR_END_PATTERN_AT_META:
ONIGERR_END_PATTERN_AT_META 2330 regparse.c           if (PEND) return ONIGERR_END_PATTERN_AT_META;
ONIGERR_END_PATTERN_AT_META 2333 regparse.c           if (PEND) return ONIGERR_END_PATTERN_AT_META;


ONIGERR_END_PATTERN_IN_GROUP

ONIGERR_END_PATTERN_IN_GROUP  101 regerror.c       case ONIGERR_END_PATTERN_IN_GROUP:
ONIGERR_END_PATTERN_IN_GROUP 3324 regparse.c                 if (PEND) return ONIGERR_END_PATTERN_IN_GROUP;
ONIGERR_END_PATTERN_IN_GROUP 4256 regparse.c         if (PEND) return ONIGERR_END_PATTERN_IN_GROUP;
ONIGERR_END_PATTERN_IN_GROUP 4414 regparse.c     	  if (PEND) return ONIGERR_END_PATTERN_IN_GROUP;


ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS

ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS   99 regerror.c       case ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS:
ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS 4250 regparse.c       if (PEND) return ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS;
ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS 5127 regparse.c           return ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS;


ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY

ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY  161 regerror.c       case ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY:
ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY 4302 regparse.c     	  return ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY;
ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY 4339 regparse.c     	  return ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY;


ONIGERR_INVALID_ARGUMENT

ONIGERR_INVALID_ARGUMENT   65 regerror.c       case ONIGERR_INVALID_ARGUMENT:
ONIGERR_INVALID_ARGUMENT  207 regexec.c        if (at < 0) return ONIGERR_INVALID_ARGUMENT;


ONIGERR_INVALID_BACKREF

ONIGERR_INVALID_BACKREF 1749 regcomp.c            if (backs[0] > env->num_mem)  return ONIGERR_INVALID_BACKREF;
ONIGERR_INVALID_BACKREF 1753 regcomp.c      	if (backs[i] > env->num_mem)  return ONIGERR_INVALID_BACKREF;
ONIGERR_INVALID_BACKREF 1919 regcomp.c      	if (backs[i] > env->num_mem)  return ONIGERR_INVALID_BACKREF;
ONIGERR_INVALID_BACKREF 3116 regcomp.c      	if (p[i] > env->num_mem)  return ONIGERR_INVALID_BACKREF;
ONIGERR_INVALID_BACKREF  127 regerror.c       case ONIGERR_INVALID_BACKREF:
ONIGERR_INVALID_BACKREF 3094 regparse.c     	    return ONIGERR_INVALID_BACKREF;
ONIGERR_INVALID_BACKREF 3152 regparse.c     		return ONIGERR_INVALID_BACKREF;


ONIGERR_INVALID_CHAR_IN_GROUP_NAME

ONIGERR_INVALID_CHAR_IN_GROUP_NAME  145 regerror.c       case ONIGERR_INVALID_CHAR_IN_GROUP_NAME:
ONIGERR_INVALID_CHAR_IN_GROUP_NAME  197 regerror.c       case ONIGERR_INVALID_CHAR_IN_GROUP_NAME:
ONIGERR_INVALID_CHAR_IN_GROUP_NAME 2424 regparse.c           r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME;
ONIGERR_INVALID_CHAR_IN_GROUP_NAME 2436 regparse.c     	  r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME;
ONIGERR_INVALID_CHAR_IN_GROUP_NAME 2443 regparse.c             r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME;
ONIGERR_INVALID_CHAR_IN_GROUP_NAME 2483 regparse.c           r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME;
ONIGERR_INVALID_CHAR_IN_GROUP_NAME 2488 regparse.c           r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME;


ONIGERR_INVALID_CHAR_PROPERTY_NAME

ONIGERR_INVALID_CHAR_PROPERTY_NAME  163 regerror.c       case ONIGERR_INVALID_CHAR_PROPERTY_NAME:
ONIGERR_INVALID_CHAR_PROPERTY_NAME  198 regerror.c       case ONIGERR_INVALID_CHAR_PROPERTY_NAME:
ONIGERR_INVALID_CHAR_PROPERTY_NAME 3746 regparse.c       onig_scan_env_set_error_string(env, ONIGERR_INVALID_CHAR_PROPERTY_NAME,
ONIGERR_INVALID_CHAR_PROPERTY_NAME 3748 regparse.c       return ONIGERR_INVALID_CHAR_PROPERTY_NAME;


ONIGERR_INVALID_GROUP_NAME

ONIGERR_INVALID_GROUP_NAME  143 regerror.c       case ONIGERR_INVALID_GROUP_NAME:
ONIGERR_INVALID_GROUP_NAME  196 regerror.c       case ONIGERR_INVALID_GROUP_NAME:
ONIGERR_INVALID_GROUP_NAME 2420 regparse.c     	r = ONIGERR_INVALID_GROUP_NAME;
ONIGERR_INVALID_GROUP_NAME 2438 regparse.c     	  r = ONIGERR_INVALID_GROUP_NAME;
ONIGERR_INVALID_GROUP_NAME 2449 regparse.c         r = ONIGERR_INVALID_GROUP_NAME;
ONIGERR_INVALID_GROUP_NAME 2455 regparse.c           r = ONIGERR_INVALID_GROUP_NAME;
ONIGERR_INVALID_GROUP_NAME 2491 regparse.c         r = ONIGERR_INVALID_GROUP_NAME;


ONIGERR_INVALID_LOOK_BEHIND_PATTERN

ONIGERR_INVALID_LOOK_BEHIND_PATTERN 1182 regcomp.c      	if (r) return ONIGERR_INVALID_LOOK_BEHIND_PATTERN;
ONIGERR_INVALID_LOOK_BEHIND_PATTERN 1201 regcomp.c      	if (r) return ONIGERR_INVALID_LOOK_BEHIND_PATTERN;
ONIGERR_INVALID_LOOK_BEHIND_PATTERN 2892 regcomp.c          r = ONIGERR_INVALID_LOOK_BEHIND_PATTERN;
ONIGERR_INVALID_LOOK_BEHIND_PATTERN 2897 regcomp.c            r = ONIGERR_INVALID_LOOK_BEHIND_PATTERN;
ONIGERR_INVALID_LOOK_BEHIND_PATTERN 3277 regcomp.c      	  if (r > 0) return ONIGERR_INVALID_LOOK_BEHIND_PATTERN;
ONIGERR_INVALID_LOOK_BEHIND_PATTERN 3289 regcomp.c      	  if (r > 0) return ONIGERR_INVALID_LOOK_BEHIND_PATTERN;
ONIGERR_INVALID_LOOK_BEHIND_PATTERN  107 regerror.c       case ONIGERR_INVALID_LOOK_BEHIND_PATTERN:


ONIGERR_INVALID_POSIX_BRACKET_TYPE

ONIGERR_INVALID_POSIX_BRACKET_TYPE  105 regerror.c       case ONIGERR_INVALID_POSIX_BRACKET_TYPE:
ONIGERR_INVALID_POSIX_BRACKET_TYPE 3642 regparse.c     	return ONIGERR_INVALID_POSIX_BRACKET_TYPE;
ONIGERR_INVALID_POSIX_BRACKET_TYPE 3665 regparse.c     	return ONIGERR_INVALID_POSIX_BRACKET_TYPE;


ONIGERR_INVALID_REPEAT_RANGE_PATTERN

ONIGERR_INVALID_REPEAT_RANGE_PATTERN  109 regerror.c       case ONIGERR_INVALID_REPEAT_RANGE_PATTERN:
ONIGERR_INVALID_REPEAT_RANGE_PATTERN 2311 regparse.c         return ONIGERR_INVALID_REPEAT_RANGE_PATTERN;


ONIGERR_INVALID_WIDE_CHAR_VALUE

ONIGERR_INVALID_WIDE_CHAR_VALUE  139 regerror.c       case ONIGERR_INVALID_WIDE_CHAR_VALUE:
ONIGERR_INVALID_WIDE_CHAR_VALUE 3830 regparse.c               return ONIGERR_INVALID_WIDE_CHAR_VALUE;


ONIGERR_MATCH_STACK_LIMIT_OVER

ONIGERR_MATCH_STACK_LIMIT_OVER   49 regerror.c       case ONIGERR_MATCH_STACK_LIMIT_OVER:
ONIGERR_MATCH_STACK_LIMIT_OVER  442 regexec.c              return ONIGERR_MATCH_STACK_LIMIT_OVER;


ONIGERR_MEMORY

ONIGERR_MEMORY    130 regcomp.c        if (IS_NULL(buf->p)) return(ONIGERR_MEMORY);
ONIGERR_MEMORY    146 regcomp.c        CHECK_NULL_RETURN_VAL(p, ONIGERR_MEMORY);
ONIGERR_MEMORY    169 regcomp.c          CHECK_NULL_RETURN_VAL(p, ONIGERR_MEMORY);
ONIGERR_MEMORY    629 regcomp.c          CHECK_NULL_RETURN_VAL(p, ONIGERR_MEMORY);
ONIGERR_MEMORY    638 regcomp.c          CHECK_NULL_RETURN_VAL(p, ONIGERR_MEMORY);
ONIGERR_MEMORY   1610 regcomp.c        CHECK_NULL_RETURN_VAL(map, ONIGERR_MEMORY);
ONIGERR_MEMORY   2868 regcomp.c          CHECK_NULL_RETURN_VAL(insert_node, ONIGERR_MEMORY);
ONIGERR_MEMORY   2926 regcomp.c      	      CHECK_NULL_RETURN_VAL(en, ONIGERR_MEMORY);
ONIGERR_MEMORY   2975 regcomp.c              CHECK_NULL_RETURN_VAL(snode, ONIGERR_MEMORY);
ONIGERR_MEMORY   2981 regcomp.c              CHECK_NULL_RETURN_VAL(snode, ONIGERR_MEMORY);
ONIGERR_MEMORY   2986 regcomp.c      	CHECK_NULL_RETURN_VAL(root, ONIGERR_MEMORY);
ONIGERR_MEMORY   2991 regcomp.c      	CHECK_NULL_RETURN_VAL(*tailp, ONIGERR_MEMORY);
ONIGERR_MEMORY   3022 regcomp.c            CHECK_NULL_RETURN_VAL(snode, ONIGERR_MEMORY);
ONIGERR_MEMORY   3028 regcomp.c            CHECK_NULL_RETURN_VAL(snode, ONIGERR_MEMORY);
ONIGERR_MEMORY   3033 regcomp.c            CHECK_NULL_RETURN_VAL(root, ONIGERR_MEMORY);
ONIGERR_MEMORY   3038 regcomp.c            CHECK_NULL_RETURN_VAL(*tailp, ONIGERR_MEMORY);
ONIGERR_MEMORY   3323 regcomp.c            if (IS_NULL(*int_skip)) return ONIGERR_MEMORY;
ONIGERR_MEMORY   4307 regcomp.c          CHECK_NULL_RETURN_VAL(reg->exact, ONIGERR_MEMORY);
ONIGERR_MEMORY   4316 regcomp.c          CHECK_NULL_RETURN_VAL(reg->exact, ONIGERR_MEMORY);
ONIGERR_MEMORY   4716 regcomp.c        return ONIGERR_MEMORY;
ONIGERR_MEMORY   4910 regcomp.c        if (IS_NULL(*reg)) return ONIGERR_MEMORY;
ONIGERR_MEMORY     47 regerror.c       case ONIGERR_MEMORY:
ONIGERR_MEMORY    108 regexec.c          CHECK_NULL_RETURN_VAL(parent->childs, ONIGERR_MEMORY);
ONIGERR_MEMORY    176 regexec.c            return ONIGERR_MEMORY;
ONIGERR_MEMORY    185 regexec.c            return ONIGERR_MEMORY;
ONIGERR_MEMORY    433 regexec.c            return ONIGERR_MEMORY;
ONIGERR_MEMORY    449 regexec.c            return ONIGERR_MEMORY;
ONIGERR_MEMORY    964 regexec.c              CHECK_NULL_RETURN_VAL(child, ONIGERR_MEMORY);
ONIGERR_MEMORY   1325 regexec.c                      CHECK_NULL_RETURN_VAL(node, ONIGERR_MEMORY);
ONIGERR_MEMORY   2839 regexec.c          if (IS_NULL(*skip)) return ONIGERR_MEMORY;
ONIGERR_MEMORY    435 regint.h         if (IS_NULL((buf)->p)) return(ONIGERR_MEMORY);\
ONIGERR_MEMORY    441 regint.h         if (IS_NULL((buf)->p)) return(ONIGERR_MEMORY);\
ONIGERR_MEMORY    449 regint.h           if (IS_NULL((buf)->p)) return(ONIGERR_MEMORY);\
ONIGERR_MEMORY    101 regparse.c       CHECK_NULL_RETURN_VAL(to, ONIGERR_MEMORY);
ONIGERR_MEMORY    722 regparse.c         CHECK_NULL_RETURN_VAL(e, ONIGERR_MEMORY);
ONIGERR_MEMORY    725 regparse.c         if (IS_NULL(e->name)) return ONIGERR_MEMORY;
ONIGERR_MEMORY    739 regparse.c           CHECK_NULL_RETURN_VAL(t, ONIGERR_MEMORY);
ONIGERR_MEMORY    747 regparse.c     	return ONIGERR_MEMORY;
ONIGERR_MEMORY    758 regparse.c           CHECK_NULL_RETURN_VAL(t->e, ONIGERR_MEMORY);
ONIGERR_MEMORY    792 regparse.c           CHECK_NULL_RETURN_VAL(e->back_refs, ONIGERR_MEMORY);
ONIGERR_MEMORY    801 regparse.c     	CHECK_NULL_RETURN_VAL(e->back_refs, ONIGERR_MEMORY);
ONIGERR_MEMORY    933 regparse.c           CHECK_NULL_RETURN_VAL(p, ONIGERR_MEMORY);
ONIGERR_MEMORY   1356 regparse.c     	CHECK_NULL_RETURN_VAL(p, ONIGERR_MEMORY);
ONIGERR_MEMORY   1578 regparse.c       CHECK_NULL_RETURN_VAL(*pbuf, ONIGERR_MEMORY);
ONIGERR_MEMORY   3762 regparse.c       CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
ONIGERR_MEMORY   3943 regparse.c       CHECK_NULL_RETURN_VAL(node, ONIGERR_MEMORY);
ONIGERR_MEMORY   4307 regparse.c     	CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
ONIGERR_MEMORY   4331 regparse.c     	CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
ONIGERR_MEMORY   4394 regparse.c     	    CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
ONIGERR_MEMORY   4408 regparse.c     	    CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
ONIGERR_MEMORY   4430 regparse.c         CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
ONIGERR_MEMORY   4436 regparse.c       CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
ONIGERR_MEMORY   4582 regparse.c                     CHECK_NULL_RETURN_VAL(snode, ONIGERR_MEMORY);
ONIGERR_MEMORY   4591 regparse.c                 CHECK_NULL_RETURN_VAL(*ptail, ONIGERR_MEMORY);
ONIGERR_MEMORY   4728 regparse.c           CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
ONIGERR_MEMORY   4749 regparse.c           CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
ONIGERR_MEMORY   4780 regparse.c           CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
ONIGERR_MEMORY   4797 regparse.c           CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
ONIGERR_MEMORY   4808 regparse.c     	CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
ONIGERR_MEMORY   4843 regparse.c                     return ONIGERR_MEMORY;
ONIGERR_MEMORY   4857 regparse.c                   return ONIGERR_MEMORY;
ONIGERR_MEMORY   4871 regparse.c                 CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
ONIGERR_MEMORY   4948 regparse.c                 return ONIGERR_MEMORY;
ONIGERR_MEMORY   4958 regparse.c         CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
ONIGERR_MEMORY   4963 regparse.c         CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
ONIGERR_MEMORY   4965 regparse.c         CHECK_NULL_RETURN_VAL(qn, ONIGERR_MEMORY);
ONIGERR_MEMORY   4975 regparse.c         CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
ONIGERR_MEMORY   4981 regparse.c         CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
ONIGERR_MEMORY   5022 regparse.c           CHECK_NULL_RETURN_VAL(qn, ONIGERR_MEMORY);
ONIGERR_MEMORY   5030 regparse.c     	CHECK_NULL_RETURN_VAL(en, ONIGERR_MEMORY);
ONIGERR_MEMORY   5042 regparse.c     	CHECK_NULL_RETURN_VAL(*targetp, ONIGERR_MEMORY);
ONIGERR_MEMORY   5044 regparse.c     	CHECK_NULL_RETURN_VAL(tmp, ONIGERR_MEMORY);


ONIGERR_META_CODE_SYNTAX

ONIGERR_META_CODE_SYNTAX   81 regerror.c       case ONIGERR_META_CODE_SYNTAX:
ONIGERR_META_CODE_SYNTAX 2332 regparse.c           if (c != '-') return ONIGERR_META_CODE_SYNTAX;


ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE

ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE  119 regerror.c       case ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE:
ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE 3861 regparse.c     	return ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE;


ONIGERR_MULTIPLEX_DEFINED_NAME

ONIGERR_MULTIPLEX_DEFINED_NAME  155 regerror.c       case ONIGERR_MULTIPLEX_DEFINED_NAME:
ONIGERR_MULTIPLEX_DEFINED_NAME  194 regerror.c       case ONIGERR_MULTIPLEX_DEFINED_NAME:
ONIGERR_MULTIPLEX_DEFINED_NAME  779 regparse.c         onig_scan_env_set_error_string(env, ONIGERR_MULTIPLEX_DEFINED_NAME,
ONIGERR_MULTIPLEX_DEFINED_NAME  781 regparse.c         return ONIGERR_MULTIPLEX_DEFINED_NAME;


ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL

ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL 2805 regcomp.c      	       ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL, cn->name, cn->name_end);
ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL 2806 regcomp.c      	return ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL;
ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL  157 regerror.c       case ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL:
ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL  195 regerror.c       case ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL:


ONIGERR_NEVER_ENDING_RECURSION

ONIGERR_NEVER_ENDING_RECURSION 2598 regcomp.c      	if (r > 0) return ONIGERR_NEVER_ENDING_RECURSION;
ONIGERR_NEVER_ENDING_RECURSION  159 regerror.c       case ONIGERR_NEVER_ENDING_RECURSION:


ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED

ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED 1521 regcomp.c          return ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED;
ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED 1592 regcomp.c            return ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED;
ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED 2792 regcomp.c      	  return ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED;
ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED  133 regerror.c       case ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED:


ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT

ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT 4661 regcomp.c      	return ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT;
ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT  167 regerror.c       case ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT:
ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT 2930 regexec.c      	return ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT;
ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT 3203 regexec.c      	return ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT;


ONIGERR_PARSER_BUG

ONIGERR_PARSER_BUG 1653 regcomp.c          if (! IS_EFFECT_ADDR_FIXED(en)) return ONIGERR_PARSER_BUG;
ONIGERR_PARSER_BUG   53 regerror.c       case ONIGERR_PARSER_BUG:
ONIGERR_PARSER_BUG  843 regparse.c         return ONIGERR_PARSER_BUG;
ONIGERR_PARSER_BUG  953 regparse.c         return ONIGERR_PARSER_BUG;
ONIGERR_PARSER_BUG 3540 regparse.c         return ONIGERR_PARSER_BUG;
ONIGERR_PARSER_BUG 3586 regparse.c         return ONIGERR_PARSER_BUG;
ONIGERR_PARSER_BUG 4174 regparse.c           r = ONIGERR_PARSER_BUG;
ONIGERR_PARSER_BUG 4882 regparse.c     	return ONIGERR_PARSER_BUG;
ONIGERR_PARSER_BUG 5004 regparse.c         return ONIGERR_PARSER_BUG;
ONIGERR_PARSER_BUG 5129 regparse.c           return ONIGERR_PARSER_BUG;


ONIGERR_PREMATURE_END_OF_CHAR_CLASS

ONIGERR_PREMATURE_END_OF_CHAR_CLASS   73 regerror.c       case ONIGERR_PREMATURE_END_OF_CHAR_CLASS:
ONIGERR_PREMATURE_END_OF_CHAR_CLASS 4170 regparse.c           r = ONIGERR_PREMATURE_END_OF_CHAR_CLASS;


ONIGERR_STACK_BUG

ONIGERR_STACK_BUG   55 regerror.c       case ONIGERR_STACK_BUG:
ONIGERR_STACK_BUG 2564 regexec.c        return ONIGERR_STACK_BUG;


ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID

ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID   93 regerror.c       case ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID:
ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID 5018 regparse.c     	return ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID;


ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED

ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED   91 regerror.c       case ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED:
ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED 4994 regparse.c     	return ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED;


ONIGERR_TOO_BIG_NUMBER

ONIGERR_TOO_BIG_NUMBER  111 regerror.c       case ONIGERR_TOO_BIG_NUMBER:
ONIGERR_TOO_BIG_NUMBER 2724 regparse.c     	if (num < 0) return ONIGERR_TOO_BIG_NUMBER;
ONIGERR_TOO_BIG_NUMBER 2740 regparse.c     	if (num < 0) return ONIGERR_TOO_BIG_NUMBER;
ONIGERR_TOO_BIG_NUMBER 2756 regparse.c     	if (num < 0) return ONIGERR_TOO_BIG_NUMBER;
ONIGERR_TOO_BIG_NUMBER 3055 regparse.c     	if (num < 0) return ONIGERR_TOO_BIG_NUMBER;
ONIGERR_TOO_BIG_NUMBER 3071 regparse.c     	if (num < 0) return ONIGERR_TOO_BIG_NUMBER;
ONIGERR_TOO_BIG_NUMBER 3117 regparse.c     	if (num < 0) return ONIGERR_TOO_BIG_NUMBER;


ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE

ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE  113 regerror.c       case ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE:
ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE 2251 regparse.c       if (low < 0) return ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE;
ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE 2253 regparse.c         return ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE;
ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE 2270 regparse.c         if (up < 0) return ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE;
ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE 2272 regparse.c           return ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE;


ONIGERR_TOO_BIG_WIDE_CHAR_VALUE

ONIGERR_TOO_BIG_WIDE_CHAR_VALUE  135 regerror.c       case ONIGERR_TOO_BIG_WIDE_CHAR_VALUE:
ONIGERR_TOO_BIG_WIDE_CHAR_VALUE 2704 regparse.c     	if (num < 0) return ONIGERR_TOO_BIG_WIDE_CHAR_VALUE;
ONIGERR_TOO_BIG_WIDE_CHAR_VALUE 3037 regparse.c     	if (num < 0) return ONIGERR_TOO_BIG_WIDE_CHAR_VALUE;


ONIGERR_TOO_LONG_WIDE_CHAR_VALUE

ONIGERR_TOO_LONG_WIDE_CHAR_VALUE  137 regerror.c       case ONIGERR_TOO_LONG_WIDE_CHAR_VALUE:
ONIGERR_TOO_LONG_WIDE_CHAR_VALUE 2708 regparse.c                 return ONIGERR_TOO_LONG_WIDE_CHAR_VALUE;
ONIGERR_TOO_LONG_WIDE_CHAR_VALUE 3040 regparse.c                 return ONIGERR_TOO_LONG_WIDE_CHAR_VALUE;


ONIGERR_TOO_MANY_MULTI_BYTE_RANGES

ONIGERR_TOO_MANY_MULTI_BYTE_RANGES  121 regerror.c       case ONIGERR_TOO_MANY_MULTI_BYTE_RANGES:
ONIGERR_TOO_MANY_MULTI_BYTE_RANGES 1630 regparse.c         return ONIGERR_TOO_MANY_MULTI_BYTE_RANGES;


ONIGERR_TOO_SHORT_MULTI_BYTE_STRING

ONIGERR_TOO_SHORT_MULTI_BYTE_STRING  123 regerror.c       case ONIGERR_TOO_SHORT_MULTI_BYTE_STRING:
ONIGERR_TOO_SHORT_MULTI_BYTE_STRING 3986 regparse.c     	  r = ONIGERR_TOO_SHORT_MULTI_BYTE_STRING;
ONIGERR_TOO_SHORT_MULTI_BYTE_STRING 3992 regparse.c     	  r = ONIGERR_TOO_SHORT_MULTI_BYTE_STRING;


ONIGERR_TYPE_BUG

ONIGERR_TYPE_BUG  994 regcomp.c          return ONIGERR_TYPE_BUG;
ONIGERR_TYPE_BUG 1097 regcomp.c          return ONIGERR_TYPE_BUG;
ONIGERR_TYPE_BUG 1214 regcomp.c          return ONIGERR_TYPE_BUG;
ONIGERR_TYPE_BUG 1300 regcomp.c          return ONIGERR_TYPE_BUG;
ONIGERR_TYPE_BUG 1368 regcomp.c      	return ONIGERR_TYPE_BUG;
ONIGERR_TYPE_BUG 4291 regcomp.c          r = ONIGERR_TYPE_BUG;
ONIGERR_TYPE_BUG   51 regerror.c       case ONIGERR_TYPE_BUG:


ONIGERR_UNDEFINED_BYTECODE

ONIGERR_UNDEFINED_BYTECODE   57 regerror.c       case ONIGERR_UNDEFINED_BYTECODE:
ONIGERR_UNDEFINED_BYTECODE 2569 regexec.c        return ONIGERR_UNDEFINED_BYTECODE;


ONIGERR_UNDEFINED_GROUP_OPTION

ONIGERR_UNDEFINED_GROUP_OPTION  103 regerror.c       case ONIGERR_UNDEFINED_GROUP_OPTION:
ONIGERR_UNDEFINED_GROUP_OPTION 4315 regparse.c     	return ONIGERR_UNDEFINED_GROUP_OPTION;
ONIGERR_UNDEFINED_GROUP_OPTION 4345 regparse.c     	return ONIGERR_UNDEFINED_GROUP_OPTION;
ONIGERR_UNDEFINED_GROUP_OPTION 4370 regparse.c     	      return ONIGERR_UNDEFINED_GROUP_OPTION;
ONIGERR_UNDEFINED_GROUP_OPTION 4381 regparse.c     	      return ONIGERR_UNDEFINED_GROUP_OPTION;
ONIGERR_UNDEFINED_GROUP_OPTION 4389 regparse.c     	    return ONIGERR_UNDEFINED_GROUP_OPTION;
ONIGERR_UNDEFINED_GROUP_OPTION 4421 regparse.c           return ONIGERR_UNDEFINED_GROUP_OPTION;


ONIGERR_UNDEFINED_GROUP_REFERENCE

ONIGERR_UNDEFINED_GROUP_REFERENCE 2797 regcomp.c      		 ONIGERR_UNDEFINED_GROUP_REFERENCE, cn->name, cn->name_end);
ONIGERR_UNDEFINED_GROUP_REFERENCE 2798 regcomp.c      	  return ONIGERR_UNDEFINED_GROUP_REFERENCE;
ONIGERR_UNDEFINED_GROUP_REFERENCE  153 regerror.c       case ONIGERR_UNDEFINED_GROUP_REFERENCE:
ONIGERR_UNDEFINED_GROUP_REFERENCE  193 regerror.c       case ONIGERR_UNDEFINED_GROUP_REFERENCE:


ONIGERR_UNDEFINED_NAME_REFERENCE

ONIGERR_UNDEFINED_NAME_REFERENCE 2785 regcomp.c      		  ONIGERR_UNDEFINED_NAME_REFERENCE, cn->name, cn->name_end);
ONIGERR_UNDEFINED_NAME_REFERENCE 2786 regcomp.c      	  return ONIGERR_UNDEFINED_NAME_REFERENCE;
ONIGERR_UNDEFINED_NAME_REFERENCE 2814 regcomp.c      		  ONIGERR_UNDEFINED_NAME_REFERENCE, cn->name, cn->name_end);
ONIGERR_UNDEFINED_NAME_REFERENCE 2815 regcomp.c      	  return ONIGERR_UNDEFINED_NAME_REFERENCE;
ONIGERR_UNDEFINED_NAME_REFERENCE  151 regerror.c       case ONIGERR_UNDEFINED_NAME_REFERENCE:
ONIGERR_UNDEFINED_NAME_REFERENCE  192 regerror.c       case ONIGERR_UNDEFINED_NAME_REFERENCE:
ONIGERR_UNDEFINED_NAME_REFERENCE  818 regparse.c       if (IS_NULL(e)) return ONIGERR_UNDEFINED_NAME_REFERENCE;
ONIGERR_UNDEFINED_NAME_REFERENCE 3144 regparse.c     			    ONIGERR_UNDEFINED_NAME_REFERENCE, prev, name_end);
ONIGERR_UNDEFINED_NAME_REFERENCE 3145 regparse.c     	    return ONIGERR_UNDEFINED_NAME_REFERENCE;


ONIGERR_UNEXPECTED_BYTECODE

ONIGERR_UNEXPECTED_BYTECODE   59 regerror.c       case ONIGERR_UNEXPECTED_BYTECODE:
ONIGERR_UNEXPECTED_BYTECODE 2573 regexec.c        return ONIGERR_UNEXPECTED_BYTECODE;


ONIGERR_UNMATCHED_CLOSE_PARENTHESIS

ONIGERR_UNMATCHED_CLOSE_PARENTHESIS   97 regerror.c       case ONIGERR_UNMATCHED_CLOSE_PARENTHESIS:
ONIGERR_UNMATCHED_CLOSE_PARENTHESIS 4718 regparse.c           return ONIGERR_UNMATCHED_CLOSE_PARENTHESIS;


ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS

ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS   89 regerror.c       case ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS:
ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS 4124 regparse.c     	r = ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS;


ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE

ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE  115 regerror.c       case ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE:
ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE 2298 regparse.c         return ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE;


ONIG_CHAR_TABLE_SIZE

ONIG_CHAR_TABLE_SIZE  755 oniguruma.h      unsigned char  map[ONIG_CHAR_TABLE_SIZE]; /* used as BM skip or char-map */
ONIG_CHAR_TABLE_SIZE 3314 regcomp.c        if (len < ONIG_CHAR_TABLE_SIZE) {
ONIG_CHAR_TABLE_SIZE 3315 regcomp.c          for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++) skip[i] = len;
ONIG_CHAR_TABLE_SIZE 3322 regcomp.c            *int_skip = (int* )xmalloc(sizeof(int) * ONIG_CHAR_TABLE_SIZE);
ONIG_CHAR_TABLE_SIZE 3325 regcomp.c          for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++) (*int_skip)[i] = len;
ONIG_CHAR_TABLE_SIZE 3368 regcomp.c        UChar map[ONIG_CHAR_TABLE_SIZE];
ONIG_CHAR_TABLE_SIZE 3845 regcomp.c        for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++) {
ONIG_CHAR_TABLE_SIZE 4353 regcomp.c        for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++)
ONIG_CHAR_TABLE_SIZE 4543 regcomp.c          for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++)
ONIG_CHAR_TABLE_SIZE 4550 regcomp.c            for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++) {
ONIG_CHAR_TABLE_SIZE 4693 regcomp.c          size = sizeof(int) * ONIG_CHAR_TABLE_SIZE;
ONIG_CHAR_TABLE_SIZE 4700 regcomp.c          size = sizeof(int) * ONIG_CHAR_TABLE_SIZE;
ONIG_CHAR_TABLE_SIZE 2838 regexec.c          *skip = (int* )xmalloc(sizeof(int) * ONIG_CHAR_TABLE_SIZE);
ONIG_CHAR_TABLE_SIZE 2843 regexec.c        for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++)


ONIG_DEBUG

ONIG_DEBUG        112 regcomp.c      #ifdef ONIG_DEBUG
ONIG_DEBUG       1448 regcomp.c      #ifdef ONIG_DEBUG
ONIG_DEBUG       4287 regcomp.c      #ifdef ONIG_DEBUG
ONIG_DEBUG       4372 regcomp.c      #ifdef ONIG_DEBUG
ONIG_DEBUG       4447 regcomp.c      #ifdef ONIG_DEBUG
ONIG_DEBUG       4720 regcomp.c      #ifdef ONIG_DEBUG
ONIG_DEBUG       5009 regcomp.c      #ifdef ONIG_DEBUG
ONIG_DEBUG        605 regexec.c      #ifdef ONIG_DEBUG
ONIG_DEBUG       2561 regexec.c      #ifdef ONIG_DEBUG
ONIG_DEBUG       3469 regexec.c      #ifdef ONIG_DEBUG
ONIG_DEBUG       3479 regexec.c      #ifdef ONIG_DEBUG
ONIG_DEBUG         45 regint.h       #ifndef ONIG_DEBUG
ONIG_DEBUG        210 regint.h       #ifdef ONIG_DEBUG
ONIG_DEBUG        766 regint.h       #ifdef ONIG_DEBUG
ONIG_DEBUG        396 regparse.c     #ifdef ONIG_DEBUG
ONIG_DEBUG        575 regparse.c     #ifdef ONIG_DEBUG
ONIG_DEBUG        310 regparse.h     #ifdef ONIG_DEBUG


ONIG_ENCODING_ASCII

ONIG_ENCODING_ASCII  206 re.c           	onigenc_set_default_encoding(ONIG_ENCODING_ASCII);
ONIG_ENCODING_ASCII  226 re.c           	onigenc_set_default_encoding(ONIG_ENCODING_ASCII);
ONIG_ENCODING_ASCII 2114 re.c           	onigenc_set_default_encoding(ONIG_ENCODING_ASCII);
ONIG_ENCODING_ASCII 2213 re.c               onigenc_set_default_encoding(ONIG_ENCODING_ASCII);
ONIG_ENCODING_ASCII   69 regenc.h       #define ONIG_ENCODING_INIT_DEFAULT           ONIG_ENCODING_ASCII
ONIG_ENCODING_ASCII  233 regerror.c         len = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, q);
ONIG_ENCODING_ASCII  261 regerror.c         s = buf + onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, buf);
ONIG_ENCODING_ASCII  284 regerror.c                 blen = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, bs);
ONIG_ENCODING_ASCII  293 regerror.c     	len = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, bs);


ONIG_ENCODING_EUC_JP

ONIG_ENCODING_EUC_JP   65 euc_jp.c         len = enc_len(ONIG_ENCODING_EUC_JP, p);
ONIG_ENCODING_EUC_JP  115 euc_jp.c         if (enc_len(ONIG_ENCODING_EUC_JP, buf) != (p - buf))
ONIG_ENCODING_EUC_JP  140 euc_jp.c           len = enc_len(ONIG_ENCODING_EUC_JP, p);
ONIG_ENCODING_EUC_JP  155 euc_jp.c         return onigenc_mbn_is_mbc_ambiguous(ONIG_ENCODING_EUC_JP, flag, pp, end);
ONIG_ENCODING_EUC_JP  190 euc_jp.c         len = enc_len(ONIG_ENCODING_EUC_JP, p);
ONIG_ENCODING_EUC_JP  209 re.c           	onigenc_set_default_encoding(ONIG_ENCODING_EUC_JP);
ONIG_ENCODING_EUC_JP  229 re.c           	onigenc_set_default_encoding(ONIG_ENCODING_EUC_JP);
ONIG_ENCODING_EUC_JP 2095 re.c           	onigenc_set_default_encoding(ONIG_ENCODING_EUC_JP);
ONIG_ENCODING_EUC_JP 2205 re.c               onigenc_set_default_encoding(ONIG_ENCODING_EUC_JP);


ONIG_ENCODING_SJIS

ONIG_ENCODING_SJIS  212 re.c           	onigenc_set_default_encoding(ONIG_ENCODING_SJIS);
ONIG_ENCODING_SJIS  232 re.c           	onigenc_set_default_encoding(ONIG_ENCODING_SJIS);
ONIG_ENCODING_SJIS 2100 re.c           	onigenc_set_default_encoding(ONIG_ENCODING_SJIS);
ONIG_ENCODING_SJIS 2208 re.c               onigenc_set_default_encoding(ONIG_ENCODING_SJIS);
ONIG_ENCODING_SJIS  101 sjis.c           len = enc_len(ONIG_ENCODING_SJIS, p);
ONIG_ENCODING_SJIS  123 sjis.c           if (enc_len(ONIG_ENCODING_SJIS, buf) != (p - buf))
ONIG_ENCODING_SJIS  147 sjis.c             int len = enc_len(ONIG_ENCODING_SJIS, p);
ONIG_ENCODING_SJIS  163 sjis.c           return onigenc_mbn_is_mbc_ambiguous(ONIG_ENCODING_SJIS, flag, pp, end);
ONIG_ENCODING_SJIS  204 sjis.c           len = enc_len(ONIG_ENCODING_SJIS, p);


ONIG_ENCODING_UNDEF

ONIG_ENCODING_UNDEF  262 oniguruma.h    #define ONIGENC_IS_UNDEF(enc)          ((enc) == ONIG_ENCODING_UNDEF)
ONIG_ENCODING_UNDEF   63 regenc.h       #define ONIG_ENCODING_INIT_DEFAULT            ONIG_ENCODING_UNDEF


ONIG_ENCODING_UTF8

ONIG_ENCODING_UTF8  215 re.c           	onigenc_set_default_encoding(ONIG_ENCODING_UTF8);
ONIG_ENCODING_UTF8  235 re.c           	onigenc_set_default_encoding(ONIG_ENCODING_UTF8);
ONIG_ENCODING_UTF8 2105 re.c           	onigenc_set_default_encoding(ONIG_ENCODING_UTF8);
ONIG_ENCODING_UTF8 2211 re.c               onigenc_set_default_encoding(ONIG_ENCODING_UTF8);
ONIG_ENCODING_UTF8   74 utf8.c           len = enc_len(ONIG_ENCODING_UTF8, p);
ONIG_ENCODING_UTF8  250 utf8.c             len = enc_len(ONIG_ENCODING_UTF8, p);
ONIG_ENCODING_UTF8  283 utf8.c             (*pp) += enc_len(ONIG_ENCODING_UTF8, p);


ONIG_EXTERN

ONIG_EXTERN        66 oniguruma.h    #ifndef ONIG_EXTERN
ONIG_EXTERN        76 oniguruma.h    #ifndef ONIG_EXTERN
ONIG_EXTERN        91 oniguruma.h    ONIG_EXTERN OnigAmbigType OnigDefaultAmbigFlag;
ONIG_EXTERN       174 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingASCII;
ONIG_EXTERN       175 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_1;
ONIG_EXTERN       176 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_2;
ONIG_EXTERN       177 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_3;
ONIG_EXTERN       178 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_4;
ONIG_EXTERN       179 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_5;
ONIG_EXTERN       180 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_6;
ONIG_EXTERN       181 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_7;
ONIG_EXTERN       182 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_8;
ONIG_EXTERN       183 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_9;
ONIG_EXTERN       184 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_10;
ONIG_EXTERN       185 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_11;
ONIG_EXTERN       186 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_13;
ONIG_EXTERN       187 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_14;
ONIG_EXTERN       188 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_15;
ONIG_EXTERN       189 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_16;
ONIG_EXTERN       190 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingUTF8;
ONIG_EXTERN       191 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingUTF16_BE;
ONIG_EXTERN       192 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingUTF16_LE;
ONIG_EXTERN       193 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingUTF32_BE;
ONIG_EXTERN       194 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingUTF32_LE;
ONIG_EXTERN       195 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingEUC_JP;
ONIG_EXTERN       196 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingEUC_TW;
ONIG_EXTERN       197 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingEUC_KR;
ONIG_EXTERN       198 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingEUC_CN;
ONIG_EXTERN       199 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingSJIS;
ONIG_EXTERN       200 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingKOI8;
ONIG_EXTERN       201 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingKOI8_R;
ONIG_EXTERN       202 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingBIG5;
ONIG_EXTERN       333 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       335 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       337 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       339 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       341 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       407 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       414 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       416 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       418 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       420 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       422 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       424 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       426 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       428 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       430 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       432 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       434 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       481 oniguruma.h    ONIG_EXTERN OnigSyntaxType OnigSyntaxPosixBasic;
ONIG_EXTERN       482 oniguruma.h    ONIG_EXTERN OnigSyntaxType OnigSyntaxPosixExtended;
ONIG_EXTERN       483 oniguruma.h    ONIG_EXTERN OnigSyntaxType OnigSyntaxEmacs;
ONIG_EXTERN       484 oniguruma.h    ONIG_EXTERN OnigSyntaxType OnigSyntaxGrep;
ONIG_EXTERN       485 oniguruma.h    ONIG_EXTERN OnigSyntaxType OnigSyntaxGnuRegex;
ONIG_EXTERN       486 oniguruma.h    ONIG_EXTERN OnigSyntaxType OnigSyntaxJava;
ONIG_EXTERN       487 oniguruma.h    ONIG_EXTERN OnigSyntaxType OnigSyntaxPerl;
ONIG_EXTERN       488 oniguruma.h    ONIG_EXTERN OnigSyntaxType OnigSyntaxRuby;
ONIG_EXTERN       501 oniguruma.h    ONIG_EXTERN OnigSyntaxType*   OnigDefaultSyntax;
ONIG_EXTERN       776 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       778 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       780 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       782 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       784 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       786 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       788 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       790 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       792 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       794 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       796 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       798 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       800 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       802 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       804 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       806 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       808 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       810 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       812 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       814 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       816 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       818 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       820 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       822 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       824 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       826 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       828 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       830 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       832 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       834 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       836 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       838 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       840 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       842 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       844 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       846 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       848 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       850 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       852 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       854 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       856 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       858 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       860 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       862 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       864 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       866 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       868 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       870 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN       872 oniguruma.h    ONIG_EXTERN
ONIG_EXTERN        72 regenc.h       ONIG_EXTERN int onigenc_ascii_get_all_pair_ambig_codes P_((OnigAmbigType flag, OnigPairAmbigCodes** acs));
ONIG_EXTERN        73 regenc.h       ONIG_EXTERN int onigenc_nothing_get_all_comp_ambig_codes P_((OnigAmbigType flag, OnigCompAmbigCodes** acs));
ONIG_EXTERN        74 regenc.h       ONIG_EXTERN int onigenc_iso_8859_1_get_all_pair_ambig_codes P_((OnigAmbigType flag, OnigPairAmbigCodes** acs));
ONIG_EXTERN        75 regenc.h       ONIG_EXTERN int onigenc_ess_tsett_get_all_comp_ambig_codes P_((OnigAmbigType flag, OnigCompAmbigCodes** acs));
ONIG_EXTERN        76 regenc.h       ONIG_EXTERN int onigenc_not_support_get_ctype_code_range P_((int ctype, OnigCodePoint* sbr[], OnigCodePoint* mbr[]));
ONIG_EXTERN        77 regenc.h       ONIG_EXTERN int onigenc_is_mbc_newline_0x0a P_((const UChar* p, const UChar* end));
ONIG_EXTERN        80 regenc.h       ONIG_EXTERN int onigenc_ascii_mbc_to_normalize P_((OnigAmbigType flag, const UChar** p, const UChar* end, UChar* lower));
ONIG_EXTERN        81 regenc.h       ONIG_EXTERN int onigenc_ascii_is_mbc_ambiguous P_((OnigAmbigType flag, const UChar** p, const UChar* end));
ONIG_EXTERN        82 regenc.h       ONIG_EXTERN int onigenc_single_byte_mbc_enc_len P_((const UChar* p));
ONIG_EXTERN        83 regenc.h       ONIG_EXTERN OnigCodePoint onigenc_single_byte_mbc_to_code P_((const UChar* p, const UChar* end));
ONIG_EXTERN        84 regenc.h       ONIG_EXTERN int onigenc_single_byte_code_to_mbclen P_((OnigCodePoint code));
ONIG_EXTERN        85 regenc.h       ONIG_EXTERN int onigenc_single_byte_code_to_mbc_first P_((OnigCodePoint code));
ONIG_EXTERN        86 regenc.h       ONIG_EXTERN int onigenc_single_byte_code_to_mbc P_((OnigCodePoint code, UChar *buf));
ONIG_EXTERN        87 regenc.h       ONIG_EXTERN UChar* onigenc_single_byte_left_adjust_char_head P_((const UChar* start, const UChar* s));
ONIG_EXTERN        88 regenc.h       ONIG_EXTERN int onigenc_always_true_is_allowed_reverse_match P_((const UChar* s, const UChar* end));
ONIG_EXTERN        89 regenc.h       ONIG_EXTERN int onigenc_always_false_is_allowed_reverse_match P_((const UChar* s, const UChar* end));
ONIG_EXTERN        92 regenc.h       ONIG_EXTERN OnigCodePoint onigenc_mbn_mbc_to_code P_((OnigEncoding enc, const UChar* p, const UChar* end));
ONIG_EXTERN        93 regenc.h       ONIG_EXTERN int onigenc_mbn_mbc_to_normalize P_((OnigEncoding enc, OnigAmbigType flag, const UChar** p, const UChar* end, UChar* lower));
ONIG_EXTERN        94 regenc.h       ONIG_EXTERN int onigenc_mbn_is_mbc_ambiguous P_((OnigEncoding enc, OnigAmbigType flag, const UChar** p, const UChar* end));
ONIG_EXTERN        95 regenc.h       ONIG_EXTERN int onigenc_mb2_code_to_mbclen P_((OnigCodePoint code));
ONIG_EXTERN        96 regenc.h       ONIG_EXTERN int onigenc_mb2_code_to_mbc_first P_((OnigCodePoint code));
ONIG_EXTERN        97 regenc.h       ONIG_EXTERN int onigenc_mb2_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf));
ONIG_EXTERN        98 regenc.h       ONIG_EXTERN int onigenc_mb2_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, unsigned int ctype));
ONIG_EXTERN        99 regenc.h       ONIG_EXTERN int onigenc_mb4_code_to_mbclen P_((OnigCodePoint code));
ONIG_EXTERN       100 regenc.h       ONIG_EXTERN int onigenc_mb4_code_to_mbc_first P_((OnigCodePoint code));
ONIG_EXTERN       101 regenc.h       ONIG_EXTERN int onigenc_mb4_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf));
ONIG_EXTERN       102 regenc.h       ONIG_EXTERN int onigenc_mb4_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, unsigned int ctype));
ONIG_EXTERN       104 regenc.h       ONIG_EXTERN int onigenc_get_all_fold_match_code_ss_0xdf P_((OnigCodePoint** codes));
ONIG_EXTERN       107 regenc.h       ONIG_EXTERN int onigenc_unicode_is_code_ctype P_((OnigCodePoint code, unsigned int ctype));
ONIG_EXTERN       108 regenc.h       ONIG_EXTERN int onigenc_unicode_get_ctype_code_range P_((int ctype, OnigCodePoint* sbr[], OnigCodePoint* mbr[]));
ONIG_EXTERN       118 regenc.h       ONIG_EXTERN UChar OnigEncISO_8859_1_ToLowerCaseTable[];
ONIG_EXTERN       119 regenc.h       ONIG_EXTERN UChar OnigEncISO_8859_1_ToUpperCaseTable[];
ONIG_EXTERN       120 regenc.h       ONIG_EXTERN unsigned short OnigEnc_Unicode_ISO_8859_1_CtypeTable[];
ONIG_EXTERN       121 regenc.h       ONIG_EXTERN OnigPairAmbigCodes OnigAsciiPairAmbigCodes[];
ONIG_EXTERN       125 regenc.h       ONIG_EXTERN int
ONIG_EXTERN       127 regenc.h       ONIG_EXTERN UChar*
ONIG_EXTERN       133 regenc.h       ONIG_EXTERN OnigEncoding  OnigEncDefaultCharEncoding;
ONIG_EXTERN       134 regenc.h       ONIG_EXTERN const UChar* OnigEncAsciiToLowerCaseTable;
ONIG_EXTERN       135 regenc.h       ONIG_EXTERN const UChar  OnigEncAsciiToUpperCaseTable[];
ONIG_EXTERN       136 regenc.h       ONIG_EXTERN unsigned short OnigEncAsciiCtypeTable[];
ONIG_EXTERN        19 regex.h        ONIG_EXTERN OnigEncoding    OnigEncDefaultCharEncoding;


ONIG_INEFFECTIVE_META_CHAR

ONIG_INEFFECTIVE_META_CHAR   49 ascii.c            , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.'  */
ONIG_INEFFECTIVE_META_CHAR   50 ascii.c            , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*'  */
ONIG_INEFFECTIVE_META_CHAR   51 ascii.c            , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
ONIG_INEFFECTIVE_META_CHAR   52 ascii.c            , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
ONIG_INEFFECTIVE_META_CHAR   53 ascii.c            , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
ONIG_INEFFECTIVE_META_CHAR  214 euc_jp.c           , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.'  */
ONIG_INEFFECTIVE_META_CHAR  215 euc_jp.c           , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*'  */
ONIG_INEFFECTIVE_META_CHAR  216 euc_jp.c           , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
ONIG_INEFFECTIVE_META_CHAR  217 euc_jp.c           , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
ONIG_INEFFECTIVE_META_CHAR  218 euc_jp.c           , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
ONIG_INEFFECTIVE_META_CHAR 3239 regparse.c         if ((c != ONIG_INEFFECTIVE_META_CHAR) &&
ONIG_INEFFECTIVE_META_CHAR  225 sjis.c             , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.'  */
ONIG_INEFFECTIVE_META_CHAR  226 sjis.c             , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*'  */
ONIG_INEFFECTIVE_META_CHAR  227 sjis.c             , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
ONIG_INEFFECTIVE_META_CHAR  228 sjis.c             , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
ONIG_INEFFECTIVE_META_CHAR  229 sjis.c             , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
ONIG_INEFFECTIVE_META_CHAR 3720 utf8.c             , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.'  */
ONIG_INEFFECTIVE_META_CHAR 3721 utf8.c             , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*'  */
ONIG_INEFFECTIVE_META_CHAR 3722 utf8.c             , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
ONIG_INEFFECTIVE_META_CHAR 3723 utf8.c             , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
ONIG_INEFFECTIVE_META_CHAR 3724 utf8.c             , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */


ONIG_INFINITE_DISTANCE

ONIG_INFINITE_DISTANCE  295 oniguruma.h                                     : ONIG_INFINITE_DISTANCE)
ONIG_INFINITE_DISTANCE   83 regcomp.c        if (d1 == ONIG_INFINITE_DISTANCE || d2 == ONIG_INFINITE_DISTANCE)
ONIG_INFINITE_DISTANCE   84 regcomp.c          return ONIG_INFINITE_DISTANCE;
ONIG_INFINITE_DISTANCE   86 regcomp.c          if (d1 <= ONIG_INFINITE_DISTANCE - d2) return d1 + d2;
ONIG_INFINITE_DISTANCE   87 regcomp.c          else return ONIG_INFINITE_DISTANCE;
ONIG_INFINITE_DISTANCE   96 regcomp.c        if (d < ONIG_INFINITE_DISTANCE / m)
ONIG_INFINITE_DISTANCE   99 regcomp.c          return ONIG_INFINITE_DISTANCE;
ONIG_INFINITE_DISTANCE 1914 regcomp.c      	*max = ONIG_INFINITE_DISTANCE;
ONIG_INFINITE_DISTANCE 1932 regcomp.c            *max = ONIG_INFINITE_DISTANCE;
ONIG_INFINITE_DISTANCE 1946 regcomp.c      	    *max = ONIG_INFINITE_DISTANCE;
ONIG_INFINITE_DISTANCE 3426 regcomp.c        if (mm->max == ONIG_INFINITE_DISTANCE) return 0;
ONIG_INFINITE_DISTANCE 4154 regcomp.c      	set_mml(&opt->len, 0, ONIG_INFINITE_DISTANCE);
ONIG_INFINITE_DISTANCE 4177 regcomp.c            set_mml(&opt->len, 0, ONIG_INFINITE_DISTANCE);
ONIG_INFINITE_DISTANCE 4232 regcomp.c      	max = (nopt.len.max > 0 ? ONIG_INFINITE_DISTANCE : 0);
ONIG_INFINITE_DISTANCE 4262 regcomp.c      	  max = ONIG_INFINITE_DISTANCE;
ONIG_INFINITE_DISTANCE 4341 regcomp.c        if (reg->dmin != ONIG_INFINITE_DISTANCE) {
ONIG_INFINITE_DISTANCE 4360 regcomp.c        if (reg->dmin != ONIG_INFINITE_DISTANCE) {
ONIG_INFINITE_DISTANCE 4452 regcomp.c        if (a == ONIG_INFINITE_DISTANCE)
ONIG_INFINITE_DISTANCE 4459 regcomp.c        if (b == ONIG_INFINITE_DISTANCE)
ONIG_INFINITE_DISTANCE 3049 regexec.c            if (reg->dmax != ONIG_INFINITE_DISTANCE) {
ONIG_INFINITE_DISTANCE 3162 regexec.c          if (reg->dmax != ONIG_INFINITE_DISTANCE) {
ONIG_INFINITE_DISTANCE 3350 regexec.c      	if (reg->dmax == ONIG_INFINITE_DISTANCE)
ONIG_INFINITE_DISTANCE 3357 regexec.c            if (reg->dmax != ONIG_INFINITE_DISTANCE &&
ONIG_INFINITE_DISTANCE 3405 regexec.c            if (reg->dmax != ONIG_INFINITE_DISTANCE &&
ONIG_INFINITE_DISTANCE 3430 regexec.c      	  if (reg->dmax == ONIG_INFINITE_DISTANCE)


ONIG_IS_NULL

ONIG_IS_NULL       57 regenc.h       #define ONIG_CHECK_NULL_RETURN(p)          if (ONIG_IS_NULL(p)) return NULL
ONIG_IS_NULL       58 regenc.h       #define ONIG_CHECK_NULL_RETURN_VAL(p,val)  if (ONIG_IS_NULL(p)) return (val)


ONIG_IS_OPTION_ON

ONIG_IS_OPTION_ON 2791 regcomp.c      	    !ONIG_IS_OPTION_ON(env->option, ONIG_OPTION_CAPTURE_GROUP)) {
ONIG_IS_OPTION_ON 4764 regcomp.c            !ONIG_IS_OPTION_ON(reg->options, ONIG_OPTION_CAPTURE_GROUP)) {
ONIG_IS_OPTION_ON 4426 regparse.c         if (ONIG_IS_OPTION_ON(env->option, ONIG_OPTION_DONT_CAPTURE_GROUP))


ONIG_MAX_CAPTURE_HISTORY_GROUP

ONIG_MAX_CAPTURE_HISTORY_GROUP  665 oniguruma.h      ((i) <= ONIG_MAX_CAPTURE_HISTORY_GROUP && (r)->list && (r)->list[i])
ONIG_MAX_CAPTURE_HISTORY_GROUP 1630 regcomp.c        for (i = 1; i <= ONIG_MAX_CAPTURE_HISTORY_GROUP; i++) {
ONIG_MAX_CAPTURE_HISTORY_GROUP  961 regexec.c            if (n <= ONIG_MAX_CAPTURE_HISTORY_GROUP &&
ONIG_MAX_CAPTURE_HISTORY_GROUP 3528 regexec.c        for (i = 0; i <= ONIG_MAX_CAPTURE_HISTORY_GROUP; i++) {


ONIG_MAX_ERROR_MESSAGE_LEN

ONIG_MAX_ERROR_MESSAGE_LEN  603 re.c               char err[ONIG_MAX_ERROR_MESSAGE_LEN];
ONIG_MAX_ERROR_MESSAGE_LEN  821 re.c           	char err[ONIG_MAX_ERROR_MESSAGE_LEN];
ONIG_MAX_ERROR_MESSAGE_LEN  926 re.c           	    char err[ONIG_MAX_ERROR_MESSAGE_LEN];


ONIG_MAX_REPEAT_NUM

ONIG_MAX_REPEAT_NUM 2252 regparse.c       if (low > ONIG_MAX_REPEAT_NUM)
ONIG_MAX_REPEAT_NUM 2271 regparse.c         if (up > ONIG_MAX_REPEAT_NUM)


ONIG_MISMATCH

ONIG_MISMATCH     921 re.c           	if (result == ONIG_MISMATCH) {
ONIG_MISMATCH      43 regerror.c       case ONIG_MISMATCH:
ONIG_MISMATCH    1245 regexec.c        best_len = ONIG_MISMATCH;
ONIG_MISMATCH    1354 regexec.c      	  best_len = ONIG_MISMATCH;
ONIG_MISMATCH    3229 regexec.c        if (r != ONIG_MISMATCH) {\
ONIG_MISMATCH    3453 regexec.c        r = ONIG_MISMATCH;
ONIG_MISMATCH    3470 regexec.c        if (r != ONIG_MISMATCH)
ONIG_MISMATCH    3476 regexec.c        r = ONIG_MISMATCH;
ONIG_MISMATCH    3480 regexec.c        if (r != ONIG_MISMATCH)


ONIG_NO_SUPPORT_CONFIG

ONIG_NO_SUPPORT_CONFIG  290 oniguruma.h            ONIG_NO_SUPPORT_CONFIG
ONIG_NO_SUPPORT_CONFIG  598 regenc.c         return ONIG_NO_SUPPORT_CONFIG;
ONIG_NO_SUPPORT_CONFIG   45 regerror.c       case ONIG_NO_SUPPORT_CONFIG:
ONIG_NO_SUPPORT_CONFIG  863 regparse.c       return ONIG_NO_SUPPORT_CONFIG;
ONIG_NO_SUPPORT_CONFIG  870 regparse.c       return ONIG_NO_SUPPORT_CONFIG;
ONIG_NO_SUPPORT_CONFIG  878 regparse.c       return ONIG_NO_SUPPORT_CONFIG;
ONIG_NO_SUPPORT_CONFIG 3474 regparse.c       else if (r != ONIG_NO_SUPPORT_CONFIG) {


ONIG_NREGION

ONIG_NREGION      168 regexec.c        if (n < ONIG_NREGION)
ONIG_NREGION      169 regexec.c          n = ONIG_NREGION;


ONIG_OPTIMIZE_EXACT

ONIG_OPTIMIZE_EXACT 4334 regcomp.c            reg->optimize = ONIG_OPTIMIZE_EXACT;
ONIG_OPTIMIZE_EXACT 2983 regexec.c        case ONIG_OPTIMIZE_EXACT:
ONIG_OPTIMIZE_EXACT 3097 regexec.c        case ONIG_OPTIMIZE_EXACT:


ONIG_OPTIMIZE_EXACT_BM

ONIG_OPTIMIZE_EXACT_BM 4331 regcomp.c      		       ? ONIG_OPTIMIZE_EXACT_BM : ONIG_OPTIMIZE_EXACT_BM_NOT_REV);
ONIG_OPTIMIZE_EXACT_BM 2991 regexec.c        case ONIG_OPTIMIZE_EXACT_BM:
ONIG_OPTIMIZE_EXACT_BM 3109 regexec.c        case ONIG_OPTIMIZE_EXACT_BM:


ONIG_OPTIMIZE_EXACT_BM_NOT_REV

ONIG_OPTIMIZE_EXACT_BM_NOT_REV 4331 regcomp.c      		       ? ONIG_OPTIMIZE_EXACT_BM : ONIG_OPTIMIZE_EXACT_BM_NOT_REV);
ONIG_OPTIMIZE_EXACT_BM_NOT_REV 2995 regexec.c        case ONIG_OPTIMIZE_EXACT_BM_NOT_REV:
ONIG_OPTIMIZE_EXACT_BM_NOT_REV 3110 regexec.c        case ONIG_OPTIMIZE_EXACT_BM_NOT_REV:


ONIG_OPTIMIZE_EXACT_IC

ONIG_OPTIMIZE_EXACT_IC 4310 regcomp.c          reg->optimize = ONIG_OPTIMIZE_EXACT_IC;
ONIG_OPTIMIZE_EXACT_IC 2986 regexec.c        case ONIG_OPTIMIZE_EXACT_IC:
ONIG_OPTIMIZE_EXACT_IC 3103 regexec.c        case ONIG_OPTIMIZE_EXACT_IC:


ONIG_OPTIMIZE_MAP

ONIG_OPTIMIZE_MAP 4356 regcomp.c        reg->optimize   = ONIG_OPTIMIZE_MAP;
ONIG_OPTIMIZE_MAP 4540 regcomp.c        else if (reg->optimize & ONIG_OPTIMIZE_MAP) {
ONIG_OPTIMIZE_MAP 2999 regexec.c        case ONIG_OPTIMIZE_MAP:
ONIG_OPTIMIZE_MAP 3123 regexec.c        case ONIG_OPTIMIZE_MAP:


ONIG_OPTIMIZE_NONE

ONIG_OPTIMIZE_NONE 4434 regcomp.c        reg->optimize      = ONIG_OPTIMIZE_NONE;
ONIG_OPTIMIZE_NONE 3345 regexec.c          if (reg->optimize != ONIG_OPTIMIZE_NONE) {
ONIG_OPTIMIZE_NONE 3397 regexec.c          if (reg->optimize != ONIG_OPTIMIZE_NONE) {


ONIG_OPTION_CAPTURE_GROUP

ONIG_OPTION_CAPTURE_GROUP  465 oniguruma.h    #define ONIG_OPTION_NOTBOL               (ONIG_OPTION_CAPTURE_GROUP << 1)
ONIG_OPTION_CAPTURE_GROUP 2791 regcomp.c      	    !ONIG_IS_OPTION_ON(env->option, ONIG_OPTION_CAPTURE_GROUP)) {
ONIG_OPTION_CAPTURE_GROUP 4764 regcomp.c            !ONIG_IS_OPTION_ON(reg->options, ONIG_OPTION_CAPTURE_GROUP)) {


ONIG_OPTION_DONT_CAPTURE_GROUP

ONIG_OPTION_DONT_CAPTURE_GROUP  463 oniguruma.h    #define ONIG_OPTION_CAPTURE_GROUP        (ONIG_OPTION_DONT_CAPTURE_GROUP << 1)
ONIG_OPTION_DONT_CAPTURE_GROUP 4426 regparse.c         if (ONIG_IS_OPTION_ON(env->option, ONIG_OPTION_DONT_CAPTURE_GROUP))


ONIG_OPTION_EXTEND

ONIG_OPTION_EXTEND  457 oniguruma.h    #define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
ONIG_OPTION_EXTEND 5001 parse.y        	    options |= ONIG_OPTION_EXTEND;
ONIG_OPTION_EXTEND  328 re.c           	if (RREGEXP(re)->ptr->options & ONIG_OPTION_EXTEND)
ONIG_OPTION_EXTEND  416 re.c               const int embeddable = ONIG_OPTION_MULTILINE|ONIG_OPTION_IGNORECASE|ONIG_OPTION_EXTEND;
ONIG_OPTION_EXTEND  439 re.c           		    options |= ONIG_OPTION_EXTEND;
ONIG_OPTION_EXTEND  456 re.c           		    options &= ~ONIG_OPTION_EXTEND;
ONIG_OPTION_EXTEND  492 re.c               if (options & ONIG_OPTION_EXTEND) rb_str_buf_cat2(str, "x");
ONIG_OPTION_EXTEND  498 re.c           	if (!(options & ONIG_OPTION_EXTEND)) rb_str_buf_cat2(str, "x");
ONIG_OPTION_EXTEND 1868 re.c           	(ONIG_OPTION_IGNORECASE|ONIG_OPTION_MULTILINE|ONIG_OPTION_EXTEND);
ONIG_OPTION_EXTEND 2253 re.c               rb_define_const(rb_cRegexp, "EXTENDED", INT2FIX(ONIG_OPTION_EXTEND));
ONIG_OPTION_EXTEND  374 regint.h       #define IS_EXTEND(option)         ((option) & ONIG_OPTION_EXTEND)
ONIG_OPTION_EXTEND 4363 regparse.c     	  case 'x':  ONOFF(option, ONIG_OPTION_EXTEND,     neg); break;


ONIG_OPTION_FIND_LONGEST

ONIG_OPTION_FIND_LONGEST  460 oniguruma.h    #define ONIG_OPTION_FIND_NOT_EMPTY       (ONIG_OPTION_FIND_LONGEST       << 1)
ONIG_OPTION_FIND_LONGEST  375 regint.h       #define IS_FIND_LONGEST(option)   ((option) & ONIG_OPTION_FIND_LONGEST)
ONIG_OPTION_FIND_LONGEST  379 regint.h                 (ONIG_OPTION_FIND_LONGEST | ONIG_OPTION_FIND_NOT_EMPTY))


ONIG_OPTION_FIND_NOT_EMPTY

ONIG_OPTION_FIND_NOT_EMPTY  461 oniguruma.h    #define ONIG_OPTION_NEGATE_SINGLELINE    (ONIG_OPTION_FIND_NOT_EMPTY     << 1)
ONIG_OPTION_FIND_NOT_EMPTY  376 regint.h       #define IS_FIND_NOT_EMPTY(option) ((option) & ONIG_OPTION_FIND_NOT_EMPTY)
ONIG_OPTION_FIND_NOT_EMPTY  379 regint.h                 (ONIG_OPTION_FIND_LONGEST | ONIG_OPTION_FIND_NOT_EMPTY))


ONIG_OPTION_IGNORECASE

ONIG_OPTION_IGNORECASE  456 oniguruma.h    #define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
ONIG_OPTION_IGNORECASE 4998 parse.y        	    options |= ONIG_OPTION_IGNORECASE;
ONIG_OPTION_IGNORECASE  326 re.c           	if (RREGEXP(re)->ptr->options & ONIG_OPTION_IGNORECASE)
ONIG_OPTION_IGNORECASE  416 re.c               const int embeddable = ONIG_OPTION_MULTILINE|ONIG_OPTION_IGNORECASE|ONIG_OPTION_EXTEND;
ONIG_OPTION_IGNORECASE  436 re.c           		    options |= ONIG_OPTION_IGNORECASE;
ONIG_OPTION_IGNORECASE  453 re.c           		    options &= ~ONIG_OPTION_IGNORECASE;
ONIG_OPTION_IGNORECASE  491 re.c               if (options & ONIG_OPTION_IGNORECASE) rb_str_buf_cat2(str, "i");
ONIG_OPTION_IGNORECASE  497 re.c           	if (!(options & ONIG_OPTION_IGNORECASE)) rb_str_buf_cat2(str, "i");
ONIG_OPTION_IGNORECASE  532 re.c               if (RREGEXP(re)->ptr->options & ONIG_OPTION_IGNORECASE) return Qtrue;
ONIG_OPTION_IGNORECASE  804 re.c           	RREGEXP(re)->ptr->options |= ONIG_OPTION_IGNORECASE;
ONIG_OPTION_IGNORECASE  809 re.c           	RREGEXP(re)->ptr->options &= ~ONIG_OPTION_IGNORECASE;
ONIG_OPTION_IGNORECASE 1336 re.c           	options |= ONIG_OPTION_IGNORECASE;
ONIG_OPTION_IGNORECASE 1682 re.c           	    else if (RTEST(argv[1])) flags = ONIG_OPTION_IGNORECASE;
ONIG_OPTION_IGNORECASE 1868 re.c           	(ONIG_OPTION_IGNORECASE|ONIG_OPTION_MULTILINE|ONIG_OPTION_EXTEND);
ONIG_OPTION_IGNORECASE 2252 re.c               rb_define_const(rb_cRegexp, "IGNORECASE", INT2FIX(ONIG_OPTION_IGNORECASE));
ONIG_OPTION_IGNORECASE  373 regint.h       #define IS_IGNORECASE(option)     ((option) & ONIG_OPTION_IGNORECASE)
ONIG_OPTION_IGNORECASE 4364 regparse.c     	  case 'i':  ONOFF(option, ONIG_OPTION_IGNORECASE, neg); break;


ONIG_OPTION_MULTILINE

ONIG_OPTION_MULTILINE  458 oniguruma.h    #define ONIG_OPTION_SINGLELINE           (ONIG_OPTION_MULTILINE          << 1)
ONIG_OPTION_MULTILINE 5004 parse.y        	    options |= ONIG_OPTION_MULTILINE;
ONIG_OPTION_MULTILINE  324 re.c           	if (RREGEXP(re)->ptr->options & ONIG_OPTION_MULTILINE)
ONIG_OPTION_MULTILINE  416 re.c               const int embeddable = ONIG_OPTION_MULTILINE|ONIG_OPTION_IGNORECASE|ONIG_OPTION_EXTEND;
ONIG_OPTION_MULTILINE  433 re.c           		    options |= ONIG_OPTION_MULTILINE;
ONIG_OPTION_MULTILINE  450 re.c           		    options &= ~ONIG_OPTION_MULTILINE;
ONIG_OPTION_MULTILINE  490 re.c               if (options & ONIG_OPTION_MULTILINE) rb_str_buf_cat2(str, "m");
ONIG_OPTION_MULTILINE  496 re.c           	if (!(options & ONIG_OPTION_MULTILINE)) rb_str_buf_cat2(str, "m");
ONIG_OPTION_MULTILINE 1868 re.c           	(ONIG_OPTION_IGNORECASE|ONIG_OPTION_MULTILINE|ONIG_OPTION_EXTEND);
ONIG_OPTION_MULTILINE 2254 re.c               rb_define_const(rb_cRegexp, "MULTILINE", INT2FIX(ONIG_OPTION_MULTILINE));
ONIG_OPTION_MULTILINE  372 regint.h       #define IS_MULTILINE(option)      ((option) & ONIG_OPTION_MULTILINE)
ONIG_OPTION_MULTILINE 4367 regparse.c     	      ONOFF(option, ONIG_OPTION_MULTILINE,  neg);
ONIG_OPTION_MULTILINE 4378 regparse.c     	      ONOFF(option, ONIG_OPTION_MULTILINE,  neg);
ONIG_OPTION_MULTILINE 4385 regparse.c     	    ONOFF(option, ONIG_OPTION_MULTILINE|ONIG_OPTION_SINGLELINE, neg);


ONIG_OPTION_NEGATE_SINGLELINE

ONIG_OPTION_NEGATE_SINGLELINE  462 oniguruma.h    #define ONIG_OPTION_DONT_CAPTURE_GROUP   (ONIG_OPTION_NEGATE_SINGLELINE  << 1)
ONIG_OPTION_NEGATE_SINGLELINE 4913 regcomp.c        if ((option & ONIG_OPTION_NEGATE_SINGLELINE) != 0) {


ONIG_OPTION_NONE

ONIG_OPTION_NONE  439 ext/strscan/strscan.c                          (UChar* )CURPTR(p), &(p->regs), ONIG_OPTION_NONE);
ONIG_OPTION_NONE  445 ext/strscan/strscan.c                           &(p->regs), ONIG_OPTION_NONE);
ONIG_OPTION_NONE  451 oniguruma.h    #define ONIG_OPTION_DEFAULT            ONIG_OPTION_NONE
ONIG_OPTION_NONE  915 re.c           			 &regs, ONIG_OPTION_NONE);
ONIG_OPTION_NONE 4668 regcomp.c        r = onig_alloc_init(&reg, ONIG_OPTION_NONE, ONIGENC_AMBIGUOUS_MATCH_DEFAULT,
ONIG_OPTION_NONE   56 regparse.c       , ONIG_OPTION_NONE


ONIG_OPTION_NOTBOL

ONIG_OPTION_NOTBOL  466 oniguruma.h    #define ONIG_OPTION_NOTEOL               (ONIG_OPTION_NOTBOL << 1)
ONIG_OPTION_NOTBOL  380 regint.h       #define IS_NOTBOL(option)         ((option) & ONIG_OPTION_NOTBOL)


ONIG_OPTION_NOTEOL

ONIG_OPTION_NOTEOL  467 oniguruma.h    #define ONIG_OPTION_POSIX_REGION         (ONIG_OPTION_NOTEOL << 1)
ONIG_OPTION_NOTEOL  381 regint.h       #define IS_NOTEOL(option)         ((option) & ONIG_OPTION_NOTEOL)


ONIG_OPTION_SINGLELINE

ONIG_OPTION_SINGLELINE  459 oniguruma.h    #define ONIG_OPTION_FIND_LONGEST         (ONIG_OPTION_SINGLELINE         << 1)
ONIG_OPTION_SINGLELINE 4915 regcomp.c          option &= ~ONIG_OPTION_SINGLELINE;
ONIG_OPTION_SINGLELINE  371 regint.h       #define IS_SINGLELINE(option)     ((option) & ONIG_OPTION_SINGLELINE)
ONIG_OPTION_SINGLELINE 4375 regparse.c     	      ONOFF(option, ONIG_OPTION_SINGLELINE, (neg == 0 ? 1 : 0));
ONIG_OPTION_SINGLELINE 4385 regparse.c     	    ONOFF(option, ONIG_OPTION_MULTILINE|ONIG_OPTION_SINGLELINE, neg);


ONIG_REGION_NOTPOS

ONIG_REGION_NOTPOS   50 regexec.c          node->beg = ONIG_REGION_NOTPOS;
ONIG_REGION_NOTPOS   51 regexec.c          node->end = ONIG_REGION_NOTPOS;
ONIG_REGION_NOTPOS   83 regexec.c        node->beg        = ONIG_REGION_NOTPOS;
ONIG_REGION_NOTPOS   84 regexec.c        node->end        = ONIG_REGION_NOTPOS;
ONIG_REGION_NOTPOS  156 regexec.c          region->beg[i] = region->end[i] = ONIG_REGION_NOTPOS;
ONIG_REGION_NOTPOS 1294 regexec.c      		rmt[i].rm_so = rmt[i].rm_eo = ONIG_REGION_NOTPOS;
ONIG_REGION_NOTPOS 1314 regexec.c      		region->beg[i] = region->end[i] = ONIG_REGION_NOTPOS;
ONIG_REGION_NOTPOS  849 regparse.c     	if (region->beg[nums[i]] != ONIG_REGION_NOTPOS)


ONIG_RUBY_M17N

ONIG_RUBY_M17N    273 oniguruma.h    #ifdef ONIG_RUBY_M17N
ONIG_RUBY_M17N    172 regenc.c       #ifndef ONIG_RUBY_M17N
ONIG_RUBY_M17N     61 regenc.h       #ifdef ONIG_RUBY_M17N
ONIG_RUBY_M17N     17 regex.h        #ifndef ONIG_RUBY_M17N


ONIG_STATE

ONIG_STATE       4650 regcomp.c        if (ONIG_STATE(from) >= ONIG_STATE_NORMAL) {
ONIG_STATE       4652 regcomp.c          if (IS_NOT_NULL(from->chain) && ONIG_STATE(reg) == ONIG_STATE_NORMAL) {
ONIG_STATE       4659 regcomp.c          while (ONIG_STATE(from) < ONIG_STATE_NORMAL) {
ONIG_STATE       4888 regcomp.c        if (ONIG_STATE(reg) == ONIG_STATE_NORMAL) {
ONIG_STATE       2919 regexec.c        if (ONIG_STATE(reg) >= ONIG_STATE_NORMAL) {
ONIG_STATE       2921 regexec.c          if (IS_NOT_NULL(reg->chain) && ONIG_STATE(reg) == ONIG_STATE_NORMAL) {
ONIG_STATE       2928 regexec.c          while (ONIG_STATE(reg) < ONIG_STATE_NORMAL) {
ONIG_STATE       3192 regexec.c        if (ONIG_STATE(reg) >= ONIG_STATE_NORMAL) {
ONIG_STATE       3194 regexec.c          if (IS_NOT_NULL(reg->chain) && ONIG_STATE(reg) == ONIG_STATE_NORMAL) {
ONIG_STATE       3201 regexec.c          while (ONIG_STATE(reg) < ONIG_STATE_NORMAL) {


ONIG_STATE_DEC

ONIG_STATE_DEC   4671 regcomp.c          ONIG_STATE_DEC(from);
ONIG_STATE_DEC   4710 regcomp.c        ONIG_STATE_DEC(from);
ONIG_STATE_DEC   4715 regcomp.c        ONIG_STATE_DEC(from);
ONIG_STATE_DEC   1006 regexec.c          ONIG_STATE_DEC(ta->reg);
ONIG_STATE_DEC   2955 regexec.c        ONIG_STATE_DEC(reg);
ONIG_STATE_DEC   3457 regexec.c        ONIG_STATE_DEC(reg);
ONIG_STATE_DEC   3478 regexec.c        ONIG_STATE_DEC(reg);
ONIG_STATE_DEC   3486 regexec.c        ONIG_STATE_DEC(reg);


ONIG_STATE_INC

ONIG_STATE_INC   4651 regcomp.c          ONIG_STATE_INC(from);
ONIG_STATE_INC   4654 regcomp.c            ONIG_STATE_INC(from);
ONIG_STATE_INC   4664 regcomp.c          ONIG_STATE_INC(from);
ONIG_STATE_INC   2920 regexec.c          ONIG_STATE_INC(reg);
ONIG_STATE_INC   2923 regexec.c            ONIG_STATE_INC(reg);
ONIG_STATE_INC   2933 regexec.c          ONIG_STATE_INC(reg);
ONIG_STATE_INC   3193 regexec.c          ONIG_STATE_INC(reg);
ONIG_STATE_INC   3196 regexec.c            ONIG_STATE_INC(reg);
ONIG_STATE_INC   3206 regexec.c          ONIG_STATE_INC(reg);


ONIG_STATE_MODIFY

ONIG_STATE_MODIFY 4593 regcomp.c        (to)->state = ONIG_STATE_MODIFY;\
ONIG_STATE_MODIFY 4631 regcomp.c          reg->state = ONIG_STATE_MODIFY;
ONIG_STATE_MODIFY 4911 regcomp.c        (*reg)->state = ONIG_STATE_MODIFY;


ONIG_STATE_NORMAL

ONIG_STATE_NORMAL 4650 regcomp.c        if (ONIG_STATE(from) >= ONIG_STATE_NORMAL) {
ONIG_STATE_NORMAL 4652 regcomp.c          if (IS_NOT_NULL(from->chain) && ONIG_STATE(reg) == ONIG_STATE_NORMAL) {
ONIG_STATE_NORMAL 4659 regcomp.c          while (ONIG_STATE(from) < ONIG_STATE_NORMAL) {
ONIG_STATE_NORMAL 4677 regcomp.c        reg->state = ONIG_STATE_NORMAL;
ONIG_STATE_NORMAL 4855 regcomp.c        reg->state = ONIG_STATE_NORMAL;
ONIG_STATE_NORMAL 4888 regcomp.c        if (ONIG_STATE(reg) == ONIG_STATE_NORMAL) {
ONIG_STATE_NORMAL 2919 regexec.c        if (ONIG_STATE(reg) >= ONIG_STATE_NORMAL) {
ONIG_STATE_NORMAL 2921 regexec.c          if (IS_NOT_NULL(reg->chain) && ONIG_STATE(reg) == ONIG_STATE_NORMAL) {
ONIG_STATE_NORMAL 2928 regexec.c          while (ONIG_STATE(reg) < ONIG_STATE_NORMAL) {
ONIG_STATE_NORMAL 3192 regexec.c        if (ONIG_STATE(reg) >= ONIG_STATE_NORMAL) {
ONIG_STATE_NORMAL 3194 regexec.c          if (IS_NOT_NULL(reg->chain) && ONIG_STATE(reg) == ONIG_STATE_NORMAL) {
ONIG_STATE_NORMAL 3201 regexec.c          while (ONIG_STATE(reg) < ONIG_STATE_NORMAL) {


ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC

ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC  747 regint.h           ONIG_SYN_BACKSLASH_ESCAPE_IN_CC | ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC )
ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC 4120 regparse.c     	if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC)) {


ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC

ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC 1666 regparse.c         if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC))
ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC 3833 regparse.c     	  if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC))
ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC 3850 regparse.c     	  if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC))


ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV

ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV   49 regparse.c           ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV |
ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV 2256 regparse.c         if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV)) {


ONIG_SYN_ALLOW_INVALID_INTERVAL

ONIG_SYN_ALLOW_INVALID_INTERVAL  746 regint.h           ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS | ONIG_SYN_ALLOW_INVALID_INTERVAL | \
ONIG_SYN_ALLOW_INVALID_INTERVAL 2234 regparse.c       syn_allow = IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_INVALID_INTERVAL);


ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME

ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME   52 regparse.c           ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME |
ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME  778 regparse.c           ! IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME)) {


ONIG_SYN_BACKSLASH_ESCAPE_IN_CC

ONIG_SYN_BACKSLASH_ESCAPE_IN_CC  747 regint.h           ONIG_SYN_BACKSLASH_ESCAPE_IN_CC | ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC )
ONIG_SYN_BACKSLASH_ESCAPE_IN_CC 2514 regparse.c           IS_SYNTAX_BV(env->syntax, ONIG_SYN_BACKSLASH_ESCAPE_IN_CC)) {
ONIG_SYN_BACKSLASH_ESCAPE_IN_CC 2633 regparse.c         if (! IS_SYNTAX_BV(syn, ONIG_SYN_BACKSLASH_ESCAPE_IN_CC))


ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP

ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP 2790 regcomp.c      	    IS_SYNTAX_BV(env->syntax, ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP) &&
ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP 4763 regcomp.c            IS_SYNTAX_BV(scan_env.syntax, ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP) &&
ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP   51 regparse.c           ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP |


ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS

ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS  745 regint.h         ( ONIG_SYN_CONTEXT_INDEP_ANCHORS | ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS | \
ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS 4992 regparse.c         if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS)) {


ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS

ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS  746 regint.h           ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS | ONIG_SYN_ALLOW_INVALID_INTERVAL | \
ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS 4993 regparse.c           if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS))


ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND

ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND 2894 regcomp.c          if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND))
ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND   50 regparse.c           ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND |


ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY

ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY   53 regparse.c           ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY |
ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY 2897 regparse.c     	if (IS_SYNTAX_BV(syn, ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY))
ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY 3304 regparse.c     	if (IS_SYNTAX_BV(syn, ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY))


ONIG_SYN_OP2_CCLASS_SET_OP

ONIG_SYN_OP2_CCLASS_SET_OP   45 regparse.c           ONIG_SYN_OP2_CCLASS_SET_OP | ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL |
ONIG_SYN_OP2_CCLASS_SET_OP 2793 regparse.c           if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_CCLASS_SET_OP)) {
ONIG_SYN_OP2_CCLASS_SET_OP 2802 regparse.c         if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_CCLASS_SET_OP) &&


ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL

ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL   45 regparse.c           ONIG_SYN_OP2_CCLASS_SET_OP | ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL |
ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL 2347 regparse.c         if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL)) {


ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META

ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META   46 regparse.c           ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META | ONIG_SYN_OP2_ESC_V_VTAB |
ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META 2329 regparse.c         if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META)) {


ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR

ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR 3021 regparse.c           if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR)) break;
ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR 3026 regparse.c           if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR)) break;


ONIG_SYN_OP2_ESC_G_SUBEXP_CALL

ONIG_SYN_OP2_ESC_G_SUBEXP_CALL   43 regparse.c           ONIG_SYN_OP2_ESC_G_SUBEXP_CALL |
ONIG_SYN_OP2_ESC_G_SUBEXP_CALL 3175 regparse.c           if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_G_SUBEXP_CALL)) {


ONIG_SYN_OP2_ESC_H_XDIGIT

ONIG_SYN_OP2_ESC_H_XDIGIT   47 regparse.c           ONIG_SYN_OP2_ESC_H_XDIGIT )
ONIG_SYN_OP2_ESC_H_XDIGIT 2667 regparse.c           if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break;
ONIG_SYN_OP2_ESC_H_XDIGIT 2672 regparse.c           if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break;
ONIG_SYN_OP2_ESC_H_XDIGIT 2983 regparse.c           if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break;
ONIG_SYN_OP2_ESC_H_XDIGIT 2989 regparse.c           if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break;


ONIG_SYN_OP2_ESC_K_NAMED_BACKREF

ONIG_SYN_OP2_ESC_K_NAMED_BACKREF   42 regparse.c           ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP | ONIG_SYN_OP2_ESC_K_NAMED_BACKREF |
ONIG_SYN_OP2_ESC_K_NAMED_BACKREF 3132 regparse.c           if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_K_NAMED_BACKREF)) {


ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY

ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY 2681 regparse.c     	  IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY)) {
ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY 3203 regparse.c     	  IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY)) {


ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT

ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT 2686 regparse.c     	if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT)) {
ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT 3208 regparse.c     	if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT)) {


ONIG_SYN_OP2_ESC_U_HEX4

ONIG_SYN_OP2_ESC_U_HEX4 2738 regparse.c           if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_U_HEX4)) {
ONIG_SYN_OP2_ESC_U_HEX4 3069 regparse.c           if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_U_HEX4)) {


ONIG_SYN_OP2_ESC_V_VTAB

ONIG_SYN_OP2_ESC_V_VTAB   46 regparse.c           ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META | ONIG_SYN_OP2_ESC_V_VTAB |
ONIG_SYN_OP2_ESC_V_VTAB 2024 regparse.c           if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ESC_V_VTAB))


ONIG_SYN_OP2_OPTION_PERL

ONIG_SYN_OP2_OPTION_PERL 4366 regparse.c     	    if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_PERL)) {
ONIG_SYN_OP2_OPTION_PERL 4374 regparse.c     	    if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_PERL)) {


ONIG_SYN_OP2_OPTION_RUBY

ONIG_SYN_OP2_OPTION_RUBY   41 regparse.c           ONIG_SYN_OP2_OPTION_RUBY |
ONIG_SYN_OP2_OPTION_RUBY 4377 regparse.c     	    else if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_RUBY)) {


ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT

ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT   44 regparse.c           ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT |
ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT 2876 regparse.c     	    ((IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT) &&


ONIG_SYN_OP2_QMARK_GROUP_EFFECT

ONIG_SYN_OP2_QMARK_GROUP_EFFECT   40 regparse.c       , ( ONIG_SYN_OP2_QMARK_GROUP_EFFECT |
ONIG_SYN_OP2_QMARK_GROUP_EFFECT 3319 regparse.c               IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_QMARK_GROUP_EFFECT)) {
ONIG_SYN_OP2_QMARK_GROUP_EFFECT 4254 regparse.c           IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_GROUP_EFFECT)) {


ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP

ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP   42 regparse.c           ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP | ONIG_SYN_OP2_ESC_K_NAMED_BACKREF |
ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP 4287 regparse.c           else if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP)) {
ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP 4321 regparse.c     	if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP)) {


ONIG_SYN_OP_ASTERISK_ZERO_INF

ONIG_SYN_OP_ASTERISK_ZERO_INF  727 regint.h          ONIG_SYN_OP_BRACKET_CC | ONIG_SYN_OP_ASTERISK_ZERO_INF | \
ONIG_SYN_OP_ASTERISK_ZERO_INF  736 regint.h           ONIG_SYN_OP_ASTERISK_ZERO_INF | ONIG_SYN_OP_PLUS_ONE_INF | \
ONIG_SYN_OP_ASTERISK_ZERO_INF 3266 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ASTERISK_ZERO_INF)) break;


ONIG_SYN_OP_BRACE_INTERVAL

ONIG_SYN_OP_BRACE_INTERVAL  734 regint.h           ONIG_SYN_OP_BRACE_INTERVAL | ONIG_SYN_OP_LPAREN_SUBEXP | \
ONIG_SYN_OP_BRACE_INTERVAL 3299 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_BRACE_INTERVAL)) break;


ONIG_SYN_OP_BRACKET_CC

ONIG_SYN_OP_BRACKET_CC  727 regint.h          ONIG_SYN_OP_BRACKET_CC | ONIG_SYN_OP_ASTERISK_ZERO_INF | \
ONIG_SYN_OP_BRACKET_CC  732 regint.h         ( ONIG_SYN_OP_DOT_ANYCHAR | ONIG_SYN_OP_BRACKET_CC | \
ONIG_SYN_OP_BRACKET_CC 3362 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_BRACKET_CC)) break;


ONIG_SYN_OP_DECIMAL_BACKREF

ONIG_SYN_OP_DECIMAL_BACKREF  726 regint.h          ONIG_SYN_OP_DECIMAL_BACKREF | \
ONIG_SYN_OP_DECIMAL_BACKREF  733 regint.h           ONIG_SYN_OP_POSIX_BRACKET | ONIG_SYN_OP_DECIMAL_BACKREF | \
ONIG_SYN_OP_DECIMAL_BACKREF 3090 regparse.c           if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_DECIMAL_BACKREF) &&


ONIG_SYN_OP_DOT_ANYCHAR

ONIG_SYN_OP_DOT_ANYCHAR  725 regint.h        ( ONIG_SYN_OP_DOT_ANYCHAR | ONIG_SYN_OP_POSIX_BRACKET | \
ONIG_SYN_OP_DOT_ANYCHAR  732 regint.h         ( ONIG_SYN_OP_DOT_ANYCHAR | ONIG_SYN_OP_BRACKET_CC | \
ONIG_SYN_OP_DOT_ANYCHAR 3258 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_DOT_ANYCHAR)) break;


ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR

ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR  738 regint.h           ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR | ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR | \
ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR 2995 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR)) break;
ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR 3002 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR)) break;
ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR 3008 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR)) break;


ONIG_SYN_OP_ESC_BRACE_INTERVAL

ONIG_SYN_OP_ESC_BRACE_INTERVAL 2291 regparse.c       if (IS_SYNTAX_OP(env->syntax, ONIG_SYN_OP_ESC_BRACE_INTERVAL)) {
ONIG_SYN_OP_ESC_BRACE_INTERVAL 2892 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_BRACE_INTERVAL)) break;


ONIG_SYN_OP_ESC_B_WORD_BOUND

ONIG_SYN_OP_ESC_B_WORD_BOUND  740 regint.h           ONIG_SYN_OP_ESC_B_WORD_BOUND | ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END | \
ONIG_SYN_OP_ESC_B_WORD_BOUND 2933 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_B_WORD_BOUND)) break;
ONIG_SYN_OP_ESC_B_WORD_BOUND 2939 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_B_WORD_BOUND)) break;


ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR

ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR  738 regint.h           ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR | ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR | \
ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR 3015 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR)) break;


ONIG_SYN_OP_ESC_CONTROL_CHARS

ONIG_SYN_OP_ESC_CONTROL_CHARS  729 regint.h          ONIG_SYN_OP_ESC_CONTROL_CHARS )
ONIG_SYN_OP_ESC_CONTROL_CHARS   37 regparse.c          ONIG_SYN_OP_ESC_X_BRACE_HEX8 | ONIG_SYN_OP_ESC_CONTROL_CHARS |
ONIG_SYN_OP_ESC_CONTROL_CHARS 2014 regparse.c       if (IS_SYNTAX_OP(env->syntax, ONIG_SYN_OP_ESC_CONTROL_CHARS)) {


ONIG_SYN_OP_ESC_C_CONTROL

ONIG_SYN_OP_ESC_C_CONTROL   38 regparse.c          ONIG_SYN_OP_ESC_C_CONTROL )
ONIG_SYN_OP_ESC_C_CONTROL 2357 regparse.c         if (IS_SYNTAX_OP(env->syntax, ONIG_SYN_OP_ESC_C_CONTROL)) {


ONIG_SYN_OP_ESC_D_DIGIT

ONIG_SYN_OP_ESC_D_DIGIT  741 regint.h           ONIG_SYN_OP_ESC_S_WHITE_SPACE | ONIG_SYN_OP_ESC_D_DIGIT | \
ONIG_SYN_OP_ESC_D_DIGIT 2971 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_D_DIGIT)) break;
ONIG_SYN_OP_ESC_D_DIGIT 2977 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_D_DIGIT)) break;


ONIG_SYN_OP_ESC_LPAREN_SUBEXP

ONIG_SYN_OP_ESC_LPAREN_SUBEXP 2911 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_LPAREN_SUBEXP)) break;
ONIG_SYN_OP_ESC_LPAREN_SUBEXP 2916 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_LPAREN_SUBEXP)) break;


ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END

ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END  740 regint.h           ONIG_SYN_OP_ESC_B_WORD_BOUND | ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END | \
ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END   39 regparse.c        & ~ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END )
ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END 2946 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END)) break;
ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END 2952 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END)) break;


ONIG_SYN_OP_ESC_OCTAL3

ONIG_SYN_OP_ESC_OCTAL3   36 regparse.c          ONIG_SYN_OP_ESC_OCTAL3 | ONIG_SYN_OP_ESC_X_HEX2 |
ONIG_SYN_OP_ESC_OCTAL3 2752 regparse.c           if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_OCTAL3)) {
ONIG_SYN_OP_ESC_OCTAL3 3114 regparse.c           if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_OCTAL3)) {


ONIG_SYN_OP_ESC_S_WHITE_SPACE

ONIG_SYN_OP_ESC_S_WHITE_SPACE  741 regint.h           ONIG_SYN_OP_ESC_S_WHITE_SPACE | ONIG_SYN_OP_ESC_D_DIGIT | \
ONIG_SYN_OP_ESC_S_WHITE_SPACE 2959 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_S_WHITE_SPACE)) break;
ONIG_SYN_OP_ESC_S_WHITE_SPACE 2965 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_S_WHITE_SPACE)) break;


ONIG_SYN_OP_ESC_W_WORD

ONIG_SYN_OP_ESC_W_WORD  739 regint.h           ONIG_SYN_OP_ESC_W_WORD | \
ONIG_SYN_OP_ESC_W_WORD 2921 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_W_WORD)) break;
ONIG_SYN_OP_ESC_W_WORD 2927 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_W_WORD)) break;


ONIG_SYN_OP_ESC_X_BRACE_HEX8

ONIG_SYN_OP_ESC_X_BRACE_HEX8   37 regparse.c          ONIG_SYN_OP_ESC_X_BRACE_HEX8 | ONIG_SYN_OP_ESC_CONTROL_CHARS |
ONIG_SYN_OP_ESC_X_BRACE_HEX8 2701 regparse.c           if (PPEEK_IS('{') && IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_BRACE_HEX8)) {
ONIG_SYN_OP_ESC_X_BRACE_HEX8 3034 regparse.c           if (PPEEK_IS('{') && IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_BRACE_HEX8)) {


ONIG_SYN_OP_ESC_X_HEX2

ONIG_SYN_OP_ESC_X_HEX2   36 regparse.c          ONIG_SYN_OP_ESC_OCTAL3 | ONIG_SYN_OP_ESC_X_HEX2 |
ONIG_SYN_OP_ESC_X_HEX2 2722 regparse.c           else if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_HEX2)) {
ONIG_SYN_OP_ESC_X_HEX2 3053 regparse.c           else if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_HEX2)) {


ONIG_SYN_OP_LINE_ANCHOR

ONIG_SYN_OP_LINE_ANCHOR  728 regint.h          ONIG_SYN_OP_LINE_ANCHOR | \
ONIG_SYN_OP_LINE_ANCHOR  742 regint.h           ONIG_SYN_OP_LINE_ANCHOR )
ONIG_SYN_OP_LINE_ANCHOR 3348 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_LINE_ANCHOR)) break;
ONIG_SYN_OP_LINE_ANCHOR 3355 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_LINE_ANCHOR)) break;


ONIG_SYN_OP_LPAREN_SUBEXP

ONIG_SYN_OP_LPAREN_SUBEXP  734 regint.h           ONIG_SYN_OP_BRACE_INTERVAL | ONIG_SYN_OP_LPAREN_SUBEXP | \
ONIG_SYN_OP_LPAREN_SUBEXP 3338 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_LPAREN_SUBEXP)) break;
ONIG_SYN_OP_LPAREN_SUBEXP 3343 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_LPAREN_SUBEXP)) break;


ONIG_SYN_OP_PLUS_ONE_INF

ONIG_SYN_OP_PLUS_ONE_INF  736 regint.h           ONIG_SYN_OP_ASTERISK_ZERO_INF | ONIG_SYN_OP_PLUS_ONE_INF | \
ONIG_SYN_OP_PLUS_ONE_INF 3277 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_PLUS_ONE_INF)) break;


ONIG_SYN_OP_POSIX_BRACKET

ONIG_SYN_OP_POSIX_BRACKET  725 regint.h        ( ONIG_SYN_OP_DOT_ANYCHAR | ONIG_SYN_OP_POSIX_BRACKET | \
ONIG_SYN_OP_POSIX_BRACKET  733 regint.h           ONIG_SYN_OP_POSIX_BRACKET | ONIG_SYN_OP_DECIMAL_BACKREF | \
ONIG_SYN_OP_POSIX_BRACKET 2778 regparse.c         if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_POSIX_BRACKET) && (PPEEK_IS(':'))) {


ONIG_SYN_OP_QMARK_NON_GREEDY

ONIG_SYN_OP_QMARK_NON_GREEDY   35 regparse.c       (( SYN_GNU_REGEX_OP | ONIG_SYN_OP_QMARK_NON_GREEDY |
ONIG_SYN_OP_QMARK_NON_GREEDY 2868 regparse.c     	  IS_SYNTAX_OP(syn, ONIG_SYN_OP_QMARK_NON_GREEDY)) {


ONIG_SYN_OP_QMARK_ZERO_ONE

ONIG_SYN_OP_QMARK_ZERO_ONE  737 regint.h           ONIG_SYN_OP_QMARK_ZERO_ONE | \
ONIG_SYN_OP_QMARK_ZERO_ONE 3288 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_QMARK_ZERO_ONE)) break;


ONIG_SYN_OP_VBAR_ALT

ONIG_SYN_OP_VBAR_ALT  735 regint.h           ONIG_SYN_OP_VBAR_ALT | \
ONIG_SYN_OP_VBAR_ALT 3313 regparse.c           if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_VBAR_ALT)) break;


ONIG_SYN_STRICT_CHECK_BACKREF

ONIG_SYN_STRICT_CHECK_BACKREF 3092 regparse.c     	if (IS_SYNTAX_BV(syn, ONIG_SYN_STRICT_CHECK_BACKREF)) {
ONIG_SYN_STRICT_CHECK_BACKREF 3147 regparse.c     	  if (IS_SYNTAX_BV(syn, ONIG_SYN_STRICT_CHECK_BACKREF)) {


ONIG_SYN_WARN_CC_OP_NOT_ESCAPED

ONIG_SYN_WARN_CC_OP_NOT_ESCAPED   54 regparse.c           ONIG_SYN_WARN_CC_OP_NOT_ESCAPED |
ONIG_SYN_WARN_CC_OP_NOT_ESCAPED 2513 regparse.c       if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_WARN_CC_OP_NOT_ESCAPED) &&
ONIG_SYN_WARN_CC_OP_NOT_ESCAPED 2528 regparse.c       if (IS_SYNTAX_BV((env)->syntax, ONIG_SYN_WARN_CC_OP_NOT_ESCAPED)) {


ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT

ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT   55 regparse.c           ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT )
ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT 4496 regparse.c     	  IS_SYNTAX_BV(env->syntax, ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT)) {


ONOFF

ONOFF            4363 regparse.c     	  case 'x':  ONOFF(option, ONIG_OPTION_EXTEND,     neg); break;
ONOFF            4364 regparse.c     	  case 'i':  ONOFF(option, ONIG_OPTION_IGNORECASE, neg); break;
ONOFF            4367 regparse.c     	      ONOFF(option, ONIG_OPTION_MULTILINE,  neg);
ONOFF            4375 regparse.c     	      ONOFF(option, ONIG_OPTION_SINGLELINE, (neg == 0 ? 1 : 0));
ONOFF            4378 regparse.c     	      ONOFF(option, ONIG_OPTION_MULTILINE,  neg);
ONOFF            4385 regparse.c     	    ONOFF(option, ONIG_OPTION_MULTILINE|ONIG_OPTION_SINGLELINE, neg);


ON_STR_BEGIN

ON_STR_BEGIN     1848 regexec.c            if (ON_STR_BEGIN(s)) {
ON_STR_BEGIN     1867 regexec.c            if (ON_STR_BEGIN(s)) {
ON_STR_BEGIN     1887 regexec.c      	if (ON_STR_BEGIN(s) || !ONIGENC_IS_MBC_WORD(encode, sprev, end)) {
ON_STR_BEGIN     1896 regexec.c            if (!ON_STR_BEGIN(s) && ONIGENC_IS_MBC_WORD(encode, sprev, end)) {
ON_STR_BEGIN     1907 regexec.c            if (! ON_STR_BEGIN(s)) goto fail;
ON_STR_BEGIN     1921 regexec.c            if (ON_STR_BEGIN(s)) {
ON_STR_BEGIN     3017 regexec.c      	if (!ON_STR_BEGIN(p)) {
ON_STR_BEGIN     3134 regexec.c      	if (!ON_STR_BEGIN(p)) {


ON_STR_END

ON_STR_END       1853 regexec.c            else if (ON_STR_END(s)) {
ON_STR_END       1871 regexec.c            else if (ON_STR_END(s)) {
ON_STR_END       1897 regexec.c      	if (ON_STR_END(s) || !ONIGENC_IS_MBC_WORD(encode, s, end)) {
ON_STR_END       1914 regexec.c            if (! ON_STR_END(s)) goto fail;
ON_STR_END       1926 regexec.c            else if (ONIGENC_IS_MBC_NEWLINE(encode, sprev, end) && !ON_STR_END(s)) {
ON_STR_END       1934 regexec.c            if (ON_STR_END(s)) {
ON_STR_END       1953 regexec.c            if (ON_STR_END(s)) {
ON_STR_END       1965 regexec.c      	       ON_STR_END(s + enc_len(encode, s))) {
ON_STR_END       3026 regexec.c      	if (ON_STR_END(p)) {
ON_STR_END       3144 regexec.c      	if (ON_STR_END(p)) {


OPENSSL_CONF

OPENSSL_CONF      294 ext/openssl/openssl_missing.c     len += strlen(OPENSSL_CONF);
OPENSSL_CONF      301 ext/openssl/openssl_missing.c     strcat(file,OPENSSL_CONF);


OPENSSL_cleanse

OPENSSL_cleanse   211 ext/openssl/ossl_cipher.c     OPENSSL_cleanse(key, sizeof key);
OPENSSL_cleanse   212 ext/openssl/ossl_cipher.c     OPENSSL_cleanse(iv, sizeof iv);


OPT_EXACT_MAXLEN

OPT_EXACT_MAXLEN 3360 regcomp.c        UChar s[OPT_EXACT_MAXLEN];
OPT_EXACT_MAXLEN 3586 regcomp.c        return (ex->len >= OPT_EXACT_MAXLEN ? 1 : 0);
OPT_EXACT_MAXLEN 3618 regcomp.c        for (i = to->len, n = 0; n < add->len && i < OPT_EXACT_MAXLEN; i++, n++)
OPT_EXACT_MAXLEN 3636 regcomp.c        for (i = to->len, p = s; p < end && i < OPT_EXACT_MAXLEN; ) {
OPT_EXACT_MAXLEN 3642 regcomp.c            if (i + len > OPT_EXACT_MAXLEN) break;


OR

OR                281 missing/crypt.c 	OR (d,d0,d1,(p)[(1<<CHUNKBITS)+(cpp)[1]]);		\
OR                282 missing/crypt.c 	OR (d,d0,d1,(p)[(2<<CHUNKBITS)+(cpp)[2]]);		\
OR                283 missing/crypt.c 	OR (d,d0,d1,(p)[(3<<CHUNKBITS)+(cpp)[3]]);		\
OR                284 missing/crypt.c 	OR (d,d0,d1,(p)[(4<<CHUNKBITS)+(cpp)[4]]);		\
OR                285 missing/crypt.c 	OR (d,d0,d1,(p)[(5<<CHUNKBITS)+(cpp)[5]]);		\
OR                286 missing/crypt.c 	OR (d,d0,d1,(p)[(6<<CHUNKBITS)+(cpp)[6]]);		\
OR                287 missing/crypt.c 	OR (d,d0,d1,(p)[(7<<CHUNKBITS)+(cpp)[7]]);
OR                290 missing/crypt.c 	OR (d,d0,d1,(p)[(1<<CHUNKBITS)+(cpp)[1]]);		\
OR                291 missing/crypt.c 	OR (d,d0,d1,(p)[(2<<CHUNKBITS)+(cpp)[2]]);		\
OR                292 missing/crypt.c 	OR (d,d0,d1,(p)[(3<<CHUNKBITS)+(cpp)[3]]);
OR                316 missing/crypt.c 		tp = &p[t&0xf]; OR(D,D0,D1,*tp); p += (1<<CHUNKBITS);
OR                317 missing/crypt.c 		tp = &p[t>>4];  OR(D,D0,D1,*tp); p += (1<<CHUNKBITS);


OSSL_ASN1_DEFINE_CLASS

OSSL_ASN1_DEFINE_CLASS 1135 ext/openssl/ossl_asn1.c     OSSL_ASN1_DEFINE_CLASS(Boolean, Primitive);
OSSL_ASN1_DEFINE_CLASS 1136 ext/openssl/ossl_asn1.c     OSSL_ASN1_DEFINE_CLASS(Integer, Primitive);
OSSL_ASN1_DEFINE_CLASS 1137 ext/openssl/ossl_asn1.c     OSSL_ASN1_DEFINE_CLASS(Enumerated, Primitive);
OSSL_ASN1_DEFINE_CLASS 1138 ext/openssl/ossl_asn1.c     OSSL_ASN1_DEFINE_CLASS(BitString, Primitive);
OSSL_ASN1_DEFINE_CLASS 1139 ext/openssl/ossl_asn1.c     OSSL_ASN1_DEFINE_CLASS(OctetString, Primitive);
OSSL_ASN1_DEFINE_CLASS 1140 ext/openssl/ossl_asn1.c     OSSL_ASN1_DEFINE_CLASS(UTF8String, Primitive);
OSSL_ASN1_DEFINE_CLASS 1141 ext/openssl/ossl_asn1.c     OSSL_ASN1_DEFINE_CLASS(NumericString, Primitive);
OSSL_ASN1_DEFINE_CLASS 1142 ext/openssl/ossl_asn1.c     OSSL_ASN1_DEFINE_CLASS(PrintableString, Primitive);
OSSL_ASN1_DEFINE_CLASS 1143 ext/openssl/ossl_asn1.c     OSSL_ASN1_DEFINE_CLASS(T61String, Primitive);
OSSL_ASN1_DEFINE_CLASS 1144 ext/openssl/ossl_asn1.c     OSSL_ASN1_DEFINE_CLASS(VideotexString, Primitive);
OSSL_ASN1_DEFINE_CLASS 1145 ext/openssl/ossl_asn1.c     OSSL_ASN1_DEFINE_CLASS(IA5String, Primitive);
OSSL_ASN1_DEFINE_CLASS 1146 ext/openssl/ossl_asn1.c     OSSL_ASN1_DEFINE_CLASS(GraphicString, Primitive);
OSSL_ASN1_DEFINE_CLASS 1147 ext/openssl/ossl_asn1.c     OSSL_ASN1_DEFINE_CLASS(ISO64String, Primitive);
OSSL_ASN1_DEFINE_CLASS 1148 ext/openssl/ossl_asn1.c     OSSL_ASN1_DEFINE_CLASS(GeneralString, Primitive);
OSSL_ASN1_DEFINE_CLASS 1149 ext/openssl/ossl_asn1.c     OSSL_ASN1_DEFINE_CLASS(UniversalString, Primitive);
OSSL_ASN1_DEFINE_CLASS 1150 ext/openssl/ossl_asn1.c     OSSL_ASN1_DEFINE_CLASS(BMPString, Primitive);
OSSL_ASN1_DEFINE_CLASS 1151 ext/openssl/ossl_asn1.c     OSSL_ASN1_DEFINE_CLASS(Null, Primitive);
OSSL_ASN1_DEFINE_CLASS 1152 ext/openssl/ossl_asn1.c     OSSL_ASN1_DEFINE_CLASS(ObjectId, Primitive);
OSSL_ASN1_DEFINE_CLASS 1153 ext/openssl/ossl_asn1.c     OSSL_ASN1_DEFINE_CLASS(UTCTime, Primitive);
OSSL_ASN1_DEFINE_CLASS 1154 ext/openssl/ossl_asn1.c     OSSL_ASN1_DEFINE_CLASS(GeneralizedTime, Primitive);
OSSL_ASN1_DEFINE_CLASS 1156 ext/openssl/ossl_asn1.c     OSSL_ASN1_DEFINE_CLASS(Sequence, Constructive);
OSSL_ASN1_DEFINE_CLASS 1157 ext/openssl/ossl_asn1.c     OSSL_ASN1_DEFINE_CLASS(Set, Constructive);


OSSL_ASN1_IMPL_FACTORY_METHOD

OSSL_ASN1_IMPL_FACTORY_METHOD 1062 ext/openssl/ossl_asn1.c OSSL_ASN1_IMPL_FACTORY_METHOD(Integer)
OSSL_ASN1_IMPL_FACTORY_METHOD 1063 ext/openssl/ossl_asn1.c OSSL_ASN1_IMPL_FACTORY_METHOD(Enumerated)
OSSL_ASN1_IMPL_FACTORY_METHOD 1064 ext/openssl/ossl_asn1.c OSSL_ASN1_IMPL_FACTORY_METHOD(BitString)
OSSL_ASN1_IMPL_FACTORY_METHOD 1065 ext/openssl/ossl_asn1.c OSSL_ASN1_IMPL_FACTORY_METHOD(OctetString)
OSSL_ASN1_IMPL_FACTORY_METHOD 1066 ext/openssl/ossl_asn1.c OSSL_ASN1_IMPL_FACTORY_METHOD(UTF8String)
OSSL_ASN1_IMPL_FACTORY_METHOD 1067 ext/openssl/ossl_asn1.c OSSL_ASN1_IMPL_FACTORY_METHOD(NumericString)
OSSL_ASN1_IMPL_FACTORY_METHOD 1068 ext/openssl/ossl_asn1.c OSSL_ASN1_IMPL_FACTORY_METHOD(PrintableString)
OSSL_ASN1_IMPL_FACTORY_METHOD 1069 ext/openssl/ossl_asn1.c OSSL_ASN1_IMPL_FACTORY_METHOD(T61String)
OSSL_ASN1_IMPL_FACTORY_METHOD 1070 ext/openssl/ossl_asn1.c OSSL_ASN1_IMPL_FACTORY_METHOD(VideotexString)
OSSL_ASN1_IMPL_FACTORY_METHOD 1071 ext/openssl/ossl_asn1.c OSSL_ASN1_IMPL_FACTORY_METHOD(IA5String)
OSSL_ASN1_IMPL_FACTORY_METHOD 1072 ext/openssl/ossl_asn1.c OSSL_ASN1_IMPL_FACTORY_METHOD(GraphicString)
OSSL_ASN1_IMPL_FACTORY_METHOD 1073 ext/openssl/ossl_asn1.c OSSL_ASN1_IMPL_FACTORY_METHOD(ISO64String)
OSSL_ASN1_IMPL_FACTORY_METHOD 1074 ext/openssl/ossl_asn1.c OSSL_ASN1_IMPL_FACTORY_METHOD(GeneralString)
OSSL_ASN1_IMPL_FACTORY_METHOD 1075 ext/openssl/ossl_asn1.c OSSL_ASN1_IMPL_FACTORY_METHOD(UniversalString)
OSSL_ASN1_IMPL_FACTORY_METHOD 1076 ext/openssl/ossl_asn1.c OSSL_ASN1_IMPL_FACTORY_METHOD(BMPString)
OSSL_ASN1_IMPL_FACTORY_METHOD 1077 ext/openssl/ossl_asn1.c OSSL_ASN1_IMPL_FACTORY_METHOD(Null)
OSSL_ASN1_IMPL_FACTORY_METHOD 1078 ext/openssl/ossl_asn1.c OSSL_ASN1_IMPL_FACTORY_METHOD(ObjectId)
OSSL_ASN1_IMPL_FACTORY_METHOD 1079 ext/openssl/ossl_asn1.c OSSL_ASN1_IMPL_FACTORY_METHOD(UTCTime)
OSSL_ASN1_IMPL_FACTORY_METHOD 1080 ext/openssl/ossl_asn1.c OSSL_ASN1_IMPL_FACTORY_METHOD(GeneralizedTime)
OSSL_ASN1_IMPL_FACTORY_METHOD 1081 ext/openssl/ossl_asn1.c OSSL_ASN1_IMPL_FACTORY_METHOD(Sequence)
OSSL_ASN1_IMPL_FACTORY_METHOD 1082 ext/openssl/ossl_asn1.c OSSL_ASN1_IMPL_FACTORY_METHOD(Set)


OSSL_Check_Kind

OSSL_Check_Kind    29 ext/openssl/ossl_bn.c   OSSL_Check_Kind(obj, cBN); \
OSSL_Check_Kind    22 ext/openssl/ossl_cipher.c     OSSL_Check_Kind(obj, cCipher); \
OSSL_Check_Kind    26 ext/openssl/ossl_config.c     OSSL_Check_Kind(obj, cConfig); \
OSSL_Check_Kind    57 ext/openssl/ossl_config.c     OSSL_Check_Kind(obj, cConfig);
OSSL_Check_Kind    20 ext/openssl/ossl_digest.c     OSSL_Check_Kind(obj, cDigest); \
OSSL_Check_Kind    28 ext/openssl/ossl_engine.c     OSSL_Check_Kind(obj, cEngine); \
OSSL_Check_Kind    24 ext/openssl/ossl_hmac.c     OSSL_Check_Kind(obj, cHMAC); \
OSSL_Check_Kind    25 ext/openssl/ossl_ocsp.c     OSSL_Check_Kind(obj, cOCSPReq); \
OSSL_Check_Kind    38 ext/openssl/ossl_ocsp.c     OSSL_Check_Kind(obj, cOCSPRes); \
OSSL_Check_Kind    51 ext/openssl/ossl_ocsp.c     OSSL_Check_Kind(obj, cOCSPBasicRes); \
OSSL_Check_Kind    64 ext/openssl/ossl_ocsp.c     OSSL_Check_Kind(obj, cOCSPCertId); \
OSSL_Check_Kind   465 ext/openssl/ossl_ocsp.c 	    OSSL_Check_Kind(RARRAY(ext)->ptr[i], cX509Ext);
OSSL_Check_Kind    19 ext/openssl/ossl_pkcs12.c     OSSL_Check_Kind(obj, cPKCS12); \
OSSL_Check_Kind    26 ext/openssl/ossl_pkcs7.c     OSSL_Check_Kind(obj, cPKCS7); \
OSSL_Check_Kind    43 ext/openssl/ossl_pkcs7.c     OSSL_Check_Kind(obj, cPKCS7Signer); \
OSSL_Check_Kind    60 ext/openssl/ossl_pkcs7.c     OSSL_Check_Kind(obj, cPKCS7Recipient); \
OSSL_Check_Kind    37 ext/openssl/ossl_pkey.h     OSSL_Check_Kind(obj, cPKey); \
OSSL_Check_Kind   519 ext/openssl/ossl_ssl.c     OSSL_Check_Kind(ctx, cSSLContext);
OSSL_Check_Kind    26 ext/openssl/ossl_x509attr.c     OSSL_Check_Kind(obj, cX509Attr); \
OSSL_Check_Kind    26 ext/openssl/ossl_x509cert.c     OSSL_Check_Kind(obj, cX509Cert); \
OSSL_Check_Kind   561 ext/openssl/ossl_x509cert.c 	OSSL_Check_Kind(RARRAY(ary)->ptr[i], cX509Ext);
OSSL_Check_Kind    26 ext/openssl/ossl_x509crl.c     OSSL_Check_Kind(obj, cX509CRL); \
OSSL_Check_Kind   291 ext/openssl/ossl_x509crl.c 	OSSL_Check_Kind(RARRAY(ary)->ptr[i], cX509Rev);
OSSL_Check_Kind   465 ext/openssl/ossl_x509crl.c 	OSSL_Check_Kind(RARRAY(ary)->ptr[i], cX509Ext);
OSSL_Check_Kind    26 ext/openssl/ossl_x509ext.c     OSSL_Check_Kind(obj, cX509Ext); \
OSSL_Check_Kind    26 ext/openssl/ossl_x509name.c     OSSL_Check_Kind(obj, cX509Name); \
OSSL_Check_Kind    26 ext/openssl/ossl_x509req.c     OSSL_Check_Kind(obj, cX509Req); \
OSSL_Check_Kind   407 ext/openssl/ossl_x509req.c 	OSSL_Check_Kind(RARRAY(ary)->ptr[i], cX509Attr);
OSSL_Check_Kind    26 ext/openssl/ossl_x509revoked.c     OSSL_Check_Kind(obj, cX509Rev); \
OSSL_Check_Kind   179 ext/openssl/ossl_x509revoked.c 	OSSL_Check_Kind(RARRAY(ary)->ptr[i], cX509Ext);
OSSL_Check_Kind    27 ext/openssl/ossl_x509store.c     OSSL_Check_Kind(obj, cX509Store); \
OSSL_Check_Kind    44 ext/openssl/ossl_x509store.c     OSSL_Check_Kind(obj, cX509StoreContext); \
OSSL_Check_Kind   327 ext/openssl/ossl_x509store.c     OSSL_Check_Kind(obj, cX509StoreContext);


OSSL_Debug

OSSL_Debug        102 ext/openssl/ossl.c 	OSSL_Debug("empty sk!");		\
OSSL_Debug        107 ext/openssl/ossl.c 	OSSL_Debug("items in sk < -1???");	\
OSSL_Debug        173 ext/openssl/ossl.h   OSSL_Debug(fmt, ##__VA_ARGS__); \
OSSL_Debug        178 ext/openssl/ossl.h   OSSL_Debug(fmt, ##__VA_ARGS__); \
OSSL_Debug        274 ext/openssl/ossl_config.c 	OSSL_Debug("# of items in section is < 0?!?");
OSSL_Debug        112 ext/openssl/ossl_hmac.c 	OSSL_Debug("Allocating %d mem", HMAC_size(&final));
OSSL_Debug        170 ext/openssl/ossl_ns_spki.c 	OSSL_Debug("Challenge.length <= 0?");
OSSL_Debug        472 ext/openssl/ossl_pkcs7.c 	OSSL_Debug("OpenSSL::PKCS7#get_signer_info == NULL!");
OSSL_Debug        267 ext/openssl/ossl_x509crl.c 	OSSL_Debug("num < 0???");
OSSL_Debug        440 ext/openssl/ossl_x509crl.c 	OSSL_Debug("count < 0???");
OSSL_Debug        215 ext/openssl/ossl_x509name.c 	OSSL_Debug("name entries < 0!");
OSSL_Debug        385 ext/openssl/ossl_x509req.c 	OSSL_Debug("count < 0???");
OSSL_Debug        154 ext/openssl/ossl_x509revoked.c 	OSSL_Debug("count < 0???");
OSSL_Debug        426 ext/openssl/ossl_x509store.c 	OSSL_Debug("certs in chain < 0???");


OSSL_ENGINE_ENABLED

OSSL_ENGINE_ENABLED   13 ext/openssl/ossl_engine.c #if defined(OSSL_ENGINE_ENABLED)
OSSL_ENGINE_ENABLED   24 ext/openssl/ossl_pkey_dh.c #ifdef OSSL_ENGINE_ENABLED


OSSL_ENGINE_LOAD_IF_MATCH

OSSL_ENGINE_LOAD_IF_MATCH   64 ext/openssl/ossl_engine.c     OSSL_ENGINE_LOAD_IF_MATCH(dynamic);
OSSL_ENGINE_LOAD_IF_MATCH   65 ext/openssl/ossl_engine.c     OSSL_ENGINE_LOAD_IF_MATCH(cswift);
OSSL_ENGINE_LOAD_IF_MATCH   66 ext/openssl/ossl_engine.c     OSSL_ENGINE_LOAD_IF_MATCH(chil);
OSSL_ENGINE_LOAD_IF_MATCH   67 ext/openssl/ossl_engine.c     OSSL_ENGINE_LOAD_IF_MATCH(atalla);
OSSL_ENGINE_LOAD_IF_MATCH   68 ext/openssl/ossl_engine.c     OSSL_ENGINE_LOAD_IF_MATCH(nuron);
OSSL_ENGINE_LOAD_IF_MATCH   69 ext/openssl/ossl_engine.c     OSSL_ENGINE_LOAD_IF_MATCH(ubsec);
OSSL_ENGINE_LOAD_IF_MATCH   70 ext/openssl/ossl_engine.c     OSSL_ENGINE_LOAD_IF_MATCH(aep);
OSSL_ENGINE_LOAD_IF_MATCH   71 ext/openssl/ossl_engine.c     OSSL_ENGINE_LOAD_IF_MATCH(sureware);
OSSL_ENGINE_LOAD_IF_MATCH   72 ext/openssl/ossl_engine.c     OSSL_ENGINE_LOAD_IF_MATCH(4758cca);
OSSL_ENGINE_LOAD_IF_MATCH   75 ext/openssl/ossl_engine.c     OSSL_ENGINE_LOAD_IF_MATCH(openbsd_dev_crypto);
OSSL_ENGINE_LOAD_IF_MATCH   77 ext/openssl/ossl_engine.c     OSSL_ENGINE_LOAD_IF_MATCH(openssl);


OSSL_NO_CONF_API

OSSL_NO_CONF_API  149 ext/openssl/ossl_config.c #ifdef OSSL_NO_CONF_API
OSSL_NO_CONF_API  164 ext/openssl/ossl_config.c #ifdef OSSL_NO_CONF_API


OSSL_OCSP_ENABLED

OSSL_OCSP_ENABLED   14 ext/openssl/ossl_ocsp.c #if defined(OSSL_OCSP_ENABLED)
OSSL_OCSP_ENABLED   15 ext/openssl/ossl_ocsp.h #if defined(OSSL_OCSP_ENABLED)


OSSL_PASS_MIN_LENGTH

OSSL_PASS_MIN_LENGTH  331 ext/openssl/openssl_missing.c 	if (j < OSSL_PASS_MIN_LENGTH) {
OSSL_PASS_MIN_LENGTH  334 ext/openssl/openssl_missing.c 		    OSSL_PASS_MIN_LENGTH);


OSSL_PKEY_BN

OSSL_PKEY_BN      347 ext/openssl/ossl_pkey_dh.c OSSL_PKEY_BN(dh, p);
OSSL_PKEY_BN      348 ext/openssl/ossl_pkey_dh.c OSSL_PKEY_BN(dh, g);
OSSL_PKEY_BN      349 ext/openssl/ossl_pkey_dh.c OSSL_PKEY_BN(dh, pub_key);
OSSL_PKEY_BN      350 ext/openssl/ossl_pkey_dh.c OSSL_PKEY_BN(dh, priv_key);
OSSL_PKEY_BN      369 ext/openssl/ossl_pkey_dsa.c OSSL_PKEY_BN(dsa, p);
OSSL_PKEY_BN      370 ext/openssl/ossl_pkey_dsa.c OSSL_PKEY_BN(dsa, q);
OSSL_PKEY_BN      371 ext/openssl/ossl_pkey_dsa.c OSSL_PKEY_BN(dsa, g);
OSSL_PKEY_BN      372 ext/openssl/ossl_pkey_dsa.c OSSL_PKEY_BN(dsa, pub_key);
OSSL_PKEY_BN      373 ext/openssl/ossl_pkey_dsa.c OSSL_PKEY_BN(dsa, priv_key);
OSSL_PKEY_BN      445 ext/openssl/ossl_pkey_rsa.c OSSL_PKEY_BN(rsa, n);
OSSL_PKEY_BN      446 ext/openssl/ossl_pkey_rsa.c OSSL_PKEY_BN(rsa, e);
OSSL_PKEY_BN      447 ext/openssl/ossl_pkey_rsa.c OSSL_PKEY_BN(rsa, d);
OSSL_PKEY_BN      448 ext/openssl/ossl_pkey_rsa.c OSSL_PKEY_BN(rsa, p);
OSSL_PKEY_BN      449 ext/openssl/ossl_pkey_rsa.c OSSL_PKEY_BN(rsa, q);
OSSL_PKEY_BN      450 ext/openssl/ossl_pkey_rsa.c OSSL_PKEY_BN(rsa, dmp1);
OSSL_PKEY_BN      451 ext/openssl/ossl_pkey_rsa.c OSSL_PKEY_BN(rsa, dmq1);
OSSL_PKEY_BN      452 ext/openssl/ossl_pkey_rsa.c OSSL_PKEY_BN(rsa, iqmp);


OSSL_PKEY_IS_PRIVATE

OSSL_PKEY_IS_PRIVATE   23 ext/openssl/ossl_pkey_dsa.c #define DSA_PRIVATE(obj,dsa) (DSA_HAS_PRIVATE(dsa)||OSSL_PKEY_IS_PRIVATE(obj))
OSSL_PKEY_IS_PRIVATE   23 ext/openssl/ossl_pkey_rsa.c #define RSA_PRIVATE(obj,rsa) (RSA_HAS_PRIVATE(rsa)||OSSL_PKEY_IS_PRIVATE(obj))


OSSL_SSL_METHOD_ENTRY

OSSL_SSL_METHOD_ENTRY   97 ext/openssl/ossl_ssl.c     OSSL_SSL_METHOD_ENTRY(TLSv1),
OSSL_SSL_METHOD_ENTRY   98 ext/openssl/ossl_ssl.c     OSSL_SSL_METHOD_ENTRY(TLSv1_server),
OSSL_SSL_METHOD_ENTRY   99 ext/openssl/ossl_ssl.c     OSSL_SSL_METHOD_ENTRY(TLSv1_client),
OSSL_SSL_METHOD_ENTRY  100 ext/openssl/ossl_ssl.c     OSSL_SSL_METHOD_ENTRY(SSLv2),
OSSL_SSL_METHOD_ENTRY  101 ext/openssl/ossl_ssl.c     OSSL_SSL_METHOD_ENTRY(SSLv2_server),
OSSL_SSL_METHOD_ENTRY  102 ext/openssl/ossl_ssl.c     OSSL_SSL_METHOD_ENTRY(SSLv2_client),
OSSL_SSL_METHOD_ENTRY  103 ext/openssl/ossl_ssl.c     OSSL_SSL_METHOD_ENTRY(SSLv3),
OSSL_SSL_METHOD_ENTRY  104 ext/openssl/ossl_ssl.c     OSSL_SSL_METHOD_ENTRY(SSLv3_server),
OSSL_SSL_METHOD_ENTRY  105 ext/openssl/ossl_ssl.c     OSSL_SSL_METHOD_ENTRY(SSLv3_client),
OSSL_SSL_METHOD_ENTRY  106 ext/openssl/ossl_ssl.c     OSSL_SSL_METHOD_ENTRY(SSLv23),
OSSL_SSL_METHOD_ENTRY  107 ext/openssl/ossl_ssl.c     OSSL_SSL_METHOD_ENTRY(SSLv23_server),
OSSL_SSL_METHOD_ENTRY  108 ext/openssl/ossl_ssl.c     OSSL_SSL_METHOD_ENTRY(SSLv23_client),


OSSL_X509ATTR_IS_SINGLE

OSSL_X509ATTR_IS_SINGLE  173 ext/openssl/ossl_x509attr.c 	if(OSSL_X509ATTR_IS_SINGLE(attr)) ASN1_TYPE_free(attr->value.single);
OSSL_X509ATTR_IS_SINGLE  192 ext/openssl/ossl_x509attr.c     if(OSSL_X509ATTR_IS_SINGLE(attr)){


OS_CODE

OS_CODE          1704 ext/zlib/zlib.c #ifndef OS_CODE
OS_CODE          1774 ext/zlib/zlib.c     gz->os_code = OS_CODE;
OS_CODE          3575 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_CODE", INT2FIX(OS_CODE));


OS_UNIX

OS_UNIX          1705 ext/zlib/zlib.c #define OS_CODE  OS_UNIX
OS_UNIX          3579 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_UNIX", INT2FIX(OS_UNIX));


OVERWRITE

OVERWRITE         146 ext/nkf/nkf-utf8/nkf.c #ifdef OVERWRITE
OVERWRITE         674 ext/nkf/nkf-utf8/nkf.c #ifdef OVERWRITE
OVERWRITE         780 ext/nkf/nkf-utf8/nkf.c #ifdef OVERWRITE
OVERWRITE         787 ext/nkf/nkf-utf8/nkf.c #ifdef OVERWRITE
OVERWRITE         862 ext/nkf/nkf-utf8/nkf.c #ifdef OVERWRITE
OVERWRITE         971 ext/nkf/nkf-utf8/nkf.c #ifdef OVERWRITE
OVERWRITE        1029 ext/nkf/nkf-utf8/nkf.c #ifdef OVERWRITE
OVERWRITE        4925 ext/nkf/nkf-utf8/nkf.c #ifdef OVERWRITE


O_ACCMODE

O_ACCMODE         182 ext/fcntl/fcntl.c #ifdef O_ACCMODE
O_ACCMODE         183 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_ACCMODE", INT2FIX(O_ACCMODE));
O_ACCMODE          92 io.c           #ifndef O_ACCMODE
O_ACCMODE        2519 io.c                       flags = (flags & ~O_ACCMODE) | O_RDWR;
O_ACCMODE          83 x68/select.c   	    accmode = _fddb[fd].oflag & O_ACCMODE;


O_APPEND

O_APPEND          164 ext/fcntl/fcntl.c #ifdef O_APPEND
O_APPEND          165 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_APPEND", INT2NUM(O_APPEND));
O_APPEND         2475 io.c               if (mode & O_APPEND) {
O_APPEND         2504 io.c           	flags |= O_WRONLY | O_CREAT | O_APPEND;
O_APPEND         2539 io.c               if (flags & O_APPEND) {
O_APPEND         5433 io.c           	{"", O_APPEND | O_BINARY},
O_APPEND         5638 io.c               rb_file_const("APPEND", INT2FIX(O_APPEND));
O_APPEND         1631 win32/win32.c      if (flags & O_APPEND)


O_BINARY

O_BINARY          125 ext/nkf/nkf-utf8/nkf.c #define setbinmode(fp) setmode(fileno(fp), O_BINARY)
O_BINARY           85 ext/sdbm/_sdbm.c #ifndef O_BINARY
O_BINARY          207 ext/sdbm/_sdbm.c 	flags |= O_BINARY;
O_BINARY         2384 io.c               if (0 <= fptr->fd && setmode(fptr->fd, O_BINARY) == -1)
O_BINARY         2395 io.c           #ifdef O_BINARY
O_BINARY         2481 io.c           #ifdef O_BINARY
O_BINARY         2482 io.c               if (mode & O_BINARY) {
O_BINARY         2514 io.c           #ifdef O_BINARY
O_BINARY         2515 io.c                       flags |= O_BINARY;
O_BINARY         2534 io.c           #ifdef O_BINARY
O_BINARY         2535 io.c           # define MODE_BINARY(a,b) ((flags & O_BINARY) ? (b) : (a))
O_BINARY         3851 io.c           	mode |= O_BINARY;
O_BINARY         3852 io.c           	setmode(fd, O_BINARY);
O_BINARY         5430 io.c           	{"", O_RDONLY | O_BINARY},
O_BINARY         5431 io.c           	{"", O_WRONLY | O_BINARY},
O_BINARY         5432 io.c           	{"", O_RDWR | O_BINARY},
O_BINARY         5433 io.c           	{"", O_APPEND | O_BINARY},
O_BINARY         5652 io.c           #ifdef O_BINARY
O_BINARY         5653 io.c               rb_file_const("BINARY", INT2FIX(O_BINARY));
O_BINARY          709 win32/win32.c      pipemode |= (mode & O_BINARY) ? O_BINARY : O_TEXT;
O_BINARY         2208 win32/win32.c  	    s = rb_w32_open_osfhandle(r, O_RDWR|O_BINARY);
O_BINARY         2503 win32/win32.c  	    fd = rb_w32_open_osfhandle(s, O_RDWR|O_BINARY);
O_BINARY         2724 win32/win32.c      sv[0] = rb_w32_open_osfhandle(pair[0], O_RDWR|O_BINARY);
O_BINARY         2725 win32/win32.c      sv[1] = rb_w32_open_osfhandle(pair[1], O_RDWR|O_BINARY);
O_BINARY          108 win32/win32.h  #define pipe(p)			_pipe(p, 2048L, O_BINARY)


O_CREAT

O_CREAT           130 ext/dbm/dbm.c              dbm = dbm_open(RSTRING(file)->ptr, O_RDWR|O_CREAT, mode);
O_CREAT           776 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "WRCREAT", INT2FIX(O_RDWR|O_CREAT|RUBY_DBM_RW_BIT));
O_CREAT           777 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "NEWDB",   INT2FIX(O_RDWR|O_CREAT|O_TRUNC|RUBY_DBM_RW_BIT));
O_CREAT           152 ext/fcntl/fcntl.c #ifdef O_CREAT
O_CREAT           153 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_CREAT", INT2NUM(O_CREAT));
O_CREAT           810 ext/nkf/nkf-utf8/nkf.c                       fd = open(outfname, O_WRONLY | O_CREAT | O_TRUNC,
O_CREAT           112 ext/sdbm/init.c 	dbm = sdbm_open(RSTRING(file)->ptr, O_RDWR|O_CREAT, mode);
O_CREAT          2478 io.c               if (mode & O_CREAT) {
O_CREAT          2501 io.c           	flags |= O_WRONLY | O_CREAT | O_TRUNC;
O_CREAT          2504 io.c           	flags |= O_WRONLY | O_CREAT | O_APPEND;
O_CREAT          4161 io.c           		    fw = rb_sysopen(fn, O_WRONLY|O_CREAT|O_TRUNC, 0666);
O_CREAT          5639 io.c               rb_file_const("CREAT", INT2FIX(O_CREAT));
O_CREAT           235 util.c             if ((fd = _open(s, O_CREAT, 0666)) >= 0) {


O_EXCL

O_EXCL            155 ext/fcntl/fcntl.c #ifdef O_EXCL
O_EXCL            156 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_EXCL", INT2NUM(O_EXCL));
O_EXCL           5640 io.c               rb_file_const("EXCL", INT2FIX(O_EXCL));


O_NONBLOCK

O_NONBLOCK        167 ext/fcntl/fcntl.c #ifdef O_NONBLOCK
O_NONBLOCK        168 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_NONBLOCK", INT2NUM(O_NONBLOCK));
O_NONBLOCK       1038 ext/socket/socket.c # define NONBLOCKING O_NONBLOCK
O_NONBLOCK        400 io.c           #if defined(HAVE_FCNTL) && defined(F_GETFL) && defined(O_NONBLOCK)
O_NONBLOCK        402 io.c                       !(r & O_NONBLOCK)
O_NONBLOCK       4654 io.c                 if (narg & O_NONBLOCK) {
O_NONBLOCK       5641 io.c           #if defined(O_NDELAY) || defined(O_NONBLOCK)
O_NONBLOCK       5642 io.c           #   ifdef O_NONBLOCK
O_NONBLOCK       5643 io.c               rb_file_const("NONBLOCK", INT2FIX(O_NONBLOCK));
O_NONBLOCK        277 random.c       #ifdef O_NONBLOCK
O_NONBLOCK        278 random.c                   |O_NONBLOCK
O_NONBLOCK       2778 win32/win32.c      if (arg & O_NONBLOCK) {


O_RDONLY

O_RDONLY          367 dln.c              if (file == NULL || (fd = open(file, O_RDONLY)) < 0) {
O_RDONLY          977 dln.c              fd = open(file, O_RDONLY);
O_RDONLY         1094 dln.c              fd = open(file, O_RDONLY);
O_RDONLY          136 ext/dbm/dbm.c              dbm = dbm_open(RSTRING(file)->ptr, O_RDONLY, 0);
O_RDONLY          774 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "READER",  INT2FIX(O_RDONLY|RUBY_DBM_RW_BIT));
O_RDONLY           73 ext/digest/rmd160/rmd160hl.c     if ((fd = open(filename, O_RDONLY)) < 0)
O_RDONLY           76 ext/digest/sha1/sha1hl.c     if ((fd = open(filename,O_RDONLY)) < 0)
O_RDONLY           85 ext/digest/sha2/sha2hl.c 	if ((fd = open(filename, O_RDONLY)) < 0)
O_RDONLY          146 ext/digest/sha2/sha2hl.c 	if ((fd = open(filename, O_RDONLY)) < 0)
O_RDONLY          206 ext/digest/sha2/sha2hl.c 	if ((fd = open(filename, O_RDONLY)) < 0)
O_RDONLY          173 ext/fcntl/fcntl.c #ifdef O_RDONLY
O_RDONLY          174 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_RDONLY", INT2NUM(O_RDONLY));
O_RDONLY          185 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_ACCMODE", INT2FIX(O_RDONLY | O_WRONLY | O_RDWR));
O_RDONLY          249 ext/pty/pty.c  	if ((i = open("/dev/tty", O_RDONLY)) < 0)
O_RDONLY          201 ext/sdbm/_sdbm.c 	if (flags & O_RDONLY)
O_RDONLY          116 ext/sdbm/init.c 	dbm = sdbm_open(RSTRING(file)->ptr, O_RDONLY, 0);
O_RDONLY           93 io.c           #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
O_RDONLY         2463 io.c               switch (mode & (O_RDONLY|O_WRONLY|O_RDWR)) {
O_RDONLY         2464 io.c                 case O_RDONLY:
O_RDONLY         2498 io.c           	flags |= O_RDONLY;
O_RDONLY         2545 io.c               switch (flags & (O_RDONLY|O_WRONLY|O_RDWR)) {
O_RDONLY         2546 io.c                 case O_RDONLY:
O_RDONLY         3131 io.c               if (NIL_P(vmode)) flags = O_RDONLY;
O_RDONLY         3929 io.c           	    flags = O_RDONLY;
O_RDONLY         4117 io.c           		int fr = rb_sysopen(fn, O_RDONLY, 0);
O_RDONLY         4139 io.c           			fr = rb_sysopen(RSTRING(str)->ptr, O_RDONLY, 0);
O_RDONLY         4891 io.c               args[2] = INT2FIX(O_RDONLY);
O_RDONLY         5430 io.c           	{"", O_RDONLY | O_BINARY},
O_RDONLY         5635 io.c               rb_file_const("RDONLY", INT2FIX(O_RDONLY));
O_RDONLY          276 random.c           if ((fd = open("/dev/urandom", O_RDONLY
O_RDONLY           33 x68/select.c   #define isreadable(mode)  ((mode) == O_RDONLY || (mode) == O_RDWR)


O_RDWR

O_RDWR            130 ext/dbm/dbm.c              dbm = dbm_open(RSTRING(file)->ptr, O_RDWR|O_CREAT, mode);
O_RDWR            133 ext/dbm/dbm.c              dbm = dbm_open(RSTRING(file)->ptr, O_RDWR, 0);
O_RDWR            775 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "WRITER",  INT2FIX(O_RDWR|RUBY_DBM_RW_BIT));
O_RDWR            776 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "WRCREAT", INT2FIX(O_RDWR|O_CREAT|RUBY_DBM_RW_BIT));
O_RDWR            777 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "NEWDB",   INT2FIX(O_RDWR|O_CREAT|O_TRUNC|RUBY_DBM_RW_BIT));
O_RDWR            176 ext/fcntl/fcntl.c #ifdef O_RDWR
O_RDWR            177 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_RDWR", INT2NUM(O_RDWR));
O_RDWR            185 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_ACCMODE", INT2FIX(O_RDONLY | O_WRONLY | O_RDWR));
O_RDWR            269 ext/pty/pty.c  	slave = open(SlaveName, O_RDWR);
O_RDWR            329 ext/pty/pty.c      if (!(name = _getpty(master, O_RDWR, 0622, 0))) {
O_RDWR            333 ext/pty/pty.c      *slave = open(name, O_RDWR);
O_RDWR            351 ext/pty/pty.c      if((i = open("/dev/ptmx", O_RDWR, 0)) != -1) {
O_RDWR            357 ext/pty/pty.c  		    if((j = open(pn, O_RDWR, 0)) != -1) {
O_RDWR            383 ext/pty/pty.c  	if ((i = open(MasterName,O_RDWR,0)) >= 0) {
O_RDWR            386 ext/pty/pty.c  	    if ((j = open(SlaveName,O_RDWR,0)) >= 0) {
O_RDWR            200 ext/sdbm/_sdbm.c 		flags = (flags & ~O_WRONLY) | O_RDWR;
O_RDWR            112 ext/sdbm/init.c 	dbm = sdbm_open(RSTRING(file)->ptr, O_RDWR|O_CREAT, mode);
O_RDWR            114 ext/sdbm/init.c 	dbm = sdbm_open(RSTRING(file)->ptr, O_RDWR, 0);
O_RDWR           2965 file.c         	if ((tmpfd = open(StringValueCStr(path), O_RDWR)) < 0) {
O_RDWR             93 io.c           #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
O_RDWR           2463 io.c               switch (mode & (O_RDONLY|O_WRONLY|O_RDWR)) {
O_RDWR           2470 io.c                 case O_RDWR:
O_RDWR           2519 io.c                       flags = (flags & ~O_ACCMODE) | O_RDWR;
O_RDWR           2540 io.c           	if ((flags & O_RDWR) == O_RDWR) {
O_RDWR           2545 io.c               switch (flags & (O_RDONLY|O_WRONLY|O_RDWR)) {
O_RDWR           2550 io.c                 case O_RDWR:
O_RDWR           5432 io.c           	{"", O_RDWR | O_BINARY},
O_RDWR           5637 io.c               rb_file_const("RDWR", INT2FIX(O_RDWR));
O_RDWR           1815 process.c        if ((fd = open("/dev/tty", O_RDWR)) >= 0) {
O_RDWR           2784 process.c          if (!RTEST(noclose) && (n = open("/dev/null", O_RDWR, 0)) != -1) {
O_RDWR            691 win32/win32.c      if (mode & O_RDWR) {
O_RDWR           2208 win32/win32.c  	    s = rb_w32_open_osfhandle(r, O_RDWR|O_BINARY);
O_RDWR           2503 win32/win32.c  	    fd = rb_w32_open_osfhandle(s, O_RDWR|O_BINARY);
O_RDWR           2724 win32/win32.c      sv[0] = rb_w32_open_osfhandle(pair[0], O_RDWR|O_BINARY);
O_RDWR           2725 win32/win32.c      sv[1] = rb_w32_open_osfhandle(pair[1], O_RDWR|O_BINARY);
O_RDWR             33 x68/select.c   #define isreadable(mode)  ((mode) == O_RDONLY || (mode) == O_RDWR)
O_RDWR             34 x68/select.c   #define iswritable(mode)  ((mode) == O_WRONLY || (mode) == O_RDWR)


O_TEXT

O_TEXT           2595 io.c               setmode(fileno(file), O_TEXT);
O_TEXT            709 win32/win32.c      pipemode |= (mode & O_BINARY) ? O_BINARY : O_TEXT;
O_TEXT           1634 win32/win32.c      if (flags & O_TEXT)


O_TRUNC

O_TRUNC           777 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "NEWDB",   INT2FIX(O_RDWR|O_CREAT|O_TRUNC|RUBY_DBM_RW_BIT));
O_TRUNC           161 ext/fcntl/fcntl.c #ifdef O_TRUNC
O_TRUNC           162 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_TRUNC", INT2NUM(O_TRUNC));
O_TRUNC           810 ext/nkf/nkf-utf8/nkf.c                       fd = open(outfname, O_WRONLY | O_CREAT | O_TRUNC,
O_TRUNC           230 ext/stringio/stringio.c 	    trunc = flags & O_TRUNC;
O_TRUNC          2501 io.c           	flags |= O_WRONLY | O_CREAT | O_TRUNC;
O_TRUNC          4161 io.c           		    fw = rb_sysopen(fn, O_WRONLY|O_CREAT|O_TRUNC, 0666);
O_TRUNC          5648 io.c               rb_file_const("TRUNC", INT2FIX(O_TRUNC));


O_WRONLY

O_WRONLY          179 ext/fcntl/fcntl.c #ifdef O_WRONLY
O_WRONLY          180 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_WRONLY", INT2NUM(O_WRONLY));
O_WRONLY          185 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_ACCMODE", INT2FIX(O_RDONLY | O_WRONLY | O_RDWR));
O_WRONLY          810 ext/nkf/nkf-utf8/nkf.c                       fd = open(outfname, O_WRONLY | O_CREAT | O_TRUNC,
O_WRONLY          199 ext/sdbm/_sdbm.c 	if (flags & O_WRONLY)
O_WRONLY          200 ext/sdbm/_sdbm.c 		flags = (flags & ~O_WRONLY) | O_RDWR;
O_WRONLY           93 io.c           #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
O_WRONLY         2463 io.c               switch (mode & (O_RDONLY|O_WRONLY|O_RDWR)) {
O_WRONLY         2467 io.c                 case O_WRONLY:
O_WRONLY         2501 io.c           	flags |= O_WRONLY | O_CREAT | O_TRUNC;
O_WRONLY         2504 io.c           	flags |= O_WRONLY | O_CREAT | O_APPEND;
O_WRONLY         2545 io.c               switch (flags & (O_RDONLY|O_WRONLY|O_RDWR)) {
O_WRONLY         2548 io.c                 case O_WRONLY:
O_WRONLY         4161 io.c           		    fw = rb_sysopen(fn, O_WRONLY|O_CREAT|O_TRUNC, 0666);
O_WRONLY         4899 io.c               args[2] = INT2FIX(O_WRONLY);
O_WRONLY         5431 io.c           	{"", O_WRONLY | O_BINARY},
O_WRONLY         5636 io.c               rb_file_const("WRONLY", INT2FIX(O_WRONLY));
O_WRONLY          699 win32/win32.c      else if (mode & O_WRONLY) {
O_WRONLY           34 x68/select.c   #define iswritable(mode)  ((mode) == O_WRONLY || (mode) == O_RDWR)


One

One              1553 ext/bigdecimal/bigdecimal.c     if(fInf==0.0) fInf = One()/Zero();
One              1561 ext/bigdecimal/bigdecimal.c     if(fInf==0.0) fInf = -(One()/Zero());
One              1569 ext/bigdecimal/bigdecimal.c     if(nzero!=0.0) nzero = (One()/VpGetDoubleNegInf());


OnigAmbigType

OnigAmbigType      91 oniguruma.h    ONIG_EXTERN OnigAmbigType OnigDefaultAmbigFlag;
OnigAmbigType     156 oniguruma.h      OnigAmbigType support_ambig_flag;
OnigAmbigType     162 oniguruma.h      int    (*mbc_to_normalize)(OnigAmbigType flag, const UChar** pp, const UChar* end, UChar* to);
OnigAmbigType     163 oniguruma.h      int    (*is_mbc_ambiguous)(OnigAmbigType flag, const UChar** pp, const UChar* end);
OnigAmbigType     164 oniguruma.h      int    (*get_all_pair_ambig_codes)(OnigAmbigType flag, OnigPairAmbigCodes** acs);
OnigAmbigType     165 oniguruma.h      int    (*get_all_comp_ambig_codes)(OnigAmbigType flag, OnigCompAmbigCodes** acs);
OnigAmbigType     338 oniguruma.h    int onigenc_mbc_to_normalize P_((OnigEncoding enc, OnigAmbigType flag, const UChar** pp, const UChar* end, UChar* buf));
OnigAmbigType     340 oniguruma.h    int onigenc_is_mbc_ambiguous P_((OnigEncoding enc, OnigAmbigType flag, const UChar** pp, const UChar* end));
OnigAmbigType     743 oniguruma.h      OnigAmbigType     ambig_flag;
OnigAmbigType     772 oniguruma.h      OnigAmbigType   ambig_flag;
OnigAmbigType     833 oniguruma.h    OnigAmbigType onig_get_ambig_flag P_((regex_t* reg));
OnigAmbigType     861 oniguruma.h    OnigAmbigType onig_get_default_ambig_flag P_(());
OnigAmbigType     863 oniguruma.h    int onig_set_default_ambig_flag P_((OnigAmbigType ambig_flag));
OnigAmbigType      32 regcomp.c      OnigAmbigType OnigDefaultAmbigFlag =
OnigAmbigType      36 regcomp.c      extern OnigAmbigType
OnigAmbigType    3344 regcomp.c        OnigAmbigType   ambig_flag;
OnigAmbigType    3763 regcomp.c        OnigAmbigType amb;
OnigAmbigType    1211 regexec.c        OnigAmbigType ambig_flag = reg->ambig_flag;
OnigAmbigType    3503 regexec.c      extern  OnigAmbigType
OnigAmbigType    4558 regparse.c       OnigAmbigType amb;
OnigAmbigType    4906 regparse.c             OnigAmbigType amb;
OnigAmbigType     254 regparse.h       OnigAmbigType   ambig_flag;


OnigCaptureTreeNode

OnigCaptureTreeNode  683 oniguruma.h      OnigCaptureTreeNode* history_root;  /* capture history tree root */
OnigCaptureTreeNode  825 oniguruma.h    OnigCaptureTreeNode* onig_get_capture_tree P_((OnigRegion* region));
OnigCaptureTreeNode   47 regexec.c            node->childs[i] = (OnigCaptureTreeNode* )0;
OnigCaptureTreeNode   68 regexec.c          r->history_root = (OnigCaptureTreeNode* )0;
OnigCaptureTreeNode   72 regexec.c      static OnigCaptureTreeNode*
OnigCaptureTreeNode   75 regexec.c        OnigCaptureTreeNode* node;
OnigCaptureTreeNode   77 regexec.c        node = (OnigCaptureTreeNode* )xmalloc(sizeof(OnigCaptureTreeNode));
OnigCaptureTreeNode   79 regexec.c        node->childs     = (OnigCaptureTreeNode** )0;
OnigCaptureTreeNode  100 regexec.c              (OnigCaptureTreeNode** )xmalloc(sizeof(OnigCaptureTreeNode*) * n);
OnigCaptureTreeNode  105 regexec.c              (OnigCaptureTreeNode** )xrealloc(parent->childs,
OnigCaptureTreeNode  106 regexec.c                                               sizeof(OnigCaptureTreeNode*) * n);
OnigCaptureTreeNode  110 regexec.c            parent->childs[i] = (OnigCaptureTreeNode* )0;
OnigCaptureTreeNode  120 regexec.c      static OnigCaptureTreeNode*
OnigCaptureTreeNode  124 regexec.c        OnigCaptureTreeNode *clone, *child;
OnigCaptureTreeNode  135 regexec.c            return (OnigCaptureTreeNode* )0;
OnigCaptureTreeNode  143 regexec.c      extern  OnigCaptureTreeNode*
OnigCaptureTreeNode  226 regexec.c        region->history_root = (OnigCaptureTreeNode* )0;
OnigCaptureTreeNode  955 regexec.c        OnigCaptureTreeNode* child;
OnigCaptureTreeNode 1321 regexec.c                    OnigCaptureTreeNode* node;


OnigCodePoint

OnigCodePoint      48 ascii.c              (OnigCodePoint )'\\'                       /* esc */
OnigCodePoint      49 ascii.c            , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.'  */
OnigCodePoint      50 ascii.c            , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*'  */
OnigCodePoint      51 ascii.c            , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
OnigCodePoint      52 ascii.c            , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
OnigCodePoint      53 ascii.c            , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
OnigCodePoint      59 euc_jp.c       static OnigCodePoint
OnigCodePoint      63 euc_jp.c         OnigCodePoint n;
OnigCodePoint      66 euc_jp.c         n = (OnigCodePoint )*p++;
OnigCodePoint     213 euc_jp.c             (OnigCodePoint )'\\'                       /* esc */
OnigCodePoint     214 euc_jp.c           , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.'  */
OnigCodePoint     215 euc_jp.c           , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*'  */
OnigCodePoint     216 euc_jp.c           , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
OnigCodePoint     217 euc_jp.c           , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
OnigCodePoint     218 euc_jp.c           , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
OnigCodePoint     120 oniguruma.h      OnigCodePoint code[ONIGENC_MAX_COMP_AMBIG_CODE_LEN];
OnigCodePoint     125 oniguruma.h      OnigCodePoint code;
OnigCodePoint     130 oniguruma.h      OnigCodePoint from;
OnigCodePoint     131 oniguruma.h      OnigCodePoint to;
OnigCodePoint     135 oniguruma.h      OnigCodePoint esc;
OnigCodePoint     136 oniguruma.h      OnigCodePoint anychar;
OnigCodePoint     137 oniguruma.h      OnigCodePoint anytime;
OnigCodePoint     138 oniguruma.h      OnigCodePoint zero_or_one_time;
OnigCodePoint     139 oniguruma.h      OnigCodePoint one_or_more_time;
OnigCodePoint     140 oniguruma.h      OnigCodePoint anychar_anytime;
OnigCodePoint     159 oniguruma.h      OnigCodePoint (*mbc_to_code)(const UChar* p, const UChar* end);
OnigCodePoint     160 oniguruma.h      int    (*code_to_mbclen)(OnigCodePoint code);
OnigCodePoint     161 oniguruma.h      int    (*code_to_mbc)(OnigCodePoint code, UChar *buf);
OnigCodePoint     166 oniguruma.h      int    (*is_code_ctype)(OnigCodePoint code, unsigned int ctype);
OnigCodePoint     167 oniguruma.h      int    (*get_ctype_code_range)(int ctype, OnigCodePoint* sb_range[], OnigCodePoint* mb_range[]);
OnigCodePoint     334 oniguruma.h    int onigenc_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, int ctype));
OnigCodePoint     336 oniguruma.h    int onigenc_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf));
OnigCodePoint     857 oniguruma.h    int onig_set_meta_char P_((OnigEncoding enc, unsigned int what, OnigCodePoint code));
OnigCodePoint    2151 regcomp.c        OnigCodePoint code;
OnigCodePoint    3760 regcomp.c        OnigCodePoint code, ccode;
OnigCodePoint    4555 regcomp.c                    ONIGENC_IS_CODE_PRINT(reg->enc, (OnigCodePoint )i))
OnigCodePoint    5155 regcomp.c        OnigCodePoint code;
OnigCodePoint     647 regenc.c       extern OnigCodePoint
OnigCodePoint     650 regenc.c         return (OnigCodePoint )(*p);
OnigCodePoint     690 regenc.c       extern OnigCodePoint
OnigCodePoint     694 regenc.c         OnigCodePoint n;
OnigCodePoint     697 regenc.c         n = (OnigCodePoint )(*p++);
OnigCodePoint      83 regenc.h       ONIG_EXTERN OnigCodePoint onigenc_single_byte_mbc_to_code P_((const UChar* p, const UChar* end));
OnigCodePoint      92 regenc.h       ONIG_EXTERN OnigCodePoint onigenc_mbn_mbc_to_code P_((OnigEncoding enc, const UChar* p, const UChar* end));
OnigCodePoint    1149 regexec.c        OnigCodePoint n, *data;
OnigCodePoint    1150 regexec.c        OnigCodePoint low, high, x;
OnigCodePoint    1153 regexec.c        data = (OnigCodePoint* )p;
OnigCodePoint    1622 regexec.c      	OnigCodePoint code;
OnigCodePoint    1683 regexec.c      	OnigCodePoint code;
OnigCodePoint    1732 regexec.c      	OnigCodePoint code;
OnigCodePoint     647 regint.h       #define SIZE_CODE_POINT    sizeof(OnigCodePoint)
OnigCodePoint     676 regint.h       #define GET_CODE_POINT(code,p)   code = *((OnigCodePoint* )(p))
OnigCodePoint     112 regparse.c       (OnigCodePoint )(ONIGENC_MBC_MINLEN(enc) > 1 ? 0 : 0x80)
OnigCodePoint     115 regparse.c       add_code_range_to_buf(pbuf, MBCODE_START_POS(enc), ~((OnigCodePoint )0))
OnigCodePoint     259 regparse.c     #define PPEEK_IS(c)  (PPEEK == (OnigCodePoint )c)
OnigCodePoint    1482 regparse.c       OnigCodePoint c;
OnigCodePoint    1509 regparse.c       OnigCodePoint c;
OnigCodePoint    1537 regparse.c       OnigCodePoint c;
OnigCodePoint    1574 regparse.c       OnigCodePoint n;
OnigCodePoint    1592 regparse.c       OnigCodePoint n, *data;
OnigCodePoint    1609 regparse.c       data = (OnigCodePoint* )(bbuf->p);
OnigCodePoint    1639 regparse.c       if (inc_n != 0 && (OnigCodePoint )high < n) {
OnigCodePoint    1679 regparse.c       OnigCodePoint pre, from, *data, to = 0;
OnigCodePoint    1687 regparse.c       data = (OnigCodePoint* )(bbuf->p);
OnigCodePoint    1701 regparse.c         if (to == ~((OnigCodePoint )0)) break;
OnigCodePoint    1704 regparse.c       if (to < ~((OnigCodePoint )0)) {
OnigCodePoint    1705 regparse.c         r = add_code_range_to_buf(pbuf, to + 1, ~((OnigCodePoint )0));
OnigCodePoint    1722 regparse.c       OnigCodePoint i, n1, *data1;
OnigCodePoint    1723 regparse.c       OnigCodePoint from, to;
OnigCodePoint    1753 regparse.c       data1 = (OnigCodePoint* )(bbuf1->p);
OnigCodePoint    1779 regparse.c       OnigCodePoint from2, to2;
OnigCodePoint    1818 regparse.c       OnigCodePoint i, j, n1, n2, *data1, *data2;
OnigCodePoint    1819 regparse.c       OnigCodePoint from, to, from1, to1, from2, to2;
OnigCodePoint    1836 regparse.c       data1 = (OnigCodePoint* )(bbuf1->p);
OnigCodePoint    1837 regparse.c       data2 = (OnigCodePoint* )(bbuf2->p);
OnigCodePoint    2198 regparse.c         OnigCodePoint code;
OnigCodePoint    2229 regparse.c       OnigCodePoint c;
OnigCodePoint    2319 regparse.c       OnigCodePoint c;
OnigCodePoint    2338 regparse.c             c = (OnigCodePoint )v;
OnigCodePoint    2364 regparse.c             c = (OnigCodePoint )(v & 0x9f);
OnigCodePoint    2397 regparse.c       OnigCodePoint c = 0;
OnigCodePoint    2398 regparse.c       OnigCodePoint first_code;
OnigCodePoint    2473 regparse.c       OnigCodePoint c = 0;
OnigCodePoint    2542 regparse.c       OnigCodePoint x;
OnigCodePoint    2571 regparse.c       OnigCodePoint x;
OnigCodePoint    2608 regparse.c       OnigCodePoint c, c2;
OnigCodePoint    2715 regparse.c     	  tok->u.code = (OnigCodePoint )num;
OnigCodePoint    2746 regparse.c     	tok->u.code = (OnigCodePoint )num;
OnigCodePoint    2771 regparse.c     	tok->u.code = (OnigCodePoint )num;
OnigCodePoint    2779 regparse.c           OnigCodePoint send[] = { (OnigCodePoint )':', (OnigCodePoint )']' };
OnigCodePoint    2783 regparse.c                                        (OnigCodePoint )']', enc)) {
OnigCodePoint    2818 regparse.c       OnigCodePoint c;
OnigCodePoint    3046 regparse.c     	  tok->u.code = (OnigCodePoint )num;
OnigCodePoint    3077 regparse.c     	tok->u.code = (OnigCodePoint )num;
OnigCodePoint    3226 regparse.c     	tok->u.code = (OnigCodePoint )num;
OnigCodePoint    3406 regparse.c       OnigCodePoint j;
OnigCodePoint    3427 regparse.c         OnigCodePoint prev = 0;
OnigCodePoint    3467 regparse.c       OnigCodePoint *sbr, *mbr;
OnigCodePoint    3493 regparse.c     	if (! ONIGENC_IS_CODE_CTYPE(enc, (OnigCodePoint )c, ctype))
OnigCodePoint    3500 regparse.c     	if (ONIGENC_IS_CODE_CTYPE(enc, (OnigCodePoint )c, ctype))
OnigCodePoint    3510 regparse.c     	if (! ONIGENC_IS_CODE_CTYPE(enc, (OnigCodePoint )c, ctype))
OnigCodePoint    3516 regparse.c     	if (ONIGENC_IS_CODE_CTYPE(enc, (OnigCodePoint )c, ctype))
OnigCodePoint    3623 regparse.c       OnigCodePoint c;
OnigCodePoint    3709 regparse.c       OnigCodePoint c;
OnigCodePoint    3856 regparse.c     	r = add_code_range(&(cc->mbuf), env, (OnigCodePoint )*vs, v);
OnigCodePoint    3888 regparse.c       OnigCodePoint code;
OnigCodePoint    3911 regparse.c       OnigCodePoint v, vs;
OnigCodePoint    3934 regparse.c         if (! code_exist_check((OnigCodePoint )']',
OnigCodePoint    3961 regparse.c           v = (OnigCodePoint )tok->u.c;
OnigCodePoint    4004 regparse.c     	  v = (OnigCodePoint )buf[0];
OnigCodePoint    4013 regparse.c     	v = (OnigCodePoint )tok->u.c;
OnigCodePoint    4043 regparse.c     	v = (OnigCodePoint )tok->u.c;
OnigCodePoint    4082 regparse.c     	  v = (OnigCodePoint )'-';
OnigCodePoint    4094 regparse.c     	v = (OnigCodePoint )tok->u.c;
OnigCodePoint    4245 regparse.c       OnigCodePoint c;
OnigCodePoint    4786 regparse.c           OnigCodePoint end_op[2];
OnigCodePoint    4789 regparse.c           end_op[0] = (OnigCodePoint )MC_ESC(env->enc);
OnigCodePoint    4790 regparse.c           end_op[1] = (OnigCodePoint )'E';
OnigCodePoint    4822 regparse.c               OnigCodePoint *sbr, *mbr;
OnigCodePoint      95 sjis.c         static OnigCodePoint
OnigCodePoint      99 sjis.c           OnigCodePoint n;
OnigCodePoint     224 sjis.c               (OnigCodePoint )'\\'                       /* esc */
OnigCodePoint     225 sjis.c             , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.'  */
OnigCodePoint     226 sjis.c             , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*'  */
OnigCodePoint     227 sjis.c             , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
OnigCodePoint     228 sjis.c             , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
OnigCodePoint     229 sjis.c             , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
OnigCodePoint      68 utf8.c         static OnigCodePoint
OnigCodePoint      72 utf8.c           OnigCodePoint n;
OnigCodePoint      91 utf8.c             return (OnigCodePoint )c;
OnigCodePoint     310 utf8.c         static OnigCodePoint EmptyRange[] = { 0 };
OnigCodePoint     312 utf8.c         static OnigCodePoint SBAlnum[] = {
OnigCodePoint     319 utf8.c         static OnigCodePoint MBAlnum[] = {
OnigCodePoint     741 utf8.c         static OnigCodePoint SBAlpha[] = {
OnigCodePoint     747 utf8.c         static OnigCodePoint MBAlpha[] = {
OnigCodePoint    1152 utf8.c         static OnigCodePoint SBBlank[] = {
OnigCodePoint    1158 utf8.c         static OnigCodePoint MBBlank[] = {
OnigCodePoint    1176 utf8.c         static OnigCodePoint SBCntrl[] = {
OnigCodePoint    1182 utf8.c         static OnigCodePoint MBCntrl[] = {
OnigCodePoint    1211 utf8.c         static OnigCodePoint SBDigit[] = {
OnigCodePoint    1216 utf8.c         static OnigCodePoint MBDigit[] = {
OnigCodePoint    1248 utf8.c         static OnigCodePoint SBGraph[] = {
OnigCodePoint    1253 utf8.c         static OnigCodePoint MBGraph[] = {
OnigCodePoint    1668 utf8.c         static OnigCodePoint SBLower[] = {
OnigCodePoint    1673 utf8.c         static OnigCodePoint MBLower[] = {
OnigCodePoint    2107 utf8.c         static OnigCodePoint SBPrint[] = {
OnigCodePoint    2113 utf8.c         static OnigCodePoint MBPrint[] = {
OnigCodePoint    2527 utf8.c         static OnigCodePoint SBPunct[] = {
OnigCodePoint    2540 utf8.c         static OnigCodePoint MBPunct[] = {
OnigCodePoint    2628 utf8.c         static OnigCodePoint SBSpace[] = {
OnigCodePoint    2634 utf8.c         static OnigCodePoint MBSpace[] = {
OnigCodePoint    2654 utf8.c         static OnigCodePoint SBUpper[] = {
OnigCodePoint    2659 utf8.c         static OnigCodePoint MBUpper[] = {
OnigCodePoint    3090 utf8.c         static OnigCodePoint SBXDigit[] = {
OnigCodePoint    3097 utf8.c         static OnigCodePoint SBASCII[] = {
OnigCodePoint    3102 utf8.c         static OnigCodePoint SBWord[] = {
OnigCodePoint    3110 utf8.c         static OnigCodePoint MBWord[] = {
OnigCodePoint    3625 utf8.c           OnigCodePoint *range;
OnigCodePoint    3719 utf8.c               (OnigCodePoint )'\\'                       /* esc */
OnigCodePoint    3720 utf8.c             , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.'  */
OnigCodePoint    3721 utf8.c             , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*'  */
OnigCodePoint    3722 utf8.c             , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
OnigCodePoint    3723 utf8.c             , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
OnigCodePoint    3724 utf8.c             , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */


OnigCompAmbigCodeItem

OnigCompAmbigCodeItem  126 oniguruma.h      OnigCompAmbigCodeItem items[ONIGENC_MAX_COMP_AMBIG_CODE_ITEM_NUM];
OnigCompAmbigCodeItem 4557 regparse.c       OnigCompAmbigCodeItem* ci;


OnigCompAmbigCodes

OnigCompAmbigCodes  165 oniguruma.h      int    (*get_all_comp_ambig_codes)(OnigAmbigType flag, OnigCompAmbigCodes** acs);
OnigCompAmbigCodes 3761 regcomp.c        OnigCompAmbigCodes* ccs;
OnigCompAmbigCodes  582 regenc.c         static OnigCompAmbigCodes folds[] = {
OnigCompAmbigCodes  588 regenc.c           return sizeof(folds) / sizeof(OnigCompAmbigCodes);
OnigCompAmbigCodes 4556 regparse.c       OnigCompAmbigCodes* ccs;


OnigCompileInfo

OnigCompileInfo   787 oniguruma.h    int onig_new_deluxe P_((regex_t** reg, const UChar* pattern, const UChar* pattern_end, OnigCompileInfo* ci, OnigErrorInfo* einfo));
OnigCompileInfo   793 oniguruma.h    int onig_recompile_deluxe P_((regex_t* reg, const UChar* pattern, const UChar* pattern_end, OnigCompileInfo* ci, OnigErrorInfo* einfo));


OnigDistance

OnigDistance       86 oniguruma.h    #define ONIG_INFINITE_DISTANCE  ~((OnigDistance )0)
OnigDistance      750 oniguruma.h      OnigDistance   anchor_dmin;       /* (SEMI_)END_BUF anchor distance */
OnigDistance      751 oniguruma.h      OnigDistance   anchor_dmax;       /* (SEMI_)END_BUF anchor distance */
OnigDistance      758 oniguruma.h      OnigDistance   dmin;                      /* min-distance of exact or map */
OnigDistance      759 oniguruma.h      OnigDistance   dmax;                      /* max-distance of exact or map */
OnigDistance       80 regcomp.c      static OnigDistance
OnigDistance       91 regcomp.c      static OnigDistance
OnigDistance     1735 regcomp.c        OnigDistance tmin;
OnigDistance     1863 regcomp.c        OnigDistance tmax;
OnigDistance     2488 regcomp.c            OnigDistance min;
OnigDistance     3126 regcomp.c            OnigDistance d;
OnigDistance     3336 regcomp.c        OnigDistance min;  /* min byte length */
OnigDistance     3337 regcomp.c        OnigDistance max;  /* max byte length */
OnigDistance     4049 regcomp.c              OnigDistance min = ONIGENC_MBC_MINLEN(env->enc);
OnigDistance     4050 regcomp.c      	OnigDistance max = ONIGENC_MBC_MAXLEN_DIST(env->enc);
OnigDistance     4102 regcomp.c            OnigDistance min = ONIGENC_MBC_MINLEN(env->enc);
OnigDistance     4103 regcomp.c            OnigDistance max = ONIGENC_MBC_MAXLEN_DIST(env->enc);
OnigDistance     4149 regcomp.c            OnigDistance min, max, tmin, tmax;
OnigDistance     4190 regcomp.c            OnigDistance min, max;
OnigDistance     4259 regcomp.c      	  OnigDistance min, max;
OnigDistance     3265 regexec.c            if ((OnigDistance )(semi_end - str) < reg->anchor_dmin)
OnigDistance     3269 regexec.c      	if ((OnigDistance )(semi_end - start) > reg->anchor_dmax) {
OnigDistance     3277 regexec.c      	if ((OnigDistance )(semi_end - (range - 1)) < reg->anchor_dmin) {
OnigDistance     3284 regexec.c      	if ((OnigDistance )(semi_end - range) > reg->anchor_dmax) {
OnigDistance     3287 regexec.c      	if ((OnigDistance )(semi_end - start) < reg->anchor_dmin) {
OnigDistance      178 regparse.h       OnigDistance min_len; /* min length (byte) */
OnigDistance      179 regparse.h       OnigDistance max_len; /* max length (byte) */


OnigEncoding

OnigEncoding      236 oniguruma.h    #define ONIG_ENCODING_UNDEF    ((OnigEncoding )0)
OnigEncoding      334 oniguruma.h    int onigenc_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, int ctype));
OnigEncoding      336 oniguruma.h    int onigenc_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf));
OnigEncoding      338 oniguruma.h    int onigenc_mbc_to_normalize P_((OnigEncoding enc, OnigAmbigType flag, const UChar** pp, const UChar* end, UChar* buf));
OnigEncoding      340 oniguruma.h    int onigenc_is_mbc_ambiguous P_((OnigEncoding enc, OnigAmbigType flag, const UChar** pp, const UChar* end));
OnigEncoding      342 oniguruma.h    int onigenc_is_allowed_reverse_match P_((OnigEncoding enc, const UChar* s, const UChar* end));
OnigEncoding      408 oniguruma.h    UChar* onigenc_step_back P_((OnigEncoding enc, const UChar* start, const UChar* s, int n));
OnigEncoding      417 oniguruma.h    int onigenc_set_default_encoding P_((OnigEncoding enc));
OnigEncoding      419 oniguruma.h    OnigEncoding onigenc_get_default_encoding P_(());
OnigEncoding      423 oniguruma.h    UChar* onigenc_get_right_adjust_char_head_with_prev P_((OnigEncoding enc, const UChar* start, const UChar* s, const UChar** prev));
OnigEncoding      425 oniguruma.h    UChar* onigenc_get_prev_char_head P_((OnigEncoding enc, const UChar* start, const UChar* s));
OnigEncoding      427 oniguruma.h    UChar* onigenc_get_left_adjust_char_head P_((OnigEncoding enc, const UChar* start, const UChar* s));
OnigEncoding      429 oniguruma.h    UChar* onigenc_get_right_adjust_char_head P_((OnigEncoding enc, const UChar* start, const UChar* s));
OnigEncoding      431 oniguruma.h    int onigenc_strlen P_((OnigEncoding enc, const UChar* p, const UChar* end));
OnigEncoding      433 oniguruma.h    int onigenc_strlen_null P_((OnigEncoding enc, const UChar* p));
OnigEncoding      435 oniguruma.h    int onigenc_str_bytelen_null P_((OnigEncoding enc, const UChar* p));
OnigEncoding      740 oniguruma.h      OnigEncoding  enc;
OnigEncoding      768 oniguruma.h      OnigEncoding    pattern_enc;
OnigEncoding      769 oniguruma.h      OnigEncoding    target_enc;
OnigEncoding      785 oniguruma.h    int onig_new P_((regex_t**, const UChar* pattern, const UChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo));
OnigEncoding      791 oniguruma.h    int onig_recompile P_((regex_t*, const UChar* pattern, const UChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo));
OnigEncoding      829 oniguruma.h    OnigEncoding onig_get_encoding P_((regex_t* reg));
OnigEncoding      857 oniguruma.h    int onig_set_meta_char P_((OnigEncoding enc, unsigned int what, OnigCodePoint code));
OnigEncoding      859 oniguruma.h    void onig_copy_encoding P_((OnigEncoding to, OnigEncoding from));
OnigEncoding      847 re.c               OnigEncoding enc;
OnigEncoding      432 regcomp.c        OnigEncoding enc = reg->enc;
OnigEncoding      480 regcomp.c        OnigEncoding enc = reg->enc;
OnigEncoding     3342 regcomp.c        OnigEncoding    enc;
OnigEncoding       32 regenc.c       OnigEncoding OnigEncDefaultCharEncoding = ONIG_ENCODING_INIT_DEFAULT;
OnigEncoding       40 regenc.c       extern OnigEncoding
OnigEncoding      133 regenc.h       ONIG_EXTERN OnigEncoding  OnigEncDefaultCharEncoding;
OnigEncoding       19 regex.h        ONIG_EXTERN OnigEncoding    OnigEncDefaultCharEncoding;
OnigEncoding     1210 regexec.c        OnigEncoding encode = reg->enc;
OnigEncoding     3491 regexec.c      extern OnigEncoding
OnigEncoding      486 regparse.c       OnigEncoding enc;
OnigEncoding     2230 regparse.c       OnigEncoding enc = env->enc;
OnigEncoding     2320 regparse.c       OnigEncoding enc = env->enc;
OnigEncoding     2399 regparse.c       OnigEncoding enc = env->enc;
OnigEncoding     2475 regparse.c       OnigEncoding enc = env->enc;
OnigEncoding     2610 regparse.c       OnigEncoding enc = env->enc;
OnigEncoding     2819 regparse.c       OnigEncoding enc = env->enc;
OnigEncoding     3468 regparse.c       OnigEncoding enc = env->enc;
OnigEncoding     3624 regparse.c       OnigEncoding enc = env->enc;
OnigEncoding     3710 regparse.c       OnigEncoding enc = env->enc;
OnigEncoding     4244 regparse.c       OnigEncoding enc = env->enc;
OnigEncoding     4611 regparse.c       OnigEncoding enc;
OnigEncoding      255 regparse.h       OnigEncoding    enc;


OnigEncodingType

OnigEncodingType   41 ascii.c        OnigEncodingType OnigEncodingASCII = {
OnigEncodingType  206 euc_jp.c       OnigEncodingType OnigEncodingEUC_JP = {
OnigEncodingType  172 oniguruma.h    typedef OnigEncodingType* OnigEncoding;
OnigEncodingType  174 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingASCII;
OnigEncodingType  175 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_1;
OnigEncodingType  176 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_2;
OnigEncodingType  177 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_3;
OnigEncodingType  178 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_4;
OnigEncodingType  179 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_5;
OnigEncodingType  180 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_6;
OnigEncodingType  181 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_7;
OnigEncodingType  182 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_8;
OnigEncodingType  183 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_9;
OnigEncodingType  184 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_10;
OnigEncodingType  185 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_11;
OnigEncodingType  186 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_13;
OnigEncodingType  187 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_14;
OnigEncodingType  188 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_15;
OnigEncodingType  189 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_16;
OnigEncodingType  190 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingUTF8;
OnigEncodingType  191 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingUTF16_BE;
OnigEncodingType  192 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingUTF16_LE;
OnigEncodingType  193 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingUTF32_BE;
OnigEncodingType  194 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingUTF32_LE;
OnigEncodingType  195 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingEUC_JP;
OnigEncodingType  196 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingEUC_TW;
OnigEncodingType  197 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingEUC_KR;
OnigEncodingType  198 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingEUC_CN;
OnigEncodingType  199 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingSJIS;
OnigEncodingType  200 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingKOI8;
OnigEncodingType  201 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingKOI8_R;
OnigEncodingType  202 oniguruma.h    ONIG_EXTERN OnigEncodingType OnigEncodingBIG5;
OnigEncodingType  217 sjis.c         OnigEncodingType OnigEncodingSJIS = {
OnigEncodingType 3710 utf8.c         OnigEncodingType OnigEncodingUTF8 = {


OnigErrorInfo

OnigErrorInfo     785 oniguruma.h    int onig_new P_((regex_t**, const UChar* pattern, const UChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo));
OnigErrorInfo     787 oniguruma.h    int onig_new_deluxe P_((regex_t** reg, const UChar* pattern, const UChar* pattern_end, OnigCompileInfo* ci, OnigErrorInfo* einfo));
OnigErrorInfo     791 oniguruma.h    int onig_recompile P_((regex_t*, const UChar* pattern, const UChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo));
OnigErrorInfo     793 oniguruma.h    int onig_recompile_deluxe P_((regex_t* reg, const UChar* pattern, const UChar* pattern_end, OnigCompileInfo* ci, OnigErrorInfo* einfo));
OnigErrorInfo     605 re.c               OnigErrorInfo einfo;
OnigErrorInfo     823 re.c           	OnigErrorInfo einfo;
OnigErrorInfo     185 regerror.c       OnigErrorInfo* einfo;
OnigErrorInfo     199 regerror.c         einfo = va_arg(vargs, OnigErrorInfo*);


OnigOpInfoType

OnigOpInfoType   5011 regcomp.c      OnigOpInfoType OnigOpInfo[] = {
OnigOpInfoType    774 regint.h       extern OnigOpInfoType OnigOpInfo[];


OnigOptionType

OnigOptionType    478 oniguruma.h      OnigOptionType options;    /* default option */
OnigOptionType    741 oniguruma.h      OnigOptionType    options;
OnigOptionType    771 oniguruma.h      OnigOptionType  option;
OnigOptionType    785 oniguruma.h    int onig_new P_((regex_t**, const UChar* pattern, const UChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo));
OnigOptionType    791 oniguruma.h    int onig_recompile P_((regex_t*, const UChar* pattern, const UChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo));
OnigOptionType    795 oniguruma.h    int onig_search P_((regex_t*, const UChar* str, const UChar* end, const UChar* start, const UChar* range, OnigRegion* region, OnigOptionType option));
OnigOptionType    797 oniguruma.h    int onig_match P_((regex_t*, const UChar* str, const UChar* end, const UChar* at, OnigRegion* region, OnigOptionType option));
OnigOptionType    831 oniguruma.h    OnigOptionType onig_get_options P_((regex_t* reg));
OnigOptionType    847 oniguruma.h    OnigOptionType onig_get_syntax_options P_((OnigSyntaxType* syntax));
OnigOptionType    855 oniguruma.h    void onig_set_syntax_options P_((OnigSyntaxType* syntax, OnigOptionType options));
OnigOptionType    895 regcomp.c        OnigOptionType prev = reg->options;
OnigOptionType    915 regcomp.c        OnigOptionType prev = reg->options;
OnigOptionType   2396 regcomp.c      	  OnigOptionType options = reg->options;
OnigOptionType   3211 regcomp.c      	  OnigOptionType options = reg->options;
OnigOptionType   3343 regcomp.c        OnigOptionType  options;
OnigOptionType   4179 regcomp.c            OnigOptionType save = env->options;
OnigOptionType   4247 regcomp.c      	  OnigOptionType save = env->options;
OnigOptionType   5184 regcomp.c      	OnigOptionType option = *((OnigOptionType* )bp);
OnigOptionType    362 regexec.c        OnigOptionType options;
OnigOptionType   1209 regexec.c        OnigOptionType option = reg->options;
OnigOptionType   3497 regexec.c      extern OnigOptionType
OnigOptionType    646 regint.h       #define SIZE_OPTION        sizeof(OnigOptionType)
OnigOptionType    672 regint.h       #define GET_OPTION_INC(option,p)   PLATFORM_GET_INC(option, p, OnigOptionType)
OnigOptionType   4243 regparse.c       OnigOptionType option;
OnigOptionType   4399 regparse.c     	    OnigOptionType prev = env->option;
OnigOptionType   4703 regparse.c           OnigOptionType prev = env->option;
OnigOptionType    174 regparse.h       OnigOptionType option;
OnigOptionType    253 regparse.h       OnigOptionType  option;


OnigPairAmbigCodes

OnigPairAmbigCodes  164 oniguruma.h      int    (*get_all_pair_ambig_codes)(OnigAmbigType flag, OnigPairAmbigCodes** acs);
OnigPairAmbigCodes 3762 regcomp.c        OnigPairAmbigCodes* pccs;
OnigPairAmbigCodes  420 regenc.c       OnigPairAmbigCodes OnigAsciiPairAmbigCodes[] = {
OnigPairAmbigCodes  482 regenc.c           return (sizeof(OnigAsciiPairAmbigCodes) / sizeof(OnigPairAmbigCodes));
OnigPairAmbigCodes  500 regenc.c         static OnigPairAmbigCodes cc[] = {
OnigPairAmbigCodes  568 regenc.c           return (sizeof(OnigAsciiPairAmbigCodes) / sizeof(OnigPairAmbigCodes));
OnigPairAmbigCodes  572 regenc.c           return sizeof(cc) / sizeof(OnigPairAmbigCodes);
OnigPairAmbigCodes  121 regenc.h       ONIG_EXTERN OnigPairAmbigCodes OnigAsciiPairAmbigCodes[];
OnigPairAmbigCodes 4904 regparse.c             OnigPairAmbigCodes* ccs;


OnigRegion

OnigRegion        795 oniguruma.h    int onig_search P_((regex_t*, const UChar* str, const UChar* end, const UChar* start, const UChar* range, OnigRegion* region, OnigOptionType option));
OnigRegion        797 oniguruma.h    int onig_match P_((regex_t*, const UChar* str, const UChar* end, const UChar* at, OnigRegion* region, OnigOptionType option));
OnigRegion        799 oniguruma.h    OnigRegion* onig_region_new P_((void));
OnigRegion        801 oniguruma.h    void onig_region_init P_((OnigRegion* region));
OnigRegion        803 oniguruma.h    void onig_region_free P_((OnigRegion* region, int free_self));
OnigRegion        805 oniguruma.h    void onig_region_copy P_((OnigRegion* to, OnigRegion* from));
OnigRegion        807 oniguruma.h    void onig_region_clear P_((OnigRegion* region));
OnigRegion        809 oniguruma.h    int onig_region_resize P_((OnigRegion* region, int n));
OnigRegion        811 oniguruma.h    int onig_region_set P_((OnigRegion* region, int at, int beg, int end));
OnigRegion        815 oniguruma.h    int onig_name_to_backref_number P_((regex_t* reg, const UChar* name, const UChar* name_end, OnigRegion *region));
OnigRegion        825 oniguruma.h    OnigCaptureTreeNode* onig_get_capture_tree P_((OnigRegion* region));
OnigRegion        827 oniguruma.h    int onig_capture_tree_traverse P_((OnigRegion* region, int at, int(*callback_func)(int,int,int,int,int,void*), void* arg));
OnigRegion        229 regexec.c      extern OnigRegion*
OnigRegion        232 regexec.c        OnigRegion* r;
OnigRegion        234 regexec.c        r = (OnigRegion* )xmalloc(sizeof(OnigRegion));
OnigRegion        363 regexec.c        OnigRegion*    region;
OnigRegion       1273 regexec.c      	OnigRegion* region = msa->region;


OnigRepeatRange

OnigRepeatRange   738 oniguruma.h      OnigRepeatRange* repeat_range;
OnigRepeatRange   625 regcomp.c        OnigRepeatRange* p;
OnigRepeatRange   628 regcomp.c          p = (OnigRepeatRange* )xmalloc(sizeof(OnigRepeatRange) * REPEAT_RANGE_ALLOC);
OnigRepeatRange   636 regcomp.c          p = (OnigRepeatRange* )xrealloc(reg->repeat_range,
OnigRepeatRange   637 regcomp.c                                          sizeof(OnigRepeatRange) * n);
OnigRepeatRange  4755 regcomp.c        reg->repeat_range       = (OnigRepeatRange* )NULL;


OnigSyntaxType

OnigSyntaxType    481 oniguruma.h    ONIG_EXTERN OnigSyntaxType OnigSyntaxPosixBasic;
OnigSyntaxType    482 oniguruma.h    ONIG_EXTERN OnigSyntaxType OnigSyntaxPosixExtended;
OnigSyntaxType    483 oniguruma.h    ONIG_EXTERN OnigSyntaxType OnigSyntaxEmacs;
OnigSyntaxType    484 oniguruma.h    ONIG_EXTERN OnigSyntaxType OnigSyntaxGrep;
OnigSyntaxType    485 oniguruma.h    ONIG_EXTERN OnigSyntaxType OnigSyntaxGnuRegex;
OnigSyntaxType    486 oniguruma.h    ONIG_EXTERN OnigSyntaxType OnigSyntaxJava;
OnigSyntaxType    487 oniguruma.h    ONIG_EXTERN OnigSyntaxType OnigSyntaxPerl;
OnigSyntaxType    488 oniguruma.h    ONIG_EXTERN OnigSyntaxType OnigSyntaxRuby;
OnigSyntaxType    501 oniguruma.h    ONIG_EXTERN OnigSyntaxType*   OnigDefaultSyntax;
OnigSyntaxType    742 oniguruma.h      OnigSyntaxType*   syntax;
OnigSyntaxType    770 oniguruma.h      OnigSyntaxType* syntax;
OnigSyntaxType    785 oniguruma.h    int onig_new P_((regex_t**, const UChar* pattern, const UChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo));
OnigSyntaxType    791 oniguruma.h    int onig_recompile P_((regex_t*, const UChar* pattern, const UChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo));
OnigSyntaxType    835 oniguruma.h    OnigSyntaxType* onig_get_syntax P_((regex_t* reg));
OnigSyntaxType    837 oniguruma.h    int onig_set_default_syntax P_((OnigSyntaxType* syntax));
OnigSyntaxType    839 oniguruma.h    void onig_copy_syntax P_((OnigSyntaxType* to, OnigSyntaxType* from));
OnigSyntaxType    841 oniguruma.h    unsigned int onig_get_syntax_op P_((OnigSyntaxType* syntax));
OnigSyntaxType    843 oniguruma.h    unsigned int onig_get_syntax_op2 P_((OnigSyntaxType* syntax));
OnigSyntaxType    845 oniguruma.h    unsigned int onig_get_syntax_behavior P_((OnigSyntaxType* syntax));
OnigSyntaxType    847 oniguruma.h    OnigOptionType onig_get_syntax_options P_((OnigSyntaxType* syntax));
OnigSyntaxType    849 oniguruma.h    void onig_set_syntax_op P_((OnigSyntaxType* syntax, unsigned int op));
OnigSyntaxType    851 oniguruma.h    void onig_set_syntax_op2 P_((OnigSyntaxType* syntax, unsigned int op2));
OnigSyntaxType    853 oniguruma.h    void onig_set_syntax_behavior P_((OnigSyntaxType* syntax, unsigned int behavior));
OnigSyntaxType    855 oniguruma.h    void onig_set_syntax_options P_((OnigSyntaxType* syntax, OnigOptionType options));
OnigSyntaxType   3509 regexec.c      extern OnigSyntaxType*
OnigSyntaxType     34 regparse.c     OnigSyntaxType OnigSyntaxRuby = {
OnigSyntaxType     59 regparse.c     OnigSyntaxType*  OnigDefaultSyntax = ONIG_SYNTAX_RUBY;
OnigSyntaxType   2609 regparse.c       OnigSyntaxType* syn = env->syntax;
OnigSyntaxType   2820 regparse.c       OnigSyntaxType* syn = env->syntax;
OnigSyntaxType    256 regparse.h       OnigSyntaxType* syntax;


OpenFile

OpenFile          421 ext/dl/cptr.c  	OpenFile *fptr;
OpenFile           59 ext/io/wait/wait.c     OpenFile *fptr;
OpenFile          101 ext/io/wait/wait.c     OpenFile *fptr;
OpenFile           22 ext/openssl/ossl_bio.c 	OpenFile *fptr;
OpenFile          536 ext/openssl/ossl_ssl.c     OpenFile *fptr;
OpenFile          576 ext/openssl/ossl_ssl.c     OpenFile *fptr;
OpenFile          620 ext/openssl/ossl_ssl.c     OpenFile *fptr;
OpenFile          677 ext/openssl/ossl_ssl.c     OpenFile *fptr;
OpenFile          418 ext/pty/pty.c      OpenFile *wfptr,*rfptr;
OpenFile          101 ext/readline/readline.c     OpenFile *ifp;
OpenFile          114 ext/readline/readline.c     OpenFile *ofp;
OpenFile          206 ext/socket/socket.c     OpenFile *fp;
OpenFile          223 ext/socket/socket.c     OpenFile *fptr;
OpenFile          239 ext/socket/socket.c     OpenFile *fptr;
OpenFile          264 ext/socket/socket.c     OpenFile *fptr;
OpenFile          283 ext/socket/socket.c     OpenFile *fptr;
OpenFile          348 ext/socket/socket.c     OpenFile *fptr;
OpenFile          431 ext/socket/socket.c     OpenFile *fptr;
OpenFile          454 ext/socket/socket.c     OpenFile *fptr;
OpenFile          468 ext/socket/socket.c     OpenFile *fptr;
OpenFile          484 ext/socket/socket.c     OpenFile *fptr;
OpenFile          520 ext/socket/socket.c     OpenFile *fptr;
OpenFile          531 ext/socket/socket.c     OpenFile *fptr;
OpenFile          563 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1278 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1430 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1444 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1474 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1521 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1536 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1617 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1635 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1660 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1702 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1749 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1762 ext/socket/socket.c         OpenFile *valfptr;
OpenFile         1816 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1920 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1934 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1957 ext/socket/socket.c     OpenFile *fptr;
OpenFile         1974 ext/socket/socket.c     OpenFile *fptr;
OpenFile         2254 ext/socket/socket.c     OpenFile *fptr;
OpenFile         2353 ext/socket/socket.c     OpenFile *fptr;
OpenFile         2437 ext/socket/socket.c     OpenFile *fptr;
OpenFile         2567 ext/socket/socket.c     OpenFile *fptr;
OpenFile         2620 ext/socket/socket.c     OpenFile *fptr;
OpenFile          154 file.c             OpenFile *fptr;
OpenFile          630 file.c         	OpenFile *fptr;
OpenFile          648 file.c         	OpenFile *fptr;
OpenFile          713 file.c             OpenFile *fptr;
OpenFile          773 file.c             OpenFile *fptr;
OpenFile         1582 file.c             OpenFile *fptr;
OpenFile         1625 file.c             OpenFile *fptr;
OpenFile         1671 file.c             OpenFile *fptr;
OpenFile         1733 file.c             OpenFile *fptr;
OpenFile         1864 file.c             OpenFile *fptr;
OpenFile         3003 file.c             OpenFile *fptr;
OpenFile         3104 file.c             OpenFile *fptr;
OpenFile          287 io.c           static OpenFile *
OpenFile          616 io.c               OpenFile of;
OpenFile          646 io.c               OpenFile *fptr;
OpenFile          717 io.c               OpenFile *fptr;
OpenFile          751 io.c               OpenFile *fptr;
OpenFile          763 io.c               OpenFile *fptr;
OpenFile          822 io.c               OpenFile *fptr;
OpenFile          850 io.c               OpenFile *fptr;
OpenFile          867 io.c                   OpenFile *ofp;
OpenFile          934 io.c               OpenFile *fptr;
OpenFile          967 io.c               OpenFile *fptr;
OpenFile          991 io.c               OpenFile *fptr;
OpenFile         1019 io.c               OpenFile *fptr;
OpenFile         1048 io.c               OpenFile *fptr;
OpenFile         1080 io.c               OpenFile *fptr;
OpenFile         1099 io.c               OpenFile *fptr;
OpenFile         1168 io.c               OpenFile of;
OpenFile         1244 io.c               OpenFile *fptr;
OpenFile         1386 io.c               OpenFile *fptr;
OpenFile         1552 io.c               OpenFile *fptr;
OpenFile         1612 io.c               OpenFile *fptr;
OpenFile         1676 io.c               OpenFile *fptr;
OpenFile         1703 io.c               OpenFile *fptr;
OpenFile         1843 io.c               OpenFile *fptr;
OpenFile         1876 io.c               OpenFile *fptr;
OpenFile         1944 io.c               OpenFile *fptr;
OpenFile         1971 io.c               OpenFile *fptr;
OpenFile         2049 io.c               OpenFile *fptr;
OpenFile         2122 io.c               OpenFile *fptr;
OpenFile         2150 io.c               OpenFile *fptr;
OpenFile         2195 io.c               OpenFile *fptr;
OpenFile         2237 io.c               OpenFile *fptr;
OpenFile         2273 io.c               OpenFile *fptr;
OpenFile         2318 io.c               OpenFile *fptr;
OpenFile         2378 io.c               OpenFile *fptr;
OpenFile         2649 io.c               OpenFile *fptr;
OpenFile         2669 io.c               OpenFile *fptr;
OpenFile         2689 io.c               OpenFile *fptr;
OpenFile         2830 io.c               OpenFile *fptr;
OpenFile         3272 io.c               OpenFile *fptr, *orig;
OpenFile         3376 io.c               OpenFile *fptr;
OpenFile         3390 io.c           	fptr = RFILE(file)->fptr = ALLOC(OpenFile);
OpenFile         3391 io.c           	MEMZERO(fptr, OpenFile, 1);
OpenFile         3443 io.c               OpenFile *fptr, *orig;
OpenFile         3844 io.c               OpenFile *fp;
OpenFile         3865 io.c               OpenFile *fptr;
OpenFile         3907 io.c               OpenFile *fp, *ofp = NULL;
OpenFile         4083 io.c               OpenFile *fptr;
OpenFile         4378 io.c               OpenFile *fptr;
OpenFile         4400 io.c               OpenFile *fptr;
OpenFile         4600 io.c               OpenFile *fptr;
OpenFile           30 rubyio.h           void (*finalize)(struct OpenFile*,int); /* finalize proc */
OpenFile           63 rubyio.h           fp = RFILE(obj)->fptr = ALLOC(OpenFile);\


OptAncInfo

OptAncInfo       3355 regcomp.c        OptAncInfo anc;
OptAncInfo       3365 regcomp.c        OptAncInfo anc;
OptAncInfo       3374 regcomp.c        OptAncInfo   anc;
OptAncInfo       3610 regcomp.c        OptAncInfo tanc;
OptAncInfo       3886 regcomp.c        OptAncInfo tanc;


OptEnv

OptEnv           3969 regcomp.c            OptEnv nenv;
OptEnv           4382 regcomp.c        OptEnv env;


OptExactInfo

OptExactInfo     3375 regcomp.c        OptExactInfo exb;    /* boundary */
OptExactInfo     3376 regcomp.c        OptExactInfo exm;    /* middle */
OptExactInfo     3377 regcomp.c        OptExactInfo expr;   /* prec read (?=...) */


OptMapInfo

OptMapInfo       3379 regcomp.c        OptMapInfo   map;   /* boundary */
OptMapInfo       3714 regcomp.c        static OptMapInfo clean_info = {
OptMapInfo       3736 regcomp.c        xmemcpy(map, &clean_info, sizeof(OptMapInfo));


PACK_ITEM_ADJUST

PACK_ITEM_ADJUST 1481 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1490 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1502 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1513 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1524 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1535 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1547 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1557 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1567 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1586 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1597 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1608 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1619 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1631 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1645 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1659 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1671 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1685 pack.c         	    PACK_ITEM_ADJUST();
PACK_ITEM_ADJUST 1699 pack.c         	    PACK_ITEM_ADJUST();


PACK_LENGTH_ADJUST

PACK_LENGTH_ADJUST 1475 pack.c         	    PACK_LENGTH_ADJUST(char,sizeof(char));
PACK_LENGTH_ADJUST 1485 pack.c         	    PACK_LENGTH_ADJUST(unsigned char,sizeof(unsigned char));
PACK_LENGTH_ADJUST 1494 pack.c         	    PACK_LENGTH_ADJUST(short,2);
PACK_LENGTH_ADJUST 1506 pack.c         	    PACK_LENGTH_ADJUST(unsigned short,2);
PACK_LENGTH_ADJUST 1517 pack.c         	    PACK_LENGTH_ADJUST(int,sizeof(int));
PACK_LENGTH_ADJUST 1528 pack.c         	    PACK_LENGTH_ADJUST(unsigned int,sizeof(unsigned int));
PACK_LENGTH_ADJUST 1539 pack.c         	    PACK_LENGTH_ADJUST(long,4);
PACK_LENGTH_ADJUST 1550 pack.c         	    PACK_LENGTH_ADJUST(unsigned long,4);
PACK_LENGTH_ADJUST 1579 pack.c         	    PACK_LENGTH_ADJUST(unsigned short,2);
PACK_LENGTH_ADJUST 1590 pack.c         	    PACK_LENGTH_ADJUST(unsigned long,4);
PACK_LENGTH_ADJUST 1601 pack.c         	    PACK_LENGTH_ADJUST(unsigned short,2);
PACK_LENGTH_ADJUST 1612 pack.c         	    PACK_LENGTH_ADJUST(unsigned long,4);
PACK_LENGTH_ADJUST 1624 pack.c         	    PACK_LENGTH_ADJUST(float,sizeof(float));
PACK_LENGTH_ADJUST 1635 pack.c         	    PACK_LENGTH_ADJUST(float,sizeof(float));
PACK_LENGTH_ADJUST 1649 pack.c         	    PACK_LENGTH_ADJUST(double,sizeof(double));
PACK_LENGTH_ADJUST 1664 pack.c         	    PACK_LENGTH_ADJUST(double,sizeof(double));
PACK_LENGTH_ADJUST 1675 pack.c         	    PACK_LENGTH_ADJUST(float,sizeof(float));
PACK_LENGTH_ADJUST 1689 pack.c         	    PACK_LENGTH_ADJUST(double,sizeof(double));


PACK_LENGTH_ADJUST_SIZE

PACK_LENGTH_ADJUST_SIZE 1132 pack.c             PACK_LENGTH_ADJUST_SIZE(t__len);		\
PACK_LENGTH_ADJUST_SIZE 1136 pack.c             PACK_LENGTH_ADJUST_SIZE(sizeof(type))
PACK_LENGTH_ADJUST_SIZE 1561 pack.c         	    PACK_LENGTH_ADJUST_SIZE(QUAD_SIZE);
PACK_LENGTH_ADJUST_SIZE 1570 pack.c         	    PACK_LENGTH_ADJUST_SIZE(QUAD_SIZE);


PAD

PAD               928 missing/vsnprintf.c 			PAD(width - realsz, blanks);
PAD               941 missing/vsnprintf.c 			PAD(width - realsz, zeroes);
PAD               944 missing/vsnprintf.c 		PAD(dprec - fieldsz, zeroes);
PAD               959 missing/vsnprintf.c 						PAD(ndig - 1, zeroes);
PAD               963 missing/vsnprintf.c 					PAD(-expt, zeroes);
PAD               967 missing/vsnprintf.c 					PAD(expt - ndig, zeroes);
PAD               985 missing/vsnprintf.c 						PAD(ndig - 1, zeroes);
PAD               996 missing/vsnprintf.c 			PAD(width - realsz, blanks);


PADSIZE

PADSIZE           512 missing/vsnprintf.c 	static char blanks[PADSIZE] =
PADSIZE           514 missing/vsnprintf.c 	static char zeroes[PADSIZE] =
PADSIZE           533 missing/vsnprintf.c 		while (n > PADSIZE) { \
PADSIZE           534 missing/vsnprintf.c 			PRINT(with, PADSIZE); \
PADSIZE           535 missing/vsnprintf.c 			n -= PADSIZE; \


PAGFEXT

PAGFEXT           161 ext/sdbm/_sdbm.c 	n = strlen(file) * 2 + strlen(DIRFEXT) + strlen(PAGFEXT) + 2;
PAGFEXT           170 ext/sdbm/_sdbm.c 	pagname = strcat(pagname, PAGFEXT);


PARSER_ARG

PARSER_ARG       5029 parse.y        	compile_error(PARSER_ARG "unknown regexp option%s - %s",
PARSER_ARG       5133 parse.y        	    rb_compile_error(PARSER_ARG  "symbol cannot contain '\\0'");
PARSER_ARG       5198 parse.y        	rb_compile_error(PARSER_ARG  "unterminated string meets end of file");
PARSER_ARG       5234 parse.y        	    rb_compile_error(PARSER_ARG  "unterminated here document identifier");
PARSER_ARG       5333 parse.y        	rb_compile_error(PARSER_ARG  "can't find string \"%s\" anywhere before EOF", eos);
PARSER_ARG       5754 parse.y        			rb_compile_error(PARSER_ARG  "embedded document meets end of file");
PARSER_ARG       5884 parse.y        	    rb_compile_error(PARSER_ARG  "incomplete character syntax");
PARSER_ARG       6503 parse.y        		rb_compile_error(PARSER_ARG  "unterminated quoted string meets end of file");
PARSER_ARG       6625 parse.y        		rb_compile_error(PARSER_ARG  "invalid global variable `%s'", rb_id2name(yylval.id));
PARSER_ARG       6677 parse.y        		rb_compile_error(PARSER_ARG  "`@%c' is not allowed as an instance variable name", c);
PARSER_ARG       6680 parse.y        		rb_compile_error(PARSER_ARG  "`@@%c' is not allowed as a class variable name", c);
PARSER_ARG       6708 parse.y        	    rb_compile_error(PARSER_ARG  "Invalid char `\\%03o' in expression", c);
PARSER_ARG       7278 parse.y        	compile_error(PARSER_ARG "invalid local variable - %s",
PARSER_ARG       7301 parse.y        	compile_error(PARSER_ARG "both block arg and actual block given");


PATH_ENV

PATH_ENV         1612 dln.c          	path = getenv(PATH_ENV);
PATH_ENV         1549 hash.c         	if (strcasecmp(nam, PATH_ENV) == 0)
PATH_ENV         1551 hash.c         	if (strcmp(nam, PATH_ENV) == 0)
PATH_ENV         1585 hash.c         	if (strcasecmp(nam, PATH_ENV) == 0 && !rb_env_path_tainted())
PATH_ENV         1587 hash.c         	if (strcmp(nam, PATH_ENV) == 0 && !rb_env_path_tainted())
PATH_ENV         1627 hash.c             if (strcasecmp(nam, PATH_ENV) == 0 && !rb_env_path_tainted())
PATH_ENV         1629 hash.c             if (strcmp(nam, PATH_ENV) == 0 && !rb_env_path_tainted())
PATH_ENV         1645 hash.c         	path_tainted_p(getenv(PATH_ENV));
PATH_ENV         1777 hash.c             if (strcasecmp(name, PATH_ENV) == 0) {
PATH_ENV         1779 hash.c             if (strcmp(name, PATH_ENV) == 0) {
PATH_ENV          807 ruby.c         		    script = dln_find_file(argv[0], getenv(PATH_ENV));


PATH_MAX

PATH_MAX          329 util.c             char path_buffer[PATH_MAX];
PATH_MAX          335 util.c             if (PATH_MAX <= len)
PATH_MAX          639 util.c         # ifndef PATH_MAX
PATH_MAX          642 util.c             char *buf = xmalloc(PATH_MAX+1);


PATH_SEP

PATH_SEP          248 defines.h      #define PATH_SEP_CHAR PATH_SEP[0]
PATH_SEP         1702 dln.c          	ep = strchr(dp, PATH_SEP[0]);
PATH_SEP         4194 file.c         	tmp = rb_ary_join(tmp, rb_str_new2(PATH_SEP));
PATH_SEP         4341 file.c             rb_define_const(rb_cFile, "PATH_SEPARATOR", rb_obj_freeze(rb_str_new2(PATH_SEP)));


PATH_SEP_CHAR

PATH_SEP_CHAR    4053 file.c             const char sep = PATH_SEP_CHAR;
PATH_SEP_CHAR     174 ruby.c             const char sep = PATH_SEP_CHAR;


PBLKSIZ

PBLKSIZ           126 ext/sdbm/_sdbm.c #define OFF_PAG(off)	(long) (off) * PBLKSIZ
PBLKSIZ           222 ext/sdbm/_sdbm.c 				(void) memset(db->pagbuf, 0, PBLKSIZ);
PBLKSIZ           281 ext/sdbm/_sdbm.c 		    || write(db->pagf, db->pagbuf, PBLKSIZ) < 0)
PBLKSIZ           336 ext/sdbm/_sdbm.c 		    || write(db->pagf, db->pagbuf, PBLKSIZ) < 0)
PBLKSIZ           359 ext/sdbm/_sdbm.c 	char twin[PBLKSIZ];
PBLKSIZ           361 ext/sdbm/_sdbm.c 	char zer[PBLKSIZ];
PBLKSIZ           393 ext/sdbm/_sdbm.c 	memset(zer, 0, PBLKSIZ);
PBLKSIZ           396 ext/sdbm/_sdbm.c 		    write(db->pagf, zer, PBLKSIZ) < 0) {
PBLKSIZ           400 ext/sdbm/_sdbm.c 		oldtail += PBLKSIZ;
PBLKSIZ           406 ext/sdbm/_sdbm.c 			    || write(db->pagf, db->pagbuf, PBLKSIZ) < 0)
PBLKSIZ           409 ext/sdbm/_sdbm.c 			(void) memcpy(pag, new, PBLKSIZ);
PBLKSIZ           412 ext/sdbm/_sdbm.c 			 || write(db->pagf, new, PBLKSIZ) < 0)
PBLKSIZ           433 ext/sdbm/_sdbm.c 		    || write(db->pagf, db->pagbuf, PBLKSIZ) < 0)
PBLKSIZ           461 ext/sdbm/_sdbm.c 	(void) memset(db->pagbuf, 0, PBLKSIZ);
PBLKSIZ           463 ext/sdbm/_sdbm.c 	    || read(db->pagf, db->pagbuf, PBLKSIZ) < 0)
PBLKSIZ           513 ext/sdbm/_sdbm.c 		(void) memset(db->pagbuf, 0, PBLKSIZ);
PBLKSIZ           516 ext/sdbm/_sdbm.c 		    || read(db->pagf, db->pagbuf, PBLKSIZ) < 0)
PBLKSIZ           608 ext/sdbm/_sdbm.c 		if (read(db->pagf, db->pagbuf, PBLKSIZ) <= 0)
PBLKSIZ           673 ext/sdbm/_sdbm.c 	off = ((n = GET_SHORT(ino,0)) > 0) ? GET_SHORT(ino,n) : PBLKSIZ;
PBLKSIZ           692 ext/sdbm/_sdbm.c 	off = ((n = GET_SHORT(ino,0)) > 0) ? GET_SHORT(ino,n) : PBLKSIZ;
PBLKSIZ           759 ext/sdbm/_sdbm.c 	off = (num > 1) ? GET_SHORT(ino,num - 1) : PBLKSIZ;
PBLKSIZ           790 ext/sdbm/_sdbm.c 		register char *dst = pag + (i == 1 ? PBLKSIZ : GET_SHORT(ino,i - 1));
PBLKSIZ           847 ext/sdbm/_sdbm.c 	register int off = PBLKSIZ;
PBLKSIZ           869 ext/sdbm/_sdbm.c 	register int off = PBLKSIZ;
PBLKSIZ           870 ext/sdbm/_sdbm.c 	char cur[PBLKSIZ];
PBLKSIZ           873 ext/sdbm/_sdbm.c 	(void) memcpy(cur, pag, PBLKSIZ);
PBLKSIZ           874 ext/sdbm/_sdbm.c 	(void) memset(pag, 0, PBLKSIZ);
PBLKSIZ           875 ext/sdbm/_sdbm.c 	(void) memset(new, 0, PBLKSIZ);
PBLKSIZ           911 ext/sdbm/_sdbm.c 	if ((n = GET_SHORT(ino,0)) < 0 || n > PBLKSIZ / sizeof(short))
PBLKSIZ           915 ext/sdbm/_sdbm.c 		off = PBLKSIZ;
PBLKSIZ            29 ext/sdbm/sdbm.h 	char pagbuf[PBLKSIZ];	       /* page file block buffer */


PEM_def_callback

PEM_def_callback  122 ext/openssl/openssl_missing.h int PEM_def_callback(char *buf, int num, int w, void *key);
PEM_def_callback  162 ext/openssl/ossl.c 	return PEM_def_callback(buf, max_len, flag, pwd);


PEM_read_bio_DSAPublicKey

PEM_read_bio_DSAPublicKey   22 ext/openssl/openssl_missing.h #if !defined(PEM_read_bio_DSAPublicKey)
PEM_read_bio_DSAPublicKey  141 ext/openssl/ossl_pkey_dsa.c 	    dsa = PEM_read_bio_DSAPublicKey(in, NULL, NULL, NULL);


PEM_write_bio_DSAPublicKey

PEM_write_bio_DSAPublicKey   27 ext/openssl/openssl_missing.h #if !defined(PEM_write_bio_DSAPublicKey)
PEM_write_bio_DSAPublicKey  217 ext/openssl/ossl_pkey_dsa.c 	if (!PEM_write_bio_DSAPublicKey(out, pkey->pkey.dsa)) {


PEND

PEND             1487 regparse.c       while (!PEND) {
PEND             1515 regparse.c       while (!PEND && maxlen-- != 0) {
PEND             1543 regparse.c       while (!PEND && maxlen-- != 0) {
PEND             2236 regparse.c       if (PEND) {
PEND             2265 regparse.c       if (PEND) goto invalid;
PEND             2289 regparse.c       if (PEND) goto invalid;
PEND             2324 regparse.c       if (PEND) return ONIGERR_END_PATTERN_AT_ESCAPE;
PEND             2330 regparse.c           if (PEND) return ONIGERR_END_PATTERN_AT_META;
PEND             2333 regparse.c           if (PEND) return ONIGERR_END_PATTERN_AT_META;
PEND             2348 regparse.c           if (PEND) return ONIGERR_END_PATTERN_AT_CONTROL;
PEND             2359 regparse.c           if (PEND) return ONIGERR_END_PATTERN_AT_CONTROL;
PEND             2407 regparse.c       if (PEND) {
PEND             2428 regparse.c       while (!PEND) {
PEND             2480 regparse.c       while (!PEND) {
PEND             2615 regparse.c       if (PEND) {
PEND             2636 regparse.c         if (PEND) return ONIGERR_END_PATTERN_AT_ESCAPE;
PEND             2698 regparse.c           if (PEND) break;
PEND             2705 regparse.c     	if (!PEND) {
PEND             2711 regparse.c     	if (p > prev + enc_len(enc, prev) && !PEND && (PPEEK_IS('}'))) {
PEND             2735 regparse.c           if (PEND) break;
PEND             2803 regparse.c     	!PEND && (PPEEK_IS('&'))) {
PEND             2826 regparse.c       if (PEND) {
PEND             2837 regparse.c         if (PEND) return ONIGERR_END_PATTERN_AT_ESCAPE;
PEND             2867 regparse.c           if (!PEND && PPEEK_IS('?') &&
PEND             2875 regparse.c     	if (!PEND && PPEEK_IS('+') &&
PEND             3031 regparse.c           if (PEND) break;
PEND             3038 regparse.c     	if (!PEND) {
PEND             3043 regparse.c     	if ((p > prev + enc_len(enc, prev)) && !PEND && PPEEK_IS('}')) {
PEND             3066 regparse.c           if (PEND) break;
PEND             3324 regparse.c                 if (PEND) return ONIGERR_END_PATTERN_IN_GROUP;
PEND             3327 regparse.c                   if (!PEND) PFETCH(c);
PEND             3373 regparse.c     	while (!PEND) {
PEND             3656 regparse.c       while (!PEND && ((c = PPEEK) != ':') && c != ']') {
PEND             3660 regparse.c       if (c == ':' && ! PEND) {
PEND             3662 regparse.c         if (! PEND) {
PEND             3715 regparse.c       if (!PEND &&
PEND             3720 regparse.c           if (! PEND) {
PEND             3732 regparse.c       while (!PEND) {
PEND             3893 regparse.c       while (! PEND) {
PEND             4250 regparse.c       if (PEND) return ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS;
PEND             4256 regparse.c         if (PEND) return ONIGERR_END_PATTERN_IN_GROUP;
PEND             4414 regparse.c     	  if (PEND) return ONIGERR_END_PATTERN_IN_GROUP;


PERL_XS

PERL_XS           105 ext/nkf/nkf-utf8/nkf.c #ifdef PERL_XS
PERL_XS           109 ext/nkf/nkf-utf8/nkf.c #ifndef PERL_XS
PERL_XS           290 ext/nkf/nkf-utf8/nkf.c #ifndef PERL_XS
PERL_XS           293 ext/nkf/nkf-utf8/nkf.c #if !defined(PERL_XS) && !defined(WIN32DLL)
PERL_XS           353 ext/nkf/nkf-utf8/nkf.c #ifndef PERL_XS
PERL_XS           358 ext/nkf/nkf-utf8/nkf.c #if defined(PERL_XS) || defined(WIN32DLL)
PERL_XS           364 ext/nkf/nkf-utf8/nkf.c #if !defined(PERL_XS) && !defined(WIN32DLL)
PERL_XS           453 ext/nkf/nkf-utf8/nkf.c #if !defined PERL_XS
PERL_XS           689 ext/nkf/nkf-utf8/nkf.c #elif defined(PERL_XS)
PERL_XS          1184 ext/nkf/nkf-utf8/nkf.c #ifndef PERL_XS
PERL_XS          1334 ext/nkf/nkf-utf8/nkf.c #ifndef PERL_XS
PERL_XS          1360 ext/nkf/nkf-utf8/nkf.c #ifndef PERL_XS
PERL_XS          1822 ext/nkf/nkf-utf8/nkf.c #if !defined(PERL_XS) && !defined(WIN32DLL)
PERL_XS          3808 ext/nkf/nkf-utf8/nkf.c #if !defined(PERL_XS) && !defined(WIN32DLL)
PERL_XS          4722 ext/nkf/nkf-utf8/nkf.c #if defined(PERL_XS) || defined(WIN32DLL)
PERL_XS          4857 ext/nkf/nkf-utf8/nkf.c #ifndef PERL_XS


PERM3264

PERM3264          657 missing/crypt.c 	PERM3264(L,L0,L1,B.b,  (C_block *)IE3264);	/* even bits */
PERM3264          658 missing/crypt.c 	PERM3264(R,R0,R1,B.b+4,(C_block *)IE3264);	/* odd bits */


PERM6464

PERM6464          596 missing/crypt.c 	PERM6464(K,K0,K1,(unsigned char *)key,(C_block *)PC1ROT);
PERM6464          603 missing/crypt.c 		PERM6464(K,K0,K1,(unsigned char *)key,ptabp);
PERM6464          721 missing/crypt.c 	PERM6464(L,L0,L1,B.b, (C_block *)CF6464);


PEVENTSINK

PEVENTSINK         97 ext/win32ole/win32ole.c         PEVENTSINK,
PEVENTSINK        100 ext/win32ole/win32ole.c     STDMETHOD_(ULONG, AddRef)(PEVENTSINK);
PEVENTSINK        101 ext/win32ole/win32ole.c     STDMETHOD_(ULONG, Release)(PEVENTSINK);
PEVENTSINK        104 ext/win32ole/win32ole.c         PEVENTSINK,
PEVENTSINK        107 ext/win32ole/win32ole.c         PEVENTSINK,
PEVENTSINK        112 ext/win32ole/win32ole.c         PEVENTSINK,
PEVENTSINK        119 ext/win32ole/win32ole.c         PEVENTSINK,
PEVENTSINK       6174 ext/win32ole/win32ole.c     PEVENTSINK pEV,
PEVENTSINK       6193 ext/win32ole/win32ole.c     PEVENTSINK pEV
PEVENTSINK       6200 ext/win32ole/win32ole.c     PEVENTSINK pEV
PEVENTSINK       6211 ext/win32ole/win32ole.c     PEVENTSINK pEV,
PEVENTSINK       6219 ext/win32ole/win32ole.c     PEVENTSINK pEV,
PEVENTSINK       6229 ext/win32ole/win32ole.c     PEVENTSINK pEV,
PEVENTSINK       6313 ext/win32ole/win32ole.c     PEVENTSINK pEventSink,


PFETCH

PFETCH           1488 regparse.c         PFETCH(c);
PFETCH           1516 regparse.c         PFETCH(c);
PFETCH           1544 regparse.c         PFETCH(c);
PFETCH           2266 regparse.c       PFETCH(c);
PFETCH           2290 regparse.c       PFETCH(c);
PFETCH           2293 regparse.c         PFETCH(c);
PFETCH           2326 regparse.c       PFETCH(c);
PFETCH           2331 regparse.c           PFETCH(c);
PFETCH           2334 regparse.c           PFETCH(c);
PFETCH           2349 regparse.c           PFETCH(c);
PFETCH           2360 regparse.c           PFETCH(c);
PFETCH           2411 regparse.c         PFETCH(c);
PFETCH           2430 regparse.c         PFETCH(c);
PFETCH           2485 regparse.c         PFETCH(c);
PFETCH           2620 regparse.c       PFETCH(c);
PFETCH           2638 regparse.c         PFETCH(c);
PFETCH           2687 regparse.c     	  PFETCH(c2);
PFETCH           2835 regparse.c       PFETCH(c);
PFETCH           2840 regparse.c         PFETCH(c);
PFETCH           2869 regparse.c     	PFETCH(c);
PFETCH           2880 regparse.c     	  PFETCH(c);
PFETCH           3133 regparse.c     	PFETCH(c);
PFETCH           3176 regparse.c     	PFETCH(c);
PFETCH           3209 regparse.c     	  PFETCH(c);
PFETCH           3322 regparse.c               PFETCH(c);
PFETCH           3325 regparse.c                 PFETCH(c);
PFETCH           3327 regparse.c                   if (!PEND) PFETCH(c);
PFETCH           3374 regparse.c     	  PFETCH(c);
PFETCH           3663 regparse.c           PFETCH(c);
PFETCH           3734 regparse.c         PFETCH(c);
PFETCH           3898 regparse.c           PFETCH(code);
PFETCH           4258 regparse.c         PFETCH(c);
PFETCH           4281 regparse.c           PFETCH(c);
PFETCH           4322 regparse.c     	  PFETCH(c);
PFETCH           4415 regparse.c     	  PFETCH(c);


PFETCH_READY

PFETCH_READY     1484 regparse.c       PFETCH_READY;
PFETCH_READY     1512 regparse.c       PFETCH_READY;
PFETCH_READY     1540 regparse.c       PFETCH_READY;
PFETCH_READY     2232 regparse.c       PFETCH_READY;
PFETCH_READY     2322 regparse.c       PFETCH_READY;
PFETCH_READY     2402 regparse.c       PFETCH_READY;
PFETCH_READY     2477 regparse.c       PFETCH_READY;
PFETCH_READY     2613 regparse.c       PFETCH_READY;
PFETCH_READY     2823 regparse.c       PFETCH_READY;
PFETCH_READY     3626 regparse.c       PFETCH_READY;
PFETCH_READY     3712 regparse.c       PFETCH_READY;
PFETCH_READY     3890 regparse.c       PFETCH_READY;
PFETCH_READY     4247 regparse.c       PFETCH_READY;


PF_INET

PF_INET           129 ext/socket/getaddrinfo.c 	{PF_INET, sizeof(struct in_addr),
PF_INET           324 ext/socket/getaddrinfo.c 		case PF_INET:
PF_INET           102 ext/socket/getnameinfo.c 	{PF_INET, sizeof(struct in_addr),
PF_INET           130 ext/socket/socket.c     PF_INET, PF_INET6, PF_UNSPEC,
PF_INET           132 ext/socket/socket.c     PF_INET6, PF_INET, PF_UNSPEC,
PF_INET          2019 ext/socket/socket.c #ifdef PF_INET
PF_INET          2021 ext/socket/socket.c 	    *dv = PF_INET;
PF_INET          2871 ext/socket/socket.c 	    hints.ai_family = PF_INET;
PF_INET          2997 ext/socket/socket.c 		hints.ai_family = PF_INET;
PF_INET            68 ext/socket/sockport.h #ifndef PF_INET
PF_INET          2647 win32/win32.c  #if defined PF_INET && PF_INET != AF_INET
PF_INET          2648 win32/win32.c        case PF_INET:


PF_UNSPEC

PF_UNSPEC         304 ext/socket/getaddrinfo.c 	pai->ai_family = PF_UNSPEC;
PF_UNSPEC         323 ext/socket/getaddrinfo.c 		case PF_UNSPEC:
PF_UNSPEC         428 ext/socket/getaddrinfo.c 			if (!(pai->ai_family == PF_UNSPEC
PF_UNSPEC         498 ext/socket/getaddrinfo.c 			    pai->ai_family == PF_UNSPEC) {
PF_UNSPEC         130 ext/socket/socket.c     PF_INET, PF_INET6, PF_UNSPEC,
PF_UNSPEC         132 ext/socket/socket.c     PF_INET6, PF_INET, PF_UNSPEC,
PF_UNSPEC         148 ext/socket/socket.c     if (hints->ai_family != PF_UNSPEC) {
PF_UNSPEC         158 ext/socket/socket.c 	    if (tmp_hints.ai_family == PF_UNSPEC) {
PF_UNSPEC        2864 ext/socket/socket.c 	hints.ai_family = PF_UNSPEC;
PF_UNSPEC        2990 ext/socket/socket.c 	    hints.ai_family = PF_UNSPEC;
PF_UNSPEC          64 ext/socket/sockport.h #ifndef PF_UNSPEC


PIEVENTSINKOBJ

PIEVENTSINKOBJ   6170 ext/win32ole/win32ole.c void EVENTSINK_Destructor(PIEVENTSINKOBJ);
PIEVENTSINKOBJ   6180 ext/win32ole/win32ole.c         IsEqualIID(iid, &((PIEVENTSINKOBJ)pEV)->m_iid)) {
PIEVENTSINKOBJ   6195 ext/win32ole/win32ole.c     PIEVENTSINKOBJ pEVObj = (PIEVENTSINKOBJ)pEV;
PIEVENTSINKOBJ   6202 ext/win32ole/win32ole.c     PIEVENTSINKOBJ pEVObj = (PIEVENTSINKOBJ)pEV;
PIEVENTSINKOBJ   6333 ext/win32ole/win32ole.c     PIEVENTSINKOBJ pEV = (PIEVENTSINKOBJ)pEventSink;
PIEVENTSINKOBJ   6384 ext/win32ole/win32ole.c PIEVENTSINKOBJ
PIEVENTSINKOBJ   6386 ext/win32ole/win32ole.c     PIEVENTSINKOBJ pEv;
PIEVENTSINKOBJ   6411 ext/win32ole/win32ole.c     PIEVENTSINKOBJ pEVObj


PINC

PINC             2682 regparse.c     	PINC;
PINC             2702 regparse.c     	PINC;
PINC             2712 regparse.c     	  PINC;
PINC             2781 regparse.c           PINC;
PINC             2804 regparse.c           PINC;
PINC             3035 regparse.c     	PINC;
PINC             3044 regparse.c     	  PINC;
PINC             3107 regparse.c     	p = prev; PINC;
PINC             3126 regparse.c     	PINC;
PINC             3204 regparse.c     	PINC;
PINC             3320 regparse.c             PINC;
PINC             3629 regparse.c         PINC;
PINC             3647 regparse.c           PINC; PINC;
PINC             3657 regparse.c         PINC;
PINC             3661 regparse.c         PINC;
PINC             3719 regparse.c           PINC;
PINC             3723 regparse.c     	  PINC;
PINC             4255 regparse.c         PINC;


PIPE_BUF

PIPE_BUF          100 io.c           #ifndef PIPE_BUF
PIPE_BUF          430 io.c               if (PIPE_BUF < l &&
PIPE_BUF          434 io.c                   l = PIPE_BUF;
PIPE_BUF          580 io.c                   if (PIPE_BUF < l &&
PIPE_BUF          584 io.c                       l = PIPE_BUF;


PKCS7_RECIP_INFO_dup

PKCS7_RECIP_INFO_dup   54 ext/openssl/openssl_missing.h #if !defined(PKCS7_RECIP_INFO_dup)
PKCS7_RECIP_INFO_dup  116 ext/openssl/ossl_pkcs7.c     pkcs7 = p7ri ? PKCS7_RECIP_INFO_dup(p7ri) : PKCS7_RECIP_INFO_new();
PKCS7_RECIP_INFO_dup  129 ext/openssl/ossl_pkcs7.c     if (!(pkcs7 = PKCS7_RECIP_INFO_dup(p7ri))) {


PKCS7_SIGNER_INFO

PKCS7_SIGNER_INFO   50 ext/openssl/openssl_missing.h #  define PKCS7_SIGNER_INFO_dup(si) (PKCS7_SIGNER_INFO *)ASN1_dup((int (*)())i2d_PKCS7_SIGNER_INFO, \
PKCS7_SIGNER_INFO   37 ext/openssl/ossl_pkcs7.c     Data_Get_Struct(obj, PKCS7_SIGNER_INFO, p7si); \
PKCS7_SIGNER_INFO   85 ext/openssl/ossl_pkcs7.c ossl_pkcs7si_new(PKCS7_SIGNER_INFO *p7si)
PKCS7_SIGNER_INFO   87 ext/openssl/ossl_pkcs7.c     PKCS7_SIGNER_INFO *pkcs7;
PKCS7_SIGNER_INFO   97 ext/openssl/ossl_pkcs7.c static PKCS7_SIGNER_INFO *
PKCS7_SIGNER_INFO  100 ext/openssl/ossl_pkcs7.c     PKCS7_SIGNER_INFO *p7si, *pkcs7;
PKCS7_SIGNER_INFO  445 ext/openssl/ossl_pkcs7.c     PKCS7_SIGNER_INFO *p7si;
PKCS7_SIGNER_INFO  465 ext/openssl/ossl_pkcs7.c     STACK_OF(PKCS7_SIGNER_INFO) *sk;
PKCS7_SIGNER_INFO  466 ext/openssl/ossl_pkcs7.c     PKCS7_SIGNER_INFO *si;
PKCS7_SIGNER_INFO  786 ext/openssl/ossl_pkcs7.c     PKCS7_SIGNER_INFO *p7si;
PKCS7_SIGNER_INFO  800 ext/openssl/ossl_pkcs7.c     PKCS7_SIGNER_INFO *p7si;
PKCS7_SIGNER_INFO  819 ext/openssl/ossl_pkcs7.c     PKCS7_SIGNER_INFO *p7si;
PKCS7_SIGNER_INFO  829 ext/openssl/ossl_pkcs7.c     PKCS7_SIGNER_INFO *p7si;
PKCS7_SIGNER_INFO  839 ext/openssl/ossl_pkcs7.c     PKCS7_SIGNER_INFO *p7si;


PKCS7_SIGNER_INFO_dup

PKCS7_SIGNER_INFO_dup   49 ext/openssl/openssl_missing.h #if !defined(PKCS7_SIGNER_INFO_dup)
PKCS7_SIGNER_INFO_dup   90 ext/openssl/ossl_pkcs7.c     pkcs7 = p7si ? PKCS7_SIGNER_INFO_dup(p7si) : PKCS7_SIGNER_INFO_new();
PKCS7_SIGNER_INFO_dup  103 ext/openssl/ossl_pkcs7.c     if (!(pkcs7 = PKCS7_SIGNER_INFO_dup(p7si))) {


PKCS7_is_detached

PKCS7_is_detached   98 ext/openssl/openssl_missing.h #if !defined(PKCS7_is_detached)
PKCS7_is_detached  172 ext/openssl/ossl_pkcs7.c     if(!NIL_P(data) && PKCS7_is_detached(p7))
PKCS7_is_detached  425 ext/openssl/ossl_pkcs7.c     return PKCS7_is_detached(p7) ? Qtrue : Qfalse;


PKCS7_type_is_encrypted

PKCS7_type_is_encrypted  102 ext/openssl/openssl_missing.h #if !defined(PKCS7_type_is_encrypted)
PKCS7_type_is_encrypted  387 ext/openssl/ossl_pkcs7.c     if(PKCS7_type_is_encrypted(p7))


PLAIN_IS_INL

PLAIN_IS_INL     1608 ext/syck/token.c                             PLAIN_IS_INL();
PLAIN_IS_INL     1623 ext/syck/token.c                             PLAIN_IS_INL();
PLAIN_IS_INL     1673 ext/syck/token.c                             PLAIN_IS_INL();


PLAIN_NOT_INL

PLAIN_NOT_INL    1604 ext/syck/token.c                             PLAIN_NOT_INL();
PLAIN_NOT_INL    1619 ext/syck/token.c                             PLAIN_NOT_INL();
PLAIN_NOT_INL    1669 ext/syck/token.c                             PLAIN_NOT_INL();


PLATFORM_GET_INC

PLATFORM_GET_INC  667 regint.h       #define GET_RELADDR_INC(addr,p)    PLATFORM_GET_INC(addr,   p, RelAddrType)
PLATFORM_GET_INC  668 regint.h       #define GET_ABSADDR_INC(addr,p)    PLATFORM_GET_INC(addr,   p, AbsAddrType)
PLATFORM_GET_INC  669 regint.h       #define GET_LENGTH_INC(len,p)      PLATFORM_GET_INC(len,    p, LengthType)
PLATFORM_GET_INC  670 regint.h       #define GET_MEMNUM_INC(num,p)      PLATFORM_GET_INC(num,    p, MemNumType)
PLATFORM_GET_INC  671 regint.h       #define GET_REPEATNUM_INC(num,p)   PLATFORM_GET_INC(num,    p, RepeatNumType)
PLATFORM_GET_INC  672 regint.h       #define GET_OPTION_INC(option,p)   PLATFORM_GET_INC(option, p, OnigOptionType)
PLATFORM_GET_INC  673 regint.h       #define GET_POINTER_INC(ptr,p)     PLATFORM_GET_INC(ptr,    p, PointerType)


PLATFORM_UNALIGNED_WORD_ACCESS

PLATFORM_UNALIGNED_WORD_ACCESS   50 regcomp.c      #ifndef PLATFORM_UNALIGNED_WORD_ACCESS
PLATFORM_UNALIGNED_WORD_ACCESS  527 regcomp.c      #ifdef PLATFORM_UNALIGNED_WORD_ACCESS
PLATFORM_UNALIGNED_WORD_ACCESS  567 regcomp.c      #ifdef PLATFORM_UNALIGNED_WORD_ACCESS
PLATFORM_UNALIGNED_WORD_ACCESS 5266 regcomp.c      #ifndef PLATFORM_UNALIGNED_WORD_ACCESS
PLATFORM_UNALIGNED_WORD_ACCESS 5280 regcomp.c      #ifndef PLATFORM_UNALIGNED_WORD_ACCESS
PLATFORM_UNALIGNED_WORD_ACCESS 1633 regexec.c      #ifdef PLATFORM_UNALIGNED_WORD_ACCESS
PLATFORM_UNALIGNED_WORD_ACCESS 1698 regexec.c      #ifdef PLATFORM_UNALIGNED_WORD_ACCESS
PLATFORM_UNALIGNED_WORD_ACCESS  232 regint.h       #ifndef PLATFORM_UNALIGNED_WORD_ACCESS
PLATFORM_UNALIGNED_WORD_ACCESS  400 regint.h       #ifdef PLATFORM_UNALIGNED_WORD_ACCESS
PLATFORM_UNALIGNED_WORD_ACCESS  651 regint.h       #ifdef PLATFORM_UNALIGNED_WORD_ACCESS


POP

POP               609 ext/racc/cparse/cparse.c         POP(v->state);
POP               610 ext/racc/cparse/cparse.c         POP(v->vstack);
POP               613 ext/racc/cparse/cparse.c             POP(v->tstack);
POP               480 util.c           POP(L,R);


POP_BLOCK

POP_BLOCK        2987 eval.c         	POP_BLOCK();
POP_BLOCK        3029 eval.c         	    POP_BLOCK();
POP_BLOCK        5126 eval.c             POP_BLOCK();
POP_BLOCK        8007 eval.c             POP_BLOCK();


POP_CLASS

POP_CLASS        1614 eval.c             POP_CLASS();
POP_CLASS        3999 eval.c             POP_CLASS();
POP_CLASS        4849 eval.c             POP_CLASS();
POP_CLASS        5732 eval.c         	    POP_CLASS();
POP_CLASS        6166 eval.c             POP_CLASS();
POP_CLASS        6311 eval.c             POP_CLASS();
POP_CLASS        6624 eval.c             POP_CLASS();


POP_CREF

POP_CREF         3996 eval.c             POP_CREF();
POP_CREF         6308 eval.c             if (cbase) POP_CREF();


POP_FRAME

POP_FRAME        1613 eval.c             POP_FRAME();
POP_FRAME        1752 eval.c             POP_FRAME();
POP_FRAME        2561 eval.c             POP_FRAME();
POP_FRAME        4504 eval.c         	POP_FRAME();
POP_FRAME        5406 eval.c         	POP_FRAME();
POP_FRAME        5762 eval.c             POP_FRAME();
POP_FRAME        6274 eval.c         	POP_FRAME();
POP_FRAME        6310 eval.c             POP_FRAME();
POP_FRAME        6622 eval.c             POP_FRAME();
POP_FRAME        7508 eval.c             POP_FRAME();
POP_FRAME        7519 eval.c             POP_FRAME();
POP_FRAME        9189 eval.c             POP_FRAME();
POP_FRAME        11858 eval.c             POP_FRAME();


POP_ITER

POP_ITER         1490 eval.c             POP_ITER();
POP_ITER         1520 eval.c             POP_ITER();
POP_ITER         1727 eval.c         	POP_ITER();
POP_ITER         2159 eval.c             POP_ITER();\
POP_ITER         2986 eval.c         	POP_ITER();
POP_ITER         3019 eval.c         		POP_ITER();
POP_ITER         4814 eval.c         		POP_ITER();
POP_ITER         4847 eval.c             POP_ITER();
POP_ITER         5128 eval.c             POP_ITER();
POP_ITER         5763 eval.c             POP_ITER();
POP_ITER         5841 eval.c             POP_ITER();
POP_ITER         5949 eval.c             POP_ITER();
POP_ITER         6623 eval.c             POP_ITER();
POP_ITER         7276 eval.c             POP_ITER();
POP_ITER         7509 eval.c             POP_ITER();
POP_ITER         8256 eval.c             POP_ITER();
POP_ITER         8535 eval.c         	POP_ITER();
POP_ITER         8555 eval.c         	POP_ITER();
POP_ITER         8589 eval.c             POP_ITER();
POP_ITER         8901 eval.c             POP_ITER();
POP_ITER         9190 eval.c             POP_ITER();
POP_ITER         9849 eval.c             POP_ITER();


POP_LEVEL

POP_LEVEL         314 ext/syck/bytecode.c             POP_LEVEL();
POP_LEVEL         439 ext/syck/bytecode.c             POP_LEVEL();
POP_LEVEL        1088 ext/syck/bytecode.c             POP_LEVEL();
POP_LEVEL         614 ext/syck/token.c {   POP_LEVEL();
POP_LEVEL        1832 ext/syck/token.c                             POP_LEVEL();
POP_LEVEL        2000 ext/syck/token.c                             POP_LEVEL();
POP_LEVEL        2468 ext/syck/token.c                             POP_LEVEL();
POP_LEVEL        2508 ext/syck/token.c                         POP_LEVEL();
POP_LEVEL        2548 ext/syck/token.c                             POP_LEVEL();


POP_SCOPE

POP_SCOPE        1322 eval.c             POP_SCOPE();
POP_SCOPE        1612 eval.c             POP_SCOPE();
POP_SCOPE        3375 eval.c         	    POP_SCOPE();
POP_SCOPE        3998 eval.c             POP_SCOPE();
POP_SCOPE        5733 eval.c         	    POP_SCOPE();
POP_SCOPE        6621 eval.c             POP_SCOPE();


POP_TAG

POP_TAG          1017 eval.c             POP_TAG()
POP_TAG          1235 eval.c             POP_TAG();
POP_TAG          1317 eval.c             POP_TAG();
POP_TAG          1447 eval.c             POP_TAG();
POP_TAG          1726 eval.c         	POP_TAG();
POP_TAG          1751 eval.c             POP_TAG();
POP_TAG          2357 eval.c         	POP_TAG();
POP_TAG          2560 eval.c             POP_TAG();
POP_TAG          2797 eval.c         	POP_TAG();
POP_TAG          2935 eval.c         	POP_TAG();
POP_TAG          2970 eval.c         	POP_TAG();
POP_TAG          2988 eval.c         	POP_TAG();
POP_TAG          3030 eval.c         	    POP_TAG();
POP_TAG          3126 eval.c         	    POP_TAG();
POP_TAG          3144 eval.c         	POP_TAG();
POP_TAG          3374 eval.c         	    POP_TAG();
POP_TAG          3995 eval.c             POP_TAG();
POP_TAG          4379 eval.c         	POP_TAG();
POP_TAG          4772 eval.c         	POP_TAG();
POP_TAG          4846 eval.c             POP_TAG();
POP_TAG          5127 eval.c             POP_TAG();
POP_TAG          5206 eval.c             POP_TAG();
POP_TAG          5257 eval.c             POP_TAG();
POP_TAG          5280 eval.c         	POP_TAG();
POP_TAG          5301 eval.c         	POP_TAG();
POP_TAG          5636 eval.c         		POP_TAG();
POP_TAG          5730 eval.c         	    POP_TAG();
POP_TAG          6165 eval.c             POP_TAG();
POP_TAG          6307 eval.c             POP_TAG();
POP_TAG          6618 eval.c             POP_TAG();
POP_TAG          6960 eval.c             POP_TAG();
POP_TAG          7572 eval.c         	    POP_TAG();
POP_TAG          7590 eval.c         	    POP_TAG();
POP_TAG          8255 eval.c             POP_TAG();
POP_TAG          8588 eval.c             POP_TAG();
POP_TAG          11769 eval.c             POP_TAG();
POP_TAG          11857 eval.c             POP_TAG();
POP_TAG          12948 eval.c             POP_TAG();
POP_TAG          13096 eval.c         	POP_TAG();


POP_THREAD_TAG

POP_THREAD_TAG   1435 eval.c             POP_THREAD_TAG();
POP_THREAD_TAG   1494 eval.c             POP_THREAD_TAG();
POP_THREAD_TAG   1521 eval.c             POP_THREAD_TAG();
POP_THREAD_TAG   5235 eval.c             POP_THREAD_TAG();
POP_THREAD_TAG   6648 eval.c             POP_THREAD_TAG();


POP_VARS

POP_VARS         3997 eval.c             POP_VARS();
POP_VARS         4864 eval.c             POP_VARS();
POP_VARS         5731 eval.c         	    POP_VARS();
POP_VARS         6625 eval.c             POP_VARS();
POP_VARS         8259 eval.c             POP_VARS();


POSFIXABLE

POSFIXABLE        109 bignum.c       		    if (POSFIXABLE(num)) return LONG2FIX(num);
POSFIXABLE        165 bignum.c           if (POSFIXABLE(n)) return LONG2FIX(n);
POSFIXABLE        223 bignum.c       	if (POSFIXABLE(q)) return LONG2FIX(q);
POSFIXABLE        419 bignum.c       	if (POSFIXABLE(val)) {
POSFIXABLE        561 bignum.c           if (POSFIXABLE(n)) return LONG2FIX(n);
POSFIXABLE        812 bignum.c           while (!POSFIXABLE(u) || 0 != (long)u) {
POSFIXABLE        179 ruby.h         #define FIXABLE(f) (POSFIXABLE(f) && NEGFIXABLE(f))


POSIX2_DATE

POSIX2_DATE        73 missing/strftime.c #if ! defined(POSIX2_DATE)
POSIX2_DATE        78 missing/strftime.c #if defined(POSIX2_DATE)
POSIX2_DATE        87 missing/strftime.c #if defined(POSIX2_DATE)
POSIX2_DATE       536 missing/strftime.c #ifdef POSIX2_DATE
POSIX2_DATE       622 missing/strftime.c #ifdef POSIX2_DATE


POSIX_SEMANTICS

POSIX_SEMANTICS   185 missing/strftime.c #ifdef POSIX_SEMANTICS
POSIX_SEMANTICS   232 missing/strftime.c #ifndef POSIX_SEMANTICS


PPEEK

PPEEK             259 regparse.c     #define PPEEK_IS(c)  (PPEEK == (OnigCodePoint )c)
PPEEK            2244 regparse.c         c = PPEEK;
PPEEK            2679 regparse.c           c2 = PPEEK;
PPEEK            2706 regparse.c               c2 = PPEEK;
PPEEK            3039 regparse.c               if (ONIGENC_IS_CODE_XDIGIT(enc, PPEEK))
PPEEK            3656 regparse.c       while (!PEND && ((c = PPEEK) != ':') && c != ']') {
PPEEK            3717 regparse.c         c = PPEEK;
PPEEK            3721 regparse.c     	c = PPEEK;


PPEEK_IS

PPEEK_IS         2701 regparse.c           if (PPEEK_IS('{') && IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_BRACE_HEX8)) {
PPEEK_IS         2711 regparse.c     	if (p > prev + enc_len(enc, prev) && !PEND && (PPEEK_IS('}'))) {
PPEEK_IS         2778 regparse.c         if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_POSIX_BRACKET) && (PPEEK_IS(':'))) {
PPEEK_IS         2803 regparse.c     	!PEND && (PPEEK_IS('&'))) {
PPEEK_IS         2867 regparse.c           if (!PEND && PPEEK_IS('?') &&
PPEEK_IS         2875 regparse.c     	if (!PEND && PPEEK_IS('+') &&
PPEEK_IS         3034 regparse.c           if (PPEEK_IS('{') && IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_BRACE_HEX8)) {
PPEEK_IS         3043 regparse.c     	if ((p > prev + enc_len(enc, prev)) && !PEND && PPEEK_IS('}')) {
PPEEK_IS         3202 regparse.c           if (PPEEK_IS('{') &&
PPEEK_IS         3318 regparse.c           if (PPEEK_IS('?') &&
PPEEK_IS         3321 regparse.c             if (PPEEK_IS('#')) {
PPEEK_IS         3628 regparse.c       if (PPEEK_IS('^')) {
PPEEK_IS         4253 regparse.c       if (PPEEK_IS('?') &&


PREP_STDIO_NAME

PREP_STDIO_NAME  3289 io.c           		     PREP_STDIO_NAME(fptr), rb_io_flags_mode(fptr->mode),
PREP_STDIO_NAME  3400 io.c           		     PREP_STDIO_NAME(fptr), rb_io_flags_mode(fptr->mode),


PRINT

PRINT             534 missing/vsnprintf.c 			PRINT(with, PADSIZE); \
PRINT             537 missing/vsnprintf.c 		PRINT(with, n); \
PRINT             578 missing/vsnprintf.c 			PRINT(cp, n);
PRINT             932 missing/vsnprintf.c 			PRINT(&sign, 1);
PRINT             936 missing/vsnprintf.c 			PRINT(ox, 2);
PRINT             949 missing/vsnprintf.c 			PRINT(cp, size);
PRINT             956 missing/vsnprintf.c 						PRINT("0", 1);
PRINT             958 missing/vsnprintf.c 						PRINT("0.", 2);
PRINT             962 missing/vsnprintf.c 					PRINT("0.", 2);
PRINT             964 missing/vsnprintf.c 					PRINT(cp, ndig);
PRINT             966 missing/vsnprintf.c 					PRINT(cp, ndig);
PRINT             969 missing/vsnprintf.c 						PRINT(".", 1);
PRINT             971 missing/vsnprintf.c 					PRINT(cp, expt);
PRINT             973 missing/vsnprintf.c 					PRINT(".", 1);
PRINT             974 missing/vsnprintf.c 					PRINT(cp, ndig-expt);
PRINT             980 missing/vsnprintf.c 					PRINT(ox, 2);
PRINT             982 missing/vsnprintf.c 						PRINT(cp, ndig-1);
PRINT             987 missing/vsnprintf.c 					PRINT(cp, 1);
PRINT             988 missing/vsnprintf.c 				PRINT(expstr, expsize);
PRINT             992 missing/vsnprintf.c 		PRINT(cp, size);


PRINTF_ARGS

PRINTF_ARGS       155 intern.h       PRINTF_ARGS(NORETURN(void rb_loaderror(const char*, ...)), 1, 2);
PRINTF_ARGS       156 intern.h       PRINTF_ARGS(NORETURN(void rb_name_error(ID, const char*, ...)), 2, 3);
PRINTF_ARGS       158 intern.h       PRINTF_ARGS(void rb_compile_error(const char*, ...), 1, 2);
PRINTF_ARGS       159 intern.h       PRINTF_ARGS(void rb_compile_error_append(const char*, ...), 1, 2);
PRINTF_ARGS       470 intern.h       PRINTF_ARGS(VALUE rb_sprintf(const char*, ...), 1, 2);
PRINTF_ARGS       556 ruby.h         PRINTF_ARGS(NORETURN(void rb_raise(VALUE, const char*, ...)), 2, 3);
PRINTF_ARGS       557 ruby.h         PRINTF_ARGS(NORETURN(void rb_fatal(const char*, ...)), 1, 2);
PRINTF_ARGS       558 ruby.h         PRINTF_ARGS(NORETURN(void rb_bug(const char*, ...)), 1, 2);
PRINTF_ARGS       565 ruby.h         PRINTF_ARGS(void rb_warning(const char*, ...), 1, 2);
PRINTF_ARGS       567 ruby.h         PRINTF_ARGS(void rb_sys_warning(const char*, ...), 1, 2);
PRINTF_ARGS       569 ruby.h         PRINTF_ARGS(void rb_warn(const char*, ...), 1, 2);


PROC_SAFE_SAVED

PROC_SAFE_SAVED  8048 eval.c         #define proc_safe_level_p(data) (RBASIC(data)->flags & PROC_SAFE_SAVED)
PROC_SAFE_SAVED  8056 eval.c             FL_SET(data, PROC_SAFE_SAVED);


PROC_TMASK

PROC_TMASK       8043 eval.c         #define PROC_TMAX   (PROC_TMASK >> PROC_TSHIFT)
PROC_TMASK       8046 eval.c         #define SAFE_LEVEL_MAX PROC_TMASK
PROC_TMASK       8055 eval.c             FL_SET(data, (safe << PROC_TSHIFT) & PROC_TMASK);
PROC_TMASK       8062 eval.c             return (RBASIC(data)->flags & PROC_TMASK) >> PROC_TSHIFT;


PROC_TSHIFT

PROC_TSHIFT      8043 eval.c         #define PROC_TMAX   (PROC_TMASK >> PROC_TSHIFT)
PROC_TSHIFT      8055 eval.c             FL_SET(data, (safe << PROC_TSHIFT) & PROC_TMASK);
PROC_TSHIFT      8062 eval.c             return (RBASIC(data)->flags & PROC_TMASK) >> PROC_TSHIFT;


PROTO

PROTO             283 ext/nkf/nkf-utf8/nkf.c     void (*status_func)PROTO((struct input_code *, int));
PROTO             284 ext/nkf/nkf-utf8/nkf.c     int (*iconv_func)PROTO((int c2, int c1, int c0));
PROTO             294 ext/nkf/nkf-utf8/nkf.c STATIC  int     noconvert PROTO((FILE *f));
PROTO             296 ext/nkf/nkf-utf8/nkf.c STATIC  int     kanji_convert PROTO((FILE *f));
PROTO             297 ext/nkf/nkf-utf8/nkf.c STATIC  int     h_conv PROTO((FILE *f,int c2,int c1));
PROTO             298 ext/nkf/nkf-utf8/nkf.c STATIC  int     push_hold_buf PROTO((int c2));
PROTO             299 ext/nkf/nkf-utf8/nkf.c STATIC  void    set_iconv PROTO((int f, int (*iconv_func)(int c2,int c1,int c0)));
PROTO             300 ext/nkf/nkf-utf8/nkf.c STATIC  int     s_iconv PROTO((int c2,int c1,int c0));
PROTO             301 ext/nkf/nkf-utf8/nkf.c STATIC  int     s2e_conv PROTO((int c2, int c1, int *p2, int *p1));
PROTO             302 ext/nkf/nkf-utf8/nkf.c STATIC  int     e_iconv PROTO((int c2,int c1,int c0));
PROTO             304 ext/nkf/nkf-utf8/nkf.c STATIC  int     w2e_conv PROTO((int c2,int c1,int c0,int *p2,int *p1));
PROTO             305 ext/nkf/nkf-utf8/nkf.c STATIC  int     w_iconv PROTO((int c2,int c1,int c0));
PROTO             306 ext/nkf/nkf-utf8/nkf.c STATIC  int     w_iconv16 PROTO((int c2,int c1,int c0));
PROTO             307 ext/nkf/nkf-utf8/nkf.c STATIC  int	w_iconv_common PROTO((int c1,int c0,const unsigned short *const *pp,int psize,int *p2,int *p1));
PROTO             308 ext/nkf/nkf-utf8/nkf.c STATIC  int     ww16_conv PROTO((int c2, int c1, int c0));
PROTO             311 ext/nkf/nkf-utf8/nkf.c STATIC  int     e2w_conv PROTO((int c2,int c1));
PROTO             312 ext/nkf/nkf-utf8/nkf.c STATIC  void    w_oconv PROTO((int c2,int c1));
PROTO             313 ext/nkf/nkf-utf8/nkf.c STATIC  void    w_oconv16 PROTO((int c2,int c1));
PROTO             315 ext/nkf/nkf-utf8/nkf.c STATIC  void    e_oconv PROTO((int c2,int c1));
PROTO             316 ext/nkf/nkf-utf8/nkf.c STATIC  int     e2s_conv PROTO((int c2, int c1, int *p2, int *p1));
PROTO             317 ext/nkf/nkf-utf8/nkf.c STATIC  void    s_oconv PROTO((int c2,int c1));
PROTO             318 ext/nkf/nkf-utf8/nkf.c STATIC  void    j_oconv PROTO((int c2,int c1));
PROTO             319 ext/nkf/nkf-utf8/nkf.c STATIC  void    fold_conv PROTO((int c2,int c1));
PROTO             320 ext/nkf/nkf-utf8/nkf.c STATIC  void    cr_conv PROTO((int c2,int c1));
PROTO             321 ext/nkf/nkf-utf8/nkf.c STATIC  void    z_conv PROTO((int c2,int c1));
PROTO             322 ext/nkf/nkf-utf8/nkf.c STATIC  void    rot_conv PROTO((int c2,int c1));
PROTO             323 ext/nkf/nkf-utf8/nkf.c STATIC  void    hira_conv PROTO((int c2,int c1));
PROTO             324 ext/nkf/nkf-utf8/nkf.c STATIC  void    base64_conv PROTO((int c2,int c1));
PROTO             325 ext/nkf/nkf-utf8/nkf.c STATIC  void    iso2022jp_check_conv PROTO((int c2,int c1));
PROTO             326 ext/nkf/nkf-utf8/nkf.c STATIC  void    no_connection PROTO((int c2,int c1));
PROTO             327 ext/nkf/nkf-utf8/nkf.c STATIC  int     no_connection2 PROTO((int c2,int c1,int c0));
PROTO             329 ext/nkf/nkf-utf8/nkf.c STATIC  void    code_score PROTO((struct input_code *ptr));
PROTO             330 ext/nkf/nkf-utf8/nkf.c STATIC  void    code_status PROTO((int c));
PROTO             332 ext/nkf/nkf-utf8/nkf.c STATIC  void    std_putc PROTO((int c));
PROTO             333 ext/nkf/nkf-utf8/nkf.c STATIC  int     std_getc PROTO((FILE *f));
PROTO             334 ext/nkf/nkf-utf8/nkf.c STATIC  int     std_ungetc PROTO((int c,FILE *f));
PROTO             336 ext/nkf/nkf-utf8/nkf.c STATIC  int     broken_getc PROTO((FILE *f));
PROTO             337 ext/nkf/nkf-utf8/nkf.c STATIC  int     broken_ungetc PROTO((int c,FILE *f));
PROTO             339 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_begin PROTO((FILE *f));
PROTO             340 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_getc PROTO((FILE *f));
PROTO             341 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_ungetc PROTO((int c,FILE *f));
PROTO             343 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_begin_strict PROTO((FILE *f));
PROTO             344 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_getc_buf PROTO((FILE *f));
PROTO             345 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_ungetc_buf  PROTO((int c,FILE *f));
PROTO             346 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_integrity PROTO((FILE *f,const unsigned char *p));
PROTO             348 ext/nkf/nkf-utf8/nkf.c STATIC  int     base64decode PROTO((int c));
PROTO             349 ext/nkf/nkf-utf8/nkf.c STATIC  void    mime_prechar PROTO((int c2, int c1));
PROTO             350 ext/nkf/nkf-utf8/nkf.c STATIC  void    mime_putc PROTO((int c));
PROTO             351 ext/nkf/nkf-utf8/nkf.c STATIC  void    open_mime PROTO((int c));
PROTO             352 ext/nkf/nkf-utf8/nkf.c STATIC  void    close_mime PROTO(());
PROTO             354 ext/nkf/nkf-utf8/nkf.c STATIC  void    usage PROTO(());
PROTO             355 ext/nkf/nkf-utf8/nkf.c STATIC  void    version PROTO(());
PROTO             357 ext/nkf/nkf-utf8/nkf.c STATIC  void    options PROTO((unsigned char *c));
PROTO             359 ext/nkf/nkf-utf8/nkf.c STATIC  void    reinit PROTO(());
PROTO             380 ext/nkf/nkf-utf8/nkf.c STATIC int (*mime_iconv_back)PROTO((int c2,int c1,int c0)) = NULL;
PROTO             414 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_nfc_getc)PROTO((FILE *)) = std_getc; /* input of ugetc */
PROTO             415 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_nfc_ungetc)PROTO((int c ,FILE *f)) = std_ungetc;
PROTO             416 ext/nkf/nkf-utf8/nkf.c STATIC int nfc_getc PROTO((FILE *f));
PROTO             417 ext/nkf/nkf-utf8/nkf.c STATIC int nfc_ungetc PROTO((int c,FILE *f));
PROTO             422 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_cgetc)PROTO((FILE *)) = std_getc; /* input of cgetc */
PROTO             423 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_cungetc)PROTO((int c ,FILE *f)) = std_ungetc;
PROTO             424 ext/nkf/nkf-utf8/nkf.c STATIC int cap_getc PROTO((FILE *f));
PROTO             425 ext/nkf/nkf-utf8/nkf.c STATIC int cap_ungetc PROTO((int c,FILE *f));
PROTO             428 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_ugetc)PROTO((FILE *)) = std_getc; /* input of ugetc */
PROTO             429 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_uungetc)PROTO((int c ,FILE *f)) = std_ungetc;
PROTO             430 ext/nkf/nkf-utf8/nkf.c STATIC int url_getc PROTO((FILE *f));
PROTO             431 ext/nkf/nkf-utf8/nkf.c STATIC int url_ungetc PROTO((int c,FILE *f));
PROTO             438 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_ngetc)PROTO((FILE *)) = std_getc; /* input of ugetc */
PROTO             439 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_nungetc)PROTO((int c ,FILE *f)) = std_ungetc;
PROTO             440 ext/nkf/nkf-utf8/nkf.c STATIC int numchar_getc PROTO((FILE *f));
PROTO             441 ext/nkf/nkf-utf8/nkf.c STATIC int numchar_ungetc PROTO((int c,FILE *f));
PROTO             446 ext/nkf/nkf-utf8/nkf.c STATIC void no_putc PROTO((int c));
PROTO             448 ext/nkf/nkf-utf8/nkf.c STATIC void debug PROTO((const char *str));
PROTO             454 ext/nkf/nkf-utf8/nkf.c STATIC  void    print_guessed_code PROTO((char *filename));
PROTO             456 ext/nkf/nkf-utf8/nkf.c STATIC  void    set_input_codename PROTO((char *codename));
PROTO             478 ext/nkf/nkf-utf8/nkf.c STATIC int x0212_shift PROTO((int c));
PROTO             479 ext/nkf/nkf-utf8/nkf.c STATIC int x0212_unshift PROTO((int c));
PROTO             484 ext/nkf/nkf-utf8/nkf.c STATIC void e_status PROTO((struct input_code *, int));
PROTO             485 ext/nkf/nkf-utf8/nkf.c STATIC void s_status PROTO((struct input_code *, int));
PROTO             488 ext/nkf/nkf-utf8/nkf.c STATIC void w_status PROTO((struct input_code *, int));
PROTO             489 ext/nkf/nkf-utf8/nkf.c STATIC void w16_status PROTO((struct input_code *, int));
PROTO             542 ext/nkf/nkf-utf8/nkf.c STATIC void (*output_conv)PROTO((int c2,int c1)) = DEFAULT_CONV;
PROTO             544 ext/nkf/nkf-utf8/nkf.c STATIC void (*oconv)PROTO((int c2,int c1)) = no_connection;
PROTO             546 ext/nkf/nkf-utf8/nkf.c STATIC int (*iconv)PROTO((int c2,int c1,int c0)) = no_connection2;
PROTO             548 ext/nkf/nkf-utf8/nkf.c STATIC void (*o_zconv)PROTO((int c2,int c1)) = no_connection;
PROTO             549 ext/nkf/nkf-utf8/nkf.c STATIC void (*o_fconv)PROTO((int c2,int c1)) = no_connection;
PROTO             550 ext/nkf/nkf-utf8/nkf.c STATIC void (*o_crconv)PROTO((int c2,int c1)) = no_connection;
PROTO             551 ext/nkf/nkf-utf8/nkf.c STATIC void (*o_rot_conv)PROTO((int c2,int c1)) = no_connection;
PROTO             552 ext/nkf/nkf-utf8/nkf.c STATIC void (*o_hira_conv)PROTO((int c2,int c1)) = no_connection;
PROTO             553 ext/nkf/nkf-utf8/nkf.c STATIC void (*o_base64conv)PROTO((int c2,int c1)) = no_connection;
PROTO             554 ext/nkf/nkf-utf8/nkf.c STATIC void (*o_iso2022jp_check_conv)PROTO((int c2,int c1)) = no_connection;
PROTO             558 ext/nkf/nkf-utf8/nkf.c STATIC  void   (*o_putc)PROTO((int c)) = std_putc;
PROTO             560 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_getc)PROTO((FILE *f)) = std_getc; /* general input */
PROTO             561 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_ungetc)PROTO((int c,FILE *f)) =std_ungetc;
PROTO             563 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_bgetc)PROTO((FILE *)) = std_getc; /* input of mgetc */
PROTO             564 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_bungetc)PROTO((int c ,FILE *f)) = std_ungetc;
PROTO             566 ext/nkf/nkf-utf8/nkf.c STATIC  void   (*o_mputc)PROTO((int c)) = std_putc ; /* output of mputc */
PROTO             568 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_mgetc)PROTO((FILE *)) = std_getc; /* input of mgetc */
PROTO             569 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_mungetc)PROTO((int c ,FILE *f)) = std_ungetc;
PROTO             572 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_mgetc_buf)PROTO((FILE *)) = std_getc; /* input of mgetc_buf */
PROTO             573 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_mungetc_buf)PROTO((int c,FILE *f)) = std_ungetc;
PROTO            3581 ext/nkf/nkf-utf8/nkf.c int (*mime_priority_func[])PROTO((int c2, int c1, int c0)) = {


PROT_FUNC

PROT_FUNC        4595 eval.c         	if ((tt->tag == PROT_FUNC && tt->frame->uniq == ruby_frame->uniq) ||
PROT_FUNC        4626 eval.c         	  case PROT_FUNC:
PROT_FUNC        5632 eval.c         		PUSH_TAG(PROT_FUNC);
PROT_FUNC        5705 eval.c         	    PUSH_TAG(PROT_FUNC);


PROT_LAMBDA

PROT_LAMBDA      4596 eval.c         	    (tt->tag == PROT_LAMBDA && !yield))
PROT_LAMBDA      4621 eval.c         	  case PROT_LAMBDA:
PROT_LAMBDA      8245 eval.c             PUSH_TAG((pcall&YIELD_LAMBDA_CALL) ? PROT_LAMBDA : PROT_NONE);


PROT_LOOP

PROT_LOOP        2776 eval.c         	PUSH_TAG(PROT_LOOP);
PROT_LOOP        2905 eval.c         	PUSH_TAG(PROT_LOOP);
PROT_LOOP        2940 eval.c         	PUSH_TAG(PROT_LOOP);
PROT_LOOP        2979 eval.c         	PUSH_TAG(PROT_LOOP);
PROT_LOOP        2994 eval.c         	    PUSH_TAG(PROT_LOOP);
PROT_LOOP        4620 eval.c         	  case PROT_LOOP:
PROT_LOOP        4881 eval.c         		if (tt->tag == PROT_LOOP && tt->blkid == ruby_block->uniq) {
PROT_LOOP        5111 eval.c             PUSH_TAG(PROT_LOOP);
PROT_LOOP        8571 eval.c             PUSH_TAG(PROT_LOOP);


PROT_NONE

PROT_NONE        1141 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        1301 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        1443 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        1720 eval.c         	PUSH_TAG(PROT_NONE);
PROT_NONE        1743 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        2353 eval.c         	PUSH_TAG(PROT_NONE);
PROT_NONE        2546 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        3090 eval.c         	    PUSH_TAG(PROT_NONE);
PROT_NONE        3140 eval.c         	PUSH_TAG(PROT_NONE);
PROT_NONE        3355 eval.c         	    PUSH_TAG(PROT_NONE);
PROT_NONE        3989 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        4371 eval.c         	PUSH_TAG(PROT_NONE);
PROT_NONE        4696 eval.c         	PUSH_TAG(PROT_NONE);
PROT_NONE        4788 eval.c             PUSH_TAG(lambda ? PROT_NONE : PROT_YIELD);
PROT_NONE        5173 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        5253 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        5276 eval.c         	PUSH_TAG(PROT_NONE);
PROT_NONE        5297 eval.c         	PUSH_TAG(PROT_NONE);
PROT_NONE        6150 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        6303 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        6583 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        6916 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        7567 eval.c         	    PUSH_TAG(PROT_NONE);
PROT_NONE        7585 eval.c         	    PUSH_TAG(PROT_NONE);
PROT_NONE        8245 eval.c             PUSH_TAG((pcall&YIELD_LAMBDA_CALL) ? PROT_LAMBDA : PROT_NONE);
PROT_NONE        11757 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        11845 eval.c             PUSH_TAG(PROT_NONE);
PROT_NONE        13092 eval.c         	PUSH_TAG(PROT_NONE);


PROT_THREAD

PROT_THREAD      1010 eval.c         #define PUSH_THREAD_TAG() PUSH_TAG(PROT_THREAD); \
PROT_THREAD      4602 eval.c         	if (tt->tag == PROT_THREAD && tt->prev) {
PROT_THREAD      4618 eval.c         	  case PROT_THREAD:
PROT_THREAD      12993 eval.c         	if (tt->tag == PROT_THREAD) {


PROT_YIELD

PROT_YIELD       4591 eval.c         	if (tt->tag == PROT_YIELD) {
PROT_YIELD       4619 eval.c         	  case PROT_YIELD:
PROT_YIELD       4788 eval.c             PUSH_TAG(lambda ? PROT_NONE : PROT_YIELD);


PTR2NUM

PTR2NUM           187 ext/dl/cfunc.c     return PTR2NUM(cfunc->ptr);
PTR2NUM           288 ext/dl/cfunc.c 	    result = PTR2NUM(ret); \
PTR2NUM           386 ext/dl/cfunc.c 	    result = PTR2NUM(ret); \
PTR2NUM           485 ext/dl/cfunc.c   return PTR2NUM(cfunc->ptr);
PTR2NUM           179 ext/dl/cptr.c    return PTR2NUM(data->ptr);
PTR2NUM           318 ext/dl/cptr.c    return PTR2NUM((long)ptr1 - (long)ptr2);
PTR2NUM            27 ext/dl/dl.c        return PTR2NUM(ptr);
PTR2NUM            36 ext/dl/dl.c        return PTR2NUM(ptr);
PTR2NUM            56 ext/dl/dl.c        return PTR2NUM((void*)val);
PTR2NUM           144 ext/dl/dl.c        rb_define_const(rb_mDL, "RUBY_FREE", PTR2NUM(ruby_xfree));
PTR2NUM           122 ext/dl/handle.c   return PTR2NUM(dlhandle);
PTR2NUM           212 ext/dl/handle.c     return PTR2NUM(func);


PTR_NOT_EQUAL

PTR_NOT_EQUAL     225 st.c               if (PTR_NOT_EQUAL(table, ptr, hash_val, key)) {\
PTR_NOT_EQUAL     227 st.c           	while (PTR_NOT_EQUAL(table, ptr->next, hash_val, key)) {\


PUNFETCH

PUNFETCH         1497 regparse.c           PUNFETCH;
PUNFETCH         1525 regparse.c           PUNFETCH;
PUNFETCH         1553 regparse.c           PUNFETCH;
PUNFETCH         2284 regparse.c         PUNFETCH;
PUNFETCH         2692 regparse.c     	    PUNFETCH;
PUNFETCH         2753 regparse.c     	PUNFETCH;
PUNFETCH         2767 regparse.c           PUNFETCH;
PUNFETCH         2787 regparse.c     	PUNFETCH;
PUNFETCH         3083 regparse.c           PUNFETCH;
PUNFETCH         3168 regparse.c     	  PUNFETCH;
PUNFETCH         3189 regparse.c     	  PUNFETCH;
PUNFETCH         3214 regparse.c     	    PUNFETCH;
PUNFETCH         3220 regparse.c           PUNFETCH;
PUNFETCH         3335 regparse.c             PUNFETCH;
PUNFETCH         3725 regparse.c     	  PUNFETCH;
PUNFETCH         4291 regparse.c     	PUNFETCH;
PUNFETCH         4327 regparse.c     	  PUNFETCH;


PUSH

PUSH               36 ext/bigdecimal/bigdecimal.c #define SAVE(p)  PUSH(p->obj);
PUSH              370 ext/racc/cparse/cparse.c     PUSH(v->state, INT2FIX(0));
PUSH              644 ext/racc/cparse/cparse.c     PUSH(v->vstack, val);
PUSH              646 ext/racc/cparse/cparse.c         PUSH(v->tstack, tok);
PUSH              651 ext/racc/cparse/cparse.c     PUSH(v->state, LONG2NUM(v->curstate));
PUSH              727 ext/racc/cparse/cparse.c     PUSH(v->vstack, tmp);
PUSH              729 ext/racc/cparse/cparse.c         PUSH(v->tstack, reduce_to);
PUSH              769 ext/racc/cparse/cparse.c     PUSH(v->state, goto_state);
PUSH              276 sprintf.c      	PUSH(p, t - p);
PUSH              389 sprintf.c      	    PUSH("%", 1);
PUSH              399 sprintf.c      		    PUSH(&c, 1);
PUSH              442 sprintf.c      		PUSH(RSTRING(str)->ptr, len);
PUSH              665 sprintf.c      		if (sc) PUSH(&sc, 1);
PUSH              668 sprintf.c      		    PUSH(prefix, plen);
PUSH              688 sprintf.c      		PUSH(s, len);
PUSH              603 util.c         	if (l-L < R-r) {PUSH(r,R); R = l;} /* sort left side first */
PUSH              604 util.c         	else           {PUSH(L,l); L = r;} /* sort right side first */


PUSH_BLOCK

PUSH_BLOCK       2980 eval.c         	PUSH_BLOCK(node->nd_var, node->nd_body);
PUSH_BLOCK       2995 eval.c         	    PUSH_BLOCK(node->nd_var, node->nd_body);
PUSH_BLOCK       5112 eval.c             PUSH_BLOCK(0, node);
PUSH_BLOCK       7979 eval.c             PUSH_BLOCK(0,0);


PUSH_CLASS

PUSH_CLASS       1598 eval.c             PUSH_CLASS(ruby_wrapper = rb_module_new());
PUSH_CLASS       3972 eval.c             PUSH_CLASS(module);
PUSH_CLASS       4688 eval.c             PUSH_CLASS(klass ? klass : block->klass);
PUSH_CLASS       5682 eval.c         	    PUSH_CLASS(ruby_cbase);
PUSH_CLASS       6145 eval.c             PUSH_CLASS(ruby_cbase);
PUSH_CLASS       6290 eval.c             PUSH_CLASS(under);
PUSH_CLASS       6560 eval.c             PUSH_CLASS(ruby_wrapper);


PUSH_CREF

PUSH_CREF        1606 eval.c             PUSH_CREF(ruby_wrapper);
PUSH_CREF        1739 eval.c             PUSH_CREF(ruby_wrapper ? ruby_wrapper : rb_cObject);
PUSH_CREF        3988 eval.c             PUSH_CREF(module);
PUSH_CREF        6298 eval.c         	PUSH_CREF(cbase);
PUSH_CREF        6572 eval.c         	PUSH_CREF(ruby_wrapper);


PUSH_FRAME

PUSH_FRAME       1601 eval.c             PUSH_FRAME();
PUSH_FRAME       1734 eval.c             PUSH_FRAME();
PUSH_FRAME       2527 eval.c             PUSH_FRAME();
PUSH_FRAME       4501 eval.c         	PUSH_FRAME();		/* fake frame */
PUSH_FRAME       5404 eval.c         	PUSH_FRAME();
PUSH_FRAME       5610 eval.c             PUSH_FRAME();
PUSH_FRAME       6270 eval.c         	PUSH_FRAME();
PUSH_FRAME       6291 eval.c             PUSH_FRAME();
PUSH_FRAME       6575 eval.c             PUSH_FRAME();
PUSH_FRAME       7501 eval.c             PUSH_FRAME();
PUSH_FRAME       7515 eval.c             PUSH_FRAME();
PUSH_FRAME       9187 eval.c             PUSH_FRAME();
PUSH_FRAME       11841 eval.c             PUSH_FRAME();


PUSH_ITER

PUSH_ITER        1477 eval.c             PUSH_ITER(ITER_NOT);
PUSH_ITER        1511 eval.c             PUSH_ITER(ITER_NOT);
PUSH_ITER        1719 eval.c         	PUSH_ITER(ITER_NOT);
PUSH_ITER        2155 eval.c             PUSH_ITER(tmp_iter)
PUSH_ITER        2983 eval.c         	PUSH_ITER(ITER_PRE);
PUSH_ITER        3000 eval.c         		PUSH_ITER(ITER_PRE);
PUSH_ITER        4787 eval.c             PUSH_ITER(block->iter);
PUSH_ITER        4811 eval.c         		PUSH_ITER(ITER_PRE);
PUSH_ITER        5110 eval.c             PUSH_ITER(ITER_PRE);
PUSH_ITER        5609 eval.c             PUSH_ITER(itr);
PUSH_ITER        5839 eval.c             PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
PUSH_ITER        5947 eval.c             PUSH_ITER(ruby_iter->iter ? ITER_PRE : ITER_NOT);
PUSH_ITER        6574 eval.c             PUSH_ITER(ITER_NOT);
PUSH_ITER        7274 eval.c             PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
PUSH_ITER        7500 eval.c             PUSH_ITER(ITER_NOT);
PUSH_ITER        8243 eval.c             PUSH_ITER(ITER_CUR);
PUSH_ITER        8533 eval.c         	PUSH_ITER(ITER_NOT);
PUSH_ITER        8553 eval.c         	PUSH_ITER(ITER_PAS);
PUSH_ITER        8567 eval.c             PUSH_ITER(ITER_PRE);
PUSH_ITER        8899 eval.c             PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
PUSH_ITER        9186 eval.c             PUSH_ITER(ITER_CUR);
PUSH_ITER        9847 eval.c             PUSH_ITER(ITER_NOT);


PUSH_SCOPE

PUSH_SCOPE       1296 eval.c             PUSH_SCOPE();
PUSH_SCOPE       1607 eval.c             PUSH_SCOPE();
PUSH_SCOPE       3354 eval.c         	    PUSH_SCOPE();
PUSH_SCOPE       3973 eval.c             PUSH_SCOPE();
PUSH_SCOPE       5677 eval.c         	    PUSH_SCOPE();
PUSH_SCOPE       6580 eval.c             PUSH_SCOPE();


PUSH_TAG

PUSH_TAG         1010 eval.c         #define PUSH_THREAD_TAG() PUSH_TAG(PROT_THREAD); \
PUSH_TAG         1141 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         1301 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         1443 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         1720 eval.c         	PUSH_TAG(PROT_NONE);
PUSH_TAG         1743 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         2353 eval.c         	PUSH_TAG(PROT_NONE);
PUSH_TAG         2546 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         2776 eval.c         	PUSH_TAG(PROT_LOOP);
PUSH_TAG         2905 eval.c         	PUSH_TAG(PROT_LOOP);
PUSH_TAG         2940 eval.c         	PUSH_TAG(PROT_LOOP);
PUSH_TAG         2979 eval.c         	PUSH_TAG(PROT_LOOP);
PUSH_TAG         2994 eval.c         	    PUSH_TAG(PROT_LOOP);
PUSH_TAG         3090 eval.c         	    PUSH_TAG(PROT_NONE);
PUSH_TAG         3140 eval.c         	PUSH_TAG(PROT_NONE);
PUSH_TAG         3355 eval.c         	    PUSH_TAG(PROT_NONE);
PUSH_TAG         3989 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         4371 eval.c         	PUSH_TAG(PROT_NONE);
PUSH_TAG         4696 eval.c         	PUSH_TAG(PROT_NONE);
PUSH_TAG         4788 eval.c             PUSH_TAG(lambda ? PROT_NONE : PROT_YIELD);
PUSH_TAG         5111 eval.c             PUSH_TAG(PROT_LOOP);
PUSH_TAG         5173 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         5253 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         5276 eval.c         	PUSH_TAG(PROT_NONE);
PUSH_TAG         5297 eval.c         	PUSH_TAG(PROT_NONE);
PUSH_TAG         5632 eval.c         		PUSH_TAG(PROT_FUNC);
PUSH_TAG         5705 eval.c         	    PUSH_TAG(PROT_FUNC);
PUSH_TAG         6150 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         6303 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         6583 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         6916 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         7567 eval.c         	    PUSH_TAG(PROT_NONE);
PUSH_TAG         7585 eval.c         	    PUSH_TAG(PROT_NONE);
PUSH_TAG         8245 eval.c             PUSH_TAG((pcall&YIELD_LAMBDA_CALL) ? PROT_LAMBDA : PROT_NONE);
PUSH_TAG         8571 eval.c             PUSH_TAG(PROT_LOOP);
PUSH_TAG         11757 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         11845 eval.c             PUSH_TAG(PROT_NONE);
PUSH_TAG         12940 eval.c             PUSH_TAG(tag);
PUSH_TAG         13092 eval.c         	PUSH_TAG(PROT_NONE);


PUSH_THREAD_TAG

PUSH_THREAD_TAG  1423 eval.c             PUSH_THREAD_TAG();
PUSH_THREAD_TAG  1476 eval.c             PUSH_THREAD_TAG();
PUSH_THREAD_TAG  1510 eval.c             PUSH_THREAD_TAG();
PUSH_THREAD_TAG  5226 eval.c             PUSH_THREAD_TAG();
PUSH_THREAD_TAG  6641 eval.c             PUSH_THREAD_TAG();


PUSH_VARS

PUSH_VARS        3974 eval.c             PUSH_VARS();
PUSH_VARS        4665 eval.c             PUSH_VARS();
PUSH_VARS        5704 eval.c         	    PUSH_VARS();
PUSH_VARS        6559 eval.c             PUSH_VARS();
PUSH_VARS        8224 eval.c             PUSH_VARS();


PUT_SHORT

PUT_SHORT         699 ext/sdbm/_sdbm.c 	PUT_SHORT(ino,n + 1,off);
PUT_SHORT         706 ext/sdbm/_sdbm.c 	PUT_SHORT(ino,n + 2,off);
PUT_SHORT         710 ext/sdbm/_sdbm.c 	PUT_SHORT(ino,0,GET_SHORT(ino,0) + 2);
PUT_SHORT         826 ext/sdbm/_sdbm.c 			PUT_SHORT(ino,i, GET_SHORT(ino,i + 2) + zoo);
PUT_SHORT         830 ext/sdbm/_sdbm.c 	PUT_SHORT(ino, 0, GET_SHORT(ino, 0) - 2);


PV_

PV_                58 oniguruma.h    #ifndef PV_
PV_               779 oniguruma.h    int onig_error_code_to_str PV_((UChar* s, int err_code, ...));
PV_               785 regint.h       extern void  onig_snprintf_with_pattern PV_((char buf[], int bufsize, OnigEncoding enc, char* pat, char* pat_end, char *fmt, ...));


P_

P_                 50 oniguruma.h    #ifndef P_
P_                334 oniguruma.h    int onigenc_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, int ctype));
P_                336 oniguruma.h    int onigenc_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf));
P_                338 oniguruma.h    int onigenc_mbc_to_normalize P_((OnigEncoding enc, OnigAmbigType flag, const UChar** pp, const UChar* end, UChar* buf));
P_                340 oniguruma.h    int onigenc_is_mbc_ambiguous P_((OnigEncoding enc, OnigAmbigType flag, const UChar** pp, const UChar* end));
P_                342 oniguruma.h    int onigenc_is_allowed_reverse_match P_((OnigEncoding enc, const UChar* s, const UChar* end));
P_                408 oniguruma.h    UChar* onigenc_step_back P_((OnigEncoding enc, const UChar* start, const UChar* s, int n));
P_                415 oniguruma.h    int onigenc_init P_(());
P_                417 oniguruma.h    int onigenc_set_default_encoding P_((OnigEncoding enc));
P_                419 oniguruma.h    OnigEncoding onigenc_get_default_encoding P_(());
P_                421 oniguruma.h    void  onigenc_set_default_caseconv_table P_((const UChar* table));
P_                423 oniguruma.h    UChar* onigenc_get_right_adjust_char_head_with_prev P_((OnigEncoding enc, const UChar* start, const UChar* s, const UChar** prev));
P_                425 oniguruma.h    UChar* onigenc_get_prev_char_head P_((OnigEncoding enc, const UChar* start, const UChar* s));
P_                427 oniguruma.h    UChar* onigenc_get_left_adjust_char_head P_((OnigEncoding enc, const UChar* start, const UChar* s));
P_                429 oniguruma.h    UChar* onigenc_get_right_adjust_char_head P_((OnigEncoding enc, const UChar* start, const UChar* s));
P_                431 oniguruma.h    int onigenc_strlen P_((OnigEncoding enc, const UChar* p, const UChar* end));
P_                433 oniguruma.h    int onigenc_strlen_null P_((OnigEncoding enc, const UChar* p));
P_                435 oniguruma.h    int onigenc_str_bytelen_null P_((OnigEncoding enc, const UChar* p));
P_                708 oniguruma.h    extern void onig_null_warn P_((const char* s, ...));
P_                777 oniguruma.h    int onig_init P_((void));
P_                781 oniguruma.h    void onig_set_warn_func P_((OnigWarnFunc f));
P_                783 oniguruma.h    void onig_set_verb_warn_func P_((OnigWarnFunc f));
P_                785 oniguruma.h    int onig_new P_((regex_t**, const UChar* pattern, const UChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo));
P_                787 oniguruma.h    int onig_new_deluxe P_((regex_t** reg, const UChar* pattern, const UChar* pattern_end, OnigCompileInfo* ci, OnigErrorInfo* einfo));
P_                789 oniguruma.h    void onig_free P_((regex_t*));
P_                791 oniguruma.h    int onig_recompile P_((regex_t*, const UChar* pattern, const UChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo));
P_                793 oniguruma.h    int onig_recompile_deluxe P_((regex_t* reg, const UChar* pattern, const UChar* pattern_end, OnigCompileInfo* ci, OnigErrorInfo* einfo));
P_                795 oniguruma.h    int onig_search P_((regex_t*, const UChar* str, const UChar* end, const UChar* start, const UChar* range, OnigRegion* region, OnigOptionType option));
P_                797 oniguruma.h    int onig_match P_((regex_t*, const UChar* str, const UChar* end, const UChar* at, OnigRegion* region, OnigOptionType option));
P_                799 oniguruma.h    OnigRegion* onig_region_new P_((void));
P_                801 oniguruma.h    void onig_region_init P_((OnigRegion* region));
P_                803 oniguruma.h    void onig_region_free P_((OnigRegion* region, int free_self));
P_                805 oniguruma.h    void onig_region_copy P_((OnigRegion* to, OnigRegion* from));
P_                807 oniguruma.h    void onig_region_clear P_((OnigRegion* region));
P_                809 oniguruma.h    int onig_region_resize P_((OnigRegion* region, int n));
P_                811 oniguruma.h    int onig_region_set P_((OnigRegion* region, int at, int beg, int end));
P_                813 oniguruma.h    int onig_name_to_group_numbers P_((regex_t* reg, const UChar* name, const UChar* name_end, int** nums));
P_                815 oniguruma.h    int onig_name_to_backref_number P_((regex_t* reg, const UChar* name, const UChar* name_end, OnigRegion *region));
P_                817 oniguruma.h    int onig_foreach_name P_((regex_t* reg, int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*), void* arg));
P_                819 oniguruma.h    int onig_number_of_names P_((regex_t* reg));
P_                821 oniguruma.h    int onig_number_of_captures P_((regex_t* reg));
P_                823 oniguruma.h    int onig_number_of_capture_histories P_((regex_t* reg));
P_                825 oniguruma.h    OnigCaptureTreeNode* onig_get_capture_tree P_((OnigRegion* region));
P_                827 oniguruma.h    int onig_capture_tree_traverse P_((OnigRegion* region, int at, int(*callback_func)(int,int,int,int,int,void*), void* arg));
P_                829 oniguruma.h    OnigEncoding onig_get_encoding P_((regex_t* reg));
P_                831 oniguruma.h    OnigOptionType onig_get_options P_((regex_t* reg));
P_                833 oniguruma.h    OnigAmbigType onig_get_ambig_flag P_((regex_t* reg));
P_                835 oniguruma.h    OnigSyntaxType* onig_get_syntax P_((regex_t* reg));
P_                837 oniguruma.h    int onig_set_default_syntax P_((OnigSyntaxType* syntax));
P_                839 oniguruma.h    void onig_copy_syntax P_((OnigSyntaxType* to, OnigSyntaxType* from));
P_                841 oniguruma.h    unsigned int onig_get_syntax_op P_((OnigSyntaxType* syntax));
P_                843 oniguruma.h    unsigned int onig_get_syntax_op2 P_((OnigSyntaxType* syntax));
P_                845 oniguruma.h    unsigned int onig_get_syntax_behavior P_((OnigSyntaxType* syntax));
P_                847 oniguruma.h    OnigOptionType onig_get_syntax_options P_((OnigSyntaxType* syntax));
P_                849 oniguruma.h    void onig_set_syntax_op P_((OnigSyntaxType* syntax, unsigned int op));
P_                851 oniguruma.h    void onig_set_syntax_op2 P_((OnigSyntaxType* syntax, unsigned int op2));
P_                853 oniguruma.h    void onig_set_syntax_behavior P_((OnigSyntaxType* syntax, unsigned int behavior));
P_                855 oniguruma.h    void onig_set_syntax_options P_((OnigSyntaxType* syntax, OnigOptionType options));
P_                857 oniguruma.h    int onig_set_meta_char P_((OnigEncoding enc, unsigned int what, OnigCodePoint code));
P_                859 oniguruma.h    void onig_copy_encoding P_((OnigEncoding to, OnigEncoding from));
P_                861 oniguruma.h    OnigAmbigType onig_get_default_ambig_flag P_(());
P_                863 oniguruma.h    int onig_set_default_ambig_flag P_((OnigAmbigType ambig_flag));
P_                865 oniguruma.h    unsigned int onig_get_match_stack_limit_size P_((void));
P_                867 oniguruma.h    int onig_set_match_stack_limit_size P_((unsigned int size));
P_                869 oniguruma.h    int onig_end P_((void));
P_                871 oniguruma.h    const char* onig_version P_((void));
P_                873 oniguruma.h    const char* onig_copyright P_((void));
P_               4721 regcomp.c      static void print_compiled_byte_code_list P_((FILE* f, regex_t* reg));
P_               4724 regcomp.c      static void print_tree P_((FILE* f, Node* node));
P_                 72 regenc.h       ONIG_EXTERN int onigenc_ascii_get_all_pair_ambig_codes P_((OnigAmbigType flag, OnigPairAmbigCodes** acs));
P_                 73 regenc.h       ONIG_EXTERN int onigenc_nothing_get_all_comp_ambig_codes P_((OnigAmbigType flag, OnigCompAmbigCodes** acs));
P_                 74 regenc.h       ONIG_EXTERN int onigenc_iso_8859_1_get_all_pair_ambig_codes P_((OnigAmbigType flag, OnigPairAmbigCodes** acs));
P_                 75 regenc.h       ONIG_EXTERN int onigenc_ess_tsett_get_all_comp_ambig_codes P_((OnigAmbigType flag, OnigCompAmbigCodes** acs));
P_                 76 regenc.h       ONIG_EXTERN int onigenc_not_support_get_ctype_code_range P_((int ctype, OnigCodePoint* sbr[], OnigCodePoint* mbr[]));
P_                 77 regenc.h       ONIG_EXTERN int onigenc_is_mbc_newline_0x0a P_((const UChar* p, const UChar* end));
P_                 80 regenc.h       ONIG_EXTERN int onigenc_ascii_mbc_to_normalize P_((OnigAmbigType flag, const UChar** p, const UChar* end, UChar* lower));
P_                 81 regenc.h       ONIG_EXTERN int onigenc_ascii_is_mbc_ambiguous P_((OnigAmbigType flag, const UChar** p, const UChar* end));
P_                 82 regenc.h       ONIG_EXTERN int onigenc_single_byte_mbc_enc_len P_((const UChar* p));
P_                 83 regenc.h       ONIG_EXTERN OnigCodePoint onigenc_single_byte_mbc_to_code P_((const UChar* p, const UChar* end));
P_                 84 regenc.h       ONIG_EXTERN int onigenc_single_byte_code_to_mbclen P_((OnigCodePoint code));
P_                 85 regenc.h       ONIG_EXTERN int onigenc_single_byte_code_to_mbc_first P_((OnigCodePoint code));
P_                 86 regenc.h       ONIG_EXTERN int onigenc_single_byte_code_to_mbc P_((OnigCodePoint code, UChar *buf));
P_                 87 regenc.h       ONIG_EXTERN UChar* onigenc_single_byte_left_adjust_char_head P_((const UChar* start, const UChar* s));
P_                 88 regenc.h       ONIG_EXTERN int onigenc_always_true_is_allowed_reverse_match P_((const UChar* s, const UChar* end));
P_                 89 regenc.h       ONIG_EXTERN int onigenc_always_false_is_allowed_reverse_match P_((const UChar* s, const UChar* end));
P_                 92 regenc.h       ONIG_EXTERN OnigCodePoint onigenc_mbn_mbc_to_code P_((OnigEncoding enc, const UChar* p, const UChar* end));
P_                 93 regenc.h       ONIG_EXTERN int onigenc_mbn_mbc_to_normalize P_((OnigEncoding enc, OnigAmbigType flag, const UChar** p, const UChar* end, UChar* lower));
P_                 94 regenc.h       ONIG_EXTERN int onigenc_mbn_is_mbc_ambiguous P_((OnigEncoding enc, OnigAmbigType flag, const UChar** p, const UChar* end));
P_                 95 regenc.h       ONIG_EXTERN int onigenc_mb2_code_to_mbclen P_((OnigCodePoint code));
P_                 96 regenc.h       ONIG_EXTERN int onigenc_mb2_code_to_mbc_first P_((OnigCodePoint code));
P_                 97 regenc.h       ONIG_EXTERN int onigenc_mb2_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf));
P_                 98 regenc.h       ONIG_EXTERN int onigenc_mb2_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, unsigned int ctype));
P_                 99 regenc.h       ONIG_EXTERN int onigenc_mb4_code_to_mbclen P_((OnigCodePoint code));
P_                100 regenc.h       ONIG_EXTERN int onigenc_mb4_code_to_mbc_first P_((OnigCodePoint code));
P_                101 regenc.h       ONIG_EXTERN int onigenc_mb4_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf));
P_                102 regenc.h       ONIG_EXTERN int onigenc_mb4_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, unsigned int ctype));
P_                104 regenc.h       ONIG_EXTERN int onigenc_get_all_fold_match_code_ss_0xdf P_((OnigCodePoint** codes));
P_                107 regenc.h       ONIG_EXTERN int onigenc_unicode_is_code_ctype P_((OnigCodePoint code, unsigned int ctype));
P_                108 regenc.h       ONIG_EXTERN int onigenc_unicode_get_ctype_code_range P_((int ctype, OnigCodePoint* sbr[], OnigCodePoint* mbr[]));
P_                126 regenc.h       onigenc_with_ascii_strncmp P_((OnigEncoding enc, const UChar* p, const UChar* end, const UChar* sascii /* ascii */, int n));
P_                128 regenc.h       onigenc_step P_((OnigEncoding enc, const UChar* p, const UChar* end, int n));
P_                131 regenc.h       extern int  onig_is_in_code_range P_((const UChar* p, OnigCodePoint code));
P_               3079 regexec.c      static int set_bm_backward_skip P_((UChar* s, UChar* end, OnigEncoding enc,
P_                776 regint.h       extern void onig_print_compiled_byte_code P_((FILE* f, UChar* bp, UChar** nextp, OnigEncoding enc));
P_                779 regint.h       extern void onig_statistics_init P_((void));
P_                780 regint.h       extern void onig_print_statistics P_((FILE* f));
P_                784 regint.h       extern char* onig_error_code_to_format P_((int code));
P_                786 regint.h       extern int  onig_bbuf_init P_((BBuf* buf, int size));
P_                787 regint.h       extern int  onig_alloc_init P_((regex_t** reg, OnigOptionType option, OnigAmbigType ambig_flag, OnigEncoding enc, OnigSyntaxType* syntax));
P_                788 regint.h       extern int  onig_compile P_((regex_t* reg, const UChar* pattern, const UChar* pattern_end, OnigErrorInfo* einfo));
P_                789 regint.h       extern void onig_chain_reduce P_((regex_t* reg));
P_                790 regint.h       extern void onig_chain_link_add P_((regex_t* to, regex_t* add));
P_                791 regint.h       extern void onig_transfer P_((regex_t* to, regex_t* from));
P_                290 regparse.h     extern int    onig_renumber_name_table P_((regex_t* reg, GroupNumRemap* map));
P_                293 regparse.h     extern int    onig_is_code_in_cc P_((OnigEncoding enc, OnigCodePoint code, CClassNode* cc));
P_                294 regparse.h     extern int    onig_strncmp P_((const UChar* s1, const UChar* s2, int n));
P_                295 regparse.h     extern void   onig_scan_env_set_error_string P_((ScanEnv* env, int ecode, UChar* arg, UChar* arg_end));
P_                296 regparse.h     extern int    onig_scan_unsigned_number P_((UChar** src, const UChar* end, OnigEncoding enc));
P_                297 regparse.h     extern void   onig_reduce_nested_qualifier P_((Node* pnode, Node* cnode));
P_                298 regparse.h     extern void   onig_node_conv_to_str_node P_((Node* node, int raw));
P_                299 regparse.h     extern int    onig_node_str_cat P_((Node* node, const UChar* s, const UChar* end));
P_                300 regparse.h     extern void   onig_node_free P_((Node* node));
P_                301 regparse.h     extern Node*  onig_node_new_effect P_((int type));
P_                302 regparse.h     extern Node*  onig_node_new_anchor P_((int type));
P_                303 regparse.h     extern Node*  onig_node_new_str P_((const UChar* s, const UChar* end));
P_                304 regparse.h     extern Node*  onig_node_new_list P_((Node* left, Node* right));
P_                305 regparse.h     extern void   onig_node_str_clear P_((Node* node));
P_                307 regparse.h     extern int    onig_names_free P_((regex_t* reg));
P_                308 regparse.h     extern int    onig_parse_make_tree P_((Node** root, const UChar* pattern, const UChar* end, regex_t* reg, ScanEnv* env));


P_NOWAIT

P_NOWAIT         1065 process.c      #define proc_spawn_v(argv, prog) rb_w32_aspawn(P_NOWAIT, prog, argv)
P_NOWAIT         1131 process.c      #define proc_spawn(str) rb_w32_spawn(P_NOWAIT, str, 0)
P_NOWAIT          801 win32/win32.c        case P_NOWAIT:
P_NOWAIT          818 win32/win32.c        case P_NOWAIT:


P_OVERLAY

P_OVERLAY        1002 process.c          rb_w32_spawn(P_OVERLAY, (char *)str, 0);
P_OVERLAY         802 win32/win32.c        case P_OVERLAY:
P_OVERLAY         820 win32/win32.c        case P_OVERLAY:
P_OVERLAY         136 win32/win32.h  #define execv(path,argv)	rb_w32_aspawn(P_OVERLAY,path,argv)


P_WAIT

P_WAIT            111 missing/os2.c  	    status = spawnlp(P_WAIT,shell,shell,sw,cmd,(char*)NULL);
P_WAIT            129 missing/os2.c  	if ((status = spawnvp(P_WAIT, argv[0], argv)) == -1) {
P_WAIT           1107 process.c          status = spawnv(P_WAIT, prog, argv);
P_WAIT           1145 process.c      	    status = shell?spawnl(P_WAIT,shell,"sh","-c",str,(char*)NULL):system(str);
P_WAIT            800 win32/win32.c        case P_WAIT:
P_WAIT            815 win32/win32.c        case P_WAIT:


PointerType

PointerType       228 regcomp.c        PointerType ptr = (PointerType )addr;
PointerType       648 regint.h       #define SIZE_POINTER       sizeof(PointerType)
PointerType       673 regint.h       #define GET_POINTER_INC(ptr,p)     PLATFORM_GET_INC(ptr,    p, PointerType)


PosixBracketEntryType

PosixBracketEntryType 3604 regparse.c       static PosixBracketEntryType PBS[] = {
PosixBracketEntryType 3621 regparse.c       PosixBracketEntryType *pb;
PosixBracketEntryType 3675 regparse.c       static PosixBracketEntryType PBS[] = {
PosixBracketEntryType 3692 regparse.c       PosixBracketEntryType *pb;


QUADINT

QUADINT           665 missing/vsnprintf.c 			flags |= QUADINT;
QUADINT           679 missing/vsnprintf.c 			if (flags & QUADINT) {
QUADINT           760 missing/vsnprintf.c 			if (flags & QUADINT)
QUADINT           777 missing/vsnprintf.c 			if (flags & QUADINT)
QUADINT           795 missing/vsnprintf.c 			flags = (flags) | QUADINT | HEXPREFIX;
QUADINT           799 missing/vsnprintf.c 			flags = (flags & ~QUADINT) | HEXPREFIX;
QUADINT           834 missing/vsnprintf.c 			if (flags & QUADINT)
QUADINT           848 missing/vsnprintf.c 			if (flags & QUADINT)
QUADINT           857 missing/vsnprintf.c 			    (flags & QUADINT ? uqval != 0 : ulval != 0))
QUADINT           880 missing/vsnprintf.c 			if (flags & QUADINT) {


QUAD_SIZE

QUAD_SIZE         255 bignum.c           memset(buf, 0, QUAD_SIZE);
QUAD_SIZE         261 bignum.c           if (len > QUAD_SIZE) {
QUAD_SIZE         266 bignum.c       	len = QUAD_SIZE;
QUAD_SIZE         274 bignum.c       #define BNEG(b) (RSHIFT(((BDIGIT*)b)[QUAD_SIZE/SIZEOF_BDIGITS-1],BITSPERDIG-1) != 0)
QUAD_SIZE         281 bignum.c           VALUE big = bignew(QUAD_SIZE/SIZEOF_BDIGITS, 1);
QUAD_SIZE         283 bignum.c           memcpy((char*)BDIGITS(big), buf, QUAD_SIZE);
QUAD_SIZE         285 bignum.c       	long len = QUAD_SIZE;
QUAD_SIZE         714 pack.c         		char tmp[QUAD_SIZE];
QUAD_SIZE         718 pack.c         		rb_str_buf_cat(res, (char*)&tmp, QUAD_SIZE);
QUAD_SIZE        1561 pack.c         	    PACK_LENGTH_ADJUST_SIZE(QUAD_SIZE);
QUAD_SIZE        1564 pack.c         		s += QUAD_SIZE;
QUAD_SIZE        1570 pack.c         	    PACK_LENGTH_ADJUST_SIZE(QUAD_SIZE);
QUAD_SIZE        1573 pack.c         		s += QUAD_SIZE;


QUALIFIER_EXPAND_LIMIT_SIZE

QUALIFIER_EXPAND_LIMIT_SIZE  715 regcomp.c            (qn->lower <= 1 || tlen * qn->lower <= QUALIFIER_EXPAND_LIMIT_SIZE)) {
QUALIFIER_EXPAND_LIMIT_SIZE  716 regcomp.c          if (qn->lower == 1 && tlen > QUALIFIER_EXPAND_LIMIT_SIZE) {
QUALIFIER_EXPAND_LIMIT_SIZE  739 regcomp.c                                            <= QUALIFIER_EXPAND_LIMIT_SIZE)) {
QUALIFIER_EXPAND_LIMIT_SIZE  799 regcomp.c            (qn->lower <= 1 || tlen * qn->lower <= QUALIFIER_EXPAND_LIMIT_SIZE)) {
QUALIFIER_EXPAND_LIMIT_SIZE  800 regcomp.c          if (qn->lower == 1 && tlen > QUALIFIER_EXPAND_LIMIT_SIZE) {
QUALIFIER_EXPAND_LIMIT_SIZE  864 regcomp.c                                        <= QUALIFIER_EXPAND_LIMIT_SIZE)) {


QUOTECAT

QUOTECAT         1557 ext/syck/token.c                             QUOTECAT(qstr, qcapa, qidx, ' ');
QUOTECAT         1564 ext/syck/token.c                                 QUOTECAT(qstr, qcapa, qidx, '\n');
QUOTECAT         1794 ext/syck/token.c                             QUOTECAT(qstr, qcapa, qidx, ' ');
QUOTECAT         1801 ext/syck/token.c                                 QUOTECAT(qstr, qcapa, qidx, '\n');
QUOTECAT         1815 ext/syck/token.c {   QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
QUOTECAT         1857 ext/syck/token.c {   QUOTECAT(qstr, qcapa, qidx, '\'');
QUOTECAT         1951 ext/syck/token.c                                 QUOTECAT(qstr, qcapa, qidx, ' ');
QUOTECAT         1958 ext/syck/token.c                                     QUOTECAT(qstr, qcapa, qidx, '\n');
QUOTECAT         1974 ext/syck/token.c {   QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
QUOTECAT         2079 ext/syck/token.c                         QUOTECAT(qstr, qcapa, qidx, escape_seq( ch ));
QUOTECAT         2116 ext/syck/token.c                         QUOTECAT(qstr, qcapa, qidx, ch);
QUOTECAT         2234 ext/syck/token.c {   QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
QUOTECAT         2282 ext/syck/token.c                         QUOTECAT(qstr, qcapa, qidx, escape_seq( ch ));
QUOTECAT         2319 ext/syck/token.c                         QUOTECAT(qstr, qcapa, qidx, ch);
QUOTECAT         2452 ext/syck/token.c                             QUOTECAT(qstr, qcapa, qidx, ' ');
QUOTECAT         2459 ext/syck/token.c                                 QUOTECAT(qstr, qcapa, qidx, '\n');
QUOTECAT         2482 ext/syck/token.c {   QUOTECAT(qstr, qcapa, qidx, *YYTOKEN);
QUOTECAT         2498 ext/syck/token.c                             QUOTECAT(qstr, qcapa, qidx, *YYTOKEN);
QUOTECAT         2547 ext/syck/token.c                             QUOTECAT(qstr, qcapa, qidx, '\n');
QUOTECAT         2554 ext/syck/token.c                             QUOTECAT(qstr, qcapa, qidx, *YYTOKEN);


QUOTECATS

QUOTECATS         140 ext/syck/token.c     QUOTECATS(qstr, qcapa, qidx, YYTOKEN, YYCURSOR - YYTOKEN); \
QUOTECATS        1578 ext/syck/token.c {   QUOTECATS(qstr, qcapa, qidx, YYTOKEN, YYCURSOR - YYTOKEN);


QUOTELEN

QUOTELEN          124 ext/syck/bytecode.c                 c += QUOTELEN; \
QUOTELEN           96 ext/syck/token.c                 c += QUOTELEN; \
QUOTELEN          107 ext/syck/token.c                 c += QUOTELEN; \


Qfalse

Qfalse             88 array.c            return Qfalse;
Qfalse            745 array.c              case Qfalse:
Qfalse           1231 array.c            return Qfalse;
Qfalse           1261 array.c            int taint = Qfalse;
Qfalse           1649 array.c        	  case Qfalse:
Qfalse           2104 array.c            int block_p = Qfalse;
Qfalse           2345 array.c        	    return Qfalse;
Qfalse           2349 array.c            if (RARRAY(ary1)->len != RARRAY(ary2)->len) return Qfalse;
Qfalse           2352 array.c        	    return Qfalse;
Qfalse           2371 array.c            if (TYPE(ary2) != T_ARRAY) return Qfalse;
Qfalse           2372 array.c            if (RARRAY(ary1)->len != RARRAY(ary2)->len) return Qfalse;
Qfalse           2375 array.c        	    return Qfalse;
Qfalse           2435 array.c            return Qfalse;
Qfalse            719 bignum.c           unsigned long num = big2ulong(x, "unsigned long", Qfalse);
Qfalse            936 bignum.c       	    if (isnan(a)) return Qfalse;
Qfalse            938 bignum.c       	    return (a == b)?Qtrue:Qfalse;
Qfalse            943 bignum.c           if (RBIGNUM(x)->sign != RBIGNUM(y)->sign) return Qfalse;
Qfalse            944 bignum.c           if (RBIGNUM(x)->len != RBIGNUM(y)->len) return Qfalse;
Qfalse            945 bignum.c           if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM(y)->len) != 0) return Qfalse;
Qfalse            963 bignum.c           if (TYPE(y) != T_BIGNUM) return Qfalse;
Qfalse            964 bignum.c           if (RBIGNUM(x)->sign != RBIGNUM(y)->sign) return Qfalse;
Qfalse            965 bignum.c           if (RBIGNUM(x)->len != RBIGNUM(y)->len) return Qfalse;
Qfalse            966 bignum.c           if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM(y)->len) != 0) return Qfalse;
Qfalse            365 class.c        	int superclass_seen = Qfalse;
Qfalse            455 class.c            return Qfalse;
Qfalse            776 class.c        	SPECIAL_SINGLETON(Qfalse, rb_cFalseClass);
Qfalse            829 class.c            rb_attr(klass, rb_intern(name), read, write, Qfalse);
Qfalse             56 compar.c           if (NIL_P(c)) return Qfalse;
Qfalse             58 compar.c           return Qfalse;
Qfalse             64 compar.c           return Qfalse;
Qfalse            101 compar.c           return Qfalse;
Qfalse            118 compar.c           return Qfalse;
Qfalse            135 compar.c           return Qfalse;
Qfalse            152 compar.c           return Qfalse;
Qfalse            173 compar.c           if (RTEST(cmp_lt(x, min))) return Qfalse;
Qfalse            174 compar.c           if (RTEST(cmp_gt(x, max))) return Qfalse;
Qfalse            783 dir.c          	args.done = Qfalse;
Qfalse           1784 dir.c              return Qfalse;
Qfalse            546 enum.c         	*memo = Qfalse;
Qfalse            556 enum.c         	*memo = Qfalse;
Qfalse            629 enum.c             VALUE result = Qfalse;
Qfalse            643 enum.c         	    *memo = Qfalse;
Qfalse            657 enum.c         	    *memo = Qfalse;
Qfalse            685 enum.c             if (result == Qundef) return Qfalse;
Qfalse            693 enum.c         	*memo = Qfalse;
Qfalse            703 enum.c         	*memo = Qfalse;
Qfalse            961 enum.c             memo[1] = Qfalse;
Qfalse            487 error.c        	return Qfalse;
Qfalse            489 error.c        	return Qfalse;
Qfalse            491 error.c        	return Qfalse;
Qfalse            543 error.c            return Qfalse;
Qfalse            665 error.c        	return Qfalse;
Qfalse            671 error.c        	    return Qfalse;
Qfalse            895 error.c            if (!rb_obj_is_kind_of(exc, rb_eSystemCallError)) return Qfalse;
Qfalse            910 error.c            return Qfalse;
Qfalse            621 eval.c         	    return Qfalse;
Qfalse            622 eval.c         	if (!ent->method) return Qfalse;
Qfalse            627 eval.c         	    return Qfalse;
Qfalse            630 eval.c             return Qfalse;
Qfalse            776 eval.c             return Qfalse;
Qfalse            789 eval.c             return Qfalse;
Qfalse            914 eval.c         #define PROT_NONE   Qfalse	/* 0 */
Qfalse           1772 eval.c         		    return Qfalse;
Qfalse           2377 eval.c             return Qfalse;
Qfalse           2811 eval.c         	RETURN(Qfalse);
Qfalse           3169 eval.c         	if (RTEST(rb_eval(self, node->nd_body))) result = Qfalse;
Qfalse           3188 eval.c         		    *flip = RTEST(rb_eval(self, node->nd_end))?Qfalse:Qtrue;
Qfalse           3192 eval.c         		    result = Qfalse;
Qfalse           3197 eval.c         		    *flip = Qfalse;
Qfalse           3209 eval.c         		result = RTEST(rb_eval(self, node->nd_beg)) ? Qtrue : Qfalse;
Qfalse           3214 eval.c         		    *flip = Qfalse;
Qfalse           3506 eval.c         	rb_cvar_set(cvar_cbase(), node->nd_vid, result, Qfalse);
Qfalse           3828 eval.c         	    int gen = Qfalse;
Qfalse           4031 eval.c             return rb_obj_respond_to(obj, id, Qfalse);
Qfalse           4054 eval.c             return Qfalse;
Qfalse           4127 eval.c             return Qfalse;
Qfalse           4166 eval.c             return Qfalse;
Qfalse           4205 eval.c             return Qfalse;
Qfalse           4280 eval.c         	  case Qfalse:
Qfalse           4520 eval.c             return Qfalse;
Qfalse           4556 eval.c             return Qfalse;
Qfalse           4587 eval.c             int yield = Qfalse;
Qfalse           4902 eval.c             return rb_yield_0(val, 0, 0, 0, Qfalse);
Qfalse           4913 eval.c         	return rb_yield_0(Qundef, 0, 0, 0, Qfalse);
Qfalse           4928 eval.c             int avalue = Qfalse;
Qfalse           4959 eval.c         	rb_yield_0(Qundef, 0, 0, 0, Qfalse);
Qfalse           5056 eval.c         	rb_cvar_set(cvar_cbase(), lhs->nd_vid, val, Qfalse);
Qfalse           5169 eval.c             volatile int handle = Qfalse;
Qfalse           5177 eval.c         	handle = Qfalse;
Qfalse           5185 eval.c         	handle = Qfalse;
Qfalse           6354 eval.c         	avalue = Qfalse;
Qfalse           6739 eval.c             if (rb_feature_p(feature, 0, Qfalse))
Qfalse           6752 eval.c         	if (rb_feature_p(feature, 0, Qfalse))
Qfalse           6757 eval.c             return Qfalse;
Qfalse           6777 eval.c             if (!loading_tbl) return Qfalse;
Qfalse           6778 eval.c             if (!st_lookup(loading_tbl, (st_data_t)ftptr, &th)) return Qfalse;
Qfalse           6836 eval.c         	    if (rb_feature_p(ftptr, ext, Qfalse)) return 's';
Qfalse           6843 eval.c         		if (!rb_feature_p(ftptr, ext, Qfalse))
Qfalse           6853 eval.c         		if (!rb_feature_p(ftptr, ext, Qfalse))
Qfalse           6860 eval.c         	    if (rb_feature_p(ftptr, ext, Qfalse)) return 's';
Qfalse           6864 eval.c         		if (!rb_feature_p(ftptr, ext, Qfalse))
Qfalse           6870 eval.c             else if ((ft = rb_feature_p(ftptr, 0, Qfalse)) == 'r') {
Qfalse           6880 eval.c         	return rb_feature_p(ftptr, 0, Qfalse);
Qfalse           6928 eval.c         		result = Qfalse;
Qfalse           8099 eval.c             data->iter = data->prev?Qtrue:Qfalse;
Qfalse           8147 eval.c             VALUE block = proc_alloc(klass, Qfalse);
Qfalse           8163 eval.c             return proc_alloc(rb_cProc, Qfalse);
Qfalse           8215 eval.c         	avalue = Qfalse;
Qfalse           8403 eval.c             if (TYPE(other) != T_DATA) return Qfalse;
Qfalse           8404 eval.c             if (RDATA(other)->dmark != (RUBY_DATA_FUNC)blk_mark) return Qfalse;
Qfalse           8405 eval.c             if (CLASS_OF(self) != CLASS_OF(other)) return Qfalse;
Qfalse           8408 eval.c             if (data->body != data2->body) return Qfalse;
Qfalse           8409 eval.c             if (data->var != data2->var) return Qfalse;
Qfalse           8410 eval.c             if (data->scope != data2->scope) return Qfalse;
Qfalse           8411 eval.c             if (data->dyna_vars != data2->dyna_vars) return Qfalse;
Qfalse           8412 eval.c             if (data->flags != data2->flags) return Qfalse;
Qfalse           8715 eval.c         	return Qfalse;
Qfalse           8717 eval.c         	return Qfalse;
Qfalse           8724 eval.c         	return Qfalse;
Qfalse           9254 eval.c             return Qfalse;
Qfalse           10426 eval.c             return Qfalse;
Qfalse           10453 eval.c             int i, test = Qfalse;
Qfalse           10758 eval.c             return Qfalse;
Qfalse           10924 eval.c         	if (limit == 0) return Qfalse;
Qfalse           10932 eval.c         	if (!rb_thread_dead(th)) return Qfalse;
Qfalse           11415 eval.c             return ruby_thread_abort?Qtrue:Qfalse;
Qfalse           11464 eval.c             return rb_thread_check(thread)->abort?Qtrue:Qfalse;
Qfalse           11886 eval.c         		rb_dvar_push(id, Qfalse);
Qfalse           12043 eval.c         	return Qfalse;
Qfalse           12067 eval.c             if (rb_thread_dead(th)) return Qfalse;
Qfalse           12091 eval.c             return Qfalse;
Qfalse           12152 eval.c             return rb_thread_critical?Qtrue:Qfalse;
Qfalse           12419 eval.c             if (!th->locals) return Qfalse;
Qfalse           12422 eval.c             return Qfalse;
Qfalse           12744 eval.c             return Qfalse;
Qfalse           12942 eval.c         	val = rb_yield_0(tag, 0, 0, 0, Qfalse);
Qfalse           13026 eval.c         	return Qfalse;
Qfalse           13031 eval.c         	if (NIL_P(list) || TYPE(list) != T_ARRAY) return Qfalse;
Qfalse           13094 eval.c         	    result = (*func)(obj, arg, Qfalse);
Qfalse            232 ext/bigdecimal/bigdecimal.c         if(val!=Qfalse && val!=Qtrue) {
Qfalse            318 ext/bigdecimal/bigdecimal.c     return Qfalse;
Qfalse            334 ext/bigdecimal/bigdecimal.c     if(VpIsNaN(p)) return Qfalse;
Qfalse            335 ext/bigdecimal/bigdecimal.c     if(VpIsInf(p)) return Qfalse;
Qfalse            515 ext/bigdecimal/bigdecimal.c     case '=': if(e==0) return Qtrue ; return Qfalse;
Qfalse            516 ext/bigdecimal/bigdecimal.c     case '!': if(e!=0) return Qtrue ; return Qfalse;
Qfalse            517 ext/bigdecimal/bigdecimal.c     case 'G': if(e>=0) return Qtrue ; return Qfalse;
Qfalse            518 ext/bigdecimal/bigdecimal.c     case '>': if(e> 0) return Qtrue ; return Qfalse;
Qfalse            519 ext/bigdecimal/bigdecimal.c     case 'L': if(e<=0) return Qtrue ; return Qfalse;
Qfalse            520 ext/bigdecimal/bigdecimal.c     case '<': if(e< 0) return Qtrue ; return Qfalse;
Qfalse            529 ext/bigdecimal/bigdecimal.c     return VpIsZero(a) ? Qtrue : Qfalse;
Qfalse            173 ext/curses/curses.c     return Qfalse;
Qfalse            520 ext/curses/curses.c   return (scrl(NUM2INT(n)) == OK) ? Qtrue : Qfalse;
Qfalse            522 ext/curses/curses.c   return Qfalse;
Qfalse            531 ext/curses/curses.c   return (setscrreg(NUM2INT(top), NUM2INT(bottom)) == OK) ? Qtrue : Qfalse;
Qfalse            533 ext/curses/curses.c   return Qfalse;
Qfalse            571 ext/curses/curses.c   return (bkgd(NUM2CH(ch)) == OK) ? Qtrue : Qfalse;
Qfalse            573 ext/curses/curses.c   return Qfalse;
Qfalse            581 ext/curses/curses.c   return (resizeterm(NUM2INT(lin),NUM2INT(col)) == OK) ? Qtrue : Qfalse;
Qfalse            592 ext/curses/curses.c   return (start_color() == OK) ? Qtrue : Qfalse;
Qfalse            599 ext/curses/curses.c   return (init_pair(NUM2INT(pair),NUM2INT(f),NUM2INT(b)) == OK) ? Qtrue : Qfalse;
Qfalse            607 ext/curses/curses.c 		     NUM2INT(g),NUM2INT(b)) == OK) ? Qtrue : Qfalse;
Qfalse            613 ext/curses/curses.c   return has_colors() ? Qtrue : Qfalse;
Qfalse            619 ext/curses/curses.c   return can_change_color() ? Qtrue : Qfalse;
Qfalse            696 ext/curses/curses.c   return (ungetmouse(mdata->mevent) == OK) ? Qtrue : Qfalse;
Qfalse            702 ext/curses/curses.c   return mouseinterval(NUM2INT(interval)) ? Qtrue : Qfalse;
Qfalse            742 ext/curses/curses.c   return def_prog_mode() == OK ? Qtrue : Qfalse;
Qfalse            752 ext/curses/curses.c   return reset_prog_mode() == OK ? Qtrue : Qfalse;
Qfalse           1242 ext/curses/curses.c   return (res == OK) ? Qtrue : Qfalse;
Qfalse           1244 ext/curses/curses.c   return Qfalse;
Qfalse           1257 ext/curses/curses.c   return (res == OK) ? Qtrue : Qfalse;
Qfalse           1258 ext/curses/curses.c   return Qfalse;
Qfalse           1269 ext/curses/curses.c   return (scroll(winp->window) == OK) ? Qtrue : Qfalse;
Qfalse           1280 ext/curses/curses.c   return (wscrl(winp->window,NUM2INT(n)) == OK) ? Qtrue : Qfalse;
Qfalse           1282 ext/curses/curses.c   return Qfalse;
Qfalse           1353 ext/curses/curses.c   return (wbkgd(winp->window, NUM2CH(ch)) == OK) ? Qtrue : Qfalse;
Qfalse           1355 ext/curses/curses.c   return Qfalse;
Qfalse           1380 ext/curses/curses.c   return wresize(winp->window, NUM2INT(lin), NUM2INT(col)) == OK ? Qtrue : Qfalse;
Qfalse           1401 ext/curses/curses.c     Qtrue : Qfalse;
Qfalse           1420 ext/curses/curses.c   return nodelay(winp->window,RTEST(val) ? TRUE : FALSE) == OK ? Qtrue : Qfalse;
Qfalse             86 ext/dbm/dbm.c      return Qfalse;
Qfalse            541 ext/dbm/dbm.c      return Qfalse;
Qfalse            652 ext/dbm/dbm.c      return Qfalse;
Qfalse            674 ext/dbm/dbm.c      return Qfalse;
Qfalse             49 ext/digest/digest.c     if (rb_cvar_defined(klass, id_metadata) == Qfalse) {
Qfalse            228 ext/digest/digest.c 	return algo->equal_func(pctx1, pctx2) ? Qtrue : Qfalse;
Qfalse            243 ext/digest/digest.c     return Qfalse;
Qfalse            214 ext/dl/cptr.c    return data->ptr ? Qfalse : Qtrue;
Qfalse            309 ext/dl/cptr.c    return ptr1 == ptr2 ? Qtrue : Qfalse;
Qfalse            146 ext/dl/dl.h    #define INT2BOOL(x)  (x?Qtrue:Qfalse)
Qfalse            176 ext/etc/etc.c      passwd_blocking = Qfalse;
Qfalse            381 ext/etc/etc.c      group_blocking = Qfalse;
Qfalse             87 ext/gdbm/gdbm.c     return Qfalse;
Qfalse            636 ext/gdbm/gdbm.c             return Qfalse;
Qfalse            642 ext/gdbm/gdbm.c     return Qfalse;
Qfalse            755 ext/gdbm/gdbm.c     return Qfalse;
Qfalse            780 ext/gdbm/gdbm.c     return Qfalse;
Qfalse            868 ext/gdbm/gdbm.c     fgdbm_set_fastmode(obj, RTEST(val) ? Qfalse : Qtrue);
Qfalse            244 ext/iconv/iconv.c 	    return Qfalse;
Qfalse            266 ext/iconv/iconv.c     return Qfalse;
Qfalse            329 ext/iconv/iconv.c     VALUE ret = Qfalse;
Qfalse            330 ext/iconv/iconv.c     VALUE error = Qfalse;
Qfalse            850 ext/iconv/iconv.c     return Qfalse;
Qfalse            869 ext/iconv/iconv.c     return Qfalse;
Qfalse            906 ext/iconv/iconv.c     return Qfalse;
Qfalse             65 ext/io/wait/wait.c     if (!FIONREAD_POSSIBLE_P(fptr->fd)) return Qfalse;
Qfalse            120 ext/io/wait/wait.c     if (!FIONREAD_POSSIBLE_P(fptr->fd)) return Qfalse;
Qfalse            170 ext/openssl/ossl.c 	rflag = flag ? Qtrue : Qfalse;
Qfalse            215 ext/openssl/ossl.c 	ret = Qfalse;
Qfalse            218 ext/openssl/ossl.c 	    args.preverify_ok = ok ? Qtrue : Qfalse;
Qfalse            436 ext/openssl/ossl.c     dOSSL = Qfalse;
Qfalse            316 ext/openssl/ossl_asn1.c     return bool ? Qtrue : Qfalse;
Qfalse            736 ext/openssl/ossl_asn1.c 	    rb_ary_push(arg, (j & V_ASN1_CONSTRUCTED) ? Qtrue : Qfalse);
Qfalse            244 ext/openssl/ossl_bn.c 	return Qfalse;					\
Qfalse            388 ext/openssl/ossl_bn.c     return Qfalse;
Qfalse            472 ext/openssl/ossl_bn.c     if (vsafe == Qfalse) {
Qfalse            541 ext/openssl/ossl_bn.c     return Qfalse;
Qfalse            559 ext/openssl/ossl_bn.c 	return Qfalse;
Qfalse            581 ext/openssl/ossl_bn.c     if (vtrivdiv == Qfalse) {
Qfalse            588 ext/openssl/ossl_bn.c 	return Qfalse;
Qfalse            238 ext/openssl/ossl_digest.c     return Qfalse;
Qfalse            221 ext/openssl/ossl_ns_spki.c 	return Qfalse;
Qfalse            253 ext/openssl/ossl_ocsp.c     return result ? Qtrue : Qfalse;
Qfalse            607 ext/openssl/ossl_ocsp.c     return result ? Qtrue : Qfalse;
Qfalse            653 ext/openssl/ossl_ocsp.c     return (result == 0) ? Qtrue : Qfalse;
Qfalse            666 ext/openssl/ossl_ocsp.c     return (result == 0) ? Qtrue : Qfalse;
Qfalse            149 ext/openssl/ossl_pkcs12.c     rb_attr(cPKCS12, rb_intern("key"), 1, 0, Qfalse);
Qfalse            150 ext/openssl/ossl_pkcs12.c     rb_attr(cPKCS12, rb_intern("certificate"), 1, 0, Qfalse);
Qfalse            151 ext/openssl/ossl_pkcs12.c     rb_attr(cPKCS12, rb_intern("ca_certs"), 1, 0, Qfalse);
Qfalse            404 ext/openssl/ossl_pkcs7.c     if(flag != Qtrue && flag != Qfalse)
Qfalse            417 ext/openssl/ossl_pkcs7.c     return PKCS7_get_detached(p7) ? Qtrue : Qfalse;
Qfalse            425 ext/openssl/ossl_pkcs7.c     return PKCS7_is_detached(p7) ? Qtrue : Qfalse;
Qfalse            676 ext/openssl/ossl_pkcs7.c     return (ok == 1) ? Qtrue : Qfalse;
Qfalse            936 ext/openssl/ossl_pkcs7.c     rb_attr(cPKCS7, rb_intern("data"), 1, 0, Qfalse);
Qfalse            937 ext/openssl/ossl_pkcs7.c     rb_attr(cPKCS7, rb_intern("error_string"), 1, 1, Qfalse);
Qfalse            196 ext/openssl/ossl_pkey.c 	return Qfalse;
Qfalse             20 ext/openssl/ossl_pkey.h #define OSSL_PKEY_SET_PUBLIC(obj)  rb_iv_set((obj), "private", Qfalse)
Qfalse             47 ext/openssl/ossl_pkey_dh.c 	return Qfalse;
Qfalse             50 ext/openssl/ossl_pkey_dh.c 	return Qfalse;
Qfalse             54 ext/openssl/ossl_pkey_dh.c 	return Qfalse;
Qfalse             74 ext/openssl/ossl_pkey_dh.c     if (obj == Qfalse) {
Qfalse            114 ext/openssl/ossl_pkey_dh.c     if (obj == Qfalse) {
Qfalse            171 ext/openssl/ossl_pkey_dh.c     return (pkey->pkey.dh->pub_key) ? Qtrue : Qfalse;
Qfalse            181 ext/openssl/ossl_pkey_dh.c     return (DH_PRIVATE(pkey->pkey.dh)) ? Qtrue : Qfalse;
Qfalse            285 ext/openssl/ossl_pkey_dh.c     if (obj == Qfalse) {
Qfalse            304 ext/openssl/ossl_pkey_dh.c 	return Qfalse;
Qfalse            307 ext/openssl/ossl_pkey_dh.c     return codes == 0 ? Qtrue : Qfalse;
Qfalse             41 ext/openssl/ossl_pkey_dsa.c 	return Qfalse;
Qfalse             44 ext/openssl/ossl_pkey_dsa.c 	return Qfalse;
Qfalse             48 ext/openssl/ossl_pkey_dsa.c 	return Qfalse;
Qfalse             68 ext/openssl/ossl_pkey_dsa.c     if (obj == Qfalse) {
Qfalse            108 ext/openssl/ossl_pkey_dsa.c     if (obj == Qfalse) {
Qfalse            177 ext/openssl/ossl_pkey_dsa.c     return (pkey->pkey.dsa->pub_key) ? Qtrue : Qfalse;
Qfalse            187 ext/openssl/ossl_pkey_dsa.c     return (DSA_PRIVATE(self, pkey->pkey.dsa)) ? Qtrue : Qfalse;
Qfalse            315 ext/openssl/ossl_pkey_dsa.c     if (obj == Qfalse) {
Qfalse            366 ext/openssl/ossl_pkey_dsa.c     return Qfalse;
Qfalse             41 ext/openssl/ossl_pkey_rsa.c 	return Qfalse;
Qfalse             44 ext/openssl/ossl_pkey_rsa.c 	return Qfalse;
Qfalse             48 ext/openssl/ossl_pkey_rsa.c 	return Qfalse;
Qfalse             69 ext/openssl/ossl_pkey_rsa.c     if (obj == Qfalse) {
Qfalse             99 ext/openssl/ossl_pkey_rsa.c     if (obj == Qfalse) {
Qfalse            180 ext/openssl/ossl_pkey_rsa.c     return (RSA_PRIVATE(self, pkey->pkey.rsa)) ? Qtrue : Qfalse;
Qfalse            409 ext/openssl/ossl_pkey_rsa.c     if (obj == Qfalse) {
Qfalse            186 ext/openssl/ossl_ssl.c     if (NIL_P(cb)) return Qfalse;
Qfalse            223 ext/openssl/ossl_ssl.c     if (NIL_P(cb)) return Qfalse;
Qfalse            226 ext/openssl/ossl_ssl.c     if (EVP_PKEY_type(pkey->type) != EVP_PKEY_DH) return Qfalse;
Qfalse            523 ext/openssl/ossl_ssl.c     ossl_ssl_set_sync_close(self, Qfalse);
Qfalse            869 ext/openssl/ossl_ssl.c         rb_attr(cSSLContext, rb_intern(ossl_sslctx_attrs[i]), 1, 1, Qfalse);
Qfalse            878 ext/openssl/ossl_ssl.c         rb_attr(cSSLSocket, rb_intern(ossl_ssl_attr_readers[i]), 1, 0, Qfalse);
Qfalse            880 ext/openssl/ossl_ssl.c         rb_attr(cSSLSocket, rb_intern(ossl_ssl_attrs[i]), 1, 1, Qfalse);
Qfalse            500 ext/openssl/ossl_x509cert.c     return Qfalse;
Qfalse            517 ext/openssl/ossl_x509cert.c 	return Qfalse;
Qfalse            354 ext/openssl/ossl_x509crl.c     return Qfalse;
Qfalse            230 ext/openssl/ossl_x509ext.c     if(NIL_P(critical)) critical = Qfalse;
Qfalse            397 ext/openssl/ossl_x509ext.c     return X509_EXTENSION_get_critical(ext) ? Qtrue : Qfalse;
Qfalse            433 ext/openssl/ossl_x509ext.c     rb_attr(cX509ExtFactory, rb_intern("issuer_certificate"), 1, 0, Qfalse);
Qfalse            434 ext/openssl/ossl_x509ext.c     rb_attr(cX509ExtFactory, rb_intern("subject_certificate"), 1, 0, Qfalse);
Qfalse            435 ext/openssl/ossl_x509ext.c     rb_attr(cX509ExtFactory, rb_intern("subject_request"), 1, 0, Qfalse);
Qfalse            436 ext/openssl/ossl_x509ext.c     rb_attr(cX509ExtFactory, rb_intern("crl"), 1, 0, Qfalse);
Qfalse            437 ext/openssl/ossl_x509ext.c     rb_attr(cX509ExtFactory, rb_intern("config"), 1, 0, Qfalse);
Qfalse            263 ext/openssl/ossl_x509name.c     if(CLASS_OF(other) != cX509Name) return Qfalse;
Qfalse            266 ext/openssl/ossl_x509name.c     return (result == 0) ? Qtrue : Qfalse;
Qfalse            370 ext/openssl/ossl_x509req.c     return Qfalse;
Qfalse            409 ext/openssl/ossl_x509store.c     return result ? Qtrue : Qfalse;
Qfalse            577 ext/openssl/ossl_x509store.c     rb_attr(cX509Store, rb_intern("verify_callback"), 1, 0, Qfalse);
Qfalse            578 ext/openssl/ossl_x509store.c     rb_attr(cX509Store, rb_intern("error"), 1, 0, Qfalse);
Qfalse            579 ext/openssl/ossl_x509store.c     rb_attr(cX509Store, rb_intern("error_string"), 1, 0, Qfalse);
Qfalse            580 ext/openssl/ossl_x509store.c     rb_attr(cX509Store, rb_intern("chain"), 1, 0, Qfalse);
Qfalse            243 ext/racc/cparse/cparse.c     v->lex_is_iterator = Qfalse;
Qfalse            379 ext/racc/cparse/cparse.c     v->lex_is_iterator = Qfalse;
Qfalse            390 ext/racc/cparse/cparse.c         *tok = Qfalse;
Qfalse            559 ext/racc/cparse/cparse.c             v->retval = Qfalse;
Qfalse            670 ext/readline/readline.c     return history_length == 0 ? Qtrue : Qfalse;
Qfalse             77 ext/sdbm/init.c     return Qfalse;
Qfalse            524 ext/sdbm/init.c     return Qfalse;
Qfalse            633 ext/sdbm/init.c     return Qfalse;
Qfalse            655 ext/sdbm/init.c     return Qfalse;
Qfalse            523 ext/socket/socket.c     return (fptr->mode & FMODE_NOREVLOOKUP) ? Qtrue : Qfalse;
Qfalse            644 ext/socket/socket.c     return do_not_reverse_lookup?Qtrue:Qfalse;
Qfalse           1610 ext/socket/socket.c     return Qfalse;
Qfalse            219 ext/stringio/stringio.c     int trunc = Qfalse;
Qfalse            277 ext/stringio/stringio.c     return Qfalse;
Qfalse            439 ext/stringio/stringio.c     if (!CLOSED(ptr)) return Qfalse;
Qfalse            454 ext/stringio/stringio.c     if (READABLE(ptr)) return Qfalse;
Qfalse            469 ext/stringio/stringio.c     if (WRITABLE(ptr)) return Qfalse;
Qfalse            486 ext/stringio/stringio.c     if (ptr->pos < RSTRING(ptr->string)->len) return Qfalse;
Qfalse            848 ext/strscan/strscan.c     return (*(CURPTR(p) - 1) == '\n') ? Qtrue : Qfalse;
Qfalse            868 ext/strscan/strscan.c     return EOS_P(p) ? Qtrue : Qfalse;
Qfalse            898 ext/strscan/strscan.c     return EOS_P(p) ? Qfalse : Qtrue;
Qfalse            917 ext/strscan/strscan.c     return MATCHED_P(p) ? Qtrue : Qfalse;
Qfalse            374 ext/syck/rubyext.c                 obj = Qfalse;
Qfalse            110 ext/syslog/syslog.c     return syslog_opened ? Qtrue : Qfalse;
Qfalse            602 ext/tk/tcltklib.c     return Qfalse;
Qfalse           1161 ext/tk/tcltklib.c         return Qfalse;  /* not eventloop */
Qfalse           1172 ext/tk/tcltklib.c         return Qfalse;
Qfalse           1242 ext/tk/tcltklib.c         return Qfalse;
Qfalse           1643 ext/tk/tcltklib.c         return Qfalse;
Qfalse           1771 ext/tk/tcltklib.c     rb_thread_critical = Qfalse;
Qfalse           1795 ext/tk/tcltklib.c         check_rootwidget = Qfalse;
Qfalse           1911 ext/tk/tcltklib.c         check_rootwidget = Qfalse;
Qfalse           2074 ext/tk/tcltklib.c             return Qfalse;
Qfalse           2087 ext/tk/tcltklib.c         return Qfalse;
Qfalse           2093 ext/tk/tcltklib.c         return Qfalse;
Qfalse           2210 ext/tk/tcltklib.c     rb_thread_critical = Qfalse;
Qfalse           2286 ext/tk/tcltklib.c         if (old_gc == Qfalse) rb_gc_enable();
Qfalse           2478 ext/tk/tcltklib.c     rb_thread_critical = Qfalse;
Qfalse           2600 ext/tk/tcltklib.c     if (old_gc == Qfalse) rb_gc_enable();
Qfalse           4741 ext/tk/tcltklib.c         if (NIL_P(opts) || opts == Qfalse) {
Qfalse           4884 ext/tk/tcltklib.c     } else if (safemode == Qfalse || NIL_P(safemode)) {
Qfalse           4974 ext/tk/tcltklib.c         safemode = Qfalse;
Qfalse           4977 ext/tk/tcltklib.c         && (safemode == Qfalse || NIL_P(safemode))) {
Qfalse           5001 ext/tk/tcltklib.c       return Qfalse;
Qfalse           5151 ext/tk/tcltklib.c         return Qfalse;
Qfalse           5170 ext/tk/tcltklib.c         return Qfalse;
Qfalse           5220 ext/tk/tcltklib.c         return Qfalse;
Qfalse           5271 ext/tk/tcltklib.c         return Qfalse;
Qfalse           5274 ext/tk/tcltklib.c     return Qfalse;
Qfalse           5287 ext/tk/tcltklib.c         return Qfalse;
Qfalse           5300 ext/tk/tcltklib.c         return Qfalse;
Qfalse           7288 ext/tk/tcltklib.c         return Qfalse;
Qfalse           7456 ext/tk/tcltklib.c         if (old_gc == Qfalse) rb_gc_enable();
Qfalse           7496 ext/tk/tcltklib.c         if (old_gc == Qfalse) rb_gc_enable();
Qfalse           7586 ext/tk/tcltklib.c     if (old_gc == Qfalse) rb_gc_enable();
Qfalse            698 ext/tk/tkutil/tkutil.c     return ary2list2(hash2kv(hash, Qnil, self), Qfalse, self);
Qfalse            707 ext/tk/tkutil/tkutil.c     return ary2list2(hash2kv_enc(hash, Qnil, self), Qfalse, self);
Qfalse            932 ext/tk/tkutil/tkutil.c     if (old_gc == Qfalse) rb_gc_enable();
Qfalse            948 ext/tk/tkutil/tkutil.c             return Qfalse;
Qfalse            969 ext/tk/tkutil/tkutil.c         return Qfalse;
Qfalse           1470 ext/tk/tkutil/tkutil.c     if (old_gc == Qfalse) rb_gc_enable();
Qfalse            154 ext/win32ole/win32ole.c static BOOL gOLEInitialized = Qfalse;
Qfalse            609 ext/win32ole/win32ole.c     gOLEInitialized = Qfalse;
Qfalse            617 ext/win32ole/win32ole.c     if(gOLEInitialized == Qfalse) {
Qfalse           1215 ext/win32ole/win32ole.c             obj = (*V_BOOLREF(pvar) ? Qtrue : Qfalse);
Qfalse           1217 ext/win32ole/win32ole.c             obj = (V_BOOL(pvar) ? Qtrue : Qfalse);
Qfalse           3731 ext/win32ole/win32ole.c     VALUE found = Qfalse;
Qfalse           3734 ext/win32ole/win32ole.c     for (i = 0; i < count && found == Qfalse; i++) {
Qfalse           3850 ext/win32ole/win32ole.c     VALUE found = Qfalse;
Qfalse           3862 ext/win32ole/win32ole.c         return Qfalse;
Qfalse           3867 ext/win32ole/win32ole.c         return Qfalse;
Qfalse           3918 ext/win32ole/win32ole.c     VALUE found = Qfalse;
Qfalse           3925 ext/win32ole/win32ole.c         return Qfalse;
Qfalse           3934 ext/win32ole/win32ole.c         for(j = 0; found == Qfalse; j++) {
Qfalse           3986 ext/win32ole/win32ole.c     VALUE found = Qfalse;
Qfalse           4000 ext/win32ole/win32ole.c     if (found == Qfalse) {
Qfalse           4004 ext/win32ole/win32ole.c     if (found == Qfalse) {
Qfalse           4224 ext/win32ole/win32ole.c     if (oleclass_from_typelib(self, pTypeLib, oleclass) == Qfalse) {
Qfalse           4396 ext/win32ole/win32ole.c         visible = Qfalse;
Qfalse           4987 ext/win32ole/win32ole.c     VALUE visible = Qfalse;
Qfalse           5423 ext/win32ole/win32ole.c         return Qfalse;
Qfalse           5427 ext/win32ole/win32ole.c         visible = Qfalse;
Qfalse           5468 ext/win32ole/win32ole.c     VALUE event = Qfalse;
Qfalse           5537 ext/win32ole/win32ole.c         return Qfalse;
Qfalse           6000 ext/win32ole/win32ole.c     VALUE ret = Qfalse;
Qfalse           6822 ext/win32ole/win32ole.c     return ev_on_event(argc, argv, self, Qfalse);
Qfalse            795 ext/zlib/zlib.c     if (len <= 0) return Qfalse;
Qfalse            808 ext/zlib/zlib.c     return Qfalse;
Qfalse           1087 ext/zlib/zlib.c     return ZSTREAM_IS_FINISHED(get_zstream(obj)) ? Qtrue : Qfalse;
Qfalse           1099 ext/zlib/zlib.c     return ZSTREAM_IS_READY(z) ? Qfalse : Qtrue;
Qfalse           1634 ext/zlib/zlib.c     return Qfalse;
Qfalse           1875 ext/zlib/zlib.c 	if (NIL_P(str)) return Qfalse;
Qfalse           2650 ext/zlib/zlib.c     return NIL_P(gz->io) ? Qtrue : Qfalse;
Qfalse           2661 ext/zlib/zlib.c     return GZFILE_IS_FINISHED(gz) ? Qtrue : Qfalse;
Qfalse           2671 ext/zlib/zlib.c     return (get_gzfile(obj)->z.flags & GZFILE_FLAG_SYNC) ? Qtrue : Qfalse;
Qfalse            814 file.c             return Qfalse;
Qfalse            892 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
Qfalse            894 file.c             return Qfalse;
Qfalse            914 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
Qfalse            918 file.c             return Qfalse;
Qfalse            950 file.c             if (lstat(StringValueCStr(fname), &st) < 0) return Qfalse;
Qfalse            954 file.c             return Qfalse;
Qfalse            984 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
Qfalse            988 file.c             return Qfalse;
Qfalse           1012 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
Qfalse           1016 file.c             return Qfalse;
Qfalse           1034 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
Qfalse           1037 file.c             return Qfalse;
Qfalse           1054 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
Qfalse           1071 file.c             if (eaccess(StringValueCStr(fname), R_OK) < 0) return Qfalse;
Qfalse           1088 file.c             if (access(StringValueCStr(fname), R_OK) < 0) return Qfalse;
Qfalse           1141 file.c             if (eaccess(StringValueCStr(fname), W_OK) < 0) return Qfalse;
Qfalse           1158 file.c             if (access(StringValueCStr(fname), W_OK) < 0) return Qfalse;
Qfalse           1182 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
Qfalse           1203 file.c             if (eaccess(StringValueCStr(fname), X_OK) < 0) return Qfalse;
Qfalse           1220 file.c             if (access(StringValueCStr(fname), X_OK) < 0) return Qfalse;
Qfalse           1241 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
Qfalse           1243 file.c             return Qfalse;
Qfalse           1259 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
Qfalse           1261 file.c             return Qfalse;
Qfalse           1296 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
Qfalse           1298 file.c             return Qfalse;
Qfalse           1306 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
Qfalse           1308 file.c             return Qfalse;
Qfalse           1326 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
Qfalse           1329 file.c             return Qfalse;
Qfalse           1340 file.c             if (stat(StringValueCStr(fname), &st) < 0) return Qfalse;
Qfalse           1342 file.c             return Qfalse;
Qfalse           1359 file.c             return Qfalse;
Qfalse           1376 file.c             return Qfalse;
Qfalse           1420 file.c             if (rb_stat(fname1, &st1) < 0) return Qfalse;
Qfalse           1421 file.c             if (rb_stat(fname2, &st2) < 0) return Qfalse;
Qfalse           1422 file.c             if (st1.st_dev != st2.st_dev) return Qfalse;
Qfalse           1423 file.c             if (st1.st_ino != st2.st_ino) return Qfalse;
Qfalse           1433 file.c             if (f1 == INVALID_HANDLE_VALUE) return Qfalse;
Qfalse           1436 file.c             if (f2 == INVALID_HANDLE_VALUE) return Qfalse;
Qfalse           1443 file.c             if (!f1 || !f2) return Qfalse;
Qfalse           1444 file.c             if (rb_w32_iswin95()) return Qfalse;
Qfalse           1449 file.c             if (access(RSTRING(fname1)->ptr, 0)) return Qfalse;
Qfalse           1450 file.c             if (access(RSTRING(fname2)->ptr, 0)) return Qfalse;
Qfalse           1454 file.c             if (RSTRING(fname1)->len != RSTRING(fname2)->len) return Qfalse;
Qfalse           1456 file.c         	return Qfalse;
Qfalse           3122 file.c         	      return Qfalse;
Qfalse           3225 file.c         	return RTEST(argv[0]) ? Qtrue : Qfalse;
Qfalse           3229 file.c             if (cmd == 0) return Qfalse;
Qfalse           3329 file.c         	if (rb_stat(argv[1], &st1) < 0) return Qfalse;
Qfalse           3330 file.c         	if (rb_stat(argv[2], &st2) < 0) return Qfalse;
Qfalse           3335 file.c         	    return Qfalse;
Qfalse           3339 file.c         	    return Qfalse;
Qfalse           3343 file.c         	    return Qfalse;
Qfalse           3463 file.c             return Qfalse;
Qfalse           3481 file.c             return Qfalse;
Qfalse           3507 file.c             return Qfalse;
Qfalse           3529 file.c             return Qfalse;
Qfalse           3552 file.c             return Qfalse;
Qfalse           3572 file.c             return Qfalse;
Qfalse           3591 file.c             return Qfalse;
Qfalse           3598 file.c             return Qfalse;
Qfalse           3619 file.c             return Qfalse;
Qfalse           3640 file.c         	return st->st_mode & S_IRUSR ? Qtrue : Qfalse;
Qfalse           3644 file.c         	return st->st_mode & S_IRGRP ? Qtrue : Qfalse;
Qfalse           3647 file.c             if (!(st->st_mode & S_IROTH)) return Qfalse;
Qfalse           3672 file.c         	return st->st_mode & S_IRUSR ? Qtrue : Qfalse;
Qfalse           3676 file.c         	return st->st_mode & S_IRGRP ? Qtrue : Qfalse;
Qfalse           3679 file.c             if (!(st->st_mode & S_IROTH)) return Qfalse;
Qfalse           3728 file.c         	return st->st_mode & S_IWUSR ? Qtrue : Qfalse;
Qfalse           3732 file.c         	return st->st_mode & S_IWGRP ? Qtrue : Qfalse;
Qfalse           3735 file.c             if (!(st->st_mode & S_IWOTH)) return Qfalse;
Qfalse           3758 file.c         	return st->st_mode & S_IWUSR ? Qtrue : Qfalse;
Qfalse           3762 file.c         	return st->st_mode & S_IWGRP ? Qtrue : Qfalse;
Qfalse           3765 file.c             if (!(st->st_mode & S_IWOTH)) return Qfalse;
Qfalse           3816 file.c         	return st->st_mode & S_IXUSR ? Qtrue : Qfalse;
Qfalse           3820 file.c         	return st->st_mode & S_IXGRP ? Qtrue : Qfalse;
Qfalse           3823 file.c             if (!(st->st_mode & S_IXOTH)) return Qfalse;
Qfalse           3844 file.c         	return st->st_mode & S_IXUSR ? Qtrue : Qfalse;
Qfalse           3848 file.c         	return st->st_mode & S_IXGRP ? Qtrue : Qfalse;
Qfalse           3851 file.c             if (!(st->st_mode & S_IXOTH)) return Qfalse;
Qfalse           3871 file.c             return Qfalse;
Qfalse           3889 file.c             return Qfalse;
Qfalse           3929 file.c             return Qfalse;
Qfalse           3950 file.c             return Qfalse;
Qfalse           3971 file.c             return Qfalse;
Qfalse           4042 file.c             return path_check_0(rb_str_new2(path), Qfalse);
Qfalse            211 gc.c               dont_gc = Qfalse;
Qfalse            598 gc.c               if (p < lomem || p > himem) return Qfalse;
Qfalse            607 gc.c               return Qfalse;
Qfalse           1271 gc.c               if (!heaps) return Qfalse;
Qfalse           1886 gc.c               if (ptr == Qfalse) return Qfalse;
Qfalse            921 hash.c             return Qfalse;
Qfalse           1281 hash.c             return Qfalse;
Qfalse           1313 hash.c             data[0] = Qfalse;
Qfalse           1331 hash.c         	data->result = Qfalse;
Qfalse           1335 hash.c         	data->result = Qfalse;
Qfalse           1349 hash.c         	    return Qfalse;
Qfalse           1354 hash.c         	return Qfalse;
Qfalse           1358 hash.c         	    return Qfalse;
Qfalse           1390 hash.c             return hash_equal(hash1, hash2, Qfalse);
Qfalse           1898 hash.c             return env_each_i(ehash, Qfalse);
Qfalse           2085 hash.c             return Qfalse;
Qfalse           2098 hash.c             return Qfalse;
Qfalse           2107 hash.c             if (TYPE(value) != T_STRING) return Qfalse;
Qfalse           2121 hash.c             return Qfalse;
Qfalse            495 io.c           	return Qfalse;
Qfalse            538 io.c           	return Qfalse;
Qfalse            940 io.c               if (READ_DATA_PENDING(fptr)) return Qfalse;
Qfalse            946 io.c           	return Qfalse;
Qfalse            970 io.c               return (fptr->mode & FMODE_SYNC) ? Qtrue : Qfalse;
Qfalse           1520 io.c               return Qfalse;
Qfalse           1975 io.c           	return Qfalse;
Qfalse           2057 io.c               rb_io_fptr_cleanup(fptr, Qfalse);
Qfalse           2126 io.c               return 0 <= fptr->fd ? Qfalse : Qtrue;
Qfalse           4182 io.c           	    return Qfalse;
Qfalse           4607 io.c               if (NIL_P(arg) || arg == Qfalse) {
Qfalse           5107 io.c               return Qfalse;
Qfalse            435 marshal.c          else if (obj == Qfalse) {
Qfalse            463 marshal.c      	    w_class(TYPE_USRMARSHAL, obj, arg, Qfalse);
Qfalse            478 marshal.c      	    w_class(TYPE_USERDEF, obj, arg, Qfalse);
Qfalse            719 marshal.c          arg.taint   = Qfalse;
Qfalse           1002 marshal.c      	v = Qfalse;
Qfalse           1170 marshal.c      		*ivp = Qfalse;
Qfalse           1219 marshal.c      		   warn = Qfalse;
Qfalse            139 numeric.c      	return Qfalse;
Qfalse            157 numeric.c          if (do_coerce(&x, &y, Qfalse))
Qfalse            167 numeric.c          if (!do_coerce(&x, &y, Qfalse) ||
Qfalse            376 numeric.c          return Qfalse;
Qfalse            413 numeric.c          return Qfalse;
Qfalse            759 numeric.c          if (TYPE(x) != TYPE(y)) return Qfalse;
Qfalse            812 numeric.c      	if (isnan(b)) return Qfalse;
Qfalse            818 numeric.c          if (isnan(a)) return Qfalse;
Qfalse            819 numeric.c          return (a == b)?Qtrue:Qfalse;
Qfalse            914 numeric.c      	if (isnan(b)) return Qfalse;
Qfalse            920 numeric.c          if (isnan(a)) return Qfalse;
Qfalse            921 numeric.c          return (a > b)?Qtrue:Qfalse;
Qfalse            949 numeric.c      	if (isnan(b)) return Qfalse;
Qfalse            955 numeric.c          if (isnan(a)) return Qfalse;
Qfalse            956 numeric.c          return (a >= b)?Qtrue:Qfalse;
Qfalse            983 numeric.c      	if (isnan(b)) return Qfalse;
Qfalse            989 numeric.c          if (isnan(a)) return Qfalse;
Qfalse            990 numeric.c          return (a < b)?Qtrue:Qfalse;
Qfalse           1018 numeric.c      	if (isnan(b)) return Qfalse;
Qfalse           1024 numeric.c          if (isnan(a)) return Qfalse;
Qfalse           1025 numeric.c          return (a <= b)?Qtrue:Qfalse;
Qfalse           1046 numeric.c      	if (isnan(a) || isnan(b)) return Qfalse;
Qfalse           1049 numeric.c          return Qfalse;
Qfalse           1097 numeric.c          return Qfalse;
Qfalse           1118 numeric.c          return isnan(value) ? Qtrue : Qfalse;
Qfalse           1162 numeric.c      	return Qfalse;
Qfalse           1165 numeric.c      	return Qfalse;
Qfalse           2113 numeric.c          return fix_divide(x, y, Qfalse);
Qfalse           2238 numeric.c      	return (FIX2LONG(x) == FIX2LONG(y))?Qtrue:Qfalse;
Qfalse           2244 numeric.c      	return (double)FIX2LONG(x) == RFLOAT(y)->value ? Qtrue : Qfalse;
Qfalse           2294 numeric.c      	return Qfalse;
Qfalse           2298 numeric.c      	return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) > 0 ? Qtrue : Qfalse;
Qfalse           2300 numeric.c      	return (double)FIX2LONG(x) > RFLOAT(y)->value ? Qtrue : Qfalse;
Qfalse           2321 numeric.c      	return Qfalse;
Qfalse           2325 numeric.c      	return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) >= 0 ? Qtrue : Qfalse;
Qfalse           2327 numeric.c      	return (double)FIX2LONG(x) >= RFLOAT(y)->value ? Qtrue : Qfalse;
Qfalse           2348 numeric.c      	return Qfalse;
Qfalse           2352 numeric.c      	return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) < 0 ? Qtrue : Qfalse;
Qfalse           2354 numeric.c      	return (double)FIX2LONG(x) < RFLOAT(y)->value ? Qtrue : Qfalse;
Qfalse           2375 numeric.c      	return Qfalse;
Qfalse           2379 numeric.c      	return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) <= 0 ? Qtrue : Qfalse;
Qfalse           2381 numeric.c      	return (double)FIX2LONG(x) <= RFLOAT(y)->value ? Qtrue : Qfalse;
Qfalse           2786 numeric.c          return Qfalse;
Qfalse             53 object.c           return Qfalse;
Qfalse             95 object.c           return Qfalse;
Qfalse            397 object.c           return Qfalse;
Qfalse            447 object.c           return Qfalse;
Qfalse            575 object.c           return Qfalse;
Qfalse            674 object.c           return Qfalse;
Qfalse            823 object.c           return RTEST(obj2)?Qtrue:Qfalse;
Qfalse            861 object.c           return RTEST(obj2)?Qfalse:Qtrue;
Qfalse            901 object.c           return Qfalse;
Qfalse            917 object.c           return RTEST(obj2)?Qtrue:Qfalse;
Qfalse            936 object.c           return RTEST(obj2)?Qtrue:Qfalse;
Qfalse            964 object.c           return Qfalse;
Qfalse           1221 object.c       	    return Qfalse;
Qfalse           1241 object.c           if (mod == arg) return Qfalse;
Qfalse           1286 object.c           if (mod == arg) return Qfalse;
Qfalse           1911 object.c           rb_cvar_set(obj, id, val, Qfalse);
Qfalse           1926 object.c       		     val == Qfalse ? "false" :
Qfalse           1959 object.c           v = convert_type(val, tname, method, Qfalse);
Qfalse           1985 object.c           VALUE v = convert_type(val, "Integer", method, Qfalse);
Qfalse           2021 object.c           tmp = convert_type(val, "Integer", "to_int", Qfalse);
Qfalse           2547 object.c           rb_define_global_const("FALSE", Qfalse);
Qfalse           1795 parse.y        			    $1->nd_lit = rb_range_new($1->nd_lit, $3->nd_lit, Qfalse);
Qfalse           2583 parse.y        			$$ = NEW_YIELD(0, Qfalse);
Qfalse           2591 parse.y        			$$ = NEW_YIELD(0, Qfalse);
Qfalse           5314 parse.y            if (n < 0 || (n > 0 && p[len] != '\n' && p[len] != '\r')) return Qfalse;
Qfalse           5316 parse.y            return Qfalse;
Qfalse           5493 parse.y            if (len <= 7) return Qfalse;
Qfalse           5494 parse.y            if (!(beg = pragma_marker(str, len))) return Qfalse;
Qfalse           5495 parse.y            if (!(end = pragma_marker(beg, str + len - beg))) return Qfalse;
Qfalse           5602 parse.y            int fallthru = Qfalse;
Qfalse           5625 parse.y            command_start = Qfalse;
Qfalse           5677 parse.y        	    fallthru = Qfalse;
Qfalse           5750 parse.y        		    first_p = Qfalse;
Qfalse           6120 parse.y        		    set_yylval_literal(rb_cstr_to_inum(tok(), 16, Qfalse));
Qfalse           6144 parse.y        		    set_yylval_literal(rb_cstr_to_inum(tok(), 2, Qfalse));
Qfalse           6168 parse.y        		    set_yylval_literal(rb_cstr_to_inum(tok(), 10, Qfalse));
Qfalse           6199 parse.y        			set_yylval_literal(rb_cstr_to_inum(tok(), 8, Qfalse));
Qfalse           6297 parse.y        	    set_yylval_literal(rb_cstr_to_inum(tok(), 10, Qfalse));
Qfalse           7397 parse.y        	    return Qfalse;
Qfalse           7406 parse.y        	    return Qfalse;
Qfalse           7420 parse.y        	    if (!value_expr(node->nd_body)) return Qfalse;
Qfalse           7652 parse.y            return Qfalse;
Qfalse           7844 parse.y        	    state = Qfalse;
Qfalse           7851 parse.y        	state = Qfalse;
Qfalse           8064 parse.y            if (lvtbl == 0) return Qfalse;
Qfalse           8068 parse.y            return Qfalse;
Qfalse           8339 parse.y            int localid = Qfalse;
Qfalse           8341 parse.y            if (!m) return Qfalse;
Qfalse           8344 parse.y        	return Qfalse;
Qfalse           8372 parse.y        	  default: return Qfalse;
Qfalse           8389 parse.y        	if (*++m != ']') return Qfalse;
Qfalse           8396 parse.y        	if (*m != '_' && !ISALPHA(*m) && !ismbchar(*m)) return Qfalse;
Qfalse           8405 parse.y            return *m ? Qfalse : Qtrue;
Qfalse           8560 parse.y            return Qfalse;
Qfalse           8567 parse.y            return Qfalse;
Qfalse           8574 parse.y            return Qfalse;
Qfalse           8581 parse.y            return Qfalse;
Qfalse           8588 parse.y            return Qfalse;
Qfalse           8653 parse.y            parser->eofp = Qfalse;
Qfalse           8767 parse.y            return ruby__end__seen ? Qtrue : Qfalse;
Qfalse           8842 parse.y            if (x == Qfalse) return x;
Qfalse           9116 parse.y            parser->eofp = Qfalse;
Qfalse           9139 parse.y            return ripper_yydebug ? Qtrue : Qfalse;
Qfalse            390 process.c      	return Qfalse;
Qfalse            429 process.c      	return Qfalse;
Qfalse            470 process.c      	return Qfalse;
Qfalse            519 process.c          return WEXITSTATUS(status) == EXIT_SUCCESS ? Qtrue : Qfalse;
Qfalse            540 process.c      	return Qfalse;
Qfalse            542 process.c          return Qfalse;
Qfalse           1467 process.c      	  case Qfalse:
Qfalse           1499 process.c          int i, hooked = Qfalse;
Qfalse           1525 process.c      	overriding = Qfalse;
Qfalse           1601 process.c          return Qfalse;
Qfalse           2505 process.c      	return Qfalse;
Qfalse           3197 process.c          return Qfalse;
Qfalse           3254 process.c          return Qfalse;
Qfalse           3310 process.c          return Qfalse;
Qfalse           3420 process.c          return Qfalse;
Qfalse             19 range.c        #define SET_EXCL(r,v) rb_ivar_set((r), id_excl, (v) ? Qtrue : Qfalse)
Qfalse             97 range.c            return EXCL(range) ? Qtrue : Qfalse;
Qfalse            120 range.c        	return Qfalse;
Qfalse            123 range.c        	return Qfalse;
Qfalse            125 range.c        	return Qfalse;
Qfalse            127 range.c            if (EXCL(range) != EXCL(obj)) return Qfalse;
Qfalse            137 range.c            if (NIL_P(r)) return Qfalse;
Qfalse            139 range.c            return Qfalse;
Qfalse            148 range.c            if (NIL_P(r)) return Qfalse;
Qfalse            152 range.c            return Qfalse;
Qfalse            175 range.c        	return Qfalse;
Qfalse            178 range.c        	return Qfalse;
Qfalse            180 range.c        	return Qfalse;
Qfalse            182 range.c            if (EXCL(range) != EXCL(obj)) return Qfalse;
Qfalse            516 range.c        	if (NIL_P(b)) return Qfalse;
Qfalse            518 range.c        	if (NIL_P(e)) return Qfalse;
Qfalse            638 range.c        	return Qfalse;
Qfalse            672 range.c            return Qfalse;
Qfalse            533 re.c               return Qfalse;
Qfalse            838 re.c           	     rb_reg_raise(pattern, RREGEXP(re)->len, err, re, Qfalse);
Qfalse            928 re.c           	    rb_reg_raise(RREGEXP(re)->str, RREGEXP(re)->len, err, 0, Qfalse);
Qfalse            963 re.c               if (RMATCH(match)->BEG(nth) == -1) return Qfalse;
Qfalse           1367 re.c               rb_reg_initialize(re, s, len, options, Qfalse);
Qfalse           1453 re.c               if (TYPE(re2) != T_REGEXP) return Qfalse;
Qfalse           1455 re.c               if (RREGEXP(re1)->len != RREGEXP(re2)->len) return Qfalse;
Qfalse           1461 re.c               return Qfalse;
Qfalse           1530 re.c           	    return Qfalse;
Qfalse           1536 re.c           	return Qfalse;
Qfalse           1708 re.c               rb_reg_initialize(self, s, len, flags, Qfalse);
Qfalse           1976 re.c           		      rb_reg_options(re), Qfalse);
Qfalse           2129 re.c               return ruby_ignorecase?Qtrue:Qfalse;
Qfalse             49 ruby.c         VALUE ruby_debug = Qfalse;
Qfalse             50 ruby.c         VALUE ruby_verbose = Qfalse;
Qfalse             55 ruby.c         char *ruby_inplace_mode = Qfalse;
Qfalse             61 ruby.c         static VALUE do_loop = Qfalse, do_print = Qfalse;
Qfalse             62 ruby.c         static VALUE do_check = Qfalse, do_line = Qfalse;
Qfalse             63 ruby.c         static VALUE do_split = Qfalse;
Qfalse            401 ruby.c         	    int hyphen = Qfalse;
Qfalse            481 ruby.c             VALUE e_script = Qfalse;
Qfalse            485 ruby.c             do_search = Qfalse;
Qfalse            543 ruby.c         		    ruby_verbose = Qfalse; break;
Qfalse            883 ruby.c         	    xflag = Qfalse;
Qfalse           1139 ruby.c             if (ruby_verbose == Qfalse) return INT2FIX(1);
Qfalse            678 ruby.h         	if (obj == Qfalse) return rb_cFalseClass;
Qfalse            694 ruby.h         	if (obj == Qfalse) return T_FALSE;
Qfalse            703 ruby.h             return Qfalse;
Qfalse            329 string.c           return Qfalse;
Qfalse            478 string.c           return Qfalse;
Qfalse            852 string.c       	    return Qfalse;
Qfalse            860 string.c           return Qfalse;
Qfalse            874 string.c       	return Qfalse;
Qfalse            880 string.c           return Qfalse;
Qfalse           1395 string.c           return rb_str_upto(beg, end, Qfalse);
Qfalse           1440 string.c       	      case Qfalse:
Qfalse           2236 string.c       	return Qfalse;
Qfalse           2242 string.c           if (i == -1) return Qfalse;
Qfalse           2281 string.c           return rb_str_to_inum(str, base, Qfalse);
Qfalse           2302 string.c           return rb_float_new(rb_str_to_dbl(str, Qfalse));
Qfalse           3213 string.c           int awk_split = Qfalse;
Qfalse           3885 string.c           return rb_str_to_inum(str, 16, Qfalse);
Qfalse           3906 string.c           return rb_str_to_inum(str, -8, Qfalse);
Qfalse            730 struct.c           if (TYPE(s2) != T_STRUCT) return Qfalse;
Qfalse            731 struct.c           if (rb_obj_class(s) != rb_obj_class(s2)) return Qfalse;
Qfalse            737 struct.c       	if (!rb_equal(RSTRUCT(s)->ptr[i], RSTRUCT(s2)->ptr[i])) return Qfalse;
Qfalse            778 struct.c           if (TYPE(s2) != T_STRUCT) return Qfalse;
Qfalse            779 struct.c           if (rb_obj_class(s) != rb_obj_class(s2)) return Qfalse;
Qfalse            785 struct.c       	if (!rb_eql(RSTRUCT(s)->ptr[i], RSTRUCT(s2)->ptr[i])) return Qfalse;
Qfalse            221 time.c             return time_timeval(time, Qfalse);
Qfalse            272 time.c         	obj = rb_str_to_inum(obj, 10, Qfalse);
Qfalse            816 time.c             return time_utc_or_local(argc, argv, Qfalse, klass);
Qfalse            940 time.c             return Qfalse;
Qfalse            969 time.c             return Qfalse;
Qfalse           1496 time.c             return (tobj->tm.tm_wday == (n)) ? Qtrue : Qfalse;\
Qfalse           1638 time.c             return tobj->tm.tm_isdst?Qtrue:Qfalse;
Qfalse           1770 time.c         		    tobj->tm.tm_isdst?Qtrue:Qfalse,
Qfalse            689 variable.c         if (entry->var->getter == undef_getter) return Qfalse;
Qfalse            824 variable.c         if (!generic_iv_tbl) return Qfalse;
Qfalse            825 variable.c         if (!st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) return Qfalse;
Qfalse            829 variable.c         return Qfalse;
Qfalse            946 variable.c         return ivar_get(obj, id, Qfalse);
Qfalse            984 variable.c         return Qfalse;
Qfalse           1227 variable.c     	return Qfalse;
Qfalse           1318 variable.c         return rb_const_get_0(klass, id, Qfalse, Qtrue);
Qfalse           1324 variable.c         return rb_const_get_0(klass, id, Qtrue, Qfalse);
Qfalse           1449 variable.c     		return Qfalse;
Qfalse           1460 variable.c         return Qfalse;
Qfalse           1472 variable.c         return rb_const_defined_0(klass, id, Qfalse, Qtrue);
Qfalse           1478 variable.c         return rb_const_defined_0(klass, id, Qtrue, Qfalse);
Qfalse           1500 variable.c     	VALUE value = Qfalse;
Qfalse           1542 variable.c         mod_av_set(klass, id, val, Qfalse);
Qfalse           1565 variable.c         return Qfalse;
Qfalse           1575 variable.c         rb_cvar_set(klass, id, val, Qfalse);


Qnil

Qnil               30 array.c        	*mem++ = Qnil;
Qnil              499 array.c            if (RARRAY(ary)->len == 0) return Qnil;
Qnil              544 array.c            if (RARRAY(ary)->len == 0) return Qnil;
Qnil              632 array.c            rb_ary_store(ary, len + argc - 1, Qnil);
Qnil              645 array.c            if (RARRAY(ary)->len == 0) return Qnil;
Qnil              647 array.c        	return Qnil;
Qnil              667 array.c            if (beg > RARRAY(ary)->len) return Qnil;
Qnil              668 array.c            if (beg < 0 || len < 0) return Qnil;
Qnil              747 array.c              case Qnil:
Qnil              748 array.c        	return Qnil;
Qnil              794 array.c        	if (RARRAY(ary)->len == 0) return Qnil;
Qnil              819 array.c        	if (RARRAY(ary)->len == 0) return Qnil;
Qnil              910 array.c            return Qnil;
Qnil              953 array.c            return Qnil;
Qnil             1651 array.c        	  case Qnil:
Qnil             1749 array.c        	return Qnil;
Qnil             1771 array.c            if (pos >= len) return Qnil;
Qnil             1774 array.c        	if (pos < 0) return Qnil;
Qnil             1882 array.c            if (RARRAY(ary)->len == i2) return Qnil;
Qnil             1966 array.c        	return Qnil;
Qnil             2290 array.c            return Qnil;
Qnil             2320 array.c            return Qnil;
Qnil             2619 array.c        	return Qnil;
Qnil             2675 array.c        	return Qnil;
Qnil             2788 array.c            VALUE memo = Qnil;
Qnil             2804 array.c            if (mod == 0) return Qnil;
Qnil             1916 bignum.c           return Qnil;
Qnil              775 class.c        	SPECIAL_SINGLETON(Qnil, rb_cNilClass);
Qnil              868 class.c        		if (var) *var = Qnil;
Qnil              893 class.c        	    *var = Qnil;
Qnil              486 dir.c              if (!dirp->path) return Qnil;
Qnil              515 dir.c          	return Qnil;
Qnil              520 dir.c              return Qnil;		/* not reached */
Qnil              674 dir.c              return Qnil;
Qnil              685 dir.c          static VALUE chdir_thread = Qnil;
Qnil              698 dir.c              if (chdir_thread == Qnil)
Qnil              709 dir.c          	    chdir_thread = Qnil;
Qnil              712 dir.c              return Qnil;
Qnil              757 dir.c              VALUE path = Qnil;
Qnil              850 dir.c              return Qnil;		/* not reached */
Qnil             1141 dir.c              return Qnil;
Qnil             1621 dir.c          	return Qnil;
Qnil             1664 dir.c              return Qnil;
Qnil               32 enum.c             return Qnil;
Qnil               41 enum.c             return Qnil;
Qnil               82 enum.c             return Qnil;
Qnil               91 enum.c             return Qnil;
Qnil              138 enum.c             return Qnil;
Qnil              171 enum.c             return Qnil;
Qnil              180 enum.c             return Qnil;
Qnil              215 enum.c             return Qnil;
Qnil              247 enum.c             return Qnil;
Qnil              255 enum.c             return Qnil;
Qnil              313 enum.c             return Qnil;
Qnil              355 enum.c             if (memo == Qundef) return Qnil;
Qnil              368 enum.c             return Qnil;
Qnil              432 enum.c             return Qnil;
Qnil              549 enum.c             return Qnil;
Qnil              559 enum.c             return Qnil;
Qnil              595 enum.c             return Qnil;
Qnil              605 enum.c             return Qnil;
Qnil              646 enum.c             return Qnil;
Qnil              660 enum.c             return Qnil;
Qnil              696 enum.c             return Qnil;
Qnil              706 enum.c             return Qnil;
Qnil              747 enum.c             return Qnil;
Qnil              764 enum.c             return Qnil;
Qnil              788 enum.c             if (result == Qundef) return Qnil;
Qnil              806 enum.c             return Qnil;
Qnil              823 enum.c             return Qnil;
Qnil              846 enum.c             if (result == Qundef) return Qnil;
Qnil              864 enum.c             return Qnil;
Qnil              886 enum.c             memo[1] = Qnil;
Qnil              905 enum.c             return Qnil;
Qnil              927 enum.c             memo[1] = Qnil;
Qnil              939 enum.c             return Qnil;
Qnil              971 enum.c             return Qnil;
Qnil             1020 enum.c             return Qnil;
Qnil             1056 enum.c             result = rb_block_given_p() ? Qnil : rb_ary_new();
Qnil              142 enumerator.c       return Qnil;
Qnil              176 enumerator.c       return Qnil;
Qnil              205 enumerator.c       return Qnil;
Qnil              240 enumerator.c       return Qnil;
Qnil              147 error.c            return Qnil;
Qnil              302 error.c            rb_iv_set(exc, "bt", Qnil);
Qnil              429 error.c            if (!rb_ivar_defined(exc, bt)) return Qnil;
Qnil              577 error.c            name = (argc > 1) ? argv[--argc] : Qnil;
Qnil              631 error.c            VALUE args = (argc > 2) ? argv[--argc] : Qnil;
Qnil              684 error.c            if (NIL_P(mesg)) return Qnil;
Qnil              838 error.c        	    error = mesg; mesg = Qnil;
Qnil             1056 error.c            arg = mesg ? rb_str_new2(mesg) : Qnil;
Qnil              677 eval.c         VALUE ruby_errinfo = Qnil;
Qnil              803 eval.c             return Qnil;
Qnil              904 eval.c             _tag.retval = Qnil;			\
Qnil             1119 eval.c             if (NIL_P(info)) return Qnil;
Qnil             1121 eval.c             if (NIL_P(info)) return Qnil;
Qnil             1134 eval.c             VALUE errat = Qnil;		/* OK */
Qnil             1146 eval.c         	errat = Qnil;
Qnil             1331 eval.c             if (!node) return Qnil;
Qnil             1336 eval.c             if (!node) return Qnil;
Qnil             1578 eval.c             v = eval(ruby_top_self, rb_str_new2(str), Qnil, 0, 0);
Qnil             1696 eval.c         	localjump_error("unexpected redo", Qnil, state);
Qnil             1699 eval.c         	localjump_error("retry outside of rescue clause", Qnil, state);
Qnil             1711 eval.c             VALUE val = Qnil;		/* OK */
Qnil             1745 eval.c         	val = eval(ruby_top_self, cmd, Qnil, 0, 0);
Qnil             2361 eval.c         	ruby_errinfo = Qnil;
Qnil             2469 eval.c         	return Qnil;
Qnil             2554 eval.c         					    id?ID2SYM(id):Qnil,
Qnil             2555 eval.c         					    self ? rb_f_binding(self) : Qnil,
Qnil             2556 eval.c         					    klass?klass:Qnil),
Qnil             2680 eval.c             prot_tag->retval = Qnil;\
Qnil             2709 eval.c             volatile VALUE result = Qnil;
Qnil             2717 eval.c             if (!node) RETURN(Qnil);
Qnil             2738 eval.c         	result = Qnil;
Qnil             2799 eval.c         	RETURN(Qnil);
Qnil             2805 eval.c         	RETURN(Qnil);
Qnil             2860 eval.c         	RETURN(Qnil);
Qnil             2902 eval.c         	RETURN(Qnil);
Qnil             2906 eval.c         	result = Qnil;
Qnil             2941 eval.c         	result = Qnil;
Qnil             3070 eval.c         	if (result == Qundef) result = Qnil;
Qnil             3544 eval.c         	    result = Qnil;
Qnil             3765 eval.c         	    result = Qnil;
Qnil             3798 eval.c         	    result = Qnil;
Qnil             3807 eval.c         	result = Qnil;
Qnil             3816 eval.c         	result = Qnil;
Qnil             3821 eval.c         	result = Qnil;
Qnil             3942 eval.c         	    else result = Qnil;
Qnil             3965 eval.c             VALUE result = Qnil;	/* OK */
Qnil             4295 eval.c             return Qnil;		/* not reached */
Qnil             4328 eval.c             return Qnil;		/* not reached */
Qnil             4334 eval.c             break_jump(Qnil);
Qnil             4449 eval.c             return Qnil;		/* not reached */
Qnil             4459 eval.c             mesg = Qnil;
Qnil             4462 eval.c         	mesg = Qnil;
Qnil             4589 eval.c             if (retval == Qundef) retval = Qnil;
Qnil             4615 eval.c             if (retval == Qundef) retval = Qnil;
Qnil             4644 eval.c         	localjump_error("no block given", Qnil, 0);
Qnil             4652 eval.c             volatile VALUE result = Qnil;
Qnil             4752 eval.c         		    val = Qnil;
Qnil             4802 eval.c         		    val = Qnil;
Qnil             4962 eval.c             return Qnil;		/* dummy */
Qnil             4995 eval.c         	assign(self, list->nd_head, Qnil, pcall);
Qnil             5014 eval.c         	val = Qnil;
Qnil             5106 eval.c             volatile VALUE retval = Qnil;
Qnil             5179 eval.c         	ruby_errinfo = Qnil;
Qnil             5201 eval.c         		result = Qnil;
Qnil             5223 eval.c             VALUE result = Qnil;	/* OK */
Qnil             5240 eval.c         	return Qnil;
Qnil             5250 eval.c             volatile VALUE result = Qnil;
Qnil             5258 eval.c             retval = prot_tag ? prot_tag->retval : Qnil;	/* save retval */
Qnil             5268 eval.c             VALUE result = Qnil;	/* OK */
Qnil             5393 eval.c             return Qnil;		/* not reached */
Qnil             5500 eval.c             return Qnil;		/* not reached */
Qnil             5580 eval.c             volatile VALUE result = Qnil;
Qnil             5985 eval.c         		ary = Qnil;
Qnil             6090 eval.c             volatile VALUE result = Qnil;
Qnil             6156 eval.c         	ruby_errinfo = Qnil;
Qnil             6285 eval.c             VALUE val = Qnil;		/* OK */
Qnil             6326 eval.c             return eval(args[0], args[1], Qnil, (char*)args[2], (int)args[3]);
Qnil             6436 eval.c         	klass = Qnil;
Qnil             6468 eval.c         	klass = Qnil;
Qnil             6558 eval.c             ruby_errinfo = Qnil;	/* ensure */
Qnil             6827 eval.c         		tmp = rb_file_expand_path(tmp, Qnil);
Qnil             6841 eval.c         		tmp = rb_file_expand_path(tmp, Qnil);
Qnil             6851 eval.c         		tmp = rb_file_expand_path(tmp, Qnil);
Qnil             6862 eval.c         		tmp = rb_file_expand_path(tmp, Qnil);
Qnil             6875 eval.c             tmp = rb_file_expand_path(tmp, Qnil);
Qnil             6901 eval.c             VALUE result = Qnil;
Qnil             7726 eval.c             return Qnil;
Qnil             8210 eval.c             VALUE bvar = Qnil, tmp = args;
Qnil             8266 eval.c         	proc_jump_error(TAG_RETRY, Qnil); /* xxx */
Qnil             8527 eval.c             volatile VALUE result = Qnil;
Qnil             8885 eval.c             VALUE result = Qnil;	/* OK */
Qnil             9203 eval.c             a = Qnil; /* prevent tail call */
Qnil             9838 eval.c             VALUE val = Qnil;		/* OK */
Qnil             10582 eval.c         		rb_protect((VALUE (*)(VALUE))rb_trap_exec, Qnil, &status);
Qnil             11001 eval.c         	return Qnil;
Qnil             11231 eval.c             return Qnil;
Qnil             11269 eval.c             return Qnil;
Qnil             11501 eval.c         	group = Qnil;
Qnil             11545 eval.c             th->errinfo = Qnil;\
Qnil             11548 eval.c             th->last_match = Qnil;\
Qnil             11889 eval.c             rb_dvar_push('_', Qnil);
Qnil             11890 eval.c             rb_dvar_push('~', Qnil);
Qnil             12042 eval.c         	    return Qnil;
Qnil             12265 eval.c             if (rb_thread_dead(th)) return Qnil;
Qnil             12283 eval.c             return Qnil;		/* not reached */
Qnil             12315 eval.c             return Qnil;		/* not reached */
Qnil             12328 eval.c             if (!th->locals) return Qnil;
Qnil             12332 eval.c             return Qnil;
Qnil             12378 eval.c         	return Qnil;
Qnil             12622 eval.c         	th->result = Qnil;
Qnil             12633 eval.c             return Qnil;
Qnil             12796 eval.c         	return Qnil;
Qnil             12937 eval.c             VALUE val = Qnil;		/* OK */
Qnil             12957 eval.c             return rb_funcall(Qnil, rb_intern("catch"), 1, tag);
Qnil             13006 eval.c             return Qnil; 		/* not reached */
Qnil             13046 eval.c         	list = Qnil;
Qnil              137 ext/Win32API/Win32API.c     return Qnil;
Qnil              223 ext/bigdecimal/bigdecimal.c     if(rb_scan_args(argc,argv,"11",&which,&val)==1) val = Qnil;
Qnil              231 ext/bigdecimal/bigdecimal.c         if(val==Qnil) return INT2FIX(fo);
Qnil              234 ext/bigdecimal/bigdecimal.c             return Qnil; /* Not reached */
Qnil              250 ext/bigdecimal/bigdecimal.c         if(val==Qnil) return INT2FIX(fo);
Qnil              254 ext/bigdecimal/bigdecimal.c             return Qnil;
Qnil              260 ext/bigdecimal/bigdecimal.c     return Qnil;
Qnil              327 ext/bigdecimal/bigdecimal.c     return Qnil;
Qnil              353 ext/bigdecimal/bigdecimal.c        return Qnil;
Qnil              356 ext/bigdecimal/bigdecimal.c        return Qnil;
Qnil              359 ext/bigdecimal/bigdecimal.c        return Qnil;
Qnil              511 ext/bigdecimal/bigdecimal.c     if(e==999) return Qnil;
Qnil              536 ext/bigdecimal/bigdecimal.c     return VpIsZero(a) ? Qnil : self;
Qnil              944 ext/bigdecimal/bigdecimal.c             return Qnil;
Qnil             1227 ext/bigdecimal/bigdecimal.c         if(nFig==Qnil) return nCur;
Qnil              149 ext/curses/curses.c     return Qnil;
Qnil              186 ext/curses/curses.c     return Qnil;
Qnil              195 ext/curses/curses.c     return Qnil;
Qnil              205 ext/curses/curses.c     return Qnil;
Qnil              219 ext/curses/curses.c     return Qnil;
Qnil              229 ext/curses/curses.c     return Qnil;
Qnil              239 ext/curses/curses.c     return Qnil;
Qnil              249 ext/curses/curses.c     return Qnil;
Qnil              259 ext/curses/curses.c     return Qnil;
Qnil              269 ext/curses/curses.c     return Qnil;
Qnil              279 ext/curses/curses.c     return Qnil;
Qnil              289 ext/curses/curses.c     return Qnil;
Qnil              299 ext/curses/curses.c     return Qnil;
Qnil              311 ext/curses/curses.c     return Qnil;
Qnil              323 ext/curses/curses.c     return Qnil;
Qnil              338 ext/curses/curses.c     return Qnil;
Qnil              350 ext/curses/curses.c     return Qnil;
Qnil              359 ext/curses/curses.c     return Qnil;
Qnil              368 ext/curses/curses.c     return Qnil;
Qnil              388 ext/curses/curses.c     return Qnil;
Qnil              399 ext/curses/curses.c     return Qnil;
Qnil              412 ext/curses/curses.c     return Qnil;
Qnil              447 ext/curses/curses.c     return Qnil;
Qnil              458 ext/curses/curses.c     return Qnil;
Qnil              469 ext/curses/curses.c     return Qnil;
Qnil              485 ext/curses/curses.c     return Qnil;
Qnil              488 ext/curses/curses.c   return Qnil;
Qnil              509 ext/curses/curses.c   return (n = curs_set(NUM2INT(visibility)) != ERR) ? INT2FIX(n) : Qnil;
Qnil              511 ext/curses/curses.c   return Qnil;
Qnil              564 ext/curses/curses.c   return Qnil;
Qnil              583 ext/curses/curses.c   return Qnil;
Qnil              687 ext/curses/curses.c   return (getmouse(mdata->mevent) == OK) ? val : Qnil;
Qnil              732 ext/curses/curses.c   return Qnil;
Qnil              828 ext/curses/curses.c     return Qnil;
Qnil              841 ext/curses/curses.c     return Qnil;
Qnil              854 ext/curses/curses.c     return Qnil;
Qnil              867 ext/curses/curses.c     return Qnil;
Qnil              884 ext/curses/curses.c     return Qnil;
Qnil              899 ext/curses/curses.c     return Qnil;
Qnil              913 ext/curses/curses.c     return Qnil;
Qnil             1051 ext/curses/curses.c     return Qnil;
Qnil             1063 ext/curses/curses.c     return Qnil;
Qnil             1075 ext/curses/curses.c     return Qnil;
Qnil             1100 ext/curses/curses.c     return Qnil;
Qnil             1114 ext/curses/curses.c     return Qnil;
Qnil             1129 ext/curses/curses.c     return Qnil;
Qnil             1181 ext/curses/curses.c     return Qnil;
Qnil             1195 ext/curses/curses.c     return Qnil;
Qnil             1209 ext/curses/curses.c     return Qnil;
Qnil             1219 ext/curses/curses.c   return Qnil;
Qnil             1229 ext/curses/curses.c   return Qnil;
Qnil             1343 ext/curses/curses.c   return Qnil;
Qnil             1367 ext/curses/curses.c   return (c = getbkgd(winp->window) != ERR) ? CH2FIX(c) : Qnil;
Qnil             1369 ext/curses/curses.c   return Qnil;
Qnil             1382 ext/curses/curses.c   return Qnil;
Qnil             1397 ext/curses/curses.c   return Qnil;
Qnil             1418 ext/curses/curses.c   return Qnil;
Qnil             1435 ext/curses/curses.c   return Qnil;
Qnil               71 ext/dbm/dbm.c      return Qnil;
Qnil              141 ext/dbm/dbm.c  	if (mode == -1) return Qnil;
Qnil              162 ext/dbm/dbm.c  	return Qnil;
Qnil              187 ext/dbm/dbm.c  	if (ifnone == Qnil && rb_block_given_p())
Qnil              198 ext/dbm/dbm.c      return fdbm_fetch(obj, keystr, Qnil);
Qnil              237 ext/dbm/dbm.c      return Qnil;
Qnil              275 ext/dbm/dbm.c          rb_ary_push(new, fdbm_fetch(obj, argv[i], Qnil));
Qnil              308 ext/dbm/dbm.c  	return Qnil;
Qnil              338 ext/dbm/dbm.c      if (!key.dptr) return Qnil;
Qnil              449 ext/dbm/dbm.c      return Qnil;
Qnil               23 ext/dl/cfunc.c     return Qnil;
Qnil               40 ext/dl/cfunc.c     return Qnil;
Qnil               69 ext/dl/cfunc.c     val = Qnil;
Qnil               85 ext/dl/cfunc.c   else if( val == Qnil ){
Qnil              127 ext/dl/cfunc.c     data->type = (type == Qnil) ? DLTYPE_VOID : NUM2INT(type);
Qnil              128 ext/dl/cfunc.c     data->calltype = (calltype == Qnil) ? CFUNC_CDECL : SYM2ID(calltype);
Qnil              130 ext/dl/cfunc.c     return Qnil;
Qnil              139 ext/dl/cfunc.c     return cfunc->name ? rb_tainted_str_new2(cfunc->name) : Qnil;
Qnil              198 ext/dl/cfunc.c     return Qnil;
Qnil              250 ext/dl/cfunc.c     VALUE result = Qnil;
Qnil              261 ext/dl/cfunc.c 	return Qnil;
Qnil              278 ext/dl/cfunc.c 	    result = Qnil; \
Qnil              376 ext/dl/cfunc.c 	    result = Qnil; \
Qnil               83 ext/dl/cptr.c    else if (val == Qnil) {
Qnil              145 ext/dl/cptr.c    return Qnil;
Qnil              231 ext/dl/cptr.c    return Qnil;
Qnil              349 ext/dl/cptr.c      VALUE retval = Qnil;
Qnil              372 ext/dl/cptr.c      VALUE retval = Qnil;
Qnil               44 ext/dl/dl.c        return Qnil;
Qnil               93 ext/dl/handle.c   return Qnil;
Qnil              103 ext/dl/handle.c   return Qnil;
Qnil              113 ext/dl/handle.c   return Qnil;
Qnil              143 ext/dl/handle.c     if( sym == Qnil ){
Qnil               58 ext/etc/etc.c      return Qnil;
Qnil              143 ext/etc/etc.c      return Qnil;
Qnil              167 ext/etc/etc.c      return Qnil;
Qnil              177 ext/etc/etc.c      return Qnil;
Qnil              190 ext/etc/etc.c      return Qnil;
Qnil              228 ext/etc/etc.c      return Qnil;
Qnil              241 ext/etc/etc.c      return Qnil;
Qnil              254 ext/etc/etc.c      return Qnil;
Qnil              294 ext/etc/etc.c      return Qnil;
Qnil              345 ext/etc/etc.c      return Qnil;
Qnil              372 ext/etc/etc.c      return Qnil;
Qnil              382 ext/etc/etc.c      return Qnil;
Qnil              395 ext/etc/etc.c      return Qnil;
Qnil              433 ext/etc/etc.c      return Qnil;
Qnil              446 ext/etc/etc.c      return Qnil;
Qnil              459 ext/etc/etc.c      return Qnil;
Qnil              493 ext/etc/etc.c      return Qnil;
Qnil               72 ext/gdbm/gdbm.c     return Qnil;
Qnil              144 ext/gdbm/gdbm.c 	if (mode == -1) return Qnil;
Qnil              172 ext/gdbm/gdbm.c 	return Qnil;
Qnil              192 ext/gdbm/gdbm.c         return Qnil;
Qnil              238 ext/gdbm/gdbm.c         return Qnil;
Qnil              262 ext/gdbm/gdbm.c         return Qnil;
Qnil              282 ext/gdbm/gdbm.c 	if (ifnone == Qnil && rb_block_given_p())
Qnil              333 ext/gdbm/gdbm.c     return Qnil;
Qnil              399 ext/gdbm/gdbm.c 	return Qnil;
Qnil              418 ext/gdbm/gdbm.c     valstr = fgdbm_fetch(obj, keystr, Qnil);
Qnil              434 ext/gdbm/gdbm.c     if (NIL_P(keystr)) return Qnil;
Qnil              551 ext/gdbm/gdbm.c     return Qnil;
Qnil              179 ext/iconv/iconv.c 		       Qnil, rb_ary_new3(2, to, from), NULL, s);
Qnil              217 ext/iconv/iconv.c     return Qnil;
Qnil              264 ext/iconv/iconv.c 	return Qnil;		/* conversion */
Qnil              351 ext/iconv/iconv.c 	    rescue = iconv_fail(error, Qnil, Qnil, env, 0);
Qnil              353 ext/iconv/iconv.c 		str = RARRAY(rescue)->len > 0 ? RARRAY(rescue)->ptr[0] : Qnil;
Qnil              516 ext/iconv/iconv.c     return Qnil;
Qnil              604 ext/iconv/iconv.c 	VALUE s = iconv_convert(env->cd, Qnil, 0, 0, env);
Qnil              728 ext/iconv/iconv.c     return Qnil;
Qnil              745 ext/iconv/iconv.c     return iconv_convert(VALUE2ICONV(cd), Qnil, 0, 0, NULL);
Qnil              753 ext/iconv/iconv.c     if (!cd) return Qnil;
Qnil              792 ext/iconv/iconv.c     n1 = n2 = Qnil;
Qnil              815 ext/iconv/iconv.c     str = iconv_convert(cd, Qnil, 0, 0, NULL);
Qnil              824 ext/iconv/iconv.c 	s = iconv_convert(cd, Qnil, 0, 0, NULL);
Qnil               68 ext/io/wait/wait.c     return Qnil;
Qnil              135 ext/io/wait/wait.c     return Qnil;
Qnil              103 ext/openssl/ossl.c 	return Qnil;				\
Qnil               31 ext/openssl/ossl_asn1.c     if (!time || !time->data) return Qnil;
Qnil               54 ext/openssl/ossl_asn1.c         return Qnil;
Qnil              394 ext/openssl/ossl_asn1.c     return Qnil;
Qnil              674 ext/openssl/ossl_asn1.c     return Qnil;
Qnil              830 ext/openssl/ossl_asn1.c     return Qnil;
Qnil              888 ext/openssl/ossl_asn1.c         tagging = Qnil;
Qnil             1019 ext/openssl/ossl_asn1.c     VALUE val, ret = Qnil;
Qnil             1032 ext/openssl/ossl_asn1.c     VALUE val, ret = Qnil;
Qnil              564 ext/openssl/ossl_bn.c     return Qnil;
Qnil              593 ext/openssl/ossl_bn.c     return Qnil;
Qnil              214 ext/openssl/ossl_cipher.c     return Qnil;
Qnil              207 ext/openssl/ossl_config.c 	return Qnil;
Qnil              242 ext/openssl/ossl_config.c     return Qnil;
Qnil              375 ext/openssl/ossl_config.c 	name = v->name ? rb_str_new2(v->name) : Qnil;
Qnil              376 ext/openssl/ossl_config.c 	value = v->value ? rb_str_new2(v->value) : Qnil;
Qnil               53 ext/openssl/ossl_engine.c     return Qnil;
Qnil               79 ext/openssl/ossl_engine.c     return Qnil;
Qnil               89 ext/openssl/ossl_engine.c     return Qnil;
Qnil              166 ext/openssl/ossl_engine.c     return Qnil;
Qnil              227 ext/openssl/ossl_ns_spki.c     return Qnil; /* dummy */
Qnil              195 ext/openssl/ossl_ocsp.c     ary = (count > 0) ? rb_ary_new() : Qnil;
Qnil              362 ext/openssl/ossl_ocsp.c 	return Qnil;
Qnil              543 ext/openssl/ossl_ocsp.c 	rb_ary_push(ary, revtime ? asn1time_to_time(revtime) : Qnil);
Qnil              544 ext/openssl/ossl_ocsp.c 	rb_ary_push(ary, thisupd ? asn1time_to_time(thisupd) : Qnil);
Qnil              545 ext/openssl/ossl_ocsp.c 	rb_ary_push(ary, nextupd ? asn1time_to_time(nextupd) : Qnil);
Qnil               95 ext/openssl/ossl_pkcs12.c     pkey = cert = ca = Qnil;
Qnil              151 ext/openssl/ossl_pkcs7.c     data = out ? ossl_membio2str(out) : Qnil;
Qnil              154 ext/openssl/ossl_pkcs7.c     ossl_pkcs7_set_err_string(ret, Qnil);
Qnil              222 ext/openssl/ossl_pkcs7.c     ossl_pkcs7_set_err_string(ret, Qnil);
Qnil              307 ext/openssl/ossl_pkcs7.c     ossl_pkcs7_set_data(self, Qnil);
Qnil              308 ext/openssl/ossl_pkcs7.c     ossl_pkcs7_set_err_string(self, Qnil);
Qnil              337 ext/openssl/ossl_pkcs7.c     int i, ret = Qnil;
Qnil              395 ext/openssl/ossl_pkcs7.c     return Qnil;
Qnil              671 ext/openssl/ossl_pkcs7.c     ossl_pkcs7_set_err_string(self, msg ? rb_str_new2(msg) : Qnil);
Qnil              728 ext/openssl/ossl_pkcs7.c     ossl_pkcs7_set_data(self, Qnil);
Qnil              856 ext/openssl/ossl_pkcs7.c     return Qnil;
Qnil               61 ext/openssl/ossl_pkey.c     return Qnil; /* not reached */
Qnil              202 ext/openssl/ossl_pkey.c     return Qnil; /* dummy */
Qnil               89 ext/openssl/ossl_pkey.h 		return Qnil;						\
Qnil              101 ext/openssl/ossl_pkey.h 		return Qnil;						\
Qnil              152 ext/openssl/ossl_ssl.c 	rb_iv_set(self, buf, Qnil);
Qnil              299 ext/openssl/ossl_ssl.c     if(OBJ_FROZEN(self)) return Qnil;
Qnil              434 ext/openssl/ossl_ssl.c         return Qnil;
Qnil              477 ext/openssl/ossl_ssl.c         return Qnil;
Qnil              722 ext/openssl/ossl_ssl.c     return Qnil;
Qnil              734 ext/openssl/ossl_ssl.c         return Qnil;
Qnil              744 ext/openssl/ossl_ssl.c         return Qnil;
Qnil              760 ext/openssl/ossl_ssl.c         return Qnil;
Qnil              766 ext/openssl/ossl_ssl.c         return Qnil;
Qnil              786 ext/openssl/ossl_ssl.c 	return Qnil;
Qnil              789 ext/openssl/ossl_ssl.c     if(!chain) return Qnil;
Qnil              809 ext/openssl/ossl_ssl.c         return Qnil;
Qnil              825 ext/openssl/ossl_ssl.c         return Qnil;
Qnil              843 ext/openssl/ossl_ssl.c         return Qnil;
Qnil              191 ext/openssl/ossl_x509attr.c     if(attr->value.ptr == NULL) return Qnil;
Qnil              109 ext/openssl/ossl_x509name.c     return Qnil;
Qnil              128 ext/openssl/ossl_x509store.c     ossl_x509store_set_vfy_cb(self, Qnil);
Qnil              137 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@error", Qnil);
Qnil              138 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@error_string", Qnil);
Qnil              139 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@chain", Qnil);
Qnil              140 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@time", Qnil);
Qnil              207 ext/openssl/ossl_x509store.c     if(file != Qnil){
Qnil              228 ext/openssl/ossl_x509store.c     if(dir != Qnil){
Qnil              252 ext/openssl/ossl_x509store.c     return Qnil;
Qnil              423 ext/openssl/ossl_x509store.c         return Qnil;
Qnil              498 ext/openssl/ossl_x509store.c     if(!ctx->current_crl) return Qnil;
Qnil              502 ext/openssl/ossl_x509store.c     return Qnil;
Qnil              156 ext/pty/pty.c  	if (cpid == -1) return Qnil;
Qnil              174 ext/pty/pty.c  	    return Qnil;
Qnil              304 ext/pty/pty.c      return Qnil;
Qnil              446 ext/pty/pty.c  	return Qnil;
Qnil              457 ext/pty/pty.c      rb_yield(Qnil);
Qnil               98 ext/racc/cparse/cparse.c     ((0 <= idx && idx < RARRAY(s)->len) ? RARRAY(s)->ptr[idx] : Qnil)
Qnil              113 ext/racc/cparse/cparse.c     if (len < 0) return Qnil;  /* system error */
Qnil              134 ext/racc/cparse/cparse.c     ((RARRAY(s)->len > 0) ? RARRAY(s)->ptr[RARRAY(s)->len - 1] : Qnil)
Qnil              242 ext/racc/cparse/cparse.c     initialize_params(v, parser, arg, Qnil, Qnil);
Qnil              244 ext/racc/cparse/cparse.c     parse_main(v, Qnil, Qnil, 0);
Qnil              261 ext/racc/cparse/cparse.c     parse_main(v, Qnil, Qnil, 0);
Qnil              286 ext/racc/cparse/cparse.c     return Qnil;
Qnil              303 ext/racc/cparse/cparse.c     return Qnil;
Qnil              366 ext/racc/cparse/cparse.c     v->tstack = v->debug ? NEW_STACK() : Qnil;
Qnil              376 ext/racc/cparse/cparse.c     v->retval = Qnil;
Qnil              605 ext/racc/cparse/cparse.c             v->retval = Qnil;
Qnil              661 ext/racc/cparse/cparse.c     code = rb_iterate(catch_iter, Qnil, reduce0, v->value_v);
Qnil              694 ext/racc/cparse/cparse.c         tmp = Qnil;
Qnil               92 ext/readline/readline.c 	result = Qnil;
Qnil              233 ext/readline/readline.c     return Qnil;
Qnil              236 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              247 ext/readline/readline.c     return Qnil;
Qnil              250 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              274 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              287 ext/readline/readline.c 	return Qnil;
Qnil              294 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              321 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              332 ext/readline/readline.c 	return Qnil;
Qnil              336 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              363 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              374 ext/readline/readline.c 	return Qnil;
Qnil              378 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              406 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              417 ext/readline/readline.c 	return Qnil;
Qnil              421 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              449 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              460 ext/readline/readline.c 	return Qnil;
Qnil              464 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              492 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              503 ext/readline/readline.c 	return Qnil;
Qnil              507 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              561 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              609 ext/readline/readline.c     return Qnil;
Qnil              612 ext/readline/readline.c     return Qnil; /* not reached */
Qnil              624 ext/readline/readline.c 	return Qnil;
Qnil              636 ext/readline/readline.c 	return Qnil;
Qnil              712 ext/readline/readline.c 	result = Qnil;
Qnil              739 ext/readline/readline.c 	result = Qnil;
Qnil               62 ext/sdbm/init.c     return Qnil;
Qnil              119 ext/sdbm/init.c 	if (mode == -1) return Qnil;
Qnil              140 ext/sdbm/init.c 	return Qnil;
Qnil              165 ext/sdbm/init.c 	if (ifnone == Qnil && rb_block_given_p())
Qnil              176 ext/sdbm/init.c     return fsdbm_fetch(obj, keystr, Qnil);
Qnil              214 ext/sdbm/init.c     return Qnil;
Qnil              252 ext/sdbm/init.c         rb_ary_push(new, fsdbm_fetch(obj, argv[i], Qnil));
Qnil              286 ext/sdbm/init.c 	return Qnil;
Qnil              314 ext/sdbm/init.c     if (!key.dptr) return Qnil;
Qnil              427 ext/sdbm/init.c     return Qnil;
Qnil              455 ext/sdbm/init.c     if (valstr == Qnil) {
Qnil              457 ext/sdbm/init.c 	return Qnil;
Qnil              245 ext/socket/socket.c     if (howto == Qnil)
Qnil              276 ext/socket/socket.c     return Qnil;
Qnil              295 ext/socket/socket.c     return Qnil;
Qnil              574 ext/socket/socket.c     if (flg == Qnil) flags = 0;
Qnil              619 ext/socket/socket.c 	  return rb_assoc_new(str, Qnil);
Qnil              879 ext/socket/socket.c     addr1 = Qnil;
Qnil              893 ext/socket/socket.c     if (addr1 == Qnil) {
Qnil              975 ext/socket/socket.c     return Qnil;
Qnil             1150 ext/socket/socket.c     return Qnil;
Qnil             1270 ext/socket/socket.c     return init_inetsock(sock, host, serv, Qnil, Qnil, INET_SOCKS);
Qnil             1368 ext/socket/socket.c     return make_hostent(host, sock_addrinfo(host, Qnil, SOCK_STREAM, AI_CANONNAME), tcp_sockaddr);
Qnil             1380 ext/socket/socket.c 	return init_inetsock(sock, arg1, arg2, Qnil, Qnil, INET_SERVER);
Qnil             1382 ext/socket/socket.c 	return init_inetsock(sock, Qnil, arg1, Qnil, Qnil, INET_SERVER);
Qnil             1561 ext/socket/socket.c     struct addrinfo *res = sock_addrinfo(host, Qnil, SOCK_STREAM, 0);
Qnil             1801 ext/socket/socket.c     return Qnil;
Qnil             1804 ext/socket/socket.c     return Qnil;		/* not reached */
Qnil             1833 ext/socket/socket.c 	mode = Qnil;
Qnil             1897 ext/socket/socket.c     if (klass == Qnil)
Qnil             1905 ext/socket/socket.c 	ff_argc = mode == Qnil ? 1 : 2;
Qnil             1912 ext/socket/socket.c     return Qnil;		/* not reached */
Qnil             2724 ext/socket/socket.c     return make_hostent(host, sock_addrinfo(host, Qnil, SOCK_STREAM, AI_CANONNAME), sock_sockaddr);
Qnil             2839 ext/socket/socket.c     host = port = family = socktype = protocol = flags = Qnil;
Qnil             2904 ext/socket/socket.c     VALUE sa, af = Qnil, host = Qnil, port = Qnil, flags, tmp;
Qnil             2914 ext/socket/socket.c     sa = flags = Qnil;
Qnil               47 ext/stringio/stringio.c     ptr->string = Qnil;
Qnil              264 ext/stringio/stringio.c     ptr->string = Qnil;
Qnil              288 ext/stringio/stringio.c     return Qnil;
Qnil              335 ext/stringio/stringio.c     return Qnil;		/* not reached */
Qnil              387 ext/stringio/stringio.c     return Qnil;
Qnil              406 ext/stringio/stringio.c     return Qnil;
Qnil              425 ext/stringio/stringio.c     return Qnil;
Qnil              697 ext/stringio/stringio.c     return Qnil;
Qnil              713 ext/stringio/stringio.c 	return Qnil;
Qnil              766 ext/stringio/stringio.c     return Qnil;
Qnil              843 ext/stringio/stringio.c 	return Qnil;
Qnil              855 ext/stringio/stringio.c 		return Qnil;
Qnil             1085 ext/stringio/stringio.c     VALUE str = Qnil;
Qnil             1101 ext/stringio/stringio.c 		return Qnil;
Qnil              135 ext/strscan/strscan.c     if (beg_i > S_LEN(p)) return Qnil;
Qnil              146 ext/strscan/strscan.c     if (beg_i > S_LEN(p)) return Qnil;
Qnil              181 ext/strscan/strscan.c     p->str = Qnil;
Qnil              433 ext/strscan/strscan.c         return Qnil;
Qnil              451 ext/strscan/strscan.c         return Qnil;
Qnil              700 ext/strscan/strscan.c         return Qnil;
Qnil              739 ext/strscan/strscan.c         return Qnil;
Qnil              846 ext/strscan/strscan.c     if (CURPTR(p) > S_PEND(p)) return Qnil;
Qnil              934 ext/strscan/strscan.c     if (! MATCHED_P(p)) return Qnil;
Qnil              956 ext/strscan/strscan.c     if (! MATCHED_P(p)) return Qnil;
Qnil              994 ext/strscan/strscan.c     if (! MATCHED_P(p))        return Qnil;
Qnil              999 ext/strscan/strscan.c     if (i < 0)                 return Qnil;
Qnil             1000 ext/strscan/strscan.c     if (i >= p->regs.num_regs) return Qnil;
Qnil             1001 ext/strscan/strscan.c     if (p->regs.beg[i] == -1)  return Qnil;
Qnil             1023 ext/strscan/strscan.c     if (! MATCHED_P(p)) return Qnil;
Qnil             1043 ext/strscan/strscan.c     if (! MATCHED_P(p)) return Qnil;
Qnil              327 ext/syck/rubyext.c     return Qnil;
Qnil              341 ext/syck/rubyext.c     VALUE obj = Qnil;
Qnil              358 ext/syck/rubyext.c                 obj = Qnil;
Qnil              609 ext/syck/rubyext.c     VALUE obj = Qnil;
Qnil              766 ext/syck/rubyext.c     syck_parser_set_root_on_error( parser, Qnil );
Qnil              790 ext/syck/rubyext.c     rb_ivar_set(self, s_input, Qnil);
Qnil              895 ext/syck/rubyext.c     return Qnil;
Qnil              930 ext/syck/rubyext.c     return Qnil;
Qnil              941 ext/syck/rubyext.c     return Qnil;
Qnil             1051 ext/syck/rubyext.c     return Qnil;
Qnil             1066 ext/syck/rubyext.c         if ( !rb_const_defined( tclass, tpart ) ) return Qnil;
Qnil             1091 ext/syck/rubyext.c         VALUE obj = Qnil;
Qnil             1127 ext/syck/rubyext.c                         if ( subclass_v != Qnil )
Qnil             1131 ext/syck/rubyext.c                         else if ( rb_cObject == target_class && subclass_v == Qnil )
Qnil             1257 ext/syck/rubyext.c     VALUE t = Qnil, obj = Qnil, v = Qnil, style = Qnil;
Qnil             1976 ext/syck/rubyext.c     bonus->oid = Qnil;
Qnil             2001 ext/syck/rubyext.c     rb_ivar_set(self, s_resolver, Qnil);
Qnil             2092 ext/syck/rubyext.c         style = Qnil;
Qnil             2111 ext/syck/rubyext.c         style = Qnil;
Qnil             2132 ext/syck/rubyext.c         style = Qnil;
Qnil               52 ext/syslog/syslog.c     return Qnil;
Qnil              115 ext/syslog/syslog.c     return syslog_opened ? rb_str_new2(syslog_ident) : Qnil;
Qnil              120 ext/syslog/syslog.c     return syslog_opened ? INT2NUM(syslog_options) : Qnil;
Qnil              125 ext/syslog/syslog.c     return syslog_opened ? INT2NUM(syslog_facility) : Qnil;
Qnil              130 ext/syslog/syslog.c     return syslog_opened ? INT2NUM(syslog_mask) : Qnil;
Qnil              755 ext/tk/tcltklib.c     return Qnil;
Qnil              774 ext/tk/tcltklib.c             rbtk_pending_exception = Qnil;
Qnil              807 ext/tk/tcltklib.c             rbtk_pending_exception = Qnil;
Qnil             1149 ext/tk/tcltklib.c     return Qnil;
Qnil             1157 ext/tk/tcltklib.c         return Qnil;    /* no eventloop */
Qnil             1174 ext/tk/tcltklib.c         return Qnil;
Qnil             1269 ext/tk/tcltklib.c     return Qnil;
Qnil             1350 ext/tk/tcltklib.c                                 rbtk_pending_exception = Qnil;
Qnil             1471 ext/tk/tcltklib.c                                         rbtk_pending_exception = Qnil;
Qnil             1528 ext/tk/tcltklib.c                         rb_protect(eventloop_sleep, Qnil, &status);
Qnil             1543 ext/tk/tcltklib.c                                             rbtk_pending_exception = Qnil;
Qnil             1667 ext/tk/tcltklib.c         return Qnil;
Qnil             1675 ext/tk/tcltklib.c         return Qnil;
Qnil             1696 ext/tk/tcltklib.c         return Qnil;
Qnil             1729 ext/tk/tcltklib.c     return Qnil;
Qnil             1812 ext/tk/tcltklib.c         return Qnil;
Qnil             1817 ext/tk/tcltklib.c         return Qnil;
Qnil             1853 ext/tk/tcltklib.c             return Qnil;
Qnil             1887 ext/tk/tcltklib.c     return Qnil;
Qnil             1894 ext/tk/tcltklib.c     eventloop_thread = Qnil; /* stop eventloops */
Qnil             1895 ext/tk/tcltklib.c     return Qnil;
Qnil             1915 ext/tk/tcltklib.c                      lib_watchdog_ensure, Qnil);
Qnil             1928 ext/tk/tcltklib.c         return Qnil;
Qnil             1933 ext/tk/tcltklib.c         return Qnil;
Qnil             1965 ext/tk/tcltklib.c     return Qnil;
Qnil             2015 ext/tk/tcltklib.c         ret = Qnil;
Qnil             2030 ext/tk/tcltklib.c         rbtk_pending_exception = Qnil;
Qnil             2206 ext/tk/tcltklib.c     volatile VALUE ret, exc = Qnil;
Qnil             2288 ext/tk/tcltklib.c         ret = Qnil;
Qnil             3098 ext/tk/tcltklib.c 	&& eventloop_thread != Qnil
Qnil             3339 ext/tk/tcltklib.c 	&& eventloop_thread != Qnil
Qnil             5234 ext/tk/tcltklib.c         return Qnil;
Qnil             5251 ext/tk/tcltklib.c     return Qnil;
Qnil             5298 ext/tk/tcltklib.c         return Qnil;
Qnil             5475 ext/tk/tcltklib.c         return Qnil;
Qnil             5513 ext/tk/tcltklib.c     RARRAY(result)->ptr[0] = Qnil;
Qnil             5573 ext/tk/tcltklib.c     return Qnil;
Qnil             5827 ext/tk/tcltklib.c     RARRAY(result)->ptr[0] = Qnil;
Qnil             5969 ext/tk/tcltklib.c         return Qnil;
Qnil             6103 ext/tk/tcltklib.c         encodename = Qnil;
Qnil             6105 ext/tk/tcltklib.c     return lib_toUTF8_core(Qnil, str, encodename);
Qnil             6117 ext/tk/tcltklib.c         encodename = Qnil;
Qnil             6262 ext/tk/tcltklib.c         encodename = Qnil;
Qnil             6264 ext/tk/tcltklib.c     return lib_fromUTF8_core(Qnil, str, encodename);
Qnil             6276 ext/tk/tcltklib.c         encodename = Qnil;
Qnil             6355 ext/tk/tcltklib.c     return Qnil;
Qnil             6381 ext/tk/tcltklib.c     return Qnil;
Qnil             6448 ext/tk/tcltklib.c     return Qnil;
Qnil             6906 ext/tk/tcltklib.c     RARRAY(result)->ptr[0] = Qnil;
Qnil             7117 ext/tk/tcltklib.c     return ip_get_variable2(self, varname, Qnil, flag);
Qnil             7254 ext/tk/tcltklib.c     return ip_set_variable2(self, varname, Qnil, value, flag);
Qnil             7325 ext/tk/tcltklib.c     return ip_unset_variable2(self, varname, Qnil, flag);
Qnil             7508 ext/tk/tcltklib.c     return lib_split_tklist_core(Qnil, list_str);
Qnil             7912 ext/tk/tcltklib.c     eventloop_thread = Qnil;
Qnil             7920 ext/tk/tcltklib.c     watchdog_thread  = Qnil;
Qnil             7922 ext/tk/tcltklib.c     rbtk_pending_exception = Qnil;
Qnil              152 ext/tk/tkutil/tkutil.c         return Qnil;
Qnil              156 ext/tk/tkutil/tkutil.c         return Qnil;
Qnil              277 ext/tk/tkutil/tkutil.c         str_val = Qnil;
Qnil              301 ext/tk/tkutil/tkutil.c                 val = hash2kv_enc(val, Qnil, self);
Qnil              303 ext/tk/tkutil/tkutil.c                 val = hash2kv(val, Qnil, self);
Qnil              422 ext/tk/tkutil/tkutil.c         str_val = Qnil;
Qnil              614 ext/tk/tkutil/tkutil.c         = get_eval_string_core(val, Qnil, RARRAY(args)->ptr[1]);
Qnil              698 ext/tk/tkutil/tkutil.c     return ary2list2(hash2kv(hash, Qnil, self), Qfalse, self);
Qnil              707 ext/tk/tkutil/tkutil.c     return ary2list2(hash2kv_enc(hash, Qnil, self), Qfalse, self);
Qnil              718 ext/tk/tkutil/tkutil.c     ary = Qnil;
Qnil              719 ext/tk/tkutil/tkutil.c     enc_flag = Qnil;
Qnil              842 ext/tk/tkutil/tkutil.c         if (obj == TK_None)  return Qnil;
Qnil              872 ext/tk/tkutil/tkutil.c         enc_flag = Qnil;
Qnil              962 ext/tk/tkutil/tkutil.c     if (RSTRING(value)->ptr == (char*)NULL) return Qnil;
Qnil             1002 ext/tk/tkutil/tkutil.c     return Qnil; /*dummy*/
Qnil             1449 ext/tk/tkutil/tkutil.c             proc = Qnil;
Qnil             1451 ext/tk/tkutil/tkutil.c             proc = Qnil;
Qnil             1455 ext/tk/tkutil/tkutil.c             proc = Qnil;
Qnil              503 ext/win32ole/win32ole.c     VALUE msg = Qnil;
Qnil              597 ext/win32ole/win32ole.c     if(err_msg != Qnil) {
Qnil              708 ext/win32ole/win32ole.c     VALUE obj = Qnil;
Qnil             1088 ext/win32ole/win32ole.c     VALUE obj = Qnil;
Qnil             1099 ext/win32ole/win32ole.c         VALUE val2 = Qnil;
Qnil             1116 ext/win32ole/win32ole.c         obj = Qnil;
Qnil             1140 ext/win32ole/win32ole.c                         if (obj == Qnil)
Qnil             1152 ext/win32ole/win32ole.c         return (obj == Qnil) ? val2 : obj;
Qnil             1319 ext/win32ole/win32ole.c     return Qnil;
Qnil             1333 ext/win32ole/win32ole.c     return Qnil;
Qnil             1340 ext/win32ole/win32ole.c     VALUE path = Qnil;
Qnil             1342 ext/win32ole/win32ole.c     if (path == Qnil) {
Qnil             1364 ext/win32ole/win32ole.c         return Qnil;
Qnil             1370 ext/win32ole/win32ole.c         return Qnil;
Qnil             1375 ext/win32ole/win32ole.c         return Qnil;
Qnil             1393 ext/win32ole/win32ole.c     VALUE file = Qnil;
Qnil             1400 ext/win32ole/win32ole.c         return Qnil;
Qnil             1404 ext/win32ole/win32ole.c         if (clsid == Qnil)
Qnil             1412 ext/win32ole/win32ole.c             if (ver == Qnil)
Qnil             1419 ext/win32ole/win32ole.c             if (typelib == Qnil)
Qnil             1424 ext/win32ole/win32ole.c                     if (lang == Qnil)
Qnil             1428 ext/win32ole/win32ole.c                         if ((file = reg_get_typelib_file_path(hlang)) != Qnil)
Qnil             1447 ext/win32ole/win32ole.c     if (file != Qnil) {
Qnil             1797 ext/win32ole/win32ole.c         if (file == Qnil) {
Qnil             1816 ext/win32ole/win32ole.c     return Qnil;
Qnil             1974 ext/win32ole/win32ole.c     return Qnil;
Qnil             2023 ext/win32ole/win32ole.c     return Qnil;
Qnil             2135 ext/win32ole/win32ole.c     return Qnil;
Qnil             2401 ext/win32ole/win32ole.c     VALUE obj = Qnil;
Qnil             2425 ext/win32ole/win32ole.c         if (param == Qnil)
Qnil             2737 ext/win32ole/win32ole.c     return Qnil;
Qnil             2758 ext/win32ole/win32ole.c     return Qnil;
Qnil             2766 ext/win32ole/win32ole.c     VALUE obj = Qnil;
Qnil             2775 ext/win32ole/win32ole.c     return Qnil;
Qnil             2784 ext/win32ole/win32ole.c     return Qnil;
Qnil             2850 ext/win32ole/win32ole.c     return Qnil;
Qnil             2898 ext/win32ole/win32ole.c     VALUE method = Qnil;
Qnil             2903 ext/win32ole/win32ole.c     for(i = 0; i < pTypeAttr->cFuncs && method == Qnil; i++) {
Qnil             2937 ext/win32ole/win32ole.c     VALUE method = Qnil;
Qnil             2943 ext/win32ole/win32ole.c     if (method != Qnil) {
Qnil             2946 ext/win32ole/win32ole.c     for(i=0; i < pTypeAttr->cImplTypes && method == Qnil; i++){
Qnil             3174 ext/win32ole/win32ole.c     VALUE type = Qnil;
Qnil             3181 ext/win32ole/win32ole.c         return Qnil;
Qnil             3187 ext/win32ole/win32ole.c         return Qnil;
Qnil             3211 ext/win32ole/win32ole.c     VALUE type = Qnil;
Qnil             3221 ext/win32ole/win32ole.c     if (type == Qnil) {
Qnil             3249 ext/win32ole/win32ole.c     VALUE guid = Qnil;
Qnil             3256 ext/win32ole/win32ole.c         return Qnil;
Qnil             3269 ext/win32ole/win32ole.c     if (guid == Qnil) {
Qnil             3270 ext/win32ole/win32ole.c         return Qnil;
Qnil             3294 ext/win32ole/win32ole.c     VALUE vtlib = Qnil;
Qnil             3304 ext/win32ole/win32ole.c     if (vtlib == Qnil) {
Qnil             3347 ext/win32ole/win32ole.c     VALUE type = Qnil;
Qnil             3353 ext/win32ole/win32ole.c         return Qnil;
Qnil             3357 ext/win32ole/win32ole.c         return Qnil;
Qnil             3361 ext/win32ole/win32ole.c     if(typedetails != Qnil)
Qnil             3396 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3400 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3404 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3408 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3412 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3416 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3420 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3424 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3428 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3432 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3436 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3440 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3444 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3448 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3452 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3456 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3460 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3464 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3468 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3472 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3476 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3480 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3484 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3488 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3491 ext/win32ole/win32ole.c         if (str != Qnil) {
Qnil             3498 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3502 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3507 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3511 ext/win32ole/win32ole.c         if(typedetails != Qnil)
Qnil             3550 ext/win32ole/win32ole.c     if (obj == Qnil)
Qnil             3582 ext/win32ole/win32ole.c         if (file == Qnil) {
Qnil             3616 ext/win32ole/win32ole.c     VALUE v = Qnil;
Qnil             3630 ext/win32ole/win32ole.c         if (clsid == Qnil)
Qnil             3638 ext/win32ole/win32ole.c             if (ver == Qnil)
Qnil             3643 ext/win32ole/win32ole.c             if ( (v = reg_get_val(hclsid, StringValuePtr(ver))) != Qnil ) {
Qnil             3676 ext/win32ole/win32ole.c         if (clsid == Qnil)
Qnil             3681 ext/win32ole/win32ole.c         if ((v = reg_get_val(hclsid, "ProgID")) != Qnil)
Qnil             3683 ext/win32ole/win32ole.c         if ((v = reg_get_val(hclsid, "VersionIndependentProgID")) != Qnil)
Qnil             3791 ext/win32ole/win32ole.c     VALUE name = Qnil;
Qnil             3793 ext/win32ole/win32ole.c     VALUE typelib = Qnil;
Qnil             3801 ext/win32ole/win32ole.c         if (guid == Qnil)
Qnil             3808 ext/win32ole/win32ole.c             if (version == Qnil)
Qnil             3810 ext/win32ole/win32ole.c             if ( (name = reg_get_val(hguid, StringValuePtr(version))) != Qnil ) {
Qnil             3827 ext/win32ole/win32ole.c     VALUE version_str = Qnil;
Qnil             3828 ext/win32ole/win32ole.c     VALUE minor_str = Qnil;
Qnil             3829 ext/win32ole/win32ole.c     if (major == Qnil) {
Qnil             3830 ext/win32ole/win32ole.c         return Qnil;
Qnil             3833 ext/win32ole/win32ole.c     if (minor != Qnil) {
Qnil             3854 ext/win32ole/win32ole.c     VALUE version = Qnil;
Qnil             3855 ext/win32ole/win32ole.c     VALUE typelib = Qnil;
Qnil             3869 ext/win32ole/win32ole.c     if (version_str != Qnil) {
Qnil             3873 ext/win32ole/win32ole.c             if (tlib != Qnil) {
Qnil             3883 ext/win32ole/win32ole.c 	        if (ver == Qnil)
Qnil             3889 ext/win32ole/win32ole.c 	        if (tlib == Qnil) {
Qnil             3903 ext/win32ole/win32ole.c     if (typelib != Qnil) {
Qnil             3929 ext/win32ole/win32ole.c         if (guid == Qnil)
Qnil             3936 ext/win32ole/win32ole.c             if (ver == Qnil)
Qnil             3942 ext/win32ole/win32ole.c             if (tlib == Qnil) {
Qnil             3987 ext/win32ole/win32ole.c     VALUE typelib = Qnil;
Qnil             4106 ext/win32ole/win32ole.c     VALUE path = Qnil;
Qnil             4115 ext/win32ole/win32ole.c         return Qnil;
Qnil             4117 ext/win32ole/win32ole.c     for(k = 0; path == Qnil; k++) {
Qnil             4119 ext/win32ole/win32ole.c         if (lang == Qnil)
Qnil             4166 ext/win32ole/win32ole.c     VALUE path = Qnil;
Qnil             4169 ext/win32ole/win32ole.c     if (path != Qnil) {
Qnil             4216 ext/win32ole/win32ole.c     if (file == Qnil) {
Qnil             4254 ext/win32ole/win32ole.c     VALUE type = Qnil;
Qnil             4288 ext/win32ole/win32ole.c         type = Qnil;
Qnil             4320 ext/win32ole/win32ole.c     VALUE guid = Qnil;
Qnil             4356 ext/win32ole/win32ole.c     VALUE progid = Qnil;
Qnil             4526 ext/win32ole/win32ole.c         return Qnil;
Qnil             4554 ext/win32ole/win32ole.c     VALUE alias = Qnil;
Qnil             4562 ext/win32ole/win32ole.c     alias = ole_typedesc2val(pTypeInfo, &(pTypeAttr->tdescAlias), Qnil);
Qnil             4593 ext/win32ole/win32ole.c         return Qnil;
Qnil             4625 ext/win32ole/win32ole.c         return Qnil;
Qnil             4693 ext/win32ole/win32ole.c         if (type != Qnil) {
Qnil             4862 ext/win32ole/win32ole.c     type = ole_typedesc2val(pTypeInfo, &(pVarDesc->elemdescVar.tdesc), Qnil);
Qnil             4940 ext/win32ole/win32ole.c     VALUE val = Qnil;
Qnil             4943 ext/win32ole/win32ole.c         return Qnil;
Qnil             5095 ext/win32ole/win32ole.c     VALUE kind = Qnil;
Qnil             5191 ext/win32ole/win32ole.c     VALUE obj = Qnil;
Qnil             5196 ext/win32ole/win32ole.c         if (obj == Qnil) {
Qnil             5238 ext/win32ole/win32ole.c     type = ole_typedesc2val(pTypeInfo, &(pFuncDesc->elemdescFunc.tdesc), Qnil);
Qnil             5565 ext/win32ole/win32ole.c     return Qnil;
Qnil             5600 ext/win32ole/win32ole.c         return Qnil;
Qnil             5634 ext/win32ole/win32ole.c         return Qnil;
Qnil             5668 ext/win32ole/win32ole.c         return Qnil;
Qnil             5697 ext/win32ole/win32ole.c     VALUE dispid = Qnil;
Qnil             5731 ext/win32ole/win32ole.c     VALUE offset_vtbl = Qnil;
Qnil             5765 ext/win32ole/win32ole.c     VALUE size_params = Qnil;
Qnil             5800 ext/win32ole/win32ole.c     VALUE size_opt_params = Qnil;
Qnil             5928 ext/win32ole/win32ole.c                             &(pFuncDesc->lprgelemdescParam[index].tdesc), Qnil);
Qnil             6108 ext/win32ole/win32ole.c     VALUE defval = Qnil;
Qnil             6249 ext/win32ole/win32ole.c     def_event = Qnil;
Qnil             6279 ext/win32ole/win32ole.c     def_event = Qnil;
Qnil             6766 ext/win32ole/win32ole.c     return Qnil;
Qnil             6803 ext/win32ole/win32ole.c     return Qnil;
Qnil             6898 ext/win32ole/win32ole.c     VALUE val = Qnil;
Qnil              414 ext/zlib/zlib.c     z->buf = Qnil;
Qnil              416 ext/zlib/zlib.c     z->input = Qnil;
Qnil              536 ext/zlib/zlib.c     z->buf = Qnil;
Qnil              613 ext/zlib/zlib.c 	z->input = Qnil;
Qnil              626 ext/zlib/zlib.c     z->input = Qnil;
Qnil              635 ext/zlib/zlib.c 	z->input = Qnil;
Qnil              652 ext/zlib/zlib.c     z->input = Qnil;
Qnil              668 ext/zlib/zlib.c     z->buf = Qnil;
Qnil              685 ext/zlib/zlib.c 	return Qnil;
Qnil              700 ext/zlib/zlib.c     return Qnil;
Qnil              765 ext/zlib/zlib.c         guard = Qnil; /* prevent tail call to make guard effective */
Qnil              931 ext/zlib/zlib.c     return Qnil;
Qnil              943 ext/zlib/zlib.c     return Qnil;
Qnil             1369 ext/zlib/zlib.c     return Qnil;
Qnil             1771 ext/zlib/zlib.c     gz->io = Qnil;
Qnil             1775 ext/zlib/zlib.c     gz->orig_name = Qnil;
Qnil             1776 ext/zlib/zlib.c     gz->comment = Qnil;
Qnil             1806 ext/zlib/zlib.c     gz->io = Qnil;
Qnil             1807 ext/zlib/zlib.c     gz->orig_name = Qnil;
Qnil             1808 ext/zlib/zlib.c     gz->comment = Qnil;
Qnil             1847 ext/zlib/zlib.c     VALUE str = Qnil;
Qnil             2064 ext/zlib/zlib.c     if (gz->z.input != Qnil && RSTRING(gz->z.input)->len > 0) {
Qnil             2169 ext/zlib/zlib.c 	return Qnil;
Qnil             2265 ext/zlib/zlib.c     return Qnil;
Qnil             2340 ext/zlib/zlib.c     if (!ZSTREAM_IS_READY(&gz->z)) return Qnil;
Qnil             2341 ext/zlib/zlib.c     if (!GZFILE_IS_FINISHED(gz)) return Qnil;
Qnil             2345 ext/zlib/zlib.c     if (NIL_P(gz->z.input)) return Qnil;
Qnil             2389 ext/zlib/zlib.c     return Qnil;
Qnil             3125 ext/zlib/zlib.c     return Qnil;
Qnil             3137 ext/zlib/zlib.c     return Qnil;
Qnil              158 file.c             if (!fptr->path) return Qnil;
Qnil              215 file.c             return Qnil;
Qnil              252 file.c             return Qnil;
Qnil              274 file.c             return Qnil;
Qnil              392 file.c             return Qnil;
Qnil              414 file.c             return Qnil;
Qnil              436 file.c             return Qnil;
Qnil              472 file.c             return Qnil;
Qnil              493 file.c             return Qnil;
Qnil              778 file.c             if (!fptr->path) return Qnil;
Qnil             1120 file.c             if (rb_stat(fname, &st) < 0) return Qnil;
Qnil             1125 file.c             return Qnil;
Qnil             1187 file.c             return Qnil;
Qnil             1277 file.c             if (rb_stat(fname, &st) < 0) return Qnil;
Qnil             1278 file.c             if (st.st_size == 0) return Qnil;
Qnil             1393 file.c             return Qnil;
Qnil             1452 file.c             fname1 = rb_file_expand_path(fname1, Qnil);
Qnil             1453 file.c             fname2 = rb_file_expand_path(fname2, Qnil);
Qnil             1744 file.c             if (!fptr->path) return Qnil;
Qnil             1789 file.c             return Qnil;		/* not reached */
Qnil             1872 file.c             if (!fptr->path) return Qnil;
Qnil             2051 file.c             return Qnil;		/* not reached */
Qnil             2081 file.c             return Qnil;		/* not reached */
Qnil             2126 file.c             return Qnil;		/* not reached */
Qnil             2470 file.c         		file_expand_path(dname, Qnil, result);
Qnil             2493 file.c         	    file_expand_path(dname, Qnil, result);
Qnil             2626 file.c         	return rb_file_expand_path(argv[0], Qnil);
Qnil             2845 file.c             return rb_assoc_new(rb_file_s_dirname(Qnil, path), rb_file_s_basename(1,&path));
Qnil             3348 file.c             return Qnil;		/* not reached */
Qnil             3400 file.c             return Qnil;
Qnil             3705 file.c               return Qnil;
Qnil             3791 file.c               return Qnil;
Qnil             3908 file.c             if (size == 0) return Qnil;
Qnil             4101 file.c         	fname = rb_file_expand_path(*filep, Qnil);
Qnil             4154 file.c         	path = rb_file_expand_path(path, Qnil);
Qnil             4339 file.c             rb_define_const(rb_cFile, "ALT_SEPARATOR", Qnil);
Qnil             1383 gc.c               return Qnil;
Qnil             1766 gc.c               return Qnil;
Qnil             1887 gc.c               if (ptr == Qnil) return Qnil;
Qnil              184 hash.c             return Qnil;
Qnil              207 hash.c             hash->ifnone = Qnil;
Qnil              306 hash.c         	RHASH(hash)->ifnone = Qnil;
Qnil              534 hash.c             return Qnil;
Qnil              565 hash.c             args[1] = Qnil;
Qnil              615 hash.c             return Qnil;
Qnil              661 hash.c         	return rb_funcall(RHASH(hash)->ifnone, id_call, 2, hash, Qnil);
Qnil              711 hash.c             if (n == RHASH(hash)->tbl->num_entries) return Qnil;
Qnil             1528 hash.c             if (!ptr) return Qnil;
Qnil             1558 hash.c             return Qnil;
Qnil             1597 hash.c             return Qnil;
Qnil             1918 hash.c         	VALUE val = rb_f_getenv(Qnil, RARRAY(keys)->ptr[i]);
Qnil             1922 hash.c         		env_delete(Qnil, RARRAY(keys)->ptr[i]);
Qnil             1927 hash.c             if (del == 0) return Qnil;
Qnil             1947 hash.c         	rb_ary_push(result, rb_f_getenv(Qnil, argv[i]));
Qnil             1987 hash.c         	VALUE val = rb_f_getenv(Qnil, RARRAY(keys)->ptr[i]);
Qnil             1989 hash.c         	    env_delete(Qnil, RARRAY(keys)->ptr[i]);
Qnil             2056 hash.c             return Qnil;
Qnil             2146 hash.c             return Qnil;
Qnil             2195 hash.c         	    env_delete(Qnil, key);
Qnil             2200 hash.c             return Qnil;
Qnil             2213 hash.c         	env_aset(Qnil, key, val);
Qnil             2244 hash.c         	    val = rb_yield_values(3, key, rb_f_getenv(Qnil, key), val);
Qnil             2246 hash.c         	env_aset(Qnil, key, val);
Qnil             1029 io.c               return Qnil;		/* not reached */
Qnil             1084 io.c           	return Qnil;
Qnil             1291 io.c                   return Qnil;
Qnil             1422 io.c           	if (fptr->fd < 0) return Qnil;
Qnil             1424 io.c                   return Qnil;
Qnil             1526 io.c               VALUE str = Qnil;
Qnil             1551 io.c               VALUE str = Qnil;
Qnil             1557 io.c           	str = read_all(fptr, 0, Qnil);
Qnil             1558 io.c           	if (RSTRING(str)->len == 0) return Qnil;
Qnil             1723 io.c               return Qnil;
Qnil             1886 io.c           	return Qnil;
Qnil             1953 io.c               return Qnil;
Qnil             2053 io.c               if (!fptr) return Qnil;
Qnil             2054 io.c               if (fptr->fd < 0) return Qnil;
Qnil             2065 io.c               return Qnil;
Qnil             2087 io.c               return Qnil;
Qnil             2095 io.c           	return Qnil;
Qnil             2165 io.c                   return Qnil;
Qnil             2210 io.c                   return Qnil;
Qnil             2887 io.c           	    return Qnil;
Qnil             3042 io.c           	    rb_yield(Qnil);
Qnil             3047 io.c           	return Qnil;
Qnil             3483 io.c               return Qnil;
Qnil             3502 io.c               if (argc == 0) return Qnil;
Qnil             3513 io.c               return Qnil;
Qnil             3565 io.c               return Qnil;
Qnil             3595 io.c               return Qnil;
Qnil             3651 io.c               return Qnil;
Qnil             3683 io.c           	return Qnil;
Qnil             3704 io.c               return Qnil;
Qnil             3720 io.c               return Qnil;
Qnil             3758 io.c               return Qnil;
Qnil             3795 io.c               return Qnil;
Qnil             4065 io.c                if (!next_argv()) return Qnil;\
Qnil             4202 io.c               if (!next_argv()) return Qnil;
Qnil             4264 io.c               if (!next_argv()) return Qnil;
Qnil             4285 io.c               if (!next_argv()) return Qnil;
Qnil             4385 io.c               result = read_all(fptr, remain_size(fptr), Qnil);
Qnil             4458 io.c               if (!pending && n == 0) return Qnil; /* returns nil on timeout */
Qnil             4526 io.c               return Qnil;
Qnil             4666 io.c               return Qnil;		/* not reached */
Qnil             4715 io.c               return Qnil;		/* not reached */
Qnil             4833 io.c               return Qnil;		/* not reached */
Qnil             4911 io.c               return Qnil;		/* not reached */
Qnil             4929 io.c               return Qnil;
Qnil             4965 io.c               if (NIL_P(arg.io)) return Qnil;
Qnil             4999 io.c               if (NIL_P(arg.io)) return Qnil;
Qnil             5032 io.c               if (NIL_P(arg.io)) return Qnil;
Qnil             5123 io.c           	argv[1] = Qnil;
Qnil             5158 io.c               return Qnil;
Qnil             5178 io.c                                    argf_readpartial_rescue, (VALUE)Qnil,
Qnil             5205 io.c               if (!next_argv()) return Qnil;
Qnil             5240 io.c               if (!next_argv()) return Qnil;
Qnil             5329 io.c               if (!ruby_inplace_mode) return Qnil;
Qnil             5483 io.c               rb_output_fs = Qnil;
Qnil             5488 io.c               rb_output_rs = Qnil;
Qnil              429 marshal.c          if (obj == Qnil) {
Qnil              688 marshal.c          port = Qnil;
Qnil              935 marshal.c          VALUE v = Qnil;
Qnil              994 marshal.c      	v = Qnil;
Qnil             1133 marshal.c      	    if (mem == Qnil) {
Qnil             1140 marshal.c      		rb_ary_push(values, Qnil);
Qnil             1286 marshal.c          return r_object0(arg, arg->proc, 0, Qnil);
Qnil              123 numeric.c          return Qnil;		/* dummy */
Qnil              159 numeric.c          return Qnil;
Qnil              170 numeric.c      	return Qnil;		/* not reached */
Qnil              189 numeric.c          return Qnil;		/* not reached */
Qnil              198 numeric.c          return Qnil;		/* not reached */
Qnil              433 numeric.c      	return Qnil;
Qnil              776 numeric.c          return Qnil;
Qnil              849 numeric.c          if (isnan(a) || isnan(b)) return Qnil;
Qnil              853 numeric.c          return Qnil;
Qnil             1142 numeric.c          return Qnil;
Qnil             1630 numeric.c      	return Qnil;            /* not reached */
Qnil             1635 numeric.c      	return Qnil;		/* not reached */
Qnil             2612 numeric.c          return Qnil;
Qnil             2636 numeric.c          return Qnil;
Qnil              559 object.c           return Qnil;
Qnil              980 object.c           return Qnil;
Qnil             1224 object.c           return Qnil;
Qnil             1312 object.c       	return Qnil;
Qnil             1316 object.c           if (NIL_P(cmp)) return Qnil;
Qnil             1367 object.c           return Qnil;
Qnil             1484 object.c       	return Qnil;
Qnil             1563 object.c           return Qnil;
Qnil             1583 object.c           return Qnil;
Qnil             1602 object.c           return Qnil;
Qnil             1626 object.c           return Qnil;
Qnil             1931 object.c       	    return Qnil;
Qnil             1960 object.c           if (NIL_P(v)) return Qnil;
Qnil             1987 object.c       	return Qnil;
Qnil             2456 object.c           rb_define_global_const("NIL", Qnil);
Qnil             1139 pack.c         #define PACK_ITEM_ADJUST() while (tmp--) rb_ary_push(ary, Qnil)
Qnil             1890 pack.c         		    tmp = Qnil;
Qnil             1930 pack.c         			tmp = Qnil;
Qnil              409 parse.y        #define escape_Qundef(x) ((x)==Qundef ? Qnil : (x))
Qnil             4475 parse.y            parser->delayed = Qnil;
Qnil             4614 parse.y        	if (RSTRING(s)->len == lex_gets_ptr) return Qnil;
Qnil             8134 parse.y            rb_dvar_push(id, Qnil);
Qnil             8612 parse.y            return Qnil;
Qnil             8634 parse.y            return Qnil;
Qnil             8680 parse.y            parser->parser_ruby_sourcefile = Qnil;
Qnil             8681 parse.y            parser->delayed = Qnil;
Qnil             8683 parse.y            parser->result = Qnil;
Qnil             8684 parse.y            parser->parsing_thread = Qnil;
Qnil             8844 parse.y            if (x == Qnil) return x;
Qnil             9127 parse.y            return Qnil;
Qnil             9180 parse.y            parser->parsing_thread = Qnil;
Qnil             9181 parse.y            return Qnil;
Qnil             9228 parse.y            if (NIL_P(parser->parsing_thread)) return Qnil;
Qnil             9249 parse.y            if (NIL_P(parser->parsing_thread)) return Qnil;
Qnil             9262 parse.y            return Qnil;
Qnil               90 prec.c             return Qnil;		/* not reached */
Qnil              197 process.c      VALUE rb_last_status = Qnil;
Qnil              409 process.c          return Qnil;
Qnil              449 process.c          return Qnil;
Qnil              500 process.c          return Qnil;
Qnil              518 process.c      	return Qnil;
Qnil              728 process.c      	return rb_last_status = Qnil;
Qnil              755 process.c          if (NIL_P(pid)) return Qnil;
Qnil              808 process.c          rb_last_status = Qnil;
Qnil             1238 process.c          return Qnil;		/* dummy */
Qnil             1273 process.c          return Qnil;
Qnil             1429 process.c      	return Qnil;
Qnil             1433 process.c      	return Qnil;
Qnil             1480 process.c          return Qnil;		/* not reached */
Qnil             1622 process.c          return Qnil;
Qnil             1988 process.c          if (rlim_max == Qnil)
Qnil             1997 process.c          return Qnil;
Qnil             2053 process.c          return Qnil;
Qnil             2076 process.c          return Qnil;
Qnil             2098 process.c          return Qnil;
Qnil             2122 process.c          return Qnil;
Qnil             2146 process.c          return Qnil;
Qnil             2389 process.c          return Qnil;
Qnil             2411 process.c          return Qnil;
Qnil             2434 process.c          return Qnil;
Qnil             2458 process.c          return Qnil;
Qnil             2481 process.c          return Qnil;
Qnil             2509 process.c          return Qnil;		/* not reached */
Qnil             2604 process.c          return Qnil;
Qnil             2668 process.c          return Qnil;
Qnil             2700 process.c          return Qnil;
Qnil             3353 process.c      	    return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, SAVED_USER_ID);
Qnil             3361 process.c      	    return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, euid);
Qnil             3395 process.c      	return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, obj);
Qnil             3462 process.c      	    return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, SAVED_GROUP_ID);
Qnil             3470 process.c      	    return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, egid);
Qnil             3503 process.c      	return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, obj);
Qnil               25 range.c            return Qnil;		/* dummy */
Qnil               83 range.c            return Qnil;
Qnil              249 range.c            return Qnil;
Qnil              348 range.c            return Qnil;
Qnil              462 range.c        	if (c > 0) return Qnil;
Qnil              492 range.c        	if (c > 0) return Qnil;
Qnil              546 range.c            return Qnil;
Qnil              596 re.c               return Qnil;
Qnil              722 re.c           	return rb_assoc_new(Qnil, Qnil);
Qnil              750 re.c           	return Qnil;
Qnil              777 re.c           	return Qnil;
Qnil              891 re.c           	rb_backref_set(Qnil);
Qnil              922 re.c           	    rb_backref_set(Qnil);
Qnil              955 re.c               if (NIL_P(match)) return Qnil;
Qnil              957 re.c           	return Qnil;
Qnil              961 re.c           	if (nth <= 0) return Qnil;
Qnil              973 re.c               if (NIL_P(match)) return Qnil;
Qnil              975 re.c           	return Qnil;
Qnil              979 re.c           	if (nth <= 0) return Qnil;
Qnil              982 re.c               if (start == -1) return Qnil;
Qnil             1013 re.c               if (NIL_P(match)) return Qnil;
Qnil             1014 re.c               if (RMATCH(match)->BEG(0) == -1) return Qnil;
Qnil             1038 re.c               if (NIL_P(match)) return Qnil;
Qnil             1039 re.c               if (RMATCH(match)->BEG(0) == -1) return Qnil;
Qnil             1052 re.c               if (NIL_P(match)) return Qnil;
Qnil             1053 re.c               if (RMATCH(match)->BEG(0) == -1) return Qnil;
Qnil             1057 re.c               if (i == 0) return Qnil;
Qnil             1096 re.c           	    rb_ary_push(ary, Qnil);
Qnil             1468 re.c           	rb_backref_set(Qnil);
Qnil             1469 re.c           	return Qnil;
Qnil             1476 re.c           		return Qnil;
Qnil             1483 re.c           	return Qnil;
Qnil             1529 re.c           	    rb_backref_set(Qnil);
Qnil             1560 re.c           	rb_backref_set(Qnil);
Qnil             1561 re.c           	return Qnil;
Qnil             1566 re.c           	return Qnil;
Qnil             1602 re.c           	rb_backref_set(Qnil);
Qnil             1603 re.c           	return Qnil;
Qnil             1911 re.c                   VALUE kcode_re = Qnil;
Qnil             1942 re.c                   args[1] = Qnil;
Qnil             1945 re.c                       args[2] = Qnil;
Qnil             2145 re.c               if (NIL_P(match)) return Qnil;
Qnil             1013 regexec.c        return Qnil;
Qnil             1025 regexec.c        return Qnil;
Qnil             1104 regexec.c        return Qnil;
Qnil              225 ruby.c             return rb_file_expand_path(path, Qnil);
Qnil              541 ruby.c         		    ruby_verbose = Qnil; break;
Qnil              680 ruby.c         		if (v > 0377) rb_rs = Qnil;
Qnil             1138 ruby.c             if (ruby_verbose == Qnil) return INT2FIX(0);
Qnil             1141 ruby.c             return Qnil;		/* not reached */
Qnil              195 ruby.h         #define RTEST(v) (((VALUE)(v) & ~Qnil) != 0)
Qnil              196 ruby.h         #define NIL_P(v) ((VALUE)(v) == Qnil)
Qnil              677 ruby.h         	if (obj == Qnil)   return rb_cNilClass;
Qnil              693 ruby.h         	if (obj == Qnil) return T_NIL;
Qnil              683 signal.c       	else oldcmd = Qnil;
Qnil              532 string.c           if (len < 0) return Qnil;
Qnil              533 string.c           if (beg > RSTRING(str)->len) return Qnil;
Qnil              536 string.c       	if (beg < 0) return Qnil;
Qnil              915 string.c       	    return Qnil;
Qnil              918 string.c       	    return Qnil;
Qnil              923 string.c       	    if (NIL_P(tmp)) return Qnil;
Qnil             1020 string.c       		rb_backref_set(Qnil);
Qnil             1022 string.c       	    return Qnil;
Qnil             1041 string.c       	  return Qnil;
Qnil             1060 string.c           if (pos == -1) return Qnil;
Qnil             1125 string.c       		    rb_backref_set(Qnil);
Qnil             1127 string.c       		return Qnil;
Qnil             1157 string.c       	      if (pos == 0) return Qnil;
Qnil             1165 string.c       	  return Qnil;
Qnil             1172 string.c           return Qnil;
Qnil             1404 string.c           return Qnil;
Qnil             1421 string.c       	    return Qnil;
Qnil             1431 string.c       	return Qnil;
Qnil             1442 string.c       	      case Qnil:
Qnil             1443 string.c       		return Qnil;
Qnil             1453 string.c           return Qnil;		/* not reached */
Qnil             1871 string.c           return Qnil;
Qnil             1942 string.c       	if (bang) return Qnil;	/* no match, no substitution */
Qnil             2533 string.c           return Qnil;
Qnil             2585 string.c           return Qnil;
Qnil             2629 string.c           if (RSTRING(str)->len == 0 || !RSTRING(str)->ptr) return Qnil;
Qnil             2645 string.c           return Qnil;
Qnil             2702 string.c           return Qnil;
Qnil             2778 string.c           if (RSTRING(str)->len == 0 || !RSTRING(str)->ptr) return Qnil;
Qnil             2857 string.c           return Qnil;
Qnil             2964 string.c           if (!s || RSTRING(str)->len == 0) return Qnil;
Qnil             2977 string.c           return Qnil;
Qnil             3038 string.c           if (!s || RSTRING(str)->len == 0) return Qnil;
Qnil             3054 string.c           return Qnil;
Qnil             3220 string.c       	if (lim <= 0) limit = Qnil;
Qnil             3488 string.c           return Qnil;
Qnil             3536 string.c       	if (len == 0) return Qnil;
Qnil             3553 string.c       		return Qnil;
Qnil             3559 string.c           if (NIL_P(rs)) return Qnil;
Qnil             3562 string.c           if (len == 0) return Qnil;
Qnil             3577 string.c       	return Qnil;
Qnil             3579 string.c           if (rslen > len) return Qnil;
Qnil             3592 string.c           return Qnil;
Qnil             3641 string.c           if (!s || RSTRING(str)->len == 0) return Qnil;
Qnil             3653 string.c           return Qnil;
Qnil             3695 string.c           if (!s || RSTRING(str)->len == 0) return Qnil;
Qnil             3710 string.c           return Qnil;
Qnil             3748 string.c           if (NIL_P(l) && NIL_P(r)) return Qnil;
Qnil             3803 string.c           return Qnil;
Qnil             3843 string.c           VALUE match = Qnil;
Qnil             4292 string.c           rb_fs = Qnil;
Qnil               30 struct.c       	    return Qnil;
Qnil              106 struct.c           return Qnil;		/* not reached */
Qnil              165 struct.c           return Qnil;		/* not reached */
Qnil              224 struct.c           if (!name) nm = Qnil;
Qnil              291 struct.c       	    name = Qnil;
Qnil              323 struct.c           return Qnil;
Qnil              532 struct.c           return Qnil;		/* not reached */
Qnil              294 time.c         	v[6] = Qnil;
Qnil              916 time.c             return Qnil;
Qnil              134 variable.c         return Qnil;
Qnil              140 variable.c         VALUE path = Qnil;
Qnil              348 variable.c         return Qnil;
Qnil              387 variable.c         if (!var) return Qnil;
Qnil              541 variable.c         return Qnil;
Qnil              614 variable.c         return Qnil;
Qnil              638 variable.c         return Qnil;		/* not reached */
Qnil              646 variable.c         return Qnil;		/* not reached */
Qnil              793 variable.c         return Qnil;
Qnil              934 variable.c         return Qnil;
Qnil             1066 variable.c         VALUE val = Qnil;
Qnil             1093 variable.c         return Qnil;		/* not reached */
Qnil             1149 variable.c         return Qnil;		/* not reached */
Qnil             1241 variable.c     	return Qnil;
Qnil             1262 variable.c         return Qnil;
Qnil             1272 variable.c     	return Qnil;
Qnil             1352 variable.c     	    val = Qnil;
Qnil             1362 variable.c         return Qnil;		/* not reached */
Qnil             1556 variable.c         return Qnil;		/* not reached */
Qnil             1680 variable.c         return Qnil;		/* not reached */


Qtrue

Qtrue              86 array.c            if (OBJ_FROZEN(ary)) return Qtrue;
Qtrue              87 array.c            if (FL_TEST(ary, ARY_TMPLOCK)) return Qtrue;
Qtrue            1230 array.c        	return Qtrue;
Qtrue            1265 array.c            if (OBJ_TAINTED(ary) || OBJ_TAINTED(sep)) taint = Qtrue;
Qtrue            1296 array.c        	if (OBJ_TAINTED(tmp)) taint = Qtrue;
Qtrue            1354 array.c        	if (OBJ_TAINTED(s)) tainted = Qtrue;
Qtrue            2107 array.c        	block_p = Qtrue;
Qtrue            2342 array.c            if (ary1 == ary2) return Qtrue;
Qtrue            2354 array.c            return Qtrue;
Qtrue            2370 array.c            if (ary1 == ary2) return Qtrue;
Qtrue            2377 array.c            return Qtrue;
Qtrue            2432 array.c        	    return Qtrue;
Qtrue            2488 array.c        	rb_hash_aset(hash, RARRAY(ary1)->ptr[i], Qtrue);
Qtrue            2492 array.c        	    rb_hash_aset(hash, RARRAY(ary2)->ptr[i], Qtrue);
Qtrue             729 bignum.c           unsigned long num = big2ulong(x, "unsigned long", Qtrue);
Qtrue             743 bignum.c           unsigned long num = big2ulong(x, "long", Qtrue);
Qtrue             938 bignum.c       	    return (a == b)?Qtrue:Qfalse;
Qtrue             946 bignum.c           return Qtrue;
Qtrue             967 bignum.c           return Qtrue;
Qtrue             381 class.c        		superclass_seen = Qtrue;
Qtrue             452 class.c        	    if (RBASIC(p)->klass == mod2) return Qtrue;
Qtrue             561 class.c        	recur = Qtrue;
Qtrue             709 class.c        	recur = Qtrue;
Qtrue             777 class.c        	SPECIAL_SINGLETON(Qtrue, rb_cTrueClass);
Qtrue              57 compar.c           if (rb_cmpint(c, a[0], a[1]) == 0) return Qtrue;
Qtrue              81 compar.c           if (x == y) return Qtrue;
Qtrue             100 compar.c           if (rb_cmpint(c, x, y) > 0) return Qtrue;
Qtrue             117 compar.c           if (rb_cmpint(c, x, y) >= 0) return Qtrue;
Qtrue             134 compar.c           if (rb_cmpint(c, x, y) < 0) return Qtrue;
Qtrue             151 compar.c           if (rb_cmpint(c, x, y) <= 0) return Qtrue;
Qtrue             175 compar.c           return Qtrue;
Qtrue             696 dir.c              args->done = Qtrue;
Qtrue            1782 dir.c          	return Qtrue;
Qtrue             582 enum.c             VALUE result = Qtrue;
Qtrue             592 enum.c         	*memo = Qtrue;
Qtrue             602 enum.c         	*memo = Qtrue;
Qtrue             640 enum.c         	    *memo = Qtrue;
Qtrue             642 enum.c         	else if (*memo == Qtrue) {
Qtrue             654 enum.c         	    *memo = Qtrue;
Qtrue             656 enum.c         	else if (*memo == Qtrue) {
Qtrue             727 enum.c             VALUE result = Qtrue;
Qtrue             936 enum.c         	memo[1] = Qtrue;
Qtrue             485 error.c            if (exc == obj) return Qtrue;
Qtrue             492 error.c            return Qtrue;
Qtrue             541 error.c            if (NIL_P(status)) return Qtrue;
Qtrue             542 error.c            if (status == INT2FIX(EXIT_SUCCESS)) return Qtrue;
Qtrue             663 error.c            if (obj1 == obj2) return Qtrue;
Qtrue             673 error.c            return Qtrue;
Qtrue             896 error.c            if (self == rb_eSystemCallError) return Qtrue;
Qtrue             909 error.c        	return Qtrue;
Qtrue             623 eval.c         	return Qtrue;
Qtrue             628 eval.c         	return Qtrue;
Qtrue             773 eval.c         	if (vars->id == id) return Qtrue;
Qtrue             786 eval.c         	if (vars->id == id) return Qtrue;
Qtrue             915 eval.c         #define PROT_THREAD Qtrue	/* 2 */
Qtrue            1774 eval.c         		return Qtrue;
Qtrue            2220 eval.c         	if (!is_defined(self, node->nd_recv, buf, Qtrue)) return 0;
Qtrue            2314 eval.c         	if (!is_defined(self, node->nd_recv, buf, Qtrue)) return 0;
Qtrue            2375 eval.c         	return Qtrue;
Qtrue            2808 eval.c         	RETURN(Qtrue);
Qtrue            3170 eval.c         	else result = Qtrue;
Qtrue            3188 eval.c         		    *flip = RTEST(rb_eval(self, node->nd_end))?Qfalse:Qtrue;
Qtrue            3189 eval.c         		    result = Qtrue;
Qtrue            3199 eval.c         		result = Qtrue;
Qtrue            3209 eval.c         		result = RTEST(rb_eval(self, node->nd_beg)) ? Qtrue : Qfalse;
Qtrue            3216 eval.c         		result = Qtrue;
Qtrue            3501 eval.c         	rb_cvar_set(cvar_cbase(), node->nd_vid, result, Qtrue);
Qtrue            3867 eval.c         		gen = Qtrue;
Qtrue            4023 eval.c         	if (priv) args[n++] = Qtrue;
Qtrue            4052 eval.c         	return Qtrue;
Qtrue            4125 eval.c         	    return Qtrue;
Qtrue            4164 eval.c         	    return Qtrue;
Qtrue            4203 eval.c         	    return Qtrue;
Qtrue            4277 eval.c         	  case Qtrue:
Qtrue            4519 eval.c         	return Qtrue;
Qtrue            4555 eval.c         	return Qtrue;
Qtrue            4592 eval.c         	    yield = Qtrue;
Qtrue            4839 eval.c         		lambda = Qtrue;	/* just pass TAG_BREAK */
Qtrue            4922 eval.c             return rb_yield_0(val, 0, 0, 0, Qtrue);
Qtrue            4935 eval.c         	    avalue = Qtrue;
Qtrue            5052 eval.c         	rb_cvar_set(cvar_cbase(), lhs->nd_vid, val, Qtrue);
Qtrue            5189 eval.c         		handle = Qtrue;
Qtrue            5275 eval.c         	rb_thread_critical = Qtrue;
Qtrue            6078 eval.c             rb_thread_critical = Qtrue;
Qtrue            6352 eval.c             VALUE avalue = Qtrue;
Qtrue            6599 eval.c         	rb_thread_critical = Qtrue;
Qtrue            6674 eval.c             return Qtrue;
Qtrue            6740 eval.c         	return Qtrue;
Qtrue            6742 eval.c         	if (st_lookup(loading_tbl, (st_data_t)feature, 0)) return Qtrue;
Qtrue            6747 eval.c         	    if (st_lookup(loading_tbl, (st_data_t)buf, 0)) return Qtrue;
Qtrue            6753 eval.c         	    return Qtrue;
Qtrue            6755 eval.c         	    return Qtrue;
Qtrue            6780 eval.c         	if ((rb_thread_t)th == curr_thread) return Qtrue;
Qtrue            6783 eval.c             return Qtrue;
Qtrue            6825 eval.c         	    if (rb_feature_p(ftptr, ext, Qtrue)) return 'r';
Qtrue            6829 eval.c         		if (!rb_feature_p(ftptr, ext, Qtrue))
Qtrue            6956 eval.c         		result = Qtrue;
Qtrue            8099 eval.c             data->iter = data->prev?Qtrue:Qfalse;
Qtrue            8170 eval.c             return proc_alloc(rb_cProc, Qtrue);
Qtrue            8184 eval.c             return proc_alloc(rb_cProc, Qtrue);
Qtrue            8209 eval.c             volatile int pcall, avalue = Qtrue;
Qtrue            8402 eval.c             if (self == other) return Qtrue;
Qtrue            8414 eval.c             return Qtrue;
Qtrue            8726 eval.c             return Qtrue;
Qtrue            9252 eval.c         	return Qtrue;
Qtrue            10423 eval.c         	    return Qtrue;
Qtrue            10459 eval.c         	    test = Qtrue;
Qtrue            10746 eval.c             if (rb_thread_critical) return Qtrue;
Qtrue            10747 eval.c             if (curr_thread == curr_thread->next) return Qtrue;
Qtrue            10748 eval.c             if (curr_thread->status == THREAD_TO_KILL) return Qtrue;
Qtrue            10776 eval.c         	    rb_thread_critical = Qtrue;
Qtrue            10947 eval.c             return Qtrue;
Qtrue            11303 eval.c         	rb_thread_critical = Qtrue;
Qtrue            11415 eval.c             return ruby_thread_abort?Qtrue:Qfalse;
Qtrue            11464 eval.c             return rb_thread_check(thread)->abort?Qtrue:Qfalse;
Qtrue            11893 eval.c             return rb_yield_0(arg, 0, 0, YIELD_LAMBDA_CALL, Qtrue);
Qtrue            12068 eval.c             return Qtrue;
Qtrue            12089 eval.c             if (rb_thread_dead(th)) return Qtrue;
Qtrue            12090 eval.c             if (th->status == THREAD_STOPPED) return Qtrue;
Qtrue            12152 eval.c             return rb_thread_critical?Qtrue:Qfalse;
Qtrue            12421 eval.c         	return Qtrue;
Qtrue            12743 eval.c             if (data->enclosed) return Qtrue;
Qtrue            13085 eval.c         	return (*func)(obj, arg, Qtrue);
Qtrue             232 ext/bigdecimal/bigdecimal.c         if(val!=Qfalse && val!=Qtrue) {
Qtrue             237 ext/bigdecimal/bigdecimal.c             VpSetException((unsigned short)((val==Qtrue)?(fo|VP_EXCEPTION_INFINITY):
Qtrue             241 ext/bigdecimal/bigdecimal.c             VpSetException((unsigned short)((val==Qtrue)?(fo|VP_EXCEPTION_NaN):
Qtrue             317 ext/bigdecimal/bigdecimal.c     if(VpIsNaN(p))  return Qtrue;
Qtrue             336 ext/bigdecimal/bigdecimal.c     return Qtrue;
Qtrue             515 ext/bigdecimal/bigdecimal.c     case '=': if(e==0) return Qtrue ; return Qfalse;
Qtrue             516 ext/bigdecimal/bigdecimal.c     case '!': if(e!=0) return Qtrue ; return Qfalse;
Qtrue             517 ext/bigdecimal/bigdecimal.c     case 'G': if(e>=0) return Qtrue ; return Qfalse;
Qtrue             518 ext/bigdecimal/bigdecimal.c     case '>': if(e> 0) return Qtrue ; return Qfalse;
Qtrue             519 ext/bigdecimal/bigdecimal.c     case 'L': if(e<=0) return Qtrue ; return Qfalse;
Qtrue             520 ext/bigdecimal/bigdecimal.c     case '<': if(e< 0) return Qtrue ; return Qfalse;
Qtrue             529 ext/bigdecimal/bigdecimal.c     return VpIsZero(a) ? Qtrue : Qfalse;
Qtrue             171 ext/curses/curses.c 	return Qtrue;
Qtrue             520 ext/curses/curses.c   return (scrl(NUM2INT(n)) == OK) ? Qtrue : Qfalse;
Qtrue             531 ext/curses/curses.c   return (setscrreg(NUM2INT(top), NUM2INT(bottom)) == OK) ? Qtrue : Qfalse;
Qtrue             571 ext/curses/curses.c   return (bkgd(NUM2CH(ch)) == OK) ? Qtrue : Qfalse;
Qtrue             581 ext/curses/curses.c   return (resizeterm(NUM2INT(lin),NUM2INT(col)) == OK) ? Qtrue : Qfalse;
Qtrue             592 ext/curses/curses.c   return (start_color() == OK) ? Qtrue : Qfalse;
Qtrue             599 ext/curses/curses.c   return (init_pair(NUM2INT(pair),NUM2INT(f),NUM2INT(b)) == OK) ? Qtrue : Qfalse;
Qtrue             607 ext/curses/curses.c 		     NUM2INT(g),NUM2INT(b)) == OK) ? Qtrue : Qfalse;
Qtrue             613 ext/curses/curses.c   return has_colors() ? Qtrue : Qfalse;
Qtrue             619 ext/curses/curses.c   return can_change_color() ? Qtrue : Qfalse;
Qtrue             696 ext/curses/curses.c   return (ungetmouse(mdata->mevent) == OK) ? Qtrue : Qfalse;
Qtrue             702 ext/curses/curses.c   return mouseinterval(NUM2INT(interval)) ? Qtrue : Qfalse;
Qtrue             742 ext/curses/curses.c   return def_prog_mode() == OK ? Qtrue : Qfalse;
Qtrue             752 ext/curses/curses.c   return reset_prog_mode() == OK ? Qtrue : Qfalse;
Qtrue            1242 ext/curses/curses.c   return (res == OK) ? Qtrue : Qfalse;
Qtrue            1257 ext/curses/curses.c   return (res == OK) ? Qtrue : Qfalse;
Qtrue            1269 ext/curses/curses.c   return (scroll(winp->window) == OK) ? Qtrue : Qfalse;
Qtrue            1280 ext/curses/curses.c   return (wscrl(winp->window,NUM2INT(n)) == OK) ? Qtrue : Qfalse;
Qtrue            1295 ext/curses/curses.c   return Qtrue;
Qtrue            1317 ext/curses/curses.c   return Qtrue;
Qtrue            1330 ext/curses/curses.c   return Qtrue;
Qtrue            1353 ext/curses/curses.c   return (wbkgd(winp->window, NUM2CH(ch)) == OK) ? Qtrue : Qfalse;
Qtrue            1380 ext/curses/curses.c   return wresize(winp->window, NUM2INT(lin), NUM2INT(col)) == OK ? Qtrue : Qfalse;
Qtrue            1401 ext/curses/curses.c     Qtrue : Qfalse;
Qtrue            1420 ext/curses/curses.c   return nodelay(winp->window,RTEST(val) ? TRUE : FALSE) == OK ? Qtrue : Qfalse;
Qtrue              82 ext/dbm/dbm.c  	return Qtrue;
Qtrue              84 ext/dbm/dbm.c  	return Qtrue;
Qtrue             540 ext/dbm/dbm.c      if (i == 0) return Qtrue;
Qtrue             651 ext/dbm/dbm.c      if (val.dptr) return Qtrue;
Qtrue             672 ext/dbm/dbm.c  	    return Qtrue;
Qtrue             228 ext/digest/digest.c 	return algo->equal_func(pctx1, pctx2) ? Qtrue : Qfalse;
Qtrue             241 ext/digest/digest.c 	return Qtrue;
Qtrue              34 ext/digest/md5/md5init.c 		Data_Wrap_Struct(rb_cObject, 0, 0, &md5), Qtrue);
Qtrue              37 ext/digest/rmd160/rmd160init.c 		Data_Wrap_Struct(rb_cObject, 0, 0, &rmd160), Qtrue);
Qtrue              34 ext/digest/sha1/sha1init.c 		Data_Wrap_Struct(rb_cObject, 0, 0, &sha1), Qtrue);
Qtrue              44 ext/digest/sha2/sha2init.c 		Data_Wrap_Struct(rb_cObject, 0, 0, &sha##bitlen), Qtrue);
Qtrue             214 ext/dl/cptr.c    return data->ptr ? Qfalse : Qtrue;
Qtrue             224 ext/dl/cptr.c    if( rb_obj_is_kind_of(val, rb_cDLCFunc) == Qtrue ){
Qtrue             309 ext/dl/cptr.c    return ptr1 == ptr2 ? Qtrue : Qfalse;
Qtrue             420 ext/dl/cptr.c      if( rb_obj_is_kind_of(val, rb_cIO) == Qtrue ){
Qtrue             431 ext/dl/cptr.c      else if( rb_obj_is_kind_of(val, rb_cString) == Qtrue ){
Qtrue             145 ext/dl/dl.h    #define BOOL2INT(x)  ((x == Qtrue)?1:0)
Qtrue             146 ext/dl/dl.h    #define INT2BOOL(x)  (x?Qtrue:Qfalse)
Qtrue             221 ext/etc/etc.c  	passwd_blocking = Qtrue;
Qtrue             426 ext/etc/etc.c  	group_blocking = Qtrue;
Qtrue              83 ext/gdbm/gdbm.c 	return Qtrue;
Qtrue              85 ext/gdbm/gdbm.c 	return Qtrue;
Qtrue             638 ext/gdbm/gdbm.c         return Qtrue;
Qtrue             641 ext/gdbm/gdbm.c     if (dbmp->di_size == 0) return Qtrue;
Qtrue             754 ext/gdbm/gdbm.c         return Qtrue;
Qtrue             777 ext/gdbm/gdbm.c 	    return Qtrue;
Qtrue             868 ext/gdbm/gdbm.c     fgdbm_set_fastmode(obj, RTEST(val) ? Qfalse : Qtrue);
Qtrue             846 ext/iconv/iconv.c     if (trivial) return Qtrue;
Qtrue             865 ext/iconv/iconv.c     if (trans) return Qtrue;
Qtrue             902 ext/iconv/iconv.c     if (dis) return Qtrue;
Qtrue              34 ext/io/wait/wait.c #define FIONREAD_POSSIBLE_P(fd) ((fd),Qtrue)
Qtrue              64 ext/io/wait/wait.c     if (rb_io_read_pending(fptr)) return Qtrue;
Qtrue             119 ext/io/wait/wait.c     if (rb_io_read_pending(fptr)) return Qtrue;
Qtrue             170 ext/openssl/ossl.c 	rflag = flag ? Qtrue : Qfalse;
Qtrue             218 ext/openssl/ossl.c 	    args.preverify_ok = ok ? Qtrue : Qfalse;
Qtrue             223 ext/openssl/ossl.c 	if (ret == Qtrue) {
Qtrue             295 ext/openssl/ossl.c 	if (dOSSL == Qtrue) /* FULL INFO */
Qtrue             302 ext/openssl/ossl.c     if (dOSSL == Qtrue){ /* show all errors on the stack */
Qtrue             338 ext/openssl/ossl.c     if (dOSSL == Qtrue) {
Qtrue             361 ext/openssl/ossl.c 	if (dOSSL == Qtrue) {
Qtrue             364 ext/openssl/ossl.c 	} else if (old == Qtrue) {
Qtrue             165 ext/openssl/ossl.h   if (dOSSL == Qtrue) { \
Qtrue             111 ext/openssl/ossl_asn1.c     num = rb_cstr_to_inum(txt, 10, Qtrue);
Qtrue             316 ext/openssl/ossl_asn1.c     return bool ? Qtrue : Qfalse;
Qtrue             736 ext/openssl/ossl_asn1.c 	    rb_ary_push(arg, (j & V_ASN1_CONSTRUCTED) ? Qtrue : Qfalse);
Qtrue            1013 ext/openssl/ossl_asn1.c     return Qtrue;
Qtrue            1111 ext/openssl/ossl_asn1.c     rb_attr(cASN1Data, rb_intern("value"), 1, 1, Qtrue);
Qtrue            1112 ext/openssl/ossl_asn1.c     rb_attr(cASN1Data, rb_intern("tag"), 1, 1, Qtrue);
Qtrue            1113 ext/openssl/ossl_asn1.c     rb_attr(cASN1Data, rb_intern("tag_class"), 1, 1, Qtrue);
Qtrue            1118 ext/openssl/ossl_asn1.c     rb_attr(cASN1Primitive, rb_intern("tagging"), 1, 1, Qtrue);
Qtrue            1124 ext/openssl/ossl_asn1.c     rb_attr(cASN1Constructive, rb_intern("tagging"), 1, 1, Qtrue);
Qtrue            1165 ext/openssl/ossl_asn1.c     rb_attr(cASN1BitString, rb_intern("unused_bits"), 1, 1, Qtrue);
Qtrue             204 ext/openssl/ossl_bn.c     num = rb_cstr_to_inum(txt, 10, Qtrue);
Qtrue             242 ext/openssl/ossl_bn.c 	    return Qtrue;				\
Qtrue             386 ext/openssl/ossl_bn.c 	return Qtrue;
Qtrue             423 ext/openssl/ossl_bn.c 	    bottom = (odd == Qtrue) ? 1 : 0;			\
Qtrue             539 ext/openssl/ossl_bn.c 	return Qtrue;
Qtrue             557 ext/openssl/ossl_bn.c 	return Qtrue;
Qtrue             586 ext/openssl/ossl_bn.c 	return Qtrue;
Qtrue             221 ext/openssl/ossl_digest.c     if (rb_obj_is_kind_of(other, cDigest) == Qtrue) {
Qtrue             235 ext/openssl/ossl_digest.c 	return Qtrue;
Qtrue              45 ext/openssl/ossl_engine.c     return Qtrue;\
Qtrue              60 ext/openssl/ossl_engine.c         return Qtrue;
Qtrue             270 ext/openssl/ossl_engine.c     return Qtrue;
Qtrue             223 ext/openssl/ossl_ns_spki.c 	return Qtrue;
Qtrue             253 ext/openssl/ossl_ocsp.c     return result ? Qtrue : Qfalse;
Qtrue             607 ext/openssl/ossl_ocsp.c     return result ? Qtrue : Qfalse;
Qtrue             653 ext/openssl/ossl_ocsp.c     return (result == 0) ? Qtrue : Qfalse;
Qtrue             666 ext/openssl/ossl_ocsp.c     return (result == 0) ? Qtrue : Qfalse;
Qtrue             404 ext/openssl/ossl_pkcs7.c     if(flag != Qtrue && flag != Qfalse)
Qtrue             406 ext/openssl/ossl_pkcs7.c     if(!PKCS7_set_detached(p7, flag == Qtrue ? 1 : 0))
Qtrue             417 ext/openssl/ossl_pkcs7.c     return PKCS7_get_detached(p7) ? Qtrue : Qfalse;
Qtrue             425 ext/openssl/ossl_pkcs7.c     return PKCS7_is_detached(p7) ? Qtrue : Qfalse;
Qtrue             676 ext/openssl/ossl_pkcs7.c     return (ok == 1) ? Qtrue : Qfalse;
Qtrue              99 ext/openssl/ossl_pkey.c     if (rb_funcall(obj, id_private_q, 0, NULL) != Qtrue) {
Qtrue             123 ext/openssl/ossl_pkey.c     if (rb_funcall(obj, id_private_q, 0, NULL) != Qtrue) {
Qtrue             166 ext/openssl/ossl_pkey.c     if (rb_funcall(self, id_private_q, 0, NULL) != Qtrue) {
Qtrue             198 ext/openssl/ossl_pkey.c 	return Qtrue;
Qtrue              19 ext/openssl/ossl_pkey.h #define OSSL_PKEY_SET_PRIVATE(obj) rb_iv_set((obj), "private", Qtrue)
Qtrue              21 ext/openssl/ossl_pkey.h #define OSSL_PKEY_IS_PRIVATE(obj)  (rb_iv_get((obj), "private") == Qtrue)
Qtrue             171 ext/openssl/ossl_pkey_dh.c     return (pkey->pkey.dh->pub_key) ? Qtrue : Qfalse;
Qtrue             181 ext/openssl/ossl_pkey_dh.c     return (DH_PRIVATE(pkey->pkey.dh)) ? Qtrue : Qfalse;
Qtrue             307 ext/openssl/ossl_pkey_dh.c     return codes == 0 ? Qtrue : Qfalse;
Qtrue             177 ext/openssl/ossl_pkey_dsa.c     return (pkey->pkey.dsa->pub_key) ? Qtrue : Qfalse;
Qtrue             187 ext/openssl/ossl_pkey_dsa.c     return (DSA_PRIVATE(self, pkey->pkey.dsa)) ? Qtrue : Qfalse;
Qtrue             363 ext/openssl/ossl_pkey_dsa.c 	return Qtrue;
Qtrue             170 ext/openssl/ossl_pkey_rsa.c     return Qtrue;
Qtrue             180 ext/openssl/ossl_pkey_rsa.c     return (RSA_PRIVATE(self, pkey->pkey.rsa)) ? Qtrue : Qfalse;
Qtrue              47 ext/openssl/ossl_rand.c     return Qtrue;
Qtrue              57 ext/openssl/ossl_rand.c     return Qtrue;
Qtrue              94 ext/openssl/ossl_rand.c     return Qtrue;
Qtrue             105 ext/openssl/ossl_rand.c     return Qtrue;
Qtrue             194 ext/openssl/ossl_ssl.c     return Qtrue;
Qtrue             229 ext/openssl/ossl_ssl.c     return Qtrue;
Qtrue             403 ext/openssl/ossl_ssl.c     return Qtrue;
Qtrue             563 ext/openssl/ossl_ssl.c     return Qtrue;
Qtrue             497 ext/openssl/ossl_x509cert.c 	return Qtrue;
Qtrue             520 ext/openssl/ossl_x509cert.c     return Qtrue;
Qtrue             351 ext/openssl/ossl_x509crl.c 	return Qtrue;
Qtrue             397 ext/openssl/ossl_x509ext.c     return X509_EXTENSION_get_critical(ext) ? Qtrue : Qfalse;
Qtrue             266 ext/openssl/ossl_x509name.c     return (result == 0) ? Qtrue : Qfalse;
Qtrue             367 ext/openssl/ossl_x509req.c 	return Qtrue;
Qtrue             409 ext/openssl/ossl_x509store.c     return result ? Qtrue : Qfalse;
Qtrue             259 ext/racc/cparse/cparse.c     v->lex_is_iterator = Qtrue;
Qtrue             363 ext/racc/cparse/cparse.c         v->use_result_var = Qtrue;
Qtrue             670 ext/readline/readline.c     return history_length == 0 ? Qtrue : Qfalse;
Qtrue              73 ext/sdbm/init.c 	return Qtrue;
Qtrue              75 ext/sdbm/init.c 	return Qtrue;
Qtrue             523 ext/sdbm/init.c     if (i == 0) return Qtrue;
Qtrue             632 ext/sdbm/init.c     if (val.dptr) return Qtrue;
Qtrue             653 ext/sdbm/init.c 	    return Qtrue;
Qtrue             523 ext/socket/socket.c     return (fptr->mode & FMODE_NOREVLOOKUP) ? Qtrue : Qfalse;
Qtrue             644 ext/socket/socket.c     return do_not_reverse_lookup?Qtrue:Qfalse;
Qtrue            1607 ext/socket/socket.c 	    return Qtrue;
Qtrue             440 ext/stringio/stringio.c     return Qtrue;
Qtrue             455 ext/stringio/stringio.c     return Qtrue;
Qtrue             470 ext/stringio/stringio.c     return Qtrue;
Qtrue             487 ext/stringio/stringio.c     return Qtrue;
Qtrue             674 ext/stringio/stringio.c     return Qtrue;
Qtrue             847 ext/strscan/strscan.c     if (p->curr == 0) return Qtrue;
Qtrue             848 ext/strscan/strscan.c     return (*(CURPTR(p) - 1) == '\n') ? Qtrue : Qfalse;
Qtrue             868 ext/strscan/strscan.c     return EOS_P(p) ? Qtrue : Qfalse;
Qtrue             898 ext/strscan/strscan.c     return EOS_P(p) ? Qfalse : Qtrue;
Qtrue             917 ext/strscan/strscan.c     return MATCHED_P(p) ? Qtrue : Qfalse;
Qtrue             171 ext/syck/rubyext.c     int taint = Qtrue;
Qtrue             370 ext/syck/rubyext.c                 obj = Qtrue;
Qtrue             110 ext/syslog/syslog.c     return syslog_opened ? Qtrue : Qfalse;
Qtrue             600 ext/tk/tcltklib.c         return Qtrue;
Qtrue             849 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue             925 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue             960 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            1159 ext/tk/tcltklib.c         return Qtrue;   /* is eventloop */
Qtrue            1170 ext/tk/tcltklib.c         return Qtrue;
Qtrue            1240 ext/tk/tcltklib.c         return Qtrue;
Qtrue            1298 ext/tk/tcltklib.c         rb_thread_critical = Qtrue;
Qtrue            1641 ext/tk/tcltklib.c         return Qtrue;
Qtrue            1791 ext/tk/tcltklib.c         check_rootwidget = Qtrue;
Qtrue            1793 ext/tk/tcltklib.c         check_rootwidget = Qtrue;
Qtrue            1907 ext/tk/tcltklib.c         check_rootwidget = Qtrue;
Qtrue            1909 ext/tk/tcltklib.c         check_rootwidget = Qtrue;
Qtrue            2091 ext/tk/tcltklib.c         return Qtrue;
Qtrue            2132 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            2212 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            2303 ext/tk/tcltklib.c         rb_thread_critical = Qtrue;
Qtrue            2356 ext/tk/tcltklib.c         rb_thread_critical = Qtrue;
Qtrue            2441 ext/tk/tcltklib.c       rb_thread_critical = Qtrue;
Qtrue            2536 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            3122 ext/tk/tcltklib.c         rb_thread_critical = Qtrue;
Qtrue            3141 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            3178 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            3222 ext/tk/tcltklib.c         rb_thread_critical = Qtrue;
Qtrue            3358 ext/tk/tcltklib.c         rb_thread_critical = Qtrue;
Qtrue            3380 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            3423 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            3438 ext/tk/tcltklib.c         rb_thread_critical = Qtrue;
Qtrue            3465 ext/tk/tcltklib.c         rb_thread_critical = Qtrue;
Qtrue            3503 ext/tk/tcltklib.c         rb_thread_critical = Qtrue;
Qtrue            3567 ext/tk/tcltklib.c             rb_thread_critical = Qtrue;
Qtrue            3584 ext/tk/tcltklib.c         rb_thread_critical = Qtrue;
Qtrue            3600 ext/tk/tcltklib.c         rb_thread_critical = Qtrue;
Qtrue            3791 ext/tk/tcltklib.c         rb_thread_critical = Qtrue;
Qtrue            3817 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            3854 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            3927 ext/tk/tcltklib.c         rb_thread_critical = Qtrue;
Qtrue            3950 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            3994 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            4014 ext/tk/tcltklib.c         rb_thread_critical = Qtrue;
Qtrue            4047 ext/tk/tcltklib.c         rb_thread_critical = Qtrue;
Qtrue            4065 ext/tk/tcltklib.c         rb_thread_critical = Qtrue;
Qtrue            4110 ext/tk/tcltklib.c         rb_thread_critical = Qtrue;
Qtrue            4154 ext/tk/tcltklib.c         rb_thread_critical = Qtrue;
Qtrue            4273 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            4324 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            4381 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            4444 ext/tk/tcltklib.c         rb_thread_critical = Qtrue;
Qtrue            4651 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            4892 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            4999 ext/tk/tcltklib.c       return Qtrue;
Qtrue            5149 ext/tk/tcltklib.c         return Qtrue;
Qtrue            5168 ext/tk/tcltklib.c         return Qtrue;
Qtrue            5207 ext/tk/tcltklib.c         return Qtrue;
Qtrue            5238 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            5264 ext/tk/tcltklib.c         return Qtrue;
Qtrue            5269 ext/tk/tcltklib.c         return Qtrue;
Qtrue            5285 ext/tk/tcltklib.c         return Qtrue;
Qtrue            5302 ext/tk/tcltklib.c         return Qtrue;
Qtrue            5494 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            5593 ext/tk/tcltklib.c       rb_thread_critical = Qtrue;
Qtrue            5791 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            5811 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            5891 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            6013 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            6155 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            6301 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            6562 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            6701 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            6891 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            7017 ext/tk/tcltklib.c         rb_thread_critical = Qtrue;
Qtrue            7147 ext/tk/tcltklib.c         rb_thread_critical = Qtrue;
Qtrue            7277 ext/tk/tcltklib.c         return Qtrue;
Qtrue            7290 ext/tk/tcltklib.c     return Qtrue;
Qtrue            7441 ext/tk/tcltklib.c         rb_thread_critical = Qtrue;
Qtrue            7539 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue            7605 ext/tk/tcltklib.c     rb_thread_critical = Qtrue;
Qtrue             291 ext/tk/tkutil/tkutil.c                     dst_enc = Qtrue;
Qtrue             338 ext/tk/tkutil/tkutil.c                         dst_enc = Qtrue;
Qtrue             358 ext/tk/tkutil/tkutil.c                         dst_enc = Qtrue;
Qtrue             369 ext/tk/tkutil/tkutil.c             if (rb_obj_respond_to(self, ID_toUTF8, Qtrue)) {
Qtrue             453 ext/tk/tkutil/tkutil.c                     dst_enc = Qtrue;
Qtrue             463 ext/tk/tkutil/tkutil.c             if (rb_obj_respond_to(self, ID_toUTF8, Qtrue)) {
Qtrue             563 ext/tk/tkutil/tkutil.c                 = get_eval_string_core(RARRAY(pair)->ptr[2], Qtrue, self);
Qtrue             583 ext/tk/tkutil/tkutil.c                 = get_eval_string_core(val, Qtrue, self);
Qtrue             656 ext/tk/tkutil/tkutil.c         rb_ary_push(ary, get_eval_string_core(val, Qtrue,
Qtrue             665 ext/tk/tkutil/tkutil.c         = get_eval_string_core(val, Qtrue, RARRAY(args)->ptr[1]);
Qtrue             782 ext/tk/tkutil/tkutil.c             if (rb_obj_respond_to(self, ID_toUTF8, Qtrue)) {
Qtrue             793 ext/tk/tkutil/tkutil.c             if (rb_obj_respond_to(self, ID_toUTF8, Qtrue)) {
Qtrue             835 ext/tk/tkutil/tkutil.c             if (rb_obj_respond_to(self, ID_install_cmd, Qtrue)) {
Qtrue             844 ext/tk/tkutil/tkutil.c         if (rb_obj_respond_to(obj, ID_to_eval, Qtrue)) {
Qtrue             848 ext/tk/tkutil/tkutil.c         } else if (rb_obj_respond_to(obj, ID_path, Qtrue)) {
Qtrue             852 ext/tk/tkutil/tkutil.c         } else if (rb_obj_respond_to(obj, ID_to_s, Qtrue)) {
Qtrue             886 ext/tk/tkutil/tkutil.c         return get_eval_string_core(obj, Qtrue, self);
Qtrue             906 ext/tk/tkutil/tkutil.c     rb_thread_critical = Qtrue;
Qtrue             950 ext/tk/tkutil/tkutil.c             return Qtrue;
Qtrue             971 ext/tk/tkutil/tkutil.c         return Qtrue;
Qtrue            1389 ext/tk/tkutil/tkutil.c         rb_attr(self, SYM2ID(RARRAY(inf)->ptr[2]), 1, 0, Qtrue);
Qtrue            1439 ext/tk/tkutil/tkutil.c     rb_thread_critical = Qtrue;
Qtrue              65 ext/win32ole/win32ole.c     if(gOLEInitialized == Qtrue) {\
Qtrue             622 ext/win32ole/win32ole.c         gOLEInitialized = Qtrue;
Qtrue            1215 ext/win32ole/win32ole.c             obj = (*V_BOOLREF(pvar) ? Qtrue : Qfalse);
Qtrue            1217 ext/win32ole/win32ole.c             obj = (V_BOOL(pvar) ? Qtrue : Qfalse);
Qtrue            3745 ext/win32ole/win32ole.c             found = Qtrue;
Qtrue            3904 ext/win32ole/win32ole.c         found = Qtrue;
Qtrue            3948 ext/win32ole/win32ole.c                 found = Qtrue;
Qtrue            4394 ext/win32ole/win32ole.c         return Qtrue;
Qtrue            4398 ext/win32ole/win32ole.c         visible = Qtrue;
Qtrue            4994 ext/win32ole/win32ole.c         visible = Qtrue;
Qtrue            5429 ext/win32ole/win32ole.c         visible = Qtrue;
Qtrue            5511 ext/win32ole/win32ole.c                 event = Qtrue;
Qtrue            5560 ext/win32ole/win32ole.c     if(folemethod_event(self) == Qtrue) {
Qtrue            6005 ext/win32ole/win32ole.c         ret = Qtrue;
Qtrue            6367 ext/win32ole/win32ole.c     if (rb_ary_entry(event, 3) == Qtrue) {
Qtrue            6839 ext/win32ole/win32ole.c     return ev_on_event(argc, argv, self, Qtrue);
Qtrue             786 ext/zlib/zlib.c 	    return Qtrue;
Qtrue             802 ext/zlib/zlib.c 	return Qtrue;
Qtrue            1087 ext/zlib/zlib.c     return ZSTREAM_IS_FINISHED(get_zstream(obj)) ? Qtrue : Qfalse;
Qtrue            1099 ext/zlib/zlib.c     return ZSTREAM_IS_READY(z) ? Qfalse : Qtrue;
Qtrue            1629 ext/zlib/zlib.c 	return Qtrue;
Qtrue            1878 ext/zlib/zlib.c     return Qtrue;
Qtrue            2650 ext/zlib/zlib.c     return NIL_P(gz->io) ? Qtrue : Qfalse;
Qtrue            2661 ext/zlib/zlib.c     return GZFILE_IS_FINISHED(gz) ? Qtrue : Qfalse;
Qtrue            2671 ext/zlib/zlib.c     return (get_gzfile(obj)->z.flags & GZFILE_FLAG_SYNC) ? Qtrue : Qfalse;
Qtrue             793 file.c         	return Qtrue;
Qtrue             810 file.c         		return Qtrue;
Qtrue             893 file.c             if (S_ISDIR(st.st_mode)) return Qtrue;
Qtrue             915 file.c             if (S_ISFIFO(st.st_mode)) return Qtrue;
Qtrue             951 file.c             if (S_ISLNK(st.st_mode)) return Qtrue;
Qtrue             985 file.c             if (S_ISSOCK(st.st_mode)) return Qtrue;
Qtrue            1013 file.c             if (S_ISBLK(st.st_mode)) return Qtrue;
Qtrue            1035 file.c             if (S_ISCHR(st.st_mode)) return Qtrue;
Qtrue            1055 file.c             return Qtrue;
Qtrue            1072 file.c             return Qtrue;
Qtrue            1089 file.c             return Qtrue;
Qtrue            1142 file.c             return Qtrue;
Qtrue            1159 file.c             return Qtrue;
Qtrue            1204 file.c             return Qtrue;
Qtrue            1221 file.c             return Qtrue;
Qtrue            1242 file.c             if (S_ISREG(st.st_mode)) return Qtrue;
Qtrue            1260 file.c             if (st.st_size == 0) return Qtrue;
Qtrue            1297 file.c             if (st.st_uid == geteuid()) return Qtrue;
Qtrue            1307 file.c             if (st.st_uid == getuid()) return Qtrue;
Qtrue            1327 file.c             if (st.st_gid == getegid()) return Qtrue;
Qtrue            1341 file.c             if (st.st_mode & mode) return Qtrue;
Qtrue            1442 file.c         	return Qtrue;
Qtrue            1458 file.c             return Qtrue;
Qtrue            3225 file.c         	return RTEST(argv[0]) ? Qtrue : Qfalse;
Qtrue            3334 file.c         	    if (st1.st_mtime == st2.st_mtime) return Qtrue;
Qtrue            3338 file.c         	    if (st1.st_mtime > st2.st_mtime) return Qtrue;
Qtrue            3342 file.c         	    if (st1.st_mtime < st2.st_mtime) return Qtrue;
Qtrue            3462 file.c             if (S_ISDIR(get_stat(obj)->st_mode)) return Qtrue;
Qtrue            3478 file.c             if (S_ISFIFO(get_stat(obj)->st_mode)) return Qtrue;
Qtrue            3505 file.c             if (S_ISLNK(get_stat(obj)->st_mode)) return Qtrue;
Qtrue            3526 file.c             if (S_ISSOCK(get_stat(obj)->st_mode)) return Qtrue;
Qtrue            3549 file.c             if (S_ISBLK(get_stat(obj)->st_mode)) return Qtrue;
Qtrue            3570 file.c             if (S_ISCHR(get_stat(obj)->st_mode)) return Qtrue;
Qtrue            3590 file.c             if (get_stat(obj)->st_uid == geteuid()) return Qtrue;
Qtrue            3597 file.c             if (get_stat(obj)->st_uid == getuid()) return Qtrue;
Qtrue            3617 file.c             if (get_stat(obj)->st_gid == getegid()) return Qtrue;
Qtrue            3640 file.c         	return st->st_mode & S_IRUSR ? Qtrue : Qfalse;
Qtrue            3644 file.c         	return st->st_mode & S_IRGRP ? Qtrue : Qfalse;
Qtrue            3649 file.c             return Qtrue;
Qtrue            3672 file.c         	return st->st_mode & S_IRUSR ? Qtrue : Qfalse;
Qtrue            3676 file.c         	return st->st_mode & S_IRGRP ? Qtrue : Qfalse;
Qtrue            3681 file.c             return Qtrue;
Qtrue            3728 file.c         	return st->st_mode & S_IWUSR ? Qtrue : Qfalse;
Qtrue            3732 file.c         	return st->st_mode & S_IWGRP ? Qtrue : Qfalse;
Qtrue            3737 file.c             return Qtrue;
Qtrue            3758 file.c         	return st->st_mode & S_IWUSR ? Qtrue : Qfalse;
Qtrue            3762 file.c         	return st->st_mode & S_IWGRP ? Qtrue : Qfalse;
Qtrue            3767 file.c             return Qtrue;
Qtrue            3816 file.c         	return st->st_mode & S_IXUSR ? Qtrue : Qfalse;
Qtrue            3820 file.c         	return st->st_mode & S_IXGRP ? Qtrue : Qfalse;
Qtrue            3825 file.c             return Qtrue;
Qtrue            3844 file.c         	return st->st_mode & S_IXUSR ? Qtrue : Qfalse;
Qtrue            3848 file.c         	return st->st_mode & S_IXGRP ? Qtrue : Qfalse;
Qtrue            3853 file.c             return Qtrue;
Qtrue            3870 file.c             if (S_ISREG(get_stat(obj)->st_mode)) return Qtrue;
Qtrue            3888 file.c             if (get_stat(obj)->st_size == 0) return Qtrue;
Qtrue            3927 file.c             if (get_stat(obj)->st_mode & S_ISUID) return Qtrue;
Qtrue            3948 file.c             if (get_stat(obj)->st_mode & S_ISGID) return Qtrue;
Qtrue            3969 file.c             if (get_stat(obj)->st_mode & S_ISVTX) return Qtrue;
Qtrue            4063 file.c         	if (!path_check_0(rb_str_new(p0, p - p0), Qtrue)) {
Qtrue             232 gc.c               dont_gc = Qtrue;
Qtrue             605 gc.c           	    return Qtrue;
Qtrue            1281 gc.c           	return Qtrue;
Qtrue            1359 gc.c               return Qtrue;
Qtrue            1777 gc.c               rb_thread_critical = Qtrue;
Qtrue            1885 gc.c               if (ptr == Qtrue) return Qtrue;
Qtrue             920 hash.c         	return Qtrue;
Qtrue            1279 hash.c         	return Qtrue;
Qtrue            1289 hash.c         	data[0] = Qtrue;
Qtrue            1346 hash.c             if (hash1 == hash2) return Qtrue;
Qtrue            1362 hash.c             data.result = Qtrue;
Qtrue            1905 hash.c             return env_each_i(ehash, Qtrue);
Qtrue            2082 hash.c         	return Qtrue;
Qtrue            2097 hash.c             if (getenv(s)) return Qtrue;
Qtrue            2115 hash.c         		return Qtrue;
Qtrue             478 io.c           	return Qtrue;
Qtrue             492 io.c           	return Qtrue;
Qtrue             521 io.c           	return Qtrue;
Qtrue             535 io.c           	return Qtrue;
Qtrue             948 io.c               return Qtrue;
Qtrue             970 io.c               return (fptr->mode & FMODE_SYNC) ? Qtrue : Qfalse;
Qtrue            1506 io.c           	    if (*p != term) return Qtrue;
Qtrue            1517 io.c           	    return Qtrue;
Qtrue            1976 io.c               return Qtrue;
Qtrue            2033 io.c           	rb_io_fptr_cleanup(fptr, Qtrue);
Qtrue            2126 io.c               return 0 <= fptr->fd ? Qfalse : Qtrue;
Qtrue            4193 io.c               return Qtrue;
Qtrue            4613 io.c               else if (arg == Qtrue) {
Qtrue            5101 io.c           	if (init_p == 0) return Qtrue;
Qtrue            5104 io.c           	    return Qtrue;
Qtrue             377 marshal.c          w_extended(klass, arg, Qtrue);
Qtrue             432 marshal.c          else if (obj == Qtrue) {
Qtrue             456 marshal.c      	if (OBJ_TAINTED(obj)) arg->taint = Qtrue;
Qtrue             586 marshal.c      	    w_class(TYPE_STRUCT, obj, arg, Qtrue);
Qtrue             602 marshal.c      	    w_class(TYPE_OBJECT, obj, arg, Qtrue);
Qtrue             610 marshal.c      		w_class(TYPE_DATA, obj, arg, Qtrue);
Qtrue             838 marshal.c      	if (OBJ_TAINTED(str)) arg->taint = Qtrue;
Qtrue             950 marshal.c      	    int ivar = Qtrue;
Qtrue             998 marshal.c      	v = Qtrue;
Qtrue            1216 marshal.c      	       static int warn = Qtrue;
Qtrue            1330 marshal.c      	arg.taint = Qtrue;
Qtrue             144 numeric.c          return Qtrue;
Qtrue             150 numeric.c          do_coerce(&x, &y, Qtrue);
Qtrue             227 numeric.c          do_coerce(&zero, &num, Qtrue);
Qtrue             362 numeric.c          return Qtrue;
Qtrue             411 numeric.c      	return Qtrue;
Qtrue             782 numeric.c          if (x == y) return Qtrue;
Qtrue             819 numeric.c          return (a == b)?Qtrue:Qfalse;
Qtrue             921 numeric.c          return (a > b)?Qtrue:Qfalse;
Qtrue             956 numeric.c          return (a >= b)?Qtrue:Qfalse;
Qtrue             990 numeric.c          return (a < b)?Qtrue:Qfalse;
Qtrue            1025 numeric.c          return (a <= b)?Qtrue:Qfalse;
Qtrue            1047 numeric.c      	if (a == b) return Qtrue;
Qtrue            1095 numeric.c      	return Qtrue;
Qtrue            1118 numeric.c          return isnan(value) ? Qtrue : Qfalse;
Qtrue            1168 numeric.c          return Qtrue;
Qtrue            1693 numeric.c          return Qtrue;
Qtrue            2100 numeric.c          return fix_divide(x, y, Qtrue);
Qtrue            2238 numeric.c      	return (FIX2LONG(x) == FIX2LONG(y))?Qtrue:Qfalse;
Qtrue            2244 numeric.c      	return (double)FIX2LONG(x) == RFLOAT(y)->value ? Qtrue : Qfalse;
Qtrue            2293 numeric.c      	if (a > b) return Qtrue;
Qtrue            2298 numeric.c      	return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) > 0 ? Qtrue : Qfalse;
Qtrue            2300 numeric.c      	return (double)FIX2LONG(x) > RFLOAT(y)->value ? Qtrue : Qfalse;
Qtrue            2320 numeric.c      	if (a >= b) return Qtrue;
Qtrue            2325 numeric.c      	return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) >= 0 ? Qtrue : Qfalse;
Qtrue            2327 numeric.c      	return (double)FIX2LONG(x) >= RFLOAT(y)->value ? Qtrue : Qfalse;
Qtrue            2347 numeric.c      	if (a < b) return Qtrue;
Qtrue            2352 numeric.c      	return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) < 0 ? Qtrue : Qfalse;
Qtrue            2354 numeric.c      	return (double)FIX2LONG(x) < RFLOAT(y)->value ? Qtrue : Qfalse;
Qtrue            2374 numeric.c      	if (a <= b) return Qtrue;
Qtrue            2379 numeric.c      	return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) <= 0 ? Qtrue : Qfalse;
Qtrue            2381 numeric.c      	return (double)FIX2LONG(x) <= RFLOAT(y)->value ? Qtrue : Qfalse;
Qtrue            2784 numeric.c      	return Qtrue;
Qtrue              50 object.c           if (obj1 == obj2) return Qtrue;
Qtrue              52 object.c           if (RTEST(result)) return Qtrue;
Qtrue              94 object.c           if (obj1 == obj2) return Qtrue;
Qtrue             396 object.c           if (rb_obj_class(obj) == c) return Qtrue;
Qtrue             444 object.c       	    return Qtrue;
Qtrue             574 object.c       	return Qtrue;
Qtrue             673 object.c           if (OBJ_FROZEN(obj)) return Qtrue;
Qtrue             823 object.c           return RTEST(obj2)?Qtrue:Qfalse;
Qtrue             845 object.c           return Qtrue;
Qtrue             861 object.c           return RTEST(obj2)?Qfalse:Qtrue;
Qtrue             917 object.c           return RTEST(obj2)?Qtrue:Qfalse;
Qtrue             936 object.c           return RTEST(obj2)?Qtrue:Qfalse;
Qtrue             949 object.c           return Qtrue;
Qtrue            1205 object.c           if (mod == arg) return Qtrue;
Qtrue            1215 object.c       	    return Qtrue;
Qtrue            1562 object.c           rb_attr(klass, rb_to_id(name), 1, RTEST(pub), Qtrue);
Qtrue            1581 object.c       	rb_attr(klass, rb_to_id(argv[i]), 1, 0, Qtrue);
Qtrue            1600 object.c       	rb_attr(klass, rb_to_id(argv[i]), 0, 1, Qtrue);
Qtrue            1624 object.c       	rb_attr(klass, rb_to_id(argv[i]), 1, 1, Qtrue);
Qtrue            1721 object.c       	args[0] = Qtrue;
Qtrue            1751 object.c       	args[0] = Qtrue;
Qtrue            1772 object.c       	args[0] = Qtrue;
Qtrue            1793 object.c       	args[0] = Qtrue;
Qtrue            1925 object.c       		     val == Qtrue ? "true" :
Qtrue            1943 object.c           v = convert_type(val, tname, method, Qtrue);
Qtrue            1973 object.c           VALUE v = convert_type(val, "Integer", method, Qtrue);
Qtrue            2016 object.c       	return rb_str_to_inum(val, 0, Qtrue);
Qtrue            2156 object.c       	return rb_float_new(rb_str_to_dbl(val, Qtrue));
Qtrue            2538 object.c           rb_define_global_const("TRUE", Qtrue);
Qtrue            1812 parse.y        			    $1->nd_lit = rb_range_new($1->nd_lit, $3->nd_lit, Qtrue);
Qtrue            4714 parse.y        		parser->eofp = Qtrue;
Qtrue            5315 parse.y            if (strncmp(eos, p, len) == 0) return Qtrue;
Qtrue            5564 parse.y            return Qtrue;
Qtrue            5663 parse.y        	fallthru = Qtrue;
Qtrue            5683 parse.y        	command_start = Qtrue;
Qtrue            5739 parse.y        		int first_p = Qtrue;
Qtrue            6388 parse.y        	command_start = Qtrue;
Qtrue            7431 parse.y        	    return Qtrue;
Qtrue            7435 parse.y            return Qtrue;
Qtrue            7651 parse.y        	return Qtrue;
Qtrue            7838 parse.y            long state = Qtrue;
Qtrue            7847 parse.y        	    state = Qtrue;
Qtrue            8066 parse.y        	if (lvtbl->tbl[i] == id) return Qtrue;
Qtrue            8347 parse.y        	if (is_special_global_name(++m)) return Qtrue;
Qtrue            8405 parse.y            return *m ? Qfalse : Qtrue;
Qtrue            8559 parse.y            if (is_const_id(id)) return Qtrue;
Qtrue            8566 parse.y            if (is_class_id(id)) return Qtrue;
Qtrue            8573 parse.y            if (is_instance_id(id)) return Qtrue;
Qtrue            8580 parse.y            if (is_local_id(id)) return Qtrue;
Qtrue            8587 parse.y            if (is_junk_id(id)) return Qtrue;
Qtrue            8670 parse.y            parser->parser_command_start = Qtrue;
Qtrue            8685 parse.y            parser->toplevel_p = Qtrue;
Qtrue            8767 parse.y            return ruby__end__seen ? Qtrue : Qfalse;
Qtrue            8843 parse.y            if (x == Qtrue) return x;
Qtrue            9139 parse.y            return ripper_yydebug ? Qtrue : Qfalse;
Qtrue             326 process.c          if (st1 == st2) return Qtrue;
Qtrue             388 process.c      	return Qtrue;
Qtrue             427 process.c      	return Qtrue;
Qtrue             468 process.c      	return Qtrue;
Qtrue             519 process.c          return WEXITSTATUS(status) == EXIT_SUCCESS ? Qtrue : Qfalse;
Qtrue             538 process.c      	return Qtrue;
Qtrue            1464 process.c      	  case Qtrue:
Qtrue            1509 process.c      	overriding = Qtrue;
Qtrue            1510 process.c      	hooked = Qtrue;
Qtrue            1600 process.c          if (status == EXIT_SUCCESS) return Qtrue;
Qtrue            2503 process.c      	return Qtrue;
Qtrue            3193 process.c          return Qtrue;
Qtrue            3195 process.c          return Qtrue;
Qtrue            3250 process.c          return Qtrue;
Qtrue            3252 process.c          return Qtrue;
Qtrue            3308 process.c          return Qtrue;
Qtrue            3418 process.c          return Qtrue;
Qtrue              19 range.c        #define SET_EXCL(r,v) rb_ivar_set((r), id_excl, (v) ? Qtrue : Qfalse)
Qtrue              97 range.c            return EXCL(range) ? Qtrue : Qfalse;
Qtrue             118 range.c            if (range == obj) return Qtrue;
Qtrue             129 range.c            return Qtrue;
Qtrue             138 range.c            if (rb_cmpint(r, a, b) < 0) return Qtrue;
Qtrue             151 range.c            if (c < 0) return Qtrue;
Qtrue             173 range.c            if (range == obj) return Qtrue;
Qtrue             184 range.c            return Qtrue;
Qtrue             539 range.c            return Qtrue;
Qtrue             632 range.c        		if (r_lt(val, end)) return Qtrue;
Qtrue             635 range.c        		if (r_le(val, end)) return Qtrue;
Qtrue             666 range.c        	    if (r_lt(val, end)) return Qtrue;
Qtrue             669 range.c        	    if (r_le(val, end)) return Qtrue;
Qtrue             532 re.c               if (RREGEXP(re)->ptr->options & ONIG_OPTION_IGNORECASE) return Qtrue;
Qtrue             964 re.c               return Qtrue;
Qtrue            1376 re.c               rb_reg_initialize(re, s, len, options, Qtrue);
Qtrue            1452 re.c               if (re1 == re2) return Qtrue;
Qtrue            1459 re.c           	return Qtrue;
Qtrue            1538 re.c               return Qtrue;
Qtrue            2129 re.c               return ruby_ignorecase?Qtrue:Qfalse;
Qtrue             407 ruby.c         	    v = Qtrue;
Qtrue             416 ruby.c         		    hyphen = Qtrue;
Qtrue             494 ruby.c         	    do_split = Qtrue;
Qtrue             499 ruby.c         	    do_print = Qtrue;
Qtrue             502 ruby.c         	    do_loop = Qtrue;
Qtrue             507 ruby.c         	    ruby_debug = Qtrue;
Qtrue             508 ruby.c         	    ruby_verbose = Qtrue;
Qtrue             525 ruby.c         	    ruby_verbose = Qtrue;
Qtrue             545 ruby.c         		    ruby_verbose = Qtrue; break;
Qtrue             551 ruby.c         	    do_check = Qtrue;
Qtrue             566 ruby.c         	    do_line = Qtrue;
Qtrue             573 ruby.c         	    do_search = Qtrue;
Qtrue             613 ruby.c         	    xflag = Qtrue;
Qtrue             700 ruby.c         		ruby_debug = Qtrue;
Qtrue             701 ruby.c                         ruby_verbose = Qtrue;
Qtrue             707 ruby.c         		ruby_verbose = Qtrue;
Qtrue            1132 ruby.c             ruby_verbose = RTEST(val) ? Qtrue : val;
Qtrue            1140 ruby.c             if (ruby_verbose == Qtrue) return INT2FIX(2);
Qtrue             673 ruby.h         	if (obj == Qtrue)  return rb_cTrueClass;
Qtrue             688 ruby.h         	if (obj == Qtrue) return T_TRUE;
Qtrue             702 ruby.h             if (SPECIAL_CONST_P(obj)) return Qtrue;
Qtrue             504 sprintf.c      		    val = rb_str_to_inum(val, 0, Qtrue);
Qtrue             328 string.c       	return Qtrue;
Qtrue             849 string.c           if (str1 == str2) return Qtrue;
Qtrue             858 string.c       	return Qtrue;
Qtrue             878 string.c       	return Qtrue;
Qtrue            2235 string.c       	    return Qtrue;
Qtrue            2243 string.c           return Qtrue;
Qtrue            3234 string.c       	awk_split = Qtrue;
Qtrue            3240 string.c       		awk_split = Qtrue;
Qtrue             729 struct.c           if (s == s2) return Qtrue;
Qtrue             739 struct.c           return Qtrue;
Qtrue             777 struct.c           if (s == s2) return Qtrue;
Qtrue             787 struct.c           return Qtrue;
Qtrue             207 time.c             return time_timeval(time, Qtrue);
Qtrue             797 time.c             return time_utc_or_local(argc, argv, Qtrue, klass);
Qtrue             937 time.c         	    if (tobj1->tv.tv_usec == tobj2->tv.tv_usec) return Qtrue;
Qtrue             968 time.c             if (tobj->gmt) return Qtrue;
Qtrue            1496 time.c             return (tobj->tm.tm_wday == (n)) ? Qtrue : Qfalse;\
Qtrue            1638 time.c             return tobj->tm.tm_isdst?Qtrue:Qfalse;
Qtrue            1770 time.c         		    tobj->tm.tm_isdst?Qtrue:Qfalse,
Qtrue            2015 time.c         	sec = make_time_t(&tm, Qtrue);
Qtrue             690 variable.c         return Qtrue;
Qtrue             827 variable.c     	return Qtrue;
Qtrue             940 variable.c         return ivar_get(obj, id, Qtrue);
Qtrue             977 variable.c     	    return Qtrue;
Qtrue            1312 variable.c         return rb_const_get_0(klass, id, Qtrue, Qtrue);
Qtrue            1318 variable.c         return rb_const_get_0(klass, id, Qfalse, Qtrue);
Qtrue            1324 variable.c         return rb_const_get_0(klass, id, Qtrue, Qfalse);
Qtrue            1450 variable.c     	    return Qtrue;
Qtrue            1466 variable.c         return rb_const_defined_0(klass, id, Qtrue, Qtrue);
Qtrue            1472 variable.c         return rb_const_defined_0(klass, id, Qfalse, Qtrue);
Qtrue            1478 variable.c         return rb_const_defined_0(klass, id, Qtrue, Qfalse);
Qtrue            1516 variable.c         mod_av_set(klass, id, val, Qtrue);
Qtrue            1563 variable.c     	return Qtrue;
Qtrue            1596 variable.c         rb_cvar_set(klass, id, val, Qtrue);


QualifierNode

QualifierNode     981 regcomp.c            QualifierNode* qn = &NQUALIFIER(node->target);
QualifierNode    1071 regcomp.c            QualifierNode* qn = &NQUALIFIER(node->target);
QualifierNode    1693 regcomp.c            QualifierNode* qn = &(NQUALIFIER(node));
QualifierNode    1817 regcomp.c            QualifierNode* qn = &(NQUALIFIER(node));
QualifierNode    1938 regcomp.c            QualifierNode* qn = &(NQUALIFIER(node));
QualifierNode    2045 regcomp.c            QualifierNode* qn = &(NQUALIFIER(node));
QualifierNode    2380 regcomp.c            QualifierNode* qn = &(NQUALIFIER(node));
QualifierNode    2911 regcomp.c          QualifierNode* qn = &(NQUALIFIER(node));
QualifierNode    3127 regcomp.c            QualifierNode* qn = &(NQUALIFIER(node));
QualifierNode    3190 regcomp.c      	  QualifierNode* tqn = &(NQUALIFIER(target));
QualifierNode    3231 regcomp.c      	    QualifierNode* tqn = &(NQUALIFIER(target));
QualifierNode    4192 regcomp.c            QualifierNode* qn = &(NQUALIFIER(node));
QualifierNode    2116 regparse.c       QualifierNode *p, *c;
QualifierNode    4468 regparse.c       QualifierNode* qn;
QualifierNode    4492 regparse.c           QualifierNode* qnt = &(NQUALIFIER(target));
QualifierNode     228 regparse.h         QualifierNode qualifier;


Qundef

Qundef            985 array.c            if (rpl == Qundef) {
Qundef           1846 array.c        	rb_ary_splice(ary, pos, len, Qundef);	/* Qnil/rb_ary_new2(0) */
Qundef            159 enum.c             VALUE memo = Qundef;
Qundef            165 enum.c             if (memo != Qundef) {
Qundef            307 enum.c             if (*memo == Qundef) {
Qundef            350 enum.c             VALUE memo = Qundef;
Qundef            353 enum.c         	memo = Qundef;
Qundef            355 enum.c             if (memo == Qundef) return Qnil;
Qundef            639 enum.c         	if (*memo == Qundef) {
Qundef            653 enum.c         	if (*memo == Qundef) {
Qundef            682 enum.c             VALUE result = Qundef;
Qundef            685 enum.c             if (result == Qundef) return Qfalse;
Qundef            738 enum.c             if (*memo == Qundef) {
Qundef            755 enum.c             if (*memo == Qundef) {
Qundef            785 enum.c             VALUE result = Qundef;
Qundef            788 enum.c             if (result == Qundef) return Qnil;
Qundef            797 enum.c             if (*memo == Qundef) {
Qundef            814 enum.c             if (*memo == Qundef) {
Qundef            843 enum.c             VALUE result = Qundef;
Qundef            846 enum.c             if (result == Qundef) return Qnil;
Qundef            856 enum.c             if (memo[0] == Qundef) {
Qundef            885 enum.c             memo[0] = Qundef;
Qundef            897 enum.c             if (memo[0] == Qundef) {
Qundef            926 enum.c             memo[0] = Qundef;
Qundef            205 error.c            if (x == Qundef) {
Qundef           1682 eval.c             if (val == Qundef) val = prot_tag->retval;
Qundef           1771 eval.c         		if (result == Qundef && NIL_P(rb_autoload_p((VALUE)klass, id))) {
Qundef           1794 eval.c         		if (result == Qundef) {
Qundef           2557 eval.c         		    Qundef, 0);
Qundef           2579 eval.c         	return Qundef;
Qundef           2599 eval.c             if (v == Qundef) return rb_ary_new2(0);
Qundef           2619 eval.c             if (v == Qundef) return rb_values_new2(0, 0);
Qundef           2635 eval.c         	return Qundef;
Qundef           2679 eval.c           if ((prot_tag->retval = (v)) == Qundef) {\
Qundef           3070 eval.c         	if (result == Qundef) result = Qnil;
Qundef           3079 eval.c         	    result = Qundef;	/* no arg */
Qundef           4589 eval.c             if (retval == Qundef) retval = Qnil;
Qundef           4615 eval.c             if (retval == Qundef) retval = Qnil;
Qundef           4750 eval.c         		else if (val == Qundef) {
Qundef           4801 eval.c         		if (val == Qundef && node->nd_state != YIELD_FUNC_SVALUE)
Qundef           4913 eval.c         	return rb_yield_0(Qundef, 0, 0, 0, Qfalse);
Qundef           4932 eval.c         	    values = Qundef;
Qundef           4959 eval.c         	rb_yield_0(Qundef, 0, 0, 0, Qfalse);
Qundef           5012 eval.c             if (val == Qundef) {
Qundef           6353 eval.c             if (args[0] == Qundef) {
Qundef           6377 eval.c         	return yield_under(klass, self, Qundef);
Qundef           6631 eval.c             if (state) jump_tag_but_local_jump(state, Qundef);
Qundef           7507 eval.c             proc_invoke(data, rb_ary_new2(0), Qundef, 0);
Qundef           8205 eval.c             volatile VALUE result = Qundef;
Qundef           8231 eval.c             if (self != Qundef) _block.frame.self = self;
Qundef           8249 eval.c         	result = rb_yield_0(args, self, (self!=Qundef)?CLASS_OF(self):0,
Qundef           8270 eval.c         	if (!pcall && result != Qundef) {
Qundef           8274 eval.c         	if (result != Qundef) {
Qundef           8321 eval.c             return proc_invoke(proc, args, Qundef, 0);
Qundef           8769 eval.c             data->recv = Qundef;
Qundef           8848 eval.c             return mnew(mod, Qundef, rb_to_id(vid), rb_cUnboundMethod);
Qundef           8890 eval.c             if (data->recv == Qundef) {
Qundef           9150 eval.c         	if (data->recv == Qundef) {
Qundef            186 ext/iconv/iconv.c 	if (opt->transliterate != Qundef) {
Qundef            193 ext/iconv/iconv.c 	if (opt->discard_ilseq != Qundef) {
Qundef            522 ext/iconv/iconv.c     opt->transliterate = Qundef;
Qundef            523 ext/iconv/iconv.c     opt->discard_ilseq = Qundef;
Qundef            209 ext/tk/tkutil/tkutil.c     if (key == Qundef) return ST_CONTINUE;
Qundef            604 ext/tk/tkutil/tkutil.c     if (key == Qundef) return ST_CONTINUE;
Qundef            652 ext/tk/tkutil/tkutil.c     if (key == Qundef) return ST_CONTINUE;
Qundef           1173 ext/tk/tkutil/tkutil.c     if (key == Qundef) return ST_CONTINUE;
Qundef             57 hash.c             if (a == Qundef || b == Qundef) return -1;
Qundef            113 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef            147 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef            154 hash.c         	st_delete_safe(tbl, (st_data_t*)&key, 0, Qundef);
Qundef            171 hash.c         	    st_cleanup_safe(RHASH(hash)->tbl, Qundef);
Qundef            333 hash.c             if (key != Qundef) st_insert(tbl, key, value);
Qundef            605 hash.c         	if (st_delete_safe(RHASH(hash)->tbl, (st_data_t*)&key, &val, Qundef)) {
Qundef            627 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef            671 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef            734 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef            849 hash.c             if (key != Qundef) {
Qundef            927 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef            959 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef            990 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef           1023 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef           1059 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef           1115 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef           1201 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef           1232 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef           1287 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef           1329 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef           1396 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef           1425 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef           1433 hash.c             if (key == Qundef) return ST_CONTINUE;
Qundef           2212 hash.c             if (key != Qundef) {
Qundef           2242 hash.c             if (key != Qundef) {
Qundef            390 parse.y        #define arg_add_optblock(l,b) ((b)==Qundef? l : dispatch2(arglist_add_block, l, b))
Qundef            407 parse.y        #define method_optarg(m,a) ((a)==Qundef ? m : dispatch2(method_add_arg,m,a))
Qundef            409 parse.y        #define escape_Qundef(x) ((x)==Qundef ? Qnil : (x))
Qundef           6861 parse.y            parser->parser_yylval->val = Qundef;
Qundef           8845 parse.y            if (x == Qundef)
Qundef           9259 parse.y            if (obj == Qundef) {
Qundef           1426 process.c      	    rb_protect(rb_yield, Qundef, &status);
Qundef            690 ruby.h         	if (obj == Qundef) return T_UNDEF;
Qundef            410 signal.c           else if (trap_list[sig].cmd == Qundef) {
Qundef            599 signal.c       		    arg->cmd = Qundef;
Qundef            102 sprintf.c      #define GETARG() (nextvalue != Qundef ? nextvalue : \
Qundef            284 sprintf.c      	nextvalue = Qundef;
Qundef            333 sprintf.c      		if (nextvalue != Qundef) {
Qundef           1176 variable.c         if ((tbl = RCLASS(mod)->iv_tbl) && st_lookup(tbl, id, &av) && av != Qundef)
Qundef           1179 variable.c         rb_const_set(mod, id, Qundef);
Qundef           1271 variable.c         if (!tbl || !st_lookup(tbl, id, &val) || val != Qundef) {
Qundef           1287 variable.c     	    if (value == Qundef) {
Qundef           1350 variable.c     	if (val == Qundef) {
Qundef           1448 variable.c     	    if (value == Qundef && NIL_P(autoload_file(klass, id)))
Qundef           1503 variable.c     	    if (value == Qundef)


R

R                 164 ext/digest/sha2/sha2.c #define sigma0_256(x)	(S32(7,  (x)) ^ S32(18, (x)) ^ R(3 ,   (x)))
R                 165 ext/digest/sha2/sha2.c #define sigma1_256(x)	(S32(17, (x)) ^ S32(19, (x)) ^ R(10,   (x)))
R                 170 ext/digest/sha2/sha2.c #define sigma0_512(x)	(S64( 1, (x)) ^ S64( 8, (x)) ^ R( 7,   (x)))
R                 171 ext/digest/sha2/sha2.c #define sigma1_512(x)	(S64(19, (x)) ^ S64(61, (x)) ^ R( 6,   (x)))
R                 649 missing/crypt.c 	LOADREG(R,R0,R1,L,L0,L1);
R                 658 missing/crypt.c 	PERM3264(R,R0,R1,B.b+4,(C_block *)IE3264);	/* odd bits */
R                 469 util.c           char *R = (char*)base + size*(nel-1); /* right end of current region */
R                 480 util.c           POP(L,R);
R                 484 util.c             if (L + size == R) {       /* 2 elements */
R                 485 util.c               if ((*cmp)(L,R,d) > 0) mmswap(L,R); goto nxt;
R                 488 util.c             l = L; r = R;
R                 603 util.c         	if (l-L < R-r) {PUSH(r,R); R = l;} /* sort left side first */
R                 605 util.c               else R = l;                          /* need to sort left side only */


R0

R0                 82 ext/digest/sha1/sha1.c #define nR0(v,w,x,y,z,i) R0(*v,*w,*x,*y,*z,i)
R0                167 ext/digest/sha1/sha1.c     R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3);
R0                168 ext/digest/sha1/sha1.c     R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7);
R0                169 ext/digest/sha1/sha1.c     R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11);
R0                170 ext/digest/sha1/sha1.c     R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15);
R0                627 missing/crypt.c 	register long L0, L1, R0, R1, k;
R0                649 missing/crypt.c 	LOADREG(R,R0,R1,L,L0,L1);
R0                653 missing/crypt.c 	R0 &= 0xaaaaaaaaL;
R0                655 missing/crypt.c 	L1 = R0 | R1;		/* L1 is the odd-numbered input bits */
R0                658 missing/crypt.c 	PERM3264(R,R0,R1,B.b+4,(C_block *)IE3264);	/* odd bits */
R0                705 missing/crypt.c 			CRUNCH(L0, L1, R0, R1);
R0                706 missing/crypt.c 			CRUNCH(R0, R1, L0, L1);
R0                712 missing/crypt.c 		L0 ^= R0;  L1 ^= R1;
R0                713 missing/crypt.c 		R0 ^= L0;  R1 ^= L1;
R0                714 missing/crypt.c 		L0 ^= R0;  L1 ^= R1;
R0                719 missing/crypt.c 	L1 = ((R0 >> 3) & 0x0f0f0f0fL) | ((R1 << 1) & 0xf0f0f0f0L);


R1

R1                 83 ext/digest/sha1/sha1.c #define nR1(v,w,x,y,z,i) R1(*v,*w,*x,*y,*z,i)
R1                171 ext/digest/sha1/sha1.c     R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19);
R1                627 missing/crypt.c 	register long L0, L1, R0, R1, k;
R1                649 missing/crypt.c 	LOADREG(R,R0,R1,L,L0,L1);
R1                654 missing/crypt.c 	R1 = (R1 >> 1) & 0x55555555L;
R1                655 missing/crypt.c 	L1 = R0 | R1;		/* L1 is the odd-numbered input bits */
R1                658 missing/crypt.c 	PERM3264(R,R0,R1,B.b+4,(C_block *)IE3264);	/* odd bits */
R1                705 missing/crypt.c 			CRUNCH(L0, L1, R0, R1);
R1                706 missing/crypt.c 			CRUNCH(R0, R1, L0, L1);
R1                712 missing/crypt.c 		L0 ^= R0;  L1 ^= R1;
R1                713 missing/crypt.c 		R0 ^= L0;  R1 ^= L1;
R1                714 missing/crypt.c 		L0 ^= R0;  L1 ^= R1;
R1                719 missing/crypt.c 	L1 = ((R0 >> 3) & 0x0f0f0f0fL) | ((R1 << 1) & 0xf0f0f0f0L);


R2

R2                 84 ext/digest/sha1/sha1.c #define nR2(v,w,x,y,z,i) R2(*v,*w,*x,*y,*z,i)
R2                172 ext/digest/sha1/sha1.c     R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23);
R2                173 ext/digest/sha1/sha1.c     R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27);
R2                174 ext/digest/sha1/sha1.c     R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31);
R2                175 ext/digest/sha1/sha1.c     R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35);
R2                176 ext/digest/sha1/sha1.c     R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39);


R3

R3                 85 ext/digest/sha1/sha1.c #define nR3(v,w,x,y,z,i) R3(*v,*w,*x,*y,*z,i)
R3                177 ext/digest/sha1/sha1.c     R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43);
R3                178 ext/digest/sha1/sha1.c     R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47);
R3                179 ext/digest/sha1/sha1.c     R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51);
R3                180 ext/digest/sha1/sha1.c     R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55);
R3                181 ext/digest/sha1/sha1.c     R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59);


R4

R4                 86 ext/digest/sha1/sha1.c #define nR4(v,w,x,y,z,i) R4(*v,*w,*x,*y,*z,i)
R4                182 ext/digest/sha1/sha1.c     R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63);
R4                183 ext/digest/sha1/sha1.c     R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67);
R4                184 ext/digest/sha1/sha1.c     R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71);
R4                185 ext/digest/sha1/sha1.c     R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75);
R4                186 ext/digest/sha1/sha1.c     R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79);


RANGE_NUM_MAX

RANGE_NUM_MAX    3517 ext/nkf/nkf-utf8/nkf.c     STATIC const int range[RANGE_NUM_MAX][2] = {
RANGE_NUM_MAX    3549 ext/nkf/nkf-utf8/nkf.c     for (i = 0; i < RANGE_NUM_MAX; i++) {


RANY

RANY              393 gc.c               RANY(obj)->file = ruby_sourcefile;
RANY              394 gc.c               RANY(obj)->line = ruby_sourceline;
RANY              594 gc.c               register RVALUE *p = RANY(ptr);
RANY              688 gc.c               obj = RANY(ptr);
RANY              718 gc.c               register RVALUE *obj = RANY(ptr);
RANY              723 gc.c               obj = RANY(ptr);
RANY             1090 gc.c               RANY(p)->as.free.flags = 0;
RANY             1091 gc.c               RANY(p)->as.free.next = freelist;
RANY             1092 gc.c               freelist = RANY(p);
RANY             1098 gc.c               switch (RANY(obj)->as.basic.flags & T_MASK) {
RANY             1111 gc.c               switch (RANY(obj)->as.basic.flags & T_MASK) {
RANY             1113 gc.c           	if (RANY(obj)->as.object.iv_tbl) {
RANY             1114 gc.c           	    st_free_table(RANY(obj)->as.object.iv_tbl);
RANY             1120 gc.c           	st_free_table(RANY(obj)->as.klass.m_tbl);
RANY             1121 gc.c           	if (RANY(obj)->as.object.iv_tbl) {
RANY             1122 gc.c           	    st_free_table(RANY(obj)->as.object.iv_tbl);
RANY             1126 gc.c           	if (RANY(obj)->as.string.ptr && !FL_TEST(obj, ELTS_SHARED)) {
RANY             1127 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.string.ptr));
RANY             1131 gc.c           	if (RANY(obj)->as.array.ptr && !FL_TEST(obj, ELTS_SHARED)) {
RANY             1132 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.array.ptr));
RANY             1136 gc.c           	if (RANY(obj)->as.hash.tbl) {
RANY             1137 gc.c           	    st_free_table(RANY(obj)->as.hash.tbl);
RANY             1141 gc.c           	if (RANY(obj)->as.regexp.ptr) {
RANY             1142 gc.c           	    onig_free(RANY(obj)->as.regexp.ptr);
RANY             1144 gc.c           	if (RANY(obj)->as.regexp.str) {
RANY             1145 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.regexp.str));
RANY             1150 gc.c           	    if ((long)RANY(obj)->as.data.dfree == -1) {
RANY             1153 gc.c           	    else if (RANY(obj)->as.data.dfree) {
RANY             1154 gc.c           		(*RANY(obj)->as.data.dfree)(DATA_PTR(obj));
RANY             1159 gc.c           	if (RANY(obj)->as.match.regs) {
RANY             1160 gc.c           	    onig_region_free(RANY(obj)->as.match.regs, 0);
RANY             1161 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.match.regs));
RANY             1165 gc.c           	if (RANY(obj)->as.file.fptr) {
RANY             1166 gc.c           	    rb_io_fptr_finalize(RANY(obj)->as.file.fptr);
RANY             1179 gc.c           	if (RANY(obj)->as.bignum.digits) {
RANY             1180 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.bignum.digits));
RANY             1186 gc.c           	    if (RANY(obj)->as.node.u1.tbl) {
RANY             1187 gc.c           		RUBY_CRITICAL(free(RANY(obj)->as.node.u1.tbl));
RANY             1191 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.node.u1.node));
RANY             1197 gc.c           	if (RANY(obj)->as.scope.local_vars &&
RANY             1198 gc.c                       RANY(obj)->as.scope.flags != SCOPE_ALLOCA) {
RANY             1199 gc.c           	    VALUE *vars = RANY(obj)->as.scope.local_vars-1;
RANY             1201 gc.c           		RUBY_CRITICAL(free(RANY(obj)->as.scope.local_tbl));
RANY             1202 gc.c           	    if (RANY(obj)->as.scope.flags & SCOPE_MALLOC)
RANY             1208 gc.c           	if (RANY(obj)->as.rstruct.ptr) {
RANY             1209 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.rstruct.ptr));
RANY             1215 gc.c           	       RANY(obj)->as.basic.flags & T_MASK, obj);
RANY             1837 gc.c           		DATA_PTR(p) && RANY(p)->as.data.dfree &&
RANY             1838 gc.c           		RANY(p)->as.basic.klass != rb_cThread) {
RANY             1840 gc.c           		if ((long)RANY(p)->as.data.dfree == -1) {
RANY             1843 gc.c           		else if (RANY(p)->as.data.dfree) {
RANY             1844 gc.c           		    (*RANY(p)->as.data.dfree)(DATA_PTR(p));
RANY             1848 gc.c           		if (rb_io_fptr_finalize(RANY(p)->as.file.fptr)) {


RARRAY

RARRAY             61 array.c        	ptr = ALLOC_N(VALUE, RARRAY(ary)->len);
RARRAY             63 array.c        	RARRAY(ary)->aux.capa = RARRAY(ary)->len;
RARRAY             64 array.c        	MEMCPY(ptr, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
RARRAY             65 array.c        	RARRAY(ary)->ptr = ptr;
RARRAY            118 array.c            RARRAY(ary)->ptr = ALLOC_N(VALUE, len);
RARRAY            119 array.c            RARRAY(ary)->aux.capa = len;
RARRAY            150 array.c        	RARRAY(ary)->ptr[i] = va_arg(ar, VALUE);
RARRAY            154 array.c            RARRAY(ary)->len = n;
RARRAY            165 array.c        	MEMCPY(RARRAY(ary)->ptr, elts, VALUE, n);
RARRAY            167 array.c            RARRAY(ary)->len = n;
RARRAY            182 array.c        	RARRAY(val)->ptr[i] = va_arg(ar, VALUE);
RARRAY            185 array.c            RARRAY(val)->len = n;
RARRAY            197 array.c        	RARRAY(val)->len = n;
RARRAY            198 array.c        	MEMCPY(RARRAY(val)->ptr, elts, VALUE, n);
RARRAY            211 array.c        	shared->len = RARRAY(ary)->len;
RARRAY            212 array.c        	shared->ptr = RARRAY(ary)->ptr;
RARRAY            213 array.c        	shared->aux.capa = RARRAY(ary)->aux.capa;
RARRAY            214 array.c        	RARRAY(ary)->aux.shared = (VALUE)shared;
RARRAY            220 array.c        	return RARRAY(ary)->aux.shared;
RARRAY            230 array.c            RARRAY(val)->ptr = RARRAY(ary)->ptr;
RARRAY            231 array.c            RARRAY(val)->len = RARRAY(ary)->len;
RARRAY            232 array.c            RARRAY(val)->aux.shared = RARRAY(ary)->aux.shared;
RARRAY            320 array.c        	RARRAY(ary)->len = 0;
RARRAY            343 array.c            if (len > RARRAY(ary)->aux.capa) {
RARRAY            344 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, len);
RARRAY            345 array.c        	RARRAY(ary)->aux.capa = len;
RARRAY            355 array.c        	    RARRAY(ary)->len = i + 1;
RARRAY            359 array.c        	memfill(RARRAY(ary)->ptr, len, val);
RARRAY            360 array.c        	RARRAY(ary)->len = len;
RARRAY            381 array.c        	RARRAY(ary)->ptr = ALLOC_N(VALUE, argc);
RARRAY            382 array.c        	MEMCPY(RARRAY(ary)->ptr, argv, VALUE, argc);
RARRAY            384 array.c            RARRAY(ary)->len = RARRAY(ary)->aux.capa = argc;
RARRAY            393 array.c        	idx += RARRAY(ary)->len;
RARRAY            396 array.c        		    idx - RARRAY(ary)->len);
RARRAY            401 array.c            if (idx >= RARRAY(ary)->aux.capa) {
RARRAY            402 array.c        	long new_capa = RARRAY(ary)->aux.capa / 2;
RARRAY            411 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, new_capa);
RARRAY            412 array.c        	RARRAY(ary)->aux.capa = new_capa;
RARRAY            414 array.c            if (idx > RARRAY(ary)->len) {
RARRAY            415 array.c        	rb_mem_clear(RARRAY(ary)->ptr + RARRAY(ary)->len,
RARRAY            416 array.c        		     idx-RARRAY(ary)->len + 1);
RARRAY            419 array.c            if (idx >= RARRAY(ary)->len) {
RARRAY            420 array.c        	RARRAY(ary)->len = idx + 1;
RARRAY            422 array.c            RARRAY(ary)->ptr[idx] = val;
RARRAY            433 array.c            if (n > RARRAY(ary)->len) {
RARRAY            434 array.c        	n = RARRAY(ary)->len;
RARRAY            440 array.c            RARRAY(result)->len = n;
RARRAY            449 array.c            RARRAY(result)->ptr += RARRAY(ary)->len - RARRAY(result)->len;
RARRAY            469 array.c            rb_ary_store(ary, RARRAY(ary)->len, item);
RARRAY            499 array.c            if (RARRAY(ary)->len == 0) return Qnil;
RARRAY            501 array.c        	    RARRAY(ary)->len * 2 < RARRAY(ary)->aux.capa &&
RARRAY            502 array.c        	    RARRAY(ary)->aux.capa > ARY_DEFAULT_SIZE) {
RARRAY            503 array.c        	RARRAY(ary)->aux.capa = RARRAY(ary)->len * 2;
RARRAY            504 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->aux.capa);
RARRAY            506 array.c            return RARRAY(ary)->ptr[--RARRAY(ary)->len];
RARRAY            534 array.c            RARRAY(ary)->len -= RARRAY(result)->len;
RARRAY            544 array.c            if (RARRAY(ary)->len == 0) return Qnil;
RARRAY            545 array.c            top = RARRAY(ary)->ptr[0];
RARRAY            547 array.c            RARRAY(ary)->ptr++;		/* shift ptr */
RARRAY            548 array.c            RARRAY(ary)->len--;
RARRAY            583 array.c            n = RARRAY(result)->len;
RARRAY            584 array.c            RARRAY(ary)->ptr += n;
RARRAY            585 array.c            RARRAY(ary)->len -= n;
RARRAY            594 array.c            if (RARRAY(ary)->len == RARRAY(ary)->aux.capa) {
RARRAY            595 array.c        	long capa_inc = RARRAY(ary)->aux.capa / 2;
RARRAY            599 array.c        	RARRAY(ary)->aux.capa += capa_inc;
RARRAY            600 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->aux.capa);
RARRAY            604 array.c            MEMMOVE(RARRAY(ary)->ptr + 1, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
RARRAY            606 array.c            RARRAY(ary)->len++;
RARRAY            607 array.c            RARRAY(ary)->ptr[0] = item;
RARRAY            627 array.c            long len = RARRAY(ary)->len;
RARRAY            635 array.c            MEMMOVE(RARRAY(ary)->ptr + argc, RARRAY(ary)->ptr, VALUE, len);
RARRAY            636 array.c            MEMCPY(RARRAY(ary)->ptr, argv, VALUE, argc);
RARRAY            645 array.c            if (RARRAY(ary)->len == 0) return Qnil;
RARRAY            646 array.c            if (offset < 0 || RARRAY(ary)->len <= offset) {
RARRAY            649 array.c            return RARRAY(ary)->ptr[offset];
RARRAY            656 array.c        	offset += RARRAY(ary)->len;
RARRAY            667 array.c            if (beg > RARRAY(ary)->len) return Qnil;
RARRAY            670 array.c            if (beg + len > RARRAY(ary)->len) {
RARRAY            671 array.c        	len = RARRAY(ary)->len - beg;
RARRAY            679 array.c            ptr = RARRAY(ary)->ptr;
RARRAY            681 array.c            RARRAY(ary2)->ptr = ptr + beg;
RARRAY            682 array.c            RARRAY(ary2)->len = len;
RARRAY            683 array.c            RARRAY(ary2)->aux.shared = shared;
RARRAY            731 array.c        	    beg += RARRAY(ary)->len;
RARRAY            744 array.c            switch (rb_range_beg_len(arg, &beg, &len, RARRAY(ary)->len, 0)) {
RARRAY            794 array.c        	if (RARRAY(ary)->len == 0) return Qnil;
RARRAY            795 array.c        	return RARRAY(ary)->ptr[0];
RARRAY            819 array.c        	if (RARRAY(ary)->len == 0) return Qnil;
RARRAY            820 array.c        	return RARRAY(ary)->ptr[RARRAY(ary)->len-1];
RARRAY            862 array.c        	idx +=  RARRAY(ary)->len;
RARRAY            864 array.c            if (idx < 0 || RARRAY(ary)->len <= idx) {
RARRAY            871 array.c            return RARRAY(ary)->ptr[idx];
RARRAY            898 array.c        	for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY            899 array.c        	    if (RTEST(rb_yield(RARRAY(ary)->ptr[i]))) {
RARRAY            905 array.c        	for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY            906 array.c        	    if (rb_equal(RARRAY(ary)->ptr[i], val))
RARRAY            932 array.c            long i = RARRAY(ary)->len;
RARRAY            937 array.c        	    if (RTEST(rb_yield(RARRAY(ary)->ptr[i])))
RARRAY            939 array.c        	    if (i > RARRAY(ary)->len) {
RARRAY            940 array.c        		i = RARRAY(ary)->len;
RARRAY            946 array.c        	    if (rb_equal(RARRAY(ary)->ptr[i], val))
RARRAY            948 array.c        	    if (i > RARRAY(ary)->len) {
RARRAY            949 array.c        		i = RARRAY(ary)->len;
RARRAY            975 array.c        	beg += RARRAY(ary)->len;
RARRAY            977 array.c        	    beg -= RARRAY(ary)->len;
RARRAY            981 array.c            if (beg + len > RARRAY(ary)->len) {
RARRAY            982 array.c        	len = RARRAY(ary)->len - beg;
RARRAY            990 array.c        	rlen = RARRAY(rpl)->len;
RARRAY            994 array.c            if (beg >= RARRAY(ary)->len) {
RARRAY            996 array.c        	if (len >= RARRAY(ary)->aux.capa) {
RARRAY            997 array.c        	    REALLOC_N(RARRAY(ary)->ptr, VALUE, len);
RARRAY            998 array.c        	    RARRAY(ary)->aux.capa = len;
RARRAY           1000 array.c        	rb_mem_clear(RARRAY(ary)->ptr + RARRAY(ary)->len, beg - RARRAY(ary)->len);
RARRAY           1002 array.c        	    MEMCPY(RARRAY(ary)->ptr + beg, RARRAY(rpl)->ptr, VALUE, rlen);
RARRAY           1004 array.c        	RARRAY(ary)->len = len;
RARRAY           1009 array.c        	if (beg + len > RARRAY(ary)->len) {
RARRAY           1010 array.c        	    len = RARRAY(ary)->len - beg;
RARRAY           1013 array.c        	alen = RARRAY(ary)->len + rlen - len;
RARRAY           1014 array.c        	if (alen >= RARRAY(ary)->aux.capa) {
RARRAY           1015 array.c        	    REALLOC_N(RARRAY(ary)->ptr, VALUE, alen);
RARRAY           1016 array.c        	    RARRAY(ary)->aux.capa = alen;
RARRAY           1020 array.c        	    MEMMOVE(RARRAY(ary)->ptr + beg + rlen, RARRAY(ary)->ptr + beg + len,
RARRAY           1021 array.c        		    VALUE, RARRAY(ary)->len - (beg + len));
RARRAY           1022 array.c        	    RARRAY(ary)->len = alen;
RARRAY           1025 array.c        	    MEMMOVE(RARRAY(ary)->ptr + beg, RARRAY(rpl)->ptr, VALUE, rlen);
RARRAY           1074 array.c            if (rb_range_beg_len(argv[0], &beg, &len, RARRAY(ary)->len, 1)) {
RARRAY           1109 array.c        	pos = RARRAY(ary)->len;
RARRAY           1139 array.c            for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY           1140 array.c        	rb_yield(RARRAY(ary)->ptr[i]);
RARRAY           1166 array.c            for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY           1190 array.c            long len = RARRAY(ary)->len;
RARRAY           1194 array.c        	rb_yield(RARRAY(ary)->ptr[len]);
RARRAY           1195 array.c        	if (RARRAY(ary)->len < len) {
RARRAY           1196 array.c        	    len = RARRAY(ary)->len;
RARRAY           1214 array.c            return LONG2NUM(RARRAY(ary)->len);
RARRAY           1229 array.c            if (RARRAY(ary)->len == 0)
RARRAY           1237 array.c            VALUE dup = rb_ary_new2(RARRAY(ary)->len);
RARRAY           1240 array.c            MEMCPY(RARRAY(dup)->ptr, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
RARRAY           1241 array.c            RARRAY(dup)->len = RARRAY(ary)->len;
RARRAY           1264 array.c            if (RARRAY(ary)->len == 0) return rb_str_new(0, 0);
RARRAY           1267 array.c            for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY           1268 array.c        	tmp = rb_check_string_type(RARRAY(ary)->ptr[i]);
RARRAY           1273 array.c        	len += RSTRING(sep)->len * (RARRAY(ary)->len - 1);
RARRAY           1276 array.c            for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY           1277 array.c        	tmp = RARRAY(ary)->ptr[i];
RARRAY           1338 array.c            if (RARRAY(ary)->len == 0) return rb_str_new(0, 0);
RARRAY           1352 array.c            for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY           1353 array.c        	s = rb_inspect(RARRAY(ary)->ptr[i]);
RARRAY           1373 array.c            if (RARRAY(ary)->len == 0) return rb_str_new2("[]");
RARRAY           1389 array.c        	VALUE dup = rb_ary_new2(RARRAY(ary)->len);
RARRAY           1416 array.c            if (RARRAY(ary)->len > 1) {
RARRAY           1417 array.c        	p1 = RARRAY(ary)->ptr;
RARRAY           1418 array.c        	p2 = p1 + RARRAY(ary)->len - 1;	/* points last item */
RARRAY           1471 array.c            if (RARRAY(data->ary)->ptr != data->ptr || RARRAY(data->ary)->len != data->len) {
RARRAY           1517 array.c            data.ptr = RARRAY(ary)->ptr; data.len = RARRAY(ary)->len;
RARRAY           1518 array.c            ruby_qsort(RARRAY(ary)->ptr, RARRAY(ary)->len, sizeof(VALUE),
RARRAY           1550 array.c            if (RARRAY(ary)->len > 1) {
RARRAY           1602 array.c            collect = rb_ary_new2(RARRAY(ary)->len);
RARRAY           1603 array.c            for (i = 0; i < RARRAY(ary)->len; i++) {
RARRAY           1604 array.c        	rb_ary_push(collect, rb_yield(RARRAY(ary)->ptr[i]));
RARRAY           1630 array.c            for (i = 0; i < RARRAY(ary)->len; i++) {
RARRAY           1631 array.c        	rb_ary_store(ary, i, rb_yield(RARRAY(ary)->ptr[i]));
RARRAY           1683 array.c            return rb_get_values_at(ary, RARRAY(ary)->len, argc, argv, rb_ary_entry);
RARRAY           1705 array.c            result = rb_ary_new2(RARRAY(ary)->len);
RARRAY           1706 array.c            for (i = 0; i < RARRAY(ary)->len; i++) {
RARRAY           1707 array.c        	if (RTEST(rb_yield(RARRAY(ary)->ptr[i]))) {
RARRAY           1736 array.c            for (i1 = i2 = 0; i1 < RARRAY(ary)->len; i1++) {
RARRAY           1737 array.c        	VALUE e = RARRAY(ary)->ptr[i1];
RARRAY           1745 array.c            if (RARRAY(ary)->len == i2) {
RARRAY           1753 array.c            if (RARRAY(ary)->len > i2) {
RARRAY           1754 array.c        	RARRAY(ary)->len = i2;
RARRAY           1755 array.c        	if (i2 * 2 < RARRAY(ary)->aux.capa &&
RARRAY           1756 array.c        	    RARRAY(ary)->aux.capa > ARY_DEFAULT_SIZE) {
RARRAY           1757 array.c        	    REALLOC_N(RARRAY(ary)->ptr, VALUE, i2 * 2);
RARRAY           1758 array.c        	    RARRAY(ary)->aux.capa = i2 * 2;
RARRAY           1768 array.c            long i, len = RARRAY(ary)->len;
RARRAY           1778 array.c            del = RARRAY(ary)->ptr[pos];
RARRAY           1780 array.c        	RARRAY(ary)->ptr[pos] = RARRAY(ary)->ptr[i];
RARRAY           1782 array.c            RARRAY(ary)->len = pos;
RARRAY           1843 array.c        	    pos = RARRAY(ary)->len + pos;
RARRAY           1850 array.c            if (!FIXNUM_P(arg1) && rb_range_beg_len(arg1, &pos, &len, RARRAY(ary)->len, 1)) {
RARRAY           1874 array.c            for (i1 = i2 = 0; i1 < RARRAY(ary)->len; i1++) {
RARRAY           1875 array.c        	VALUE v = RARRAY(ary)->ptr[i1];
RARRAY           1882 array.c            if (RARRAY(ary)->len == i2) return Qnil;
RARRAY           1883 array.c            if (i2 < RARRAY(ary)->len)
RARRAY           1884 array.c        	RARRAY(ary)->len = i2;
RARRAY           1957 array.c        	for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY           1968 array.c            len = RARRAY(ary)->len;
RARRAY           1999 array.c            alen = RARRAY(ary)->len;
RARRAY           2004 array.c        	    elen = RARRAY(tmp)->len;
RARRAY           2010 array.c        	else if (elen != RARRAY(tmp)->len) {
RARRAY           2012 array.c        		     RARRAY(tmp)->len, elen);
RARRAY           2042 array.c            if (RARRAY(copy)->ptr && !FL_TEST(copy, ELTS_SHARED))
RARRAY           2043 array.c        	free(RARRAY(copy)->ptr);
RARRAY           2044 array.c            RARRAY(copy)->ptr = RARRAY(orig)->ptr;
RARRAY           2045 array.c            RARRAY(copy)->len = RARRAY(orig)->len;
RARRAY           2046 array.c            RARRAY(copy)->aux.shared = shared;
RARRAY           2066 array.c            RARRAY(ary)->len = 0;
RARRAY           2067 array.c            if (ARY_DEFAULT_SIZE * 2 < RARRAY(ary)->aux.capa) {
RARRAY           2068 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, ARY_DEFAULT_SIZE * 2);
RARRAY           2069 array.c        	RARRAY(ary)->aux.capa = ARY_DEFAULT_SIZE * 2;
RARRAY           2117 array.c        	len = RARRAY(ary)->len;
RARRAY           2120 array.c        	if (rb_range_beg_len(arg1, &beg, &len, RARRAY(ary)->len, 1)) {
RARRAY           2127 array.c        	    beg = RARRAY(ary)->len + beg;
RARRAY           2130 array.c        	len = NIL_P(arg2) ? RARRAY(ary)->len - beg : NUM2LONG(arg2);
RARRAY           2135 array.c            if (end > RARRAY(ary)->len) {
RARRAY           2136 array.c        	if (end >= RARRAY(ary)->aux.capa) {
RARRAY           2137 array.c        	    REALLOC_N(RARRAY(ary)->ptr, VALUE, end);
RARRAY           2138 array.c        	    RARRAY(ary)->aux.capa = end;
RARRAY           2140 array.c        	rb_mem_clear(RARRAY(ary)->ptr + RARRAY(ary)->len, end - RARRAY(ary)->len);
RARRAY           2141 array.c        	RARRAY(ary)->len = end;
RARRAY           2150 array.c        	    if (i>=RARRAY(ary)->len) break;
RARRAY           2151 array.c        	    RARRAY(ary)->ptr[i] = v;
RARRAY           2155 array.c        	p = RARRAY(ary)->ptr + beg;
RARRAY           2181 array.c            len = RARRAY(x)->len + RARRAY(y)->len;
RARRAY           2183 array.c            MEMCPY(RARRAY(z)->ptr, RARRAY(x)->ptr, VALUE, RARRAY(x)->len);
RARRAY           2184 array.c            MEMCPY(RARRAY(z)->ptr + RARRAY(x)->len, RARRAY(y)->ptr, VALUE, RARRAY(y)->len);
RARRAY           2185 array.c            RARRAY(z)->len = len;
RARRAY           2203 array.c            if (RARRAY(y)->len > 0) {
RARRAY           2204 array.c        	rb_ary_splice(x, RARRAY(x)->len, 0, y);
RARRAY           2241 array.c            if (LONG_MAX/len < RARRAY(ary)->len) {
RARRAY           2244 array.c            len *= RARRAY(ary)->len;
RARRAY           2247 array.c            RARRAY(ary2)->len = len;
RARRAY           2249 array.c            for (i=0; i<len; i+=RARRAY(ary)->len) {
RARRAY           2250 array.c        	MEMCPY(RARRAY(ary2)->ptr+i, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
RARRAY           2283 array.c            for (i = 0; i < RARRAY(ary)->len; ++i) {
RARRAY           2284 array.c        	v = RARRAY(ary)->ptr[i];
RARRAY           2286 array.c        	    RARRAY(v)->len > 0 &&
RARRAY           2287 array.c        	    rb_equal(RARRAY(v)->ptr[0], key))
RARRAY           2313 array.c            for (i = 0; i < RARRAY(ary)->len; ++i) {
RARRAY           2314 array.c        	v = RARRAY(ary)->ptr[i];
RARRAY           2316 array.c        	    RARRAY(v)->len > 1 &&
RARRAY           2317 array.c        	    rb_equal(RARRAY(v)->ptr[1], value))
RARRAY           2349 array.c            if (RARRAY(ary1)->len != RARRAY(ary2)->len) return Qfalse;
RARRAY           2350 array.c            for (i=0; i<RARRAY(ary1)->len; i++) {
RARRAY           2372 array.c            if (RARRAY(ary1)->len != RARRAY(ary2)->len) return Qfalse;
RARRAY           2373 array.c            for (i=0; i<RARRAY(ary1)->len; i++) {
RARRAY           2389 array.c            h = RARRAY(ary)->len;
RARRAY           2390 array.c            for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY           2392 array.c        	n = rb_hash(RARRAY(ary)->ptr[i]);
RARRAY           2430 array.c            for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY           2431 array.c        	if (rb_equal(RARRAY(ary)->ptr[i], item)) {
RARRAY           2465 array.c            len = RARRAY(ary1)->len;
RARRAY           2466 array.c            if (len > RARRAY(ary2)->len) {
RARRAY           2467 array.c        	len = RARRAY(ary2)->len;
RARRAY           2475 array.c            len = RARRAY(ary1)->len - RARRAY(ary2)->len;
RARRAY           2487 array.c            for (i=0; i<RARRAY(ary1)->len; i++) {
RARRAY           2488 array.c        	rb_hash_aset(hash, RARRAY(ary1)->ptr[i], Qtrue);
RARRAY           2491 array.c        	for (i=0; i<RARRAY(ary2)->len; i++) {
RARRAY           2492 array.c        	    rb_hash_aset(hash, RARRAY(ary2)->ptr[i], Qtrue);
RARRAY           2520 array.c            for (i=0; i<RARRAY(ary1)->len; i++) {
RARRAY           2521 array.c        	if (st_lookup(RHASH(hash)->tbl, RARRAY(ary1)->ptr[i], 0)) continue;
RARRAY           2545 array.c            ary3 = rb_ary_new2(RARRAY(ary1)->len < RARRAY(ary2)->len ?
RARRAY           2546 array.c        	    RARRAY(ary1)->len : RARRAY(ary2)->len);
RARRAY           2549 array.c            for (i=0; i<RARRAY(ary1)->len; i++) {
RARRAY           2578 array.c            ary3 = rb_ary_new2(RARRAY(ary1)->len+RARRAY(ary2)->len);
RARRAY           2581 array.c            for (i=0; i<RARRAY(ary1)->len; i++) {
RARRAY           2587 array.c            for (i=0; i<RARRAY(ary2)->len; i++) {
RARRAY           2618 array.c            if (RARRAY(ary)->len == RHASH(hash)->tbl->num_entries) {
RARRAY           2621 array.c            for (i=j=0; i<RARRAY(ary)->len; i++) {
RARRAY           2627 array.c            RARRAY(ary)->len = j;
RARRAY           2667 array.c            p = t = RARRAY(ary)->ptr;
RARRAY           2668 array.c            end = p + RARRAY(ary)->len;
RARRAY           2674 array.c            if (RARRAY(ary)->len == (p - RARRAY(ary)->ptr)) {
RARRAY           2677 array.c            RARRAY(ary)->len = RARRAY(ary)->aux.capa = (p - RARRAY(ary)->ptr);
RARRAY           2678 array.c            REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
RARRAY           2724 array.c        	for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY           2725 array.c        	    VALUE v = RARRAY(ary)->ptr[i];
RARRAY           2730 array.c        	VALUE *p = RARRAY(ary)->ptr;
RARRAY           2731 array.c        	VALUE *pend = p + RARRAY(ary)->len;
RARRAY           2746 array.c            long n, lim = idx + RARRAY(ary2)->len;
RARRAY           2790 array.c            while (i<RARRAY(ary)->len) {
RARRAY           2791 array.c        	VALUE ary2 = RARRAY(ary)->ptr[i];
RARRAY           1616 dir.c          	ary = dir_globs(RARRAY(ary)->len, RARRAY(ary)->ptr, flags);
RARRAY            522 enum.c         	ary  = rb_ary_new2(RARRAY(obj)->len);
RARRAY            529 enum.c             if (RARRAY(ary)->len > 1) {
RARRAY            530 enum.c         	ruby_qsort(RARRAY(ary)->ptr, RARRAY(ary)->len, sizeof(VALUE), sort_by_cmp, 0);
RARRAY            535 enum.c             for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY            536 enum.c         	RARRAY(ary)->ptr[i] = RNODE(RARRAY(ary)->ptr[i])->u2.value;
RARRAY           1009 enum.c             tmp = rb_ary_new2(RARRAY(args)->len + 1);
RARRAY           1011 enum.c             for (i=0; i<RARRAY(args)->len; i++) {
RARRAY           1012 enum.c         	rb_ary_push(tmp, rb_ary_entry(RARRAY(args)->ptr[i], idx));
RARRAY             41 enumerator.c   	argc = RARRAY(args)->len;
RARRAY             42 enumerator.c   	argv = RARRAY(args)->ptr;
RARRAY            137 enumerator.c       if (RARRAY(ary)->len == size) {
RARRAY            174 enumerator.c       if (RARRAY(ary)->len > 0) rb_yield(ary);
RARRAY            198 enumerator.c       if (RARRAY(ary)->len == size) {
RARRAY            202 enumerator.c       if (RARRAY(ary)->len == size) {
RARRAY            446 error.c        	for (i=0;i<RARRAY(bt)->len;i++) {
RARRAY            447 error.c        	    if (TYPE(RARRAY(bt)->ptr[i]) != T_STRING) {
RARRAY           1156 eval.c             else if (RARRAY(errat)->len == 0) {
RARRAY           1160 eval.c         	VALUE mesg = RARRAY(errat)->ptr[0];
RARRAY           1216 eval.c         	struct RArray *ep = RARRAY(errat);
RARRAY           1222 eval.c         	ep = RARRAY(errat);
RARRAY           1723 eval.c         	    val = rb_funcall2(cmd, rb_intern("call"), RARRAY(arg)->len, RARRAY(arg)->ptr);
RARRAY           1848 eval.c             if (ruby_wrapper && RARRAY(ary)->len == 0) {
RARRAY           2138 eval.c         	argc = RARRAY(args)->len;\
RARRAY           2140 eval.c         	MEMCPY(argv, RARRAY(args)->ptr, VALUE, argc);\
RARRAY           2578 eval.c             if (RARRAY(tmp)->len == 0) {
RARRAY           2581 eval.c             if (RARRAY(tmp)->len == 1) {
RARRAY           2582 eval.c         	top = rb_check_array_type(RARRAY(tmp)->ptr[0]);
RARRAY           2584 eval.c         	    return RARRAY(tmp)->ptr[0];
RARRAY           2586 eval.c         	if (RARRAY(top)->len > 1) {
RARRAY           2604 eval.c             if (RARRAY(tmp)->len == 1) {
RARRAY           2605 eval.c         	top = rb_check_array_type(RARRAY(tmp)->ptr[0]);
RARRAY           2606 eval.c         	if (!NIL_P(top) && RARRAY(top)->len > 1) {
RARRAY           2634 eval.c             if (RARRAY(v)->len == 0) {
RARRAY           2637 eval.c             if (RARRAY(v)->len == 1) {
RARRAY           2638 eval.c         	return RARRAY(v)->ptr[0];
RARRAY           2843 eval.c         		    for (i=0; i<RARRAY(v)->len; i++) {
RARRAY           2844 eval.c         			if (RTEST(RARRAY(v)->ptr[i])) {
RARRAY           2884 eval.c         			for (i=0; i<RARRAY(v)->len; i++) {
RARRAY           2885 eval.c         			    if (RTEST(rb_funcall2(RARRAY(v)->ptr[i], eqq, 1, &val))){
RARRAY           3323 eval.c                                 RARRAY(RBASIC(ruby_scope)->klass)->len != argc) {
RARRAY           3327 eval.c                             argv = RARRAY(RBASIC(ruby_scope)->klass)->ptr;
RARRAY           3630 eval.c         		RARRAY(ary)->ptr[i++] = rb_eval(self, node->nd_head);
RARRAY           3631 eval.c         		RARRAY(ary)->len = i;
RARRAY           3646 eval.c         		RARRAY(val)->ptr[i++] = rb_eval(self, node->nd_head);
RARRAY           3647 eval.c         		RARRAY(val)->len = i;
RARRAY           4701 eval.c         		if (lambda && RARRAY(val)->len != 0) {
RARRAY           4703 eval.c         			     RARRAY(val)->len);
RARRAY           4707 eval.c         		if (TYPE(val) == T_ARRAY && RARRAY(val)->len != 0) {
RARRAY           4709 eval.c         			     RARRAY(val)->len);
RARRAY           4727 eval.c         		formal_assign(self, var, RARRAY(val)->len, RARRAY(val)->ptr, 0);
RARRAY           4739 eval.c         		    len = RARRAY(val)->len;
RARRAY           4744 eval.c         			val = RARRAY(val)->ptr[0];
RARRAY           4775 eval.c             else if (lambda && RARRAY(val)->len != 0 &&
RARRAY           4779 eval.c         		 RARRAY(val)->len);
RARRAY           4918 eval.c         	RARRAY(val)->ptr[i] = va_arg(args, VALUE);
RARRAY           4920 eval.c             RARRAY(val)->len = n;
RARRAY           4931 eval.c         	if (RARRAY(values)->len == 0) {
RARRAY           4971 eval.c             len = RARRAY(val)->len;
RARRAY           4974 eval.c         	assign(self, list->nd_head, RARRAY(val)->ptr[i], pcall);
RARRAY           4983 eval.c         	    assign(self, node->nd_args, rb_ary_new4(len-i, RARRAY(val)->ptr+i), pcall);
RARRAY           5091 eval.c         			RARRAY(args)->len, RARRAY(args)->ptr, scope);
RARRAY           5513 eval.c             i = node->nd_frml ? RARRAY(node->nd_frml)->len : 0;
RARRAY           5540 eval.c         	    dvar_asgn_curr(SYM2ID(RARRAY(a)->ptr[j]), argv[j]);
RARRAY           5606 eval.c         	argc = RARRAY(args)->len;
RARRAY           5607 eval.c         	argv = RARRAY(args)->ptr;
RARRAY           5825 eval.c             argc = RARRAY(args)->len; /* Assigns LONG, but argc is INT */
RARRAY           5827 eval.c             MEMCPY(argv, RARRAY(args)->ptr, VALUE, argc);
RARRAY           6052 eval.c             for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY           6053 eval.c         	printf("\tfrom %s\n", RSTRING(RARRAY(ary)->ptr[i])->ptr);
RARRAY           6208 eval.c         			rb_str_update(mesg, 0, 0, RARRAY(errat)->ptr[0]);
RARRAY           6210 eval.c         		    RARRAY(errat)->ptr[0] = RARRAY(backtrace(-2))->ptr[0];
RARRAY           6703 eval.c             for (i = 0; i < RARRAY(rb_features)->len; ++i) {
RARRAY           6704 eval.c         	v = RARRAY(rb_features)->ptr[i];
RARRAY           8214 eval.c             if (!pcall && RARRAY(args)->len == 1) {
RARRAY           8216 eval.c         	args = RARRAY(args)->ptr[0];
RARRAY           8233 eval.c             _block.frame.argc = RARRAY(tmp)->len;
RARRAY           9052 eval.c         	n = body->nd_frml ? RARRAY(body->nd_frml)->len : 0;
RARRAY           9202 eval.c             ret = rb_method_call(RARRAY(a)->len, RARRAY(a)->ptr, method);
RARRAY           10940 eval.c         	if (TYPE(oldbt) == T_ARRAY && RARRAY(oldbt)->len > 0) {
RARRAY             75 ext/Win32API/Win32API.c 	ptr = RARRAY(import)->ptr;
RARRAY             76 ext/Win32API/Win32API.c 	for (i = 0, len = RARRAY(import)->len; i < len; i++) {
RARRAY            110 ext/Win32API/Win32API.c     if (16 < RARRAY(a_import)->len) {
RARRAY            111 ext/Win32API/Win32API.c 	rb_raise(rb_eRuntimeError, "too many parameters: %d\n", RARRAY(a_import)->len);
RARRAY            162 ext/Win32API/Win32API.c     int nimport = RARRAY(obj_import)->len;
RARRAY            373 ext/dbm/dbm.c      for (i = 0; i < RARRAY(ary)->len; i++) {
RARRAY            374 ext/dbm/dbm.c  	keystr = RARRAY(ary)->ptr[i];
RARRAY            383 ext/dbm/dbm.c      if (n > 0) dbmp->di_size = n - RARRAY(ary)->len;
RARRAY            445 ext/dbm/dbm.c      if (RARRAY(pair)->len < 2) {
RARRAY            448 ext/dbm/dbm.c      fdbm_store(dbm, RARRAY(pair)->ptr[0], RARRAY(pair)->ptr[1]);
RARRAY            234 ext/dl/cfunc.c #define CALL_CASE switch( RARRAY(ary)->len ){ \
RARRAY            264 ext/dl/cfunc.c     for( i = 0; i < RARRAY(ary)->len; i++ ){
RARRAY            268 ext/dl/cfunc.c 	stack[i] = NUM2LONG(RARRAY(ary)->ptr[i]);
RARRAY            466 ext/gdbm/gdbm.c     for (i = 0; i < RARRAY(ary)->len; i++)
RARRAY            467 ext/gdbm/gdbm.c         rb_gdbm_delete(obj, RARRAY(ary)->ptr[i]);
RARRAY            469 ext/gdbm/gdbm.c     if (n > 0) dbmp->di_size = n - RARRAY(ary)->len;
RARRAY            547 ext/gdbm/gdbm.c     if (RARRAY(pair)->len < 2) {
RARRAY            550 ext/gdbm/gdbm.c     fgdbm_store(dbm, RARRAY(pair)->ptr[0], RARRAY(pair)->ptr[1]);
RARRAY            353 ext/iconv/iconv.c 		str = RARRAY(rescue)->len > 0 ? RARRAY(rescue)->ptr[0] : Qnil;
RARRAY            437 ext/iconv/iconv.c 		if ((len = RARRAY(rescue)->len) > 0)
RARRAY            438 ext/iconv/iconv.c 		    rb_str_concat(ret, RARRAY(rescue)->ptr[0]);
RARRAY            439 ext/iconv/iconv.c 		if (len > 1 && !NIL_P(str = RARRAY(rescue)->ptr[1])) {
RARRAY             62 ext/openssl/ossl.c     for (i = 0; i < RARRAY(ary)->len; i++) {
RARRAY            464 ext/openssl/ossl_ocsp.c 	for (i = 0; i < RARRAY(ext)->len; i++)
RARRAY            465 ext/openssl/ossl_ocsp.c 	    OSSL_Check_Kind(RARRAY(ext)->ptr[i], cX509Ext);
RARRAY            493 ext/openssl/ossl_ocsp.c 	for(i = 0; i < RARRAY(ext)->len; i++){
RARRAY            494 ext/openssl/ossl_ocsp.c 	    x509ext = DupX509ExtPtr(RARRAY(ext)->ptr[i]);
RARRAY            352 ext/openssl/ossl_ssl.c 	    for(i = 0; i < RARRAY(val)->len; i++){
RARRAY            353 ext/openssl/ossl_ssl.c 		client_ca = GetX509CertPtr(RARRAY(val)->ptr[i]);
RARRAY            462 ext/openssl/ossl_ssl.c         for (i = 0; i < RARRAY(v)->len; i++) {
RARRAY            467 ext/openssl/ossl_ssl.c             if (i < RARRAY(v)->len-1) rb_str_cat2(str, ":");
RARRAY            560 ext/openssl/ossl_x509cert.c     for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY            561 ext/openssl/ossl_x509cert.c 	OSSL_Check_Kind(RARRAY(ary)->ptr[i], cX509Ext);
RARRAY            566 ext/openssl/ossl_x509cert.c     for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY            567 ext/openssl/ossl_x509cert.c 	ext = DupX509ExtPtr(RARRAY(ary)->ptr[i]);
RARRAY            290 ext/openssl/ossl_x509crl.c     for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY            291 ext/openssl/ossl_x509crl.c 	OSSL_Check_Kind(RARRAY(ary)->ptr[i], cX509Rev);
RARRAY            296 ext/openssl/ossl_x509crl.c     for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY            297 ext/openssl/ossl_x509crl.c 	rev = DupX509RevokedPtr(RARRAY(ary)->ptr[i]);
RARRAY            464 ext/openssl/ossl_x509crl.c     for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY            465 ext/openssl/ossl_x509crl.c 	OSSL_Check_Kind(RARRAY(ary)->ptr[i], cX509Ext);
RARRAY            470 ext/openssl/ossl_x509crl.c     for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY            471 ext/openssl/ossl_x509crl.c 	ext = DupX509ExtPtr(RARRAY(ary)->ptr[i]);
RARRAY            406 ext/openssl/ossl_x509req.c     for (i=0;i<RARRAY(ary)->len; i++) {
RARRAY            407 ext/openssl/ossl_x509req.c 	OSSL_Check_Kind(RARRAY(ary)->ptr[i], cX509Attr);
RARRAY            412 ext/openssl/ossl_x509req.c     for (i=0;i<RARRAY(ary)->len; i++) {
RARRAY            413 ext/openssl/ossl_x509req.c 	item = RARRAY(ary)->ptr[i];
RARRAY            178 ext/openssl/ossl_x509revoked.c     for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY            179 ext/openssl/ossl_x509revoked.c 	OSSL_Check_Kind(RARRAY(ary)->ptr[i], cX509Ext);
RARRAY            184 ext/openssl/ossl_x509revoked.c     for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY            185 ext/openssl/ossl_x509revoked.c 	item = RARRAY(ary)->ptr[i];
RARRAY             98 ext/racc/cparse/cparse.c     ((0 <= idx && idx < RARRAY(s)->len) ? RARRAY(s)->ptr[idx] : Qnil)
RARRAY            114 ext/racc/cparse/cparse.c     if (len > RARRAY(stack)->len) len = RARRAY(stack)->len;
RARRAY            115 ext/racc/cparse/cparse.c     return rb_ary_new4(len, RARRAY(stack)->ptr + RARRAY(stack)->len - len);
RARRAY            131 ext/racc/cparse/cparse.c #define PUSH(s, i) rb_ary_store(s, RARRAY(s)->len, i)
RARRAY            134 ext/racc/cparse/cparse.c     ((RARRAY(s)->len > 0) ? RARRAY(s)->ptr[RARRAY(s)->len - 1] : Qnil)
RARRAY            344 ext/racc/cparse/cparse.c     if (!(13 <= RARRAY(arg)->len && RARRAY(arg)->len <= 14))
RARRAY            345 ext/racc/cparse/cparse.c         rb_raise(RaccBug, "[Racc Bug] wrong arg.size %ld", RARRAY(arg)->len);
RARRAY            346 ext/racc/cparse/cparse.c     v->action_table   = assert_array  (RARRAY(arg)->ptr[ 0]);
RARRAY            347 ext/racc/cparse/cparse.c     v->action_check   = assert_array  (RARRAY(arg)->ptr[ 1]);
RARRAY            348 ext/racc/cparse/cparse.c     v->action_default = assert_array  (RARRAY(arg)->ptr[ 2]);
RARRAY            349 ext/racc/cparse/cparse.c     v->action_pointer = assert_array  (RARRAY(arg)->ptr[ 3]);
RARRAY            350 ext/racc/cparse/cparse.c     v->goto_table     = assert_array  (RARRAY(arg)->ptr[ 4]);
RARRAY            351 ext/racc/cparse/cparse.c     v->goto_check     = assert_array  (RARRAY(arg)->ptr[ 5]);
RARRAY            352 ext/racc/cparse/cparse.c     v->goto_default   = assert_array  (RARRAY(arg)->ptr[ 6]);
RARRAY            353 ext/racc/cparse/cparse.c     v->goto_pointer   = assert_array  (RARRAY(arg)->ptr[ 7]);
RARRAY            354 ext/racc/cparse/cparse.c     v->nt_base        = assert_integer(RARRAY(arg)->ptr[ 8]);
RARRAY            355 ext/racc/cparse/cparse.c     v->reduce_table   = assert_array  (RARRAY(arg)->ptr[ 9]);
RARRAY            356 ext/racc/cparse/cparse.c     v->token_table    = assert_hash   (RARRAY(arg)->ptr[10]);
RARRAY            357 ext/racc/cparse/cparse.c     v->shift_n        = assert_integer(RARRAY(arg)->ptr[11]);
RARRAY            358 ext/racc/cparse/cparse.c     v->reduce_n       = assert_integer(RARRAY(arg)->ptr[12]);
RARRAY            359 ext/racc/cparse/cparse.c     if (RARRAY(arg)->len > 13) {
RARRAY            360 ext/racc/cparse/cparse.c         v->use_result_var = RTEST(RARRAY(arg)->ptr[13]);
RARRAY            402 ext/racc/cparse/cparse.c     if (RARRAY(block_args)->len != 2) {
RARRAY            407 ext/racc/cparse/cparse.c                  RARRAY(block_args)->len);
RARRAY            544 ext/racc/cparse/cparse.c     v->retval = RARRAY(v->vstack)->ptr[0];
RARRAY            604 ext/racc/cparse/cparse.c         if (RARRAY(v->state)->len <= 1) {
RARRAY            686 ext/racc/cparse/cparse.c     reduce_len = RARRAY(v->reduce_table)->ptr[v->ruleno];
RARRAY            687 ext/racc/cparse/cparse.c     reduce_to  = RARRAY(v->reduce_table)->ptr[v->ruleno+1];
RARRAY            688 ext/racc/cparse/cparse.c     method_id  = RARRAY(v->reduce_table)->ptr[v->ruleno+2];
RARRAY            703 ext/racc/cparse/cparse.c             tmp = RARRAY(tmp_v)->ptr[0];
RARRAY            706 ext/racc/cparse/cparse.c             tmp = RARRAY(v->vstack)->ptr[ RARRAY(v->vstack)->len - len ];
RARRAY            735 ext/racc/cparse/cparse.c     if (RARRAY(v->state)->len == 0)
RARRAY            180 ext/readline/readline.c     matches = RARRAY(ary)->len;
RARRAY            185 ext/readline/readline.c 	temp = rb_obj_as_string(RARRAY(ary)->ptr[i]);
RARRAY            708 ext/readline/readline.c 	if (RARRAY(result)->len >= 2)
RARRAY            735 ext/readline/readline.c 	if (RARRAY(result)->len >= 2)
RARRAY            351 ext/sdbm/init.c     for (i = 0; i < RARRAY(ary)->len; i++) {
RARRAY            352 ext/sdbm/init.c 	keystr = RARRAY(ary)->ptr[i];
RARRAY            361 ext/sdbm/init.c     if (n > 0) dbmp->di_size = n - RARRAY(ary)->len;
RARRAY            423 ext/sdbm/init.c     if (RARRAY(pair)->len < 2) {
RARRAY            426 ext/sdbm/init.c     fsdbm_store(dbm, RARRAY(pair)->ptr[0], RARRAY(pair)->ptr[1]);
RARRAY           2684 ext/socket/socket.c 	    RARRAY(ary)->ptr[2] = rb_str_new2(res->ai_canonname);
RARRAY           2938 ext/socket/socket.c 	if (RARRAY(sa)->len == 3) {
RARRAY           2939 ext/socket/socket.c 	    af = RARRAY(sa)->ptr[0];
RARRAY           2940 ext/socket/socket.c 	    port = RARRAY(sa)->ptr[1];
RARRAY           2941 ext/socket/socket.c 	    host = RARRAY(sa)->ptr[2];
RARRAY           2943 ext/socket/socket.c 	else if (RARRAY(sa)->len >= 4) {
RARRAY           2944 ext/socket/socket.c 	    af = RARRAY(sa)->ptr[0];
RARRAY           2945 ext/socket/socket.c 	    port = RARRAY(sa)->ptr[1];
RARRAY           2946 ext/socket/socket.c 	    host = RARRAY(sa)->ptr[3];
RARRAY           2948 ext/socket/socket.c 		host = RARRAY(sa)->ptr[2];
RARRAY           2962 ext/socket/socket.c 		     RARRAY(sa)->len);
RARRAY           1064 ext/syck/rubyext.c     for ( i = 0; i < RARRAY(tparts)->len; i++ ) {
RARRAY           1101 ext/syck/rubyext.c             while ( RARRAY(parts)->len > 1 )
RARRAY           1119 ext/syck/rubyext.c                     if ( RARRAY(subclass_parts)->len > 0 && rb_respond_to( target_class, s_tag_subclasses ) &&
RARRAY           1549 ext/syck/rubyext.c         for ( i = 0; i < RARRAY( val )->len; i++ )
RARRAY           1638 ext/syck/rubyext.c         for ( i = 0; i < RARRAY(keys)->len; i++ )
RARRAY           1674 ext/syck/rubyext.c         for ( i = 0; i < RARRAY(keys)->len; i++ )
RARRAY           1132 ext/tk/tcltklib.c         tcl_time.sec  = NUM2LONG(RARRAY(divmod)->ptr[0]);
RARRAY           1133 ext/tk/tcltklib.c         tcl_time.usec = NUM2LONG(RARRAY(divmod)->ptr[1]);
RARRAY           1139 ext/tk/tcltklib.c         tcl_time.sec  = NUM2LONG(RARRAY(divmod)->ptr[0]);
RARRAY           1140 ext/tk/tcltklib.c         tcl_time.usec = (long)(NUM2DBL(RARRAY(divmod)->ptr[1]) * 1000000);
RARRAY           2588 ext/tk/tcltklib.c     RARRAY(args)->len = 0;
RARRAY           2593 ext/tk/tcltklib.c         RARRAY(args)->ptr[RARRAY(args)->len++] = rb_tainted_str_new(str, len);
RARRAY           2596 ext/tk/tcltklib.c         RARRAY(args)->ptr[RARRAY(args)->len++] = rb_tainted_str_new2(argv[i]);
RARRAY           5443 ext/tk/tcltklib.c     RARRAY(q->result)->ptr[0] = ret;
RARRAY           5513 ext/tk/tcltklib.c     RARRAY(result)->ptr[0] = Qnil;
RARRAY           5514 ext/tk/tcltklib.c     RARRAY(result)->len = 1;
RARRAY           5541 ext/tk/tcltklib.c     ret = RARRAY(result)->ptr[0];
RARRAY           5760 ext/tk/tcltklib.c     RARRAY(q->result)->ptr[0] = ret;
RARRAY           5827 ext/tk/tcltklib.c     RARRAY(result)->ptr[0] = Qnil;
RARRAY           5828 ext/tk/tcltklib.c     RARRAY(result)->len = 1;
RARRAY           5856 ext/tk/tcltklib.c     ret = RARRAY(result)->ptr[0];
RARRAY           6836 ext/tk/tcltklib.c     RARRAY(q->result)->ptr[0] = ret;
RARRAY           6906 ext/tk/tcltklib.c     RARRAY(result)->ptr[0] = Qnil;
RARRAY           6907 ext/tk/tcltklib.c     RARRAY(result)->len = 1;
RARRAY           6933 ext/tk/tcltklib.c     ret = RARRAY(result)->ptr[0];
RARRAY           7451 ext/tk/tcltklib.c             RARRAY(ary)->ptr[idx] = elem;
RARRAY           7454 ext/tk/tcltklib.c         RARRAY(ary)->len = objc;
RARRAY           7492 ext/tk/tcltklib.c             RARRAY(ary)->ptr[idx] = elem;
RARRAY           7494 ext/tk/tcltklib.c         RARRAY(ary)->len = argc;
RARRAY            265 ext/tk/tkutil/tkutil.c     for(idx = 0; idx < RARRAY(ary)->len; idx++) {
RARRAY            266 ext/tk/tkutil/tkutil.c         if (TYPE(RARRAY(ary)->ptr[idx]) == T_HASH) {
RARRAY            267 ext/tk/tkutil/tkutil.c             size += 2 * RHASH(RARRAY(ary)->ptr[idx])->tbl->num_entries;
RARRAY            274 ext/tk/tkutil/tkutil.c     RARRAY(dst)->len = 0;
RARRAY            275 ext/tk/tkutil/tkutil.c     for(idx = 0; idx < RARRAY(ary)->len; idx++) {
RARRAY            276 ext/tk/tkutil/tkutil.c         val = RARRAY(ary)->ptr[idx];
RARRAY            281 ext/tk/tkutil/tkutil.c             RARRAY(dst)->ptr[RARRAY(dst)->len++] = str_val;
RARRAY            305 ext/tk/tkutil/tkutil.c             size2 = RARRAY(val)->len;
RARRAY            307 ext/tk/tkutil/tkutil.c                 val2 = RARRAY(val)->ptr[idx2];
RARRAY            311 ext/tk/tkutil/tkutil.c                     RARRAY(dst)->ptr[RARRAY(dst)->len++] = str_val;
RARRAY            320 ext/tk/tkutil/tkutil.c                     RARRAY(dst)->ptr[RARRAY(dst)->len++] = str_val;
RARRAY            326 ext/tk/tkutil/tkutil.c                         RARRAY(dst)->ptr[RARRAY(dst)->len++] = str_val;
RARRAY            348 ext/tk/tkutil/tkutil.c                 RARRAY(dst)->ptr[RARRAY(dst)->len++] = str_val;
RARRAY            367 ext/tk/tkutil/tkutil.c         for(idx = 0; idx < RARRAY(dst)->len; idx++) {
RARRAY            368 ext/tk/tkutil/tkutil.c             str_val = RARRAY(dst)->ptr[idx];
RARRAY            374 ext/tk/tkutil/tkutil.c             RARRAY(dst)->ptr[idx] = str_val;
RARRAY            417 ext/tk/tkutil/tkutil.c     size = RARRAY(ary)->len;
RARRAY            419 ext/tk/tkutil/tkutil.c     RARRAY(dst)->len = 0;
RARRAY            420 ext/tk/tkutil/tkutil.c     for(idx = 0; idx < RARRAY(ary)->len; idx++) {
RARRAY            421 ext/tk/tkutil/tkutil.c         val = RARRAY(ary)->ptr[idx];
RARRAY            443 ext/tk/tkutil/tkutil.c             RARRAY(dst)->ptr[RARRAY(dst)->len++] = str_val;
RARRAY            461 ext/tk/tkutil/tkutil.c         for(idx = 0; idx < RARRAY(dst)->len; idx++) {
RARRAY            462 ext/tk/tkutil/tkutil.c             str_val = RARRAY(dst)->ptr[idx];
RARRAY            468 ext/tk/tkutil/tkutil.c             RARRAY(dst)->ptr[idx] = str_val;
RARRAY            499 ext/tk/tkutil/tkutil.c     volatile VALUE dst = rb_ary_new2(2 * RARRAY(assoc)->len);
RARRAY            501 ext/tk/tkutil/tkutil.c     len = RARRAY(assoc)->len;
RARRAY            504 ext/tk/tkutil/tkutil.c         pair = RARRAY(assoc)->ptr[i];
RARRAY            506 ext/tk/tkutil/tkutil.c             RARRAY(dst)->ptr[RARRAY(dst)->len++] = key2keyname(pair);
RARRAY            509 ext/tk/tkutil/tkutil.c         switch(RARRAY(assoc)->len) {
RARRAY            511 ext/tk/tkutil/tkutil.c             RARRAY(dst)->ptr[RARRAY(dst)->len++] = RARRAY(pair)->ptr[2];
RARRAY            514 ext/tk/tkutil/tkutil.c             RARRAY(dst)->ptr[RARRAY(dst)->len++]
RARRAY            515 ext/tk/tkutil/tkutil.c                 = key2keyname(RARRAY(pair)->ptr[0]);
RARRAY            521 ext/tk/tkutil/tkutil.c             RARRAY(dst)->ptr[RARRAY(dst)->len++]
RARRAY            522 ext/tk/tkutil/tkutil.c                 = key2keyname(RARRAY(pair)->ptr[0]);
RARRAY            524 ext/tk/tkutil/tkutil.c             val = rb_ary_new2(RARRAY(pair)->len - 1);
RARRAY            525 ext/tk/tkutil/tkutil.c             RARRAY(val)->len = 0;
RARRAY            526 ext/tk/tkutil/tkutil.c             for(j = 1; j < RARRAY(pair)->len; j++) {
RARRAY            527 ext/tk/tkutil/tkutil.c                 RARRAY(val)->ptr[RARRAY(val)->len++] = RARRAY(pair)->ptr[j];
RARRAY            530 ext/tk/tkutil/tkutil.c             RARRAY(dst)->ptr[RARRAY(dst)->len++] = val;
RARRAY            550 ext/tk/tkutil/tkutil.c     volatile VALUE dst = rb_ary_new2(2 * RARRAY(assoc)->len);
RARRAY            552 ext/tk/tkutil/tkutil.c     len = RARRAY(assoc)->len;
RARRAY            555 ext/tk/tkutil/tkutil.c         pair = RARRAY(assoc)->ptr[i];
RARRAY            557 ext/tk/tkutil/tkutil.c             RARRAY(dst)->ptr[RARRAY(dst)->len++] = key2keyname(pair);
RARRAY            560 ext/tk/tkutil/tkutil.c         switch(RARRAY(assoc)->len) {
RARRAY            562 ext/tk/tkutil/tkutil.c             RARRAY(dst)->ptr[RARRAY(dst)->len++]
RARRAY            563 ext/tk/tkutil/tkutil.c                 = get_eval_string_core(RARRAY(pair)->ptr[2], Qtrue, self);
RARRAY            566 ext/tk/tkutil/tkutil.c             RARRAY(dst)->ptr[RARRAY(dst)->len++]
RARRAY            567 ext/tk/tkutil/tkutil.c                 = key2keyname(RARRAY(pair)->ptr[0]);
RARRAY            573 ext/tk/tkutil/tkutil.c             RARRAY(dst)->ptr[RARRAY(dst)->len++]
RARRAY            574 ext/tk/tkutil/tkutil.c                 = key2keyname(RARRAY(pair)->ptr[0]);
RARRAY            576 ext/tk/tkutil/tkutil.c             val = rb_ary_new2(RARRAY(pair)->len - 1);
RARRAY            577 ext/tk/tkutil/tkutil.c             RARRAY(val)->len = 0;
RARRAY            578 ext/tk/tkutil/tkutil.c             for(j = 1; j < RARRAY(pair)->len; j++) {
RARRAY            579 ext/tk/tkutil/tkutil.c                 RARRAY(val)->ptr[RARRAY(val)->len++] = RARRAY(pair)->ptr[j];
RARRAY            582 ext/tk/tkutil/tkutil.c             RARRAY(dst)->ptr[RARRAY(dst)->len++]
RARRAY            602 ext/tk/tkutil/tkutil.c     ary = RARRAY(args)->ptr[0];
RARRAY            609 ext/tk/tkutil/tkutil.c     RARRAY(ary)->ptr[RARRAY(ary)->len++] = key2keyname(key);
RARRAY            613 ext/tk/tkutil/tkutil.c     RARRAY(ary)->ptr[RARRAY(ary)->len++]
RARRAY            614 ext/tk/tkutil/tkutil.c         = get_eval_string_core(val, Qnil, RARRAY(args)->ptr[1]);
RARRAY            628 ext/tk/tkutil/tkutil.c     RARRAY(dst)->len = 0;
RARRAY            630 ext/tk/tkutil/tkutil.c     RARRAY(args)->ptr[0] = dst;
RARRAY            631 ext/tk/tkutil/tkutil.c     RARRAY(args)->ptr[1] = self;
RARRAY            632 ext/tk/tkutil/tkutil.c     RARRAY(args)->len = 2;
RARRAY            650 ext/tk/tkutil/tkutil.c     ary = RARRAY(args)->ptr[0];
RARRAY            657 ext/tk/tkutil/tkutil.c                                               RARRAY(args)->ptr[1]));
RARRAY            660 ext/tk/tkutil/tkutil.c     RARRAY(ary)->ptr[RARRAY(ary)->len++] = key2keyname(key);
RARRAY            664 ext/tk/tkutil/tkutil.c     RARRAY(ary)->ptr[RARRAY(ary)->len++]
RARRAY            665 ext/tk/tkutil/tkutil.c         = get_eval_string_core(val, Qtrue, RARRAY(args)->ptr[1]);
RARRAY            679 ext/tk/tkutil/tkutil.c     RARRAY(dst)->len = 0;
RARRAY            681 ext/tk/tkutil/tkutil.c     RARRAY(args)->ptr[0] = dst;
RARRAY            682 ext/tk/tkutil/tkutil.c     RARRAY(args)->ptr[1] = self;
RARRAY            683 ext/tk/tkutil/tkutil.c     RARRAY(args)->len = 2;
RARRAY            918 ext/tk/tkutil/tkutil.c     RARRAY(dst)->len = 0;
RARRAY            927 ext/tk/tkutil/tkutil.c             RARRAY(dst)->ptr[RARRAY(dst)->len++]
RARRAY           1296 ext/tk/tkutil/tkutil.c     len = RARRAY(list)->len;
RARRAY           1300 ext/tk/tkutil/tkutil.c         ptr = RSTRING(RARRAY(list)->ptr[i])->ptr;
RARRAY           1351 ext/tk/tkutil/tkutil.c     int len = RARRAY(key_inf)->len;
RARRAY           1376 ext/tk/tkutil/tkutil.c         inf = RARRAY(key_inf)->ptr[idx];
RARRAY           1378 ext/tk/tkutil/tkutil.c         *(key  + real_len) = (char)NUM2INT(RARRAY(inf)->ptr[0]);
RARRAY           1379 ext/tk/tkutil/tkutil.c         *(type + real_len) = (char)NUM2INT(RARRAY(inf)->ptr[1]);
RARRAY           1385 ext/tk/tkutil/tkutil.c                               rb_id2name(SYM2ID(RARRAY(inf)->ptr[2])))
RARRAY           1389 ext/tk/tkutil/tkutil.c         rb_attr(self, SYM2ID(RARRAY(inf)->ptr[2]), 1, 0, Qtrue);
RARRAY           1401 ext/tk/tkutil/tkutil.c     len = RARRAY(proc_inf)->len;
RARRAY           1403 ext/tk/tkutil/tkutil.c         inf = RARRAY(proc_inf)->ptr[idx];
RARRAY           1405 ext/tk/tkutil/tkutil.c         rb_hash_aset(proc, RARRAY(inf)->ptr[0], RARRAY(inf)->ptr[1]);
RARRAY           1430 ext/tk/tkutil/tkutil.c     int len = RARRAY(val_ary)->len;
RARRAY           1446 ext/tk/tkutil/tkutil.c     RARRAY(dst)->len = 0;
RARRAY           1463 ext/tk/tkutil/tkutil.c             RARRAY(dst)->ptr[RARRAY(dst)->len++] = RARRAY(val_ary)->ptr[idx];
RARRAY           1465 ext/tk/tkutil/tkutil.c             RARRAY(dst)->ptr[RARRAY(dst)->len++]
RARRAY           1466 ext/tk/tkutil/tkutil.c                 = rb_funcall(proc, ID_call, 1, RARRAY(val_ary)->ptr[idx]);
RARRAY            794 ext/win32ole/win32ole.c             psab[i].cElements = RARRAY(val1)->len;
RARRAY           2414 ext/win32ole/win32ole.c     dispParams.cArgs = RARRAY(args)->len;
RARRAY           2445 ext/win32ole/win32ole.c                 rgsabound[0].cElements = RARRAY(param)->len;
RARRAY           3990 ext/win32ole/win32ole.c     len = RARRAY(args)->len;
RARRAY           6250 ext/win32ole/win32ole.c     len = RARRAY(ary)->len;
RARRAY           6280 ext/win32ole/win32ole.c     len = RARRAY(ary)->len;
RARRAY           6305 ext/win32ole/win32ole.c     for(i = 0; i < RARRAY(ary)->len && (unsigned int) i < pdispparams->cArgs; i++) {
RARRAY           6876 ext/win32ole/win32ole.c     len = RARRAY(args)->len;
RARRAY            128 file.c             struct RArray *args = RARRAY(vargs);
RARRAY           2867 file.c             if (RARRAY(ary)->len == 0) return rb_str_new(0, 0);
RARRAY           2870 file.c             for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY           2871 file.c         	if (TYPE(RARRAY(ary)->ptr[i]) == T_STRING) {
RARRAY           2872 file.c         	    len += RSTRING(RARRAY(ary)->ptr[i])->len;
RARRAY           2879 file.c         	len += RSTRING(sep)->len * RARRAY(ary)->len - 1;
RARRAY           2883 file.c             for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY           2884 file.c         	tmp = RARRAY(ary)->ptr[i];
RARRAY           4126 file.c             for (i=0;i<RARRAY(rb_load_path)->len;i++) {
RARRAY           4127 file.c         	VALUE str = RARRAY(rb_load_path)->ptr[i];
RARRAY           4187 file.c         	for (i=0;i<RARRAY(rb_load_path)->len;i++) {
RARRAY           4188 file.c         	    VALUE str = RARRAY(rb_load_path)->ptr[i];
RARRAY           1780 gc.c               for (i=0; i<RARRAY(finalizers)->len; i++) {
RARRAY           1781 gc.c           	args[0] = RARRAY(finalizers)->ptr[i];
RARRAY           1786 gc.c           	for (i=0; i<RARRAY(table)->len; i++) {
RARRAY           1787 gc.c           	    VALUE final = RARRAY(table)->ptr[i];
RARRAY           1788 gc.c           	    args[0] = RARRAY(final)->ptr[1];
RARRAY           1790 gc.c           	    args[2] = FIX2INT(RARRAY(final)->ptr[0]);
RARRAY           1822 hash.c             for (i=0; i<RARRAY(keys)->len; i++) {
RARRAY           1823 hash.c         	rb_yield(RARRAY(keys)->ptr[i]);
RARRAY           1857 hash.c             for (i=0; i<RARRAY(values)->len; i++) {
RARRAY           1858 hash.c         	rb_yield(RARRAY(values)->ptr[i]);
RARRAY           1883 hash.c             for (i=0; i<RARRAY(ary)->len; i+=2) {
RARRAY           1885 hash.c         	    rb_yield_values(2, RARRAY(ary)->ptr[i], RARRAY(ary)->ptr[i+1]);
RARRAY           1888 hash.c         	    rb_yield(rb_assoc_new(RARRAY(ary)->ptr[i], RARRAY(ary)->ptr[i+1]));
RARRAY           1917 hash.c             for (i=0; i<RARRAY(keys)->len; i++) {
RARRAY           1918 hash.c         	VALUE val = rb_f_getenv(Qnil, RARRAY(keys)->ptr[i]);
RARRAY           1920 hash.c         	    if (RTEST(rb_yield_values(2, RARRAY(keys)->ptr[i], val))) {
RARRAY           1921 hash.c         		FL_UNSET(RARRAY(keys)->ptr[i], FL_TAINT);
RARRAY           1922 hash.c         		env_delete(Qnil, RARRAY(keys)->ptr[i]);
RARRAY           1986 hash.c             for (i=0; i<RARRAY(keys)->len; i++) {
RARRAY           1987 hash.c         	VALUE val = rb_f_getenv(Qnil, RARRAY(keys)->ptr[i]);
RARRAY           1989 hash.c         	    env_delete(Qnil, RARRAY(keys)->ptr[i]);
RARRAY           2233 hash.c             for (i=0; i<RARRAY(keys)->len; i++) {
RARRAY           2234 hash.c         	env_delete(env, RARRAY(keys)->ptr[i]);
RARRAY           3029 io.c           	VALUE *argv = ALLOCA_N(VALUE, RARRAY(tmp)->len);
RARRAY           3031 io.c           	MEMCPY(argv, RARRAY(tmp)->ptr, VALUE, RARRAY(tmp)->len);
RARRAY           3032 io.c           	port = pipe_open(RARRAY(tmp)->len, argv, mode);
RARRAY           3644 io.c               for (i=0; i<RARRAY(ary)->len; i++) {
RARRAY           3645 io.c           	tmp = RARRAY(ary)->ptr[i];
RARRAY           4093 io.c           	if (RARRAY(rb_argv)->len > 0) {
RARRAY           4106 io.c           	if (RARRAY(rb_argv)->len > 0) {
RARRAY           4409 io.c           	for (i=0; i<RARRAY(read)->len; i++) {
RARRAY           4410 io.c           	    GetOpenFile(rb_io_get_io(RARRAY(read)->ptr[i]), fptr);
RARRAY           4429 io.c           	for (i=0; i<RARRAY(write)->len; i++) {
RARRAY           4430 io.c           	    GetOpenFile(rb_io_get_io(RARRAY(write)->ptr[i]), fptr);
RARRAY           4441 io.c           	for (i=0; i<RARRAY(except)->len; i++) {
RARRAY           4442 io.c           	    GetOpenFile(rb_io_get_io(RARRAY(except)->ptr[i]), fptr);
RARRAY           4467 io.c           	    list = RARRAY(res)->ptr[0];
RARRAY           4468 io.c           	    for (i=0; i< RARRAY(read)->len; i++) {
RARRAY           4469 io.c           		GetOpenFile(rb_io_get_io(RARRAY(read)->ptr[i]), fptr);
RARRAY           4478 io.c           	    list = RARRAY(res)->ptr[1];
RARRAY           4479 io.c           	    for (i=0; i< RARRAY(write)->len; i++) {
RARRAY           4480 io.c           		GetOpenFile(rb_io_get_io(RARRAY(write)->ptr[i]), fptr);
RARRAY           4488 io.c           	    list = RARRAY(res)->ptr[2];
RARRAY           4489 io.c           	    for (i=0; i< RARRAY(except)->len; i++) {
RARRAY           4490 io.c           		GetOpenFile(rb_io_get_io(RARRAY(except)->ptr[i]), fptr);
RARRAY           5190 io.c                   if (RARRAY(rb_argv)->len == 0)
RARRAY            555 marshal.c      		long len = RARRAY(obj)->len;
RARRAY            556 marshal.c      		VALUE *ptr = RARRAY(obj)->ptr;
RARRAY            595 marshal.c      		    w_symbol(SYM2ID(RARRAY(mem)->ptr[i]), arg);
RARRAY            965 marshal.c                  while (RARRAY(extmod)->len > 0) {
RARRAY           1147 marshal.c      		if (RARRAY(mem)->ptr[i] != ID2SYM(slot)) {
RARRAY           1151 marshal.c      			     rb_id2name(SYM2ID(RARRAY(mem)->ptr[i])));
RARRAY           1184 marshal.c                      while (RARRAY(extmod)->len > 0) {
RARRAY            135 numeric.c          if (TYPE(ary) != T_ARRAY || RARRAY(ary)->len != 2) {
RARRAY            142 numeric.c          *x = RARRAY(ary)->ptr[0];
RARRAY            143 numeric.c          *y = RARRAY(ary)->ptr[1];
RARRAY            457 pack.c             items = RARRAY(ary)->len;
RARRAY            460 pack.c         #define THISFROM RARRAY(ary)->ptr[idx]
RARRAY            461 pack.c         #define NEXTFROM (items-- > 0 ? RARRAY(ary)->ptr[idx++] : (rb_raise(rb_eArgError, toofew),0))
RARRAY            953 pack.c         			c = NUM2INT(RARRAY(from)->ptr[1]) | 0x80; /* mod */
RARRAY            955 pack.c         			from = RARRAY(from)->ptr[0]; /* div */
RARRAY           1873 pack.c         		    p = RARRAY(a)->ptr;
RARRAY           1874 pack.c         		    pend = p + RARRAY(a)->len;
RARRAY           1915 pack.c         			p = RARRAY(a)->ptr;
RARRAY           1916 pack.c         			pend = p + RARRAY(a)->len;
RARRAY           1177 process.c      	if (RARRAY(tmp)->len != 2) {
RARRAY           1180 process.c      	prog = RARRAY(tmp)->ptr[0];
RARRAY           1181 process.c      	argv[0] = RARRAY(tmp)->ptr[1];
RARRAY           2633 process.c          ngroups = RARRAY(ary)->len;
RARRAY           2639 process.c          for (i = 0; i < ngroups && i < RARRAY(ary)->len; i++) {
RARRAY           2640 process.c      	VALUE g = RARRAY(ary)->ptr[i];
RARRAY            395 ruby.c         	n = RARRAY(rb_argv)->len;
RARRAY            396 ruby.c         	args = RARRAY(rb_argv)->ptr;
RARRAY            439 ruby.c         	n = RARRAY(rb_argv)->len - n;
RARRAY            413 string.c       	return rb_str_format(RARRAY(arg)->len, RARRAY(arg)->ptr, str);
RARRAY           2154 string.c           RARRAY(str)->len = 0;
RARRAY           3331 string.c       	while (RARRAY(result)->len > 0 &&
RARRAY           3332 string.c       	       RSTRING(RARRAY(result)->ptr[RARRAY(result)->len-1])->len == 0)
RARRAY             50 struct.c           if (RSTRUCT(s)->len != RARRAY(members)->len) {
RARRAY             52 struct.c       		 RARRAY(members)->len, RSTRUCT(s)->len);
RARRAY             64 struct.c           ary = rb_ary_new2(RARRAY(members)->len);
RARRAY             65 struct.c           p = RARRAY(members)->ptr; pend = p + RARRAY(members)->len;
RARRAY            100 struct.c           for (i=0; i<RARRAY(members)->len; i++) {
RARRAY            101 struct.c       	if (RARRAY(members)->ptr[i] == slot) {
RARRAY            157 struct.c           for (i=0; i<RARRAY(members)->len; i++) {
RARRAY            158 struct.c       	slot = RARRAY(members)->ptr[i];
RARRAY            194 struct.c           rb_iv_set(nstr, "__size__", LONG2NUM(RARRAY(members)->len));
RARRAY            201 struct.c           for (i=0; i< RARRAY(members)->len; i++) {
RARRAY            202 struct.c       	ID id = SYM2ID(RARRAY(members)->ptr[i]);
RARRAY            281 struct.c           for (i=0; i<RARRAY(rest)->len; i++) {
RARRAY            282 struct.c       	id = rb_to_id(RARRAY(rest)->ptr[i]);
RARRAY            283 struct.c       	RARRAY(rest)->ptr[i] = ID2SYM(id);
RARRAY            315 struct.c           if (n < RARRAY(values)->len) {
RARRAY            318 struct.c           MEMCPY(RSTRUCT(self)->ptr, RARRAY(values)->ptr, VALUE, RARRAY(values)->len);
RARRAY            319 struct.c           if (n > RARRAY(values)->len) {
RARRAY            320 struct.c       	rb_mem_clear(RSTRUCT(self)->ptr+RARRAY(values)->len,
RARRAY            321 struct.c       		     n-RARRAY(values)->len);
RARRAY            347 struct.c           return rb_class_new_instance(RARRAY(values)->len, RARRAY(values)->ptr, klass);
RARRAY            452 struct.c       	slot = RARRAY(members)->ptr[i];
RARRAY            525 struct.c           len = RARRAY(members)->len;
RARRAY            527 struct.c       	if (SYM2ID(RARRAY(members)->ptr[i]) == id) {
RARRAY            582 struct.c           len = RARRAY(members)->len;
RARRAY            583 struct.c           if (RSTRUCT(s)->len != RARRAY(members)->len) {
RARRAY            585 struct.c       		 RARRAY(members)->len, RSTRUCT(s)->len);
RARRAY            588 struct.c       	if (SYM2ID(RARRAY(members)->ptr[i]) == id) {


RBASIC

RBASIC             43 class.c            if (RBASIC(super)->flags & FL_SINGLETON) {
RBASIC             72 class.c        	RBASIC(clone)->klass = rb_singleton_class_clone(orig);
RBASIC            109 class.c            VALUE klass = RBASIC(obj)->klass;
RBASIC            116 class.c        	OBJSETUP(clone, 0, RBASIC(klass)->flags);
RBASIC            119 class.c        	    RBASIC(clone)->klass = (VALUE)clone;
RBASIC            122 class.c        	    RBASIC(clone)->klass = rb_singleton_class_clone(klass);
RBASIC            134 class.c        	rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)clone);
RBASIC            155 class.c        	return RBASIC(obj)->klass = rb_cClass;
RBASIC            162 class.c        	RBASIC(obj)->klass = klass;
RBASIC            165 class.c        	metasuper = RBASIC(rb_class_real(super))->klass;
RBASIC            168 class.c        	    RBASIC(klass)->klass = metasuper;
RBASIC            181 class.c            rb_make_metaclass(klass, RBASIC(super)->klass);
RBASIC            324 class.c        	module = RBASIC(module)->klass;
RBASIC            333 class.c        	RBASIC(klass)->klass = RBASIC(module)->klass;
RBASIC            336 class.c        	RBASIC(klass)->klass = module;
RBASIC            419 class.c        	    rb_ary_push(ary, RBASIC(p)->klass);
RBASIC            452 class.c        	    if (RBASIC(p)->klass == mod2) return Qtrue;
RBASIC            483 class.c        	    rb_ary_push(ary, RBASIC(p)->klass);
RBASIC            782 class.c            if (FL_TEST(RBASIC(obj)->klass, FL_SINGLETON) &&
RBASIC            783 class.c        	rb_iv_get(RBASIC(obj)->klass, "__attached__") == obj) {
RBASIC            784 class.c        	klass = RBASIC(obj)->klass;
RBASIC            787 class.c        	klass = rb_make_metaclass(obj, RBASIC(obj)->klass);
RBASIC            427 enum.c             if (RBASIC(ary)->klass) {
RBASIC            527 enum.c             RBASIC(ary)->klass = 0;
RBASIC            532 enum.c             if (RBASIC(ary)->klass) {
RBASIC            538 enum.c             RBASIC(ary)->klass = rb_cArray;
RBASIC            845 error.c        	    RBASIC(self)->klass = klass;
RBASIC            747 eval.c         	if (RBASIC(_old)->flags) /* unless it's already recycled */ \
RBASIC           2540 eval.c         	    klass = RBASIC(klass)->klass;
RBASIC           3322 eval.c                             if (TYPE(RBASIC(ruby_scope)->klass) != T_ARRAY ||
RBASIC           3323 eval.c                                 RARRAY(RBASIC(ruby_scope)->klass)->len != argc) {
RBASIC           3327 eval.c                             argv = RARRAY(RBASIC(ruby_scope)->klass)->ptr;
RBASIC           5807 eval.c         		defined_class = RBASIC(defined_class)->klass;
RBASIC           6148 eval.c         	ruby_class = RBASIC(ruby_class)->klass;
RBASIC           8048 eval.c         #define proc_safe_level_p(data) (RBASIC(data)->flags & PROC_SAFE_SAVED)
RBASIC           8062 eval.c             return (RBASIC(data)->flags & PROC_TMASK) >> PROC_TSHIFT;
RBASIC           8090 eval.c         	    RBASIC(obj)->klass = klass;
RBASIC           8661 eval.c             if (TYPE(klass) == T_ICLASS) klass = RBASIC(klass)->klass;
RBASIC             16 ext/zlib/zlib.c #define OBJ_IS_FREED(val)  (RBASIC(val)->flags == 0)
RBASIC            444 ext/zlib/zlib.c 	RBASIC(z->buf)->klass = 0;
RBASIC            476 ext/zlib/zlib.c 	RBASIC(z->buf)->klass = 0;
RBASIC            497 ext/zlib/zlib.c 	RBASIC(z->buf)->klass = 0;
RBASIC            533 ext/zlib/zlib.c 	RBASIC(dst)->klass = rb_cString;
RBASIC            555 ext/zlib/zlib.c     RBASIC(dst)->klass = rb_cString;
RBASIC            597 ext/zlib/zlib.c 	RBASIC(z->input)->klass = 0;
RBASIC            650 ext/zlib/zlib.c 	RBASIC(dst)->klass = rb_cString;
RBASIC            653 ext/zlib/zlib.c     RBASIC(dst)->klass = rb_cString;
RBASIC           1046 gc.c           	    else if (RBASIC(p)->flags == FL_MARK) {
RBASIC           1051 gc.c           		RBASIC(p)->flags &= ~FL_MARK;
RBASIC           1897 gc.c               if (BUILTIN_TYPE(ptr) == 0 || RBASIC(ptr)->klass == 0) {
RBASIC             53 hash.c             if (TYPE(a) == T_STRING && RBASIC(a)->klass == rb_cString &&
RBASIC             54 hash.c         	TYPE(b) == T_STRING && RBASIC(b)->klass == rb_cString) {
RBASIC           3049 io.c               RBASIC(port)->klass = klass;
RBASIC           3351 io.c               RBASIC(io)->klass = RBASIC(nfile)->klass;
RBASIC            353 marshal.c      	path = rb_class2name(RBASIC(klass)->klass);
RBASIC            984 marshal.c      	    if (TYPE(v) == T_MODULE || !RTEST(rb_class_inherited_p(c, RBASIC(v)->klass))) {
RBASIC            989 marshal.c      	    RBASIC(v)->klass = c;
RBASIC            172 object.c           RBASIC(dest)->flags &= ~(T_MASK|FL_EXIVAR);
RBASIC            173 object.c           RBASIC(dest)->flags |= RBASIC(obj)->flags & (T_MASK|FL_EXIVAR|FL_TAINT);
RBASIC            224 object.c           RBASIC(clone)->klass = rb_singleton_class_clone(obj);
RBASIC            225 object.c           RBASIC(clone)->flags = (RBASIC(obj)->flags | FL_TEST(clone, FL_TAINT)) & ~(FL_FREEZE|FL_FINALIZE);
RBASIC            227 object.c           RBASIC(clone)->flags |= RBASIC(obj)->flags & FL_FREEZE;
RBASIC           1328 object.c           RBASIC(mod)->klass = klass;
RBASIC           1395 object.c           rb_make_metaclass(klass, RBASIC(super)->klass);
RBASIC            202 re.c               curr_kcode = RBASIC(re)->flags & KCODE_MASK;
RBASIC            332 re.c           	    switch ((RBASIC(re)->flags & KCODE_MASK)) {
RBASIC            581 re.c           	switch (RBASIC(re)->flags & KCODE_MASK) {
RBASIC            814 re.c           	(RBASIC(re)->flags & KCODE_MASK) != reg_kcode) {
RBASIC            816 re.c           	RBASIC(re)->flags &= ~KCODE_MASK;
RBASIC            817 re.c           	RBASIC(re)->flags |= reg_kcode;
RBASIC           1404 re.c           	return RBASIC(re)->flags & KCODE_MASK;
RBASIC           1659 re.c           	    switch (RBASIC(argv[0])->flags & KCODE_MASK) {
RBASIC           1847 re.c               switch (RBASIC(re)->flags & KCODE_MASK) {
RBASIC           1923 re.c                                   kcode = RBASIC(v)->flags & KCODE_MASK;
RBASIC           1925 re.c                               else if ((RBASIC(v)->flags & KCODE_MASK) != kcode) {
RBASIC            313 ruby.h             RBASIC(obj)->flags = (t);\
RBASIC            314 ruby.h             RBASIC(obj)->klass = (c);\
RBASIC            318 ruby.h             OBJSETUP(clone,rb_singleton_class_clone((VALUE)obj),RBASIC(obj)->flags);\
RBASIC            319 ruby.h             rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)clone);\
RBASIC            323 ruby.h             OBJSETUP(dup,rb_obj_class(obj),(RBASIC(obj)->flags)&(T_MASK|FL_EXIVAR|FL_TAINT));\
RBASIC            470 ruby.h         #define FL_TEST(x,f) (FL_ABLE(x)?(RBASIC(x)->flags&(f)):0)
RBASIC            471 ruby.h         #define FL_SET(x,f) do {if (FL_ABLE(x)) RBASIC(x)->flags |= (f);} while (0)
RBASIC            472 ruby.h         #define FL_UNSET(x,f) do {if (FL_ABLE(x)) RBASIC(x)->flags &= ~(f);} while (0)
RBASIC            473 ruby.h         #define FL_REVERSE(x,f) do {if (FL_ABLE(x)) RBASIC(x)->flags ^= (f);} while (0)
RBASIC            477 ruby.h         #define OBJ_INFECT(x,s) do {if (FL_ABLE(x) && FL_ABLE(s)) RBASIC(x)->flags |= RBASIC(s)->flags & FL_TAINT;} while (0)
RBASIC            680 ruby.h             return RBASIC(obj)->klass;
RBASIC            853 sprintf.c          if (RBASIC(result)->klass) {
RBASIC            882 sprintf.c          RBASIC(result)->klass = 0;
RBASIC            885 sprintf.c          RBASIC(result)->klass = rb_cString;
RBASIC            170 string.c           if (FL_TEST(orig, ELTS_SHARED) && (str = RSTRING(orig)->aux.shared) && klass == RBASIC(str)->klass) {
RBASIC            243 string.c       	FL_SET(str, RBASIC(str2)->flags & STR_NOCAPA);
RBASIC           2027 string.c       	RBASIC(dest)->klass = rb_obj_class(str);
RBASIC            178 struct.c       	rb_make_metaclass(nstr, RBASIC(klass)->klass);
RBASIC            196 variable.c     		s = rb_class2name(RBASIC(klass)->klass);


RBIGNUM

RBIGNUM            27 bignum.c       #define BDIGITS(x) ((BDIGIT*)RBIGNUM(x)->digits)
RBIGNUM            39 bignum.c       #define BIGZEROP(x) (RBIGNUM(x)->len == 0 || (RBIGNUM(x)->len == 1 && BDIGITS(x)[0] == 0))
RBIGNUM            58 bignum.c           VALUE z = bignew_1(CLASS_OF(x), RBIGNUM(x)->len, RBIGNUM(x)->sign);
RBIGNUM            60 bignum.c           MEMCPY(BDIGITS(z), BDIGITS(x), BDIGIT, RBIGNUM(x)->len);
RBIGNUM            68 bignum.c           long i = RBIGNUM(x)->len;
RBIGNUM            78 bignum.c           } while (i < RBIGNUM(x)->len);
RBIGNUM            80 bignum.c       	REALLOC_N(RBIGNUM(x)->digits, BDIGIT, ++RBIGNUM(x)->len);
RBIGNUM            82 bignum.c       	ds[RBIGNUM(x)->len-1] = 1;
RBIGNUM            96 bignum.c       	long len = RBIGNUM(x)->len;
RBIGNUM           100 bignum.c       	RBIGNUM(x)->len = ++len;
RBIGNUM           108 bignum.c       		if (RBIGNUM(x)->sign) {
RBIGNUM           141 bignum.c           RBIGNUM(big)->len = i+1;
RBIGNUM           157 bignum.c       	RBIGNUM(big)->sign = 0;
RBIGNUM           188 bignum.c       	long len = RBIGNUM(val)->len;
RBIGNUM           200 bignum.c       	if (!RBIGNUM(val)->sign) q = -q;
RBIGNUM           236 bignum.c           RBIGNUM(big)->len = i+1;
RBIGNUM           239 bignum.c       	RBIGNUM(big)->sign = 0;
RBIGNUM           260 bignum.c           len = RBIGNUM(val)->len * SIZEOF_BDIGITS;
RBIGNUM           265 bignum.c           if (!RBIGNUM(val)->sign) {
RBIGNUM           288 bignum.c       	RBIGNUM(big)->sign = 0;
RBIGNUM           428 bignum.c       	    RBIGNUM(big)->sign = sign;
RBIGNUM           537 bignum.c           RBIGNUM(big)->len = i+1;
RBIGNUM           553 bignum.c       	RBIGNUM(big)->sign = 0;
RBIGNUM           599 bignum.c           i = RBIGNUM(x)->len;
RBIGNUM           642 bignum.c           s[0] = RBIGNUM(x)->sign ? '+' : '-';
RBIGNUM           662 bignum.c           RSTRING(ss)->len -= RBIGNUM(x)->sign?j:j-1;
RBIGNUM           663 bignum.c           memmove(RBIGNUM(x)->sign?s:s+1, s+j, RSTRING(ss)->len);
RBIGNUM           698 bignum.c           long len = RBIGNUM(x)->len;
RBIGNUM           720 bignum.c           if (!RBIGNUM(x)->sign) {
RBIGNUM           731 bignum.c           if (!RBIGNUM(x)->sign) {
RBIGNUM           745 bignum.c           if ((long)num < 0 && (RBIGNUM(x)->sign || (long)num != LONG_MIN)) {
RBIGNUM           748 bignum.c           if (!RBIGNUM(x)->sign) return -(long)num;
RBIGNUM           757 bignum.c           long len = RBIGNUM(x)->len;
RBIGNUM           777 bignum.c           if (!RBIGNUM(x)->sign) return -num;
RBIGNUM           786 bignum.c           if ((LONG_LONG)num < 0 && (RBIGNUM(x)->sign
RBIGNUM           790 bignum.c           if (!RBIGNUM(x)->sign) return -(LONG_LONG)num;
RBIGNUM           838 bignum.c           long i = RBIGNUM(x)->len;
RBIGNUM           848 bignum.c           if (!RBIGNUM(x)->sign) d = -d;
RBIGNUM           880 bignum.c           long xlen = RBIGNUM(x)->len;
RBIGNUM           897 bignum.c           if (RBIGNUM(x)->sign > RBIGNUM(y)->sign) return INT2FIX(1);
RBIGNUM           898 bignum.c           if (RBIGNUM(x)->sign < RBIGNUM(y)->sign) return INT2FIX(-1);
RBIGNUM           899 bignum.c           if (xlen < RBIGNUM(y)->len)
RBIGNUM           900 bignum.c       	return (RBIGNUM(x)->sign) ? INT2FIX(-1) : INT2FIX(1);
RBIGNUM           901 bignum.c           if (xlen > RBIGNUM(y)->len)
RBIGNUM           902 bignum.c       	return (RBIGNUM(x)->sign) ? INT2FIX(1) : INT2FIX(-1);
RBIGNUM           907 bignum.c       	(RBIGNUM(x)->sign ? INT2FIX(1) : INT2FIX(-1)) :
RBIGNUM           908 bignum.c       	    (RBIGNUM(x)->sign ? INT2FIX(-1) : INT2FIX(1));
RBIGNUM           943 bignum.c           if (RBIGNUM(x)->sign != RBIGNUM(y)->sign) return Qfalse;
RBIGNUM           944 bignum.c           if (RBIGNUM(x)->len != RBIGNUM(y)->len) return Qfalse;
RBIGNUM           945 bignum.c           if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM(y)->len) != 0) return Qfalse;
RBIGNUM           964 bignum.c           if (RBIGNUM(x)->sign != RBIGNUM(y)->sign) return Qfalse;
RBIGNUM           965 bignum.c           if (RBIGNUM(x)->len != RBIGNUM(y)->len) return Qfalse;
RBIGNUM           966 bignum.c           if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM(y)->len) != 0) return Qfalse;
RBIGNUM           982 bignum.c           RBIGNUM(z)->sign = !RBIGNUM(x)->sign;
RBIGNUM          1006 bignum.c           if (!RBIGNUM(x)->sign) get2comp(z);
RBIGNUM          1008 bignum.c           i = RBIGNUM(x)->len;
RBIGNUM          1012 bignum.c           RBIGNUM(z)->sign = !RBIGNUM(z)->sign;
RBIGNUM          1013 bignum.c           if (RBIGNUM(x)->sign) get2comp(z);
RBIGNUM          1024 bignum.c           long i = RBIGNUM(x)->len;
RBIGNUM          1027 bignum.c           if (RBIGNUM(x)->len < RBIGNUM(y)->len) {
RBIGNUM          1030 bignum.c           else if (RBIGNUM(x)->len == RBIGNUM(y)->len) {
RBIGNUM          1043 bignum.c           z = bignew(RBIGNUM(x)->len, z==0);
RBIGNUM          1046 bignum.c           for (i = 0, num = 0; i < RBIGNUM(y)->len; i++) {
RBIGNUM          1051 bignum.c           while (num && i < RBIGNUM(x)->len) {
RBIGNUM          1056 bignum.c           while (i < RBIGNUM(x)->len) {
RBIGNUM          1071 bignum.c           sign = (sign == RBIGNUM(y)->sign);
RBIGNUM          1072 bignum.c           if (RBIGNUM(x)->sign != sign) {
RBIGNUM          1077 bignum.c           if (RBIGNUM(x)->len > RBIGNUM(y)->len) {
RBIGNUM          1078 bignum.c       	len = RBIGNUM(x)->len + 1;
RBIGNUM          1082 bignum.c       	len = RBIGNUM(y)->len + 1;
RBIGNUM          1086 bignum.c           len = RBIGNUM(x)->len;
RBIGNUM          1092 bignum.c           len = RBIGNUM(y)->len;
RBIGNUM          1180 bignum.c           j = RBIGNUM(x)->len + RBIGNUM(y)->len + 1;
RBIGNUM          1181 bignum.c           z = bignew(j, RBIGNUM(x)->sign==RBIGNUM(y)->sign);
RBIGNUM          1184 bignum.c           for (i = 0; i < RBIGNUM(x)->len; i++) {
RBIGNUM          1188 bignum.c       	for (j = 0; j < RBIGNUM(y)->len; j++) {
RBIGNUM          1217 bignum.c           long nx = RBIGNUM(x)->len, ny = RBIGNUM(y)->len;
RBIGNUM          1243 bignum.c       	RBIGNUM(z)->sign = RBIGNUM(x)->sign==RBIGNUM(y)->sign;
RBIGNUM          1246 bignum.c       	    RBIGNUM(*modp)->sign = RBIGNUM(x)->sign;
RBIGNUM          1251 bignum.c           z = bignew(nx==ny?nx+2:nx+1, RBIGNUM(x)->sign==RBIGNUM(y)->sign);
RBIGNUM          1322 bignum.c       	RBIGNUM(*divp)->len = i;
RBIGNUM          1337 bignum.c       	RBIGNUM(*modp)->len = ny;
RBIGNUM          1338 bignum.c       	RBIGNUM(*modp)->sign = RBIGNUM(x)->sign;
RBIGNUM          1348 bignum.c           if (RBIGNUM(x)->sign != RBIGNUM(y)->sign && !BIGZEROP(mod)) {
RBIGNUM          1590 bignum.c           if (!RBIGNUM(y)->sign) {
RBIGNUM          1594 bignum.c           if (!RBIGNUM(x)->sign) {
RBIGNUM          1598 bignum.c           if (RBIGNUM(x)->len > RBIGNUM(y)->len) {
RBIGNUM          1599 bignum.c       	l1 = RBIGNUM(y)->len;
RBIGNUM          1600 bignum.c       	l2 = RBIGNUM(x)->len;
RBIGNUM          1603 bignum.c       	sign = RBIGNUM(y)->sign;
RBIGNUM          1606 bignum.c       	l1 = RBIGNUM(x)->len;
RBIGNUM          1607 bignum.c       	l2 = RBIGNUM(y)->len;
RBIGNUM          1610 bignum.c       	sign = RBIGNUM(x)->sign;
RBIGNUM          1612 bignum.c           z = bignew(l2, RBIGNUM(x)->sign || RBIGNUM(y)->sign);
RBIGNUM          1621 bignum.c           if (!RBIGNUM(z)->sign) get2comp(z);
RBIGNUM          1646 bignum.c           if (!RBIGNUM(y)->sign) {
RBIGNUM          1650 bignum.c           if (!RBIGNUM(x)->sign) {
RBIGNUM          1654 bignum.c           if (RBIGNUM(x)->len > RBIGNUM(y)->len) {
RBIGNUM          1655 bignum.c       	l1 = RBIGNUM(y)->len;
RBIGNUM          1656 bignum.c       	l2 = RBIGNUM(x)->len;
RBIGNUM          1659 bignum.c       	sign = RBIGNUM(y)->sign;
RBIGNUM          1662 bignum.c       	l1 = RBIGNUM(x)->len;
RBIGNUM          1663 bignum.c       	l2 = RBIGNUM(y)->len;
RBIGNUM          1666 bignum.c       	sign = RBIGNUM(x)->sign;
RBIGNUM          1668 bignum.c           z = bignew(l2, RBIGNUM(x)->sign && RBIGNUM(y)->sign);
RBIGNUM          1677 bignum.c           if (!RBIGNUM(z)->sign) get2comp(z);
RBIGNUM          1704 bignum.c           if (!RBIGNUM(y)->sign) {
RBIGNUM          1708 bignum.c           if (!RBIGNUM(x)->sign) {
RBIGNUM          1712 bignum.c           if (RBIGNUM(x)->len > RBIGNUM(y)->len) {
RBIGNUM          1713 bignum.c       	l1 = RBIGNUM(y)->len;
RBIGNUM          1714 bignum.c       	l2 = RBIGNUM(x)->len;
RBIGNUM          1717 bignum.c       	sign = RBIGNUM(y)->sign;
RBIGNUM          1720 bignum.c       	l1 = RBIGNUM(x)->len;
RBIGNUM          1721 bignum.c       	l2 = RBIGNUM(y)->len;
RBIGNUM          1724 bignum.c       	sign = RBIGNUM(x)->sign;
RBIGNUM          1726 bignum.c           RBIGNUM(x)->sign = RBIGNUM(x)->sign?1:0;
RBIGNUM          1727 bignum.c           RBIGNUM(y)->sign = RBIGNUM(y)->sign?1:0;
RBIGNUM          1728 bignum.c           z = bignew(l2, !(RBIGNUM(x)->sign ^ RBIGNUM(y)->sign));
RBIGNUM          1737 bignum.c           if (!RBIGNUM(z)->sign) get2comp(z);
RBIGNUM          1763 bignum.c           len = RBIGNUM(x)->len;
RBIGNUM          1764 bignum.c           z = bignew(len+s1+1, RBIGNUM(x)->sign);
RBIGNUM          1800 bignum.c           if (s1 > RBIGNUM(x)->len) {
RBIGNUM          1801 bignum.c       	if (RBIGNUM(x)->sign)
RBIGNUM          1806 bignum.c           if (!RBIGNUM(x)->sign) {
RBIGNUM          1811 bignum.c           i = RBIGNUM(x)->len; j = i - s1;
RBIGNUM          1812 bignum.c           z = bignew(j, RBIGNUM(x)->sign);
RBIGNUM          1813 bignum.c           if (!RBIGNUM(x)->sign) {
RBIGNUM          1822 bignum.c           if (!RBIGNUM(x)->sign) {
RBIGNUM          1855 bignum.c       	if (!RBIGNUM(y)->sign || RBIGNUM(x)->sign)
RBIGNUM          1864 bignum.c           if (!RBIGNUM(x)->sign) {
RBIGNUM          1865 bignum.c       	if (s1 >= RBIGNUM(x)->len) return INT2FIX(1);
RBIGNUM          1870 bignum.c       	if (s1 >= RBIGNUM(x)->len) return INT2FIX(0);
RBIGNUM          1891 bignum.c           key = 0; digits = BDIGITS(x); len = RBIGNUM(x)->len;
RBIGNUM          1931 bignum.c           if (!RBIGNUM(x)->sign) {
RBIGNUM          1933 bignum.c       	RBIGNUM(x)->sign = 1;
RBIGNUM          1953 bignum.c           return LONG2FIX(RBIGNUM(big)->len*SIZEOF_BDIGITS);
RBIGNUM            27 compar.c       	if (RBIGNUM(val)->sign) return 1;
RBIGNUM           514 marshal.c      		char sign = RBIGNUM(obj)->sign ? '+' : '-';
RBIGNUM           515 marshal.c      		long len = RBIGNUM(obj)->len;
RBIGNUM           516 marshal.c      		BDIGIT *d = RBIGNUM(obj)->digits;
RBIGNUM          2536 numeric.c      	    if (!RBIGNUM(idx)->sign || val >= 0)
RBIGNUM           208 random.c                 len = RBIGNUM(seed)->len * SIZEOF_BDIGITS;
RBIGNUM           227 random.c               for (i = RBIGNUM(seed)->len-1; 0 <= i; i--) {
RBIGNUM           232 random.c                   buf[j] |= ((BDIGIT *)RBIGNUM(seed)->digits)[i];
RBIGNUM           608 sprintf.c      			if (!RBIGNUM(val)->sign) {
RBIGNUM           680 sprintf.c      		    if (!sign && bignum && !RBIGNUM(val)->sign)


RCFUNC_DATA

RCFUNC_DATA       128 ext/dl/cptr.c      f = NIL_P(sym) ? NULL : RCFUNC_DATA(sym)->ptr;
RCFUNC_DATA       162 ext/dl/cptr.c      f = RCFUNC_DATA(sym)->ptr;
RCFUNC_DATA       225 ext/dl/cptr.c        data->free = RCFUNC_DATA(val)->ptr;


RCLASS

RCLASS             74 class.c            RCLASS(clone)->super = RCLASS(orig)->super;
RCLASS             75 class.c            if (RCLASS(orig)->iv_tbl) {
RCLASS             78 class.c        	RCLASS(clone)->iv_tbl = st_copy(RCLASS(orig)->iv_tbl);
RCLASS             80 class.c        	st_delete(RCLASS(clone)->iv_tbl, (st_data_t*)&id, 0);
RCLASS             82 class.c        	st_delete(RCLASS(clone)->iv_tbl, (st_data_t*)&id, 0);
RCLASS             84 class.c            if (RCLASS(orig)->m_tbl) {
RCLASS             85 class.c        	RCLASS(clone)->m_tbl = st_init_numtable();
RCLASS             86 class.c        	st_foreach(RCLASS(orig)->m_tbl, clone_method,
RCLASS             87 class.c        	  (st_data_t)RCLASS(clone)->m_tbl);
RCLASS             97 class.c            if (RCLASS(clone)->super != 0) {
RCLASS            125 class.c        	clone->super = RCLASS(klass)->super;
RCLASS            128 class.c        	if (RCLASS(klass)->iv_tbl) {
RCLASS            129 class.c        	    clone->iv_tbl = st_copy(RCLASS(klass)->iv_tbl);
RCLASS            132 class.c        	st_foreach(RCLASS(klass)->m_tbl, clone_method,
RCLASS            144 class.c        	if (!RCLASS(klass)->iv_tbl) {
RCLASS            145 class.c        	    RCLASS(klass)->iv_tbl = st_init_numtable();
RCLASS            147 class.c        	st_insert(RCLASS(klass)->iv_tbl, rb_intern("__attached__"), obj);
RCLASS            205 class.c        	if (rb_class_real(RCLASS(klass)->super) != super) {
RCLASS            234 class.c        	if (rb_class_real(RCLASS(klass)->super) != super) {
RCLASS            326 class.c            if (!RCLASS(module)->iv_tbl) {
RCLASS            327 class.c        	RCLASS(module)->iv_tbl = st_init_numtable();
RCLASS            329 class.c            klass->iv_tbl = RCLASS(module)->iv_tbl;
RCLASS            330 class.c            klass->m_tbl = RCLASS(module)->m_tbl;
RCLASS            367 class.c        	if (RCLASS(klass)->m_tbl == RCLASS(module)->m_tbl)
RCLASS            370 class.c        	for (p = RCLASS(klass)->super; p; p = RCLASS(p)->super) {
RCLASS            373 class.c        		if (RCLASS(p)->m_tbl == RCLASS(module)->m_tbl) {
RCLASS            385 class.c        	RCLASS(c)->super = include_class_new(module, RCLASS(c)->super);
RCLASS            386 class.c        	c = RCLASS(c)->super;
RCLASS            389 class.c        	module = RCLASS(module)->super;
RCLASS            417 class.c            for (p = RCLASS(mod)->super; p; p = RCLASS(p)->super) {
RCLASS            450 class.c            for (p = RCLASS(mod)->super; p; p = RCLASS(p)->super) {
RCLASS            479 class.c            for (p = mod; p; p = RCLASS(p)->super) {
RCLASS            570 class.c            for (; mod; mod = RCLASS(mod)->super) {
RCLASS            571 class.c        	st_foreach(RCLASS(mod)->m_tbl, method_entry, (st_data_t)list);
RCLASS            714 class.c        	st_foreach(RCLASS(klass)->m_tbl, method_entry, (st_data_t)list);
RCLASS            715 class.c        	klass = RCLASS(klass)->super;
RCLASS            719 class.c        	    st_foreach(RCLASS(klass)->m_tbl, method_entry, (st_data_t)list);
RCLASS            720 class.c        	    klass = RCLASS(klass)->super;
RCLASS            903 error.c        	    klass = (VALUE)RCLASS(klass)->super;
RCLASS            404 eval.c             st_insert(RCLASS(klass)->m_tbl, mid, (st_data_t)body);
RCLASS            435 eval.c             while (!st_lookup(RCLASS(klass)->m_tbl, id, (st_data_t *)&body)) {
RCLASS            436 eval.c         	klass = RCLASS(klass)->super;
RCLASS            531 eval.c             if (!st_delete(RCLASS(klass)->m_tbl, &mid, (st_data_t *)&body) ||
RCLASS           1767 eval.c         	struct RClass *klass = RCLASS(cbase->nd_clss);
RCLASS           1792 eval.c         	    while (RCLASS(klass)->iv_tbl &&
RCLASS           1793 eval.c         		   st_lookup(RCLASS(klass)->iv_tbl, id, &result)) {
RCLASS           2042 eval.c             if (RTEST(ruby_verbose) && st_lookup(RCLASS(klass)->m_tbl, name, (st_data_t *)&node)) {
RCLASS           2047 eval.c             st_insert(RCLASS(klass)->m_tbl, name,
RCLASS           2203 eval.c         	if (rb_method_boundp(RCLASS(val)->super, ruby_frame->this_func, 0)) {
RCLASS           3787 eval.c         	    if (st_lookup(RCLASS(klass)->m_tbl, node->nd_mid, (st_data_t *)&body)) {
RCLASS           3851 eval.c         		    tmp = rb_class_real(RCLASS(klass)->super);
RCLASS           5943 eval.c             if (RCLASS(klass)->super == 0) {
RCLASS           5948 eval.c             result = rb_call(RCLASS(klass)->super, self, ruby_frame->this_func, argc, argv, CALLING_SUPER);
RCLASS           7215 eval.c         	    m = RCLASS(m)->super;
RCLASS           8653 eval.c         	klass = RCLASS(klass)->super;
RCLASS           8659 eval.c         	rklass = RCLASS(rklass)->super;
RCLASS           9008 eval.c         	    st_table *m_tbl = RCLASS(data->rklass)->m_tbl;
RCLASS           9009 eval.c         	    while (RCLASS(rklass)->m_tbl != m_tbl) {
RCLASS           9010 eval.c         		rklass = RCLASS(rklass)->super;
RCLASS            346 marshal.c      	if (check && RCLASS(klass)->m_tbl->num_entries ||
RCLASS            347 marshal.c      	    (RCLASS(klass)->iv_tbl && RCLASS(klass)->iv_tbl->num_entries > 1)) {
RCLASS            350 marshal.c      	klass = RCLASS(klass)->super;
RCLASS            356 marshal.c      	klass = RCLASS(klass)->super;
RCLASS            141 object.c       	cl = RCLASS(cl)->super;
RCLASS            443 object.c       	if (cl == c || RCLASS(cl)->m_tbl == RCLASS(c)->m_tbl)
RCLASS            445 object.c       	cl = RCLASS(cl)->super;
RCLASS           1214 object.c       	if (RCLASS(mod)->m_tbl == RCLASS(arg)->m_tbl)
RCLASS           1216 object.c       	mod = RCLASS(mod)->super;
RCLASS           1220 object.c       	if (RCLASS(arg)->m_tbl == RCLASS(start)->m_tbl)
RCLASS           1222 object.c       	arg = RCLASS(arg)->super;
RCLASS           1385 object.c           if (RCLASS(klass)->super != 0) {
RCLASS           1394 object.c           RCLASS(klass)->super = super;
RCLASS           1416 object.c           if (RCLASS(klass)->super == 0) {
RCLASS           1475 object.c           VALUE super = RCLASS(klass)->super;
RCLASS           1481 object.c       	super = RCLASS(super)->super;
RCLASS            437 ruby.h         #define RMODULE(obj) RCLASS(obj)
RCLASS             28 struct.c       	c = RCLASS(c)->super;
RCLASS             80 variable.c     	if (!RCLASS(value)->iv_tbl) return ST_CONTINUE;
RCLASS             96 variable.c     	    st_foreach(RCLASS(value)->iv_tbl, fc_i, (st_data_t)&arg);
RCLASS            120 variable.c         if (RCLASS(rb_cObject)->iv_tbl) {
RCLASS            121 variable.c     	st_foreach_safe(RCLASS(rb_cObject)->iv_tbl, fc_i, (st_data_t)&arg);
RCLASS            131 variable.c     	st_delete(RCLASS(klass)->iv_tbl, &tmp_classpath, 0);
RCLASS            152 variable.c     	    st_delete(RCLASS(klass)->iv_tbl, (st_data_t*)&classid, 0);
RCLASS            184 variable.c         if (RCLASS(klass)->iv_tbl && st_lookup(RCLASS(klass)->iv_tbl,
RCLASS           1176 variable.c         if ((tbl = RCLASS(mod)->iv_tbl) && st_lookup(tbl, id, &av) && av != Qundef)
RCLASS           1180 variable.c         tbl = RCLASS(mod)->iv_tbl;
RCLASS           1201 variable.c         st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, 0);
RCLASS           1202 variable.c         if (st_lookup(RCLASS(mod)->iv_tbl, autoload, &val)) {
RCLASS           1211 variable.c     	    if (st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, &val)) {
RCLASS           1239 variable.c         if (!st_lookup(RCLASS(mod)->iv_tbl, autoload, &val) ||
RCLASS           1258 variable.c     	if (st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, &val)) {
RCLASS           1268 variable.c         struct st_table *tbl = RCLASS(mod)->iv_tbl;
RCLASS           1286 variable.c     	while (RCLASS(tmp)->iv_tbl && st_lookup(RCLASS(tmp)->iv_tbl,id,&value)) {
RCLASS           1298 variable.c     	tmp = RCLASS(tmp)->super;
RCLASS           1349 variable.c         if (RCLASS(mod)->iv_tbl && st_delete(ROBJECT(mod)->iv_tbl, (st_data_t*)&id, &val)) {
RCLASS           1383 variable.c         if (RCLASS(mod)->iv_tbl) {
RCLASS           1384 variable.c     	st_foreach_safe(RCLASS(mod)->iv_tbl, sv_i, (st_data_t)tbl);
RCLASS           1395 variable.c     	tmp = RCLASS(tmp)->super;
RCLASS           1447 variable.c     	if (RCLASS(tmp)->iv_tbl && st_lookup(RCLASS(tmp)->iv_tbl, id, &value)) {
RCLASS           1453 variable.c     	tmp = RCLASS(tmp)->super;
RCLASS           1496 variable.c         if (!RCLASS(klass)->iv_tbl) {
RCLASS           1497 variable.c     	RCLASS(klass)->iv_tbl = st_init_numtable();
RCLASS           1502 variable.c     	if (st_lookup(RCLASS(klass)->iv_tbl, id, &value)) {
RCLASS           1510 variable.c         st_insert(RCLASS(klass)->iv_tbl, id, val);
RCLASS           1550 variable.c         if (RCLASS(klass)->iv_tbl && st_lookup(RCLASS(klass)->iv_tbl,id,&value)) {
RCLASS           1562 variable.c         if (RCLASS(klass)->iv_tbl && st_lookup(RCLASS(klass)->iv_tbl,id,0)) {
RCLASS           1632 variable.c         if (RCLASS(obj)->iv_tbl) {
RCLASS           1633 variable.c     	st_foreach_safe(RCLASS(obj)->iv_tbl, cv_i, ary);
RCLASS           1671 variable.c         if (RCLASS(mod)->iv_tbl && st_delete(ROBJECT(mod)->iv_tbl, (st_data_t*)&id, &val)) {


RDATA

RDATA            1632 dir.c          	RDATA(dir)->dfree != (RUBY_DATA_FUNC)free_dir) {
RDATA              69 enumerator.c       if (RDATA(obj)->dmark != enumerator_mark) {
RDATA            2374 eval.c             if (TYPE(proc) == T_DATA && RDATA(proc)->dfree == (RUBY_DATA_FUNC)blk_free) {
RDATA            8404 eval.c             if (RDATA(other)->dmark != (RUBY_DATA_FUNC)blk_mark) return Qfalse;
RDATA            8714 eval.c             if (TYPE(other) != T_DATA || RDATA(other)->dmark != (RUBY_DATA_FUNC)bm_mark)
RDATA            9251 eval.c             if (TYPE(m) == T_DATA && RDATA(m)->dmark == (RUBY_DATA_FUNC)bm_mark) {
RDATA            9317 eval.c             if (RDATA(body)->dmark == (RUBY_DATA_FUNC)bm_mark) {
RDATA            9331 eval.c             else if (RDATA(body)->dmark == (RUBY_DATA_FUNC)blk_mark) {
RDATA            10069 eval.c             if (TYPE(data) != T_DATA || RDATA(data)->dmark != (RUBY_DATA_FUNC)thread_mark) {
RDATA            10073 eval.c             return (rb_thread_t)RDATA(data)->data;
RDATA            12132 eval.c         		RDATA(th->thread)->dfree = NULL;
RDATA              98 ext/bigdecimal/bigdecimal.c         if(RDATA(v)->dfree ==(void *) BigDecimal_delete) {
RDATA             224 ext/iconv/iconv.c     if (RDATA(obj)->dfree != ICONV_FREE) {
RDATA             638 ext/openssl/ossl_ocsp.c     RDATA(self)->data = newid;
RDATA             328 ext/openssl/ossl_x509store.c     RDATA(obj)->data = NULL;
RDATA              40 ext/stringio/stringio.c #define IS_STRIO(obj) (RDATA(obj)->dmark == (RUBY_DATA_FUNC)strio_mark)
RDATA             212 ext/strscan/strscan.c     if (TYPE(obj) != T_DATA || RDATA(obj)->dmark != (RUBY_DATA_FUNC)strscan_mark) {
RDATA             397 ruby.h         #define DATA_PTR(dta) (RDATA(dta)->data)
RDATA             216 time.c             if (TYPE(time) == T_DATA && RDATA(time)->dfree == time_free) {
RDATA             253 time.c             if (TYPE(time) == T_DATA && RDATA(time)->dfree == time_free) {
RDATA             905 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
RDATA             934 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
RDATA             998 time.c             if (TYPE(time) != T_DATA || RDATA(time)->dfree != time_free) {
RDATA            1271 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
RDATA            1298 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
RDATA            1156 variable.c         if (RDATA(av)->dmark != (RUBY_DATA_FUNC)rb_mark_tbl ||
RDATA            1157 variable.c     	RDATA(av)->dfree != (RUBY_DATA_FUNC)st_free_table) {


READABLE

READABLE          107 ext/stringio/stringio.c     if (!READABLE(ptr)) {
READABLE          402 ext/stringio/stringio.c     if (!READABLE(ptr)) {
READABLE          454 ext/stringio/stringio.c     if (READABLE(ptr)) return Qfalse;


READ_CHECK

READ_CHECK        941 io.c               READ_CHECK(fptr);
READ_CHECK       1225 io.c           	READ_CHECK(fptr);
READ_CHECK       1270 io.c               READ_CHECK(fptr);
READ_CHECK       1416 io.c               READ_CHECK(fptr);
READ_CHECK       1851 io.c           	READ_CHECK(fptr);
READ_CHECK       1882 io.c               READ_CHECK(fptr);


READ_DATA_BUFFERED

READ_DATA_BUFFERED 2245 io.c               if ((fptr->mode & FMODE_READABLE) && READ_DATA_BUFFERED(fptr)) {
READ_DATA_BUFFERED 2337 io.c               if (READ_DATA_BUFFERED(fptr)) {
READ_DATA_BUFFERED 2381 io.c               if (!(fptr->mode & FMODE_BINMODE) && READ_DATA_BUFFERED(fptr)) {


READ_DATA_PENDING

READ_DATA_PENDING  160 io.c           #define READ_DATA_BUFFERED(fptr) READ_DATA_PENDING(fptr)
READ_DATA_PENDING  163 io.c               if (!READ_DATA_PENDING(fptr)) {\
READ_DATA_PENDING  339 io.c               return READ_DATA_PENDING(fptr);
READ_DATA_PENDING  353 io.c               if (!READ_DATA_PENDING(fptr)) {
READ_DATA_PENDING  940 io.c               if (READ_DATA_PENDING(fptr)) return Qfalse;
READ_DATA_PENDING 4412 io.c           	    if (READ_DATA_PENDING(fptr)) { /* check for buffered data */


READ_DATA_PENDING_COUNT

READ_DATA_PENDING_COUNT 1130 io.c               n = READ_DATA_PENDING_COUNT(fptr);
READ_DATA_PENDING_COUNT 1187 io.c               off_t siz = READ_DATA_PENDING_COUNT(fptr);
READ_DATA_PENDING_COUNT 1441 io.c           	long pending = READ_DATA_PENDING_COUNT(fptr);
READ_DATA_PENDING_COUNT 1501 io.c           	while ((cnt = READ_DATA_PENDING_COUNT(fptr)) > 0) {


READ_DATA_PENDING_PTR

READ_DATA_PENDING_PTR 1443 io.c           	    const char *p = READ_DATA_PENDING_PTR(fptr);
READ_DATA_PENDING_PTR 1503 io.c           	    const char *p = READ_DATA_PENDING_PTR(fptr);


REALLOC_N

REALLOC_N         344 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, len);
REALLOC_N         411 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, new_capa);
REALLOC_N         504 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->aux.capa);
REALLOC_N         600 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->aux.capa);
REALLOC_N         997 array.c        	    REALLOC_N(RARRAY(ary)->ptr, VALUE, len);
REALLOC_N        1015 array.c        	    REALLOC_N(RARRAY(ary)->ptr, VALUE, alen);
REALLOC_N        1757 array.c        	    REALLOC_N(RARRAY(ary)->ptr, VALUE, i2 * 2);
REALLOC_N        2068 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, ARY_DEFAULT_SIZE * 2);
REALLOC_N        2137 array.c        	    REALLOC_N(RARRAY(ary)->ptr, VALUE, end);
REALLOC_N        2678 array.c            REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
REALLOC_N          80 bignum.c       	REALLOC_N(RBIGNUM(x)->digits, BDIGIT, ++RBIGNUM(x)->len);
REALLOC_N         197 ext/gdbm/gdbm.c     RSTRING(str)->ptr = REALLOC_N(val.dptr,char,val.dsize+1);
REALLOC_N         243 ext/gdbm/gdbm.c     RSTRING(str)->ptr = REALLOC_N(key.dptr,char,key.dsize+1);
REALLOC_N         267 ext/gdbm/gdbm.c     RSTRING(str)->ptr = REALLOC_N(key2.dptr,char,key2.dsize+1);
REALLOC_N         312 ext/readline/readline.c 	REALLOC_N(basic_word_break_characters, char, RSTRING(str)->len + 1);
REALLOC_N         354 ext/readline/readline.c 	REALLOC_N(completer_word_break_characters, char, RSTRING(str)->len + 1);
REALLOC_N         396 ext/readline/readline.c 	REALLOC_N(basic_quote_characters, char, RSTRING(str)->len + 1);
REALLOC_N         439 ext/readline/readline.c 	REALLOC_N(completer_quote_characters, char, RSTRING(str)->len + 1);
REALLOC_N         482 ext/readline/readline.c 	REALLOC_N(filename_quote_characters, char, RSTRING(str)->len + 1);
REALLOC_N        1731 hash.c         	REALLOC_N(environ, char*, i+2);	/* just expand it a bit */
REALLOC_N        4788 parse.y        	REALLOC_N(tokenbuf, char, 60);
REALLOC_N        4799 parse.y        	REALLOC_N(tokenbuf, char, toksiz);
REALLOC_N        8039 parse.y        	REALLOC_N(lvtbl->tbl, ID, lvtbl->cnt+2);
REALLOC_N        8115 parse.y        		REALLOC_N(vars, VALUE, len+1);
REALLOC_N        8142 parse.y        	REALLOC_N(lvtbl->dnames, ID, lvtbl->dname_size+1);
REALLOC_N          35 string.c           REALLOC_N(RSTRING(str)->ptr, char, (capacity)+1);\
REALLOC_N         613 string.c       	    REALLOC_N(RSTRING(str)->ptr, char, len+1);
REALLOC_N         669 string.c       	REALLOC_N(RSTRING(str)->ptr, char, RSTRING(str)->len+len);
REALLOC_N         722 string.c       	    REALLOC_N(RSTRING(str)->ptr, char, len+1);
REALLOC_N        3079 win32/win32.c  	    REALLOC_N(curitem, char, needlen);


RECURSION_EXIST

RECURSION_EXIST  2508 regcomp.c            r = RECURSION_EXIST;
RECURSION_EXIST  2543 regcomp.c            return (head == 0 ? RECURSION_EXIST : RECURSION_INFINITE);


RECURSION_INFINITE

RECURSION_INFINITE 2494 regcomp.c      	if (ret < 0 || ret == RECURSION_INFINITE) return ret;
RECURSION_INFINITE 2511 regcomp.c      	if (ret < 0 || ret == RECURSION_INFINITE) return ret;
RECURSION_INFINITE 2543 regcomp.c            return (head == 0 ? RECURSION_EXIST : RECURSION_INFINITE);


REDUCE

REDUCE            519 ext/racc/cparse/cparse.c             REDUCE(v, act);
REDUCE            626 ext/racc/cparse/cparse.c         REDUCE(v, act);


REGEX_TRANSFER

REGEX_TRANSFER   4603 regcomp.c        REGEX_TRANSFER(to, from);
REGEX_TRANSFER   4637 regcomp.c          REGEX_TRANSFER(reg, head);


REG_CASESTATE

REG_CASESTATE     800 re.c               state = FL_TEST(re, REG_CASESTATE);
REG_CASESTATE     803 re.c           	FL_SET(re, REG_CASESTATE);
REG_CASESTATE     808 re.c           	FL_UNSET(re, REG_CASESTATE);
REG_CASESTATE    1337 re.c           	FL_SET(re, REG_CASESTATE);


REPEAT_INFINITE

REPEAT_INFINITE   392 regint.h       #define IS_REPEAT_INFINITE(n)   ((n) == REPEAT_INFINITE)
REPEAT_INFINITE  2129 regparse.c         p->lower  = 0;  p->upper = REPEAT_INFINITE;  p->greedy = 1;
REPEAT_INFINITE  2133 regparse.c         p->lower  = 0;  p->upper = REPEAT_INFINITE;  p->greedy = 0;
REPEAT_INFINITE  2142 regparse.c         c->lower  = 1;  c->upper = REPEAT_INFINITE;  c->greedy = 1;
REPEAT_INFINITE  2148 regparse.c         c->lower  = 1;  c->upper = REPEAT_INFINITE;  c->greedy = 0;
REPEAT_INFINITE  2277 regparse.c           up = REPEAT_INFINITE;  /* {n,} : {n,infinite} */
REPEAT_INFINITE  2849 regparse.c           tok->u.repeat.upper = REPEAT_INFINITE;
REPEAT_INFINITE  2857 regparse.c           tok->u.repeat.upper = REPEAT_INFINITE;
REPEAT_INFINITE  3272 regparse.c           tok->u.repeat.upper = REPEAT_INFINITE;
REPEAT_INFINITE  3283 regparse.c           tok->u.repeat.upper = REPEAT_INFINITE;
REPEAT_INFINITE  4964 regparse.c         qn = node_new_qualifier(0, REPEAT_INFINITE, 0);


REPEAT_RANGE_ALLOC

REPEAT_RANGE_ALLOC  628 regcomp.c          p = (OnigRepeatRange* )xmalloc(sizeof(OnigRepeatRange) * REPEAT_RANGE_ALLOC);
REPEAT_RANGE_ALLOC  631 regcomp.c          reg->repeat_range_alloc = REPEAT_RANGE_ALLOC;
REPEAT_RANGE_ALLOC  635 regcomp.c          n = reg->repeat_range_alloc + REPEAT_RANGE_ALLOC;


RESIZE_CAPA

RESIZE_CAPA       465 string.c       	    RESIZE_CAPA(str, RSTRING(str)->len);
RESIZE_CAPA       646 string.c       	RESIZE_CAPA(str, capa);
RESIZE_CAPA       703 string.c       	RESIZE_CAPA(str, capa);
RESIZE_CAPA      1316 string.c       	RESIZE_CAPA(str, RSTRING(str)->len + 1);
RESIZE_CAPA      1543 string.c       	RESIZE_CAPA(str, RSTRING(str)->len + RSTRING(val)->len - len + 1);
RESIZE_CAPA      1622 string.c       		RESIZE_CAPA(str, RSTRING(str)->len);
RESIZE_CAPA      1856 string.c       	    RESIZE_CAPA(str, RSTRING(str)->len + RSTRING(repl)->len - plen);
RESIZE_CAPA      1976 string.c       	    RESIZE_CAPA(dest, blen);
RESIZE_CAPA      2006 string.c       	    RESIZE_CAPA(dest, blen);


RESTORE_EXIT

RESTORE_EXIT     10185 eval.c               case RESTORE_EXIT:
RESTORE_EXIT     11808 eval.c         	    rb_thread_main_jump(ruby_errinfo, RESTORE_EXIT);
RESTORE_EXIT     12253 eval.c         			RESTORE_EXIT);


RESTORE_FATAL

RESTORE_FATAL    10167 eval.c               case RESTORE_FATAL:
RESTORE_FATAL    10724 eval.c         	    rb_thread_restore_context(next, RESTORE_FATAL);


RESTORE_INTERRUPT

RESTORE_INTERRUPT 10170 eval.c               case RESTORE_INTERRUPT:
RESTORE_INTERRUPT 12191 eval.c             rb_thread_restore_context(curr_thread, RESTORE_INTERRUPT);


RESTORE_NORMAL

RESTORE_NORMAL   10193 eval.c               case RESTORE_NORMAL:
RESTORE_NORMAL   10727 eval.c             rb_thread_restore_context(next, RESTORE_NORMAL);
RESTORE_NORMAL   12632 eval.c             rb_thread_restore_context(th, RESTORE_NORMAL);


RESTORE_RAISE

RESTORE_RAISE    10176 eval.c               case RESTORE_RAISE:
RESTORE_RAISE    10396 eval.c             rb_thread_main_jump(e, RESTORE_RAISE);
RESTORE_RAISE    11802 eval.c         		rb_thread_main_jump(ruby_errinfo, RESTORE_RAISE);
RESTORE_RAISE    12282 eval.c             rb_thread_restore_context(curr_thread, RESTORE_RAISE);


RESTORE_SIGNAL

RESTORE_SIGNAL   10182 eval.c               case RESTORE_SIGNAL:
RESTORE_SIGNAL   12211 eval.c             rb_thread_restore_context(curr_thread, RESTORE_SIGNAL);


RESTORE_TRAP

RESTORE_TRAP     10173 eval.c               case RESTORE_TRAP:
RESTORE_TRAP     12231 eval.c             rb_thread_restore_context(curr_thread, RESTORE_TRAP);


RETSIGTYPE

RETSIGTYPE        459 intern.h       void posix_signal(int, RETSIGTYPE (*)(int));
RETSIGTYPE        462 intern.h       void posix_nativethread_signal(int, RETSIGTYPE (*)(int));
RETSIGTYPE       1492 process.c          RETSIGTYPE (*hfunc)(int);
RETSIGTYPE       1495 process.c          RETSIGTYPE (*qfunc)(int);
RETSIGTYPE       1497 process.c          RETSIGTYPE (*ifunc)(int);
RETSIGTYPE        324 signal.c       typedef RETSIGTYPE (*sighandler_t)(int);
RETSIGTYPE        440 signal.c       static RETSIGTYPE
RETSIGTYPE        478 signal.c       static RETSIGTYPE
RETSIGTYPE        493 signal.c       static RETSIGTYPE
RETSIGTYPE        508 signal.c       static RETSIGTYPE


RETURN

RETURN            245 dir.c          	RETURN(FNM_NOMATCH);
RETURN            253 dir.c          		RETURN(0);
RETURN            256 dir.c          		RETURN(FNM_NOMATCH);
RETURN            263 dir.c          		RETURN(FNM_NOMATCH);
RETURN            271 dir.c          		RETURN(FNM_NOMATCH);
RETURN            284 dir.c          	    RETURN(ISEND(p) ? 0 : FNM_NOMATCH);
RETURN            300 dir.c          	RETURN(FNM_NOMATCH);
RETURN           2717 eval.c             if (!node) RETURN(Qnil);
RETURN           2799 eval.c         	RETURN(Qnil);
RETURN           2802 eval.c         	RETURN(self);
RETURN           2805 eval.c         	RETURN(Qnil);
RETURN           2808 eval.c         	RETURN(Qtrue);
RETURN           2811 eval.c         	RETURN(Qfalse);
RETURN           2814 eval.c         	RETURN(ruby_errinfo);
RETURN           2860 eval.c         	RETURN(Qnil);
RETURN           2902 eval.c         	RETURN(Qnil);
RETURN           2937 eval.c         	RETURN(result);
RETURN           2972 eval.c         	RETURN(result);
RETURN           3396 eval.c         		if (RTEST(val)) RETURN(val);
RETURN           3400 eval.c         		if (!RTEST(val)) RETURN(val);
RETURN           3421 eval.c         		if (RTEST(val)) RETURN(val);
RETURN           3425 eval.c         		if (!RTEST(val)) RETURN(val);


RETURN_ENUMERATOR

RETURN_ENUMERATOR  897 array.c        	RETURN_ENUMERATOR(ary, 0, 0);
RETURN_ENUMERATOR  936 array.c        	    RETURN_ENUMERATOR(ary, 0, 0);
RETURN_ENUMERATOR 1138 array.c            RETURN_ENUMERATOR(ary, 0, 0);
RETURN_ENUMERATOR 1165 array.c            RETURN_ENUMERATOR(ary, 0, 0);
RETURN_ENUMERATOR 1192 array.c            RETURN_ENUMERATOR(ary, 0, 0);
RETURN_ENUMERATOR 1601 array.c            RETURN_ENUMERATOR(ary, 0, 0);
RETURN_ENUMERATOR 1628 array.c            RETURN_ENUMERATOR(ary, 0, 0);
RETURN_ENUMERATOR 1704 array.c            RETURN_ENUMERATOR(ary, 0, 0);
RETURN_ENUMERATOR 1872 array.c            RETURN_ENUMERATOR(ary, 0, 0);
RETURN_ENUMERATOR 1900 array.c            RETURN_ENUMERATOR(ary, 0, 0);
RETURN_ENUMERATOR  546 dir.c              RETURN_ENUMERATOR(dir, 0, 0);
RETURN_ENUMERATOR  163 enum.c             RETURN_ENUMERATOR(obj, argc, argv);
RETURN_ENUMERATOR  201 enum.c             RETURN_ENUMERATOR(obj, 0, 0);
RETURN_ENUMERATOR  234 enum.c             RETURN_ENUMERATOR(obj, 0, 0);
RETURN_ENUMERATOR  276 enum.c             RETURN_ENUMERATOR(obj, 0, 0);
RETURN_ENUMERATOR  388 enum.c             RETURN_ENUMERATOR(obj, 0, 0);
RETURN_ENUMERATOR  519 enum.c             RETURN_ENUMERATOR(obj, 0, 0);
RETURN_ENUMERATOR  883 enum.c             RETURN_ENUMERATOR(obj, 0, 0);
RETURN_ENUMERATOR  924 enum.c             RETURN_ENUMERATOR(obj, 0, 0);
RETURN_ENUMERATOR  994 enum.c             RETURN_ENUMERATOR(obj, 0, 0);
RETURN_ENUMERATOR  781 hash.c             RETURN_ENUMERATOR(hash, 0, 0);
RETURN_ENUMERATOR  951 hash.c             RETURN_ENUMERATOR(hash, 0, 0);
RETURN_ENUMERATOR  982 hash.c             RETURN_ENUMERATOR(hash, 0, 0);
RETURN_ENUMERATOR 1015 hash.c             RETURN_ENUMERATOR(hash, 0, 0);
RETURN_ENUMERATOR 1051 hash.c             RETURN_ENUMERATOR(hash, 0, 0);
RETURN_ENUMERATOR 1819 hash.c             RETURN_ENUMERATOR(ehash, 0, 0);
RETURN_ENUMERATOR 1854 hash.c             RETURN_ENUMERATOR(ehash, 0, 0);
RETURN_ENUMERATOR 1897 hash.c             RETURN_ENUMERATOR(ehash, 0, 0);
RETURN_ENUMERATOR 1904 hash.c             RETURN_ENUMERATOR(ehash, 0, 0);
RETURN_ENUMERATOR 1958 hash.c             RETURN_ENUMERATOR(ehash, 0, 0);
RETURN_ENUMERATOR 1812 io.c               RETURN_ENUMERATOR(io, argc, argv);
RETURN_ENUMERATOR 1846 io.c               RETURN_ENUMERATOR(io, 0, 0);
RETURN_ENUMERATOR 4955 io.c               RETURN_ENUMERATOR(self, argc, argv);
RETURN_ENUMERATOR 5239 io.c               RETURN_ENUMERATOR(self, argc, argv);
RETURN_ENUMERATOR 5259 io.c               RETURN_ENUMERATOR(self, 0, 0);
RETURN_ENUMERATOR  286 range.c            RETURN_ENUMERATOR(range, argc, argv);
RETURN_ENUMERATOR  374 range.c            RETURN_ENUMERATOR(range, 0, 0);
RETURN_ENUMERATOR 1926 string.c       	RETURN_ENUMERATOR(str, argc, argv);
RETURN_ENUMERATOR 3396 string.c           RETURN_ENUMERATOR(str, argc, argv);
RETURN_ENUMERATOR 3456 string.c           RETURN_ENUMERATOR(str, 0, 0);
RETURN_ENUMERATOR  392 struct.c           RETURN_ENUMERATOR(s, 0, 0);
RETURN_ENUMERATOR  423 struct.c           RETURN_ENUMERATOR(s, 0, 0);


RETURN_IF

RETURN_IF        1681 dln.c              RETURN_IF(!fname);
RETURN_IF        1682 dln.c              RETURN_IF(fname[0] == '/');
RETURN_IF        1683 dln.c              RETURN_IF(strncmp("./", fname, 2) == 0 || strncmp("../", fname, 3) == 0);
RETURN_IF        1684 dln.c              RETURN_IF(exe_flag && strchr(fname, '/'));
RETURN_IF        1686 dln.c              RETURN_IF(fname[0] == '\\');
RETURN_IF        1688 dln.c              RETURN_IF(strlen(fname) > 2 && fname[1] == ':');
RETURN_IF        1690 dln.c              RETURN_IF(strncmp(".\\", fname, 2) == 0 || strncmp("..\\", fname, 3) == 0);
RETURN_IF        1691 dln.c              RETURN_IF(exe_flag && strchr(fname, '\\'));


RETURN_IMPLICIT

RETURN_IMPLICIT  1543 ext/syck/token.c                             RETURN_IMPLICIT();
RETURN_IMPLICIT  1610 ext/syck/token.c                         RETURN_IMPLICIT();
RETURN_IMPLICIT  1625 ext/syck/token.c                         RETURN_IMPLICIT();
RETURN_IMPLICIT  1649 ext/syck/token.c {   RETURN_IMPLICIT(); }
RETURN_IMPLICIT  1660 ext/syck/token.c                         RETURN_IMPLICIT();
RETURN_IMPLICIT  1675 ext/syck/token.c                         RETURN_IMPLICIT();
RETURN_IMPLICIT  1700 ext/syck/token.c {   RETURN_IMPLICIT(); }


RETURN_YAML_BLOCK

RETURN_YAML_BLOCK 2421 ext/syck/token.c                                 RETURN_YAML_BLOCK();
RETURN_YAML_BLOCK 2470 ext/syck/token.c                             RETURN_YAML_BLOCK();
RETURN_YAML_BLOCK 2509 ext/syck/token.c                         RETURN_YAML_BLOCK();
RETURN_YAML_BLOCK 2550 ext/syck/token.c                             RETURN_YAML_BLOCK();


REVERSE32

REVERSE32         302 ext/digest/sha2/sha2.c 	REVERSE32(*data++, W256[j]); \
REVERSE32         411 ext/digest/sha2/sha2.c 		REVERSE32(*data++,W256[j]);
REVERSE32         567 ext/digest/sha2/sha2.c 				REVERSE32(context->state[j],context->state[j]);


REVERSE64

REVERSE64         530 ext/digest/sha2/sha2.c 		REVERSE64(context->bitcount,context->bitcount);
REVERSE64         603 ext/digest/sha2/sha2.c 	REVERSE64(*data++, W512[j]); \
REVERSE64         707 ext/digest/sha2/sha2.c 		REVERSE64(*data++, W512[j]);
REVERSE64         820 ext/digest/sha2/sha2.c 	REVERSE64(context->bitcount[0],context->bitcount[0]);
REVERSE64         821 ext/digest/sha2/sha2.c 	REVERSE64(context->bitcount[1],context->bitcount[1]);
REVERSE64         871 ext/digest/sha2/sha2.c 				REVERSE64(context->state[j],context->state[j]);
REVERSE64         920 ext/digest/sha2/sha2.c 				REVERSE64(context->state[j],context->state[j]);


RE_OPTION_ONCE

RE_OPTION_ONCE   3625 parse.y        			    node = NEW_LIT(rb_reg_compile("", 0, options & ~RE_OPTION_ONCE));
RE_OPTION_ONCE   3634 parse.y        							      options & ~RE_OPTION_ONCE);
RE_OPTION_ONCE   3640 parse.y        			    if (options & RE_OPTION_ONCE) {
RE_OPTION_ONCE   3646 parse.y        			    node->nd_cflag = options & ~RE_OPTION_ONCE;
RE_OPTION_ONCE   5007 parse.y        	    options |= RE_OPTION_ONCE;


RFILE

RFILE              64 ext/openssl/ossl.h #if defined(RFILE) /*&& !defined(OSSL_DEBUG)*/
RFILE             156 file.c             fptr = RFILE(rb_io_taint_check(obj))->fptr;
RFILE            1102 io.c               fptr = RFILE(rb_io_taint_check(obj))->fptr;
RFILE            2052 io.c               fptr = RFILE(io)->fptr;
RFILE            2085 io.c               rb_io_check_closed(RFILE(io)->fptr);
RFILE            2124 io.c               fptr = RFILE(io)->fptr;
RFILE            2885 io.c           	    rb_io_synchronized(RFILE(orig_stdout)->fptr);
RFILE            2886 io.c           	    rb_io_synchronized(RFILE(orig_stderr)->fptr);
RFILE            3388 io.c               fptr = RFILE(file)->fptr;
RFILE            3390 io.c           	fptr = RFILE(file)->fptr = ALLOC(OpenFile);
RFILE            3937 io.c               else if (RFILE(io)->fptr) {
RFILE            3958 io.c           	RFILE(io)->fptr = ofp;
RFILE            3989 io.c               if (RFILE(io)->fptr) {
RFILE            4906 io.c               rb_io_synchronized(RFILE(w)->fptr);
RFILE              54 rubyio.h       #define GetOpenFile(obj,fp) rb_io_check_closed((fp) = RFILE(rb_io_taint_check(obj))->fptr)
RFILE              57 rubyio.h           if (RFILE(obj)->fptr) {\
RFILE              59 rubyio.h       	free(RFILE(obj)->fptr);\
RFILE              60 rubyio.h       	RFILE(obj)->fptr = 0;\
RFILE              63 rubyio.h           fp = RFILE(obj)->fptr = ALLOC(OpenFile);\


RFLOAT

RFLOAT            891 bignum.c       	return rb_dbl_cmp(rb_big2dbl(x), RFLOAT(y)->value);
RFLOAT            935 bignum.c       	    a = RFLOAT(y)->value;
RFLOAT           1125 bignum.c       	return rb_float_new(rb_big2dbl(x) + RFLOAT(y)->value);
RFLOAT           1150 bignum.c       	return rb_float_new(rb_big2dbl(x) - RFLOAT(y)->value);
RFLOAT           1174 bignum.c       	return rb_float_new(rb_big2dbl(x) * RFLOAT(y)->value);
RFLOAT           1380 bignum.c       	return rb_float_new(rb_big2dbl(x) / RFLOAT(y)->value);
RFLOAT           1506 bignum.c       	dy = RFLOAT(y)->value;
RFLOAT           1537 bignum.c       	d = RFLOAT(y)->value;
RFLOAT            508 marshal.c      	    w_float(RFLOAT(obj)->value, arg);
RFLOAT             39 math.c             return rb_float_new(atan2(RFLOAT(y)->value, RFLOAT(x)->value));
RFLOAT             56 math.c             return rb_float_new(cos(RFLOAT(x)->value));
RFLOAT             72 math.c             return rb_float_new(sin(RFLOAT(x)->value));
RFLOAT             88 math.c             return rb_float_new(tan(RFLOAT(x)->value));
RFLOAT            105 math.c             d = acos(RFLOAT(x)->value);
RFLOAT            126 math.c             d = asin(RFLOAT(x)->value);
RFLOAT            144 math.c             return rb_float_new(atan(RFLOAT(x)->value));
RFLOAT            168 math.c             return rb_float_new(cosh(RFLOAT(x)->value));
RFLOAT            192 math.c             return rb_float_new(sinh(RFLOAT(x)->value));
RFLOAT            216 math.c             return rb_float_new(tanh(RFLOAT(x)->value));
RFLOAT            233 math.c             d = acosh(RFLOAT(x)->value);
RFLOAT            251 math.c             return rb_float_new(asinh(RFLOAT(x)->value));
RFLOAT            268 math.c             d = atanh(RFLOAT(x)->value);
RFLOAT            286 math.c             return rb_float_new(exp(RFLOAT(x)->value));
RFLOAT            312 math.c             d = log(RFLOAT(x)->value);
RFLOAT            333 math.c             d = log10(RFLOAT(x)->value);
RFLOAT            355 math.c             d = sqrt(RFLOAT(x)->value);
RFLOAT            382 math.c             d = frexp(RFLOAT(x)->value, &exp);
RFLOAT            400 math.c             return rb_float_new(ldexp(RFLOAT(x)->value, NUM2INT(n)));
RFLOAT            417 math.c             return rb_float_new(hypot(RFLOAT(x)->value, RFLOAT(y)->value));
RFLOAT            431 math.c             return rb_float_new(erf(RFLOAT(x)->value));
RFLOAT            445 math.c             return rb_float_new(erfc(RFLOAT(x)->value));
RFLOAT            485 numeric.c          double value = RFLOAT(flt)->value;
RFLOAT            530 numeric.c          return rb_float_new(-RFLOAT(flt)->value);
RFLOAT            546 numeric.c      	return rb_float_new(RFLOAT(x)->value + (double)FIX2LONG(y));
RFLOAT            548 numeric.c      	return rb_float_new(RFLOAT(x)->value + rb_big2dbl(y));
RFLOAT            550 numeric.c      	return rb_float_new(RFLOAT(x)->value + RFLOAT(y)->value);
RFLOAT            569 numeric.c      	return rb_float_new(RFLOAT(x)->value - (double)FIX2LONG(y));
RFLOAT            571 numeric.c      	return rb_float_new(RFLOAT(x)->value - rb_big2dbl(y));
RFLOAT            573 numeric.c      	return rb_float_new(RFLOAT(x)->value - RFLOAT(y)->value);
RFLOAT            592 numeric.c      	return rb_float_new(RFLOAT(x)->value * (double)FIX2LONG(y));
RFLOAT            594 numeric.c      	return rb_float_new(RFLOAT(x)->value * rb_big2dbl(y));
RFLOAT            596 numeric.c      	return rb_float_new(RFLOAT(x)->value * RFLOAT(y)->value);
RFLOAT            619 numeric.c      	return rb_float_new(RFLOAT(x)->value / (double)f_y);
RFLOAT            622 numeric.c      	return rb_float_new(RFLOAT(x)->value / d);
RFLOAT            624 numeric.c      	return rb_float_new(RFLOAT(x)->value / RFLOAT(y)->value);
RFLOAT            680 numeric.c      	fy = RFLOAT(y)->value;
RFLOAT            685 numeric.c          flodivmod(RFLOAT(x)->value, fy, 0, &mod);
RFLOAT            710 numeric.c      	fy = RFLOAT(y)->value;
RFLOAT            715 numeric.c          flodivmod(RFLOAT(x)->value, fy, &div, &mod);
RFLOAT            734 numeric.c              return rb_float_new(pow(RFLOAT(x)->value, (double)FIX2LONG(y)));
RFLOAT            736 numeric.c      	return rb_float_new(pow(RFLOAT(x)->value, rb_big2dbl(y)));
RFLOAT            738 numeric.c              return rb_float_new(pow(RFLOAT(x)->value, RFLOAT(y)->value));
RFLOAT            811 numeric.c      	b = RFLOAT(y)->value;
RFLOAT            817 numeric.c          a = RFLOAT(x)->value;
RFLOAT            836 numeric.c          d = RFLOAT(num)->value;
RFLOAT            870 numeric.c          a = RFLOAT(x)->value;
RFLOAT            881 numeric.c      	b = RFLOAT(y)->value;
RFLOAT            902 numeric.c          a = RFLOAT(x)->value;
RFLOAT            913 numeric.c      	b = RFLOAT(y)->value;
RFLOAT            937 numeric.c          a = RFLOAT(x)->value;
RFLOAT            948 numeric.c      	b = RFLOAT(y)->value;
RFLOAT            971 numeric.c          a = RFLOAT(x)->value;
RFLOAT            982 numeric.c      	b = RFLOAT(y)->value;
RFLOAT           1006 numeric.c          a = RFLOAT(x)->value;
RFLOAT           1017 numeric.c      	b = RFLOAT(y)->value;
RFLOAT           1043 numeric.c      	double a = RFLOAT(x)->value;
RFLOAT           1044 numeric.c      	double b = RFLOAT(y)->value;
RFLOAT           1079 numeric.c          double val = fabs(RFLOAT(flt)->value);
RFLOAT           1094 numeric.c          if (RFLOAT(num)->value == 0.0) {
RFLOAT           1116 numeric.c          double value = RFLOAT(num)->value;
RFLOAT           1136 numeric.c          double value = RFLOAT(num)->value;
RFLOAT           1158 numeric.c          double value = RFLOAT(num)->value;
RFLOAT           1186 numeric.c          double f = floor(RFLOAT(num)->value);
RFLOAT           1212 numeric.c          double f = ceil(RFLOAT(num)->value);
RFLOAT           1242 numeric.c          double f = RFLOAT(num)->value;
RFLOAT           1267 numeric.c          double f = RFLOAT(num)->value;
RFLOAT           1466 numeric.c      	if (RFLOAT(val)->value <= (double)LONG_MAX
RFLOAT           1467 numeric.c      	    && RFLOAT(val)->value >= (double)LONG_MIN) {
RFLOAT           1468 numeric.c      	    return (long)(RFLOAT(val)->value);
RFLOAT           1474 numeric.c      	    sprintf(buf, "%-.10g", RFLOAT(val)->value);
RFLOAT           1612 numeric.c      	if (RFLOAT(val)->value <= (double)LLONG_MAX
RFLOAT           1613 numeric.c      	    && RFLOAT(val)->value >= (double)LLONG_MIN) {
RFLOAT           1614 numeric.c      	    return (LONG_LONG)(RFLOAT(val)->value);
RFLOAT           1620 numeric.c      	    sprintf(buf, "%-.10g", RFLOAT(val)->value);
RFLOAT           1922 numeric.c      	return rb_float_new((double)FIX2LONG(x) + RFLOAT(y)->value);
RFLOAT           1959 numeric.c      	return rb_float_new((double)FIX2LONG(x) - RFLOAT(y)->value);
RFLOAT           2001 numeric.c      	return rb_float_new((double)FIX2LONG(x) * RFLOAT(y)->value);
RFLOAT           2056 numeric.c      	return rb_float_new((double)FIX2LONG(x) / RFLOAT(y)->value);
RFLOAT           2077 numeric.c      	    return rb_float_new((double)FIX2LONG(x) / RFLOAT(y)->value);
RFLOAT           2080 numeric.c      	    long div = (double)FIX2LONG(x) / RFLOAT(y)->value;
RFLOAT           2142 numeric.c      	    flodivmod((double)FIX2LONG(x), RFLOAT(y)->value, 0, &mod);
RFLOAT           2175 numeric.c      	    flodivmod((double)FIX2LONG(x), RFLOAT(y)->value, &div, &mod);
RFLOAT           2217 numeric.c      	return rb_float_new(pow((double)FIX2LONG(x), RFLOAT(y)->value));
RFLOAT           2244 numeric.c      	return (double)FIX2LONG(x) == RFLOAT(y)->value ? Qtrue : Qfalse;
RFLOAT           2273 numeric.c      	return rb_dbl_cmp((double)FIX2LONG(x), RFLOAT(y)->value);
RFLOAT           2300 numeric.c      	return (double)FIX2LONG(x) > RFLOAT(y)->value ? Qtrue : Qfalse;
RFLOAT           2327 numeric.c      	return (double)FIX2LONG(x) >= RFLOAT(y)->value ? Qtrue : Qfalse;
RFLOAT           2354 numeric.c      	return (double)FIX2LONG(x) < RFLOAT(y)->value ? Qtrue : Qfalse;
RFLOAT           2381 numeric.c      	return (double)FIX2LONG(x) <= RFLOAT(y)->value ? Qtrue : Qfalse;
RFLOAT           2005 object.c       	if (RFLOAT(val)->value <= (double)FIXNUM_MAX
RFLOAT           2006 object.c       	    && RFLOAT(val)->value >= (double)FIXNUM_MIN) {
RFLOAT           2009 object.c       	return rb_dbl2big(RFLOAT(val)->value);
RFLOAT           2165 object.c       	  if (isnan(RFLOAT(f)->value)) {
RFLOAT           2196 object.c       	return RFLOAT(val)->value;
RFLOAT           2210 object.c           return RFLOAT(rb_Float(val))->value;
RFLOAT            772 pack.c         		f = RFLOAT(rb_Float(from))->value;
RFLOAT            783 pack.c         		f = RFLOAT(rb_Float(from))->value;
RFLOAT            795 pack.c         		d = RFLOAT(rb_Float(from))->value;
RFLOAT            807 pack.c         		d = RFLOAT(rb_Float(from))->value;
RFLOAT            818 pack.c         		f = RFLOAT(rb_Float(from))->value;
RFLOAT            830 pack.c         		d = RFLOAT(rb_Float(from))->value;
RFLOAT           7867 parse.y        	RFLOAT(node->nd_lit)->value = -RFLOAT(node->nd_lit)->value;
RFLOAT            445 random.c       	if (RFLOAT(vmax)->value <= LONG_MAX && RFLOAT(vmax)->value >= LONG_MIN) {
RFLOAT            446 random.c       	    max = (long)RFLOAT(vmax)->value;
RFLOAT            449 random.c               if (RFLOAT(vmax)->value < 0)
RFLOAT            450 random.c                   vmax = rb_dbl2big(-RFLOAT(vmax)->value);
RFLOAT            452 random.c                   vmax = rb_dbl2big(RFLOAT(vmax)->value);
RFLOAT            499 sprintf.c      		    val = rb_dbl2big(RFLOAT(val)->value);
RFLOAT            707 sprintf.c      		fval = RFLOAT(rb_Float(val))->value;
RFLOAT            175 time.c         	if (interval && RFLOAT(time)->value < 0.0)
RFLOAT            180 time.c         	    d = modf(RFLOAT(time)->value, &f);
RFLOAT            183 time.c         		rb_raise(rb_eRangeError, "%f out of Time range", RFLOAT(time)->value);


RHASH

RHASH            2521 array.c        	if (st_lookup(RHASH(hash)->tbl, RARRAY(ary1)->ptr[i], 0)) continue;
RHASH            2551 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
RHASH            2583 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
RHASH            2589 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
RHASH            2618 array.c            if (RARRAY(ary)->len == RHASH(hash)->tbl->num_entries) {
RHASH            2623 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
RHASH             141 ext/iconv/iconv.c     if (RHASH(charset_map)->tbl && RHASH(charset_map)->tbl->num_entries) {
RHASH             144 ext/iconv/iconv.c 	if (st_lookup(RHASH(charset_map)->tbl, key, &val)) {
RHASH             330 ext/openssl/ossl_x509name.c     RHASH(hash)->ifnone = utf8str;
RHASH             635 ext/syck/rubyext.c     rb_hash_aset(bonus->data, INT2FIX(RHASH(bonus->data)->tbl->num_entries), obj);
RHASH             223 ext/tk/tkutil/tkutil.c     st_foreach(RHASH(keys)->tbl, to_strkey, new_keys);
RHASH             267 ext/tk/tkutil/tkutil.c             size += 2 * RHASH(RARRAY(ary)->ptr[idx])->tbl->num_entries;
RHASH             626 ext/tk/tkutil/tkutil.c     volatile VALUE dst = rb_ary_new2(2 * RHASH(hash)->tbl->num_entries);
RHASH             633 ext/tk/tkutil/tkutil.c     st_foreach(RHASH(hash)->tbl, push_kv, args);
RHASH             677 ext/tk/tkutil/tkutil.c     volatile VALUE dst = rb_ary_new2(2 * RHASH(hash)->tbl->num_entries);
RHASH             684 ext/tk/tkutil/tkutil.c     st_foreach(RHASH(hash)->tbl, push_kv_enc, args);
RHASH             911 ext/tk/tkutil/tkutil.c             size += 2 * RHASH(argv[idx])->tbl->num_entries;
RHASH             146 hash.c             tbl = RHASH(arg->hash)->tbl;
RHASH             149 hash.c             if (RHASH(arg->hash)->tbl != tbl) {
RHASH             167 hash.c             RHASH(hash)->iter_lev--;
RHASH             169 hash.c             if (RHASH(hash)->iter_lev == 0) {
RHASH             171 hash.c         	    st_cleanup_safe(RHASH(hash)->tbl, Qundef);
RHASH             181 hash.c             if (st_foreach(RHASH(arg->hash)->tbl, hash_foreach_iter, (st_data_t)arg)) {
RHASH             192 hash.c             RHASH(hash)->iter_lev++;
RHASH             222 hash.c             if (!RHASH(hash)->tbl) rb_raise(rb_eTypeError, "uninitialized Hash");
RHASH             273 hash.c         	RHASH(hash)->ifnone = rb_block_proc();
RHASH             278 hash.c         	RHASH(hash)->ifnone = ifnone;
RHASH             306 hash.c         	RHASH(hash)->ifnone = Qnil;
RHASH             307 hash.c         	RHASH(hash)->tbl = st_copy(RHASH(argv[0])->tbl);
RHASH             362 hash.c             if (RHASH(hash)->iter_lev > 0) {
RHASH             366 hash.c             tbl = st_init_table_with_size(&objhash, RHASH(hash)->tbl->num_entries);
RHASH             368 hash.c             st_free_table(RHASH(hash)->tbl);
RHASH             369 hash.c             RHASH(hash)->tbl = tbl;
RHASH             393 hash.c             if (!st_lookup(RHASH(hash)->tbl, key, &val)) {
RHASH             441 hash.c             if (!st_lookup(RHASH(hash)->tbl, key, &val)) {
RHASH             479 hash.c         	return rb_funcall(RHASH(hash)->ifnone, id_call, 2, hash, key);
RHASH             481 hash.c             return RHASH(hash)->ifnone;
RHASH             508 hash.c             RHASH(hash)->ifnone = ifnone;
RHASH             532 hash.c         	return RHASH(hash)->ifnone;
RHASH             604 hash.c             if (RHASH(hash)->iter_lev > 0) {
RHASH             605 hash.c         	if (st_delete_safe(RHASH(hash)->tbl, (st_data_t*)&key, &val, Qundef)) {
RHASH             610 hash.c             else if (st_delete(RHASH(hash)->tbl, (st_data_t*)&key, &val))
RHASH             661 hash.c         	return rb_funcall(RHASH(hash)->ifnone, id_call, 2, hash, Qnil);
RHASH             664 hash.c         	return RHASH(hash)->ifnone;
RHASH             709 hash.c             int n = RHASH(hash)->tbl->num_entries;
RHASH             711 hash.c             if (n == RHASH(hash)->tbl->num_entries) return Qnil;
RHASH             808 hash.c             if (RHASH(hash)->tbl->num_entries > 0) {
RHASH             837 hash.c             if (TYPE(key) != T_STRING || st_lookup(RHASH(hash)->tbl, key, 0)) {
RHASH             838 hash.c         	st_insert(RHASH(hash)->tbl, key, val);
RHASH             841 hash.c         	st_add_direct(RHASH(hash)->tbl, rb_str_new4(key), val);
RHASH             875 hash.c             RHASH(hash)->ifnone = RHASH(hash2)->ifnone;
RHASH             902 hash.c             return INT2FIX(RHASH(hash)->tbl->num_entries);
RHASH             919 hash.c             if (RHASH(hash)->tbl->num_entries == 0)
RHASH            1154 hash.c             if (RHASH(hash)->tbl == 0 || RHASH(hash)->tbl->num_entries == 0)
RHASH            1278 hash.c             if (st_lookup(RHASH(hash)->tbl, key, 0)) {
RHASH            1353 hash.c             if (RHASH(hash1)->tbl->num_entries != RHASH(hash2)->tbl->num_entries)
RHASH            1356 hash.c         	if (!(rb_equal(RHASH(hash1)->ifnone, RHASH(hash2)->ifnone) &&
RHASH            1361 hash.c             data.tbl = RHASH(hash2)->tbl;
RHASH             568 marshal.c      	    if (NIL_P(RHASH(obj)->ifnone)) {
RHASH             578 marshal.c      	    w_long(RHASH(obj)->tbl->num_entries, arg);
RHASH             580 marshal.c      	    if (!NIL_P(RHASH(obj)->ifnone)) {
RHASH             581 marshal.c      		w_object(RHASH(obj)->ifnone, arg, limit);
RHASH             890 marshal.c          rb_hash_aset(arg->data, INT2FIX(RHASH(arg->data)->tbl->num_entries), v);
RHASH            1119 marshal.c      		RHASH(v)->ifnone = r_object(arg);


RLIM2NUM

RLIM2NUM         1927 process.c      #if defined(HAVE_GETRLIMIT) && defined(RLIM2NUM)
RLIM2NUM         1935 process.c          return rb_assoc_new(RLIM2NUM(rlim.rlim_cur), RLIM2NUM(rlim.rlim_max));
RLIM2NUM         3648 process.c      #ifdef RLIM2NUM
RLIM2NUM         3650 process.c          rb_define_const(rb_mProcess, "RLIM_INFINITY", RLIM2NUM(RLIM_INFINITY));
RLIM2NUM         3653 process.c          rb_define_const(rb_mProcess, "RLIM_SAVED_MAX", RLIM2NUM(RLIM_SAVED_MAX));
RLIM2NUM         3656 process.c          rb_define_const(rb_mProcess, "RLIM_SAVED_CUR", RLIM2NUM(RLIM_SAVED_CUR));


RMATCH

RMATCH            673 re.c               RMATCH(obj)->str = RMATCH(orig)->str;
RMATCH            674 re.c               onig_region_free(RMATCH(obj)->regs, 0);
RMATCH            675 re.c               RMATCH(obj)->regs->allocated = 0;
RMATCH            676 re.c               onig_region_copy(RMATCH(obj)->regs, RMATCH(orig)->regs);
RMATCH            697 re.c               return INT2FIX(RMATCH(match)->regs->num_regs);
RMATCH            718 re.c               if (i < 0 || RMATCH(match)->regs->num_regs <= i)
RMATCH            721 re.c               if (RMATCH(match)->regs->beg[i] < 0)
RMATCH            724 re.c               return rb_assoc_new(INT2FIX(RMATCH(match)->regs->beg[i]),
RMATCH            725 re.c           			INT2FIX(RMATCH(match)->regs->end[i]));
RMATCH            746 re.c               if (i < 0 || RMATCH(match)->regs->num_regs <= i)
RMATCH            749 re.c               if (RMATCH(match)->regs->beg[i] < 0)
RMATCH            752 re.c               return INT2FIX(RMATCH(match)->regs->beg[i]);
RMATCH            773 re.c               if (i < 0 || RMATCH(match)->regs->num_regs <= i)
RMATCH            776 re.c               if (RMATCH(match)->regs->beg[i] < 0)
RMATCH            779 re.c               return INT2FIX(RMATCH(match)->regs->end[i]);
RMATCH            943 re.c               onig_region_copy(RMATCH(match)->regs, &regs);
RMATCH            944 re.c               RMATCH(match)->str = rb_str_new4(str);
RMATCH            956 re.c               if (nth >= RMATCH(match)->regs->num_regs) {
RMATCH            960 re.c           	nth += RMATCH(match)->regs->num_regs;
RMATCH            963 re.c               if (RMATCH(match)->BEG(nth) == -1) return Qfalse;
RMATCH            974 re.c               if (nth >= RMATCH(match)->regs->num_regs) {
RMATCH            978 re.c           	nth += RMATCH(match)->regs->num_regs;
RMATCH            981 re.c               start = RMATCH(match)->BEG(nth);
RMATCH            983 re.c               end = RMATCH(match)->END(nth);
RMATCH            985 re.c               str = rb_str_substr(RMATCH(match)->str, start, len);
RMATCH           1014 re.c               if (RMATCH(match)->BEG(0) == -1) return Qnil;
RMATCH           1015 re.c               str = rb_str_substr(RMATCH(match)->str, 0, RMATCH(match)->BEG(0));
RMATCH           1039 re.c               if (RMATCH(match)->BEG(0) == -1) return Qnil;
RMATCH           1040 re.c               str = RMATCH(match)->str;
RMATCH           1041 re.c               pos = RMATCH(match)->END(0);
RMATCH           1053 re.c               if (RMATCH(match)->BEG(0) == -1) return Qnil;
RMATCH           1055 re.c               for (i=RMATCH(match)->regs->num_regs-1; RMATCH(match)->BEG(i) == -1 && i > 0; i--)
RMATCH           1088 re.c               struct re_registers *regs = RMATCH(match)->regs;
RMATCH           1090 re.c               VALUE target = RMATCH(match)->str;
RMATCH           1214 re.c               return rb_get_values_at(match, RMATCH(match)->regs->num_regs, argc, argv, match_entry);
RMATCH           1237 re.c           	struct re_registers *regs = RMATCH(match)->regs;
RMATCH           1238 re.c           	VALUE target = RMATCH(match)->str;
RMATCH           1272 re.c               if (OBJ_TAINTED(RMATCH(match)->str)) OBJ_TAINT(str);
RMATCH           1290 re.c               return RMATCH(match)->str;	/* str is frozen */
RMATCH           1580 string.c           if (nth >= RMATCH(match)->regs->num_regs) {
RMATCH           1585 string.c       	if (-nth >= RMATCH(match)->regs->num_regs) {
RMATCH           1588 string.c       	nth += RMATCH(match)->regs->num_regs;
RMATCH           1591 string.c           start = RMATCH(match)->BEG(nth);
RMATCH           1595 string.c           end = RMATCH(match)->END(nth);
RMATCH           1839 string.c       	regs = RMATCH(match)->regs;
RMATCH           1957 string.c       	regs = RMATCH(match)->regs;
RMATCH           3290 string.c       	    regs = RMATCH(rb_backref_get())->regs;
RMATCH           3780 string.c       	regs = RMATCH(match)->regs;


RMD160_CTX

RMD160_CTX        128 ext/digest/rmd160/rmd160.c RMD160_Init(RMD160_CTX *context)
RMD160_CTX        352 ext/digest/rmd160/rmd160.c RMD160_Update(RMD160_CTX *context, const uint8_t *data, size_t nbytes)
RMD160_CTX        412 ext/digest/rmd160/rmd160.c RMD160_Final(uint8_t digest[20], RMD160_CTX *context)
RMD160_CTX        457 ext/digest/rmd160/rmd160.c int RMD160_Equal(RMD160_CTX* pctx1, RMD160_CTX* pctx2) {
RMD160_CTX         52 ext/digest/rmd160/rmd160.h void	RMD160_Init _((RMD160_CTX *));
RMD160_CTX         54 ext/digest/rmd160/rmd160.h void	RMD160_Update _((RMD160_CTX *, const uint8_t *, size_t));
RMD160_CTX         55 ext/digest/rmd160/rmd160.h void	RMD160_Final _((uint8_t[20], RMD160_CTX *));
RMD160_CTX         56 ext/digest/rmd160/rmd160.h int	RMD160_Equal _((RMD160_CTX *, RMD160_CTX *));
RMD160_CTX         58 ext/digest/rmd160/rmd160.h char	*RMD160_End _((RMD160_CTX *, char *));
RMD160_CTX         39 ext/digest/rmd160/rmd160hl.c RMD160_End(RMD160_CTX *ctx, char *buf)
RMD160_CTX         65 ext/digest/rmd160/rmd160hl.c     RMD160_CTX ctx;
RMD160_CTX         88 ext/digest/rmd160/rmd160hl.c     RMD160_CTX ctx;
RMD160_CTX         13 ext/digest/rmd160/rmd160init.c     sizeof(RMD160_CTX),
RMD160_CTX         13 ext/digest/rmd160/rmd160ossl.c RMD160_End(RMD160_CTX *ctx, char *buf)
RMD160_CTX         35 ext/digest/rmd160/rmd160ossl.c int RMD160_Equal(RMD160_CTX* pctx1, RMD160_CTX* pctx2) {
RMD160_CTX         18 ext/digest/rmd160/rmd160ossl.h char *RMD160_End(RMD160_CTX *ctx, char *buf);
RMD160_CTX         19 ext/digest/rmd160/rmd160ossl.h int RMD160_Equal(RMD160_CTX *pctx1, RMD160_CTX *pctx2);


RMD160_DIGEST_LENGTH

RMD160_DIGEST_LENGTH   66 ext/digest/rmd160/rmd160.h #define RMD160_DIGEST_STRING_LENGTH     (RMD160_DIGEST_LENGTH * 2 + 1)
RMD160_DIGEST_LENGTH   12 ext/digest/rmd160/rmd160init.c     RMD160_DIGEST_LENGTH,


RMD160_End

RMD160_End         58 ext/digest/rmd160/rmd160.h char	*RMD160_End _((RMD160_CTX *, char *));
RMD160_End         82 ext/digest/rmd160/rmd160hl.c     return(num < 0 ? 0 : RMD160_End(&ctx, buf));
RMD160_End         95 ext/digest/rmd160/rmd160hl.c     return(RMD160_End(&ctx, buf));
RMD160_End         16 ext/digest/rmd160/rmd160init.c     (hash_end_func_t)RMD160_End,
RMD160_End         18 ext/digest/rmd160/rmd160ossl.h char *RMD160_End(RMD160_CTX *ctx, char *buf);


RMD160_Equal

RMD160_Equal       56 ext/digest/rmd160/rmd160.h int	RMD160_Equal _((RMD160_CTX *, RMD160_CTX *));
RMD160_Equal       18 ext/digest/rmd160/rmd160init.c     (hash_equal_func_t)RMD160_Equal,
RMD160_Equal       19 ext/digest/rmd160/rmd160ossl.h int RMD160_Equal(RMD160_CTX *pctx1, RMD160_CTX *pctx2);


RMD160_Final

RMD160_Final       55 ext/digest/rmd160/rmd160.h void	RMD160_Final _((uint8_t[20], RMD160_CTX *));
RMD160_Final       52 ext/digest/rmd160/rmd160hl.c     RMD160_Final(digest,ctx);
RMD160_Final       17 ext/digest/rmd160/rmd160init.c     (hash_final_func_t)RMD160_Final,
RMD160_Final       26 ext/digest/rmd160/rmd160ossl.c     RMD160_Final(digest,ctx);


RMD160_Init

RMD160_Init        52 ext/digest/rmd160/rmd160.h void	RMD160_Init _((RMD160_CTX *));
RMD160_Init        71 ext/digest/rmd160/rmd160hl.c     RMD160_Init(&ctx);
RMD160_Init        93 ext/digest/rmd160/rmd160hl.c     RMD160_Init(&ctx);
RMD160_Init        14 ext/digest/rmd160/rmd160init.c     (hash_init_func_t)RMD160_Init,


RMD160_Transform

RMD160_Transform  387 ext/digest/rmd160/rmd160.c                 RMD160_Transform(context->state, X);
RMD160_Transform  398 ext/digest/rmd160/rmd160.c                         RMD160_Transform(context->state, X);
RMD160_Transform  436 ext/digest/rmd160/rmd160.c 		RMD160_Transform(context->state, X);
RMD160_Transform  444 ext/digest/rmd160/rmd160.c 	RMD160_Transform(context->state, X);
RMD160_Transform   53 ext/digest/rmd160/rmd160.h void	RMD160_Transform _((uint32_t[5], const uint32_t[16]));


RMD160_Update

RMD160_Update      54 ext/digest/rmd160/rmd160.h void	RMD160_Update _((RMD160_CTX *, const uint8_t *, size_t));
RMD160_Update      77 ext/digest/rmd160/rmd160hl.c 	RMD160_Update(&ctx, buffer, (size_t)num);
RMD160_Update      94 ext/digest/rmd160/rmd160hl.c     RMD160_Update(&ctx, data, len);
RMD160_Update      15 ext/digest/rmd160/rmd160init.c     (hash_update_func_t)RMD160_Update,


RNODE

RNODE             536 enum.c         	RARRAY(ary)->ptr[i] = RNODE(RARRAY(ary)->ptr[i])->u2.value;
RNODE             164 node.h         #define nd_type(n) ((int) (((RNODE(n))->flags & NODE_TYPEMASK)>>NODE_TYPESHIFT))
RNODE             166 node.h             RNODE(n)->flags=((RNODE(n)->flags&~NODE_TYPEMASK)|(((t)<<NODE_TYPESHIFT)&NODE_TYPEMASK))
RNODE             170 node.h         #define nd_line(n) ((unsigned int)(((RNODE(n))->flags>>NODE_LSHIFT)&NODE_LMASK))
RNODE             172 node.h             RNODE(n)->flags=((RNODE(n)->flags&~(-1<<NODE_LSHIFT))|(((l)&NODE_LMASK)<<NODE_LSHIFT))


ROBJECT

ROBJECT           603 marshal.c      	    w_ivar(ROBJECT(obj)->iv_tbl, &c_arg);
ROBJECT           180 object.c       	if (ROBJECT(dest)->iv_tbl) {
ROBJECT           181 object.c       	    st_free_table(ROBJECT(dest)->iv_tbl);
ROBJECT           182 object.c       	    ROBJECT(dest)->iv_tbl = 0;
ROBJECT           184 object.c       	if (ROBJECT(obj)->iv_tbl) {
ROBJECT           185 object.c       	    ROBJECT(dest)->iv_tbl = st_copy(ROBJECT(obj)->iv_tbl);
ROBJECT           337 object.c       	st_foreach_safe(ROBJECT(obj)->iv_tbl, inspect_i, str);
ROBJECT           363 object.c       	&& ROBJECT(obj)->iv_tbl
ROBJECT           364 object.c       	&& ROBJECT(obj)->iv_tbl->num_entries > 0) {
ROBJECT            51 variable.c     	if (ROBJECT(fc->track)->iv_tbl &&
ROBJECT            52 variable.c     	    st_lookup(ROBJECT(fc->track)->iv_tbl, classpath, &tmp)) {
ROBJECT           127 variable.c     	if (!ROBJECT(klass)->iv_tbl) {
ROBJECT           128 variable.c     	    ROBJECT(klass)->iv_tbl = st_init_numtable();
ROBJECT           130 variable.c     	st_insert(ROBJECT(klass)->iv_tbl, classpath, arg.path);
ROBJECT           143 variable.c         if (ROBJECT(klass)->iv_tbl) {
ROBJECT           144 variable.c     	if (!st_lookup(ROBJECT(klass)->iv_tbl, classpath, &path)) {
ROBJECT           147 variable.c     	    if (!st_lookup(ROBJECT(klass)->iv_tbl, classid, &path)) {
ROBJECT           151 variable.c     	    st_insert(ROBJECT(klass)->iv_tbl, classpath, path);
ROBJECT           923 variable.c     	if (ROBJECT(obj)->iv_tbl && st_lookup(ROBJECT(obj)->iv_tbl, id, &val))
ROBJECT           959 variable.c     	if (!ROBJECT(obj)->iv_tbl) ROBJECT(obj)->iv_tbl = st_init_numtable();
ROBJECT           960 variable.c     	st_insert(ROBJECT(obj)->iv_tbl, id, val);
ROBJECT           976 variable.c     	if (ROBJECT(obj)->iv_tbl && st_lookup(ROBJECT(obj)->iv_tbl, id, 0))
ROBJECT          1023 variable.c     	if (ROBJECT(obj)->iv_tbl) {
ROBJECT          1024 variable.c     	    st_foreach_safe(ROBJECT(obj)->iv_tbl, ivar_i, ary);
ROBJECT          1080 variable.c     	if (ROBJECT(obj)->iv_tbl && st_delete(ROBJECT(obj)->iv_tbl, (st_data_t*)&id, &val)) {
ROBJECT          1349 variable.c         if (RCLASS(mod)->iv_tbl && st_delete(ROBJECT(mod)->iv_tbl, (st_data_t*)&id, &val)) {
ROBJECT          1671 variable.c         if (RCLASS(mod)->iv_tbl && st_delete(ROBJECT(mod)->iv_tbl, (st_data_t*)&id, &val)) {


ROL

ROL                76 ext/digest/rmd160/rmd160.c       (a) = ROL((a), (s)) + (e);			\
ROL                77 ext/digest/rmd160/rmd160.c       (c) = ROL((c), 10);				\
ROL                81 ext/digest/rmd160/rmd160.c       (a) = ROL((a), (s)) + (e);			\
ROL                82 ext/digest/rmd160/rmd160.c       (c) = ROL((c), 10);				\
ROL                86 ext/digest/rmd160/rmd160.c       (a) = ROL((a), (s)) + (e);			\
ROL                87 ext/digest/rmd160/rmd160.c       (c) = ROL((c), 10);				\
ROL                91 ext/digest/rmd160/rmd160.c       (a) = ROL((a), (s)) + (e);			\
ROL                92 ext/digest/rmd160/rmd160.c       (c) = ROL((c), 10);				\
ROL                96 ext/digest/rmd160/rmd160.c       (a) = ROL((a), (s)) + (e);			\
ROL                97 ext/digest/rmd160/rmd160.c       (c) = ROL((c), 10);				\
ROL               101 ext/digest/rmd160/rmd160.c       (a) = ROL((a), (s)) + (e);			\
ROL               102 ext/digest/rmd160/rmd160.c       (c) = ROL((c), 10);				\
ROL               106 ext/digest/rmd160/rmd160.c       (a) = ROL((a), (s)) + (e);			\
ROL               107 ext/digest/rmd160/rmd160.c       (c) = ROL((c), 10);				\
ROL               111 ext/digest/rmd160/rmd160.c       (a) = ROL((a), (s)) + (e);			\
ROL               112 ext/digest/rmd160/rmd160.c       (c) = ROL((c), 10);				\
ROL               116 ext/digest/rmd160/rmd160.c       (a) = ROL((a), (s)) + (e);			\
ROL               117 ext/digest/rmd160/rmd160.c       (c) = ROL((c), 10);				\
ROL               121 ext/digest/rmd160/rmd160.c       (a) = ROL((a), (s)) + (e);			\
ROL               122 ext/digest/rmd160/rmd160.c       (c) = ROL((c), 10);				\


ROOT_GID

ROOT_GID         1810 win32/win32.c  	return ROOT_GID;
ROOT_GID         1816 win32/win32.c      return ROOT_GID;
ROOT_GID         1828 win32/win32.c      return (gid == ROOT_GID ? 0 : -1);


ROOT_UID

ROOT_UID         1798 win32/win32.c  	return ROOT_UID;
ROOT_UID         1804 win32/win32.c  	return ROOT_UID;
ROOT_UID         1822 win32/win32.c      return (uid == ROOT_UID ? 0 : -1);


ROTATE_LEFT

ROTATE_LEFT       238 ext/digest/md5/md5.c   a = ROTATE_LEFT(t, s) + b
ROTATE_LEFT       264 ext/digest/md5/md5.c   a = ROTATE_LEFT(t, s) + b
ROTATE_LEFT       290 ext/digest/md5/md5.c   a = ROTATE_LEFT(t, s) + b
ROTATE_LEFT       316 ext/digest/md5/md5.c   a = ROTATE_LEFT(t, s) + b


ROUND256

ROUND256          364 ext/digest/sha2/sha2.c 		ROUND256(a,b,c,d,e,f,g,h);
ROUND256          365 ext/digest/sha2/sha2.c 		ROUND256(h,a,b,c,d,e,f,g);
ROUND256          366 ext/digest/sha2/sha2.c 		ROUND256(g,h,a,b,c,d,e,f);
ROUND256          367 ext/digest/sha2/sha2.c 		ROUND256(f,g,h,a,b,c,d,e);
ROUND256          368 ext/digest/sha2/sha2.c 		ROUND256(e,f,g,h,a,b,c,d);
ROUND256          369 ext/digest/sha2/sha2.c 		ROUND256(d,e,f,g,h,a,b,c);
ROUND256          370 ext/digest/sha2/sha2.c 		ROUND256(c,d,e,f,g,h,a,b);
ROUND256          371 ext/digest/sha2/sha2.c 		ROUND256(b,c,d,e,f,g,h,a);


ROUND256_0_TO_15

ROUND256_0_TO_15  352 ext/digest/sha2/sha2.c 		ROUND256_0_TO_15(a,b,c,d,e,f,g,h);
ROUND256_0_TO_15  353 ext/digest/sha2/sha2.c 		ROUND256_0_TO_15(h,a,b,c,d,e,f,g);
ROUND256_0_TO_15  354 ext/digest/sha2/sha2.c 		ROUND256_0_TO_15(g,h,a,b,c,d,e,f);
ROUND256_0_TO_15  355 ext/digest/sha2/sha2.c 		ROUND256_0_TO_15(f,g,h,a,b,c,d,e);
ROUND256_0_TO_15  356 ext/digest/sha2/sha2.c 		ROUND256_0_TO_15(e,f,g,h,a,b,c,d);
ROUND256_0_TO_15  357 ext/digest/sha2/sha2.c 		ROUND256_0_TO_15(d,e,f,g,h,a,b,c);
ROUND256_0_TO_15  358 ext/digest/sha2/sha2.c 		ROUND256_0_TO_15(c,d,e,f,g,h,a,b);
ROUND256_0_TO_15  359 ext/digest/sha2/sha2.c 		ROUND256_0_TO_15(b,c,d,e,f,g,h,a);


ROUND512

ROUND512          662 ext/digest/sha2/sha2.c 		ROUND512(a,b,c,d,e,f,g,h);
ROUND512          663 ext/digest/sha2/sha2.c 		ROUND512(h,a,b,c,d,e,f,g);
ROUND512          664 ext/digest/sha2/sha2.c 		ROUND512(g,h,a,b,c,d,e,f);
ROUND512          665 ext/digest/sha2/sha2.c 		ROUND512(f,g,h,a,b,c,d,e);
ROUND512          666 ext/digest/sha2/sha2.c 		ROUND512(e,f,g,h,a,b,c,d);
ROUND512          667 ext/digest/sha2/sha2.c 		ROUND512(d,e,f,g,h,a,b,c);
ROUND512          668 ext/digest/sha2/sha2.c 		ROUND512(c,d,e,f,g,h,a,b);
ROUND512          669 ext/digest/sha2/sha2.c 		ROUND512(b,c,d,e,f,g,h,a);


ROUND512_0_TO_15

ROUND512_0_TO_15  650 ext/digest/sha2/sha2.c 		ROUND512_0_TO_15(a,b,c,d,e,f,g,h);
ROUND512_0_TO_15  651 ext/digest/sha2/sha2.c 		ROUND512_0_TO_15(h,a,b,c,d,e,f,g);
ROUND512_0_TO_15  652 ext/digest/sha2/sha2.c 		ROUND512_0_TO_15(g,h,a,b,c,d,e,f);
ROUND512_0_TO_15  653 ext/digest/sha2/sha2.c 		ROUND512_0_TO_15(f,g,h,a,b,c,d,e);
ROUND512_0_TO_15  654 ext/digest/sha2/sha2.c 		ROUND512_0_TO_15(e,f,g,h,a,b,c,d);
ROUND512_0_TO_15  655 ext/digest/sha2/sha2.c 		ROUND512_0_TO_15(d,e,f,g,h,a,b,c);
ROUND512_0_TO_15  656 ext/digest/sha2/sha2.c 		ROUND512_0_TO_15(c,d,e,f,g,h,a,b);
ROUND512_0_TO_15  657 ext/digest/sha2/sha2.c 		ROUND512_0_TO_15(b,c,d,e,f,g,h,a);


RPTR_DATA

RPTR_DATA         328 ext/dl/cptr.c    size = RPTR_DATA(self)->size;
RPTR_DATA         340 ext/dl/cptr.c    size = RPTR_DATA(self)->size;
RPTR_DATA         355 ext/dl/cptr.c  	retval = INT2NUM(*((char*)RPTR_DATA(self)->ptr + offset));
RPTR_DATA         360 ext/dl/cptr.c  	retval = rb_tainted_str_new((char *)RPTR_DATA(self)->ptr + offset, len);
RPTR_DATA         379 ext/dl/cptr.c  	((char*)RPTR_DATA(self)->ptr)[offset] = NUM2UINT(arg1);
RPTR_DATA         394 ext/dl/cptr.c  	memcpy((char *)RPTR_DATA(self)->ptr + offset, mem, len);
RPTR_DATA         409 ext/dl/cptr.c      return LONG2NUM(RPTR_DATA(self)->size);
RPTR_DATA         412 ext/dl/cptr.c      RPTR_DATA(self)->size = NUM2LONG(size);


RREGC_SIZE

RREGC_SIZE        265 regexec.c            to->beg = (int* )xmalloc(RREGC_SIZE);
RREGC_SIZE        266 regexec.c            to->end = (int* )xmalloc(RREGC_SIZE);
RREGC_SIZE        271 regexec.c          to->beg = (int* )xrealloc(to->beg, RREGC_SIZE);
RREGC_SIZE        272 regexec.c          to->end = (int* )xrealloc(to->end, RREGC_SIZE);


RREGEXP

RREGEXP           437 ext/strscan/strscan.c         ret = onig_match(RREGEXP(regex)->ptr, (UChar* )CURPTR(p),
RREGEXP           442 ext/strscan/strscan.c         ret = onig_search(RREGEXP(regex)->ptr,
RREGEXP           547 marshal.c      	    w_bytes(RREGEXP(obj)->str, RREGEXP(obj)->len, arg);
RREGEXP           257 re.c               if (!RREGEXP(re)->ptr || !RREGEXP(re)->str) {
RREGEXP           324 re.c           	if (RREGEXP(re)->ptr->options & ONIG_OPTION_MULTILINE)
RREGEXP           326 re.c           	if (RREGEXP(re)->ptr->options & ONIG_OPTION_IGNORECASE)
RREGEXP           328 re.c           	if (RREGEXP(re)->ptr->options & ONIG_OPTION_EXTEND)
RREGEXP           368 re.c               str = rb_str_new(RREGEXP(re)->str,RREGEXP(re)->len);
RREGEXP           388 re.c               return rb_reg_desc(RREGEXP(re)->str, RREGEXP(re)->len, re);
RREGEXP           423 re.c               options = RREGEXP(re)->ptr->options;
RREGEXP           424 re.c               ptr = RREGEXP(re)->str;
RREGEXP           425 re.c               len = RREGEXP(re)->len;
RREGEXP           484 re.c           	    options = RREGEXP(re)->ptr->options;
RREGEXP           485 re.c           	    ptr = RREGEXP(re)->str;
RREGEXP           486 re.c           	    len = RREGEXP(re)->len;
RREGEXP           532 re.c               if (RREGEXP(re)->ptr->options & ONIG_OPTION_IGNORECASE) return Qtrue;
RREGEXP           804 re.c           	RREGEXP(re)->ptr->options |= ONIG_OPTION_IGNORECASE;
RREGEXP           809 re.c           	RREGEXP(re)->ptr->options &= ~ONIG_OPTION_IGNORECASE;
RREGEXP           830 re.c           	reg = RREGEXP(re)->ptr;
RREGEXP           831 re.c           	pattern = ((UChar*)RREGEXP(re)->str);
RREGEXP           832 re.c           	r = onig_recompile(reg, pattern, pattern + RREGEXP(re)->len,
RREGEXP           838 re.c           	     rb_reg_raise(pattern, RREGEXP(re)->len, err, re, Qfalse);
RREGEXP           865 re.c               enc = (RREGEXP(re)->ptr)->enc;
RREGEXP           910 re.c               result = onig_search(RREGEXP(re)->ptr,
RREGEXP           928 re.c           	    rb_reg_raise(RREGEXP(re)->str, RREGEXP(re)->len, err, 0, Qfalse);
RREGEXP          1306 re.c               struct RRegexp *re = RREGEXP(obj);
RREGEXP          1388 re.c               if (reg_cache && RREGEXP(reg_cache)->len == RSTRING(str)->len
RREGEXP          1391 re.c           	&& memcmp(RREGEXP(reg_cache)->str, RSTRING(str)->ptr, RSTRING(str)->len) == 0)
RREGEXP          1423 re.c               hashval = RREGEXP(re)->ptr->options;
RREGEXP          1424 re.c               len = RREGEXP(re)->len;
RREGEXP          1425 re.c               p  = RREGEXP(re)->str;
RREGEXP          1455 re.c               if (RREGEXP(re1)->len != RREGEXP(re2)->len) return Qfalse;
RREGEXP          1456 re.c               if (memcmp(RREGEXP(re1)->str, RREGEXP(re2)->str, RREGEXP(re1)->len) == 0 &&
RREGEXP          1458 re.c           	RREGEXP(re1)->ptr->options == RREGEXP(re2)->ptr->options) {
RREGEXP          1657 re.c           	flags = RREGEXP(argv[0])->ptr->options & 0xf;
RREGEXP          1676 re.c           	s = RREGEXP(argv[0])->str;
RREGEXP          1677 re.c           	len = RREGEXP(argv[0])->len;
RREGEXP          1867 re.c               options = RREGEXP(re)->ptr->options &
RREGEXP          1975 re.c               rb_reg_initialize(copy, RREGEXP(re)->str, RREGEXP(re)->len,
RREGEXP          1138 string.c       	if (RREGEXP(sub)->len) {


RSA_HAS_PRIVATE

RSA_HAS_PRIVATE    23 ext/openssl/ossl_pkey_rsa.c #define RSA_PRIVATE(obj,rsa) (RSA_HAS_PRIVATE(rsa)||OSSL_PKEY_IS_PRIVATE(obj))
RSA_HAS_PRIVATE   205 ext/openssl/ossl_pkey_rsa.c     if (RSA_HAS_PRIVATE(pkey->pkey.rsa)) {
RSA_HAS_PRIVATE   232 ext/openssl/ossl_pkey_rsa.c     if(RSA_HAS_PRIVATE(pkey->pkey.rsa))


RSA_PRIVATE

RSA_PRIVATE       180 ext/openssl/ossl_pkey_rsa.c     return (RSA_PRIVATE(self, pkey->pkey.rsa)) ? Qtrue : Qfalse;
RSA_PRIVATE       301 ext/openssl/ossl_pkey_rsa.c     if (!RSA_PRIVATE(self, pkey->pkey.rsa)) {
RSA_PRIVATE       326 ext/openssl/ossl_pkey_rsa.c     if (!RSA_PRIVATE(self, pkey->pkey.rsa)) {


RSHIFT

RSHIFT             35 bignum.c       #define BIGDN(x) RSHIFT(x,BITSPERDIG)
RSHIFT            274 bignum.c       #define BNEG(b) (RSHIFT(((BDIGIT*)b)[QUAD_SIZE/SIZEOF_BDIGITS-1],BITSPERDIG-1) != 0)
RSHIFT             28 marshal.c      #define SHORTDN(x) RSHIFT(x,BITSPERSHORT)
RSHIFT            157 marshal.c          if (!(RSHIFT(x, 31) == 0 || RSHIFT(x, 31) == -1)) {
RSHIFT            177 marshal.c      	x = RSHIFT(x,8);
RSHIFT            443 marshal.c      	if (RSHIFT((long)obj, 31) == 0 || RSHIFT((long)obj, 31) == -1) {
RSHIFT           2507 numeric.c          val = RSHIFT(val, i);
RSHIFT            146 ruby.h         #define FIXNUM_MIN RSHIFT((long)LONG_MIN,1)
RSHIFT            174 ruby.h         #define FIX2LONG(x) RSHIFT((long)x,1)
RSHIFT            187 ruby.h         #define SYM2ID(x) RSHIFT((long)x,8)
RSHIFT           1941 time.c         	p = RSHIFT(p, 8);
RSHIFT           1945 time.c         	s = RSHIFT(s, 8);


RSTRING

RSTRING          1269 array.c        	len += NIL_P(tmp) ? 10 : RSTRING(tmp)->len;
RSTRING          1273 array.c        	len += RSTRING(sep)->len * (RARRAY(ary)->len - 1);
RSTRING           503 bignum.c       	s = RSTRING(str)->ptr;
RSTRING           506 bignum.c       	len = RSTRING(str)->len;
RSTRING           640 bignum.c           s = RSTRING(ss)->ptr;
RSTRING           662 bignum.c           RSTRING(ss)->len -= RBIGNUM(x)->sign?j:j-1;
RSTRING           663 bignum.c           memmove(RBIGNUM(x)->sign?s:s+1, s+j, RSTRING(ss)->len);
RSTRING           664 bignum.c           s[RSTRING(ss)->len] = '\0';
RSTRING           398 dir.c              dp->dir = opendir(RSTRING(dirname)->ptr);
RSTRING           402 dir.c          	    dp->dir = opendir(RSTRING(dirname)->ptr);
RSTRING           405 dir.c          	    rb_sys_fail(RSTRING(dirname)->ptr);
RSTRING           408 dir.c              dp->path = strdup(RSTRING(dirname)->ptr);
RSTRING           465 dir.c          	snprintf(RSTRING(s)->ptr, len+1, "#<%s:%s>", c, dirp->path);
RSTRING           680 dir.c              if (chdir(RSTRING(path)->ptr) < 0)
RSTRING           681 dir.c          	rb_sys_fail(RSTRING(path)->ptr);
RSTRING           823 dir.c              path = RSTRING(*dir)->ptr;
RSTRING           844 dir.c              if (chroot(RSTRING(path)->ptr) == -1)
RSTRING           845 dir.c          	rb_sys_fail(RSTRING(path)->ptr);
RSTRING           881 dir.c              if (mkdir(RSTRING(path)->ptr, mode) == -1)
RSTRING           882 dir.c          	rb_sys_fail(RSTRING(path)->ptr);
RSTRING           900 dir.c              if (rmdir(RSTRING(dir)->ptr) < 0)
RSTRING           901 dir.c          	rb_sys_fail(RSTRING(dir)->ptr);
RSTRING          1487 dir.c              while (offset < RSTRING(str)->len) {
RSTRING          1488 dir.c          	int status = push_glob(ary, RSTRING(str)->ptr + offset, flags);
RSTRING          1491 dir.c          	if (offset >= RSTRING(str)->len) break;
RSTRING          1492 dir.c          	p = RSTRING(str)->ptr + offset;
RSTRING          1494 dir.c          	pend = RSTRING(str)->ptr + RSTRING(str)->len;
RSTRING          1497 dir.c          	offset = p - RSTRING(str)->ptr;
RSTRING          1513 dir.c          	status = push_glob(ary, RSTRING(str)->ptr, flags);
RSTRING          1781 dir.c              if (fnmatch(RSTRING(pattern)->ptr, RSTRING(path)->ptr, flags) == 0)
RSTRING           224 error.c        		    etype = RSTRING(rb_obj_as_string(x))->ptr;
RSTRING           381 error.c            if (RSTRING(exc)->len == 0) {
RSTRING           702 error.c        	    if (NIL_P(d) || RSTRING(d)->len > 65) {
RSTRING           705 error.c        	    desc = RSTRING(d)->ptr;
RSTRING           748 error.c            rb_raise(rb_eArgError, "invalid value for %s: %s", type, RSTRING(s)->ptr);
RSTRING           859 error.c        			  (int)RSTRING(str)->len, RSTRING(str)->ptr);
RSTRING          1164 eval.c         	    warn_print2(RSTRING(mesg)->ptr, RSTRING(mesg)->len);
RSTRING          1172 eval.c         	einfo = RSTRING(e)->ptr;
RSTRING          1173 eval.c         	elen = RSTRING(e)->len;
RSTRING          1189 eval.c         	    warn_print2(RSTRING(epath)->ptr, RSTRING(epath)->len);
RSTRING          1196 eval.c         	    if (RSTRING(epath)->ptr[0] == '#') epath = 0;
RSTRING          1205 eval.c         		warn_print2(RSTRING(epath)->ptr, RSTRING(epath)->len);
RSTRING          1225 eval.c         		warn_printf("\tfrom %s\n", RSTRING(ep->ptr[i])->ptr);
RSTRING          2663 eval.c         		     RSTRING(rb_obj_as_string(c))->ptr);
RSTRING          3561 eval.c         			     RSTRING(rb_obj_as_string(klass))->ptr);
RSTRING          3689 eval.c         		result = rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len,
RSTRING          3693 eval.c         		result = rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len,
RSTRING          4377 eval.c         			RSTRING(e)->ptr);
RSTRING          6053 eval.c         	printf("\tfrom %s\n", RSTRING(RARRAY(ary)->ptr[i])->ptr);
RSTRING          6264 eval.c             if (!NIL_P(vfile)) file = RSTRING(vfile)->ptr;
RSTRING          6600 eval.c         	rb_load_file(RSTRING(fname)->ptr);
RSTRING          6751 eval.c         	feature = RSTRING(fname)->ptr;
RSTRING          6822 eval.c             ext = strrchr(ftptr = RSTRING(fname)->ptr, '.');
RSTRING          6828 eval.c         		ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
RSTRING          6837 eval.c         	    tmp = rb_str_new(RSTRING(fname)->ptr, ext-RSTRING(fname)->ptr);
RSTRING          6842 eval.c         		ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
RSTRING          6852 eval.c         		ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
RSTRING          6863 eval.c         		ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
RSTRING          6878 eval.c         	ftptr = RSTRING(tmp)->ptr;
RSTRING          6885 eval.c         	ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
RSTRING          6895 eval.c             rb_raise(rb_eLoadError, "no such file to load -- %s", RSTRING(fname)->ptr);
RSTRING          6927 eval.c         	    if (!path || load_wait(RSTRING(path)->ptr)) {
RSTRING          6939 eval.c         		    ftptr = ruby_strdup(RSTRING(path)->ptr);
RSTRING          6946 eval.c         		    ruby_sourcefile = rb_source_filename(RSTRING(path)->ptr);
RSTRING          6951 eval.c         		    handle = (long)dln_load(RSTRING(path)->ptr);
RSTRING          7725 eval.c             rb_autoload(mod, id, RSTRING(file)->ptr);
RSTRING            53 ext/Win32API/Win32API.c     hdll = LoadLibrary(RSTRING(dllname)->ptr);
RSTRING            55 ext/Win32API/Win32API.c 	rb_raise(rb_eRuntimeError, "LoadLibrary: %s\n", RSTRING(dllname)->ptr);
RSTRING            57 ext/Win32API/Win32API.c     hproc = (HANDLE)GetProcAddress(hdll, RSTRING(proc)->ptr);
RSTRING            61 ext/Win32API/Win32API.c 	hproc = (HANDLE)GetProcAddress(hdll, RSTRING(str)->ptr);
RSTRING            64 ext/Win32API/Win32API.c 		RSTRING(proc)->ptr, RSTRING(str)->ptr);
RSTRING            78 ext/Win32API/Win32API.c 	    switch (*(char *)RSTRING(ptr[i])->ptr) {
RSTRING            93 ext/Win32API/Win32API.c 	s = RSTRING(import)->ptr;
RSTRING            94 ext/Win32API/Win32API.c 	for (i = 0, len = RSTRING(import)->len; i < len; i++) {
RSTRING           120 ext/Win32API/Win32API.c 	switch (*RSTRING(export)->ptr) {
RSTRING           112 ext/bigdecimal/bigdecimal.c         return VpCreateRbObject(strlen(RSTRING(v)->ptr) + VpBaseFig() + 1,
RSTRING           113 ext/bigdecimal/bigdecimal.c                                 RSTRING(v)->ptr);
RSTRING           118 ext/bigdecimal/bigdecimal.c         return VpCreateRbObject(strlen(RSTRING(bg)->ptr) + VpBaseFig() + 1,
RSTRING           119 ext/bigdecimal/bigdecimal.c                                 RSTRING(bg)->ptr);
RSTRING           128 ext/bigdecimal/bigdecimal.c                     RSTRING(rb_inspect(v))->ptr:
RSTRING           201 ext/bigdecimal/bigdecimal.c     pch = RSTRING(str)->ptr;
RSTRING          1065 ext/bigdecimal/bigdecimal.c             psz = RSTRING(f)->ptr;
RSTRING          1196 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(pv,VpCreateRbObject(mf, RSTRING(iniValue)->ptr));
RSTRING          1215 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(pv,VpNewRbClass(mf, RSTRING(iniValue)->ptr,self));
RSTRING           125 ext/dbm/dbm.c          dbm = dbm_open(RSTRING(file)->ptr, flags, mode);
RSTRING           130 ext/dbm/dbm.c              dbm = dbm_open(RSTRING(file)->ptr, O_RDWR|O_CREAT, mode);
RSTRING           133 ext/dbm/dbm.c              dbm = dbm_open(RSTRING(file)->ptr, O_RDWR, 0);
RSTRING           136 ext/dbm/dbm.c              dbm = dbm_open(RSTRING(file)->ptr, O_RDONLY, 0);
RSTRING           142 ext/dbm/dbm.c  	rb_sys_fail(RSTRING(file)->ptr);
RSTRING           181 ext/dbm/dbm.c      key.dptr = RSTRING(keystr)->ptr;
RSTRING           182 ext/dbm/dbm.c      key.dsize = RSTRING(keystr)->len;
RSTRING           226 ext/dbm/dbm.c      val.dptr = RSTRING(valstr)->ptr;
RSTRING           227 ext/dbm/dbm.c      val.dsize = RSTRING(valstr)->len;
RSTRING           232 ext/dbm/dbm.c  	if (val.dsize == RSTRING(valstr)->len &&
RSTRING           233 ext/dbm/dbm.c  	    memcmp(val.dptr, RSTRING(valstr)->ptr, val.dsize) == 0) {
RSTRING           300 ext/dbm/dbm.c      key.dptr = RSTRING(keystr)->ptr;
RSTRING           301 ext/dbm/dbm.c      key.dsize = RSTRING(keystr)->len;
RSTRING           376 ext/dbm/dbm.c  	key.dptr = RSTRING(keystr)->ptr;
RSTRING           377 ext/dbm/dbm.c  	key.dsize = RSTRING(keystr)->len;
RSTRING           481 ext/dbm/dbm.c      key.dptr = RSTRING(keystr)->ptr;
RSTRING           482 ext/dbm/dbm.c      key.dsize = RSTRING(keystr)->len;
RSTRING           484 ext/dbm/dbm.c      val.dptr = RSTRING(valstr)->ptr;
RSTRING           485 ext/dbm/dbm.c      val.dsize = RSTRING(valstr)->len;
RSTRING           646 ext/dbm/dbm.c      key.dptr = RSTRING(keystr)->ptr;
RSTRING           647 ext/dbm/dbm.c      key.dsize = RSTRING(keystr)->len;
RSTRING           664 ext/dbm/dbm.c      val.dptr = RSTRING(valstr)->ptr;
RSTRING           665 ext/dbm/dbm.c      val.dsize = RSTRING(valstr)->len;
RSTRING           670 ext/dbm/dbm.c  	if (val.dsize == RSTRING(valstr)->len &&
RSTRING           671 ext/dbm/dbm.c  	    memcmp(val.dptr, RSTRING(valstr)->ptr, val.dsize) == 0)
RSTRING            93 ext/digest/digest.c     algo->update_func(pctx, RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING            96 ext/digest/digest.c     algo->final_func(RSTRING(str)->ptr, pctx);
RSTRING           112 ext/digest/digest.c     algo->update_func(pctx, RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING           115 ext/digest/digest.c     algo->end_func(pctx, RSTRING(str)->ptr);
RSTRING           149 ext/digest/digest.c     algo->update_func(pctx, RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING           183 ext/digest/digest.c     algo->final_func(RSTRING(str)->ptr, pctx2);
RSTRING           206 ext/digest/digest.c     algo->end_func(pctx2, RSTRING(str)->ptr);
RSTRING           234 ext/digest/digest.c     if (RSTRING(str2)->len == algo->digest_len)
RSTRING           239 ext/digest/digest.c     if (RSTRING(str1)->len == RSTRING(str2)->len
RSTRING           433 ext/dl/cptr.c          return rb_dlptr_new(ptr, RSTRING(val)->len, NULL);
RSTRING           163 ext/etc/etc.c      pwd = getpwnam(RSTRING(nam)->ptr);
RSTRING           164 ext/etc/etc.c      if (pwd == 0) rb_raise(rb_eArgError, "can't find user for %s", RSTRING(nam)->ptr);
RSTRING           368 ext/etc/etc.c      grp = getgrnam(RSTRING(nam)->ptr);
RSTRING           369 ext/etc/etc.c      if (grp == 0) rb_raise(rb_eArgError, "can't find group for %s", RSTRING(nam)->ptr);
RSTRING           127 ext/gdbm/gdbm.c 	dbm = gdbm_open(RSTRING(file)->ptr, MY_BLOCK_SIZE,
RSTRING           133 ext/gdbm/gdbm.c             dbm = gdbm_open(RSTRING(file)->ptr, MY_BLOCK_SIZE,
RSTRING           136 ext/gdbm/gdbm.c             dbm = gdbm_open(RSTRING(file)->ptr, MY_BLOCK_SIZE,
RSTRING           139 ext/gdbm/gdbm.c             dbm = gdbm_open(RSTRING(file)->ptr, MY_BLOCK_SIZE,
RSTRING           149 ext/gdbm/gdbm.c 	    rb_sys_fail(RSTRING(file)->ptr);
RSTRING           195 ext/gdbm/gdbm.c     RSTRING(str)->len = val.dsize;
RSTRING           196 ext/gdbm/gdbm.c     RSTRING(str)->aux.capa = val.dsize;
RSTRING           197 ext/gdbm/gdbm.c     RSTRING(str)->ptr = REALLOC_N(val.dptr,char,val.dsize+1);
RSTRING           198 ext/gdbm/gdbm.c     RSTRING(str)->ptr[val.dsize] = '\0';
RSTRING           212 ext/gdbm/gdbm.c     key.dptr = RSTRING(keystr)->ptr;
RSTRING           213 ext/gdbm/gdbm.c     key.dsize = RSTRING(keystr)->len;
RSTRING           241 ext/gdbm/gdbm.c     RSTRING(str)->len = key.dsize;
RSTRING           242 ext/gdbm/gdbm.c     RSTRING(str)->aux.capa = key.dsize;
RSTRING           243 ext/gdbm/gdbm.c     RSTRING(str)->ptr = REALLOC_N(key.dptr,char,key.dsize+1);
RSTRING           244 ext/gdbm/gdbm.c     RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
RSTRING           258 ext/gdbm/gdbm.c     key.dptr = RSTRING(keystr)->ptr;
RSTRING           259 ext/gdbm/gdbm.c     key.dsize = RSTRING(keystr)->len;
RSTRING           265 ext/gdbm/gdbm.c     RSTRING(str)->len = key2.dsize;
RSTRING           266 ext/gdbm/gdbm.c     RSTRING(str)->aux.capa = key2.dsize;
RSTRING           267 ext/gdbm/gdbm.c     RSTRING(str)->ptr = REALLOC_N(key2.dptr,char,key2.dsize+1);
RSTRING           268 ext/gdbm/gdbm.c     RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
RSTRING           327 ext/gdbm/gdbm.c             RSTRING(valstr)->len == RSTRING(valstr2)->len &&
RSTRING           328 ext/gdbm/gdbm.c             memcmp(RSTRING(valstr)->ptr, RSTRING(valstr2)->ptr,
RSTRING           329 ext/gdbm/gdbm.c                    RSTRING(valstr)->len) == 0) {
RSTRING           394 ext/gdbm/gdbm.c     key.dptr = RSTRING(keystr)->ptr;
RSTRING           395 ext/gdbm/gdbm.c     key.dsize = RSTRING(keystr)->len;
RSTRING           583 ext/gdbm/gdbm.c     key.dptr = RSTRING(keystr)->ptr;
RSTRING           584 ext/gdbm/gdbm.c     key.dsize = RSTRING(keystr)->len;
RSTRING           586 ext/gdbm/gdbm.c     val.dptr = RSTRING(valstr)->ptr;
RSTRING           587 ext/gdbm/gdbm.c     val.dsize = RSTRING(valstr)->len;
RSTRING           749 ext/gdbm/gdbm.c     key.dptr = RSTRING(keystr)->ptr;
RSTRING           750 ext/gdbm/gdbm.c     key.dsize = RSTRING(keystr)->len;
RSTRING           774 ext/gdbm/gdbm.c             RSTRING(valstr)->len == RSTRING(valstr2)->len &&
RSTRING           775 ext/gdbm/gdbm.c             memcmp(RSTRING(valstr)->ptr, RSTRING(valstr2)->ptr,
RSTRING           776 ext/gdbm/gdbm.c                    RSTRING(valstr)->len) == 0) {
RSTRING           170 ext/iconv/iconv.c 	    volatile VALUE msg = rb_str_new(0, strlen(s) + RSTRING(to)->len +
RSTRING           171 ext/iconv/iconv.c 					    RSTRING(from)->len + 8);
RSTRING           173 ext/iconv/iconv.c 	    sprintf(RSTRING(msg)->ptr, "%s(\"%s\", \"%s\")",
RSTRING           174 ext/iconv/iconv.c 		    s, RSTRING(to)->ptr, RSTRING(from)->ptr);
RSTRING           175 ext/iconv/iconv.c 	    s = RSTRING(msg)->ptr;
RSTRING           176 ext/iconv/iconv.c 	    RSTRING(msg)->len = strlen(s);
RSTRING           287 ext/iconv/iconv.c     else if (TYPE(failed) != T_STRING || RSTRING(failed)->len < FAILED_MAXLEN) {
RSTRING           316 ext/iconv/iconv.c     if (RSTRING(str)->ptr == ptr && RSTRING(str)->len == len)
RSTRING           318 ext/iconv/iconv.c     if (RSTRING(str)->ptr + RSTRING(str)->len == ptr + len)
RSTRING           319 ext/iconv/iconv.c 	ret = rb_str_substr(str, ptr - RSTRING(str)->ptr, len);
RSTRING           371 ext/iconv/iconv.c 	slen = RSTRING(str)->len;
RSTRING           372 ext/iconv/iconv.c 	inptr = RSTRING(str)->ptr;
RSTRING           441 ext/iconv/iconv.c 		    inlen = length = RSTRING(str)->len;
RSTRING           442 ext/iconv/iconv.c 		    instart = inptr = RSTRING(str)->ptr;
RSTRING           605 ext/iconv/iconv.c 	if (RSTRING(s)->len)
RSTRING           819 ext/iconv/iconv.c 	    if (RSTRING(s)->len)
RSTRING           825 ext/iconv/iconv.c 	if (RSTRING(s)->len)
RSTRING            66 ext/nkf/nkf.c      output = RSTRING(result)->ptr;
RSTRING            90 ext/nkf/nkf.c    opt_ptr = RSTRING(opt)->ptr;
RSTRING            91 ext/nkf/nkf.c    opt_end = opt_ptr + RSTRING(opt)->len;
RSTRING            98 ext/nkf/nkf.c    input = RSTRING(src)->ptr;
RSTRING            99 ext/nkf/nkf.c    i_len = RSTRING(src)->len;
RSTRING           104 ext/nkf/nkf.c    output     = RSTRING(result)->ptr;
RSTRING           105 ext/nkf/nkf.c    o_len      = RSTRING(result)->len;
RSTRING           112 ext/nkf/nkf.c    RSTRING(result)->ptr[output_ctr] = '\0';
RSTRING           113 ext/nkf/nkf.c    RSTRING(result)->len = output_ctr;
RSTRING           137 ext/nkf/nkf.c    p = RSTRING(src)->ptr;
RSTRING           138 ext/nkf/nkf.c    pend = p + RSTRING(src)->len;
RSTRING           232 ext/nkf/nkf.c    input = RSTRING(src)->ptr;
RSTRING           233 ext/nkf/nkf.c    i_len = RSTRING(src)->len;
RSTRING           134 ext/openssl/ossl.c     if(!NIL_P(str)) memcpy(RSTRING(str)->ptr, buf, len);
RSTRING           173 ext/openssl/ossl.c 	len = RSTRING(pass)->len;
RSTRING           182 ext/openssl/ossl.c 	memcpy(buf, RSTRING(pass)->ptr, len);
RSTRING           119 ext/openssl/ossl.h     int len = RSTRING(str)->len;\
RSTRING           120 ext/openssl/ossl.h     int newlen = (p) - (unsigned char*)RSTRING(str)->ptr;\
RSTRING           122 ext/openssl/ossl.h     RSTRING(str)->len = newlen;\
RSTRING           123 ext/openssl/ossl.h     RSTRING(str)->ptr[newlen] = 0;\
RSTRING           217 ext/openssl/ossl_asn1.c     ASN1_BIT_STRING_set(bstr, RSTRING(obj)->ptr, RSTRING(obj)->len);
RSTRING           232 ext/openssl/ossl_asn1.c     ASN1_STRING_set(str, RSTRING(obj)->ptr, RSTRING(obj)->len);
RSTRING           256 ext/openssl/ossl_asn1.c     a1obj = OBJ_txt2obj(RSTRING(obj)->ptr, 0);
RSTRING           257 ext/openssl/ossl_asn1.c     if(!a1obj) a1obj = OBJ_txt2obj(RSTRING(obj)->ptr, 1);
RSTRING           298 ext/openssl/ossl_asn1.c     ASN1_STRING_set(a1str, RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING           702 ext/openssl/ossl_asn1.c     if((length = ASN1_object_size(1, RSTRING(value)->len, tag)) <= 0)
RSTRING           705 ext/openssl/ossl_asn1.c     p = RSTRING(der)->ptr;
RSTRING           706 ext/openssl/ossl_asn1.c     ASN1_put_object(&p, is_cons, RSTRING(value)->len, tag, tag_class);
RSTRING           707 ext/openssl/ossl_asn1.c     memcpy(p, RSTRING(value)->ptr, RSTRING(value)->len);
RSTRING           708 ext/openssl/ossl_asn1.c     p += RSTRING(value)->len;
RSTRING           827 ext/openssl/ossl_asn1.c     p = RSTRING(tmp)->ptr;
RSTRING           828 ext/openssl/ossl_asn1.c     ossl_asn1_decode0(&p, RSTRING(tmp)->len, &offset, 0, 0, 1);
RSTRING           843 ext/openssl/ossl_asn1.c     p = RSTRING(tmp)->ptr;
RSTRING           844 ext/openssl/ossl_asn1.c     ary = ossl_asn1_decode0(&p, RSTRING(tmp)->len, &offset, 0, 1, 0);
RSTRING           860 ext/openssl/ossl_asn1.c     p = RSTRING(tmp)->ptr;
RSTRING           861 ext/openssl/ossl_asn1.c     ret = ossl_asn1_decode0(&p, RSTRING(tmp)->len, &offset, 0, 0, 0);
RSTRING           976 ext/openssl/ossl_asn1.c     seq_len = ASN1_object_size(1, RSTRING(value)->len, tag);
RSTRING           979 ext/openssl/ossl_asn1.c     p = RSTRING(str)->ptr;
RSTRING           981 ext/openssl/ossl_asn1.c 	ASN1_put_object(&p, 1, RSTRING(value)->len, tn, tc);
RSTRING           985 ext/openssl/ossl_asn1.c 	    ASN1_put_object(&p, 1, RSTRING(value)->len, tag, V_ASN1_UNIVERSAL);
RSTRING           987 ext/openssl/ossl_asn1.c 	else ASN1_put_object(&p, 1, RSTRING(value)->len, tn, tc);
RSTRING           989 ext/openssl/ossl_asn1.c     memcpy(p, RSTRING(value)->ptr, RSTRING(value)->len);
RSTRING           990 ext/openssl/ossl_asn1.c     p += RSTRING(value)->len;
RSTRING          1010 ext/openssl/ossl_asn1.c     if(!OBJ_create(RSTRING(oid)->ptr, RSTRING(sn)->ptr, RSTRING(ln)->ptr))
RSTRING            42 ext/openssl/ossl_bio.c 	bio = BIO_new_mem_buf(RSTRING(obj)->ptr, RSTRING(obj)->len);
RSTRING           127 ext/openssl/ossl_bn.c 	if (!BN_mpi2bn(RSTRING(str)->ptr, RSTRING(str)->len, bn)) {
RSTRING           132 ext/openssl/ossl_bn.c 	if (!BN_bin2bn(RSTRING(str)->ptr, RSTRING(str)->len, bn)) {
RSTRING           137 ext/openssl/ossl_bn.c 	if (!BN_dec2bn(&bn, RSTRING(str)->ptr)) {
RSTRING           142 ext/openssl/ossl_bn.c 	if (!BN_hex2bn(&bn, RSTRING(str)->ptr)) {
RSTRING           168 ext/openssl/ossl_bn.c 	if (BN_bn2mpi(bn, RSTRING(str)->ptr) != len)
RSTRING           174 ext/openssl/ossl_bn.c 	if (BN_bn2bin(bn, RSTRING(str)->ptr) != len)
RSTRING           154 ext/openssl/ossl_cipher.c 	    if (EVP_MAX_IV_LENGTH > RSTRING(init_v)->len) {
RSTRING           156 ext/openssl/ossl_cipher.c 		memcpy(iv, RSTRING(init_v)->ptr, RSTRING(init_v)->len);
RSTRING           158 ext/openssl/ossl_cipher.c 	    else memcpy(iv, RSTRING(init_v)->ptr, sizeof(iv));
RSTRING           161 ext/openssl/ossl_cipher.c 		       RSTRING(pass)->ptr, RSTRING(pass)->len, 1, key, NULL);
RSTRING           200 ext/openssl/ossl_cipher.c 	if(RSTRING(vsalt)->len != PKCS5_SALT_LEN)
RSTRING           202 ext/openssl/ossl_cipher.c 	salt = RSTRING(vsalt)->ptr;
RSTRING           208 ext/openssl/ossl_cipher.c 		   RSTRING(vpass)->ptr, RSTRING(vpass)->len, iter, key, iv);
RSTRING           226 ext/openssl/ossl_cipher.c     in = RSTRING(data)->ptr;
RSTRING           227 ext/openssl/ossl_cipher.c     if ((in_len = RSTRING(data)->len) == 0)
RSTRING           231 ext/openssl/ossl_cipher.c     if (!EVP_CipherUpdate(ctx, RSTRING(str)->ptr, &out_len, in, in_len))
RSTRING           233 ext/openssl/ossl_cipher.c     assert(out_len < RSTRING(str)->len);
RSTRING           234 ext/openssl/ossl_cipher.c     RSTRING(str)->len = out_len;
RSTRING           235 ext/openssl/ossl_cipher.c     RSTRING(str)->ptr[out_len] = 0;
RSTRING           249 ext/openssl/ossl_cipher.c     if (!EVP_CipherFinal_ex(ctx, RSTRING(str)->ptr, &out_len))
RSTRING           251 ext/openssl/ossl_cipher.c     assert(out_len <= RSTRING(str)->len);
RSTRING           252 ext/openssl/ossl_cipher.c     RSTRING(str)->len = out_len;
RSTRING           253 ext/openssl/ossl_cipher.c     RSTRING(str)->ptr[out_len] = 0;
RSTRING           276 ext/openssl/ossl_cipher.c     if (RSTRING(key)->len < EVP_CIPHER_CTX_key_length(ctx))
RSTRING           279 ext/openssl/ossl_cipher.c     if (EVP_CipherInit_ex(ctx, NULL, NULL, RSTRING(key)->ptr, NULL, -1) != 1)
RSTRING           293 ext/openssl/ossl_cipher.c     if (RSTRING(iv)->len < EVP_CIPHER_CTX_iv_length(ctx))
RSTRING           296 ext/openssl/ossl_cipher.c     if (EVP_CipherInit_ex(ctx, NULL, NULL, NULL, RSTRING(iv)->ptr, -1) != 1)
RSTRING           174 ext/openssl/ossl_config.c     if(!(sv = _CONF_get_section(conf, RSTRING(section)->ptr))){
RSTRING           175 ext/openssl/ossl_config.c 	if(!(sv = _CONF_new_section(conf, RSTRING(section)->ptr))){
RSTRING           182 ext/openssl/ossl_config.c     cv->name = BUF_strdup(RSTRING(name)->ptr);
RSTRING           183 ext/openssl/ossl_config.c     cv->value = BUF_strdup(RSTRING(value)->ptr);
RSTRING           204 ext/openssl/ossl_config.c     str = NCONF_get_string(conf, RSTRING(section)->ptr, RSTRING(name)->ptr);
RSTRING           139 ext/openssl/ossl_digest.c     EVP_DigestUpdate(ctx, RSTRING(data)->ptr, RSTRING(data)->len);
RSTRING           228 ext/openssl/ossl_digest.c     if (RSTRING(str2)->len == EVP_MD_CTX_size(ctx)) {
RSTRING           233 ext/openssl/ossl_digest.c     if (RSTRING(str1)->len == RSTRING(str2)->len
RSTRING            43 ext/openssl/ossl_engine.c   if(!strcmp(#x, RSTRING(name)->ptr)){\
RSTRING            78 ext/openssl/ossl_engine.c     rb_warning("no such builtin loader for `%s'", RSTRING(name)->ptr);
RSTRING           115 ext/openssl/ossl_engine.c     if(!(e = ENGINE_by_id(RSTRING(id)->ptr)))
RSTRING           284 ext/openssl/ossl_engine.c     ret = ENGINE_ctrl_cmd_string(e, RSTRING(cmd)->ptr,
RSTRING           285 ext/openssl/ossl_engine.c 				 NIL_P(val) ? NULL : RSTRING(val)->ptr, 0);
RSTRING            67 ext/openssl/ossl_hmac.c     HMAC_Init_ex(ctx, RSTRING(key)->ptr, RSTRING(key)->len,
RSTRING            97 ext/openssl/ossl_hmac.c     HMAC_Update(ctx, RSTRING(data)->ptr, RSTRING(data)->len);
RSTRING           162 ext/openssl/ossl_hmac.c     buf = HMAC(GetDigestPtr(digest), RSTRING(key)->ptr, RSTRING(key)->len,
RSTRING           163 ext/openssl/ossl_hmac.c 	       RSTRING(data)->ptr, RSTRING(data)->len, NULL, &buf_len);
RSTRING           178 ext/openssl/ossl_hmac.c     buf = HMAC(GetDigestPtr(digest), RSTRING(key)->ptr, RSTRING(key)->len,
RSTRING           179 ext/openssl/ossl_hmac.c 	       RSTRING(data)->ptr, RSTRING(data)->len, NULL, &buf_len);
RSTRING            65 ext/openssl/ossl_ns_spki.c     if (!(spki = NETSCAPE_SPKI_b64_decode(RSTRING(buffer)->ptr, -1))) {
RSTRING            66 ext/openssl/ossl_ns_spki.c 	p = RSTRING(buffer)->ptr;
RSTRING            67 ext/openssl/ossl_ns_spki.c 	if (!(spki = d2i_NETSCAPE_SPKI(NULL, &p, RSTRING(buffer)->len))) {
RSTRING            89 ext/openssl/ossl_ns_spki.c     p = RSTRING(str)->ptr;
RSTRING           185 ext/openssl/ossl_ns_spki.c     if (!ASN1_STRING_set(spki->spkac->challenge, RSTRING(str)->ptr,
RSTRING           186 ext/openssl/ossl_ns_spki.c 			 RSTRING(str)->len)) {
RSTRING           112 ext/openssl/ossl_ocsp.c 	p = (unsigned char*)RSTRING(arg)->ptr;
RSTRING           114 ext/openssl/ossl_ocsp.c 			     RSTRING(arg)->len)){
RSTRING           137 ext/openssl/ossl_ocsp.c 	ret = OCSP_request_add1_nonce(req, RSTRING(val)->ptr, RSTRING(val)->len);
RSTRING           268 ext/openssl/ossl_ocsp.c     p = RSTRING(str)->ptr;
RSTRING           319 ext/openssl/ossl_ocsp.c 	p = RSTRING(arg)->ptr;
RSTRING           321 ext/openssl/ossl_ocsp.c 			      RSTRING(arg)->len)){
RSTRING           380 ext/openssl/ossl_ocsp.c     p = RSTRING(str)->ptr;
RSTRING           439 ext/openssl/ossl_ocsp.c 	ret = OCSP_basic_add1_nonce(bs, RSTRING(val)->ptr, RSTRING(val)->len);
RSTRING           132 ext/openssl/ossl_pkcs12.c     p = RSTRING(str)->ptr;
RSTRING           752 ext/openssl/ossl_pkcs7.c     p = RSTRING(str)->ptr;
RSTRING            71 ext/openssl/ossl_pkey.c     if (!(fp = fopen(RSTRING(filename)->ptr, "r"))) {
RSTRING           172 ext/openssl/ossl_pkey.c     EVP_SignUpdate(&ctx, RSTRING(data)->ptr, RSTRING(data)->len);
RSTRING           174 ext/openssl/ossl_pkey.c     if (!EVP_SignFinal(&ctx, RSTRING(str)->ptr, &buf_len, pkey))
RSTRING           176 ext/openssl/ossl_pkey.c     assert(buf_len <= RSTRING(str)->len);
RSTRING           177 ext/openssl/ossl_pkey.c     RSTRING(str)->len = buf_len;
RSTRING           178 ext/openssl/ossl_pkey.c     RSTRING(str)->ptr[buf_len] = 0;
RSTRING           193 ext/openssl/ossl_pkey.c     EVP_VerifyUpdate(&ctx, RSTRING(data)->ptr, RSTRING(data)->len);
RSTRING           194 ext/openssl/ossl_pkey.c     switch (EVP_VerifyFinal(&ctx, RSTRING(sig)->ptr, RSTRING(sig)->len, pkey)) {
RSTRING           216 ext/openssl/ossl_pkey_dh.c     p = RSTRING(str)->ptr;
RSTRING           338 ext/openssl/ossl_pkey_dh.c     if ((len = DH_compute_key(RSTRING(str)->ptr, pub_key, dh)) < 0) {
RSTRING           341 ext/openssl/ossl_pkey_dh.c     RSTRING(str)->len = len;
RSTRING           342 ext/openssl/ossl_pkey_dh.c     RSTRING(str)->ptr[len] = 0;
RSTRING           244 ext/openssl/ossl_pkey_dsa.c     p = RSTRING(str)->ptr;
RSTRING           337 ext/openssl/ossl_pkey_dsa.c     if (!DSA_sign(0, RSTRING(data)->ptr, RSTRING(data)->len, RSTRING(str)->ptr,
RSTRING           341 ext/openssl/ossl_pkey_dsa.c     RSTRING(str)->len = buf_len;
RSTRING           342 ext/openssl/ossl_pkey_dsa.c     RSTRING(str)->ptr[buf_len] = 0;
RSTRING           357 ext/openssl/ossl_pkey_dsa.c     ret = DSA_verify(0, RSTRING(digest)->ptr, RSTRING(digest)->len,
RSTRING           358 ext/openssl/ossl_pkey_dsa.c 		     RSTRING(sig)->ptr, RSTRING(sig)->len, pkey->pkey.dsa);
RSTRING           239 ext/openssl/ossl_pkey_rsa.c     p = RSTRING(str)->ptr;
RSTRING           261 ext/openssl/ossl_pkey_rsa.c     buf_len = RSA_public_encrypt(RSTRING(buffer)->len, RSTRING(buffer)->ptr,
RSTRING           262 ext/openssl/ossl_pkey_rsa.c 				 RSTRING(str)->ptr, pkey->pkey.rsa,
RSTRING           265 ext/openssl/ossl_pkey_rsa.c     RSTRING(str)->len = buf_len;
RSTRING           266 ext/openssl/ossl_pkey_rsa.c     RSTRING(str)->ptr[buf_len] = 0;
RSTRING           283 ext/openssl/ossl_pkey_rsa.c     buf_len = RSA_public_decrypt(RSTRING(buffer)->len, RSTRING(buffer)->ptr,
RSTRING           284 ext/openssl/ossl_pkey_rsa.c 				 RSTRING(str)->ptr, pkey->pkey.rsa,
RSTRING           287 ext/openssl/ossl_pkey_rsa.c     RSTRING(str)->len = buf_len;
RSTRING           288 ext/openssl/ossl_pkey_rsa.c     RSTRING(str)->ptr[buf_len] = 0;
RSTRING           308 ext/openssl/ossl_pkey_rsa.c     buf_len = RSA_private_encrypt(RSTRING(buffer)->len, RSTRING(buffer)->ptr,
RSTRING           309 ext/openssl/ossl_pkey_rsa.c 				  RSTRING(str)->ptr, pkey->pkey.rsa,
RSTRING           312 ext/openssl/ossl_pkey_rsa.c     RSTRING(str)->len = buf_len;
RSTRING           313 ext/openssl/ossl_pkey_rsa.c     RSTRING(str)->ptr[buf_len] = 0;
RSTRING           333 ext/openssl/ossl_pkey_rsa.c     buf_len = RSA_private_decrypt(RSTRING(buffer)->len, RSTRING(buffer)->ptr,
RSTRING           334 ext/openssl/ossl_pkey_rsa.c 				  RSTRING(str)->ptr, pkey->pkey.rsa,
RSTRING           337 ext/openssl/ossl_pkey_rsa.c     RSTRING(str)->len = buf_len;
RSTRING           338 ext/openssl/ossl_pkey_rsa.c     RSTRING(str)->ptr[buf_len] = 0;
RSTRING            34 ext/openssl/ossl_rand.c     RAND_seed(RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING            44 ext/openssl/ossl_rand.c     if(!RAND_load_file(RSTRING(filename)->ptr, -1)) {
RSTRING            54 ext/openssl/ossl_rand.c     if (RAND_write_file(RSTRING(filename)->ptr) == -1) {
RSTRING            66 ext/openssl/ossl_rand.c     if (!RAND_bytes(RSTRING(str)->ptr, FIX2INT(len))) {
RSTRING            79 ext/openssl/ossl_rand.c     if (!RAND_pseudo_bytes(RSTRING(str)->ptr, FIX2INT(len))) {
RSTRING            91 ext/openssl/ossl_rand.c     if(!RAND_egd(RSTRING(filename)->ptr)) {
RSTRING           102 ext/openssl/ossl_rand.c     if (!RAND_egd_bytes(RSTRING(filename)->ptr, FIX2INT(len))) {
RSTRING           397 ext/openssl/ossl_ssl.c 	if (!SSL_CTX_set_session_id_context(ctx, RSTRING(val)->ptr,
RSTRING           398 ext/openssl/ossl_ssl.c 					    RSTRING(val)->len)){
RSTRING           479 ext/openssl/ossl_ssl.c     if (!SSL_CTX_set_cipher_list(ctx, RSTRING(str)->ptr)) {
RSTRING           638 ext/openssl/ossl_ssl.c 	    nread = SSL_read(ssl, RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING           665 ext/openssl/ossl_ssl.c     RSTRING(str)->len = nread;
RSTRING           666 ext/openssl/ossl_ssl.c     RSTRING(str)->ptr[nread] = 0;
RSTRING           685 ext/openssl/ossl_ssl.c 	    nwrite = SSL_write(ssl, RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING            98 ext/openssl/ossl_x509attr.c 	p = RSTRING(oid)->ptr;
RSTRING           100 ext/openssl/ossl_x509attr.c 			       &p, RSTRING(oid)->len)){
RSTRING           195 ext/openssl/ossl_x509attr.c 	p = RSTRING(str)->ptr;
RSTRING           203 ext/openssl/ossl_x509attr.c 	p = RSTRING(str)->ptr;
RSTRING           225 ext/openssl/ossl_x509attr.c     p = RSTRING(str)->ptr;
RSTRING           228 ext/openssl/ossl_x509attr.c     RSTRING(str)->len = p - (unsigned char*)RSTRING(str)->ptr;
RSTRING            66 ext/openssl/ossl_x509cert.c     if (!(fp = fopen(RSTRING(filename)->ptr, "r"))) {
RSTRING           184 ext/openssl/ossl_x509cert.c     p = RSTRING(str)->ptr;
RSTRING           232 ext/openssl/ossl_x509ext.c     nid = OBJ_ln2nid(RSTRING(oid)->ptr);
RSTRING           233 ext/openssl/ossl_x509ext.c     if(!nid) nid = OBJ_sn2nid(RSTRING(oid)->ptr);
RSTRING           234 ext/openssl/ossl_x509ext.c     if(!nid) ossl_raise(eX509ExtError, "unknown OID `%s'", RSTRING(oid)->ptr);
RSTRING           241 ext/openssl/ossl_x509ext.c     ext = X509V3_EXT_nconf_nid(conf, ctx, nid, RSTRING(valstr)->ptr);
RSTRING           244 ext/openssl/ossl_x509ext.c     ext = X509V3_EXT_conf_nid(empty_lhash, ctx, nid, RSTRING(valstr)->ptr);
RSTRING           248 ext/openssl/ossl_x509ext.c 		   RSTRING(oid)->ptr, RSTRING(value)->ptr);
RSTRING           283 ext/openssl/ossl_x509ext.c 	p  = RSTRING(oid)->ptr;
RSTRING           285 ext/openssl/ossl_x509ext.c 			       &p, RSTRING(oid)->len))
RSTRING           322 ext/openssl/ossl_x509ext.c     if(!(s = OPENSSL_malloc(RSTRING(data)->len)))
RSTRING           324 ext/openssl/ossl_x509ext.c     memcpy(s, RSTRING(data)->ptr, RSTRING(data)->len);
RSTRING           329 ext/openssl/ossl_x509ext.c     if(!M_ASN1_OCTET_STRING_set(asn1s, s, RSTRING(data)->len)){
RSTRING           412 ext/openssl/ossl_x509ext.c     p = RSTRING(str)->ptr;
RSTRING           134 ext/openssl/ossl_x509name.c 	    p = RSTRING(str)->ptr;
RSTRING           135 ext/openssl/ossl_x509name.c 	    if(!d2i_X509_NAME((X509_NAME**)&DATA_PTR(self), &p, RSTRING(str)->len)){
RSTRING           155 ext/openssl/ossl_x509name.c     if (!X509_NAME_add_entry_by_txt(name, RSTRING(oid)->ptr, NUM2INT(type),
RSTRING           156 ext/openssl/ossl_x509name.c 		RSTRING(value)->ptr, RSTRING(value)->len, -1, 0)) {
RSTRING           294 ext/openssl/ossl_x509name.c     p = RSTRING(str)->ptr;
RSTRING           174 ext/openssl/ossl_x509req.c     p = RSTRING(str)->ptr;
RSTRING           209 ext/openssl/ossl_x509store.c 	path = RSTRING(file)->ptr;
RSTRING           230 ext/openssl/ossl_x509store.c 	path = RSTRING(dir)->ptr;
RSTRING            66 ext/readline/readline.c 	prompt = RSTRING(tmp)->ptr;
RSTRING           186 ext/readline/readline.c 	result[i + 1] = ALLOC_N(char, RSTRING(temp)->len + 1);
RSTRING           187 ext/readline/readline.c 	strcpy(result[i + 1], RSTRING(temp)->ptr);
RSTRING           265 ext/readline/readline.c 	if (RSTRING(str)->len == 0) {
RSTRING           268 ext/readline/readline.c 	    rl_completion_append_character = RSTRING(str)->ptr[0];
RSTRING           290 ext/readline/readline.c     RSTRING(str)->ptr[0] = rl_completion_append_character;
RSTRING           309 ext/readline/readline.c 	    ALLOC_N(char, RSTRING(str)->len + 1);
RSTRING           312 ext/readline/readline.c 	REALLOC_N(basic_word_break_characters, char, RSTRING(str)->len + 1);
RSTRING           315 ext/readline/readline.c 	    RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING           316 ext/readline/readline.c     basic_word_break_characters[RSTRING(str)->len] = '\0';
RSTRING           351 ext/readline/readline.c 	    ALLOC_N(char, RSTRING(str)->len + 1);
RSTRING           354 ext/readline/readline.c 	REALLOC_N(completer_word_break_characters, char, RSTRING(str)->len + 1);
RSTRING           357 ext/readline/readline.c 	    RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING           358 ext/readline/readline.c     completer_word_break_characters[RSTRING(str)->len] = '\0';
RSTRING           393 ext/readline/readline.c 	    ALLOC_N(char, RSTRING(str)->len + 1);
RSTRING           396 ext/readline/readline.c 	REALLOC_N(basic_quote_characters, char, RSTRING(str)->len + 1);
RSTRING           399 ext/readline/readline.c 	    RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING           400 ext/readline/readline.c     basic_quote_characters[RSTRING(str)->len] = '\0';
RSTRING           436 ext/readline/readline.c 	    ALLOC_N(char, RSTRING(str)->len + 1);
RSTRING           439 ext/readline/readline.c 	REALLOC_N(completer_quote_characters, char, RSTRING(str)->len + 1);
RSTRING           442 ext/readline/readline.c 	    RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING           443 ext/readline/readline.c     completer_quote_characters[RSTRING(str)->len] = '\0';
RSTRING           479 ext/readline/readline.c 	    ALLOC_N(char, RSTRING(str)->len + 1);
RSTRING           482 ext/readline/readline.c 	REALLOC_N(filename_quote_characters, char, RSTRING(str)->len + 1);
RSTRING           485 ext/readline/readline.c 	    RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING           486 ext/readline/readline.c     filename_quote_characters[RSTRING(str)->len] = '\0';
RSTRING           554 ext/readline/readline.c     entry = replace_history_entry(i, RSTRING(str)->ptr, NULL);
RSTRING           572 ext/readline/readline.c     add_history(RSTRING(str)->ptr);
RSTRING           588 ext/readline/readline.c 	add_history(RSTRING(str)->ptr);
RSTRING           112 ext/sdbm/init.c 	dbm = sdbm_open(RSTRING(file)->ptr, O_RDWR|O_CREAT, mode);
RSTRING           114 ext/sdbm/init.c 	dbm = sdbm_open(RSTRING(file)->ptr, O_RDWR, 0);
RSTRING           116 ext/sdbm/init.c 	dbm = sdbm_open(RSTRING(file)->ptr, O_RDONLY, 0);
RSTRING           120 ext/sdbm/init.c 	rb_sys_fail(RSTRING(file)->ptr);
RSTRING           159 ext/sdbm/init.c     key.dptr = RSTRING(keystr)->ptr;
RSTRING           160 ext/sdbm/init.c     key.dsize = RSTRING(keystr)->len;
RSTRING           204 ext/sdbm/init.c     val.dptr = RSTRING(valstr)->ptr;
RSTRING           205 ext/sdbm/init.c     val.dsize = RSTRING(valstr)->len;
RSTRING           210 ext/sdbm/init.c 	if (val.dsize == RSTRING(valstr)->len &&
RSTRING           211 ext/sdbm/init.c 	    memcmp(val.dptr, RSTRING(valstr)->ptr, val.dsize) == 0)
RSTRING           277 ext/sdbm/init.c     key.dptr = RSTRING(keystr)->ptr;
RSTRING           278 ext/sdbm/init.c     key.dsize = RSTRING(keystr)->len;
RSTRING           354 ext/sdbm/init.c 	key.dptr = RSTRING(keystr)->ptr;
RSTRING           355 ext/sdbm/init.c 	key.dsize = RSTRING(keystr)->len;
RSTRING           464 ext/sdbm/init.c     key.dptr = RSTRING(keystr)->ptr;
RSTRING           465 ext/sdbm/init.c     key.dsize = RSTRING(keystr)->len;
RSTRING           467 ext/sdbm/init.c     val.dptr = RSTRING(valstr)->ptr;
RSTRING           468 ext/sdbm/init.c     val.dsize = RSTRING(valstr)->len;
RSTRING           627 ext/sdbm/init.c     key.dptr = RSTRING(keystr)->ptr;
RSTRING           628 ext/sdbm/init.c     key.dsize = RSTRING(keystr)->len;
RSTRING           645 ext/sdbm/init.c     val.dptr = RSTRING(valstr)->ptr;
RSTRING           646 ext/sdbm/init.c     val.dsize = RSTRING(valstr)->len;
RSTRING           651 ext/sdbm/init.c 	if (val.dsize == RSTRING(valstr)->len &&
RSTRING           652 ext/sdbm/init.c 	    memcmp(val.dptr, RSTRING(valstr)->ptr, val.dsize) == 0)
RSTRING           371 ext/socket/socket.c 	v = RSTRING(val)->ptr;
RSTRING           372 ext/socket/socket.c 	vlen = RSTRING(val)->len;
RSTRING           498 ext/socket/socket.c 	n = sendto(fd, RSTRING(mesg)->ptr, RSTRING(mesg)->len, NUM2INT(flags),
RSTRING           499 ext/socket/socket.c 		   (struct sockaddr*)RSTRING(to)->ptr, RSTRING(to)->len);
RSTRING           504 ext/socket/socket.c 	n = send(fd, RSTRING(mesg)->ptr, RSTRING(mesg)->len, NUM2INT(flags));
RSTRING           589 ext/socket/socket.c     if (RSTRING(str)->len != buflen) {
RSTRING           593 ext/socket/socket.c     slen = recvfrom(fd, RSTRING(str)->ptr, buflen, flags, (struct sockaddr*)buf, &alen);
RSTRING           602 ext/socket/socket.c     if (slen < RSTRING(str)->len) {
RSTRING           603 ext/socket/socket.c 	RSTRING(str)->len = slen;
RSTRING           604 ext/socket/socket.c 	RSTRING(str)->ptr[slen] = '\0';
RSTRING           742 ext/socket/socket.c 	name = RSTRING(host)->ptr;
RSTRING           776 ext/socket/socket.c 	serv = RSTRING(port)->ptr;
RSTRING          1484 ext/socket/socket.c     strncpy(sockaddr.sun_path, RSTRING(path)->ptr, sizeof(sockaddr.sun_path)-1);
RSTRING          1511 ext/socket/socket.c     fptr->path = strdup(RSTRING(path)->ptr);
RSTRING          1675 ext/socket/socket.c 	n = sendto(fptr->fd, RSTRING(mesg)->ptr, RSTRING(mesg)->len, NUM2INT(flags),
RSTRING          2000 ext/socket/socket.c 	ptr = RSTRING(domain)->ptr;
RSTRING          2051 ext/socket/socket.c 	ptr = RSTRING(type)->ptr;
RSTRING          2262 ext/socket/socket.c     n = ruby_connect(fd, (struct sockaddr*)RSTRING(addr)->ptr, RSTRING(addr)->len, 0);
RSTRING          2357 ext/socket/socket.c     if (bind(fptr->fd, (struct sockaddr*)RSTRING(addr)->ptr, RSTRING(addr)->len) < 0)
RSTRING          2745 ext/socket/socket.c     else if (RSTRING(addr)->len == 16) {
RSTRING          2749 ext/socket/socket.c     h = gethostbyaddr(RSTRING(addr)->ptr, RSTRING(addr)->len, t);
RSTRING          2798 ext/socket/socket.c 	char *s = RSTRING(service)->ptr;
RSTRING          2803 ext/socket/socket.c 	    rb_raise(rb_eSocket, "no such service %s/%s", s, RSTRING(proto)->ptr);
RSTRING          2823 ext/socket/socket.c 	rb_raise(rb_eSocket, "no such service for port %d/%s", NUM2INT(port), RSTRING(proto)->ptr);
RSTRING          2924 ext/socket/socket.c 	if (sizeof(ss) < RSTRING(sa)->len) {
RSTRING          2927 ext/socket/socket.c 	memcpy(&ss, RSTRING(sa)->ptr, RSTRING(sa)->len);
RSTRING          2928 ext/socket/socket.c 	if (RSTRING(sa)->len != SA_LEN((struct sockaddr*)&ss)) {
RSTRING          3095 ext/socket/socket.c     if (RSTRING(addr)->len != sizeof(struct sockaddr_un)) {
RSTRING          3097 ext/socket/socket.c 		 RSTRING(addr)->len, sizeof(struct sockaddr_un));
RSTRING           486 ext/stringio/stringio.c     if (ptr->pos < RSTRING(ptr->string)->len) return Qfalse;
RSTRING           651 ext/stringio/stringio.c 	offset += RSTRING(ptr->string)->len;
RSTRING           693 ext/stringio/stringio.c     while (ptr->pos < RSTRING(ptr->string)->len) {
RSTRING           694 ext/stringio/stringio.c 	char c = RSTRING(ptr->string)->ptr[ptr->pos++];
RSTRING           712 ext/stringio/stringio.c     if (ptr->pos >= RSTRING(ptr->string)->len) {
RSTRING           715 ext/stringio/stringio.c     c = RSTRING(ptr->string)->ptr[ptr->pos++];
RSTRING           727 ext/stringio/stringio.c     olen = RSTRING(ptr->string)->len;
RSTRING           731 ext/stringio/stringio.c 	    MEMZERO(RSTRING(ptr->string)->ptr + olen, char, pos - olen);
RSTRING           757 ext/stringio/stringio.c 	if ((len = RSTRING(ptr->string)->len) < pos-- ||
RSTRING           758 ext/stringio/stringio.c 	    (unsigned char)RSTRING(ptr->string)->ptr[pos] !=
RSTRING           761 ext/stringio/stringio.c 	    RSTRING(ptr->string)->ptr[pos] = cc;
RSTRING           842 ext/stringio/stringio.c     if (ptr->pos >= (n = RSTRING(ptr->string)->len)) {
RSTRING           845 ext/stringio/stringio.c     s = RSTRING(ptr->string)->ptr;
RSTRING           846 ext/stringio/stringio.c     e = s + RSTRING(ptr->string)->len;
RSTRING           851 ext/stringio/stringio.c     else if ((n = RSTRING(str)->len) == 0) {
RSTRING           865 ext/stringio/stringio.c 	str = rb_str_substr(ptr->string, s - RSTRING(ptr->string)->ptr, e - s);
RSTRING           868 ext/stringio/stringio.c 	if ((p = memchr(s, RSTRING(str)->ptr[0], e - s)) != 0) {
RSTRING           877 ext/stringio/stringio.c 		    if (MEMCMP(p, RSTRING(str)->ptr, char, n) == 0) {
RSTRING           885 ext/stringio/stringio.c 		p = RSTRING(str)->ptr;
RSTRING           894 ext/stringio/stringio.c     ptr->pos = e - RSTRING(ptr->string)->ptr;
RSTRING           995 ext/stringio/stringio.c     len = RSTRING(str)->len;
RSTRING           998 ext/stringio/stringio.c     olen = RSTRING(ptr->string)->len;
RSTRING          1003 ext/stringio/stringio.c 	rb_str_cat(ptr->string, RSTRING(str)->ptr, len);
RSTRING          1054 ext/stringio/stringio.c     olen = RSTRING(ptr->string)->len;
RSTRING          1059 ext/stringio/stringio.c     RSTRING(ptr->string)->ptr[ptr->pos++] = c;
RSTRING          1099 ext/stringio/stringio.c 	    if (len > 0 && ptr->pos >= RSTRING(ptr->string)->len) {
RSTRING          1108 ext/stringio/stringio.c 	len = RSTRING(ptr->string)->len;
RSTRING          1129 ext/stringio/stringio.c 	long rest = RSTRING(ptr->string)->len - ptr->pos;
RSTRING          1132 ext/stringio/stringio.c 	MEMCPY(RSTRING(str)->ptr, RSTRING(ptr->string)->ptr + ptr->pos, char, len);
RSTRING          1139 ext/stringio/stringio.c 	ptr->pos += len = RSTRING(str)->len;
RSTRING          1158 ext/stringio/stringio.c     if (NIL_P(val) || RSTRING(val)->len == 0) {
RSTRING          1197 ext/stringio/stringio.c     return ULONG2NUM(RSTRING(string)->len);
RSTRING          1213 ext/stringio/stringio.c     long plen = RSTRING(string)->len;
RSTRING          1219 ext/stringio/stringio.c 	MEMZERO(RSTRING(string)->ptr + plen, char, l - plen);
RSTRING            44 ext/strscan/strscan.c #define S_PBEG(s)  (RSTRING((s)->str)->ptr)
RSTRING            45 ext/strscan/strscan.c #define S_LEN(s)  (RSTRING((s)->str)->len)
RSTRING            50 ext/strscan/strscan.c #define EOS_P(s) ((s)->curr >= RSTRING(p->str)->len)
RSTRING          1133 ext/strscan/strscan.c                        RSTRING(b)->ptr);
RSTRING          1141 ext/strscan/strscan.c                    RSTRING(a)->ptr,
RSTRING          1142 ext/strscan/strscan.c                    RSTRING(b)->ptr);
RSTRING           153 ext/syck/rubyext.c             len = RSTRING(str2)->len;
RSTRING           154 ext/syck/rubyext.c             memcpy( buf + skip, RSTRING(str2)->ptr, len );
RSTRING           176 ext/syck/rubyext.c         syck_parser_str( parser, RSTRING(port)->ptr, RSTRING(port)->len, NULL );
RSTRING          1046 ext/syck/rubyext.c     ivn = S_ALLOCA_N( char, RSTRING(ivname)->len + 2 );
RSTRING          1049 ext/syck/rubyext.c     strncat( ivn, RSTRING(ivname)->ptr, RSTRING(ivname)->len );
RSTRING          1079 ext/syck/rubyext.c     if (NIL_P(type) || RSTRING(StringValue(type))->len == 0)
RSTRING          1084 ext/syck/rubyext.c     if ( ! (NIL_P(type) || RSTRING(StringValue(type))->len == 0) )
RSTRING          1203 ext/syck/rubyext.c         char *taguri = syck_type_id_to_uri( RSTRING(tmp)->ptr );
RSTRING          1224 ext/syck/rubyext.c         type_id = syck_match_implicit( RSTRING(val)->ptr, RSTRING(val)->len );
RSTRING          1495 ext/syck/rubyext.c     node->data.str->ptr = syck_strndup( RSTRING(val)->ptr, RSTRING(val)->len );
RSTRING          1496 ext/syck/rubyext.c     node->data.str->len = RSTRING(val)->len;
RSTRING          1767 ext/syck/rubyext.c         node->type_id = syck_strndup( RSTRING(type_id)->ptr, RSTRING(type_id)->len );
RSTRING            35 ext/syslog/syslog.c     syslog(pri, "%s", RSTRING(str)->ptr);
RSTRING            73 ext/syslog/syslog.c     syslog_ident = strdup(RSTRING(ident)->ptr);
RSTRING           144 ext/tk/stubs.c         int ret = ruby_open_tcl_dll(RSTRING(rb_argv0)->ptr);
RSTRING           215 ext/tk/stubs.c             int ret = ruby_open_tcl_dll(RSTRING(rb_argv0)->ptr);
RSTRING           348 ext/tk/stubs.c     st = ruby_open_tcltk_dll(RSTRING(rb_argv0)->ptr);
RSTRING           410 ext/tk/stubs.c         ruby_open_tcl_dll(RSTRING(rb_argv0)->ptr);
RSTRING           441 ext/tk/stubs.c         ruby_open_tcl_dll(RSTRING(rb_argv0)->ptr);
RSTRING           505 ext/tk/stubs.c     Tcl_FindExecutable(RSTRING(rb_argv0)->ptr);
RSTRING           895 ext/tk/tcltklib.c         argv[1] = RSTRING(rb_fix2str(INT2NUM(state), 10))->ptr;
RSTRING          1144 ext/tk/tcltklib.c                  RSTRING(rb_funcall(time, ID_inspect, 0, 0))->ptr);
RSTRING          2144 ext/tk/tcltklib.c         encoding = Tcl_GetEncoding(interp, RSTRING(enc)->ptr);
RSTRING          2147 ext/tk/tcltklib.c         encoding = Tcl_GetEncoding(interp, RSTRING(enc)->ptr);
RSTRING          2151 ext/tk/tcltklib.c     buf = ALLOC_N(char, (RSTRING(msg)->len)+1);
RSTRING          2152 ext/tk/tcltklib.c     memcpy(buf, RSTRING(msg)->ptr, RSTRING(msg)->len);
RSTRING          2153 ext/tk/tcltklib.c     buf[RSTRING(msg)->len] = 0;
RSTRING          2157 ext/tk/tcltklib.c     Tcl_ExternalToUtfDString(encoding, buf, RSTRING(msg)->len, &dstr);
RSTRING          2165 ext/tk/tcltklib.c     Tcl_AppendResult(interp, RSTRING(msg)->ptr, (char*)NULL);
RSTRING          2360 ext/tk/tcltklib.c         Tcl_AppendResult(interp, RSTRING(ret)->ptr, (char *)NULL);
RSTRING          2365 ext/tk/tcltklib.c     DUMP2("(result) %s", NIL_P(ret) ? "nil" : RSTRING(ret)->ptr);
RSTRING          4913 ext/tk/tcltklib.c     slave->ip = Tcl_CreateSlave(master->ip, RSTRING(name)->ptr, safe);
RSTRING          5340 ext/tk/tcltklib.c     return Tcl_NewStringObj((char*)s, RSTRING(str)->len);
RSTRING          5346 ext/tk/tcltklib.c         if (strcmp(RSTRING(enc)->ptr, "binary") == 0) {
RSTRING          5348 ext/tk/tcltklib.c             return Tcl_NewByteArrayObj(s, RSTRING(str)->len);
RSTRING          5351 ext/tk/tcltklib.c             return Tcl_NewStringObj(s, RSTRING(str)->len);
RSTRING          5353 ext/tk/tcltklib.c     } else if (strlen(s) != RSTRING(str)->len) {
RSTRING          5355 ext/tk/tcltklib.c         return Tcl_NewByteArrayObj(s, RSTRING(str)->len);
RSTRING          5358 ext/tk/tcltklib.c         return Tcl_NewStringObj(s, RSTRING(str)->len);
RSTRING          5801 ext/tk/tcltklib.c         result = ip_eval_real(self, RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING          5817 ext/tk/tcltklib.c     eval_str = ALLOC_N(char, RSTRING(str)->len + 1);
RSTRING          5818 ext/tk/tcltklib.c     memcpy(eval_str, RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING          5819 ext/tk/tcltklib.c     eval_str[RSTRING(str)->len] = 0;
RSTRING          5833 ext/tk/tcltklib.c     evq->len = RSTRING(str)->len;
RSTRING          6028 ext/tk/tcltklib.c                         encoding = Tcl_GetEncoding(interp, RSTRING(enc)->ptr);
RSTRING          6030 ext/tk/tcltklib.c                             rb_warning("Tk-interp has unknown encoding information (@encoding:'%s')", RSTRING(enc)->ptr);
RSTRING          6036 ext/tk/tcltklib.c                 if (strcmp(RSTRING(enc)->ptr, "binary") == 0) {
RSTRING          6040 ext/tk/tcltklib.c                 encoding = Tcl_GetEncoding(interp, RSTRING(enc)->ptr);
RSTRING          6042 ext/tk/tcltklib.c                     rb_warning("string has unknown encoding information (@encoding:'%s')", RSTRING(enc)->ptr);
RSTRING          6050 ext/tk/tcltklib.c         encoding = Tcl_GetEncoding(interp, RSTRING(encodename)->ptr);
RSTRING          6057 ext/tk/tcltklib.c                      RSTRING(encodename)->ptr);
RSTRING          6062 ext/tk/tcltklib.c     if (!RSTRING(str)->len) {
RSTRING          6066 ext/tk/tcltklib.c     buf = ALLOC_N(char,(RSTRING(str)->len)+1);
RSTRING          6067 ext/tk/tcltklib.c     memcpy(buf, RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING          6068 ext/tk/tcltklib.c     buf[RSTRING(str)->len] = 0;
RSTRING          6073 ext/tk/tcltklib.c     Tcl_ExternalToUtfDString(encoding, buf, RSTRING(str)->len, &dstr);
RSTRING          6164 ext/tk/tcltklib.c                 if (strcmp(RSTRING(enc)->ptr, "binary") == 0) {
RSTRING          6179 ext/tk/tcltklib.c                 encoding = Tcl_GetEncoding(interp, RSTRING(enc)->ptr);
RSTRING          6181 ext/tk/tcltklib.c                     rb_warning("Tk-interp has unknown encoding information (@encoding:'%s')", RSTRING(enc)->ptr);
RSTRING          6191 ext/tk/tcltklib.c         if (strcmp(RSTRING(encodename)->ptr, "binary") == 0) {
RSTRING          6195 ext/tk/tcltklib.c             s = Tcl_GetByteArrayFromObj(Tcl_NewStringObj(RSTRING(str)->ptr,
RSTRING          6196 ext/tk/tcltklib.c                                                          RSTRING(str)->len),
RSTRING          6205 ext/tk/tcltklib.c         encoding = Tcl_GetEncoding(interp, RSTRING(encodename)->ptr);
RSTRING          6213 ext/tk/tcltklib.c                      RSTRING(encodename)->ptr);
RSTRING          6219 ext/tk/tcltklib.c     if (RSTRING(str)->len == 0) {
RSTRING          6224 ext/tk/tcltklib.c     buf = ALLOC_N(char,strlen(RSTRING(str)->ptr)+1);
RSTRING          6225 ext/tk/tcltklib.c     memcpy(buf, RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING          6226 ext/tk/tcltklib.c     buf[RSTRING(str)->len] = 0;
RSTRING          6231 ext/tk/tcltklib.c     Tcl_UtfToExternalDString(encoding,buf,RSTRING(str)->len,&dstr);
RSTRING          6296 ext/tk/tcltklib.c     if (!RSTRING(str)->len) {
RSTRING          6303 ext/tk/tcltklib.c     src_buf = ALLOC_N(char,(RSTRING(str)->len)+1);
RSTRING          6304 ext/tk/tcltklib.c     memcpy(src_buf, RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING          6305 ext/tk/tcltklib.c     src_buf[RSTRING(str)->len] = 0;
RSTRING          6307 ext/tk/tcltklib.c     dst_buf = ALLOC_N(char,(RSTRING(str)->len)+1);
RSTRING          6310 ext/tk/tcltklib.c     while(RSTRING(str)->len > ptr - src_buf) {
RSTRING          6374 ext/tk/tcltklib.c                               RSTRING(enc_name)->ptr) != TCL_OK) {
RSTRING          6376 ext/tk/tcltklib.c                  RSTRING(enc_name)->ptr);
RSTRING          7026 ext/tk/tcltklib.c             ret = Tcl_GetVar2Ex(ptr->ip, RSTRING(varname)->ptr,
RSTRING          7027 ext/tk/tcltklib.c                                 NIL_P(index) ? NULL : RSTRING(index)->ptr,
RSTRING          7061 ext/tk/tcltklib.c             ret = Tcl_GetVar2(ptr->ip, RSTRING(varname)->ptr,
RSTRING          7062 ext/tk/tcltklib.c                               NIL_P(index) ? NULL : RSTRING(index)->ptr,
RSTRING          7160 ext/tk/tcltklib.c             ret = Tcl_SetVar2Ex(ptr->ip, RSTRING(varname)->ptr,
RSTRING          7161 ext/tk/tcltklib.c                                 NIL_P(index) ? NULL : RSTRING(index)->ptr,
RSTRING          7198 ext/tk/tcltklib.c             ret = Tcl_SetVar2(ptr->ip, RSTRING(varname)->ptr,
RSTRING          7199 ext/tk/tcltklib.c                               NIL_P(index) ? NULL : RSTRING(index)->ptr,
RSTRING          7200 ext/tk/tcltklib.c                               RSTRING(value)->ptr, FIX2INT(flag));
RSTRING          7280 ext/tk/tcltklib.c     ptr->return_value = Tcl_UnsetVar2(ptr->ip, RSTRING(varname)->ptr,
RSTRING          7281 ext/tk/tcltklib.c                                       NIL_P(index) ? NULL : RSTRING(index)->ptr,
RSTRING          7471 ext/tk/tcltklib.c         if (Tcl_SplitList(interp, RSTRING(list_str)->ptr,
RSTRING          7551 ext/tk/tcltklib.c         len += Tcl_ScanCountedElement(dst, RSTRING(argv[num])->len,
RSTRING          7563 ext/tk/tcltklib.c         len = Tcl_ConvertCountedElement(RSTRING(argv[num])->ptr,
RSTRING          7564 ext/tk/tcltklib.c                                         RSTRING(argv[num])->len,
RSTRING          7567 ext/tk/tcltklib.c         len = Tcl_ConvertElement(RSTRING(argv[num])->ptr, dst, flagPtr[num]);
RSTRING          7610 ext/tk/tcltklib.c     len = Tcl_ScanCountedElement(RSTRING(src)->ptr, RSTRING(src)->len,
RSTRING          7613 ext/tk/tcltklib.c     len = Tcl_ConvertCountedElement(RSTRING(src)->ptr, RSTRING(src)->len,
RSTRING          7614 ext/tk/tcltklib.c                                     RSTRING(dst)->ptr, scan_flag);
RSTRING          7616 ext/tk/tcltklib.c     len = Tcl_ScanElement(RSTRING(src)->ptr, &scan_flag);
RSTRING          7618 ext/tk/tcltklib.c     len = Tcl_ConvertElement(RSTRING(src)->ptr, RSTRING(dst)->ptr, scan_flag);
RSTRING          7621 ext/tk/tcltklib.c     RSTRING(dst)->len = len;
RSTRING          7622 ext/tk/tcltklib.c     RSTRING(dst)->ptr[len] = '\0';
RSTRING          7932 ext/tk/tcltklib.c     ret = ruby_open_tcl_dll(RSTRING(rb_argv0)->ptr);
RSTRING           151 ext/tk/tkutil/tkutil.c     if (strncmp(cmd_id_head, RSTRING(cmd_id)->ptr, head_len) != 0) {
RSTRING           155 ext/tk/tkutil/tkutil.c                 RSTRING(cmd_id)->ptr + head_len, prefix_len) != 0) {
RSTRING           160 ext/tk/tkutil/tkutil.c                           rb_str_new2(RSTRING(cmd_id)->ptr + head_len));
RSTRING           858 ext/tk/tkutil/tkutil.c                RSTRING(rb_funcall(obj, rb_intern("inspect"), 0, 0))->ptr);
RSTRING           962 ext/tk/tkutil/tkutil.c     if (RSTRING(value)->ptr == (char*)NULL) return Qnil;
RSTRING           964 ext/tk/tkutil/tkutil.c     if (RSTRING(value)->ptr[0] == '\0'
RSTRING           965 ext/tk/tkutil/tkutil.c         || strcmp(RSTRING(value)->ptr, "0") == 0
RSTRING           966 ext/tk/tkutil/tkutil.c         || strcmp(RSTRING(value)->ptr, "no") == 0
RSTRING           967 ext/tk/tkutil/tkutil.c         || strcmp(RSTRING(value)->ptr, "off") == 0
RSTRING           968 ext/tk/tkutil/tkutil.c         || strcmp(RSTRING(value)->ptr, "false") == 0) {
RSTRING           979 ext/tk/tkutil/tkutil.c     return rb_cstr_to_inum(RSTRING(value)->ptr, 10, 1);
RSTRING           986 ext/tk/tkutil/tkutil.c     return rb_cstr_to_inum(RSTRING(value)->ptr, 0, 1);
RSTRING           993 ext/tk/tkutil/tkutil.c     return rb_float_new(rb_cstr_to_dbl(RSTRING(value)->ptr, 1));
RSTRING          1001 ext/tk/tkutil/tkutil.c              "invalid value for Number: '%s'", RSTRING(value)->ptr);
RSTRING          1020 ext/tk/tkutil/tkutil.c     if (RSTRING(value)->ptr == (char*)NULL) return INT2FIX(0);
RSTRING          1042 ext/tk/tkutil/tkutil.c     ptr = RSTRING(value)->ptr;
RSTRING          1043 ext/tk/tkutil/tkutil.c     len = RSTRING(value)->len;
RSTRING          1058 ext/tk/tkutil/tkutil.c     if (RSTRING(value)->ptr == (char*)NULL) return rb_tainted_str_new2("");
RSTRING          1070 ext/tk/tkutil/tkutil.c     if (RSTRING(value)->ptr == (char*)NULL) return rb_tainted_str_new2("");
RSTRING          1177 ext/tk/tkutil/tkutil.c         key_id = rb_intern(RSTRING(key)->ptr);
RSTRING          1189 ext/tk/tkutil/tkutil.c         value_id = rb_intern(RSTRING(value)->ptr);
RSTRING          1245 ext/tk/tkutil/tkutil.c             str = RSTRING(argv[i])->ptr;
RSTRING          1260 ext/tk/tkutil/tkutil.c         id = rb_intern(RSTRING(rb_str_cat2(rb_str_new2("@"), str))->ptr);
RSTRING          1300 ext/tk/tkutil/tkutil.c         ptr = RSTRING(RARRAY(list)->ptr[i])->ptr;
RSTRING          1383 ext/tk/tkutil/tkutil.c                 RSTRING(
RSTRING          1448 ext/tk/tkutil/tkutil.c         if (idx >= RSTRING(arg_key)->len) {
RSTRING          1450 ext/tk/tkutil/tkutil.c         } else if (*(RSTRING(arg_key)->ptr + idx) == ' ') {
RSTRING          1453 ext/tk/tkutil/tkutil.c           ptr = strchr(inf->key, *(RSTRING(arg_key)->ptr + idx));
RSTRING           287 ext/zlib/zlib.c 	sum = func(sum, RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING           442 ext/zlib/zlib.c 	z->stream.next_out = RSTRING(z->buf)->ptr;
RSTRING           448 ext/zlib/zlib.c     if (RSTRING(z->buf)->len - z->buf_filled >= ZSTREAM_AVAIL_OUT_STEP_MAX) {
RSTRING           461 ext/zlib/zlib.c     z->stream.next_out = RSTRING(z->buf)->ptr + z->buf_filled;
RSTRING           474 ext/zlib/zlib.c 	z->stream.next_out = RSTRING(z->buf)->ptr;
RSTRING           480 ext/zlib/zlib.c 	z->stream.next_out = RSTRING(z->buf)->ptr + z->buf_filled;
RSTRING           495 ext/zlib/zlib.c 	z->stream.next_out = RSTRING(z->buf)->ptr;
RSTRING           501 ext/zlib/zlib.c     if (RSTRING(z->buf)->len < z->buf_filled + len) {
RSTRING           513 ext/zlib/zlib.c     memcpy(RSTRING(z->buf)->ptr + z->buf_filled, src, len);
RSTRING           515 ext/zlib/zlib.c     z->stream.next_out = RSTRING(z->buf)->ptr + z->buf_filled;
RSTRING           519 ext/zlib/zlib.c     zstream_append_buffer((z),RSTRING(v)->ptr,RSTRING(v)->len)
RSTRING           557 ext/zlib/zlib.c     memmove(RSTRING(z->buf)->ptr, RSTRING(z->buf)->ptr + len,
RSTRING           559 ext/zlib/zlib.c     z->stream.next_out = RSTRING(z->buf)->ptr + z->buf_filled;
RSTRING           560 ext/zlib/zlib.c     z->stream.avail_out = RSTRING(z->buf)->len - z->buf_filled;
RSTRING           573 ext/zlib/zlib.c     if (NIL_P(z->buf) || RSTRING(z->buf)->len - z->buf_filled == 0) {
RSTRING           577 ext/zlib/zlib.c     memmove(RSTRING(z->buf)->ptr + 1, RSTRING(z->buf)->ptr, z->buf_filled);
RSTRING           578 ext/zlib/zlib.c     RSTRING(z->buf)->ptr[0] = (char)c;
RSTRING           605 ext/zlib/zlib.c     zstream_append_input((z), RSTRING(v)->ptr, RSTRING(v)->len)
RSTRING           612 ext/zlib/zlib.c     if (NIL_P(z->input) || RSTRING(z->input)->len <= len) {
RSTRING           616 ext/zlib/zlib.c 	memmove(RSTRING(z->input)->ptr, RSTRING(z->input)->ptr + len,
RSTRING           617 ext/zlib/zlib.c 		RSTRING(z->input)->len - len);
RSTRING           618 ext/zlib/zlib.c 	rb_str_resize(z->input, RSTRING(z->input)->len - len);
RSTRING           720 ext/zlib/zlib.c 	z->stream.next_in = RSTRING(z->input)->ptr;
RSTRING           721 ext/zlib/zlib.c 	z->stream.avail_in = RSTRING(z->input)->len;
RSTRING           779 ext/zlib/zlib.c 	z->stream.next_in = RSTRING(z->input)->ptr;
RSTRING           780 ext/zlib/zlib.c 	z->stream.avail_in = RSTRING(z->input)->len;
RSTRING           784 ext/zlib/zlib.c 				  RSTRING(z->input)->len - z->stream.avail_in);
RSTRING          1035 ext/zlib/zlib.c     return INT2FIX(NIL_P(z->input) ? 0 : (int)(RSTRING(z->input)->len));
RSTRING          1190 ext/zlib/zlib.c     zstream_run(z, RSTRING(src)->ptr, RSTRING(src)->len, Z_FINISH);
RSTRING          1254 ext/zlib/zlib.c     if (flush != Z_NO_FLUSH || RSTRING(src)->len > 0) { /* prevent BUF_ERROR */
RSTRING          1255 ext/zlib/zlib.c 	zstream_run(z, RSTRING(src)->ptr, RSTRING(src)->len, flush);
RSTRING          1392 ext/zlib/zlib.c 			       RSTRING(src)->ptr, RSTRING(src)->len);
RSTRING          1457 ext/zlib/zlib.c     zstream_run(z, RSTRING(src)->ptr, RSTRING(src)->len, Z_SYNC_FLUSH);
RSTRING          1513 ext/zlib/zlib.c     if (RSTRING(src)->len > 0) { /* prevent Z_BUF_ERROR */
RSTRING          1514 ext/zlib/zlib.c 	zstream_run(z, RSTRING(src)->ptr, RSTRING(src)->len, Z_SYNC_FLUSH);
RSTRING          1610 ext/zlib/zlib.c     return zstream_sync(z, RSTRING(src)->ptr, RSTRING(src)->len);
RSTRING          1654 ext/zlib/zlib.c 			       RSTRING(src)->ptr, RSTRING(src)->len);
RSTRING          1873 ext/zlib/zlib.c     while (NIL_P(gz->z.input) || RSTRING(gz->z.input)->len < size) {
RSTRING          1890 ext/zlib/zlib.c 	p = memchr(RSTRING(gz->z.input)->ptr + offset, '\0',
RSTRING          1891 ext/zlib/zlib.c 		   RSTRING(gz->z.input)->len - offset);
RSTRING          1897 ext/zlib/zlib.c 	offset = RSTRING(gz->z.input)->len;
RSTRING          2005 ext/zlib/zlib.c     head = RSTRING(gz->z.input)->ptr;
RSTRING          2043 ext/zlib/zlib.c 	len = gzfile_get16(RSTRING(gz->z.input)->ptr);
RSTRING          2051 ext/zlib/zlib.c 	len = p - RSTRING(gz->z.input)->ptr;
RSTRING          2052 ext/zlib/zlib.c 	gz->orig_name = rb_str_new(RSTRING(gz->z.input)->ptr, len);
RSTRING          2058 ext/zlib/zlib.c 	len = p - RSTRING(gz->z.input)->ptr;
RSTRING          2059 ext/zlib/zlib.c 	gz->comment = rb_str_new(RSTRING(gz->z.input)->ptr, len);
RSTRING          2064 ext/zlib/zlib.c     if (gz->z.input != Qnil && RSTRING(gz->z.input)->len > 0) {
RSTRING          2081 ext/zlib/zlib.c     crc = gzfile_get32(RSTRING(gz->z.input)->ptr);
RSTRING          2082 ext/zlib/zlib.c     length = gzfile_get32(RSTRING(gz->z.input)->ptr + 4);
RSTRING          2127 ext/zlib/zlib.c 	if (RSTRING(str)->len > 0) { /* prevent Z_BUF_ERROR */
RSTRING          2128 ext/zlib/zlib.c 	    zstream_run(&gz->z, RSTRING(str)->ptr, RSTRING(str)->len,
RSTRING          2141 ext/zlib/zlib.c     if (RSTRING(str)->len <= gz->ungetc) {
RSTRING          2142 ext/zlib/zlib.c 	gz->ungetc -= RSTRING(str)->len;
RSTRING          2145 ext/zlib/zlib.c 	gz->crc = crc32(gz->crc, RSTRING(str)->ptr + gz->ungetc,
RSTRING          2146 ext/zlib/zlib.c 			RSTRING(str)->len - gz->ungetc);
RSTRING          2221 ext/zlib/zlib.c         rb_str_resize(outbuf, RSTRING(dst)->len);
RSTRING          2222 ext/zlib/zlib.c         memcpy(RSTRING(outbuf)->ptr, RSTRING(dst)->ptr, RSTRING(dst)->len);
RSTRING          2327 ext/zlib/zlib.c 	n += RSTRING(gz->z.input)->len;
RSTRING          2428 ext/zlib/zlib.c     io = rb_file_open(RSTRING(filename)->ptr, mode);
RSTRING          2577 ext/zlib/zlib.c     p = memchr(RSTRING(s)->ptr, '\0', RSTRING(s)->len);
RSTRING          2579 ext/zlib/zlib.c 	rb_str_resize(s, p - RSTRING(s)->ptr);
RSTRING          2600 ext/zlib/zlib.c     p = memchr(RSTRING(s)->ptr, '\0', RSTRING(s)->len);
RSTRING          2602 ext/zlib/zlib.c 	rb_str_resize(s, p - RSTRING(s)->ptr);
RSTRING          2847 ext/zlib/zlib.c     gzfile_write(gz, RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING          2848 ext/zlib/zlib.c     return INT2FIX(RSTRING(str)->len);
RSTRING          3094 ext/zlib/zlib.c 	dst = INT2FIX((unsigned int)(RSTRING(dst)->ptr[0]) & 0xff);
RSTRING          3153 ext/zlib/zlib.c     p = RSTRING(gz->z.buf)->ptr;
RSTRING          3164 ext/zlib/zlib.c 	    p = RSTRING(gz->z.buf)->ptr;
RSTRING          3178 ext/zlib/zlib.c     if (RSTRING(rs)->ptr != rsptr && RSTRING(rs)->len != rslen)
RSTRING          3207 ext/zlib/zlib.c 	if (RSTRING(dst)->len != 0) gz->lineno++;
RSTRING          3211 ext/zlib/zlib.c     if (RSTRING(rs)->len == 0) {
RSTRING          3216 ext/zlib/zlib.c 	rsptr = RSTRING(rs)->ptr;
RSTRING          3217 ext/zlib/zlib.c 	rslen = RSTRING(rs)->len;
RSTRING          3233 ext/zlib/zlib.c     p = RSTRING(gz->z.buf)->ptr;
RSTRING          3239 ext/zlib/zlib.c 	    p = RSTRING(gz->z.buf)->ptr + n - rslen;
RSTRING           746 file.c         	rb_sys_fail(RSTRING(fname)->ptr);
RSTRING          1449 file.c             if (access(RSTRING(fname1)->ptr, 0)) return Qfalse;
RSTRING          1450 file.c             if (access(RSTRING(fname2)->ptr, 0)) return Qfalse;
RSTRING          1454 file.c             if (RSTRING(fname1)->len != RSTRING(fname2)->len) return Qfalse;
RSTRING          1455 file.c             if (rb_memcicmp(RSTRING(fname1)->ptr, RSTRING(fname2)->ptr, RSTRING(fname1)->len))
RSTRING          1542 file.c         	rb_sys_fail(RSTRING(fname)->ptr);
RSTRING          1608 file.c         	rb_sys_fail(RSTRING(fname)->ptr);
RSTRING          1653 file.c         	rb_sys_fail(RSTRING(fname)->ptr);
RSTRING          2019 file.c             len = RSTRING(s1)->len + RSTRING(s2)->len + 5;
RSTRING          2021 file.c             snprintf(buf, len, "(%s, %s)", RSTRING(s1)->ptr, RSTRING(s2)->ptr);
RSTRING          2108 file.c             while ((rv = readlink(RSTRING(path)->ptr, buf, size)) == size
RSTRING          2118 file.c         	rb_sys_fail(RSTRING(path)->ptr);
RSTRING          2381 file.c             buf = RSTRING(result)->ptr;\
RSTRING          2387 file.c             p = buf = RSTRING(result)->ptr,\
RSTRING          2388 file.c             buflen = RSTRING(result)->len,\
RSTRING          2592 file.c             RSTRING(result)->len = p - buf;
RSTRING          2683 file.c             if (RSTRING(fname)->len == 0 || !*(name = RSTRING(fname)->ptr))
RSTRING          2714 file.c         	    if (f == RSTRING(fname)->len) return fname;
RSTRING          2872 file.c         	    len += RSTRING(RARRAY(ary)->ptr[i])->len;
RSTRING          2879 file.c         	len += RSTRING(sep)->len * RARRAY(ary)->len - 1;
RSTRING          2903 file.c         	    if (RSTRING(tmp)->ptr && isdirsep(RSTRING(tmp)->ptr[0])) {
RSTRING          2904 file.c         		RSTRING(result)->len = tail - name;
RSTRING          2958 file.c         	rb_sys_fail(RSTRING(path)->ptr);
RSTRING          2966 file.c         	    rb_sys_fail(RSTRING(path)->ptr);
RSTRING          2970 file.c         	    rb_sys_fail(RSTRING(path)->ptr);
RSTRING          2975 file.c         	    rb_sys_fail(RSTRING(path)->ptr);
RSTRING          3307 file.c         	    rb_sys_fail(RSTRING(argv[1])->ptr);
RSTRING          3390 file.c         	rb_sys_fail(RSTRING(fname)->ptr);
RSTRING          4096 file.c             char *f = RSTRING(*filep)->ptr;
RSTRING          4130 file.c         	if (RSTRING(str)->len == 0) continue;
RSTRING          4131 file.c         	path = RSTRING(str)->ptr;
RSTRING          4190 file.c         	    if (RSTRING(str)->len > 0) {
RSTRING          4195 file.c         	if (RSTRING(tmp)->len == 0) {
RSTRING          4199 file.c         	    lpath = RSTRING(tmp)->ptr;
RSTRING          1116 hash.c             if (RSTRING(str)->len > 1) {
RSTRING          1539 hash.c             nam = RSTRING(name)->ptr;
RSTRING          1540 hash.c             if (strlen(nam) != RSTRING(name)->len) {
RSTRING          1578 hash.c             nam = RSTRING(name)->ptr;
RSTRING          1579 hash.c             if (strlen(nam) != RSTRING(name)->len) {
RSTRING          1614 hash.c             nam = RSTRING(key)->ptr;
RSTRING          1615 hash.c             if (strlen(nam) != RSTRING(key)->len) {
RSTRING          1768 hash.c             name = RSTRING(nm)->ptr;
RSTRING          1769 hash.c             value = RSTRING(val)->ptr;
RSTRING          1770 hash.c             if (strlen(name) != RSTRING(nm)->len)
RSTRING          1772 hash.c             if (strlen(value) != RSTRING(val)->len)
RSTRING          2095 hash.c             if (strlen(s) != RSTRING(key)->len)
RSTRING          2113 hash.c         	    if (RSTRING(value)->len == len && strncmp(s, RSTRING(value)->ptr, len) == 0) {
RSTRING          2137 hash.c         	    if (RSTRING(value)->len == len && strncmp(s, RSTRING(value)->ptr, len) == 0) {
RSTRING          2194 hash.c         	    VALUE val = env_str_new2(getenv(RSTRING(key)->ptr));
RSTRING           548 io.c               len = RSTRING(str)->len;
RSTRING           558 io.c                   ((fptr->mode & FMODE_TTY) && memchr(RSTRING(str)->ptr+offset, '\n', len))) {
RSTRING           565 io.c                       MEMMOVE(fptr->wbuf+fptr->wbuf_off+fptr->wbuf_len, RSTRING(str)->ptr+offset, char, len);
RSTRING           587 io.c           	r = write(fptr->fd, RSTRING(str)->ptr+offset, l);
RSTRING           597 io.c           	    if (offset < RSTRING(str)->len)
RSTRING           608 io.c               MEMMOVE(fptr->wbuf+fptr->wbuf_off+fptr->wbuf_len, RSTRING(str)->ptr+offset, char, len);
RSTRING           658 io.c               if (RSTRING(str)->len == 0) return INT2FIX(0);
RSTRING          1142 io.c               long len = RSTRING(str)->len - offset;
RSTRING          1147 io.c           	c = read_buffered_data(RSTRING(str)->ptr+offset, n, fptr);
RSTRING          1158 io.c           	RSTRING(str)->ptr[offset++] = c;
RSTRING          1159 io.c           	if (offset > RSTRING(str)->len) break;
RSTRING          1177 io.c               MEMCPY(ptr, RSTRING(str)->ptr, char, n);
RSTRING          1271 io.c               if (RSTRING(str)->len != len) {
RSTRING          1275 io.c               n = read_buffered_data(RSTRING(str)->ptr, len, fptr);
RSTRING          1278 io.c           	if (RSTRING(str)->len != len) goto modified;
RSTRING          1280 io.c                   n = read(fptr->fd, RSTRING(str)->ptr, len);
RSTRING          1417 io.c               if (RSTRING(str)->len != len) {
RSTRING          1427 io.c               RSTRING(str)->len = n;
RSTRING          1428 io.c               RSTRING(str)->ptr[n] = '\0';
RSTRING          1449 io.c           		last = RSTRING(str)->len;
RSTRING          1454 io.c           		RSTRING(str)->len = len;
RSTRING          1455 io.c           		RSTRING(str)->ptr[len] = '\0';
RSTRING          1458 io.c           		RSTRING(str)->ptr[last++] = c;
RSTRING          1460 io.c           	    read_buffered_data(RSTRING(str)->ptr + last, pending, fptr); /* must not fail */
RSTRING          1470 io.c           		RSTRING(str)->ptr[RSTRING(str)->len++] = c;
RSTRING          1543 io.c               if (RSTRING(rs)->ptr != rsptr && RSTRING(rs)->len != rslen)
RSTRING          1558 io.c           	if (RSTRING(str)->len == 0) return Qnil;
RSTRING          1569 io.c           	rslen = RSTRING(rs)->len;
RSTRING          1577 io.c           	    return rb_io_getline_fast(fptr, (unsigned char)RSTRING(rs)->ptr[0]);
RSTRING          1580 io.c           	    rsptr = RSTRING(rs)->ptr;
RSTRING          1586 io.c           		if (RSTRING(str)->len < rslen) continue;
RSTRING          1588 io.c           		if (memcmp(RSTRING(str)->ptr + RSTRING(str)->len - rslen,
RSTRING          2290 io.c               n = write(fptr->fd, RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING          2344 io.c               if (RSTRING(str)->len != ilen) {
RSTRING          2348 io.c               n = read(fptr->fd, RSTRING(str)->ptr, ilen);
RSTRING          2358 io.c               RSTRING(str)->len = n;
RSTRING          2359 io.c               RSTRING(str)->ptr[n] = '\0';
RSTRING          2917 io.c           	    args[i] = RSTRING(argv[i])->ptr;
RSTRING          2922 io.c           	exename = RSTRING(prog)->ptr;
RSTRING          2937 io.c           	    rb_sys_fail(RSTRING(prog)->ptr);
RSTRING          2945 io.c               if (!fp) rb_sys_fail(RSTRING(prog)->ptr);
RSTRING          3072 io.c           	    flags = rb_io_mode_modenum(RSTRING(vmode)->ptr);
RSTRING          3076 io.c           	rb_file_sysopen_internal(io, RSTRING(fname)->ptr, flags, fmode);
RSTRING          3080 io.c           	rb_file_open_internal(io, RSTRING(fname)->ptr, mode);
RSTRING          3135 io.c           	flags = rb_io_mode_modenum(RSTRING(vmode)->ptr);
RSTRING          3140 io.c               path = ALLOCA_N(char, strlen(RSTRING(fname)->ptr)+1);
RSTRING          3141 io.c               strcpy(path, RSTRING(fname)->ptr);
RSTRING          3247 io.c           		    argv[0] = rb_str_new(str+1, RSTRING(tmp)->len-1);
RSTRING          3411 io.c               fptr->path = strdup(RSTRING(fname)->ptr);
RSTRING          3420 io.c                   if (freopen(RSTRING(fname)->ptr, mode, fptr->stdio_file) == 0) {
RSTRING          3426 io.c                       rb_warn("setvbuf() can't be honoured for %s", RSTRING(fname)->ptr);
RSTRING          3698 io.c           	if (RSTRING(line)->len == 0 ||
RSTRING          3699 io.c                       RSTRING(line)->ptr[RSTRING(line)->len-1] != '\n') {
RSTRING          3918 io.c           	    flags = rb_io_mode_modenum(RSTRING(mode)->ptr);
RSTRING          3953 io.c           		    rb_raise(rb_eArgError, "incompatible mode \"%s\"", RSTRING(mode)->ptr);
RSTRING          4137 io.c           			(void)unlink(RSTRING(str)->ptr);
RSTRING          4138 io.c           			(void)rename(fn, RSTRING(str)->ptr);
RSTRING          4139 io.c           			fr = rb_sysopen(RSTRING(str)->ptr, O_RDONLY, 0);
RSTRING          4141 io.c           			if (rename(fn, RSTRING(str)->ptr) < 0) {
RSTRING          4143 io.c           				    fn, RSTRING(str)->ptr, strerror(errno));
RSTRING          4636 io.c           	    if (len <= RSTRING(arg)->len) {
RSTRING          4637 io.c           		len = RSTRING(arg)->len;
RSTRING          4639 io.c           	    if (RSTRING(arg)->len < len) {
RSTRING          4642 io.c           	    RSTRING(arg)->ptr[len] = 17;	/* a little sanity check here */
RSTRING          4643 io.c           	    narg = (long)RSTRING(arg)->ptr;
RSTRING          4649 io.c               if (TYPE(arg) == T_STRING && RSTRING(arg)->ptr[len] != 17) {
RSTRING          4766 io.c           	    arg[i] = (unsigned long)RSTRING(v)->ptr;
RSTRING          4964 io.c               arg.io = rb_io_open(RSTRING(fname)->ptr, "r");
RSTRING          4998 io.c               arg.io = rb_io_open(RSTRING(fname)->ptr, "r");
RSTRING          5031 io.c               arg.io = rb_io_open(RSTRING(fname)->ptr, "r");
RSTRING          5146 io.c           	if (RSTRING(str)->len < len) {
RSTRING          5147 io.c           	    len -= RSTRING(str)->len;
RSTRING          5344 io.c               ruby_inplace_mode = strdup(RSTRING(val)->ptr);
RSTRING           103 marshal.c          char *n = RSTRING(path)->ptr;
RSTRING           123 marshal.c          if (arg->dest && RSTRING(buf)->len >= BUFSIZ) {
RSTRING           368 marshal.c          path = RSTRING(class2path(rb_class_real(klass)))->ptr;
RSTRING           381 marshal.c      	w_unique(RSTRING(class2path(klass))->ptr, arg);
RSTRING           479 marshal.c      	    w_bytes(RSTRING(v)->ptr, RSTRING(v)->len, arg);
RSTRING           494 marshal.c      		w_bytes(RSTRING(path)->ptr, RSTRING(path)->len, arg);
RSTRING           502 marshal.c      		w_bytes(RSTRING(path)->ptr, RSTRING(path)->len, arg);
RSTRING           541 marshal.c      	    w_bytes(RSTRING(obj)->ptr, RSTRING(obj)->len, arg);
RSTRING           749 marshal.c      	if (RSTRING(arg->src)->len > arg->offset) {
RSTRING           750 marshal.c      	    c = (unsigned char)RSTRING(arg->src)->ptr[arg->offset++];
RSTRING           822 marshal.c      	if (RSTRING(arg->src)->len > arg->offset) {
RSTRING           823 marshal.c      	    str = rb_str_new(RSTRING(arg->src)->ptr+arg->offset, len);
RSTRING           837 marshal.c      	if (RSTRING(str)->len != len) goto too_short;
RSTRING           860 marshal.c          id = rb_intern(RSTRING(r_bytes(arg))->ptr);
RSTRING          1016 marshal.c      	    const char *ptr = RSTRING(str)->ptr;
RSTRING          1030 marshal.c      		d = load_mantissa(d, e, RSTRING(str)->len - (e - ptr));
RSTRING          1054 marshal.c      	    MEMCPY(digits, RSTRING(data)->ptr, char, len * 2);
RSTRING          1090 marshal.c      	    v = r_entry(rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len, options), arg);
RSTRING          1243 marshal.c      	    v = rb_path2class(RSTRING(str)->ptr);
RSTRING          1252 marshal.c      	    v = path2class(RSTRING(str)->ptr);
RSTRING          1261 marshal.c      	    v = path2module(RSTRING(str)->ptr);
RSTRING           120 numeric.c      	     RSTRING(v)->ptr:
RSTRING           313 object.c           if (RSTRING(str)->ptr[0] == '-') { /* first element */
RSTRING           314 object.c       	RSTRING(str)->ptr[0] = '#';
RSTRING           340 object.c           RSTRING(str)->ptr[0] = '#';
RSTRING           774 object.c       		 RSTRING(rb_inspect(y))->ptr,
RSTRING          1054 object.c           RSTRING(str)->ptr[0] = ':';
RSTRING          1055 object.c           strcpy(RSTRING(str)->ptr+1, name);
RSTRING          1058 object.c       	strncpy(RSTRING(str)->ptr, ":\"", 2);
RSTRING          1492 object.c           if (!RSTRING(str)->ptr || RSTRING(str)->len == 0) {
RSTRING          1495 object.c           if (RSTRING(str)->len != strlen(RSTRING(str)->ptr)) {
RSTRING          1498 object.c           return rb_intern(RSTRING(str)->ptr);
RSTRING          1525 object.c       	rb_raise(rb_eTypeError, "%s is not a symbol", RSTRING(rb_inspect(name))->ptr);
RSTRING          2125 object.c           s = RSTRING(str)->ptr;
RSTRING          2126 object.c           len = RSTRING(str)->len;
RSTRING          2217 object.c           if (len) *len = RSTRING(str)->len;
RSTRING          2218 object.c           else if (RTEST(ruby_verbose) && RSTRING(str)->len != strlen(RSTRING(str)->ptr)) {
RSTRING          2221 object.c           return RSTRING(str)->ptr;
RSTRING           453 pack.c             p = RSTRING(fmt)->ptr;
RSTRING           454 pack.c             pend = p + RSTRING(fmt)->len;
RSTRING           464 pack.c         	if (RSTRING(fmt)->ptr + RSTRING(fmt)->len != pend) {
RSTRING           514 pack.c         		ptr = RSTRING(from)->ptr;
RSTRING           515 pack.c         		plen = RSTRING(from)->len;
RSTRING           847 pack.c         	    plen = RSTRING(res)->len;
RSTRING           850 pack.c         	    RSTRING(res)->len = plen - len;
RSTRING           851 pack.c         	    RSTRING(res)->ptr[plen - len] = '\0';
RSTRING           855 pack.c         	    len -= RSTRING(res)->len;
RSTRING           886 pack.c         	    ptr = RSTRING(from)->ptr;
RSTRING           887 pack.c         	    plen = RSTRING(from)->len;
RSTRING           917 pack.c         		if (RSTRING(from)->len < len) {
RSTRING           919 pack.c         			     RSTRING(from)->len, len);
RSTRING           973 pack.c         		if (RSTRING(buf)->len) {
RSTRING           974 pack.c         		    bufs = RSTRING(buf)->ptr;
RSTRING           975 pack.c         		    bufe = bufs + RSTRING(buf)->len - 1;
RSTRING           982 pack.c         		    rb_str_buf_cat(res, RSTRING(buf)->ptr, RSTRING(buf)->len);
RSTRING          1053 pack.c             unsigned char *s = (unsigned char*)RSTRING(from)->ptr;
RSTRING          1054 pack.c             unsigned char *send = s + RSTRING(from)->len;
RSTRING          1304 pack.c             s = RSTRING(str)->ptr;
RSTRING          1305 pack.c             send = s + RSTRING(str)->len;
RSTRING          1306 pack.c             p = RSTRING(fmt)->ptr;
RSTRING          1307 pack.c             pend = p + RSTRING(fmt)->len;
RSTRING          1401 pack.c         		t = RSTRING(bitstr)->ptr;
RSTRING          1421 pack.c         		t = RSTRING(bitstr)->ptr;
RSTRING          1441 pack.c         		t = RSTRING(bitstr)->ptr;
RSTRING          1463 pack.c         		t = RSTRING(bitstr)->ptr;
RSTRING          1717 pack.c         		char *ptr = RSTRING(buf)->ptr;
RSTRING          1727 pack.c         		    if (total > RSTRING(buf)->len) {
RSTRING          1728 pack.c         			len -= total - RSTRING(buf)->len;
RSTRING          1729 pack.c         			total = RSTRING(buf)->len;
RSTRING          1764 pack.c         		RSTRING(buf)->ptr[total] = '\0';
RSTRING          1765 pack.c         		RSTRING(buf)->len = total;
RSTRING          1773 pack.c         		char *ptr = RSTRING(buf)->ptr;
RSTRING          1809 pack.c         		RSTRING(buf)->len = ptr - RSTRING(buf)->ptr;
RSTRING          1817 pack.c         		char *ptr = RSTRING(buf)->ptr;
RSTRING          1836 pack.c         		RSTRING(buf)->len = ptr - RSTRING(buf)->ptr;
RSTRING          1842 pack.c         	    if (len > RSTRING(str)->len)
RSTRING          1844 pack.c         	    s = RSTRING(str)->ptr + len;
RSTRING          1848 pack.c         	    if (len > s - RSTRING(str)->ptr)
RSTRING          1876 pack.c         			if (TYPE(*p) == T_STRING && RSTRING(*p)->ptr == t) {
RSTRING          1877 pack.c         			    if (len > RSTRING(*p)->len) {
RSTRING          1878 pack.c         				len = RSTRING(*p)->len;
RSTRING          1918 pack.c         			    if (TYPE(*p) == T_STRING && RSTRING(*p)->ptr == t) {
RSTRING          3632 parse.y        				node->nd_lit = rb_reg_compile(RSTRING(src)->ptr,
RSTRING          3633 parse.y        							      RSTRING(src)->len,
RSTRING          3874 parse.y        				if (RSTRING(lit)->len == 0) {
RSTRING          3878 parse.y        				if (strlen(RSTRING(lit)->ptr) == RSTRING(lit)->len) {
RSTRING          3879 parse.y        				    $$->nd_lit = ID2SYM(rb_intern(RSTRING($$->nd_lit)->ptr));
RSTRING          4612 parse.y            beg = RSTRING(s)->ptr;
RSTRING          4614 parse.y        	if (RSTRING(s)->len == lex_gets_ptr) return Qnil;
RSTRING          4617 parse.y            pend = RSTRING(s)->ptr + RSTRING(s)->len;
RSTRING          4622 parse.y            lex_gets_ptr = end - RSTRING(s)->ptr;
RSTRING          4738 parse.y        	    lex_pbeg = lex_p = RSTRING(v)->ptr;
RSTRING          4739 parse.y        	    lex_pend = lex_p + RSTRING(v)->len;
RSTRING          5056 parse.y            xfree(RSTRING(str)->ptr);
RSTRING          5291 parse.y            lex_pbeg = RSTRING(line)->ptr;
RSTRING          5292 parse.y            lex_pend = lex_pbeg + RSTRING(line)->len;
RSTRING          5327 parse.y            eos = RSTRING(here->nd_lit)->ptr;
RSTRING          5328 parse.y            len = RSTRING(here->nd_lit)->len - 1;
RSTRING          5345 parse.y        	    p = RSTRING(lex_lastline)->ptr;
RSTRING          5490 parse.y        	   MEMCPY(RSTRING(_s)->ptr, (_p), char, (_n)), (_s)) \
RSTRING          5553 parse.y        	    if (strncmp(p->name, RSTRING(name)->ptr, n) == 0) {
RSTRING          5555 parse.y        		(*p->func)(parser, RSTRING(name)->ptr, RSTRING(val)->ptr);
RSTRING          9260 parse.y        	rb_raise(rb_eArgError, RSTRING(msg)->ptr);
RSTRING           981 process.c      	args[i] = RSTRING(argv[i])->ptr;
RSTRING          1122 process.c      	args[i] = RSTRING(argv[i])->ptr;
RSTRING          1126 process.c      	return proc_spawn_v(args, prog ? RSTRING(prog)->ptr : 0);
RSTRING          1187 process.c          security(RSTRING(prog ? prog : argv[0])->ptr);
RSTRING          1229 process.c      	e.prog = RSTRING(argv[0])->ptr;
RSTRING          1234 process.c      	e.prog = prog ? RSTRING(prog)->ptr : 0;
RSTRING          1547 process.c          earg.prog = prog ? RSTRING(prog)->ptr : 0;
RSTRING          1552 process.c      	status = proc_spawn(RSTRING(prog)->ptr);
RSTRING          1595 process.c          if (status == -1) rb_sys_fail(RSTRING(argv[0])->ptr);
RSTRING          1618 process.c          if (pid == -1) rb_sys_fail(RSTRING(argv[0])->ptr);
RSTRING          2652 process.c      		gr = getgrnam(RSTRING(tmp)->ptr);
RSTRING          2655 process.c      			     "can't find group for %s", RSTRING(tmp)->ptr);
RSTRING           515 re.c           	rb_compile_error("%s: %s", err, RSTRING(desc)->ptr);
RSTRING           517 re.c           	rb_raise(rb_eRegexpError, "%s: %s", err, RSTRING(desc)->ptr);
RSTRING           862 re.c           	range = RSTRING(str)->len - pos;
RSTRING           867 re.c               if (pos > 0 && ONIGENC_MBC_MAXLEN(enc) != 1 && pos < RSTRING(str)->len) {
RSTRING           868 re.c           	 string = (UChar*)RSTRING(str)->ptr;
RSTRING           890 re.c               if (pos > RSTRING(str)->len || pos < 0) {
RSTRING           907 re.c           	range = RSTRING(str)->len - pos;
RSTRING           911 re.c           			 (UChar*)(RSTRING(str)->ptr),
RSTRING           912 re.c           			 ((UChar*)(RSTRING(str)->ptr) + RSTRING(str)->len),
RSTRING           913 re.c           			 ((UChar*)(RSTRING(str)->ptr) + pos),
RSTRING           914 re.c           			 ((UChar*)(RSTRING(str)->ptr) + pos + range),
RSTRING          1042 re.c               str = rb_str_substr(str, pos, RSTRING(str)->len - pos);
RSTRING          1388 re.c               if (reg_cache && RREGEXP(reg_cache)->len == RSTRING(str)->len
RSTRING          1391 re.c           	&& memcmp(RREGEXP(reg_cache)->str, RSTRING(str)->ptr, RSTRING(str)->len) == 0)
RSTRING          1396 re.c               return reg_cache = rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len,
RSTRING          1474 re.c           	    pos += RSTRING(str)->len;
RSTRING          1706 re.c           	len = RSTRING(argv[0])->len;
RSTRING          1719 re.c               s = RSTRING(str)->ptr;
RSTRING          1720 re.c               send = s + RSTRING(str)->len;
RSTRING          1744 re.c               tmp = rb_str_new(0, RSTRING(str)->len*2);
RSTRING          1745 re.c               t = RSTRING(tmp)->ptr;
RSTRING          1747 re.c               memcpy(t, RSTRING(str)->ptr, s - RSTRING(str)->ptr);
RSTRING          1748 re.c               t += s - RSTRING(str)->ptr;
RSTRING          1791 re.c               rb_str_resize(tmp, t - RSTRING(tmp)->ptr);
RSTRING          1930 re.c                                       RSTRING(str1)->ptr, RSTRING(str2)->ptr);
RSTRING          1989 re.c               p = s = RSTRING(str)->ptr;
RSTRING          1990 re.c               e = s + RSTRING(str)->len;
RSTRING          2022 re.c           	    rb_str_buf_cat(val, RSTRING(src)->ptr, BEG(0));
RSTRING          2026 re.c           	    rb_str_buf_cat(val, RSTRING(src)->ptr+END(0), RSTRING(src)->len-END(0));
RSTRING          2047 re.c           	    rb_str_buf_cat(val, RSTRING(src)->ptr+BEG(no), END(no)-BEG(no));
RSTRING           222 ruby.c             char *p = RSTRING(path)->ptr;
RSTRING           886 ruby.c         		if (RSTRING(line)->len > 2
RSTRING           887 ruby.c         		    && RSTRING(line)->ptr[0] == '#'
RSTRING           888 ruby.c         		    && RSTRING(line)->ptr[1] == '!') {
RSTRING           889 ruby.c         		    if ((p = strstr(RSTRING(line)->ptr, "ruby")) != 0) {
RSTRING           904 ruby.c         		if ((p = strstr(RSTRING(line)->ptr, "ruby")) == 0) {
RSTRING           908 ruby.c         		    char *pend = RSTRING(line)->ptr + RSTRING(line)->len;
RSTRING           910 ruby.c         		    p = RSTRING(line)->ptr;	/* skip `#!' */
RSTRING           938 ruby.c         		RSTRING(line)->ptr[RSTRING(line)->len-1] = '\0';
RSTRING           939 ruby.c         		if (RSTRING(line)->ptr[RSTRING(line)->len-2] == '\r')
RSTRING           940 ruby.c         		    RSTRING(line)->ptr[RSTRING(line)->len-2] = '\0';
RSTRING          1028 ruby.c             s = RSTRING(val)->ptr;
RSTRING          1029 ruby.c             i = RSTRING(val)->len;
RSTRING          1035 ruby.c         	RSTRING(val)->len = i;
RSTRING           306 ruby.h         #define NUM2CHR(x) (((TYPE(x) == T_STRING)&&(RSTRING(x)->len>=1))?\
RSTRING           307 ruby.h                              RSTRING(x)->ptr[0]:(char)(NUM2INT(x)&0xff))
RSTRING           245 signal.c       	s = RSTRING(argv[0])->ptr;
RSTRING           266 signal.c       		s = RSTRING(str)->ptr;
RSTRING           577 signal.c       	    switch (RSTRING(command)->len) {
RSTRING           582 signal.c       		if (strncmp(RSTRING(command)->ptr, "SIG_IGN", 7) == 0) {
RSTRING           585 signal.c       		else if (strncmp(RSTRING(command)->ptr, "SIG_DFL", 7) == 0) {
RSTRING           588 signal.c       		else if (strncmp(RSTRING(command)->ptr, "DEFAULT", 7) == 0) {
RSTRING           593 signal.c       		if (strncmp(RSTRING(command)->ptr, "IGNORE", 6) == 0) {
RSTRING           598 signal.c       		if (strncmp(RSTRING(command)->ptr, "EXIT", 4) == 0) {
RSTRING           623 signal.c       	s = RSTRING(arg->sig)->ptr;
RSTRING            87 sprintf.c          buf = RSTRING(result)->ptr;\
RSTRING           264 sprintf.c          p = RSTRING(fmt)->ptr;
RSTRING           265 sprintf.c          end = p + RSTRING(fmt)->len;
RSTRING           269 sprintf.c          buf = RSTRING(result)->ptr;
RSTRING           417 sprintf.c      		len = RSTRING(str)->len;
RSTRING           432 sprintf.c      			memcpy(&buf[blen], RSTRING(str)->ptr, len);
RSTRING           442 sprintf.c      		PUSH(RSTRING(str)->ptr, len);
RSTRING           591 sprintf.c      			s = RSTRING(tmp)->ptr;
RSTRING           613 sprintf.c      			s = RSTRING(tmp)->ptr;
RSTRING           621 sprintf.c      				t = RSTRING(tmp)->ptr;
RSTRING           635 sprintf.c      				s  = RSTRING(tmp)->ptr;
RSTRING           851 sprintf.c          int blen = buf - RSTRING(result)->ptr, bsiz = fp->_w;
RSTRING           881 sprintf.c          f._p = (unsigned char *)RSTRING(result)->ptr;
RSTRING           886 sprintf.c          rb_str_resize(result, (char *)f._p - RSTRING(result)->ptr);
RSTRING            35 string.c           REALLOC_N(RSTRING(str)->ptr, char, (capacity)+1);\
RSTRING            37 string.c               RSTRING(str)->aux.capa = (capacity);\
RSTRING            45 string.c           if (RSTRING(s)->ptr != p || RSTRING(s)->len != len){
RSTRING            81 string.c           RSTRING(str)->len = len;
RSTRING            82 string.c           RSTRING(str)->aux.capa = len;
RSTRING            83 string.c           RSTRING(str)->ptr = ALLOC_N(char,len+1);
RSTRING            85 string.c       	memcpy(RSTRING(str)->ptr, ptr, len);
RSTRING            87 string.c           RSTRING(str)->ptr[len] = '\0';
RSTRING           129 string.c           RSTRING(str2)->len = RSTRING(str)->len;
RSTRING           130 string.c           RSTRING(str2)->ptr = RSTRING(str)->ptr;
RSTRING           131 string.c           RSTRING(str2)->aux.shared = str;
RSTRING           149 string.c           RSTRING(str2)->len = RSTRING(str)->len;
RSTRING           150 string.c           RSTRING(str2)->ptr = RSTRING(str)->ptr;
RSTRING           153 string.c       	RSTRING(str2)->aux.shared = RSTRING(str)->aux.shared;
RSTRING           157 string.c       	RSTRING(str)->aux.shared = str2;
RSTRING           170 string.c           if (FL_TEST(orig, ELTS_SHARED) && (str = RSTRING(orig)->aux.shared) && klass == RBASIC(str)->klass) {
RSTRING           172 string.c       	ofs = RSTRING(str)->len - RSTRING(orig)->len;
RSTRING           175 string.c       	    RSTRING(str)->ptr += ofs;
RSTRING           176 string.c       	    RSTRING(str)->len -= ofs;
RSTRING           180 string.c       	str = str_new(klass, RSTRING(orig)->ptr, RSTRING(orig)->len);
RSTRING           206 string.c           RSTRING(str)->ptr = 0;
RSTRING           207 string.c           RSTRING(str)->len = 0;
RSTRING           208 string.c           RSTRING(str)->aux.capa = capa;
RSTRING           209 string.c           RSTRING(str)->ptr = ALLOC_N(char, capa+1);
RSTRING           210 string.c           RSTRING(str)->ptr[0] = '\0';
RSTRING           238 string.c           if (!FL_TEST(str, ELTS_SHARED)) free(RSTRING(str)->ptr);
RSTRING           239 string.c           RSTRING(str)->ptr = RSTRING(str2)->ptr;
RSTRING           240 string.c           RSTRING(str)->len = RSTRING(str2)->len;
RSTRING           244 string.c       	RSTRING(str)->aux.shared = RSTRING(str2)->aux.shared;
RSTRING           247 string.c       	RSTRING(str)->aux.capa = RSTRING(str2)->aux.capa;
RSTRING           249 string.c           RSTRING(str2)->ptr = 0;	/* abandon str2 */
RSTRING           250 string.c           RSTRING(str2)->len = 0;
RSTRING           251 string.c           RSTRING(str2)->aux.capa = 0;
RSTRING           311 string.c           return LONG2NUM(RSTRING(str)->len);
RSTRING           327 string.c           if (RSTRING(str)->len == 0)
RSTRING           348 string.c           str3 = rb_str_new(0, RSTRING(str1)->len+RSTRING(str2)->len);
RSTRING           349 string.c           memcpy(RSTRING(str3)->ptr, RSTRING(str1)->ptr, RSTRING(str1)->len);
RSTRING           350 string.c           memcpy(RSTRING(str3)->ptr + RSTRING(str1)->len,
RSTRING           351 string.c       	   RSTRING(str2)->ptr, RSTRING(str2)->len);
RSTRING           352 string.c           RSTRING(str3)->ptr[RSTRING(str3)->len] = '\0';
RSTRING           379 string.c           if (len && LONG_MAX/len <  RSTRING(str)->len) {
RSTRING           383 string.c           str2 = rb_str_new5(str,0, len *= RSTRING(str)->len);
RSTRING           384 string.c           for (i = 0; i < len; i += RSTRING(str)->len) {
RSTRING           385 string.c       	memcpy(RSTRING(str2)->ptr + i,
RSTRING           386 string.c       	       RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING           388 string.c           RSTRING(str2)->ptr[RSTRING(str2)->len] = '\0';
RSTRING           436 string.c           ptr = ALLOC_N(char, RSTRING(str)->len+1);
RSTRING           437 string.c           if (RSTRING(str)->ptr) {
RSTRING           438 string.c       	memcpy(ptr, RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING           440 string.c           ptr[RSTRING(str)->len] = 0;
RSTRING           441 string.c           RSTRING(str)->ptr = ptr;
RSTRING           442 string.c           RSTRING(str)->aux.capa = RSTRING(str)->len;
RSTRING           458 string.c       	rb_ary_concat(RSTRING(str)->aux.shared, add);
RSTRING           464 string.c       	else if (RSTRING(str)->aux.capa != RSTRING(str)->len) {
RSTRING           465 string.c       	    RESIZE_CAPA(str, RSTRING(str)->len);
RSTRING           467 string.c       	RSTRING(str)->aux.shared = add;
RSTRING           476 string.c       	return RSTRING(str)->aux.shared;
RSTRING           491 string.c           if (!RSTRING(s)->ptr) {
RSTRING           493 string.c       	RSTRING(s)->ptr = null_str;
RSTRING           501 string.c           return RSTRING(rb_string_value(ptr))->ptr;
RSTRING           508 string.c           char *s = RSTRING(str)->ptr;
RSTRING           510 string.c           if (!s || RSTRING(str)->len != strlen(s)) {
RSTRING           520 string.c           if (!NIL_P(str) && !RSTRING(str)->ptr) {
RSTRING           522 string.c       	RSTRING(str)->ptr = null_str;
RSTRING           533 string.c           if (beg > RSTRING(str)->len) return Qnil;
RSTRING           535 string.c       	beg += RSTRING(str)->len;
RSTRING           538 string.c           if (beg + len > RSTRING(str)->len) {
RSTRING           539 string.c       	len = RSTRING(str)->len - beg;
RSTRING           548 string.c       	beg + len == RSTRING(str)->len && !FL_TEST(str, STR_ASSOC)) {
RSTRING           550 string.c       	RSTRING(str2)->ptr += RSTRING(str2)->len - len;
RSTRING           551 string.c       	RSTRING(str2)->len = len;
RSTRING           554 string.c       	str2 = rb_str_new5(str, RSTRING(str)->ptr+beg, len);
RSTRING           570 string.c           if (FL_TEST(str, ELTS_SHARED) && RSTRING(str)->aux.shared) {
RSTRING           571 string.c       	VALUE shared = RSTRING(str)->aux.shared;
RSTRING           572 string.c       	if (RSTRING(shared)->len == RSTRING(str)->len) {
RSTRING           611 string.c           if (len != RSTRING(str)->len) {
RSTRING           612 string.c       	if (RSTRING(str)->len < len || RSTRING(str)->len - len > 1024) {
RSTRING           613 string.c       	    REALLOC_N(RSTRING(str)->ptr, char, len+1);
RSTRING           615 string.c       		RSTRING(str)->aux.capa = len;
RSTRING           618 string.c       	RSTRING(str)->len = len;
RSTRING           619 string.c       	RSTRING(str)->ptr[len] = '\0';	/* sentinel */
RSTRING           636 string.c       	capa = RSTRING(str)->aux.capa = RSTRING(str)->len;
RSTRING           639 string.c       	capa = RSTRING(str)->aux.capa;
RSTRING           641 string.c           total = RSTRING(str)->len+len;
RSTRING           648 string.c           memcpy(RSTRING(str)->ptr + RSTRING(str)->len, ptr, len);
RSTRING           649 string.c           RSTRING(str)->len = total;
RSTRING           650 string.c           RSTRING(str)->ptr[total] = '\0'; /* sentinel */
RSTRING           669 string.c       	REALLOC_N(RSTRING(str)->ptr, char, RSTRING(str)->len+len);
RSTRING           670 string.c       	memcpy(RSTRING(str)->ptr + RSTRING(str)->len, ptr, len);
RSTRING           671 string.c       	RSTRING(str)->len += len;
RSTRING           672 string.c       	RSTRING(str)->ptr[RSTRING(str)->len] = '\0'; /* sentinel */
RSTRING           693 string.c       	capa = RSTRING(str)->aux.capa = RSTRING(str)->len;
RSTRING           696 string.c       	capa = RSTRING(str)->aux.capa;
RSTRING           698 string.c           len = RSTRING(str)->len+RSTRING(str2)->len;
RSTRING           705 string.c           memcpy(RSTRING(str)->ptr + RSTRING(str)->len,
RSTRING           706 string.c       	   RSTRING(str2)->ptr, RSTRING(str2)->len);
RSTRING           707 string.c           RSTRING(str)->len += RSTRING(str2)->len;
RSTRING           708 string.c           RSTRING(str)->ptr[RSTRING(str)->len] = '\0'; /* sentinel */
RSTRING           719 string.c           if (RSTRING(str2)->len > 0) {
RSTRING           721 string.c       	    long len = RSTRING(str)->len+RSTRING(str2)->len;
RSTRING           722 string.c       	    REALLOC_N(RSTRING(str)->ptr, char, len+1);
RSTRING           723 string.c       	    memcpy(RSTRING(str)->ptr + RSTRING(str)->len,
RSTRING           724 string.c       		   RSTRING(str2)->ptr, RSTRING(str2)->len);
RSTRING           725 string.c       	    RSTRING(str)->ptr[len] = '\0'; /* sentinel */
RSTRING           726 string.c       	    RSTRING(str)->len = len;
RSTRING           771 string.c           register long len = RSTRING(str)->len;
RSTRING           772 string.c           register char *p = RSTRING(str)->ptr;
RSTRING           825 string.c           len = lesser(RSTRING(str1)->len, RSTRING(str2)->len);
RSTRING           826 string.c           retval = rb_memcmp(RSTRING(str1)->ptr, RSTRING(str2)->ptr, len);
RSTRING           828 string.c       	if (RSTRING(str1)->len == RSTRING(str2)->len) return 0;
RSTRING           829 string.c       	if (RSTRING(str1)->len > RSTRING(str2)->len) return 1;
RSTRING           856 string.c           if (RSTRING(str1)->len == RSTRING(str2)->len &&
RSTRING           873 string.c           if (TYPE(str2) != T_STRING || RSTRING(str1)->len != RSTRING(str2)->len)
RSTRING           876 string.c           if (memcmp(RSTRING(str1)->ptr, RSTRING(str2)->ptr,
RSTRING           877 string.c       	       lesser(RSTRING(str1)->len, RSTRING(str2)->len)) == 0)
RSTRING           955 string.c           len = lesser(RSTRING(str1)->len, RSTRING(str2)->len);
RSTRING           956 string.c           retval = rb_memcicmp(RSTRING(str1)->ptr, RSTRING(str2)->ptr, len);
RSTRING           958 string.c       	if (RSTRING(str1)->len == RSTRING(str2)->len) return INT2FIX(0);
RSTRING           959 string.c       	if (RSTRING(str1)->len > RSTRING(str2)->len) return INT2FIX(1);
RSTRING           973 string.c       	offset += RSTRING(str)->len;
RSTRING           976 string.c           if (RSTRING(str)->len - offset < RSTRING(sub)->len) return -1;
RSTRING           977 string.c           if (RSTRING(sub)->len == 0) return offset;
RSTRING           978 string.c           pos = rb_memsearch(RSTRING(sub)->ptr, RSTRING(sub)->len,
RSTRING           979 string.c       		       RSTRING(str)->ptr+offset, RSTRING(str)->len-offset);
RSTRING          1017 string.c       	pos += RSTRING(str)->len;
RSTRING          1035 string.c       	  long len = RSTRING(str)->len;
RSTRING          1036 string.c       	  char *p = RSTRING(str)->ptr;
RSTRING          1067 string.c           long len = RSTRING(sub)->len;
RSTRING          1071 string.c           if (RSTRING(str)->len < len) return -1;
RSTRING          1072 string.c           if (RSTRING(str)->len - pos < len) {
RSTRING          1073 string.c       	pos = RSTRING(str)->len - len;
RSTRING          1075 string.c           sbeg = RSTRING(str)->ptr;
RSTRING          1076 string.c           s = RSTRING(str)->ptr + pos;
RSTRING          1077 string.c           t = RSTRING(sub)->ptr;
RSTRING          1081 string.c       		return s - RSTRING(str)->ptr;
RSTRING          1122 string.c       	    pos += RSTRING(str)->len;
RSTRING          1130 string.c       	if (pos > RSTRING(str)->len) pos = RSTRING(str)->len;
RSTRING          1133 string.c       	pos = RSTRING(str)->len;
RSTRING          1153 string.c       	  char *p = RSTRING(str)->ptr + pos;
RSTRING          1154 string.c       	  char *pbeg = RSTRING(str)->ptr;
RSTRING          1156 string.c       	  if (pos == RSTRING(str)->len) {
RSTRING          1162 string.c       		  return LONG2NUM((char*)p - RSTRING(str)->ptr);
RSTRING          1294 string.c           str = rb_str_new5(orig, RSTRING(orig)->ptr, RSTRING(orig)->len);
RSTRING          1296 string.c           if (RSTRING(str)->len == 0) return str;
RSTRING          1298 string.c           sbeg = RSTRING(str)->ptr; s = sbeg + RSTRING(str)->len - 1;
RSTRING          1308 string.c       	sbeg = RSTRING(str)->ptr; s = sbeg + RSTRING(str)->len - 1;
RSTRING          1316 string.c       	RESIZE_CAPA(str, RSTRING(str)->len + 1);
RSTRING          1317 string.c       	s = RSTRING(str)->ptr + n;
RSTRING          1318 string.c       	memmove(s+1, s, RSTRING(str)->len - n);
RSTRING          1320 string.c       	RSTRING(str)->len += 1;
RSTRING          1321 string.c       	RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
RSTRING          1364 string.c       	if (RSTRING(current)->len > RSTRING(end)->len)
RSTRING          1418 string.c       	    idx = RSTRING(str)->len + idx;
RSTRING          1420 string.c       	if (idx < 0 || RSTRING(str)->len <= idx) {
RSTRING          1423 string.c       	return INT2FIX(RSTRING(str)->ptr[idx] & 0xff);
RSTRING          1439 string.c       	    switch (rb_range_beg_len(indx, &beg, &len, RSTRING(str)->len, 0)) {
RSTRING          1527 string.c           if (RSTRING(str)->len < beg) {
RSTRING          1532 string.c       	if (-beg > RSTRING(str)->len) {
RSTRING          1535 string.c       	beg += RSTRING(str)->len;
RSTRING          1537 string.c           if (RSTRING(str)->len < beg + len) {
RSTRING          1538 string.c       	len = RSTRING(str)->len - beg;
RSTRING          1541 string.c           if (len < RSTRING(val)->len) {
RSTRING          1543 string.c       	RESIZE_CAPA(str, RSTRING(str)->len + RSTRING(val)->len - len + 1);
RSTRING          1546 string.c           if (RSTRING(val)->len != len) {
RSTRING          1547 string.c       	memmove(RSTRING(str)->ptr + beg + RSTRING(val)->len,
RSTRING          1548 string.c       		RSTRING(str)->ptr + beg + len,
RSTRING          1549 string.c       		RSTRING(str)->len - (beg + len));
RSTRING          1551 string.c           if (RSTRING(str)->len < beg && len < 0) {
RSTRING          1552 string.c       	MEMZERO(RSTRING(str)->ptr + RSTRING(str)->len, char, -len);
RSTRING          1554 string.c           if (RSTRING(val)->len > 0) {
RSTRING          1555 string.c       	memmove(RSTRING(str)->ptr+beg, RSTRING(val)->ptr, RSTRING(val)->len);
RSTRING          1557 string.c           RSTRING(str)->len += RSTRING(val)->len - len;
RSTRING          1558 string.c           if (RSTRING(str)->ptr) {
RSTRING          1559 string.c       	RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
RSTRING          1609 string.c       	if (RSTRING(str)->len <= idx) {
RSTRING          1614 string.c       	    if (-idx > RSTRING(str)->len)
RSTRING          1616 string.c       	    idx += RSTRING(str)->len;
RSTRING          1620 string.c       	    if (RSTRING(str)->len == idx) {
RSTRING          1621 string.c       		RSTRING(str)->len += 1;
RSTRING          1622 string.c       		RESIZE_CAPA(str, RSTRING(str)->len);
RSTRING          1624 string.c       	    RSTRING(str)->ptr[idx] = FIX2INT(val) & 0xff;
RSTRING          1640 string.c       	rb_str_splice(str, beg, RSTRING(indx)->len, val);
RSTRING          1647 string.c       	    if (rb_range_beg_len(indx, &beg, &len, RSTRING(str)->len, 2)) {
RSTRING          1723 string.c       	pos = RSTRING(str)->len;
RSTRING          1842 string.c       	    char *p = RSTRING(str)->ptr; long len = RSTRING(str)->len;
RSTRING          1855 string.c       	if (RSTRING(repl)->len > plen) {
RSTRING          1856 string.c       	    RESIZE_CAPA(str, RSTRING(str)->len + RSTRING(repl)->len - plen);
RSTRING          1858 string.c       	if (RSTRING(repl)->len != plen) {
RSTRING          1859 string.c       	    memmove(RSTRING(str)->ptr + BEG(0) + RSTRING(repl)->len,
RSTRING          1860 string.c       		    RSTRING(str)->ptr + BEG(0) + plen,
RSTRING          1861 string.c       		    RSTRING(str)->len - BEG(0) - plen);
RSTRING          1863 string.c       	memcpy(RSTRING(str)->ptr + BEG(0),
RSTRING          1864 string.c       	       RSTRING(repl)->ptr, RSTRING(repl)->len);
RSTRING          1865 string.c       	RSTRING(str)->len += RSTRING(repl)->len - plen;
RSTRING          1866 string.c       	RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
RSTRING          1946 string.c           blen = RSTRING(str)->len + 30; /* len + margin */
RSTRING          1948 string.c           buf = RSTRING(dest)->ptr;
RSTRING          1950 string.c           sp = cp = RSTRING(str)->ptr;
RSTRING          1951 string.c           slen = RSTRING(str)->len;
RSTRING          1972 string.c       	len = (bp - buf) + (beg - offset) + RSTRING(val)->len + 3;
RSTRING          1977 string.c       	    RSTRING(dest)->len = blen;
RSTRING          1978 string.c       	    buf = RSTRING(dest)->ptr;
RSTRING          1984 string.c       	memcpy(bp, RSTRING(val)->ptr, RSTRING(val)->len);
RSTRING          1985 string.c       	bp += RSTRING(val)->len;
RSTRING          1992 string.c       	    if (RSTRING(str)->len <= END(0)) break;
RSTRING          1993 string.c       	    len = mbclen2(RSTRING(str)->ptr[END(0)], pat);
RSTRING          1994 string.c       	    memcpy(bp, RSTRING(str)->ptr+END(0), len);
RSTRING          1998 string.c       	cp = RSTRING(str)->ptr + offset;
RSTRING          1999 string.c       	if (offset > RSTRING(str)->len) break;
RSTRING          2002 string.c           if (RSTRING(str)->len > offset) {
RSTRING          2004 string.c       	if (blen - len < RSTRING(str)->len - offset) {
RSTRING          2005 string.c       	    blen = len + RSTRING(str)->len - offset;
RSTRING          2007 string.c       	    buf = RSTRING(dest)->ptr;
RSTRING          2010 string.c       	memcpy(bp, cp, RSTRING(str)->len - offset);
RSTRING          2011 string.c       	bp += RSTRING(str)->len - offset;
RSTRING          2018 string.c       	    free(RSTRING(str)->ptr);
RSTRING          2021 string.c       	RSTRING(str)->ptr = buf;
RSTRING          2022 string.c       	RSTRING(str)->aux.capa = blen;
RSTRING          2023 string.c       	RSTRING(dest)->ptr = 0;
RSTRING          2024 string.c       	RSTRING(dest)->len = 0;
RSTRING          2031 string.c           RSTRING(str)->len = bp - buf;
RSTRING          2111 string.c       	    free(RSTRING(str)->ptr);
RSTRING          2113 string.c       	RSTRING(str)->len = RSTRING(str2)->len;
RSTRING          2114 string.c       	RSTRING(str)->ptr = RSTRING(str2)->ptr;
RSTRING          2117 string.c       	RSTRING(str)->aux.shared = RSTRING(str2)->aux.shared;
RSTRING          2121 string.c       	rb_str_resize(str, RSTRING(str2)->len);
RSTRING          2122 string.c       	memcpy(RSTRING(str)->ptr, RSTRING(str2)->ptr, RSTRING(str2)->len);
RSTRING          2125 string.c       	    RSTRING(str)->aux.shared = RSTRING(str2)->aux.shared;
RSTRING          2148 string.c       	free(RSTRING(str)->ptr);
RSTRING          2150 string.c           RSTRING(str)->aux.shared = 0;
RSTRING          2153 string.c           RSTRING(str)->ptr = null_str;
RSTRING          2171 string.c           if (RSTRING(str)->len > 1) {
RSTRING          2173 string.c       	s = RSTRING(str)->ptr;
RSTRING          2174 string.c       	e = s + RSTRING(str)->len - 1;
RSTRING          2200 string.c           if (RSTRING(str)->len <= 1) return rb_str_dup(str);
RSTRING          2202 string.c           obj = rb_str_new5(str, 0, RSTRING(str)->len);
RSTRING          2203 string.c           s = RSTRING(str)->ptr; e = s + RSTRING(str)->len - 1;
RSTRING          2204 string.c           p = RSTRING(obj)->ptr;
RSTRING          2234 string.c       	if (memchr(RSTRING(str)->ptr, FIX2INT(arg), RSTRING(str)->len))
RSTRING          2346 string.c           p = RSTRING(str)->ptr; pend = p + RSTRING(str)->len;
RSTRING          2419 string.c           p = RSTRING(str)->ptr; pend = p + RSTRING(str)->len;
RSTRING          2446 string.c           p = RSTRING(str)->ptr; pend = p + RSTRING(str)->len;
RSTRING          2447 string.c           q = RSTRING(result)->ptr; qend = q + len;
RSTRING          2520 string.c           s = RSTRING(str)->ptr; send = s + RSTRING(str)->len;
RSTRING          2572 string.c           s = RSTRING(str)->ptr; send = s + RSTRING(str)->len;
RSTRING          2629 string.c           if (RSTRING(str)->len == 0 || !RSTRING(str)->ptr) return Qnil;
RSTRING          2630 string.c           s = RSTRING(str)->ptr; send = s + RSTRING(str)->len;
RSTRING          2685 string.c           s = RSTRING(str)->ptr; send = s + RSTRING(str)->len;
RSTRING          2778 string.c           if (RSTRING(str)->len == 0 || !RSTRING(str)->ptr) return Qnil;
RSTRING          2779 string.c           trsrc.p = RSTRING(src)->ptr; trsrc.pend = trsrc.p + RSTRING(src)->len;
RSTRING          2780 string.c           if (RSTRING(src)->len >= 2 && RSTRING(src)->ptr[0] == '^') {
RSTRING          2784 string.c           if (RSTRING(repl)->len == 0) {
RSTRING          2787 string.c           trrepl.p = RSTRING(repl)->ptr;
RSTRING          2788 string.c           trrepl.pend = trrepl.p + RSTRING(repl)->len;
RSTRING          2822 string.c           s = RSTRING(str)->ptr; send = s + RSTRING(str)->len;
RSTRING          2840 string.c       	if (RSTRING(str)->len > (t - RSTRING(str)->ptr)) {
RSTRING          2841 string.c       	    RSTRING(str)->len = (t - RSTRING(str)->ptr);
RSTRING          2910 string.c           tr.p = RSTRING(str)->ptr; tr.pend = tr.p + RSTRING(str)->len;
RSTRING          2912 string.c           if (RSTRING(str)->len > 1 && RSTRING(str)->ptr[0] == '^') {
RSTRING          2963 string.c           s = t = RSTRING(str)->ptr;
RSTRING          2964 string.c           if (!s || RSTRING(str)->len == 0) return Qnil;
RSTRING          2965 string.c           send = s + RSTRING(str)->len;
RSTRING          2974 string.c           RSTRING(str)->len = t - RSTRING(str)->ptr;
RSTRING          3037 string.c           s = t = RSTRING(str)->ptr;
RSTRING          3038 string.c           if (!s || RSTRING(str)->len == 0) return Qnil;
RSTRING          3039 string.c           send = s + RSTRING(str)->len;
RSTRING          3048 string.c           if (t - RSTRING(str)->ptr != RSTRING(str)->len) {
RSTRING          3049 string.c       	RSTRING(str)->len = t - RSTRING(str)->ptr;
RSTRING          3154 string.c           s = RSTRING(str)->ptr;
RSTRING          3155 string.c           if (!s || RSTRING(str)->len == 0) return INT2FIX(0);
RSTRING          3156 string.c           send = s + RSTRING(str)->len;
RSTRING          3222 string.c       	    if (RSTRING(str)->len == 0)
RSTRING          3238 string.c       	if (TYPE(spat) == T_STRING && RSTRING(spat)->len == 1) {
RSTRING          3239 string.c       	    if (RSTRING(spat)->ptr[0] == ' ') {
RSTRING          3254 string.c       	char *ptr = RSTRING(str)->ptr;
RSTRING          3255 string.c       	long len = RSTRING(str)->len;
RSTRING          3292 string.c       		if (!RSTRING(str)->ptr) {
RSTRING          3297 string.c       		    rb_ary_push(result, rb_str_substr(str, beg, mbclen2(RSTRING(str)->ptr[beg],spat)));
RSTRING          3301 string.c       		    start += mbclen2(RSTRING(str)->ptr[start],spat);
RSTRING          3323 string.c           if (RSTRING(str)->len > 0 && (!NIL_P(limit) || RSTRING(str)->len > beg || lim < 0)) {
RSTRING          3324 string.c       	if (RSTRING(str)->len == beg)
RSTRING          3327 string.c       	    tmp = rb_str_substr(str, beg, RSTRING(str)->len-beg);
RSTRING          3332 string.c       	       RSTRING(RARRAY(result)->ptr[RARRAY(result)->len-1])->len == 0)
RSTRING          3387 string.c           char *p = RSTRING(str)->ptr, *pend = p + RSTRING(str)->len, *s;
RSTRING          3389 string.c           long len = RSTRING(str)->len, rslen;
RSTRING          3403 string.c           rslen = RSTRING(rs)->len;
RSTRING          3408 string.c       	newline = RSTRING(rs)->ptr[rslen-1];
RSTRING          3416 string.c       	if (RSTRING(str)->ptr < p && p[-1] == newline &&
RSTRING          3418 string.c       	     rb_memcmp(RSTRING(rs)->ptr, p-rslen, rslen) == 0)) {
RSTRING          3457 string.c           for (i=0; i<RSTRING(str)->len; i++) {
RSTRING          3458 string.c       	rb_yield(INT2FIX(RSTRING(str)->ptr[i] & 0xff));
RSTRING          3476 string.c           if (RSTRING(str)->len > 0) {
RSTRING          3478 string.c       	RSTRING(str)->len--;
RSTRING          3479 string.c       	if (RSTRING(str)->ptr[RSTRING(str)->len] == '\n') {
RSTRING          3480 string.c       	    if (RSTRING(str)->len > 0 &&
RSTRING          3481 string.c       		RSTRING(str)->ptr[RSTRING(str)->len-1] == '\r') {
RSTRING          3482 string.c       		RSTRING(str)->len--;
RSTRING          3485 string.c       	RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
RSTRING          3535 string.c       	len = RSTRING(str)->len;
RSTRING          3537 string.c       	p = RSTRING(str)->ptr;
RSTRING          3542 string.c       	    if (RSTRING(str)->ptr[len-1] == '\n') {
RSTRING          3543 string.c       		RSTRING(str)->len--;
RSTRING          3544 string.c       		if (RSTRING(str)->len > 0 &&
RSTRING          3545 string.c       		    RSTRING(str)->ptr[RSTRING(str)->len-1] == '\r') {
RSTRING          3546 string.c       		    RSTRING(str)->len--;
RSTRING          3549 string.c       	    else if (RSTRING(str)->ptr[len-1] == '\r') {
RSTRING          3550 string.c       		RSTRING(str)->len--;
RSTRING          3555 string.c       	    RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
RSTRING          3561 string.c           len = RSTRING(str)->len;
RSTRING          3563 string.c           p = RSTRING(str)->ptr;
RSTRING          3564 string.c           rslen = RSTRING(rs)->len;
RSTRING          3571 string.c       	if (len < RSTRING(str)->len) {
RSTRING          3573 string.c       	    RSTRING(str)->len = len;
RSTRING          3574 string.c       	    RSTRING(str)->ptr[len] = '\0';
RSTRING          3580 string.c           newline = RSTRING(rs)->ptr[rslen-1];
RSTRING          3586 string.c       	 rb_memcmp(RSTRING(rs)->ptr, p+len-rslen, rslen) == 0)) {
RSTRING          3588 string.c       	RSTRING(str)->len -= rslen;
RSTRING          3589 string.c       	RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
RSTRING          3640 string.c           s = RSTRING(str)->ptr;
RSTRING          3641 string.c           if (!s || RSTRING(str)->len == 0) return Qnil;
RSTRING          3642 string.c           e = t = s + RSTRING(str)->len;
RSTRING          3646 string.c           if (s > RSTRING(str)->ptr) {
RSTRING          3648 string.c       	RSTRING(str)->len = t-s;
RSTRING          3649 string.c       	memmove(RSTRING(str)->ptr, s, RSTRING(str)->len);
RSTRING          3650 string.c       	RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
RSTRING          3694 string.c           s = RSTRING(str)->ptr;
RSTRING          3695 string.c           if (!s || RSTRING(str)->len == 0) return Qnil;
RSTRING          3696 string.c           e = t = s + RSTRING(str)->len;
RSTRING          3706 string.c       	RSTRING(str)->len = t-s;
RSTRING          3707 string.c       	RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
RSTRING          3785 string.c       	    if (RSTRING(str)->len > END(0))
RSTRING          3786 string.c       		*start = END(0)+mbclen2(RSTRING(str)->ptr[END(0)],pat);
RSTRING          3928 string.c           if (RSTRING(salt)->len < 2)
RSTRING          3931 string.c           if (RSTRING(str)->ptr) s = RSTRING(str)->ptr;
RSTRING          3933 string.c           result = rb_str_new2(crypt(s, RSTRING(salt)->ptr));
RSTRING          3966 string.c           if (!RSTRING(str)->ptr || RSTRING(str)->len == 0) {
RSTRING          3969 string.c           if (strlen(RSTRING(str)->ptr) != RSTRING(str)->len)
RSTRING          3971 string.c           id = rb_intern(RSTRING(str)->ptr);
RSTRING          4000 string.c           ptr = p = RSTRING(str)->ptr;
RSTRING          4001 string.c           len = RSTRING(str)->len;
RSTRING          4049 string.c       	f = RSTRING(pad)->ptr;
RSTRING          4050 string.c       	flen = RSTRING(pad)->len;
RSTRING          4055 string.c           if (width < 0 || RSTRING(str)->len >= width) return rb_str_dup(str);
RSTRING          4057 string.c           p = RSTRING(res)->ptr;
RSTRING          4059 string.c       	n = width - RSTRING(str)->len;
RSTRING          4077 string.c           memcpy(p, RSTRING(str)->ptr, RSTRING(str)->len);
RSTRING          4079 string.c       	p += RSTRING(str)->len; pend = RSTRING(res)->ptr + width;
RSTRING           328 time.c         		if (RSTRING(s)->len == 3 &&
RSTRING           329 time.c         		    strcasecmp(months[i], RSTRING(v[1])->ptr) == 0) {
RSTRING           335 time.c         		char c = RSTRING(s)->ptr[0];
RSTRING          1862 time.c             fmt = RSTRING(format)->ptr;
RSTRING          1863 time.c             len = RSTRING(format)->len;
RSTRING          1886 time.c         	len = rb_strftime(&buf, RSTRING(format)->ptr, &tobj->tm);
RSTRING          1986 time.c             buf = (unsigned char *)RSTRING(str)->ptr;
RSTRING          1987 time.c             if (RSTRING(str)->len != 8) {
RSTRING           157 util.c             if (RSTRING(str)->len > 1000)
RSTRING           159 util.c         		 RSTRING(str)->len);
RSTRING           163 util.c             slen = RSTRING(str)->len;
RSTRING           168 util.c             if (valid_filename(RSTRING(str)->ptr)) return;
RSTRING           172 util.c             RSTRING(str)->ptr[RSTRING(str)->len = slen] = '\0';
RSTRING           176 util.c             t = buf; baselen = 0; s = RSTRING(str)->ptr;
RSTRING           214 util.c             memcpy(RSTRING(str)->ptr, buf, RSTRING(str)->len);
RSTRING           238 variable.c     	id = rb_intern(RSTRING(str)->ptr);
RSTRING           276 variable.c         return RSTRING(rb_class_name(klass))->ptr;
RSTRING          1158 variable.c     	rb_raise(rb_eTypeError, "wrong autoload table: %s", RSTRING(rb_inspect(av))->ptr);
RSTRING          1226 variable.c         if (!load || !(file = load->nd_lit) || rb_provided(RSTRING(file)->ptr)) {
RSTRING          1245 variable.c         if (!RSTRING(file)->ptr) {
RSTRING          1248 variable.c         if (!rb_provided(RSTRING(file)->ptr)) {


RSTRUCT

RSTRUCT           588 marshal.c      		long len = RSTRUCT(obj)->len;
RSTRUCT           596 marshal.c      		    w_object(RSTRUCT(obj)->ptr[i], arg, limit);
RSTRUCT            50 struct.c           if (RSTRUCT(s)->len != RARRAY(members)->len) {
RSTRUCT            52 struct.c       		 RARRAY(members)->len, RSTRUCT(s)->len);
RSTRUCT           102 struct.c       	    return RSTRUCT(obj)->ptr[i];
RSTRUCT           115 struct.c       static VALUE rb_struct_ref0(VALUE obj) {return RSTRUCT(obj)->ptr[0];}
RSTRUCT           116 struct.c       static VALUE rb_struct_ref1(VALUE obj) {return RSTRUCT(obj)->ptr[1];}
RSTRUCT           117 struct.c       static VALUE rb_struct_ref2(VALUE obj) {return RSTRUCT(obj)->ptr[2];}
RSTRUCT           118 struct.c       static VALUE rb_struct_ref3(VALUE obj) {return RSTRUCT(obj)->ptr[3];}
RSTRUCT           119 struct.c       static VALUE rb_struct_ref4(VALUE obj) {return RSTRUCT(obj)->ptr[4];}
RSTRUCT           120 struct.c       static VALUE rb_struct_ref5(VALUE obj) {return RSTRUCT(obj)->ptr[5];}
RSTRUCT           121 struct.c       static VALUE rb_struct_ref6(VALUE obj) {return RSTRUCT(obj)->ptr[6];}
RSTRUCT           122 struct.c       static VALUE rb_struct_ref7(VALUE obj) {return RSTRUCT(obj)->ptr[7];}
RSTRUCT           123 struct.c       static VALUE rb_struct_ref8(VALUE obj) {return RSTRUCT(obj)->ptr[8];}
RSTRUCT           124 struct.c       static VALUE rb_struct_ref9(VALUE obj) {return RSTRUCT(obj)->ptr[9];}
RSTRUCT           160 struct.c       	    return RSTRUCT(obj)->ptr[i] = val;
RSTRUCT           318 struct.c           MEMCPY(RSTRUCT(self)->ptr, RARRAY(values)->ptr, VALUE, RARRAY(values)->len);
RSTRUCT           320 struct.c       	rb_mem_clear(RSTRUCT(self)->ptr+RARRAY(values)->len,
RSTRUCT           393 struct.c           for (i=0; i<RSTRUCT(s)->len; i++) {
RSTRUCT           394 struct.c       	rb_yield(RSTRUCT(s)->ptr[i]);
RSTRUCT           425 struct.c           for (i=0; i<RSTRUCT(s)->len; i++) {
RSTRUCT           426 struct.c       	rb_yield_values(2, rb_ary_entry(members, i), RSTRUCT(s)->ptr[i]);
RSTRUCT           444 struct.c           for (i=0; i<RSTRUCT(s)->len; i++) {
RSTRUCT           462 struct.c       	rb_str_append(str, rb_inspect(RSTRUCT(s)->ptr[i]));
RSTRUCT           499 struct.c           return rb_ary_new4(RSTRUCT(s)->len, RSTRUCT(s)->ptr);
RSTRUCT           511 struct.c           RSTRUCT(copy)->ptr = ALLOC_N(VALUE, RSTRUCT(s)->len);
RSTRUCT           512 struct.c           RSTRUCT(copy)->len = RSTRUCT(s)->len;
RSTRUCT           513 struct.c           MEMCPY(RSTRUCT(copy)->ptr, RSTRUCT(s)->ptr, VALUE, RSTRUCT(copy)->len);
RSTRUCT           528 struct.c       	    return RSTRUCT(s)->ptr[i];
RSTRUCT           564 struct.c           if (i < 0) i = RSTRUCT(s)->len + i;
RSTRUCT           567 struct.c       		 i, RSTRUCT(s)->len);
RSTRUCT           568 struct.c           if (RSTRUCT(s)->len <= i)
RSTRUCT           570 struct.c       		 i, RSTRUCT(s)->len);
RSTRUCT           571 struct.c           return RSTRUCT(s)->ptr[i];
RSTRUCT           583 struct.c           if (RSTRUCT(s)->len != RARRAY(members)->len) {
RSTRUCT           585 struct.c       		 RARRAY(members)->len, RSTRUCT(s)->len);
RSTRUCT           589 struct.c       	    RSTRUCT(s)->ptr[i] = val;
RSTRUCT           627 struct.c           if (i < 0) i = RSTRUCT(s)->len + i;
RSTRUCT           630 struct.c       		 i, RSTRUCT(s)->len);
RSTRUCT           632 struct.c           if (RSTRUCT(s)->len <= i) {
RSTRUCT           634 struct.c       		 i, RSTRUCT(s)->len);
RSTRUCT           637 struct.c           return RSTRUCT(s)->ptr[i] = val;
RSTRUCT           665 struct.c           return rb_get_values_at(s, RSTRUCT(s)->len, argc, argv, struct_entry);
RSTRUCT           698 struct.c           for (i = 0; i < RSTRUCT(s)->len; i++) {
RSTRUCT           699 struct.c       	if (RTEST(rb_yield(RSTRUCT(s)->ptr[i]))) {
RSTRUCT           700 struct.c       	    rb_ary_push(result, RSTRUCT(s)->ptr[i]);
RSTRUCT           732 struct.c           if (RSTRUCT(s)->len != RSTRUCT(s2)->len) {
RSTRUCT           736 struct.c           for (i=0; i<RSTRUCT(s)->len; i++) {
RSTRUCT           737 struct.c       	if (!rb_equal(RSTRUCT(s)->ptr[i], RSTRUCT(s2)->ptr[i])) return Qfalse;
RSTRUCT           756 struct.c           for (i = 0; i < RSTRUCT(s)->len; i++) {
RSTRUCT           758 struct.c       	n = rb_hash(RSTRUCT(s)->ptr[i]);
RSTRUCT           780 struct.c           if (RSTRUCT(s)->len != RSTRUCT(s2)->len) {
RSTRUCT           784 struct.c           for (i=0; i<RSTRUCT(s)->len; i++) {
RSTRUCT           785 struct.c       	if (!rb_eql(RSTRUCT(s)->ptr[i], RSTRUCT(s2)->ptr[i])) return Qfalse;
RSTRUCT           805 struct.c           return LONG2FIX(RSTRUCT(s)->len);


RTEST

RTEST             899 array.c        	    if (RTEST(rb_yield(RARRAY(ary)->ptr[i]))) {
RTEST             937 array.c        	    if (RTEST(rb_yield(RARRAY(ary)->ptr[i])))
RTEST            1707 array.c        	if (RTEST(rb_yield(RARRAY(ary)->ptr[i]))) {
RTEST            1876 array.c        	if (RTEST(rb_yield(v))) continue;
RTEST            2726 array.c         	    if (RTEST(rb_yield(v))) n++;
RTEST             566 class.c        	recur = RTEST(r);
RTEST             717 class.c            if (RTEST(recur)) {
RTEST              30 compar.c           if (RTEST(rb_funcall(val, '>', 1, INT2FIX(0)))) return 1;
RTEST              31 compar.c           if (RTEST(rb_funcall(val, '<', 1, INT2FIX(0)))) return -1;
RTEST             173 compar.c           if (RTEST(cmp_lt(x, min))) return Qfalse;
RTEST             174 compar.c           if (RTEST(cmp_gt(x, max))) return Qfalse;
RTEST              29 enum.c             if (RTEST(rb_funcall(arg[0], id_eqq, 1, i))) {
RTEST              38 enum.c             if (RTEST(rb_funcall(arg[0], id_eqq, 1, i))) {
RTEST              88 enum.c             if (RTEST(rb_yield(i))) {
RTEST             134 enum.c             if (RTEST(rb_yield(i))) {
RTEST             177 enum.c             if (RTEST(rb_yield(i))) {
RTEST             212 enum.c             if (!RTEST(rb_yield(i))) {
RTEST             362 enum.c             if (RTEST(rb_yield(i))) {
RTEST             545 enum.c             if (!RTEST(rb_yield(i))) {
RTEST             555 enum.c             if (!RTEST(i)) {
RTEST             591 enum.c             if (RTEST(rb_yield(i))) {
RTEST             601 enum.c             if (RTEST(i)) {
RTEST             638 enum.c             if (RTEST(rb_yield(i))) {
RTEST             652 enum.c             if (RTEST(i)) {
RTEST             692 enum.c             if (RTEST(rb_yield(i))) {
RTEST             702 enum.c             if (RTEST(i)) {
RTEST             123 error.c            if (!RTEST(ruby_verbose)) return;
RTEST            1069 error.c             if (!RTEST(ruby_verbose)) return;
RTEST            1795 eval.c         		    if (!RTEST(rb_autoload_load(klass, id))) break;
RTEST            2042 eval.c             if (RTEST(ruby_verbose) && st_lookup(RCLASS(klass)->m_tbl, name, (st_data_t *)&node)) {
RTEST            2337 eval.c         	if (RTEST(rb_reg_nth_defined(node->nd_nth, MATCH_DATA))) {
RTEST            2345 eval.c         	if (RTEST(rb_reg_nth_defined(0, MATCH_DATA))) {
RTEST            2820 eval.c         	if (RTEST(rb_eval(self, node->nd_cond))) {
RTEST            2844 eval.c         			if (RTEST(RARRAY(v)->ptr[i])) {
RTEST            2852 eval.c         		if (RTEST(rb_eval(self, tag->nd_head))) {
RTEST            2885 eval.c         			    if (RTEST(rb_funcall2(RARRAY(v)->ptr[i], eqq, 1, &val))){
RTEST            2893 eval.c         		    if (RTEST(rb_funcall2(rb_eval(self, tag->nd_head), eqq, 1, &val))) {
RTEST            2909 eval.c         	    if (node->nd_state && !RTEST(rb_eval(self, node->nd_cond)))
RTEST            2916 eval.c         	    } while (RTEST(rb_eval(self, node->nd_cond)));
RTEST            2944 eval.c         	    if (node->nd_state && RTEST(rb_eval(self, node->nd_cond)))
RTEST            2951 eval.c         	    } while (!RTEST(rb_eval(self, node->nd_cond)));
RTEST            3158 eval.c         	if (!RTEST(result)) break;
RTEST            3164 eval.c         	if (RTEST(result)) break;
RTEST            3169 eval.c         	if (RTEST(rb_eval(self, node->nd_body))) result = Qfalse;
RTEST            3186 eval.c         	    if (!RTEST(*flip)) {
RTEST            3187 eval.c         		if (RTEST(rb_eval(self, node->nd_beg))) {
RTEST            3188 eval.c         		    *flip = RTEST(rb_eval(self, node->nd_end))?Qfalse:Qtrue;
RTEST            3196 eval.c         		if (RTEST(rb_eval(self, node->nd_end))) {
RTEST            3208 eval.c         	    if (!RTEST(*flip)) {
RTEST            3209 eval.c         		result = RTEST(rb_eval(self, node->nd_beg)) ? Qtrue : Qfalse;
RTEST            3213 eval.c         		if (RTEST(rb_eval(self, node->nd_end))) {
RTEST            3396 eval.c         		if (RTEST(val)) RETURN(val);
RTEST            3400 eval.c         		if (!RTEST(val)) RETURN(val);
RTEST            3421 eval.c         		if (RTEST(val)) RETURN(val);
RTEST            3425 eval.c         		if (!RTEST(val)) RETURN(val);
RTEST            3440 eval.c         	if (!RTEST(result)) break;
RTEST            3446 eval.c         	    !RTEST(result = rb_eval(self, node->nd_head))) {
RTEST            3741 eval.c         		if (RTEST(ruby_verbose) && ruby_class == origin && body->nd_cnt == 0 && body->nd_body) {
RTEST            3791 eval.c         		if (RTEST(ruby_verbose)) {
RTEST            4051 eval.c             if (rb_method_boundp(CLASS_OF(obj), id, !RTEST(priv))) {
RTEST            4366 eval.c             if (RTEST(ruby_debug) && !NIL_P(ruby_errinfo)
RTEST            4804 eval.c         	    if ((block->flags&BLOCK_FROM_METHOD) && RTEST(block->block_obj)) {
RTEST            5049 eval.c         	if (RTEST(ruby_verbose) && FL_TEST(ruby_cbase, FL_SINGLETON)) {
RTEST            5157 eval.c         	if (RTEST(rb_funcall(*argv, eqq, 1, ruby_errinfo))) return 1;
RTEST            6673 eval.c             rb_load(fname, RTEST(wrap));
RTEST            9324 eval.c         	    if (!RTEST(rb_class_inherited_p(mod, rklass))) {
RTEST            11447 eval.c             ruby_thread_abort = RTEST(val);
RTEST            11481 eval.c             rb_thread_check(thread)->abort = RTEST(val);
RTEST            11805 eval.c         	else if (th->safe < 4 && (ruby_thread_abort || th->abort || RTEST(ruby_debug))) {
RTEST            12173 eval.c             rb_thread_critical = RTEST(val);
RTEST            1218 ext/curses/curses.c   scrollok(winp->window, RTEST(bf) ? TRUE : FALSE);
RTEST            1228 ext/curses/curses.c   idlok(winp->window, RTEST(bf) ? TRUE : FALSE);
RTEST            1396 ext/curses/curses.c   keypad(winp->window,(RTEST(val) ? TRUE : FALSE));
RTEST            1400 ext/curses/curses.c   return (keypad(winp->window,RTEST(val) ? TRUE : FALSE)) == OK ?
RTEST            1417 ext/curses/curses.c   nodelay(winp->window, RTEST(val) ? TRUE : FALSE);
RTEST            1420 ext/curses/curses.c   return nodelay(winp->window,RTEST(val) ? TRUE : FALSE) == OK ? Qtrue : Qfalse;
RTEST             256 ext/dbm/dbm.c  	if (RTEST(v)) {
RTEST             369 ext/dbm/dbm.c  	if (RTEST(ret)) rb_ary_push(ary, keystr);
RTEST             322 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
RTEST             346 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
RTEST             351 ext/gdbm/gdbm.c 	if (RTEST(v)) {
RTEST             456 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
RTEST             462 ext/gdbm/gdbm.c 	if (RTEST(ret)) rb_ary_push(ary, keystr);
RTEST             522 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
RTEST             654 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
RTEST             672 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
RTEST             690 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
RTEST             710 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
RTEST             768 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
RTEST             793 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
RTEST             854 ext/gdbm/gdbm.c     if (RTEST(val))
RTEST             868 ext/gdbm/gdbm.c     fgdbm_set_fastmode(obj, RTEST(val) ? Qfalse : Qtrue);
RTEST             877 ext/gdbm/gdbm.c     if (RTEST(val))
RTEST             897 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
RTEST             187 ext/iconv/iconv.c 	    flag = RTEST(opt->transliterate);
RTEST             194 ext/iconv/iconv.c 	    flag = RTEST(opt->discard_ilseq);
RTEST             349 ext/iconv/iconv.c 	if (RTEST(error)) {
RTEST             427 ext/iconv/iconv.c 	if (RTEST(error)) {
RTEST             882 ext/iconv/iconv.c     int trans = RTEST(transliterate);
RTEST             919 ext/iconv/iconv.c     int dis = RTEST(discard_ilseq);
RTEST             127 ext/openssl/ossl_asn1.c     if (RTEST(rb_obj_is_kind_of(obj, cBN))) {
RTEST             199 ext/openssl/ossl_asn1.c      return RTEST(obj) ? 0xff : 0x100;
RTEST              62 ext/openssl/ossl_bn.c     if (RTEST(rb_obj_is_kind_of(obj, cBN))) {
RTEST             115 ext/openssl/ossl_bn.c     if (RTEST(rb_obj_is_kind_of(str, cBN))) {
RTEST             228 ext/openssl/ossl_bn.c 	if (!RTEST(rb_obj_is_kind_of(other, cBN))) {
RTEST             303 ext/openssl/ossl_ssl.c     if (RTEST(ossl_sslctx_get_tmp_dh_cb(self))){
RTEST             381 ext/openssl/ossl_ssl.c     if (RTEST(ossl_sslctx_get_client_cert_cb(self)))
RTEST             719 ext/openssl/ossl_ssl.c     if (RTEST(ossl_ssl_get_sync_close(self)))
RTEST             235 ext/openssl/ossl_x509ext.c     valstr = rb_str_new2(RTEST(critical) ? "critical," : "");
RTEST             346 ext/openssl/ossl_x509ext.c     X509_EXTENSION_set_critical(ext, RTEST(flag) ? 1 : 0);
RTEST             241 ext/racc/cparse/cparse.c     v->sys_debug = RTEST(sysdebug);
RTEST             256 ext/racc/cparse/cparse.c     v->sys_debug = RTEST(sysdebug);
RTEST             341 ext/racc/cparse/cparse.c     v->debug = RTEST(rb_ivar_get(parser, id_yydebug));
RTEST             360 ext/racc/cparse/cparse.c         v->use_result_var = RTEST(RARRAY(arg)->ptr[13]);
RTEST              86 ext/readline/readline.c     if (RTEST(add_hist) && buff) {
RTEST             176 ext/readline/readline.c     case_fold = RTEST(rb_attr_get(mReadline, completion_case_fold));
RTEST             233 ext/sdbm/init.c 	if (RTEST(v)) {
RTEST             347 ext/sdbm/init.c 	if (RTEST(ret)) rb_ary_push(ary, keystr);
RTEST             535 ext/socket/socket.c     if (RTEST(state)) {
RTEST             652 ext/socket/socket.c     do_not_reverse_lookup = RTEST(val);
RTEST             567 ext/strscan/strscan.c     return strscan_do_scan(self, re, RTEST(s), RTEST(f), 1);
RTEST             665 ext/strscan/strscan.c     return strscan_do_scan(self, re, RTEST(s), RTEST(f), 0);
RTEST            1120 ext/syck/rubyext.c                          RTEST( rb_funcall( target_class, s_tag_subclasses, 0 ) ) )
RTEST            2028 ext/syck/rubyext.c     if ( !NIL_P( oid ) && RTEST( rb_funcall( bonus->data, s_haskey, 1, oid ) ) ) {
RTEST            1190 ext/tk/tcltklib.c     if (RTEST(val)) {
RTEST            1336 ext/tk/tcltklib.c             found_event = RTEST(rb_protect(call_DoOneEvent,
RTEST            1456 ext/tk/tcltklib.c                     st = RTEST(rb_protect(call_DoOneEvent,
RTEST            1716 ext/tk/tcltklib.c         if (RTEST(rb_funcall(eventloop_thread, ID_alive_p, 0, 0))) {
RTEST            1753 ext/tk/tcltklib.c         while(!RTEST(rb_funcall(parent_evloop, ID_stop_p, 0))) {
RTEST            1792 ext/tk/tcltklib.c     } else if (RTEST(check_rootwidget)) {
RTEST            1798 ext/tk/tcltklib.c     return lib_eventloop_launcher(RTEST(check_rootwidget), 0,
RTEST            1827 ext/tk/tcltklib.c     return lib_eventloop_launcher(RTEST(check_rootwidget), 0,
RTEST            1840 ext/tk/tcltklib.c     int   check = RTEST(check_rootwidget);
RTEST            1850 ext/tk/tcltklib.c         if (RTEST(rb_funcall(watchdog_thread, ID_stop_p, 0))) {
RTEST            1873 ext/tk/tcltklib.c             if (RTEST(rb_funcall(eventloop_thread, ID_stop_p, 0))) {
RTEST            1908 ext/tk/tcltklib.c     } else if (RTEST(check_rootwidget)) {
RTEST            2010 ext/tk/tcltklib.c     foundEvent = RTEST(lib_eventloop_launcher(/* not check root-widget */0, 0,
RTEST            2013 ext/tk/tcltklib.c     if (RTEST(rb_funcall(th, ID_alive_p, 0))) {
RTEST            2841 ext/tk/tcltklib.c     ret = RTEST(lib_eventloop_launcher(0, flags, (int *)NULL, interp)); /* ignore result */
RTEST            3174 ext/tk/tcltklib.c     foundEvent = RTEST(lib_eventloop_launcher(/* not check root-widget */0,
RTEST            4896 ext/tk/tcltklib.c     if (RTEST(with_tk)) {
RTEST            5196 ext/tk/tcltklib.c     if (RTEST(val)) {
RTEST             300 ext/tk/tkutil/tkutil.c             if (RTEST(enc_flag)) {
RTEST             315 ext/tk/tkutil/tkutil.c                     if (RTEST(enc_flag)) {
RTEST             366 ext/tk/tkutil/tkutil.c     if (RTEST(dst_enc) && !NIL_P(sys_enc)) {
RTEST             429 ext/tk/tkutil/tkutil.c             if (RTEST(enc_flag)) {
RTEST             460 ext/tk/tkutil/tkutil.c     if (RTEST(dst_enc) && !NIL_P(sys_enc)) {
RTEST             736 ext/tk/tkutil/tkutil.c         if (RTEST(enc_flag)) {
RTEST             743 ext/tk/tkutil/tkutil.c         if (RTEST(enc_flag)) {
RTEST             781 ext/tk/tkutil/tkutil.c         if (RTEST(enc_flag)) {
RTEST             792 ext/tk/tkutil/tkutil.c         if (RTEST(enc_flag)) {
RTEST             804 ext/tk/tkutil/tkutil.c         if (RTEST(enc_flag)) {
RTEST             921 ext/tk/tkutil/tkutil.c             if (RTEST(argv[1])) {
RTEST             682 ext/zlib/zlib.c 	if (RTEST(ruby_debug)) {
RTEST             688 ext/zlib/zlib.c 	if (RTEST(ruby_debug)) {
RTEST            1359 ext/zlib/zlib.c 	if (RTEST(ruby_debug)) {
RTEST            2687 ext/zlib/zlib.c     if (RTEST(mode)) {
RTEST            3225 file.c         	return RTEST(argv[0]) ? Qtrue : Qfalse;
RTEST             672 hash.c             if (RTEST(rb_yield_values(2, key, value))) {
RTEST             735 hash.c             if (RTEST(rb_yield_values(2, key, value)))
RTEST            1920 hash.c         	    if (RTEST(rb_yield_values(2, RARRAY(keys)->ptr[i], val))) {
RTEST            1967 hash.c         	    if (RTEST(rb_yield_values(2, k, v))) {
RTEST             994 io.c               if (RTEST(mode)) {
RTEST            5336 io.c               if (!RTEST(val)) {
RTEST             984 marshal.c      	    if (TYPE(v) == T_MODULE || !RTEST(rb_class_inherited_p(c, RBASIC(v)->klass))) {
RTEST            1345 marshal.c          if (RTEST(ruby_verbose) && minor != MARSHAL_MINOR) {
RTEST             342 numeric.c      	((RTEST(rb_funcall(x, '<', 1, INT2FIX(0))) &&
RTEST             343 numeric.c      	  RTEST(rb_funcall(y, '>', 1, INT2FIX(0)))) ||
RTEST             344 numeric.c      	 (RTEST(rb_funcall(x, '>', 1, INT2FIX(0))) &&
RTEST             345 numeric.c      	  RTEST(rb_funcall(y, '<', 1, INT2FIX(0)))))) {
RTEST             393 numeric.c          if (RTEST(rb_funcall(num, '<', 1, INT2FIX(0)))) {
RTEST             432 numeric.c          if (RTEST(rb_funcall(num, rb_intern("zero?"), 0, 0))) {
RTEST            1440 numeric.c      	if (RTEST(rb_funcall(step, '>', 1, INT2FIX(0)))) {
RTEST            1447 numeric.c      	    if (RTEST(rb_funcall(i, cmp, 1, to))) break;
RTEST            1551 numeric.c          if (RTEST(rb_funcall(INT2FIX(0), '<', 1, val))) {
RTEST            2764 numeric.c      	    if (!RTEST(rb_funcall(i, '<', 1, num))) break;
RTEST              52 object.c           if (RTEST(result)) return Qtrue;
RTEST              59 object.c           return RTEST(rb_funcall(obj1, id_eql, 1, obj2));
RTEST             823 object.c           return RTEST(obj2)?Qtrue:Qfalse;
RTEST             861 object.c           return RTEST(obj2)?Qfalse:Qtrue;
RTEST             917 object.c           return RTEST(obj2)?Qtrue:Qfalse;
RTEST             936 object.c           return RTEST(obj2)?Qtrue:Qfalse;
RTEST            1562 object.c           rb_attr(klass, rb_to_id(name), 1, RTEST(pub), Qtrue);
RTEST            1728 object.c       	if (RTEST(recur)) {
RTEST            2218 object.c           else if (RTEST(ruby_verbose) && RSTRING(str)->len != strlen(RSTRING(str)->ptr)) {
RTEST            6978 parse.y        	if (RTEST(ruby_verbose)) {
RTEST            7443 parse.y            if (!RTEST(ruby_verbose)) return;
RTEST            7531 parse.y            if (!RTEST(ruby_verbose)) return;
RTEST            7744 parse.y        	    if ((b == 1 && e == 1) || (b + e >= 2 && RTEST(ruby_verbose))) {
RTEST            7934 parse.y            if (RTEST(r)) {
RTEST            9151 parse.y            ripper_yydebug = RTEST(flag);
RTEST            2766 process.c          n = daemon(RTEST(nochdir), RTEST(noclose));
RTEST            2781 process.c          if (!RTEST(nochdir))
RTEST            2784 process.c          if (!RTEST(noclose) && (n = open("/dev/null", O_RDWR, 0)) != -1) {
RTEST              18 range.c        #define EXCL(r) RTEST(rb_ivar_get((r), id_excl))
RTEST              82 range.c            range_init(range, beg, end, RTEST(flags));
RTEST             231 range.c        	while (RTEST(c = r_le(v, e))) {
RTEST             324 range.c        	    while (RTEST(rb_funcall(b, c, 1, e))) {
RTEST             519 range.c        	excl = RTEST(rb_funcall(range, rb_intern("exclude_end?"), 0));
RTEST            1246 re.c           	    if (RTEST(rb_yield(str))) {
RTEST            1682 re.c           	    else if (RTEST(argv[1])) flags = ONIG_OPTION_IGNORECASE;
RTEST            2137 re.c               ruby_ignorecase = RTEST(val);
RTEST            1132 ruby.c             ruby_verbose = RTEST(val) ? Qtrue : val;
RTEST             467 ruby.h         #define SPECIAL_CONST_P(x) (IMMEDIATE_P(x) || !RTEST(x))
RTEST             676 ruby.h             else if (!RTEST(obj)) {
RTEST             692 ruby.h             else if (!RTEST(obj)) {
RTEST             791 sprintf.c      	if (RTEST(ruby_debug)) rb_raise(rb_eArgError, mesg);
RTEST             792 sprintf.c      	if (RTEST(ruby_verbose)) rb_warn(mesg);
RTEST             699 struct.c       	if (RTEST(rb_yield(RSTRUCT(s)->ptr[i]))) {
RTEST             295 time.c         	tm->tm_isdst = RTEST(argv[8]) ? 1 : 0;
RTEST            1288 variable.c     		if (!RTEST(rb_autoload_load(tmp, id))) break;


RTLD_GLOBAL

RTLD_GLOBAL      1325 dln.c          #ifndef RTLD_GLOBAL
RTLD_GLOBAL      1330 dln.c          	if ((handle = (void*)dlopen(file, RTLD_LAZY|RTLD_GLOBAL)) == NULL) {
RTLD_GLOBAL        98 ext/dl/dl.c        rb_define_const(rb_mDL, "RTLD_GLOBAL", INT2NUM(RTLD_GLOBAL));
RTLD_GLOBAL        12 ext/dl/dl.h    #ifndef RTLD_GLOBAL
RTLD_GLOBAL        56 ext/dl/handle.c     cflag = RTLD_LAZY | RTLD_GLOBAL;
RTLD_GLOBAL        60 ext/dl/handle.c     cflag = RTLD_LAZY | RTLD_GLOBAL;
RTLD_GLOBAL        77 ext/tk/stubs.c # define DL_OPEN(file) dlopen(file, RTLD_LAZY|RTLD_GLOBAL)


RTLD_LAZY

RTLD_LAZY        1319 dln.c          #ifndef RTLD_LAZY
RTLD_LAZY        1330 dln.c          	if ((handle = (void*)dlopen(file, RTLD_LAZY|RTLD_GLOBAL)) == NULL) {
RTLD_LAZY          99 ext/dl/dl.c        rb_define_const(rb_mDL, "RTLD_LAZY",   INT2NUM(RTLD_LAZY));
RTLD_LAZY           9 ext/dl/dl.h    #ifndef RTLD_LAZY
RTLD_LAZY          56 ext/dl/handle.c     cflag = RTLD_LAZY | RTLD_GLOBAL;
RTLD_LAZY          60 ext/dl/handle.c     cflag = RTLD_LAZY | RTLD_GLOBAL;
RTLD_LAZY          77 ext/tk/stubs.c # define DL_OPEN(file) dlopen(file, RTLD_LAZY|RTLD_GLOBAL)


RTLD_NOW

RTLD_NOW          100 ext/dl/dl.c        rb_define_const(rb_mDL, "RTLD_NOW",    INT2NUM(RTLD_NOW));
RTLD_NOW           15 ext/dl/dl.h    #ifndef RTLD_NOW


RUBY

RUBY               65 ext/digest/md5/md5.h #ifdef RUBY
RUBY               38 ext/digest/rmd160/rmd160.h #ifdef RUBY
RUBY               22 ext/digest/sha1/sha1.h #ifdef RUBY
RUBY               77 ext/digest/sha2/sha2.h #ifdef RUBY


RUBY_CRITICAL

RUBY_CRITICAL     111 gc.c               RUBY_CRITICAL(mem = malloc(size));
RUBY_CRITICAL     114 gc.c           	    RUBY_CRITICAL(mem = malloc(size));
RUBY_CRITICAL     157 gc.c               RUBY_CRITICAL(mem = realloc(ptr, size));
RUBY_CRITICAL     160 gc.c           	    RUBY_CRITICAL(mem = realloc(ptr, size));
RUBY_CRITICAL     184 gc.c           	RUBY_CRITICAL(free(x));
RUBY_CRITICAL     261 gc.c           	RUBY_CRITICAL(free(tmp));
RUBY_CRITICAL     269 gc.c           	    RUBY_CRITICAL(free(t));
RUBY_CRITICAL     343 gc.c           	RUBY_CRITICAL(
RUBY_CRITICAL     355 gc.c           	RUBY_CRITICAL(p = heaps[heaps_used].slot = (RVALUE*)malloc(sizeof(RVALUE)*heap_slots));
RUBY_CRITICAL    1127 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.string.ptr));
RUBY_CRITICAL    1132 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.array.ptr));
RUBY_CRITICAL    1145 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.regexp.str));
RUBY_CRITICAL    1151 gc.c           		RUBY_CRITICAL(free(DATA_PTR(obj)));
RUBY_CRITICAL    1161 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.match.regs));
RUBY_CRITICAL    1180 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.bignum.digits));
RUBY_CRITICAL    1187 gc.c           		RUBY_CRITICAL(free(RANY(obj)->as.node.u1.tbl));
RUBY_CRITICAL    1191 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.node.u1.node));
RUBY_CRITICAL    1201 gc.c           		RUBY_CRITICAL(free(RANY(obj)->as.scope.local_tbl));
RUBY_CRITICAL    1203 gc.c           		RUBY_CRITICAL(free(vars));
RUBY_CRITICAL    1209 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.rstruct.ptr));
RUBY_CRITICAL    1841 gc.c           		    RUBY_CRITICAL(free(DATA_PTR(p)));
RUBY_CRITICAL     716 win32/win32.c      RUBY_CRITICAL(do {
RUBY_CRITICAL     968 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    1710 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    1892 win32/win32.c      RUBY_CRITICAL(ret = __WSAFDIsSet(s, set));
RUBY_CRITICAL    1946 win32/win32.c      RUBY_CRITICAL(
RUBY_CRITICAL    1959 win32/win32.c      RUBY_CRITICAL(
RUBY_CRITICAL    1978 win32/win32.c      RUBY_CRITICAL(
RUBY_CRITICAL    1992 win32/win32.c      RUBY_CRITICAL(
RUBY_CRITICAL    2024 win32/win32.c  	RUBY_CRITICAL(
RUBY_CRITICAL    2152 win32/win32.c      RUBY_CRITICAL(ret = __WSAFDIsSet((SOCKET)interrupted_event, ex));
RUBY_CRITICAL    2201 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2224 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2241 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2267 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2284 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2299 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2316 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2333 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2350 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2368 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2385 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2403 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2420 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2437 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2496 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2518 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2535 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2552 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2569 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2586 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2603 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2620 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2674 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2784 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    2964 win32/win32.c  	RUBY_CRITICAL({
RUBY_CRITICAL    2983 win32/win32.c  	RUBY_CRITICAL({
RUBY_CRITICAL    2995 win32/win32.c  	RUBY_CRITICAL({
RUBY_CRITICAL    3106 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    3446 win32/win32.c      RUBY_CRITICAL(rb_protect((VALUE (*)(VALUE))h->handler, (VALUE)h->arg, &h->status);
RUBY_CRITICAL    3497 win32/win32.c      RUBY_CRITICAL({		/* the main thread must be in user state */
RUBY_CRITICAL    3529 win32/win32.c  	RUBY_CRITICAL({
RUBY_CRITICAL    3556 win32/win32.c      RUBY_CRITICAL(ret = wait_events(NULL, msec));
RUBY_CRITICAL    3566 win32/win32.c      RUBY_CRITICAL(wait_events(NULL, 0));
RUBY_CRITICAL    3663 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    3860 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    3903 win32/win32.c      RUBY_CRITICAL(do {
RUBY_CRITICAL    3921 win32/win32.c      RUBY_CRITICAL({
RUBY_CRITICAL    3941 win32/win32.c      RUBY_CRITICAL({


RUBY_DBM_RW_BIT

RUBY_DBM_RW_BIT   123 ext/dbm/dbm.c      if (flags & RUBY_DBM_RW_BIT) {
RUBY_DBM_RW_BIT   124 ext/dbm/dbm.c          flags &= ~RUBY_DBM_RW_BIT;
RUBY_DBM_RW_BIT   774 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "READER",  INT2FIX(O_RDONLY|RUBY_DBM_RW_BIT));
RUBY_DBM_RW_BIT   775 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "WRITER",  INT2FIX(O_RDWR|RUBY_DBM_RW_BIT));
RUBY_DBM_RW_BIT   776 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "WRCREAT", INT2FIX(O_RDWR|O_CREAT|RUBY_DBM_RW_BIT));
RUBY_DBM_RW_BIT   777 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "NEWDB",   INT2FIX(O_RDWR|O_CREAT|O_TRUNC|RUBY_DBM_RW_BIT));


RUBY_EVENT_CALL

RUBY_EVENT_CALL  2493 eval.c             case RUBY_EVENT_CALL:
RUBY_EVENT_CALL  5722 eval.c         		    EXEC_EVENT_HOOK(RUBY_EVENT_CALL, b2, recv, id, klass);


RUBY_EVENT_CLASS

RUBY_EVENT_CLASS 2489 eval.c             case RUBY_EVENT_CLASS:
RUBY_EVENT_CLASS 3991 eval.c         	EXEC_EVENT_HOOK(RUBY_EVENT_CLASS, n, ruby_cbase,


RUBY_EVENT_C_CALL

RUBY_EVENT_C_CALL 2497 eval.c             case RUBY_EVENT_C_CALL:
RUBY_EVENT_C_CALL 5630 eval.c         		EXEC_EVENT_HOOK(RUBY_EVENT_C_CALL, ruby_current_node,


RUBY_EVENT_C_RETURN

RUBY_EVENT_C_RETURN 2499 eval.c             case RUBY_EVENT_C_RETURN:
RUBY_EVENT_C_RETURN 5638 eval.c         		EXEC_EVENT_HOOK(RUBY_EVENT_C_RETURN, ruby_current_node,


RUBY_EVENT_END

RUBY_EVENT_END   2491 eval.c             case RUBY_EVENT_END:
RUBY_EVENT_END   4002 eval.c             EXEC_EVENT_HOOK(RUBY_EVENT_END, n, 0, ruby_frame->this_func,


RUBY_EVENT_LINE

RUBY_EVENT_LINE  2487 eval.c             case RUBY_EVENT_LINE:
RUBY_EVENT_LINE  2721 eval.c         	EXEC_EVENT_HOOK(RUBY_EVENT_LINE, node, self,
RUBY_EVENT_LINE  2817 eval.c         	EXEC_EVENT_HOOK(RUBY_EVENT_LINE, node, self,
RUBY_EVENT_LINE  2835 eval.c         		EXEC_EVENT_HOOK(RUBY_EVENT_LINE, tag, self,
RUBY_EVENT_LINE  2876 eval.c         		    EXEC_EVENT_HOOK(RUBY_EVENT_LINE, tag, self,


RUBY_EVENT_RAISE

RUBY_EVENT_RAISE 2501 eval.c             case RUBY_EVENT_RAISE:
RUBY_EVENT_RAISE 4391 eval.c         	EXEC_EVENT_HOOK(RUBY_EVENT_RAISE, ruby_current_node,


RUBY_EVENT_RETURN

RUBY_EVENT_RETURN 2495 eval.c             case RUBY_EVENT_RETURN:
RUBY_EVENT_RETURN 5737 eval.c         		EXEC_EVENT_HOOK(RUBY_EVENT_RETURN, body, recv, id, klass);


RUBY_EXPORT

RUBY_EXPORT       198 defines.h      #ifdef RUBY_EXPORT
RUBY_EXPORT        68 oniguruma.h    #if defined(EXPORT) || defined(RUBY_EXPORT)
RUBY_EXPORT       101 win32/win32.h  #ifdef RUBY_EXPORT
RUBY_EXPORT       311 win32/win32.h  #ifdef RUBY_EXPORT
RUBY_EXPORT       385 win32/win32.h  #ifdef RUBY_EXPORT


RUBY_EXTERN

RUBY_EXTERN       202 defines.h      #ifndef RUBY_EXTERN
RUBY_EXTERN       207 defines.h      #define EXTERN RUBY_EXTERN	/* deprecated */
RUBY_EXTERN        16 env.h          RUBY_EXTERN struct FRAME {
RUBY_EXTERN        35 env.h          RUBY_EXTERN struct SCOPE {
RUBY_EXTERN        47 env.h          RUBY_EXTERN int ruby_in_eval;
RUBY_EXTERN        49 env.h          RUBY_EXTERN VALUE ruby_class;
RUBY_EXTERN        57 env.h          RUBY_EXTERN struct RVarmap *ruby_dyna_vars;
RUBY_EXTERN       151 intern.h       RUBY_EXTERN int ruby_nerrs;
RUBY_EXTERN       198 intern.h       RUBY_EXTERN struct RNode *ruby_current_node;
RUBY_EXTERN       328 intern.h       RUBY_EXTERN VALUE rb_fs;
RUBY_EXTERN       329 intern.h       RUBY_EXTERN VALUE rb_output_fs;
RUBY_EXTERN       330 intern.h       RUBY_EXTERN VALUE rb_rs;
RUBY_EXTERN       331 intern.h       RUBY_EXTERN VALUE rb_default_rs;
RUBY_EXTERN       332 intern.h       RUBY_EXTERN VALUE rb_output_rs;
RUBY_EXTERN       390 intern.h       RUBY_EXTERN int   ruby_sourceline;
RUBY_EXTERN       391 intern.h       RUBY_EXTERN char *ruby_sourcefile;
RUBY_EXTERN       444 intern.h       RUBY_EXTERN VALUE rb_argv;
RUBY_EXTERN       445 intern.h       RUBY_EXTERN VALUE rb_argv0;
RUBY_EXTERN        29 main.c             RUBY_EXTERN int always_gc;
RUBY_EXTERN        38 re.h           RUBY_EXTERN int ruby_ignorecase;
RUBY_EXTERN       260 ruby.h         RUBY_EXTERN int ruby_safe_level;
RUBY_EXTERN       554 ruby.h         RUBY_EXTERN VALUE ruby_verbose, ruby_debug;
RUBY_EXTERN       601 ruby.h         RUBY_EXTERN VALUE rb_mKernel;
RUBY_EXTERN       602 ruby.h         RUBY_EXTERN VALUE rb_mComparable;
RUBY_EXTERN       603 ruby.h         RUBY_EXTERN VALUE rb_mEnumerable;
RUBY_EXTERN       604 ruby.h         RUBY_EXTERN VALUE rb_mPrecision;
RUBY_EXTERN       605 ruby.h         RUBY_EXTERN VALUE rb_mErrno;
RUBY_EXTERN       606 ruby.h         RUBY_EXTERN VALUE rb_mFileTest;
RUBY_EXTERN       607 ruby.h         RUBY_EXTERN VALUE rb_mGC;
RUBY_EXTERN       608 ruby.h         RUBY_EXTERN VALUE rb_mMath;
RUBY_EXTERN       609 ruby.h         RUBY_EXTERN VALUE rb_mProcess;
RUBY_EXTERN       611 ruby.h         RUBY_EXTERN VALUE rb_cObject;
RUBY_EXTERN       612 ruby.h         RUBY_EXTERN VALUE rb_cArray;
RUBY_EXTERN       613 ruby.h         RUBY_EXTERN VALUE rb_cValues;
RUBY_EXTERN       614 ruby.h         RUBY_EXTERN VALUE rb_cBignum;
RUBY_EXTERN       615 ruby.h         RUBY_EXTERN VALUE rb_cClass;
RUBY_EXTERN       616 ruby.h         RUBY_EXTERN VALUE rb_cDir;
RUBY_EXTERN       617 ruby.h         RUBY_EXTERN VALUE rb_cData;
RUBY_EXTERN       618 ruby.h         RUBY_EXTERN VALUE rb_cFalseClass;
RUBY_EXTERN       619 ruby.h         RUBY_EXTERN VALUE rb_cFile;
RUBY_EXTERN       620 ruby.h         RUBY_EXTERN VALUE rb_cFixnum;
RUBY_EXTERN       621 ruby.h         RUBY_EXTERN VALUE rb_cFloat;
RUBY_EXTERN       622 ruby.h         RUBY_EXTERN VALUE rb_cHash;
RUBY_EXTERN       623 ruby.h         RUBY_EXTERN VALUE rb_cInteger;
RUBY_EXTERN       624 ruby.h         RUBY_EXTERN VALUE rb_cIO;
RUBY_EXTERN       625 ruby.h         RUBY_EXTERN VALUE rb_cModule;
RUBY_EXTERN       626 ruby.h         RUBY_EXTERN VALUE rb_cNilClass;
RUBY_EXTERN       627 ruby.h         RUBY_EXTERN VALUE rb_cNumeric;
RUBY_EXTERN       628 ruby.h         RUBY_EXTERN VALUE rb_cProc;
RUBY_EXTERN       629 ruby.h         RUBY_EXTERN VALUE rb_cRange;
RUBY_EXTERN       630 ruby.h         RUBY_EXTERN VALUE rb_cRegexp;
RUBY_EXTERN       631 ruby.h         RUBY_EXTERN VALUE rb_cString;
RUBY_EXTERN       632 ruby.h         RUBY_EXTERN VALUE rb_cSymbol;
RUBY_EXTERN       633 ruby.h         RUBY_EXTERN VALUE rb_cThread;
RUBY_EXTERN       634 ruby.h         RUBY_EXTERN VALUE rb_cTime;
RUBY_EXTERN       635 ruby.h         RUBY_EXTERN VALUE rb_cTrueClass;
RUBY_EXTERN       636 ruby.h         RUBY_EXTERN VALUE rb_cStruct;
RUBY_EXTERN       638 ruby.h         RUBY_EXTERN VALUE rb_eException;
RUBY_EXTERN       639 ruby.h         RUBY_EXTERN VALUE rb_eStandardError;
RUBY_EXTERN       640 ruby.h         RUBY_EXTERN VALUE rb_eSystemExit;
RUBY_EXTERN       641 ruby.h         RUBY_EXTERN VALUE rb_eInterrupt;
RUBY_EXTERN       642 ruby.h         RUBY_EXTERN VALUE rb_eSignal;
RUBY_EXTERN       643 ruby.h         RUBY_EXTERN VALUE rb_eFatal;
RUBY_EXTERN       644 ruby.h         RUBY_EXTERN VALUE rb_eArgError;
RUBY_EXTERN       645 ruby.h         RUBY_EXTERN VALUE rb_eEOFError;
RUBY_EXTERN       646 ruby.h         RUBY_EXTERN VALUE rb_eIndexError;
RUBY_EXTERN       647 ruby.h         RUBY_EXTERN VALUE rb_eKeyError;
RUBY_EXTERN       648 ruby.h         RUBY_EXTERN VALUE rb_eRangeError;
RUBY_EXTERN       649 ruby.h         RUBY_EXTERN VALUE rb_eIOError;
RUBY_EXTERN       650 ruby.h         RUBY_EXTERN VALUE rb_eRuntimeError;
RUBY_EXTERN       651 ruby.h         RUBY_EXTERN VALUE rb_eSecurityError;
RUBY_EXTERN       652 ruby.h         RUBY_EXTERN VALUE rb_eSystemCallError;
RUBY_EXTERN       653 ruby.h         RUBY_EXTERN VALUE rb_eTypeError;
RUBY_EXTERN       654 ruby.h         RUBY_EXTERN VALUE rb_eZeroDivError;
RUBY_EXTERN       655 ruby.h         RUBY_EXTERN VALUE rb_eNotImpError;
RUBY_EXTERN       656 ruby.h         RUBY_EXTERN VALUE rb_eNoMemError;
RUBY_EXTERN       657 ruby.h         RUBY_EXTERN VALUE rb_eNoMethodError;
RUBY_EXTERN       658 ruby.h         RUBY_EXTERN VALUE rb_eFloatDomainError;
RUBY_EXTERN       660 ruby.h         RUBY_EXTERN VALUE rb_eScriptError;
RUBY_EXTERN       661 ruby.h         RUBY_EXTERN VALUE rb_eNameError;
RUBY_EXTERN       662 ruby.h         RUBY_EXTERN VALUE rb_eSyntaxError;
RUBY_EXTERN       663 ruby.h         RUBY_EXTERN VALUE rb_eLoadError;
RUBY_EXTERN       665 ruby.h         RUBY_EXTERN VALUE rb_stdin, rb_stdout, rb_stderr;
RUBY_EXTERN       666 ruby.h         RUBY_EXTERN VALUE ruby_errinfo;
RUBY_EXTERN        65 rubysig.h      RUBY_EXTERN rb_atomic_t rb_trap_immediate;
RUBY_EXTERN        67 rubysig.h      RUBY_EXTERN int rb_prohibit_interrupt;
RUBY_EXTERN        77 rubysig.h      RUBY_EXTERN rb_atomic_t rb_trap_pending;
RUBY_EXTERN        80 rubysig.h      RUBY_EXTERN int rb_thread_critical;
RUBY_EXTERN        83 rubysig.h      RUBY_EXTERN int rb_thread_pending;
RUBY_EXTERN        92 rubysig.h      RUBY_EXTERN int rb_thread_tick;
RUBY_EXTERN        13 version.h      RUBY_EXTERN const char ruby_version[];
RUBY_EXTERN        14 version.h      RUBY_EXTERN const char ruby_release_date[];
RUBY_EXTERN        15 version.h      RUBY_EXTERN const char ruby_platform[];


RUBY_GDBM_RW_BIT

RUBY_GDBM_RW_BIT  125 ext/gdbm/gdbm.c     if (flags & RUBY_GDBM_RW_BIT) {
RUBY_GDBM_RW_BIT  126 ext/gdbm/gdbm.c         flags &= ~RUBY_GDBM_RW_BIT;
RUBY_GDBM_RW_BIT  970 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "READER",  INT2FIX(GDBM_READER|RUBY_GDBM_RW_BIT));
RUBY_GDBM_RW_BIT  971 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "WRITER",  INT2FIX(GDBM_WRITER|RUBY_GDBM_RW_BIT));
RUBY_GDBM_RW_BIT  972 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "WRCREAT", INT2FIX(GDBM_WRCREAT|RUBY_GDBM_RW_BIT));
RUBY_GDBM_RW_BIT  973 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "NEWDB",   INT2FIX(GDBM_NEWDB|RUBY_GDBM_RW_BIT));


RUBY_LIB

RUBY_LIB           55 missing/alloca.c #ifdef RUBY_LIB
RUBY_LIB          321 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_LIB));


RUBY_MBCHAR_MAXSIZE

RUBY_MBCHAR_MAXSIZE  210 defines.h      #ifndef RUBY_MBCHAR_MAXSIZE
RUBY_MBCHAR_MAXSIZE  101 dir.c          # define Next(p) ((p) + mblen(p, RUBY_MBCHAR_MAXSIZE))
RUBY_MBCHAR_MAXSIZE  108 dir.c              int n = mblen(p, RUBY_MBCHAR_MAXSIZE);
RUBY_MBCHAR_MAXSIZE 2241 file.c         #   define CharNext(p) ((p) + mblen(p, RUBY_MBCHAR_MAXSIZE))
RUBY_MBCHAR_MAXSIZE  249 ruby.c         	p += mblen(p, RUBY_MBCHAR_MAXSIZE);
RUBY_MBCHAR_MAXSIZE  341 util.c             for (p = buf; *p; p += mblen(p, RUBY_MBCHAR_MAXSIZE))


RUBY_METHOD_FUNC

RUBY_METHOD_FUNC 1352 ext/socket/socket.c 		     RUBY_METHOD_FUNC(freeaddrinfo), (VALUE)addr);
RUBY_METHOD_FUNC 1626 ext/socket/socket.c 		    RUBY_METHOD_FUNC(freeaddrinfo), (VALUE)arg.res);


RUBY_PLATFORM

RUBY_PLATFORM     260 defines.h      #ifndef RUBY_PLATFORM
RUBY_PLATFORM     145 ext/dl/dl.c        rb_define_const(rb_mDL, "BUILD_RUBY_PLATFORM", rb_str_new2(RUBY_PLATFORM));
RUBY_PLATFORM     144 oniguruma.h    #if defined(RUBY_PLATFORM) && defined(M17N_H)
RUBY_PLATFORM      32 regenc.h       #ifndef RUBY_PLATFORM
RUBY_PLATFORM     991 regexec.c      #ifdef RUBY_PLATFORM
RUBY_PLATFORM    1096 regexec.c      #ifdef RUBY_PLATFORM
RUBY_PLATFORM    1116 regexec.c      #ifdef RUBY_PLATFORM
RUBY_PLATFORM      19 version.c      const char ruby_platform[] = RUBY_PLATFORM;
RUBY_PLATFORM      36 version.c          printf("ruby %s (%s) [%s]\n", RUBY_VERSION, RUBY_RELEASE_DATE, RUBY_PLATFORM);


RUBY_RELATIVE

RUBY_RELATIVE     311 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_SEARCH_PATH));
RUBY_RELATIVE     314 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_SITE_LIB2));
RUBY_RELATIVE     316 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_SITE_THIN_ARCHLIB));
RUBY_RELATIVE     318 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_SITE_ARCHLIB));
RUBY_RELATIVE     319 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_SITE_LIB));
RUBY_RELATIVE     321 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_LIB));
RUBY_RELATIVE     323 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_THIN_ARCHLIB));
RUBY_RELATIVE     325 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_ARCHLIB));


RUBY_RELEASE_DATE

RUBY_RELEASE_DATE 7643 ext/tk/tcltklib.c         + strlen(RUBY_RELEASE_DATE)
RUBY_RELEASE_DATE 7655 ext/tk/tcltklib.c             RUBY_VERSION, RUBY_RELEASE_DATE,
RUBY_RELEASE_DATE   18 version.c      const char ruby_release_date[] = RUBY_RELEASE_DATE;
RUBY_RELEASE_DATE   36 version.c          printf("ruby %s (%s) [%s]\n", RUBY_VERSION, RUBY_RELEASE_DATE, RUBY_PLATFORM);


RUBY_VERSION

RUBY_VERSION      146 ext/dl/dl.c        rb_define_const(rb_mDL, "BUILD_RUBY_VERSION",  rb_str_new2(RUBY_VERSION));
RUBY_VERSION     7642 ext/tk/tcltklib.c         + strlen(RUBY_VERSION)
RUBY_VERSION     7655 ext/tk/tcltklib.c             RUBY_VERSION, RUBY_RELEASE_DATE,
RUBY_VERSION       17 version.c      const char ruby_version[] = RUBY_VERSION;
RUBY_VERSION       36 version.c          printf("ruby %s (%s) [%s]\n", RUBY_VERSION, RUBY_RELEASE_DATE, RUBY_PLATFORM);


RVALUE

RVALUE             21 ext/syck/rubyext.c         struct RVALUE *next;
RVALUE            627 ext/syck/rubyext.c         MEMCPY((void *)n->id, (void *)obj, RVALUE, 1);
RVALUE            628 ext/syck/rubyext.c         MEMZERO((void *)obj, RVALUE, 1);
RVALUE            288 gc.c           	    struct RVALUE *next;
RVALUE            313 gc.c           static RVALUE *freelist = 0;
RVALUE            314 gc.c           static RVALUE *deferred_final_list = 0;
RVALUE            318 gc.c               RVALUE *slot;
RVALUE            329 gc.c           static RVALUE *himem, *lomem;
RVALUE            334 gc.c               RVALUE *p, *pend;
RVALUE            355 gc.c           	RUBY_CRITICAL(p = heaps[heaps_used].slot = (RVALUE*)malloc(sizeof(RVALUE)*heap_slots));
RVALUE            379 gc.c           #define RANY(o) ((RVALUE*)(o))
RVALUE            391 gc.c               MEMZERO((void*)obj, RVALUE, 1);
RVALUE            559 gc.c               RVALUE *p, *pend;
RVALUE            594 gc.c               register RVALUE *p = RANY(ptr);
RVALUE            595 gc.c               register RVALUE *heap_org;
RVALUE            604 gc.c           	    ((((char*)p)-((char*)heap_org))%sizeof(RVALUE)) == 0)
RVALUE            686 gc.c               register RVALUE *obj;
RVALUE            718 gc.c               register RVALUE *obj = RANY(ptr);
RVALUE            972 gc.c           finalize_list(RVALUE *p)
RVALUE            975 gc.c           	RVALUE *tmp = p->as.free.next;
RVALUE           1010 gc.c               RVALUE *p, *pend, *final_list;
RVALUE           1025 gc.c           	RVALUE *free = freelist;
RVALUE           1026 gc.c           	RVALUE *final = final_list;
RVALUE           1057 gc.c           	    RVALUE *pp;
RVALUE           1536 gc.c           	RVALUE *p, *pend;
RVALUE           1568 gc.c           	RVALUE *p, *pend;
RVALUE           1800 gc.c               RVALUE *p = deferred_final_list;
RVALUE           1812 gc.c               RVALUE *p, *pend;


R_BITSIZE

R_BITSIZE         562 dln.c              mask = (1 << R_BITSIZE(&(undef->reloc))) - 1;
R_BITSIZE         829 dln.c          	    mask = (1 << R_BITSIZE(rel)) - 1;


R_CAST

R_CAST            156 node.h         #define RNODE(obj)  (R_CAST(RNode)(obj))
R_CAST             29 re.h           #define RMATCH(obj)  (R_CAST(RMatch)(obj))
R_CAST            434 ruby.h         #define RBASIC(obj)  (R_CAST(RBasic)(obj))
R_CAST            435 ruby.h         #define ROBJECT(obj) (R_CAST(RObject)(obj))
R_CAST            436 ruby.h         #define RCLASS(obj)  (R_CAST(RClass)(obj))
R_CAST            438 ruby.h         #define RFLOAT(obj)  (R_CAST(RFloat)(obj))
R_CAST            439 ruby.h         #define RSTRING(obj) (R_CAST(RString)(obj))
R_CAST            440 ruby.h         #define RREGEXP(obj) (R_CAST(RRegexp)(obj))
R_CAST            441 ruby.h         #define RARRAY(obj)  (R_CAST(RArray)(obj))
R_CAST            442 ruby.h         #define RHASH(obj)   (R_CAST(RHash)(obj))
R_CAST            443 ruby.h         #define RDATA(obj)   (R_CAST(RData)(obj))
R_CAST            444 ruby.h         #define RSTRUCT(obj) (R_CAST(RStruct)(obj))
R_CAST            445 ruby.h         #define RBIGNUM(obj) (R_CAST(RBignum)(obj))
R_CAST            446 ruby.h         #define RFILE(obj)   (R_CAST(RFile)(obj))


R_LENGTH

R_LENGTH          520 dln.c              switch (R_LENGTH(reloc)) {
R_LENGTH          565 dln.c              switch (R_LENGTH(&(undef->reloc))) {
R_LENGTH          583 dln.c              switch (R_LENGTH(&(undef->reloc))) {
R_LENGTH          833 dln.c          	    switch (R_LENGTH(rel)) {
R_LENGTH          848 dln.c          	    switch (R_LENGTH(rel)) {


R_MEMORY_SUB

R_MEMORY_SUB      585 dln.c          	if (R_MEMORY_SUB(&(undef->reloc)))
R_MEMORY_SUB      590 dln.c          	if (R_MEMORY_SUB(&(undef->reloc)))
R_MEMORY_SUB      595 dln.c          	if (R_MEMORY_SUB(&(undef->reloc)))


R_OK

R_OK             1071 file.c             if (eaccess(StringValueCStr(fname), R_OK) < 0) return Qfalse;
R_OK             1088 file.c             if (access(StringValueCStr(fname), R_OK) < 0) return Qfalse;
R_OK             4087 file.c             return eaccess(path, R_OK) == 0;
R_OK               15 missing/file.h #ifndef R_OK


R_PCREL

R_PCREL           558 dln.c              if (R_PCREL(&(undef->reloc))) datum -= undef->base;
R_PCREL           824 dln.c          	    if (R_PCREL(rel)) datum -= block;


R_RIGHTSHIFT

R_RIGHTSHIFT      561 dln.c              datum >>= R_RIGHTSHIFT(&(undef->reloc));
R_RIGHTSHIFT      828 dln.c          	    datum >>= R_RIGHTSHIFT(rel);


R_SYMBOL

R_SYMBOL          256 dln.c          #ifndef R_SYMBOL
R_SYMBOL          799 dln.c          		sym = &(syms[R_SYMBOL(rel)]);
R_SYMBOL          812 dln.c          		switch (R_SYMBOL(rel)) {


Real

Real               88 ext/bigdecimal/bigdecimal.c static Real *
Real               91 ext/bigdecimal/bigdecimal.c     Real *pv;
Real               99 ext/bigdecimal/bigdecimal.c             Data_Get_Struct(v, Real, pv);
Real              145 ext/bigdecimal/bigdecimal.c     Real *p;
Real              158 ext/bigdecimal/bigdecimal.c     Real *p;
Real              179 ext/bigdecimal/bigdecimal.c     Real *vp;
Real              195 ext/bigdecimal/bigdecimal.c     Real *pv;
Real              296 ext/bigdecimal/bigdecimal.c VP_EXPORT Real *
Real              299 ext/bigdecimal/bigdecimal.c     Real *pv = VpAlloc(mx,str);
Real              304 ext/bigdecimal/bigdecimal.c VP_EXPORT Real *
Real              307 ext/bigdecimal/bigdecimal.c     Real *pv = VpAlloc(mx,str);
Real              316 ext/bigdecimal/bigdecimal.c     Real *p = GetVpValue(self,1);
Real              324 ext/bigdecimal/bigdecimal.c     Real *p = GetVpValue(self,1);
Real              333 ext/bigdecimal/bigdecimal.c     Real *p = GetVpValue(self,1);
Real              346 ext/bigdecimal/bigdecimal.c     Real *p;
Real              398 ext/bigdecimal/bigdecimal.c     Real *p = GetVpValue(x,1);
Real              406 ext/bigdecimal/bigdecimal.c     Real *p;
Real              427 ext/bigdecimal/bigdecimal.c     Real *b;
Real              447 ext/bigdecimal/bigdecimal.c     Real *c, *a, *b;
Real              474 ext/bigdecimal/bigdecimal.c     Real *c, *a, *b;
Real              505 ext/bigdecimal/bigdecimal.c     Real *a, *b;
Real              528 ext/bigdecimal/bigdecimal.c     Real *a = GetVpValue(self,1);
Real              535 ext/bigdecimal/bigdecimal.c     Real *a = GetVpValue(self,1);
Real              585 ext/bigdecimal/bigdecimal.c     Real *c, *a;
Real              596 ext/bigdecimal/bigdecimal.c     Real *c, *a, *b;
Real              615 ext/bigdecimal/bigdecimal.c     Real *a, *b;
Real              635 ext/bigdecimal/bigdecimal.c     Real *c=NULL, *res=NULL, *div = NULL;
Real              658 ext/bigdecimal/bigdecimal.c     Real *c=NULL, *d=NULL, *res=NULL;
Real              659 ext/bigdecimal/bigdecimal.c     Real *a, *b;
Real              713 ext/bigdecimal/bigdecimal.c     Real *div=NULL, *mod=NULL;
Real              726 ext/bigdecimal/bigdecimal.c     Real *a=NULL, *b=NULL, *c=NULL, *res=NULL, *d=NULL, *rr=NULL, *ff=NULL;
Real              727 ext/bigdecimal/bigdecimal.c     Real *f=NULL;
Real              762 ext/bigdecimal/bigdecimal.c     Real  *d,*rv;
Real              773 ext/bigdecimal/bigdecimal.c     Real *div=NULL, *mod=NULL;
Real              790 ext/bigdecimal/bigdecimal.c        Real *div=NULL;
Real              791 ext/bigdecimal/bigdecimal.c        Real *mod;
Real              799 ext/bigdecimal/bigdecimal.c           Real *res=NULL;
Real              800 ext/bigdecimal/bigdecimal.c           Real *av=NULL, *bv=NULL, *cv=NULL;
Real              822 ext/bigdecimal/bigdecimal.c     Real   *cv;
Real              839 ext/bigdecimal/bigdecimal.c     Real *cv;
Real              856 ext/bigdecimal/bigdecimal.c     Real *cv;
Real              873 ext/bigdecimal/bigdecimal.c     Real *c, *a;
Real              888 ext/bigdecimal/bigdecimal.c     Real *c, *a;
Real              905 ext/bigdecimal/bigdecimal.c     Real *c, *a;
Real              919 ext/bigdecimal/bigdecimal.c     Real   *c, *a;
Real              962 ext/bigdecimal/bigdecimal.c     Real *c, *a;
Real              987 ext/bigdecimal/bigdecimal.c     Real *c, *a;
Real             1001 ext/bigdecimal/bigdecimal.c     Real *c, *a;
Real             1026 ext/bigdecimal/bigdecimal.c     Real *c, *a;
Real             1053 ext/bigdecimal/bigdecimal.c     Real  *vp;
Real             1104 ext/bigdecimal/bigdecimal.c     Real *vp;
Real             1139 ext/bigdecimal/bigdecimal.c     Real *vp;
Real             1161 ext/bigdecimal/bigdecimal.c     Real *x, *y;
Real             1185 ext/bigdecimal/bigdecimal.c     Real *pv;
Real             1204 ext/bigdecimal/bigdecimal.c     Real *pv;
Real             1376 ext/bigdecimal/bigdecimal.c static Real *VpConstOne;    /* constant 1.0 */
Real             1377 ext/bigdecimal/bigdecimal.c static Real *VpPt5;        /* constant 0.5 */
Real             1825 ext/bigdecimal/bigdecimal.c VP_EXPORT Real *
Real             1875 ext/bigdecimal/bigdecimal.c VP_EXPORT Real *
Real             1881 ext/bigdecimal/bigdecimal.c     Real *vp = NULL;
Real             1901 ext/bigdecimal/bigdecimal.c        vp = (Real *) VpMemAlloc(sizeof(Real) + mx * sizeof(U_LONG));
Real             1921 ext/bigdecimal/bigdecimal.c         vp = (Real *) VpMemAlloc(sizeof(Real) + sizeof(U_LONG));
Real             1927 ext/bigdecimal/bigdecimal.c         vp = (Real *) VpMemAlloc(sizeof(Real) + sizeof(U_LONG));
Real             1933 ext/bigdecimal/bigdecimal.c         vp = (Real *) VpMemAlloc(sizeof(Real) + sizeof(U_LONG));
Real             1992 ext/bigdecimal/bigdecimal.c     vp =(Real *) VpMemAlloc(sizeof(Real) + mx * sizeof(U_LONG));
Real             2058 ext/bigdecimal/bigdecimal.c     Real *a_ptr, *b_ptr;
Real             2490 ext/bigdecimal/bigdecimal.c     Real *w;
Real             3611 ext/bigdecimal/bigdecimal.c     Real *f = NULL;
Real             3612 ext/bigdecimal/bigdecimal.c     Real *r = NULL;
Real             3969 ext/bigdecimal/bigdecimal.c     Real *w1 = NULL;
Real             3970 ext/bigdecimal/bigdecimal.c     Real *w2 = NULL;
Real              105 ext/bigdecimal/bigdecimal.h VP_EXPORT  Real *
Real              108 ext/bigdecimal/bigdecimal.h VP_EXPORT  Real *VpCreateRbObject(U_LONG mx,char *str);
Real              131 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpNumOfChars(Real *vp,char *pszFmt);
Real              134 ext/bigdecimal/bigdecimal.h VP_EXPORT void VpFree(Real *pv);
Real              135 ext/bigdecimal/bigdecimal.h VP_EXPORT Real *VpAlloc(U_LONG mx, char *szVal);
Real              136 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpAsgn(Real *c,Real *a,int isw);
Real              137 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpAddSub(Real *c,Real *a,Real *b,int operation);
Real              138 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpMult(Real *c,Real *a,Real *b);
Real              139 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpDivd(Real *c,Real *r,Real *a,Real *b);
Real              140 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpComp(Real *a,Real *b);
Real              141 ext/bigdecimal/bigdecimal.h VP_EXPORT S_LONG VpExponent10(Real *a);
Real              142 ext/bigdecimal/bigdecimal.h VP_EXPORT void VpSzMantissa(Real *a,char *psz);
Real              143 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpToSpecialString(Real *a,char *psz,int fPlus);
Real              144 ext/bigdecimal/bigdecimal.h VP_EXPORT void VpToString(Real *a,char *psz,int fFmt,int fPlus);
Real              145 ext/bigdecimal/bigdecimal.h VP_EXPORT void VpToFString(Real *a,char *psz,int fFmt,int fPlus);
Real              146 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpCtoV(Real *a,char *int_chr,U_LONG ni,char *frac,U_LONG nf,char *exp_chr,U_LONG ne);
Real              147 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpVtoD(double *d,S_LONG *e,Real *m);
Real              148 ext/bigdecimal/bigdecimal.h VP_EXPORT void VpDtoV(Real *m,double d);
Real              149 ext/bigdecimal/bigdecimal.h VP_EXPORT void VpItoV(Real *m,S_INT ival);
Real              150 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpSqrt(Real *y,Real *x);
Real              151 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpActiveRound(Real *y,Real *x,int f,int il);
Real              152 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpMidRound(Real *y, int f, int nf);
Real              153 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpLeftRound(Real *y, int f, int nf);
Real              154 ext/bigdecimal/bigdecimal.h VP_EXPORT void VpFrac(Real *y,Real *x);
Real              155 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpPower(Real *y,Real *x,S_INT n);
Real              158 ext/bigdecimal/bigdecimal.h VP_EXPORT Real *VpOne();
Real              209 ext/bigdecimal/bigdecimal.h int VpVarCheck(Real * v);
Real              210 ext/bigdecimal/bigdecimal.h VP_EXPORT int VPrint(FILE *fp,char *cntl_chr,Real *a);


Regexp

Regexp            469 re.c           	    Regexp *rp;
Regexp            599 re.c           static Regexp*
Regexp            602 re.c               Regexp *rp;


RelAddrType

RelAddrType       192 regcomp.c        RelAddrType ra = (RelAddrType )addr;
RelAddrType      5152 regcomp.c        RelAddrType addr;
RelAddrType      5320 regcomp.c      	addr = *((RelAddrType* )bp);
RelAddrType      5328 regcomp.c            addr = *((RelAddrType* )bp);
RelAddrType      1208 regexec.c        RelAddrType addr;
RelAddrType       641 regint.h       #define SIZE_RELADDR       sizeof(RelAddrType)
RelAddrType       667 regint.h       #define GET_RELADDR_INC(addr,p)    PLATFORM_GET_INC(addr,   p, RelAddrType)


Renew

Renew            1437 win32/win32.c  	Renew (p->start, idx+len+1, char);
Renew            1444 win32/win32.c  	    Renew (p->bits, p->nfiles / 4 + 1, char);


RepeatNumType

RepeatNumType     645 regint.h       #define SIZE_REPEATNUM     sizeof(RepeatNumType)
RepeatNumType     671 regint.h       #define GET_REPEATNUM_INC(num,p)   PLATFORM_GET_INC(num,    p, RepeatNumType)


ResetSignal

ResetSignal      2854 win32/win32.c  	    ResetSignal(interrupted_event);
ResetSignal      3377 win32/win32.c  	ResetSignal(interrupted_event);


S32

S32               162 ext/digest/sha2/sha2.c #define Sigma0_256(x)	(S32(2,  (x)) ^ S32(13, (x)) ^ S32(22, (x)))
S32               163 ext/digest/sha2/sha2.c #define Sigma1_256(x)	(S32(6,  (x)) ^ S32(11, (x)) ^ S32(25, (x)))
S32               164 ext/digest/sha2/sha2.c #define sigma0_256(x)	(S32(7,  (x)) ^ S32(18, (x)) ^ R(3 ,   (x)))
S32               165 ext/digest/sha2/sha2.c #define sigma1_256(x)	(S32(17, (x)) ^ S32(19, (x)) ^ R(10,   (x)))


S64

S64               168 ext/digest/sha2/sha2.c #define Sigma0_512(x)	(S64(28, (x)) ^ S64(34, (x)) ^ S64(39, (x)))
S64               169 ext/digest/sha2/sha2.c #define Sigma1_512(x)	(S64(14, (x)) ^ S64(18, (x)) ^ S64(41, (x)))
S64               170 ext/digest/sha2/sha2.c #define sigma0_512(x)	(S64( 1, (x)) ^ S64( 8, (x)) ^ R( 7,   (x)))
S64               171 ext/digest/sha2/sha2.c #define sigma1_512(x)	(S64(19, (x)) ^ S64(61, (x)) ^ R( 6,   (x)))


SAFE_LEVEL_MAX

SAFE_LEVEL_MAX   9887 eval.c         	if (level > SAFE_LEVEL_MAX) level = SAFE_LEVEL_MAX;
SAFE_LEVEL_MAX   9908 eval.c             if (level > SAFE_LEVEL_MAX) level = SAFE_LEVEL_MAX;


SAVE

SAVE               37 ext/bigdecimal/bigdecimal.c #define GUARD_OBJ(p,y) {p=y;SAVE(p);}
SAVE              452 ext/bigdecimal/bigdecimal.c     SAVE(b);
SAVE              480 ext/bigdecimal/bigdecimal.c     SAVE(b);
SAVE              509 ext/bigdecimal/bigdecimal.c     SAVE(b);
SAVE              602 ext/bigdecimal/bigdecimal.c     SAVE(b);
SAVE              621 ext/bigdecimal/bigdecimal.c     SAVE(b);
SAVE              638 ext/bigdecimal/bigdecimal.c     SAVE(c);SAVE(res);SAVE(div);
SAVE              665 ext/bigdecimal/bigdecimal.c     SAVE(b);
SAVE              717 ext/bigdecimal/bigdecimal.c     SAVE(div);SAVE(mod);
SAVE              732 ext/bigdecimal/bigdecimal.c     SAVE(b);
SAVE              777 ext/bigdecimal/bigdecimal.c     SAVE(div);SAVE(mod);


SAVE_WIN32_EXCEPTION_LIST

SAVE_WIN32_EXCEPTION_LIST 9541 eval.c         #if !defined SAVE_WIN32_EXCEPTION_LIST && !defined _WIN32_WCE
SAVE_WIN32_EXCEPTION_LIST 9693 eval.c         #ifdef SAVE_WIN32_EXCEPTION_LIST
SAVE_WIN32_EXCEPTION_LIST 10130 eval.c         #ifdef SAVE_WIN32_EXCEPTION_LIST
SAVE_WIN32_EXCEPTION_LIST 10233 eval.c         #ifdef SAVE_WIN32_EXCEPTION_LIST


SA_LEN

SA_LEN            165 ext/socket/getnameinfo.c 	len = SA_LEN(sa);
SA_LEN            676 ext/socket/socket.c     error = getnameinfo(addr, SA_LEN(addr), buf, len, NULL, 0, NI_NUMERICHOST);
SA_LEN            881 ext/socket/socket.c 	error = getnameinfo(sockaddr, SA_LEN(sockaddr), hbuf, sizeof(hbuf),
SA_LEN            887 ext/socket/socket.c     error = getnameinfo(sockaddr, SA_LEN(sockaddr), hbuf, sizeof(hbuf),
SA_LEN           2928 ext/socket/socket.c 	if (RSTRING(sa)->len != SA_LEN((struct sockaddr*)&ss)) {
SA_LEN           3014 ext/socket/socket.c     error = getnameinfo(sap, SA_LEN(sap), hbuf, sizeof(hbuf),
SA_LEN           3022 ext/socket/socket.c 	    error = getnameinfo(sap, SA_LEN(sap), hbuf2, sizeof(hbuf2),
SA_LEN             14 ext/socket/sockport.h #ifndef SA_LEN


SCANENV_MEMNODES_SIZE

SCANENV_MEMNODES_SIZE  910 regparse.c       for (i = 0; i < SCANENV_MEMNODES_SIZE; i++)
SCANENV_MEMNODES_SIZE  921 regparse.c       if (need >= SCANENV_MEMNODES_SIZE) {
SCANENV_MEMNODES_SIZE  927 regparse.c     		sizeof(Node*) * SCANENV_MEMNODES_SIZE);
SCANENV_MEMNODES_SIZE  275 regparse.h       Node*           mem_nodes_static[SCANENV_MEMNODES_SIZE];


SCANENV_MEM_NODES

SCANENV_MEM_NODES 1623 regcomp.c            SCANENV_MEM_NODES(env)[pos] = SCANENV_MEM_NODES(env)[i];
SCANENV_MEM_NODES 1744 regcomp.c            Node** nodes = SCANENV_MEM_NODES(env);
SCANENV_MEM_NODES 1911 regcomp.c            Node** nodes = SCANENV_MEM_NODES(env);
SCANENV_MEM_NODES 2772 regcomp.c            Node** nodes = SCANENV_MEM_NODES(env);
SCANENV_MEM_NODES 3112 regcomp.c            Node** nodes = SCANENV_MEM_NODES(env);
SCANENV_MEM_NODES 4150 regcomp.c            Node** nodes = SCANENV_MEM_NODES(env->scan_env);
SCANENV_MEM_NODES  951 regparse.c         SCANENV_MEM_NODES(env)[num] = node;
SCANENV_MEM_NODES 1230 regparse.c     	IS_NULL(SCANENV_MEM_NODES(env)[backrefs[i]])) {
SCANENV_MEM_NODES 3093 regparse.c     	  if (num > env->num_mem || IS_NULL(SCANENV_MEM_NODES(env)[num]))
SCANENV_MEM_NODES 3151 regparse.c     		  IS_NULL(SCANENV_MEM_NODES(env)[backs[i]]))


SCAN_DOCSEP

SCAN_DOCSEP       583 ext/syck/emitter.c         flags |= SCAN_DOCSEP;
SCAN_DOCSEP       598 ext/syck/emitter.c                 flags |= SCAN_DOCSEP;
SCAN_DOCSEP       720 ext/syck/emitter.c     } else if ( scan & SCAN_DOCSEP ) {


SCAN_FLOWMAP

SCAN_FLOWMAP      619 ext/syck/emitter.c             flags |= SCAN_FLOWMAP;
SCAN_FLOWMAP      631 ext/syck/emitter.c             flags |= SCAN_FLOWMAP;
SCAN_FLOWMAP      706 ext/syck/emitter.c     } else if ( force_style == scalar_plain && parent->status == syck_lvl_imap && ( scan & SCAN_FLOWMAP ) ) {


SCAN_FLOWSEQ

SCAN_FLOWSEQ      615 ext/syck/emitter.c             flags |= SCAN_FLOWSEQ;
SCAN_FLOWSEQ      632 ext/syck/emitter.c             flags |= SCAN_FLOWSEQ;
SCAN_FLOWSEQ      704 ext/syck/emitter.c     } else if ( force_style == scalar_plain && parent->status == syck_lvl_iseq && ( scan & SCAN_FLOWSEQ ) ) {


SCAN_INDENTED

SCAN_INDENTED     600 ext/syck/emitter.c                 flags |= SCAN_INDENTED;
SCAN_INDENTED     700 ext/syck/emitter.c     } else if ( force_style != scalar_fold && ( scan & SCAN_INDENTED ) ) {


SCAN_INDIC_C

SCAN_INDIC_C      626 ext/syck/emitter.c             flags |= SCAN_INDIC_C;
SCAN_INDIC_C      710 ext/syck/emitter.c     } else if ( force_style == scalar_plain && ( scan & SCAN_INDIC_S || scan & SCAN_INDIC_C ) ) {


SCAN_INDIC_S

SCAN_INDIC_S      559 ext/syck/emitter.c             flags |= SCAN_INDIC_S;
SCAN_INDIC_S      565 ext/syck/emitter.c             flags |= SCAN_INDIC_S;
SCAN_INDIC_S      710 ext/syck/emitter.c     } else if ( force_style == scalar_plain && ( scan & SCAN_INDIC_S || scan & SCAN_INDIC_C ) ) {


SCAN_MANYNL_E

SCAN_MANYNL_E     572 ext/syck/emitter.c         flags |= SCAN_MANYNL_E;
SCAN_MANYNL_E     741 ext/syck/emitter.c     } else if ( scan & SCAN_MANYNL_E ) {


SCAN_NEWLINE

SCAN_NEWLINE      596 ext/syck/emitter.c             flags |= SCAN_NEWLINE;
SCAN_NEWLINE      684 ext/syck/emitter.c         if ( scan & SCAN_NEWLINE ) {
SCAN_NEWLINE      702 ext/syck/emitter.c     } else if ( force_style == scalar_plain && ( scan & SCAN_NEWLINE ) ) {
SCAN_NEWLINE      711 ext/syck/emitter.c         if ( scan & SCAN_NEWLINE ) {


SCAN_NONL_E

SCAN_NONL_E       570 ext/syck/emitter.c         flags |= SCAN_NONL_E;
SCAN_NONL_E       739 ext/syck/emitter.c     if ( scan & SCAN_NONL_E ) {


SCAN_NONPRINT

SCAN_NONPRINT     593 ext/syck/emitter.c             flags |= SCAN_NONPRINT;
SCAN_NONPRINT     696 ext/syck/emitter.c     if ( scan & SCAN_NONPRINT ) {


SCAN_WHITEEDGE

SCAN_WHITEEDGE    578 ext/syck/emitter.c         flags |= SCAN_WHITEEDGE;
SCAN_WHITEEDGE    698 ext/syck/emitter.c     } else if ( scan & SCAN_WHITEEDGE ) {


SCOPE_ALLOCA

SCOPE_ALLOCA     6614 eval.c             if (ruby_scope->flags == SCOPE_ALLOCA && ruby_class == rb_cObject) {
SCOPE_ALLOCA     1198 gc.c                       RANY(obj)->as.scope.flags != SCOPE_ALLOCA) {


SCOPE_DONT_RECYCLE

SCOPE_DONT_RECYCLE  746 eval.c             if (_old && (ruby_scope->flags & SCOPE_DONT_RECYCLE)) {\
SCOPE_DONT_RECYCLE  981 eval.c             if (ruby_scope->flags & SCOPE_DONT_RECYCLE) {\
SCOPE_DONT_RECYCLE  987 eval.c         	if (!(ruby_scope->flags & SCOPE_DONT_RECYCLE) && \
SCOPE_DONT_RECYCLE 1747 eval.c             if (ruby_scope->flags & SCOPE_DONT_RECYCLE)
SCOPE_DONT_RECYCLE 4869 eval.c             if (ruby_scope->flags & SCOPE_DONT_RECYCLE)
SCOPE_DONT_RECYCLE 6170 eval.c         	int dont_recycle = ruby_scope->flags & SCOPE_DONT_RECYCLE;
SCOPE_DONT_RECYCLE 7813 eval.c             scope->flags |= SCOPE_DONT_RECYCLE;
SCOPE_DONT_RECYCLE 10136 eval.c             ruby_scope->flags |= SCOPE_DONT_RECYCLE;


SCOPE_MALLOC

SCOPE_MALLOC      984 eval.c             if (!(ruby_scope->flags & SCOPE_MALLOC)) {\
SCOPE_MALLOC     7814 eval.c             if (scope->flags & SCOPE_MALLOC) return;
SCOPE_MALLOC     7822 eval.c         	scope->flags |= SCOPE_MALLOC;
SCOPE_MALLOC      941 gc.c           	if (obj->as.scope.local_vars && (obj->as.scope.flags & SCOPE_MALLOC)) {
SCOPE_MALLOC     1202 gc.c           	    if (RANY(obj)->as.scope.flags & SCOPE_MALLOC)
SCOPE_MALLOC     8099 parse.y        	    if (i == 0 || (ruby_scope->flags & SCOPE_MALLOC) == 0) {
SCOPE_MALLOC     8111 parse.y        		ruby_scope->flags |= SCOPE_MALLOC;


SCOPE_MODFUNC

SCOPE_MODFUNC     646 eval.c         	    rb_warning((scope_vmode == SCOPE_MODFUNC) ?
SCOPE_MODFUNC    3761 eval.c         	    if (scope_vmode == SCOPE_MODFUNC) {
SCOPE_MODFUNC    7195 eval.c         	SCOPE_SET(SCOPE_MODFUNC);


SCOPE_NOSTACK

SCOPE_NOSTACK     992 eval.c             ruby_scope->flags |= SCOPE_NOSTACK;	\
SCOPE_NOSTACK    1324 eval.c             top_scope->flags &= ~SCOPE_NOSTACK;
SCOPE_NOSTACK    8190 eval.c             if (data->scope->flags & SCOPE_NOSTACK) {


SCOPE_PRIVATE

SCOPE_PRIVATE     644 eval.c         	if (SCOPE_TEST(SCOPE_PRIVATE)) {
SCOPE_PRIVATE    1299 eval.c             SCOPE_SET(SCOPE_PRIVATE);
SCOPE_PRIVATE    1513 eval.c             SCOPE_SET(SCOPE_PRIVATE);
SCOPE_PRIVATE    3746 eval.c         	    if (SCOPE_TEST(SCOPE_PRIVATE) || node->nd_mid == init) {
SCOPE_PRIVATE    6582 eval.c             SCOPE_SET(SCOPE_PRIVATE);
SCOPE_PRIVATE    7079 eval.c         	SCOPE_SET(SCOPE_PRIVATE);
SCOPE_PRIVATE    9347 eval.c             if (SCOPE_TEST(SCOPE_PRIVATE)) {


SCOPE_PROTECTED

SCOPE_PROTECTED   650 eval.c         	else if (SCOPE_TEST(SCOPE_PROTECTED)) {
SCOPE_PROTECTED  3749 eval.c         	    else if (SCOPE_TEST(SCOPE_PROTECTED)) {
SCOPE_PROTECTED  7047 eval.c         	SCOPE_SET(SCOPE_PROTECTED);
SCOPE_PROTECTED  9350 eval.c             else if (SCOPE_TEST(SCOPE_PROTECTED)) {


SCOPE_PUBLIC

SCOPE_PUBLIC      973 eval.c             scope_vmode = SCOPE_PUBLIC
SCOPE_PUBLIC     4678 eval.c             scope_vmode = (flags & YIELD_PUBLIC_DEF) ? SCOPE_PUBLIC : block->vmode;
SCOPE_PUBLIC     6302 eval.c             SCOPE_SET(SCOPE_PUBLIC);
SCOPE_PUBLIC     6950 eval.c         		    SCOPE_SET(SCOPE_PUBLIC);
SCOPE_PUBLIC     7024 eval.c         	SCOPE_SET(SCOPE_PUBLIC);


SCOPE_SET

SCOPE_SET        1299 eval.c             SCOPE_SET(SCOPE_PRIVATE);
SCOPE_SET        1513 eval.c             SCOPE_SET(SCOPE_PRIVATE);
SCOPE_SET        6302 eval.c             SCOPE_SET(SCOPE_PUBLIC);
SCOPE_SET        6309 eval.c             SCOPE_SET(mode);
SCOPE_SET        6582 eval.c             SCOPE_SET(SCOPE_PRIVATE);
SCOPE_SET        6950 eval.c         		    SCOPE_SET(SCOPE_PUBLIC);
SCOPE_SET        6965 eval.c             SCOPE_SET(saved.vmode);
SCOPE_SET        7024 eval.c         	SCOPE_SET(SCOPE_PUBLIC);
SCOPE_SET        7047 eval.c         	SCOPE_SET(SCOPE_PROTECTED);
SCOPE_SET        7079 eval.c         	SCOPE_SET(SCOPE_PRIVATE);
SCOPE_SET        7195 eval.c         	SCOPE_SET(SCOPE_MODFUNC);


SCOPE_TEST

SCOPE_TEST        644 eval.c         	if (SCOPE_TEST(SCOPE_PRIVATE)) {
SCOPE_TEST        650 eval.c         	else if (SCOPE_TEST(SCOPE_PROTECTED)) {
SCOPE_TEST       3746 eval.c         	    if (SCOPE_TEST(SCOPE_PRIVATE) || node->nd_mid == init) {
SCOPE_TEST       3749 eval.c         	    else if (SCOPE_TEST(SCOPE_PROTECTED)) {
SCOPE_TEST       9347 eval.c             if (SCOPE_TEST(SCOPE_PRIVATE)) {
SCOPE_TEST       9350 eval.c             else if (SCOPE_TEST(SCOPE_PROTECTED)) {


SCORE_CP932

SCORE_CP932      1433 ext/nkf/nkf-utf8/nkf.c #define SCORE_NO_EXIST (SCORE_CP932 << 1)    /* $BB8:_$7$J$$J8;z(B */
SCORE_CP932      1597 ext/nkf/nkf-utf8/nkf.c                   set_code_score(ptr, SCORE_CP932);


SCORE_DEPEND

SCORE_DEPEND     1432 ext/nkf/nkf-utf8/nkf.c #define SCORE_CP932    (SCORE_DEPEND << 1)   /* CP932 $B$K$h$kFI$_49$((B */
SCORE_DEPEND     1435 ext/nkf/nkf-utf8/nkf.c #define SCORE_NO_EXIST (SCORE_DEPEND << 1)   /* $BB8:_$7$J$$J8;z(B */
SCORE_DEPEND     1445 ext/nkf/nkf-utf8/nkf.c     0, SCORE_DEPEND, SCORE_DEPEND, SCORE_DEPEND,
SCORE_DEPEND     1446 ext/nkf/nkf-utf8/nkf.c     SCORE_DEPEND, SCORE_DEPEND, SCORE_DEPEND, SCORE_NO_EXIST,
SCORE_DEPEND     1451 ext/nkf/nkf-utf8/nkf.c     SCORE_L2, SCORE_DEPEND, SCORE_NO_EXIST, SCORE_NO_EXIST,
SCORE_DEPEND     1452 ext/nkf/nkf-utf8/nkf.c     SCORE_DEPEND, SCORE_DEPEND, SCORE_DEPEND, SCORE_DEPEND,
SCORE_DEPEND     1453 ext/nkf/nkf-utf8/nkf.c     SCORE_DEPEND, SCORE_NO_EXIST, SCORE_NO_EXIST, SCORE_ERROR,


SCORE_ERROR

SCORE_ERROR      1453 ext/nkf/nkf-utf8/nkf.c     SCORE_DEPEND, SCORE_NO_EXIST, SCORE_NO_EXIST, SCORE_ERROR,
SCORE_ERROR      1482 ext/nkf/nkf-utf8/nkf.c         set_code_score(ptr, SCORE_ERROR);


SCORE_KANA

SCORE_KANA       1430 ext/nkf/nkf-utf8/nkf.c #define SCORE_DEPEND   (SCORE_KANA << 1)     /* $B5!<o0MB8J8;z(B */
SCORE_KANA       1484 ext/nkf/nkf-utf8/nkf.c         set_code_score(ptr, SCORE_KANA);


SCORE_L2

SCORE_L2         1429 ext/nkf/nkf-utf8/nkf.c #define SCORE_KANA     (SCORE_L2 << 1)       /* $B$$$o$f$kH>3Q%+%J(B */
SCORE_L2         1450 ext/nkf/nkf-utf8/nkf.c     SCORE_L2, SCORE_L2, SCORE_L2, SCORE_L2,
SCORE_L2         1451 ext/nkf/nkf-utf8/nkf.c     SCORE_L2, SCORE_DEPEND, SCORE_NO_EXIST, SCORE_NO_EXIST,
SCORE_L2         1494 ext/nkf/nkf-utf8/nkf.c         set_code_score(ptr, SCORE_L2);


SCORE_NO_EXIST

SCORE_NO_EXIST   1437 ext/nkf/nkf-utf8/nkf.c #define SCORE_iMIME    (SCORE_NO_EXIST << 1) /* MIME $B$K$h$k;XDj(B */
SCORE_NO_EXIST   1446 ext/nkf/nkf-utf8/nkf.c     SCORE_DEPEND, SCORE_DEPEND, SCORE_DEPEND, SCORE_NO_EXIST,
SCORE_NO_EXIST   1451 ext/nkf/nkf-utf8/nkf.c     SCORE_L2, SCORE_DEPEND, SCORE_NO_EXIST, SCORE_NO_EXIST,
SCORE_NO_EXIST   1453 ext/nkf/nkf-utf8/nkf.c     SCORE_DEPEND, SCORE_NO_EXIST, SCORE_NO_EXIST, SCORE_ERROR,
SCORE_NO_EXIST   1487 ext/nkf/nkf-utf8/nkf.c         set_code_score(ptr, SCORE_NO_EXIST);


SCORE_iMIME

SCORE_iMIME      1438 ext/nkf/nkf-utf8/nkf.c #define SCORE_ERROR    (SCORE_iMIME << 1) /* $B%(%i!<(B */
SCORE_iMIME      1440 ext/nkf/nkf-utf8/nkf.c #define SCORE_INIT (SCORE_iMIME)
SCORE_iMIME      3682 ext/nkf/nkf-utf8/nkf.c     clr_code_score(find_inputcode_byfunc(mime_priority_func[j]), SCORE_iMIME);


SEEDUPS

SEEDUPS            68 ext/sdbm/_sdbm.c #ifdef SEEDUPS
SEEDUPS           319 ext/sdbm/_sdbm.c #ifdef SEEDUPS
SEEDUPS           734 ext/sdbm/_sdbm.c #ifdef SEEDUPS


SEEK_CUR

SEEK_CUR          253 io.c               r = lseek(fptr->fd, -fptr->rbuf_len, SEEK_CUR);
SEEK_CUR          296 io.c           #define io_tell(fptr) lseek(flush_before_seek(fptr)->fd, 0, SEEK_CUR)
SEEK_CUR          298 io.c           #ifndef SEEK_CUR
SEEK_CUR         1197 io.c           	pos = lseek(fptr->fd, 0, SEEK_CUR);
SEEK_CUR         5538 io.c               rb_define_const(rb_cIO, "SEEK_CUR", INT2FIX(SEEK_CUR));
SEEK_CUR          107 wince/io_wce.c 	case SEEK_CUR: flag = FILE_CURRENT; break;


SEEK_END

SEEK_END          392 ext/sdbm/_sdbm.c 	oldtail = lseek(db->pagf, 0L, SEEK_END);
SEEK_END          395 ext/sdbm/_sdbm.c 		if (lseek(db->pagf, 0L, SEEK_END) < 0 ||
SEEK_END         5539 io.c               rb_define_const(rb_cIO, "SEEK_END", INT2FIX(SEEK_END));
SEEK_END          108 wince/io_wce.c 	case SEEK_END: flag = FILE_END;     break;


SEEK_SET

SEEK_SET          280 ext/sdbm/_sdbm.c 		if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0
SEEK_SET          335 ext/sdbm/_sdbm.c 		if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0
SEEK_SET          405 ext/sdbm/_sdbm.c 			if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0
SEEK_SET          411 ext/sdbm/_sdbm.c 		else if (lseek(db->pagf, OFF_PAG(newp), SEEK_SET) < 0
SEEK_SET          432 ext/sdbm/_sdbm.c 		if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0
SEEK_SET          462 ext/sdbm/_sdbm.c 	if (lseek(db->pagf, OFF_PAG(0), SEEK_SET) < 0
SEEK_SET          515 ext/sdbm/_sdbm.c 		if (lseek(db->pagf, OFF_PAG(pagb), SEEK_SET) < 0
SEEK_SET          540 ext/sdbm/_sdbm.c 		if (lseek(db->dirf, OFF_DIR(dirb), SEEK_SET) < 0
SEEK_SET          563 ext/sdbm/_sdbm.c 		if (lseek(db->dirf, OFF_DIR(dirb), SEEK_SET) < 0
SEEK_SET          576 ext/sdbm/_sdbm.c 	if (lseek(db->dirf, OFF_DIR(dirb), SEEK_SET) < 0
SEEK_SET          605 ext/sdbm/_sdbm.c 			if (lseek(db->pagf, OFF_PAG(db->blkptr), SEEK_SET) < 0)
SEEK_SET          799 io.c               int whence = SEEK_SET;
SEEK_SET          827 io.c               pos = io_seek(fptr, pos, SEEK_SET);
SEEK_SET         2236 io.c               int whence = SEEK_SET;
SEEK_SET         3338 io.c           	    if (io_seek(fptr, pos, SEEK_SET) < 0) {
SEEK_SET         3341 io.c           	    if (io_seek(orig, pos, SEEK_SET) < 0) {
SEEK_SET         3462 io.c               io_seek(fptr, io_tell(orig), SEEK_SET);
SEEK_SET         5034 io.c           	rb_io_seek(arg.io, offset, SEEK_SET);
SEEK_SET         5537 io.c               rb_define_const(rb_cIO, "SEEK_SET", INT2FIX(SEEK_SET));
SEEK_SET           44 missing/flock.c     lock.l_whence = SEEK_SET;
SEEK_SET          106 wince/io_wce.c 	case SEEK_SET: flag = FILE_BEGIN;   break;


SEND

SEND             1980 ext/nkf/nkf-utf8/nkf.c                         SEND;
SEND             1989 ext/nkf/nkf-utf8/nkf.c                     SEND;
SEND             2001 ext/nkf/nkf-utf8/nkf.c 		SEND;
SEND             2004 ext/nkf/nkf-utf8/nkf.c                 SEND;
SEND             2017 ext/nkf/nkf-utf8/nkf.c                         SEND;
SEND             2026 ext/nkf/nkf-utf8/nkf.c 			    SEND;
SEND             2039 ext/nkf/nkf-utf8/nkf.c 				SEND;
SEND             2056 ext/nkf/nkf-utf8/nkf.c                         SEND;
SEND             2064 ext/nkf/nkf-utf8/nkf.c 			    SEND;
SEND             2098 ext/nkf/nkf-utf8/nkf.c                     SEND;
SEND             2185 ext/nkf/nkf-utf8/nkf.c                             SEND;
SEND             2194 ext/nkf/nkf-utf8/nkf.c                        SEND;
SEND             2199 ext/nkf/nkf-utf8/nkf.c                        SEND;
SEND             2204 ext/nkf/nkf-utf8/nkf.c                     SEND;
SEND             2208 ext/nkf/nkf-utf8/nkf.c                 SEND;
SEND             2217 ext/nkf/nkf-utf8/nkf.c 		SEND;
SEND             2234 ext/nkf/nkf-utf8/nkf.c 		SEND;
SEND             2236 ext/nkf/nkf-utf8/nkf.c                 SEND;


SERIALIZE_2BYTE_INT

SERIALIZE_2BYTE_INT  300 regint.h       #define SERIALIZE_SHORT(i,p)   SERIALIZE_2BYTE_INT(i,p)
SERIALIZE_2BYTE_INT  312 regint.h       #define SERIALIZE_INT(i,p)     SERIALIZE_2BYTE_INT(i,p)
SERIALIZE_2BYTE_INT  313 regint.h       #define SERIALIZE_UINT(i,p)    SERIALIZE_2BYTE_INT(i,p)


SERIALIZE_4BYTE_INT

SERIALIZE_4BYTE_INT  303 regint.h       #define SERIALIZE_SHORT(i,p)   SERIALIZE_4BYTE_INT(i,p)
SERIALIZE_4BYTE_INT  317 regint.h       #define SERIALIZE_INT(i,p)     SERIALIZE_4BYTE_INT(i,p)
SERIALIZE_4BYTE_INT  318 regint.h       #define SERIALIZE_UINT(i,p)    SERIALIZE_4BYTE_INT(i,p)


SERIALIZE_8BYTE_INT

SERIALIZE_8BYTE_INT  306 regint.h       #define SERIALIZE_SHORT(i,p)   SERIALIZE_8BYTE_INT(i,p)
SERIALIZE_8BYTE_INT  322 regint.h       #define SERIALIZE_INT(i,p)     SERIALIZE_8BYTE_INT(i,p)
SERIALIZE_8BYTE_INT  323 regint.h       #define SERIALIZE_UINT(i,p)    SERIALIZE_8BYTE_INT(i,p)


SET

SET               240 ext/digest/md5/md5.c     SET(a, b, c, d,  0,  7,  T1);
SET               241 ext/digest/md5/md5.c     SET(d, a, b, c,  1, 12,  T2);
SET               242 ext/digest/md5/md5.c     SET(c, d, a, b,  2, 17,  T3);
SET               243 ext/digest/md5/md5.c     SET(b, c, d, a,  3, 22,  T4);
SET               244 ext/digest/md5/md5.c     SET(a, b, c, d,  4,  7,  T5);
SET               245 ext/digest/md5/md5.c     SET(d, a, b, c,  5, 12,  T6);
SET               246 ext/digest/md5/md5.c     SET(c, d, a, b,  6, 17,  T7);
SET               247 ext/digest/md5/md5.c     SET(b, c, d, a,  7, 22,  T8);
SET               248 ext/digest/md5/md5.c     SET(a, b, c, d,  8,  7,  T9);
SET               249 ext/digest/md5/md5.c     SET(d, a, b, c,  9, 12, T10);
SET               250 ext/digest/md5/md5.c     SET(c, d, a, b, 10, 17, T11);
SET               251 ext/digest/md5/md5.c     SET(b, c, d, a, 11, 22, T12);
SET               252 ext/digest/md5/md5.c     SET(a, b, c, d, 12,  7, T13);
SET               253 ext/digest/md5/md5.c     SET(d, a, b, c, 13, 12, T14);
SET               254 ext/digest/md5/md5.c     SET(c, d, a, b, 14, 17, T15);
SET               255 ext/digest/md5/md5.c     SET(b, c, d, a, 15, 22, T16);
SET               266 ext/digest/md5/md5.c     SET(a, b, c, d,  1,  5, T17);
SET               267 ext/digest/md5/md5.c     SET(d, a, b, c,  6,  9, T18);
SET               268 ext/digest/md5/md5.c     SET(c, d, a, b, 11, 14, T19);
SET               269 ext/digest/md5/md5.c     SET(b, c, d, a,  0, 20, T20);
SET               270 ext/digest/md5/md5.c     SET(a, b, c, d,  5,  5, T21);
SET               271 ext/digest/md5/md5.c     SET(d, a, b, c, 10,  9, T22);
SET               272 ext/digest/md5/md5.c     SET(c, d, a, b, 15, 14, T23);
SET               273 ext/digest/md5/md5.c     SET(b, c, d, a,  4, 20, T24);
SET               274 ext/digest/md5/md5.c     SET(a, b, c, d,  9,  5, T25);
SET               275 ext/digest/md5/md5.c     SET(d, a, b, c, 14,  9, T26);
SET               276 ext/digest/md5/md5.c     SET(c, d, a, b,  3, 14, T27);
SET               277 ext/digest/md5/md5.c     SET(b, c, d, a,  8, 20, T28);
SET               278 ext/digest/md5/md5.c     SET(a, b, c, d, 13,  5, T29);
SET               279 ext/digest/md5/md5.c     SET(d, a, b, c,  2,  9, T30);
SET               280 ext/digest/md5/md5.c     SET(c, d, a, b,  7, 14, T31);
SET               281 ext/digest/md5/md5.c     SET(b, c, d, a, 12, 20, T32);
SET               292 ext/digest/md5/md5.c     SET(a, b, c, d,  5,  4, T33);
SET               293 ext/digest/md5/md5.c     SET(d, a, b, c,  8, 11, T34);
SET               294 ext/digest/md5/md5.c     SET(c, d, a, b, 11, 16, T35);
SET               295 ext/digest/md5/md5.c     SET(b, c, d, a, 14, 23, T36);
SET               296 ext/digest/md5/md5.c     SET(a, b, c, d,  1,  4, T37);
SET               297 ext/digest/md5/md5.c     SET(d, a, b, c,  4, 11, T38);
SET               298 ext/digest/md5/md5.c     SET(c, d, a, b,  7, 16, T39);
SET               299 ext/digest/md5/md5.c     SET(b, c, d, a, 10, 23, T40);
SET               300 ext/digest/md5/md5.c     SET(a, b, c, d, 13,  4, T41);
SET               301 ext/digest/md5/md5.c     SET(d, a, b, c,  0, 11, T42);
SET               302 ext/digest/md5/md5.c     SET(c, d, a, b,  3, 16, T43);
SET               303 ext/digest/md5/md5.c     SET(b, c, d, a,  6, 23, T44);
SET               304 ext/digest/md5/md5.c     SET(a, b, c, d,  9,  4, T45);
SET               305 ext/digest/md5/md5.c     SET(d, a, b, c, 12, 11, T46);
SET               306 ext/digest/md5/md5.c     SET(c, d, a, b, 15, 16, T47);
SET               307 ext/digest/md5/md5.c     SET(b, c, d, a,  2, 23, T48);
SET               318 ext/digest/md5/md5.c     SET(a, b, c, d,  0,  6, T49);
SET               319 ext/digest/md5/md5.c     SET(d, a, b, c,  7, 10, T50);
SET               320 ext/digest/md5/md5.c     SET(c, d, a, b, 14, 15, T51);
SET               321 ext/digest/md5/md5.c     SET(b, c, d, a,  5, 21, T52);
SET               322 ext/digest/md5/md5.c     SET(a, b, c, d, 12,  6, T53);
SET               323 ext/digest/md5/md5.c     SET(d, a, b, c,  3, 10, T54);
SET               324 ext/digest/md5/md5.c     SET(c, d, a, b, 10, 15, T55);
SET               325 ext/digest/md5/md5.c     SET(b, c, d, a,  1, 21, T56);
SET               326 ext/digest/md5/md5.c     SET(a, b, c, d,  8,  6, T57);
SET               327 ext/digest/md5/md5.c     SET(d, a, b, c, 15, 10, T58);
SET               328 ext/digest/md5/md5.c     SET(c, d, a, b,  6, 15, T59);
SET               329 ext/digest/md5/md5.c     SET(b, c, d, a, 13, 21, T60);
SET               330 ext/digest/md5/md5.c     SET(a, b, c, d,  4,  6, T61);
SET               331 ext/digest/md5/md5.c     SET(d, a, b, c, 11, 10, T62);
SET               332 ext/digest/md5/md5.c     SET(c, d, a, b,  2, 15, T63);
SET               333 ext/digest/md5/md5.c     SET(b, c, d, a,  9, 21, T64);


SETUP_ARGS

SETUP_ARGS       3255 eval.c         	    SETUP_ARGS(node->nd_args);
SETUP_ARGS       3273 eval.c         	    SETUP_ARGS(node->nd_args);
SETUP_ARGS       3288 eval.c         	    SETUP_ARGS(node->nd_args);
SETUP_ARGS       3335 eval.c         		SETUP_ARGS(node->nd_args);
SETUP_ARGS       5150 eval.c             SETUP_ARGS(node->nd_args);


SETUP_ARGS0

SETUP_ARGS0      2144 eval.c         #define SETUP_ARGS(anode) SETUP_ARGS0(anode, anode->nd_alen)
SETUP_ARGS0      3392 eval.c         	    SETUP_ARGS0(node->nd_args->nd_next, node->nd_args->nd_alen - 1);


SET_ALL_MULTI_BYTE_RANGE

SET_ALL_MULTI_BYTE_RANGE  119 regparse.c         r = SET_ALL_MULTI_BYTE_RANGE(enc, &(mbuf));\
SET_ALL_MULTI_BYTE_RANGE 1684 regparse.c         return SET_ALL_MULTI_BYTE_RANGE(enc, pbuf);
SET_ALL_MULTI_BYTE_RANGE 1728 regparse.c           return SET_ALL_MULTI_BYTE_RANGE(enc, pbuf);
SET_ALL_MULTI_BYTE_RANGE 1738 regparse.c           return SET_ALL_MULTI_BYTE_RANGE(enc, pbuf);


SET_CURRENT_SOURCE

SET_CURRENT_SOURCE 2565 eval.c             SET_CURRENT_SOURCE();
SET_CURRENT_SOURCE 3016 eval.c         		    SET_CURRENT_SOURCE();
SET_CURRENT_SOURCE 3081 eval.c         	SET_CURRENT_SOURCE();
SET_CURRENT_SOURCE 3259 eval.c         	    SET_CURRENT_SOURCE();
SET_CURRENT_SOURCE 3277 eval.c         	    SET_CURRENT_SOURCE();
SET_CURRENT_SOURCE 3292 eval.c         	    SET_CURRENT_SOURCE();
SET_CURRENT_SOURCE 3298 eval.c         	SET_CURRENT_SOURCE();
SET_CURRENT_SOURCE 3340 eval.c         	    SET_CURRENT_SOURCE();
SET_CURRENT_SOURCE 5079 eval.c         		SET_CURRENT_SOURCE();
SET_CURRENT_SOURCE 5089 eval.c         		SET_CURRENT_SOURCE();


SET_EFFECT_STATUS

SET_EFFECT_STATUS 1839 regcomp.c      	    SET_EFFECT_STATUS(node, NST_MIN_FIXED);
SET_EFFECT_STATUS 1964 regcomp.c      	    SET_EFFECT_STATUS(node, NST_MAX_FIXED);
SET_EFFECT_STATUS 2091 regcomp.c      	    SET_EFFECT_STATUS(node, NST_CLEN_FIXED);
SET_EFFECT_STATUS 2545 regcomp.c            SET_EFFECT_STATUS(node, NST_MARK2);
SET_EFFECT_STATUS 2596 regcomp.c      	SET_EFFECT_STATUS(node, NST_MARK1);
SET_EFFECT_STATUS 2657 regcomp.c            SET_EFFECT_STATUS(node, NST_MARK2);
SET_EFFECT_STATUS 2721 regcomp.c      	  SET_EFFECT_STATUS(node, NST_MARK1);
SET_EFFECT_STATUS 2723 regcomp.c      	  if (r != 0) SET_EFFECT_STATUS(node, NST_RECURSION);
SET_EFFECT_STATUS 2817 regcomp.c      	SET_EFFECT_STATUS(cn->target, NST_CALLED);
SET_EFFECT_STATUS 2927 regcomp.c      	      SET_EFFECT_STATUS(en, NST_STOP_BT_SIMPLE_REPEAT);
SET_EFFECT_STATUS 3119 regcomp.c      	SET_EFFECT_STATUS(nodes[p[i]], NST_MEM_BACKREFED);
SET_EFFECT_STATUS 3236 regcomp.c      		SET_EFFECT_STATUS(node, NST_STOP_BT_SIMPLE_REPEAT);
SET_EFFECT_STATUS 1317 regparse.c         SET_EFFECT_STATUS(node, NST_NAMED_GROUP);


SET_STACK_END

SET_STACK_END     467 gc.c               SET_STACK_END;
SET_STACK_END     479 gc.c               SET_STACK_END;\
SET_STACK_END     486 gc.c               SET_STACK_END;
SET_STACK_END    1269 gc.c               SET_STACK_END;


SHA1HANDSOFF

SHA1HANDSOFF      139 ext/digest/sha1/sha1.c #ifdef SHA1HANDSOFF
SHA1HANDSOFF      146 ext/digest/sha1/sha1.c #ifdef SHA1HANDSOFF


SHA1_CTX

SHA1_CTX          205 ext/digest/sha1/sha1.c     SHA1_CTX *context;
SHA1_CTX          224 ext/digest/sha1/sha1.c     SHA1_CTX *context;
SHA1_CTX          255 ext/digest/sha1/sha1.c     SHA1_CTX* context;
SHA1_CTX          279 ext/digest/sha1/sha1.c int SHA1_Equal(SHA1_CTX* pctx1, SHA1_CTX* pctx2) {
SHA1_CTX           36 ext/digest/sha1/sha1.h void	SHA1_Init _((SHA1_CTX *context));
SHA1_CTX           37 ext/digest/sha1/sha1.h void	SHA1_Update _((SHA1_CTX *context, const uint8_t *data, size_t len));
SHA1_CTX           38 ext/digest/sha1/sha1.h void	SHA1_Final _((uint8_t digest[20], SHA1_CTX *context));
SHA1_CTX           39 ext/digest/sha1/sha1.h int	SHA1_Equal _((SHA1_CTX *pctx1, SHA1_CTX *pctx2));
SHA1_CTX           41 ext/digest/sha1/sha1.h char	*SHA1_End _((SHA1_CTX *, char *));
SHA1_CTX           39 ext/digest/sha1/sha1hl.c     SHA1_CTX *ctx;
SHA1_CTX           68 ext/digest/sha1/sha1hl.c     SHA1_CTX ctx;
SHA1_CTX           94 ext/digest/sha1/sha1hl.c     SHA1_CTX ctx;
SHA1_CTX           13 ext/digest/sha1/sha1init.c     sizeof(SHA1_CTX),
SHA1_CTX           13 ext/digest/sha1/sha1ossl.c SHA1_End(SHA1_CTX *ctx, char *buf)
SHA1_CTX           35 ext/digest/sha1/sha1ossl.c int SHA1_Equal(SHA1_CTX* pctx1, SHA1_CTX* pctx2) {
SHA1_CTX           14 ext/digest/sha1/sha1ossl.h char *SHA1_End(SHA1_CTX *ctx, char *buf);
SHA1_CTX           15 ext/digest/sha1/sha1ossl.h int SHA1_Equal(SHA1_CTX *pctx1, SHA1_CTX *pctx2);


SHA1_DIGEST_LENGTH

SHA1_DIGEST_LENGTH   48 ext/digest/sha1/sha1.h #define SHA1_DIGEST_STRING_LENGTH	(SHA1_DIGEST_LENGTH * 2 + 1)
SHA1_DIGEST_LENGTH   12 ext/digest/sha1/sha1init.c     SHA1_DIGEST_LENGTH,


SHA1_End

SHA1_End           41 ext/digest/sha1/sha1.h char	*SHA1_End _((SHA1_CTX *, char *));
SHA1_End           85 ext/digest/sha1/sha1hl.c     return(num < 0 ? 0 : SHA1_End(&ctx, buf));
SHA1_End          101 ext/digest/sha1/sha1hl.c     return(SHA1_End(&ctx, buf));
SHA1_End           16 ext/digest/sha1/sha1init.c     (hash_end_func_t)SHA1_End,
SHA1_End           14 ext/digest/sha1/sha1ossl.h char *SHA1_End(SHA1_CTX *ctx, char *buf);


SHA1_Equal

SHA1_Equal         39 ext/digest/sha1/sha1.h int	SHA1_Equal _((SHA1_CTX *pctx1, SHA1_CTX *pctx2));
SHA1_Equal         18 ext/digest/sha1/sha1init.c     (hash_equal_func_t)SHA1_Equal,
SHA1_Equal         15 ext/digest/sha1/sha1ossl.h int SHA1_Equal(SHA1_CTX *pctx1, SHA1_CTX *pctx2);


SHA1_Final

SHA1_Final         38 ext/digest/sha1/sha1.h void	SHA1_Final _((uint8_t digest[20], SHA1_CTX *context));
SHA1_Final         53 ext/digest/sha1/sha1hl.c     SHA1_Final(digest,ctx);
SHA1_Final         17 ext/digest/sha1/sha1init.c     (hash_final_func_t)SHA1_Final,
SHA1_Final         26 ext/digest/sha1/sha1ossl.c     SHA1_Final(digest,ctx);


SHA1_Init

SHA1_Init          36 ext/digest/sha1/sha1.h void	SHA1_Init _((SHA1_CTX *context));
SHA1_Init          74 ext/digest/sha1/sha1hl.c     SHA1_Init(&ctx);
SHA1_Init          99 ext/digest/sha1/sha1hl.c     SHA1_Init(&ctx);
SHA1_Init          14 ext/digest/sha1/sha1init.c     (hash_init_func_t)SHA1_Init,


SHA1_Transform

SHA1_Transform    239 ext/digest/sha1/sha1.c 	SHA1_Transform(context->state, context->buffer);
SHA1_Transform    241 ext/digest/sha1/sha1.c 	    SHA1_Transform(context->state, &data[i]);
SHA1_Transform     35 ext/digest/sha1/sha1.h void	SHA1_Transform _((uint32_t state[5], const uint8_t buffer[64]));


SHA1_Update

SHA1_Update       267 ext/digest/sha1/sha1.c     SHA1_Update(context, (const uint8_t *)"\200", 1);
SHA1_Update       269 ext/digest/sha1/sha1.c 	SHA1_Update(context, (const uint8_t *)"\0", 1);
SHA1_Update       270 ext/digest/sha1/sha1.c     SHA1_Update(context, finalcount, 8);  /* Should cause a SHA1_Transform() */
SHA1_Update        37 ext/digest/sha1/sha1.h void	SHA1_Update _((SHA1_CTX *context, const uint8_t *data, size_t len));
SHA1_Update        80 ext/digest/sha1/sha1hl.c 	SHA1_Update(&ctx, buffer, (size_t)num);
SHA1_Update       100 ext/digest/sha1/sha1hl.c     SHA1_Update(&ctx, data, len);
SHA1_Update        15 ext/digest/sha1/sha1init.c     (hash_update_func_t)SHA1_Update,


SHA256_BLOCK_LENGTH

SHA256_BLOCK_LENGTH   79 ext/digest/sha2/sha2.c #define SHA256_SHORT_BLOCK_LENGTH	(SHA256_BLOCK_LENGTH - 8)
SHA256_BLOCK_LENGTH  291 ext/digest/sha2/sha2.c 	MEMSET_BZERO(context->buffer, SHA256_BLOCK_LENGTH);
SHA256_BLOCK_LENGTH  481 ext/digest/sha2/sha2.c 	usedspace = (context->bitcount >> 3) % SHA256_BLOCK_LENGTH;
SHA256_BLOCK_LENGTH  484 ext/digest/sha2/sha2.c 		freespace = SHA256_BLOCK_LENGTH - usedspace;
SHA256_BLOCK_LENGTH  502 ext/digest/sha2/sha2.c 	while (len >= SHA256_BLOCK_LENGTH) {
SHA256_BLOCK_LENGTH  505 ext/digest/sha2/sha2.c 		context->bitcount += SHA256_BLOCK_LENGTH << 3;
SHA256_BLOCK_LENGTH  506 ext/digest/sha2/sha2.c 		len -= SHA256_BLOCK_LENGTH;
SHA256_BLOCK_LENGTH  507 ext/digest/sha2/sha2.c 		data += SHA256_BLOCK_LENGTH;
SHA256_BLOCK_LENGTH  527 ext/digest/sha2/sha2.c 		usedspace = (context->bitcount >> 3) % SHA256_BLOCK_LENGTH;
SHA256_BLOCK_LENGTH  540 ext/digest/sha2/sha2.c 				if (usedspace < SHA256_BLOCK_LENGTH) {
SHA256_BLOCK_LENGTH  541 ext/digest/sha2/sha2.c 					MEMSET_BZERO(&context->buffer[usedspace], SHA256_BLOCK_LENGTH - usedspace);
SHA256_BLOCK_LENGTH   66 ext/digest/sha2/sha2.h 	uint8_t	buffer[SHA256_BLOCK_LENGTH];


SHA256_CTX

SHA256_CTX        179 ext/digest/sha2/sha2.c void SHA256_Transform(SHA256_CTX*, const sha2_word32*);
SHA256_CTX        286 ext/digest/sha2/sha2.c void SHA256_Init(SHA256_CTX* context) {
SHA256_CTX        287 ext/digest/sha2/sha2.c 	if (context == (SHA256_CTX*)0) {
SHA256_CTX        332 ext/digest/sha2/sha2.c void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
SHA256_CTX        390 ext/digest/sha2/sha2.c void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
SHA256_CTX        470 ext/digest/sha2/sha2.c void SHA256_Update(SHA256_CTX* context, const sha2_byte *data, size_t len) {
SHA256_CTX        518 ext/digest/sha2/sha2.c void SHA256_Final(sha2_byte digest[], SHA256_CTX* context) {
SHA256_CTX        577 ext/digest/sha2/sha2.c 	MEMSET_BZERO(context, sizeof(SHA256_CTX));
SHA256_CTX        581 ext/digest/sha2/sha2.c int SHA256_Equal(SHA256_CTX* pctx1, SHA256_CTX* pctx2) {
SHA256_CTX        104 ext/digest/sha2/sha2.h void SHA256_Init _((SHA256_CTX *));
SHA256_CTX        105 ext/digest/sha2/sha2.h void SHA256_Update _((SHA256_CTX*, const uint8_t*, size_t));
SHA256_CTX        106 ext/digest/sha2/sha2.h void SHA256_Final _((uint8_t[SHA256_DIGEST_LENGTH], SHA256_CTX*));
SHA256_CTX        107 ext/digest/sha2/sha2.h char* SHA256_End _((SHA256_CTX*, char[SHA256_DIGEST_STRING_LENGTH]));
SHA256_CTX        110 ext/digest/sha2/sha2.h int SHA256_Equal _((SHA256_CTX*, SHA256_CTX*));
SHA256_CTX         77 ext/digest/sha2/sha2hl.c 	SHA256_CTX      ctx;
SHA256_CTX         99 ext/digest/sha2/sha2hl.c SHA256_End(SHA256_CTX *ctx, char buffer[])
SHA256_CTX        118 ext/digest/sha2/sha2hl.c 		(void) memset(ctx, 0, sizeof(SHA256_CTX));
SHA256_CTX        127 ext/digest/sha2/sha2hl.c 	SHA256_CTX      ctx;


SHA256_DIGEST_LENGTH

SHA256_DIGEST_LENGTH  290 ext/digest/sha2/sha2.c 	MEMCPY_BCOPY(context->state, sha256_initial_hash_value, SHA256_DIGEST_LENGTH);
SHA256_DIGEST_LENGTH  572 ext/digest/sha2/sha2.c 		MEMCPY_BCOPY(d, context->state, SHA256_DIGEST_LENGTH);
SHA256_DIGEST_LENGTH   52 ext/digest/sha2/sha2.h #define SHA256_DIGEST_STRING_LENGTH	(SHA256_DIGEST_LENGTH * 2 + 1)
SHA256_DIGEST_LENGTH  106 ext/digest/sha2/sha2.h void SHA256_Final _((uint8_t[SHA256_DIGEST_LENGTH], SHA256_CTX*));
SHA256_DIGEST_LENGTH  101 ext/digest/sha2/sha2hl.c 	uint8_t         digest[SHA256_DIGEST_LENGTH], *d = digest;
SHA256_DIGEST_LENGTH  111 ext/digest/sha2/sha2hl.c 		for (i = 0; i < SHA256_DIGEST_LENGTH; i++) {
SHA256_DIGEST_LENGTH  120 ext/digest/sha2/sha2hl.c 	(void) memset(digest, 0, SHA256_DIGEST_LENGTH);


SHA256_DIGEST_STRING_LENGTH

SHA256_DIGEST_STRING_LENGTH  107 ext/digest/sha2/sha2.h char* SHA256_End _((SHA256_CTX*, char[SHA256_DIGEST_STRING_LENGTH]));
SHA256_DIGEST_STRING_LENGTH  108 ext/digest/sha2/sha2.h char* SHA256_Data _((const uint8_t*, size_t, char[SHA256_DIGEST_STRING_LENGTH]));


SHA256_End

SHA256_End        107 ext/digest/sha2/sha2.h char* SHA256_End _((SHA256_CTX*, char[SHA256_DIGEST_STRING_LENGTH]));
SHA256_End         94 ext/digest/sha2/sha2hl.c 	return (num < 0 ? 0 : SHA256_End(&ctx, buf));
SHA256_End        131 ext/digest/sha2/sha2hl.c 	return SHA256_End(&ctx, digest);


SHA256_Final

SHA256_Final      106 ext/digest/sha2/sha2.h void SHA256_Final _((uint8_t[SHA256_DIGEST_LENGTH], SHA256_CTX*));
SHA256_Final      109 ext/digest/sha2/sha2hl.c 		SHA256_Final(digest, ctx);


SHA256_Init

SHA256_Init       104 ext/digest/sha2/sha2.h void SHA256_Init _((SHA256_CTX *));
SHA256_Init        83 ext/digest/sha2/sha2hl.c 	SHA256_Init(&ctx);
SHA256_Init       129 ext/digest/sha2/sha2hl.c 	SHA256_Init(&ctx);


SHA256_SHORT_BLOCK_LENGTH

SHA256_SHORT_BLOCK_LENGTH  536 ext/digest/sha2/sha2.c 			if (usedspace <= SHA256_SHORT_BLOCK_LENGTH) {
SHA256_SHORT_BLOCK_LENGTH  538 ext/digest/sha2/sha2.c 				MEMSET_BZERO(&context->buffer[usedspace], SHA256_SHORT_BLOCK_LENGTH - usedspace);
SHA256_SHORT_BLOCK_LENGTH  547 ext/digest/sha2/sha2.c 				MEMSET_BZERO(context->buffer, SHA256_SHORT_BLOCK_LENGTH);
SHA256_SHORT_BLOCK_LENGTH  551 ext/digest/sha2/sha2.c 			MEMSET_BZERO(context->buffer, SHA256_SHORT_BLOCK_LENGTH);
SHA256_SHORT_BLOCK_LENGTH  557 ext/digest/sha2/sha2.c 		*(sha2_word64*)&context->buffer[SHA256_SHORT_BLOCK_LENGTH] = context->bitcount;


SHA256_Transform

SHA256_Transform  179 ext/digest/sha2/sha2.c void SHA256_Transform(SHA256_CTX*, const sha2_word32*);
SHA256_Transform  492 ext/digest/sha2/sha2.c 			SHA256_Transform(context, (sha2_word32*)context->buffer);
SHA256_Transform  504 ext/digest/sha2/sha2.c 		SHA256_Transform(context, (const sha2_word32*)data);
SHA256_Transform  544 ext/digest/sha2/sha2.c 				SHA256_Transform(context, (sha2_word32*)context->buffer);
SHA256_Transform  560 ext/digest/sha2/sha2.c 		SHA256_Transform(context, (sha2_word32*)context->buffer);


SHA256_Update

SHA256_Update     105 ext/digest/sha2/sha2.h void SHA256_Update _((SHA256_CTX*, const uint8_t*, size_t));
SHA256_Update      89 ext/digest/sha2/sha2hl.c 		SHA256_Update(&ctx, buffer, (size_t) num);
SHA256_Update     130 ext/digest/sha2/sha2hl.c 	SHA256_Update(&ctx, data, len);


SHA2_USE_MEMSET_MEMCPY

SHA2_USE_MEMSET_MEMCPY  122 ext/digest/sha2/sha2.c #if !defined(SHA2_USE_MEMSET_MEMCPY) && !defined(SHA2_USE_BZERO_BCOPY)
SHA2_USE_MEMSET_MEMCPY  126 ext/digest/sha2/sha2.c #if defined(SHA2_USE_MEMSET_MEMCPY) && defined(SHA2_USE_BZERO_BCOPY)
SHA2_USE_MEMSET_MEMCPY  131 ext/digest/sha2/sha2.c #ifdef SHA2_USE_MEMSET_MEMCPY


SHA384_BLOCK_LENGTH

SHA384_BLOCK_LENGTH   80 ext/digest/sha2/sha2.c #define SHA384_SHORT_BLOCK_LENGTH	(SHA384_BLOCK_LENGTH - 16)
SHA384_BLOCK_LENGTH  896 ext/digest/sha2/sha2.c 	MEMSET_BZERO(context->buffer, SHA384_BLOCK_LENGTH);


SHA384_CTX

SHA384_CTX        891 ext/digest/sha2/sha2.c void SHA384_Init(SHA384_CTX* context) {
SHA384_CTX        892 ext/digest/sha2/sha2.c 	if (context == (SHA384_CTX*)0) {
SHA384_CTX        900 ext/digest/sha2/sha2.c void SHA384_Update(SHA384_CTX* context, const sha2_byte* data, size_t len) {
SHA384_CTX        904 ext/digest/sha2/sha2.c void SHA384_Final(sha2_byte digest[], SHA384_CTX* context) {
SHA384_CTX        930 ext/digest/sha2/sha2.c 	MEMSET_BZERO(context, sizeof(SHA384_CTX));
SHA384_CTX        933 ext/digest/sha2/sha2.c int SHA384_Equal(SHA384_CTX* pctx1, SHA384_CTX* pctx2) {
SHA384_CTX        112 ext/digest/sha2/sha2.h void SHA384_Init _((SHA384_CTX*));
SHA384_CTX        113 ext/digest/sha2/sha2.h void SHA384_Update _((SHA384_CTX*, const uint8_t*, size_t));
SHA384_CTX        114 ext/digest/sha2/sha2.h void SHA384_Final _((uint8_t[SHA384_DIGEST_LENGTH], SHA384_CTX*));
SHA384_CTX        115 ext/digest/sha2/sha2.h char* SHA384_End _((SHA384_CTX*, char[SHA384_DIGEST_STRING_LENGTH]));
SHA384_CTX        118 ext/digest/sha2/sha2.h int SHA384_Equal _((SHA384_CTX*, SHA384_CTX*));
SHA384_CTX        137 ext/digest/sha2/sha2hl.c 	SHA384_CTX      ctx;
SHA384_CTX        159 ext/digest/sha2/sha2hl.c SHA384_End(SHA384_CTX * ctx, char buffer[])
SHA384_CTX        178 ext/digest/sha2/sha2hl.c 		(void) memset(ctx, 0, sizeof(SHA384_CTX));
SHA384_CTX        187 ext/digest/sha2/sha2hl.c 	SHA384_CTX      ctx;


SHA384_DIGEST_LENGTH

SHA384_DIGEST_LENGTH  925 ext/digest/sha2/sha2.c 		MEMCPY_BCOPY(d, context->state, SHA384_DIGEST_LENGTH);
SHA384_DIGEST_LENGTH   55 ext/digest/sha2/sha2.h #define SHA384_DIGEST_STRING_LENGTH	(SHA384_DIGEST_LENGTH * 2 + 1)
SHA384_DIGEST_LENGTH  114 ext/digest/sha2/sha2.h void SHA384_Final _((uint8_t[SHA384_DIGEST_LENGTH], SHA384_CTX*));
SHA384_DIGEST_LENGTH  161 ext/digest/sha2/sha2hl.c 	uint8_t         digest[SHA384_DIGEST_LENGTH], *d = digest;
SHA384_DIGEST_LENGTH  171 ext/digest/sha2/sha2hl.c 		for (i = 0; i < SHA384_DIGEST_LENGTH; i++) {
SHA384_DIGEST_LENGTH  180 ext/digest/sha2/sha2hl.c 	(void) memset(digest, 0, SHA384_DIGEST_LENGTH);


SHA384_DIGEST_STRING_LENGTH

SHA384_DIGEST_STRING_LENGTH  115 ext/digest/sha2/sha2.h char* SHA384_End _((SHA384_CTX*, char[SHA384_DIGEST_STRING_LENGTH]));
SHA384_DIGEST_STRING_LENGTH  116 ext/digest/sha2/sha2.h char* SHA384_Data _((const uint8_t*, size_t, char[SHA384_DIGEST_STRING_LENGTH]));


SHA384_End

SHA384_End        115 ext/digest/sha2/sha2.h char* SHA384_End _((SHA384_CTX*, char[SHA384_DIGEST_STRING_LENGTH]));
SHA384_End        155 ext/digest/sha2/sha2hl.c 	return (num < 0 ? 0 : SHA384_End(&ctx, buf));
SHA384_End        191 ext/digest/sha2/sha2hl.c 	return SHA384_End(&ctx, digest);


SHA384_Final

SHA384_Final      114 ext/digest/sha2/sha2.h void SHA384_Final _((uint8_t[SHA384_DIGEST_LENGTH], SHA384_CTX*));
SHA384_Final      169 ext/digest/sha2/sha2hl.c 		SHA384_Final(digest, ctx);


SHA384_Init

SHA384_Init       112 ext/digest/sha2/sha2.h void SHA384_Init _((SHA384_CTX*));
SHA384_Init       144 ext/digest/sha2/sha2hl.c 	SHA384_Init(&ctx);
SHA384_Init       189 ext/digest/sha2/sha2hl.c 	SHA384_Init(&ctx);


SHA384_Update

SHA384_Update     113 ext/digest/sha2/sha2.h void SHA384_Update _((SHA384_CTX*, const uint8_t*, size_t));
SHA384_Update     150 ext/digest/sha2/sha2hl.c 		SHA384_Update(&ctx, buffer, (size_t) num);
SHA384_Update     190 ext/digest/sha2/sha2hl.c 	SHA384_Update(&ctx, data, len);


SHA512_BLOCK_LENGTH

SHA512_BLOCK_LENGTH   81 ext/digest/sha2/sha2.c #define SHA512_SHORT_BLOCK_LENGTH	(SHA512_BLOCK_LENGTH - 16)
SHA512_BLOCK_LENGTH  593 ext/digest/sha2/sha2.c 	MEMSET_BZERO(context->buffer, SHA512_BLOCK_LENGTH);
SHA512_BLOCK_LENGTH  777 ext/digest/sha2/sha2.c 	usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH;
SHA512_BLOCK_LENGTH  780 ext/digest/sha2/sha2.c 		freespace = SHA512_BLOCK_LENGTH - usedspace;
SHA512_BLOCK_LENGTH  798 ext/digest/sha2/sha2.c 	while (len >= SHA512_BLOCK_LENGTH) {
SHA512_BLOCK_LENGTH  801 ext/digest/sha2/sha2.c 		ADDINC128(context->bitcount, SHA512_BLOCK_LENGTH << 3);
SHA512_BLOCK_LENGTH  802 ext/digest/sha2/sha2.c 		len -= SHA512_BLOCK_LENGTH;
SHA512_BLOCK_LENGTH  803 ext/digest/sha2/sha2.c 		data += SHA512_BLOCK_LENGTH;
SHA512_BLOCK_LENGTH  817 ext/digest/sha2/sha2.c 	usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH;
SHA512_BLOCK_LENGTH  831 ext/digest/sha2/sha2.c 			if (usedspace < SHA512_BLOCK_LENGTH) {
SHA512_BLOCK_LENGTH  832 ext/digest/sha2/sha2.c 				MEMSET_BZERO(&context->buffer[usedspace], SHA512_BLOCK_LENGTH - usedspace);
SHA512_BLOCK_LENGTH  838 ext/digest/sha2/sha2.c 			MEMSET_BZERO(context->buffer, SHA512_BLOCK_LENGTH - 2);
SHA512_BLOCK_LENGTH   71 ext/digest/sha2/sha2.h 	uint8_t	buffer[SHA512_BLOCK_LENGTH];


SHA512_CTX

SHA512_CTX        178 ext/digest/sha2/sha2.c void SHA512_Last(SHA512_CTX*);
SHA512_CTX        180 ext/digest/sha2/sha2.c void SHA512_Transform(SHA512_CTX*, const sha2_word64*);
SHA512_CTX        588 ext/digest/sha2/sha2.c void SHA512_Init(SHA512_CTX* context) {
SHA512_CTX        589 ext/digest/sha2/sha2.c 	if (context == (SHA512_CTX*)0) {
SHA512_CTX        633 ext/digest/sha2/sha2.c void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
SHA512_CTX        688 ext/digest/sha2/sha2.c void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
SHA512_CTX        766 ext/digest/sha2/sha2.c void SHA512_Update(SHA512_CTX* context, const sha2_byte *data, size_t len) {
SHA512_CTX        814 ext/digest/sha2/sha2.c void SHA512_Last(SHA512_CTX* context) {
SHA512_CTX        855 ext/digest/sha2/sha2.c void SHA512_Final(sha2_byte digest[], SHA512_CTX* context) {
SHA512_CTX        881 ext/digest/sha2/sha2.c 	MEMSET_BZERO(context, sizeof(SHA512_CTX));
SHA512_CTX        884 ext/digest/sha2/sha2.c int SHA512_Equal(SHA512_CTX* pctx1, SHA512_CTX* pctx2) {
SHA512_CTX        901 ext/digest/sha2/sha2.c 	SHA512_Update((SHA512_CTX*)context, data, len);
SHA512_CTX        912 ext/digest/sha2/sha2.c 		SHA512_Last((SHA512_CTX*)context);
SHA512_CTX         74 ext/digest/sha2/sha2.h typedef SHA512_CTX SHA384_CTX;
SHA512_CTX        120 ext/digest/sha2/sha2.h void SHA512_Init _((SHA512_CTX*));
SHA512_CTX        121 ext/digest/sha2/sha2.h void SHA512_Update _((SHA512_CTX*, const uint8_t*, size_t));
SHA512_CTX        122 ext/digest/sha2/sha2.h void SHA512_Final _((uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*));
SHA512_CTX        123 ext/digest/sha2/sha2.h char* SHA512_End _((SHA512_CTX*, char[SHA512_DIGEST_STRING_LENGTH]));
SHA512_CTX        126 ext/digest/sha2/sha2.h int SHA512_Equal _((SHA512_CTX*, SHA512_CTX*));
SHA512_CTX        197 ext/digest/sha2/sha2hl.c 	SHA512_CTX      ctx;
SHA512_CTX        219 ext/digest/sha2/sha2hl.c SHA512_End(SHA512_CTX * ctx, char buffer[])
SHA512_CTX        238 ext/digest/sha2/sha2hl.c 		(void) memset(ctx, 0, sizeof(SHA512_CTX));
SHA512_CTX        247 ext/digest/sha2/sha2hl.c 	SHA512_CTX      ctx;


SHA512_DIGEST_LENGTH

SHA512_DIGEST_LENGTH  592 ext/digest/sha2/sha2.c 	MEMCPY_BCOPY(context->state, sha512_initial_hash_value, SHA512_DIGEST_LENGTH);
SHA512_DIGEST_LENGTH  876 ext/digest/sha2/sha2.c 		MEMCPY_BCOPY(d, context->state, SHA512_DIGEST_LENGTH);
SHA512_DIGEST_LENGTH  895 ext/digest/sha2/sha2.c 	MEMCPY_BCOPY(context->state, sha384_initial_hash_value, SHA512_DIGEST_LENGTH);
SHA512_DIGEST_LENGTH   58 ext/digest/sha2/sha2.h #define SHA512_DIGEST_STRING_LENGTH	(SHA512_DIGEST_LENGTH * 2 + 1)
SHA512_DIGEST_LENGTH  122 ext/digest/sha2/sha2.h void SHA512_Final _((uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*));
SHA512_DIGEST_LENGTH  221 ext/digest/sha2/sha2hl.c 	uint8_t         digest[SHA512_DIGEST_LENGTH], *d = digest;
SHA512_DIGEST_LENGTH  231 ext/digest/sha2/sha2hl.c 		for (i = 0; i < SHA512_DIGEST_LENGTH; i++) {
SHA512_DIGEST_LENGTH  240 ext/digest/sha2/sha2hl.c 	(void) memset(digest, 0, SHA512_DIGEST_LENGTH);


SHA512_DIGEST_STRING_LENGTH

SHA512_DIGEST_STRING_LENGTH  123 ext/digest/sha2/sha2.h char* SHA512_End _((SHA512_CTX*, char[SHA512_DIGEST_STRING_LENGTH]));
SHA512_DIGEST_STRING_LENGTH  124 ext/digest/sha2/sha2.h char* SHA512_Data _((const uint8_t*, size_t, char[SHA512_DIGEST_STRING_LENGTH]));


SHA512_End

SHA512_End        123 ext/digest/sha2/sha2.h char* SHA512_End _((SHA512_CTX*, char[SHA512_DIGEST_STRING_LENGTH]));
SHA512_End        215 ext/digest/sha2/sha2hl.c 	return (num < 0 ? 0 : SHA512_End(&ctx, buf));
SHA512_End        251 ext/digest/sha2/sha2hl.c 	return SHA512_End(&ctx, digest);


SHA512_Final

SHA512_Final      122 ext/digest/sha2/sha2.h void SHA512_Final _((uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*));
SHA512_Final      229 ext/digest/sha2/sha2hl.c 		SHA512_Final(digest, ctx);


SHA512_Init

SHA512_Init       120 ext/digest/sha2/sha2.h void SHA512_Init _((SHA512_CTX*));
SHA512_Init       204 ext/digest/sha2/sha2hl.c 	SHA512_Init(&ctx);
SHA512_Init       249 ext/digest/sha2/sha2hl.c 	SHA512_Init(&ctx);


SHA512_Last

SHA512_Last       178 ext/digest/sha2/sha2.c void SHA512_Last(SHA512_CTX*);
SHA512_Last       863 ext/digest/sha2/sha2.c 		SHA512_Last(context);
SHA512_Last       912 ext/digest/sha2/sha2.c 		SHA512_Last((SHA512_CTX*)context);


SHA512_SHORT_BLOCK_LENGTH

SHA512_SHORT_BLOCK_LENGTH  827 ext/digest/sha2/sha2.c 		if (usedspace <= SHA512_SHORT_BLOCK_LENGTH) {
SHA512_SHORT_BLOCK_LENGTH  829 ext/digest/sha2/sha2.c 			MEMSET_BZERO(&context->buffer[usedspace], SHA512_SHORT_BLOCK_LENGTH - usedspace);
SHA512_SHORT_BLOCK_LENGTH  842 ext/digest/sha2/sha2.c 		MEMSET_BZERO(context->buffer, SHA512_SHORT_BLOCK_LENGTH);
SHA512_SHORT_BLOCK_LENGTH  848 ext/digest/sha2/sha2.c 	*(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH] = context->bitcount[1];
SHA512_SHORT_BLOCK_LENGTH  849 ext/digest/sha2/sha2.c 	*(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH+8] = context->bitcount[0];


SHA512_Transform

SHA512_Transform  180 ext/digest/sha2/sha2.c void SHA512_Transform(SHA512_CTX*, const sha2_word64*);
SHA512_Transform  788 ext/digest/sha2/sha2.c 			SHA512_Transform(context, (const sha2_word64*)context->buffer);
SHA512_Transform  800 ext/digest/sha2/sha2.c 		SHA512_Transform(context, (const sha2_word64*)data);
SHA512_Transform  835 ext/digest/sha2/sha2.c 			SHA512_Transform(context, (const sha2_word64*)context->buffer);
SHA512_Transform  852 ext/digest/sha2/sha2.c 	SHA512_Transform(context, (const sha2_word64*)context->buffer);


SHA512_Update

SHA512_Update     901 ext/digest/sha2/sha2.c 	SHA512_Update((SHA512_CTX*)context, data, len);
SHA512_Update     121 ext/digest/sha2/sha2.h void SHA512_Update _((SHA512_CTX*, const uint8_t*, size_t));
SHA512_Update     210 ext/digest/sha2/sha2hl.c 		SHA512_Update(&ctx, buffer, (size_t) num);
SHA512_Update     250 ext/digest/sha2/sha2hl.c 	SHA512_Update(&ctx, data, len);


SHIFT

SHIFT             514 ext/racc/cparse/cparse.c             SHIFT(v, act, v->t, val);
SHIFT             622 ext/racc/cparse/cparse.c         SHIFT(v, act, ERROR_TOKEN, val);


SHIFTJIS_CP932

SHIFTJIS_CP932    464 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932    985 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932   1063 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932   1073 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932   1082 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932   1431 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932   1567 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932   1593 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932   2391 ext/nkf/nkf-utf8/nkf.c #if defined(SHIFTJIS_CP932) || defined(X0212_ENABLE)
SHIFTJIS_CP932   2394 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932   2471 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932   2883 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932   3020 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932   4778 ext/nkf/nkf-utf8/nkf.c #ifdef SHIFTJIS_CP932
SHIFTJIS_CP932   7227 ext/nkf/nkf-utf8/utf8tbl.c #ifdef SHIFTJIS_CP932


SHIFT_JIS

SHIFT_JIS        2998 ext/nkf/nkf-utf8/nkf.c 	output_mode = SHIFT_JIS;
SHIFT_JIS        3005 ext/nkf/nkf-utf8/nkf.c 	output_mode = SHIFT_JIS;
SHIFT_JIS        3017 ext/nkf/nkf-utf8/nkf.c 	output_mode = SHIFT_JIS;
SHIFT_JIS        3590 ext/nkf/nkf-utf8/nkf.c     JAPANESE_EUC, SHIFT_JIS,ISO8859_1, ISO8859_1, X0208, X0201,


SHORTDN

SHORTDN            41 marshal.c      	num = SHORTDN(num);
SHORTDN           527 marshal.c      			num = SHORTDN(num);


SHORTINT

SHORTINT          553 missing/vsnprintf.c 	    flags&SHORTINT ? (long)(short)va_arg(ap, int) : \
SHORTINT          557 missing/vsnprintf.c 	    flags&SHORTINT ? (u_long)(u_short)va_arg(ap, int) : \
SHORTINT          658 missing/vsnprintf.c 			flags |= SHORTINT;
SHORTINT          767 missing/vsnprintf.c 			else if (flags & SHORTINT)


SHUT_RD

SHUT_RD          2157 io.c           #ifndef SHUT_RD
SHUT_RD          2160 io.c                   if (shutdown(fptr->fd, SHUT_RD) < 0)


SHUT_WR

SHUT_WR          2202 io.c           #ifndef SHUT_WR
SHUT_WR          2205 io.c                   if (shutdown(fptr->fd, SHUT_WR) < 0)


SIGABRT

SIGABRT            53 signal.c       #ifdef SIGABRT
SIGABRT            54 signal.c           {"ABRT", SIGABRT},


SIGBUS

SIGBUS             65 signal.c       #ifdef SIGBUS
SIGBUS             66 signal.c           {"BUS", SIGBUS},
SIGBUS            477 signal.c       #ifdef SIGBUS
SIGBUS            661 signal.c       #ifdef SIGBUS
SIGBUS            662 signal.c       	  case SIGBUS:
SIGBUS            946 signal.c       #ifdef SIGBUS
SIGBUS            948 signal.c           install_sighandler(SIGBUS, sigbus);


SIGCHLD

SIGCHLD           352 ext/pty/pty.c  	s = signal(SIGCHLD, SIG_DFL);
SIGCHLD           354 ext/pty/pty.c  	    signal(SIGCHLD, s);
SIGCHLD            95 signal.c       #ifdef SIGCHLD
SIGCHLD            96 signal.c           {"CHLD", SIGCHLD},
SIGCHLD           101 signal.c       # ifdef SIGCHLD
SIGCHLD           102 signal.c           {"CLD", SIGCHLD},
SIGCHLD           338 signal.c           if (signum == SIGCHLD && handler == SIG_IGN)
SIGCHLD           963 signal.c       #ifdef SIGCHLD
SIGCHLD           964 signal.c           init_sigchld(SIGCHLD);


SIGFPE

SIGFPE             59 signal.c       #ifdef SIGFPE
SIGFPE             60 signal.c           {"FPE", SIGFPE},


SIGHUP

SIGHUP           1491 process.c      #ifdef SIGHUP
SIGHUP           1502 process.c      #ifdef SIGHUP
SIGHUP           1503 process.c      	hfunc = signal(SIGHUP, SIG_IGN);
SIGHUP           1518 process.c      #ifdef SIGHUP
SIGHUP           1519 process.c      	signal(SIGHUP, hfunc);
SIGHUP             37 signal.c       #ifdef SIGHUP
SIGHUP             38 signal.c           {"HUP", SIGHUP},
SIGHUP            391 signal.c       #ifdef SIGHUP
SIGHUP            392 signal.c       	  case SIGHUP:
SIGHUP            644 signal.c       #ifdef SIGHUP
SIGHUP            645 signal.c       	  case SIGHUP:
SIGHUP            930 signal.c       #ifdef SIGHUP
SIGHUP            931 signal.c           install_sighandler(SIGHUP, sighandler);


SIGILL

SIGILL             44 signal.c       #ifdef SIGILL
SIGILL             45 signal.c           {"ILL", SIGILL},


SIGINT

SIGINT           1454 eval.c             signal(SIGINT, SIG_DFL);
SIGINT           1508 process.c      	ifunc = signal(SIGINT, SIG_IGN);
SIGINT           1524 process.c      	signal(SIGINT, ifunc);
SIGINT             40 signal.c           {"INT", SIGINT},
SIGINT            388 signal.c       	  case SIGINT:
SIGINT            643 signal.c       	  case SIGINT:
SIGINT            929 signal.c           install_sighandler(SIGINT, sighandler);
SIGINT           2982 win32/win32.c        case SIGINT:
SIGINT            323 win32/win32.h  #ifndef SIGINT


SIGKILL

SIGKILL            62 signal.c       #ifdef SIGKILL
SIGKILL            63 signal.c           {"KILL", SIGKILL},
SIGKILL          2954 win32/win32.c  	(sig != 0 && sig != SIGKILL)) {
SIGKILL          2994 win32/win32.c        case SIGKILL:
SIGKILL           326 win32/win32.h  #ifndef SIGKILL


SIGN_EXTEND_CHAR

SIGN_EXTEND_CHAR  784 marshal.c          int c = SIGN_EXTEND_CHAR(r_byte(arg));
SIGN_EXTEND_CHAR 4495 parse.y        #define is_identchar(c) (SIGN_EXTEND_CHAR(c)!=-1&&(ISALNUM(c) || (c) == '_' || ismbchar(c)))


SIGPIPE

SIGPIPE            74 signal.c       #ifdef SIGPIPE
SIGPIPE            75 signal.c           {"PIPE", SIGPIPE},
SIGPIPE           507 signal.c       #ifdef SIGPIPE
SIGPIPE           671 signal.c       #ifdef SIGPIPE
SIGPIPE           672 signal.c       	  case SIGPIPE:
SIGPIPE           956 signal.c       #ifdef SIGPIPE
SIGPIPE           957 signal.c           install_sighandler(SIGPIPE, sigpipe);


SIGQUIT

SIGQUIT          1494 process.c      #ifdef SIGQUIT
SIGQUIT          1505 process.c      #ifdef SIGQUIT
SIGQUIT          1506 process.c      	qfunc = signal(SIGQUIT, SIG_IGN);
SIGQUIT          1521 process.c      #ifdef SIGQUIT
SIGQUIT          1522 process.c      	signal(SIGQUIT, qfunc);
SIGQUIT            41 signal.c       #ifdef SIGQUIT
SIGQUIT            42 signal.c           {"QUIT", SIGQUIT},
SIGQUIT           394 signal.c       #ifdef SIGQUIT
SIGQUIT           395 signal.c       	  case SIGQUIT:
SIGQUIT           647 signal.c       #ifdef SIGQUIT
SIGQUIT           648 signal.c       	  case SIGQUIT:
SIGQUIT           933 signal.c       #ifdef SIGQUIT
SIGQUIT           934 signal.c           install_sighandler(SIGQUIT, sighandler);


SIGSEGV

SIGSEGV            68 signal.c       #ifdef SIGSEGV
SIGSEGV            69 signal.c           {"SEGV", SIGSEGV},
SIGSEGV           492 signal.c       #ifdef SIGSEGV
SIGSEGV           666 signal.c       #ifdef SIGSEGV
SIGSEGV           667 signal.c       	  case SIGSEGV:
SIGSEGV           951 signal.c       #ifdef SIGSEGV
SIGSEGV           953 signal.c           install_sighandler(SIGSEGV, sigsegv);


SIGTERM

SIGTERM            80 signal.c       #ifdef SIGTERM
SIGTERM            81 signal.c           {"TERM", SIGTERM},


SIGTSTP

SIGTSTP            89 signal.c       #ifdef SIGTSTP
SIGTSTP            90 signal.c           {"TSTP", SIGTSTP},


SIGUSR1

SIGUSR1           129 signal.c       #ifdef SIGUSR1
SIGUSR1           130 signal.c           {"USR1", SIGUSR1},
SIGUSR1           400 signal.c       #ifdef SIGUSR1
SIGUSR1           401 signal.c       	  case SIGUSR1:
SIGUSR1           653 signal.c       #ifdef SIGUSR1
SIGUSR1           654 signal.c       	  case SIGUSR1:
SIGUSR1           939 signal.c       #ifdef SIGUSR1
SIGUSR1           940 signal.c           install_sighandler(SIGUSR1, sighandler);


SIGUSR2

SIGUSR2           132 signal.c       #ifdef SIGUSR2
SIGUSR2           133 signal.c           {"USR2", SIGUSR2},
SIGUSR2           403 signal.c       #ifdef SIGUSR2
SIGUSR2           404 signal.c       	  case SIGUSR2:
SIGUSR2           656 signal.c       #ifdef SIGUSR2
SIGUSR2           657 signal.c       	  case SIGUSR2:
SIGUSR2           942 signal.c       #ifdef SIGUSR2
SIGUSR2           943 signal.c           install_sighandler(SIGUSR2, sighandler);


SIG_BLOCK

SIG_BLOCK         430 signal.c           sigprocmask(SIG_BLOCK, &mask, &old_mask);
SIG_BLOCK         779 signal.c           sigprocmask(SIG_BLOCK, &arg.mask, &arg.mask);
SIG_BLOCK         857 signal.c           sigprocmask(SIG_BLOCK, &mask, &mask);


SIG_DFL

SIG_DFL          1454 eval.c             signal(SIGINT, SIG_DFL);
SIG_DFL           352 ext/pty/pty.c  	s = signal(SIGCHLD, SIG_DFL);
SIG_DFL           586 signal.c       		    func = SIG_DFL;
SIG_DFL           589 signal.c       		    func = SIG_DFL;
SIG_DFL           605 signal.c           if (func == SIG_IGN || func == SIG_DFL) {
SIG_DFL           641 signal.c           if (func == SIG_DFL) {
SIG_DFL           817 signal.c           if (old != SIG_DFL) {
SIG_DFL           831 signal.c           if (old != SIG_DFL) {
SIG_DFL           863 signal.c           oldfunc = ruby_signal(sig, SIG_DFL);
SIG_DFL           864 signal.c           if (oldfunc != SIG_DFL && oldfunc != SIG_IGN) {


SIG_IGN

SIG_IGN          1503 process.c      	hfunc = signal(SIGHUP, SIG_IGN);
SIG_IGN          1506 process.c      	qfunc = signal(SIGQUIT, SIG_IGN);
SIG_IGN          1508 process.c      	ifunc = signal(SIGINT, SIG_IGN);
SIG_IGN           338 signal.c           if (signum == SIGCHLD && handler == SIG_IGN)
SIG_IGN           571 signal.c       	func = SIG_IGN;
SIG_IGN           579 signal.c       		func = SIG_IGN;
SIG_IGN           583 signal.c       		    func = SIG_IGN;
SIG_IGN           594 signal.c       		    func = SIG_IGN;
SIG_IGN           605 signal.c           if (func == SIG_IGN || func == SIG_DFL) {
SIG_IGN           681 signal.c       	if (oldfunc == SIG_IGN) oldcmd = rb_str_new2("IGNORE");
SIG_IGN           864 signal.c           if (oldfunc != SIG_DFL && oldfunc != SIG_IGN) {


SIG_SETMASK

SIG_SETMASK       705 signal.c           sigprocmask(SIG_SETMASK, &arg->mask, NULL);
SIG_SETMASK       719 signal.c           sigprocmask(SIG_SETMASK, &trap_last_mask, NULL);
SIG_SETMASK       873 signal.c           sigprocmask(SIG_SETMASK, &mask, NULL);


SINGLE_BYTE_SIZE

SINGLE_BYTE_SIZE  119 regcomp.c        for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
SINGLE_BYTE_SIZE 2128 regcomp.c        if (ONIGENC_MBC_MINLEN(enc) > 1 || (code >= SINGLE_BYTE_SIZE)) {
SINGLE_BYTE_SIZE 2207 regcomp.c      	    for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
SINGLE_BYTE_SIZE 2217 regcomp.c      	  for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
SINGLE_BYTE_SIZE 2242 regcomp.c      	  for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
SINGLE_BYTE_SIZE 4055 regcomp.c              for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
SINGLE_BYTE_SIZE 4077 regcomp.c                for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
SINGLE_BYTE_SIZE 4085 regcomp.c                for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
SINGLE_BYTE_SIZE 1173 regexec.c        if (enclen == 1 && code < SINGLE_BYTE_SIZE) {
SINGLE_BYTE_SIZE  398 regint.h       #define BITSET_SIZE        (SINGLE_BYTE_SIZE / BITS_IN_ROOM)
SINGLE_BYTE_SIZE  139 regparse.c       for (i = from; i <= to && i < SINGLE_BYTE_SIZE; i++) {
SINGLE_BYTE_SIZE 3492 regparse.c           for (c = 0; c < SINGLE_BYTE_SIZE; c++) {
SINGLE_BYTE_SIZE 3499 regparse.c           for (c = 0; c < SINGLE_BYTE_SIZE; c++) {
SINGLE_BYTE_SIZE 3509 regparse.c           for (c = 0; c < SINGLE_BYTE_SIZE; c++) {
SINGLE_BYTE_SIZE 3515 regparse.c           for (c = 0; c < SINGLE_BYTE_SIZE; c++) {
SINGLE_BYTE_SIZE 3525 regparse.c           for (c = 0; c < SINGLE_BYTE_SIZE; c++) {
SINGLE_BYTE_SIZE 3531 regparse.c           for (c = 0; c < SINGLE_BYTE_SIZE; c++) {
SINGLE_BYTE_SIZE 4918 regparse.c                       ccs[i].from >= SINGLE_BYTE_SIZE) {


SIZE16

SIZE16             25 pack.c         # define OFF16B(p) ((char*)(p) + (natint?0:(sizeof(short) - SIZE16)))
SIZE16            354 pack.c         #if SIZEOF_SHORT == SIZE16


SIZE32

SIZE32             26 pack.c         # define OFF32B(p) ((char*)(p) + (natint?0:(sizeof(long) - SIZE32)))
SIZE32            348 pack.c         #if SIZEOF_LONG == SIZE32 || SIZEOF_INT == SIZE32


SIZEOF_BDIGITS

SIZEOF_BDIGITS     28 bignum.c       #define BITSPERDIG (SIZEOF_BDIGITS*CHAR_BIT)
SIZEOF_BDIGITS     30 bignum.c       #define DIGSPERLONG ((unsigned int)(SIZEOF_LONG/SIZEOF_BDIGITS))
SIZEOF_BDIGITS     32 bignum.c       # define DIGSPERLL ((unsigned int)(SIZEOF_LONG_LONG/SIZEOF_BDIGITS))
SIZEOF_BDIGITS    102 bignum.c       	if (len*SIZEOF_BDIGITS <= sizeof(VALUE)) {
SIZEOF_BDIGITS    191 bignum.c       	if (len > SIZEOF_LONG_LONG/SIZEOF_BDIGITS) {
SIZEOF_BDIGITS    192 bignum.c       	    len = SIZEOF_LONG/SIZEOF_BDIGITS;
SIZEOF_BDIGITS    260 bignum.c           len = RBIGNUM(val)->len * SIZEOF_BDIGITS;
SIZEOF_BDIGITS    274 bignum.c       #define BNEG(b) (RSHIFT(((BDIGIT*)b)[QUAD_SIZE/SIZEOF_BDIGITS-1],BITSPERDIG-1) != 0)
SIZEOF_BDIGITS    281 bignum.c           VALUE big = bignew(QUAD_SIZE/SIZEOF_BDIGITS, 1);
SIZEOF_BDIGITS    603 bignum.c           j = SIZEOF_BDIGITS*CHAR_BIT*i;
SIZEOF_BDIGITS    633 bignum.c       #if SIZEOF_BDIGITS > 2
SIZEOF_BDIGITS    653 bignum.c       	k = SIZEOF_BDIGITS;
SIZEOF_BDIGITS    702 bignum.c           if (len > SIZEOF_LONG/SIZEOF_BDIGITS) {
SIZEOF_BDIGITS    705 bignum.c       	len = SIZEOF_LONG/SIZEOF_BDIGITS;
SIZEOF_BDIGITS    761 bignum.c           if (len > SIZEOF_LONG_LONG/SIZEOF_BDIGITS)
SIZEOF_BDIGITS   1953 bignum.c           return LONG2FIX(RBIGNUM(big)->len*SIZEOF_BDIGITS);
SIZEOF_BDIGITS     30 marshal.c      #if SIZEOF_SHORT == SIZEOF_BDIGITS
SIZEOF_BDIGITS    521 marshal.c      #if SIZEOF_BDIGITS > SIZEOF_SHORT
SIZEOF_BDIGITS    525 marshal.c      		    for (i=0; i<SIZEOF_BDIGITS; i+=SIZEOF_SHORT) {
SIZEOF_BDIGITS   1048 marshal.c      #if SIZEOF_BDIGITS == SIZEOF_SHORT
SIZEOF_BDIGITS   1055 marshal.c      #if SIZEOF_BDIGITS > SIZEOF_SHORT
SIZEOF_BDIGITS   1063 marshal.c      #if SIZEOF_BDIGITS > SIZEOF_SHORT
SIZEOF_BDIGITS   1067 marshal.c      		for (i=0; i<SIZEOF_BDIGITS; i++) {
SIZEOF_BDIGITS    208 random.c                 len = RBIGNUM(seed)->len * SIZEOF_BDIGITS;
SIZEOF_BDIGITS    228 random.c                   j = i * SIZEOF_BDIGITS / 4;
SIZEOF_BDIGITS    229 random.c       #if SIZEOF_BDIGITS < 4
SIZEOF_BDIGITS    230 random.c                   buf[j] <<= SIZEOF_BDIGITS * 8;
SIZEOF_BDIGITS    269 random.c           big->len = seed_len / SIZEOF_BDIGITS + 1;
SIZEOF_BDIGITS    273 random.c           memset(digits, 0, big->len * SIZEOF_BDIGITS);
SIZEOF_BDIGITS    375 random.c           len = (limit->len * SIZEOF_BDIGITS + 3) / 4;
SIZEOF_BDIGITS    378 random.c       #if SIZEOF_BDIGITS == 2


SIZEOF_INT

SIZEOF_INT         67 defines.h      #if SIZEOF_INT*2 <= SIZEOF_LONG_LONG
SIZEOF_INT         69 defines.h      # define SIZEOF_BDIGITS SIZEOF_INT
SIZEOF_INT         72 defines.h      #elif SIZEOF_INT*2 <= SIZEOF_LONG
SIZEOF_INT         74 defines.h      # define SIZEOF_BDIGITS SIZEOF_INT
SIZEOF_INT       1497 numeric.c      #if SIZEOF_INT < SIZEOF_LONG
SIZEOF_INT        348 pack.c         #if SIZEOF_LONG == SIZE32 || SIZEOF_INT == SIZE32
SIZEOF_INT       1265 process.c      #if SIZEOF_INT == SIZEOF_LONG
SIZEOF_INT       1894 process.c      #if SIZEOF_RLIM_T == SIZEOF_INT
SIZEOF_INT        233 regint.h       #define WORD_ALIGNMENT_SIZE       SIZEOF_INT
SIZEOF_INT        309 regint.h       #if SIZEOF_INT == 2
SIZEOF_INT        314 regint.h       #elif SIZEOF_INT == 4
SIZEOF_INT        319 regint.h       #elif SIZEOF_INT == 8
SIZEOF_INT        363 regint.h       #define INT_MAX_LIMIT           ((1UL << (SIZEOF_INT * 8 - 1)) - 1)
SIZEOF_INT        269 ruby.h         #if SIZEOF_INT < SIZEOF_LONG
SIZEOF_INT       1206 time.c         #elif SIZEOF_TIME_T == SIZEOF_INT


SIZEOF_LONG

SIZEOF_LONG        30 bignum.c       #define DIGSPERLONG ((unsigned int)(SIZEOF_LONG/SIZEOF_BDIGITS))
SIZEOF_LONG       192 bignum.c       	    len = SIZEOF_LONG/SIZEOF_BDIGITS;
SIZEOF_LONG       702 bignum.c           if (len > SIZEOF_LONG/SIZEOF_BDIGITS) {
SIZEOF_LONG       705 bignum.c       	len = SIZEOF_LONG/SIZEOF_BDIGITS;
SIZEOF_LONG        72 defines.h      #elif SIZEOF_INT*2 <= SIZEOF_LONG
SIZEOF_LONG        77 defines.h      #elif SIZEOF_SHORT*2 <= SIZEOF_LONG
SIZEOF_LONG        84 defines.h      # define SIZEOF_BDIGITS (SIZEOF_LONG/2)
SIZEOF_LONG      10388 eval.c             char msg[21+SIZEOF_LONG*2];
SIZEOF_LONG        24 ext/digest/defs.h # if SIZEOF_LONG == 8
SIZEOF_LONG       136 ext/dl/dl.h    #if SIZEOF_VOIDP == SIZEOF_LONG
SIZEOF_LONG      1873 gc.c           #if SIZEOF_LONG == SIZEOF_VOIDP
SIZEOF_LONG        96 io.c           #if SIZEOF_OFF_T > SIZEOF_LONG && !defined(HAVE_LONG_LONG)
SIZEOF_LONG       156 marshal.c      #if SIZEOF_LONG > 4
SIZEOF_LONG       439 marshal.c      #if SIZEOF_LONG <= 4
SIZEOF_LONG      1497 numeric.c      #if SIZEOF_INT < SIZEOF_LONG
SIZEOF_LONG      1835 numeric.c          char buf[SIZEOF_LONG*CHAR_BIT + 2], *b = buf + sizeof buf;
SIZEOF_LONG        20 pack.c         #if SIZEOF_SHORT != 2 || SIZEOF_LONG != 4
SIZEOF_LONG        98 pack.c         #if SIZEOF_LONG == 4
SIZEOF_LONG       101 pack.c         #if SIZEOF_LONG == 8
SIZEOF_LONG       116 pack.c         #if SIZEOF_LONG == 4	/* SIZEOF_FLOAT == 4 == SIZEOF_LONG */
SIZEOF_LONG       132 pack.c         #if SIZEOF_LONG == 8	/* SIZEOF_DOUBLE == 8 == SIZEOF_LONG */
SIZEOF_LONG       136 pack.c         #if SIZEOF_LONG == 4	/* SIZEOF_DOUBLE == 8 && 4 == SIZEOF_LONG */
SIZEOF_LONG       348 pack.c         #if SIZEOF_LONG == SIZE32 || SIZEOF_INT == SIZE32
SIZEOF_LONG      1265 process.c      #if SIZEOF_INT == SIZEOF_LONG
SIZEOF_LONG      1897 process.c      #elif SIZEOF_RLIM_T == SIZEOF_LONG
SIZEOF_LONG       221 random.c       #if SIZEOF_LONG > 4
SIZEOF_LONG       342 random.c       #if 4 < SIZEOF_LONG
SIZEOF_LONG       357 random.c           for (i = SIZEOF_LONG/4-1; 0 <= i; i--) {
SIZEOF_LONG        90 ruby.h         #if SIZEOF_LONG == SIZEOF_VOIDP
SIZEOF_LONG       168 ruby.h         #if SIZEOF_OFF_T > SIZEOF_LONG && defined(HAVE_LONG_LONG)
SIZEOF_LONG       269 ruby.h         #if SIZEOF_INT < SIZEOF_LONG
SIZEOF_LONG       292 ruby.h         #if HAVE_LONG_LONG && SIZEOF_OFF_T > SIZEOF_LONG
SIZEOF_LONG       832 sprintf.c      #if SIZEOF_LONG < SIZEOF_VOIDP
SIZEOF_LONG      1204 time.c         #if SIZEOF_TIME_T == SIZEOF_LONG


SIZEOF_LONG_LONG

SIZEOF_LONG_LONG   32 bignum.c       # define DIGSPERLL ((unsigned int)(SIZEOF_LONG_LONG/SIZEOF_BDIGITS))
SIZEOF_LONG_LONG  191 bignum.c       	if (len > SIZEOF_LONG_LONG/SIZEOF_BDIGITS) {
SIZEOF_LONG_LONG  202 bignum.c           memcpy(buf, (char*)&q, SIZEOF_LONG_LONG);
SIZEOF_LONG_LONG  214 bignum.c           memcpy(&q, buf, SIZEOF_LONG_LONG);
SIZEOF_LONG_LONG  761 bignum.c           if (len > SIZEOF_LONG_LONG/SIZEOF_BDIGITS)
SIZEOF_LONG_LONG   58 defines.h      #if SIZEOF_LONG_LONG > 0
SIZEOF_LONG_LONG   67 defines.h      #if SIZEOF_INT*2 <= SIZEOF_LONG_LONG
SIZEOF_LONG_LONG   26 ext/digest/defs.h # elif SIZEOF_LONG_LONG == 8
SIZEOF_LONG_LONG 1875 gc.c           #elif SIZEOF_LONG_LONG == SIZEOF_VOIDP
SIZEOF_LONG_LONG 1900 process.c      #elif SIZEOF_RLIM_T == SIZEOF_LONG_LONG
SIZEOF_LONG_LONG   93 ruby.h         #elif SIZEOF_LONG_LONG == SIZEOF_VOIDP
SIZEOF_LONG_LONG  833 sprintf.c      # if  SIZEOF_LONG_LONG == SIZEOF_VOIDP
SIZEOF_LONG_LONG 1208 time.c         #elif SIZEOF_TIME_T == SIZEOF_LONG_LONG


SIZEOF_SHORT

SIZEOF_SHORT       77 defines.h      #elif SIZEOF_SHORT*2 <= SIZEOF_LONG
SIZEOF_SHORT       79 defines.h      # define SIZEOF_BDIGITS SIZEOF_SHORT
SIZEOF_SHORT       30 marshal.c      #if SIZEOF_SHORT == SIZEOF_BDIGITS
SIZEOF_SHORT      521 marshal.c      #if SIZEOF_BDIGITS > SIZEOF_SHORT
SIZEOF_SHORT      525 marshal.c      		    for (i=0; i<SIZEOF_BDIGITS; i+=SIZEOF_SHORT) {
SIZEOF_SHORT     1048 marshal.c      #if SIZEOF_BDIGITS == SIZEOF_SHORT
SIZEOF_SHORT     1055 marshal.c      #if SIZEOF_BDIGITS > SIZEOF_SHORT
SIZEOF_SHORT     1063 marshal.c      #if SIZEOF_BDIGITS > SIZEOF_SHORT
SIZEOF_SHORT       20 pack.c         #if SIZEOF_SHORT != 2 || SIZEOF_LONG != 4
SIZEOF_SHORT       79 pack.c         #if SIZEOF_SHORT == 2
SIZEOF_SHORT       82 pack.c         #if SIZEOF_SHORT == 4
SIZEOF_SHORT      120 pack.c         #if SIZEOF_SHORT == 4	/* SIZEOF_FLOAT == 4 == SIZEOF_SHORT */
SIZEOF_SHORT      153 pack.c         #if SIZEOF_SHORT == 4	/* SIZEOF_DOUBLE == 8 && 4 == SIZEOF_SHORT */
SIZEOF_SHORT      354 pack.c         #if SIZEOF_SHORT == SIZE16
SIZEOF_SHORT      348 parse.y        #if SIZEOF_SHORT == 2
SIZEOF_SHORT      298 regint.h       #if SIZEOF_SHORT == 2
SIZEOF_SHORT      301 regint.h       #elif SIZEOF_SHORT == 4
SIZEOF_SHORT      304 regint.h       #elif SIZEOF_SHORT == 8


SIZEOF_VOIDP

SIZEOF_VOIDP      136 ext/dl/dl.h    #if SIZEOF_VOIDP == SIZEOF_LONG
SIZEOF_VOIDP     1873 gc.c           #if SIZEOF_LONG == SIZEOF_VOIDP
SIZEOF_VOIDP     1875 gc.c           #elif SIZEOF_LONG_LONG == SIZEOF_VOIDP
SIZEOF_VOIDP       90 ruby.h         #if SIZEOF_LONG == SIZEOF_VOIDP
SIZEOF_VOIDP       93 ruby.h         #elif SIZEOF_LONG_LONG == SIZEOF_VOIDP
SIZEOF_VOIDP      832 sprintf.c      #if SIZEOF_LONG < SIZEOF_VOIDP
SIZEOF_VOIDP      833 sprintf.c      # if  SIZEOF_LONG_LONG == SIZEOF_VOIDP


SIZE_ABSADDR

SIZE_ABSADDR      203 regcomp.c        BBUF_ADD(reg, &ra, SIZE_ABSADDR);
SIZE_ABSADDR     1017 regcomp.c            node->call_addr = BBUF_GET_OFFSET_POS(reg) + SIZE_ABSADDR + SIZE_OP_JUMP;
SIZE_ABSADDR     1657 regcomp.c          BBUF_WRITE(reg, offset, &addr, SIZE_ABSADDR);
SIZE_ABSADDR      713 regint.h       #define SIZE_OP_CALL                   (SIZE_OPCODE + SIZE_ABSADDR)


SIZE_BITSET

SIZE_BITSET       262 regcomp.c        BBUF_ADD(reg, bs, SIZE_BITSET);
SIZE_BITSET       558 regcomp.c          len = SIZE_OPCODE + SIZE_BITSET;
SIZE_BITSET       565 regcomp.c            len = SIZE_OPCODE + SIZE_BITSET;
SIZE_BITSET      5252 regcomp.c            bp += SIZE_BITSET;
SIZE_BITSET      5258 regcomp.c            bp += SIZE_BITSET;
SIZE_BITSET      5277 regcomp.c            bp += SIZE_BITSET;
SIZE_BITSET      1611 regexec.c            p += SIZE_BITSET;
SIZE_BITSET      1648 regexec.c      	p += SIZE_BITSET;
SIZE_BITSET      1655 regexec.c      	p += SIZE_BITSET;
SIZE_BITSET      1666 regexec.c            p += SIZE_BITSET;
SIZE_BITSET      1715 regexec.c      	p += SIZE_BITSET;
SIZE_BITSET      1722 regexec.c      	p += SIZE_BITSET;


SIZE_CODE_POINT

SIZE_CODE_POINT  1563 regparse.c         BBUF_WRITE(bbuf, pos, &(code), SIZE_CODE_POINT)
SIZE_CODE_POINT  1572 regparse.c     #define INIT_MULTI_BYTE_RANGE_SIZE  (SIZE_CODE_POINT * 5)
SIZE_CODE_POINT  1640 regparse.c         int from_pos = SIZE_CODE_POINT * (1 + high * 2);
SIZE_CODE_POINT  1641 regparse.c         int to_pos   = SIZE_CODE_POINT * (1 + (low + 1) * 2);
SIZE_CODE_POINT  1642 regparse.c         int size = (n - high) * 2 * SIZE_CODE_POINT;
SIZE_CODE_POINT  1652 regparse.c       pos = SIZE_CODE_POINT * (1 + low * 2);
SIZE_CODE_POINT  1653 regparse.c       BBUF_ENSURE_SIZE(bbuf, pos + SIZE_CODE_POINT * 2);
SIZE_CODE_POINT  1655 regparse.c       BBUF_WRITE_CODE_POINT(bbuf, pos + SIZE_CODE_POINT, to);


SIZE_LENGTH

SIZE_LENGTH       212 regcomp.c        BBUF_ADD(reg, &l, SIZE_LENGTH);
SIZE_LENGTH       398 regcomp.c        if (op == OP_EXACTMBN)  len += SIZE_LENGTH;
SIZE_LENGTH       400 regcomp.c          len += SIZE_LENGTH;
SIZE_LENGTH       532 regcomp.c        UChar* p = BBUF_GET_ADD_ADDRESS(reg) + SIZE_LENGTH;
SIZE_LENGTH       568 regcomp.c          len += SIZE_LENGTH + cc->mbuf->used;
SIZE_LENGTH       570 regcomp.c          len += SIZE_LENGTH + cc->mbuf->used + (WORD_ALIGNMENT_SIZE - 1);
SIZE_LENGTH      1276 regcomp.c      	r = SIZE_OPCODE + SIZE_LENGTH + (SIZE_MEMNUM * br->back_num);
SIZE_LENGTH       710 regint.h       #define SIZE_OP_LOOK_BEHIND            (SIZE_OPCODE + SIZE_LENGTH)
SIZE_LENGTH       711 regint.h       #define SIZE_OP_PUSH_LOOK_BEHIND_NOT   (SIZE_OPCODE + SIZE_RELADDR + SIZE_LENGTH)


SIZE_MEMNUM

SIZE_MEMNUM       221 regcomp.c        BBUF_ADD(reg, &n, SIZE_MEMNUM);
SIZE_MEMNUM       748 regcomp.c              + mod_tlen + SIZE_OPCODE + SIZE_RELADDR + SIZE_MEMNUM;
SIZE_MEMNUM      1273 regcomp.c      	     ? SIZE_OPCODE : (SIZE_OPCODE + SIZE_MEMNUM));
SIZE_MEMNUM      1276 regcomp.c      	r = SIZE_OPCODE + SIZE_LENGTH + (SIZE_MEMNUM * br->back_num);
SIZE_MEMNUM      5179 regcomp.c            bp += SIZE_MEMNUM;
SIZE_MEMNUM      5300 regcomp.c            bp += SIZE_MEMNUM;
SIZE_MEMNUM      5319 regcomp.c      	bp += SIZE_MEMNUM;
SIZE_MEMNUM      2144 regexec.c      	  p += (SIZE_MEMNUM * (tlen - i - 1));
SIZE_MEMNUM      2183 regexec.c      	  p += (SIZE_MEMNUM * (tlen - i - 1));
SIZE_MEMNUM      2235 regexec.c      	    p += SIZE_MEMNUM;
SIZE_MEMNUM       691 regint.h       #define SIZE_OP_REPEAT_INC             (SIZE_OPCODE + SIZE_MEMNUM)
SIZE_MEMNUM       692 regint.h       #define SIZE_OP_REPEAT_INC_NG          (SIZE_OPCODE + SIZE_MEMNUM)
SIZE_MEMNUM       700 regint.h       #define SIZE_OP_MEMORY_START           (SIZE_OPCODE + SIZE_MEMNUM)
SIZE_MEMNUM       701 regint.h       #define SIZE_OP_MEMORY_START_PUSH      (SIZE_OPCODE + SIZE_MEMNUM)
SIZE_MEMNUM       702 regint.h       #define SIZE_OP_MEMORY_END_PUSH        (SIZE_OPCODE + SIZE_MEMNUM)
SIZE_MEMNUM       703 regint.h       #define SIZE_OP_MEMORY_END_PUSH_REC    (SIZE_OPCODE + SIZE_MEMNUM)
SIZE_MEMNUM       704 regint.h       #define SIZE_OP_MEMORY_END             (SIZE_OPCODE + SIZE_MEMNUM)
SIZE_MEMNUM       705 regint.h       #define SIZE_OP_MEMORY_END_REC         (SIZE_OPCODE + SIZE_MEMNUM)
SIZE_MEMNUM       708 regint.h       #define SIZE_OP_NULL_CHECK_START       (SIZE_OPCODE + SIZE_MEMNUM)
SIZE_MEMNUM       709 regint.h       #define SIZE_OP_NULL_CHECK_END         (SIZE_OPCODE + SIZE_MEMNUM)


SIZE_OPCODE

SIZE_OPCODE       396 regcomp.c        len = SIZE_OPCODE;
SIZE_OPCODE       553 regcomp.c          len = SIZE_OPCODE + SIZE_POINTER;
SIZE_OPCODE       558 regcomp.c          len = SIZE_OPCODE + SIZE_BITSET;
SIZE_OPCODE       562 regcomp.c            len = SIZE_OPCODE;
SIZE_OPCODE       565 regcomp.c            len = SIZE_OPCODE + SIZE_BITSET;
SIZE_OPCODE       748 regcomp.c              + mod_tlen + SIZE_OPCODE + SIZE_RELADDR + SIZE_MEMNUM;
SIZE_OPCODE      1130 regcomp.c          len = SIZE_OPCODE;
SIZE_OPCODE      1264 regcomp.c          r = SIZE_OPCODE;
SIZE_OPCODE      1273 regcomp.c      	     ? SIZE_OPCODE : (SIZE_OPCODE + SIZE_MEMNUM));
SIZE_OPCODE      1276 regcomp.c      	r = SIZE_OPCODE + SIZE_LENGTH + (SIZE_MEMNUM * br->back_num);
SIZE_OPCODE       684 regint.h       #define SIZE_OP_ANYCHAR_STAR            SIZE_OPCODE
SIZE_OPCODE       685 regint.h       #define SIZE_OP_ANYCHAR_STAR_PEEK_NEXT (SIZE_OPCODE + 1)
SIZE_OPCODE       686 regint.h       #define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
SIZE_OPCODE       687 regint.h       #define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
SIZE_OPCODE       688 regint.h       #define SIZE_OP_POP                     SIZE_OPCODE
SIZE_OPCODE       689 regint.h       #define SIZE_OP_PUSH_OR_JUMP_EXACT1    (SIZE_OPCODE + SIZE_RELADDR + 1)
SIZE_OPCODE       690 regint.h       #define SIZE_OP_PUSH_IF_PEEK_NEXT      (SIZE_OPCODE + SIZE_RELADDR + 1)
SIZE_OPCODE       691 regint.h       #define SIZE_OP_REPEAT_INC             (SIZE_OPCODE + SIZE_MEMNUM)
SIZE_OPCODE       692 regint.h       #define SIZE_OP_REPEAT_INC_NG          (SIZE_OPCODE + SIZE_MEMNUM)
SIZE_OPCODE       693 regint.h       #define SIZE_OP_PUSH_POS                SIZE_OPCODE
SIZE_OPCODE       694 regint.h       #define SIZE_OP_PUSH_POS_NOT           (SIZE_OPCODE + SIZE_RELADDR)
SIZE_OPCODE       695 regint.h       #define SIZE_OP_POP_POS                 SIZE_OPCODE
SIZE_OPCODE       696 regint.h       #define SIZE_OP_FAIL_POS                SIZE_OPCODE
SIZE_OPCODE       697 regint.h       #define SIZE_OP_SET_OPTION             (SIZE_OPCODE + SIZE_OPTION)
SIZE_OPCODE       698 regint.h       #define SIZE_OP_SET_OPTION_PUSH        (SIZE_OPCODE + SIZE_OPTION)
SIZE_OPCODE       699 regint.h       #define SIZE_OP_FAIL                    SIZE_OPCODE
SIZE_OPCODE       700 regint.h       #define SIZE_OP_MEMORY_START           (SIZE_OPCODE + SIZE_MEMNUM)
SIZE_OPCODE       701 regint.h       #define SIZE_OP_MEMORY_START_PUSH      (SIZE_OPCODE + SIZE_MEMNUM)
SIZE_OPCODE       702 regint.h       #define SIZE_OP_MEMORY_END_PUSH        (SIZE_OPCODE + SIZE_MEMNUM)
SIZE_OPCODE       703 regint.h       #define SIZE_OP_MEMORY_END_PUSH_REC    (SIZE_OPCODE + SIZE_MEMNUM)
SIZE_OPCODE       704 regint.h       #define SIZE_OP_MEMORY_END             (SIZE_OPCODE + SIZE_MEMNUM)
SIZE_OPCODE       705 regint.h       #define SIZE_OP_MEMORY_END_REC         (SIZE_OPCODE + SIZE_MEMNUM)
SIZE_OPCODE       706 regint.h       #define SIZE_OP_PUSH_STOP_BT            SIZE_OPCODE
SIZE_OPCODE       707 regint.h       #define SIZE_OP_POP_STOP_BT             SIZE_OPCODE
SIZE_OPCODE       708 regint.h       #define SIZE_OP_NULL_CHECK_START       (SIZE_OPCODE + SIZE_MEMNUM)
SIZE_OPCODE       709 regint.h       #define SIZE_OP_NULL_CHECK_END         (SIZE_OPCODE + SIZE_MEMNUM)
SIZE_OPCODE       710 regint.h       #define SIZE_OP_LOOK_BEHIND            (SIZE_OPCODE + SIZE_LENGTH)
SIZE_OPCODE       711 regint.h       #define SIZE_OP_PUSH_LOOK_BEHIND_NOT   (SIZE_OPCODE + SIZE_RELADDR + SIZE_LENGTH)
SIZE_OPCODE       712 regint.h       #define SIZE_OP_FAIL_LOOK_BEHIND_NOT    SIZE_OPCODE
SIZE_OPCODE       713 regint.h       #define SIZE_OP_CALL                   (SIZE_OPCODE + SIZE_ABSADDR)
SIZE_OPCODE       714 regint.h       #define SIZE_OP_RETURN                  SIZE_OPCODE


SIZE_OPTION

SIZE_OPTION       237 regcomp.c        BBUF_ADD(reg, &option, SIZE_OPTION);
SIZE_OPTION      5185 regcomp.c      	bp += SIZE_OPTION;
SIZE_OPTION       697 regint.h       #define SIZE_OP_SET_OPTION             (SIZE_OPCODE + SIZE_OPTION)
SIZE_OPTION       698 regint.h       #define SIZE_OP_SET_OPTION_PUSH        (SIZE_OPCODE + SIZE_OPTION)


SIZE_OP_CALL

SIZE_OP_CALL      958 regcomp.c      	  + SIZE_OP_CALL + SIZE_OP_JUMP + SIZE_OP_RETURN;
SIZE_OP_CALL     1283 regcomp.c          r = SIZE_OP_CALL;


SIZE_OP_FAIL

SIZE_OP_FAIL      904 regcomp.c          return SIZE_OP_SET_OPTION_PUSH + SIZE_OP_SET_OPTION + SIZE_OP_FAIL
SIZE_OP_FAIL     2195 regexec.c            p += SIZE_OP_SET_OPTION + SIZE_OP_FAIL;


SIZE_OP_FAIL_LOOK_BEHIND_NOT

SIZE_OP_FAIL_LOOK_BEHIND_NOT 1126 regcomp.c          len = SIZE_OP_PUSH_LOOK_BEHIND_NOT + tlen + SIZE_OP_FAIL_LOOK_BEHIND_NOT;
SIZE_OP_FAIL_LOOK_BEHIND_NOT 1197 regcomp.c      			   len + SIZE_OP_FAIL_LOOK_BEHIND_NOT);


SIZE_OP_FAIL_POS

SIZE_OP_FAIL_POS 1120 regcomp.c          len = SIZE_OP_PUSH_POS_NOT + tlen + SIZE_OP_FAIL_POS;
SIZE_OP_FAIL_POS 1168 regcomp.c          r = add_opcode_rel_addr(reg, OP_PUSH_POS_NOT, len + SIZE_OP_FAIL_POS);


SIZE_OP_JUMP

SIZE_OP_JUMP      717 regcomp.c            len = SIZE_OP_JUMP;
SIZE_OP_JUMP      725 regcomp.c      	len += SIZE_OP_PUSH_OR_JUMP_EXACT1 + mod_tlen + SIZE_OP_JUMP;
SIZE_OP_JUMP      727 regcomp.c      	len += SIZE_OP_PUSH_IF_PEEK_NEXT + mod_tlen + SIZE_OP_JUMP;
SIZE_OP_JUMP      729 regcomp.c      	len += SIZE_OP_PUSH + mod_tlen + SIZE_OP_JUMP;
SIZE_OP_JUMP      732 regcomp.c            len += SIZE_OP_JUMP + mod_tlen + SIZE_OP_PUSH;
SIZE_OP_JUMP      735 regcomp.c          len = SIZE_OP_JUMP + tlen;
SIZE_OP_JUMP      744 regcomp.c          len = SIZE_OP_PUSH + SIZE_OP_JUMP + tlen;
SIZE_OP_JUMP      810 regcomp.c      	r = add_opcode_rel_addr(reg, OP_JUMP, SIZE_OP_JUMP);
SIZE_OP_JUMP      822 regcomp.c      			     mod_tlen + SIZE_OP_JUMP);
SIZE_OP_JUMP      828 regcomp.c      	-(mod_tlen + (int )SIZE_OP_JUMP + (int )SIZE_OP_PUSH_OR_JUMP_EXACT1));
SIZE_OP_JUMP      832 regcomp.c      				mod_tlen + SIZE_OP_JUMP);
SIZE_OP_JUMP      838 regcomp.c                -(mod_tlen + (int )SIZE_OP_JUMP + (int )SIZE_OP_PUSH_IF_PEEK_NEXT));
SIZE_OP_JUMP      841 regcomp.c      	r = add_opcode_rel_addr(reg, OP_PUSH, mod_tlen + SIZE_OP_JUMP);
SIZE_OP_JUMP      846 regcomp.c      		     -(mod_tlen + (int )SIZE_OP_JUMP + (int )SIZE_OP_PUSH));
SIZE_OP_JUMP      879 regcomp.c          r = add_opcode_rel_addr(reg, OP_PUSH, SIZE_OP_JUMP);
SIZE_OP_JUMP      958 regcomp.c      	  + SIZE_OP_CALL + SIZE_OP_JUMP + SIZE_OP_RETURN;
SIZE_OP_JUMP      986 regcomp.c      	  + SIZE_OP_PUSH + tlen + SIZE_OP_POP + SIZE_OP_JUMP;
SIZE_OP_JUMP     1017 regcomp.c            node->call_addr = BBUF_GET_OFFSET_POS(reg) + SIZE_ABSADDR + SIZE_OP_JUMP;
SIZE_OP_JUMP     1078 regcomp.c            r = add_opcode_rel_addr(reg, OP_PUSH, len + SIZE_OP_POP + SIZE_OP_JUMP);
SIZE_OP_JUMP     1085 regcomp.c      	 -((int )SIZE_OP_PUSH + len + (int )SIZE_OP_POP + (int )SIZE_OP_JUMP));
SIZE_OP_JUMP     1247 regcomp.c            r += (SIZE_OP_PUSH + SIZE_OP_JUMP) * (n - 1);
SIZE_OP_JUMP     1327 regcomp.c      	  len += SIZE_OP_PUSH + SIZE_OP_JUMP;
SIZE_OP_JUMP     1335 regcomp.c      	  r = add_opcode_rel_addr(reg, OP_PUSH, len + SIZE_OP_JUMP);
SIZE_OP_JUMP     1341 regcomp.c      	  len = pos - (reg->used + SIZE_OP_JUMP);


SIZE_OP_MEMORY_END

SIZE_OP_MEMORY_END  964 regcomp.c      		? SIZE_OP_MEMORY_END_REC : SIZE_OP_MEMORY_END);
SIZE_OP_MEMORY_END  975 regcomp.c      		     ? SIZE_OP_MEMORY_END_PUSH : SIZE_OP_MEMORY_END);
SIZE_OP_MEMORY_END 1028 regcomp.c      		? SIZE_OP_MEMORY_END_REC : SIZE_OP_MEMORY_END);


SIZE_OP_MEMORY_END_PUSH

SIZE_OP_MEMORY_END_PUSH  961 regcomp.c      		? SIZE_OP_MEMORY_END_PUSH_REC : SIZE_OP_MEMORY_END_PUSH);
SIZE_OP_MEMORY_END_PUSH  975 regcomp.c      		     ? SIZE_OP_MEMORY_END_PUSH : SIZE_OP_MEMORY_END);
SIZE_OP_MEMORY_END_PUSH 1025 regcomp.c      		? SIZE_OP_MEMORY_END_PUSH_REC : SIZE_OP_MEMORY_END_PUSH);


SIZE_OP_MEMORY_END_PUSH_REC

SIZE_OP_MEMORY_END_PUSH_REC  961 regcomp.c      		? SIZE_OP_MEMORY_END_PUSH_REC : SIZE_OP_MEMORY_END_PUSH);
SIZE_OP_MEMORY_END_PUSH_REC 1025 regcomp.c      		? SIZE_OP_MEMORY_END_PUSH_REC : SIZE_OP_MEMORY_END_PUSH);


SIZE_OP_MEMORY_END_REC

SIZE_OP_MEMORY_END_REC  964 regcomp.c      		? SIZE_OP_MEMORY_END_REC : SIZE_OP_MEMORY_END);
SIZE_OP_MEMORY_END_REC 1028 regcomp.c      		? SIZE_OP_MEMORY_END_REC : SIZE_OP_MEMORY_END);


SIZE_OP_MEMORY_START_PUSH

SIZE_OP_MEMORY_START_PUSH  957 regcomp.c            len = SIZE_OP_MEMORY_START_PUSH + tlen
SIZE_OP_MEMORY_START_PUSH  970 regcomp.c      	len = SIZE_OP_MEMORY_START_PUSH;
SIZE_OP_MEMORY_START_PUSH 1022 regcomp.c            len += (SIZE_OP_MEMORY_START_PUSH + SIZE_OP_RETURN);


SIZE_OP_NULL_CHECK_END

SIZE_OP_NULL_CHECK_END  710 regcomp.c          mod_tlen = tlen + (SIZE_OP_NULL_CHECK_START + SIZE_OP_NULL_CHECK_END);
SIZE_OP_NULL_CHECK_END  794 regcomp.c          mod_tlen = tlen + (SIZE_OP_NULL_CHECK_START + SIZE_OP_NULL_CHECK_END);


SIZE_OP_NULL_CHECK_START

SIZE_OP_NULL_CHECK_START  710 regcomp.c          mod_tlen = tlen + (SIZE_OP_NULL_CHECK_START + SIZE_OP_NULL_CHECK_END);
SIZE_OP_NULL_CHECK_START  794 regcomp.c          mod_tlen = tlen + (SIZE_OP_NULL_CHECK_START + SIZE_OP_NULL_CHECK_END);


SIZE_OP_POP

SIZE_OP_POP       986 regcomp.c      	  + SIZE_OP_PUSH + tlen + SIZE_OP_POP + SIZE_OP_JUMP;
SIZE_OP_POP      1078 regcomp.c            r = add_opcode_rel_addr(reg, OP_PUSH, len + SIZE_OP_POP + SIZE_OP_JUMP);
SIZE_OP_POP      1085 regcomp.c      	 -((int )SIZE_OP_PUSH + len + (int )SIZE_OP_POP + (int )SIZE_OP_JUMP));


SIZE_OP_PUSH

SIZE_OP_PUSH      729 regcomp.c      	len += SIZE_OP_PUSH + mod_tlen + SIZE_OP_JUMP;
SIZE_OP_PUSH      732 regcomp.c            len += SIZE_OP_JUMP + mod_tlen + SIZE_OP_PUSH;
SIZE_OP_PUSH      738 regcomp.c                 (qn->upper == 1 || (tlen + SIZE_OP_PUSH) * qn->upper
SIZE_OP_PUSH      741 regcomp.c          len += (SIZE_OP_PUSH + tlen) * (qn->upper - qn->lower);
SIZE_OP_PUSH      744 regcomp.c          len = SIZE_OP_PUSH + SIZE_OP_JUMP + tlen;
SIZE_OP_PUSH      807 regcomp.c      	  r = add_opcode_rel_addr(reg, OP_JUMP, SIZE_OP_PUSH);
SIZE_OP_PUSH      846 regcomp.c      		     -(mod_tlen + (int )SIZE_OP_JUMP + (int )SIZE_OP_PUSH));
SIZE_OP_PUSH      854 regcomp.c            r = add_opcode_rel_addr(reg, OP_PUSH, -(mod_tlen + (int )SIZE_OP_PUSH));
SIZE_OP_PUSH      863 regcomp.c                 (qn->upper == 1 || (tlen + SIZE_OP_PUSH) * qn->upper
SIZE_OP_PUSH      872 regcomp.c      			   (n - i) * tlen + (n - i - 1) * SIZE_OP_PUSH);
SIZE_OP_PUSH      986 regcomp.c      	  + SIZE_OP_PUSH + tlen + SIZE_OP_POP + SIZE_OP_JUMP;
SIZE_OP_PUSH     1085 regcomp.c      	 -((int )SIZE_OP_PUSH + len + (int )SIZE_OP_POP + (int )SIZE_OP_JUMP));
SIZE_OP_PUSH     1247 regcomp.c            r += (SIZE_OP_PUSH + SIZE_OP_JUMP) * (n - 1);
SIZE_OP_PUSH     1327 regcomp.c      	  len += SIZE_OP_PUSH + SIZE_OP_JUMP;


SIZE_OP_PUSH_IF_PEEK_NEXT

SIZE_OP_PUSH_IF_PEEK_NEXT  727 regcomp.c      	len += SIZE_OP_PUSH_IF_PEEK_NEXT + mod_tlen + SIZE_OP_JUMP;
SIZE_OP_PUSH_IF_PEEK_NEXT  805 regcomp.c      	  r = add_opcode_rel_addr(reg, OP_JUMP, SIZE_OP_PUSH_IF_PEEK_NEXT);
SIZE_OP_PUSH_IF_PEEK_NEXT  838 regcomp.c                -(mod_tlen + (int )SIZE_OP_JUMP + (int )SIZE_OP_PUSH_IF_PEEK_NEXT));


SIZE_OP_PUSH_OR_JUMP_EXACT1

SIZE_OP_PUSH_OR_JUMP_EXACT1  725 regcomp.c      	len += SIZE_OP_PUSH_OR_JUMP_EXACT1 + mod_tlen + SIZE_OP_JUMP;
SIZE_OP_PUSH_OR_JUMP_EXACT1  803 regcomp.c      	  r = add_opcode_rel_addr(reg, OP_JUMP, SIZE_OP_PUSH_OR_JUMP_EXACT1);
SIZE_OP_PUSH_OR_JUMP_EXACT1  828 regcomp.c      	-(mod_tlen + (int )SIZE_OP_JUMP + (int )SIZE_OP_PUSH_OR_JUMP_EXACT1));


SIZE_OP_REPEAT_INC

SIZE_OP_REPEAT_INC  663 regcomp.c        r = add_rel_addr(reg, target_len + SIZE_OP_REPEAT_INC);
SIZE_OP_REPEAT_INC  747 regcomp.c          len = SIZE_OP_REPEAT_INC


SIZE_OP_RETURN

SIZE_OP_RETURN    958 regcomp.c      	  + SIZE_OP_CALL + SIZE_OP_JUMP + SIZE_OP_RETURN;
SIZE_OP_RETURN   1022 regcomp.c            len += (SIZE_OP_MEMORY_START_PUSH + SIZE_OP_RETURN);


SIZE_OP_SET_OPTION

SIZE_OP_SET_OPTION  904 regcomp.c          return SIZE_OP_SET_OPTION_PUSH + SIZE_OP_SET_OPTION + SIZE_OP_FAIL
SIZE_OP_SET_OPTION  905 regcomp.c                 + tlen + SIZE_OP_SET_OPTION;
SIZE_OP_SET_OPTION 2195 regexec.c            p += SIZE_OP_SET_OPTION + SIZE_OP_FAIL;


SIZE_POINTER

SIZE_POINTER      230 regcomp.c        BBUF_ADD(reg, &ptr, SIZE_POINTER);
SIZE_POINTER      553 regcomp.c          len = SIZE_OPCODE + SIZE_POINTER;


SIZE_RELADDR

SIZE_RELADDR      194 regcomp.c        BBUF_ADD(reg, &ra, SIZE_RELADDR);
SIZE_RELADDR      748 regcomp.c              + mod_tlen + SIZE_OPCODE + SIZE_RELADDR + SIZE_MEMNUM;
SIZE_RELADDR     5321 regcomp.c      	bp += SIZE_RELADDR;
SIZE_RELADDR     5329 regcomp.c            bp += SIZE_RELADDR;
SIZE_RELADDR     2229 regexec.c      	    p += SIZE_RELADDR;
SIZE_RELADDR      686 regint.h       #define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
SIZE_RELADDR      687 regint.h       #define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
SIZE_RELADDR      689 regint.h       #define SIZE_OP_PUSH_OR_JUMP_EXACT1    (SIZE_OPCODE + SIZE_RELADDR + 1)
SIZE_RELADDR      690 regint.h       #define SIZE_OP_PUSH_IF_PEEK_NEXT      (SIZE_OPCODE + SIZE_RELADDR + 1)
SIZE_RELADDR      694 regint.h       #define SIZE_OP_PUSH_POS_NOT           (SIZE_OPCODE + SIZE_RELADDR)
SIZE_RELADDR      711 regint.h       #define SIZE_OP_PUSH_LOOK_BEHIND_NOT   (SIZE_OPCODE + SIZE_RELADDR + SIZE_LENGTH)


SJIS_INPUT

SJIS_INPUT       1248 ext/nkf/nkf-utf8/nkf.c             input_f = SJIS_INPUT;
SJIS_INPUT       1913 ext/nkf/nkf-utf8/nkf.c     } else if (input_f == SJIS_INPUT) {


SJIS_ISMB_TRAIL

SJIS_ISMB_TRAIL   196 sjis.c           if (SJIS_ISMB_TRAIL(*p)) {
SJIS_ISMB_TRAIL   214 sjis.c           return (SJIS_ISMB_TRAIL(c) ? FALSE : TRUE);


SMALLBUF

SMALLBUF         1787 time.c             len = strftime(*buf, SMALLBUF, format, time);
SMALLBUF         1851 time.c             char buffer[SMALLBUF], *buf = buffer;


SMALL_CRITERIA

SMALL_CRITERIA     57 missing/acosh.c     if (z < SMALL_CRITERIA) return x;
SMALL_CRITERIA     80 missing/acosh.c     if (z < SMALL_CRITERIA) return x;


SMALL_CRITERIA_BIT

SMALL_CRITERIA_BIT   28 missing/acosh.c #if SMALL_CRITERIA_BIT > 0
SMALL_CRITERIA_BIT   29 missing/acosh.c #define SMALL_CRITERIA (1.0/SMALL_CRITERIA_BIT)


SO

SO               2103 ext/nkf/nkf-utf8/nkf.c             } else if (c1 == SO) {
SO               2711 ext/nkf/nkf-utf8/nkf.c     if (c2 == SO) c2 = X0201;


SPACE

SPACE            1984 ext/nkf/nkf-utf8/nkf.c                 if ((c1 == DEL) || (c1 <= SPACE)) {
SPACE            2050 ext/nkf/nkf-utf8/nkf.c             } else if ((c1 > SPACE) && (c1 != DEL)) {
SPACE            2057 ext/nkf/nkf-utf8/nkf.c                     } else if (SPACE<=c1 && c1<(0xe0&0x7f) ){
SPACE            2191 ext/nkf/nkf-utf8/nkf.c                    if ( (SPACE<=c3 && c3 < 0x60) || (0xa0<=c3 && c3 < 0xe0)){
SPACE            2210 ext/nkf/nkf-utf8/nkf.c 		if ((c1=(*i_getc)(f))!=EOF && c1 == SPACE) {
SPACE            2211 ext/nkf/nkf-utf8/nkf.c 		    i_ungetc(SPACE,f);
SPACE            2220 ext/nkf/nkf-utf8/nkf.c 		    if (c1==SPACE) {
SPACE            2221 ext/nkf/nkf-utf8/nkf.c 			i_ungetc(SPACE,f);
SPACE            2223 ext/nkf/nkf-utf8/nkf.c 		    } else if (c1 == NL && (c1=(*i_getc)(f))!=EOF && c1 == SPACE) {
SPACE            2224 ext/nkf/nkf-utf8/nkf.c 			i_ungetc(SPACE,f);
SPACE            2424 ext/nkf/nkf-utf8/nkf.c         c1 = c1 - ((c1 > DEL) ? SPACE : 0x1f);
SPACE            2447 ext/nkf/nkf-utf8/nkf.c     } else if ((c2 == EOF) || (c2 == 0) || c2 < SPACE) {
SPACE            2487 ext/nkf/nkf-utf8/nkf.c     } else if ((c2 == EOF) || (c2 == 0) || c2 < SPACE) {
SPACE            3314 ext/nkf/nkf-utf8/nkf.c                 else if (SPACE<=c1 && c1<=(0xdf&0x7f)) {      /* X0201 */
SPACE            3406 ext/nkf/nkf-utf8/nkf.c             (*o_zconv)(dv[(z_prev1-SPACE)*2],dv[(z_prev1-SPACE)*2+1]);
SPACE            3408 ext/nkf/nkf-utf8/nkf.c         } else if (c1==(0xdf&0x7f)&&ev[(z_prev1-SPACE)*2]) {  /* $BH>ByE@(B */
SPACE            3410 ext/nkf/nkf-utf8/nkf.c             (*o_zconv)(ev[(z_prev1-SPACE)*2],ev[(z_prev1-SPACE)*2+1]);
SPACE            3414 ext/nkf/nkf-utf8/nkf.c             (*o_zconv)(cv[(z_prev1-SPACE)*2],cv[(z_prev1-SPACE)*2+1]);
SPACE            3424 ext/nkf/nkf-utf8/nkf.c         if (dv[(c1-SPACE)*2]||ev[(c1-SPACE)*2]) {
SPACE            3429 ext/nkf/nkf-utf8/nkf.c             (*o_zconv)(cv[(c1-SPACE)*2],cv[(c1-SPACE)*2+1]);
SPACE            3614 ext/nkf/nkf-utf8/nkf.c #define nkf_isblank(c) (c == SPACE || c == TAB)
SPACE            4066 ext/nkf/nkf-utf8/nkf.c 			if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
SPACE            4067 ext/nkf/nkf-utf8/nkf.c 			    i_ungetc(SPACE,f);
SPACE            4075 ext/nkf/nkf-utf8/nkf.c 			    if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
SPACE            4076 ext/nkf/nkf-utf8/nkf.c 				i_ungetc(SPACE,f);
SPACE            4088 ext/nkf/nkf-utf8/nkf.c 		case SPACE:
SPACE            4107 ext/nkf/nkf-utf8/nkf.c 		if (c1=='=' && (lwsp_buf[lwsp_count-1]==SPACE||lwsp_buf[lwsp_count-1]==TAB)) {
SPACE            4182 ext/nkf/nkf-utf8/nkf.c 		    if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
SPACE            4183 ext/nkf/nkf-utf8/nkf.c 			i_ungetc(SPACE,f);
SPACE            4191 ext/nkf/nkf-utf8/nkf.c 			if (c1==SPACE) {
SPACE            4192 ext/nkf/nkf-utf8/nkf.c 			    i_ungetc(SPACE,f);
SPACE            4194 ext/nkf/nkf-utf8/nkf.c 			} else if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
SPACE            4195 ext/nkf/nkf-utf8/nkf.c 			    i_ungetc(SPACE,f);
SPACE            4207 ext/nkf/nkf-utf8/nkf.c 	    case SPACE:
SPACE            4226 ext/nkf/nkf-utf8/nkf.c 	    if (c1=='=' && (lwsp_buf[lwsp_count-1]==SPACE||lwsp_buf[lwsp_count-1]==TAB)) {
SPACE            4384 ext/nkf/nkf-utf8/nkf.c 	(*o_mputc)(SPACE);
SPACE            4387 ext/nkf/nkf-utf8/nkf.c 	    && (mimeout_buf[i]==SPACE || mimeout_buf[i]==TAB
SPACE            4394 ext/nkf/nkf-utf8/nkf.c 	    if (mimeout_buf[i]==SPACE || mimeout_buf[i]==TAB
SPACE            4458 ext/nkf/nkf-utf8/nkf.c 	if(c==SPACE){
SPACE            4464 ext/nkf/nkf-utf8/nkf.c 	} else if(c<SPACE||c=='='||c=='?'||c=='_'||DEL<=c) {
SPACE            4509 ext/nkf/nkf-utf8/nkf.c                 (*o_base64conv)(0,SPACE);
SPACE            4581 ext/nkf/nkf-utf8/nkf.c             if (c <= SPACE) {
SPACE            4583 ext/nkf/nkf-utf8/nkf.c                 (*o_mputc)(SPACE);
SPACE            4620 ext/nkf/nkf-utf8/nkf.c                         (*o_mputc)(SPACE);
SPACE            4638 ext/nkf/nkf-utf8/nkf.c             if (lastchar==SPACE) {
SPACE            4643 ext/nkf/nkf-utf8/nkf.c                 mimeout_buf[0] = SPACE;
SPACE            4657 ext/nkf/nkf-utf8/nkf.c                 } else if (SPACE<c && c<DEL) {
SPACE            4666 ext/nkf/nkf-utf8/nkf.c             if (c==SPACE || c==TAB || c==CR || c==NL) {
SPACE            4668 ext/nkf/nkf-utf8/nkf.c                     if (SPACE<mimeout_buf[i] && mimeout_buf[i]<DEL) {
SPACE            4688 ext/nkf/nkf-utf8/nkf.c             if (mimeout_buf_count>0 && SPACE<c && c!='=') {


SPECIAL_CONST_P

SPECIAL_CONST_P    40 compar.c           if (SPECIAL_CONST_P(y)) {
SPECIAL_CONST_P  2287 ext/zlib/zlib.c 	if (!SPECIAL_CONST_P(gz->io) && OBJ_IS_FREED(gz->io)) {
SPECIAL_CONST_P   131 object.c           if (SPECIAL_CONST_P(obj)) {
SPECIAL_CONST_P   469 ruby.h         #define FL_ABLE(x) (!SPECIAL_CONST_P(x) && BUILTIN_TYPE(x) != T_NODE)
SPECIAL_CONST_P   702 ruby.h             if (SPECIAL_CONST_P(obj)) return Qtrue;


SPECIAL_SINGLETON

SPECIAL_SINGLETON  775 class.c        	SPECIAL_SINGLETON(Qnil, rb_cNilClass);
SPECIAL_SINGLETON  776 class.c        	SPECIAL_SINGLETON(Qfalse, rb_cFalseClass);
SPECIAL_SINGLETON  777 class.c        	SPECIAL_SINGLETON(Qtrue, rb_cTrueClass);


SPTAB

SPTAB             679 missing/crypt.c #define	DOXOR(x,y,i)	x^=SPTAB(SPE[0][i],B.b[i]); y^=SPTAB(SPE[1][i],B.b[i]);
SPTAB             683 missing/crypt.c #define	DOXOR(x,y,i)	j=B.b[i]; x^=SPTAB(SPE[0][i],j); y^=SPTAB(SPE[1][i],j);
SPTAB             686 missing/crypt.c #define	DOXOR(x,y,i)	k=B.b[i]; x^=SPTAB(SPE[0][i],k); y^=SPTAB(SPE[1][i],k);


SSO

SSO              1483 ext/nkf/nkf-utf8/nkf.c     }else if (c2 == SSO){
SSO              1560 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, SSO);
SSO              1625 ext/nkf/nkf-utf8/nkf.c           }else if (SSO == c || (0xa1 <= c && c <= 0xfe)){
SSO              2028 ext/nkf/nkf-utf8/nkf.c                     } else if (c1==SSO && iconv != s_iconv) {
SSO              2484 ext/nkf/nkf-utf8/nkf.c     } else if (c2 == SSO){
SSO              2876 ext/nkf/nkf-utf8/nkf.c         (*o_putc)(SSO); (*o_putc)(c1|0x80);


SSP

SSP              2018 ext/nkf/nkf-utf8/nkf.c                     } else if (SSP<=c1 && c1<0xe0 && iconv == s_iconv) {
SSP              2032 ext/nkf/nkf-utf8/nkf.c                         if (SSP<=c1 && c1<0xe0) {


STACK

STACK            9923 eval.c         #define ADJ(addr) (void*)(STACK(addr)?(((VALUE*)(addr)-th->stk_pos)+th->stk_ptr):(VALUE*)(addr))
STACK              95 ext/openssl/ossl.c ossl_##name##_sk2ary(STACK *sk)			\
STACK             546 ext/openssl/ossl_pkcs7.c static STACK *
STACK             441 ext/openssl/ossl_ssl.c     num = sk_num((STACK*)ciphers);
STACK             444 ext/openssl/ossl_ssl.c         cipher = (SSL_CIPHER*)sk_value((STACK*)ciphers, i);


STACK_AT

STACK_AT          647 regexec.c              STACK_AT(stk->u.repeat_inc.si)->u.repeat.count--;\
STACK_AT          668 regexec.c            STACK_AT(stk->u.repeat_inc.si)->u.repeat.count--;\
STACK_AT          687 regexec.c            STACK_AT(stk->u.repeat_inc.si)->u.repeat.count--;\
STACK_AT          781 regexec.c                      endp = STACK_AT(k->u.mem.end)->u.mem.pstr;\
STACK_AT          784 regexec.c                    if (STACK_AT(k->u.mem.start)->u.mem.pstr != endp) {\
STACK_AT          822 regexec.c                        endp = STACK_AT(k->u.mem.end)->u.mem.pstr;\
STACK_AT          825 regexec.c                      if (STACK_AT(k->u.mem.start)->u.mem.pstr != endp) {\
STACK_AT         1285 regexec.c      		  rmt[i].rm_so = STACK_AT(mem_start_stk[i])->u.mem.pstr - str;
STACK_AT         1290 regexec.c      				? STACK_AT(mem_end_stk[i])->u.mem.pstr
STACK_AT         1305 regexec.c      		  region->beg[i] = STACK_AT(mem_start_stk[i])->u.mem.pstr - str;
STACK_AT         1310 regexec.c      				  ? STACK_AT(mem_end_stk[i])->u.mem.pstr
STACK_AT         2063 regexec.c      	  pstart = STACK_AT(mem_start_stk[mem])->u.mem.pstr;
STACK_AT         2068 regexec.c      		? STACK_AT(mem_end_stk[mem])->u.mem.pstr
STACK_AT         2095 regexec.c      	  pstart = STACK_AT(mem_start_stk[mem])->u.mem.pstr;
STACK_AT         2100 regexec.c      		? STACK_AT(mem_end_stk[mem])->u.mem.pstr
STACK_AT         2127 regexec.c      	    pstart = STACK_AT(mem_start_stk[mem])->u.mem.pstr;
STACK_AT         2132 regexec.c      		  ? STACK_AT(mem_end_stk[mem])->u.mem.pstr
STACK_AT         2166 regexec.c      	    pstart = STACK_AT(mem_start_stk[mem])->u.mem.pstr;
STACK_AT         2171 regexec.c      		  ? STACK_AT(mem_end_stk[mem])->u.mem.pstr
STACK_AT         2382 regexec.c            stkp = STACK_AT(si);
STACK_AT         2391 regexec.c              p = STACK_AT(si)->u.repeat.pcode; /* Don't use stkp after PUSH. */
STACK_AT         2412 regexec.c            stkp = STACK_AT(si);


STACK_BASE_CHECK

STACK_BASE_CHECK  614 regexec.c        STACK_BASE_CHECK(stk); \
STACK_BASE_CHECK  622 regexec.c            STACK_BASE_CHECK(stk); \
STACK_BASE_CHECK  629 regexec.c            STACK_BASE_CHECK(stk); \
STACK_BASE_CHECK  640 regexec.c            STACK_BASE_CHECK(stk); \
STACK_BASE_CHECK  661 regexec.c          STACK_BASE_CHECK(stk); \
STACK_BASE_CHECK  680 regexec.c          STACK_BASE_CHECK(stk); \
STACK_BASE_CHECK  700 regexec.c          STACK_BASE_CHECK(k); \
STACK_BASE_CHECK  715 regexec.c          STACK_BASE_CHECK(k); \
STACK_BASE_CHECK  730 regexec.c          STACK_BASE_CHECK(k); \
STACK_BASE_CHECK  745 regexec.c          STACK_BASE_CHECK(k); \
STACK_BASE_CHECK  765 regexec.c          STACK_BASE_CHECK(k); \
STACK_BASE_CHECK  805 regexec.c          STACK_BASE_CHECK(k); \
STACK_BASE_CHECK  853 regexec.c          STACK_BASE_CHECK(k); \
STACK_BASE_CHECK  871 regexec.c          STACK_BASE_CHECK(k); \


STACK_DIR

STACK_DIR         150 missing/alloca.c   if (STACK_DIR == 0)		/* unknown growth direction */
STACK_DIR         160 missing/alloca.c       if (STACK_DIR > 0 && hp->h.deep > depth
STACK_DIR         161 missing/alloca.c 	  || STACK_DIR < 0 && hp->h.deep < depth)


STACK_DIRECTION

STACK_DIRECTION    39 missing/alloca.c #ifndef STACK_DIRECTION
STACK_DIRECTION    42 missing/alloca.c -- must know STACK_DIRECTION at compile-time
STACK_DIRECTION    73 missing/alloca.c #ifndef STACK_DIRECTION
STACK_DIRECTION    77 missing/alloca.c #if STACK_DIRECTION != 0
STACK_DIRECTION    79 missing/alloca.c #define	STACK_DIR	STACK_DIRECTION	/* known at compile-time */
STACK_DIRECTION   149 missing/alloca.c #if STACK_DIRECTION == 0


STACK_END

STACK_END         448 gc.c           # define STACK_LENGTH  (rb_gc_stack_start - STACK_END + 0x80)
STACK_END         450 gc.c           # define STACK_LENGTH  (rb_gc_stack_start - STACK_END)
STACK_END         452 gc.c           # define STACK_LENGTH  (STACK_END - rb_gc_stack_start + 1)
STACK_END         454 gc.c           # define STACK_LENGTH  ((STACK_END < rb_gc_stack_start) ? rb_gc_stack_start - STACK_END\
STACK_END         455 gc.c                                                      : STACK_END - rb_gc_stack_start + 1)
STACK_END         469 gc.c               if (STACK_END > addr) return grow_direction = 1;
STACK_END         487 gc.c               if (p) *p = STACK_UPPER(STACK_END, rb_gc_stack_start, STACK_END);
STACK_END        1309 gc.c               rb_gc_mark_locations((VALUE*)STACK_END, rb_gc_stack_start);
STACK_END        1311 gc.c               rb_gc_mark_locations(rb_gc_stack_start, (VALUE*)STACK_END + 1);
STACK_END        1313 gc.c               if ((VALUE*)STACK_END < rb_gc_stack_start)
STACK_END        1314 gc.c           	rb_gc_mark_locations((VALUE*)STACK_END, rb_gc_stack_start);
STACK_END        1316 gc.c           	rb_gc_mark_locations(rb_gc_stack_start, (VALUE*)STACK_END + 1);
STACK_END        1324 gc.c               rb_gc_mark_locations((VALUE*)((char*)STACK_END + 2),


STACK_ENSURE

STACK_ENSURE      469 regexec.c        STACK_ENSURE(1);\
STACK_ENSURE      484 regexec.c        STACK_ENSURE(1);\
STACK_ENSURE      497 regexec.c        STACK_ENSURE(1);\
STACK_ENSURE      506 regexec.c        STACK_ENSURE(1);\
STACK_ENSURE      513 regexec.c        STACK_ENSURE(1);\
STACK_ENSURE      525 regexec.c        STACK_ENSURE(1);\
STACK_ENSURE      536 regexec.c        STACK_ENSURE(1);\
STACK_ENSURE      577 regexec.c        STACK_ENSURE(1);\
STACK_ENSURE      585 regexec.c        STACK_ENSURE(1);\
STACK_ENSURE      592 regexec.c        STACK_ENSURE(1);\
STACK_ENSURE      599 regexec.c        STACK_ENSURE(1);\
STACK_ENSURE     2349 regexec.c      	STACK_ENSURE(1);
STACK_ENSURE     2366 regexec.c      	STACK_ENSURE(1);


STACK_GET_MEM_START

STACK_GET_MEM_START 2011 regexec.c            STACK_GET_MEM_START(mem, stkp); /* should be before push mem-end. */
STACK_GET_MEM_START 2021 regexec.c            STACK_GET_MEM_START(mem, stkp);


STACK_GET_REPEAT

STACK_GET_REPEAT 2404 regexec.c            STACK_GET_REPEAT(mem, stkp);
STACK_GET_REPEAT 2439 regexec.c            STACK_GET_REPEAT(mem, stkp);


STACK_INC

STACK_INC         474 regexec.c        STACK_INC;\
STACK_INC         480 regexec.c        STACK_INC;\
STACK_INC         486 regexec.c        STACK_INC;\
STACK_INC         502 regexec.c        STACK_INC;\
STACK_INC         509 regexec.c        STACK_INC;\
STACK_INC         521 regexec.c        STACK_INC;\
STACK_INC         532 regexec.c        STACK_INC;\
STACK_INC         539 regexec.c        STACK_INC;\
STACK_INC         581 regexec.c        STACK_INC;\
STACK_INC         588 regexec.c        STACK_INC;\
STACK_INC         595 regexec.c        STACK_INC;\
STACK_INC         601 regexec.c        STACK_INC;\


STACK_LENGTH

STACK_LENGTH      480 gc.c               (ret) = (STACK_LENGTH > STACK_LEVEL_MAX + GC_WATER_MARK);\
STACK_LENGTH      488 gc.c               return STACK_LENGTH;


STACK_LEVEL_MAX

STACK_LEVEL_MAX   425 gc.c           static unsigned int STACK_LEVEL_MAX = 65535;
STACK_LEVEL_MAX   431 gc.c           static unsigned int STACK_LEVEL_MAX = 655300;
STACK_LEVEL_MAX   480 gc.c               (ret) = (STACK_LENGTH > STACK_LEVEL_MAX + GC_WATER_MARK);\
STACK_LEVEL_MAX  1389 gc.c           #ifndef STACK_LEVEL_MAX
STACK_LEVEL_MAX  1390 gc.c               STACK_LEVEL_MAX = size/sizeof(VALUE);
STACK_LEVEL_MAX  1451 gc.c           	    STACK_LEVEL_MAX = (rlim.rlim_cur - space) / sizeof(VALUE);
STACK_LEVEL_MAX  1483 gc.c           	    STACK_LEVEL_MAX = (rlim.rlim_cur - space) / sizeof(VALUE);


STACK_OF

STACK_OF           53 ext/openssl/ossl.c     STACK_OF(X509) *sk;
STACK_OF           77 ext/openssl/ossl.c     return (STACK_OF(X509)*)rb_protect((VALUE(*)_((VALUE)))ossl_x509_ary2sk0,
STACK_OF           84 ext/openssl/ossl.c     STACK_OF(X509) *sk;
STACK_OF          111 ext/openssl/ossl.h STACK_OF(X509) *ossl_x509_ary2sk0(VALUE);
STACK_OF          112 ext/openssl/ossl.h STACK_OF(X509) *ossl_x509_ary2sk(VALUE);
STACK_OF          113 ext/openssl/ossl.h STACK_OF(X509) *ossl_protect_x509_ary2sk(VALUE,int*);
STACK_OF          114 ext/openssl/ossl.h VALUE ossl_x509_sk2ary(STACK_OF(X509) *certs);
STACK_OF          115 ext/openssl/ossl.h VALUE ossl_x509crl_sk2ary(STACK_OF(X509_CRL) *crl);
STACK_OF          261 ext/openssl/ossl_config.c     STACK_OF(CONF_VALUE) *sk;
STACK_OF          318 ext/openssl/ossl_config.c     STACK_OF(CONF_VALUE) *sk;
STACK_OF          323 ext/openssl/ossl_config.c     sk = (STACK_OF(CONF_VALUE)*)cv->value;
STACK_OF          364 ext/openssl/ossl_config.c     STACK_OF(CONF_VALUE) *sk;
STACK_OF          370 ext/openssl/ossl_config.c     sk = (STACK_OF(CONF_VALUE)*)cv->value;
STACK_OF          214 ext/openssl/ossl_ocsp.c     STACK_OF(X509) *x509s;
STACK_OF          240 ext/openssl/ossl_ocsp.c     STACK_OF(X509) *x509s;
STACK_OF          566 ext/openssl/ossl_ocsp.c     STACK_OF(X509) *x509s;
STACK_OF          594 ext/openssl/ossl_ocsp.c     STACK_OF(X509) *x509s;
STACK_OF           60 ext/openssl/ossl_pkcs12.c     STACK_OF(X509) *x509s;
STACK_OF           86 ext/openssl/ossl_pkcs12.c     STACK_OF(X509) *x509s = NULL;
STACK_OF          197 ext/openssl/ossl_pkcs7.c     STACK_OF(X509) *x509s;
STACK_OF          233 ext/openssl/ossl_pkcs7.c     STACK_OF(X509) *x509s;
STACK_OF          465 ext/openssl/ossl_pkcs7.c     STACK_OF(PKCS7_SIGNER_INFO) *sk;
STACK_OF          507 ext/openssl/ossl_pkcs7.c     STACK_OF(PKCS7_RECIP_INFO) *sk;
STACK_OF          550 ext/openssl/ossl_pkcs7.c     STACK_OF(X509) *certs;
STACK_OF          551 ext/openssl/ossl_pkcs7.c     STACK_OF(X509_CRL) *crls;
STACK_OF          581 ext/openssl/ossl_pkcs7.c     STACK_OF(X509) *certs;
STACK_OF          621 ext/openssl/ossl_pkcs7.c     STACK_OF(X509_CRL) *crls;
STACK_OF          641 ext/openssl/ossl_pkcs7.c     STACK_OF(X509) *x509s;
STACK_OF          426 ext/openssl/ossl_ssl.c     STACK_OF(SSL_CIPHER) *ciphers;
STACK_OF          778 ext/openssl/ossl_ssl.c     STACK_OF(X509) *chain;
STACK_OF          372 ext/openssl/ossl_x509store.c     STACK_OF(X509) *x509s = NULL;
STACK_OF          416 ext/openssl/ossl_x509store.c     STACK_OF(X509) *chain;


STACK_PAD_SIZE

STACK_PAD_SIZE   10290 eval.c             VALUE space[STACK_PAD_SIZE];
STACK_PAD_SIZE   10295 eval.c             if (addr_in_prev_frame < th->stk_pos + th->stk_len) stack_extend(th, exit, &space[STACK_PAD_SIZE-1]);
STACK_PAD_SIZE   10303 eval.c         	if (addr_in_prev_frame < th->stk_pos + th->stk_len) stack_extend(th, exit, &space[STACK_PAD_SIZE-1]);


STACK_POP_LEVEL_FREE

STACK_POP_LEVEL_FREE 4837 regcomp.c      	reg->stack_pop_level = STACK_POP_LEVEL_FREE;
STACK_POP_LEVEL_FREE  619 regexec.c        case STACK_POP_LEVEL_FREE:\


STACK_POP_LEVEL_MEM_START

STACK_POP_LEVEL_MEM_START 4835 regcomp.c      	reg->stack_pop_level = STACK_POP_LEVEL_MEM_START;
STACK_POP_LEVEL_MEM_START  626 regexec.c        case STACK_POP_LEVEL_MEM_START:\


STACK_PUSH

STACK_PUSH        489 regexec.c      #define STACK_PUSH_ALT(pat,s,sprev)     STACK_PUSH(STK_ALT,pat,s,sprev)
STACK_PUSH        490 regexec.c      #define STACK_PUSH_POS(s,sprev)         STACK_PUSH(STK_POS,NULL_UCHARP,s,sprev)
STACK_PUSH        491 regexec.c      #define STACK_PUSH_POS_NOT(pat,s,sprev) STACK_PUSH(STK_POS_NOT,pat,s,sprev)
STACK_PUSH        494 regexec.c              STACK_PUSH(STK_LOOK_BEHIND_NOT,pat,s,sprev)


STACK_PUSH_ALT

STACK_PUSH_ALT   1767 regexec.c      	STACK_PUSH_ALT(p, s, sprev);
STACK_PUSH_ALT   1779 regexec.c      	STACK_PUSH_ALT(p, s, sprev);
STACK_PUSH_ALT   1797 regexec.c      	  STACK_PUSH_ALT(p + 1, s, sprev);
STACK_PUSH_ALT   1812 regexec.c      	  STACK_PUSH_ALT(p + 1, s, sprev);
STACK_PUSH_ALT   2194 regexec.c            STACK_PUSH_ALT(p, s, sprev);
STACK_PUSH_ALT   2307 regexec.c            STACK_PUSH_ALT(p + addr, s, sprev);
STACK_PUSH_ALT   2322 regexec.c      	STACK_PUSH_ALT(p + addr, s, sprev);
STACK_PUSH_ALT   2335 regexec.c      	STACK_PUSH_ALT(p + addr, s, sprev);
STACK_PUSH_ALT   2354 regexec.c      	  STACK_PUSH_ALT(p + addr, s, sprev);
STACK_PUSH_ALT   2371 regexec.c      	  STACK_PUSH_ALT(p, s, sprev);
STACK_PUSH_ALT   2390 regexec.c              STACK_PUSH_ALT(p, s, sprev);
STACK_PUSH_ALT   2422 regexec.c                STACK_PUSH_ALT(pcode, s, sprev);


STACK_PUSH_MEM_END

STACK_PUSH_MEM_END 1996 regexec.c            STACK_PUSH_MEM_END(mem, s);
STACK_PUSH_MEM_END 2012 regexec.c            STACK_PUSH_MEM_END(mem, s);


STACK_PUSH_REPEAT

STACK_PUSH_REPEAT 2351 regexec.c      	STACK_PUSH_REPEAT(mem, p);
STACK_PUSH_REPEAT 2368 regexec.c      	STACK_PUSH_REPEAT(mem, p);


STACK_PUSH_REPEAT_INC

STACK_PUSH_REPEAT_INC 2396 regexec.c            STACK_PUSH_REPEAT_INC(si);
STACK_PUSH_REPEAT_INC 2421 regexec.c                STACK_PUSH_REPEAT_INC(si);
STACK_PUSH_REPEAT_INC 2426 regexec.c                STACK_PUSH_REPEAT_INC(si);
STACK_PUSH_REPEAT_INC 2430 regexec.c              STACK_PUSH_REPEAT_INC(si);


STACK_SAVE

STACK_SAVE        432 regexec.c            STACK_SAVE;
STACK_SAVE        448 regexec.c            STACK_SAVE;
STACK_SAVE        461 regexec.c          if (r != 0) { STACK_SAVE; return r; } \
STACK_SAVE       2558 regexec.c        STACK_SAVE;
STACK_SAVE       2563 regexec.c        STACK_SAVE;
STACK_SAVE       2568 regexec.c        STACK_SAVE;
STACK_SAVE       2572 regexec.c        STACK_SAVE;


STACK_UPPER

STACK_UPPER       487 gc.c               if (p) *p = STACK_UPPER(STACK_END, rb_gc_stack_start, STACK_END);
STACK_UPPER      1424 gc.c           	STACK_UPPER((VALUE *)&m, (VALUE *)m.BaseAddress,
STACK_UPPER      1433 gc.c               STACK_UPPER(&addr, addr, ++addr);
STACK_UPPER      1435 gc.c           	if (STACK_UPPER(&addr,
STACK_UPPER      1464 gc.c                   STACK_UPPER(&addr,


STATIC

STATIC            288 ext/nkf/nkf-utf8/nkf.c STATIC char *input_codename = "";
STATIC            291 ext/nkf/nkf-utf8/nkf.c STATIC const char *CopyRight = COPY_RIGHT;
STATIC            294 ext/nkf/nkf-utf8/nkf.c STATIC  int     noconvert PROTO((FILE *f));
STATIC            296 ext/nkf/nkf-utf8/nkf.c STATIC  int     kanji_convert PROTO((FILE *f));
STATIC            297 ext/nkf/nkf-utf8/nkf.c STATIC  int     h_conv PROTO((FILE *f,int c2,int c1));
STATIC            298 ext/nkf/nkf-utf8/nkf.c STATIC  int     push_hold_buf PROTO((int c2));
STATIC            299 ext/nkf/nkf-utf8/nkf.c STATIC  void    set_iconv PROTO((int f, int (*iconv_func)(int c2,int c1,int c0)));
STATIC            300 ext/nkf/nkf-utf8/nkf.c STATIC  int     s_iconv PROTO((int c2,int c1,int c0));
STATIC            301 ext/nkf/nkf-utf8/nkf.c STATIC  int     s2e_conv PROTO((int c2, int c1, int *p2, int *p1));
STATIC            302 ext/nkf/nkf-utf8/nkf.c STATIC  int     e_iconv PROTO((int c2,int c1,int c0));
STATIC            304 ext/nkf/nkf-utf8/nkf.c STATIC  int     w2e_conv PROTO((int c2,int c1,int c0,int *p2,int *p1));
STATIC            305 ext/nkf/nkf-utf8/nkf.c STATIC  int     w_iconv PROTO((int c2,int c1,int c0));
STATIC            306 ext/nkf/nkf-utf8/nkf.c STATIC  int     w_iconv16 PROTO((int c2,int c1,int c0));
STATIC            307 ext/nkf/nkf-utf8/nkf.c STATIC  int	w_iconv_common PROTO((int c1,int c0,const unsigned short *const *pp,int psize,int *p2,int *p1));
STATIC            308 ext/nkf/nkf-utf8/nkf.c STATIC  int     ww16_conv PROTO((int c2, int c1, int c0));
STATIC            311 ext/nkf/nkf-utf8/nkf.c STATIC  int     e2w_conv PROTO((int c2,int c1));
STATIC            312 ext/nkf/nkf-utf8/nkf.c STATIC  void    w_oconv PROTO((int c2,int c1));
STATIC            313 ext/nkf/nkf-utf8/nkf.c STATIC  void    w_oconv16 PROTO((int c2,int c1));
STATIC            315 ext/nkf/nkf-utf8/nkf.c STATIC  void    e_oconv PROTO((int c2,int c1));
STATIC            316 ext/nkf/nkf-utf8/nkf.c STATIC  int     e2s_conv PROTO((int c2, int c1, int *p2, int *p1));
STATIC            317 ext/nkf/nkf-utf8/nkf.c STATIC  void    s_oconv PROTO((int c2,int c1));
STATIC            318 ext/nkf/nkf-utf8/nkf.c STATIC  void    j_oconv PROTO((int c2,int c1));
STATIC            319 ext/nkf/nkf-utf8/nkf.c STATIC  void    fold_conv PROTO((int c2,int c1));
STATIC            320 ext/nkf/nkf-utf8/nkf.c STATIC  void    cr_conv PROTO((int c2,int c1));
STATIC            321 ext/nkf/nkf-utf8/nkf.c STATIC  void    z_conv PROTO((int c2,int c1));
STATIC            322 ext/nkf/nkf-utf8/nkf.c STATIC  void    rot_conv PROTO((int c2,int c1));
STATIC            323 ext/nkf/nkf-utf8/nkf.c STATIC  void    hira_conv PROTO((int c2,int c1));
STATIC            324 ext/nkf/nkf-utf8/nkf.c STATIC  void    base64_conv PROTO((int c2,int c1));
STATIC            325 ext/nkf/nkf-utf8/nkf.c STATIC  void    iso2022jp_check_conv PROTO((int c2,int c1));
STATIC            326 ext/nkf/nkf-utf8/nkf.c STATIC  void    no_connection PROTO((int c2,int c1));
STATIC            327 ext/nkf/nkf-utf8/nkf.c STATIC  int     no_connection2 PROTO((int c2,int c1,int c0));
STATIC            329 ext/nkf/nkf-utf8/nkf.c STATIC  void    code_score PROTO((struct input_code *ptr));
STATIC            330 ext/nkf/nkf-utf8/nkf.c STATIC  void    code_status PROTO((int c));
STATIC            332 ext/nkf/nkf-utf8/nkf.c STATIC  void    std_putc PROTO((int c));
STATIC            333 ext/nkf/nkf-utf8/nkf.c STATIC  int     std_getc PROTO((FILE *f));
STATIC            334 ext/nkf/nkf-utf8/nkf.c STATIC  int     std_ungetc PROTO((int c,FILE *f));
STATIC            336 ext/nkf/nkf-utf8/nkf.c STATIC  int     broken_getc PROTO((FILE *f));
STATIC            337 ext/nkf/nkf-utf8/nkf.c STATIC  int     broken_ungetc PROTO((int c,FILE *f));
STATIC            339 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_begin PROTO((FILE *f));
STATIC            340 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_getc PROTO((FILE *f));
STATIC            341 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_ungetc PROTO((int c,FILE *f));
STATIC            343 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_begin_strict PROTO((FILE *f));
STATIC            344 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_getc_buf PROTO((FILE *f));
STATIC            345 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_ungetc_buf  PROTO((int c,FILE *f));
STATIC            346 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_integrity PROTO((FILE *f,const unsigned char *p));
STATIC            348 ext/nkf/nkf-utf8/nkf.c STATIC  int     base64decode PROTO((int c));
STATIC            349 ext/nkf/nkf-utf8/nkf.c STATIC  void    mime_prechar PROTO((int c2, int c1));
STATIC            350 ext/nkf/nkf-utf8/nkf.c STATIC  void    mime_putc PROTO((int c));
STATIC            351 ext/nkf/nkf-utf8/nkf.c STATIC  void    open_mime PROTO((int c));
STATIC            352 ext/nkf/nkf-utf8/nkf.c STATIC  void    close_mime PROTO(());
STATIC            354 ext/nkf/nkf-utf8/nkf.c STATIC  void    usage PROTO(());
STATIC            355 ext/nkf/nkf-utf8/nkf.c STATIC  void    version PROTO(());
STATIC            357 ext/nkf/nkf-utf8/nkf.c STATIC  void    options PROTO((unsigned char *c));
STATIC            359 ext/nkf/nkf-utf8/nkf.c STATIC  void    reinit PROTO(());
STATIC            365 ext/nkf/nkf-utf8/nkf.c STATIC unsigned char   stdibuf[IOBUF_SIZE];
STATIC            366 ext/nkf/nkf-utf8/nkf.c STATIC unsigned char   stdobuf[IOBUF_SIZE];
STATIC            368 ext/nkf/nkf-utf8/nkf.c STATIC unsigned char   hold_buf[HOLD_SIZE*2];
STATIC            369 ext/nkf/nkf-utf8/nkf.c STATIC int             hold_count;
STATIC            376 ext/nkf/nkf-utf8/nkf.c STATIC unsigned char           mime_buf[MIME_BUF_SIZE];
STATIC            377 ext/nkf/nkf-utf8/nkf.c STATIC unsigned int            mime_top = 0;
STATIC            378 ext/nkf/nkf-utf8/nkf.c STATIC unsigned int            mime_last = 0;  /* decoded */
STATIC            379 ext/nkf/nkf-utf8/nkf.c STATIC unsigned int            mime_input = 0; /* undecoded */
STATIC            380 ext/nkf/nkf-utf8/nkf.c STATIC int (*mime_iconv_back)PROTO((int c2,int c1,int c0)) = NULL;
STATIC            383 ext/nkf/nkf-utf8/nkf.c STATIC int             unbuf_f = FALSE;
STATIC            384 ext/nkf/nkf-utf8/nkf.c STATIC int             estab_f = FALSE;
STATIC            385 ext/nkf/nkf-utf8/nkf.c STATIC int             nop_f = FALSE;
STATIC            386 ext/nkf/nkf-utf8/nkf.c STATIC int             binmode_f = TRUE;       /* binary mode */
STATIC            387 ext/nkf/nkf-utf8/nkf.c STATIC int             rot_f = FALSE;          /* rot14/43 mode */
STATIC            388 ext/nkf/nkf-utf8/nkf.c STATIC int             hira_f = FALSE;          /* hira/kata henkan */
STATIC            389 ext/nkf/nkf-utf8/nkf.c STATIC int             input_f = FALSE;        /* non fixed input code  */
STATIC            390 ext/nkf/nkf-utf8/nkf.c STATIC int             alpha_f = FALSE;        /* convert JIx0208 alphbet to ASCII */
STATIC            391 ext/nkf/nkf-utf8/nkf.c STATIC int             mime_f = STRICT_MIME;   /* convert MIME B base64 or Q */
STATIC            392 ext/nkf/nkf-utf8/nkf.c STATIC int             mime_decode_f = FALSE;  /* mime decode is explicitly on */
STATIC            393 ext/nkf/nkf-utf8/nkf.c STATIC int             mimebuf_f = FALSE;      /* MIME buffered input */
STATIC            394 ext/nkf/nkf-utf8/nkf.c STATIC int             broken_f = FALSE;       /* convert ESC-less broken JIS */
STATIC            395 ext/nkf/nkf-utf8/nkf.c STATIC int             iso8859_f = FALSE;      /* ISO8859 through */
STATIC            396 ext/nkf/nkf-utf8/nkf.c STATIC int             mimeout_f = FALSE;       /* base64 mode */
STATIC            398 ext/nkf/nkf-utf8/nkf.c STATIC int             x0201_f = TRUE;         /* Assume JISX0201 kana */
STATIC            400 ext/nkf/nkf-utf8/nkf.c STATIC int             x0201_f = NO_X0201;     /* Assume NO JISX0201 */
STATIC            402 ext/nkf/nkf-utf8/nkf.c STATIC int             iso2022jp_f = FALSE;    /* convert ISO-2022-JP */
STATIC            404 ext/nkf/nkf-utf8/nkf.c STATIC int             internal_unicode_f = FALSE;   /* Internal Unicode Processing */
STATIC            407 ext/nkf/nkf-utf8/nkf.c STATIC int             unicode_bom_f= 0;   /* Output Unicode BOM */
STATIC            408 ext/nkf/nkf-utf8/nkf.c STATIC int             w_oconv16_LE = 0;   /* utf-16 little endian */
STATIC            409 ext/nkf/nkf-utf8/nkf.c STATIC int             ms_ucs_map_f = FALSE;   /* Microsoft UCS Mapping Compatible */
STATIC            413 ext/nkf/nkf-utf8/nkf.c STATIC int nfc_f = FALSE;
STATIC            414 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_nfc_getc)PROTO((FILE *)) = std_getc; /* input of ugetc */
STATIC            415 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_nfc_ungetc)PROTO((int c ,FILE *f)) = std_ungetc;
STATIC            416 ext/nkf/nkf-utf8/nkf.c STATIC int nfc_getc PROTO((FILE *f));
STATIC            417 ext/nkf/nkf-utf8/nkf.c STATIC int nfc_ungetc PROTO((int c,FILE *f));
STATIC            421 ext/nkf/nkf-utf8/nkf.c STATIC int cap_f = FALSE;
STATIC            422 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_cgetc)PROTO((FILE *)) = std_getc; /* input of cgetc */
STATIC            423 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_cungetc)PROTO((int c ,FILE *f)) = std_ungetc;
STATIC            424 ext/nkf/nkf-utf8/nkf.c STATIC int cap_getc PROTO((FILE *f));
STATIC            425 ext/nkf/nkf-utf8/nkf.c STATIC int cap_ungetc PROTO((int c,FILE *f));
STATIC            427 ext/nkf/nkf-utf8/nkf.c STATIC int url_f = FALSE;
STATIC            428 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_ugetc)PROTO((FILE *)) = std_getc; /* input of ugetc */
STATIC            429 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_uungetc)PROTO((int c ,FILE *f)) = std_ungetc;
STATIC            430 ext/nkf/nkf-utf8/nkf.c STATIC int url_getc PROTO((FILE *f));
STATIC            431 ext/nkf/nkf-utf8/nkf.c STATIC int url_ungetc PROTO((int c,FILE *f));
STATIC            437 ext/nkf/nkf-utf8/nkf.c STATIC int numchar_f = FALSE;
STATIC            438 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_ngetc)PROTO((FILE *)) = std_getc; /* input of ugetc */
STATIC            439 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_nungetc)PROTO((int c ,FILE *f)) = std_ungetc;
STATIC            440 ext/nkf/nkf-utf8/nkf.c STATIC int numchar_getc PROTO((FILE *f));
STATIC            441 ext/nkf/nkf-utf8/nkf.c STATIC int numchar_ungetc PROTO((int c,FILE *f));
STATIC            445 ext/nkf/nkf-utf8/nkf.c STATIC int noout_f = FALSE;
STATIC            446 ext/nkf/nkf-utf8/nkf.c STATIC void no_putc PROTO((int c));
STATIC            447 ext/nkf/nkf-utf8/nkf.c STATIC int debug_f = FALSE;
STATIC            448 ext/nkf/nkf-utf8/nkf.c STATIC void debug PROTO((const char *str));
STATIC            449 ext/nkf/nkf-utf8/nkf.c STATIC int (*iconv_for_check)() = 0;
STATIC            452 ext/nkf/nkf-utf8/nkf.c STATIC int guess_f = FALSE;
STATIC            454 ext/nkf/nkf-utf8/nkf.c STATIC  void    print_guessed_code PROTO((char *filename));
STATIC            456 ext/nkf/nkf-utf8/nkf.c STATIC  void    set_input_codename PROTO((char *codename));
STATIC            457 ext/nkf/nkf-utf8/nkf.c STATIC int is_inputcode_mixed = FALSE;
STATIC            458 ext/nkf/nkf-utf8/nkf.c STATIC int is_inputcode_set   = FALSE;
STATIC            461 ext/nkf/nkf-utf8/nkf.c STATIC int exec_f = 0;
STATIC            465 ext/nkf/nkf-utf8/nkf.c STATIC int cp932_f = TRUE;
STATIC            469 ext/nkf/nkf-utf8/nkf.c STATIC int cp932inv_f = TRUE;
STATIC            477 ext/nkf/nkf-utf8/nkf.c STATIC int x0212_f = FALSE;
STATIC            478 ext/nkf/nkf-utf8/nkf.c STATIC int x0212_shift PROTO((int c));
STATIC            479 ext/nkf/nkf-utf8/nkf.c STATIC int x0212_unshift PROTO((int c));
STATIC            482 ext/nkf/nkf-utf8/nkf.c STATIC unsigned char prefix_table[256];
STATIC            484 ext/nkf/nkf-utf8/nkf.c STATIC void e_status PROTO((struct input_code *, int));
STATIC            485 ext/nkf/nkf-utf8/nkf.c STATIC void s_status PROTO((struct input_code *, int));
STATIC            488 ext/nkf/nkf-utf8/nkf.c STATIC void w_status PROTO((struct input_code *, int));
STATIC            489 ext/nkf/nkf-utf8/nkf.c STATIC void w16_status PROTO((struct input_code *, int));
STATIC            490 ext/nkf/nkf-utf8/nkf.c STATIC int             utf16_mode = UTF16BE_INPUT;
STATIC            503 ext/nkf/nkf-utf8/nkf.c STATIC int              mimeout_mode = 0;
STATIC            504 ext/nkf/nkf-utf8/nkf.c STATIC int              base64_count = 0;
STATIC            509 ext/nkf/nkf-utf8/nkf.c STATIC int             f_line = 0;    /* chars in line */
STATIC            510 ext/nkf/nkf-utf8/nkf.c STATIC int             f_prev = 0;
STATIC            511 ext/nkf/nkf-utf8/nkf.c STATIC int             fold_preserve_f = FALSE; /* preserve new lines */
STATIC            512 ext/nkf/nkf-utf8/nkf.c STATIC int             fold_f  = FALSE;
STATIC            513 ext/nkf/nkf-utf8/nkf.c STATIC int             fold_len  = 0;
STATIC            516 ext/nkf/nkf-utf8/nkf.c STATIC unsigned char   kanji_intro = DEFAULT_J;
STATIC            517 ext/nkf/nkf-utf8/nkf.c STATIC unsigned char   ascii_intro = DEFAULT_R;
STATIC            524 ext/nkf/nkf-utf8/nkf.c STATIC int             fold_margin  = FOLD_MARGIN;
STATIC            542 ext/nkf/nkf-utf8/nkf.c STATIC void (*output_conv)PROTO((int c2,int c1)) = DEFAULT_CONV;
STATIC            544 ext/nkf/nkf-utf8/nkf.c STATIC void (*oconv)PROTO((int c2,int c1)) = no_connection;
STATIC            546 ext/nkf/nkf-utf8/nkf.c STATIC int (*iconv)PROTO((int c2,int c1,int c0)) = no_connection2;
STATIC            548 ext/nkf/nkf-utf8/nkf.c STATIC void (*o_zconv)PROTO((int c2,int c1)) = no_connection;
STATIC            549 ext/nkf/nkf-utf8/nkf.c STATIC void (*o_fconv)PROTO((int c2,int c1)) = no_connection;
STATIC            550 ext/nkf/nkf-utf8/nkf.c STATIC void (*o_crconv)PROTO((int c2,int c1)) = no_connection;
STATIC            551 ext/nkf/nkf-utf8/nkf.c STATIC void (*o_rot_conv)PROTO((int c2,int c1)) = no_connection;
STATIC            552 ext/nkf/nkf-utf8/nkf.c STATIC void (*o_hira_conv)PROTO((int c2,int c1)) = no_connection;
STATIC            553 ext/nkf/nkf-utf8/nkf.c STATIC void (*o_base64conv)PROTO((int c2,int c1)) = no_connection;
STATIC            554 ext/nkf/nkf-utf8/nkf.c STATIC void (*o_iso2022jp_check_conv)PROTO((int c2,int c1)) = no_connection;
STATIC            558 ext/nkf/nkf-utf8/nkf.c STATIC  void   (*o_putc)PROTO((int c)) = std_putc;
STATIC            560 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_getc)PROTO((FILE *f)) = std_getc; /* general input */
STATIC            561 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_ungetc)PROTO((int c,FILE *f)) =std_ungetc;
STATIC            563 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_bgetc)PROTO((FILE *)) = std_getc; /* input of mgetc */
STATIC            564 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_bungetc)PROTO((int c ,FILE *f)) = std_ungetc;
STATIC            566 ext/nkf/nkf-utf8/nkf.c STATIC  void   (*o_mputc)PROTO((int c)) = std_putc ; /* output of mputc */
STATIC            568 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_mgetc)PROTO((FILE *)) = std_getc; /* input of mgetc */
STATIC            569 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_mungetc)PROTO((int c ,FILE *f)) = std_ungetc;
STATIC            572 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_mgetc_buf)PROTO((FILE *)) = std_getc; /* input of mgetc_buf */
STATIC            573 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_mungetc_buf)PROTO((int c,FILE *f)) = std_ungetc;
STATIC            576 ext/nkf/nkf-utf8/nkf.c STATIC int output_mode = ASCII,    /* output kanji mode */
STATIC            579 ext/nkf/nkf-utf8/nkf.c STATIC int mime_decode_mode =   FALSE;    /* MIME mode B base64, Q hex */
STATIC            585 ext/nkf/nkf-utf8/nkf.c STATIC const
STATIC            608 ext/nkf/nkf-utf8/nkf.c STATIC const
STATIC            630 ext/nkf/nkf-utf8/nkf.c STATIC const
STATIC            653 ext/nkf/nkf-utf8/nkf.c STATIC const
STATIC            673 ext/nkf/nkf-utf8/nkf.c STATIC int             file_out = FALSE;
STATIC            675 ext/nkf/nkf-utf8/nkf.c STATIC int             overwrite = FALSE;
STATIC            678 ext/nkf/nkf-utf8/nkf.c STATIC int             crmode_f = 0;   /* CR, NL, CRLF */
STATIC            680 ext/nkf/nkf-utf8/nkf.c STATIC int             end_check;
STATIC            926 ext/nkf/nkf-utf8/nkf.c STATIC const
STATIC            995 ext/nkf/nkf-utf8/nkf.c STATIC int option_mode = 0;
STATIC           3118 ext/nkf/nkf-utf8/nkf.c STATIC int broken_buf[3];
STATIC           3119 ext/nkf/nkf-utf8/nkf.c STATIC int broken_counter = 0;
STATIC           3120 ext/nkf/nkf-utf8/nkf.c STATIC int broken_last = 0;
STATIC           3171 ext/nkf/nkf-utf8/nkf.c STATIC int prev_cr = 0;
STATIC           3517 ext/nkf/nkf-utf8/nkf.c     STATIC const int range[RANGE_NUM_MAX][2] = {
STATIC           4351 ext/nkf/nkf-utf8/nkf.c STATIC const char basis_64[] =
STATIC           4354 ext/nkf/nkf-utf8/nkf.c STATIC int b64c;
STATIC            111 missing/crypt.c #ifndef STATIC
STATIC            114 missing/crypt.c STATIC init_des(), init_perm(), permute();
STATIC            116 missing/crypt.c STATIC prtab();
STATIC            302 missing/crypt.c STATIC
STATIC            737 missing/crypt.c STATIC
STATIC            881 missing/crypt.c STATIC
STATIC            953 missing/crypt.c STATIC


STATIC_FILE_LENGTH

STATIC_FILE_LENGTH  119 ruby.c             static char newsub[STATIC_FILE_LENGTH+1];
STATIC_FILE_LENGTH  134 ruby.c         	    if (newl == 0 || oldl == 0 || newl > STATIC_FILE_LENGTH) {
STATIC_FILE_LENGTH  152 ruby.c         	static char ret[STATIC_FILE_LENGTH+1];
STATIC_FILE_LENGTH  157 ruby.c             if (l + newl - oldl > STATIC_FILE_LENGTH || newl > STATIC_FILE_LENGTH) {


STAT_OP_IN

STAT_OP_IN       1270 regexec.c          case OP_END:  STAT_OP_IN(OP_END);
STAT_OP_IN       1366 regexec.c          case OP_EXACT1:  STAT_OP_IN(OP_EXACT1);
STAT_OP_IN       1378 regexec.c          case OP_EXACT1_IC:  STAT_OP_IN(OP_EXACT1_IC);
STAT_OP_IN       1412 regexec.c          case OP_EXACT2:  STAT_OP_IN(OP_EXACT2);
STAT_OP_IN       1423 regexec.c          case OP_EXACT3:  STAT_OP_IN(OP_EXACT3);
STAT_OP_IN       1436 regexec.c          case OP_EXACT4:  STAT_OP_IN(OP_EXACT4);
STAT_OP_IN       1451 regexec.c          case OP_EXACT5:  STAT_OP_IN(OP_EXACT5);
STAT_OP_IN       1468 regexec.c          case OP_EXACTN:  STAT_OP_IN(OP_EXACTN);
STAT_OP_IN       1479 regexec.c          case OP_EXACTN_IC:  STAT_OP_IN(OP_EXACTN_IC);
STAT_OP_IN       1521 regexec.c          case OP_EXACTMB2N1:  STAT_OP_IN(OP_EXACTMB2N1);
STAT_OP_IN       1530 regexec.c          case OP_EXACTMB2N2:  STAT_OP_IN(OP_EXACTMB2N2);
STAT_OP_IN       1545 regexec.c          case OP_EXACTMB2N3:  STAT_OP_IN(OP_EXACTMB2N3);
STAT_OP_IN       1564 regexec.c          case OP_EXACTMB2N:  STAT_OP_IN(OP_EXACTMB2N);
STAT_OP_IN       1578 regexec.c          case OP_EXACTMB3N:  STAT_OP_IN(OP_EXACTMB3N);
STAT_OP_IN       1594 regexec.c          case OP_EXACTMBN:  STAT_OP_IN(OP_EXACTMBN);
STAT_OP_IN       1608 regexec.c          case OP_CCLASS:  STAT_OP_IN(OP_CCLASS);
STAT_OP_IN       1616 regexec.c          case OP_CCLASS_MB:  STAT_OP_IN(OP_CCLASS_MB);
STAT_OP_IN       1645 regexec.c          case OP_CCLASS_MIX:  STAT_OP_IN(OP_CCLASS_MIX);
STAT_OP_IN       1663 regexec.c          case OP_CCLASS_NOT:  STAT_OP_IN(OP_CCLASS_NOT);
STAT_OP_IN       1671 regexec.c          case OP_CCLASS_MB_NOT:  STAT_OP_IN(OP_CCLASS_MB_NOT);
STAT_OP_IN       1712 regexec.c          case OP_CCLASS_MIX_NOT:  STAT_OP_IN(OP_CCLASS_MIX_NOT);
STAT_OP_IN       1730 regexec.c          case OP_CCLASS_NODE:  STAT_OP_IN(OP_CCLASS_NODE);
STAT_OP_IN       1748 regexec.c          case OP_ANYCHAR:  STAT_OP_IN(OP_ANYCHAR);
STAT_OP_IN       1757 regexec.c          case OP_ANYCHAR_ML:  STAT_OP_IN(OP_ANYCHAR_ML);
STAT_OP_IN       1765 regexec.c          case OP_ANYCHAR_STAR:  STAT_OP_IN(OP_ANYCHAR_STAR);
STAT_OP_IN       1777 regexec.c          case OP_ANYCHAR_ML_STAR:  STAT_OP_IN(OP_ANYCHAR_ML_STAR);
STAT_OP_IN       1794 regexec.c          case OP_ANYCHAR_STAR_PEEK_NEXT:  STAT_OP_IN(OP_ANYCHAR_STAR_PEEK_NEXT);
STAT_OP_IN       1809 regexec.c          case OP_ANYCHAR_ML_STAR_PEEK_NEXT:STAT_OP_IN(OP_ANYCHAR_ML_STAR_PEEK_NEXT);
STAT_OP_IN       1829 regexec.c          case OP_WORD:  STAT_OP_IN(OP_WORD);
STAT_OP_IN       1838 regexec.c          case OP_NOT_WORD:  STAT_OP_IN(OP_NOT_WORD);
STAT_OP_IN       1847 regexec.c          case OP_WORD_BOUND:  STAT_OP_IN(OP_WORD_BOUND);
STAT_OP_IN       1866 regexec.c          case OP_NOT_WORD_BOUND:  STAT_OP_IN(OP_NOT_WORD_BOUND);
STAT_OP_IN       1885 regexec.c          case OP_WORD_BEGIN:  STAT_OP_IN(OP_WORD_BEGIN);
STAT_OP_IN       1895 regexec.c          case OP_WORD_END:  STAT_OP_IN(OP_WORD_END);
STAT_OP_IN       1906 regexec.c          case OP_BEGIN_BUF:  STAT_OP_IN(OP_BEGIN_BUF);
STAT_OP_IN       1913 regexec.c          case OP_END_BUF:  STAT_OP_IN(OP_END_BUF);
STAT_OP_IN       1920 regexec.c          case OP_BEGIN_LINE:  STAT_OP_IN(OP_BEGIN_LINE);
STAT_OP_IN       1933 regexec.c          case OP_END_LINE:  STAT_OP_IN(OP_END_LINE);
STAT_OP_IN       1952 regexec.c          case OP_SEMI_END_BUF:  STAT_OP_IN(OP_SEMI_END_BUF);
STAT_OP_IN       1972 regexec.c          case OP_BEGIN_POSITION:  STAT_OP_IN(OP_BEGIN_POSITION);
STAT_OP_IN       1980 regexec.c          case OP_MEMORY_START_PUSH:  STAT_OP_IN(OP_MEMORY_START_PUSH);
STAT_OP_IN       1987 regexec.c          case OP_MEMORY_START:  STAT_OP_IN(OP_MEMORY_START);
STAT_OP_IN       1994 regexec.c          case OP_MEMORY_END_PUSH:  STAT_OP_IN(OP_MEMORY_END_PUSH);
STAT_OP_IN       2001 regexec.c          case OP_MEMORY_END:  STAT_OP_IN(OP_MEMORY_END);
STAT_OP_IN       2009 regexec.c          case OP_MEMORY_END_PUSH_REC:  STAT_OP_IN(OP_MEMORY_END_PUSH_REC);
STAT_OP_IN       2018 regexec.c          case OP_MEMORY_END_REC:  STAT_OP_IN(OP_MEMORY_END_REC);
STAT_OP_IN       2034 regexec.c          case OP_BACKREF1:  STAT_OP_IN(OP_BACKREF1);
STAT_OP_IN       2039 regexec.c          case OP_BACKREF2:  STAT_OP_IN(OP_BACKREF2);
STAT_OP_IN       2044 regexec.c          case OP_BACKREF3:  STAT_OP_IN(OP_BACKREF3);
STAT_OP_IN       2049 regexec.c          case OP_BACKREFN:  STAT_OP_IN(OP_BACKREFN);
STAT_OP_IN       2082 regexec.c          case OP_BACKREFN_IC:  STAT_OP_IN(OP_BACKREFN_IC);
STAT_OP_IN       2114 regexec.c          case OP_BACKREF_MULTI:  STAT_OP_IN(OP_BACKREF_MULTI);
STAT_OP_IN       2153 regexec.c          case OP_BACKREF_MULTI_IC:  STAT_OP_IN(OP_BACKREF_MULTI_IC);
STAT_OP_IN       2192 regexec.c          case OP_SET_OPTION_PUSH:  STAT_OP_IN(OP_SET_OPTION_PUSH);
STAT_OP_IN       2200 regexec.c          case OP_SET_OPTION:  STAT_OP_IN(OP_SET_OPTION);
STAT_OP_IN       2206 regexec.c          case OP_NULL_CHECK_START:  STAT_OP_IN(OP_NULL_CHECK_START);
STAT_OP_IN       2213 regexec.c          case OP_NULL_CHECK_END:  STAT_OP_IN(OP_NULL_CHECK_END);
STAT_OP_IN       2248 regexec.c          case OP_NULL_CHECK_END_MEMST:  STAT_OP_IN(OP_NULL_CHECK_END_MEMST);
STAT_OP_IN       2270 regexec.c            STAT_OP_IN(OP_NULL_CHECK_END_MEMST_PUSH);
STAT_OP_IN       2297 regexec.c          case OP_JUMP:  STAT_OP_IN(OP_JUMP);
STAT_OP_IN       2305 regexec.c          case OP_PUSH:  STAT_OP_IN(OP_PUSH);
STAT_OP_IN       2312 regexec.c          case OP_POP:  STAT_OP_IN(OP_POP);
STAT_OP_IN       2318 regexec.c          case OP_PUSH_OR_JUMP_EXACT1:  STAT_OP_IN(OP_PUSH_OR_JUMP_EXACT1);
STAT_OP_IN       2331 regexec.c          case OP_PUSH_IF_PEEK_NEXT:  STAT_OP_IN(OP_PUSH_IF_PEEK_NEXT);
STAT_OP_IN       2344 regexec.c          case OP_REPEAT:  STAT_OP_IN(OP_REPEAT);
STAT_OP_IN       2361 regexec.c          case OP_REPEAT_NG:  STAT_OP_IN(OP_REPEAT_NG);
STAT_OP_IN       2379 regexec.c          case OP_REPEAT_INC:  STAT_OP_IN(OP_REPEAT_INC);
STAT_OP_IN       2402 regexec.c          case OP_REPEAT_INC_SG:  STAT_OP_IN(OP_REPEAT_INC_SG);
STAT_OP_IN       2409 regexec.c          case OP_REPEAT_INC_NG:  STAT_OP_IN(OP_REPEAT_INC_NG);
STAT_OP_IN       2437 regexec.c          case OP_REPEAT_INC_NG_SG:  STAT_OP_IN(OP_REPEAT_INC_NG_SG);
STAT_OP_IN       2444 regexec.c          case OP_PUSH_POS:  STAT_OP_IN(OP_PUSH_POS);
STAT_OP_IN       2450 regexec.c          case OP_POP_POS:  STAT_OP_IN(OP_POP_POS);
STAT_OP_IN       2460 regexec.c          case OP_PUSH_POS_NOT:  STAT_OP_IN(OP_PUSH_POS_NOT);
STAT_OP_IN       2467 regexec.c          case OP_FAIL_POS:  STAT_OP_IN(OP_FAIL_POS);
STAT_OP_IN       2472 regexec.c          case OP_PUSH_STOP_BT:  STAT_OP_IN(OP_PUSH_STOP_BT);
STAT_OP_IN       2478 regexec.c          case OP_POP_STOP_BT:  STAT_OP_IN(OP_POP_STOP_BT);
STAT_OP_IN       2484 regexec.c          case OP_LOOK_BEHIND:  STAT_OP_IN(OP_LOOK_BEHIND);
STAT_OP_IN       2493 regexec.c          case OP_PUSH_LOOK_BEHIND_NOT:  STAT_OP_IN(OP_PUSH_LOOK_BEHIND_NOT);
STAT_OP_IN       2512 regexec.c          case OP_FAIL_LOOK_BEHIND_NOT:  STAT_OP_IN(OP_FAIL_LOOK_BEHIND_NOT);
STAT_OP_IN       2518 regexec.c          case OP_CALL:  STAT_OP_IN(OP_CALL);
STAT_OP_IN       2526 regexec.c          case OP_RETURN:  STAT_OP_IN(OP_RETURN);
STAT_OP_IN       2541 regexec.c          case OP_FAIL:  STAT_OP_IN(OP_FAIL);


STAT_OP_OUT

STAT_OP_OUT      1350 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1375 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1409 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1419 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1432 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1447 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1464 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1475 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1517 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1527 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1541 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1560 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1574 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1590 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1604 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1613 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1642 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1660 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1668 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1709 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1727 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1745 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1754 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1762 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1774 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1791 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1806 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1826 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1835 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1844 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1862 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1880 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1888 regexec.c      	  STAT_OP_OUT;
STAT_OP_OUT      1898 regexec.c      	  STAT_OP_OUT;
STAT_OP_OUT      1909 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1916 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1923 regexec.c      	STAT_OP_OUT;
STAT_OP_OUT      1927 regexec.c      	STAT_OP_OUT;
STAT_OP_OUT      1939 regexec.c      	  STAT_OP_OUT;
STAT_OP_OUT      1946 regexec.c      	STAT_OP_OUT;
STAT_OP_OUT      1958 regexec.c      	  STAT_OP_OUT;
STAT_OP_OUT      1966 regexec.c      	STAT_OP_OUT;
STAT_OP_OUT      1976 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1983 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1990 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      1997 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2004 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2014 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2029 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2077 regexec.c      	STAT_OP_OUT;
STAT_OP_OUT      2109 regexec.c      	STAT_OP_OUT;
STAT_OP_OUT      2148 regexec.c      	STAT_OP_OUT;
STAT_OP_OUT      2187 regexec.c      	STAT_OP_OUT;
STAT_OP_OUT      2196 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2202 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2209 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2243 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2263 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2292 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2300 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2308 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2314 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2323 regexec.c      	STAT_OP_OUT;
STAT_OP_OUT      2327 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2336 regexec.c      	STAT_OP_OUT;
STAT_OP_OUT      2340 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2357 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2375 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2397 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2432 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2446 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2456 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2463 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2474 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2480 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2489 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2508 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2522 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2529 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2539 regexec.c            STAT_OP_OUT;
STAT_OP_OUT      2546 regexec.c            STAT_OP_OUT;


STDIO_READ_DATA_PENDING

STDIO_READ_DATA_PENDING  333 io.c               return STDIO_READ_DATA_PENDING(fp);
STDIO_READ_DATA_PENDING  345 io.c               if (!STDIO_READ_DATA_PENDING(fp)) {
STDIO_READ_DATA_PENDING 1896 io.c               if (!STDIO_READ_DATA_PENDING(f)) {


STD_GC_BUFSIZE

STD_GC_BUFSIZE    684 ext/nkf/nkf-utf8/nkf.c int std_gc_buf[STD_GC_BUFSIZE];
STD_GC_BUFSIZE   1805 ext/nkf/nkf-utf8/nkf.c     if (std_gc_ndx == STD_GC_BUFSIZE){


STK_ALT

STK_ALT           489 regexec.c      #define STACK_PUSH_ALT(pat,s,sprev)     STACK_PUSH(STK_ALT,pat,s,sprev)
STK_ALT          1244 regexec.c        STACK_PUSH_ENSURED(STK_ALT, FinishCode);  /* bottom stack */


STK_CALL_FRAME

STK_CALL_FRAME    593 regexec.c        stk->type = STK_CALL_FRAME;\
STK_CALL_FRAME    861 regexec.c          else if (k->type == STK_CALL_FRAME) level--;\
STK_CALL_FRAME    872 regexec.c          if (k->type == STK_CALL_FRAME) {\


STK_LOOK_BEHIND_NOT

STK_LOOK_BEHIND_NOT  494 regexec.c              STACK_PUSH(STK_LOOK_BEHIND_NOT,pat,s,sprev)
STK_LOOK_BEHIND_NOT  681 regexec.c          if (stk->type == STK_LOOK_BEHIND_NOT) break;\


STK_MASK_POP_USED

STK_MASK_POP_USED  357 regexec.c           (((stk)->type & STK_MASK_POP_USED) || (stk)->type == STK_NULL_CHECK_START)
STK_MASK_POP_USED  623 regexec.c            if ((stk->type & STK_MASK_POP_USED) != 0)  break;\
STK_MASK_POP_USED  630 regexec.c            if ((stk->type & STK_MASK_POP_USED) != 0)  break;\
STK_MASK_POP_USED  641 regexec.c            if ((stk->type & STK_MASK_POP_USED) != 0)  break;\


STK_MEM_END

STK_MEM_END       526 regexec.c        stk->type = STK_MEM_END;\
STK_MEM_END       547 regexec.c          if ((k->type == STK_MEM_END_MARK || k->type == STK_MEM_END) \
STK_MEM_END       565 regexec.c          else if (k->type == STK_MEM_END && k->u.mem.num == (mnum)) {\
STK_MEM_END       649 regexec.c            else if (stk->type == STK_MEM_END) {\
STK_MEM_END       670 regexec.c          else if (stk->type == STK_MEM_END) {\
STK_MEM_END       689 regexec.c          else if (stk->type == STK_MEM_END) {\
STK_MEM_END       977 regexec.c          else if (k->type == STK_MEM_END) {


STK_MEM_END_MARK

STK_MEM_END_MARK  537 regexec.c        stk->type = STK_MEM_END_MARK;\
STK_MEM_END_MARK  547 regexec.c          if ((k->type == STK_MEM_END_MARK || k->type == STK_MEM_END) \


STK_MEM_START

STK_MEM_START     514 regexec.c        stk->type = STK_MEM_START;\
STK_MEM_START     551 regexec.c          else if (k->type == STK_MEM_START && k->u.mem.num == (mnum)) {\
STK_MEM_START     561 regexec.c          if (k->type == STK_MEM_START && k->u.mem.num == (mnum)) {\
STK_MEM_START     631 regexec.c            else if (stk->type == STK_MEM_START) {\
STK_MEM_START     642 regexec.c            else if (stk->type == STK_MEM_START) {\
STK_MEM_START     663 regexec.c          else if (stk->type == STK_MEM_START) {\
STK_MEM_START     682 regexec.c          else if (stk->type == STK_MEM_START) {\
STK_MEM_START     776 regexec.c                  if (k->type == STK_MEM_START) {\
STK_MEM_START     817 regexec.c                    if (k->type == STK_MEM_START) {\
STK_MEM_START     959 regexec.c          if (k->type == STK_MEM_START) {


STK_NULL_CHECK_END

STK_NULL_CHECK_END  586 regexec.c        stk->type = STK_NULL_CHECK_END;\
STK_NULL_CHECK_END  755 regexec.c          else if (k->type == STK_NULL_CHECK_END) {\
STK_NULL_CHECK_END  842 regexec.c          else if (k->type == STK_NULL_CHECK_END) {\


STK_NULL_CHECK_START

STK_NULL_CHECK_START  357 regexec.c           (((stk)->type & STK_MASK_POP_USED) || (stk)->type == STK_NULL_CHECK_START)
STK_NULL_CHECK_START  578 regexec.c        stk->type = STK_NULL_CHECK_START;\
STK_NULL_CHECK_START  731 regexec.c          if (k->type == STK_NULL_CHECK_START) {\
STK_NULL_CHECK_START  746 regexec.c          if (k->type == STK_NULL_CHECK_START) {\
STK_NULL_CHECK_START  766 regexec.c          if (k->type == STK_NULL_CHECK_START) {\
STK_NULL_CHECK_START  806 regexec.c          if (k->type == STK_NULL_CHECK_START) {\


STK_POS

STK_POS           490 regexec.c      #define STACK_PUSH_POS(s,sprev)         STACK_PUSH(STK_POS,NULL_UCHARP,s,sprev)
STK_POS           704 regexec.c          else if (k->type == STK_POS) {\


STK_POS_NOT

STK_POS_NOT       491 regexec.c      #define STACK_PUSH_POS_NOT(pat,s,sprev) STACK_PUSH(STK_POS_NOT,pat,s,sprev)
STK_POS_NOT       662 regexec.c          if (stk->type == STK_POS_NOT) break;\


STK_REPEAT

STK_REPEAT        498 regexec.c        stk->type = STK_REPEAT;\
STK_REPEAT        854 regexec.c          if (k->type == STK_REPEAT) {\


STK_REPEAT_INC

STK_REPEAT_INC    507 regexec.c        stk->type = STK_REPEAT_INC;\
STK_REPEAT_INC    646 regexec.c            else if (stk->type == STK_REPEAT_INC) {\
STK_REPEAT_INC    667 regexec.c          else if (stk->type == STK_REPEAT_INC) {\
STK_REPEAT_INC    686 regexec.c          else if (stk->type == STK_REPEAT_INC) {\


STK_RETURN

STK_RETURN        600 regexec.c        stk->type = STK_RETURN;\
STK_RETURN        862 regexec.c          else if (k->type == STK_RETURN)     level++;\
STK_RETURN        879 regexec.c          else if (k->type == STK_RETURN)\


STK_STOP_BT

STK_STOP_BT       492 regexec.c      #define STACK_PUSH_STOP_BT              STACK_PUSH_TYPE(STK_STOP_BT)
STK_STOP_BT       719 regexec.c          else if (k->type == STK_STOP_BT) {\


STK_VOID

STK_VOID          702 regexec.c            k->type = STK_VOID;\
STK_VOID          705 regexec.c            k->type = STK_VOID;\
STK_VOID          717 regexec.c            k->type = STK_VOID;\
STK_VOID          720 regexec.c            k->type = STK_VOID;\


STORE

STORE             319 missing/crypt.c 	STORE(D,D0,D1,*out);
STORE             598 missing/crypt.c 	STORE(K&~0x03030303L, K0&~0x03030303L, K1, *(C_block *)key);
STORE             601 missing/crypt.c 		STORE(K,K0,K1,*(C_block *)key);
STORE             604 missing/crypt.c 		STORE(K&~0x03030303L, K0&~0x03030303L, K1, *(C_block *)key);
STORE             656 missing/crypt.c 	STORE(L,L0,L1,B);
STORE             720 missing/crypt.c 	STORE(L,L0,L1,B);
STORE             723 missing/crypt.c 	STORE(L,L0,L1,B);
STORE             727 missing/crypt.c 	STORE(L,L0,L1,*(C_block *)out);


STR2CSTR

STR2CSTR          410 ext/curses/curses.c 	addstr(STR2CSTR(str));
STR2CSTR         1127 ext/curses/curses.c 	waddstr(winp->window, STR2CSTR(str));


STRICT_MIME

STRICT_MIME       391 ext/nkf/nkf-utf8/nkf.c STATIC int             mime_f = STRICT_MIME;   /* convert MIME B base64 or Q */
STRICT_MIME      1307 ext/nkf/nkf-utf8/nkf.c                 mime_f = STRICT_MIME; cp++;
STRICT_MIME      2081 ext/nkf/nkf-utf8/nkf.c 			if(mime_f == STRICT_MIME) {
STRICT_MIME      3625 ext/nkf/nkf-utf8/nkf.c 	if(mime_f==STRICT_MIME) {
STRICT_MIME      3635 ext/nkf/nkf-utf8/nkf.c     if(mime_f==STRICT_MIME) {
STRICT_MIME      4165 ext/nkf/nkf-utf8/nkf.c 	if (mime_f != STRICT_MIME) goto mime_c2_retry;
STRICT_MIME      4243 ext/nkf/nkf-utf8/nkf.c 	if (mime_f != STRICT_MIME) goto mime_c3_retry;
STRICT_MIME      4251 ext/nkf/nkf-utf8/nkf.c 	if (mime_f != STRICT_MIME) goto mime_c4_retry;
STRICT_MIME      4740 ext/nkf/nkf-utf8/nkf.c     mime_f = STRICT_MIME;


STR_ASSOC

STR_ASSOC         907 gc.c           	if (FL_TEST(obj, ELTS_SHARED|STR_ASSOC)) {
STR_ASSOC          32 string.c       #define STR_NOCAPA  (ELTS_SHARED|STR_ASSOC)
STR_ASSOC         179 string.c           else if (FL_TEST(orig, STR_ASSOC)) {
STR_ASSOC         456 string.c           if (FL_TEST(str, STR_ASSOC)) {
STR_ASSOC         468 string.c       	FL_SET(str, STR_ASSOC);
STR_ASSOC         475 string.c           if (FL_TEST(str, STR_ASSOC)) {
STR_ASSOC         548 string.c       	beg + len == RSTRING(str)->len && !FL_TEST(str, STR_ASSOC)) {
STR_ASSOC         634 string.c           if (FL_TEST(str, STR_ASSOC)) {
STR_ASSOC         635 string.c       	FL_UNSET(str, STR_ASSOC);
STR_ASSOC         667 string.c           if (FL_TEST(str, STR_ASSOC)) {
STR_ASSOC         691 string.c           if (FL_TEST(str, STR_ASSOC)) {
STR_ASSOC         692 string.c       	FL_UNSET(str, STR_ASSOC);
STR_ASSOC         720 string.c       	if (FL_TEST(str, STR_ASSOC)) {
STR_ASSOC        2116 string.c       	FL_UNSET(str, STR_ASSOC);
STR_ASSOC        2123 string.c       	if (FL_TEST(str2, STR_ASSOC)) {
STR_ASSOC        2124 string.c       	    FL_SET(str, STR_ASSOC);


STR_BUF_MIN_SIZE

STR_BUF_MIN_SIZE  203 string.c           if (capa < STR_BUF_MIN_SIZE) {
STR_BUF_MIN_SIZE  204 string.c       	capa = STR_BUF_MIN_SIZE;


STR_FUNC_ESCAPE

STR_FUNC_ESCAPE  5046 parse.y            str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
STR_FUNC_ESCAPE  5096 parse.y        		if (func & STR_FUNC_ESCAPE) tokadd(c);
STR_FUNC_ESCAPE  5108 parse.y        		    if (func & STR_FUNC_ESCAPE) tokadd('\\');


STR_FUNC_EXPAND

STR_FUNC_EXPAND  5044 parse.y            str_dquote = (STR_FUNC_EXPAND),
STR_FUNC_EXPAND  5045 parse.y            str_xquote = (STR_FUNC_EXPAND),
STR_FUNC_EXPAND  5046 parse.y            str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
STR_FUNC_EXPAND  5048 parse.y            str_dword  = (STR_FUNC_QWORDS|STR_FUNC_EXPAND),
STR_FUNC_EXPAND  5050 parse.y            str_dsym   = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND),
STR_FUNC_EXPAND  5079 parse.y        	else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) {
STR_FUNC_EXPAND  5091 parse.y        		if (func & STR_FUNC_EXPAND) continue;
STR_FUNC_EXPAND  5106 parse.y        		else if (func & STR_FUNC_EXPAND) {
STR_FUNC_EXPAND  5184 parse.y            if ((func & STR_FUNC_EXPAND) && c == '#') {
STR_FUNC_EXPAND  5343 parse.y            if (!(func & STR_FUNC_EXPAND)) {


STR_FUNC_INDENT

STR_FUNC_INDENT  5215 parse.y        	func = STR_FUNC_INDENT;
STR_FUNC_INDENT  5243 parse.y        	    if (func & STR_FUNC_INDENT) {
STR_FUNC_INDENT  5329 parse.y            indent = (func = *eos++) & STR_FUNC_INDENT;


STR_FUNC_QWORDS

STR_FUNC_QWORDS  5047 parse.y            str_sword  = (STR_FUNC_QWORDS),
STR_FUNC_QWORDS  5048 parse.y            str_dword  = (STR_FUNC_QWORDS|STR_FUNC_EXPAND),
STR_FUNC_QWORDS  5090 parse.y        		if (func & STR_FUNC_QWORDS) break;
STR_FUNC_QWORDS  5111 parse.y        		else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
STR_FUNC_QWORDS  5127 parse.y        	else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
STR_FUNC_QWORDS  5166 parse.y            if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
STR_FUNC_QWORDS  5171 parse.y        	if (func & STR_FUNC_QWORDS) {
STR_FUNC_QWORDS  6523 parse.y        		lex_strterm = NEW_STRTERM(str_dquote | STR_FUNC_QWORDS, term, paren);
STR_FUNC_QWORDS  6529 parse.y        		lex_strterm = NEW_STRTERM(str_squote | STR_FUNC_QWORDS, term, paren);


STR_FUNC_REGEXP

STR_FUNC_REGEXP  5046 parse.y            str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
STR_FUNC_REGEXP  5100 parse.y        		if (func & STR_FUNC_REGEXP) {
STR_FUNC_REGEXP  5175 parse.y        	if (!(func & STR_FUNC_REGEXP)) return tSTRING_END;


STR_FUNC_SYMBOL

STR_FUNC_SYMBOL  5049 parse.y            str_ssym   = (STR_FUNC_SYMBOL),
STR_FUNC_SYMBOL  5050 parse.y            str_dsym   = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND),
STR_FUNC_SYMBOL  5131 parse.y        	if (!c && (func & STR_FUNC_SYMBOL)) {
STR_FUNC_SYMBOL  5132 parse.y        	    func &= ~STR_FUNC_SYMBOL;


STR_NOCAPA

STR_NOCAPA         36 string.c           if (!FL_TEST(str, STR_NOCAPA))\
STR_NOCAPA        241 string.c           FL_UNSET(str, STR_NOCAPA);
STR_NOCAPA        242 string.c           if (FL_TEST(str2, STR_NOCAPA)) {
STR_NOCAPA        243 string.c       	FL_SET(str, RBASIC(str2)->flags & STR_NOCAPA);
STR_NOCAPA        252 string.c           FL_UNSET(str2, STR_NOCAPA);
STR_NOCAPA        443 string.c           FL_UNSET(str, STR_NOCAPA);
STR_NOCAPA        614 string.c       	    if (!FL_TEST(str, STR_NOCAPA)) {
STR_NOCAPA       2020 string.c       	FL_UNSET(str, STR_NOCAPA);
STR_NOCAPA       2151 string.c           FL_UNSET(str, STR_NOCAPA);


STR_TMPLOCK

STR_TMPLOCK       421 string.c           if (FL_TEST(str, STR_TMPLOCK)) {
STR_TMPLOCK       586 string.c           if (FL_TEST(str, STR_TMPLOCK)) {
STR_TMPLOCK       589 string.c           FL_SET(str, STR_TMPLOCK);
STR_TMPLOCK       596 string.c           if (!FL_TEST(str, STR_TMPLOCK)) {
STR_TMPLOCK       599 string.c           FL_UNSET(str, STR_TMPLOCK);


SUCCESS

SUCCESS           528 ext/socket/getaddrinfo.c 			return SUCCESS;
SUCCESS           573 ext/socket/getaddrinfo.c 	return SUCCESS;
SUCCESS           682 ext/socket/getaddrinfo.c 	return SUCCESS;
SUCCESS           267 ext/socket/getnameinfo.c 	return SUCCESS;


SUNOS_EXT

SUNOS_EXT          82 missing/strftime.c #if ! defined(SUNOS_EXT)
SUNOS_EXT         507 missing/strftime.c #ifdef SUNOS_EXT


SWAP_BBUF_NOT

SWAP_BBUF_NOT    1734 regparse.c         SWAP_BBUF_NOT(bbuf1, not1, bbuf2, not2);
SWAP_BBUF_NOT    1751 regparse.c         SWAP_BBUF_NOT(bbuf1, not1, bbuf2, not2);
SWAP_BBUF_NOT    1834 regparse.c         SWAP_BBUF_NOT(bbuf1, not1, bbuf2, not2);


SYCK_BUFFERSIZE

SYCK_BUFFERSIZE   127 ext/syck/emitter.c     e->bufsize = SYCK_BUFFERSIZE;
SYCK_BUFFERSIZE   173 ext/syck/syck.c     p->bufsize = SYCK_BUFFERSIZE;
SYCK_BUFFERSIZE   453 ext/syck/syck.c             len = (p->io.str->read)( p->buffer, p->io.str, SYCK_BUFFERSIZE - 1, skip );
SYCK_BUFFERSIZE   458 ext/syck/syck.c             len = (p->io.file->read)( p->buffer, p->io.file, SYCK_BUFFERSIZE - 1, skip );


SYM2ID

SYM2ID           5358 eval.c             id = SYM2ID(argv[0]);
SYM2ID           5540 eval.c         	    dvar_asgn_curr(SYM2ID(RARRAY(a)->ptr[j]), argv[j]);
SYM2ID           12995 eval.c         		     rb_id2name(SYM2ID(tag)),
SYM2ID           13001 eval.c         	rb_name_error(SYM2ID(tag), "uncaught throw `%s'", rb_id2name(SYM2ID(tag)));
SYM2ID            128 ext/dl/cfunc.c     data->calltype = (calltype == Qnil) ? CFUNC_CDECL : SYM2ID(calltype);
SYM2ID            176 ext/dl/cfunc.c     cfunc->calltype = SYM2ID(sym);
SYM2ID            476 ext/iconv/iconv.c 	    ID id = SYM2ID(name);
SYM2ID            604 ext/openssl/ossl_asn1.c 	if (SYM2ID(s) == sIMPLICIT)
SYM2ID            606 ext/openssl/ossl_asn1.c 	else if (SYM2ID(s) == sEXPLICIT)
SYM2ID            625 ext/openssl/ossl_asn1.c 	if (SYM2ID(s) == sUNIVERSAL)
SYM2ID            627 ext/openssl/ossl_asn1.c 	else if (SYM2ID(s) == sAPPLICATION)
SYM2ID            629 ext/openssl/ossl_asn1.c 	else if (SYM2ID(s) == sCONTEXT_SPECIFIC)
SYM2ID            631 ext/openssl/ossl_asn1.c 	else if (SYM2ID(s) == sPRIVATE)
SYM2ID            659 ext/openssl/ossl_asn1.c     if((SYM2ID(tag_class) == sUNIVERSAL) && NUM2INT(tag) > 31)
SYM2ID            883 ext/openssl/ossl_asn1.c 	if(SYM2ID(tagging) == sIMPLICIT && NUM2INT(tag) > 31)
SYM2ID            353 ext/openssl/ossl_pkcs7.c     if(TYPE(sym) == T_SYMBOL) s = rb_id2name(SYM2ID(sym));
SYM2ID            158 ext/openssl/ossl_ssl.c 	s = rb_id2name(SYM2ID(ssl_method));
SYM2ID             79 ext/racc/cparse/cparse.c #ifdef SYM2ID
SYM2ID             80 ext/racc/cparse/cparse.c     return SYM2ID(v);
SYM2ID           2338 ext/tk/tcltklib.c                 if (SYM2ID(reason) == ID_return)
SYM2ID           2341 ext/tk/tcltklib.c                 if (SYM2ID(reason) == ID_break)
SYM2ID           2344 ext/tk/tcltklib.c                 if (SYM2ID(reason) == ID_next)
SYM2ID            795 ext/tk/tkutil/tkutil.c                                   rb_str_new2(rb_id2name(SYM2ID(obj))));
SYM2ID            797 ext/tk/tkutil/tkutil.c                 return fromDefaultEnc_toUTF8(rb_str_new2(rb_id2name(SYM2ID(obj))), self);
SYM2ID            800 ext/tk/tkutil/tkutil.c             return rb_str_new2(rb_id2name(SYM2ID(obj)));
SYM2ID           1180 ext/tk/tkutil/tkutil.c         key_id = SYM2ID(key);
SYM2ID           1192 ext/tk/tkutil/tkutil.c         value_id = SYM2ID(value);
SYM2ID           1250 ext/tk/tkutil/tkutil.c             str = rb_id2name(SYM2ID(arg_sym));
SYM2ID           1257 ext/tk/tkutil/tkutil.c             str = rb_id2name(SYM2ID(ret));
SYM2ID           1385 ext/tk/tkutil/tkutil.c                               rb_id2name(SYM2ID(RARRAY(inf)->ptr[2])))
SYM2ID           1389 ext/tk/tkutil/tkutil.c         rb_attr(self, SYM2ID(RARRAY(inf)->ptr[2]), 1, 0, Qtrue);
SYM2ID           1889 gc.c               if (SYMBOL_P(ptr) && rb_id2name(SYM2ID((VALUE)ptr)) != 0) {
SYM2ID            453 marshal.c      	w_symbol(SYM2ID(obj), arg);
SYM2ID            595 marshal.c      		    w_symbol(SYM2ID(RARRAY(mem)->ptr[i]), arg);
SYM2ID           1151 marshal.c      			     rb_id2name(SYM2ID(RARRAY(mem)->ptr[i])));
SYM2ID           1030 object.c           ID id = SYM2ID(sym);
SYM2ID           1050 object.c           ID id = SYM2ID(sym);
SYM2ID           1078 object.c           return rb_str_new2(rb_id2name(SYM2ID(sym)));
SYM2ID           1518 object.c       	id = SYM2ID(name);
SYM2ID           4448 parse.y        # define yylval_id() SYM2ID(yylval.val)
SYM2ID            240 signal.c       	s = rb_id2name(SYM2ID(argv[0]));
SYM2ID            618 signal.c       	s = rb_id2name(SYM2ID(arg->sig));
SYM2ID             67 struct.c       	rb_ary_push(ary, rb_str_new2(rb_id2name(SYM2ID(*p))));
SYM2ID            159 struct.c       	if (rb_id_attrset(SYM2ID(slot)) == rb_frame_this_func()) {
SYM2ID            202 struct.c       	ID id = SYM2ID(RARRAY(members)->ptr[i]);
SYM2ID            453 struct.c       	id = SYM2ID(slot);
SYM2ID            527 struct.c       	if (SYM2ID(RARRAY(members)->ptr[i]) == id) {
SYM2ID            588 struct.c       	if (SYM2ID(RARRAY(members)->ptr[i]) == id) {
SYM2ID            150 variable.c     	    path = rb_str_new2(rb_id2name(SYM2ID(path)));


SYMBOL_FLAG

SYMBOL_FLAG       185 ruby.h         #define SYMBOL_P(x) (((VALUE)(x)&0xff)==SYMBOL_FLAG)
SYMBOL_FLAG       186 ruby.h         #define ID2SYM(x) ((VALUE)(((long)(x))<<8|SYMBOL_FLAG))


SYMBOL_P

SYMBOL_P          771 class.c            if (FIXNUM_P(obj) || SYMBOL_P(obj)) {
SYMBOL_P          220 error.c        		else if (SYMBOL_P(x)) {
SYMBOL_P         3778 eval.c         	    if (FIXNUM_P(recv) || SYMBOL_P(recv)) {
SYMBOL_P         3919 eval.c         	    if (FIXNUM_P(result) || SYMBOL_P(result)) {
SYMBOL_P         5352 eval.c             if (argc == 0 || !SYMBOL_P(argv[0])) {
SYMBOL_P         6435 eval.c             if (FIXNUM_P(self) || SYMBOL_P(self)) {
SYMBOL_P         6467 eval.c             if (FIXNUM_P(self) || SYMBOL_P(self)) {
SYMBOL_P          475 ext/iconv/iconv.c 	if (SYMBOL_P(name)) {
SYMBOL_P          603 ext/openssl/ossl_asn1.c     else if(SYMBOL_P(s)){
SYMBOL_P          624 ext/openssl/ossl_asn1.c     else if(SYMBOL_P(s)){
SYMBOL_P          657 ext/openssl/ossl_asn1.c     if(!SYMBOL_P(tag_class))
SYMBOL_P          877 ext/openssl/ossl_asn1.c 	if(!SYMBOL_P(tagging))
SYMBOL_P          881 ext/openssl/ossl_asn1.c 	if(!SYMBOL_P(tag_class))
SYMBOL_P           73 ext/racc/cparse/cparse.c #ifndef SYMBOL_P
SYMBOL_P           76 ext/racc/cparse/cparse.c     if (! SYMBOL_P(v)) {
SYMBOL_P         1889 gc.c               if (SYMBOL_P(ptr) && rb_id2name(SYM2ID((VALUE)ptr)) != 0) {
SYMBOL_P           58 hash.c             if (SYMBOL_P(a) && SYMBOL_P(b)) {
SYMBOL_P          452 marshal.c          else if (SYMBOL_P(obj)) {
SYMBOL_P         8848 parse.y            if (SYMBOL_P(x)) return x;
SYMBOL_P          674 ruby.h         	if (SYMBOL_P(obj)) return rb_cSymbol;
SYMBOL_P          689 ruby.h         	if (SYMBOL_P(obj)) return T_SYMBOL;


SYMID

SYMID             360 ext/syck/emitter.c     SYMID oid;
SYMID            1194 ext/syck/emitter.c SYMID
SYMID            1197 ext/syck/emitter.c     SYMID oid = 0;
SYMID             134 ext/syck/gram.c     SYMID nodeId;
SYMID              65 ext/syck/gram.h     SYMID nodeId;
SYMID              13 ext/syck/handler.c SYMID
SYMID              16 ext/syck/handler.c     SYMID id;
SYMID              58 ext/syck/node.c     m->keys = S_ALLOC_N( SYMID, m->capa );
SYMID              59 ext/syck/node.c     m->values = S_ALLOC_N( SYMID, m->capa );
SYMID              77 ext/syck/node.c     s->items = S_ALLOC_N( SYMID, s->capa );
SYMID             171 ext/syck/node.c syck_new_map( SYMID key, SYMID value )
SYMID             193 ext/syck/node.c     m->keys = S_ALLOC_N( SYMID, m->capa );
SYMID             194 ext/syck/node.c     m->values = S_ALLOC_N( SYMID, m->capa );
SYMID             198 ext/syck/node.c syck_map_add( SyckNode *map, SYMID key, SYMID value )
SYMID             212 ext/syck/node.c         S_REALLOC_N( m->keys, SYMID, m->capa );
SYMID             213 ext/syck/node.c         S_REALLOC_N( m->values, SYMID, m->capa );
SYMID             241 ext/syck/node.c         S_REALLOC_N( m1->keys, SYMID, m1->capa );
SYMID             242 ext/syck/node.c         S_REALLOC_N( m1->values, SYMID, m1->capa );
SYMID             260 ext/syck/node.c syck_map_assign( SyckNode *map, enum map_part p, long idx, SYMID id )
SYMID             277 ext/syck/node.c SYMID
SYMID             296 ext/syck/node.c syck_new_seq( SYMID value )
SYMID             317 ext/syck/node.c     s->items = S_ALLOC_N( SYMID, s->capa );
SYMID             321 ext/syck/node.c syck_seq_add( SyckNode *arr, SYMID value )
SYMID             335 ext/syck/node.c         S_REALLOC_N( s->items, SYMID, s->capa );
SYMID             349 ext/syck/node.c syck_seq_assign( SyckNode *seq, long idx, SYMID id )
SYMID             359 ext/syck/node.c SYMID
SYMID              73 ext/syck/rubyext.c SYMID rb_syck_load_handler _((SyckParser *, SyckNode *));
SYMID             103 ext/syck/rubyext.c     SYMID oid;
SYMID             210 ext/syck/rubyext.c SYMID
SYMID             604 ext/syck/rubyext.c SYMID
SYMID            2018 ext/syck/rubyext.c     SYMID symple;
SYMID             149 ext/syck/syck.c syck_parser_set_root_on_error( SyckParser *p, SYMID roer )
SYMID             183 ext/syck/syck.c     SYMID id = 0;
SYMID             194 ext/syck/syck.c syck_lookup_sym( SyckParser *p, SYMID id, char **data )
SYMID             487 ext/syck/syck.c SYMID
SYMID             115 ext/syck/syck.h     SYMID id;
SYMID             126 ext/syck/syck.h             SYMID *keys;
SYMID             127 ext/syck/syck.h             SYMID *values;
SYMID             134 ext/syck/syck.h             SYMID *items;
SYMID             157 ext/syck/syck.h typedef SYMID (*SyckNodeHandler)(SyckParser *, SyckNode *);
SYMID             225 ext/syck/syck.h     SYMID root, root_on_error;
SYMID             307 ext/syck/syck.h     SYMID ignore_id;
SYMID             343 ext/syck/syck.h SYMID syck_hdlr_add_node( SyckParser *, SyckNode * );
SYMID             352 ext/syck/syck.h int syck_lookup_sym( SyckParser *, SYMID, char ** );
SYMID             367 ext/syck/syck.h SYMID syck_emitter_mark_node( SyckEmitter *, st_data_t );
SYMID             368 ext/syck/syck.h void syck_emitter_ignore_id( SyckEmitter *, SYMID );
SYMID             395 ext/syck/syck.h void syck_parser_set_root_on_error( SyckParser *, SYMID );
SYMID             411 ext/syck/syck.h SYMID syck_parse( SyckParser * );
SYMID             413 ext/syck/syck.h SYMID syck_yaml2byte_handler( SyckParser *, SyckNode * );
SYMID             430 ext/syck/syck.h SyckNode *syck_new_map( SYMID, SYMID );
SYMID             432 ext/syck/syck.h void syck_map_add( SyckNode *, SYMID, SYMID );
SYMID             433 ext/syck/syck.h SYMID syck_map_read( SyckNode *, enum map_part, long );
SYMID             434 ext/syck/syck.h void syck_map_assign( SyckNode *, enum map_part, long, SYMID );
SYMID             437 ext/syck/syck.h SyckNode *syck_new_seq( SYMID );
SYMID             439 ext/syck/syck.h void syck_seq_add( SyckNode *, SYMID );
SYMID             440 ext/syck/syck.h void syck_seq_assign( SyckNode *, long, SYMID );
SYMID             441 ext/syck/syck.h SYMID syck_seq_read( SyckNode *, long );
SYMID             118 ext/syck/yaml2byte.c SYMID
SYMID             123 ext/syck/yaml2byte.c     SYMID oid;
SYMID             218 ext/syck/yaml2byte.c     SYMID oid;


SYSV_EXT

SYSV_EXT           79 missing/strftime.c #if ! defined(SYSV_EXT)
SYSV_EXT          297 missing/strftime.c #ifdef SYSV_EXT
SYSV_EXT          475 missing/strftime.c #ifdef SYSV_EXT


SZ_INF

SZ_INF           1920 ext/bigdecimal/bigdecimal.c        StrCmp(szVal,SZ_INF)==0 ) {
SZ_INF           2963 ext/bigdecimal/bigdecimal.c         fprintf(fp,SZ_INF);
SZ_INF           3100 ext/bigdecimal/bigdecimal.c         sprintf(psz,SZ_INF);
SZ_INF           3150 ext/bigdecimal/bigdecimal.c         sprintf(psz,SZ_INF);


SZ_NINF

SZ_NINF          1926 ext/bigdecimal/bigdecimal.c     if(StrCmp(szVal,SZ_NINF)==0) {
SZ_NINF          2967 ext/bigdecimal/bigdecimal.c         fprintf(fp,SZ_NINF);
SZ_NINF          3104 ext/bigdecimal/bigdecimal.c         sprintf(psz,SZ_NINF);
SZ_NINF          3154 ext/bigdecimal/bigdecimal.c         sprintf(psz,SZ_NINF);


SZ_NaN

SZ_NaN           1932 ext/bigdecimal/bigdecimal.c     if(StrCmp(szVal,SZ_NaN)==0) {
SZ_NaN           2959 ext/bigdecimal/bigdecimal.c         fprintf(fp,SZ_NaN);
SZ_NaN           3096 ext/bigdecimal/bigdecimal.c         sprintf(psz,SZ_NaN);
SZ_NaN           3140 ext/bigdecimal/bigdecimal.c         sprintf(psz,SZ_NaN);


S_ALLOC

S_ALLOC           112 ext/syck/emitter.c     e = S_ALLOC( SyckEmitter );
S_ALLOC            21 ext/syck/node.c     s = S_ALLOC( SyckNode );
S_ALLOC            54 ext/syck/node.c     m = S_ALLOC( struct SyckMap );
S_ALLOC            73 ext/syck/node.c     s = S_ALLOC( struct SyckSeq );
S_ALLOC            91 ext/syck/node.c     s = S_ALLOC( struct SyckStr );
S_ALLOC           761 ext/syck/rubyext.c     parser->bonus = S_ALLOC( struct parser_xtra );
S_ALLOC          1949 ext/syck/rubyext.c     emitter->bonus = S_ALLOC( struct emitter_xtra );
S_ALLOC           161 ext/syck/syck.c     p = S_ALLOC( SyckParser );
S_ALLOC           304 ext/syck/syck.c     p->io.file = S_ALLOC( SyckIoFile );
S_ALLOC           323 ext/syck/syck.c     p->io.str = S_ALLOC( SyckIoStr );
S_ALLOC            41 ext/syck/yaml2byte.c     ret = S_ALLOC(bytestring_t);


S_ALLOCA_N

S_ALLOCA_N        118 ext/syck/rubyext.c     ret = S_ALLOCA_N( char, strlen( sav->buffer ) + 3 );
S_ALLOCA_N       1046 ext/syck/rubyext.c     ivn = S_ALLOCA_N( char, RSTRING(ivname)->len + 2 );


S_ALLOC_N

S_ALLOC_N         343 ext/syck/bytecode.c                     sycklval->name = S_ALLOC_N( char, qidx + strlen( lvl->domain ) );
S_ALLOC_N         363 ext/syck/bytecode.c                         sycklval->name = S_ALLOC_N( char, ( qend - carat ) + strlen( lvl->domain ) );
S_ALLOC_N         371 ext/syck/bytecode.c                         sycklval->name = S_ALLOC_N( char, strlen( qstr ) );
S_ALLOC_N         961 ext/syck/bytecode.c     char *str = S_ALLOC_N( char, cap );
S_ALLOC_N        1104 ext/syck/bytecode.c     char *str = S_ALLOC_N( char, cap );
S_ALLOC_N          34 ext/syck/emitter.c     char *buff = S_ALLOC_N(char, len * 4 / 3 + 6);
S_ALLOC_N         135 ext/syck/emitter.c     e->levels = S_ALLOC_N( SyckLevel, e->lvl_capa );
S_ALLOC_N         273 ext/syck/emitter.c         e->buffer = S_ALLOC_N( char, e->bufsize );
S_ALLOC_N         373 ext/syck/emitter.c             char *header = S_ALLOC_N( char, 64 );
S_ALLOC_N         405 ext/syck/emitter.c             char *an = S_ALLOC_N( char, strlen( anchor_name ) + 3 );
S_ALLOC_N         416 ext/syck/emitter.c             char *an = S_ALLOC_N( char, strlen( anchor_name ) + 2 );
S_ALLOC_N         499 ext/syck/emitter.c         char *spcs = S_ALLOC_N( char, lvl->spaces + 2 );
S_ALLOC_N        1120 ext/syck/emitter.c                     char *spcs = S_ALLOC_N( char, lvl->spaces + 1 );
S_ALLOC_N        1237 ext/syck/emitter.c             anchor_name = S_ALLOC_N( char, strlen( anc ) + 10 );
S_ALLOC_N         150 ext/syck/handler.c     char *uri = S_ALLOC_N( char, type_len + 14 );
S_ALLOC_N         160 ext/syck/handler.c     char *uri = S_ALLOC_N( char, strlen( domain ) + type_len + 14 );
S_ALLOC_N        2137 ext/syck/implicit.c {   char *domain = S_ALLOC_N( char, ( YYCURSOR - type_id ) + 15 );
S_ALLOC_N        2355 ext/syck/implicit.c {   char *domain = S_ALLOC_N( char, YYCURSOR - type_id );
S_ALLOC_N          58 ext/syck/node.c     m->keys = S_ALLOC_N( SYMID, m->capa );
S_ALLOC_N          59 ext/syck/node.c     m->values = S_ALLOC_N( SYMID, m->capa );
S_ALLOC_N          77 ext/syck/node.c     s->items = S_ALLOC_N( SYMID, s->capa );
S_ALLOC_N         114 ext/syck/node.c     n->data.str->ptr = S_ALLOC_N( char, len + 1 );
S_ALLOC_N         138 ext/syck/node.c     n->data.str->ptr = S_ALLOC_N( char, len + 1 );
S_ALLOC_N         193 ext/syck/node.c     m->keys = S_ALLOC_N( SYMID, m->capa );
S_ALLOC_N         194 ext/syck/node.c     m->values = S_ALLOC_N( SYMID, m->capa );
S_ALLOC_N         317 ext/syck/node.c     s->items = S_ALLOC_N( SYMID, s->capa );
S_ALLOC_N          37 ext/syck/syck.c     char *new = S_ALLOC_N( char, len + 1 );
S_ALLOC_N         124 ext/syck/syck.c         p->buffer = S_ALLOC_N( char, p->bufsize );
S_ALLOC_N         164 ext/syck/syck.c     p->levels = S_ALLOC_N( SyckLevel, p->lvl_capa );
S_ALLOC_N        1495 ext/syck/token.c         char *qstr = S_ALLOC_N( char, qcapa );
S_ALLOC_N        1741 ext/syck/token.c         char *qstr = S_ALLOC_N( char, qcapa );
S_ALLOC_N        1894 ext/syck/token.c         char *qstr = S_ALLOC_N( char, qcapa );
S_ALLOC_N        2146 ext/syck/token.c         char *qstr = S_ALLOC_N( char, qcapa );
S_ALLOC_N        2188 ext/syck/token.c                             sycklval->name = S_ALLOC_N( char, qidx + strlen( lvl->domain ) );
S_ALLOC_N        2208 ext/syck/token.c                                 sycklval->name = S_ALLOC_N( char, ( qend - carat ) + strlen( lvl->domain ) );
S_ALLOC_N        2340 ext/syck/token.c         char *qstr = S_ALLOC_N( char, qcapa );
S_ALLOC_N          45 ext/syck/yaml2byte.c     ret->buffer = S_ALLOC_N(char, ret->length + 1 );
S_ALLOC_N         143 ext/syck/yaml2byte.c             char *type_tag = S_ALLOC_N( char, strlen( n->type_id ) + 1 );
S_ALLOC_N         231 ext/syck/yaml2byte.c         ret = S_ALLOC_N( char, strlen( sav->buffer ) + 3 );


S_FREE

S_FREE            144 ext/syck/emitter.c     S_FREE( name );
S_FREE            259 ext/syck/emitter.c     S_FREE( e->levels[0].domain );
S_FREE            260 ext/syck/emitter.c     S_FREE( e->levels );
S_FREE            263 ext/syck/emitter.c         S_FREE( e->buffer );
S_FREE            265 ext/syck/emitter.c     S_FREE( e );
S_FREE            377 ext/syck/emitter.c             S_FREE( header );
S_FREE            680 ext/syck/emitter.c     S_FREE( implicit );
S_FREE           1125 ext/syck/emitter.c                     S_FREE( spcs );
S_FREE             94 ext/syck/handler.c                 S_FREE( a );
S_FREE            119 ext/syck/handler.c         S_FREE( a );
S_FREE            134 ext/syck/handler.c         S_FREE( n->type_id );
S_FREE            144 ext/syck/handler.c     S_FREE( uri );
S_FREE             39 ext/syck/implicit.c     if ( n->type_id != NULL ) S_FREE( n->type_id );
S_FREE           1606 ext/syck/implicit.c         S_FREE( tmp1 ); S_FREE( tmp2 );
S_FREE           2146 ext/syck/implicit.c                     S_FREE( domain );
S_FREE           2362 ext/syck/implicit.c                                S_FREE( domain );
S_FREE             37 ext/syck/node.c         S_FREE( n->type_id );
S_FREE             42 ext/syck/node.c         S_FREE( n->anchor );
S_FREE             45 ext/syck/node.c     S_FREE( n );
S_FREE            134 ext/syck/node.c         S_FREE( n->data.str->ptr );
S_FREE            188 ext/syck/node.c     S_FREE( n->data.pairs->keys );
S_FREE            189 ext/syck/node.c     S_FREE( n->data.pairs->values );
S_FREE            313 ext/syck/node.c     S_FREE( n->data.list->items );
S_FREE            380 ext/syck/node.c                 S_FREE( n->data.str->ptr );
S_FREE            383 ext/syck/node.c                 S_FREE( n->data.str );
S_FREE            391 ext/syck/node.c                 S_FREE( n->data.list->items );
S_FREE            392 ext/syck/node.c                 S_FREE( n->data.list );
S_FREE            400 ext/syck/node.c                 S_FREE( n->data.pairs->keys );
S_FREE            401 ext/syck/node.c                 S_FREE( n->data.pairs->values );
S_FREE            402 ext/syck/node.c                 S_FREE( n->data.pairs );
S_FREE            746 ext/syck/rubyext.c     S_FREE( p->bonus );
S_FREE           1205 ext/syck/rubyext.c         S_FREE( taguri );
S_FREE           1763 ext/syck/rubyext.c     S_FREE( node->type_id );
S_FREE           1934 ext/syck/rubyext.c     S_FREE( e->bonus );
S_FREE            246 ext/syck/syck.c     S_FREE( p->levels[0].domain );
S_FREE            247 ext/syck/syck.c     S_FREE( p->levels );
S_FREE            251 ext/syck/syck.c         S_FREE( p->buffer );
S_FREE            254 ext/syck/syck.c     S_FREE( p );
S_FREE            388 ext/syck/syck.c                 S_FREE( p->io.str );
S_FREE            396 ext/syck/syck.c                 S_FREE( p->io.file );


S_IEXEC

S_IEXEC          3219 win32/win32.c  	mode |= S_IFDIR | S_IEXEC;
S_IEXEC          3234 win32/win32.c  		    mode |= S_IEXEC;


S_IFCHR

S_IFCHR          1029 file.c         #   define S_ISCHR(m) ((m & S_IFMT) == S_IFCHR)
S_IFCHR           258 win32/win32.h  #define S_ISCHR(m)  (((unsigned short)(m) & S_IFMT) == S_IFCHR)


S_IFDIR

S_IFDIR          1118 dir.c          #   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
S_IFDIR            58 dln.c          #   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
S_IFDIR           887 file.c         #   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
S_IFDIR            66 util.c         #   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
S_IFDIR          1369 win32/win32.c      if (!(sbuf.st_mode & S_IFDIR) &&
S_IFDIR          3219 win32/win32.c  	mode |= S_IFDIR | S_IEXEC;
S_IFDIR           255 win32/win32.h  #define S_ISDIR(m)  (((unsigned short)(m) & S_IFMT) == S_IFDIR)
S_IFDIR            37 wince/sys/stat.c 		st->st_mode += S_IFDIR;
S_IFDIR            24 wince/sys/stat.h #define S_ISDIR(X) (((X) & S_IFMT) == S_IFDIR)


S_IFIFO

S_IFIFO           907 file.c         #ifdef S_IFIFO
S_IFIFO           909 file.c         #    define S_ISFIFO(m) ((m & S_IFMT) == S_IFIFO)
S_IFIFO          3477 file.c         #ifdef S_IFIFO
S_IFIFO           245 win32/win32.h  #if !defined S_IFIFO && defined _S_IFIFO
S_IFIFO           256 win32/win32.h  #define S_ISFIFO(m) (((unsigned short)(m) & S_IFMT) == S_IFIFO)


S_IFMT

S_IFMT           1118 dir.c          #   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
S_IFMT           1125 dir.c          #    define S_ISLNK(m) ((m & S_IFMT) == S_IFLNK)
S_IFMT             58 dln.c          #   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
S_IFMT            887 file.c         #   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
S_IFMT            909 file.c         #    define S_ISFIFO(m) ((m & S_IFMT) == S_IFIFO)
S_IFMT            936 file.c         #      define S_ISLNK(m) ((m & S_IFMT) == _S_IFLNK)
S_IFMT            939 file.c         #	 define S_ISLNK(m) ((m & S_IFMT) == S_IFLNK)
S_IFMT            972 file.c         #      define S_ISSOCK(m) ((m & S_IFMT) == _S_IFSOCK)
S_IFMT            975 file.c         #	 define S_ISSOCK(m) ((m & S_IFMT) == S_IFSOCK)
S_IFMT           1003 file.c         #	define S_ISBLK(m) ((m & S_IFMT) == S_IFBLK)
S_IFMT           1029 file.c         #   define S_ISCHR(m) ((m & S_IFMT) == S_IFCHR)
S_IFMT           1225 file.c         #   define S_ISREG(m) ((m & S_IFMT) == S_IFREG)
S_IFMT            174 io.c           #      define S_ISSOCK(m) ((m & S_IFMT) == _S_IFSOCK)
S_IFMT            177 io.c           #	 define S_ISSOCK(m) ((m & S_IFMT) == S_IFSOCK)
S_IFMT            389 io.c           #   define S_ISREG(m) ((m & S_IFMT) == S_IFREG)
S_IFMT             66 util.c         #   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
S_IFMT            255 win32/win32.h  #define S_ISDIR(m)  (((unsigned short)(m) & S_IFMT) == S_IFDIR)
S_IFMT            256 win32/win32.h  #define S_ISFIFO(m) (((unsigned short)(m) & S_IFMT) == S_IFIFO)
S_IFMT            257 win32/win32.h  #define S_ISBLK(m)  (((unsigned short)(m) & S_IFMT) == S_IFBLK)
S_IFMT            258 win32/win32.h  #define S_ISCHR(m)  (((unsigned short)(m) & S_IFMT) == S_IFCHR)
S_IFMT            259 win32/win32.h  #define S_ISREG(m)  (((unsigned short)(m) & S_IFMT) == S_IFREG)
S_IFMT             24 wince/sys/stat.h #define S_ISDIR(X) (((X) & S_IFMT) == S_IFDIR)
S_IFMT             27 wince/sys/stat.h #define S_ISREG(X) (((X) & S_IFMT) == S_IFREG)


S_IFREG

S_IFREG          1225 file.c         #   define S_ISREG(m) ((m & S_IFMT) == S_IFREG)
S_IFREG           389 io.c           #   define S_ISREG(m) ((m & S_IFMT) == S_IFREG)
S_IFREG          3222 win32/win32.c  	mode |= S_IFREG;
S_IFREG          3225 win32/win32.c      if (path && (mode & S_IFREG)) {
S_IFREG           259 win32/win32.h  #define S_ISREG(m)  (((unsigned short)(m) & S_IFMT) == S_IFREG)
S_IFREG            39 wince/sys/stat.c 		st->st_mode += S_IFREG;
S_IFREG            27 wince/sys/stat.h #define S_ISREG(X) (((X) & S_IFMT) == S_IFREG)


S_INT

S_INT             268 ext/bigdecimal/bigdecimal.c     S_INT d;
S_INT             284 ext/bigdecimal/bigdecimal.c static S_INT
S_INT             287 ext/bigdecimal/bigdecimal.c     S_INT n;
S_INT             504 ext/bigdecimal/bigdecimal.c     S_INT e;
S_INT             880 ext/bigdecimal/bigdecimal.c     VpChangeSign(c,(S_INT)1);
S_INT             889 ext/bigdecimal/bigdecimal.c     S_INT mx, n;
S_INT            1057 ext/bigdecimal/bigdecimal.c     S_INT  mc = 0;
S_INT            1267 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "BASE", INT2FIX((S_INT)VpBaseVal()));
S_INT            1386 ext/bigdecimal/bigdecimal.c static int AddExponent(Real *a,S_INT n);
S_INT            1391 ext/bigdecimal/bigdecimal.c static void VpFormatSt(char *psz,S_INT fFmt);
S_INT            1725 ext/bigdecimal/bigdecimal.c     S_INT  ex;
S_INT            1739 ext/bigdecimal/bigdecimal.c              if(ex > (S_INT)vp->Prec) {
S_INT            1740 ext/bigdecimal/bigdecimal.c                  nc += BASE_FIG*(ex - (S_INT)vp->Prec);
S_INT            1833 ext/bigdecimal/bigdecimal.c AddExponent(Real *a,S_INT n)
S_INT            1835 ext/bigdecimal/bigdecimal.c     S_INT e = a->exponent;
S_INT            1836 ext/bigdecimal/bigdecimal.c     S_INT m = e+n;
S_INT            1837 ext/bigdecimal/bigdecimal.c     S_INT eb,mb;
S_INT            2057 ext/bigdecimal/bigdecimal.c     S_INT sw, isw;
S_INT            2152 ext/bigdecimal/bigdecimal.c         VpSetSign(c,(S_INT)1);
S_INT            2156 ext/bigdecimal/bigdecimal.c         VpSetSign(c,(S_INT)1);
S_INT            2833 ext/bigdecimal/bigdecimal.c                 if(!AddExponent(a,-((S_INT)i))) return 0;
S_INT            3046 ext/bigdecimal/bigdecimal.c VpFormatSt(char *psz,S_INT fFmt)
S_INT            3050 ext/bigdecimal/bigdecimal.c     S_INT nf = 0;
S_INT            3284 ext/bigdecimal/bigdecimal.c     S_INT  e,es, eb, ef;
S_INT            3285 ext/bigdecimal/bigdecimal.c     S_INT  sign, signe;
S_INT            3304 ext/bigdecimal/bigdecimal.c             es = e*((S_INT)BASE_FIG);
S_INT            3306 ext/bigdecimal/bigdecimal.c             if(es>e*((S_INT)BASE_FIG)) {
S_INT            3339 ext/bigdecimal/bigdecimal.c         ef = eb / ((S_INT)BASE_FIG);
S_INT            3340 ext/bigdecimal/bigdecimal.c         ef = eb - ef * ((S_INT)BASE_FIG);
S_INT            3347 ext/bigdecimal/bigdecimal.c     eb = e / ((S_INT)BASE_FIG);
S_INT            3457 ext/bigdecimal/bigdecimal.c         div /=(double)((S_INT)BASE);
S_INT            3458 ext/bigdecimal/bigdecimal.c         *d = *d +((double) ((S_INT)m->frac[ind_m++])) * div;
S_INT            3460 ext/bigdecimal/bigdecimal.c     *e = m->exponent * ((S_INT)BASE_FIG);
S_INT            3502 ext/bigdecimal/bigdecimal.c             val /=(double)((S_INT)BASE);
S_INT            3506 ext/bigdecimal/bigdecimal.c         val2 = 1.0 /(double)((S_INT)BASE);
S_INT            3508 ext/bigdecimal/bigdecimal.c             val *=(double)((S_INT)BASE);
S_INT            3517 ext/bigdecimal/bigdecimal.c         val *=(double)((S_INT)BASE);
S_INT            3519 ext/bigdecimal/bigdecimal.c         val -=(double)((S_INT)i);
S_INT            3524 ext/bigdecimal/bigdecimal.c         VpSetSign(m, (S_INT)1);
S_INT            3526 ext/bigdecimal/bigdecimal.c         VpSetSign(m,-(S_INT)1);
S_INT            3532 ext/bigdecimal/bigdecimal.c                       (U_LONG)(val*((double)((S_INT)BASE))));
S_INT            3548 ext/bigdecimal/bigdecimal.c VpItoV(Real *m, S_INT ival)
S_INT            3553 ext/bigdecimal/bigdecimal.c     S_INT ne;
S_INT            3661 ext/bigdecimal/bigdecimal.c         val /=(double)((S_INT)BASE);
S_INT            3693 ext/bigdecimal/bigdecimal.c     VpChangeSign(y,(S_INT)1);
S_INT            3795 ext/bigdecimal/bigdecimal.c             S_INT s = VpGetSign(y);
S_INT            3965 ext/bigdecimal/bigdecimal.c VpPower(Real *y, Real *x, S_INT n)
S_INT            3998 ext/bigdecimal/bigdecimal.c         VpSetSign(y,-(S_INT)1);
S_INT              84 ext/bigdecimal/bigdecimal.h     S_INT  exponent;/* Exponent part.                           */
S_INT             149 ext/bigdecimal/bigdecimal.h VP_EXPORT void VpItoV(Real *m,S_INT ival);
S_INT             155 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpPower(Real *y,Real *x,S_INT n);


S_IREAD

S_IREAD           811 ext/nkf/nkf-utf8/nkf.c                                 S_IREAD | S_IWRITE);
S_IREAD          3212 win32/win32.c  	mode |= S_IREAD;
S_IREAD          3215 win32/win32.c  	mode |= S_IREAD | S_IWRITE | S_IWUSR;


S_IRGRP

S_IRGRP           114 defines.h      #ifndef S_IRGRP
S_IRGRP          1093 file.c         #  define S_IRUGO		(S_IRUSR | S_IRGRP | S_IROTH)
S_IRGRP          3642 file.c         #ifdef S_IRGRP
S_IRGRP          3644 file.c         	return st->st_mode & S_IRGRP ? Qtrue : Qfalse;
S_IRGRP          3674 file.c         #ifdef S_IRGRP
S_IRGRP          3676 file.c         	return st->st_mode & S_IRGRP ? Qtrue : Qfalse;
S_IRGRP           265 win32/win32.h  #ifndef S_IRGRP


S_IROTH

S_IROTH           117 defines.h      #ifndef S_IROTH
S_IROTH          1093 file.c         #  define S_IRUGO		(S_IRUSR | S_IRGRP | S_IROTH)
S_IROTH          1117 file.c         #ifdef S_IROTH
S_IROTH          1121 file.c             if ((st.st_mode & (S_IROTH)) == S_IROTH) {
S_IROTH          3646 file.c         #ifdef S_IROTH
S_IROTH          3647 file.c             if (!(st->st_mode & S_IROTH)) return Qfalse;
S_IROTH          3678 file.c         #ifdef S_IROTH
S_IROTH          3679 file.c             if (!(st->st_mode & S_IROTH)) return Qfalse;
S_IROTH          3700 file.c         #ifdef S_IROTH
S_IROTH          3701 file.c             if ((get_stat(obj)->st_mode & (S_IROTH)) == S_IROTH) {
S_IROTH          3786 file.c         #ifdef S_IROTH
S_IROTH           268 win32/win32.h  #ifndef S_IROTH


S_IRUGO

S_IRUGO          1092 file.c         #ifndef S_IRUGO
S_IRUGO          1122 file.c         	return UINT2NUM(st.st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
S_IRUGO          1184 file.c         	return UINT2NUM(st.st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
S_IRUGO          3702 file.c               return UINT2NUM(get_stat(obj)->st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
S_IRUGO          3788 file.c               return UINT2NUM(get_stat(obj)->st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));


S_IRUSR

S_IRUSR           111 defines.h      #ifndef S_IRUSR
S_IRUSR          1093 file.c         #  define S_IRUGO		(S_IRUSR | S_IRGRP | S_IROTH)
S_IRUSR          3638 file.c         #ifdef S_IRUSR
S_IRUSR          3640 file.c         	return st->st_mode & S_IRUSR ? Qtrue : Qfalse;
S_IRUSR          3670 file.c         #ifdef S_IRUSR
S_IRUSR          3672 file.c         	return st->st_mode & S_IRUSR ? Qtrue : Qfalse;
S_IRUSR           262 win32/win32.h  #if !defined S_IRUSR && !defined __MINGW32__


S_ISBLK

S_ISBLK           147 defines.h      #ifndef S_ISBLK
S_ISBLK          1001 file.c         #ifndef S_ISBLK
S_ISBLK          1009 file.c         #ifdef S_ISBLK
S_ISBLK          1013 file.c             if (S_ISBLK(st.st_mode)) return Qtrue;
S_ISBLK          1492 file.c         #ifdef S_ISBLK
S_ISBLK          1493 file.c             else if (S_ISBLK(st->st_mode)) {
S_ISBLK          3548 file.c         #ifdef S_ISBLK
S_ISBLK          3549 file.c             if (S_ISBLK(get_stat(obj)->st_mode)) return Qtrue;


S_ISCHR

S_ISCHR           150 defines.h      #ifndef S_ISCHR
S_ISCHR          1028 file.c         #ifndef S_ISCHR
S_ISCHR          1035 file.c             if (S_ISCHR(st.st_mode)) return Qtrue;
S_ISCHR          1489 file.c             else if (S_ISCHR(st->st_mode)) {
S_ISCHR          3570 file.c             if (S_ISCHR(get_stat(obj)->st_mode)) return Qtrue;
S_ISCHR           275 random.c       #ifdef S_ISCHR
S_ISCHR           287 random.c               if (fstat(fd, &statbuf) == 0 && S_ISCHR(statbuf.st_mode)) {


S_ISDIR

S_ISDIR           153 defines.h      #ifndef S_ISDIR
S_ISDIR          1117 dir.c          #ifndef S_ISDIR
S_ISDIR          1192 dir.c          		isdir = S_ISDIR(st.st_mode) ? YES : S_ISLNK(st.st_mode) ? UNKNOWN : NO;
S_ISDIR          1202 dir.c          		isdir = S_ISDIR(st.st_mode) ? YES : NO;
S_ISDIR          1236 dir.c          		    new_isdir = S_ISDIR(st.st_mode) ? YES : S_ISLNK(st.st_mode) ? UNKNOWN : NO;
S_ISDIR            57 dln.c          #ifndef S_ISDIR
S_ISDIR          1765 dln.c          	    if (!S_ISDIR(st.st_mode) && eaccess(fbuf, X_OK) == 0)
S_ISDIR          1773 dln.c          		if (!S_ISDIR(st.st_mode) && eaccess(mac_fullpath, X_OK) == 0)
S_ISDIR           886 file.c         #ifndef S_ISDIR
S_ISDIR           893 file.c             if (S_ISDIR(st.st_mode)) return Qtrue;
S_ISDIR          1486 file.c             else if (S_ISDIR(st->st_mode)) {
S_ISDIR          3462 file.c             if (S_ISDIR(get_stat(obj)->st_mode)) return Qtrue;
S_ISDIR          4020 file.c         	if (stat(p0, &st) == 0 && S_ISDIR(st.st_mode) && (st.st_mode & S_IWOTH)
S_ISDIR            65 util.c         #ifndef S_ISDIR
S_ISDIR            23 wince/sys/stat.h #ifndef S_ISDIR


S_ISFIFO

S_ISFIFO          156 defines.h      #ifndef S_ISFIFO
S_ISFIFO          908 file.c         #  ifndef S_ISFIFO
S_ISFIFO          915 file.c             if (S_ISFIFO(st.st_mode)) return Qtrue;
S_ISFIFO         1497 file.c         #ifdef S_ISFIFO
S_ISFIFO         1498 file.c             else if (S_ISFIFO(st->st_mode)) {
S_ISFIFO         3478 file.c             if (S_ISFIFO(get_stat(obj)->st_mode)) return Qtrue;


S_ISLNK

S_ISLNK          1121 dir.c          #ifndef S_ISLNK
S_ISLNK          1192 dir.c          		isdir = S_ISDIR(st.st_mode) ? YES : S_ISLNK(st.st_mode) ? UNKNOWN : NO;
S_ISLNK          1236 dir.c          		    new_isdir = S_ISDIR(st.st_mode) ? YES : S_ISLNK(st.st_mode) ? UNKNOWN : NO;
S_ISLNK           931 file.c         #ifndef S_ISLNK
S_ISLNK           945 file.c         #ifdef S_ISLNK
S_ISLNK           951 file.c             if (S_ISLNK(st.st_mode)) return Qtrue;
S_ISLNK          1502 file.c         #ifdef S_ISLNK
S_ISLNK          1503 file.c             else if (S_ISLNK(st->st_mode)) {
S_ISLNK          3504 file.c         #ifdef S_ISLNK
S_ISLNK          3505 file.c             if (S_ISLNK(get_stat(obj)->st_mode)) return Qtrue;


S_ISREG

S_ISREG           159 defines.h      #ifndef S_ISREG
S_ISREG          1224 file.c         #ifndef S_ISREG
S_ISREG          1242 file.c             if (S_ISREG(st.st_mode)) return Qtrue;
S_ISREG          1483 file.c             if (S_ISREG(st->st_mode)) {
S_ISREG          3870 file.c             if (S_ISREG(get_stat(obj)->st_mode)) return Qtrue;
S_ISREG           388 io.c           #ifndef S_ISREG
S_ISREG           399 io.c                       !S_ISREG(buf.st_mode)
S_ISREG          1190 io.c               if (fstat(fptr->fd, &st) == 0  && S_ISREG(st.st_mode)
S_ISREG            26 wince/sys/stat.h #ifndef S_ISREG


S_ISSOCK

S_ISSOCK          967 file.c         #ifndef S_ISSOCK
S_ISSOCK          981 file.c         #ifdef S_ISSOCK
S_ISSOCK          985 file.c             if (S_ISSOCK(st.st_mode)) return Qtrue;
S_ISSOCK         1507 file.c         #ifdef S_ISSOCK
S_ISSOCK         1508 file.c             else if (S_ISSOCK(st->st_mode)) {
S_ISSOCK         3525 file.c         #ifdef S_ISSOCK
S_ISSOCK         3526 file.c             if (S_ISSOCK(get_stat(obj)->st_mode)) return Qtrue;
S_ISSOCK          169 io.c           #ifndef S_ISSOCK
S_ISSOCK          185 io.c           #elif !defined(S_ISSOCK)
S_ISSOCK          195 io.c               return S_ISSOCK(sbuf.st_mode);


S_IWGRP

S_IWGRP           123 defines.h      #ifndef S_IWGRP
S_IWGRP          1097 file.c         #  define S_IWUGO		(S_IWUSR | S_IWGRP | S_IWOTH)
S_IWGRP          3730 file.c         #ifdef S_IWGRP
S_IWGRP          3732 file.c         	return st->st_mode & S_IWGRP ? Qtrue : Qfalse;
S_IWGRP          3760 file.c         #ifdef S_IWGRP
S_IWGRP          3762 file.c         	return st->st_mode & S_IWGRP ? Qtrue : Qfalse;
S_IWGRP          3172 win32/win32.c      st->st_mode &= ~(S_IWGRP | S_IWOTH);
S_IWGRP          3323 win32/win32.c  	st->st_mode &= ~(S_IWGRP | S_IWOTH);
S_IWGRP           275 win32/win32.h  #ifndef S_IWGRP


S_IWOTH

S_IWOTH           126 defines.h      #ifndef S_IWOTH
S_IWOTH          1097 file.c         #  define S_IWUGO		(S_IWUSR | S_IWGRP | S_IWOTH)
S_IWOTH          1179 file.c         #ifdef S_IWOTH
S_IWOTH          1183 file.c             if ((st.st_mode & (S_IWOTH)) == S_IWOTH) {
S_IWOTH          3734 file.c         #ifdef S_IWOTH
S_IWOTH          3735 file.c             if (!(st->st_mode & S_IWOTH)) return Qfalse;
S_IWOTH          3764 file.c         #ifdef S_IWOTH
S_IWOTH          3765 file.c             if (!(st->st_mode & S_IWOTH)) return Qfalse;
S_IWOTH          3787 file.c             if ((get_stat(obj)->st_mode & (S_IWOTH)) == S_IWOTH) {
S_IWOTH          4017 file.c         #ifndef S_IWOTH
S_IWOTH          4020 file.c         	if (stat(p0, &st) == 0 && S_ISDIR(st.st_mode) && (st.st_mode & S_IWOTH)
S_IWOTH          3172 win32/win32.c      st->st_mode &= ~(S_IWGRP | S_IWOTH);
S_IWOTH          3323 win32/win32.c  	st->st_mode &= ~(S_IWGRP | S_IWOTH);
S_IWOTH           278 win32/win32.h  #ifndef S_IWOTH


S_IWRITE

S_IWRITE          811 ext/nkf/nkf-utf8/nkf.c                                 S_IREAD | S_IWRITE);
S_IWRITE         3215 win32/win32.c  	mode |= S_IREAD | S_IWRITE | S_IWUSR;


S_IWUGO

S_IWUGO          1096 file.c         #ifndef S_IWUGO
S_IWUGO          1122 file.c         	return UINT2NUM(st.st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
S_IWUGO          1184 file.c         	return UINT2NUM(st.st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
S_IWUGO          3702 file.c               return UINT2NUM(get_stat(obj)->st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
S_IWUGO          3788 file.c               return UINT2NUM(get_stat(obj)->st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));


S_IWUSR

S_IWUSR           120 defines.h      #ifndef S_IWUSR
S_IWUSR          1097 file.c         #  define S_IWUGO		(S_IWUSR | S_IWGRP | S_IWOTH)
S_IWUSR          3726 file.c         #ifdef S_IWUSR
S_IWUSR          3728 file.c         	return st->st_mode & S_IWUSR ? Qtrue : Qfalse;
S_IWUSR          3756 file.c         #ifdef S_IWUSR
S_IWUSR          3758 file.c         	return st->st_mode & S_IWUSR ? Qtrue : Qfalse;
S_IWUSR          3175 win32/win32.c  	st->st_mode |= S_IWUSR;
S_IWUSR          3215 win32/win32.c  	mode |= S_IREAD | S_IWRITE | S_IWUSR;
S_IWUSR           272 win32/win32.h  #if !defined S_IWUSR && !defined __MINGW32__


S_IXGRP

S_IXGRP           132 defines.h      #ifndef S_IXGRP
S_IXGRP           818 file.c         #  define S_IXUGO		(S_IXUSR | S_IXGRP | S_IXOTH)
S_IXGRP           824 file.c         #if defined(S_IXGRP) && !defined(_WIN32) && !defined(__CYGWIN__)
S_IXGRP          3818 file.c         #ifdef S_IXGRP
S_IXGRP          3820 file.c         	return st->st_mode & S_IXGRP ? Qtrue : Qfalse;
S_IXGRP          3846 file.c         #ifdef S_IXGRP
S_IXGRP          3848 file.c         	return st->st_mode & S_IXGRP ? Qtrue : Qfalse;
S_IXGRP           285 win32/win32.h  #ifndef S_IXGRP


S_IXOTH

S_IXOTH           135 defines.h      #ifndef S_IXOTH
S_IXOTH           818 file.c         #  define S_IXUGO		(S_IXUSR | S_IXGRP | S_IXOTH)
S_IXOTH          3822 file.c         #ifdef S_IXOTH
S_IXOTH          3823 file.c             if (!(st->st_mode & S_IXOTH)) return Qfalse;
S_IXOTH          3850 file.c         #ifdef S_IXOTH
S_IXOTH          3851 file.c             if (!(st->st_mode & S_IXOTH)) return Qfalse;
S_IXOTH           288 win32/win32.h  #ifndef S_IXOTH


S_IXUGO

S_IXUGO           817 file.c         #ifndef S_IXUGO
S_IXUGO           839 file.c         	if (st.st_mode & S_IXUGO)
S_IXUGO          1122 file.c         	return UINT2NUM(st.st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
S_IXUGO          1184 file.c         	return UINT2NUM(st.st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
S_IXUGO          3702 file.c               return UINT2NUM(get_stat(obj)->st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
S_IXUGO          3788 file.c               return UINT2NUM(get_stat(obj)->st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));


S_IXUSR

S_IXUSR           129 defines.h      #ifndef S_IXUSR
S_IXUSR           818 file.c         #  define S_IXUGO		(S_IXUSR | S_IXGRP | S_IXOTH)
S_IXUSR          3814 file.c         #ifdef S_IXUSR
S_IXUSR          3816 file.c         	return st->st_mode & S_IXUSR ? Qtrue : Qfalse;
S_IXUSR          3842 file.c         #ifdef S_IXUSR
S_IXUSR          3844 file.c         	return st->st_mode & S_IXUSR ? Qtrue : Qfalse;
S_IXUSR           282 win32/win32.h  #if !defined S_IXUSR && !defined __MINGW32__


S_LEN

S_LEN              46 ext/strscan/strscan.c #define S_PEND(s)  (S_PBEG(s) + S_LEN(s))
S_LEN              48 ext/strscan/strscan.c #define S_RESTLEN(s) (S_LEN(s) - (s)->curr)
S_LEN             135 ext/strscan/strscan.c     if (beg_i > S_LEN(p)) return Qnil;
S_LEN             136 ext/strscan/strscan.c     if (end_i > S_LEN(p))
S_LEN             137 ext/strscan/strscan.c         end_i = S_LEN(p);
S_LEN             146 ext/strscan/strscan.c     if (beg_i > S_LEN(p)) return Qnil;
S_LEN             147 ext/strscan/strscan.c     if (beg_i + len > S_LEN(p))
S_LEN             148 ext/strscan/strscan.c         len = S_LEN(p) - beg_i;
S_LEN             291 ext/strscan/strscan.c     p->curr = S_LEN(p);
S_LEN             410 ext/strscan/strscan.c     if (i < 0) i += S_LEN(p);
S_LEN             412 ext/strscan/strscan.c     if (i > S_LEN(p)) rb_raise(rb_eRangeError, "index out of range");
S_LEN             703 ext/strscan/strscan.c     if (p->curr + len > S_LEN(p)) {
S_LEN             704 ext/strscan/strscan.c         len = S_LEN(p) - p->curr;
S_LEN             785 ext/strscan/strscan.c     if (p->curr + len > S_LEN(p))
S_LEN             786 ext/strscan/strscan.c         len = S_LEN(p) - p->curr;
S_LEN            1044 ext/strscan/strscan.c     return extract_range(p, p->prev + p->regs.end[0], S_LEN(p));
S_LEN            1061 ext/strscan/strscan.c     return extract_range(p, p->curr, S_LEN(p));
S_LEN            1078 ext/strscan/strscan.c     i = S_LEN(p) - p->curr;
S_LEN            1132 ext/strscan/strscan.c                        p->curr, S_LEN(p),
S_LEN            1140 ext/strscan/strscan.c                    p->curr, S_LEN(p),
S_LEN            1175 ext/strscan/strscan.c     len = S_LEN(p) - p->curr;


S_LONG

S_LONG            408 ext/bigdecimal/bigdecimal.c     S_LONG e;
S_LONG           1106 ext/bigdecimal/bigdecimal.c     S_LONG e;
S_LONG           1107 ext/bigdecimal/bigdecimal.c     S_LONG s;
S_LONG           1131 ext/bigdecimal/bigdecimal.c     S_LONG e = VpExponent10(GetVpValue(self,1));
S_LONG           1162 ext/bigdecimal/bigdecimal.c     S_LONG mp, ma, n;
S_LONG           1186 ext/bigdecimal/bigdecimal.c     S_LONG mf;
S_LONG           1205 ext/bigdecimal/bigdecimal.c     S_LONG mf;
S_LONG           1373 ext/bigdecimal/bigdecimal.c static S_LONG DBLE_FIG = 8;    /* figure of double */
S_LONG           2464 ext/bigdecimal/bigdecimal.c     if(!AddExponent(c,(S_LONG)1)) return (-1L);
S_LONG           2779 ext/bigdecimal/bigdecimal.c     if(!AddExponent(c,(S_LONG)2))   return 0;
S_LONG           2786 ext/bigdecimal/bigdecimal.c     if(!AddExponent(r,(S_LONG)1)) return 0;
S_LONG           3072 ext/bigdecimal/bigdecimal.c VP_EXPORT S_LONG
S_LONG           3075 ext/bigdecimal/bigdecimal.c     S_LONG ex;
S_LONG           3175 ext/bigdecimal/bigdecimal.c     S_LONG ex;
S_LONG           3221 ext/bigdecimal/bigdecimal.c     S_LONG ex;
S_LONG           3414 ext/bigdecimal/bigdecimal.c VpVtoD(double *d, S_LONG *e, Real *m)
S_LONG           3613 ext/bigdecimal/bigdecimal.c     S_LONG y_prec, f_prec;
S_LONG           3614 ext/bigdecimal/bigdecimal.c     S_LONG n;
S_LONG           3615 ext/bigdecimal/bigdecimal.c     S_LONG e;
S_LONG           3616 ext/bigdecimal/bigdecimal.c     S_LONG prec;
S_LONG           3617 ext/bigdecimal/bigdecimal.c     S_LONG nr;
S_LONG           3643 ext/bigdecimal/bigdecimal.c     n = (S_LONG)y->MaxPrec;
S_LONG           3644 ext/bigdecimal/bigdecimal.c     if((S_LONG)x->MaxPrec > n) n = (S_LONG)x->MaxPrec;
S_LONG           3650 ext/bigdecimal/bigdecimal.c     y_prec = (S_LONG)y->MaxPrec;
S_LONG           3651 ext/bigdecimal/bigdecimal.c     f_prec = (S_LONG)f->MaxPrec;
S_LONG           3656 ext/bigdecimal/bigdecimal.c     prec = prec - (S_LONG)y->MaxPrec;
S_LONG           3658 ext/bigdecimal/bigdecimal.c     e /= ((S_LONG)BASE_FIG);
S_LONG           3669 ext/bigdecimal/bigdecimal.c     n = y_prec*((S_LONG)BASE_FIG);
S_LONG           3908 ext/bigdecimal/bigdecimal.c         if(!AddExponent(m,(S_LONG)1)) return 0;
S_LONG           3968 ext/bigdecimal/bigdecimal.c     S_LONG sign;
S_LONG            141 ext/bigdecimal/bigdecimal.h VP_EXPORT S_LONG VpExponent10(Real *a);
S_LONG            147 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpVtoD(double *d,S_LONG *e,Real *m);
S_LONG            178 ext/bigdecimal/bigdecimal.h #define VpChangeSign(a,s) {if((s)>0) (a)->sign=(short)Abs((S_LONG)(a)->sign);else (a)->sign=-(short)Abs((S_LONG)(a)->sign);}


S_MEMCPY

S_MEMCPY          373 ext/syck/bytecode.c                         S_MEMCPY( sycklval->name, qstr + 1, char, strlen( qstr ) );
S_MEMCPY          304 ext/syck/emitter.c 	    S_MEMCPY( e->marker, str, char, rest );
S_MEMCPY          315 ext/syck/emitter.c     S_MEMCPY( e->marker, str, char, len );
S_MEMCPY           39 ext/syck/syck.c     S_MEMCPY( new, buf, char, len );
S_MEMCPY           93 ext/syck/syck.c         S_MEMCPY( buf + skip, beg, char, len );
S_MEMCPY          110 ext/syck/token.c             S_MEMCPY( s + i, cs, char, cl ); \


S_MEMZERO

S_MEMZERO         274 ext/syck/emitter.c         S_MEMZERO( e->buffer, char, e->bufsize );
S_MEMZERO         374 ext/syck/emitter.c             S_MEMZERO( header, char, 64 );
S_MEMZERO        1238 ext/syck/emitter.c             S_MEMZERO( anchor_name, char, strlen( anc ) + 10 );
S_MEMZERO         762 ext/syck/rubyext.c     S_MEMZERO( parser->bonus, struct parser_xtra, 1 );
S_MEMZERO        1950 ext/syck/rubyext.c     S_MEMZERO( emitter->bonus, struct emitter_xtra, 1 );
S_MEMZERO          38 ext/syck/syck.c     S_MEMZERO( new, char, len + 1 );
S_MEMZERO         125 ext/syck/syck.c         S_MEMZERO( p->buffer, char, p->bufsize );
S_MEMZERO         162 ext/syck/syck.c     S_MEMZERO( p, SyckParser, 1 );


S_PBEG

S_PBEG             46 ext/strscan/strscan.c #define S_PEND(s)  (S_PBEG(s) + S_LEN(s))
S_PBEG             47 ext/strscan/strscan.c #define CURPTR(s) (S_PBEG(s) + (s)->curr)
S_PBEG            138 ext/strscan/strscan.c     return infect(rb_str_new(S_PBEG(p) + beg_i, end_i - beg_i), p);
S_PBEG            149 ext/strscan/strscan.c     return infect(rb_str_new(S_PBEG(p) + beg_i, len), p);


S_REALLOC_N

S_REALLOC_N       125 ext/syck/bytecode.c                 S_REALLOC_N( s, char, c ); \
S_REALLOC_N       208 ext/syck/emitter.c         S_REALLOC_N( e->levels, SyckLevel, e->lvl_capa );
S_REALLOC_N       212 ext/syck/node.c         S_REALLOC_N( m->keys, SYMID, m->capa );
S_REALLOC_N       213 ext/syck/node.c         S_REALLOC_N( m->values, SYMID, m->capa );
S_REALLOC_N       241 ext/syck/node.c         S_REALLOC_N( m1->keys, SYMID, m1->capa );
S_REALLOC_N       242 ext/syck/node.c         S_REALLOC_N( m1->values, SYMID, m1->capa );
S_REALLOC_N       335 ext/syck/node.c         S_REALLOC_N( s->items, SYMID, s->capa );
S_REALLOC_N       368 ext/syck/syck.c         S_REALLOC_N( p->levels, SyckLevel, p->lvl_capa );
S_REALLOC_N        97 ext/syck/token.c                 S_REALLOC_N( s, char, c ); \
S_REALLOC_N       108 ext/syck/token.c                 S_REALLOC_N( s, char, c ); \
S_REALLOC_N        67 ext/syck/yaml2byte.c         str->buffer = S_REALLOC_N( str->buffer, char, str->length + 1 );
S_REALLOC_N       104 ext/syck/yaml2byte.c             str->buffer = S_REALLOC_N( str->buffer, char, str->length + 1 );


S_RESTLEN

S_RESTLEN         438 ext/strscan/strscan.c                          (UChar* )(CURPTR(p) + S_RESTLEN(p)),
S_RESTLEN         443 ext/strscan/strscan.c                           (UChar* )CURPTR(p), (UChar* )(CURPTR(p) + S_RESTLEN(p)),
S_RESTLEN         444 ext/strscan/strscan.c                           (UChar* )CURPTR(p), (UChar* )(CURPTR(p) + S_RESTLEN(p)),


S_inf

S_inf             447 ext/syck/rubyext.c                 obj = rb_float_new( S_inf() );
S_inf             451 ext/syck/rubyext.c                 obj = rb_float_new( -S_inf() );


S_zero

S_zero             65 ext/syck/rubyext.c static double S_inf() { return S_one() / S_zero(); }
S_zero             66 ext/syck/rubyext.c static double S_nan() { return S_zero() / S_zero(); }


SafeGetCipher

SafeGetCipher      43 ext/openssl/ossl_cipher.c     SafeGetCipher(obj, ctx);
SafeGetCipher     113 ext/openssl/ossl_cipher.c     SafeGetCipher(other, ctx2);


SafeGetDigest

SafeGetDigest      41 ext/openssl/ossl_digest.c     SafeGetDigest(obj, ctx);
SafeGetDigest     113 ext/openssl/ossl_digest.c     SafeGetDigest(other, ctx2);


SafeGetOCSPCertId

SafeGetOCSPCertId  483 ext/openssl/ossl_ocsp.c     SafeGetOCSPCertId(cid, id);
SafeGetOCSPCertId  650 ext/openssl/ossl_ocsp.c     SafeGetOCSPCertId(other, id2);
SafeGetOCSPCertId  663 ext/openssl/ossl_ocsp.c     SafeGetOCSPCertId(other, id2);


SafeGetPKCS7

SafeGetPKCS7      171 ext/openssl/ossl_pkcs7.c     SafeGetPKCS7(pkcs7, p7);
SafeGetPKCS7      322 ext/openssl/ossl_pkcs7.c     SafeGetPKCS7(other, b);


SafeGetPKey

SafeGetPKey        89 ext/openssl/ossl_pkey.c     SafeGetPKey(obj, pkey);
SafeGetPKey       102 ext/openssl/ossl_pkey.c     SafeGetPKey(obj, pkey);
SafeGetPKey       112 ext/openssl/ossl_pkey.c     SafeGetPKey(obj, pkey);
SafeGetPKey       126 ext/openssl/ossl_pkey.c     SafeGetPKey(obj, pkey);


SafeGetX509

SafeGetX509        94 ext/openssl/ossl_x509cert.c     SafeGetX509(obj, x509);
SafeGetX509       104 ext/openssl/ossl_x509cert.c     SafeGetX509(obj, x509);
SafeGetX509       161 ext/openssl/ossl_x509cert.c     SafeGetX509(other, b);


SafeGetX509CRL

SafeGetX509CRL     44 ext/openssl/ossl_x509crl.c     SafeGetX509CRL(obj, crl);
SafeGetX509CRL     54 ext/openssl/ossl_x509crl.c     SafeGetX509CRL(obj, crl);
SafeGetX509CRL    121 ext/openssl/ossl_x509crl.c     SafeGetX509CRL(other, b);


SafeGetX509Ext

SafeGetX509Ext     76 ext/openssl/ossl_x509ext.c     SafeGetX509Ext(obj, ext);
SafeGetX509Ext     86 ext/openssl/ossl_x509ext.c     SafeGetX509Ext(obj, ext);


SafeGetX509Name

SafeGetX509Name    68 ext/openssl/ossl_x509name.c     SafeGetX509Name(obj, name);
SafeGetX509Name   241 ext/openssl/ossl_x509name.c     SafeGetX509Name(other, name2);


SafeGetX509Req

SafeGetX509Req     63 ext/openssl/ossl_x509req.c     SafeGetX509Req(obj, req);
SafeGetX509Req     73 ext/openssl/ossl_x509req.c     SafeGetX509Req(obj, req);
SafeGetX509Req    129 ext/openssl/ossl_x509req.c     SafeGetX509Req(other, b);


SafeGetX509Store

SafeGetX509Store   73 ext/openssl/ossl_x509store.c     SafeGetX509Store(obj, store);
SafeGetX509Store   83 ext/openssl/ossl_x509store.c     SafeGetX509Store(obj, store);
SafeGetX509Store  376 ext/openssl/ossl_x509store.c     SafeGetX509Store(store, x509st);


SafeStringValue

SafeStringValue  6255 eval.c         	SafeStringValue(src);
SafeStringValue  6339 eval.c         	SafeStringValue(src);
SafeStringValue  6391 eval.c         		SafeStringValue(argv[0]);
SafeStringValue    51 ext/Win32API/Win32API.c     SafeStringValue(dllname);
SafeStringValue    52 ext/Win32API/Win32API.c     SafeStringValue(proc);
SafeStringValue    77 ext/Win32API/Win32API.c 	    SafeStringValue(ptr[i]);
SafeStringValue    92 ext/Win32API/Win32API.c 	SafeStringValue(import);
SafeStringValue   119 ext/Win32API/Win32API.c 	SafeStringValue(export);
SafeStringValue   111 ext/bigdecimal/bigdecimal.c         SafeStringValue(v);
SafeStringValue   200 ext/bigdecimal/bigdecimal.c     SafeStringValue(str);
SafeStringValue  1064 ext/bigdecimal/bigdecimal.c             SafeStringValue(f);
SafeStringValue  1195 ext/bigdecimal/bigdecimal.c     SafeStringValue(iniValue);
SafeStringValue  1214 ext/bigdecimal/bigdecimal.c     SafeStringValue(iniValue);
SafeStringValue   121 ext/dbm/dbm.c      SafeStringValue(file);
SafeStringValue   162 ext/etc/etc.c      SafeStringValue(nam);
SafeStringValue   367 ext/etc/etc.c      SafeStringValue(nam);
SafeStringValue   123 ext/gdbm/gdbm.c     SafeStringValue(file);
SafeStringValue   150 ext/openssl/ossl.c     SafeStringValue(pass);
SafeStringValue   139 ext/openssl/ossl_config.c 	SafeStringValue(path);
SafeStringValue    70 ext/openssl/ossl_pkey.c     SafeStringValue(filename);
SafeStringValue    42 ext/openssl/ossl_rand.c     SafeStringValue(filename);
SafeStringValue    53 ext/openssl/ossl_rand.c     SafeStringValue(filename);
SafeStringValue    89 ext/openssl/ossl_rand.c     SafeStringValue(filename);
SafeStringValue   100 ext/openssl/ossl_rand.c     SafeStringValue(filename);
SafeStringValue    65 ext/openssl/ossl_x509cert.c     SafeStringValue(filename);
SafeStringValue    65 ext/readline/readline.c 	SafeStringValue(tmp);
SafeStringValue   264 ext/readline/readline.c 	SafeStringValue(str);
SafeStringValue   306 ext/readline/readline.c     SafeStringValue(str);
SafeStringValue   348 ext/readline/readline.c     SafeStringValue(str);
SafeStringValue   390 ext/readline/readline.c     SafeStringValue(str);
SafeStringValue   433 ext/readline/readline.c     SafeStringValue(str);
SafeStringValue   476 ext/readline/readline.c     SafeStringValue(str);
SafeStringValue   550 ext/readline/readline.c     SafeStringValue(str);
SafeStringValue   571 ext/readline/readline.c     SafeStringValue(str);
SafeStringValue   587 ext/readline/readline.c 	SafeStringValue(str);
SafeStringValue   108 ext/sdbm/init.c     SafeStringValue(file);
SafeStringValue   741 ext/socket/socket.c 	SafeStringValue(host);
SafeStringValue   775 ext/socket/socket.c 	SafeStringValue(port);
SafeStringValue  1476 ext/socket/socket.c     SafeStringValue(path);
SafeStringValue    68 ext/syslog/syslog.c #ifdef SafeStringValue
SafeStringValue    69 ext/syslog/syslog.c     SafeStringValue(ident);
SafeStringValue  2427 ext/zlib/zlib.c     SafeStringValue(filename);
SafeStringValue  1538 hash.c             SafeStringValue(name);
SafeStringValue  1577 hash.c             SafeStringValue(name);
SafeStringValue  1613 hash.c             SafeStringValue(key);
SafeStringValue  3036 io.c           	SafeStringValue(pname);
SafeStringValue  3071 io.c           	    SafeStringValue(vmode);
SafeStringValue  3134 io.c           	SafeStringValue(vmode);
SafeStringValue  3917 io.c           	    SafeStringValue(mode);
SafeStringValue  4380 io.c               SafeStringValue(str);
SafeStringValue  1182 process.c      	SafeStringValue(prog);
SafeStringValue  1185 process.c      	SafeStringValue(argv[i]);
SafeStringValue   576 signal.c       	    SafeStringValue(command);	/* taint check */


ScanEnv

ScanEnv          3345 regcomp.c        ScanEnv*        scan_env;
ScanEnv          4735 regcomp.c        ScanEnv  scan_env;


SetBit

SetBit           1416 win32/win32.c  	SetBit(p->bits, 0);
SetBit           1418 win32/win32.c  	SetBit(p->bits, 1);
SetBit           1451 win32/win32.c  	    SetBit(p->bits, p->nfiles * 2);
SetBit           1453 win32/win32.c  	    SetBit(p->bits, p->nfiles * 2 + 1);


SetEnvironmentVariable

SetEnvironmentVariable 1692 hash.c             SetEnvironmentVariable(name,value);
SetEnvironmentVariable  376 win32/win32.c  	    SetEnvironmentVariable("HOME", env);
SetEnvironmentVariable  384 win32/win32.c  	SetEnvironmentVariable("USER", env);
SetEnvironmentVariable  387 win32/win32.c  	SetEnvironmentVariable("USER", env);


SetFileAttributes

SetFileAttributes 3136 win32/win32.c  	    SetFileAttributes(newpath, oldatts);
SetFileAttributes 3924 win32/win32.c  	    SetFileAttributes(path, attr & ~FILE_ATTRIBUTE_READONLY);
SetFileAttributes 3930 win32/win32.c  		SetFileAttributes(path, attr);
SetFileAttributes 3944 win32/win32.c  	    SetFileAttributes(path, attr & ~FILE_ATTRIBUTE_READONLY);
SetFileAttributes 3950 win32/win32.c  		SetFileAttributes(path, attr);


SetFileAttributesA

SetFileAttributesA 3108 win32/win32.c  	    SetFileAttributesA(newpath, newatts & ~ FILE_ATTRIBUTE_READONLY);
SetFileAttributesA   63 wince/wince.h  #define SetFileAttributes SetFileAttributesA


Sigma0_256

Sigma0_256        306 ext/digest/sha2/sha2.c 	(h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
Sigma0_256        316 ext/digest/sha2/sha2.c 	(h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
Sigma0_256        329 ext/digest/sha2/sha2.c 	(h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
Sigma0_256        418 ext/digest/sha2/sha2.c 		T2 = Sigma0_256(a) + Maj(a, b, c);
Sigma0_256        441 ext/digest/sha2/sha2.c 		T2 = Sigma0_256(a) + Maj(a, b, c);


Sigma0_512

Sigma0_512        607 ext/digest/sha2/sha2.c 	(h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)), \
Sigma0_512        617 ext/digest/sha2/sha2.c 	(h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)); \
Sigma0_512        630 ext/digest/sha2/sha2.c 	(h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)); \
Sigma0_512        714 ext/digest/sha2/sha2.c 		T2 = Sigma0_512(a) + Maj(a, b, c);
Sigma0_512        737 ext/digest/sha2/sha2.c 		T2 = Sigma0_512(a) + Maj(a, b, c);


Sigma1_256

Sigma1_256        303 ext/digest/sha2/sha2.c 	T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + \
Sigma1_256        313 ext/digest/sha2/sha2.c 	T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + \
Sigma1_256        326 ext/digest/sha2/sha2.c 	T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + K256[j] + \
Sigma1_256        413 ext/digest/sha2/sha2.c 		T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + W256[j];
Sigma1_256        416 ext/digest/sha2/sha2.c 		T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + (W256[j] = *data++);
Sigma1_256        439 ext/digest/sha2/sha2.c 		T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] +


Sigma1_512

Sigma1_512        604 ext/digest/sha2/sha2.c 	T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + \
Sigma1_512        614 ext/digest/sha2/sha2.c 	T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + \
Sigma1_512        627 ext/digest/sha2/sha2.c 	T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + K512[j] + \
Sigma1_512        709 ext/digest/sha2/sha2.c 		T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + W512[j];
Sigma1_512        712 ext/digest/sha2/sha2.c 		T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + (W512[j] = *data++);
Sigma1_512        735 ext/digest/sha2/sha2.c 		T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] +


Sleep

Sleep            9570 eval.c         #  define pause() Sleep(INFINITE)
Sleep            3359 win32/win32.c  #define yield_once() Sleep(0)
Sleep            3416 win32/win32.c  	    Sleep(1);


StackIndex

StackIndex        310 regexec.c            StackIndex si;     /* index of stack */
StackIndex        316 regexec.c            StackIndex start;  /* prev. info (for backtrack  "(...)*" ) */
StackIndex        317 regexec.c            StackIndex end;    /* prev. info (for backtrack  "(...)*" ) */
StackIndex       1217 regexec.c        StackIndex si;
StackIndex       1218 regexec.c        StackIndex *repeat_stk;
StackIndex       1219 regexec.c        StackIndex *mem_start_stk, *mem_end_stk;
StackIndex       1225 regexec.c        repeat_stk = (StackIndex* )alloca_base;
StackIndex       1227 regexec.c        mem_start_stk = (StackIndex* )(repeat_stk + reg->num_repeat);
StackIndex       1989 regexec.c            mem_start_stk[mem] = (StackIndex )((void* )s);
StackIndex       2003 regexec.c            mem_end_stk[mem] = (StackIndex )((void* )s);
StackIndex       2020 regexec.c            mem_end_stk[mem] = (StackIndex )((void* )s);
StackIndex       2026 regexec.c      	mem_start_stk[mem] = (StackIndex )((void* )stkp->u.mem.pstr);


StackType

StackType         380 regexec.c          stk_alloc  = (StackType* )(msa->stack_p);\
StackType         387 regexec.c      		       + sizeof(StackType) * (stack_num));\
StackType         388 regexec.c          stk_alloc  = (StackType* )(alloc_addr + sizeof(char*) * (ptr_num));\
StackType         422 regexec.c        StackType *x, *stk_base, *stk_end, *stk;
StackType         430 regexec.c          x = (StackType* )xmalloc(sizeof(StackType) * n * 2);
StackType         435 regexec.c          xmemcpy(x, stk_base, n * sizeof(StackType));
StackType         446 regexec.c          x = (StackType* )xrealloc(stk_base, sizeof(StackType) * n);
StackType         712 regexec.c        StackType *k = stk;\
StackType         727 regexec.c        StackType* k = stk;\
StackType         742 regexec.c        StackType* k = stk;\
StackType         762 regexec.c        StackType* k = stk;\
StackType         802 regexec.c        StackType* k = stk;\
StackType         868 regexec.c        StackType* k = stk;\
StackType         956 regexec.c        StackType* k = *kp;
StackType         997 regexec.c        StackType* stk_base;
StackType        1215 regexec.c        StackType *stk_alloc, *stk_base, *stk, *stk_end;
StackType        1216 regexec.c        StackType *stkp; /* used as any purpose. */


StartSockets

StartSockets       83 win32/win32.c  static void StartSockets(void);
StartSockets      426 win32/win32.c      StartSockets();
StartSockets     2075 win32/win32.c  	StartSockets();
StartSockets     2199 win32/win32.c  	StartSockets();
StartSockets     2222 win32/win32.c  	StartSockets();
StartSockets     2239 win32/win32.c  	StartSockets();
StartSockets     2265 win32/win32.c  	StartSockets();
StartSockets     2282 win32/win32.c  	StartSockets();
StartSockets     2297 win32/win32.c  	StartSockets();
StartSockets     2314 win32/win32.c  	StartSockets();
StartSockets     2331 win32/win32.c  	StartSockets();
StartSockets     2348 win32/win32.c  	StartSockets();
StartSockets     2366 win32/win32.c  	StartSockets();
StartSockets     2383 win32/win32.c  	StartSockets();
StartSockets     2401 win32/win32.c  	StartSockets();
StartSockets     2418 win32/win32.c  	StartSockets();
StartSockets     2435 win32/win32.c  	StartSockets();
StartSockets     2494 win32/win32.c  	StartSockets();
StartSockets     2516 win32/win32.c  	StartSockets();
StartSockets     2533 win32/win32.c  	StartSockets();
StartSockets     2550 win32/win32.c  	StartSockets();
StartSockets     2567 win32/win32.c  	StartSockets();
StartSockets     2584 win32/win32.c  	StartSockets();
StartSockets     2601 win32/win32.c  	StartSockets();
StartSockets     2618 win32/win32.c  	StartSockets();
StartSockets     2642 win32/win32.c  	StartSockets();


StrCmp

StrCmp           1919 ext/bigdecimal/bigdecimal.c     if(StrCmp(szVal,SZ_PINF)==0 ||
StrCmp           1920 ext/bigdecimal/bigdecimal.c        StrCmp(szVal,SZ_INF)==0 ) {
StrCmp           1926 ext/bigdecimal/bigdecimal.c     if(StrCmp(szVal,SZ_NINF)==0) {
StrCmp           1932 ext/bigdecimal/bigdecimal.c     if(StrCmp(szVal,SZ_NaN)==0) {


StrNode

StrNode           434 regcomp.c        StrNode* sn;
StrNode           482 regcomp.c        StrNode* sn;
StrNode          1796 regcomp.c            StrNode* sn = &(NSTRING(node));
StrNode          1885 regcomp.c            StrNode* sn = &(NSTRING(node));
StrNode          2034 regcomp.c            StrNode* sn = &(NSTRING(node));
StrNode          2271 regcomp.c            StrNode* xs = &(NSTRING(x));
StrNode          2303 regcomp.c      	  StrNode* ys = &(NSTRING(y));
StrNode          2358 regcomp.c            StrNode* sn = &(NSTRING(node));
StrNode          2949 regcomp.c        StrNode* sn = &NSTRING(node);
StrNode          3172 regcomp.c      	  StrNode* sn = &(NSTRING(target));
StrNode          4001 regcomp.c            StrNode* sn = &(NSTRING(node));
StrNode          4478 regparse.c           StrNode* sn = &(NSTRING(target));
StrNode           226 regparse.h         StrNode       str;


StringIO

StringIO          263 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          276 ext/stringio/stringio.c     StringIO(self);
StringIO          287 ext/stringio/stringio.c     StringIO(self);
StringIO          298 ext/stringio/stringio.c     StringIO(self);
StringIO          309 ext/stringio/stringio.c     StringIO(self);
StringIO          320 ext/stringio/stringio.c     StringIO(self);
StringIO          333 ext/stringio/stringio.c     StringIO(self);
StringIO          347 ext/stringio/stringio.c     return StringIO(self)->string;
StringIO          360 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          382 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          401 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          420 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          438 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          453 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          468 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          485 ext/stringio/stringio.c     struct StringIO *ptr = readable(StringIO(self));
StringIO          499 ext/stringio/stringio.c     ptr = StringIO(orig);
StringIO          523 ext/stringio/stringio.c     return LONG2NUM(StringIO(self)->lineno);
StringIO          537 ext/stringio/stringio.c     StringIO(self)->lineno = NUM2LONG(lineno);
StringIO          585 ext/stringio/stringio.c     return LONG2NUM(StringIO(self)->pos);
StringIO          599 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          619 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          639 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          673 ext/stringio/stringio.c     StringIO(self);
StringIO          692 ext/stringio/stringio.c     struct StringIO *ptr = readable(StringIO(self));
StringIO          710 ext/stringio/stringio.c     struct StringIO *ptr = readable(StringIO(self));
StringIO          752 ext/stringio/stringio.c     struct StringIO *ptr = readable(StringIO(self));
StringIO          911 ext/stringio/stringio.c     VALUE str = strio_getline(argc, argv, readable(StringIO(self)));
StringIO          929 ext/stringio/stringio.c     VALUE line = strio_getline(argc, argv, readable(StringIO(self)));
StringIO          947 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          968 ext/stringio/stringio.c     struct StringIO *ptr = StringIO(self);
StringIO          990 ext/stringio/stringio.c     struct StringIO *ptr = writable(StringIO(self));
StringIO         1049 ext/stringio/stringio.c     struct StringIO *ptr = writable(StringIO(self));
StringIO         1084 ext/stringio/stringio.c     struct StringIO *ptr = readable(StringIO(self));
StringIO         1193 ext/stringio/stringio.c     VALUE string = StringIO(self)->string;
StringIO         1211 ext/stringio/stringio.c     VALUE string = writable(StringIO(self))->string;
StringIO         1230 ext/stringio/stringio.c     VALUE StringIO = rb_define_class("StringIO", rb_cData);
StringIO         1232 ext/stringio/stringio.c     rb_include_module(StringIO, rb_mEnumerable);
StringIO         1233 ext/stringio/stringio.c     rb_define_alloc_func(StringIO, strio_s_allocate);
StringIO         1234 ext/stringio/stringio.c     rb_define_singleton_method(StringIO, "open", strio_s_open, -1);
StringIO         1235 ext/stringio/stringio.c     rb_define_method(StringIO, "initialize", strio_initialize, -1);
StringIO         1236 ext/stringio/stringio.c     rb_define_method(StringIO, "initialize_copy", strio_copy, 1);
StringIO         1237 ext/stringio/stringio.c     rb_define_method(StringIO, "reopen", strio_reopen, -1);
StringIO         1239 ext/stringio/stringio.c     rb_define_method(StringIO, "string", strio_get_string, 0);
StringIO         1240 ext/stringio/stringio.c     rb_define_method(StringIO, "string=", strio_set_string, 1);
StringIO         1241 ext/stringio/stringio.c     rb_define_method(StringIO, "lineno", strio_get_lineno, 0);
StringIO         1242 ext/stringio/stringio.c     rb_define_method(StringIO, "lineno=", strio_set_lineno, 1);
StringIO         1244 ext/stringio/stringio.c     rb_define_method(StringIO, "binmode", strio_binmode, 0);
StringIO         1245 ext/stringio/stringio.c     rb_define_method(StringIO, "close", strio_close, 0);
StringIO         1246 ext/stringio/stringio.c     rb_define_method(StringIO, "close_read", strio_close_read, 0);
StringIO         1247 ext/stringio/stringio.c     rb_define_method(StringIO, "close_write", strio_close_write, 0);
StringIO         1248 ext/stringio/stringio.c     rb_define_method(StringIO, "closed?", strio_closed, 0);
StringIO         1249 ext/stringio/stringio.c     rb_define_method(StringIO, "closed_read?", strio_closed_read, 0);
StringIO         1250 ext/stringio/stringio.c     rb_define_method(StringIO, "closed_write?", strio_closed_write, 0);
StringIO         1251 ext/stringio/stringio.c     rb_define_method(StringIO, "eof", strio_eof, 0);
StringIO         1252 ext/stringio/stringio.c     rb_define_method(StringIO, "eof?", strio_eof, 0);
StringIO         1253 ext/stringio/stringio.c     rb_define_method(StringIO, "fcntl", strio_fcntl, -1);
StringIO         1254 ext/stringio/stringio.c     rb_define_method(StringIO, "flush", strio_flush, 0);
StringIO         1255 ext/stringio/stringio.c     rb_define_method(StringIO, "fsync", strio_fsync, 0);
StringIO         1256 ext/stringio/stringio.c     rb_define_method(StringIO, "pos", strio_get_pos, 0);
StringIO         1257 ext/stringio/stringio.c     rb_define_method(StringIO, "pos=", strio_set_pos, 1);
StringIO         1258 ext/stringio/stringio.c     rb_define_method(StringIO, "rewind", strio_rewind, 0);
StringIO         1259 ext/stringio/stringio.c     rb_define_method(StringIO, "seek", strio_seek, -1);
StringIO         1260 ext/stringio/stringio.c     rb_define_method(StringIO, "sync", strio_get_sync, 0);
StringIO         1261 ext/stringio/stringio.c     rb_define_method(StringIO, "sync=", strio_set_sync, 1);
StringIO         1262 ext/stringio/stringio.c     rb_define_method(StringIO, "tell", strio_tell, 0);
StringIO         1263 ext/stringio/stringio.c     rb_define_method(StringIO, "path", strio_path, 0);
StringIO         1265 ext/stringio/stringio.c     rb_define_method(StringIO, "each", strio_each, -1);
StringIO         1266 ext/stringio/stringio.c     rb_define_method(StringIO, "each_byte", strio_each_byte, 0);
StringIO         1267 ext/stringio/stringio.c     rb_define_method(StringIO, "each_line", strio_each, -1);
StringIO         1268 ext/stringio/stringio.c     rb_define_method(StringIO, "getc", strio_getc, 0);
StringIO         1269 ext/stringio/stringio.c     rb_define_method(StringIO, "ungetc", strio_ungetc, 1);
StringIO         1270 ext/stringio/stringio.c     rb_define_method(StringIO, "readchar", strio_readchar, 0);
StringIO         1271 ext/stringio/stringio.c     rb_define_method(StringIO, "gets", strio_gets, -1);
StringIO         1272 ext/stringio/stringio.c     rb_define_method(StringIO, "readline", strio_readline, -1);
StringIO         1273 ext/stringio/stringio.c     rb_define_method(StringIO, "readlines", strio_readlines, -1);
StringIO         1274 ext/stringio/stringio.c     rb_define_method(StringIO, "read", strio_read, -1);
StringIO         1275 ext/stringio/stringio.c     rb_define_method(StringIO, "sysread", strio_sysread, -1);
StringIO         1276 ext/stringio/stringio.c     rb_define_method(StringIO, "readpartial", strio_sysread, -1);
StringIO         1278 ext/stringio/stringio.c     rb_define_method(StringIO, "write", strio_write, 1);
StringIO         1279 ext/stringio/stringio.c     rb_define_method(StringIO, "<<", strio_addstr, 1);
StringIO         1280 ext/stringio/stringio.c     rb_define_method(StringIO, "print", strio_print, -1);
StringIO         1281 ext/stringio/stringio.c     rb_define_method(StringIO, "printf", strio_printf, -1);
StringIO         1282 ext/stringio/stringio.c     rb_define_method(StringIO, "putc", strio_putc, 1);
StringIO         1283 ext/stringio/stringio.c     rb_define_method(StringIO, "puts", strio_puts, -1);
StringIO         1284 ext/stringio/stringio.c     rb_define_method(StringIO, "syswrite", strio_syswrite, 1);
StringIO         1286 ext/stringio/stringio.c     rb_define_method(StringIO, "isatty", strio_isatty, 0);
StringIO         1287 ext/stringio/stringio.c     rb_define_method(StringIO, "tty?", strio_isatty, 0);
StringIO         1288 ext/stringio/stringio.c     rb_define_method(StringIO, "pid", strio_pid, 0);
StringIO         1289 ext/stringio/stringio.c     rb_define_method(StringIO, "fileno", strio_fileno, 0);
StringIO         1290 ext/stringio/stringio.c     rb_define_method(StringIO, "size", strio_size, 0);
StringIO         1291 ext/stringio/stringio.c     rb_define_method(StringIO, "length", strio_size, 0);
StringIO         1292 ext/stringio/stringio.c     rb_define_method(StringIO, "truncate", strio_truncate, 1);


StringValue

StringValue      1272 array.c        	StringValue(sep);
StringValue       498 bignum.c           StringValue(str);
StringValue      1778 dir.c              StringValue(pattern);
StringValue      1779 dir.c              StringValue(path);
StringValue       283 error.c            StringValue(str);
StringValue       610 error.c            StringValue(str);
StringValue       857 error.c        	StringValue(str);
StringValue      1171 eval.c         	StringValue(e);
StringValue      4324 eval.c         	StringValue(mesg);
StringValue      6076 eval.c             StringValue(src);
StringValue      6249 eval.c         	StringValue(src);
StringValue      6258 eval.c         	StringValue(vfile);
StringValue      6336 eval.c         	StringValue(src);
StringValue      6388 eval.c         		StringValue(argv[0]);
StringValue       185 ext/Win32API/Win32API.c 		StringValue(str);
StringValue       180 ext/dbm/dbm.c      StringValue(keystr);
StringValue       225 ext/dbm/dbm.c      StringValue(valstr);
StringValue       299 ext/dbm/dbm.c      StringValue(keystr);
StringValue       375 ext/dbm/dbm.c  	StringValue(keystr);
StringValue       645 ext/dbm/dbm.c      StringValue(keystr);
StringValue       663 ext/dbm/dbm.c      StringValue(valstr);
StringValue        92 ext/digest/digest.c     StringValue(str);
StringValue       111 ext/digest/digest.c     StringValue(str);
StringValue       145 ext/digest/digest.c     StringValue(str);
StringValue       231 ext/digest/digest.c     StringValue(other);
StringValue       211 ext/gdbm/gdbm.c     StringValue(keystr);
StringValue       320 ext/gdbm/gdbm.c     StringValue(valstr);
StringValue       393 ext/gdbm/gdbm.c     StringValue(keystr);
StringValue       580 ext/gdbm/gdbm.c     StringValue(keystr);
StringValue       581 ext/gdbm/gdbm.c     StringValue(valstr);
StringValue       748 ext/gdbm/gdbm.c     StringValue(keystr);
StringValue       766 ext/gdbm/gdbm.c     StringValue(valstr);
StringValue       360 ext/iconv/iconv.c 		StringValue(str);
StringValue       370 ext/iconv/iconv.c 	StringValue(str);
StringValue       440 ext/iconv/iconv.c 		    StringValue(str);
StringValue        89 ext/nkf/nkf.c    StringValue(opt);
StringValue        97 ext/nkf/nkf.c    StringValue(src);
StringValue       136 ext/nkf/nkf.c    StringValue(src);
StringValue       231 ext/nkf/nkf.c    StringValue(src);
StringValue       259 ext/openssl/ossl.c     StringValue(tmp);
StringValue       214 ext/openssl/ossl_asn1.c     StringValue(obj);
StringValue       229 ext/openssl/ossl_asn1.c     StringValue(obj);
StringValue       255 ext/openssl/ossl_asn1.c     StringValue(obj);
StringValue       672 ext/openssl/ossl_asn1.c     StringValue(i);
StringValue       698 ext/openssl/ossl_asn1.c     StringValue(value);
StringValue       826 ext/openssl/ossl_asn1.c     tmp = rb_str_new4(StringValue(obj));
StringValue       842 ext/openssl/ossl_asn1.c     tmp = rb_str_new4(StringValue(obj));
StringValue       859 ext/openssl/ossl_asn1.c     tmp = rb_str_new4(StringValue(obj));
StringValue      1006 ext/openssl/ossl_asn1.c     StringValue(oid);
StringValue      1007 ext/openssl/ossl_asn1.c     StringValue(sn);
StringValue      1008 ext/openssl/ossl_asn1.c     StringValue(ln);
StringValue        41 ext/openssl/ossl_bio.c 	StringValue(obj);
StringValue       113 ext/openssl/ossl_bn.c     StringValue(str);
StringValue       146 ext/openssl/ossl_cipher.c 	StringValue(pass);
StringValue       153 ext/openssl/ossl_cipher.c 	    StringValue(init_v);
StringValue       197 ext/openssl/ossl_cipher.c     StringValue(vpass);
StringValue       199 ext/openssl/ossl_cipher.c 	StringValue(vsalt);
StringValue       225 ext/openssl/ossl_cipher.c     StringValue(data);
StringValue       273 ext/openssl/ossl_cipher.c     StringValue(key);
StringValue       290 ext/openssl/ossl_cipher.c     StringValue(iv);
StringValue       170 ext/openssl/ossl_config.c     StringValue(section);
StringValue       171 ext/openssl/ossl_config.c     StringValue(name);
StringValue       172 ext/openssl/ossl_config.c     StringValue(value);
StringValue       201 ext/openssl/ossl_config.c     StringValue(section);
StringValue       202 ext/openssl/ossl_config.c     StringValue(name);
StringValue       267 ext/openssl/ossl_config.c     StringValue(section);
StringValue        89 ext/openssl/ossl_digest.c     StringValue(type);
StringValue        90 ext/openssl/ossl_digest.c     if (!NIL_P(data)) StringValue(data);
StringValue       137 ext/openssl/ossl_digest.c     StringValue(data);
StringValue       224 ext/openssl/ossl_digest.c 	StringValue(other);
StringValue        62 ext/openssl/ossl_engine.c     StringValue(name);
StringValue       113 ext/openssl/ossl_engine.c     StringValue(id);
StringValue       282 ext/openssl/ossl_engine.c     StringValue(cmd);
StringValue       283 ext/openssl/ossl_engine.c     if (!NIL_P(val)) StringValue(val);
StringValue        65 ext/openssl/ossl_hmac.c     StringValue(key);
StringValue        95 ext/openssl/ossl_hmac.c     StringValue(data);
StringValue       160 ext/openssl/ossl_hmac.c     StringValue(key);
StringValue       161 ext/openssl/ossl_hmac.c     StringValue(data);
StringValue       175 ext/openssl/ossl_hmac.c     StringValue(key);
StringValue       176 ext/openssl/ossl_hmac.c     StringValue(data);
StringValue        64 ext/openssl/ossl_ns_spki.c     StringValue(buffer);
StringValue       183 ext/openssl/ossl_ns_spki.c     StringValue(str);
StringValue       111 ext/openssl/ossl_ocsp.c 	StringValue(arg);
StringValue       135 ext/openssl/ossl_ocsp.c 	StringValue(val);
StringValue       318 ext/openssl/ossl_ocsp.c 	StringValue(arg);
StringValue       437 ext/openssl/ossl_ocsp.c 	StringValue(val);
StringValue       171 ext/openssl/ossl_pkey.c     StringValue(data);
StringValue       191 ext/openssl/ossl_pkey.c     StringValue(sig);
StringValue       192 ext/openssl/ossl_pkey.c     StringValue(data);
StringValue       332 ext/openssl/ossl_pkey_dsa.c     StringValue(data);
StringValue       354 ext/openssl/ossl_pkey_dsa.c     StringValue(digest);
StringValue       355 ext/openssl/ossl_pkey_dsa.c     StringValue(sig);
StringValue       259 ext/openssl/ossl_pkey_rsa.c     StringValue(buffer);
StringValue       281 ext/openssl/ossl_pkey_rsa.c     StringValue(buffer);
StringValue       306 ext/openssl/ossl_pkey_rsa.c     StringValue(buffer);
StringValue       331 ext/openssl/ossl_pkey_rsa.c     StringValue(buffer);
StringValue        33 ext/openssl/ossl_rand.c     StringValue(str);
StringValue       396 ext/openssl/ossl_ssl.c 	StringValue(val);
StringValue       471 ext/openssl/ossl_ssl.c         StringValue(str);
StringValue       626 ext/openssl/ossl_ssl.c         StringValue(str);
StringValue       679 ext/openssl/ossl_ssl.c     StringValue(str);
StringValue        97 ext/openssl/ossl_x509attr.c 	StringValue(oid);
StringValue       228 ext/openssl/ossl_x509ext.c     StringValue(oid);
StringValue       229 ext/openssl/ossl_x509ext.c     StringValue(value);
StringValue       282 ext/openssl/ossl_x509ext.c 	StringValue(oid);
StringValue       321 ext/openssl/ossl_x509ext.c     StringValue(data);
StringValue       133 ext/openssl/ossl_x509name.c 	    StringValue(str);
StringValue       151 ext/openssl/ossl_x509name.c     StringValue(oid);
StringValue       152 ext/openssl/ossl_x509name.c     StringValue(value);
StringValue       158 ext/sdbm/init.c     StringValue(keystr);
StringValue       203 ext/sdbm/init.c     StringValue(valstr);
StringValue       276 ext/sdbm/init.c     StringValue(keystr);
StringValue       353 ext/sdbm/init.c 	StringValue(keystr);
StringValue       461 ext/sdbm/init.c     StringValue(keystr);
StringValue       462 ext/sdbm/init.c     StringValue(valstr);
StringValue       626 ext/sdbm/init.c     StringValue(keystr);
StringValue       644 ext/sdbm/init.c     StringValue(valstr);
StringValue       370 ext/socket/socket.c 	StringValue(val);
StringValue       490 ext/socket/socket.c     StringValue(mesg);
StringValue       491 ext/socket/socket.c     if (!NIL_P(to)) StringValue(to);
StringValue      1670 ext/socket/socket.c     StringValue(mesg);
StringValue      2258 ext/socket/socket.c     StringValue(addr);
StringValue      2355 ext/socket/socket.c     StringValue(addr);
StringValue      2790 ext/socket/socket.c     StringValue(service);
StringValue      2791 ext/socket/socket.c     StringValue(proto);
StringValue      2819 ext/socket/socket.c     StringValue(proto);
StringValue       237 ext/stringio/stringio.c 	StringValue(string);
StringValue       247 ext/stringio/stringio.c 	StringValue(string);
StringValue       364 ext/stringio/stringio.c     StringValue(string);
StringValue       839 ext/stringio/stringio.c 	if (!NIL_P(str)) StringValue(str);
StringValue      1091 ext/stringio/stringio.c 	StringValue(str);
StringValue       202 ext/strscan/strscan.c     StringValue(str);
StringValue       334 ext/strscan/strscan.c     StringValue(str);
StringValue       363 ext/strscan/strscan.c     StringValue(str);
StringValue       152 ext/syck/rubyext.c             StringValue(str2);
StringValue      1045 ext/syck/rubyext.c     StringValue( ivname );
StringValue      1079 ext/syck/rubyext.c     if (NIL_P(type) || RSTRING(StringValue(type))->len == 0)
StringValue      1084 ext/syck/rubyext.c     if ( ! (NIL_P(type) || RSTRING(StringValue(type))->len == 0) )
StringValue      1494 ext/syck/rubyext.c     StringValue( val );
StringValue      1766 ext/syck/rubyext.c         StringValue( type_id );
StringValue      4981 ext/tk/tcltklib.c     StringValue(name);
StringValue      5345 ext/tk/tcltklib.c         StringValue(enc);
StringValue      5792 ext/tk/tcltklib.c     StringValue(str);
StringValue      6027 ext/tk/tcltklib.c                         StringValue(enc);
StringValue      6035 ext/tk/tcltklib.c                 StringValue(enc);
StringValue      6049 ext/tk/tcltklib.c         StringValue(encodename);
StringValue      6061 ext/tk/tcltklib.c     StringValue(str);
StringValue      6163 ext/tk/tcltklib.c                 StringValue(enc);
StringValue      6178 ext/tk/tcltklib.c                 StringValue(enc);
StringValue      6189 ext/tk/tcltklib.c         StringValue(encodename);
StringValue      6217 ext/tk/tcltklib.c     StringValue(str);
StringValue      6295 ext/tk/tcltklib.c     StringValue(str);
StringValue      7095 ext/tk/tcltklib.c     StringValue(varname);
StringValue      7096 ext/tk/tcltklib.c     if (!NIL_P(index)) StringValue(index);
StringValue      7229 ext/tk/tcltklib.c     StringValue(varname);
StringValue      7230 ext/tk/tcltklib.c     if (!NIL_P(index)) StringValue(index);
StringValue      7231 ext/tk/tcltklib.c     StringValue(value);
StringValue      7303 ext/tk/tcltklib.c     StringValue(varname);
StringValue      7304 ext/tk/tcltklib.c     if (!NIL_P(index)) StringValue(index);
StringValue      7411 ext/tk/tcltklib.c     StringValue(list_str);
StringValue      7607 ext/tk/tcltklib.c     StringValue(src);
StringValue       150 ext/tk/tkutil/tkutil.c     StringValue(cmd_id);
StringValue       286 ext/zlib/zlib.c 	StringValue(str);
StringValue      1227 ext/zlib/zlib.c     StringValue(src);
StringValue      1253 ext/zlib/zlib.c     StringValue(src);
StringValue      1390 ext/zlib/zlib.c     StringValue(src);
StringValue      1487 ext/zlib/zlib.c     StringValue(src);
StringValue      1512 ext/zlib/zlib.c     StringValue(src);
StringValue      1546 ext/zlib/zlib.c 	    StringValue(src);
StringValue      1580 ext/zlib/zlib.c 	    StringValue(src);
StringValue      1609 ext/zlib/zlib.c     StringValue(src);
StringValue      1652 ext/zlib/zlib.c     StringValue(src);
StringValue      2680 file.c         	StringValue(fext);
StringValue      2682 file.c             StringValue(fname);
StringValue      2844 file.c             StringValue(path);		/* get rid of converting twice */
StringValue      1766 hash.c             StringValue(nm);
StringValue      1767 hash.c             StringValue(val);
StringValue      2131 hash.c             StringValue(value);
StringValue      1258 io.c           	StringValue(str);
StringValue      1393 io.c           	if (!NIL_P(str)) StringValue(str);
StringValue      1407 io.c           	StringValue(str);
StringValue      1646 io.c           	if (!NIL_P(rs)) StringValue(rs);
StringValue      1777 io.c           	if (!NIL_P(rs)) StringValue(rs);
StringValue      1818 io.c           	if (!NIL_P(rs)) StringValue(rs);
StringValue      2328 io.c           	StringValue(str);
StringValue      4214 io.c           	    if (!NIL_P(rs)) StringValue(rs);
StringValue      4764 io.c           	    StringValue(v);
StringValue      4962 io.c           	StringValue(arg.sep);
StringValue      5121 io.c           	StringValue(str);
StringValue      5168 io.c                   StringValue(str);
StringValue      5341 io.c               StringValue(val);
StringValue       836 marshal.c      	StringValue(str);
StringValue      1324 marshal.c      	StringValue(port);	       /* possible conversion */
StringValue      2124 object.c           StringValue(str);
StringValue      2216 object.c           StringValue(str);
StringValue       452 pack.c             StringValue(fmt);
StringValue       513 pack.c         		StringValue(from);
StringValue       885 pack.c         	    StringValue(from);
StringValue       916 pack.c         		StringValue(from);
StringValue      1302 pack.c             StringValue(str);
StringValue      1303 pack.c             StringValue(fmt);
StringValue      9112 parse.y        	StringValue(src);
StringValue      9121 parse.y        	StringValue(fname);
StringValue      9258 parse.y            StringValue(msg);
StringValue      1471 re.c               StringValue(str);
StringValue      1533 re.c               StringValue(str);
StringValue      1822 re.c               StringValue(str);
StringValue      1027 ruby.c             StringValue(val);
StringValue       250 ruby.h             StringValue(v);\
StringValue       262 sprintf.c          StringValue(fmt);
StringValue       347 string.c           StringValue(str2);
StringValue       717 string.c           StringValue(str2);
StringValue       954 string.c           StringValue(str2);
StringValue      1352 string.c           StringValue(end);
StringValue      1361 string.c       	StringValue(current);
StringValue      1363 string.c       	StringValue(current);
StringValue      1524 string.c           StringValue(val);
StringValue      1828 string.c       	StringValue(repl);
StringValue      1931 string.c       	StringValue(repl);
StringValue      2108 string.c           StringValue(str2);
StringValue      2239 string.c           StringValue(arg);
StringValue      2776 string.c           StringValue(src);
StringValue      2777 string.c           StringValue(repl);
StringValue      2957 string.c       	StringValue(s);
StringValue      3030 string.c       	    StringValue(s);
StringValue      3149 string.c       	StringValue(s);
StringValue      3344 string.c           StringValue(str);
StringValue      3402 string.c           StringValue(rs);
StringValue      3560 string.c           StringValue(rs);
StringValue      3927 string.c           StringValue(salt);
StringValue      4048 string.c       	StringValue(pad);
StringValue      1860 time.c             StringValue(format);
StringValue      1985 time.c             StringValue(str);


StringValueCStr

StringValueCStr   500 bignum.c       	s = StringValueCStr(str);
StringValueCStr   495 ext/iconv/iconv.c 	    const char *s = StringValueCStr(name);
StringValueCStr   514 ext/iconv/iconv.c 	rb_raise(rb_eArgError, "unknown option - %s", StringValueCStr(name));
StringValueCStr  2793 ext/socket/socket.c     sp = getservbyname(StringValueCStr(service),  StringValueCStr(proto));
StringValueCStr  2821 ext/socket/socket.c     sp = getservbyport(NUM2INT(port),  StringValueCStr(proto));
StringValueCStr   233 ext/stringio/stringio.c 	    const char *m = StringValueCStr(mode);
StringValueCStr   115 file.c             StringValueCStr(tmp);
StringValueCStr   133 file.c         	(*func)(StringValueCStr(path), arg);
StringValueCStr   636 file.c             return stat(StringValueCStr(file), st);
StringValueCStr   656 file.c         	f = CreateFile(StringValueCStr(*file), 0,
StringValueCStr   690 file.c         	rb_sys_fail(StringValueCStr(fname));
StringValueCStr   745 file.c             if (lstat(StringValueCStr(fname), &st) == -1) {
StringValueCStr   950 file.c             if (lstat(StringValueCStr(fname), &st) < 0) return Qfalse;
StringValueCStr  1071 file.c             if (eaccess(StringValueCStr(fname), R_OK) < 0) return Qfalse;
StringValueCStr  1088 file.c             if (access(StringValueCStr(fname), R_OK) < 0) return Qfalse;
StringValueCStr  1141 file.c             if (eaccess(StringValueCStr(fname), W_OK) < 0) return Qfalse;
StringValueCStr  1158 file.c             if (access(StringValueCStr(fname), W_OK) < 0) return Qfalse;
StringValueCStr  1203 file.c             if (eaccess(StringValueCStr(fname), X_OK) < 0) return Qfalse;
StringValueCStr  1220 file.c             if (access(StringValueCStr(fname), X_OK) < 0) return Qfalse;
StringValueCStr  1340 file.c             if (stat(StringValueCStr(fname), &st) < 0) return Qfalse;
StringValueCStr  1474 file.c         	rb_sys_fail(StringValueCStr(fname));
StringValueCStr  1541 file.c             if (lstat(StringValueCStr(fname), &st) == -1) {
StringValueCStr  1564 file.c         	rb_sys_fail(StringValueCStr(fname));
StringValueCStr  2045 file.c             if (link(StringValueCStr(from), StringValueCStr(to)) < 0) {
StringValueCStr  2075 file.c             if (symlink(StringValueCStr(from), StringValueCStr(to)) < 0) {
StringValueCStr  2175 file.c             src = StringValueCStr(from);
StringValueCStr  2176 file.c             dst = StringValueCStr(to);
StringValueCStr  2712 file.c         	if (NIL_P(fext) || !(f = rmext(name, StringValueCStr(fext)))) {
StringValueCStr  2720 file.c         	if (NIL_P(fext) || !(f = rmext(p, StringValueCStr(fext)))) {
StringValueCStr  2747 file.c             name = StringValueCStr(fname);
StringValueCStr  2798 file.c             name = StringValueCStr(fname);
StringValueCStr  2900 file.c         	name = StringValueCStr(result);
StringValueCStr  2957 file.c             if (truncate(StringValueCStr(path), pos) < 0)
StringValueCStr  2965 file.c         	if ((tmpfd = open(StringValueCStr(path), O_RDWR)) < 0) {
StringValueCStr  2969 file.c         	if ((tmpfd = open(StringValueCStr(path), 0)) < 0) {
StringValueCStr  3389 file.c             if (stat(StringValueCStr(fname), &st) == -1) {
StringValueCStr  4002 file.c             char *p0 = StringValueCStr(path);
StringValueCStr  4106 file.c         	f = StringValueCStr(fname);
StringValueCStr  4115 file.c         	    if (file_load_ok(StringValueCStr(fname))) {
StringValueCStr  4136 file.c         	    found = dln_find_file(StringValueCStr(fname), path);
StringValueCStr  4150 file.c             char *f = StringValueCStr(path);
StringValueCStr  4159 file.c         	f = StringValueCStr(path);
StringValueCStr  2851 io.c               cmd = StringValueCStr(prog);
StringValueCStr  2925 io.c           	cmd = StringValueCStr(prog);
StringValueCStr  2944 io.c               fp = popen(StringValueCStr(prog), mode);


StringValuePtr

StringValuePtr     42 compar.c       	classname = StringValuePtr(y);
StringValuePtr   6400 eval.c         		file = StringValuePtr(argv[1]);
StringValuePtr   6705 eval.c         	f = StringValuePtr(v);
StringValuePtr   13069 eval.c         		 StringValuePtr(symname), StringValuePtr(thrname));
StringValuePtr   13076 eval.c         		 StringValuePtr(symname), StringValuePtr(thrname));
StringValuePtr    187 ext/Win32API/Win32API.c 		lParam = (unsigned long)StringValuePtr(str);
StringValuePtr    121 ext/dl/cfunc.c     sname = NIL_P(name) ? NULL : StringValuePtr(name);
StringValuePtr    386 ext/dl/cptr.c  	    mem = StringValuePtr(arg2);
StringValuePtr    432 ext/dl/cptr.c          char *ptr = StringValuePtr(val);
StringValuePtr     59 ext/dl/handle.c     clib = NIL_P(lib) ? NULL : StringValuePtr(lib);
StringValuePtr     63 ext/dl/handle.c     clib = NIL_P(lib) ? NULL : StringValuePtr(lib);
StringValuePtr    151 ext/dl/handle.c 	name = StringValuePtr(sym);
StringValuePtr    143 ext/iconv/iconv.c 	StringValuePtr(key);
StringValuePtr    148 ext/iconv/iconv.c     return StringValuePtr(*code);
StringValuePtr    131 ext/openssl/ossl_asn1.c 	if (!BN_dec2bn(&bn, StringValuePtr(obj))) {
StringValuePtr   1023 ext/openssl/ossl_asn1.c     if ((nid = OBJ_txt2nid(StringValuePtr(val))) != NID_undef)
StringValuePtr   1036 ext/openssl/ossl_asn1.c     if ((nid = OBJ_txt2nid(StringValuePtr(val))) != NID_undef)
StringValuePtr     68 ext/openssl/ossl_bn.c 	if (!BN_dec2bn(&bn, StringValuePtr(obj))) {
StringValuePtr     94 ext/openssl/ossl_cipher.c     name = StringValuePtr(str);
StringValuePtr    140 ext/openssl/ossl_config.c         filename = StringValuePtr(path);
StringValuePtr    269 ext/openssl/ossl_config.c     if (!(sk = NCONF_get_section(conf, StringValuePtr(section)))) {
StringValuePtr     91 ext/openssl/ossl_digest.c     name = StringValuePtr(type);
StringValuePtr    178 ext/openssl/ossl_engine.c     s = StringValuePtr(name);
StringValuePtr    201 ext/openssl/ossl_engine.c     s = StringValuePtr(name);
StringValuePtr    224 ext/openssl/ossl_engine.c     sid = NIL_P(id) ? NULL : StringValuePtr(id);
StringValuePtr    225 ext/openssl/ossl_engine.c     sdata = NIL_P(data) ? NULL : StringValuePtr(data);
StringValuePtr    248 ext/openssl/ossl_engine.c     sid = NIL_P(id) ? NULL : StringValuePtr(id);
StringValuePtr    249 ext/openssl/ossl_engine.c     sdata = NIL_P(data) ? NULL : StringValuePtr(data);
StringValuePtr     64 ext/openssl/ossl_pkcs12.c     passphrase = NIL_P(pass) ? NULL : StringValuePtr(pass);
StringValuePtr     65 ext/openssl/ossl_pkcs12.c     friendlyname = NIL_P(name) ? NULL : StringValuePtr(name);
StringValuePtr     90 ext/openssl/ossl_pkcs12.c     passphrase = NIL_P(pass) ? NULL : StringValuePtr(pass);
StringValuePtr    354 ext/openssl/ossl_pkcs7.c     else s = StringValuePtr(sym);
StringValuePtr    135 ext/openssl/ossl_pkey_dsa.c 	if (!NIL_P(pass)) passwd = StringValuePtr(pass);
StringValuePtr    204 ext/openssl/ossl_pkey_dsa.c 	    passwd = StringValuePtr(pass);
StringValuePtr    125 ext/openssl/ossl_pkey_rsa.c 	if (!NIL_P(pass)) passwd = StringValuePtr(pass);
StringValuePtr    199 ext/openssl/ossl_pkey_rsa.c 	    passwd = StringValuePtr(pass);
StringValuePtr    160 ext/openssl/ossl_ssl.c 	s =  StringValuePtr(ssl_method);
StringValuePtr    370 ext/openssl/ossl_ssl.c     ca_file = NIL_P(val) ? NULL : StringValuePtr(val);
StringValuePtr    372 ext/openssl/ossl_ssl.c     ca_path = NIL_P(val) ? NULL : StringValuePtr(val);
StringValuePtr    118 ext/openssl/ossl_x509attr.c     s = StringValuePtr(oid);
StringValuePtr    303 ext/openssl/ossl_x509ext.c     s = StringValuePtr(oid);
StringValuePtr    699 ext/readline/readline.c     matches = rl_completion_matches(StringValuePtr(str),
StringValuePtr    726 ext/readline/readline.c     matches = rl_completion_matches(StringValuePtr(str),
StringValuePtr   2740 ext/socket/socket.c     sa = (struct sockaddr*)StringValuePtr(addr);
StringValuePtr   2845 ext/socket/socket.c 	strncpy(hbuf, StringValuePtr(host), sizeof(hbuf));
StringValuePtr   2857 ext/socket/socket.c 	strncpy(pbuf, StringValuePtr(port), sizeof(pbuf));
StringValuePtr   2869 ext/socket/socket.c     else if ((ap = StringValuePtr(family)) != 0) {
StringValuePtr   2969 ext/socket/socket.c 	    strncpy(hbuf, StringValuePtr(host), sizeof(hbuf));
StringValuePtr   2983 ext/socket/socket.c 	    strncpy(pbuf, StringValuePtr(port), sizeof(pbuf));
StringValuePtr   2995 ext/socket/socket.c 	else if ((ap = StringValuePtr(af)) != 0) {
StringValuePtr   3064 ext/socket/socket.c     sockaddr = (struct sockaddr_in*)StringValuePtr(addr);
StringValuePtr   3080 ext/socket/socket.c     strncpy(sockaddr.sun_path, StringValuePtr(path), sizeof(sockaddr.sun_path)-1);
StringValuePtr   3094 ext/socket/socket.c     sockaddr = (struct sockaddr_un*)StringValuePtr(addr);
StringValuePtr   2308 ext/tk/tcltklib.c             Tcl_AddErrorInfo(interp, StringValuePtr(backtrace));
StringValuePtr   4746 ext/tk/tcltklib.c             Tcl_SetVar(ptr->ip, "argv", StringValuePtr(opts), TCL_GLOBAL_ONLY);
StringValuePtr   4751 ext/tk/tcltklib.c             if (strncmp(StringValuePtr(argv0), "-e", 3) == 0
StringValuePtr   4752 ext/tk/tcltklib.c                 || strncmp(StringValuePtr(argv0), "-", 2) == 0) {
StringValuePtr   4756 ext/tk/tcltklib.c                 Tcl_SetVar(ptr->ip, "argv0", StringValuePtr(argv0),
StringValuePtr   5337 ext/tk/tcltklib.c     const char *s = StringValuePtr(str);
StringValuePtr   6716 ext/tk/tcltklib.c         av[i] = strdup(StringValuePtr(argv[i]));
StringValuePtr   7549 ext/tk/tcltklib.c         dst = StringValuePtr(argv[num]);
StringValuePtr    598 ext/win32ole/win32ole.c         rb_raise(ecs, "%s\n%s", buf, StringValuePtr(err_msg));
StringValuePtr    825 ext/win32ole/win32ole.c         V_BSTR(var) = ole_mb2wc(StringValuePtr(val), -1);
StringValuePtr    870 ext/win32ole/win32ole.c             *V_BSTRREF(var) = ole_mb2wc(StringValuePtr(val), -1);
StringValuePtr   1303 ext/win32ole/win32ole.c     return reg_open_key(hkey, StringValuePtr(key), phkey);
StringValuePtr   1360 ext/win32ole/win32ole.c     pbuf  = ole_mb2wc(StringValuePtr(ole), -1);
StringValuePtr   1372 ext/win32ole/win32ole.c     err = reg_open_key(hroot, StringValuePtr(vclsid), &hclsid);
StringValuePtr   1415 ext/win32ole/win32ole.c             if (err != ERROR_SUCCESS || fver > atof(StringValuePtr(ver)))
StringValuePtr   1417 ext/win32ole/win32ole.c             fver = atof(StringValuePtr(ver));
StringValuePtr   1534 ext/win32ole/win32ole.c     err = RegConnectRegistry(StringValuePtr(host), HKEY_LOCAL_MACHINE, &hlm);
StringValuePtr   1540 ext/win32ole/win32ole.c     err = RegOpenKeyEx(hlm, StringValuePtr(subkey), 0, KEY_READ, &hpid);
StringValuePtr   1586 ext/win32ole/win32ole.c     pbuf  = ole_mb2wc(StringValuePtr(ole), -1);
StringValuePtr   1596 ext/win32ole/win32ole.c                   StringValuePtr(ole));
StringValuePtr   1598 ext/win32ole/win32ole.c     serverinfo.pwszName = ole_mb2wc(StringValuePtr(host), -1);
StringValuePtr   1606 ext/win32ole/win32ole.c                   StringValuePtr(ole),
StringValuePtr   1607 ext/win32ole/win32ole.c                   StringValuePtr(host));
StringValuePtr   1635 ext/win32ole/win32ole.c     pbuf  = ole_mb2wc(StringValuePtr(moniker), -1);
StringValuePtr   1642 ext/win32ole/win32ole.c                   StringValuePtr(moniker));
StringValuePtr   1653 ext/win32ole/win32ole.c                   StringValuePtr(moniker));
StringValuePtr   1688 ext/win32ole/win32ole.c                  StringValuePtr(svr_name));
StringValuePtr   1692 ext/win32ole/win32ole.c     pBuf  = ole_mb2wc(StringValuePtr(svr_name), -1);
StringValuePtr   1705 ext/win32ole/win32ole.c                   "OLE server `%s' not running", StringValuePtr(svr_name));
StringValuePtr   1713 ext/win32ole/win32ole.c                   StringValuePtr(svr_name));
StringValuePtr   1800 ext/win32ole/win32ole.c         pBuf = ole_mb2wc(StringValuePtr(file), -1);
StringValuePtr   1923 ext/win32ole/win32ole.c     hwnd = pfnHtmlHelp(GetDesktopWindow(), StringValuePtr(helpfile),
StringValuePtr   1926 ext/win32ole/win32ole.c         hwnd = pfnHtmlHelp(GetDesktopWindow(), StringValuePtr(helpfile),
StringValuePtr   1957 ext/win32ole/win32ole.c         if(strlen(StringValuePtr(helpfile)) == 0) {
StringValuePtr   1960 ext/win32ole/win32ole.c                      StringValuePtr(name));
StringValuePtr   1972 ext/win32ole/win32ole.c                  StringValuePtr(helpfile));
StringValuePtr   2065 ext/win32ole/win32ole.c                  StringValuePtr(svr_name));
StringValuePtr   2070 ext/win32ole/win32ole.c                      StringValuePtr(svr_name));
StringValuePtr   2076 ext/win32ole/win32ole.c     pBuf  = ole_mb2wc(StringValuePtr(svr_name), -1);
StringValuePtr   2085 ext/win32ole/win32ole.c                   StringValuePtr(svr_name));
StringValuePtr   2094 ext/win32ole/win32ole.c                   StringValuePtr(svr_name));
StringValuePtr   2128 ext/win32ole/win32ole.c     pOp->pNamedArgs[index + 1] = ole_mb2wc(StringValuePtr(key), -1);
StringValuePtr   2197 ext/win32ole/win32ole.c     wcmdname = ole_mb2wc(StringValuePtr(cmd), -1);
StringValuePtr   2204 ext/win32ole/win32ole.c                   StringValuePtr(cmd));
StringValuePtr   2224 ext/win32ole/win32ole.c         op.pNamedArgs[0] = ole_mb2wc(StringValuePtr(cmd), -1);
StringValuePtr   2241 ext/win32ole/win32ole.c                       StringValuePtr(cmd));
StringValuePtr   2356 ext/win32ole/win32ole.c                   StringValuePtr(cmd), StringValuePtr(v));
StringValuePtr   2566 ext/win32ole/win32ole.c                   StringValuePtr(v));
StringValuePtr   2713 ext/win32ole/win32ole.c     pBuf[0]  = ole_mb2wc(StringValuePtr(property), -1);
StringValuePtr   2722 ext/win32ole/win32ole.c                   StringValuePtr(property));
StringValuePtr   2735 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, StringValuePtr(v));
StringValuePtr   2915 ext/win32ole/win32ole.c         if (strcasecmp(StringValuePtr(name), StringValuePtr(fname)) == 0) {
StringValuePtr   3377 ext/win32ole/win32ole.c         if(strlen(StringValuePtr(type)) == 0) {
StringValuePtr   3552 ext/win32ole/win32ole.c                  StringValuePtr(cmdname));
StringValuePtr   3585 ext/win32ole/win32ole.c         pbuf = ole_mb2wc(StringValuePtr(file), -1);
StringValuePtr   3640 ext/win32ole/win32ole.c             if (fversion > atof(StringValuePtr(ver)))
StringValuePtr   3642 ext/win32ole/win32ole.c             fversion = atof(StringValuePtr(ver));
StringValuePtr   3643 ext/win32ole/win32ole.c             if ( (v = reg_get_val(hclsid, StringValuePtr(ver))) != Qnil ) {
StringValuePtr   3810 ext/win32ole/win32ole.c             if ( (name = reg_get_val(hguid, StringValuePtr(version))) != Qnil ) {
StringValuePtr   3893 ext/win32ole/win32ole.c 	        if (fver < atof(StringValuePtr(ver))) {
StringValuePtr   3894 ext/win32ole/win32ole.c 	            fver = atof(StringValuePtr(ver));
StringValuePtr   4006 ext/win32ole/win32ole.c                  StringValuePtr(typelib));
StringValuePtr   4170 ext/win32ole/win32ole.c         pbuf = ole_mb2wc(StringValuePtr(path), -1);
StringValuePtr   4175 ext/win32ole/win32ole.c                       StringValuePtr(path));
StringValuePtr   4219 ext/win32ole/win32ole.c     pbuf = ole_mb2wc(StringValuePtr(file), -1);
StringValuePtr   4227 ext/win32ole/win32ole.c                  StringValuePtr(oleclass), StringValuePtr(typelib));
StringValuePtr   5198 ext/win32ole/win32ole.c                      StringValuePtr(method));
StringValuePtr   6701 ext/win32ole/win32ole.c                      StringValuePtr(itf));
StringValuePtr   6704 ext/win32ole/win32ole.c         pitf = StringValuePtr(itf);
StringValuePtr   2405 file.c             s = StringValuePtr(fname);
StringValuePtr   2094 hash.c             s = StringValuePtr(key);
StringValuePtr   3025 io.c           	mode = rb_io_flags_mode(rb_io_mode_flags(StringValuePtr(pmode)));
StringValuePtr   3079 io.c           	mode = NIL_P(vmode) ? "r" : StringValuePtr(vmode);
StringValuePtr   3245 io.c           		char *str = StringValuePtr(tmp);
StringValuePtr   3395 io.c           	int flags = rb_io_mode_flags(StringValuePtr(nmode));
StringValuePtr   3944 io.c           	    rb_raise(rb_eIOError, "too many shared IO for %s", StringValuePtr(s));
StringValuePtr   4108 io.c           	    fn = StringValuePtr(filename);
StringValuePtr    932 pack.c         		    t = StringValuePtr(from);
StringValuePtr   1561 process.c          status = system(StringValuePtr(prog));
StringValuePtr   2694 process.c          if (initgroups(StringValuePtr(uname), (rb_gid_t)NUM2INT(base_grp)) != 0) {
StringValuePtr   1685 re.c           	    char *kcode = StringValuePtr(argv[2]);
StringValuePtr   1705 re.c           	s = StringValuePtr(argv[0]);
StringValuePtr   1818 re.c           	rb_set_kcode(StringValuePtr(kcode));
StringValuePtr   2123 re.c               rb_set_kcode(StringValuePtr(val));
StringValuePtr    399 ruby.c         	    char *s = StringValuePtr(v);
StringValuePtr    182 struct.c       	char *cname = StringValuePtr(name);


SyckEmitter

SyckEmitter       108 ext/syck/emitter.c SyckEmitter *
SyckEmitter       111 ext/syck/emitter.c     SyckEmitter *e;
SyckEmitter       112 ext/syck/emitter.c     e = S_ALLOC( SyckEmitter );
SyckEmitter      1903 ext/syck/rubyext.c     SyckEmitter *emitterPtr;
SyckEmitter      1905 ext/syck/rubyext.c     Data_Get_Struct(emitter, SyckEmitter, emitterPtr);
SyckEmitter      1947 ext/syck/rubyext.c     SyckEmitter *emitter = syck_new_emitter();
SyckEmitter      1970 ext/syck/rubyext.c     SyckEmitter *emitter;
SyckEmitter      1973 ext/syck/rubyext.c     Data_Get_Struct(self, SyckEmitter, emitter);
SyckEmitter      2016 ext/syck/rubyext.c     SyckEmitter *emitter;
SyckEmitter      2023 ext/syck/rubyext.c     Data_Get_Struct(self, SyckEmitter, emitter);
SyckEmitter       366 ext/syck/syck.h SyckEmitter *syck_new_emitter();
SyckEmitter       367 ext/syck/syck.h SYMID syck_emitter_mark_node( SyckEmitter *, st_data_t );
SyckEmitter       368 ext/syck/syck.h void syck_emitter_ignore_id( SyckEmitter *, SYMID );
SyckEmitter       369 ext/syck/syck.h void syck_output_handler( SyckEmitter *, SyckOutputHandler );
SyckEmitter       370 ext/syck/syck.h void syck_emitter_handler( SyckEmitter *, SyckEmitterHandler );
SyckEmitter       371 ext/syck/syck.h void syck_free_emitter( SyckEmitter * );
SyckEmitter       372 ext/syck/syck.h void syck_emitter_clear( SyckEmitter * );
SyckEmitter       373 ext/syck/syck.h void syck_emitter_write( SyckEmitter *, char *, long );
SyckEmitter       374 ext/syck/syck.h void syck_emitter_escape( SyckEmitter *, char *, long );
SyckEmitter       375 ext/syck/syck.h void syck_emitter_flush( SyckEmitter *, long );
SyckEmitter       376 ext/syck/syck.h void syck_emit( SyckEmitter *, st_data_t );
SyckEmitter       377 ext/syck/syck.h void syck_emit_scalar( SyckEmitter *, char *, enum scalar_style, int, int, char, char *, long );
SyckEmitter       378 ext/syck/syck.h void syck_emit_1quoted( SyckEmitter *, int, char *, long );
SyckEmitter       379 ext/syck/syck.h void syck_emit_2quoted( SyckEmitter *, int, char *, long );
SyckEmitter       380 ext/syck/syck.h void syck_emit_folded( SyckEmitter *, int, char, char *, long );
SyckEmitter       381 ext/syck/syck.h void syck_emit_literal( SyckEmitter *, char, char *, long );
SyckEmitter       382 ext/syck/syck.h void syck_emit_seq( SyckEmitter *, char *, enum seq_style );
SyckEmitter       383 ext/syck/syck.h void syck_emit_item( SyckEmitter *, st_data_t );
SyckEmitter       384 ext/syck/syck.h void syck_emit_map( SyckEmitter *, char *, enum map_style );
SyckEmitter       385 ext/syck/syck.h void syck_emit_end( SyckEmitter * );
SyckEmitter       386 ext/syck/syck.h void syck_emit_tag( SyckEmitter *, char *, char * );
SyckEmitter       387 ext/syck/syck.h void syck_emit_indent( SyckEmitter * );
SyckEmitter       388 ext/syck/syck.h SyckLevel *syck_emitter_current_level( SyckEmitter * );
SyckEmitter       389 ext/syck/syck.h SyckLevel *syck_emitter_parent_level( SyckEmitter * );
SyckEmitter       390 ext/syck/syck.h void syck_emitter_pop_level( SyckEmitter * );
SyckEmitter       391 ext/syck/syck.h void syck_emitter_add_level( SyckEmitter *, int, enum syck_level_status );
SyckEmitter       392 ext/syck/syck.h void syck_emitter_reset_levels( SyckEmitter * );


SyckIoFile

SyckIoFile        304 ext/syck/syck.c     p->io.file = S_ALLOC( SyckIoFile );
SyckIoFile        251 ext/syck/syck.h         SyckIoFile *file;
SyckIoFile        362 ext/syck/syck.h long syck_io_file_read( char *, SyckIoFile *, long, long );


SyckIoStr

SyckIoStr         323 ext/syck/syck.c     p->io.str = S_ALLOC( SyckIoStr );
SyckIoStr         252 ext/syck/syck.h         SyckIoStr *str;
SyckIoStr         363 ext/syck/syck.h long syck_io_str_read( char *, SyckIoStr *, long, long );


SyckLevel

SyckLevel         137 ext/syck/bytecode.c     SyckLevel *lvl;
SyckLevel         135 ext/syck/emitter.c     e->levels = S_ALLOC_N( SyckLevel, e->lvl_capa );
SyckLevel         177 ext/syck/emitter.c SyckLevel *
SyckLevel         183 ext/syck/emitter.c SyckLevel *
SyckLevel         208 ext/syck/emitter.c         S_REALLOC_N( e->levels, SyckLevel, e->lvl_capa );
SyckLevel         364 ext/syck/emitter.c     SyckLevel *lvl = syck_emitter_current_level( e );
SyckLevel         444 ext/syck/emitter.c     SyckLevel *lvl;
SyckLevel         496 ext/syck/emitter.c     SyckLevel *lvl = syck_emitter_current_level( e );
SyckLevel         647 ext/syck/emitter.c     SyckLevel *parent = syck_emitter_parent_level( e );
SyckLevel         648 ext/syck/emitter.c     SyckLevel *lvl = syck_emitter_current_level( e );
SyckLevel         999 ext/syck/emitter.c     SyckLevel *parent = syck_emitter_parent_level( e );
SyckLevel        1000 ext/syck/emitter.c     SyckLevel *lvl = syck_emitter_current_level( e );
SyckLevel        1015 ext/syck/emitter.c     SyckLevel *parent = syck_emitter_parent_level( e );
SyckLevel        1016 ext/syck/emitter.c     SyckLevel *lvl = syck_emitter_current_level( e );
SyckLevel        1032 ext/syck/emitter.c     SyckLevel *lvl = syck_emitter_current_level( e );
SyckLevel        1037 ext/syck/emitter.c             SyckLevel *parent = syck_emitter_parent_level( e );
SyckLevel        1081 ext/syck/emitter.c             SyckLevel *parent = syck_emitter_parent_level( e );
SyckLevel        1156 ext/syck/emitter.c     SyckLevel *lvl = syck_emitter_current_level( e );
SyckLevel        1157 ext/syck/emitter.c     SyckLevel *parent = syck_emitter_parent_level( e );
SyckLevel         164 ext/syck/syck.c     p->levels = S_ALLOC_N( SyckLevel, p->lvl_capa );
SyckLevel         343 ext/syck/syck.c SyckLevel *
SyckLevel         368 ext/syck/syck.c         S_REALLOC_N( p->levels, SyckLevel, p->lvl_capa );
SyckLevel         259 ext/syck/syck.h     SyckLevel *levels;
SyckLevel         321 ext/syck/syck.h     SyckLevel *levels;
SyckLevel         388 ext/syck/syck.h SyckLevel *syck_emitter_current_level( SyckEmitter * );
SyckLevel         389 ext/syck/syck.h SyckLevel *syck_emitter_parent_level( SyckEmitter * );
SyckLevel         405 ext/syck/syck.h SyckLevel *syck_parser_current_level( SyckParser * );
SyckLevel         219 ext/syck/token.c         SyckLevel *lvl_deep = CURRENT_LEVEL(); \
SyckLevel         223 ext/syck/token.c             SyckLevel *lvl_over; \
SyckLevel         356 ext/syck/token.c {   SyckLevel *lvl = CURRENT_LEVEL();
SyckLevel         433 ext/syck/token.c {   SyckLevel *lvl = CURRENT_LEVEL();
SyckLevel         476 ext/syck/token.c {   SyckLevel *lvl = CURRENT_LEVEL();
SyckLevel         509 ext/syck/token.c         SyckLevel *lvl = CURRENT_LEVEL();
SyckLevel        1496 ext/syck/token.c         SyckLevel *plvl;
SyckLevel        1536 ext/syck/token.c                         SyckLevel *lvl;
SyckLevel        1770 ext/syck/token.c                         SyckLevel *lvl;
SyckLevel        1826 ext/syck/token.c {   SyckLevel *lvl;
SyckLevel        1925 ext/syck/token.c                         SyckLevel *lvl;
SyckLevel        1994 ext/syck/token.c {   SyckLevel *lvl;
SyckLevel        2173 ext/syck/token.c {   SyckLevel *lvl;
SyckLevel        2346 ext/syck/token.c         SyckLevel *lvl = CURRENT_LEVEL();


SyckNode

SyckNode         1084 ext/syck/bytecode.c             SyckNode *n = syck_alloc_str();
SyckNode          107 ext/syck/gram.c         SyckNode *node = syck_new_str( "", scalar_plain ); \
SyckNode          135 ext/syck/gram.c     SyckNode *nodeData;
SyckNode         1354 ext/syck/gram.c                SyckNode *n = yyvsp[0].nodeData;
SyckNode           66 ext/syck/gram.h     SyckNode *nodeData;
SyckNode           31 ext/syck/handler.c SyckNode *
SyckNode           34 ext/syck/handler.c     SyckNode *ntmp = NULL;
SyckNode           39 ext/syck/handler.c         SyckNode *bad;
SyckNode           68 ext/syck/handler.c     SyckNode *ntmp;
SyckNode           83 ext/syck/handler.c SyckNode *
SyckNode           86 ext/syck/handler.c     SyckNode *n = NULL;
SyckNode           16 ext/syck/node.c SyckNode *
SyckNode           19 ext/syck/node.c     SyckNode *s;
SyckNode           21 ext/syck/node.c     s = S_ALLOC( SyckNode );
SyckNode           48 ext/syck/node.c SyckNode *
SyckNode           51 ext/syck/node.c     SyckNode *n;
SyckNode           67 ext/syck/node.c SyckNode *
SyckNode           70 ext/syck/node.c     SyckNode *n;
SyckNode           85 ext/syck/node.c SyckNode *
SyckNode           88 ext/syck/node.c     SyckNode *n;
SyckNode          102 ext/syck/node.c SyckNode *
SyckNode          108 ext/syck/node.c SyckNode *
SyckNode          111 ext/syck/node.c     SyckNode *n;
SyckNode          170 ext/syck/node.c SyckNode *
SyckNode          173 ext/syck/node.c     SyckNode *n;
SyckNode          295 ext/syck/node.c SyckNode *
SyckNode          298 ext/syck/node.c     SyckNode *n;
SyckNode           75 ext/syck/rubyext.c SyckNode * rb_syck_bad_anchor_handler _((SyckParser *, char *));
SyckNode          663 ext/syck/rubyext.c SyckNode *
SyckNode          669 ext/syck/rubyext.c     SyckNode *badanc = syck_new_map( rb_str_new2( "name" ), anchor_name );
SyckNode          962 ext/syck/rubyext.c     SyckNode *n;
SyckNode          965 ext/syck/rubyext.c     Data_Get_Struct(node, SyckNode, n);
SyckNode         1238 ext/syck/rubyext.c     SyckNode *n;
SyckNode         1240 ext/syck/rubyext.c     Data_Get_Struct( node, SyckNode, n );
SyckNode         1255 ext/syck/rubyext.c     SyckNode *n;
SyckNode         1258 ext/syck/rubyext.c     Data_Get_Struct(node, SyckNode, n);
SyckNode         1425 ext/syck/rubyext.c     SyckNode *node = syck_alloc_str();
SyckNode         1452 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1453 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
SyckNode         1491 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1492 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
SyckNode         1510 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1525 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1526 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
SyckNode         1542 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1543 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
SyckNode         1566 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1568 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
SyckNode         1586 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1587 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
SyckNode         1609 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1624 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1625 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
SyckNode         1659 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1660 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
SyckNode         1692 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1694 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
SyckNode         1713 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1714 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
SyckNode         1736 ext/syck/rubyext.c     SyckNode *copy_n;
SyckNode         1737 ext/syck/rubyext.c     SyckNode *orig_n;
SyckNode         1747 ext/syck/rubyext.c     Data_Get_Struct( orig, SyckNode, orig_n );
SyckNode         1748 ext/syck/rubyext.c     Data_Get_Struct( copy, SyckNode, copy_n );
SyckNode         1749 ext/syck/rubyext.c     MEMCPY( copy_n, orig_n, SyckNode, 1 );
SyckNode         1760 ext/syck/rubyext.c     SyckNode *node;
SyckNode         1761 ext/syck/rubyext.c     Data_Get_Struct( self, SyckNode, node );
SyckNode         1782 ext/syck/rubyext.c     SyckNode *n;
SyckNode         1783 ext/syck/rubyext.c     SyckNode *orig_n;
SyckNode         1784 ext/syck/rubyext.c     Data_Get_Struct(self, SyckNode, orig_n);
SyckNode         1839 ext/syck/rubyext.c     SyckNode *n;
SyckNode         1840 ext/syck/rubyext.c     Data_Get_Struct((VALUE)data, SyckNode, n);
SyckNode          159 ext/syck/syck.h typedef SyckNode * (*SyckBadAnchorHandler)(SyckParser *, char *);
SyckNode          343 ext/syck/syck.h SYMID syck_hdlr_add_node( SyckParser *, SyckNode * );
SyckNode          344 ext/syck/syck.h SyckNode *syck_hdlr_add_anchor( SyckParser *, char *, SyckNode * );
SyckNode          346 ext/syck/syck.h SyckNode *syck_hdlr_get_anchor( SyckParser *, char * );
SyckNode          347 ext/syck/syck.h void syck_add_transfer( char *, SyckNode *, int );
SyckNode          353 ext/syck/syck.h int syck_try_implicit( SyckNode * );
SyckNode          355 ext/syck/syck.h void try_tag_implicit( SyckNode *, int );
SyckNode          413 ext/syck/syck.h SYMID syck_yaml2byte_handler( SyckParser *, SyckNode * );
SyckNode          419 ext/syck/syck.h SyckNode *syck_alloc_map();
SyckNode          420 ext/syck/syck.h SyckNode *syck_alloc_seq();
SyckNode          421 ext/syck/syck.h SyckNode *syck_alloc_str();
SyckNode          422 ext/syck/syck.h void syck_free_node( SyckNode * );
SyckNode          423 ext/syck/syck.h void syck_free_members( SyckNode * );
SyckNode          424 ext/syck/syck.h SyckNode *syck_new_str( char *, enum scalar_style );
SyckNode          425 ext/syck/syck.h SyckNode *syck_new_str2( char *, long, enum scalar_style );
SyckNode          426 ext/syck/syck.h void syck_replace_str( SyckNode *, char *, enum scalar_style );
SyckNode          427 ext/syck/syck.h void syck_replace_str2( SyckNode *, char *, long, enum scalar_style );
SyckNode          428 ext/syck/syck.h void syck_str_blow_away_commas( SyckNode * );
SyckNode          429 ext/syck/syck.h char *syck_str_read( SyckNode * );
SyckNode          430 ext/syck/syck.h SyckNode *syck_new_map( SYMID, SYMID );
SyckNode          431 ext/syck/syck.h void syck_map_empty( SyckNode * );
SyckNode          432 ext/syck/syck.h void syck_map_add( SyckNode *, SYMID, SYMID );
SyckNode          433 ext/syck/syck.h SYMID syck_map_read( SyckNode *, enum map_part, long );
SyckNode          434 ext/syck/syck.h void syck_map_assign( SyckNode *, enum map_part, long, SYMID );
SyckNode          435 ext/syck/syck.h long syck_map_count( SyckNode * );
SyckNode          436 ext/syck/syck.h void syck_map_update( SyckNode *, SyckNode * );
SyckNode          437 ext/syck/syck.h SyckNode *syck_new_seq( SYMID );
SyckNode          438 ext/syck/syck.h void syck_seq_empty( SyckNode * );
SyckNode          439 ext/syck/syck.h void syck_seq_add( SyckNode *, SYMID );
SyckNode          440 ext/syck/syck.h void syck_seq_assign( SyckNode *, long, SYMID );
SyckNode          441 ext/syck/syck.h SYMID syck_seq_read( SyckNode *, long );
SyckNode          442 ext/syck/syck.h long syck_seq_count( SyckNode * );
SyckNode          121 ext/syck/token.c         SyckNode *n = syck_alloc_str(); \
SyckNode          159 ext/syck/token.c         SyckNode *n = syck_alloc_str(); \
SyckNode         1827 ext/syck/token.c                         SyckNode *n = syck_alloc_str();
SyckNode         1995 ext/syck/token.c                         SyckNode *n = syck_alloc_str();


SyckParser

SyckParser         31 ext/syck/bytecode.c extern SyckParser *syck_parser_ptr;
SyckParser        108 ext/syck/gram.c         if ( ((SyckParser *)parser)->taguri_expansion == 1 ) \
SyckParser       1199 ext/syck/gram.c            ((SyckParser *)parser)->root = syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData );
SyckParser       1206 ext/syck/gram.c            ((SyckParser *)parser)->root = syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData );
SyckParser       1213 ext/syck/gram.c            ((SyckParser *)parser)->eof = 1;
SyckParser       1220 ext/syck/gram.c             syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
SyckParser       1241 ext/syck/gram.c            yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
SyckParser       1270 ext/syck/gram.c                    if ( ((SyckParser *)parser)->implicit_typing == 1 )
SyckParser       1272 ext/syck/gram.c                       try_tag_implicit( yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
SyckParser       1281 ext/syck/gram.c                     syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
SyckParser       1302 ext/syck/gram.c                    yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
SyckParser       1309 ext/syck/gram.c                syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
SyckParser       1325 ext/syck/gram.c                if ( ((SyckParser *)parser)->implicit_typing == 1 )
SyckParser       1327 ext/syck/gram.c                   try_tag_implicit( yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
SyckParser       1336 ext/syck/gram.c                yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
SyckParser       1347 ext/syck/gram.c                yyval.nodeData = syck_hdlr_get_anchor( (SyckParser *)parser, yyvsp[0].name );
SyckParser       1355 ext/syck/gram.c                if ( ((SyckParser *)parser)->taguri_expansion == 1 )
SyckParser       1391 ext/syck/gram.c                     yyval.nodeId = syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData );
SyckParser       1398 ext/syck/gram.c                     syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
SyckParser       1406 ext/syck/gram.c                     syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
SyckParser       1430 ext/syck/gram.c                     yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-2].name, yyvsp[0].nodeData );
SyckParser       1437 ext/syck/gram.c                     yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
SyckParser       1480 ext/syck/gram.c                     yyval.nodeData = syck_new_seq( syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
SyckParser       1487 ext/syck/gram.c                     syck_seq_add( yyvsp[-2].nodeData, syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
SyckParser       1495 ext/syck/gram.c                     apply_seq_in_map( (SyckParser *)parser, yyvsp[-1].nodeData );
SyckParser       1503 ext/syck/gram.c                     apply_seq_in_map( (SyckParser *)parser, yyvsp[-1].nodeData );
SyckParser       1511 ext/syck/gram.c                     syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
SyckParser       1519 ext/syck/gram.c                     syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
SyckParser       1543 ext/syck/gram.c                     yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-2].name, yyvsp[0].nodeData );
SyckParser       1550 ext/syck/gram.c                     yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
SyckParser       1565 ext/syck/gram.c                         syck_hdlr_add_node( (SyckParser *)parser, yyvsp[-2].nodeData ),
SyckParser       1566 ext/syck/gram.c                         syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
SyckParser       1588 ext/syck/gram.c                     apply_seq_in_map( (SyckParser *)parser, yyvsp[-2].nodeData );
SyckParser       1607 ext/syck/gram.c                         syck_hdlr_add_node( (SyckParser *)parser, yyvsp[-2].nodeData ),
SyckParser       1608 ext/syck/gram.c                         syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
SyckParser       1641 ext/syck/gram.c                         syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ),
SyckParser       1642 ext/syck/gram.c                         syck_hdlr_add_node( (SyckParser *)parser, n ) );
SyckParser        109 ext/syck/rubyext.c     SyckParser *parser = syck_new_parser();
SyckParser        681 ext/syck/rubyext.c     SyckParser *parser;
SyckParser        682 ext/syck/rubyext.c     Data_Get_Struct(p, SyckParser, parser);
SyckParser        759 ext/syck/rubyext.c     SyckParser *parser = syck_new_parser();
SyckParser        801 ext/syck/rubyext.c     SyckParser *parser;
SyckParser        805 ext/syck/rubyext.c         Data_Get_Struct(self, SyckParser, parser);
SyckParser        818 ext/syck/rubyext.c     SyckParser *parser;
SyckParser        820 ext/syck/rubyext.c     Data_Get_Struct(self, SyckParser, parser);
SyckParser        834 ext/syck/rubyext.c     SyckParser *parser;
SyckParser        841 ext/syck/rubyext.c     Data_Get_Struct(self, SyckParser, parser);
SyckParser        864 ext/syck/rubyext.c     SyckParser *parser;
SyckParser        871 ext/syck/rubyext.c     Data_Get_Struct(self, SyckParser, parser);
SyckParser        157 ext/syck/syck.c SyckParser *
SyckParser        160 ext/syck/syck.c     SyckParser *p;
SyckParser        161 ext/syck/syck.c     p = S_ALLOC( SyckParser );
SyckParser        162 ext/syck/syck.c     S_MEMZERO( p, SyckParser, 1 );
SyckParser        343 ext/syck/syck.h SYMID syck_hdlr_add_node( SyckParser *, SyckNode * );
SyckParser        344 ext/syck/syck.h SyckNode *syck_hdlr_add_anchor( SyckParser *, char *, SyckNode * );
SyckParser        345 ext/syck/syck.h void syck_hdlr_remove_anchor( SyckParser *, char * );
SyckParser        346 ext/syck/syck.h SyckNode *syck_hdlr_get_anchor( SyckParser *, char * );
SyckParser        351 ext/syck/syck.h int syck_add_sym( SyckParser *, char * );
SyckParser        352 ext/syck/syck.h int syck_lookup_sym( SyckParser *, SYMID, char ** );
SyckParser        393 ext/syck/syck.h SyckParser *syck_new_parser();
SyckParser        394 ext/syck/syck.h void syck_free_parser( SyckParser * );
SyckParser        395 ext/syck/syck.h void syck_parser_set_root_on_error( SyckParser *, SYMID );
SyckParser        396 ext/syck/syck.h void syck_parser_implicit_typing( SyckParser *, int );
SyckParser        397 ext/syck/syck.h void syck_parser_taguri_expansion( SyckParser *, int );
SyckParser        399 ext/syck/syck.h void syck_parser_handler( SyckParser *, SyckNodeHandler );
SyckParser        400 ext/syck/syck.h void syck_parser_error_handler( SyckParser *, SyckErrorHandler );
SyckParser        401 ext/syck/syck.h void syck_parser_bad_anchor_handler( SyckParser *, SyckBadAnchorHandler );
SyckParser        402 ext/syck/syck.h void syck_parser_file( SyckParser *, FILE *, SyckIoFileRead );
SyckParser        403 ext/syck/syck.h void syck_parser_str( SyckParser *, char *, long, SyckIoStrRead );
SyckParser        404 ext/syck/syck.h void syck_parser_str_auto( SyckParser *, char *, SyckIoStrRead );
SyckParser        405 ext/syck/syck.h SyckLevel *syck_parser_current_level( SyckParser * );
SyckParser        406 ext/syck/syck.h void syck_parser_add_level( SyckParser *, int, enum syck_level_status );
SyckParser        407 ext/syck/syck.h void syck_parser_pop_level( SyckParser * );
SyckParser        408 ext/syck/syck.h void free_any_io( SyckParser * );
SyckParser        409 ext/syck/syck.h long syck_parser_read( SyckParser * );
SyckParser        410 ext/syck/syck.h long syck_parser_readlen( SyckParser *, long );
SyckParser        411 ext/syck/syck.h SYMID syck_parse( SyckParser * );
SyckParser        412 ext/syck/syck.h void syck_default_error_handler( SyckParser *, char * );
SyckParser        413 ext/syck/syck.h SYMID syck_yaml2byte_handler( SyckParser *, SyckNode * );
SyckParser        450 ext/syck/syck.h int sycklex( union YYSTYPE *, SyckParser * );
SyckParser        160 ext/syck/token.c         if ( ((SyckParser *)parser)->taguri_expansion == 1 ) \
SyckParser        234 ext/syck/token.c SyckParser *syck_parser_ptr = NULL;
SyckParser       1834 ext/syck/token.c                         if ( ((SyckParser *)parser)->taguri_expansion == 1 )
SyckParser       2002 ext/syck/token.c                         if ( ((SyckParser *)parser)->taguri_expansion == 1 )
SyckParser        222 ext/syck/yaml2byte.c     SyckParser *parser = syck_new_parser();


T1

T1                240 ext/digest/md5/md5.c     SET(a, b, c, d,  0,  7,  T1);
T1                303 ext/digest/sha2/sha2.c 	T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + \
T1                305 ext/digest/sha2/sha2.c 	(d) += T1; \
T1                306 ext/digest/sha2/sha2.c 	(h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
T1                313 ext/digest/sha2/sha2.c 	T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + \
T1                315 ext/digest/sha2/sha2.c 	(d) += T1; \
T1                316 ext/digest/sha2/sha2.c 	(h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
T1                326 ext/digest/sha2/sha2.c 	T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + K256[j] + \
T1                328 ext/digest/sha2/sha2.c 	(d) += T1; \
T1                329 ext/digest/sha2/sha2.c 	(h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
T1                334 ext/digest/sha2/sha2.c 	sha2_word32	T1, *W256;
T1                385 ext/digest/sha2/sha2.c 	a = b = c = d = e = f = g = h = T1 = 0;
T1                392 ext/digest/sha2/sha2.c 	sha2_word32	T1, T2, *W256;
T1                413 ext/digest/sha2/sha2.c 		T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + W256[j];
T1                416 ext/digest/sha2/sha2.c 		T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + (W256[j] = *data++);
T1                422 ext/digest/sha2/sha2.c 		e = d + T1;
T1                426 ext/digest/sha2/sha2.c 		a = T1 + T2;
T1                439 ext/digest/sha2/sha2.c 		T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] +
T1                445 ext/digest/sha2/sha2.c 		e = d + T1;
T1                449 ext/digest/sha2/sha2.c 		a = T1 + T2;
T1                465 ext/digest/sha2/sha2.c 	a = b = c = d = e = f = g = h = T1 = T2 = 0;
T1                604 ext/digest/sha2/sha2.c 	T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + \
T1                606 ext/digest/sha2/sha2.c 	(d) += T1, \
T1                607 ext/digest/sha2/sha2.c 	(h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)), \
T1                614 ext/digest/sha2/sha2.c 	T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + \
T1                616 ext/digest/sha2/sha2.c 	(d) += T1; \
T1                617 ext/digest/sha2/sha2.c 	(h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)); \
T1                627 ext/digest/sha2/sha2.c 	T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + K512[j] + \
T1                629 ext/digest/sha2/sha2.c 	(d) += T1; \
T1                630 ext/digest/sha2/sha2.c 	(h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)); \
T1                635 ext/digest/sha2/sha2.c 	sha2_word64	T1, *W512 = (sha2_word64*)context->buffer;
T1                683 ext/digest/sha2/sha2.c 	a = b = c = d = e = f = g = h = T1 = 0;
T1                690 ext/digest/sha2/sha2.c 	sha2_word64	T1, T2, *W512 = (sha2_word64*)context->buffer;
T1                709 ext/digest/sha2/sha2.c 		T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + W512[j];
T1                712 ext/digest/sha2/sha2.c 		T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + (W512[j] = *data++);
T1                718 ext/digest/sha2/sha2.c 		e = d + T1;
T1                722 ext/digest/sha2/sha2.c 		a = T1 + T2;
T1                735 ext/digest/sha2/sha2.c 		T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] +
T1                741 ext/digest/sha2/sha2.c 		e = d + T1;
T1                745 ext/digest/sha2/sha2.c 		a = T1 + T2;
T1                761 ext/digest/sha2/sha2.c 	a = b = c = d = e = f = g = h = T1 = T2 = 0;


T2

T2                241 ext/digest/md5/md5.c     SET(d, a, b, c,  1, 12,  T2);
T2                392 ext/digest/sha2/sha2.c 	sha2_word32	T1, T2, *W256;
T2                418 ext/digest/sha2/sha2.c 		T2 = Sigma0_256(a) + Maj(a, b, c);
T2                426 ext/digest/sha2/sha2.c 		a = T1 + T2;
T2                441 ext/digest/sha2/sha2.c 		T2 = Sigma0_256(a) + Maj(a, b, c);
T2                449 ext/digest/sha2/sha2.c 		a = T1 + T2;
T2                465 ext/digest/sha2/sha2.c 	a = b = c = d = e = f = g = h = T1 = T2 = 0;
T2                690 ext/digest/sha2/sha2.c 	sha2_word64	T1, T2, *W512 = (sha2_word64*)context->buffer;
T2                714 ext/digest/sha2/sha2.c 		T2 = Sigma0_512(a) + Maj(a, b, c);
T2                722 ext/digest/sha2/sha2.c 		a = T1 + T2;
T2                737 ext/digest/sha2/sha2.c 		T2 = Sigma0_512(a) + Maj(a, b, c);
T2                745 ext/digest/sha2/sha2.c 		a = T1 + T2;
T2                761 ext/digest/sha2/sha2.c 	a = b = c = d = e = f = g = h = T1 = T2 = 0;


TAB

TAB              3614 ext/nkf/nkf-utf8/nkf.c #define nkf_isblank(c) (c == SPACE || c == TAB)
TAB              4066 ext/nkf/nkf-utf8/nkf.c 			if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
TAB              4075 ext/nkf/nkf-utf8/nkf.c 			    if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
TAB              4089 ext/nkf/nkf-utf8/nkf.c 		case TAB:
TAB              4107 ext/nkf/nkf-utf8/nkf.c 		if (c1=='=' && (lwsp_buf[lwsp_count-1]==SPACE||lwsp_buf[lwsp_count-1]==TAB)) {
TAB              4182 ext/nkf/nkf-utf8/nkf.c 		    if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
TAB              4194 ext/nkf/nkf-utf8/nkf.c 			} else if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
TAB              4208 ext/nkf/nkf-utf8/nkf.c 	    case TAB:
TAB              4226 ext/nkf/nkf-utf8/nkf.c 	    if (c1=='=' && (lwsp_buf[lwsp_count-1]==SPACE||lwsp_buf[lwsp_count-1]==TAB)) {
TAB              4387 ext/nkf/nkf-utf8/nkf.c 	    && (mimeout_buf[i]==SPACE || mimeout_buf[i]==TAB
TAB              4394 ext/nkf/nkf-utf8/nkf.c 	    if (mimeout_buf[i]==SPACE || mimeout_buf[i]==TAB
TAB              4666 ext/nkf/nkf-utf8/nkf.c             if (c==SPACE || c==TAB || c==CR || c==NL) {


TAG_BREAK

TAG_BREAK        1377 eval.c               case TAG_BREAK:
TAG_BREAK        1634 eval.c               case TAG_BREAK:
TAG_BREAK        1689 eval.c               case TAG_BREAK:
TAG_BREAK        2792 eval.c         	  case TAG_BREAK:
TAG_BREAK        2925 eval.c         	  case TAG_BREAK:
TAG_BREAK        2960 eval.c         	  case TAG_BREAK:
TAG_BREAK        3021 eval.c         	    else if (state == TAG_BREAK && TAG_DST()) {
TAG_BREAK        4569 eval.c               case TAG_BREAK:
TAG_BREAK        4624 eval.c         	    JUMP_TAG(TAG_BREAK);
TAG_BREAK        4634 eval.c             localjump_error("unexpected break", retval, TAG_BREAK);
TAG_BREAK        4834 eval.c         	  case TAG_BREAK:
TAG_BREAK        4876 eval.c               case TAG_BREAK:
TAG_BREAK        4884 eval.c         		    JUMP_TAG(TAG_BREAK);
TAG_BREAK        4888 eval.c         	    proc_jump_error(TAG_BREAK, result);
TAG_BREAK        5118 eval.c             else if (state == TAG_BREAK && TAG_DST()) {
TAG_BREAK        5743 eval.c         	      case TAG_BREAK:
TAG_BREAK        8269 eval.c               case TAG_BREAK:
TAG_BREAK        8580 eval.c             else if (state == TAG_BREAK && TAG_DST()) {
TAG_BREAK        2223 ext/tk/tcltklib.c         case TAG_BREAK:


TAG_DST

TAG_DST          2926 eval.c         	    if (TAG_DST()) {
TAG_DST          2961 eval.c         	    if (TAG_DST()) {
TAG_DST          3021 eval.c         	    else if (state == TAG_BREAK && TAG_DST()) {
TAG_DST          4835 eval.c         	    if (TAG_DST()) {
TAG_DST          5118 eval.c             else if (state == TAG_BREAK && TAG_DST()) {
TAG_DST          5726 eval.c         	    else if (state == TAG_RETURN && TAG_DST()) {
TAG_DST          8252 eval.c             else if (TAG_DST()) {
TAG_DST          8580 eval.c             else if (state == TAG_BREAK && TAG_DST()) {
TAG_DST          11765 eval.c             else if (TAG_DST()) {
TAG_DST          11853 eval.c             else if (TAG_DST()) {


TAG_FATAL

TAG_FATAL        1401 eval.c               case TAG_FATAL:
TAG_FATAL        4347 eval.c         	JUMP_TAG(TAG_FATAL);
TAG_FATAL        4380 eval.c         	if (status == TAG_FATAL && ruby_errinfo == exception_error) {
TAG_FATAL        4390 eval.c             if (tag != TAG_FATAL) {
TAG_FATAL        4412 eval.c             rb_longjmp(TAG_FATAL, mesg);
TAG_FATAL        10168 eval.c         	JUMP_TAG(TAG_FATAL);
TAG_FATAL        11788 eval.c         	if (state == TAG_FATAL) {
TAG_FATAL        1359 ext/tk/tcltklib.c                 case TAG_FATAL:
TAG_FATAL        1480 ext/tk/tcltklib.c                         case TAG_FATAL:
TAG_FATAL        1552 ext/tk/tcltklib.c                             case TAG_FATAL:
TAG_FATAL        1669 ext/tk/tcltklib.c     case TAG_FATAL:
TAG_FATAL        2261 ext/tk/tcltklib.c         case TAG_FATAL:
TAG_FATAL        5628 ext/tk/tcltklib.c           case TAG_FATAL:
TAG_FATAL        6589 ext/tk/tcltklib.c     case TAG_FATAL:


TAG_NEXT

TAG_NEXT         1373 eval.c               case TAG_NEXT:
TAG_NEXT         1640 eval.c               case TAG_NEXT:
TAG_NEXT         1692 eval.c               case TAG_NEXT:
TAG_NEXT         2789 eval.c         	  case TAG_NEXT:
TAG_NEXT         2922 eval.c         	  case TAG_NEXT:
TAG_NEXT         2957 eval.c         	  case TAG_NEXT:
TAG_NEXT         3047 eval.c         	JUMP_TAG(TAG_NEXT);
TAG_NEXT         3129 eval.c         		if (state == TAG_NEXT) prot_tag->retval = result;
TAG_NEXT         4830 eval.c         	  case TAG_NEXT:
TAG_NEXT         2226 ext/tk/tcltklib.c         case TAG_NEXT:


TAG_RAISE

TAG_RAISE        1400 eval.c               case TAG_RAISE:
TAG_RAISE        3104 eval.c         		else if (state != TAG_RAISE) {
TAG_RAISE        3108 eval.c         	    else if (state == TAG_RAISE) {
TAG_RAISE        3127 eval.c         	    if (state != TAG_RAISE) ruby_errinfo = e_info;
TAG_RAISE        4406 eval.c             rb_longjmp(TAG_RAISE, mesg);
TAG_RAISE        4503 eval.c         	rb_longjmp(TAG_RAISE, mesg);
TAG_RAISE        4506 eval.c             rb_longjmp(TAG_RAISE, mesg);
TAG_RAISE        5183 eval.c               case TAG_RAISE:
TAG_RAISE        6199 eval.c         	if (state == TAG_RAISE) {
TAG_RAISE        1340 ext/tk/tcltklib.c                 case TAG_RAISE:
TAG_RAISE        1460 ext/tk/tcltklib.c                         case TAG_RAISE:
TAG_RAISE        1532 ext/tk/tcltklib.c                             case TAG_RAISE:
TAG_RAISE        1660 ext/tk/tcltklib.c     case TAG_RAISE:
TAG_RAISE        2253 ext/tk/tcltklib.c         case TAG_RAISE:
TAG_RAISE        5619 ext/tk/tcltklib.c           case TAG_RAISE:
TAG_RAISE        6580 ext/tk/tcltklib.c     case TAG_RAISE:


TAG_REDO

TAG_REDO         1381 eval.c               case TAG_REDO:
TAG_REDO         1636 eval.c               case TAG_REDO:
TAG_REDO         1695 eval.c               case TAG_REDO:
TAG_REDO         2786 eval.c         	  case TAG_REDO:
TAG_REDO         2919 eval.c         	  case TAG_REDO:
TAG_REDO         2954 eval.c         	  case TAG_REDO:
TAG_REDO         3052 eval.c         	JUMP_TAG(TAG_REDO);
TAG_REDO         4826 eval.c         	  case TAG_REDO:
TAG_REDO          781 ext/tk/tcltklib.c                 rb_jump_tag(TAG_REDO);
TAG_REDO          821 ext/tk/tcltklib.c                 rb_jump_tag(TAG_REDO);
TAG_REDO         2244 ext/tk/tcltklib.c         case TAG_REDO:


TAG_RETRY

TAG_RETRY        1385 eval.c               case TAG_RETRY:
TAG_RETRY        1638 eval.c               case TAG_RETRY:
TAG_RETRY        1698 eval.c               case TAG_RETRY:
TAG_RETRY        3025 eval.c         	    else if (state == TAG_RETRY && ruby_block == &_block) {
TAG_RETRY        3057 eval.c         	JUMP_TAG(TAG_RETRY);
TAG_RETRY        3099 eval.c         		else if (state == TAG_RETRY) {
TAG_RETRY        4573 eval.c               case TAG_RETRY:
TAG_RETRY        5122 eval.c             else if (state == TAG_RETRY) {
TAG_RETRY        5175 eval.c               case TAG_RETRY:
TAG_RETRY        5748 eval.c         	      case TAG_RETRY:
TAG_RETRY        8265 eval.c               case TAG_RETRY:
TAG_RETRY        8266 eval.c         	proc_jump_error(TAG_RETRY, Qnil); /* xxx */
TAG_RETRY        8584 eval.c             else if (state == TAG_RETRY) {
TAG_RETRY         778 ext/tk/tcltklib.c                 rb_jump_tag(TAG_RETRY);
TAG_RETRY         818 ext/tk/tcltklib.c                 rb_jump_tag(TAG_RETRY);
TAG_RETRY        2235 ext/tk/tcltklib.c         case TAG_RETRY:


TAG_RETURN

TAG_RETURN       1369 eval.c               case TAG_RETURN:
TAG_RETURN       1642 eval.c               case TAG_RETURN:
TAG_RETURN       1686 eval.c               case TAG_RETURN:
TAG_RETURN       4571 eval.c               case TAG_RETURN:
TAG_RETURN       4600 eval.c         	    JUMP_TAG(TAG_RETURN);
TAG_RETURN       4607 eval.c             localjump_error("unexpected return", retval, TAG_RETURN);
TAG_RETURN       5726 eval.c         	    else if (state == TAG_RETURN && TAG_DST()) {
TAG_RETURN       5744 eval.c         	      case TAG_RETURN:
TAG_RETURN       8273 eval.c               case TAG_RETURN:
TAG_RETURN       8596 eval.c               case TAG_RETURN:
TAG_RETURN       2220 ext/tk/tcltklib.c         case TAG_RETURN:


TAG_THREAD

TAG_THREAD       1428 eval.c         	if (state == TAG_THREAD) {
TAG_THREAD       1484 eval.c             else if (state == TAG_THREAD) {
TAG_THREAD       1517 eval.c             else if (state == TAG_THREAD) {
TAG_THREAD       5231 eval.c             else if (status == TAG_THREAD) {
TAG_THREAD       6645 eval.c             else if (status == TAG_THREAD) {
TAG_THREAD       11743 eval.c         	ruby_longjmp((prot_tag = ip->tag)->buf, TAG_THREAD);


TAG_THROW

TAG_THROW        1389 eval.c               case TAG_THROW:
TAG_THROW        12944 eval.c             else if (state == TAG_THROW && tag == prot_tag->dst) {
TAG_THROW        13004 eval.c             JUMP_TAG(TAG_THROW);
TAG_THROW         784 ext/tk/tcltklib.c                 rb_jump_tag(TAG_THROW);
TAG_THROW         824 ext/tk/tcltklib.c                 rb_jump_tag(TAG_THROW);
TAG_THROW        2269 ext/tk/tcltklib.c         case TAG_THROW:


TCLTKLIB_RELEASE_DATE

TCLTKLIB_RELEASE_DATE   77 ext/tk/tcltklib.c const char tcltklib_release_date[] = TCLTKLIB_RELEASE_DATE;
TCLTKLIB_RELEASE_DATE 7641 ext/tk/tcltklib.c         + strlen(TCLTKLIB_RELEASE_DATE)
TCLTKLIB_RELEASE_DATE 7654 ext/tk/tcltklib.c             TCLTKLIB_RELEASE_DATE,


TCLTK_STUBS_OK

TCLTK_STUBS_OK     97 ext/tk/stubs.c     if (tcl_dll) return TCLTK_STUBS_OK;
TCLTK_STUBS_OK    133 ext/tk/stubs.c     return TCLTK_STUBS_OK;
TCLTK_STUBS_OK    145 ext/tk/stubs.c         if (ret != TCLTK_STUBS_OK) return ret;
TCLTK_STUBS_OK    148 ext/tk/stubs.c     if (tk_dll) return TCLTK_STUBS_OK;
TCLTK_STUBS_OK    167 ext/tk/stubs.c     return TCLTK_STUBS_OK;
TCLTK_STUBS_OK    216 ext/tk/stubs.c             if (ret != TCLTK_STUBS_OK) {
TCLTK_STUBS_OK    268 ext/tk/stubs.c     return TCLTK_STUBS_OK;
TCLTK_STUBS_OK    286 ext/tk/stubs.c             if (ret != TCLTK_STUBS_OK) return ret;
TCLTK_STUBS_OK    304 ext/tk/stubs.c     return TCLTK_STUBS_OK;
TCLTK_STUBS_OK    321 ext/tk/stubs.c             if (ret != TCLTK_STUBS_OK) return ret;
TCLTK_STUBS_OK    339 ext/tk/stubs.c     return TCLTK_STUBS_OK;
TCLTK_STUBS_OK    404 ext/tk/stubs.c     return TCLTK_STUBS_OK;
TCLTK_STUBS_OK    413 ext/tk/stubs.c     return TCLTK_STUBS_OK;
TCLTK_STUBS_OK    459 ext/tk/stubs.c     return TCLTK_STUBS_OK;
TCLTK_STUBS_OK    476 ext/tk/stubs.c     return TCLTK_STUBS_OK;
TCLTK_STUBS_OK    494 ext/tk/stubs.c     return TCLTK_STUBS_OK;
TCLTK_STUBS_OK    674 ext/tk/tcltklib.c         case TCLTK_STUBS_OK:
TCLTK_STUBS_OK    708 ext/tk/tcltklib.c         case TCLTK_STUBS_OK:
TCLTK_STUBS_OK    729 ext/tk/tcltklib.c         case TCLTK_STUBS_OK:
TCLTK_STUBS_OK    750 ext/tk/tcltklib.c     if (ruby_tk_stubs_init(ptr->ip) != TCLTK_STUBS_OK) {
TCLTK_STUBS_OK   4694 ext/tk/tcltklib.c         case TCLTK_STUBS_OK:
TCLTK_STUBS_OK   4770 ext/tk/tcltklib.c         case TCLTK_STUBS_OK:
TCLTK_STUBS_OK   7934 ext/tk/tcltklib.c     case TCLTK_STUBS_OK:


TCL_ALPHA_RELEASE

TCL_ALPHA_RELEASE   27 ext/tk/tcltklib.c #ifndef TCL_ALPHA_RELEASE
TCL_ALPHA_RELEASE 5011 ext/tk/tcltklib.c         && (TCL_RELEASE_LEVEL == TCL_ALPHA_RELEASE \


TCL_BETA_RELEASE

TCL_BETA_RELEASE 5012 ext/tk/tcltklib.c            || (TCL_RELEASE_LEVEL == TCL_BETA_RELEASE \
TCL_BETA_RELEASE 5019 ext/tk/tcltklib.c        || (TCL_RELEASE_LEVEL == TCL_BETA_RELEASE \
TCL_BETA_RELEASE 5055 ext/tk/tcltklib.c         || (TCL_RELEASE_LEVEL == TCL_BETA_RELEASE && TCL_RELEASE_SERIAL >= 2) )


TCL_FINAL_RELEASE

TCL_FINAL_RELEASE 5017 ext/tk/tcltklib.c     && ( (TCL_RELEASE_LEVEL == TCL_FINAL_RELEASE \
TCL_FINAL_RELEASE 5044 ext/tk/tcltklib.c                  && TCL_RELEASE_LEVEL == TCL_FINAL_RELEASE \
TCL_FINAL_RELEASE 5054 ext/tk/tcltklib.c     && ( (TCL_RELEASE_LEVEL == TCL_FINAL_RELEASE && TCL_RELEASE_SERIAL == 0) \


TCL_NAMESPACE_DEBUG

TCL_NAMESPACE_DEBUG  365 ext/tk/tcltklib.c #ifndef TCL_NAMESPACE_DEBUG
TCL_NAMESPACE_DEBUG  369 ext/tk/tcltklib.c #if TCL_NAMESPACE_DEBUG
TCL_NAMESPACE_DEBUG  562 ext/tk/tcltklib.c #if TCL_NAMESPACE_DEBUG
TCL_NAMESPACE_DEBUG  595 ext/tk/tcltklib.c #if TCL_NAMESPACE_DEBUG
TCL_NAMESPACE_DEBUG 2637 ext/tk/tcltklib.c #if TCL_NAMESPACE_DEBUG
TCL_NAMESPACE_DEBUG 4373 ext/tk/tcltklib.c #if TCL_NAMESPACE_DEBUG
TCL_NAMESPACE_DEBUG 4714 ext/tk/tcltklib.c #if TCL_NAMESPACE_DEBUG
TCL_NAMESPACE_DEBUG 4920 ext/tk/tcltklib.c #if TCL_NAMESPACE_DEBUG
TCL_NAMESPACE_DEBUG 5267 ext/tk/tcltklib.c #if TCL_NAMESPACE_DEBUG


THREAD_ALLOC

THREAD_ALLOC     11563 eval.c             THREAD_ALLOC(th);
THREAD_ALLOC     12570 eval.c             THREAD_ALLOC(th);


THREAD_ATOMIC_END

THREAD_ATOMIC_END 4604 regcomp.c        THREAD_ATOMIC_END;
THREAD_ATOMIC_END 4619 regcomp.c        THREAD_ATOMIC_END;
THREAD_ATOMIC_END 4639 regcomp.c        THREAD_ATOMIC_END;
THREAD_ATOMIC_END 4978 regcomp.c        THREAD_ATOMIC_END;
THREAD_ATOMIC_END 5004 regcomp.c        THREAD_ATOMIC_END;
THREAD_ATOMIC_END  993 regparse.c             THREAD_ATOMIC_END;
THREAD_ATOMIC_END 1044 regparse.c         THREAD_ATOMIC_END;
THREAD_ATOMIC_END 1063 regparse.c       THREAD_ATOMIC_END;
THREAD_ATOMIC_END 1078 regparse.c         THREAD_ATOMIC_END;
THREAD_ATOMIC_END 4842 regparse.c                     THREAD_ATOMIC_END;
THREAD_ATOMIC_END 4849 regparse.c                     THREAD_ATOMIC_END;
THREAD_ATOMIC_END 4856 regparse.c                   THREAD_ATOMIC_END;
THREAD_ATOMIC_END 4865 regparse.c                 THREAD_ATOMIC_END;


THREAD_ATOMIC_START

THREAD_ATOMIC_START 4602 regcomp.c        THREAD_ATOMIC_START;
THREAD_ATOMIC_START 4616 regcomp.c        THREAD_ATOMIC_START;
THREAD_ATOMIC_START 4627 regcomp.c        THREAD_ATOMIC_START;
THREAD_ATOMIC_START 4969 regcomp.c        THREAD_ATOMIC_START;
THREAD_ATOMIC_START 4988 regcomp.c        THREAD_ATOMIC_START;
THREAD_ATOMIC_START  990 regparse.c             THREAD_ATOMIC_START;
THREAD_ATOMIC_START 1041 regparse.c         THREAD_ATOMIC_START;
THREAD_ATOMIC_START 1057 regparse.c       THREAD_ATOMIC_START;
THREAD_ATOMIC_START 1075 regparse.c         THREAD_ATOMIC_START;
THREAD_ATOMIC_START 4836 regparse.c                 THREAD_ATOMIC_START;


THREAD_COPY_STATUS

THREAD_COPY_STATUS 9845 eval.c             THREAD_COPY_STATUS(curr_thread, &save);
THREAD_COPY_STATUS 9850 eval.c             THREAD_COPY_STATUS(&save, curr_thread);


THREAD_PASS

THREAD_PASS      4662 regcomp.c            THREAD_PASS;
THREAD_PASS      2931 regexec.c            THREAD_PASS;
THREAD_PASS      3204 regexec.c            THREAD_PASS;


THREAD_PASS_LIMIT_COUNT

THREAD_PASS_LIMIT_COUNT 4660 regcomp.c            if (++n > THREAD_PASS_LIMIT_COUNT)
THREAD_PASS_LIMIT_COUNT 2929 regexec.c            if (++n > THREAD_PASS_LIMIT_COUNT)
THREAD_PASS_LIMIT_COUNT 3202 regexec.c            if (++n > THREAD_PASS_LIMIT_COUNT)


THREAD_RAISED

THREAD_RAISED    9812 eval.c             if (curr_thread->flags & THREAD_RAISED) return 1;
THREAD_RAISED    9813 eval.c             curr_thread->flags |= THREAD_RAISED;
THREAD_RAISED    9820 eval.c             if (!(curr_thread->flags & THREAD_RAISED)) return 0;
THREAD_RAISED    9821 eval.c             curr_thread->flags &= ~THREAD_RAISED;
THREAD_RAISED    10935 eval.c             if (!NIL_P(th->errinfo) && (th->flags & THREAD_RAISED)) {
THREAD_RAISED    11787 eval.c         	th->flags |= THREAD_RAISED;
THREAD_RAISED    12041 eval.c         	if (!NIL_P(th->errinfo) && (th->flags & THREAD_RAISED))


THREAD_SAVE_CONTEXT

THREAD_SAVE_CONTEXT 10714 eval.c         	if (THREAD_SAVE_CONTEXT(curr)) {
THREAD_SAVE_CONTEXT 11731 eval.c             if (THREAD_SAVE_CONTEXT(curr_thread)) {
THREAD_SAVE_CONTEXT 11759 eval.c         	if (THREAD_SAVE_CONTEXT(th) == 0) {
THREAD_SAVE_CONTEXT 11847 eval.c         	if (THREAD_SAVE_CONTEXT(th) == 0) {
THREAD_SAVE_CONTEXT 12186 eval.c         	if (THREAD_SAVE_CONTEXT(curr_thread)) {
THREAD_SAVE_CONTEXT 12205 eval.c         	if (THREAD_SAVE_CONTEXT(curr_thread)) {
THREAD_SAVE_CONTEXT 12223 eval.c         	if (THREAD_SAVE_CONTEXT(curr_thread)) {
THREAD_SAVE_CONTEXT 12248 eval.c         	if (THREAD_SAVE_CONTEXT(curr_thread)) {
THREAD_SAVE_CONTEXT 12272 eval.c         	if (THREAD_SAVE_CONTEXT(curr_thread)) {
THREAD_SAVE_CONTEXT 12585 eval.c             if (THREAD_SAVE_CONTEXT(th)) {


THREAD_TERMINATING

THREAD_TERMINATING 10721 eval.c         	if (!(next->flags & THREAD_TERMINATING)) {
THREAD_TERMINATING 10722 eval.c         	    next->flags |= THREAD_TERMINATING;


THREAD_TICK

THREAD_TICK      11661 eval.c         int rb_thread_tick = THREAD_TICK;
THREAD_TICK        97 rubysig.h      	    rb_thread_tick = THREAD_TICK;\


TKWAIT_MODE_DESTROY

TKWAIT_MODE_DESTROY 3726 ext/tk/tcltklib.c         param->done = TKWAIT_MODE_DESTROY;
TKWAIT_MODE_DESTROY 3740 ext/tk/tcltklib.c         param->done = TKWAIT_MODE_DESTROY;
TKWAIT_MODE_DESTROY 4105 ext/tk/tcltklib.c             if (param->done == TKWAIT_MODE_DESTROY) break;
TKWAIT_MODE_DESTROY 4113 ext/tk/tcltklib.c         if (param->done != TKWAIT_MODE_DESTROY) {
TKWAIT_MODE_DESTROY 4194 ext/tk/tcltklib.c         while(param->done != TKWAIT_MODE_DESTROY) {


TKWAIT_MODE_VISIBILITY

TKWAIT_MODE_VISIBILITY 3723 ext/tk/tcltklib.c         param->done = TKWAIT_MODE_VISIBILITY;
TKWAIT_MODE_VISIBILITY 4104 ext/tk/tcltklib.c         while(param->done != TKWAIT_MODE_VISIBILITY) {


TMP_ALLOC

TMP_ALLOC        2123 eval.c         	    argv = TMP_ALLOC(argc);\
TMP_ALLOC        3977 eval.c         	VALUE *vars = TMP_ALLOC(node->nd_tbl[0]+1);
TMP_ALLOC        5684 eval.c         		local_vars = TMP_ALLOC(body->nd_tbl[0]+1);


TMP_PROTECT

TMP_PROTECT      3244 eval.c         	    TMP_PROTECT;
TMP_PROTECT      3269 eval.c         	    TMP_PROTECT;
TMP_PROTECT      3285 eval.c         	    TMP_PROTECT;
TMP_PROTECT      3306 eval.c         	    TMP_PROTECT;
TMP_PROTECT      3388 eval.c         	    TMP_PROTECT;
TMP_PROTECT      3966 eval.c             TMP_PROTECT;
TMP_PROTECT      5143 eval.c             TMP_PROTECT;
TMP_PROTECT      5585 eval.c             TMP_PROTECT;
TMP_PROTECT      6547 eval.c             TMP_PROTECT;


TOLOWER

TOLOWER           203 ext/readline/readline.c 		     (c1 = TOLOWER(result[i][si])) &&
TOLOWER           204 ext/readline/readline.c 			 (c2 = TOLOWER(result[i + 1][si]));
TOLOWER          2391 file.c         #if !defined(TOLOWER)
TOLOWER          2472 file.c         		if (has_drive_letter(p) && TOLOWER(p[0]) == TOLOWER(s[0])) {


TO_SIX_BIT

TO_SIX_BIT        633 missing/crypt.c 	TO_SIX_BIT(salt, L0);	/* convert to 4*(6+2) format */
TO_SIX_BIT        864 missing/crypt.c 			TO_SIX_BIT(SPE[0][tableno][j], k);
TO_SIX_BIT        868 missing/crypt.c 			TO_SIX_BIT(SPE[1][tableno][j], k);


TO_SOCKET

TO_SOCKET         553 ext/openssl/ossl_ssl.c         SSL_set_fd(ssl, TO_SOCKET(fptr->fd));
TO_SOCKET        1730 win32/win32.c      return is_socket(TO_SOCKET(fd));
TO_SOCKET        1848 win32/win32.c      SOCKET s = TO_SOCKET(fd);
TO_SOCKET        1869 win32/win32.c      SOCKET s = TO_SOCKET(fd);
TO_SOCKET        1889 win32/win32.c      SOCKET s = TO_SOCKET(fd);
TO_SOCKET        2202 win32/win32.c  	r = accept(TO_SOCKET(s), addr, addrlen);
TO_SOCKET        2225 win32/win32.c  	r = bind(TO_SOCKET(s), addr, addrlen);
TO_SOCKET        2242 win32/win32.c  	r = connect(TO_SOCKET(s), addr, addrlen);
TO_SOCKET        2268 win32/win32.c  	r = getpeername(TO_SOCKET(s), addr, addrlen);
TO_SOCKET        2285 win32/win32.c  	r = getsockname(TO_SOCKET(s), addr, addrlen);
TO_SOCKET        2300 win32/win32.c  	r = getsockopt(TO_SOCKET(s), level, optname, optval, optlen);
TO_SOCKET        2317 win32/win32.c  	r = ioctlsocket(TO_SOCKET(s), cmd, argp);
TO_SOCKET        2334 win32/win32.c  	r = listen(TO_SOCKET(s), backlog);
TO_SOCKET        2351 win32/win32.c  	r = recv(TO_SOCKET(s), buf, len, flags);
TO_SOCKET        2369 win32/win32.c  	r = recvfrom(TO_SOCKET(s), buf, len, flags, from, fromlen);
TO_SOCKET        2386 win32/win32.c  	r = send(TO_SOCKET(s), buf, len, flags);
TO_SOCKET        2404 win32/win32.c  	r = sendto(TO_SOCKET(s), buf, len, flags, to, tolen);
TO_SOCKET        2421 win32/win32.c  	r = setsockopt(TO_SOCKET(s), level, optname, optval, optlen);
TO_SOCKET        2438 win32/win32.c  	r = shutdown(TO_SOCKET(s), how);
TO_SOCKET        2760 win32/win32.c      SOCKET sock = TO_SOCKET(fd);
TO_SOCKET        3781 win32/win32.c      SOCKET sock = TO_SOCKET(fd);
TO_SOCKET        3800 win32/win32.c      SOCKET sock = TO_SOCKET(fd);


TRACE_HEAD

TRACE_HEAD       1218 eval.c         #define TRACE_MAX (TRACE_HEAD+TRACE_TAIL+5)
TRACE_HEAD       1227 eval.c         	    if (i == TRACE_HEAD && ep->len > TRACE_MAX) {
TRACE_HEAD       1229 eval.c         			ep->len - TRACE_HEAD - TRACE_TAIL);


TRACE_TAIL

TRACE_TAIL       1218 eval.c         #define TRACE_MAX (TRACE_HEAD+TRACE_TAIL+5)
TRACE_TAIL       1229 eval.c         			ep->len - TRACE_HEAD - TRACE_TAIL);
TRACE_TAIL       1230 eval.c         		i = ep->len - TRACE_TAIL;


TRAP_BEG

TRAP_BEG         10680 eval.c         	    TRAP_BEG;
TRAP_BEG         10777 eval.c         	    TRAP_BEG;
TRAP_BEG         10860 eval.c         	    TRAP_BEG;
TRAP_BEG         11289 eval.c         	TRAP_BEG;
TRAP_BEG         11304 eval.c         	TRAP_BEG;
TRAP_BEG          497 ext/socket/socket.c         TRAP_BEG;
TRAP_BEG          503 ext/socket/socket.c         TRAP_BEG;
TRAP_BEG          592 ext/socket/socket.c     TRAP_BEG;
TRAP_BEG         1401 ext/socket/socket.c     TRAP_BEG;
TRAP_BEG         3046 file.c         	TRAP_BEG;
TRAP_BEG          436 io.c               TRAP_BEG;
TRAP_BEG          586 io.c                   TRAP_BEG;
TRAP_BEG          881 io.c                   TRAP_BEG;
TRAP_BEG         1279 io.c                   TRAP_BEG;
TRAP_BEG         1899 io.c               TRAP_BEG;
TRAP_BEG         2289 io.c               TRAP_BEG;
TRAP_BEG         2347 io.c               TRAP_BEG;
TRAP_BEG         4576 io.c               TRAP_BEG;
TRAP_BEG         4587 io.c               TRAP_BEG;
TRAP_BEG         4774 io.c               TRAP_BEG;
TRAP_BEG          562 process.c          TRAP_BEG;
TRAP_BEG          594 process.c      	TRAP_BEG;


TRAP_END

TRAP_END         10682 eval.c         	    TRAP_END;
TRAP_END         10780 eval.c         	    TRAP_END;
TRAP_END         10862 eval.c         	    TRAP_END;
TRAP_END         11291 eval.c         	TRAP_END;
TRAP_END         11307 eval.c         	TRAP_END;
TRAP_END          500 ext/socket/socket.c         TRAP_END;
TRAP_END          505 ext/socket/socket.c         TRAP_END;
TRAP_END          594 ext/socket/socket.c     TRAP_END;
TRAP_END         1403 ext/socket/socket.c     TRAP_END;
TRAP_END         3048 file.c         	TRAP_END;
TRAP_END          438 io.c               TRAP_END; /* xxx: signal handler may modify wbuf */
TRAP_END          588 io.c                   TRAP_END; /* xxx: signal handler may modify given string. */
TRAP_END          883 io.c                   TRAP_END; /* xxx: signal handler may modify rbuf */
TRAP_END         1281 io.c                   TRAP_END;
TRAP_END         1901 io.c               TRAP_END;
TRAP_END         2291 io.c               TRAP_END;
TRAP_END         2349 io.c               TRAP_END;
TRAP_END         4582 io.c               TRAP_END;
TRAP_END         4589 io.c               TRAP_END;
TRAP_END         4828 io.c               TRAP_END;
TRAP_END          568 process.c          TRAP_END;
TRAP_END          596 process.c      	TRAP_END;


TRUE

TRUE              165 euc_jp.c             return (eucjp_code_to_mbclen(code) > 1 ? TRUE : FALSE);
TRUE              201 euc_jp.c           return TRUE;
TRUE             1218 ext/curses/curses.c   scrollok(winp->window, RTEST(bf) ? TRUE : FALSE);
TRUE             1228 ext/curses/curses.c   idlok(winp->window, RTEST(bf) ? TRUE : FALSE);
TRUE             1396 ext/curses/curses.c   keypad(winp->window,(RTEST(val) ? TRUE : FALSE));
TRUE             1400 ext/curses/curses.c   return (keypad(winp->window,RTEST(val) ? TRUE : FALSE)) == OK ?
TRUE             1417 ext/curses/curses.c   nodelay(winp->window, RTEST(val) ? TRUE : FALSE);
TRUE             1420 ext/curses/curses.c   return nodelay(winp->window,RTEST(val) ? TRUE : FALSE) == OK ? Qtrue : Qfalse;
TRUE              386 ext/nkf/nkf-utf8/nkf.c STATIC int             binmode_f = TRUE;       /* binary mode */
TRUE              398 ext/nkf/nkf-utf8/nkf.c STATIC int             x0201_f = TRUE;         /* Assume JISX0201 kana */
TRUE              465 ext/nkf/nkf-utf8/nkf.c STATIC int cp932_f = TRUE;
TRUE              469 ext/nkf/nkf-utf8/nkf.c STATIC int cp932inv_f = TRUE;
TRUE              738 ext/nkf/nkf-utf8/nkf.c          x0201_f = ((!iso2022jp_f)? TRUE : NO_X0201);
TRUE              740 ext/nkf/nkf-utf8/nkf.c     if (binmode_f == TRUE)
TRUE              754 ext/nkf/nkf-utf8/nkf.c       if (binmode_f == TRUE)
TRUE              786 ext/nkf/nkf-utf8/nkf.c               if (file_out == TRUE) {
TRUE              836 ext/nkf/nkf-utf8/nkf.c                   if (binmode_f == TRUE) {
TRUE              845 ext/nkf/nkf-utf8/nkf.c               if (binmode_f == TRUE)
TRUE              919 ext/nkf/nkf-utf8/nkf.c     if (file_out == TRUE)
TRUE             1031 ext/nkf/nkf-utf8/nkf.c                     file_out = TRUE;
TRUE             1032 ext/nkf/nkf-utf8/nkf.c                     overwrite = TRUE;
TRUE             1038 ext/nkf/nkf-utf8/nkf.c                     cap_f = TRUE;
TRUE             1042 ext/nkf/nkf-utf8/nkf.c                     url_f = TRUE;
TRUE             1048 ext/nkf/nkf-utf8/nkf.c                     numchar_f = TRUE;
TRUE             1054 ext/nkf/nkf-utf8/nkf.c                     noout_f = TRUE;
TRUE             1058 ext/nkf/nkf-utf8/nkf.c                     debug_f = TRUE;
TRUE             1064 ext/nkf/nkf-utf8/nkf.c                     cp932_f = TRUE;
TRUE             1065 ext/nkf/nkf-utf8/nkf.c                     cp932inv_f = TRUE;
TRUE             1068 ext/nkf/nkf-utf8/nkf.c                     ms_ucs_map_f = TRUE;
TRUE             1084 ext/nkf/nkf-utf8/nkf.c                     cp932inv_f = TRUE;
TRUE             1091 ext/nkf/nkf-utf8/nkf.c                     x0212_f = TRUE;
TRUE             1108 ext/nkf/nkf-utf8/nkf.c                     internal_unicode_f = TRUE;
TRUE             1114 ext/nkf/nkf-utf8/nkf.c                     ms_ucs_map_f = TRUE;
TRUE             1121 ext/nkf/nkf-utf8/nkf.c 		    nfc_f = TRUE;
TRUE             1139 ext/nkf/nkf-utf8/nkf.c             unbuf_f = TRUE;
TRUE             1142 ext/nkf/nkf-utf8/nkf.c             nop_f = TRUE;
TRUE             1155 ext/nkf/nkf-utf8/nkf.c             iso8859_f = TRUE;  /* Only compatible with ISO-2022-JP */
TRUE             1177 ext/nkf/nkf-utf8/nkf.c             rot_f = TRUE;
TRUE             1249 ext/nkf/nkf-utf8/nkf.c             if (x0201_f==NO_X0201) x0201_f=TRUE;
TRUE             1260 ext/nkf/nkf-utf8/nkf.c                 alpha_f |= TRUE;
TRUE             1277 ext/nkf/nkf-utf8/nkf.c             x0201_f = TRUE;
TRUE             1280 ext/nkf/nkf-utf8/nkf.c 	    fold_preserve_f = TRUE;
TRUE             1282 ext/nkf/nkf-utf8/nkf.c             fold_f = TRUE;
TRUE             1305 ext/nkf/nkf-utf8/nkf.c                 mime_f = TRUE; cp++;
TRUE             1321 ext/nkf/nkf-utf8/nkf.c 		mimeout_f = TRUE;
TRUE             1332 ext/nkf/nkf-utf8/nkf.c                 broken_f |= TRUE;
TRUE             1336 ext/nkf/nkf-utf8/nkf.c             file_out = TRUE;
TRUE             1346 ext/nkf/nkf-utf8/nkf.c             iso2022jp_f = TRUE;
TRUE             1361 ext/nkf/nkf-utf8/nkf.c             guess_f = TRUE;
TRUE             1411 ext/nkf/nkf-utf8/nkf.c         && (f == -TRUE || !input_f) /* -TRUE means "FORCE" */
TRUE             1777 ext/nkf/nkf-utf8/nkf.c             set_iconv(TRUE, result->iconv_func);
TRUE             1852 ext/nkf/nkf-utf8/nkf.c 	if (mimeout_f == TRUE) {
TRUE             1912 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, e_iconv);
TRUE             1914 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, s_iconv);
TRUE             1917 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, w_iconv);
TRUE             1919 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, w_iconv16);
TRUE             1921 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, w_iconv16);
TRUE             2010 ext/nkf/nkf-utf8/nkf.c 		    if (!is_8bit) is_8bit = TRUE;
TRUE             2104 ext/nkf/nkf-utf8/nkf.c                 shift_mode = TRUE;
TRUE             3692 ext/nkf/nkf-utf8/nkf.c     mimebuf_f = TRUE;
TRUE             3802 ext/nkf/nkf-utf8/nkf.c         is_inputcode_mixed = TRUE;
TRUE             3805 ext/nkf/nkf-utf8/nkf.c     is_inputcode_set = TRUE;
TRUE             4735 ext/nkf/nkf-utf8/nkf.c     binmode_f = TRUE;
TRUE             4747 ext/nkf/nkf-utf8/nkf.c      x0201_f = TRUE;
TRUE             4779 ext/nkf/nkf-utf8/nkf.c     cp932_f = TRUE;
TRUE             4780 ext/nkf/nkf-utf8/nkf.c     cp932inv_f = TRUE;
TRUE              109 ext/nkf/nkf.c      x0201_f = ((!iso2022jp_f)? TRUE : NO_X0201);
TRUE              236 ext/nkf/nkf.c      x0201_f = ((!iso2022jp_f)? TRUE : NO_X0201);
TRUE              238 ext/nkf/nkf.c    guess_f = TRUE;
TRUE               80 ext/win32ole/win32ole.c #define WC2VSTR(x) ole_wc2vstr((x), TRUE)
TRUE             1429 ext/win32ole/win32ole.c                             found = TRUE;
TRUE             6285 ext/win32ole/win32ole.c             *is_default = TRUE;
TRUE             6396 ext/win32ole/win32ole.c         g_IsEventSinkVtblInitialized = TRUE;
TRUE             6506 ext/win32ole/win32ole.c                         is_found = TRUE;
TRUE               36 missing/strtod.c #ifndef TRUE
TRUE              128 missing/strtod.c 	sign = TRUE;
TRUE              214 missing/strtod.c 	    expSign = TRUE;
TRUE              241 missing/strtod.c 	expSign = TRUE;
TRUE              681 regenc.c         return TRUE;
TRUE              856 regenc.c             return (ONIGENC_CODE_TO_MBCLEN(enc, code) > 1 ? TRUE : FALSE);
TRUE              876 regenc.c             return (ONIGENC_CODE_TO_MBCLEN(enc, code) > 1 ? TRUE : FALSE);
TRUE              954 regenc.c           return (code < 128 ? TRUE : FALSE);
TRUE             1003 regenc.c             return TRUE;
TRUE               41 regenc.h       #ifndef TRUE
TRUE              174 sjis.c               return (sjis_code_to_mbclen(code) > 1 ? TRUE : FALSE);
TRUE              214 sjis.c           return (SJIS_ISMB_TRAIL(c) ? FALSE : TRUE);
TRUE              274 utf8.c               return TRUE;
TRUE              291 utf8.c                     return TRUE;
TRUE              295 utf8.c                     return TRUE;
TRUE              300 utf8.c         	  return TRUE;
TRUE             3691 utf8.c               return TRUE;
TRUE              755 util.c         	sign = TRUE;
TRUE              775 util.c         	    hasPoint = TRUE;
TRUE              788 util.c         	    hasDigit = TRUE;
TRUE              842 util.c         		expSign = TRUE;
TRUE              881 util.c         	    expSign = TRUE;
TRUE              901 util.c         	    expSign = TRUE;
TRUE              354 win32/win32.c  	    f = TRUE;
TRUE              357 win32/win32.c  	    f = TRUE;
TRUE              696 win32/win32.c  	reading = writing = TRUE;
TRUE              701 win32/win32.c  	writing = TRUE;
TRUE              705 win32/win32.c  	reading = TRUE;
TRUE              713 win32/win32.c      sa.bInheritHandle       = TRUE;
TRUE              867 win32/win32.c  	sa.bInheritHandle       = TRUE;
TRUE             1090 win32/win32.c  		return TRUE;
TRUE             1707 win32/win32.c      int result = TRUE;
TRUE             2851 win32/win32.c  	ret = WaitForMultipleEvents(count + 1, events, FALSE, timeout, TRUE);
TRUE             3374 win32/win32.c      ret = WaitForMultipleEvents(count, events, FALSE, timeout, TRUE);
TRUE             3543 win32/win32.c      return TRUE;
TRUE             3679 win32/win32.c  		interrupted = TRUE;
TRUE               82 win32/win32.h  #define rb_w32_iswinnt()  TRUE
TRUE               39 wince/direct.c 	return rc==TRUE ? 0 : -1;
TRUE               52 wince/direct.c 	return rc==TRUE ? 0 : -1;
TRUE               36 wince/io_wce.c 	return rc==TRUE ? 0 : -1;
TRUE               49 wince/io_wce.c 	return rc==TRUE ? 0 : -1;
TRUE               42 wince/sys/utime.c 	return rc==TRUE ? 0 : -1;
TRUE              417 wince/wince.c  	if( TRUE==IsDBCSLeadByteEx(CP_ACP, (BYTE)*a) )
TRUE              429 wince/wince.c  	else if( TRUE==IsDBCSLeadByteEx(CP_ACP, (BYTE)*(ptr-2)) )


TWIST

TWIST             139 random.c               *p = p[M] ^ TWIST(p[0], p[1]);
TWIST             142 random.c               *p = p[M-N] ^ TWIST(p[0], p[1]);
TWIST             144 random.c           *p = p[M-N] ^ TWIST(p[0], state[0]);


TYPE

TYPE              959 array.c            if (TYPE(obj) == T_ARRAY) {
TYPE             1278 array.c        	switch (TYPE(tmp)) {
TYPE             1500 array.c            if (TYPE(a) == T_STRING) {
TYPE             1501 array.c        	if (TYPE(b) == T_STRING) return rb_str_cmp(a, b);
TYPE             2285 array.c        	if (TYPE(v) == T_ARRAY &&
TYPE             2315 array.c        	if (TYPE(v) == T_ARRAY &&
TYPE             2343 array.c            if (TYPE(ary2) != T_ARRAY) {
TYPE             2371 array.c            if (TYPE(ary2) != T_ARRAY) return Qfalse;
TYPE              882 bignum.c           switch (TYPE(y)) {
TYPE              925 bignum.c           switch (TYPE(y)) {
TYPE              963 bignum.c           if (TYPE(y) != T_BIGNUM) return Qfalse;
TYPE             1117 bignum.c           switch (TYPE(y)) {
TYPE             1142 bignum.c           switch (TYPE(y)) {
TYPE             1165 bignum.c           switch (TYPE(y)) {
TYPE             1371 bignum.c           switch (TYPE(y)) {
TYPE             1404 bignum.c           switch (TYPE(y)) {
TYPE             1434 bignum.c           switch (TYPE(y)) {
TYPE             1462 bignum.c           switch (TYPE(y)) {
TYPE             1496 bignum.c           switch (TYPE(y)) {
TYPE             1535 bignum.c           switch (TYPE(y)) {
TYPE             1854 bignum.c           if (TYPE(y) == T_BIGNUM) {
TYPE             1908 bignum.c           else if (TYPE(y) == T_BIGNUM) {
TYPE               39 class.c            if (TYPE(super) != T_CLASS) {
TYPE              202 class.c        	if (TYPE(klass) != T_CLASS) {
TYPE              231 class.c        	if (TYPE(klass) != T_CLASS) {
TYPE              285 class.c        	if (TYPE(module) == T_MODULE)
TYPE              305 class.c        	if (TYPE(module) == T_MODULE)
TYPE              332 class.c            if (TYPE(module) == T_ICLASS) {
TYPE              358 class.c            if (TYPE(module) != T_MODULE) {
TYPE              718 class.c        	while (klass && (FL_TEST(klass, FL_SINGLETON) || TYPE(klass) == T_ICLASS)) {
TYPE               26 compar.c           if (TYPE(val) == T_BIGNUM) {
TYPE             1631 dir.c              if (TYPE(dir) != T_DATA ||
TYPE              521 enum.c             if (TYPE(obj) == T_ARRAY) {
TYPE               29 enumerator.c       if (TYPE(args) != T_ARRAY) {
TYPE              209 error.c            if (TYPE(x) != t) {
TYPE              234 error.c        	rb_bug("unknown type 0x%x (0x%x given)", t, TYPE(x));
TYPE              440 error.c        	int t = TYPE(bt);
TYPE              447 error.c        	    if (TYPE(RARRAY(bt)->ptr[i]) != T_STRING) {
TYPE              690 error.c        	switch (TYPE(obj)) {
TYPE              842 error.c        	    if (TYPE(self) != T_OBJECT) { /* insurance to avoid type crash */
TYPE              902 error.c        	while (TYPE(klass) == T_ICLASS || FL_TEST(klass, FL_SINGLETON)) {
TYPE              281 eval.c             if (TYPE(x)!= T_STRING) {
TYPE              293 eval.c         		  (TYPE(klass) == T_MODULE) ? "module" : "class",
TYPE              595 eval.c             if (!body && TYPE(klass) == T_MODULE) {
TYPE             1224 eval.c         	    if (TYPE(ep->ptr[i]) == T_STRING) {
TYPE             1718 eval.c             if (TYPE(cmd) != T_STRING) {
TYPE             1896 eval.c         	    switch (TYPE(klass)) {
TYPE             1932 eval.c         	    switch (TYPE(obj)) {
TYPE             1939 eval.c         	else if (TYPE(c) == T_MODULE) {
TYPE             2023 eval.c         	if (TYPE(klass) == T_MODULE) {
TYPE             2136 eval.c         	if (TYPE(args) != T_ARRAY)\
TYPE             2317 eval.c         	switch (TYPE(val)) {
TYPE             2374 eval.c             if (TYPE(proc) == T_DATA && RDATA(proc)->dfree == (RUBY_DATA_FUNC)blk_free) {
TYPE             2539 eval.c         	if (TYPE(klass) == T_ICLASS) {
TYPE             2657 eval.c         	switch (TYPE(c)) {
TYPE             2765 eval.c         	    if (TYPE(l) == T_STRING) {
TYPE             2842 eval.c         		    if (TYPE(v) != T_ARRAY) v = rb_ary_to_ary(v);
TYPE             2883 eval.c         			if (TYPE(v) != T_ARRAY) v = rb_ary_to_ary(v);
TYPE             3322 eval.c                             if (TYPE(RBASIC(ruby_scope)->klass) != T_ARRAY ||
TYPE             3554 eval.c         		switch (TYPE(klass)) {
TYPE             3846 eval.c         		if (TYPE(klass) != T_CLASS) {
TYPE             3892 eval.c         		if (TYPE(module) != T_MODULE) {
TYPE             4466 eval.c         	if (TYPE(argv[0]) == T_STRING) {
TYPE             4707 eval.c         		if (TYPE(val) == T_ARRAY && RARRAY(val)->len != 0) {
TYPE             4930 eval.c             if (TYPE(values) == T_ARRAY) {
TYPE             5806 eval.c         	    if (TYPE(defined_class) == T_ICLASS) {
TYPE             6147 eval.c             if (TYPE(ruby_class) == T_ICLASS) {
TYPE             6205 eval.c         		if (!NIL_P(errat) && TYPE(errat) == T_ARRAY) {
TYPE             6206 eval.c         		    if (!NIL_P(mesg) && TYPE(mesg) == T_STRING) {
TYPE             7189 eval.c             if (TYPE(module) != T_MODULE) {
TYPE             7238 eval.c             switch (TYPE(dest)) {
TYPE             8403 eval.c             if (TYPE(other) != T_DATA) return Qfalse;
TYPE             8658 eval.c         	   (FL_TEST(rklass, FL_SINGLETON) || TYPE(rklass) == T_ICLASS)) {
TYPE             8661 eval.c             if (TYPE(klass) == T_ICLASS) klass = RBASIC(klass)->klass;
TYPE             8714 eval.c             if (TYPE(other) != T_DATA || RDATA(other)->dmark != (RUBY_DATA_FUNC)bm_mark)
TYPE             9007 eval.c         	if (TYPE(data->rklass) == T_MODULE) {
TYPE             9251 eval.c             if (TYPE(m) == T_DATA && RDATA(m)->dmark == (RUBY_DATA_FUNC)bm_mark) {
TYPE             10069 eval.c             if (TYPE(data) != T_DATA || RDATA(data)->dmark != (RUBY_DATA_FUNC)thread_mark) {
TYPE             10940 eval.c         	if (TYPE(oldbt) == T_ARRAY && RARRAY(oldbt)->len > 0) {
TYPE             13025 eval.c             if (NIL_P(hash) || TYPE(hash) != T_HASH) {
TYPE             13031 eval.c         	if (NIL_P(list) || TYPE(list) != T_ARRAY) return Qfalse;
TYPE             13043 eval.c             if (NIL_P(hash) || TYPE(hash) != T_HASH) {
TYPE             13051 eval.c             if (NIL_P(list) || TYPE(list) != T_ARRAY) {
TYPE             13065 eval.c             if (NIL_P(hash) || TYPE(hash) != T_HASH) {
TYPE             13072 eval.c             if (NIL_P(list) || TYPE(list) != T_ARRAY) {
TYPE               71 ext/Win32API/Win32API.c     switch (TYPE(import)) {
TYPE               95 ext/bigdecimal/bigdecimal.c     switch(TYPE(v))
TYPE              428 ext/bigdecimal/bigdecimal.c     if(TYPE(other) == T_FLOAT) {
TYPE             1063 ext/bigdecimal/bigdecimal.c         if(TYPE(f)==T_STRING) {
TYPE              385 ext/dl/cptr.c  	if( TYPE(arg2) == T_STRING ){
TYPE              287 ext/iconv/iconv.c     else if (TYPE(failed) != T_STRING || RSTRING(failed)->len < FAILED_MAXLEN) {
TYPE              352 ext/iconv/iconv.c 	    if (TYPE(rescue) == T_ARRAY) {
TYPE              436 ext/iconv/iconv.c 	    if (TYPE(rescue) == T_ARRAY) {
TYPE               21 ext/openssl/ossl_bio.c     if (TYPE(obj) == T_FILE) {
TYPE               64 ext/openssl/ossl_bn.c     } else switch (TYPE(obj)) {
TYPE              219 ext/openssl/ossl_bn.c     switch(TYPE(other)) {
TYPE              353 ext/openssl/ossl_pkcs7.c     if(TYPE(sym) == T_SYMBOL) s = rb_id2name(SYM2ID(sym));
TYPE              157 ext/openssl/ossl_ssl.c     if(TYPE(ssl_method) == T_SYMBOL)
TYPE              351 ext/openssl/ossl_ssl.c 	if(TYPE(val) == T_ARRAY){
TYPE              460 ext/openssl/ossl_ssl.c     else if (TYPE(v) == T_ARRAY) {
TYPE              464 ext/openssl/ossl_ssl.c             if (TYPE(elem) == T_ARRAY) elem = rb_ary_entry(elem, 0);
TYPE              395 ext/racc/cparse/cparse.c     if (TYPE(block_args) != T_ARRAY) {
TYPE              178 ext/readline/readline.c     if (TYPE(ary) != T_ARRAY)
TYPE              357 ext/socket/socket.c     switch (TYPE(val)) {
TYPE              568 ext/stringio/stringio.c     if (argc == 1 && TYPE(*argv) != T_STRING) {
TYPE              993 ext/stringio/stringio.c     if (TYPE(str) != T_STRING)
TYPE              212 ext/strscan/strscan.c     if (TYPE(obj) != T_DATA || RDATA(obj)->dmark != (RUBY_DATA_FUNC)strscan_mark) {
TYPE             1742 ext/syck/rubyext.c     if ( TYPE( orig ) != T_DATA )
TYPE             1888 ext/syck/rubyext.c     if (TYPE(dest) == T_STRING) {
TYPE             1127 ext/tk/tcltklib.c     switch(TYPE(time)) {
TYPE             2143 ext/tk/tcltklib.c     } else if (TYPE(enc) == T_STRING) {
TYPE             2175 ext/tk/tcltklib.c     switch(TYPE(obj)) {
TYPE             2337 ext/tk/tcltklib.c             if (TYPE(reason) == T_SYMBOL) {
TYPE             6016 ext/tk/tcltklib.c         if (TYPE(str) == T_STRING) {
TYPE             6160 ext/tk/tcltklib.c         if (TYPE(str) == T_STRING) {
TYPE              255 ext/tk/tkutil/tkutil.c     } else if (TYPE(enc_flag) == T_TRUE || TYPE(enc_flag) == T_FALSE) {
TYPE              266 ext/tk/tkutil/tkutil.c         if (TYPE(RARRAY(ary)->ptr[idx]) == T_HASH) {
TYPE              278 ext/tk/tkutil/tkutil.c         switch(TYPE(val)) {
TYPE              308 ext/tk/tkutil/tkutil.c                 switch(TYPE(val2)) {
TYPE              377 ext/tk/tkutil/tkutil.c         if (TYPE(dst_enc) == T_STRING) {
TYPE              409 ext/tk/tkutil/tkutil.c     } else if (TYPE(enc_flag) == T_TRUE || TYPE(enc_flag) == T_FALSE) {
TYPE              423 ext/tk/tkutil/tkutil.c         switch(TYPE(val)) {
TYPE              471 ext/tk/tkutil/tkutil.c         if (TYPE(dst_enc) == T_STRING) {
TYPE              505 ext/tk/tkutil/tkutil.c         if (TYPE(pair) != T_ARRAY) {
TYPE              556 ext/tk/tkutil/tkutil.c         if (TYPE(pair) != T_ARRAY) {
TYPE              734 ext/tk/tkutil/tkutil.c     switch(TYPE(hash)) {
TYPE              774 ext/tk/tkutil/tkutil.c     switch(TYPE(obj)) {
TYPE              910 ext/tk/tkutil/tkutil.c         if (TYPE(argv[idx]) == T_HASH) {
TYPE              920 ext/tk/tkutil/tkutil.c         if (TYPE(argv[idx]) == T_HASH) {
TYPE              946 ext/tk/tkutil/tkutil.c     if (TYPE(value) == T_FIXNUM) {
TYPE              954 ext/tk/tkutil/tkutil.c     if (TYPE(value) == T_TRUE || TYPE(value) == T_FALSE) {
TYPE             1175 ext/tk/tkutil/tkutil.c     switch(TYPE(key)) {
TYPE             1187 ext/tk/tkutil/tkutil.c     switch(TYPE(value)) {
TYPE             1211 ext/tk/tkutil/tkutil.c     if (TYPE(tbl) != T_HASH) {
TYPE             1243 ext/tk/tkutil/tkutil.c         switch(TYPE(argv[i])) {
TYPE             1377 ext/tk/tkutil/tkutil.c         if (TYPE(inf) != T_ARRAY) continue;
TYPE             1404 ext/tk/tkutil/tkutil.c         if (TYPE(inf) != T_ARRAY) continue;
TYPE              711 ext/win32ole/win32ole.c     while(TYPE(obj) == T_ARRAY) {
TYPE              764 ext/win32ole/win32ole.c     switch (TYPE(val)) {
TYPE              777 ext/win32ole/win32ole.c         while(TYPE(val1) == T_ARRAY) {
TYPE              793 ext/win32ole/win32ole.c         while(TYPE(val1) == T_ARRAY) {
TYPE              867 ext/win32ole/win32ole.c     switch (TYPE(val)) {
TYPE             1769 ext/win32ole/win32ole.c     if (TYPE(klass) != T_CLASS &&
TYPE             1770 ext/win32ole/win32ole.c         TYPE(klass) != T_MODULE &&
TYPE             1771 ext/win32ole/win32ole.c         TYPE(klass) != T_NIL) {
TYPE             1787 ext/win32ole/win32ole.c         if(TYPE(klass) != T_NIL) {
TYPE             1795 ext/win32ole/win32ole.c     else if(TYPE(ole) == T_STRING) {
TYPE             1805 ext/win32ole/win32ole.c         if(TYPE(klass) != T_NIL) {
TYPE             1966 ext/win32ole/win32ole.c     if (TYPE(helpfile) != T_STRING) {
TYPE             2114 ext/win32ole/win32ole.c     if(TYPE(key) != T_STRING) {
TYPE             2213 ext/win32ole/win32ole.c     if(TYPE(param) == T_HASH) {
TYPE             3580 ext/win32ole/win32ole.c     if(TYPE(typelib) == T_STRING) {
TYPE             6258 ext/win32ole/win32ole.c         else if (TYPE(ev) == T_STRING &&
TYPE             6259 ext/win32ole/win32ole.c                  TYPE(event_name) == T_STRING &&
TYPE             6342 ext/win32ole/win32ole.c     if (NIL_P(ary) || TYPE(ary) != T_ARRAY) {
TYPE             6698 ext/win32ole/win32ole.c     if(TYPE(itf) != T_NIL) {
TYPE             6778 ext/win32ole/win32ole.c     if (NIL_P(events) || TYPE(events) != T_ARRAY) {
TYPE             2844 ext/zlib/zlib.c     if (TYPE(str) != T_STRING) {
TYPE             2871 file.c         	if (TYPE(RARRAY(ary)->ptr[i]) == T_STRING) {
TYPE             2878 file.c             if (!NIL_P(sep) && TYPE(sep) == T_STRING) {
TYPE             2885 file.c         	switch (TYPE(tmp)) {
TYPE             3145 file.c         	switch (TYPE(argv[i])) {
TYPE             1541 gc.c           		switch (TYPE(p)) {
TYPE             1573 gc.c           		switch (TYPE(p)) {
TYPE               53 hash.c             if (TYPE(a) == T_STRING && RBASIC(a)->klass == rb_cString &&
TYPE               54 hash.c         	TYPE(b) == T_STRING && RBASIC(b)->klass == rb_cString) {
TYPE               78 hash.c             switch (TYPE(a)) {
TYPE              303 hash.c             if (argc == 1 && TYPE(argv[0]) == T_HASH) {
TYPE              837 hash.c             if (TYPE(key) != T_STRING || st_lookup(RHASH(hash)->tbl, key, 0)) {
TYPE             1347 hash.c             if (TYPE(hash2) != T_HASH) {
TYPE             2107 hash.c             if (TYPE(value) != T_STRING) return Qfalse;
TYPE              719 io.c               if (TYPE(io) != T_FILE) {
TYPE              866 io.c               if (fptr->fd == 0 && (fptr->mode & FMODE_TTY) && TYPE(rb_stdout) == T_FILE) {
TYPE             2093 io.c               if (TYPE(io) == T_FILE) {
TYPE             2277 io.c               if (TYPE(str) != T_STRING)
TYPE             3503 io.c               if (TYPE(argv[0]) == T_STRING) {
TYPE             3552 io.c           	switch (TYPE(argv[i])) {
TYPE             3755 io.c               if (TYPE(rb_stdout) == T_FILE) {
TYPE             4061 io.c             if (TYPE(current_file) != T_FILE)\
TYPE             4072 io.c               if (TYPE(file) == T_FILE)
TYPE             4086 io.c               if (TYPE(rb_stdout) == T_FILE) {
TYPE             4124 io.c           		    if (TYPE(rb_stdout) == T_FILE && rb_stdout != orig_stdout) {
TYPE             4265 io.c               if (TYPE(current_file) != T_FILE) {
TYPE             4331 io.c               if (TYPE(rb_stdin) != T_FILE) {
TYPE             4649 io.c               if (TYPE(arg) == T_STRING && RSTRING(arg)->ptr[len] != 17) {
TYPE             5130 io.c               if (TYPE(current_file) != T_FILE) {
TYPE             5176 io.c               if (TYPE(current_file) != T_FILE) {
TYPE             5206 io.c               if (TYPE(current_file) != T_FILE) {
TYPE             5241 io.c               if (TYPE(current_file) != T_FILE) {
TYPE              107 marshal.c      		 (TYPE(klass) == T_CLASS ? "class" : "module"),
TYPE              472 marshal.c      	    if (TYPE(v) != T_STRING) {
TYPE              748 marshal.c          if (TYPE(arg->src) == T_STRING) {
TYPE              821 marshal.c          if (TYPE(arg->src) == T_STRING) {
TYPE              915 marshal.c          if (TYPE(v) != T_CLASS) {
TYPE              926 marshal.c          if (TYPE(v) != T_MODULE) {
TYPE              980 marshal.c      	    if (rb_special_const_p(v) || TYPE(v) == T_OBJECT || TYPE(v) == T_CLASS) {
TYPE              984 marshal.c      	    if (TYPE(v) == T_MODULE || !RTEST(rb_class_inherited_p(c, RBASIC(v)->klass))) {
TYPE              987 marshal.c      		if (TYPE(v) != TYPE(tmp)) goto format_error;
TYPE             1204 marshal.c      	    if (TYPE(v) != T_OBJECT) {
TYPE             1226 marshal.c                 if (TYPE(v) != T_DATA) {
TYPE              135 numeric.c          if (TYPE(ary) != T_ARRAY || RARRAY(ary)->len != 2) {
TYPE              544 numeric.c          switch (TYPE(y)) {
TYPE              567 numeric.c          switch (TYPE(y)) {
TYPE              590 numeric.c          switch (TYPE(y)) {
TYPE              616 numeric.c          switch (TYPE(y)) {
TYPE              672 numeric.c          switch (TYPE(y)) {
TYPE              702 numeric.c          switch (TYPE(y)) {
TYPE              732 numeric.c          switch (TYPE(y)) {
TYPE              759 numeric.c          if (TYPE(x) != TYPE(y)) return Qfalse;
TYPE              803 numeric.c          switch (TYPE(y)) {
TYPE              871 numeric.c          switch (TYPE(y)) {
TYPE              903 numeric.c          switch (TYPE(y)) {
TYPE              938 numeric.c          switch (TYPE(y)) {
TYPE              972 numeric.c          switch (TYPE(y)) {
TYPE             1007 numeric.c          switch (TYPE(y)) {
TYPE             1042 numeric.c          if (TYPE(y) == T_FLOAT) {
TYPE             1421 numeric.c          else if (TYPE(from) == T_FLOAT || TYPE(to) == T_FLOAT || TYPE(step) == T_FLOAT) {
TYPE             1464 numeric.c          switch (TYPE(val)) {
TYPE             1491 numeric.c          if (TYPE(val) == T_BIGNUM) {
TYPE             1610 numeric.c          switch (TYPE(val)) {
TYPE             1646 numeric.c          if (TYPE(val) == T_BIGNUM) {
TYPE             1784 numeric.c          switch (TYPE(x)) {
TYPE             1806 numeric.c          switch (TYPE(x)) {
TYPE             1918 numeric.c          switch (TYPE(y)) {
TYPE             1954 numeric.c          switch (TYPE(y)) {
TYPE             1997 numeric.c          switch (TYPE(y)) {
TYPE             2052 numeric.c          switch (TYPE(y)) {
TYPE             2071 numeric.c          switch (TYPE(y)) {
TYPE             2134 numeric.c          switch (TYPE(y)) {
TYPE             2166 numeric.c          switch (TYPE(y)) {
TYPE             2212 numeric.c          switch (TYPE(y)) {
TYPE             2240 numeric.c          switch (TYPE(y)) {
TYPE             2269 numeric.c          switch (TYPE(y)) {
TYPE             2296 numeric.c          switch (TYPE(y)) {
TYPE             2323 numeric.c          switch (TYPE(y)) {
TYPE             2350 numeric.c          switch (TYPE(y)) {
TYPE             2377 numeric.c          switch (TYPE(y)) {
TYPE             2415 numeric.c          if (TYPE(y) == T_BIGNUM) {
TYPE             2434 numeric.c          if (TYPE(y) == T_BIGNUM) {
TYPE             2453 numeric.c          if (TYPE(y) == T_BIGNUM) {
TYPE             2533 numeric.c          if (TYPE(idx) == T_BIGNUM) {
TYPE              140 object.c           while (FL_TEST(cl, FL_SINGLETON) || TYPE(cl) == T_ICLASS) {
TYPE              176 object.c           switch (TYPE(obj)) {
TYPE              270 object.c           if (TYPE(obj) != TYPE(orig) || rb_obj_class(obj) != rb_obj_class(orig)) {
TYPE              362 object.c           if (TYPE(obj) == T_OBJECT
TYPE              387 object.c           switch (TYPE(c)) {
TYPE              432 object.c           switch (TYPE(c)) {
TYPE              764 object.c           switch (TYPE(y)) {
TYPE             1143 object.c       	switch (TYPE(v)) {
TYPE             1206 object.c           switch (TYPE(arg)) {
TYPE             1261 object.c           switch (TYPE(arg)) {
TYPE             1307 object.c           switch (TYPE(arg)) {
TYPE             1480 object.c           while (TYPE(super) == T_ICLASS) {
TYPE             1507 object.c           switch (TYPE(name)) {
TYPE             1942 object.c           if (TYPE(val) == type) return val;
TYPE             1944 object.c           if (TYPE(v) != type) {
TYPE             1958 object.c           if (TYPE(val) == type && type != T_DATA) return val;
TYPE             1961 object.c           if (TYPE(v) != type) {
TYPE             2003 object.c           switch (TYPE(val)) {
TYPE             2145 object.c           switch (TYPE(val)) {
TYPE             2194 object.c           switch (TYPE(val)) {
TYPE              341 pack.c             if (TYPE(x) == T_BIGNUM) {
TYPE              949 pack.c         		if (TYPE(from) == T_BIGNUM) {
TYPE              951 pack.c         		    while (TYPE(from) == T_BIGNUM) {
TYPE             1876 pack.c         			if (TYPE(*p) == T_STRING && RSTRING(*p)->ptr == t) {
TYPE             1918 pack.c         			    if (TYPE(*p) == T_STRING && RSTRING(*p)->ptr == t) {
TYPE             4563 parse.y        	if (TYPE(hash) == T_HASH) {
TYPE             7142 parse.y        	    if (TYPE(node1->nd_lit) == T_REGEXP) {
TYPE             7155 parse.y        	    if (TYPE(node2->nd_lit) == T_REGEXP) {
TYPE             7755 parse.y        	if (TYPE(node->nd_lit) == T_REGEXP) {
TYPE             7859 parse.y            switch (TYPE(node->nd_lit)) {
TYPE             8851 parse.y            switch (TYPE(x)) {
TYPE              105 prec.c             switch (TYPE(include)) {
TYPE              203 random.c           switch (TYPE(seed)) {
TYPE              443 random.c           switch (TYPE(vmax)) {
TYPE              475 random.c       	if (TYPE(vmax) == T_BIGNUM) goto bignum;
TYPE              392 range.c            else if (TYPE(beg) == T_STRING) {
TYPE             1453 re.c               if (TYPE(re2) != T_REGEXP) return Qfalse;
TYPE             1526 re.c               if (TYPE(str) != T_STRING) {
TYPE             1559 re.c               if (TYPE(line) != T_STRING) {
TYPE             1652 re.c               if (TYPE(argv[0]) == T_REGEXP) {
TYPE              306 ruby.h         #define NUM2CHR(x) (((TYPE(x) == T_STRING)&&(RSTRING(x)->len>=1))?\
TYPE              234 signal.c           switch (TYPE(argv[0])) {
TYPE              612 signal.c           switch (TYPE(arg->sig)) {
TYPE              497 sprintf.c      		switch (TYPE(val)) {
TYPE              263 string.c           if (TYPE(obj) == T_STRING) {
TYPE              267 string.c           if (TYPE(str) != T_STRING)
TYPE              412 string.c           if (TYPE(arg) == T_ARRAY) {
TYPE              487 string.c           if (TYPE(s) != T_STRING) {
TYPE              850 string.c           if (TYPE(str2) != T_STRING) {
TYPE              873 string.c           if (TYPE(str2) != T_STRING || RSTRING(str1)->len != RSTRING(str2)->len)
TYPE              913 string.c           if (TYPE(str2) != T_STRING) {
TYPE             1019 string.c       	    if (TYPE(sub) == T_REGEXP) {
TYPE             1026 string.c           switch (TYPE(sub)) {
TYPE             1124 string.c       		if (TYPE(sub) == T_REGEXP) {
TYPE             1136 string.c           switch (TYPE(sub)) {
TYPE             1194 string.c           switch (TYPE(y)) {
TYPE             1412 string.c           switch (TYPE(indx)) {
TYPE             1508 string.c       	if (TYPE(argv[0]) == T_REGEXP) {
TYPE             1605 string.c           switch (TYPE(indx)) {
TYPE             1686 string.c       	if (TYPE(argv[0]) == T_REGEXP) {
TYPE             1781 string.c           switch (TYPE(pat)) {
TYPE             3238 string.c       	if (TYPE(spat) == T_STRING && RSTRING(spat)->len == 1) {
TYPE             4163 string.c           if (!NIL_P(val) && TYPE(val) != T_STRING) {
TYPE              559 struct.c           if (TYPE(idx) == T_STRING || TYPE(idx) == T_SYMBOL) {
TYPE              622 struct.c           if (TYPE(idx) == T_STRING || TYPE(idx) == T_SYMBOL) {
TYPE              730 struct.c           if (TYPE(s2) != T_STRUCT) return Qfalse;
TYPE              778 struct.c           if (TYPE(s2) != T_STRUCT) return Qfalse;
TYPE              166 time.c             switch (TYPE(time)) {
TYPE              216 time.c             if (TYPE(time) == T_DATA && RDATA(time)->dfree == time_free) {
TYPE              253 time.c             if (TYPE(time) == T_DATA && RDATA(time)->dfree == time_free) {
TYPE              271 time.c             if (TYPE(obj) == T_STRING) {
TYPE              905 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
TYPE              934 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
TYPE              998 time.c             if (TYPE(time) != T_DATA || RDATA(time)->dfree != time_free) {
TYPE             1271 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
TYPE             1298 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
TYPE               77 variable.c         switch (TYPE(value)) {
TYPE              154 variable.c     	if (TYPE(path) != T_STRING) {
TYPE              191 variable.c     	if (TYPE(klass) == T_MODULE) {
TYPE              249 variable.c     	switch (TYPE(c)) {
TYPE              919 variable.c         switch (TYPE(obj)) {
TYPE              955 variable.c         switch (TYPE(obj)) {
TYPE              972 variable.c         switch (TYPE(obj)) {
TYPE             1019 variable.c         switch (TYPE(obj)) {
TYPE             1076 variable.c         switch (TYPE(obj)) {


TYPE_ARRAY

TYPE_ARRAY        553 marshal.c      	    w_byte(TYPE_ARRAY, arg);
TYPE_ARRAY       1094 marshal.c            case TYPE_ARRAY:


TYPE_BIGNUM

TYPE_BIGNUM       512 marshal.c      	    w_byte(TYPE_BIGNUM, arg);
TYPE_BIGNUM      1037 marshal.c            case TYPE_BIGNUM:


TYPE_CLASS

TYPE_CLASS        491 marshal.c      	    w_byte(TYPE_CLASS, arg);
TYPE_CLASS       1248 marshal.c            case TYPE_CLASS:


TYPE_DATA

TYPE_DATA         610 marshal.c      		w_class(TYPE_DATA, obj, arg, Qtrue);
TYPE_DATA        1212 marshal.c            case TYPE_DATA:


TYPE_EXTENDED

TYPE_EXTENDED     354 marshal.c      	w_byte(TYPE_EXTENDED, arg);
TYPE_EXTENDED     957 marshal.c            case TYPE_EXTENDED:


TYPE_FALSE

TYPE_FALSE        436 marshal.c      	w_byte(TYPE_FALSE, arg);
TYPE_FALSE       1001 marshal.c            case TYPE_FALSE:


TYPE_FIXNUM

TYPE_FIXNUM       440 marshal.c      	w_byte(TYPE_FIXNUM, arg);
TYPE_FIXNUM       444 marshal.c      	    w_byte(TYPE_FIXNUM, arg);
TYPE_FIXNUM      1005 marshal.c            case TYPE_FIXNUM:


TYPE_FLOAT

TYPE_FLOAT        507 marshal.c      	    w_byte(TYPE_FLOAT, arg);
TYPE_FLOAT       1012 marshal.c            case TYPE_FLOAT:


TYPE_HASH

TYPE_HASH         569 marshal.c      		w_byte(TYPE_HASH, arg);
TYPE_HASH        1106 marshal.c            case TYPE_HASH:


TYPE_HASH_DEF

TYPE_HASH_DEF     576 marshal.c      		w_byte(TYPE_HASH_DEF, arg);
TYPE_HASH_DEF    1107 marshal.c            case TYPE_HASH_DEF:
TYPE_HASH_DEF    1118 marshal.c      	    if (type == TYPE_HASH_DEF) {


TYPE_IVAR

TYPE_IVAR         427 marshal.c      	w_byte(TYPE_IVAR, arg);
TYPE_IVAR         476 marshal.c      		w_byte(TYPE_IVAR, arg);
TYPE_IVAR         948 marshal.c            case TYPE_IVAR:


TYPE_LINK

TYPE_LINK         421 marshal.c      	w_byte(TYPE_LINK, arg);
TYPE_LINK         940 marshal.c            case TYPE_LINK:


TYPE_MODULE

TYPE_MODULE       499 marshal.c      	    w_byte(TYPE_MODULE, arg);
TYPE_MODULE      1257 marshal.c            case TYPE_MODULE:


TYPE_NIL

TYPE_NIL          430 marshal.c      	w_byte(TYPE_NIL, arg);
TYPE_NIL          993 marshal.c            case TYPE_NIL:


TYPE_OBJECT

TYPE_OBJECT       602 marshal.c      	    w_class(TYPE_OBJECT, obj, arg, Qtrue);
TYPE_OBJECT      1199 marshal.c            case TYPE_OBJECT:


TYPE_REGEXP

TYPE_REGEXP       546 marshal.c      	    w_byte(TYPE_REGEXP, arg);
TYPE_REGEXP      1086 marshal.c            case TYPE_REGEXP:


TYPE_STRING

TYPE_STRING       540 marshal.c      	    w_byte(TYPE_STRING, arg);
TYPE_STRING      1082 marshal.c            case TYPE_STRING:


TYPE_STRUCT

TYPE_STRUCT       586 marshal.c      	    w_class(TYPE_STRUCT, obj, arg, Qtrue);
TYPE_STRUCT      1124 marshal.c            case TYPE_STRUCT:


TYPE_SYMBOL

TYPE_SYMBOL       315 marshal.c      	w_byte(TYPE_SYMBOL, arg);
TYPE_SYMBOL      1266 marshal.c            case TYPE_SYMBOL:


TYPE_SYMLINK

TYPE_SYMLINK      311 marshal.c      	w_byte(TYPE_SYMLINK, arg);
TYPE_SYMLINK      869 marshal.c          if (r_byte(arg) == TYPE_SYMLINK) {
TYPE_SYMLINK     1270 marshal.c            case TYPE_SYMLINK:


TYPE_TRUE

TYPE_TRUE         433 marshal.c      	w_byte(TYPE_TRUE, arg);
TYPE_TRUE         997 marshal.c            case TYPE_TRUE:


TYPE_UCLASS

TYPE_UCLASS       380 marshal.c      	w_byte(TYPE_UCLASS, arg);
TYPE_UCLASS       972 marshal.c            case TYPE_UCLASS:


TYPE_USERDEF

TYPE_USERDEF      478 marshal.c      	    w_class(TYPE_USERDEF, obj, arg, Qfalse);
TYPE_USERDEF     1158 marshal.c            case TYPE_USERDEF:


TYPE_USRMARSHAL

TYPE_USRMARSHAL   463 marshal.c      	    w_class(TYPE_USRMARSHAL, obj, arg, Qfalse);
TYPE_USRMARSHAL  1177 marshal.c            case TYPE_USRMARSHAL:


T_ARRAY

T_ARRAY            95 array.c            OBJSETUP(ary, klass, T_ARRAY);
T_ARRAY           209 array.c        	OBJSETUP(shared, rb_cArray, T_ARRAY);
T_ARRAY           258 array.c            return rb_convert_type(ary, T_ARRAY, "Array", "to_ary");
T_ARRAY           264 array.c            return rb_convert_type(ary, T_ARRAY, "Array", "to_a");
T_ARRAY           270 array.c            return rb_check_convert_type(ary, T_ARRAY, "Array", "to_ary");
T_ARRAY           959 array.c            if (TYPE(obj) == T_ARRAY) {
T_ARRAY          1281 array.c        	  case T_ARRAY:
T_ARRAY          2285 array.c        	if (TYPE(v) == T_ARRAY &&
T_ARRAY          2315 array.c        	if (TYPE(v) == T_ARRAY &&
T_ARRAY          2343 array.c            if (TYPE(ary2) != T_ARRAY) {
T_ARRAY          2371 array.c            if (TYPE(ary2) != T_ARRAY) return Qfalse;
T_ARRAY           521 enum.c             if (TYPE(obj) == T_ARRAY) {
T_ARRAY          1054 enum.c         	argv[i] = rb_convert_type(argv[i], T_ARRAY, "Array", "to_a");
T_ARRAY            29 enumerator.c       if (TYPE(args) != T_ARRAY) {
T_ARRAY           182 error.c            {T_ARRAY,	"Array"},
T_ARRAY           443 error.c        	if (t != T_ARRAY) {
T_ARRAY          2136 eval.c         	if (TYPE(args) != T_ARRAY)\
T_ARRAY          2842 eval.c         		    if (TYPE(v) != T_ARRAY) v = rb_ary_to_ary(v);
T_ARRAY          2883 eval.c         			if (TYPE(v) != T_ARRAY) v = rb_ary_to_ary(v);
T_ARRAY          3322 eval.c                             if (TYPE(RBASIC(ruby_scope)->klass) != T_ARRAY ||
T_ARRAY          4707 eval.c         		if (TYPE(val) == T_ARRAY && RARRAY(val)->len != 0) {
T_ARRAY          4930 eval.c             if (TYPE(values) == T_ARRAY) {
T_ARRAY          6205 eval.c         		if (!NIL_P(errat) && TYPE(errat) == T_ARRAY) {
T_ARRAY          10940 eval.c         	if (TYPE(oldbt) == T_ARRAY && RARRAY(oldbt)->len > 0) {
T_ARRAY          13031 eval.c         	if (NIL_P(list) || TYPE(list) != T_ARRAY) return Qfalse;
T_ARRAY          13051 eval.c             if (NIL_P(list) || TYPE(list) != T_ARRAY) {
T_ARRAY          13072 eval.c             if (NIL_P(list) || TYPE(list) != T_ARRAY) {
T_ARRAY            74 ext/Win32API/Win32API.c     case T_ARRAY:
T_ARRAY           444 ext/dbm/dbm.c      Check_Type(pair, T_ARRAY);
T_ARRAY           255 ext/dl/cfunc.c     Check_Type(ary, T_ARRAY);
T_ARRAY           546 ext/gdbm/gdbm.c     Check_Type(pair, T_ARRAY);
T_ARRAY           352 ext/iconv/iconv.c 	    if (TYPE(rescue) == T_ARRAY) {
T_ARRAY           436 ext/iconv/iconv.c 	    if (TYPE(rescue) == T_ARRAY) {
T_ARRAY            58 ext/openssl/ossl.c     Check_Type(ary, T_ARRAY);
T_ARRAY           237 ext/openssl/ossl_config.c     Check_Type(i, T_ARRAY);
T_ARRAY           463 ext/openssl/ossl_ocsp.c 	Check_Type(ext, T_ARRAY);
T_ARRAY           188 ext/openssl/ossl_ssl.c     Check_Type(ary, T_ARRAY);
T_ARRAY           351 ext/openssl/ossl_ssl.c 	if(TYPE(val) == T_ARRAY){
T_ARRAY           460 ext/openssl/ossl_ssl.c     else if (TYPE(v) == T_ARRAY) {
T_ARRAY           464 ext/openssl/ossl_ssl.c             if (TYPE(elem) == T_ARRAY) elem = rb_ary_entry(elem, 0);
T_ARRAY           558 ext/openssl/ossl_x509cert.c     Check_Type(ary, T_ARRAY);
T_ARRAY           288 ext/openssl/ossl_x509crl.c     Check_Type(ary, T_ARRAY);
T_ARRAY           462 ext/openssl/ossl_x509crl.c     Check_Type(ary, T_ARRAY);
T_ARRAY           101 ext/openssl/ossl_x509name.c     Check_Type(i, T_ARRAY);
T_ARRAY           405 ext/openssl/ossl_x509req.c     Check_Type(ary, T_ARRAY);
T_ARRAY           177 ext/openssl/ossl_x509revoked.c     Check_Type(ary, T_ARRAY);
T_ARRAY           310 ext/racc/cparse/cparse.c     Check_Type(a, T_ARRAY);
T_ARRAY           343 ext/racc/cparse/cparse.c     Check_Type(arg, T_ARRAY);
T_ARRAY           395 ext/racc/cparse/cparse.c     if (TYPE(block_args) != T_ARRAY) {
T_ARRAY           178 ext/readline/readline.c     if (TYPE(ary) != T_ARRAY)
T_ARRAY           422 ext/sdbm/init.c     Check_Type(pair, T_ARRAY);
T_ARRAY          2188 ext/tk/tcltklib.c     case T_ARRAY:
T_ARRAY           279 ext/tk/tkutil/tkutil.c         case T_ARRAY:
T_ARRAY           309 ext/tk/tkutil/tkutil.c                 case T_ARRAY:
T_ARRAY           424 ext/tk/tkutil/tkutil.c         case T_ARRAY:
T_ARRAY           505 ext/tk/tkutil/tkutil.c         if (TYPE(pair) != T_ARRAY) {
T_ARRAY           556 ext/tk/tkutil/tkutil.c         if (TYPE(pair) != T_ARRAY) {
T_ARRAY           735 ext/tk/tkutil/tkutil.c     case T_ARRAY:
T_ARRAY           810 ext/tk/tkutil/tkutil.c     case T_ARRAY:
T_ARRAY          1377 ext/tk/tkutil/tkutil.c         if (TYPE(inf) != T_ARRAY) continue;
T_ARRAY          1404 ext/tk/tkutil/tkutil.c         if (TYPE(inf) != T_ARRAY) continue;
T_ARRAY           711 ext/win32ole/win32ole.c     while(TYPE(obj) == T_ARRAY) {
T_ARRAY           765 ext/win32ole/win32ole.c     case T_ARRAY:
T_ARRAY           777 ext/win32ole/win32ole.c         while(TYPE(val1) == T_ARRAY) {
T_ARRAY           793 ext/win32ole/win32ole.c         while(TYPE(val1) == T_ARRAY) {
T_ARRAY          2145 ext/win32ole/win32ole.c     Check_Type(argv, T_ARRAY);
T_ARRAY          2406 ext/win32ole/win32ole.c     Check_Type(args, T_ARRAY);
T_ARRAY          2407 ext/win32ole/win32ole.c     Check_Type(types, T_ARRAY);
T_ARRAY          2443 ext/win32ole/win32ole.c                 Check_Type(param, T_ARRAY);
T_ARRAY          6342 ext/win32ole/win32ole.c     if (NIL_P(ary) || TYPE(ary) != T_ARRAY) {
T_ARRAY          6778 ext/win32ole/win32ole.c     if (NIL_P(events) || TYPE(events) != T_ARRAY) {
T_ARRAY          2888 file.c         	  case T_ARRAY:
T_ARRAY          4125 file.c             Check_Type(rb_load_path, T_ARRAY);
T_ARRAY          4185 file.c         	Check_Type(rb_load_path, T_ARRAY);
T_ARRAY           885 gc.c                 case T_ARRAY:
T_ARRAY          1130 gc.c                 case T_ARRAY:
T_ARRAY          4408 io.c           	Check_Type(read, T_ARRAY);
T_ARRAY          4428 io.c           	Check_Type(write, T_ARRAY);
T_ARRAY          4440 io.c           	Check_Type(except, T_ARRAY);
T_ARRAY           551 marshal.c      	  case T_ARRAY:
T_ARRAY           135 numeric.c          if (TYPE(ary) != T_ARRAY || RARRAY(ary)->len != 2) {
T_ARRAY           770 object.c             case T_ARRAY:
T_ARRAY          2255 object.c       	return rb_convert_type(val, T_ARRAY, "Array", "to_a");
T_ARRAY          8854 parse.y              case T_ARRAY:
T_ARRAY          2631 process.c          Check_Type(ary, T_ARRAY);
T_ARRAY           412 string.c           if (TYPE(arg) == T_ARRAY) {


T_BIGNUM

T_BIGNUM           45 bignum.c           OBJSETUP(big, klass, T_BIGNUM);
T_BIGNUM          887 bignum.c             case T_BIGNUM:
T_BIGNUM          929 bignum.c             case T_BIGNUM:
T_BIGNUM          963 bignum.c           if (TYPE(y) != T_BIGNUM) return Qfalse;
T_BIGNUM         1121 bignum.c             case T_BIGNUM:
T_BIGNUM         1146 bignum.c             case T_BIGNUM:
T_BIGNUM         1170 bignum.c             case T_BIGNUM:
T_BIGNUM         1376 bignum.c             case T_BIGNUM:
T_BIGNUM         1409 bignum.c             case T_BIGNUM:
T_BIGNUM         1439 bignum.c             case T_BIGNUM:
T_BIGNUM         1467 bignum.c             case T_BIGNUM:
T_BIGNUM         1501 bignum.c             case T_BIGNUM:
T_BIGNUM         1540 bignum.c             case T_BIGNUM:
T_BIGNUM         1854 bignum.c           if (TYPE(y) == T_BIGNUM) {
T_BIGNUM         1908 bignum.c           else if (TYPE(y) == T_BIGNUM) {
T_BIGNUM           26 compar.c           if (TYPE(val) == T_BIGNUM) {
T_BIGNUM          186 error.c            {T_BIGNUM,	"Bignum"},
T_BIGNUM          116 ext/bigdecimal/bigdecimal.c     case T_BIGNUM:
T_BIGNUM           66 ext/openssl/ossl_bn.c     case T_BIGNUM:
T_BIGNUM          224 ext/openssl/ossl_bn.c     case T_BIGNUM:
T_BIGNUM         1129 ext/tk/tcltklib.c     case T_BIGNUM:
T_BIGNUM          777 ext/tk/tkutil/tkutil.c     case T_BIGNUM:
T_BIGNUM          831 ext/win32ole/win32ole.c     case T_BIGNUM:
T_BIGNUM          912 ext/win32ole/win32ole.c     case T_BIGNUM:
T_BIGNUM          924 gc.c                 case T_BIGNUM:
T_BIGNUM         1178 gc.c                 case T_BIGNUM:
T_BIGNUM          511 marshal.c      	  case T_BIGNUM:
T_BIGNUM         1044 marshal.c      	    OBJSETUP(big, rb_cBignum, T_BIGNUM);
T_BIGNUM          547 numeric.c            case T_BIGNUM:
T_BIGNUM          570 numeric.c            case T_BIGNUM:
T_BIGNUM          593 numeric.c            case T_BIGNUM:
T_BIGNUM          620 numeric.c            case T_BIGNUM:
T_BIGNUM          676 numeric.c            case T_BIGNUM:
T_BIGNUM          706 numeric.c            case T_BIGNUM:
T_BIGNUM          735 numeric.c            case T_BIGNUM:
T_BIGNUM          807 numeric.c            case T_BIGNUM:
T_BIGNUM          876 numeric.c            case T_BIGNUM:
T_BIGNUM          908 numeric.c            case T_BIGNUM:
T_BIGNUM          943 numeric.c            case T_BIGNUM:
T_BIGNUM          977 numeric.c            case T_BIGNUM:
T_BIGNUM         1012 numeric.c            case T_BIGNUM:
T_BIGNUM         1479 numeric.c            case T_BIGNUM:
T_BIGNUM         1491 numeric.c          if (TYPE(val) == T_BIGNUM) {
T_BIGNUM         1625 numeric.c          case T_BIGNUM:
T_BIGNUM         1646 numeric.c          if (TYPE(val) == T_BIGNUM) {
T_BIGNUM         1786 numeric.c          case T_BIGNUM:
T_BIGNUM         1808 numeric.c          case T_BIGNUM:
T_BIGNUM         1919 numeric.c            case T_BIGNUM:
T_BIGNUM         1955 numeric.c            case T_BIGNUM:
T_BIGNUM         1998 numeric.c            case T_BIGNUM:
T_BIGNUM         2053 numeric.c            case T_BIGNUM:
T_BIGNUM         2072 numeric.c            case T_BIGNUM:
T_BIGNUM         2135 numeric.c            case T_BIGNUM:
T_BIGNUM         2167 numeric.c            case T_BIGNUM:
T_BIGNUM         2213 numeric.c            case T_BIGNUM:
T_BIGNUM         2241 numeric.c            case T_BIGNUM:
T_BIGNUM         2270 numeric.c            case T_BIGNUM:
T_BIGNUM         2297 numeric.c            case T_BIGNUM:
T_BIGNUM         2324 numeric.c            case T_BIGNUM:
T_BIGNUM         2351 numeric.c            case T_BIGNUM:
T_BIGNUM         2378 numeric.c            case T_BIGNUM:
T_BIGNUM         2415 numeric.c          if (TYPE(y) == T_BIGNUM) {
T_BIGNUM         2434 numeric.c          if (TYPE(y) == T_BIGNUM) {
T_BIGNUM         2453 numeric.c          if (TYPE(y) == T_BIGNUM) {
T_BIGNUM         2533 numeric.c          if (TYPE(idx) == T_BIGNUM) {
T_BIGNUM          768 object.c             case T_BIGNUM:
T_BIGNUM         2012 object.c             case T_BIGNUM:
T_BIGNUM         2152 object.c             case T_BIGNUM:
T_BIGNUM          341 pack.c             if (TYPE(x) == T_BIGNUM) {
T_BIGNUM          949 pack.c         		if (TYPE(from) == T_BIGNUM) {
T_BIGNUM          951 pack.c         		    while (TYPE(from) == T_BIGNUM) {
T_BIGNUM         7863 parse.y              case T_BIGNUM:
T_BIGNUM         8855 parse.y              case T_BIGNUM:
T_BIGNUM          207 random.c             case T_BIGNUM:
T_BIGNUM          265 random.c           OBJSETUP(big, rb_cBignum, T_BIGNUM);
T_BIGNUM          454 random.c             case T_BIGNUM:
T_BIGNUM          475 random.c       	if (TYPE(vmax) == T_BIGNUM) goto bignum;
T_BIGNUM          506 sprintf.c      		  case T_BIGNUM:
T_BIGNUM          189 time.c               case T_BIGNUM:


T_BLOCK

T_BLOCK           925 gc.c                 case T_BLOCK:
T_BLOCK          1175 gc.c                 case T_BLOCK:
T_BLOCK          1894 gc.c               if (!is_pointer_to_heap((void *)ptr)|| BUILTIN_TYPE(ptr) >= T_BLOCK) {


T_CLASS

T_CLASS            25 class.c            OBJSETUP(klass, rb_cClass, T_CLASS);
T_CLASS            39 class.c            if (TYPE(super) != T_CLASS) {
T_CLASS            51 class.c            Check_Type(super, T_CLASS);
T_CLASS           118 class.c        	if (BUILTIN_TYPE(obj) == T_CLASS) {
T_CLASS           154 class.c            if (BUILTIN_TYPE(obj) == T_CLASS && FL_TEST(obj, FL_SINGLETON)) {
T_CLASS           202 class.c        	if (TYPE(klass) != T_CLASS) {
T_CLASS           231 class.c        	if (TYPE(klass) != T_CLASS) {
T_CLASS           380 class.c        	      case T_CLASS:
T_CLASS           176 error.c            {T_CLASS,	"Class"},
T_CLASS           418 eval.c             Check_Type(klass, T_CLASS);
T_CLASS           425 eval.c             Check_Type(klass, T_CLASS);
T_CLASS          1900 eval.c         	      case T_CLASS:
T_CLASS          1934 eval.c         	      case T_CLASS:
T_CLASS          2318 eval.c         	  case T_CLASS:
T_CLASS          2658 eval.c         	  case T_CLASS:
T_CLASS          3555 eval.c         		  case T_CLASS:
T_CLASS          3846 eval.c         		if (TYPE(klass) != T_CLASS) {
T_CLASS          7239 eval.c               case T_CLASS:
T_CLASS          7243 eval.c         	Check_Type(dest, T_CLASS);
T_CLASS          1769 ext/win32ole/win32ole.c     if (TYPE(klass) != T_CLASS &&
T_CLASS           403 gc.c               if (klass) Check_Type(klass, T_CLASS);
T_CLASS           878 gc.c                 case T_CLASS:
T_CLASS          1118 gc.c                 case T_CLASS:
T_CLASS          1547 gc.c           		  case T_CLASS:
T_CLASS          1579 gc.c           		  case T_CLASS:
T_CLASS           107 marshal.c      		 (TYPE(klass) == T_CLASS ? "class" : "module"),
T_CLASS           487 marshal.c      	  case T_CLASS:
T_CLASS           915 marshal.c          if (TYPE(v) != T_CLASS) {
T_CLASS           980 marshal.c      	    if (rb_special_const_p(v) || TYPE(v) == T_OBJECT || TYPE(v) == T_CLASS) {
T_CLASS           178 object.c             case T_CLASS:
T_CLASS           389 object.c             case T_CLASS:
T_CLASS           434 object.c             case T_CLASS:
T_CLASS          1144 object.c       	  case T_CLASS: case T_MODULE:
T_CLASS          1208 object.c             case T_CLASS:
T_CLASS          1263 object.c             case T_CLASS:
T_CLASS          1309 object.c             case T_CLASS:
T_CLASS           106 prec.c               case T_CLASS:
T_CLASS           110 prec.c                Check_Type(include, T_CLASS);
T_CLASS            79 variable.c           case T_CLASS:
T_CLASS           251 variable.c     	  case T_CLASS:
T_CLASS           921 variable.c           case T_CLASS:
T_CLASS           957 variable.c           case T_CLASS:
T_CLASS           974 variable.c           case T_CLASS:
T_CLASS          1021 variable.c           case T_CLASS:
T_CLASS          1078 variable.c           case T_CLASS:


T_DATA

T_DATA           1631 dir.c              if (TYPE(dir) != T_DATA ||
T_DATA            191 error.c            {T_DATA,	"Data"},	/* internal use: wrapped C pointers */
T_DATA           2374 eval.c             if (TYPE(proc) == T_DATA && RDATA(proc)->dfree == (RUBY_DATA_FUNC)blk_free) {
T_DATA           8403 eval.c             if (TYPE(other) != T_DATA) return Qfalse;
T_DATA           8539 eval.c         	b = rb_check_convert_type(proc, T_DATA, "Proc", "to_proc");
T_DATA           8714 eval.c             if (TYPE(other) != T_DATA || RDATA(other)->dmark != (RUBY_DATA_FUNC)bm_mark)
T_DATA           9251 eval.c             if (TYPE(m) == T_DATA && RDATA(m)->dmark == (RUBY_DATA_FUNC)bm_mark) {
T_DATA           10069 eval.c             if (TYPE(data) != T_DATA || RDATA(data)->dmark != (RUBY_DATA_FUNC)thread_mark) {
T_DATA             97 ext/bigdecimal/bigdecimal.c     case T_DATA:
T_DATA            223 ext/iconv/iconv.c     Check_Type(obj, T_DATA);
T_DATA             77 ext/stringio/stringio.c     Check_Type(self, T_DATA);
T_DATA            497 ext/stringio/stringio.c     orig = rb_convert_type(orig, T_DATA, "StringIO", "to_strio");
T_DATA            212 ext/strscan/strscan.c     if (TYPE(obj) != T_DATA || RDATA(obj)->dmark != (RUBY_DATA_FUNC)strscan_mark) {
T_DATA           1742 ext/syck/rubyext.c     if ( TYPE( orig ) != T_DATA )
T_DATA            404 gc.c               OBJSETUP(data, klass, T_DATA);
T_DATA            913 gc.c                 case T_DATA:
T_DATA           1148 gc.c                 case T_DATA:
T_DATA           1836 gc.c           	    if (BUILTIN_TYPE(p) == T_DATA &&
T_DATA            606 marshal.c      	  case T_DATA:
T_DATA           1226 marshal.c                 if (TYPE(v) != T_DATA) {
T_DATA           1958 object.c           if (TYPE(val) == type && type != T_DATA) return val;
T_DATA            416 ruby.h             Check_Type(obj, T_DATA); \
T_DATA            216 time.c             if (TYPE(time) == T_DATA && RDATA(time)->dfree == time_free) {
T_DATA            253 time.c             if (TYPE(time) == T_DATA && RDATA(time)->dfree == time_free) {
T_DATA            905 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
T_DATA            934 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
T_DATA            998 time.c             if (TYPE(time) != T_DATA || RDATA(time)->dfree != time_free) {
T_DATA           1271 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
T_DATA           1298 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
T_DATA           1155 variable.c         Check_Type(av, T_DATA);


T_FALSE

T_FALSE           189 error.c            {T_FALSE,	"false"},
T_FALSE           697 error.c        	  case T_FALSE:
T_FALSE           361 ext/socket/socket.c       case T_FALSE:
T_FALSE          2185 ext/tk/tcltklib.c     case T_FALSE:
T_FALSE           255 ext/tk/tkutil/tkutil.c     } else if (TYPE(enc_flag) == T_TRUE || TYPE(enc_flag) == T_FALSE) {
T_FALSE           409 ext/tk/tkutil/tkutil.c     } else if (TYPE(enc_flag) == T_TRUE || TYPE(enc_flag) == T_FALSE) {
T_FALSE           813 ext/tk/tkutil/tkutil.c     case T_FALSE:
T_FALSE           954 ext/tk/tkutil/tkutil.c     if (TYPE(value) == T_TRUE || TYPE(value) == T_FALSE) {
T_FALSE           843 ext/win32ole/win32ole.c     case T_FALSE:
T_FALSE           922 ext/win32ole/win32ole.c     case T_FALSE:
T_FALSE          1102 gc.c                 case T_FALSE:
T_FALSE          1633 numeric.c          case T_FALSE:
T_FALSE           694 ruby.h         	if (obj == Qfalse) return T_FALSE;


T_FILE

T_FILE            187 error.c            {T_FILE,	"File"},
T_FILE             21 ext/openssl/ossl_bio.c     if (TYPE(obj) == T_FILE) {
T_FILE            520 ext/openssl/ossl_ssl.c     Check_Type(io, T_FILE);
T_FILE            104 ext/readline/readline.c     Check_Type(input, T_FILE);
T_FILE            117 ext/readline/readline.c     Check_Type(output, T_FILE);
T_FILE            628 file.c             tmp = rb_check_convert_type(file, T_FILE, "IO", "to_io");
T_FILE            646 file.c             tmp = rb_check_convert_type(*file, T_FILE, "IO", "to_io");
T_FILE           3150 file.c         	  case T_FILE:
T_FILE            921 gc.c                 case T_FILE:
T_FILE           1164 gc.c                 case T_FILE:
T_FILE           1847 gc.c           	    else if (BUILTIN_TYPE(p) == T_FILE) {
T_FILE            236 io.c               return rb_convert_type(io, T_FILE, "IO", "to_io");
T_FILE            242 io.c               return rb_check_convert_type(io, T_FILE, "IO", "to_io");
T_FILE            381 io.c               OBJSETUP(io, klass, T_FILE);
T_FILE            719 io.c               if (TYPE(io) != T_FILE) {
T_FILE            866 io.c               if (fptr->fd == 0 && (fptr->mode & FMODE_TTY) && TYPE(rb_stdout) == T_FILE) {
T_FILE           2093 io.c               if (TYPE(io) == T_FILE) {
T_FILE           3755 io.c               if (TYPE(rb_stdout) == T_FILE) {
T_FILE           4061 io.c             if (TYPE(current_file) != T_FILE)\
T_FILE           4072 io.c               if (TYPE(file) == T_FILE)
T_FILE           4086 io.c               if (TYPE(rb_stdout) == T_FILE) {
T_FILE           4124 io.c           		    if (TYPE(rb_stdout) == T_FILE && rb_stdout != orig_stdout) {
T_FILE           4265 io.c               if (TYPE(current_file) != T_FILE) {
T_FILE           4331 io.c               if (TYPE(rb_stdin) != T_FILE) {
T_FILE           5130 io.c               if (TYPE(current_file) != T_FILE) {
T_FILE           5176 io.c               if (TYPE(current_file) != T_FILE) {
T_FILE           5206 io.c               if (TYPE(current_file) != T_FILE) {
T_FILE           5241 io.c               if (TYPE(current_file) != T_FILE) {


T_FIXNUM

T_FIXNUM          883 bignum.c             case T_FIXNUM:
T_FIXNUM          926 bignum.c             case T_FIXNUM:
T_FIXNUM         1118 bignum.c             case T_FIXNUM:
T_FIXNUM         1143 bignum.c             case T_FIXNUM:
T_FIXNUM         1166 bignum.c             case T_FIXNUM:
T_FIXNUM         1372 bignum.c             case T_FIXNUM:
T_FIXNUM         1405 bignum.c             case T_FIXNUM:
T_FIXNUM         1435 bignum.c             case T_FIXNUM:
T_FIXNUM         1463 bignum.c             case T_FIXNUM:
T_FIXNUM         1497 bignum.c             case T_FIXNUM:
T_FIXNUM         1545 bignum.c             case T_FIXNUM:
T_FIXNUM          183 error.c            {T_FIXNUM,	"Fixnum"},
T_FIXNUM          105 ext/bigdecimal/bigdecimal.c     case T_FIXNUM:
T_FIXNUM          225 ext/bigdecimal/bigdecimal.c     Check_Type(which, T_FIXNUM);
T_FIXNUM          251 ext/bigdecimal/bigdecimal.c         Check_Type(val, T_FIXNUM);
T_FIXNUM          288 ext/bigdecimal/bigdecimal.c     Check_Type(v, T_FIXNUM);
T_FIXNUM          934 ext/bigdecimal/bigdecimal.c         Check_Type(vLoc, T_FIXNUM);
T_FIXNUM          938 ext/bigdecimal/bigdecimal.c         Check_Type(vLoc, T_FIXNUM);
T_FIXNUM          940 ext/bigdecimal/bigdecimal.c         Check_Type(vRound, T_FIXNUM);
T_FIXNUM          971 ext/bigdecimal/bigdecimal.c         Check_Type(vLoc, T_FIXNUM);
T_FIXNUM         1010 ext/bigdecimal/bigdecimal.c         Check_Type(vLoc, T_FIXNUM);
T_FIXNUM         1035 ext/bigdecimal/bigdecimal.c         Check_Type(vLoc, T_FIXNUM);
T_FIXNUM         1164 ext/bigdecimal/bigdecimal.c     Check_Type(p, T_FIXNUM);
T_FIXNUM         1228 ext/bigdecimal/bigdecimal.c         Check_Type(nFig, T_FIXNUM);
T_FIXNUM           65 ext/openssl/ossl_bn.c     case T_FIXNUM:
T_FIXNUM          223 ext/openssl/ossl_bn.c     case T_FIXNUM:
T_FIXNUM          358 ext/socket/socket.c       case T_FIXNUM:
T_FIXNUM         1128 ext/tk/tcltklib.c     case T_FIXNUM:
T_FIXNUM         2060 ext/tk/tcltklib.c         Check_Type(vflags, T_FIXNUM);
T_FIXNUM          776 ext/tk/tkutil/tkutil.c     case T_FIXNUM:
T_FIXNUM          946 ext/tk/tkutil/tkutil.c     if (TYPE(value) == T_FIXNUM) {
T_FIXNUM          827 ext/win32ole/win32ole.c     case T_FIXNUM:
T_FIXNUM          873 ext/win32ole/win32ole.c     case T_FIXNUM:
T_FIXNUM         1021 ext/zlib/zlib.c     Check_Type(size, T_FIXNUM);
T_FIXNUM         1114 ext/zlib/zlib.c     : ((void)Check_Type((val), T_FIXNUM), FIX2INT((val))))
T_FIXNUM          736 gc.c                 case T_FIXNUM:
T_FIXNUM         1100 gc.c                 case T_FIXNUM:
T_FIXNUM           79 hash.c               case T_FIXNUM:
T_FIXNUM         3993 io.c           	VALUE fd = rb_check_convert_type(argv[0], T_FIXNUM, "Fixnum", "to_int");
T_FIXNUM          545 numeric.c            case T_FIXNUM:
T_FIXNUM          568 numeric.c            case T_FIXNUM:
T_FIXNUM          591 numeric.c            case T_FIXNUM:
T_FIXNUM          617 numeric.c            case T_FIXNUM:
T_FIXNUM          673 numeric.c            case T_FIXNUM:
T_FIXNUM          703 numeric.c            case T_FIXNUM:
T_FIXNUM          733 numeric.c            case T_FIXNUM:
T_FIXNUM          804 numeric.c            case T_FIXNUM:
T_FIXNUM          872 numeric.c            case T_FIXNUM:
T_FIXNUM          904 numeric.c            case T_FIXNUM:
T_FIXNUM          939 numeric.c            case T_FIXNUM:
T_FIXNUM          973 numeric.c            case T_FIXNUM:
T_FIXNUM         1008 numeric.c            case T_FIXNUM:
T_FIXNUM         1785 numeric.c          case T_FIXNUM:
T_FIXNUM         1807 numeric.c          case T_FIXNUM:
T_FIXNUM          766 object.c             case T_FIXNUM:
T_FIXNUM         1510 object.c             case T_FIXNUM:
T_FIXNUM         2011 object.c             case T_FIXNUM:
T_FIXNUM         2146 object.c             case T_FIXNUM:
T_FIXNUM         7860 parse.y              case T_FIXNUM:
T_FIXNUM          204 random.c             case T_FIXNUM:
T_FIXNUM          476 random.c             case T_FIXNUM:
T_FIXNUM          687 ruby.h         	if (FIXNUM_P(obj)) return T_FIXNUM;
T_FIXNUM          235 signal.c             case T_FIXNUM:
T_FIXNUM          289 signal.c       	    Check_Type(argv[i], T_FIXNUM);
T_FIXNUM          613 signal.c             case T_FIXNUM:
T_FIXNUM          509 sprintf.c      		  case T_FIXNUM:
T_FIXNUM         1032 string.c             case T_FIXNUM:
T_FIXNUM         1150 string.c             case T_FIXNUM:
T_FIXNUM         1413 string.c             case T_FIXNUM:
T_FIXNUM         1606 string.c             case T_FIXNUM:
T_FIXNUM          167 time.c               case T_FIXNUM:


T_FLOAT

T_FLOAT           890 bignum.c             case T_FLOAT:
T_FLOAT           931 bignum.c             case T_FLOAT:
T_FLOAT          1124 bignum.c             case T_FLOAT:
T_FLOAT          1149 bignum.c             case T_FLOAT:
T_FLOAT          1173 bignum.c             case T_FLOAT:
T_FLOAT          1379 bignum.c             case T_FLOAT:
T_FLOAT          1505 bignum.c             case T_FLOAT:
T_FLOAT          1536 bignum.c             case T_FLOAT:
T_FLOAT           179 error.c            {T_FLOAT,	"Float"},
T_FLOAT           428 ext/bigdecimal/bigdecimal.c     if(TYPE(other) == T_FLOAT) {
T_FLOAT          1136 ext/tk/tcltklib.c     case T_FLOAT:
T_FLOAT           775 ext/tk/tkutil/tkutil.c     case T_FLOAT:
T_FLOAT           835 ext/win32ole/win32ole.c     case T_FLOAT:
T_FLOAT           894 ext/win32ole/win32ole.c     case T_FLOAT:
T_FLOAT           923 gc.c                 case T_FLOAT:
T_FLOAT          1173 gc.c                 case T_FLOAT:
T_FLOAT           506 marshal.c      	  case T_FLOAT:
T_FLOAT           465 numeric.c          OBJSETUP(flt, rb_cFloat, T_FLOAT);
T_FLOAT           549 numeric.c            case T_FLOAT:
T_FLOAT           572 numeric.c            case T_FLOAT:
T_FLOAT           595 numeric.c            case T_FLOAT:
T_FLOAT           623 numeric.c            case T_FLOAT:
T_FLOAT           679 numeric.c            case T_FLOAT:
T_FLOAT           709 numeric.c            case T_FLOAT:
T_FLOAT           737 numeric.c            case T_FLOAT:
T_FLOAT           810 numeric.c            case T_FLOAT:
T_FLOAT           880 numeric.c            case T_FLOAT:
T_FLOAT           912 numeric.c            case T_FLOAT:
T_FLOAT           947 numeric.c            case T_FLOAT:
T_FLOAT           981 numeric.c            case T_FLOAT:
T_FLOAT          1016 numeric.c            case T_FLOAT:
T_FLOAT          1042 numeric.c          if (TYPE(y) == T_FLOAT) {
T_FLOAT          1421 numeric.c          else if (TYPE(from) == T_FLOAT || TYPE(to) == T_FLOAT || TYPE(step) == T_FLOAT) {
T_FLOAT          1465 numeric.c            case T_FLOAT:
T_FLOAT          1611 numeric.c          case T_FLOAT:
T_FLOAT          1788 numeric.c          case T_FLOAT:
T_FLOAT          1810 numeric.c          case T_FLOAT:
T_FLOAT          1921 numeric.c            case T_FLOAT:
T_FLOAT          1958 numeric.c            case T_FLOAT:
T_FLOAT          2000 numeric.c            case T_FLOAT:
T_FLOAT          2055 numeric.c            case T_FLOAT:
T_FLOAT          2075 numeric.c            case T_FLOAT:
T_FLOAT          2138 numeric.c            case T_FLOAT:
T_FLOAT          2170 numeric.c            case T_FLOAT:
T_FLOAT          2216 numeric.c            case T_FLOAT:
T_FLOAT          2243 numeric.c            case T_FLOAT:
T_FLOAT          2272 numeric.c            case T_FLOAT:
T_FLOAT          2299 numeric.c            case T_FLOAT:
T_FLOAT          2326 numeric.c            case T_FLOAT:
T_FLOAT          2353 numeric.c            case T_FLOAT:
T_FLOAT          2380 numeric.c            case T_FLOAT:
T_FLOAT           767 object.c             case T_FLOAT:
T_FLOAT          2004 object.c             case T_FLOAT:
T_FLOAT          2149 object.c             case T_FLOAT:
T_FLOAT          2164 object.c       	  VALUE f = rb_convert_type(val, T_FLOAT, "Float", "to_f");
T_FLOAT          2195 object.c             case T_FLOAT:
T_FLOAT          7866 parse.y              case T_FLOAT:
T_FLOAT          8856 parse.y              case T_FLOAT:
T_FLOAT           444 random.c             case T_FLOAT:
T_FLOAT           498 sprintf.c      		  case T_FLOAT:
T_FLOAT           174 time.c               case T_FLOAT:


T_HASH

T_HASH            184 error.c            {T_HASH,	"Hash"},
T_HASH           13025 eval.c             if (NIL_P(hash) || TYPE(hash) != T_HASH) {
T_HASH           13043 eval.c             if (NIL_P(hash) || TYPE(hash) != T_HASH) {
T_HASH           13065 eval.c             if (NIL_P(hash) || TYPE(hash) != T_HASH) {
T_HASH            318 ext/racc/cparse/cparse.c     Check_Type(h, T_HASH);
T_HASH            322 ext/syck/rubyext.c     if ( !NIL_P(tmp = rb_check_convert_type(entry, T_HASH, "Hash", "to_hash")) )
T_HASH            558 ext/syck/rubyext.c                     if ( !NIL_P(tmp = rb_check_convert_type(v, T_HASH, "Hash", "to_hash")) )
T_HASH            568 ext/syck/rubyext.c                         VALUE tmph = rb_check_convert_type(end, T_HASH, "Hash", "to_hash");
T_HASH            787 ext/syck/rubyext.c         Check_Type(options, T_HASH);
T_HASH           1629 ext/syck/rubyext.c         VALUE hsh = rb_check_convert_type(val, T_HASH, "Hash", "to_hash");
T_HASH           1664 ext/syck/rubyext.c         VALUE hsh = rb_check_convert_type(val, T_HASH, "Hash", "to_hash");
T_HASH           1995 ext/syck/rubyext.c         Check_Type(options, T_HASH);
T_HASH            222 ext/tk/tkutil/tkutil.c     keys = rb_convert_type(keys, T_HASH, "Hash", "to_hash");
T_HASH            266 ext/tk/tkutil/tkutil.c         if (TYPE(RARRAY(ary)->ptr[idx]) == T_HASH) {
T_HASH            298 ext/tk/tkutil/tkutil.c         case T_HASH:
T_HASH            314 ext/tk/tkutil/tkutil.c                 case T_HASH:
T_HASH            428 ext/tk/tkutil/tkutil.c         case T_HASH:
T_HASH            742 ext/tk/tkutil/tkutil.c     case T_HASH:
T_HASH            803 ext/tk/tkutil/tkutil.c     case T_HASH:
T_HASH            910 ext/tk/tkutil/tkutil.c         if (TYPE(argv[idx]) == T_HASH) {
T_HASH            920 ext/tk/tkutil/tkutil.c         if (TYPE(argv[idx]) == T_HASH) {
T_HASH           1211 ext/tk/tkutil/tkutil.c     if (TYPE(tbl) != T_HASH) {
T_HASH           2213 ext/win32ole/win32ole.c     if(TYPE(param) == T_HASH) {
T_HASH            900 gc.c                 case T_HASH:
T_HASH           1135 gc.c                 case T_HASH:
T_HASH            205 hash.c             OBJSETUP(hash, klass, T_HASH);
T_HASH            303 hash.c             if (argc == 1 && TYPE(argv[0]) == T_HASH) {
T_HASH            327 hash.c             return rb_convert_type(hash, T_HASH, "Hash", "to_hash");
T_HASH           1347 hash.c             if (TYPE(hash2) != T_HASH) {
T_HASH            566 marshal.c      	  case T_HASH:
T_HASH           4563 parse.y        	if (TYPE(hash) == T_HASH) {


T_ICLASS

T_ICLASS          321 class.c            OBJSETUP(klass, rb_cClass, T_ICLASS);
T_ICLASS          323 class.c            if (BUILTIN_TYPE(module) == T_ICLASS) {
T_ICLASS          332 class.c            if (TYPE(module) == T_ICLASS) {
T_ICLASS          372 class.c        	      case T_ICLASS:
T_ICLASS          418 class.c        	if (BUILTIN_TYPE(p) == T_ICLASS) {
T_ICLASS          451 class.c        	if (BUILTIN_TYPE(p) == T_ICLASS) {
T_ICLASS          482 class.c        	if (BUILTIN_TYPE(p) == T_ICLASS) {
T_ICLASS          572 class.c        	if (BUILTIN_TYPE(mod) == T_ICLASS) continue;
T_ICLASS          718 class.c        	while (klass && (FL_TEST(klass, FL_SINGLETON) || TYPE(klass) == T_ICLASS)) {
T_ICLASS          177 error.c            {T_ICLASS,	"iClass"},	/* internal use: mixed-in module holder */
T_ICLASS          902 error.c        	while (TYPE(klass) == T_ICLASS || FL_TEST(klass, FL_SINGLETON)) {
T_ICLASS         1898 eval.c         	      case T_ICLASS:
T_ICLASS         2539 eval.c         	if (TYPE(klass) == T_ICLASS) {
T_ICLASS         5806 eval.c         	    if (TYPE(defined_class) == T_ICLASS) {
T_ICLASS         6147 eval.c             if (TYPE(ruby_class) == T_ICLASS) {
T_ICLASS         8658 eval.c         	   (FL_TEST(rklass, FL_SINGLETON) || TYPE(rklass) == T_ICLASS)) {
T_ICLASS         8661 eval.c             if (TYPE(klass) == T_ICLASS) klass = RBASIC(klass)->klass;
T_ICLASS          877 gc.c                 case T_ICLASS:
T_ICLASS         1169 gc.c                 case T_ICLASS:
T_ICLASS         1542 gc.c           		  case T_ICLASS:
T_ICLASS         1574 gc.c           		  case T_ICLASS:
T_ICLASS          352 marshal.c          while (BUILTIN_TYPE(klass) == T_ICLASS) {
T_ICLASS          140 object.c           while (FL_TEST(cl, FL_SINGLETON) || TYPE(cl) == T_ICLASS) {
T_ICLASS          390 object.c             case T_ICLASS:
T_ICLASS          435 object.c             case T_ICLASS:
T_ICLASS         1480 object.c           while (TYPE(super) == T_ICLASS) {


T_MASK

T_MASK            120 ext/digest/md5/md5.c #ifdef T_MASK
T_MASK            124 ext/digest/md5/md5.c #define T1 /* 0xd76aa478 */ (T_MASK ^ 0x28955b87)
T_MASK            125 ext/digest/md5/md5.c #define T2 /* 0xe8c7b756 */ (T_MASK ^ 0x173848a9)
T_MASK            127 ext/digest/md5/md5.c #define T4 /* 0xc1bdceee */ (T_MASK ^ 0x3e423111)
T_MASK            128 ext/digest/md5/md5.c #define T5 /* 0xf57c0faf */ (T_MASK ^ 0x0a83f050)
T_MASK            130 ext/digest/md5/md5.c #define T7 /* 0xa8304613 */ (T_MASK ^ 0x57cfb9ec)
T_MASK            131 ext/digest/md5/md5.c #define T8 /* 0xfd469501 */ (T_MASK ^ 0x02b96afe)
T_MASK            133 ext/digest/md5/md5.c #define T10 /* 0x8b44f7af */ (T_MASK ^ 0x74bb0850)
T_MASK            134 ext/digest/md5/md5.c #define T11 /* 0xffff5bb1 */ (T_MASK ^ 0x0000a44e)
T_MASK            135 ext/digest/md5/md5.c #define T12 /* 0x895cd7be */ (T_MASK ^ 0x76a32841)
T_MASK            137 ext/digest/md5/md5.c #define T14 /* 0xfd987193 */ (T_MASK ^ 0x02678e6c)
T_MASK            138 ext/digest/md5/md5.c #define T15 /* 0xa679438e */ (T_MASK ^ 0x5986bc71)
T_MASK            140 ext/digest/md5/md5.c #define T17 /* 0xf61e2562 */ (T_MASK ^ 0x09e1da9d)
T_MASK            141 ext/digest/md5/md5.c #define T18 /* 0xc040b340 */ (T_MASK ^ 0x3fbf4cbf)
T_MASK            143 ext/digest/md5/md5.c #define T20 /* 0xe9b6c7aa */ (T_MASK ^ 0x16493855)
T_MASK            144 ext/digest/md5/md5.c #define T21 /* 0xd62f105d */ (T_MASK ^ 0x29d0efa2)
T_MASK            146 ext/digest/md5/md5.c #define T23 /* 0xd8a1e681 */ (T_MASK ^ 0x275e197e)
T_MASK            147 ext/digest/md5/md5.c #define T24 /* 0xe7d3fbc8 */ (T_MASK ^ 0x182c0437)
T_MASK            149 ext/digest/md5/md5.c #define T26 /* 0xc33707d6 */ (T_MASK ^ 0x3cc8f829)
T_MASK            150 ext/digest/md5/md5.c #define T27 /* 0xf4d50d87 */ (T_MASK ^ 0x0b2af278)
T_MASK            152 ext/digest/md5/md5.c #define T29 /* 0xa9e3e905 */ (T_MASK ^ 0x561c16fa)
T_MASK            153 ext/digest/md5/md5.c #define T30 /* 0xfcefa3f8 */ (T_MASK ^ 0x03105c07)
T_MASK            155 ext/digest/md5/md5.c #define T32 /* 0x8d2a4c8a */ (T_MASK ^ 0x72d5b375)
T_MASK            156 ext/digest/md5/md5.c #define T33 /* 0xfffa3942 */ (T_MASK ^ 0x0005c6bd)
T_MASK            157 ext/digest/md5/md5.c #define T34 /* 0x8771f681 */ (T_MASK ^ 0x788e097e)
T_MASK            159 ext/digest/md5/md5.c #define T36 /* 0xfde5380c */ (T_MASK ^ 0x021ac7f3)
T_MASK            160 ext/digest/md5/md5.c #define T37 /* 0xa4beea44 */ (T_MASK ^ 0x5b4115bb)
T_MASK            162 ext/digest/md5/md5.c #define T39 /* 0xf6bb4b60 */ (T_MASK ^ 0x0944b49f)
T_MASK            163 ext/digest/md5/md5.c #define T40 /* 0xbebfbc70 */ (T_MASK ^ 0x4140438f)
T_MASK            165 ext/digest/md5/md5.c #define T42 /* 0xeaa127fa */ (T_MASK ^ 0x155ed805)
T_MASK            166 ext/digest/md5/md5.c #define T43 /* 0xd4ef3085 */ (T_MASK ^ 0x2b10cf7a)
T_MASK            168 ext/digest/md5/md5.c #define T45 /* 0xd9d4d039 */ (T_MASK ^ 0x262b2fc6)
T_MASK            169 ext/digest/md5/md5.c #define T46 /* 0xe6db99e5 */ (T_MASK ^ 0x1924661a)
T_MASK            171 ext/digest/md5/md5.c #define T48 /* 0xc4ac5665 */ (T_MASK ^ 0x3b53a99a)
T_MASK            172 ext/digest/md5/md5.c #define T49 /* 0xf4292244 */ (T_MASK ^ 0x0bd6ddbb)
T_MASK            174 ext/digest/md5/md5.c #define T51 /* 0xab9423a7 */ (T_MASK ^ 0x546bdc58)
T_MASK            175 ext/digest/md5/md5.c #define T52 /* 0xfc93a039 */ (T_MASK ^ 0x036c5fc6)
T_MASK            177 ext/digest/md5/md5.c #define T54 /* 0x8f0ccc92 */ (T_MASK ^ 0x70f3336d)
T_MASK            178 ext/digest/md5/md5.c #define T55 /* 0xffeff47d */ (T_MASK ^ 0x00100b82)
T_MASK            179 ext/digest/md5/md5.c #define T56 /* 0x85845dd1 */ (T_MASK ^ 0x7a7ba22e)
T_MASK            181 ext/digest/md5/md5.c #define T58 /* 0xfe2ce6e0 */ (T_MASK ^ 0x01d3191f)
T_MASK            182 ext/digest/md5/md5.c #define T59 /* 0xa3014314 */ (T_MASK ^ 0x5cfebceb)
T_MASK            184 ext/digest/md5/md5.c #define T61 /* 0xf7537e82 */ (T_MASK ^ 0x08ac817d)
T_MASK            185 ext/digest/md5/md5.c #define T62 /* 0xbd3af235 */ (T_MASK ^ 0x42c50dca)
T_MASK            187 ext/digest/md5/md5.c #define T64 /* 0xeb86d391 */ (T_MASK ^ 0x14792c6e)
T_MASK            350 ext/digest/md5/md5.c     pms->state[1] = /*0xefcdab89*/ T_MASK ^ 0x10325476;
T_MASK            351 ext/digest/md5/md5.c     pms->state[2] = /*0x98badcfe*/ T_MASK ^ 0x67452301;
T_MASK            734 gc.c               switch (obj->as.basic.flags & T_MASK) {
T_MASK            876 gc.c               switch (obj->as.basic.flags & T_MASK) {
T_MASK            964 gc.c           	       obj->as.basic.flags & T_MASK, obj,
T_MASK           1098 gc.c               switch (RANY(obj)->as.basic.flags & T_MASK) {
T_MASK           1111 gc.c               switch (RANY(obj)->as.basic.flags & T_MASK) {
T_MASK           1215 gc.c           	       RANY(obj)->as.basic.flags & T_MASK, obj);
T_MASK            172 object.c           RBASIC(dest)->flags &= ~(T_MASK|FL_EXIVAR);
T_MASK            173 object.c           RBASIC(dest)->flags |= RBASIC(obj)->flags & (T_MASK|FL_EXIVAR|FL_TAINT);
T_MASK            231 ruby.h         #define BUILTIN_TYPE(x) (((struct RBasic*)(x))->flags & T_MASK)
T_MASK            323 ruby.h             OBJSETUP(dup,rb_obj_class(obj),(RBASIC(obj)->flags)&(T_MASK|FL_EXIVAR|FL_TAINT));\


T_MATCH

T_MATCH           192 error.c            {T_MATCH,	"MatchData"},	/* data of $~ */
T_MATCH           928 gc.c                 case T_MATCH:
T_MATCH          1158 gc.c                 case T_MATCH:
T_MATCH           654 re.c               OBJSETUP(match, klass, T_MATCH);
T_MATCH          2154 re.c           	Check_Type(val, T_MATCH);


T_MODULE

T_MODULE          255 class.c            OBJSETUP(mdl, rb_cModule, T_MODULE);
T_MODULE          285 class.c        	if (TYPE(module) == T_MODULE)
T_MODULE          305 class.c        	if (TYPE(module) == T_MODULE)
T_MODULE          358 class.c            if (TYPE(module) != T_MODULE) {
T_MODULE          359 class.c        	Check_Type(module, T_MODULE);
T_MODULE          449 class.c            Check_Type(mod2, T_MODULE);
T_MODULE          178 error.c            {T_MODULE,	"Module"},
T_MODULE          293 eval.c         		  (TYPE(klass) == T_MODULE) ? "module" : "class",
T_MODULE          595 eval.c             if (!body && TYPE(klass) == T_MODULE) {
T_MODULE         1897 eval.c         	      case T_MODULE:
T_MODULE         1933 eval.c         	      case T_MODULE:
T_MODULE         1939 eval.c         	else if (TYPE(c) == T_MODULE) {
T_MODULE         2023 eval.c         	if (TYPE(klass) == T_MODULE) {
T_MODULE         2319 eval.c         	  case T_MODULE:
T_MODULE         2659 eval.c         	  case T_MODULE:
T_MODULE         3556 eval.c         		  case T_MODULE:
T_MODULE         3892 eval.c         		if (TYPE(module) != T_MODULE) {
T_MODULE         7189 eval.c             if (TYPE(module) != T_MODULE) {
T_MODULE         7240 eval.c               case T_MODULE:
T_MODULE         7263 eval.c             for (i=0; i<argc; i++) Check_Type(argv[i], T_MODULE);
T_MODULE         7352 eval.c             for (i=0; i<argc; i++) Check_Type(argv[i], T_MODULE);
T_MODULE         9007 eval.c         	if (TYPE(data->rklass) == T_MODULE) {
T_MODULE         1770 ext/win32ole/win32ole.c         TYPE(klass) != T_MODULE &&
T_MODULE          879 gc.c                 case T_MODULE:
T_MODULE         1117 gc.c                 case T_MODULE:
T_MODULE          498 marshal.c      	  case T_MODULE:
T_MODULE          926 marshal.c          if (TYPE(v) != T_MODULE) {
T_MODULE          984 marshal.c      	    if (TYPE(v) == T_MODULE || !RTEST(rb_class_inherited_p(c, RBASIC(v)->klass))) {
T_MODULE          179 object.c             case T_MODULE:
T_MODULE          388 object.c             case T_MODULE:
T_MODULE          433 object.c             case T_MODULE:
T_MODULE         1144 object.c       	  case T_CLASS: case T_MODULE:
T_MODULE         1207 object.c             case T_MODULE:
T_MODULE         1262 object.c             case T_MODULE:
T_MODULE         1308 object.c             case T_MODULE:
T_MODULE          107 prec.c               case T_MODULE:
T_MODULE           78 variable.c           case T_MODULE:
T_MODULE          191 variable.c     	if (TYPE(klass) == T_MODULE) {
T_MODULE          250 variable.c     	  case T_MODULE:
T_MODULE          922 variable.c           case T_MODULE:
T_MODULE          958 variable.c           case T_MODULE:
T_MODULE          975 variable.c           case T_MODULE:
T_MODULE         1022 variable.c           case T_MODULE:
T_MODULE         1079 variable.c           case T_MODULE:
T_MODULE         1300 variable.c         if (!exclude && !mod_retry && BUILTIN_TYPE(klass) == T_MODULE) {
T_MODULE         1455 variable.c         if (!exclude && !mod_retry && BUILTIN_TYPE(klass) == T_MODULE) {
T_MODULE         1489 variable.c     	if (BUILTIN_TYPE(klass) == T_MODULE) {


T_NIL

T_NIL             174 error.c            {T_NIL,	"nil"},
T_NIL             691 error.c        	  case T_NIL:
T_NIL              72 ext/Win32API/Win32API.c     case T_NIL:
T_NIL            2179 ext/tk/tcltklib.c     case T_NIL:
T_NIL             749 ext/tk/tkutil/tkutil.c     case T_NIL:
T_NIL             819 ext/tk/tkutil/tkutil.c     case T_NIL:
T_NIL             847 ext/win32ole/win32ole.c     case T_NIL:
T_NIL            1771 ext/win32ole/win32ole.c         TYPE(klass) != T_NIL) {
T_NIL            1787 ext/win32ole/win32ole.c         if(TYPE(klass) != T_NIL) {
T_NIL            1805 ext/win32ole/win32ole.c         if(TYPE(klass) != T_NIL) {
T_NIL            6698 ext/win32ole/win32ole.c     if(TYPE(itf) != T_NIL) {
T_NIL             735 gc.c                 case T_NIL:
T_NIL            1099 gc.c                 case T_NIL:
T_NIL            3553 io.c           	  case T_NIL:
T_NIL             765 object.c             case T_NIL:
T_NIL            2158 object.c             case T_NIL:
T_NIL            2202 object.c             case T_NIL:
T_NIL             470 random.c             case T_NIL:
T_NIL             693 ruby.h         	if (obj == Qnil) return T_NIL;


T_NODE

T_NODE            195 error.c            {T_NODE,	"Node"},	/* internal use: syntax tree node */
T_NODE           2695 eval.c             else if (BUILTIN_TYPE(node) != T_NODE) {
T_NODE            740 gc.c                 case T_NODE:
T_NODE           1183 gc.c                 case T_NODE:
T_NODE           1545 gc.c           		  case T_NODE:
T_NODE           1577 gc.c           		  case T_NODE:
T_NODE           6882 parse.y            n->flags |= T_NODE;
T_NODE           8858 parse.y              case T_NODE:
T_NODE            469 ruby.h         #define FL_ABLE(x) (!SPECIAL_CONST_P(x) && BUILTIN_TYPE(x) != T_NODE)


T_OBJECT

T_OBJECT          175 error.c            {T_OBJECT,	"Object"},
T_OBJECT          842 error.c        	    if (TYPE(self) != T_OBJECT) { /* insurance to avoid type crash */
T_OBJECT          917 gc.c                 case T_OBJECT:
T_OBJECT         1112 gc.c                 case T_OBJECT:
T_OBJECT          601 marshal.c      	  case T_OBJECT:
T_OBJECT          980 marshal.c      	    if (rb_special_const_p(v) || TYPE(v) == T_OBJECT || TYPE(v) == T_CLASS) {
T_OBJECT         1204 marshal.c      	    if (TYPE(v) != T_OBJECT) {
T_OBJECT          177 object.c             case T_OBJECT:
T_OBJECT          362 object.c           if (TYPE(obj) == T_OBJECT
T_OBJECT         1433 object.c           OBJSETUP(obj, klass, T_OBJECT);
T_OBJECT         8853 parse.y              case T_OBJECT:
T_OBJECT          920 variable.c           case T_OBJECT:
T_OBJECT          956 variable.c           case T_OBJECT:
T_OBJECT          973 variable.c           case T_OBJECT:
T_OBJECT         1020 variable.c           case T_OBJECT:
T_OBJECT         1077 variable.c           case T_OBJECT:


T_REGEXP

T_REGEXP          181 error.c            {T_REGEXP,	"Regexp"},
T_REGEXP          428 ext/strscan/strscan.c     Check_Type(regex, T_REGEXP);
T_REGEXP          822 ext/tk/tkutil/tkutil.c     case T_REGEXP:
T_REGEXP          922 gc.c                 case T_REGEXP:
T_REGEXP         1140 gc.c                 case T_REGEXP:
T_REGEXP          544 marshal.c      	  case T_REGEXP:
T_REGEXP         7142 parse.y        	    if (TYPE(node1->nd_lit) == T_REGEXP) {
T_REGEXP         7155 parse.y        	    if (TYPE(node2->nd_lit) == T_REGEXP) {
T_REGEXP         7755 parse.y        	if (TYPE(node->nd_lit) == T_REGEXP) {
T_REGEXP         1353 re.c               OBJSETUP(re, klass, T_REGEXP);
T_REGEXP         1453 re.c               if (TYPE(re2) != T_REGEXP) return Qfalse;
T_REGEXP         1652 re.c               if (TYPE(argv[0]) == T_REGEXP) {
T_REGEXP         1900 re.c                   v = rb_check_convert_type(argv[0], T_REGEXP, "Regexp", "to_regexp");
T_REGEXP         1918 re.c                       v = rb_check_convert_type(argv[i], T_REGEXP, "Regexp", "to_regexp");
T_REGEXP         1019 string.c       	    if (TYPE(sub) == T_REGEXP) {
T_REGEXP         1027 string.c             case T_REGEXP:
T_REGEXP         1124 string.c       		if (TYPE(sub) == T_REGEXP) {
T_REGEXP         1137 string.c             case T_REGEXP:
T_REGEXP         1198 string.c             case T_REGEXP:
T_REGEXP         1425 string.c             case T_REGEXP:
T_REGEXP         1508 string.c       	if (TYPE(argv[0]) == T_REGEXP) {
T_REGEXP         1631 string.c             case T_REGEXP:
T_REGEXP         1686 string.c       	if (TYPE(argv[0]) == T_REGEXP) {
T_REGEXP         1782 string.c             case T_REGEXP:
T_REGEXP         1791 string.c       	    Check_Type(pat, T_REGEXP);


T_SCOPE

T_SCOPE           194 error.c            {T_SCOPE,	"Scope"},	/* internal use: variable scope */
T_SCOPE           967 eval.c             OBJSETUP(_scope, 0, T_SCOPE);	\
T_SCOPE          8236 eval.c                 OBJSETUP(scope, tmp, T_SCOPE);
T_SCOPE           940 gc.c                 case T_SCOPE:
T_SCOPE          1196 gc.c                 case T_SCOPE:
T_SCOPE          1544 gc.c           		  case T_SCOPE:
T_SCOPE          1576 gc.c           		  case T_SCOPE:


T_STRING

T_STRING         1279 array.c        	  case T_STRING:
T_STRING         1500 array.c            if (TYPE(a) == T_STRING) {
T_STRING         1501 array.c        	if (TYPE(b) == T_STRING) return rb_str_cmp(a, b);
T_STRING          180 error.c            {T_STRING,	"String"},
T_STRING          442 error.c        	if (t == T_STRING) return rb_ary_new3(1, bt);
T_STRING          447 error.c        	    if (TYPE(RARRAY(bt)->ptr[i]) != T_STRING) {
T_STRING          281 eval.c             if (TYPE(x)!= T_STRING) {
T_STRING         1224 eval.c         	    if (TYPE(ep->ptr[i]) == T_STRING) {
T_STRING         1718 eval.c             if (TYPE(cmd) != T_STRING) {
T_STRING         2765 eval.c         	    if (TYPE(l) == T_STRING) {
T_STRING         4466 eval.c         	if (TYPE(argv[0]) == T_STRING) {
T_STRING         6206 eval.c         		    if (!NIL_P(mesg) && TYPE(mesg) == T_STRING) {
T_STRING          110 ext/bigdecimal/bigdecimal.c     case T_STRING:
T_STRING         1063 ext/bigdecimal/bigdecimal.c         if(TYPE(f)==T_STRING) {
T_STRING          385 ext/dl/cptr.c  	if( TYPE(arg2) == T_STRING ){
T_STRING          287 ext/iconv/iconv.c     else if (TYPE(failed) != T_STRING || RSTRING(failed)->len < FAILED_MAXLEN) {
T_STRING          220 ext/openssl/ossl_bn.c     case T_STRING:
T_STRING          568 ext/stringio/stringio.c     if (argc == 1 && TYPE(*argv) != T_STRING) {
T_STRING          993 ext/stringio/stringio.c     if (TYPE(str) != T_STRING)
T_STRING         1888 ext/syck/rubyext.c     if (TYPE(dest) == T_STRING) {
T_STRING         2143 ext/tk/tcltklib.c     } else if (TYPE(enc) == T_STRING) {
T_STRING         2176 ext/tk/tcltklib.c     case T_STRING:
T_STRING         6016 ext/tk/tcltklib.c         if (TYPE(str) == T_STRING) {
T_STRING         6160 ext/tk/tcltklib.c         if (TYPE(str) == T_STRING) {
T_STRING          377 ext/tk/tkutil/tkutil.c         if (TYPE(dst_enc) == T_STRING) {
T_STRING          471 ext/tk/tkutil/tkutil.c         if (TYPE(dst_enc) == T_STRING) {
T_STRING          780 ext/tk/tkutil/tkutil.c     case T_STRING:
T_STRING          958 ext/tk/tkutil/tkutil.c     rb_check_type(value, T_STRING);
T_STRING         1018 ext/tk/tkutil/tkutil.c     rb_check_type(value, T_STRING);
T_STRING         1056 ext/tk/tkutil/tkutil.c     rb_check_type(value, T_STRING);
T_STRING         1068 ext/tk/tkutil/tkutil.c     rb_check_type(value, T_STRING);
T_STRING         1176 ext/tk/tkutil/tkutil.c     case T_STRING:
T_STRING         1188 ext/tk/tkutil/tkutil.c     case T_STRING:
T_STRING         1244 ext/tk/tkutil/tkutil.c         case T_STRING:
T_STRING          823 ext/win32ole/win32ole.c     case T_STRING:
T_STRING          868 ext/win32ole/win32ole.c     case T_STRING:
T_STRING         1795 ext/win32ole/win32ole.c     else if(TYPE(ole) == T_STRING) {
T_STRING         1966 ext/win32ole/win32ole.c     if (TYPE(helpfile) != T_STRING) {
T_STRING         2114 ext/win32ole/win32ole.c     if(TYPE(key) != T_STRING) {
T_STRING         2124 ext/win32ole/win32ole.c         Check_Type(key, T_STRING);
T_STRING         3580 ext/win32ole/win32ole.c     if(TYPE(typelib) == T_STRING) {
T_STRING         6258 ext/win32ole/win32ole.c         else if (TYPE(ev) == T_STRING &&
T_STRING         6259 ext/win32ole/win32ole.c                  TYPE(event_name) == T_STRING &&
T_STRING         1838 ext/zlib/zlib.c     Check_Type(str, T_STRING);
T_STRING         1851 ext/zlib/zlib.c             Check_Type(str, T_STRING);
T_STRING         2844 ext/zlib/zlib.c     if (TYPE(str) != T_STRING) {
T_STRING         3078 ext/zlib/zlib.c         Check_Type(outbuf, T_STRING);
T_STRING         3201 ext/zlib/zlib.c 	    Check_Type(rs, T_STRING);
T_STRING         2871 file.c         	if (TYPE(RARRAY(ary)->ptr[i]) == T_STRING) {
T_STRING         2878 file.c             if (!NIL_P(sep) && TYPE(sep) == T_STRING) {
T_STRING         2886 file.c         	  case T_STRING:
T_STRING         3146 file.c         	  case T_STRING:
T_STRING          905 gc.c                 case T_STRING:
T_STRING         1125 gc.c                 case T_STRING:
T_STRING           53 hash.c             if (TYPE(a) == T_STRING && RBASIC(a)->klass == rb_cString &&
T_STRING           54 hash.c         	TYPE(b) == T_STRING && RBASIC(b)->klass == rb_cString) {
T_STRING           84 hash.c               case T_STRING:
T_STRING          837 hash.c             if (TYPE(key) != T_STRING || st_lookup(RHASH(hash)->tbl, key, 0)) {
T_STRING         2107 hash.c             if (TYPE(value) != T_STRING) return Qfalse;
T_STRING         2277 io.c               if (TYPE(str) != T_STRING)
T_STRING         3503 io.c               if (TYPE(argv[0]) == T_STRING) {
T_STRING         4649 io.c               if (TYPE(arg) == T_STRING && RSTRING(arg)->ptr[len] != 17) {
T_STRING          472 marshal.c      	    if (TYPE(v) != T_STRING) {
T_STRING          538 marshal.c      	  case T_STRING:
T_STRING          748 marshal.c          if (TYPE(arg->src) == T_STRING) {
T_STRING          821 marshal.c          if (TYPE(arg->src) == T_STRING) {
T_STRING         1628 numeric.c          case T_STRING:
T_STRING          769 object.c             case T_STRING:
T_STRING         1508 object.c             case T_STRING:
T_STRING         2015 object.c             case T_STRING:
T_STRING         2155 object.c             case T_STRING:
T_STRING         2198 object.c             case T_STRING:
T_STRING         2227 object.c           return rb_convert_type(val, T_STRING, "String", "to_s");
T_STRING         1876 pack.c         			if (TYPE(*p) == T_STRING && RSTRING(*p)->ptr == t) {
T_STRING         1918 pack.c         			    if (TYPE(*p) == T_STRING && RSTRING(*p)->ptr == t) {
T_STRING         8852 parse.y              case T_STRING:
T_STRING          392 range.c            else if (TYPE(beg) == T_STRING) {
T_STRING         1526 re.c               if (TYPE(str) != T_STRING) {
T_STRING         1559 re.c               if (TYPE(line) != T_STRING) {
T_STRING          306 ruby.h         #define NUM2CHR(x) (((TYPE(x) == T_STRING)&&(RSTRING(x)->len>=1))?\
T_STRING          244 signal.c             case T_STRING:
T_STRING          622 signal.c             case T_STRING:
T_STRING          503 sprintf.c      		  case T_STRING:
T_STRING           62 string.c           OBJSETUP(str, klass, T_STRING);
T_STRING          230 string.c           return rb_convert_type(str, T_STRING, "String", "to_str");
T_STRING          263 string.c           if (TYPE(obj) == T_STRING) {
T_STRING          267 string.c           if (TYPE(str) != T_STRING)
T_STRING          487 string.c           if (TYPE(s) != T_STRING) {
T_STRING          519 string.c           str = rb_check_convert_type(str, T_STRING, "String", "to_str");
T_STRING          850 string.c           if (TYPE(str2) != T_STRING) {
T_STRING          873 string.c           if (TYPE(str2) != T_STRING || RSTRING(str1)->len != RSTRING(str2)->len)
T_STRING          913 string.c           if (TYPE(str2) != T_STRING) {
T_STRING         1055 string.c             case T_STRING:
T_STRING         1145 string.c             case T_STRING:
T_STRING         1195 string.c             case T_STRING:
T_STRING         1428 string.c             case T_STRING:
T_STRING         1635 string.c             case T_STRING:
T_STRING         1785 string.c             case T_STRING:
T_STRING         3238 string.c       	if (TYPE(spat) == T_STRING && RSTRING(spat)->len == 1) {
T_STRING         4163 string.c           if (!NIL_P(val) && TYPE(val) != T_STRING) {
T_STRING          559 struct.c           if (TYPE(idx) == T_STRING || TYPE(idx) == T_SYMBOL) {
T_STRING          622 struct.c           if (TYPE(idx) == T_STRING || TYPE(idx) == T_SYMBOL) {
T_STRING          271 time.c             if (TYPE(obj) == T_STRING) {
T_STRING          154 variable.c     	if (TYPE(path) != T_STRING) {
T_STRING         1244 variable.c         Check_Type(file, T_STRING);


T_STRUCT

T_STRUCT          185 error.c            {T_STRUCT,	"Struct"},
T_STRUCT          951 gc.c                 case T_STRUCT:
T_STRUCT         1207 gc.c                 case T_STRUCT:
T_STRUCT          585 marshal.c      	  case T_STRUCT:
T_STRUCT          332 struct.c           OBJSETUP(st, klass, T_STRUCT);
T_STRUCT          730 struct.c           if (TYPE(s2) != T_STRUCT) return Qfalse;
T_STRUCT          778 struct.c           if (TYPE(s2) != T_STRUCT) return Qfalse;


T_SYMBOL

T_SYMBOL          190 error.c            {T_SYMBOL,	"Symbol"},	/* :symbol */
T_SYMBOL          353 ext/openssl/ossl_pkcs7.c     if(TYPE(sym) == T_SYMBOL) s = rb_id2name(SYM2ID(sym));
T_SYMBOL          157 ext/openssl/ossl_ssl.c     if(TYPE(ssl_method) == T_SYMBOL)
T_SYMBOL         2337 ext/tk/tcltklib.c             if (TYPE(reason) == T_SYMBOL) {
T_SYMBOL          791 ext/tk/tkutil/tkutil.c     case T_SYMBOL:
T_SYMBOL         1179 ext/tk/tkutil/tkutil.c     case T_SYMBOL:
T_SYMBOL         1191 ext/tk/tkutil/tkutil.c     case T_SYMBOL:
T_SYMBOL         1248 ext/tk/tkutil/tkutil.c         case T_SYMBOL:
T_SYMBOL           80 hash.c               case T_SYMBOL:
T_SYMBOL         1517 object.c             case T_SYMBOL:
T_SYMBOL          689 ruby.h         	if (SYMBOL_P(obj)) return T_SYMBOL;
T_SYMBOL          239 signal.c             case T_SYMBOL:
T_SYMBOL          617 signal.c             case T_SYMBOL:
T_SYMBOL          559 struct.c           if (TYPE(idx) == T_STRING || TYPE(idx) == T_SYMBOL) {
T_SYMBOL          622 struct.c           if (TYPE(idx) == T_STRING || TYPE(idx) == T_SYMBOL) {


T_TRUE

T_TRUE            188 error.c            {T_TRUE,	"true"},
T_TRUE            694 error.c        	  case T_TRUE:
T_TRUE            364 ext/socket/socket.c       case T_TRUE:
T_TRUE           2182 ext/tk/tcltklib.c     case T_TRUE:
T_TRUE            255 ext/tk/tkutil/tkutil.c     } else if (TYPE(enc_flag) == T_TRUE || TYPE(enc_flag) == T_FALSE) {
T_TRUE            409 ext/tk/tkutil/tkutil.c     } else if (TYPE(enc_flag) == T_TRUE || TYPE(enc_flag) == T_FALSE) {
T_TRUE            816 ext/tk/tkutil/tkutil.c     case T_TRUE:
T_TRUE            954 ext/tk/tkutil/tkutil.c     if (TYPE(value) == T_TRUE || TYPE(value) == T_FALSE) {
T_TRUE            839 ext/win32ole/win32ole.c     case T_TRUE:
T_TRUE            917 ext/win32ole/win32ole.c     case T_TRUE:
T_TRUE           1101 gc.c                 case T_TRUE:
T_TRUE           1632 numeric.c          case T_TRUE:
T_TRUE            688 ruby.h         	if (obj == Qtrue) return T_TRUE;


T_UNDEF

T_UNDEF           196 error.c            {T_UNDEF,	"undef"},	/* internal use: #undef; should not happen */
T_UNDEF           690 ruby.h         	if (obj == Qundef) return T_UNDEF;


T_VARMAP

T_VARMAP          193 error.c            {T_VARMAP,	"Varmap"},	/* internal use: dynamic variables */
T_VARMAP          759 eval.c             OBJSETUP(vars, 0, T_VARMAP);
T_VARMAP          935 gc.c                 case T_VARMAP:
T_VARMAP         1174 gc.c                 case T_VARMAP:
T_VARMAP         1543 gc.c           		  case T_VARMAP:
T_VARMAP         1575 gc.c           		  case T_VARMAP:


TclGetFrame

TclGetFrame       435 ext/tk/tcltklib.c #  if !defined(TclGetFrame) && !defined(TclGetFrame_TCL_DECLARED)
TclGetFrame       436 ext/tk/tcltklib.c EXTERN int  TclGetFrame _((Tcl_Interp *, CONST char *, CallFrame **));
TclGetFrame       439 ext/tk/tcltklib.c #    ifndef TclGetFrame
TclGetFrame       493 ext/tk/tcltklib.c #  if !defined(TclGetFrame) && !defined(TclGetFrame_TCL_DECLARED)
TclGetFrame       494 ext/tk/tcltklib.c EXTERN int  TclGetFrame _((Tcl_Interp *, CONST char *, CallFrame **));


Tcl_CallFrame

Tcl_CallFrame     468 ext/tk/tcltklib.c     int  (*tcl_PushCallFrame) _((Tcl_Interp *, Tcl_CallFrame *, Tcl_Namespace *, int));
Tcl_CallFrame     489 ext/tk/tcltklib.c #  ifndef Tcl_CallFrame


Tcl_DecrRefCount

Tcl_DecrRefCount  187 ext/tk/tcltklib.c         Tcl_DecrRefCount(nameObj2);
Tcl_DecrRefCount  190 ext/tk/tcltklib.c     Tcl_DecrRefCount(nameObj1);
Tcl_DecrRefCount  216 ext/tk/tcltklib.c         Tcl_DecrRefCount(nameObj2);
Tcl_DecrRefCount  219 ext/tk/tcltklib.c     Tcl_DecrRefCount(nameObj1);
Tcl_DecrRefCount  887 ext/tk/tcltklib.c     Tcl_DecrRefCount(state_obj);
Tcl_DecrRefCount 3166 ext/tk/tcltklib.c         Tcl_DecrRefCount(objv[1]);
Tcl_DecrRefCount 3189 ext/tk/tcltklib.c         Tcl_DecrRefCount(objv[1]);
Tcl_DecrRefCount 3207 ext/tk/tcltklib.c         Tcl_DecrRefCount(objv[1]);
Tcl_DecrRefCount 3230 ext/tk/tcltklib.c         Tcl_DecrRefCount(objv[1]);
Tcl_DecrRefCount 3237 ext/tk/tcltklib.c     Tcl_DecrRefCount(objv[1]);
Tcl_DecrRefCount 3454 ext/tk/tcltklib.c             Tcl_DecrRefCount(objv[2]);
Tcl_DecrRefCount 3472 ext/tk/tcltklib.c         Tcl_DecrRefCount(objv[2]);
Tcl_DecrRefCount 3517 ext/tk/tcltklib.c             Tcl_DecrRefCount(objv[2]);
Tcl_DecrRefCount 3536 ext/tk/tcltklib.c             Tcl_DecrRefCount(objv[2]);
Tcl_DecrRefCount 3554 ext/tk/tcltklib.c             Tcl_DecrRefCount(objv[2]);
Tcl_DecrRefCount 3577 ext/tk/tcltklib.c             Tcl_DecrRefCount(objv[2]);
Tcl_DecrRefCount 3587 ext/tk/tcltklib.c         Tcl_DecrRefCount(objv[2]);
Tcl_DecrRefCount 3609 ext/tk/tcltklib.c         Tcl_DecrRefCount(objv[2]);
Tcl_DecrRefCount 3842 ext/tk/tcltklib.c         Tcl_DecrRefCount(objv[1]);
Tcl_DecrRefCount 3868 ext/tk/tcltklib.c     Tcl_DecrRefCount(objv[1]);
Tcl_DecrRefCount 4033 ext/tk/tcltklib.c             Tcl_DecrRefCount(objv[2]);
Tcl_DecrRefCount 4056 ext/tk/tcltklib.c         Tcl_DecrRefCount(objv[2]);
Tcl_DecrRefCount 4084 ext/tk/tcltklib.c             Tcl_DecrRefCount(objv[2]);
Tcl_DecrRefCount 4134 ext/tk/tcltklib.c             Tcl_DecrRefCount(objv[2]);
Tcl_DecrRefCount 4145 ext/tk/tcltklib.c         Tcl_DecrRefCount(objv[2]);
Tcl_DecrRefCount 4163 ext/tk/tcltklib.c         Tcl_DecrRefCount(objv[2]);
Tcl_DecrRefCount 4291 ext/tk/tcltklib.c                 Tcl_DecrRefCount(elem);
Tcl_DecrRefCount 4304 ext/tk/tcltklib.c         Tcl_DecrRefCount(slave_list);
Tcl_DecrRefCount 5376 ext/tk/tcltklib.c     Tcl_DecrRefCount(retObj);
Tcl_DecrRefCount 5600 ext/tk/tcltklib.c           Tcl_DecrRefCount(cmd);
Tcl_DecrRefCount 5638 ext/tk/tcltklib.c       Tcl_DecrRefCount(cmd);
Tcl_DecrRefCount 6646 ext/tk/tcltklib.c         Tcl_DecrRefCount(objv[0]);
Tcl_DecrRefCount 6739 ext/tk/tcltklib.c         Tcl_DecrRefCount(av[i]);
Tcl_DecrRefCount 7043 ext/tk/tcltklib.c         Tcl_DecrRefCount(ret);
Tcl_DecrRefCount 7154 ext/tk/tcltklib.c             Tcl_DecrRefCount(valobj);
Tcl_DecrRefCount 7165 ext/tk/tcltklib.c         Tcl_DecrRefCount(valobj);
Tcl_DecrRefCount 7179 ext/tk/tcltklib.c         Tcl_DecrRefCount(ret);
Tcl_DecrRefCount 7428 ext/tk/tcltklib.c             Tcl_DecrRefCount(listobj);
Tcl_DecrRefCount 7461 ext/tk/tcltklib.c             Tcl_DecrRefCount(objv[idx]);
Tcl_DecrRefCount 7464 ext/tk/tcltklib.c         Tcl_DecrRefCount(listobj);


Tcl_Eval

Tcl_Eval          132 ext/tk/tcltklib.c     const int ret = Tcl_Eval(interp, buf);
Tcl_Eval         4275 ext/tk/tcltklib.c     if (!Tcl_InterpDeleted(ip) && Tcl_Eval(ip, "interp slaves") == TCL_OK) {
Tcl_Eval         4326 ext/tk/tcltklib.c     if (!Tcl_InterpDeleted(ip) && Tcl_Eval(ip, "interp slaves") == TCL_OK) {
Tcl_Eval         5684 ext/tk/tcltklib.c         ptr->return_value = Tcl_Eval(ptr->ip, cmd_str);
Tcl_Eval         5897 ext/tk/tcltklib.c     ptr->return_value = Tcl_Eval(ptr->ip, "destroy .");
Tcl_Eval         5904 ext/tk/tcltklib.c     ptr->return_value = Tcl_Eval(ptr->ip, "namespace delete ::tk::msgcat");
Tcl_Eval         5911 ext/tk/tcltklib.c     ptr->return_value = Tcl_Eval(ptr->ip, "trace vdelete ::tk_strictMotif w ::tk::EventMotifBindings");


Tcl_GetCurrentNamespace

Tcl_GetCurrentNamespace  379 ext/tk/tcltklib.c #  ifndef Tcl_GetCurrentNamespace
Tcl_GetCurrentNamespace  380 ext/tk/tcltklib.c EXTERN Tcl_Namespace *  Tcl_GetCurrentNamespace _((Tcl_Interp *));
Tcl_GetCurrentNamespace  383 ext/tk/tcltklib.c #    ifndef Tcl_GetCurrentNamespace
Tcl_GetCurrentNamespace  406 ext/tk/tcltklib.c     (Tcl_GetCurrentNamespace(interp) == (Tcl_Namespace *)NULL)
Tcl_GetCurrentNamespace  414 ext/tk/tcltklib.c     ((ptr)->default_ns == (Tcl_Namespace*)NULL || Tcl_GetCurrentNamespace((ptr)->ip) != (ptr)->default_ns)
Tcl_GetCurrentNamespace 4716 ext/tk/tcltklib.c     if ((ptr->default_ns = Tcl_GetCurrentNamespace(ptr->ip))
Tcl_GetCurrentNamespace 4921 ext/tk/tcltklib.c     slave->default_ns = Tcl_GetCurrentNamespace(slave->ip);


Tcl_GetStringResult

Tcl_GetStringResult  716 ext/tk/tcltklib.c                                  Tcl_GetStringResult(ptr->ip));
Tcl_GetStringResult  720 ext/tk/tcltklib.c                                  Tcl_GetStringResult(ptr->ip));
Tcl_GetStringResult  737 ext/tk/tcltklib.c                                  Tcl_GetStringResult(ptr->ip));
Tcl_GetStringResult  741 ext/tk/tcltklib.c                                  Tcl_GetStringResult(ptr->ip));
Tcl_GetStringResult 2429 ext/tk/tcltklib.c                                              Tcl_GetStringResult(interp));
Tcl_GetStringResult 2526 ext/tk/tcltklib.c                                              Tcl_GetStringResult(interp));
Tcl_GetStringResult 2573 ext/tk/tcltklib.c                                              Tcl_GetStringResult(interp));
Tcl_GetStringResult 2706 ext/tk/tcltklib.c                                              Tcl_GetStringResult(interp));
Tcl_GetStringResult 2734 ext/tk/tcltklib.c                                              Tcl_GetStringResult(interp));
Tcl_GetStringResult 2870 ext/tk/tcltklib.c     DUMP2("last result '%s'", Tcl_GetStringResult(interp));
Tcl_GetStringResult 4733 ext/tk/tcltklib.c         rb_raise(rb_eRuntimeError, "%s", Tcl_GetStringResult(ptr->ip));
Tcl_GetStringResult 4776 ext/tk/tcltklib.c                      Tcl_GetStringResult(ptr->ip));
Tcl_GetStringResult 4779 ext/tk/tcltklib.c                      Tcl_GetStringResult(ptr->ip));
Tcl_GetStringResult 5102 ext/tk/tcltklib.c         return rb_exc_new2(rb_eRuntimeError, Tcl_GetStringResult(ptr->ip));
Tcl_GetStringResult 5651 ext/tk/tcltklib.c                                 "%s", Tcl_GetStringResult(ptr->ip));
Tcl_GetStringResult 5657 ext/tk/tcltklib.c                 rb_warning("%s (ignore)", Tcl_GetStringResult(ptr->ip));
Tcl_GetStringResult 5659 ext/tk/tcltklib.c                 rb_warn("%s (ignore)", Tcl_GetStringResult(ptr->ip));
Tcl_GetStringResult 6665 ext/tk/tcltklib.c                                  "%s", Tcl_GetStringResult(ptr->ip));
Tcl_GetStringResult 6668 ext/tk/tcltklib.c                 rb_warning("%s (ignore)", Tcl_GetStringResult(ptr->ip));
Tcl_GetStringResult 6670 ext/tk/tcltklib.c                 rb_warn("%s (ignore)", Tcl_GetStringResult(ptr->ip));
Tcl_GetStringResult 7033 ext/tk/tcltklib.c             exc = rb_exc_new2(rb_eRuntimeError, Tcl_GetStringResult(ptr->ip));
Tcl_GetStringResult 7068 ext/tk/tcltklib.c             exc = rb_exc_new2(rb_eRuntimeError, Tcl_GetStringResult(ptr->ip));
Tcl_GetStringResult 7169 ext/tk/tcltklib.c             exc = rb_exc_new2(rb_eRuntimeError, Tcl_GetStringResult(ptr->ip));
Tcl_GetStringResult 7286 ext/tk/tcltklib.c             return rb_exc_new2(rb_eRuntimeError, Tcl_GetStringResult(ptr->ip));
Tcl_GetStringResult 7432 ext/tk/tcltklib.c                 rb_raise(rb_eRuntimeError, "%s", Tcl_GetStringResult(interp));


Tcl_GlobalEval

Tcl_GlobalEval    146 ext/tk/tcltklib.c     const int ret = Tcl_GlobalEval(interp, buf);
Tcl_GlobalEval   4395 ext/tk/tcltklib.c         Tcl_GlobalEval(ip, "destroy .");
Tcl_GlobalEval   4413 ext/tk/tcltklib.c         Tcl_GlobalEval(ip, finalize_hook_name);
Tcl_GlobalEval   4422 ext/tk/tcltklib.c         Tcl_GlobalEval(ip, "foreach id [after info] {after cancel $id}");


Tcl_IncrRefCount

Tcl_IncrRefCount  177 ext/tk/tcltklib.c     Tcl_IncrRefCount(nameObj1);
Tcl_IncrRefCount  181 ext/tk/tcltklib.c         Tcl_IncrRefCount(nameObj2);
Tcl_IncrRefCount  206 ext/tk/tcltklib.c     Tcl_IncrRefCount(nameObj1);
Tcl_IncrRefCount  210 ext/tk/tcltklib.c         Tcl_IncrRefCount(nameObj2);
Tcl_IncrRefCount  858 ext/tk/tcltklib.c     Tcl_IncrRefCount(state_obj);
Tcl_IncrRefCount 3144 ext/tk/tcltklib.c     Tcl_IncrRefCount(objv[1]);
Tcl_IncrRefCount 3426 ext/tk/tcltklib.c     Tcl_IncrRefCount(objv[2]);
Tcl_IncrRefCount 3810 ext/tk/tcltklib.c     Tcl_IncrRefCount(objv[1]);
Tcl_IncrRefCount 3997 ext/tk/tcltklib.c     Tcl_IncrRefCount(objv[2]);
Tcl_IncrRefCount 4277 ext/tk/tcltklib.c         Tcl_IncrRefCount(slave_list);
Tcl_IncrRefCount 4282 ext/tk/tcltklib.c                 Tcl_IncrRefCount(elem);
Tcl_IncrRefCount 5373 ext/tk/tcltklib.c     Tcl_IncrRefCount(retObj);
Tcl_IncrRefCount 5596 ext/tk/tcltklib.c       Tcl_IncrRefCount(cmd);
Tcl_IncrRefCount 6546 ext/tk/tcltklib.c             Tcl_IncrRefCount(unknown_objv[0]);
Tcl_IncrRefCount 6708 ext/tk/tcltklib.c         Tcl_IncrRefCount(av[i]);
Tcl_IncrRefCount 7040 ext/tk/tcltklib.c         Tcl_IncrRefCount(ret);
Tcl_IncrRefCount 7150 ext/tk/tcltklib.c         Tcl_IncrRefCount(valobj);
Tcl_IncrRefCount 7176 ext/tk/tcltklib.c         Tcl_IncrRefCount(ret);
Tcl_IncrRefCount 7423 ext/tk/tcltklib.c         Tcl_IncrRefCount(listobj);
Tcl_IncrRefCount 7437 ext/tk/tcltklib.c             Tcl_IncrRefCount(objv[idx]);


Tcl_Namespace

Tcl_Namespace     380 ext/tk/tcltklib.c EXTERN Tcl_Namespace *  Tcl_GetCurrentNamespace _((Tcl_Interp *));
Tcl_Namespace     391 ext/tk/tcltklib.c     Tcl_Namespace * (*tcl_GetCurrentNamespace) _((Tcl_Interp *));
Tcl_Namespace     406 ext/tk/tcltklib.c     (Tcl_GetCurrentNamespace(interp) == (Tcl_Namespace *)NULL)
Tcl_Namespace     414 ext/tk/tcltklib.c     ((ptr)->default_ns == (Tcl_Namespace*)NULL || Tcl_GetCurrentNamespace((ptr)->ip) != (ptr)->default_ns)
Tcl_Namespace     421 ext/tk/tcltklib.c     Tcl_Namespace *nsPtr;
Tcl_Namespace     468 ext/tk/tcltklib.c     int  (*tcl_PushCallFrame) _((Tcl_Interp *, Tcl_CallFrame *, Tcl_Namespace *, int));
Tcl_Namespace     563 ext/tk/tcltklib.c     Tcl_Namespace *default_ns;   /* default namespace */
Tcl_Namespace    4717 ext/tk/tcltklib.c         == (Tcl_Namespace*)NULL) {


Tcl_PopCallFrame

Tcl_PopCallFrame  454 ext/tk/tcltklib.c #  if !defined(Tcl_PopCallFrame) && !defined(Tcl_PopCallFrame_TCL_DECLARED)
Tcl_PopCallFrame  455 ext/tk/tcltklib.c EXTERN void Tcl_PopCallFrame _((Tcl_Interp *));
Tcl_PopCallFrame  459 ext/tk/tcltklib.c #    ifndef Tcl_PopCallFrame
Tcl_PopCallFrame  497 ext/tk/tcltklib.c #  if !defined(Tcl_PopCallFrame) && !defined(Tcl_PopCallFrame_TCL_DECLARED)


ToValue

ToValue           213 ext/bigdecimal/bigdecimal.c     return ToValue(pv);
ToValue           467 ext/bigdecimal/bigdecimal.c     return ToValue(c);
ToValue           497 ext/bigdecimal/bigdecimal.c     return ToValue(c);
ToValue           589 ext/bigdecimal/bigdecimal.c     return ToValue(c);
ToValue           607 ext/bigdecimal/bigdecimal.c     return ToValue(c);
ToValue           647 ext/bigdecimal/bigdecimal.c     return ToValue(c);
ToValue           718 ext/bigdecimal/bigdecimal.c     return ToValue(mod);
ToValue           765 ext/bigdecimal/bigdecimal.c     return ToValue(rv);
ToValue           778 ext/bigdecimal/bigdecimal.c     obj = rb_assoc_new(ToValue(div), ToValue(mod));
ToValue           794 ext/bigdecimal/bigdecimal.c        return ToValue(div);
ToValue           813 ext/bigdecimal/bigdecimal.c           return ToValue(cv);
ToValue           831 ext/bigdecimal/bigdecimal.c        return ToValue(cv);
ToValue           848 ext/bigdecimal/bigdecimal.c        return ToValue(cv);
ToValue           865 ext/bigdecimal/bigdecimal.c        return ToValue(cv);
ToValue           881 ext/bigdecimal/bigdecimal.c     return ToValue(c);
ToValue           898 ext/bigdecimal/bigdecimal.c     return ToValue(c);
ToValue           912 ext/bigdecimal/bigdecimal.c     return ToValue(c);
ToValue           955 ext/bigdecimal/bigdecimal.c     return ToValue(c);
ToValue           980 ext/bigdecimal/bigdecimal.c     return ToValue(c);
ToValue           994 ext/bigdecimal/bigdecimal.c     return ToValue(c);
ToValue          1019 ext/bigdecimal/bigdecimal.c     return ToValue(c);
ToValue          1044 ext/bigdecimal/bigdecimal.c     return ToValue(c);
ToValue          1178 ext/bigdecimal/bigdecimal.c     return ToValue(y);
ToValue          1197 ext/bigdecimal/bigdecimal.c     return ToValue(pv);
ToValue          1216 ext/bigdecimal/bigdecimal.c     return ToValue(pv);


TrapEnsureArg

TrapEnsureArg    1003 regexec.c        TrapEnsureArg* ta = (TrapEnsureArg* )arg;
TrapEnsureArg    1019 regexec.c        TrapEnsureArg* ta;
TrapEnsureArg    1023 regexec.c        ta = (TrapEnsureArg* )arg;
TrapEnsureArg    1032 regexec.c        TrapEnsureArg ta;


UARG

UARG              781 missing/vsnprintf.c 				ulval = UARG();
UARG              838 missing/vsnprintf.c 				ulval = UARG();
UARG              852 missing/vsnprintf.c 				ulval = UARG();


UChar

UChar              32 euc_jp.c       #define eucjp_islead(c)    ((UChar )((c) - 0xa1) > 0xfe - 0xa1)
UChar             108 euc_jp.c         UChar *p = buf;
UChar             110 euc_jp.c         if ((code & 0xff0000) != 0) *p++ = (UChar )(((code >> 16) & 0xff));
UChar             111 euc_jp.c         if ((code &   0xff00) != 0) *p++ = (UChar )(((code >>  8) & 0xff));
UChar             112 euc_jp.c         *p++ = (UChar )(code & 0xff);
UChar             126 euc_jp.c         const UChar* p = *pp;
UChar             177 euc_jp.c       static UChar*
UChar             183 euc_jp.c         const UChar *p;
UChar             186 euc_jp.c         if (s <= start) return (UChar* )s;
UChar             191 euc_jp.c         if (p + len > s) return (UChar* )p;
UChar             193 euc_jp.c         return (UChar* )(p + ((s - p) & ~1));
UChar             199 euc_jp.c         const UChar c = *s;
UChar             437 ext/strscan/strscan.c         ret = onig_match(RREGEXP(regex)->ptr, (UChar* )CURPTR(p),
UChar             438 ext/strscan/strscan.c                          (UChar* )(CURPTR(p) + S_RESTLEN(p)),
UChar             439 ext/strscan/strscan.c                          (UChar* )CURPTR(p), &(p->regs), ONIG_OPTION_NONE);
UChar             443 ext/strscan/strscan.c                           (UChar* )CURPTR(p), (UChar* )(CURPTR(p) + S_RESTLEN(p)),
UChar             444 ext/strscan/strscan.c                           (UChar* )CURPTR(p), (UChar* )(CURPTR(p) + S_RESTLEN(p)),
UChar             152 oniguruma.h      int    (*mbc_enc_len)(const UChar* p);
UChar             158 oniguruma.h      int    (*is_mbc_newline)(const UChar* p, const UChar* end);
UChar             159 oniguruma.h      OnigCodePoint (*mbc_to_code)(const UChar* p, const UChar* end);
UChar             161 oniguruma.h      int    (*code_to_mbc)(OnigCodePoint code, UChar *buf);
UChar             162 oniguruma.h      int    (*mbc_to_normalize)(OnigAmbigType flag, const UChar** pp, const UChar* end, UChar* to);
UChar             163 oniguruma.h      int    (*is_mbc_ambiguous)(OnigAmbigType flag, const UChar** pp, const UChar* end);
UChar             168 oniguruma.h      UChar* (*left_adjust_char_head)(const UChar* start, const UChar* p);
UChar             169 oniguruma.h      int    (*is_allowed_reverse_match)(const UChar* p, const UChar* end);
UChar             336 oniguruma.h    int onigenc_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf));
UChar             338 oniguruma.h    int onigenc_mbc_to_normalize P_((OnigEncoding enc, OnigAmbigType flag, const UChar** pp, const UChar* end, UChar* buf));
UChar             340 oniguruma.h    int onigenc_is_mbc_ambiguous P_((OnigEncoding enc, OnigAmbigType flag, const UChar** pp, const UChar* end));
UChar             342 oniguruma.h    int onigenc_is_allowed_reverse_match P_((OnigEncoding enc, const UChar* s, const UChar* end));
UChar             349 oniguruma.h      (enc)->mbc_to_normalize(flag,(const UChar** )pp,end,buf)
UChar             351 oniguruma.h      (enc)->is_mbc_ambiguous(flag,(const UChar** )pp,end)
UChar             408 oniguruma.h    UChar* onigenc_step_back P_((OnigEncoding enc, const UChar* start, const UChar* s, int n));
UChar             421 oniguruma.h    void  onigenc_set_default_caseconv_table P_((const UChar* table));
UChar             423 oniguruma.h    UChar* onigenc_get_right_adjust_char_head_with_prev P_((OnigEncoding enc, const UChar* start, const UChar* s, const UChar** prev));
UChar             425 oniguruma.h    UChar* onigenc_get_prev_char_head P_((OnigEncoding enc, const UChar* start, const UChar* s));
UChar             427 oniguruma.h    UChar* onigenc_get_left_adjust_char_head P_((OnigEncoding enc, const UChar* start, const UChar* s));
UChar             429 oniguruma.h    UChar* onigenc_get_right_adjust_char_head P_((OnigEncoding enc, const UChar* start, const UChar* s));
UChar             431 oniguruma.h    int onigenc_strlen P_((OnigEncoding enc, const UChar* p, const UChar* end));
UChar             433 oniguruma.h    int onigenc_strlen_null P_((OnigEncoding enc, const UChar* p));
UChar             435 oniguruma.h    int onigenc_str_bytelen_null P_((OnigEncoding enc, const UChar* p));
UChar             698 oniguruma.h      UChar* par;
UChar             699 oniguruma.h      UChar* par_end;
UChar             779 oniguruma.h    int onig_error_code_to_str PV_((UChar* s, int err_code, ...));
UChar             785 oniguruma.h    int onig_new P_((regex_t**, const UChar* pattern, const UChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo));
UChar             787 oniguruma.h    int onig_new_deluxe P_((regex_t** reg, const UChar* pattern, const UChar* pattern_end, OnigCompileInfo* ci, OnigErrorInfo* einfo));
UChar             791 oniguruma.h    int onig_recompile P_((regex_t*, const UChar* pattern, const UChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo));
UChar             793 oniguruma.h    int onig_recompile_deluxe P_((regex_t* reg, const UChar* pattern, const UChar* pattern_end, OnigCompileInfo* ci, OnigErrorInfo* einfo));
UChar             795 oniguruma.h    int onig_search P_((regex_t*, const UChar* str, const UChar* end, const UChar* start, const UChar* range, OnigRegion* region, OnigOptionType option));
UChar             797 oniguruma.h    int onig_match P_((regex_t*, const UChar* str, const UChar* end, const UChar* at, OnigRegion* region, OnigOptionType option));
UChar             813 oniguruma.h    int onig_name_to_group_numbers P_((regex_t* reg, const UChar* name, const UChar* name_end, int** nums));
UChar             815 oniguruma.h    int onig_name_to_backref_number P_((regex_t* reg, const UChar* name, const UChar* name_end, OnigRegion *region));
UChar             817 oniguruma.h    int onig_foreach_name P_((regex_t* reg, int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*), void* arg));
UChar             619 re.c           	onig_error_code_to_str((UChar*)err, r);
UChar             623 re.c               r = onig_compile(rp, (UChar*)s, (UChar*)(s + len), &einfo);
UChar             627 re.c           	(void )onig_error_code_to_str((UChar*)err, r, &einfo);
UChar             825 re.c           	UChar *pattern;
UChar             831 re.c           	pattern = ((UChar*)RREGEXP(re)->str);
UChar             837 re.c           	     (void )onig_error_code_to_str((UChar*)err, r, &einfo);
UChar             848 re.c               UChar *p, *string;
UChar             868 re.c           	 string = (UChar*)RSTRING(str)->ptr;
UChar             911 re.c           			 (UChar*)(RSTRING(str)->ptr),
UChar             912 re.c           			 ((UChar*)(RSTRING(str)->ptr) + RSTRING(str)->len),
UChar             913 re.c           			 ((UChar*)(RSTRING(str)->ptr) + pos),
UChar             914 re.c           			 ((UChar*)(RSTRING(str)->ptr) + pos + range),
UChar             927 re.c           	    onig_error_code_to_str((UChar*)err, result);
UChar            2203 re.c               onigenc_set_default_caseconv_table((UChar*)casetable);
UChar              54 regcomp.c      static UChar*
UChar              60 regcomp.c          UChar* r = (UChar* )xmalloc(len + 1);
UChar              63 regcomp.c          r[len] = (UChar )0;
UChar             129 regcomp.c        buf->p = (UChar* )xmalloc(size);
UChar             433 regcomp.c        UChar *p, *prev;
UChar             481 regcomp.c        UChar *p, *prev, *end;
UChar             532 regcomp.c        UChar* p = BBUF_GET_ADD_ADDRESS(reg) + SIZE_LENGTH;
UChar            2035 regcomp.c            UChar *s = sn->s;
UChar            2152 regcomp.c        UChar *p, c;
UChar            2302 regcomp.c      	  UChar *q;
UChar            2366 regcomp.c              UChar* tmp = sn->s;
UChar            2770 regcomp.c            UChar *p;
UChar            2951 regcomp.c        UChar *prev, *p, *end, *prev_start, *start, *tmp, *wp;
UChar            3360 regcomp.c        UChar s[OPT_EXACT_MAXLEN];
UChar            3368 regcomp.c        UChar map[ONIG_CHAR_TABLE_SIZE];
UChar            3634 regcomp.c        UChar *p;
UChar            3759 regcomp.c        UChar buf[ONIGENC_MBC_NORMALIZE_MAXLEN];
UChar            4058 regcomp.c                  add_char_opt_map_info(&opt->map, (UChar )i, env->enc);
UChar            4079 regcomp.c                    add_char_opt_map_info(&opt->map, (UChar )i, env->enc);
UChar            4087 regcomp.c                    add_char_opt_map_info(&opt->map, (UChar )i, env->enc);
UChar            4306 regcomp.c          reg->exact = (UChar* )xmalloc(e->len);
UChar            4439 regcomp.c        reg->exact_end     = (UChar* )NULL;
UChar            4443 regcomp.c          reg->exact = (UChar* )NULL;
UChar            4533 regcomp.c          UChar *p;
UChar            4680 regcomp.c          reg->p = (UChar* )xmalloc(reg->alloc);
UChar            4686 regcomp.c          reg->exact = (UChar* )xmalloc(from->exact_end - from->exact);
UChar            4924 regcomp.c        (*reg)->exact            = (UChar* )NULL;
UChar            4929 regcomp.c        (*reg)->p                = (UChar* )NULL;
UChar            4947 regcomp.c        if (IS_NOT_NULL(einfo)) einfo->par = (UChar* )NULL;
UChar            4972 regcomp.c        onigenc_set_default_caseconv_table((UChar* )0);
UChar            5156 regcomp.c        UChar *q;
UChar            5359 regcomp.c        UChar* bp = reg->p;
UChar            5360 regcomp.c        UChar* end = reg->p + reg->used;
UChar            5384 regcomp.c        UChar* p;
UChar              53 regenc.c       extern UChar*
UChar              56 regenc.c         UChar* p = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s);
UChar              63 regenc.c       extern UChar*
UChar              67 regenc.c         UChar* p = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s);
UChar              70 regenc.c           if (prev) *prev = (const UChar* )p;
UChar              74 regenc.c           if (prev) *prev = (const UChar* )NULL; /* Sorry */
UChar              79 regenc.c       extern UChar*
UChar              83 regenc.c           return (UChar* )NULL;
UChar              88 regenc.c       extern UChar*
UChar              93 regenc.c             return (UChar* )NULL;
UChar              97 regenc.c         return (UChar* )s;
UChar             100 regenc.c       extern UChar*
UChar             103 regenc.c         UChar* q = (UChar* )p;
UChar             114 regenc.c         UChar* q = (UChar* )p;
UChar             127 regenc.c         UChar* p = (UChar* )s;
UChar             131 regenc.c             UChar* q;
UChar             151 regenc.c         UChar* start = (UChar* )s;
UChar             152 regenc.c         UChar* p = (UChar* )s;
UChar             156 regenc.c             UChar* q;
UChar             214 regenc.c       const UChar* OnigEncAsciiToLowerCaseTable = (const UChar* )0;
UChar             217 regenc.c       static const UChar BuiltInAsciiToLowerCaseTable[] = {
UChar             254 regenc.c       UChar OnigEncAsciiToUpperCaseTable[256] = {
UChar             326 regenc.c       UChar OnigEncISO_8859_1_ToLowerCaseTable[256] = {
UChar             362 regenc.c       UChar OnigEncISO_8859_1_ToUpperCaseTable[256] = {
UChar             401 regenc.c         if (table == (const UChar* )0) {
UChar             414 regenc.c       extern UChar*
UChar             630 regenc.c         const UChar* p = *pp;
UChar             668 regenc.c         *buf = (UChar )(code & 0xff);
UChar             672 regenc.c       extern UChar*
UChar             675 regenc.c         return (UChar* )s;
UChar             713 regenc.c         const UChar *p = *pp;
UChar             742 regenc.c         const UChar* p = *pp;
UChar             811 regenc.c         UChar *p = buf;
UChar             814 regenc.c           *p++ = (UChar )((code >>  8) & 0xff);
UChar             816 regenc.c         *p++ = (UChar )(code & 0xff);
UChar             828 regenc.c         UChar *p = buf;
UChar             831 regenc.c           *p++ = (UChar )((code >> 24) & 0xff);
UChar             834 regenc.c           *p++ = (UChar )((code >> 16) & 0xff);
UChar             837 regenc.c           *p++ = (UChar )((code >> 8) & 0xff);
UChar             839 regenc.c         *p++ = (UChar )(code & 0xff);
UChar             995 regenc.c         UChar* p = *pp;
UChar            1009 regenc.c       extern UChar*
UChar            1012 regenc.c         UChar *p;
UChar              87 regenc.h       ONIG_EXTERN UChar* onigenc_single_byte_left_adjust_char_head P_((const UChar* start, const UChar* s));
UChar             118 regenc.h       ONIG_EXTERN UChar OnigEncISO_8859_1_ToLowerCaseTable[];
UChar             119 regenc.h       ONIG_EXTERN UChar OnigEncISO_8859_1_ToUpperCaseTable[];
UChar             127 regenc.h       ONIG_EXTERN UChar*
UChar             134 regenc.h       ONIG_EXTERN const UChar* OnigEncAsciiToLowerCaseTable;
UChar             135 regenc.h       ONIG_EXTERN const UChar  OnigEncAsciiToUpperCaseTable[];
UChar             184 regerror.c       UChar *p, *q;
UChar             249 regerror.c       UChar *p, *s, *bp;
UChar             264 regerror.c         while (p < (UChar* )pat_end) {
UChar              24 regex.h          ONIGENC_MBC_ENC_LEN(OnigEncDefaultCharEncoding, (UChar* )(&c))
UChar             300 regexec.c            UChar *pcode;      /* byte code position */
UChar             301 regexec.c            UChar *pstr;       /* string position */
UChar             302 regexec.c            UChar *pstr_prev;  /* previous char position of pstr */
UChar             306 regexec.c            UChar *pcode;      /* byte code position (head of repeated target) */
UChar             314 regexec.c            UChar *pstr;       /* start/end position */
UChar             321 regexec.c            UChar *pstr;       /* start position */
UChar             325 regexec.c            UChar *ret_addr;   /* byte code position */
UChar             327 regexec.c            UChar *pstr;       /* string position */
UChar             364 regexec.c        const UChar* start;   /* search start position (for \G: BEGIN_POSITION) */
UChar             773 regexec.c                UChar* endp;\
UChar             783 regexec.c                      endp = (UChar* )k->u.mem.end;\
UChar             814 regexec.c                  UChar* endp;\
UChar             824 regexec.c                        endp = (UChar* )k->u.mem.end;\
UChar             899 regexec.c        UChar buf1[ONIGENC_MBC_NORMALIZE_MAXLEN];
UChar             900 regexec.c        UChar buf2[ONIGENC_MBC_NORMALIZE_MAXLEN];
UChar             901 regexec.c        UChar *p1, *p2, *end, *s2, *end2;
UChar            1177 regexec.c          UChar* p = ((BBuf* )(cc->mbuf))->p;
UChar            1203 regexec.c        static UChar FinishCode[] = { OP_FINISH };
UChar            1212 regexec.c        UChar *s, *q, *sbegin;
UChar            1213 regexec.c        UChar *p = reg->p;
UChar            1246 regexec.c        s = (UChar* )sstart;
UChar            1250 regexec.c            UChar *q, *bp, buf[50];
UChar            1287 regexec.c      		  rmt[i].rm_so = (UChar* )((void* )(mem_start_stk[i])) - str;
UChar            1291 regexec.c      				: (UChar* )((void* )mem_end_stk[i])) - str;
UChar            1307 regexec.c      		  region->beg[i] = (UChar* )((void* )mem_start_stk[i]) - str;
UChar            1311 regexec.c      				  : (UChar* )((void* )mem_end_stk[i])) - str;
UChar            1338 regexec.c                                                  stk, (UChar* )str, reg);
UChar            1381 regexec.c      	UChar *q, *ss, *sp, lowbuf[ONIGENC_MBC_NORMALIZE_MAXLEN];
UChar            1482 regexec.c      	UChar *ss, *sp, *q, *endp, lowbuf[ONIGENC_MBC_NORMALIZE_MAXLEN];
UChar            1623 regexec.c      	UChar *ss;
UChar            1684 regexec.c      	UChar *ss;
UChar            1689 regexec.c      	  s = (UChar* )end;
UChar            1735 regexec.c              UChar *ss;
UChar            2054 regexec.c      	UChar *pstart, *pend;
UChar            2065 regexec.c      	  pstart = (UChar* )((void* )mem_start_stk[mem]);
UChar            2069 regexec.c      		: (UChar* )((void* )mem_end_stk[mem]));
UChar            2086 regexec.c      	UChar *pstart, *pend;
UChar            2097 regexec.c      	  pstart = (UChar* )((void* )mem_start_stk[mem]);
UChar            2101 regexec.c      		: (UChar* )((void* )mem_end_stk[mem]));
UChar            2117 regexec.c      	UChar *pstart, *pend, *swork;
UChar            2129 regexec.c      	    pstart = (UChar* )((void* )mem_start_stk[mem]);
UChar            2133 regexec.c      		  : (UChar* )((void* )mem_end_stk[mem]));
UChar            2156 regexec.c      	UChar *pstart, *pend, *swork;
UChar            2168 regexec.c      	    pstart = (UChar* )((void* )mem_start_stk[mem]);
UChar            2172 regexec.c      		  : (UChar* )((void* )mem_end_stk[mem]));
UChar            2419 regexec.c                UChar* pcode = stkp->u.repeat.pcode;
UChar            2486 regexec.c            s = (UChar* )ONIGENC_STEP_BACK(encode, str, s, (int )tlen);
UChar            2488 regexec.c            sprev = (UChar* )onigenc_get_prev_char_head(encode, str, s);
UChar            2496 regexec.c            q = (UChar* )ONIGENC_STEP_BACK(encode, str, s, (int )tlen);
UChar            2506 regexec.c      	sprev = (UChar* )onigenc_get_prev_char_head(encode, str, s);
UChar            2577 regexec.c      static UChar*
UChar            2581 regexec.c        UChar *t, *p, *s, *end;
UChar            2583 regexec.c        end = (UChar* )text_end;
UChar            2588 regexec.c        s = (UChar* )text;
UChar            2605 regexec.c        return (UChar* )NULL;
UChar            2614 regexec.c        UChar *q, lowbuf[ONIGENC_MBC_NORMALIZE_MAXLEN];
UChar            2615 regexec.c        const UChar* tsave;
UChar            2616 regexec.c        const UChar* psave;
UChar            2643 regexec.c      static UChar*
UChar            2648 regexec.c        UChar *s, *end;
UChar            2650 regexec.c        end = (UChar* )text_end;
UChar            2655 regexec.c        s = (UChar* )text;
UChar            2664 regexec.c        return (UChar* )NULL;
UChar            2667 regexec.c      static UChar*
UChar            2672 regexec.c        UChar *t, *p, *s;
UChar            2674 regexec.c        s = (UChar* )text_end;
UChar            2677 regexec.c          s = (UChar* )text_start;
UChar            2693 regexec.c          s = (UChar* )onigenc_get_prev_char_head(enc, adjust_text, s);
UChar            2696 regexec.c        return (UChar* )NULL;
UChar            2699 regexec.c      static UChar*
UChar            2705 regexec.c        UChar *s;
UChar            2707 regexec.c        s = (UChar* )text_end;
UChar            2710 regexec.c          s = (UChar* )text_start;
UChar            2719 regexec.c          s = (UChar* )onigenc_get_prev_char_head(enc, adjust_text, s);
UChar            2722 regexec.c        return (UChar* )NULL;
UChar            2725 regexec.c      static UChar*
UChar            2730 regexec.c        const UChar *s, *t, *p, *end;
UChar            2731 regexec.c        const UChar *tail;
UChar            2757 regexec.c            if (t < target) return (UChar* )(p + 1);
UChar            2761 regexec.c            if (p >= text_end) return (UChar* )NULL;
UChar            2777 regexec.c            if (t < target) return (UChar* )(p + 1);
UChar            2781 regexec.c            if (p >= text_end) return (UChar* )NULL;
UChar            2790 regexec.c        return (UChar* )NULL;
UChar            2793 regexec.c      static UChar*
UChar            2797 regexec.c        const UChar *s, *t, *p, *end;
UChar            2798 regexec.c        const UChar *tail;
UChar            2813 regexec.c            if (t < target) return (UChar* )(p + 1);
UChar            2824 regexec.c            if (t < target) return (UChar* )(p + 1);
UChar            2828 regexec.c        return (UChar* )NULL;
UChar            2852 regexec.c      static UChar*
UChar            2857 regexec.c        const UChar *s, *t, *p;
UChar            2872 regexec.c            return (UChar* )s;
UChar            2878 regexec.c        return (UChar* )NULL;
UChar            2881 regexec.c      static UChar*
UChar            2885 regexec.c        const UChar *s = text;
UChar            2888 regexec.c          if (map[*s]) return (UChar* )s;
UChar            2892 regexec.c        return (UChar* )NULL;
UChar            2895 regexec.c      static UChar*
UChar            2900 regexec.c        const UChar *s = text_start;
UChar            2903 regexec.c          if (map[*s]) return (UChar* )s;
UChar            2907 regexec.c        return (UChar* )NULL;
UChar            2915 regexec.c        UChar *prev;
UChar            2950 regexec.c          prev = (UChar* )onigenc_get_prev_char_head(reg->enc, str, at);
UChar            2963 regexec.c        UChar *p, *pprev = (UChar* )NULL;
UChar            2976 regexec.c            UChar *q = p + reg->dmin;
UChar            3013 regexec.c            UChar* prev;
UChar            3027 regexec.c      	  prev = (UChar* )onigenc_get_prev_char_head(reg->enc,
UChar            3053 regexec.c      							      *low, (const UChar** )low_prev);
UChar            3090 regexec.c        UChar *p;
UChar            3130 regexec.c            UChar* prev;
UChar            3188 regexec.c        UChar *s, *prev;
UChar            3236 regexec.c          UChar* semi_end;
UChar            3262 regexec.c            semi_end = (UChar* )end;
UChar            3295 regexec.c            UChar* pre_end = ONIGENC_STEP_BACK(reg->enc, str, end, 1);
UChar            3304 regexec.c      	semi_end = (UChar* )end;
UChar            3313 regexec.c          static const UChar* address_for_empty_string = "";
UChar            3321 regexec.c            s = (UChar* )start;
UChar            3322 regexec.c            prev = (UChar* )NULL;
UChar            3338 regexec.c        s = (UChar* )start;
UChar            3343 regexec.c            prev = (UChar* )NULL;
UChar            3346 regexec.c            UChar *sch_range, *low, *high, *low_prev;
UChar            3348 regexec.c            sch_range = (UChar* )range;
UChar            3351 regexec.c      	  sch_range = (UChar* )end;
UChar            3354 regexec.c      	  if (sch_range > end) sch_range = (UChar* )end;
UChar            3386 regexec.c      				   &low, &high, (UChar** )NULL)) goto mismatch;
UChar            3398 regexec.c            UChar *low, *high, *adjrange, *sch_start;
UChar            3403 regexec.c      	adjrange = (UChar* )end;
UChar            3409 regexec.c      	  if (sch_start > end) sch_start = (UChar* )end;
UChar            3431 regexec.c      	    sch_start = (UChar* )end;
UChar            3434 regexec.c      	    if (sch_start > end) sch_start = (UChar* )end;
UChar             230 regint.h       #define NULL_UCHARP                   ((UChar* )0)
UChar             425 regint.h         UChar* p;
UChar             434 regint.h         (buf)->p = (UChar* )xrealloc((buf)->p, (buf)->alloc);\
UChar             440 regint.h         (buf)->p = (UChar* )xrealloc((buf)->p, (buf)->alloc);\
UChar             448 regint.h           (buf)->p = (UChar* )xrealloc((buf)->p, new_alloc);\
UChar             218 regparse.c         dest[len] = (UChar )0;
UChar             222 regparse.c     static UChar*
UChar             226 regparse.c       UChar *r;
UChar             231 regparse.c       r = (UChar* )xmalloc(slen + term_len);
UChar             236 regparse.c         r[slen + i] = (UChar )0;
UChar             245 regparse.c     #define PFETCH_READY  UChar* pfetch_prev
UChar             261 regparse.c     static UChar*
UChar             265 regparse.c       UChar* r;
UChar             268 regparse.c         r = (UChar* )xrealloc(dest, capa + 1);
UChar             270 regparse.c         r = (UChar* )xmalloc(capa + 1);
UChar             278 regparse.c     static UChar*
UChar             282 regparse.c       UChar* r;
UChar             284 regparse.c       r = (UChar* )xmalloc(capa + 1);
UChar             296 regparse.c       UChar* name;
UChar             482 regparse.c       int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*);
UChar             900 regparse.c       env->error             = (UChar* )NULL;
UChar             901 regparse.c       env->error_end         = (UChar* )NULL;
UChar            1147 regparse.c         bbuf->p     = (UChar* )((void* )mbr);
UChar            1343 regparse.c           UChar* p;
UChar            1373 regparse.c       UChar s[1];
UChar            1445 regparse.c       UChar p[1];
UChar            1454 regparse.c       const UChar *p;
UChar            1463 regparse.c           sn->end = (UChar* )p;
UChar            1483 regparse.c       UChar* p = *src;
UChar            1511 regparse.c       UChar* p = *src;
UChar            1539 regparse.c       UChar* p = *src;
UChar            2194 regparse.c       UChar* backp;
UChar            2196 regparse.c         UChar* s;
UChar            2214 regparse.c           UChar* name;
UChar            2215 regparse.c           UChar* name_end;
UChar            2231 regparse.c       UChar* p = *src;
UChar            2268 regparse.c         UChar* prev = p;
UChar            2321 regparse.c       UChar* p = *src;
UChar            2400 regparse.c       UChar *name_end;
UChar            2401 regparse.c       UChar *p = *src;
UChar            2474 regparse.c       UChar *name_end;
UChar            2476 regparse.c       UChar *p = *src;
UChar            2537 regparse.c     static UChar*
UChar            2543 regparse.c       UChar *q;
UChar            2544 regparse.c       UChar *p = from;
UChar            2572 regparse.c       UChar *q;
UChar            2573 regparse.c       UChar *p = from;
UChar            2611 regparse.c       UChar* prev;
UChar            2612 regparse.c       UChar* p = *src;
UChar            2821 regparse.c       UChar* prev;
UChar            2822 regparse.c       UChar* p = *src;
UChar            3135 regparse.c     	  UChar* name_end;
UChar            3178 regparse.c     	  UChar* name_end;
UChar            3593 regparse.c       UChar    *name;
UChar            3618 regparse.c         { (UChar* )NULL, -1, 0 }
UChar            3625 regparse.c       UChar *p = *src;
UChar            3640 regparse.c           p = (UChar* )onigenc_step(enc, p, end, pb->len);
UChar            3689 regparse.c         { (UChar* )NULL, -1, 0 }
UChar            3711 regparse.c       UChar *prev, *start, *p = *src;
UChar            3889 regparse.c       UChar* p = from;
UChar            3912 regparse.c       UChar *p;
UChar            3969 regparse.c     	UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN];
UChar            3970 regparse.c     	UChar* bufe = buf + ONIGENC_CODE_TO_MBC_MAXLEN;
UChar            3971 regparse.c     	UChar* psave = p;
UChar            4246 regparse.c       UChar* p = *src;
UChar            4288 regparse.c     	UChar *name;
UChar            4289 regparse.c     	UChar *name_end;
UChar            4554 regparse.c       UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN];
UChar            4748 regparse.c           *np = node_new_str_raw_char((UChar )tok->u.c);
UChar            4763 regparse.c     	r = node_str_cat_char(*np, (UChar )tok->u.c);
UChar            4772 regparse.c           UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN];
UChar            4787 regparse.c           UChar *qstart, *qend, *nextp;
UChar            5153 regparse.c       UChar* p;
UChar            5164 regparse.c       env->pattern     = (UChar* )pattern;
UChar            5165 regparse.c       env->pattern_end = (UChar* )end;
UChar            5169 regparse.c       p = (UChar* )pattern;
UChar            5170 regparse.c       r = parse_regexp(root, &p, (UChar* )end, env);
UChar             105 regparse.h       UChar* s;
UChar             106 regparse.h       UChar* end;
UChar             109 regparse.h       UChar  buf[NODE_STR_BUF_SIZE];
UChar             202 regparse.h       UChar*  name;
UChar             203 regparse.h       UChar*  name_end;
UChar             261 regparse.h       UChar*          pattern;
UChar             262 regparse.h       UChar*          pattern_end;
UChar             263 regparse.h       UChar*          error;
UChar             264 regparse.h       UChar*          error_end;
UChar             117 sjis.c           UChar *p = buf;
UChar             119 sjis.c           if ((code & 0xff00) != 0) *p++ = (UChar )(((code >>  8) & 0xff));
UChar             120 sjis.c           *p++ = (UChar )(code & 0xff);
UChar             133 sjis.c           const UChar* p = *pp;
UChar             187 sjis.c         static UChar*
UChar             190 sjis.c           const UChar *p;
UChar             193 sjis.c           if (s <= start) return (UChar* )s;
UChar             205 sjis.c           if (p + len > s) return (UChar* )p;
UChar             207 sjis.c           return (UChar* )(p + ((s - p) & ~1));
UChar             213 sjis.c           const UChar c = *s;
UChar              41 utf8.c         #define utf8_islead(c)     ((UChar )((c) & 0xc0) != 0x80)
UChar             143 utf8.c         #define UTF8_TRAILS(code, shift) (UChar )((((code) >> (shift)) & 0x3f) | 0x80)
UChar             144 utf8.c         #define UTF8_TRAIL0(code)        (UChar )(((code) & 0x3f) | 0x80)
UChar             147 utf8.c             *buf = (UChar )code;
UChar             151 utf8.c             UChar *p = buf;
UChar             154 utf8.c               *p++ = (UChar )(((code>>6)& 0x1f) | 0xc0);
UChar             157 utf8.c               *p++ = (UChar )(((code>>12) & 0x0f) | 0xe0);
UChar             161 utf8.c               *p++ = (UChar )(((code>>18) & 0x07) | 0xf0);
UChar             166 utf8.c               *p++ = (UChar )(((code>>24) & 0x03) | 0xf8);
UChar             172 utf8.c               *p++ = (UChar )(((code>>30) & 0x01) | 0xfc);
UChar             200 utf8.c           const UChar* p = *pp;
UChar             229 utf8.c                 if (c <= (UChar )'\236' &&  /* upper */
UChar             231 utf8.c                   if (c != (UChar )'\227') {
UChar             233 utf8.c                     *lower   = (UChar )(c + 32);
UChar             239 utf8.c                 else if (c == (UChar )'\237' &&
UChar             265 utf8.c           const UChar* p = *pp;
UChar             289 utf8.c                   if (c <= (UChar )'\236') { /* upper */
UChar             290 utf8.c                     if (c == (UChar )'\227') return FALSE;
UChar             293 utf8.c                   else if (c >= (UChar )'\240' && c <= (UChar )'\276') { /* lower */
UChar             294 utf8.c                     if (c == (UChar )'\267') return FALSE;
UChar             298 utf8.c                 else if (c == (UChar )'\237' &&
UChar            3683 utf8.c           return onig_is_in_code_range((UChar* )range, code);
UChar            3698 utf8.c         static UChar*
UChar            3701 utf8.c           const UChar *p;
UChar            3703 utf8.c           if (s <= start) return (UChar* )s;
UChar            3707 utf8.c           return (UChar* )p;


UINT2NUM

UINT2NUM           66 ext/Win32API/Win32API.c     rb_iv_set(self, "__dll__", UINT2NUM((unsigned long)hdll));
UINT2NUM           68 ext/Win32API/Win32API.c     rb_iv_set(self, "__proc__", UINT2NUM((unsigned long)hproc));
UINT2NUM          422 ext/curses/curses.c     return UINT2NUM(getch());
UINT2NUM          716 ext/curses/curses.c   return (UINT2NUM(mdata->mevent -> mem)); \
UINT2NUM         1151 ext/curses/curses.c     return UINT2NUM(wgetch(winp->window));
UINT2NUM         1581 ext/curses/curses.c #define rb_curses_define_const(c) rb_define_const(mCurses,#c,UINT2NUM(c))
UINT2NUM          316 file.c             return UINT2NUM((unsigned short)(get_stat(self)->st_mode));
UINT2NUM          318 file.c             return UINT2NUM(get_stat(self)->st_mode);
UINT2NUM          337 file.c             return UINT2NUM(get_stat(self)->st_nlink);
UINT2NUM          354 file.c             return UINT2NUM(get_stat(self)->st_uid);
UINT2NUM          370 file.c             return UINT2NUM(get_stat(self)->st_gid);
UINT2NUM         1122 file.c         	return UINT2NUM(st.st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
UINT2NUM         1184 file.c         	return UINT2NUM(st.st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
UINT2NUM         3702 file.c               return UINT2NUM(get_stat(obj)->st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
UINT2NUM         3788 file.c               return UINT2NUM(get_stat(obj)->st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
UINT2NUM         1533 pack.c         		rb_ary_push(ary, UINT2NUM(tmp));
UINT2NUM         1584 pack.c         		rb_ary_push(ary, UINT2NUM(ntohs(tmp)));
UINT2NUM         1606 pack.c         		rb_ary_push(ary, UINT2NUM(vtohs(tmp)));
UINT2NUM         1895 process.c      # define RLIM2NUM(v) UINT2NUM(v)
UINT2NUM          158 ruby.h         #define ULONG2NUM(v) UINT2NUM(v)


ULL

ULL                71 ext/digest/sha2/sha2.c #define ULL(number)	number##ULL
ULL                94 ext/digest/sha2/sha2.c 	tmp = ((tmp & ULL(0xff00ff00ff00ff00)) >> 8) | \
ULL                95 ext/digest/sha2/sha2.c 	      ((tmp & ULL(0x00ff00ff00ff00ff)) << 8); \
ULL                96 ext/digest/sha2/sha2.c 	(x) = ((tmp & ULL(0xffff0000ffff0000)) >> 16) | \
ULL                97 ext/digest/sha2/sha2.c 	      ((tmp & ULL(0x0000ffff0000ffff)) << 16); \
ULL               218 ext/digest/sha2/sha2.c 	ULL(0x428a2f98d728ae22), ULL(0x7137449123ef65cd),
ULL               219 ext/digest/sha2/sha2.c 	ULL(0xb5c0fbcfec4d3b2f), ULL(0xe9b5dba58189dbbc),
ULL               220 ext/digest/sha2/sha2.c 	ULL(0x3956c25bf348b538), ULL(0x59f111f1b605d019),
ULL               221 ext/digest/sha2/sha2.c 	ULL(0x923f82a4af194f9b), ULL(0xab1c5ed5da6d8118),
ULL               222 ext/digest/sha2/sha2.c 	ULL(0xd807aa98a3030242), ULL(0x12835b0145706fbe),
ULL               223 ext/digest/sha2/sha2.c 	ULL(0x243185be4ee4b28c), ULL(0x550c7dc3d5ffb4e2),
ULL               224 ext/digest/sha2/sha2.c 	ULL(0x72be5d74f27b896f), ULL(0x80deb1fe3b1696b1),
ULL               225 ext/digest/sha2/sha2.c 	ULL(0x9bdc06a725c71235), ULL(0xc19bf174cf692694),
ULL               226 ext/digest/sha2/sha2.c 	ULL(0xe49b69c19ef14ad2), ULL(0xefbe4786384f25e3),
ULL               227 ext/digest/sha2/sha2.c 	ULL(0x0fc19dc68b8cd5b5), ULL(0x240ca1cc77ac9c65),
ULL               228 ext/digest/sha2/sha2.c 	ULL(0x2de92c6f592b0275), ULL(0x4a7484aa6ea6e483),
ULL               229 ext/digest/sha2/sha2.c 	ULL(0x5cb0a9dcbd41fbd4), ULL(0x76f988da831153b5),
ULL               230 ext/digest/sha2/sha2.c 	ULL(0x983e5152ee66dfab), ULL(0xa831c66d2db43210),
ULL               231 ext/digest/sha2/sha2.c 	ULL(0xb00327c898fb213f), ULL(0xbf597fc7beef0ee4),
ULL               232 ext/digest/sha2/sha2.c 	ULL(0xc6e00bf33da88fc2), ULL(0xd5a79147930aa725),
ULL               233 ext/digest/sha2/sha2.c 	ULL(0x06ca6351e003826f), ULL(0x142929670a0e6e70),
ULL               234 ext/digest/sha2/sha2.c 	ULL(0x27b70a8546d22ffc), ULL(0x2e1b21385c26c926),
ULL               235 ext/digest/sha2/sha2.c 	ULL(0x4d2c6dfc5ac42aed), ULL(0x53380d139d95b3df),
ULL               236 ext/digest/sha2/sha2.c 	ULL(0x650a73548baf63de), ULL(0x766a0abb3c77b2a8),
ULL               237 ext/digest/sha2/sha2.c 	ULL(0x81c2c92e47edaee6), ULL(0x92722c851482353b),
ULL               238 ext/digest/sha2/sha2.c 	ULL(0xa2bfe8a14cf10364), ULL(0xa81a664bbc423001),
ULL               239 ext/digest/sha2/sha2.c 	ULL(0xc24b8b70d0f89791), ULL(0xc76c51a30654be30),
ULL               240 ext/digest/sha2/sha2.c 	ULL(0xd192e819d6ef5218), ULL(0xd69906245565a910),
ULL               241 ext/digest/sha2/sha2.c 	ULL(0xf40e35855771202a), ULL(0x106aa07032bbd1b8),
ULL               242 ext/digest/sha2/sha2.c 	ULL(0x19a4c116b8d2d0c8), ULL(0x1e376c085141ab53),
ULL               243 ext/digest/sha2/sha2.c 	ULL(0x2748774cdf8eeb99), ULL(0x34b0bcb5e19b48a8),
ULL               244 ext/digest/sha2/sha2.c 	ULL(0x391c0cb3c5c95a63), ULL(0x4ed8aa4ae3418acb),
ULL               245 ext/digest/sha2/sha2.c 	ULL(0x5b9cca4f7763e373), ULL(0x682e6ff3d6b2b8a3),
ULL               246 ext/digest/sha2/sha2.c 	ULL(0x748f82ee5defb2fc), ULL(0x78a5636f43172f60),
ULL               247 ext/digest/sha2/sha2.c 	ULL(0x84c87814a1f0ab72), ULL(0x8cc702081a6439ec),
ULL               248 ext/digest/sha2/sha2.c 	ULL(0x90befffa23631e28), ULL(0xa4506cebde82bde9),
ULL               249 ext/digest/sha2/sha2.c 	ULL(0xbef9a3f7b2c67915), ULL(0xc67178f2e372532b),
ULL               250 ext/digest/sha2/sha2.c 	ULL(0xca273eceea26619c), ULL(0xd186b8c721c0c207),
ULL               251 ext/digest/sha2/sha2.c 	ULL(0xeada7dd6cde0eb1e), ULL(0xf57d4f7fee6ed178),
ULL               252 ext/digest/sha2/sha2.c 	ULL(0x06f067aa72176fba), ULL(0x0a637dc5a2c898a6),
ULL               253 ext/digest/sha2/sha2.c 	ULL(0x113f9804bef90dae), ULL(0x1b710b35131c471b),
ULL               254 ext/digest/sha2/sha2.c 	ULL(0x28db77f523047d84), ULL(0x32caab7b40c72493),
ULL               255 ext/digest/sha2/sha2.c 	ULL(0x3c9ebe0a15c9bebc), ULL(0x431d67c49c100d4c),
ULL               256 ext/digest/sha2/sha2.c 	ULL(0x4cc5d4becb3e42b6), ULL(0x597f299cfc657e2a),
ULL               257 ext/digest/sha2/sha2.c 	ULL(0x5fcb6fab3ad6faec), ULL(0x6c44198c4a475817)
ULL               262 ext/digest/sha2/sha2.c 	ULL(0xcbbb9d5dc1059ed8),
ULL               263 ext/digest/sha2/sha2.c 	ULL(0x629a292a367cd507),
ULL               264 ext/digest/sha2/sha2.c 	ULL(0x9159015a3070dd17),
ULL               265 ext/digest/sha2/sha2.c 	ULL(0x152fecd8f70e5939),
ULL               266 ext/digest/sha2/sha2.c 	ULL(0x67332667ffc00b31),
ULL               267 ext/digest/sha2/sha2.c 	ULL(0x8eb44a8768581511),
ULL               268 ext/digest/sha2/sha2.c 	ULL(0xdb0c2e0d64f98fa7),
ULL               269 ext/digest/sha2/sha2.c 	ULL(0x47b5481dbefa4fa4)
ULL               274 ext/digest/sha2/sha2.c 	ULL(0x6a09e667f3bcc908),
ULL               275 ext/digest/sha2/sha2.c 	ULL(0xbb67ae8584caa73b),
ULL               276 ext/digest/sha2/sha2.c 	ULL(0x3c6ef372fe94f82b),
ULL               277 ext/digest/sha2/sha2.c 	ULL(0xa54ff53a5f1d36f1),
ULL               278 ext/digest/sha2/sha2.c 	ULL(0x510e527fade682d1),
ULL               279 ext/digest/sha2/sha2.c 	ULL(0x9b05688c2b3e6c1f),
ULL               280 ext/digest/sha2/sha2.c 	ULL(0x1f83d9abfb41bd6b),
ULL               281 ext/digest/sha2/sha2.c 	ULL(0x5be0cd19137e2179)


ULL2NUM

ULL2NUM           141 ext/dl/dl.h    # define PTR2NUM(x)   (ULL2NUM((unsigned long long)(x)))
ULL2NUM           293 file.c             return ULL2NUM(get_stat(self)->st_ino);
ULL2NUM          1901 process.c      # define RLIM2NUM(v) ULL2NUM(v)


ULONG

ULONG             100 ext/win32ole/win32ole.c     STDMETHOD_(ULONG, AddRef)(PEVENTSINK);
ULONG             101 ext/win32ole/win32ole.c     STDMETHOD_(ULONG, Release)(PEVENTSINK);
ULONG             216 ext/win32ole/win32ole.c     ULONG refcount;
ULONG             247 ext/win32ole/win32ole.c     ULONG u = --(p->refcount);
ULONG            1625 ext/win32ole/win32ole.c     ULONG eaten = 0;
ULONG            1853 ext/win32ole/win32ole.c static ULONG
ULONG            1857 ext/win32ole/win32ole.c     ULONG n = 0;
ULONG            1897 ext/win32ole/win32ole.c     ULONG n = 0;
ULONG            6191 ext/win32ole/win32ole.c STDMETHODIMP_(ULONG)
ULONG            6199 ext/win32ole/win32ole.c STDMETHODIMP_(ULONG) EVENTSINK_Release(


ULONG2NUM

ULONG2NUM         137 ext/dl/dl.h    # define PTR2NUM(x)   (ULONG2NUM((unsigned long)(x)))
ULONG2NUM          25 ext/io/wait/wait.c #define ioctl_arg2num(i) ULONG2NUM(i)
ULONG2NUM         279 ext/openssl/ossl_x509name.c     return ULONG2NUM(hash);
ULONG2NUM         340 ext/openssl/ossl_x509name.c     rb_define_const(cX509Name, "COMPAT", ULONG2NUM(XN_FLAG_COMPAT));
ULONG2NUM         341 ext/openssl/ossl_x509name.c     rb_define_const(cX509Name, "RFC2253", ULONG2NUM(XN_FLAG_RFC2253));
ULONG2NUM         342 ext/openssl/ossl_x509name.c     rb_define_const(cX509Name, "ONELINE", ULONG2NUM(XN_FLAG_ONELINE));
ULONG2NUM         343 ext/openssl/ossl_x509name.c     rb_define_const(cX509Name, "MULTILINE", ULONG2NUM(XN_FLAG_MULTILINE));
ULONG2NUM          66 ext/racc/cparse/cparse.c # define id_to_value(i) ULONG2NUM(i)
ULONG2NUM        1197 ext/stringio/stringio.c     return ULONG2NUM(RSTRING(string)->len);
ULONG2NUM         113 ext/tk/tkutil/tkutil.c     id_num = ULONG2NUM(CALLBACK_ID_NUM++);
ULONG2NUM         250 file.c             return ULONG2NUM(major(dev));
ULONG2NUM         272 file.c             return ULONG2NUM(minor(dev));
ULONG2NUM         295 file.c             return ULONG2NUM(get_stat(self)->st_ino);
ULONG2NUM         390 file.c             return ULONG2NUM(get_stat(self)->st_rdev);
ULONG2NUM         412 file.c             return ULONG2NUM(major(rdev));
ULONG2NUM         434 file.c             return ULONG2NUM(minor(rdev));
ULONG2NUM         470 file.c             return ULONG2NUM(get_stat(self)->st_blksize);
ULONG2NUM         491 file.c             return ULONG2NUM(get_stat(self)->st_blocks);
ULONG2NUM        1555 pack.c         		rb_ary_push(ary, ULONG2NUM(tmp));
ULONG2NUM        1595 pack.c         		rb_ary_push(ary, ULONG2NUM(ntohl(tmp)));
ULONG2NUM        1617 pack.c         		rb_ary_push(ary, ULONG2NUM(vtohl(tmp)));
ULONG2NUM        1710 pack.c         		rb_ary_push(ary, ULONG2NUM(l));
ULONG2NUM        1946 pack.c         			rb_ary_push(ary, ULONG2NUM(ul));
ULONG2NUM        9269 parse.y            return ULONG2NUM(obj);
ULONG2NUM        1898 process.c      # define RLIM2NUM(v) ULONG2NUM(v)


UNESCAPE

UNESCAPE          244 dir.c              if (period && *s == '.' && *UNESCAPE(p) != '.') /* leading period */
UNESCAPE          251 dir.c          	    if (ISEND(UNESCAPE(p))) {
UNESCAPE          252 dir.c          		p = UNESCAPE(p);
UNESCAPE          282 dir.c          	p = UNESCAPE(p);


UNICODE_NORMALIZATION

UNICODE_NORMALIZATION   66 ext/nkf/nkf-utf8/config.h #ifdef UNICODE_NORMALIZATION
UNICODE_NORMALIZATION  412 ext/nkf/nkf-utf8/nkf.c #ifdef UNICODE_NORMALIZATION
UNICODE_NORMALIZATION  968 ext/nkf/nkf-utf8/nkf.c #ifdef UNICODE_NORMALIZATION
UNICODE_NORMALIZATION 1118 ext/nkf/nkf-utf8/nkf.c #ifdef UNICODE_NORMALIZATION
UNICODE_NORMALIZATION 1897 ext/nkf/nkf-utf8/nkf.c #ifdef UNICODE_NORMALIZATION
UNICODE_NORMALIZATION 3962 ext/nkf/nkf-utf8/nkf.c #ifdef UNICODE_NORMALIZATION
UNICODE_NORMALIZATION 4760 ext/nkf/nkf-utf8/nkf.c #ifdef UNICODE_NORMALIZATION
UNICODE_NORMALIZATION 4919 ext/nkf/nkf-utf8/nkf.c #ifdef UNICODE_NORMALIZATION
UNICODE_NORMALIZATION 6275 ext/nkf/nkf-utf8/utf8tbl.c #ifdef UNICODE_NORMALIZATION


USE_APPLICATION_TO_LOWER_CASE_TABLE

USE_APPLICATION_TO_LOWER_CASE_TABLE  216 regenc.c       #ifndef USE_APPLICATION_TO_LOWER_CASE_TABLE
USE_APPLICATION_TO_LOWER_CASE_TABLE  402 regenc.c       #ifndef USE_APPLICATION_TO_LOWER_CASE_TABLE


USE_CAPTURE_HISTORY

USE_CAPTURE_HISTORY   32 regexec.c      #ifdef USE_CAPTURE_HISTORY
USE_CAPTURE_HISTORY  158 regexec.c      #ifdef USE_CAPTURE_HISTORY
USE_CAPTURE_HISTORY  248 regexec.c      #ifdef USE_CAPTURE_HISTORY
USE_CAPTURE_HISTORY  282 regexec.c      #ifdef USE_CAPTURE_HISTORY
USE_CAPTURE_HISTORY  949 regexec.c      #ifdef USE_CAPTURE_HISTORY
USE_CAPTURE_HISTORY 1318 regexec.c      #ifdef USE_CAPTURE_HISTORY
USE_CAPTURE_HISTORY 3524 regexec.c      #ifdef USE_CAPTURE_HISTORY


USE_COLOR

USE_COLOR         587 ext/curses/curses.c #ifdef USE_COLOR
USE_COLOR        1248 ext/curses/curses.c #if defined(USE_COLOR) && defined(HAVE_WCOLOR_SET)
USE_COLOR        1506 ext/curses/curses.c #ifdef USE_COLOR
USE_COLOR        1541 ext/curses/curses.c #if defined(USE_COLOR) && defined(HAVE_WCOLOR_SET)
USE_COLOR        1583 ext/curses/curses.c #ifdef USE_COLOR


USE_DLN_A_OUT

USE_DLN_A_OUT      26 dln.c          #ifdef USE_DLN_A_OUT
USE_DLN_A_OUT      96 dln.c          #if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX) && !defined(__APPLE__) && !defined(_UNICOSMP)
USE_DLN_A_OUT     147 dln.c          #ifdef USE_DLN_A_OUT
USE_DLN_A_OUT    1164 dln.c          #ifdef USE_DLN_A_OUT
USE_DLN_A_OUT    1301 dln.c          #ifdef USE_DLN_A_OUT
USE_DLN_A_OUT      35 dln.h          #ifdef USE_DLN_A_OUT
USE_DLN_A_OUT    1183 ruby.c         #if defined(USE_DLN_A_OUT)
USE_DLN_A_OUT    1206 ruby.c         #if defined(USE_DLN_A_OUT)
USE_DLN_A_OUT     709 ruby.h         #if defined(EXTLIB) && defined(USE_DLN_A_OUT)


USE_DLN_DLOPEN

USE_DLN_DLOPEN   1118 dln.c          #ifdef USE_DLN_DLOPEN
USE_DLN_DLOPEN   1185 dln.c          #ifdef USE_DLN_DLOPEN
USE_DLN_DLOPEN   1313 dln.c          #ifdef USE_DLN_DLOPEN


USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK

USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK 1663 regcomp.c      #ifdef USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK
USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK 3139 regcomp.c      #ifdef USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK
USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK 2247 regexec.c      #ifdef USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK
USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK 2275 regexec.c      #ifdef USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK


USE_INTERRUPT_WINSOCK

USE_INTERRUPT_WINSOCK   61 win32/win32.c  #if USE_INTERRUPT_WINSOCK
USE_INTERRUPT_WINSOCK 2021 win32/win32.c  #if !USE_INTERRUPT_WINSOCK
USE_INTERRUPT_WINSOCK 2031 win32/win32.c  #if !USE_INTERRUPT_WINSOCK
USE_INTERRUPT_WINSOCK 2064 win32/win32.c  #if USE_INTERRUPT_WINSOCK
USE_INTERRUPT_WINSOCK 2102 win32/win32.c  #if USE_INTERRUPT_WINSOCK
USE_INTERRUPT_WINSOCK 2151 win32/win32.c  #if USE_INTERRUPT_WINSOCK


USE_INVALID_CODE_SCHEME

USE_INVALID_CODE_SCHEME   34 utf8.c         #ifdef USE_INVALID_CODE_SCHEME
USE_INVALID_CODE_SCHEME   86 utf8.c         #ifdef USE_INVALID_CODE_SCHEME
USE_INVALID_CODE_SCHEME  108 utf8.c         #ifdef USE_INVALID_CODE_SCHEME
USE_INVALID_CODE_SCHEME  178 utf8.c         #ifdef USE_INVALID_CODE_SCHEME
USE_INVALID_CODE_SCHEME 3688 utf8.c         #ifdef USE_INVALID_CODE_SCHEME


USE_MOUSE

USE_MOUSE          63 ext/curses/curses.c #ifdef USE_MOUSE
USE_MOUSE         653 ext/curses/curses.c #ifdef USE_MOUSE
USE_MOUSE        1450 ext/curses/curses.c #ifdef USE_MOUSE
USE_MOUSE        1518 ext/curses/curses.c #ifdef USE_MOUSE
USE_MOUSE        1632 ext/curses/curses.c #ifdef USE_MOUSE
USE_MOUSE        1710 ext/curses/curses.c #if defined(KEY_MOUSE) && defined(USE_MOUSE)


USE_MULTI_THREAD_SYSTEM

USE_MULTI_THREAD_SYSTEM 4649 regcomp.c      #ifdef USE_MULTI_THREAD_SYSTEM
USE_MULTI_THREAD_SYSTEM 2918 regexec.c      #ifdef USE_MULTI_THREAD_SYSTEM
USE_MULTI_THREAD_SYSTEM 3191 regexec.c      #ifdef USE_MULTI_THREAD_SYSTEM
USE_MULTI_THREAD_SYSTEM  127 regint.h       #ifdef USE_MULTI_THREAD_SYSTEM


USE_NAMED_GROUP

USE_NAMED_GROUP  1457 regcomp.c      #ifdef USE_NAMED_GROUP
USE_NAMED_GROUP  2774 regcomp.c      #ifdef USE_NAMED_GROUP
USE_NAMED_GROUP  2788 regcomp.c      #ifdef USE_NAMED_GROUP
USE_NAMED_GROUP  4578 regcomp.c      #ifdef USE_NAMED_GROUP
USE_NAMED_GROUP  4706 regcomp.c      #ifdef USE_NAMED_GROUP
USE_NAMED_GROUP  4760 regcomp.c      #ifdef USE_NAMED_GROUP
USE_NAMED_GROUP  4848 regcomp.c      #ifdef USE_NAMED_GROUP
USE_NAMED_GROUP   128 regerror.c     #ifdef USE_NAMED_GROUP
USE_NAMED_GROUP   146 regerror.c     #ifdef USE_NAMED_GROUP
USE_NAMED_GROUP   291 regparse.c     #ifdef USE_NAMED_GROUP
USE_NAMED_GROUP   904 regparse.c     #ifdef USE_NAMED_GROUP
USE_NAMED_GROUP  2388 regparse.c     #ifdef USE_NAMED_GROUP
USE_NAMED_GROUP  3130 regparse.c     #ifdef USE_NAMED_GROUP
USE_NAMED_GROUP  4286 regparse.c     #ifdef USE_NAMED_GROUP
USE_NAMED_GROUP  4320 regparse.c     #ifdef USE_NAMED_GROUP
USE_NAMED_GROUP  4425 regparse.c     #ifdef USE_NAMED_GROUP
USE_NAMED_GROUP  5155 regparse.c     #ifdef USE_NAMED_GROUP
USE_NAMED_GROUP   271 regparse.h     #ifdef USE_NAMED_GROUP
USE_NAMED_GROUP   285 regparse.h     #ifdef USE_NAMED_GROUP
USE_NAMED_GROUP   311 regparse.h     #ifdef USE_NAMED_GROUP


USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE

USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE 1935 regexec.c      #ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE
USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE 1941 regexec.c      #ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE
USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE 1954 regexec.c      #ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE
USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE 1960 regexec.c      #ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE


USE_POSIX_REGION_OPTION

USE_POSIX_REGION_OPTION 1276 regexec.c      #ifdef USE_POSIX_REGION_OPTION
USE_POSIX_REGION_OPTION 1345 regexec.c      #ifdef USE_POSIX_REGION_OPTION
USE_POSIX_REGION_OPTION 2940 regexec.c      #ifdef USE_POSIX_REGION_OPTION
USE_POSIX_REGION_OPTION 3217 regexec.c      #ifdef USE_POSIX_REGION_OPTION
USE_POSIX_REGION_OPTION 3462 regexec.c      #ifdef USE_POSIX_REGION_OPTION


USE_RECYCLE_NODE

USE_RECYCLE_NODE 4994 regcomp.c      #ifdef USE_RECYCLE_NODE
USE_RECYCLE_NODE  958 regparse.c     #ifdef USE_RECYCLE_NODE
USE_RECYCLE_NODE  986 regparse.c     #ifdef USE_RECYCLE_NODE
USE_RECYCLE_NODE 1037 regparse.c     #ifdef USE_RECYCLE_NODE
USE_RECYCLE_NODE 1051 regparse.c     #ifdef USE_RECYCLE_NODE
USE_RECYCLE_NODE 1073 regparse.c     #ifdef USE_RECYCLE_NODE


USE_SETVBUF

USE_SETVBUF      2590 io.c           #ifdef USE_SETVBUF
USE_SETVBUF      2632 io.c           #ifdef USE_SETVBUF
USE_SETVBUF      3424 io.c           #ifdef USE_SETVBUF


USE_SHARED_CCLASS_TABLE

USE_SHARED_CCLASS_TABLE 4998 regcomp.c      #ifdef USE_SHARED_CCLASS_TABLE
USE_SHARED_CCLASS_TABLE 4604 regparse.c     #ifdef USE_SHARED_CCLASS_TABLE
USE_SHARED_CCLASS_TABLE 4821 regparse.c     #ifdef USE_SHARED_CCLASS_TABLE
USE_SHARED_CCLASS_TABLE 4875 regparse.c     #ifdef USE_SHARED_CCLASS_TABLE


USE_ST_HASH_TABLE

USE_ST_HASH_TABLE  304 regparse.c     #ifdef USE_ST_HASH_TABLE
USE_ST_HASH_TABLE  716 regparse.c     #ifdef USE_ST_HASH_TABLE


USE_SUBEXP_CALL

USE_SUBEXP_CALL   138 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL   361 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL   673 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL   955 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  1013 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  1043 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  1281 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  1429 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  1643 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  1681 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  1761 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  1832 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  1927 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  1957 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  2056 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  2084 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  2340 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  2472 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  3103 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  4174 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  4256 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  4736 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  4778 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  4823 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  4840 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  4859 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  5490 regcomp.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL   323 regexec.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  2008 regexec.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  2268 regexec.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  2517 regexec.c      #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  1253 regparse.c     #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  1319 regparse.c     #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  3173 regparse.c     #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL  4978 regparse.c     #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL   186 regparse.h     #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL   230 regparse.h     #ifdef USE_SUBEXP_CALL
USE_SUBEXP_CALL   267 regparse.h     #ifdef USE_SUBEXP_CALL


USE_UNICODE_FULL_RANGE_CTYPE

USE_UNICODE_FULL_RANGE_CTYPE  320 utf8.c         #ifdef USE_UNICODE_FULL_RANGE_CTYPE
USE_UNICODE_FULL_RANGE_CTYPE  331 utf8.c         #ifdef USE_UNICODE_FULL_RANGE_CTYPE
USE_UNICODE_FULL_RANGE_CTYPE  748 utf8.c         #ifdef USE_UNICODE_FULL_RANGE_CTYPE
USE_UNICODE_FULL_RANGE_CTYPE  759 utf8.c         #ifdef USE_UNICODE_FULL_RANGE_CTYPE
USE_UNICODE_FULL_RANGE_CTYPE 1159 utf8.c         #ifdef USE_UNICODE_FULL_RANGE_CTYPE
USE_UNICODE_FULL_RANGE_CTYPE 1165 utf8.c         #ifdef USE_UNICODE_FULL_RANGE_CTYPE
USE_UNICODE_FULL_RANGE_CTYPE 1183 utf8.c         #ifdef USE_UNICODE_FULL_RANGE_CTYPE
USE_UNICODE_FULL_RANGE_CTYPE 1190 utf8.c         #ifdef USE_UNICODE_FULL_RANGE_CTYPE
USE_UNICODE_FULL_RANGE_CTYPE 1217 utf8.c         #ifdef USE_UNICODE_FULL_RANGE_CTYPE
USE_UNICODE_FULL_RANGE_CTYPE 1222 utf8.c         #ifdef USE_UNICODE_FULL_RANGE_CTYPE
USE_UNICODE_FULL_RANGE_CTYPE 1254 utf8.c         #ifdef USE_UNICODE_FULL_RANGE_CTYPE
USE_UNICODE_FULL_RANGE_CTYPE 1260 utf8.c         #ifdef USE_UNICODE_FULL_RANGE_CTYPE
USE_UNICODE_FULL_RANGE_CTYPE 1674 utf8.c         #ifdef USE_UNICODE_FULL_RANGE_CTYPE
USE_UNICODE_FULL_RANGE_CTYPE 1684 utf8.c         #ifdef USE_UNICODE_FULL_RANGE_CTYPE
USE_UNICODE_FULL_RANGE_CTYPE 2114 utf8.c         #ifdef USE_UNICODE_FULL_RANGE_CTYPE
USE_UNICODE_FULL_RANGE_CTYPE 2121 utf8.c         #ifdef USE_UNICODE_FULL_RANGE_CTYPE
USE_UNICODE_FULL_RANGE_CTYPE 2541 utf8.c         #ifdef USE_UNICODE_FULL_RANGE_CTYPE
USE_UNICODE_FULL_RANGE_CTYPE 2551 utf8.c         #ifdef USE_UNICODE_FULL_RANGE_CTYPE
USE_UNICODE_FULL_RANGE_CTYPE 2635 utf8.c         #ifdef USE_UNICODE_FULL_RANGE_CTYPE
USE_UNICODE_FULL_RANGE_CTYPE 2642 utf8.c         #ifdef USE_UNICODE_FULL_RANGE_CTYPE
USE_UNICODE_FULL_RANGE_CTYPE 2660 utf8.c         #ifdef USE_UNICODE_FULL_RANGE_CTYPE
USE_UNICODE_FULL_RANGE_CTYPE 2667 utf8.c         #ifdef USE_UNICODE_FULL_RANGE_CTYPE
USE_UNICODE_FULL_RANGE_CTYPE 3111 utf8.c         #ifdef USE_UNICODE_FULL_RANGE_CTYPE
USE_UNICODE_FULL_RANGE_CTYPE 3123 utf8.c         #ifndef USE_UNICODE_FULL_RANGE_CTYPE
USE_UNICODE_FULL_RANGE_CTYPE 3624 utf8.c         #ifdef USE_UNICODE_FULL_RANGE_CTYPE
USE_UNICODE_FULL_RANGE_CTYPE 3632 utf8.c         #ifdef USE_UNICODE_FULL_RANGE_CTYPE


USE_VARIABLE_META_CHARS

USE_VARIABLE_META_CHARS 3238 regparse.c     #ifdef USE_VARIABLE_META_CHARS
USE_VARIABLE_META_CHARS 3259 regparse.c     #ifdef USE_VARIABLE_META_CHARS
USE_VARIABLE_META_CHARS 3267 regparse.c     #ifdef USE_VARIABLE_META_CHARS
USE_VARIABLE_META_CHARS 3278 regparse.c     #ifdef USE_VARIABLE_META_CHARS
USE_VARIABLE_META_CHARS 3289 regparse.c     #ifdef USE_VARIABLE_META_CHARS
USE_VARIABLE_META_CHARS 3394 regparse.c     #ifdef USE_VARIABLE_META_CHARS


USE_WORD_BEGIN_END

USE_WORD_BEGIN_END 1152 regcomp.c      #ifdef USE_WORD_BEGIN_END
USE_WORD_BEGIN_END 5462 regcomp.c      #ifdef USE_WORD_BEGIN_END
USE_WORD_BEGIN_END 1884 regexec.c      #ifdef USE_WORD_BEGIN_END
USE_WORD_BEGIN_END 2944 regparse.c     #ifdef USE_WORD_BEGIN_END


USHORT

USHORT           2159 ext/win32ole/win32ole.c     USHORT wFlags;
USHORT           2391 ext/win32ole/win32ole.c     USHORT dispkind;
USHORT           2695 ext/win32ole/win32ole.c     USHORT wFlags = DISPATCH_PROPERTYPUT;
USHORT           5996 ext/win32ole/win32ole.c     USHORT mask;
USHORT           6106 ext/win32ole/win32ole.c     USHORT wParamFlags;
USHORT           6107 ext/win32ole/win32ole.c     USHORT mask = PARAMFLAG_FOPT|PARAMFLAG_FHASDEFAULT;


USTR

USTR             2741 string.c       	    t->now = *(USTR)t->p++;
USTR             2745 string.c       		    if (t->now > *(USTR)t->p) {
USTR             2750 string.c       		    t->max = *(USTR)t->p++;


UTF16BE_INPUT

UTF16BE_INPUT     490 ext/nkf/nkf-utf8/nkf.c STATIC int             utf16_mode = UTF16BE_INPUT;
UTF16BE_INPUT    1223 ext/nkf/nkf-utf8/nkf.c 		input_f = UTF16BE_INPUT;
UTF16BE_INPUT    1224 ext/nkf/nkf-utf8/nkf.c 		utf16_mode = UTF16BE_INPUT;
UTF16BE_INPUT    1232 ext/nkf/nkf-utf8/nkf.c 		    input_f = UTF16BE_INPUT;
UTF16BE_INPUT    1233 ext/nkf/nkf-utf8/nkf.c 		    utf16_mode = UTF16BE_INPUT;
UTF16BE_INPUT    1918 ext/nkf/nkf-utf8/nkf.c     } else if (input_f == UTF16BE_INPUT) {
UTF16BE_INPUT    2660 ext/nkf/nkf-utf8/nkf.c 	utf16_mode = UTF16BE_INPUT;
UTF16BE_INPUT    4789 ext/nkf/nkf-utf8/nkf.c     utf16_mode = UTF16BE_INPUT;


UTF16LE_INPUT

UTF16LE_INPUT    1228 ext/nkf/nkf-utf8/nkf.c 		    input_f = UTF16LE_INPUT;
UTF16LE_INPUT    1229 ext/nkf/nkf-utf8/nkf.c 		    utf16_mode = UTF16LE_INPUT;
UTF16LE_INPUT    1920 ext/nkf/nkf-utf8/nkf.c     } else if (input_f == UTF16LE_INPUT) {
UTF16LE_INPUT    2663 ext/nkf/nkf-utf8/nkf.c 	utf16_mode = UTF16LE_INPUT;
UTF16LE_INPUT    2666 ext/nkf/nkf-utf8/nkf.c     if (c2 != EOF && utf16_mode == UTF16LE_INPUT) {


UTF8

UTF8             2794 ext/nkf/nkf-utf8/nkf.c         output_mode = UTF8;
UTF8             3592 ext/nkf/nkf-utf8/nkf.c     UTF8, UTF8,


UTF8_INPUT

UTF8_INPUT       1120 ext/nkf/nkf-utf8/nkf.c 		    input_f = UTF8_INPUT;
UTF8_INPUT       1237 ext/nkf/nkf-utf8/nkf.c 		input_f = UTF8_INPUT;
UTF8_INPUT       1239 ext/nkf/nkf-utf8/nkf.c                 input_f = UTF8_INPUT;
UTF8_INPUT       1898 ext/nkf/nkf-utf8/nkf.c     if (nfc_f && input_f == UTF8_INPUT){
UTF8_INPUT       1916 ext/nkf/nkf-utf8/nkf.c     } else if (input_f == UTF8_INPUT) {


UTF8_INPUT_ENABLE

UTF8_INPUT_ENABLE   62 ext/nkf/nkf-utf8/config.h #if defined(NUMCHAR_OPTION) && !defined(UTF8_INPUT_ENABLE)
UTF8_INPUT_ENABLE   67 ext/nkf/nkf-utf8/config.h #ifndef UTF8_INPUT_ENABLE
UTF8_INPUT_ENABLE  249 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_OUTPUT_ENABLE) || defined(UTF8_INPUT_ENABLE)
UTF8_INPUT_ENABLE  303 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_INPUT_ENABLE
UTF8_INPUT_ENABLE  403 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_OUTPUT_ENABLE) && defined(UTF8_INPUT_ENABLE)
UTF8_INPUT_ENABLE  487 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_INPUT_ENABLE
UTF8_INPUT_ENABLE  496 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_INPUT_ENABLE
UTF8_INPUT_ENABLE  956 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_OUTPUT_ENABLE) && defined(UTF8_INPUT_ENABLE)
UTF8_INPUT_ENABLE  964 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_INPUT_ENABLE
UTF8_INPUT_ENABLE 1106 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_OUTPUT_ENABLE) && defined(UTF8_INPUT_ENABLE)
UTF8_INPUT_ENABLE 1220 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_INPUT_ENABLE
UTF8_INPUT_ENABLE 1658 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_INPUT_ENABLE
UTF8_INPUT_ENABLE 1915 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_INPUT_ENABLE
UTF8_INPUT_ENABLE 1993 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_INPUT_ENABLE
UTF8_INPUT_ENABLE 2497 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_INPUT_ENABLE
UTF8_INPUT_ENABLE 2558 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_OUTPUT_ENABLE) && defined(UTF8_INPUT_ENABLE)
UTF8_INPUT_ENABLE 2674 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_OUTPUT_ENABLE) && defined(UTF8_INPUT_ENABLE)
UTF8_INPUT_ENABLE 3571 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
UTF8_INPUT_ENABLE 3583 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
UTF8_INPUT_ENABLE 3591 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
UTF8_INPUT_ENABLE 3600 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
UTF8_INPUT_ENABLE 4752 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_OUTPUT_ENABLE) && defined(UTF8_INPUT_ENABLE)
UTF8_INPUT_ENABLE 4788 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_INPUT_ENABLE
UTF8_INPUT_ENABLE 4883 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_INPUT_ENABLE
UTF8_INPUT_ENABLE 2351 ext/nkf/nkf-utf8/utf8tbl.c #ifdef UTF8_INPUT_ENABLE


UTF8_OUTPUT_ENABLE

UTF8_OUTPUT_ENABLE  249 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_OUTPUT_ENABLE) || defined(UTF8_INPUT_ENABLE)
UTF8_OUTPUT_ENABLE  310 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_OUTPUT_ENABLE
UTF8_OUTPUT_ENABLE  403 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_OUTPUT_ENABLE) && defined(UTF8_INPUT_ENABLE)
UTF8_OUTPUT_ENABLE  406 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_OUTPUT_ENABLE
UTF8_OUTPUT_ENABLE  956 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_OUTPUT_ENABLE) && defined(UTF8_INPUT_ENABLE)
UTF8_OUTPUT_ENABLE  959 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_OUTPUT_ENABLE
UTF8_OUTPUT_ENABLE 1067 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_OUTPUT_ENABLE
UTF8_OUTPUT_ENABLE 1077 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_OUTPUT_ENABLE
UTF8_OUTPUT_ENABLE 1106 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_OUTPUT_ENABLE) && defined(UTF8_INPUT_ENABLE)
UTF8_OUTPUT_ENABLE 1112 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_OUTPUT_ENABLE
UTF8_OUTPUT_ENABLE 1194 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_OUTPUT_ENABLE
UTF8_OUTPUT_ENABLE 1478 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_OUTPUT_ENABLE
UTF8_OUTPUT_ENABLE 1485 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_OUTPUT_ENABLE
UTF8_OUTPUT_ENABLE 2558 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_OUTPUT_ENABLE) && defined(UTF8_INPUT_ENABLE)
UTF8_OUTPUT_ENABLE 2674 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_OUTPUT_ENABLE) && defined(UTF8_INPUT_ENABLE)
UTF8_OUTPUT_ENABLE 2720 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_OUTPUT_ENABLE
UTF8_OUTPUT_ENABLE 3571 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
UTF8_OUTPUT_ENABLE 3583 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
UTF8_OUTPUT_ENABLE 3591 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
UTF8_OUTPUT_ENABLE 3600 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
UTF8_OUTPUT_ENABLE 4752 ext/nkf/nkf-utf8/nkf.c #if defined(UTF8_OUTPUT_ENABLE) && defined(UTF8_INPUT_ENABLE)
UTF8_OUTPUT_ENABLE 4755 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_OUTPUT_ENABLE
UTF8_OUTPUT_ENABLE 4879 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_OUTPUT_ENABLE
UTF8_OUTPUT_ENABLE 4922 ext/nkf/nkf-utf8/nkf.c #ifdef UTF8_OUTPUT_ENABLE
UTF8_OUTPUT_ENABLE    3 ext/nkf/nkf-utf8/utf8tbl.c #ifdef UTF8_OUTPUT_ENABLE


UTF8_TRAILS

UTF8_TRAILS       158 utf8.c               *p++ = UTF8_TRAILS(code, 6);
UTF8_TRAILS       162 utf8.c               *p++ = UTF8_TRAILS(code, 12);
UTF8_TRAILS       163 utf8.c               *p++ = UTF8_TRAILS(code,  6);
UTF8_TRAILS       167 utf8.c               *p++ = UTF8_TRAILS(code, 18);
UTF8_TRAILS       168 utf8.c               *p++ = UTF8_TRAILS(code, 12);
UTF8_TRAILS       169 utf8.c               *p++ = UTF8_TRAILS(code,  6);
UTF8_TRAILS       173 utf8.c               *p++ = UTF8_TRAILS(code, 24);
UTF8_TRAILS       174 utf8.c               *p++ = UTF8_TRAILS(code, 18);
UTF8_TRAILS       175 utf8.c               *p++ = UTF8_TRAILS(code, 12);
UTF8_TRAILS       176 utf8.c               *p++ = UTF8_TRAILS(code,  6);


U_LONG

U_LONG             62 ext/bigdecimal/bigdecimal.c static void  VpInternalRound(Real *c,int ixDigit,U_LONG vPrev,U_LONG v);
U_LONG             63 ext/bigdecimal/bigdecimal.c static int   VpLimitRound(Real *c,U_LONG ixDigit);
U_LONG            159 ext/bigdecimal/bigdecimal.c     U_LONG hash,i;
U_LONG            162 ext/bigdecimal/bigdecimal.c     hash = (U_LONG)p->sign;
U_LONG            263 ext/bigdecimal/bigdecimal.c static U_LONG
U_LONG            266 ext/bigdecimal/bigdecimal.c     U_LONG mxs;
U_LONG            267 ext/bigdecimal/bigdecimal.c     U_LONG mx = a->Prec;
U_LONG            276 ext/bigdecimal/bigdecimal.c         mx = mx+(U_LONG)d;
U_LONG            297 ext/bigdecimal/bigdecimal.c VpNewRbClass(U_LONG mx, char *str, VALUE klass)
U_LONG            305 ext/bigdecimal/bigdecimal.c VpCreateRbObject(U_LONG mx, char *str)
U_LONG            344 ext/bigdecimal/bigdecimal.c     U_LONG v,b,j;
U_LONG            448 ext/bigdecimal/bigdecimal.c     U_LONG mx;
U_LONG            475 ext/bigdecimal/bigdecimal.c     U_LONG mx;
U_LONG            597 ext/bigdecimal/bigdecimal.c     U_LONG mx;
U_LONG            616 ext/bigdecimal/bigdecimal.c     U_LONG mx;
U_LONG            660 ext/bigdecimal/bigdecimal.c     U_LONG mx;
U_LONG            725 ext/bigdecimal/bigdecimal.c     U_LONG mx;
U_LONG            796 ext/bigdecimal/bigdecimal.c        U_LONG ix = (U_LONG)GetPositiveInt(n);
U_LONG            801 ext/bigdecimal/bigdecimal.c           U_LONG mx = (ix+VpBaseFig()*2);
U_LONG            802 ext/bigdecimal/bigdecimal.c           U_LONG pl = VpSetPrecLimit(0);
U_LONG            823 ext/bigdecimal/bigdecimal.c     U_LONG mx = (U_LONG)GetPositiveInt(n);
U_LONG            826 ext/bigdecimal/bigdecimal.c        U_LONG pl = VpSetPrecLimit(0);
U_LONG            840 ext/bigdecimal/bigdecimal.c     U_LONG mx = (U_LONG)GetPositiveInt(n);
U_LONG            843 ext/bigdecimal/bigdecimal.c        U_LONG pl = VpSetPrecLimit(0);
U_LONG            857 ext/bigdecimal/bigdecimal.c     U_LONG mx = (U_LONG)GetPositiveInt(n);
U_LONG            860 ext/bigdecimal/bigdecimal.c        U_LONG pl = VpSetPrecLimit(0);
U_LONG            874 ext/bigdecimal/bigdecimal.c     U_LONG mx;
U_LONG            906 ext/bigdecimal/bigdecimal.c     U_LONG mx;
U_LONG            921 ext/bigdecimal/bigdecimal.c     U_LONG mx;
U_LONG            924 ext/bigdecimal/bigdecimal.c     U_LONG pl;
U_LONG            964 ext/bigdecimal/bigdecimal.c     U_LONG mx;
U_LONG            966 ext/bigdecimal/bigdecimal.c     U_LONG pl = VpSetPrecLimit(0);
U_LONG            988 ext/bigdecimal/bigdecimal.c     U_LONG mx;
U_LONG           1002 ext/bigdecimal/bigdecimal.c     U_LONG mx;
U_LONG           1005 ext/bigdecimal/bigdecimal.c     U_LONG pl = VpSetPrecLimit(0);
U_LONG           1027 ext/bigdecimal/bigdecimal.c     U_LONG mx;
U_LONG           1030 ext/bigdecimal/bigdecimal.c     U_LONG pl = VpSetPrecLimit(0);
U_LONG           1056 ext/bigdecimal/bigdecimal.c     U_LONG nc;
U_LONG           1249 ext/bigdecimal/bigdecimal.c     VpInit((U_LONG)0);
U_LONG           1365 ext/bigdecimal/bigdecimal.c static U_LONG gnPrecLimit = 0;  /* Global upper limit of the precision newly allocated */
U_LONG           1366 ext/bigdecimal/bigdecimal.c static U_LONG gfRoundMode = VP_ROUND_HALF_UP; /* Mode for general rounding operation   */
U_LONG           1368 ext/bigdecimal/bigdecimal.c static U_LONG BASE_FIG = 4;     /* =log10(BASE)  */
U_LONG           1369 ext/bigdecimal/bigdecimal.c static U_LONG BASE = 10000L;    /* Base value(value must be 10**BASE_FIG) */
U_LONG           1372 ext/bigdecimal/bigdecimal.c static U_LONG HALF_BASE = 5000L;/* =BASE/2  */
U_LONG           1374 ext/bigdecimal/bigdecimal.c static U_LONG BASE1 = 1000L;    /* =BASE/10  */
U_LONG           1378 ext/bigdecimal/bigdecimal.c static U_LONG maxnr = 100;    /* Maximum iterations for calcurating sqrt. */
U_LONG           1387 ext/bigdecimal/bigdecimal.c static U_LONG VpAddAbs(Real *a,Real *b,Real *c);
U_LONG           1388 ext/bigdecimal/bigdecimal.c static U_LONG VpSubAbs(Real *a,Real *b,Real *c);
U_LONG           1389 ext/bigdecimal/bigdecimal.c static U_LONG VpSetPTR(Real *a,Real *b,Real *c,U_LONG *a_pos,U_LONG *b_pos,U_LONG *c_pos,U_LONG *av,U_LONG *bv);
U_LONG           1392 ext/bigdecimal/bigdecimal.c static int VpRdup(Real *m,U_LONG ind_m);
U_LONG           1399 ext/bigdecimal/bigdecimal.c VpMemAlloc(U_LONG mb)
U_LONG           1449 ext/bigdecimal/bigdecimal.c VP_EXPORT U_LONG
U_LONG           1455 ext/bigdecimal/bigdecimal.c VP_EXPORT U_LONG
U_LONG           1456 ext/bigdecimal/bigdecimal.c VpSetPrecLimit(U_LONG n)
U_LONG           1458 ext/bigdecimal/bigdecimal.c     U_LONG s = gnPrecLimit;
U_LONG           1509 ext/bigdecimal/bigdecimal.c VP_EXPORT U_LONG
U_LONG           1515 ext/bigdecimal/bigdecimal.c VP_EXPORT U_LONG
U_LONG           1521 ext/bigdecimal/bigdecimal.c VP_EXPORT U_LONG
U_LONG           1722 ext/bigdecimal/bigdecimal.c VP_EXPORT U_LONG
U_LONG           1726 ext/bigdecimal/bigdecimal.c     U_LONG nc;
U_LONG           1765 ext/bigdecimal/bigdecimal.c VP_EXPORT U_LONG
U_LONG           1766 ext/bigdecimal/bigdecimal.c VpInit(U_LONG BaseVal)
U_LONG           1768 ext/bigdecimal/bigdecimal.c     U_LONG w;
U_LONG           1795 ext/bigdecimal/bigdecimal.c     VpConstOne = VpAlloc((U_LONG)1, "1");
U_LONG           1796 ext/bigdecimal/bigdecimal.c     VpPt5 = VpAlloc((U_LONG)1, ".5");
U_LONG           1876 ext/bigdecimal/bigdecimal.c VpAlloc(U_LONG mx, char *szVal)
U_LONG           1878 ext/bigdecimal/bigdecimal.c     U_LONG i, ni, ipn, ipf, nf, ipe, ne, nalloc;
U_LONG           1882 ext/bigdecimal/bigdecimal.c     U_LONG mf = VpGetPrecLimit();
U_LONG           1901 ext/bigdecimal/bigdecimal.c        vp = (Real *) VpMemAlloc(sizeof(Real) + mx * sizeof(U_LONG));
U_LONG           1921 ext/bigdecimal/bigdecimal.c         vp = (Real *) VpMemAlloc(sizeof(Real) + sizeof(U_LONG));
U_LONG           1927 ext/bigdecimal/bigdecimal.c         vp = (Real *) VpMemAlloc(sizeof(Real) + sizeof(U_LONG));
U_LONG           1933 ext/bigdecimal/bigdecimal.c         vp = (Real *) VpMemAlloc(sizeof(Real) + sizeof(U_LONG));
U_LONG           1992 ext/bigdecimal/bigdecimal.c     vp =(Real *) VpMemAlloc(sizeof(Real) + mx * sizeof(U_LONG));
U_LONG           2015 ext/bigdecimal/bigdecimal.c     U_LONG n;
U_LONG           2031 ext/bigdecimal/bigdecimal.c         memcpy(c->frac, a->frac, n * sizeof(U_LONG));
U_LONG           2059 ext/bigdecimal/bigdecimal.c     U_LONG n, na, nb, i;
U_LONG           2060 ext/bigdecimal/bigdecimal.c     U_LONG mrv;
U_LONG           2182 ext/bigdecimal/bigdecimal.c static U_LONG
U_LONG           2185 ext/bigdecimal/bigdecimal.c     U_LONG word_shift;
U_LONG           2186 ext/bigdecimal/bigdecimal.c     U_LONG carry;
U_LONG           2187 ext/bigdecimal/bigdecimal.c     U_LONG ap;
U_LONG           2188 ext/bigdecimal/bigdecimal.c     U_LONG bp;
U_LONG           2189 ext/bigdecimal/bigdecimal.c     U_LONG cp;
U_LONG           2190 ext/bigdecimal/bigdecimal.c     U_LONG a_pos;
U_LONG           2191 ext/bigdecimal/bigdecimal.c     U_LONG b_pos;
U_LONG           2192 ext/bigdecimal/bigdecimal.c     U_LONG c_pos;
U_LONG           2193 ext/bigdecimal/bigdecimal.c     U_LONG av, bv, mrv;
U_LONG           2274 ext/bigdecimal/bigdecimal.c static U_LONG
U_LONG           2277 ext/bigdecimal/bigdecimal.c     U_LONG word_shift;
U_LONG           2278 ext/bigdecimal/bigdecimal.c     U_LONG mrv;
U_LONG           2279 ext/bigdecimal/bigdecimal.c     U_LONG borrow;
U_LONG           2280 ext/bigdecimal/bigdecimal.c     U_LONG ap;
U_LONG           2281 ext/bigdecimal/bigdecimal.c     U_LONG bp;
U_LONG           2282 ext/bigdecimal/bigdecimal.c     U_LONG cp;
U_LONG           2283 ext/bigdecimal/bigdecimal.c     U_LONG a_pos;
U_LONG           2284 ext/bigdecimal/bigdecimal.c     U_LONG b_pos;
U_LONG           2285 ext/bigdecimal/bigdecimal.c     U_LONG c_pos;
U_LONG           2286 ext/bigdecimal/bigdecimal.c     U_LONG av, bv;
U_LONG           2388 ext/bigdecimal/bigdecimal.c static U_LONG
U_LONG           2389 ext/bigdecimal/bigdecimal.c VpSetPTR(Real *a, Real *b, Real *c, U_LONG *a_pos, U_LONG *b_pos, U_LONG *c_pos, U_LONG *av, U_LONG *bv)
U_LONG           2391 ext/bigdecimal/bigdecimal.c     U_LONG left_word, right_word, word_shift;
U_LONG           2486 ext/bigdecimal/bigdecimal.c     U_LONG MxIndA, MxIndB, MxIndAB, MxIndC;
U_LONG           2487 ext/bigdecimal/bigdecimal.c     U_LONG ind_c, i, ii, nc;
U_LONG           2488 ext/bigdecimal/bigdecimal.c     U_LONG ind_as, ind_ae, ind_bs, ind_be;
U_LONG           2489 ext/bigdecimal/bigdecimal.c     U_LONG Carry, s;
U_LONG           2529 ext/bigdecimal/bigdecimal.c         c = VpAlloc((U_LONG)((MxIndAB + 1) * BASE_FIG), "#0");
U_LONG           2540 ext/bigdecimal/bigdecimal.c     memset(c->frac, 0, (nc + 1) * sizeof(U_LONG));        /* Initialize c  */
U_LONG           2610 ext/bigdecimal/bigdecimal.c     U_LONG word_a, word_b, word_c, word_r;
U_LONG           2611 ext/bigdecimal/bigdecimal.c     U_LONG i, n, ind_a, ind_b, ind_c, ind_r;
U_LONG           2612 ext/bigdecimal/bigdecimal.c     U_LONG nLoop;
U_LONG           2613 ext/bigdecimal/bigdecimal.c     U_LONG q, b1, b1p1, b1b2, b1b2p1, r1r2;
U_LONG           2614 ext/bigdecimal/bigdecimal.c     U_LONG borrow, borrow1, borrow2, qb;
U_LONG           2820 ext/bigdecimal/bigdecimal.c     U_LONG ind_a, i;
U_LONG           2834 ext/bigdecimal/bigdecimal.c                 memmove(&(a->frac[0]),&(a->frac[i]),(a->Prec)*sizeof(U_LONG));
U_LONG           2859 ext/bigdecimal/bigdecimal.c     U_LONG mx, ind;
U_LONG           2954 ext/bigdecimal/bigdecimal.c     U_LONG i, j, nc, nd, ZeroSup;
U_LONG           2955 ext/bigdecimal/bigdecimal.c     U_LONG n, m, e, nn;
U_LONG           3048 ext/bigdecimal/bigdecimal.c     U_LONG ie;
U_LONG           3049 ext/bigdecimal/bigdecimal.c     U_LONG i;
U_LONG           3076 ext/bigdecimal/bigdecimal.c     U_LONG n;
U_LONG           3092 ext/bigdecimal/bigdecimal.c     U_LONG i, ZeroSup;
U_LONG           3093 ext/bigdecimal/bigdecimal.c     U_LONG n, m, e, nn;
U_LONG           3172 ext/bigdecimal/bigdecimal.c     U_LONG i, ZeroSup;
U_LONG           3173 ext/bigdecimal/bigdecimal.c     U_LONG n, m, e, nn;
U_LONG           3218 ext/bigdecimal/bigdecimal.c     U_LONG i;
U_LONG           3219 ext/bigdecimal/bigdecimal.c     U_LONG n, m, e, nn;
U_LONG           3280 ext/bigdecimal/bigdecimal.c VpCtoV(Real *a, char *int_chr, U_LONG ni, char *frac, U_LONG nf, char *exp_chr, U_LONG ne)
U_LONG           3282 ext/bigdecimal/bigdecimal.c     U_LONG i, j, ind_a, ma, mi, me;
U_LONG           3283 ext/bigdecimal/bigdecimal.c     U_LONG loc;
U_LONG           3292 ext/bigdecimal/bigdecimal.c     memset(a->frac, 0, ma * sizeof(U_LONG));
U_LONG           3352 ext/bigdecimal/bigdecimal.c         while((j < (U_LONG)BASE_FIG) &&(i < mi)) {
U_LONG           3369 ext/bigdecimal/bigdecimal.c         while((j < (U_LONG)BASE_FIG) &&(i < nf)) {
U_LONG           3387 ext/bigdecimal/bigdecimal.c     while(j < (U_LONG)BASE_FIG) {
U_LONG           3416 ext/bigdecimal/bigdecimal.c     U_LONG ind_m, mm, fig;
U_LONG           3480 ext/bigdecimal/bigdecimal.c     U_LONG i, ind_m, mm;
U_LONG           3481 ext/bigdecimal/bigdecimal.c     U_LONG ne;
U_LONG           3515 ext/bigdecimal/bigdecimal.c     memset(m->frac, 0, mm * sizeof(U_LONG));
U_LONG           3518 ext/bigdecimal/bigdecimal.c         i =(U_LONG) val;
U_LONG           3532 ext/bigdecimal/bigdecimal.c                       (U_LONG)(val*((double)((S_INT)BASE))));
U_LONG           3550 ext/bigdecimal/bigdecimal.c     U_LONG mm, ind_m;
U_LONG           3551 ext/bigdecimal/bigdecimal.c     U_LONG val, v1, v2, v;
U_LONG           3563 ext/bigdecimal/bigdecimal.c         val =(U_LONG)(-ival);
U_LONG           3667 ext/bigdecimal/bigdecimal.c     y->MaxPrec = (U_LONG)Min(n , y_prec);
U_LONG           3670 ext/bigdecimal/bigdecimal.c     if((U_LONG)n<maxnr) n = (U_LONG)maxnr;
U_LONG           3673 ext/bigdecimal/bigdecimal.c         if(y->MaxPrec > (U_LONG)y_prec) y->MaxPrec = (U_LONG)y_prec;
U_LONG           3729 ext/bigdecimal/bigdecimal.c     U_LONG v,shifter;
U_LONG           3730 ext/bigdecimal/bigdecimal.c     U_LONG div;
U_LONG           3740 ext/bigdecimal/bigdecimal.c     if(((U_LONG)ix)>=y->Prec) return 0; /* Unable to round */
U_LONG           3759 ext/bigdecimal/bigdecimal.c     memset(y->frac+ix+1, 0, (y->Prec - (ix+1)) * sizeof(U_LONG));
U_LONG           3781 ext/bigdecimal/bigdecimal.c             if((U_LONG)i==(BASE_FIG-1)) {
U_LONG           3825 ext/bigdecimal/bigdecimal.c     U_LONG v;
U_LONG           3843 ext/bigdecimal/bigdecimal.c VpLimitRound(Real *c,U_LONG ixDigit)
U_LONG           3845 ext/bigdecimal/bigdecimal.c     U_LONG ix = VpGetPrecLimit();
U_LONG           3854 ext/bigdecimal/bigdecimal.c VpInternalRound(Real *c,int ixDigit,U_LONG vPrev,U_LONG v)
U_LONG           3895 ext/bigdecimal/bigdecimal.c VpRdup(Real *m,U_LONG ind_m)
U_LONG           3897 ext/bigdecimal/bigdecimal.c     U_LONG carry;
U_LONG           3922 ext/bigdecimal/bigdecimal.c     U_LONG my, ind_y, ind_x;
U_LONG           3929 ext/bigdecimal/bigdecimal.c     if(x->exponent > 0 && (U_LONG)x->exponent >= x->Prec) {
U_LONG           3937 ext/bigdecimal/bigdecimal.c     y->Prec = x->Prec -(U_LONG) x->exponent;
U_LONG           3967 ext/bigdecimal/bigdecimal.c     U_LONG s, ss;
U_LONG           4024 ext/bigdecimal/bigdecimal.c         if(s >(U_LONG) n) goto out_loop1;
U_LONG           4063 ext/bigdecimal/bigdecimal.c     U_LONG i;
U_LONG             78 ext/bigdecimal/bigdecimal.h     U_LONG MaxPrec; /* Maximum precision size                   */
U_LONG             81 ext/bigdecimal/bigdecimal.h     U_LONG Prec;    /* Current precision size.                  */
U_LONG             96 ext/bigdecimal/bigdecimal.h     U_LONG frac[1]; /* Pointer to array of fraction part.       */
U_LONG            106 ext/bigdecimal/bigdecimal.h VpNewRbClass(U_LONG mx,char *str,VALUE klass);
U_LONG            108 ext/bigdecimal/bigdecimal.h VP_EXPORT  Real *VpCreateRbObject(U_LONG mx,char *str);
U_LONG            110 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpBaseFig(void);
U_LONG            111 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpDblFig(void);
U_LONG            112 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpBaseVal(void);
U_LONG            121 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpGetPrecLimit(void);
U_LONG            122 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpSetPrecLimit(U_LONG n);
U_LONG            131 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpNumOfChars(Real *vp,char *pszFmt);
U_LONG            132 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpInit(U_LONG BaseVal);
U_LONG            133 ext/bigdecimal/bigdecimal.h VP_EXPORT void *VpMemAlloc(U_LONG mb);
U_LONG            135 ext/bigdecimal/bigdecimal.h VP_EXPORT Real *VpAlloc(U_LONG mx, char *szVal);
U_LONG            146 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpCtoV(Real *a,char *int_chr,U_LONG ni,char *frac,U_LONG nf,char *exp_chr,U_LONG ne);


UnlockFile

UnlockFile        306 win32/win32.c  	LK_ERR(UnlockFile(fh, 0, 0, LK_LEN, LK_LEN), i);
UnlockFile       3785 win32/win32.c  	UnlockFile((HANDLE)sock, 0, 0, LK_LEN, LK_LEN);
UnlockFile       3803 win32/win32.c  	UnlockFile((HANDLE)sock, 0, 0, LK_LEN, LK_LEN);
UnlockFile        134 wince/wince.h  BOOL UnlockFile( HFILE hFile,


UnlockFileEx

UnlockFileEx      278 win32/win32.c  	LK_ERR(UnlockFileEx(fh, 0, LK_LEN, LK_LEN, &o), i);
UnlockFileEx      137 wince/wince.h  BOOL UnlockFileEx(HANDLE hFile,


UnsetAddr

UnsetAddr         143 regcomp.c        UnsetAddr* p;
UnsetAddr         145 regcomp.c        p = (UnsetAddr* )xmalloc(sizeof(UnsetAddr)* size);
UnsetAddr         163 regcomp.c        UnsetAddr* p;
UnsetAddr         168 regcomp.c          p = (UnsetAddr* )xrealloc(uslist->us, sizeof(UnsetAddr) * size);
UnsetAddr         196 regparse.h       UnsetAddr* us;


UnsetAddrList

UnsetAddrList    4737 regcomp.c        UnsetAddrList  uslist;
UnsetAddrList     205 regparse.h       UnsetAddrList* unset_addr_list;
UnsetAddrList     268 regparse.h       UnsetAddrList*  unset_addr_list;


VALUE

VALUE              20 array.c        VALUE rb_cArray, rb_cValues;
VALUE              27 array.c        rb_mem_clear(register VALUE *mem, register long size)
VALUE              35 array.c        memfill(register VALUE *mem, register long size, register VALUE val)
VALUE              45 array.c        rb_ary_modify_check(VALUE ary)
VALUE              55 array.c        rb_ary_modify(VALUE ary)
VALUE              57 array.c            VALUE *ptr;
VALUE              61 array.c        	ptr = ALLOC_N(VALUE, RARRAY(ary)->len);
VALUE              64 array.c        	MEMCPY(ptr, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
VALUE              69 array.c        VALUE
VALUE              70 array.c        rb_ary_freeze(VALUE ary)
VALUE              83 array.c        static VALUE
VALUE              84 array.c        rb_ary_frozen_p(VALUE ary)
VALUE              91 array.c        static VALUE
VALUE              92 array.c        ary_alloc(VALUE klass)
VALUE             101 array.c            return (VALUE)ary;
VALUE             104 array.c        static VALUE
VALUE             105 array.c        ary_new(VALUE klass, long len)
VALUE             107 array.c            VALUE ary;
VALUE             112 array.c            if (len > 0 && len * sizeof(VALUE) <= len) {
VALUE             118 array.c            RARRAY(ary)->ptr = ALLOC_N(VALUE, len);
VALUE             124 array.c        VALUE
VALUE             131 array.c        VALUE
VALUE             139 array.c        VALUE
VALUE             143 array.c            VALUE ary;
VALUE             150 array.c        	RARRAY(ary)->ptr[i] = va_arg(ar, VALUE);
VALUE             158 array.c        VALUE
VALUE             159 array.c        rb_ary_new4(long n, const VALUE *elts)
VALUE             161 array.c            VALUE ary;
VALUE             165 array.c        	MEMCPY(RARRAY(ary)->ptr, elts, VALUE, n);
VALUE             172 array.c        VALUE
VALUE             176 array.c            VALUE val;
VALUE             182 array.c        	RARRAY(val)->ptr[i] = va_arg(ar, VALUE);
VALUE             190 array.c        VALUE
VALUE             191 array.c        rb_values_new2(long n, const VALUE *elts)
VALUE             193 array.c            VALUE val;
VALUE             198 array.c        	MEMCPY(RARRAY(val)->ptr, elts, VALUE, n);
VALUE             204 array.c        static VALUE
VALUE             205 array.c        ary_make_shared(VALUE ary)
VALUE             214 array.c        	RARRAY(ary)->aux.shared = (VALUE)shared;
VALUE             217 array.c        	return (VALUE)shared;
VALUE             224 array.c        static VALUE
VALUE             225 array.c        ary_shared_array(VALUE klass, VALUE ary)
VALUE             227 array.c            VALUE val = ary_alloc(klass);
VALUE             237 array.c        VALUE
VALUE             238 array.c        rb_values_from_ary(VALUE ary)
VALUE             243 array.c        VALUE
VALUE             244 array.c        rb_ary_from_values(VALUE val)
VALUE             249 array.c        VALUE
VALUE             250 array.c        rb_assoc_new(VALUE car, VALUE cdr)
VALUE             255 array.c        static VALUE
VALUE             256 array.c        to_ary(VALUE ary)
VALUE             261 array.c        static VALUE
VALUE             262 array.c        to_a(VALUE ary)
VALUE             267 array.c        VALUE
VALUE             268 array.c        rb_check_array_type(VALUE ary)
VALUE             273 array.c        static VALUE rb_ary_replace(VALUE, VALUE);
VALUE             313 array.c        static VALUE
VALUE             314 array.c        rb_ary_initialize(int argc, VALUE *argv, VALUE ary)
VALUE             317 array.c            VALUE size, val;
VALUE             339 array.c            if (len > 0 && len * (long)sizeof(VALUE) <= len) {
VALUE             344 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, len);
VALUE             375 array.c        static VALUE
VALUE             376 array.c        rb_ary_s_create(int argc, VALUE *argv, VALUE klass)
VALUE             378 array.c            VALUE ary = ary_alloc(klass);
VALUE             381 array.c        	RARRAY(ary)->ptr = ALLOC_N(VALUE, argc);
VALUE             382 array.c        	MEMCPY(RARRAY(ary)->ptr, argv, VALUE, argc);
VALUE             390 array.c        rb_ary_store(VALUE ary, long idx, VALUE val)
VALUE             408 array.c        	if (new_capa * (long)sizeof(VALUE) <= new_capa) {
VALUE             411 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, new_capa);
VALUE             425 array.c        static VALUE
VALUE             426 array.c        ary_shared_first(int argc, VALUE *argv, VALUE ary)
VALUE             428 array.c            VALUE nv, result;
VALUE             444 array.c        static VALUE
VALUE             445 array.c        ary_shared_last(int argc, VALUE *argv, VALUE ary)
VALUE             447 array.c            VALUE result = ary_shared_first(argc, argv, ary);
VALUE             466 array.c        VALUE
VALUE             467 array.c        rb_ary_push(VALUE ary, VALUE item)
VALUE             486 array.c        static VALUE
VALUE             487 array.c        rb_ary_push_m(int argc, VALUE *argv, VALUE ary)
VALUE             495 array.c        VALUE
VALUE             496 array.c        rb_ary_pop(VALUE ary)
VALUE             504 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->aux.capa);
VALUE             522 array.c        static VALUE
VALUE             523 array.c        rb_ary_pop_m(int argc, VALUE *argv, VALUE ary)
VALUE             525 array.c            VALUE result;
VALUE             538 array.c        VALUE
VALUE             539 array.c        rb_ary_shift(VALUE ary)
VALUE             541 array.c            VALUE top;
VALUE             570 array.c        static VALUE
VALUE             571 array.c        rb_ary_shift_m(int argc, VALUE *argv, VALUE ary)
VALUE             573 array.c            VALUE result;
VALUE             590 array.c        VALUE
VALUE             591 array.c        rb_ary_unshift(VALUE ary, VALUE item)
VALUE             600 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->aux.capa);
VALUE             604 array.c            MEMMOVE(RARRAY(ary)->ptr + 1, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
VALUE             624 array.c        static VALUE
VALUE             625 array.c        rb_ary_unshift_m(int argc, VALUE *argv, VALUE ary)
VALUE             635 array.c            MEMMOVE(RARRAY(ary)->ptr + argc, RARRAY(ary)->ptr, VALUE, len);
VALUE             636 array.c            MEMCPY(RARRAY(ary)->ptr, argv, VALUE, argc);
VALUE             642 array.c        static inline VALUE
VALUE             643 array.c        rb_ary_elt(VALUE ary, long offset)
VALUE             652 array.c        VALUE
VALUE             653 array.c        rb_ary_entry(VALUE ary, long offset)
VALUE             661 array.c        static VALUE
VALUE             662 array.c        rb_ary_subseq(VALUE ary, long beg, long len)
VALUE             664 array.c            VALUE klass, ary2, shared;
VALUE             665 array.c            VALUE *ptr;
VALUE             721 array.c        VALUE
VALUE             722 array.c        rb_ary_aref(int argc, VALUE *argv, VALUE ary)
VALUE             724 array.c            VALUE arg;
VALUE             770 array.c        static VALUE
VALUE             771 array.c        rb_ary_at(VALUE ary, VALUE pos)
VALUE             790 array.c        static VALUE
VALUE             791 array.c        rb_ary_first(int argc, VALUE *argv, VALUE ary)
VALUE             815 array.c        static VALUE
VALUE             816 array.c        rb_ary_last(int argc, VALUE *argv, VALUE ary)
VALUE             847 array.c        static VALUE
VALUE             848 array.c        rb_ary_fetch(int argc, VALUE *argv, VALUE ary)
VALUE             850 array.c            VALUE pos, ifnone;
VALUE             890 array.c        static VALUE
VALUE             891 array.c        rb_ary_index(int argc, VALUE *argv, VALUE ary)
VALUE             893 array.c            VALUE val;
VALUE             928 array.c        static VALUE
VALUE             929 array.c        rb_ary_rindex(int argc, VALUE *argv, VALUE ary)
VALUE             931 array.c            VALUE val;
VALUE             956 array.c        VALUE
VALUE             957 array.c        rb_ary_to_ary(VALUE obj)
VALUE             969 array.c        rb_ary_splice(VALUE ary, long beg, long len, VALUE rpl)
VALUE             997 array.c        	    REALLOC_N(RARRAY(ary)->ptr, VALUE, len);
VALUE            1002 array.c        	    MEMCPY(RARRAY(ary)->ptr + beg, RARRAY(rpl)->ptr, VALUE, rlen);
VALUE            1015 array.c        	    REALLOC_N(RARRAY(ary)->ptr, VALUE, alen);
VALUE            1021 array.c        		    VALUE, RARRAY(ary)->len - (beg + len));
VALUE            1025 array.c        	    MEMMOVE(RARRAY(ary)->ptr + beg, RARRAY(rpl)->ptr, VALUE, rlen);
VALUE            1058 array.c        static VALUE
VALUE            1059 array.c        rb_ary_aset(int argc, VALUE *argv, VALUE ary)
VALUE            1098 array.c        static VALUE
VALUE            1099 array.c        rb_ary_insert(int argc, VALUE *argv, VALUE ary)
VALUE            1133 array.c        VALUE
VALUE            1134 array.c        rb_ary_each(VALUE ary)
VALUE            1160 array.c        static VALUE
VALUE            1161 array.c        rb_ary_each_index(VALUE ary)
VALUE            1187 array.c        static VALUE
VALUE            1188 array.c        rb_ary_reverse_each(VALUE ary)
VALUE            1211 array.c        static VALUE
VALUE            1212 array.c        rb_ary_length(VALUE ary)
VALUE            1226 array.c        static VALUE
VALUE            1227 array.c        rb_ary_empty_p(VALUE ary)
VALUE            1234 array.c        VALUE
VALUE            1235 array.c        rb_ary_dup(VALUE ary)
VALUE            1237 array.c            VALUE dup = rb_ary_new2(RARRAY(ary)->len);
VALUE            1240 array.c            MEMCPY(RARRAY(dup)->ptr, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
VALUE            1245 array.c        extern VALUE rb_output_fs;
VALUE            1247 array.c        static VALUE
VALUE            1248 array.c        recursive_join(VALUE ary, VALUE argp, int recur)
VALUE            1250 array.c            VALUE *arg = (VALUE *)argp;
VALUE            1257 array.c        VALUE
VALUE            1258 array.c        rb_ary_join(VALUE ary, VALUE sep)
VALUE            1262 array.c            VALUE result, tmp;
VALUE            1283 array.c        		VALUE args[2];
VALUE            1287 array.c        		tmp = rb_exec_recursive(recursive_join, ary, (VALUE)args);
VALUE            1314 array.c        static VALUE
VALUE            1315 array.c        rb_ary_join_m(int argc, VALUE *argv, VALUE ary)
VALUE            1317 array.c            VALUE sep;
VALUE            1335 array.c        VALUE
VALUE            1336 array.c        rb_ary_to_s(VALUE ary)
VALUE            1343 array.c        static VALUE
VALUE            1344 array.c        inspect_ary(VALUE ary, VALUE dummy, int recur)
VALUE            1348 array.c            VALUE s, str;
VALUE            1370 array.c        static VALUE
VALUE            1371 array.c        rb_ary_inspect(VALUE ary)
VALUE            1385 array.c        static VALUE
VALUE            1386 array.c        rb_ary_to_a(VALUE ary)
VALUE            1389 array.c        	VALUE dup = rb_ary_new2(RARRAY(ary)->len);
VALUE            1403 array.c        static VALUE
VALUE            1404 array.c        rb_ary_to_ary_m(VALUE ary)
VALUE            1409 array.c        VALUE
VALUE            1410 array.c        rb_ary_reverse(VALUE ary)
VALUE            1412 array.c            VALUE *p1, *p2;
VALUE            1413 array.c            VALUE tmp;
VALUE            1440 array.c        static VALUE
VALUE            1441 array.c        rb_ary_reverse_bang(VALUE ary)
VALUE            1456 array.c        static VALUE
VALUE            1457 array.c        rb_ary_reverse_m(VALUE ary)
VALUE            1463 array.c            VALUE ary;
VALUE            1464 array.c            VALUE *ptr;
VALUE            1479 array.c            VALUE a = *(const VALUE *)ap, b = *(const VALUE *)bp;
VALUE            1480 array.c            VALUE retval = rb_yield_values(2, a, b);
VALUE            1491 array.c            VALUE retval;
VALUE            1492 array.c            VALUE a = *(const VALUE *)ap, b = *(const VALUE *)bp;
VALUE            1511 array.c        static VALUE
VALUE            1512 array.c        sort_internal(VALUE ary)
VALUE            1518 array.c            ruby_qsort(RARRAY(ary)->ptr, RARRAY(ary)->len, sizeof(VALUE),
VALUE            1523 array.c        static VALUE
VALUE            1524 array.c        sort_unlock(VALUE ary)
VALUE            1546 array.c        VALUE
VALUE            1547 array.c        rb_ary_sort_bang(VALUE ary)
VALUE            1573 array.c        VALUE
VALUE            1574 array.c        rb_ary_sort(VALUE ary)
VALUE            1595 array.c        static VALUE
VALUE            1596 array.c        rb_ary_collect(VALUE ary)
VALUE            1599 array.c            VALUE collect;
VALUE            1623 array.c        static VALUE
VALUE            1624 array.c        rb_ary_collect_bang(VALUE ary)
VALUE            1636 array.c        VALUE
VALUE            1637 array.c        rb_get_values_at(VALUE obj, long olen, int argc, VALUE *argv, VALUE (*func) (VALUE, long))
VALUE            1639 array.c            VALUE result = rb_ary_new2(argc);
VALUE            1680 array.c        static VALUE
VALUE            1681 array.c        rb_ary_values_at(int argc, VALUE *argv, VALUE ary)
VALUE            1698 array.c        static VALUE
VALUE            1699 array.c        rb_ary_select(VALUE ary)
VALUE            1701 array.c            VALUE result;
VALUE            1731 array.c        VALUE
VALUE            1732 array.c        rb_ary_delete(VALUE ary, VALUE item)
VALUE            1737 array.c        	VALUE e = RARRAY(ary)->ptr[i1];
VALUE            1757 array.c        	    REALLOC_N(RARRAY(ary)->ptr, VALUE, i2 * 2);
VALUE            1765 array.c        VALUE
VALUE            1766 array.c        rb_ary_delete_at(VALUE ary, long pos)
VALUE            1769 array.c            VALUE del;
VALUE            1801 array.c        static VALUE
VALUE            1802 array.c        rb_ary_delete_at_m(VALUE ary, VALUE pos)
VALUE            1832 array.c        static VALUE
VALUE            1833 array.c        rb_ary_slice_bang(int argc, VALUE *argv, VALUE ary)
VALUE            1835 array.c            VALUE arg1, arg2;
VALUE            1867 array.c        static VALUE
VALUE            1868 array.c        rb_ary_reject_bang(VALUE ary)
VALUE            1875 array.c        	VALUE v = RARRAY(ary)->ptr[i1];
VALUE            1897 array.c        static VALUE
VALUE            1898 array.c        rb_ary_reject(VALUE ary)
VALUE            1917 array.c        static VALUE
VALUE            1918 array.c        rb_ary_delete_if(VALUE ary)
VALUE            1946 array.c        static VALUE
VALUE            1947 array.c        rb_ary_zip(int argc, VALUE *argv, VALUE ary)
VALUE            1951 array.c            VALUE result;
VALUE            1958 array.c        	    VALUE tmp = rb_ary_new2(argc+1);
VALUE            1971 array.c        	VALUE tmp = rb_ary_new2(argc+1);
VALUE            1993 array.c        static VALUE
VALUE            1994 array.c        rb_ary_transpose(VALUE ary)
VALUE            1997 array.c            VALUE tmp, result = 0;
VALUE            2033 array.c        static VALUE
VALUE            2034 array.c        rb_ary_replace(VALUE copy, VALUE orig)
VALUE            2036 array.c            VALUE shared;
VALUE            2062 array.c        VALUE
VALUE            2063 array.c        rb_ary_clear(VALUE ary)
VALUE            2068 array.c        	REALLOC_N(RARRAY(ary)->ptr, VALUE, ARY_DEFAULT_SIZE * 2);
VALUE            2098 array.c        static VALUE
VALUE            2099 array.c        rb_ary_fill(int argc, VALUE *argv, VALUE ary)
VALUE            2101 array.c            VALUE item, arg1, arg2;
VALUE            2103 array.c            VALUE *p, *pend;
VALUE            2137 array.c        	    REALLOC_N(RARRAY(ary)->ptr, VALUE, end);
VALUE            2145 array.c        	VALUE v;
VALUE            2174 array.c        VALUE
VALUE            2175 array.c        rb_ary_plus(VALUE x, VALUE y)
VALUE            2177 array.c            VALUE z;
VALUE            2183 array.c            MEMCPY(RARRAY(z)->ptr, RARRAY(x)->ptr, VALUE, RARRAY(x)->len);
VALUE            2184 array.c            MEMCPY(RARRAY(z)->ptr + RARRAY(x)->len, RARRAY(y)->ptr, VALUE, RARRAY(y)->len);
VALUE            2199 array.c        VALUE
VALUE            2200 array.c        rb_ary_concat(VALUE x, VALUE y)
VALUE            2225 array.c        static VALUE
VALUE            2226 array.c        rb_ary_times(VALUE ary, VALUE times)
VALUE            2228 array.c            VALUE ary2, tmp;
VALUE            2250 array.c        	MEMCPY(RARRAY(ary2)->ptr+i, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
VALUE            2277 array.c        VALUE
VALUE            2278 array.c        rb_ary_assoc(VALUE ary, VALUE key)
VALUE            2281 array.c            VALUE v;
VALUE            2307 array.c        VALUE
VALUE            2308 array.c        rb_ary_rassoc(VALUE ary, VALUE value)
VALUE            2311 array.c            VALUE v;
VALUE            2337 array.c        static VALUE
VALUE            2338 array.c        rb_ary_equal(VALUE ary1, VALUE ary2)
VALUE            2365 array.c        static VALUE
VALUE            2366 array.c        rb_ary_eql(VALUE ary1, VALUE ary2)
VALUE            2380 array.c        static VALUE
VALUE            2381 array.c        recursive_hash(VALUE ary, VALUE dummy, int recur)
VALUE            2384 array.c            VALUE n;
VALUE            2406 array.c        static VALUE
VALUE            2407 array.c        rb_ary_hash(VALUE ary)
VALUE            2425 array.c        VALUE
VALUE            2426 array.c        rb_ary_includes(VALUE ary, VALUE item)
VALUE            2459 array.c        VALUE
VALUE            2460 array.c        rb_ary_cmp(VALUE ary1, VALUE ary2)
VALUE            2470 array.c        	VALUE v = rb_funcall(rb_ary_elt(ary1, i), id_cmp, 1, rb_ary_elt(ary2, i));
VALUE            2481 array.c        static VALUE
VALUE            2482 array.c        ary_make_hash(VALUE ary1, VALUE ary2)
VALUE            2484 array.c            VALUE hash = rb_hash_new();
VALUE            2510 array.c        static VALUE
VALUE            2511 array.c        rb_ary_diff(VALUE ary1, VALUE ary2)
VALUE            2513 array.c            VALUE ary3;
VALUE            2514 array.c            volatile VALUE hash;
VALUE            2538 array.c        static VALUE
VALUE            2539 array.c        rb_ary_and(VALUE ary1, VALUE ary2)
VALUE            2541 array.c            VALUE hash, ary3, v, vv;
VALUE            2570 array.c        static VALUE
VALUE            2571 array.c        rb_ary_or(VALUE ary1, VALUE ary2)
VALUE            2573 array.c            VALUE hash, ary3;
VALUE            2574 array.c            VALUE v, vv;
VALUE            2610 array.c        static VALUE
VALUE            2611 array.c        rb_ary_uniq_bang(VALUE ary)
VALUE            2613 array.c            VALUE hash, v, vv;
VALUE            2642 array.c        static VALUE
VALUE            2643 array.c        rb_ary_uniq(VALUE ary)
VALUE            2661 array.c        static VALUE
VALUE            2662 array.c        rb_ary_compact_bang(VALUE ary)
VALUE            2664 array.c            VALUE *p, *t, *end;
VALUE            2678 array.c            REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
VALUE            2693 array.c        static VALUE
VALUE            2694 array.c        rb_ary_compact(VALUE ary)
VALUE            2716 array.c        static VALUE
VALUE            2717 array.c        rb_ary_nitems(VALUE ary)
VALUE            2725 array.c        	    VALUE v = RARRAY(ary)->ptr[i];
VALUE            2730 array.c        	VALUE *p = RARRAY(ary)->ptr;
VALUE            2731 array.c        	VALUE *pend = p + RARRAY(ary)->len;
VALUE            2742 array.c        flatten(VALUE ary, long idx, VALUE ary2, VALUE memo)
VALUE            2744 array.c            VALUE id;
VALUE            2755 array.c        	VALUE tmp;
VALUE            2783 array.c        static VALUE
VALUE            2784 array.c        rb_ary_flatten_bang(VALUE ary)
VALUE            2788 array.c            VALUE memo = Qnil;
VALUE            2791 array.c        	VALUE ary2 = RARRAY(ary)->ptr[i];
VALUE            2792 array.c        	VALUE tmp;
VALUE            2822 array.c        static VALUE
VALUE            2823 array.c        rb_ary_flatten(VALUE ary)
VALUE              21 bignum.c       VALUE rb_cBignum;
VALUE              41 bignum.c       static VALUE
VALUE              42 bignum.c       bignew_1(VALUE klass, long len, int sign)
VALUE              50 bignum.c           return (VALUE)big;
VALUE              55 bignum.c       VALUE
VALUE              56 bignum.c       rb_big_clone(VALUE x)
VALUE              58 bignum.c           VALUE z = bignew_1(CLASS_OF(x), RBIGNUM(x)->len, RBIGNUM(x)->sign);
VALUE              66 bignum.c       get2comp(VALUE x)
VALUE              87 bignum.c       rb_big_2comp(VALUE x)			/* get 2's complement */
VALUE              92 bignum.c       static VALUE
VALUE              93 bignum.c       bignorm(VALUE x)
VALUE             102 bignum.c       	if (len*SIZEOF_BDIGITS <= sizeof(VALUE)) {
VALUE             118 bignum.c       VALUE
VALUE             119 bignum.c       rb_big_norm(VALUE x)
VALUE             124 bignum.c       VALUE
VALUE             130 bignum.c           VALUE big;
VALUE             145 bignum.c       VALUE
VALUE             149 bignum.c           VALUE big;
VALUE             162 bignum.c       VALUE
VALUE             169 bignum.c       VALUE
VALUE             179 bignum.c       rb_quad_pack(char *buf, VALUE val)
VALUE             205 bignum.c       VALUE
VALUE             212 bignum.c           VALUE big;
VALUE             251 bignum.c           VALUE val;
VALUE             276 bignum.c       VALUE
VALUE             281 bignum.c           VALUE big = bignew(QUAD_SIZE/SIZEOF_BDIGITS, 1);
VALUE             300 bignum.c       VALUE
VALUE             310 bignum.c           VALUE z;
VALUE             409 bignum.c           if (len <= (sizeof(VALUE)*CHAR_BIT)) {
VALUE             427 bignum.c       	    VALUE big = rb_uint2big(val);
VALUE             492 bignum.c       VALUE
VALUE             493 bignum.c       rb_str_to_inum(VALUE str, int base, int badcheck)
VALUE             520 bignum.c       VALUE
VALUE             526 bignum.c           VALUE big;
VALUE             541 bignum.c       VALUE
VALUE             545 bignum.c           VALUE big;
VALUE             558 bignum.c       VALUE
VALUE             565 bignum.c       VALUE
VALUE             574 bignum.c       VALUE
VALUE             580 bignum.c       VALUE
VALUE             581 bignum.c       rb_str2inum(VALUE str, int base)
VALUE             587 bignum.c       VALUE
VALUE             588 bignum.c       rb_big2str(VALUE x, int base)
VALUE             590 bignum.c           volatile VALUE t;
VALUE             593 bignum.c           VALUE ss;
VALUE             683 bignum.c       static VALUE
VALUE             684 bignum.c       rb_big_to_s(int argc, VALUE *argv, VALUE x)
VALUE             686 bignum.c           VALUE b;
VALUE             696 bignum.c       big2ulong(VALUE x, const char *type, int check)
VALUE             717 bignum.c       rb_big2ulong_pack(VALUE x)
VALUE             727 bignum.c       rb_big2ulong(VALUE x)
VALUE             741 bignum.c       rb_big2long(VALUE x)
VALUE             755 bignum.c       big2ull(VALUE x, const char *type)
VALUE             773 bignum.c       rb_big2ull(VALUE x)
VALUE             782 bignum.c       rb_big2ll(VALUE x)
VALUE             796 bignum.c       static VALUE
VALUE             802 bignum.c           VALUE z;
VALUE             828 bignum.c       VALUE
VALUE             835 bignum.c       rb_big2dbl(VALUE x)
VALUE             861 bignum.c       static VALUE
VALUE             862 bignum.c       rb_big_to_f(VALUE x)
VALUE             877 bignum.c       VALUE
VALUE             878 bignum.c       rb_big_cmp(VALUE x, VALUE y)
VALUE             922 bignum.c       VALUE
VALUE             923 bignum.c       rb_big_eq(VALUE x, VALUE y)
VALUE             960 bignum.c       static VALUE
VALUE             961 bignum.c       rb_big_eql(VALUE x, VALUE y)
VALUE             977 bignum.c       static VALUE
VALUE             978 bignum.c       rb_big_uminus(VALUE x)
VALUE             980 bignum.c           VALUE z = rb_big_clone(x);
VALUE             999 bignum.c       static VALUE
VALUE            1000 bignum.c       rb_big_neg(VALUE x)
VALUE            1002 bignum.c           VALUE z = rb_big_clone(x);
VALUE            1018 bignum.c       static VALUE
VALUE            1019 bignum.c       bigsub(VALUE x, VALUE y)
VALUE            1021 bignum.c           VALUE z = 0;
VALUE            1064 bignum.c       static VALUE
VALUE            1065 bignum.c       bigadd(VALUE x, VALUE y, int sign)
VALUE            1067 bignum.c           VALUE z;
VALUE            1114 bignum.c       VALUE
VALUE            1115 bignum.c       rb_big_plus(VALUE x, VALUE y)
VALUE            1139 bignum.c       VALUE
VALUE            1140 bignum.c       rb_big_minus(VALUE x, VALUE y)
VALUE            1157 bignum.c       static VALUE
VALUE            1158 bignum.c       rb_big_mul0(VALUE x, VALUE y)
VALUE            1162 bignum.c           VALUE z;
VALUE            1208 bignum.c       VALUE
VALUE            1209 bignum.c       rb_big_mul(VALUE x, VALUE y)
VALUE            1215 bignum.c       bigdivrem(VALUE x, VALUE y, VALUE *divp, VALUE *modp)
VALUE            1219 bignum.c           VALUE yy, z;
VALUE            1343 bignum.c       bigdivmod(VALUE x, VALUE y, VALUE *divp, VALUE *modp)
VALUE            1345 bignum.c           VALUE mod;
VALUE            1366 bignum.c       VALUE
VALUE            1367 bignum.c       rb_big_div(VALUE x, VALUE y)
VALUE            1369 bignum.c           VALUE z;
VALUE            1399 bignum.c       VALUE
VALUE            1400 bignum.c       rb_big_modulo(VALUE x, VALUE y)
VALUE            1402 bignum.c           VALUE z;
VALUE            1429 bignum.c       static VALUE
VALUE            1430 bignum.c       rb_big_remainder(VALUE x, VALUE y)
VALUE            1432 bignum.c           VALUE z;
VALUE            1457 bignum.c       VALUE
VALUE            1458 bignum.c       rb_big_divmod(VALUE x, VALUE y)
VALUE            1460 bignum.c           VALUE div, mod;
VALUE            1490 bignum.c       static VALUE
VALUE            1491 bignum.c       rb_big_quo(VALUE x, VALUE y)
VALUE            1528 bignum.c       VALUE
VALUE            1529 bignum.c       rb_big_pow(VALUE x, VALUE y)
VALUE            1548 bignum.c       	    VALUE z = x;
VALUE            1577 bignum.c       VALUE
VALUE            1578 bignum.c       rb_big_and(VALUE xx, VALUE yy)
VALUE            1580 bignum.c           volatile VALUE x, y, z;
VALUE            1632 bignum.c       VALUE
VALUE            1633 bignum.c       rb_big_or(VALUE xx, VALUE yy)
VALUE            1635 bignum.c           volatile VALUE x, y, z;
VALUE            1689 bignum.c       VALUE
VALUE            1690 bignum.c       rb_big_xor(VALUE xx, VALUE yy)
VALUE            1692 bignum.c           volatile VALUE x, y;
VALUE            1693 bignum.c           VALUE z;
VALUE            1742 bignum.c       static VALUE rb_big_rshift(VALUE,VALUE);
VALUE            1751 bignum.c       VALUE
VALUE            1752 bignum.c       rb_big_lshift(VALUE x, VALUE y)
VALUE            1758 bignum.c           VALUE z;
VALUE            1786 bignum.c       static VALUE
VALUE            1787 bignum.c       rb_big_rshift(VALUE x, VALUE y)
VALUE            1793 bignum.c           VALUE z;
VALUE            1796 bignum.c           volatile VALUE save_x;
VALUE            1847 bignum.c       static VALUE
VALUE            1848 bignum.c       rb_big_aref(VALUE x, VALUE y)
VALUE            1885 bignum.c       static VALUE
VALUE            1886 bignum.c       rb_big_hash(VALUE x)
VALUE            1902 bignum.c       static VALUE
VALUE            1903 bignum.c       rb_big_coerce(VALUE x, VALUE y)
VALUE            1928 bignum.c       static VALUE
VALUE            1929 bignum.c       rb_big_abs(VALUE x)
VALUE            1950 bignum.c       static VALUE
VALUE            1951 bignum.c       rb_big_size(VALUE big)
VALUE              21 class.c        VALUE
VALUE              22 class.c        rb_class_boot(VALUE super)
VALUE              33 class.c            return (VALUE)klass;
VALUE              37 class.c        rb_check_inheritable(VALUE super)
VALUE              48 class.c        VALUE
VALUE              49 class.c        rb_class_new(VALUE super)
VALUE              67 class.c        VALUE
VALUE              68 class.c        rb_mod_init_copy(VALUE clone, VALUE orig)
VALUE              94 class.c        VALUE
VALUE              95 class.c        rb_class_init_copy(VALUE clone, VALUE orig)
VALUE             106 class.c        VALUE
VALUE             107 class.c        rb_singleton_class_clone(VALUE obj)
VALUE             109 class.c            VALUE klass = RBASIC(obj)->klass;
VALUE             119 class.c        	    RBASIC(clone)->klass = (VALUE)clone;
VALUE             134 class.c        	rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)clone);
VALUE             136 class.c        	return (VALUE)clone;
VALUE             141 class.c        rb_singleton_class_attached(VALUE klass, VALUE obj)
VALUE             151 class.c        VALUE
VALUE             152 class.c        rb_make_metaclass(VALUE obj, VALUE super)
VALUE             158 class.c        	VALUE metasuper;
VALUE             159 class.c        	VALUE klass = rb_class_boot(super);
VALUE             174 class.c        VALUE
VALUE             175 class.c        rb_define_class_id(ID id, VALUE super)
VALUE             177 class.c            VALUE klass;
VALUE             186 class.c        VALUE
VALUE             187 class.c        rb_class_inherited(VALUE super, VALUE klass)
VALUE             193 class.c        VALUE
VALUE             194 class.c        rb_define_class(const char *name, VALUE super)
VALUE             196 class.c            VALUE klass;
VALUE             222 class.c        VALUE
VALUE             223 class.c        rb_define_class_under(VALUE outer, const char *name, VALUE super)
VALUE             225 class.c            VALUE klass;
VALUE             251 class.c        VALUE
VALUE             262 class.c            return (VALUE)mdl;
VALUE             265 class.c        VALUE
VALUE             268 class.c            VALUE mdl;
VALUE             276 class.c        VALUE
VALUE             279 class.c            VALUE module;
VALUE             296 class.c        VALUE
VALUE             297 class.c        rb_define_module_under(VALUE outer, const char *name)
VALUE             299 class.c            VALUE module;
VALUE             317 class.c        static VALUE
VALUE             318 class.c        include_class_new(VALUE module, VALUE super)
VALUE             341 class.c            return (VALUE)klass;
VALUE             345 class.c        rb_include_module(VALUE klass, VALUE module)
VALUE             347 class.c            VALUE p, c;
VALUE             411 class.c        VALUE
VALUE             412 class.c        rb_mod_included_modules(VALUE mod)
VALUE             414 class.c            VALUE ary = rb_ary_new();
VALUE             415 class.c            VALUE p;
VALUE             444 class.c        VALUE
VALUE             445 class.c        rb_mod_include_p(VALUE mod, VALUE mod2)
VALUE             447 class.c            VALUE p;
VALUE             474 class.c        VALUE
VALUE             475 class.c        rb_mod_ancestors(VALUE mod)
VALUE             477 class.c            VALUE p, ary = rb_ary_new();
VALUE             496 class.c        ins_methods_push(ID name, long type, VALUE ary, long visi)
VALUE             516 class.c        ins_methods_i(ID name, long type, VALUE ary)
VALUE             522 class.c        ins_methods_prot_i(ID name, long type, VALUE ary)
VALUE             528 class.c        ins_methods_priv_i(ID name, long type, VALUE ary)
VALUE             534 class.c        ins_methods_pub_i(ID name, long type, VALUE ary)
VALUE             553 class.c        static VALUE
VALUE             554 class.c        class_instance_method_list(int argc, VALUE *argv, VALUE mod, int (*func) (ID, long, VALUE))
VALUE             556 class.c            VALUE ary;
VALUE             564 class.c        	VALUE r;
VALUE             610 class.c        VALUE
VALUE             611 class.c        rb_class_instance_methods(int argc, VALUE *argv, VALUE mod)
VALUE             625 class.c        VALUE
VALUE             626 class.c        rb_class_protected_instance_methods(int argc, VALUE *argv, VALUE mod)
VALUE             648 class.c        VALUE
VALUE             649 class.c        rb_class_private_instance_methods(int argc, VALUE *argv, VALUE mod)
VALUE             663 class.c        VALUE
VALUE             664 class.c        rb_class_public_instance_methods(int argc, VALUE *argv, VALUE mod)
VALUE             701 class.c        VALUE
VALUE             702 class.c        rb_obj_singleton_methods(int argc, VALUE *argv, VALUE obj)
VALUE             704 class.c            VALUE recur, ary, klass;
VALUE             731 class.c        rb_define_method_id(VALUE klass, ID name, VALUE (*func)(ANYARGS), int argc)
VALUE             737 class.c        rb_define_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc)
VALUE             743 class.c        rb_define_protected_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc)
VALUE             749 class.c        rb_define_private_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc)
VALUE             755 class.c        rb_undef_method(VALUE klass, const char *name)
VALUE             766 class.c        VALUE
VALUE             767 class.c        rb_singleton_class(VALUE obj)
VALUE             769 class.c            VALUE klass;
VALUE             802 class.c        rb_define_singleton_method(VALUE obj, const char *name, VALUE (*func)(ANYARGS), int argc)
VALUE             808 class.c        rb_define_module_function(VALUE module, const char *name, VALUE (*func)(ANYARGS), int argc)
VALUE             815 class.c        rb_define_global_function(const char *name, VALUE (*func)(ANYARGS), int argc)
VALUE             821 class.c        rb_define_alias(VALUE klass, const char *name1, const char *name2)
VALUE             827 class.c        rb_define_attr(VALUE klass, const char *name, int read, int write)
VALUE             835 class.c        rb_scan_args(int argc, const VALUE *argv, const char *fmt, ...)
VALUE             839 class.c            VALUE *var;
VALUE             851 class.c        	    var = va_arg(vargs, VALUE*);
VALUE             863 class.c        	    var = va_arg(vargs, VALUE*);
VALUE             876 class.c        	var = va_arg(vargs, VALUE*);
VALUE             888 class.c        	var = va_arg(vargs, VALUE*);
VALUE              15 compar.c       VALUE rb_mComparable;
VALUE              20 compar.c       rb_cmpint(VALUE val, VALUE a, VALUE b)
VALUE              36 compar.c       rb_cmperr(VALUE x, VALUE y)
VALUE              51 compar.c       static VALUE
VALUE              52 compar.c       cmp_eq(VALUE *a)
VALUE              54 compar.c           VALUE c = rb_funcall(a[0], cmp, 1, a[1]);
VALUE              61 compar.c       static VALUE
VALUE              76 compar.c       static VALUE
VALUE              77 compar.c       cmp_equal(VALUE x, VALUE y)
VALUE              79 compar.c           VALUE a[2];
VALUE              84 compar.c           return rb_rescue(cmp_eq, (VALUE)a, cmp_failed, 0);
VALUE              95 compar.c       static VALUE
VALUE              96 compar.c       cmp_gt(VALUE x, VALUE y)
VALUE              98 compar.c           VALUE c = rb_funcall(x, cmp, 1, y);
VALUE             112 compar.c       static VALUE
VALUE             113 compar.c       cmp_ge(VALUE x, VALUE y)
VALUE             115 compar.c           VALUE c = rb_funcall(x, cmp, 1, y);
VALUE             129 compar.c       static VALUE
VALUE             130 compar.c       cmp_lt(VALUE x, VALUE y)
VALUE             132 compar.c           VALUE c = rb_funcall(x, cmp, 1, y);
VALUE             146 compar.c       static VALUE
VALUE             147 compar.c       cmp_le(VALUE x, VALUE y)
VALUE             149 compar.c           VALUE c = rb_funcall(x, cmp, 1, y);
VALUE             170 compar.c       static VALUE
VALUE             171 compar.c       cmp_between(VALUE x, VALUE min, VALUE max)
VALUE             350 dir.c          VALUE rb_cDir;
VALUE             367 dir.c          static VALUE dir_close(VALUE);
VALUE             369 dir.c          static VALUE
VALUE             370 dir.c          dir_s_alloc(VALUE klass)
VALUE             373 dir.c              VALUE obj = Data_Make_Struct(klass, struct dir_data, 0, free_dir, dirp);
VALUE             387 dir.c          static VALUE
VALUE             388 dir.c          dir_initialize(VALUE dir, VALUE dirname)
VALUE             424 dir.c          static VALUE
VALUE             425 dir.c          dir_s_open(VALUE klass, VALUE dirname)
VALUE             428 dir.c              VALUE dir = Data_Make_Struct(klass, struct dir_data, 0, free_dir, dp);
VALUE             455 dir.c          static VALUE
VALUE             456 dir.c          dir_inspect(VALUE dir)
VALUE             464 dir.c          	VALUE s = rb_str_new(0, len);
VALUE             480 dir.c          static VALUE
VALUE             481 dir.c          dir_path(VALUE dir)
VALUE             502 dir.c          static VALUE
VALUE             503 dir.c          dir_read(VALUE dir)
VALUE             540 dir.c          static VALUE
VALUE             541 dir.c          dir_each(VALUE dir)
VALUE             569 dir.c          static VALUE
VALUE             570 dir.c          dir_tell(VALUE dir)
VALUE             598 dir.c          static VALUE
VALUE             599 dir.c          dir_seek(VALUE dir, VALUE pos)
VALUE             627 dir.c          static VALUE
VALUE             628 dir.c          dir_set_pos(VALUE dir, VALUE pos)
VALUE             645 dir.c          static VALUE
VALUE             646 dir.c          dir_rewind(VALUE dir)
VALUE             665 dir.c          static VALUE
VALUE             666 dir.c          dir_close(VALUE dir)
VALUE             678 dir.c          dir_chdir(VALUE path)
VALUE             685 dir.c          static VALUE chdir_thread = Qnil;
VALUE             688 dir.c              VALUE old_path, new_path;
VALUE             692 dir.c          static VALUE
VALUE             703 dir.c          static VALUE
VALUE             754 dir.c          static VALUE
VALUE             755 dir.c          dir_s_chdir(int argc, VALUE *argv, VALUE obj)
VALUE             757 dir.c              VALUE path = Qnil;
VALUE             784 dir.c          	return rb_ensure(chdir_yield, (VALUE)&args, chdir_restore, (VALUE)&args);
VALUE             802 dir.c          static VALUE
VALUE             803 dir.c          dir_s_getwd(VALUE dir)
VALUE             806 dir.c              VALUE cwd;
VALUE             817 dir.c          check_dirname(volatile VALUE *dir)
VALUE             838 dir.c          static VALUE
VALUE             839 dir.c          dir_s_chroot(VALUE dir, VALUE path)
VALUE             867 dir.c          static VALUE
VALUE             868 dir.c          dir_s_mkdir(int argc, VALUE *argv, VALUE obj)
VALUE             870 dir.c              VALUE path, vmode;
VALUE             896 dir.c          static VALUE
VALUE             897 dir.c          dir_s_rmdir(VALUE obj, VALUE dir)
VALUE             908 dir.c              ((flags & GLOB_VERBOSE) && rb_protect((VALUE (*)(VALUE))rb_sys_warning, (VALUE)(val), 0))
VALUE            1130 dir.c              void (*func)(const char *, VALUE);
VALUE            1132 dir.c              VALUE value;
VALUE            1135 dir.c          static VALUE
VALUE            1136 dir.c          glob_func_caller(VALUE val)
VALUE            1156 dir.c              VALUE arg)
VALUE            1307 dir.c          ruby_glob0(const char *path, int flags, ruby_glob_func *func, VALUE arg)
VALUE            1337 dir.c          ruby_glob(const char *path, int flags, ruby_glob_func *func, VALUE arg)
VALUE            1343 dir.c          rb_glob_caller(const char *path, VALUE a)
VALUE            1354 dir.c          rb_glob2(const char *path, int flags, void (*func)(const char *, VALUE), VALUE arg)
VALUE            1365 dir.c              return ruby_glob0(path, flags | GLOB_VERBOSE, rb_glob_caller, (VALUE)&args);
VALUE            1369 dir.c          rb_glob(const char *path, void (*func)(const char *, VALUE), VALUE arg)
VALUE            1376 dir.c          push_pattern(const char *path, VALUE ary)
VALUE            1382 dir.c          ruby_brace_expand(const char *str, int flags, ruby_glob_func *func, VALUE arg)
VALUE            1438 dir.c              VALUE value;
VALUE            1443 dir.c          glob_brace(const char *path, VALUE val)
VALUE            1451 dir.c          ruby_brace_glob0(const char *str, int flags, ruby_glob_func *func, VALUE arg)
VALUE            1458 dir.c              return ruby_brace_expand(str, flags, glob_brace, (VALUE)&args);
VALUE            1462 dir.c          ruby_brace_glob(const char *str, int flags, ruby_glob_func *func, VALUE arg)
VALUE            1468 dir.c          push_glob(VALUE ary, const char *str, int flags)
VALUE            1474 dir.c              return ruby_brace_glob0(str, flags | GLOB_VERBOSE, rb_glob_caller, (VALUE)&args);
VALUE            1477 dir.c          static VALUE
VALUE            1478 dir.c          rb_push_glob(VALUE str, int flags) /* '\0' is delimiter */
VALUE            1481 dir.c              VALUE ary;
VALUE            1503 dir.c          static VALUE
VALUE            1504 dir.c          dir_globs(long argc, VALUE *argv, int flags)
VALUE            1506 dir.c              VALUE ary = rb_ary_new();
VALUE            1511 dir.c          	VALUE str = argv[i];
VALUE            1530 dir.c          static VALUE
VALUE            1531 dir.c          dir_s_aref(int argc, VALUE *argv, VALUE obj)
VALUE            1599 dir.c          static VALUE
VALUE            1600 dir.c          dir_s_glob(int argc, VALUE *argv, VALUE obj)
VALUE            1602 dir.c              VALUE str, rflags, ary;
VALUE            1615 dir.c          	volatile VALUE v = ary;
VALUE            1626 dir.c          static VALUE
VALUE            1627 dir.c          dir_open_dir(VALUE path)
VALUE            1629 dir.c              VALUE dir = rb_funcall(rb_cDir, rb_intern("open"), 1, path);
VALUE            1657 dir.c          static VALUE
VALUE            1658 dir.c          dir_foreach(VALUE io, VALUE dirname)
VALUE            1660 dir.c              VALUE dir;
VALUE            1678 dir.c          static VALUE
VALUE            1679 dir.c          dir_entries(VALUE io, VALUE dirname)
VALUE            1681 dir.c              VALUE dir;
VALUE            1766 dir.c          static VALUE
VALUE            1767 dir.c          file_s_fnmatch(int argc, VALUE *argv, VALUE obj)
VALUE            1769 dir.c              VALUE pattern, path;
VALUE            1770 dir.c              VALUE rflags;
VALUE              17 enum.c         VALUE rb_mEnumerable;
VALUE              20 enum.c         VALUE
VALUE              21 enum.c         rb_each(VALUE obj)
VALUE              26 enum.c         static VALUE
VALUE              27 enum.c         grep_i(VALUE i, VALUE *arg)
VALUE              35 enum.c         static VALUE
VALUE              36 enum.c         grep_iter_i(VALUE i, VALUE *arg)
VALUE              62 enum.c         static VALUE
VALUE              63 enum.c         enum_grep(VALUE obj, VALUE pat)
VALUE              65 enum.c             VALUE ary = rb_ary_new();
VALUE              66 enum.c             VALUE arg[2];
VALUE              71 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? grep_iter_i : grep_i, (VALUE)arg);
VALUE              76 enum.c         static VALUE
VALUE              77 enum.c         count_i(VALUE i, VALUE *arg)
VALUE              85 enum.c         static VALUE
VALUE              86 enum.c         count_iter_i(VALUE i, long *n)
VALUE             108 enum.c         static VALUE
VALUE             109 enum.c         enum_count(int argc, VALUE *argv, VALUE obj)
VALUE             112 enum.c         	VALUE item, args[2];
VALUE             120 enum.c         	rb_iterate(rb_each, obj, count_i, (VALUE)&args);
VALUE             126 enum.c         	rb_iterate(rb_each, obj, count_iter_i, (VALUE)&n);
VALUE             131 enum.c         static VALUE
VALUE             132 enum.c         find_i(VALUE i, VALUE *memo)
VALUE             156 enum.c         static VALUE
VALUE             157 enum.c         enum_find(int argc, VALUE *argv, VALUE obj)
VALUE             159 enum.c             VALUE memo = Qundef;
VALUE             160 enum.c             VALUE if_none;
VALUE             164 enum.c             rb_iterate(rb_each, obj, find_i, (VALUE)&memo);
VALUE             174 enum.c         static VALUE
VALUE             175 enum.c         find_all_i(VALUE i, VALUE ary)
VALUE             196 enum.c         static VALUE
VALUE             197 enum.c         enum_find_all(VALUE obj)
VALUE             199 enum.c             VALUE ary;
VALUE             209 enum.c         static VALUE
VALUE             210 enum.c         reject_i(VALUE i, VALUE ary)
VALUE             229 enum.c         static VALUE
VALUE             230 enum.c         enum_reject(VALUE obj)
VALUE             232 enum.c             VALUE ary;
VALUE             242 enum.c         static VALUE
VALUE             243 enum.c         collect_i(VALUE i, VALUE ary)
VALUE             250 enum.c         static VALUE
VALUE             251 enum.c         collect_all(VALUE i, VALUE ary)
VALUE             271 enum.c         static VALUE
VALUE             272 enum.c         enum_collect(VALUE obj)
VALUE             274 enum.c             VALUE ary;
VALUE             294 enum.c         static VALUE
VALUE             295 enum.c         enum_to_a(VALUE obj)
VALUE             297 enum.c             VALUE ary = rb_ary_new();
VALUE             304 enum.c         static VALUE
VALUE             305 enum.c         inject_i(VALUE i, VALUE *memo)
VALUE             347 enum.c         static VALUE
VALUE             348 enum.c         enum_inject(int argc, VALUE *argv, VALUE obj)
VALUE             350 enum.c             VALUE memo = Qundef;
VALUE             354 enum.c             rb_iterate(rb_each, obj, inject_i, (VALUE)&memo);
VALUE             359 enum.c         static VALUE
VALUE             360 enum.c         partition_i(VALUE i, VALUE *ary)
VALUE             383 enum.c         static VALUE
VALUE             384 enum.c         enum_partition(VALUE obj)
VALUE             386 enum.c             VALUE ary[2];
VALUE             392 enum.c             rb_iterate(rb_each, obj, partition_i, (VALUE)ary);
VALUE             414 enum.c         static VALUE
VALUE             415 enum.c         enum_sort(VALUE obj)
VALUE             420 enum.c         static VALUE
VALUE             421 enum.c         sort_by_i(VALUE i, VALUE ary)
VALUE             423 enum.c             VALUE v;
VALUE             431 enum.c             rb_ary_push(ary, (VALUE)memo);
VALUE             438 enum.c             VALUE a = (*(NODE *const *)ap)->u1.value;
VALUE             439 enum.c             VALUE b = (*(NODE *const *)bp)->u1.value;
VALUE             513 enum.c         static VALUE
VALUE             514 enum.c         enum_sort_by(VALUE obj)
VALUE             516 enum.c             VALUE ary;
VALUE             530 enum.c         	ruby_qsort(RARRAY(ary)->ptr, RARRAY(ary)->len, sizeof(VALUE), sort_by_cmp, 0);
VALUE             542 enum.c         static VALUE
VALUE             543 enum.c         all_iter_i(VALUE i, VALUE *memo)
VALUE             552 enum.c         static VALUE
VALUE             553 enum.c         all_i(VALUE i, VALUE *memo)
VALUE             579 enum.c         static VALUE
VALUE             580 enum.c         enum_all(VALUE obj)
VALUE             582 enum.c             VALUE result = Qtrue;
VALUE             584 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? all_iter_i : all_i, (VALUE)&result);
VALUE             588 enum.c         static VALUE
VALUE             589 enum.c         any_iter_i(VALUE i, VALUE *memo)
VALUE             598 enum.c         static VALUE
VALUE             599 enum.c         any_i(VALUE i, VALUE *memo)
VALUE             626 enum.c         static VALUE
VALUE             627 enum.c         enum_any(VALUE obj)
VALUE             629 enum.c             VALUE result = Qfalse;
VALUE             631 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? any_iter_i : any_i, (VALUE)&result);
VALUE             635 enum.c         static VALUE
VALUE             636 enum.c         one_iter_i(VALUE i, VALUE *memo)
VALUE             649 enum.c         static VALUE
VALUE             650 enum.c         one_i(VALUE i, VALUE *memo)
VALUE             679 enum.c         static VALUE
VALUE             680 enum.c         enum_one(VALUE obj)
VALUE             682 enum.c             VALUE result = Qundef;
VALUE             684 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? one_iter_i : one_i, (VALUE)&result);
VALUE             689 enum.c         static VALUE
VALUE             690 enum.c         none_iter_i(VALUE i, VALUE *memo)
VALUE             699 enum.c         static VALUE
VALUE             700 enum.c         none_i(VALUE i, VALUE *memo)
VALUE             724 enum.c         static VALUE
VALUE             725 enum.c         enum_none(VALUE obj)
VALUE             727 enum.c             VALUE result = Qtrue;
VALUE             729 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? none_iter_i : none_i, (VALUE)&result);
VALUE             733 enum.c         static VALUE
VALUE             734 enum.c         min_i(VALUE i, VALUE *memo)
VALUE             736 enum.c             VALUE cmp;
VALUE             750 enum.c         static VALUE
VALUE             751 enum.c         min_ii(VALUE i, VALUE *memo)
VALUE             753 enum.c             VALUE cmp;
VALUE             782 enum.c         static VALUE
VALUE             783 enum.c         enum_min(VALUE obj)
VALUE             785 enum.c             VALUE result = Qundef;
VALUE             787 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? min_ii : min_i, (VALUE)&result);
VALUE             792 enum.c         static VALUE
VALUE             793 enum.c         max_i(VALUE i, VALUE *memo)
VALUE             795 enum.c             VALUE cmp;
VALUE             809 enum.c         static VALUE
VALUE             810 enum.c         max_ii(VALUE i, VALUE *memo)
VALUE             812 enum.c             VALUE cmp;
VALUE             840 enum.c         static VALUE
VALUE             841 enum.c         enum_max(VALUE obj)
VALUE             843 enum.c             VALUE result = Qundef;
VALUE             845 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? max_ii : max_i, (VALUE)&result);
VALUE             850 enum.c         static VALUE
VALUE             851 enum.c         min_by_i(VALUE i, VALUE *memo)
VALUE             853 enum.c             VALUE v;
VALUE             878 enum.c         static VALUE
VALUE             879 enum.c         enum_min_by(VALUE obj)
VALUE             881 enum.c             VALUE memo[2];
VALUE             887 enum.c             rb_iterate(rb_each, obj, min_by_i, (VALUE)memo);
VALUE             891 enum.c         static VALUE
VALUE             892 enum.c         max_by_i(VALUE i, VALUE *memo)
VALUE             894 enum.c             VALUE v;
VALUE             919 enum.c         static VALUE
VALUE             920 enum.c         enum_max_by(VALUE obj)
VALUE             922 enum.c             VALUE memo[2];
VALUE             928 enum.c             rb_iterate(rb_each, obj, max_by_i, (VALUE)memo);
VALUE             932 enum.c         static VALUE
VALUE             933 enum.c         member_i(VALUE item, VALUE *memo)
VALUE             955 enum.c         static VALUE
VALUE             956 enum.c         enum_member(VALUE obj, VALUE val)
VALUE             958 enum.c             VALUE memo[2];
VALUE             962 enum.c             rb_iterate(rb_each, obj, member_i, (VALUE)memo);
VALUE             966 enum.c         static VALUE
VALUE             967 enum.c         each_with_index_i(VALUE val, VALUE *memo)
VALUE             989 enum.c         static VALUE
VALUE             990 enum.c         enum_each_with_index(VALUE obj)
VALUE             992 enum.c             VALUE memo = 0;
VALUE             996 enum.c             rb_iterate(rb_each, obj, each_with_index_i, (VALUE)&memo);
VALUE            1000 enum.c         static VALUE
VALUE            1001 enum.c         zip_i(VALUE val, VALUE *memo)
VALUE            1003 enum.c             VALUE result = memo[0];
VALUE            1004 enum.c             VALUE args = memo[1];
VALUE            1006 enum.c             VALUE tmp;
VALUE            1046 enum.c         static VALUE
VALUE            1047 enum.c         enum_zip(int argc, VALUE *argv, VALUE obj)
VALUE            1050 enum.c             VALUE result;
VALUE            1051 enum.c             VALUE memo[3];
VALUE            1060 enum.c             rb_iterate(rb_each, obj, zip_i, (VALUE)memo);
VALUE              23 enumerator.c   static VALUE rb_cEnumerator;
VALUE              24 enumerator.c   static VALUE sym_each, sym_each_with_index, sym_each_slice, sym_each_cons;
VALUE              26 enumerator.c   static VALUE
VALUE              27 enumerator.c   proc_call(VALUE proc, VALUE args)
VALUE              35 enumerator.c   static VALUE
VALUE              36 enumerator.c   method_call(VALUE method, VALUE args)
VALUE              39 enumerator.c       VALUE *argv = 0;
VALUE              48 enumerator.c       VALUE method;
VALUE              49 enumerator.c       VALUE proc;
VALUE              50 enumerator.c       VALUE args;
VALUE              51 enumerator.c       VALUE (*iter)(VALUE, struct enumerator *);
VALUE              64 enumerator.c   enumerator_ptr(VALUE obj)
VALUE              80 enumerator.c   static VALUE
VALUE              81 enumerator.c   enumerator_iter_i(VALUE i, struct enumerator *e)
VALUE             104 enumerator.c   static VALUE
VALUE             105 enumerator.c   obj_to_enum(int argc, VALUE *argv, VALUE obj)
VALUE             107 enumerator.c       VALUE meth = sym_each;
VALUE             123 enumerator.c   static VALUE
VALUE             124 enumerator.c   enumerator_enum_with_index(VALUE obj)
VALUE             129 enumerator.c   static VALUE
VALUE             130 enumerator.c   each_slice_i(VALUE val, VALUE *memo)
VALUE             132 enumerator.c       VALUE ary = memo[0];
VALUE             160 enumerator.c   static VALUE
VALUE             161 enumerator.c   enum_each_slice(VALUE obj, VALUE n)
VALUE             164 enumerator.c       VALUE args[2], ary;
VALUE             169 enumerator.c       args[1] = (VALUE)size;
VALUE             171 enumerator.c       rb_iterate(rb_each, obj, each_slice_i, (VALUE)args);
VALUE             186 enumerator.c   static VALUE
VALUE             187 enumerator.c   enumerator_enum_slice(VALUE obj, VALUE n)
VALUE             192 enumerator.c   static VALUE
VALUE             193 enumerator.c   each_cons_i(VALUE val, VALUE *memo)
VALUE             195 enumerator.c       VALUE ary = memo[0];
VALUE             228 enumerator.c   static VALUE
VALUE             229 enumerator.c   enum_each_cons(VALUE obj, VALUE n)
VALUE             232 enumerator.c       VALUE args[2];
VALUE             236 enumerator.c       args[1] = (VALUE)size;
VALUE             238 enumerator.c       rb_iterate(rb_each, obj, each_cons_i, (VALUE)args);
VALUE             250 enumerator.c   static VALUE
VALUE             251 enumerator.c   enumerator_enum_cons(VALUE obj, VALUE n)
VALUE             256 enumerator.c   static VALUE
VALUE             257 enumerator.c   enumerator_allocate(VALUE klass)
VALUE             264 enumerator.c   static VALUE
VALUE             265 enumerator.c   enumerator_init(VALUE enum_obj, VALUE obj, VALUE meth, int argc, VALUE *argv)
VALUE             275 enumerator.c   	ptr->iter = (VALUE (*)(VALUE, struct enumerator *))rb_yield;
VALUE             297 enumerator.c   static VALUE
VALUE             298 enumerator.c   enumerator_initialize(int argc, VALUE *argv, VALUE obj)
VALUE             300 enumerator.c       VALUE recv, meth = sym_each;
VALUE             312 enumerator.c   VALUE
VALUE             313 enumerator.c   rb_enumeratorize(VALUE obj, VALUE meth, int argc, VALUE *argv)
VALUE             318 enumerator.c   static VALUE
VALUE             319 enumerator.c   enumerator_iter(VALUE memo)
VALUE             334 enumerator.c   static VALUE
VALUE             335 enumerator.c   enumerator_each(VALUE obj)
VALUE             339 enumerator.c       return rb_iterate(enumerator_iter, (VALUE)e, e->iter, (VALUE)e);
VALUE             342 enumerator.c   static VALUE
VALUE             343 enumerator.c   enumerator_with_index_i(VALUE val, VALUE *memo)
VALUE             358 enumerator.c   static VALUE
VALUE             359 enumerator.c   enumerator_with_index(VALUE obj)
VALUE             362 enumerator.c       VALUE memo = 0;
VALUE             364 enumerator.c       return rb_iterate(enumerator_iter, (VALUE)e,
VALUE             365 enumerator.c   		      enumerator_with_index_i, (VALUE)&memo);
VALUE              17 env.h              VALUE self;
VALUE              21 env.h              VALUE this_class;
VALUE              38 env.h              VALUE *local_vars;
VALUE              49 env.h          RUBY_EXTERN VALUE ruby_class;
VALUE              54 env.h              VALUE val;
VALUE              60 env.h              VALUE klass, rklass;
VALUE              61 env.h              VALUE recv;
VALUE              70 env.h              VALUE self;
VALUE              73 env.h              VALUE klass;
VALUE              80 env.h              VALUE orig_thread;
VALUE              81 env.h              VALUE wrapper;
VALUE              82 env.h              VALUE block_obj;
VALUE             140 error.c        static VALUE
VALUE             141 error.c        rb_warn_m(VALUE self, VALUE mesg)
VALUE             201 error.c        rb_check_type(VALUE x, int t)
VALUE             241 error.c        VALUE rb_eException;
VALUE             242 error.c        VALUE rb_eSystemExit;
VALUE             243 error.c        VALUE rb_eInterrupt;
VALUE             244 error.c        VALUE rb_eSignal;
VALUE             245 error.c        VALUE rb_eFatal;
VALUE             246 error.c        VALUE rb_eStandardError;
VALUE             247 error.c        VALUE rb_eRuntimeError;
VALUE             248 error.c        VALUE rb_eTypeError;
VALUE             249 error.c        VALUE rb_eArgError;
VALUE             250 error.c        VALUE rb_eIndexError;
VALUE             251 error.c        VALUE rb_eKeyError;
VALUE             252 error.c        VALUE rb_eRangeError;
VALUE             253 error.c        VALUE rb_eNameError;
VALUE             254 error.c        VALUE rb_eNoMethodError;
VALUE             255 error.c        VALUE rb_eSecurityError;
VALUE             256 error.c        VALUE rb_eNotImpError;
VALUE             257 error.c        VALUE rb_eNoMemError;
VALUE             258 error.c        static VALUE rb_cNameErrorMesg;
VALUE             260 error.c        VALUE rb_eScriptError;
VALUE             261 error.c        VALUE rb_eSyntaxError;
VALUE             262 error.c        VALUE rb_eLoadError;
VALUE             264 error.c        VALUE rb_eSystemCallError;
VALUE             265 error.c        VALUE rb_mErrno;
VALUE             266 error.c        static VALUE eNOERROR;
VALUE             268 error.c        VALUE
VALUE             269 error.c        rb_exc_new(VALUE etype, const char *ptr, long len)
VALUE             274 error.c        VALUE
VALUE             275 error.c        rb_exc_new2(VALUE etype, const char *s)
VALUE             280 error.c        VALUE
VALUE             281 error.c        rb_exc_new3(VALUE etype, VALUE str)
VALUE             295 error.c        static VALUE
VALUE             296 error.c        exc_initialize(int argc, VALUE *argv, VALUE exc)
VALUE             298 error.c            VALUE arg;
VALUE             320 error.c        static VALUE
VALUE             321 error.c        exc_exception(int argc, VALUE *argv, VALUE self)
VALUE             323 error.c            VALUE exc;
VALUE             341 error.c        static VALUE
VALUE             342 error.c        exc_to_s(VALUE exc)
VALUE             344 error.c            VALUE mesg = rb_attr_get(exc, rb_intern("mesg"));
VALUE             361 error.c        static VALUE
VALUE             362 error.c        exc_message(VALUE exc)
VALUE             374 error.c        static VALUE
VALUE             375 error.c        exc_inspect(VALUE exc)
VALUE             377 error.c            VALUE str, klass;
VALUE             424 error.c        static VALUE
VALUE             425 error.c        exc_backtrace(VALUE exc)
VALUE             433 error.c        static VALUE
VALUE             434 error.c        check_backtrace(VALUE bt)
VALUE             465 error.c        static VALUE
VALUE             466 error.c        exc_set_backtrace(VALUE exc, VALUE bt)
VALUE             480 error.c        static VALUE
VALUE             481 error.c        exc_equal(VALUE exc, VALUE obj)
VALUE             502 error.c        static VALUE
VALUE             503 error.c        exit_initialize(int argc, VALUE *argv, VALUE exc)
VALUE             505 error.c            VALUE status = INT2FIX(EXIT_SUCCESS);
VALUE             523 error.c        static VALUE
VALUE             524 error.c        exit_status(VALUE exc)
VALUE             537 error.c        static VALUE
VALUE             538 error.c        exit_success_p(VALUE exc)
VALUE             540 error.c            VALUE status = rb_attr_get(exc, rb_intern("status"));
VALUE             549 error.c            VALUE exc, argv[2];
VALUE             572 error.c        static VALUE
VALUE             573 error.c        name_err_initialize(int argc, VALUE *argv, VALUE self)
VALUE             575 error.c            VALUE name;
VALUE             590 error.c        static VALUE
VALUE             591 error.c        name_err_name(VALUE self)
VALUE             603 error.c        static VALUE
VALUE             604 error.c        name_err_to_s(VALUE exc)
VALUE             606 error.c            VALUE mesg = rb_attr_get(exc, rb_intern("mesg"));
VALUE             607 error.c            VALUE str = mesg;
VALUE             628 error.c        static VALUE
VALUE             629 error.c        nometh_err_initialize(int argc, VALUE *argv, VALUE self)
VALUE             631 error.c            VALUE args = (argc > 2) ? argv[--argc] : Qnil;
VALUE             639 error.c        name_err_mesg_mark(VALUE *ptr)
VALUE             645 error.c        static VALUE
VALUE             646 error.c        name_err_mesg_new(VALUE obj, VALUE mesg, VALUE recv, VALUE method)
VALUE             648 error.c            VALUE *ptr = ALLOC_N(VALUE, 3);
VALUE             657 error.c        static VALUE
VALUE             658 error.c        name_err_mesg_equal(VALUE obj1, VALUE obj2)
VALUE             660 error.c            VALUE *ptr1, *ptr2;
VALUE             667 error.c            Data_Get_Struct(obj1, VALUE, ptr1);
VALUE             668 error.c            Data_Get_Struct(obj2, VALUE, ptr2);
VALUE             677 error.c        static VALUE
VALUE             678 error.c        name_err_mesg_to_str(VALUE obj)
VALUE             680 error.c            VALUE *ptr, mesg;
VALUE             681 error.c            Data_Get_Struct(obj, VALUE, ptr);
VALUE             687 error.c        	VALUE d = 0, args[3];
VALUE             723 error.c        static VALUE
VALUE             724 error.c        name_err_mesg_load(VALUE klass, VALUE str)
VALUE             737 error.c        static VALUE
VALUE             738 error.c        nometh_err_args(VALUE self)
VALUE             746 error.c            VALUE s = rb_str_inspect(rb_str_new2(str));
VALUE             784 error.c        static VALUE
VALUE             787 error.c            VALUE error;
VALUE             800 error.c        static VALUE
VALUE             803 error.c            VALUE error;
VALUE             825 error.c        static VALUE
VALUE             826 error.c        syserr_initialize(int argc, VALUE *argv, VALUE self)
VALUE             832 error.c            VALUE mesg, error;
VALUE             833 error.c            VALUE klass = rb_obj_class(self);
VALUE             855 error.c        	VALUE str = mesg;
VALUE             876 error.c        static VALUE
VALUE             877 error.c        syserr_errno(VALUE self)
VALUE             890 error.c        static VALUE
VALUE             891 error.c        syserr_eqq(VALUE self, VALUE exc)
VALUE             893 error.c            VALUE num, e;
VALUE             900 error.c        	VALUE klass = CLASS_OF(exc);
VALUE             903 error.c        	    klass = (VALUE)RCLASS(klass)->super;
VALUE             919 error.c        static VALUE
VALUE             920 error.c        errno_missing(VALUE self, VALUE id)
VALUE            1000 error.c        rb_raise(VALUE exc, const char *fmt, ...)
VALUE            1049 error.c            VALUE arg;
VALUE            1093 error.c        rb_check_frozen(VALUE obj)
VALUE            1473 error.c            extern VALUE ruby_errinfo;
VALUE            1480 error.c        	    VALUE str = rb_obj_as_string(ruby_errinfo);
VALUE             205 eval.c         VALUE rb_cProc;
VALUE             206 eval.c         static VALUE rb_cBinding;
VALUE             207 eval.c         static VALUE proc_invoke(VALUE,VALUE,VALUE,VALUE);
VALUE             208 eval.c         static VALUE proc_lambda(void);
VALUE             209 eval.c         static VALUE rb_f_binding(VALUE);
VALUE             211 eval.c         static VALUE rb_f_block_given_p(void);
VALUE             212 eval.c         static VALUE block_pass(VALUE,NODE*);
VALUE             213 eval.c         static VALUE rb_cMethod;
VALUE             214 eval.c         static VALUE rb_cUnboundMethod;
VALUE             215 eval.c         static VALUE umethod_bind(VALUE, VALUE);
VALUE             216 eval.c         static VALUE rb_mod_define_method(int, VALUE*, VALUE);
VALUE             217 eval.c         NORETURN(static void rb_raise_jump(VALUE));
VALUE             218 eval.c         static VALUE rb_make_exception(int argc, VALUE *argv);
VALUE             239 eval.c         static VALUE safe_getter(void);
VALUE             240 eval.c         static void safe_setter(VALUE val);
VALUE             257 eval.c         rb_secure_update(VALUE obj)
VALUE             263 eval.c         rb_check_safe_obj(VALUE x)
VALUE             278 eval.c         rb_check_safe_str(VALUE x)
VALUE             287 eval.c         NORETURN(static void print_undef(VALUE, ID));
VALUE             289 eval.c         print_undef(VALUE klass, ID id)
VALUE             306 eval.c             VALUE klass;		/* receiver's class */
VALUE             307 eval.c             VALUE origin;		/* where method defined  */
VALUE             329 eval.c         rb_clear_cache_for_undef(VALUE klass, ID id)
VALUE             359 eval.c         rb_clear_cache_by_class(VALUE klass)
VALUE             382 eval.c         rb_add_method(VALUE klass, ID mid, NODE *node, int noex)
VALUE             416 eval.c         rb_define_alloc_func(VALUE klass, VALUE (*func) (VALUE))
VALUE             423 eval.c         rb_undef_alloc_func(VALUE klass)
VALUE             430 eval.c         search_method(VALUE klass, ID id, VALUE *origin)
VALUE             445 eval.c         rb_get_method_body(VALUE *klassp, ID *idp, int *noexp)
VALUE             448 eval.c             VALUE klass = *klassp;
VALUE             449 eval.c             VALUE origin;
VALUE             503 eval.c         rb_method_node(VALUE klass, ID id)
VALUE             517 eval.c         remove_method(VALUE klass, ID mid)
VALUE             546 eval.c         rb_remove_method(VALUE klass, const char *name)
VALUE             559 eval.c         static VALUE
VALUE             560 eval.c         rb_mod_remove_method(int argc, VALUE *argv, VALUE mod)
VALUE             574 eval.c         rb_disable_super(VALUE klass, const char *name)
VALUE             580 eval.c         rb_enable_super(VALUE klass, const char *name)
VALUE             586 eval.c         rb_export_method(VALUE klass, ID name, ID noex)
VALUE             589 eval.c             VALUE origin;
VALUE             612 eval.c         rb_method_boundp(VALUE klass, ID id, int ex)
VALUE             634 eval.c         rb_attr(VALUE klass, ID id, int read, int write, int ex)
VALUE             677 eval.c         VALUE ruby_errinfo = Qnil;
VALUE             680 eval.c         static VALUE rb_eLocalJumpError;
VALUE             681 eval.c         static VALUE rb_eSysStackError;
VALUE             683 eval.c         extern VALUE ruby_top_self;
VALUE             756 eval.c         new_dvar(ID id, VALUE value, struct RVarmap *prev)
VALUE             767 eval.c         VALUE
VALUE             779 eval.c         VALUE
VALUE             792 eval.c         VALUE
VALUE             807 eval.c         rb_dvar_push(ID id, VALUE value)
VALUE             813 eval.c         dvar_asgn_internal(ID id, VALUE value, int curr)
VALUE             840 eval.c         dvar_asgn(ID id, VALUE value)
VALUE             846 eval.c         dvar_asgn_curr(ID id, VALUE value)
VALUE             851 eval.c         VALUE *
VALUE             893 eval.c             VALUE tag;
VALUE             894 eval.c             VALUE retval;
VALUE             896 eval.c             VALUE dst;
VALUE             934 eval.c         #define TAG_DST() (_tag.dst == (VALUE)ruby_frame->uniq)
VALUE             948 eval.c         VALUE ruby_class;
VALUE             949 eval.c         static VALUE ruby_wrapper;	/* security wrapper */
VALUE             952 eval.c             VALUE _class = ruby_class;		\
VALUE             989 eval.c         	    rb_gc_force_recycle((VALUE)ruby_scope);\
VALUE            1019 eval.c         static VALUE rb_eval(VALUE,NODE*);
VALUE            1020 eval.c         static VALUE eval(VALUE,VALUE,VALUE,const char*,int);
VALUE            1021 eval.c         static NODE *compile(VALUE, const char*, int);
VALUE            1023 eval.c         static VALUE rb_yield_0(VALUE, VALUE, VALUE, int, int);
VALUE            1038 eval.c         static VALUE rb_call(VALUE,VALUE,ID,int,const VALUE*,calling_scope_t);
VALUE            1039 eval.c         static VALUE module_setup(VALUE,NODE*);
VALUE            1041 eval.c         static VALUE massign(VALUE,NODE*,VALUE,int);
VALUE            1042 eval.c         static void assign(VALUE,NODE*,VALUE,int);
VALUE            1043 eval.c         static int formal_assign(VALUE, NODE*, int, const VALUE*, VALUE*);
VALUE            1063 eval.c         static VALUE trace_func = 0;
VALUE            1065 eval.c         static void call_trace_func(rb_event_t,NODE*,VALUE,ID,VALUE);
VALUE            1116 eval.c         static VALUE
VALUE            1117 eval.c         get_backtrace(VALUE info)
VALUE            1126 eval.c         set_backtrace(VALUE info, VALUE bt)
VALUE            1134 eval.c             VALUE errat = Qnil;		/* OK */
VALUE            1135 eval.c             volatile VALUE eclass, e;
VALUE            1160 eval.c         	VALUE mesg = RARRAY(errat)->ptr[0];
VALUE            1184 eval.c         	VALUE epath;
VALUE            1246 eval.c         void Init_stack(VALUE*);
VALUE            1328 eval.c         static VALUE
VALUE            1329 eval.c         eval_node(VALUE self, NODE *node)
VALUE            1348 eval.c         static VALUE exception_error;
VALUE            1349 eval.c         static VALUE sysstack_error;
VALUE            1352 eval.c         sysexit_status(VALUE err)
VALUE            1354 eval.c             VALUE st = rb_iv_get(err, "status");
VALUE            1472 eval.c             volatile VALUE err = ruby_errinfo;
VALUE            1497 eval.c         	VALUE st = rb_iv_get(err, "status");
VALUE            1555 eval.c             VALUE str;
VALUE            1570 eval.c         VALUE
VALUE            1573 eval.c             VALUE v;
VALUE            1584 eval.c         VALUE
VALUE            1587 eval.c             return rb_protect((VALUE (*)(VALUE))rb_eval_string, (VALUE)str, state);
VALUE            1590 eval.c         VALUE
VALUE            1594 eval.c             VALUE self = ruby_top_self;
VALUE            1595 eval.c             VALUE wrapper = ruby_wrapper;
VALUE            1596 eval.c             VALUE val;
VALUE            1625 eval.c         NORETURN(static void localjump_error(const char*, VALUE, int));
VALUE            1627 eval.c         localjump_error(const char *mesg, VALUE value, int reason)
VALUE            1629 eval.c             VALUE exc = rb_exc_new2(rb_eLocalJumpError, mesg);
VALUE            1657 eval.c         static VALUE
VALUE            1658 eval.c         localjump_xvalue(VALUE exc)
VALUE            1671 eval.c         static VALUE
VALUE            1672 eval.c         localjump_reason(VALUE exc)
VALUE            1677 eval.c         NORETURN(static void jump_tag_but_local_jump(int,VALUE));
VALUE            1679 eval.c         jump_tag_but_local_jump(int state, VALUE val)
VALUE            1707 eval.c         VALUE
VALUE            1708 eval.c         rb_eval_cmd(VALUE cmd, VALUE arg, int level)
VALUE            1711 eval.c             VALUE val = Qnil;		/* OK */
VALUE            1760 eval.c         static VALUE
VALUE            1761 eval.c         ev_const_defined(NODE *cref, ID id, VALUE self)
VALUE            1764 eval.c             VALUE result;
VALUE            1771 eval.c         		if (result == Qundef && NIL_P(rb_autoload_p((VALUE)klass, id))) {
VALUE            1782 eval.c         static VALUE
VALUE            1783 eval.c         ev_const_get(NODE *cref, ID id, VALUE self)
VALUE            1786 eval.c             VALUE result;
VALUE            1789 eval.c         	VALUE klass = cbase->nd_clss;
VALUE            1806 eval.c         static VALUE
VALUE            1838 eval.c         static VALUE
VALUE            1842 eval.c             VALUE ary = rb_ary_new();
VALUE            1868 eval.c         static VALUE
VALUE            1888 eval.c         rb_frozen_class_p(VALUE klass)
VALUE            1909 eval.c         rb_undef(VALUE klass, ID id)
VALUE            1911 eval.c             VALUE origin;
VALUE            1927 eval.c         	VALUE c = klass;
VALUE            1930 eval.c         	    VALUE obj = rb_iv_get(klass, "__attached__");
VALUE            1998 eval.c         static VALUE
VALUE            1999 eval.c         rb_mod_undef_method(int argc, VALUE *argv, VALUE mod)
VALUE            2010 eval.c         rb_alias(VALUE klass, ID name, ID def)
VALUE            2012 eval.c             VALUE origin;
VALUE            2014 eval.c             VALUE singleton = 0;
VALUE            2079 eval.c         static VALUE
VALUE            2080 eval.c         rb_mod_alias_method(VALUE mod, VALUE newname, VALUE oldname)
VALUE            2105 eval.c         				 ALLOC_N(VALUE,n),tmp__protect_tmp,n),	\
VALUE            2135 eval.c         	VALUE args = rb_eval(self,n);\
VALUE            2139 eval.c         	argv = ALLOCA_N(VALUE, argc);\
VALUE            2140 eval.c         	MEMCPY(argv, RARRAY(args)->ptr, VALUE, argc);\
VALUE            2164 eval.c         static const char* is_defined(VALUE, NODE*, char*, int);
VALUE            2167 eval.c         arg_defined(VALUE self, NODE *node, char *buf, char *type)
VALUE            2190 eval.c         is_defined(VALUE self, NODE *node /* OK */, char *buf, int noeval)
VALUE            2192 eval.c             VALUE val;			/* OK */
VALUE            2367 eval.c         static int handle_rescue(VALUE,NODE*);
VALUE            2371 eval.c         static VALUE
VALUE            2372 eval.c         rb_obj_is_proc(VALUE proc)
VALUE            2460 eval.c         static VALUE
VALUE            2461 eval.c         set_trace_func(VALUE obj, VALUE trace)
VALUE            2509 eval.c         call_trace_func(rb_event_t event, NODE *node, VALUE self, ID id, VALUE klass /* OK */)
VALUE            2514 eval.c             VALUE srcfile;
VALUE            2569 eval.c         static VALUE
VALUE            2570 eval.c         avalue_to_svalue(VALUE v)
VALUE            2572 eval.c             VALUE tmp, top;
VALUE            2594 eval.c         static VALUE
VALUE            2595 eval.c         svalue_to_avalue(VALUE v)
VALUE            2597 eval.c             VALUE tmp, top;
VALUE            2614 eval.c         static VALUE
VALUE            2615 eval.c         svalue_to_mrhs(VALUE v, NODE *lhs)
VALUE            2617 eval.c             VALUE tmp;
VALUE            2631 eval.c         static VALUE
VALUE            2632 eval.c         avalue_splat(VALUE v)
VALUE            2643 eval.c         static VALUE
VALUE            2644 eval.c         splat_value(VALUE v)
VALUE            2649 eval.c         static VALUE
VALUE            2650 eval.c         class_prefix(VALUE self, NODE *cpath)
VALUE            2656 eval.c         	VALUE c = rb_eval(self, cpath->nd_head);
VALUE            2684 eval.c         NORETURN(static void return_jump(VALUE));
VALUE            2685 eval.c         NORETURN(static void break_jump(VALUE));
VALUE            2703 eval.c         static VALUE
VALUE            2704 eval.c         rb_eval(VALUE self, NODE *n)
VALUE            2709 eval.c             volatile VALUE result = Qnil;
VALUE            2754 eval.c         	    VALUE l = rb_eval(self,node->nd_recv);
VALUE            2755 eval.c         	    VALUE r = rb_eval(self,node->nd_value);
VALUE            2763 eval.c         	    VALUE r = rb_eval(self,node->nd_recv);
VALUE            2764 eval.c         	    VALUE l = rb_eval(self,node->nd_value);
VALUE            2839 eval.c         		    VALUE v = rb_eval(self, tag->nd_head->nd_head);
VALUE            2864 eval.c         	    VALUE val;
VALUE            2880 eval.c         			VALUE v = rb_eval(self, tag->nd_head->nd_head);
VALUE            3009 eval.c         		    VALUE recv;
VALUE            3087 eval.c         	    volatile VALUE e_info = ruby_errinfo;
VALUE            3146 eval.c         	    VALUE retval = prot_tag->retval; /* save retval */
VALUE            3147 eval.c         	    VALUE errinfo = ruby_errinfo;
VALUE            3176 eval.c         	    VALUE beg = rb_eval(self, node->nd_beg);
VALUE            3177 eval.c         	    VALUE end = rb_eval(self, node->nd_end);
VALUE            3184 eval.c         	    VALUE *flip = rb_svar(node->nd_cnt);
VALUE            3206 eval.c         	    VALUE *flip = rb_svar(node->nd_cnt);
VALUE            3227 eval.c         	    VALUE args = rb_eval(self, node->nd_head);
VALUE            3234 eval.c         	    VALUE args = rb_ary_dup(rb_eval(self, node->nd_head));
VALUE            3241 eval.c         	    VALUE recv;
VALUE            3242 eval.c         	    int argc; VALUE *argv; /* used in SETUP_ARGS */
VALUE            3267 eval.c         	    VALUE recv;
VALUE            3268 eval.c         	    int argc; VALUE *argv; /* used in SETUP_ARGS */
VALUE            3284 eval.c         	    int argc; VALUE *argv; /* used in SETUP_ARGS */
VALUE            3305 eval.c         	    int argc; VALUE *argv; /* used in SETUP_ARGS */
VALUE            3361 eval.c         		VALUE *vars = ALLOCA_N(VALUE, node->nd_tbl[0]+1);
VALUE            3362 eval.c         		*vars++ = (VALUE)node;
VALUE            3385 eval.c         	    int argc; VALUE *argv; /* used in SETUP_ARGS */
VALUE            3386 eval.c         	    VALUE recv, val;
VALUE            3415 eval.c         	    VALUE recv, val;
VALUE            3550 eval.c         	    VALUE klass;
VALUE            3601 eval.c         	    VALUE hash = rb_hash_new();
VALUE            3602 eval.c         	    VALUE key, val;
VALUE            3624 eval.c         	    VALUE ary;
VALUE            3640 eval.c         	    VALUE val;
VALUE            3668 eval.c         	    VALUE str, str2;
VALUE            3725 eval.c         	    VALUE origin;
VALUE            3771 eval.c         	    VALUE recv = rb_eval(self, node->nd_recv);
VALUE            3772 eval.c         	    VALUE klass;
VALUE            3826 eval.c         	    VALUE super, klass, tmp, cbase;
VALUE            3882 eval.c         	    VALUE module, cbase;
VALUE            3916 eval.c         	    VALUE klass;
VALUE            3959 eval.c         static VALUE
VALUE            3960 eval.c         module_setup(VALUE module, NODE *n)
VALUE            3965 eval.c             VALUE result = Qnil;	/* OK */
VALUE            3977 eval.c         	VALUE *vars = TMP_ALLOC(node->nd_tbl[0]+1);
VALUE            3978 eval.c         	*vars++ = (VALUE)node;
VALUE            4012 eval.c         rb_obj_respond_to(VALUE obj, ID id, int priv)
VALUE            4014 eval.c             VALUE klass = CLASS_OF(obj);
VALUE            4020 eval.c         	VALUE args[2];
VALUE            4029 eval.c         rb_respond_to(VALUE obj, ID id)
VALUE            4043 eval.c         static VALUE
VALUE            4044 eval.c         obj_respond_to(int argc, VALUE *argv, VALUE obj)
VALUE            4046 eval.c             VALUE mid, priv;
VALUE            4083 eval.c         static VALUE
VALUE            4084 eval.c         rb_mod_method_defined(VALUE mod, VALUE mid)
VALUE            4117 eval.c         static VALUE
VALUE            4118 eval.c         rb_mod_public_method_defined(VALUE mod, VALUE mid)
VALUE            4156 eval.c         static VALUE
VALUE            4157 eval.c         rb_mod_private_method_defined(VALUE mod, VALUE mid)
VALUE            4195 eval.c         static VALUE
VALUE            4196 eval.c         rb_mod_protected_method_defined(VALUE mod, VALUE mid)
VALUE            4208 eval.c         NORETURN(static VALUE terminate_process(int, VALUE));
VALUE            4209 eval.c         static VALUE
VALUE            4210 eval.c         terminate_process(int status, VALUE mesg)
VALUE            4212 eval.c             VALUE args[2];
VALUE            4268 eval.c         VALUE
VALUE            4269 eval.c         rb_f_exit(int argc, VALUE *argv)
VALUE            4271 eval.c             VALUE status;
VALUE            4310 eval.c         VALUE
VALUE            4311 eval.c         rb_f_abort(int argc, VALUE *argv)
VALUE            4321 eval.c         	VALUE mesg;
VALUE            4337 eval.c         NORETURN(static void rb_longjmp(int, VALUE));
VALUE            4338 eval.c         static VALUE make_backtrace(void);
VALUE            4341 eval.c         rb_longjmp(int tag, VALUE mesg)
VALUE            4343 eval.c             VALUE at;
VALUE            4368 eval.c         	VALUE e = ruby_errinfo;
VALUE            4404 eval.c         rb_exc_raise(VALUE mesg)
VALUE            4410 eval.c         rb_exc_fatal(VALUE mesg)
VALUE            4445 eval.c         static VALUE
VALUE            4446 eval.c         rb_f_raise(int argc, VALUE *argv)
VALUE            4452 eval.c         static VALUE
VALUE            4453 eval.c         rb_make_exception(int argc, VALUE *argv)
VALUE            4455 eval.c             VALUE mesg;
VALUE            4498 eval.c         rb_raise_jump(VALUE mesg)
VALUE            4551 eval.c         static VALUE
VALUE            4559 eval.c         static VALUE rb_eThreadError;
VALUE            4561 eval.c         NORETURN(static void proc_jump_error(int, VALUE));
VALUE            4563 eval.c         proc_jump_error(int state, VALUE result)
VALUE            4582 eval.c         NORETURN(static void return_jump(VALUE));
VALUE            4584 eval.c         return_jump(VALUE retval)
VALUE            4598 eval.c         	    tt->dst = (VALUE)tt->frame->uniq;
VALUE            4611 eval.c         break_jump(VALUE retval)
VALUE            4622 eval.c         	    tt->dst = (VALUE)tt->frame->uniq;
VALUE            4637 eval.c         static VALUE bmcall(VALUE, VALUE);
VALUE            4638 eval.c         static int method_arity(VALUE);
VALUE            4648 eval.c         static VALUE
VALUE            4649 eval.c         rb_yield_0(VALUE val, VALUE self, VALUE klass /* OK */, int flags, int avalue)
VALUE            4652 eval.c             volatile VALUE result = Qnil;
VALUE            4653 eval.c             volatile VALUE old_cref;
VALUE            4654 eval.c             volatile VALUE old_wrapper;
VALUE            4671 eval.c             old_cref = (VALUE)ruby_cref;
VALUE            4764 eval.c         		VALUE blk;
VALUE            4856 eval.c         	    rb_gc_force_recycle((VALUE)ruby_dyna_vars);
VALUE            4859 eval.c         		rb_gc_force_recycle((VALUE)vars);
VALUE            4882 eval.c         		    tt->dst = (VALUE)tt->frame->uniq;
VALUE            4899 eval.c         VALUE
VALUE            4900 eval.c         rb_yield(VALUE val)
VALUE            4905 eval.c         VALUE
VALUE            4910 eval.c             VALUE val;
VALUE            4918 eval.c         	RARRAY(val)->ptr[i] = va_arg(args, VALUE);
VALUE            4925 eval.c         VALUE
VALUE            4926 eval.c         rb_yield_splat(VALUE values)
VALUE            4955 eval.c         static VALUE
VALUE            4965 eval.c         static VALUE
VALUE            4966 eval.c         massign(VALUE self, NODE *node, VALUE val, int pcall)
VALUE            5009 eval.c         assign(VALUE self, NODE *lhs, VALUE val, int pcall)
VALUE            5066 eval.c         	    VALUE recv;
VALUE            5084 eval.c         		VALUE args;
VALUE            5102 eval.c         VALUE
VALUE            5103 eval.c         rb_iterate(VALUE (*it_proc)(VALUE), VALUE data1, VALUE (*bl_proc)(ANYARGS), VALUE data2)
VALUE            5106 eval.c             volatile VALUE retval = Qnil;
VALUE            5108 eval.c             VALUE self = ruby_top_self;
VALUE            5140 eval.c         handle_rescue(VALUE self, NODE *node)
VALUE            5142 eval.c             int argc; VALUE *argv; /* used in SETUP_ARGS */
VALUE            5163 eval.c         VALUE
VALUE            5164 eval.c         rb_rescue2(VALUE (*b_proc)(ANYARGS), VALUE data1, VALUE (*r_proc)(ANYARGS), VALUE data2, ...)
VALUE            5167 eval.c             volatile VALUE result;
VALUE            5168 eval.c             volatile VALUE e_info = ruby_errinfo;
VALUE            5170 eval.c             VALUE eclass;
VALUE            5187 eval.c         	while (eclass = va_arg(args, VALUE)) {
VALUE            5212 eval.c         VALUE
VALUE            5213 eval.c         rb_rescue(VALUE (*b_proc)(ANYARGS), VALUE data1, VALUE (*r_proc)(ANYARGS), VALUE data2)
VALUE            5215 eval.c             return rb_rescue2(b_proc, data1, r_proc, data2, rb_eStandardError, (VALUE)0);
VALUE            5218 eval.c         static VALUE cont_protect;
VALUE            5220 eval.c         VALUE
VALUE            5221 eval.c         rb_protect(VALUE (*proc) (VALUE), VALUE data, int *state)
VALUE            5223 eval.c             VALUE result = Qnil;	/* OK */
VALUE            5227 eval.c             cont_protect = (VALUE)rb_node_newnode(NODE_MEMO, cont_protect, 0, 0);
VALUE            5246 eval.c         VALUE
VALUE            5247 eval.c         rb_ensure(VALUE (*b_proc)(ANYARGS), VALUE data1, VALUE (*e_proc)(ANYARGS), VALUE data2)
VALUE            5250 eval.c             volatile VALUE result = Qnil;
VALUE            5251 eval.c             VALUE retval;
VALUE            5265 eval.c         VALUE
VALUE            5266 eval.c         rb_with_disable_interrupt(VALUE (*proc)(ANYARGS), VALUE data)
VALUE            5268 eval.c             VALUE result = Qnil;	/* OK */
VALUE            5344 eval.c         static VALUE
VALUE            5345 eval.c         rb_method_missing(int argc, const VALUE *argv, VALUE obj)
VALUE            5348 eval.c             VALUE exc = rb_eNoMethodError;
VALUE            5380 eval.c         	VALUE args[3];
VALUE            5396 eval.c         static VALUE
VALUE            5397 eval.c         method_missing(VALUE obj, ID id, int argc, const VALUE *argv, int call_status)
VALUE            5399 eval.c             VALUE *nargv;
VALUE            5412 eval.c             nargv = ALLOCA_N(VALUE, argc+1);
VALUE            5414 eval.c             MEMCPY(nargv+1, argv, VALUE, argc);
VALUE            5419 eval.c         static inline VALUE
VALUE            5420 eval.c         call_cfunc(VALUE (*func)(ANYARGS), VALUE recv, int len, int argc, const VALUE *argv)
VALUE            5504 eval.c         formal_assign(VALUE recv, NODE *node, int argc, const VALUE *argv, VALUE *local_vars)
VALUE            5532 eval.c         	    MEMCPY(local_vars+2, argv, VALUE, i);
VALUE            5537 eval.c         	VALUE a = node->nd_frml;
VALUE            5561 eval.c         	VALUE v;
VALUE            5575 eval.c         static VALUE
VALUE            5576 eval.c         rb_call0(VALUE klass, VALUE recv, ID id, ID oid,
VALUE            5577 eval.c             int argc /* OK */, const VALUE *argv /* OK */, NODE *volatile body, int flags)
VALUE            5580 eval.c             volatile VALUE result = Qnil;
VALUE            5583 eval.c             volatile VALUE args;
VALUE            5674 eval.c         	    VALUE *local_vars;	/* OK */
VALUE            5685 eval.c         		*local_vars++ = (VALUE)body;
VALUE            5767 eval.c         static VALUE
VALUE            5768 eval.c         rb_call(VALUE klass, VALUE recv, ID mid,
VALUE            5769 eval.c             int argc /* OK */, const VALUE *argv /* OK */, calling_scope_t scope)
VALUE            5804 eval.c         	    VALUE defined_class = klass;
VALUE            5819 eval.c         VALUE
VALUE            5820 eval.c         rb_apply(VALUE recv, ID mid, VALUE args)
VALUE            5823 eval.c             VALUE *argv;
VALUE            5826 eval.c             argv = ALLOCA_N(VALUE, argc);
VALUE            5827 eval.c             MEMCPY(argv, RARRAY(args)->ptr, VALUE, argc);
VALUE            5831 eval.c         static VALUE
VALUE            5832 eval.c         send_funcall(int argc, VALUE *argv, VALUE recv, calling_scope_t scope)
VALUE            5834 eval.c             VALUE vid;
VALUE            5869 eval.c         static VALUE
VALUE            5870 eval.c         rb_f_send(int argc, VALUE *argv, VALUE recv)
VALUE            5889 eval.c         static VALUE
VALUE            5890 eval.c         rb_f_funcall(int argc, VALUE *argv, VALUE recv)
VALUE            5895 eval.c         VALUE
VALUE            5896 eval.c         rb_funcall(VALUE recv, ID mid, int n, ...)
VALUE            5898 eval.c             VALUE *argv;
VALUE            5905 eval.c         	argv = ALLOCA_N(VALUE, n);
VALUE            5908 eval.c         	    argv[i] = va_arg(ar, VALUE);
VALUE            5919 eval.c         VALUE
VALUE            5920 eval.c         rb_funcall2(VALUE recv, ID mid, int argc, const VALUE *argv)
VALUE            5925 eval.c         VALUE
VALUE            5926 eval.c         rb_funcall3(VALUE recv, ID mid, int argc, const VALUE *argv)
VALUE            5931 eval.c         VALUE
VALUE            5932 eval.c         rb_call_super(int argc, const VALUE *argv)
VALUE            5934 eval.c             VALUE result, self, klass;
VALUE            5954 eval.c         static VALUE
VALUE            5958 eval.c             VALUE str;
VALUE            5959 eval.c             volatile VALUE ary;
VALUE            6030 eval.c         static VALUE
VALUE            6031 eval.c         rb_f_caller(int argc, VALUE *argv)
VALUE            6033 eval.c             VALUE level;
VALUE            6049 eval.c             VALUE ary;
VALUE            6057 eval.c         static VALUE
VALUE            6070 eval.c         compile(VALUE src, const char *file, int line)
VALUE            6086 eval.c         static VALUE
VALUE            6087 eval.c         eval(VALUE self, VALUE src, VALUE scope, const char *file, int line)
VALUE            6090 eval.c             volatile VALUE result = Qnil;
VALUE            6094 eval.c             VALUE volatile old_cref;
VALUE            6096 eval.c             volatile VALUE old_wrapper;
VALUE            6122 eval.c         	old_cref = (VALUE)ruby_cref;
VALUE            6201 eval.c         		VALUE mesg, errat;
VALUE            6240 eval.c         static VALUE
VALUE            6241 eval.c         rb_f_eval(int argc, VALUE *argv, VALUE self)
VALUE            6243 eval.c             VALUE src, scope, vfile, vline;
VALUE            6267 eval.c         	VALUE val;
VALUE            6282 eval.c         static VALUE
VALUE            6283 eval.c         exec_under(VALUE (*func) (VALUE), VALUE under, VALUE cbase, VALUE args)
VALUE            6285 eval.c             VALUE val = Qnil;		/* OK */
VALUE            6317 eval.c         static VALUE
VALUE            6318 eval.c         eval_under_i(VALUE arg)
VALUE            6320 eval.c             VALUE *args = (VALUE *)arg;
VALUE            6330 eval.c         static VALUE
VALUE            6331 eval.c         eval_under(VALUE under, VALUE self, VALUE src, const char *file, int line)
VALUE            6333 eval.c             VALUE args[4];
VALUE            6343 eval.c             args[2] = (VALUE)file;
VALUE            6344 eval.c             args[3] = (VALUE)line;
VALUE            6345 eval.c             return exec_under(eval_under_i, under, under, (VALUE)args);
VALUE            6348 eval.c         static VALUE
VALUE            6349 eval.c         yield_under_i(VALUE arg)
VALUE            6351 eval.c             VALUE *args = (VALUE *)arg;
VALUE            6352 eval.c             VALUE avalue = Qtrue;
VALUE            6361 eval.c         static VALUE
VALUE            6362 eval.c         yield_under(VALUE under, VALUE self, VALUE values)
VALUE            6364 eval.c             VALUE args[4];
VALUE            6367 eval.c             return exec_under(yield_under_i, under, 0, (VALUE)args);
VALUE            6370 eval.c         static VALUE
VALUE            6371 eval.c         specific_eval(int argc, VALUE *argv, VALUE klass, VALUE self)
VALUE            6430 eval.c         VALUE
VALUE            6431 eval.c         rb_obj_instance_eval(int argc, VALUE *argv, VALUE self)
VALUE            6433 eval.c             VALUE klass;
VALUE            6462 eval.c         VALUE
VALUE            6463 eval.c         rb_obj_instance_exec(int argc, VALUE *argv, VALUE self)
VALUE            6465 eval.c             VALUE klass;
VALUE            6500 eval.c         VALUE
VALUE            6501 eval.c         rb_mod_module_eval(int argc, VALUE *argv, VALUE mod)
VALUE            6526 eval.c         VALUE
VALUE            6527 eval.c         rb_mod_module_exec(int argc, VALUE *argv, VALUE mod)
VALUE            6532 eval.c         VALUE rb_load_path;
VALUE            6534 eval.c         NORETURN(static void load_failed(VALUE));
VALUE            6537 eval.c         rb_load(VALUE fname, int wrap)
VALUE            6539 eval.c             VALUE tmp;
VALUE            6543 eval.c             volatile VALUE wrapper = ruby_wrapper;
VALUE            6544 eval.c             volatile VALUE self = ruby_top_self;
VALUE            6637 eval.c         rb_load_protect(VALUE fname, int wrap, int *state)
VALUE            6667 eval.c         static VALUE
VALUE            6668 eval.c         rb_f_load(int argc, VALUE *argv)
VALUE            6670 eval.c             VALUE fname, wrap;
VALUE            6677 eval.c         VALUE ruby_dln_librefs;
VALUE            6678 eval.c         static VALUE rb_features;
VALUE            6691 eval.c             VALUE v;
VALUE            6730 eval.c         static int search_required(VALUE, VALUE *);
VALUE            6737 eval.c             VALUE fname;
VALUE            6761 eval.c         rb_provide_feature(VALUE feature)
VALUE            6808 eval.c         VALUE
VALUE            6809 eval.c         rb_f_require(VALUE obj, VALUE fname)
VALUE            6815 eval.c         search_required(VALUE fname, VALUE *path)
VALUE            6817 eval.c             VALUE tmp;
VALUE            6893 eval.c         load_failed(VALUE fname)
VALUE            6898 eval.c         VALUE
VALUE            6899 eval.c         rb_require_safe(VALUE fname, int safe)
VALUE            6901 eval.c             VALUE result = Qnil;
VALUE            6902 eval.c             volatile VALUE errinfo = ruby_errinfo;
VALUE            6918 eval.c         	VALUE path;
VALUE            6924 eval.c         	*(volatile VALUE *)&fname = rb_str_new4(fname);
VALUE            6981 eval.c         VALUE
VALUE            6984 eval.c             VALUE fn = rb_str_new2(fname);
VALUE            6990 eval.c         secure_visibility(VALUE self)
VALUE            6998 eval.c         set_method_visibility(VALUE self, int argc, VALUE *argv, ID ex)
VALUE            7019 eval.c         static VALUE
VALUE            7020 eval.c         rb_mod_public(int argc, VALUE *argv, VALUE module)
VALUE            7042 eval.c         static VALUE
VALUE            7043 eval.c         rb_mod_protected(int argc, VALUE *argv, VALUE module)
VALUE            7074 eval.c         static VALUE
VALUE            7075 eval.c         rb_mod_private(int argc, VALUE *argv, VALUE module)
VALUE            7094 eval.c         static VALUE
VALUE            7095 eval.c         rb_mod_public_method(int argc, VALUE *argv, VALUE obj)
VALUE            7117 eval.c         static VALUE
VALUE            7118 eval.c         rb_mod_private_method(int argc, VALUE *argv, VALUE obj)
VALUE            7134 eval.c         static VALUE
VALUE            7135 eval.c         top_public(int argc, VALUE *argv)
VALUE            7140 eval.c         static VALUE
VALUE            7141 eval.c         top_private(int argc, VALUE *argv)
VALUE            7182 eval.c         static VALUE
VALUE            7183 eval.c         rb_mod_modfunc(int argc, VALUE *argv, VALUE module)
VALUE            7201 eval.c         	VALUE m = module;
VALUE            7235 eval.c         static VALUE
VALUE            7236 eval.c         rb_mod_append_features(VALUE module, VALUE dest)
VALUE            7258 eval.c         static VALUE
VALUE            7259 eval.c         rb_mod_include(int argc, VALUE *argv, VALUE module)
VALUE            7272 eval.c         rb_obj_call_init(VALUE obj, int argc, VALUE *argv)
VALUE            7280 eval.c         rb_extend_object(VALUE obj, VALUE module)
VALUE            7312 eval.c         static VALUE
VALUE            7313 eval.c         rb_mod_extend_object(VALUE mod, VALUE obj)
VALUE            7344 eval.c         static VALUE
VALUE            7345 eval.c         rb_obj_extend(int argc, VALUE *argv, VALUE obj)
VALUE            7369 eval.c         static VALUE
VALUE            7370 eval.c         top_include(int argc, VALUE *argv, VALUE self)
VALUE            7380 eval.c         VALUE rb_f_trace_var(int, VALUE *);
VALUE            7381 eval.c         VALUE rb_f_untrace_var(int, VALUE *);
VALUE            7384 eval.c         errinfo_setter(VALUE val, ID id, VALUE *var)
VALUE            7392 eval.c         static VALUE
VALUE            7399 eval.c         errat_setter(VALUE val, ID id, VALUE *var)
VALUE            7420 eval.c         static VALUE
VALUE            7425 eval.c             VALUE ary = rb_ary_new();
VALUE            7448 eval.c         static VALUE rb_f_catch(VALUE,VALUE);
VALUE            7449 eval.c         NORETURN(static VALUE rb_f_throw(int,VALUE*));
VALUE            7453 eval.c             VALUE data;
VALUE            7461 eval.c         rb_set_end_proc(void (*func) (VALUE), VALUE data)
VALUE            7498 eval.c         call_end_proc(VALUE data)
VALUE            7543 eval.c         static VALUE
VALUE            7546 eval.c             VALUE proc;
VALUE            7623 eval.c             rb_global_variable((VALUE*)&top_scope);
VALUE            7624 eval.c             rb_global_variable((VALUE*)&ruby_eval_tree);
VALUE            7625 eval.c             rb_global_variable((VALUE*)&ruby_dyna_vars);
VALUE            7638 eval.c             rb_global_variable((VALUE*)&basic_respond_to);
VALUE            7719 eval.c         static VALUE
VALUE            7720 eval.c         rb_mod_autoload(VALUE mod, VALUE sym, VALUE file)
VALUE            7742 eval.c         static VALUE
VALUE            7743 eval.c         rb_mod_autoload_p(VALUE mod, VALUE sym)
VALUE            7759 eval.c         static VALUE
VALUE            7760 eval.c         rb_f_autoload(VALUE obj, VALUE sym, VALUE file)
VALUE            7776 eval.c         static VALUE
VALUE            7777 eval.c         rb_f_autoload_p(VALUE obj, VALUE sym)
VALUE            7811 eval.c             VALUE *vars;
VALUE            7818 eval.c         	vars = ALLOC_N(VALUE, tbl[0]+1);
VALUE            7820 eval.c         	MEMCPY(vars, scope->local_vars, VALUE, tbl[0]);
VALUE            7831 eval.c         	rb_gc_mark((VALUE)data->scope);
VALUE            7832 eval.c         	rb_gc_mark((VALUE)data->var);
VALUE            7833 eval.c         	rb_gc_mark((VALUE)data->body);
VALUE            7834 eval.c         	rb_gc_mark((VALUE)data->self);
VALUE            7835 eval.c         	rb_gc_mark((VALUE)data->dyna_vars);
VALUE            7836 eval.c         	rb_gc_mark((VALUE)data->cref);
VALUE            7925 eval.c         static VALUE
VALUE            7926 eval.c         proc_clone(VALUE self)
VALUE            7929 eval.c             VALUE bind;
VALUE            7943 eval.c         static VALUE
VALUE            7944 eval.c         proc_dup(VALUE self)
VALUE            7947 eval.c             VALUE bind;
VALUE            7972 eval.c         static VALUE
VALUE            7973 eval.c         rb_f_binding(VALUE self)
VALUE            7977 eval.c             VALUE bind;
VALUE            8028 eval.c         static VALUE
VALUE            8029 eval.c         bind_eval(int argc, VALUE *argv, VALUE bind)
VALUE            8032 eval.c             VALUE args[4];
VALUE            8051 eval.c         proc_save_safe_level(VALUE data)
VALUE            8060 eval.c         proc_get_safe_level(VALUE data)
VALUE            8066 eval.c         proc_set_safe_level(VALUE data)
VALUE            8072 eval.c         static VALUE
VALUE            8073 eval.c         proc_alloc(VALUE klass, int proc)
VALUE            8075 eval.c             volatile VALUE block;
VALUE            8087 eval.c         	VALUE obj = ruby_block->block_obj;
VALUE            8144 eval.c         static VALUE
VALUE            8145 eval.c         proc_s_new(int argc, VALUE *argv, VALUE klass)
VALUE            8147 eval.c             VALUE block = proc_alloc(klass, Qfalse);
VALUE            8160 eval.c         VALUE
VALUE            8166 eval.c         VALUE
VALUE            8181 eval.c         static VALUE
VALUE            8199 eval.c         static VALUE
VALUE            8200 eval.c         proc_invoke(VALUE proc, VALUE args /* OK */, VALUE self, VALUE klass)
VALUE            8205 eval.c             volatile VALUE result = Qundef;
VALUE            8208 eval.c             volatile VALUE old_wrapper = ruby_wrapper;
VALUE            8210 eval.c             VALUE bvar = Qnil, tmp = args;
VALUE            8318 eval.c         VALUE
VALUE            8319 eval.c         rb_proc_call(VALUE proc, VALUE args /* OK */)
VALUE            8325 eval.c         rb_proc_arity(VALUE proc)
VALUE            8382 eval.c         static VALUE
VALUE            8383 eval.c         proc_arity(VALUE proc)
VALUE            8397 eval.c         static VALUE
VALUE            8398 eval.c         proc_eq(VALUE self, VALUE other)
VALUE            8424 eval.c         static VALUE
VALUE            8425 eval.c         proc_hash(VALUE self)
VALUE            8447 eval.c         static VALUE
VALUE            8448 eval.c         proc_to_s(VALUE self)
VALUE            8453 eval.c             VALUE str;
VALUE            8477 eval.c         static VALUE
VALUE            8478 eval.c         proc_to_self(VALUE self)
VALUE            8500 eval.c         static VALUE
VALUE            8501 eval.c         proc_binding(VALUE proc)
VALUE            8504 eval.c             VALUE bind;
VALUE            8521 eval.c         static VALUE
VALUE            8522 eval.c         rb_block_pass(VALUE (*func) (VALUE), VALUE arg, VALUE proc)
VALUE            8524 eval.c             VALUE b;
VALUE            8527 eval.c             volatile VALUE result = Qnil;
VALUE            8608 eval.c             VALUE self;
VALUE            8612 eval.c         static VALUE
VALUE            8618 eval.c         static VALUE
VALUE            8619 eval.c         block_pass(VALUE self, NODE *node)
VALUE            8624 eval.c             return rb_block_pass((VALUE (*)(VALUE))call_block,
VALUE            8625 eval.c         			 (VALUE)&arg, rb_eval(self, node->nd_body));
VALUE            8634 eval.c             rb_gc_mark((VALUE)data->body);
VALUE            8637 eval.c         static VALUE
VALUE            8638 eval.c         mnew(VALUE klass, VALUE obj, ID id, VALUE mklass)
VALUE            8640 eval.c             VALUE method;
VALUE            8644 eval.c             VALUE rklass = klass;
VALUE            8709 eval.c         static VALUE
VALUE            8710 eval.c         method_eq(VALUE method, VALUE other)
VALUE            8736 eval.c         static VALUE
VALUE            8737 eval.c         method_hash(VALUE method)
VALUE            8760 eval.c         static VALUE
VALUE            8761 eval.c         method_unbind(VALUE obj)
VALUE            8763 eval.c             VALUE method;
VALUE            8807 eval.c         VALUE
VALUE            8808 eval.c         rb_obj_method(VALUE obj, VALUE vid)
VALUE            8845 eval.c         static VALUE
VALUE            8846 eval.c         rb_mod_method(VALUE mod, VALUE vid)
VALUE            8855 eval.c         static VALUE
VALUE            8856 eval.c         method_clone(VALUE self)
VALUE            8858 eval.c             VALUE clone;
VALUE            8882 eval.c         VALUE
VALUE            8883 eval.c         rb_method_call(int argc, VALUE *argv, VALUE method)
VALUE            8885 eval.c             VALUE result = Qnil;	/* OK */
VALUE            8996 eval.c         static VALUE
VALUE            8997 eval.c         umethod_bind(VALUE method, VALUE recv)
VALUE            9000 eval.c             VALUE rklass = CLASS_OF(recv), klass = rklass;
VALUE            9094 eval.c         static VALUE
VALUE            9095 eval.c         method_arity_m(VALUE method)
VALUE            9102 eval.c         method_arity(VALUE method)
VALUE            9111 eval.c         rb_mod_method_arity(VALUE mod, ID id)
VALUE            9118 eval.c         rb_obj_method_arity(VALUE obj, ID id)
VALUE            9133 eval.c         static VALUE
VALUE            9134 eval.c         method_inspect(VALUE method)
VALUE            9137 eval.c             VALUE str;
VALUE            9148 eval.c         	VALUE v = rb_iv_get(data->klass, "__attached__");
VALUE            9180 eval.c         static VALUE
VALUE            9181 eval.c         mproc(VALUE method)
VALUE            9183 eval.c             VALUE proc;
VALUE            9195 eval.c         static VALUE
VALUE            9196 eval.c         bmcall(VALUE args, VALUE method)
VALUE            9198 eval.c             volatile VALUE a;
VALUE            9199 eval.c             VALUE ret;
VALUE            9207 eval.c         VALUE
VALUE            9209 eval.c             VALUE (*func)(ANYARGS), /* VALUE yieldarg[, VALUE procarg] */
VALUE            9210 eval.c             VALUE val)
VALUE            9213 eval.c             VALUE proc = rb_iterate((VALUE(*)(VALUE))mproc, 0, func, val);
VALUE            9227 eval.c         static VALUE
VALUE            9228 eval.c         method_proc(VALUE method)
VALUE            9230 eval.c             VALUE proc;
VALUE            9238 eval.c             proc = rb_iterate((VALUE(*)(VALUE))mproc, 0, bmcall, method);
VALUE            9248 eval.c         static VALUE
VALUE            9249 eval.c         rb_obj_is_method(VALUE m)
VALUE            9294 eval.c         static VALUE
VALUE            9295 eval.c         rb_mod_define_method(int argc, VALUE *argv, VALUE mod)
VALUE            9298 eval.c             VALUE body;
VALUE            9319 eval.c         	VALUE rklass = method->rklass;
VALUE            9548 eval.c         VALUE rb_cThread;
VALUE            9550 eval.c         extern VALUE rb_last_status;
VALUE            9697 eval.c             VALUE result;
VALUE            9701 eval.c             VALUE *stk_ptr;
VALUE            9702 eval.c             VALUE *stk_pos;
VALUE            9706 eval.c             VALUE *bstr_ptr;
VALUE            9707 eval.c             VALUE *bstr_pos;
VALUE            9716 eval.c             VALUE klass;
VALUE            9717 eval.c             VALUE wrapper;
VALUE            9726 eval.c             VALUE errinfo;
VALUE            9727 eval.c             VALUE last_status;
VALUE            9728 eval.c             VALUE last_line;
VALUE            9729 eval.c             VALUE last_match;
VALUE            9745 eval.c             VALUE thgroup;
VALUE            9749 eval.c             VALUE thread;
VALUE            9766 eval.c             VALUE errinfo;
VALUE            9767 eval.c             VALUE last_status;
VALUE            9768 eval.c             VALUE last_line;
VALUE            9769 eval.c             VALUE last_match;
VALUE            9827 eval.c         static VALUE
VALUE            9828 eval.c         run_trap_eval(VALUE arg)
VALUE            9830 eval.c             VALUE *p = (VALUE *)arg;
VALUE            9834 eval.c         static VALUE
VALUE            9835 eval.c         rb_trap_eval(VALUE cmd, int sig, int safe)
VALUE            9838 eval.c             VALUE val = Qnil;		/* OK */
VALUE            9840 eval.c             VALUE arg[3];
VALUE            9844 eval.c             arg[2] = (VALUE)safe;
VALUE            9848 eval.c             val = rb_protect(run_trap_eval, (VALUE)&arg, &state);
VALUE            9893 eval.c         static VALUE
VALUE            9900 eval.c         safe_setter(VALUE val)
VALUE            9922 eval.c         #define STACK(addr) (th->stk_pos<(VALUE*)(addr) && (VALUE*)(addr)<th->stk_pos+th->stk_len)
VALUE            9923 eval.c         #define ADJ(addr) (void*)(STACK(addr)?(((VALUE*)(addr)-th->stk_pos)+th->stk_ptr):(VALUE*)(addr))
VALUE            9937 eval.c             rb_gc_mark((VALUE)th->cref);
VALUE            9939 eval.c             rb_gc_mark((VALUE)th->scope);
VALUE            9940 eval.c             rb_gc_mark((VALUE)th->dyna_vars);
VALUE            9988 eval.c             VALUE proc, arg;
VALUE            9992 eval.c         mark_loading_thread(ID key, VALUE value, int lev)
VALUE            10004 eval.c             rb_gc_mark((VALUE)ruby_cref);
VALUE            10067 eval.c         rb_thread_check(VALUE data)
VALUE            10076 eval.c         static VALUE rb_thread_raise(int, VALUE*, rb_thread_t);
VALUE            10078 eval.c         static VALUE th_raise_exception;
VALUE            10080 eval.c         static VALUE th_cmd;
VALUE            10092 eval.c         extern VALUE *rb_gc_stack_start;
VALUE            10094 eval.c         extern VALUE *rb_gc_register_stack_start;
VALUE            10100 eval.c             VALUE *pos;
VALUE            10102 eval.c             static VALUE tval;
VALUE            10108 eval.c         	VALUE *ptr = realloc(th->stk_ptr, sizeof(VALUE) * len);
VALUE            10115 eval.c             MEMCPY(th->stk_ptr, th->stk_pos, VALUE, th->stk_len);
VALUE            10118 eval.c             len = (VALUE*)rb_ia64_bsp() - th->bstr_pos;
VALUE            10121 eval.c                 VALUE *ptr = realloc(th->bstr_ptr, sizeof(VALUE) * len);
VALUE            10128 eval.c             MEMCPY(th->bstr_ptr, th->bstr_pos, VALUE, th->bstr_len);
VALUE            10205 eval.c         NORETURN(NOINLINE(static void stack_extend(rb_thread_t, int, VALUE *)));
VALUE            10213 eval.c             static VALUE tval;
VALUE            10239 eval.c             MEMCPY(tmp->stk_pos, tmp->stk_ptr, VALUE, tmp->stk_len);
VALUE            10241 eval.c             MEMCPY(tmp->bstr_pos, tmp->bstr_ptr, VALUE, tmp->bstr_len);
VALUE            10262 eval.c         NORETURN(NOINLINE(static void register_stack_extend(rb_thread_t, int, void *, VALUE *)));
VALUE            10264 eval.c         register_stack_extend(rb_thread_t th, int exit, void *vp, VALUE *curr_bsp)
VALUE            10278 eval.c                 register_stack_extend(th, exit, &exit, (VALUE*)rb_ia64_bsp());
VALUE            10287 eval.c         stack_extend(rb_thread_t th, int exit, VALUE *addr_in_prev_frame)
VALUE            10290 eval.c             VALUE space[STACK_PAD_SIZE];
VALUE            10307 eval.c             register_stack_extend(th, exit, space, (VALUE*)rb_ia64_bsp());
VALUE            10316 eval.c             VALUE v;
VALUE            10367 eval.c         	    VALUE exc = rb_exc_new2(rb_eIOError, "stream closed");
VALUE            10374 eval.c         NORETURN(static void rb_thread_main_jump(VALUE, int));
VALUE            10376 eval.c         rb_thread_main_jump(VALUE err, int tag)
VALUE            10389 eval.c             VALUE e;
VALUE            10582 eval.c         		rb_protect((VALUE (*)(VALUE))rb_trap_exec, Qnil, &status);
VALUE            10936 eval.c         	VALUE oldbt = get_backtrace(th->errinfo);
VALUE            10937 eval.c         	VALUE errat = make_backtrace();
VALUE            10938 eval.c         	VALUE errinfo = rb_obj_dup(th->errinfo);
VALUE            10991 eval.c         static VALUE
VALUE            10992 eval.c         rb_thread_join_m(int argc, VALUE *argv, VALUE thread)
VALUE            10994 eval.c             VALUE limit;
VALUE            11015 eval.c         VALUE
VALUE            11031 eval.c         VALUE
VALUE            11058 eval.c         VALUE
VALUE            11062 eval.c             VALUE ary = rb_ary_new();
VALUE            11095 eval.c         VALUE
VALUE            11096 eval.c         rb_thread_wakeup(VALUE thread)
VALUE            11128 eval.c         VALUE
VALUE            11129 eval.c         rb_thread_run(VALUE thread)
VALUE            11150 eval.c         VALUE
VALUE            11151 eval.c         rb_thread_kill(VALUE thread)
VALUE            11183 eval.c         static VALUE
VALUE            11184 eval.c         rb_thread_s_kill(VALUE obj, VALUE th)
VALUE            11200 eval.c         static VALUE
VALUE            11227 eval.c         static VALUE
VALUE            11254 eval.c         VALUE
VALUE            11272 eval.c         struct timeval rb_time_timeval(VALUE time);
VALUE            11328 eval.c         static VALUE
VALUE            11329 eval.c         rb_thread_priority(VALUE thread)
VALUE            11358 eval.c         static VALUE
VALUE            11359 eval.c         rb_thread_priority_set(VALUE thread, VALUE prio)
VALUE            11384 eval.c         static VALUE
VALUE            11385 eval.c         rb_thread_safe_level(VALUE thread)
VALUE            11397 eval.c         static VALUE thgroup_default;
VALUE            11412 eval.c         static VALUE
VALUE            11443 eval.c         static VALUE
VALUE            11444 eval.c         rb_thread_s_abort_exc_set(VALUE self, VALUE val)
VALUE            11461 eval.c         static VALUE
VALUE            11462 eval.c         rb_thread_abort_exc(VALUE thread)
VALUE            11477 eval.c         static VALUE
VALUE            11478 eval.c         rb_thread_abort_exc_set(VALUE thread, VALUE val)
VALUE            11496 eval.c         VALUE
VALUE            11497 eval.c         rb_thread_group(VALUE thread)
VALUE            11499 eval.c             VALUE group = rb_thread_check(thread)->thgroup;
VALUE            11558 eval.c         rb_thread_alloc(VALUE klass)
VALUE            11665 eval.c         static VALUE rb_thread_yield(VALUE, rb_thread_t);
VALUE            11700 eval.c         static VALUE
VALUE            11701 eval.c         rb_thread_start_0(VALUE (*fn)(ANYARGS), VALUE arg, rb_thread_t th)
VALUE            11704 eval.c             volatile VALUE thread = th->thread;
VALUE            11739 eval.c         	new_thread.arg = (VALUE)arg;
VALUE            11818 eval.c         static VALUE
VALUE            11819 eval.c         rb_thread_yield_0(VALUE arg)
VALUE            11829 eval.c             VALUE proc = new_thread.proc;
VALUE            11830 eval.c             VALUE arg = new_thread.arg;
VALUE            11866 eval.c         VALUE
VALUE            11867 eval.c         rb_thread_create(VALUE (*fn)(ANYARGS), void *arg)
VALUE            11869 eval.c             Init_stack((VALUE*)&arg);
VALUE            11870 eval.c             return rb_thread_start_0(fn, (VALUE)arg, rb_thread_alloc(rb_cThread));
VALUE            11873 eval.c         static VALUE
VALUE            11874 eval.c         rb_thread_yield(VALUE arg, rb_thread_t th)
VALUE            11914 eval.c         static VALUE
VALUE            11915 eval.c         rb_thread_s_new(int argc, VALUE *argv, VALUE klass)
VALUE            11918 eval.c             volatile VALUE *pos;
VALUE            11949 eval.c         static VALUE
VALUE            11950 eval.c         rb_thread_initialize(VALUE thread, VALUE args)
VALUE            11980 eval.c         static VALUE
VALUE            11981 eval.c         rb_thread_start(VALUE klass, VALUE args)
VALUE            12001 eval.c         static VALUE
VALUE            12002 eval.c         rb_thread_value(VALUE thread)
VALUE            12035 eval.c         static VALUE
VALUE            12036 eval.c         rb_thread_status(VALUE thread)
VALUE            12062 eval.c         static VALUE
VALUE            12063 eval.c         rb_thread_alive_p(VALUE thread)
VALUE            12084 eval.c         static VALUE
VALUE            12085 eval.c         rb_thread_stop_p(VALUE thread)
VALUE            12149 eval.c         static VALUE
VALUE            12170 eval.c         static VALUE
VALUE            12171 eval.c         rb_thread_critical_set(VALUE obj, VALUE val)
VALUE            12215 eval.c         rb_thread_trap_eval(VALUE cmd, int sig, int safe)
VALUE            12237 eval.c             VALUE args[2];
VALUE            12256 eval.c         static VALUE
VALUE            12257 eval.c         rb_thread_raise(int argc, VALUE *argv, rb_thread_t th)
VALUE            12260 eval.c             VALUE exc;
VALUE            12306 eval.c         static VALUE
VALUE            12307 eval.c         rb_thread_raise_m(int argc, VALUE *argv, VALUE thread)
VALUE            12318 eval.c         VALUE
VALUE            12319 eval.c         rb_thread_local_aref(VALUE thread, ID id)
VALUE            12322 eval.c             VALUE val;
VALUE            12357 eval.c         static VALUE
VALUE            12358 eval.c         rb_thread_aref(VALUE thread, VALUE id)
VALUE            12363 eval.c         VALUE
VALUE            12364 eval.c         rb_thread_local_aset(VALUE thread, ID id, VALUE val)
VALUE            12394 eval.c         static VALUE
VALUE            12395 eval.c         rb_thread_aset(VALUE thread, VALUE id, VALUE val)
VALUE            12414 eval.c         static VALUE
VALUE            12415 eval.c         rb_thread_key_p(VALUE thread, VALUE id)
VALUE            12426 eval.c         thread_keys_i(ID key, VALUE value, VALUE ary)
VALUE            12447 eval.c         static VALUE
VALUE            12448 eval.c         rb_thread_keys(VALUE thread)
VALUE            12451 eval.c             VALUE ary = rb_ary_new();
VALUE            12466 eval.c         static VALUE
VALUE            12467 eval.c         rb_thread_inspect(VALUE thread)
VALUE            12472 eval.c             VALUE str;
VALUE            12545 eval.c         static VALUE rb_cCont;
VALUE            12561 eval.c         static VALUE
VALUE            12562 eval.c         rb_callcc(VALUE self)
VALUE            12564 eval.c             volatile VALUE cont;
VALUE            12609 eval.c         static VALUE
VALUE            12610 eval.c         rb_cont_call(int argc, VALUE *argv, VALUE cont)
VALUE            12638 eval.c             VALUE group;
VALUE            12654 eval.c         static VALUE
VALUE            12655 eval.c         thgroup_s_alloc(VALUE klass)
VALUE            12657 eval.c             VALUE group;
VALUE            12678 eval.c         static VALUE
VALUE            12679 eval.c         thgroup_list(VALUE group)
VALUE            12683 eval.c             VALUE ary;
VALUE            12717 eval.c         static VALUE
VALUE            12718 eval.c         thgroup_enclose(VALUE group)
VALUE            12737 eval.c         static VALUE
VALUE            12738 eval.c         thgroup_enclosed_p(VALUE group)
VALUE            12774 eval.c         static VALUE
VALUE            12775 eval.c         thgroup_add(VALUE group, VALUE thread)
VALUE            12826 eval.c             VALUE cThGroup;
VALUE            12933 eval.c         static VALUE
VALUE            12934 eval.c         rb_f_catch(VALUE dmy, VALUE tag)
VALUE            12937 eval.c             VALUE val = Qnil;		/* OK */
VALUE            12954 eval.c         static VALUE
VALUE            12955 eval.c         catch_i(VALUE tag)
VALUE            12960 eval.c         VALUE
VALUE            12961 eval.c         rb_catch(const char *tag, VALUE (*func)(ANYARGS), VALUE data)
VALUE            12963 eval.c             return rb_iterate((VALUE(*)(VALUE))catch_i, ID2SYM(rb_intern(tag)), func, data);
VALUE            12978 eval.c         static VALUE
VALUE            12979 eval.c         rb_f_throw(int argc, VALUE *argv)
VALUE            12981 eval.c             VALUE tag, value;
VALUE            13011 eval.c         rb_throw(const char *tag, VALUE val)
VALUE            13013 eval.c             VALUE argv[2];
VALUE            13020 eval.c         static VALUE
VALUE            13021 eval.c         recursive_check(VALUE obj)
VALUE            13023 eval.c             VALUE hash = rb_thread_local_aref(rb_thread_current(), recursive_key);
VALUE            13029 eval.c         	VALUE list = rb_hash_aref(hash, ID2SYM(ruby_frame->this_func));
VALUE            13037 eval.c         recursive_push(VALUE obj)
VALUE            13039 eval.c             VALUE hash = rb_thread_local_aref(rb_thread_current(), recursive_key);
VALUE            13040 eval.c             VALUE list, sym;
VALUE            13061 eval.c             VALUE hash = rb_thread_local_aref(rb_thread_current(), recursive_key);
VALUE            13062 eval.c             VALUE list, sym;
VALUE            13066 eval.c         	VALUE symname = rb_inspect(sym);
VALUE            13067 eval.c         	VALUE thrname = rb_inspect(rb_thread_current());
VALUE            13073 eval.c         	VALUE symname = rb_inspect(sym);
VALUE            13074 eval.c         	VALUE thrname = rb_inspect(rb_thread_current());
VALUE            13081 eval.c         VALUE
VALUE            13082 eval.c         rb_exec_recursive(VALUE (*func)(VALUE, VALUE, int), VALUE obj, VALUE arg)
VALUE            13088 eval.c         	VALUE result;
VALUE              21 ext/Win32API/Win32API.c     VALUE dllname;
VALUE              22 ext/Win32API/Win32API.c     VALUE import;
VALUE              23 ext/Win32API/Win32API.c     VALUE export;
VALUE              33 ext/Win32API/Win32API.c static VALUE
VALUE              35 ext/Win32API/Win32API.c     VALUE self;
VALUE              36 ext/Win32API/Win32API.c     VALUE dllname;
VALUE              37 ext/Win32API/Win32API.c     VALUE proc;
VALUE              38 ext/Win32API/Win32API.c     VALUE import;
VALUE              39 ext/Win32API/Win32API.c     VALUE export;
VALUE              43 ext/Win32API/Win32API.c     VALUE str;
VALUE              44 ext/Win32API/Win32API.c     VALUE a_import;
VALUE              45 ext/Win32API/Win32API.c     VALUE *ptr;
VALUE             143 ext/Win32API/Win32API.c static VALUE
VALUE             146 ext/Win32API/Win32API.c     VALUE *argv;
VALUE             147 ext/Win32API/Win32API.c     VALUE obj;
VALUE             149 ext/Win32API/Win32API.c     VALUE args;
VALUE             157 ext/Win32API/Win32API.c     VALUE obj_proc = rb_iv_get(obj, "__proc__");
VALUE             158 ext/Win32API/Win32API.c     VALUE obj_import = rb_iv_get(obj, "__import__");
VALUE             159 ext/Win32API/Win32API.c     VALUE obj_export = rb_iv_get(obj, "__export__");
VALUE             172 ext/Win32API/Win32API.c 	    VALUE str;
VALUE             211 ext/Win32API/Win32API.c     VALUE cWin32API = rb_define_class("Win32API", rb_cObject);
VALUE              29 ext/bigdecimal/bigdecimal.c VALUE rb_cBigDecimal;
VALUE              34 ext/bigdecimal/bigdecimal.c #define ENTER(n) volatile VALUE vStack[n];int iStack=0
VALUE              47 ext/bigdecimal/bigdecimal.c static VALUE
VALUE              48 ext/bigdecimal/bigdecimal.c BigDecimal_version(VALUE self)
VALUE              75 ext/bigdecimal/bigdecimal.c static VALUE
VALUE              89 ext/bigdecimal/bigdecimal.c GetVpValue(VALUE v, int must)
VALUE              92 ext/bigdecimal/bigdecimal.c     VALUE bg;
VALUE             135 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             136 ext/bigdecimal/bigdecimal.c BigDecimal_double_fig(VALUE self)
VALUE             141 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             142 ext/bigdecimal/bigdecimal.c BigDecimal_prec(VALUE self)
VALUE             146 ext/bigdecimal/bigdecimal.c     VALUE obj;
VALUE             154 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             155 ext/bigdecimal/bigdecimal.c BigDecimal_hash(VALUE self)
VALUE             174 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             175 ext/bigdecimal/bigdecimal.c BigDecimal_dump(int argc, VALUE *argv, VALUE self)
VALUE             181 ext/bigdecimal/bigdecimal.c     VALUE dummy;
VALUE             191 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             192 ext/bigdecimal/bigdecimal.c BigDecimal_load(VALUE self, VALUE str)
VALUE             216 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             217 ext/bigdecimal/bigdecimal.c BigDecimal_mode(int argc, VALUE *argv, VALUE self)
VALUE             219 ext/bigdecimal/bigdecimal.c     VALUE which;
VALUE             220 ext/bigdecimal/bigdecimal.c     VALUE val;
VALUE             285 ext/bigdecimal/bigdecimal.c GetPositiveInt(VALUE v)
VALUE             297 ext/bigdecimal/bigdecimal.c VpNewRbClass(U_LONG mx, char *str, VALUE klass)
VALUE             300 ext/bigdecimal/bigdecimal.c     pv->obj = (VALUE)Data_Wrap_Struct(klass, 0, BigDecimal_delete, pv);
VALUE             308 ext/bigdecimal/bigdecimal.c     pv->obj = (VALUE)Data_Wrap_Struct(rb_cBigDecimal, 0, BigDecimal_delete, pv);
VALUE             313 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             314 ext/bigdecimal/bigdecimal.c BigDecimal_IsNaN(VALUE self)
VALUE             321 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             322 ext/bigdecimal/bigdecimal.c BigDecimal_IsInfinite(VALUE self)
VALUE             330 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             331 ext/bigdecimal/bigdecimal.c BigDecimal_IsFinite(VALUE self)
VALUE             339 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             340 ext/bigdecimal/bigdecimal.c BigDecimal_to_i(VALUE self)
VALUE             395 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             396 ext/bigdecimal/bigdecimal.c BigDecimal_induced_from(VALUE self, VALUE x)
VALUE             402 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             403 ext/bigdecimal/bigdecimal.c BigDecimal_to_f(VALUE self)
VALUE             422 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             423 ext/bigdecimal/bigdecimal.c BigDecimal_coerce(VALUE self, VALUE other)
VALUE             426 ext/bigdecimal/bigdecimal.c     VALUE obj;
VALUE             437 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             438 ext/bigdecimal/bigdecimal.c BigDecimal_uplus(VALUE self)
VALUE             443 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             444 ext/bigdecimal/bigdecimal.c BigDecimal_add(VALUE self, VALUE r)
VALUE             470 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             471 ext/bigdecimal/bigdecimal.c BigDecimal_sub(VALUE self, VALUE r)
VALUE             500 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             501 ext/bigdecimal/bigdecimal.c BigDecimalCmp(VALUE self, VALUE r,char op)
VALUE             525 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             526 ext/bigdecimal/bigdecimal.c BigDecimal_zero(VALUE self)
VALUE             532 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             533 ext/bigdecimal/bigdecimal.c BigDecimal_nonzero(VALUE self)
VALUE             539 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             540 ext/bigdecimal/bigdecimal.c BigDecimal_comp(VALUE self, VALUE r)
VALUE             545 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             546 ext/bigdecimal/bigdecimal.c BigDecimal_eq(VALUE self, VALUE r)
VALUE             551 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             552 ext/bigdecimal/bigdecimal.c BigDecimal_ne(VALUE self, VALUE r)
VALUE             557 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             558 ext/bigdecimal/bigdecimal.c BigDecimal_lt(VALUE self, VALUE r)
VALUE             563 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             564 ext/bigdecimal/bigdecimal.c BigDecimal_le(VALUE self, VALUE r)
VALUE             569 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             570 ext/bigdecimal/bigdecimal.c BigDecimal_gt(VALUE self, VALUE r)
VALUE             575 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             576 ext/bigdecimal/bigdecimal.c BigDecimal_ge(VALUE self, VALUE r)
VALUE             581 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             582 ext/bigdecimal/bigdecimal.c BigDecimal_neg(VALUE self)
VALUE             592 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             593 ext/bigdecimal/bigdecimal.c BigDecimal_mult(VALUE self, VALUE r)
VALUE             610 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             611 ext/bigdecimal/bigdecimal.c BigDecimal_divide(Real **c, Real **res, Real **div, VALUE self, VALUE r)
VALUE             627 ext/bigdecimal/bigdecimal.c     return (VALUE)0;
VALUE             630 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             631 ext/bigdecimal/bigdecimal.c BigDecimal_div(VALUE self, VALUE r)
VALUE             637 ext/bigdecimal/bigdecimal.c     if(r!=(VALUE)0) return r; /* coerced by other */
VALUE             654 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             655 ext/bigdecimal/bigdecimal.c BigDecimal_DoDivmod(VALUE self, VALUE r, Real **div, Real **mod)
VALUE             675 ext/bigdecimal/bigdecimal.c        return (VALUE)0;
VALUE             698 ext/bigdecimal/bigdecimal.c     return (VALUE)0;
VALUE             705 ext/bigdecimal/bigdecimal.c     return (VALUE)0;
VALUE             708 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             709 ext/bigdecimal/bigdecimal.c BigDecimal_mod(VALUE self, VALUE r) /* %: a%b = a - (a.to_f/b).floor * b */
VALUE             712 ext/bigdecimal/bigdecimal.c     VALUE obj;
VALUE             716 ext/bigdecimal/bigdecimal.c     if(obj!=(VALUE)0) return obj;
VALUE             721 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             722 ext/bigdecimal/bigdecimal.c BigDecimal_divremain(VALUE self, VALUE r, Real **dv, Real **rv)
VALUE             755 ext/bigdecimal/bigdecimal.c     return (VALUE)0;
VALUE             758 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             759 ext/bigdecimal/bigdecimal.c BigDecimal_remainder(VALUE self, VALUE r) /* remainder */
VALUE             761 ext/bigdecimal/bigdecimal.c     VALUE  f;
VALUE             764 ext/bigdecimal/bigdecimal.c     if(f!=(VALUE)0) return f;
VALUE             768 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             769 ext/bigdecimal/bigdecimal.c BigDecimal_divmod(VALUE self, VALUE r)
VALUE             772 ext/bigdecimal/bigdecimal.c     VALUE obj;
VALUE             776 ext/bigdecimal/bigdecimal.c     if(obj!=(VALUE)0) return obj;
VALUE             782 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             783 ext/bigdecimal/bigdecimal.c BigDecimal_div2(int argc, VALUE *argv, VALUE self)
VALUE             786 ext/bigdecimal/bigdecimal.c     VALUE b,n;
VALUE             789 ext/bigdecimal/bigdecimal.c        VALUE obj;
VALUE             793 ext/bigdecimal/bigdecimal.c        if(obj!=(VALUE)0) return obj;
VALUE             818 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             819 ext/bigdecimal/bigdecimal.c BigDecimal_add2(VALUE self, VALUE b, VALUE n)
VALUE             827 ext/bigdecimal/bigdecimal.c        VALUE   c = BigDecimal_add(self,b);
VALUE             835 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             836 ext/bigdecimal/bigdecimal.c BigDecimal_sub2(VALUE self, VALUE b, VALUE n)
VALUE             844 ext/bigdecimal/bigdecimal.c        VALUE   c = BigDecimal_sub(self,b);
VALUE             852 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             853 ext/bigdecimal/bigdecimal.c BigDecimal_mult2(VALUE self, VALUE b, VALUE n)
VALUE             861 ext/bigdecimal/bigdecimal.c        VALUE   c = BigDecimal_mult(self,b);
VALUE             869 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             870 ext/bigdecimal/bigdecimal.c BigDecimal_abs(VALUE self)
VALUE             884 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             885 ext/bigdecimal/bigdecimal.c BigDecimal_sqrt(VALUE self, VALUE nFig)
VALUE             901 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             902 ext/bigdecimal/bigdecimal.c BigDecimal_fix(VALUE self)
VALUE             915 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             916 ext/bigdecimal/bigdecimal.c BigDecimal_round(int argc, VALUE *argv, VALUE self)
VALUE             922 ext/bigdecimal/bigdecimal.c     VALUE  vLoc;
VALUE             923 ext/bigdecimal/bigdecimal.c     VALUE  vRound;
VALUE             958 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             959 ext/bigdecimal/bigdecimal.c BigDecimal_truncate(int argc, VALUE *argv, VALUE self)
VALUE             965 ext/bigdecimal/bigdecimal.c     VALUE vLoc;
VALUE             983 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             984 ext/bigdecimal/bigdecimal.c BigDecimal_frac(VALUE self)
VALUE             997 ext/bigdecimal/bigdecimal.c static VALUE
VALUE             998 ext/bigdecimal/bigdecimal.c BigDecimal_floor(int argc, VALUE *argv, VALUE self)
VALUE            1004 ext/bigdecimal/bigdecimal.c     VALUE vLoc;
VALUE            1022 ext/bigdecimal/bigdecimal.c static VALUE
VALUE            1023 ext/bigdecimal/bigdecimal.c BigDecimal_ceil(int argc, VALUE *argv, VALUE self)
VALUE            1029 ext/bigdecimal/bigdecimal.c     VALUE vLoc;
VALUE            1047 ext/bigdecimal/bigdecimal.c static VALUE
VALUE            1048 ext/bigdecimal/bigdecimal.c BigDecimal_to_s(int argc, VALUE *argv, VALUE self)
VALUE            1058 ext/bigdecimal/bigdecimal.c     VALUE  f;
VALUE            1100 ext/bigdecimal/bigdecimal.c static VALUE
VALUE            1101 ext/bigdecimal/bigdecimal.c BigDecimal_split(VALUE self)
VALUE            1105 ext/bigdecimal/bigdecimal.c     VALUE obj,obj1;
VALUE            1128 ext/bigdecimal/bigdecimal.c static VALUE
VALUE            1129 ext/bigdecimal/bigdecimal.c BigDecimal_exponent(VALUE self)
VALUE            1135 ext/bigdecimal/bigdecimal.c static VALUE
VALUE            1136 ext/bigdecimal/bigdecimal.c BigDecimal_inspect(VALUE self)
VALUE            1140 ext/bigdecimal/bigdecimal.c     VALUE obj;
VALUE            1157 ext/bigdecimal/bigdecimal.c static VALUE
VALUE            1158 ext/bigdecimal/bigdecimal.c BigDecimal_power(VALUE self, VALUE p)
VALUE            1181 ext/bigdecimal/bigdecimal.c static VALUE
VALUE            1182 ext/bigdecimal/bigdecimal.c BigDecimal_global_new(int argc, VALUE *argv, VALUE self)
VALUE            1187 ext/bigdecimal/bigdecimal.c     VALUE  nFig;
VALUE            1188 ext/bigdecimal/bigdecimal.c     VALUE  iniValue;
VALUE            1200 ext/bigdecimal/bigdecimal.c static VALUE
VALUE            1201 ext/bigdecimal/bigdecimal.c BigDecimal_new(int argc, VALUE *argv, VALUE self)
VALUE            1206 ext/bigdecimal/bigdecimal.c     VALUE  nFig;
VALUE            1207 ext/bigdecimal/bigdecimal.c     VALUE  iniValue;
VALUE            1219 ext/bigdecimal/bigdecimal.c static VALUE
VALUE            1220 ext/bigdecimal/bigdecimal.c BigDecimal_limit(int argc, VALUE *argv, VALUE self)
VALUE            1222 ext/bigdecimal/bigdecimal.c     VALUE  nFig;
VALUE            1223 ext/bigdecimal/bigdecimal.c     VALUE  nCur = INT2NUM(VpGetPrecLimit());
VALUE            1238 ext/bigdecimal/bigdecimal.c static VALUE
VALUE            1239 ext/bigdecimal/bigdecimal.c BigDecimal_sign(VALUE self)
VALUE            1583 ext/bigdecimal/bigdecimal.c     VALUE exc;
VALUE              77 ext/bigdecimal/bigdecimal.h     VALUE  obj;     /* Back pointer(VALUE) for Ruby object.     */
VALUE             106 ext/bigdecimal/bigdecimal.h VpNewRbClass(U_LONG mx,char *str,VALUE klass);
VALUE              60 ext/curses/curses.c static VALUE mCurses;
VALUE              61 ext/curses/curses.c static VALUE mKey;
VALUE              62 ext/curses/curses.c static VALUE cWindow;
VALUE              64 ext/curses/curses.c static VALUE cMouseEvent;
VALUE              67 ext/curses/curses.c static VALUE rb_stdscr;
VALUE              75 ext/curses/curses.c static VALUE window_attroff();
VALUE              76 ext/curses/curses.c static VALUE window_attron();
VALUE              77 ext/curses/curses.c static VALUE window_attrset();
VALUE             101 ext/curses/curses.c static VALUE
VALUE             103 ext/curses/curses.c     VALUE class;
VALUE             106 ext/curses/curses.c     VALUE obj;
VALUE             123 ext/curses/curses.c static VALUE
VALUE             141 ext/curses/curses.c static VALUE
VALUE             153 ext/curses/curses.c curses_finalize(VALUE dummy)
VALUE             166 ext/curses/curses.c static VALUE
VALUE             180 ext/curses/curses.c static VALUE
VALUE             182 ext/curses/curses.c     VALUE obj;
VALUE             190 ext/curses/curses.c static VALUE
VALUE             199 ext/curses/curses.c static VALUE
VALUE             201 ext/curses/curses.c     VALUE obj;
VALUE             209 ext/curses/curses.c static VALUE
VALUE             211 ext/curses/curses.c     VALUE obj;
VALUE             223 ext/curses/curses.c static VALUE
VALUE             225 ext/curses/curses.c     VALUE obj;
VALUE             233 ext/curses/curses.c static VALUE
VALUE             235 ext/curses/curses.c     VALUE obj;
VALUE             243 ext/curses/curses.c static VALUE
VALUE             245 ext/curses/curses.c     VALUE obj;
VALUE             253 ext/curses/curses.c static VALUE
VALUE             255 ext/curses/curses.c     VALUE obj;
VALUE             263 ext/curses/curses.c static VALUE
VALUE             265 ext/curses/curses.c     VALUE obj;
VALUE             273 ext/curses/curses.c static VALUE
VALUE             275 ext/curses/curses.c     VALUE obj;
VALUE             283 ext/curses/curses.c static VALUE
VALUE             285 ext/curses/curses.c     VALUE obj;
VALUE             293 ext/curses/curses.c static VALUE
VALUE             295 ext/curses/curses.c     VALUE obj;
VALUE             303 ext/curses/curses.c static VALUE
VALUE             305 ext/curses/curses.c     VALUE obj;
VALUE             315 ext/curses/curses.c static VALUE
VALUE             317 ext/curses/curses.c     VALUE obj;
VALUE             327 ext/curses/curses.c static VALUE
VALUE             329 ext/curses/curses.c     VALUE obj;
VALUE             330 ext/curses/curses.c     VALUE ch;
VALUE             342 ext/curses/curses.c static VALUE
VALUE             344 ext/curses/curses.c     VALUE obj;
VALUE             345 ext/curses/curses.c     VALUE y;
VALUE             346 ext/curses/curses.c     VALUE x;
VALUE             354 ext/curses/curses.c static VALUE
VALUE             356 ext/curses/curses.c     VALUE obj;
VALUE             363 ext/curses/curses.c static VALUE
VALUE             365 ext/curses/curses.c     VALUE obj;
VALUE             372 ext/curses/curses.c static VALUE
VALUE             374 ext/curses/curses.c     VALUE obj;
VALUE             381 ext/curses/curses.c static VALUE
VALUE             383 ext/curses/curses.c     VALUE obj;
VALUE             384 ext/curses/curses.c     VALUE ch;
VALUE             392 ext/curses/curses.c static VALUE
VALUE             394 ext/curses/curses.c     VALUE obj;
VALUE             395 ext/curses/curses.c     VALUE ch;
VALUE             403 ext/curses/curses.c static VALUE
VALUE             405 ext/curses/curses.c     VALUE obj;
VALUE             406 ext/curses/curses.c     VALUE str;
VALUE             416 ext/curses/curses.c static VALUE
VALUE             418 ext/curses/curses.c     VALUE obj;
VALUE             426 ext/curses/curses.c static VALUE
VALUE             428 ext/curses/curses.c     VALUE obj;
VALUE             442 ext/curses/curses.c static VALUE
VALUE             444 ext/curses/curses.c     VALUE obj;
VALUE             451 ext/curses/curses.c static VALUE
VALUE             453 ext/curses/curses.c     VALUE obj;
VALUE             462 ext/curses/curses.c static VALUE
VALUE             464 ext/curses/curses.c     VALUE obj;
VALUE             473 ext/curses/curses.c static VALUE
VALUE             475 ext/curses/curses.c     VALUE obj;
VALUE             476 ext/curses/curses.c     VALUE c;
VALUE             492 ext/curses/curses.c static VALUE
VALUE             498 ext/curses/curses.c static VALUE
VALUE             504 ext/curses/curses.c static VALUE
VALUE             505 ext/curses/curses.c curses_curs_set(VALUE obj, VALUE visibility)
VALUE             515 ext/curses/curses.c static VALUE
VALUE             516 ext/curses/curses.c curses_scrl(VALUE obj, VALUE n)
VALUE             526 ext/curses/curses.c static VALUE
VALUE             527 ext/curses/curses.c curses_setscrreg(VALUE obj, VALUE top, VALUE bottom)
VALUE             537 ext/curses/curses.c static VALUE
VALUE             538 ext/curses/curses.c curses_attroff(VALUE obj, VALUE attrs)
VALUE             544 ext/curses/curses.c static VALUE
VALUE             545 ext/curses/curses.c curses_attron(VALUE obj, VALUE attrs)
VALUE             551 ext/curses/curses.c static VALUE
VALUE             552 ext/curses/curses.c curses_attrset(VALUE obj, VALUE attrs)
VALUE             558 ext/curses/curses.c static VALUE
VALUE             559 ext/curses/curses.c curses_bkgdset(VALUE obj, VALUE ch)
VALUE             567 ext/curses/curses.c static VALUE
VALUE             568 ext/curses/curses.c curses_bkgd(VALUE obj, VALUE ch)
VALUE             577 ext/curses/curses.c static VALUE
VALUE             578 ext/curses/curses.c curses_resizeterm(VALUE obj, VALUE lin, VALUE col)
VALUE             588 ext/curses/curses.c static VALUE
VALUE             589 ext/curses/curses.c curses_start_color(VALUE obj)
VALUE             595 ext/curses/curses.c static VALUE
VALUE             596 ext/curses/curses.c curses_init_pair(VALUE obj, VALUE pair, VALUE f, VALUE b)
VALUE             602 ext/curses/curses.c static VALUE
VALUE             603 ext/curses/curses.c curses_init_color(VALUE obj, VALUE color, VALUE r, VALUE g, VALUE b)
VALUE             610 ext/curses/curses.c static VALUE
VALUE             611 ext/curses/curses.c curses_has_colors(VALUE obj)
VALUE             616 ext/curses/curses.c static VALUE
VALUE             617 ext/curses/curses.c curses_can_change_color(VALUE obj)
VALUE             622 ext/curses/curses.c static VALUE
VALUE             623 ext/curses/curses.c curses_color_content(VALUE obj, VALUE color)
VALUE             631 ext/curses/curses.c static VALUE
VALUE             632 ext/curses/curses.c curses_pair_content(VALUE obj, VALUE pair)
VALUE             640 ext/curses/curses.c static VALUE
VALUE             641 ext/curses/curses.c curses_color_pair(VALUE obj, VALUE attrs)
VALUE             646 ext/curses/curses.c static VALUE
VALUE             647 ext/curses/curses.c curses_pair_number(VALUE obj, VALUE attrs)
VALUE             678 ext/curses/curses.c static VALUE
VALUE             679 ext/curses/curses.c curses_getmouse(VALUE obj)
VALUE             682 ext/curses/curses.c   VALUE val;
VALUE             690 ext/curses/curses.c static VALUE
VALUE             691 ext/curses/curses.c curses_ungetmouse(VALUE obj, VALUE mevent)
VALUE             699 ext/curses/curses.c static VALUE
VALUE             700 ext/curses/curses.c curses_mouseinterval(VALUE obj, VALUE interval)
VALUE             705 ext/curses/curses.c static VALUE
VALUE             706 ext/curses/curses.c curses_mousemask(VALUE obj, VALUE mask)
VALUE             712 ext/curses/curses.c static VALUE func_name (VALUE mouse) \
VALUE             727 ext/curses/curses.c static VALUE
VALUE             728 ext/curses/curses.c curses_timeout(VALUE obj, VALUE delay)
VALUE             738 ext/curses/curses.c static VALUE
VALUE             739 ext/curses/curses.c curses_def_prog_mode(VALUE obj)
VALUE             748 ext/curses/curses.c static VALUE
VALUE             749 ext/curses/curses.c curses_reset_prog_mode(VALUE obj)
VALUE             761 ext/curses/curses.c static VALUE
VALUE             762 ext/curses/curses.c window_s_allocate(VALUE class)
VALUE             770 ext/curses/curses.c static VALUE
VALUE             772 ext/curses/curses.c     VALUE obj;
VALUE             773 ext/curses/curses.c     VALUE h;
VALUE             774 ext/curses/curses.c     VALUE w;
VALUE             775 ext/curses/curses.c     VALUE top;
VALUE             776 ext/curses/curses.c     VALUE left;
VALUE             793 ext/curses/curses.c static VALUE
VALUE             795 ext/curses/curses.c     VALUE obj;
VALUE             796 ext/curses/curses.c     VALUE height;
VALUE             797 ext/curses/curses.c     VALUE width;
VALUE             798 ext/curses/curses.c     VALUE top;
VALUE             799 ext/curses/curses.c     VALUE left;
VALUE             803 ext/curses/curses.c     VALUE win;
VALUE             818 ext/curses/curses.c static VALUE
VALUE             820 ext/curses/curses.c     VALUE obj;
VALUE             832 ext/curses/curses.c static VALUE
VALUE             834 ext/curses/curses.c     VALUE obj;
VALUE             845 ext/curses/curses.c static VALUE
VALUE             847 ext/curses/curses.c     VALUE obj;
VALUE             858 ext/curses/curses.c static VALUE
VALUE             860 ext/curses/curses.c     VALUE obj;
VALUE             871 ext/curses/curses.c static VALUE
VALUE             873 ext/curses/curses.c     VALUE obj;
VALUE             888 ext/curses/curses.c static VALUE
VALUE             890 ext/curses/curses.c     VALUE obj;
VALUE             891 ext/curses/curses.c     VALUE y;
VALUE             892 ext/curses/curses.c     VALUE x;
VALUE             903 ext/curses/curses.c static VALUE
VALUE             905 ext/curses/curses.c     VALUE obj;
VALUE             906 ext/curses/curses.c     VALUE y;
VALUE             907 ext/curses/curses.c     VALUE x;
VALUE             917 ext/curses/curses.c static VALUE
VALUE             919 ext/curses/curses.c     VALUE obj;
VALUE             930 ext/curses/curses.c static VALUE
VALUE             932 ext/curses/curses.c     VALUE obj;
VALUE             943 ext/curses/curses.c static VALUE
VALUE             945 ext/curses/curses.c     VALUE obj;
VALUE             964 ext/curses/curses.c static VALUE
VALUE             966 ext/curses/curses.c     VALUE obj;
VALUE             985 ext/curses/curses.c static VALUE
VALUE             987 ext/curses/curses.c     VALUE obj;
VALUE            1002 ext/curses/curses.c static VALUE
VALUE            1004 ext/curses/curses.c     VALUE obj;
VALUE            1019 ext/curses/curses.c static VALUE
VALUE            1022 ext/curses/curses.c     VALUE argv[], self;
VALUE            1025 ext/curses/curses.c     VALUE vert, hor, corn;
VALUE            1055 ext/curses/curses.c static VALUE
VALUE            1057 ext/curses/curses.c     VALUE obj;
VALUE            1067 ext/curses/curses.c static VALUE
VALUE            1069 ext/curses/curses.c     VALUE obj;
VALUE            1079 ext/curses/curses.c static VALUE
VALUE            1081 ext/curses/curses.c     VALUE obj;
VALUE            1090 ext/curses/curses.c static VALUE
VALUE            1092 ext/curses/curses.c     VALUE obj;
VALUE            1093 ext/curses/curses.c     VALUE ch;
VALUE            1104 ext/curses/curses.c static VALUE
VALUE            1106 ext/curses/curses.c     VALUE obj;
VALUE            1107 ext/curses/curses.c     VALUE ch;
VALUE            1118 ext/curses/curses.c static VALUE
VALUE            1120 ext/curses/curses.c     VALUE obj;
VALUE            1121 ext/curses/curses.c     VALUE str;
VALUE            1133 ext/curses/curses.c static VALUE
VALUE            1135 ext/curses/curses.c     VALUE obj;
VALUE            1136 ext/curses/curses.c     VALUE str;
VALUE            1143 ext/curses/curses.c static VALUE
VALUE            1145 ext/curses/curses.c     VALUE obj;
VALUE            1155 ext/curses/curses.c static VALUE
VALUE            1157 ext/curses/curses.c     VALUE obj;
VALUE            1173 ext/curses/curses.c static VALUE
VALUE            1175 ext/curses/curses.c     VALUE obj;
VALUE            1185 ext/curses/curses.c static VALUE
VALUE            1187 ext/curses/curses.c     VALUE obj;
VALUE            1199 ext/curses/curses.c static VALUE
VALUE            1201 ext/curses/curses.c     VALUE obj;
VALUE            1212 ext/curses/curses.c static VALUE
VALUE            1213 ext/curses/curses.c window_scrollok(VALUE obj, VALUE bf)
VALUE            1222 ext/curses/curses.c static VALUE
VALUE            1223 ext/curses/curses.c window_idlok(VALUE obj, VALUE bf)
VALUE            1232 ext/curses/curses.c static VALUE
VALUE            1233 ext/curses/curses.c window_setscrreg(VALUE obj, VALUE top, VALUE bottom)
VALUE            1249 ext/curses/curses.c static VALUE
VALUE            1250 ext/curses/curses.c window_color_set(VALUE obj, VALUE col)
VALUE            1262 ext/curses/curses.c static VALUE
VALUE            1263 ext/curses/curses.c window_scroll(VALUE obj)
VALUE            1272 ext/curses/curses.c static VALUE
VALUE            1273 ext/curses/curses.c window_scrl(VALUE obj, VALUE n)
VALUE            1286 ext/curses/curses.c static VALUE
VALUE            1287 ext/curses/curses.c window_attroff(VALUE obj, VALUE attrs)
VALUE            1299 ext/curses/curses.c static VALUE
VALUE            1300 ext/curses/curses.c window_attron(VALUE obj, VALUE attrs)
VALUE            1304 ext/curses/curses.c   VALUE val;
VALUE            1321 ext/curses/curses.c static VALUE
VALUE            1322 ext/curses/curses.c window_attrset(VALUE obj, VALUE attrs)
VALUE            1334 ext/curses/curses.c static VALUE
VALUE            1335 ext/curses/curses.c window_bkgdset(VALUE obj, VALUE ch)
VALUE            1346 ext/curses/curses.c static VALUE
VALUE            1347 ext/curses/curses.c window_bkgd(VALUE obj, VALUE ch)
VALUE            1359 ext/curses/curses.c static VALUE
VALUE            1360 ext/curses/curses.c window_getbkgd(VALUE obj)
VALUE            1373 ext/curses/curses.c static VALUE
VALUE            1374 ext/curses/curses.c window_resize(VALUE obj, VALUE lin, VALUE col)
VALUE            1387 ext/curses/curses.c static VALUE
VALUE            1388 ext/curses/curses.c window_keypad(VALUE obj, VALUE val)
VALUE            1408 ext/curses/curses.c static VALUE
VALUE            1409 ext/curses/curses.c window_nodelay(VALUE obj, VALUE val)
VALUE            1427 ext/curses/curses.c static VALUE
VALUE            1428 ext/curses/curses.c window_timeout(VALUE obj, VALUE delay)
VALUE              25 ext/dbm/dbm.c  static VALUE rb_cDBM, rb_eDBMError;
VALUE              61 ext/dbm/dbm.c  static VALUE
VALUE              63 ext/dbm/dbm.c      VALUE obj;
VALUE              74 ext/dbm/dbm.c  static VALUE
VALUE              76 ext/dbm/dbm.c      VALUE obj;
VALUE              89 ext/dbm/dbm.c  static VALUE fdbm_alloc _((VALUE));
VALUE              90 ext/dbm/dbm.c  static VALUE
VALUE              92 ext/dbm/dbm.c      VALUE klass;
VALUE              97 ext/dbm/dbm.c  static VALUE
VALUE             100 ext/dbm/dbm.c      VALUE *argv;
VALUE             101 ext/dbm/dbm.c      VALUE obj;
VALUE             103 ext/dbm/dbm.c      VALUE file, vmode, vflags;
VALUE             153 ext/dbm/dbm.c  static VALUE
VALUE             156 ext/dbm/dbm.c      VALUE *argv;
VALUE             157 ext/dbm/dbm.c      VALUE klass;
VALUE             159 ext/dbm/dbm.c      VALUE obj = Data_Wrap_Struct(klass, 0, free_dbm, 0);
VALUE             172 ext/dbm/dbm.c  static VALUE
VALUE             174 ext/dbm/dbm.c      VALUE obj, keystr, ifnone;
VALUE             194 ext/dbm/dbm.c  static VALUE
VALUE             196 ext/dbm/dbm.c      VALUE obj, keystr;
VALUE             201 ext/dbm/dbm.c  static VALUE
VALUE             204 ext/dbm/dbm.c      VALUE *argv;
VALUE             205 ext/dbm/dbm.c      VALUE obj;
VALUE             207 ext/dbm/dbm.c      VALUE keystr, valstr, ifnone;
VALUE             217 ext/dbm/dbm.c  static VALUE
VALUE             219 ext/dbm/dbm.c      VALUE obj, valstr;
VALUE             240 ext/dbm/dbm.c  static VALUE
VALUE             242 ext/dbm/dbm.c      VALUE obj;
VALUE             244 ext/dbm/dbm.c      VALUE new = rb_ary_new();
VALUE             251 ext/dbm/dbm.c  	VALUE assoc, v;
VALUE             265 ext/dbm/dbm.c  static VALUE
VALUE             268 ext/dbm/dbm.c      VALUE *argv;
VALUE             269 ext/dbm/dbm.c      VALUE obj;
VALUE             271 ext/dbm/dbm.c      VALUE new = rb_ary_new2(argc);
VALUE             283 ext/dbm/dbm.c      VALUE obj;
VALUE             289 ext/dbm/dbm.c  static VALUE
VALUE             291 ext/dbm/dbm.c      VALUE obj, keystr;
VALUE             296 ext/dbm/dbm.c      VALUE valstr;
VALUE             324 ext/dbm/dbm.c  static VALUE
VALUE             326 ext/dbm/dbm.c      VALUE obj;
VALUE             331 ext/dbm/dbm.c      VALUE keystr, valstr;
VALUE             347 ext/dbm/dbm.c  static VALUE
VALUE             349 ext/dbm/dbm.c      VALUE obj;
VALUE             354 ext/dbm/dbm.c      VALUE keystr, valstr;
VALUE             355 ext/dbm/dbm.c      VALUE ret, ary = rb_ary_new();
VALUE             388 ext/dbm/dbm.c  static VALUE
VALUE             390 ext/dbm/dbm.c      VALUE obj;
VALUE             409 ext/dbm/dbm.c  static VALUE
VALUE             411 ext/dbm/dbm.c      VALUE obj;
VALUE             416 ext/dbm/dbm.c      VALUE keystr, valstr;
VALUE             417 ext/dbm/dbm.c      VALUE hash = rb_hash_new();
VALUE             429 ext/dbm/dbm.c  static VALUE each_pair _((VALUE));
VALUE             431 ext/dbm/dbm.c  static VALUE
VALUE             433 ext/dbm/dbm.c      VALUE obj;
VALUE             438 ext/dbm/dbm.c  static VALUE fdbm_store _((VALUE,VALUE,VALUE));
VALUE             440 ext/dbm/dbm.c  static VALUE
VALUE             442 ext/dbm/dbm.c      VALUE pair, dbm;
VALUE             452 ext/dbm/dbm.c  static VALUE
VALUE             454 ext/dbm/dbm.c      VALUE obj, other;
VALUE             460 ext/dbm/dbm.c  static VALUE
VALUE             462 ext/dbm/dbm.c      VALUE obj, other;
VALUE             469 ext/dbm/dbm.c  static VALUE
VALUE             471 ext/dbm/dbm.c      VALUE obj, keystr, valstr;
VALUE             500 ext/dbm/dbm.c  static VALUE
VALUE             502 ext/dbm/dbm.c      VALUE obj;
VALUE             520 ext/dbm/dbm.c  static VALUE
VALUE             522 ext/dbm/dbm.c      VALUE obj;
VALUE             544 ext/dbm/dbm.c  static VALUE
VALUE             546 ext/dbm/dbm.c      VALUE obj;
VALUE             561 ext/dbm/dbm.c  static VALUE
VALUE             563 ext/dbm/dbm.c      VALUE obj;
VALUE             577 ext/dbm/dbm.c  static VALUE
VALUE             579 ext/dbm/dbm.c      VALUE obj;
VALUE             584 ext/dbm/dbm.c      VALUE keystr, valstr;
VALUE             599 ext/dbm/dbm.c  static VALUE
VALUE             601 ext/dbm/dbm.c      VALUE obj;
VALUE             606 ext/dbm/dbm.c      VALUE ary;
VALUE             618 ext/dbm/dbm.c  static VALUE
VALUE             620 ext/dbm/dbm.c      VALUE obj;
VALUE             625 ext/dbm/dbm.c      VALUE ary;
VALUE             637 ext/dbm/dbm.c  static VALUE
VALUE             639 ext/dbm/dbm.c      VALUE obj, keystr;
VALUE             655 ext/dbm/dbm.c  static VALUE
VALUE             657 ext/dbm/dbm.c      VALUE obj, valstr;
VALUE             677 ext/dbm/dbm.c  static VALUE
VALUE             679 ext/dbm/dbm.c      VALUE obj;
VALUE             684 ext/dbm/dbm.c      VALUE ary;
VALUE             697 ext/dbm/dbm.c  static VALUE
VALUE             699 ext/dbm/dbm.c      VALUE obj;
VALUE             704 ext/dbm/dbm.c      VALUE hash;
VALUE             717 ext/dbm/dbm.c  static VALUE
VALUE             719 ext/dbm/dbm.c      VALUE obj;
VALUE              36 ext/digest/digest.c static VALUE mDigest, cDigest_Base;
VALUE              44 ext/digest/digest.c get_digest_base_metadata(VALUE klass)
VALUE              46 ext/digest/digest.c     VALUE obj;
VALUE              60 ext/digest/digest.c static VALUE
VALUE              61 ext/digest/digest.c rb_digest_base_alloc(VALUE klass)
VALUE              64 ext/digest/digest.c     VALUE obj;
VALUE              82 ext/digest/digest.c static VALUE
VALUE              83 ext/digest/digest.c rb_digest_base_s_digest(VALUE klass, VALUE str)
VALUE              87 ext/digest/digest.c     volatile VALUE obj = rb_digest_base_alloc(klass);
VALUE             101 ext/digest/digest.c static VALUE
VALUE             102 ext/digest/digest.c rb_digest_base_s_hexdigest(VALUE klass, VALUE str)
VALUE             106 ext/digest/digest.c     volatile VALUE obj = rb_digest_base_alloc(klass);
VALUE             120 ext/digest/digest.c static VALUE
VALUE             121 ext/digest/digest.c rb_digest_base_copy(VALUE copy, VALUE obj)
VALUE             139 ext/digest/digest.c static VALUE
VALUE             140 ext/digest/digest.c rb_digest_base_update(VALUE self, VALUE str)
VALUE             154 ext/digest/digest.c static VALUE
VALUE             155 ext/digest/digest.c rb_digest_base_init(int argc, VALUE *argv, VALUE self)
VALUE             157 ext/digest/digest.c     VALUE arg;
VALUE             166 ext/digest/digest.c static VALUE
VALUE             167 ext/digest/digest.c rb_digest_base_digest(VALUE self)
VALUE             172 ext/digest/digest.c     VALUE str;
VALUE             189 ext/digest/digest.c static VALUE
VALUE             190 ext/digest/digest.c rb_digest_base_hexdigest(VALUE self)
VALUE             195 ext/digest/digest.c     VALUE str;
VALUE             212 ext/digest/digest.c static VALUE
VALUE             213 ext/digest/digest.c rb_digest_base_equal(VALUE self, VALUE other)
VALUE             216 ext/digest/digest.c     VALUE klass;
VALUE             217 ext/digest/digest.c     VALUE str1, str2;
VALUE              24 ext/digest/md5/md5init.c     VALUE mDigest, cDigest_Base, cDigest_MD5;
VALUE              24 ext/digest/rmd160/rmd160init.c     VALUE mDigest, cDigest_Base, cDigest_RMD160;
VALUE              24 ext/digest/sha1/sha1init.c     VALUE mDigest, cDigest_Base, cDigest_SHA1;
VALUE              25 ext/digest/sha2/sha2init.c     VALUE mDigest, cDigest_Base;
VALUE              29 ext/digest/sha2/sha2init.c     VALUE cDigest_SHA##bitlen;
VALUE               9 ext/dl/cfunc.c VALUE rb_cDLCFunc;
VALUE              13 ext/dl/cfunc.c static VALUE
VALUE              14 ext/dl/cfunc.c rb_dl_get_last_error(VALUE self)
VALUE              19 ext/dl/cfunc.c static VALUE
VALUE              20 ext/dl/cfunc.c rb_dl_set_last_error(VALUE self, VALUE val)
VALUE              30 ext/dl/cfunc.c static VALUE
VALUE              31 ext/dl/cfunc.c rb_dl_get_win32_last_error(VALUE self)
VALUE              36 ext/dl/cfunc.c static VALUE
VALUE              37 ext/dl/cfunc.c rb_dl_set_win32_last_error(VALUE self, VALUE val)
VALUE              54 ext/dl/cfunc.c VALUE
VALUE              57 ext/dl/cfunc.c   VALUE val;
VALUE              76 ext/dl/cfunc.c rb_dlcfunc2ptr(VALUE val)
VALUE              95 ext/dl/cfunc.c VALUE
VALUE              96 ext/dl/cfunc.c rb_dlcfunc_s_allocate(VALUE klass)
VALUE              98 ext/dl/cfunc.c   VALUE obj;
VALUE             110 ext/dl/cfunc.c VALUE
VALUE             111 ext/dl/cfunc.c rb_dlcfunc_initialize(int argc, VALUE argv[], VALUE self)
VALUE             113 ext/dl/cfunc.c     VALUE addr, name, type, calltype;
VALUE             133 ext/dl/cfunc.c VALUE
VALUE             134 ext/dl/cfunc.c rb_dlcfunc_name(VALUE self)
VALUE             142 ext/dl/cfunc.c VALUE
VALUE             143 ext/dl/cfunc.c rb_dlcfunc_ctype(VALUE self)
VALUE             151 ext/dl/cfunc.c VALUE
VALUE             152 ext/dl/cfunc.c rb_dlcfunc_set_ctype(VALUE self, VALUE ctype)
VALUE             161 ext/dl/cfunc.c VALUE
VALUE             162 ext/dl/cfunc.c rb_dlcfunc_calltype(VALUE self)
VALUE             170 ext/dl/cfunc.c VALUE
VALUE             171 ext/dl/cfunc.c rb_dlcfunc_set_calltype(VALUE self, VALUE sym)
VALUE             181 ext/dl/cfunc.c VALUE
VALUE             182 ext/dl/cfunc.c rb_dlcfunc_ptr(VALUE self)
VALUE             190 ext/dl/cfunc.c VALUE
VALUE             191 ext/dl/cfunc.c rb_dlcfunc_set_ptr(VALUE self, VALUE addr)
VALUE             201 ext/dl/cfunc.c VALUE
VALUE             202 ext/dl/cfunc.c rb_dlcfunc_inspect(VALUE self)
VALUE             204 ext/dl/cfunc.c     VALUE val;
VALUE             244 ext/dl/cfunc.c VALUE
VALUE             245 ext/dl/cfunc.c rb_dlcfunc_call(VALUE self, VALUE ary)
VALUE             250 ext/dl/cfunc.c     VALUE result = Qnil;
VALUE             479 ext/dl/cfunc.c VALUE
VALUE             480 ext/dl/cfunc.c rb_dlcfunc_to_i(VALUE self)
VALUE              11 ext/dl/cptr.c  VALUE rb_cDLCPtr;
VALUE              31 ext/dl/cptr.c  dlptr_init(VALUE val)
VALUE              39 ext/dl/cptr.c  VALUE
VALUE              40 ext/dl/cptr.c  rb_dlptr_new2(VALUE klass, void *ptr, long size, freefunc_t func)
VALUE              43 ext/dl/cptr.c    VALUE val;
VALUE              56 ext/dl/cptr.c  VALUE
VALUE              62 ext/dl/cptr.c  VALUE
VALUE              74 ext/dl/cptr.c  rb_dlptr2cptr(VALUE val)
VALUE              93 ext/dl/cptr.c  static VALUE
VALUE              94 ext/dl/cptr.c  rb_dlptr_s_allocate(VALUE klass)
VALUE              96 ext/dl/cptr.c    VALUE obj;
VALUE             108 ext/dl/cptr.c  static VALUE
VALUE             109 ext/dl/cptr.c  rb_dlptr_initialize(int argc, VALUE argv[], VALUE self)
VALUE             111 ext/dl/cptr.c    VALUE ptr, sym, size;
VALUE             148 ext/dl/cptr.c  static VALUE
VALUE             149 ext/dl/cptr.c  rb_dlptr_s_malloc(int argc, VALUE argv[], VALUE klass)
VALUE             151 ext/dl/cptr.c    VALUE size, sym, obj;
VALUE             173 ext/dl/cptr.c  VALUE
VALUE             174 ext/dl/cptr.c  rb_dlptr_to_i(VALUE self)
VALUE             182 ext/dl/cptr.c  VALUE
VALUE             183 ext/dl/cptr.c  rb_dlptr_to_value(VALUE self)
VALUE             187 ext/dl/cptr.c      return (VALUE)(data->ptr);
VALUE             190 ext/dl/cptr.c  VALUE
VALUE             191 ext/dl/cptr.c  rb_dlptr_ptr(VALUE self)
VALUE             199 ext/dl/cptr.c  VALUE
VALUE             200 ext/dl/cptr.c  rb_dlptr_ref(VALUE self)
VALUE             208 ext/dl/cptr.c  VALUE
VALUE             209 ext/dl/cptr.c  rb_dlptr_null_p(VALUE self)
VALUE             217 ext/dl/cptr.c  VALUE
VALUE             218 ext/dl/cptr.c  rb_dlptr_free_set(VALUE self, VALUE val)
VALUE             221 ext/dl/cptr.c    extern VALUE rb_cDLCFunc;
VALUE             234 ext/dl/cptr.c  VALUE
VALUE             235 ext/dl/cptr.c  rb_dlptr_free_get(VALUE self)
VALUE             244 ext/dl/cptr.c  VALUE
VALUE             245 ext/dl/cptr.c  rb_dlptr_to_s(int argc, VALUE argv[], VALUE self)
VALUE             248 ext/dl/cptr.c    VALUE arg1, val;
VALUE             267 ext/dl/cptr.c  VALUE
VALUE             268 ext/dl/cptr.c  rb_dlptr_to_str(int argc, VALUE argv[], VALUE self)
VALUE             271 ext/dl/cptr.c    VALUE arg1, val;
VALUE             290 ext/dl/cptr.c  VALUE
VALUE             291 ext/dl/cptr.c  rb_dlptr_inspect(VALUE self)
VALUE             302 ext/dl/cptr.c  VALUE
VALUE             303 ext/dl/cptr.c  rb_dlptr_eql(VALUE self, VALUE other)
VALUE             312 ext/dl/cptr.c  VALUE
VALUE             313 ext/dl/cptr.c  rb_dlptr_cmp(VALUE self, VALUE other)
VALUE             321 ext/dl/cptr.c  VALUE
VALUE             322 ext/dl/cptr.c  rb_dlptr_plus(VALUE self, VALUE other)
VALUE             333 ext/dl/cptr.c  VALUE
VALUE             334 ext/dl/cptr.c  rb_dlptr_minus(VALUE self, VALUE other)
VALUE             345 ext/dl/cptr.c  VALUE
VALUE             346 ext/dl/cptr.c  rb_dlptr_aref(int argc, VALUE argv[], VALUE self)
VALUE             348 ext/dl/cptr.c      VALUE arg0, arg1;
VALUE             349 ext/dl/cptr.c      VALUE retval = Qnil;
VALUE             368 ext/dl/cptr.c  VALUE
VALUE             369 ext/dl/cptr.c  rb_dlptr_aset(int argc, VALUE argv[], VALUE self)
VALUE             371 ext/dl/cptr.c      VALUE arg0, arg1, arg2;
VALUE             372 ext/dl/cptr.c      VALUE retval = Qnil;
VALUE             403 ext/dl/cptr.c  VALUE
VALUE             404 ext/dl/cptr.c  rb_dlptr_size(int argc, VALUE argv[], VALUE self)
VALUE             406 ext/dl/cptr.c    VALUE size;
VALUE             417 ext/dl/cptr.c  VALUE
VALUE             418 ext/dl/cptr.c  rb_dlptr_s_to_ptr(VALUE self, VALUE val)
VALUE             436 ext/dl/cptr.c  	VALUE vptr = rb_funcall(val, id_to_ptr, 0);
VALUE               7 ext/dl/dl.c    VALUE rb_mDL;
VALUE               8 ext/dl/dl.c    VALUE rb_eDLError;
VALUE               9 ext/dl/dl.c    VALUE rb_eDLTypeError;
VALUE              14 ext/dl/dl.c    VALUE
VALUE              15 ext/dl/dl.c    rb_dl_dlopen(int argc, VALUE argv[], VALUE self)
VALUE              21 ext/dl/dl.c    VALUE
VALUE              22 ext/dl/dl.c    rb_dl_malloc(VALUE self, VALUE size)
VALUE              30 ext/dl/dl.c    VALUE
VALUE              31 ext/dl/dl.c    rb_dl_realloc(VALUE self, VALUE addr, VALUE size)
VALUE              39 ext/dl/dl.c    VALUE
VALUE              40 ext/dl/dl.c    rb_dl_free(VALUE self, VALUE addr)
VALUE              47 ext/dl/dl.c    VALUE
VALUE              48 ext/dl/dl.c    rb_dl_ptr2value(VALUE self, VALUE addr)
VALUE              50 ext/dl/dl.c        return (VALUE)NUM2PTR(addr);
VALUE              53 ext/dl/dl.c    VALUE
VALUE              54 ext/dl/dl.c    rb_dl_value2ptr(VALUE self, VALUE val)
VALUE              91 ext/dl/dl.h    extern VALUE rb_mDL;
VALUE              92 ext/dl/dl.h    extern VALUE rb_cDLHandle;
VALUE              93 ext/dl/dl.h    extern VALUE rb_cDLSymbol;
VALUE              94 ext/dl/dl.h    extern VALUE rb_eDLError;
VALUE              95 ext/dl/dl.h    extern VALUE rb_eDLTypeError;
VALUE             178 ext/dl/dl.h    VALUE rb_dlcfunc_new(void (*func)(), int dltype, const char * name, ID calltype);
VALUE             179 ext/dl/dl.h    VALUE rb_dlptr_new(void *ptr, long size, freefunc_t func);
VALUE             180 ext/dl/dl.h    VALUE rb_dlptr_new2(VALUE klass, void *ptr, long size, freefunc_t func);
VALUE             181 ext/dl/dl.h    VALUE rb_dlptr_malloc(long size, freefunc_t func);
VALUE               8 ext/dl/handle.c VALUE rb_cDLHandle;
VALUE              18 ext/dl/handle.c VALUE
VALUE              19 ext/dl/handle.c rb_dlhandle_close(VALUE self)
VALUE              28 ext/dl/handle.c VALUE
VALUE              29 ext/dl/handle.c rb_dlhandle_s_allocate(VALUE klass)
VALUE              31 ext/dl/handle.c   VALUE obj;
VALUE              43 ext/dl/handle.c VALUE
VALUE              44 ext/dl/handle.c rb_dlhandle_initialize(int argc, VALUE argv[], VALUE self)
VALUE              48 ext/dl/handle.c   VALUE lib, flag;
VALUE              96 ext/dl/handle.c VALUE
VALUE              97 ext/dl/handle.c rb_dlhandle_enable_close(VALUE self)
VALUE             106 ext/dl/handle.c VALUE
VALUE             107 ext/dl/handle.c rb_dlhandle_disable_close(VALUE self)
VALUE             116 ext/dl/handle.c VALUE
VALUE             117 ext/dl/handle.c rb_dlhandle_to_i(VALUE self)
VALUE             125 ext/dl/handle.c VALUE
VALUE             126 ext/dl/handle.c rb_dlhandle_sym(VALUE self, VALUE sym)
VALUE              30 ext/etc/etc.c  static VALUE sPasswd, sGroup;
VALUE              42 ext/etc/etc.c  static VALUE
VALUE              44 ext/etc/etc.c      VALUE obj;
VALUE              62 ext/etc/etc.c  static VALUE
VALUE              72 ext/etc/etc.c  static VALUE
VALUE             121 ext/etc/etc.c  static VALUE
VALUE             124 ext/etc/etc.c      VALUE *argv;
VALUE             125 ext/etc/etc.c      VALUE obj;
VALUE             128 ext/etc/etc.c      VALUE id;
VALUE             155 ext/etc/etc.c  static VALUE
VALUE             157 ext/etc/etc.c      VALUE obj, nam;
VALUE             173 ext/etc/etc.c  static VALUE
VALUE             180 ext/etc/etc.c  static VALUE
VALUE             209 ext/etc/etc.c  static VALUE
VALUE             211 ext/etc/etc.c      VALUE obj;
VALUE             234 ext/etc/etc.c  static VALUE
VALUE             236 ext/etc/etc.c      VALUE obj;
VALUE             247 ext/etc/etc.c  static VALUE
VALUE             249 ext/etc/etc.c      VALUE obj;
VALUE             283 ext/etc/etc.c  static VALUE
VALUE             285 ext/etc/etc.c      VALUE obj;
VALUE             298 ext/etc/etc.c  static VALUE
VALUE             302 ext/etc/etc.c      VALUE mem;
VALUE             331 ext/etc/etc.c  static VALUE
VALUE             333 ext/etc/etc.c      VALUE obj, id;
VALUE             359 ext/etc/etc.c  static VALUE
VALUE             361 ext/etc/etc.c      VALUE obj, nam;
VALUE             378 ext/etc/etc.c  static VALUE
VALUE             385 ext/etc/etc.c  static VALUE
VALUE             414 ext/etc/etc.c  static VALUE
VALUE             416 ext/etc/etc.c      VALUE obj;
VALUE             439 ext/etc/etc.c  static VALUE
VALUE             441 ext/etc/etc.c      VALUE obj;
VALUE             452 ext/etc/etc.c  static VALUE
VALUE             454 ext/etc/etc.c      VALUE obj;
VALUE             482 ext/etc/etc.c  static VALUE
VALUE             484 ext/etc/etc.c      VALUE obj;
VALUE             496 ext/etc/etc.c  static VALUE mEtc;
VALUE             115 ext/fcntl/fcntl.c     VALUE mFcntl = rb_define_module("Fcntl");
VALUE              17 ext/gdbm/gdbm.c static VALUE rb_cGDBM, rb_eGDBMError, rb_eGDBMFatalError;
VALUE              62 ext/gdbm/gdbm.c static VALUE
VALUE              64 ext/gdbm/gdbm.c     VALUE obj;
VALUE              75 ext/gdbm/gdbm.c static VALUE
VALUE              77 ext/gdbm/gdbm.c     VALUE obj;
VALUE              90 ext/gdbm/gdbm.c static VALUE fgdbm_s_alloc _((VALUE));
VALUE              92 ext/gdbm/gdbm.c static VALUE
VALUE              94 ext/gdbm/gdbm.c     VALUE klass;
VALUE              99 ext/gdbm/gdbm.c static VALUE
VALUE             102 ext/gdbm/gdbm.c     VALUE *argv;
VALUE             103 ext/gdbm/gdbm.c     VALUE obj;
VALUE             105 ext/gdbm/gdbm.c     VALUE file, vmode, vflags;
VALUE             163 ext/gdbm/gdbm.c static VALUE
VALUE             166 ext/gdbm/gdbm.c     VALUE *argv;
VALUE             167 ext/gdbm/gdbm.c     VALUE klass;
VALUE             169 ext/gdbm/gdbm.c     VALUE obj = Data_Wrap_Struct(klass, 0, free_dbm, 0);
VALUE             182 ext/gdbm/gdbm.c static VALUE
VALUE             188 ext/gdbm/gdbm.c     VALUE str;
VALUE             201 ext/gdbm/gdbm.c     return (VALUE)str;
VALUE             204 ext/gdbm/gdbm.c static VALUE
VALUE             207 ext/gdbm/gdbm.c     VALUE keystr;
VALUE             218 ext/gdbm/gdbm.c static VALUE
VALUE             220 ext/gdbm/gdbm.c     VALUE obj, keystr;
VALUE             229 ext/gdbm/gdbm.c static VALUE
VALUE             234 ext/gdbm/gdbm.c     VALUE str;
VALUE             250 ext/gdbm/gdbm.c static VALUE
VALUE             253 ext/gdbm/gdbm.c     VALUE keystr;
VALUE             256 ext/gdbm/gdbm.c     VALUE str;
VALUE             274 ext/gdbm/gdbm.c static VALUE
VALUE             276 ext/gdbm/gdbm.c     VALUE obj, keystr, ifnone;
VALUE             278 ext/gdbm/gdbm.c     VALUE valstr;
VALUE             289 ext/gdbm/gdbm.c static VALUE
VALUE             291 ext/gdbm/gdbm.c     VALUE obj, keystr;
VALUE             296 ext/gdbm/gdbm.c static VALUE
VALUE             299 ext/gdbm/gdbm.c     VALUE *argv;
VALUE             300 ext/gdbm/gdbm.c     VALUE obj;
VALUE             302 ext/gdbm/gdbm.c     VALUE keystr, valstr, ifnone;
VALUE             312 ext/gdbm/gdbm.c static VALUE
VALUE             314 ext/gdbm/gdbm.c     VALUE obj, valstr;
VALUE             318 ext/gdbm/gdbm.c     VALUE keystr, valstr2;
VALUE             336 ext/gdbm/gdbm.c static VALUE
VALUE             338 ext/gdbm/gdbm.c     VALUE obj;
VALUE             340 ext/gdbm/gdbm.c     VALUE new = rb_ary_new();
VALUE             343 ext/gdbm/gdbm.c     VALUE keystr;
VALUE             348 ext/gdbm/gdbm.c 	VALUE assoc = rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr));
VALUE             349 ext/gdbm/gdbm.c 	VALUE v = rb_yield(assoc);
VALUE             360 ext/gdbm/gdbm.c static VALUE
VALUE             363 ext/gdbm/gdbm.c     VALUE *argv;
VALUE             364 ext/gdbm/gdbm.c     VALUE obj;
VALUE             366 ext/gdbm/gdbm.c     VALUE new = rb_ary_new2(argc);
VALUE             378 ext/gdbm/gdbm.c     VALUE obj;
VALUE             384 ext/gdbm/gdbm.c static VALUE
VALUE             386 ext/gdbm/gdbm.c     VALUE obj, keystr;
VALUE             412 ext/gdbm/gdbm.c static VALUE
VALUE             414 ext/gdbm/gdbm.c     VALUE obj, keystr;
VALUE             416 ext/gdbm/gdbm.c     VALUE valstr;
VALUE             423 ext/gdbm/gdbm.c static VALUE
VALUE             425 ext/gdbm/gdbm.c     VALUE obj;
VALUE             429 ext/gdbm/gdbm.c     VALUE keystr, valstr;
VALUE             441 ext/gdbm/gdbm.c static VALUE
VALUE             443 ext/gdbm/gdbm.c     VALUE obj;
VALUE             447 ext/gdbm/gdbm.c     VALUE keystr, valstr;
VALUE             448 ext/gdbm/gdbm.c     VALUE ret, ary = rb_ary_new();
VALUE             474 ext/gdbm/gdbm.c static VALUE
VALUE             476 ext/gdbm/gdbm.c     VALUE obj;
VALUE             512 ext/gdbm/gdbm.c static VALUE
VALUE             514 ext/gdbm/gdbm.c     VALUE obj;
VALUE             518 ext/gdbm/gdbm.c     VALUE keystr, valstr;
VALUE             519 ext/gdbm/gdbm.c     VALUE hash = rb_hash_new();
VALUE             531 ext/gdbm/gdbm.c static VALUE each_pair _((VALUE));
VALUE             533 ext/gdbm/gdbm.c static VALUE
VALUE             535 ext/gdbm/gdbm.c     VALUE obj;
VALUE             540 ext/gdbm/gdbm.c static VALUE fgdbm_store _((VALUE,VALUE,VALUE));
VALUE             542 ext/gdbm/gdbm.c static VALUE
VALUE             544 ext/gdbm/gdbm.c     VALUE pair, dbm;
VALUE             554 ext/gdbm/gdbm.c static VALUE
VALUE             556 ext/gdbm/gdbm.c     VALUE obj, other;
VALUE             562 ext/gdbm/gdbm.c static VALUE
VALUE             564 ext/gdbm/gdbm.c     VALUE obj, other;
VALUE             571 ext/gdbm/gdbm.c static VALUE
VALUE             573 ext/gdbm/gdbm.c     VALUE obj, keystr, valstr;
VALUE             599 ext/gdbm/gdbm.c static VALUE
VALUE             601 ext/gdbm/gdbm.c     VALUE obj;
VALUE             621 ext/gdbm/gdbm.c static VALUE
VALUE             623 ext/gdbm/gdbm.c     VALUE obj;
VALUE             645 ext/gdbm/gdbm.c static VALUE
VALUE             647 ext/gdbm/gdbm.c     VALUE obj;
VALUE             651 ext/gdbm/gdbm.c     VALUE keystr;
VALUE             663 ext/gdbm/gdbm.c static VALUE
VALUE             665 ext/gdbm/gdbm.c     VALUE obj;
VALUE             669 ext/gdbm/gdbm.c     VALUE keystr;
VALUE             681 ext/gdbm/gdbm.c static VALUE
VALUE             683 ext/gdbm/gdbm.c     VALUE obj;
VALUE             687 ext/gdbm/gdbm.c     VALUE keystr;
VALUE             700 ext/gdbm/gdbm.c static VALUE
VALUE             702 ext/gdbm/gdbm.c     VALUE obj;
VALUE             706 ext/gdbm/gdbm.c     VALUE keystr, ary;
VALUE             719 ext/gdbm/gdbm.c static VALUE
VALUE             721 ext/gdbm/gdbm.c     VALUE obj;
VALUE             726 ext/gdbm/gdbm.c     VALUE valstr, ary;
VALUE             740 ext/gdbm/gdbm.c static VALUE
VALUE             742 ext/gdbm/gdbm.c     VALUE obj, keystr;
VALUE             758 ext/gdbm/gdbm.c static VALUE
VALUE             760 ext/gdbm/gdbm.c     VALUE obj, valstr;
VALUE             764 ext/gdbm/gdbm.c     VALUE keystr, valstr2;
VALUE             783 ext/gdbm/gdbm.c static VALUE
VALUE             785 ext/gdbm/gdbm.c     VALUE obj;
VALUE             789 ext/gdbm/gdbm.c     VALUE keystr, ary;
VALUE             802 ext/gdbm/gdbm.c static VALUE
VALUE             804 ext/gdbm/gdbm.c     VALUE obj;
VALUE             815 ext/gdbm/gdbm.c static VALUE
VALUE             817 ext/gdbm/gdbm.c     VALUE obj;
VALUE             828 ext/gdbm/gdbm.c static VALUE
VALUE             830 ext/gdbm/gdbm.c     VALUE obj, val;
VALUE             844 ext/gdbm/gdbm.c static VALUE
VALUE             846 ext/gdbm/gdbm.c     VALUE obj, val;
VALUE             863 ext/gdbm/gdbm.c static VALUE
VALUE             865 ext/gdbm/gdbm.c     VALUE obj, val;
VALUE             887 ext/gdbm/gdbm.c static VALUE
VALUE             889 ext/gdbm/gdbm.c     VALUE obj;
VALUE             893 ext/gdbm/gdbm.c     VALUE keystr, hash;
VALUE             906 ext/gdbm/gdbm.c static VALUE
VALUE             908 ext/gdbm/gdbm.c     VALUE obj;
VALUE              74 ext/iconv/iconv.c #define VALUE2ICONV(v) ((iconv_t)((VALUE)(v) ^ -1))
VALUE              75 ext/iconv/iconv.c #define ICONV2VALUE(c) ((VALUE)(c) ^ -1)
VALUE              81 ext/iconv/iconv.c     VALUE *argv;
VALUE              82 ext/iconv/iconv.c     VALUE ret;
VALUE              83 ext/iconv/iconv.c     VALUE (*append)_((VALUE, VALUE));
VALUE              88 ext/iconv/iconv.c     VALUE transliterate;
VALUE              89 ext/iconv/iconv.c     VALUE discard_ilseq;
VALUE              94 ext/iconv/iconv.c static VALUE rb_eIconvInvalidEncoding;
VALUE              95 ext/iconv/iconv.c static VALUE rb_eIconvFailure;
VALUE              96 ext/iconv/iconv.c static VALUE rb_eIconvIllegalSeq;
VALUE              97 ext/iconv/iconv.c static VALUE rb_eIconvInvalidChar;
VALUE              98 ext/iconv/iconv.c static VALUE rb_eIconvOutOfRange;
VALUE              99 ext/iconv/iconv.c static VALUE rb_eIconvBrokenLibrary;
VALUE             102 ext/iconv/iconv.c static VALUE iconv_fail _((VALUE error, VALUE success, VALUE failed, struct iconv_env_t* env, const char *mesg));
VALUE             103 ext/iconv/iconv.c static VALUE iconv_failure_initialize _((VALUE error, VALUE mesg, VALUE success, VALUE failed));
VALUE             104 ext/iconv/iconv.c static VALUE iconv_failure_success _((VALUE self));
VALUE             105 ext/iconv/iconv.c static VALUE iconv_failure_failed _((VALUE self));
VALUE             107 ext/iconv/iconv.c static iconv_t iconv_create _((VALUE to, VALUE from, struct rb_iconv_opt_t *opt));
VALUE             109 ext/iconv/iconv.c static VALUE iconv_free _((VALUE cd));
VALUE             110 ext/iconv/iconv.c static VALUE iconv_try _((iconv_t cd, const char **inptr, size_t *inlen, char **outptr, size_t *outlen));
VALUE             111 ext/iconv/iconv.c static VALUE rb_str_derive _((VALUE str, const char* ptr, int len));
VALUE             112 ext/iconv/iconv.c static VALUE iconv_convert _((iconv_t cd, VALUE str, int start, int length, struct iconv_env_t* env));
VALUE             113 ext/iconv/iconv.c static VALUE iconv_s_allocate _((VALUE klass));
VALUE             114 ext/iconv/iconv.c static VALUE iconv_initialize _((int argc, VALUE *argv, VALUE self));
VALUE             115 ext/iconv/iconv.c static VALUE iconv_s_open _((int argc, VALUE *argv, VALUE self));
VALUE             116 ext/iconv/iconv.c static VALUE iconv_s_convert _((struct iconv_env_t* env));
VALUE             117 ext/iconv/iconv.c static VALUE iconv_s_iconv _((int argc, VALUE *argv, VALUE self));
VALUE             118 ext/iconv/iconv.c static VALUE iconv_init_state _((VALUE cd));
VALUE             119 ext/iconv/iconv.c static VALUE iconv_finish _((VALUE self));
VALUE             120 ext/iconv/iconv.c static VALUE iconv_iconv _((int argc, VALUE *argv, VALUE self));
VALUE             121 ext/iconv/iconv.c static VALUE iconv_conv _((int argc, VALUE *argv, VALUE self));
VALUE             123 ext/iconv/iconv.c static VALUE charset_map;
VALUE             131 ext/iconv/iconv.c static VALUE charset_map_get(void)
VALUE             137 ext/iconv/iconv.c map_charset(VALUE *code)
VALUE             139 ext/iconv/iconv.c     VALUE val = *code;
VALUE             142 ext/iconv/iconv.c 	VALUE key = rb_funcall2(val, rb_intern("downcase"), 0, 0);
VALUE             152 ext/iconv/iconv.c iconv_create(VALUE to, VALUE from, struct rb_iconv_opt_t *opt)
VALUE             170 ext/iconv/iconv.c 	    volatile VALUE msg = rb_str_new(0, strlen(s) + RSTRING(to)->len +
VALUE             212 ext/iconv/iconv.c static VALUE
VALUE             213 ext/iconv/iconv.c iconv_free(VALUE cd)
VALUE             220 ext/iconv/iconv.c static VALUE
VALUE             221 ext/iconv/iconv.c check_iconv(VALUE obj)
VALUE             227 ext/iconv/iconv.c     return (VALUE)DATA_PTR(obj);
VALUE             230 ext/iconv/iconv.c static VALUE
VALUE             271 ext/iconv/iconv.c static VALUE iconv_failure_initialize(VALUE error, VALUE mesg, VALUE success, VALUE failed)
VALUE             279 ext/iconv/iconv.c static VALUE
VALUE             280 ext/iconv/iconv.c iconv_fail(VALUE error, VALUE success, VALUE failed, struct iconv_env_t* env, const char *mesg)
VALUE             282 ext/iconv/iconv.c     VALUE args[3];
VALUE             309 ext/iconv/iconv.c static VALUE
VALUE             310 ext/iconv/iconv.c rb_str_derive(VALUE str, const char* ptr, int len)
VALUE             312 ext/iconv/iconv.c     VALUE ret;
VALUE             326 ext/iconv/iconv.c static VALUE
VALUE             327 ext/iconv/iconv.c iconv_convert(iconv_t cd, VALUE str, int start, int length, struct iconv_env_t* env)
VALUE             329 ext/iconv/iconv.c     VALUE ret = Qfalse;
VALUE             330 ext/iconv/iconv.c     VALUE error = Qfalse;
VALUE             331 ext/iconv/iconv.c     VALUE rescue;
VALUE             460 ext/iconv/iconv.c static VALUE
VALUE             461 ext/iconv/iconv.c iconv_s_allocate(VALUE klass)
VALUE             466 ext/iconv/iconv.c static VALUE
VALUE             467 ext/iconv/iconv.c get_iconv_opt_i(VALUE i, VALUE arg)
VALUE             470 ext/iconv/iconv.c     VALUE name, val;
VALUE             520 ext/iconv/iconv.c get_iconv_opt(struct rb_iconv_opt_t *opt, VALUE options)
VALUE             525 ext/iconv/iconv.c 	rb_iterate(rb_each, options, get_iconv_opt_i, (VALUE)opt);
VALUE             552 ext/iconv/iconv.c static VALUE
VALUE             553 ext/iconv/iconv.c iconv_initialize(int argc, VALUE *argv, VALUE self)
VALUE             555 ext/iconv/iconv.c     VALUE to, from, options;
VALUE             574 ext/iconv/iconv.c static VALUE
VALUE             575 ext/iconv/iconv.c iconv_s_open(int argc, VALUE *argv, VALUE self)
VALUE             577 ext/iconv/iconv.c     VALUE to, from, options, cd;
VALUE             586 ext/iconv/iconv.c 	return rb_ensure(rb_yield, self, (VALUE(*)())iconv_finish, self);
VALUE             593 ext/iconv/iconv.c static VALUE
VALUE             596 ext/iconv/iconv.c     VALUE last = 0;
VALUE             599 ext/iconv/iconv.c 	VALUE s = iconv_convert(env->cd, last = *(env->argv), 0, -1, env);
VALUE             604 ext/iconv/iconv.c 	VALUE s = iconv_convert(env->cd, Qnil, 0, 0, env);
VALUE             630 ext/iconv/iconv.c static VALUE
VALUE             631 ext/iconv/iconv.c iconv_s_iconv(int argc, VALUE *argv, VALUE self)
VALUE             643 ext/iconv/iconv.c     return rb_ensure(iconv_s_convert, (VALUE)&arg, iconv_free, ICONV2VALUE(arg.cd));
VALUE             654 ext/iconv/iconv.c static VALUE
VALUE             655 ext/iconv/iconv.c iconv_s_conv(VALUE self, VALUE to, VALUE from, VALUE str)
VALUE             664 ext/iconv/iconv.c     return rb_ensure(iconv_s_convert, (VALUE)&arg, iconv_free, ICONV2VALUE(arg.cd));
VALUE             679 ext/iconv/iconv.c     VALUE array;
VALUE             682 ext/iconv/iconv.c static VALUE
VALUE             683 ext/iconv/iconv.c list_iconv_i(VALUE ptr)
VALUE             688 ext/iconv/iconv.c     VALUE ary = rb_ary_new2(namescount);
VALUE             707 ext/iconv/iconv.c     list.array = ((VALUE *)data)[1];
VALUE             708 ext/iconv/iconv.c     rb_protect(list_iconv_i, (VALUE)&list, state);
VALUE             713 ext/iconv/iconv.c static VALUE
VALUE             718 ext/iconv/iconv.c     VALUE args[2];
VALUE             742 ext/iconv/iconv.c static VALUE
VALUE             743 ext/iconv/iconv.c iconv_init_state(VALUE cd)
VALUE             748 ext/iconv/iconv.c static VALUE
VALUE             749 ext/iconv/iconv.c iconv_finish(VALUE self)
VALUE             751 ext/iconv/iconv.c     VALUE cd = check_iconv(self);
VALUE             786 ext/iconv/iconv.c static VALUE
VALUE             787 ext/iconv/iconv.c iconv_iconv(int argc, VALUE *argv, VALUE self)
VALUE             789 ext/iconv/iconv.c     VALUE str, n1, n2;
VALUE             790 ext/iconv/iconv.c     VALUE cd = check_iconv(self);
VALUE             809 ext/iconv/iconv.c static VALUE
VALUE             810 ext/iconv/iconv.c iconv_conv(int argc, VALUE *argv, VALUE self)
VALUE             813 ext/iconv/iconv.c     VALUE str, s;
VALUE             840 ext/iconv/iconv.c static VALUE
VALUE             841 ext/iconv/iconv.c iconv_trivialp(VALUE self)
VALUE             859 ext/iconv/iconv.c static VALUE
VALUE             860 ext/iconv/iconv.c iconv_get_transliterate(VALUE self)
VALUE             878 ext/iconv/iconv.c static VALUE
VALUE             879 ext/iconv/iconv.c iconv_set_transliterate(VALUE self, VALUE transliterate)
VALUE             896 ext/iconv/iconv.c static VALUE
VALUE             897 ext/iconv/iconv.c iconv_get_discard_ilseq(VALUE self)
VALUE             915 ext/iconv/iconv.c static VALUE
VALUE             916 ext/iconv/iconv.c iconv_set_discard_ilseq(VALUE self, VALUE discard_ilseq)
VALUE             933 ext/iconv/iconv.c static VALUE
VALUE             934 ext/iconv/iconv.c iconv_s_ctlmethods(VALUE klass)
VALUE             936 ext/iconv/iconv.c     VALUE ary = rb_ary_new();
VALUE             970 ext/iconv/iconv.c static VALUE
VALUE             971 ext/iconv/iconv.c iconv_failure_success(VALUE self)
VALUE             983 ext/iconv/iconv.c static VALUE
VALUE             984 ext/iconv/iconv.c iconv_failure_failed(VALUE self)
VALUE             995 ext/iconv/iconv.c static VALUE
VALUE             996 ext/iconv/iconv.c iconv_failure_inspect(VALUE self)
VALUE             999 ext/iconv/iconv.c     VALUE success = rb_attr_get(self, rb_success);
VALUE            1000 ext/iconv/iconv.c     VALUE failed = rb_attr_get(self, rb_failed);
VALUE            1001 ext/iconv/iconv.c     VALUE str = rb_str_buf_cat2(rb_str_new2("#<"), cname);
VALUE            1046 ext/iconv/iconv.c     VALUE rb_cIconv = rb_define_class("Iconv", rb_cData);
VALUE              37 ext/io/wait/wait.c static VALUE io_ready_p _((VALUE io));
VALUE              38 ext/io/wait/wait.c static VALUE io_wait _((int argc, VALUE *argv, VALUE io));
VALUE              41 ext/io/wait/wait.c EXTERN struct timeval rb_time_interval _((VALUE time));
VALUE              55 ext/io/wait/wait.c static VALUE
VALUE              57 ext/io/wait/wait.c     VALUE io;
VALUE              77 ext/io/wait/wait.c static VALUE
VALUE              79 ext/io/wait/wait.c     VALUE p;
VALUE              84 ext/io/wait/wait.c     return (VALUE)rb_thread_select(rb_fd_max(fds), rb_fd_ptr(fds), NULL, NULL, arg->timeout);
VALUE              95 ext/io/wait/wait.c static VALUE
VALUE              98 ext/io/wait/wait.c     VALUE *argv;
VALUE              99 ext/io/wait/wait.c     VALUE io;
VALUE             105 ext/io/wait/wait.c     VALUE timeout;
VALUE             125 ext/io/wait/wait.c     i = (int)rb_ensure(wait_readable, (VALUE)&arg,
VALUE             126 ext/io/wait/wait.c 		       (VALUE (*)_((VALUE)))rb_fd_term, (VALUE)&arg.fds);
VALUE              56 ext/nkf/nkf.c  static VALUE result;
VALUE              81 ext/nkf/nkf.c  static VALUE
VALUE              83 ext/nkf/nkf.c    VALUE obj, opt, src;
VALUE              86 ext/nkf/nkf.c    volatile VALUE v;
VALUE             128 ext/nkf/nkf.c  static VALUE
VALUE             130 ext/nkf/nkf.c    VALUE obj, src;
VALUE             222 ext/nkf/nkf.c  static VALUE
VALUE             224 ext/nkf/nkf.c    VALUE obj, src;
VALUE             269 ext/nkf/nkf.c    VALUE mKconv = rb_define_module("NKF");
VALUE              51 ext/openssl/ossl.c ossl_x509_ary2sk0(VALUE ary)
VALUE              54 ext/openssl/ossl.c     VALUE val;
VALUE              75 ext/openssl/ossl.c ossl_protect_x509_ary2sk(VALUE ary, int *status)
VALUE              77 ext/openssl/ossl.c     return (STACK_OF(X509)*)rb_protect((VALUE(*)_((VALUE)))ossl_x509_ary2sk0,
VALUE              82 ext/openssl/ossl.c ossl_x509_ary2sk(VALUE ary)
VALUE              94 ext/openssl/ossl.c VALUE						\
VALUE              99 ext/openssl/ossl.c     VALUE ary;					\
VALUE             121 ext/openssl/ossl.c static VALUE
VALUE             127 ext/openssl/ossl.c VALUE
VALUE             130 ext/openssl/ossl.c     VALUE str;
VALUE             133 ext/openssl/ossl.c     str = rb_protect((VALUE(*)_((VALUE)))ossl_str_new, len, &status);
VALUE             144 ext/openssl/ossl.c static VALUE
VALUE             145 ext/openssl/ossl.c ossl_pem_passwd_cb0(VALUE flag)
VALUE             147 ext/openssl/ossl.c     VALUE pass;
VALUE             159 ext/openssl/ossl.c     VALUE rflag, pass;
VALUE             193 ext/openssl/ossl.c VALUE
VALUE             203 ext/openssl/ossl.c     VALUE proc, rctx, ret;
VALUE             207 ext/openssl/ossl.c     proc = (VALUE)X509_STORE_CTX_get_ex_data(ctx, ossl_verify_cb_idx);
VALUE             209 ext/openssl/ossl.c 	proc = (VALUE)X509_STORE_get_ex_data(ctx->ctx, ossl_verify_cb_idx);
VALUE             213 ext/openssl/ossl.c 	rctx = rb_protect((VALUE(*)(VALUE))ossl_x509stctx_new,
VALUE             214 ext/openssl/ossl.c 			  (VALUE)ctx, &state);
VALUE             220 ext/openssl/ossl.c 	    ret = rb_ensure(ossl_call_verify_cb_proc, (VALUE)&args,
VALUE             241 ext/openssl/ossl.c VALUE mOSSL;
VALUE             246 ext/openssl/ossl.c VALUE eOSSLError;
VALUE             253 ext/openssl/ossl.c VALUE
VALUE             254 ext/openssl/ossl.c ossl_to_der(VALUE obj)
VALUE             256 ext/openssl/ossl.c     VALUE tmp;
VALUE             264 ext/openssl/ossl.c VALUE
VALUE             265 ext/openssl/ossl.c ossl_to_der_if_possible(VALUE obj)
VALUE             276 ext/openssl/ossl.c ossl_raise(VALUE exc, const char *fmt, ...)
VALUE             313 ext/openssl/ossl.c VALUE
VALUE             316 ext/openssl/ossl.c     VALUE ary;
VALUE             330 ext/openssl/ossl.c VALUE dOSSL;
VALUE             348 ext/openssl/ossl.c static VALUE
VALUE             349 ext/openssl/ossl.c ossl_debug_get(VALUE self)
VALUE             354 ext/openssl/ossl.c static VALUE
VALUE             355 ext/openssl/ossl.c ossl_debug_set(VALUE self, VALUE val)
VALUE             357 ext/openssl/ossl.c     VALUE old = dOSSL;
VALUE              73 ext/openssl/ossl.h extern VALUE mOSSL;
VALUE              78 ext/openssl/ossl.h extern VALUE eOSSLError;
VALUE             111 ext/openssl/ossl.h STACK_OF(X509) *ossl_x509_ary2sk0(VALUE);
VALUE             112 ext/openssl/ossl.h STACK_OF(X509) *ossl_x509_ary2sk(VALUE);
VALUE             113 ext/openssl/ossl.h STACK_OF(X509) *ossl_protect_x509_ary2sk(VALUE,int*);
VALUE             114 ext/openssl/ossl.h VALUE ossl_x509_sk2ary(STACK_OF(X509) *certs);
VALUE             115 ext/openssl/ossl.h VALUE ossl_x509crl_sk2ary(STACK_OF(X509_CRL) *crl);
VALUE             116 ext/openssl/ossl.h VALUE ossl_buf2str(char *buf, int len);
VALUE             135 ext/openssl/ossl.h NORETURN(void ossl_raise(VALUE, const char *, ...));
VALUE             143 ext/openssl/ossl.h     VALUE proc;
VALUE             144 ext/openssl/ossl.h     VALUE preverify_ok;
VALUE             145 ext/openssl/ossl.h     VALUE store_ctx;
VALUE             148 ext/openssl/ossl.h VALUE ossl_call_verify_cb_proc(struct ossl_verify_cb_args *);
VALUE             155 ext/openssl/ossl.h VALUE ossl_to_der(VALUE);
VALUE             156 ext/openssl/ossl.h VALUE ossl_to_der_if_possible(VALUE);
VALUE             161 ext/openssl/ossl.h extern VALUE dOSSL;
VALUE              25 ext/openssl/ossl_asn1.c VALUE
VALUE              29 ext/openssl/ossl_asn1.c     VALUE argv[6];
VALUE              69 ext/openssl/ossl_asn1.c extern struct timeval rb_time_timeval(VALUE);
VALUE              72 ext/openssl/ossl_asn1.c time_to_time_t(VALUE time)
VALUE              80 ext/openssl/ossl_asn1.c VALUE
VALUE              91 ext/openssl/ossl_asn1.c VALUE
VALUE              98 ext/openssl/ossl_asn1.c     VALUE num;
VALUE             123 ext/openssl/ossl_asn1.c num_to_asn1integer(VALUE obj, ASN1_INTEGER *ai)
VALUE             144 ext/openssl/ossl_asn1.c num_to_asn1integer(VALUE obj, ASN1_INTEGER *ai)
VALUE             169 ext/openssl/ossl_asn1.c VALUE mASN1;
VALUE             170 ext/openssl/ossl_asn1.c VALUE eASN1Error;
VALUE             172 ext/openssl/ossl_asn1.c VALUE cASN1Data;
VALUE             173 ext/openssl/ossl_asn1.c VALUE cASN1Primitive;
VALUE             174 ext/openssl/ossl_asn1.c VALUE cASN1Constructive;
VALUE             176 ext/openssl/ossl_asn1.c VALUE cASN1Boolean;                           /* BOOLEAN           */
VALUE             177 ext/openssl/ossl_asn1.c VALUE cASN1Integer, cASN1Enumerated;          /* INTEGER           */
VALUE             178 ext/openssl/ossl_asn1.c VALUE cASN1BitString;                         /* BIT STRING        */
VALUE             179 ext/openssl/ossl_asn1.c VALUE cASN1OctetString, cASN1UTF8String;      /* STRINGs           */
VALUE             180 ext/openssl/ossl_asn1.c VALUE cASN1NumericString, cASN1PrintableString;
VALUE             181 ext/openssl/ossl_asn1.c VALUE cASN1T61String, cASN1VideotexString;
VALUE             182 ext/openssl/ossl_asn1.c VALUE cASN1IA5String, cASN1GraphicString;
VALUE             183 ext/openssl/ossl_asn1.c VALUE cASN1ISO64String, cASN1GeneralString;
VALUE             184 ext/openssl/ossl_asn1.c VALUE cASN1UniversalString, cASN1BMPString;
VALUE             185 ext/openssl/ossl_asn1.c VALUE cASN1Null;                              /* NULL              */
VALUE             186 ext/openssl/ossl_asn1.c VALUE cASN1ObjectId;                          /* OBJECT IDENTIFIER */
VALUE             187 ext/openssl/ossl_asn1.c VALUE cASN1UTCTime, cASN1GeneralizedTime;     /* TIME              */
VALUE             188 ext/openssl/ossl_asn1.c VALUE cASN1Sequence, cASN1Set;                /* CONSTRUCTIVE      */
VALUE             197 ext/openssl/ossl_asn1.c obj_to_asn1bool(VALUE obj)
VALUE             203 ext/openssl/ossl_asn1.c obj_to_asn1int(VALUE obj)
VALUE             209 ext/openssl/ossl_asn1.c obj_to_asn1bstr(VALUE obj, long unused_bits)
VALUE             225 ext/openssl/ossl_asn1.c obj_to_asn1str(VALUE obj)
VALUE             238 ext/openssl/ossl_asn1.c obj_to_asn1null(VALUE obj)
VALUE             251 ext/openssl/ossl_asn1.c obj_to_asn1obj(VALUE obj)
VALUE             264 ext/openssl/ossl_asn1.c obj_to_asn1utime(VALUE time)
VALUE             277 ext/openssl/ossl_asn1.c obj_to_asn1gtime(VALUE time)
VALUE             290 ext/openssl/ossl_asn1.c obj_to_asn1derstr(VALUE obj)
VALUE             293 ext/openssl/ossl_asn1.c     VALUE str;
VALUE             306 ext/openssl/ossl_asn1.c static VALUE
VALUE             319 ext/openssl/ossl_asn1.c static VALUE
VALUE             324 ext/openssl/ossl_asn1.c     VALUE ret;
VALUE             330 ext/openssl/ossl_asn1.c     ret = rb_protect((VALUE(*)_((VALUE)))asn1integer_to_num,
VALUE             331 ext/openssl/ossl_asn1.c 		     (VALUE)ai, &status);
VALUE             338 ext/openssl/ossl_asn1.c static VALUE
VALUE             344 ext/openssl/ossl_asn1.c     VALUE ret;
VALUE             364 ext/openssl/ossl_asn1.c static VALUE
VALUE             369 ext/openssl/ossl_asn1.c     VALUE ret;
VALUE             375 ext/openssl/ossl_asn1.c     ret = rb_protect((VALUE(*)_((VALUE)))asn1integer_to_num,
VALUE             376 ext/openssl/ossl_asn1.c 		     (VALUE)ai, &status);
VALUE             383 ext/openssl/ossl_asn1.c static VALUE
VALUE             397 ext/openssl/ossl_asn1.c static VALUE
VALUE             402 ext/openssl/ossl_asn1.c     VALUE ret;
VALUE             426 ext/openssl/ossl_asn1.c static VALUE
VALUE             431 ext/openssl/ossl_asn1.c     VALUE ret;
VALUE             437 ext/openssl/ossl_asn1.c     ret = rb_protect((VALUE(*)_((VALUE)))asn1time_to_time,
VALUE             438 ext/openssl/ossl_asn1.c 		     (VALUE)time, &status);
VALUE             449 ext/openssl/ossl_asn1.c     VALUE *klass;
VALUE             488 ext/openssl/ossl_asn1.c static int ossl_asn1_default_tag(VALUE obj);
VALUE             491 ext/openssl/ossl_asn1.c ossl_asn1_get_asn1type(VALUE obj)
VALUE             494 ext/openssl/ossl_asn1.c     VALUE value, rflag;
VALUE             567 ext/openssl/ossl_asn1.c ossl_asn1_default_tag(VALUE obj)
VALUE             584 ext/openssl/ossl_asn1.c ossl_asn1_tag(VALUE obj)
VALUE             586 ext/openssl/ossl_asn1.c     VALUE tag;
VALUE             596 ext/openssl/ossl_asn1.c ossl_asn1_is_explicit(VALUE obj)
VALUE             598 ext/openssl/ossl_asn1.c     VALUE s;
VALUE             617 ext/openssl/ossl_asn1.c ossl_asn1_tag_class(VALUE obj)
VALUE             619 ext/openssl/ossl_asn1.c     VALUE s;
VALUE             641 ext/openssl/ossl_asn1.c static VALUE
VALUE             654 ext/openssl/ossl_asn1.c static VALUE
VALUE             655 ext/openssl/ossl_asn1.c ossl_asn1data_initialize(VALUE self, VALUE value, VALUE tag, VALUE tag_class)
VALUE             668 ext/openssl/ossl_asn1.c static VALUE
VALUE             669 ext/openssl/ossl_asn1.c join_der_i(VALUE i, VALUE str)
VALUE             677 ext/openssl/ossl_asn1.c static VALUE
VALUE             678 ext/openssl/ossl_asn1.c join_der(VALUE enumerable)
VALUE             680 ext/openssl/ossl_asn1.c     VALUE str = rb_str_new(0, 0);
VALUE             685 ext/openssl/ossl_asn1.c static VALUE
VALUE             686 ext/openssl/ossl_asn1.c ossl_asn1data_to_der(VALUE self)
VALUE             688 ext/openssl/ossl_asn1.c     VALUE value, der;
VALUE             714 ext/openssl/ossl_asn1.c static VALUE
VALUE             721 ext/openssl/ossl_asn1.c     VALUE ary, asn1data, value, tag_class;
VALUE             731 ext/openssl/ossl_asn1.c 	    VALUE arg = rb_ary_new();
VALUE             768 ext/openssl/ossl_asn1.c 	    VALUE klass = *ossl_asn1_info[tag].klass;
VALUE             818 ext/openssl/ossl_asn1.c static VALUE
VALUE             819 ext/openssl/ossl_asn1.c ossl_asn1_traverse(VALUE self, VALUE obj)
VALUE             823 ext/openssl/ossl_asn1.c     volatile VALUE tmp;
VALUE             833 ext/openssl/ossl_asn1.c static VALUE
VALUE             834 ext/openssl/ossl_asn1.c ossl_asn1_decode(VALUE self, VALUE obj)
VALUE             836 ext/openssl/ossl_asn1.c     VALUE ret, ary;
VALUE             839 ext/openssl/ossl_asn1.c     volatile VALUE tmp;
VALUE             850 ext/openssl/ossl_asn1.c static VALUE
VALUE             851 ext/openssl/ossl_asn1.c ossl_asn1_decode_all(VALUE self, VALUE obj)
VALUE             853 ext/openssl/ossl_asn1.c     VALUE ret;
VALUE             856 ext/openssl/ossl_asn1.c     volatile VALUE tmp;
VALUE             866 ext/openssl/ossl_asn1.c static VALUE
VALUE             867 ext/openssl/ossl_asn1.c ossl_asn1_initialize(int argc, VALUE *argv, VALUE self)
VALUE             869 ext/openssl/ossl_asn1.c     VALUE value, tag, tagging, tag_class;
VALUE             923 ext/openssl/ossl_asn1.c static VALUE
VALUE             924 ext/openssl/ossl_asn1.c ossl_asn1prim_to_der(VALUE self)
VALUE             930 ext/openssl/ossl_asn1.c     VALUE str;
VALUE             962 ext/openssl/ossl_asn1.c static VALUE
VALUE             963 ext/openssl/ossl_asn1.c ossl_asn1cons_to_der(VALUE self)
VALUE             968 ext/openssl/ossl_asn1.c     VALUE value, str;
VALUE             996 ext/openssl/ossl_asn1.c static VALUE
VALUE             997 ext/openssl/ossl_asn1.c ossl_asn1cons_each(VALUE self)
VALUE            1003 ext/openssl/ossl_asn1.c static VALUE
VALUE            1004 ext/openssl/ossl_asn1.c ossl_asn1obj_s_register(VALUE self, VALUE oid, VALUE sn, VALUE ln)
VALUE            1016 ext/openssl/ossl_asn1.c static VALUE
VALUE            1017 ext/openssl/ossl_asn1.c ossl_asn1obj_get_sn(VALUE self)
VALUE            1019 ext/openssl/ossl_asn1.c     VALUE val, ret = Qnil;
VALUE            1029 ext/openssl/ossl_asn1.c static VALUE
VALUE            1030 ext/openssl/ossl_asn1.c ossl_asn1obj_get_ln(VALUE self)
VALUE            1032 ext/openssl/ossl_asn1.c     VALUE val, ret = Qnil;
VALUE            1042 ext/openssl/ossl_asn1.c static VALUE
VALUE            1043 ext/openssl/ossl_asn1.c ossl_asn1obj_get_oid(VALUE self)
VALUE            1045 ext/openssl/ossl_asn1.c     VALUE val;
VALUE            1058 ext/openssl/ossl_asn1.c static VALUE ossl_asn1_##klass(int argc, VALUE *argv, VALUE self)\
VALUE            1087 ext/openssl/ossl_asn1.c     VALUE ary;
VALUE              17 ext/openssl/ossl_asn1.h VALUE asn1time_to_time(ASN1_TIME *);
VALUE              18 ext/openssl/ossl_asn1.h time_t time_to_time_t(VALUE);
VALUE              23 ext/openssl/ossl_asn1.h VALUE asn1str_to_str(ASN1_STRING *);
VALUE              28 ext/openssl/ossl_asn1.h VALUE asn1integer_to_num(ASN1_INTEGER *);
VALUE              29 ext/openssl/ossl_asn1.h ASN1_INTEGER *num_to_asn1integer(VALUE, ASN1_INTEGER *);
VALUE              34 ext/openssl/ossl_asn1.h extern VALUE mASN1;
VALUE              35 ext/openssl/ossl_asn1.h extern VALUE eASN1Error;
VALUE              37 ext/openssl/ossl_asn1.h extern VALUE cASN1Data;
VALUE              38 ext/openssl/ossl_asn1.h extern VALUE cASN1Primitive;
VALUE              39 ext/openssl/ossl_asn1.h extern VALUE cASN1Constructive;
VALUE              41 ext/openssl/ossl_asn1.h extern VALUE cASN1Boolean;                           /* BOOLEAN           */
VALUE              42 ext/openssl/ossl_asn1.h extern VALUE cASN1Integer, cASN1Enumerated;          /* INTEGER           */
VALUE              43 ext/openssl/ossl_asn1.h extern VALUE cASN1BitString;                         /* BIT STRING        */
VALUE              44 ext/openssl/ossl_asn1.h extern VALUE cASN1OctetString, cASN1UTF8String;      /* STRINGs           */
VALUE              45 ext/openssl/ossl_asn1.h extern VALUE cASN1NumericString, cASN1PrintableString;
VALUE              46 ext/openssl/ossl_asn1.h extern VALUE cASN1T61String, cASN1VideotexString;
VALUE              47 ext/openssl/ossl_asn1.h extern VALUE cASN1IA5String, cASN1GraphicString;
VALUE              48 ext/openssl/ossl_asn1.h extern VALUE cASN1ISO64String, cASN1GeneralString;
VALUE              49 ext/openssl/ossl_asn1.h extern VALUE cASN1UniversalString, cASN1BMPString;
VALUE              50 ext/openssl/ossl_asn1.h extern VALUE cASN1Null;                              /* NULL              */
VALUE              51 ext/openssl/ossl_asn1.h extern VALUE cASN1ObjectId;                          /* OBJECT IDENTIFIER */
VALUE              52 ext/openssl/ossl_asn1.h extern VALUE cASN1UTCTime, cASN1GeneralizedTime;     /* TIME              */
VALUE              53 ext/openssl/ossl_asn1.h extern VALUE cASN1Sequence, cASN1Set;                /* CONSTRUCTIVE      */
VALUE              55 ext/openssl/ossl_asn1.h ASN1_TYPE *ossl_asn1_get_asn1type(VALUE);
VALUE              17 ext/openssl/ossl_bio.c ossl_obj2bio(VALUE obj)
VALUE              50 ext/openssl/ossl_bio.c ossl_protect_obj2bio(VALUE obj, int *status)
VALUE              53 ext/openssl/ossl_bio.c      ret = (BIO*)rb_protect((VALUE(*)_((VALUE)))ossl_obj2bio, obj, status);
VALUE              57 ext/openssl/ossl_bio.c VALUE
VALUE              60 ext/openssl/ossl_bio.c     VALUE ret;
VALUE              69 ext/openssl/ossl_bio.c VALUE
VALUE              72 ext/openssl/ossl_bio.c     return rb_protect((VALUE(*)_((VALUE)))ossl_membio2str0, (VALUE)bio, status);
VALUE              75 ext/openssl/ossl_bio.c VALUE
VALUE              78 ext/openssl/ossl_bio.c     VALUE ret;
VALUE              14 ext/openssl/ossl_bio.h BIO *ossl_obj2bio(VALUE);
VALUE              15 ext/openssl/ossl_bio.h BIO *ossl_protect_obj2bio(VALUE,int*);
VALUE              16 ext/openssl/ossl_bio.h VALUE ossl_membio2str0(BIO*);
VALUE              17 ext/openssl/ossl_bio.h VALUE ossl_membio2str(BIO*);
VALUE              18 ext/openssl/ossl_bio.h VALUE ossl_protect_membio2str(BIO*,int*);
VALUE              36 ext/openssl/ossl_bn.c VALUE cBN;
VALUE              37 ext/openssl/ossl_bn.c VALUE eBNError;
VALUE              42 ext/openssl/ossl_bn.c VALUE
VALUE              46 ext/openssl/ossl_bn.c     VALUE obj;
VALUE              58 ext/openssl/ossl_bn.c GetBNPtr(VALUE obj)
VALUE              89 ext/openssl/ossl_bn.c static VALUE
VALUE              90 ext/openssl/ossl_bn.c ossl_bn_alloc(VALUE klass)
VALUE              93 ext/openssl/ossl_bn.c     VALUE obj;
VALUE             103 ext/openssl/ossl_bn.c static VALUE
VALUE             104 ext/openssl/ossl_bn.c ossl_bn_initialize(int argc, VALUE *argv, VALUE self)
VALUE             107 ext/openssl/ossl_bn.c     VALUE str, bs;
VALUE             152 ext/openssl/ossl_bn.c static VALUE
VALUE             153 ext/openssl/ossl_bn.c ossl_bn_to_s(int argc, VALUE *argv, VALUE self)
VALUE             156 ext/openssl/ossl_bn.c     VALUE str, bs;
VALUE             192 ext/openssl/ossl_bn.c static VALUE
VALUE             193 ext/openssl/ossl_bn.c ossl_bn_to_i(VALUE self)
VALUE             197 ext/openssl/ossl_bn.c     VALUE num;
VALUE             210 ext/openssl/ossl_bn.c static VALUE
VALUE             211 ext/openssl/ossl_bn.c ossl_bn_to_bn(VALUE self)
VALUE             216 ext/openssl/ossl_bn.c static VALUE
VALUE             217 ext/openssl/ossl_bn.c ossl_bn_coerce(VALUE self, VALUE other)
VALUE             236 ext/openssl/ossl_bn.c     static VALUE					\
VALUE             237 ext/openssl/ossl_bn.c     ossl_bn_##func(VALUE self)				\
VALUE             251 ext/openssl/ossl_bn.c     static VALUE					\
VALUE             252 ext/openssl/ossl_bn.c     ossl_bn_##func(VALUE self)				\
VALUE             255 ext/openssl/ossl_bn.c 	VALUE obj;					\
VALUE             270 ext/openssl/ossl_bn.c     static VALUE					\
VALUE             271 ext/openssl/ossl_bn.c     ossl_bn_##func(VALUE self, VALUE other)		\
VALUE             274 ext/openssl/ossl_bn.c 	VALUE obj;					\
VALUE             290 ext/openssl/ossl_bn.c     static VALUE						\
VALUE             291 ext/openssl/ossl_bn.c     ossl_bn_##func(VALUE self, VALUE other)			\
VALUE             294 ext/openssl/ossl_bn.c 	VALUE obj;						\
VALUE             313 ext/openssl/ossl_bn.c static VALUE
VALUE             314 ext/openssl/ossl_bn.c ossl_bn_div(VALUE self, VALUE other)
VALUE             317 ext/openssl/ossl_bn.c     VALUE obj1, obj2;
VALUE             340 ext/openssl/ossl_bn.c     static VALUE						\
VALUE             341 ext/openssl/ossl_bn.c     ossl_bn_##func(VALUE self, VALUE other1, VALUE other2)	\
VALUE             345 ext/openssl/ossl_bn.c 	VALUE obj;						\
VALUE             363 ext/openssl/ossl_bn.c     static VALUE					\
VALUE             364 ext/openssl/ossl_bn.c     ossl_bn_##func(VALUE self, VALUE bit)		\
VALUE             377 ext/openssl/ossl_bn.c static VALUE
VALUE             378 ext/openssl/ossl_bn.c ossl_bn_is_bit_set(VALUE self, VALUE bit)
VALUE             392 ext/openssl/ossl_bn.c     static VALUE					\
VALUE             393 ext/openssl/ossl_bn.c     ossl_bn_##func(VALUE self, VALUE bits)		\
VALUE             397 ext/openssl/ossl_bn.c 	VALUE obj;					\
VALUE             414 ext/openssl/ossl_bn.c     static VALUE						\
VALUE             415 ext/openssl/ossl_bn.c     ossl_bn_s_##func(int argc, VALUE *argv, VALUE klass)	\
VALUE             419 ext/openssl/ossl_bn.c 	VALUE bits, fill, odd, obj;				\
VALUE             443 ext/openssl/ossl_bn.c     static VALUE						\
VALUE             444 ext/openssl/ossl_bn.c     ossl_bn_s_##func##_range(VALUE klass, VALUE range)		\
VALUE             447 ext/openssl/ossl_bn.c 	VALUE obj;						\
VALUE             461 ext/openssl/ossl_bn.c static VALUE
VALUE             462 ext/openssl/ossl_bn.c ossl_bn_s_generate_prime(int argc, VALUE *argv, VALUE klass)
VALUE             466 ext/openssl/ossl_bn.c     VALUE vnum, vsafe, vadd, vrem, obj;
VALUE             496 ext/openssl/ossl_bn.c     static VALUE 				\
VALUE             497 ext/openssl/ossl_bn.c     ossl_bn_##func(VALUE self)			\
VALUE             506 ext/openssl/ossl_bn.c static VALUE
VALUE             507 ext/openssl/ossl_bn.c ossl_bn_copy(VALUE self, VALUE other)
VALUE             525 ext/openssl/ossl_bn.c     static VALUE					\
VALUE             526 ext/openssl/ossl_bn.c     ossl_bn_##func(VALUE self, VALUE other)		\
VALUE             535 ext/openssl/ossl_bn.c static VALUE
VALUE             536 ext/openssl/ossl_bn.c ossl_bn_eql(VALUE self, VALUE other)
VALUE             544 ext/openssl/ossl_bn.c static VALUE
VALUE             545 ext/openssl/ossl_bn.c ossl_bn_is_prime(int argc, VALUE *argv, VALUE self)
VALUE             548 ext/openssl/ossl_bn.c     VALUE vchecks;
VALUE             567 ext/openssl/ossl_bn.c static VALUE
VALUE             568 ext/openssl/ossl_bn.c ossl_bn_is_prime_fasttest(int argc, VALUE *argv, VALUE self)
VALUE             571 ext/openssl/ossl_bn.c     VALUE vchecks, vtrivdiv;
VALUE              14 ext/openssl/ossl_bn.h extern VALUE cBN;
VALUE              15 ext/openssl/ossl_bn.h extern VALUE eBNError;
VALUE              17 ext/openssl/ossl_bn.h VALUE ossl_bn_new(BIGNUM *);
VALUE              18 ext/openssl/ossl_bn.h BIGNUM *GetBNPtr(VALUE);
VALUE              29 ext/openssl/ossl_cipher.c VALUE mCipher;
VALUE              30 ext/openssl/ossl_cipher.c VALUE cCipher;
VALUE              31 ext/openssl/ossl_cipher.c VALUE eCipherError;
VALUE              33 ext/openssl/ossl_cipher.c static VALUE ossl_cipher_alloc(VALUE klass);
VALUE              39 ext/openssl/ossl_cipher.c GetCipherPtr(VALUE obj)
VALUE              48 ext/openssl/ossl_cipher.c VALUE
VALUE              51 ext/openssl/ossl_cipher.c     VALUE ret;
VALUE              75 ext/openssl/ossl_cipher.c static VALUE
VALUE              76 ext/openssl/ossl_cipher.c ossl_cipher_alloc(VALUE klass)
VALUE              79 ext/openssl/ossl_cipher.c     VALUE obj;
VALUE              87 ext/openssl/ossl_cipher.c static VALUE
VALUE              88 ext/openssl/ossl_cipher.c ossl_cipher_initialize(VALUE self, VALUE str)
VALUE             104 ext/openssl/ossl_cipher.c static VALUE
VALUE             105 ext/openssl/ossl_cipher.c ossl_cipher_copy(VALUE self, VALUE other)
VALUE             120 ext/openssl/ossl_cipher.c static VALUE
VALUE             121 ext/openssl/ossl_cipher.c ossl_cipher_reset(VALUE self)
VALUE             132 ext/openssl/ossl_cipher.c static VALUE
VALUE             133 ext/openssl/ossl_cipher.c ossl_cipher_init(int argc, VALUE *argv, VALUE self, int mode)
VALUE             138 ext/openssl/ossl_cipher.c     VALUE pass, init_v;
VALUE             175 ext/openssl/ossl_cipher.c static VALUE
VALUE             176 ext/openssl/ossl_cipher.c ossl_cipher_encrypt(int argc, VALUE *argv, VALUE self)
VALUE             181 ext/openssl/ossl_cipher.c static VALUE
VALUE             182 ext/openssl/ossl_cipher.c ossl_cipher_decrypt(int argc, VALUE *argv, VALUE self)
VALUE             187 ext/openssl/ossl_cipher.c static VALUE
VALUE             188 ext/openssl/ossl_cipher.c ossl_cipher_pkcs5_keyivgen(int argc, VALUE *argv, VALUE self)
VALUE             192 ext/openssl/ossl_cipher.c     VALUE vpass, vsalt, viter, vdigest;
VALUE             217 ext/openssl/ossl_cipher.c static VALUE
VALUE             218 ext/openssl/ossl_cipher.c ossl_cipher_update(VALUE self, VALUE data)
VALUE             223 ext/openssl/ossl_cipher.c     VALUE str;
VALUE             240 ext/openssl/ossl_cipher.c static VALUE
VALUE             241 ext/openssl/ossl_cipher.c ossl_cipher_final(VALUE self)
VALUE             245 ext/openssl/ossl_cipher.c     VALUE str;
VALUE             258 ext/openssl/ossl_cipher.c static VALUE
VALUE             259 ext/openssl/ossl_cipher.c ossl_cipher_name(VALUE self)
VALUE             268 ext/openssl/ossl_cipher.c static VALUE
VALUE             269 ext/openssl/ossl_cipher.c ossl_cipher_set_key(VALUE self, VALUE key)
VALUE             285 ext/openssl/ossl_cipher.c static VALUE
VALUE             286 ext/openssl/ossl_cipher.c ossl_cipher_set_iv(VALUE self, VALUE iv)
VALUE             302 ext/openssl/ossl_cipher.c static VALUE
VALUE             303 ext/openssl/ossl_cipher.c ossl_cipher_set_key_length(VALUE self, VALUE key_length)
VALUE             315 ext/openssl/ossl_cipher.c static VALUE
VALUE             316 ext/openssl/ossl_cipher.c ossl_cipher_set_padding(VALUE self, VALUE padding)
VALUE             332 ext/openssl/ossl_cipher.c     static VALUE						\
VALUE             333 ext/openssl/ossl_cipher.c     ossl_cipher_##func(VALUE self)				\
VALUE              14 ext/openssl/ossl_cipher.h extern VALUE mCipher;
VALUE              15 ext/openssl/ossl_cipher.h extern VALUE cCipher;
VALUE              16 ext/openssl/ossl_cipher.h extern VALUE eCipherError;
VALUE              18 ext/openssl/ossl_cipher.h const EVP_CIPHER *GetCipherPtr(VALUE);
VALUE              19 ext/openssl/ossl_cipher.h VALUE ossl_cipher_new(const EVP_CIPHER *);
VALUE              33 ext/openssl/ossl_config.c VALUE cConfig;
VALUE              34 ext/openssl/ossl_config.c VALUE eConfigError;
VALUE              40 ext/openssl/ossl_config.c static CONF *parse_config(VALUE, CONF*);
VALUE              43 ext/openssl/ossl_config.c GetConfigPtr(VALUE obj)
VALUE              53 ext/openssl/ossl_config.c DupConfigPtr(VALUE obj)
VALUE              55 ext/openssl/ossl_config.c     VALUE str;
VALUE              67 ext/openssl/ossl_config.c parse_config(VALUE str, CONF *dst)
VALUE              91 ext/openssl/ossl_config.c static VALUE
VALUE              92 ext/openssl/ossl_config.c ossl_config_s_parse(VALUE klass, VALUE str)
VALUE              95 ext/openssl/ossl_config.c     VALUE obj;
VALUE             103 ext/openssl/ossl_config.c static VALUE
VALUE             104 ext/openssl/ossl_config.c ossl_config_s_alloc(VALUE klass)
VALUE             107 ext/openssl/ossl_config.c     VALUE obj;
VALUE             116 ext/openssl/ossl_config.c static VALUE
VALUE             117 ext/openssl/ossl_config.c ossl_config_copy(VALUE self, VALUE other)
VALUE             119 ext/openssl/ossl_config.c     VALUE str;
VALUE             129 ext/openssl/ossl_config.c static VALUE
VALUE             130 ext/openssl/ossl_config.c ossl_config_initialize(int argc, VALUE *argv, VALUE self)
VALUE             135 ext/openssl/ossl_config.c     VALUE path;
VALUE             161 ext/openssl/ossl_config.c static VALUE
VALUE             162 ext/openssl/ossl_config.c ossl_config_add_value(VALUE self, VALUE section, VALUE name, VALUE value)
VALUE             195 ext/openssl/ossl_config.c static VALUE
VALUE             196 ext/openssl/ossl_config.c ossl_config_get_value(VALUE self, VALUE section, VALUE name)
VALUE             213 ext/openssl/ossl_config.c static VALUE
VALUE             214 ext/openssl/ossl_config.c ossl_config_get_value_old(int argc, VALUE *argv, VALUE self)
VALUE             216 ext/openssl/ossl_config.c     VALUE section, name;
VALUE             232 ext/openssl/ossl_config.c static VALUE
VALUE             233 ext/openssl/ossl_config.c set_conf_section_i(VALUE i, VALUE *arg)
VALUE             235 ext/openssl/ossl_config.c     VALUE name, value;
VALUE             245 ext/openssl/ossl_config.c static VALUE
VALUE             246 ext/openssl/ossl_config.c ossl_config_set_section(VALUE self, VALUE section, VALUE hash)
VALUE             248 ext/openssl/ossl_config.c     VALUE arg[2] = { self, section };
VALUE             249 ext/openssl/ossl_config.c     rb_iterate(rb_each, hash, set_conf_section_i, (VALUE)arg);
VALUE             257 ext/openssl/ossl_config.c static VALUE
VALUE             258 ext/openssl/ossl_config.c ossl_config_get_section(VALUE self, VALUE section)
VALUE             264 ext/openssl/ossl_config.c     VALUE hash;
VALUE             285 ext/openssl/ossl_config.c static VALUE
VALUE             286 ext/openssl/ossl_config.c ossl_config_get_section_old(VALUE self, VALUE section)
VALUE             294 ext/openssl/ossl_config.c get_conf_section(CONF_VALUE *cv, VALUE ary)
VALUE             300 ext/openssl/ossl_config.c static IMPLEMENT_LHASH_DOALL_ARG_FN(get_conf_section, CONF_VALUE*, VALUE);
VALUE             302 ext/openssl/ossl_config.c static VALUE
VALUE             303 ext/openssl/ossl_config.c ossl_config_get_sections(VALUE self)
VALUE             306 ext/openssl/ossl_config.c     VALUE ary;
VALUE             316 ext/openssl/ossl_config.c dump_conf_value(CONF_VALUE *cv, VALUE str)
VALUE             338 ext/openssl/ossl_config.c static IMPLEMENT_LHASH_DOALL_ARG_FN(dump_conf_value, CONF_VALUE*, VALUE);
VALUE             340 ext/openssl/ossl_config.c static VALUE
VALUE             343 ext/openssl/ossl_config.c     VALUE str;
VALUE             351 ext/openssl/ossl_config.c static VALUE
VALUE             352 ext/openssl/ossl_config.c ossl_config_to_s(VALUE self)
VALUE             366 ext/openssl/ossl_config.c     VALUE section, name, value, args;
VALUE             384 ext/openssl/ossl_config.c static VALUE
VALUE             385 ext/openssl/ossl_config.c ossl_config_each(VALUE self)
VALUE             395 ext/openssl/ossl_config.c static VALUE
VALUE             396 ext/openssl/ossl_config.c ossl_config_get_sections(VALUE self)
VALUE             402 ext/openssl/ossl_config.c static VALUE
VALUE             403 ext/openssl/ossl_config.c ossl_config_to_s(VALUE self)
VALUE             409 ext/openssl/ossl_config.c static VALUE
VALUE             410 ext/openssl/ossl_config.c ossl_config_each(VALUE self)
VALUE             417 ext/openssl/ossl_config.c static VALUE
VALUE             418 ext/openssl/ossl_config.c ossl_config_inspect(VALUE self)
VALUE             420 ext/openssl/ossl_config.c     VALUE str, ary = ossl_config_get_sections(self);
VALUE              14 ext/openssl/ossl_config.h extern VALUE cConfig;
VALUE              15 ext/openssl/ossl_config.h extern VALUE eConfigError;
VALUE              17 ext/openssl/ossl_config.h CONF* GetConfigPtr(VALUE obj);
VALUE              18 ext/openssl/ossl_config.h CONF* DupConfigPtr(VALUE obj);
VALUE              27 ext/openssl/ossl_digest.c VALUE mDigest;
VALUE              28 ext/openssl/ossl_digest.c VALUE cDigest;
VALUE              29 ext/openssl/ossl_digest.c VALUE eDigestError;
VALUE              31 ext/openssl/ossl_digest.c static VALUE ossl_digest_alloc(VALUE klass);
VALUE              37 ext/openssl/ossl_digest.c GetDigestPtr(VALUE obj)
VALUE              46 ext/openssl/ossl_digest.c VALUE
VALUE              49 ext/openssl/ossl_digest.c     VALUE ret;
VALUE              63 ext/openssl/ossl_digest.c static VALUE
VALUE              64 ext/openssl/ossl_digest.c ossl_digest_alloc(VALUE klass)
VALUE              67 ext/openssl/ossl_digest.c     VALUE obj;
VALUE              78 ext/openssl/ossl_digest.c VALUE ossl_digest_update(VALUE, VALUE);
VALUE              80 ext/openssl/ossl_digest.c static VALUE
VALUE              81 ext/openssl/ossl_digest.c ossl_digest_initialize(int argc, VALUE *argv, VALUE self)
VALUE              86 ext/openssl/ossl_digest.c     VALUE type, data;
VALUE             104 ext/openssl/ossl_digest.c static VALUE
VALUE             105 ext/openssl/ossl_digest.c ossl_digest_copy(VALUE self, VALUE other)
VALUE             121 ext/openssl/ossl_digest.c static VALUE
VALUE             122 ext/openssl/ossl_digest.c ossl_digest_reset(VALUE self)
VALUE             132 ext/openssl/ossl_digest.c VALUE
VALUE             133 ext/openssl/ossl_digest.c ossl_digest_update(VALUE self, VALUE data)
VALUE             160 ext/openssl/ossl_digest.c static VALUE
VALUE             161 ext/openssl/ossl_digest.c ossl_digest_digest(VALUE self)
VALUE             166 ext/openssl/ossl_digest.c     VALUE digest;
VALUE             175 ext/openssl/ossl_digest.c static VALUE
VALUE             176 ext/openssl/ossl_digest.c ossl_digest_hexdigest(VALUE self)
VALUE             181 ext/openssl/ossl_digest.c     VALUE hexdigest;
VALUE             195 ext/openssl/ossl_digest.c static VALUE
VALUE             196 ext/openssl/ossl_digest.c ossl_digest_s_digest(VALUE klass, VALUE str, VALUE data)
VALUE             198 ext/openssl/ossl_digest.c     VALUE obj = rb_class_new_instance(1, &str, klass);
VALUE             205 ext/openssl/ossl_digest.c static VALUE
VALUE             206 ext/openssl/ossl_digest.c ossl_digest_s_hexdigest(VALUE klass, VALUE str, VALUE data)
VALUE             208 ext/openssl/ossl_digest.c     VALUE obj = rb_class_new_instance(1, &str, klass);
VALUE             215 ext/openssl/ossl_digest.c static VALUE
VALUE             216 ext/openssl/ossl_digest.c ossl_digest_equal(VALUE self, VALUE other)
VALUE             219 ext/openssl/ossl_digest.c     VALUE str1, str2;
VALUE             241 ext/openssl/ossl_digest.c static VALUE
VALUE             242 ext/openssl/ossl_digest.c ossl_digest_name(VALUE self)
VALUE             251 ext/openssl/ossl_digest.c static VALUE
VALUE             252 ext/openssl/ossl_digest.c ossl_digest_size(VALUE self)
VALUE              14 ext/openssl/ossl_digest.h extern VALUE mDigest;
VALUE              15 ext/openssl/ossl_digest.h extern VALUE cDigest;
VALUE              16 ext/openssl/ossl_digest.h extern VALUE eDigestError;
VALUE              18 ext/openssl/ossl_digest.h const EVP_MD *GetDigestPtr(VALUE);
VALUE              19 ext/openssl/ossl_digest.h VALUE ossl_digest_new(const EVP_MD *);
VALUE              35 ext/openssl/ossl_engine.c VALUE cEngine;
VALUE              36 ext/openssl/ossl_engine.c VALUE eEngineError;
VALUE              49 ext/openssl/ossl_engine.c static VALUE
VALUE              50 ext/openssl/ossl_engine.c ossl_engine_s_load(int argc, VALUE *argv, VALUE klass)
VALUE              55 ext/openssl/ossl_engine.c     VALUE name;
VALUE              83 ext/openssl/ossl_engine.c static VALUE
VALUE              84 ext/openssl/ossl_engine.c ossl_engine_s_cleanup(VALUE self)
VALUE              92 ext/openssl/ossl_engine.c static VALUE
VALUE              93 ext/openssl/ossl_engine.c ossl_engine_s_engines(VALUE klass)
VALUE              96 ext/openssl/ossl_engine.c     VALUE ary, obj;
VALUE             107 ext/openssl/ossl_engine.c static VALUE
VALUE             108 ext/openssl/ossl_engine.c ossl_engine_s_by_id(VALUE klass, VALUE id)
VALUE             111 ext/openssl/ossl_engine.c     VALUE obj;
VALUE             128 ext/openssl/ossl_engine.c static VALUE
VALUE             129 ext/openssl/ossl_engine.c ossl_engine_s_alloc(VALUE klass)
VALUE             132 ext/openssl/ossl_engine.c     VALUE obj;
VALUE             142 ext/openssl/ossl_engine.c static VALUE
VALUE             143 ext/openssl/ossl_engine.c ossl_engine_get_id(VALUE self)
VALUE             150 ext/openssl/ossl_engine.c static VALUE
VALUE             151 ext/openssl/ossl_engine.c ossl_engine_get_name(VALUE self)
VALUE             158 ext/openssl/ossl_engine.c static VALUE
VALUE             159 ext/openssl/ossl_engine.c ossl_engine_finish(VALUE self)
VALUE             169 ext/openssl/ossl_engine.c static VALUE
VALUE             170 ext/openssl/ossl_engine.c ossl_engine_get_cipher(VALUE self, VALUE name)
VALUE             192 ext/openssl/ossl_engine.c static VALUE
VALUE             193 ext/openssl/ossl_engine.c ossl_engine_get_digest(VALUE self, VALUE name)
VALUE             215 ext/openssl/ossl_engine.c static VALUE
VALUE             216 ext/openssl/ossl_engine.c ossl_engine_load_privkey(int argc, VALUE *argv, VALUE self)
VALUE             220 ext/openssl/ossl_engine.c     VALUE id, data, obj;
VALUE             239 ext/openssl/ossl_engine.c static VALUE
VALUE             240 ext/openssl/ossl_engine.c ossl_engine_load_pubkey(int argc, VALUE *argv, VALUE self)
VALUE             244 ext/openssl/ossl_engine.c     VALUE id, data;
VALUE             261 ext/openssl/ossl_engine.c static VALUE
VALUE             262 ext/openssl/ossl_engine.c ossl_engine_set_default(VALUE self, VALUE flag)
VALUE             273 ext/openssl/ossl_engine.c static VALUE
VALUE             274 ext/openssl/ossl_engine.c ossl_engine_ctrl_cmd(int argc, VALUE *argv, VALUE self)
VALUE             277 ext/openssl/ossl_engine.c     VALUE cmd, val;
VALUE             291 ext/openssl/ossl_engine.c static VALUE
VALUE             303 ext/openssl/ossl_engine.c static VALUE
VALUE             304 ext/openssl/ossl_engine.c ossl_engine_get_cmds(VALUE self)
VALUE             308 ext/openssl/ossl_engine.c     VALUE ary, tmp;
VALUE             325 ext/openssl/ossl_engine.c static VALUE
VALUE             326 ext/openssl/ossl_engine.c ossl_engine_inspect(VALUE self)
VALUE             328 ext/openssl/ossl_engine.c     VALUE str;
VALUE              15 ext/openssl/ossl_engine.h extern VALUE cEngine;
VALUE              16 ext/openssl/ossl_engine.h extern VALUE eEngineError;
VALUE              31 ext/openssl/ossl_hmac.c VALUE cHMAC;
VALUE              32 ext/openssl/ossl_hmac.c VALUE eHMACError;
VALUE              48 ext/openssl/ossl_hmac.c static VALUE
VALUE              49 ext/openssl/ossl_hmac.c ossl_hmac_alloc(VALUE klass)
VALUE              52 ext/openssl/ossl_hmac.c     VALUE obj;
VALUE              60 ext/openssl/ossl_hmac.c static VALUE
VALUE              61 ext/openssl/ossl_hmac.c ossl_hmac_initialize(VALUE self, VALUE key, VALUE digest)
VALUE              73 ext/openssl/ossl_hmac.c static VALUE
VALUE              74 ext/openssl/ossl_hmac.c ossl_hmac_copy(VALUE self, VALUE other)
VALUE              90 ext/openssl/ossl_hmac.c static VALUE
VALUE              91 ext/openssl/ossl_hmac.c ossl_hmac_update(VALUE self, VALUE data)
VALUE             119 ext/openssl/ossl_hmac.c static VALUE
VALUE             120 ext/openssl/ossl_hmac.c ossl_hmac_digest(VALUE self)
VALUE             125 ext/openssl/ossl_hmac.c     VALUE digest;
VALUE             134 ext/openssl/ossl_hmac.c static VALUE
VALUE             135 ext/openssl/ossl_hmac.c ossl_hmac_hexdigest(VALUE self)
VALUE             140 ext/openssl/ossl_hmac.c     VALUE hexdigest;
VALUE             154 ext/openssl/ossl_hmac.c static VALUE
VALUE             155 ext/openssl/ossl_hmac.c ossl_hmac_s_digest(VALUE klass, VALUE digest, VALUE key, VALUE data)
VALUE             168 ext/openssl/ossl_hmac.c static VALUE
VALUE             169 ext/openssl/ossl_hmac.c ossl_hmac_s_hexdigest(VALUE klass, VALUE digest, VALUE key, VALUE data)
VALUE             173 ext/openssl/ossl_hmac.c     VALUE hexdigest;
VALUE              14 ext/openssl/ossl_hmac.h extern VALUE cHMAC;
VALUE              15 ext/openssl/ossl_hmac.h extern VALUE eHMACError;
VALUE              29 ext/openssl/ossl_ns_spki.c VALUE mNetscape;
VALUE              30 ext/openssl/ossl_ns_spki.c VALUE cSPKI;
VALUE              31 ext/openssl/ossl_ns_spki.c VALUE eSPKIError;
VALUE              40 ext/openssl/ossl_ns_spki.c static VALUE
VALUE              41 ext/openssl/ossl_ns_spki.c ossl_spki_alloc(VALUE klass)
VALUE              44 ext/openssl/ossl_ns_spki.c     VALUE obj;
VALUE              54 ext/openssl/ossl_ns_spki.c static VALUE
VALUE              55 ext/openssl/ossl_ns_spki.c ossl_spki_initialize(int argc, VALUE *argv, VALUE self)
VALUE              58 ext/openssl/ossl_ns_spki.c     VALUE buffer;
VALUE              77 ext/openssl/ossl_ns_spki.c static VALUE
VALUE              78 ext/openssl/ossl_ns_spki.c ossl_spki_to_der(VALUE self)
VALUE              81 ext/openssl/ossl_ns_spki.c     VALUE str;
VALUE              97 ext/openssl/ossl_ns_spki.c static VALUE
VALUE              98 ext/openssl/ossl_ns_spki.c ossl_spki_to_pem(VALUE self)
VALUE             102 ext/openssl/ossl_ns_spki.c     VALUE str;
VALUE             113 ext/openssl/ossl_ns_spki.c static VALUE
VALUE             114 ext/openssl/ossl_ns_spki.c ossl_spki_print(VALUE self)
VALUE             119 ext/openssl/ossl_ns_spki.c     VALUE str;
VALUE             136 ext/openssl/ossl_ns_spki.c static VALUE
VALUE             137 ext/openssl/ossl_ns_spki.c ossl_spki_get_public_key(VALUE self)
VALUE             150 ext/openssl/ossl_ns_spki.c static VALUE
VALUE             151 ext/openssl/ossl_ns_spki.c ossl_spki_set_public_key(VALUE self, VALUE key)
VALUE             163 ext/openssl/ossl_ns_spki.c static VALUE
VALUE             164 ext/openssl/ossl_ns_spki.c ossl_spki_get_challenge(VALUE self)
VALUE             178 ext/openssl/ossl_ns_spki.c static VALUE
VALUE             179 ext/openssl/ossl_ns_spki.c ossl_spki_set_challenge(VALUE self, VALUE str)
VALUE             193 ext/openssl/ossl_ns_spki.c static VALUE
VALUE             194 ext/openssl/ossl_ns_spki.c ossl_spki_sign(VALUE self, VALUE key, VALUE digest)
VALUE             213 ext/openssl/ossl_ns_spki.c static VALUE
VALUE             214 ext/openssl/ossl_ns_spki.c ossl_spki_verify(VALUE self, VALUE key)
VALUE              14 ext/openssl/ossl_ns_spki.h extern VALUE mNetscape;
VALUE              15 ext/openssl/ossl_ns_spki.h extern VALUE cSPKI;
VALUE              16 ext/openssl/ossl_ns_spki.h extern VALUE eSPKIError;
VALUE              68 ext/openssl/ossl_ocsp.c VALUE mOCSP;
VALUE              69 ext/openssl/ossl_ocsp.c VALUE eOCSPError;
VALUE              70 ext/openssl/ossl_ocsp.c VALUE cOCSPReq;
VALUE              71 ext/openssl/ossl_ocsp.c VALUE cOCSPRes;
VALUE              72 ext/openssl/ossl_ocsp.c VALUE cOCSPBasicRes;
VALUE              73 ext/openssl/ossl_ocsp.c VALUE cOCSPCertId;
VALUE              78 ext/openssl/ossl_ocsp.c static VALUE
VALUE              81 ext/openssl/ossl_ocsp.c     VALUE obj;
VALUE              89 ext/openssl/ossl_ocsp.c static VALUE
VALUE              90 ext/openssl/ossl_ocsp.c ossl_ocspreq_alloc(VALUE klass)
VALUE              93 ext/openssl/ossl_ocsp.c     VALUE obj;
VALUE             102 ext/openssl/ossl_ocsp.c static VALUE
VALUE             103 ext/openssl/ossl_ocsp.c ossl_ocspreq_initialize(int argc, VALUE *argv, VALUE self)
VALUE             105 ext/openssl/ossl_ocsp.c     VALUE arg;
VALUE             122 ext/openssl/ossl_ocsp.c static VALUE
VALUE             123 ext/openssl/ossl_ocsp.c ossl_ocspreq_add_nonce(int argc, VALUE *argv, VALUE self)
VALUE             126 ext/openssl/ossl_ocsp.c     VALUE val;
VALUE             156 ext/openssl/ossl_ocsp.c static VALUE
VALUE             157 ext/openssl/ossl_ocsp.c ossl_ocspreq_check_nonce(VALUE self, VALUE basic_resp)
VALUE             170 ext/openssl/ossl_ocsp.c static VALUE
VALUE             171 ext/openssl/ossl_ocsp.c ossl_ocspreq_add_certid(VALUE self, VALUE certid)
VALUE             184 ext/openssl/ossl_ocsp.c static VALUE
VALUE             185 ext/openssl/ossl_ocsp.c ossl_ocspreq_get_certid(VALUE self)
VALUE             190 ext/openssl/ossl_ocsp.c     VALUE ary, tmp;
VALUE             207 ext/openssl/ossl_ocsp.c static VALUE
VALUE             208 ext/openssl/ossl_ocsp.c ossl_ocspreq_sign(int argc, VALUE *argv, VALUE self)
VALUE             210 ext/openssl/ossl_ocsp.c     VALUE signer_cert, signer_key, certs, flags;
VALUE             235 ext/openssl/ossl_ocsp.c static VALUE
VALUE             236 ext/openssl/ossl_ocsp.c ossl_ocspreq_verify(int argc, VALUE *argv, VALUE self)
VALUE             238 ext/openssl/ossl_ocsp.c     VALUE certs, store, flags;
VALUE             256 ext/openssl/ossl_ocsp.c static VALUE
VALUE             257 ext/openssl/ossl_ocsp.c ossl_ocspreq_to_der(VALUE self)
VALUE             260 ext/openssl/ossl_ocsp.c     VALUE str;
VALUE             279 ext/openssl/ossl_ocsp.c static VALUE
VALUE             280 ext/openssl/ossl_ocsp.c ossl_ocspres_s_create(VALUE klass, VALUE status, VALUE basic_resp)
VALUE             284 ext/openssl/ossl_ocsp.c     VALUE obj;
VALUE             296 ext/openssl/ossl_ocsp.c static VALUE
VALUE             297 ext/openssl/ossl_ocsp.c ossl_ocspres_alloc(VALUE klass)
VALUE             300 ext/openssl/ossl_ocsp.c     VALUE obj;
VALUE             309 ext/openssl/ossl_ocsp.c static VALUE
VALUE             310 ext/openssl/ossl_ocsp.c ossl_ocspres_initialize(int argc, VALUE *argv, VALUE self)
VALUE             312 ext/openssl/ossl_ocsp.c     VALUE arg;
VALUE             329 ext/openssl/ossl_ocsp.c static VALUE
VALUE             330 ext/openssl/ossl_ocsp.c ossl_ocspres_status(VALUE self)
VALUE             341 ext/openssl/ossl_ocsp.c static VALUE
VALUE             342 ext/openssl/ossl_ocsp.c ossl_ocspres_status_string(VALUE self)
VALUE             353 ext/openssl/ossl_ocsp.c static VALUE
VALUE             354 ext/openssl/ossl_ocsp.c ossl_ocspres_get_basic(VALUE self)
VALUE             358 ext/openssl/ossl_ocsp.c     VALUE ret;
VALUE             368 ext/openssl/ossl_ocsp.c static VALUE
VALUE             369 ext/openssl/ossl_ocsp.c ossl_ocspres_to_der(VALUE self)
VALUE             372 ext/openssl/ossl_ocsp.c     VALUE str;
VALUE             391 ext/openssl/ossl_ocsp.c static VALUE
VALUE             392 ext/openssl/ossl_ocsp.c ossl_ocspbres_alloc(VALUE klass)
VALUE             395 ext/openssl/ossl_ocsp.c     VALUE obj;
VALUE             404 ext/openssl/ossl_ocsp.c static VALUE
VALUE             405 ext/openssl/ossl_ocsp.c ossl_ocspbres_initialize(int argc, VALUE *argv, VALUE self)
VALUE             410 ext/openssl/ossl_ocsp.c static VALUE
VALUE             411 ext/openssl/ossl_ocsp.c ossl_ocspbres_copy_nonce(VALUE self, VALUE request)
VALUE             424 ext/openssl/ossl_ocsp.c static VALUE
VALUE             425 ext/openssl/ossl_ocsp.c ossl_ocspbres_add_nonce(int argc, VALUE *argv, VALUE self)
VALUE             428 ext/openssl/ossl_ocsp.c     VALUE val;
VALUE             446 ext/openssl/ossl_ocsp.c static VALUE
VALUE             447 ext/openssl/ossl_ocsp.c ossl_ocspbres_add_status(VALUE self, VALUE cid, VALUE status,
VALUE             448 ext/openssl/ossl_ocsp.c 			 VALUE reason, VALUE revtime,
VALUE             449 ext/openssl/ossl_ocsp.c 			 VALUE thisupd, VALUE nextupd, VALUE ext)
VALUE             457 ext/openssl/ossl_ocsp.c     VALUE tmp;
VALUE             514 ext/openssl/ossl_ocsp.c static VALUE
VALUE             515 ext/openssl/ossl_ocsp.c ossl_ocspbres_get_status(VALUE self)
VALUE             523 ext/openssl/ossl_ocsp.c     VALUE ret, ary, ext;
VALUE             559 ext/openssl/ossl_ocsp.c static VALUE
VALUE             560 ext/openssl/ossl_ocsp.c ossl_ocspbres_sign(int argc, VALUE *argv, VALUE self)
VALUE             562 ext/openssl/ossl_ocsp.c     VALUE signer_cert, signer_key, certs, flags;
VALUE             589 ext/openssl/ossl_ocsp.c static VALUE
VALUE             590 ext/openssl/ossl_ocsp.c ossl_ocspbres_verify(int argc, VALUE *argv, VALUE self)
VALUE             592 ext/openssl/ossl_ocsp.c     VALUE certs, store, flags;
VALUE             613 ext/openssl/ossl_ocsp.c static VALUE
VALUE             614 ext/openssl/ossl_ocsp.c ossl_ocspcid_alloc(VALUE klass)
VALUE             617 ext/openssl/ossl_ocsp.c     VALUE obj;
VALUE             626 ext/openssl/ossl_ocsp.c static VALUE
VALUE             627 ext/openssl/ossl_ocsp.c ossl_ocspcid_initialize(VALUE self, VALUE subject, VALUE issuer)
VALUE             643 ext/openssl/ossl_ocsp.c static VALUE
VALUE             644 ext/openssl/ossl_ocsp.c ossl_ocspcid_cmp(VALUE self, VALUE other)
VALUE             656 ext/openssl/ossl_ocsp.c static VALUE
VALUE             657 ext/openssl/ossl_ocsp.c ossl_ocspcid_cmp_issuer(VALUE self, VALUE other)
VALUE             669 ext/openssl/ossl_ocsp.c static VALUE
VALUE             670 ext/openssl/ossl_ocsp.c ossl_ocspcid_get_serial(VALUE self)
VALUE              16 ext/openssl/ossl_ocsp.h extern VALUE mOCSP;
VALUE              17 ext/openssl/ossl_ocsp.h extern VALUE cOPCSReq;
VALUE              18 ext/openssl/ossl_ocsp.h extern VALUE cOPCSRes;
VALUE              19 ext/openssl/ossl_ocsp.h extern VALUE cOPCSBasicRes;
VALUE              33 ext/openssl/ossl_pkcs12.c VALUE mPKCS12;
VALUE              34 ext/openssl/ossl_pkcs12.c VALUE cPKCS12;
VALUE              35 ext/openssl/ossl_pkcs12.c VALUE ePKCS12Error;
VALUE              40 ext/openssl/ossl_pkcs12.c static VALUE
VALUE              41 ext/openssl/ossl_pkcs12.c ossl_pkcs12_s_allocate(VALUE klass)
VALUE              44 ext/openssl/ossl_pkcs12.c     VALUE obj;
VALUE              52 ext/openssl/ossl_pkcs12.c static VALUE
VALUE              53 ext/openssl/ossl_pkcs12.c ossl_pkcs12_s_create(int argc, VALUE *argv, VALUE self)
VALUE              55 ext/openssl/ossl_pkcs12.c     VALUE pass, name, pkey, cert, ca;
VALUE              56 ext/openssl/ossl_pkcs12.c     VALUE obj;
VALUE              78 ext/openssl/ossl_pkcs12.c static VALUE
VALUE              79 ext/openssl/ossl_pkcs12.c ossl_pkcs12_initialize(int argc, VALUE *argv, VALUE self)
VALUE              82 ext/openssl/ossl_pkcs12.c     VALUE arg, pass, pkey, cert, ca;
VALUE              98 ext/openssl/ossl_pkcs12.c     pkey = rb_protect((VALUE(*)_((VALUE)))ossl_pkey_new, (VALUE)key,
VALUE             101 ext/openssl/ossl_pkcs12.c     cert = rb_protect((VALUE(*)_((VALUE)))ossl_x509_new, (VALUE)x509, &st);
VALUE             105 ext/openssl/ossl_pkcs12.c 	    rb_protect((VALUE(*)_((VALUE)))ossl_x509_sk2ary, (VALUE)x509s, &st);
VALUE             120 ext/openssl/ossl_pkcs12.c static VALUE
VALUE             121 ext/openssl/ossl_pkcs12.c ossl_pkcs12_to_der(VALUE self)
VALUE             124 ext/openssl/ossl_pkcs12.c     VALUE str;
VALUE               9 ext/openssl/ossl_pkcs12.h extern VALUE mPKCS12;
VALUE              10 ext/openssl/ossl_pkcs12.h extern VALUE cPKCS12;
VALUE              11 ext/openssl/ossl_pkcs12.h extern VALUE ePKCS12Error;
VALUE              74 ext/openssl/ossl_pkcs7.c VALUE mPKCS7;
VALUE              75 ext/openssl/ossl_pkcs7.c VALUE cPKCS7;
VALUE              76 ext/openssl/ossl_pkcs7.c VALUE cPKCS7Signer;
VALUE              77 ext/openssl/ossl_pkcs7.c VALUE cPKCS7Recipient;
VALUE              78 ext/openssl/ossl_pkcs7.c VALUE ePKCS7Error;
VALUE              84 ext/openssl/ossl_pkcs7.c static VALUE
VALUE              88 ext/openssl/ossl_pkcs7.c     VALUE obj;
VALUE              98 ext/openssl/ossl_pkcs7.c DupPKCS7SignerPtr(VALUE obj)
VALUE             110 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             114 ext/openssl/ossl_pkcs7.c     VALUE obj;
VALUE             124 ext/openssl/ossl_pkcs7.c DupPKCS7RecipientPtr(VALUE obj)
VALUE             139 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             140 ext/openssl/ossl_pkcs7.c ossl_pkcs7_s_read_smime(VALUE klass, VALUE arg)
VALUE             144 ext/openssl/ossl_pkcs7.c     VALUE ret, data;
VALUE             159 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             160 ext/openssl/ossl_pkcs7.c ossl_pkcs7_s_write_smime(int argc, VALUE *argv, VALUE klass)
VALUE             162 ext/openssl/ossl_pkcs7.c     VALUE pkcs7, data, flags;
VALUE             165 ext/openssl/ossl_pkcs7.c     VALUE str;
VALUE             190 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             191 ext/openssl/ossl_pkcs7.c ossl_pkcs7_s_sign(int argc, VALUE *argv, VALUE klass)
VALUE             193 ext/openssl/ossl_pkcs7.c     VALUE cert, key, data, certs, flags;
VALUE             200 ext/openssl/ossl_pkcs7.c     VALUE ret;
VALUE             229 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             230 ext/openssl/ossl_pkcs7.c ossl_pkcs7_s_encrypt(int argc, VALUE *argv, VALUE klass)
VALUE             232 ext/openssl/ossl_pkcs7.c     VALUE certs, data, cipher, flags;
VALUE             237 ext/openssl/ossl_pkcs7.c     VALUE ret;
VALUE             276 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             277 ext/openssl/ossl_pkcs7.c ossl_pkcs7_alloc(VALUE klass)
VALUE             280 ext/openssl/ossl_pkcs7.c     VALUE obj;
VALUE             290 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             291 ext/openssl/ossl_pkcs7.c ossl_pkcs7_initialize(int argc, VALUE *argv, VALUE self)
VALUE             295 ext/openssl/ossl_pkcs7.c     VALUE arg;
VALUE             313 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             314 ext/openssl/ossl_pkcs7.c ossl_pkcs7_copy(VALUE self, VALUE other)
VALUE             335 ext/openssl/ossl_pkcs7.c ossl_pkcs7_sym2typeid(VALUE sym)
VALUE             367 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             368 ext/openssl/ossl_pkcs7.c ossl_pkcs7_set_type(VALUE self, VALUE type)
VALUE             379 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             380 ext/openssl/ossl_pkcs7.c ossl_pkcs7_get_type(VALUE self)
VALUE             398 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             399 ext/openssl/ossl_pkcs7.c ossl_pkcs7_set_detached(VALUE self, VALUE flag)
VALUE             412 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             413 ext/openssl/ossl_pkcs7.c ossl_pkcs7_get_detached(VALUE self)
VALUE             420 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             421 ext/openssl/ossl_pkcs7.c ossl_pkcs7_detached_p(VALUE self)
VALUE             428 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             429 ext/openssl/ossl_pkcs7.c ossl_pkcs7_set_cipher(VALUE self, VALUE cipher)
VALUE             441 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             442 ext/openssl/ossl_pkcs7.c ossl_pkcs7_add_signer(VALUE self, VALUE signer)
VALUE             461 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             462 ext/openssl/ossl_pkcs7.c ossl_pkcs7_get_signer(VALUE self)
VALUE             468 ext/openssl/ossl_pkcs7.c     VALUE ary;
VALUE             487 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             488 ext/openssl/ossl_pkcs7.c ossl_pkcs7_add_recipient(VALUE self, VALUE recip)
VALUE             503 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             504 ext/openssl/ossl_pkcs7.c ossl_pkcs7_get_recipient(VALUE self)
VALUE             510 ext/openssl/ossl_pkcs7.c     VALUE ary;
VALUE             531 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             532 ext/openssl/ossl_pkcs7.c ossl_pkcs7_add_certificate(VALUE self, VALUE cert)
VALUE             547 ext/openssl/ossl_pkcs7.c pkcs7_get_certs_or_crls(VALUE self, int want_certs)
VALUE             572 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             573 ext/openssl/ossl_pkcs7.c ossl_pkcs7_set_certs_i(VALUE i, VALUE arg)
VALUE             578 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             579 ext/openssl/ossl_pkcs7.c ossl_pkcs7_set_certificates(VALUE self, VALUE ary)
VALUE             591 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             592 ext/openssl/ossl_pkcs7.c ossl_pkcs7_get_certificates(VALUE self)
VALUE             597 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             598 ext/openssl/ossl_pkcs7.c ossl_pkcs7_add_crl(VALUE self, VALUE crl)
VALUE             612 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             613 ext/openssl/ossl_pkcs7.c ossl_pkcs7_set_crls_i(VALUE i, VALUE arg)
VALUE             618 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             619 ext/openssl/ossl_pkcs7.c ossl_pkcs7_set_crls(VALUE self, VALUE ary)
VALUE             631 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             632 ext/openssl/ossl_pkcs7.c ossl_pkcs7_get_crls(VALUE self)
VALUE             637 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             638 ext/openssl/ossl_pkcs7.c ossl_pkcs7_verify(int argc, VALUE *argv, VALUE self)
VALUE             640 ext/openssl/ossl_pkcs7.c     VALUE certs, store, indata, flags;
VALUE             646 ext/openssl/ossl_pkcs7.c     VALUE data;
VALUE             679 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             680 ext/openssl/ossl_pkcs7.c ossl_pkcs7_decrypt(int argc, VALUE *argv, VALUE self)
VALUE             682 ext/openssl/ossl_pkcs7.c     VALUE pkey, cert, flags;
VALUE             688 ext/openssl/ossl_pkcs7.c     VALUE str;
VALUE             706 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             707 ext/openssl/ossl_pkcs7.c ossl_pkcs7_add_data(VALUE self, VALUE data)
VALUE             740 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             741 ext/openssl/ossl_pkcs7.c ossl_pkcs7_to_der(VALUE self)
VALUE             744 ext/openssl/ossl_pkcs7.c     VALUE str;
VALUE             760 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             761 ext/openssl/ossl_pkcs7.c ossl_pkcs7_to_pem(VALUE self)
VALUE             765 ext/openssl/ossl_pkcs7.c     VALUE str;
VALUE             783 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             784 ext/openssl/ossl_pkcs7.c ossl_pkcs7si_alloc(VALUE klass)
VALUE             787 ext/openssl/ossl_pkcs7.c     VALUE obj;
VALUE             797 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             798 ext/openssl/ossl_pkcs7.c ossl_pkcs7si_initialize(VALUE self, VALUE cert, VALUE key, VALUE digest)
VALUE             816 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             817 ext/openssl/ossl_pkcs7.c ossl_pkcs7si_get_issuer(VALUE self)
VALUE             826 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             827 ext/openssl/ossl_pkcs7.c ossl_pkcs7si_get_serial(VALUE self)
VALUE             836 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             837 ext/openssl/ossl_pkcs7.c ossl_pkcs7si_get_signed_time(VALUE self)
VALUE             862 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             863 ext/openssl/ossl_pkcs7.c ossl_pkcs7ri_alloc(VALUE klass)
VALUE             866 ext/openssl/ossl_pkcs7.c     VALUE obj;
VALUE             876 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             877 ext/openssl/ossl_pkcs7.c ossl_pkcs7ri_initialize(VALUE self, VALUE cert)
VALUE             891 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             892 ext/openssl/ossl_pkcs7.c ossl_pkcs7ri_get_issuer(VALUE self)
VALUE             901 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             902 ext/openssl/ossl_pkcs7.c ossl_pkcs7ri_get_serial(VALUE self)
VALUE             911 ext/openssl/ossl_pkcs7.c static VALUE
VALUE             912 ext/openssl/ossl_pkcs7.c ossl_pkcs7ri_get_enc_key(VALUE self)
VALUE              14 ext/openssl/ossl_pkcs7.h extern VALUE mPKCS7;
VALUE              15 ext/openssl/ossl_pkcs7.h extern VALUE cPKCS7;
VALUE              16 ext/openssl/ossl_pkcs7.h extern VALUE cPKCS7Signer;
VALUE              17 ext/openssl/ossl_pkcs7.h extern VALUE cPKCS7Recipient;
VALUE              18 ext/openssl/ossl_pkcs7.h extern VALUE ePKCS7Error;
VALUE              16 ext/openssl/ossl_pkey.c VALUE mPKey;
VALUE              17 ext/openssl/ossl_pkey.c VALUE cPKey;
VALUE              18 ext/openssl/ossl_pkey.c VALUE ePKeyError;
VALUE              27 ext/openssl/ossl_pkey.c     VALUE ary;
VALUE              39 ext/openssl/ossl_pkey.c VALUE
VALUE              64 ext/openssl/ossl_pkey.c VALUE
VALUE              65 ext/openssl/ossl_pkey.c ossl_pkey_new_from_file(VALUE filename)
VALUE              85 ext/openssl/ossl_pkey.c GetPKeyPtr(VALUE obj)
VALUE              95 ext/openssl/ossl_pkey.c GetPrivPKeyPtr(VALUE obj)
VALUE             108 ext/openssl/ossl_pkey.c DupPKeyPtr(VALUE obj)
VALUE             119 ext/openssl/ossl_pkey.c DupPrivPKeyPtr(VALUE obj)
VALUE             135 ext/openssl/ossl_pkey.c static VALUE
VALUE             136 ext/openssl/ossl_pkey.c ossl_pkey_alloc(VALUE klass)
VALUE             139 ext/openssl/ossl_pkey.c     VALUE obj;
VALUE             149 ext/openssl/ossl_pkey.c static VALUE
VALUE             150 ext/openssl/ossl_pkey.c ossl_pkey_initialize(VALUE self)
VALUE             158 ext/openssl/ossl_pkey.c static VALUE
VALUE             159 ext/openssl/ossl_pkey.c ossl_pkey_sign(VALUE self, VALUE digest, VALUE data)
VALUE             164 ext/openssl/ossl_pkey.c     VALUE str;
VALUE             183 ext/openssl/ossl_pkey.c static VALUE
VALUE             184 ext/openssl/ossl_pkey.c ossl_pkey_verify(VALUE self, VALUE digest, VALUE sig, VALUE data)
VALUE              14 ext/openssl/ossl_pkey.h extern VALUE mPKey;
VALUE              15 ext/openssl/ossl_pkey.h extern VALUE cPKey;
VALUE              16 ext/openssl/ossl_pkey.h extern VALUE ePKeyError;
VALUE              43 ext/openssl/ossl_pkey.h VALUE ossl_pkey_new(EVP_PKEY *);
VALUE              44 ext/openssl/ossl_pkey.h VALUE ossl_pkey_new_from_file(VALUE);
VALUE              45 ext/openssl/ossl_pkey.h EVP_PKEY *GetPKeyPtr(VALUE);
VALUE              46 ext/openssl/ossl_pkey.h EVP_PKEY *DupPKeyPtr(VALUE);
VALUE              47 ext/openssl/ossl_pkey.h EVP_PKEY *GetPrivPKeyPtr(VALUE);
VALUE              48 ext/openssl/ossl_pkey.h EVP_PKEY *DupPrivPKeyPtr(VALUE);
VALUE              54 ext/openssl/ossl_pkey.h extern VALUE cRSA;
VALUE              55 ext/openssl/ossl_pkey.h extern VALUE eRSAError;
VALUE              57 ext/openssl/ossl_pkey.h VALUE ossl_rsa_new(EVP_PKEY *);
VALUE              63 ext/openssl/ossl_pkey.h extern VALUE cDSA;
VALUE              64 ext/openssl/ossl_pkey.h extern VALUE eDSAError;
VALUE              66 ext/openssl/ossl_pkey.h VALUE ossl_dsa_new(EVP_PKEY *);
VALUE              72 ext/openssl/ossl_pkey.h extern VALUE cDH;
VALUE              73 ext/openssl/ossl_pkey.h extern VALUE eDHError;
VALUE              77 ext/openssl/ossl_pkey.h VALUE ossl_dh_new(EVP_PKEY *);
VALUE              81 ext/openssl/ossl_pkey.h static VALUE ossl_##keytype##_get_##name(VALUE self)			\
VALUE              92 ext/openssl/ossl_pkey.h static VALUE ossl_##keytype##_set_##name(VALUE self, VALUE bignum)	\
VALUE              34 ext/openssl/ossl_pkey_dh.c VALUE cDH;
VALUE              35 ext/openssl/ossl_pkey_dh.c VALUE eDHError;
VALUE              40 ext/openssl/ossl_pkey_dh.c static VALUE
VALUE              41 ext/openssl/ossl_pkey_dh.c dh_instance(VALUE klass, DH *dh)
VALUE              44 ext/openssl/ossl_pkey_dh.c     VALUE obj;
VALUE              61 ext/openssl/ossl_pkey_dh.c VALUE
VALUE              64 ext/openssl/ossl_pkey_dh.c     VALUE obj;
VALUE             102 ext/openssl/ossl_pkey_dh.c static VALUE
VALUE             103 ext/openssl/ossl_pkey_dh.c ossl_dh_s_generate(int argc, VALUE *argv, VALUE klass)
VALUE             107 ext/openssl/ossl_pkey_dh.c     VALUE size, gen, obj;
VALUE             122 ext/openssl/ossl_pkey_dh.c static VALUE
VALUE             123 ext/openssl/ossl_pkey_dh.c ossl_dh_initialize(int argc, VALUE *argv, VALUE self)
VALUE             129 ext/openssl/ossl_pkey_dh.c     VALUE arg, gen;
VALUE             161 ext/openssl/ossl_pkey_dh.c static VALUE
VALUE             162 ext/openssl/ossl_pkey_dh.c ossl_dh_is_public(VALUE self)
VALUE             174 ext/openssl/ossl_pkey_dh.c static VALUE
VALUE             175 ext/openssl/ossl_pkey_dh.c ossl_dh_is_private(VALUE self)
VALUE             184 ext/openssl/ossl_pkey_dh.c static VALUE
VALUE             185 ext/openssl/ossl_pkey_dh.c ossl_dh_export(VALUE self)
VALUE             189 ext/openssl/ossl_pkey_dh.c     VALUE str;
VALUE             204 ext/openssl/ossl_pkey_dh.c static VALUE
VALUE             205 ext/openssl/ossl_pkey_dh.c ossl_dh_to_der(VALUE self)
VALUE             210 ext/openssl/ossl_pkey_dh.c     VALUE str;
VALUE             229 ext/openssl/ossl_pkey_dh.c static VALUE
VALUE             230 ext/openssl/ossl_pkey_dh.c ossl_dh_get_params(VALUE self)
VALUE             233 ext/openssl/ossl_pkey_dh.c     VALUE hash;
VALUE             252 ext/openssl/ossl_pkey_dh.c static VALUE
VALUE             253 ext/openssl/ossl_pkey_dh.c ossl_dh_to_text(VALUE self)
VALUE             257 ext/openssl/ossl_pkey_dh.c     VALUE str;
VALUE             275 ext/openssl/ossl_pkey_dh.c static VALUE
VALUE             276 ext/openssl/ossl_pkey_dh.c ossl_dh_to_public_key(VALUE self)
VALUE             280 ext/openssl/ossl_pkey_dh.c     VALUE obj;
VALUE             293 ext/openssl/ossl_pkey_dh.c static VALUE
VALUE             294 ext/openssl/ossl_pkey_dh.c ossl_dh_check_params(VALUE self)
VALUE             310 ext/openssl/ossl_pkey_dh.c static VALUE
VALUE             311 ext/openssl/ossl_pkey_dh.c ossl_dh_generate_key(VALUE self)
VALUE             324 ext/openssl/ossl_pkey_dh.c static VALUE
VALUE             325 ext/openssl/ossl_pkey_dh.c ossl_dh_compute_key(VALUE self, VALUE pub)
VALUE             330 ext/openssl/ossl_pkey_dh.c     VALUE str;
VALUE              28 ext/openssl/ossl_pkey_dsa.c VALUE cDSA;
VALUE              29 ext/openssl/ossl_pkey_dsa.c VALUE eDSAError;
VALUE              34 ext/openssl/ossl_pkey_dsa.c static VALUE
VALUE              35 ext/openssl/ossl_pkey_dsa.c dsa_instance(VALUE klass, DSA *dsa)
VALUE              38 ext/openssl/ossl_pkey_dsa.c     VALUE obj;
VALUE              55 ext/openssl/ossl_pkey_dsa.c VALUE
VALUE              58 ext/openssl/ossl_pkey_dsa.c     VALUE obj;
VALUE             102 ext/openssl/ossl_pkey_dsa.c static VALUE
VALUE             103 ext/openssl/ossl_pkey_dsa.c ossl_dsa_s_generate(VALUE klass, VALUE size)
VALUE             106 ext/openssl/ossl_pkey_dsa.c     VALUE obj = dsa_instance(klass, dsa);
VALUE             116 ext/openssl/ossl_pkey_dsa.c static VALUE
VALUE             117 ext/openssl/ossl_pkey_dsa.c ossl_dsa_initialize(int argc, VALUE *argv, VALUE self)
VALUE             123 ext/openssl/ossl_pkey_dsa.c     VALUE arg, pass;
VALUE             166 ext/openssl/ossl_pkey_dsa.c static VALUE
VALUE             167 ext/openssl/ossl_pkey_dsa.c ossl_dsa_is_public(VALUE self)
VALUE             180 ext/openssl/ossl_pkey_dsa.c static VALUE
VALUE             181 ext/openssl/ossl_pkey_dsa.c ossl_dsa_is_private(VALUE self)
VALUE             190 ext/openssl/ossl_pkey_dsa.c static VALUE
VALUE             191 ext/openssl/ossl_pkey_dsa.c ossl_dsa_export(int argc, VALUE *argv, VALUE self)
VALUE             197 ext/openssl/ossl_pkey_dsa.c     VALUE cipher, pass, str;
VALUE             227 ext/openssl/ossl_pkey_dsa.c static VALUE
VALUE             228 ext/openssl/ossl_pkey_dsa.c ossl_dsa_to_der(VALUE self)
VALUE             234 ext/openssl/ossl_pkey_dsa.c     VALUE str;
VALUE             257 ext/openssl/ossl_pkey_dsa.c static VALUE
VALUE             258 ext/openssl/ossl_pkey_dsa.c ossl_dsa_get_params(VALUE self)
VALUE             261 ext/openssl/ossl_pkey_dsa.c     VALUE hash;
VALUE             281 ext/openssl/ossl_pkey_dsa.c static VALUE
VALUE             282 ext/openssl/ossl_pkey_dsa.c ossl_dsa_to_text(VALUE self)
VALUE             286 ext/openssl/ossl_pkey_dsa.c     VALUE str;
VALUE             304 ext/openssl/ossl_pkey_dsa.c static VALUE
VALUE             305 ext/openssl/ossl_pkey_dsa.c ossl_dsa_to_public_key(VALUE self)
VALUE             309 ext/openssl/ossl_pkey_dsa.c     VALUE obj;
VALUE             324 ext/openssl/ossl_pkey_dsa.c static VALUE
VALUE             325 ext/openssl/ossl_pkey_dsa.c ossl_dsa_sign(VALUE self, VALUE data)
VALUE             329 ext/openssl/ossl_pkey_dsa.c     VALUE str;
VALUE             347 ext/openssl/ossl_pkey_dsa.c static VALUE
VALUE             348 ext/openssl/ossl_pkey_dsa.c ossl_dsa_verify(VALUE self, VALUE digest, VALUE sig)
VALUE              28 ext/openssl/ossl_pkey_rsa.c VALUE cRSA;
VALUE              29 ext/openssl/ossl_pkey_rsa.c VALUE eRSAError;
VALUE              34 ext/openssl/ossl_pkey_rsa.c static VALUE
VALUE              35 ext/openssl/ossl_pkey_rsa.c rsa_instance(VALUE klass, RSA *rsa)
VALUE              38 ext/openssl/ossl_pkey_rsa.c     VALUE obj;
VALUE              55 ext/openssl/ossl_pkey_rsa.c VALUE
VALUE              58 ext/openssl/ossl_pkey_rsa.c     VALUE obj;
VALUE              87 ext/openssl/ossl_pkey_rsa.c static VALUE
VALUE              88 ext/openssl/ossl_pkey_rsa.c ossl_rsa_s_generate(int argc, VALUE *argv, VALUE klass)
VALUE              91 ext/openssl/ossl_pkey_rsa.c     VALUE size, exp;
VALUE              92 ext/openssl/ossl_pkey_rsa.c     VALUE obj;
VALUE             107 ext/openssl/ossl_pkey_rsa.c static VALUE
VALUE             108 ext/openssl/ossl_pkey_rsa.c ossl_rsa_initialize(int argc, VALUE *argv, VALUE self)
VALUE             114 ext/openssl/ossl_pkey_rsa.c     VALUE arg, pass;
VALUE             160 ext/openssl/ossl_pkey_rsa.c static VALUE
VALUE             161 ext/openssl/ossl_pkey_rsa.c ossl_rsa_is_public(VALUE self)
VALUE             173 ext/openssl/ossl_pkey_rsa.c static VALUE
VALUE             174 ext/openssl/ossl_pkey_rsa.c ossl_rsa_is_private(VALUE self)
VALUE             183 ext/openssl/ossl_pkey_rsa.c static VALUE
VALUE             184 ext/openssl/ossl_pkey_rsa.c ossl_rsa_export(int argc, VALUE *argv, VALUE self)
VALUE             190 ext/openssl/ossl_pkey_rsa.c     VALUE cipher, pass, str;
VALUE             222 ext/openssl/ossl_pkey_rsa.c static VALUE
VALUE             223 ext/openssl/ossl_pkey_rsa.c ossl_rsa_to_der(VALUE self)
VALUE             229 ext/openssl/ossl_pkey_rsa.c     VALUE str;
VALUE             249 ext/openssl/ossl_pkey_rsa.c static VALUE
VALUE             250 ext/openssl/ossl_pkey_rsa.c ossl_rsa_public_encrypt(int argc, VALUE *argv, VALUE self)
VALUE             254 ext/openssl/ossl_pkey_rsa.c     VALUE str, buffer, padding;
VALUE             271 ext/openssl/ossl_pkey_rsa.c static VALUE
VALUE             272 ext/openssl/ossl_pkey_rsa.c ossl_rsa_public_decrypt(int argc, VALUE *argv, VALUE self)
VALUE             276 ext/openssl/ossl_pkey_rsa.c     VALUE str, buffer, padding;
VALUE             293 ext/openssl/ossl_pkey_rsa.c static VALUE
VALUE             294 ext/openssl/ossl_pkey_rsa.c ossl_rsa_private_encrypt(int argc, VALUE *argv, VALUE self)
VALUE             298 ext/openssl/ossl_pkey_rsa.c     VALUE str, buffer, padding;
VALUE             318 ext/openssl/ossl_pkey_rsa.c static VALUE
VALUE             319 ext/openssl/ossl_pkey_rsa.c ossl_rsa_private_decrypt(int argc, VALUE *argv, VALUE self)
VALUE             323 ext/openssl/ossl_pkey_rsa.c     VALUE str, buffer, padding;
VALUE             348 ext/openssl/ossl_pkey_rsa.c static VALUE
VALUE             349 ext/openssl/ossl_pkey_rsa.c ossl_rsa_get_params(VALUE self)
VALUE             352 ext/openssl/ossl_pkey_rsa.c     VALUE hash;
VALUE             375 ext/openssl/ossl_pkey_rsa.c static VALUE
VALUE             376 ext/openssl/ossl_pkey_rsa.c ossl_rsa_to_text(VALUE self)
VALUE             380 ext/openssl/ossl_pkey_rsa.c     VALUE str;
VALUE             398 ext/openssl/ossl_pkey_rsa.c static VALUE
VALUE             399 ext/openssl/ossl_pkey_rsa.c ossl_rsa_to_public_key(VALUE self)
VALUE             403 ext/openssl/ossl_pkey_rsa.c     VALUE obj;
VALUE              16 ext/openssl/ossl_rand.c VALUE mRandom;
VALUE              17 ext/openssl/ossl_rand.c VALUE eRandomError;
VALUE              30 ext/openssl/ossl_rand.c static VALUE
VALUE              31 ext/openssl/ossl_rand.c ossl_rand_seed(VALUE self, VALUE str)
VALUE              39 ext/openssl/ossl_rand.c static VALUE
VALUE              40 ext/openssl/ossl_rand.c ossl_rand_load_file(VALUE self, VALUE filename)
VALUE              50 ext/openssl/ossl_rand.c static VALUE
VALUE              51 ext/openssl/ossl_rand.c ossl_rand_write_file(VALUE self, VALUE filename)
VALUE              60 ext/openssl/ossl_rand.c static VALUE
VALUE              61 ext/openssl/ossl_rand.c ossl_rand_bytes(VALUE self, VALUE len)
VALUE              63 ext/openssl/ossl_rand.c     VALUE str;
VALUE              73 ext/openssl/ossl_rand.c static VALUE
VALUE              74 ext/openssl/ossl_rand.c ossl_rand_pseudo_bytes(VALUE self, VALUE len)
VALUE              76 ext/openssl/ossl_rand.c     VALUE str;
VALUE              86 ext/openssl/ossl_rand.c static VALUE
VALUE              87 ext/openssl/ossl_rand.c ossl_rand_egd(VALUE self, VALUE filename)
VALUE              97 ext/openssl/ossl_rand.c static VALUE
VALUE              98 ext/openssl/ossl_rand.c ossl_rand_egd_bytes(VALUE self, VALUE filename, VALUE len)
VALUE              14 ext/openssl/ossl_rand.h extern VALUE mRandom;
VALUE              15 ext/openssl/ossl_rand.h extern VALUE eRandomError;
VALUE              28 ext/openssl/ossl_ssl.c VALUE mSSL;
VALUE              29 ext/openssl/ossl_ssl.c VALUE eSSLError;
VALUE              30 ext/openssl/ossl_ssl.c VALUE cSSLContext;
VALUE              31 ext/openssl/ossl_ssl.c VALUE cSSLSocket;
VALUE             126 ext/openssl/ossl_ssl.c static VALUE
VALUE             127 ext/openssl/ossl_ssl.c ossl_sslctx_s_alloc(VALUE klass)
VALUE             140 ext/openssl/ossl_ssl.c static VALUE
VALUE             141 ext/openssl/ossl_ssl.c ossl_sslctx_initialize(int argc, VALUE *argv, VALUE self)
VALUE             143 ext/openssl/ossl_ssl.c     VALUE ssl_method;
VALUE             178 ext/openssl/ossl_ssl.c static VALUE
VALUE             179 ext/openssl/ossl_ssl.c ossl_call_client_cert_cb(VALUE obj)
VALUE             181 ext/openssl/ossl_ssl.c     VALUE cb, ary, cert, key;
VALUE             185 ext/openssl/ossl_ssl.c     cb = (VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_client_cert_cb_idx);
VALUE             200 ext/openssl/ossl_ssl.c     VALUE obj;
VALUE             203 ext/openssl/ossl_ssl.c     obj = (VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_ptr_idx);
VALUE             204 ext/openssl/ossl_ssl.c     success = rb_protect((VALUE(*)_((VALUE)))ossl_call_client_cert_cb,
VALUE             214 ext/openssl/ossl_ssl.c static VALUE
VALUE             215 ext/openssl/ossl_ssl.c ossl_call_tmp_dh_callback(VALUE *args)
VALUE             218 ext/openssl/ossl_ssl.c     VALUE cb, dh;
VALUE             222 ext/openssl/ossl_ssl.c     cb = (VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_tmp_dh_callback_idx);
VALUE             235 ext/openssl/ossl_ssl.c     VALUE args[3];
VALUE             238 ext/openssl/ossl_ssl.c     args[0] = (VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_ptr_idx);
VALUE             241 ext/openssl/ossl_ssl.c     success = rb_protect((VALUE(*)_((VALUE)))ossl_call_tmp_dh_callback,
VALUE             242 ext/openssl/ossl_ssl.c                          (VALUE)args, &status);
VALUE             264 ext/openssl/ossl_ssl.c     VALUE cb;
VALUE             268 ext/openssl/ossl_ssl.c     cb = (VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_vcb_idx);
VALUE             273 ext/openssl/ossl_ssl.c static VALUE
VALUE             274 ext/openssl/ossl_ssl.c ossl_sslctx_add_extra_chain_cert_i(VALUE i, VALUE arg)
VALUE             288 ext/openssl/ossl_ssl.c static VALUE
VALUE             289 ext/openssl/ossl_ssl.c ossl_sslctx_setup(VALUE self)
VALUE             297 ext/openssl/ossl_ssl.c     VALUE val;
VALUE             406 ext/openssl/ossl_ssl.c static VALUE
VALUE             409 ext/openssl/ossl_ssl.c     VALUE ary;
VALUE             422 ext/openssl/ossl_ssl.c static VALUE
VALUE             423 ext/openssl/ossl_ssl.c ossl_sslctx_get_ciphers(VALUE self)
VALUE             428 ext/openssl/ossl_ssl.c     VALUE ary;
VALUE             450 ext/openssl/ossl_ssl.c static VALUE
VALUE             451 ext/openssl/ossl_ssl.c ossl_sslctx_set_ciphers(VALUE self, VALUE v)
VALUE             454 ext/openssl/ossl_ssl.c     VALUE str, elem;
VALUE             505 ext/openssl/ossl_ssl.c static VALUE
VALUE             506 ext/openssl/ossl_ssl.c ossl_ssl_s_alloc(VALUE klass)
VALUE             511 ext/openssl/ossl_ssl.c static VALUE
VALUE             512 ext/openssl/ossl_ssl.c ossl_ssl_initialize(int argc, VALUE *argv, VALUE self)
VALUE             514 ext/openssl/ossl_ssl.c     VALUE io, ctx;
VALUE             530 ext/openssl/ossl_ssl.c static VALUE
VALUE             531 ext/openssl/ossl_ssl.c ossl_ssl_setup(VALUE self)
VALUE             533 ext/openssl/ossl_ssl.c     VALUE io, v_ctx, cb;
VALUE             572 ext/openssl/ossl_ssl.c static VALUE
VALUE             573 ext/openssl/ossl_ssl.c ossl_start_ssl(VALUE self, int (*func)())
VALUE             600 ext/openssl/ossl_ssl.c static VALUE
VALUE             601 ext/openssl/ossl_ssl.c ossl_ssl_connect(VALUE self)
VALUE             607 ext/openssl/ossl_ssl.c static VALUE
VALUE             608 ext/openssl/ossl_ssl.c ossl_ssl_accept(VALUE self)
VALUE             614 ext/openssl/ossl_ssl.c static VALUE
VALUE             615 ext/openssl/ossl_ssl.c ossl_ssl_read(int argc, VALUE *argv, VALUE self)
VALUE             619 ext/openssl/ossl_ssl.c     VALUE len, str;
VALUE             672 ext/openssl/ossl_ssl.c static VALUE
VALUE             673 ext/openssl/ossl_ssl.c ossl_ssl_write(VALUE self, VALUE str)
VALUE             712 ext/openssl/ossl_ssl.c static VALUE
VALUE             713 ext/openssl/ossl_ssl.c ossl_ssl_close(VALUE self)
VALUE             725 ext/openssl/ossl_ssl.c static VALUE
VALUE             726 ext/openssl/ossl_ssl.c ossl_ssl_get_cert(VALUE self)
VALUE             749 ext/openssl/ossl_ssl.c static VALUE
VALUE             750 ext/openssl/ossl_ssl.c ossl_ssl_get_peer_cert(VALUE self)
VALUE             754 ext/openssl/ossl_ssl.c     VALUE obj;
VALUE             774 ext/openssl/ossl_ssl.c static VALUE
VALUE             775 ext/openssl/ossl_ssl.c ossl_ssl_get_peer_cert_chain(VALUE self)
VALUE             780 ext/openssl/ossl_ssl.c     VALUE ary;
VALUE             800 ext/openssl/ossl_ssl.c static VALUE
VALUE             801 ext/openssl/ossl_ssl.c ossl_ssl_get_cipher(VALUE self)
VALUE             816 ext/openssl/ossl_ssl.c static VALUE
VALUE             817 ext/openssl/ossl_ssl.c ossl_ssl_get_state(VALUE self)
VALUE             820 ext/openssl/ossl_ssl.c     VALUE ret;
VALUE             835 ext/openssl/ossl_ssl.c static VALUE
VALUE             836 ext/openssl/ossl_ssl.c ossl_ssl_pending(VALUE self)
VALUE              14 ext/openssl/ossl_ssl.h extern VALUE mSSL;
VALUE              15 ext/openssl/ossl_ssl.h extern VALUE eSSLError;
VALUE              16 ext/openssl/ossl_ssl.h extern VALUE cSSLSocket;
VALUE              17 ext/openssl/ossl_ssl.h extern VALUE cSSLContext;
VALUE              13 ext/openssl/ossl_x509.c VALUE mX509;
VALUE              17 ext/openssl/ossl_x509.h extern VALUE mX509;
VALUE              24 ext/openssl/ossl_x509.h extern VALUE cX509Attr;
VALUE              25 ext/openssl/ossl_x509.h extern VALUE eX509AttrError;
VALUE              27 ext/openssl/ossl_x509.h VALUE ossl_x509attr_new(X509_ATTRIBUTE *);
VALUE              28 ext/openssl/ossl_x509.h X509_ATTRIBUTE *DupX509AttrPtr(VALUE);
VALUE              34 ext/openssl/ossl_x509.h extern VALUE cX509Cert;
VALUE              35 ext/openssl/ossl_x509.h extern VALUE eX509CertError;
VALUE              37 ext/openssl/ossl_x509.h VALUE ossl_x509_new(X509 *);
VALUE              38 ext/openssl/ossl_x509.h VALUE ossl_x509_new_from_file(VALUE);
VALUE              39 ext/openssl/ossl_x509.h X509 *GetX509CertPtr(VALUE);
VALUE              40 ext/openssl/ossl_x509.h X509 *DupX509CertPtr(VALUE);
VALUE              46 ext/openssl/ossl_x509.h extern VALUE cX509CRL;
VALUE              47 ext/openssl/ossl_x509.h extern VALUE eX509CRLError;
VALUE              49 ext/openssl/ossl_x509.h VALUE ossl_x509crl_new(X509_CRL *);
VALUE              50 ext/openssl/ossl_x509.h X509_CRL *GetX509CRLPtr(VALUE);
VALUE              51 ext/openssl/ossl_x509.h X509_CRL *DupX509CRLPtr(VALUE);
VALUE              57 ext/openssl/ossl_x509.h extern VALUE cX509Ext;
VALUE              58 ext/openssl/ossl_x509.h extern VALUE cX509ExtFactory;
VALUE              59 ext/openssl/ossl_x509.h extern VALUE eX509ExtError;
VALUE              61 ext/openssl/ossl_x509.h VALUE ossl_x509ext_new(X509_EXTENSION *);
VALUE              62 ext/openssl/ossl_x509.h X509_EXTENSION *GetX509ExtPtr(VALUE);
VALUE              63 ext/openssl/ossl_x509.h X509_EXTENSION *DupX509ExtPtr(VALUE);
VALUE              69 ext/openssl/ossl_x509.h extern VALUE cX509Name;
VALUE              70 ext/openssl/ossl_x509.h extern VALUE eX509NameError;
VALUE              72 ext/openssl/ossl_x509.h VALUE ossl_x509name_new(X509_NAME *);
VALUE              73 ext/openssl/ossl_x509.h X509_NAME *GetX509NamePtr(VALUE);
VALUE              79 ext/openssl/ossl_x509.h extern VALUE cX509Req;
VALUE              80 ext/openssl/ossl_x509.h extern VALUE eX509ReqError;
VALUE              82 ext/openssl/ossl_x509.h VALUE ossl_x509req_new(X509_REQ *);
VALUE              83 ext/openssl/ossl_x509.h X509_REQ *GetX509ReqPtr(VALUE);
VALUE              84 ext/openssl/ossl_x509.h X509_REQ *DupX509ReqPtr(VALUE);
VALUE              90 ext/openssl/ossl_x509.h extern VALUE cX509Rev;
VALUE              91 ext/openssl/ossl_x509.h extern VALUE eX509RevError;
VALUE              93 ext/openssl/ossl_x509.h VALUE ossl_x509revoked_new(X509_REVOKED *);
VALUE              94 ext/openssl/ossl_x509.h X509_REVOKED *DupX509RevokedPtr(VALUE);
VALUE             100 ext/openssl/ossl_x509.h extern VALUE cX509Store;
VALUE             101 ext/openssl/ossl_x509.h extern VALUE cX509StoreContext;
VALUE             102 ext/openssl/ossl_x509.h extern VALUE eX509StoreError;
VALUE             104 ext/openssl/ossl_x509.h VALUE ossl_x509store_new(X509_STORE *);
VALUE             105 ext/openssl/ossl_x509.h X509_STORE *GetX509StorePtr(VALUE);
VALUE             106 ext/openssl/ossl_x509.h X509_STORE *DupX509StorePtr(VALUE);
VALUE             108 ext/openssl/ossl_x509.h VALUE ossl_x509stctx_new(X509_STORE_CTX *);
VALUE             109 ext/openssl/ossl_x509.h VALUE ossl_x509stctx_clear_ptr(VALUE);
VALUE             110 ext/openssl/ossl_x509.h X509_STORE_CTX *GetX509StCtxtPtr(VALUE);
VALUE              33 ext/openssl/ossl_x509attr.c VALUE cX509Attr;
VALUE              34 ext/openssl/ossl_x509attr.c VALUE eX509AttrError;
VALUE              39 ext/openssl/ossl_x509attr.c VALUE
VALUE              43 ext/openssl/ossl_x509attr.c     VALUE obj;
VALUE              59 ext/openssl/ossl_x509attr.c DupX509AttrPtr(VALUE obj)
VALUE              74 ext/openssl/ossl_x509attr.c static VALUE
VALUE              75 ext/openssl/ossl_x509attr.c ossl_x509attr_alloc(VALUE klass)
VALUE              78 ext/openssl/ossl_x509attr.c     VALUE obj;
VALUE              87 ext/openssl/ossl_x509attr.c static VALUE
VALUE              88 ext/openssl/ossl_x509attr.c ossl_x509attr_initialize(int argc, VALUE *argv, VALUE self)
VALUE              90 ext/openssl/ossl_x509attr.c     VALUE oid, value;
VALUE             111 ext/openssl/ossl_x509attr.c static VALUE
VALUE             112 ext/openssl/ossl_x509attr.c ossl_x509attr_set_oid(VALUE self, VALUE oid)
VALUE             128 ext/openssl/ossl_x509attr.c static VALUE
VALUE             129 ext/openssl/ossl_x509attr.c ossl_x509attr_get_oid(VALUE self)
VALUE             134 ext/openssl/ossl_x509attr.c     VALUE ret;
VALUE             159 ext/openssl/ossl_x509attr.c static VALUE
VALUE             160 ext/openssl/ossl_x509attr.c ossl_x509attr_set_value(VALUE self, VALUE value)
VALUE             182 ext/openssl/ossl_x509attr.c static VALUE
VALUE             183 ext/openssl/ossl_x509attr.c ossl_x509attr_get_value(VALUE self)
VALUE             186 ext/openssl/ossl_x509attr.c     VALUE str, asn1;
VALUE             213 ext/openssl/ossl_x509attr.c static VALUE
VALUE             214 ext/openssl/ossl_x509attr.c ossl_x509attr_to_der(VALUE self)
VALUE             217 ext/openssl/ossl_x509attr.c     VALUE str;
VALUE              33 ext/openssl/ossl_x509cert.c VALUE cX509Cert;
VALUE              34 ext/openssl/ossl_x509cert.c VALUE eX509CertError;
VALUE              39 ext/openssl/ossl_x509cert.c VALUE
VALUE              43 ext/openssl/ossl_x509cert.c     VALUE obj;
VALUE              58 ext/openssl/ossl_x509cert.c VALUE
VALUE              59 ext/openssl/ossl_x509cert.c ossl_x509_new_from_file(VALUE filename)
VALUE              63 ext/openssl/ossl_x509cert.c     VALUE obj;
VALUE              90 ext/openssl/ossl_x509cert.c GetX509CertPtr(VALUE obj)
VALUE             100 ext/openssl/ossl_x509cert.c DupX509CertPtr(VALUE obj)
VALUE             114 ext/openssl/ossl_x509cert.c static VALUE
VALUE             115 ext/openssl/ossl_x509cert.c ossl_x509_alloc(VALUE klass)
VALUE             118 ext/openssl/ossl_x509cert.c     VALUE obj;
VALUE             128 ext/openssl/ossl_x509cert.c static VALUE
VALUE             129 ext/openssl/ossl_x509cert.c ossl_x509_initialize(int argc, VALUE *argv, VALUE self)
VALUE             133 ext/openssl/ossl_x509cert.c     VALUE arg;
VALUE             152 ext/openssl/ossl_x509cert.c static VALUE
VALUE             153 ext/openssl/ossl_x509cert.c ossl_x509_copy(VALUE self, VALUE other)
VALUE             172 ext/openssl/ossl_x509cert.c static VALUE
VALUE             173 ext/openssl/ossl_x509cert.c ossl_x509_to_der(VALUE self)
VALUE             176 ext/openssl/ossl_x509cert.c     VALUE str;
VALUE             192 ext/openssl/ossl_x509cert.c static VALUE
VALUE             193 ext/openssl/ossl_x509cert.c ossl_x509_to_pem(VALUE self)
VALUE             197 ext/openssl/ossl_x509cert.c     VALUE str;
VALUE             212 ext/openssl/ossl_x509cert.c static VALUE
VALUE             213 ext/openssl/ossl_x509cert.c ossl_x509_to_text(VALUE self)
VALUE             217 ext/openssl/ossl_x509cert.c     VALUE str;
VALUE             237 ext/openssl/ossl_x509cert.c static VALUE
VALUE             238 ext/openssl/ossl_x509cert.c ossl_x509_to_req(VALUE self)
VALUE             242 ext/openssl/ossl_x509cert.c     VALUE obj;
VALUE             255 ext/openssl/ossl_x509cert.c static VALUE
VALUE             256 ext/openssl/ossl_x509cert.c ossl_x509_get_version(VALUE self)
VALUE             265 ext/openssl/ossl_x509cert.c static VALUE
VALUE             266 ext/openssl/ossl_x509cert.c ossl_x509_set_version(VALUE self, VALUE version)
VALUE             282 ext/openssl/ossl_x509cert.c static VALUE
VALUE             283 ext/openssl/ossl_x509cert.c ossl_x509_get_serial(VALUE self)
VALUE             292 ext/openssl/ossl_x509cert.c static VALUE
VALUE             293 ext/openssl/ossl_x509cert.c ossl_x509_set_serial(VALUE self, VALUE num)
VALUE             305 ext/openssl/ossl_x509cert.c static VALUE
VALUE             306 ext/openssl/ossl_x509cert.c ossl_x509_get_signature_algorithm(VALUE self)
VALUE             310 ext/openssl/ossl_x509cert.c     VALUE str;
VALUE             325 ext/openssl/ossl_x509cert.c static VALUE
VALUE             326 ext/openssl/ossl_x509cert.c ossl_x509_get_subject(VALUE self)
VALUE             339 ext/openssl/ossl_x509cert.c static VALUE
VALUE             340 ext/openssl/ossl_x509cert.c ossl_x509_set_subject(VALUE self, VALUE subject)
VALUE             352 ext/openssl/ossl_x509cert.c static VALUE
VALUE             353 ext/openssl/ossl_x509cert.c ossl_x509_get_issuer(VALUE self)
VALUE             366 ext/openssl/ossl_x509cert.c static VALUE
VALUE             367 ext/openssl/ossl_x509cert.c ossl_x509_set_issuer(VALUE self, VALUE issuer)
VALUE             379 ext/openssl/ossl_x509cert.c static VALUE
VALUE             380 ext/openssl/ossl_x509cert.c ossl_x509_get_not_before(VALUE self)
VALUE             393 ext/openssl/ossl_x509cert.c static VALUE
VALUE             394 ext/openssl/ossl_x509cert.c ossl_x509_set_not_before(VALUE self, VALUE time)
VALUE             408 ext/openssl/ossl_x509cert.c static VALUE
VALUE             409 ext/openssl/ossl_x509cert.c ossl_x509_get_not_after(VALUE self)
VALUE             422 ext/openssl/ossl_x509cert.c static VALUE
VALUE             423 ext/openssl/ossl_x509cert.c ossl_x509_set_not_after(VALUE self, VALUE time)
VALUE             437 ext/openssl/ossl_x509cert.c static VALUE
VALUE             438 ext/openssl/ossl_x509cert.c ossl_x509_get_public_key(VALUE self)
VALUE             451 ext/openssl/ossl_x509cert.c static VALUE
VALUE             452 ext/openssl/ossl_x509cert.c ossl_x509_set_public_key(VALUE self, VALUE key)
VALUE             464 ext/openssl/ossl_x509cert.c static VALUE
VALUE             465 ext/openssl/ossl_x509cert.c ossl_x509_sign(VALUE self, VALUE key, VALUE digest)
VALUE             484 ext/openssl/ossl_x509cert.c static VALUE
VALUE             485 ext/openssl/ossl_x509cert.c ossl_x509_verify(VALUE self, VALUE key)
VALUE             506 ext/openssl/ossl_x509cert.c static VALUE
VALUE             507 ext/openssl/ossl_x509cert.c ossl_x509_check_private_key(VALUE self, VALUE key)
VALUE             526 ext/openssl/ossl_x509cert.c static VALUE
VALUE             527 ext/openssl/ossl_x509cert.c ossl_x509_get_extensions(VALUE self)
VALUE             532 ext/openssl/ossl_x509cert.c     VALUE ary;
VALUE             551 ext/openssl/ossl_x509cert.c static VALUE
VALUE             552 ext/openssl/ossl_x509cert.c ossl_x509_set_extensions(VALUE self, VALUE ary)
VALUE             579 ext/openssl/ossl_x509cert.c static VALUE
VALUE             580 ext/openssl/ossl_x509cert.c ossl_x509_add_extension(VALUE self, VALUE extension)
VALUE             596 ext/openssl/ossl_x509cert.c static VALUE
VALUE             597 ext/openssl/ossl_x509cert.c ossl_x509_inspect(VALUE self)
VALUE             599 ext/openssl/ossl_x509cert.c     VALUE str;
VALUE              33 ext/openssl/ossl_x509crl.c VALUE cX509CRL;
VALUE              34 ext/openssl/ossl_x509crl.c VALUE eX509CRLError;
VALUE              40 ext/openssl/ossl_x509crl.c GetX509CRLPtr(VALUE obj)
VALUE              50 ext/openssl/ossl_x509crl.c DupX509CRLPtr(VALUE obj)
VALUE              60 ext/openssl/ossl_x509crl.c VALUE
VALUE              64 ext/openssl/ossl_x509crl.c     VALUE obj;
VALUE              76 ext/openssl/ossl_x509crl.c static VALUE
VALUE              77 ext/openssl/ossl_x509crl.c ossl_x509crl_alloc(VALUE klass)
VALUE              80 ext/openssl/ossl_x509crl.c     VALUE obj;
VALUE              90 ext/openssl/ossl_x509crl.c static VALUE
VALUE              91 ext/openssl/ossl_x509crl.c ossl_x509crl_initialize(int argc, VALUE *argv, VALUE self)
VALUE              95 ext/openssl/ossl_x509crl.c     VALUE arg;
VALUE             113 ext/openssl/ossl_x509crl.c static VALUE
VALUE             114 ext/openssl/ossl_x509crl.c ossl_x509crl_copy(VALUE self, VALUE other)
VALUE             131 ext/openssl/ossl_x509crl.c static VALUE
VALUE             132 ext/openssl/ossl_x509crl.c ossl_x509crl_get_version(VALUE self)
VALUE             143 ext/openssl/ossl_x509crl.c static VALUE
VALUE             144 ext/openssl/ossl_x509crl.c ossl_x509crl_set_version(VALUE self, VALUE version)
VALUE             160 ext/openssl/ossl_x509crl.c static VALUE
VALUE             161 ext/openssl/ossl_x509crl.c ossl_x509crl_get_signature_algorithm(VALUE self)
VALUE             166 ext/openssl/ossl_x509crl.c     VALUE str;
VALUE             182 ext/openssl/ossl_x509crl.c static VALUE
VALUE             183 ext/openssl/ossl_x509crl.c ossl_x509crl_get_issuer(VALUE self)
VALUE             192 ext/openssl/ossl_x509crl.c static VALUE
VALUE             193 ext/openssl/ossl_x509crl.c ossl_x509crl_set_issuer(VALUE self, VALUE issuer)
VALUE             205 ext/openssl/ossl_x509crl.c static VALUE
VALUE             206 ext/openssl/ossl_x509crl.c ossl_x509crl_get_last_update(VALUE self)
VALUE             215 ext/openssl/ossl_x509crl.c static VALUE
VALUE             216 ext/openssl/ossl_x509crl.c ossl_x509crl_set_last_update(VALUE self, VALUE time)
VALUE             230 ext/openssl/ossl_x509crl.c static VALUE
VALUE             231 ext/openssl/ossl_x509crl.c ossl_x509crl_get_next_update(VALUE self)
VALUE             240 ext/openssl/ossl_x509crl.c static VALUE
VALUE             241 ext/openssl/ossl_x509crl.c ossl_x509crl_set_next_update(VALUE self, VALUE time)
VALUE             256 ext/openssl/ossl_x509crl.c static VALUE
VALUE             257 ext/openssl/ossl_x509crl.c ossl_x509crl_get_revoked(VALUE self)
VALUE             262 ext/openssl/ossl_x509crl.c     VALUE ary, revoked;
VALUE             281 ext/openssl/ossl_x509crl.c static VALUE
VALUE             282 ext/openssl/ossl_x509crl.c ossl_x509crl_set_revoked(VALUE self, VALUE ary)
VALUE             307 ext/openssl/ossl_x509crl.c static VALUE
VALUE             308 ext/openssl/ossl_x509crl.c ossl_x509crl_add_revoked(VALUE self, VALUE revoked)
VALUE             323 ext/openssl/ossl_x509crl.c static VALUE
VALUE             324 ext/openssl/ossl_x509crl.c ossl_x509crl_sign(VALUE self, VALUE key, VALUE digest)
VALUE             340 ext/openssl/ossl_x509crl.c static VALUE
VALUE             341 ext/openssl/ossl_x509crl.c ossl_x509crl_verify(VALUE self, VALUE key)
VALUE             357 ext/openssl/ossl_x509crl.c static VALUE
VALUE             358 ext/openssl/ossl_x509crl.c ossl_x509crl_to_der(VALUE self)
VALUE             363 ext/openssl/ossl_x509crl.c     VALUE str;
VALUE             380 ext/openssl/ossl_x509crl.c static VALUE
VALUE             381 ext/openssl/ossl_x509crl.c ossl_x509crl_to_pem(VALUE self)
VALUE             386 ext/openssl/ossl_x509crl.c     VALUE str;
VALUE             403 ext/openssl/ossl_x509crl.c static VALUE
VALUE             404 ext/openssl/ossl_x509crl.c ossl_x509crl_to_text(VALUE self)
VALUE             409 ext/openssl/ossl_x509crl.c     VALUE str;
VALUE             429 ext/openssl/ossl_x509crl.c static VALUE
VALUE             430 ext/openssl/ossl_x509crl.c ossl_x509crl_get_extensions(VALUE self)
VALUE             435 ext/openssl/ossl_x509crl.c     VALUE ary;
VALUE             455 ext/openssl/ossl_x509crl.c static VALUE
VALUE             456 ext/openssl/ossl_x509crl.c ossl_x509crl_set_extensions(VALUE self, VALUE ary)
VALUE             482 ext/openssl/ossl_x509crl.c static VALUE
VALUE             483 ext/openssl/ossl_x509crl.c ossl_x509crl_add_extension(VALUE self, VALUE extension)
VALUE              45 ext/openssl/ossl_x509ext.c VALUE cX509Ext;
VALUE              46 ext/openssl/ossl_x509ext.c VALUE cX509ExtFactory;
VALUE              47 ext/openssl/ossl_x509ext.c VALUE eX509ExtError;
VALUE              52 ext/openssl/ossl_x509ext.c VALUE
VALUE              56 ext/openssl/ossl_x509ext.c     VALUE obj;
VALUE              72 ext/openssl/ossl_x509ext.c GetX509ExtPtr(VALUE obj)
VALUE              82 ext/openssl/ossl_x509ext.c DupX509ExtPtr(VALUE obj)
VALUE             106 ext/openssl/ossl_x509ext.c static VALUE
VALUE             107 ext/openssl/ossl_x509ext.c ossl_x509extfactory_alloc(VALUE klass)
VALUE             110 ext/openssl/ossl_x509ext.c     VALUE obj;
VALUE             117 ext/openssl/ossl_x509ext.c static VALUE
VALUE             118 ext/openssl/ossl_x509ext.c ossl_x509extfactory_set_issuer_cert(VALUE self, VALUE cert)
VALUE             129 ext/openssl/ossl_x509ext.c static VALUE
VALUE             130 ext/openssl/ossl_x509ext.c ossl_x509extfactory_set_subject_cert(VALUE self, VALUE cert)
VALUE             141 ext/openssl/ossl_x509ext.c static VALUE
VALUE             142 ext/openssl/ossl_x509ext.c ossl_x509extfactory_set_subject_req(VALUE self, VALUE req)
VALUE             153 ext/openssl/ossl_x509ext.c static VALUE
VALUE             154 ext/openssl/ossl_x509ext.c ossl_x509extfactory_set_crl(VALUE self, VALUE crl)
VALUE             165 ext/openssl/ossl_x509ext.c static VALUE
VALUE             166 ext/openssl/ossl_x509ext.c ossl_x509extfactory_set_config(VALUE self, VALUE config)
VALUE             183 ext/openssl/ossl_x509ext.c static VALUE
VALUE             184 ext/openssl/ossl_x509ext.c ossl_x509extfactory_initialize(int argc, VALUE *argv, VALUE self)
VALUE             187 ext/openssl/ossl_x509ext.c     VALUE issuer_cert, subject_cert, subject_req, crl;
VALUE             213 ext/openssl/ossl_x509ext.c static VALUE
VALUE             214 ext/openssl/ossl_x509ext.c ossl_x509extfactory_create_ext(int argc, VALUE *argv, VALUE self)
VALUE             218 ext/openssl/ossl_x509ext.c     VALUE oid, value, critical, valstr, obj;
VALUE             221 ext/openssl/ossl_x509ext.c     VALUE rconf;
VALUE             258 ext/openssl/ossl_x509ext.c static VALUE
VALUE             259 ext/openssl/ossl_x509ext.c ossl_x509ext_alloc(VALUE klass)
VALUE             262 ext/openssl/ossl_x509ext.c     VALUE obj;
VALUE             272 ext/openssl/ossl_x509ext.c static VALUE
VALUE             273 ext/openssl/ossl_x509ext.c ossl_x509ext_initialize(int argc, VALUE *argv, VALUE self)
VALUE             275 ext/openssl/ossl_x509ext.c     VALUE oid, value, critical;
VALUE             296 ext/openssl/ossl_x509ext.c static VALUE
VALUE             297 ext/openssl/ossl_x509ext.c ossl_x509ext_set_oid(VALUE self, VALUE oid)
VALUE             313 ext/openssl/ossl_x509ext.c static VALUE
VALUE             314 ext/openssl/ossl_x509ext.c ossl_x509ext_set_value(VALUE self, VALUE data)
VALUE             340 ext/openssl/ossl_x509ext.c static VALUE
VALUE             341 ext/openssl/ossl_x509ext.c ossl_x509ext_set_critical(VALUE self, VALUE flag)
VALUE             351 ext/openssl/ossl_x509ext.c static VALUE
VALUE             352 ext/openssl/ossl_x509ext.c ossl_x509ext_get_oid(VALUE obj)
VALUE             357 ext/openssl/ossl_x509ext.c     VALUE ret;
VALUE             374 ext/openssl/ossl_x509ext.c static VALUE
VALUE             375 ext/openssl/ossl_x509ext.c ossl_x509ext_get_value(VALUE obj)
VALUE             379 ext/openssl/ossl_x509ext.c     VALUE ret;
VALUE             391 ext/openssl/ossl_x509ext.c static VALUE
VALUE             392 ext/openssl/ossl_x509ext.c ossl_x509ext_get_critical(VALUE obj)
VALUE             400 ext/openssl/ossl_x509ext.c static VALUE
VALUE             401 ext/openssl/ossl_x509ext.c ossl_x509ext_to_der(VALUE obj)
VALUE             406 ext/openssl/ossl_x509ext.c     VALUE str;
VALUE              38 ext/openssl/ossl_x509name.c VALUE cX509Name;
VALUE              39 ext/openssl/ossl_x509name.c VALUE eX509NameError;
VALUE              44 ext/openssl/ossl_x509name.c VALUE
VALUE              48 ext/openssl/ossl_x509name.c     VALUE obj;
VALUE              64 ext/openssl/ossl_x509name.c GetX509NamePtr(VALUE obj)
VALUE              76 ext/openssl/ossl_x509name.c static VALUE
VALUE              77 ext/openssl/ossl_x509name.c ossl_x509name_alloc(VALUE klass)
VALUE              80 ext/openssl/ossl_x509name.c     VALUE obj;
VALUE              91 ext/openssl/ossl_x509name.c static VALUE ossl_x509name_add_entry(int, VALUE*, VALUE);
VALUE              94 ext/openssl/ossl_x509name.c static VALUE
VALUE              95 ext/openssl/ossl_x509name.c ossl_x509name_init_i(VALUE i, VALUE args)
VALUE              97 ext/openssl/ossl_x509name.c     VALUE self = rb_ary_entry(args, 0);
VALUE              98 ext/openssl/ossl_x509name.c     VALUE template = rb_ary_entry(args, 1);
VALUE              99 ext/openssl/ossl_x509name.c     VALUE entry[3];
VALUE             112 ext/openssl/ossl_x509name.c static VALUE
VALUE             113 ext/openssl/ossl_x509name.c ossl_x509name_initialize(int argc, VALUE *argv, VALUE self)
VALUE             116 ext/openssl/ossl_x509name.c     VALUE arg, template;
VALUE             123 ext/openssl/ossl_x509name.c 	VALUE tmp = rb_check_array_type(arg);
VALUE             125 ext/openssl/ossl_x509name.c 	    VALUE args;
VALUE             132 ext/openssl/ossl_x509name.c 	    VALUE str = ossl_to_der_if_possible(arg);
VALUE             145 ext/openssl/ossl_x509name.c VALUE ossl_x509name_add_entry(int argc, VALUE *argv, VALUE self)
VALUE             148 ext/openssl/ossl_x509name.c     VALUE oid, value, type;
VALUE             163 ext/openssl/ossl_x509name.c static VALUE
VALUE             164 ext/openssl/ossl_x509name.c ossl_x509name_to_s_old(VALUE self)
VALUE             168 ext/openssl/ossl_x509name.c     VALUE str;
VALUE             178 ext/openssl/ossl_x509name.c static VALUE
VALUE             179 ext/openssl/ossl_x509name.c ossl_x509name_to_s(int argc, VALUE *argv, VALUE self)
VALUE             182 ext/openssl/ossl_x509name.c     VALUE flag, str;
VALUE             202 ext/openssl/ossl_x509name.c static VALUE
VALUE             203 ext/openssl/ossl_x509name.c ossl_x509name_to_a(VALUE self)
VALUE             210 ext/openssl/ossl_x509name.c     VALUE ary, ret;
VALUE             236 ext/openssl/ossl_x509name.c ossl_x509name_cmp0(VALUE self, VALUE other)
VALUE             246 ext/openssl/ossl_x509name.c static VALUE
VALUE             247 ext/openssl/ossl_x509name.c ossl_x509name_cmp(VALUE self, VALUE other)
VALUE             258 ext/openssl/ossl_x509name.c static VALUE
VALUE             259 ext/openssl/ossl_x509name.c ossl_x509name_eql(VALUE self, VALUE other)
VALUE             269 ext/openssl/ossl_x509name.c static VALUE
VALUE             270 ext/openssl/ossl_x509name.c ossl_x509name_hash(VALUE self)
VALUE             282 ext/openssl/ossl_x509name.c static VALUE
VALUE             283 ext/openssl/ossl_x509name.c ossl_x509name_to_der(VALUE self)
VALUE             286 ext/openssl/ossl_x509name.c     VALUE str;
VALUE             308 ext/openssl/ossl_x509name.c     VALUE utf8str, ptrstr, ia5str, hash;
VALUE              33 ext/openssl/ossl_x509req.c VALUE cX509Req;
VALUE              34 ext/openssl/ossl_x509req.c VALUE eX509ReqError;
VALUE              39 ext/openssl/ossl_x509req.c VALUE
VALUE              43 ext/openssl/ossl_x509req.c     VALUE obj;
VALUE              59 ext/openssl/ossl_x509req.c GetX509ReqPtr(VALUE obj)
VALUE              69 ext/openssl/ossl_x509req.c DupX509ReqPtr(VALUE obj)
VALUE              84 ext/openssl/ossl_x509req.c static VALUE
VALUE              85 ext/openssl/ossl_x509req.c ossl_x509req_alloc(VALUE klass)
VALUE              88 ext/openssl/ossl_x509req.c     VALUE obj;
VALUE              98 ext/openssl/ossl_x509req.c static VALUE
VALUE              99 ext/openssl/ossl_x509req.c ossl_x509req_initialize(int argc, VALUE *argv, VALUE self)
VALUE             103 ext/openssl/ossl_x509req.c     VALUE arg;
VALUE             121 ext/openssl/ossl_x509req.c static VALUE
VALUE             122 ext/openssl/ossl_x509req.c ossl_x509req_copy(VALUE self, VALUE other)
VALUE             139 ext/openssl/ossl_x509req.c static VALUE
VALUE             140 ext/openssl/ossl_x509req.c ossl_x509req_to_pem(VALUE self)
VALUE             145 ext/openssl/ossl_x509req.c     VALUE str;
VALUE             162 ext/openssl/ossl_x509req.c static VALUE
VALUE             163 ext/openssl/ossl_x509req.c ossl_x509req_to_der(VALUE self)
VALUE             166 ext/openssl/ossl_x509req.c     VALUE str;
VALUE             182 ext/openssl/ossl_x509req.c static VALUE
VALUE             183 ext/openssl/ossl_x509req.c ossl_x509req_to_text(VALUE self)
VALUE             188 ext/openssl/ossl_x509req.c     VALUE str;
VALUE             209 ext/openssl/ossl_x509req.c static VALUE
VALUE             210 ext/openssl/ossl_x509req.c ossl_x509req_to_x509(VALUE self, VALUE days, VALUE key)
VALUE             225 ext/openssl/ossl_x509req.c static VALUE
VALUE             226 ext/openssl/ossl_x509req.c ossl_x509req_get_version(VALUE self)
VALUE             237 ext/openssl/ossl_x509req.c static VALUE
VALUE             238 ext/openssl/ossl_x509req.c ossl_x509req_set_version(VALUE self, VALUE version)
VALUE             254 ext/openssl/ossl_x509req.c static VALUE
VALUE             255 ext/openssl/ossl_x509req.c ossl_x509req_get_subject(VALUE self)
VALUE             268 ext/openssl/ossl_x509req.c static VALUE
VALUE             269 ext/openssl/ossl_x509req.c ossl_x509req_set_subject(VALUE self, VALUE subject)
VALUE             282 ext/openssl/ossl_x509req.c static VALUE
VALUE             283 ext/openssl/ossl_x509req.c ossl_x509req_get_signature_algorithm(VALUE self)
VALUE             288 ext/openssl/ossl_x509req.c     VALUE str;
VALUE             305 ext/openssl/ossl_x509req.c static VALUE
VALUE             306 ext/openssl/ossl_x509req.c ossl_x509req_get_public_key(VALUE self)
VALUE             319 ext/openssl/ossl_x509req.c static VALUE
VALUE             320 ext/openssl/ossl_x509req.c ossl_x509req_set_public_key(VALUE self, VALUE key)
VALUE             334 ext/openssl/ossl_x509req.c static VALUE
VALUE             335 ext/openssl/ossl_x509req.c ossl_x509req_sign(VALUE self, VALUE key, VALUE digest)
VALUE             354 ext/openssl/ossl_x509req.c static VALUE
VALUE             355 ext/openssl/ossl_x509req.c ossl_x509req_verify(VALUE self, VALUE key)
VALUE             373 ext/openssl/ossl_x509req.c static VALUE
VALUE             374 ext/openssl/ossl_x509req.c ossl_x509req_get_attributes(VALUE self)
VALUE             379 ext/openssl/ossl_x509req.c     VALUE ary;
VALUE             397 ext/openssl/ossl_x509req.c static VALUE
VALUE             398 ext/openssl/ossl_x509req.c ossl_x509req_set_attributes(VALUE self, VALUE ary)
VALUE             403 ext/openssl/ossl_x509req.c     VALUE item;
VALUE             422 ext/openssl/ossl_x509req.c static VALUE
VALUE             423 ext/openssl/ossl_x509req.c ossl_x509req_add_attribute(VALUE self, VALUE attr)
VALUE              33 ext/openssl/ossl_x509revoked.c VALUE cX509Rev;
VALUE              34 ext/openssl/ossl_x509revoked.c VALUE eX509RevError;
VALUE              39 ext/openssl/ossl_x509revoked.c VALUE
VALUE              43 ext/openssl/ossl_x509revoked.c     VALUE obj;
VALUE              59 ext/openssl/ossl_x509revoked.c DupX509RevokedPtr(VALUE obj)
VALUE              74 ext/openssl/ossl_x509revoked.c static VALUE
VALUE              75 ext/openssl/ossl_x509revoked.c ossl_x509revoked_alloc(VALUE klass)
VALUE              78 ext/openssl/ossl_x509revoked.c     VALUE obj;
VALUE              88 ext/openssl/ossl_x509revoked.c static VALUE
VALUE              89 ext/openssl/ossl_x509revoked.c ossl_x509revoked_initialize(int argc, VALUE *argv, VALUE self)
VALUE              95 ext/openssl/ossl_x509revoked.c static VALUE
VALUE              96 ext/openssl/ossl_x509revoked.c ossl_x509revoked_get_serial(VALUE self)
VALUE             105 ext/openssl/ossl_x509revoked.c static VALUE
VALUE             106 ext/openssl/ossl_x509revoked.c ossl_x509revoked_set_serial(VALUE self, VALUE num)
VALUE             116 ext/openssl/ossl_x509revoked.c static VALUE
VALUE             117 ext/openssl/ossl_x509revoked.c ossl_x509revoked_get_time(VALUE self)
VALUE             126 ext/openssl/ossl_x509revoked.c static VALUE
VALUE             127 ext/openssl/ossl_x509revoked.c ossl_x509revoked_set_time(VALUE self, VALUE time)
VALUE             143 ext/openssl/ossl_x509revoked.c static VALUE
VALUE             144 ext/openssl/ossl_x509revoked.c ossl_x509revoked_get_extensions(VALUE self)
VALUE             149 ext/openssl/ossl_x509revoked.c     VALUE ary;
VALUE             169 ext/openssl/ossl_x509revoked.c static VALUE
VALUE             170 ext/openssl/ossl_x509revoked.c ossl_x509revoked_set_extensions(VALUE self, VALUE ary)
VALUE             175 ext/openssl/ossl_x509revoked.c     VALUE item;
VALUE             195 ext/openssl/ossl_x509revoked.c static VALUE
VALUE             196 ext/openssl/ossl_x509revoked.c ossl_x509revoked_add_extension(VALUE self, VALUE ext)
VALUE              51 ext/openssl/ossl_x509store.c VALUE cX509Store;
VALUE              52 ext/openssl/ossl_x509store.c VALUE cX509StoreContext;
VALUE              53 ext/openssl/ossl_x509store.c VALUE eX509StoreError;
VALUE              58 ext/openssl/ossl_x509store.c VALUE
VALUE              61 ext/openssl/ossl_x509store.c     VALUE obj;
VALUE              69 ext/openssl/ossl_x509store.c GetX509StorePtr(VALUE obj)
VALUE              79 ext/openssl/ossl_x509store.c DupX509StorePtr(VALUE obj)
VALUE              92 ext/openssl/ossl_x509store.c static VALUE
VALUE              93 ext/openssl/ossl_x509store.c ossl_x509store_alloc(VALUE klass)
VALUE              96 ext/openssl/ossl_x509store.c     VALUE obj;
VALUE             109 ext/openssl/ossl_x509store.c static VALUE
VALUE             110 ext/openssl/ossl_x509store.c ossl_x509store_set_vfy_cb(VALUE self, VALUE cb)
VALUE             121 ext/openssl/ossl_x509store.c static VALUE
VALUE             122 ext/openssl/ossl_x509store.c ossl_x509store_initialize(int argc, VALUE *argv, VALUE self)
VALUE             145 ext/openssl/ossl_x509store.c static VALUE
VALUE             146 ext/openssl/ossl_x509store.c ossl_x509store_set_flags(VALUE self, VALUE flags)
VALUE             161 ext/openssl/ossl_x509store.c static VALUE
VALUE             162 ext/openssl/ossl_x509store.c ossl_x509store_set_purpose(VALUE self, VALUE purpose)
VALUE             177 ext/openssl/ossl_x509store.c static VALUE
VALUE             178 ext/openssl/ossl_x509store.c ossl_x509store_set_trust(VALUE self, VALUE trust)
VALUE             193 ext/openssl/ossl_x509store.c static VALUE
VALUE             194 ext/openssl/ossl_x509store.c ossl_x509store_set_time(VALUE self, VALUE time)
VALUE             200 ext/openssl/ossl_x509store.c static VALUE
VALUE             201 ext/openssl/ossl_x509store.c ossl_x509store_add_file(VALUE self, VALUE file)
VALUE             221 ext/openssl/ossl_x509store.c static VALUE
VALUE             222 ext/openssl/ossl_x509store.c ossl_x509store_add_path(VALUE self, VALUE dir)
VALUE             242 ext/openssl/ossl_x509store.c static VALUE
VALUE             243 ext/openssl/ossl_x509store.c ossl_x509store_set_default_paths(VALUE self)
VALUE             255 ext/openssl/ossl_x509store.c static VALUE
VALUE             256 ext/openssl/ossl_x509store.c ossl_x509store_add_cert(VALUE self, VALUE arg)
VALUE             270 ext/openssl/ossl_x509store.c static VALUE
VALUE             271 ext/openssl/ossl_x509store.c ossl_x509store_add_crl(VALUE self, VALUE arg)
VALUE             285 ext/openssl/ossl_x509store.c static VALUE ossl_x509stctx_get_err(VALUE);
VALUE             286 ext/openssl/ossl_x509store.c static VALUE ossl_x509stctx_get_err_string(VALUE);
VALUE             287 ext/openssl/ossl_x509store.c static VALUE ossl_x509stctx_get_chain(VALUE);
VALUE             289 ext/openssl/ossl_x509store.c static VALUE
VALUE             290 ext/openssl/ossl_x509store.c ossl_x509store_verify(int argc, VALUE *argv, VALUE self)
VALUE             292 ext/openssl/ossl_x509store.c     VALUE cert, chain;
VALUE             293 ext/openssl/ossl_x509store.c     VALUE ctx, proc, result;
VALUE             314 ext/openssl/ossl_x509store.c VALUE
VALUE             317 ext/openssl/ossl_x509store.c     VALUE obj;
VALUE             324 ext/openssl/ossl_x509store.c VALUE
VALUE             325 ext/openssl/ossl_x509store.c ossl_x509stctx_clear_ptr(VALUE obj)
VALUE             346 ext/openssl/ossl_x509store.c static VALUE
VALUE             347 ext/openssl/ossl_x509store.c ossl_x509stctx_alloc(VALUE klass)
VALUE             350 ext/openssl/ossl_x509store.c     VALUE obj;
VALUE             360 ext/openssl/ossl_x509store.c static VALUE ossl_x509stctx_set_flags(VALUE, VALUE);
VALUE             361 ext/openssl/ossl_x509store.c static VALUE ossl_x509stctx_set_purpose(VALUE, VALUE);
VALUE             362 ext/openssl/ossl_x509store.c static VALUE ossl_x509stctx_set_trust(VALUE, VALUE);
VALUE             363 ext/openssl/ossl_x509store.c static VALUE ossl_x509stctx_set_time(VALUE, VALUE);
VALUE             365 ext/openssl/ossl_x509store.c static VALUE
VALUE             366 ext/openssl/ossl_x509store.c ossl_x509stctx_initialize(int argc, VALUE *argv, VALUE self)
VALUE             368 ext/openssl/ossl_x509store.c     VALUE store, cert, chain, t;
VALUE             398 ext/openssl/ossl_x509store.c static VALUE
VALUE             399 ext/openssl/ossl_x509store.c ossl_x509stctx_verify(VALUE self)
VALUE             412 ext/openssl/ossl_x509store.c static VALUE
VALUE             413 ext/openssl/ossl_x509store.c ossl_x509stctx_get_chain(VALUE self)
VALUE             419 ext/openssl/ossl_x509store.c     VALUE ary;
VALUE             438 ext/openssl/ossl_x509store.c static VALUE
VALUE             439 ext/openssl/ossl_x509store.c ossl_x509stctx_get_err(VALUE self)
VALUE             448 ext/openssl/ossl_x509store.c static VALUE
VALUE             449 ext/openssl/ossl_x509store.c ossl_x509stctx_set_error(VALUE self, VALUE err)
VALUE             459 ext/openssl/ossl_x509store.c static VALUE
VALUE             460 ext/openssl/ossl_x509store.c ossl_x509stctx_get_err_string(VALUE self)
VALUE             471 ext/openssl/ossl_x509store.c static VALUE
VALUE             472 ext/openssl/ossl_x509store.c ossl_x509stctx_get_err_depth(VALUE self)
VALUE             481 ext/openssl/ossl_x509store.c static VALUE
VALUE             482 ext/openssl/ossl_x509store.c ossl_x509stctx_get_curr_cert(VALUE self)
VALUE             491 ext/openssl/ossl_x509store.c static VALUE
VALUE             492 ext/openssl/ossl_x509store.c ossl_x509stctx_get_curr_crl(VALUE self)
VALUE             506 ext/openssl/ossl_x509store.c static VALUE
VALUE             507 ext/openssl/ossl_x509store.c ossl_x509stctx_cleanup(VALUE self)
VALUE             517 ext/openssl/ossl_x509store.c static VALUE
VALUE             518 ext/openssl/ossl_x509store.c ossl_x509stctx_set_flags(VALUE self, VALUE flags)
VALUE             529 ext/openssl/ossl_x509store.c static VALUE
VALUE             530 ext/openssl/ossl_x509store.c ossl_x509stctx_set_purpose(VALUE self, VALUE purpose)
VALUE             541 ext/openssl/ossl_x509store.c static VALUE
VALUE             542 ext/openssl/ossl_x509store.c ossl_x509stctx_set_trust(VALUE self, VALUE trust)
VALUE             553 ext/openssl/ossl_x509store.c static VALUE
VALUE             554 ext/openssl/ossl_x509store.c ossl_x509stctx_set_time(VALUE self, VALUE time)
VALUE             572 ext/openssl/ossl_x509store.c     VALUE x509stctx;
VALUE             118 ext/pty/pty.c  static VALUE eChildExited;
VALUE             120 ext/pty/pty.c  static VALUE
VALUE             122 ext/pty/pty.c      VALUE self;
VALUE             130 ext/pty/pty.c      VALUE thread;
VALUE             138 ext/pty/pty.c      extern VALUE rb_last_status;
VALUE             140 ext/pty/pty.c      VALUE exc;
VALUE             148 ext/pty/pty.c  static VALUE
VALUE             183 ext/pty/pty.c      VALUE *argv;
VALUE             186 ext/pty/pty.c  static VALUE
VALUE             196 ext/pty/pty.c      VALUE *argv;
VALUE             202 ext/pty/pty.c      VALUE		v;
VALUE             286 ext/pty/pty.c  	rb_protect(pty_exec, (VALUE)&arg, &status);
VALUE             297 ext/pty/pty.c  static VALUE
VALUE             409 ext/pty/pty.c  static VALUE
VALUE             412 ext/pty/pty.c      VALUE *argv;
VALUE             413 ext/pty/pty.c      VALUE self;
VALUE             415 ext/pty/pty.c      VALUE res;
VALUE             419 ext/pty/pty.c      VALUE rport = rb_obj_alloc(rb_cFile);
VALUE             420 ext/pty/pty.c      VALUE wport = rb_obj_alloc(rb_cFile);
VALUE             436 ext/pty/pty.c      rb_ary_store(res,0,(VALUE)rport);
VALUE             437 ext/pty/pty.c      rb_ary_store(res,1,(VALUE)wport);
VALUE             445 ext/pty/pty.c  	rb_ensure(rb_yield, res, pty_finalize_syswait, (VALUE)&thinfo);
VALUE             452 ext/pty/pty.c  static VALUE
VALUE             454 ext/pty/pty.c      VALUE self;
VALUE             462 ext/pty/pty.c  static VALUE
VALUE             464 ext/pty/pty.c      VALUE self;
VALUE             470 ext/pty/pty.c  static VALUE cPTY;
VALUE              37 ext/racc/cparse/cparse.c static VALUE RaccBug;
VALUE              38 ext/racc/cparse/cparse.c static VALUE CparseParams;
VALUE              45 ext/racc/cparse/cparse.c static VALUE sym_raccjump;
VALUE              60 ext/racc/cparse/cparse.c static ID value_to_id _((VALUE v));
VALUE              61 ext/racc/cparse/cparse.c static inline long num_to_long _((VALUE n));
VALUE              71 ext/racc/cparse/cparse.c     VALUE v;
VALUE              92 ext/racc/cparse/cparse.c     VALUE n;
VALUE             105 ext/racc/cparse/cparse.c static VALUE get_stack_tail _((VALUE stack, long len));
VALUE             106 ext/racc/cparse/cparse.c static void cut_stack_tail _((VALUE stack, long len));
VALUE             108 ext/racc/cparse/cparse.c static VALUE
VALUE             110 ext/racc/cparse/cparse.c     VALUE stack;
VALUE             120 ext/racc/cparse/cparse.c     VALUE stack;
VALUE             144 ext/racc/cparse/cparse.c     VALUE value_v;         /* VALUE version of this struct */
VALUE             146 ext/racc/cparse/cparse.c     VALUE parser;          /* parser object */
VALUE             149 ext/racc/cparse/cparse.c     VALUE lexer;           /* scanner object */
VALUE             155 ext/racc/cparse/cparse.c     VALUE action_table;
VALUE             156 ext/racc/cparse/cparse.c     VALUE action_check;
VALUE             157 ext/racc/cparse/cparse.c     VALUE action_default;
VALUE             158 ext/racc/cparse/cparse.c     VALUE action_pointer;
VALUE             160 ext/racc/cparse/cparse.c     VALUE goto_table;
VALUE             161 ext/racc/cparse/cparse.c     VALUE goto_check;
VALUE             162 ext/racc/cparse/cparse.c     VALUE goto_default;
VALUE             163 ext/racc/cparse/cparse.c     VALUE goto_pointer;
VALUE             166 ext/racc/cparse/cparse.c     VALUE reduce_table;    /* reduce data table */
VALUE             167 ext/racc/cparse/cparse.c     VALUE token_table;     /* token conversion table */
VALUE             170 ext/racc/cparse/cparse.c     VALUE state;
VALUE             172 ext/racc/cparse/cparse.c     VALUE vstack;
VALUE             173 ext/racc/cparse/cparse.c     VALUE tstack;
VALUE             174 ext/racc/cparse/cparse.c     VALUE t;
VALUE             184 ext/racc/cparse/cparse.c     VALUE retval;           /* return value of parser routine */
VALUE             201 ext/racc/cparse/cparse.c static VALUE racc_cparse _((VALUE parser, VALUE arg, VALUE sysdebug));
VALUE             202 ext/racc/cparse/cparse.c static VALUE racc_yyparse _((VALUE parser, VALUE lexer, VALUE lexmid,
VALUE             203 ext/racc/cparse/cparse.c                              VALUE arg, VALUE sysdebug));
VALUE             206 ext/racc/cparse/cparse.c static VALUE lexer_iter _((VALUE data));
VALUE             207 ext/racc/cparse/cparse.c static VALUE lexer_i _((VALUE block_args, VALUE data, VALUE self));
VALUE             209 ext/racc/cparse/cparse.c static VALUE assert_array _((VALUE a));
VALUE             210 ext/racc/cparse/cparse.c static long assert_integer _((VALUE n));
VALUE             211 ext/racc/cparse/cparse.c static VALUE assert_hash _((VALUE h));
VALUE             213 ext/racc/cparse/cparse.c                                  VALUE parser, VALUE arg,
VALUE             214 ext/racc/cparse/cparse.c                                  VALUE lexer, VALUE lexmid));
VALUE             217 ext/racc/cparse/cparse.c                          VALUE tok, VALUE val, int resume));
VALUE             219 ext/racc/cparse/cparse.c                                   VALUE block_args, VALUE *tok, VALUE *val));
VALUE             220 ext/racc/cparse/cparse.c static void shift _((struct cparse_params* v, long act, VALUE tok, VALUE val));
VALUE             222 ext/racc/cparse/cparse.c static VALUE catch_iter _((VALUE dummy));
VALUE             223 ext/racc/cparse/cparse.c static VALUE reduce0 _((VALUE block_args, VALUE data, VALUE self));
VALUE             233 ext/racc/cparse/cparse.c static VALUE
VALUE             235 ext/racc/cparse/cparse.c     VALUE parser, arg, sysdebug;
VALUE             249 ext/racc/cparse/cparse.c static VALUE
VALUE             251 ext/racc/cparse/cparse.c     VALUE parser, lexer, lexmid, arg, sysdebug;
VALUE             278 ext/racc/cparse/cparse.c static VALUE
VALUE             280 ext/racc/cparse/cparse.c     VALUE data;
VALUE             289 ext/racc/cparse/cparse.c static VALUE
VALUE             291 ext/racc/cparse/cparse.c     VALUE block_args, data, self;
VALUE             294 ext/racc/cparse/cparse.c     VALUE tok, val;
VALUE             306 ext/racc/cparse/cparse.c static VALUE
VALUE             308 ext/racc/cparse/cparse.c     VALUE a;
VALUE             314 ext/racc/cparse/cparse.c static VALUE
VALUE             316 ext/racc/cparse/cparse.c     VALUE h;
VALUE             324 ext/racc/cparse/cparse.c     VALUE n;
VALUE             332 ext/racc/cparse/cparse.c     VALUE parser, arg, lexer, lexmid;
VALUE             385 ext/racc/cparse/cparse.c     VALUE block_args;
VALUE             386 ext/racc/cparse/cparse.c     VALUE *tok, *val;
VALUE             431 ext/racc/cparse/cparse.c     VALUE tok, val;
VALUE             436 ext/racc/cparse/cparse.c     VALUE act_value;     /* action type, VALUE version */
VALUE             438 ext/racc/cparse/cparse.c     VALUE tmp;
VALUE             642 ext/racc/cparse/cparse.c     VALUE tok, val;
VALUE             659 ext/racc/cparse/cparse.c     VALUE code;
VALUE             666 ext/racc/cparse/cparse.c static VALUE
VALUE             668 ext/racc/cparse/cparse.c     VALUE dummy;
VALUE             673 ext/racc/cparse/cparse.c static VALUE
VALUE             675 ext/racc/cparse/cparse.c     VALUE val, data, self;
VALUE             678 ext/racc/cparse/cparse.c     VALUE reduce_to, reduce_len, method_id;
VALUE             681 ext/racc/cparse/cparse.c     VALUE tmp, tmp_t, tmp_v;
VALUE             683 ext/racc/cparse/cparse.c     VALUE goto_state;
VALUE             788 ext/racc/cparse/cparse.c     VALUE Racc, Parser;
VALUE              26 ext/readline/readline.c static VALUE mReadline;
VALUE              52 ext/readline/readline.c static VALUE
VALUE              55 ext/readline/readline.c     VALUE *argv;
VALUE              56 ext/readline/readline.c     VALUE self;
VALUE              58 ext/readline/readline.c     VALUE tmp, add_hist, result;
VALUE              71 ext/readline/readline.c     buff = (char*)rb_protect((VALUE(*)_((VALUE)))readline, (VALUE)prompt,
VALUE              97 ext/readline/readline.c static VALUE
VALUE              99 ext/readline/readline.c     VALUE self, input;
VALUE             110 ext/readline/readline.c static VALUE
VALUE             112 ext/readline/readline.c     VALUE self, output;
VALUE             123 ext/readline/readline.c static VALUE
VALUE             125 ext/readline/readline.c     VALUE self;
VALUE             126 ext/readline/readline.c     VALUE proc;
VALUE             134 ext/readline/readline.c static VALUE
VALUE             136 ext/readline/readline.c     VALUE self;
VALUE             142 ext/readline/readline.c static VALUE
VALUE             144 ext/readline/readline.c     VALUE self;
VALUE             145 ext/readline/readline.c     VALUE val;
VALUE             151 ext/readline/readline.c static VALUE
VALUE             153 ext/readline/readline.c     VALUE self;
VALUE             165 ext/readline/readline.c     VALUE proc, ary, temp;
VALUE             226 ext/readline/readline.c static VALUE
VALUE             228 ext/readline/readline.c     VALUE self;
VALUE             240 ext/readline/readline.c static VALUE
VALUE             242 ext/readline/readline.c     VALUE self;
VALUE             254 ext/readline/readline.c static VALUE
VALUE             256 ext/readline/readline.c     VALUE self, str;
VALUE             278 ext/readline/readline.c static VALUE
VALUE             280 ext/readline/readline.c     VALUE self;
VALUE             283 ext/readline/readline.c     VALUE str;
VALUE             298 ext/readline/readline.c static VALUE
VALUE             300 ext/readline/readline.c     VALUE self, str;
VALUE             325 ext/readline/readline.c static VALUE
VALUE             327 ext/readline/readline.c     VALUE self, str;
VALUE             340 ext/readline/readline.c static VALUE
VALUE             342 ext/readline/readline.c     VALUE self, str;
VALUE             367 ext/readline/readline.c static VALUE
VALUE             369 ext/readline/readline.c     VALUE self, str;
VALUE             382 ext/readline/readline.c static VALUE
VALUE             384 ext/readline/readline.c     VALUE self, str;
VALUE             410 ext/readline/readline.c static VALUE
VALUE             412 ext/readline/readline.c     VALUE self, str;
VALUE             425 ext/readline/readline.c static VALUE
VALUE             427 ext/readline/readline.c     VALUE self, str;
VALUE             453 ext/readline/readline.c static VALUE
VALUE             455 ext/readline/readline.c     VALUE self, str;
VALUE             468 ext/readline/readline.c static VALUE
VALUE             470 ext/readline/readline.c     VALUE self, str;
VALUE             496 ext/readline/readline.c static VALUE
VALUE             498 ext/readline/readline.c     VALUE self, str;
VALUE             511 ext/readline/readline.c static VALUE
VALUE             513 ext/readline/readline.c     VALUE self;
VALUE             518 ext/readline/readline.c static VALUE
VALUE             520 ext/readline/readline.c     VALUE self;
VALUE             521 ext/readline/readline.c     VALUE index;
VALUE             538 ext/readline/readline.c static VALUE
VALUE             540 ext/readline/readline.c     VALUE self;
VALUE             541 ext/readline/readline.c     VALUE index;
VALUE             542 ext/readline/readline.c     VALUE str;
VALUE             565 ext/readline/readline.c static VALUE
VALUE             567 ext/readline/readline.c     VALUE self;
VALUE             568 ext/readline/readline.c     VALUE str;
VALUE             576 ext/readline/readline.c static VALUE
VALUE             579 ext/readline/readline.c     VALUE *argv;
VALUE             580 ext/readline/readline.c     VALUE self;
VALUE             582 ext/readline/readline.c     VALUE str;
VALUE             593 ext/readline/readline.c static VALUE
VALUE             599 ext/readline/readline.c     VALUE val;
VALUE             616 ext/readline/readline.c static VALUE
VALUE             618 ext/readline/readline.c     VALUE self;
VALUE             628 ext/readline/readline.c static VALUE
VALUE             630 ext/readline/readline.c     VALUE self;
VALUE             640 ext/readline/readline.c static VALUE
VALUE             642 ext/readline/readline.c     VALUE self;
VALUE             657 ext/readline/readline.c static VALUE
VALUE             659 ext/readline/readline.c     VALUE self;
VALUE             665 ext/readline/readline.c static VALUE
VALUE             667 ext/readline/readline.c     VALUE self;
VALUE             673 ext/readline/readline.c static VALUE
VALUE             675 ext/readline/readline.c     VALUE self;
VALUE             676 ext/readline/readline.c     VALUE index;
VALUE             690 ext/readline/readline.c static VALUE
VALUE             692 ext/readline/readline.c     VALUE self;
VALUE             693 ext/readline/readline.c     VALUE str;
VALUE             695 ext/readline/readline.c     VALUE result;
VALUE             717 ext/readline/readline.c static VALUE
VALUE             719 ext/readline/readline.c     VALUE self;
VALUE             720 ext/readline/readline.c     VALUE str;
VALUE             722 ext/readline/readline.c     VALUE result;
VALUE             747 ext/readline/readline.c     VALUE history, fcomp, ucomp;
VALUE              64 ext/ripper/eventids2.c ripper_init_eventids2(VALUE self)
VALUE              19 ext/sdbm/init.c static VALUE rb_cDBM, rb_eDBMError;
VALUE              52 ext/sdbm/init.c static VALUE
VALUE              54 ext/sdbm/init.c     VALUE obj;
VALUE              65 ext/sdbm/init.c static VALUE
VALUE              67 ext/sdbm/init.c     VALUE obj;
VALUE              80 ext/sdbm/init.c static VALUE fsdbm_alloc _((VALUE));
VALUE              81 ext/sdbm/init.c static VALUE
VALUE              83 ext/sdbm/init.c     VALUE klass;
VALUE              88 ext/sdbm/init.c static VALUE
VALUE              91 ext/sdbm/init.c     VALUE *argv;
VALUE              92 ext/sdbm/init.c     VALUE obj;
VALUE              94 ext/sdbm/init.c     VALUE file, vmode;
VALUE             131 ext/sdbm/init.c static VALUE
VALUE             134 ext/sdbm/init.c     VALUE *argv;
VALUE             135 ext/sdbm/init.c     VALUE klass;
VALUE             137 ext/sdbm/init.c     VALUE obj = Data_Wrap_Struct(klass, 0, free_sdbm, 0);
VALUE             150 ext/sdbm/init.c static VALUE
VALUE             152 ext/sdbm/init.c     VALUE obj, keystr, ifnone;
VALUE             172 ext/sdbm/init.c static VALUE
VALUE             174 ext/sdbm/init.c     VALUE obj, keystr;
VALUE             179 ext/sdbm/init.c static VALUE
VALUE             182 ext/sdbm/init.c     VALUE *argv;
VALUE             183 ext/sdbm/init.c     VALUE obj;
VALUE             185 ext/sdbm/init.c     VALUE keystr, valstr, ifnone;
VALUE             195 ext/sdbm/init.c static VALUE
VALUE             197 ext/sdbm/init.c     VALUE obj, valstr;
VALUE             217 ext/sdbm/init.c static VALUE
VALUE             219 ext/sdbm/init.c     VALUE obj;
VALUE             221 ext/sdbm/init.c     VALUE new = rb_ary_new();
VALUE             228 ext/sdbm/init.c 	VALUE assoc, v;
VALUE             242 ext/sdbm/init.c static VALUE
VALUE             245 ext/sdbm/init.c     VALUE *argv;
VALUE             246 ext/sdbm/init.c     VALUE obj;
VALUE             248 ext/sdbm/init.c     VALUE new = rb_ary_new2(argc);
VALUE             260 ext/sdbm/init.c     VALUE obj;
VALUE             266 ext/sdbm/init.c static VALUE
VALUE             268 ext/sdbm/init.c     VALUE obj, keystr;
VALUE             273 ext/sdbm/init.c     VALUE valstr;
VALUE             302 ext/sdbm/init.c static VALUE
VALUE             304 ext/sdbm/init.c     VALUE obj;
VALUE             309 ext/sdbm/init.c     VALUE keystr, valstr;
VALUE             326 ext/sdbm/init.c static VALUE
VALUE             328 ext/sdbm/init.c     VALUE obj;
VALUE             333 ext/sdbm/init.c     VALUE keystr, valstr;
VALUE             334 ext/sdbm/init.c     VALUE ret, ary = rb_ary_new();
VALUE             366 ext/sdbm/init.c static VALUE
VALUE             368 ext/sdbm/init.c     VALUE obj;
VALUE             387 ext/sdbm/init.c static VALUE
VALUE             389 ext/sdbm/init.c     VALUE obj;
VALUE             394 ext/sdbm/init.c     VALUE keystr, valstr;
VALUE             395 ext/sdbm/init.c     VALUE hash = rb_hash_new();
VALUE             407 ext/sdbm/init.c static VALUE each_pair _((VALUE));
VALUE             409 ext/sdbm/init.c static VALUE
VALUE             411 ext/sdbm/init.c     VALUE obj;
VALUE             416 ext/sdbm/init.c static VALUE fsdbm_store _((VALUE,VALUE,VALUE));
VALUE             418 ext/sdbm/init.c static VALUE
VALUE             420 ext/sdbm/init.c     VALUE pair, dbm;
VALUE             430 ext/sdbm/init.c static VALUE
VALUE             432 ext/sdbm/init.c     VALUE obj, other;
VALUE             438 ext/sdbm/init.c static VALUE
VALUE             440 ext/sdbm/init.c     VALUE obj, other;
VALUE             447 ext/sdbm/init.c static VALUE
VALUE             449 ext/sdbm/init.c     VALUE obj, keystr, valstr;
VALUE             483 ext/sdbm/init.c static VALUE
VALUE             485 ext/sdbm/init.c     VALUE obj;
VALUE             503 ext/sdbm/init.c static VALUE
VALUE             505 ext/sdbm/init.c     VALUE obj;
VALUE             527 ext/sdbm/init.c static VALUE
VALUE             529 ext/sdbm/init.c     VALUE obj;
VALUE             544 ext/sdbm/init.c static VALUE
VALUE             546 ext/sdbm/init.c     VALUE obj;
VALUE             560 ext/sdbm/init.c static VALUE
VALUE             562 ext/sdbm/init.c     VALUE obj;
VALUE             567 ext/sdbm/init.c     VALUE keystr, valstr;
VALUE             581 ext/sdbm/init.c static VALUE
VALUE             583 ext/sdbm/init.c     VALUE obj;
VALUE             588 ext/sdbm/init.c     VALUE ary;
VALUE             599 ext/sdbm/init.c static VALUE
VALUE             601 ext/sdbm/init.c     VALUE obj;
VALUE             606 ext/sdbm/init.c     VALUE ary;
VALUE             618 ext/sdbm/init.c static VALUE
VALUE             620 ext/sdbm/init.c     VALUE obj, keystr;
VALUE             636 ext/sdbm/init.c static VALUE
VALUE             638 ext/sdbm/init.c     VALUE obj, valstr;
VALUE             658 ext/sdbm/init.c static VALUE
VALUE             660 ext/sdbm/init.c     VALUE obj;
VALUE             665 ext/sdbm/init.c     VALUE ary;
VALUE             678 ext/sdbm/init.c static VALUE
VALUE             680 ext/sdbm/init.c     VALUE obj;
VALUE             685 ext/sdbm/init.c     VALUE hash;
VALUE             698 ext/sdbm/init.c static VALUE
VALUE             700 ext/sdbm/init.c     VALUE obj;
VALUE              76 ext/socket/socket.c VALUE rb_cBasicSocket;
VALUE              77 ext/socket/socket.c VALUE rb_cIPSocket;
VALUE              78 ext/socket/socket.c VALUE rb_cTCPSocket;
VALUE              79 ext/socket/socket.c VALUE rb_cTCPServer;
VALUE              80 ext/socket/socket.c VALUE rb_cUDPSocket;
VALUE              82 ext/socket/socket.c VALUE rb_cUNIXSocket;
VALUE              83 ext/socket/socket.c VALUE rb_cUNIXServer;
VALUE              85 ext/socket/socket.c VALUE rb_cSocket;
VALUE              87 ext/socket/socket.c static VALUE rb_eSocket;
VALUE              90 ext/socket/socket.c VALUE rb_cSOCKSSocket;
VALUE             201 ext/socket/socket.c static VALUE
VALUE             203 ext/socket/socket.c     VALUE sock;
VALUE             219 ext/socket/socket.c static VALUE
VALUE             221 ext/socket/socket.c     VALUE klass, fd;
VALUE             224 ext/socket/socket.c     VALUE sock = init_sock(rb_obj_alloc(klass), NUM2INT(fd));
VALUE             231 ext/socket/socket.c static VALUE
VALUE             234 ext/socket/socket.c     VALUE *argv;
VALUE             235 ext/socket/socket.c     VALUE sock;
VALUE             237 ext/socket/socket.c     VALUE howto;
VALUE             260 ext/socket/socket.c static VALUE
VALUE             262 ext/socket/socket.c     VALUE sock;
VALUE             279 ext/socket/socket.c static VALUE
VALUE             281 ext/socket/socket.c     VALUE sock;
VALUE             343 ext/socket/socket.c static VALUE
VALUE             345 ext/socket/socket.c     VALUE sock, lev, optname, val;
VALUE             423 ext/socket/socket.c static VALUE
VALUE             425 ext/socket/socket.c     VALUE sock, lev, optname;
VALUE             448 ext/socket/socket.c static VALUE
VALUE             450 ext/socket/socket.c     VALUE sock;
VALUE             462 ext/socket/socket.c static VALUE
VALUE             464 ext/socket/socket.c     VALUE sock;
VALUE             476 ext/socket/socket.c static VALUE
VALUE             479 ext/socket/socket.c     VALUE *argv;
VALUE             480 ext/socket/socket.c     VALUE sock;
VALUE             482 ext/socket/socket.c     VALUE mesg, to;
VALUE             483 ext/socket/socket.c     VALUE flags;
VALUE             516 ext/socket/socket.c static VALUE
VALUE             518 ext/socket/socket.c     VALUE sock;
VALUE             526 ext/socket/socket.c static VALUE
VALUE             528 ext/socket/socket.c     VALUE sock;
VALUE             529 ext/socket/socket.c     VALUE state;
VALUE             544 ext/socket/socket.c static VALUE ipaddr _((struct sockaddr*, int));
VALUE             546 ext/socket/socket.c static VALUE unixaddr _((struct sockaddr_un*));
VALUE             556 ext/socket/socket.c static VALUE
VALUE             558 ext/socket/socket.c     VALUE sock;
VALUE             560 ext/socket/socket.c     VALUE *argv;
VALUE             564 ext/socket/socket.c     VALUE str;
VALUE             567 ext/socket/socket.c     VALUE len, flg;
VALUE             609 ext/socket/socket.c 	return (VALUE)str;
VALUE             632 ext/socket/socket.c static VALUE
VALUE             635 ext/socket/socket.c     VALUE *argv;
VALUE             636 ext/socket/socket.c     VALUE sock;
VALUE             641 ext/socket/socket.c static VALUE
VALUE             647 ext/socket/socket.c static VALUE
VALUE             649 ext/socket/socket.c     VALUE self, val;
VALUE             682 ext/socket/socket.c static VALUE
VALUE             725 ext/socket/socket.c     VALUE host;
VALUE             761 ext/socket/socket.c     VALUE port;
VALUE             794 ext/socket/socket.c     VALUE host, port;
VALUE             842 ext/socket/socket.c static VALUE
VALUE             847 ext/socket/socket.c     VALUE family, port, addr1, addr2;
VALUE             848 ext/socket/socket.c     VALUE ary;
VALUE             960 ext/socket/socket.c static VALUE
VALUE             962 ext/socket/socket.c     VALUE arg;
VALUE             965 ext/socket/socket.c     return (VALUE)wait_connectable0(p->fd, &p->fds_w, &p->fds_e);
VALUE             968 ext/socket/socket.c static VALUE
VALUE             970 ext/socket/socket.c     VALUE arg;
VALUE             989 ext/socket/socket.c     return (int)rb_ensure(try_wait_connectable, (VALUE)&arg,
VALUE             990 ext/socket/socket.c 			  wait_connectable_ensure,(VALUE)&arg);
VALUE            1126 ext/socket/socket.c     VALUE sock;
VALUE            1128 ext/socket/socket.c 	VALUE host, serv;
VALUE            1135 ext/socket/socket.c static VALUE
VALUE            1153 ext/socket/socket.c static VALUE
VALUE            1223 ext/socket/socket.c static VALUE
VALUE            1225 ext/socket/socket.c     VALUE sock, remote_host, remote_serv, local_host, local_serv;
VALUE            1238 ext/socket/socket.c     return rb_ensure(init_inetsock_internal, (VALUE)&arg,
VALUE            1239 ext/socket/socket.c 		     inetsock_cleanup, (VALUE)&arg);
VALUE            1242 ext/socket/socket.c static VALUE
VALUE            1245 ext/socket/socket.c      VALUE *argv;
VALUE            1246 ext/socket/socket.c      VALUE sock;
VALUE            1248 ext/socket/socket.c     VALUE remote_host, remote_serv;
VALUE            1249 ext/socket/socket.c     VALUE local_host, local_serv;
VALUE            1259 ext/socket/socket.c static VALUE
VALUE            1261 ext/socket/socket.c     VALUE sock, host, serv;
VALUE            1274 ext/socket/socket.c static VALUE
VALUE            1276 ext/socket/socket.c     VALUE sock;
VALUE            1291 ext/socket/socket.c     VALUE host;
VALUE            1293 ext/socket/socket.c     VALUE (*ipaddr)_((struct sockaddr*, size_t));
VALUE            1296 ext/socket/socket.c static VALUE
VALUE            1300 ext/socket/socket.c     VALUE host = arg->host;
VALUE            1302 ext/socket/socket.c     VALUE (*ipaddr)_((struct sockaddr*, size_t)) = arg->ipaddr;
VALUE            1306 ext/socket/socket.c     VALUE ary, names;
VALUE            1340 ext/socket/socket.c static VALUE
VALUE            1342 ext/socket/socket.c     VALUE host;
VALUE            1344 ext/socket/socket.c     VALUE (*ipaddr)_((struct sockaddr*, size_t));
VALUE            1351 ext/socket/socket.c     return rb_ensure(make_hostent_internal, (VALUE)&arg,
VALUE            1352 ext/socket/socket.c 		     RUBY_METHOD_FUNC(freeaddrinfo), (VALUE)addr);
VALUE            1355 ext/socket/socket.c VALUE
VALUE            1363 ext/socket/socket.c static VALUE
VALUE            1365 ext/socket/socket.c     VALUE obj, host;
VALUE            1371 ext/socket/socket.c static VALUE
VALUE            1374 ext/socket/socket.c     VALUE *argv;
VALUE            1375 ext/socket/socket.c     VALUE sock;
VALUE            1377 ext/socket/socket.c     VALUE arg1, arg2;
VALUE            1385 ext/socket/socket.c static VALUE
VALUE            1387 ext/socket/socket.c     VALUE klass;
VALUE            1426 ext/socket/socket.c static VALUE
VALUE            1428 ext/socket/socket.c     VALUE sock;
VALUE            1440 ext/socket/socket.c static VALUE
VALUE            1442 ext/socket/socket.c     VALUE sock;
VALUE            1459 ext/socket/socket.c static VALUE
VALUE            1463 ext/socket/socket.c     return (VALUE)ruby_connect(arg->fd, arg->sockaddr, sizeof(*arg->sockaddr), 0);
VALUE            1466 ext/socket/socket.c static VALUE
VALUE            1468 ext/socket/socket.c     VALUE sock;
VALUE            1469 ext/socket/socket.c     VALUE path;
VALUE            1495 ext/socket/socket.c         status = rb_protect(unixsock_connect_internal, (VALUE)&arg, &prot);
VALUE            1517 ext/socket/socket.c static VALUE
VALUE            1519 ext/socket/socket.c     VALUE sock;
VALUE            1532 ext/socket/socket.c static VALUE
VALUE            1534 ext/socket/socket.c     VALUE sock;
VALUE            1547 ext/socket/socket.c static VALUE
VALUE            1550 ext/socket/socket.c     VALUE *argv;
VALUE            1551 ext/socket/socket.c     VALUE sock;
VALUE            1556 ext/socket/socket.c static VALUE
VALUE            1558 ext/socket/socket.c     VALUE obj, host;
VALUE            1570 ext/socket/socket.c static VALUE
VALUE            1573 ext/socket/socket.c     VALUE *argv;
VALUE            1574 ext/socket/socket.c     VALUE sock;
VALUE            1576 ext/socket/socket.c     VALUE arg;
VALUE            1598 ext/socket/socket.c static VALUE
VALUE            1613 ext/socket/socket.c static VALUE
VALUE            1615 ext/socket/socket.c     VALUE sock, host, port;
VALUE            1619 ext/socket/socket.c     VALUE ret;
VALUE            1625 ext/socket/socket.c     ret = rb_ensure(udp_connect_internal, (VALUE)&arg,
VALUE            1626 ext/socket/socket.c 		    RUBY_METHOD_FUNC(freeaddrinfo), (VALUE)arg.res);
VALUE            1631 ext/socket/socket.c static VALUE
VALUE            1633 ext/socket/socket.c     VALUE sock, host, port;
VALUE            1653 ext/socket/socket.c static VALUE
VALUE            1656 ext/socket/socket.c     VALUE *argv;
VALUE            1657 ext/socket/socket.c     VALUE sock;
VALUE            1659 ext/socket/socket.c     VALUE mesg, flags, host, port;
VALUE            1691 ext/socket/socket.c static VALUE
VALUE            1693 ext/socket/socket.c     VALUE sock, path;
VALUE            1698 ext/socket/socket.c static VALUE
VALUE            1700 ext/socket/socket.c     VALUE sock;
VALUE            1715 ext/socket/socket.c static VALUE
VALUE            1717 ext/socket/socket.c     VALUE sock, path;
VALUE            1722 ext/socket/socket.c static VALUE
VALUE            1725 ext/socket/socket.c     VALUE *argv;
VALUE            1726 ext/socket/socket.c     VALUE sock;
VALUE            1743 ext/socket/socket.c static VALUE
VALUE            1745 ext/socket/socket.c     VALUE sock, val;
VALUE            1808 ext/socket/socket.c static VALUE
VALUE            1811 ext/socket/socket.c     VALUE *argv;
VALUE            1812 ext/socket/socket.c     VALUE sock;
VALUE            1815 ext/socket/socket.c     VALUE klass, mode;
VALUE            1902 ext/socket/socket.c 	VALUE ff_argv[2];
VALUE            1916 ext/socket/socket.c static VALUE
VALUE            1918 ext/socket/socket.c     VALUE sock;
VALUE            1930 ext/socket/socket.c static VALUE
VALUE            1932 ext/socket/socket.c     VALUE sock;
VALUE            1944 ext/socket/socket.c static VALUE
VALUE            1953 ext/socket/socket.c static VALUE
VALUE            1955 ext/socket/socket.c     VALUE sock;
VALUE            1970 ext/socket/socket.c static VALUE
VALUE            1972 ext/socket/socket.c     VALUE sock;
VALUE            1990 ext/socket/socket.c     VALUE domain, type;
VALUE            1993 ext/socket/socket.c     VALUE tmp;
VALUE            2080 ext/socket/socket.c static VALUE
VALUE            2082 ext/socket/socket.c     VALUE sock, domain, type, protocol;
VALUE            2095 ext/socket/socket.c static VALUE
VALUE            2097 ext/socket/socket.c     VALUE klass, domain, type, protocol;
VALUE            2120 ext/socket/socket.c static VALUE
VALUE            2123 ext/socket/socket.c     VALUE *argv;
VALUE            2124 ext/socket/socket.c     VALUE klass;
VALUE            2126 ext/socket/socket.c     VALUE domain, type, protocol;
VALUE            2250 ext/socket/socket.c static VALUE
VALUE            2252 ext/socket/socket.c     VALUE sock, addr;
VALUE            2256 ext/socket/socket.c     volatile VALUE tmpaddr;
VALUE            2349 ext/socket/socket.c static VALUE
VALUE            2351 ext/socket/socket.c     VALUE sock, addr;
VALUE            2433 ext/socket/socket.c static VALUE
VALUE            2435 ext/socket/socket.c     VALUE sock, log;
VALUE            2554 ext/socket/socket.c static VALUE
VALUE            2557 ext/socket/socket.c     VALUE *argv;
VALUE            2558 ext/socket/socket.c     VALUE sock;
VALUE            2563 ext/socket/socket.c static VALUE
VALUE            2565 ext/socket/socket.c     VALUE sock;
VALUE            2568 ext/socket/socket.c     VALUE sock2;
VALUE            2616 ext/socket/socket.c static VALUE
VALUE            2618 ext/socket/socket.c     VALUE sock;
VALUE            2621 ext/socket/socket.c     VALUE sock2;
VALUE            2632 ext/socket/socket.c static VALUE
VALUE            2634 ext/socket/socket.c     VALUE obj;
VALUE            2650 ext/socket/socket.c static VALUE
VALUE            2652 ext/socket/socket.c     VALUE obj;
VALUE            2661 ext/socket/socket.c static VALUE
VALUE            2663 ext/socket/socket.c     VALUE obj;
VALUE            2670 ext/socket/socket.c static VALUE
VALUE            2674 ext/socket/socket.c     VALUE base, ary;
VALUE            2694 ext/socket/socket.c VALUE
VALUE            2719 ext/socket/socket.c static VALUE
VALUE            2721 ext/socket/socket.c     VALUE obj, host;
VALUE            2727 ext/socket/socket.c static VALUE
VALUE            2730 ext/socket/socket.c     VALUE *argv;
VALUE            2732 ext/socket/socket.c     VALUE addr, type;
VALUE            2736 ext/socket/socket.c     VALUE ary, names;
VALUE            2779 ext/socket/socket.c static VALUE
VALUE            2782 ext/socket/socket.c     VALUE *argv;
VALUE            2784 ext/socket/socket.c     VALUE service, proto;
VALUE            2809 ext/socket/socket.c static VALUE
VALUE            2812 ext/socket/socket.c     VALUE *argv;
VALUE            2814 ext/socket/socket.c     VALUE port, proto;
VALUE            2828 ext/socket/socket.c static VALUE
VALUE            2831 ext/socket/socket.c     VALUE *argv;
VALUE            2833 ext/socket/socket.c     VALUE host, port, family, socktype, protocol, flags, ret;
VALUE            2899 ext/socket/socket.c static VALUE
VALUE            2902 ext/socket/socket.c     VALUE *argv;
VALUE            2904 ext/socket/socket.c     VALUE sa, af = Qnil, host = Qnil, port = Qnil, flags, tmp;
VALUE            3043 ext/socket/socket.c static VALUE
VALUE            3045 ext/socket/socket.c     VALUE self, port, host;
VALUE            3048 ext/socket/socket.c     VALUE addr = rb_str_new((char*)res->ai_addr, res->ai_addrlen);
VALUE            3057 ext/socket/socket.c static VALUE
VALUE            3059 ext/socket/socket.c     VALUE self, addr;
VALUE            3062 ext/socket/socket.c     VALUE host;
VALUE            3071 ext/socket/socket.c static VALUE
VALUE            3073 ext/socket/socket.c     VALUE self, path;
VALUE            3076 ext/socket/socket.c     VALUE addr;
VALUE            3087 ext/socket/socket.c static VALUE
VALUE            3089 ext/socket/socket.c     VALUE self, addr;
VALUE            3092 ext/socket/socket.c     VALUE path;
VALUE            3106 ext/socket/socket.c static VALUE mConst;
VALUE              24 ext/stringio/stringio.c     VALUE string;
VALUE              34 ext/stringio/stringio.c static struct StringIO* check_strio _((VALUE));
VALUE              35 ext/stringio/stringio.c static struct StringIO* get_strio _((VALUE));
VALUE              75 ext/stringio/stringio.c     VALUE self;
VALUE              87 ext/stringio/stringio.c     VALUE self;
VALUE             135 ext/stringio/stringio.c static VALUE strio_s_allocate _((VALUE));
VALUE             136 ext/stringio/stringio.c static VALUE strio_s_open _((int, VALUE *, VALUE));
VALUE             137 ext/stringio/stringio.c static VALUE strio_initialize _((int, VALUE *, VALUE));
VALUE             138 ext/stringio/stringio.c static VALUE strio_finalize _((VALUE));
VALUE             139 ext/stringio/stringio.c static VALUE strio_self _((VALUE));
VALUE             140 ext/stringio/stringio.c static VALUE strio_false _((VALUE));
VALUE             141 ext/stringio/stringio.c static VALUE strio_nil _((VALUE));
VALUE             142 ext/stringio/stringio.c static VALUE strio_0 _((VALUE));
VALUE             143 ext/stringio/stringio.c static VALUE strio_first _((VALUE, VALUE));
VALUE             144 ext/stringio/stringio.c static VALUE strio_unimpl _((int, VALUE *, VALUE));
VALUE             145 ext/stringio/stringio.c static VALUE strio_get_string _((VALUE));
VALUE             146 ext/stringio/stringio.c static VALUE strio_set_string _((VALUE, VALUE));
VALUE             147 ext/stringio/stringio.c static VALUE strio_close _((VALUE));
VALUE             148 ext/stringio/stringio.c static VALUE strio_close_read _((VALUE));
VALUE             149 ext/stringio/stringio.c static VALUE strio_close_write _((VALUE));
VALUE             150 ext/stringio/stringio.c static VALUE strio_closed _((VALUE));
VALUE             151 ext/stringio/stringio.c static VALUE strio_closed_read _((VALUE));
VALUE             152 ext/stringio/stringio.c static VALUE strio_closed_write _((VALUE));
VALUE             153 ext/stringio/stringio.c static VALUE strio_eof _((VALUE));
VALUE             154 ext/stringio/stringio.c static VALUE strio_get_lineno _((VALUE));
VALUE             155 ext/stringio/stringio.c static VALUE strio_set_lineno _((VALUE, VALUE));
VALUE             156 ext/stringio/stringio.c static VALUE strio_get_pos _((VALUE));
VALUE             157 ext/stringio/stringio.c static VALUE strio_set_pos _((VALUE, VALUE));
VALUE             158 ext/stringio/stringio.c static VALUE strio_rewind _((VALUE));
VALUE             159 ext/stringio/stringio.c static VALUE strio_seek _((int, VALUE *, VALUE));
VALUE             160 ext/stringio/stringio.c static VALUE strio_get_sync _((VALUE));
VALUE             161 ext/stringio/stringio.c static VALUE strio_each_byte _((VALUE));
VALUE             162 ext/stringio/stringio.c static VALUE strio_getc _((VALUE));
VALUE             163 ext/stringio/stringio.c static VALUE strio_ungetc _((VALUE, VALUE));
VALUE             164 ext/stringio/stringio.c static VALUE strio_readchar _((VALUE));
VALUE             165 ext/stringio/stringio.c static VALUE strio_getline _((int, VALUE *, struct StringIO *));
VALUE             166 ext/stringio/stringio.c static VALUE strio_gets _((int, VALUE *, VALUE));
VALUE             167 ext/stringio/stringio.c static VALUE strio_readline _((int, VALUE *, VALUE));
VALUE             168 ext/stringio/stringio.c static VALUE strio_each _((int, VALUE *, VALUE));
VALUE             169 ext/stringio/stringio.c static VALUE strio_readlines _((int, VALUE *, VALUE));
VALUE             170 ext/stringio/stringio.c static VALUE strio_write _((VALUE, VALUE));
VALUE             171 ext/stringio/stringio.c static VALUE strio_putc _((VALUE, VALUE));
VALUE             172 ext/stringio/stringio.c static VALUE strio_read _((int, VALUE *, VALUE));
VALUE             173 ext/stringio/stringio.c static VALUE strio_size _((VALUE));
VALUE             174 ext/stringio/stringio.c static VALUE strio_truncate _((VALUE, VALUE));
VALUE             181 ext/stringio/stringio.c static VALUE
VALUE             183 ext/stringio/stringio.c     VALUE klass;
VALUE             195 ext/stringio/stringio.c static VALUE
VALUE             198 ext/stringio/stringio.c     VALUE *argv;
VALUE             199 ext/stringio/stringio.c     VALUE klass;
VALUE             201 ext/stringio/stringio.c     VALUE obj = rb_class_new_instance(argc, argv, klass);
VALUE             211 ext/stringio/stringio.c static VALUE
VALUE             214 ext/stringio/stringio.c     VALUE *argv;
VALUE             215 ext/stringio/stringio.c     VALUE self;
VALUE             218 ext/stringio/stringio.c     VALUE string, mode;
VALUE             259 ext/stringio/stringio.c static VALUE
VALUE             261 ext/stringio/stringio.c     VALUE self;
VALUE             272 ext/stringio/stringio.c static VALUE
VALUE             274 ext/stringio/stringio.c     VALUE self;
VALUE             283 ext/stringio/stringio.c static VALUE
VALUE             285 ext/stringio/stringio.c     VALUE self;
VALUE             294 ext/stringio/stringio.c static VALUE
VALUE             296 ext/stringio/stringio.c     VALUE self;
VALUE             305 ext/stringio/stringio.c static VALUE
VALUE             307 ext/stringio/stringio.c     VALUE self;
VALUE             316 ext/stringio/stringio.c static VALUE
VALUE             318 ext/stringio/stringio.c     VALUE self, arg;
VALUE             327 ext/stringio/stringio.c static VALUE
VALUE             330 ext/stringio/stringio.c     VALUE *argv;
VALUE             331 ext/stringio/stringio.c     VALUE self;
VALUE             343 ext/stringio/stringio.c static VALUE
VALUE             345 ext/stringio/stringio.c     VALUE self;
VALUE             356 ext/stringio/stringio.c static VALUE
VALUE             358 ext/stringio/stringio.c     VALUE self, string;
VALUE             378 ext/stringio/stringio.c static VALUE
VALUE             380 ext/stringio/stringio.c     VALUE self;
VALUE             397 ext/stringio/stringio.c static VALUE
VALUE             399 ext/stringio/stringio.c     VALUE self;
VALUE             416 ext/stringio/stringio.c static VALUE
VALUE             418 ext/stringio/stringio.c     VALUE self;
VALUE             434 ext/stringio/stringio.c static VALUE
VALUE             436 ext/stringio/stringio.c     VALUE self;
VALUE             449 ext/stringio/stringio.c static VALUE
VALUE             451 ext/stringio/stringio.c     VALUE self;
VALUE             464 ext/stringio/stringio.c static VALUE
VALUE             466 ext/stringio/stringio.c     VALUE self;
VALUE             481 ext/stringio/stringio.c static VALUE
VALUE             483 ext/stringio/stringio.c     VALUE self;
VALUE             491 ext/stringio/stringio.c static VALUE
VALUE             493 ext/stringio/stringio.c     VALUE copy, orig;
VALUE             519 ext/stringio/stringio.c static VALUE
VALUE             521 ext/stringio/stringio.c     VALUE self;
VALUE             533 ext/stringio/stringio.c static VALUE
VALUE             535 ext/stringio/stringio.c     VALUE self, lineno;
VALUE             561 ext/stringio/stringio.c static VALUE
VALUE             564 ext/stringio/stringio.c     VALUE *argv;
VALUE             565 ext/stringio/stringio.c     VALUE self;
VALUE             581 ext/stringio/stringio.c static VALUE
VALUE             583 ext/stringio/stringio.c     VALUE self;
VALUE             594 ext/stringio/stringio.c static VALUE
VALUE             596 ext/stringio/stringio.c     VALUE self;
VALUE             597 ext/stringio/stringio.c     VALUE pos;
VALUE             615 ext/stringio/stringio.c static VALUE
VALUE             617 ext/stringio/stringio.c     VALUE self;
VALUE             632 ext/stringio/stringio.c static VALUE
VALUE             635 ext/stringio/stringio.c     VALUE *argv;
VALUE             636 ext/stringio/stringio.c     VALUE self;
VALUE             638 ext/stringio/stringio.c     VALUE whence;
VALUE             669 ext/stringio/stringio.c static VALUE
VALUE             671 ext/stringio/stringio.c     VALUE self;
VALUE             688 ext/stringio/stringio.c static VALUE
VALUE             690 ext/stringio/stringio.c     VALUE self;
VALUE             706 ext/stringio/stringio.c static VALUE
VALUE             708 ext/stringio/stringio.c     VALUE self;
VALUE             748 ext/stringio/stringio.c static VALUE
VALUE             750 ext/stringio/stringio.c     VALUE self, ch;
VALUE             775 ext/stringio/stringio.c static VALUE
VALUE             777 ext/stringio/stringio.c     VALUE self;
VALUE             779 ext/stringio/stringio.c     VALUE c = strio_getc(self);
VALUE             824 ext/stringio/stringio.c static VALUE
VALUE             827 ext/stringio/stringio.c     VALUE *argv;
VALUE             832 ext/stringio/stringio.c     VALUE str;
VALUE             905 ext/stringio/stringio.c static VALUE
VALUE             908 ext/stringio/stringio.c     VALUE *argv;
VALUE             909 ext/stringio/stringio.c     VALUE self;
VALUE             911 ext/stringio/stringio.c     VALUE str = strio_getline(argc, argv, readable(StringIO(self)));
VALUE             923 ext/stringio/stringio.c static VALUE
VALUE             926 ext/stringio/stringio.c     VALUE *argv;
VALUE             927 ext/stringio/stringio.c     VALUE self;
VALUE             929 ext/stringio/stringio.c     VALUE line = strio_getline(argc, argv, readable(StringIO(self)));
VALUE             941 ext/stringio/stringio.c static VALUE
VALUE             944 ext/stringio/stringio.c     VALUE *argv;
VALUE             945 ext/stringio/stringio.c     VALUE self;
VALUE             948 ext/stringio/stringio.c     VALUE line;
VALUE             962 ext/stringio/stringio.c static VALUE
VALUE             965 ext/stringio/stringio.c     VALUE *argv;
VALUE             966 ext/stringio/stringio.c     VALUE self;
VALUE             969 ext/stringio/stringio.c     VALUE ary = rb_ary_new(), line;
VALUE             986 ext/stringio/stringio.c static VALUE
VALUE             988 ext/stringio/stringio.c     VALUE self, str;
VALUE            1045 ext/stringio/stringio.c static VALUE
VALUE            1047 ext/stringio/stringio.c     VALUE self, ch;
VALUE            1078 ext/stringio/stringio.c static VALUE
VALUE            1081 ext/stringio/stringio.c     VALUE *argv;
VALUE            1082 ext/stringio/stringio.c     VALUE self;
VALUE            1085 ext/stringio/stringio.c     VALUE str = Qnil;
VALUE            1151 ext/stringio/stringio.c static VALUE
VALUE            1154 ext/stringio/stringio.c     VALUE *argv;
VALUE            1155 ext/stringio/stringio.c     VALUE self;
VALUE            1157 ext/stringio/stringio.c     VALUE val = strio_read(argc, argv, self);
VALUE            1189 ext/stringio/stringio.c static VALUE
VALUE            1191 ext/stringio/stringio.c     VALUE self;
VALUE            1193 ext/stringio/stringio.c     VALUE string = StringIO(self)->string;
VALUE            1207 ext/stringio/stringio.c static VALUE
VALUE            1209 ext/stringio/stringio.c     VALUE self, len;
VALUE            1211 ext/stringio/stringio.c     VALUE string = writable(StringIO(self))->string;
VALUE            1230 ext/stringio/stringio.c     VALUE StringIO = rb_define_class("StringIO", rb_cData);
VALUE              20 ext/strscan/strscan.c static VALUE StringScanner;
VALUE              21 ext/strscan/strscan.c static VALUE ScanError;
VALUE              30 ext/strscan/strscan.c     VALUE str;
VALUE              61 ext/strscan/strscan.c static VALUE infect _((VALUE str, struct strscanner *p));
VALUE              62 ext/strscan/strscan.c static VALUE extract_range _((struct strscanner *p, long beg_i, long end_i));
VALUE              63 ext/strscan/strscan.c static VALUE extract_beg_len _((struct strscanner *p, long beg_i, long len));
VALUE              65 ext/strscan/strscan.c void check_strscan _((VALUE obj));
VALUE              68 ext/strscan/strscan.c static VALUE strscan_s_allocate _((VALUE klass));
VALUE              69 ext/strscan/strscan.c static VALUE strscan_initialize _((int argc, VALUE *argv, VALUE self));
VALUE              70 ext/strscan/strscan.c static VALUE strscan_init_copy _((VALUE vself, VALUE vorig));
VALUE              72 ext/strscan/strscan.c static VALUE strscan_s_mustc _((VALUE self));
VALUE              73 ext/strscan/strscan.c static VALUE strscan_terminate _((VALUE self));
VALUE              74 ext/strscan/strscan.c static VALUE strscan_clear _((VALUE self));
VALUE              75 ext/strscan/strscan.c static VALUE strscan_get_string _((VALUE self));
VALUE              76 ext/strscan/strscan.c static VALUE strscan_set_string _((VALUE self, VALUE str));
VALUE              77 ext/strscan/strscan.c static VALUE strscan_concat _((VALUE self, VALUE str));
VALUE              78 ext/strscan/strscan.c static VALUE strscan_get_pos _((VALUE self));
VALUE              79 ext/strscan/strscan.c static VALUE strscan_set_pos _((VALUE self, VALUE pos));
VALUE              80 ext/strscan/strscan.c static VALUE strscan_do_scan _((VALUE self, VALUE regex,
VALUE              82 ext/strscan/strscan.c static VALUE strscan_scan _((VALUE self, VALUE re));
VALUE              83 ext/strscan/strscan.c static VALUE strscan_match_p _((VALUE self, VALUE re));
VALUE              84 ext/strscan/strscan.c static VALUE strscan_skip _((VALUE self, VALUE re));
VALUE              85 ext/strscan/strscan.c static VALUE strscan_check _((VALUE self, VALUE re));
VALUE              86 ext/strscan/strscan.c static VALUE strscan_scan_full _((VALUE self, VALUE re,
VALUE              87 ext/strscan/strscan.c                                   VALUE succp, VALUE getp));
VALUE              88 ext/strscan/strscan.c static VALUE strscan_scan_until _((VALUE self, VALUE re));
VALUE              89 ext/strscan/strscan.c static VALUE strscan_skip_until _((VALUE self, VALUE re));
VALUE              90 ext/strscan/strscan.c static VALUE strscan_check_until _((VALUE self, VALUE re));
VALUE              91 ext/strscan/strscan.c static VALUE strscan_search_full _((VALUE self, VALUE re,
VALUE              92 ext/strscan/strscan.c                                     VALUE succp, VALUE getp));
VALUE              94 ext/strscan/strscan.c static VALUE strscan_getch _((VALUE self));
VALUE              95 ext/strscan/strscan.c static VALUE strscan_get_byte _((VALUE self));
VALUE              96 ext/strscan/strscan.c static VALUE strscan_getbyte _((VALUE self));
VALUE              97 ext/strscan/strscan.c static VALUE strscan_peek _((VALUE self, VALUE len));
VALUE              98 ext/strscan/strscan.c static VALUE strscan_peep _((VALUE self, VALUE len));
VALUE              99 ext/strscan/strscan.c static VALUE strscan_unscan _((VALUE self));
VALUE             100 ext/strscan/strscan.c static VALUE strscan_bol_p _((VALUE self));
VALUE             101 ext/strscan/strscan.c static VALUE strscan_eos_p _((VALUE self));
VALUE             102 ext/strscan/strscan.c static VALUE strscan_empty_p _((VALUE self));
VALUE             103 ext/strscan/strscan.c static VALUE strscan_rest_p _((VALUE self));
VALUE             104 ext/strscan/strscan.c static VALUE strscan_matched_p _((VALUE self));
VALUE             105 ext/strscan/strscan.c static VALUE strscan_matched _((VALUE self));
VALUE             106 ext/strscan/strscan.c static VALUE strscan_matched_size _((VALUE self));
VALUE             107 ext/strscan/strscan.c static VALUE strscan_aref _((VALUE self, VALUE idx));
VALUE             108 ext/strscan/strscan.c static VALUE strscan_pre_match _((VALUE self));
VALUE             109 ext/strscan/strscan.c static VALUE strscan_post_match _((VALUE self));
VALUE             110 ext/strscan/strscan.c static VALUE strscan_rest _((VALUE self));
VALUE             111 ext/strscan/strscan.c static VALUE strscan_rest_size _((VALUE self));
VALUE             113 ext/strscan/strscan.c static VALUE strscan_inspect _((VALUE self));
VALUE             114 ext/strscan/strscan.c static VALUE inspect1 _((struct strscanner *p));
VALUE             115 ext/strscan/strscan.c static VALUE inspect2 _((struct strscanner *p));
VALUE             121 ext/strscan/strscan.c static VALUE
VALUE             123 ext/strscan/strscan.c     VALUE str;
VALUE             130 ext/strscan/strscan.c static VALUE
VALUE             141 ext/strscan/strscan.c static VALUE
VALUE             171 ext/strscan/strscan.c static VALUE
VALUE             173 ext/strscan/strscan.c     VALUE klass;
VALUE             191 ext/strscan/strscan.c static VALUE
VALUE             194 ext/strscan/strscan.c     VALUE *argv;
VALUE             195 ext/strscan/strscan.c     VALUE self;
VALUE             198 ext/strscan/strscan.c     VALUE str, need_dup;
VALUE             210 ext/strscan/strscan.c     VALUE obj;
VALUE             226 ext/strscan/strscan.c static VALUE
VALUE             228 ext/strscan/strscan.c     VALUE vself, vorig;
VALUE             255 ext/strscan/strscan.c static VALUE
VALUE             257 ext/strscan/strscan.c     VALUE self;
VALUE             265 ext/strscan/strscan.c static VALUE
VALUE             267 ext/strscan/strscan.c     VALUE self;
VALUE             284 ext/strscan/strscan.c static VALUE
VALUE             286 ext/strscan/strscan.c     VALUE self;
VALUE             300 ext/strscan/strscan.c static VALUE
VALUE             302 ext/strscan/strscan.c     VALUE self;
VALUE             311 ext/strscan/strscan.c static VALUE
VALUE             313 ext/strscan/strscan.c     VALUE self;
VALUE             327 ext/strscan/strscan.c static VALUE
VALUE             329 ext/strscan/strscan.c     VALUE self, str;
VALUE             356 ext/strscan/strscan.c static VALUE
VALUE             358 ext/strscan/strscan.c     VALUE self, str;
VALUE             382 ext/strscan/strscan.c static VALUE
VALUE             384 ext/strscan/strscan.c     VALUE self;
VALUE             401 ext/strscan/strscan.c static VALUE
VALUE             403 ext/strscan/strscan.c     VALUE self, v;
VALUE             420 ext/strscan/strscan.c static VALUE
VALUE             422 ext/strscan/strscan.c     VALUE self, regex;
VALUE             482 ext/strscan/strscan.c static VALUE
VALUE             484 ext/strscan/strscan.c     VALUE self, re;
VALUE             500 ext/strscan/strscan.c static VALUE
VALUE             502 ext/strscan/strscan.c     VALUE self, re;
VALUE             524 ext/strscan/strscan.c static VALUE
VALUE             526 ext/strscan/strscan.c     VALUE self, re;
VALUE             546 ext/strscan/strscan.c static VALUE
VALUE             548 ext/strscan/strscan.c     VALUE self, re;
VALUE             563 ext/strscan/strscan.c static VALUE
VALUE             565 ext/strscan/strscan.c     VALUE self, re, s, f;
VALUE             582 ext/strscan/strscan.c static VALUE
VALUE             584 ext/strscan/strscan.c     VALUE self, re;
VALUE             602 ext/strscan/strscan.c static VALUE
VALUE             604 ext/strscan/strscan.c     VALUE self, re;
VALUE             625 ext/strscan/strscan.c static VALUE
VALUE             627 ext/strscan/strscan.c     VALUE self, re;
VALUE             645 ext/strscan/strscan.c static VALUE
VALUE             647 ext/strscan/strscan.c     VALUE self, re;
VALUE             661 ext/strscan/strscan.c static VALUE
VALUE             663 ext/strscan/strscan.c     VALUE self, re, s, f;
VALUE             690 ext/strscan/strscan.c static VALUE
VALUE             692 ext/strscan/strscan.c     VALUE self;
VALUE             730 ext/strscan/strscan.c static VALUE
VALUE             732 ext/strscan/strscan.c     VALUE self;
VALUE             753 ext/strscan/strscan.c static VALUE
VALUE             755 ext/strscan/strscan.c     VALUE self;
VALUE             772 ext/strscan/strscan.c static VALUE
VALUE             774 ext/strscan/strscan.c     VALUE self, vlen;
VALUE             794 ext/strscan/strscan.c static VALUE
VALUE             796 ext/strscan/strscan.c     VALUE self, vlen;
VALUE             813 ext/strscan/strscan.c static VALUE
VALUE             815 ext/strscan/strscan.c     VALUE self;
VALUE             839 ext/strscan/strscan.c static VALUE
VALUE             841 ext/strscan/strscan.c     VALUE self;
VALUE             861 ext/strscan/strscan.c static VALUE
VALUE             863 ext/strscan/strscan.c     VALUE self;
VALUE             875 ext/strscan/strscan.c static VALUE
VALUE             877 ext/strscan/strscan.c     VALUE self;
VALUE             891 ext/strscan/strscan.c static VALUE
VALUE             893 ext/strscan/strscan.c     VALUE self;
VALUE             910 ext/strscan/strscan.c static VALUE
VALUE             912 ext/strscan/strscan.c     VALUE self;
VALUE             927 ext/strscan/strscan.c static VALUE
VALUE             929 ext/strscan/strscan.c     VALUE self;
VALUE             949 ext/strscan/strscan.c static VALUE
VALUE             951 ext/strscan/strscan.c     VALUE self;
VALUE             964 ext/strscan/strscan.c static VALUE
VALUE             966 ext/strscan/strscan.c     VALUE self;
VALUE             986 ext/strscan/strscan.c static VALUE
VALUE             988 ext/strscan/strscan.c     VALUE self, idx;
VALUE            1016 ext/strscan/strscan.c static VALUE
VALUE            1018 ext/strscan/strscan.c     VALUE self;
VALUE            1036 ext/strscan/strscan.c static VALUE
VALUE            1038 ext/strscan/strscan.c     VALUE self;
VALUE            1051 ext/strscan/strscan.c static VALUE
VALUE            1053 ext/strscan/strscan.c     VALUE self;
VALUE            1067 ext/strscan/strscan.c static VALUE
VALUE            1069 ext/strscan/strscan.c     VALUE self;
VALUE            1086 ext/strscan/strscan.c static VALUE
VALUE            1088 ext/strscan/strscan.c     VALUE self;
VALUE            1108 ext/strscan/strscan.c static VALUE
VALUE            1110 ext/strscan/strscan.c     VALUE self;
VALUE            1115 ext/strscan/strscan.c     VALUE a, b;
VALUE            1146 ext/strscan/strscan.c static VALUE
VALUE            1166 ext/strscan/strscan.c static VALUE
VALUE            1298 ext/strscan/strscan.c     VALUE tmp;
VALUE              54 ext/syck/rubyext.c static VALUE sym_model, sym_generic, sym_input, sym_bytecode;
VALUE              55 ext/syck/rubyext.c static VALUE sym_scalar, sym_seq, sym_map;
VALUE              56 ext/syck/rubyext.c static VALUE sym_1quote, sym_2quote, sym_fold, sym_literal, sym_plain, sym_inline;
VALUE              57 ext/syck/rubyext.c static VALUE cDate, cNode, cMap, cSeq, cScalar, cOut, cParser, cResolver, cPrivateType, cDomainType, cYObject, cBadAlias, cDefaultKey, cMergeKey, cEmitter;
VALUE              58 ext/syck/rubyext.c static VALUE oDefaultResolver, oGenericResolver;
VALUE              68 ext/syck/rubyext.c static VALUE syck_node_transform( VALUE );
VALUE              78 ext/syck/rubyext.c int syck_parser_assign_io _((SyckParser *, VALUE *));
VALUE              79 ext/syck/rubyext.c VALUE syck_scalar_alloc _((VALUE class));
VALUE              80 ext/syck/rubyext.c VALUE syck_seq_alloc _((VALUE class));
VALUE              81 ext/syck/rubyext.c VALUE syck_map_alloc _((VALUE class));
VALUE              84 ext/syck/rubyext.c     VALUE data;  /* Borrowed this idea from marshal.c to fix [ruby-core:8067] problem */
VALUE              85 ext/syck/rubyext.c     VALUE proc;
VALUE              86 ext/syck/rubyext.c     VALUE resolver;
VALUE              91 ext/syck/rubyext.c     VALUE oid;
VALUE              92 ext/syck/rubyext.c     VALUE data;
VALUE              93 ext/syck/rubyext.c     VALUE port;
VALUE              99 ext/syck/rubyext.c VALUE
VALUE             101 ext/syck/rubyext.c     VALUE self, port;
VALUE             106 ext/syck/rubyext.c     VALUE bc;
VALUE             147 ext/syck/rubyext.c         VALUE src = (VALUE)str->ptr;
VALUE             148 ext/syck/rubyext.c         VALUE n = LONG2NUM(max_size);
VALUE             149 ext/syck/rubyext.c         VALUE str2 = rb_funcall2(src, s_read, 1, &n);
VALUE             169 ext/syck/rubyext.c     VALUE *pport;
VALUE             172 ext/syck/rubyext.c     VALUE tmp, port = *pport;
VALUE             194 ext/syck/rubyext.c VALUE
VALUE             196 ext/syck/rubyext.c     VALUE hsh, key;
VALUE             198 ext/syck/rubyext.c    VALUE val = rb_hash_aref( hsh, key );
VALUE             215 ext/syck/rubyext.c     VALUE time;
VALUE             217 ext/syck/rubyext.c     VALUE year = INT2FIX(0);
VALUE             218 ext/syck/rubyext.c     VALUE mon = INT2FIX(0);
VALUE             219 ext/syck/rubyext.c     VALUE day = INT2FIX(0);
VALUE             220 ext/syck/rubyext.c     VALUE hour = INT2FIX(0);
VALUE             221 ext/syck/rubyext.c     VALUE min = INT2FIX(0);
VALUE             222 ext/syck/rubyext.c     VALUE sec = INT2FIX(0);
VALUE             317 ext/syck/rubyext.c VALUE
VALUE             319 ext/syck/rubyext.c     VALUE entry, hsh;
VALUE             321 ext/syck/rubyext.c     VALUE tmp;
VALUE             336 ext/syck/rubyext.c     VALUE *ref;
VALUE             341 ext/syck/rubyext.c     VALUE obj = Qnil;
VALUE             362 ext/syck/rubyext.c                 VALUE arr;
VALUE             471 ext/syck/rubyext.c                 VALUE year, mon, day;
VALUE             548 ext/syck/rubyext.c                 VALUE k = syck_map_read( n, map_key, i );
VALUE             549 ext/syck/rubyext.c                 VALUE v = syck_map_read( n, map_value, i );
VALUE             557 ext/syck/rubyext.c                     VALUE tmp;
VALUE             560 ext/syck/rubyext.c                         VALUE dup = rb_funcall( tmp, s_dup, 0 );
VALUE             567 ext/syck/rubyext.c                         VALUE end = rb_ary_pop( tmp );
VALUE             568 ext/syck/rubyext.c                         VALUE tmph = rb_check_convert_type(end, T_HASH, "Hash", "to_hash");
VALUE             571 ext/syck/rubyext.c                             VALUE dup = rb_funcall( tmph, s_dup, 0 );
VALUE             609 ext/syck/rubyext.c     VALUE obj = Qnil;
VALUE             611 ext/syck/rubyext.c     VALUE resolver = bonus->resolver;
VALUE             668 ext/syck/rubyext.c     VALUE anchor_name = rb_str_new2( a );
VALUE             679 ext/syck/rubyext.c     VALUE p, input, model;
VALUE             753 ext/syck/rubyext.c VALUE syck_parser_s_alloc _((VALUE));
VALUE             754 ext/syck/rubyext.c VALUE
VALUE             756 ext/syck/rubyext.c     VALUE class;
VALUE             758 ext/syck/rubyext.c     VALUE pobj;
VALUE             774 ext/syck/rubyext.c static VALUE
VALUE             777 ext/syck/rubyext.c     VALUE *argv;
VALUE             778 ext/syck/rubyext.c     VALUE self;
VALUE             780 ext/syck/rubyext.c     VALUE options;
VALUE             797 ext/syck/rubyext.c static VALUE
VALUE             799 ext/syck/rubyext.c     VALUE self, size;
VALUE             814 ext/syck/rubyext.c static VALUE
VALUE             816 ext/syck/rubyext.c     VALUE self;
VALUE             827 ext/syck/rubyext.c VALUE
VALUE             830 ext/syck/rubyext.c     VALUE *argv;
VALUE             831 ext/syck/rubyext.c     VALUE self;
VALUE             833 ext/syck/rubyext.c     VALUE port, proc, model, input;
VALUE             857 ext/syck/rubyext.c VALUE
VALUE             860 ext/syck/rubyext.c     VALUE *argv;
VALUE             861 ext/syck/rubyext.c     VALUE self;
VALUE             863 ext/syck/rubyext.c     VALUE port, proc, v, input, model;
VALUE             901 ext/syck/rubyext.c VALUE
VALUE             903 ext/syck/rubyext.c     VALUE self, resolver;
VALUE             912 ext/syck/rubyext.c static VALUE
VALUE             914 ext/syck/rubyext.c     VALUE self;
VALUE             916 ext/syck/rubyext.c     VALUE tags = rb_hash_new();
VALUE             924 ext/syck/rubyext.c VALUE
VALUE             926 ext/syck/rubyext.c     VALUE self, taguri, cls;
VALUE             928 ext/syck/rubyext.c     VALUE tags = rb_attr_get(self, s_tags);
VALUE             936 ext/syck/rubyext.c VALUE
VALUE             938 ext/syck/rubyext.c     VALUE self, hsh;
VALUE             947 ext/syck/rubyext.c VALUE
VALUE             949 ext/syck/rubyext.c     VALUE self, val;
VALUE             958 ext/syck/rubyext.c VALUE
VALUE             960 ext/syck/rubyext.c     VALUE self, node;
VALUE             963 ext/syck/rubyext.c     VALUE obj;
VALUE             985 ext/syck/rubyext.c                 VALUE k = syck_map_read( n, map_key, i );
VALUE             986 ext/syck/rubyext.c                 VALUE v = syck_map_read( n, map_value, i );
VALUE             996 ext/syck/rubyext.c                         VALUE dup = rb_funcall( v, s_dup, 0 );
VALUE            1003 ext/syck/rubyext.c                         VALUE end = rb_ary_pop( v );
VALUE            1006 ext/syck/rubyext.c                             VALUE dup = rb_funcall( end, s_dup, 0 );
VALUE            1039 ext/syck/rubyext.c VALUE
VALUE            1041 ext/syck/rubyext.c     VALUE vars, obj;
VALUE            1043 ext/syck/rubyext.c     VALUE ivname = rb_ary_entry( vars, 0 );
VALUE            1057 ext/syck/rubyext.c VALUE
VALUE            1059 ext/syck/rubyext.c     VALUE const_name;
VALUE            1061 ext/syck/rubyext.c     VALUE tclass = rb_cObject;
VALUE            1062 ext/syck/rubyext.c     VALUE tparts = rb_str_split( const_name, "::" );
VALUE            1065 ext/syck/rubyext.c         VALUE tpart = rb_to_id( rb_ary_entry( tparts, i ) );
VALUE            1075 ext/syck/rubyext.c VALUE
VALUE            1077 ext/syck/rubyext.c     VALUE self, type, val;
VALUE            1086 ext/syck/rubyext.c         VALUE str_xprivate = rb_str_new2( "x-private" );
VALUE            1087 ext/syck/rubyext.c         VALUE colon = rb_str_new2( ":" );
VALUE            1088 ext/syck/rubyext.c         VALUE tags = rb_attr_get(self, s_tags);
VALUE            1089 ext/syck/rubyext.c         VALUE target_class = rb_hash_aref( tags, type );
VALUE            1090 ext/syck/rubyext.c         VALUE subclass = target_class;
VALUE            1091 ext/syck/rubyext.c         VALUE obj = Qnil;
VALUE            1098 ext/syck/rubyext.c             VALUE subclass_parts = rb_ary_new();
VALUE            1099 ext/syck/rubyext.c             VALUE parts = rb_str_split( type, ":" );
VALUE            1103 ext/syck/rubyext.c                 VALUE partial;
VALUE            1122 ext/syck/rubyext.c                         VALUE subclass_v;
VALUE            1171 ext/syck/rubyext.c                 VALUE parts = rb_str_split( type, ":" );
VALUE            1172 ext/syck/rubyext.c                 VALUE scheme = rb_ary_shift( parts );
VALUE            1175 ext/syck/rubyext.c                     VALUE name = rb_ary_join( parts, colon );
VALUE            1180 ext/syck/rubyext.c                     VALUE domain = rb_ary_shift( parts );
VALUE            1181 ext/syck/rubyext.c                     VALUE name = rb_ary_join( parts, colon );
VALUE            1195 ext/syck/rubyext.c VALUE
VALUE            1197 ext/syck/rubyext.c     VALUE self, val;
VALUE            1199 ext/syck/rubyext.c     VALUE tmp = rb_check_string_type(val);
VALUE            1214 ext/syck/rubyext.c VALUE
VALUE            1216 ext/syck/rubyext.c     VALUE self, val;
VALUE            1219 ext/syck/rubyext.c     VALUE tmp = rb_check_string_type(val);
VALUE            1234 ext/syck/rubyext.c VALUE
VALUE            1236 ext/syck/rubyext.c     VALUE self, node;
VALUE            1239 ext/syck/rubyext.c     VALUE obj;
VALUE            1251 ext/syck/rubyext.c VALUE
VALUE            1253 ext/syck/rubyext.c     VALUE self, node;
VALUE            1257 ext/syck/rubyext.c     VALUE t = Qnil, obj = Qnil, v = Qnil, style = Qnil;
VALUE            1329 ext/syck/rubyext.c VALUE
VALUE            1331 ext/syck/rubyext.c     VALUE self, val;
VALUE            1340 ext/syck/rubyext.c VALUE
VALUE            1342 ext/syck/rubyext.c     VALUE alias1, alias2;
VALUE            1344 ext/syck/rubyext.c     VALUE str1 = rb_ivar_get( alias1, s_name );
VALUE            1345 ext/syck/rubyext.c     VALUE str2 = rb_ivar_get( alias2, s_name );
VALUE            1346 ext/syck/rubyext.c     VALUE val = rb_funcall( str1, s_cmp, 1, str2 );
VALUE            1353 ext/syck/rubyext.c VALUE
VALUE            1355 ext/syck/rubyext.c     VALUE self, domain, type_id, val;
VALUE            1366 ext/syck/rubyext.c VALUE
VALUE            1368 ext/syck/rubyext.c     VALUE self, klass, ivars;
VALUE            1378 ext/syck/rubyext.c VALUE
VALUE            1380 ext/syck/rubyext.c     VALUE self, type_id, val;
VALUE            1421 ext/syck/rubyext.c VALUE
VALUE            1423 ext/syck/rubyext.c     VALUE class;
VALUE            1426 ext/syck/rubyext.c     VALUE obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node );
VALUE            1434 ext/syck/rubyext.c VALUE
VALUE            1436 ext/syck/rubyext.c     VALUE self, type_id, val, style;
VALUE            1448 ext/syck/rubyext.c VALUE
VALUE            1450 ext/syck/rubyext.c     VALUE self, style;
VALUE            1487 ext/syck/rubyext.c VALUE
VALUE            1489 ext/syck/rubyext.c     VALUE self, val;
VALUE            1506 ext/syck/rubyext.c VALUE
VALUE            1508 ext/syck/rubyext.c     VALUE class;
VALUE            1511 ext/syck/rubyext.c     VALUE obj;
VALUE            1521 ext/syck/rubyext.c VALUE
VALUE            1523 ext/syck/rubyext.c     VALUE self, type_id, val, style;
VALUE            1538 ext/syck/rubyext.c VALUE
VALUE            1540 ext/syck/rubyext.c     VALUE self, val;
VALUE            1562 ext/syck/rubyext.c VALUE
VALUE            1564 ext/syck/rubyext.c     VALUE self, val;
VALUE            1567 ext/syck/rubyext.c     VALUE emitter = rb_ivar_get( self, s_emitter );
VALUE            1582 ext/syck/rubyext.c VALUE
VALUE            1584 ext/syck/rubyext.c     VALUE self, style;
VALUE            1605 ext/syck/rubyext.c VALUE
VALUE            1607 ext/syck/rubyext.c     VALUE class;
VALUE            1610 ext/syck/rubyext.c     VALUE obj;
VALUE            1620 ext/syck/rubyext.c VALUE
VALUE            1622 ext/syck/rubyext.c     VALUE self, type_id, val, style;
VALUE            1629 ext/syck/rubyext.c         VALUE hsh = rb_check_convert_type(val, T_HASH, "Hash", "to_hash");
VALUE            1630 ext/syck/rubyext.c         VALUE keys;
VALUE            1640 ext/syck/rubyext.c             VALUE key = rb_ary_entry(keys, i);
VALUE            1655 ext/syck/rubyext.c VALUE
VALUE            1657 ext/syck/rubyext.c     VALUE self, val;
VALUE            1664 ext/syck/rubyext.c         VALUE hsh = rb_check_convert_type(val, T_HASH, "Hash", "to_hash");
VALUE            1665 ext/syck/rubyext.c         VALUE keys;
VALUE            1676 ext/syck/rubyext.c             VALUE key = rb_ary_entry(keys, i);
VALUE            1688 ext/syck/rubyext.c VALUE
VALUE            1690 ext/syck/rubyext.c     VALUE self, key, val;
VALUE            1693 ext/syck/rubyext.c     VALUE emitter = rb_ivar_get( self, s_emitter );
VALUE            1709 ext/syck/rubyext.c VALUE
VALUE            1711 ext/syck/rubyext.c     VALUE self, style;
VALUE            1732 ext/syck/rubyext.c VALUE
VALUE            1734 ext/syck/rubyext.c     VALUE copy, orig;
VALUE            1756 ext/syck/rubyext.c VALUE
VALUE            1758 ext/syck/rubyext.c     VALUE self, type_id;
VALUE            1777 ext/syck/rubyext.c VALUE
VALUE            1779 ext/syck/rubyext.c     VALUE self;
VALUE            1781 ext/syck/rubyext.c     VALUE t;
VALUE            1840 ext/syck/rubyext.c     Data_Get_Struct((VALUE)data, SyckNode, n);
VALUE            1887 ext/syck/rubyext.c     VALUE dest = bonus->port;
VALUE            1901 ext/syck/rubyext.c     VALUE emitter, node;
VALUE            1941 ext/syck/rubyext.c VALUE syck_emitter_s_alloc _((VALUE));
VALUE            1942 ext/syck/rubyext.c VALUE
VALUE            1944 ext/syck/rubyext.c     VALUE class;
VALUE            1946 ext/syck/rubyext.c     VALUE pobj;
VALUE            1963 ext/syck/rubyext.c VALUE
VALUE            1966 ext/syck/rubyext.c     VALUE *argv;
VALUE            1967 ext/syck/rubyext.c     VALUE self;
VALUE            1969 ext/syck/rubyext.c     VALUE options, tmp;
VALUE            2008 ext/syck/rubyext.c VALUE
VALUE            2011 ext/syck/rubyext.c     VALUE *argv;
VALUE            2012 ext/syck/rubyext.c     VALUE self;
VALUE            2014 ext/syck/rubyext.c     VALUE oid, proc;
VALUE            2052 ext/syck/rubyext.c VALUE
VALUE            2054 ext/syck/rubyext.c     VALUE self, node;
VALUE            2062 ext/syck/rubyext.c VALUE
VALUE            2064 ext/syck/rubyext.c     VALUE self, resolver;
VALUE            2073 ext/syck/rubyext.c VALUE
VALUE            2075 ext/syck/rubyext.c     VALUE self, emitter;
VALUE            2084 ext/syck/rubyext.c VALUE
VALUE            2087 ext/syck/rubyext.c     VALUE *argv;
VALUE            2088 ext/syck/rubyext.c     VALUE self;
VALUE            2090 ext/syck/rubyext.c     VALUE type_id, style, map;
VALUE            2103 ext/syck/rubyext.c VALUE
VALUE            2106 ext/syck/rubyext.c     VALUE *argv;
VALUE            2107 ext/syck/rubyext.c     VALUE self;
VALUE            2109 ext/syck/rubyext.c     VALUE type_id, style, seq;
VALUE            2124 ext/syck/rubyext.c VALUE
VALUE            2127 ext/syck/rubyext.c     VALUE *argv;
VALUE            2128 ext/syck/rubyext.c     VALUE self;
VALUE            2130 ext/syck/rubyext.c     VALUE type_id, str, style, scalar;
VALUE            2145 ext/syck/rubyext.c     VALUE rb_yaml = rb_define_module( "YAML" );
VALUE            2146 ext/syck/rubyext.c     VALUE rb_syck = rb_define_module_under( rb_yaml, "Syck" );
VALUE              15 ext/syslog/syslog.c static VALUE mSyslog, mSyslogConstants;
VALUE              21 ext/syslog/syslog.c static void syslog_write(int pri, int argc, VALUE *argv)
VALUE              23 ext/syslog/syslog.c     VALUE str;
VALUE              39 ext/syslog/syslog.c static VALUE mSyslog_close(VALUE self)
VALUE              55 ext/syslog/syslog.c static VALUE mSyslog_open(int argc, VALUE *argv, VALUE self)
VALUE              57 ext/syslog/syslog.c     VALUE ident, opt, fac;
VALUE             101 ext/syslog/syslog.c static VALUE mSyslog_reopen(int argc, VALUE *argv, VALUE self)
VALUE             108 ext/syslog/syslog.c static VALUE mSyslog_isopen(VALUE self)
VALUE             113 ext/syslog/syslog.c static VALUE mSyslog_ident(VALUE self)
VALUE             118 ext/syslog/syslog.c static VALUE mSyslog_options(VALUE self)
VALUE             123 ext/syslog/syslog.c static VALUE mSyslog_facility(VALUE self)
VALUE             128 ext/syslog/syslog.c static VALUE mSyslog_get_mask(VALUE self)
VALUE             133 ext/syslog/syslog.c static VALUE mSyslog_set_mask(VALUE self, VALUE mask)
VALUE             144 ext/syslog/syslog.c static VALUE mSyslog_log(int argc, VALUE *argv, VALUE self)
VALUE             146 ext/syslog/syslog.c     VALUE pri;
VALUE             164 ext/syslog/syslog.c static VALUE mSyslog_inspect(VALUE self)
VALUE             184 ext/syslog/syslog.c static VALUE mSyslog_instance(VALUE self)
VALUE             190 ext/syslog/syslog.c static VALUE mSyslog_##name(int argc, VALUE *argv, VALUE self) \
VALUE             222 ext/syslog/syslog.c static VALUE mSyslogConstants_LOG_MASK(VALUE klass, VALUE pri)
VALUE             227 ext/syslog/syslog.c static VALUE mSyslogConstants_LOG_UPTO(VALUE klass, VALUE pri)
VALUE              86 ext/tk/tcltklib.c static VALUE eTkCallbackReturn;
VALUE              87 ext/tk/tcltklib.c static VALUE eTkCallbackBreak;
VALUE              88 ext/tk/tcltklib.c static VALUE eTkCallbackContinue;
VALUE              90 ext/tk/tcltklib.c static VALUE eLocalJumpError;
VALUE              92 ext/tk/tcltklib.c static VALUE eTkLocalJumpError;
VALUE              93 ext/tk/tcltklib.c static VALUE eTkCallbackRetry;
VALUE              94 ext/tk/tcltklib.c static VALUE eTkCallbackRedo;
VALUE              95 ext/tk/tcltklib.c static VALUE eTkCallbackThrow;
VALUE              97 ext/tk/tcltklib.c static VALUE tcltkip_class;
VALUE             120 ext/tk/tcltklib.c static VALUE ip_invoke_real _((int, VALUE*, VALUE));
VALUE             121 ext/tk/tcltklib.c static VALUE ip_invoke _((int, VALUE*, VALUE));
VALUE             123 ext/tk/tcltklib.c static VALUE tk_funcall _((VALUE(), int, VALUE*, VALUE));
VALUE             249 ext/tk/tcltklib.c     VALUE interp;
VALUE             252 ext/tk/tcltklib.c     VALUE result;
VALUE             253 ext/tk/tcltklib.c     VALUE thread;
VALUE             260 ext/tk/tcltklib.c     VALUE interp;
VALUE             263 ext/tk/tcltklib.c     VALUE result;
VALUE             264 ext/tk/tcltklib.c     VALUE thread;
VALUE             269 ext/tk/tcltklib.c     VALUE (*func)();
VALUE             271 ext/tk/tcltklib.c     VALUE *argv;
VALUE             272 ext/tk/tcltklib.c     VALUE interp;
VALUE             275 ext/tk/tcltklib.c     VALUE result;
VALUE             276 ext/tk/tcltklib.c     VALUE thread;
VALUE             310 ext/tk/tcltklib.c static VALUE eventloop_thread;
VALUE             311 ext/tk/tcltklib.c static VALUE eventloop_stack;
VALUE             313 ext/tk/tcltklib.c static VALUE watchdog_thread;
VALUE             356 ext/tk/tcltklib.c     VALUE receiver;
VALUE             358 ext/tk/tcltklib.c     VALUE args;
VALUE             574 ext/tk/tcltklib.c     VALUE self;
VALUE             637 ext/tk/tcltklib.c static VALUE
VALUE             639 ext/tk/tcltklib.c create_ip_exc(VALUE interp, VALUE exc, const char *fmt, ...)
VALUE             642 ext/tk/tcltklib.c     VALUE interp:
VALUE             643 ext/tk/tcltklib.c     VALUE exc;
VALUE             650 ext/tk/tcltklib.c     VALUE einfo;
VALUE             695 ext/tk/tcltklib.c static VALUE
VALUE             697 ext/tk/tcltklib.c     VALUE interp;
VALUE             760 ext/tk/tcltklib.c static VALUE rbtk_pending_exception;
VALUE             767 ext/tk/tcltklib.c     volatile VALUE exc = rbtk_pending_exception;
VALUE             799 ext/tk/tcltklib.c     volatile VALUE exc = rbtk_pending_exception;
VALUE             944 ext/tk/tcltklib.c static VALUE
VALUE             946 ext/tk/tcltklib.c     VALUE self;
VALUE             947 ext/tk/tcltklib.c     VALUE tick;
VALUE             979 ext/tk/tcltklib.c static VALUE
VALUE             981 ext/tk/tcltklib.c     VALUE self;
VALUE             986 ext/tk/tcltklib.c static VALUE
VALUE             988 ext/tk/tcltklib.c     VALUE self;
VALUE             989 ext/tk/tcltklib.c     VALUE tick;
VALUE            1005 ext/tk/tcltklib.c static VALUE
VALUE            1007 ext/tk/tcltklib.c     VALUE self;
VALUE            1012 ext/tk/tcltklib.c static VALUE
VALUE            1014 ext/tk/tcltklib.c     VALUE self;
VALUE            1015 ext/tk/tcltklib.c     VALUE wait;
VALUE            1031 ext/tk/tcltklib.c static VALUE
VALUE            1033 ext/tk/tcltklib.c     VALUE self;
VALUE            1038 ext/tk/tcltklib.c static VALUE
VALUE            1040 ext/tk/tcltklib.c     VALUE self;
VALUE            1041 ext/tk/tcltklib.c     VALUE wait;
VALUE            1057 ext/tk/tcltklib.c static VALUE
VALUE            1059 ext/tk/tcltklib.c     VALUE self;
VALUE            1064 ext/tk/tcltklib.c static VALUE
VALUE            1066 ext/tk/tcltklib.c     VALUE self;
VALUE            1067 ext/tk/tcltklib.c     VALUE loop_max;
VALUE            1068 ext/tk/tcltklib.c     VALUE no_event;
VALUE            1085 ext/tk/tcltklib.c static VALUE
VALUE            1087 ext/tk/tcltklib.c     VALUE self;
VALUE            1092 ext/tk/tcltklib.c static VALUE
VALUE            1094 ext/tk/tcltklib.c     VALUE self;
VALUE            1095 ext/tk/tcltklib.c     VALUE loop_max;
VALUE            1096 ext/tk/tcltklib.c     VALUE no_event;
VALUE            1112 ext/tk/tcltklib.c static VALUE
VALUE            1114 ext/tk/tcltklib.c     VALUE self;
VALUE            1119 ext/tk/tcltklib.c static VALUE
VALUE            1121 ext/tk/tcltklib.c     VALUE self;
VALUE            1122 ext/tk/tcltklib.c     VALUE time;
VALUE            1125 ext/tk/tcltklib.c     VALUE divmod;
VALUE            1152 ext/tk/tcltklib.c static VALUE
VALUE            1154 ext/tk/tcltklib.c     VALUE self;
VALUE            1165 ext/tk/tcltklib.c static VALUE
VALUE            1167 ext/tk/tcltklib.c     VALUE self;
VALUE            1178 ext/tk/tcltklib.c static VALUE
VALUE            1180 ext/tk/tcltklib.c     VALUE self;
VALUE            1185 ext/tk/tcltklib.c static VALUE
VALUE            1187 ext/tk/tcltklib.c     VALUE self, val;
VALUE            1200 ext/tk/tcltklib.c static VALUE
VALUE            1202 ext/tk/tcltklib.c     VALUE self, val;
VALUE            1220 ext/tk/tcltklib.c static VALUE
VALUE            1222 ext/tk/tcltklib.c     VALUE self;
VALUE            1232 ext/tk/tcltklib.c static VALUE
VALUE            1234 ext/tk/tcltklib.c     VALUE flag_val;
VALUE            1246 ext/tk/tcltklib.c static VALUE
VALUE            1248 ext/tk/tcltklib.c     VALUE dummy;
VALUE            1280 ext/tk/tcltklib.c     volatile VALUE current = eventloop_thread;
VALUE            1349 ext/tk/tcltklib.c                                 VALUE exc = rbtk_pending_exception;
VALUE            1470 ext/tk/tcltklib.c                                         VALUE exc = rbtk_pending_exception;
VALUE            1542 ext/tk/tcltklib.c                                             VALUE exc = rbtk_pending_exception;
VALUE            1629 ext/tk/tcltklib.c VALUE
VALUE            1631 ext/tk/tcltklib.c     VALUE args;
VALUE            1647 ext/tk/tcltklib.c VALUE
VALUE            1649 ext/tk/tcltklib.c     VALUE args;
VALUE            1654 ext/tk/tcltklib.c     volatile VALUE ret;
VALUE            1682 ext/tk/tcltklib.c VALUE
VALUE            1684 ext/tk/tcltklib.c     VALUE args;
VALUE            1687 ext/tk/tcltklib.c     volatile VALUE current_evloop = rb_thread_current();
VALUE            1732 ext/tk/tcltklib.c static VALUE
VALUE            1739 ext/tk/tcltklib.c     volatile VALUE parent_evloop = eventloop_thread;
VALUE            1774 ext/tk/tcltklib.c     return rb_ensure(lib_eventloop_main, (VALUE)args,
VALUE            1775 ext/tk/tcltklib.c                      lib_eventloop_ensure, (VALUE)args);
VALUE            1777 ext/tk/tcltklib.c     return rb_ensure(lib_eventloop_main_core, (VALUE)args,
VALUE            1778 ext/tk/tcltklib.c                      lib_eventloop_ensure, (VALUE)args);
VALUE            1782 ext/tk/tcltklib.c static VALUE
VALUE            1785 ext/tk/tcltklib.c     VALUE *argv;
VALUE            1786 ext/tk/tcltklib.c     VALUE self;
VALUE            1788 ext/tk/tcltklib.c     VALUE check_rootwidget;
VALUE            1802 ext/tk/tcltklib.c static VALUE
VALUE            1805 ext/tk/tcltklib.c     VALUE *argv;
VALUE            1806 ext/tk/tcltklib.c     VALUE self;
VALUE            1823 ext/tk/tcltklib.c static VALUE
VALUE            1825 ext/tk/tcltklib.c     VALUE check_rootwidget;
VALUE            1833 ext/tk/tcltklib.c static VALUE
VALUE            1835 ext/tk/tcltklib.c     VALUE check_rootwidget;
VALUE            1837 ext/tk/tcltklib.c     VALUE evloop;
VALUE            1890 ext/tk/tcltklib.c VALUE
VALUE            1892 ext/tk/tcltklib.c     VALUE arg;
VALUE            1898 ext/tk/tcltklib.c static VALUE
VALUE            1901 ext/tk/tcltklib.c     VALUE *argv;
VALUE            1902 ext/tk/tcltklib.c     VALUE self;
VALUE            1904 ext/tk/tcltklib.c     VALUE check_rootwidget;
VALUE            1918 ext/tk/tcltklib.c static VALUE
VALUE            1921 ext/tk/tcltklib.c     VALUE *argv;
VALUE            1922 ext/tk/tcltklib.c     VALUE self;
VALUE            1941 ext/tk/tcltklib.c     VALUE proc;
VALUE            1951 ext/tk/tcltklib.c static VALUE
VALUE            1953 ext/tk/tcltklib.c     VALUE arg;
VALUE            1959 ext/tk/tcltklib.c static VALUE
VALUE            1961 ext/tk/tcltklib.c     VALUE arg;
VALUE            1968 ext/tk/tcltklib.c static VALUE
VALUE            1970 ext/tk/tcltklib.c     VALUE arg;
VALUE            1974 ext/tk/tcltklib.c     return rb_ensure(_thread_call_proc_core, (VALUE)q,
VALUE            1975 ext/tk/tcltklib.c                      _thread_call_proc_ensure, (VALUE)q);
VALUE            1978 ext/tk/tcltklib.c static VALUE
VALUE            1980 ext/tk/tcltklib.c     VALUE th;
VALUE            1985 ext/tk/tcltklib.c static VALUE
VALUE            1988 ext/tk/tcltklib.c     VALUE *argv;
VALUE            1989 ext/tk/tcltklib.c     VALUE self;
VALUE            1992 ext/tk/tcltklib.c     VALUE proc, th, ret;
VALUE            2029 ext/tk/tcltklib.c         VALUE exc = rbtk_pending_exception;
VALUE            2040 ext/tk/tcltklib.c static VALUE
VALUE            2043 ext/tk/tcltklib.c     VALUE *argv;
VALUE            2044 ext/tk/tcltklib.c     VALUE self;
VALUE            2047 ext/tk/tcltklib.c     volatile VALUE vflags;
VALUE            2097 ext/tk/tcltklib.c static VALUE
VALUE            2100 ext/tk/tcltklib.c     VALUE *argv;
VALUE            2101 ext/tk/tcltklib.c     VALUE self;
VALUE            2106 ext/tk/tcltklib.c static VALUE
VALUE            2109 ext/tk/tcltklib.c     VALUE *argv;
VALUE            2110 ext/tk/tcltklib.c     VALUE self;
VALUE            2119 ext/tk/tcltklib.c     VALUE exc;
VALUE            2123 ext/tk/tcltklib.c     volatile VALUE msg;
VALUE            2127 ext/tk/tcltklib.c     volatile VALUE enc;
VALUE            2171 ext/tk/tcltklib.c static VALUE
VALUE            2173 ext/tk/tcltklib.c     VALUE obj;
VALUE            2203 ext/tk/tcltklib.c     VALUE (*proc)();
VALUE            2204 ext/tk/tcltklib.c     VALUE data;
VALUE            2206 ext/tk/tcltklib.c     volatile VALUE ret, exc = Qnil;
VALUE            2215 ext/tk/tcltklib.c         VALUE old_gc, type, str;
VALUE            2297 ext/tk/tcltklib.c         volatile VALUE eclass = rb_obj_class(exc);
VALUE            2298 ext/tk/tcltklib.c         volatile VALUE backtrace;
VALUE            2335 ext/tk/tcltklib.c             VALUE reason = rb_ivar_get(exc, ID_at_reason);
VALUE            2373 ext/tk/tcltklib.c     VALUE (*proc)();
VALUE            2374 ext/tk/tcltklib.c     VALUE data;
VALUE            2458 ext/tk/tcltklib.c     code = tcl_protect(interp, rb_eval_string, (VALUE)arg);
VALUE            2469 ext/tk/tcltklib.c static VALUE
VALUE            2473 ext/tk/tcltklib.c     volatile VALUE ret;
VALUE            2502 ext/tk/tcltklib.c     volatile VALUE receiver;
VALUE            2504 ext/tk/tcltklib.c     volatile VALUE args;
VALUE            2510 ext/tk/tcltklib.c     VALUE old_gc;
VALUE            2608 ext/tk/tcltklib.c     code = tcl_protect(interp, ip_ruby_cmd_core, (VALUE)arg);
VALUE            2883 ext/tk/tcltklib.c     VALUE thread;
VALUE            2926 ext/tk/tcltklib.c     volatile VALUE current_thread = rb_thread_current();
VALUE            3673 ext/tk/tcltklib.c     VALUE thread;
VALUE            3765 ext/tk/tcltklib.c     volatile VALUE current_thread = rb_thread_current();
VALUE            3900 ext/tk/tcltklib.c     volatile VALUE current_thread = rb_thread_current();
VALUE            4228 ext/tk/tcltklib.c static VALUE
VALUE            4230 ext/tk/tcltklib.c     VALUE self;
VALUE            4231 ext/tk/tcltklib.c     VALUE var;
VALUE            4233 ext/tk/tcltklib.c     VALUE argv[2];
VALUE            4234 ext/tk/tcltklib.c     volatile VALUE cmd_str = rb_str_new2("thread_vwait");
VALUE            4242 ext/tk/tcltklib.c static VALUE
VALUE            4244 ext/tk/tcltklib.c     VALUE self;
VALUE            4245 ext/tk/tcltklib.c     VALUE mode;
VALUE            4246 ext/tk/tcltklib.c     VALUE target;
VALUE            4248 ext/tk/tcltklib.c     VALUE argv[3];
VALUE            4249 ext/tk/tcltklib.c     volatile VALUE cmd_str = rb_str_new2("thread_tkwait");
VALUE            4480 ext/tk/tcltklib.c static VALUE ip_alloc _((VALUE));
VALUE            4481 ext/tk/tcltklib.c static VALUE
VALUE            4483 ext/tk/tcltklib.c     VALUE self;
VALUE            4661 ext/tk/tcltklib.c static VALUE
VALUE            4664 ext/tk/tcltklib.c     VALUE *argv;
VALUE            4665 ext/tk/tcltklib.c     VALUE self;
VALUE            4668 ext/tk/tcltklib.c     VALUE argv0, opts;
VALUE            4859 ext/tk/tcltklib.c static VALUE
VALUE            4861 ext/tk/tcltklib.c     VALUE interp;
VALUE            4863 ext/tk/tcltklib.c     VALUE *argv;
VALUE            4867 ext/tk/tcltklib.c     VALUE safemode;
VALUE            4868 ext/tk/tcltklib.c     VALUE name;
VALUE            4897 ext/tk/tcltklib.c         volatile VALUE exc;
VALUE            4955 ext/tk/tcltklib.c static VALUE
VALUE            4958 ext/tk/tcltklib.c     VALUE *argv;
VALUE            4959 ext/tk/tcltklib.c     VALUE self;
VALUE            4962 ext/tk/tcltklib.c     VALUE safemode;
VALUE            4963 ext/tk/tcltklib.c     VALUE name;
VALUE            4964 ext/tk/tcltklib.c     VALUE callargv[2];
VALUE            4990 ext/tk/tcltklib.c static VALUE
VALUE            4992 ext/tk/tcltklib.c     VALUE self, master;
VALUE            5024 ext/tk/tcltklib.c static VALUE
VALUE            5026 ext/tk/tcltklib.c     VALUE interp;
VALUE            5028 ext/tk/tcltklib.c     VALUE *argv;  /* dummy */
VALUE            5072 ext/tk/tcltklib.c static VALUE
VALUE            5074 ext/tk/tcltklib.c     VALUE self;
VALUE            5083 ext/tk/tcltklib.c     return tk_funcall(ip_create_console_core, 0, (VALUE*)NULL, self);
VALUE            5087 ext/tk/tcltklib.c static VALUE
VALUE            5089 ext/tk/tcltklib.c     VALUE interp;
VALUE            5091 ext/tk/tcltklib.c     VALUE *argv;  /* dummy */
VALUE            5122 ext/tk/tcltklib.c static VALUE
VALUE            5124 ext/tk/tcltklib.c     VALUE self;
VALUE            5133 ext/tk/tcltklib.c     return tk_funcall(ip_make_safe_core, 0, (VALUE*)NULL, self);
VALUE            5137 ext/tk/tcltklib.c static VALUE
VALUE            5139 ext/tk/tcltklib.c     VALUE self;
VALUE            5156 ext/tk/tcltklib.c static VALUE
VALUE            5158 ext/tk/tcltklib.c     VALUE self;
VALUE            5175 ext/tk/tcltklib.c static VALUE
VALUE            5177 ext/tk/tcltklib.c     VALUE self, val;
VALUE            5225 ext/tk/tcltklib.c static VALUE
VALUE            5227 ext/tk/tcltklib.c     VALUE self;
VALUE            5256 ext/tk/tcltklib.c static VALUE
VALUE            5258 ext/tk/tcltklib.c     VALUE self;
VALUE            5278 ext/tk/tcltklib.c static VALUE
VALUE            5280 ext/tk/tcltklib.c     VALUE self;
VALUE            5291 ext/tk/tcltklib.c static VALUE
VALUE            5293 ext/tk/tcltklib.c     VALUE self;
VALUE            5308 ext/tk/tcltklib.c static VALUE
VALUE            5314 ext/tk/tcltklib.c     volatile VALUE str;
VALUE            5335 ext/tk/tcltklib.c     VALUE str;
VALUE            5342 ext/tk/tcltklib.c     VALUE enc = rb_attr_get(str, ID_at_enc);
VALUE            5364 ext/tk/tcltklib.c static VALUE
VALUE            5370 ext/tk/tcltklib.c     volatile VALUE strval;
VALUE            5384 ext/tk/tcltklib.c static VALUE
VALUE            5386 ext/tk/tcltklib.c     VALUE arg;
VALUE            5387 ext/tk/tcltklib.c     VALUE callq;
VALUE            5404 ext/tk/tcltklib.c     volatile VALUE ret;
VALUE            5405 ext/tk/tcltklib.c     volatile VALUE q_dat;
VALUE            5458 ext/tk/tcltklib.c static VALUE
VALUE            5460 ext/tk/tcltklib.c     VALUE (*func)();
VALUE            5462 ext/tk/tcltklib.c     VALUE *argv;
VALUE            5463 ext/tk/tcltklib.c     VALUE obj;
VALUE            5468 ext/tk/tcltklib.c     volatile VALUE current = rb_thread_current();
VALUE            5469 ext/tk/tcltklib.c     volatile VALUE ip_obj = obj;
VALUE            5470 ext/tk/tcltklib.c     volatile VALUE result;
VALUE            5471 ext/tk/tcltklib.c     volatile VALUE ret;
VALUE            5498 ext/tk/tcltklib.c         VALUE *temp = ALLOC_N(VALUE, argc);
VALUE            5499 ext/tk/tcltklib.c         MEMCPY(temp, argv, VALUE, argc);
VALUE            5565 ext/tk/tcltklib.c static VALUE
VALUE            5567 ext/tk/tcltklib.c     VALUE arg;
VALUE            5577 ext/tk/tcltklib.c static VALUE
VALUE            5579 ext/tk/tcltklib.c     VALUE self;
VALUE            5583 ext/tk/tcltklib.c     volatile VALUE ret;
VALUE            5617 ext/tk/tcltklib.c           ret = rb_protect(call_tcl_eval, (VALUE)&inf, &status);
VALUE            5649 ext/tk/tcltklib.c             volatile VALUE exc;
VALUE            5694 ext/tk/tcltklib.c         volatile VALUE exc;
VALUE            5710 ext/tk/tcltklib.c static VALUE
VALUE            5712 ext/tk/tcltklib.c     VALUE arg;
VALUE            5713 ext/tk/tcltklib.c     VALUE evq;
VALUE            5730 ext/tk/tcltklib.c     volatile VALUE ret;
VALUE            5731 ext/tk/tcltklib.c     volatile VALUE q_dat;
VALUE            5775 ext/tk/tcltklib.c static VALUE
VALUE            5777 ext/tk/tcltklib.c     VALUE self;
VALUE            5778 ext/tk/tcltklib.c     VALUE str;
VALUE            5784 ext/tk/tcltklib.c     volatile VALUE current = rb_thread_current();
VALUE            5785 ext/tk/tcltklib.c     volatile VALUE ip_obj = self;
VALUE            5786 ext/tk/tcltklib.c     volatile VALUE result;
VALUE            5787 ext/tk/tcltklib.c     volatile VALUE ret;
VALUE            5871 ext/tk/tcltklib.c static VALUE
VALUE            5873 ext/tk/tcltklib.c     VALUE interp;
VALUE            5875 ext/tk/tcltklib.c     VALUE *argv;  /* dummy */
VALUE            5877 ext/tk/tcltklib.c     volatile VALUE exc;
VALUE            5933 ext/tk/tcltklib.c static VALUE
VALUE            5935 ext/tk/tcltklib.c     VALUE self;
VALUE            5948 ext/tk/tcltklib.c     return tk_funcall(lib_restart_core, 0, (VALUE*)NULL, self);
VALUE            5952 ext/tk/tcltklib.c static VALUE
VALUE            5954 ext/tk/tcltklib.c     VALUE self;
VALUE            5974 ext/tk/tcltklib.c static VALUE
VALUE            5976 ext/tk/tcltklib.c     VALUE ip_obj;
VALUE            5977 ext/tk/tcltklib.c     VALUE src;
VALUE            5978 ext/tk/tcltklib.c     VALUE encodename;
VALUE            5980 ext/tk/tcltklib.c     volatile VALUE str = src;
VALUE            6017 ext/tk/tcltklib.c             volatile VALUE enc;
VALUE            6094 ext/tk/tcltklib.c static VALUE
VALUE            6097 ext/tk/tcltklib.c     VALUE *argv;
VALUE            6098 ext/tk/tcltklib.c     VALUE self;
VALUE            6100 ext/tk/tcltklib.c     VALUE str, encodename;
VALUE            6108 ext/tk/tcltklib.c static VALUE
VALUE            6111 ext/tk/tcltklib.c     VALUE *argv;
VALUE            6112 ext/tk/tcltklib.c     VALUE self;
VALUE            6114 ext/tk/tcltklib.c     VALUE str, encodename;
VALUE            6122 ext/tk/tcltklib.c static VALUE
VALUE            6124 ext/tk/tcltklib.c     VALUE ip_obj;
VALUE            6125 ext/tk/tcltklib.c     VALUE src;
VALUE            6126 ext/tk/tcltklib.c     VALUE encodename;
VALUE            6128 ext/tk/tcltklib.c     volatile VALUE str = src;
VALUE            6158 ext/tk/tcltklib.c         volatile VALUE enc;
VALUE            6253 ext/tk/tcltklib.c static VALUE
VALUE            6256 ext/tk/tcltklib.c     VALUE *argv;
VALUE            6257 ext/tk/tcltklib.c     VALUE self;
VALUE            6259 ext/tk/tcltklib.c     VALUE str, encodename;
VALUE            6267 ext/tk/tcltklib.c static VALUE
VALUE            6270 ext/tk/tcltklib.c     VALUE *argv;
VALUE            6271 ext/tk/tcltklib.c     VALUE self;
VALUE            6273 ext/tk/tcltklib.c     VALUE str, encodename;
VALUE            6281 ext/tk/tcltklib.c static VALUE
VALUE            6283 ext/tk/tcltklib.c     VALUE self;
VALUE            6284 ext/tk/tcltklib.c     VALUE str;
VALUE            6331 ext/tk/tcltklib.c static VALUE
VALUE            6333 ext/tk/tcltklib.c     VALUE self;
VALUE            6334 ext/tk/tcltklib.c     VALUE str;
VALUE            6339 ext/tk/tcltklib.c static VALUE
VALUE            6341 ext/tk/tcltklib.c     VALUE self;
VALUE            6342 ext/tk/tcltklib.c     VALUE str;
VALUE            6347 ext/tk/tcltklib.c static VALUE
VALUE            6349 ext/tk/tcltklib.c     VALUE self;
VALUE            6359 ext/tk/tcltklib.c static VALUE
VALUE            6361 ext/tk/tcltklib.c     VALUE self;
VALUE            6362 ext/tk/tcltklib.c     VALUE enc_name;
VALUE            6399 ext/tk/tcltklib.c static VALUE
VALUE            6401 ext/tk/tcltklib.c     VALUE arg;
VALUE            6453 ext/tk/tcltklib.c static VALUE
VALUE            6455 ext/tk/tcltklib.c     VALUE interp;
VALUE            6459 ext/tk/tcltklib.c static VALUE
VALUE            6461 ext/tk/tcltklib.c     VALUE interp;
VALUE            6476 ext/tk/tcltklib.c     VALUE ret;
VALUE            6578 ext/tk/tcltklib.c     ret = rb_protect(invoke_tcl_proc, (VALUE)&inf, &status);
VALUE            6689 ext/tk/tcltklib.c     VALUE *argv;
VALUE            6747 ext/tk/tcltklib.c static VALUE
VALUE            6750 ext/tk/tcltklib.c     VALUE *argv;
VALUE            6751 ext/tk/tcltklib.c     VALUE interp;
VALUE            6753 ext/tk/tcltklib.c     VALUE v;
VALUE            6785 ext/tk/tcltklib.c VALUE
VALUE            6787 ext/tk/tcltklib.c     VALUE arg;
VALUE            6788 ext/tk/tcltklib.c     VALUE ivq;
VALUE            6805 ext/tk/tcltklib.c     volatile VALUE ret;
VALUE            6806 ext/tk/tcltklib.c     volatile VALUE q_dat;
VALUE            6851 ext/tk/tcltklib.c static VALUE
VALUE            6854 ext/tk/tcltklib.c     VALUE *argv;
VALUE            6855 ext/tk/tcltklib.c     VALUE obj;
VALUE            6861 ext/tk/tcltklib.c     volatile VALUE current = rb_thread_current();
VALUE            6862 ext/tk/tcltklib.c     volatile VALUE ip_obj = obj;
VALUE            6863 ext/tk/tcltklib.c     volatile VALUE result;
VALUE            6864 ext/tk/tcltklib.c     volatile VALUE ret;
VALUE            6953 ext/tk/tcltklib.c static VALUE
VALUE            6955 ext/tk/tcltklib.c     VALUE self;
VALUE            6970 ext/tk/tcltklib.c static VALUE
VALUE            6973 ext/tk/tcltklib.c     VALUE *argv;
VALUE            6974 ext/tk/tcltklib.c     VALUE obj;
VALUE            6979 ext/tk/tcltklib.c static VALUE
VALUE            6982 ext/tk/tcltklib.c     VALUE *argv;
VALUE            6983 ext/tk/tcltklib.c     VALUE obj;
VALUE            6992 ext/tk/tcltklib.c static VALUE
VALUE            6994 ext/tk/tcltklib.c     VALUE interp;
VALUE            6996 ext/tk/tcltklib.c     VALUE *argv;
VALUE            7000 ext/tk/tcltklib.c     volatile VALUE varname, index, flag;
VALUE            7014 ext/tk/tcltklib.c         volatile VALUE strval;
VALUE            7032 ext/tk/tcltklib.c             volatile VALUE exc;
VALUE            7053 ext/tk/tcltklib.c         volatile VALUE strval;
VALUE            7067 ext/tk/tcltklib.c             volatile VALUE exc;
VALUE            7085 ext/tk/tcltklib.c static VALUE
VALUE            7087 ext/tk/tcltklib.c     VALUE self;
VALUE            7088 ext/tk/tcltklib.c     VALUE varname;
VALUE            7089 ext/tk/tcltklib.c     VALUE index;
VALUE            7090 ext/tk/tcltklib.c     VALUE flag;
VALUE            7092 ext/tk/tcltklib.c     VALUE argv[3];
VALUE            7093 ext/tk/tcltklib.c     VALUE retval;
VALUE            7111 ext/tk/tcltklib.c static VALUE
VALUE            7113 ext/tk/tcltklib.c     VALUE self;
VALUE            7114 ext/tk/tcltklib.c     VALUE varname;
VALUE            7115 ext/tk/tcltklib.c     VALUE flag;
VALUE            7120 ext/tk/tcltklib.c static VALUE
VALUE            7122 ext/tk/tcltklib.c     VALUE interp;
VALUE            7124 ext/tk/tcltklib.c     VALUE *argv;
VALUE            7128 ext/tk/tcltklib.c     volatile VALUE varname, index, value, flag;
VALUE            7144 ext/tk/tcltklib.c         volatile VALUE strval;
VALUE            7168 ext/tk/tcltklib.c             volatile VALUE exc;
VALUE            7190 ext/tk/tcltklib.c         volatile VALUE strval;
VALUE            7218 ext/tk/tcltklib.c static VALUE
VALUE            7220 ext/tk/tcltklib.c     VALUE self;
VALUE            7221 ext/tk/tcltklib.c     VALUE varname;
VALUE            7222 ext/tk/tcltklib.c     VALUE index;
VALUE            7223 ext/tk/tcltklib.c     VALUE value;
VALUE            7224 ext/tk/tcltklib.c     VALUE flag;
VALUE            7226 ext/tk/tcltklib.c     VALUE argv[4];
VALUE            7227 ext/tk/tcltklib.c     VALUE retval;
VALUE            7247 ext/tk/tcltklib.c static VALUE
VALUE            7249 ext/tk/tcltklib.c     VALUE self;
VALUE            7250 ext/tk/tcltklib.c     VALUE varname;
VALUE            7251 ext/tk/tcltklib.c     VALUE value;
VALUE            7252 ext/tk/tcltklib.c     VALUE flag;
VALUE            7257 ext/tk/tcltklib.c static VALUE
VALUE            7259 ext/tk/tcltklib.c     VALUE interp;
VALUE            7261 ext/tk/tcltklib.c     VALUE *argv;
VALUE            7264 ext/tk/tcltklib.c     volatile VALUE varname, index, flag;
VALUE            7293 ext/tk/tcltklib.c static VALUE
VALUE            7295 ext/tk/tcltklib.c     VALUE self;
VALUE            7296 ext/tk/tcltklib.c     VALUE varname;
VALUE            7297 ext/tk/tcltklib.c     VALUE index;
VALUE            7298 ext/tk/tcltklib.c     VALUE flag;
VALUE            7300 ext/tk/tcltklib.c     VALUE argv[3];
VALUE            7301 ext/tk/tcltklib.c     VALUE retval;
VALUE            7319 ext/tk/tcltklib.c static VALUE
VALUE            7321 ext/tk/tcltklib.c     VALUE self;
VALUE            7322 ext/tk/tcltklib.c     VALUE varname;
VALUE            7323 ext/tk/tcltklib.c     VALUE flag;
VALUE            7328 ext/tk/tcltklib.c static VALUE
VALUE            7330 ext/tk/tcltklib.c     VALUE self;
VALUE            7331 ext/tk/tcltklib.c     VALUE varname;
VALUE            7337 ext/tk/tcltklib.c static VALUE
VALUE            7339 ext/tk/tcltklib.c     VALUE self;
VALUE            7340 ext/tk/tcltklib.c     VALUE varname;
VALUE            7341 ext/tk/tcltklib.c     VALUE index;
VALUE            7347 ext/tk/tcltklib.c static VALUE
VALUE            7349 ext/tk/tcltklib.c     VALUE self;
VALUE            7350 ext/tk/tcltklib.c     VALUE varname;
VALUE            7351 ext/tk/tcltklib.c     VALUE value;
VALUE            7357 ext/tk/tcltklib.c static VALUE
VALUE            7359 ext/tk/tcltklib.c     VALUE self;
VALUE            7360 ext/tk/tcltklib.c     VALUE varname;
VALUE            7361 ext/tk/tcltklib.c     VALUE index;
VALUE            7362 ext/tk/tcltklib.c     VALUE value;
VALUE            7368 ext/tk/tcltklib.c static VALUE
VALUE            7370 ext/tk/tcltklib.c     VALUE self;
VALUE            7371 ext/tk/tcltklib.c     VALUE varname;
VALUE            7377 ext/tk/tcltklib.c static VALUE
VALUE            7379 ext/tk/tcltklib.c     VALUE self;
VALUE            7380 ext/tk/tcltklib.c     VALUE varname;
VALUE            7381 ext/tk/tcltklib.c     VALUE index;
VALUE            7389 ext/tk/tcltklib.c static VALUE
VALUE            7391 ext/tk/tcltklib.c     VALUE ip_obj;
VALUE            7392 ext/tk/tcltklib.c     VALUE list_str;
VALUE            7395 ext/tk/tcltklib.c     volatile VALUE ary, elem;
VALUE            7399 ext/tk/tcltklib.c     VALUE old_gc;
VALUE            7503 ext/tk/tcltklib.c static VALUE
VALUE            7505 ext/tk/tcltklib.c     VALUE self;
VALUE            7506 ext/tk/tcltklib.c     VALUE list_str;
VALUE            7512 ext/tk/tcltklib.c static VALUE
VALUE            7514 ext/tk/tcltklib.c     VALUE self;
VALUE            7515 ext/tk/tcltklib.c     VALUE list_str;
VALUE            7520 ext/tk/tcltklib.c static VALUE
VALUE            7523 ext/tk/tcltklib.c     VALUE *argv;
VALUE            7524 ext/tk/tcltklib.c     VALUE obj;
VALUE            7529 ext/tk/tcltklib.c     volatile VALUE str;
VALUE            7532 ext/tk/tcltklib.c     VALUE old_gc;
VALUE            7592 ext/tk/tcltklib.c static VALUE
VALUE            7594 ext/tk/tcltklib.c     VALUE self;
VALUE            7595 ext/tk/tcltklib.c     VALUE src;
VALUE            7598 ext/tk/tcltklib.c     volatile VALUE dst;
VALUE            7631 ext/tk/tcltklib.c static VALUE
VALUE            7634 ext/tk/tcltklib.c     volatile VALUE ret;
VALUE            7698 ext/tk/tcltklib.c     VALUE lib = rb_define_module("TclTkLib");
VALUE            7699 ext/tk/tcltklib.c     VALUE ip = rb_define_class("TclTkIp", rb_cObject);
VALUE            7701 ext/tk/tcltklib.c     VALUE ev_flag = rb_define_module_under(lib, "EventFlag");
VALUE            7702 ext/tk/tcltklib.c     VALUE var_flag = rb_define_module_under(lib, "VarAccessFlag");
VALUE              17 ext/tk/tkutil/tkutil.c static VALUE cMethod;
VALUE              19 ext/tk/tkutil/tkutil.c static VALUE cTclTkLib;
VALUE              21 ext/tk/tkutil/tkutil.c static VALUE cTkObject;
VALUE              22 ext/tk/tkutil/tkutil.c static VALUE cTkCallbackEntry;
VALUE              24 ext/tk/tkutil/tkutil.c static VALUE TK_None;
VALUE              26 ext/tk/tkutil/tkutil.c static VALUE cCB_SUBST;
VALUE              27 ext/tk/tkutil/tkutil.c static VALUE cSUBST_INFO;
VALUE              47 ext/tk/tkutil/tkutil.c static VALUE CALLBACK_TABLE;
VALUE              52 ext/tk/tkutil/tkutil.c static VALUE
VALUE              55 ext/tk/tkutil/tkutil.c     VALUE *argv;
VALUE              56 ext/tk/tkutil/tkutil.c     VALUE klass;
VALUE              58 ext/tk/tkutil/tkutil.c     VALUE obj = rb_class_new_instance(argc, argv, klass);
VALUE              66 ext/tk/tkutil/tkutil.c static VALUE
VALUE              68 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE              75 ext/tk/tkutil/tkutil.c static VALUE
VALUE              78 ext/tk/tkutil/tkutil.c     VALUE argv[];
VALUE              79 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE              81 ext/tk/tkutil/tkutil.c     volatile VALUE cmd, rest;
VALUE              87 ext/tk/tkutil/tkutil.c static VALUE
VALUE              90 ext/tk/tkutil/tkutil.c     VALUE *argv;
VALUE              91 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE              94 ext/tk/tkutil/tkutil.c     volatile VALUE id;
VALUE              95 ext/tk/tkutil/tkutil.c     volatile VALUE rest;
VALUE             107 ext/tk/tkutil/tkutil.c static VALUE
VALUE             109 ext/tk/tkutil/tkutil.c     VALUE cmd;
VALUE             111 ext/tk/tkutil/tkutil.c     volatile VALUE id_num;
VALUE             120 ext/tk/tkutil/tkutil.c static VALUE
VALUE             123 ext/tk/tkutil/tkutil.c     VALUE *argv;
VALUE             124 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE             126 ext/tk/tkutil/tkutil.c     volatile VALUE cmd;
VALUE             142 ext/tk/tkutil/tkutil.c static VALUE
VALUE             144 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE             145 ext/tk/tkutil/tkutil.c     VALUE cmd_id;
VALUE             163 ext/tk/tkutil/tkutil.c static VALUE
VALUE             166 ext/tk/tkutil/tkutil.c     VALUE *argv;
VALUE             167 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE             172 ext/tk/tkutil/tkutil.c static VALUE
VALUE             175 ext/tk/tkutil/tkutil.c     VALUE *argv;
VALUE             176 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE             181 ext/tk/tkutil/tkutil.c static VALUE
VALUE             183 ext/tk/tkutil/tkutil.c     VALUE str;
VALUE             184 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE             186 ext/tk/tkutil/tkutil.c     VALUE argv[1];
VALUE             192 ext/tk/tkutil/tkutil.c static VALUE
VALUE             194 ext/tk/tkutil/tkutil.c     VALUE str;
VALUE             195 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE             197 ext/tk/tkutil/tkutil.c     VALUE argv[1];
VALUE             205 ext/tk/tkutil/tkutil.c     VALUE key;
VALUE             206 ext/tk/tkutil/tkutil.c     VALUE value;
VALUE             207 ext/tk/tkutil/tkutil.c     VALUE hash;
VALUE             214 ext/tk/tkutil/tkutil.c static VALUE
VALUE             216 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE             217 ext/tk/tkutil/tkutil.c     VALUE keys;
VALUE             219 ext/tk/tkutil/tkutil.c     volatile VALUE new_keys = rb_hash_new();
VALUE             227 ext/tk/tkutil/tkutil.c static VALUE get_eval_string_core _((VALUE, VALUE, VALUE));
VALUE             228 ext/tk/tkutil/tkutil.c static VALUE ary2list _((VALUE, VALUE, VALUE));
VALUE             229 ext/tk/tkutil/tkutil.c static VALUE ary2list2 _((VALUE, VALUE, VALUE));
VALUE             230 ext/tk/tkutil/tkutil.c static VALUE hash2list _((VALUE, VALUE));
VALUE             231 ext/tk/tkutil/tkutil.c static VALUE hash2list_enc _((VALUE, VALUE));
VALUE             232 ext/tk/tkutil/tkutil.c static VALUE hash2kv _((VALUE, VALUE, VALUE));
VALUE             233 ext/tk/tkutil/tkutil.c static VALUE hash2kv_enc _((VALUE, VALUE, VALUE));
VALUE             235 ext/tk/tkutil/tkutil.c static VALUE
VALUE             237 ext/tk/tkutil/tkutil.c     VALUE ary;
VALUE             238 ext/tk/tkutil/tkutil.c     VALUE enc_flag;
VALUE             239 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE             242 ext/tk/tkutil/tkutil.c     volatile VALUE val, val2, str_val;
VALUE             243 ext/tk/tkutil/tkutil.c     volatile VALUE dst;
VALUE             244 ext/tk/tkutil/tkutil.c     volatile VALUE sys_enc, dst_enc, str_enc;
VALUE             389 ext/tk/tkutil/tkutil.c static VALUE
VALUE             391 ext/tk/tkutil/tkutil.c     VALUE ary;
VALUE             392 ext/tk/tkutil/tkutil.c     VALUE enc_flag;
VALUE             393 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE             396 ext/tk/tkutil/tkutil.c     volatile VALUE val, str_val;
VALUE             397 ext/tk/tkutil/tkutil.c     volatile VALUE dst;
VALUE             398 ext/tk/tkutil/tkutil.c     volatile VALUE sys_enc, dst_enc, str_enc;
VALUE             483 ext/tk/tkutil/tkutil.c static VALUE
VALUE             485 ext/tk/tkutil/tkutil.c     VALUE key;
VALUE             490 ext/tk/tkutil/tkutil.c static VALUE
VALUE             492 ext/tk/tkutil/tkutil.c     VALUE assoc;
VALUE             493 ext/tk/tkutil/tkutil.c     VALUE ary;
VALUE             494 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE             497 ext/tk/tkutil/tkutil.c     volatile VALUE pair;
VALUE             498 ext/tk/tkutil/tkutil.c     volatile VALUE val;
VALUE             499 ext/tk/tkutil/tkutil.c     volatile VALUE dst = rb_ary_new2(2 * RARRAY(assoc)->len);
VALUE             541 ext/tk/tkutil/tkutil.c static VALUE
VALUE             543 ext/tk/tkutil/tkutil.c     VALUE assoc;
VALUE             544 ext/tk/tkutil/tkutil.c     VALUE ary;
VALUE             545 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE             548 ext/tk/tkutil/tkutil.c     volatile VALUE pair;
VALUE             549 ext/tk/tkutil/tkutil.c     volatile VALUE val;
VALUE             550 ext/tk/tkutil/tkutil.c     volatile VALUE dst = rb_ary_new2(2 * RARRAY(assoc)->len);
VALUE             596 ext/tk/tkutil/tkutil.c     VALUE key;
VALUE             597 ext/tk/tkutil/tkutil.c     VALUE val;
VALUE             598 ext/tk/tkutil/tkutil.c     VALUE args;
VALUE             600 ext/tk/tkutil/tkutil.c     volatile VALUE ary;
VALUE             619 ext/tk/tkutil/tkutil.c static VALUE
VALUE             621 ext/tk/tkutil/tkutil.c     VALUE hash;
VALUE             622 ext/tk/tkutil/tkutil.c     VALUE ary;
VALUE             623 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE             625 ext/tk/tkutil/tkutil.c     volatile VALUE args = rb_ary_new2(2);
VALUE             626 ext/tk/tkutil/tkutil.c     volatile VALUE dst = rb_ary_new2(2 * RHASH(hash)->tbl->num_entries);
VALUE             644 ext/tk/tkutil/tkutil.c     VALUE key;
VALUE             645 ext/tk/tkutil/tkutil.c     VALUE val;
VALUE             646 ext/tk/tkutil/tkutil.c     VALUE args;
VALUE             648 ext/tk/tkutil/tkutil.c     volatile VALUE ary;
VALUE             670 ext/tk/tkutil/tkutil.c static VALUE
VALUE             672 ext/tk/tkutil/tkutil.c     VALUE hash;
VALUE             673 ext/tk/tkutil/tkutil.c     VALUE ary;
VALUE             674 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE             676 ext/tk/tkutil/tkutil.c     volatile VALUE args = rb_ary_new2(2);
VALUE             677 ext/tk/tkutil/tkutil.c     volatile VALUE dst = rb_ary_new2(2 * RHASH(hash)->tbl->num_entries);
VALUE             693 ext/tk/tkutil/tkutil.c static VALUE
VALUE             695 ext/tk/tkutil/tkutil.c     VALUE hash;
VALUE             696 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE             702 ext/tk/tkutil/tkutil.c static VALUE
VALUE             704 ext/tk/tkutil/tkutil.c     VALUE hash;
VALUE             705 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE             710 ext/tk/tkutil/tkutil.c static VALUE
VALUE             713 ext/tk/tkutil/tkutil.c     VALUE *argv;
VALUE             714 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE             716 ext/tk/tkutil/tkutil.c     volatile VALUE hash, enc_flag, ary;
VALUE             768 ext/tk/tkutil/tkutil.c static VALUE
VALUE             770 ext/tk/tkutil/tkutil.c     VALUE obj;
VALUE             771 ext/tk/tkutil/tkutil.c     VALUE enc_flag;
VALUE             772 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE             863 ext/tk/tkutil/tkutil.c static VALUE
VALUE             866 ext/tk/tkutil/tkutil.c     VALUE *argv;
VALUE             867 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE             869 ext/tk/tkutil/tkutil.c     volatile VALUE obj, enc_flag;
VALUE             878 ext/tk/tkutil/tkutil.c static VALUE
VALUE             880 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE             881 ext/tk/tkutil/tkutil.c     VALUE obj;
VALUE             890 ext/tk/tkutil/tkutil.c static VALUE
VALUE             893 ext/tk/tkutil/tkutil.c     VALUE *argv; /* [0]:base_array, [1]:enc_mode, [2]..[n]:args */
VALUE             894 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE             897 ext/tk/tkutil/tkutil.c     volatile VALUE dst;
VALUE             899 ext/tk/tkutil/tkutil.c     VALUE old_gc;
VALUE             941 ext/tk/tkutil/tkutil.c static VALUE
VALUE             943 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE             944 ext/tk/tkutil/tkutil.c     VALUE value;
VALUE             975 ext/tk/tkutil/tkutil.c static VALUE
VALUE             977 ext/tk/tkutil/tkutil.c     VALUE value;
VALUE             982 ext/tk/tkutil/tkutil.c static VALUE
VALUE             984 ext/tk/tkutil/tkutil.c     VALUE value;
VALUE             989 ext/tk/tkutil/tkutil.c static VALUE
VALUE             991 ext/tk/tkutil/tkutil.c     VALUE value;
VALUE             996 ext/tk/tkutil/tkutil.c static VALUE
VALUE             998 ext/tk/tkutil/tkutil.c     VALUE value;
VALUE            1005 ext/tk/tkutil/tkutil.c static VALUE
VALUE            1007 ext/tk/tkutil/tkutil.c     VALUE value;
VALUE            1014 ext/tk/tkutil/tkutil.c static VALUE
VALUE            1016 ext/tk/tkutil/tkutil.c     VALUE value;
VALUE            1027 ext/tk/tkutil/tkutil.c static VALUE
VALUE            1029 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE            1030 ext/tk/tkutil/tkutil.c     VALUE value;
VALUE            1035 ext/tk/tkutil/tkutil.c static VALUE
VALUE            1037 ext/tk/tkutil/tkutil.c     VALUE value;
VALUE            1051 ext/tk/tkutil/tkutil.c static VALUE
VALUE            1053 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE            1054 ext/tk/tkutil/tkutil.c     VALUE value;
VALUE            1063 ext/tk/tkutil/tkutil.c static VALUE
VALUE            1065 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE            1066 ext/tk/tkutil/tkutil.c     VALUE value;
VALUE            1085 ext/tk/tkutil/tkutil.c     VALUE proc;
VALUE            1086 ext/tk/tkutil/tkutil.c     VALUE aliases;
VALUE            1114 ext/tk/tkutil/tkutil.c     volatile VALUE proc, aliases;
VALUE            1139 ext/tk/tkutil/tkutil.c static VALUE
VALUE            1142 ext/tk/tkutil/tkutil.c     VALUE *argv;
VALUE            1143 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE            1159 ext/tk/tkutil/tkutil.c static VALUE
VALUE            1161 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE            1162 ext/tk/tkutil/tkutil.c     VALUE val;
VALUE            1169 ext/tk/tkutil/tkutil.c     VALUE key, value, klass;
VALUE            1204 ext/tk/tkutil/tkutil.c static VALUE
VALUE            1206 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE            1207 ext/tk/tkutil/tkutil.c     VALUE tbl;
VALUE            1223 ext/tk/tkutil/tkutil.c static VALUE
VALUE            1226 ext/tk/tkutil/tkutil.c     VALUE *argv;
VALUE            1227 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE            1233 ext/tk/tkutil/tkutil.c     volatile VALUE arg_sym, ret;
VALUE            1284 ext/tk/tkutil/tkutil.c static VALUE
VALUE            1286 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE            1287 ext/tk/tkutil/tkutil.c     VALUE str;
VALUE            1289 ext/tk/tkutil/tkutil.c     volatile VALUE list;
VALUE            1290 ext/tk/tkutil/tkutil.c     volatile VALUE ret;
VALUE            1314 ext/tk/tkutil/tkutil.c static VALUE
VALUE            1316 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE            1321 ext/tk/tkutil/tkutil.c     volatile VALUE ret;
VALUE            1343 ext/tk/tkutil/tkutil.c static VALUE
VALUE            1345 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE            1346 ext/tk/tkutil/tkutil.c     VALUE key_inf;
VALUE            1347 ext/tk/tkutil/tkutil.c     VALUE proc_inf;
VALUE            1356 ext/tk/tkutil/tkutil.c     volatile VALUE proc = rb_hash_new();
VALUE            1357 ext/tk/tkutil/tkutil.c     volatile VALUE aliases = rb_hash_new();
VALUE            1358 ext/tk/tkutil/tkutil.c     volatile VALUE inf;
VALUE            1415 ext/tk/tkutil/tkutil.c static VALUE
VALUE            1417 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE            1422 ext/tk/tkutil/tkutil.c static VALUE
VALUE            1424 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE            1425 ext/tk/tkutil/tkutil.c     VALUE arg_key;
VALUE            1426 ext/tk/tkutil/tkutil.c     VALUE val_ary;
VALUE            1433 ext/tk/tkutil/tkutil.c     volatile VALUE dst = rb_ary_new2(len);
VALUE            1434 ext/tk/tkutil/tkutil.c     volatile VALUE proc;
VALUE            1436 ext/tk/tkutil/tkutil.c     VALUE old_gc;
VALUE            1476 ext/tk/tkutil/tkutil.c static VALUE
VALUE            1478 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE            1483 ext/tk/tkutil/tkutil.c static VALUE
VALUE            1485 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE            1492 ext/tk/tkutil/tkutil.c static VALUE
VALUE            1494 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE            1501 ext/tk/tkutil/tkutil.c static VALUE
VALUE            1503 ext/tk/tkutil/tkutil.c     VALUE self;
VALUE            1515 ext/tk/tkutil/tkutil.c     VALUE cTK = rb_define_class("TkKernel", rb_cObject);
VALUE            1516 ext/tk/tkutil/tkutil.c     VALUE mTK = rb_define_module("TkUtil");
VALUE             141 ext/win32ole/win32ole.c VALUE cWIN32OLE;
VALUE             142 ext/win32ole/win32ole.c VALUE cWIN32OLE_TYPELIB;
VALUE             143 ext/win32ole/win32ole.c VALUE cWIN32OLE_TYPE;
VALUE             144 ext/win32ole/win32ole.c VALUE cWIN32OLE_VARIABLE;
VALUE             145 ext/win32ole/win32ole.c VALUE cWIN32OLE_METHOD;
VALUE             146 ext/win32ole/win32ole.c VALUE cWIN32OLE_PARAM;
VALUE             147 ext/win32ole/win32ole.c VALUE cWIN32OLE_EVENT;
VALUE             148 ext/win32ole/win32ole.c VALUE cWIN32OLE_VARIANT;
VALUE             149 ext/win32ole/win32ole.c VALUE eWIN32OLE_RUNTIME_ERROR;
VALUE             150 ext/win32ole/win32ole.c VALUE mWIN32OLE_VARIANT;
VALUE             152 ext/win32ole/win32ole.c static VALUE ary_ole_event;
VALUE             158 ext/win32ole/win32ole.c static VALUE com_hash;
VALUE             203 ext/win32ole/win32ole.c static VALUE folemethod_s_allocate _((VALUE));
VALUE             204 ext/win32ole/win32ole.c static VALUE olemethod_set_member _((VALUE, ITypeInfo *, ITypeInfo *, int, VALUE));
VALUE             205 ext/win32ole/win32ole.c static VALUE foletype_s_allocate _((VALUE));
VALUE             206 ext/win32ole/win32ole.c static VALUE oletype_set_member  _((VALUE, ITypeInfo *, VALUE));
VALUE             207 ext/win32ole/win32ole.c static VALUE olemethod_from_typeinfo _((VALUE, ITypeInfo *, VALUE));
VALUE             210 ext/win32ole/win32ole.c static VALUE ole_variant2val(VARIANT*);
VALUE             211 ext/win32ole/win32ole.c static void ole_val2variant(VALUE, VARIANT*);
VALUE             217 ext/win32ole/win32ole.c     VALUE obj;
VALUE             301 ext/win32ole/win32ole.c     VALUE v;
VALUE             305 ext/win32ole/win32ole.c     VALUE* parg = ALLOCA_N(VALUE, args);
VALUE             323 ext/win32ole/win32ole.c     VALUE val;
VALUE             338 ext/win32ole/win32ole.c         st_insert(tbl, val, (VALUE)pdisp | FIXNUM_FLAG);
VALUE             450 ext/win32ole/win32ole.c     VALUE tmobj;
VALUE             466 ext/win32ole/win32ole.c static VALUE
VALUE             499 ext/win32ole/win32ole.c static VALUE
VALUE             503 ext/win32ole/win32ole.c     VALUE msg = Qnil;
VALUE             533 ext/win32ole/win32ole.c static VALUE
VALUE             540 ext/win32ole/win32ole.c     VALUE error_msg;
VALUE             580 ext/win32ole/win32ole.c ole_raise(HRESULT hr, VALUE ecs, const char *fmt, ...)
VALUE             584 ext/win32ole/win32ole.c     VALUE exc;
VALUE             591 ext/win32ole/win32ole.c     VALUE err_msg;
VALUE             690 ext/win32ole/win32ole.c static VALUE
VALUE             696 ext/win32ole/win32ole.c     VALUE vstr = rb_str_new2(p);
VALUE             703 ext/win32ole/win32ole.c static VALUE
VALUE             705 ext/win32ole/win32ole.c     VALUE val;
VALUE             708 ext/win32ole/win32ole.c     VALUE obj = Qnil;
VALUE             724 ext/win32ole/win32ole.c     VALUE val;
VALUE             727 ext/win32ole/win32ole.c     VALUE val1;
VALUE             748 ext/win32ole/win32ole.c     VALUE val;
VALUE             767 ext/win32ole/win32ole.c         VALUE val1;
VALUE             864 ext/win32ole/win32ole.c     VALUE val;
VALUE             999 ext/win32ole/win32ole.c     VALUE val;
VALUE            1036 ext/win32ole/win32ole.c     VALUE val;
VALUE            1044 ext/win32ole/win32ole.c static VALUE
VALUE            1046 ext/win32ole/win32ole.c     VALUE self;
VALUE            1059 ext/win32ole/win32ole.c static VALUE fole_s_allocate _((VALUE));
VALUE            1060 ext/win32ole/win32ole.c static VALUE
VALUE            1062 ext/win32ole/win32ole.c     VALUE klass;
VALUE            1065 ext/win32ole/win32ole.c     VALUE obj;
VALUE            1072 ext/win32ole/win32ole.c static VALUE
VALUE            1074 ext/win32ole/win32ole.c     VALUE klass;
VALUE            1077 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            1079 ext/win32ole/win32ole.c     VALUE obj = fole_s_allocate(klass);
VALUE            1084 ext/win32ole/win32ole.c static VALUE
VALUE            1088 ext/win32ole/win32ole.c     VALUE obj = Qnil;
VALUE            1098 ext/win32ole/win32ole.c         VALUE val;
VALUE            1099 ext/win32ole/win32ole.c         VALUE val2 = Qnil;
VALUE            1300 ext/win32ole/win32ole.c     VALUE key;
VALUE            1306 ext/win32ole/win32ole.c static VALUE
VALUE            1322 ext/win32ole/win32ole.c static VALUE
VALUE            1336 ext/win32ole/win32ole.c static VALUE
VALUE            1340 ext/win32ole/win32ole.c     VALUE path = Qnil;
VALUE            1348 ext/win32ole/win32ole.c static VALUE
VALUE            1350 ext/win32ole/win32ole.c     VALUE ole;
VALUE            1357 ext/win32ole/win32ole.c     VALUE typelib;
VALUE            1358 ext/win32ole/win32ole.c     VALUE vclsid;
VALUE            1383 ext/win32ole/win32ole.c static VALUE
VALUE            1385 ext/win32ole/win32ole.c     VALUE ole;
VALUE            1392 ext/win32ole/win32ole.c     VALUE typelib;
VALUE            1393 ext/win32ole/win32ole.c     VALUE file = Qnil;
VALUE            1394 ext/win32ole/win32ole.c     VALUE clsid;
VALUE            1395 ext/win32ole/win32ole.c     VALUE ver;
VALUE            1396 ext/win32ole/win32ole.c     VALUE lang;
VALUE            1442 ext/win32ole/win32ole.c static VALUE
VALUE            1444 ext/win32ole/win32ole.c     VALUE ole;
VALUE            1446 ext/win32ole/win32ole.c     VALUE file = typelib_file_from_clsid(ole);
VALUE            1456 ext/win32ole/win32ole.c     VALUE klass;
VALUE            1457 ext/win32ole/win32ole.c     VALUE self;
VALUE            1469 ext/win32ole/win32ole.c     VALUE val;
VALUE            1470 ext/win32ole/win32ole.c     VALUE constant;
VALUE            1521 ext/win32ole/win32ole.c     VALUE host;
VALUE            1522 ext/win32ole/win32ole.c     VALUE com;
VALUE            1527 ext/win32ole/win32ole.c     VALUE subkey;
VALUE            1560 ext/win32ole/win32ole.c static VALUE
VALUE            1563 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            1564 ext/win32ole/win32ole.c     VALUE self;
VALUE            1566 ext/win32ole/win32ole.c     VALUE ole, host, others;
VALUE            1613 ext/win32ole/win32ole.c static VALUE
VALUE            1615 ext/win32ole/win32ole.c     VALUE moniker;
VALUE            1617 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            1618 ext/win32ole/win32ole.c     VALUE self;
VALUE            1667 ext/win32ole/win32ole.c static VALUE
VALUE            1670 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            1671 ext/win32ole/win32ole.c     VALUE self;
VALUE            1673 ext/win32ole/win32ole.c     VALUE svr_name;
VALUE            1674 ext/win32ole/win32ole.c     VALUE others;
VALUE            1750 ext/win32ole/win32ole.c static VALUE
VALUE            1753 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            1754 ext/win32ole/win32ole.c     VALUE self;
VALUE            1756 ext/win32ole/win32ole.c     VALUE ole;
VALUE            1757 ext/win32ole/win32ole.c     VALUE klass;
VALUE            1764 ext/win32ole/win32ole.c     VALUE file;
VALUE            1819 ext/win32ole/win32ole.c static VALUE
VALUE            1822 ext/win32ole/win32ole.c     VALUE classes;
VALUE            1830 ext/win32ole/win32ole.c     VALUE type;
VALUE            1873 ext/win32ole/win32ole.c static VALUE
VALUE            1875 ext/win32ole/win32ole.c     VALUE self;
VALUE            1876 ext/win32ole/win32ole.c     VALUE obj;
VALUE            1892 ext/win32ole/win32ole.c static VALUE
VALUE            1894 ext/win32ole/win32ole.c     VALUE self;
VALUE            1895 ext/win32ole/win32ole.c     VALUE obj;
VALUE            1910 ext/win32ole/win32ole.c     VALUE helpfile;
VALUE            1911 ext/win32ole/win32ole.c     VALUE helpcontext;
VALUE            1942 ext/win32ole/win32ole.c static VALUE
VALUE            1945 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            1946 ext/win32ole/win32ole.c     VALUE self;
VALUE            1948 ext/win32ole/win32ole.c     VALUE target;
VALUE            1949 ext/win32ole/win32ole.c     VALUE helpcontext;
VALUE            1950 ext/win32ole/win32ole.c     VALUE helpfile;
VALUE            1951 ext/win32ole/win32ole.c     VALUE name;
VALUE            1984 ext/win32ole/win32ole.c static VALUE
VALUE            1986 ext/win32ole/win32ole.c     VALUE self;
VALUE            1998 ext/win32ole/win32ole.c static VALUE
VALUE            2000 ext/win32ole/win32ole.c     VALUE self;
VALUE            2001 ext/win32ole/win32ole.c     VALUE vcp;
VALUE            2045 ext/win32ole/win32ole.c static VALUE
VALUE            2048 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            2049 ext/win32ole/win32ole.c     VALUE self;
VALUE            2051 ext/win32ole/win32ole.c     VALUE svr_name;
VALUE            2052 ext/win32ole/win32ole.c     VALUE host;
VALUE            2053 ext/win32ole/win32ole.c     VALUE others;
VALUE            2101 ext/win32ole/win32ole.c static VALUE
VALUE            2103 ext/win32ole/win32ole.c     VALUE pair;
VALUE            2107 ext/win32ole/win32ole.c     VALUE key, value;
VALUE            2138 ext/win32ole/win32ole.c static VALUE
VALUE            2143 ext/win32ole/win32ole.c     VALUE argv = rb_const_get(cWIN32OLE, rb_intern("ARGV"));
VALUE            2154 ext/win32ole/win32ole.c static VALUE
VALUE            2157 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            2158 ext/win32ole/win32ole.c     VALUE self;
VALUE            2164 ext/win32ole/win32ole.c     VALUE cmd;
VALUE            2165 ext/win32ole/win32ole.c     VALUE paramS;
VALUE            2166 ext/win32ole/win32ole.c     VALUE param;
VALUE            2167 ext/win32ole/win32ole.c     VALUE obj;
VALUE            2168 ext/win32ole/win32ole.c     VALUE v;
VALUE            2221 ext/win32ole/win32ole.c         rb_iterate(rb_each, param, hash2named_arg, (VALUE)&op);
VALUE            2376 ext/win32ole/win32ole.c static VALUE
VALUE            2379 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            2380 ext/win32ole/win32ole.c     VALUE self;
VALUE            2385 ext/win32ole/win32ole.c static VALUE
VALUE            2387 ext/win32ole/win32ole.c     VALUE self;
VALUE            2388 ext/win32ole/win32ole.c     VALUE dispid;
VALUE            2389 ext/win32ole/win32ole.c     VALUE args;
VALUE            2390 ext/win32ole/win32ole.c     VALUE types;
VALUE            2401 ext/win32ole/win32ole.c     VALUE obj = Qnil;
VALUE            2402 ext/win32ole/win32ole.c     VALUE tp, param;
VALUE            2403 ext/win32ole/win32ole.c     VALUE v;
VALUE            2458 ext/win32ole/win32ole.c                     VALUE elem = rb_ary_entry(param, ent);
VALUE            2591 ext/win32ole/win32ole.c static VALUE
VALUE            2593 ext/win32ole/win32ole.c     VALUE self;
VALUE            2594 ext/win32ole/win32ole.c     VALUE dispid;
VALUE            2595 ext/win32ole/win32ole.c     VALUE args;
VALUE            2596 ext/win32ole/win32ole.c     VALUE types;
VALUE            2613 ext/win32ole/win32ole.c static VALUE
VALUE            2615 ext/win32ole/win32ole.c     VALUE self;
VALUE            2616 ext/win32ole/win32ole.c     VALUE dispid;
VALUE            2617 ext/win32ole/win32ole.c     VALUE args;
VALUE            2618 ext/win32ole/win32ole.c     VALUE types;
VALUE            2635 ext/win32ole/win32ole.c static VALUE
VALUE            2637 ext/win32ole/win32ole.c     VALUE self;
VALUE            2638 ext/win32ole/win32ole.c     VALUE dispid;
VALUE            2639 ext/win32ole/win32ole.c     VALUE args;
VALUE            2640 ext/win32ole/win32ole.c     VALUE types;
VALUE            2659 ext/win32ole/win32ole.c static VALUE
VALUE            2662 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            2663 ext/win32ole/win32ole.c     VALUE self;
VALUE            2677 ext/win32ole/win32ole.c static VALUE
VALUE            2679 ext/win32ole/win32ole.c     VALUE self, property;
VALUE            2684 ext/win32ole/win32ole.c static VALUE
VALUE            2686 ext/win32ole/win32ole.c     VALUE self, property, value;
VALUE            2699 ext/win32ole/win32ole.c     VALUE v;
VALUE            2749 ext/win32ole/win32ole.c static VALUE
VALUE            2751 ext/win32ole/win32ole.c     VALUE self;
VALUE            2761 ext/win32ole/win32ole.c static VALUE
VALUE            2763 ext/win32ole/win32ole.c     VALUE pEnumV;
VALUE            2766 ext/win32ole/win32ole.c     VALUE obj = Qnil;
VALUE            2778 ext/win32ole/win32ole.c static VALUE
VALUE            2780 ext/win32ole/win32ole.c     VALUE pEnumV;
VALUE            2801 ext/win32ole/win32ole.c static VALUE
VALUE            2803 ext/win32ole/win32ole.c     VALUE self;
VALUE            2849 ext/win32ole/win32ole.c     rb_ensure(ole_each_sub, (VALUE)pEnum, ole_ienum_free, (VALUE)pEnum);
VALUE            2859 ext/win32ole/win32ole.c static VALUE
VALUE            2862 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            2863 ext/win32ole/win32ole.c     VALUE self;
VALUE            2885 ext/win32ole/win32ole.c static VALUE
VALUE            2887 ext/win32ole/win32ole.c     VALUE self;
VALUE            2890 ext/win32ole/win32ole.c     VALUE name;
VALUE            2897 ext/win32ole/win32ole.c     VALUE fname;
VALUE            2898 ext/win32ole/win32ole.c     VALUE method = Qnil;
VALUE            2926 ext/win32ole/win32ole.c static VALUE
VALUE            2928 ext/win32ole/win32ole.c     VALUE self;
VALUE            2930 ext/win32ole/win32ole.c     VALUE name;
VALUE            2937 ext/win32ole/win32ole.c     VALUE method = Qnil;
VALUE            2960 ext/win32ole/win32ole.c static VALUE
VALUE            2964 ext/win32ole/win32ole.c     VALUE     methods;
VALUE            2972 ext/win32ole/win32ole.c     VALUE method;
VALUE            3004 ext/win32ole/win32ole.c static VALUE
VALUE            3014 ext/win32ole/win32ole.c     VALUE methods = rb_ary_new();
VALUE            3043 ext/win32ole/win32ole.c     VALUE type;
VALUE            3078 ext/win32ole/win32ole.c static VALUE
VALUE            3080 ext/win32ole/win32ole.c     VALUE self;
VALUE            3085 ext/win32ole/win32ole.c     VALUE methods;
VALUE            3110 ext/win32ole/win32ole.c static VALUE
VALUE            3112 ext/win32ole/win32ole.c     VALUE self;
VALUE            3127 ext/win32ole/win32ole.c static VALUE
VALUE            3129 ext/win32ole/win32ole.c     VALUE self;
VALUE            3144 ext/win32ole/win32ole.c static VALUE
VALUE            3146 ext/win32ole/win32ole.c     VALUE self;
VALUE            3162 ext/win32ole/win32ole.c static VALUE
VALUE            3164 ext/win32ole/win32ole.c     VALUE self;
VALUE            3169 ext/win32ole/win32ole.c static VALUE
VALUE            3174 ext/win32ole/win32ole.c     VALUE type = Qnil;
VALUE            3203 ext/win32ole/win32ole.c static VALUE
VALUE            3205 ext/win32ole/win32ole.c     VALUE self;
VALUE            3211 ext/win32ole/win32ole.c     VALUE type = Qnil;
VALUE            3227 ext/win32ole/win32ole.c static VALUE
VALUE            3229 ext/win32ole/win32ole.c     VALUE guid;
VALUE            3230 ext/win32ole/win32ole.c     VALUE major_version;
VALUE            3231 ext/win32ole/win32ole.c     VALUE minor_version;
VALUE            3233 ext/win32ole/win32ole.c     VALUE args = rb_ary_new();
VALUE            3240 ext/win32ole/win32ole.c static VALUE
VALUE            3249 ext/win32ole/win32ole.c     VALUE guid = Qnil;
VALUE            3250 ext/win32ole/win32ole.c     VALUE major;
VALUE            3251 ext/win32ole/win32ole.c     VALUE minor;
VALUE            3286 ext/win32ole/win32ole.c static VALUE
VALUE            3288 ext/win32ole/win32ole.c     VALUE self;
VALUE            3294 ext/win32ole/win32ole.c     VALUE vtlib = Qnil;
VALUE            3338 ext/win32ole/win32ole.c static VALUE
VALUE            3342 ext/win32ole/win32ole.c     VALUE typedetails;
VALUE            3347 ext/win32ole/win32ole.c     VALUE type = Qnil;
VALUE            3366 ext/win32ole/win32ole.c static VALUE ole_typedesc2val();
VALUE            3367 ext/win32ole/win32ole.c static VALUE
VALUE            3371 ext/win32ole/win32ole.c     VALUE typedetails;
VALUE            3374 ext/win32ole/win32ole.c     VALUE type = rb_str_new2("");
VALUE            3387 ext/win32ole/win32ole.c static VALUE
VALUE            3391 ext/win32ole/win32ole.c     VALUE typedetails;
VALUE            3393 ext/win32ole/win32ole.c     VALUE str;
VALUE            3532 ext/win32ole/win32ole.c static VALUE
VALUE            3534 ext/win32ole/win32ole.c     VALUE self;
VALUE            3535 ext/win32ole/win32ole.c     VALUE cmdname;
VALUE            3540 ext/win32ole/win32ole.c     VALUE method, obj;
VALUE            3563 ext/win32ole/win32ole.c static VALUE
VALUE            3565 ext/win32ole/win32ole.c     VALUE self;
VALUE            3566 ext/win32ole/win32ole.c     VALUE typelib;
VALUE            3568 ext/win32ole/win32ole.c     VALUE file, classes;
VALUE            3606 ext/win32ole/win32ole.c static VALUE
VALUE            3608 ext/win32ole/win32ole.c     VALUE self;
VALUE            3614 ext/win32ole/win32ole.c     VALUE clsid;
VALUE            3615 ext/win32ole/win32ole.c     VALUE ver;
VALUE            3616 ext/win32ole/win32ole.c     VALUE v = Qnil;
VALUE            3617 ext/win32ole/win32ole.c     VALUE typelibs = rb_ary_new();
VALUE            3659 ext/win32ole/win32ole.c static VALUE
VALUE            3661 ext/win32ole/win32ole.c     VALUE self;
VALUE            3666 ext/win32ole/win32ole.c     VALUE clsid;
VALUE            3667 ext/win32ole/win32ole.c     VALUE v = rb_str_new2("");
VALUE            3668 ext/win32ole/win32ole.c     VALUE progids = rb_ary_new();
VALUE            3691 ext/win32ole/win32ole.c static VALUE
VALUE            3693 ext/win32ole/win32ole.c     VALUE klass;
VALUE            3696 ext/win32ole/win32ole.c     VALUE obj;
VALUE            3703 ext/win32ole/win32ole.c static VALUE
VALUE            3705 ext/win32ole/win32ole.c     VALUE self;
VALUE            3707 ext/win32ole/win32ole.c     VALUE name;
VALUE            3717 ext/win32ole/win32ole.c static VALUE
VALUE            3719 ext/win32ole/win32ole.c     VALUE self;
VALUE            3721 ext/win32ole/win32ole.c     VALUE oleclass;
VALUE            3728 ext/win32ole/win32ole.c     VALUE typelib;
VALUE            3731 ext/win32ole/win32ole.c     VALUE found = Qfalse;
VALUE            3759 ext/win32ole/win32ole.c static VALUE
VALUE            3761 ext/win32ole/win32ole.c     VALUE self;
VALUE            3762 ext/win32ole/win32ole.c     VALUE typelib;
VALUE            3763 ext/win32ole/win32ole.c     VALUE guid;
VALUE            3764 ext/win32ole/win32ole.c     VALUE version;
VALUE            3782 ext/win32ole/win32ole.c static VALUE
VALUE            3784 ext/win32ole/win32ole.c     VALUE self;
VALUE            3789 ext/win32ole/win32ole.c     VALUE guid;
VALUE            3790 ext/win32ole/win32ole.c     VALUE version;
VALUE            3791 ext/win32ole/win32ole.c     VALUE name = Qnil;
VALUE            3792 ext/win32ole/win32ole.c     VALUE typelibs = rb_ary_new();
VALUE            3793 ext/win32ole/win32ole.c     VALUE typelib = Qnil;
VALUE            3822 ext/win32ole/win32ole.c static VALUE
VALUE            3824 ext/win32ole/win32ole.c     VALUE major;
VALUE            3825 ext/win32ole/win32ole.c     VALUE minor;
VALUE            3827 ext/win32ole/win32ole.c     VALUE version_str = Qnil;
VALUE            3828 ext/win32ole/win32ole.c     VALUE minor_str = Qnil;
VALUE            3841 ext/win32ole/win32ole.c static VALUE
VALUE            3843 ext/win32ole/win32ole.c     VALUE self;
VALUE            3844 ext/win32ole/win32ole.c     VALUE args;
VALUE            3850 ext/win32ole/win32ole.c     VALUE found = Qfalse;
VALUE            3851 ext/win32ole/win32ole.c     VALUE tlib;
VALUE            3852 ext/win32ole/win32ole.c     VALUE ver;
VALUE            3853 ext/win32ole/win32ole.c     VALUE version_str;
VALUE            3854 ext/win32ole/win32ole.c     VALUE version = Qnil;
VALUE            3855 ext/win32ole/win32ole.c     VALUE typelib = Qnil;
VALUE            3857 ext/win32ole/win32ole.c     VALUE guid = rb_ary_entry(args, 0);
VALUE            3910 ext/win32ole/win32ole.c static VALUE
VALUE            3912 ext/win32ole/win32ole.c     VALUE self;
VALUE            3913 ext/win32ole/win32ole.c     VALUE typelib;
VALUE            3918 ext/win32ole/win32ole.c     VALUE found = Qfalse;
VALUE            3919 ext/win32ole/win32ole.c     VALUE tlib;
VALUE            3920 ext/win32ole/win32ole.c     VALUE guid;
VALUE            3921 ext/win32ole/win32ole.c     VALUE ver;
VALUE            3981 ext/win32ole/win32ole.c static VALUE
VALUE            3983 ext/win32ole/win32ole.c     VALUE self;
VALUE            3984 ext/win32ole/win32ole.c     VALUE args;
VALUE            3986 ext/win32ole/win32ole.c     VALUE found = Qfalse;
VALUE            3987 ext/win32ole/win32ole.c     VALUE typelib = Qnil;
VALUE            4020 ext/win32ole/win32ole.c static VALUE
VALUE            4022 ext/win32ole/win32ole.c     VALUE self;
VALUE            4036 ext/win32ole/win32ole.c static VALUE
VALUE            4038 ext/win32ole/win32ole.c     VALUE self;
VALUE            4052 ext/win32ole/win32ole.c static VALUE
VALUE            4054 ext/win32ole/win32ole.c     VALUE self;
VALUE            4056 ext/win32ole/win32ole.c     VALUE ver = rb_ivar_get(self, rb_intern("version"));
VALUE            4069 ext/win32ole/win32ole.c static VALUE
VALUE            4071 ext/win32ole/win32ole.c     VALUE self;
VALUE            4073 ext/win32ole/win32ole.c     VALUE ver = rb_ivar_get(self, rb_intern("version"));
VALUE            4074 ext/win32ole/win32ole.c     VALUE ary = rb_str_split(ver, ".");
VALUE            4087 ext/win32ole/win32ole.c static VALUE
VALUE            4089 ext/win32ole/win32ole.c     VALUE self;
VALUE            4091 ext/win32ole/win32ole.c     VALUE ver = rb_ivar_get(self, rb_intern("version"));
VALUE            4092 ext/win32ole/win32ole.c     VALUE ary = rb_str_split(ver, ".");
VALUE            4096 ext/win32ole/win32ole.c static VALUE
VALUE            4098 ext/win32ole/win32ole.c     VALUE guid;
VALUE            4099 ext/win32ole/win32ole.c     VALUE version;
VALUE            4105 ext/win32ole/win32ole.c     VALUE lang;
VALUE            4106 ext/win32ole/win32ole.c     VALUE path = Qnil;
VALUE            4108 ext/win32ole/win32ole.c     VALUE key = rb_str_new2("TypeLib\\");
VALUE            4140 ext/win32ole/win32ole.c static VALUE
VALUE            4142 ext/win32ole/win32ole.c     VALUE self;
VALUE            4144 ext/win32ole/win32ole.c     VALUE guid = rb_ivar_get(self, rb_intern("guid"));
VALUE            4145 ext/win32ole/win32ole.c     VALUE version = rb_ivar_get(self, rb_intern("version"));
VALUE            4159 ext/win32ole/win32ole.c static VALUE
VALUE            4161 ext/win32ole/win32ole.c     VALUE self;
VALUE            4166 ext/win32ole/win32ole.c     VALUE path = Qnil;
VALUE            4167 ext/win32ole/win32ole.c     VALUE classes = rb_ary_new();
VALUE            4202 ext/win32ole/win32ole.c static VALUE
VALUE            4204 ext/win32ole/win32ole.c     VALUE self;
VALUE            4205 ext/win32ole/win32ole.c     VALUE typelib;
VALUE            4206 ext/win32ole/win32ole.c     VALUE oleclass;
VALUE            4208 ext/win32ole/win32ole.c     VALUE file;
VALUE            4241 ext/win32ole/win32ole.c static VALUE
VALUE            4243 ext/win32ole/win32ole.c     VALUE self;
VALUE            4248 ext/win32ole/win32ole.c static VALUE
VALUE            4254 ext/win32ole/win32ole.c     VALUE type = Qnil;
VALUE            4303 ext/win32ole/win32ole.c static VALUE
VALUE            4305 ext/win32ole/win32ole.c     VALUE self;
VALUE            4312 ext/win32ole/win32ole.c static VALUE
VALUE            4320 ext/win32ole/win32ole.c     VALUE guid = Qnil;
VALUE            4340 ext/win32ole/win32ole.c static VALUE
VALUE            4342 ext/win32ole/win32ole.c     VALUE self;
VALUE            4349 ext/win32ole/win32ole.c static VALUE
VALUE            4356 ext/win32ole/win32ole.c     VALUE progid = Qnil;
VALUE            4375 ext/win32ole/win32ole.c static VALUE
VALUE            4377 ext/win32ole/win32ole.c     VALUE self;
VALUE            4385 ext/win32ole/win32ole.c static VALUE
VALUE            4391 ext/win32ole/win32ole.c     VALUE visible;
VALUE            4412 ext/win32ole/win32ole.c static VALUE
VALUE            4414 ext/win32ole/win32ole.c     VALUE self;
VALUE            4421 ext/win32ole/win32ole.c static VALUE
VALUE            4425 ext/win32ole/win32ole.c     VALUE ver;
VALUE            4444 ext/win32ole/win32ole.c static VALUE
VALUE            4446 ext/win32ole/win32ole.c     VALUE self;
VALUE            4453 ext/win32ole/win32ole.c static VALUE
VALUE            4457 ext/win32ole/win32ole.c     VALUE ver;
VALUE            4476 ext/win32ole/win32ole.c static VALUE
VALUE            4478 ext/win32ole/win32ole.c     VALUE self;
VALUE            4485 ext/win32ole/win32ole.c static VALUE
VALUE            4489 ext/win32ole/win32ole.c     VALUE typekind;
VALUE            4509 ext/win32ole/win32ole.c static VALUE
VALUE            4511 ext/win32ole/win32ole.c     VALUE self;
VALUE            4518 ext/win32ole/win32ole.c static VALUE
VALUE            4539 ext/win32ole/win32ole.c static VALUE
VALUE            4541 ext/win32ole/win32ole.c     VALUE self;
VALUE            4548 ext/win32ole/win32ole.c static VALUE
VALUE            4554 ext/win32ole/win32ole.c     VALUE alias = Qnil;
VALUE            4576 ext/win32ole/win32ole.c static VALUE
VALUE            4578 ext/win32ole/win32ole.c     VALUE self;
VALUE            4585 ext/win32ole/win32ole.c static VALUE
VALUE            4607 ext/win32ole/win32ole.c static VALUE
VALUE            4609 ext/win32ole/win32ole.c     VALUE self;
VALUE            4616 ext/win32ole/win32ole.c static VALUE
VALUE            4637 ext/win32ole/win32ole.c static VALUE
VALUE            4639 ext/win32ole/win32ole.c     VALUE self;
VALUE            4655 ext/win32ole/win32ole.c static VALUE
VALUE            4657 ext/win32ole/win32ole.c     VALUE self;
VALUE            4664 ext/win32ole/win32ole.c static VALUE
VALUE            4672 ext/win32ole/win32ole.c     VALUE type;
VALUE            4676 ext/win32ole/win32ole.c     VALUE types = rb_ary_new();
VALUE            4712 ext/win32ole/win32ole.c static VALUE
VALUE            4714 ext/win32ole/win32ole.c     VALUE self;
VALUE            4721 ext/win32ole/win32ole.c static VALUE
VALUE            4733 ext/win32ole/win32ole.c     VALUE var;
VALUE            4734 ext/win32ole/win32ole.c     VALUE variables = rb_ary_new();
VALUE            4786 ext/win32ole/win32ole.c static VALUE
VALUE            4788 ext/win32ole/win32ole.c     VALUE self;
VALUE            4807 ext/win32ole/win32ole.c static VALUE
VALUE            4810 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            4811 ext/win32ole/win32ole.c     VALUE self;
VALUE            4844 ext/win32ole/win32ole.c static VALUE
VALUE            4846 ext/win32ole/win32ole.c     VALUE self;
VALUE            4851 ext/win32ole/win32ole.c static VALUE
VALUE            4858 ext/win32ole/win32ole.c     VALUE type;
VALUE            4887 ext/win32ole/win32ole.c static VALUE
VALUE            4889 ext/win32ole/win32ole.c     VALUE self;
VALUE            4896 ext/win32ole/win32ole.c static VALUE
VALUE            4903 ext/win32ole/win32ole.c     VALUE type = rb_ary_new();
VALUE            4924 ext/win32ole/win32ole.c static VALUE
VALUE            4926 ext/win32ole/win32ole.c     VALUE self;
VALUE            4933 ext/win32ole/win32ole.c static VALUE
VALUE            4940 ext/win32ole/win32ole.c     VALUE val = Qnil;
VALUE            4971 ext/win32ole/win32ole.c static VALUE
VALUE            4973 ext/win32ole/win32ole.c     VALUE self;
VALUE            4980 ext/win32ole/win32ole.c static VALUE
VALUE            4987 ext/win32ole/win32ole.c     VALUE visible = Qfalse;
VALUE            5020 ext/win32ole/win32ole.c static VALUE
VALUE            5022 ext/win32ole/win32ole.c     VALUE self;
VALUE            5029 ext/win32ole/win32ole.c static VALUE
VALUE            5036 ext/win32ole/win32ole.c     VALUE kind = rb_str_new2("UNKNOWN");
VALUE            5079 ext/win32ole/win32ole.c static VALUE
VALUE            5081 ext/win32ole/win32ole.c     VALUE self;
VALUE            5088 ext/win32ole/win32ole.c static VALUE
VALUE            5095 ext/win32ole/win32ole.c     VALUE kind = Qnil;
VALUE            5122 ext/win32ole/win32ole.c static VALUE
VALUE            5124 ext/win32ole/win32ole.c     VALUE self;
VALUE            5137 ext/win32ole/win32ole.c static VALUE
VALUE            5139 ext/win32ole/win32ole.c     VALUE self;
VALUE            5143 ext/win32ole/win32ole.c     VALUE name;
VALUE            5156 ext/win32ole/win32ole.c static VALUE
VALUE            5158 ext/win32ole/win32ole.c     VALUE klass;
VALUE            5161 ext/win32ole/win32ole.c     VALUE obj;
VALUE            5184 ext/win32ole/win32ole.c static VALUE
VALUE            5186 ext/win32ole/win32ole.c     VALUE self;
VALUE            5187 ext/win32ole/win32ole.c     VALUE oletype;
VALUE            5188 ext/win32ole/win32ole.c     VALUE method;
VALUE            5191 ext/win32ole/win32ole.c     VALUE obj = Qnil;
VALUE            5218 ext/win32ole/win32ole.c static VALUE
VALUE            5220 ext/win32ole/win32ole.c     VALUE self;
VALUE            5225 ext/win32ole/win32ole.c static VALUE
VALUE            5232 ext/win32ole/win32ole.c     VALUE type;
VALUE            5253 ext/win32ole/win32ole.c static VALUE
VALUE            5255 ext/win32ole/win32ole.c     VALUE self;
VALUE            5262 ext/win32ole/win32ole.c static VALUE
VALUE            5269 ext/win32ole/win32ole.c     VALUE vt;
VALUE            5290 ext/win32ole/win32ole.c static VALUE
VALUE            5292 ext/win32ole/win32ole.c     VALUE self;
VALUE            5299 ext/win32ole/win32ole.c static VALUE
VALUE            5306 ext/win32ole/win32ole.c     VALUE type = rb_ary_new();
VALUE            5327 ext/win32ole/win32ole.c static VALUE
VALUE            5329 ext/win32ole/win32ole.c     VALUE self;
VALUE            5336 ext/win32ole/win32ole.c static VALUE
VALUE            5343 ext/win32ole/win32ole.c     VALUE invkind;
VALUE            5352 ext/win32ole/win32ole.c static VALUE
VALUE            5357 ext/win32ole/win32ole.c     VALUE type = rb_str_new2("UNKNOWN");
VALUE            5358 ext/win32ole/win32ole.c     VALUE invkind = ole_method_invkind(pTypeInfo, method_index);
VALUE            5384 ext/win32ole/win32ole.c static VALUE
VALUE            5386 ext/win32ole/win32ole.c     VALUE self;
VALUE            5404 ext/win32ole/win32ole.c static VALUE
VALUE            5406 ext/win32ole/win32ole.c     VALUE self;
VALUE            5413 ext/win32ole/win32ole.c static VALUE
VALUE            5420 ext/win32ole/win32ole.c     VALUE visible;
VALUE            5444 ext/win32ole/win32ole.c static VALUE
VALUE            5446 ext/win32ole/win32ole.c     VALUE self;
VALUE            5453 ext/win32ole/win32ole.c static VALUE
VALUE            5457 ext/win32ole/win32ole.c     VALUE method_name;
VALUE            5467 ext/win32ole/win32ole.c     VALUE name;
VALUE            5468 ext/win32ole/win32ole.c     VALUE event = Qfalse;
VALUE            5530 ext/win32ole/win32ole.c static VALUE
VALUE            5532 ext/win32ole/win32ole.c     VALUE self;
VALUE            5552 ext/win32ole/win32ole.c static VALUE
VALUE            5554 ext/win32ole/win32ole.c     VALUE self;
VALUE            5568 ext/win32ole/win32ole.c static VALUE
VALUE            5590 ext/win32ole/win32ole.c static VALUE
VALUE            5615 ext/win32ole/win32ole.c static VALUE
VALUE            5617 ext/win32ole/win32ole.c     VALUE self;
VALUE            5624 ext/win32ole/win32ole.c static VALUE
VALUE            5648 ext/win32ole/win32ole.c static VALUE
VALUE            5650 ext/win32ole/win32ole.c     VALUE self;
VALUE            5658 ext/win32ole/win32ole.c static VALUE
VALUE            5681 ext/win32ole/win32ole.c static VALUE
VALUE            5683 ext/win32ole/win32ole.c     VALUE self;
VALUE            5690 ext/win32ole/win32ole.c static VALUE
VALUE            5697 ext/win32ole/win32ole.c     VALUE dispid = Qnil;
VALUE            5715 ext/win32ole/win32ole.c static VALUE
VALUE            5717 ext/win32ole/win32ole.c     VALUE self;
VALUE            5724 ext/win32ole/win32ole.c static VALUE
VALUE            5731 ext/win32ole/win32ole.c     VALUE offset_vtbl = Qnil;
VALUE            5749 ext/win32ole/win32ole.c static VALUE
VALUE            5751 ext/win32ole/win32ole.c     VALUE self;
VALUE            5758 ext/win32ole/win32ole.c static VALUE
VALUE            5765 ext/win32ole/win32ole.c     VALUE size_params = Qnil;
VALUE            5784 ext/win32ole/win32ole.c static VALUE
VALUE            5786 ext/win32ole/win32ole.c     VALUE self;
VALUE            5793 ext/win32ole/win32ole.c static VALUE
VALUE            5800 ext/win32ole/win32ole.c     VALUE size_opt_params = Qnil;
VALUE            5818 ext/win32ole/win32ole.c static VALUE
VALUE            5820 ext/win32ole/win32ole.c     VALUE self;
VALUE            5827 ext/win32ole/win32ole.c static VALUE
VALUE            5837 ext/win32ole/win32ole.c     VALUE param;
VALUE            5838 ext/win32ole/win32ole.c     VALUE params = rb_ary_new();
VALUE            5882 ext/win32ole/win32ole.c static VALUE
VALUE            5884 ext/win32ole/win32ole.c     VALUE self;
VALUE            5908 ext/win32ole/win32ole.c static VALUE
VALUE            5910 ext/win32ole/win32ole.c     VALUE self;
VALUE            5915 ext/win32ole/win32ole.c static VALUE
VALUE            5923 ext/win32ole/win32ole.c     VALUE type = rb_str_new2("UNKNOWN");
VALUE            5943 ext/win32ole/win32ole.c static VALUE
VALUE            5945 ext/win32ole/win32ole.c     VALUE self;
VALUE            5953 ext/win32ole/win32ole.c static VALUE
VALUE            5961 ext/win32ole/win32ole.c     VALUE typedetail = rb_ary_new();
VALUE            5981 ext/win32ole/win32ole.c static VALUE
VALUE            5983 ext/win32ole/win32ole.c     VALUE self;
VALUE            5991 ext/win32ole/win32ole.c static VALUE
VALUE            6000 ext/win32ole/win32ole.c     VALUE ret = Qfalse;
VALUE            6020 ext/win32ole/win32ole.c static VALUE foleparam_input(self)
VALUE            6021 ext/win32ole/win32ole.c     VALUE self;
VALUE            6048 ext/win32ole/win32ole.c static VALUE foleparam_output(self)
VALUE            6049 ext/win32ole/win32ole.c     VALUE self;
VALUE            6067 ext/win32ole/win32ole.c static VALUE foleparam_optional(self)
VALUE            6068 ext/win32ole/win32ole.c     VALUE self;
VALUE            6087 ext/win32ole/win32ole.c static VALUE foleparam_retval(self)
VALUE            6088 ext/win32ole/win32ole.c     VALUE self;
VALUE            6096 ext/win32ole/win32ole.c static VALUE
VALUE            6108 ext/win32ole/win32ole.c     VALUE defval = Qnil;
VALUE            6151 ext/win32ole/win32ole.c static VALUE foleparam_default(self)
VALUE            6152 ext/win32ole/win32ole.c     VALUE self;
VALUE            6241 ext/win32ole/win32ole.c     VALUE ary;
VALUE            6242 ext/win32ole/win32ole.c     VALUE ev;
VALUE            6244 ext/win32ole/win32ole.c     VALUE event;
VALUE            6245 ext/win32ole/win32ole.c     VALUE def_event;
VALUE            6246 ext/win32ole/win32ole.c     VALUE event_name;
VALUE            6268 ext/win32ole/win32ole.c static VALUE
VALUE            6270 ext/win32ole/win32ole.c     VALUE ary;
VALUE            6271 ext/win32ole/win32ole.c     VALUE ev;
VALUE            6274 ext/win32ole/win32ole.c     VALUE event;
VALUE            6275 ext/win32ole/win32ole.c     VALUE def_event;
VALUE            6276 ext/win32ole/win32ole.c     VALUE event_name;
VALUE            6299 ext/win32ole/win32ole.c     VALUE ary;
VALUE            6303 ext/win32ole/win32ole.c     VALUE v;
VALUE            6330 ext/win32ole/win32ole.c     VALUE ary, obj, event, handler, args, argv, ev, result;
VALUE            6421 ext/win32ole/win32ole.c     VALUE ole;
VALUE            6536 ext/win32ole/win32ole.c     VALUE ole;
VALUE            6650 ext/win32ole/win32ole.c static VALUE fev_s_allocate _((VALUE));
VALUE            6651 ext/win32ole/win32ole.c static VALUE
VALUE            6653 ext/win32ole/win32ole.c     VALUE klass;
VALUE            6655 ext/win32ole/win32ole.c     VALUE obj;
VALUE            6672 ext/win32ole/win32ole.c static VALUE
VALUE            6675 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            6676 ext/win32ole/win32ole.c     VALUE self;
VALUE            6678 ext/win32ole/win32ole.c     VALUE ole, itf;
VALUE            6761 ext/win32ole/win32ole.c static VALUE
VALUE            6763 ext/win32ole/win32ole.c     VALUE klass;
VALUE            6772 ext/win32ole/win32ole.c     VALUE obj;
VALUE            6773 ext/win32ole/win32ole.c     VALUE event;
VALUE            6774 ext/win32ole/win32ole.c     VALUE data;
VALUE            6777 ext/win32ole/win32ole.c     VALUE events = rb_ivar_get(obj, id_events);
VALUE            6789 ext/win32ole/win32ole.c static VALUE
VALUE            6792 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            6793 ext/win32ole/win32ole.c     VALUE self;
VALUE            6794 ext/win32ole/win32ole.c     VALUE is_ary_arg;
VALUE            6796 ext/win32ole/win32ole.c     VALUE event, args, data;
VALUE            6816 ext/win32ole/win32ole.c static VALUE
VALUE            6819 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            6820 ext/win32ole/win32ole.c     VALUE self;
VALUE            6833 ext/win32ole/win32ole.c static VALUE
VALUE            6836 ext/win32ole/win32ole.c     VALUE *argv;
VALUE            6837 ext/win32ole/win32ole.c     VALUE self;
VALUE            6850 ext/win32ole/win32ole.c static VALUE folevariant_s_allocate _((VALUE));
VALUE            6851 ext/win32ole/win32ole.c static VALUE
VALUE            6853 ext/win32ole/win32ole.c     VALUE klass;
VALUE            6856 ext/win32ole/win32ole.c     VALUE obj;
VALUE            6864 ext/win32ole/win32ole.c static VALUE
VALUE            6866 ext/win32ole/win32ole.c     VALUE self;
VALUE            6867 ext/win32ole/win32ole.c     VALUE args;
VALUE            6871 ext/win32ole/win32ole.c     VALUE val;
VALUE            6872 ext/win32ole/win32ole.c     VALUE vvt;
VALUE            6893 ext/win32ole/win32ole.c static VALUE
VALUE            6895 ext/win32ole/win32ole.c     VALUE self;
VALUE            6898 ext/win32ole/win32ole.c     VALUE val = Qnil;
VALUE              35 ext/zlib/zlib.c static VALUE rb_zlib_version _((VALUE));
VALUE              36 ext/zlib/zlib.c static VALUE do_checksum _((int, VALUE*, uLong (*) _((uLong, const Bytef*, uInt))));
VALUE              37 ext/zlib/zlib.c static VALUE rb_zlib_adler32 _((int, VALUE*, VALUE));
VALUE              38 ext/zlib/zlib.c static VALUE rb_zlib_crc32 _((int, VALUE*, VALUE));
VALUE              39 ext/zlib/zlib.c static VALUE rb_zlib_crc_table _((VALUE));
VALUE              49 ext/zlib/zlib.c static VALUE zstream_detach_buffer _((struct zstream*));
VALUE              50 ext/zlib/zlib.c static VALUE zstream_shift_buffer _((struct zstream*, int));
VALUE              56 ext/zlib/zlib.c static VALUE zstream_detach_input _((struct zstream*));
VALUE              58 ext/zlib/zlib.c static VALUE zstream_end _((struct zstream*));
VALUE              60 ext/zlib/zlib.c static VALUE zstream_sync _((struct zstream*, Bytef*, uInt));
VALUE              63 ext/zlib/zlib.c static VALUE zstream_new _((VALUE, const struct zstream_funcs*));
VALUE              64 ext/zlib/zlib.c static struct zstream *get_zstream _((VALUE));
VALUE              66 ext/zlib/zlib.c static VALUE rb_zstream_end _((VALUE));
VALUE              67 ext/zlib/zlib.c static VALUE rb_zstream_reset _((VALUE));
VALUE              68 ext/zlib/zlib.c static VALUE rb_zstream_finish _((VALUE));
VALUE              69 ext/zlib/zlib.c static VALUE rb_zstream_flush_next_in _((VALUE));
VALUE              70 ext/zlib/zlib.c static VALUE rb_zstream_flush_next_out _((VALUE));
VALUE              71 ext/zlib/zlib.c static VALUE rb_zstream_avail_out _((VALUE));
VALUE              72 ext/zlib/zlib.c static VALUE rb_zstream_set_avail_out _((VALUE, VALUE));
VALUE              73 ext/zlib/zlib.c static VALUE rb_zstream_avail_in _((VALUE));
VALUE              74 ext/zlib/zlib.c static VALUE rb_zstream_total_in _((VALUE));
VALUE              75 ext/zlib/zlib.c static VALUE rb_zstream_total_out _((VALUE));
VALUE              76 ext/zlib/zlib.c static VALUE rb_zstream_data_type _((VALUE));
VALUE              77 ext/zlib/zlib.c static VALUE rb_zstream_adler _((VALUE));
VALUE              78 ext/zlib/zlib.c static VALUE rb_zstream_finished_p _((VALUE));
VALUE              79 ext/zlib/zlib.c static VALUE rb_zstream_closed_p _((VALUE));
VALUE              81 ext/zlib/zlib.c static VALUE rb_deflate_s_allocate _((VALUE));
VALUE              82 ext/zlib/zlib.c static VALUE rb_deflate_initialize _((int, VALUE*, VALUE));
VALUE              83 ext/zlib/zlib.c static VALUE rb_deflate_init_copy _((VALUE, VALUE));
VALUE              84 ext/zlib/zlib.c static VALUE deflate_run _((VALUE));
VALUE              85 ext/zlib/zlib.c static VALUE rb_deflate_s_deflate _((int, VALUE*, VALUE));
VALUE              86 ext/zlib/zlib.c static void do_deflate _((struct zstream*, VALUE, int));
VALUE              87 ext/zlib/zlib.c static VALUE rb_deflate_deflate _((int, VALUE*, VALUE));
VALUE              88 ext/zlib/zlib.c static VALUE rb_deflate_addstr _((VALUE, VALUE));
VALUE              89 ext/zlib/zlib.c static VALUE rb_deflate_flush _((int, VALUE*, VALUE));
VALUE              90 ext/zlib/zlib.c static VALUE rb_deflate_params _((VALUE, VALUE, VALUE));
VALUE              91 ext/zlib/zlib.c static VALUE rb_deflate_set_dictionary _((VALUE, VALUE));
VALUE              93 ext/zlib/zlib.c static VALUE inflate_run _((VALUE));
VALUE              94 ext/zlib/zlib.c static VALUE rb_inflate_s_allocate _((VALUE));
VALUE              95 ext/zlib/zlib.c static VALUE rb_inflate_initialize _((int, VALUE*, VALUE));
VALUE              96 ext/zlib/zlib.c static VALUE rb_inflate_s_inflate _((VALUE, VALUE));
VALUE              97 ext/zlib/zlib.c static void do_inflate _((struct zstream*, VALUE));
VALUE              98 ext/zlib/zlib.c static VALUE rb_inflate_inflate _((VALUE, VALUE));
VALUE              99 ext/zlib/zlib.c static VALUE rb_inflate_addstr _((VALUE, VALUE));
VALUE             100 ext/zlib/zlib.c static VALUE rb_inflate_sync _((VALUE, VALUE));
VALUE             101 ext/zlib/zlib.c static VALUE rb_inflate_sync_point_p _((VALUE));
VALUE             102 ext/zlib/zlib.c static VALUE rb_inflate_set_dictionary _((VALUE, VALUE));
VALUE             108 ext/zlib/zlib.c static VALUE gzfile_new _((VALUE, const struct zstream_funcs*, void (*) _((struct gzfile*))));
VALUE             112 ext/zlib/zlib.c static VALUE gzfile_read_raw_partial _((VALUE));
VALUE             113 ext/zlib/zlib.c static VALUE gzfile_read_raw_rescue _((VALUE));
VALUE             114 ext/zlib/zlib.c static VALUE gzfile_read_raw _((struct gzfile*));
VALUE             126 ext/zlib/zlib.c static void gzfile_calc_crc _((struct gzfile*, VALUE));
VALUE             127 ext/zlib/zlib.c static VALUE gzfile_read _((struct gzfile*, int));
VALUE             128 ext/zlib/zlib.c static VALUE gzfile_read_all _((struct gzfile*));
VALUE             130 ext/zlib/zlib.c static VALUE gzfile_finalize _((VALUE));
VALUE             134 ext/zlib/zlib.c static VALUE gzfile_reader_get_unused _((struct gzfile*));
VALUE             135 ext/zlib/zlib.c static struct gzfile *get_gzfile _((VALUE));
VALUE             136 ext/zlib/zlib.c static VALUE gzfile_ensure_close _((VALUE));
VALUE             137 ext/zlib/zlib.c static VALUE rb_gzfile_s_wrap _((int, VALUE*, VALUE));
VALUE             138 ext/zlib/zlib.c static VALUE gzfile_s_open _((int, VALUE*, VALUE, const char*));
VALUE             140 ext/zlib/zlib.c static VALUE rb_gzfile_to_io _((VALUE));
VALUE             141 ext/zlib/zlib.c static VALUE rb_gzfile_crc _((VALUE));
VALUE             142 ext/zlib/zlib.c static VALUE rb_gzfile_mtime _((VALUE));
VALUE             143 ext/zlib/zlib.c static VALUE rb_gzfile_level _((VALUE));
VALUE             144 ext/zlib/zlib.c static VALUE rb_gzfile_os_code _((VALUE));
VALUE             145 ext/zlib/zlib.c static VALUE rb_gzfile_orig_name _((VALUE));
VALUE             146 ext/zlib/zlib.c static VALUE rb_gzfile_comment _((VALUE));
VALUE             147 ext/zlib/zlib.c static VALUE rb_gzfile_lineno _((VALUE));
VALUE             148 ext/zlib/zlib.c static VALUE rb_gzfile_set_lineno _((VALUE, VALUE));
VALUE             149 ext/zlib/zlib.c static VALUE rb_gzfile_set_mtime _((VALUE, VALUE));
VALUE             150 ext/zlib/zlib.c static VALUE rb_gzfile_set_orig_name _((VALUE, VALUE));
VALUE             151 ext/zlib/zlib.c static VALUE rb_gzfile_set_comment _((VALUE, VALUE));
VALUE             152 ext/zlib/zlib.c static VALUE rb_gzfile_close _((VALUE));
VALUE             153 ext/zlib/zlib.c static VALUE rb_gzfile_finish _((VALUE));
VALUE             154 ext/zlib/zlib.c static VALUE rb_gzfile_closed_p _((VALUE));
VALUE             155 ext/zlib/zlib.c static VALUE rb_gzfile_eof_p _((VALUE));
VALUE             156 ext/zlib/zlib.c static VALUE rb_gzfile_sync _((VALUE));
VALUE             157 ext/zlib/zlib.c static VALUE rb_gzfile_set_sync _((VALUE, VALUE));
VALUE             158 ext/zlib/zlib.c static VALUE rb_gzfile_total_in _((VALUE));
VALUE             159 ext/zlib/zlib.c static VALUE rb_gzfile_total_out _((VALUE));
VALUE             161 ext/zlib/zlib.c static VALUE rb_gzwriter_s_allocate _((VALUE));
VALUE             162 ext/zlib/zlib.c static VALUE rb_gzwriter_s_open _((int, VALUE*, VALUE));
VALUE             163 ext/zlib/zlib.c static VALUE rb_gzwriter_initialize _((int, VALUE*, VALUE));
VALUE             164 ext/zlib/zlib.c static VALUE rb_gzwriter_flush _((int, VALUE*, VALUE));
VALUE             165 ext/zlib/zlib.c static VALUE rb_gzwriter_write _((VALUE, VALUE));
VALUE             166 ext/zlib/zlib.c static VALUE rb_gzwriter_putc _((VALUE, VALUE));
VALUE             168 ext/zlib/zlib.c static VALUE rb_gzreader_s_allocate _((VALUE));
VALUE             169 ext/zlib/zlib.c static VALUE rb_gzreader_s_open _((int, VALUE*, VALUE));
VALUE             170 ext/zlib/zlib.c static VALUE rb_gzreader_initialize _((VALUE, VALUE));
VALUE             171 ext/zlib/zlib.c static VALUE rb_gzreader_rewind _((VALUE));
VALUE             172 ext/zlib/zlib.c static VALUE rb_gzreader_unused _((VALUE));
VALUE             173 ext/zlib/zlib.c static VALUE rb_gzreader_read _((int, VALUE*, VALUE));
VALUE             174 ext/zlib/zlib.c static VALUE rb_gzreader_getc _((VALUE));
VALUE             175 ext/zlib/zlib.c static VALUE rb_gzreader_readchar _((VALUE));
VALUE             176 ext/zlib/zlib.c static VALUE rb_gzreader_each_byte _((VALUE));
VALUE             177 ext/zlib/zlib.c static VALUE rb_gzreader_ungetc _((VALUE, VALUE));
VALUE             179 ext/zlib/zlib.c static VALUE gzreader_gets _((int, VALUE*, VALUE));
VALUE             180 ext/zlib/zlib.c static VALUE rb_gzreader_gets _((int, VALUE*, VALUE));
VALUE             181 ext/zlib/zlib.c static VALUE rb_gzreader_readline _((int, VALUE*, VALUE));
VALUE             182 ext/zlib/zlib.c static VALUE rb_gzreader_each _((int, VALUE*, VALUE));
VALUE             183 ext/zlib/zlib.c static VALUE rb_gzreader_readlines _((int, VALUE*, VALUE));
VALUE             193 ext/zlib/zlib.c static VALUE cZError, cStreamEnd, cNeedDict;
VALUE             194 ext/zlib/zlib.c static VALUE cStreamError, cDataError, cMemError, cBufError, cVersionError;
VALUE             201 ext/zlib/zlib.c     VALUE exc;
VALUE             250 ext/zlib/zlib.c static VALUE
VALUE             252 ext/zlib/zlib.c     VALUE klass;
VALUE             254 ext/zlib/zlib.c     VALUE str;
VALUE             261 ext/zlib/zlib.c static VALUE
VALUE             264 ext/zlib/zlib.c     VALUE *argv;
VALUE             267 ext/zlib/zlib.c     VALUE str, vsum;
VALUE             301 ext/zlib/zlib.c static VALUE
VALUE             304 ext/zlib/zlib.c     VALUE *argv;
VALUE             305 ext/zlib/zlib.c     VALUE klass;
VALUE             319 ext/zlib/zlib.c static VALUE
VALUE             322 ext/zlib/zlib.c     VALUE *argv;
VALUE             323 ext/zlib/zlib.c     VALUE klass;
VALUE             331 ext/zlib/zlib.c static VALUE
VALUE             333 ext/zlib/zlib.c     VALUE obj;
VALUE             336 ext/zlib/zlib.c     VALUE dst;
VALUE             354 ext/zlib/zlib.c     VALUE buf;
VALUE             356 ext/zlib/zlib.c     VALUE input;
VALUE             521 ext/zlib/zlib.c static VALUE
VALUE             525 ext/zlib/zlib.c     VALUE dst;
VALUE             543 ext/zlib/zlib.c static VALUE
VALUE             548 ext/zlib/zlib.c     VALUE dst;
VALUE             639 ext/zlib/zlib.c static VALUE
VALUE             643 ext/zlib/zlib.c     VALUE dst;
VALUE             675 ext/zlib/zlib.c static VALUE
VALUE             712 ext/zlib/zlib.c     volatile VALUE guard;
VALUE             769 ext/zlib/zlib.c static VALUE
VALUE             775 ext/zlib/zlib.c     VALUE rest;
VALUE             828 ext/zlib/zlib.c static VALUE
VALUE             830 ext/zlib/zlib.c     VALUE klass;
VALUE             833 ext/zlib/zlib.c     VALUE obj;
VALUE             847 ext/zlib/zlib.c     VALUE obj;
VALUE             926 ext/zlib/zlib.c static VALUE
VALUE             928 ext/zlib/zlib.c     VALUE obj;
VALUE             938 ext/zlib/zlib.c static VALUE
VALUE             940 ext/zlib/zlib.c     VALUE obj;
VALUE             950 ext/zlib/zlib.c static VALUE
VALUE             952 ext/zlib/zlib.c     VALUE obj;
VALUE             955 ext/zlib/zlib.c     VALUE dst;
VALUE             967 ext/zlib/zlib.c static VALUE
VALUE             969 ext/zlib/zlib.c     VALUE obj;
VALUE             972 ext/zlib/zlib.c     VALUE dst;
VALUE             983 ext/zlib/zlib.c static VALUE
VALUE             985 ext/zlib/zlib.c     VALUE obj;
VALUE             988 ext/zlib/zlib.c     VALUE dst;
VALUE            1000 ext/zlib/zlib.c static VALUE
VALUE            1002 ext/zlib/zlib.c     VALUE obj;
VALUE            1015 ext/zlib/zlib.c static VALUE
VALUE            1017 ext/zlib/zlib.c     VALUE obj, size;
VALUE            1029 ext/zlib/zlib.c static VALUE
VALUE            1031 ext/zlib/zlib.c     VALUE obj;
VALUE            1041 ext/zlib/zlib.c static VALUE
VALUE            1043 ext/zlib/zlib.c     VALUE obj;
VALUE            1051 ext/zlib/zlib.c static VALUE
VALUE            1053 ext/zlib/zlib.c     VALUE obj;
VALUE            1063 ext/zlib/zlib.c static VALUE
VALUE            1065 ext/zlib/zlib.c     VALUE obj;
VALUE            1073 ext/zlib/zlib.c static VALUE
VALUE            1075 ext/zlib/zlib.c     VALUE obj;
VALUE            1083 ext/zlib/zlib.c static VALUE
VALUE            1085 ext/zlib/zlib.c     VALUE obj;
VALUE            1093 ext/zlib/zlib.c static VALUE
VALUE            1095 ext/zlib/zlib.c     VALUE obj;
VALUE            1123 ext/zlib/zlib.c static VALUE
VALUE            1125 ext/zlib/zlib.c     VALUE klass;
VALUE            1139 ext/zlib/zlib.c static VALUE
VALUE            1142 ext/zlib/zlib.c     VALUE *argv;
VALUE            1143 ext/zlib/zlib.c     VALUE obj;
VALUE            1146 ext/zlib/zlib.c     VALUE level, wbits, memlevel, strategy;
VALUE            1166 ext/zlib/zlib.c static VALUE
VALUE            1168 ext/zlib/zlib.c     VALUE self, orig;
VALUE            1183 ext/zlib/zlib.c static VALUE
VALUE            1185 ext/zlib/zlib.c     VALUE args;
VALUE            1187 ext/zlib/zlib.c     struct zstream *z = (struct zstream *)((VALUE *)args)[0];
VALUE            1188 ext/zlib/zlib.c     VALUE src = ((VALUE *)args)[1];
VALUE            1214 ext/zlib/zlib.c static VALUE
VALUE            1217 ext/zlib/zlib.c     VALUE *argv;
VALUE            1218 ext/zlib/zlib.c     VALUE klass;
VALUE            1221 ext/zlib/zlib.c     VALUE src, level, dst, args[2];
VALUE            1235 ext/zlib/zlib.c     args[0] = (VALUE)&z;
VALUE            1237 ext/zlib/zlib.c     dst = rb_ensure(deflate_run, (VALUE)args, zstream_end, (VALUE)&z);
VALUE            1246 ext/zlib/zlib.c     VALUE src;
VALUE            1273 ext/zlib/zlib.c static VALUE
VALUE            1276 ext/zlib/zlib.c     VALUE *argv;
VALUE            1277 ext/zlib/zlib.c     VALUE obj;
VALUE            1280 ext/zlib/zlib.c     VALUE src, flush, dst;
VALUE            1298 ext/zlib/zlib.c static VALUE
VALUE            1300 ext/zlib/zlib.c     VALUE obj, src;
VALUE            1316 ext/zlib/zlib.c static VALUE
VALUE            1319 ext/zlib/zlib.c     VALUE *argv;
VALUE            1320 ext/zlib/zlib.c     VALUE obj;
VALUE            1323 ext/zlib/zlib.c     VALUE v_flush, dst;
VALUE            1346 ext/zlib/zlib.c static VALUE
VALUE            1348 ext/zlib/zlib.c     VALUE obj, v_level, v_strategy;
VALUE            1381 ext/zlib/zlib.c static VALUE
VALUE            1383 ext/zlib/zlib.c     VALUE obj, dic;
VALUE            1386 ext/zlib/zlib.c     VALUE src = dic;
VALUE            1413 ext/zlib/zlib.c static VALUE
VALUE            1415 ext/zlib/zlib.c     VALUE klass;
VALUE            1428 ext/zlib/zlib.c static VALUE
VALUE            1431 ext/zlib/zlib.c     VALUE *argv;
VALUE            1432 ext/zlib/zlib.c     VALUE obj;
VALUE            1435 ext/zlib/zlib.c     VALUE wbits;
VALUE            1450 ext/zlib/zlib.c static VALUE
VALUE            1452 ext/zlib/zlib.c     VALUE args;
VALUE            1454 ext/zlib/zlib.c     struct zstream *z = (struct zstream *)((VALUE *)args)[0];
VALUE            1455 ext/zlib/zlib.c     VALUE src = ((VALUE *)args)[1];
VALUE            1479 ext/zlib/zlib.c static VALUE
VALUE            1481 ext/zlib/zlib.c     VALUE obj, src;
VALUE            1484 ext/zlib/zlib.c     VALUE dst, args[2];
VALUE            1495 ext/zlib/zlib.c     args[0] = (VALUE)&z;
VALUE            1497 ext/zlib/zlib.c     dst = rb_ensure(inflate_run, (VALUE)args, zstream_end, (VALUE)&z);
VALUE            1506 ext/zlib/zlib.c     VALUE src;
VALUE            1532 ext/zlib/zlib.c static VALUE
VALUE            1534 ext/zlib/zlib.c     VALUE obj, src;
VALUE            1537 ext/zlib/zlib.c     VALUE dst;
VALUE            1570 ext/zlib/zlib.c static VALUE
VALUE            1572 ext/zlib/zlib.c     VALUE obj, src;
VALUE            1602 ext/zlib/zlib.c static VALUE
VALUE            1604 ext/zlib/zlib.c     VALUE obj, src;
VALUE            1620 ext/zlib/zlib.c static VALUE
VALUE            1622 ext/zlib/zlib.c     VALUE obj;
VALUE            1643 ext/zlib/zlib.c static VALUE
VALUE            1645 ext/zlib/zlib.c     VALUE obj, dic;
VALUE            1648 ext/zlib/zlib.c     VALUE src = dic;
VALUE            1709 ext/zlib/zlib.c static VALUE cGzError, cNoFooter, cCRCError, cLengthError;
VALUE            1717 ext/zlib/zlib.c     VALUE io;
VALUE            1721 ext/zlib/zlib.c     VALUE orig_name;    /* for header; must be a String */
VALUE            1722 ext/zlib/zlib.c     VALUE comment;      /* for header; must be a String */
VALUE            1760 ext/zlib/zlib.c static VALUE
VALUE            1762 ext/zlib/zlib.c     VALUE klass;
VALUE            1766 ext/zlib/zlib.c     VALUE obj;
VALUE            1803 ext/zlib/zlib.c     VALUE io = gz->io;
VALUE            1818 ext/zlib/zlib.c     VALUE str;
VALUE            1830 ext/zlib/zlib.c static VALUE
VALUE            1832 ext/zlib/zlib.c     VALUE arg;
VALUE            1835 ext/zlib/zlib.c     VALUE str;
VALUE            1842 ext/zlib/zlib.c static VALUE
VALUE            1844 ext/zlib/zlib.c     VALUE arg;
VALUE            1847 ext/zlib/zlib.c     VALUE str = Qnil;
VALUE            1857 ext/zlib/zlib.c static VALUE
VALUE            1861 ext/zlib/zlib.c     return rb_rescue2(gzfile_read_raw_partial, (VALUE)gz,
VALUE            1862 ext/zlib/zlib.c                       gzfile_read_raw_rescue, (VALUE)gz,
VALUE            1863 ext/zlib/zlib.c                       rb_eEOFError, rb_eNoMethodError, (VALUE)0);
VALUE            1871 ext/zlib/zlib.c     VALUE str;
VALUE            1886 ext/zlib/zlib.c     VALUE str;
VALUE            2117 ext/zlib/zlib.c     volatile VALUE str;
VALUE            2139 ext/zlib/zlib.c     VALUE str;
VALUE            2151 ext/zlib/zlib.c static VALUE
VALUE            2156 ext/zlib/zlib.c     VALUE dst;
VALUE            2179 ext/zlib/zlib.c static VALUE
VALUE            2183 ext/zlib/zlib.c     VALUE outbuf;
VALUE            2185 ext/zlib/zlib.c     VALUE dst;
VALUE            2227 ext/zlib/zlib.c static VALUE
VALUE            2231 ext/zlib/zlib.c     VALUE dst;
VALUE            2259 ext/zlib/zlib.c static VALUE
VALUE            2261 ext/zlib/zlib.c     VALUE obj;
VALUE            2291 ext/zlib/zlib.c 	    rb_protect(gzfile_finalize, (VALUE)gz, &aborted);
VALUE            2334 ext/zlib/zlib.c static VALUE
VALUE            2338 ext/zlib/zlib.c     VALUE str;
VALUE            2354 ext/zlib/zlib.c     VALUE obj;
VALUE            2379 ext/zlib/zlib.c static VALUE
VALUE            2381 ext/zlib/zlib.c     VALUE obj;
VALUE            2395 ext/zlib/zlib.c static VALUE
VALUE            2398 ext/zlib/zlib.c     VALUE *argv;
VALUE            2399 ext/zlib/zlib.c     VALUE klass;
VALUE            2401 ext/zlib/zlib.c     VALUE obj = rb_class_new_instance(argc, argv, klass);
VALUE            2414 ext/zlib/zlib.c static VALUE
VALUE            2417 ext/zlib/zlib.c     VALUE *argv;
VALUE            2418 ext/zlib/zlib.c     VALUE klass;
VALUE            2421 ext/zlib/zlib.c     VALUE io, filename;
VALUE            2437 ext/zlib/zlib.c static VALUE
VALUE            2439 ext/zlib/zlib.c     VALUE obj;
VALUE            2447 ext/zlib/zlib.c static VALUE
VALUE            2449 ext/zlib/zlib.c     VALUE obj;
VALUE            2457 ext/zlib/zlib.c static VALUE
VALUE            2459 ext/zlib/zlib.c     VALUE obj;
VALUE            2467 ext/zlib/zlib.c static VALUE
VALUE            2469 ext/zlib/zlib.c     VALUE obj;
VALUE            2477 ext/zlib/zlib.c static VALUE
VALUE            2479 ext/zlib/zlib.c     VALUE obj;
VALUE            2488 ext/zlib/zlib.c static VALUE
VALUE            2490 ext/zlib/zlib.c     VALUE obj;
VALUE            2492 ext/zlib/zlib.c     VALUE str = get_gzfile(obj)->orig_name;
VALUE            2504 ext/zlib/zlib.c static VALUE
VALUE            2506 ext/zlib/zlib.c     VALUE obj;
VALUE            2508 ext/zlib/zlib.c     VALUE str = get_gzfile(obj)->comment;
VALUE            2519 ext/zlib/zlib.c static VALUE
VALUE            2521 ext/zlib/zlib.c     VALUE obj;
VALUE            2529 ext/zlib/zlib.c static VALUE
VALUE            2531 ext/zlib/zlib.c     VALUE obj, lineno;
VALUE            2541 ext/zlib/zlib.c static VALUE
VALUE            2543 ext/zlib/zlib.c     VALUE obj, mtime;
VALUE            2546 ext/zlib/zlib.c     VALUE val;
VALUE            2565 ext/zlib/zlib.c static VALUE
VALUE            2567 ext/zlib/zlib.c     VALUE obj, str;
VALUE            2570 ext/zlib/zlib.c     VALUE s;
VALUE            2588 ext/zlib/zlib.c static VALUE
VALUE            2590 ext/zlib/zlib.c     VALUE obj, str;
VALUE            2593 ext/zlib/zlib.c     VALUE s;
VALUE            2612 ext/zlib/zlib.c static VALUE
VALUE            2614 ext/zlib/zlib.c     VALUE obj;
VALUE            2617 ext/zlib/zlib.c     VALUE io;
VALUE            2629 ext/zlib/zlib.c static VALUE
VALUE            2631 ext/zlib/zlib.c     VALUE obj;
VALUE            2634 ext/zlib/zlib.c     VALUE io;
VALUE            2644 ext/zlib/zlib.c static VALUE
VALUE            2646 ext/zlib/zlib.c     VALUE obj;
VALUE            2656 ext/zlib/zlib.c static VALUE
VALUE            2658 ext/zlib/zlib.c     VALUE obj;
VALUE            2667 ext/zlib/zlib.c static VALUE
VALUE            2669 ext/zlib/zlib.c     VALUE obj;
VALUE            2681 ext/zlib/zlib.c static VALUE
VALUE            2683 ext/zlib/zlib.c     VALUE obj, mode;
VALUE            2699 ext/zlib/zlib.c static VALUE
VALUE            2701 ext/zlib/zlib.c     VALUE obj;
VALUE            2709 ext/zlib/zlib.c static VALUE
VALUE            2711 ext/zlib/zlib.c     VALUE obj;
VALUE            2747 ext/zlib/zlib.c static VALUE
VALUE            2749 ext/zlib/zlib.c     VALUE klass;
VALUE            2761 ext/zlib/zlib.c static VALUE
VALUE            2764 ext/zlib/zlib.c     VALUE *argv;
VALUE            2765 ext/zlib/zlib.c     VALUE klass;
VALUE            2778 ext/zlib/zlib.c static VALUE
VALUE            2781 ext/zlib/zlib.c     VALUE *argv;
VALUE            2782 ext/zlib/zlib.c     VALUE obj;
VALUE            2785 ext/zlib/zlib.c     VALUE io, level, strategy;
VALUE            2811 ext/zlib/zlib.c static VALUE
VALUE            2814 ext/zlib/zlib.c     VALUE *argv;
VALUE            2815 ext/zlib/zlib.c     VALUE obj;
VALUE            2818 ext/zlib/zlib.c     VALUE v_flush;
VALUE            2838 ext/zlib/zlib.c static VALUE
VALUE            2840 ext/zlib/zlib.c     VALUE obj, str;
VALUE            2854 ext/zlib/zlib.c static VALUE
VALUE            2856 ext/zlib/zlib.c     VALUE obj, ch;
VALUE            2946 ext/zlib/zlib.c static VALUE
VALUE            2948 ext/zlib/zlib.c     VALUE klass;
VALUE            2960 ext/zlib/zlib.c static VALUE
VALUE            2963 ext/zlib/zlib.c     VALUE *argv;
VALUE            2964 ext/zlib/zlib.c     VALUE klass;
VALUE            2979 ext/zlib/zlib.c static VALUE
VALUE            2981 ext/zlib/zlib.c     VALUE obj, io;
VALUE            3004 ext/zlib/zlib.c static VALUE
VALUE            3006 ext/zlib/zlib.c     VALUE obj;
VALUE            3017 ext/zlib/zlib.c static VALUE
VALUE            3019 ext/zlib/zlib.c     VALUE obj;
VALUE            3029 ext/zlib/zlib.c static VALUE
VALUE            3032 ext/zlib/zlib.c     VALUE *argv;
VALUE            3033 ext/zlib/zlib.c     VALUE obj;
VALUE            3036 ext/zlib/zlib.c     VALUE vlen;
VALUE            3061 ext/zlib/zlib.c static VALUE
VALUE            3064 ext/zlib/zlib.c     VALUE *argv;
VALUE            3065 ext/zlib/zlib.c     VALUE obj;
VALUE            3068 ext/zlib/zlib.c     VALUE vlen, outbuf;
VALUE            3085 ext/zlib/zlib.c static VALUE
VALUE            3087 ext/zlib/zlib.c     VALUE obj;
VALUE            3090 ext/zlib/zlib.c     VALUE dst;
VALUE            3102 ext/zlib/zlib.c static VALUE
VALUE            3104 ext/zlib/zlib.c     VALUE obj;
VALUE            3106 ext/zlib/zlib.c     VALUE dst;
VALUE            3117 ext/zlib/zlib.c static VALUE
VALUE            3119 ext/zlib/zlib.c     VALUE obj;
VALUE            3121 ext/zlib/zlib.c     VALUE c;
VALUE            3131 ext/zlib/zlib.c static VALUE
VALUE            3133 ext/zlib/zlib.c     VALUE obj, ch;
VALUE            3144 ext/zlib/zlib.c     VALUE str;
VALUE            3176 ext/zlib/zlib.c     VALUE rs;
VALUE            3182 ext/zlib/zlib.c static VALUE
VALUE            3185 ext/zlib/zlib.c     VALUE *argv;
VALUE            3186 ext/zlib/zlib.c     VALUE obj;
VALUE            3189 ext/zlib/zlib.c     volatile VALUE rs;
VALUE            3190 ext/zlib/zlib.c     VALUE dst;
VALUE            3265 ext/zlib/zlib.c static VALUE
VALUE            3268 ext/zlib/zlib.c     VALUE *argv;
VALUE            3269 ext/zlib/zlib.c     VALUE obj;
VALUE            3271 ext/zlib/zlib.c     VALUE dst;
VALUE            3282 ext/zlib/zlib.c static VALUE
VALUE            3285 ext/zlib/zlib.c     VALUE *argv;
VALUE            3286 ext/zlib/zlib.c     VALUE obj;
VALUE            3288 ext/zlib/zlib.c     VALUE dst;
VALUE            3299 ext/zlib/zlib.c static VALUE
VALUE            3302 ext/zlib/zlib.c     VALUE *argv;
VALUE            3303 ext/zlib/zlib.c     VALUE obj;
VALUE            3305 ext/zlib/zlib.c     VALUE str;
VALUE            3315 ext/zlib/zlib.c static VALUE
VALUE            3318 ext/zlib/zlib.c     VALUE *argv;
VALUE            3319 ext/zlib/zlib.c     VALUE obj;
VALUE            3321 ext/zlib/zlib.c     VALUE str, dst;
VALUE            3414 ext/zlib/zlib.c     VALUE mZlib, cZStream, cDeflate, cInflate;
VALUE            3416 ext/zlib/zlib.c     VALUE cGzipFile, cGzipWriter, cGzipReader;
VALUE              44 file.c         VALUE rb_time_new(time_t, time_t);
VALUE              94 file.c         VALUE rb_cFile;
VALUE              95 file.c         VALUE rb_mFileTest;
VALUE              96 file.c         static VALUE rb_cStat;
VALUE              98 file.c         VALUE
VALUE              99 file.c         rb_get_path(VALUE obj)
VALUE             101 file.c             VALUE tmp;
VALUE             124 file.c         apply2files(void (*func)(const char *, void *), VALUE vargs, void *arg)
VALUE             127 file.c             VALUE path;
VALUE             151 file.c         static VALUE
VALUE             152 file.c         rb_file_path(VALUE obj)
VALUE             162 file.c         static VALUE
VALUE             163 file.c         stat_new_0(VALUE klass, struct stat *st)
VALUE             174 file.c         static VALUE
VALUE             181 file.c         get_stat(VALUE self)
VALUE             202 file.c         static VALUE
VALUE             203 file.c         rb_stat_cmp(VALUE self, VALUE other)
VALUE             228 file.c         static VALUE
VALUE             229 file.c         rb_stat_dev(VALUE self)
VALUE             245 file.c         static VALUE
VALUE             246 file.c         rb_stat_dev_major(VALUE self)
VALUE             267 file.c         static VALUE
VALUE             268 file.c         rb_stat_dev_minor(VALUE self)
VALUE             289 file.c         static VALUE
VALUE             290 file.c         rb_stat_ino(VALUE self)
VALUE             312 file.c         static VALUE
VALUE             313 file.c         rb_stat_mode(VALUE self)
VALUE             334 file.c         static VALUE
VALUE             335 file.c         rb_stat_nlink(VALUE self)
VALUE             351 file.c         static VALUE
VALUE             352 file.c         rb_stat_uid(VALUE self)
VALUE             367 file.c         static VALUE
VALUE             368 file.c         rb_stat_gid(VALUE self)
VALUE             386 file.c         static VALUE
VALUE             387 file.c         rb_stat_rdev(VALUE self)
VALUE             407 file.c         static VALUE
VALUE             408 file.c         rb_stat_rdev_major(VALUE self)
VALUE             429 file.c         static VALUE
VALUE             430 file.c         rb_stat_rdev_minor(VALUE self)
VALUE             449 file.c         static VALUE
VALUE             450 file.c         rb_stat_size(VALUE self)
VALUE             466 file.c         static VALUE
VALUE             467 file.c         rb_stat_blksize(VALUE self)
VALUE             487 file.c         static VALUE
VALUE             488 file.c         rb_stat_blocks(VALUE self)
VALUE             509 file.c         static VALUE
VALUE             510 file.c         rb_stat_atime(VALUE self)
VALUE             525 file.c         static VALUE
VALUE             526 file.c         rb_stat_mtime(VALUE self)
VALUE             543 file.c         static VALUE
VALUE             544 file.c         rb_stat_ctime(VALUE self)
VALUE             563 file.c         static VALUE
VALUE             564 file.c         rb_stat_inspect(VALUE self)
VALUE             566 file.c             VALUE str;
VALUE             570 file.c         	VALUE (*func)(VALUE);
VALUE             592 file.c         	VALUE v;
VALUE             623 file.c         rb_stat(VALUE file, struct stat *st)
VALUE             625 file.c             VALUE tmp;
VALUE             641 file.c         w32_io_info(VALUE *file, BY_HANDLE_FILE_INFORMATION *st)
VALUE             643 file.c             VALUE tmp;
VALUE             682 file.c         static VALUE
VALUE             683 file.c         rb_file_s_stat(VALUE klass, VALUE fname)
VALUE             710 file.c         static VALUE
VALUE             711 file.c         rb_io_stat(VALUE obj)
VALUE             737 file.c         static VALUE
VALUE             738 file.c         rb_file_s_lstat(VALUE klass, VALUE fname)
VALUE             769 file.c         static VALUE
VALUE             770 file.c         rb_file_lstat(VALUE obj)
VALUE             883 file.c         static VALUE
VALUE             884 file.c         test_d(VALUE obj, VALUE fname)
VALUE             904 file.c         static VALUE
VALUE             905 file.c         test_p(VALUE obj, VALUE fname)
VALUE             928 file.c         static VALUE
VALUE             929 file.c         test_l(VALUE obj, VALUE fname)
VALUE             964 file.c         static VALUE
VALUE             965 file.c         test_S(VALUE obj, VALUE fname)
VALUE             998 file.c         static VALUE
VALUE             999 file.c         test_b(VALUE obj, VALUE fname)
VALUE            1025 file.c         static VALUE
VALUE            1026 file.c         test_c(VALUE obj, VALUE fname)
VALUE            1049 file.c         static VALUE
VALUE            1050 file.c         test_e(VALUE obj, VALUE fname)
VALUE            1066 file.c         static VALUE
VALUE            1067 file.c         test_r(VALUE obj, VALUE fname)
VALUE            1083 file.c         static VALUE
VALUE            1084 file.c         test_R(VALUE obj, VALUE fname)
VALUE            1114 file.c         static VALUE
VALUE            1115 file.c         test_wr(VALUE obj, VALUE fname)
VALUE            1136 file.c         static VALUE
VALUE            1137 file.c         test_w(VALUE obj, VALUE fname)
VALUE            1153 file.c         static VALUE
VALUE            1154 file.c         test_W(VALUE obj, VALUE fname)
VALUE            1176 file.c         static VALUE
VALUE            1177 file.c         test_ww(VALUE obj, VALUE fname)
VALUE            1198 file.c         static VALUE
VALUE            1199 file.c         test_x(VALUE obj, VALUE fname)
VALUE            1215 file.c         static VALUE
VALUE            1216 file.c         test_X(VALUE obj, VALUE fname)
VALUE            1236 file.c         static VALUE
VALUE            1237 file.c         test_f(VALUE obj, VALUE fname)
VALUE            1254 file.c         static VALUE
VALUE            1255 file.c         test_z(VALUE obj, VALUE fname)
VALUE            1272 file.c         static VALUE
VALUE            1273 file.c         test_s(VALUE obj, VALUE fname)
VALUE            1291 file.c         static VALUE
VALUE            1292 file.c         test_owned(VALUE obj, VALUE fname)
VALUE            1301 file.c         static VALUE
VALUE            1302 file.c         test_rowned(VALUE obj, VALUE fname)
VALUE            1320 file.c         static VALUE
VALUE            1321 file.c         test_grpowned(VALUE obj, VALUE fname)
VALUE            1333 file.c         static VALUE
VALUE            1334 file.c         check3rdbyte(VALUE fname, int mode)
VALUE            1353 file.c         static VALUE
VALUE            1354 file.c         test_suid(VALUE obj, VALUE fname)
VALUE            1370 file.c         static VALUE
VALUE            1371 file.c         test_sgid(VALUE obj, VALUE fname)
VALUE            1387 file.c         static VALUE
VALUE            1388 file.c         test_sticky(VALUE obj, VALUE fname)
VALUE            1414 file.c         static VALUE
VALUE            1415 file.c         test_identical(VALUE obj, VALUE fname1, VALUE fname2)
VALUE            1468 file.c         static VALUE
VALUE            1469 file.c         rb_file_s_size(VALUE klass, VALUE fname)
VALUE            1478 file.c         static VALUE
VALUE            1534 file.c         static VALUE
VALUE            1535 file.c         rb_file_s_ftype(VALUE klass, VALUE fname)
VALUE            1558 file.c         static VALUE
VALUE            1559 file.c         rb_file_s_atime(VALUE klass, VALUE fname)
VALUE            1579 file.c         static VALUE
VALUE            1580 file.c         rb_file_atime(VALUE obj)
VALUE            1602 file.c         static VALUE
VALUE            1603 file.c         rb_file_s_mtime(VALUE klass, VALUE fname)
VALUE            1622 file.c         static VALUE
VALUE            1623 file.c         rb_file_mtime(VALUE obj)
VALUE            1647 file.c         static VALUE
VALUE            1648 file.c         rb_file_s_ctime(VALUE klass, VALUE fname)
VALUE            1668 file.c         static VALUE
VALUE            1669 file.c         rb_file_ctime(VALUE obj)
VALUE            1701 file.c         static VALUE
VALUE            1702 file.c         rb_file_s_chmod(int argc, VALUE *argv)
VALUE            1704 file.c             VALUE vmode;
VALUE            1705 file.c             VALUE rest;
VALUE            1730 file.c         static VALUE
VALUE            1731 file.c         rb_file_chmod(VALUE obj, VALUE vmode)
VALUE            1770 file.c         static VALUE
VALUE            1771 file.c         rb_file_s_lchmod(int argc, VALUE *argv)
VALUE            1773 file.c             VALUE vmode;
VALUE            1774 file.c             VALUE rest;
VALUE            1785 file.c         static VALUE
VALUE            1786 file.c         rb_file_s_lchmod(int argc, VALUE *argv)
VALUE            1820 file.c         static VALUE
VALUE            1821 file.c         rb_file_s_chown(int argc, VALUE *argv)
VALUE            1823 file.c             VALUE o, g, rest;
VALUE            1861 file.c         static VALUE
VALUE            1862 file.c         rb_file_chown(VALUE obj, VALUE owner, VALUE group)
VALUE            1904 file.c         static VALUE
VALUE            1905 file.c         rb_file_s_lchown(int argc, VALUE *argv)
VALUE            1907 file.c             VALUE o, g, rest;
VALUE            1930 file.c         static VALUE
VALUE            1931 file.c         rb_file_s_lchown(int argc, VALUE *argv)
VALUE            1937 file.c         struct timeval rb_time_timeval(VALUE time);
VALUE            1958 file.c         static VALUE
VALUE            1959 file.c         rb_file_s_utime(int argc, VALUE *argv)
VALUE            1961 file.c             VALUE atime, mtime, rest;
VALUE            1991 file.c         static VALUE
VALUE            1992 file.c         rb_file_s_utime(int argc, VALUE *argv)
VALUE            1994 file.c             VALUE atime, mtime, rest;
VALUE            2012 file.c         NORETURN(static void sys_fail2(VALUE,VALUE));
VALUE            2014 file.c         sys_fail2(VALUE s1, VALUE s2)
VALUE            2037 file.c         static VALUE
VALUE            2038 file.c         rb_file_s_link(VALUE klass, VALUE from, VALUE to)
VALUE            2067 file.c         static VALUE
VALUE            2068 file.c         rb_file_s_symlink(VALUE klass, VALUE from, VALUE to)
VALUE            2096 file.c         static VALUE
VALUE            2097 file.c         rb_file_s_readlink(VALUE klass, VALUE path)
VALUE            2103 file.c             VALUE v;
VALUE            2147 file.c         static VALUE
VALUE            2148 file.c         rb_file_s_unlink(VALUE klass, VALUE args)
VALUE            2167 file.c         static VALUE
VALUE            2168 file.c         rb_file_s_rename(VALUE klass, VALUE from, VALUE to)
VALUE            2214 file.c         static VALUE
VALUE            2215 file.c         rb_file_s_umask(int argc, VALUE *argv)
VALUE            2397 file.c         static VALUE
VALUE            2398 file.c         file_expand_path(VALUE fname, VALUE dname, VALUE result)
VALUE            2597 file.c         VALUE
VALUE            2598 file.c         rb_file_expand_path(VALUE fname, VALUE dname)
VALUE            2620 file.c         VALUE
VALUE            2621 file.c         rb_file_s_expand_path(int argc, VALUE *argv)
VALUE            2623 file.c             VALUE fname, dname;
VALUE            2669 file.c         static VALUE
VALUE            2670 file.c         rb_file_s_basename(int argc, VALUE *argv)
VALUE            2672 file.c             VALUE fname, fext, basename;
VALUE            2741 file.c         static VALUE
VALUE            2742 file.c         rb_file_s_dirname(VALUE klass, VALUE fname)
VALUE            2745 file.c             VALUE dirname;
VALUE            2792 file.c         static VALUE
VALUE            2793 file.c         rb_file_s_extname(VALUE klass, VALUE fname)
VALUE            2796 file.c             VALUE extname;
VALUE            2824 file.c         static VALUE
VALUE            2825 file.c         rb_file_s_path(VALUE klass, VALUE fname)
VALUE            2841 file.c         static VALUE
VALUE            2842 file.c         rb_file_s_split(VALUE klass, VALUE path)
VALUE            2848 file.c         static VALUE separator;
VALUE            2850 file.c         static VALUE rb_file_join(VALUE ary, VALUE sep);
VALUE            2852 file.c         static VALUE
VALUE            2853 file.c         file_inspect_join(VALUE ary, VALUE argp, int recur)
VALUE            2855 file.c             VALUE *arg = (VALUE *)argp;
VALUE            2860 file.c         static VALUE
VALUE            2861 file.c         rb_file_join(VALUE ary, VALUE sep)
VALUE            2864 file.c             VALUE result, tmp;
VALUE            2890 file.c         		VALUE args[2];
VALUE            2894 file.c         		tmp = rb_exec_recursive(file_inspect_join, ary, (VALUE)args);
VALUE            2927 file.c         static VALUE
VALUE            2928 file.c         rb_file_s_join(VALUE klass, VALUE args)
VALUE            2948 file.c         static VALUE
VALUE            2949 file.c         rb_file_s_truncate(VALUE klass, VALUE path, VALUE len)
VALUE            3000 file.c         static VALUE
VALUE            3001 file.c         rb_file_truncate(VALUE obj, VALUE len)
VALUE            3100 file.c         static VALUE
VALUE            3101 file.c         rb_file_flock(VALUE obj, VALUE operation)
VALUE            3137 file.c         test_check(int n, int argc, VALUE *argv)
VALUE            3217 file.c         static VALUE
VALUE            3218 file.c         rb_f_test(int argc, VALUE *argv)
VALUE            3367 file.c         static VALUE
VALUE            3368 file.c         rb_stat_s_alloc(VALUE klass)
VALUE            3382 file.c         static VALUE
VALUE            3383 file.c         rb_stat_init(VALUE obj, VALUE fname)
VALUE            3404 file.c         static VALUE
VALUE            3405 file.c         rb_stat_init_copy(VALUE copy, VALUE orig)
VALUE            3442 file.c         static VALUE
VALUE            3443 file.c         rb_stat_ftype(VALUE obj)
VALUE            3459 file.c         static VALUE
VALUE            3460 file.c         rb_stat_d(VALUE obj)
VALUE            3474 file.c         static VALUE
VALUE            3475 file.c         rb_stat_p(VALUE obj)
VALUE            3501 file.c         static VALUE
VALUE            3502 file.c         rb_stat_l(VALUE obj)
VALUE            3522 file.c         static VALUE
VALUE            3523 file.c         rb_stat_S(VALUE obj)
VALUE            3545 file.c         static VALUE
VALUE            3546 file.c         rb_stat_b(VALUE obj)
VALUE            3567 file.c         static VALUE
VALUE            3568 file.c         rb_stat_c(VALUE obj)
VALUE            3587 file.c         static VALUE
VALUE            3588 file.c         rb_stat_owned(VALUE obj)
VALUE            3594 file.c         static VALUE
VALUE            3595 file.c         rb_stat_rowned(VALUE obj)
VALUE            3613 file.c         static VALUE
VALUE            3614 file.c         rb_stat_grpowned(VALUE obj)
VALUE            3633 file.c         static VALUE
VALUE            3634 file.c         rb_stat_r(VALUE obj)
VALUE            3665 file.c         static VALUE
VALUE            3666 file.c         rb_stat_R(VALUE obj)
VALUE            3697 file.c         static VALUE
VALUE            3698 file.c         rb_stat_wr(VALUE obj)
VALUE            3721 file.c         static VALUE
VALUE            3722 file.c         rb_stat_w(VALUE obj)
VALUE            3751 file.c         static VALUE
VALUE            3752 file.c         rb_stat_W(VALUE obj)
VALUE            3783 file.c         static VALUE
VALUE            3784 file.c         rb_stat_ww(VALUE obj)
VALUE            3809 file.c         static VALUE
VALUE            3810 file.c         rb_stat_x(VALUE obj)
VALUE            3837 file.c         static VALUE
VALUE            3838 file.c         rb_stat_X(VALUE obj)
VALUE            3867 file.c         static VALUE
VALUE            3868 file.c         rb_stat_f(VALUE obj)
VALUE            3885 file.c         static VALUE
VALUE            3886 file.c         rb_stat_z(VALUE obj)
VALUE            3903 file.c         static VALUE
VALUE            3904 file.c         rb_stat_s(VALUE obj)
VALUE            3923 file.c         static VALUE
VALUE            3924 file.c         rb_stat_suid(VALUE obj)
VALUE            3944 file.c         static VALUE
VALUE            3945 file.c         rb_stat_sgid(VALUE obj)
VALUE            3965 file.c         static VALUE
VALUE            3966 file.c         rb_stat_sticky(VALUE obj)
VALUE            3974 file.c         static VALUE rb_mFConst;
VALUE            3977 file.c         rb_file_const(const char *name, VALUE value)
VALUE            3999 file.c         path_check_0(VALUE path, int loadpath)
VALUE            4007 file.c         	VALUE newpath;
VALUE            4090 file.c         extern VALUE rb_load_path;
VALUE            4093 file.c         rb_find_file_ext(VALUE *filep, const char *const *ext)
VALUE            4097 file.c             VALUE fname;
VALUE            4127 file.c         	VALUE str = RARRAY(rb_load_path)->ptr[i];
VALUE            4146 file.c         VALUE
VALUE            4147 file.c         rb_find_file(VALUE path)
VALUE            4149 file.c             VALUE tmp;
VALUE            4188 file.c         	    VALUE str = RARRAY(rb_load_path)->ptr[i];
VALUE            4225 file.c         define_filetest_function(const char *name, VALUE (*func)(ANYARGS), int argc)
VALUE              74 gc.c           static void run_final(VALUE obj);
VALUE              75 gc.c           static VALUE nomem_error;
VALUE             206 gc.c           VALUE
VALUE             227 gc.c           VALUE
VALUE             236 gc.c           VALUE rb_mGC;
VALUE             239 gc.c               VALUE *varptr;
VALUE             244 gc.c           rb_gc_register_address(VALUE *addr)
VALUE             255 gc.c           rb_gc_unregister_address(VALUE *addr)
VALUE             279 gc.c           rb_global_variable(VALUE *var)
VALUE             381 gc.c           VALUE
VALUE             384 gc.c               VALUE obj;
VALUE             389 gc.c               obj = (VALUE)freelist;
VALUE             399 gc.c           VALUE
VALUE             400 gc.c           rb_data_object_alloc(VALUE klass, void *datap, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
VALUE             409 gc.c               return (VALUE)data;
VALUE             413 gc.c           VALUE *rb_gc_stack_start = 0;
VALUE             415 gc.c           VALUE *rb_gc_register_stack_start = 0;
VALUE             436 gc.c           NOINLINE(static void set_stack_end(VALUE **stack_end_p));
VALUE             439 gc.c           set_stack_end(VALUE **stack_end_p)
VALUE             441 gc.c               VALUE stack_end;
VALUE             444 gc.c           #define SET_STACK_END    VALUE *stack_end; set_stack_end(&stack_end)
VALUE             465 gc.c               VALUE *addr;
VALUE             484 gc.c           ruby_stack_length(VALUE **p)
VALUE             501 gc.c           static VALUE mark_stack[MARK_STACK_MAX];
VALUE             502 gc.c           static VALUE *mark_stack_ptr;
VALUE             553 gc.c           static void gc_mark(VALUE ptr, int lev);
VALUE             554 gc.c           static void gc_mark_children(VALUE ptr, int lev);
VALUE             568 gc.c           		gc_mark_children((VALUE)p, 0);
VALUE             578 gc.c               VALUE tmp_arry[MARK_STACK_MAX];
VALUE             579 gc.c               VALUE *p;
VALUE             582 gc.c               MEMCPY(tmp_arry, mark_stack, VALUE, MARK_STACK_MAX);
VALUE             611 gc.c           mark_locations_array(register VALUE *x, register long n)
VALUE             613 gc.c               VALUE v;
VALUE             624 gc.c           rb_gc_mark_locations(VALUE *start, VALUE *end)
VALUE             633 gc.c           mark_entry(ID key, VALUE value, int lev)
VALUE             653 gc.c           mark_keyvalue(VALUE key, VALUE value, int lev)
VALUE             674 gc.c           rb_gc_mark_maybe(VALUE obj)
VALUE             684 gc.c           gc_mark(VALUE ptr, int lev)
VALUE             710 gc.c           rb_gc_mark(VALUE ptr)
VALUE             716 gc.c           gc_mark_children(VALUE ptr, int lev)
VALUE             753 gc.c           	    gc_mark((VALUE)obj->as.node.u2.node, lev);
VALUE             766 gc.c           	    gc_mark((VALUE)obj->as.node.u1.node, lev);
VALUE             771 gc.c           	    ptr = (VALUE)obj->as.node.u3.node;
VALUE             791 gc.c           	    gc_mark((VALUE)obj->as.node.u1.node, lev);
VALUE             806 gc.c           	    ptr = (VALUE)obj->as.node.u2.node;
VALUE             823 gc.c           	    ptr = (VALUE)obj->as.node.u1.node;
VALUE             829 gc.c           	    gc_mark((VALUE)obj->as.node.u3.node, lev);
VALUE             830 gc.c           	    ptr = (VALUE)obj->as.node.u2.node;
VALUE             856 gc.c           	    mark_locations_array((VALUE*)obj->as.node.u1.value,
VALUE             858 gc.c           	    ptr = (VALUE)obj->as.node.u2.node;
VALUE             863 gc.c           		gc_mark((VALUE)obj->as.node.u1.node, lev);
VALUE             866 gc.c           		gc_mark((VALUE)obj->as.node.u2.node, lev);
VALUE             869 gc.c           		gc_mark((VALUE)obj->as.node.u3.node, lev);
VALUE             892 gc.c           	    VALUE *ptr = obj->as.array.ptr;
VALUE             937 gc.c           	ptr = (VALUE)obj->as.varmap.next;
VALUE             943 gc.c           	    VALUE *vars = &obj->as.scope.local_vars[-1];
VALUE             954 gc.c           	    VALUE *ptr = obj->as.rstruct.ptr;
VALUE             969 gc.c           static void obj_free(VALUE);
VALUE             976 gc.c           	run_final((VALUE)p);
VALUE            1032 gc.c           		    obj_free((VALUE)p);
VALUE            1088 gc.c           rb_gc_force_recycle(VALUE p)
VALUE            1096 gc.c           obj_free(VALUE obj)
VALUE            1108 gc.c           	rb_free_generic_ivar((VALUE)obj);
VALUE            1119 gc.c           	rb_clear_cache_by_class((VALUE)obj);
VALUE            1199 gc.c           	    VALUE *vars = RANY(obj)->as.scope.local_vars-1;
VALUE            1222 gc.c               gc_mark((VALUE)frame->node, 0);
VALUE            1298 gc.c               gc_mark((VALUE)ruby_scope, 0);
VALUE            1299 gc.c               gc_mark((VALUE)ruby_dyna_vars, 0);
VALUE            1307 gc.c               mark_locations_array((VALUE*)save_regs_gc_mark, sizeof(save_regs_gc_mark) / sizeof(VALUE *));
VALUE            1309 gc.c               rb_gc_mark_locations((VALUE*)STACK_END, rb_gc_stack_start);
VALUE            1311 gc.c               rb_gc_mark_locations(rb_gc_stack_start, (VALUE*)STACK_END + 1);
VALUE            1313 gc.c               if ((VALUE*)STACK_END < rb_gc_stack_start)
VALUE            1314 gc.c           	rb_gc_mark_locations((VALUE*)STACK_END, rb_gc_stack_start);
VALUE            1316 gc.c           	rb_gc_mark_locations(rb_gc_stack_start, (VALUE*)STACK_END + 1);
VALUE            1321 gc.c               rb_gc_mark_locations(rb_gc_register_stack_start, (VALUE*)rb_ia64_bsp());
VALUE            1324 gc.c               rb_gc_mark_locations((VALUE*)((char*)STACK_END + 2),
VALUE            1325 gc.c           			 (VALUE*)((char*)rb_gc_stack_start + 2));
VALUE            1379 gc.c           VALUE
VALUE            1390 gc.c               STACK_LEVEL_MAX = size/sizeof(VALUE);
VALUE            1395 gc.c           Init_stack(VALUE *addr)
VALUE            1408 gc.c                   rb_gc_register_stack_start = (VALUE*)__libc_ia64_register_backing_store_base;
VALUE            1412 gc.c                   VALUE *bsp = (VALUE*)rb_ia64_bsp();
VALUE            1424 gc.c           	STACK_UPPER((VALUE *)&m, (VALUE *)m.BaseAddress,
VALUE            1425 gc.c           		    (VALUE *)((char *)m.BaseAddress + m.RegionSize) - 1);
VALUE            1432 gc.c               if (!addr) addr = (VALUE *)&addr;
VALUE            1451 gc.c           	    STACK_LEVEL_MAX = (rlim.rlim_cur - space) / sizeof(VALUE);
VALUE            1457 gc.c           void ruby_init_stack(VALUE *addr
VALUE            1471 gc.c                   (VALUE*)bsp < rb_gc_register_stack_start) {
VALUE            1472 gc.c                   rb_gc_register_stack_start = (VALUE*)bsp;
VALUE            1483 gc.c           	    STACK_LEVEL_MAX = (rlim.rlim_cur - space) / sizeof(VALUE);
VALUE            1529 gc.c           static VALUE
VALUE            1551 gc.c           		    rb_yield((VALUE)p);
VALUE            1561 gc.c           static VALUE
VALUE            1562 gc.c           os_obj_of(VALUE of)
VALUE            1583 gc.c           		    if (rb_obj_is_kind_of((VALUE)p, of)) {
VALUE            1584 gc.c           			rb_yield((VALUE)p);
VALUE            1628 gc.c           static VALUE
VALUE            1629 gc.c           os_each_obj(int argc, VALUE *argv)
VALUE            1631 gc.c               VALUE of;
VALUE            1642 gc.c           static VALUE finalizers;
VALUE            1647 gc.c           static VALUE
VALUE            1648 gc.c           add_final(VALUE os, VALUE block)
VALUE            1662 gc.c           static VALUE
VALUE            1663 gc.c           rm_final(VALUE os, VALUE block)
VALUE            1673 gc.c           static VALUE
VALUE            1684 gc.c           static VALUE
VALUE            1685 gc.c           call_final(VALUE os, VALUE obj)
VALUE            1701 gc.c           static VALUE
VALUE            1702 gc.c           undefine_final(VALUE os, VALUE obj)
VALUE            1719 gc.c           static VALUE
VALUE            1720 gc.c           define_final(int argc, VALUE *argv, VALUE os)
VALUE            1722 gc.c               VALUE obj, block, table;
VALUE            1750 gc.c           rb_gc_copy_finalizer(VALUE dest, VALUE obj)
VALUE            1752 gc.c               VALUE table;
VALUE            1762 gc.c           static VALUE
VALUE            1763 gc.c           run_single_final(VALUE *args)
VALUE            1770 gc.c           run_final(VALUE obj)
VALUE            1774 gc.c               VALUE args[3], table, objid;
VALUE            1779 gc.c               args[2] = (VALUE)ruby_safe_level;
VALUE            1783 gc.c           	rb_protect((VALUE(*)(VALUE))run_single_final, (VALUE)args, &status);
VALUE            1787 gc.c           	    VALUE final = RARRAY(table)->ptr[i];
VALUE            1791 gc.c           	    rb_protect((VALUE(*)(VALUE))run_single_final, (VALUE)args, &status);
VALUE            1826 gc.c           		    run_final((VALUE)p);
VALUE            1870 gc.c           static VALUE
VALUE            1871 gc.c           id2ref(VALUE obj, VALUE id)
VALUE            1878 gc.c               VALUE ptr;
VALUE            1888 gc.c               if (FIXNUM_P(ptr)) return (VALUE)ptr;
VALUE            1889 gc.c               if (SYMBOL_P(ptr) && rb_id2name(SYM2ID((VALUE)ptr)) != 0) {
VALUE            1890 gc.c           	return (VALUE)ptr;
VALUE            1900 gc.c               return (VALUE)ptr;
VALUE            1912 gc.c               VALUE rb_mObSpace;
VALUE              27 hash.c         VALUE
VALUE              28 hash.c         rb_hash_freeze(VALUE hash)
VALUE              33 hash.c         VALUE rb_cHash;
VALUE              35 hash.c         static VALUE envtbl;
VALUE              38 hash.c         static VALUE
VALUE              39 hash.c         eql(VALUE *args)
VALUE              41 hash.c             return (VALUE)rb_eql(args[0], args[1]);
VALUE              45 hash.c         rb_any_cmp(VALUE a, VALUE b)
VALUE              47 hash.c             VALUE args[2];
VALUE              64 hash.c             return !rb_with_disable_interrupt(eql, (VALUE)args);
VALUE              67 hash.c         VALUE
VALUE              68 hash.c         rb_hash(VALUE obj)
VALUE              74 hash.c         rb_any_hash(VALUE a)
VALUE              76 hash.c             VALUE hval;
VALUE             135 hash.c             VALUE hash;
VALUE             137 hash.c             VALUE arg;
VALUE             141 hash.c         hash_foreach_iter(VALUE key, VALUE value, struct hash_foreach_arg *arg)
VALUE             164 hash.c         static VALUE
VALUE             165 hash.c         hash_foreach_ensure(VALUE hash)
VALUE             178 hash.c         static VALUE
VALUE             188 hash.c         rb_hash_foreach(VALUE hash, int (*func)(ANYARGS), VALUE farg)
VALUE             196 hash.c             rb_ensure(hash_foreach_call, (VALUE)&arg, hash_foreach_ensure, hash);
VALUE             199 hash.c         static VALUE hash_alloc(VALUE);
VALUE             201 hash.c         static VALUE
VALUE             202 hash.c         hash_alloc(VALUE klass)
VALUE             210 hash.c             return (VALUE)hash;
VALUE             213 hash.c         VALUE
VALUE             220 hash.c         rb_hash_modify(VALUE hash)
VALUE             263 hash.c         static VALUE
VALUE             264 hash.c         rb_hash_initialize(int argc, VALUE *argv, VALUE hash)
VALUE             266 hash.c             VALUE ifnone;
VALUE             297 hash.c         static VALUE
VALUE             298 hash.c         rb_hash_s_create(int argc, VALUE *argv, VALUE klass)
VALUE             300 hash.c             VALUE hash;
VALUE             324 hash.c         static VALUE
VALUE             325 hash.c         to_hash(VALUE hash)
VALUE             331 hash.c         rb_hash_rehash_i(VALUE key, VALUE value, st_table *tbl)
VALUE             357 hash.c         static VALUE
VALUE             358 hash.c         rb_hash_rehash(VALUE hash)
VALUE             388 hash.c         VALUE
VALUE             389 hash.c         rb_hash_aref(VALUE hash, VALUE key)
VALUE             391 hash.c             VALUE val;
VALUE             428 hash.c         static VALUE
VALUE             429 hash.c         rb_hash_fetch(int argc, VALUE *argv, VALUE hash)
VALUE             431 hash.c             VALUE key, if_none;
VALUE             432 hash.c             VALUE val;
VALUE             472 hash.c         static VALUE
VALUE             473 hash.c         rb_hash_default(int argc, VALUE *argv, VALUE hash)
VALUE             475 hash.c             VALUE key;
VALUE             504 hash.c         static VALUE
VALUE             505 hash.c         rb_hash_set_default(VALUE hash, VALUE ifnone)
VALUE             528 hash.c         static VALUE
VALUE             529 hash.c         rb_hash_default_proc(VALUE hash)
VALUE             538 hash.c         key_i(VALUE key, VALUE value, VALUE *args)
VALUE             559 hash.c         static VALUE
VALUE             560 hash.c         rb_hash_key(VALUE hash, VALUE value)
VALUE             562 hash.c             VALUE args[2];
VALUE             573 hash.c         static VALUE
VALUE             574 hash.c         rb_hash_index(VALUE hash, VALUE value)
VALUE             598 hash.c         VALUE
VALUE             599 hash.c         rb_hash_delete(VALUE hash, VALUE key)
VALUE             601 hash.c             VALUE val;
VALUE             620 hash.c             VALUE key;
VALUE             621 hash.c             VALUE val;
VALUE             625 hash.c         shift_i(VALUE key, VALUE value, struct shift_var *var)
VALUE             648 hash.c         static VALUE
VALUE             649 hash.c         rb_hash_shift(VALUE hash)
VALUE             669 hash.c         delete_if_i(VALUE key, VALUE value, VALUE hash)
VALUE             690 hash.c         VALUE
VALUE             691 hash.c         rb_hash_delete_if(VALUE hash)
VALUE             706 hash.c         VALUE
VALUE             707 hash.c         rb_hash_reject_bang(VALUE hash)
VALUE             725 hash.c         static VALUE
VALUE             726 hash.c         rb_hash_reject(VALUE hash)
VALUE             732 hash.c         select_i(VALUE key, VALUE value, VALUE result)
VALUE             751 hash.c         VALUE
VALUE             752 hash.c         rb_hash_values_at(int argc, VALUE *argv, VALUE hash)
VALUE             754 hash.c             VALUE result = rb_ary_new2(argc);
VALUE             776 hash.c         VALUE
VALUE             777 hash.c         rb_hash_select(VALUE hash)
VALUE             779 hash.c             VALUE result;
VALUE             788 hash.c         clear_i(VALUE key, VALUE value, VALUE dummy)
VALUE             804 hash.c         static VALUE
VALUE             805 hash.c         rb_hash_clear(VALUE hash)
VALUE             833 hash.c         VALUE
VALUE             834 hash.c         rb_hash_aset(VALUE hash, VALUE key, VALUE val)
VALUE             847 hash.c         replace_i(VALUE key, VALUE val, VALUE hash)
VALUE             868 hash.c         static VALUE
VALUE             869 hash.c         rb_hash_replace(VALUE hash, VALUE hash2)
VALUE             899 hash.c         static VALUE
VALUE             900 hash.c         rb_hash_size(VALUE hash)
VALUE             916 hash.c         static VALUE
VALUE             917 hash.c         rb_hash_empty_p(VALUE hash)
VALUE             925 hash.c         each_value_i(VALUE key, VALUE value)
VALUE             948 hash.c         static VALUE
VALUE             949 hash.c         rb_hash_each_value(VALUE hash)
VALUE             957 hash.c         each_key_i(VALUE key, VALUE value)
VALUE             979 hash.c         static VALUE
VALUE             980 hash.c         rb_hash_each_key(VALUE hash)
VALUE             988 hash.c         each_pair_i(VALUE key, VALUE value)
VALUE            1012 hash.c         static VALUE
VALUE            1013 hash.c         rb_hash_each_pair(VALUE hash)
VALUE            1021 hash.c         each_i(VALUE key, VALUE value)
VALUE            1048 hash.c         static VALUE
VALUE            1049 hash.c         rb_hash_each(VALUE hash)
VALUE            1057 hash.c         to_a_i(VALUE key, VALUE value, VALUE ary)
VALUE            1075 hash.c         static VALUE
VALUE            1076 hash.c         rb_hash_to_a(VALUE hash)
VALUE            1078 hash.c             VALUE ary;
VALUE            1102 hash.c         static VALUE
VALUE            1103 hash.c         rb_hash_sort(VALUE hash)
VALUE            1105 hash.c             VALUE entries = rb_hash_to_a(hash);
VALUE            1111 hash.c         inspect_i(VALUE key, VALUE value, VALUE str)
VALUE            1113 hash.c             VALUE str2;
VALUE            1130 hash.c         static VALUE
VALUE            1131 hash.c         inspect_hash(VALUE hash, VALUE dummy, int recur)
VALUE            1133 hash.c             VALUE str;
VALUE            1151 hash.c         static VALUE
VALUE            1152 hash.c         rb_hash_inspect(VALUE hash)
VALUE            1159 hash.c         static VALUE
VALUE            1160 hash.c         to_s_hash(VALUE hash, VALUE dummy, int recur)
VALUE            1179 hash.c         static VALUE
VALUE            1180 hash.c         rb_hash_to_s(VALUE hash)
VALUE            1192 hash.c         static VALUE
VALUE            1193 hash.c         rb_hash_to_hash(VALUE hash)
VALUE            1199 hash.c         keys_i(VALUE key, VALUE value, VALUE ary)
VALUE            1218 hash.c         static VALUE
VALUE            1219 hash.c         rb_hash_keys(VALUE hash)
VALUE            1221 hash.c             VALUE ary;
VALUE            1230 hash.c         values_i(VALUE key, VALUE value, VALUE ary)
VALUE            1249 hash.c         static VALUE
VALUE            1250 hash.c         rb_hash_values(VALUE hash)
VALUE            1252 hash.c             VALUE ary;
VALUE            1275 hash.c         static VALUE
VALUE            1276 hash.c         rb_hash_has_key(VALUE hash, VALUE key)
VALUE            1285 hash.c         rb_hash_search_value(VALUE key, VALUE value, VALUE *data)
VALUE            1308 hash.c         static VALUE
VALUE            1309 hash.c         rb_hash_has_value(VALUE hash, VALUE val)
VALUE            1311 hash.c             VALUE data[2];
VALUE            1325 hash.c         equal_i(VALUE key, VALUE val1, struct equal_data *data)
VALUE            1327 hash.c             VALUE val2;
VALUE            1341 hash.c         static VALUE
VALUE            1342 hash.c         hash_equal(VALUE hash1, VALUE hash2, int eql /* compare default value if true */)
VALUE            1387 hash.c         static VALUE
VALUE            1388 hash.c         rb_hash_equal(VALUE hash1, VALUE hash2)
VALUE            1394 hash.c         rb_hash_invert_i(VALUE key, VALUE value, VALUE hash)
VALUE            1413 hash.c         static VALUE
VALUE            1414 hash.c         rb_hash_invert(VALUE hash)
VALUE            1416 hash.c             VALUE h = rb_hash_new();
VALUE            1423 hash.c         rb_hash_update_i(VALUE key, VALUE value, VALUE hash)
VALUE            1431 hash.c         rb_hash_update_block_i(VALUE key, VALUE value, VALUE hash)
VALUE            1461 hash.c         static VALUE
VALUE            1462 hash.c         rb_hash_update(VALUE hash1, VALUE hash2)
VALUE            1490 hash.c         static VALUE
VALUE            1491 hash.c         rb_hash_merge(VALUE hash1, VALUE hash2)
VALUE            1516 hash.c         static VALUE
VALUE            1519 hash.c             VALUE str = rb_tainted_str_new(ptr, len);
VALUE            1525 hash.c         static VALUE
VALUE            1532 hash.c         static VALUE
VALUE            1533 hash.c         env_delete(VALUE obj, VALUE name)
VALUE            1545 hash.c         	VALUE value = env_str_new2(val);
VALUE            1561 hash.c         static VALUE
VALUE            1562 hash.c         env_delete_m(VALUE obj, VALUE name)
VALUE            1564 hash.c             VALUE val;
VALUE            1571 hash.c         static VALUE
VALUE            1572 hash.c         rb_f_getenv(VALUE obj, VALUE name)
VALUE            1590 hash.c         	    VALUE str = rb_str_new2(env);
VALUE            1600 hash.c         static VALUE
VALUE            1601 hash.c         env_fetch(int argc, VALUE *argv)
VALUE            1603 hash.c             VALUE key, if_none;
VALUE            1757 hash.c         static VALUE
VALUE            1758 hash.c         env_aset(VALUE obj, VALUE nm, VALUE val)
VALUE            1793 hash.c         static VALUE
VALUE            1797 hash.c             VALUE ary;
VALUE            1813 hash.c         static VALUE
VALUE            1814 hash.c         env_each_key(VALUE ehash)
VALUE            1816 hash.c             VALUE keys;
VALUE            1828 hash.c         static VALUE
VALUE            1831 hash.c             VALUE ary;
VALUE            1848 hash.c         static VALUE
VALUE            1849 hash.c         env_each_value(VALUE ehash)
VALUE            1851 hash.c             VALUE values = env_values();
VALUE            1863 hash.c         static VALUE
VALUE            1864 hash.c         env_each_i(VALUE ehash, int values)
VALUE            1867 hash.c             VALUE ary;
VALUE            1894 hash.c         static VALUE
VALUE            1895 hash.c         env_each(VALUE ehash)
VALUE            1901 hash.c         static VALUE
VALUE            1902 hash.c         env_each_pair(VALUE ehash)
VALUE            1908 hash.c         static VALUE
VALUE            1911 hash.c             volatile VALUE keys;
VALUE            1918 hash.c         	VALUE val = rb_f_getenv(Qnil, RARRAY(keys)->ptr[i]);
VALUE            1931 hash.c         static VALUE
VALUE            1938 hash.c         static VALUE
VALUE            1939 hash.c         env_values_at(int argc, VALUE *argv)
VALUE            1941 hash.c             VALUE result;
VALUE            1952 hash.c         static VALUE
VALUE            1953 hash.c         env_select(VALUE ehash)
VALUE            1955 hash.c             VALUE result;
VALUE            1965 hash.c         	    VALUE k = env_str_new(*env, s-*env);
VALUE            1966 hash.c         	    VALUE v = env_str_new2(s+1);
VALUE            1978 hash.c         static VALUE
VALUE            1981 hash.c             volatile VALUE keys;
VALUE            1987 hash.c         	VALUE val = rb_f_getenv(Qnil, RARRAY(keys)->ptr[i]);
VALUE            1995 hash.c         static VALUE
VALUE            2001 hash.c         static VALUE
VALUE            2005 hash.c             VALUE str, i;
VALUE            2032 hash.c         static VALUE
VALUE            2036 hash.c             VALUE ary;
VALUE            2053 hash.c         static VALUE
VALUE            2059 hash.c         static VALUE
VALUE            2073 hash.c         static VALUE
VALUE            2088 hash.c         static VALUE
VALUE            2089 hash.c         env_has_key(VALUE env, VALUE key)
VALUE            2101 hash.c         static VALUE
VALUE            2102 hash.c         env_has_value(VALUE dmy, VALUE value)
VALUE            2124 hash.c         static VALUE
VALUE            2125 hash.c         env_key(VALUE dmy, VALUE value)
VALUE            2128 hash.c             VALUE str;
VALUE            2149 hash.c         static VALUE
VALUE            2150 hash.c         env_index(VALUE dmy, VALUE value)
VALUE            2156 hash.c         static VALUE
VALUE            2160 hash.c             VALUE hash;
VALUE            2177 hash.c         static VALUE
VALUE            2183 hash.c         static VALUE
VALUE            2193 hash.c         	    VALUE key = env_str_new(*env, s-*env);
VALUE            2194 hash.c         	    VALUE val = env_str_new2(getenv(RSTRING(key)->ptr));
VALUE            2203 hash.c         static VALUE
VALUE            2210 hash.c         env_replace_i(VALUE key, VALUE val, VALUE keys)
VALUE            2221 hash.c         static VALUE
VALUE            2222 hash.c         env_replace(VALUE env, VALUE hash)
VALUE            2224 hash.c             volatile VALUE keys;
VALUE            2240 hash.c         env_update_i(VALUE key, VALUE val)
VALUE            2251 hash.c         static VALUE
VALUE            2252 hash.c         env_update(VALUE env, VALUE hash)
VALUE              32 intern.h       void rb_mem_clear(register VALUE*, register long);
VALUE              33 intern.h       VALUE rb_assoc_new(VALUE, VALUE);
VALUE              34 intern.h       VALUE rb_check_array_type(VALUE);
VALUE              35 intern.h       VALUE rb_ary_new(void);
VALUE              36 intern.h       VALUE rb_ary_new2(long);
VALUE              37 intern.h       VALUE rb_ary_new3(long,...);
VALUE              38 intern.h       VALUE rb_ary_new4(long, const VALUE *);
VALUE              39 intern.h       VALUE rb_values_new(long,...);
VALUE              40 intern.h       VALUE rb_values_new2(long, const VALUE *);
VALUE              41 intern.h       VALUE rb_values_from_ary(VALUE);
VALUE              42 intern.h       VALUE rb_ary_from_values(VALUE);
VALUE              43 intern.h       VALUE rb_ary_freeze(VALUE);
VALUE              44 intern.h       VALUE rb_ary_aref(int, VALUE*, VALUE);
VALUE              45 intern.h       void rb_ary_store(VALUE, long, VALUE);
VALUE              46 intern.h       VALUE rb_ary_dup(VALUE);
VALUE              47 intern.h       VALUE rb_ary_to_ary(VALUE);
VALUE              48 intern.h       VALUE rb_ary_to_s(VALUE);
VALUE              49 intern.h       VALUE rb_ary_push(VALUE, VALUE);
VALUE              50 intern.h       VALUE rb_ary_pop(VALUE);
VALUE              51 intern.h       VALUE rb_ary_shift(VALUE);
VALUE              52 intern.h       VALUE rb_ary_unshift(VALUE, VALUE);
VALUE              53 intern.h       VALUE rb_ary_entry(VALUE, long);
VALUE              54 intern.h       VALUE rb_ary_each(VALUE);
VALUE              55 intern.h       VALUE rb_ary_join(VALUE, VALUE);
VALUE              56 intern.h       VALUE rb_ary_print_on(VALUE, VALUE);
VALUE              57 intern.h       VALUE rb_ary_reverse(VALUE);
VALUE              58 intern.h       VALUE rb_ary_sort(VALUE);
VALUE              59 intern.h       VALUE rb_ary_sort_bang(VALUE);
VALUE              60 intern.h       VALUE rb_ary_delete(VALUE, VALUE);
VALUE              61 intern.h       VALUE rb_ary_delete_at(VALUE, long);
VALUE              62 intern.h       VALUE rb_ary_clear(VALUE);
VALUE              63 intern.h       VALUE rb_ary_plus(VALUE, VALUE);
VALUE              64 intern.h       VALUE rb_ary_concat(VALUE, VALUE);
VALUE              65 intern.h       VALUE rb_ary_assoc(VALUE, VALUE);
VALUE              66 intern.h       VALUE rb_ary_rassoc(VALUE, VALUE);
VALUE              67 intern.h       VALUE rb_ary_includes(VALUE, VALUE);
VALUE              68 intern.h       VALUE rb_ary_cmp(VALUE, VALUE);
VALUE              69 intern.h       VALUE rb_check_array_value(VALUE);
VALUE              70 intern.h       VALUE rb_get_values_at(VALUE, long, int, VALUE*, VALUE(*)(VALUE,long));
VALUE              72 intern.h       VALUE rb_big_clone(VALUE);
VALUE              73 intern.h       void rb_big_2comp(VALUE);
VALUE              74 intern.h       VALUE rb_big_norm(VALUE);
VALUE              75 intern.h       VALUE rb_uint2big(unsigned long);
VALUE              76 intern.h       VALUE rb_int2big(long);
VALUE              77 intern.h       VALUE rb_uint2inum(unsigned long);
VALUE              78 intern.h       VALUE rb_int2inum(long);
VALUE              79 intern.h       VALUE rb_cstr_to_inum(const char*, int, int);
VALUE              80 intern.h       VALUE rb_str_to_inum(VALUE, int, int);
VALUE              81 intern.h       VALUE rb_cstr2inum(const char*, int);
VALUE              82 intern.h       VALUE rb_str2inum(VALUE, int);
VALUE              83 intern.h       VALUE rb_big2str(VALUE, int);
VALUE              84 intern.h       long rb_big2long(VALUE);
VALUE              86 intern.h       unsigned long rb_big2ulong(VALUE);
VALUE              89 intern.h       VALUE rb_ll2inum(LONG_LONG);
VALUE              90 intern.h       VALUE rb_ull2inum(unsigned LONG_LONG);
VALUE              91 intern.h       LONG_LONG rb_big2ll(VALUE);
VALUE              92 intern.h       unsigned LONG_LONG rb_big2ull(VALUE);
VALUE              94 intern.h       void rb_quad_pack(char*,VALUE);
VALUE              95 intern.h       VALUE rb_quad_unpack(const char*,int);
VALUE              96 intern.h       VALUE rb_dbl2big(double);
VALUE              97 intern.h       double rb_big2dbl(VALUE);
VALUE              98 intern.h       VALUE rb_big_cmp(VALUE, VALUE);
VALUE              99 intern.h       VALUE rb_big_eq(VALUE, VALUE);
VALUE             100 intern.h       VALUE rb_big_plus(VALUE, VALUE);
VALUE             101 intern.h       VALUE rb_big_minus(VALUE, VALUE);
VALUE             102 intern.h       VALUE rb_big_mul(VALUE, VALUE);
VALUE             103 intern.h       VALUE rb_big_div(VALUE, VALUE);
VALUE             104 intern.h       VALUE rb_big_modulo(VALUE, VALUE);
VALUE             105 intern.h       VALUE rb_big_divmod(VALUE, VALUE);
VALUE             106 intern.h       VALUE rb_big_pow(VALUE, VALUE);
VALUE             107 intern.h       VALUE rb_big_and(VALUE, VALUE);
VALUE             108 intern.h       VALUE rb_big_or(VALUE, VALUE);
VALUE             109 intern.h       VALUE rb_big_xor(VALUE, VALUE);
VALUE             110 intern.h       VALUE rb_big_lshift(VALUE, VALUE);
VALUE             112 intern.h       VALUE rb_class_boot(VALUE);
VALUE             113 intern.h       VALUE rb_class_new(VALUE);
VALUE             114 intern.h       VALUE rb_mod_init_copy(VALUE, VALUE);
VALUE             115 intern.h       VALUE rb_class_init_copy(VALUE, VALUE);
VALUE             116 intern.h       VALUE rb_singleton_class_clone(VALUE);
VALUE             117 intern.h       void rb_singleton_class_attached(VALUE,VALUE);
VALUE             118 intern.h       VALUE rb_make_metaclass(VALUE, VALUE);
VALUE             119 intern.h       void rb_check_inheritable(VALUE);
VALUE             120 intern.h       VALUE rb_class_inherited(VALUE, VALUE);
VALUE             121 intern.h       VALUE rb_define_class_id(ID, VALUE);
VALUE             122 intern.h       VALUE rb_module_new(void);
VALUE             123 intern.h       VALUE rb_define_module_id(ID);
VALUE             124 intern.h       VALUE rb_mod_included_modules(VALUE);
VALUE             125 intern.h       VALUE rb_mod_include_p(VALUE, VALUE);
VALUE             126 intern.h       VALUE rb_mod_ancestors(VALUE);
VALUE             127 intern.h       VALUE rb_class_instance_methods(int, VALUE*, VALUE);
VALUE             128 intern.h       VALUE rb_class_public_instance_methods(int, VALUE*, VALUE);
VALUE             129 intern.h       VALUE rb_class_protected_instance_methods(int, VALUE*, VALUE);
VALUE             130 intern.h       VALUE rb_class_private_instance_methods(int, VALUE*, VALUE);
VALUE             131 intern.h       VALUE rb_obj_singleton_methods(int, VALUE*, VALUE);
VALUE             132 intern.h       void rb_define_method_id(VALUE, ID, VALUE (*)(ANYARGS), int);
VALUE             133 intern.h       void rb_frozen_class_p(VALUE);
VALUE             134 intern.h       void rb_undef(VALUE, ID);
VALUE             135 intern.h       void rb_define_protected_method(VALUE, const char*, VALUE (*)(ANYARGS), int);
VALUE             136 intern.h       void rb_define_private_method(VALUE, const char*, VALUE (*)(ANYARGS), int);
VALUE             137 intern.h       void rb_define_singleton_method(VALUE, const char*, VALUE(*)(ANYARGS), int);
VALUE             138 intern.h       VALUE rb_singleton_class(VALUE);
VALUE             140 intern.h       int rb_cmpint(VALUE, VALUE, VALUE);
VALUE             141 intern.h       NORETURN(void rb_cmperr(VALUE, VALUE));
VALUE             144 intern.h       VALUE rb_enumeratorize(VALUE, VALUE, int, VALUE *);
VALUE             152 intern.h       VALUE rb_exc_new(VALUE, const char*, long);
VALUE             153 intern.h       VALUE rb_exc_new2(VALUE, const char*);
VALUE             154 intern.h       VALUE rb_exc_new3(VALUE, VALUE);
VALUE             162 intern.h       void rb_check_frozen(VALUE);
VALUE             200 intern.h       NORETURN(void rb_exc_raise(VALUE));
VALUE             201 intern.h       NORETURN(void rb_exc_fatal(VALUE));
VALUE             202 intern.h       VALUE rb_f_exit(int,VALUE*);
VALUE             203 intern.h       VALUE rb_f_abort(int,VALUE*);
VALUE             204 intern.h       void rb_remove_method(VALUE, const char*);
VALUE             208 intern.h       void rb_define_alloc_func(VALUE, VALUE (*)(VALUE));
VALUE             209 intern.h       void rb_undef_alloc_func(VALUE);
VALUE             211 intern.h       void rb_clear_cache_by_class(VALUE);
VALUE             212 intern.h       void rb_alias(VALUE, ID, ID);
VALUE             213 intern.h       void rb_attr(VALUE,ID,int,int,int);
VALUE             214 intern.h       int rb_method_boundp(VALUE, ID, int);
VALUE             215 intern.h       VALUE rb_dvar_defined(ID);
VALUE             216 intern.h       VALUE rb_dvar_curr(ID);
VALUE             217 intern.h       VALUE rb_dvar_ref(ID);
VALUE             218 intern.h       void rb_dvar_asgn(ID, VALUE);
VALUE             219 intern.h       void rb_dvar_push(ID, VALUE);
VALUE             220 intern.h       VALUE *rb_svar(int);
VALUE             221 intern.h       VALUE rb_eval_cmd(VALUE, VALUE, int);
VALUE             222 intern.h       int rb_obj_respond_to(VALUE, ID, int);
VALUE             223 intern.h       int rb_respond_to(VALUE, ID);
VALUE             225 intern.h       VALUE rb_apply(VALUE, ID, VALUE);
VALUE             228 intern.h       VALUE rb_obj_instance_eval(int, VALUE*, VALUE);
VALUE             229 intern.h       VALUE rb_mod_module_eval(int, VALUE*, VALUE);
VALUE             230 intern.h       void rb_load(VALUE, int);
VALUE             231 intern.h       void rb_load_protect(VALUE, int, int*);
VALUE             235 intern.h       VALUE rb_f_require(VALUE, VALUE);
VALUE             236 intern.h       VALUE rb_require_safe(VALUE, int);
VALUE             237 intern.h       void rb_obj_call_init(VALUE, int, VALUE*);
VALUE             238 intern.h       VALUE rb_class_new_instance(int, VALUE*, VALUE);
VALUE             239 intern.h       VALUE rb_block_proc(void);
VALUE             240 intern.h       VALUE rb_f_lambda(void);
VALUE             241 intern.h       VALUE rb_proc_new(VALUE (*)(ANYARGS/* VALUE yieldarg[, VALUE procarg] */), VALUE);
VALUE             242 intern.h       VALUE rb_proc_call(VALUE, VALUE);
VALUE             243 intern.h       int rb_proc_arity(VALUE);
VALUE             244 intern.h       VALUE rb_obj_method(VALUE, VALUE);
VALUE             245 intern.h       VALUE rb_method_call(int, VALUE*, VALUE);
VALUE             246 intern.h       int rb_mod_method_arity(VALUE, ID);
VALUE             247 intern.h       int rb_obj_method_arity(VALUE, ID);
VALUE             248 intern.h       VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*);
VALUE             249 intern.h       void rb_set_end_proc(void (*)(VALUE), VALUE);
VALUE             267 intern.h       VALUE rb_thread_stop(void);
VALUE             268 intern.h       VALUE rb_thread_wakeup(VALUE);
VALUE             269 intern.h       VALUE rb_thread_run(VALUE);
VALUE             270 intern.h       VALUE rb_thread_kill(VALUE);
VALUE             271 intern.h       VALUE rb_thread_create(VALUE (*)(ANYARGS), void*);
VALUE             273 intern.h       void rb_thread_trap_eval(VALUE, int, int);
VALUE             278 intern.h       VALUE rb_thread_current(void);
VALUE             279 intern.h       VALUE rb_thread_main(void);
VALUE             280 intern.h       VALUE rb_thread_local_aref(VALUE, ID);
VALUE             281 intern.h       VALUE rb_thread_local_aset(VALUE, ID, VALUE);
VALUE             283 intern.h       VALUE rb_exec_recursive(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE);
VALUE             286 intern.h       VALUE rb_file_s_expand_path(int, VALUE *);
VALUE             287 intern.h       VALUE rb_file_expand_path(VALUE, VALUE);
VALUE             288 intern.h       void rb_file_const(const char*, VALUE);
VALUE             289 intern.h       int rb_find_file_ext(VALUE*, const char* const*);
VALUE             290 intern.h       VALUE rb_find_file(VALUE);
VALUE             299 intern.h       int ruby_stack_length(VALUE**);
VALUE             301 intern.h       void rb_gc_mark_locations(VALUE*, VALUE*);
VALUE             304 intern.h       void rb_gc_mark_maybe(VALUE);
VALUE             305 intern.h       void rb_gc_mark(VALUE);
VALUE             306 intern.h       void rb_gc_force_recycle(VALUE);
VALUE             308 intern.h       void rb_gc_copy_finalizer(VALUE,VALUE);
VALUE             311 intern.h       VALUE rb_gc_enable(void);
VALUE             312 intern.h       VALUE rb_gc_disable(void);
VALUE             313 intern.h       VALUE rb_gc_start(void);
VALUE             316 intern.h       void rb_hash_foreach(VALUE, int (*)(ANYARGS), VALUE);
VALUE             317 intern.h       VALUE rb_hash(VALUE);
VALUE             318 intern.h       VALUE rb_hash_new(void);
VALUE             319 intern.h       VALUE rb_hash_freeze(VALUE);
VALUE             320 intern.h       VALUE rb_hash_aref(VALUE, VALUE);
VALUE             321 intern.h       VALUE rb_hash_aset(VALUE, VALUE, VALUE);
VALUE             322 intern.h       VALUE rb_hash_delete_if(VALUE);
VALUE             323 intern.h       VALUE rb_hash_delete(VALUE,VALUE);
VALUE             328 intern.h       RUBY_EXTERN VALUE rb_fs;
VALUE             329 intern.h       RUBY_EXTERN VALUE rb_output_fs;
VALUE             330 intern.h       RUBY_EXTERN VALUE rb_rs;
VALUE             331 intern.h       RUBY_EXTERN VALUE rb_default_rs;
VALUE             332 intern.h       RUBY_EXTERN VALUE rb_output_rs;
VALUE             333 intern.h       VALUE rb_io_write(VALUE, VALUE);
VALUE             334 intern.h       VALUE rb_io_gets(VALUE);
VALUE             335 intern.h       VALUE rb_io_getc(VALUE);
VALUE             336 intern.h       VALUE rb_io_ungetc(VALUE, VALUE);
VALUE             337 intern.h       VALUE rb_io_close(VALUE);
VALUE             338 intern.h       VALUE rb_io_flush(VALUE);
VALUE             339 intern.h       VALUE rb_io_eof(VALUE);
VALUE             340 intern.h       VALUE rb_io_binmode(VALUE);
VALUE             341 intern.h       VALUE rb_io_addstr(VALUE, VALUE);
VALUE             342 intern.h       VALUE rb_io_printf(int, VALUE*, VALUE);
VALUE             343 intern.h       VALUE rb_io_print(int, VALUE*, VALUE);
VALUE             344 intern.h       VALUE rb_io_puts(int, VALUE*, VALUE);
VALUE             345 intern.h       VALUE rb_file_open(const char*, const char*);
VALUE             346 intern.h       VALUE rb_gets(void);
VALUE             350 intern.h       VALUE rb_marshal_dump(VALUE, VALUE);
VALUE             351 intern.h       VALUE rb_marshal_load(VALUE);
VALUE             354 intern.h       VALUE rb_num_coerce_bin(VALUE, VALUE);
VALUE             355 intern.h       VALUE rb_num_coerce_cmp(VALUE, VALUE);
VALUE             356 intern.h       VALUE rb_num_coerce_relop(VALUE, VALUE);
VALUE             357 intern.h       VALUE rb_float_new(double);
VALUE             358 intern.h       VALUE rb_num2fix(VALUE);
VALUE             359 intern.h       VALUE rb_fix2str(VALUE, int);
VALUE             360 intern.h       VALUE rb_dbl_cmp(double, double);
VALUE             362 intern.h       int rb_eql(VALUE, VALUE);
VALUE             363 intern.h       VALUE rb_any_to_s(VALUE);
VALUE             364 intern.h       VALUE rb_inspect(VALUE);
VALUE             365 intern.h       VALUE rb_obj_is_instance_of(VALUE, VALUE);
VALUE             366 intern.h       VALUE rb_obj_is_kind_of(VALUE, VALUE);
VALUE             367 intern.h       VALUE rb_obj_alloc(VALUE);
VALUE             368 intern.h       VALUE rb_obj_clone(VALUE);
VALUE             369 intern.h       VALUE rb_obj_dup(VALUE);
VALUE             370 intern.h       VALUE rb_obj_init_copy(VALUE,VALUE);
VALUE             371 intern.h       VALUE rb_obj_taint(VALUE);
VALUE             372 intern.h       VALUE rb_obj_tainted(VALUE);
VALUE             373 intern.h       VALUE rb_obj_untaint(VALUE);
VALUE             374 intern.h       VALUE rb_obj_freeze(VALUE);
VALUE             375 intern.h       VALUE rb_obj_id(VALUE);
VALUE             376 intern.h       VALUE rb_obj_class(VALUE);
VALUE             377 intern.h       VALUE rb_class_real(VALUE);
VALUE             378 intern.h       VALUE rb_class_inherited_p(VALUE, VALUE);
VALUE             379 intern.h       VALUE rb_convert_type(VALUE,int,const char*,const char*);
VALUE             380 intern.h       VALUE rb_check_convert_type(VALUE,int,const char*,const char*);
VALUE             381 intern.h       VALUE rb_check_to_integer(VALUE, const char *);
VALUE             382 intern.h       VALUE rb_to_int(VALUE);
VALUE             383 intern.h       VALUE rb_Integer(VALUE);
VALUE             384 intern.h       VALUE rb_Float(VALUE);
VALUE             385 intern.h       VALUE rb_String(VALUE);
VALUE             386 intern.h       VALUE rb_Array(VALUE);
VALUE             388 intern.h       double rb_str_to_dbl(VALUE, int);
VALUE             400 intern.h       VALUE rb_backref_get(void);
VALUE             401 intern.h       void rb_backref_set(VALUE);
VALUE             402 intern.h       VALUE rb_lastline_get(void);
VALUE             403 intern.h       void rb_lastline_set(VALUE);
VALUE             404 intern.h       VALUE rb_sym_all_symbols(void);
VALUE             408 intern.h           VALUE *argv;
VALUE             411 intern.h       int rb_proc_exec_n(int, VALUE*, const char*);
VALUE             413 intern.h       VALUE rb_check_argv(int, VALUE*);
VALUE             416 intern.h       VALUE rb_f_exec(int,VALUE*);
VALUE             419 intern.h       int rb_spawn(int, VALUE*);
VALUE             420 intern.h       VALUE rb_proc_times(VALUE);
VALUE             421 intern.h       VALUE rb_detach_process(int);
VALUE             423 intern.h       VALUE rb_range_new(VALUE, VALUE, int);
VALUE             424 intern.h       VALUE rb_range_beg_len(VALUE, long*, long*, long, int);
VALUE             425 intern.h       VALUE rb_length_by_each(VALUE);
VALUE             430 intern.h       VALUE rb_reg_nth_defined(int, VALUE);
VALUE             431 intern.h       VALUE rb_reg_nth_match(int, VALUE);
VALUE             432 intern.h       VALUE rb_reg_last_match(VALUE);
VALUE             433 intern.h       VALUE rb_reg_match_pre(VALUE);
VALUE             434 intern.h       VALUE rb_reg_match_post(VALUE);
VALUE             435 intern.h       VALUE rb_reg_match_last(VALUE);
VALUE             436 intern.h       VALUE rb_reg_new(const char*, long, int);
VALUE             437 intern.h       VALUE rb_reg_compile(const char*, long, int);
VALUE             438 intern.h       VALUE rb_reg_match(VALUE, VALUE);
VALUE             439 intern.h       VALUE rb_reg_match2(VALUE);
VALUE             440 intern.h       int rb_reg_options(VALUE);
VALUE             444 intern.h       RUBY_EXTERN VALUE rb_argv;
VALUE             445 intern.h       RUBY_EXTERN VALUE rb_argv0;
VALUE             455 intern.h       VALUE rb_f_kill(int, VALUE*);
VALUE             469 intern.h       VALUE rb_f_sprintf(int, const VALUE*);
VALUE             470 intern.h       PRINTF_ARGS(VALUE rb_sprintf(const char*, ...), 1, 2);
VALUE             471 intern.h       VALUE rb_vsprintf(const char*, va_list);
VALUE             472 intern.h       VALUE rb_str_format(int, const VALUE *, VALUE);
VALUE             474 intern.h       VALUE rb_str_new(const char*, long);
VALUE             475 intern.h       VALUE rb_str_new2(const char*);
VALUE             476 intern.h       VALUE rb_str_new3(VALUE);
VALUE             477 intern.h       VALUE rb_str_new4(VALUE);
VALUE             478 intern.h       VALUE rb_str_new5(VALUE, const char*, long);
VALUE             479 intern.h       VALUE rb_tainted_str_new(const char*, long);
VALUE             480 intern.h       VALUE rb_tainted_str_new2(const char*);
VALUE             481 intern.h       VALUE rb_str_buf_new(long);
VALUE             482 intern.h       VALUE rb_str_buf_new2(const char*);
VALUE             483 intern.h       VALUE rb_str_buf_append(VALUE, VALUE);
VALUE             484 intern.h       VALUE rb_str_buf_cat(VALUE, const char*, long);
VALUE             485 intern.h       VALUE rb_str_buf_cat2(VALUE, const char*);
VALUE             486 intern.h       VALUE rb_obj_as_string(VALUE);
VALUE             487 intern.h       VALUE rb_check_string_type(VALUE);
VALUE             488 intern.h       VALUE rb_str_dup(VALUE);
VALUE             489 intern.h       VALUE rb_str_locktmp(VALUE);
VALUE             490 intern.h       VALUE rb_str_unlocktmp(VALUE);
VALUE             491 intern.h       VALUE rb_str_dup_frozen(VALUE);
VALUE             492 intern.h       VALUE rb_str_plus(VALUE, VALUE);
VALUE             493 intern.h       VALUE rb_str_times(VALUE, VALUE);
VALUE             494 intern.h       VALUE rb_str_substr(VALUE, long, long);
VALUE             495 intern.h       void rb_str_modify(VALUE);
VALUE             496 intern.h       VALUE rb_str_freeze(VALUE);
VALUE             497 intern.h       VALUE rb_str_resize(VALUE, long);
VALUE             498 intern.h       VALUE rb_str_cat(VALUE, const char*, long);
VALUE             499 intern.h       VALUE rb_str_cat2(VALUE, const char*);
VALUE             500 intern.h       VALUE rb_str_append(VALUE, VALUE);
VALUE             501 intern.h       VALUE rb_str_concat(VALUE, VALUE);
VALUE             502 intern.h       int rb_str_hash(VALUE);
VALUE             503 intern.h       int rb_str_cmp(VALUE, VALUE);
VALUE             504 intern.h       VALUE rb_str_upto(VALUE, VALUE, int);
VALUE             505 intern.h       void rb_str_update(VALUE, long, long, VALUE);
VALUE             506 intern.h       VALUE rb_str_inspect(VALUE);
VALUE             507 intern.h       VALUE rb_str_dump(VALUE);
VALUE             508 intern.h       VALUE rb_str_split(VALUE, const char*);
VALUE             509 intern.h       void rb_str_associate(VALUE, VALUE);
VALUE             510 intern.h       VALUE rb_str_associated(VALUE);
VALUE             511 intern.h       void rb_str_setter(VALUE, ID, VALUE*);
VALUE             512 intern.h       VALUE rb_str_intern(VALUE);
VALUE             514 intern.h       VALUE rb_struct_new(VALUE, ...);
VALUE             515 intern.h       VALUE rb_struct_define(const char*, ...);
VALUE             516 intern.h       VALUE rb_struct_alloc(VALUE, VALUE);
VALUE             517 intern.h       VALUE rb_struct_aref(VALUE, VALUE);
VALUE             518 intern.h       VALUE rb_struct_aset(VALUE, VALUE, VALUE);
VALUE             519 intern.h       VALUE rb_struct_getmember(VALUE, ID);
VALUE             520 intern.h       VALUE rb_struct_iv_get(VALUE, const char*);
VALUE             521 intern.h       VALUE rb_struct_s_members(VALUE);
VALUE             522 intern.h       VALUE rb_struct_members(VALUE);
VALUE             524 intern.h       VALUE rb_time_new(time_t, time_t);
VALUE             526 intern.h       VALUE rb_mod_name(VALUE);
VALUE             527 intern.h       VALUE rb_class_path(VALUE);
VALUE             528 intern.h       void rb_set_class_path(VALUE, VALUE, const char*);
VALUE             529 intern.h       VALUE rb_path2class(const char*);
VALUE             530 intern.h       void rb_name_class(VALUE, ID);
VALUE             531 intern.h       VALUE rb_class_name(VALUE);
VALUE             532 intern.h       void rb_autoload(VALUE, ID, const char*);
VALUE             533 intern.h       VALUE rb_autoload_load(VALUE, ID);
VALUE             534 intern.h       VALUE rb_autoload_p(VALUE, ID);
VALUE             536 intern.h       VALUE rb_f_trace_var(int, VALUE*);
VALUE             537 intern.h       VALUE rb_f_untrace_var(int, VALUE*);
VALUE             538 intern.h       VALUE rb_f_global_variables(void);
VALUE             540 intern.h       struct st_table* rb_generic_ivar_table(VALUE);
VALUE             541 intern.h       void rb_copy_generic_ivar(VALUE,VALUE);
VALUE             542 intern.h       void rb_mark_generic_ivar(VALUE);
VALUE             544 intern.h       void rb_free_generic_ivar(VALUE);
VALUE             545 intern.h       VALUE rb_ivar_get(VALUE, ID);
VALUE             546 intern.h       VALUE rb_ivar_set(VALUE, ID, VALUE);
VALUE             547 intern.h       VALUE rb_ivar_defined(VALUE, ID);
VALUE             548 intern.h       VALUE rb_iv_set(VALUE, const char*, VALUE);
VALUE             549 intern.h       VALUE rb_iv_get(VALUE, const char*);
VALUE             550 intern.h       VALUE rb_attr_get(VALUE, ID);
VALUE             551 intern.h       VALUE rb_obj_instance_variables(VALUE);
VALUE             552 intern.h       VALUE rb_obj_remove_instance_variable(VALUE, VALUE);
VALUE             553 intern.h       void *rb_mod_const_at(VALUE, void*);
VALUE             554 intern.h       void *rb_mod_const_of(VALUE, void*);
VALUE             555 intern.h       VALUE rb_const_list(void*);
VALUE             556 intern.h       VALUE rb_mod_constants(VALUE);
VALUE             557 intern.h       VALUE rb_mod_remove_const(VALUE, VALUE);
VALUE             558 intern.h       int rb_const_defined(VALUE, ID);
VALUE             559 intern.h       int rb_const_defined_at(VALUE, ID);
VALUE             560 intern.h       int rb_const_defined_from(VALUE, ID);
VALUE             561 intern.h       VALUE rb_const_get(VALUE, ID);
VALUE             562 intern.h       VALUE rb_const_get_at(VALUE, ID);
VALUE             563 intern.h       VALUE rb_const_get_from(VALUE, ID);
VALUE             564 intern.h       void rb_const_set(VALUE, ID, VALUE);
VALUE             565 intern.h       VALUE rb_mod_constants(VALUE);
VALUE             566 intern.h       VALUE rb_mod_const_missing(VALUE,VALUE);
VALUE             567 intern.h       VALUE rb_cvar_defined(VALUE, ID);
VALUE             569 intern.h       void rb_cvar_set(VALUE, ID, VALUE, int);
VALUE             570 intern.h       VALUE rb_cvar_get(VALUE, ID);
VALUE             571 intern.h       void rb_cv_set(VALUE, const char*, VALUE);
VALUE             572 intern.h       VALUE rb_cv_get(VALUE, const char*);
VALUE             573 intern.h       void rb_define_class_variable(VALUE, const char*, VALUE);
VALUE             574 intern.h       VALUE rb_mod_class_variables(VALUE);
VALUE             575 intern.h       VALUE rb_mod_remove_cvar(VALUE, VALUE);
VALUE             108 io.c           VALUE rb_cIO;
VALUE             109 io.c           VALUE rb_eEOFError;
VALUE             110 io.c           VALUE rb_eIOError;
VALUE             112 io.c           VALUE rb_stdin, rb_stdout, rb_stderr;
VALUE             113 io.c           VALUE rb_deferr;		/* rescue VIM plugin */
VALUE             114 io.c           static VALUE orig_stdout, orig_stderr;
VALUE             116 io.c           VALUE rb_output_fs;
VALUE             117 io.c           VALUE rb_rs;
VALUE             118 io.c           VALUE rb_output_rs;
VALUE             119 io.c           VALUE rb_default_rs;
VALUE             121 io.c           static VALUE argf;
VALUE             127 io.c           struct timeval rb_time_interval(VALUE);
VALUE             129 io.c           static VALUE filename, current_file;
VALUE             132 io.c           static VALUE lineno = INT2FIX(0);
VALUE             205 io.c           VALUE
VALUE             206 io.c           rb_io_taint_check(VALUE io)
VALUE             233 io.c           static VALUE
VALUE             234 io.c           rb_io_get_io(VALUE io)
VALUE             239 io.c           static VALUE
VALUE             240 io.c           rb_io_check_io(VALUE io)
VALUE             377 io.c           static VALUE
VALUE             378 io.c           io_alloc(VALUE klass)
VALUE             385 io.c               return (VALUE)io;
VALUE             457 io.c           static VALUE
VALUE             459 io.c               VALUE p;
VALUE             487 io.c           	rb_ensure(wait_readable, (VALUE)&rfds,
VALUE             488 io.c           		  (VALUE (*)(VALUE))rb_fd_term, (VALUE)&rfds);
VALUE             500 io.c           static VALUE
VALUE             502 io.c               VALUE p;
VALUE             530 io.c           	rb_ensure(wait_writable, (VALUE)&wfds,
VALUE             531 io.c           		  (VALUE (*)(VALUE))rb_fd_term, (VALUE)&wfds);
VALUE             544 io.c           io_fwrite(VALUE str, OpenFile *fptr)
VALUE             643 io.c           static VALUE
VALUE             644 io.c           io_write(VALUE io, VALUE str)
VALUE             648 io.c               VALUE tmp;
VALUE             669 io.c           VALUE
VALUE             670 io.c           rb_io_write(VALUE io, VALUE str)
VALUE             691 io.c           VALUE
VALUE             692 io.c           rb_io_addstr(VALUE io, VALUE str)
VALUE             714 io.c           VALUE
VALUE             715 io.c           rb_io_flush(VALUE io)
VALUE             748 io.c           static VALUE
VALUE             749 io.c           rb_io_tell(VALUE io)
VALUE             760 io.c           static VALUE
VALUE             761 io.c           rb_io_seek(VALUE io, VALUE offset, int whence)
VALUE             795 io.c           static VALUE
VALUE             796 io.c           rb_io_seek_m(int argc, VALUE *argv, VALUE io)
VALUE             798 io.c               VALUE offset, ptrname;
VALUE             819 io.c           static VALUE
VALUE             820 io.c           rb_io_set_pos(VALUE io, VALUE offset)
VALUE             847 io.c           static VALUE
VALUE             848 io.c           rb_io_rewind(VALUE io)
VALUE             931 io.c           VALUE
VALUE             932 io.c           rb_io_eof(VALUE io)
VALUE             964 io.c           static VALUE
VALUE             965 io.c           rb_io_sync(VALUE io)
VALUE             988 io.c           static VALUE
VALUE             989 io.c           rb_io_set_sync(VALUE io, VALUE mode)
VALUE            1015 io.c           static VALUE
VALUE            1016 io.c           rb_io_fsync(VALUE io)
VALUE            1045 io.c           static VALUE
VALUE            1046 io.c           rb_io_fileno(VALUE io)
VALUE            1077 io.c           static VALUE
VALUE            1078 io.c           rb_io_pid(VALUE io)
VALUE            1096 io.c           static VALUE
VALUE            1097 io.c           rb_io_inspect(VALUE obj)
VALUE            1118 io.c           static VALUE
VALUE            1119 io.c           rb_io_to_io(VALUE io)
VALUE            1140 io.c           io_fread(VALUE str, long offset, OpenFile *fptr)
VALUE            1169 io.c               VALUE str;
VALUE            1211 io.c           static VALUE
VALUE            1212 io.c           read_all(OpenFile *fptr, long siz, VALUE str)
VALUE            1241 io.c           static VALUE
VALUE            1242 io.c           io_getpartial(int argc, VALUE *argv, VALUE io)
VALUE            1245 io.c               VALUE length, str;
VALUE            1349 io.c           static VALUE
VALUE            1350 io.c           io_readpartial(int argc, VALUE *argv, VALUE io)
VALUE            1352 io.c               VALUE ret;
VALUE            1383 io.c           static VALUE
VALUE            1384 io.c           io_read(int argc, VALUE *argv, VALUE io)
VALUE            1388 io.c               VALUE length, str;
VALUE            1435 io.c           appendline(OpenFile *fptr, int delim, VALUE *strp)
VALUE            1437 io.c               VALUE str = *strp;
VALUE            1523 io.c           static VALUE
VALUE            1526 io.c               VALUE str = Qnil;
VALUE            1541 io.c           rscheck(char *rsptr, long rslen, VALUE rs)
VALUE            1548 io.c           static VALUE
VALUE            1549 io.c           rb_io_getline(VALUE rs, VALUE io)
VALUE            1551 io.c               VALUE str = Qnil;
VALUE            1609 io.c           VALUE
VALUE            1610 io.c           rb_io_gets(VALUE io)
VALUE            1636 io.c           static VALUE
VALUE            1637 io.c           rb_io_gets_m(int argc, VALUE *argv, VALUE io)
VALUE            1639 io.c               VALUE rs, str;
VALUE            1673 io.c           static VALUE
VALUE            1674 io.c           rb_io_lineno(VALUE io)
VALUE            1700 io.c           static VALUE
VALUE            1701 io.c           rb_io_set_lineno(VALUE io, VALUE lineno)
VALUE            1712 io.c           lineno_setter(VALUE val, ID id, VALUE *var)
VALUE            1718 io.c           static VALUE
VALUE            1719 io.c           argf_set_lineno(VALUE argf, VALUE val)
VALUE            1726 io.c           static VALUE
VALUE            1740 io.c           static VALUE
VALUE            1741 io.c           rb_io_readline(int argc, VALUE *argv, VALUE io)
VALUE            1743 io.c               VALUE line = rb_io_gets_m(argc, argv, io);
VALUE            1766 io.c           static VALUE
VALUE            1767 io.c           rb_io_readlines(int argc, VALUE *argv, VALUE io)
VALUE            1769 io.c               VALUE line, ary;
VALUE            1770 io.c               VALUE rs;
VALUE            1806 io.c           static VALUE
VALUE            1807 io.c           rb_io_each_line(int argc, VALUE *argv, VALUE io)
VALUE            1809 io.c               VALUE str;
VALUE            1810 io.c               VALUE rs;
VALUE            1840 io.c           static VALUE
VALUE            1841 io.c           rb_io_each_byte(VALUE io)
VALUE            1873 io.c           VALUE
VALUE            1874 io.c           rb_io_getc(VALUE io)
VALUE            1914 io.c           static VALUE
VALUE            1915 io.c           rb_io_readchar(VALUE io)
VALUE            1917 io.c               VALUE c = rb_io_getc(io);
VALUE            1941 io.c           VALUE
VALUE            1942 io.c           rb_io_ungetc(VALUE io, VALUE c)
VALUE            1968 io.c           static VALUE
VALUE            1969 io.c           rb_io_isatty(VALUE io)
VALUE            2046 io.c           VALUE
VALUE            2047 io.c           rb_io_close(VALUE io)
VALUE            2079 io.c           static VALUE
VALUE            2080 io.c           rb_io_close_m(VALUE io)
VALUE            2090 io.c           static VALUE
VALUE            2091 io.c           io_close(VALUE io)
VALUE            2119 io.c           static VALUE
VALUE            2120 io.c           rb_io_closed(VALUE io)
VALUE            2147 io.c           static VALUE
VALUE            2148 io.c           rb_io_close_read(VALUE io)
VALUE            2192 io.c           static VALUE
VALUE            2193 io.c           rb_io_close_write(VALUE io)
VALUE            2232 io.c           static VALUE
VALUE            2233 io.c           rb_io_sysseek(int argc, VALUE *argv, VALUE io)
VALUE            2235 io.c               VALUE offset, ptrname;
VALUE            2270 io.c           static VALUE
VALUE            2271 io.c           rb_io_syswrite(VALUE io, VALUE str)
VALUE            2314 io.c           static VALUE
VALUE            2315 io.c           rb_io_sysread(int argc, VALUE *argv, VALUE io)
VALUE            2317 io.c               VALUE len, str;
VALUE            2374 io.c           VALUE
VALUE            2375 io.c           rb_io_binmode(VALUE io)
VALUE            2646 io.c           static VALUE
VALUE            2647 io.c           rb_file_open_internal(VALUE io, const char *fname, const char *mode)
VALUE            2660 io.c           VALUE
VALUE            2666 io.c           static VALUE
VALUE            2667 io.c           rb_file_sysopen_internal(VALUE io, const char *fname, int flags, int mode)
VALUE            2681 io.c           VALUE
VALUE            2744 io.c               extern VALUE rb_last_status;
VALUE            2825 io.c           static VALUE
VALUE            2826 io.c           pipe_open(int argc, VALUE *argv, char *mode)
VALUE            2831 io.c               VALUE port, prog;
VALUE            3012 io.c           static VALUE
VALUE            3013 io.c           rb_io_s_popen(int argc, VALUE *argv, VALUE klass)
VALUE            3016 io.c               VALUE pname, pmode, port, tmp;
VALUE            3029 io.c           	VALUE *argv = ALLOCA_N(VALUE, RARRAY(tmp)->len);
VALUE            3031 io.c           	MEMCPY(argv, RARRAY(tmp)->ptr, VALUE, RARRAY(tmp)->len);
VALUE            3056 io.c           static VALUE
VALUE            3057 io.c           rb_open_file(int argc, VALUE *argv, VALUE io)
VALUE            3059 io.c               VALUE fname, vmode, perm;
VALUE            3098 io.c           static VALUE
VALUE            3099 io.c           rb_io_s_open(int argc, VALUE *argv, VALUE klass)
VALUE            3101 io.c               VALUE io = rb_class_new_instance(argc, argv, klass);
VALUE            3121 io.c           static VALUE
VALUE            3122 io.c           rb_io_s_sysopen(int argc, VALUE *argv)
VALUE            3124 io.c               VALUE fname, vmode, perm;
VALUE            3228 io.c           static VALUE
VALUE            3229 io.c           rb_f_open(int argc, VALUE *argv)
VALUE            3235 io.c           	    VALUE io = rb_funcall2(argv[0], to_open, argc-1, argv+1);
VALUE            3243 io.c           	    VALUE tmp = rb_check_string_type(argv[0]);
VALUE            3257 io.c           static VALUE
VALUE            3261 io.c           	VALUE cmd = rb_str_new2(fname+1);
VALUE            3269 io.c           static VALUE
VALUE            3270 io.c           io_reopen(VALUE io, VALUE nfile)
VALUE            3371 io.c           static VALUE
VALUE            3372 io.c           rb_io_reopen(int argc, VALUE *argv, VALUE file)
VALUE            3374 io.c               VALUE fname, nmode;
VALUE            3380 io.c           	VALUE tmp = rb_io_check_io(fname);
VALUE            3440 io.c           static VALUE
VALUE            3441 io.c           rb_io_init_copy(VALUE dest, VALUE io)
VALUE            3479 io.c           VALUE
VALUE            3480 io.c           rb_io_printf(int argc, VALUE *argv, VALUE out)
VALUE            3497 io.c           static VALUE
VALUE            3498 io.c           rb_f_printf(int argc, VALUE *argv)
VALUE            3500 io.c               VALUE out;
VALUE            3536 io.c           VALUE
VALUE            3537 io.c           rb_io_print(int argc, VALUE *argv, VALUE out)
VALUE            3540 io.c               VALUE line;
VALUE            3591 io.c           static VALUE
VALUE            3592 io.c           rb_f_print(int argc, VALUE *argv)
VALUE            3614 io.c           static VALUE
VALUE            3615 io.c           rb_io_putc(VALUE io, VALUE ch)
VALUE            3632 io.c           static VALUE
VALUE            3633 io.c           rb_f_putc(VALUE recv, VALUE ch)
VALUE            3638 io.c           static VALUE
VALUE            3639 io.c           io_puts_ary(VALUE ary, VALUE out, int recur)
VALUE            3641 io.c               VALUE tmp;
VALUE            3674 io.c           VALUE
VALUE            3675 io.c           rb_io_puts(int argc, VALUE *argv, VALUE out)
VALUE            3678 io.c               VALUE line;
VALUE            3716 io.c           static VALUE
VALUE            3717 io.c           rb_f_puts(int argc, VALUE *argv)
VALUE            3724 io.c           rb_p(VALUE obj)			/* for debug print within C code */
VALUE            3747 io.c           static VALUE
VALUE            3748 io.c           rb_f_p(int argc, VALUE *argv)
VALUE            3784 io.c           static VALUE
VALUE            3785 io.c           rb_obj_display(int argc, VALUE *argv, VALUE self)
VALUE            3787 io.c               VALUE out;
VALUE            3811 io.c           must_respond_to(ID mid, VALUE val, ID id)
VALUE            3821 io.c           stdout_setter(VALUE val, ID id, VALUE *variable)
VALUE            3828 io.c           defout_setter(VALUE val, ID id, VALUE *variable)
VALUE            3835 io.c           deferr_setter(VALUE val, ID id, VALUE *variable)
VALUE            3841 io.c           static VALUE
VALUE            3842 io.c           prep_io(int fd, int mode, VALUE klass, const char *path)
VALUE            3845 io.c               VALUE io = io_alloc(klass);
VALUE            3862 io.c           static VALUE
VALUE            3863 io.c           prep_stdio(FILE *f, int mode, VALUE klass, const char *path)
VALUE            3866 io.c               VALUE io = prep_io(fileno(f), mode|FMODE_PREP, klass, path);
VALUE            3903 io.c           static VALUE
VALUE            3904 io.c           rb_io_initialize(int argc, VALUE *argv, VALUE io)
VALUE            3906 io.c               VALUE fnum, mode, orig;
VALUE            3943 io.c           	    VALUE s = rb_inspect(orig);
VALUE            3986 io.c           static VALUE
VALUE            3987 io.c           rb_file_initialize(int argc, VALUE *argv, VALUE io)
VALUE            3993 io.c           	VALUE fd = rb_check_convert_type(argv[0], T_FIXNUM, "Fixnum", "to_int");
VALUE            4023 io.c           static VALUE
VALUE            4024 io.c           rb_io_s_new(int argc, VALUE *argv, VALUE klass)
VALUE            4044 io.c           static VALUE
VALUE            4045 io.c           rb_io_s_for_fd(int argc, VALUE *argv, VALUE klass)
VALUE            4047 io.c               VALUE io = rb_obj_alloc(klass);
VALUE            4054 io.c           static VALUE
VALUE            4055 io.c           argf_forward(int argc, VALUE *argv)
VALUE            4070 io.c           argf_close(VALUE file)
VALUE            4081 io.c               extern VALUE rb_argv;
VALUE            4121 io.c           		    VALUE str;
VALUE            4196 io.c           static VALUE
VALUE            4197 io.c           argf_getline(int argc, VALUE *argv)
VALUE            4199 io.c               VALUE line;
VALUE            4207 io.c           	VALUE rs;
VALUE            4259 io.c           static VALUE
VALUE            4260 io.c           rb_f_gets(int argc, VALUE *argv)
VALUE            4262 io.c               VALUE line;
VALUE            4275 io.c           VALUE
VALUE            4278 io.c               VALUE line;
VALUE            4309 io.c           static VALUE
VALUE            4310 io.c           rb_f_readline(int argc, VALUE *argv)
VALUE            4312 io.c               VALUE line;
VALUE            4327 io.c           static VALUE
VALUE            4345 io.c           static VALUE
VALUE            4346 io.c           rb_f_readlines(int argc, VALUE *argv)
VALUE            4348 io.c               VALUE line, ary;
VALUE            4373 io.c           static VALUE
VALUE            4374 io.c           rb_f_backquote(VALUE obj, VALUE str)
VALUE            4376 io.c               volatile VALUE port;
VALUE            4377 io.c               VALUE result;
VALUE            4395 io.c           static VALUE
VALUE            4396 io.c           select_internal(VALUE read, VALUE write, VALUE except, struct timeval *tp, rb_fdset_t *fds)
VALUE            4398 io.c               VALUE res, list;
VALUE            4502 io.c               VALUE read, write, except;
VALUE            4508 io.c           static VALUE
VALUE            4510 io.c               VALUE arg;
VALUE            4517 io.c           static VALUE
VALUE            4519 io.c               VALUE arg;
VALUE            4540 io.c           static VALUE
VALUE            4541 io.c           rb_f_select(int argc, VALUE *argv, VALUE obj)
VALUE            4543 io.c               VALUE timeout;
VALUE            4561 io.c               return rb_ensure(select_call, (VALUE)&args, select_end, (VALUE)&args);
VALUE            4595 io.c           static VALUE
VALUE            4596 io.c           rb_io_ctl(VALUE io, VALUE req, VALUE arg, int io_p)
VALUE            4617 io.c           	VALUE tmp = rb_check_string_type(arg);
VALUE            4683 io.c           static VALUE
VALUE            4684 io.c           rb_io_ioctl(int argc, VALUE *argv, VALUE io)
VALUE            4686 io.c               VALUE req, arg;
VALUE            4705 io.c           static VALUE
VALUE            4706 io.c           rb_io_fcntl(int argc, VALUE *argv, VALUE io)
VALUE            4709 io.c               VALUE req, arg;
VALUE            4738 io.c           static VALUE
VALUE            4739 io.c           rb_f_syscall(int argc, VALUE *argv)
VALUE            4761 io.c           	VALUE v = rb_check_string_type(*argv);
VALUE            4837 io.c           static VALUE
VALUE            4838 io.c           io_new_instance(VALUE args)
VALUE            4840 io.c               return rb_class_new_instance(2, (VALUE*)args+1, *(VALUE*)args);
VALUE            4879 io.c           static VALUE
VALUE            4880 io.c           rb_io_s_pipe(VALUE klass)
VALUE            4884 io.c               VALUE r, w, args[3];
VALUE            4892 io.c               r = rb_protect(io_new_instance, (VALUE)args, &state);
VALUE            4900 io.c               w = rb_protect(io_new_instance, (VALUE)args, &state);
VALUE            4917 io.c               VALUE sep;
VALUE            4918 io.c               VALUE io;
VALUE            4921 io.c           static VALUE
VALUE            4924 io.c               VALUE str;
VALUE            4949 io.c           static VALUE
VALUE            4950 io.c           rb_io_s_foreach(int argc, VALUE *argv, VALUE self)
VALUE            4952 io.c               VALUE fname;
VALUE            4967 io.c               return rb_ensure(io_s_foreach, (VALUE)&arg, rb_io_close, arg.io);
VALUE            4970 io.c           static VALUE
VALUE            4989 io.c           static VALUE
VALUE            4990 io.c           rb_io_s_readlines(int argc, VALUE *argv, VALUE io)
VALUE            4992 io.c               VALUE fname;
VALUE            5000 io.c               return rb_ensure(io_s_readlines, (VALUE)&arg, rb_io_close, arg.io);
VALUE            5003 io.c           static VALUE
VALUE            5022 io.c           static VALUE
VALUE            5023 io.c           rb_io_s_read(int argc, VALUE *argv, VALUE io)
VALUE            5025 io.c               VALUE fname, offset;
VALUE            5036 io.c               return rb_ensure(io_s_read, (VALUE)&arg, rb_io_close, arg.io);
VALUE            5039 io.c           static VALUE
VALUE            5049 io.c           static VALUE
VALUE            5050 io.c           argf_seek_m(int argc, VALUE *argv, VALUE self)
VALUE            5059 io.c           static VALUE
VALUE            5060 io.c           argf_set_pos(VALUE self, VALUE offset)
VALUE            5069 io.c           static VALUE
VALUE            5079 io.c           static VALUE
VALUE            5089 io.c           static VALUE
VALUE            5097 io.c           static VALUE
VALUE            5110 io.c           static VALUE
VALUE            5111 io.c           argf_read(int argc, VALUE *argv)
VALUE            5113 io.c               VALUE tmp, str, length;
VALUE            5155 io.c           static VALUE
VALUE            5156 io.c           argf_readpartial_rescue(VALUE dummy)
VALUE            5161 io.c           static VALUE
VALUE            5162 io.c           argf_readpartial(int argc, VALUE *argv)
VALUE            5164 io.c               VALUE tmp, str, length;
VALUE            5177 io.c                   tmp = rb_rescue2(argf_forward, (VALUE)argv,
VALUE            5178 io.c                                    argf_readpartial_rescue, (VALUE)Qnil,
VALUE            5179 io.c                                    rb_eEOFError, (VALUE)0);
VALUE            5199 io.c           static VALUE
VALUE            5202 io.c               VALUE byte;
VALUE            5221 io.c           static VALUE
VALUE            5224 io.c               VALUE c;
VALUE            5234 io.c           static VALUE
VALUE            5235 io.c           argf_each_line(int argc, VALUE *argv, VALUE self)
VALUE            5237 io.c               VALUE str;
VALUE            5254 io.c           static VALUE
VALUE            5255 io.c           argf_each_byte(VALUE self)
VALUE            5257 io.c               VALUE byte;
VALUE            5266 io.c           static VALUE
VALUE            5273 io.c           static VALUE
VALUE            5280 io.c           static VALUE
VALUE            5290 io.c           static VALUE
VALUE            5300 io.c           static VALUE
VALUE            5312 io.c           static VALUE
VALUE            5320 io.c           static VALUE
VALUE            5326 io.c           static VALUE
VALUE            5334 io.c           opt_i_set(VALUE val)
VALUE              86 marshal.c          VALUE obj;
VALUE              87 marshal.c          VALUE str, dest;
VALUE              94 marshal.c          VALUE obj;
VALUE              99 marshal.c      static VALUE
VALUE             100 marshal.c      class2path(VALUE klass)
VALUE             102 marshal.c          VALUE path = rb_class_path(klass);
VALUE             121 marshal.c          VALUE buf = arg->str;
VALUE             330 marshal.c      static void w_object(VALUE,struct dump_arg*,int);
VALUE             333 marshal.c      hash_each(VALUE key, VALUE value, struct dump_call_arg *arg)
VALUE             341 marshal.c      w_extended(VALUE klass, struct dump_arg *arg, int check)
VALUE             361 marshal.c      w_class(char type, VALUE obj, struct dump_arg *arg, int check)
VALUE             365 marshal.c          VALUE klass = CLASS_OF(obj);
VALUE             373 marshal.c      w_uclass(VALUE obj, VALUE base_klass, struct dump_arg *arg)
VALUE             375 marshal.c          VALUE klass = CLASS_OF(obj);
VALUE             386 marshal.c      w_obj_each(ID id, VALUE value, struct dump_call_arg *arg)
VALUE             406 marshal.c      w_object(VALUE obj, struct dump_arg *arg, int limit)
VALUE             460 marshal.c      	    VALUE v;
VALUE             469 marshal.c      	    VALUE v;
VALUE             493 marshal.c      		VALUE path = class2path(obj);
VALUE             501 marshal.c      		VALUE path = class2path(obj);
VALUE             556 marshal.c      		VALUE *ptr = RARRAY(obj)->ptr;
VALUE             589 marshal.c      		VALUE mem;
VALUE             608 marshal.c      		VALUE v;
VALUE             632 marshal.c      static VALUE
VALUE             643 marshal.c      static VALUE
VALUE             680 marshal.c      static VALUE
VALUE             681 marshal.c      marshal_dump(int argc, VALUE *argv)
VALUE             683 marshal.c          VALUE obj, port, a1, a2;
VALUE             727 marshal.c          rb_ensure(dump, (VALUE)&c_arg, dump_ensure, (VALUE)&arg);
VALUE             733 marshal.c          VALUE src;
VALUE             736 marshal.c          VALUE data;
VALUE             737 marshal.c          VALUE proc;
VALUE             741 marshal.c      static VALUE r_object(struct load_arg *arg);
VALUE             757 marshal.c      	VALUE src = arg->src;
VALUE             758 marshal.c      	VALUE v = rb_funcall2(src, s_getc, 0, 0);
VALUE             815 marshal.c      static VALUE
VALUE             818 marshal.c          VALUE str;
VALUE             832 marshal.c      	VALUE src = arg->src;
VALUE             833 marshal.c      	VALUE n = LONG2NUM(len);
VALUE             881 marshal.c      static VALUE
VALUE             887 marshal.c      static VALUE
VALUE             888 marshal.c      r_entry(VALUE v, struct load_arg *arg)
VALUE             896 marshal.c      r_ivar(VALUE obj, struct load_arg *arg)
VALUE             904 marshal.c      	    VALUE val = r_object(arg);
VALUE             910 marshal.c      static VALUE
VALUE             913 marshal.c          VALUE v = rb_path2class(path);
VALUE             921 marshal.c      static VALUE
VALUE             924 marshal.c          VALUE v = rb_path2class(path);
VALUE             932 marshal.c      static VALUE
VALUE             933 marshal.c      r_object0(struct load_arg *arg, VALUE proc, int *ivp, VALUE extmod)
VALUE             935 marshal.c          VALUE v = Qnil;
VALUE             959 marshal.c      	    VALUE m = path2module(r_unique(arg));
VALUE             974 marshal.c      	    VALUE c = path2class(r_unique(arg));
VALUE             985 marshal.c      		VALUE tmp = rb_obj_alloc(c);
VALUE            1015 marshal.c      	    VALUE str = r_bytes(arg);
VALUE            1041 marshal.c      	    volatile VALUE data;
VALUE            1077 marshal.c      	    v = rb_big_norm((VALUE)big);
VALUE            1088 marshal.c      	    volatile VALUE str = r_bytes(arg);
VALUE            1114 marshal.c      		VALUE key = r_object(arg);
VALUE            1115 marshal.c      		VALUE value = r_object(arg);
VALUE            1126 marshal.c      	    VALUE klass, mem, values;
VALUE            1160 marshal.c      	    VALUE klass = path2class(r_unique(arg));
VALUE            1161 marshal.c      	    VALUE data;
VALUE            1179 marshal.c      	    VALUE klass = path2class(r_unique(arg));
VALUE            1180 marshal.c      	    VALUE data;
VALUE            1185 marshal.c                          VALUE m = rb_ary_pop(extmod);
VALUE            1201 marshal.c      	    VALUE klass = path2class(r_unique(arg));
VALUE            1214 marshal.c                 VALUE klass = path2class(r_unique(arg));
VALUE            1241 marshal.c      	    volatile VALUE str = r_bytes(arg);
VALUE            1250 marshal.c      	    volatile VALUE str = r_bytes(arg);
VALUE            1259 marshal.c      	    volatile VALUE str = r_bytes(arg);
VALUE            1283 marshal.c      static VALUE
VALUE            1289 marshal.c      static VALUE
VALUE            1295 marshal.c      static VALUE
VALUE            1313 marshal.c      static VALUE
VALUE            1314 marshal.c      marshal_load(int argc, VALUE *argv)
VALUE            1316 marshal.c          VALUE port, proc;
VALUE            1318 marshal.c          VALUE v;
VALUE            1355 marshal.c          v = rb_ensure(load, (VALUE)&arg, load_ensure, (VALUE)&arg);
VALUE            1396 marshal.c          VALUE rb_mMarshal = rb_define_module("Marshal");
VALUE            1418 marshal.c      VALUE
VALUE            1419 marshal.c      rb_marshal_dump(VALUE obj, VALUE port)
VALUE            1422 marshal.c          VALUE argv[2];
VALUE            1430 marshal.c      VALUE
VALUE            1431 marshal.c      rb_marshal_load(VALUE port)
VALUE              17 math.c         VALUE rb_mMath;
VALUE              35 math.c         static VALUE
VALUE              36 math.c         math_atan2(VALUE obj, VALUE y, VALUE x)
VALUE              52 math.c         static VALUE
VALUE              53 math.c         math_cos(VALUE obj, VALUE x)
VALUE              67 math.c         static VALUE
VALUE              68 math.c         math_sin(VALUE obj, VALUE x)
VALUE              83 math.c         static VALUE
VALUE              84 math.c         math_tan(VALUE obj, VALUE x)
VALUE              98 math.c         static VALUE
VALUE              99 math.c         math_acos(VALUE obj, VALUE x)
VALUE             119 math.c         static VALUE
VALUE             120 math.c         math_asin(VALUE obj, VALUE x)
VALUE             140 math.c         static VALUE
VALUE             141 math.c         math_atan(VALUE obj, VALUE x)
VALUE             163 math.c         static VALUE
VALUE             164 math.c         math_cosh(VALUE obj, VALUE x)
VALUE             188 math.c         static VALUE
VALUE             189 math.c         math_sinh(VALUE obj, VALUE x)
VALUE             212 math.c         static VALUE
VALUE             213 math.c         math_tanh(VALUE obj, VALUE x)
VALUE             226 math.c         static VALUE
VALUE             227 math.c         math_acosh(VALUE obj, VALUE x)
VALUE             247 math.c         static VALUE
VALUE             248 math.c         math_asinh(VALUE obj, VALUE x)
VALUE             261 math.c         static VALUE
VALUE             262 math.c         math_atanh(VALUE obj, VALUE x)
VALUE             282 math.c         static VALUE
VALUE             283 math.c         math_exp(VALUE obj, VALUE x)
VALUE             305 math.c         static VALUE
VALUE             306 math.c         math_log(VALUE obj, VALUE x)
VALUE             326 math.c         static VALUE
VALUE             327 math.c         math_log10(VALUE obj, VALUE x)
VALUE             348 math.c         static VALUE
VALUE             349 math.c         math_sqrt(VALUE obj, VALUE x)
VALUE             374 math.c         static VALUE
VALUE             375 math.c         math_frexp(VALUE obj, VALUE x)
VALUE             396 math.c         static VALUE
VALUE             397 math.c         math_ldexp(VALUE obj, VALUE x, VALUE n)
VALUE             413 math.c         static VALUE
VALUE             414 math.c         math_hypot(VALUE obj, VALUE x, VALUE y)
VALUE             427 math.c         static VALUE
VALUE             428 math.c         math_erf(VALUE obj, VALUE x)
VALUE             441 math.c         static VALUE
VALUE             442 math.c         math_erfc(VALUE obj, VALUE x)
VALUE             136 node.h         	VALUE value;
VALUE             137 node.h         	VALUE (*cfunc)(ANYARGS);
VALUE             144 node.h         	VALUE value;
VALUE             152 node.h         	VALUE value;
VALUE             239 node.h         #define NEW_NODE(t,a0,a1,a2) rb_node_newnode((t),(VALUE)(a0),(VALUE)(a1),(VALUE)(a2))
VALUE             353 node.h         VALUE rb_parser_new(void);
VALUE             354 node.h         VALUE rb_parser_end_seen_p(VALUE);
VALUE             356 node.h         NODE *rb_parser_compile_cstr(VALUE, const char*, const char*, int, int);
VALUE             357 node.h         NODE *rb_parser_compile_string(VALUE, const char*, VALUE, int);
VALUE             358 node.h         NODE *rb_parser_compile_file(VALUE, const char*, VALUE, int);
VALUE             361 node.h         NODE *rb_compile_string(const char*, VALUE, int);
VALUE             362 node.h         NODE *rb_compile_file(const char*, VALUE, int);
VALUE             364 node.h         void rb_add_method(VALUE, ID, NODE *, int);
VALUE             365 node.h         NODE *rb_node_newnode(enum node_type,VALUE,VALUE,VALUE);
VALUE             367 node.h         NODE* rb_method_node(VALUE klass, ID id);
VALUE             371 node.h         VALUE rb_gvar_get(struct global_entry *);
VALUE             372 node.h         VALUE rb_gvar_set(struct global_entry *, VALUE);
VALUE             373 node.h         VALUE rb_gvar_defined(struct global_entry *);
VALUE              68 numeric.c      VALUE rb_cNumeric;
VALUE              69 numeric.c      VALUE rb_cFloat;
VALUE              70 numeric.c      VALUE rb_cInteger;
VALUE              71 numeric.c      VALUE rb_cFixnum;
VALUE              73 numeric.c      VALUE rb_eZeroDivError;
VALUE              74 numeric.c      VALUE rb_eFloatDomainError;
VALUE              99 numeric.c      static VALUE
VALUE             100 numeric.c      num_coerce(VALUE x, VALUE y)
VALUE             107 numeric.c      static VALUE
VALUE             108 numeric.c      coerce_body(VALUE *x)
VALUE             113 numeric.c      static VALUE
VALUE             114 numeric.c      coerce_rescue(VALUE *x)
VALUE             116 numeric.c          volatile VALUE v = rb_inspect(x[1]);
VALUE             127 numeric.c      do_coerce(VALUE *x, VALUE *y, int err)
VALUE             129 numeric.c          VALUE ary;
VALUE             130 numeric.c          VALUE a[2];
VALUE             134 numeric.c          ary = rb_rescue(coerce_body, (VALUE)a, err?coerce_rescue:0, (VALUE)a);
VALUE             147 numeric.c      VALUE
VALUE             148 numeric.c      rb_num_coerce_bin(VALUE x, VALUE y)
VALUE             154 numeric.c      VALUE
VALUE             155 numeric.c      rb_num_coerce_cmp(VALUE x, VALUE y)
VALUE             162 numeric.c      VALUE
VALUE             163 numeric.c      rb_num_coerce_relop(VALUE x, VALUE y)
VALUE             165 numeric.c          VALUE c, x0 = x, y0 = y;
VALUE             180 numeric.c      static VALUE
VALUE             181 numeric.c      num_sadded(VALUE x, VALUE name)
VALUE             193 numeric.c      static VALUE
VALUE             194 numeric.c      num_init_copy(VALUE x, VALUE y)
VALUE             208 numeric.c      static VALUE
VALUE             209 numeric.c      num_uplus(VALUE num)
VALUE             221 numeric.c      static VALUE
VALUE             222 numeric.c      num_uminus(VALUE num)
VALUE             224 numeric.c          VALUE zero;
VALUE             239 numeric.c      static VALUE
VALUE             240 numeric.c      num_quo(VALUE x, VALUE y)
VALUE             246 numeric.c      static VALUE num_floor(VALUE num);
VALUE             257 numeric.c      static VALUE
VALUE             258 numeric.c      num_div(VALUE x, VALUE y)
VALUE             304 numeric.c      static VALUE
VALUE             305 numeric.c      num_divmod(VALUE x, VALUE y)
VALUE             318 numeric.c      static VALUE
VALUE             319 numeric.c      num_modulo(VALUE x, VALUE y)
VALUE             336 numeric.c      static VALUE
VALUE             337 numeric.c      num_remainder(VALUE x, VALUE y)
VALUE             339 numeric.c          VALUE z = rb_funcall(x, '%', 1, y);
VALUE             359 numeric.c      static VALUE
VALUE             360 numeric.c      num_scalar_p(VALUE num)
VALUE             373 numeric.c      static VALUE
VALUE             374 numeric.c      num_int_p(VALUE num)
VALUE             390 numeric.c      static VALUE
VALUE             391 numeric.c      num_abs(VALUE num)
VALUE             407 numeric.c      static VALUE
VALUE             408 numeric.c      num_zero_p(VALUE num)
VALUE             429 numeric.c      static VALUE
VALUE             430 numeric.c      num_nonzero_p(VALUE num)
VALUE             446 numeric.c      static VALUE
VALUE             447 numeric.c      num_to_int(VALUE num)
VALUE             461 numeric.c      VALUE
VALUE             468 numeric.c          return (VALUE)flt;
VALUE             481 numeric.c      static VALUE
VALUE             482 numeric.c      flo_to_s(VALUE flt)
VALUE             514 numeric.c      static VALUE
VALUE             515 numeric.c      flo_coerce(VALUE x, VALUE y)
VALUE             527 numeric.c      static VALUE
VALUE             528 numeric.c      flo_uminus(VALUE flt)
VALUE             541 numeric.c      static VALUE
VALUE             542 numeric.c      flo_plus(VALUE x, VALUE y)
VALUE             564 numeric.c      static VALUE
VALUE             565 numeric.c      flo_minus(VALUE x, VALUE y)
VALUE             587 numeric.c      static VALUE
VALUE             588 numeric.c      flo_mul(VALUE x, VALUE y)
VALUE             610 numeric.c      static VALUE
VALUE             611 numeric.c      flo_div(VALUE x, VALUE y)
VALUE             667 numeric.c      static VALUE
VALUE             668 numeric.c      flo_mod(VALUE x, VALUE y)
VALUE             696 numeric.c      static VALUE
VALUE             697 numeric.c      flo_divmod(VALUE x, VALUE y)
VALUE             700 numeric.c          volatile VALUE a, b;
VALUE             729 numeric.c      static VALUE
VALUE             730 numeric.c      flo_pow(VALUE x, VALUE y)
VALUE             756 numeric.c      static VALUE
VALUE             757 numeric.c      num_eql(VALUE x, VALUE y)
VALUE             772 numeric.c      static VALUE
VALUE             773 numeric.c      num_cmp(VALUE x, VALUE y)
VALUE             779 numeric.c      static VALUE
VALUE             780 numeric.c      num_equal(VALUE x, VALUE y)
VALUE             798 numeric.c      static VALUE
VALUE             799 numeric.c      flo_eq(VALUE x, VALUE y)
VALUE             829 numeric.c      static VALUE
VALUE             830 numeric.c      flo_hash(VALUE num)
VALUE             846 numeric.c      VALUE
VALUE             865 numeric.c      static VALUE
VALUE             866 numeric.c      flo_cmp(VALUE x, VALUE y)
VALUE             897 numeric.c      static VALUE
VALUE             898 numeric.c      flo_gt(VALUE x, VALUE y)
VALUE             932 numeric.c      static VALUE
VALUE             933 numeric.c      flo_ge(VALUE x, VALUE y)
VALUE             966 numeric.c      static VALUE
VALUE             967 numeric.c      flo_lt(VALUE x, VALUE y)
VALUE            1001 numeric.c      static VALUE
VALUE            1002 numeric.c      flo_le(VALUE x, VALUE y)
VALUE            1039 numeric.c      static VALUE
VALUE            1040 numeric.c      flo_eql(VALUE x, VALUE y)
VALUE            1059 numeric.c      static VALUE
VALUE            1060 numeric.c      flo_to_f(VALUE num)
VALUE            1076 numeric.c      static VALUE
VALUE            1077 numeric.c      flo_abs(VALUE flt)
VALUE            1091 numeric.c      static VALUE
VALUE            1092 numeric.c      flo_zero_p(VALUE num)
VALUE            1113 numeric.c      static VALUE
VALUE            1114 numeric.c      flo_is_nan_p(VALUE num)
VALUE            1133 numeric.c      static VALUE
VALUE            1134 numeric.c      flo_is_infinite_p(VALUE num)
VALUE            1155 numeric.c      static VALUE
VALUE            1156 numeric.c      flo_is_finite_p(VALUE num)
VALUE            1183 numeric.c      static VALUE
VALUE            1184 numeric.c      flo_floor(VALUE num)
VALUE            1209 numeric.c      static VALUE
VALUE            1210 numeric.c      flo_ceil(VALUE num)
VALUE            1239 numeric.c      static VALUE
VALUE            1240 numeric.c      flo_round(VALUE num)
VALUE            1264 numeric.c      static VALUE
VALUE            1265 numeric.c      flo_truncate(VALUE num)
VALUE            1293 numeric.c      static VALUE
VALUE            1294 numeric.c      num_floor(VALUE num)
VALUE            1315 numeric.c      static VALUE
VALUE            1316 numeric.c      num_ceil(VALUE num)
VALUE            1330 numeric.c      static VALUE
VALUE            1331 numeric.c      num_round(VALUE num)
VALUE            1345 numeric.c      static VALUE
VALUE            1346 numeric.c      num_truncate(VALUE num)
VALUE            1379 numeric.c      static VALUE
VALUE            1380 numeric.c      num_step(int argc, VALUE *argv, VALUE from)
VALUE            1382 numeric.c          VALUE to, step;
VALUE            1437 numeric.c      	VALUE i = from;
VALUE            1456 numeric.c      rb_num2long(VALUE val)
VALUE            1489 numeric.c      rb_num2ulong(VALUE val)
VALUE            1527 numeric.c          VALUE val;
VALUE            1537 numeric.c          VALUE val;
VALUE            1547 numeric.c          VALUE val;
VALUE            1559 numeric.c          VALUE val;
VALUE            1574 numeric.c      rb_num2int(VALUE val)
VALUE            1580 numeric.c      rb_fix2int(VALUE val)
VALUE            1586 numeric.c      VALUE
VALUE            1587 numeric.c      rb_num2fix(VALUE val)
VALUE            1602 numeric.c      rb_num2ll(VALUE val)
VALUE            1644 numeric.c      rb_num2ull(VALUE val)
VALUE            1677 numeric.c      static VALUE
VALUE            1678 numeric.c      int_to_i(VALUE num)
VALUE            1690 numeric.c      static VALUE
VALUE            1691 numeric.c      int_int_p(VALUE num)
VALUE            1707 numeric.c      static VALUE
VALUE            1708 numeric.c      int_succ(VALUE num)
VALUE            1729 numeric.c      static VALUE
VALUE            1730 numeric.c      int_chr(VALUE num)
VALUE            1768 numeric.c      static VALUE
VALUE            1769 numeric.c      rb_fix_induced_from(VALUE klass, VALUE x)
VALUE            1781 numeric.c      static VALUE
VALUE            1782 numeric.c      rb_int_induced_from(VALUE klass, VALUE x)
VALUE            1803 numeric.c      static VALUE
VALUE            1804 numeric.c      rb_flo_induced_from(VALUE klass, VALUE x)
VALUE            1825 numeric.c      static VALUE
VALUE            1826 numeric.c      fix_uminus(VALUE num)
VALUE            1831 numeric.c      VALUE
VALUE            1832 numeric.c      rb_fix2str(VALUE x, int base)
VALUE            1875 numeric.c      static VALUE
VALUE            1876 numeric.c      fix_to_s(int argc, VALUE *argv, VALUE x)
VALUE            1878 numeric.c          VALUE b;
VALUE            1901 numeric.c      static VALUE
VALUE            1902 numeric.c      fix_plus(VALUE x, VALUE y)
VALUE            1906 numeric.c      	VALUE r;
VALUE            1937 numeric.c      static VALUE
VALUE            1938 numeric.c      fix_minus(VALUE x, VALUE y)
VALUE            1942 numeric.c      	VALUE r;
VALUE            1974 numeric.c      static VALUE
VALUE            1975 numeric.c      fix_mul(VALUE x, VALUE y)
VALUE            1983 numeric.c      	VALUE r;
VALUE            2046 numeric.c      static VALUE
VALUE            2047 numeric.c      fix_quo(VALUE x, VALUE y)
VALUE            2062 numeric.c      static VALUE
VALUE            2063 numeric.c      fix_divide(VALUE x, VALUE y, int flo)
VALUE            2097 numeric.c      static VALUE
VALUE            2098 numeric.c      fix_div(VALUE x, VALUE y)
VALUE            2110 numeric.c      static VALUE
VALUE            2111 numeric.c      fix_idiv(VALUE x, VALUE y)
VALUE            2125 numeric.c      static VALUE
VALUE            2126 numeric.c      fix_mod(VALUE x, VALUE y)
VALUE            2156 numeric.c      static VALUE
VALUE            2157 numeric.c      fix_divmod(VALUE x, VALUE y)
VALUE            2173 numeric.c      	    volatile VALUE a, b;
VALUE            2197 numeric.c      static VALUE
VALUE            2198 numeric.c      fix_pow(VALUE x, VALUE y)
VALUE            2234 numeric.c      static VALUE
VALUE            2235 numeric.c      fix_equal(VALUE x, VALUE y)
VALUE            2259 numeric.c      static VALUE
VALUE            2260 numeric.c      fix_cmp(VALUE x, VALUE y)
VALUE            2287 numeric.c      static VALUE
VALUE            2288 numeric.c      fix_gt(VALUE x, VALUE y)
VALUE            2314 numeric.c      static VALUE
VALUE            2315 numeric.c      fix_ge(VALUE x, VALUE y)
VALUE            2341 numeric.c      static VALUE
VALUE            2342 numeric.c      fix_lt(VALUE x, VALUE y)
VALUE            2368 numeric.c      static VALUE
VALUE            2369 numeric.c      fix_le(VALUE x, VALUE y)
VALUE            2394 numeric.c      static VALUE
VALUE            2395 numeric.c      fix_rev(VALUE num)
VALUE            2410 numeric.c      static VALUE
VALUE            2411 numeric.c      fix_and(VALUE x, VALUE y)
VALUE            2429 numeric.c      static VALUE
VALUE            2430 numeric.c      fix_or(VALUE x, VALUE y)
VALUE            2448 numeric.c      static VALUE
VALUE            2449 numeric.c      fix_xor(VALUE x, VALUE y)
VALUE            2460 numeric.c      static VALUE fix_rshift(VALUE, VALUE);
VALUE            2469 numeric.c      static VALUE
VALUE            2470 numeric.c      fix_lshift(VALUE x, VALUE y)
VALUE            2478 numeric.c          if (width > (sizeof(VALUE)*CHAR_BIT-1)
VALUE            2479 numeric.c      	|| ((unsigned long)val)>>(sizeof(VALUE)*CHAR_BIT-1-width) > 0) {
VALUE            2493 numeric.c      static VALUE
VALUE            2494 numeric.c      fix_rshift(VALUE x, VALUE y)
VALUE            2527 numeric.c      static VALUE
VALUE            2528 numeric.c      fix_aref(VALUE fix, VALUE idx)
VALUE            2544 numeric.c          if (sizeof(VALUE)*CHAR_BIT-1 < i) {
VALUE            2561 numeric.c      static VALUE
VALUE            2562 numeric.c      fix_to_f(VALUE num)
VALUE            2582 numeric.c      static VALUE
VALUE            2583 numeric.c      fix_abs(VALUE fix)
VALUE            2607 numeric.c      static VALUE
VALUE            2608 numeric.c      fix_id2name(VALUE fix)
VALUE            2628 numeric.c      static VALUE
VALUE            2629 numeric.c      fix_to_sym(VALUE fix)
VALUE            2652 numeric.c      static VALUE
VALUE            2653 numeric.c      fix_size(VALUE fix)
VALUE            2672 numeric.c      static VALUE
VALUE            2673 numeric.c      int_upto(VALUE from, VALUE to)
VALUE            2684 numeric.c      	VALUE i = from, c;
VALUE            2710 numeric.c      static VALUE
VALUE            2711 numeric.c      int_downto(VALUE from, VALUE to)
VALUE            2722 numeric.c      	VALUE i = from, c;
VALUE            2749 numeric.c      static VALUE
VALUE            2750 numeric.c      int_dotimes(VALUE num)
VALUE            2761 numeric.c      	VALUE i = INT2FIX(0);
VALUE            2780 numeric.c      static VALUE
VALUE            2781 numeric.c      fix_zero_p(VALUE num)
VALUE              23 object.c       VALUE rb_mKernel;
VALUE              24 object.c       VALUE rb_cObject;
VALUE              25 object.c       VALUE rb_cModule;
VALUE              26 object.c       VALUE rb_cClass;
VALUE              27 object.c       VALUE rb_cData;
VALUE              29 object.c       VALUE rb_cNilClass;
VALUE              30 object.c       VALUE rb_cTrueClass;
VALUE              31 object.c       VALUE rb_cFalseClass;
VALUE              32 object.c       VALUE rb_cSymbol;
VALUE              45 object.c       VALUE
VALUE              46 object.c       rb_equal(VALUE obj1, VALUE obj2)
VALUE              48 object.c           VALUE result;
VALUE              57 object.c       rb_eql(VALUE obj1, VALUE obj2)
VALUE              91 object.c       static VALUE
VALUE              92 object.c       rb_obj_equal(VALUE obj1, VALUE obj2)
VALUE             128 object.c       VALUE
VALUE             129 object.c       rb_obj_id(VALUE obj)
VALUE             134 object.c           return (VALUE)((long)obj|FIXNUM_FLAG);
VALUE             137 object.c       VALUE
VALUE             138 object.c       rb_class_real(VALUE cl)
VALUE             160 object.c       VALUE
VALUE             161 object.c       rb_obj_class(VALUE obj)
VALUE             167 object.c       init_copy(VALUE dest, VALUE obj)
VALUE             215 object.c       VALUE
VALUE             216 object.c       rb_obj_clone(VALUE obj)
VALUE             218 object.c           VALUE clone;
VALUE             250 object.c       VALUE
VALUE             251 object.c       rb_obj_dup(VALUE obj)
VALUE             253 object.c           VALUE dup;
VALUE             265 object.c       VALUE
VALUE             266 object.c       rb_obj_init_copy(VALUE obj, VALUE orig)
VALUE             286 object.c       VALUE
VALUE             287 object.c       rb_any_to_s(VALUE obj)
VALUE             290 object.c           VALUE str;
VALUE             298 object.c       VALUE
VALUE             299 object.c       rb_inspect(VALUE obj)
VALUE             305 object.c       inspect_i(ID id, VALUE value, VALUE str)
VALUE             307 object.c           VALUE str2;
VALUE             330 object.c       static VALUE
VALUE             331 object.c       inspect_obj(VALUE obj, VALUE str, int recur)
VALUE             359 object.c       static VALUE
VALUE             360 object.c       rb_obj_inspect(VALUE obj)
VALUE             365 object.c       	VALUE str;
VALUE             384 object.c       VALUE
VALUE             385 object.c       rb_obj_is_instance_of(VALUE obj, VALUE c)
VALUE             427 object.c       VALUE
VALUE             428 object.c       rb_obj_is_kind_of(VALUE obj, VALUE c)
VALUE             430 object.c           VALUE cl = CLASS_OF(obj);
VALUE             556 object.c       static VALUE
VALUE             570 object.c       VALUE
VALUE             571 object.c       rb_obj_tainted(VALUE obj)
VALUE             587 object.c       VALUE
VALUE             588 object.c       rb_obj_taint(VALUE obj)
VALUE             608 object.c       VALUE
VALUE             609 object.c       rb_obj_untaint(VALUE obj)
VALUE             622 object.c       rb_obj_infect(VALUE obj1, VALUE obj2)
VALUE             647 object.c       VALUE
VALUE             648 object.c       rb_obj_freeze(VALUE obj)
VALUE             670 object.c       static VALUE
VALUE             671 object.c       rb_obj_frozen_p(VALUE obj)
VALUE             694 object.c       static VALUE
VALUE             695 object.c       nil_to_i(VALUE obj)
VALUE             709 object.c       static VALUE
VALUE             710 object.c       nil_to_f(VALUE obj)
VALUE             724 object.c       static VALUE
VALUE             725 object.c       nil_to_s(VALUE obj)
VALUE             739 object.c       static VALUE
VALUE             741 object.c           VALUE obj;
VALUE             753 object.c       static VALUE
VALUE             754 object.c       nil_inspect(VALUE obj)
VALUE             760 object.c       static VALUE
VALUE             762 object.c           VALUE x, y;
VALUE             781 object.c       static VALUE
VALUE             782 object.c       main_to_s(VALUE obj)
VALUE             805 object.c       static VALUE
VALUE             806 object.c       true_to_s(VALUE obj)
VALUE             820 object.c       static VALUE
VALUE             821 object.c       true_and(VALUE obj, VALUE obj2)
VALUE             842 object.c       static VALUE
VALUE             843 object.c       true_or(VALUE obj, VALUE obj2)
VALUE             858 object.c       static VALUE
VALUE             859 object.c       true_xor(VALUE obj, VALUE obj2)
VALUE             882 object.c       static VALUE
VALUE             883 object.c       false_to_s(VALUE obj)
VALUE             898 object.c       static VALUE
VALUE             899 object.c       false_and(VALUE obj, VALUE obj2)
VALUE             914 object.c       static VALUE
VALUE             915 object.c       false_or(VALUE obj, VALUE obj2)
VALUE             933 object.c       static VALUE
VALUE             934 object.c       false_xor(VALUE obj, VALUE obj2)
VALUE             946 object.c       static VALUE
VALUE             947 object.c       rb_true(VALUE obj)
VALUE             961 object.c       static VALUE
VALUE             962 object.c       rb_false(VALUE obj)
VALUE             977 object.c       static VALUE
VALUE             978 object.c       rb_obj_pattern_match(VALUE obj1, VALUE obj2)
VALUE            1027 object.c       static VALUE
VALUE            1028 object.c       sym_to_i(VALUE sym)
VALUE            1045 object.c       static VALUE
VALUE            1046 object.c       sym_inspect(VALUE sym)
VALUE            1048 object.c           VALUE str;
VALUE            1075 object.c       static VALUE
VALUE            1076 object.c       sym_to_s(VALUE sym)
VALUE            1091 object.c       static VALUE
VALUE            1092 object.c       sym_to_sym(VALUE sym)
VALUE            1135 object.c       static VALUE
VALUE            1136 object.c       rb_mod_to_s(VALUE klass)
VALUE            1139 object.c       	VALUE s = rb_str_new2("#<");
VALUE            1140 object.c       	VALUE v = rb_iv_get(klass, "__attached__");
VALUE            1165 object.c       static VALUE
VALUE            1166 object.c       rb_mod_freeze(VALUE mod)
VALUE            1182 object.c       static VALUE
VALUE            1183 object.c       rb_mod_eqq(VALUE mod, VALUE arg)
VALUE            1200 object.c       VALUE
VALUE            1201 object.c       rb_class_inherited_p(VALUE mod, VALUE arg)
VALUE            1203 object.c           VALUE start = mod;
VALUE            1238 object.c       static VALUE
VALUE            1239 object.c       rb_mod_lt(VALUE mod, VALUE arg)
VALUE            1258 object.c       static VALUE
VALUE            1259 object.c       rb_mod_ge(VALUE mod, VALUE arg)
VALUE            1283 object.c       static VALUE
VALUE            1284 object.c       rb_mod_gt(VALUE mod, VALUE arg)
VALUE            1301 object.c       static VALUE
VALUE            1302 object.c       rb_mod_cmp(VALUE mod, VALUE arg)
VALUE            1304 object.c           VALUE cmp;
VALUE            1323 object.c       static VALUE
VALUE            1324 object.c       rb_module_s_alloc(VALUE klass)
VALUE            1326 object.c           VALUE mod = rb_module_new();
VALUE            1332 object.c       static VALUE
VALUE            1333 object.c       rb_class_s_alloc(VALUE klass)
VALUE            1361 object.c       static VALUE
VALUE            1362 object.c       rb_mod_initialize(VALUE module)
VALUE            1380 object.c       static VALUE
VALUE            1381 object.c       rb_class_initialize(int argc, VALUE *argv, VALUE klass)
VALUE            1383 object.c           VALUE super;
VALUE            1411 object.c       VALUE
VALUE            1412 object.c       rb_obj_alloc(VALUE klass)
VALUE            1414 object.c           VALUE obj;
VALUE            1429 object.c       static VALUE
VALUE            1430 object.c       rb_class_allocate_instance(VALUE klass)
VALUE            1434 object.c           return (VALUE)obj;
VALUE            1449 object.c       VALUE
VALUE            1450 object.c       rb_class_new_instance(int argc, VALUE *argv, VALUE klass)
VALUE            1452 object.c           VALUE obj;
VALUE            1472 object.c       static VALUE
VALUE            1473 object.c       rb_class_superclass(VALUE klass)
VALUE            1475 object.c           VALUE super = RCLASS(klass)->super;
VALUE            1490 object.c       str_to_id(VALUE str)
VALUE            1502 object.c       rb_to_id(VALUE name)
VALUE            1504 object.c           VALUE tmp;
VALUE            1556 object.c       static VALUE
VALUE            1557 object.c       rb_mod_attr(int argc, VALUE *argv, VALUE klass)
VALUE            1559 object.c           VALUE name, pub;
VALUE            1575 object.c       static VALUE
VALUE            1576 object.c       rb_mod_attr_reader(int argc, VALUE *argv, VALUE klass)
VALUE            1594 object.c       static VALUE
VALUE            1595 object.c       rb_mod_attr_writer(int argc, VALUE *argv, VALUE klass)
VALUE            1618 object.c       static VALUE
VALUE            1619 object.c       rb_mod_attr_accessor(int argc, VALUE *argv, VALUE klass)
VALUE            1638 object.c       static VALUE
VALUE            1639 object.c       rb_mod_const_get(VALUE mod, VALUE name)
VALUE            1661 object.c       static VALUE
VALUE            1662 object.c       rb_mod_const_set(VALUE mod, VALUE name, VALUE value)
VALUE            1683 object.c       static VALUE
VALUE            1684 object.c       rb_mod_const_defined(VALUE mod, VALUE name)
VALUE            1714 object.c       static VALUE
VALUE            1715 object.c       rb_obj_methods(int argc, VALUE *argv, VALUE obj)
VALUE            1719 object.c       	VALUE args[1];
VALUE            1725 object.c       	VALUE recur;
VALUE            1745 object.c       static VALUE
VALUE            1746 object.c       rb_obj_protected_methods(int argc, VALUE *argv, VALUE obj)
VALUE            1749 object.c       	VALUE args[1];
VALUE            1766 object.c       static VALUE
VALUE            1767 object.c       rb_obj_private_methods(int argc, VALUE *argv, VALUE obj)
VALUE            1770 object.c       	VALUE args[1];
VALUE            1787 object.c       static VALUE
VALUE            1788 object.c       rb_obj_public_methods(int argc, VALUE *argv, VALUE obj)
VALUE            1791 object.c       	VALUE args[1];
VALUE            1817 object.c       static VALUE
VALUE            1818 object.c       rb_obj_ivar_get(VALUE obj, VALUE iv)
VALUE            1849 object.c       static VALUE
VALUE            1850 object.c       rb_obj_ivar_set(VALUE obj, VALUE iv, VALUE val)
VALUE            1874 object.c       static VALUE
VALUE            1875 object.c       rb_mod_cvar_get(VALUE obj, VALUE iv)
VALUE            1903 object.c       static VALUE
VALUE            1904 object.c       rb_mod_cvar_set(VALUE obj, VALUE iv, VALUE val)
VALUE            1915 object.c       static VALUE
VALUE            1916 object.c       convert_type(VALUE val, const char *tname, const char *method, int raise)
VALUE            1937 object.c       VALUE
VALUE            1938 object.c       rb_convert_type(VALUE val, int type, const char *tname, const char *method)
VALUE            1940 object.c           VALUE v;
VALUE            1952 object.c       VALUE
VALUE            1953 object.c       rb_check_convert_type(VALUE val, int type, const char *tname, const char *method)
VALUE            1955 object.c           VALUE v;
VALUE            1970 object.c       static VALUE
VALUE            1971 object.c       rb_to_integer(VALUE val, const char *method)
VALUE            1973 object.c           VALUE v = convert_type(val, "Integer", method, Qtrue);
VALUE            1982 object.c       VALUE
VALUE            1983 object.c       rb_check_to_integer(VALUE val, const char *method)
VALUE            1985 object.c           VALUE v = convert_type(val, "Integer", method, Qfalse);
VALUE            1992 object.c       VALUE
VALUE            1993 object.c       rb_to_int(VALUE val)
VALUE            1998 object.c       VALUE
VALUE            1999 object.c       rb_Integer(VALUE val)
VALUE            2001 object.c           VALUE tmp;
VALUE            2045 object.c       static VALUE
VALUE            2046 object.c       rb_f_integer(VALUE obj, VALUE arg)
VALUE            2119 object.c       rb_str_to_dbl(VALUE str, int badcheck)
VALUE            2142 object.c       VALUE
VALUE            2143 object.c       rb_Float(VALUE val)
VALUE            2164 object.c       	  VALUE f = rb_convert_type(val, T_FLOAT, "Float", "to_f");
VALUE            2185 object.c       static VALUE
VALUE            2186 object.c       rb_f_float(VALUE obj, VALUE arg)
VALUE            2192 object.c       rb_num2dbl(VALUE val)
VALUE            2214 object.c       rb_str2cstr(VALUE str, long *len)
VALUE            2224 object.c       VALUE
VALUE            2225 object.c       rb_String(VALUE val)
VALUE            2243 object.c       static VALUE
VALUE            2244 object.c       rb_f_string(VALUE obj, VALUE arg)
VALUE            2249 object.c       VALUE
VALUE            2250 object.c       rb_Array(VALUE val)
VALUE            2252 object.c           VALUE tmp = rb_check_array_type(val);
VALUE            2270 object.c       static VALUE
VALUE            2271 object.c       rb_f_array(VALUE obj, VALUE arg)
VALUE            2276 object.c       static VALUE
VALUE            2277 object.c       boot_defclass(char *name, VALUE super)
VALUE            2280 object.c           VALUE obj = rb_class_boot(super);
VALUE            2289 object.c       VALUE ruby_top_self;
VALUE            2368 object.c           VALUE metaclass;
VALUE             333 pack.c         unsigned long rb_big2ulong_pack(VALUE x);
VALUE             336 pack.c         num2i32(VALUE x)
VALUE             367 pack.c         static void encodes(VALUE,char*,long,int);
VALUE             368 pack.c         static void qpencode(VALUE,VALUE,long);
VALUE             438 pack.c         static VALUE
VALUE             439 pack.c         pack_pack(VALUE ary, VALUE fmt)
VALUE             444 pack.c             VALUE res, from, associates = 0;
VALUE             945 pack.c         		VALUE buf = rb_str_new(0, 0);
VALUE             950 pack.c         		    VALUE big128 = rb_uint2big(128);
VALUE            1008 pack.c         encodes(VALUE str, char *s, long len, int type)
VALUE            1049 pack.c         qpencode(VALUE str, VALUE from, long len)
VALUE            1141 pack.c         static VALUE
VALUE            1142 pack.c         infected_str_new(const char *ptr, long len, VALUE str)
VALUE            1144 pack.c             VALUE s = rb_str_new(ptr, len);
VALUE            1288 pack.c         static VALUE
VALUE            1289 pack.c         pack_unpack(VALUE str, VALUE fmt)
VALUE            1294 pack.c             VALUE ary;
VALUE            1392 pack.c         		VALUE bitstr;
VALUE            1412 pack.c         		VALUE bitstr;
VALUE            1432 pack.c         		VALUE bitstr;
VALUE            1454 pack.c         		VALUE bitstr;
VALUE            1716 pack.c         		VALUE buf = infected_str_new(0, (send - s)*3/4, str);
VALUE            1772 pack.c         		VALUE buf = infected_str_new(0, (send - s)*3/4, str);
VALUE            1816 pack.c         		VALUE buf = infected_str_new(0, send - s, str);
VALUE            1862 pack.c         		VALUE tmp;
VALUE            1868 pack.c         		    VALUE a, *p, *pend;
VALUE            1903 pack.c         		    VALUE tmp;
VALUE            1910 pack.c         			VALUE a, *p, *pend;
VALUE            1951 pack.c         			VALUE big = rb_uint2big(ul);
VALUE            1952 pack.c         			VALUE big128 = rb_uint2big(128);
VALUE             104 parse.y            VALUE val;
VALUE             135 parse.y            VALUE eofp;
VALUE             147 parse.y            VALUE parser_cur_mid;
VALUE             152 parse.y            VALUE parser_lex_input;
VALUE             153 parse.y            VALUE parser_lex_lastline;
VALUE             160 parse.y            VALUE (*parser_lex_gets)(struct parser_params*,VALUE);
VALUE             170 parse.y            VALUE debug_lines;
VALUE             174 parse.y            VALUE parser_ruby_sourcefile;
VALUE             176 parse.y            VALUE delayed;
VALUE             180 parse.y            VALUE value;
VALUE             181 parse.y            VALUE result;
VALUE             182 parse.y            VALUE parsing_thread;
VALUE             273 parse.y        static NODE *new_args_gen(struct parser_params*,VALUE,NODE*,NODE*,NODE*);
VALUE             365 parse.y        static VALUE ripper_dispatch0(struct parser_params*,ID);
VALUE             366 parse.y        static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
VALUE             367 parse.y        static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
VALUE             368 parse.y        static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
VALUE             369 parse.y        static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
VALUE             370 parse.y        static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
VALUE             382 parse.y        static VALUE ripper_intern(const char*);
VALUE             383 parse.y        static VALUE ripper_id2sym(ID);
VALUE             466 parse.y            VALUE val;
VALUE            3020 parse.y        			    rb_gc_force_recycle((VALUE)$1);
VALUE            3630 parse.y        				VALUE src = node->nd_lit;
VALUE            3866 parse.y        			    VALUE lit;
VALUE            4125 parse.y        			VALUE arg = ID2SYM($1);
VALUE            4134 parse.y        			VALUE arg = ID2SYM($3);
VALUE            4457 parse.y            VALUE str;
VALUE            4548 parse.y        yycompile(VALUE vparser, const char *f, int line)
VALUE            4553 parse.y            volatile VALUE parser_save;
VALUE            4560 parse.y        	VALUE hash, fname;
VALUE            4572 parse.y        	    VALUE str = rb_str_new(0,0);
VALUE            4596 parse.y        	rb_gc_force_recycle((VALUE)tmp);
VALUE            4607 parse.y        static VALUE
VALUE            4608 parse.y        lex_get_str(struct parser_params *parser, VALUE s)
VALUE            4626 parse.y        static VALUE
VALUE            4629 parse.y            VALUE line = (*parser->parser_lex_gets)(parser, parser->parser_lex_input);
VALUE            4640 parse.y        rb_compile_string(const char *f, VALUE s, int line)
VALUE            4642 parse.y            VALUE volatile vparser = rb_parser_new();
VALUE            4648 parse.y        rb_parser_compile_string(VALUE vparser, const char *f, VALUE s, int line)
VALUE            4669 parse.y        rb_parser_compile_cstr(VALUE vparser, const char *f, const char *s, int len, int line)
VALUE            4674 parse.y        static VALUE
VALUE            4675 parse.y        lex_io_gets(struct parser_params *parser, VALUE io)
VALUE            4681 parse.y        rb_compile_file(const char *f, VALUE file, int start)
VALUE            4683 parse.y            VALUE volatile vparser = rb_parser_new();
VALUE            4689 parse.y        rb_parser_compile_file(VALUE vparser, const char *f, VALUE file, int start)
VALUE            4711 parse.y        	    VALUE v = lex_getline(parser);
VALUE            5054 parse.y        dispose_string(VALUE str)
VALUE            5148 parse.y        ripper_new_strterm(struct parser_params *parser, VALUE func, VALUE term, VALUE paren)
VALUE            5281 parse.y            VALUE line;
VALUE            5297 parse.y            rb_gc_force_recycle((VALUE)here);
VALUE            5325 parse.y            VALUE str = 0;
VALUE            5486 parse.y            VALUE name = 0, val = 0;
VALUE            5617 parse.y        		rb_gc_force_recycle((VALUE)lex_strterm);
VALUE            6878 parse.y        rb_node_newnode(enum node_type type, VALUE a0, VALUE a1, VALUE a2)
VALUE            7059 parse.y        	    rb_gc_force_recycle((VALUE)tail);
VALUE            7070 parse.y        	    rb_gc_force_recycle((VALUE)head);
VALUE            7906 parse.y        arg_dup_check(ID vid, VALUE m, VALUE list, NODE *node)
VALUE            7908 parse.y            VALUE sym = ID2SYM(vid);
VALUE            7918 parse.y        new_args_gen(struct parser_params *parser, VALUE m, NODE *o, NODE *r, NODE *b)
VALUE            7922 parse.y            VALUE list;
VALUE            7997 parse.y        	rb_dvar_push(0, (VALUE)ruby_dyna_vars);
VALUE            8100 parse.y        		VALUE *vars = ALLOC_N(VALUE, len+1);
VALUE            8103 parse.y        		    MEMCPY(vars, ruby_scope->local_vars, VALUE, i);
VALUE            8114 parse.y        		VALUE *vars = ruby_scope->local_vars-1;
VALUE            8115 parse.y        		REALLOC_N(vars, VALUE, len+1);
VALUE            8525 parse.y        symbols_i(char *key, ID value, VALUE ary)
VALUE            8547 parse.y        VALUE
VALUE            8550 parse.y            VALUE ary = rb_ary_new2(global_symbols.tbl->num_entries);
VALUE            8592 parse.y        special_local_set(char c, VALUE val)
VALUE            8594 parse.y            VALUE volatile vparser = rb_parser_new();
VALUE            8605 parse.y        VALUE
VALUE            8608 parse.y            VALUE *var = rb_svar(1);
VALUE            8616 parse.y        rb_backref_set(VALUE val)
VALUE            8618 parse.y            VALUE *var = rb_svar(1);
VALUE            8627 parse.y        VALUE
VALUE            8630 parse.y            VALUE *var = rb_svar(0);
VALUE            8638 parse.y        rb_lastline_set(VALUE val)
VALUE            8640 parse.y            VALUE *var = rb_svar(0);
VALUE            8697 parse.y            rb_gc_mark((VALUE)p->parser_lex_strterm);
VALUE            8701 parse.y            rb_gc_mark((VALUE)p->parser_eval_tree_begin) ;
VALUE            8702 parse.y            rb_gc_mark((VALUE)p->parser_eval_tree) ;
VALUE            8712 parse.y            rb_gc_mark((VALUE)p->heap);
VALUE            8746 parse.y        VALUE
VALUE            8761 parse.y        VALUE
VALUE            8762 parse.y        rb_parser_end_seen_p(VALUE vparser)
VALUE            8772 parse.y        #define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parserp->heap, 0)
VALUE            8824 parse.y        	    rb_gc_force_recycle((VALUE)n);
VALUE            8836 parse.y        extern int rb_is_pointer_to_heap(VALUE);
VALUE            8839 parse.y        static VALUE
VALUE            8840 parse.y        ripper_validate_object(VALUE self, VALUE x)
VALUE            8870 parse.y        static VALUE
VALUE            8876 parse.y        static VALUE
VALUE            8877 parse.y        ripper_dispatch1(struct parser_params *parser, ID mid, VALUE a)
VALUE            8883 parse.y        static VALUE
VALUE            8884 parse.y        ripper_dispatch2(struct parser_params *parser, ID mid, VALUE a, VALUE b)
VALUE            8891 parse.y        static VALUE
VALUE            8892 parse.y        ripper_dispatch3(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c)
VALUE            8900 parse.y        static VALUE
VALUE            8901 parse.y        ripper_dispatch4(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
VALUE            8910 parse.y        static VALUE
VALUE            8911 parse.y        ripper_dispatch5(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
VALUE            8987 parse.y        static VALUE
VALUE            9018 parse.y        static VALUE
VALUE            9027 parse.y            VALUE str;
VALUE            9069 parse.y        static VALUE
VALUE            9070 parse.y        ripper_lex_get_generic(struct parser_params *parser, VALUE src)
VALUE            9075 parse.y        static VALUE
VALUE            9076 parse.y        ripper_s_allocate(VALUE klass)
VALUE            9079 parse.y            VALUE self;
VALUE            9100 parse.y        static VALUE
VALUE            9101 parse.y        ripper_initialize(int argc, VALUE *argv, VALUE self)
VALUE            9104 parse.y            VALUE src, fname, lineno;
VALUE            9136 parse.y        static VALUE
VALUE            9137 parse.y        ripper_s_get_yydebug(VALUE self)
VALUE            9148 parse.y        static VALUE
VALUE            9149 parse.y        ripper_s_set_yydebug(VALUE self, VALUE flag)
VALUE            9155 parse.y        extern VALUE rb_thread_pass(void);
VALUE            9160 parse.y            VALUE *argv;
VALUE            9163 parse.y        static VALUE
VALUE            9164 parse.y        ripper_parse0(VALUE parser_v)
VALUE            9174 parse.y        static VALUE
VALUE            9175 parse.y        ripper_ensure(VALUE parser_v)
VALUE            9190 parse.y        static VALUE
VALUE            9191 parse.y        ripper_parse(VALUE self)
VALUE            9218 parse.y        static VALUE
VALUE            9219 parse.y        ripper_column(VALUE self)
VALUE            9240 parse.y        static VALUE
VALUE            9241 parse.y        ripper_lineno(VALUE self)
VALUE            9255 parse.y        static VALUE
VALUE            9256 parse.y        ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg)
VALUE            9266 parse.y        static VALUE
VALUE            9267 parse.y        ripper_value(VALUE self, VALUE obj)
VALUE            9276 parse.y            VALUE Ripper;
VALUE              15 prec.c         VALUE rb_mPrecision;
VALUE              34 prec.c         static VALUE
VALUE              35 prec.c         prec_prec(VALUE x, VALUE klass)
VALUE              48 prec.c         static VALUE
VALUE              49 prec.c         prec_prec_i(VALUE x)
VALUE              51 prec.c             VALUE klass = rb_cInteger;
VALUE              64 prec.c         static VALUE
VALUE              65 prec.c         prec_prec_f(VALUE x)
VALUE              67 prec.c             VALUE klass = rb_cFloat;
VALUE              85 prec.c         static VALUE
VALUE              86 prec.c         prec_induced_from(VALUE module, VALUE x)
VALUE             102 prec.c         static VALUE
VALUE             103 prec.c         prec_included(VALUE module, VALUE include)
VALUE              43 process.c      struct timeval rb_time_interval(VALUE);
VALUE              66 process.c      static VALUE S_Tms;
VALUE             130 process.c      static VALUE
VALUE             154 process.c      static VALUE
VALUE             196 process.c      static VALUE rb_cProcStatus;
VALUE             197 process.c      VALUE rb_last_status = Qnil;
VALUE             221 process.c      static VALUE
VALUE             222 process.c      pst_to_i(VALUE st)
VALUE             235 process.c      static VALUE
VALUE             236 process.c      pst_to_s(VALUE st)
VALUE             253 process.c      static VALUE
VALUE             254 process.c      pst_pid(VALUE st)
VALUE             267 process.c      static VALUE
VALUE             268 process.c      pst_inspect(VALUE st)
VALUE             270 process.c          VALUE pid;
VALUE             272 process.c          VALUE str;
VALUE             323 process.c      static VALUE
VALUE             324 process.c      pst_equal(VALUE st1, VALUE st2)
VALUE             343 process.c      static VALUE
VALUE             344 process.c      pst_bitand(VALUE st1, VALUE st2)
VALUE             364 process.c      static VALUE
VALUE             365 process.c      pst_rshift(VALUE st1, VALUE st2)
VALUE             382 process.c      static VALUE
VALUE             383 process.c      pst_wifstopped(VALUE st)
VALUE             402 process.c      static VALUE
VALUE             403 process.c      pst_wstopsig(VALUE st)
VALUE             421 process.c      static VALUE
VALUE             422 process.c      pst_wifsignaled(VALUE st)
VALUE             442 process.c      static VALUE
VALUE             443 process.c      pst_wtermsig(VALUE st)
VALUE             462 process.c      static VALUE
VALUE             463 process.c      pst_wifexited(VALUE st)
VALUE             493 process.c      static VALUE
VALUE             494 process.c      pst_wexitstatus(VALUE st)
VALUE             512 process.c      static VALUE
VALUE             513 process.c      pst_success_p(VALUE st)
VALUE             531 process.c      static VALUE
VALUE             532 process.c      pst_wcoredump(VALUE st)
VALUE             640 process.c          VALUE ary;
VALUE             707 process.c      static VALUE
VALUE             708 process.c      proc_wait(int argc, VALUE *argv)
VALUE             710 process.c          VALUE vpid, vflags;
VALUE             751 process.c      static VALUE
VALUE             752 process.c      proc_wait2(int argc, VALUE *argv)
VALUE             754 process.c          VALUE pid = proc_wait(argc, argv);
VALUE             780 process.c      static VALUE
VALUE             783 process.c          VALUE result;
VALUE             822 process.c      static VALUE
VALUE             834 process.c      VALUE
VALUE             887 process.c      static VALUE
VALUE             888 process.c      proc_detach(VALUE obj, VALUE pid)
VALUE             974 process.c      rb_proc_exec_n(int argc, VALUE *argv, const char *prog)
VALUE            1115 process.c      proc_spawn_n(int argc, VALUE *argv, VALUE prog)
VALUE            1164 process.c      VALUE
VALUE            1165 process.c      rb_check_argv(int argc, VALUE *argv)
VALUE            1167 process.c          VALUE tmp, prog;
VALUE            1219 process.c      VALUE
VALUE            1220 process.c      rb_f_exec(int argc, VALUE *argv)
VALUE            1223 process.c          VALUE prog;
VALUE            1245 process.c          VALUE *argv = e->argv;
VALUE            1266 process.c      #define proc_syswait (VALUE (*)(VALUE))rb_syswait
VALUE            1268 process.c      static VALUE
VALUE            1270 process.c          VALUE pid;
VALUE            1334 process.c      		rb_protect((VALUE (*)())rb_thread_sleep, 1, &state);
VALUE            1374 process.c      		rb_protect(proc_syswait, (VALUE)pid, status);
VALUE            1409 process.c      static VALUE
VALUE            1410 process.c      rb_f_fork(VALUE obj)
VALUE            1455 process.c      static VALUE
VALUE            1456 process.c      rb_f_exit_bang(int argc, VALUE *argv, VALUE obj)
VALUE            1458 process.c          VALUE status;
VALUE            1530 process.c      rb_spawn(int argc, VALUE *argv)
VALUE            1533 process.c          VALUE prog;
VALUE            1589 process.c      static VALUE
VALUE            1590 process.c      rb_f_system(int argc, VALUE *argv)
VALUE            1612 process.c      static VALUE
VALUE            1613 process.c      rb_f_spawn(int argc, VALUE *argv)
VALUE            1644 process.c      static VALUE
VALUE            1645 process.c      rb_f_sleep(int argc, VALUE *argv)
VALUE            1677 process.c      static VALUE
VALUE            1707 process.c      static VALUE
VALUE            1736 process.c      static VALUE
VALUE            1737 process.c      proc_getpgid(VALUE obj, VALUE pid)
VALUE            1760 process.c      static VALUE
VALUE            1761 process.c      proc_setpgid(VALUE obj, VALUE pid, VALUE pgrp)
VALUE            1789 process.c      static VALUE
VALUE            1843 process.c      static VALUE
VALUE            1844 process.c      proc_getpriority(VALUE obj, VALUE which, VALUE who)
VALUE            1875 process.c      static VALUE
VALUE            1876 process.c      proc_setpriority(VALUE obj, VALUE which, VALUE who, VALUE prio)
VALUE            1924 process.c      static VALUE
VALUE            1925 process.c      proc_getrlimit(VALUE obj, VALUE resource)
VALUE            1978 process.c      static VALUE
VALUE            1979 process.c      proc_setrlimit(int argc, VALUE *argv, VALUE obj)
VALUE            1982 process.c          VALUE resource, rlim_cur, rlim_max;
VALUE            2044 process.c      static VALUE
VALUE            2045 process.c      p_sys_setuid(VALUE obj, VALUE id)
VALUE            2067 process.c      static VALUE
VALUE            2068 process.c      p_sys_setruid(VALUE obj, VALUE id)
VALUE            2089 process.c      static VALUE
VALUE            2090 process.c      p_sys_seteuid(VALUE obj, VALUE id)
VALUE            2113 process.c      static VALUE
VALUE            2114 process.c      p_sys_setreuid(VALUE obj, VALUE rid, VALUE eid)
VALUE            2137 process.c      static VALUE
VALUE            2138 process.c      p_sys_setresuid(VALUE obj, VALUE rid, VALUE eid, VALUE sid)
VALUE            2161 process.c      static VALUE
VALUE            2162 process.c      proc_getuid(VALUE obj)
VALUE            2177 process.c      static VALUE
VALUE            2178 process.c      proc_setuid(VALUE obj, VALUE id)
VALUE            2231 process.c      static VALUE
VALUE            2232 process.c      p_uid_change_privilege(VALUE obj, VALUE id)
VALUE            2380 process.c      static VALUE
VALUE            2381 process.c      p_sys_setgid(VALUE obj, VALUE id)
VALUE            2402 process.c      static VALUE
VALUE            2403 process.c      p_sys_setrgid(VALUE obj, VALUE id)
VALUE            2425 process.c      static VALUE
VALUE            2426 process.c      p_sys_setegid(VALUE obj, VALUE id)
VALUE            2449 process.c      static VALUE
VALUE            2450 process.c      p_sys_setregid(VALUE obj, VALUE rid, VALUE eid)
VALUE            2472 process.c      static VALUE
VALUE            2473 process.c      p_sys_setresgid(VALUE obj, VALUE rid, VALUE eid, VALUE sid)
VALUE            2497 process.c      static VALUE
VALUE            2498 process.c      p_sys_issetugid(VALUE obj)
VALUE            2525 process.c      static VALUE
VALUE            2526 process.c      proc_getgid(VALUE obj)
VALUE            2540 process.c      static VALUE
VALUE            2541 process.c      proc_setgid(VALUE obj, VALUE id)
VALUE            2582 process.c      static VALUE
VALUE            2583 process.c      proc_getgroups(VALUE obj)
VALUE            2586 process.c          VALUE ary;
VALUE            2622 process.c      static VALUE
VALUE            2623 process.c      proc_setgroups(VALUE obj, VALUE ary)
VALUE            2640 process.c      	VALUE g = RARRAY(ary)->ptr[i];
VALUE            2646 process.c      	    VALUE tmp = rb_check_string_type(g);
VALUE            2690 process.c      static VALUE
VALUE            2691 process.c      proc_initgroups(VALUE obj, VALUE uname, VALUE base_grp)
VALUE            2715 process.c      static VALUE
VALUE            2716 process.c      proc_getmaxgroups(VALUE obj)
VALUE            2730 process.c      static VALUE
VALUE            2731 process.c      proc_setmaxgroups(VALUE obj, VALUE val)
VALUE            2756 process.c      static VALUE
VALUE            2757 process.c      proc_daemon(int argc, VALUE *argv)
VALUE            2759 process.c          VALUE nochdir, noclose;
VALUE            2823 process.c      static VALUE
VALUE            2824 process.c      p_gid_change_privilege(VALUE obj, VALUE id)
VALUE            2974 process.c      static VALUE
VALUE            2975 process.c      proc_geteuid(VALUE obj)
VALUE            2990 process.c      static VALUE
VALUE            2991 process.c      proc_seteuid(VALUE obj, VALUE euid)
VALUE            3014 process.c      static VALUE
VALUE            3063 process.c      static VALUE
VALUE            3064 process.c      p_uid_grant_privilege(VALUE obj, VALUE id)
VALUE            3082 process.c      static VALUE
VALUE            3083 process.c      proc_getegid(VALUE obj)
VALUE            3099 process.c      static VALUE
VALUE            3100 process.c      proc_setegid(VALUE obj, VALUE egid)
VALUE            3124 process.c      static VALUE
VALUE            3173 process.c      static VALUE
VALUE            3174 process.c      p_gid_grant_privilege(VALUE obj, VALUE id)
VALUE            3189 process.c      static VALUE
VALUE            3214 process.c      static VALUE
VALUE            3215 process.c      p_uid_exchange(VALUE obj)
VALUE            3246 process.c      static VALUE
VALUE            3271 process.c      static VALUE
VALUE            3272 process.c      p_gid_exchange(VALUE obj)
VALUE            3304 process.c      static VALUE
VALUE            3316 process.c      static VALUE
VALUE            3338 process.c      static VALUE
VALUE            3340 process.c          VALUE obj;
VALUE            3371 process.c      static VALUE
VALUE            3372 process.c      p_uid_sw_ensure(VALUE obj)
VALUE            3378 process.c      static VALUE
VALUE            3379 process.c      p_uid_switch(VALUE obj)
VALUE            3414 process.c      static VALUE
VALUE            3425 process.c      static VALUE
VALUE            3447 process.c      static VALUE
VALUE            3449 process.c          VALUE obj;
VALUE            3479 process.c      static VALUE
VALUE            3480 process.c      p_gid_sw_ensure(VALUE obj)
VALUE            3486 process.c      static VALUE
VALUE            3487 process.c      p_gid_switch(VALUE obj)
VALUE            3523 process.c      VALUE
VALUE            3524 process.c      rb_proc_times(VALUE obj)
VALUE            3535 process.c          volatile VALUE utime, stime, cutime, sctime;
VALUE            3548 process.c      VALUE rb_mProcess;
VALUE            3549 process.c      VALUE rb_mProcUID;
VALUE            3550 process.c      VALUE rb_mProcGID;
VALUE            3551 process.c      VALUE rb_mProcID_Syscall;
VALUE             192 random.c       static VALUE saved_seed = INT2FIX(0);
VALUE             194 random.c       static VALUE
VALUE             195 random.c       rand_init(VALUE vseed)
VALUE             197 random.c           volatile VALUE seed;
VALUE             198 random.c           VALUE old;
VALUE             205 random.c                 len = sizeof(VALUE);
VALUE             253 random.c       static VALUE
VALUE             303 random.c           return rb_big_norm((VALUE)big);
VALUE             320 random.c       static VALUE
VALUE             321 random.c       rb_f_srand(int argc, VALUE *argv, VALUE obj)
VALUE             323 random.c           VALUE seed, old;
VALUE             368 random.c       static VALUE
VALUE             376 random.c           val = (struct RBignum *)rb_big_clone((VALUE)limit);
VALUE             410 random.c           return rb_big_norm((VALUE)val);
VALUE             433 random.c       static VALUE
VALUE             434 random.c       rb_f_rand(int argc, VALUE *argv, VALUE obj)
VALUE             436 random.c           VALUE vmax;
VALUE             462 random.c                   limit = (struct RBignum *)rb_big_minus((VALUE)limit, INT2FIX(1));
VALUE             463 random.c                   if (FIXNUM_P((VALUE)limit)) {
VALUE             464 random.c                       if (FIX2LONG((VALUE)limit) == -1)
VALUE             466 random.c                       return LONG2NUM(limited_rand(FIX2LONG((VALUE)limit)));
VALUE              15 range.c        VALUE rb_cRange;
VALUE              21 range.c        static VALUE
VALUE              28 range.c        static VALUE
VALUE              29 range.c        range_check(VALUE *args)
VALUE              35 range.c        range_init(VALUE range, VALUE beg, VALUE end, int exclude_end)
VALUE              37 range.c            VALUE args[2];
VALUE              43 range.c        	VALUE v;
VALUE              45 range.c        	v = rb_rescue(range_check, (VALUE)args, range_failed, 0);
VALUE              54 range.c        VALUE
VALUE              55 range.c        rb_range_new(VALUE beg, VALUE end, int exclude_end)
VALUE              57 range.c            VALUE range = rb_obj_alloc(rb_cRange);
VALUE              72 range.c        static VALUE
VALUE              73 range.c        range_initialize(int argc, VALUE *argv, VALUE range)
VALUE              75 range.c            VALUE beg, end, flags;
VALUE              94 range.c        static VALUE
VALUE              95 range.c        range_exclude_end_p(VALUE range)
VALUE             115 range.c        static VALUE
VALUE             116 range.c        range_eq(VALUE range, VALUE obj)
VALUE             133 range.c        r_lt(VALUE a, VALUE b)
VALUE             135 range.c            VALUE r = rb_funcall(a, id_cmp, 1, b);
VALUE             143 range.c        r_le(VALUE a, VALUE b)
VALUE             146 range.c            VALUE r = rb_funcall(a, id_cmp, 1, b);
VALUE             170 range.c        static VALUE
VALUE             171 range.c        range_eql(VALUE range, VALUE obj)
VALUE             196 range.c        static VALUE
VALUE             197 range.c        range_hash(VALUE range)
VALUE             200 range.c            VALUE v;
VALUE             211 range.c        static VALUE
VALUE             212 range.c        str_step(VALUE arg)
VALUE             214 range.c            VALUE *args = (VALUE *)arg;
VALUE             220 range.c        range_each_func(VALUE range, VALUE (*func) (VALUE, void *), VALUE v, VALUE e, void *arg)
VALUE             239 range.c        static VALUE
VALUE             240 range.c        step_i(VALUE i, void *arg)
VALUE             280 range.c        static VALUE
VALUE             281 range.c        range_step(int argc, VALUE *argv, VALUE range)
VALUE             283 range.c            VALUE b, e, step;
VALUE             309 range.c        	VALUE tmp = rb_check_string_type(b);
VALUE             312 range.c        	    VALUE args[5];
VALUE             318 range.c        	    rb_iterate(str_step, (VALUE)args, step_i, (VALUE)iter);
VALUE             344 range.c        static VALUE
VALUE             345 range.c        each_i(VALUE v, void *arg)
VALUE             369 range.c        static VALUE
VALUE             370 range.c        range_each(VALUE range)
VALUE             372 range.c            VALUE beg, end;
VALUE             393 range.c        	VALUE args[5];
VALUE             398 range.c        	rb_iterate(str_step, (VALUE)args, step_i, (VALUE)iter);
VALUE             414 range.c        static VALUE
VALUE             415 range.c        range_first(VALUE range)
VALUE             433 range.c        static VALUE
VALUE             434 range.c        range_last(VALUE range)
VALUE             451 range.c        static VALUE
VALUE             452 range.c        range_min(VALUE range)
VALUE             458 range.c        	VALUE b = rb_ivar_get(range, id_beg);
VALUE             459 range.c        	VALUE e = rb_ivar_get(range, id_end);
VALUE             479 range.c        static VALUE
VALUE             480 range.c        range_max(VALUE range)
VALUE             482 range.c            VALUE e = rb_ivar_get(range, id_end);
VALUE             489 range.c        	VALUE b = rb_ivar_get(range, id_beg);
VALUE             503 range.c        VALUE
VALUE             504 range.c        rb_range_beg_len(VALUE range, long *begp, long *lenp, long len, int err)
VALUE             506 range.c            VALUE b, e;
VALUE             556 range.c        static VALUE
VALUE             557 range.c        range_to_s(VALUE range)
VALUE             559 range.c            VALUE str, str2;
VALUE             581 range.c        static VALUE
VALUE             582 range.c        range_inspect(VALUE range)
VALUE             584 range.c            VALUE str, str2;
VALUE             618 range.c        static VALUE
VALUE             619 range.c        range_include(VALUE range, VALUE val)
VALUE             621 range.c            VALUE beg = rb_ivar_get(range, id_beg);
VALUE             622 range.c            VALUE end = rb_ivar_get(range, id_end);
VALUE             656 range.c        static VALUE
VALUE             658 range.c            VALUE range, val;
VALUE             660 range.c            VALUE beg, end;
VALUE              22 re.c           static VALUE rb_eRegexpError;
VALUE             198 re.c           kcode_set_option(VALUE re)
VALUE             241 re.c           rb_reg_mbclen2(unsigned int c, VALUE re)
VALUE             255 re.c           rb_reg_check(VALUE re)
VALUE             263 re.c           rb_reg_expr_str(VALUE str, const char *s, long len)
VALUE             315 re.c           static VALUE
VALUE             316 re.c           rb_reg_desc(const char *s, long len, VALUE re)
VALUE             318 re.c               VALUE str = rb_str_buf_new2("/");
VALUE             362 re.c           static VALUE
VALUE             363 re.c           rb_reg_source(VALUE re)
VALUE             365 re.c               VALUE str;
VALUE             384 re.c           static VALUE
VALUE             385 re.c           rb_reg_inspect(VALUE re)
VALUE             412 re.c           static VALUE
VALUE             413 re.c           rb_reg_to_s(VALUE re)
VALUE             419 re.c               VALUE str = rb_str_buf_new2("(?");
VALUE             510 re.c           rb_reg_raise(const char *s, long len, const char *err, VALUE re, int ce)
VALUE             512 re.c               VALUE desc = rb_reg_desc(s, len, re);
VALUE             528 re.c           static VALUE
VALUE             529 re.c           rb_reg_casefold_p(VALUE re)
VALUE             560 re.c           static VALUE
VALUE             561 re.c           rb_reg_options_m(VALUE re)
VALUE             575 re.c           static VALUE
VALUE             576 re.c           rb_reg_kcode_m(VALUE re)
VALUE             648 re.c           static VALUE rb_cMatch;
VALUE             650 re.c           static VALUE
VALUE             651 re.c           match_alloc(VALUE klass)
VALUE             661 re.c               return (VALUE)match;
VALUE             665 re.c           static VALUE
VALUE             666 re.c           match_init_copy(VALUE obj, VALUE orig)
VALUE             694 re.c           static VALUE
VALUE             695 re.c           match_size(VALUE match)
VALUE             713 re.c           static VALUE
VALUE             714 re.c           match_offset(VALUE match, VALUE n)
VALUE             741 re.c           static VALUE
VALUE             742 re.c           match_begin(VALUE match, VALUE n)
VALUE             768 re.c           static VALUE
VALUE             769 re.c           match_end(VALUE match, VALUE n)
VALUE             785 re.c           rb_match_busy(VALUE match)
VALUE             794 re.c           rb_reg_prepare_re(VALUE re)
VALUE             844 re.c           rb_reg_adjust_startpos(VALUE re, VALUE str, long pos, long reverse)
VALUE             883 re.c           rb_reg_search(VALUE re, VALUE str, long pos, long reverse)
VALUE             886 re.c               VALUE match;
VALUE             952 re.c           VALUE
VALUE             953 re.c           rb_reg_nth_defined(int nth, VALUE match)
VALUE             967 re.c           VALUE
VALUE             968 re.c           rb_reg_nth_match(int nth, VALUE match)
VALUE             970 re.c               VALUE str;
VALUE             990 re.c           VALUE
VALUE             991 re.c           rb_reg_last_match(VALUE match)
VALUE            1008 re.c           VALUE
VALUE            1009 re.c           rb_reg_match_pre(VALUE match)
VALUE            1011 re.c               VALUE str;
VALUE            1032 re.c           VALUE
VALUE            1033 re.c           rb_reg_match_post(VALUE match)
VALUE            1035 re.c               VALUE str;
VALUE            1047 re.c           VALUE
VALUE            1048 re.c           rb_reg_match_last(VALUE match)
VALUE            1061 re.c           static VALUE
VALUE            1067 re.c           static VALUE
VALUE            1073 re.c           static VALUE
VALUE            1079 re.c           static VALUE
VALUE            1085 re.c           static VALUE
VALUE            1086 re.c           match_array(VALUE match, int start)
VALUE            1089 re.c               VALUE ary = rb_ary_new2(regs->num_regs);
VALUE            1090 re.c               VALUE target = RMATCH(match)->str;
VALUE            1099 re.c           	    VALUE str = rb_str_substr(target, regs->beg[i], regs->end[i]-regs->beg[i]);
VALUE            1134 re.c           static VALUE
VALUE            1135 re.c           match_to_a(VALUE match)
VALUE            1153 re.c           static VALUE
VALUE            1154 re.c           match_captures(VALUE match)
VALUE            1179 re.c           static VALUE
VALUE            1180 re.c           match_aref(int argc, VALUE *argv, VALUE match)
VALUE            1182 re.c               VALUE idx, rest;
VALUE            1192 re.c           static VALUE
VALUE            1193 re.c           match_entry(VALUE match, long n)
VALUE            1211 re.c           static VALUE
VALUE            1212 re.c           match_values_at(int argc, VALUE *argv, VALUE match)
VALUE            1230 re.c           static VALUE
VALUE            1231 re.c           match_select(int argc, VALUE *argv, VALUE match)
VALUE            1238 re.c           	VALUE target = RMATCH(match)->str;
VALUE            1239 re.c           	VALUE result = rb_ary_new();
VALUE            1244 re.c           	    VALUE str = rb_str_substr(target, regs->beg[i], regs->end[i]-regs->beg[i]);
VALUE            1265 re.c           static VALUE
VALUE            1266 re.c           match_to_s(VALUE match)
VALUE            1268 re.c               VALUE str = rb_reg_last_match(match);
VALUE            1287 re.c           static VALUE
VALUE            1288 re.c           match_string(VALUE match)
VALUE            1293 re.c           VALUE rb_cRegexp;
VALUE            1296 re.c           rb_reg_initialize(VALUE obj, const char *s, long len,
VALUE            1333 re.c           	kcode_set_option((VALUE)re);
VALUE            1349 re.c           static VALUE
VALUE            1350 re.c           rb_reg_s_alloc(VALUE klass)
VALUE            1359 re.c               return (VALUE)re;
VALUE            1362 re.c           VALUE
VALUE            1365 re.c               VALUE re = rb_reg_s_alloc(rb_cRegexp);
VALUE            1368 re.c               return (VALUE)re;
VALUE            1371 re.c           VALUE
VALUE            1374 re.c               VALUE re = rb_reg_s_alloc(rb_cRegexp);
VALUE            1377 re.c               return (VALUE)re;
VALUE            1382 re.c           static VALUE reg_cache;
VALUE            1384 re.c           VALUE
VALUE            1385 re.c           rb_reg_regcomp(VALUE str)
VALUE            1387 re.c               volatile VALUE save_str = str;
VALUE            1401 re.c           rb_reg_cur_kcode(VALUE re)
VALUE            1416 re.c           static VALUE
VALUE            1417 re.c           rb_reg_hash(VALUE re)
VALUE            1449 re.c           static VALUE
VALUE            1450 re.c           rb_reg_equal(VALUE re1, VALUE re2)
VALUE            1464 re.c           static VALUE
VALUE            1465 re.c           rb_reg_match_pos(VALUE re, VALUE str, long pos)
VALUE            1497 re.c           VALUE
VALUE            1498 re.c           rb_reg_match(VALUE re, VALUE str)
VALUE            1521 re.c           VALUE
VALUE            1522 re.c           rb_reg_eqq(VALUE re, VALUE str)
VALUE            1553 re.c           VALUE
VALUE            1554 re.c           rb_reg_match2(VALUE re)
VALUE            1557 re.c               VALUE line = rb_lastline_get();
VALUE            1587 re.c           static VALUE
VALUE            1588 re.c           rb_reg_match_m(int argc, VALUE *argv, VALUE re)
VALUE            1590 re.c               VALUE result, str, initpos;
VALUE            1641 re.c           static VALUE
VALUE            1642 re.c           rb_reg_initialize_m(int argc, VALUE *argv, VALUE self)
VALUE            1712 re.c           VALUE
VALUE            1713 re.c           rb_reg_quote(VALUE str)
VALUE            1716 re.c               VALUE tmp;
VALUE            1810 re.c           static VALUE
VALUE            1811 re.c           rb_reg_s_quote(int argc, VALUE *argv)
VALUE            1813 re.c               VALUE str, kcode;
VALUE            1845 re.c           rb_reg_get_kcode(VALUE re)
VALUE            1862 re.c           rb_reg_options(VALUE re)
VALUE            1890 re.c           static VALUE
VALUE            1891 re.c           rb_reg_s_union(int argc, VALUE *argv)
VALUE            1894 re.c                   VALUE args[1];
VALUE            1899 re.c                   VALUE v;
VALUE            1904 re.c                       VALUE args[1];
VALUE            1911 re.c                   VALUE kcode_re = Qnil;
VALUE            1912 re.c                   VALUE source = rb_str_buf_new(0);
VALUE            1913 re.c                   VALUE args[3];
VALUE            1915 re.c                       volatile VALUE v;
VALUE            1926 re.c                                   volatile VALUE str1, str2;
VALUE            1965 re.c           static VALUE
VALUE            1966 re.c           rb_reg_init_copy(VALUE copy, VALUE re)
VALUE            1980 re.c           VALUE
VALUE            1981 re.c           rb_reg_regsub(VALUE str, VALUE src, struct re_registers *regs)
VALUE            1983 re.c               VALUE val = 0;
VALUE            2080 re.c           static VALUE
VALUE            2120 re.c           kcode_setter(VALUE val)
VALUE            2126 re.c           static VALUE
VALUE            2133 re.c           ignorecase_setter(VALUE val, ID id)
VALUE            2140 re.c           static VALUE
VALUE            2143 re.c               VALUE match = rb_backref_get();
VALUE            2151 re.c           match_setter(VALUE val)
VALUE            2176 re.c           static VALUE
VALUE            2177 re.c           rb_reg_s_last_match(int argc, VALUE *argv)
VALUE            2179 re.c               VALUE nth;
VALUE              25 re.h               VALUE str;
VALUE              31 re.h           VALUE rb_reg_regcomp(VALUE);
VALUE              32 re.h           long rb_reg_search(VALUE, VALUE, long, long);
VALUE              33 re.h           VALUE rb_reg_regsub(VALUE, VALUE, struct re_registers *);
VALUE              34 re.h           long rb_reg_adjust_startpos(VALUE, VALUE, long, long);
VALUE              35 re.h           void rb_match_busy(VALUE);
VALUE              36 re.h           VALUE rb_reg_quote(VALUE);
VALUE              40 re.h           int rb_reg_mbclen2(unsigned int, VALUE);
VALUE            1000 regexec.c      static VALUE
VALUE            1001 regexec.c      trap_ensure(VALUE arg)
VALUE            1016 regexec.c      static VALUE
VALUE            1017 regexec.c      trap_exec(VALUE arg)
VALUE            1031 regexec.c        VALUE arg;
VALUE            1038 regexec.c        arg = (VALUE )(&ta);
VALUE            1101 regexec.c      static VALUE onig_stat_print()
VALUE              49 ruby.c         VALUE ruby_debug = Qfalse;
VALUE              50 ruby.c         VALUE ruby_verbose = Qfalse;
VALUE              61 ruby.c         static VALUE do_loop = Qfalse, do_print = Qfalse;
VALUE              62 ruby.c         static VALUE do_check = Qfalse, do_line = Qfalse;
VALUE              63 ruby.c         static VALUE do_split = Qfalse;
VALUE             109 ruby.c         extern VALUE rb_load_path;
VALUE             172 ruby.c         ruby_push_include(const char *path, VALUE (*filter) (VALUE))
VALUE             186 ruby.c         	VALUE ary = rb_ary_new();
VALUE             207 ruby.c         static VALUE
VALUE             208 ruby.c         identical_path(VALUE path)
VALUE             219 ruby.c         static VALUE
VALUE             220 ruby.c         expand_include_path(VALUE path)
VALUE             373 ruby.c         	rb_protect((VALUE (*)(VALUE))rb_require, (VALUE)list->name, &state);
VALUE             384 ruby.c             rb_gc_force_recycle((VALUE)save[1]);
VALUE             393 ruby.c         	VALUE *args;
VALUE             398 ruby.c         	    VALUE v = *args++;
VALUE             419 ruby.c         		    VALUE name_error[2];
VALUE             481 ruby.c             VALUE e_script = Qfalse;
VALUE             849 ruby.c             extern VALUE rb_stdin;
VALUE             850 ruby.c             VALUE parser;
VALUE             851 ruby.c             VALUE f;
VALUE             877 ruby.c         	VALUE c = 1;		/* something not nil */
VALUE             878 ruby.c         	VALUE line;
VALUE             986 ruby.c         VALUE rb_progname;
VALUE             987 ruby.c         VALUE rb_argv;
VALUE             988 ruby.c         VALUE rb_argv0;
VALUE            1018 ruby.c         set_arg0(VALUE val, ID id)
VALUE            1130 ruby.c         verbose_setter(VALUE val, ID id, VALUE *variable)
VALUE            1135 ruby.c         static VALUE
VALUE            1136 ruby.c         opt_W_getter(VALUE val, ID id)
VALUE            1189 ruby.c         	VALUE arg = rb_tainted_str_new2(argv[i]);
VALUE             149 ruby.h         #define INT2FIX(i) ((VALUE)(((long)(i))<<1 | FIXNUM_FLAG))
VALUE             152 ruby.h         VALUE rb_int2inum(long);
VALUE             156 ruby.h         VALUE rb_uint2inum(unsigned long);
VALUE             162 ruby.h         VALUE rb_ll2inum(LONG_LONG);
VALUE             164 ruby.h         VALUE rb_ull2inum(unsigned LONG_LONG);
VALUE             182 ruby.h         #define IMMEDIATE_P(x) ((VALUE)(x) & IMMEDIATE_MASK)
VALUE             185 ruby.h         #define SYMBOL_P(x) (((VALUE)(x)&0xff)==SYMBOL_FLAG)
VALUE             186 ruby.h         #define ID2SYM(x) ((VALUE)(((long)(x))<<8|SYMBOL_FLAG))
VALUE             190 ruby.h         #define Qfalse ((VALUE)0)
VALUE             191 ruby.h         #define Qtrue  ((VALUE)2)
VALUE             192 ruby.h         #define Qnil   ((VALUE)4)
VALUE             193 ruby.h         #define Qundef ((VALUE)6)	/* undefined value for placeholder */
VALUE             195 ruby.h         #define RTEST(v) (((VALUE)(v) & ~Qnil) != 0)
VALUE             196 ruby.h         #define NIL_P(v) ((VALUE)(v) == Qnil)
VALUE             198 ruby.h         #define CLASS_OF(v) rb_class_of((VALUE)(v))
VALUE             233 ruby.h         #define TYPE(x) rb_type((VALUE)(x))
VALUE             235 ruby.h         void rb_check_type(VALUE,int);
VALUE             236 ruby.h         #define Check_Type(v,t) rb_check_type((VALUE)(v),t)
VALUE             238 ruby.h         VALUE rb_str_to_str(VALUE);
VALUE             239 ruby.h         VALUE rb_string_value(volatile VALUE*);
VALUE             240 ruby.h         char *rb_string_value_ptr(volatile VALUE*);
VALUE             241 ruby.h         char *rb_string_value_cstr(volatile VALUE*);
VALUE             247 ruby.h         void rb_check_safe_obj(VALUE);
VALUE             248 ruby.h         void rb_check_safe_str(VALUE);
VALUE             254 ruby.h         #define Check_SafeStr(v) rb_check_safe_str((VALUE)(v))
VALUE             256 ruby.h         VALUE rb_get_path(VALUE);
VALUE             263 ruby.h         void rb_secure_update(VALUE);
VALUE             265 ruby.h         long rb_num2long(VALUE);
VALUE             266 ruby.h         unsigned long rb_num2ulong(VALUE);
VALUE             267 ruby.h         #define NUM2LONG(x) (FIXNUM_P(x)?FIX2LONG(x):rb_num2long((VALUE)x))
VALUE             268 ruby.h         #define NUM2ULONG(x) rb_num2ulong((VALUE)x)
VALUE             270 ruby.h         long rb_num2int(VALUE);
VALUE             271 ruby.h         #define NUM2INT(x) (FIXNUM_P(x)?FIX2INT(x):rb_num2int((VALUE)x))
VALUE             272 ruby.h         long rb_fix2int(VALUE);
VALUE             273 ruby.h         #define FIX2INT(x) rb_fix2int((VALUE)x)
VALUE             274 ruby.h         unsigned long rb_num2uint(VALUE);
VALUE             276 ruby.h         unsigned long rb_fix2uint(VALUE);
VALUE             286 ruby.h         LONG_LONG rb_num2ll(VALUE);
VALUE             287 ruby.h         unsigned LONG_LONG rb_num2ull(VALUE);
VALUE             288 ruby.h         # define NUM2LL(x) (FIXNUM_P(x)?FIX2LONG(x):rb_num2ll((VALUE)x))
VALUE             289 ruby.h         # define NUM2ULL(x) rb_num2ull((VALUE)x)
VALUE             298 ruby.h         double rb_num2dbl(VALUE);
VALUE             299 ruby.h         #define NUM2DBL(x) rb_num2dbl((VALUE)(x))
VALUE             302 ruby.h         char *rb_str2cstr(VALUE,long*);
VALUE             304 ruby.h         #define STR2CSTR(x) rb_str2cstr((VALUE)(x),0)
VALUE             310 ruby.h         VALUE rb_newobj(void);
VALUE             318 ruby.h             OBJSETUP(clone,rb_singleton_class_clone((VALUE)obj),RBASIC(obj)->flags);\
VALUE             319 ruby.h             rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)clone);\
VALUE             320 ruby.h             if (FL_TEST(obj, FL_EXIVAR)) rb_copy_generic_ivar((VALUE)clone,(VALUE)obj);\
VALUE             324 ruby.h             if (FL_TEST(obj, FL_EXIVAR)) rb_copy_generic_ivar((VALUE)dup,(VALUE)obj);\
VALUE             329 ruby.h             VALUE klass;
VALUE             341 ruby.h             VALUE super;
VALUE             357 ruby.h         	VALUE shared;
VALUE             366 ruby.h         	VALUE shared;
VALUE             368 ruby.h             VALUE *ptr;
VALUE             382 ruby.h             VALUE ifnone;
VALUE             404 ruby.h         VALUE rb_data_object_alloc(VALUE,void*,RUBY_DATA_FUNC,RUBY_DATA_FUNC);
VALUE             423 ruby.h             VALUE *ptr;
VALUE             493 ruby.h         void rb_obj_infect(VALUE,VALUE);
VALUE             496 ruby.h         void rb_glob(const char*,void(*)(const char*,VALUE),VALUE);
VALUE             497 ruby.h         int ruby_glob(const char*,int,ruby_glob_func*,VALUE);
VALUE             498 ruby.h         int ruby_brace_expand(const char*,int,ruby_glob_func*,VALUE);
VALUE             499 ruby.h         int ruby_brace_glob(const char*,int,ruby_glob_func*,VALUE);
VALUE             501 ruby.h         VALUE rb_define_class(const char*,VALUE);
VALUE             502 ruby.h         VALUE rb_define_module(const char*);
VALUE             503 ruby.h         VALUE rb_define_class_under(VALUE, const char*, VALUE);
VALUE             504 ruby.h         VALUE rb_define_module_under(VALUE, const char*);
VALUE             506 ruby.h         void rb_include_module(VALUE,VALUE);
VALUE             507 ruby.h         void rb_extend_object(VALUE,VALUE);
VALUE             509 ruby.h         void rb_define_variable(const char*,VALUE*);
VALUE             510 ruby.h         void rb_define_virtual_variable(const char*,VALUE(*)(ANYARGS),void(*)(ANYARGS));
VALUE             511 ruby.h         void rb_define_hooked_variable(const char*,VALUE*,VALUE(*)(ANYARGS),void(*)(ANYARGS));
VALUE             512 ruby.h         void rb_define_readonly_variable(const char*,VALUE*);
VALUE             513 ruby.h         void rb_define_const(VALUE,const char*,VALUE);
VALUE             514 ruby.h         void rb_define_global_const(const char*,VALUE);
VALUE             516 ruby.h         #define RUBY_METHOD_FUNC(func) ((VALUE (*)(ANYARGS))func)
VALUE             517 ruby.h         void rb_define_method(VALUE,const char*,VALUE(*)(ANYARGS),int);
VALUE             518 ruby.h         void rb_define_module_function(VALUE,const char*,VALUE(*)(ANYARGS),int);
VALUE             519 ruby.h         void rb_define_global_function(const char*,VALUE(*)(ANYARGS),int);
VALUE             521 ruby.h         void rb_undef_method(VALUE,const char*);
VALUE             522 ruby.h         void rb_define_alias(VALUE,const char*,const char*);
VALUE             523 ruby.h         void rb_define_attr(VALUE,const char*,int,int);
VALUE             525 ruby.h         void rb_global_variable(VALUE*);
VALUE             526 ruby.h         void rb_gc_register_address(VALUE*);
VALUE             527 ruby.h         void rb_gc_unregister_address(VALUE*);
VALUE             531 ruby.h         ID rb_to_id(VALUE);
VALUE             533 ruby.h         char *rb_class2name(VALUE);
VALUE             534 ruby.h         char *rb_obj_classname(VALUE);
VALUE             536 ruby.h         void rb_p(VALUE);
VALUE             538 ruby.h         VALUE rb_eval_string(const char*);
VALUE             539 ruby.h         VALUE rb_eval_string_protect(const char*, int*);
VALUE             540 ruby.h         VALUE rb_eval_string_wrap(const char*, int*);
VALUE             541 ruby.h         VALUE rb_funcall(VALUE, ID, int, ...);
VALUE             542 ruby.h         VALUE rb_funcall2(VALUE, ID, int, const VALUE*);
VALUE             543 ruby.h         VALUE rb_funcall3(VALUE, ID, int, const VALUE*);
VALUE             544 ruby.h         int rb_scan_args(int, const VALUE*, const char*, ...);
VALUE             545 ruby.h         VALUE rb_call_super(int, const VALUE*);
VALUE             547 ruby.h         VALUE rb_gv_set(const char*, VALUE);
VALUE             548 ruby.h         VALUE rb_gv_get(const char*);
VALUE             549 ruby.h         VALUE rb_iv_get(VALUE, const char*);
VALUE             550 ruby.h         VALUE rb_iv_set(VALUE, const char*, VALUE);
VALUE             552 ruby.h         VALUE rb_equal(VALUE,VALUE);
VALUE             554 ruby.h         RUBY_EXTERN VALUE ruby_verbose, ruby_debug;
VALUE             556 ruby.h         PRINTF_ARGS(NORETURN(void rb_raise(VALUE, const char*, ...)), 2, 3);
VALUE             571 ruby.h         VALUE rb_each(VALUE);
VALUE             572 ruby.h         VALUE rb_yield(VALUE);
VALUE             573 ruby.h         VALUE rb_yield_values(int n, ...);
VALUE             574 ruby.h         VALUE rb_yield_splat(VALUE);
VALUE             577 ruby.h         VALUE rb_iterate(VALUE(*)(VALUE),VALUE,VALUE(*)(ANYARGS),VALUE);
VALUE             578 ruby.h         VALUE rb_rescue(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE);
VALUE             579 ruby.h         VALUE rb_rescue2(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE,...);
VALUE             580 ruby.h         VALUE rb_ensure(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE);
VALUE             581 ruby.h         VALUE rb_catch(const char*,VALUE(*)(ANYARGS),VALUE);
VALUE             582 ruby.h         NORETURN(void rb_throw(const char*,VALUE));
VALUE             584 ruby.h         VALUE rb_require(const char*);
VALUE             587 ruby.h         void ruby_init_stack(VALUE*, void*);
VALUE             589 ruby.h             VALUE variable_in_this_stack_frame; \
VALUE             592 ruby.h         void ruby_init_stack(VALUE*);
VALUE             594 ruby.h             VALUE variable_in_this_stack_frame; \
VALUE             601 ruby.h         RUBY_EXTERN VALUE rb_mKernel;
VALUE             602 ruby.h         RUBY_EXTERN VALUE rb_mComparable;
VALUE             603 ruby.h         RUBY_EXTERN VALUE rb_mEnumerable;
VALUE             604 ruby.h         RUBY_EXTERN VALUE rb_mPrecision;
VALUE             605 ruby.h         RUBY_EXTERN VALUE rb_mErrno;
VALUE             606 ruby.h         RUBY_EXTERN VALUE rb_mFileTest;
VALUE             607 ruby.h         RUBY_EXTERN VALUE rb_mGC;
VALUE             608 ruby.h         RUBY_EXTERN VALUE rb_mMath;
VALUE             609 ruby.h         RUBY_EXTERN VALUE rb_mProcess;
VALUE             611 ruby.h         RUBY_EXTERN VALUE rb_cObject;
VALUE             612 ruby.h         RUBY_EXTERN VALUE rb_cArray;
VALUE             613 ruby.h         RUBY_EXTERN VALUE rb_cValues;
VALUE             614 ruby.h         RUBY_EXTERN VALUE rb_cBignum;
VALUE             615 ruby.h         RUBY_EXTERN VALUE rb_cClass;
VALUE             616 ruby.h         RUBY_EXTERN VALUE rb_cDir;
VALUE             617 ruby.h         RUBY_EXTERN VALUE rb_cData;
VALUE             618 ruby.h         RUBY_EXTERN VALUE rb_cFalseClass;
VALUE             619 ruby.h         RUBY_EXTERN VALUE rb_cFile;
VALUE             620 ruby.h         RUBY_EXTERN VALUE rb_cFixnum;
VALUE             621 ruby.h         RUBY_EXTERN VALUE rb_cFloat;
VALUE             622 ruby.h         RUBY_EXTERN VALUE rb_cHash;
VALUE             623 ruby.h         RUBY_EXTERN VALUE rb_cInteger;
VALUE             624 ruby.h         RUBY_EXTERN VALUE rb_cIO;
VALUE             625 ruby.h         RUBY_EXTERN VALUE rb_cModule;
VALUE             626 ruby.h         RUBY_EXTERN VALUE rb_cNilClass;
VALUE             627 ruby.h         RUBY_EXTERN VALUE rb_cNumeric;
VALUE             628 ruby.h         RUBY_EXTERN VALUE rb_cProc;
VALUE             629 ruby.h         RUBY_EXTERN VALUE rb_cRange;
VALUE             630 ruby.h         RUBY_EXTERN VALUE rb_cRegexp;
VALUE             631 ruby.h         RUBY_EXTERN VALUE rb_cString;
VALUE             632 ruby.h         RUBY_EXTERN VALUE rb_cSymbol;
VALUE             633 ruby.h         RUBY_EXTERN VALUE rb_cThread;
VALUE             634 ruby.h         RUBY_EXTERN VALUE rb_cTime;
VALUE             635 ruby.h         RUBY_EXTERN VALUE rb_cTrueClass;
VALUE             636 ruby.h         RUBY_EXTERN VALUE rb_cStruct;
VALUE             638 ruby.h         RUBY_EXTERN VALUE rb_eException;
VALUE             639 ruby.h         RUBY_EXTERN VALUE rb_eStandardError;
VALUE             640 ruby.h         RUBY_EXTERN VALUE rb_eSystemExit;
VALUE             641 ruby.h         RUBY_EXTERN VALUE rb_eInterrupt;
VALUE             642 ruby.h         RUBY_EXTERN VALUE rb_eSignal;
VALUE             643 ruby.h         RUBY_EXTERN VALUE rb_eFatal;
VALUE             644 ruby.h         RUBY_EXTERN VALUE rb_eArgError;
VALUE             645 ruby.h         RUBY_EXTERN VALUE rb_eEOFError;
VALUE             646 ruby.h         RUBY_EXTERN VALUE rb_eIndexError;
VALUE             647 ruby.h         RUBY_EXTERN VALUE rb_eKeyError;
VALUE             648 ruby.h         RUBY_EXTERN VALUE rb_eRangeError;
VALUE             649 ruby.h         RUBY_EXTERN VALUE rb_eIOError;
VALUE             650 ruby.h         RUBY_EXTERN VALUE rb_eRuntimeError;
VALUE             651 ruby.h         RUBY_EXTERN VALUE rb_eSecurityError;
VALUE             652 ruby.h         RUBY_EXTERN VALUE rb_eSystemCallError;
VALUE             653 ruby.h         RUBY_EXTERN VALUE rb_eTypeError;
VALUE             654 ruby.h         RUBY_EXTERN VALUE rb_eZeroDivError;
VALUE             655 ruby.h         RUBY_EXTERN VALUE rb_eNotImpError;
VALUE             656 ruby.h         RUBY_EXTERN VALUE rb_eNoMemError;
VALUE             657 ruby.h         RUBY_EXTERN VALUE rb_eNoMethodError;
VALUE             658 ruby.h         RUBY_EXTERN VALUE rb_eFloatDomainError;
VALUE             660 ruby.h         RUBY_EXTERN VALUE rb_eScriptError;
VALUE             661 ruby.h         RUBY_EXTERN VALUE rb_eNameError;
VALUE             662 ruby.h         RUBY_EXTERN VALUE rb_eSyntaxError;
VALUE             663 ruby.h         RUBY_EXTERN VALUE rb_eLoadError;
VALUE             665 ruby.h         RUBY_EXTERN VALUE rb_stdin, rb_stdout, rb_stderr;
VALUE             666 ruby.h         RUBY_EXTERN VALUE ruby_errinfo;
VALUE             668 ruby.h         static inline VALUE
VALUE             669 ruby.h         rb_class_of(VALUE obj)
VALUE             684 ruby.h         rb_type(VALUE obj)
VALUE             700 ruby.h         rb_special_const_p(VALUE obj)
VALUE              97 rubyio.h       VALUE rb_io_taint_check(VALUE);
VALUE              75 rubysig.h      VALUE rb_with_disable_interrupt(VALUE(*)(ANYARGS),VALUE);
VALUE             223 signal.c       VALUE
VALUE             224 signal.c       rb_f_kill(int argc, VALUE *argv)
VALUE             262 signal.c       	    VALUE str;
VALUE             298 signal.c           VALUE cmd;
VALUE             520 signal.c       	VALUE trap_exit = trap_list[0].cmd;
VALUE             552 signal.c           VALUE sig, cmd;
VALUE             561 signal.c       static VALUE
VALUE             565 signal.c           VALUE command, oldcmd;
VALUE             700 signal.c       static VALUE
VALUE             754 signal.c       static VALUE
VALUE             755 signal.c       sig_trap(int argc, VALUE *argv)
VALUE             784 signal.c           return rb_ensure(trap, (VALUE)&arg, trap_ensure, (VALUE)&arg);
VALUE             799 signal.c       static VALUE
VALUE             802 signal.c           VALUE h = rb_hash_new();
VALUE             923 signal.c           VALUE mSignal = rb_define_module("Signal");
VALUE             237 sprintf.c      VALUE
VALUE             238 sprintf.c      rb_f_sprintf(int argc, const VALUE *argv)
VALUE             243 sprintf.c      VALUE
VALUE             244 sprintf.c      rb_str_format(int argc, const VALUE *argv, VALUE fmt)
VALUE             249 sprintf.c          VALUE result;
VALUE             255 sprintf.c          VALUE nextvalue;
VALUE             256 sprintf.c          VALUE tmp;
VALUE             257 sprintf.c          VALUE str;
VALUE             394 sprintf.c      		VALUE val = GETARG();
VALUE             411 sprintf.c      		VALUE arg = GETARG();
VALUE             455 sprintf.c      		volatile VALUE val = GETARG();
VALUE             607 sprintf.c                              volatile VALUE tmp1;
VALUE             702 sprintf.c      		VALUE val = GETARG();
VALUE             848 sprintf.c          VALUE result = (VALUE)fp->_bf._base;
VALUE             870 sprintf.c      VALUE
VALUE             874 sprintf.c          VALUE result;
VALUE             891 sprintf.c      VALUE
VALUE             894 sprintf.c          VALUE result;
VALUE              28 string.c       VALUE rb_cString;
VALUE              40 string.c       VALUE rb_fs;
VALUE              43 string.c       str_mod_check(VALUE s, char *p, long len)
VALUE              51 string.c       str_frozen_check(VALUE s)
VALUE              58 string.c       static VALUE
VALUE              59 string.c       str_alloc(VALUE klass)
VALUE              68 string.c           return (VALUE)str;
VALUE              71 string.c       static VALUE
VALUE              72 string.c       str_new(VALUE klass, const char *ptr, long len)
VALUE              74 string.c           VALUE str;
VALUE              91 string.c       VALUE
VALUE              97 string.c       VALUE
VALUE             106 string.c       VALUE
VALUE             109 string.c           VALUE str = rb_str_new(ptr, len);
VALUE             115 string.c       VALUE
VALUE             118 string.c           VALUE str = rb_str_new2(ptr);
VALUE             124 string.c       static VALUE
VALUE             125 string.c       str_new3(VALUE klass, VALUE str)
VALUE             127 string.c           VALUE str2 = str_alloc(klass);
VALUE             138 string.c       VALUE
VALUE             139 string.c       rb_str_new3(VALUE str)
VALUE             144 string.c       static VALUE
VALUE             145 string.c       str_new4(VALUE klass, VALUE str)
VALUE             147 string.c           VALUE str2 = str_alloc(klass);
VALUE             163 string.c       VALUE
VALUE             164 string.c       rb_str_new4(VALUE orig)
VALUE             166 string.c           VALUE klass, str;
VALUE             190 string.c       VALUE
VALUE             191 string.c       rb_str_new5(VALUE obj, const char *ptr, long len)
VALUE             198 string.c       VALUE
VALUE             201 string.c           VALUE str = str_alloc(rb_cString);
VALUE             215 string.c       VALUE
VALUE             218 string.c           VALUE str;
VALUE             227 string.c       VALUE
VALUE             228 string.c       rb_str_to_str(VALUE str)
VALUE             234 string.c       rb_str_shared_replace(VALUE str, VALUE str2)
VALUE             258 string.c       VALUE
VALUE             259 string.c       rb_obj_as_string(VALUE obj)
VALUE             261 string.c           VALUE str;
VALUE             273 string.c       static VALUE rb_str_replace(VALUE, VALUE);
VALUE             275 string.c       VALUE
VALUE             276 string.c       rb_str_dup(VALUE str)
VALUE             278 string.c           VALUE dup = str_alloc(rb_obj_class(str));
VALUE             291 string.c       static VALUE
VALUE             292 string.c       rb_str_init(int argc, VALUE *argv, VALUE str)
VALUE             294 string.c           VALUE orig;
VALUE             308 string.c       static VALUE
VALUE             309 string.c       rb_str_length(VALUE str)
VALUE             324 string.c       static VALUE
VALUE             325 string.c       rb_str_empty(VALUE str)
VALUE             342 string.c       VALUE
VALUE             343 string.c       rb_str_plus(VALUE str1, VALUE str2)
VALUE             345 string.c           VALUE str3;
VALUE             369 string.c       VALUE
VALUE             370 string.c       rb_str_times(VALUE str, VALUE times)
VALUE             372 string.c           VALUE str2;
VALUE             409 string.c       static VALUE
VALUE             410 string.c       rb_str_format_m(VALUE str, VALUE arg)
VALUE             419 string.c       str_independent(VALUE str)
VALUE             432 string.c       str_make_independent(VALUE str)
VALUE             447 string.c       rb_str_modify(VALUE str)
VALUE             454 string.c       rb_str_associate(VALUE str, VALUE add)
VALUE             472 string.c       VALUE
VALUE             473 string.c       rb_str_associated(VALUE str)
VALUE             483 string.c       VALUE
VALUE             484 string.c       rb_string_value(volatile VALUE *ptr)
VALUE             486 string.c           VALUE s = *ptr;
VALUE             499 string.c       rb_string_value_ptr(volatile VALUE *ptr)
VALUE             505 string.c       rb_string_value_cstr(volatile VALUE *ptr)
VALUE             507 string.c           VALUE str = rb_string_value(ptr);
VALUE             516 string.c       VALUE
VALUE             517 string.c       rb_check_string_type(VALUE str)
VALUE             527 string.c       VALUE
VALUE             528 string.c       rb_str_substr(VALUE str, long beg, long len)
VALUE             530 string.c           VALUE str2;
VALUE             561 string.c       VALUE
VALUE             562 string.c       rb_str_freeze(VALUE str)
VALUE             567 string.c       VALUE
VALUE             568 string.c       rb_str_dup_frozen(VALUE str)
VALUE             571 string.c       	VALUE shared = RSTRING(str)->aux.shared;
VALUE             583 string.c       VALUE
VALUE             584 string.c       rb_str_locktmp(VALUE str)
VALUE             593 string.c       VALUE
VALUE             594 string.c       rb_str_unlocktmp(VALUE str)
VALUE             603 string.c       VALUE
VALUE             604 string.c       rb_str_resize(VALUE str, long len)
VALUE             624 string.c       VALUE
VALUE             625 string.c       rb_str_buf_cat(VALUE str, const char *ptr, long len)
VALUE             655 string.c       VALUE
VALUE             656 string.c       rb_str_buf_cat2(VALUE str, const char *ptr)
VALUE             661 string.c       VALUE
VALUE             662 string.c       rb_str_cat(VALUE str, const char *ptr, long len)
VALUE             679 string.c       VALUE
VALUE             680 string.c       rb_str_cat2(VALUE str, const char *ptr)
VALUE             685 string.c       VALUE
VALUE             686 string.c       rb_str_buf_append(VALUE str, VALUE str2)
VALUE             714 string.c       VALUE
VALUE             715 string.c       rb_str_append(VALUE str, VALUE str2)
VALUE             753 string.c       VALUE
VALUE             754 string.c       rb_str_concat(VALUE str1, VALUE str2)
VALUE             769 string.c       rb_str_hash(VALUE str)
VALUE             810 string.c       static VALUE
VALUE             811 string.c       rb_str_hash_m(VALUE str)
VALUE             820 string.c       rb_str_cmp(VALUE str1, VALUE str2)
VALUE             846 string.c       static VALUE
VALUE             847 string.c       rb_str_equal(VALUE str1, VALUE str2)
VALUE             870 string.c       static VALUE
VALUE             871 string.c       rb_str_eql(VALUE str1, VALUE str2)
VALUE             908 string.c       static VALUE
VALUE             909 string.c       rb_str_cmp_m(VALUE str1, VALUE str2)
VALUE             921 string.c       	    VALUE tmp = rb_funcall(str2, rb_intern("<=>"), 1, str1);
VALUE             948 string.c       static VALUE
VALUE             949 string.c       rb_str_casecmp(VALUE str1, VALUE str2)
VALUE             968 string.c       rb_str_index(VALUE str, VALUE sub, long offset)
VALUE            1003 string.c       static VALUE
VALUE            1004 string.c       rb_str_index_m(int argc, VALUE *argv, VALUE str)
VALUE            1006 string.c           VALUE sub;
VALUE            1007 string.c           VALUE initpos;
VALUE            1045 string.c       	  VALUE tmp;
VALUE            1065 string.c       rb_str_rindex(VALUE str, VALUE sub, long pos)
VALUE            1112 string.c       static VALUE
VALUE            1113 string.c       rb_str_rindex_m(int argc, VALUE *argv, VALUE str)
VALUE            1115 string.c           VALUE sub;
VALUE            1116 string.c           VALUE position;
VALUE            1191 string.c       static VALUE
VALUE            1192 string.c       rb_str_match(VALUE x, VALUE y)
VALUE            1207 string.c       static VALUE get_pat(VALUE, int);
VALUE            1225 string.c       static VALUE
VALUE            1226 string.c       rb_str_match_m(int argc, VALUE *argv, VALUE str)
VALUE            1228 string.c           VALUE re;
VALUE            1286 string.c       static VALUE
VALUE            1287 string.c       rb_str_succ(VALUE orig)
VALUE            1289 string.c           VALUE str;
VALUE            1337 string.c       static VALUE
VALUE            1338 string.c       rb_str_succ_bang(VALUE str)
VALUE            1345 string.c       VALUE
VALUE            1346 string.c       rb_str_upto(VALUE beg, VALUE end, int excl)
VALUE            1348 string.c           VALUE current, after_end;
VALUE            1392 string.c       static VALUE
VALUE            1393 string.c       rb_str_upto_m(VALUE beg, VALUE end)
VALUE            1398 string.c       static VALUE
VALUE            1399 string.c       rb_str_subpat(VALUE str, VALUE re, int nth)
VALUE            1407 string.c       static VALUE
VALUE            1408 string.c       rb_str_aref(VALUE str, VALUE indx)
VALUE            1437 string.c       	    VALUE tmp;
VALUE            1504 string.c       static VALUE
VALUE            1505 string.c       rb_str_aref_m(int argc, VALUE *argv, VALUE str)
VALUE            1520 string.c       rb_str_splice(VALUE str, long beg, long len, VALUE val)
VALUE            1565 string.c       rb_str_update(VALUE str, long beg, long len, VALUE val)
VALUE            1571 string.c       rb_str_subpat_set(VALUE str, VALUE re, int nth, VALUE val)
VALUE            1573 string.c           VALUE match;
VALUE            1600 string.c       static VALUE
VALUE            1601 string.c       rb_str_aset(VALUE str, VALUE indx, VALUE val)
VALUE            1682 string.c       static VALUE
VALUE            1683 string.c       rb_str_aset_m(int argc, VALUE *argv, VALUE str)
VALUE            1717 string.c       static VALUE
VALUE            1718 string.c       rb_str_insert(VALUE str, VALUE idx, VALUE str2)
VALUE            1755 string.c       static VALUE
VALUE            1756 string.c       rb_str_slice_bang(int argc, VALUE *argv, VALUE str)
VALUE            1758 string.c           VALUE result;
VALUE            1759 string.c           VALUE buf[3];
VALUE            1776 string.c       static VALUE
VALUE            1777 string.c       get_pat(VALUE pat, int quote)
VALUE            1779 string.c           VALUE val;
VALUE            1814 string.c       static VALUE
VALUE            1815 string.c       rb_str_sub_bang(int argc, VALUE *argv, VALUE str)
VALUE            1817 string.c           VALUE pat, repl, match;
VALUE            1905 string.c       static VALUE
VALUE            1906 string.c       rb_str_sub(int argc, VALUE *argv, VALUE str)
VALUE            1913 string.c       static VALUE
VALUE            1914 string.c       str_gsub(int argc, VALUE *argv, VALUE str, int bang)
VALUE            1916 string.c           VALUE pat, val, repl, match, dest;
VALUE            2047 string.c       static VALUE
VALUE            2048 string.c       rb_str_gsub_bang(int argc, VALUE *argv, VALUE str)
VALUE            2085 string.c       static VALUE
VALUE            2086 string.c       rb_str_gsub(int argc, VALUE *argv, VALUE str)
VALUE            2103 string.c       static VALUE
VALUE            2104 string.c       rb_str_replace(VALUE str, VALUE str2)
VALUE            2143 string.c       static VALUE
VALUE            2144 string.c       rb_str_clear(VALUE str)
VALUE            2165 string.c       static VALUE
VALUE            2166 string.c       rb_str_reverse_bang(VALUE str)
VALUE            2194 string.c       static VALUE
VALUE            2195 string.c       rb_str_reverse(VALUE str)
VALUE            2197 string.c           VALUE obj;
VALUE            2228 string.c       static VALUE
VALUE            2229 string.c       rb_str_include(VALUE str, VALUE arg)
VALUE            2268 string.c       static VALUE
VALUE            2269 string.c       rb_str_to_i(int argc, VALUE *argv, VALUE str)
VALUE            2271 string.c           VALUE b;
VALUE            2299 string.c       static VALUE
VALUE            2300 string.c       rb_str_to_f(VALUE str)
VALUE            2314 string.c       static VALUE
VALUE            2315 string.c       rb_str_to_s(VALUE str)
VALUE            2318 string.c       	VALUE dup = str_alloc(rb_cString);
VALUE            2339 string.c       VALUE
VALUE            2340 string.c       rb_str_inspect(VALUE str)
VALUE            2343 string.c           VALUE result = rb_str_buf_new2("\"");
VALUE            2410 string.c       VALUE
VALUE            2411 string.c       rb_str_dump(VALUE str)
VALUE            2416 string.c           VALUE result;
VALUE            2513 string.c       static VALUE
VALUE            2514 string.c       rb_str_upcase_bang(VALUE str)
VALUE            2548 string.c       static VALUE
VALUE            2549 string.c       rb_str_upcase(VALUE str)
VALUE            2565 string.c       static VALUE
VALUE            2566 string.c       rb_str_downcase_bang(VALUE str)
VALUE            2600 string.c       static VALUE
VALUE            2601 string.c       rb_str_downcase(VALUE str)
VALUE            2622 string.c       static VALUE
VALUE            2623 string.c       rb_str_capitalize_bang(VALUE str)
VALUE            2661 string.c       static VALUE
VALUE            2662 string.c       rb_str_capitalize(VALUE str)
VALUE            2678 string.c       static VALUE
VALUE            2679 string.c       rb_str_swapcase_bang(VALUE str)
VALUE            2717 string.c       static VALUE
VALUE            2718 string.c       rb_str_swapcase(VALUE str)
VALUE            2765 string.c       static VALUE rb_str_delete_bang(int,VALUE*,VALUE);
VALUE            2767 string.c       static VALUE
VALUE            2768 string.c       tr_trans(VALUE str, VALUE src, VALUE repl, int sflag)
VALUE            2870 string.c       static VALUE
VALUE            2871 string.c       rb_str_tr_bang(VALUE str, VALUE src, VALUE repl)
VALUE            2894 string.c       static VALUE
VALUE            2895 string.c       rb_str_tr(VALUE str, VALUE src, VALUE repl)
VALUE            2903 string.c       tr_setup_table(VALUE str, char table[256], int init)
VALUE            2942 string.c       static VALUE
VALUE            2943 string.c       rb_str_delete_bang(int argc, VALUE *argv, VALUE str)
VALUE            2955 string.c       	VALUE s = argv[i];
VALUE            2995 string.c       static VALUE
VALUE            2996 string.c       rb_str_delete(int argc, VALUE *argv, VALUE str)
VALUE            3012 string.c       static VALUE
VALUE            3013 string.c       rb_str_squeeze_bang(int argc, VALUE *argv, VALUE str)
VALUE            3028 string.c       	    VALUE s = argv[i];
VALUE            3073 string.c       static VALUE
VALUE            3074 string.c       rb_str_squeeze(int argc, VALUE *argv, VALUE str)
VALUE            3090 string.c       static VALUE
VALUE            3091 string.c       rb_str_tr_s_bang(VALUE str, VALUE src, VALUE repl)
VALUE            3110 string.c       static VALUE
VALUE            3111 string.c       rb_str_tr_s(VALUE str, VALUE src, VALUE repl)
VALUE            3135 string.c       static VALUE
VALUE            3136 string.c       rb_str_count(int argc, VALUE *argv, VALUE str)
VALUE            3147 string.c       	VALUE s = argv[i];
VALUE            3208 string.c       static VALUE
VALUE            3209 string.c       rb_str_split_m(int argc, VALUE *argv, VALUE str)
VALUE            3211 string.c           VALUE spat;
VALUE            3212 string.c           VALUE limit;
VALUE            3216 string.c           VALUE result, tmp;
VALUE            3339 string.c       VALUE
VALUE            3340 string.c       rb_str_split(VALUE str, const char *sep0)
VALUE            3342 string.c           VALUE sep;
VALUE            3382 string.c       static VALUE
VALUE            3383 string.c       rb_str_each_line(int argc, VALUE *argv, VALUE str)
VALUE            3385 string.c           VALUE rs;
VALUE            3390 string.c           VALUE line;
VALUE            3451 string.c       static VALUE
VALUE            3452 string.c       rb_str_each_byte(VALUE str)
VALUE            3473 string.c       static VALUE
VALUE            3474 string.c       rb_str_chop_bang(VALUE str)
VALUE            3509 string.c       static VALUE
VALUE            3510 string.c       rb_str_chop(VALUE str)
VALUE            3526 string.c       static VALUE
VALUE            3527 string.c       rb_str_chomp_bang(int argc, VALUE *argv, VALUE str)
VALUE            3529 string.c           VALUE rs;
VALUE            3615 string.c       static VALUE
VALUE            3616 string.c       rb_str_chomp(int argc, VALUE *argv, VALUE str)
VALUE            3635 string.c       static VALUE
VALUE            3636 string.c       rb_str_lstrip_bang(VALUE str)
VALUE            3668 string.c       static VALUE
VALUE            3669 string.c       rb_str_lstrip(VALUE str)
VALUE            3689 string.c       static VALUE
VALUE            3690 string.c       rb_str_rstrip_bang(VALUE str)
VALUE            3725 string.c       static VALUE
VALUE            3726 string.c       rb_str_rstrip(VALUE str)
VALUE            3742 string.c       static VALUE
VALUE            3743 string.c       rb_str_strip_bang(VALUE str)
VALUE            3745 string.c           VALUE l = rb_str_lstrip_bang(str);
VALUE            3746 string.c           VALUE r = rb_str_rstrip_bang(str);
VALUE            3763 string.c       static VALUE
VALUE            3764 string.c       rb_str_strip(VALUE str)
VALUE            3771 string.c       static VALUE
VALUE            3772 string.c       scan_once(VALUE str, VALUE pat, long *start)
VALUE            3774 string.c           VALUE result, match;
VALUE            3838 string.c       static VALUE
VALUE            3839 string.c       rb_str_scan(VALUE str, VALUE pat)
VALUE            3841 string.c           VALUE result;
VALUE            3843 string.c           VALUE match = Qnil;
VALUE            3847 string.c       	VALUE ary = rb_ary_new();
VALUE            3882 string.c       static VALUE
VALUE            3883 string.c       rb_str_hex(VALUE str)
VALUE            3903 string.c       static VALUE
VALUE            3904 string.c       rb_str_oct(VALUE str)
VALUE            3920 string.c       static VALUE
VALUE            3921 string.c       rb_str_crypt(VALUE str, VALUE salt)
VALUE            3924 string.c           VALUE result;
VALUE            3960 string.c       VALUE
VALUE            3961 string.c       rb_str_intern(VALUE s)
VALUE            3963 string.c           volatile VALUE str = s;
VALUE            3987 string.c       static VALUE
VALUE            3988 string.c       rb_str_sum(int argc, VALUE *argv, VALUE str)
VALUE            3990 string.c           VALUE vbits;
VALUE            4004 string.c       	VALUE sum = INT2FIX(0);
VALUE            4012 string.c       	    VALUE mod;
VALUE            4035 string.c       static VALUE
VALUE            4036 string.c       rb_str_justify(int argc, VALUE *argv, VALUE str, char jflag)
VALUE            4038 string.c           VALUE w;
VALUE            4040 string.c           VALUE res;
VALUE            4043 string.c           VALUE pad;
VALUE            4114 string.c       static VALUE
VALUE            4115 string.c       rb_str_ljust(int argc, VALUE *argv, VALUE str)
VALUE            4134 string.c       static VALUE
VALUE            4135 string.c       rb_str_rjust(int argc, VALUE *argv, VALUE str)
VALUE            4154 string.c       static VALUE
VALUE            4155 string.c       rb_str_center(int argc, VALUE *argv, VALUE str)
VALUE            4161 string.c       rb_str_setter(VALUE val, ID id, VALUE *var)
VALUE              15 struct.c       VALUE rb_cStruct;
VALUE              17 struct.c       static VALUE struct_alloc(VALUE);
VALUE              19 struct.c       VALUE
VALUE              20 struct.c       rb_struct_iv_get(VALUE c, const char *name)
VALUE              34 struct.c       VALUE
VALUE              35 struct.c       rb_struct_s_members(VALUE klass)
VALUE              37 struct.c           VALUE members = rb_struct_iv_get(klass, "__members__");
VALUE              45 struct.c       VALUE
VALUE              46 struct.c       rb_struct_members(VALUE s)
VALUE              48 struct.c           VALUE members = rb_struct_s_members(rb_obj_class(s));
VALUE              57 struct.c       static VALUE
VALUE              58 struct.c       rb_struct_s_members_m(VALUE klass)
VALUE              60 struct.c           VALUE members, ary;
VALUE              61 struct.c           VALUE *p, *pend;
VALUE              86 struct.c       static VALUE
VALUE              87 struct.c       rb_struct_members_m(VALUE obj)
VALUE              92 struct.c       VALUE
VALUE              93 struct.c       rb_struct_getmember(VALUE obj, ID id)
VALUE              95 struct.c           VALUE members, slot;
VALUE             109 struct.c       static VALUE
VALUE             110 struct.c       rb_struct_ref(VALUE obj)
VALUE             115 struct.c       static VALUE rb_struct_ref0(VALUE obj) {return RSTRUCT(obj)->ptr[0];}
VALUE             116 struct.c       static VALUE rb_struct_ref1(VALUE obj) {return RSTRUCT(obj)->ptr[1];}
VALUE             117 struct.c       static VALUE rb_struct_ref2(VALUE obj) {return RSTRUCT(obj)->ptr[2];}
VALUE             118 struct.c       static VALUE rb_struct_ref3(VALUE obj) {return RSTRUCT(obj)->ptr[3];}
VALUE             119 struct.c       static VALUE rb_struct_ref4(VALUE obj) {return RSTRUCT(obj)->ptr[4];}
VALUE             120 struct.c       static VALUE rb_struct_ref5(VALUE obj) {return RSTRUCT(obj)->ptr[5];}
VALUE             121 struct.c       static VALUE rb_struct_ref6(VALUE obj) {return RSTRUCT(obj)->ptr[6];}
VALUE             122 struct.c       static VALUE rb_struct_ref7(VALUE obj) {return RSTRUCT(obj)->ptr[7];}
VALUE             123 struct.c       static VALUE rb_struct_ref8(VALUE obj) {return RSTRUCT(obj)->ptr[8];}
VALUE             124 struct.c       static VALUE rb_struct_ref9(VALUE obj) {return RSTRUCT(obj)->ptr[9];}
VALUE             128 struct.c       static VALUE (*ref_func[])(VALUE) = {
VALUE             142 struct.c       rb_struct_modify(VALUE s)
VALUE             149 struct.c       static VALUE
VALUE             150 struct.c       rb_struct_set(VALUE obj, VALUE val)
VALUE             152 struct.c           VALUE members, slot;
VALUE             168 struct.c       static VALUE
VALUE             169 struct.c       make_struct(VALUE name, VALUE members, VALUE klass)
VALUE             171 struct.c           VALUE nstr;
VALUE             217 struct.c       VALUE
VALUE             221 struct.c           VALUE nm, ary;
VALUE             272 struct.c       static VALUE
VALUE             273 struct.c       rb_struct_s_def(int argc, VALUE *argv, VALUE klass)
VALUE             275 struct.c           VALUE name, rest;
VALUE             277 struct.c           VALUE st;
VALUE             286 struct.c       	VALUE tmp = rb_check_string_type(name);
VALUE             305 struct.c       static VALUE
VALUE             306 struct.c       rb_struct_initialize(VALUE self, VALUE values)
VALUE             308 struct.c           VALUE klass = rb_obj_class(self);
VALUE             309 struct.c           VALUE size;
VALUE             318 struct.c           MEMCPY(RSTRUCT(self)->ptr, RARRAY(values)->ptr, VALUE, RARRAY(values)->len);
VALUE             326 struct.c       static VALUE
VALUE             327 struct.c       struct_alloc(VALUE klass)
VALUE             329 struct.c           VALUE size;
VALUE             337 struct.c           st->ptr = ALLOC_N(VALUE, n);
VALUE             341 struct.c           return (VALUE)st;
VALUE             344 struct.c       VALUE
VALUE             345 struct.c       rb_struct_alloc(VALUE klass, VALUE values)
VALUE             350 struct.c       VALUE
VALUE             351 struct.c       rb_struct_new(VALUE klass, ...)
VALUE             353 struct.c           VALUE sz, *mem;
VALUE             359 struct.c           mem = ALLOCA_N(VALUE, size);
VALUE             362 struct.c       	mem[i] = va_arg(args, VALUE);
VALUE             387 struct.c       static VALUE
VALUE             388 struct.c       rb_struct_each(VALUE s)
VALUE             417 struct.c       static VALUE
VALUE             418 struct.c       rb_struct_each_pair(VALUE s)
VALUE             420 struct.c           VALUE members;
VALUE             431 struct.c       static VALUE
VALUE             432 struct.c       inspect_struct(VALUE s, VALUE dummy, int recur)
VALUE             435 struct.c           VALUE str, members;
VALUE             445 struct.c       	VALUE slot;
VALUE             478 struct.c       static VALUE
VALUE             479 struct.c       rb_struct_inspect(VALUE s)
VALUE             496 struct.c       static VALUE
VALUE             497 struct.c       rb_struct_to_a(VALUE s)
VALUE             503 struct.c       static VALUE
VALUE             504 struct.c       rb_struct_init_copy(VALUE copy, VALUE s)
VALUE             511 struct.c           RSTRUCT(copy)->ptr = ALLOC_N(VALUE, RSTRUCT(s)->len);
VALUE             513 struct.c           MEMCPY(RSTRUCT(copy)->ptr, RSTRUCT(s)->ptr, VALUE, RSTRUCT(copy)->len);
VALUE             518 struct.c       static VALUE
VALUE             519 struct.c       rb_struct_aref_id(VALUE s, ID id)
VALUE             521 struct.c           VALUE members;
VALUE             554 struct.c       VALUE
VALUE             555 struct.c       rb_struct_aref(VALUE s, VALUE idx)
VALUE             574 struct.c       static VALUE
VALUE             575 struct.c       rb_struct_aset_id(VALUE s, ID id, VALUE val)
VALUE             577 struct.c           VALUE members;
VALUE             617 struct.c       VALUE
VALUE             618 struct.c       rb_struct_aset(VALUE s, VALUE idx, VALUE val)
VALUE             640 struct.c       static VALUE
VALUE             641 struct.c       struct_entry(VALUE s, long n)
VALUE             662 struct.c       static VALUE
VALUE             663 struct.c       rb_struct_values_at(int argc, VALUE *argv, VALUE s)
VALUE             688 struct.c       static VALUE
VALUE             689 struct.c       rb_struct_select(int argc, VALUE *argv, VALUE s)
VALUE             691 struct.c           VALUE result;
VALUE             724 struct.c       static VALUE
VALUE             725 struct.c       rb_struct_equal(VALUE s, VALUE s2)
VALUE             749 struct.c       static VALUE
VALUE             750 struct.c       rb_struct_hash(VALUE s)
VALUE             753 struct.c           VALUE n;
VALUE             772 struct.c       static VALUE
VALUE             773 struct.c       rb_struct_eql(VALUE s, VALUE s2)
VALUE             802 struct.c       static VALUE
VALUE             803 struct.c       rb_struct_size(VALUE s)
VALUE              23 time.c         VALUE rb_cTime;
VALUE              41 time.c         static VALUE
VALUE              42 time.c         time_s_alloc(VALUE klass)
VALUE              44 time.c             VALUE obj;
VALUE              56 time.c         time_modify(VALUE time)
VALUE              87 time.c         static VALUE
VALUE              88 time.c         time_init(VALUE time)
VALUE             136 time.c         static VALUE
VALUE             137 time.c         time_new_internal(VALUE klass, time_t sec, time_t usec)
VALUE             139 time.c             VALUE time = time_s_alloc(klass);
VALUE             150 time.c         VALUE
VALUE             157 time.c         time_timeval(VALUE time, int interval)
VALUE             205 time.c         rb_time_interval(VALUE time)
VALUE             211 time.c         rb_time_timeval(VALUE time)
VALUE             239 time.c         static VALUE
VALUE             240 time.c         time_s_at(int argc, VALUE *argv, VALUE klass)
VALUE             243 time.c             VALUE time, t;
VALUE             269 time.c         obj2long(VALUE obj)
VALUE             279 time.c         time_arg(int argc, VALUE *argv, struct tm *tm, time_t *usec)
VALUE             281 time.c             VALUE v[8];
VALUE             324 time.c         	VALUE s = rb_check_string_type(v[1]);
VALUE             376 time.c         static VALUE time_gmtime(VALUE);
VALUE             377 time.c         static VALUE time_localtime(VALUE);
VALUE             378 time.c         static VALUE time_get_tm(VALUE, int);
VALUE             760 time.c         static VALUE
VALUE             761 time.c         time_utc_or_local(int argc, VALUE *argv, int utc_p, VALUE klass)
VALUE             764 time.c             VALUE time;
VALUE             794 time.c         static VALUE
VALUE             795 time.c         time_s_mkutc(int argc, VALUE *argv, VALUE klass)
VALUE             813 time.c         static VALUE
VALUE             814 time.c         time_s_mktime(int argc, VALUE *argv, VALUE klass)
VALUE             832 time.c         static VALUE
VALUE             833 time.c         time_to_i(VALUE time)
VALUE             853 time.c         static VALUE
VALUE             854 time.c         time_to_f(VALUE time)
VALUE             874 time.c         static VALUE
VALUE             875 time.c         time_usec(VALUE time)
VALUE             899 time.c         static VALUE
VALUE             900 time.c         time_cmp(VALUE time1, VALUE time2)
VALUE             928 time.c         static VALUE
VALUE             929 time.c         time_eql(VALUE time1, VALUE time2)
VALUE             962 time.c         static VALUE
VALUE             963 time.c         time_utc_p(VALUE time)
VALUE             979 time.c         static VALUE
VALUE             980 time.c         time_hash(VALUE time)
VALUE             991 time.c         static VALUE
VALUE             992 time.c         time_init_copy(VALUE copy, VALUE time)
VALUE            1008 time.c         static VALUE
VALUE            1009 time.c         time_dup(VALUE time)
VALUE            1011 time.c             VALUE dup = time_s_alloc(rb_cTime);
VALUE            1029 time.c         static VALUE
VALUE            1030 time.c         time_localtime(VALUE time)
VALUE            1072 time.c         static VALUE
VALUE            1073 time.c         time_gmtime(VALUE time)
VALUE            1111 time.c         static VALUE
VALUE            1112 time.c         time_getlocaltime(VALUE time)
VALUE            1132 time.c         static VALUE
VALUE            1133 time.c         time_getgmtime(VALUE time)
VALUE            1138 time.c         static VALUE
VALUE            1139 time.c         time_get_tm(VALUE time, int gmt)
VALUE            1155 time.c         static VALUE
VALUE            1156 time.c         time_asctime(VALUE time)
VALUE            1184 time.c         static VALUE
VALUE            1185 time.c         time_to_s(VALUE time)
VALUE            1214 time.c         static VALUE
VALUE            1215 time.c         time_add(struct time_object *tobj, VALUE offset, int sign)
VALUE            1221 time.c             VALUE result;
VALUE            1265 time.c         static VALUE
VALUE            1266 time.c         time_plus(VALUE time1, VALUE time2)
VALUE            1292 time.c         static VALUE
VALUE            1293 time.c         time_minus(VALUE time1, VALUE time2)
VALUE            1319 time.c         static VALUE
VALUE            1320 time.c         time_succ(VALUE time)
VALUE            1341 time.c         static VALUE
VALUE            1342 time.c         time_sec(VALUE time)
VALUE            1363 time.c         static VALUE
VALUE            1364 time.c         time_min(VALUE time)
VALUE            1385 time.c         static VALUE
VALUE            1386 time.c         time_hour(VALUE time)
VALUE            1409 time.c         static VALUE
VALUE            1410 time.c         time_mday(VALUE time)
VALUE            1433 time.c         static VALUE
VALUE            1434 time.c         time_mon(VALUE time)
VALUE            1455 time.c         static VALUE
VALUE            1456 time.c         time_year(VALUE time)
VALUE            1478 time.c         static VALUE
VALUE            1479 time.c         time_wday(VALUE time)
VALUE            1509 time.c         static VALUE
VALUE            1510 time.c         time_sunday(VALUE time)
VALUE            1522 time.c         static VALUE
VALUE            1523 time.c         time_monday(VALUE time)
VALUE            1535 time.c         static VALUE
VALUE            1536 time.c         time_tuesday(VALUE time)
VALUE            1548 time.c         static VALUE
VALUE            1549 time.c         time_wednesday(VALUE time)
VALUE            1561 time.c         static VALUE
VALUE            1562 time.c         time_thursday(VALUE time)
VALUE            1574 time.c         static VALUE
VALUE            1575 time.c         time_friday(VALUE time)
VALUE            1587 time.c         static VALUE
VALUE            1588 time.c         time_saturday(VALUE time)
VALUE            1603 time.c         static VALUE
VALUE            1604 time.c         time_yday(VALUE time)
VALUE            1629 time.c         static VALUE
VALUE            1630 time.c         time_isdst(VALUE time)
VALUE            1654 time.c         static VALUE
VALUE            1655 time.c         time_zone(VALUE time)
VALUE            1696 time.c         static VALUE
VALUE            1697 time.c         time_utc_offset(VALUE time)
VALUE            1752 time.c         static VALUE
VALUE            1753 time.c         time_to_a(VALUE time)
VALUE            1847 time.c         static VALUE
VALUE            1848 time.c         time_strftime(VALUE time, VALUE format)
VALUE            1854 time.c             VALUE str;
VALUE            1900 time.c         static VALUE
VALUE            1901 time.c         time_s_times(VALUE obj)
VALUE            1911 time.c         static VALUE
VALUE            1912 time.c         time_mdump(VALUE time)
VALUE            1958 time.c         static VALUE
VALUE            1959 time.c         time_dump(int argc, VALUE *argv, VALUE time)
VALUE            1961 time.c             VALUE str;
VALUE            1974 time.c         static VALUE
VALUE            1975 time.c         time_mload(VALUE time, VALUE str)
VALUE            2035 time.c         static VALUE
VALUE            2036 time.c         time_load(VALUE klass, VALUE str)
VALUE            2038 time.c             VALUE time = time_s_alloc(klass);
VALUE             149 util.c         ruby_add_suffix(VALUE str, const char *suffix)
VALUE             307 util.c         push_element(const char *path, VALUE vinfo)
VALUE             348 util.c             rb_glob(buf, push_element, (VALUE)&info);
VALUE              43 util.h         void ruby_add_suffix(VALUE str, const char *suffix);
VALUE              37 variable.c         VALUE klass;
VALUE              38 variable.c         VALUE path;
VALUE              39 variable.c         VALUE track;
VALUE              43 variable.c     static VALUE
VALUE              46 variable.c         VALUE path, tmp;
VALUE              69 variable.c     fc_i(ID key, VALUE value, struct fc_result *res)
VALUE             110 variable.c     static VALUE
VALUE             111 variable.c     find_class_path(VALUE klass)
VALUE             137 variable.c     static VALUE
VALUE             138 variable.c     classname(VALUE klass)
VALUE             140 variable.c         VALUE path = Qnil;
VALUE             169 variable.c     VALUE
VALUE             170 variable.c     rb_mod_name(VALUE mod)
VALUE             172 variable.c         VALUE path = classname(mod);
VALUE             178 variable.c     VALUE
VALUE             179 variable.c     rb_class_path(VALUE klass)
VALUE             181 variable.c         VALUE path = classname(klass);
VALUE             207 variable.c     rb_set_class_path(VALUE klass, VALUE under, const char *name)
VALUE             209 variable.c         VALUE str;
VALUE             222 variable.c     VALUE
VALUE             227 variable.c         VALUE c = rb_cObject;
VALUE             234 variable.c     	VALUE str;
VALUE             262 variable.c     rb_name_class(VALUE klass, ID id)
VALUE             267 variable.c     VALUE
VALUE             268 variable.c     rb_class_name(VALUE klass)
VALUE             274 variable.c     rb_class2name(VALUE klass)
VALUE             280 variable.c     rb_obj_classname(VALUE obj)
VALUE             288 variable.c         VALUE data;
VALUE             295 variable.c         VALUE (*getter)();
VALUE             307 variable.c     static VALUE undef_getter(ID id);
VALUE             308 variable.c     static void  undef_setter(VALUE val, ID id, void *data, struct global_variable *var);
VALUE             311 variable.c     static VALUE val_getter(ID id, VALUE val);
VALUE             312 variable.c     static void  val_setter(VALUE val, ID id, void *data, struct global_variable *var);
VALUE             313 variable.c     static void  val_marker(VALUE data);
VALUE             315 variable.c     static VALUE var_getter(ID id, VALUE *var);
VALUE             316 variable.c     static void  var_setter(VALUE val, ID id, VALUE *var);
VALUE             317 variable.c     static void  var_marker(VALUE *var);
VALUE             343 variable.c     static VALUE
VALUE             352 variable.c     undef_setter(VALUE val, ID id, void *data, struct global_variable *var)
VALUE             366 variable.c     static VALUE
VALUE             367 variable.c     val_getter(ID id, VALUE val)
VALUE             373 variable.c     val_setter(VALUE val, ID id, void *data, struct global_variable *var)
VALUE             379 variable.c     val_marker(VALUE data)
VALUE             384 variable.c     static VALUE
VALUE             385 variable.c     var_getter(ID id, VALUE *var)
VALUE             392 variable.c     var_setter(VALUE val, ID id, VALUE *var)
VALUE             398 variable.c     var_marker(VALUE *var)
VALUE             404 variable.c     readonly_setter(VALUE val, ID id, void *var)
VALUE             450 variable.c         VALUE *var,
VALUE             451 variable.c         VALUE (*getter)(ANYARGS),
VALUE             465 variable.c     rb_define_variable(const char *name, VALUE *var)
VALUE             471 variable.c     rb_define_readonly_variable(const char *name, VALUE *var)
VALUE             479 variable.c         VALUE (*getter)(ANYARGS),
VALUE             488 variable.c     rb_trace_eval(VALUE cmd, VALUE val)
VALUE             516 variable.c     VALUE
VALUE             517 variable.c     rb_f_trace_var(int argc, VALUE *argv)
VALUE             519 variable.c         VALUE var, cmd;
VALUE             576 variable.c     VALUE
VALUE             577 variable.c     rb_f_untrace_var(int argc, VALUE *argv)
VALUE             579 variable.c         VALUE var, cmd;
VALUE             592 variable.c     	VALUE ary = rb_ary_new();
VALUE             596 variable.c     	    rb_ary_push(ary, (VALUE)trace->data);
VALUE             617 variable.c     VALUE
VALUE             626 variable.c         VALUE val;
VALUE             629 variable.c     static VALUE
VALUE             641 variable.c     static VALUE
VALUE             649 variable.c     VALUE
VALUE             650 variable.c     rb_gvar_set(struct global_entry *entry, VALUE val)
VALUE             663 variable.c     	rb_ensure(trace_ev, (VALUE)&trace, trace_en, (VALUE)var);
VALUE             668 variable.c     VALUE
VALUE             669 variable.c     rb_gv_set(const char *name, VALUE val)
VALUE             677 variable.c     VALUE
VALUE             686 variable.c     VALUE
VALUE             694 variable.c     gvar_i(ID key, struct global_entry *entry, VALUE ary)
VALUE             709 variable.c     VALUE
VALUE             712 variable.c         VALUE ary = rb_ary_new();
VALUE             767 variable.c     rb_generic_ivar_table(VALUE obj)
VALUE             777 variable.c     static VALUE
VALUE             778 variable.c     generic_ivar_get(VALUE obj, ID id, int warn)
VALUE             781 variable.c         VALUE val;
VALUE             797 variable.c     generic_ivar_set(VALUE obj, ID id, VALUE val)
VALUE             818 variable.c     static VALUE
VALUE             819 variable.c     generic_ivar_defined(VALUE obj, ID id)
VALUE             822 variable.c         VALUE val;
VALUE             833 variable.c     generic_ivar_remove(VALUE obj, ID id, VALUE *valp)
VALUE             849 variable.c     rb_mark_generic_ivar(VALUE obj)
VALUE             860 variable.c     givar_mark_i(ID key, VALUE value)
VALUE             867 variable.c     givar_i(VALUE obj, st_table *tbl)
VALUE             884 variable.c     rb_free_generic_ivar(VALUE obj)
VALUE             894 variable.c     rb_copy_generic_ivar(VALUE clone, VALUE obj)
VALUE             914 variable.c     static VALUE
VALUE             915 variable.c     ivar_get(VALUE obj, ID id, int warn)
VALUE             917 variable.c         VALUE val;
VALUE             937 variable.c     VALUE
VALUE             938 variable.c     rb_ivar_get(VALUE obj, ID id)
VALUE             943 variable.c     VALUE
VALUE             944 variable.c     rb_attr_get(VALUE obj, ID id)
VALUE             949 variable.c     VALUE
VALUE             950 variable.c     rb_ivar_set(VALUE obj, ID id, VALUE val)
VALUE             969 variable.c     VALUE
VALUE             970 variable.c     rb_ivar_defined(VALUE obj, ID id)
VALUE             988 variable.c     ivar_i(ID key, struct global_entry *entry, VALUE ary)
VALUE            1013 variable.c     VALUE
VALUE            1014 variable.c     rb_obj_instance_variables(VALUE obj)
VALUE            1016 variable.c         VALUE ary;
VALUE            1063 variable.c     VALUE
VALUE            1064 variable.c     rb_obj_remove_instance_variable(VALUE obj, VALUE name)
VALUE            1066 variable.c         VALUE val = Qnil;
VALUE            1096 variable.c     NORETURN(static void uninitialized_constant(VALUE, ID));
VALUE            1098 variable.c     uninitialized_constant(VALUE klass, ID id)
VALUE            1109 variable.c     static VALUE
VALUE            1110 variable.c     const_missing(VALUE klass, ID id)
VALUE            1144 variable.c     VALUE
VALUE            1145 variable.c     rb_mod_const_missing(VALUE klass, VALUE name)
VALUE            1153 variable.c     check_autoload_table(VALUE av)
VALUE            1164 variable.c     rb_autoload(VALUE mod, ID id, const char *file)
VALUE            1166 variable.c         VALUE av, fn;
VALUE            1196 variable.c     autoload_delete(VALUE mod, ID id)
VALUE            1198 variable.c         VALUE val;
VALUE            1220 variable.c     VALUE
VALUE            1221 variable.c     rb_autoload_load(VALUE klass, ID id)
VALUE            1223 variable.c         VALUE file;
VALUE            1232 variable.c     static VALUE
VALUE            1233 variable.c     autoload_file(VALUE mod, ID id)
VALUE            1235 variable.c         VALUE val, file;
VALUE            1265 variable.c     VALUE
VALUE            1266 variable.c     rb_autoload_p(VALUE mod, ID id)
VALUE            1269 variable.c         VALUE val;
VALUE            1277 variable.c     static VALUE
VALUE            1278 variable.c     rb_const_get_0(VALUE klass, ID id, int exclude, int recurse)
VALUE            1280 variable.c         VALUE value, tmp;
VALUE            1309 variable.c     VALUE
VALUE            1310 variable.c     rb_const_get_from(VALUE klass, ID id)
VALUE            1315 variable.c     VALUE
VALUE            1316 variable.c     rb_const_get(VALUE klass, ID id)
VALUE            1321 variable.c     VALUE
VALUE            1322 variable.c     rb_const_get_at(VALUE klass, ID id)
VALUE            1336 variable.c     VALUE
VALUE            1337 variable.c     rb_mod_remove_const(VALUE mod, VALUE name)
VALUE            1340 variable.c         VALUE val;
VALUE            1366 variable.c     sv_i(ID key, VALUE value, st_table *tbl)
VALUE            1377 variable.c     rb_mod_const_at(VALUE mod, void *data)
VALUE            1390 variable.c     rb_mod_const_of(VALUE mod, void *data)
VALUE            1392 variable.c         VALUE tmp = mod;
VALUE            1403 variable.c     list_i(ID key, ID value, VALUE ary)
VALUE            1409 variable.c     VALUE
VALUE            1413 variable.c         VALUE ary;
VALUE            1432 variable.c     VALUE
VALUE            1433 variable.c     rb_mod_constants(VALUE mod)
VALUE            1439 variable.c     rb_const_defined_0(VALUE klass, ID id, int exclude, int recurse)
VALUE            1441 variable.c         VALUE value, tmp;
VALUE            1464 variable.c     rb_const_defined_from(VALUE klass, ID id)
VALUE            1470 variable.c     rb_const_defined(VALUE klass, ID id)
VALUE            1476 variable.c     rb_const_defined_at(VALUE klass, ID id)
VALUE            1482 variable.c     mod_av_set(VALUE klass, ID id, VALUE val, int isconst)
VALUE            1500 variable.c     	VALUE value = Qfalse;
VALUE            1514 variable.c     rb_const_set(VALUE klass, ID id, VALUE val)
VALUE            1520 variable.c     rb_define_const(VALUE klass, const char *name, VALUE val)
VALUE            1534 variable.c     rb_define_global_const(const char *name, VALUE val)
VALUE            1540 variable.c     rb_cvar_set(VALUE klass, ID id, VALUE val, int warn)
VALUE            1545 variable.c     VALUE
VALUE            1546 variable.c     rb_cvar_get(VALUE klass, ID id)
VALUE            1548 variable.c         VALUE value;
VALUE            1559 variable.c     VALUE
VALUE            1560 variable.c     rb_cvar_defined(VALUE klass, ID id)
VALUE            1569 variable.c     rb_cv_set(VALUE klass, const char *name, VALUE val)
VALUE            1578 variable.c     VALUE
VALUE            1579 variable.c     rb_cv_get(VALUE klass, const char *name)
VALUE            1589 variable.c     rb_define_class_variable(VALUE klass, const char *name, VALUE val)
VALUE            1600 variable.c     cv_i(ID key, VALUE value, VALUE ary)
VALUE            1603 variable.c     	VALUE kval = rb_str_new2(rb_id2name(key));
VALUE            1627 variable.c     VALUE
VALUE            1628 variable.c     rb_mod_class_variables(VALUE obj)
VALUE            1630 variable.c         VALUE ary = rb_ary_new();
VALUE            1658 variable.c     VALUE
VALUE            1659 variable.c     rb_mod_remove_cvar(VALUE mod, VALUE name)
VALUE            1662 variable.c         VALUE val;
VALUE            1683 variable.c     VALUE
VALUE            1684 variable.c     rb_iv_get(VALUE obj, const char *name)
VALUE            1691 variable.c     VALUE
VALUE            1692 variable.c     rb_iv_set(VALUE obj, const char *name, VALUE val)
VALUE              24 version.c          VALUE v = rb_obj_freeze(rb_str_new2(ruby_version));
VALUE              25 version.c          VALUE d = rb_obj_freeze(rb_str_new2(ruby_release_date));
VALUE              26 version.c          VALUE p = rb_obj_freeze(rb_str_new2(ruby_platform));
VALUE             251 win32/win32.c  static VALUE
VALUE             252 win32/win32.c  flock_winnt(VALUE self, int argc, VALUE* argv)
VALUE             288 win32/win32.c  static VALUE
VALUE             289 win32/win32.c  flock_win95(VALUE self, int argc, VALUE* argv)
VALUE             335 win32/win32.c  			      (VALUE)_get_osfhandle(fd), oper, NULL,
VALUE             791 win32/win32.c  extern VALUE rb_last_status;
VALUE            1009 win32/win32.c  insert(const char *path, VALUE vinfo)
VALUE            1048 win32/win32.c      ruby_brace_glob(buf, 0, insert, (VALUE)&tail);
VALUE            3446 win32/win32.c      RUBY_CRITICAL(rb_protect((VALUE (*)(VALUE))h->handler, (VALUE)h->arg, &h->status);
VALUE            3638 win32/win32.c      VALUE (*func)(VALUE self, int argc, VALUE* argv);
VALUE            3639 win32/win32.c      VALUE self;
VALUE            3641 win32/win32.c      VALUE* argv;
VALUE            3655 win32/win32.c  VALUE
VALUE            3656 win32/win32.c  rb_w32_asynchronize(asynchronous_func_t func, VALUE self,
VALUE            3657 win32/win32.c  		    int argc, VALUE* argv, VALUE intrval)


VALUE2ICONV

VALUE2ICONV       207 ext/iconv/iconv.c     iconv_close(VALUE2ICONV(cd));
VALUE2ICONV       215 ext/iconv/iconv.c     if (cd && iconv_close(VALUE2ICONV(cd)) == -1)
VALUE2ICONV       530 ext/iconv/iconv.c 	iconvctl(VALUE2ICONV(check_iconv(self)), func, (void *)&(val)) ? \
VALUE2ICONV       745 ext/iconv/iconv.c     return iconv_convert(VALUE2ICONV(cd), Qnil, 0, 0, NULL);
VALUE2ICONV       795 ext/iconv/iconv.c     return iconv_convert(VALUE2ICONV(cd), str,
VALUE2ICONV       812 ext/iconv/iconv.c     iconv_t cd = VALUE2ICONV(check_iconv(self));


VISI

VISI              493 class.c        #define VISI_CHECK(x,f) (VISI(x) == (f))
VISI              547 class.c        	else type = VISI(body->nd_noex);


VISI_CHECK

VISI_CHECK       4124 eval.c         	if (VISI_CHECK(noex, NOEX_PUBLIC))
VISI_CHECK       4163 eval.c         	if (VISI_CHECK(noex, NOEX_PRIVATE))
VISI_CHECK       4202 eval.c         	if (VISI_CHECK(noex, NOEX_PROTECTED))


VP_EXCEPTION_ALL

VP_EXCEPTION_ALL  228 ext/bigdecimal/bigdecimal.c     if(f&VP_EXCEPTION_ALL) {
VP_EXCEPTION_ALL 1270 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "EXCEPTION_ALL",INT2FIX(VP_EXCEPTION_ALL));


VP_EXCEPTION_INFINITY

VP_EXCEPTION_INFINITY   81 ext/bigdecimal/bigdecimal.c         VpException(VP_EXCEPTION_INFINITY,"Computation results to 'Infinity'",0);
VP_EXCEPTION_INFINITY   83 ext/bigdecimal/bigdecimal.c         VpException(VP_EXCEPTION_INFINITY,"Computation results to '-Infinity'",0);
VP_EXCEPTION_INFINITY  236 ext/bigdecimal/bigdecimal.c         if(f&VP_EXCEPTION_INFINITY) {
VP_EXCEPTION_INFINITY  237 ext/bigdecimal/bigdecimal.c             VpSetException((unsigned short)((val==Qtrue)?(fo|VP_EXCEPTION_INFINITY):
VP_EXCEPTION_INFINITY  238 ext/bigdecimal/bigdecimal.c                            (fo&(~VP_EXCEPTION_INFINITY))));
VP_EXCEPTION_INFINITY  278 ext/bigdecimal/bigdecimal.c             return VpException(VP_EXCEPTION_INFINITY,"Exponent overflow",0);
VP_EXCEPTION_INFINITY  355 ext/bigdecimal/bigdecimal.c        VpException(VP_EXCEPTION_INFINITY,"Computation results to 'Infinity'",0);
VP_EXCEPTION_INFINITY  358 ext/bigdecimal/bigdecimal.c        VpException(VP_EXCEPTION_INFINITY,"Computation results to '-Infinity'",0);
VP_EXCEPTION_INFINITY 1272 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "EXCEPTION_INFINITY",INT2FIX(VP_EXCEPTION_INFINITY));
VP_EXCEPTION_INFINITY 1595 ext/bigdecimal/bigdecimal.c         case VP_EXCEPTION_INFINITY:
VP_EXCEPTION_INFINITY 1710 ext/bigdecimal/bigdecimal.c     return VpException(VP_EXCEPTION_INFINITY,"Computation results to 'Infinity'",0);
VP_EXCEPTION_INFINITY 3307 ext/bigdecimal/bigdecimal.c                 return VpException(VP_EXCEPTION_INFINITY,"exponent overflow",0);


VP_EXCEPTION_MEMORY

VP_EXCEPTION_MEMORY 1403 ext/bigdecimal/bigdecimal.c         VpException(VP_EXCEPTION_MEMORY,"failed to allocate memory",1);
VP_EXCEPTION_MEMORY 1586 ext/bigdecimal/bigdecimal.c     if(f==VP_EXCEPTION_OP || f==VP_EXCEPTION_MEMORY) always = 1;
VP_EXCEPTION_MEMORY 1607 ext/bigdecimal/bigdecimal.c         case VP_EXCEPTION_MEMORY:


VP_EXCEPTION_NaN

VP_EXCEPTION_NaN   79 ext/bigdecimal/bigdecimal.c         VpException(VP_EXCEPTION_NaN,"Computation results to 'NaN'(Not a Number)",0);
VP_EXCEPTION_NaN  240 ext/bigdecimal/bigdecimal.c         if(f&VP_EXCEPTION_NaN) {
VP_EXCEPTION_NaN  241 ext/bigdecimal/bigdecimal.c             VpSetException((unsigned short)((val==Qtrue)?(fo|VP_EXCEPTION_NaN):
VP_EXCEPTION_NaN  242 ext/bigdecimal/bigdecimal.c                            (fo&(~VP_EXCEPTION_NaN))));
VP_EXCEPTION_NaN  352 ext/bigdecimal/bigdecimal.c        VpException(VP_EXCEPTION_NaN,"Computation results to 'NaN'(Not a Number)",0);
VP_EXCEPTION_NaN 1271 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "EXCEPTION_NaN",INT2FIX(VP_EXCEPTION_NaN));
VP_EXCEPTION_NaN 1598 ext/bigdecimal/bigdecimal.c         case VP_EXCEPTION_NaN:
VP_EXCEPTION_NaN 1712 ext/bigdecimal/bigdecimal.c     return VpException(VP_EXCEPTION_NaN,"Computation results to 'NaN'",0);
VP_EXCEPTION_NaN 2627 ext/bigdecimal/bigdecimal.c         return VpException(VP_EXCEPTION_NaN,"(VpDivd) 0/0 not defined(NaN)",0);


VP_EXCEPTION_OP

VP_EXCEPTION_OP  1586 ext/bigdecimal/bigdecimal.c     if(f==VP_EXCEPTION_OP || f==VP_EXCEPTION_MEMORY) always = 1;
VP_EXCEPTION_OP  1604 ext/bigdecimal/bigdecimal.c         case VP_EXCEPTION_OP:
VP_EXCEPTION_OP  3627 ext/bigdecimal/bigdecimal.c         return VpException(VP_EXCEPTION_OP,"(VpSqrt) SQRT(NaN or negative value)",0);
VP_EXCEPTION_OP  3634 ext/bigdecimal/bigdecimal.c         return VpException(VP_EXCEPTION_OP,"(VpSqrt) SQRT(negative value)",0);


VP_EXCEPTION_OVERFLOW

VP_EXCEPTION_OVERFLOW  415 ext/bigdecimal/bigdecimal.c        VpException(VP_EXCEPTION_OVERFLOW,"BigDecimal to Float conversion",0);
VP_EXCEPTION_OVERFLOW 1274 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "EXCEPTION_OVERFLOW",INT2FIX(VP_EXCEPTION_OVERFLOW));
VP_EXCEPTION_OVERFLOW 1859 ext/bigdecimal/bigdecimal.c     return VpException(VP_EXCEPTION_OVERFLOW,"Exponent overflow",0);


VP_EXCEPTION_UNDERFLOW

VP_EXCEPTION_UNDERFLOW 1273 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "EXCEPTION_UNDERFLOW",INT2FIX(VP_EXCEPTION_UNDERFLOW));
VP_EXCEPTION_UNDERFLOW 1601 ext/bigdecimal/bigdecimal.c         case VP_EXCEPTION_UNDERFLOW:
VP_EXCEPTION_UNDERFLOW 1855 ext/bigdecimal/bigdecimal.c     return VpException(VP_EXCEPTION_UNDERFLOW,"Exponent underflow",0);


VP_EXCEPTION_ZERODIVIDE

VP_EXCEPTION_ZERODIVIDE 1275 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "EXCEPTION_ZERODIVIDE",INT2FIX(VP_EXCEPTION_ZERODIVIDE));
VP_EXCEPTION_ZERODIVIDE 2631 ext/bigdecimal/bigdecimal.c         return VpException(VP_EXCEPTION_ZERODIVIDE,"(VpDivd) Divide by zero",0);


VP_EXPORT

VP_EXPORT         296 ext/bigdecimal/bigdecimal.c VP_EXPORT Real *
VP_EXPORT         304 ext/bigdecimal/bigdecimal.c VP_EXPORT Real *
VP_EXPORT        1398 ext/bigdecimal/bigdecimal.c VP_EXPORT void *
VP_EXPORT        1412 ext/bigdecimal/bigdecimal.c VP_EXPORT void
VP_EXPORT        1449 ext/bigdecimal/bigdecimal.c VP_EXPORT U_LONG
VP_EXPORT        1455 ext/bigdecimal/bigdecimal.c VP_EXPORT U_LONG
VP_EXPORT        1463 ext/bigdecimal/bigdecimal.c VP_EXPORT unsigned long
VP_EXPORT        1469 ext/bigdecimal/bigdecimal.c VP_EXPORT int
VP_EXPORT        1480 ext/bigdecimal/bigdecimal.c VP_EXPORT unsigned long
VP_EXPORT        1509 ext/bigdecimal/bigdecimal.c VP_EXPORT U_LONG
VP_EXPORT        1515 ext/bigdecimal/bigdecimal.c VP_EXPORT U_LONG
VP_EXPORT        1521 ext/bigdecimal/bigdecimal.c VP_EXPORT U_LONG
VP_EXPORT        1541 ext/bigdecimal/bigdecimal.c VP_EXPORT double
VP_EXPORT        1549 ext/bigdecimal/bigdecimal.c VP_EXPORT double
VP_EXPORT        1557 ext/bigdecimal/bigdecimal.c VP_EXPORT double
VP_EXPORT        1565 ext/bigdecimal/bigdecimal.c VP_EXPORT double
VP_EXPORT        1573 ext/bigdecimal/bigdecimal.c VP_EXPORT int
VP_EXPORT        1580 ext/bigdecimal/bigdecimal.c VP_EXPORT int
VP_EXPORT        1722 ext/bigdecimal/bigdecimal.c VP_EXPORT U_LONG
VP_EXPORT        1765 ext/bigdecimal/bigdecimal.c VP_EXPORT U_LONG
VP_EXPORT        1825 ext/bigdecimal/bigdecimal.c VP_EXPORT Real *
VP_EXPORT        1875 ext/bigdecimal/bigdecimal.c VP_EXPORT Real *
VP_EXPORT        2012 ext/bigdecimal/bigdecimal.c VP_EXPORT int
VP_EXPORT        2054 ext/bigdecimal/bigdecimal.c VP_EXPORT int
VP_EXPORT        2483 ext/bigdecimal/bigdecimal.c VP_EXPORT int
VP_EXPORT        2607 ext/bigdecimal/bigdecimal.c VP_EXPORT int
VP_EXPORT        2855 ext/bigdecimal/bigdecimal.c VP_EXPORT int
VP_EXPORT        2951 ext/bigdecimal/bigdecimal.c VP_EXPORT int
VP_EXPORT        3072 ext/bigdecimal/bigdecimal.c VP_EXPORT S_LONG
VP_EXPORT        3089 ext/bigdecimal/bigdecimal.c VP_EXPORT void
VP_EXPORT        3135 ext/bigdecimal/bigdecimal.c VP_EXPORT int
VP_EXPORT        3168 ext/bigdecimal/bigdecimal.c VP_EXPORT void
VP_EXPORT        3214 ext/bigdecimal/bigdecimal.c VP_EXPORT void
VP_EXPORT        3279 ext/bigdecimal/bigdecimal.c VP_EXPORT int
VP_EXPORT        3413 ext/bigdecimal/bigdecimal.c VP_EXPORT int
VP_EXPORT        3477 ext/bigdecimal/bigdecimal.c VP_EXPORT void
VP_EXPORT        3547 ext/bigdecimal/bigdecimal.c VP_EXPORT void
VP_EXPORT        3608 ext/bigdecimal/bigdecimal.c VP_EXPORT int
VP_EXPORT        3718 ext/bigdecimal/bigdecimal.c VP_EXPORT int
VP_EXPORT        3819 ext/bigdecimal/bigdecimal.c VP_EXPORT int
VP_EXPORT        3834 ext/bigdecimal/bigdecimal.c VP_EXPORT int
VP_EXPORT        3919 ext/bigdecimal/bigdecimal.c VP_EXPORT void
VP_EXPORT        3964 ext/bigdecimal/bigdecimal.c VP_EXPORT int
VP_EXPORT         105 ext/bigdecimal/bigdecimal.h VP_EXPORT  Real *
VP_EXPORT         108 ext/bigdecimal/bigdecimal.h VP_EXPORT  Real *VpCreateRbObject(U_LONG mx,char *str);
VP_EXPORT         110 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpBaseFig(void);
VP_EXPORT         111 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpDblFig(void);
VP_EXPORT         112 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpBaseVal(void);
VP_EXPORT         115 ext/bigdecimal/bigdecimal.h VP_EXPORT double VpGetDoubleNaN(void);
VP_EXPORT         116 ext/bigdecimal/bigdecimal.h VP_EXPORT double VpGetDoublePosInf(void);
VP_EXPORT         117 ext/bigdecimal/bigdecimal.h VP_EXPORT double VpGetDoubleNegInf(void);
VP_EXPORT         118 ext/bigdecimal/bigdecimal.h VP_EXPORT double VpGetDoubleNegZero(void);
VP_EXPORT         121 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpGetPrecLimit(void);
VP_EXPORT         122 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpSetPrecLimit(U_LONG n);
VP_EXPORT         125 ext/bigdecimal/bigdecimal.h VP_EXPORT int           VpIsRoundMode(unsigned long n);
VP_EXPORT         126 ext/bigdecimal/bigdecimal.h VP_EXPORT unsigned long VpGetRoundMode(void);
VP_EXPORT         127 ext/bigdecimal/bigdecimal.h VP_EXPORT unsigned long VpSetRoundMode(unsigned long n);
VP_EXPORT         129 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpException(unsigned short f,char *str,int always);
VP_EXPORT         130 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpIsNegDoubleZero(double v);
VP_EXPORT         131 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpNumOfChars(Real *vp,char *pszFmt);
VP_EXPORT         132 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpInit(U_LONG BaseVal);
VP_EXPORT         133 ext/bigdecimal/bigdecimal.h VP_EXPORT void *VpMemAlloc(U_LONG mb);
VP_EXPORT         134 ext/bigdecimal/bigdecimal.h VP_EXPORT void VpFree(Real *pv);
VP_EXPORT         135 ext/bigdecimal/bigdecimal.h VP_EXPORT Real *VpAlloc(U_LONG mx, char *szVal);
VP_EXPORT         136 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpAsgn(Real *c,Real *a,int isw);
VP_EXPORT         137 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpAddSub(Real *c,Real *a,Real *b,int operation);
VP_EXPORT         138 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpMult(Real *c,Real *a,Real *b);
VP_EXPORT         139 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpDivd(Real *c,Real *r,Real *a,Real *b);
VP_EXPORT         140 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpComp(Real *a,Real *b);
VP_EXPORT         141 ext/bigdecimal/bigdecimal.h VP_EXPORT S_LONG VpExponent10(Real *a);
VP_EXPORT         142 ext/bigdecimal/bigdecimal.h VP_EXPORT void VpSzMantissa(Real *a,char *psz);
VP_EXPORT         143 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpToSpecialString(Real *a,char *psz,int fPlus);
VP_EXPORT         144 ext/bigdecimal/bigdecimal.h VP_EXPORT void VpToString(Real *a,char *psz,int fFmt,int fPlus);
VP_EXPORT         145 ext/bigdecimal/bigdecimal.h VP_EXPORT void VpToFString(Real *a,char *psz,int fFmt,int fPlus);
VP_EXPORT         146 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpCtoV(Real *a,char *int_chr,U_LONG ni,char *frac,U_LONG nf,char *exp_chr,U_LONG ne);
VP_EXPORT         147 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpVtoD(double *d,S_LONG *e,Real *m);
VP_EXPORT         148 ext/bigdecimal/bigdecimal.h VP_EXPORT void VpDtoV(Real *m,double d);
VP_EXPORT         149 ext/bigdecimal/bigdecimal.h VP_EXPORT void VpItoV(Real *m,S_INT ival);
VP_EXPORT         150 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpSqrt(Real *y,Real *x);
VP_EXPORT         151 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpActiveRound(Real *y,Real *x,int f,int il);
VP_EXPORT         152 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpMidRound(Real *y, int f, int nf);
VP_EXPORT         153 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpLeftRound(Real *y, int f, int nf);
VP_EXPORT         154 ext/bigdecimal/bigdecimal.h VP_EXPORT void VpFrac(Real *y,Real *x);
VP_EXPORT         155 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpPower(Real *y,Real *x,S_INT n);
VP_EXPORT         158 ext/bigdecimal/bigdecimal.h VP_EXPORT Real *VpOne();
VP_EXPORT         210 ext/bigdecimal/bigdecimal.h VP_EXPORT int VPrint(FILE *fp,char *cntl_chr,Real *a);


VP_ROUND_CEIL

VP_ROUND_CEIL    1043 ext/bigdecimal/bigdecimal.c     VpActiveRound(c,a,VP_ROUND_CEIL,iLoc);
VP_ROUND_CEIL    1283 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "ROUND_CEILING",INT2FIX(VP_ROUND_CEIL));
VP_ROUND_CEIL    1474 ext/bigdecimal/bigdecimal.c        n==VP_ROUND_CEIL    || n!=VP_ROUND_FLOOR     ||
VP_ROUND_CEIL    3772 ext/bigdecimal/bigdecimal.c     case VP_ROUND_CEIL: /* ceil */
VP_ROUND_CEIL    3874 ext/bigdecimal/bigdecimal.c     case VP_ROUND_CEIL:  /* ceil */


VP_ROUND_DOWN

VP_ROUND_DOWN     686 ext/bigdecimal/bigdecimal.c     VpActiveRound(d,c,VP_ROUND_DOWN,0);
VP_ROUND_DOWN     747 ext/bigdecimal/bigdecimal.c     VpActiveRound(d,c,VP_ROUND_DOWN,0); /* 0: round off */
VP_ROUND_DOWN     911 ext/bigdecimal/bigdecimal.c     VpActiveRound(c,a,VP_ROUND_DOWN,0); /* 0: round off */
VP_ROUND_DOWN     979 ext/bigdecimal/bigdecimal.c     VpActiveRound(c,a,VP_ROUND_DOWN,iLoc); /* 0: truncate */
VP_ROUND_DOWN    1280 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "ROUND_DOWN",INT2FIX(VP_ROUND_DOWN));
VP_ROUND_DOWN    1472 ext/bigdecimal/bigdecimal.c     if(n==VP_ROUND_UP      || n!=VP_ROUND_DOWN      ||
VP_ROUND_DOWN    3761 ext/bigdecimal/bigdecimal.c     case VP_ROUND_DOWN: /* Truncate */
VP_ROUND_DOWN    3863 ext/bigdecimal/bigdecimal.c     case VP_ROUND_DOWN:


VP_ROUND_FLOOR

VP_ROUND_FLOOR   1018 ext/bigdecimal/bigdecimal.c     VpActiveRound(c,a,VP_ROUND_FLOOR,iLoc);
VP_ROUND_FLOOR   1284 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "ROUND_FLOOR",INT2FIX(VP_ROUND_FLOOR));
VP_ROUND_FLOOR   1474 ext/bigdecimal/bigdecimal.c        n==VP_ROUND_CEIL    || n!=VP_ROUND_FLOOR     ||
VP_ROUND_FLOOR   3775 ext/bigdecimal/bigdecimal.c     case VP_ROUND_FLOOR: /* floor */
VP_ROUND_FLOOR   3877 ext/bigdecimal/bigdecimal.c     case VP_ROUND_FLOOR: /* floor */


VP_ROUND_HALF_DOWN

VP_ROUND_HALF_DOWN 1282 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "ROUND_HALF_DOWN",INT2FIX(VP_ROUND_HALF_DOWN));
VP_ROUND_HALF_DOWN 1473 ext/bigdecimal/bigdecimal.c        n==VP_ROUND_HALF_UP || n!=VP_ROUND_HALF_DOWN ||
VP_ROUND_HALF_DOWN 3769 ext/bigdecimal/bigdecimal.c     case VP_ROUND_HALF_DOWN: /* Round half down  */
VP_ROUND_HALF_DOWN 3871 ext/bigdecimal/bigdecimal.c     case VP_ROUND_HALF_DOWN:


VP_ROUND_HALF_EVEN

VP_ROUND_HALF_EVEN 1285 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "ROUND_HALF_EVEN",INT2FIX(VP_ROUND_HALF_EVEN));
VP_ROUND_HALF_EVEN 1475 ext/bigdecimal/bigdecimal.c        n==VP_ROUND_HALF_EVEN
VP_ROUND_HALF_EVEN 3778 ext/bigdecimal/bigdecimal.c     case VP_ROUND_HALF_EVEN: /* Banker's rounding */
VP_ROUND_HALF_EVEN 3880 ext/bigdecimal/bigdecimal.c     case VP_ROUND_HALF_EVEN:  /* Banker's rounding */


VP_ROUND_HALF_UP

VP_ROUND_HALF_UP 1281 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "ROUND_HALF_UP",INT2FIX(VP_ROUND_HALF_UP));
VP_ROUND_HALF_UP 1366 ext/bigdecimal/bigdecimal.c static U_LONG gfRoundMode = VP_ROUND_HALF_UP; /* Mode for general rounding operation   */
VP_ROUND_HALF_UP 1473 ext/bigdecimal/bigdecimal.c        n==VP_ROUND_HALF_UP || n!=VP_ROUND_HALF_DOWN ||
VP_ROUND_HALF_UP 3766 ext/bigdecimal/bigdecimal.c     case VP_ROUND_HALF_UP:   /* Round half up  */
VP_ROUND_HALF_UP 3868 ext/bigdecimal/bigdecimal.c     case VP_ROUND_HALF_UP:


VP_ROUND_MODE

VP_ROUND_MODE     247 ext/bigdecimal/bigdecimal.c     if(VP_ROUND_MODE==f) {
VP_ROUND_MODE    1278 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "ROUND_MODE",INT2FIX(VP_ROUND_MODE));


VP_ROUND_UP

VP_ROUND_UP      1279 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "ROUND_UP",INT2FIX(VP_ROUND_UP));
VP_ROUND_UP      1472 ext/bigdecimal/bigdecimal.c     if(n==VP_ROUND_UP      || n!=VP_ROUND_DOWN      ||
VP_ROUND_UP      3763 ext/bigdecimal/bigdecimal.c     case VP_ROUND_UP:   /* Roundup */
VP_ROUND_UP      3865 ext/bigdecimal/bigdecimal.c     case VP_ROUND_UP:


VP_SIGN_NEGATIVE_FINITE

VP_SIGN_NEGATIVE_FINITE 1292 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_FINITE",INT2FIX(VP_SIGN_NEGATIVE_FINITE));
VP_SIGN_NEGATIVE_FINITE  180 ext/bigdecimal/bigdecimal.h #define VpSetSign(a,s)    {if((s)>0) (a)->sign=(short)VP_SIGN_POSITIVE_FINITE;else (a)->sign=(short)VP_SIGN_NEGATIVE_FINITE;}


VP_SIGN_NEGATIVE_INFINITE

VP_SIGN_NEGATIVE_INFINITE 1294 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_INFINITE",INT2FIX(VP_SIGN_NEGATIVE_INFINITE));
VP_SIGN_NEGATIVE_INFINITE  199 ext/bigdecimal/bigdecimal.h #define VpIsNegInf(a)   ((a)->sign==VP_SIGN_NEGATIVE_INFINITE)
VP_SIGN_NEGATIVE_INFINITE  203 ext/bigdecimal/bigdecimal.h #define VpSetNegInf(a)  ((a)->frac[0]=0,(a)->Prec=1,(a)->sign=VP_SIGN_NEGATIVE_INFINITE)


VP_SIGN_NEGATIVE_ZERO

VP_SIGN_NEGATIVE_ZERO 1290 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_ZERO",INT2FIX(VP_SIGN_NEGATIVE_ZERO));
VP_SIGN_NEGATIVE_ZERO  187 ext/bigdecimal/bigdecimal.h #define VpIsNegZero(a)  ((a)->sign==VP_SIGN_NEGATIVE_ZERO)
VP_SIGN_NEGATIVE_ZERO  190 ext/bigdecimal/bigdecimal.h #define VpSetNegZero(a) ((a)->frac[0]=0,(a)->Prec=1,(a)->sign=VP_SIGN_NEGATIVE_ZERO)


VP_SIGN_NaN

VP_SIGN_NaN      1288 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "SIGN_NaN",INT2FIX(VP_SIGN_NaN));
VP_SIGN_NaN       194 ext/bigdecimal/bigdecimal.h #define VpIsNaN(a)      ((a)->sign==VP_SIGN_NaN)
VP_SIGN_NaN       195 ext/bigdecimal/bigdecimal.h #define VpSetNaN(a)     ((a)->frac[0]=0,(a)->Prec=1,(a)->sign=VP_SIGN_NaN)


VP_SIGN_POSITIVE_FINITE

VP_SIGN_POSITIVE_FINITE 1291 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_FINITE",INT2FIX(VP_SIGN_POSITIVE_FINITE));
VP_SIGN_POSITIVE_FINITE  180 ext/bigdecimal/bigdecimal.h #define VpSetSign(a,s)    {if((s)>0) (a)->sign=(short)VP_SIGN_POSITIVE_FINITE;else (a)->sign=(short)VP_SIGN_NEGATIVE_FINITE;}
VP_SIGN_POSITIVE_FINITE  183 ext/bigdecimal/bigdecimal.h #define VpSetOne(a)       {(a)->frac[0]=(a)->exponent=(a)->Prec=1;(a)->sign=VP_SIGN_POSITIVE_FINITE;}


VP_SIGN_POSITIVE_INFINITE

VP_SIGN_POSITIVE_INFINITE 1293 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_INFINITE",INT2FIX(VP_SIGN_POSITIVE_INFINITE));
VP_SIGN_POSITIVE_INFINITE  198 ext/bigdecimal/bigdecimal.h #define VpIsPosInf(a)   ((a)->sign==VP_SIGN_POSITIVE_INFINITE)
VP_SIGN_POSITIVE_INFINITE  202 ext/bigdecimal/bigdecimal.h #define VpSetPosInf(a)  ((a)->frac[0]=0,(a)->Prec=1,(a)->sign=VP_SIGN_POSITIVE_INFINITE)


VP_SIGN_POSITIVE_ZERO

VP_SIGN_POSITIVE_ZERO 1289 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_ZERO",INT2FIX(VP_SIGN_POSITIVE_ZERO));
VP_SIGN_POSITIVE_ZERO  186 ext/bigdecimal/bigdecimal.h #define VpIsPosZero(a)  ((a)->sign==VP_SIGN_POSITIVE_ZERO)
VP_SIGN_POSITIVE_ZERO  189 ext/bigdecimal/bigdecimal.h #define VpSetPosZero(a) ((a)->frac[0]=0,(a)->Prec=1,(a)->sign=VP_SIGN_POSITIVE_ZERO)


VPrint

VPrint           2064 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "VpAddSub(enter) a=% \n", a);
VPrint           2065 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "     b=% \n", b);
VPrint           2168 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "VpAddSub(result) c=% \n", c);
VPrint           2169 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "     a=% \n", a);
VPrint           2170 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "     b=% \n", b);
VPrint           2197 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "VpAddAbs called: a = %\n", a);
VPrint           2198 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "     b = %\n", b);
VPrint           2265 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "VpAddAbs exit: c=% \n", c);
VPrint           2290 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "VpSubAbs called: a = %\n", a);
VPrint           2291 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "     b = %\n", b);
VPrint           2368 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "VpSubAbs exit: c=% \n", c);
VPrint           2494 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "VpMult(Enter): a=% \n", a);
VPrint           2495 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "      b=% \n", b);
VPrint           2596 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "VpMult(c=a*b): c=% \n", c);
VPrint           2597 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "      a=% \n", a);
VPrint           2598 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "      b=% \n", b);
VPrint           2618 ext/bigdecimal/bigdecimal.c         VPrint(stdout, " VpDivd(c=a/b)  a=% \n", a);
VPrint           2619 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "    b=% \n", b);
VPrint           2806 ext/bigdecimal/bigdecimal.c         VPrint(stdout, " VpDivd(c=a/b), c=% \n", c);
VPrint           2807 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "    r=% \n", r);
VPrint           2932 ext/bigdecimal/bigdecimal.c         VPrint(stdout, " VpComp a=%\n", a);
VPrint           2933 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "  b=%\n", b);
VPrint           3466 ext/bigdecimal/bigdecimal.c         VPrint(stdout, " VpVtoD: m=%\n", m);
VPrint           3538 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "  m=%\n", m);
VPrint           3599 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "  m=%\n", m);
VPrint           3699 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "  y =% \n", y);
VPrint           3700 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "  x =% \n", x);
VPrint           3701 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "  x-y*y = % \n", f);
VPrint           3954 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "VpFrac y=%\n", y);
VPrint           3955 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "    x=%\n", x);
VPrint           4041 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "VpPower y=%\n", y);
VPrint           4042 ext/bigdecimal/bigdecimal.c         VPrint(stdout, "VpPower x=%\n", x);
VPrint            210 ext/bigdecimal/bigdecimal.h VP_EXPORT int VPrint(FILE *fp,char *cntl_chr,Real *a);


V_BOOL

V_BOOL            841 ext/win32ole/win32ole.c         V_BOOL(var) = VARIANT_TRUE;
V_BOOL            845 ext/win32ole/win32ole.c         V_BOOL(var) = VARIANT_FALSE;
V_BOOL            979 ext/win32ole/win32ole.c         V_BOOLREF(pvar) = &V_BOOL(var);
V_BOOL           1217 ext/win32ole/win32ole.c             obj = (V_BOOL(pvar) ? Qtrue : Qfalse);


V_UNION1

V_UNION1         1496 ext/win32ole/win32ole.c                 val = ole_variant2val(V_UNION1(pVarDesc, lpvarValue));
V_UNION1         3350 ext/win32ole/win32ole.c                                            V_UNION1(pTypeDesc, hreftype),
V_UNION1         3376 ext/win32ole/win32ole.c         p = V_UNION1(p, lptdesc);
V_UNION1         4945 ext/win32ole/win32ole.c         val = ole_variant2val(V_UNION1(pVarDesc, lpvarValue));
V_UNION1         6004 ext/win32ole/win32ole.c     if (V_UNION1((&(pFuncDesc->lprgelemdescParam[index])), paramdesc).wParamFlags &mask)
V_UNION1         6113 ext/win32ole/win32ole.c     wParamFlags = V_UNION1(pElemDesc, paramdesc).wParamFlags;
V_UNION1         6115 ext/win32ole/win32ole.c          pParamDescEx = V_UNION1(pElemDesc, paramdesc).pparamdescex;


V_VT

V_VT              755 ext/win32ole/win32ole.c         V_VT(var) = VT_DISPATCH;
V_VT              760 ext/win32ole/win32ole.c         V_VT(var) = VT_DATE;
V_VT              816 ext/win32ole/win32ole.c             V_VT(var) = VT_VARIANT | VT_ARRAY;
V_VT              824 ext/win32ole/win32ole.c         V_VT(var) = VT_BSTR;
V_VT              828 ext/win32ole/win32ole.c         V_VT(var) = VT_I4;
V_VT              832 ext/win32ole/win32ole.c         V_VT(var) = VT_R8;
V_VT              836 ext/win32ole/win32ole.c         V_VT(var) = VT_R8;
V_VT              840 ext/win32ole/win32ole.c         V_VT(var) = VT_BOOL;
V_VT              844 ext/win32ole/win32ole.c         V_VT(var) = VT_BOOL;
V_VT              849 ext/win32ole/win32ole.c             V_VT(var) = VT_ERROR;
V_VT              852 ext/win32ole/win32ole.c             V_VT(var) = VT_EMPTY;
V_VT              856 ext/win32ole/win32ole.c         V_VT(var) = VT_DISPATCH;
V_VT              869 ext/win32ole/win32ole.c         if (V_VT(var) == (VT_BSTR | VT_BYREF)) {
V_VT              874 ext/win32ole/win32ole.c         switch(V_VT(var)) {
V_VT              895 ext/win32ole/win32ole.c         switch(V_VT(var)) {
V_VT              913 ext/win32ole/win32ole.c         if (V_VT(var) == (VT_R8 | VT_BYREF)) {
V_VT              918 ext/win32ole/win32ole.c         if (V_VT(var) == (VT_BOOL | VT_BYREF)) {
V_VT              923 ext/win32ole/win32ole.c         if (V_VT(var) == (VT_BOOL | VT_BYREF)) {
V_VT              937 ext/win32ole/win32ole.c     VARTYPE vt = V_VT(var);
V_VT              938 ext/win32ole/win32ole.c     V_VT(pvar) = V_VT(var) | VT_BYREF;
V_VT             1007 ext/win32ole/win32ole.c         if ( (vtype & ~VT_BYREF) == V_VT(&(pvar->realvar))) {
V_VT             1021 ext/win32ole/win32ole.c         if (vtype == V_VT(&(pvar->realvar))) {
V_VT             1090 ext/win32ole/win32ole.c     while ( V_VT(pvar) == (VT_BYREF | VT_VARIANT) )
V_VT             1103 ext/win32ole/win32ole.c         V_VT(&variant) = (V_VT(pvar) & ~VT_ARRAY) | VT_BYREF;
V_VT             1154 ext/win32ole/win32ole.c     switch(V_VT(pvar) & ~VT_BYREF){
V_VT             1278 ext/win32ole/win32ole.c         if (SUCCEEDED(hr) && V_VT(&variant) == VT_BSTR) {
V_VT             2268 ext/win32ole/win32ole.c                 V_VT(&op.dp.rgvarg[n]) = VT_VARIANT | VT_BYREF;
V_VT             2423 ext/win32ole/win32ole.c         V_VT(&dispParams.rgvarg[i]) = vt;
V_VT             2428 ext/win32ole/win32ole.c             V_VT(&dispParams.rgvarg[i]) = V_VT(&realargs[i]) = VT_ERROR;
V_VT             2448 ext/win32ole/win32ole.c                 V_VT(&realargs[i]) = VT_ARRAY | v;
V_VT             2513 ext/win32ole/win32ole.c                     V_VT(&dispParams.rgvarg[i]) = VT_VARIANT | VT_BYREF;
V_VT             2835 ext/win32ole/win32ole.c     if (V_VT(&result) == VT_UNKNOWN)
V_VT             2839 ext/win32ole/win32ole.c     else if (V_VT(&result) == VT_DISPATCH)


VpActiveRound

VpActiveRound     686 ext/bigdecimal/bigdecimal.c     VpActiveRound(d,c,VP_ROUND_DOWN,0);
VpActiveRound     747 ext/bigdecimal/bigdecimal.c     VpActiveRound(d,c,VP_ROUND_DOWN,0); /* 0: round off */
VpActiveRound     911 ext/bigdecimal/bigdecimal.c     VpActiveRound(c,a,VP_ROUND_DOWN,0); /* 0: round off */
VpActiveRound     954 ext/bigdecimal/bigdecimal.c     VpActiveRound(c,a,sw,iLoc);
VpActiveRound     979 ext/bigdecimal/bigdecimal.c     VpActiveRound(c,a,VP_ROUND_DOWN,iLoc); /* 0: truncate */
VpActiveRound    1018 ext/bigdecimal/bigdecimal.c     VpActiveRound(c,a,VP_ROUND_FLOOR,iLoc);
VpActiveRound    1043 ext/bigdecimal/bigdecimal.c     VpActiveRound(c,a,VP_ROUND_CEIL,iLoc);
VpActiveRound     151 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpActiveRound(Real *y,Real *x,int f,int il);


VpAddAbs

VpAddAbs         1387 ext/bigdecimal/bigdecimal.c static U_LONG VpAddAbs(Real *a,Real *b,Real *c);
VpAddAbs         2153 ext/bigdecimal/bigdecimal.c         mrv = VpAddAbs(a_ptr, b_ptr, c);


VpAddSub

VpAddSub          458 ext/bigdecimal/bigdecimal.c         VpAddSub(c, a, b, 1);
VpAddSub          464 ext/bigdecimal/bigdecimal.c             VpAddSub(c, a, b, 1);
VpAddSub          488 ext/bigdecimal/bigdecimal.c         VpAddSub(c, a, b, -1);
VpAddSub          494 ext/bigdecimal/bigdecimal.c             VpAddSub(c, a, b, -1);
VpAddSub          688 ext/bigdecimal/bigdecimal.c     VpAddSub(c,a,res,-1);
VpAddSub          690 ext/bigdecimal/bigdecimal.c         VpAddSub(res,d,VpOne(),-1);
VpAddSub          691 ext/bigdecimal/bigdecimal.c         VpAddSub(d  ,c,b,       1);
VpAddSub          751 ext/bigdecimal/bigdecimal.c     VpAddSub(ff,res,rr,1);
VpAddSub         3676 ext/bigdecimal/bigdecimal.c         VpAddSub(r, f, y, -1);  /* r = f - y  */
VpAddSub         3679 ext/bigdecimal/bigdecimal.c         VpAddSub(r, f, y, 1);   /* r = y + f  */
VpAddSub         3697 ext/bigdecimal/bigdecimal.c         VpAddSub(f, x, r, -1);
VpAddSub          137 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpAddSub(Real *c,Real *a,Real *b,int operation);


VpAlloc

VpAlloc           299 ext/bigdecimal/bigdecimal.c     Real *pv = VpAlloc(mx,str);
VpAlloc           307 ext/bigdecimal/bigdecimal.c     Real *pv = VpAlloc(mx,str);
VpAlloc          1795 ext/bigdecimal/bigdecimal.c     VpConstOne = VpAlloc((U_LONG)1, "1");
VpAlloc          1796 ext/bigdecimal/bigdecimal.c     VpPt5 = VpAlloc((U_LONG)1, ".5");
VpAlloc          2529 ext/bigdecimal/bigdecimal.c         c = VpAlloc((U_LONG)((MxIndAB + 1) * BASE_FIG), "#0");
VpAlloc          3646 ext/bigdecimal/bigdecimal.c     f = VpAlloc(y->MaxPrec *(BASE_FIG + 2), "#1");
VpAlloc          3647 ext/bigdecimal/bigdecimal.c     r = VpAlloc((n + n) *(BASE_FIG + 2), "#1");
VpAlloc          4013 ext/bigdecimal/bigdecimal.c     w1 = VpAlloc((y->MaxPrec + 2) * BASE_FIG, "#0");
VpAlloc          4014 ext/bigdecimal/bigdecimal.c     w2 = VpAlloc((w1->MaxPrec * 2 + 1) * BASE_FIG, "#0");
VpAlloc           135 ext/bigdecimal/bigdecimal.h VP_EXPORT Real *VpAlloc(U_LONG mx, char *szVal);


VpAsgn

VpAsgn            588 ext/bigdecimal/bigdecimal.c     VpAsgn(c, a, -1);
VpAsgn            879 ext/bigdecimal/bigdecimal.c     VpAsgn(c, a, 1);
VpAsgn           2076 ext/bigdecimal/bigdecimal.c             VpAsgn(c, b, operation);
VpAsgn           2091 ext/bigdecimal/bigdecimal.c         VpAsgn(c, a, 1);
VpAsgn           2258 ext/bigdecimal/bigdecimal.c     VpAsgn(c, a, 1);
VpAsgn           2362 ext/bigdecimal/bigdecimal.c     VpAsgn(c, a, 1);
VpAsgn           2508 ext/bigdecimal/bigdecimal.c         VpAsgn(c, b, VpGetSign(a));
VpAsgn           2512 ext/bigdecimal/bigdecimal.c         VpAsgn(c, a, VpGetSign(b));
VpAsgn           2586 ext/bigdecimal/bigdecimal.c         VpAsgn(w, c, 1);
VpAsgn           2641 ext/bigdecimal/bigdecimal.c         VpAsgn(c, a, VpGetSign(b));
VpAsgn           3623 ext/bigdecimal/bigdecimal.c             VpAsgn(y,x,1);
VpAsgn           3680 ext/bigdecimal/bigdecimal.c         VpAsgn(y, r, 1);        /* y = r      */
VpAsgn           3838 ext/bigdecimal/bigdecimal.c     if(VpAsgn(y, x, 10)<=1) return 0; /* Zero,NaN,or Infinity */
VpAsgn           3925 ext/bigdecimal/bigdecimal.c         VpAsgn(y,x,1);
VpAsgn           3933 ext/bigdecimal/bigdecimal.c         VpAsgn(y, x, 1);
VpAsgn           4017 ext/bigdecimal/bigdecimal.c     VpAsgn(y, x, 1);
VpAsgn           4020 ext/bigdecimal/bigdecimal.c         VpAsgn(w1, x, 1);
VpAsgn           4026 ext/bigdecimal/bigdecimal.c         VpAsgn(w1, w2, 1);
VpAsgn           4031 ext/bigdecimal/bigdecimal.c         VpAsgn(y, w2, 1);
VpAsgn           4035 ext/bigdecimal/bigdecimal.c         VpAsgn(y, w1, 1);
VpAsgn            136 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpAsgn(Real *c,Real *a,int isw);


VpBaseFig

VpBaseFig         107 ext/bigdecimal/bigdecimal.c         return VpCreateRbObject(VpBaseFig() * 2 + 1, szD);
VpBaseFig         112 ext/bigdecimal/bigdecimal.c         return VpCreateRbObject(strlen(RSTRING(v)->ptr) + VpBaseFig() + 1,
VpBaseFig         118 ext/bigdecimal/bigdecimal.c         return VpCreateRbObject(strlen(RSTRING(bg)->ptr) + VpBaseFig() + 1,
VpBaseFig         149 ext/bigdecimal/bigdecimal.c     obj = rb_assoc_new(INT2NUM(p->Prec*VpBaseFig()),
VpBaseFig         150 ext/bigdecimal/bigdecimal.c 		       INT2NUM(p->MaxPrec*VpBaseFig()));
VpBaseFig         184 ext/bigdecimal/bigdecimal.c     sprintf(sz,"%lu:",VpMaxPrec(vp)*VpBaseFig());
VpBaseFig         209 ext/bigdecimal/bigdecimal.c     if(m>VpBaseFig()) m -= VpBaseFig();
VpBaseFig         211 ext/bigdecimal/bigdecimal.c     m /= VpBaseFig();
VpBaseFig         364 ext/bigdecimal/bigdecimal.c     nf = VpBaseFig();
VpBaseFig         457 ext/bigdecimal/bigdecimal.c         GUARD_OBJ(c,VpCreateRbObject(VpBaseFig() + 1, "0"));
VpBaseFig         460 ext/bigdecimal/bigdecimal.c         GUARD_OBJ(c,VpCreateRbObject(mx *(VpBaseFig() + 1), "0"));
VpBaseFig         487 ext/bigdecimal/bigdecimal.c         GUARD_OBJ(c,VpCreateRbObject(VpBaseFig() + 1, "0"));
VpBaseFig         490 ext/bigdecimal/bigdecimal.c         GUARD_OBJ(c,VpCreateRbObject(mx *(VpBaseFig() + 1), "0"));
VpBaseFig         587 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(a->Prec *(VpBaseFig() + 1), "0"));
VpBaseFig         605 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(mx *(VpBaseFig() + 1), "0"));
VpBaseFig         623 ext/bigdecimal/bigdecimal.c     mx =(a->MaxPrec + b->MaxPrec + 1) * VpBaseFig();
VpBaseFig         625 ext/bigdecimal/bigdecimal.c     GUARD_OBJ((*res),VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
VpBaseFig         680 ext/bigdecimal/bigdecimal.c     mx =(mx + 1) * VpBaseFig();
VpBaseFig         682 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(res,VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
VpBaseFig         684 ext/bigdecimal/bigdecimal.c     mx = c->Prec *(VpBaseFig() + 1);
VpBaseFig         734 ext/bigdecimal/bigdecimal.c     mx  =(a->MaxPrec + b->MaxPrec) *VpBaseFig();
VpBaseFig         736 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(res,VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
VpBaseFig         737 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(rr ,VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
VpBaseFig         738 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(ff ,VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
VpBaseFig         742 ext/bigdecimal/bigdecimal.c     mx = c->Prec *(VpBaseFig() + 1);
VpBaseFig         801 ext/bigdecimal/bigdecimal.c           U_LONG mx = (ix+VpBaseFig()*2);
VpBaseFig         809 ext/bigdecimal/bigdecimal.c           GUARD_OBJ(res,VpCreateRbObject((mx * 2  + 2)*VpBaseFig(), "#0"));
VpBaseFig         877 ext/bigdecimal/bigdecimal.c     mx = a->Prec *(VpBaseFig() + 1);
VpBaseFig         892 ext/bigdecimal/bigdecimal.c     mx = a->Prec *(VpBaseFig() + 1);
VpBaseFig         909 ext/bigdecimal/bigdecimal.c     mx = a->Prec *(VpBaseFig() + 1);
VpBaseFig         951 ext/bigdecimal/bigdecimal.c     mx = a->Prec *(VpBaseFig() + 1);
VpBaseFig         976 ext/bigdecimal/bigdecimal.c     mx = a->Prec *(VpBaseFig() + 1);
VpBaseFig         991 ext/bigdecimal/bigdecimal.c     mx = a->Prec *(VpBaseFig() + 1);
VpBaseFig        1015 ext/bigdecimal/bigdecimal.c     mx = a->Prec *(VpBaseFig() + 1);
VpBaseFig        1040 ext/bigdecimal/bigdecimal.c     mx = a->Prec *(VpBaseFig() + 1);
VpBaseFig        1152 ext/bigdecimal/bigdecimal.c     sprintf(pszAll,"#<BigDecimal:%lx,'%s',%lu(%lu)>",self,psz1,VpPrec(vp)*VpBaseFig(),VpMaxPrec(vp)*VpBaseFig());
VpBaseFig        1172 ext/bigdecimal/bigdecimal.c         mp = x->Prec *(VpBaseFig() + 1);
VpBaseFig         110 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpBaseFig(void);


VpBaseVal

VpBaseVal         375 ext/bigdecimal/bigdecimal.c         b = VpBaseVal()/10;
VpBaseVal         645 ext/bigdecimal/bigdecimal.c        VpInternalRound(c,0,c->frac[c->Prec-1],(VpBaseVal()*res->frac[0])/div->frac[0]);
VpBaseVal        1267 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "BASE", INT2FIX((S_INT)VpBaseVal()));
VpBaseVal         112 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpBaseVal(void);


VpChangeSign

VpChangeSign      880 ext/bigdecimal/bigdecimal.c     VpChangeSign(c,(S_INT)1);
VpChangeSign     3693 ext/bigdecimal/bigdecimal.c     VpChangeSign(y,(S_INT)1);


VpComp

VpComp            510 ext/bigdecimal/bigdecimal.c     e = VpComp(a, b);
VpComp            140 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpComp(Real *a,Real *b);


VpCreateRbObject

VpCreateRbObject  107 ext/bigdecimal/bigdecimal.c         return VpCreateRbObject(VpBaseFig() * 2 + 1, szD);
VpCreateRbObject  112 ext/bigdecimal/bigdecimal.c         return VpCreateRbObject(strlen(RSTRING(v)->ptr) + VpBaseFig() + 1,
VpCreateRbObject  118 ext/bigdecimal/bigdecimal.c         return VpCreateRbObject(strlen(RSTRING(bg)->ptr) + VpBaseFig() + 1,
VpCreateRbObject  457 ext/bigdecimal/bigdecimal.c         GUARD_OBJ(c,VpCreateRbObject(VpBaseFig() + 1, "0"));
VpCreateRbObject  460 ext/bigdecimal/bigdecimal.c         GUARD_OBJ(c,VpCreateRbObject(mx *(VpBaseFig() + 1), "0"));
VpCreateRbObject  487 ext/bigdecimal/bigdecimal.c         GUARD_OBJ(c,VpCreateRbObject(VpBaseFig() + 1, "0"));
VpCreateRbObject  490 ext/bigdecimal/bigdecimal.c         GUARD_OBJ(c,VpCreateRbObject(mx *(VpBaseFig() + 1), "0"));
VpCreateRbObject  587 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(a->Prec *(VpBaseFig() + 1), "0"));
VpCreateRbObject  605 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(mx *(VpBaseFig() + 1), "0"));
VpCreateRbObject  624 ext/bigdecimal/bigdecimal.c     GUARD_OBJ((*c),VpCreateRbObject(mx, "#0"));
VpCreateRbObject  625 ext/bigdecimal/bigdecimal.c     GUARD_OBJ((*res),VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
VpCreateRbObject  671 ext/bigdecimal/bigdecimal.c        GUARD_OBJ(c,VpCreateRbObject(1, "0"));
VpCreateRbObject  672 ext/bigdecimal/bigdecimal.c        GUARD_OBJ(d,VpCreateRbObject(1, "0"));
VpCreateRbObject  681 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
VpCreateRbObject  682 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(res,VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
VpCreateRbObject  685 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(d,VpCreateRbObject(mx, "0"));
VpCreateRbObject  701 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(1, "NaN"));
VpCreateRbObject  702 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(d,VpCreateRbObject(1, "NaN"));
VpCreateRbObject  735 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c  ,VpCreateRbObject(mx, "0"));
VpCreateRbObject  736 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(res,VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
VpCreateRbObject  737 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(rr ,VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
VpCreateRbObject  738 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(ff ,VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
VpCreateRbObject  744 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(d,VpCreateRbObject(mx, "0"));
VpCreateRbObject  745 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(f,VpCreateRbObject(mx, "0"));
VpCreateRbObject  804 ext/bigdecimal/bigdecimal.c           GUARD_OBJ(cv,VpCreateRbObject(mx,"0"));
VpCreateRbObject  809 ext/bigdecimal/bigdecimal.c           GUARD_OBJ(res,VpCreateRbObject((mx * 2  + 2)*VpBaseFig(), "#0"));
VpCreateRbObject  878 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
VpCreateRbObject  896 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
VpCreateRbObject  910 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
VpCreateRbObject  952 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
VpCreateRbObject  977 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
VpCreateRbObject  992 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
VpCreateRbObject 1016 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
VpCreateRbObject 1041 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
VpCreateRbObject 1173 ext/bigdecimal/bigdecimal.c         GUARD_OBJ(y,VpCreateRbObject(mp *(ma + 1), "0"));
VpCreateRbObject 1175 ext/bigdecimal/bigdecimal.c         GUARD_OBJ(y,VpCreateRbObject(1, "0"));
VpCreateRbObject 1196 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(pv,VpCreateRbObject(mf, RSTRING(iniValue)->ptr));
VpCreateRbObject  108 ext/bigdecimal/bigdecimal.h VP_EXPORT  Real *VpCreateRbObject(U_LONG mx,char *str);


VpCtoV

VpCtoV           1996 ext/bigdecimal/bigdecimal.c     VpCtoV(vp, &(szVal[ipn]), ni, &(szVal[ipf]), nf, &(szVal[ipe]), ne);
VpCtoV            146 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpCtoV(Real *a,char *int_chr,U_LONG ni,char *frac,U_LONG nf,char *exp_chr,U_LONG ne);


VpDblFig

VpDblFig          138 ext/bigdecimal/bigdecimal.c     return INT2FIX(VpDblFig());
VpDblFig          894 ext/bigdecimal/bigdecimal.c     n = GetPositiveInt(nFig) + VpDblFig() + 1;
VpDblFig          111 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpDblFig(void);


VpDivd

VpDivd            626 ext/bigdecimal/bigdecimal.c     VpDivd(*c, *res, a, b);
VpDivd            683 ext/bigdecimal/bigdecimal.c     VpDivd(c, res, a, b);
VpDivd            740 ext/bigdecimal/bigdecimal.c     VpDivd(c, res, a, b);
VpDivd            810 ext/bigdecimal/bigdecimal.c           VpDivd(cv,res,av,bv);
VpDivd           3675 ext/bigdecimal/bigdecimal.c         VpDivd(f, r, x, y);     /* f = x/y    */
VpDivd           4034 ext/bigdecimal/bigdecimal.c         VpDivd(w1, w2, VpConstOne, y);
VpDivd            139 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpDivd(Real *c,Real *r,Real *a,Real *b);


VpDtoV

VpDtoV           3664 ext/bigdecimal/bigdecimal.c     VpDtoV(y, sqrt(val));    /* y <- sqrt(val) */
VpDtoV            148 ext/bigdecimal/bigdecimal.h VP_EXPORT void VpDtoV(Real *m,double d);


VpException

VpException        79 ext/bigdecimal/bigdecimal.c         VpException(VP_EXCEPTION_NaN,"Computation results to 'NaN'(Not a Number)",0);
VpException        81 ext/bigdecimal/bigdecimal.c         VpException(VP_EXCEPTION_INFINITY,"Computation results to 'Infinity'",0);
VpException        83 ext/bigdecimal/bigdecimal.c         VpException(VP_EXCEPTION_INFINITY,"Computation results to '-Infinity'",0);
VpException       278 ext/bigdecimal/bigdecimal.c             return VpException(VP_EXCEPTION_INFINITY,"Exponent overflow",0);
VpException       352 ext/bigdecimal/bigdecimal.c        VpException(VP_EXCEPTION_NaN,"Computation results to 'NaN'(Not a Number)",0);
VpException       355 ext/bigdecimal/bigdecimal.c        VpException(VP_EXCEPTION_INFINITY,"Computation results to 'Infinity'",0);
VpException       358 ext/bigdecimal/bigdecimal.c        VpException(VP_EXCEPTION_INFINITY,"Computation results to '-Infinity'",0);
VpException       415 ext/bigdecimal/bigdecimal.c        VpException(VP_EXCEPTION_OVERFLOW,"BigDecimal to Float conversion",0);
VpException      1403 ext/bigdecimal/bigdecimal.c         VpException(VP_EXCEPTION_MEMORY,"failed to allocate memory",1);
VpException      1710 ext/bigdecimal/bigdecimal.c     return VpException(VP_EXCEPTION_INFINITY,"Computation results to 'Infinity'",0);
VpException      1712 ext/bigdecimal/bigdecimal.c     return VpException(VP_EXCEPTION_NaN,"Computation results to 'NaN'",0);
VpException      1855 ext/bigdecimal/bigdecimal.c     return VpException(VP_EXCEPTION_UNDERFLOW,"Exponent underflow",0);
VpException      1859 ext/bigdecimal/bigdecimal.c     return VpException(VP_EXCEPTION_OVERFLOW,"Exponent overflow",0);
VpException      2627 ext/bigdecimal/bigdecimal.c         return VpException(VP_EXCEPTION_NaN,"(VpDivd) 0/0 not defined(NaN)",0);
VpException      2631 ext/bigdecimal/bigdecimal.c         return VpException(VP_EXCEPTION_ZERODIVIDE,"(VpDivd) Divide by zero",0);
VpException      3307 ext/bigdecimal/bigdecimal.c                 return VpException(VP_EXCEPTION_INFINITY,"exponent overflow",0);
VpException      3627 ext/bigdecimal/bigdecimal.c         return VpException(VP_EXCEPTION_OP,"(VpSqrt) SQRT(NaN or negative value)",0);
VpException      3634 ext/bigdecimal/bigdecimal.c         return VpException(VP_EXCEPTION_OP,"(VpSqrt) SQRT(negative value)",0);
VpException       129 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpException(unsigned short f,char *str,int always);


VpExponent10

VpExponent10      362 ext/bigdecimal/bigdecimal.c     e = VpExponent10(p);
VpExponent10     1118 ext/bigdecimal/bigdecimal.c     e = VpExponent10(vp);
VpExponent10     1131 ext/bigdecimal/bigdecimal.c     S_LONG e = VpExponent10(GetVpValue(self,1));
VpExponent10     3010 ext/bigdecimal/bigdecimal.c                 nc += fprintf(fp, "E%ld", VpExponent10(a));
VpExponent10      141 ext/bigdecimal/bigdecimal.h VP_EXPORT S_LONG VpExponent10(Real *a);


VpFormatSt

VpFormatSt       1391 ext/bigdecimal/bigdecimal.c static void VpFormatSt(char *psz,S_INT fFmt);
VpFormatSt       3211 ext/bigdecimal/bigdecimal.c     if(fFmt) VpFormatSt(pszSav, fFmt);
VpFormatSt       3265 ext/bigdecimal/bigdecimal.c     if(fFmt) VpFormatSt(pszSav, fFmt);


VpFrac

VpFrac            749 ext/bigdecimal/bigdecimal.c     VpFrac(f, c);
VpFrac            993 ext/bigdecimal/bigdecimal.c     VpFrac(c, a);
VpFrac            154 ext/bigdecimal/bigdecimal.h VP_EXPORT void VpFrac(Real *y,Real *x);


VpFree

VpFree             72 ext/bigdecimal/bigdecimal.c     VpFree(pv);
VpFree           2587 ext/bigdecimal/bigdecimal.c         VpFree(c);
VpFree           3707 ext/bigdecimal/bigdecimal.c     VpFree(f);
VpFree           3708 ext/bigdecimal/bigdecimal.c     VpFree(r);
VpFree           4046 ext/bigdecimal/bigdecimal.c     VpFree(w2);
VpFree           4047 ext/bigdecimal/bigdecimal.c     VpFree(w1);
VpFree            134 ext/bigdecimal/bigdecimal.h VP_EXPORT void VpFree(Real *pv);


VpGetDoubleNaN

VpGetDoubleNaN   1772 ext/bigdecimal/bigdecimal.c     VpGetDoubleNaN();
VpGetDoubleNaN   3421 ext/bigdecimal/bigdecimal.c         *d = VpGetDoubleNaN();
VpGetDoubleNaN    115 ext/bigdecimal/bigdecimal.h VP_EXPORT double VpGetDoubleNaN(void);


VpGetDoubleNegInf

VpGetDoubleNegInf 1569 ext/bigdecimal/bigdecimal.c     if(nzero!=0.0) nzero = (One()/VpGetDoubleNegInf());
VpGetDoubleNegInf 1774 ext/bigdecimal/bigdecimal.c     VpGetDoubleNegInf();
VpGetDoubleNegInf 3445 ext/bigdecimal/bigdecimal.c         *d = VpGetDoubleNegInf();
VpGetDoubleNegInf  117 ext/bigdecimal/bigdecimal.h VP_EXPORT double VpGetDoubleNegInf(void);


VpGetDoubleNegZero

VpGetDoubleNegZero 1576 ext/bigdecimal/bigdecimal.c     double z = VpGetDoubleNegZero();
VpGetDoubleNegZero 1775 ext/bigdecimal/bigdecimal.c     VpGetDoubleNegZero();
VpGetDoubleNegZero 3433 ext/bigdecimal/bigdecimal.c         *d = VpGetDoubleNegZero();
VpGetDoubleNegZero  118 ext/bigdecimal/bigdecimal.h VP_EXPORT double VpGetDoubleNegZero(void);


VpGetDoublePosInf

VpGetDoublePosInf 1773 ext/bigdecimal/bigdecimal.c     VpGetDoublePosInf();
VpGetDoublePosInf 3439 ext/bigdecimal/bigdecimal.c         *d = VpGetDoublePosInf();
VpGetDoublePosInf  116 ext/bigdecimal/bigdecimal.h VP_EXPORT double VpGetDoublePosInf(void);


VpGetException

VpGetException     60 ext/bigdecimal/bigdecimal.c static unsigned short VpGetException(void);
VpGetException    230 ext/bigdecimal/bigdecimal.c         fo = VpGetException();
VpGetException    244 ext/bigdecimal/bigdecimal.c         fo = VpGetException();


VpGetPrecLimit

VpGetPrecLimit   1223 ext/bigdecimal/bigdecimal.c     VALUE  nCur = INT2NUM(VpGetPrecLimit());
VpGetPrecLimit   1882 ext/bigdecimal/bigdecimal.c     U_LONG mf = VpGetPrecLimit();
VpGetPrecLimit   3845 ext/bigdecimal/bigdecimal.c     U_LONG ix = VpGetPrecLimit();
VpGetPrecLimit    121 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpGetPrecLimit(void);


VpGetRoundMode

VpGetRoundMode    249 ext/bigdecimal/bigdecimal.c         fo = VpGetRoundMode();
VpGetRoundMode    812 ext/bigdecimal/bigdecimal.c           VpLeftRound(cv,VpGetRoundMode(),ix);
VpGetRoundMode    830 ext/bigdecimal/bigdecimal.c        VpLeftRound(cv,VpGetRoundMode(),mx);
VpGetRoundMode    847 ext/bigdecimal/bigdecimal.c        VpLeftRound(cv,VpGetRoundMode(),mx);
VpGetRoundMode    864 ext/bigdecimal/bigdecimal.c        VpLeftRound(cv,VpGetRoundMode(),mx);
VpGetRoundMode    926 ext/bigdecimal/bigdecimal.c     int    sw = VpGetRoundMode();
VpGetRoundMode   3850 ext/bigdecimal/bigdecimal.c     return VpLeftRound(c,VpGetRoundMode(),ix);
VpGetRoundMode    126 ext/bigdecimal/bigdecimal.h VP_EXPORT unsigned long VpGetRoundMode(void);


VpGetSign

VpGetSign         366 ext/bigdecimal/bigdecimal.c         e = VpGetSign(p)*p->frac[0];
VpGetSign         373 ext/bigdecimal/bigdecimal.c     if(VpGetSign(p)<0) *pch++ = '-';
VpGetSign         462 ext/bigdecimal/bigdecimal.c             VpSetInf(c,VpGetSign(a));
VpGetSign         492 ext/bigdecimal/bigdecimal.c             VpSetInf(c,VpGetSign(a));
VpGetSign         689 ext/bigdecimal/bigdecimal.c     if(!VpIsZero(c) && (VpGetSign(a)*VpGetSign(b)<0)) {
VpGetSign        1639 ext/bigdecimal/bigdecimal.c                 if(VpGetSign(a)==VpGetSign(b)) {
VpGetSign        1640 ext/bigdecimal/bigdecimal.c                     VpSetInf(c,VpGetSign(a));
VpGetSign        1647 ext/bigdecimal/bigdecimal.c                 if(VpGetSign(a)!=VpGetSign(b)) {
VpGetSign        1648 ext/bigdecimal/bigdecimal.c                     VpSetInf(c,VpGetSign(a));
VpGetSign        1656 ext/bigdecimal/bigdecimal.c                 VpSetInf(c,VpGetSign(a)*VpGetSign(b));
VpGetSign        1671 ext/bigdecimal/bigdecimal.c                 VpSetInf(c,VpGetSign(a));
VpGetSign        1678 ext/bigdecimal/bigdecimal.c                 VpSetInf(c,VpGetSign(a)*VpGetSign(b));
VpGetSign        1681 ext/bigdecimal/bigdecimal.c                 VpSetInf(c,VpGetSign(a)*VpGetSign(b));
VpGetSign        1690 ext/bigdecimal/bigdecimal.c                 VpSetInf(c,VpGetSign(b));
VpGetSign        1693 ext/bigdecimal/bigdecimal.c                 VpSetInf(c,-VpGetSign(b));
VpGetSign        1700 ext/bigdecimal/bigdecimal.c                 VpSetInf(c,VpGetSign(a)*VpGetSign(b));
VpGetSign        1703 ext/bigdecimal/bigdecimal.c                 VpSetZero(c,VpGetSign(a)*VpGetSign(b));
VpGetSign        1854 ext/bigdecimal/bigdecimal.c     VpSetZero(a,VpGetSign(a));
VpGetSign        1858 ext/bigdecimal/bigdecimal.c     VpSetInf(a,VpGetSign(a));
VpGetSign        2021 ext/bigdecimal/bigdecimal.c         VpSetInf(c,isw*VpGetSign(a));
VpGetSign        2028 ext/bigdecimal/bigdecimal.c         VpSetSign(c,(isw*VpGetSign(a)));    /* set sign */
VpGetSign        2043 ext/bigdecimal/bigdecimal.c         VpSetZero(c,isw*VpGetSign(a));
VpGetSign        2079 ext/bigdecimal/bigdecimal.c             if(VpGetSign(a)<0 && operation*VpGetSign(b)<0) {
VpGetSign        2134 ext/bigdecimal/bigdecimal.c         if(VpGetSign(a) + sw *VpGetSign(b) == 0) {
VpGetSign        2143 ext/bigdecimal/bigdecimal.c     isw = VpGetSign(a) + sw *VpGetSign(b);
VpGetSign        2159 ext/bigdecimal/bigdecimal.c             VpSetSign(c,VpGetSign(a));
VpGetSign        2161 ext/bigdecimal/bigdecimal.c             VpSetSign(c,VpGetSign(a_ptr) * sw);
VpGetSign        2503 ext/bigdecimal/bigdecimal.c         VpSetZero(c,VpGetSign(a)*VpGetSign(b));
VpGetSign        2508 ext/bigdecimal/bigdecimal.c         VpAsgn(c, b, VpGetSign(a));
VpGetSign        2512 ext/bigdecimal/bigdecimal.c         VpAsgn(c, a, VpGetSign(b));
VpGetSign        2537 ext/bigdecimal/bigdecimal.c     VpSetSign(c,VpGetSign(a)*VpGetSign(b));    /* set sign  */
VpGetSign        2630 ext/bigdecimal/bigdecimal.c         VpSetInf(c,VpGetSign(a)*VpGetSign(b));
VpGetSign        2635 ext/bigdecimal/bigdecimal.c         VpSetZero(c,VpGetSign(a)*VpGetSign(b));
VpGetSign        2636 ext/bigdecimal/bigdecimal.c         VpSetZero(r,VpGetSign(a)*VpGetSign(b));
VpGetSign        2641 ext/bigdecimal/bigdecimal.c         VpAsgn(c, a, VpGetSign(b));
VpGetSign        2642 ext/bigdecimal/bigdecimal.c         VpSetZero(r,VpGetSign(a));
VpGetSign        2782 ext/bigdecimal/bigdecimal.c     VpSetSign(c,VpGetSign(a)*VpGetSign(b));
VpGetSign        2787 ext/bigdecimal/bigdecimal.c     VpSetSign(r,VpGetSign(a));
VpGetSign        2840 ext/bigdecimal/bigdecimal.c     VpSetZero(a,VpGetSign(a));
VpGetSign        2878 ext/bigdecimal/bigdecimal.c         val = -VpGetSign(b);
VpGetSign        2882 ext/bigdecimal/bigdecimal.c         val = VpGetSign(a);
VpGetSign        2887 ext/bigdecimal/bigdecimal.c     if(VpGetSign(a) > VpGetSign(b)) {
VpGetSign        2891 ext/bigdecimal/bigdecimal.c     if(VpGetSign(a) < VpGetSign(b)) {
VpGetSign        2898 ext/bigdecimal/bigdecimal.c         val = VpGetSign(a);
VpGetSign        2902 ext/bigdecimal/bigdecimal.c         val = -VpGetSign(b);
VpGetSign        2911 ext/bigdecimal/bigdecimal.c             val = VpGetSign(a);
VpGetSign        2915 ext/bigdecimal/bigdecimal.c             val = -VpGetSign(b);
VpGetSign        2921 ext/bigdecimal/bigdecimal.c         val = VpGetSign(a);
VpGetSign        2923 ext/bigdecimal/bigdecimal.c         val = -VpGetSign(b);
VpGetSign        2984 ext/bigdecimal/bigdecimal.c                 if(VpGetSign(a) < 0) {
VpGetSign        3110 ext/bigdecimal/bigdecimal.c         if(VpGetSign(a) < 0) *psz++ = '-';
VpGetSign        3181 ext/bigdecimal/bigdecimal.c     if(VpGetSign(a) < 0) *psz++ = '-';
VpGetSign        3225 ext/bigdecimal/bigdecimal.c     if(VpGetSign(a) < 0) *psz++ = '-';
VpGetSign        3461 ext/bigdecimal/bigdecimal.c     *d *= VpGetSign(m);
VpGetSign        3622 ext/bigdecimal/bigdecimal.c         if(VpIsZero(x)||VpGetSign(x)>0) {
VpGetSign        3632 ext/bigdecimal/bigdecimal.c     if(VpGetSign(x) < 0) {
VpGetSign        3773 ext/bigdecimal/bigdecimal.c         if(fracf && (VpGetSign(y)>0)) ++div;
VpGetSign        3776 ext/bigdecimal/bigdecimal.c         if(fracf && (VpGetSign(y)<0)) ++div;
VpGetSign        3795 ext/bigdecimal/bigdecimal.c             S_INT s = VpGetSign(y);
VpGetSign        3875 ext/bigdecimal/bigdecimal.c         if(v && (VpGetSign(c)>0)) f = 1;
VpGetSign        3878 ext/bigdecimal/bigdecimal.c         if(v && (VpGetSign(c)<0)) f = 1;
VpGetSign        3930 ext/bigdecimal/bigdecimal.c         VpSetZero(y,VpGetSign(x));
VpGetSign        3940 ext/bigdecimal/bigdecimal.c     VpSetSign(y,VpGetSign(x));
VpGetSign        3977 ext/bigdecimal/bigdecimal.c         sign = VpGetSign(x);
VpGetSign        3996 ext/bigdecimal/bigdecimal.c         if(VpGetSign(x) > 0) goto Exit;


VpHasVal

VpHasVal          644 ext/bigdecimal/bigdecimal.c     if(VpHasVal(div)) { /* frac[0] must be zero for NaN,INF,Zero */
VpHasVal         3078 ext/bigdecimal/bigdecimal.c     if(!VpHasVal(a)) return 0;
VpHasVal         3621 ext/bigdecimal/bigdecimal.c     if(!VpHasVal(x)) {
VpHasVal         3826 ext/bigdecimal/bigdecimal.c     if(!VpHasVal(y)) return 0; /* Unable to round */
VpHasVal         3924 ext/bigdecimal/bigdecimal.c     if(!VpHasVal(x)) {


VpInit

VpInit           1249 ext/bigdecimal/bigdecimal.c     VpInit((U_LONG)0);
VpInit            132 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpInit(U_LONG BaseVal);


VpInternalRound

VpInternalRound    62 ext/bigdecimal/bigdecimal.c static void  VpInternalRound(Real *c,int ixDigit,U_LONG vPrev,U_LONG v);
VpInternalRound   645 ext/bigdecimal/bigdecimal.c        VpInternalRound(c,0,c->frac[c->Prec-1],(VpBaseVal()*res->frac[0])/div->frac[0]);
VpInternalRound  2036 ext/bigdecimal/bigdecimal.c                VpInternalRound(c,n,(n>0)?a->frac[n-1]:0,a->frac[n]);
VpInternalRound  2164 ext/bigdecimal/bigdecimal.c     VpInternalRound(c,0,(c->Prec>0)?c->frac[c->Prec-1]:0,mrv);
VpInternalRound  3531 ext/bigdecimal/bigdecimal.c     VpInternalRound(m,0,(m->Prec>0)?m->frac[m->Prec-1]:0,


VpIsDef

VpIsDef           270 ext/bigdecimal/bigdecimal.c     if(!VpIsDef(a) || !VpIsDef(b)) return (-1L);
VpIsDef          1171 ext/bigdecimal/bigdecimal.c     if(VpIsDef(x)) {
VpIsDef          1729 ext/bigdecimal/bigdecimal.c     if(!VpIsDef(vp)) return 32; /* not sure,may be OK */
VpIsDef          2822 ext/bigdecimal/bigdecimal.c     if(!VpIsDef(a)) goto NoVal;
VpIsDef          2863 ext/bigdecimal/bigdecimal.c     if(!VpIsDef(a)) {
VpIsDef          2864 ext/bigdecimal/bigdecimal.c         if(!VpIsDef(b)) e = a->sign - b->sign;
VpIsDef          2870 ext/bigdecimal/bigdecimal.c     if(!VpIsDef(b)) {
VpIsDef          3988 ext/bigdecimal/bigdecimal.c     if(!VpIsDef(x)) {


VpIsDefOP

VpIsDefOP        1385 ext/bigdecimal/bigdecimal.c static int VpIsDefOP(Real *c,Real *a,Real *b,int sw);
VpIsDefOP        2070 ext/bigdecimal/bigdecimal.c     if(!VpIsDefOP(c,a,b,(operation>0)?1:2)) return 0; /* No significant digits */
VpIsDefOP        2499 ext/bigdecimal/bigdecimal.c     if(!VpIsDefOP(c,a,b,3)) return 0; /* No significant digit */
VpIsDefOP        2624 ext/bigdecimal/bigdecimal.c     if(!VpIsDefOP(c,a,b,4)) goto Exit;


VpIsInf

VpIsInf           335 ext/bigdecimal/bigdecimal.c     if(VpIsInf(p)) return Qfalse;
VpIsInf           668 ext/bigdecimal/bigdecimal.c     if(VpIsInf(a) || VpIsInf(b)) goto NaN;
VpIsInf          1634 ext/bigdecimal/bigdecimal.c     if(VpIsInf(a)) {
VpIsInf          1635 ext/bigdecimal/bigdecimal.c         if(VpIsInf(b)) {
VpIsInf          1686 ext/bigdecimal/bigdecimal.c     if(VpIsInf(b)) {
VpIsInf          2020 ext/bigdecimal/bigdecimal.c     if(VpIsInf(a)) {
VpIsInf           201 ext/bigdecimal/bigdecimal.h #define VpIsDef(a)      ( !(VpIsNaN(a)||VpIsInf(a)) )


VpIsNaN

VpIsNaN            78 ext/bigdecimal/bigdecimal.c     if(VpIsNaN(p)) {
VpIsNaN           317 ext/bigdecimal/bigdecimal.c     if(VpIsNaN(p))  return Qtrue;
VpIsNaN           334 ext/bigdecimal/bigdecimal.c     if(VpIsNaN(p)) return Qfalse;
VpIsNaN           351 ext/bigdecimal/bigdecimal.c     if(VpIsNaN(p)) {
VpIsNaN           453 ext/bigdecimal/bigdecimal.c     if(VpIsNaN(b)) return b->obj;
VpIsNaN           454 ext/bigdecimal/bigdecimal.c     if(VpIsNaN(a)) return a->obj;
VpIsNaN           482 ext/bigdecimal/bigdecimal.c     if(VpIsNaN(b)) return b->obj;
VpIsNaN           483 ext/bigdecimal/bigdecimal.c     if(VpIsNaN(a)) return a->obj;
VpIsNaN           667 ext/bigdecimal/bigdecimal.c     if(VpIsNaN(a) || VpIsNaN(b)) goto NaN;
VpIsNaN          1628 ext/bigdecimal/bigdecimal.c     if(VpIsNaN(a) || VpIsNaN(b)) {
VpIsNaN          2016 ext/bigdecimal/bigdecimal.c     if(VpIsNaN(a)) {
VpIsNaN          2862 ext/bigdecimal/bigdecimal.c     if(VpIsNaN(a)||VpIsNaN(b)) return 999;
VpIsNaN          2958 ext/bigdecimal/bigdecimal.c     if(VpIsNaN(a)) {
VpIsNaN          3095 ext/bigdecimal/bigdecimal.c     if(VpIsNaN(a)) {
VpIsNaN          3139 ext/bigdecimal/bigdecimal.c     if(VpIsNaN(a)) {
VpIsNaN          3420 ext/bigdecimal/bigdecimal.c     if(VpIsNaN(m)) {
VpIsNaN           201 ext/bigdecimal/bigdecimal.h #define VpIsDef(a)      ( !(VpIsNaN(a)||VpIsInf(a)) )


VpIsNegInf

VpIsNegInf         82 ext/bigdecimal/bigdecimal.c     } else if(VpIsNegInf(p)) {
VpIsNegInf        326 ext/bigdecimal/bigdecimal.c     if(VpIsNegInf(p)) return INT2FIX(-1);
VpIsNegInf        357 ext/bigdecimal/bigdecimal.c     } else if(VpIsNegInf(p)) {
VpIsNegInf       2966 ext/bigdecimal/bigdecimal.c     if(VpIsNegInf(a)) {
VpIsNegInf       3103 ext/bigdecimal/bigdecimal.c     if(VpIsNegInf(a)) {
VpIsNegInf       3153 ext/bigdecimal/bigdecimal.c     if(VpIsNegInf(a)) {
VpIsNegInf       3444 ext/bigdecimal/bigdecimal.c     if(VpIsNegInf(m)) {
VpIsNegInf        200 ext/bigdecimal/bigdecimal.h #define VpIsInf(a)      (VpIsPosInf(a) || VpIsNegInf(a))


VpIsNegZero

VpIsNegZero      3432 ext/bigdecimal/bigdecimal.c     if(VpIsNegZero(m)) {
VpIsNegZero       188 ext/bigdecimal/bigdecimal.h #define VpIsZero(a)     (VpIsPosZero(a) || VpIsNegZero(a))


VpIsOne

VpIsOne          2507 ext/bigdecimal/bigdecimal.c     if(VpIsOne(a)) {
VpIsOne          2511 ext/bigdecimal/bigdecimal.c     if(VpIsOne(b)) {
VpIsOne          2639 ext/bigdecimal/bigdecimal.c     if(VpIsOne(b)) {
VpIsOne          3638 ext/bigdecimal/bigdecimal.c     if(VpIsOne(x)) {


VpIsPosInf

VpIsPosInf         80 ext/bigdecimal/bigdecimal.c     } else if(VpIsPosInf(p)) {
VpIsPosInf        325 ext/bigdecimal/bigdecimal.c     if(VpIsPosInf(p)) return INT2FIX(1);
VpIsPosInf        354 ext/bigdecimal/bigdecimal.c     } else if(VpIsPosInf(p)) {
VpIsPosInf       2962 ext/bigdecimal/bigdecimal.c     if(VpIsPosInf(a)) {
VpIsPosInf       3099 ext/bigdecimal/bigdecimal.c     if(VpIsPosInf(a)) {
VpIsPosInf       3144 ext/bigdecimal/bigdecimal.c     if(VpIsPosInf(a)) {
VpIsPosInf       3438 ext/bigdecimal/bigdecimal.c     if(VpIsPosInf(m)) {
VpIsPosInf        200 ext/bigdecimal/bigdecimal.h #define VpIsInf(a)      (VpIsPosInf(a) || VpIsNegInf(a))


VpIsPosZero

VpIsPosZero      3130 ext/bigdecimal/bigdecimal.c         if(VpIsPosZero(a)) sprintf(psz, "0");
VpIsPosZero      3158 ext/bigdecimal/bigdecimal.c         if(VpIsPosZero(a)) {
VpIsPosZero      3426 ext/bigdecimal/bigdecimal.c     if(VpIsPosZero(m)) {
VpIsPosZero       188 ext/bigdecimal/bigdecimal.h #define VpIsZero(a)     (VpIsPosZero(a) || VpIsNegZero(a))


VpIsRoundMode

VpIsRoundMode     252 ext/bigdecimal/bigdecimal.c         if(!VpIsRoundMode(FIX2INT(val))) {
VpIsRoundMode     942 ext/bigdecimal/bigdecimal.c         if(!VpIsRoundMode(sw)) {
VpIsRoundMode    1483 ext/bigdecimal/bigdecimal.c     if(VpIsRoundMode(n)) gfRoundMode = n;
VpIsRoundMode     125 ext/bigdecimal/bigdecimal.h VP_EXPORT int           VpIsRoundMode(unsigned long n);


VpIsZero

VpIsZero          529 ext/bigdecimal/bigdecimal.c     return VpIsZero(a) ? Qtrue : Qfalse;
VpIsZero          536 ext/bigdecimal/bigdecimal.c     return VpIsZero(a) ? Qnil : self;
VpIsZero          669 ext/bigdecimal/bigdecimal.c     if(VpIsZero(b))              goto NaN;
VpIsZero          670 ext/bigdecimal/bigdecimal.c     if(VpIsZero(a)) {
VpIsZero          689 ext/bigdecimal/bigdecimal.c     if(!VpIsZero(c) && (VpGetSign(a)*VpGetSign(b)<0)) {
VpIsZero         1674 ext/bigdecimal/bigdecimal.c                 if(VpIsZero(b)) {
VpIsZero         1696 ext/bigdecimal/bigdecimal.c                 if(VpIsZero(a)) {
VpIsZero         2026 ext/bigdecimal/bigdecimal.c     if(!VpIsZero(a)) {
VpIsZero         2073 ext/bigdecimal/bigdecimal.c     if(VpIsZero(a)) {
VpIsZero         2075 ext/bigdecimal/bigdecimal.c         if(!VpIsZero(b)) {
VpIsZero         2089 ext/bigdecimal/bigdecimal.c     if(VpIsZero(b)) {
VpIsZero         2501 ext/bigdecimal/bigdecimal.c     if(VpIsZero(a) || VpIsZero(b)) {
VpIsZero         2625 ext/bigdecimal/bigdecimal.c     if(VpIsZero(a)&&VpIsZero(b)) {
VpIsZero         2629 ext/bigdecimal/bigdecimal.c     if(VpIsZero(b)) {
VpIsZero         2633 ext/bigdecimal/bigdecimal.c     if(VpIsZero(a)) {
VpIsZero         2823 ext/bigdecimal/bigdecimal.c     if(VpIsZero(a)) goto NoVal;
VpIsZero         2876 ext/bigdecimal/bigdecimal.c     if(VpIsZero(a)) {
VpIsZero         2877 ext/bigdecimal/bigdecimal.c         if(VpIsZero(b))      return 0; /* both zero */
VpIsZero         2881 ext/bigdecimal/bigdecimal.c     if(VpIsZero(b)) {
VpIsZero         2970 ext/bigdecimal/bigdecimal.c     if(VpIsZero(a)) {
VpIsZero         2983 ext/bigdecimal/bigdecimal.c          if(!VpIsZero(a)) {
VpIsZero         3109 ext/bigdecimal/bigdecimal.c     if(!VpIsZero(a)) {
VpIsZero         3157 ext/bigdecimal/bigdecimal.c     if(VpIsZero(a)) {
VpIsZero         3622 ext/bigdecimal/bigdecimal.c         if(VpIsZero(x)||VpGetSign(x)>0) {
VpIsZero         3678 ext/bigdecimal/bigdecimal.c         if(VpIsZero(f))         goto converge;
VpIsZero         3972 ext/bigdecimal/bigdecimal.c     if(VpIsZero(x)) {


VpLeftRound

VpLeftRound       812 ext/bigdecimal/bigdecimal.c           VpLeftRound(cv,VpGetRoundMode(),ix);
VpLeftRound       830 ext/bigdecimal/bigdecimal.c        VpLeftRound(cv,VpGetRoundMode(),mx);
VpLeftRound       847 ext/bigdecimal/bigdecimal.c        VpLeftRound(cv,VpGetRoundMode(),mx);
VpLeftRound       864 ext/bigdecimal/bigdecimal.c        VpLeftRound(cv,VpGetRoundMode(),mx);
VpLeftRound      3850 ext/bigdecimal/bigdecimal.c     return VpLeftRound(c,VpGetRoundMode(),ix);
VpLeftRound       153 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpLeftRound(Real *y, int f, int nf);


VpLimitRound

VpLimitRound       63 ext/bigdecimal/bigdecimal.c static int   VpLimitRound(Real *c,U_LONG ixDigit);
VpLimitRound     2038 ext/bigdecimal/bigdecimal.c                VpLimitRound(c,0);
VpLimitRound     2590 ext/bigdecimal/bigdecimal.c         VpLimitRound(c,0);
VpLimitRound     3858 ext/bigdecimal/bigdecimal.c     if(VpLimitRound(c,ixDigit)) return;


VpMaxPrec

VpMaxPrec         184 ext/bigdecimal/bigdecimal.c     sprintf(sz,"%lu:",VpMaxPrec(vp)*VpBaseFig());
VpMaxPrec        1152 ext/bigdecimal/bigdecimal.c     sprintf(pszAll,"#<BigDecimal:%lx,'%s',%lu(%lu)>",self,psz1,VpPrec(vp)*VpBaseFig(),VpMaxPrec(vp)*VpBaseFig());


VpMemAlloc

VpMemAlloc       1901 ext/bigdecimal/bigdecimal.c        vp = (Real *) VpMemAlloc(sizeof(Real) + mx * sizeof(U_LONG));
VpMemAlloc       1921 ext/bigdecimal/bigdecimal.c         vp = (Real *) VpMemAlloc(sizeof(Real) + sizeof(U_LONG));
VpMemAlloc       1927 ext/bigdecimal/bigdecimal.c         vp = (Real *) VpMemAlloc(sizeof(Real) + sizeof(U_LONG));
VpMemAlloc       1933 ext/bigdecimal/bigdecimal.c         vp = (Real *) VpMemAlloc(sizeof(Real) + sizeof(U_LONG));
VpMemAlloc       1992 ext/bigdecimal/bigdecimal.c     vp =(Real *) VpMemAlloc(sizeof(Real) + mx * sizeof(U_LONG));
VpMemAlloc        133 ext/bigdecimal/bigdecimal.h VP_EXPORT void *VpMemAlloc(U_LONG mb);


VpMidRound

VpMidRound       3831 ext/bigdecimal/bigdecimal.c     return VpMidRound(y,f,nf);
VpMidRound       3839 ext/bigdecimal/bigdecimal.c     return VpMidRound(y,f,nf);
VpMidRound        152 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpMidRound(Real *y, int f, int nf);


VpMult

VpMult            606 ext/bigdecimal/bigdecimal.c     VpMult(c, a, b);
VpMult            687 ext/bigdecimal/bigdecimal.c     VpMult(res,d,b);
VpMult            750 ext/bigdecimal/bigdecimal.c     VpMult(rr,f,b);
VpMult           3677 ext/bigdecimal/bigdecimal.c         VpMult(f, VpPt5, r);    /* f = 0.5*r  */
VpMult           3696 ext/bigdecimal/bigdecimal.c         VpMult(r, y, y);
VpMult           4025 ext/bigdecimal/bigdecimal.c         VpMult(w2, w1, w1);
VpMult           4030 ext/bigdecimal/bigdecimal.c         VpMult(w2, y, w1);
VpMult            138 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpMult(Real *c,Real *a,Real *b);


VpNewRbClass

VpNewRbClass      210 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(pv,VpNewRbClass(m,pch,self));
VpNewRbClass     1215 ext/bigdecimal/bigdecimal.c     GUARD_OBJ(pv,VpNewRbClass(mf, RSTRING(iniValue)->ptr,self));
VpNewRbClass      106 ext/bigdecimal/bigdecimal.h VpNewRbClass(U_LONG mx,char *str,VALUE klass);


VpNmlz

VpNmlz           1390 ext/bigdecimal/bigdecimal.c static int VpNmlz(Real *a);
VpNmlz           2585 ext/bigdecimal/bigdecimal.c         VpNmlz(c);
VpNmlz           2783 ext/bigdecimal/bigdecimal.c     VpNmlz(c);            /* normalize c */
VpNmlz           2788 ext/bigdecimal/bigdecimal.c     VpNmlz(r);            /* normalize r(remainder) */
VpNmlz           3394 ext/bigdecimal/bigdecimal.c     VpNmlz(a);
VpNmlz           3593 ext/bigdecimal/bigdecimal.c     VpNmlz(m);
VpNmlz           3803 ext/bigdecimal/bigdecimal.c         VpNmlz(y);
VpNmlz           3846 ext/bigdecimal/bigdecimal.c     if(!VpNmlz(c))    return -1;
VpNmlz           3887 ext/bigdecimal/bigdecimal.c         VpNmlz(c);
VpNmlz           3911 ext/bigdecimal/bigdecimal.c         VpNmlz(m);
VpNmlz           3949 ext/bigdecimal/bigdecimal.c     VpNmlz(y);


VpNumOfChars

VpNumOfChars      185 ext/bigdecimal/bigdecimal.c     psz = ALLOCA_N(char,(unsigned int)VpNumOfChars(vp,"E")+strlen(sz));
VpNumOfChars     1084 ext/bigdecimal/bigdecimal.c         nc = VpNumOfChars(vp,"F");
VpNumOfChars     1086 ext/bigdecimal/bigdecimal.c         nc = VpNumOfChars(vp,"E");
VpNumOfChars     1111 ext/bigdecimal/bigdecimal.c     psz1 = ALLOCA_N(char,(unsigned int)VpNumOfChars(vp,"E"));
VpNumOfChars     1146 ext/bigdecimal/bigdecimal.c     nc = VpNumOfChars(vp,"E");
VpNumOfChars      131 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpNumOfChars(Real *vp,char *pszFmt);


VpOne

VpOne             690 ext/bigdecimal/bigdecimal.c         VpAddSub(res,d,VpOne(),-1);
VpOne             158 ext/bigdecimal/bigdecimal.h VP_EXPORT Real *VpOne();


VpPower

VpPower          1177 ext/bigdecimal/bigdecimal.c     VpPower(y, x, n);
VpPower           155 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpPower(Real *y,Real *x,S_INT n);


VpRdup

VpRdup           1392 ext/bigdecimal/bigdecimal.c static int VpRdup(Real *m,U_LONG ind_m);
VpRdup           3793 ext/bigdecimal/bigdecimal.c             VpRdup(y,ix);
VpRdup           3886 ext/bigdecimal/bigdecimal.c         VpRdup(c,ixDigit);    /* round up */


VpSetException

VpSetException     61 ext/bigdecimal/bigdecimal.c static void  VpSetException(unsigned short f);
VpSetException    237 ext/bigdecimal/bigdecimal.c             VpSetException((unsigned short)((val==Qtrue)?(fo|VP_EXCEPTION_INFINITY):
VpSetException    241 ext/bigdecimal/bigdecimal.c             VpSetException((unsigned short)((val==Qtrue)?(fo|VP_EXCEPTION_NaN):


VpSetInf

VpSetInf          462 ext/bigdecimal/bigdecimal.c             VpSetInf(c,VpGetSign(a));
VpSetInf          492 ext/bigdecimal/bigdecimal.c             VpSetInf(c,VpGetSign(a));
VpSetInf         1640 ext/bigdecimal/bigdecimal.c                     VpSetInf(c,VpGetSign(a));
VpSetInf         1648 ext/bigdecimal/bigdecimal.c                     VpSetInf(c,VpGetSign(a));
VpSetInf         1656 ext/bigdecimal/bigdecimal.c                 VpSetInf(c,VpGetSign(a)*VpGetSign(b));
VpSetInf         1671 ext/bigdecimal/bigdecimal.c                 VpSetInf(c,VpGetSign(a));
VpSetInf         1678 ext/bigdecimal/bigdecimal.c                 VpSetInf(c,VpGetSign(a)*VpGetSign(b));
VpSetInf         1681 ext/bigdecimal/bigdecimal.c                 VpSetInf(c,VpGetSign(a)*VpGetSign(b));
VpSetInf         1690 ext/bigdecimal/bigdecimal.c                 VpSetInf(c,VpGetSign(b));
VpSetInf         1693 ext/bigdecimal/bigdecimal.c                 VpSetInf(c,-VpGetSign(b));
VpSetInf         1700 ext/bigdecimal/bigdecimal.c                 VpSetInf(c,VpGetSign(a)*VpGetSign(b));
VpSetInf         1858 ext/bigdecimal/bigdecimal.c     VpSetInf(a,VpGetSign(a));
VpSetInf         2021 ext/bigdecimal/bigdecimal.c         VpSetInf(c,isw*VpGetSign(a));
VpSetInf         2630 ext/bigdecimal/bigdecimal.c         VpSetInf(c,VpGetSign(a)*VpGetSign(b));
VpSetInf         3981 ext/bigdecimal/bigdecimal.c            VpSetInf (y,sign);


VpSetNaN

VpSetNaN         1630 ext/bigdecimal/bigdecimal.c         VpSetNaN(c);
VpSetNaN         1643 ext/bigdecimal/bigdecimal.c                     VpSetNaN(c);
VpSetNaN         1651 ext/bigdecimal/bigdecimal.c                     VpSetNaN(c);
VpSetNaN         1660 ext/bigdecimal/bigdecimal.c                 VpSetNaN(c);
VpSetNaN         1663 ext/bigdecimal/bigdecimal.c             VpSetNaN(c);
VpSetNaN         1675 ext/bigdecimal/bigdecimal.c                     VpSetNaN(c);
VpSetNaN         1697 ext/bigdecimal/bigdecimal.c                     VpSetNaN(c);
VpSetNaN         1935 ext/bigdecimal/bigdecimal.c         VpSetNaN(vp);
VpSetNaN         2017 ext/bigdecimal/bigdecimal.c         VpSetNaN(c);
VpSetNaN         2623 ext/bigdecimal/bigdecimal.c     VpSetNaN(r);
VpSetNaN         2626 ext/bigdecimal/bigdecimal.c         VpSetNaN(c);
VpSetNaN         3485 ext/bigdecimal/bigdecimal.c         VpSetNaN(m);
VpSetNaN         3626 ext/bigdecimal/bigdecimal.c         VpSetNaN(y);
VpSetNaN         3633 ext/bigdecimal/bigdecimal.c         VpSetNaN(y);
VpSetNaN         3989 ext/bigdecimal/bigdecimal.c         VpSetNaN(y); /* Not sure !!! */


VpSetNegInf

VpSetNegInf      1929 ext/bigdecimal/bigdecimal.c         VpSetNegInf(vp);
VpSetNegInf      3490 ext/bigdecimal/bigdecimal.c         else   VpSetNegInf(m);
VpSetNegInf       204 ext/bigdecimal/bigdecimal.h #define VpSetInf(a,s)   ( ((s)>0)?VpSetPosInf(a):VpSetNegInf(a) )


VpSetOne

VpSetOne         3639 ext/bigdecimal/bigdecimal.c         VpSetOne(y);
VpSetOne         3797 ext/bigdecimal/bigdecimal.c             VpSetOne(y);
VpSetOne         3974 ext/bigdecimal/bigdecimal.c            VpSetOne(y);
VpSetOne         3995 ext/bigdecimal/bigdecimal.c         VpSetOne(y);
VpSetOne         4007 ext/bigdecimal/bigdecimal.c         VpSetOne(y);


VpSetPTR

VpSetPTR         1389 ext/bigdecimal/bigdecimal.c static U_LONG VpSetPTR(Real *a,Real *b,Real *c,U_LONG *a_pos,U_LONG *b_pos,U_LONG *c_pos,U_LONG *av,U_LONG *bv);
VpSetPTR         2202 ext/bigdecimal/bigdecimal.c     word_shift = VpSetPTR(a, b, c, &ap, &bp, &cp, &av, &bv);
VpSetPTR         2295 ext/bigdecimal/bigdecimal.c     word_shift = VpSetPTR(a, b, c, &ap, &bp, &cp, &av, &bv);


VpSetPosInf

VpSetPosInf      1923 ext/bigdecimal/bigdecimal.c         VpSetPosInf(vp);
VpSetPosInf      3489 ext/bigdecimal/bigdecimal.c         if(d>0.0) VpSetPosInf(m);
VpSetPosInf       204 ext/bigdecimal/bigdecimal.h #define VpSetInf(a,s)   ( ((s)>0)?VpSetPosInf(a):VpSetNegInf(a) )


VpSetPrecLimit

VpSetPrecLimit    802 ext/bigdecimal/bigdecimal.c           U_LONG pl = VpSetPrecLimit(0);
VpSetPrecLimit    811 ext/bigdecimal/bigdecimal.c           VpSetPrecLimit(pl);
VpSetPrecLimit    826 ext/bigdecimal/bigdecimal.c        U_LONG pl = VpSetPrecLimit(0);
VpSetPrecLimit    828 ext/bigdecimal/bigdecimal.c        VpSetPrecLimit(pl);
VpSetPrecLimit    843 ext/bigdecimal/bigdecimal.c        U_LONG pl = VpSetPrecLimit(0);
VpSetPrecLimit    845 ext/bigdecimal/bigdecimal.c        VpSetPrecLimit(pl);
VpSetPrecLimit    860 ext/bigdecimal/bigdecimal.c        U_LONG pl = VpSetPrecLimit(0);
VpSetPrecLimit    862 ext/bigdecimal/bigdecimal.c        VpSetPrecLimit(pl);
VpSetPrecLimit    949 ext/bigdecimal/bigdecimal.c     pl = VpSetPrecLimit(0);
VpSetPrecLimit    953 ext/bigdecimal/bigdecimal.c     VpSetPrecLimit(pl);
VpSetPrecLimit    966 ext/bigdecimal/bigdecimal.c     U_LONG pl = VpSetPrecLimit(0);
VpSetPrecLimit    978 ext/bigdecimal/bigdecimal.c     VpSetPrecLimit(pl);
VpSetPrecLimit   1005 ext/bigdecimal/bigdecimal.c     U_LONG pl = VpSetPrecLimit(0);
VpSetPrecLimit   1017 ext/bigdecimal/bigdecimal.c     VpSetPrecLimit(pl);
VpSetPrecLimit   1030 ext/bigdecimal/bigdecimal.c     U_LONG pl = VpSetPrecLimit(0);
VpSetPrecLimit   1042 ext/bigdecimal/bigdecimal.c     VpSetPrecLimit(pl);
VpSetPrecLimit   1233 ext/bigdecimal/bigdecimal.c         VpSetPrecLimit(nf);
VpSetPrecLimit    122 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpSetPrecLimit(U_LONG n);


VpSetRoundMode

VpSetRoundMode    256 ext/bigdecimal/bigdecimal.c         fo = VpSetRoundMode((unsigned long)FIX2INT(val));
VpSetRoundMode    127 ext/bigdecimal/bigdecimal.h VP_EXPORT unsigned long VpSetRoundMode(unsigned long n);


VpSetSign

VpSetSign        2028 ext/bigdecimal/bigdecimal.c         VpSetSign(c,(isw*VpGetSign(a)));    /* set sign */
VpSetSign        2152 ext/bigdecimal/bigdecimal.c         VpSetSign(c,(S_INT)1);
VpSetSign        2154 ext/bigdecimal/bigdecimal.c         VpSetSign(c,isw / 2);
VpSetSign        2156 ext/bigdecimal/bigdecimal.c         VpSetSign(c,(S_INT)1);
VpSetSign        2159 ext/bigdecimal/bigdecimal.c             VpSetSign(c,VpGetSign(a));
VpSetSign        2161 ext/bigdecimal/bigdecimal.c             VpSetSign(c,VpGetSign(a_ptr) * sw);
VpSetSign        2537 ext/bigdecimal/bigdecimal.c     VpSetSign(c,VpGetSign(a)*VpGetSign(b));    /* set sign  */
VpSetSign        2782 ext/bigdecimal/bigdecimal.c     VpSetSign(c,VpGetSign(a)*VpGetSign(b));
VpSetSign        2787 ext/bigdecimal/bigdecimal.c     VpSetSign(r,VpGetSign(a));
VpSetSign        3393 ext/bigdecimal/bigdecimal.c     VpSetSign(a,sign);
VpSetSign        3524 ext/bigdecimal/bigdecimal.c         VpSetSign(m, (S_INT)1);
VpSetSign        3526 ext/bigdecimal/bigdecimal.c         VpSetSign(m,-(S_INT)1);
VpSetSign        3592 ext/bigdecimal/bigdecimal.c     VpSetSign(m,isign);
VpSetSign        3798 ext/bigdecimal/bigdecimal.c             VpSetSign(y,s);
VpSetSign        3940 ext/bigdecimal/bigdecimal.c     VpSetSign(y,VpGetSign(x));
VpSetSign        3998 ext/bigdecimal/bigdecimal.c         VpSetSign(y,-(S_INT)1);


VpSetZero

VpSetZero        1703 ext/bigdecimal/bigdecimal.c                 VpSetZero(c,VpGetSign(a)*VpGetSign(b));
VpSetZero        1854 ext/bigdecimal/bigdecimal.c     VpSetZero(a,VpGetSign(a));
VpSetZero        1904 ext/bigdecimal/bigdecimal.c        VpSetZero(vp,1);    /* initialize vp to zero. */
VpSetZero        1995 ext/bigdecimal/bigdecimal.c     VpSetZero(vp,sign);
VpSetZero        2043 ext/bigdecimal/bigdecimal.c         VpSetZero(c,isw*VpGetSign(a));
VpSetZero        2081 ext/bigdecimal/bigdecimal.c                 VpSetZero(c,-1);
VpSetZero        2083 ext/bigdecimal/bigdecimal.c                 VpSetZero(c,1);
VpSetZero        2135 ext/bigdecimal/bigdecimal.c             VpSetZero(c,1);        /* abs(a)=abs(b) and operation = '-'  */
VpSetZero        2503 ext/bigdecimal/bigdecimal.c         VpSetZero(c,VpGetSign(a)*VpGetSign(b));
VpSetZero        2635 ext/bigdecimal/bigdecimal.c         VpSetZero(c,VpGetSign(a)*VpGetSign(b));
VpSetZero        2636 ext/bigdecimal/bigdecimal.c         VpSetZero(r,VpGetSign(a)*VpGetSign(b));
VpSetZero        2642 ext/bigdecimal/bigdecimal.c         VpSetZero(r,VpGetSign(a));
VpSetZero        2840 ext/bigdecimal/bigdecimal.c     VpSetZero(a,VpGetSign(a));
VpSetZero        3495 ext/bigdecimal/bigdecimal.c         VpSetZero(m,1);
VpSetZero        3556 ext/bigdecimal/bigdecimal.c         VpSetZero(m,1);
VpSetZero        3930 ext/bigdecimal/bigdecimal.c         VpSetZero(y,VpGetSign(x));
VpSetZero        3984 ext/bigdecimal/bigdecimal.c            VpSetZero(y,sign);


VpSqrt

VpSqrt            897 ext/bigdecimal/bigdecimal.c     VpSqrt(c, a);
VpSqrt            150 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpSqrt(Real *y,Real *x);


VpSubAbs

VpSubAbs         1388 ext/bigdecimal/bigdecimal.c static U_LONG VpSubAbs(Real *a,Real *b,Real *c);
VpSubAbs         2157 ext/bigdecimal/bigdecimal.c         mrv = VpSubAbs(a_ptr, b_ptr, c);


VpSzMantissa

VpSzMantissa     1112 ext/bigdecimal/bigdecimal.c     VpSzMantissa(vp,psz1);
VpSzMantissa      142 ext/bigdecimal/bigdecimal.h VP_EXPORT void VpSzMantissa(Real *a,char *psz);


VpToFString

VpToFString      1093 ext/bigdecimal/bigdecimal.c         VpToFString(vp, psz, mc, fPlus);
VpToFString       145 ext/bigdecimal/bigdecimal.h VP_EXPORT void VpToFString(Real *a,char *psz,int fFmt,int fPlus);


VpToSpecialString

VpToSpecialString 3177 ext/bigdecimal/bigdecimal.c     if(VpToSpecialString(a,psz,fPlus)) return;
VpToSpecialString 3223 ext/bigdecimal/bigdecimal.c     if(VpToSpecialString(a,psz,fPlus)) return;
VpToSpecialString  143 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpToSpecialString(Real *a,char *psz,int fPlus);


VpToString

VpToString        187 ext/bigdecimal/bigdecimal.c     VpToString(vp, psz+strlen(psz), 0, 0);
VpToString       1095 ext/bigdecimal/bigdecimal.c         VpToString (vp, psz, mc, fPlus);
VpToString       1151 ext/bigdecimal/bigdecimal.c     VpToString(vp, psz1, 10, 0);
VpToString        144 ext/bigdecimal/bigdecimal.h VP_EXPORT void VpToString(Real *a,char *psz,int fFmt,int fPlus);


VpVtoD

VpVtoD            411 ext/bigdecimal/bigdecimal.c     if(VpVtoD(&d, &e, p)!=1) return rb_float_new(d);
VpVtoD           3657 ext/bigdecimal/bigdecimal.c     VpVtoD(&val, &e, x);    /* val <- x  */
VpVtoD            147 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpVtoD(double *d,S_LONG *e,Real *m);


VwaitVarProc

VwaitVarProc     3042 ext/tk/tcltklib.c static char *VwaitVarProc _((ClientData, Tcl_Interp *,
VwaitVarProc     3160 ext/tk/tcltklib.c                        VwaitVarProc, (ClientData) &done);
VwaitVarProc     3182 ext/tk/tcltklib.c                    VwaitVarProc, (ClientData) &done);


WAIT_FD

WAIT_FD          10362 eval.c         	if (((th->wait_for & WAIT_FD) && fd == th->fd) ||
WAIT_FD          10522 eval.c         	if (th->wait_for & WAIT_FD) {
WAIT_FD          10630 eval.c         		if ((th->wait_for&WAIT_FD) && FD_ISSET(th->fd, &readfds)) {
WAIT_FD          10687 eval.c         	    if (th->wait_for & WAIT_FD) warn_printf("F(%d)", th->fd);
WAIT_FD          10739 eval.c             curr_thread->wait_for = WAIT_FD;


WAIT_IN_PROGRESS

WAIT_IN_PROGRESS 1006 ext/socket/socket.c #ifndef WAIT_IN_PROGRESS
WAIT_IN_PROGRESS 1020 ext/socket/socket.c #if WAIT_IN_PROGRESS > 0
WAIT_IN_PROGRESS 1063 ext/socket/socket.c #if WAIT_IN_PROGRESS > 0
WAIT_IN_PROGRESS 1076 ext/socket/socket.c #if WAIT_IN_PROGRESS > 0
WAIT_IN_PROGRESS 1077 ext/socket/socket.c 		wait_in_progress = WAIT_IN_PROGRESS;
WAIT_IN_PROGRESS 1086 ext/socket/socket.c #if WAIT_IN_PROGRESS > 0


WAIT_JOIN

WAIT_JOIN        10516 eval.c         	if (th->wait_for & WAIT_JOIN) {
WAIT_JOIN        10690 eval.c         	    if (th->wait_for & WAIT_JOIN)
WAIT_JOIN        10919 eval.c         	if ((th->wait_for & WAIT_JOIN) && th->join == curr_thread)
WAIT_JOIN        10927 eval.c         	curr_thread->wait_for = WAIT_JOIN;


WAIT_SELECT

WAIT_SELECT      10363 eval.c         	    ((th->wait_for & WAIT_SELECT) && (fd < th->fd) &&
WAIT_SELECT      10527 eval.c         	if (th->wait_for & WAIT_SELECT) {
WAIT_SELECT      10595 eval.c         		if (th->wait_for & WAIT_SELECT) {
WAIT_SELECT      10612 eval.c          		if (((th->wait_for&(WAIT_SELECT|WAIT_TIME)) == (WAIT_SELECT|WAIT_TIME)) &&
WAIT_SELECT      10638 eval.c         		if ((th->wait_for&WAIT_SELECT) &&
WAIT_SELECT      10688 eval.c         	    if (th->wait_for & WAIT_SELECT) warn_printf("S");
WAIT_SELECT      10756 eval.c             curr_thread->wait_for = WAIT_SELECT;
WAIT_SELECT      10896 eval.c             curr_thread->wait_for = WAIT_SELECT;


WAIT_TIME

WAIT_TIME        10533 eval.c         	    if (th->wait_for & WAIT_TIME) {
WAIT_TIME        10538 eval.c         	if (th->wait_for & WAIT_TIME) {
WAIT_TIME        10612 eval.c          		if (((th->wait_for&(WAIT_SELECT|WAIT_TIME)) == (WAIT_SELECT|WAIT_TIME)) &&
WAIT_TIME        10689 eval.c         	    if (th->wait_for & WAIT_TIME) warn_printf("T(%f)", th->delay);
WAIT_TIME        10810 eval.c             curr_thread->wait_for = WAIT_TIME;
WAIT_TIME        10900 eval.c         	curr_thread->wait_for |= WAIT_TIME;
WAIT_TIME        10929 eval.c         	if (limit < DELAY_INFTY) curr_thread->wait_for |= WAIT_TIME;
WAIT_TIME        11280 eval.c         	curr_thread->wait_for = WAIT_TIME;
WAIT_TIME        11312 eval.c             curr_thread->wait_for = WAIT_TIME;


WARN_BUFSIZE

WARN_BUFSIZE     2515 regparse.c         char buf[WARN_BUFSIZE];
WARN_BUFSIZE     2516 regparse.c         onig_snprintf_with_pattern(buf, WARN_BUFSIZE, env->enc,
WARN_BUFSIZE     2529 regparse.c         char buf[WARN_BUFSIZE];
WARN_BUFSIZE     2530 regparse.c         onig_snprintf_with_pattern(buf, WARN_BUFSIZE, (env)->enc,
WARN_BUFSIZE     4498 regparse.c             char buf[WARN_BUFSIZE];
WARN_BUFSIZE     4509 regparse.c                 onig_snprintf_with_pattern(buf, WARN_BUFSIZE, env->enc,
WARN_BUFSIZE     4519 regparse.c                 onig_snprintf_with_pattern(buf, WARN_BUFSIZE, env->enc,


WC2VSTR

WC2VSTR          1367 ext/win32ole/win32ole.c     vclsid = WC2VSTR(pbuf);
WC2VSTR          1845 ext/win32ole/win32ole.c         oletype_set_member(type, pTypeInfo, WC2VSTR(bstr));
WC2VSTR          2914 ext/win32ole/win32ole.c         fname = WC2VSTR(bstr);
WC2VSTR          2993 ext/win32ole/win32ole.c                                  i, WC2VSTR(bstr));
WC2VSTR          3056 ext/win32ole/win32ole.c     type = WC2VSTR(bstr);
WC2VSTR          3066 ext/win32ole/win32ole.c         if (SUCCEEDED(hr) && rb_str_cmp(WC2VSTR(bstr), type) == 0) {
WC2VSTR          3190 ext/win32ole/win32ole.c     oletype_set_member(type, pTypeInfo, WC2VSTR(bstr));
WC2VSTR          3360 ext/win32ole/win32ole.c     type = WC2VSTR(bstr);
WC2VSTR          3742 ext/win32ole/win32ole.c         typelib = WC2VSTR(bstr);
WC2VSTR          4362 ext/win32ole/win32ole.c         progid = WC2VSTR(pbuf);
WC2VSTR          4528 ext/win32ole/win32ole.c     return WC2VSTR(bhelpstr);
WC2VSTR          4595 ext/win32ole/win32ole.c     return WC2VSTR(bhelpfile);
WC2VSTR          4756 ext/win32ole/win32ole.c         rb_ivar_set(var, rb_intern("name"), WC2VSTR(bstr));
WC2VSTR          5507 ext/win32ole/win32ole.c             name = WC2VSTR(bstr);
WC2VSTR          5563 ext/win32ole/win32ole.c             return WC2VSTR(name);
WC2VSTR          5601 ext/win32ole/win32ole.c     return WC2VSTR(bhelpstring);
WC2VSTR          5635 ext/win32ole/win32ole.c     return WC2VSTR(bhelpfile);
WC2VSTR          5861 ext/win32ole/win32ole.c             rb_ivar_set(param, rb_intern("name"), WC2VSTR(bstrs[i]));
WC2VSTR          6350 ext/win32ole/win32ole.c     ev = WC2VSTR(bstr);


WEXITSTATUS

WEXITSTATUS        78 process.c      #ifndef WEXITSTATUS
WEXITSTATUS        85 process.c      #define WSTOPSIG        WEXITSTATUS
WEXITSTATUS       302 process.c      	snprintf(buf, sizeof(buf), ",exited(%d)", WEXITSTATUS(status));
WEXITSTATUS       499 process.c      	return INT2NUM(WEXITSTATUS(status));
WEXITSTATUS       519 process.c          return WEXITSTATUS(status) == EXIT_SUCCESS ? Qtrue : Qfalse;


WIFEXITED

WIFEXITED          69 process.c      #ifndef WIFEXITED
WIFEXITED         301 process.c          if (WIFEXITED(status)) {
WIFEXITED         467 process.c          if (WIFEXITED(status))
WIFEXITED         498 process.c          if (WIFEXITED(status))
WIFEXITED         517 process.c          if (!WIFEXITED(status))


WIFSIGNALED

WIFSIGNALED        72 process.c      #ifndef WIFSIGNALED
WIFSIGNALED       290 process.c          if (WIFSIGNALED(status)) {
WIFSIGNALED       426 process.c          if (WIFSIGNALED(status))
WIFSIGNALED       447 process.c          if (WIFSIGNALED(status))


WIFSTOPPED

WIFSTOPPED        162 ext/pty/pty.c  #elif defined(WIFSTOPPED)
WIFSTOPPED        163 ext/pty/pty.c  	if (WIFSTOPPED(status)) { /* suspend */
WIFSTOPPED        167 ext/pty/pty.c  ---->> Either IF_STOPPED or WIFSTOPPED is needed <<----
WIFSTOPPED         75 process.c      #ifndef WIFSTOPPED
WIFSTOPPED        279 process.c          if (WIFSTOPPED(status)) {
WIFSTOPPED        387 process.c          if (WIFSTOPPED(status))
WIFSTOPPED        407 process.c          if (WIFSTOPPED(status))


WIN32_FIND_DATA

WIN32_FIND_DATA  1360 win32/win32.c      WIN32_FIND_DATA fd;
WIN32_FIND_DATA  3251 win32/win32.c      WIN32_FIND_DATA wfd;


WIN95

WIN95             200 win32/win32.c  #ifdef WIN95
WIN95             287 win32/win32.c  #ifdef WIN95
WIN95             321 win32/win32.c  #ifdef WIN95
WIN95              77 win32/win32.h  #ifdef WIN95


WISH_TRUE

WISH_TRUE         737 ext/nkf/nkf-utf8/nkf.c     if(x0201_f == WISH_TRUE)
WISH_TRUE         108 ext/nkf/nkf.c    if(x0201_f == WISH_TRUE)
WISH_TRUE         235 ext/nkf/nkf.c    if(x0201_f == WISH_TRUE)


WNOHANG

WNOHANG           174 defines.h      #ifndef WNOHANG
WNOHANG           558 process.c      	flags |= WNOHANG;
WNOHANG           577 process.c      	if (oflags & WNOHANG) return 0;
WNOHANG           828 process.c      	cpid = rb_waitpid(*pid_p, &status, WNOHANG);
WNOHANG          3574 process.c      #ifdef WNOHANG
WNOHANG          3575 process.c          rb_define_const(rb_mProcess, "WNOHANG", INT2FIX(WNOHANG));
WNOHANG          2794 win32/win32.c  #ifndef WNOHANG
WNOHANG          2829 win32/win32.c      if (options == WNOHANG) {


WORDS_BIGENDIAN

WORDS_BIGENDIAN   198 ext/digest/md5/md5.c #ifdef WORDS_BIGENDIAN
WORDS_BIGENDIAN   357 ext/digest/rmd160/rmd160.c #ifdef WORDS_BIGENDIAN
WORDS_BIGENDIAN   381 ext/digest/rmd160/rmd160.c #ifndef WORDS_BIGENDIAN
WORDS_BIGENDIAN   392 ext/digest/rmd160/rmd160.c #ifndef WORDS_BIGENDIAN
WORDS_BIGENDIAN   416 ext/digest/rmd160/rmd160.c #ifdef WORDS_BIGENDIAN
WORDS_BIGENDIAN   428 ext/digest/rmd160/rmd160.c #ifndef WORDS_BIGENDIAN
WORDS_BIGENDIAN    52 ext/digest/sha1/sha1.c #ifndef WORDS_BIGENDIAN
WORDS_BIGENDIAN    85 ext/digest/sha2/sha2.c #ifndef WORDS_BIGENDIAN
WORDS_BIGENDIAN   299 ext/digest/sha2/sha2.c #ifndef WORDS_BIGENDIAN
WORDS_BIGENDIAN   409 ext/digest/sha2/sha2.c #ifndef WORDS_BIGENDIAN
WORDS_BIGENDIAN   528 ext/digest/sha2/sha2.c #ifndef WORDS_BIGENDIAN
WORDS_BIGENDIAN   562 ext/digest/sha2/sha2.c #ifndef WORDS_BIGENDIAN
WORDS_BIGENDIAN   600 ext/digest/sha2/sha2.c #ifndef WORDS_BIGENDIAN
WORDS_BIGENDIAN   705 ext/digest/sha2/sha2.c #ifndef WORDS_BIGENDIAN
WORDS_BIGENDIAN   818 ext/digest/sha2/sha2.c #ifndef WORDS_BIGENDIAN
WORDS_BIGENDIAN   866 ext/digest/sha2/sha2.c #ifndef WORDS_BIGENDIAN
WORDS_BIGENDIAN   915 ext/digest/sha2/sha2.c #ifndef WORDS_BIGENDIAN
WORDS_BIGENDIAN    28 pack.c         # ifdef WORDS_BIGENDIAN
WORDS_BIGENDIAN   224 pack.c         #ifdef WORDS_BIGENDIAN


WORD_ALIGNMENT_SIZE

WORD_ALIGNMENT_SIZE   51 regcomp.c      static unsigned char PadBuf[WORD_ALIGNMENT_SIZE];
WORD_ALIGNMENT_SIZE  535 regcomp.c        add_length(reg, mbuf->used + (WORD_ALIGNMENT_SIZE - 1));
WORD_ALIGNMENT_SIZE  541 regcomp.c        pad_size = (WORD_ALIGNMENT_SIZE - 1) - pad_size;
WORD_ALIGNMENT_SIZE  570 regcomp.c          len += SIZE_LENGTH + cc->mbuf->used + (WORD_ALIGNMENT_SIZE - 1);
WORD_ALIGNMENT_SIZE  236 regint.h         (pad_size) = WORD_ALIGNMENT_SIZE \
WORD_ALIGNMENT_SIZE  237 regint.h                      - ((unsigned int )(addr) % WORD_ALIGNMENT_SIZE);\
WORD_ALIGNMENT_SIZE  238 regint.h         if ((pad_size) == WORD_ALIGNMENT_SIZE) (pad_size) = 0;\
WORD_ALIGNMENT_SIZE  242 regint.h         (addr) += (WORD_ALIGNMENT_SIZE - 1);\
WORD_ALIGNMENT_SIZE  243 regint.h         (addr) -= ((unsigned int )(addr) % WORD_ALIGNMENT_SIZE);\


WRITABLE

WRITABLE          117 ext/stringio/stringio.c     if (!WRITABLE(ptr)) {
WRITABLE          421 ext/stringio/stringio.c     if (!WRITABLE(ptr)) {
WRITABLE          469 ext/stringio/stringio.c     if (WRITABLE(ptr)) return Qfalse;


WSTOPSIG

WSTOPSIG           84 process.c      #ifndef WSTOPSIG
WSTOPSIG          280 process.c      	int stopsig = WSTOPSIG(status);
WSTOPSIG          408 process.c      	return INT2NUM(WSTOPSIG(status));


WTERMSIG

WTERMSIG           81 process.c      #ifndef WTERMSIG
WTERMSIG          291 process.c      	int termsig = WTERMSIG(status);
WTERMSIG          448 process.c      	return INT2NUM(WTERMSIG(status));


WUNTRACED

WUNTRACED         177 defines.h      #ifndef WUNTRACED
WUNTRACED         155 ext/pty/pty.c  	cpid = rb_waitpid(info->child_pid, &status, WUNTRACED);
WUNTRACED        3579 process.c      #ifdef WUNTRACED
WUNTRACED        3580 process.c          rb_define_const(rb_mProcess, "WUNTRACED", INT2FIX(WUNTRACED));


W_OK

W_OK             1141 file.c             if (eaccess(StringValueCStr(fname), W_OK) < 0) return Qfalse;
W_OK             1158 file.c             if (access(StringValueCStr(fname), W_OK) < 0) return Qfalse;
W_OK             4024 file.c         	    && !access(p0, W_OK)) {


WaitForMultipleEvents

WaitForMultipleEvents 2851 win32/win32.c  	ret = WaitForMultipleEvents(count + 1, events, FALSE, timeout, TRUE);
WaitForMultipleEvents 3374 win32/win32.c      ret = WaitForMultipleEvents(count, events, FALSE, timeout, TRUE);


WaitForMultipleObjectsEx

WaitForMultipleObjectsEx   67 win32/win32.c  # define WaitForMultipleEvents WaitForMultipleObjectsEx
WaitForMultipleObjectsEx  146 wince/wince.h  DWORD WaitForMultipleObjectsEx(DWORD count,


WaitVariableProc

WaitVariableProc 3248 ext/tk/tcltklib.c static char *WaitVariableProc _((ClientData, Tcl_Interp *,
WaitVariableProc 3448 ext/tk/tcltklib.c                            WaitVariableProc, (ClientData) &done);
WaitVariableProc 3469 ext/tk/tcltklib.c                        WaitVariableProc, (ClientData) &done);


WaitVisibilityProc

WaitVisibilityProc 3275 ext/tk/tcltklib.c static void WaitVisibilityProc _((ClientData, XEvent *));
WaitVisibilityProc 3525 ext/tk/tcltklib.c                               WaitVisibilityProc, (ClientData) &done);
WaitVisibilityProc 3592 ext/tk/tcltklib.c                               WaitVisibilityProc, (ClientData) &done);


WaitWindowProc

WaitWindowProc   3291 ext/tk/tcltklib.c static void WaitWindowProc _((ClientData, XEvent *));
WaitWindowProc   3622 ext/tk/tcltklib.c                               WaitWindowProc, (ClientData) &done);


Win32OLEIDispatch

Win32OLEIDispatch  228 ext/win32ole/win32ole.c         Win32OLEIDispatch* p = (Win32OLEIDispatch*)This;
Win32OLEIDispatch  239 ext/win32ole/win32ole.c     Win32OLEIDispatch* p = (Win32OLEIDispatch*)This;
Win32OLEIDispatch  246 ext/win32ole/win32ole.c     Win32OLEIDispatch* p = (Win32OLEIDispatch*)This;
Win32OLEIDispatch  304 ext/win32ole/win32ole.c     Win32OLEIDispatch* p = (Win32OLEIDispatch*)This;
Win32OLEIDispatch  326 ext/win32ole/win32ole.c     Win32OLEIDispatch* pdisp;
Win32OLEIDispatch  330 ext/win32ole/win32ole.c         pdisp = (Win32OLEIDispatch *)(data & ~FIXNUM_FLAG);
Win32OLEIDispatch  334 ext/win32ole/win32ole.c         pdisp = ALLOC(Win32OLEIDispatch);


WrapBN

WrapBN             52 ext/openssl/ossl_bn.c     WrapBN(cBN, obj, newbn);
WrapBN             71 ext/openssl/ossl_bn.c 	WrapBN(cBN, obj, bn); /* Handle potencial mem leaks */
WrapBN             98 ext/openssl/ossl_bn.c     WrapBN(klass, obj, bn);
WrapBN            264 ext/openssl/ossl_bn.c 	WrapBN(CLASS_OF(self), obj, result);		\
WrapBN            283 ext/openssl/ossl_bn.c 	WrapBN(CLASS_OF(self), obj, result);		\
WrapBN            303 ext/openssl/ossl_bn.c 	WrapBN(CLASS_OF(self), obj, result);			\
WrapBN            333 ext/openssl/ossl_bn.c     WrapBN(CLASS_OF(self), obj1, r1);
WrapBN            334 ext/openssl/ossl_bn.c     WrapBN(CLASS_OF(self), obj2, r2);
WrapBN            354 ext/openssl/ossl_bn.c 	WrapBN(CLASS_OF(self), obj, result);			\
WrapBN            407 ext/openssl/ossl_bn.c 	WrapBN(CLASS_OF(self), obj, result);		\
WrapBN            436 ext/openssl/ossl_bn.c 	WrapBN(klass, obj, result);				\
WrapBN            455 ext/openssl/ossl_bn.c 	WrapBN(klass, obj, result);				\
WrapBN            490 ext/openssl/ossl_bn.c     WrapBN(klass, obj, result);


WrapConfig

WrapConfig         98 ext/openssl/ossl_config.c     WrapConfig(klass, obj, conf);
WrapConfig        111 ext/openssl/ossl_config.c     WrapConfig(klass, obj, conf);


WrapEngine

WrapEngine        100 ext/openssl/ossl_engine.c         WrapEngine(klass, obj, e);
WrapEngine        117 ext/openssl/ossl_engine.c     WrapEngine(klass, obj, e);
WrapEngine        137 ext/openssl/ossl_engine.c     WrapEngine(klass, obj, e);


WrapOCSPBasicRes

WrapOCSPBasicRes  363 ext/openssl/ossl_ocsp.c     WrapOCSPBasicRes(cOCSPBasicRes, ret, bs);
WrapOCSPBasicRes  399 ext/openssl/ossl_ocsp.c     WrapOCSPBasicRes(klass, obj, bs);


WrapOCSPCertId

WrapOCSPCertId     82 ext/openssl/ossl_ocsp.c     WrapOCSPCertId(cOCSPCertId, obj, cid);
WrapOCSPCertId    200 ext/openssl/ossl_ocsp.c 	WrapOCSPCertId(cOCSPCertId, tmp, id);
WrapOCSPCertId    621 ext/openssl/ossl_ocsp.c     WrapOCSPCertId(klass, obj, id);


WrapOCSPRes

WrapOCSPRes       291 ext/openssl/ossl_ocsp.c     WrapOCSPRes(klass, obj, res);
WrapOCSPRes       304 ext/openssl/ossl_ocsp.c     WrapOCSPRes(klass, obj, res);


WrapPKCS12

WrapPKCS12         47 ext/openssl/ossl_pkcs12.c     WrapPKCS12(klass, obj, p12);
WrapPKCS12         73 ext/openssl/ossl_pkcs12.c     WrapPKCS12(cPKCS12, obj, p12);


WrapPKCS7

WrapPKCS7         152 ext/openssl/ossl_pkcs7.c     WrapPKCS7(cPKCS7, ret, pkcs7);
WrapPKCS7         220 ext/openssl/ossl_pkcs7.c     WrapPKCS7(cPKCS7, ret, pkcs7);
WrapPKCS7         269 ext/openssl/ossl_pkcs7.c     WrapPKCS7(cPKCS7, ret, p7);
WrapPKCS7         285 ext/openssl/ossl_pkcs7.c     WrapPKCS7(klass, obj, pkcs7);


WrapPKCS7ri

WrapPKCS7ri       118 ext/openssl/ossl_pkcs7.c     WrapPKCS7ri(cPKCS7Recipient, obj, pkcs7);
WrapPKCS7ri       871 ext/openssl/ossl_pkcs7.c     WrapPKCS7ri(klass, obj, p7ri);


WrapPKCS7si

WrapPKCS7si        92 ext/openssl/ossl_pkcs7.c     WrapPKCS7si(cPKCS7Signer, obj, pkcs7);
WrapPKCS7si       792 ext/openssl/ossl_pkcs7.c     WrapPKCS7si(klass, obj, p7si);


WrapPKey

WrapPKey          144 ext/openssl/ossl_pkey.c     WrapPKey(klass, obj, pkey);
WrapPKey           56 ext/openssl/ossl_pkey_dh.c     WrapPKey(klass, obj, pkey);
WrapPKey           72 ext/openssl/ossl_pkey_dh.c 	WrapPKey(cDH, obj, pkey);
WrapPKey           50 ext/openssl/ossl_pkey_dsa.c     WrapPKey(klass, obj, pkey);
WrapPKey           66 ext/openssl/ossl_pkey_dsa.c 	WrapPKey(cDSA, obj, pkey);
WrapPKey           50 ext/openssl/ossl_pkey_rsa.c     WrapPKey(klass, obj, pkey);
WrapPKey           67 ext/openssl/ossl_pkey_rsa.c 	WrapPKey(cRSA, obj, pkey);


WrapX509

WrapX509           53 ext/openssl/ossl_x509cert.c     WrapX509(cX509Cert, obj, new);
WrapX509           84 ext/openssl/ossl_x509cert.c     WrapX509(cX509Cert, obj, x509);
WrapX509          123 ext/openssl/ossl_x509cert.c     WrapX509(klass, obj, x509);


WrapX509Attr

WrapX509Attr       53 ext/openssl/ossl_x509attr.c     WrapX509Attr(cX509Attr, obj, new);
WrapX509Attr       82 ext/openssl/ossl_x509attr.c     WrapX509Attr(klass, obj, attr);


WrapX509CRL

WrapX509CRL        68 ext/openssl/ossl_x509crl.c     WrapX509CRL(cX509CRL, obj, tmp);
WrapX509CRL        85 ext/openssl/ossl_x509crl.c     WrapX509CRL(klass, obj, crl);


WrapX509Ext

WrapX509Ext        66 ext/openssl/ossl_x509ext.c     WrapX509Ext(cX509Ext, obj, new);
WrapX509Ext       250 ext/openssl/ossl_x509ext.c     WrapX509Ext(cX509Ext, obj, ext);
WrapX509Ext       267 ext/openssl/ossl_x509ext.c     WrapX509Ext(klass, obj, ext);


WrapX509Name

WrapX509Name       58 ext/openssl/ossl_x509name.c     WrapX509Name(cX509Name, obj, new);
WrapX509Name       85 ext/openssl/ossl_x509name.c     WrapX509Name(klass, obj, name);


WrapX509Req

WrapX509Req        53 ext/openssl/ossl_x509req.c     WrapX509Req(cX509Req, obj, new);
WrapX509Req        93 ext/openssl/ossl_x509req.c     WrapX509Req(klass, obj, req);


WrapX509Rev

WrapX509Rev        53 ext/openssl/ossl_x509revoked.c     WrapX509Rev(cX509Rev, obj, new);
WrapX509Rev        83 ext/openssl/ossl_x509revoked.c     WrapX509Rev(klass, obj, rev);


WrapX509StCtx

WrapX509StCtx     319 ext/openssl/ossl_x509store.c     WrapX509StCtx(cX509StoreContext, obj, ctx);
WrapX509StCtx     355 ext/openssl/ossl_x509store.c     WrapX509StCtx(klass, obj, ctx);


WrapX509Store

WrapX509Store      63 ext/openssl/ossl_x509store.c     WrapX509Store(cX509Store, obj, store);
WrapX509Store     101 ext/openssl/ossl_x509store.c     WrapX509Store(klass, obj, store);


X0201

X0201            2024 ext/nkf/nkf-utf8/nkf.c 			    c2 = X0201;
X0201            2037 ext/nkf/nkf-utf8/nkf.c 				c2 = X0201;
X0201            2063 ext/nkf/nkf-utf8/nkf.c 			    c2 = X0201;
X0201            2172 ext/nkf/nkf-utf8/nkf.c                             input_mode = X0201; shift_mode = X0201;
X0201            2193 ext/nkf/nkf-utf8/nkf.c                        c2 = X0201;
X0201            2343 ext/nkf/nkf-utf8/nkf.c             (*iconv)(X0201, c2, 0);
X0201            2445 ext/nkf/nkf-utf8/nkf.c     if (c2 == X0201) {
X0201            2462 ext/nkf/nkf-utf8/nkf.c     if (c2 == X0201) {
X0201            2485 ext/nkf/nkf-utf8/nkf.c         c2 = X0201;
X0201            2525 ext/nkf/nkf-utf8/nkf.c     } else if (c2 == X0201) {
X0201            2711 ext/nkf/nkf-utf8/nkf.c     if (c2 == SO) c2 = X0201;
X0201            2730 ext/nkf/nkf-utf8/nkf.c     if (c2 == X0201) {
X0201            2874 ext/nkf/nkf-utf8/nkf.c     } else if (c2 == X0201) {
X0201            2997 ext/nkf/nkf-utf8/nkf.c     } else if (c2 == X0201) {
X0201            3070 ext/nkf/nkf-utf8/nkf.c     } else if (c2==X0201) {
X0201            3071 ext/nkf/nkf-utf8/nkf.c         if (output_mode!=X0201) {
X0201            3072 ext/nkf/nkf-utf8/nkf.c             output_mode = X0201;
X0201            3132 ext/nkf/nkf-utf8/nkf.c             && (input_mode==ASCII || input_mode==X0201)) {
X0201            3144 ext/nkf/nkf-utf8/nkf.c             && (input_mode==X0208 || input_mode==X0201)) { /* ) */
X0201            3297 ext/nkf/nkf-utf8/nkf.c         if (c2 || c2==X0201)
X0201            3306 ext/nkf/nkf-utf8/nkf.c             } else if (c2==X0201) {
X0201            3403 ext/nkf/nkf-utf8/nkf.c     if (x0201_f && z_prev2==X0201) {  /* X0201 */
X0201            3423 ext/nkf/nkf-utf8/nkf.c     if (x0201_f && c2==X0201) {
X0201            3491 ext/nkf/nkf-utf8/nkf.c     if (c2==0 || c2==X0201 || c2==ISO8859_1) {
X0201            3590 ext/nkf/nkf-utf8/nkf.c     JAPANESE_EUC, SHIFT_JIS,ISO8859_1, ISO8859_1, X0208, X0201,


X0208

X0208            2070 ext/nkf/nkf-utf8/nkf.c                 } else if (input_mode == X0208) {
X0208            2118 ext/nkf/nkf-utf8/nkf.c                         input_mode = X0208;
X0208            2135 ext/nkf/nkf-utf8/nkf.c                             input_mode = X0208;
X0208            2154 ext/nkf/nkf-utf8/nkf.c                         input_mode = X0208;
X0208            2239 ext/nkf/nkf-utf8/nkf.c         if (input_mode == X0208)
X0208            3093 ext/nkf/nkf-utf8/nkf.c         if (output_mode != X0208) {
X0208            3094 ext/nkf/nkf-utf8/nkf.c             output_mode = X0208;
X0208            3144 ext/nkf/nkf-utf8/nkf.c             && (input_mode==X0208 || input_mode==X0201)) { /* ) */
X0208            3590 ext/nkf/nkf-utf8/nkf.c     JAPANESE_EUC, SHIFT_JIS,ISO8859_1, ISO8859_1, X0208, X0201,


X0212

X0212            2140 ext/nkf/nkf-utf8/nkf.c                             input_mode = X0212;
X0212            2242 ext/nkf/nkf-utf8/nkf.c         else if (input_mode == X0212)
X0212            3060 ext/nkf/nkf-utf8/nkf.c         if (output_mode!=X0212) {
X0212            3061 ext/nkf/nkf-utf8/nkf.c             output_mode = X0212;


X0212_ENABLE

X0212_ENABLE      476 ext/nkf/nkf-utf8/nkf.c #ifdef X0212_ENABLE
X0212_ENABLE      953 ext/nkf/nkf-utf8/nkf.c #ifdef X0212_ENABLE
X0212_ENABLE     1089 ext/nkf/nkf-utf8/nkf.c #ifdef X0212_ENABLE
X0212_ENABLE     1573 ext/nkf/nkf-utf8/nkf.c #ifdef X0212_ENABLE
X0212_ENABLE     1603 ext/nkf/nkf-utf8/nkf.c #ifndef X0212_ENABLE
X0212_ENABLE     1628 ext/nkf/nkf-utf8/nkf.c #ifdef X0212_ENABLE
X0212_ENABLE     1646 ext/nkf/nkf-utf8/nkf.c #ifdef X0212_ENABLE
X0212_ENABLE     2138 ext/nkf/nkf-utf8/nkf.c #ifdef X0212_ENABLE
X0212_ENABLE     2241 ext/nkf/nkf-utf8/nkf.c #ifdef X0212_ENABLE
X0212_ENABLE     2391 ext/nkf/nkf-utf8/nkf.c #if defined(SHIFTJIS_CP932) || defined(X0212_ENABLE)
X0212_ENABLE     2404 ext/nkf/nkf-utf8/nkf.c #ifdef X0212_ENABLE
X0212_ENABLE     2430 ext/nkf/nkf-utf8/nkf.c #ifdef X0212_ENABLE
X0212_ENABLE     2464 ext/nkf/nkf-utf8/nkf.c #ifdef X0212_ENABLE
X0212_ENABLE     2732 ext/nkf/nkf-utf8/nkf.c #ifdef X0212_ENABLE
X0212_ENABLE     2880 ext/nkf/nkf-utf8/nkf.c #ifdef X0212_ENABLE
X0212_ENABLE     2914 ext/nkf/nkf-utf8/nkf.c #ifdef X0212_ENABLE
X0212_ENABLE     2950 ext/nkf/nkf-utf8/nkf.c #ifdef X0212_ENABLE
X0212_ENABLE     3003 ext/nkf/nkf-utf8/nkf.c #ifdef X0212_ENABLE
X0212_ENABLE     3058 ext/nkf/nkf-utf8/nkf.c #ifdef X0212_ENABLE
X0212_ENABLE     1299 ext/nkf/nkf-utf8/utf8tbl.c #ifdef X0212_ENABLE
X0212_ENABLE     2322 ext/nkf/nkf-utf8/utf8tbl.c #ifdef X0212_ENABLE
X0212_ENABLE     7364 ext/nkf/nkf-utf8/utf8tbl.c #ifdef X0212_ENABLE


X509_CRL_add0_revoked

X509_CRL_add0_revoked  115 ext/openssl/openssl_missing.h int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
X509_CRL_add0_revoked  298 ext/openssl/ossl_x509crl.c 	if (!X509_CRL_add0_revoked(crl, rev)) { /* NO DUP - don't free! */
X509_CRL_add0_revoked  315 ext/openssl/ossl_x509crl.c     if (!X509_CRL_add0_revoked(crl, rev)) { /* NO DUP - don't free! */


X509_CRL_set_issuer_name

X509_CRL_set_issuer_name  113 ext/openssl/openssl_missing.h int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name);
X509_CRL_set_issuer_name  199 ext/openssl/ossl_x509crl.c     if (!X509_CRL_set_issuer_name(crl, GetX509NamePtr(issuer))) { /* DUPs name */


X509_CRL_set_version

X509_CRL_set_version  112 ext/openssl/openssl_missing.h int X509_CRL_set_version(X509_CRL *x, long version);
X509_CRL_set_version  153 ext/openssl/ossl_x509crl.c     if (!X509_CRL_set_version(crl, ver)) {


X509_CRL_sort

X509_CRL_sort     114 ext/openssl/openssl_missing.h int X509_CRL_sort(X509_CRL *c);
X509_CRL_sort     302 ext/openssl/ossl_x509crl.c     X509_CRL_sort(crl);
X509_CRL_sort     318 ext/openssl/ossl_x509crl.c     X509_CRL_sort(crl);


X509_NAME

X509_NAME         149 ext/openssl/openssl_missing.c X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name)
X509_NAME         113 ext/openssl/openssl_missing.h int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name);
X509_NAME          72 ext/openssl/ossl_x509.h VALUE ossl_x509name_new(X509_NAME *);
X509_NAME          73 ext/openssl/ossl_x509.h X509_NAME *GetX509NamePtr(VALUE);
X509_NAME         329 ext/openssl/ossl_x509cert.c     X509_NAME *name;
X509_NAME         356 ext/openssl/ossl_x509cert.c     X509_NAME *name;
X509_NAME          20 ext/openssl/ossl_x509name.c     Data_Get_Struct(obj, X509_NAME, name); \
X509_NAME          45 ext/openssl/ossl_x509name.c ossl_x509name_new(X509_NAME *name)
X509_NAME          47 ext/openssl/ossl_x509name.c     X509_NAME *new;
X509_NAME          63 ext/openssl/ossl_x509name.c X509_NAME *
X509_NAME          66 ext/openssl/ossl_x509name.c     X509_NAME *name;
X509_NAME          79 ext/openssl/ossl_x509name.c     X509_NAME *name;
X509_NAME         115 ext/openssl/ossl_x509name.c     X509_NAME *name;
X509_NAME         135 ext/openssl/ossl_x509name.c 	    if(!d2i_X509_NAME((X509_NAME**)&DATA_PTR(self), &p, RSTRING(str)->len)){
X509_NAME         147 ext/openssl/ossl_x509name.c     X509_NAME *name;
X509_NAME         166 ext/openssl/ossl_x509name.c     X509_NAME *name;
X509_NAME         181 ext/openssl/ossl_x509name.c     X509_NAME *name;
X509_NAME         205 ext/openssl/ossl_x509name.c     X509_NAME *name;
X509_NAME         238 ext/openssl/ossl_x509name.c     X509_NAME *name1, *name2;
X509_NAME         272 ext/openssl/ossl_x509name.c     X509_NAME *name;
X509_NAME         285 ext/openssl/ossl_x509name.c     X509_NAME *name;
X509_NAME         258 ext/openssl/ossl_x509req.c     X509_NAME *name;


X509_REVOKED_dup

X509_REVOKED_dup   44 ext/openssl/openssl_missing.h #if !defined(X509_REVOKED_dup)
X509_REVOKED_dup   48 ext/openssl/ossl_x509revoked.c 	new = X509_REVOKED_dup(rev);
X509_REVOKED_dup   64 ext/openssl/ossl_x509revoked.c     if (!(new = X509_REVOKED_dup(rev))) {


X509_STORE_get_ex_data

X509_STORE_get_ex_data  110 ext/openssl/openssl_missing.h void *X509_STORE_get_ex_data(X509_STORE *str, int idx);
X509_STORE_get_ex_data  209 ext/openssl/ossl.c 	proc = (VALUE)X509_STORE_get_ex_data(ctx->ctx, ossl_verify_cb_idx);


X509_STORE_set_ex_data

X509_STORE_set_ex_data  111 ext/openssl/openssl_missing.h int X509_STORE_set_ex_data(X509_STORE *str, int idx, void *data);
X509_STORE_set_ex_data  115 ext/openssl/ossl_x509store.c     X509_STORE_set_ex_data(store, ossl_verify_cb_idx, (void*)cb);


XDIGITVAL

XDIGITVAL        1518 regparse.c           val = (unsigned int )XDIGITVAL(enc,c);
XDIGITVAL        1522 regparse.c           num = (num << 4) + XDIGITVAL(enc,c);


XFD_ISSET

XFD_ISSET          87 x68/select.c   		if (XFD_ISSET (fd, rfds) && isreadable (accmode) && _dos_k_keysns ())
XFD_ISSET          93 x68/select.c   		if (XFD_ISSET (fd, wfds) && iswritable (accmode))
XFD_ISSET         102 x68/select.c   		if (XFD_ISSET (fd, rfds) && _socklen (_fddb[fd].sockno, 0))
XFD_ISSET         108 x68/select.c   		if (XFD_ISSET (fd, wfds) /* && _socklen (_fddb[fd].sockno, 1) == 0 */)
XFD_ISSET         117 x68/select.c   		if (XFD_ISSET (fd, rfds) && isreadable (accmode) && _dos_ioctrlis (fd))
XFD_ISSET         123 x68/select.c   		if (XFD_ISSET (fd, wfds) && iswritable (accmode) && _dos_ioctrlos (fd))


X_OK

X_OK              180 defines.h      #ifndef X_OK
X_OK             1765 dln.c          	    if (!S_ISDIR(st.st_mode) && eaccess(fbuf, X_OK) == 0)
X_OK             1773 dln.c          		if (!S_ISDIR(st.st_mode) && eaccess(mac_fullpath, X_OK) == 0)
X_OK              834 file.c         	if (!(mode & X_OK))
X_OK             1203 file.c             if (eaccess(StringValueCStr(fname), X_OK) < 0) return Qfalse;
X_OK             1220 file.c             if (access(StringValueCStr(fname), X_OK) < 0) return Qfalse;


YAMLBYTE_ANCHOR

YAMLBYTE_ANCHOR    92 ext/syck/yaml2byte.c         assert(ext->buffer[0] ==YAMLBYTE_ANCHOR);
YAMLBYTE_ANCHOR   134 ext/syck/yaml2byte.c     if(n->anchor) bytestring_append(val,YAMLBYTE_ANCHOR, n->anchor, NULL);


YAMLBYTE_END_BRANCH

YAMLBYTE_END_BRANCH  194 ext/syck/yaml2byte.c             bytestring_append(val,YAMLBYTE_END_BRANCH,NULL,NULL);
YAMLBYTE_END_BRANCH  207 ext/syck/yaml2byte.c             bytestring_append(val,YAMLBYTE_END_BRANCH,NULL,NULL);


YAMLBYTE_OK

YAMLBYTE_OK       155 ext/syck/yamlbyte.h         yamlbyte_result_t _result = YAMLBYTE_OK;                         \
YAMLBYTE_OK       161 ext/syck/yamlbyte.h             if(YAMLBYTE_OK != result || NULL == buff)                \
YAMLBYTE_OK       164 ext/syck/yamlbyte.h             if(YAMLBYTE_OK != result)                                \


YAMLBYTE_TRANSFER

YAMLBYTE_TRANSFER  139 ext/syck/yaml2byte.c             bytestring_append(val,YAMLBYTE_TRANSFER, n->type_id, NULL);
YAMLBYTE_TRANSFER  147 ext/syck/yaml2byte.c             bytestring_append( val, YAMLBYTE_TRANSFER, type_tag, NULL);


YAML_ALIAS

YAML_ALIAS        316 ext/syck/bytecode.c             return YAML_ALIAS;
YAML_ALIAS         66 ext/syck/gram.c      YAML_ALIAS = 259,
YAML_ALIAS         33 ext/syck/gram.h      YAML_ALIAS = 259,
YAML_ALIAS        954 ext/syck/token.c                         return YAML_ALIAS;


YAML_ANCHOR

YAML_ANCHOR       305 ext/syck/bytecode.c             return YAML_ANCHOR;
YAML_ANCHOR        65 ext/syck/gram.c      YAML_ANCHOR = 258,
YAML_ANCHOR        32 ext/syck/gram.h      YAML_ANCHOR = 258,
YAML_ANCHOR      1034 ext/syck/token.c                         return YAML_ANCHOR;


YAML_BLOCK

YAML_BLOCK         72 ext/syck/gram.c      YAML_BLOCK = 265,
YAML_BLOCK         39 ext/syck/gram.h      YAML_BLOCK = 265,
YAML_BLOCK        187 ext/syck/token.c         return YAML_BLOCK; \


YAML_DOCSEP

YAML_DOCSEP       644 ext/syck/bytecode.c                return YAML_DOCSEP;
YAML_DOCSEP        73 ext/syck/gram.c      YAML_DOCSEP = 266,
YAML_DOCSEP        40 ext/syck/gram.h      YAML_DOCSEP = 266,
YAML_DOCSEP       271 ext/syck/token.c     return YAML_DOCSEP;
YAML_DOCSEP      1219 ext/syck/token.c                         return YAML_DOCSEP;


YAML_DOMAIN

YAML_DOMAIN       457 ext/syck/emitter.c         if ( strncmp( tag + 4, YAML_DOMAIN, strlen( YAML_DOMAIN ) ) == 0 ) {
YAML_DOMAIN       458 ext/syck/emitter.c             int skip = 4 + strlen( YAML_DOMAIN ) + 1;
YAML_DOMAIN       464 ext/syck/emitter.c                 if ( subd - tag > ( strlen( YAML_DOMAIN ) + 5 ) &&
YAML_DOMAIN       465 ext/syck/emitter.c                      strncmp( subd - strlen( YAML_DOMAIN ), YAML_DOMAIN, strlen( YAML_DOMAIN ) ) == 0 ) {
YAML_DOMAIN       466 ext/syck/emitter.c                     syck_emitter_write( e, tag + 4, subd - strlen( YAML_DOMAIN ) - ( tag + 4 ) - 1 );
YAML_DOMAIN       666 ext/syck/emitter.c     implicit = syck_taguri( YAML_DOMAIN, implicit, strlen( implicit ) );
YAML_DOMAIN       110 ext/syck/gram.c             node->type_id = syck_taguri( YAML_DOMAIN, "null", 4 ); \
YAML_DOMAIN      1357 ext/syck/gram.c                    n->type_id = syck_taguri( YAML_DOMAIN, "str", 3 );
YAML_DOMAIN        42 ext/syck/implicit.c         n->type_id = syck_taguri( YAML_DOMAIN, tid, strlen( tid ) );
YAML_DOMAIN      1767 ext/syck/implicit.c {   return syck_taguri( YAML_DOMAIN, type_id, strlen( type_id ) ); }
YAML_DOMAIN      2143 ext/syck/implicit.c                     strcat( domain, YAML_DOMAIN );
YAML_DOMAIN       162 ext/syck/token.c             n->type_id = syck_taguri( YAML_DOMAIN, "str", 3 ); \
YAML_DOMAIN      1836 ext/syck/token.c                             n->type_id = syck_taguri( YAML_DOMAIN, "str", 3 );
YAML_DOMAIN      2004 ext/syck/token.c                             n->type_id = syck_taguri( YAML_DOMAIN, "str", 3 );


YAML_IEND

YAML_IEND         113 ext/syck/bytecode.c             return YAML_IEND; \
YAML_IEND         457 ext/syck/bytecode.c             return YAML_IEND;
YAML_IEND          76 ext/syck/gram.c      YAML_IEND = 269
YAML_IEND          43 ext/syck/gram.h      YAML_IEND = 269
YAML_IEND          85 ext/syck/token.c             return YAML_IEND; \


YAML_INDENT

YAML_INDENT       396 ext/syck/bytecode.c                 return YAML_INDENT;
YAML_INDENT       401 ext/syck/bytecode.c                 else                        return YAML_INDENT;
YAML_INDENT       443 ext/syck/bytecode.c                 FORCE_NEXT_TOKEN(YAML_INDENT);
YAML_INDENT       453 ext/syck/bytecode.c                     FORCE_NEXT_TOKEN(YAML_INDENT);
YAML_INDENT        75 ext/syck/gram.c      YAML_INDENT = 268,
YAML_INDENT        42 ext/syck/gram.h      YAML_INDENT = 268,
YAML_INDENT       576 ext/syck/token.c                         return YAML_INDENT;


YAML_IOPEN

YAML_IOPEN        100 ext/syck/bytecode.c                 return YAML_IOPEN; \
YAML_IOPEN        478 ext/syck/bytecode.c                 FORCE_NEXT_TOKEN( YAML_IOPEN );
YAML_IOPEN        481 ext/syck/bytecode.c             return YAML_IOPEN;
YAML_IOPEN        502 ext/syck/bytecode.c                 FORCE_NEXT_TOKEN( YAML_IOPEN );
YAML_IOPEN        505 ext/syck/bytecode.c             return YAML_IOPEN;
YAML_IOPEN         74 ext/syck/gram.c      YAML_IOPEN = 267,
YAML_IOPEN         41 ext/syck/gram.h      YAML_IOPEN = 267,
YAML_IOPEN         72 ext/syck/token.c                 return YAML_IOPEN; \
YAML_IOPEN       1042 ext/syck/token.c                         FORCE_NEXT_TOKEN(YAML_IOPEN);


YAML_ITRANSFER

YAML_ITRANSFER    333 ext/syck/bytecode.c                     return YAML_ITRANSFER;
YAML_ITRANSFER     69 ext/syck/gram.c      YAML_ITRANSFER = 262,
YAML_ITRANSFER     36 ext/syck/gram.h      YAML_ITRANSFER = 262,
YAML_ITRANSFER   2178 ext/syck/token.c                             return YAML_ITRANSFER;


YAML_PLAIN

YAML_PLAIN       1093 ext/syck/bytecode.c             return YAML_PLAIN;
YAML_PLAIN         71 ext/syck/gram.c      YAML_PLAIN = 264,
YAML_PLAIN         38 ext/syck/gram.h      YAML_PLAIN = 264,
YAML_PLAIN        131 ext/syck/token.c         return YAML_PLAIN; \
YAML_PLAIN       1846 ext/syck/token.c                         return YAML_PLAIN;
YAML_PLAIN       2014 ext/syck/token.c                         return YAML_PLAIN;


YAML_TAGURI

YAML_TAGURI       380 ext/syck/bytecode.c             return YAML_TAGURI;
YAML_TAGURI        68 ext/syck/gram.c      YAML_TAGURI = 261,
YAML_TAGURI        35 ext/syck/gram.h      YAML_TAGURI = 261,


YAML_TRANSFER

YAML_TRANSFER     377 ext/syck/bytecode.c                 return YAML_TRANSFER;
YAML_TRANSFER      67 ext/syck/gram.c      YAML_TRANSFER = 260,
YAML_TRANSFER      34 ext/syck/gram.h      YAML_TRANSFER = 260,
YAML_TRANSFER    2220 ext/syck/token.c                         return YAML_TRANSFER;


YAML_WORD

YAML_WORD          70 ext/syck/gram.c      YAML_WORD = 263,
YAML_WORD          37 ext/syck/gram.h      YAML_WORD = 263,


YES

YES              1115 dir.c          enum answer { YES, NO, UNKNOWN };
YES              1191 dir.c          		exist = YES;
YES              1192 dir.c          		isdir = S_ISDIR(st.st_mode) ? YES : S_ISLNK(st.st_mode) ? UNKNOWN : NO;
YES              1201 dir.c          		exist = YES;
YES              1202 dir.c          		isdir = S_ISDIR(st.st_mode) ? YES : NO;
YES              1209 dir.c          	if (match_all && exist == YES) {
YES              1213 dir.c          	if (match_dir && isdir == YES) {
YES              1236 dir.c          		    new_isdir = S_ISDIR(st.st_mode) ? YES : S_ISLNK(st.st_mode) ? UNKNOWN : NO;
YES              1240 dir.c          		new_isdir = dp->d_isdir ? (!dp->d_isrep ? YES : UNKNOWN) : NO;
YES              1249 dir.c          		    if (new_isdir == YES) /* not symlink but real directory */
YES              1259 dir.c          	    status = glob_helper(buf, 1, YES, new_isdir, new_beg, new_end, flags, func, arg);
YES               234 ext/socket/getaddrinfo.c 	return YES;
YES               293 ext/socket/getaddrinfo.c 				translate = YES;


YIELD_FUNC_AVALUE

YIELD_FUNC_AVALUE 4792 eval.c         	    if (node->nd_state == YIELD_FUNC_AVALUE) {
YIELD_FUNC_AVALUE 9216 eval.c             data->body->nd_state = YIELD_FUNC_AVALUE;


YIELD_FUNC_SVALUE

YIELD_FUNC_SVALUE 4801 eval.c         		if (val == Qundef && node->nd_state != YIELD_FUNC_SVALUE)
YIELD_FUNC_SVALUE 9242 eval.c             bdata->body->nd_state = YIELD_FUNC_SVALUE;


YIELD_LAMBDA_CALL

YIELD_LAMBDA_CALL 4660 eval.c             int lambda = flags & YIELD_LAMBDA_CALL;
YIELD_LAMBDA_CALL 8213 eval.c             pcall = (data->flags & BLOCK_LAMBDA) ? YIELD_LAMBDA_CALL : 0;
YIELD_LAMBDA_CALL 8245 eval.c             PUSH_TAG((pcall&YIELD_LAMBDA_CALL) ? PROT_LAMBDA : PROT_NONE);
YIELD_LAMBDA_CALL 11893 eval.c             return rb_yield_0(arg, 0, 0, YIELD_LAMBDA_CALL, Qtrue);


YIELD_PROC_CALL

YIELD_PROC_CALL  4765 eval.c         		if (flags & YIELD_PROC_CALL)
YIELD_PROC_CALL  8250 eval.c         			    pcall | YIELD_PROC_CALL, avalue);


YIELD_PUBLIC_DEF

YIELD_PUBLIC_DEF 4678 eval.c             scope_vmode = (flags & YIELD_PUBLIC_DEF) ? SCOPE_PUBLIC : block->vmode;
YIELD_PUBLIC_DEF 6357 eval.c             return rb_yield_0(args[0], args[1], ruby_class, YIELD_PUBLIC_DEF, avalue);


YYABORT

YYABORT          1087 ext/syck/gram.c 	YYABORT;
YYABORT          1762 ext/syck/gram.c 		   YYABORT;
YYABORT          1821 ext/syck/gram.c 	YYABORT;


YYACCEPT

YYACCEPT         1144 ext/syck/gram.c     YYACCEPT;
YYACCEPT         1831 ext/syck/gram.c     YYACCEPT;


YYCOPY

YYCOPY            214 ext/syck/gram.c # ifndef YYCOPY
YYCOPY            239 ext/syck/gram.c 	YYCOPY (&yyptr->Stack, Stack, yysize);				\


YYCTYPE

YYCTYPE           167 ext/syck/bytecode.c 	YYCTYPE yych;
YYCTYPE           237 ext/syck/bytecode.c 	YYCTYPE yych;
YYCTYPE           545 ext/syck/bytecode.c 	YYCTYPE yych;
YYCTYPE           918 ext/syck/bytecode.c 	YYCTYPE yych;
YYCTYPE           972 ext/syck/bytecode.c 	YYCTYPE yych;
YYCTYPE          1116 ext/syck/bytecode.c 	YYCTYPE yych;
YYCTYPE            57 ext/syck/implicit.c 	YYCTYPE yych;
YYCTYPE          1622 ext/syck/implicit.c 	YYCTYPE yych;
YYCTYPE           309 ext/syck/token.c 	YYCTYPE yych;
YYCTYPE           520 ext/syck/token.c 	YYCTYPE yych;
YYCTYPE          1119 ext/syck/token.c 	YYCTYPE yych;
YYCTYPE          1511 ext/syck/token.c 	YYCTYPE yych;
YYCTYPE          1749 ext/syck/token.c 	YYCTYPE yych;
YYCTYPE          1903 ext/syck/token.c 	YYCTYPE yych;
YYCTYPE          2154 ext/syck/token.c 	YYCTYPE yych;
YYCTYPE          2380 ext/syck/token.c 	YYCTYPE yych;
YYCTYPE          2609 ext/syck/token.c 	YYCTYPE yych;


YYCURSOR

YYCURSOR           39 ext/syck/bytecode.c #define YYPOS(n)    YYCURSOR = YYTOKEN + n
YYCURSOR          139 ext/syck/bytecode.c     if ( YYCURSOR == NULL )
YYCURSOR          162 ext/syck/bytecode.c     YYTOKEN = YYCURSOR;
YYCURSOR          170 ext/syck/bytecode.c 	++YYCURSOR;
YYCURSOR          172 ext/syck/bytecode.c 	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
YYCURSOR          173 ext/syck/bytecode.c 	yych = *YYCURSOR;
YYCURSOR          179 ext/syck/bytecode.c yy2:	YYCURSOR = YYMARKER;
YYCURSOR          184 ext/syck/bytecode.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR          196 ext/syck/bytecode.c yy5:	yych = *++YYCURSOR;
YYCURSOR          198 ext/syck/bytecode.c yy6:	++YYCURSOR;
YYCURSOR          204 ext/syck/bytecode.c                 CHK_NL(YYCURSOR);
YYCURSOR          215 ext/syck/bytecode.c yy8:	++YYCURSOR;
YYCURSOR          216 ext/syck/bytecode.c 	switch((yych = *YYCURSOR)) {
YYCURSOR          232 ext/syck/bytecode.c         YYTOKEN = YYCURSOR;
YYCURSOR          239 ext/syck/bytecode.c 	++YYCURSOR;
YYCURSOR          241 ext/syck/bytecode.c 	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
YYCURSOR          242 ext/syck/bytecode.c 	yych = *YYCURSOR;
YYCURSOR          259 ext/syck/bytecode.c yy11:yy12:	yych = *++YYCURSOR;
YYCURSOR          265 ext/syck/bytecode.c yy13:	yych = *++YYCURSOR;
YYCURSOR          271 ext/syck/bytecode.c yy14:	yych = *++YYCURSOR;
YYCURSOR          277 ext/syck/bytecode.c yy15:	yych = *++YYCURSOR;
YYCURSOR          283 ext/syck/bytecode.c yy16:	yych = *++YYCURSOR;
YYCURSOR          289 ext/syck/bytecode.c yy17:	++YYCURSOR;
YYCURSOR          297 ext/syck/bytecode.c yy19:	++YYCURSOR;
YYCURSOR          304 ext/syck/bytecode.c             CHK_NL(YYCURSOR);
YYCURSOR          308 ext/syck/bytecode.c yy21:	++YYCURSOR;
YYCURSOR          315 ext/syck/bytecode.c             if ( *( YYCURSOR - 1 ) == '\n' ) YYCURSOR--;
YYCURSOR          319 ext/syck/bytecode.c yy23:	++YYCURSOR;
YYCURSOR          326 ext/syck/bytecode.c             CHK_NL(YYCURSOR);
YYCURSOR          383 ext/syck/bytecode.c yy25:	++YYCURSOR;
YYCURSOR          389 ext/syck/bytecode.c yy27:	++YYCURSOR;
YYCURSOR          393 ext/syck/bytecode.c {   CHK_NL(YYCURSOR);
YYCURSOR          406 ext/syck/bytecode.c yy29:	yych = *++YYCURSOR;
YYCURSOR          411 ext/syck/bytecode.c yy30:	++YYCURSOR;
YYCURSOR          420 ext/syck/bytecode.c yy32:	++YYCURSOR;
YYCURSOR          456 ext/syck/bytecode.c             CHK_NL(YYCURSOR);
YYCURSOR          460 ext/syck/bytecode.c yy34:	yych = *++YYCURSOR;
YYCURSOR          465 ext/syck/bytecode.c yy35:	++YYCURSOR;
YYCURSOR          475 ext/syck/bytecode.c             CHK_NL(YYCURSOR);
YYCURSOR          484 ext/syck/bytecode.c yy37:	yych = *++YYCURSOR;
YYCURSOR          489 ext/syck/bytecode.c yy38:	++YYCURSOR;
YYCURSOR          499 ext/syck/bytecode.c             CHK_NL(YYCURSOR);
YYCURSOR          508 ext/syck/bytecode.c yy40:	yych = *++YYCURSOR;
YYCURSOR          513 ext/syck/bytecode.c yy41:	++YYCURSOR;
YYCURSOR          522 ext/syck/bytecode.c yy43:	yych = *++YYCURSOR;
YYCURSOR          527 ext/syck/bytecode.c yy44:	++YYCURSOR;
YYCURSOR          528 ext/syck/bytecode.c 	switch((yych = *YYCURSOR)) {
YYCURSOR          540 ext/syck/bytecode.c         YYTOKEN = YYCURSOR;
YYCURSOR          548 ext/syck/bytecode.c 	++YYCURSOR;
YYCURSOR          550 ext/syck/bytecode.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYCURSOR          551 ext/syck/bytecode.c 	yych = *YYCURSOR;
YYCURSOR          557 ext/syck/bytecode.c yy47:	YYCURSOR = YYMARKER;
YYCURSOR          562 ext/syck/bytecode.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR          643 ext/syck/bytecode.c {   YYCURSOR = YYTOKEN;
YYCURSOR          647 ext/syck/bytecode.c yy50:	yych = *++YYCURSOR;
YYCURSOR          649 ext/syck/bytecode.c yy51:	++YYCURSOR;
YYCURSOR          650 ext/syck/bytecode.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYCURSOR          651 ext/syck/bytecode.c 	yych = *YYCURSOR;
YYCURSOR          730 ext/syck/bytecode.c yy53:	yych = *++YYCURSOR;
YYCURSOR          809 ext/syck/bytecode.c yy54:	++YYCURSOR;
YYCURSOR          810 ext/syck/bytecode.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYCURSOR          811 ext/syck/bytecode.c 	yych = *YYCURSOR;
YYCURSOR          893 ext/syck/bytecode.c yy56:	++YYCURSOR;
YYCURSOR          897 ext/syck/bytecode.c {   CHK_NL(YYCURSOR);
YYCURSOR          900 ext/syck/bytecode.c yy58:	++YYCURSOR;
YYCURSOR          901 ext/syck/bytecode.c 	switch((yych = *YYCURSOR)) {
YYCURSOR          913 ext/syck/bytecode.c         YYTOKEN = YYCURSOR;
YYCURSOR          920 ext/syck/bytecode.c 	++YYCURSOR;
YYCURSOR          922 ext/syck/bytecode.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYCURSOR          923 ext/syck/bytecode.c 	yych = *YYCURSOR;
YYCURSOR          930 ext/syck/bytecode.c yy61:yy62:	++YYCURSOR;
YYCURSOR          934 ext/syck/bytecode.c {   CHK_NL(YYCURSOR);
YYCURSOR          937 ext/syck/bytecode.c yy64:	++YYCURSOR;
YYCURSOR          938 ext/syck/bytecode.c 	switch((yych = *YYCURSOR)) {
YYCURSOR          946 ext/syck/bytecode.c yy66:	yych = *++YYCURSOR;
YYCURSOR          948 ext/syck/bytecode.c yy67:	++YYCURSOR;
YYCURSOR          949 ext/syck/bytecode.c 	yych = *YYCURSOR;
YYCURSOR          967 ext/syck/bytecode.c     tok = YYCURSOR;
YYCURSOR          974 ext/syck/bytecode.c 	++YYCURSOR;
YYCURSOR          976 ext/syck/bytecode.c 	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
YYCURSOR          977 ext/syck/bytecode.c 	yych = *YYCURSOR;
YYCURSOR          984 ext/syck/bytecode.c yy70:	++YYCURSOR;
YYCURSOR          985 ext/syck/bytecode.c 	switch((yych = *YYCURSOR)) {
YYCURSOR          993 ext/syck/bytecode.c {   YYCURSOR = tok;
YYCURSOR          997 ext/syck/bytecode.c yy72:	++YYCURSOR;
YYCURSOR          998 ext/syck/bytecode.c 	switch((yych = *YYCURSOR)) {
YYCURSOR         1008 ext/syck/bytecode.c yy74:	++YYCURSOR;
YYCURSOR         1012 ext/syck/bytecode.c {   YYCURSOR = tok;
YYCURSOR         1016 ext/syck/bytecode.c yy76:	yych = *++YYCURSOR;
YYCURSOR         1018 ext/syck/bytecode.c yy77:	yych = *++YYCURSOR;
YYCURSOR         1025 ext/syck/bytecode.c yy78:	++YYCURSOR;
YYCURSOR         1032 ext/syck/bytecode.c yy80:	++YYCURSOR;
YYCURSOR         1033 ext/syck/bytecode.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         1034 ext/syck/bytecode.c 	yych = *YYCURSOR;
YYCURSOR         1052 ext/syck/bytecode.c             if ( tok + 2 < YYCURSOR )
YYCURSOR         1069 ext/syck/bytecode.c yy83:	++YYCURSOR;
YYCURSOR         1111 ext/syck/bytecode.c         tok = YYCURSOR;
YYCURSOR         1118 ext/syck/bytecode.c 	++YYCURSOR;
YYCURSOR         1120 ext/syck/bytecode.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYCURSOR         1121 ext/syck/bytecode.c 	yych = *YYCURSOR;
YYCURSOR         1128 ext/syck/bytecode.c yy87:	++YYCURSOR;
YYCURSOR         1132 ext/syck/bytecode.c {   CHK_NL(YYCURSOR);
YYCURSOR         1135 ext/syck/bytecode.c yy89:	++YYCURSOR;
YYCURSOR         1136 ext/syck/bytecode.c 	switch((yych = *YYCURSOR)) {
YYCURSOR         1146 ext/syck/bytecode.c yy91:	++YYCURSOR;
YYCURSOR         1150 ext/syck/bytecode.c {   YYCURSOR = tok;
YYCURSOR         1154 ext/syck/bytecode.c yy93:	yych = *++YYCURSOR;
YYCURSOR         1156 ext/syck/bytecode.c yy94:	++YYCURSOR;
YYCURSOR         1157 ext/syck/bytecode.c 	yych = *YYCURSOR;
YYCURSOR           60 ext/syck/implicit.c 	++YYCURSOR;
YYCURSOR           62 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 26) YYFILL(26);
YYCURSOR           63 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR           94 ext/syck/implicit.c yy2:	++YYCURSOR;
YYCURSOR           95 ext/syck/implicit.c 	if((yych = *YYCURSOR) <= 0x00)	goto yy6;
YYCURSOR          102 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR          109 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR          116 ext/syck/implicit.c yy6:	++YYCURSOR;
YYCURSOR          123 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR          129 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR          136 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR          142 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR          149 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR          156 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR          164 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR          170 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR          177 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR          193 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR          209 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR          229 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR          248 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR          256 ext/syck/implicit.c yy21:	yych = *++YYCURSOR;
YYCURSOR          260 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR          265 ext/syck/implicit.c yy23:	yych = *++YYCURSOR;
YYCURSOR          267 ext/syck/implicit.c yy24:	yych = *++YYCURSOR;
YYCURSOR          270 ext/syck/implicit.c yy25:	YYCURSOR = YYMARKER;
YYCURSOR          274 ext/syck/implicit.c yy26:	++YYCURSOR;
YYCURSOR          280 ext/syck/implicit.c yy28:	++YYCURSOR;
YYCURSOR          286 ext/syck/implicit.c yy30:	yych = *++YYCURSOR;
YYCURSOR          291 ext/syck/implicit.c yy31:	yych = *++YYCURSOR;
YYCURSOR          297 ext/syck/implicit.c yy32:	yych = *++YYCURSOR;
YYCURSOR          302 ext/syck/implicit.c yy33:	yych = *++YYCURSOR;
YYCURSOR          308 ext/syck/implicit.c yy34:	yych = *++YYCURSOR;
YYCURSOR          313 ext/syck/implicit.c yy35:	yych = *++YYCURSOR;
YYCURSOR          318 ext/syck/implicit.c yy36:	yych = *++YYCURSOR;
YYCURSOR          321 ext/syck/implicit.c yy37:	++YYCURSOR;
YYCURSOR          327 ext/syck/implicit.c yy39:	yych = *++YYCURSOR;
YYCURSOR          332 ext/syck/implicit.c yy40:	yych = *++YYCURSOR;
YYCURSOR          337 ext/syck/implicit.c yy41:	yych = *++YYCURSOR;
YYCURSOR          342 ext/syck/implicit.c yy42:	yych = *++YYCURSOR;
YYCURSOR          345 ext/syck/implicit.c yy43:	++YYCURSOR;
YYCURSOR          351 ext/syck/implicit.c yy45:	yych = *++YYCURSOR;
YYCURSOR          356 ext/syck/implicit.c yy46:	yych = *++YYCURSOR;
YYCURSOR          370 ext/syck/implicit.c yy47:	++YYCURSOR;
YYCURSOR          371 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR          372 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR          390 ext/syck/implicit.c yy49:	++YYCURSOR;
YYCURSOR          391 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR          392 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR          406 ext/syck/implicit.c yy50:	++YYCURSOR;
YYCURSOR          407 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
YYCURSOR          408 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR          427 ext/syck/implicit.c yy52:	++YYCURSOR;
YYCURSOR          433 ext/syck/implicit.c yy54:	++YYCURSOR;
YYCURSOR          434 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR          435 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR          451 ext/syck/implicit.c yy56:	++YYCURSOR;
YYCURSOR          457 ext/syck/implicit.c yy58:	++YYCURSOR;
YYCURSOR          458 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
YYCURSOR          459 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR          475 ext/syck/implicit.c yy60:	yych = *++YYCURSOR;
YYCURSOR          480 ext/syck/implicit.c yy61:	yych = *++YYCURSOR;
YYCURSOR          483 ext/syck/implicit.c yy62:	++YYCURSOR;
YYCURSOR          484 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR          485 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR          501 ext/syck/implicit.c yy64:	++YYCURSOR;
YYCURSOR          507 ext/syck/implicit.c yy66:	++YYCURSOR;
YYCURSOR          508 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR          509 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR          526 ext/syck/implicit.c yy67:	++YYCURSOR;
YYCURSOR          527 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR          528 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR          535 ext/syck/implicit.c yy68:	++YYCURSOR;
YYCURSOR          536 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR          537 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR          553 ext/syck/implicit.c yy70:	++YYCURSOR;
YYCURSOR          559 ext/syck/implicit.c yy72:	++YYCURSOR;
YYCURSOR          565 ext/syck/implicit.c yy74:	yych = *++YYCURSOR;
YYCURSOR          579 ext/syck/implicit.c yy75:	yych = *++YYCURSOR;
YYCURSOR          584 ext/syck/implicit.c yy76:	yych = *++YYCURSOR;
YYCURSOR          598 ext/syck/implicit.c yy77:	yych = *++YYCURSOR;
YYCURSOR          612 ext/syck/implicit.c yy78:	yych = *++YYCURSOR;
YYCURSOR          617 ext/syck/implicit.c yy79:	yych = *++YYCURSOR;
YYCURSOR          631 ext/syck/implicit.c yy80:	yych = *++YYCURSOR;
YYCURSOR          645 ext/syck/implicit.c yy81:	yych = *++YYCURSOR;
YYCURSOR          662 ext/syck/implicit.c yy82:	++YYCURSOR;
YYCURSOR          668 ext/syck/implicit.c yy84:	yych = *++YYCURSOR;
YYCURSOR          682 ext/syck/implicit.c yy85:	yych = *++YYCURSOR;
YYCURSOR          696 ext/syck/implicit.c yy86:	++YYCURSOR;
YYCURSOR          697 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 9) YYFILL(9);
YYCURSOR          698 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR          714 ext/syck/implicit.c yy88:	yych = *++YYCURSOR;
YYCURSOR          728 ext/syck/implicit.c yy89:	yych = *++YYCURSOR;
YYCURSOR          733 ext/syck/implicit.c yy90:	yych = *++YYCURSOR;
YYCURSOR          747 ext/syck/implicit.c yy91:	yych = *++YYCURSOR;
YYCURSOR          761 ext/syck/implicit.c yy92:	yych = *++YYCURSOR;
YYCURSOR          766 ext/syck/implicit.c yy93:	yych = *++YYCURSOR;
YYCURSOR          780 ext/syck/implicit.c yy94:	yych = *++YYCURSOR;
YYCURSOR          794 ext/syck/implicit.c yy95:	yych = *++YYCURSOR;
YYCURSOR          800 ext/syck/implicit.c yy96:	++YYCURSOR;
YYCURSOR          801 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR          802 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR          818 ext/syck/implicit.c yy98:	++YYCURSOR;
YYCURSOR          819 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
YYCURSOR          820 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR          828 ext/syck/implicit.c yy100:	yych = *++YYCURSOR;
YYCURSOR          831 ext/syck/implicit.c yy101:	yych = *++YYCURSOR;
YYCURSOR          845 ext/syck/implicit.c yy102:	yych = *++YYCURSOR;
YYCURSOR          859 ext/syck/implicit.c yy103:	yych = *++YYCURSOR;
YYCURSOR          865 ext/syck/implicit.c yy104:	yych = *++YYCURSOR;
YYCURSOR          879 ext/syck/implicit.c yy105:	++YYCURSOR;
YYCURSOR          885 ext/syck/implicit.c yy107:	yych = *++YYCURSOR;
YYCURSOR          899 ext/syck/implicit.c yy108:	yych = *++YYCURSOR;
YYCURSOR          913 ext/syck/implicit.c yy109:	yych = *++YYCURSOR;
YYCURSOR          918 ext/syck/implicit.c yy110:	yych = *++YYCURSOR;
YYCURSOR          932 ext/syck/implicit.c yy111:	yych = *++YYCURSOR;
YYCURSOR          946 ext/syck/implicit.c yy112:	yych = *++YYCURSOR;
YYCURSOR          951 ext/syck/implicit.c yy113:	yych = *++YYCURSOR;
YYCURSOR          965 ext/syck/implicit.c yy114:	yych = *++YYCURSOR;
YYCURSOR          979 ext/syck/implicit.c yy115:	yych = *++YYCURSOR;
YYCURSOR          994 ext/syck/implicit.c yy116:	++YYCURSOR;
YYCURSOR          995 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
YYCURSOR          996 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR         1013 ext/syck/implicit.c yy118:	yych = *++YYCURSOR;
YYCURSOR         1016 ext/syck/implicit.c yy119:	yych = *++YYCURSOR;
YYCURSOR         1030 ext/syck/implicit.c yy120:	yych = *++YYCURSOR;
YYCURSOR         1044 ext/syck/implicit.c yy121:	yych = *++YYCURSOR;
YYCURSOR         1050 ext/syck/implicit.c yy122:	yych = *++YYCURSOR;
YYCURSOR         1064 ext/syck/implicit.c yy123:	++YYCURSOR;
YYCURSOR         1070 ext/syck/implicit.c yy125:	yych = *++YYCURSOR;
YYCURSOR         1084 ext/syck/implicit.c yy126:	yych = *++YYCURSOR;
YYCURSOR         1098 ext/syck/implicit.c yy127:	yych = *++YYCURSOR;
YYCURSOR         1103 ext/syck/implicit.c yy128:	yych = *++YYCURSOR;
YYCURSOR         1117 ext/syck/implicit.c yy129:	yych = *++YYCURSOR;
YYCURSOR         1131 ext/syck/implicit.c yy130:	yych = *++YYCURSOR;
YYCURSOR         1136 ext/syck/implicit.c yy131:	yych = *++YYCURSOR;
YYCURSOR         1150 ext/syck/implicit.c yy132:	yych = *++YYCURSOR;
YYCURSOR         1164 ext/syck/implicit.c yy133:	yych = *++YYCURSOR;
YYCURSOR         1180 ext/syck/implicit.c yy134:	++YYCURSOR;
YYCURSOR         1181 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
YYCURSOR         1182 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR         1199 ext/syck/implicit.c yy136:	yych = *++YYCURSOR;
YYCURSOR         1202 ext/syck/implicit.c yy137:	yych = *++YYCURSOR;
YYCURSOR         1204 ext/syck/implicit.c yy138:	++YYCURSOR;
YYCURSOR         1205 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
YYCURSOR         1206 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR         1223 ext/syck/implicit.c yy140:	yych = *++YYCURSOR;
YYCURSOR         1237 ext/syck/implicit.c yy141:	yych = *++YYCURSOR;
YYCURSOR         1251 ext/syck/implicit.c yy142:	++YYCURSOR;
YYCURSOR         1252 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         1253 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR         1271 ext/syck/implicit.c yy144:	yych = *++YYCURSOR;
YYCURSOR         1274 ext/syck/implicit.c yy145:	++YYCURSOR;
YYCURSOR         1275 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         1276 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR         1302 ext/syck/implicit.c yy147:	++YYCURSOR;
YYCURSOR         1308 ext/syck/implicit.c yy149:	++YYCURSOR;
YYCURSOR         1314 ext/syck/implicit.c yy151:	++YYCURSOR;
YYCURSOR         1315 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         1316 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR         1333 ext/syck/implicit.c yy153:	yych = *++YYCURSOR;
YYCURSOR         1347 ext/syck/implicit.c yy154:	yych = *++YYCURSOR;
YYCURSOR         1352 ext/syck/implicit.c yy155:	yych = *++YYCURSOR;
YYCURSOR         1366 ext/syck/implicit.c yy156:	yych = *++YYCURSOR;
YYCURSOR         1371 ext/syck/implicit.c yy157:	yych = *++YYCURSOR;
YYCURSOR         1377 ext/syck/implicit.c yy158:	yych = *++YYCURSOR;
YYCURSOR         1383 ext/syck/implicit.c yy159:	yych = *++YYCURSOR;
YYCURSOR         1388 ext/syck/implicit.c yy160:	yych = *++YYCURSOR;
YYCURSOR         1394 ext/syck/implicit.c yy161:	yych = *++YYCURSOR;
YYCURSOR         1399 ext/syck/implicit.c yy162:	yych = *++YYCURSOR;
YYCURSOR         1404 ext/syck/implicit.c yy163:	yych = *++YYCURSOR;
YYCURSOR         1407 ext/syck/implicit.c yy164:	++YYCURSOR;
YYCURSOR         1413 ext/syck/implicit.c yy166:	yych = *++YYCURSOR;
YYCURSOR         1418 ext/syck/implicit.c yy167:	yych = *++YYCURSOR;
YYCURSOR         1424 ext/syck/implicit.c yy168:	yych = *++YYCURSOR;
YYCURSOR         1429 ext/syck/implicit.c yy169:	yych = *++YYCURSOR;
YYCURSOR         1434 ext/syck/implicit.c yy170:	yych = *++YYCURSOR;
YYCURSOR         1439 ext/syck/implicit.c yy171:	yych = *++YYCURSOR;
YYCURSOR         1444 ext/syck/implicit.c yy172:	yych = *++YYCURSOR;
YYCURSOR         1447 ext/syck/implicit.c yy173:	++YYCURSOR;
YYCURSOR         1453 ext/syck/implicit.c yy175:	yych = *++YYCURSOR;
YYCURSOR         1458 ext/syck/implicit.c yy176:	yych = *++YYCURSOR;
YYCURSOR         1463 ext/syck/implicit.c yy177:	yych = *++YYCURSOR;
YYCURSOR         1468 ext/syck/implicit.c yy178:	yych = *++YYCURSOR;
YYCURSOR         1473 ext/syck/implicit.c yy179:	yych = *++YYCURSOR;
YYCURSOR         1478 ext/syck/implicit.c yy180:	yych = *++YYCURSOR;
YYCURSOR         1483 ext/syck/implicit.c yy181:	yych = *++YYCURSOR;
YYCURSOR         1488 ext/syck/implicit.c yy182:	yych = *++YYCURSOR;
YYCURSOR         1491 ext/syck/implicit.c yy183:	++YYCURSOR;
YYCURSOR         1497 ext/syck/implicit.c yy185:	yych = *++YYCURSOR;
YYCURSOR         1502 ext/syck/implicit.c yy186:	yych = *++YYCURSOR;
YYCURSOR         1507 ext/syck/implicit.c yy187:	yych = *++YYCURSOR;
YYCURSOR         1512 ext/syck/implicit.c yy188:	yych = *++YYCURSOR;
YYCURSOR         1517 ext/syck/implicit.c yy189:	yych = *++YYCURSOR;
YYCURSOR         1522 ext/syck/implicit.c yy190:	yych = *++YYCURSOR;
YYCURSOR         1527 ext/syck/implicit.c yy191:	yych = *++YYCURSOR;
YYCURSOR         1532 ext/syck/implicit.c yy192:	yych = *++YYCURSOR;
YYCURSOR         1537 ext/syck/implicit.c yy193:	yych = *++YYCURSOR;
YYCURSOR         1542 ext/syck/implicit.c yy194:	yych = *++YYCURSOR;
YYCURSOR         1547 ext/syck/implicit.c yy195:	yych = *++YYCURSOR;
YYCURSOR         1552 ext/syck/implicit.c yy196:	yych = *++YYCURSOR;
YYCURSOR         1557 ext/syck/implicit.c yy197:	yych = *++YYCURSOR;
YYCURSOR         1562 ext/syck/implicit.c yy198:	yych = *++YYCURSOR;
YYCURSOR         1565 ext/syck/implicit.c yy199:	yych = *++YYCURSOR;
YYCURSOR         1570 ext/syck/implicit.c yy200:	yych = *++YYCURSOR;
YYCURSOR         1575 ext/syck/implicit.c yy201:	++YYCURSOR;
YYCURSOR         1576 ext/syck/implicit.c 	switch((yych = *YYCURSOR)) {
YYCURSOR         1625 ext/syck/implicit.c 	++YYCURSOR;
YYCURSOR         1627 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 11) YYFILL(11);
YYCURSOR         1628 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR         1692 ext/syck/implicit.c yy204:	YYCURSOR = YYMARKER;
YYCURSOR         1697 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR         1770 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR         1837 ext/syck/implicit.c yy208:	++YYCURSOR;
YYCURSOR         1844 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR         1912 ext/syck/implicit.c yy211:	yych = *++YYCURSOR;
YYCURSOR         1914 ext/syck/implicit.c yy212:	++YYCURSOR;
YYCURSOR         1915 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         1916 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR         1982 ext/syck/implicit.c yy214:	++YYCURSOR;
YYCURSOR         1983 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYCURSOR         1984 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR         2053 ext/syck/implicit.c yy216:	yych = *++YYCURSOR;
YYCURSOR         2067 ext/syck/implicit.c yy217:	++YYCURSOR;
YYCURSOR         2068 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         2069 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR         2133 ext/syck/implicit.c yy218:	++YYCURSOR;
YYCURSOR         2137 ext/syck/implicit.c {   char *domain = S_ALLOC_N( char, ( YYCURSOR - type_id ) + 15 );
YYCURSOR         2141 ext/syck/implicit.c                     strncat( domain, type_id, ( YYCURSOR - type_id ) - 1 );
YYCURSOR         2144 ext/syck/implicit.c                     uri = syck_taguri( domain, YYCURSOR, YYLIMIT - YYCURSOR );
YYCURSOR         2150 ext/syck/implicit.c yy220:	++YYCURSOR;
YYCURSOR         2151 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 12) YYFILL(12);
YYCURSOR         2152 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR         2221 ext/syck/implicit.c yy222:	++YYCURSOR;
YYCURSOR         2222 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         2223 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR         2289 ext/syck/implicit.c yy224:	yych = *++YYCURSOR;
YYCURSOR         2303 ext/syck/implicit.c yy225:	yych = *++YYCURSOR;
YYCURSOR         2317 ext/syck/implicit.c yy226:	yych = *++YYCURSOR;
YYCURSOR         2331 ext/syck/implicit.c yy227:	yych = *++YYCURSOR;
YYCURSOR         2337 ext/syck/implicit.c yy228:	yych = *++YYCURSOR;
YYCURSOR         2351 ext/syck/implicit.c yy229:	++YYCURSOR;
YYCURSOR         2355 ext/syck/implicit.c {   char *domain = S_ALLOC_N( char, YYCURSOR - type_id );
YYCURSOR         2359 ext/syck/implicit.c                                strncat( domain, type_id, ( YYCURSOR - type_id ) - 1 );
YYCURSOR         2360 ext/syck/implicit.c                                uri = syck_taguri( domain, YYCURSOR, YYLIMIT - YYCURSOR );
YYCURSOR         2366 ext/syck/implicit.c yy231:	yych = *++YYCURSOR;
YYCURSOR         2380 ext/syck/implicit.c yy232:	yych = *++YYCURSOR;
YYCURSOR         2386 ext/syck/implicit.c yy233:	yych = *++YYCURSOR;
YYCURSOR         2400 ext/syck/implicit.c yy234:	yych = *++YYCURSOR;
YYCURSOR         2414 ext/syck/implicit.c yy235:	yych = *++YYCURSOR;
YYCURSOR         2419 ext/syck/implicit.c yy236:	yych = *++YYCURSOR;
YYCURSOR         2424 ext/syck/implicit.c yy237:	yych = *++YYCURSOR;
YYCURSOR         2432 ext/syck/implicit.c yy238:	yych = *++YYCURSOR;
YYCURSOR         2440 ext/syck/implicit.c yy239:	yych = *++YYCURSOR;
YYCURSOR         2448 ext/syck/implicit.c yy240:	yych = *++YYCURSOR;
YYCURSOR         2456 ext/syck/implicit.c yy241:	yych = *++YYCURSOR;
YYCURSOR         2464 ext/syck/implicit.c yy242:	yych = *++YYCURSOR;
YYCURSOR         2472 ext/syck/implicit.c yy243:	yych = *++YYCURSOR;
YYCURSOR         2480 ext/syck/implicit.c yy244:	++YYCURSOR;
YYCURSOR         2486 ext/syck/implicit.c yy246:	yych = *++YYCURSOR;
YYCURSOR         2494 ext/syck/implicit.c yy247:	yych = *++YYCURSOR;
YYCURSOR         2502 ext/syck/implicit.c yy248:	yych = *++YYCURSOR;
YYCURSOR         2509 ext/syck/implicit.c yy249:	++YYCURSOR;
YYCURSOR         2510 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYCURSOR         2511 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR         2579 ext/syck/implicit.c yy251:	++YYCURSOR;
YYCURSOR         2580 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         2581 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR         2647 ext/syck/implicit.c yy253:	yych = *++YYCURSOR;
YYCURSOR         2661 ext/syck/implicit.c yy254:	++YYCURSOR;
YYCURSOR         2662 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         2663 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR         2727 ext/syck/implicit.c yy255:	++YYCURSOR;
YYCURSOR         2728 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 12) YYFILL(12);
YYCURSOR         2729 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR         2797 ext/syck/implicit.c yy257:	++YYCURSOR;
YYCURSOR         2798 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         2799 ext/syck/implicit.c 	yych = *YYCURSOR;
YYCURSOR         2865 ext/syck/implicit.c yy259:	yych = *++YYCURSOR;
YYCURSOR         2879 ext/syck/implicit.c yy260:	yych = *++YYCURSOR;
YYCURSOR         2893 ext/syck/implicit.c yy261:	yych = *++YYCURSOR;
YYCURSOR         2907 ext/syck/implicit.c yy262:	yych = *++YYCURSOR;
YYCURSOR         2913 ext/syck/implicit.c yy263:	yych = *++YYCURSOR;
YYCURSOR         2927 ext/syck/implicit.c yy264:	++YYCURSOR;
YYCURSOR         2933 ext/syck/implicit.c yy266:	yych = *++YYCURSOR;
YYCURSOR         2947 ext/syck/implicit.c yy267:	yych = *++YYCURSOR;
YYCURSOR         2953 ext/syck/implicit.c yy268:	yych = *++YYCURSOR;
YYCURSOR         2967 ext/syck/implicit.c yy269:	yych = *++YYCURSOR;
YYCURSOR         2981 ext/syck/implicit.c yy270:	++YYCURSOR;
YYCURSOR         2982 ext/syck/implicit.c 	switch((yych = *YYCURSOR)) {
YYCURSOR           38 ext/syck/token.c #define YYPOS(n)    YYCURSOR = YYTOKEN + n
YYCURSOR          122 ext/syck/token.c         YYCURSOR = YYTOKEN; \
YYCURSOR          136 ext/syck/token.c     if ( *(YYCURSOR - 1) == ' ' || is_newline( YYCURSOR - 1 ) ) \
YYCURSOR          138 ext/syck/token.c         YYCURSOR--; \
YYCURSOR          140 ext/syck/token.c     QUOTECATS(qstr, qcapa, qidx, YYTOKEN, YYCURSOR - YYTOKEN); \
YYCURSOR          196 ext/syck/token.c     while ( indent < YYCURSOR ) \
YYCURSOR          204 ext/syck/token.c     if ( *YYCURSOR == '\0' ) \
YYCURSOR          207 ext/syck/token.c         start = YYCURSOR - 1; \
YYCURSOR          211 ext/syck/token.c         ict = YYCURSOR - YYLINEPTR; \
YYCURSOR          221 ext/syck/token.c         if ( lvl_deep->status == syck_lvl_seq || ( indt_len == YYCURSOR - YYLINEPTR && lvl_deep->status != syck_lvl_map )  ) \
YYCURSOR          282 ext/syck/token.c     if ( YYCURSOR == NULL )
YYCURSOR          297 ext/syck/token.c     if ( YYLINEPTR != YYCURSOR )
YYCURSOR          304 ext/syck/token.c     YYTOKEN = YYCURSOR;
YYCURSOR          312 ext/syck/token.c 	++YYCURSOR;
YYCURSOR          314 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
YYCURSOR          315 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR          327 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR          339 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR          344 ext/syck/token.c yy5:	++YYCURSOR;
YYCURSOR          352 ext/syck/token.c yy7:	++YYCURSOR;
YYCURSOR          363 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR          371 ext/syck/token.c yy11:	yych = *++YYCURSOR;
YYCURSOR          376 ext/syck/token.c yy12:	++YYCURSOR;
YYCURSOR          377 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR          381 ext/syck/token.c {   doc_level = YYCURSOR - YYLINEPTR;
YYCURSOR          385 ext/syck/token.c yy14:	yych = *++YYCURSOR;
YYCURSOR          387 ext/syck/token.c yy15:	++YYCURSOR;
YYCURSOR          388 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR          389 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR          396 ext/syck/token.c 	YYMARKER = ++YYCURSOR;
YYCURSOR          397 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR          398 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR          405 ext/syck/token.c yy19:	++YYCURSOR;
YYCURSOR          406 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR          407 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR          412 ext/syck/token.c yy20:	YYCURSOR = YYMARKER;
YYCURSOR          417 ext/syck/token.c yy21:	yych = *++YYCURSOR;
YYCURSOR          422 ext/syck/token.c yy22:	yych = *++YYCURSOR;
YYCURSOR          429 ext/syck/token.c yy23:	++YYCURSOR;
YYCURSOR          447 ext/syck/token.c yy25:	++YYCURSOR;
YYCURSOR          448 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR          449 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR          455 ext/syck/token.c yy27:	yych = *++YYCURSOR;
YYCURSOR          460 ext/syck/token.c yy28:	yych = *++YYCURSOR;
YYCURSOR          465 ext/syck/token.c yy29:	yych = *++YYCURSOR;
YYCURSOR          472 ext/syck/token.c yy30:	++YYCURSOR;
YYCURSOR          490 ext/syck/token.c yy32:	++YYCURSOR;
YYCURSOR          491 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR          492 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR          498 ext/syck/token.c yy34:	++YYCURSOR;
YYCURSOR          499 ext/syck/token.c 	switch((yych = *YYCURSOR)) {
YYCURSOR          515 ext/syck/token.c         YYTOKEN = YYCURSOR;
YYCURSOR          523 ext/syck/token.c 	++YYCURSOR;
YYCURSOR          525 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
YYCURSOR          526 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR          547 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR          558 ext/syck/token.c                         if ( *YYCURSOR == '#' )
YYCURSOR          579 ext/syck/token.c yy39:	++YYCURSOR;
YYCURSOR          580 ext/syck/token.c 	switch((yych = *YYCURSOR)) {
YYCURSOR          590 ext/syck/token.c yy41:	++YYCURSOR;
YYCURSOR          600 ext/syck/token.c yy43:	++YYCURSOR;
YYCURSOR          610 ext/syck/token.c yy45:	++YYCURSOR;
YYCURSOR          619 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR          627 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR          634 ext/syck/token.c yy49:	yych = *++YYCURSOR;
YYCURSOR          698 ext/syck/token.c yy50:	yych = *++YYCURSOR;
YYCURSOR          762 ext/syck/token.c yy51:	++YYCURSOR;
YYCURSOR          768 ext/syck/token.c yy53:	++YYCURSOR;
YYCURSOR          775 ext/syck/token.c yy55:	++YYCURSOR;
YYCURSOR          783 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR          800 ext/syck/token.c yy58:	++YYCURSOR;
YYCURSOR          808 ext/syck/token.c yy60:	++YYCURSOR;
YYCURSOR          809 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR          815 ext/syck/token.c yy62:	++YYCURSOR;
YYCURSOR          824 ext/syck/token.c yy64:	yych = *++YYCURSOR;
YYCURSOR          826 ext/syck/token.c yy65:	++YYCURSOR;
YYCURSOR          827 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR          828 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR          834 ext/syck/token.c yy67:	++YYCURSOR;
YYCURSOR          835 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYCURSOR          836 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR          854 ext/syck/token.c yy69:	YYCURSOR = YYMARKER;
YYCURSOR          859 ext/syck/token.c yy70:	++YYCURSOR;
YYCURSOR          863 ext/syck/token.c {   if ( is_newline( YYCURSOR - 1 ) )
YYCURSOR          865 ext/syck/token.c                             YYCURSOR--;
YYCURSOR          870 ext/syck/token.c yy72:	++YYCURSOR;
YYCURSOR          871 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR          872 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR          878 ext/syck/token.c yy74:	yych = *++YYCURSOR;
YYCURSOR          883 ext/syck/token.c yy75:	++YYCURSOR;
YYCURSOR          884 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR          885 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR          953 ext/syck/token.c                         sycklval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 );
YYCURSOR          957 ext/syck/token.c yy78:	++YYCURSOR;
YYCURSOR          958 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR          959 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         1026 ext/syck/token.c {   sycklval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 );
YYCURSOR         1037 ext/syck/token.c yy81:	++YYCURSOR;
YYCURSOR         1043 ext/syck/token.c                         if ( *YYCURSOR == '#' || is_newline( YYCURSOR ) || is_newline( YYCURSOR - 1 ) )
YYCURSOR         1045 ext/syck/token.c                             YYCURSOR--;
YYCURSOR         1050 ext/syck/token.c                             ADD_LEVEL(YYCURSOR - YYLINEPTR, syck_lvl_seq);
YYCURSOR         1055 ext/syck/token.c yy83:	++YYCURSOR;
YYCURSOR         1056 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         1057 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         1063 ext/syck/token.c yy85:	yych = *++YYCURSOR;
YYCURSOR         1068 ext/syck/token.c yy86:	++YYCURSOR;
YYCURSOR         1077 ext/syck/token.c yy88:	++YYCURSOR;
YYCURSOR         1078 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         1079 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         1085 ext/syck/token.c yy90:	yych = *++YYCURSOR;
YYCURSOR         1091 ext/syck/token.c 	YYMARKER = ++YYCURSOR;
YYCURSOR         1092 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         1093 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         1100 ext/syck/token.c yy93:	++YYCURSOR;
YYCURSOR         1101 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         1102 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         1114 ext/syck/token.c         YYTOKTMP = YYCURSOR;
YYCURSOR         1122 ext/syck/token.c 	++YYCURSOR;
YYCURSOR         1124 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYCURSOR         1125 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         1132 ext/syck/token.c yy96:	YYCURSOR = YYMARKER;
YYCURSOR         1137 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR         1218 ext/syck/token.c {   YYCURSOR = YYTOKTMP;
YYCURSOR         1222 ext/syck/token.c yy99:	++YYCURSOR;
YYCURSOR         1223 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         1229 ext/syck/token.c yy101:	yych = *++YYCURSOR;
YYCURSOR         1231 ext/syck/token.c yy102:	++YYCURSOR;
YYCURSOR         1232 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         1233 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         1239 ext/syck/token.c yy104:	++YYCURSOR;
YYCURSOR         1240 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYCURSOR         1241 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         1320 ext/syck/token.c yy106:	yych = *++YYCURSOR;
YYCURSOR         1399 ext/syck/token.c yy107:	++YYCURSOR;
YYCURSOR         1400 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         1401 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         1499 ext/syck/token.c         YYCURSOR = YYTOKEN;
YYCURSOR         1504 ext/syck/token.c         YYTOKEN = YYCURSOR;
YYCURSOR         1514 ext/syck/token.c 	++YYCURSOR;
YYCURSOR         1516 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
YYCURSOR         1517 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         1531 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR         1546 ext/syck/token.c                         while ( YYTOKEN < YYCURSOR )
YYCURSOR         1571 ext/syck/token.c yy114:	++YYCURSOR;
YYCURSOR         1572 ext/syck/token.c 	switch((yych = *YYCURSOR)) {
YYCURSOR         1578 ext/syck/token.c {   QUOTECATS(qstr, qcapa, qidx, YYTOKEN, YYCURSOR - YYTOKEN);
YYCURSOR         1583 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR         1591 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR         1598 ext/syck/token.c yy118:	++YYCURSOR;
YYCURSOR         1613 ext/syck/token.c yy120:	++YYCURSOR;
YYCURSOR         1628 ext/syck/token.c yy122:	++YYCURSOR;
YYCURSOR         1629 ext/syck/token.c 	switch((yych = *YYCURSOR)) {
YYCURSOR         1645 ext/syck/token.c yy124:	++YYCURSOR;
YYCURSOR         1651 ext/syck/token.c yy126:	yych = *++YYCURSOR;
YYCURSOR         1653 ext/syck/token.c yy127:	yych = *++YYCURSOR;
YYCURSOR         1655 ext/syck/token.c yy128:	++YYCURSOR;
YYCURSOR         1663 ext/syck/token.c yy130:	++YYCURSOR;
YYCURSOR         1678 ext/syck/token.c yy132:	++YYCURSOR;
YYCURSOR         1679 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         1680 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         1686 ext/syck/token.c yy134:	yych = *++YYCURSOR;
YYCURSOR         1691 ext/syck/token.c yy135:	YYCURSOR = YYMARKER;
YYCURSOR         1696 ext/syck/token.c yy136:	++YYCURSOR;
YYCURSOR         1702 ext/syck/token.c yy138:	++YYCURSOR;
YYCURSOR         1703 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         1704 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         1710 ext/syck/token.c yy140:	yych = *++YYCURSOR;
YYCURSOR         1716 ext/syck/token.c 	YYMARKER = ++YYCURSOR;
YYCURSOR         1717 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         1718 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         1725 ext/syck/token.c yy143:	++YYCURSOR;
YYCURSOR         1726 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         1727 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         1744 ext/syck/token.c         YYTOKEN = YYCURSOR;
YYCURSOR         1752 ext/syck/token.c 	++YYCURSOR;
YYCURSOR         1754 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYCURSOR         1755 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         1764 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR         1783 ext/syck/token.c                         while ( YYTOKEN < YYCURSOR )
YYCURSOR         1808 ext/syck/token.c yy148:	++YYCURSOR;
YYCURSOR         1809 ext/syck/token.c 	switch((yych = *YYCURSOR)) {
YYCURSOR         1815 ext/syck/token.c {   QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
YYCURSOR         1819 ext/syck/token.c yy150:	++YYCURSOR;
YYCURSOR         1820 ext/syck/token.c 	switch((yych = *YYCURSOR)) {
YYCURSOR         1849 ext/syck/token.c yy152:	yych = *++YYCURSOR;
YYCURSOR         1851 ext/syck/token.c yy153:	yych = *++YYCURSOR;
YYCURSOR         1853 ext/syck/token.c yy154:	++YYCURSOR;
YYCURSOR         1862 ext/syck/token.c 	YYMARKER = ++YYCURSOR;
YYCURSOR         1863 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         1864 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         1871 ext/syck/token.c yy158:	++YYCURSOR;
YYCURSOR         1872 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         1873 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         1878 ext/syck/token.c yy159:	YYCURSOR = YYMARKER;
YYCURSOR         1897 ext/syck/token.c         YYTOKEN = YYCURSOR;
YYCURSOR         1906 ext/syck/token.c 	++YYCURSOR;
YYCURSOR         1908 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
YYCURSOR         1909 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         1919 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR         1940 ext/syck/token.c                             while ( YYTOKEN < YYCURSOR )
YYCURSOR         1967 ext/syck/token.c yy164:	++YYCURSOR;
YYCURSOR         1968 ext/syck/token.c 	switch((yych = *YYCURSOR)) {
YYCURSOR         1974 ext/syck/token.c {   QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
YYCURSOR         1979 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR         1990 ext/syck/token.c yy167:	++YYCURSOR;
YYCURSOR         2017 ext/syck/token.c yy169:	yych = *++YYCURSOR;
YYCURSOR         2019 ext/syck/token.c yy170:	yych = *++YYCURSOR;
YYCURSOR         2021 ext/syck/token.c yy171:	++YYCURSOR;
YYCURSOR         2022 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYCURSOR         2023 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         2031 ext/syck/token.c yy173:	YYCURSOR = YYMARKER;
YYCURSOR         2036 ext/syck/token.c yy174:	++YYCURSOR;
YYCURSOR         2041 ext/syck/token.c                         YYCURSOR--;
YYCURSOR         2045 ext/syck/token.c yy176:	yych = *++YYCURSOR;
YYCURSOR         2050 ext/syck/token.c yy177:	yych = *++YYCURSOR;
YYCURSOR         2074 ext/syck/token.c yy178:	++YYCURSOR;
YYCURSOR         2078 ext/syck/token.c {   char ch = *( YYCURSOR - 1 );
YYCURSOR         2083 ext/syck/token.c yy180:	yych = *++YYCURSOR;
YYCURSOR         2107 ext/syck/token.c yy181:	++YYCURSOR;
YYCURSOR         2121 ext/syck/token.c 	YYMARKER = ++YYCURSOR;
YYCURSOR         2122 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         2123 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         2130 ext/syck/token.c yy185:	++YYCURSOR;
YYCURSOR         2131 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         2132 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         2149 ext/syck/token.c         YYTOKTMP = YYCURSOR;
YYCURSOR         2157 ext/syck/token.c 	++YYCURSOR;
YYCURSOR         2159 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
YYCURSOR         2160 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         2169 ext/syck/token.c yy188:	++YYCURSOR;
YYCURSOR         2174 ext/syck/token.c                         YYCURSOR = YYTOKTMP;
YYCURSOR         2175 ext/syck/token.c                         if ( YYCURSOR == YYTOKEN + 1 )
YYCURSOR         2223 ext/syck/token.c yy190:	yych = *++YYCURSOR;
YYCURSOR         2225 ext/syck/token.c yy191:	yych = *++YYCURSOR;
YYCURSOR         2227 ext/syck/token.c yy192:	++YYCURSOR;
YYCURSOR         2228 ext/syck/token.c 	switch((yych = *YYCURSOR)) {
YYCURSOR         2234 ext/syck/token.c {   QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
YYCURSOR         2239 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR         2247 ext/syck/token.c yy195:	yych = *++YYCURSOR;
YYCURSOR         2249 ext/syck/token.c yy196:	yych = *++YYCURSOR;
YYCURSOR         2273 ext/syck/token.c yy197:	YYCURSOR = YYMARKER;
YYCURSOR         2277 ext/syck/token.c yy198:	++YYCURSOR;
YYCURSOR         2281 ext/syck/token.c {  char ch = *( YYCURSOR - 1 );
YYCURSOR         2286 ext/syck/token.c yy200:	yych = *++YYCURSOR;
YYCURSOR         2310 ext/syck/token.c yy201:	++YYCURSOR;
YYCURSOR         2323 ext/syck/token.c yy203:	++YYCURSOR;
YYCURSOR         2324 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         2325 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         2355 ext/syck/token.c         while ( ++yyt <= YYCURSOR )
YYCURSOR         2372 ext/syck/token.c         YYTOKEN = YYCURSOR;
YYCURSOR         2375 ext/syck/token.c         YYTOKEN = YYCURSOR;
YYCURSOR         2383 ext/syck/token.c 	++YYCURSOR;
YYCURSOR         2385 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
YYCURSOR         2386 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         2396 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR         2420 ext/syck/token.c                                 YYCURSOR = YYTOKEN;
YYCURSOR         2435 ext/syck/token.c                         while ( pacer < YYCURSOR )
YYCURSOR         2464 ext/syck/token.c                         YYCURSOR -= lastIndent;
YYCURSOR         2469 ext/syck/token.c                             YYCURSOR = YYTOKEN;
YYCURSOR         2475 ext/syck/token.c yy209:	++YYCURSOR;
YYCURSOR         2476 ext/syck/token.c 	switch((yych = *YYCURSOR)) {
YYCURSOR         2486 ext/syck/token.c yy211:	++YYCURSOR;
YYCURSOR         2494 ext/syck/token.c                             YYTOKEN = YYCURSOR;
YYCURSOR         2503 ext/syck/token.c yy213:	++YYCURSOR;
YYCURSOR         2507 ext/syck/token.c {   YYCURSOR--;
YYCURSOR         2513 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR         2518 ext/syck/token.c yy216:	yych = *++YYCURSOR;
YYCURSOR         2520 ext/syck/token.c yy217:	yych = *++YYCURSOR;
YYCURSOR         2525 ext/syck/token.c yy218:	YYCURSOR = YYMARKER;
YYCURSOR         2530 ext/syck/token.c yy219:	yych = *++YYCURSOR;
YYCURSOR         2537 ext/syck/token.c yy220:	++YYCURSOR;
YYCURSOR         2549 ext/syck/token.c                             YYCURSOR = YYTOKEN;
YYCURSOR         2555 ext/syck/token.c                             YYCURSOR = YYTOKEN + 1;
YYCURSOR         2560 ext/syck/token.c yy222:	++YYCURSOR;
YYCURSOR         2561 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         2562 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         2568 ext/syck/token.c yy224:	yych = *++YYCURSOR;
YYCURSOR         2574 ext/syck/token.c 	YYMARKER = ++YYCURSOR;
YYCURSOR         2575 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         2576 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         2583 ext/syck/token.c yy227:	++YYCURSOR;
YYCURSOR         2584 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         2585 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         2604 ext/syck/token.c         YYTOKEN = YYCURSOR;
YYCURSOR         2612 ext/syck/token.c 	++YYCURSOR;
YYCURSOR         2614 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYCURSOR         2615 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         2622 ext/syck/token.c yy230:	++YYCURSOR;
YYCURSOR         2626 ext/syck/token.c {   YYCURSOR = YYTOKEN;
YYCURSOR         2631 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYCURSOR         2633 ext/syck/token.c yy233:	++YYCURSOR;
YYCURSOR         2634 ext/syck/token.c 	switch((yych = *YYCURSOR)) {
YYCURSOR         2643 ext/syck/token.c yy235:	yych = *++YYCURSOR;
YYCURSOR         2646 ext/syck/token.c 	YYMARKER = ++YYCURSOR;
YYCURSOR         2647 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         2648 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         2655 ext/syck/token.c yy238:	++YYCURSOR;
YYCURSOR         2656 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYCURSOR         2657 ext/syck/token.c 	yych = *YYCURSOR;
YYCURSOR         2662 ext/syck/token.c yy239:	YYCURSOR = YYMARKER;


YYDEBUG

YYDEBUG           119 ext/syck/gram.c #ifndef YYDEBUG
YYDEBUG           307 ext/syck/gram.c #if YYDEBUG
YYDEBUG           364 ext/syck/gram.c #if YYDEBUG || YYERROR_VERBOSE
YYDEBUG           662 ext/syck/gram.c #if YYDEBUG
YYDEBUG           838 ext/syck/gram.c #if YYDEBUG


YYDPRINTF

YYDPRINTF         995 ext/syck/gram.c   YYDPRINTF ((stderr, "Starting parse\n"));
YYDPRINTF        1083 ext/syck/gram.c       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
YYDPRINTF        1090 ext/syck/gram.c   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
YYDPRINTF        1114 ext/syck/gram.c       YYDPRINTF ((stderr, "Reading a token: "));
YYDPRINTF        1121 ext/syck/gram.c       YYDPRINTF ((stderr, "Now at end of input.\n"));
YYDPRINTF        1147 ext/syck/gram.c   YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
YYDPRINTF        1833 ext/syck/gram.c   YYDPRINTF ((stderr, "Shifting error token, "));


YYDSYMPRINTF

YYDSYMPRINTF     1126 ext/syck/gram.c       YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
YYDSYMPRINTF     1763 ext/syck/gram.c 		 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
YYDSYMPRINTF     1769 ext/syck/gram.c 	  YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
YYDSYMPRINTF     1823 ext/syck/gram.c       YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);


YYEMPTY

YYEMPTY           605 ext/syck/gram.c #define yyclearin	(yychar = YYEMPTY)
YYEMPTY           624 ext/syck/gram.c   if (yychar == YYEMPTY && yylen == 1)				\
YYEMPTY          1000 ext/syck/gram.c   yychar = YYEMPTY;		/* Cause a token to be read.  */
YYEMPTY          1112 ext/syck/gram.c   if (yychar == YYEMPTY)
YYEMPTY          1151 ext/syck/gram.c     yychar = YYEMPTY;
YYEMPTY          1771 ext/syck/gram.c 	  yychar = YYEMPTY;


YYEOF

YYEOF            1118 ext/syck/gram.c   if (yychar <= YYEOF)
YYEOF            1120 ext/syck/gram.c       yychar = yytoken = YYEOF;
YYEOF            1150 ext/syck/gram.c   if (yychar != YYEOF)
YYEOF            1753 ext/syck/gram.c       if (yychar <= YYEOF)
YYEOF            1757 ext/syck/gram.c 	  if (yychar == YYEOF)


YYERROR_VERBOSE

YYERROR_VERBOSE   124 ext/syck/gram.c #ifdef YYERROR_VERBOSE
YYERROR_VERBOSE   153 ext/syck/gram.c #if ! defined (yyoverflow) || YYERROR_VERBOSE
YYERROR_VERBOSE   364 ext/syck/gram.c #if YYDEBUG || YYERROR_VERBOSE
YYERROR_VERBOSE   783 ext/syck/gram.c #if YYERROR_VERBOSE
YYERROR_VERBOSE  1684 ext/syck/gram.c #if YYERROR_VERBOSE


YYFILL

YYFILL            172 ext/syck/bytecode.c 	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
YYFILL            241 ext/syck/bytecode.c 	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
YYFILL            550 ext/syck/bytecode.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYFILL            650 ext/syck/bytecode.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYFILL            810 ext/syck/bytecode.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYFILL            922 ext/syck/bytecode.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYFILL            976 ext/syck/bytecode.c 	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
YYFILL           1033 ext/syck/bytecode.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           1120 ext/syck/bytecode.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYFILL             62 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 26) YYFILL(26);
YYFILL            371 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL            391 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL            407 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
YYFILL            434 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL            458 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
YYFILL            484 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL            508 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL            527 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL            536 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL            697 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 9) YYFILL(9);
YYFILL            801 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL            819 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
YYFILL            995 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
YYFILL           1181 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
YYFILL           1205 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
YYFILL           1252 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           1275 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           1315 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           1627 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 11) YYFILL(11);
YYFILL           1915 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           1983 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYFILL           2068 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           2151 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 12) YYFILL(12);
YYFILL           2222 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           2510 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYFILL           2580 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           2662 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           2728 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 12) YYFILL(12);
YYFILL           2798 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL            314 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
YYFILL            388 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL            397 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL            406 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL            448 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL            491 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL            525 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
YYFILL            827 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL            835 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYFILL            871 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL            884 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL            958 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           1056 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           1078 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           1092 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           1101 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           1124 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYFILL           1232 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           1240 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYFILL           1400 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           1516 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
YYFILL           1679 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           1703 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           1717 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           1726 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           1754 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYFILL           1863 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           1872 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           1908 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
YYFILL           2022 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYFILL           2122 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           2131 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           2159 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
YYFILL           2324 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           2385 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
YYFILL           2561 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           2575 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           2584 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           2614 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYFILL           2647 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYFILL           2656 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);


YYFINAL

YYFINAL          1143 ext/syck/gram.c   if (yyn == YYFINAL)
YYFINAL          1830 ext/syck/gram.c   if (yyn == YYFINAL)


YYFPRINTF

YYFPRINTF         664 ext/syck/gram.c # ifndef YYFPRINTF
YYFPRINTF         672 ext/syck/gram.c     YYFPRINTF Args;				\
YYFPRINTF         685 ext/syck/gram.c       YYFPRINTF (stderr, "%s ", Title);				\
YYFPRINTF         688 ext/syck/gram.c       YYFPRINTF (stderr, "\n");					\
YYFPRINTF         707 ext/syck/gram.c   YYFPRINTF (stderr, "Stack now");
YYFPRINTF         709 ext/syck/gram.c     YYFPRINTF (stderr, " %d", *bottom);
YYFPRINTF         710 ext/syck/gram.c   YYFPRINTF (stderr, "\n");
YYFPRINTF         735 ext/syck/gram.c   YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
YYFPRINTF         739 ext/syck/gram.c     YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
YYFPRINTF         740 ext/syck/gram.c   YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
YYFPRINTF         859 ext/syck/gram.c       YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
YYFPRINTF         865 ext/syck/gram.c     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
YYFPRINTF         872 ext/syck/gram.c   YYFPRINTF (yyoutput, ")");


YYFREE

YYFREE            155 ext/syck/gram.c # ifndef YYFREE
YYFREE            187 ext/syck/gram.c #  define YYSTACK_FREE YYFREE
YYFREE             35 parse.y        #define free	YYFREE


YYINITDEPTH

YYINITDEPTH       762 ext/syck/gram.c #ifndef	YYINITDEPTH
YYINITDEPTH       971 ext/syck/gram.c   short int yyssa[YYINITDEPTH];
YYINITDEPTH       976 ext/syck/gram.c   YYSTYPE yyvsa[YYINITDEPTH];
YYINITDEPTH       984 ext/syck/gram.c   YYSIZE_T yystacksize = YYINITDEPTH;


YYLAST

YYLAST           1132 ext/syck/gram.c   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
YYLAST           1668 ext/syck/gram.c   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
YYLAST           1687 ext/syck/gram.c       if (YYPACT_NINF < yyn && yyn < YYLAST)
YYLAST           1700 ext/syck/gram.c 	  int yychecklim = YYLAST - yyn;
YYLAST           1811 ext/syck/gram.c 	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)


YYLEX_PARAM

YYLEX_PARAM       655 ext/syck/gram.c #ifdef YYLEX_PARAM
YYLEX_PARAM       656 ext/syck/gram.c # define YYLEX yylex (&yylval, YYLEX_PARAM)


YYLIMIT

YYLIMIT           172 ext/syck/bytecode.c 	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
YYLIMIT           241 ext/syck/bytecode.c 	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
YYLIMIT           550 ext/syck/bytecode.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYLIMIT           650 ext/syck/bytecode.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYLIMIT           810 ext/syck/bytecode.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYLIMIT           922 ext/syck/bytecode.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYLIMIT           976 ext/syck/bytecode.c 	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
YYLIMIT          1033 ext/syck/bytecode.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          1120 ext/syck/bytecode.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYLIMIT            62 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 26) YYFILL(26);
YYLIMIT           371 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT           391 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT           407 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
YYLIMIT           434 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT           458 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
YYLIMIT           484 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT           508 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT           527 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT           536 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT           697 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 9) YYFILL(9);
YYLIMIT           801 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT           819 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
YYLIMIT           995 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
YYLIMIT          1181 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
YYLIMIT          1205 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
YYLIMIT          1252 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          1275 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          1315 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          1627 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 11) YYFILL(11);
YYLIMIT          1915 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          1983 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYLIMIT          2068 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          2144 ext/syck/implicit.c                     uri = syck_taguri( domain, YYCURSOR, YYLIMIT - YYCURSOR );
YYLIMIT          2151 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 12) YYFILL(12);
YYLIMIT          2222 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          2360 ext/syck/implicit.c                                uri = syck_taguri( domain, YYCURSOR, YYLIMIT - YYCURSOR );
YYLIMIT          2510 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYLIMIT          2580 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          2662 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          2728 ext/syck/implicit.c 	if((YYLIMIT - YYCURSOR) < 12) YYFILL(12);
YYLIMIT          2798 ext/syck/implicit.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT           314 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
YYLIMIT           388 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT           397 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT           406 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT           448 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT           491 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT           525 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
YYLIMIT           827 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT           835 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYLIMIT           871 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT           884 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT           958 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          1056 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          1078 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          1092 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          1101 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          1124 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYLIMIT          1232 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          1240 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYLIMIT          1400 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          1516 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
YYLIMIT          1679 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          1703 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          1717 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          1726 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          1754 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYLIMIT          1863 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          1872 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          1908 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
YYLIMIT          2022 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYLIMIT          2122 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          2131 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          2159 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
YYLIMIT          2324 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          2385 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
YYLIMIT          2561 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          2575 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          2584 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          2614 ext/syck/token.c 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
YYLIMIT          2647 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);
YYLIMIT          2656 ext/syck/token.c 	if(YYLIMIT == YYCURSOR) YYFILL(1);


YYLINE

YYLINE             44 ext/syck/bytecode.c #define CHK_NL(ptr)    if ( *( ptr - 1 ) == '\n' && ptr > YYLINECTPTR ) { YYLINEPTR = ptr; YYLINE++; YYLINECTPTR = YYLINEPTR; }
YYLINE             43 ext/syck/token.c #define NEWLINE(ptr)    YYLINEPTR = ptr + newline_len(ptr); if ( YYLINEPTR > YYLINECTPTR ) { YYLINE++; YYLINECTPTR = YYLINEPTR; }


YYLINECTPTR

YYLINECTPTR        44 ext/syck/bytecode.c #define CHK_NL(ptr)    if ( *( ptr - 1 ) == '\n' && ptr > YYLINECTPTR ) { YYLINEPTR = ptr; YYLINE++; YYLINECTPTR = YYLINEPTR; }
YYLINECTPTR        43 ext/syck/token.c #define NEWLINE(ptr)    YYLINEPTR = ptr + newline_len(ptr); if ( YYLINEPTR > YYLINECTPTR ) { YYLINE++; YYLINECTPTR = YYLINEPTR; }


YYLINEPTR

YYLINEPTR          44 ext/syck/bytecode.c #define CHK_NL(ptr)    if ( *( ptr - 1 ) == '\n' && ptr > YYLINECTPTR ) { YYLINEPTR = ptr; YYLINE++; YYLINECTPTR = YYLINEPTR; }
YYLINEPTR          43 ext/syck/token.c #define NEWLINE(ptr)    YYLINEPTR = ptr + newline_len(ptr); if ( YYLINEPTR > YYLINECTPTR ) { YYLINE++; YYLINECTPTR = YYLINEPTR; }
YYLINEPTR         209 ext/syck/token.c     else if ( *YYLINEPTR == ' ' ) \
YYLINEPTR         211 ext/syck/token.c         ict = YYCURSOR - YYLINEPTR; \
YYLINEPTR         221 ext/syck/token.c         if ( lvl_deep->status == syck_lvl_seq || ( indt_len == YYCURSOR - YYLINEPTR && lvl_deep->status != syck_lvl_map )  ) \
YYLINEPTR         297 ext/syck/token.c     if ( YYLINEPTR != YYCURSOR )
YYLINEPTR         381 ext/syck/token.c {   doc_level = YYCURSOR - YYLINEPTR;
YYLINEPTR        1041 ext/syck/token.c {   ENSURE_YAML_IOPEN(lvl, YYTOKEN - YYLINEPTR, 1);
YYLINEPTR        1046 ext/syck/token.c                             ADD_LEVEL((YYTOKEN + 1) - YYLINEPTR, syck_lvl_seq);
YYLINEPTR        1050 ext/syck/token.c                             ADD_LEVEL(YYCURSOR - YYLINEPTR, syck_lvl_seq);
YYLINEPTR        2541 ext/syck/token.c {   if ( YYTOKEN == YYLINEPTR )


YYMALLOC

YYMALLOC          158 ext/syck/gram.c # ifndef YYMALLOC
YYMALLOC          186 ext/syck/gram.c #  define YYSTACK_ALLOC YYMALLOC
YYMALLOC           32 parse.y        #define malloc	YYMALLOC
YYMALLOC          187 parse.y        #ifdef YYMALLOC
YYMALLOC         8687 parse.y        #ifdef YYMALLOC
YYMALLOC         8711 parse.y        #ifdef YYMALLOC
YYMALLOC         8770 parse.y        #ifdef YYMALLOC


YYMARKER

YYMARKER          179 ext/syck/bytecode.c yy2:	YYCURSOR = YYMARKER;
YYMARKER          184 ext/syck/bytecode.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          557 ext/syck/bytecode.c yy47:	YYCURSOR = YYMARKER;
YYMARKER          562 ext/syck/bytecode.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          102 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          109 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          123 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          129 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          136 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          142 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          149 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          156 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          164 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          170 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          177 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          193 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          209 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          229 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          248 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          260 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          270 ext/syck/implicit.c yy25:	YYCURSOR = YYMARKER;
YYMARKER         1692 ext/syck/implicit.c yy204:	YYCURSOR = YYMARKER;
YYMARKER         1697 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER         1770 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER         1844 ext/syck/implicit.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          327 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          339 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          363 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          396 ext/syck/token.c 	YYMARKER = ++YYCURSOR;
YYMARKER          412 ext/syck/token.c yy20:	YYCURSOR = YYMARKER;
YYMARKER          547 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          619 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          627 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          783 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER          854 ext/syck/token.c yy69:	YYCURSOR = YYMARKER;
YYMARKER         1091 ext/syck/token.c 	YYMARKER = ++YYCURSOR;
YYMARKER         1132 ext/syck/token.c yy96:	YYCURSOR = YYMARKER;
YYMARKER         1137 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER         1531 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER         1583 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER         1591 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER         1691 ext/syck/token.c yy135:	YYCURSOR = YYMARKER;
YYMARKER         1716 ext/syck/token.c 	YYMARKER = ++YYCURSOR;
YYMARKER         1764 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER         1862 ext/syck/token.c 	YYMARKER = ++YYCURSOR;
YYMARKER         1878 ext/syck/token.c yy159:	YYCURSOR = YYMARKER;
YYMARKER         1919 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER         1979 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER         2031 ext/syck/token.c yy173:	YYCURSOR = YYMARKER;
YYMARKER         2121 ext/syck/token.c 	YYMARKER = ++YYCURSOR;
YYMARKER         2239 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER         2273 ext/syck/token.c yy197:	YYCURSOR = YYMARKER;
YYMARKER         2396 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER         2513 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER         2525 ext/syck/token.c yy218:	YYCURSOR = YYMARKER;
YYMARKER         2574 ext/syck/token.c 	YYMARKER = ++YYCURSOR;
YYMARKER         2631 ext/syck/token.c 	yych = *(YYMARKER = ++YYCURSOR);
YYMARKER         2646 ext/syck/token.c 	YYMARKER = ++YYCURSOR;
YYMARKER         2662 ext/syck/token.c yy239:	YYCURSOR = YYMARKER;


YYMAXDEPTH

YYMAXDEPTH        773 ext/syck/gram.c #if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
YYMAXDEPTH        777 ext/syck/gram.c #ifndef YYMAXDEPTH
YYMAXDEPTH       1057 ext/syck/gram.c       if (YYMAXDEPTH <= yystacksize)
YYMAXDEPTH       1060 ext/syck/gram.c       if (YYMAXDEPTH < yystacksize)
YYMAXDEPTH       1061 ext/syck/gram.c 	yystacksize = YYMAXDEPTH;
YYMAXDEPTH        456 parse.y        #ifndef YYMAXDEPTH


YYNTOKENS

YYNTOKENS         857 ext/syck/gram.c   if (yytype < YYNTOKENS)
YYNTOKENS        1667 ext/syck/gram.c   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
YYNTOKENS        1671 ext/syck/gram.c     yystate = yydefgoto[yyn - YYNTOKENS];
YYNTOKENS        1701 ext/syck/gram.c 	  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;


YYPACT_NINF

YYPACT_NINF      1106 ext/syck/gram.c   if (yyn == YYPACT_NINF)
YYPACT_NINF      1687 ext/syck/gram.c       if (YYPACT_NINF < yyn && yyn < YYLAST)
YYPACT_NINF      1808 ext/syck/gram.c       if (yyn != YYPACT_NINF)


YYPARSE_PARAM

YYPARSE_PARAM     904 ext/syck/gram.c #ifdef YYPARSE_PARAM
YYPARSE_PARAM     906 ext/syck/gram.c int yyparse (void *YYPARSE_PARAM);
YYPARSE_PARAM     927 ext/syck/gram.c #ifdef YYPARSE_PARAM
YYPARSE_PARAM     929 ext/syck/gram.c int yyparse (void *YYPARSE_PARAM)
YYPARSE_PARAM     931 ext/syck/gram.c int yyparse (YYPARSE_PARAM)
YYPARSE_PARAM     932 ext/syck/gram.c   void *YYPARSE_PARAM;


YYPOPSTACK

YYPOPSTACK        629 ext/syck/gram.c       YYPOPSTACK;						\
YYPOPSTACK       1760 ext/syck/gram.c 		 YYPOPSTACK;
YYPOPSTACK       1825 ext/syck/gram.c       YYPOPSTACK;


YYPOS

YYPOS              68 ext/syck/bytecode.c                 YYPOS(0); \
YYPOS              99 ext/syck/bytecode.c                 if ( reset == 1 ) YYPOS(0); \
YYPOS             112 ext/syck/bytecode.c             YYPOS(0); \
YYPOS             192 ext/syck/bytecode.c {   YYPOS(0);
YYPOS             210 ext/syck/bytecode.c                 YYPOS(0);
YYPOS             416 ext/syck/bytecode.c             YYPOS(0);
YYPOS             427 ext/syck/bytecode.c                 YYPOS(0);
YYPOS             434 ext/syck/bytecode.c                 YYPOS(0);
YYPOS             518 ext/syck/bytecode.c                 YYPOS(0);
YYPOS              71 ext/syck/token.c                 if ( reset == 1 ) YYPOS(0); \
YYPOS              84 ext/syck/token.c             YYPOS(0); \
YYPOS             334 ext/syck/token.c {   YYPOS(0);
YYPOS             358 ext/syck/token.c                         YYPOS(0);
YYPOS             441 ext/syck/token.c                             YYPOS(0);
YYPOS             479 ext/syck/token.c                             YYPOS(3);
YYPOS             485 ext/syck/token.c                             YYPOS(0);
YYPOS             820 ext/syck/token.c                         YYPOS(0);
YYPOS            1073 ext/syck/token.c                         YYPOS(1);


YYPURE

YYPURE           6849 parse.y        #if YYPURE
YYPURE           6859 parse.y        #if YYPURE


YYSIZE_T

YYSIZE_T          222 ext/syck/gram.c 	  register YYSIZE_T yyi;		\
YYSIZE_T          238 ext/syck/gram.c 	YYSIZE_T yynewbytes;						\
YYSIZE_T          588 ext/syck/gram.c #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
YYSIZE_T          591 ext/syck/gram.c #if ! defined (YYSIZE_T) && defined (size_t)
YYSIZE_T          594 ext/syck/gram.c #if ! defined (YYSIZE_T)
YYSIZE_T          600 ext/syck/gram.c #if ! defined (YYSIZE_T)
YYSIZE_T          790 ext/syck/gram.c static YYSIZE_T
YYSIZE_T          984 ext/syck/gram.c   YYSIZE_T yystacksize = YYINITDEPTH;
YYSIZE_T         1028 ext/syck/gram.c       YYSIZE_T yysize = yyssp - yyss + 1;
YYSIZE_T         1689 ext/syck/gram.c 	  YYSIZE_T yysize = 0;


YYSTACK_ALLOC

YYSTACK_ALLOC     178 ext/syck/gram.c # ifdef YYSTACK_ALLOC
YYSTACK_ALLOC    1066 ext/syck/gram.c 	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
YYSTACK_ALLOC    1718 ext/syck/gram.c 	  yymsg = (char *) YYSTACK_ALLOC (yysize);


YYSTACK_FREE

YYSTACK_FREE     1074 ext/syck/gram.c 	  YYSTACK_FREE (yyss1);
YYSTACK_FREE     1736 ext/syck/gram.c 	      YYSTACK_FREE (yymsg);
YYSTACK_FREE     1869 ext/syck/gram.c     YYSTACK_FREE (yyss);


YYSTACK_GAP_MAXIMUM

YYSTACK_GAP_MAXIMUM  210 ext/syck/gram.c       + YYSTACK_GAP_MAXIMUM)
YYSTACK_GAP_MAXIMUM  241 ext/syck/gram.c 	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \


YYSTACK_RELOCATE

YYSTACK_RELOCATE 1053 ext/syck/gram.c # ifndef YYSTACK_RELOCATE
YYSTACK_RELOCATE 1069 ext/syck/gram.c 	YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE 1070 ext/syck/gram.c 	YYSTACK_RELOCATE (yyvs);


YYSTACK_USE_ALLOCA

YYSTACK_USE_ALLOCA  164 ext/syck/gram.c # ifdef YYSTACK_USE_ALLOCA
YYSTACK_USE_ALLOCA  165 ext/syck/gram.c #  if YYSTACK_USE_ALLOCA


YYSTYPE

YYSTYPE           135 ext/syck/bytecode.c sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
YYSTYPE           131 ext/syck/gram.c #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
YYSTYPE           140 ext/syck/gram.c # define yystype YYSTYPE /* obsolescent; will be withdrawn */
YYSTYPE           200 ext/syck/gram.c   YYSTYPE yyvs;
YYSTYPE           209 ext/syck/gram.c      ((N) * (sizeof (short int) + sizeof (YYSTYPE))			\
YYSTYPE           845 ext/syck/gram.c yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
YYSTYPE           851 ext/syck/gram.c     YYSTYPE *yyvaluep;
YYSTYPE           882 ext/syck/gram.c yydestruct (int yytype, YYSTYPE *yyvaluep)
YYSTYPE           887 ext/syck/gram.c     YYSTYPE *yyvaluep;
YYSTYPE           949 ext/syck/gram.c YYSTYPE yylval;
YYSTYPE           976 ext/syck/gram.c   YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE           977 ext/syck/gram.c   YYSTYPE *yyvs = yyvsa;
YYSTYPE           978 ext/syck/gram.c   register YYSTYPE *yyvsp;
YYSTYPE           988 ext/syck/gram.c   YYSTYPE yyval;
YYSTYPE          1035 ext/syck/gram.c 	YYSTYPE *yyvs1 = yyvs;
YYSTYPE            62 ext/syck/gram.h #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
YYSTYPE            71 ext/syck/gram.h # define yystype YYSTYPE /* obsolescent; will be withdrawn */
YYSTYPE           449 ext/syck/syck.h union YYSTYPE;
YYSTYPE           450 ext/syck/syck.h int sycklex( union YYSTYPE *, SyckParser * );
YYSTYPE           243 ext/syck/token.c int sycklex_yaml_utf8( YYSTYPE *, SyckParser * );
YYSTYPE           244 ext/syck/token.c int sycklex_bytecode_utf8( YYSTYPE *, SyckParser * );
YYSTYPE           253 ext/syck/token.c sycklex( YYSTYPE *sycklval, SyckParser *parser )
YYSTYPE           278 ext/syck/token.c sycklex_yaml_utf8( YYSTYPE *sycklval, SyckParser *parser )
YYSTYPE          4407 parse.y        # define yylval  (*((YYSTYPE*)(parser->parser_yylval)))
YYSTYPE          8771 parse.y        #define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE))


YYSTYPE_IS_DECLARED

YYSTYPE_IS_DECLARED  131 ext/syck/gram.c #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
YYSTYPE_IS_DECLARED   62 ext/syck/gram.h #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)


YYTERROR

YYTERROR         1706 ext/syck/gram.c 	    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
YYTERROR         1728 ext/syck/gram.c 		    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
YYTERROR         1810 ext/syck/gram.c 	  yyn += YYTERROR;
YYTERROR         1811 ext/syck/gram.c 	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)


YYTOKEN

YYTOKEN            39 ext/syck/bytecode.c #define YYPOS(n)    YYCURSOR = YYTOKEN + n
YYTOKEN           162 ext/syck/bytecode.c     YYTOKEN = YYCURSOR;
YYTOKEN           232 ext/syck/bytecode.c         YYTOKEN = YYCURSOR;
YYTOKEN           540 ext/syck/bytecode.c         YYTOKEN = YYCURSOR;
YYTOKEN           643 ext/syck/bytecode.c {   YYCURSOR = YYTOKEN;
YYTOKEN           913 ext/syck/bytecode.c         YYTOKEN = YYCURSOR;
YYTOKEN            38 ext/syck/token.c #define YYPOS(n)    YYCURSOR = YYTOKEN + n
YYTOKEN           122 ext/syck/token.c         YYCURSOR = YYTOKEN; \
YYTOKEN           140 ext/syck/token.c     QUOTECATS(qstr, qcapa, qidx, YYTOKEN, YYCURSOR - YYTOKEN); \
YYTOKEN           304 ext/syck/token.c     YYTOKEN = YYCURSOR;
YYTOKEN           367 ext/syck/token.c {   GOBBLE_UP_YAML_INDENT( doc_level, YYTOKEN );
YYTOKEN           515 ext/syck/token.c         YYTOKEN = YYCURSOR;
YYTOKEN           553 ext/syck/token.c                         GOBBLE_UP_YAML_INDENT( indt_len, YYTOKEN );
YYTOKEN           597 ext/syck/token.c                         return YYTOKEN[0];
YYTOKEN           607 ext/syck/token.c                         return YYTOKEN[0];
YYTOKEN           615 ext/syck/token.c                         return YYTOKEN[0];
YYTOKEN           953 ext/syck/token.c                         sycklval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 );
YYTOKEN          1026 ext/syck/token.c {   sycklval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 );
YYTOKEN          1041 ext/syck/token.c {   ENSURE_YAML_IOPEN(lvl, YYTOKEN - YYLINEPTR, 1);
YYTOKEN          1046 ext/syck/token.c                             ADD_LEVEL((YYTOKEN + 1) - YYLINEPTR, syck_lvl_seq);
YYTOKEN          1052 ext/syck/token.c                         return YYTOKEN[0];
YYTOKEN          1072 ext/syck/token.c {   if ( *YYTOKEN == ':' && lvl->status != syck_lvl_imap ) lvl->status = syck_lvl_map;
YYTOKEN          1074 ext/syck/token.c                         return YYTOKEN[0];
YYTOKEN          1499 ext/syck/token.c         YYCURSOR = YYTOKEN;
YYTOKEN          1504 ext/syck/token.c         YYTOKEN = YYCURSOR;
YYTOKEN          1537 ext/syck/token.c                         char *tok = YYTOKEN;
YYTOKEN          1546 ext/syck/token.c                         while ( YYTOKEN < YYCURSOR )
YYTOKEN          1548 ext/syck/token.c                             int nl_len = newline_len( YYTOKEN++ );
YYTOKEN          1552 ext/syck/token.c                                 YYTOKEN += nl_len - 1;
YYTOKEN          1578 ext/syck/token.c {   QUOTECATS(qstr, qcapa, qidx, YYTOKEN, YYCURSOR - YYTOKEN);
YYTOKEN          1744 ext/syck/token.c         YYTOKEN = YYCURSOR;
YYTOKEN          1771 ext/syck/token.c                         GOBBLE_UP_YAML_INDENT( indt_len, YYTOKEN );
YYTOKEN          1783 ext/syck/token.c                         while ( YYTOKEN < YYCURSOR )
YYTOKEN          1785 ext/syck/token.c                             int nl_len = newline_len( YYTOKEN++ );
YYTOKEN          1789 ext/syck/token.c                                 YYTOKEN += nl_len - 1;
YYTOKEN          1897 ext/syck/token.c         YYTOKEN = YYCURSOR;
YYTOKEN          1926 ext/syck/token.c                         GOBBLE_UP_YAML_INDENT( indt_len, YYTOKEN );
YYTOKEN          1940 ext/syck/token.c                             while ( YYTOKEN < YYCURSOR )
YYTOKEN          1942 ext/syck/token.c                                 int nl_len = newline_len( YYTOKEN++ );
YYTOKEN          1946 ext/syck/token.c                                     YYTOKEN += nl_len - 1;
YYTOKEN          2112 ext/syck/token.c                         char *chr_text = syck_strndup( YYTOKEN, 4 );
YYTOKEN          2175 ext/syck/token.c                         if ( YYCURSOR == YYTOKEN + 1 )
YYTOKEN          2345 ext/syck/token.c         char *yyt = YYTOKEN;
YYTOKEN          2372 ext/syck/token.c         YYTOKEN = YYCURSOR;
YYTOKEN          2375 ext/syck/token.c         YYTOKEN = YYCURSOR;
YYTOKEN          2401 ext/syck/token.c                         char *tok = YYTOKEN;
YYTOKEN          2420 ext/syck/token.c                                 YYCURSOR = YYTOKEN;
YYTOKEN          2434 ext/syck/token.c                         pacer = YYTOKEN;
YYTOKEN          2469 ext/syck/token.c                             YYCURSOR = YYTOKEN;
YYTOKEN          2482 ext/syck/token.c {   QUOTECAT(qstr, qcapa, qidx, *YYTOKEN);
YYTOKEN          2494 ext/syck/token.c                             YYTOKEN = YYCURSOR;
YYTOKEN          2498 ext/syck/token.c                             QUOTECAT(qstr, qcapa, qidx, *YYTOKEN);
YYTOKEN          2541 ext/syck/token.c {   if ( YYTOKEN == YYLINEPTR )
YYTOKEN          2549 ext/syck/token.c                             YYCURSOR = YYTOKEN;
YYTOKEN          2554 ext/syck/token.c                             QUOTECAT(qstr, qcapa, qidx, *YYTOKEN);
YYTOKEN          2555 ext/syck/token.c                             YYCURSOR = YYTOKEN + 1;
YYTOKEN          2604 ext/syck/token.c         YYTOKEN = YYCURSOR;
YYTOKEN          2626 ext/syck/token.c {   YYCURSOR = YYTOKEN;


YYTOKENTYPE

YYTOKENTYPE        60 ext/syck/gram.c #ifndef YYTOKENTYPE
YYTOKENTYPE        27 ext/syck/gram.h #ifndef YYTOKENTYPE


YYTOKTMP

YYTOKTMP         1114 ext/syck/token.c         YYTOKTMP = YYCURSOR;
YYTOKTMP         1218 ext/syck/token.c {   YYCURSOR = YYTOKTMP;
YYTOKTMP         2149 ext/syck/token.c         YYTOKTMP = YYCURSOR;
YYTOKTMP         2174 ext/syck/token.c                         YYCURSOR = YYTOKTMP;
YYTOKTMP         2315 ext/syck/token.c                         char *chr_text = syck_strndup( YYTOKTMP, 4 );


YYTRANSLATE

YYTRANSLATE       628 ext/syck/gram.c       yytoken = YYTRANSLATE (yychar);				\
YYTRANSLATE      1125 ext/syck/gram.c       yytoken = YYTRANSLATE (yychar);
YYTRANSLATE      1690 ext/syck/gram.c 	  int yytype = YYTRANSLATE (yychar);


YY_STACK_PRINT

YY_STACK_PRINT   1656 ext/syck/gram.c   YY_STACK_PRINT (yyss, yyssp);
YY_STACK_PRINT   1827 ext/syck/gram.c       YY_STACK_PRINT (yyss, yyssp);


ZEROPAD

ZEROPAD           641 missing/vsnprintf.c 			flags |= ZEROPAD;
ZEROPAD           871 missing/vsnprintf.c 				flags &= ~ZEROPAD;
ZEROPAD           927 missing/vsnprintf.c 		if ((flags & (LADJUST|ZEROPAD)) == 0)
ZEROPAD           940 missing/vsnprintf.c 		if ((flags & (LADJUST|ZEROPAD)) == ZEROPAD)


ZSTREAM_AVAIL_OUT_STEP_MAX

ZSTREAM_AVAIL_OUT_STEP_MAX  448 ext/zlib/zlib.c     if (RSTRING(z->buf)->len - z->buf_filled >= ZSTREAM_AVAIL_OUT_STEP_MAX) {
ZSTREAM_AVAIL_OUT_STEP_MAX  450 ext/zlib/zlib.c 	z->stream.avail_out = ZSTREAM_AVAIL_OUT_STEP_MAX;
ZSTREAM_AVAIL_OUT_STEP_MAX  458 ext/zlib/zlib.c 	z->stream.avail_out = (inc < ZSTREAM_AVAIL_OUT_STEP_MAX) ?
ZSTREAM_AVAIL_OUT_STEP_MAX  459 ext/zlib/zlib.c 	    inc : ZSTREAM_AVAIL_OUT_STEP_MAX;
ZSTREAM_AVAIL_OUT_STEP_MAX  561 ext/zlib/zlib.c     if (z->stream.avail_out > ZSTREAM_AVAIL_OUT_STEP_MAX) {
ZSTREAM_AVAIL_OUT_STEP_MAX  562 ext/zlib/zlib.c 	z->stream.avail_out = ZSTREAM_AVAIL_OUT_STEP_MAX;


ZSTREAM_AVAIL_OUT_STEP_MIN

ZSTREAM_AVAIL_OUT_STEP_MIN  454 ext/zlib/zlib.c 	if (inc < ZSTREAM_AVAIL_OUT_STEP_MIN) {
ZSTREAM_AVAIL_OUT_STEP_MIN  455 ext/zlib/zlib.c 	    inc = ZSTREAM_AVAIL_OUT_STEP_MIN;


ZSTREAM_FLAG_CLOSED

ZSTREAM_FLAG_CLOSED  376 ext/zlib/zlib.c #define ZSTREAM_IS_CLOSED(z)   ((z)->flags & ZSTREAM_FLAG_CLOSED)
ZSTREAM_FLAG_CLOSED 2275 ext/zlib/zlib.c     gz->z.flags |= ZSTREAM_FLAG_CLOSED;
ZSTREAM_FLAG_CLOSED 2308 ext/zlib/zlib.c     gz->z.flags |= ZSTREAM_FLAG_CLOSED;


ZSTREAM_FLAG_FINALIZE

ZSTREAM_FLAG_FINALIZE  375 ext/zlib/zlib.c #define ZSTREAM_IS_FINALIZE(z) ((z)->flags & ZSTREAM_FLAG_FINALIZE)
ZSTREAM_FLAG_FINALIZE  823 ext/zlib/zlib.c     z->flags |= ZSTREAM_FLAG_FINALIZE;
ZSTREAM_FLAG_FINALIZE 1753 ext/zlib/zlib.c     gz->z.flags |= ZSTREAM_FLAG_FINALIZE;


ZSTREAM_FLAG_FINISHED

ZSTREAM_FLAG_FINISHED  374 ext/zlib/zlib.c #define ZSTREAM_IS_FINISHED(z) ((z)->flags & ZSTREAM_FLAG_FINISHED)
ZSTREAM_FLAG_FINISHED  740 ext/zlib/zlib.c 	    z->flags |= ZSTREAM_FLAG_FINISHED;


ZSTREAM_FLAG_IN_STREAM

ZSTREAM_FLAG_IN_STREAM  687 ext/zlib/zlib.c     if (z->flags & ZSTREAM_FLAG_IN_STREAM) {
ZSTREAM_FLAG_IN_STREAM  739 ext/zlib/zlib.c 	    z->flags &= ~ZSTREAM_FLAG_IN_STREAM;
ZSTREAM_FLAG_IN_STREAM  746 ext/zlib/zlib.c 		z->flags |= ZSTREAM_FLAG_IN_STREAM;
ZSTREAM_FLAG_IN_STREAM  756 ext/zlib/zlib.c 	    z->flags |= ZSTREAM_FLAG_IN_STREAM;


ZSTREAM_FLAG_READY

ZSTREAM_FLAG_READY  372 ext/zlib/zlib.c #define ZSTREAM_READY(z)       ((z)->flags |= ZSTREAM_FLAG_READY)
ZSTREAM_FLAG_READY  373 ext/zlib/zlib.c #define ZSTREAM_IS_READY(z)    ((z)->flags & ZSTREAM_FLAG_READY)
ZSTREAM_FLAG_READY  667 ext/zlib/zlib.c     z->flags = ZSTREAM_FLAG_READY;


ZSTREAM_FLAG_UNUSED

ZSTREAM_FLAG_UNUSED 1729 ext/zlib/zlib.c #define GZFILE_FLAG_SYNC             ZSTREAM_FLAG_UNUSED
ZSTREAM_FLAG_UNUSED 1730 ext/zlib/zlib.c #define GZFILE_FLAG_HEADER_FINISHED  (ZSTREAM_FLAG_UNUSED << 1)
ZSTREAM_FLAG_UNUSED 1731 ext/zlib/zlib.c #define GZFILE_FLAG_FOOTER_FINISHED  (ZSTREAM_FLAG_UNUSED << 2)


ZSTREAM_INITIAL_BUFSIZE

ZSTREAM_INITIAL_BUFSIZE  440 ext/zlib/zlib.c 	z->buf = rb_str_new(0, ZSTREAM_INITIAL_BUFSIZE);
ZSTREAM_INITIAL_BUFSIZE  443 ext/zlib/zlib.c 	z->stream.avail_out = ZSTREAM_INITIAL_BUFSIZE;


ZSTREAM_IS_CLOSED

ZSTREAM_IS_CLOSED 2274 ext/zlib/zlib.c     if (ZSTREAM_IS_CLOSED(&gz->z)) return;
ZSTREAM_IS_CLOSED 2307 ext/zlib/zlib.c     if (ZSTREAM_IS_CLOSED(&gz->z)) return;


ZSTREAM_IS_FINALIZE

ZSTREAM_IS_FINALIZE  664 ext/zlib/zlib.c     if (err != Z_OK && !ZSTREAM_IS_FINALIZE(z)) {
ZSTREAM_IS_FINALIZE  681 ext/zlib/zlib.c     if (!ZSTREAM_IS_READY(z) && !ZSTREAM_IS_FINALIZE(z)) {
ZSTREAM_IS_FINALIZE  696 ext/zlib/zlib.c     if (err != Z_OK && !ZSTREAM_IS_FINALIZE(z)) {
ZSTREAM_IS_FINALIZE 2284 ext/zlib/zlib.c     if (ZSTREAM_IS_FINALIZE(&gz->z)) {
ZSTREAM_IS_FINALIZE 2311 ext/zlib/zlib.c 	&& !ZSTREAM_IS_FINALIZE(&gz->z)


ZSTREAM_IS_FINISHED

ZSTREAM_IS_FINISHED 1087 ext/zlib/zlib.c     return ZSTREAM_IS_FINISHED(get_zstream(obj)) ? Qtrue : Qfalse;
ZSTREAM_IS_FINISHED 1541 ext/zlib/zlib.c     if (ZSTREAM_IS_FINISHED(z)) {
ZSTREAM_IS_FINISHED 1554 ext/zlib/zlib.c 	if (ZSTREAM_IS_FINISHED(z)) {
ZSTREAM_IS_FINISHED 1578 ext/zlib/zlib.c     if (ZSTREAM_IS_FINISHED(z)) {
ZSTREAM_IS_FINISHED 1586 ext/zlib/zlib.c 	if (ZSTREAM_IS_FINISHED(z)) {
ZSTREAM_IS_FINISHED 1734 ext/zlib/zlib.c     (ZSTREAM_IS_FINISHED(&gz->z) && (gz)->z.buf_filled == 0)
ZSTREAM_IS_FINISHED 2119 ext/zlib/zlib.c     while (!ZSTREAM_IS_FINISHED(&gz->z)) {
ZSTREAM_IS_FINISHED 2122 ext/zlib/zlib.c 	    if (!ZSTREAM_IS_FINISHED(&gz->z)) {
ZSTREAM_IS_FINISHED 2162 ext/zlib/zlib.c     while (!ZSTREAM_IS_FINISHED(&gz->z) && gz->z.buf_filled < len) {
ZSTREAM_IS_FINISHED 2201 ext/zlib/zlib.c     while (!ZSTREAM_IS_FINISHED(&gz->z) && gz->z.buf_filled == 0) {
ZSTREAM_IS_FINISHED 2233 ext/zlib/zlib.c     while (!ZSTREAM_IS_FINISHED(&gz->z)) {
ZSTREAM_IS_FINISHED 3226 ext/zlib/zlib.c 	if (ZSTREAM_IS_FINISHED(&gz->z)) {
ZSTREAM_IS_FINISHED 3237 ext/zlib/zlib.c 	    if (ZSTREAM_IS_FINISHED(&gz->z)) break;


ZSTREAM_IS_READY

ZSTREAM_IS_READY  681 ext/zlib/zlib.c     if (!ZSTREAM_IS_READY(z) && !ZSTREAM_IS_FINALIZE(z)) {
ZSTREAM_IS_READY  852 ext/zlib/zlib.c     if (!ZSTREAM_IS_READY(z)) {
ZSTREAM_IS_READY 1099 ext/zlib/zlib.c     return ZSTREAM_IS_READY(z) ? Qfalse : Qtrue;
ZSTREAM_IS_READY 1754 ext/zlib/zlib.c     if (ZSTREAM_IS_READY(&gz->z)) {
ZSTREAM_IS_READY 2340 ext/zlib/zlib.c     if (!ZSTREAM_IS_READY(&gz->z)) return Qnil;
ZSTREAM_IS_READY 2359 ext/zlib/zlib.c     if (!ZSTREAM_IS_READY(&gz->z)) {
ZSTREAM_IS_READY 2386 ext/zlib/zlib.c     if (ZSTREAM_IS_READY(&gz->z)) {


ZSTREAM_READY

ZSTREAM_READY    1158 ext/zlib/zlib.c     ZSTREAM_READY(z);
ZSTREAM_READY    1233 ext/zlib/zlib.c     ZSTREAM_READY(&z);
ZSTREAM_READY    1445 ext/zlib/zlib.c     ZSTREAM_READY(z);
ZSTREAM_READY    1493 ext/zlib/zlib.c     ZSTREAM_READY(&z);
ZSTREAM_READY    2799 ext/zlib/zlib.c     ZSTREAM_READY(&gz->z);
ZSTREAM_READY    2994 ext/zlib/zlib.c     ZSTREAM_READY(&gz->z);


Zero

Zero             1545 ext/bigdecimal/bigdecimal.c     if(fNaN==0.0) fNaN = Zero()/Zero();
Zero             1553 ext/bigdecimal/bigdecimal.c     if(fInf==0.0) fInf = One()/Zero();
Zero             1561 ext/bigdecimal/bigdecimal.c     if(fInf==0.0) fInf = -(One()/Zero());


ZeroMemory

ZeroMemory        663 file.c         	ZeroMemory(st, sizeof(*st));
ZeroMemory       3503 win32/win32.c  	ZeroMemory(&ctx, sizeof(CONTEXT));
ZeroMemory        171 wince/wince.h    VOID ZeroMemory(PVOID p, DWORD length);


_

_                  89 ext/dbm/dbm.c  static VALUE fdbm_alloc _((VALUE));
_                 429 ext/dbm/dbm.c  static VALUE each_pair _((VALUE));
_                 438 ext/dbm/dbm.c  static VALUE fdbm_store _((VALUE,VALUE,VALUE));
_                  73 ext/digest/md5/md5.h void	MD5_Init _((MD5_CTX *pms));
_                  74 ext/digest/md5/md5.h void	MD5_Update _((MD5_CTX *pms, const uint8_t *data, size_t nbytes));
_                  75 ext/digest/md5/md5.h void	MD5_Final _((uint8_t *digest, MD5_CTX *pms));
_                  76 ext/digest/md5/md5.h void	MD5_End _((MD5_CTX *pctx, uint8_t *hexdigest));
_                  77 ext/digest/md5/md5.h int	MD5_Equal _((MD5_CTX *pctx1, MD5_CTX *pctx2));
_                  52 ext/digest/rmd160/rmd160.h void	RMD160_Init _((RMD160_CTX *));
_                  53 ext/digest/rmd160/rmd160.h void	RMD160_Transform _((uint32_t[5], const uint32_t[16]));
_                  54 ext/digest/rmd160/rmd160.h void	RMD160_Update _((RMD160_CTX *, const uint8_t *, size_t));
_                  55 ext/digest/rmd160/rmd160.h void	RMD160_Final _((uint8_t[20], RMD160_CTX *));
_                  56 ext/digest/rmd160/rmd160.h int	RMD160_Equal _((RMD160_CTX *, RMD160_CTX *));
_                  58 ext/digest/rmd160/rmd160.h char	*RMD160_End _((RMD160_CTX *, char *));
_                  59 ext/digest/rmd160/rmd160.h char	*RMD160_File _((char *, char *));
_                  60 ext/digest/rmd160/rmd160.h char	*RMD160_Data _((const uint8_t *, size_t, char *));
_                  35 ext/digest/sha1/sha1.h void	SHA1_Transform _((uint32_t state[5], const uint8_t buffer[64]));
_                  36 ext/digest/sha1/sha1.h void	SHA1_Init _((SHA1_CTX *context));
_                  37 ext/digest/sha1/sha1.h void	SHA1_Update _((SHA1_CTX *context, const uint8_t *data, size_t len));
_                  38 ext/digest/sha1/sha1.h void	SHA1_Final _((uint8_t digest[20], SHA1_CTX *context));
_                  39 ext/digest/sha1/sha1.h int	SHA1_Equal _((SHA1_CTX *pctx1, SHA1_CTX *pctx2));
_                  41 ext/digest/sha1/sha1.h char	*SHA1_End _((SHA1_CTX *, char *));
_                  42 ext/digest/sha1/sha1.h char	*SHA1_File _((char *, char *));
_                  43 ext/digest/sha1/sha1.h char	*SHA1_Data _((const uint8_t *, size_t, char *));
_                 104 ext/digest/sha2/sha2.h void SHA256_Init _((SHA256_CTX *));
_                 105 ext/digest/sha2/sha2.h void SHA256_Update _((SHA256_CTX*, const uint8_t*, size_t));
_                 106 ext/digest/sha2/sha2.h void SHA256_Final _((uint8_t[SHA256_DIGEST_LENGTH], SHA256_CTX*));
_                 107 ext/digest/sha2/sha2.h char* SHA256_End _((SHA256_CTX*, char[SHA256_DIGEST_STRING_LENGTH]));
_                 108 ext/digest/sha2/sha2.h char* SHA256_Data _((const uint8_t*, size_t, char[SHA256_DIGEST_STRING_LENGTH]));
_                 109 ext/digest/sha2/sha2.h char *SHA256_File _((char *, char *));
_                 110 ext/digest/sha2/sha2.h int SHA256_Equal _((SHA256_CTX*, SHA256_CTX*));
_                 112 ext/digest/sha2/sha2.h void SHA384_Init _((SHA384_CTX*));
_                 113 ext/digest/sha2/sha2.h void SHA384_Update _((SHA384_CTX*, const uint8_t*, size_t));
_                 114 ext/digest/sha2/sha2.h void SHA384_Final _((uint8_t[SHA384_DIGEST_LENGTH], SHA384_CTX*));
_                 115 ext/digest/sha2/sha2.h char* SHA384_End _((SHA384_CTX*, char[SHA384_DIGEST_STRING_LENGTH]));
_                 116 ext/digest/sha2/sha2.h char* SHA384_Data _((const uint8_t*, size_t, char[SHA384_DIGEST_STRING_LENGTH]));
_                 117 ext/digest/sha2/sha2.h char *SHA384_File _((char *, char *));
_                 118 ext/digest/sha2/sha2.h int SHA384_Equal _((SHA384_CTX*, SHA384_CTX*));
_                 120 ext/digest/sha2/sha2.h void SHA512_Init _((SHA512_CTX*));
_                 121 ext/digest/sha2/sha2.h void SHA512_Update _((SHA512_CTX*, const uint8_t*, size_t));
_                 122 ext/digest/sha2/sha2.h void SHA512_Final _((uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*));
_                 123 ext/digest/sha2/sha2.h char* SHA512_End _((SHA512_CTX*, char[SHA512_DIGEST_STRING_LENGTH]));
_                 124 ext/digest/sha2/sha2.h char* SHA512_Data _((const uint8_t*, size_t, char[SHA512_DIGEST_STRING_LENGTH]));
_                 125 ext/digest/sha2/sha2.h char *SHA512_File _((char *, char *));
_                 126 ext/digest/sha2/sha2.h int SHA512_Equal _((SHA512_CTX*, SHA512_CTX*));
_                  90 ext/gdbm/gdbm.c static VALUE fgdbm_s_alloc _((VALUE));
_                 531 ext/gdbm/gdbm.c static VALUE each_pair _((VALUE));
_                 540 ext/gdbm/gdbm.c static VALUE fgdbm_store _((VALUE,VALUE,VALUE));
_                  83 ext/iconv/iconv.c     VALUE (*append)_((VALUE, VALUE));
_                 102 ext/iconv/iconv.c static VALUE iconv_fail _((VALUE error, VALUE success, VALUE failed, struct iconv_env_t* env, const char *mesg));
_                 103 ext/iconv/iconv.c static VALUE iconv_failure_initialize _((VALUE error, VALUE mesg, VALUE success, VALUE failed));
_                 104 ext/iconv/iconv.c static VALUE iconv_failure_success _((VALUE self));
_                 105 ext/iconv/iconv.c static VALUE iconv_failure_failed _((VALUE self));
_                 107 ext/iconv/iconv.c static iconv_t iconv_create _((VALUE to, VALUE from, struct rb_iconv_opt_t *opt));
_                 108 ext/iconv/iconv.c static void iconv_dfree _((void *cd));
_                 109 ext/iconv/iconv.c static VALUE iconv_free _((VALUE cd));
_                 110 ext/iconv/iconv.c static VALUE iconv_try _((iconv_t cd, const char **inptr, size_t *inlen, char **outptr, size_t *outlen));
_                 111 ext/iconv/iconv.c static VALUE rb_str_derive _((VALUE str, const char* ptr, int len));
_                 112 ext/iconv/iconv.c static VALUE iconv_convert _((iconv_t cd, VALUE str, int start, int length, struct iconv_env_t* env));
_                 113 ext/iconv/iconv.c static VALUE iconv_s_allocate _((VALUE klass));
_                 114 ext/iconv/iconv.c static VALUE iconv_initialize _((int argc, VALUE *argv, VALUE self));
_                 115 ext/iconv/iconv.c static VALUE iconv_s_open _((int argc, VALUE *argv, VALUE self));
_                 116 ext/iconv/iconv.c static VALUE iconv_s_convert _((struct iconv_env_t* env));
_                 117 ext/iconv/iconv.c static VALUE iconv_s_iconv _((int argc, VALUE *argv, VALUE self));
_                 118 ext/iconv/iconv.c static VALUE iconv_init_state _((VALUE cd));
_                 119 ext/iconv/iconv.c static VALUE iconv_finish _((VALUE self));
_                 120 ext/iconv/iconv.c static VALUE iconv_iconv _((int argc, VALUE *argv, VALUE self));
_                 121 ext/iconv/iconv.c static VALUE iconv_conv _((int argc, VALUE *argv, VALUE self));
_                  37 ext/io/wait/wait.c static VALUE io_ready_p _((VALUE io));
_                  38 ext/io/wait/wait.c static VALUE io_wait _((int argc, VALUE *argv, VALUE io));
_                  39 ext/io/wait/wait.c void Init_wait _((void));
_                  41 ext/io/wait/wait.c EXTERN struct timeval rb_time_interval _((VALUE time));
_                 126 ext/io/wait/wait.c 		       (VALUE (*)_((VALUE)))rb_fd_term, (VALUE)&arg.fds);
_                  77 ext/openssl/ossl.c     return (STACK_OF(X509)*)rb_protect((VALUE(*)_((VALUE)))ossl_x509_ary2sk0,
_                 133 ext/openssl/ossl.c     str = rb_protect((VALUE(*)_((VALUE)))ossl_str_new, len, &status);
_                 330 ext/openssl/ossl_asn1.c     ret = rb_protect((VALUE(*)_((VALUE)))asn1integer_to_num,
_                 375 ext/openssl/ossl_asn1.c     ret = rb_protect((VALUE(*)_((VALUE)))asn1integer_to_num,
_                 437 ext/openssl/ossl_asn1.c     ret = rb_protect((VALUE(*)_((VALUE)))asn1time_to_time,
_                  53 ext/openssl/ossl_bio.c      ret = (BIO*)rb_protect((VALUE(*)_((VALUE)))ossl_obj2bio, obj, status);
_                  72 ext/openssl/ossl_bio.c     return rb_protect((VALUE(*)_((VALUE)))ossl_membio2str0, (VALUE)bio, status);
_                  98 ext/openssl/ossl_pkcs12.c     pkey = rb_protect((VALUE(*)_((VALUE)))ossl_pkey_new, (VALUE)key,
_                 101 ext/openssl/ossl_pkcs12.c     cert = rb_protect((VALUE(*)_((VALUE)))ossl_x509_new, (VALUE)x509, &st);
_                 105 ext/openssl/ossl_pkcs12.c 	    rb_protect((VALUE(*)_((VALUE)))ossl_x509_sk2ary, (VALUE)x509s, &st);
_                 231 ext/openssl/ossl_pkey_dsa.c     int (*i2d_func)_((DSA*, unsigned char**));
_                 238 ext/openssl/ossl_pkey_dsa.c 	i2d_func = (int(*)_((DSA*,unsigned char**)))i2d_DSAPrivateKey;
_                 226 ext/openssl/ossl_pkey_rsa.c     int (*i2d_func)_((const RSA*, unsigned char**));
_                 204 ext/openssl/ossl_ssl.c     success = rb_protect((VALUE(*)_((VALUE)))ossl_call_client_cert_cb,
_                 241 ext/openssl/ossl_ssl.c     success = rb_protect((VALUE(*)_((VALUE)))ossl_call_tmp_dh_callback,
_                 179 ext/pty/pty.c  static void getDevice _((int*, int*));
_                  60 ext/racc/cparse/cparse.c static ID value_to_id _((VALUE v));
_                  61 ext/racc/cparse/cparse.c static inline long num_to_long _((VALUE n));
_                 105 ext/racc/cparse/cparse.c static VALUE get_stack_tail _((VALUE stack, long len));
_                 106 ext/racc/cparse/cparse.c static void cut_stack_tail _((VALUE stack, long len));
_                 201 ext/racc/cparse/cparse.c static VALUE racc_cparse _((VALUE parser, VALUE arg, VALUE sysdebug));
_                 202 ext/racc/cparse/cparse.c static VALUE racc_yyparse _((VALUE parser, VALUE lexer, VALUE lexmid,
_                 205 ext/racc/cparse/cparse.c static void call_lexer _((struct cparse_params *v));
_                 206 ext/racc/cparse/cparse.c static VALUE lexer_iter _((VALUE data));
_                 207 ext/racc/cparse/cparse.c static VALUE lexer_i _((VALUE block_args, VALUE data, VALUE self));
_                 209 ext/racc/cparse/cparse.c static VALUE assert_array _((VALUE a));
_                 210 ext/racc/cparse/cparse.c static long assert_integer _((VALUE n));
_                 211 ext/racc/cparse/cparse.c static VALUE assert_hash _((VALUE h));
_                 212 ext/racc/cparse/cparse.c static void initialize_params _((struct cparse_params *v,
_                 216 ext/racc/cparse/cparse.c static void parse_main _((struct cparse_params *v,
_                 218 ext/racc/cparse/cparse.c static void extract_user_token _((struct cparse_params *v,
_                 220 ext/racc/cparse/cparse.c static void shift _((struct cparse_params* v, long act, VALUE tok, VALUE val));
_                 221 ext/racc/cparse/cparse.c static int reduce _((struct cparse_params* v, long act));
_                 222 ext/racc/cparse/cparse.c static VALUE catch_iter _((VALUE dummy));
_                 223 ext/racc/cparse/cparse.c static VALUE reduce0 _((VALUE block_args, VALUE data, VALUE self));
_                  71 ext/readline/readline.c     buff = (char*)rb_protect((VALUE(*)_((VALUE)))readline, (VALUE)prompt,
_                  80 ext/sdbm/init.c static VALUE fsdbm_alloc _((VALUE));
_                 407 ext/sdbm/init.c static VALUE each_pair _((VALUE));
_                 416 ext/sdbm/init.c static VALUE fsdbm_store _((VALUE,VALUE,VALUE));
_                 544 ext/socket/socket.c static VALUE ipaddr _((struct sockaddr*, int));
_                 546 ext/socket/socket.c static VALUE unixaddr _((struct sockaddr_un*));
_                 656 ext/socket/socket.c NORETURN(static void raise_socket_error _((char *, int)));
_                1293 ext/socket/socket.c     VALUE (*ipaddr)_((struct sockaddr*, size_t));
_                1302 ext/socket/socket.c     VALUE (*ipaddr)_((struct sockaddr*, size_t)) = arg->ipaddr;
_                1344 ext/socket/socket.c     VALUE (*ipaddr)_((struct sockaddr*, size_t));
_                  31 ext/stringio/stringio.c static struct StringIO* strio_alloc _((void));
_                  32 ext/stringio/stringio.c static void strio_mark _((struct StringIO *));
_                  33 ext/stringio/stringio.c static void strio_free _((struct StringIO *));
_                  34 ext/stringio/stringio.c static struct StringIO* check_strio _((VALUE));
_                  35 ext/stringio/stringio.c static struct StringIO* get_strio _((VALUE));
_                  36 ext/stringio/stringio.c static struct StringIO* readable _((struct StringIO *));
_                  37 ext/stringio/stringio.c static struct StringIO* writable _((struct StringIO *));
_                  38 ext/stringio/stringio.c static void check_modifiable _((struct StringIO *));
_                 135 ext/stringio/stringio.c static VALUE strio_s_allocate _((VALUE));
_                 136 ext/stringio/stringio.c static VALUE strio_s_open _((int, VALUE *, VALUE));
_                 137 ext/stringio/stringio.c static VALUE strio_initialize _((int, VALUE *, VALUE));
_                 138 ext/stringio/stringio.c static VALUE strio_finalize _((VALUE));
_                 139 ext/stringio/stringio.c static VALUE strio_self _((VALUE));
_                 140 ext/stringio/stringio.c static VALUE strio_false _((VALUE));
_                 141 ext/stringio/stringio.c static VALUE strio_nil _((VALUE));
_                 142 ext/stringio/stringio.c static VALUE strio_0 _((VALUE));
_                 143 ext/stringio/stringio.c static VALUE strio_first _((VALUE, VALUE));
_                 144 ext/stringio/stringio.c static VALUE strio_unimpl _((int, VALUE *, VALUE));
_                 145 ext/stringio/stringio.c static VALUE strio_get_string _((VALUE));
_                 146 ext/stringio/stringio.c static VALUE strio_set_string _((VALUE, VALUE));
_                 147 ext/stringio/stringio.c static VALUE strio_close _((VALUE));
_                 148 ext/stringio/stringio.c static VALUE strio_close_read _((VALUE));
_                 149 ext/stringio/stringio.c static VALUE strio_close_write _((VALUE));
_                 150 ext/stringio/stringio.c static VALUE strio_closed _((VALUE));
_                 151 ext/stringio/stringio.c static VALUE strio_closed_read _((VALUE));
_                 152 ext/stringio/stringio.c static VALUE strio_closed_write _((VALUE));
_                 153 ext/stringio/stringio.c static VALUE strio_eof _((VALUE));
_                 154 ext/stringio/stringio.c static VALUE strio_get_lineno _((VALUE));
_                 155 ext/stringio/stringio.c static VALUE strio_set_lineno _((VALUE, VALUE));
_                 156 ext/stringio/stringio.c static VALUE strio_get_pos _((VALUE));
_                 157 ext/stringio/stringio.c static VALUE strio_set_pos _((VALUE, VALUE));
_                 158 ext/stringio/stringio.c static VALUE strio_rewind _((VALUE));
_                 159 ext/stringio/stringio.c static VALUE strio_seek _((int, VALUE *, VALUE));
_                 160 ext/stringio/stringio.c static VALUE strio_get_sync _((VALUE));
_                 161 ext/stringio/stringio.c static VALUE strio_each_byte _((VALUE));
_                 162 ext/stringio/stringio.c static VALUE strio_getc _((VALUE));
_                 163 ext/stringio/stringio.c static VALUE strio_ungetc _((VALUE, VALUE));
_                 164 ext/stringio/stringio.c static VALUE strio_readchar _((VALUE));
_                 165 ext/stringio/stringio.c static VALUE strio_getline _((int, VALUE *, struct StringIO *));
_                 166 ext/stringio/stringio.c static VALUE strio_gets _((int, VALUE *, VALUE));
_                 167 ext/stringio/stringio.c static VALUE strio_readline _((int, VALUE *, VALUE));
_                 168 ext/stringio/stringio.c static VALUE strio_each _((int, VALUE *, VALUE));
_                 169 ext/stringio/stringio.c static VALUE strio_readlines _((int, VALUE *, VALUE));
_                 170 ext/stringio/stringio.c static VALUE strio_write _((VALUE, VALUE));
_                 171 ext/stringio/stringio.c static VALUE strio_putc _((VALUE, VALUE));
_                 172 ext/stringio/stringio.c static VALUE strio_read _((int, VALUE *, VALUE));
_                 173 ext/stringio/stringio.c static VALUE strio_size _((VALUE));
_                 174 ext/stringio/stringio.c static VALUE strio_truncate _((VALUE, VALUE));
_                 175 ext/stringio/stringio.c void Init_stringio _((void));
_                 178 ext/stringio/stringio.c static void bm_init_skip _((long *, const char *, long));
_                 179 ext/stringio/stringio.c static long bm_search _((const char *, long, const char *, long, const long *));
_                  61 ext/strscan/strscan.c static VALUE infect _((VALUE str, struct strscanner *p));
_                  62 ext/strscan/strscan.c static VALUE extract_range _((struct strscanner *p, long beg_i, long end_i));
_                  63 ext/strscan/strscan.c static VALUE extract_beg_len _((struct strscanner *p, long beg_i, long len));
_                  65 ext/strscan/strscan.c void check_strscan _((VALUE obj));
_                  66 ext/strscan/strscan.c static void strscan_mark _((struct strscanner *p));
_                  67 ext/strscan/strscan.c static void strscan_free _((struct strscanner *p));
_                  68 ext/strscan/strscan.c static VALUE strscan_s_allocate _((VALUE klass));
_                  69 ext/strscan/strscan.c static VALUE strscan_initialize _((int argc, VALUE *argv, VALUE self));
_                  70 ext/strscan/strscan.c static VALUE strscan_init_copy _((VALUE vself, VALUE vorig));
_                  72 ext/strscan/strscan.c static VALUE strscan_s_mustc _((VALUE self));
_                  73 ext/strscan/strscan.c static VALUE strscan_terminate _((VALUE self));
_                  74 ext/strscan/strscan.c static VALUE strscan_clear _((VALUE self));
_                  75 ext/strscan/strscan.c static VALUE strscan_get_string _((VALUE self));
_                  76 ext/strscan/strscan.c static VALUE strscan_set_string _((VALUE self, VALUE str));
_                  77 ext/strscan/strscan.c static VALUE strscan_concat _((VALUE self, VALUE str));
_                  78 ext/strscan/strscan.c static VALUE strscan_get_pos _((VALUE self));
_                  79 ext/strscan/strscan.c static VALUE strscan_set_pos _((VALUE self, VALUE pos));
_                  80 ext/strscan/strscan.c static VALUE strscan_do_scan _((VALUE self, VALUE regex,
_                  82 ext/strscan/strscan.c static VALUE strscan_scan _((VALUE self, VALUE re));
_                  83 ext/strscan/strscan.c static VALUE strscan_match_p _((VALUE self, VALUE re));
_                  84 ext/strscan/strscan.c static VALUE strscan_skip _((VALUE self, VALUE re));
_                  85 ext/strscan/strscan.c static VALUE strscan_check _((VALUE self, VALUE re));
_                  86 ext/strscan/strscan.c static VALUE strscan_scan_full _((VALUE self, VALUE re,
_                  88 ext/strscan/strscan.c static VALUE strscan_scan_until _((VALUE self, VALUE re));
_                  89 ext/strscan/strscan.c static VALUE strscan_skip_until _((VALUE self, VALUE re));
_                  90 ext/strscan/strscan.c static VALUE strscan_check_until _((VALUE self, VALUE re));
_                  91 ext/strscan/strscan.c static VALUE strscan_search_full _((VALUE self, VALUE re,
_                  93 ext/strscan/strscan.c static void adjust_registers_to_matched _((struct strscanner *p));
_                  94 ext/strscan/strscan.c static VALUE strscan_getch _((VALUE self));
_                  95 ext/strscan/strscan.c static VALUE strscan_get_byte _((VALUE self));
_                  96 ext/strscan/strscan.c static VALUE strscan_getbyte _((VALUE self));
_                  97 ext/strscan/strscan.c static VALUE strscan_peek _((VALUE self, VALUE len));
_                  98 ext/strscan/strscan.c static VALUE strscan_peep _((VALUE self, VALUE len));
_                  99 ext/strscan/strscan.c static VALUE strscan_unscan _((VALUE self));
_                 100 ext/strscan/strscan.c static VALUE strscan_bol_p _((VALUE self));
_                 101 ext/strscan/strscan.c static VALUE strscan_eos_p _((VALUE self));
_                 102 ext/strscan/strscan.c static VALUE strscan_empty_p _((VALUE self));
_                 103 ext/strscan/strscan.c static VALUE strscan_rest_p _((VALUE self));
_                 104 ext/strscan/strscan.c static VALUE strscan_matched_p _((VALUE self));
_                 105 ext/strscan/strscan.c static VALUE strscan_matched _((VALUE self));
_                 106 ext/strscan/strscan.c static VALUE strscan_matched_size _((VALUE self));
_                 107 ext/strscan/strscan.c static VALUE strscan_aref _((VALUE self, VALUE idx));
_                 108 ext/strscan/strscan.c static VALUE strscan_pre_match _((VALUE self));
_                 109 ext/strscan/strscan.c static VALUE strscan_post_match _((VALUE self));
_                 110 ext/strscan/strscan.c static VALUE strscan_rest _((VALUE self));
_                 111 ext/strscan/strscan.c static VALUE strscan_rest_size _((VALUE self));
_                 113 ext/strscan/strscan.c static VALUE strscan_inspect _((VALUE self));
_                 114 ext/strscan/strscan.c static VALUE inspect1 _((struct strscanner *p));
_                 115 ext/strscan/strscan.c static VALUE inspect2 _((struct strscanner *p));
_                  73 ext/syck/rubyext.c SYMID rb_syck_load_handler _((SyckParser *, SyckNode *));
_                  74 ext/syck/rubyext.c void rb_syck_err_handler _((SyckParser *, char *));
_                  75 ext/syck/rubyext.c SyckNode * rb_syck_bad_anchor_handler _((SyckParser *, char *));
_                  76 ext/syck/rubyext.c void rb_syck_output_handler _((SyckEmitter *, char *, long));
_                  77 ext/syck/rubyext.c void rb_syck_emitter_handler _((SyckEmitter *, st_data_t));
_                  78 ext/syck/rubyext.c int syck_parser_assign_io _((SyckParser *, VALUE *));
_                  79 ext/syck/rubyext.c VALUE syck_scalar_alloc _((VALUE class));
_                  80 ext/syck/rubyext.c VALUE syck_seq_alloc _((VALUE class));
_                  81 ext/syck/rubyext.c VALUE syck_map_alloc _((VALUE class));
_                 753 ext/syck/rubyext.c VALUE syck_parser_s_alloc _((VALUE));
_                1941 ext/syck/rubyext.c VALUE syck_emitter_s_alloc _((VALUE));
_                  82 ext/tk/tcltklib.c static void ip_finalize _((Tcl_Interp*));
_                 120 ext/tk/tcltklib.c static VALUE ip_invoke_real _((int, VALUE*, VALUE));
_                 121 ext/tk/tcltklib.c static VALUE ip_invoke _((int, VALUE*, VALUE));
_                 123 ext/tk/tcltklib.c static VALUE tk_funcall _((VALUE(), int, VALUE*, VALUE));
_                 348 ext/tk/tcltklib.c static int ip_ruby_eval _((ClientData, Tcl_Interp *, int, Tcl_Obj *CONST*));
_                 349 ext/tk/tcltklib.c static int ip_ruby_cmd _((ClientData, Tcl_Interp *, int, Tcl_Obj *CONST*));
_                 351 ext/tk/tcltklib.c static int ip_ruby_eval _((ClientData, Tcl_Interp *, int, char **));
_                 352 ext/tk/tcltklib.c static int ip_ruby_cmd _((ClientData, Tcl_Interp *, int, char **));
_                 380 ext/tk/tcltklib.c EXTERN Tcl_Namespace *  Tcl_GetCurrentNamespace _((Tcl_Interp *));
_                 391 ext/tk/tcltklib.c     Tcl_Namespace * (*tcl_GetCurrentNamespace) _((Tcl_Interp *));
_                 436 ext/tk/tcltklib.c EXTERN int  TclGetFrame _((Tcl_Interp *, CONST char *, CallFrame **));
_                 447 ext/tk/tcltklib.c     int (*tclGetFrame) _((Tcl_Interp *, CONST char *, CallFrame **));
_                 455 ext/tk/tcltklib.c EXTERN void Tcl_PopCallFrame _((Tcl_Interp *));
_                 456 ext/tk/tcltklib.c EXTERN int  Tcl_PushCallFrame _((Tcl_Interp *, Tcl_CallFrame *, Tcl_Namespace *, int));
_                 467 ext/tk/tcltklib.c     void (*tcl_PopCallFrame) _((Tcl_Interp *));
_                 468 ext/tk/tcltklib.c     int  (*tcl_PushCallFrame) _((Tcl_Interp *, Tcl_CallFrame *, Tcl_Namespace *, int));
_                 494 ext/tk/tcltklib.c EXTERN int  TclGetFrame _((Tcl_Interp *, CONST char *, CallFrame **));
_                 912 ext/tk/tcltklib.c static void _timer_for_tcl _((ClientData));
_                2757 ext/tk/tcltklib.c static int ip_rbUpdateObjCmd _((ClientData, Tcl_Interp *, int,
_                2766 ext/tk/tcltklib.c static int ip_rbUpdateCommand _((ClientData, Tcl_Interp *, int, char *[]));
_                2887 ext/tk/tcltklib.c static void rb_threadUpdateProc _((ClientData));
_                2902 ext/tk/tcltklib.c static int ip_rb_threadUpdateObjCmd _((ClientData, Tcl_Interp *, int,
_                2911 ext/tk/tcltklib.c static int ip_rb_threadUpdateCommand _((ClientData, Tcl_Interp *, int,
_                3024 ext/tk/tcltklib.c static int ip_rbVwaitObjCmd _((ClientData, Tcl_Interp *, int,
_                3026 ext/tk/tcltklib.c static int ip_rb_threadVwaitObjCmd _((ClientData, Tcl_Interp *, int,
_                3028 ext/tk/tcltklib.c static int ip_rbTkWaitObjCmd _((ClientData, Tcl_Interp *, int,
_                3030 ext/tk/tcltklib.c static int ip_rb_threadTkWaitObjCmd _((ClientData, Tcl_Interp *, int,
_                3033 ext/tk/tcltklib.c static int ip_rbVwaitCommand _((ClientData, Tcl_Interp *, int, char *[]));
_                3034 ext/tk/tcltklib.c static int ip_rb_threadVwaitCommand _((ClientData, Tcl_Interp *, int,
_                3036 ext/tk/tcltklib.c static int ip_rbTkWaitCommand _((ClientData, Tcl_Interp *, int, char *[]));
_                3037 ext/tk/tcltklib.c static int ip_rb_threadTkWaitCommand _((ClientData, Tcl_Interp *, int,
_                3042 ext/tk/tcltklib.c static char *VwaitVarProc _((ClientData, Tcl_Interp *,
_                3052 ext/tk/tcltklib.c static char *VwaitVarProc _((ClientData, Tcl_Interp *, char *, char *, int));
_                3248 ext/tk/tcltklib.c static char *WaitVariableProc _((ClientData, Tcl_Interp *,
_                3258 ext/tk/tcltklib.c static char *WaitVariableProc _((ClientData, Tcl_Interp *,
_                3275 ext/tk/tcltklib.c static void WaitVisibilityProc _((ClientData, XEvent *));
_                3291 ext/tk/tcltklib.c static void WaitWindowProc _((ClientData, XEvent *));
_                3678 ext/tk/tcltklib.c static char *rb_threadVwaitProc _((ClientData, Tcl_Interp *,
_                3688 ext/tk/tcltklib.c static char *rb_threadVwaitProc _((ClientData, Tcl_Interp *,
_                3714 ext/tk/tcltklib.c static void rb_threadWaitVisibilityProc _((ClientData, XEvent *));
_                3731 ext/tk/tcltklib.c static void rb_threadWaitWindowProc _((ClientData, XEvent *));
_                4480 ext/tk/tcltklib.c static VALUE ip_alloc _((VALUE));
_                4563 ext/tk/tcltklib.c static int ip_rbNamespaceObjCmd _((ClientData, Tcl_Interp *, int,
_                5014 ext/tk/tcltklib.c EXTERN void TkConsoleCreate _((void));
_                5021 ext/tk/tcltklib.c EXTERN void TkConsoleCreate_ _((void));
_                5397 ext/tk/tcltklib.c static int call_queue_handler _((Tcl_Event *, int));
_                5723 ext/tk/tcltklib.c int eval_queue_handler _((Tcl_Event *, int));
_                6798 ext/tk/tcltklib.c int invoke_queue_handler _((Tcl_Event *, int));
_                 227 ext/tk/tkutil/tkutil.c static VALUE get_eval_string_core _((VALUE, VALUE, VALUE));
_                 228 ext/tk/tkutil/tkutil.c static VALUE ary2list _((VALUE, VALUE, VALUE));
_                 229 ext/tk/tkutil/tkutil.c static VALUE ary2list2 _((VALUE, VALUE, VALUE));
_                 230 ext/tk/tkutil/tkutil.c static VALUE hash2list _((VALUE, VALUE));
_                 231 ext/tk/tkutil/tkutil.c static VALUE hash2list_enc _((VALUE, VALUE));
_                 232 ext/tk/tkutil/tkutil.c static VALUE hash2kv _((VALUE, VALUE, VALUE));
_                 233 ext/tk/tkutil/tkutil.c static VALUE hash2kv_enc _((VALUE, VALUE, VALUE));
_                 203 ext/win32ole/win32ole.c static VALUE folemethod_s_allocate _((VALUE));
_                 204 ext/win32ole/win32ole.c static VALUE olemethod_set_member _((VALUE, ITypeInfo *, ITypeInfo *, int, VALUE));
_                 205 ext/win32ole/win32ole.c static VALUE foletype_s_allocate _((VALUE));
_                 206 ext/win32ole/win32ole.c static VALUE oletype_set_member  _((VALUE, ITypeInfo *, VALUE));
_                 207 ext/win32ole/win32ole.c static VALUE olemethod_from_typeinfo _((VALUE, ITypeInfo *, VALUE));
_                 208 ext/win32ole/win32ole.c static HRESULT ole_docinfo_from_type _((ITypeInfo *, BSTR *, BSTR *, DWORD *, BSTR *));
_                1059 ext/win32ole/win32ole.c static VALUE fole_s_allocate _((VALUE));
_                6650 ext/win32ole/win32ole.c static VALUE fev_s_allocate _((VALUE));
_                6850 ext/win32ole/win32ole.c static VALUE folevariant_s_allocate _((VALUE));
_                  34 ext/zlib/zlib.c static NORETURN(void raise_zlib_error _((int, const char *)));
_                  35 ext/zlib/zlib.c static VALUE rb_zlib_version _((VALUE));
_                  36 ext/zlib/zlib.c static VALUE do_checksum _((int, VALUE*, uLong (*) _((uLong, const Bytef*, uInt))));
_                  37 ext/zlib/zlib.c static VALUE rb_zlib_adler32 _((int, VALUE*, VALUE));
_                  38 ext/zlib/zlib.c static VALUE rb_zlib_crc32 _((int, VALUE*, VALUE));
_                  39 ext/zlib/zlib.c static VALUE rb_zlib_crc_table _((VALUE));
_                  40 ext/zlib/zlib.c static voidpf zlib_mem_alloc _((voidpf, uInt, uInt));
_                  41 ext/zlib/zlib.c static void zlib_mem_free _((voidpf, voidpf));
_                  45 ext/zlib/zlib.c static void zstream_init _((struct zstream*, const struct zstream_funcs *));
_                  46 ext/zlib/zlib.c static void zstream_expand_buffer _((struct zstream*));
_                  47 ext/zlib/zlib.c static void zstream_expand_buffer_into _((struct zstream*, int));
_                  48 ext/zlib/zlib.c static void zstream_append_buffer _((struct zstream*, const char*, int));
_                  49 ext/zlib/zlib.c static VALUE zstream_detach_buffer _((struct zstream*));
_                  50 ext/zlib/zlib.c static VALUE zstream_shift_buffer _((struct zstream*, int));
_                  51 ext/zlib/zlib.c static void zstream_buffer_ungetc _((struct zstream*, int));
_                  52 ext/zlib/zlib.c static void zstream_append_input _((struct zstream*, const char*, unsigned int));
_                  53 ext/zlib/zlib.c static void zstream_discard_input _((struct zstream*, unsigned int));
_                  54 ext/zlib/zlib.c static void zstream_reset_input _((struct zstream*));
_                  55 ext/zlib/zlib.c static void zstream_passthrough_input _((struct zstream*));
_                  56 ext/zlib/zlib.c static VALUE zstream_detach_input _((struct zstream*));
_                  57 ext/zlib/zlib.c static void zstream_reset _((struct zstream*));
_                  58 ext/zlib/zlib.c static VALUE zstream_end _((struct zstream*));
_                  59 ext/zlib/zlib.c static void zstream_run _((struct zstream*, Bytef*, uInt, int));
_                  60 ext/zlib/zlib.c static VALUE zstream_sync _((struct zstream*, Bytef*, uInt));
_                  61 ext/zlib/zlib.c static void zstream_mark _((struct zstream*));
_                  62 ext/zlib/zlib.c static void zstream_free _((struct zstream*));
_                  63 ext/zlib/zlib.c static VALUE zstream_new _((VALUE, const struct zstream_funcs*));
_                  64 ext/zlib/zlib.c static struct zstream *get_zstream _((VALUE));
_                  66 ext/zlib/zlib.c static VALUE rb_zstream_end _((VALUE));
_                  67 ext/zlib/zlib.c static VALUE rb_zstream_reset _((VALUE));
_                  68 ext/zlib/zlib.c static VALUE rb_zstream_finish _((VALUE));
_                  69 ext/zlib/zlib.c static VALUE rb_zstream_flush_next_in _((VALUE));
_                  70 ext/zlib/zlib.c static VALUE rb_zstream_flush_next_out _((VALUE));
_                  71 ext/zlib/zlib.c static VALUE rb_zstream_avail_out _((VALUE));
_                  72 ext/zlib/zlib.c static VALUE rb_zstream_set_avail_out _((VALUE, VALUE));
_                  73 ext/zlib/zlib.c static VALUE rb_zstream_avail_in _((VALUE));
_                  74 ext/zlib/zlib.c static VALUE rb_zstream_total_in _((VALUE));
_                  75 ext/zlib/zlib.c static VALUE rb_zstream_total_out _((VALUE));
_                  76 ext/zlib/zlib.c static VALUE rb_zstream_data_type _((VALUE));
_                  77 ext/zlib/zlib.c static VALUE rb_zstream_adler _((VALUE));
_                  78 ext/zlib/zlib.c static VALUE rb_zstream_finished_p _((VALUE));
_                  79 ext/zlib/zlib.c static VALUE rb_zstream_closed_p _((VALUE));
_                  81 ext/zlib/zlib.c static VALUE rb_deflate_s_allocate _((VALUE));
_                  82 ext/zlib/zlib.c static VALUE rb_deflate_initialize _((int, VALUE*, VALUE));
_                  83 ext/zlib/zlib.c static VALUE rb_deflate_init_copy _((VALUE, VALUE));
_                  84 ext/zlib/zlib.c static VALUE deflate_run _((VALUE));
_                  85 ext/zlib/zlib.c static VALUE rb_deflate_s_deflate _((int, VALUE*, VALUE));
_                  86 ext/zlib/zlib.c static void do_deflate _((struct zstream*, VALUE, int));
_                  87 ext/zlib/zlib.c static VALUE rb_deflate_deflate _((int, VALUE*, VALUE));
_                  88 ext/zlib/zlib.c static VALUE rb_deflate_addstr _((VALUE, VALUE));
_                  89 ext/zlib/zlib.c static VALUE rb_deflate_flush _((int, VALUE*, VALUE));
_                  90 ext/zlib/zlib.c static VALUE rb_deflate_params _((VALUE, VALUE, VALUE));
_                  91 ext/zlib/zlib.c static VALUE rb_deflate_set_dictionary _((VALUE, VALUE));
_                  93 ext/zlib/zlib.c static VALUE inflate_run _((VALUE));
_                  94 ext/zlib/zlib.c static VALUE rb_inflate_s_allocate _((VALUE));
_                  95 ext/zlib/zlib.c static VALUE rb_inflate_initialize _((int, VALUE*, VALUE));
_                  96 ext/zlib/zlib.c static VALUE rb_inflate_s_inflate _((VALUE, VALUE));
_                  97 ext/zlib/zlib.c static void do_inflate _((struct zstream*, VALUE));
_                  98 ext/zlib/zlib.c static VALUE rb_inflate_inflate _((VALUE, VALUE));
_                  99 ext/zlib/zlib.c static VALUE rb_inflate_addstr _((VALUE, VALUE));
_                 100 ext/zlib/zlib.c static VALUE rb_inflate_sync _((VALUE, VALUE));
_                 101 ext/zlib/zlib.c static VALUE rb_inflate_sync_point_p _((VALUE));
_                 102 ext/zlib/zlib.c static VALUE rb_inflate_set_dictionary _((VALUE, VALUE));
_                 106 ext/zlib/zlib.c static void gzfile_mark _((struct gzfile*));
_                 107 ext/zlib/zlib.c static void gzfile_free _((struct gzfile*));
_                 108 ext/zlib/zlib.c static VALUE gzfile_new _((VALUE, const struct zstream_funcs*, void (*) _((struct gzfile*))));
_                 109 ext/zlib/zlib.c static void gzfile_reset _((struct gzfile*));
_                 110 ext/zlib/zlib.c static void gzfile_close _((struct gzfile*, int));
_                 111 ext/zlib/zlib.c static void gzfile_write_raw _((struct gzfile*));
_                 112 ext/zlib/zlib.c static VALUE gzfile_read_raw_partial _((VALUE));
_                 113 ext/zlib/zlib.c static VALUE gzfile_read_raw_rescue _((VALUE));
_                 114 ext/zlib/zlib.c static VALUE gzfile_read_raw _((struct gzfile*));
_                 115 ext/zlib/zlib.c static int gzfile_read_raw_ensure _((struct gzfile*, int));
_                 116 ext/zlib/zlib.c static char *gzfile_read_raw_until_zero _((struct gzfile*, long));
_                 117 ext/zlib/zlib.c static unsigned int gzfile_get16 _((const unsigned char*));
_                 118 ext/zlib/zlib.c static unsigned long gzfile_get32 _((const unsigned char*));
_                 119 ext/zlib/zlib.c static void gzfile_set32 _((unsigned long n, unsigned char*));
_                 120 ext/zlib/zlib.c static void gzfile_make_header _((struct gzfile*));
_                 121 ext/zlib/zlib.c static void gzfile_make_footer _((struct gzfile*));
_                 122 ext/zlib/zlib.c static void gzfile_read_header _((struct gzfile*));
_                 123 ext/zlib/zlib.c static void gzfile_check_footer _((struct gzfile*));
_                 124 ext/zlib/zlib.c static void gzfile_write _((struct gzfile*, Bytef*, uInt));
_                 125 ext/zlib/zlib.c static long gzfile_read_more _((struct gzfile*));
_                 126 ext/zlib/zlib.c static void gzfile_calc_crc _((struct gzfile*, VALUE));
_                 127 ext/zlib/zlib.c static VALUE gzfile_read _((struct gzfile*, int));
_                 128 ext/zlib/zlib.c static VALUE gzfile_read_all _((struct gzfile*));
_                 129 ext/zlib/zlib.c static void gzfile_ungetc _((struct gzfile*, int));
_                 130 ext/zlib/zlib.c static VALUE gzfile_finalize _((VALUE));
_                 131 ext/zlib/zlib.c static void gzfile_writer_end _((struct gzfile*));
_                 132 ext/zlib/zlib.c static void gzfile_reader_end _((struct gzfile*));
_                 133 ext/zlib/zlib.c static void gzfile_reader_rewind _((struct gzfile*));
_                 134 ext/zlib/zlib.c static VALUE gzfile_reader_get_unused _((struct gzfile*));
_                 135 ext/zlib/zlib.c static struct gzfile *get_gzfile _((VALUE));
_                 136 ext/zlib/zlib.c static VALUE gzfile_ensure_close _((VALUE));
_                 137 ext/zlib/zlib.c static VALUE rb_gzfile_s_wrap _((int, VALUE*, VALUE));
_                 138 ext/zlib/zlib.c static VALUE gzfile_s_open _((int, VALUE*, VALUE, const char*));
_                 140 ext/zlib/zlib.c static VALUE rb_gzfile_to_io _((VALUE));
_                 141 ext/zlib/zlib.c static VALUE rb_gzfile_crc _((VALUE));
_                 142 ext/zlib/zlib.c static VALUE rb_gzfile_mtime _((VALUE));
_                 143 ext/zlib/zlib.c static VALUE rb_gzfile_level _((VALUE));
_                 144 ext/zlib/zlib.c static VALUE rb_gzfile_os_code _((VALUE));
_                 145 ext/zlib/zlib.c static VALUE rb_gzfile_orig_name _((VALUE));
_                 146 ext/zlib/zlib.c static VALUE rb_gzfile_comment _((VALUE));
_                 147 ext/zlib/zlib.c static VALUE rb_gzfile_lineno _((VALUE));
_                 148 ext/zlib/zlib.c static VALUE rb_gzfile_set_lineno _((VALUE, VALUE));
_                 149 ext/zlib/zlib.c static VALUE rb_gzfile_set_mtime _((VALUE, VALUE));
_                 150 ext/zlib/zlib.c static VALUE rb_gzfile_set_orig_name _((VALUE, VALUE));
_                 151 ext/zlib/zlib.c static VALUE rb_gzfile_set_comment _((VALUE, VALUE));
_                 152 ext/zlib/zlib.c static VALUE rb_gzfile_close _((VALUE));
_                 153 ext/zlib/zlib.c static VALUE rb_gzfile_finish _((VALUE));
_                 154 ext/zlib/zlib.c static VALUE rb_gzfile_closed_p _((VALUE));
_                 155 ext/zlib/zlib.c static VALUE rb_gzfile_eof_p _((VALUE));
_                 156 ext/zlib/zlib.c static VALUE rb_gzfile_sync _((VALUE));
_                 157 ext/zlib/zlib.c static VALUE rb_gzfile_set_sync _((VALUE, VALUE));
_                 158 ext/zlib/zlib.c static VALUE rb_gzfile_total_in _((VALUE));
_                 159 ext/zlib/zlib.c static VALUE rb_gzfile_total_out _((VALUE));
_                 161 ext/zlib/zlib.c static VALUE rb_gzwriter_s_allocate _((VALUE));
_                 162 ext/zlib/zlib.c static VALUE rb_gzwriter_s_open _((int, VALUE*, VALUE));
_                 163 ext/zlib/zlib.c static VALUE rb_gzwriter_initialize _((int, VALUE*, VALUE));
_                 164 ext/zlib/zlib.c static VALUE rb_gzwriter_flush _((int, VALUE*, VALUE));
_                 165 ext/zlib/zlib.c static VALUE rb_gzwriter_write _((VALUE, VALUE));
_                 166 ext/zlib/zlib.c static VALUE rb_gzwriter_putc _((VALUE, VALUE));
_                 168 ext/zlib/zlib.c static VALUE rb_gzreader_s_allocate _((VALUE));
_                 169 ext/zlib/zlib.c static VALUE rb_gzreader_s_open _((int, VALUE*, VALUE));
_                 170 ext/zlib/zlib.c static VALUE rb_gzreader_initialize _((VALUE, VALUE));
_                 171 ext/zlib/zlib.c static VALUE rb_gzreader_rewind _((VALUE));
_                 172 ext/zlib/zlib.c static VALUE rb_gzreader_unused _((VALUE));
_                 173 ext/zlib/zlib.c static VALUE rb_gzreader_read _((int, VALUE*, VALUE));
_                 174 ext/zlib/zlib.c static VALUE rb_gzreader_getc _((VALUE));
_                 175 ext/zlib/zlib.c static VALUE rb_gzreader_readchar _((VALUE));
_                 176 ext/zlib/zlib.c static VALUE rb_gzreader_each_byte _((VALUE));
_                 177 ext/zlib/zlib.c static VALUE rb_gzreader_ungetc _((VALUE, VALUE));
_                 178 ext/zlib/zlib.c static void gzreader_skip_linebreaks _((struct gzfile*));
_                 179 ext/zlib/zlib.c static VALUE gzreader_gets _((int, VALUE*, VALUE));
_                 180 ext/zlib/zlib.c static VALUE rb_gzreader_gets _((int, VALUE*, VALUE));
_                 181 ext/zlib/zlib.c static VALUE rb_gzreader_readline _((int, VALUE*, VALUE));
_                 182 ext/zlib/zlib.c static VALUE rb_gzreader_each _((int, VALUE*, VALUE));
_                 183 ext/zlib/zlib.c static VALUE rb_gzreader_readlines _((int, VALUE*, VALUE));
_                 187 ext/zlib/zlib.c void Init_zlib _((void));
_                 265 ext/zlib/zlib.c     uLong (*func) _((uLong, const Bytef *, uInt));
_                 359 ext/zlib/zlib.c 	int (*reset) _((z_streamp));
_                 360 ext/zlib/zlib.c 	int (*end) _((z_streamp));
_                 361 ext/zlib/zlib.c 	int (*run) _((z_streamp, int));
_                1764 ext/zlib/zlib.c     void (*endfunc) _((struct gzfile *));
_                  30 st.h           #ifndef _
_                  16 util.h         #ifndef _


_ASCII

_ASCII            244 ext/nkf/nkf.c        code = _ASCII;
_ASCII            282 ext/nkf/nkf.c    rb_define_const(mKconv, "ASCII", INT2FIX(_ASCII));


_AUTO

_AUTO              30 ext/nkf/nkf.c  #define	_UNKNOWN	_AUTO
_AUTO             276 ext/nkf/nkf.c    rb_define_const(mKconv, "AUTO", INT2FIX(_AUTO));


_BINARY

_BINARY           161 ext/nkf/nkf.c        return INT2FIX(_BINARY);
_BINARY           226 ext/nkf/nkf.c    int code = _BINARY;
_BINARY           280 ext/nkf/nkf.c    rb_define_const(mKconv, "BINARY", INT2FIX(_BINARY));


_BSD_VA_LIST_

_BSD_VA_LIST_      87 missing/vsnprintf.c #ifndef _BSD_VA_LIST_
_BSD_VA_LIST_    1091 missing/vsnprintf.c 	_BSD_VA_LIST_ ap;


_CRTIMP

_CRTIMP          1597 win32/win32.c  #if !defined _CRTIMP || defined __MINGW32__
_CRTIMP          1603 win32/win32.c  EXTERN_C _CRTIMP ioinfo * __pioinfo[];


_DAY_SEC

_DAY_SEC           17 wince/time.h   #define _YEAR_SEC          (365L * _DAY_SEC)    /* secs in a year */
_DAY_SEC           18 wince/time.h   #define _FOUR_YEAR_SEC     (1461L * _DAY_SEC)   /* secs in a 4 year interval */


_DIAGASSERT

_DIAGASSERT        46 ext/digest/rmd160/rmd160.c #ifndef _DIAGASSERT
_DIAGASSERT       131 ext/digest/rmd160/rmd160.c 	_DIAGASSERT(context != NULL);
_DIAGASSERT       151 ext/digest/rmd160/rmd160.c 	_DIAGASSERT(state != NULL);
_DIAGASSERT       152 ext/digest/rmd160/rmd160.c 	_DIAGASSERT(block != NULL);
_DIAGASSERT       361 ext/digest/rmd160/rmd160.c 	_DIAGASSERT(context != NULL);
_DIAGASSERT       362 ext/digest/rmd160/rmd160.c 	_DIAGASSERT(data != NULL);
_DIAGASSERT       420 ext/digest/rmd160/rmd160.c 	_DIAGASSERT(digest != NULL);
_DIAGASSERT       421 ext/digest/rmd160/rmd160.c 	_DIAGASSERT(context != NULL);
_DIAGASSERT        33 ext/digest/rmd160/rmd160hl.c #ifndef _DIAGASSERT
_DIAGASSERT        46 ext/digest/rmd160/rmd160hl.c     _DIAGASSERT(ctx != NULL);
_DIAGASSERT        68 ext/digest/rmd160/rmd160hl.c     _DIAGASSERT(filename != NULL);
_DIAGASSERT        90 ext/digest/rmd160/rmd160hl.c     _DIAGASSERT(data != NULL);
_DIAGASSERT         8 ext/digest/rmd160/rmd160ossl.c #ifndef _DIAGASSERT
_DIAGASSERT        20 ext/digest/rmd160/rmd160ossl.c     _DIAGASSERT(ctx != NULL);
_DIAGASSERT        34 ext/digest/sha1/sha1.c #ifndef _DIAGASSERT
_DIAGASSERT       143 ext/digest/sha1/sha1.c     _DIAGASSERT(buffer != 0);
_DIAGASSERT       144 ext/digest/sha1/sha1.c     _DIAGASSERT(state != 0);
_DIAGASSERT       208 ext/digest/sha1/sha1.c     _DIAGASSERT(context != 0);
_DIAGASSERT       230 ext/digest/sha1/sha1.c     _DIAGASSERT(context != 0);
_DIAGASSERT       231 ext/digest/sha1/sha1.c     _DIAGASSERT(data != 0);
_DIAGASSERT       260 ext/digest/sha1/sha1.c     _DIAGASSERT(digest != 0);
_DIAGASSERT       261 ext/digest/sha1/sha1.c     _DIAGASSERT(context != 0);
_DIAGASSERT        31 ext/digest/sha1/sha1hl.c #ifndef _DIAGASSERT
_DIAGASSERT        47 ext/digest/sha1/sha1hl.c     _DIAGASSERT(ctx != NULL);
_DIAGASSERT        71 ext/digest/sha1/sha1hl.c     _DIAGASSERT(filename != NULL);
_DIAGASSERT        96 ext/digest/sha1/sha1hl.c     _DIAGASSERT(data != NULL);
_DIAGASSERT         8 ext/digest/sha1/sha1ossl.c #ifndef _DIAGASSERT
_DIAGASSERT        20 ext/digest/sha1/sha1ossl.c     _DIAGASSERT(ctx != NULL);
_DIAGASSERT        63 ext/digest/sha2/sha2hl.c #ifndef _DIAGASSERT
_DIAGASSERT        80 ext/digest/sha2/sha2hl.c 	_DIAGASSERT(filename != NULL);
_DIAGASSERT       141 ext/digest/sha2/sha2hl.c 	_DIAGASSERT(filename != NULL);
_DIAGASSERT       201 ext/digest/sha2/sha2hl.c 	_DIAGASSERT(filename != NULL);


_EUC

_EUC              149 ext/nkf/nkf.c  	  return INT2FIX(_EUC);\
_EUC              179 ext/nkf/nkf.c  	return INT2FIX(_EUC);
_EUC              187 ext/nkf/nkf.c  	      return INT2FIX(_EUC);
_EUC              198 ext/nkf/nkf.c        return INT2FIX(_EUC);
_EUC              207 ext/nkf/nkf.c  	return INT2FIX(_EUC);
_EUC              248 ext/nkf/nkf.c        code = _EUC;
_EUC              278 ext/nkf/nkf.c    rb_define_const(mKconv, "EUC", INT2FIX(_EUC));


_HAVE_SANE_QUAD_

_HAVE_SANE_QUAD_  459 missing/vsnprintf.c #ifdef _HAVE_SANE_QUAD_
_HAVE_SANE_QUAD_  491 missing/vsnprintf.c #ifdef _HAVE_SANE_QUAD_
_HAVE_SANE_QUAD_  663 missing/vsnprintf.c #ifdef _HAVE_SANE_QUAD_
_HAVE_SANE_QUAD_  678 missing/vsnprintf.c #ifdef _HAVE_SANE_QUAD_
_HAVE_SANE_QUAD_  759 missing/vsnprintf.c #ifdef _HAVE_SANE_QUAD_
_HAVE_SANE_QUAD_  776 missing/vsnprintf.c #ifdef _HAVE_SANE_QUAD_
_HAVE_SANE_QUAD_  798 missing/vsnprintf.c #ifdef _HAVE_SANE_QUAD_
_HAVE_SANE_QUAD_  833 missing/vsnprintf.c #ifdef _HAVE_SANE_QUAD_
_HAVE_SANE_QUAD_  847 missing/vsnprintf.c #ifdef _HAVE_SANE_QUAD_
_HAVE_SANE_QUAD_  856 missing/vsnprintf.c #ifdef _HAVE_SANE_QUAD_
_HAVE_SANE_QUAD_  879 missing/vsnprintf.c #ifdef _HAVE_SANE_QUAD_


_JIS

_JIS              158 ext/nkf/nkf.c        return INT2FIX(_JIS);
_JIS              246 ext/nkf/nkf.c        code = _JIS;
_JIS              277 ext/nkf/nkf.c    rb_define_const(mKconv, "JIS", INT2FIX(_JIS));


_O_CREAT

_O_CREAT           34 wince/fcntl.h  #define O_CREAT         _O_CREAT
_O_CREAT           66 wince/io_wce.c 	if( (mode&_O_CREAT) != 0 )


_O_RDONLY

_O_RDONLY         707 win32/win32.c  	pipemode = _O_RDONLY;
_O_RDONLY          27 wince/fcntl.h  #define O_RDONLY        _O_RDONLY
_O_RDONLY          61 wince/io_wce.c 	else if( (mode&_O_RDONLY) != 0 )


_O_RDWR

_O_RDWR           697 win32/win32.c  	pipemode = _O_RDWR;
_O_RDWR            29 wince/fcntl.h  #define O_RDWR          _O_RDWR
_O_RDWR            59 wince/io_wce.c 	if( (mode&_O_RDWR) != 0 )


_O_WRONLY

_O_WRONLY         702 win32/win32.c  	pipemode = _O_WRONLY;
_O_WRONLY          28 wince/fcntl.h  #define O_WRONLY        _O_WRONLY
_O_WRONLY          63 wince/io_wce.c 	else if( (mode&_O_WRONLY) != 0 )


_PASSWORD_EFMT1

_PASSWORD_EFMT1    45 missing/crypt.c #ifndef _PASSWORD_EFMT1
_PASSWORD_EFMT1   502 missing/crypt.c 	case _PASSWORD_EFMT1:


_POSIX_FD_SETSIZE

_POSIX_FD_SETSIZE   35 x68/select.c   #ifndef _POSIX_FD_SETSIZE
_POSIX_FD_SETSIZE   47 x68/select.c     if (fds > _POSIX_FD_SETSIZE)


_SJIS

_SJIS             164 ext/nkf/nkf.c        return INT2FIX(_SJIS);
_SJIS             167 ext/nkf/nkf.c        return INT2FIX(_SJIS);
_SJIS             174 ext/nkf/nkf.c  	return INT2FIX(_SJIS);
_SJIS             184 ext/nkf/nkf.c  	      return INT2FIX(_SJIS);
_SJIS             194 ext/nkf/nkf.c  	return INT2FIX(_SJIS);
_SJIS             204 ext/nkf/nkf.c  	return INT2FIX(_SJIS);
_SJIS             250 ext/nkf/nkf.c        code = _SJIS;
_SJIS             279 ext/nkf/nkf.c    rb_define_const(mKconv, "SJIS", INT2FIX(_SJIS));


_SS_ALIGNSIZE

_SS_ALIGNSIZE     109 ext/socket/socket.c #define _SS_PAD1SIZE	(_SS_ALIGNSIZE - sizeof(unsigned char) * 2)
_SS_ALIGNSIZE     111 ext/socket/socket.c 				_SS_PAD1SIZE - _SS_ALIGNSIZE)


_SS_PAD1SIZE

_SS_PAD1SIZE      111 ext/socket/socket.c 				_SS_PAD1SIZE - _SS_ALIGNSIZE)
_SS_PAD1SIZE      120 ext/socket/socket.c 	char	__ss_pad1[_SS_PAD1SIZE];


_S_IFIFO

_S_IFIFO          245 win32/win32.h  #if !defined S_IFIFO && defined _S_IFIFO
_S_IFIFO          246 win32/win32.h  #define S_IFIFO _S_IFIFO


_S_IFREG

_S_IFREG           92 wince/sys/stat.c 	sbuf->st_mode = _S_IFREG;
_S_IFREG           16 wince/sys/stat.h #define S_IFREG  _S_IFREG


_T_INTEGER

_T_INTEGER         86 ext/Win32API/Win32API.c 		rb_ary_push(a_import, INT2FIX(_T_INTEGER));
_T_INTEGER        103 ext/Win32API/Win32API.c 		rb_ary_push(a_import, INT2FIX(_T_INTEGER));
_T_INTEGER        131 ext/Win32API/Win32API.c 	    ex = _T_INTEGER;
_T_INTEGER        174 ext/Win32API/Win32API.c 	case _T_INTEGER:
_T_INTEGER        198 ext/Win32API/Win32API.c     case _T_INTEGER:


_T_NUMBER

_T_NUMBER          80 ext/Win32API/Win32API.c 		rb_ary_push(a_import, INT2FIX(_T_NUMBER));
_T_NUMBER          97 ext/Win32API/Win32API.c 		rb_ary_push(a_import, INT2FIX(_T_NUMBER));
_T_NUMBER         125 ext/Win32API/Win32API.c 	    ex = _T_NUMBER;
_T_NUMBER         173 ext/Win32API/Win32API.c 	case _T_NUMBER:
_T_NUMBER         197 ext/Win32API/Win32API.c     case _T_NUMBER:


_T_POINTER

_T_POINTER         83 ext/Win32API/Win32API.c 		rb_ary_push(a_import, INT2FIX(_T_POINTER));
_T_POINTER        100 ext/Win32API/Win32API.c 		rb_ary_push(a_import, INT2FIX(_T_POINTER));
_T_POINTER        128 ext/Win32API/Win32API.c 	    ex = _T_POINTER;
_T_POINTER        178 ext/Win32API/Win32API.c 	case _T_POINTER:
_T_POINTER        200 ext/Win32API/Win32API.c     case _T_POINTER:


_T_VOID

_T_VOID            49 ext/Win32API/Win32API.c     int ex = _T_VOID;
_T_VOID           117 ext/Win32API/Win32API.c 	ex = _T_VOID;
_T_VOID           122 ext/Win32API/Win32API.c 	    ex = _T_VOID;
_T_VOID           202 ext/Win32API/Win32API.c     case _T_VOID:


_UNKNOWN

_UNKNOWN          139 ext/nkf/nkf.c    if (p == pend) return INT2FIX(_UNKNOWN);
_UNKNOWN          143 ext/nkf/nkf.c        if (p==pend) return INT2FIX(_UNKNOWN);\
_UNKNOWN          212 ext/nkf/nkf.c    return INT2FIX(_UNKNOWN);
_UNKNOWN          256 ext/nkf/nkf.c        code = _UNKNOWN;
_UNKNOWN          286 ext/nkf/nkf.c    rb_define_const(mKconv, "UNKNOWN", INT2FIX(_UNKNOWN));


_UTF16

_UTF16            254 ext/nkf/nkf.c        code = _UTF16;
_UTF16            284 ext/nkf/nkf.c    rb_define_const(mKconv, "UTF16", INT2FIX(_UTF16));


_UTF8

_UTF8             252 ext/nkf/nkf.c        code = _UTF8;
_UTF8             283 ext/nkf/nkf.c    rb_define_const(mKconv, "UTF8", INT2FIX(_UTF8));


_WIN32

_WIN32             93 defines.h      #if defined(MSDOS) || defined(_WIN32) || defined(__human68k__) || defined(__EMX__)
_WIN32            186 defines.h      #ifdef _WIN32
_WIN32             24 dir.c          #if defined HAVE_DIRENT_H && !defined _WIN32
_WIN32             27 dir.c          #elif defined HAVE_DIRECT_H && !defined _WIN32
_WIN32             47 dir.c          # ifdef _WIN32
_WIN32            125 dir.c          #ifdef _WIN32
_WIN32            136 dir.c          #ifdef _WIN32
_WIN32           1234 dir.c          #ifndef _WIN32
_WIN32             51 dln.c          #if defined(_WIN32) || defined(__VMS)
_WIN32             72 dln.c          #ifndef _WIN32
_WIN32           1148 dln.c          #if defined _WIN32 && !defined __CYGWIN__
_WIN32           1189 dln.c          #if defined _WIN32 && !defined __CYGWIN__
_WIN32           1274 dln.c          #if defined _WIN32 && !defined __CYGWIN__
_WIN32           1616 dln.c          #if defined(MSDOS) || defined(_WIN32) || defined(__human68k__) || defined(__MACOS__)
_WIN32           1786 dln.c          #elif defined(__EMX__) || defined(_WIN32)
_WIN32            828 error.c        #if !defined(_WIN32) && !defined(__VMS)
_WIN32           1240 eval.c         #elif !defined(_WIN32) && !defined(__MACOS__) || defined(_WIN32_WCE)
_WIN32           9491 eval.c         #if defined _WIN32 || defined __CYGWIN__
_WIN32           9569 eval.c         # if defined _WIN32 && !defined __CYGWIN__
_WIN32              5 ext/Win32API/Win32API.c #if !defined _MSC_VER && !defined _WIN32
_WIN32             32 ext/etc/etc.c  #ifndef _WIN32
_WIN32            100 ext/nkf/nkf-utf8/nkf.c #if (defined(__Win32__) || defined(_WIN32)) && !defined(__WIN32__)
_WIN32             31 ext/openssl/ossl.h #if defined(_WIN32)
_WIN32             57 ext/openssl/ossl.h #if defined(_WIN32)
_WIN32             15 ext/openssl/ossl_asn1.c #elif !defined(NT) && !defined(_WIN32)
_WIN32             22 ext/openssl/ossl_ssl.c #ifdef _WIN32
_WIN32            566 ext/openssl/ossl_ssl.c #ifdef _WIN32
_WIN32            106 ext/sdbm/_sdbm.c #if !defined sun && !defined MSDOS && !defined _WIN32 && !defined __CYGWIN__ && !defined(errno)
_WIN32            360 ext/sdbm/_sdbm.c #if defined MSDOS || (defined _WIN32 && !defined __CYGWIN__)
_WIN32            387 ext/sdbm/_sdbm.c #if defined MSDOS || (defined _WIN32 && !defined __CYGWIN__)
_WIN32             43 ext/socket/getaddrinfo.c #ifndef _WIN32
_WIN32             39 ext/socket/getnameinfo.c #ifndef _WIN32
_WIN32             60 ext/socket/getnameinfo.c #ifdef _WIN32
_WIN32             28 ext/socket/socket.c #ifndef _WIN32
_WIN32           1182 ext/socket/socket.c #if !defined(_WIN32) && !defined(__CYGWIN__)
_WIN32           2099 ext/socket/socket.c #if !defined(_WIN32) && !defined(__BEOS__) && !defined(__EMX__) && !defined(__QNXNTO__)
_WIN32             17 ext/stringio/stringio.c #if defined(HAVE_FCNTL_H) || defined(_WIN32)
_WIN32             62 ext/tk/stubs.c #if defined _WIN32 || defined __CYGWIN__
_WIN32            100 ext/tk/stubs.c #if defined _WIN32
_WIN32            116 ext/tk/stubs.c #if defined _WIN32
_WIN32             15 file.c         #ifdef _WIN32
_WIN32            639 file.c         #ifdef _WIN32
_WIN32            791 file.c         #ifndef _WIN32
_WIN32            824 file.c         #if defined(S_IXGRP) && !defined(_WIN32) && !defined(__CYGWIN__)
_WIN32           1323 file.c         #ifndef _WIN32
_WIN32           1425 file.c         #ifdef _WIN32
_WIN32           1431 file.c         #ifdef _WIN32
_WIN32           1871 file.c         #if defined(DJGPP) || defined(__CYGWIN32__) || defined(_WIN32) || defined(__EMX__)
_WIN32           2181 file.c         #elif defined DOSISH && !defined _WIN32
_WIN32           2964 file.c         #  ifdef _WIN32
_WIN32           3616 file.c         #ifndef _WIN32
_WIN32             33 gc.c           #if defined _WIN32 || defined __CYGWIN__
_WIN32           1419 gc.c           #if defined(_WIN32) || defined(__CYGWIN__)
_WIN32           1499 hash.c         #ifdef _WIN32
_WIN32           1674 hash.c         #if defined(_WIN32)
_WIN32             22 io.c           #if !defined(_WIN32) && !defined(__DJGPP__)
_WIN32             30 io.c           #if defined(MSDOS) || defined(__BOW__) || defined(__CYGWIN__) || defined(_WIN32) || defined(__human68k__) || defined(__EMX__) || defined(__BEOS__)
_WIN32             34 io.c           #if defined(MSDOS) || defined(__CYGWIN__) || defined(_WIN32)
_WIN32             47 io.c           #if defined(HAVE_SYS_IOCTL_H) && !defined(DJGPP) && !defined(_WIN32) && !defined(__human68k__)
_WIN32             50 io.c           #if defined(HAVE_FCNTL_H) || defined(_WIN32)
_WIN32            183 io.c           #if defined(_WIN32)
_WIN32           2377 io.c           #if defined(_WIN32) || defined(DJGPP) || defined(__CYGWIN__) || defined(__human68k__) || defined(__EMX__)
_WIN32           2622 io.c           #ifdef _WIN32
_WIN32           2743 io.c           #if !defined(HAVE_FORK) && !defined(_WIN32)
_WIN32           2836 io.c           #elif defined(_WIN32)
_WIN32           2911 io.c           #elif defined(_WIN32)
_WIN32           5627 io.c           #if defined (_WIN32) || defined(DJGPP) || defined(__CYGWIN__) || defined(__human68k__)
_WIN32             32 main.c         #ifdef _WIN32
_WIN32             17 missing.h      #elif !defined(_WIN32)
_WIN32              9 missing/erf.c  #ifdef _WIN32
_WIN32            121 missing/flock.c #elif !defined _WIN32
_WIN32             51 oniguruma.h    #if defined(__STDC__) || defined(_WIN32)
_WIN32             67 oniguruma.h    #if defined(_WIN32) && !defined(__GNUC__)
_WIN32             65 process.c      #if defined(HAVE_TIMES) || defined(_WIN32)
_WIN32            158 process.c      #ifdef _WIN32
_WIN32           1000 process.c      #ifdef _WIN32
_WIN32           1059 process.c      #if defined(_WIN32)
_WIN32           1064 process.c      #if defined(_WIN32)
_WIN32           1130 process.c      #if defined(_WIN32)
_WIN32           3573 process.c      #if !defined(_WIN32) && !defined(DJGPP)
_WIN32           3711 process.c      #if defined(HAVE_TIMES) || defined(_WIN32)
_WIN32            117 regint.h       #if defined(_WIN32) && !defined(__GNUC__)
_WIN32            113 ruby.c         #if defined _WIN32 || defined __CYGWIN__ || defined __DJGPP__
_WIN32            262 ruby.c         #if defined _WIN32 || defined __CYGWIN__
_WIN32            725 ruby.h         #elif defined(_WIN32) || defined(_WIN32_WCE)
_WIN32             17 rubysig.h      #ifdef _WIN32
_WIN32            443 signal.c       #ifdef _WIN32
_WIN32            545 signal.c       #ifndef _WIN32
_WIN32            689 signal.c       #ifndef _WIN32
_WIN32            699 signal.c       #ifndef _WIN32
_WIN32            717 signal.c       #ifndef _WIN32
_WIN32            775 signal.c       #ifndef _WIN32
_WIN32            845 signal.c       #ifndef _WIN32
_WIN32            853 signal.c       #ifndef _WIN32
_WIN32            870 signal.c       #ifndef _WIN32
_WIN32             19 util.c         #ifdef _WIN32
_WIN32             69 util.c         #if defined(MSDOS) || defined(__CYGWIN32__) || defined(_WIN32)
_WIN32            161 util.c         #if defined(DJGPP) || defined(__CYGWIN32__) || defined(_WIN32)
_WIN32            217 util.c         #if defined(__CYGWIN32__) || defined(_WIN32)
_WIN32             42 util.h         #if defined(MSDOS) || defined(__CYGWIN32__) || defined(_WIN32)


__BEGIN_DECLS

__BEGIN_DECLS      14 ext/digest/defs.h #if !defined(__BEGIN_DECLS)
__BEGIN_DECLS      51 ext/digest/rmd160/rmd160.h __BEGIN_DECLS


__MacOS_X__

__MacOS_X__        88 process.c      #if defined(__APPLE__) && ( defined(__MACH__) || defined(__DARWIN__) ) && !defined(__MacOS_X__)
__MacOS_X__       102 process.c      #if defined(__MacOS_X__) || defined(__bsdi__)
__MacOS_X__       107 process.c      #if defined(HAVE_44BSD_SETUID) || defined(__MacOS_X__)


__SEOF

__SEOF            199 missing/vsnprintf.c #define	__sfeof(p)	(((p)->_flags & __SEOF) != 0)
__SEOF            201 missing/vsnprintf.c #define	__sclearerr(p)	((void)((p)->_flags &= ~(__SERR|__SEOF)))


__SERR

__SERR            200 missing/vsnprintf.c #define	__sferror(p)	(((p)->_flags & __SERR) != 0)
__SERR            201 missing/vsnprintf.c #define	__sclearerr(p)	((void)((p)->_flags &= ~(__SERR|__SEOF)))


__SNBF

__SNBF            263 missing/vsnprintf.c 	if (fp->_flags & __SNBF) {
__SNBF            561 missing/vsnprintf.c 	if ((fp->_flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) &&


__SSTR

__SSTR            282 missing/vsnprintf.c 			if (fp->_flags & __SSTR) {
__SSTR           1098 missing/vsnprintf.c 	f._flags = __SWR | __SSTR;
__SSTR           1135 missing/vsnprintf.c 	f._flags = __SWR | __SSTR;
__SSTR            876 sprintf.c          f._flags = __SWR | __SSTR;


__SWR

__SWR             561 missing/vsnprintf.c 	if ((fp->_flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) &&
__SWR            1098 missing/vsnprintf.c 	f._flags = __SWR | __SSTR;
__SWR            1135 missing/vsnprintf.c 	f._flags = __SWR | __SSTR;
__SWR             876 sprintf.c          f._flags = __SWR | __SSTR;


__WIN16__

__WIN16__         140 ext/nkf/nkf-utf8/nkf.c #ifndef __WIN16__
__WIN16__        4937 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) && !defined(__WIN32__) && !defined(__WIN16__)
__WIN16__        4940 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) && defined(__WIN16__)


__WIN32__

__WIN32__         100 ext/nkf/nkf-utf8/nkf.c #if (defined(__Win32__) || defined(_WIN32)) && !defined(__WIN32__)
__WIN32__         138 ext/nkf/nkf-utf8/nkf.c #if defined(__TURBOC__) && defined(_Windows) && !defined(__WIN32__) /*Easy Win */
__WIN32__         153 ext/nkf/nkf-utf8/nkf.c #ifdef __WIN32__
__WIN32__         865 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) && !defined(__MINGW32__) && !defined(__WIN32__)
__WIN32__         885 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) && !defined(__MINGW32__) && !defined(__WIN32__)
__WIN32__        4937 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) && !defined(__WIN32__) && !defined(__WIN16__)
__WIN32__        4943 ext/nkf/nkf-utf8/nkf.c #if defined(MSDOS) && defined(__WIN32__)
__WIN32__        5007 ext/tk/tcltklib.c #if defined(MAC_TCL) || defined(__WIN32__)
__WIN32__        5052 ext/tk/tcltklib.c #if defined(MAC_TCL) || defined(__WIN32__)


__sferror

__sferror         208 missing/vsnprintf.c #define	ferror(p)	__sferror(p)
__sferror        1006 missing/vsnprintf.c 	return (__sferror(fp) ? EOF : ret);


_access

_access           227 util.c             if (_access(s, 0) == 0) {
_access            41 wince/io.h     int _access(const char *filename, int flags);
_access            68 wince/io.h     #define access	   _access


_begx

_begx              39 ext/curses/curses.c #  if !defined(_begx)
_begx            1014 ext/curses/curses.c     return INT2FIX(winp->window->_begx);


_begy

_begy              42 ext/curses/curses.c #  if !defined(_begy)
_begy             997 ext/curses/curses.c     return INT2FIX(winp->window->_begy);


_chdir

_chdir             10 wince/direct.h int _chdir(const char * dirname);
_chdir             18 wince/direct.h #define chdir      _chdir


_chmod

_chmod             36 wince/io.h     int _chmod(const char *path, int mode);
_chmod             57 wince/io.h     #define chmod      _chmod


_chsize

_chsize            32 wince/io.h     int _chsize(int handle, long size);
_chsize            58 wince/io.h     #define chsize     _chsize


_close

_close            236 util.c         	_close(fd);
_close           3804 win32/win32.c  	return _close(fd);
_close           3807 win32/win32.c      _close(fd);


_cmpd

_cmpd             231 x68/_dtos18.c      if (_cmpd (1.0e+18, x) >= 0) {
_cmpd             237 x68/_dtos18.c      else if (_cmpd (1.0e+17, x) < 0) {


_execl

_execl             29 wince/process.h int _execl(const char *, const char *, ...);
_execl             42 wince/process.h #define execl	   _execl


_get_osfhandle

_get_osfhandle     23 ext/openssl/ossl_ssl.c #  define TO_SOCKET(s) _get_osfhandle(s)
_get_osfhandle     79 win32/win32.c  #define TO_SOCKET(x)	_get_osfhandle(x)
_get_osfhandle    335 win32/win32.c  			      (VALUE)_get_osfhandle(fd), oper, NULL,
_get_osfhandle    601 win32/win32.c      return _get_osfhandle(fh);
_get_osfhandle   3173 win32/win32.c      if (GetFileInformationByHandle((HANDLE)_get_osfhandle(fd), &info) &&
_get_osfhandle     43 wince/io.h     long _get_osfhandle( int filehandle );


_isatty

_isatty            39 wince/io.h     int _isatty(int fd);
_isatty            67 wince/io.h     #define isatty	   _isatty


_lseek

_lseek             48 wince/io.h     long _lseek(int handle, long offset, int origin);
_lseek             71 wince/io.h     #define lseek      _lseek


_macinit

_macinit          300 ext/tk/stubs.c         _macinit();
_macinit          335 ext/tk/stubs.c         _macinit();
_macinit          471 ext/tk/stubs.c         _macinit();
_macinit          489 ext/tk/stubs.c         _macinit();


_maxx

_maxx              33 ext/curses/curses.c #  if !defined(_maxx)
_maxx             980 ext/curses/curses.c     return INT2FIX(winp->window->_maxx+1);


_maxy

_maxy              36 ext/curses/curses.c #  if !defined(_maxy)
_maxy             959 ext/curses/curses.c     return INT2FIX(winp->window->_maxy+1);


_mkdir

_mkdir             12 wince/direct.h int _mkdir(const char * dir);
_mkdir             20 wince/direct.h #define mkdir      _mkdir


_nativethread_consistency_check

_nativethread_consistency_check  206 ext/tk/stubs.c         _nativethread_consistency_check(tcl_ip);
_nativethread_consistency_check  248 ext/tk/stubs.c         _nativethread_consistency_check(tcl_ip);
_nativethread_consistency_check  451 ext/tk/stubs.c     _nativethread_consistency_check(tcl_ip);


_open

_open             235 util.c             if ((fd = _open(s, O_CREAT, 0666)) >= 0) {
_open              44 wince/io.h     int _open(const char *file, int mode,...);
_open              61 wince/io.h     #define open	   _open


_open_osfhandle

_open_osfhandle    88 win32/win32.c  #define rb_w32_open_osfhandle(osfhandle, flags) _open_osfhandle(osfhandle, flags)
_open_osfhandle  1642 win32/win32.c      fh = _open_osfhandle((long)hF, 0);
_open_osfhandle  1690 win32/win32.c      int fd = _open_osfhandle(osfhandle, flags);
_open_osfhandle    42 wince/io.h     int _open_osfhandle ( long osfhandle, int flags);


_osfile

_osfile          1613 win32/win32.c  #define _set_osflags(fh, flags) (_osfile(fh) = (flags))
_osfile          3961 win32/win32.c      if (!(_osfile(fd) & FOPEN)) {
_osfile          3965 win32/win32.c      if (!(_osfile(fd) & FDEV)) {


_pioinfo

_pioinfo         1608 win32/win32.c  #define _osfhnd(i)  (_pioinfo(i)->osfhnd)
_pioinfo         1609 win32/win32.c  #define _osfile(i)  (_pioinfo(i)->osfile)
_pioinfo         1610 win32/win32.c  #define _pipech(i)  (_pioinfo(i)->pipech)
_pioinfo         1650 win32/win32.c  	MTHREAD_ONLY(EnterCriticalSection(&(_pioinfo(fh)->lock)));
_pioinfo         1657 win32/win32.c  	MTHREAD_ONLY(LeaveCriticalSection(&_pioinfo(fh)->lock));


_pipe

_pipe             108 win32/win32.h  #define pipe(p)			_pipe(p, 2048L, O_BINARY)
_pipe              40 wince/io.h     int _pipe(int *phandles, unsigned int psize, int textmode);
_pipe              69 wince/io.h     #define pipe       _pipe


_read

_read            3576 win32/win32.c      int ret = _read(fd, buf, size);
_read              46 wince/io.h     int _read(int fd, void *buffer, int length);
_read              63 wince/io.h     #define read	   _read


_rename

_rename            33 wince/io.h     int _rename (const char *oldname, const char *newname);
_rename            59 wince/io.h     #define rename     _rename


_rmdir

_rmdir             11 wince/direct.h int _rmdir(const char * dir);
_rmdir             19 wince/direct.h #define rmdir      _rmdir


_set_osfhnd

_set_osfhnd      1652 win32/win32.c  	_set_osfhnd(fh, osfhandle);
_set_osfhnd      3788 win32/win32.c      _set_osfhnd(fd, (SOCKET)INVALID_HANDLE_VALUE);
_set_osfhnd      3806 win32/win32.c      _set_osfhnd(fd, (SOCKET)INVALID_HANDLE_VALUE);


_timer_for_tcl

_timer_for_tcl    912 ext/tk/tcltklib.c static void _timer_for_tcl _((ClientData));
_timer_for_tcl    932 ext/tk/tcltklib.c         timer_token = Tcl_CreateTimerHandler(timer_tick, _timer_for_tcl,
_timer_for_tcl    968 ext/tk/tcltklib.c         timer_token = Tcl_CreateTimerHandler(timer_tick, _timer_for_tcl,
_timer_for_tcl   1299 ext/tk/tcltklib.c         timer_token = Tcl_CreateTimerHandler(timer_tick, _timer_for_tcl,
_timer_for_tcl   1320 ext/tk/tcltklib.c                                                      _timer_for_tcl,


_umask

_umask             35 wince/io.h     int _umask(int cmask);
_umask             65 wince/io.h     #define umask	   _umask


_unlink

_unlink           237 util.c         	_unlink(s);	/* don't leave it laying around */
_unlink            34 wince/io.h     int _unlink(const char *file);
_unlink            60 wince/io.h     #define unlink	   _unlink


_vmsruby_init

_vmsruby_init    1312 eval.c         	_vmsruby_init();
_vmsruby_init       4 vms/vmsruby_private.h void _vmsruby_init(void);


_vmsruby_set_switch

_vmsruby_set_switch    7 vms/vmsruby_private.c     _vmsruby_set_switch("DECC$WLS", "TRUE");
_vmsruby_set_switch    5 vms/vmsruby_private.h long _vmsruby_set_switch(char *, char *);


_write

_write            120 win32/win32.h  #define write(h, b, l)		_write(h, b, l)
_write             47 wince/io.h     int _write(int fd, const void *buffer, unsigned count);
_write             64 wince/io.h     #define write	   _write


abort

abort             167 error.c            abort();
abort              98 eval.c             abort();			/* ensure noreturn */
abort            9743 eval.c             int abort;
abort            11464 eval.c             return rb_thread_check(thread)->abort?Qtrue:Qfalse;
abort            11481 eval.c             rb_thread_check(thread)->abort = RTEST(val);
abort            11549 eval.c             th->abort = 0;\
abort            11805 eval.c         	else if (th->safe < 4 && (ruby_thread_abort || th->abort || RTEST(ruby_debug))) {
abort             713 ext/nkf/nkf-utf8/nkf.c                 abort();
abort              28 ext/syck/syck.c     abort();
abort              27 wince/process.h void abort(void);


accept

accept            422 ext/racc/cparse/cparse.c         goto accept;          \
accept            528 ext/racc/cparse/cparse.c             goto accept;
accept            542 ext/racc/cparse/cparse.c   accept:
accept            630 ext/racc/cparse/cparse.c         goto accept;
accept           1399 ext/socket/socket.c     fd2 = accept(fd, sockaddr, len);
accept           1402 ext/socket/socket.c     fd2 = accept(fd, sockaddr, len);
accept           2202 win32/win32.c  	r = accept(TO_SOCKET(s), addr, addrlen);
accept           2692 win32/win32.c  	    r = accept(svr, addr, &len);


access

access            857 file.c             return access(path, mode);
access           1088 file.c             if (access(StringValueCStr(fname), R_OK) < 0) return Qfalse;
access           1158 file.c             if (access(StringValueCStr(fname), W_OK) < 0) return Qfalse;
access           1220 file.c             if (access(StringValueCStr(fname), X_OK) < 0) return Qfalse;
access           1449 file.c             if (access(RSTRING(fname1)->ptr, 0)) return Qfalse;
access           1450 file.c             if (access(RSTRING(fname2)->ptr, 0)) return Qfalse;
access           4024 file.c         	    && !access(p0, W_OK)) {
access             56 wince/io_wce.c 	DWORD access=0, share=0, create=0;
access             60 wince/io_wce.c 		access = GENERIC_READ|GENERIC_WRITE;
access             62 wince/io_wce.c 		access = GENERIC_READ;
access             64 wince/io_wce.c 		access = GENERIC_WRITE;
access             73 wince/io_wce.c 	h = CreateFileW(wfile, access, share, NULL,
access            406 wince/wince.c  	h = CreateFileW(wfilename, access, sharing,
access            126 wince/wince.h  	DWORD access, BOOL inherit, DWORD options);


acosh

acosh             233 math.c             d = acosh(RFLOAT(x)->value);
acosh              29 missing.h      extern double acosh(double);


add_abs_addr

add_abs_addr      372 regcomp.c        r = add_abs_addr(reg, 0 /*dummy addr.*/);
add_abs_addr     1019 regcomp.c            r = add_abs_addr(reg, (int )node->call_addr);


add_bitset

add_bitset        594 regcomp.c          r = add_bitset(reg, cc->bs);
add_bitset        611 regcomp.c            r = add_bitset(reg, cc->bs);


add_bytes

add_bytes         423 regcomp.c        add_bytes(reg, s, mb_len * str_len);
add_bytes         529 regcomp.c        return add_bytes(reg, mbuf->p, mbuf->used);
add_bytes         536 regcomp.c        if (pad_size != 0) add_bytes(reg, PadBuf, pad_size);
add_bytes         538 regcomp.c        r = add_bytes(reg, mbuf->p, mbuf->used);
add_bytes         542 regcomp.c        if (pad_size != 0) add_bytes(reg, PadBuf, pad_size);
add_bytes         783 regcomp.c            return add_bytes(reg, NSTRING(qn->next_head_exact).s, 1);
add_bytes         824 regcomp.c      	add_bytes(reg, NSTRING(qn->head_exact).s, 1);
add_bytes         834 regcomp.c      	add_bytes(reg, NSTRING(qn->next_head_exact).s, 1);


add_char_opt_map_info

add_char_opt_map_info 3765 regcomp.c        add_char_opt_map_info(map, p[0], enc);
add_char_opt_map_info 3776 regcomp.c              add_char_opt_map_info(map, buf[0], enc);
add_char_opt_map_info 3788 regcomp.c                  add_char_opt_map_info(map, buf[0], enc);
add_char_opt_map_info 4009 regcomp.c      	  add_char_opt_map_info(&opt->map, *(sn->s), env->enc);
add_char_opt_map_info 4058 regcomp.c                  add_char_opt_map_info(&opt->map, (UChar )i, env->enc);
add_char_opt_map_info 4079 regcomp.c                    add_char_opt_map_info(&opt->map, (UChar )i, env->enc);
add_char_opt_map_info 4087 regcomp.c                    add_char_opt_map_info(&opt->map, (UChar )i, env->enc);


add_code_range

add_code_range   3798 regparse.c           r = add_code_range(&(cc->mbuf), env, *vs, *vs);
add_code_range   3821 regparse.c           r = add_code_range(&(cc->mbuf), env, *vs, *vs);
add_code_range   3841 regparse.c     	r = add_code_range(&(cc->mbuf), env, *vs, v);
add_code_range   3856 regparse.c     	r = add_code_range(&(cc->mbuf), env, (OnigCodePoint )*vs, v);
add_code_range   4219 regparse.c               add_code_range(&(cc->mbuf), env, NEWLINE_CODE, NEWLINE_CODE);
add_code_range   4920 regparse.c                     add_code_range(&(cc->mbuf), env, ccs[i].to, ccs[i].to);


add_code_range_to_buf

add_code_range_to_buf  115 regparse.c       add_code_range_to_buf(pbuf, MBCODE_START_POS(enc), ~((OnigCodePoint )0))
add_code_range_to_buf 1672 regparse.c       return add_code_range_to_buf(pbuf, from, to);
add_code_range_to_buf 1698 regparse.c           r = add_code_range_to_buf(pbuf, pre, from - 1);
add_code_range_to_buf 1705 regparse.c         r = add_code_range_to_buf(pbuf, to + 1, ~((OnigCodePoint )0));
add_code_range_to_buf 1768 regparse.c         r = add_code_range_to_buf(pbuf, from, to);
add_code_range_to_buf 1793 regparse.c     	  r = add_code_range_to_buf(pbuf, from1, from2-1);
add_code_range_to_buf 1808 regparse.c         r = add_code_range_to_buf(pbuf, from1, to1);
add_code_range_to_buf 1854 regparse.c     	r = add_code_range_to_buf(pbuf, from, to);
add_code_range_to_buf 3420 regparse.c           r = add_code_range_to_buf(&(cc->mbuf),
add_code_range_to_buf 3448 regparse.c     	r = add_code_range_to_buf(&(cc->mbuf), prev,
add_code_range_to_buf 3455 regparse.c           r = add_code_range_to_buf(&(cc->mbuf), prev, 0x7fffffff);


add_compile_string

add_compile_string  502 regcomp.c            r = add_compile_string(prev, prev_len, slen, reg, ambig);
add_compile_string  512 regcomp.c        return add_compile_string(prev, prev_len, slen, reg, ambig);
add_compile_string  521 regcomp.c        return add_compile_string(sn->s, 1 /* sb */, sn->end - sn->s, reg, 0);


add_compile_string_length

add_compile_string_length  454 regcomp.c            r = add_compile_string_length(prev, prev_len, slen, reg, ambig);
add_compile_string_length  462 regcomp.c        r = add_compile_string_length(prev, prev_len, slen, reg, ambig);
add_compile_string_length  473 regcomp.c        return add_compile_string_length(sn->s, 1 /* sb */, sn->end - sn->s, reg, 0);


add_ctype_to_cc

add_ctype_to_cc  3644 regparse.c           r = add_ctype_to_cc(cc, pb->ctype, not, env);
add_ctype_to_cc  3764 regparse.c       r = add_ctype_to_cc(cc, ctype, 0, env);
add_ctype_to_cc  4054 regparse.c     	r = add_ctype_to_cc(cc, ctype, not, env);
add_ctype_to_cc  4069 regparse.c     	r = add_ctype_to_cc(cc, ctype, tok->u.prop.not, env);
add_ctype_to_cc  4873 regparse.c                 add_ctype_to_cc(cc, ctype, 0, env);


add_heap

add_heap         1075 gc.c           	add_heap();
add_heap         1279 gc.c           	    add_heap();
add_heap         1526 gc.c               add_heap();


add_length

add_length        414 regcomp.c          add_length(reg, mb_len);
add_length        418 regcomp.c            add_length(reg, mb_len * str_len);
add_length        420 regcomp.c            add_length(reg, str_len);
add_length        528 regcomp.c        add_length(reg, mbuf->used);
add_length        535 regcomp.c        add_length(reg, mbuf->used + (WORD_ALIGNMENT_SIZE - 1));
add_length       1186 regcomp.c            r = add_length(reg, n);
add_length       1205 regcomp.c            r = add_length(reg, n);
add_length       1418 regcomp.c      	add_length(reg, br->back_num);


add_mem_num

add_mem_num       339 regcomp.c          r = add_mem_num(reg, reg->num_null_check); /* NULL CHECK ID */
add_mem_num       356 regcomp.c          r = add_mem_num(reg, saved_num_null_check); /* NULL CHECK ID */
add_mem_num       660 regcomp.c        r = add_mem_num(reg, num_repeat); /* OP_REPEAT ID */
add_mem_num       683 regcomp.c        r = add_mem_num(reg, num_repeat); /* OP_REPEAT ID */
add_mem_num      1039 regcomp.c          r = add_mem_num(reg, node->regnum);
add_mem_num      1053 regcomp.c            r = add_mem_num(reg, node->regnum);
add_mem_num      1065 regcomp.c            r = add_mem_num(reg, node->regnum);
add_mem_num      1392 regcomp.c      	  r = add_mem_num(reg, n);
add_mem_num      1402 regcomp.c      	    r = add_mem_num(reg, n);
add_mem_num      1422 regcomp.c      	  r = add_mem_num(reg, p[i]);


add_mml

add_mml          3938 regcomp.c        add_mml(&to->len, &add->len);
add_mml          3977 regcomp.c      	  add_mml(&nenv.mmd, &nopt.len);


add_modules

add_modules       598 ruby.c         		add_modules(s);
add_modules       601 ruby.c         		add_modules(argv[1]);


add_multi_byte_cclass

add_multi_byte_cclass  603 regcomp.c            r = add_multi_byte_cclass(cc->mbuf, reg);
add_multi_byte_cclass  613 regcomp.c            r = add_multi_byte_cclass(cc->mbuf, reg);


add_opcode

add_opcode        246 regcomp.c        r = add_opcode(reg, opcode);
add_opcode        271 regcomp.c        r = add_opcode(reg, opcode);
add_opcode        337 regcomp.c          r = add_opcode(reg, OP_NULL_CHECK_START);
add_opcode        349 regcomp.c            r = add_opcode(reg, OP_NULL_CHECK_END);
add_opcode        351 regcomp.c            r = add_opcode(reg, OP_NULL_CHECK_END_MEMST);
add_opcode        353 regcomp.c            r = add_opcode(reg, OP_NULL_CHECK_END_MEMST_PUSH);
add_opcode        367 regcomp.c        r = add_opcode(reg, OP_CALL);
add_opcode        411 regcomp.c        add_opcode(reg, op);
add_opcode        583 regcomp.c          add_opcode(reg, OP_CCLASS_NODE);
add_opcode        590 regcomp.c            add_opcode(reg, OP_CCLASS_NOT);
add_opcode        592 regcomp.c            add_opcode(reg, OP_CCLASS);
add_opcode        599 regcomp.c              add_opcode(reg, OP_CCLASS_MB_NOT);
add_opcode        601 regcomp.c              add_opcode(reg, OP_CCLASS_MB);
add_opcode        607 regcomp.c              add_opcode(reg, OP_CCLASS_MIX_NOT);
add_opcode        609 regcomp.c              add_opcode(reg, OP_CCLASS_MIX);
add_opcode        658 regcomp.c        r = add_opcode(reg, qn->greedy ? OP_REPEAT : OP_REPEAT_NG);
add_opcode        677 regcomp.c          r = add_opcode(reg, qn->greedy ? OP_REPEAT_INC_SG : OP_REPEAT_INC_NG_SG);
add_opcode        680 regcomp.c          r = add_opcode(reg, qn->greedy ? OP_REPEAT_INC : OP_REPEAT_INC_NG);
add_opcode        779 regcomp.c      	r = add_opcode(reg, OP_ANYCHAR_ML_STAR_PEEK_NEXT);
add_opcode        781 regcomp.c      	r = add_opcode(reg, OP_ANYCHAR_STAR_PEEK_NEXT);
add_opcode        787 regcomp.c      	return add_opcode(reg, OP_ANYCHAR_ML_STAR);
add_opcode        789 regcomp.c      	return add_opcode(reg, OP_ANYCHAR_STAR);
add_opcode        922 regcomp.c          r = add_opcode(reg, OP_FAIL);
add_opcode       1015 regcomp.c            r = add_opcode(reg, OP_CALL);
add_opcode       1035 regcomp.c            r = add_opcode(reg, OP_MEMORY_START_PUSH);
add_opcode       1037 regcomp.c            r = add_opcode(reg, OP_MEMORY_START);
add_opcode       1046 regcomp.c      	r = add_opcode(reg, (IS_EFFECT_RECURSION(node)
add_opcode       1049 regcomp.c      	r = add_opcode(reg, (IS_EFFECT_RECURSION(node)
add_opcode       1055 regcomp.c            r = add_opcode(reg, OP_RETURN);
add_opcode       1061 regcomp.c      	r = add_opcode(reg, OP_MEMORY_END_PUSH);
add_opcode       1063 regcomp.c      	r = add_opcode(reg, OP_MEMORY_END);
add_opcode       1082 regcomp.c            r = add_opcode(reg, OP_POP);
add_opcode       1088 regcomp.c            r = add_opcode(reg, OP_PUSH_STOP_BT);
add_opcode       1092 regcomp.c            r = add_opcode(reg, OP_POP_STOP_BT);
add_opcode       1143 regcomp.c        case ANCHOR_BEGIN_BUF:      r = add_opcode(reg, OP_BEGIN_BUF);      break;
add_opcode       1144 regcomp.c        case ANCHOR_END_BUF:        r = add_opcode(reg, OP_END_BUF);        break;
add_opcode       1145 regcomp.c        case ANCHOR_BEGIN_LINE:     r = add_opcode(reg, OP_BEGIN_LINE);     break;
add_opcode       1146 regcomp.c        case ANCHOR_END_LINE:       r = add_opcode(reg, OP_END_LINE);       break;
add_opcode       1147 regcomp.c        case ANCHOR_SEMI_END_BUF:   r = add_opcode(reg, OP_SEMI_END_BUF);   break;
add_opcode       1148 regcomp.c        case ANCHOR_BEGIN_POSITION: r = add_opcode(reg, OP_BEGIN_POSITION); break;
add_opcode       1150 regcomp.c        case ANCHOR_WORD_BOUND:     r = add_opcode(reg, OP_WORD_BOUND);     break;
add_opcode       1151 regcomp.c        case ANCHOR_NOT_WORD_BOUND: r = add_opcode(reg, OP_NOT_WORD_BOUND); break;
add_opcode       1153 regcomp.c        case ANCHOR_WORD_BEGIN:     r = add_opcode(reg, OP_WORD_BEGIN);     break;
add_opcode       1154 regcomp.c        case ANCHOR_WORD_END:       r = add_opcode(reg, OP_WORD_END);       break;
add_opcode       1158 regcomp.c          r = add_opcode(reg, OP_PUSH_POS);
add_opcode       1162 regcomp.c          r = add_opcode(reg, OP_POP_POS);
add_opcode       1172 regcomp.c          r = add_opcode(reg, OP_FAIL_POS);
add_opcode       1178 regcomp.c            r = add_opcode(reg, OP_LOOK_BEHIND);
add_opcode       1209 regcomp.c            r = add_opcode(reg, OP_FAIL_LOOK_BEHIND_NOT);
add_opcode       1371 regcomp.c            r = add_opcode(reg, op);
add_opcode       1377 regcomp.c            r = add_opcode(reg, OP_ANYCHAR_ML);
add_opcode       1379 regcomp.c            r = add_opcode(reg, OP_ANYCHAR);
add_opcode       1390 regcomp.c      	  r = add_opcode(reg, OP_BACKREFN_IC);
add_opcode       1396 regcomp.c      	  case 1:  r = add_opcode(reg, OP_BACKREF1); break;
add_opcode       1397 regcomp.c      	  case 2:  r = add_opcode(reg, OP_BACKREF2); break;
add_opcode       1398 regcomp.c      	  case 3:  r = add_opcode(reg, OP_BACKREF3); break;
add_opcode       1400 regcomp.c      	    r = add_opcode(reg, OP_BACKREFN);
add_opcode       1411 regcomp.c                add_opcode(reg, OP_BACKREF_MULTI_IC);
add_opcode       1414 regcomp.c                add_opcode(reg, OP_BACKREF_MULTI);
add_opcode       4822 regcomp.c          r = add_opcode(reg, OP_END);


add_opcode_option

add_opcode_option  918 regcomp.c          r = add_opcode_option(reg, OP_SET_OPTION_PUSH, node->option);
add_opcode_option  920 regcomp.c          r = add_opcode_option(reg, OP_SET_OPTION, prev);
add_opcode_option  932 regcomp.c          r = add_opcode_option(reg, OP_SET_OPTION, prev);


add_opcode_rel_addr

add_opcode_rel_addr  803 regcomp.c      	  r = add_opcode_rel_addr(reg, OP_JUMP, SIZE_OP_PUSH_OR_JUMP_EXACT1);
add_opcode_rel_addr  805 regcomp.c      	  r = add_opcode_rel_addr(reg, OP_JUMP, SIZE_OP_PUSH_IF_PEEK_NEXT);
add_opcode_rel_addr  807 regcomp.c      	  r = add_opcode_rel_addr(reg, OP_JUMP, SIZE_OP_PUSH);
add_opcode_rel_addr  810 regcomp.c      	r = add_opcode_rel_addr(reg, OP_JUMP, SIZE_OP_JUMP);
add_opcode_rel_addr  821 regcomp.c      	r = add_opcode_rel_addr(reg, OP_PUSH_OR_JUMP_EXACT1,
add_opcode_rel_addr  827 regcomp.c      	r = add_opcode_rel_addr(reg, OP_JUMP,
add_opcode_rel_addr  831 regcomp.c      	r = add_opcode_rel_addr(reg, OP_PUSH_IF_PEEK_NEXT,
add_opcode_rel_addr  837 regcomp.c      	r = add_opcode_rel_addr(reg, OP_JUMP,
add_opcode_rel_addr  841 regcomp.c      	r = add_opcode_rel_addr(reg, OP_PUSH, mod_tlen + SIZE_OP_JUMP);
add_opcode_rel_addr  845 regcomp.c      	r = add_opcode_rel_addr(reg, OP_JUMP,
add_opcode_rel_addr  850 regcomp.c            r = add_opcode_rel_addr(reg, OP_JUMP, mod_tlen);
add_opcode_rel_addr  854 regcomp.c            r = add_opcode_rel_addr(reg, OP_PUSH, -(mod_tlen + (int )SIZE_OP_PUSH));
add_opcode_rel_addr  858 regcomp.c          r = add_opcode_rel_addr(reg, OP_JUMP, tlen);
add_opcode_rel_addr  871 regcomp.c            r = add_opcode_rel_addr(reg, OP_PUSH,
add_opcode_rel_addr  879 regcomp.c          r = add_opcode_rel_addr(reg, OP_PUSH, SIZE_OP_JUMP);
add_opcode_rel_addr  881 regcomp.c          r = add_opcode_rel_addr(reg, OP_JUMP, tlen);
add_opcode_rel_addr 1030 regcomp.c            r = add_opcode_rel_addr(reg, OP_JUMP, len);
add_opcode_rel_addr 1078 regcomp.c            r = add_opcode_rel_addr(reg, OP_PUSH, len + SIZE_OP_POP + SIZE_OP_JUMP);
add_opcode_rel_addr 1084 regcomp.c            r = add_opcode_rel_addr(reg, OP_JUMP,
add_opcode_rel_addr 1168 regcomp.c          r = add_opcode_rel_addr(reg, OP_PUSH_POS_NOT, len + SIZE_OP_FAIL_POS);
add_opcode_rel_addr 1196 regcomp.c            r = add_opcode_rel_addr(reg, OP_PUSH_LOOK_BEHIND_NOT,
add_opcode_rel_addr 1335 regcomp.c      	  r = add_opcode_rel_addr(reg, OP_PUSH, len + SIZE_OP_JUMP);
add_opcode_rel_addr 1342 regcomp.c      	  r = add_opcode_rel_addr(reg, OP_JUMP, len);


add_opt_anc_info

add_opt_anc_info 4116 regcomp.c            add_opt_anc_info(&opt->anc, NANCHOR(node).type);
add_opt_anc_info 4201 regcomp.c      	    add_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR_PL);
add_opt_anc_info 4203 regcomp.c      	    add_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR);


add_rel_addr

add_rel_addr      248 regcomp.c        r = add_rel_addr(reg, addr);
add_rel_addr      663 regcomp.c        r = add_rel_addr(reg, target_len + SIZE_OP_REPEAT_INC);


adjust_registers_to_matched

adjust_registers_to_matched   93 ext/strscan/strscan.c static void adjust_registers_to_matched _((struct strscanner *p));
adjust_registers_to_matched  709 ext/strscan/strscan.c     adjust_registers_to_matched(p);
adjust_registers_to_matched  744 ext/strscan/strscan.c     adjust_registers_to_matched(p);


after_exec

after_exec        969 process.c          preserving_errno(after_exec());
after_exec       1003 process.c          after_exec();
after_exec       1019 process.c      	    after_exec();
after_exec       1030 process.c      	    after_exec();
after_exec       1036 process.c      	    preserving_errno(after_exec());
after_exec       1109 process.c          after_exec();
after_exec       1147 process.c      	    after_exec();
after_exec       1420 process.c      	after_exec();


aix_loaderror

aix_loaderror    1381 dln.c          	    aix_loaderror(file);
aix_loaderror    1384 dln.c          	    aix_loaderror(file);


algo_t

algo_t             43 ext/digest/digest.c static algo_t *
algo_t             47 ext/digest/digest.c     algo_t *algo;
algo_t             55 ext/digest/digest.c     Data_Get_Struct(obj, algo_t, algo);
algo_t             63 ext/digest/digest.c     algo_t *algo;
algo_t             85 ext/digest/digest.c     algo_t *algo;
algo_t            104 ext/digest/digest.c     algo_t *algo;
algo_t            123 ext/digest/digest.c     algo_t *algo;
algo_t            142 ext/digest/digest.c     algo_t *algo;
algo_t            169 ext/digest/digest.c     algo_t *algo;
algo_t            192 ext/digest/digest.c     algo_t *algo;
algo_t            215 ext/digest/digest.c     algo_t *algo;
algo_t             11 ext/digest/md5/md5init.c static algo_t md5 = {
algo_t             11 ext/digest/rmd160/rmd160init.c static algo_t rmd160 = {
algo_t             11 ext/digest/sha1/sha1init.c static algo_t sha1 = {
algo_t             10 ext/digest/sha2/sha2init.c static algo_t sha##bitlen = { \


alloc

alloc             726 oniguruma.h      unsigned int alloc;       /* allocated space for p */
alloc             132 regcomp.c        buf->alloc = size;
alloc             148 regcomp.c        uslist->alloc = size;
alloc             166 regcomp.c        if (uslist->num >= uslist->alloc) {
alloc             167 regcomp.c          size = uslist->alloc * 2;
alloc             170 regcomp.c          uslist->alloc = size;
alloc            4680 regcomp.c          reg->p = (UChar* )xmalloc(reg->alloc);
alloc            4682 regcomp.c          xmemcpy(reg->p, from->p, reg->alloc);
alloc            4742 regcomp.c        if (reg->alloc == 0) {
alloc            4930 regcomp.c        (*reg)->alloc            = 0;
alloc             427 regint.h         unsigned int alloc;
alloc             433 regint.h         (buf)->alloc += (inc);\
alloc             434 regint.h         (buf)->p = (UChar* )xrealloc((buf)->p, (buf)->alloc);\
alloc             439 regint.h         do { (buf)->alloc *= 2; } while ((buf)->alloc < (unsigned int )low);\
alloc             440 regint.h         (buf)->p = (UChar* )xrealloc((buf)->p, (buf)->alloc);\
alloc             445 regint.h         unsigned int new_alloc = (buf)->alloc;\
alloc             447 regint.h         if ((buf)->alloc != new_alloc) {\
alloc             450 regint.h           (buf)->alloc = new_alloc;\
alloc             456 regint.h         if ((buf)->alloc < (unsigned int )used) BBUF_EXPAND((buf),used);\
alloc             463 regint.h         if ((buf)->alloc < (unsigned int )used) BBUF_EXPAND((buf),used);\
alloc             475 regint.h         if ((unsigned int )((to)+(n)) > (buf)->alloc) BBUF_EXPAND((buf),(to) + (n));\
alloc             102 regparse.c       r = BBUF_INIT(to, from->alloc);
alloc             571 regparse.c       int        alloc;
alloc             707 regparse.c       int alloc;
alloc             737 regparse.c           alloc = INIT_NAMES_ALLOC_NUM;
alloc             741 regparse.c           t->alloc = 0;
alloc             744 regparse.c           t->e = (NameEntry* )xmalloc(sizeof(NameEntry) * alloc);
alloc             749 regparse.c           t->alloc = alloc;
alloc             753 regparse.c         else if (t->num == t->alloc) {
alloc             756 regparse.c           alloc = t->alloc * 2;
alloc             757 regparse.c           t->e = (NameEntry* )xrealloc(t->e, sizeof(NameEntry) * alloc);
alloc             759 regparse.c           t->alloc = alloc;
alloc             762 regparse.c           for (i = t->num; i < t->alloc; i++) {
alloc             790 regparse.c           alloc = INIT_NAME_BACKREFS_ALLOC_NUM;
alloc             791 regparse.c           e->back_refs = (int* )xmalloc(sizeof(int) * alloc);
alloc             793 regparse.c           e->back_alloc = alloc;
alloc             799 regparse.c     	alloc = e->back_alloc * 2;
alloc             800 regparse.c     	e->back_refs = (int* )xrealloc(e->back_refs, sizeof(int) * alloc);
alloc             802 regparse.c     	e->back_alloc = alloc;
alloc             917 regparse.c       int i, need, alloc;
alloc             924 regparse.c     	alloc = INIT_SCANENV_MEMNODES_ALLOC_SIZE;
alloc             925 regparse.c     	p = (Node** )xmalloc(sizeof(Node*) * alloc);
alloc             930 regparse.c     	alloc = env->mem_alloc * 2;
alloc             931 regparse.c     	p = (Node** )xrealloc(env->mem_nodes_dynamic, sizeof(Node*) * alloc);
alloc             935 regparse.c           for (i = env->num_mem + 1; i < alloc; i++)
alloc             939 regparse.c           env->mem_alloc = alloc;
alloc            1145 regparse.c         bbuf->alloc = n + 1;
alloc             195 regparse.h       int alloc;
alloc             156 st.c               tbl = alloc(st_table);
alloc             260 st.c               entry = alloc(st_table_entry);\
alloc             331 st.c               new_table = alloc(st_table);
alloc             349 st.c           	    entry = alloc(st_table_entry);
alloc             360 win32/win32.c  	    LPMALLOC alloc;
alloc             362 win32/win32.c  	    SHGetMalloc(&alloc);
alloc             363 win32/win32.c  	    alloc->lpVtbl->Free(alloc, pidl);
alloc             364 win32/win32.c  	    alloc->lpVtbl->Release(alloc);


alloc_invoke_arguments

alloc_invoke_arguments 6773 ext/tk/tcltklib.c     av = alloc_invoke_arguments(argc, argv);
alloc_invoke_arguments 6894 ext/tk/tcltklib.c     av = alloc_invoke_arguments(argc, argv);


alloca

alloca            964 dln.c          	char *p = alloca(len);
alloca             48 eval.c         #  ifndef alloca
alloca             59 eval.c         #   ifndef alloca /* predefined by HP cc +Olibcalls */
alloca             60 eval.c         void *alloca ();
alloca            166 ext/syck/gram.c #   define YYSTACK_ALLOC alloca
alloca            169 ext/syck/gram.c #  if defined (alloca) || defined (_ALLOCA_H)
alloca            170 ext/syck/gram.c #   define YYSTACK_ALLOC alloca
alloca             56 ext/syck/syck.h #define S_ALLOCA_N(type,n) (type*)alloca(sizeof(type)*(n))
alloca             46 gc.c           #  ifndef alloca
alloca             57 gc.c           #   ifndef alloca /* predefined by HP cc +Olibcalls */
alloca             58 gc.c           void *alloca ();
alloca            123 regint.h       #define xalloca     alloca
alloca            486 ruby.h         #define ALLOCA_N(type,n) (type*)alloca(sizeof(type)*(n))


alt_merge_mml

alt_merge_mml    3842 regcomp.c        alt_merge_mml(&to->mmd, &add->mmd);
alt_merge_mml    3950 regcomp.c        alt_merge_mml(&to->len, &add->len);


alt_merge_opt_anc_info

alt_merge_opt_anc_info 3683 regcomp.c        alt_merge_opt_anc_info(&to->anc, &add->anc);
alt_merge_opt_anc_info 3854 regcomp.c        alt_merge_opt_anc_info(&to->anc, &add->anc);
alt_merge_opt_anc_info 3944 regcomp.c        alt_merge_opt_anc_info  (&to->anc,  &add->anc);


alt_merge_opt_exact_info

alt_merge_opt_exact_info 3945 regcomp.c        alt_merge_opt_exact_info(&to->exb,  &add->exb, env);
alt_merge_opt_exact_info 3946 regcomp.c        alt_merge_opt_exact_info(&to->exm,  &add->exm, env);
alt_merge_opt_exact_info 3947 regcomp.c        alt_merge_opt_exact_info(&to->expr, &add->expr, env);


always_gc

always_gc          92 gc.c           int always_gc = 0;
always_gc         108 gc.c               if (always_gc || malloc_increase > malloc_limit) {
always_gc         156 gc.c               if (always_gc) garbage_collect();
always_gc         386 gc.c               if ((always_gc || !freelist) && !garbage_collect())
always_gc          29 main.c             RUBY_EXTERN int always_gc;
always_gc          30 main.c             always_gc = getenv("RUBY_ALWAYS_GC") != NULL;


and_cclass

and_cclass       4157 regparse.c     	  r = and_cclass(prev_cc, cc, env->enc);
and_cclass       4194 regparse.c         r = and_cclass(prev_cc, cc, env->enc);


and_code_range_buf

and_code_range_buf 1931 regparse.c           r = and_code_range_buf(buf1, not1, buf2, not2, &pbuf);
and_code_range_buf 1986 regparse.c           r = and_code_range_buf(buf1, 0, buf2, 0, &pbuf);


anode

anode            2122 eval.c         	    n = anode;\
anode            2144 eval.c         #define SETUP_ARGS(anode) SETUP_ARGS0(anode, anode->nd_alen)
anode            4131 regparse.c     	Node *anode;
anode            4134 regparse.c     	r = parse_char_class(&anode, tok, &p, end, env);
anode            4136 regparse.c     	acc = &(NCCLASS(anode));
anode            4139 regparse.c     	onig_node_free(anode);


appendline

appendline       1529 io.c               while ((c = appendline(fptr, delim, &str)) != EOF && c != delim);
appendline       1584 io.c           	while ((c = appendline(fptr, newline, &str)) != EOF) {


apply2files

apply2files      1713 file.c             n = apply2files(chmod_internal, rest, (void *)(long)mode);
apply2files      1781 file.c             n = apply2files(lchmod_internal, rest, (void *)(long)mode);
apply2files      1842 file.c             n = apply2files(chown_internal, rest, &arg);
apply2files      1926 file.c             n = apply2files(lchown_internal, rest, &arg);
apply2files      1970 file.c             n = apply2files(utime_internal, rest, tvp);
apply2files      2006 file.c             n = apply2files(utime_internal, rest, &utbuf);
apply2files      2153 file.c             n = apply2files(unlink_internal, args, 0);


apply_seq_in_map

apply_seq_in_map  101 ext/syck/gram.c void apply_seq_in_map( SyckParser *parser, SyckNode *n );
apply_seq_in_map 1495 ext/syck/gram.c                     apply_seq_in_map( (SyckParser *)parser, yyvsp[-1].nodeData );
apply_seq_in_map 1503 ext/syck/gram.c                     apply_seq_in_map( (SyckParser *)parser, yyvsp[-1].nodeData );
apply_seq_in_map 1588 ext/syck/gram.c                     apply_seq_in_map( (SyckParser *)parser, yyvsp[-2].nodeData );


arg_add

arg_add           392 parse.y        #define arg_add_assocs(l,b) arg_add(l, bare_assoc(b))
arg_add          7376 parse.y        	lhs->nd_args = arg_add(lhs->nd_args, rhs);


arg_ambiguous

arg_ambiguous    5413 parse.y            dispatch0(arg_ambiguous);
arg_ambiguous    6012 parse.y        	    if (IS_ARG()) arg_ambiguous();
arg_ambiguous    6055 parse.y        	    if (IS_ARG()) arg_ambiguous();
arg_ambiguous    6354 parse.y        		arg_ambiguous();


arg_blk_pass

arg_blk_pass      280 parse.y        static NODE *arg_blk_pass(NODE*,NODE*);
arg_blk_pass     2195 parse.y        			$$ = arg_blk_pass($1, $2);
arg_blk_pass     2204 parse.y        			$$ = arg_blk_pass($$, $5);
arg_blk_pass     2213 parse.y        			$$ = arg_blk_pass($$, $2);
arg_blk_pass     2223 parse.y        			$$ = arg_blk_pass($$, $5);
arg_blk_pass     2233 parse.y        			$$ = arg_blk_pass($$, $4);
arg_blk_pass     2243 parse.y        			$$ = arg_blk_pass($$, $7);
arg_blk_pass     2252 parse.y        			$$ = arg_blk_pass(NEW_SPLAT($2), $3);
arg_blk_pass     2269 parse.y        			$$ = arg_blk_pass(list_concat(NEW_LIST($1),$3), $4);
arg_blk_pass     2277 parse.y        			$$ = arg_blk_pass($1, $3);
arg_blk_pass     2286 parse.y        			$$ = arg_blk_pass($$, $5);
arg_blk_pass     2296 parse.y        			$$ = arg_blk_pass($$, $7);
arg_blk_pass     2306 parse.y        			$$ = arg_blk_pass($$, $2);
arg_blk_pass     2315 parse.y        			$$ = arg_blk_pass($$, $5);
arg_blk_pass     2325 parse.y        			$$ = arg_blk_pass($$, $4);
arg_blk_pass     2335 parse.y        			$$ = arg_blk_pass($$, $6);
arg_blk_pass     2345 parse.y        			$$ = arg_blk_pass($$, $7);
arg_blk_pass     2356 parse.y        			$$ = arg_blk_pass($$, $9);
arg_blk_pass     2366 parse.y        			$$ = arg_blk_pass(NEW_SPLAT($2), $3);


arg_concat

arg_concat        265 parse.y        static NODE *arg_concat(NODE*,NODE*);
arg_concat       2116 parse.y        			$$ = arg_concat($1, $4);
arg_concat       2203 parse.y        			$$ = arg_concat($1, $4);
arg_concat       2222 parse.y        			$$ = arg_concat(NEW_LIST(NEW_HASH($1)), $4);
arg_concat       2242 parse.y        			$$ = arg_concat(list_append($1, NEW_HASH($3)), $6);
arg_concat       2285 parse.y        			$$ = arg_concat(NEW_LIST($1), $4);
arg_concat       2295 parse.y        			$$ = arg_concat(list_concat(NEW_LIST($1),$3), $6);
arg_concat       2314 parse.y        			$$ = arg_concat(NEW_LIST(NEW_HASH($1)), $4);
arg_concat       2344 parse.y        			$$ = arg_concat(list_append(NEW_LIST($1), NEW_HASH($3)), $6);
arg_concat       2355 parse.y        			$$ = arg_concat(list_append(list_concat(NEW_LIST($1), $3), NEW_HASH($5)), $8);
arg_concat       2453 parse.y        			$$ = arg_concat($1, $4);
arg_concat       7893 parse.y        	return arg_concat(node1, node2->nd_head);


arg_defined

arg_defined      2205 eval.c         		return arg_defined(self, node->nd_args, buf, "super");
arg_defined      2242 eval.c         	    return arg_defined(self, node->nd_args, buf,


arg_dup_check

arg_dup_check    7928 parse.y        	if (arg_dup_check(tmp->nd_head->nd_vid, m, list, tmp)) {
arg_dup_check    7935 parse.y        	if (arg_dup_check(r->nd_vid, m, list, r)) {
arg_dup_check    7941 parse.y        	if (arg_dup_check(b->nd_vid, m, list, b)) {


argf_close

argf_close       4219 io.c           	argf_close(current_file);
argf_close       4288 io.c           	argf_close(current_file);
argf_close       5140 io.c           	    argf_close(current_file);
argf_close       5188 io.c                   argf_close(current_file);
argf_close       5213 io.c           	argf_close(current_file);
argf_close       5294 io.c           	argf_close(current_file);
argf_close       5304 io.c               argf_close(current_file);


argf_each_line

argf_each_line   5590 io.c               rb_define_singleton_method(argf, "each",  argf_each_line, -1);
argf_each_line   5591 io.c               rb_define_singleton_method(argf, "each_line",  argf_each_line, -1);


argf_eof

argf_eof         5607 io.c               rb_define_singleton_method(argf, "eof", argf_eof, 0);
argf_eof         5608 io.c               rb_define_singleton_method(argf, "eof?", argf_eof, 0);


argf_filename

argf_filename    5611 io.c               rb_define_singleton_method(argf, "filename", argf_filename, 0);
argf_filename    5612 io.c               rb_define_singleton_method(argf, "path", argf_filename, 0);


argf_fileno

argf_fileno      5587 io.c               rb_define_singleton_method(argf, "fileno", argf_fileno, 0);
argf_fileno      5588 io.c               rb_define_singleton_method(argf, "to_i", argf_fileno, 0);


argf_forward

argf_forward     4062 io.c                return argf_forward(argc, argv);\
argf_forward     5131 io.c           	tmp = argf_forward(argc, argv);
argf_forward     5177 io.c                   tmp = rb_rescue2(argf_forward, (VALUE)argv,


argf_getc

argf_getc        5227 io.c               c = argf_getc();
argf_getc        5260 io.c               while (!NIL_P(byte = argf_getc())) {
argf_getc        5600 io.c               rb_define_singleton_method(argf, "getc", argf_getc, 0);


argf_getline

argf_getline     4269 io.c           	line = argf_getline(argc, argv);
argf_getline     4352 io.c               while (!NIL_P(line = argf_getline(argc, argv))) {
argf_getline     5248 io.c               while (!NIL_P(str = argf_getline(argc, argv))) {


argf_tell

argf_tell        5602 io.c               rb_define_singleton_method(argf, "tell", argf_tell, 0);
argf_tell        5605 io.c               rb_define_singleton_method(argf, "pos", argf_tell, 0);


ary2list

ary2list          228 ext/tk/tkutil/tkutil.c static VALUE ary2list _((VALUE, VALUE, VALUE));
ary2list          280 ext/tk/tkutil/tkutil.c             str_val = ary2list(val, enc_flag, self);
ary2list          310 ext/tk/tkutil/tkutil.c                     str_val = ary2list(val2, enc_flag, self);
ary2list          425 ext/tk/tkutil/tkutil.c             str_val = ary2list(val, enc_flag, self);
ary2list          811 ext/tk/tkutil/tkutil.c         return ary2list(obj, enc_flag, self);


ary2list2

ary2list2         229 ext/tk/tkutil/tkutil.c static VALUE ary2list2 _((VALUE, VALUE, VALUE));
ary2list2         698 ext/tk/tkutil/tkutil.c     return ary2list2(hash2kv(hash, Qnil, self), Qfalse, self);
ary2list2         707 ext/tk/tkutil/tkutil.c     return ary2list2(hash2kv_enc(hash, Qnil, self), Qfalse, self);


ary_alloc

ary_alloc         117 array.c            ary = ary_alloc(klass);
ary_alloc         227 array.c            VALUE val = ary_alloc(klass);
ary_alloc         378 array.c            VALUE ary = ary_alloc(klass);
ary_alloc         680 array.c            ary2 = ary_alloc(klass);
ary_alloc        2844 array.c            rb_define_alloc_func(rb_cArray, ary_alloc);


ary_make_hash

ary_make_hash    2517 array.c            hash = ary_make_hash(to_ary(ary2), 0);
ary_make_hash    2547 array.c            hash = ary_make_hash(ary2, 0);
ary_make_hash    2579 array.c            hash = ary_make_hash(ary1, ary2);
ary_make_hash    2616 array.c            hash = ary_make_hash(ary, 0);


ary_make_shared

ary_make_shared   229 array.c            ary_make_shared(ary);
ary_make_shared   546 array.c            ary_make_shared(ary);
ary_make_shared   678 array.c            shared = ary_make_shared(ary);
ary_make_shared  2041 array.c            shared = ary_make_shared(orig);


ary_new

ary_new           127 array.c            return ary_new(rb_cArray, len);
ary_new           179 array.c            val = ary_new(rb_cValues, n);
ary_new           195 array.c            val = ary_new(rb_cValues, n);
ary_new           676 array.c            if (len == 0) return ary_new(klass, 0);
ary_new          2237 array.c            if (len == 0) return ary_new(rb_obj_class(ary), 0);
ary_new          2246 array.c            ary2 = ary_new(rb_obj_class(ary), len);


ary_shared_array

ary_shared_array  240 array.c            return ary_shared_array(rb_cValues, ary);
ary_shared_array  246 array.c            return ary_shared_array(rb_cArray, val);
ary_shared_array  439 array.c            result = ary_shared_array(rb_cArray, ary);


ary_shared_first

ary_shared_first  447 array.c            VALUE result = ary_shared_first(argc, argv, ary);
ary_shared_first  582 array.c            result = ary_shared_first(argc, argv, ary);
ary_shared_first  798 array.c        	return ary_shared_first(argc, argv, ary);


ary_shared_last

ary_shared_last   533 array.c            result = ary_shared_last(argc, argv, ary);
ary_shared_last   823 array.c        	return ary_shared_last(argc, argv, ary);


ary_sort_check

ary_sort_check   1484 array.c            ary_sort_check((struct ary_sort_data *)data);
ary_sort_check   1506 array.c            ary_sort_check((struct ary_sort_data *)data);


aryset

aryset           1363 parse.y        			$$ = aryset($1, $3);
aryset           1437 parse.y        			$$ = aryset($1, $3);


aryset_gen

aryset_gen        293 parse.y        static NODE *aryset_gen(struct parser_params*,NODE*,NODE*);
aryset_gen        294 parse.y        #define aryset(node1,node2) aryset_gen(parser, node1, node2)


asctime

asctime          1165 time.c             s = asctime(&tobj->tm);
asctime            53 wince/time.h   char* asctime(const struct tm *tptr);
asctime           294 wince/time_wce.c 	OutputDebugString( asctime(&tm1) );


asinh

asinh             251 math.c             return rb_float_new(asinh(RFLOAT(x)->value));
asinh              30 missing.h      extern double asinh(double);


asn1integer_to_num

asn1integer_to_num  330 ext/openssl/ossl_asn1.c     ret = rb_protect((VALUE(*)_((VALUE)))asn1integer_to_num,
asn1integer_to_num  375 ext/openssl/ossl_asn1.c     ret = rb_protect((VALUE(*)_((VALUE)))asn1integer_to_num,
asn1integer_to_num   28 ext/openssl/ossl_asn1.h VALUE asn1integer_to_num(ASN1_INTEGER *);
asn1integer_to_num  676 ext/openssl/ossl_ocsp.c     return asn1integer_to_num(id->serialNumber);
asn1integer_to_num  833 ext/openssl/ossl_pkcs7.c     return asn1integer_to_num(p7si->issuer_and_serial->serial);
asn1integer_to_num  908 ext/openssl/ossl_pkcs7.c     return asn1integer_to_num(p7ri->issuer_and_serial->serial);
asn1integer_to_num  289 ext/openssl/ossl_x509cert.c     return asn1integer_to_num(X509_get_serialNumber(x509));
asn1integer_to_num  102 ext/openssl/ossl_x509revoked.c     return asn1integer_to_num(rev->serialNumber);


asn1str_to_str

asn1str_to_str     23 ext/openssl/ossl_asn1.h VALUE asn1str_to_str(ASN1_STRING *);
asn1str_to_str    918 ext/openssl/ossl_pkcs7.c     return asn1str_to_str(p7ri->enc_key);


asn1time_to_time

asn1time_to_time  437 ext/openssl/ossl_asn1.c     ret = rb_protect((VALUE(*)_((VALUE)))asn1time_to_time,
asn1time_to_time   17 ext/openssl/ossl_asn1.h VALUE asn1time_to_time(ASN1_TIME *);
asn1time_to_time  543 ext/openssl/ossl_ocsp.c 	rb_ary_push(ary, revtime ? asn1time_to_time(revtime) : Qnil);
asn1time_to_time  544 ext/openssl/ossl_ocsp.c 	rb_ary_push(ary, thisupd ? asn1time_to_time(thisupd) : Qnil);
asn1time_to_time  545 ext/openssl/ossl_ocsp.c 	rb_ary_push(ary, nextupd ? asn1time_to_time(nextupd) : Qnil);
asn1time_to_time  848 ext/openssl/ossl_pkcs7.c 	return asn1time_to_time(asn1obj->value.utctime);
asn1time_to_time  390 ext/openssl/ossl_x509cert.c     return asn1time_to_time(asn1time);
asn1time_to_time  419 ext/openssl/ossl_x509cert.c     return asn1time_to_time(asn1time);
asn1time_to_time  212 ext/openssl/ossl_x509crl.c     return asn1time_to_time(X509_CRL_get_lastUpdate(crl));
asn1time_to_time  237 ext/openssl/ossl_x509crl.c     return asn1time_to_time(X509_CRL_get_nextUpdate(crl));
asn1time_to_time  123 ext/openssl/ossl_x509revoked.c     return asn1time_to_time(rev->revocationDate);


assert

assert             47 ext/digest/rmd160/rmd160.c #define _DIAGASSERT(cond)	assert(cond)
assert             34 ext/digest/rmd160/rmd160hl.c #define _DIAGASSERT(cond)	assert(cond)
assert              9 ext/digest/rmd160/rmd160ossl.c #define _DIAGASSERT(cond)	assert(cond)
assert             35 ext/digest/sha1/sha1.c #define _DIAGASSERT(cond)	assert(cond)
assert             32 ext/digest/sha1/sha1hl.c #define _DIAGASSERT(cond)	assert(cond)
assert              9 ext/digest/sha1/sha1ossl.c #define _DIAGASSERT(cond)	assert(cond)
assert            479 ext/digest/sha2/sha2.c 	assert(context != NULL && data != NULL);
assert            523 ext/digest/sha2/sha2.c 	assert(context != NULL);
assert            775 ext/digest/sha2/sha2.c 	assert(context != NULL && data != NULL);
assert            859 ext/digest/sha2/sha2.c 	assert(context != NULL);
assert            908 ext/digest/sha2/sha2.c 	assert(context != NULL);
assert             64 ext/digest/sha2/sha2hl.c #define _DIAGASSERT(cond)	assert(cond)
assert            106 ext/digest/sha2/sha2hl.c 	assert(ctx != NULL);
assert            166 ext/digest/sha2/sha2hl.c 	assert(ctx != NULL);
assert            226 ext/digest/sha2/sha2hl.c 	assert(ctx != NULL);
assert            121 ext/openssl/ossl.h     assert(newlen <= len);\
assert            956 ext/openssl/ossl_asn1.c     assert(reallen <= length);
assert            233 ext/openssl/ossl_cipher.c     assert(out_len < RSTRING(str)->len);
assert            251 ext/openssl/ossl_cipher.c     assert(out_len <= RSTRING(str)->len);
assert            176 ext/openssl/ossl_pkey.c     assert(buf_len <= RSTRING(str)->len);
assert             56 ext/syck/yaml2byte.c     assert(str && HASH == str->hash);
assert             68 ext/syck/yaml2byte.c         assert(str->buffer);
assert             80 ext/syck/yaml2byte.c     assert( (str->buffer + str->length) - str->remaining );
assert             89 ext/syck/yaml2byte.c     assert(str && HASH == str->hash);
assert             90 ext/syck/yaml2byte.c     assert(ext && HASH == ext->hash);
assert             92 ext/syck/yaml2byte.c         assert(ext->buffer[0] ==YAMLBYTE_ANCHOR);
assert            113 ext/syck/yaml2byte.c         assert( (str->buffer + str->length) - str->remaining );
assert            180 ext/syck/yaml2byte.c                         assert("oops");
assert              4 wince/assert.h void assert( int expression );


assert_array

assert_array      209 ext/racc/cparse/cparse.c static VALUE assert_array _((VALUE a));
assert_array      346 ext/racc/cparse/cparse.c     v->action_table   = assert_array  (RARRAY(arg)->ptr[ 0]);
assert_array      347 ext/racc/cparse/cparse.c     v->action_check   = assert_array  (RARRAY(arg)->ptr[ 1]);
assert_array      348 ext/racc/cparse/cparse.c     v->action_default = assert_array  (RARRAY(arg)->ptr[ 2]);
assert_array      349 ext/racc/cparse/cparse.c     v->action_pointer = assert_array  (RARRAY(arg)->ptr[ 3]);
assert_array      350 ext/racc/cparse/cparse.c     v->goto_table     = assert_array  (RARRAY(arg)->ptr[ 4]);
assert_array      351 ext/racc/cparse/cparse.c     v->goto_check     = assert_array  (RARRAY(arg)->ptr[ 5]);
assert_array      352 ext/racc/cparse/cparse.c     v->goto_default   = assert_array  (RARRAY(arg)->ptr[ 6]);
assert_array      353 ext/racc/cparse/cparse.c     v->goto_pointer   = assert_array  (RARRAY(arg)->ptr[ 7]);
assert_array      355 ext/racc/cparse/cparse.c     v->reduce_table   = assert_array  (RARRAY(arg)->ptr[ 9]);


assert_hash

assert_hash       211 ext/racc/cparse/cparse.c static VALUE assert_hash _((VALUE h));
assert_hash       356 ext/racc/cparse/cparse.c     v->token_table    = assert_hash   (RARRAY(arg)->ptr[10]);


assert_integer

assert_integer    210 ext/racc/cparse/cparse.c static long assert_integer _((VALUE n));
assert_integer    354 ext/racc/cparse/cparse.c     v->nt_base        = assert_integer(RARRAY(arg)->ptr[ 8]);
assert_integer    357 ext/racc/cparse/cparse.c     v->shift_n        = assert_integer(RARRAY(arg)->ptr[11]);
assert_integer    358 ext/racc/cparse/cparse.c     v->reduce_n       = assert_integer(RARRAY(arg)->ptr[12]);


assign

assign           1042 eval.c         static void assign(VALUE,NODE*,VALUE,int);
assign           4761 eval.c         		assign(self, var, val, lambda);
assign           4769 eval.c         		assign(self, bvar, blk, 0);
assign           4974 eval.c         	assign(self, list->nd_head, RARRAY(val)->ptr[i], pcall);
assign           4983 eval.c         	    assign(self, node->nd_args, rb_ary_new4(len-i, RARRAY(val)->ptr+i), pcall);
assign           4986 eval.c         	    assign(self, node->nd_args, rb_ary_new2(0), pcall);
assign           4995 eval.c         	assign(self, list->nd_head, Qnil, pcall);
assign           5548 eval.c         	    assign(recv, opt->nd_head, *argv, 1);
assign           5570 eval.c         	assign(recv, node->nd_rest, v, 1);


assignable

assignable       1355 parse.y        			$$ = assignable($1, 0);
assignable       1429 parse.y        			$$ = assignable($1, 0);
assignable       3942 parse.y        			$$ = assignable($1, 0);
assignable       4155 parse.y        			$$ = assignable($1, $3);
assignable       4194 parse.y        			$$ = assignable($2, 0);
assignable       4228 parse.y        			    $$ = assignable($2, 0);


assignable_gen

assignable_gen    289 parse.y        static NODE *assignable_gen(struct parser_params*,ID,NODE*);
assignable_gen    290 parse.y        #define assignable(id,node) assignable_gen(parser, id, node)


atanh

atanh             268 math.c             d = atanh(RFLOAT(x)->value);
atanh              31 missing.h      extern double atanh(double);


attrset

attrset          1371 parse.y        			$$ = attrset($1, $3);
attrset          1379 parse.y        			$$ = attrset($1, $3);
attrset          1387 parse.y        			$$ = attrset($1, $3);
attrset          1445 parse.y        			$$ = attrset($1, $3);
attrset          1453 parse.y        			$$ = attrset($1, $3);
attrset          1461 parse.y        			$$ = attrset($1, $3);


attrset_gen

attrset_gen       295 parse.y        static NODE *attrset_gen(struct parser_params*,NODE*,ID);
attrset_gen       296 parse.y        #define attrset(node,id) attrset_gen(parser, node, id)


autoload_delete

autoload_delete  1224 variable.c         NODE *load = autoload_delete(klass, id);
autoload_delete  1351 variable.c     	    autoload_delete(mod, id);
autoload_delete  1504 variable.c     		autoload_delete(klass, id);


autoload_file

autoload_file    1274 variable.c         return autoload_file(mod, id);
autoload_file    1448 variable.c     	    if (value == Qundef && NIL_P(autoload_file(klass, id)))


backtrace

backtrace        6042 eval.c             return backtrace(lev);
backtrace        6051 eval.c             ary = backtrace(-1);
backtrace        6060 eval.c             return backtrace(-1);
backtrace        6210 eval.c         		    RARRAY(errat)->ptr[0] = RARRAY(backtrace(-2))->ptr[0];
backtrace        2298 ext/tk/tcltklib.c         volatile VALUE backtrace;
backtrace        2306 ext/tk/tcltklib.c         if (!NIL_P(backtrace = rb_funcall(exc, ID_backtrace, 0, 0))) {
backtrace        2307 ext/tk/tcltklib.c             backtrace = rb_ary_join(backtrace, rb_str_new2("\n"));
backtrace        2308 ext/tk/tcltklib.c             Tcl_AddErrorInfo(interp, StringValuePtr(backtrace));


backward_search_range

backward_search_range 3410 regexec.c      	  if (backward_search_range(reg, str, end, sch_start, range, adjrange,
backward_search_range 3440 regexec.c      	if (backward_search_range(reg, str, end, sch_start, range, adjrange,


bad

bad               314 bignum.c       	if (badcheck) goto bad;
bad               332 bignum.c       	if (badcheck) goto bad;
bad               414 bignum.c       	    if (end == str) goto bad; /* no number */
bad               416 bignum.c       	    if (*end) goto bad;	      /* trailing garbage */
bad               434 bignum.c           if (badcheck && *str == '_') goto bad;
bad               442 bignum.c       		if (nondigit) goto bad;
bad               481 bignum.c       	if (s+1 < str && str[-1] == '_') goto bad;
bad               484 bignum.c       	  bad:
bad               255 ext/sdbm/_sdbm.c 	if (db == NULL || bad(key))
bad               269 ext/sdbm/_sdbm.c 	if (db == NULL || bad(key))
bad               300 ext/sdbm/_sdbm.c 	if (db == NULL || bad(key))
bad               195 ext/socket/getaddrinfo.c #define ERR(err) { error = (err); goto bad; }
bad               535 ext/socket/getaddrinfo.c  bad:
bad               629 ext/socket/getaddrinfo.c 		goto bad;
bad               690 ext/socket/getaddrinfo.c  bad:
bad                39 ext/syck/handler.c         SyckNode *bad;
bad                40 ext/syck/handler.c         if ( st_lookup( p->bad_anchors, (st_data_t)a, (st_data_t *)&bad ) )
bad                44 ext/syck/handler.c                 n->id = bad->id;
bad              2073 object.c       	  bad:
bad              2087 object.c       		    if (n == buf || !ISDIGIT(n[-1])) goto bad;
bad              2089 object.c       		    if (!ISDIGIT(*p)) goto bad;
bad              2106 object.c       	    if (p == end) goto bad;
bad              2108 object.c       	    if (*end) goto bad;
bad              2595 regparse.c     	if (x == bad) return 0;


base64_conv

base64_conv       324 ext/nkf/nkf-utf8/nkf.c STATIC  void    base64_conv PROTO((int c2,int c1));
base64_conv      1853 ext/nkf/nkf-utf8/nkf.c 	    o_base64conv = oconv; oconv = base64_conv;


base64decode

base64decode      348 ext/nkf/nkf-utf8/nkf.c STATIC  int     base64decode PROTO((int c));
base64decode     4260 ext/nkf/nkf-utf8/nkf.c     t1 = 0x3f & base64decode(c1);
base64decode     4261 ext/nkf/nkf-utf8/nkf.c     t2 = 0x3f & base64decode(c2);
base64decode     4262 ext/nkf/nkf-utf8/nkf.c     t3 = 0x3f & base64decode(c3);
base64decode     4263 ext/nkf/nkf-utf8/nkf.c     t4 = 0x3f & base64decode(c4);


bbuf_clone

bbuf_clone       1742 regparse.c     	return bbuf_clone(pbuf, bbuf2);
bbuf_clone       1758 regparse.c         r = bbuf_clone(pbuf, bbuf2);
bbuf_clone       1824 regparse.c           return bbuf_clone(pbuf, bbuf2);
bbuf_clone       1829 regparse.c           return bbuf_clone(pbuf, bbuf1);


bbuf_free

bbuf_free        1012 regparse.c             bbuf_free(cc->mbuf);
bbuf_free        1884 regparse.c           bbuf_free(cc->mbuf);
bbuf_free        1936 regparse.c     	  bbuf_free(pbuf);
bbuf_free        1939 regparse.c     	bbuf_free(pbuf);
bbuf_free        1946 regparse.c         bbuf_free(buf1);
bbuf_free        1994 regparse.c     	  bbuf_free(pbuf);
bbuf_free        1997 regparse.c     	bbuf_free(pbuf);
bbuf_free        2004 regparse.c         bbuf_free(buf1);
bbuf_free        4159 regparse.c     	  bbuf_free(cc->mbuf);
bbuf_free        4196 regparse.c         bbuf_free(cc->mbuf);
bbuf_free        4228 regparse.c         bbuf_free(cc->mbuf);


before_exec

before_exec       967 process.c          before_exec();
before_exec      1001 process.c          before_exec();
before_exec      1017 process.c      	    before_exec();
before_exec      1025 process.c      	    before_exec();
before_exec      1034 process.c      	    before_exec();
before_exec      1106 process.c          before_exec();
before_exec      1144 process.c      	    before_exec();


big2ull

big2ull           775 bignum.c           unsigned LONG_LONG num = big2ull(x, "unsigned long long");
big2ull           784 bignum.c           unsigned LONG_LONG num = big2ull(x, "long long");


big2ulong

big2ulong         719 bignum.c           unsigned long num = big2ulong(x, "unsigned long", Qfalse);
big2ulong         729 bignum.c           unsigned long num = big2ulong(x, "unsigned long", Qtrue);
big2ulong         743 bignum.c           unsigned long num = big2ulong(x, "long", Qtrue);


bigadd

bigadd           1122 bignum.c       	return bignorm(bigadd(x, y, 1));
bigadd           1147 bignum.c       	return bignorm(bigadd(x, y, 0));
bigadd           1349 bignum.c       	if (divp) *divp = bigadd(*divp, rb_int2big(1), 0);
bigadd           1350 bignum.c       	if (modp) *modp = bigadd(mod, y, 1);


bigdivmod

bigdivmod        1385 bignum.c           bigdivmod(x, y, &z, 0);
bigdivmod        1415 bignum.c           bigdivmod(x, y, 0, &z);
bigdivmod        1473 bignum.c           bigdivmod(x, y, &div, &mod);


bigdivrem

bigdivrem        1347 bignum.c           bigdivrem(x, y, divp, &mod);
bigdivrem        1445 bignum.c           bigdivrem(x, y, 0, &z);


bignew

bignew            132 bignum.c           big = bignew(DIGSPERLONG, 1);
bignew            227 bignum.c           big = bignew(DIGSPERLL, 1);
bignew            281 bignum.c           VALUE big = bignew(QUAD_SIZE/SIZEOF_BDIGITS, 1);
bignew            436 bignum.c           z = bignew(len, sign);
bignew            528 bignum.c           big = bignew(DIGSPERLL, 1);
bignew            816 bignum.c           z = bignew(i, d>=0);
bignew           1043 bignum.c           z = bignew(RBIGNUM(x)->len, z==0);
bignew           1084 bignum.c           z = bignew(len, sign);
bignew           1181 bignum.c           z = bignew(j, RBIGNUM(x)->sign==RBIGNUM(y)->sign);
bignew           1251 bignum.c           z = bignew(nx==ny?nx+2:nx+1, RBIGNUM(x)->sign==RBIGNUM(y)->sign);
bignew           1612 bignum.c           z = bignew(l2, RBIGNUM(x)->sign || RBIGNUM(y)->sign);
bignew           1668 bignum.c           z = bignew(l2, RBIGNUM(x)->sign && RBIGNUM(y)->sign);
bignew           1728 bignum.c           z = bignew(l2, !(RBIGNUM(x)->sign ^ RBIGNUM(y)->sign));
bignew           1764 bignum.c           z = bignew(len+s1+1, RBIGNUM(x)->sign);
bignew           1812 bignum.c           z = bignew(j, RBIGNUM(x)->sign);


bignew_1

bignew_1           53 bignum.c       #define bignew(len,sign) bignew_1(rb_cBignum,len,sign)
bignew_1           58 bignum.c           VALUE z = bignew_1(CLASS_OF(x), RBIGNUM(x)->len, RBIGNUM(x)->sign);


bignorm

bignorm           121 bignum.c           return bignorm(x);
bignorm           241 bignum.c           return bignorm(big);
bignorm           295 bignum.c           return bignorm(big);
bignorm           429 bignum.c       	    return bignorm(big);
bignorm           489 bignum.c           return bignorm(z);
bignorm           831 bignum.c           return bignorm(dbl2big(d));
bignorm           984 bignum.c           return bignorm(z);
bignorm          1015 bignum.c           return bignorm(z);
bignorm          1122 bignum.c       	return bignorm(bigadd(x, y, 1));
bignorm          1147 bignum.c       	return bignorm(bigadd(x, y, 0));
bignorm          1211 bignum.c           return bignorm(rb_big_mul0(x, y));
bignorm          1387 bignum.c           return bignorm(z);
bignorm          1417 bignum.c           return bignorm(z);
bignorm          1447 bignum.c           return bignorm(z);
bignorm          1475 bignum.c           return rb_assoc_new(bignorm(div), bignorm(mod));
bignorm          1559 bignum.c       	    return bignorm(z);
bignorm          1622 bignum.c           return bignorm(z);
bignorm          1679 bignum.c           return bignorm(z);
bignorm          1739 bignum.c           return bignorm(z);
bignorm          1776 bignum.c           return bignorm(z);
bignorm          1825 bignum.c           return bignorm(z);


bigsub

bigsub           1073 bignum.c       	if (sign) return bigsub(y, x);
bigsub           1074 bignum.c       	return bigsub(x, y);


bind

bind             7929 eval.c             VALUE bind;
bind             7932 eval.c             bind = Data_Make_Struct(rb_obj_class(self),struct BLOCK,blk_mark,blk_free,data);
bind             7933 eval.c             CLONESETUP(bind, self);
bind             7936 eval.c             return bind;
bind             7947 eval.c             VALUE bind;
bind             7950 eval.c             bind = Data_Make_Struct(rb_obj_class(self),struct BLOCK,blk_mark,blk_free,data);
bind             7953 eval.c             return bind;
bind             7977 eval.c             VALUE bind;
bind             7980 eval.c             bind = Data_Make_Struct(rb_cBinding,struct BLOCK,blk_mark,blk_free,data);
bind             8009 eval.c             return bind;
bind             8035 eval.c             args[1] = bind;
bind             8036 eval.c             Data_Get_Struct(bind, struct BLOCK, data);
bind             8504 eval.c             VALUE bind;
bind             8507 eval.c             bind = Data_Make_Struct(rb_cBinding,struct BLOCK,blk_mark,blk_free,data);
bind             8518 eval.c             return bind;
bind             1187 ext/socket/socket.c 	    status = bind(fd, res->ai_addr, res->ai_addrlen);
bind             1192 ext/socket/socket.c 		status = bind(fd, arg->local.res->ai_addr, arg->local.res->ai_addrlen);
bind             1488 ext/socket/socket.c         status = bind(fd, (struct sockaddr*)&sockaddr, sizeof(sockaddr));
bind             1642 ext/socket/socket.c 	if (bind(fptr->fd, res->ai_addr, res->ai_addrlen) < 0) {
bind             2357 ext/socket/socket.c     if (bind(fptr->fd, (struct sockaddr*)RSTRING(addr)->ptr, RSTRING(addr)->len) < 0)
bind             2225 win32/win32.c  	r = bind(TO_SOCKET(s), addr, addrlen);
bind             2679 win32/win32.c  	    if (bind(svr, addr, len) < 0)


bitset_copy

bitset_copy      1919 regparse.c         bitset_copy(dest->bs, bsr1);
bitset_copy      1977 regparse.c         bitset_copy(dest->bs, bsr1);


bitset_invert

bitset_invert    1878 regparse.c         bitset_invert(cc->bs);
bitset_invert    1923 regparse.c         bitset_invert(dest->bs);
bitset_invert    1981 regparse.c         bitset_invert(dest->bs);


bitset_invert_to

bitset_invert_to 1910 regparse.c         bitset_invert_to(bsr1, bs1);
bitset_invert_to 1914 regparse.c         bitset_invert_to(bsr2, bs2);
bitset_invert_to 1968 regparse.c         bitset_invert_to(bsr1, bs1);
bitset_invert_to 1972 regparse.c         bitset_invert_to(bsr2, bs2);


bitset_is_empty

bitset_is_empty   561 regcomp.c          if (ONIGENC_MBC_MINLEN(reg->enc) > 1 || bitset_is_empty(cc->bs)) {
bitset_is_empty   597 regcomp.c          if (ONIGENC_MBC_MINLEN(reg->enc) > 1 || bitset_is_empty(cc->bs)) {


bitset_on_num

bitset_on_num    5251 regcomp.c            n = bitset_on_num((BitSetRef )bp);
bitset_on_num    5257 regcomp.c            n = bitset_on_num((BitSetRef )bp);
bitset_on_num    5276 regcomp.c            n = bitset_on_num((BitSetRef )bp);
bitset_on_num    5293 regcomp.c              n = bitset_on_num(cc->bs);


bitset_set_range

bitset_set_range 3838 regparse.c     	bitset_set_range(cc->bs, (int )*vs, (int )v);
bitset_set_range 3855 regparse.c     	bitset_set_range(cc->bs, (int )*vs, (int )(v < 0xff ? v : 0xff));


blk

blk              4764 eval.c         		VALUE blk;
blk              4766 eval.c         		    blk = block->block_obj;
blk              4768 eval.c         		    blk = rb_block_proc();
blk              4769 eval.c         		assign(self, bvar, blk, 0);
blk                65 ext/digest/sha1/sha1.c #define R1(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30);
blk                66 ext/digest/sha1/sha1.c #define R2(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30);
blk                67 ext/digest/sha1/sha1.c #define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30);
blk                68 ext/digest/sha1/sha1.c #define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30);


blk_copy_prev

blk_copy_prev    7914 eval.c         	blk_copy_prev(dup);
blk_copy_prev    7994 eval.c         	blk_copy_prev(data);
blk_copy_prev    8103 eval.c         	blk_copy_prev(data);
blk_copy_prev    8512 eval.c         	blk_copy_prev(data);
blk_copy_prev    11750 eval.c         	blk_copy_prev(&dummy);


blk_dup

blk_dup          7934 eval.c             blk_dup(data, orig);
blk_dup          7951 eval.c             blk_dup(data, orig);


blk_free

blk_free         2369 eval.c         static void blk_free(struct BLOCK *data);
blk_free         2374 eval.c             if (TYPE(proc) == T_DATA && RDATA(proc)->dfree == (RUBY_DATA_FUNC)blk_free) {
blk_free         7932 eval.c             bind = Data_Make_Struct(rb_obj_class(self),struct BLOCK,blk_mark,blk_free,data);
blk_free         7950 eval.c             bind = Data_Make_Struct(rb_obj_class(self),struct BLOCK,blk_mark,blk_free,data);
blk_free         7980 eval.c             bind = Data_Make_Struct(rb_cBinding,struct BLOCK,blk_mark,blk_free,data);
blk_free         8094 eval.c             block = Data_Make_Struct(klass, struct BLOCK, blk_mark, blk_free, data);
blk_free         8507 eval.c             bind = Data_Make_Struct(rb_cBinding,struct BLOCK,blk_mark,blk_free,data);
blk_free         11776 eval.c         	blk_free(saved_block);


blk_mark

blk_mark         7932 eval.c             bind = Data_Make_Struct(rb_obj_class(self),struct BLOCK,blk_mark,blk_free,data);
blk_mark         7950 eval.c             bind = Data_Make_Struct(rb_obj_class(self),struct BLOCK,blk_mark,blk_free,data);
blk_mark         7980 eval.c             bind = Data_Make_Struct(rb_cBinding,struct BLOCK,blk_mark,blk_free,data);
blk_mark         8094 eval.c             block = Data_Make_Struct(klass, struct BLOCK, blk_mark, blk_free, data);
blk_mark         8404 eval.c             if (RDATA(other)->dmark != (RUBY_DATA_FUNC)blk_mark) return Qfalse;
blk_mark         8507 eval.c             bind = Data_Make_Struct(rb_cBinding,struct BLOCK,blk_mark,blk_free,data);
blk_mark         9331 eval.c             else if (RDATA(body)->dmark == (RUBY_DATA_FUNC)blk_mark) {


block_append

block_append      247 node.h         #define NEW_RFUNC(b1,b2) NEW_SCOPE(block_append(b1,b2))
block_append      262 parse.y        static NODE *block_append(NODE*,NODE*);
block_append      643 parse.y        			ruby_eval_tree = block_append(ruby_eval_tree, $2);
block_append      666 parse.y        			    $$ = block_append($$, $3);
block_append      673 parse.y        				$$ = block_append($4, NEW_NIL());
block_append      717 parse.y        			$$ = block_append($1, newline_node(remove_begin($3)));
block_append      855 parse.y        			ruby_eval_tree_begin = block_append(ruby_eval_tree_begin,
block_append     1148 parse.y        			$3->nd_body = block_append($3->nd_body,
block_append     1591 parse.y        			$$ = block_append($1, NEW_UNDEF($4));
block_append     2709 parse.y        			$$ = block_append($2, $5);
block_append     3182 parse.y        			$$ = block_append($1, $3);
block_append     3217 parse.y        			$$->nd_body = block_append($$->nd_body, $5);
block_append     3271 parse.y        			$3->nd_body = block_append($3->nd_body,
block_append     3409 parse.y        			$3->nd_body = block_append($3->nd_body,
block_append     3435 parse.y        			$3->nd_body = block_append($3->nd_body,
block_append     3497 parse.y        			    $5 = block_append($3, $5);
block_append     4174 parse.y        			$$ = block_append($1, $3);
block_append     7947 parse.y            return block_append(NEW_ARGS(m, o, r), b);
block_append     8194 parse.y            return block_append(var, node);
block_append     8211 parse.y            node = block_append(node,
block_append     8231 parse.y        	node = block_append(NEW_GASGN(rb_intern("$F"),
block_append     8237 parse.y        	node = block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")),


block_dup_check

block_dup_check   260 parse.y        static void block_dup_check(NODE*);
block_dup_check  1173 parse.y        			    block_dup_check($$);
block_dup_check  1197 parse.y        			    block_dup_check($$);
block_dup_check  1221 parse.y        			    block_dup_check($$);
block_dup_check  2621 parse.y        			block_dup_check($$);
block_dup_check  3285 parse.y        			block_dup_check($1);


block_pass

block_pass        212 eval.c         static VALUE block_pass(VALUE,NODE*);
block_pass       2975 eval.c         	result = block_pass(self, node);


bm_init_skip

bm_init_skip      178 ext/stringio/stringio.c static void bm_init_skip _((long *, const char *, long));
bm_init_skip      886 ext/stringio/stringio.c 		bm_init_skip(skip, p, n);


bm_mark

bm_mark          8662 eval.c             method = Data_Make_Struct(mklass, struct METHOD, bm_mark, -1, data);
bm_mark          8714 eval.c             if (TYPE(other) != T_DATA || RDATA(other)->dmark != (RUBY_DATA_FUNC)bm_mark)
bm_mark          8767 eval.c             method = Data_Make_Struct(rb_cUnboundMethod, struct METHOD, bm_mark, free, data);
bm_mark          8862 eval.c             clone = Data_Make_Struct(CLASS_OF(self),struct METHOD, bm_mark, free, data);
bm_mark          9021 eval.c             method = Data_Make_Struct(rb_cMethod,struct METHOD,bm_mark,free,bound);
bm_mark          9251 eval.c             if (TYPE(m) == T_DATA && RDATA(m)->dmark == (RUBY_DATA_FUNC)bm_mark) {
bm_mark          9317 eval.c             if (RDATA(body)->dmark == (RUBY_DATA_FUNC)bm_mark) {


bm_search

bm_search         179 ext/stringio/stringio.c static long bm_search _((const char *, long, const char *, long, const long *));
bm_search         887 ext/stringio/stringio.c 		if ((pos = bm_search(p, n, s, e - s, skip)) >= 0) {
bm_search        2992 regexec.c          p = bm_search(reg, reg->exact, reg->exact_end, p, end, range);


bmcall

bmcall           4637 eval.c         static VALUE bmcall(VALUE, VALUE);
bmcall           4777 eval.c         	      node->nd_cfnc != bmcall)) {
bmcall           8335 eval.c         	    data->body->nd_cfnc == bmcall) {
bmcall           9238 eval.c             proc = rb_iterate((VALUE(*)(VALUE))mproc, 0, bmcall, method);


bn_rand_range

bn_rand_range     268 ext/openssl/openssl_missing.c     return bn_rand_range(0, r, range);
bn_rand_range     276 ext/openssl/openssl_missing.c     return bn_rand_range(1, r, range);


boot_defclass

boot_defclass    2370 object.c           rb_cObject = boot_defclass("Object", 0);
boot_defclass    2371 object.c           rb_cModule = boot_defclass("Module", rb_cObject);
boot_defclass    2372 object.c           rb_cClass =  boot_defclass("Class",  rb_cModule);


break_jump

break_jump       3041 eval.c         	break_jump(rb_eval(self, node->nd_stts));
break_jump       4334 eval.c             break_jump(Qnil);


broken_getc

broken_getc       336 ext/nkf/nkf-utf8/nkf.c STATIC  int     broken_getc PROTO((FILE *f));
broken_getc      1908 ext/nkf/nkf-utf8/nkf.c 	i_bgetc = i_getc; i_getc = broken_getc;


broken_ungetc

broken_ungetc     337 ext/nkf/nkf-utf8/nkf.c STATIC  int     broken_ungetc PROTO((int c,FILE *f));
broken_ungetc    1909 ext/nkf/nkf-utf8/nkf.c 	i_bungetc = i_ungetc; i_ungetc = broken_ungetc;


bsock_send

bsock_send       1665 ext/socket/socket.c 	return bsock_send(argc, argv, sock);
bsock_send       3163 ext/socket/socket.c     rb_define_method(rb_cBasicSocket, "send", bsock_send, -1);


bytestring_append

bytestring_append   96 ext/syck/yaml2byte.c         bytestring_append(str, YAMLBYTE_ALIAS, ext->buffer + 1, curr);
bytestring_append  134 ext/syck/yaml2byte.c     if(n->anchor) bytestring_append(val,YAMLBYTE_ANCHOR, n->anchor, NULL);
bytestring_append  139 ext/syck/yaml2byte.c             bytestring_append(val,YAMLBYTE_TRANSFER, n->type_id, NULL);
bytestring_append  147 ext/syck/yaml2byte.c             bytestring_append( val, YAMLBYTE_TRANSFER, type_tag, NULL);
bytestring_append  162 ext/syck/yaml2byte.c                         bytestring_append(val, nextcode, start, current);
bytestring_append  172 ext/syck/yaml2byte.c                         bytestring_append(val,YAMLBYTE_NEWLINE,NULL,NULL);
bytestring_append  176 ext/syck/yaml2byte.c                         bytestring_append(val,YAMLBYTE_NULLCHAR,NULL,NULL);
bytestring_append  187 ext/syck/yaml2byte.c             bytestring_append(val,YAMLBYTE_SEQUENCE,NULL,NULL);
bytestring_append  194 ext/syck/yaml2byte.c             bytestring_append(val,YAMLBYTE_END_BRANCH,NULL,NULL);
bytestring_append  197 ext/syck/yaml2byte.c             bytestring_append(val,YAMLBYTE_MAPPING,NULL,NULL);
bytestring_append  207 ext/syck/yaml2byte.c             bytestring_append(val,YAMLBYTE_END_BRANCH,NULL,NULL);


bytestring_extend

bytestring_extend  192 ext/syck/yaml2byte.c                 bytestring_extend(val, sav);
bytestring_extend  202 ext/syck/yaml2byte.c                 bytestring_extend(val, sav);
bytestring_extend  205 ext/syck/yaml2byte.c                 bytestring_extend(val, sav);


bytestring_t

bytestring_t      107 ext/syck/rubyext.c     bytestring_t *sav;
bytestring_t       38 ext/syck/yaml2byte.c bytestring_t *bytestring_alloc() {
bytestring_t       39 ext/syck/yaml2byte.c     bytestring_t *ret;
bytestring_t       41 ext/syck/yaml2byte.c     ret = S_ALLOC(bytestring_t);
bytestring_t       50 ext/syck/yaml2byte.c void bytestring_append(bytestring_t *str, char code,
bytestring_t       82 ext/syck/yaml2byte.c void bytestring_extend(bytestring_t *str, bytestring_t *ext)
bytestring_t      130 ext/syck/yaml2byte.c     bytestring_t *val = NULL;
bytestring_t      131 ext/syck/yaml2byte.c     bytestring_t *sav = NULL;
bytestring_t      220 ext/syck/yaml2byte.c     bytestring_t *sav;


caddr_t

caddr_t          1786 ext/socket/socket.c     msg.msg_control = (caddr_t)&cmsg;
caddr_t          1794 ext/socket/socket.c     msg.msg_accrights = (caddr_t)&fd;
caddr_t          1848 ext/socket/socket.c     msg.msg_control = (caddr_t)&cmsg;
caddr_t          1856 ext/socket/socket.c     msg.msg_accrights = (caddr_t)&fd;


call_DoOneEvent

call_DoOneEvent  1336 ext/tk/tcltklib.c             found_event = RTEST(rb_protect(call_DoOneEvent,
call_DoOneEvent  1456 ext/tk/tcltklib.c                     st = RTEST(rb_protect(call_DoOneEvent,


call_cfunc

call_cfunc       5634 eval.c         		    result = call_cfunc(body->nd_cfnc, recv, len, argc, argv);
call_cfunc       5643 eval.c         		result = call_cfunc(body->nd_cfnc, recv, len, argc, argv);


call_end_proc

call_end_proc    7518 eval.c             rb_set_end_proc(call_end_proc, rb_block_proc());
call_end_proc    7552 eval.c             rb_set_end_proc(call_end_proc, proc);


call_lexer

call_lexer        205 ext/racc/cparse/cparse.c static void call_lexer _((struct cparse_params *v));
call_lexer        262 ext/racc/cparse/cparse.c     call_lexer(v);


call_op

call_op           915 parse.y        				$$->nd_value = call_op(gettable(vid),$2,1,$3);
call_op          1670 parse.y        				$$->nd_value = call_op(gettable(vid),$2,1,$3);
call_op          1825 parse.y        			$$ = call_op($1, '+', 1, $3);
call_op          1833 parse.y        			$$ = call_op($1, '-', 1, $3);
call_op          1841 parse.y        			$$ = call_op($1, '*', 1, $3);
call_op          1849 parse.y        			$$ = call_op($1, '/', 1, $3);
call_op          1857 parse.y        			$$ = call_op($1, '%', 1, $3);
call_op          1865 parse.y        			$$ = call_op($1, tPOW, 1, $3);
call_op          1873 parse.y        			$$ = call_op(call_op($2, tPOW, 1, $4), tUMINUS, 0, 0);
call_op          1882 parse.y        			$$ = call_op(call_op($2, tPOW, 1, $4), tUMINUS, 0, 0);
call_op          1895 parse.y        			    $$ = call_op($2, tUPLUS, 0, 0);
call_op          1904 parse.y        			$$ = call_op($2, tUMINUS, 0, 0);
call_op          1912 parse.y        			$$ = call_op($1, '|', 1, $3);
call_op          1920 parse.y        			$$ = call_op($1, '^', 1, $3);
call_op          1928 parse.y        			$$ = call_op($1, '&', 1, $3);
call_op          1936 parse.y        			$$ = call_op($1, tCMP, 1, $3);
call_op          1944 parse.y        			$$ = call_op($1, '>', 1, $3);
call_op          1952 parse.y        			$$ = call_op($1, tGEQ, 1, $3);
call_op          1960 parse.y        			$$ = call_op($1, '<', 1, $3);
call_op          1968 parse.y        			$$ = call_op($1, tLEQ, 1, $3);
call_op          1976 parse.y        			$$ = call_op($1, tEQ, 1, $3);
call_op          1984 parse.y        			$$ = call_op($1, tEQQ, 1, $3);
call_op          1992 parse.y        			$$ = NEW_NOT(call_op($1, tEQ, 1, $3));
call_op          2024 parse.y        			$$ = call_op($2, '~', 0, 0);
call_op          2032 parse.y        			$$ = call_op($1, tLSHFT, 1, $3);
call_op          2040 parse.y        			$$ = call_op($1, tRSHFT, 1, $3);
call_op          7682 parse.y        	return call_op(node,tEQ,1,NEW_GVAR(rb_intern("$.")));


call_op_gen

call_op_gen       270 parse.y        static NODE *call_op_gen(struct parser_params*,NODE*,ID,int,NODE*);
call_op_gen       271 parse.y        #define call_op(recv,id,narg,arg1) call_op_gen(parser, recv,id,narg,arg1)


call_queue_handler

call_queue_handler 5397 ext/tk/tcltklib.c static int call_queue_handler _((Tcl_Event *, int));
call_queue_handler 5525 ext/tk/tcltklib.c     callq->ev.proc = call_queue_handler;


call_trace_func

call_trace_func  1065 eval.c         static void call_trace_func(rb_event_t,NODE*,VALUE,ID,VALUE);
call_trace_func  2468 eval.c         	rb_remove_event_hook(call_trace_func);
call_trace_func  2476 eval.c         	if (hook->func == call_trace_func)
call_trace_func  2479 eval.c             rb_add_event_hook(call_trace_func, RUBY_EVENT_ALL);


calling_scope_t

calling_scope_t  1038 eval.c         static VALUE rb_call(VALUE,VALUE,ID,int,const VALUE*,calling_scope_t);
calling_scope_t  3243 eval.c         	    calling_scope_t scope;
calling_scope_t  5067 eval.c         	    calling_scope_t scope;
calling_scope_t  5769 eval.c             int argc /* OK */, const VALUE *argv /* OK */, calling_scope_t scope)
calling_scope_t  5832 eval.c         send_funcall(int argc, VALUE *argv, VALUE recv, calling_scope_t scope)
calling_scope_t  5872 eval.c             calling_scope_t scope = (ruby_frame->flags & FRAME_FUNC) ? CALLING_FCALL : CALLING_NORMAL;


calloc

calloc             89 regint.h       #define xcalloc     calloc
calloc             57 st.c           #define Calloc(n,s) (char*)calloc((n),(s))


cap_getc

cap_getc          424 ext/nkf/nkf-utf8/nkf.c STATIC int cap_getc PROTO((FILE *f));
cap_getc         1883 ext/nkf/nkf-utf8/nkf.c         i_cgetc = i_getc; i_getc = cap_getc;


cap_ungetc

cap_ungetc        425 ext/nkf/nkf-utf8/nkf.c STATIC int cap_ungetc PROTO((int c,FILE *f));
cap_ungetc       1884 ext/nkf/nkf-utf8/nkf.c         i_cungetc = i_ungetc; i_ungetc= cap_ungetc;


catch_interrupt

catch_interrupt  2007 win32/win32.c  static void catch_interrupt(void);
catch_interrupt  2033 win32/win32.c  	catch_interrupt();
catch_interrupt  3582 win32/win32.c      catch_interrupt();
catch_interrupt  3607 win32/win32.c  	catch_interrupt();
catch_interrupt  3627 win32/win32.c  	catch_interrupt();


catch_iter

catch_iter        222 ext/racc/cparse/cparse.c static VALUE catch_iter _((VALUE dummy));
catch_iter        661 ext/racc/cparse/cparse.c     code = rb_iterate(catch_iter, Qnil, reduce0, v->value_v);


catch_timer

catch_timer      11581 eval.c             signal(sig, catch_timer);
catch_timer      11629 eval.c             signal(sig, catch_timer);
catch_timer      11718 eval.c         	posix_signal(SIGVTALRM, catch_timer);
catch_timer      11720 eval.c         	signal(SIGVTALRM, catch_timer);


char_size

char_size        3299 ext/nkf/nkf-utf8/nkf.c         f_line += char_size(c2,c1);
char_size        3304 ext/nkf/nkf-utf8/nkf.c                 f_line = char_size(c2,c1);
char_size        3336 ext/nkf/nkf-utf8/nkf.c 		    f_line = char_size(c2,c1);
char_size        3341 ext/nkf/nkf-utf8/nkf.c 		    f_line = char_size(c2,c1);
char_size        3363 ext/nkf/nkf-utf8/nkf.c 			f_line = char_size(c2,c1);
char_size        3367 ext/nkf/nkf-utf8/nkf.c 		    f_line = char_size(c2,c1);


chdir

chdir             680 dir.c              if (chdir(RSTRING(path)->ptr) < 0)
chdir            2280 file.c             if (chdir(drive) == 0) {
chdir            2282 file.c         	chdir(oldcwd);
chdir            2782 process.c      	(void)chdir("/");
chdir             615 ruby.c         	    if (*s && chdir(s) < 0) {
chdir             630 ruby.c         	    if (chdir(s) < 0) {


check3rdbyte

check3rdbyte     1357 file.c             return check3rdbyte(fname, S_ISUID);
check3rdbyte     1374 file.c             return check3rdbyte(fname, S_ISGID);
check3rdbyte     1391 file.c             return check3rdbyte(fname, S_ISVTX);


check_autoload_table

check_autoload_table 1182 variable.c     	tbl = check_autoload_table(av);
check_autoload_table 1203 variable.c     	struct st_table *tbl = check_autoload_table(val);
check_autoload_table 1240 variable.c     	!(tbl = check_autoload_table(val)) || !st_lookup(tbl, id, &load)) {


check_dirname

check_dirname     842 dir.c              check_dirname(&path);
check_dirname     880 dir.c              check_dirname(&path);
check_dirname     899 dir.c              check_dirname(&dir);


check_gid_switch

check_gid_switch 2384 process.c          check_gid_switch();
check_gid_switch 2406 process.c          check_gid_switch();
check_gid_switch 2429 process.c          check_gid_switch();
check_gid_switch 2453 process.c          check_gid_switch();
check_gid_switch 2476 process.c          check_gid_switch();
check_gid_switch 2545 process.c          check_gid_switch();
check_gid_switch 2828 process.c          check_gid_switch();
check_gid_switch 3102 process.c          check_gid_switch();
check_gid_switch 3129 process.c          check_gid_switch();
check_gid_switch 3276 process.c          check_gid_switch();
check_gid_switch 3453 process.c          check_gid_switch();
check_gid_switch 3491 process.c          check_gid_switch();


check_iconv

check_iconv       530 ext/iconv/iconv.c 	iconvctl(VALUE2ICONV(check_iconv(self)), func, (void *)&(val)) ? \
check_iconv       560 ext/iconv/iconv.c     iconv_free(check_iconv(self));
check_iconv       751 ext/iconv/iconv.c     VALUE cd = check_iconv(self);
check_iconv       790 ext/iconv/iconv.c     VALUE cd = check_iconv(self);
check_iconv       812 ext/iconv/iconv.c     iconv_t cd = VALUE2ICONV(check_iconv(self));


check_int

check_int        1531 numeric.c          check_int(num);
check_int        1541 numeric.c          check_int(num);


check_modifiable

check_modifiable   38 ext/stringio/stringio.c static void check_modifiable _((struct StringIO *));
check_modifiable  726 ext/stringio/stringio.c     check_modifiable(ptr);
check_modifiable  997 ext/stringio/stringio.c     check_modifiable(ptr);
check_modifiable 1053 ext/stringio/stringio.c     check_modifiable(ptr);


check_strio

check_strio        34 ext/stringio/stringio.c static struct StringIO* check_strio _((VALUE));
check_strio        89 ext/stringio/stringio.c     struct StringIO *ptr = check_strio(self);
check_strio       217 ext/stringio/stringio.c     struct StringIO *ptr = check_strio(self);
check_strio       500 ext/stringio/stringio.c     if (check_strio(copy)) {


check_strscan

check_strscan      65 ext/strscan/strscan.c void check_strscan _((VALUE obj));
check_strscan     233 ext/strscan/strscan.c     check_strscan(vorig);


check_type_tree

check_type_tree  2437 regcomp.c            r = check_type_tree(NCONS(node).left, type_mask, effect_mask, anchor_mask);
check_type_tree  2442 regcomp.c          r = check_type_tree(NQUALIFIER(node).target, type_mask, effect_mask,
check_type_tree  2452 regcomp.c            r = check_type_tree(en->target, type_mask, effect_mask, anchor_mask);
check_type_tree  2462 regcomp.c            r = check_type_tree(NANCHOR(node).target,
check_type_tree  3274 regcomp.c      	  r = check_type_tree(an->target, ALLOWED_TYPE_IN_LB,
check_type_tree  3286 regcomp.c      	  r = check_type_tree(an->target, ALLOWED_TYPE_IN_LB,


check_uid_switch

check_uid_switch 2048 process.c          check_uid_switch();
check_uid_switch 2071 process.c          check_uid_switch();
check_uid_switch 2093 process.c          check_uid_switch();
check_uid_switch 2117 process.c          check_uid_switch();
check_uid_switch 2141 process.c          check_uid_switch();
check_uid_switch 2182 process.c          check_uid_switch();
check_uid_switch 2236 process.c          check_uid_switch();
check_uid_switch 2993 process.c          check_uid_switch();
check_uid_switch 3019 process.c          check_uid_switch();
check_uid_switch 3219 process.c          check_uid_switch();
check_uid_switch 3344 process.c          check_uid_switch();
check_uid_switch 3383 process.c          check_uid_switch();


check_uint

check_uint       1552 numeric.c      	check_uint(num);
check_uint       1568 numeric.c      	check_uint(num);


chkpage

chkpage            65 ext/sdbm/_sdbm.c static int   chkpage proto((char *));
chkpage           518 ext/sdbm/_sdbm.c 		if (!chkpage(db->pagbuf)) {
chkpage           610 ext/sdbm/_sdbm.c 		if (!chkpage(db->pagbuf)) {


chmod

chmod             880 ext/nkf/nkf-utf8/nkf.c                   if (chmod(outfname, sb.st_mode)) {
chmod             389 ext/pty/pty.c  		chmod(SlaveName, 0622);
chmod             404 ext/pty/pty.c      chmod(SlaveName, 0666);
chmod            1684 file.c             if (chmod(path, (int)mode) < 0)
chmod            1745 file.c             if (chmod(fptr->path, mode) == -1)
chmod            2187 file.c         	    if (chmod(dst, 0666) == 0 &&
chmod            4167 io.c           		    chmod(fn, st.st_mode);
chmod            3908 win32/win32.c  	if (chmod(path, mode) == -1) {


chompdirsep

chompdirsep      2486 file.c         	    p = chompdirsep(skiproot(buf));
chompdirsep      2513 file.c         	    p = chompdirsep(skiproot(buf));
chompdirsep      2640 file.c             l1 = chompdirsep(p) - p;
chompdirsep      2713 file.c         	    f = chompdirsep(name) - name;
chompdirsep      2721 file.c         	    f = chompdirsep(p) - p;
chompdirsep      2808 file.c             extname = rb_str_new(e, chompdirsep(e) - e);	/* keep the dot, too! */
chompdirsep      2902 file.c         	    tail = chompdirsep(name);


chown

chown             388 ext/pty/pty.c  		chown(SlaveName, getuid(), getgid());
chown             405 ext/pty/pty.c      chown(SlaveName, 0, 0);
chown              77 file.c             return chown(path, owner, group);
chown            1801 file.c             if (chown(path, args->owner, args->group) < 0)
chown            1873 file.c             if (chown(fptr->path, o, g) == -1)
chown             203 win32/win32.h  extern int chown(const char *, int, int);


chsize

chsize           2973 file.c         	if (chsize(tmpfd, pos) < 0) {
chsize           3018 file.c             if (chsize(fptr->fd, pos) < 0)


class2path

class2path        368 marshal.c          path = RSTRING(class2path(rb_class_real(klass)))->ptr;
class2path        381 marshal.c      	w_unique(RSTRING(class2path(klass))->ptr, arg);
class2path        493 marshal.c      		VALUE path = class2path(obj);
class2path        501 marshal.c      		VALUE path = class2path(obj);


class_instance_method_list

class_instance_method_list  613 class.c            return class_instance_method_list(argc, argv, mod, ins_methods_i);
class_instance_method_list  628 class.c            return class_instance_method_list(argc, argv, mod, ins_methods_prot_i);
class_instance_method_list  651 class.c            return class_instance_method_list(argc, argv, mod, ins_methods_priv_i);
class_instance_method_list  666 class.c            return class_instance_method_list(argc, argv, mod, ins_methods_pub_i);


class_nest

class_nest        621 parse.y        			if (ruby_class == rb_cObject) class_nest = 0;
class_nest        622 parse.y        			else class_nest = 1;
class_nest        645 parse.y        			class_nest = 0;
class_nest       2746 parse.y        			class_nest++;
class_nest       2762 parse.y        			class_nest--;
class_nest       2782 parse.y        			class_nest++;
class_nest       2797 parse.y        			class_nest--;
class_nest       2812 parse.y        			class_nest++;
class_nest       2828 parse.y        			class_nest--;


class_prefix

class_prefix     3486 eval.c         	    rb_const_set(class_prefix(self, node->nd_else), node->nd_else->nd_mid, result);
class_prefix     3830 eval.c         	    cbase = class_prefix(self, node->nd_cpath);
class_prefix     3888 eval.c         	    cbase = class_prefix(self, node->nd_cpath);
class_prefix     5041 eval.c         	    rb_const_set(class_prefix(self, lhs->nd_else), lhs->nd_else->nd_mid, val);


classname

classname          38 compar.c           const char *classname;
classname          42 compar.c       	classname = StringValuePtr(y);
classname          45 compar.c       	classname = rb_obj_classname(y);
classname          48 compar.c       	     rb_obj_classname(x), classname);
classname         172 variable.c         VALUE path = classname(mod);
classname         181 variable.c         VALUE path = classname(klass);


clear_mml

clear_mml        3592 regcomp.c        clear_mml(&ex->mmd);
clear_mml        3868 regcomp.c        clear_mml(&opt->len);
clear_mml        4388 regcomp.c        clear_mml(&env.mmd);


clear_opt_anc_info

clear_opt_anc_info 3526 regcomp.c        clear_opt_anc_info(to);
clear_opt_anc_info 3593 regcomp.c        clear_opt_anc_info(&ex->anc);
clear_opt_anc_info 3869 regcomp.c        clear_opt_anc_info(&opt->anc);


clear_opt_exact_info

clear_opt_exact_info 3657 regcomp.c          clear_opt_exact_info(to);
clear_opt_exact_info 3662 regcomp.c          clear_opt_exact_info(to);
clear_opt_exact_info 3870 regcomp.c        clear_opt_exact_info(&opt->exb);
clear_opt_exact_info 3871 regcomp.c        clear_opt_exact_info(&opt->exm);
clear_opt_exact_info 3872 regcomp.c        clear_opt_exact_info(&opt->expr);
clear_opt_exact_info 3911 regcomp.c            clear_opt_exact_info(&add->exb);
clear_opt_exact_info 3915 regcomp.c            clear_opt_exact_info(&add->exb);


clear_opt_map_info

clear_opt_map_info 3838 regcomp.c          clear_opt_map_info(to);
clear_opt_map_info 3873 regcomp.c        clear_opt_map_info(&opt->map);


clock

clock             893 missing/strftime.c 	long clock;
clock             897 missing/strftime.c 	clock = time((long *) 0);
clock             898 missing/strftime.c 	tm = localtime(&clock);
clock            3350 win32/win32.c  	tmbuf->tms_utime = clock();
clock              55 wince/time.h   int clock(void);


clone_method

clone_method       86 class.c        	st_foreach(RCLASS(orig)->m_tbl, clone_method,
clone_method      132 class.c        	st_foreach(RCLASS(klass)->m_tbl, clone_method,


close

close             375 dln.c          	close(fd);
close             421 dln.c              close(fd);
close             425 dln.c              close(fd);
close            1069 dln.c              close(fd);
close            1075 dln.c              if (fd >= 0) close(fd);
close            1100 dln.c              close(fd);
close              80 ext/digest/rmd160/rmd160hl.c     close(fd);
close              83 ext/digest/sha1/sha1hl.c     close(fd);
close              92 ext/digest/sha2/sha2hl.c 	close(fd);
close             153 ext/digest/sha2/sha2hl.c 	close(fd);
close             213 ext/digest/sha2/sha2hl.c 	close(fd);
close             717 ext/nkf/nkf-utf8/nkf.c                     close(fds[0]);
close             720 ext/nkf/nkf-utf8/nkf.c                     close(fds[1]);
close             726 ext/nkf/nkf-utf8/nkf.c                 close(fds[1]);
close             729 ext/nkf/nkf-utf8/nkf.c                 close(fds[0]);
close             872 ext/nkf/nkf-utf8/nkf.c                   close(fd);
close              32 ext/openssl/ossl_bio.c 	    close(fd);
close             228 ext/pty/pty.c  	close(master);
close             229 ext/pty/pty.c  	close(slave);
close             254 ext/pty/pty.c  	    close(i);
close             264 ext/pty/pty.c  	close(master);
close             268 ext/pty/pty.c  	close(slave);
close             274 ext/pty/pty.c  	close(master);
close             279 ext/pty/pty.c  	close(slave);
close             291 ext/pty/pty.c      close(slave);
close             374 ext/pty/pty.c  	close(i);
close             392 ext/pty/pty.c  	    close(i);
close             229 ext/sdbm/_sdbm.c 			(void) close(db->dirf);
close             231 ext/sdbm/_sdbm.c 		(void) close(db->pagf);
close             244 ext/sdbm/_sdbm.c 		(void) close(db->dirf);
close             245 ext/sdbm/_sdbm.c 		(void) close(db->pagf);
close             443 ext/socket/getaddrinfo.c 			close(s);
close            1148 ext/socket/socket.c 	close(arg->fd);
close            1204 ext/socket/socket.c 	    close(fd);
close            1497 ext/socket/socket.c 	    close(fd);
close            1503 ext/socket/socket.c 	close(fd);
close            2974 file.c         	    close(tmpfd);
close            2977 file.c         	close(tmpfd);
close            2002 io.c                   if (close(fptr->fd) < 0 && !noraise) {
close            2784 io.c                   close(p->pair[0]);
close            2788 io.c                       close(p->pair[1]);
close            2791 io.c                   close(p->pair[0]);
close            2794 io.c                       close(p->pair[1]);
close            2798 io.c                   close(p->pair[1]);
close            2801 io.c                       close(p->pair[0]);
close            2818 io.c           	close(fd);
close            2894 io.c           	close(arg.pair[0]);
close            2895 io.c           	close(arg.pair[1]);
close            2900 io.c                   close(arg.pair[1]);
close            2904 io.c                   close(arg.pair[1]);
close            2908 io.c                   close(arg.pair[0]);
close            3327 io.c                           close(fptr->fd);
close            3430 io.c                   if (close(fptr->fd) < 0)
close            4136 io.c           			(void)close(fr);
close            4144 io.c           			    close(fr);
close            4156 io.c           			    close(fr);
close            4894 io.c           	close(pipes[0]);
close            4895 io.c           	close(pipes[1]);
close            4902 io.c           	close(pipes[1]);
close              35 missing/dup2.c 			close(fd2);
close              37 missing/dup2.c 		close(fd2);
close              48 missing/dup2.c 	close(fd2);
close              54 missing/dup2.c 	    	close(fds[i--]);
close            1318 process.c      	    preserving_errno((close(ep[0]), close(ep[1])));
close            1341 process.c      		preserving_errno((close(ep[0]), close(ep[1])));
close            1351 process.c      	    close(ep[0]);
close            1367 process.c      	close(ep[1]);
close            1371 process.c      	close(ep[0]);
close            1817 process.c          close(fd);
close            2789 process.c      	    (void)close (n);
close             290 random.c               close(fd);
close              45 wince/io.h     int close(int fd);
close              73 wince/io.h     #define _close	   close


close_mime

close_mime        352 ext/nkf/nkf-utf8/nkf.c STATIC  void    close_mime PROTO(());
close_mime       4446 ext/nkf/nkf-utf8/nkf.c 	    close_mime();
close_mime       4582 ext/nkf/nkf-utf8/nkf.c                 close_mime();


closed_dbm

closed_dbm         42 ext/dbm/dbm.c      if (dbmp == 0) closed_dbm();\
closed_dbm         43 ext/dbm/dbm.c      if (dbmp->di_dbm == 0) closed_dbm();\
closed_dbm         43 ext/gdbm/gdbm.c     if (dbmp == 0) closed_dbm();\
closed_dbm         44 ext/gdbm/gdbm.c     if (dbmp->di_dbm == 0) closed_dbm();\


closed_sdbm

closed_sdbm        34 ext/sdbm/init.c     if (dbmp == 0) closed_sdbm();\
closed_sdbm        35 ext/sdbm/init.c     if (dbmp->di_dbm == 0) closed_sdbm();\


closedir

closedir          361 dir.c          	if (dir->dir) closedir(dir->dir);
closedir          394 dir.c              if (dp->dir) closedir(dp->dir);
closedir          671 dir.c              closedir(dirp->dir);
closedir         1265 dir.c          	closedir(dirp);


cmdarg_stack

cmdarg_stack       97 parse.y        #define CMDARG_PUSH(n)	BITSTACK_PUSH(cmdarg_stack, n)
cmdarg_stack       98 parse.y        #define CMDARG_POP()	BITSTACK_POP(cmdarg_stack)
cmdarg_stack       99 parse.y        #define CMDARG_LEXPOP()	BITSTACK_LEXPOP(cmdarg_stack)
cmdarg_stack      100 parse.y        #define CMDARG_P()	BITSTACK_SET_P(cmdarg_stack)
cmdarg_stack     2375 parse.y        			$<num>$ = cmdarg_stack;
cmdarg_stack     2381 parse.y        			cmdarg_stack = $<num>1;


cmp_gt

cmp_gt            174 compar.c           if (RTEST(cmp_gt(x, max))) return Qfalse;
cmp_gt            220 compar.c           rb_define_method(rb_mComparable, ">", cmp_gt, 1);


cmp_lt

cmp_lt            173 compar.c           if (RTEST(cmp_lt(x, min))) return Qfalse;
cmp_lt            222 compar.c           rb_define_method(rb_mComparable, "<", cmp_lt, 1);


code_score

code_score        329 ext/nkf/nkf-utf8/nkf.c STATIC  void    code_score PROTO((struct input_code *ptr));
code_score       1503 ext/nkf/nkf-utf8/nkf.c     code_score(ptr);
code_score       1562 ext/nkf/nkf-utf8/nkf.c               code_score(ptr);
code_score       1586 ext/nkf/nkf-utf8/nkf.c               code_score(ptr);
code_score       1640 ext/nkf/nkf-utf8/nkf.c               code_score(ptr);
code_score       1742 ext/nkf/nkf-utf8/nkf.c                       code_score(ptr);


code_status

code_status       330 ext/nkf/nkf-utf8/nkf.c STATIC  void    code_status PROTO((int c));
code_status      1960 ext/nkf/nkf-utf8/nkf.c         code_status(c1);
code_status      2031 ext/nkf/nkf-utf8/nkf.c                         code_status(c1);
code_status      2250 ext/nkf/nkf-utf8/nkf.c                 code_status(c0);
code_status      2300 ext/nkf/nkf-utf8/nkf.c         code_status(c1);
code_status      2310 ext/nkf/nkf-utf8/nkf.c             code_status(c1);
code_status      2354 ext/nkf/nkf-utf8/nkf.c             code_status(c1);
code_status      2366 ext/nkf/nkf-utf8/nkf.c                 code_status(c0);


command_start

command_start    5624 parse.y            cmd_state = command_start;
command_start    5625 parse.y            command_start = Qfalse;
command_start    5683 parse.y        	command_start = Qtrue;
command_start    6388 parse.y        	command_start = Qtrue;


comp_distance_value

comp_distance_value 3707 regcomp.c        if (comp_distance_value(&now->mmd, &alt->mmd, v1, v2) > 0)
comp_distance_value 3813 regcomp.c        if (comp_distance_value(&now->mmd, &alt->mmd, v1, v2) > 0)
comp_distance_value 3827 regcomp.c        return comp_distance_value(&e->mmd, &m->mmd, ve, vm);


compare

compare           116 dir.c          # define Compare(p1, p2) (compare(downcase(*(p1)), downcase(*(p2))))
compare           160 dir.c          	    return compare(downcase(*p1), downcase(*p2));
compare           162 dir.c          	    const int ret = compare(downcase(*p1), *p2);
compare           167 dir.c          	    const int ret = compare(*p1, downcase(*p2));
compare            59 st.c           #define EQUAL(table,x,y) ((x)==(y) || (*table->type->compare)((x),(y)) == 0)
compare            15 st.h               int (*compare)();
compare            51 wince/stdlib.c 		if( 0==compare( key, p ) )


compile

compile          1021 eval.c         static NODE *compile(VALUE, const char*, int);
compile          6157 eval.c         	node = compile(src, file, line);
compile            42 missing/alloca.c -- must know STACK_DIRECTION at compile-time


compile_error

compile_error    6160 eval.c         	    compile_error(0);
compile_error    5029 parse.y        	compile_error(PARSER_ARG "unknown regexp option%s - %s",
compile_error    7278 parse.y        	compile_error(PARSER_ARG "invalid local variable - %s",
compile_error    7301 parse.y        	compile_error(PARSER_ARG "both block arg and actual block given");


compile_for_eval

compile_for_eval  632 parse.y        			if ($2 && !compile_for_eval) {
compile_for_eval 4558 parse.y            if (!compile_for_eval && rb_safe_level() == 0 &&
compile_for_eval 4587 parse.y            compile_for_eval = 0;
compile_for_eval 4657 parse.y            compile_for_eval = ruby_in_eval;


compile_length_tree

compile_length_tree  277 regcomp.c      static int compile_length_tree(Node* node, regex_t* reg);
compile_length_tree  695 regcomp.c        int tlen = compile_length_tree(qn->target, reg);
compile_length_tree  770 regcomp.c        int tlen = compile_length_tree(qn->target, reg);
compile_length_tree  898 regcomp.c        tlen = compile_length_tree(node->target, reg);
compile_length_tree  947 regcomp.c          tlen = compile_length_tree(node->target, reg);
compile_length_tree  982 regcomp.c            tlen = compile_length_tree(qn->target, reg);
compile_length_tree 1021 regcomp.c            len = compile_length_tree(node->target, reg);
compile_length_tree 1075 regcomp.c            len = compile_length_tree(qn->target, reg);
compile_length_tree 1111 regcomp.c          tlen = compile_length_tree(node->target, reg);
compile_length_tree 1166 regcomp.c          len = compile_length_tree(node->target, reg);
compile_length_tree 1195 regcomp.c            len = compile_length_tree(node->target, reg);
compile_length_tree 1231 regcomp.c            r = compile_length_tree(NCONS(node).left, reg);
compile_length_tree 1244 regcomp.c      	r += compile_length_tree(NCONS(node).left, reg);
compile_length_tree 1325 regcomp.c      	len += compile_length_tree(NCONS(x).left, reg);
compile_length_tree 1333 regcomp.c      	len = compile_length_tree(NCONS(node).left, reg);


compile_tree

compile_tree      278 regcomp.c      static int compile_tree(Node* node, regex_t* reg);
compile_tree      344 regcomp.c        r = compile_tree(node, reg);
compile_tree      383 regcomp.c          r = compile_tree(node, reg);
compile_tree      860 regcomp.c          r = compile_tree(qn->target, reg);
compile_tree      874 regcomp.c            r = compile_tree(qn->target, reg);
compile_tree      883 regcomp.c          r = compile_tree(qn->target, reg);
compile_tree      927 regcomp.c        r = compile_tree(node->target, reg);
compile_tree     1041 regcomp.c          r = compile_tree(node->target, reg);
compile_tree     1080 regcomp.c            r = compile_tree(qn->target, reg);
compile_tree     1090 regcomp.c            r = compile_tree(node->target, reg);
compile_tree     1160 regcomp.c          r = compile_tree(node->target, reg);
compile_tree     1170 regcomp.c          r = compile_tree(node->target, reg);
compile_tree     1188 regcomp.c            r = compile_tree(node->target, reg);
compile_tree     1207 regcomp.c            r = compile_tree(node->target, reg);
compile_tree     1316 regcomp.c            r = compile_tree(NCONS(node).left, reg);
compile_tree     1338 regcomp.c      	r = compile_tree(NCONS(node).left, reg);
compile_tree     4820 regcomp.c        r = compile_tree(root, reg);


compile_tree_empty_check

compile_tree_empty_check  669 regcomp.c        r = compile_tree_empty_check(qn->target, reg, empty_info);
compile_tree_empty_check  825 regcomp.c      	r = compile_tree_empty_check(qn->target, reg, empty_info);
compile_tree_empty_check  835 regcomp.c      	r = compile_tree_empty_check(qn->target, reg, empty_info);
compile_tree_empty_check  843 regcomp.c      	r = compile_tree_empty_check(qn->target, reg, empty_info);
compile_tree_empty_check  852 regcomp.c            r = compile_tree_empty_check(qn->target, reg, empty_info);


compile_tree_n_times

compile_tree_n_times  775 regcomp.c          r = compile_tree_n_times(qn->target, qn->lower, reg);
compile_tree_n_times  815 regcomp.c            r = compile_tree_n_times(qn->target, qn->lower, reg);
compile_tree_n_times  867 regcomp.c          r = compile_tree_n_times(qn->target, qn->lower, reg);
compile_tree_n_times 1072 regcomp.c            r = compile_tree_n_times(qn->target, qn->lower, reg);


concat_opt_anc_info

concat_opt_anc_info 3624 regcomp.c        concat_opt_anc_info(&tanc, &to->anc, &add->anc, 1, 1);
concat_opt_anc_info 3888 regcomp.c        concat_opt_anc_info(&tanc, &to->anc, &add->anc, to->len.max, add->len.max);
concat_opt_anc_info 3892 regcomp.c          concat_opt_anc_info(&tanc, &to->anc, &add->exb.anc,


concat_opt_exact_info

concat_opt_exact_info 3910 regcomp.c            concat_opt_exact_info(&to->exb, &add->exb);
concat_opt_exact_info 3914 regcomp.c            concat_opt_exact_info(&to->exm, &add->exb);
concat_opt_exact_info 4213 regcomp.c      		concat_opt_exact_info(&opt->exb, &nopt.exb);


concat_opt_exact_info_str

concat_opt_exact_info_str 4006 regcomp.c      	concat_opt_exact_info_str(&opt->exb, sn->s, sn->end,
concat_opt_exact_info_str 4016 regcomp.c              concat_opt_exact_info_str(&opt->exb, sn->s, sn->end,


cond

cond               47 ext/digest/rmd160/rmd160.c #define _DIAGASSERT(cond)	assert(cond)
cond               34 ext/digest/rmd160/rmd160hl.c #define _DIAGASSERT(cond)	assert(cond)
cond                9 ext/digest/rmd160/rmd160ossl.c #define _DIAGASSERT(cond)	assert(cond)
cond               35 ext/digest/sha1/sha1.c #define _DIAGASSERT(cond)	assert(cond)
cond               32 ext/digest/sha1/sha1hl.c #define _DIAGASSERT(cond)	assert(cond)
cond                9 ext/digest/sha1/sha1ossl.c #define _DIAGASSERT(cond)	assert(cond)
cond               64 ext/digest/sha2/sha2hl.c #define _DIAGASSERT(cond)	assert(cond)
cond             2377 file.c             while (cond) {\
cond              776 parse.y        			$$ = NEW_IF(cond($3), $1, 0);
cond              789 parse.y        			$$ = NEW_UNLESS(cond($3), $1, 0);
cond              803 parse.y        			    $$ = NEW_WHILE(cond($3), $1->nd_body, 0);
cond              806 parse.y        			    $$ = NEW_WHILE(cond($3), $1, 1);
cond              819 parse.y        			    $$ = NEW_UNTIL(cond($3), $1->nd_body, 0);
cond              822 parse.y        			    $$ = NEW_UNTIL(cond($3), $1, 1);
cond             1059 parse.y        			$$ = NEW_NOT(cond($2));
cond             1067 parse.y        			$$ = NEW_NOT(cond($2));
cond             2016 parse.y        			$$ = NEW_NOT(cond($2));
cond             2074 parse.y        			$$ = NEW_IF(cond($1), $3, $5);
cond             2639 parse.y        			$$ = NEW_IF(cond($2), $4, $5);
cond             2656 parse.y        			$$ = NEW_UNLESS(cond($2), $4, $5);
cond             2672 parse.y        			$$ = NEW_WHILE(cond($3), $6, 1);
cond             2686 parse.y        			$$ = NEW_UNTIL(cond($3), $6, 1);
cond             2974 parse.y        			$$ = NEW_IF(cond($2), $4, $5);
cond             7390 parse.y            int cond = 0;
cond             7404 parse.y        	    if (!cond) yyerror("void value expression");
cond             7426 parse.y        	    cond = 1;


cond0

cond0            7667 parse.y        static NODE *cond0(struct parser_params*,NODE*);
cond0            7678 parse.y            node = cond0(parser, node);
cond0            7730 parse.y        	node->nd_1st = cond0(parser, node->nd_1st);
cond0            7731 parse.y        	node->nd_2nd = cond0(parser, node->nd_2nd);
cond0            7775 parse.y            return cond0(parser, node);


cond_gen

cond_gen          242 parse.y        static NODE *cond_gen(struct parser_params*,NODE*);
cond_gen          243 parse.y        #define cond(node) cond_gen(parser, node)


cond_negative

cond_negative     247 parse.y        static int cond_negative(NODE**);
cond_negative     778 parse.y        			if (cond_negative(&$$->nd_cond)) {
cond_negative     791 parse.y        			if (cond_negative(&$$->nd_cond)) {
cond_negative     808 parse.y        			if (cond_negative(&$$->nd_cond)) {
cond_negative     824 parse.y        			if (cond_negative(&$$->nd_cond)) {
cond_negative    2641 parse.y        			if (cond_negative(&$$->nd_cond)) {
cond_negative    2658 parse.y        			if (cond_negative(&$$->nd_cond)) {
cond_negative    2674 parse.y        			if (cond_negative(&$$->nd_cond)) {
cond_negative    2688 parse.y        			if (cond_negative(&$$->nd_cond)) {


cond_stack

cond_stack         92 parse.y        #define COND_PUSH(n)	BITSTACK_PUSH(cond_stack, n)
cond_stack         93 parse.y        #define COND_POP()	BITSTACK_POP(cond_stack)
cond_stack         94 parse.y        #define COND_LEXPOP()	BITSTACK_LEXPOP(cond_stack)
cond_stack         95 parse.y        #define COND_P()	BITSTACK_SET_P(cond_stack)


connect

connect          1055 ext/socket/socket.c 	    status = connect(fd, sockaddr, len);
connect          2242 win32/win32.c  	r = connect(TO_SOCKET(s), addr, addrlen);
connect          2689 win32/win32.c  	    if (connect(w, addr, len) < 0)


convert_type

convert_type     1943 object.c           v = convert_type(val, tname, method, Qtrue);
convert_type     1959 object.c           v = convert_type(val, tname, method, Qfalse);
convert_type     1973 object.c           VALUE v = convert_type(val, "Integer", method, Qtrue);
convert_type     1985 object.c           VALUE v = convert_type(val, "Integer", method, Qfalse);
convert_type     2021 object.c           tmp = convert_type(val, "Integer", "to_int", Qfalse);


copy_fds

copy_fds         10528 eval.c         	    copy_fds(&readfds, &th->readfds, th->fd);
copy_fds         10529 eval.c         	    copy_fds(&writefds, &th->writefds, th->fd);
copy_fds         10530 eval.c         	    copy_fds(&exceptfds, &th->exceptfds, th->fd);


copy_mml

copy_mml         3860 regcomp.c        copy_mml(&(opt->exb.mmd),  mmd);
copy_mml         3861 regcomp.c        copy_mml(&(opt->expr.mmd), mmd);
copy_mml         3862 regcomp.c        copy_mml(&(opt->map.mmd),  mmd);


copy_node_opt_info

copy_node_opt_info 3992 regcomp.c      	  if (nd == node) copy_node_opt_info(opt, &nopt);
copy_node_opt_info 4208 regcomp.c      	  copy_node_opt_info(opt, &nopt);


copy_node_scope

copy_node_scope  3759 eval.c         	    defn = copy_node_scope(node->nd_defn, ruby_cref);
copy_node_scope  3795 eval.c         	    defn = copy_node_scope(node->nd_defn, ruby_cref);


copy_opt_anc_info

copy_opt_anc_info 3626 regcomp.c        copy_opt_anc_info(&to->anc, &tanc);
copy_opt_anc_info 3889 regcomp.c        copy_opt_anc_info(&to->anc, &tanc);
copy_opt_anc_info 3894 regcomp.c          copy_opt_anc_info(&add->exb.anc, &tanc);


copy_opt_exact_info

copy_opt_exact_info 3708 regcomp.c          copy_opt_exact_info(now, alt);
copy_opt_exact_info 3933 regcomp.c          copy_opt_exact_info(&to->expr, &add->expr);
copy_opt_exact_info 4126 regcomp.c      	    copy_opt_exact_info(&opt->expr, &nopt.exb);
copy_opt_exact_info 4128 regcomp.c      	    copy_opt_exact_info(&opt->expr, &nopt.exm);


copy_opt_map_info

copy_opt_map_info 3807 regcomp.c          copy_opt_map_info(now, alt);
copy_opt_map_info 3814 regcomp.c          copy_opt_map_info(now, alt);
copy_opt_map_info 4133 regcomp.c      	    copy_opt_map_info(&opt->map, &nopt.map);


cosh

cosh              168 math.c             return rb_float_new(cosh(RFLOAT(x)->value));
cosh              200 math.c             return sinh(x) / cosh(x);


cr_conv

cr_conv           320 ext/nkf/nkf-utf8/nkf.c STATIC  void    cr_conv PROTO((int c2,int c1));
cr_conv          1859 ext/nkf/nkf-utf8/nkf.c 	o_crconv = oconv; oconv = cr_conv;
cr_conv          3180 ext/nkf/nkf-utf8/nkf.c 	    cr_conv(0,'\n');


create_ip_exc

create_ip_exc     714 ext/tk/tcltklib.c             return create_ip_exc(interp, rb_eRuntimeError,
create_ip_exc     718 ext/tk/tcltklib.c             return create_ip_exc(interp, rb_eRuntimeError,
create_ip_exc     722 ext/tk/tcltklib.c             return create_ip_exc(interp, rb_eRuntimeError,
create_ip_exc     735 ext/tk/tcltklib.c             return create_ip_exc(interp, rb_eRuntimeError,
create_ip_exc     739 ext/tk/tcltklib.c             return create_ip_exc(interp, rb_eRuntimeError,
create_ip_exc     743 ext/tk/tcltklib.c             return create_ip_exc(interp, rb_eRuntimeError,
create_ip_exc    5650 ext/tk/tcltklib.c             exc = create_ip_exc(self, rb_eRuntimeError,
create_ip_exc    5696 ext/tk/tcltklib.c         exc = create_ip_exc(self, rb_eRuntimeError, "%s", ptr->ip->result);
create_ip_exc    6521 ext/tk/tcltklib.c                 return create_ip_exc(interp, rb_eNameError,
create_ip_exc    6664 ext/tk/tcltklib.c             return create_ip_exc(interp, rb_eRuntimeError,


create_win32ole_object

create_win32ole_object 1231 ext/win32ole/win32ole.c             obj = create_win32ole_object(cWIN32OLE, pDispatch, 0, 0);
create_win32ole_object 1253 ext/win32ole/win32ole.c                obj = create_win32ole_object(cWIN32OLE, pDispatch, 0, 0);
create_win32ole_object 1655 ext/win32ole/win32ole.c     return create_win32ole_object(self, pDispatch, argc, argv);
create_win32ole_object 1718 ext/win32ole/win32ole.c     return create_win32ole_object(self, pDispatch, argc, argv);


crypt

crypt              35 missing.h      extern char *crypt(const char *, const char *);
crypt            3923 string.c           extern char *crypt(const char *, const char *);
crypt            3933 string.c           result = rb_str_new2(crypt(s, RSTRING(salt)->ptr));


ctime

ctime              83 wince/sys/stat.c 	FILETIME ctime, atime, mtime;
ctime              95 wince/sys/stat.c 	GetFileTime( (HANDLE)file, &ctime, &atime, &mtime );
ctime              96 wince/sys/stat.c 	sbuf->st_ctime = wce_FILETIME2time_t(&ctime);
ctime              52 wince/time.h   char* ctime( const time_t *t );
ctime             290 wince/time_wce.c 	OutputDebugString( ctime(&t1) );


cur_mid

cur_mid          2837 parse.y        			$<id>$ = cur_mid;
cur_mid          2838 parse.y        			cur_mid = $2;
cur_mid          2858 parse.y        			cur_mid = $<id>3;


curses_init_screen

curses_init_screen  138 ext/curses/curses.c #define curses_stdscr curses_init_screen
curses_init_screen  782 ext/curses/curses.c     curses_init_screen();
curses_init_screen 1460 ext/curses/curses.c     rb_define_module_function(mCurses, "init_screen", curses_init_screen, 0);


curses_resizeterm

curses_resizeterm 1504 ext/curses/curses.c     rb_define_module_function(mCurses, "resizeterm", curses_resizeterm, 2);
curses_resizeterm 1505 ext/curses/curses.c     rb_define_module_function(mCurses, "resize", curses_resizeterm, 2);


curses_stdscr

curses_stdscr     184 ext/curses/curses.c     curses_stdscr();
curses_stdscr     193 ext/curses/curses.c     curses_stdscr();
curses_stdscr     203 ext/curses/curses.c     curses_stdscr();
curses_stdscr     213 ext/curses/curses.c     curses_stdscr();
curses_stdscr     227 ext/curses/curses.c     curses_stdscr();
curses_stdscr     237 ext/curses/curses.c     curses_stdscr();
curses_stdscr     247 ext/curses/curses.c     curses_stdscr();
curses_stdscr     257 ext/curses/curses.c     curses_stdscr();
curses_stdscr     267 ext/curses/curses.c     curses_stdscr();
curses_stdscr     277 ext/curses/curses.c     curses_stdscr();
curses_stdscr     287 ext/curses/curses.c     curses_stdscr();
curses_stdscr     297 ext/curses/curses.c     curses_stdscr();
curses_stdscr     308 ext/curses/curses.c     curses_stdscr();
curses_stdscr     320 ext/curses/curses.c     curses_stdscr();
curses_stdscr     333 ext/curses/curses.c     curses_stdscr();
curses_stdscr     348 ext/curses/curses.c     curses_stdscr();
curses_stdscr     376 ext/curses/curses.c     curses_stdscr();
curses_stdscr     386 ext/curses/curses.c     curses_stdscr();
curses_stdscr     397 ext/curses/curses.c     curses_stdscr();
curses_stdscr     408 ext/curses/curses.c     curses_stdscr();
curses_stdscr     421 ext/curses/curses.c     curses_stdscr();
curses_stdscr    1463 ext/curses/curses.c     rb_define_module_function(mCurses, "stdscr", curses_stdscr, 0);


cut_stack_tail

cut_stack_tail    106 ext/racc/cparse/cparse.c static void cut_stack_tail _((VALUE stack, long len));
cut_stack_tail    136 ext/racc/cparse/cparse.c #define CUT_TAIL(s, len) cut_stack_tail(s, len)


cvar_cbase

cvar_cbase       2308 eval.c         	if (rb_cvar_defined(cvar_cbase(), node->nd_vid)) {
cvar_cbase       3501 eval.c         	rb_cvar_set(cvar_cbase(), node->nd_vid, result, Qtrue);
cvar_cbase       3506 eval.c         	rb_cvar_set(cvar_cbase(), node->nd_vid, result, Qfalse);
cvar_cbase       3533 eval.c         	result = rb_cvar_get(cvar_cbase(), node->nd_vid);
cvar_cbase       5052 eval.c         	rb_cvar_set(cvar_cbase(), lhs->nd_vid, val, Qtrue);
cvar_cbase       5056 eval.c         	rb_cvar_set(cvar_cbase(), lhs->nd_vid, val, Qfalse);


cvt

cvt               257 missing/crypt.c 		C_block cvt;				\
cvt               258 missing/crypt.c 		cvt.b[0] = src; src >>= 6;		\
cvt               259 missing/crypt.c 		cvt.b[1] = src; src >>= 6;		\
cvt               260 missing/crypt.c 		cvt.b[2] = src; src >>= 6;		\
cvt               261 missing/crypt.c 		cvt.b[3] = src;				\
cvt               262 missing/crypt.c 		rslt = (cvt.b32.i0 & 0x3f3f3f3fL) << 2;	\
cvt               440 missing/vsnprintf.c static char *cvt __P((double, int, int, char *, int *, int, int *));
cvt               725 missing/vsnprintf.c 			cp = cvt(_double, prec, flags, &softsign,


datum

datum             548 dln.c              int datum;
datum             556 dln.c              datum = arg->value;
datum             558 dln.c              if (R_PCREL(&(undef->reloc))) datum -= undef->base;
datum             560 dln.c              datum += undef->reloc.r_addend;
datum             561 dln.c              datum >>= R_RIGHTSHIFT(&(undef->reloc));
datum             564 dln.c              datum &= mask;
datum             569 dln.c          	*address |= datum;
datum             574 dln.c          	*(short *)address |= datum;
datum             579 dln.c          	*(long *)address |= datum;
datum             586 dln.c          	    *address = datum - *address;
datum             587 dln.c          	else *address = undef->u.c + datum;
datum             591 dln.c          	    *(short*)address = datum - *(short*)address;
datum             592 dln.c          	else *(short*)address = undef->u.s + datum;
datum             596 dln.c          	    *(long*)address = datum - *(long*)address;
datum             597 dln.c          	else *(long*)address = undef->u.l + datum;
datum             790 dln.c          	    long datum = 0;
datum             805 dln.c          		    datum = sym->n_value;
datum             815 dln.c          		    datum = block;
datum             818 dln.c          		    datum = block +  new_common;
datum             824 dln.c          	    if (R_PCREL(rel)) datum -= block;
datum             827 dln.c          	    datum += rel->r_addend;
datum             828 dln.c          	    datum >>= R_RIGHTSHIFT(rel);
datum             831 dln.c          	    datum &= mask;
datum             836 dln.c          		*address |= datum;
datum             840 dln.c          		*(short *)address |= datum;
datum             844 dln.c          		*(long *)address |= datum;
datum             850 dln.c          		if (datum < -128 || datum > 127) goto err_exit;
datum             851 dln.c          		*address += datum;
datum             854 dln.c          		*(short *)address += datum;
datum             857 dln.c          		*(long *)address += datum;
datum             176 ext/dbm/dbm.c      datum key, value;
datum             221 ext/dbm/dbm.c      datum key, val;
datum             245 ext/dbm/dbm.c      datum key, val;
datum             293 ext/dbm/dbm.c      datum key, value;
datum             328 ext/dbm/dbm.c      datum key, val;
datum             351 ext/dbm/dbm.c      datum key, val;
datum             392 ext/dbm/dbm.c      datum key;
datum             413 ext/dbm/dbm.c      datum key, val;
datum             473 ext/dbm/dbm.c      datum key, val;
datum             504 ext/dbm/dbm.c      datum key;
datum             524 ext/dbm/dbm.c      datum key;
datum             548 ext/dbm/dbm.c      datum key, val;
datum             565 ext/dbm/dbm.c      datum key;
datum             581 ext/dbm/dbm.c      datum key, val;
datum             603 ext/dbm/dbm.c      datum key;
datum             622 ext/dbm/dbm.c      datum key, val;
datum             641 ext/dbm/dbm.c      datum key, val;
datum             659 ext/dbm/dbm.c      datum key, val;
datum             681 ext/dbm/dbm.c      datum key, val;
datum             701 ext/dbm/dbm.c      datum key, val;
datum             187 ext/gdbm/gdbm.c     datum val;
datum             209 ext/gdbm/gdbm.c     datum key;
datum             233 ext/gdbm/gdbm.c     datum key;
datum             255 ext/gdbm/gdbm.c     datum key, key2;
datum             388 ext/gdbm/gdbm.c     datum key;
datum             478 ext/gdbm/gdbm.c     datum key, nextkey;
datum             575 ext/gdbm/gdbm.c     datum key, val;
datum             603 ext/gdbm/gdbm.c     datum key, nextkey;
datum             625 ext/gdbm/gdbm.c     datum key;
datum             723 ext/gdbm/gdbm.c     datum key, nextkey;
datum             744 ext/gdbm/gdbm.c     datum key;
datum              63 ext/sdbm/_sdbm.c static datum getpair proto((char *, datum));
datum              66 ext/sdbm/_sdbm.c static datum getnkey proto((char *, int));
datum             116 ext/sdbm/_sdbm.c static datum getnext proto((DBM *));
datum             143 ext/sdbm/_sdbm.c datum nullitem = {NULL, 0};
datum             250 ext/sdbm/_sdbm.c datum
datum             452 ext/sdbm/_sdbm.c datum
datum             472 ext/sdbm/_sdbm.c datum
datum             587 ext/sdbm/_sdbm.c static datum
datum             591 ext/sdbm/_sdbm.c 	datum key;
datum             713 ext/sdbm/_sdbm.c static datum
datum             720 ext/sdbm/_sdbm.c 	datum val;
datum             746 ext/sdbm/_sdbm.c static datum
datum             751 ext/sdbm/_sdbm.c 	datum key;
datum             865 ext/sdbm/_sdbm.c 	datum key;
datum             866 ext/sdbm/_sdbm.c 	datum val;
datum             154 ext/sdbm/init.c     datum key, value;
datum             199 ext/sdbm/init.c     datum key, val;
datum             222 ext/sdbm/init.c     datum key, val;
datum             270 ext/sdbm/init.c     datum key, value;
datum             306 ext/sdbm/init.c     datum key, val;
datum             330 ext/sdbm/init.c     datum key, val;
datum             370 ext/sdbm/init.c     datum key;
datum             391 ext/sdbm/init.c     datum key, val;
datum             451 ext/sdbm/init.c     datum key, val;
datum             487 ext/sdbm/init.c     datum key;
datum             507 ext/sdbm/init.c     datum key;
datum             531 ext/sdbm/init.c     datum key, val;
datum             548 ext/sdbm/init.c     datum key;
datum             564 ext/sdbm/init.c     datum key, val;
datum             585 ext/sdbm/init.c     datum key;
datum             603 ext/sdbm/init.c     datum key, val;
datum             622 ext/sdbm/init.c     datum key, val;
datum             640 ext/sdbm/init.c     datum key, val;
datum             662 ext/sdbm/init.c     datum key, val;
datum             682 ext/sdbm/init.c     datum key, val;
datum              53 ext/sdbm/sdbm.h extern datum nullitem;
datum              72 ext/sdbm/sdbm.h extern datum sdbm_fetch proto((DBM *, datum));
datum              75 ext/sdbm/sdbm.h extern datum sdbm_firstkey proto((DBM *));
datum              76 ext/sdbm/sdbm.h extern datum sdbm_nextkey proto((DBM *));


debug

debug             448 ext/nkf/nkf-utf8/nkf.c STATIC void debug PROTO((const char *str));
debug            1421 ext/nkf/nkf-utf8/nkf.c             debug(input_codename);
debug            2122 ext/nkf/nkf-utf8/nkf.c                         debug(input_codename);
debug             190 ext/racc/cparse/cparse.c     int debug;              /* user level debug */
debug             341 ext/racc/cparse/cparse.c     v->debug = RTEST(rb_ivar_get(parser, id_yydebug));
debug             366 ext/racc/cparse/cparse.c     v->tstack = v->debug ? NEW_STACK() : Qnil;
debug             474 ext/racc/cparse/cparse.c             if (v->debug) {
debug             534 ext/racc/cparse/cparse.c         if (v->debug) {
debug             543 ext/racc/cparse/cparse.c     if (v->debug) rb_funcall(v->parser, id_d_accept, 0);
debug             612 ext/racc/cparse/cparse.c         if (v->debug) {
debug             645 ext/racc/cparse/cparse.c     if (v->debug) {
debug             697 ext/racc/cparse/cparse.c         if (v->debug)
debug             709 ext/racc/cparse/cparse.c         if (v->debug) {
debug             728 ext/racc/cparse/cparse.c     if (v->debug) {
debug             377 ext/sdbm/_sdbm.c 		debug(("newp: %ld\n", newp));
debug             498 ext/sdbm/_sdbm.c 	debug(("dbit: %d...", dbit));
debug             523 ext/sdbm/_sdbm.c 		debug(("pag read: %d\n", pagb));
debug             545 ext/sdbm/_sdbm.c 		debug(("dir read: %d\n", dirb));
debug             568 ext/sdbm/_sdbm.c 		debug(("dir read: %d\n", dirb));
debug             677 ext/sdbm/_sdbm.c 	debug(("free %d need %d\n", free, need));
debug             794 ext/sdbm/_sdbm.c 		debug(("free-up %d ", zoo));
debug             892 ext/sdbm/_sdbm.c 	debug(("%d split %d/%d\n", ((short *) cur)[0] / 2,
debug             392 ext/syslog/syslog.c     rb_define_syslog_shortcut(debug);


define_filetest_function

define_filetest_function 4270 file.c             define_filetest_function("directory?", test_d, 1);
define_filetest_function 4271 file.c             define_filetest_function("exist?", test_e, 1);
define_filetest_function 4272 file.c             define_filetest_function("exists?", test_e, 1); /* temporary */
define_filetest_function 4273 file.c             define_filetest_function("readable?", test_r, 1);
define_filetest_function 4274 file.c             define_filetest_function("readable_real?", test_R, 1);
define_filetest_function 4275 file.c             define_filetest_function("world_readable?", test_wr, 1);
define_filetest_function 4276 file.c             define_filetest_function("writable?", test_w, 1);
define_filetest_function 4277 file.c             define_filetest_function("writable_real?", test_W, 1);
define_filetest_function 4278 file.c             define_filetest_function("world_writable?", test_ww, 1);
define_filetest_function 4279 file.c             define_filetest_function("executable?", test_x, 1);
define_filetest_function 4280 file.c             define_filetest_function("executable_real?", test_X, 1);
define_filetest_function 4281 file.c             define_filetest_function("file?", test_f, 1);
define_filetest_function 4282 file.c             define_filetest_function("zero?", test_z, 1);
define_filetest_function 4283 file.c             define_filetest_function("size?", test_s, 1);
define_filetest_function 4284 file.c             define_filetest_function("size", rb_file_s_size, 1);
define_filetest_function 4285 file.c             define_filetest_function("owned?", test_owned, 1);
define_filetest_function 4286 file.c             define_filetest_function("grpowned?", test_grpowned, 1);
define_filetest_function 4288 file.c             define_filetest_function("pipe?", test_p, 1);
define_filetest_function 4289 file.c             define_filetest_function("symlink?", test_l, 1);
define_filetest_function 4290 file.c             define_filetest_function("socket?", test_S, 1);
define_filetest_function 4292 file.c             define_filetest_function("blockdev?", test_b, 1);
define_filetest_function 4293 file.c             define_filetest_function("chardev?", test_c, 1);
define_filetest_function 4295 file.c             define_filetest_function("setuid?", test_suid, 1);
define_filetest_function 4296 file.c             define_filetest_function("setgid?", test_sgid, 1);
define_filetest_function 4297 file.c             define_filetest_function("sticky?", test_sticky, 1);
define_filetest_function 4299 file.c             define_filetest_function("identical?", test_identical, 2);


deflate_run

deflate_run        84 ext/zlib/zlib.c static VALUE deflate_run _((VALUE));
deflate_run      1237 ext/zlib/zlib.c     dst = rb_ensure(deflate_run, (VALUE)args, zstream_end, (VALUE)&z);


deleted_ip

deleted_ip        994 ext/tk/tcltklib.c     if (deleted_ip(ptr)) {
deleted_ip       1046 ext/tk/tcltklib.c     if (deleted_ip(ptr)) {
deleted_ip       1101 ext/tk/tcltklib.c     if (deleted_ip(ptr)) {
deleted_ip       1209 ext/tk/tcltklib.c     if (deleted_ip(ptr)) {
deleted_ip       1811 ext/tk/tcltklib.c     if (deleted_ip(ptr)) {
deleted_ip       1927 ext/tk/tcltklib.c     if (deleted_ip(ptr)) {
deleted_ip       2073 ext/tk/tcltklib.c         if (deleted_ip(ptr)) {
deleted_ip       4874 ext/tk/tcltklib.c     if (deleted_ip(master)) {
deleted_ip       4967 ext/tk/tcltklib.c     if (deleted_ip(master)) {
deleted_ip       5079 ext/tk/tcltklib.c     if (deleted_ip(ptr)) {
deleted_ip       5097 ext/tk/tcltklib.c     if (deleted_ip(ptr)) {
deleted_ip       5129 ext/tk/tcltklib.c     if (deleted_ip(ptr)) {
deleted_ip       5144 ext/tk/tcltklib.c     if (deleted_ip(ptr)) {
deleted_ip       5163 ext/tk/tcltklib.c     if (deleted_ip(ptr)) {
deleted_ip       5185 ext/tk/tcltklib.c     if (deleted_ip(ptr)) {
deleted_ip       5284 ext/tk/tcltklib.c     if (deleted_ip(ptr)) {
deleted_ip       5297 ext/tk/tcltklib.c     if (deleted_ip(ptr) || !tk_stubs_init_p()) {
deleted_ip       5424 ext/tk/tcltklib.c     if (deleted_ip(ptr)) {
deleted_ip       5474 ext/tk/tcltklib.c     if (!NIL_P(ip_obj) && deleted_ip(get_ip(ip_obj))) {
deleted_ip       5599 ext/tk/tcltklib.c       if (deleted_ip(ptr)) {
deleted_ip       5678 ext/tk/tcltklib.c     if (deleted_ip(ptr)) {
deleted_ip       5886 ext/tk/tcltklib.c     if (deleted_ip(ptr)) {
deleted_ip       5944 ext/tk/tcltklib.c     if (deleted_ip(ptr)) {
deleted_ip       5963 ext/tk/tcltklib.c     if (deleted_ip(ptr)) {
deleted_ip       6005 ext/tk/tcltklib.c         if (deleted_ip(ptr)) {
deleted_ip       6496 ext/tk/tcltklib.c     if (deleted_ip(ptr)) {
deleted_ip       6768 ext/tk/tcltklib.c     if (deleted_ip(ptr)) {
deleted_ip       6963 ext/tk/tcltklib.c     if (deleted_ip(ptr)) {
deleted_ip       7020 ext/tk/tcltklib.c         if (deleted_ip(ptr)) {
deleted_ip       7056 ext/tk/tcltklib.c         if (deleted_ip(ptr)) {
deleted_ip       7153 ext/tk/tcltklib.c         if (deleted_ip(ptr)) {
deleted_ip       7193 ext/tk/tcltklib.c         if (deleted_ip(ptr)) {
deleted_ip       7276 ext/tk/tcltklib.c     if (deleted_ip(ptr)) {


delpair

delpair            64 ext/sdbm/_sdbm.c static int   delpair proto((char *, datum));
delpair           275 ext/sdbm/_sdbm.c 		if (!delpair(db->pagbuf, key))
delpair           318 ext/sdbm/_sdbm.c 			(void) delpair(db->pagbuf, key);


des_cipher

des_cipher        507 missing/crypt.c 			if (des_cipher((char *)&keyblock,
des_cipher        546 missing/crypt.c 	if (des_cipher((char *)&constdatablock, (char *)&rsltblock,
des_cipher        940 missing/crypt.c 	if (des_cipher((char *)&cblock, (char *)&cblock, 0L, (flag ? -1: 1)))


des_setkey

des_setkey        497 missing/crypt.c 	if (des_setkey((char *)keyblock.b))	/* also initializes "a64toi" */
des_setkey        515 missing/crypt.c 			if (des_setkey((char *)keyblock.b))
des_setkey        919 missing/crypt.c 	return (des_setkey((char *)keyblock.b));


dev_t

dev_t              42 wince/sys/stat.h   dev_t st_dev;
dev_t              48 wince/sys/stat.h   dev_t st_rdev;


dh_generate

dh_generate       112 ext/openssl/ossl_pkey_dh.c     dh = dh_generate(FIX2INT(size), g);
dh_generate       139 ext/openssl/ossl_pkey_dh.c 	if (!(dh = dh_generate(FIX2INT(arg), g))) {


dh_instance

dh_instance        67 ext/openssl/ossl_pkey_dh.c 	obj = dh_instance(cDH, DH_new());
dh_instance       113 ext/openssl/ossl_pkey_dh.c     obj = dh_instance(klass, dh);
dh_instance       284 ext/openssl/ossl_pkey_dh.c     obj = dh_instance(CLASS_OF(self), dh);


digest_final

digest_final      169 ext/openssl/ossl_digest.c     digest_final(ctx, &buf, &buf_len);
digest_final      184 ext/openssl/ossl_digest.c     digest_final(ctx, &buf, &buf_len);


dir_chdir

dir_chdir         695 dir.c              dir_chdir(args->new_path);
dir_chdir         710 dir.c          	dir_chdir(args->old_path);
dir_chdir         786 dir.c              dir_chdir(path);


dir_close

dir_close         367 dir.c          static VALUE dir_close(VALUE);
dir_close         432 dir.c          	return rb_ensure(rb_yield, dir, dir_close, dir);
dir_close        1663 dir.c              rb_ensure(dir_each, dir, dir_close, dir);
dir_close        1684 dir.c              return rb_ensure(rb_Array, dir, dir_close, dir);
dir_close        1820 dir.c              rb_define_method(rb_cDir,"close", dir_close, 0);


dir_closed

dir_closed        446 dir.c              if (dirp->dir == NULL) dir_closed();\
dir_closed        551 dir.c          	if (dirp->dir == NULL) dir_closed();


dir_each

dir_each         1663 dir.c              rb_ensure(dir_each, dir, dir_close, dir);
dir_each         1814 dir.c              rb_define_method(rb_cDir,"each", dir_each, 0);


dir_globs

dir_globs        1536 dir.c              return dir_globs(argc, argv, 0);
dir_globs        1616 dir.c          	ary = dir_globs(RARRAY(ary)->len, RARRAY(ary)->ptr, flags);


dir_initialize

dir_initialize    430 dir.c              dir_initialize(dir, dirname);
dir_initialize   1810 dir.c              rb_define_method(rb_cDir,"initialize", dir_initialize, 1);


dir_open_dir

dir_open_dir     1662 dir.c              dir = dir_open_dir(dirname);
dir_open_dir     1683 dir.c              dir = dir_open_dir(dirname);


dir_s_getwd

dir_s_getwd      1823 dir.c              rb_define_singleton_method(rb_cDir,"getwd", dir_s_getwd, 0);
dir_s_getwd      1824 dir.c              rb_define_singleton_method(rb_cDir,"pwd", dir_s_getwd, 0);


dir_s_rmdir

dir_s_rmdir      1827 dir.c              rb_define_singleton_method(rb_cDir,"rmdir", dir_s_rmdir, 1);
dir_s_rmdir      1828 dir.c              rb_define_singleton_method(rb_cDir,"delete", dir_s_rmdir, 1);
dir_s_rmdir      1829 dir.c              rb_define_singleton_method(rb_cDir,"unlink", dir_s_rmdir, 1);


dir_seek

dir_seek          630 dir.c              dir_seek(dir, pos);
dir_seek         1817 dir.c              rb_define_method(rb_cDir,"seek", dir_seek, 1);


dir_tell

dir_tell         1816 dir.c              rb_define_method(rb_cDir,"tell", dir_tell, 0);
dir_tell         1818 dir.c              rb_define_method(rb_cDir,"pos", dir_tell, 0);


dirent

dirent             26 dir.c          # define NAMLEN(dirent) strlen((dirent)->d_name)
dirent             29 dir.c          # define NAMLEN(dirent) strlen((dirent)->d_name)
dirent             33 dir.c          #  define NAMLEN(dirent) (dirent)->d_namlen
dirent             36 dir.c          #  define NAMLEN(dirent) strlen((dirent)->d_name)


dispatch0

dispatch0         385 parse.y        #define arg_new() dispatch0(arglist_new)
dispatch0         395 parse.y        #define mrhs_new() dispatch0(mrhs_new)
dispatch0         399 parse.y        #define mlhs_new() dispatch0(mlhs_new)
dispatch0        5413 parse.y            dispatch0(arg_ambiguous);


dispatch1

dispatch1         391 parse.y        #define bare_assoc(v) dispatch1(bare_assoc_hash, v)
dispatch1         394 parse.y        #define args2mrhs(a) dispatch1(mrhs_new_from_arglist, a)
dispatch1         403 parse.y        #define blockvar_new(p) dispatch1(blockvar_new, p)
dispatch1        4539 parse.y            dispatch1(parse_error, rb_str_new2(msg));


dispatch2

dispatch2         386 parse.y        #define arg_add(l,a) dispatch2(arglist_add, l, a)
dispatch2         387 parse.y        #define arg_prepend(l,a) dispatch2(arglist_prepend, l, a)
dispatch2         388 parse.y        #define arg_add_star(l,a) dispatch2(arglist_add_star, l, a)
dispatch2         389 parse.y        #define arg_add_block(l,b) dispatch2(arglist_add_block, l, b)
dispatch2         390 parse.y        #define arg_add_optblock(l,b) ((b)==Qundef? l : dispatch2(arglist_add_block, l, b))
dispatch2         396 parse.y        #define mrhs_add(l,a) dispatch2(mrhs_add, l, a)
dispatch2         397 parse.y        #define mrhs_add_star(l,a) dispatch2(mrhs_add_star, l, a)
dispatch2         400 parse.y        #define mlhs_add(l,a) dispatch2(mlhs_add, l, a)
dispatch2         401 parse.y        #define mlhs_add_star(l,a) dispatch2(mlhs_add_star, l, a)
dispatch2         404 parse.y        #define blockvar_add_star(l,a) dispatch2(blockvar_add_star, l, a)
dispatch2         405 parse.y        #define blockvar_add_block(l,a) dispatch2(blockvar_add_block, l, a)
dispatch2         407 parse.y        #define method_optarg(m,a) ((a)==Qundef ? m : dispatch2(method_add_arg,m,a))
dispatch2         408 parse.y        #define method_arg(m,a) dispatch2(method_add_arg,m,a)
dispatch2        5560 parse.y        	dispatch2(pragma, name, val);


dispose_string

dispose_string   5296 parse.y            dispose_string(here->nd_lit);
dispose_string   5365 parse.y        		if (str) dispose_string(str);


distance_add

distance_add     1872 regcomp.c      	*max = distance_add(*max, tmax);
distance_add     2002 regcomp.c      	*len = distance_add(*len, tlen);
distance_add     3483 regcomp.c        to->min = distance_add(to->min, from->min);
distance_add     3484 regcomp.c        to->max = distance_add(to->max, from->max);
distance_add     3491 regcomp.c        to->min = distance_add(to->min, len);
distance_add     3492 regcomp.c        to->max = distance_add(to->max, len);


distance_multiply

distance_multiply 1822 regcomp.c      	  *min = distance_multiply(*min, qn->lower);
distance_multiply 1944 regcomp.c      	    *max = distance_multiply(*max, qn->upper);
distance_multiply 2049 regcomp.c      	  *len = distance_multiply(tlen, qn->lower);
distance_multiply 4230 regcomp.c            min = distance_multiply(nopt.len.min, qn->lower);
distance_multiply 4234 regcomp.c      	max = distance_multiply(nopt.len.max, qn->upper);


distance_value

distance_value   3442 regcomp.c        v1 *= distance_value(d1);
distance_value   3443 regcomp.c        v2 *= distance_value(d2);


dlcfunc_free

dlcfunc_free       62 ext/dl/cfunc.c     val = Data_Make_Struct(rb_cDLCFunc, struct cfunc_data, 0, dlcfunc_free, data);
dlcfunc_free      101 ext/dl/cfunc.c   obj = Data_Make_Struct(klass, struct cfunc_data, 0, dlcfunc_free, data);


dlclose

dlclose          1338 dln.c          	    dlclose(handle);
dlclose          1582 dln.c          	    dlclose(handle);
dlclose            14 ext/dl/handle.c     dlclose(dlhandle->ptr);
dlclose            25 ext/dl/handle.c   return INT2NUM(dlclose(dlhandle->ptr));
dlclose            83 ext/dl/handle.c     dlclose(dlhandle->ptr);


dlerror

dlerror          1186 dln.c              return (char*)dlerror();
dlerror            72 ext/dl/handle.c   if( !ptr && (err = dlerror()) ){
dlerror            77 ext/dl/handle.c     err = dlerror();
dlerror           136 ext/dl/handle.c # define CHECK_DLERROR if( err = dlerror() ){ func = 0; }


dln_find_1

dln_find_1       1606 dln.c          static char *dln_find_1(const char *fname, const char *path, int exe_flag);
dln_find_1       1622 dln.c              return dln_find_1(fname, path, 1);
dln_find_1       1630 dln.c              return dln_find_1(fname, path, 0);
dln_find_1       1633 dln.c              return _macruby_path_conv_posix_to_macos(dln_find_1(fname, path, 0));


dln_find_exe

dln_find_exe      366 dln.c              file = dln_find_exe(prog, NULL);
dln_find_exe       32 dln.h          char *dln_find_exe(const char*,const char*);
dln_find_exe      906 process.c      extern char *dln_find_exe(const char *fname, const char *path);
dln_find_exe      924 process.c          prog = dln_find_exe(prog, 0);
dln_find_exe      959 process.c      	    prog = dln_find_exe(argv[0], 0);
dln_find_exe     1023 process.c      	    char *shell = dln_find_exe("sh", 0);
dln_find_exe     1078 process.c          prog = dln_find_exe(prog, 0);
dln_find_exe     1099 process.c      	prog = dln_find_exe(argv[0], 0);
dln_find_exe     1143 process.c      	    char *shell = dln_find_exe("sh", 0);
dln_find_exe      899 win32/win32.c  	if (!(p = dln_find_exe(prog, NULL))) {
dln_find_exe      935 win32/win32.c  		    p = dln_find_exe(cmd, NULL);
dln_find_exe      952 win32/win32.c  		    p = dln_find_exe(p, NULL);


dln_find_file

dln_find_file     976 dln.c              file = dln_find_file(lib, path);
dln_find_file      33 dln.h          char *dln_find_file(const char*,const char*);
dln_find_file    4136 file.c         	    found = dln_find_file(StringValueCStr(fname), path);
dln_find_file    4212 file.c             f = dln_find_file(f, lpath);
dln_find_file     804 ruby.c         		    script = dln_find_file(argv[0], path);
dln_find_file     807 ruby.c         		    script = dln_find_file(argv[0], getenv(PATH_ENV));


dln_init

dln_init          417 dln.c          	return dln_init(buf);
dln_init         1087 dln.c          	if (dln_init(dln_argv0) == -1) return -1;


dln_load

dln_load         1383 dln.c          	if (loadbind(0, (void*)dln_load, (void*)init_fct) == -1) {
dln_load           39 dln.h          void *dln_load(const char*);
dln_load         6951 eval.c         		    handle = (long)dln_load(RSTRING(path)->ptr);


dln_strerror

dln_strerror     1271 dln.c          #define DLN_ERROR() (error = dln_strerror(), strcpy(ALLOCA_N(char, strlen(error) + 1), error))
dln_strerror     1289 dln.c          	error = dln_strerror();
dln_strerror     1294 dln.c          	rb_loaderror("%s - %s\n%s", dln_strerror(), buf, file);
dln_strerror     1303 dln.c          	error = dln_strerror();
dln_strerror     1331 dln.c          	    error = dln_strerror();
dln_strerror     1576 dln.c          	    error = dln_strerror();


dln_undefined

dln_undefined     728 dln.c          		    sym->n_value = (long)dln_undefined;
dln_undefined     753 dln.c          		&& new_sym->n_value != (long)dln_undefined) {


dlopen

dlopen           1330 dln.c          	if ((handle = (void*)dlopen(file, RTLD_LAZY|RTLD_GLOBAL)) == NULL) {
dlopen           1575 dln.c          	if ((handle = (void*)dlopen(fname, 0)) == NULL) {
dlopen             70 ext/dl/handle.c   ptr = dlopen(clib, cflag);
dlopen             77 ext/tk/stubs.c # define DL_OPEN(file) dlopen(file, RTLD_LAZY|RTLD_GLOBAL)


dlptr_free

dlptr_free         47 ext/dl/cptr.c  			 0, dlptr_free, data);
dlptr_free        100 ext/dl/cptr.c    obj = Data_Make_Struct(klass, struct ptr_data, dlptr_mark, dlptr_free, data);


dlsym

dlsym            1335 dln.c          	init_fct = (void(*)())dlsym(handle, buf);
dlsym            1580 dln.c          	if ((init_fct = (void (*)())dlsym(handle, buf)) == NULL) {
dlsym             161 ext/dl/handle.c     func = dlsym(handle, name);
dlsym             171 ext/dl/handle.c 	    func = dlsym(handle, name_a);
dlsym             179 ext/dl/handle.c 		    func = dlsym(handle, name_n);
dlsym             198 ext/dl/handle.c 	    func = dlsym(handle, name_n);
dlsym              78 ext/tk/stubs.c # define DL_SYM dlsym


do_R01

do_R01             77 ext/digest/sha1/sha1.c void do_R01(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *);
do_R01            161 ext/digest/sha1/sha1.c     do_R01(&a, &b, &c, &d, &e, block);


do_R2

do_R2              78 ext/digest/sha1/sha1.c void do_R2(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *);
do_R2             162 ext/digest/sha1/sha1.c     do_R2(&a, &b, &c, &d, &e, block);


do_R3

do_R3              79 ext/digest/sha1/sha1.c void do_R3(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *);
do_R3             163 ext/digest/sha1/sha1.c     do_R3(&a, &b, &c, &d, &e, block);


do_R4

do_R4              80 ext/digest/sha1/sha1.c void do_R4(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *);
do_R4             164 ext/digest/sha1/sha1.c     do_R4(&a, &b, &c, &d, &e, block);


do_checksum

do_checksum        36 ext/zlib/zlib.c static VALUE do_checksum _((int, VALUE*, uLong (*) _((uLong, const Bytef*, uInt))));
do_checksum       307 ext/zlib/zlib.c     return do_checksum(argc, argv, adler32);
do_checksum       325 ext/zlib/zlib.c     return do_checksum(argc, argv, crc32);


do_coerce

do_coerce         150 numeric.c          do_coerce(&x, &y, Qtrue);
do_coerce         157 numeric.c          if (do_coerce(&x, &y, Qfalse))
do_coerce         167 numeric.c          if (!do_coerce(&x, &y, Qfalse) ||
do_coerce         227 numeric.c          do_coerce(&zero, &num, Qtrue);


do_deflate

do_deflate         86 ext/zlib/zlib.c static void do_deflate _((struct zstream*, VALUE, int));
do_deflate       1284 ext/zlib/zlib.c     do_deflate(z, src, ARG_FLUSH(flush));
do_deflate       1303 ext/zlib/zlib.c     do_deflate(get_zstream(obj), src, Z_NO_FLUSH);


do_hash

do_hash            62 st.c           #define do_hash_bin(key,table) (do_hash(key, table)%(table)->num_bins)
do_hash           240 st.c               hash_val = do_hash(key, table);
do_hash           276 st.c               hash_val = do_hash(key, table);
do_hash           294 st.c               hash_val = do_hash(key, table);


do_hash_bin

do_hash_bin       371 st.c               hash_val = do_hash_bin(*key, table);
do_hash_bin       409 st.c               hash_val = do_hash_bin(*key, table);


do_inflate

do_inflate         97 ext/zlib/zlib.c static void do_inflate _((struct zstream*, VALUE));
do_inflate       1552 ext/zlib/zlib.c 	do_inflate(z, src);
do_inflate       1585 ext/zlib/zlib.c 	do_inflate(z, src);


do_lstat

do_lstat         1190 dir.c          	    if (do_lstat(path, &st, flags) == 0) {
do_lstat         1235 dir.c          		if (do_lstat(buf, &st, flags) == 0)


do_select

do_select        2127 win32/win32.c  		r = do_select(nfds, rd, wr, ex, &zero); // polling
do_select        2140 win32/win32.c  		r = do_select(nfds, rd, wr, ex, &wait);
do_select        2149 win32/win32.c  	r = do_select(nfds, rd, wr, ex, timeout);


double_ne

double_ne           3 missing/isnan.c static int double_ne(double n1, double n2);
double_ne           8 missing/isnan.c     return double_ne(n, n);


downcase

downcase          116 dir.c          # define Compare(p1, p2) (compare(downcase(*(p1)), downcase(*(p2))))
downcase          160 dir.c          	    return compare(downcase(*p1), downcase(*p2));
downcase          162 dir.c          	    const int ret = compare(downcase(*p1), *p2);
downcase          167 dir.c          	    const int ret = compare(*p1, downcase(*p2));


dsa_generate

dsa_generate      105 ext/openssl/ossl_pkey_dsa.c     DSA *dsa = dsa_generate(FIX2INT(size)); /* err handled by dsa_instance */
dsa_generate      130 ext/openssl/ossl_pkey_dsa.c 	if (!(dsa = dsa_generate(FIX2INT(arg)))) {


dsa_instance

dsa_instance       61 ext/openssl/ossl_pkey_dsa.c 	obj = dsa_instance(cDSA, DSA_new());
dsa_instance      106 ext/openssl/ossl_pkey_dsa.c     VALUE obj = dsa_instance(klass, dsa);
dsa_instance      314 ext/openssl/ossl_pkey_dsa.c     obj = dsa_instance(CLASS_OF(self), dsa);


dup

dup              1237 array.c            VALUE dup = rb_ary_new2(RARRAY(ary)->len);
dup              1239 array.c            DUPSETUP(dup, ary);
dup              1240 array.c            MEMCPY(RARRAY(dup)->ptr, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
dup              1241 array.c            RARRAY(dup)->len = RARRAY(ary)->len;
dup              1242 array.c            return dup;
dup              1389 array.c        	VALUE dup = rb_ary_new2(RARRAY(ary)->len);
dup              1390 array.c        	rb_ary_replace(dup, ary);
dup              1391 array.c        	return dup;
dup              7910 eval.c             MEMCPY(dup, orig, struct BLOCK, 1);
dup              7911 eval.c             frame_dup(&dup->frame);
dup              7913 eval.c             if (dup->iter) {
dup              7914 eval.c         	blk_copy_prev(dup);
dup              7917 eval.c         	dup->prev = 0;
dup               817 ext/nkf/nkf-utf8/nkf.c                           || (fd_backup = dup(fileno(stdout))) < 0
dup                28 ext/openssl/ossl_bio.c 	if ((fd = dup(fptr->fd)) < 0){
dup               432 ext/pty/pty.c      wfptr->fd = dup(info.fd);
dup               560 ext/syck/rubyext.c                         VALUE dup = rb_funcall( tmp, s_dup, 0 );
dup               561 ext/syck/rubyext.c                         rb_funcall( dup, s_update, 1, obj );
dup               562 ext/syck/rubyext.c                         obj = dup;
dup               571 ext/syck/rubyext.c                             VALUE dup = rb_funcall( tmph, s_dup, 0 );
dup               574 ext/syck/rubyext.c                             rb_iterate( rb_each, tmp, syck_merge_i, dup );
dup               575 ext/syck/rubyext.c                             obj = dup;
dup               996 ext/syck/rubyext.c                         VALUE dup = rb_funcall( v, s_dup, 0 );
dup               997 ext/syck/rubyext.c                         rb_funcall( dup, s_update, 1, obj );
dup               998 ext/syck/rubyext.c                         obj = dup;
dup              1006 ext/syck/rubyext.c                             VALUE dup = rb_funcall( end, s_dup, 0 );
dup              1009 ext/syck/rubyext.c                             rb_iterate( rb_each, v, syck_merge_i, dup );
dup              1010 ext/syck/rubyext.c                             obj = dup;
dup               364 io.c               fd = dup(orig);
dup               368 io.c           	    fd = dup(orig);
dup                50 missing/dup2.c 		fd = fds[i] = dup(fd1);
dup               253 object.c           VALUE dup;
dup               258 object.c           dup = rb_obj_alloc(rb_obj_class(obj));
dup               259 object.c           init_copy(dup, obj);
dup               261 object.c           return dup;
dup               323 ruby.h             OBJSETUP(dup,rb_obj_class(obj),(RBASIC(obj)->flags)&(T_MASK|FL_EXIVAR|FL_TAINT));\
dup               324 ruby.h             if (FL_TEST(obj, FL_EXIVAR)) rb_copy_generic_ivar((VALUE)dup,(VALUE)obj);\
dup               278 string.c           VALUE dup = str_alloc(rb_obj_class(str));
dup               279 string.c           rb_str_replace(dup, str);
dup               280 string.c           return dup;
dup              2318 string.c       	VALUE dup = str_alloc(rb_cString);
dup              2319 string.c       	rb_str_replace(dup, str);
dup              2320 string.c       	return dup;
dup              1011 time.c             VALUE dup = time_s_alloc(rb_cTime);
dup              1012 time.c             time_init_copy(dup, time);
dup              1013 time.c             return dup;
dup                37 wince/io.h     int dup( int handle );


dup2

dup2              718 ext/nkf/nkf-utf8/nkf.c                     dup2(fds[1], 1);
dup2              721 ext/nkf/nkf-utf8/nkf.c                     dup2(fds[0], 0);
dup2              727 ext/nkf/nkf-utf8/nkf.c                 dup2(fds[0], 0);
dup2              730 ext/nkf/nkf-utf8/nkf.c                 dup2(fds[1], 1);
dup2              818 ext/nkf/nkf-utf8/nkf.c                           || dup2(fd, fileno(stdout)) < 0
dup2              873 ext/nkf/nkf-utf8/nkf.c                   if (dup2(fd_backup, fileno(stdout)) < 0){
dup2              276 ext/pty/pty.c  	dup2(slave,0);
dup2              277 ext/pty/pty.c  	dup2(slave,1);
dup2              278 ext/pty/pty.c  	dup2(slave,2);
dup2             2785 io.c                   dup2(p->pair[1], 0);
dup2             2786 io.c                   dup2(p->pair[1], 1);
dup2             2793 io.c                       dup2(p->pair[1], 1);
dup2             2800 io.c                       dup2(p->pair[0], 0);
dup2             3319 io.c           	    if (dup2(fd2, fd) < 0)
dup2             3330 io.c           	    if (dup2(fd2, fd) < 0)
dup2               39 missing.h      extern int dup2(int, int);
dup2             2785 process.c      	(void)dup2(n, 0);
dup2             2786 process.c      	(void)dup2(n, 1);
dup2             2787 process.c      	(void)dup2(n, 2);


duppair

duppair            69 ext/sdbm/_sdbm.c static int   duppair proto((char *, datum));
duppair           320 ext/sdbm/_sdbm.c 		else if (duppair(db->pagbuf, key))


dvar_asgn

dvar_asgn        3465 eval.c         	dvar_asgn(node->nd_vid, result);
dvar_asgn        5032 eval.c         	dvar_asgn(lhs->nd_vid, val);


dvar_asgn_curr

dvar_asgn_curr   3470 eval.c         	dvar_asgn_curr(node->nd_vid, result);
dvar_asgn_curr   5036 eval.c         	dvar_asgn_curr(lhs->nd_vid, val);
dvar_asgn_curr   5540 eval.c         	    dvar_asgn_curr(SYM2ID(RARRAY(a)->ptr[j]), argv[j]);


dvar_asgn_internal

dvar_asgn_internal  842 eval.c             dvar_asgn_internal(id, value, 0);
dvar_asgn_internal  848 eval.c             dvar_asgn_internal(id, value, 1);


dyna_check_gen

dyna_check_gen    329 parse.y        static void dyna_check_gen(struct parser_params*,ID);
dyna_check_gen    330 parse.y        #define dyna_check(id) dyna_check_gen(parser, id)


dyna_in_block

dyna_in_block    4108 parse.y        			if (dyna_in_block()) {
dyna_in_block    4151 parse.y        			if (dyna_in_block()) {
dyna_in_block    4190 parse.y        			if (dyna_in_block()) {
dyna_in_block    4202 parse.y        			if (dyna_in_block()) {
dyna_in_block    4223 parse.y        			else if (!dyna_in_block() && local_id($2))
dyna_in_block    4225 parse.y        			if (dyna_in_block()) {
dyna_in_block    5422 parse.y            return (dyna_in_block() && rb_dvar_defined(id)) || local_id(id);
dyna_in_block    7186 parse.y        	if (dyna_in_block() && rb_dvar_defined(id)) return NEW_DVAR(id);
dyna_in_block    7237 parse.y        	else if (local_id(id) || !dyna_in_block()) {


dyna_in_block_gen

dyna_in_block_gen  323 parse.y        static int dyna_in_block_gen(struct parser_params*);
dyna_in_block_gen  324 parse.y        #define dyna_in_block() dyna_in_block_gen(parser)


dyna_init

dyna_init        1149 parse.y        						   dyna_init($5, $<vars>4));
dyna_init        3272 parse.y        						   dyna_init($5, $<vars>4));
dyna_init        3410 parse.y        						   dyna_init($5, $<vars>4));
dyna_init        3436 parse.y        						   dyna_init($5, $<vars>4));


dyna_init_gen

dyna_init_gen     325 parse.y        static NODE *dyna_init_gen(struct parser_params*, NODE*, struct RVarmap *);
dyna_init_gen     326 parse.y        #define dyna_init(node, pre) dyna_init_gen(parser, node, pre)


dyna_pop

dyna_pop         1152 parse.y        			dyna_pop($<vars>2);
dyna_pop         3218 parse.y        			dyna_pop($<vars>1);
dyna_pop         3275 parse.y        			dyna_pop($<vars>2);
dyna_pop         3413 parse.y        			dyna_pop($<vars>2);
dyna_pop         3439 parse.y        			dyna_pop($<vars>2);


dyna_pop_gen

dyna_pop_gen      321 parse.y        static void dyna_pop_gen(struct parser_params*, struct RVarmap*);
dyna_pop_gen      322 parse.y        #define dyna_pop(vars) dyna_pop_gen(parser, vars)


dyna_push

dyna_push        1138 parse.y        			$<vars>$ = dyna_push();
dyna_push        3201 parse.y        			$<vars>$ = dyna_push();
dyna_push        3257 parse.y        			$<vars>$ = dyna_push();
dyna_push        3395 parse.y        			$<vars>$ = dyna_push();
dyna_push        3421 parse.y        			$<vars>$ = dyna_push();


dyna_push_gen

dyna_push_gen     319 parse.y        static struct RVarmap *dyna_push_gen(struct parser_params*);
dyna_push_gen     320 parse.y        #define dyna_push() dyna_push_gen(parser)


dyna_var

dyna_var         4110 parse.y        			    dyna_var($1);
dyna_var         4153 parse.y        			    dyna_var($1);
dyna_var         4192 parse.y        			    dyna_var($2);
dyna_var         4227 parse.y        			    dyna_var($2);
dyna_var         7241 parse.y        	    dyna_var(id);
dyna_var         7283 parse.y            dyna_var(name);


dyna_var_gen

dyna_var_gen      327 parse.y        static void dyna_var_gen(struct parser_params*,ID);
dyna_var_gen      328 parse.y        #define dyna_var(id) dyna_var_gen(parser, id)


e2s_conv

e2s_conv          316 ext/nkf/nkf-utf8/nkf.c STATIC  int     e2s_conv PROTO((int c2, int c1, int *p2, int *p1));
e2s_conv         2474 ext/nkf/nkf-utf8/nkf.c             if (e2s_conv(c2, c1, &s2, &s1) == 0){
e2s_conv         2886 ext/nkf/nkf-utf8/nkf.c             if (e2s_conv(c2, c1, &s2, &s1) == 0){
e2s_conv         3006 ext/nkf/nkf-utf8/nkf.c         if (e2s_conv(c2, c1, &c2, &c1) == 0){
e2s_conv         3018 ext/nkf/nkf-utf8/nkf.c         e2s_conv(c2, c1, &c2, &c1);


e2w_conv

e2w_conv          311 ext/nkf/nkf-utf8/nkf.c STATIC  int     e2w_conv PROTO((int c2,int c1));
e2w_conv         1486 ext/nkf/nkf-utf8/nkf.c     }else if (!e2w_conv(c2, c1)){
e2w_conv         2797 ext/nkf/nkf-utf8/nkf.c 	else val = e2w_conv(c2, c1);
e2w_conv         2840 ext/nkf/nkf-utf8/nkf.c         unsigned short val = e2w_conv(c2, c1);


e_iconv

e_iconv           302 ext/nkf/nkf-utf8/nkf.c STATIC  int     e_iconv PROTO((int c2,int c1,int c0));
e_iconv           494 ext/nkf/nkf-utf8/nkf.c     {"EUC-JP",    0, 0, 0, {0, 0, 0}, e_status, e_iconv, 0},
e_iconv          1912 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, e_iconv);
e_iconv          1924 ext/nkf/nkf-utf8/nkf.c         set_iconv(FALSE, e_iconv);
e_iconv          3582 ext/nkf/nkf-utf8/nkf.c     e_iconv, s_iconv, 0, 0, 0, 0,


e_oconv

e_oconv           315 ext/nkf/nkf-utf8/nkf.c STATIC  void    e_oconv PROTO((int c2,int c1));
e_oconv           535 ext/nkf/nkf-utf8/nkf.c #   define  DEFAULT_CONV e_oconv
e_oconv          1149 ext/nkf/nkf-utf8/nkf.c             output_conv = e_oconv;


e_option_supplied

e_option_supplied 7658 parse.y            if (!e_option_supplied()) parser_warn(node, str);
e_option_supplied 7664 parse.y            if (!e_option_supplied()) parser_warning(node, str);
e_option_supplied 7674 parse.y            if (!e_option_supplied()) return node;
e_option_supplied 7741 parse.y        	if (!e_option_supplied()) {


e_status

e_status          484 ext/nkf/nkf-utf8/nkf.c STATIC void e_status PROTO((struct input_code *, int));
e_status          494 ext/nkf/nkf-utf8/nkf.c     {"EUC-JP",    0, 0, 0, {0, 0, 0}, e_status, e_iconv, 0},


eaccess

eaccess            92 dln.c          int eaccess(const char *, int);
eaccess          1765 dln.c          	    if (!S_ISDIR(st.st_mode) && eaccess(fbuf, X_OK) == 0)
eaccess          1773 dln.c          		if (!S_ISDIR(st.st_mode) && eaccess(mac_fullpath, X_OK) == 0)
eaccess          1071 file.c             if (eaccess(StringValueCStr(fname), R_OK) < 0) return Qfalse;
eaccess          1141 file.c             if (eaccess(StringValueCStr(fname), W_OK) < 0) return Qfalse;
eaccess          1203 file.c             if (eaccess(StringValueCStr(fname), X_OK) < 0) return Qfalse;
eaccess          4087 file.c             return eaccess(path, R_OK) == 0;
eaccess           285 intern.h       int eaccess(const char*, int);


each_i

each_i           1052 hash.c             rb_hash_foreach(hash, each_i, 0);
each_i            401 range.c        	range_each_func(range, each_i, beg, end, NULL);


each_pair

each_pair         429 ext/dbm/dbm.c  static VALUE each_pair _((VALUE));
each_pair         456 ext/dbm/dbm.c      rb_iterate(each_pair, other, update_i, obj);
each_pair         465 ext/dbm/dbm.c      rb_iterate(each_pair, other, update_i, obj);
each_pair         531 ext/gdbm/gdbm.c static VALUE each_pair _((VALUE));
each_pair         558 ext/gdbm/gdbm.c     rb_iterate(each_pair, other, update_i, obj);
each_pair         567 ext/gdbm/gdbm.c     rb_iterate(each_pair, other, update_i, obj);
each_pair         407 ext/sdbm/init.c static VALUE each_pair _((VALUE));
each_pair         434 ext/sdbm/init.c     rb_iterate(each_pair, other, update_i, obj);
each_pair         443 ext/sdbm/init.c     rb_iterate(each_pair, other, update_i, obj);


eat_comments

eat_comments      239 ext/syck/token.c void eat_comments( SyckParser * );
eat_comments      348 ext/syck/token.c {   eat_comments( parser );
eat_comments      804 ext/syck/token.c {   eat_comments( parser );
eat_comments     1659 ext/syck/token.c {   eat_comments( parser );
eat_comments     2493 ext/syck/token.c                             eat_comments( parser );


enc_len

enc_len            65 euc_jp.c         len = enc_len(ONIG_ENCODING_EUC_JP, p);
enc_len           115 euc_jp.c         if (enc_len(ONIG_ENCODING_EUC_JP, buf) != (p - buf))
enc_len           140 euc_jp.c           len = enc_len(ONIG_ENCODING_EUC_JP, p);
enc_len           190 euc_jp.c         len = enc_len(ONIG_ENCODING_EUC_JP, p);
enc_len           443 regcomp.c        prev_len = enc_len(enc, p);
enc_len           449 regcomp.c          len = enc_len(enc, p);
enc_len           492 regcomp.c        prev_len = enc_len(enc, p);
enc_len           497 regcomp.c          len = enc_len(enc, p);
enc_len          2037 regcomp.c      	s += enc_len(reg->enc, s);
enc_len          3641 regcomp.c            len = enc_len(enc, p);
enc_len          3668 regcomp.c          len = enc_len(env->enc, to->s + i);
enc_len          5240 regcomp.c            len = enc_len(enc, bp);
enc_len            58 regenc.c           p += enc_len(enc, p);
enc_len            71 regenc.c           p += enc_len(enc, p);
enc_len           696 regenc.c         len = enc_len(enc, p);
enc_len           726 regenc.c           len = enc_len(enc, p);
enc_len           754 regenc.c         (*pp) += enc_len(enc, p);
enc_len           819 regenc.c         if (enc_len(enc, buf) != (p - buf))
enc_len           842 regenc.c         if (enc_len(enc, buf) != (p - buf))
enc_len           902 regenc.c           p += enc_len(enc, p);
enc_len           973 regenc.c         len = enc_len(enc, c);
enc_len           982 regenc.c         c   = m17n_codepoint(enc, p, p + enc_len(enc, *p));
enc_len           997 regenc.c         len = enc_len(enc, *p);
enc_len          1019 regenc.c         while (p + (len = enc_len(enc, *p)) < s) {
enc_len           267 regerror.c     	len = enc_len(enc, p);
enc_len           275 regerror.c             len = enc_len(enc, p);
enc_len          1255 regexec.c      	len = enc_len(encode, q);
enc_len          1612 regexec.c            s += enc_len(encode, s);   /* OP_CCLASS can match mb-code. \D, \S */
enc_len          1627 regexec.c      	mb_len = enc_len(encode, s);
enc_len          1667 regexec.c            s += enc_len(encode, s);
enc_len          1685 regexec.c      	int mb_len = enc_len(encode, s);
enc_len          1739 regexec.c      	mb_len = enc_len(encode, s);
enc_len          1750 regexec.c            n = enc_len(encode, s);
enc_len          1759 regexec.c            n = enc_len(encode, s);
enc_len          1768 regexec.c      	n = enc_len(encode, s);
enc_len          1780 regexec.c      	n = enc_len(encode, s);
enc_len          1799 regexec.c      	n = enc_len(encode, s);
enc_len          1814 regexec.c      	n = enc_len(encode, s);
enc_len          1834 regexec.c            s += enc_len(encode, s);
enc_len          1843 regexec.c            s += enc_len(encode, s);
enc_len          1965 regexec.c      	       ON_STR_END(s + enc_len(encode, s))) {
enc_len          2074 regexec.c      	while (sprev + (len = enc_len(encode, sprev)) < s)
enc_len          2106 regexec.c      	while (sprev + (len = enc_len(encode, sprev)) < s)
enc_len          2141 regexec.c      	  while (sprev + (len = enc_len(encode, sprev)) < s)
enc_len          2180 regexec.c      	  while (sprev + (len = enc_len(encode, sprev)) < s)
enc_len          2602 regexec.c          s += enc_len(enc, s);
enc_len          2661 regexec.c          s += enc_len(enc, s);
enc_len          2746 regexec.c          s += enc_len(reg->enc, s);
enc_len          2764 regexec.c      	p += enc_len(reg->enc, p);
enc_len          2784 regexec.c      	p += enc_len(reg->enc, p);
enc_len          2890 regexec.c          s += enc_len(enc, s);
enc_len          2977 regexec.c            while (p < q) p += enc_len(reg->enc, p);
enc_len          3008 regexec.c            p += enc_len(reg->enc, p);
enc_len          3369 regexec.c      	    s += enc_len(reg->enc, s);
enc_len          3376 regexec.c      		s += enc_len(reg->enc, s);
enc_len          3393 regexec.c            s += enc_len(reg->enc, s);
enc_len          1473 regparse.c         return ((enc_len(enc, sn->s) < sn->end - sn->s)  ?  1 : 0);
enc_len          2482 regparse.c         if (enc_len(enc, p) > 1)
enc_len          2548 regparse.c         q = p + enc_len(enc, p);
enc_len          2553 regparse.c     	q += enc_len(enc, q);
enc_len          2579 regparse.c           p += enc_len(enc, p);
enc_len          2583 regparse.c           q = p + enc_len(enc, p);
enc_len          2588 regparse.c     	  q += enc_len(enc, q);
enc_len          2591 regparse.c     	p += enc_len(enc, p);
enc_len          2711 regparse.c     	if (p > prev + enc_len(enc, prev) && !PEND && (PPEEK_IS('}'))) {
enc_len          3043 regparse.c     	if ((p > prev + enc_len(enc, prev)) && !PEND && PPEEK_IS('}')) {
enc_len          3229 regparse.c     	p = tok->backp + enc_len(enc, tok->backp);
enc_len          3990 regparse.c     	len = enc_len(env->enc, buf);
enc_len          4756 regparse.c     	  if (len >= enc_len(env->enc, NSTRING(*np).s)) {
enc_len           101 sjis.c           len = enc_len(ONIG_ENCODING_SJIS, p);
enc_len           123 sjis.c           if (enc_len(ONIG_ENCODING_SJIS, buf) != (p - buf))
enc_len           147 sjis.c             int len = enc_len(ONIG_ENCODING_SJIS, p);
enc_len           204 sjis.c           len = enc_len(ONIG_ENCODING_SJIS, p);
enc_len            74 utf8.c           len = enc_len(ONIG_ENCODING_UTF8, p);
enc_len           250 utf8.c             len = enc_len(ONIG_ENCODING_UTF8, p);
enc_len           283 utf8.c             (*pp) += enc_len(ONIG_ENCODING_UTF8, p);


encodes

encodes           367 pack.c         static void encodes(VALUE,char*,long,int);
encodes           900 pack.c         		encodes(res, ptr, todo, type);


enum_collect

enum_collect     1093 enum.c             rb_define_method(rb_mEnumerable,"collect", enum_collect, 0);
enum_collect     1094 enum.c             rb_define_method(rb_mEnumerable,"map", enum_collect, 0);


enum_find

enum_find        1088 enum.c             rb_define_method(rb_mEnumerable,"find", enum_find, -1);
enum_find        1089 enum.c             rb_define_method(rb_mEnumerable,"detect", enum_find, -1);


enum_find_all

enum_find_all    1090 enum.c             rb_define_method(rb_mEnumerable,"find_all", enum_find_all, 0);
enum_find_all    1091 enum.c             rb_define_method(rb_mEnumerable,"select", enum_find_all, 0);


enum_member

enum_member      1105 enum.c             rb_define_method(rb_mEnumerable,"member?", enum_member, 1);
enum_member      1106 enum.c             rb_define_method(rb_mEnumerable,"include?", enum_member, 1);


enum_to_a

enum_to_a         417 enum.c             return rb_ary_sort(enum_to_a(obj));
enum_to_a        1081 enum.c             rb_define_method(rb_mEnumerable,"to_a", enum_to_a, 0);
enum_to_a        1082 enum.c             rb_define_method(rb_mEnumerable,"entries", enum_to_a, 0);


enumerator_allocate

enumerator_allocate  315 enumerator.c       return enumerator_init(enumerator_allocate(rb_cEnumerator), obj, meth, argc, argv);
enumerator_allocate  383 enumerator.c       rb_define_alloc_func(rb_cEnumerator, enumerator_allocate);


enumerator_init

enumerator_init   309 enumerator.c       return enumerator_init(obj, recv, meth, argc, argv);
enumerator_init   315 enumerator.c       return enumerator_init(enumerator_allocate(rb_cEnumerator), obj, meth, argc, argv);


enumerator_iter

enumerator_iter   339 enumerator.c       return rb_iterate(enumerator_iter, (VALUE)e, e->iter, (VALUE)e);
enumerator_iter   364 enumerator.c       return rb_iterate(enumerator_iter, (VALUE)e,


enumerator_mark

enumerator_mark    69 enumerator.c       if (RDATA(obj)->dmark != enumerator_mark) {
enumerator_mark   261 enumerator.c   			    enumerator_mark, -1, ptr);


enumerator_ptr

enumerator_ptr    267 enumerator.c       struct enumerator *ptr = enumerator_ptr(enum_obj);
enumerator_ptr    337 enumerator.c       struct enumerator *e = enumerator_ptr(obj);
enumerator_ptr    361 enumerator.c       struct enumerator *e = enumerator_ptr(obj);


env_aset

env_aset         2213 hash.c         	env_aset(Qnil, key, val);
env_aset         2246 hash.c         	env_aset(Qnil, key, val);
env_aset         2347 hash.c             rb_define_singleton_method(envtbl,"[]=", env_aset, 2);
env_aset         2348 hash.c             rb_define_singleton_method(envtbl,"store", env_aset, 2);


env_delete

env_delete       1566 hash.c             val = env_delete(obj, name);
env_delete       1922 hash.c         		env_delete(Qnil, RARRAY(keys)->ptr[i]);
env_delete       1989 hash.c         	    env_delete(Qnil, RARRAY(keys)->ptr[i]);
env_delete       2195 hash.c         	    env_delete(Qnil, key);
env_delete       2234 hash.c         	env_delete(env, RARRAY(keys)->ptr[i]);


env_each_i

env_each_i       1898 hash.c             return env_each_i(ehash, Qfalse);
env_each_i       1905 hash.c             return env_each_i(ehash, Qtrue);


env_has_key

env_has_key      2375 hash.c             rb_define_singleton_method(envtbl,"include?", env_has_key, 1);
env_has_key      2376 hash.c             rb_define_singleton_method(envtbl,"member?", env_has_key, 1);
env_has_key      2377 hash.c             rb_define_singleton_method(envtbl,"has_key?", env_has_key, 1);
env_has_key      2379 hash.c             rb_define_singleton_method(envtbl,"key?", env_has_key, 1);


env_has_value

env_has_value    2378 hash.c             rb_define_singleton_method(envtbl,"has_value?", env_has_value, 1);
env_has_value    2380 hash.c             rb_define_singleton_method(envtbl,"value?", env_has_value, 1);


env_key

env_key          2153 hash.c             return env_key(dmy, value);
env_key          2367 hash.c             rb_define_singleton_method(envtbl,"key", env_key, 1);


env_keys

env_keys         1821 hash.c             keys = env_keys();
env_keys         1916 hash.c             keys = env_keys();
env_keys         1985 hash.c             keys = env_keys();
env_keys         2228 hash.c             keys = env_keys();
env_keys         2372 hash.c             rb_define_singleton_method(envtbl,"keys", env_keys, 0);


env_reject_bang

env_reject_bang  1934 hash.c             env_reject_bang();
env_reject_bang  2357 hash.c             rb_define_singleton_method(envtbl,"reject!", env_reject_bang, 0);


env_size

env_size         2369 hash.c             rb_define_singleton_method(envtbl,"size", env_size, 0);
env_size         2370 hash.c             rb_define_singleton_method(envtbl,"length", env_size, 0);


env_str_new

env_str_new      1529 hash.c             return env_str_new(ptr, strlen(ptr));
env_str_new      1805 hash.c         	    rb_ary_push(ary, env_str_new(*env, s-*env));
env_str_new      1876 hash.c         	    rb_ary_push(ary, env_str_new(*env, s-*env));
env_str_new      1965 hash.c         	    VALUE k = env_str_new(*env, s-*env);
env_str_new      2044 hash.c         	    rb_ary_push(ary, rb_assoc_new(env_str_new(*env, s-*env),
env_str_new      2138 hash.c         		str = env_str_new(*env, s-*env-1);
env_str_new      2168 hash.c         	    rb_hash_aset(hash, env_str_new(*env, s-*env),
env_str_new      2193 hash.c         	    VALUE key = env_str_new(*env, s-*env);


env_str_new2

env_str_new2     1545 hash.c         	VALUE value = env_str_new2(val);
env_str_new2     1595 hash.c         	return env_str_new2(env);
env_str_new2     1632 hash.c             return env_str_new2(env);
env_str_new2     1840 hash.c         	    rb_ary_push(ary, env_str_new2(s+1));
env_str_new2     1877 hash.c         	    rb_ary_push(ary, env_str_new2(s+1));
env_str_new2     1966 hash.c         	    VALUE v = env_str_new2(s+1);
env_str_new2     2045 hash.c         					  env_str_new2(s+1)));
env_str_new2     2169 hash.c         			       env_str_new2(s+1));
env_str_new2     2194 hash.c         	    VALUE val = env_str_new2(getenv(RSTRING(key)->ptr));


env_to_hash

env_to_hash      2180 hash.c             return rb_hash_delete_if(env_to_hash());
env_to_hash      2206 hash.c             return rb_hash_invert(env_to_hash());
env_to_hash      2381 hash.c             rb_define_singleton_method(envtbl,"to_hash", env_to_hash, 0);


env_values

env_values       1851 hash.c             VALUE values = env_values();
env_values       1856 hash.c             values = env_values();
env_values       2373 hash.c             rb_define_singleton_method(envtbl,"values", env_values, 0);


environ

environ          1241 eval.c         extern char **environ;
environ          1291 eval.c             rb_origenviron = environ;
environ          1511 hash.c         extern char **environ;
environ          1656 hash.c             env = GET_ENVIRON(environ);
environ          1667 hash.c             FREE_ENVIRON(environ);
environ          1704 hash.c             if (environ == origenviron) {	/* need we copy environment? */
environ          1709 hash.c         	for (max = i; environ[max]; max++) ;
environ          1712 hash.c         	    tmpenv[j] = strdup(environ[j]);
environ          1714 hash.c         	environ = tmpenv;		/* tell exec where it is now */
environ          1716 hash.c             if (environ[i]) {
environ          1718 hash.c         	while (*envp && *envp != environ[i]) envp++;
environ          1720 hash.c         	    free(environ[i]);
environ          1722 hash.c         	    while (environ[i]) {
environ          1723 hash.c         		environ[i] = environ[i+1];
environ          1731 hash.c         	REALLOC_N(environ, char*, i+2);	/* just expand it a bit */
environ          1732 hash.c         	environ[i+1] = 0;	/* make sure it's null terminated */
environ          1735 hash.c             environ[i] = ALLOC_N(char, len);
environ          1737 hash.c             snprintf(environ[i],len,"%s=%s",name,value); /* all that work just for this */
environ          1744 hash.c             strcpy(environ[i],name); strupr(environ[i]);
environ          1745 hash.c             sprintf(environ[i] + strlen(name),"=%s", value);
environ          1801 hash.c             env = GET_ENVIRON(environ);
environ          1809 hash.c             FREE_ENVIRON(environ);
environ          1836 hash.c             env = GET_ENVIRON(environ);
environ          1844 hash.c             FREE_ENVIRON(environ);
environ          1872 hash.c             env = GET_ENVIRON(environ);
environ          1881 hash.c             FREE_ENVIRON(environ);
environ          1961 hash.c             env = GET_ENVIRON(environ);
environ          1973 hash.c             FREE_ENVIRON(environ);
environ          2009 hash.c             env = GET_ENVIRON(environ);
environ          2013 hash.c         	if (env != environ) {
environ          2025 hash.c             FREE_ENVIRON(environ);
environ          2040 hash.c             env = GET_ENVIRON(environ);
environ          2049 hash.c             FREE_ENVIRON(environ);
environ          2066 hash.c             env = GET_ENVIRON(environ);
environ          2069 hash.c             FREE_ENVIRON(environ);
environ          2079 hash.c             env = GET_ENVIRON(environ);
environ          2081 hash.c         	FREE_ENVIRON(environ);
environ          2084 hash.c             FREE_ENVIRON(environ);
environ          2108 hash.c             env = GET_ENVIRON(environ);
environ          2114 hash.c         		FREE_ENVIRON(environ);
environ          2120 hash.c             FREE_ENVIRON(environ);
environ          2132 hash.c             env = GET_ENVIRON(environ);
environ          2139 hash.c         		FREE_ENVIRON(environ);
environ          2145 hash.c             FREE_ENVIRON(environ);
environ          2164 hash.c             env = GET_ENVIRON(environ);
environ          2173 hash.c             FREE_ENVIRON(environ);
environ          2189 hash.c             env = GET_ENVIRON(environ);
environ          2199 hash.c             FREE_ENVIRON(environ);
environ          2341 hash.c             origenviron = environ;
environ           994 ruby.c         extern char **environ;
environ          1002 ruby.c             if (!environ || (s = environ[0]) == NULL) return;
environ          1005 ruby.c             for (i = 1; environ[i]; i++) {
environ          1006 ruby.c         	if (environ[i] == s + 1) {
environ             7 wince/stdlib.c char **environ;


eof

eof              1213 ext/syck/gram.c            ((SyckParser *)parser)->eof = 1;
eof               886 ext/syck/rubyext.c         if ( parser->eof == 1 )
eof               140 ext/syck/syck.c     p->eof = 0;
eof               249 ext/syck/syck.h     int eof;
eof              4872 parse.y        	else if (c == -1) goto eof;
eof              4889 parse.y        	else if (c == -1) goto eof;
eof              4892 parse.y              eof:
eof              4920 parse.y        		if (c == -1) goto eof;
eof              4970 parse.y        	else if (c == -1) goto eof;
eof              4974 parse.y              eof:


eof_mime

eof_mime         4545 ext/nkf/nkf-utf8/nkf.c                 eof_mime();
eof_mime         4550 ext/nkf/nkf-utf8/nkf.c                 eof_mime();
eof_mime         4571 ext/nkf/nkf-utf8/nkf.c         eof_mime();
eof_mime         4658 ext/nkf/nkf-utf8/nkf.c                     eof_mime();
eof_mime         4669 ext/nkf/nkf-utf8/nkf.c                         eof_mime();
eof_mime         4679 ext/nkf/nkf-utf8/nkf.c                     eof_mime();
eof_mime         4710 ext/nkf/nkf-utf8/nkf.c 	    eof_mime();


eql

eql                64 hash.c             return !rb_with_disable_interrupt(eql, (VALUE)args);
eql              1355 hash.c             if (eql) {


erf

erf               431 math.c             return rb_float_new(erf(RFLOAT(x)->value));
erf                61 missing.h      extern double erf(double);


erfc

erfc              445 math.c             return rb_float_new(erfc(RFLOAT(x)->value));
erfc               62 missing.h      extern double erfc(double);


err_append

err_append         56 error.c        static void err_append(const char*);
err_append         63 error.c            err_append(buf);
err_append         86 error.c            err_append(buf);


err_position

err_position       50 error.c            n = err_position(buf, len);
err_position      156 error.c            int len = err_position(buf, BUFSIZ);


err_snprintf

err_snprintf       62 error.c            err_snprintf(buf, BUFSIZ, fmt, args);
err_snprintf       95 error.c            err_snprintf(buf, BUFSIZ, fmt, args);


error_handle

error_handle     1433 eval.c         	exit(error_handle(state));
error_handle     1492 eval.c             ex = error_handle(ex);
error_handle     7574 eval.c         		error_handle(status);
error_handle     7592 eval.c         		error_handle(status);


error_inval

error_inval       602 ext/stringio/stringio.c 	error_inval(0);
error_inval       657 ext/stringio/stringio.c 	error_inval(0);
error_inval      1215 ext/stringio/stringio.c 	error_inval("negative legnth");


error_pos

error_pos        1157 eval.c         	error_pos();
error_pos        1162 eval.c         	if (NIL_P(mesg)) error_pos();
error_pos        1370 eval.c         	error_pos();
error_pos        1374 eval.c         	error_pos();
error_pos        1378 eval.c         	error_pos();
error_pos        1382 eval.c         	error_pos();
error_pos        1386 eval.c         	error_pos();
error_pos        1396 eval.c         	    error_pos();


error_print

error_print      1319 eval.c         	error_print();
error_print      1406 eval.c         	    error_print();
error_print      4316 eval.c         	    error_print();
error_print      4397 eval.c         	error_print();
error_print      11807 eval.c         	    error_print();


escape_seq

escape_seq        240 ext/syck/token.c char escape_seq( char );
escape_seq       2079 ext/syck/token.c                         QUOTECAT(qstr, qcapa, qidx, escape_seq( ch ));
escape_seq       2282 ext/syck/token.c                         QUOTECAT(qstr, qcapa, qidx, escape_seq( ch ));


eucjp_code_to_mbclen

eucjp_code_to_mbclen  165 euc_jp.c             return (eucjp_code_to_mbclen(code) > 1 ? TRUE : FALSE);
eucjp_code_to_mbclen  222 euc_jp.c         eucjp_code_to_mbclen,


ev_on_event

ev_on_event      6822 ext/win32ole/win32ole.c     return ev_on_event(argc, argv, self, Qfalse);
ev_on_event      6839 ext/win32ole/win32ole.c     return ev_on_event(argc, argv, self, Qtrue);


eval

eval             1020 eval.c         static VALUE eval(VALUE,VALUE,VALUE,const char*,int);
eval             1578 eval.c             v = eval(ruby_top_self, rb_str_new2(str), Qnil, 0, 0);
eval             1745 eval.c         	val = eval(ruby_top_self, cmd, Qnil, 0, 0);
eval             6273 eval.c         	val = eval(self, src, scope, file, line);
eval             6278 eval.c             return eval(self, src, scope, file, line);
eval             6326 eval.c             return eval(args[0], args[1], Qnil, (char*)args[2], (int)args[3]);


eval_node

eval_node        1515 eval.c         	eval_node(ruby_top_self, ruby_eval_tree);
eval_node        6163 eval.c         	result = eval_node(self, node);
eval_node        6606 eval.c         	    eval_node(self, node);


eval_queue_handler

eval_queue_handler 5723 ext/tk/tcltklib.c int eval_queue_handler _((Tcl_Event *, int));
eval_queue_handler 5838 ext/tk/tcltklib.c     evq->ev.proc = eval_queue_handler;


evstr2dstr

evstr2dstr        268 parse.y        static NODE *evstr2dstr(NODE*);
evstr2dstr       3562 parse.y        			    node = evstr2dstr(node);
evstr2dstr       3681 parse.y        			$$ = list_append($1, evstr2dstr($2));


exc_backtrace

exc_backtrace     490 error.c            if (!rb_equal(exc_backtrace(exc), exc_backtrace(obj)))
exc_backtrace     946 error.c            rb_define_method(rb_eException, "backtrace", exc_backtrace, 0);


exc_initialize

exc_initialize    328 error.c            exc_initialize(argc, argv, exc);
exc_initialize    941 error.c            rb_define_method(rb_eException, "initialize", exc_initialize, -1);


except

except           10830 eval.c             if (!read && !write && !except) {
except           10861 eval.c         	    n = select(max, read, write, except, tvp);
except           10893 eval.c             if (except) rb_fd_copy(&curr_thread->exceptfds, except, max);
except           10905 eval.c             if (except) *except = *rb_fd_ptr(&curr_thread->exceptfds);
except           4439 io.c               if (!NIL_P(except)) {
except           4440 io.c           	Check_Type(except, T_ARRAY);
except           4441 io.c           	for (i=0; i<RARRAY(except)->len; i++) {
except           4442 io.c           	    GetOpenFile(rb_io_get_io(RARRAY(except)->ptr[i]), fptr);
except           4489 io.c           	    for (i=0; i< RARRAY(except)->len; i++) {
except           4490 io.c           		GetOpenFile(rb_io_get_io(RARRAY(except)->ptr[i]), fptr);
except           4492 io.c           		    rb_ary_push(list, rb_ary_entry(except, i));
except           4502 io.c               VALUE read, write, except;
except           4514 io.c               return select_internal(p->read, p->write, p->except, p->timeout, p->fdsets);
except           4548 io.c               rb_scan_args(argc, argv, "13", &args.read, &args.write, &args.except, &timeout);
except           4563 io.c               return select_internal(args.read, args.write, args.except,


exec_under

exec_under       6345 eval.c             return exec_under(eval_under_i, under, under, (VALUE)args);
exec_under       6367 eval.c             return exec_under(yield_under_i, under, 0, (VALUE)args);


execl

execl            1027 process.c      		execl(shell, "sh", "-c", str, (char *) NULL);
execl            1035 process.c      	    execl("/bin/sh", "sh", "-c", str, (char *)NULL);


execv

execv             968 process.c          execv(prog, argv);
execv             929 ruby.c         		    execv(path, argv);
execv              31 wince/process.h int execv(const char *path, char *const argv[]);


exhash

exhash            258 ext/sdbm/_sdbm.c 	if (getpage(db, exhash(key)))
exhash            274 ext/sdbm/_sdbm.c 	if (getpage(db, exhash(key))) {
exhash            312 ext/sdbm/_sdbm.c 	if (getpage(db, (hash = exhash(key)))) {
exhash            886 ext/sdbm/_sdbm.c 		(void) putpair((exhash(key) & sbit) ? new : pag, key, val);


exponent

exponent          169 ext/bigdecimal/bigdecimal.c         hash += p->exponent;
exponent          272 ext/bigdecimal/bigdecimal.c     if(a->exponent!=b->exponent) {
exponent          274 ext/bigdecimal/bigdecimal.c         d = a->exponent - b->exponent;
exponent         1735 ext/bigdecimal/bigdecimal.c          ex = vp->exponent;
exponent         1835 ext/bigdecimal/bigdecimal.c     S_INT e = a->exponent;
exponent         1849 ext/bigdecimal/bigdecimal.c     a->exponent = m;
exponent         2027 ext/bigdecimal/bigdecimal.c         c->exponent = a->exponent;    /* store  exponent */
exponent         2099 ext/bigdecimal/bigdecimal.c     if(a->exponent > b->exponent) {
exponent         2103 ext/bigdecimal/bigdecimal.c     else if(a->exponent < b->exponent) {
exponent         2394 ext/bigdecimal/bigdecimal.c     word_shift =((a->exponent) -(b->exponent));
exponent         2463 ext/bigdecimal/bigdecimal.c     c->exponent = a->exponent;
exponent         2535 ext/bigdecimal/bigdecimal.c     c->exponent = a->exponent;    /* set exponent */
exponent         2536 ext/bigdecimal/bigdecimal.c     if(!AddExponent(c,b->exponent)) return 0;
exponent         2778 ext/bigdecimal/bigdecimal.c     c->exponent = a->exponent;
exponent         2780 ext/bigdecimal/bigdecimal.c     if(!AddExponent(c,-(b->exponent))) return 0;
exponent         2785 ext/bigdecimal/bigdecimal.c     r->exponent = a->exponent;
exponent         2897 ext/bigdecimal/bigdecimal.c     if((a->exponent) >(b->exponent)) {
exponent         2901 ext/bigdecimal/bigdecimal.c     if((a->exponent) <(b->exponent)) {
exponent         3080 ext/bigdecimal/bigdecimal.c     ex =(a->exponent) * BASE_FIG;
exponent         3203 ext/bigdecimal/bigdecimal.c     ex =(a->exponent) * BASE_FIG;
exponent         3230 ext/bigdecimal/bigdecimal.c     ex = a->exponent;
exponent         3392 ext/bigdecimal/bigdecimal.c     a->exponent = eb;
exponent         3460 ext/bigdecimal/bigdecimal.c     *e = m->exponent * ((S_INT)BASE_FIG);
exponent         3529 ext/bigdecimal/bigdecimal.c     m->exponent = ne;
exponent         3591 ext/bigdecimal/bigdecimal.c     m->exponent = ne;
exponent         3653 ext/bigdecimal/bigdecimal.c     prec = x->exponent;
exponent         3665 ext/bigdecimal/bigdecimal.c     y->exponent += n;
exponent         3681 ext/bigdecimal/bigdecimal.c         if(f->exponent <= prec) goto converge;
exponent         3732 ext/bigdecimal/bigdecimal.c     nf += y->exponent*((int)BASE_FIG);
exponent         3796 ext/bigdecimal/bigdecimal.c             int e = y->exponent;
exponent         3799 ext/bigdecimal/bigdecimal.c             y->exponent = e+1;
exponent         3806 ext/bigdecimal/bigdecimal.c         y->exponent += exptoadd/BASE_FIG;
exponent         3812 ext/bigdecimal/bigdecimal.c                 y->exponent++;
exponent         3929 ext/bigdecimal/bigdecimal.c     if(x->exponent > 0 && (U_LONG)x->exponent >= x->Prec) {
exponent         3932 ext/bigdecimal/bigdecimal.c     } else if(x->exponent <= 0) {
exponent         3937 ext/bigdecimal/bigdecimal.c     y->Prec = x->Prec -(U_LONG) x->exponent;
exponent         3939 ext/bigdecimal/bigdecimal.c     y->exponent = 0;
exponent         3943 ext/bigdecimal/bigdecimal.c     ind_x = x->exponent;
exponent         3993 ext/bigdecimal/bigdecimal.c     if((x->exponent == 1) &&(x->Prec == 1) &&(x->frac[0] == 1)) {
exponent         4080 ext/bigdecimal/bigdecimal.c             printf("       Exp. =%d\n", v->exponent);
exponent           84 ext/bigdecimal/bigdecimal.h     S_INT  exponent;/* Exponent part.                           */
exponent          183 ext/bigdecimal/bigdecimal.h #define VpSetOne(a)       {(a)->frac[0]=(a)->exponent=(a)->Prec=1;(a)->sign=VP_SIGN_POSITIVE_FINITE;}
exponent          206 ext/bigdecimal/bigdecimal.h #define VpIsOne(a)      ((a->Prec==1)&&(a->frac[0]==1)&&(a->exponent==1))
exponent          207 ext/bigdecimal/bigdecimal.h #define VpExponent(a)   (a->exponent)
exponent          441 missing/vsnprintf.c static int exponent __P((char *, int, int));
exponent          735 missing/vsnprintf.c 				expsize = exponent(expstr, expt, ch);


ext

ext              6695 eval.c             if (ext) {
ext              6696 eval.c         	len = ext - feature;
ext              6697 eval.c         	elen = strlen(ext);
ext              6708 eval.c         	    if (ext) continue;
ext              6712 eval.c         	if ((!rb || !ext) && (IS_SOEXT(e) || IS_DLEXT(e))) {
ext              6715 eval.c         	if ((rb || !ext) && (strcmp(e, ".rb") == 0)) {
ext              6818 eval.c             char *ext, *ftptr;
ext              6822 eval.c             ext = strrchr(ftptr = RSTRING(fname)->ptr, '.');
ext              6823 eval.c             if (ext && !strchr(ext, '/')) {
ext              6824 eval.c         	if (strcmp(".rb", ext) == 0) {
ext              6825 eval.c         	    if (rb_feature_p(ftptr, ext, Qtrue)) return 'r';
ext              6828 eval.c         		ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
ext              6829 eval.c         		if (!rb_feature_p(ftptr, ext, Qtrue))
ext              6835 eval.c         	else if (IS_SOEXT(ext)) {
ext              6836 eval.c         	    if (rb_feature_p(ftptr, ext, Qfalse)) return 's';
ext              6837 eval.c         	    tmp = rb_str_new(RSTRING(fname)->ptr, ext-RSTRING(fname)->ptr);
ext              6842 eval.c         		ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
ext              6843 eval.c         		if (!rb_feature_p(ftptr, ext, Qfalse))
ext              6852 eval.c         		ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
ext              6853 eval.c         		if (!rb_feature_p(ftptr, ext, Qfalse))
ext              6859 eval.c         	else if (IS_DLEXT(ext)) {
ext              6860 eval.c         	    if (rb_feature_p(ftptr, ext, Qfalse)) return 's';
ext              6863 eval.c         		ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
ext              6864 eval.c         		if (!rb_feature_p(ftptr, ext, Qfalse))
ext              6885 eval.c         	ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
ext              6886 eval.c         	if (rb_feature_p(ftptr, ext, !--type)) break;
ext               461 ext/openssl/ossl_ocsp.c     if(!NIL_P(ext)){
ext               463 ext/openssl/ossl_ocsp.c 	Check_Type(ext, T_ARRAY);
ext               464 ext/openssl/ossl_ocsp.c 	for (i = 0; i < RARRAY(ext)->len; i++)
ext               465 ext/openssl/ossl_ocsp.c 	    OSSL_Check_Kind(RARRAY(ext)->ptr[i], cX509Ext);
ext               489 ext/openssl/ossl_ocsp.c     if(!NIL_P(ext)){
ext               493 ext/openssl/ossl_ocsp.c 	for(i = 0; i < RARRAY(ext)->len; i++){
ext               494 ext/openssl/ossl_ocsp.c 	    x509ext = DupX509ExtPtr(RARRAY(ext)->ptr[i]);
ext               523 ext/openssl/ossl_ocsp.c     VALUE ret, ary, ext;
ext               546 ext/openssl/ossl_ocsp.c 	ext = rb_ary_new();
ext               550 ext/openssl/ossl_ocsp.c 	    rb_ary_push(ext, ossl_x509ext_new(x509ext));
ext               552 ext/openssl/ossl_ocsp.c 	rb_ary_push(ary, ext);
ext               531 ext/openssl/ossl_x509cert.c     X509_EXTENSION *ext;
ext               541 ext/openssl/ossl_x509cert.c 	ext = X509_get_ext(x509, i); /* NO DUP - don't free! */
ext               542 ext/openssl/ossl_x509cert.c 	rb_ary_push(ary, ossl_x509ext_new(ext));
ext               555 ext/openssl/ossl_x509cert.c     X509_EXTENSION *ext;
ext               567 ext/openssl/ossl_x509cert.c 	ext = DupX509ExtPtr(RARRAY(ary)->ptr[i]);
ext               569 ext/openssl/ossl_x509cert.c 	if (!X509_add_ext(x509, ext, -1)) { /* DUPs ext - FREE it */
ext               570 ext/openssl/ossl_x509cert.c 	    X509_EXTENSION_free(ext);
ext               573 ext/openssl/ossl_x509cert.c 	X509_EXTENSION_free(ext);
ext               583 ext/openssl/ossl_x509cert.c     X509_EXTENSION *ext;
ext               586 ext/openssl/ossl_x509cert.c     ext = DupX509ExtPtr(extension);
ext               587 ext/openssl/ossl_x509cert.c     if (!X509_add_ext(x509, ext, -1)) { /* DUPs ext - FREE it */
ext               588 ext/openssl/ossl_x509cert.c 	X509_EXTENSION_free(ext);
ext               591 ext/openssl/ossl_x509cert.c     X509_EXTENSION_free(ext);
ext               434 ext/openssl/ossl_x509crl.c     X509_EXTENSION *ext;
ext               445 ext/openssl/ossl_x509crl.c 	ext = X509_CRL_get_ext(crl, i); /* NO DUP - don't free! */
ext               446 ext/openssl/ossl_x509crl.c 	rb_ary_push(ary, ossl_x509ext_new(ext));
ext               459 ext/openssl/ossl_x509crl.c     X509_EXTENSION *ext;
ext               471 ext/openssl/ossl_x509crl.c 	ext = DupX509ExtPtr(RARRAY(ary)->ptr[i]);
ext               472 ext/openssl/ossl_x509crl.c 	if(!X509_CRL_add_ext(crl, ext, -1)) { /* DUPs ext - FREE it */
ext               473 ext/openssl/ossl_x509crl.c 	    X509_EXTENSION_free(ext);
ext               476 ext/openssl/ossl_x509crl.c 	X509_EXTENSION_free(ext);
ext               486 ext/openssl/ossl_x509crl.c     X509_EXTENSION *ext;
ext               489 ext/openssl/ossl_x509crl.c     ext = DupX509ExtPtr(extension);
ext               490 ext/openssl/ossl_x509crl.c     if (!X509_CRL_add_ext(crl, ext, -1)) { /* DUPs ext - FREE it */
ext               491 ext/openssl/ossl_x509crl.c 	X509_EXTENSION_free(ext);
ext               494 ext/openssl/ossl_x509crl.c     X509_EXTENSION_free(ext);
ext                14 ext/openssl/ossl_x509ext.c     if (!ext) { \
ext                17 ext/openssl/ossl_x509ext.c     obj = Data_Wrap_Struct(klass, 0, X509_EXTENSION_free, ext); \
ext                20 ext/openssl/ossl_x509ext.c     Data_Get_Struct(obj, X509_EXTENSION, ext); \
ext                21 ext/openssl/ossl_x509ext.c     if (!ext) { \
ext                27 ext/openssl/ossl_x509ext.c     GetX509Ext(obj, ext); \
ext                58 ext/openssl/ossl_x509ext.c     if (!ext) {
ext                61 ext/openssl/ossl_x509ext.c 	new = X509_EXTENSION_dup(ext);
ext                74 ext/openssl/ossl_x509ext.c     X509_EXTENSION *ext;
ext                76 ext/openssl/ossl_x509ext.c     SafeGetX509Ext(obj, ext);
ext                78 ext/openssl/ossl_x509ext.c     return ext;
ext                84 ext/openssl/ossl_x509ext.c     X509_EXTENSION *ext, *new;
ext                86 ext/openssl/ossl_x509ext.c     SafeGetX509Ext(obj, ext);
ext                87 ext/openssl/ossl_x509ext.c     if (!(new = X509_EXTENSION_dup(ext))) {
ext               217 ext/openssl/ossl_x509ext.c     X509_EXTENSION *ext;
ext               241 ext/openssl/ossl_x509ext.c     ext = X509V3_EXT_nconf_nid(conf, ctx, nid, RSTRING(valstr)->ptr);
ext               244 ext/openssl/ossl_x509ext.c     ext = X509V3_EXT_conf_nid(empty_lhash, ctx, nid, RSTRING(valstr)->ptr);
ext               246 ext/openssl/ossl_x509ext.c     if (!ext){
ext               250 ext/openssl/ossl_x509ext.c     WrapX509Ext(cX509Ext, obj, ext);
ext               261 ext/openssl/ossl_x509ext.c     X509_EXTENSION *ext;
ext               264 ext/openssl/ossl_x509ext.c     if(!(ext = X509_EXTENSION_new())){
ext               267 ext/openssl/ossl_x509ext.c     WrapX509Ext(klass, obj, ext);
ext               277 ext/openssl/ossl_x509ext.c     X509_EXTENSION *ext;
ext               279 ext/openssl/ossl_x509ext.c     GetX509Ext(self, ext);
ext               299 ext/openssl/ossl_x509ext.c     X509_EXTENSION *ext;
ext               307 ext/openssl/ossl_x509ext.c     GetX509Ext(self, ext);
ext               308 ext/openssl/ossl_x509ext.c     X509_EXTENSION_set_object(ext, obj);
ext               316 ext/openssl/ossl_x509ext.c     X509_EXTENSION *ext;
ext               334 ext/openssl/ossl_x509ext.c     GetX509Ext(self, ext);
ext               335 ext/openssl/ossl_x509ext.c     X509_EXTENSION_set_data(ext, asn1s);
ext               343 ext/openssl/ossl_x509ext.c     X509_EXTENSION *ext;
ext               345 ext/openssl/ossl_x509ext.c     GetX509Ext(self, ext);
ext               346 ext/openssl/ossl_x509ext.c     X509_EXTENSION_set_critical(ext, RTEST(flag) ? 1 : 0);
ext               354 ext/openssl/ossl_x509ext.c     X509_EXTENSION *ext;
ext               360 ext/openssl/ossl_x509ext.c     GetX509Ext(obj, ext);
ext               361 ext/openssl/ossl_x509ext.c     extobj = X509_EXTENSION_get_object(ext);
ext               377 ext/openssl/ossl_x509ext.c     X509_EXTENSION *ext;
ext               381 ext/openssl/ossl_x509ext.c     GetX509Ext(obj, ext);
ext               384 ext/openssl/ossl_x509ext.c     if (!X509V3_EXT_print(out, ext, 0, 0))
ext               385 ext/openssl/ossl_x509ext.c 	M_ASN1_OCTET_STRING_print(out, ext->value);
ext               394 ext/openssl/ossl_x509ext.c     X509_EXTENSION *ext;
ext               396 ext/openssl/ossl_x509ext.c     GetX509Ext(obj, ext);
ext               397 ext/openssl/ossl_x509ext.c     return X509_EXTENSION_get_critical(ext) ? Qtrue : Qfalse;
ext               403 ext/openssl/ossl_x509ext.c     X509_EXTENSION *ext;
ext               408 ext/openssl/ossl_x509ext.c     GetX509Ext(obj, ext);
ext               409 ext/openssl/ossl_x509ext.c     if((len = i2d_X509_EXTENSION(ext, NULL)) <= 0)
ext               413 ext/openssl/ossl_x509ext.c     if(i2d_X509_EXTENSION(ext, &p) < 0)
ext               148 ext/openssl/ossl_x509revoked.c     X509_EXTENSION *ext;
ext               159 ext/openssl/ossl_x509revoked.c 	ext = X509_REVOKED_get_ext(rev, i);
ext               160 ext/openssl/ossl_x509revoked.c 	rb_ary_push(ary, ossl_x509ext_new(ext));
ext               173 ext/openssl/ossl_x509revoked.c     X509_EXTENSION *ext;
ext               186 ext/openssl/ossl_x509revoked.c 	ext = DupX509ExtPtr(item);
ext               187 ext/openssl/ossl_x509revoked.c 	if(!X509_REVOKED_add_ext(rev, ext, -1)) {
ext               201 ext/openssl/ossl_x509revoked.c     if(!X509_REVOKED_add_ext(rev, DupX509ExtPtr(ext), -1)) {
ext               205 ext/openssl/ossl_x509revoked.c     return ext;
ext                90 ext/syck/yaml2byte.c     assert(ext && HASH == ext->hash);
ext                91 ext/syck/yaml2byte.c     if(ext->printed) {
ext                92 ext/syck/yaml2byte.c         assert(ext->buffer[0] ==YAMLBYTE_ANCHOR);
ext                93 ext/syck/yaml2byte.c         curr = ext->buffer;
ext                96 ext/syck/yaml2byte.c         bytestring_append(str, YAMLBYTE_ALIAS, ext->buffer + 1, curr);
ext                98 ext/syck/yaml2byte.c         ext->printed = 1;
ext                99 ext/syck/yaml2byte.c         length  = (ext->length - ext->remaining);
ext               107 ext/syck/yaml2byte.c         from = ext->buffer;
ext               108 ext/syck/yaml2byte.c         stop = ext->buffer + length;
ext              4111 file.c         	for (i=0; ext[i]; i++) {
ext              4113 file.c         	    rb_str_cat2(fname, ext[i]);
ext              4132 file.c         	for (j=0; ext[j]; j++) {
ext              4134 file.c         	    rb_str_cat2(fname, ext[j]);
ext               869 ruby.c         	    char *ext = strrchr(fname, '.');
ext               870 ruby.c         	    if (ext && strcasecmp(ext, ".exe") == 0)
ext               184 util.c             t = ext; extlen = 0;
ext               186 util.c             if (extlen == 0) { ext[0] = '.'; ext[1] = 0; extlen++; }
ext               189 util.c                 if (strEQ(ext, suffix)) goto fallback;
ext               194 util.c         	    ext[extlen] = *suffix;
ext               195 util.c         	    ext[++extlen] = '\0';
ext               200 util.c         	else if (ext[3] != *suffix) {
ext               201 util.c         	    ext[3] = *suffix;
ext               207 util.c         	strcpy(p, ext);
ext               211 util.c         	(void)memcpy(p, strEQ(ext, suffix1) ? suffix2 : suffix1, 5);


extract_beg_len

extract_beg_len    63 ext/strscan/strscan.c static VALUE extract_beg_len _((struct strscanner *p, long beg_i, long len));
extract_beg_len   460 ext/strscan/strscan.c         return extract_beg_len(p, p->prev, p->regs.end[0]);
extract_beg_len   787 ext/strscan/strscan.c     return extract_beg_len(p, p->curr, len);


extract_fd

extract_fd       2085 win32/win32.c      nonsock += extract_fd(&else_rd, rd, is_not_socket);
extract_fd       2088 win32/win32.c      extract_fd(&pipe_rd, &else_rd, is_pipe); // should not call is_pipe for socket
extract_fd       2091 win32/win32.c      extract_fd(&cons_rd, &else_rd, is_console); // ditto
extract_fd       2094 win32/win32.c      nonsock += extract_fd(&else_wr, wr, is_not_socket);
extract_fd       2123 win32/win32.c  	    extract_fd(&else_rd, &pipe_rd, is_readable_pipe);
extract_fd       2124 win32/win32.c  	    extract_fd(&else_rd, &cons_rd, is_readable_console);
extract_fd       2129 win32/win32.c  		r += extract_fd(rd, &else_rd, NULL); // move all
extract_fd       2130 win32/win32.c  		r += extract_fd(wr, &else_wr, NULL); // move all


extract_range

extract_range      62 ext/strscan/strscan.c static VALUE extract_range _((struct strscanner *p, long beg_i, long end_i));
extract_range     710 ext/strscan/strscan.c     return extract_range(p, p->prev + p->regs.beg[0],
extract_range     745 ext/strscan/strscan.c     return extract_range(p, p->prev + p->regs.beg[0],
extract_range     935 ext/strscan/strscan.c     return extract_range(p, p->prev + p->regs.beg[0],
extract_range    1003 ext/strscan/strscan.c     return extract_range(p, p->prev + p->regs.beg[i],
extract_range    1024 ext/strscan/strscan.c     return extract_range(p, 0, p->prev + p->regs.beg[0]);
extract_range    1044 ext/strscan/strscan.c     return extract_range(p, p->prev + p->regs.end[0], S_LEN(p));
extract_range    1061 ext/strscan/strscan.c     return extract_range(p, p->curr, S_LEN(p));


extract_user_token

extract_user_token  218 ext/racc/cparse/cparse.c static void extract_user_token _((struct cparse_params *v,
extract_user_token  299 ext/racc/cparse/cparse.c     extract_user_token(v, block_args, &tok, &val);
extract_user_token  468 ext/racc/cparse/cparse.c                 extract_user_token(v, tmp, &tok, &val);


false_and

false_and        2449 object.c           rb_define_method(rb_cNilClass, "&", false_and, 1);
false_and        2542 object.c           rb_define_method(rb_cFalseClass, "&", false_and, 1);


false_or

false_or         2450 object.c           rb_define_method(rb_cNilClass, "|", false_or, 1);
false_or         2543 object.c           rb_define_method(rb_cFalseClass, "|", false_or, 1);


false_xor

false_xor        2451 object.c           rb_define_method(rb_cNilClass, "^", false_xor, 1);
false_xor        2544 object.c           rb_define_method(rb_cFalseClass, "^", false_xor, 1);


fc_i

fc_i               96 variable.c     	    st_foreach(RCLASS(value)->iv_tbl, fc_i, (st_data_t)&arg);
fc_i              121 variable.c     	st_foreach_safe(RCLASS(rb_cObject)->iv_tbl, fc_i, (st_data_t)&arg);
fc_i              124 variable.c     	st_foreach_safe(rb_class_tbl, fc_i, (st_data_t)&arg);


fchown

fchown             89 file.c             return fchown(fd, owner, group);
fchown           1876 file.c             if (fchown(fptr->fd, o, g) == -1)
fchown           4170 io.c           			fchown(fw, st.st_uid, st.st_gid);


fclose

fclose            861 ext/nkf/nkf-utf8/nkf.c               fclose(fin);
fclose            917 ext/nkf/nkf-utf8/nkf.c         fclose(stdout);
fclose            920 ext/nkf/nkf-utf8/nkf.c         fclose(stdout);
fclose             36 ext/openssl/ossl_bio.c 	    fclose(fp);
fclose             76 ext/openssl/ossl_pkey.c     fclose(fp);
fclose             80 ext/openssl/ossl_x509cert.c     fclose(fp);
fclose           1994 io.c                   if (fclose(fptr->stdio_file) < 0 && !noraise) {
fclose           3325 io.c                           fclose(fptr->stdio_file);
fclose            864 ruby.c         	fclose(fp);
fclose           1173 ruby.c             (void)fclose(stdaux);
fclose           1174 ruby.c             (void)fclose(stdprn);
fclose            138 st.c               fclose(f);
fclose           3786 win32/win32.c  	return fclose(fp);
fclose           3789 win32/win32.c      fclose(fp);


fcntl

fcntl            1027 ext/socket/socket.c     mode = fcntl(fd, F_GETFL, 0);
fcntl            1044 ext/socket/socket.c     fcntl(fd, F_SETFL, mode|NONBLOCKING);
fcntl            1118 ext/socket/socket.c 	fcntl(fd, F_SETFL, mode);
fcntl             401 io.c                       && (r = fcntl(fptr->fd, F_GETFL)) != -1 &&
fcntl            2816 io.c           	fcntl(fd, F_SETFL, FD_CLOEXEC);
fcntl            3926 io.c           	    flags = fcntl(fd, F_GETFL);
fcntl            4578 io.c               retval = io_p?ioctl(fd, cmd, (void*)narg):fcntl(fd, cmd, narg);
fcntl            4580 io.c               retval = io_p?ioctl(fd, cmd, narg):fcntl(fd, cmd, narg);
fcntl              32 missing/dup2.c 		if (fcntl(fd1, F_GETFL) < 0)
fcntl              34 missing/dup2.c 		if (fcntl(fd2, F_GETFL) >= 0)
fcntl              39 missing/dup2.c 		if (fcntl(fd1, F_DUPFD, fd2) < 0)
fcntl              47 missing/flock.c     return fcntl(fd, (operation & LOCK_NB) ? F_SETLK : F_SETLKW, &lock);
fcntl            1317 process.c      	if (fcntl(ep[1], F_SETFD, FD_CLOEXEC)) {
fcntl             212 win32/win32.h  extern int fcntl(int, int, ...);


fdbm_alloc

fdbm_alloc         89 ext/dbm/dbm.c  static VALUE fdbm_alloc _((VALUE));
fdbm_alloc        731 ext/dbm/dbm.c      rb_define_alloc_func(rb_cDBM, fdbm_alloc);


fdbm_clear

fdbm_clear        464 ext/dbm/dbm.c      fdbm_clear(obj);
fdbm_clear        758 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "clear", fdbm_clear, 0);


fdbm_close

fdbm_close        166 ext/dbm/dbm.c          return rb_ensure(rb_yield, obj, fdbm_close, obj);
fdbm_close        735 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "close", fdbm_close, 0);


fdbm_delete_if

fdbm_delete_if    755 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "delete_if", fdbm_delete_if, 0);
fdbm_delete_if    756 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "reject!", fdbm_delete_if, 0);


fdbm_each_pair

fdbm_each_pair    747 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "each", fdbm_each_pair, 0);
fdbm_each_pair    750 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "each_pair", fdbm_each_pair, 0);


fdbm_fetch

fdbm_fetch        198 ext/dbm/dbm.c      return fdbm_fetch(obj, keystr, Qnil);
fdbm_fetch        210 ext/dbm/dbm.c      valstr = fdbm_fetch(obj, keystr, ifnone);
fdbm_fetch        275 ext/dbm/dbm.c          rb_ary_push(new, fdbm_fetch(obj, argv[i], Qnil));


fdbm_has_key

fdbm_has_key      763 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "include?", fdbm_has_key, 1);
fdbm_has_key      764 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "has_key?", fdbm_has_key, 1);
fdbm_has_key      765 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "member?", fdbm_has_key, 1);
fdbm_has_key      767 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "key?", fdbm_has_key, 1);


fdbm_has_value

fdbm_has_value    766 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "has_value?", fdbm_has_value, 1);
fdbm_has_value    768 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "value?", fdbm_has_value, 1);


fdbm_initialize

fdbm_initialize   161 ext/dbm/dbm.c      if (NIL_P(fdbm_initialize(argc, argv, obj))) {
fdbm_initialize   734 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "initialize", fdbm_initialize, -1);


fdbm_length

fdbm_length       744 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "length", fdbm_length, 0);
fdbm_length       745 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "size", fdbm_length, 0);


fdbm_modify

fdbm_modify       298 ext/dbm/dbm.c      fdbm_modify(obj);
fdbm_modify       333 ext/dbm/dbm.c      fdbm_modify(obj);
fdbm_modify       358 ext/dbm/dbm.c      fdbm_modify(obj);
fdbm_modify       396 ext/dbm/dbm.c      fdbm_modify(obj);
fdbm_modify       477 ext/dbm/dbm.c      fdbm_modify(obj);
fdbm_modify       275 ext/sdbm/init.c     fdbm_modify(obj);
fdbm_modify       311 ext/sdbm/init.c     fdbm_modify(obj);
fdbm_modify       337 ext/sdbm/init.c     fdbm_modify(obj);
fdbm_modify       374 ext/sdbm/init.c     fdbm_modify(obj);
fdbm_modify       460 ext/sdbm/init.c     fdbm_modify(obj);


fdbm_store

fdbm_store        438 ext/dbm/dbm.c  static VALUE fdbm_store _((VALUE,VALUE,VALUE));
fdbm_store        448 ext/dbm/dbm.c      fdbm_store(dbm, RARRAY(pair)->ptr[0], RARRAY(pair)->ptr[1]);
fdbm_store        739 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "[]=", fdbm_store, 2);
fdbm_store        740 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "store", fdbm_store, 2);


fdbm_to_hash

fdbm_to_hash      721 ext/dbm/dbm.c      return rb_hash_delete_if(fdbm_to_hash(obj));
fdbm_to_hash      771 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "to_hash", fdbm_to_hash, 0);


fdopen

fdopen             31 ext/openssl/ossl_bio.c 	if (!(fp = fdopen(fd, "r"))){
fdopen           2608 io.c               file = fdopen(fd, mode);
fdopen           2619 io.c           	    file = fdopen(fd, mode);
fdopen            103 wince/wince.h  FILE *fdopen( int handle, const char *mode );


fetch_char_property_to_ctype

fetch_char_property_to_ctype 3758 regparse.c       ctype = fetch_char_property_to_ctype(src, end, env);
fetch_char_property_to_ctype 4067 regparse.c     	ctype = fetch_char_property_to_ctype(&p, end, env);


fetch_escaped_value

fetch_escaped_value 2336 regparse.c     	v = fetch_escaped_value(&p, end, env);
fetch_escaped_value 2362 regparse.c     	v = fetch_escaped_value(&p, end, env);
fetch_escaped_value 2768 regparse.c           num = fetch_escaped_value(&p, end, env);
fetch_escaped_value 3221 regparse.c           num = fetch_escaped_value(&p, end, env);


fetch_name

fetch_name       3139 regparse.c     	  r = fetch_name(&p, end, &name_end, env, 1);
fetch_name       3181 regparse.c     	  r = fetch_name(&p, end, &name_end, env, 1);
fetch_name       4296 regparse.c     	r = fetch_name(&p, end, &name_end, env, 0);


fetch_range_qualifier

fetch_range_qualifier 2893 regparse.c           r = fetch_range_qualifier(&p, end, tok, env);
fetch_range_qualifier 3300 regparse.c           r = fetch_range_qualifier(&p, end, tok, env);


fetch_token

fetch_token      2386 regparse.c     static int fetch_token(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env);
fetch_token      4262 regparse.c           r = fetch_token(tok, &p, end, env);
fetch_token      4402 regparse.c     	    r = fetch_token(tok, &p, end, env);
fetch_token      4437 regparse.c       r = fetch_token(tok, &p, end, env);
fetch_token      4706 regparse.c           r = fetch_token(tok, src, end, env);
fetch_token      4731 regparse.c     	r = fetch_token(tok, src, end, env);
fetch_token      4752 regparse.c     	r = fetch_token(tok, src, end, env);
fetch_token      5012 regparse.c         r = fetch_token(tok, src, end, env);
fetch_token      5112 regparse.c           r = fetch_token(tok, src, end, env);
fetch_token      5141 regparse.c       r = fetch_token(&tok, src, end, env);


fetch_token_in_cc

fetch_token_in_cc 3923 regparse.c       r = fetch_token_in_cc(tok, src, end, env);
fetch_token_in_cc 3926 regparse.c         r = fetch_token_in_cc(tok, src, end, env);
fetch_token_in_cc 3976 regparse.c     	  r = fetch_token_in_cc(tok, &p, end, env);
fetch_token_in_cc 3998 regparse.c     	    r = fetch_token_in_cc(tok, &p, end, env);
fetch_token_in_cc 4077 regparse.c     	r = fetch_token_in_cc(tok, &p, end, env);
fetch_token_in_cc 4097 regparse.c     	r = fetch_token_in_cc(tok, &p, end, env);
fetch_token_in_cc 4111 regparse.c     	r = fetch_token_in_cc(tok, &p, end, env);
fetch_token_in_cc 4182 regparse.c           r = fetch_token_in_cc(tok, &p, end, env);


fev_s_allocate

fev_s_allocate   6650 ext/win32ole/win32ole.c static VALUE fev_s_allocate _((VALUE));
fev_s_allocate   7081 ext/win32ole/win32ole.c     rb_define_alloc_func(cWIN32OLE_EVENT, fev_s_allocate);


fgdbm_clear

fgdbm_clear       566 ext/gdbm/gdbm.c     fgdbm_clear(obj);
fgdbm_clear       948 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "clear", fgdbm_clear, 0);


fgdbm_close

fgdbm_close       176 ext/gdbm/gdbm.c         return rb_ensure(rb_yield, obj, fgdbm_close, obj);
fgdbm_close       925 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "close", fgdbm_close, 0);


fgdbm_delete_if

fgdbm_delete_if   945 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "delete_if", fgdbm_delete_if, 0);
fgdbm_delete_if   946 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "reject!", fgdbm_delete_if, 0);


fgdbm_each_pair

fgdbm_each_pair   937 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "each", fgdbm_each_pair, 0);
fgdbm_each_pair   940 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "each_pair", fgdbm_each_pair, 0);


fgdbm_fetch

fgdbm_fetch       305 ext/gdbm/gdbm.c     valstr = fgdbm_fetch(obj, keystr, ifnone);
fgdbm_fetch       418 ext/gdbm/gdbm.c     valstr = fgdbm_fetch(obj, keystr, Qnil);


fgdbm_has_key

fgdbm_has_key     959 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "include?", fgdbm_has_key, 1);
fgdbm_has_key     960 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "has_key?", fgdbm_has_key, 1);
fgdbm_has_key     961 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "member?", fgdbm_has_key, 1);
fgdbm_has_key     963 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "key?", fgdbm_has_key, 1);


fgdbm_has_value

fgdbm_has_value   962 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "has_value?", fgdbm_has_value, 1);
fgdbm_has_value   964 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "value?", fgdbm_has_value, 1);


fgdbm_initialize

fgdbm_initialize  171 ext/gdbm/gdbm.c     if (NIL_P(fgdbm_initialize(argc, argv, obj))) {
fgdbm_initialize  924 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "initialize", fgdbm_initialize, -1);


fgdbm_length

fgdbm_length      934 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "length", fgdbm_length, 0);
fgdbm_length      935 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "size", fgdbm_length, 0);


fgdbm_s_alloc

fgdbm_s_alloc      90 ext/gdbm/gdbm.c static VALUE fgdbm_s_alloc _((VALUE));
fgdbm_s_alloc     921 ext/gdbm/gdbm.c     rb_define_alloc_func(rb_cGDBM, fgdbm_s_alloc);


fgdbm_set_fastmode

fgdbm_set_fastmode  868 ext/gdbm/gdbm.c     fgdbm_set_fastmode(obj, RTEST(val) ? Qfalse : Qtrue);
fgdbm_set_fastmode  956 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM,"fastmode=", fgdbm_set_fastmode, 1);


fgdbm_store

fgdbm_store       540 ext/gdbm/gdbm.c static VALUE fgdbm_store _((VALUE,VALUE,VALUE));
fgdbm_store       550 ext/gdbm/gdbm.c     fgdbm_store(dbm, RARRAY(pair)->ptr[0], RARRAY(pair)->ptr[1]);
fgdbm_store       929 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "[]=", fgdbm_store, 2);
fgdbm_store       930 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "store", fgdbm_store, 2);


fgdbm_to_hash

fgdbm_to_hash     910 ext/gdbm/gdbm.c     return rb_hash_delete_if(fgdbm_to_hash(obj));
fgdbm_to_hash     967 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "to_hash", fgdbm_to_hash, 0);


file_expand_path

file_expand_path 2470 file.c         		file_expand_path(dname, Qnil, result);
file_expand_path 2493 file.c         	    file_expand_path(dname, Qnil, result);
file_expand_path 2600 file.c             return file_expand_path(fname, dname, rb_str_new(0, MAXPATHLEN + 2));


file_load_ok

file_load_ok     4115 file.c         	    if (file_load_ok(StringValueCStr(fname))) {
file_load_ok     4137 file.c         	    if (found && file_load_ok(found)) {
file_load_ok     4167 file.c         	if (file_load_ok(f)) return path;
file_load_ok     4175 file.c         	if (file_load_ok(f)) return path;
file_load_ok     4216 file.c             if (file_load_ok(f)) {


file_s_fnmatch

file_s_fnmatch   1834 dir.c              rb_define_singleton_method(rb_cFile,"fnmatch", file_s_fnmatch, -1);
file_s_fnmatch   1835 dir.c              rb_define_singleton_method(rb_cFile,"fnmatch?", file_s_fnmatch, -1);


fileattr_to_unixmode

fileattr_to_unixmode 3263 win32/win32.c  	st->st_mode  = fileattr_to_unixmode(wfd.dwFileAttributes, path);
fileattr_to_unixmode 3277 win32/win32.c  	st->st_mode  = fileattr_to_unixmode(attr, path);


fileno

fileno            125 ext/nkf/nkf-utf8/nkf.c #define setbinmode(fp) setmode(fileno(fp), O_BINARY)
fileno            817 ext/nkf/nkf-utf8/nkf.c                           || (fd_backup = dup(fileno(stdout))) < 0
fileno            818 ext/nkf/nkf-utf8/nkf.c                           || dup2(fd, fileno(stdout)) < 0
fileno            873 ext/nkf/nkf-utf8/nkf.c                   if (dup2(fd_backup, fileno(stdout)) < 0){
fileno            346 io.c           	rb_thread_wait_fd(fileno(fp));
fileno            618 io.c               of.fd = fileno(f);
fileno           1172 io.c               of.fd = fileno(f);
fileno           1897 io.c           	rb_thread_wait_fd(fileno(f));
fileno           2595 io.c               setmode(fileno(file), O_TEXT);
fileno           2946 io.c               fd = fileno(fp);
fileno           3423 io.c                   fptr->fd = fileno(fptr->stdio_file);
fileno           3866 io.c               VALUE io = prep_io(fileno(f), mode|FMODE_PREP, klass, path);
fileno           1665 win32/win32.c      if (fileno(stdin) < 0) {
fileno           1668 win32/win32.c      if (fileno(stdout) < 0) {
fileno           1671 win32/win32.c      if (fileno(stderr) < 0) {
fileno           3780 win32/win32.c      int fd = fileno(fp);


filetime_to_clock

filetime_to_clock 3344 win32/win32.c  	tmbuf->tms_utime = filetime_to_clock(&user);
filetime_to_clock 3345 win32/win32.c  	tmbuf->tms_stime = filetime_to_clock(&kernel);


filetime_to_unixtime

filetime_to_unixtime 3264 win32/win32.c  	st->st_atime = filetime_to_unixtime(&wfd.ftLastAccessTime);
filetime_to_unixtime 3265 win32/win32.c  	st->st_mtime = filetime_to_unixtime(&wfd.ftLastWriteTime);
filetime_to_unixtime 3266 win32/win32.c  	st->st_ctime = filetime_to_unixtime(&wfd.ftCreationTime);


finalize_list

finalize_list    1804 gc.c           	finalize_list(p);
finalize_list    1819 gc.c           	finalize_list(p);


find_bad_fds

find_bad_fds     10598 eval.c         		    v |= find_bad_fds(&readfds, &th->readfds, th->fd);
find_bad_fds     10599 eval.c         		    v |= find_bad_fds(&writefds, &th->writefds, th->fd);
find_bad_fds     10600 eval.c         		    v |= find_bad_fds(&exceptfds, &th->exceptfds, th->fd);


find_class_path

find_class_path   148 variable.c     		return find_class_path(klass);
find_class_path   159 variable.c         return find_class_path(klass);


find_iid

find_iid         6563 ext/win32ole/win32ole.c         return find_iid(ole, NULL, piid, ppTypeInfo);
find_iid         6705 ext/win32ole/win32ole.c         hr = find_iid(ole, pitf, &iid, &pTypeInfo);


find_inputcode_byfunc

find_inputcode_byfunc 1418 ext/nkf/nkf-utf8/nkf.c         struct input_code *p = find_inputcode_byfunc(iconv);
find_inputcode_byfunc 3682 ext/nkf/nkf-utf8/nkf.c     clr_code_score(find_inputcode_byfunc(mime_priority_func[j]), SCORE_iMIME);


find_stack_direction

find_stack_direction   97 missing/alloca.c       find_stack_direction ();	/* recurse once */
find_stack_direction  151 missing/alloca.c     find_stack_direction ();


finite

finite             43 missing.h      extern int finite(double);
finite             68 missing.h      #  define isinf(x) (!finite(x) && !isnan(x))
finite             18 missing/erf.c  #  ifndef finite
finite             72 missing/erf.c      if (!finite(x)) {
finite             82 missing/erf.c      if (!finite(x)) {
finite             33 missing/isinf.c     return (!finite(n) && !isnan(n));
finite           1161 numeric.c          if (!finite(value))
finite            234 win32/win32.h  #ifndef finite


fitpair

fitpair            61 ext/sdbm/_sdbm.c static int   fitpair proto((char *, int));
fitpair           326 ext/sdbm/_sdbm.c 		if (!fitpair(db->pagbuf, need))
fitpair           420 ext/sdbm/_sdbm.c 		if (fitpair(pag, need))


fix_divide

fix_divide       2100 numeric.c          return fix_divide(x, y, Qtrue);
fix_divide       2113 numeric.c          return fix_divide(x, y, Qfalse);


fix_lshift

fix_lshift       2500 numeric.c      	return fix_lshift(x, LONG2FIX(-i));
fix_lshift       2894 numeric.c          rb_define_method(rb_cFixnum, "<<", fix_lshift, 1);


fix_mod

fix_mod          2873 numeric.c          rb_define_method(rb_cFixnum, "%", fix_mod, 1);
fix_mod          2874 numeric.c          rb_define_method(rb_cFixnum, "modulo", fix_mod, 1);


fix_rshift

fix_rshift       2460 numeric.c      static VALUE fix_rshift(VALUE, VALUE);
fix_rshift       2477 numeric.c      	return fix_rshift(x, LONG2FIX(-width));
fix_rshift       2895 numeric.c          rb_define_method(rb_cFixnum, ">>", fix_rshift, 1);


fixdivmod

fixdivmod        2068 numeric.c      	fixdivmod(FIX2LONG(x), FIX2LONG(y), &div, 0);
fixdivmod        2131 numeric.c      	fixdivmod(FIX2LONG(x), FIX2LONG(y), 0, &mod);
fixdivmod        2162 numeric.c      	fixdivmod(FIX2LONG(x), FIX2LONG(y), &div, &mod);


fixpos

fixpos            250 parse.y        static void fixpos(NODE*,NODE*);
fixpos            676 parse.y        			fixpos($$, $1);
fixpos            777 parse.y        			fixpos($$, $3);
fixpos            790 parse.y        			fixpos($$, $3);
fixpos            943 parse.y        			fixpos($$, $1);
fixpos            960 parse.y        			fixpos($$, $1);
fixpos            977 parse.y        			fixpos($$, $1);
fixpos            994 parse.y        			fixpos($$, $1);
fixpos           1163 parse.y        			fixpos($$, $2);
fixpos           1177 parse.y        			fixpos($$, $2);
fixpos           1187 parse.y        			fixpos($$, $1);
fixpos           1201 parse.y        			fixpos($$, $1);
fixpos           1211 parse.y        			fixpos($$, $1);
fixpos           1225 parse.y        			fixpos($$, $1);
fixpos           1235 parse.y        			fixpos($$, $2);
fixpos           1244 parse.y        			fixpos($$, $2);
fixpos           1698 parse.y        			fixpos($$, $1);
fixpos           1715 parse.y        			fixpos($$, $1);
fixpos           1732 parse.y        			fixpos($$, $1);
fixpos           1749 parse.y        			fixpos($$, $1);
fixpos           2075 parse.y        			fixpos($$, $1);
fixpos           2611 parse.y        			fixpos($2->nd_iter, $2);
fixpos           2624 parse.y        			fixpos($$, $1);
fixpos           2640 parse.y        			fixpos($$, $2);
fixpos           2657 parse.y        			fixpos($$, $2);
fixpos           2673 parse.y        			fixpos($$, $3);
fixpos           2687 parse.y        			fixpos($$, $3);
fixpos           2701 parse.y        			fixpos($$, $2);
fixpos           2736 parse.y        			fixpos($$, $2);
fixpos           2795 parse.y        			fixpos($$, $3);
fixpos           2855 parse.y        			fixpos($$, $4);
fixpos           2884 parse.y        			fixpos($$, $2);
fixpos           2975 parse.y        			fixpos($$, $2);
fixpos           3288 parse.y        			fixpos($$, $1);
fixpos           3317 parse.y        			fixpos($$, $2);
fixpos           3326 parse.y        			fixpos($$, $1);
fixpos           3336 parse.y        			fixpos($$, $1);
fixpos           3371 parse.y        			fixpos($$, $2);
fixpos           3385 parse.y        			fixpos($$, $1);
fixpos           3500 parse.y        			fixpos($$, $2?$2:$5);
fixpos           6963 parse.y        	fixpos(end, head);


flatten

flatten          2759 array.c        	    n = flatten(ary, i, tmp, memo);
flatten          2799 array.c        	    i += flatten(ary, i, tmp, memo);


flo_ceil

flo_ceil         1318 numeric.c          return flo_ceil(rb_Float(num));
flo_ceil         2947 numeric.c          rb_define_method(rb_cFloat, "ceil", flo_ceil, 0);


flo_floor

flo_floor        1296 numeric.c          return flo_floor(rb_Float(num));
flo_floor        2946 numeric.c          rb_define_method(rb_cFloat, "floor", flo_floor, 0);


flo_mod

flo_mod          2928 numeric.c          rb_define_method(rb_cFloat, "%", flo_mod, 1);
flo_mod          2929 numeric.c          rb_define_method(rb_cFloat, "modulo", flo_mod, 1);


flo_round

flo_round        1333 numeric.c          return flo_round(rb_Float(num));
flo_round        2948 numeric.c          rb_define_method(rb_cFloat, "round", flo_round, 0);


flo_truncate

flo_truncate     1348 numeric.c          return flo_truncate(rb_Float(num));
flo_truncate     2944 numeric.c          rb_define_method(rb_cFloat, "to_i", flo_truncate, 0);
flo_truncate     2945 numeric.c          rb_define_method(rb_cFloat, "to_int", flo_truncate, 0);
flo_truncate     2949 numeric.c          rb_define_method(rb_cFloat, "truncate", flo_truncate, 0);


flock

flock              32 file.c         int flock(int, int);
flock            3047 file.c         	ret = flock(fd, op);
flock            3052 file.c             while (flock(fd, op) < 0) {
flock            3115 file.c             if (flock(fptr->fd, op) < 0) {
flock              47 missing.h      extern int flock(int, int);
flock               7 vms/vms.h      extern int flock(int fd, int oper);
flock             163 win32/win32.h  extern int    flock(int fd, int oper);


flock_winnt

flock_winnt       326 win32/win32.c  	    locker = flock_winnt;
flock_winnt       331 win32/win32.c      const asynchronous_func_t locker = flock_winnt;


flodivmod

flodivmod         685 numeric.c          flodivmod(RFLOAT(x)->value, fy, 0, &mod);
flodivmod         715 numeric.c          flodivmod(RFLOAT(x)->value, fy, &div, &mod);
flodivmod        2142 numeric.c      	    flodivmod((double)FIX2LONG(x), RFLOAT(y)->value, 0, &mod);
flodivmod        2175 numeric.c      	    flodivmod((double)FIX2LONG(x), RFLOAT(y)->value, &div, &mod);


flush_before_seek

flush_before_seek  295 io.c           #define io_seek(fptr, ofs, whence) lseek(flush_before_seek(fptr)->fd, ofs, whence)
flush_before_seek  296 io.c           #define io_tell(fptr) lseek(flush_before_seek(fptr)->fd, 0, SEEK_CUR)


fmt_setup

fmt_setup          22 sprintf.c      static void fmt_setup(char*,int,int,int,int);
fmt_setup         764 sprintf.c      		fmt_setup(fbuf, *p, flags, width, prec);


fnmatch

fnmatch          1233 dir.c          		&& fnmatch("*", dp->d_name, flags) == 0) {
fnmatch          1254 dir.c          		    if (fnmatch(p->str, dp->d_name, flags) == 0)
fnmatch          1285 dir.c          		    if (*cur2 && fnmatch((*cur2)->str, name, flags) == 0) {
fnmatch          1781 dir.c              if (fnmatch(RSTRING(pattern)->ptr, RSTRING(path)->ptr, flags) == 0)


fnmatch_helper

fnmatch_helper    323 dir.c          	    if (fnmatch_helper(&p, &s, flags) == 0) {
fnmatch_helper    347 dir.c          	return fnmatch_helper(&p, &s, flags);


fold_conv

fold_conv         319 ext/nkf/nkf-utf8/nkf.c STATIC  void    fold_conv PROTO((int c2,int c1));
fold_conv        1871 ext/nkf/nkf-utf8/nkf.c 	o_fconv = oconv; oconv = fold_conv;


fole_s_allocate

fole_s_allocate  1059 ext/win32ole/win32ole.c static VALUE fole_s_allocate _((VALUE));
fole_s_allocate  1079 ext/win32ole/win32ole.c     VALUE obj = fole_s_allocate(klass);
fole_s_allocate  6923 ext/win32ole/win32ole.c     rb_define_alloc_func(cWIN32OLE, fole_s_allocate);


fole_setproperty

fole_setproperty 6943 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "[]=", fole_setproperty, -1);
fole_setproperty 6951 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "setproperty", fole_setproperty, -1);


folemethod_event

folemethod_event 5560 ext/win32ole/win32ole.c     if(folemethod_event(self) == Qtrue) {
folemethod_event 7056 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "event?", folemethod_event, 0);


folemethod_s_allocate

folemethod_s_allocate  203 ext/win32ole/win32ole.c static VALUE folemethod_s_allocate _((VALUE));
folemethod_s_allocate 2991 ext/win32ole/win32ole.c             method = folemethod_s_allocate(cWIN32OLE_METHOD);
folemethod_s_allocate 3547 ext/win32ole/win32ole.c     method = folemethod_s_allocate(cWIN32OLE_METHOD);
folemethod_s_allocate 7046 ext/win32ole/win32ole.c     rb_define_alloc_func(cWIN32OLE_METHOD, folemethod_s_allocate);


foletype_s_allocate

foletype_s_allocate  205 ext/win32ole/win32ole.c static VALUE foletype_s_allocate _((VALUE));
foletype_s_allocate 1844 ext/win32ole/win32ole.c         type = foletype_s_allocate(cWIN32OLE_TYPE);
foletype_s_allocate 3189 ext/win32ole/win32ole.c     type = foletype_s_allocate(cWIN32OLE_TYPE);
foletype_s_allocate 7014 ext/win32ole/win32ole.c     rb_define_alloc_func(cWIN32OLE_TYPE, foletype_s_allocate);


folevariant_s_allocate

folevariant_s_allocate 6850 ext/win32ole/win32ole.c static VALUE folevariant_s_allocate _((VALUE));
folevariant_s_allocate 7089 ext/win32ole/win32ole.c     rb_define_alloc_func(cWIN32OLE_VARIANT, folevariant_s_allocate);


fopen

fopen             776 ext/nkf/nkf-utf8/nkf.c           if ((fin = fopen((origfname = *argv++), "r")) == NULL) {
fopen              71 ext/openssl/ossl_pkey.c     if (!(fp = fopen(RSTRING(filename)->ptr, "r"))) {
fopen              66 ext/openssl/ossl_x509cert.c     if (!(fp = fopen(RSTRING(filename)->ptr, "r"))) {
fopen             153 io.c           #define fopen(file_spec, mode)  fopen(file_spec, mode, "rfm=stmlf")
fopen            2580 io.c               file = fopen(fname, mode);
fopen            2584 io.c           	    file = fopen(fname, mode);
fopen             859 ruby.c         	FILE *fp = fopen(fname, "r");
fopen             136 st.c               FILE *f = fopen("/tmp/col", "w");
fopen            3992 win32/win32.c      FILE *f = (errno = 0, fopen(path, mode));


forbid_setid

forbid_setid       59 ruby.c         static void forbid_setid(const char *);
forbid_setid      556 ruby.c         	    forbid_setid("-s");
forbid_setid      572 ruby.c         	    forbid_setid("-S");
forbid_setid      578 ruby.c         	    forbid_setid("-e");
forbid_setid      596 ruby.c         	    forbid_setid("-r");
forbid_setid      607 ruby.c         	    forbid_setid("-i");
forbid_setid      663 ruby.c         	    forbid_setid("-I");
forbid_setid      882 ruby.c         	    forbid_setid("-x");
forbid_setid      982 ruby.c             forbid_setid("program input from stdin");


formal_assign

formal_assign    1043 eval.c         static int formal_assign(VALUE, NODE*, int, const VALUE*, VALUE*);
formal_assign    4727 eval.c         		formal_assign(self, var, RARRAY(val)->len, RARRAY(val)->ptr, 0);
formal_assign    5718 eval.c         		    ruby_frame->argc = formal_assign(recv, node, argc, argv, local_vars);


forward_search_range

forward_search_range 3360 regexec.c      	  if (! forward_search_range(reg, str, end, s, sch_range,
forward_search_range 3385 regexec.c      	    ! forward_search_range(reg, str, end, s, sch_range,


fpath_check

fpath_check      4164 file.c         	if (rb_safe_level() >= 1 && !fpath_check(f)) {
fpath_check      4172 file.c         	if (rb_safe_level() >= 1 && !fpath_check(f)) {
fpath_check      4213 file.c             if (rb_safe_level() >= 1 && !fpath_check(f)) {


fprintf

fprintf           472 dln.c              fprintf(stderr, "  %s\n", key);
fprintf           479 dln.c              fprintf(stderr, " Undefined symbols:\n");
fprintf           487 dln.c          	fprintf(stderr, "dln: Calling undefined function\n");
fprintf          1659 dln.c          	fprintf(stderr, "PATH length too long: %s\n", first);
fprintf          1753 dln.c          	    fprintf(stderr, "openpath: pathname too long (ignored)\n");
fprintf          1755 dln.c          	    fprintf(stderr, "\tDirectory \"%s\"\n", fbuf);
fprintf          1756 dln.c          	    fprintf(stderr, "\tFile \"%s\"\n", fname);
fprintf          1799 dln.c          		    fprintf(stderr, "openpath: pathname too long (ignored)\n");
fprintf          1800 dln.c          		    fprintf(stderr, "\tDirectory \"%.*s\"\n", (int) (bp - fbuf), fbuf);
fprintf          1801 dln.c          		    fprintf(stderr, "\tFile \"%s%s\"\n", fname, extension[j]);
fprintf           164 error.c        	fprintf(out, "\nruby %s (%s) [%s]\n\n",
fprintf          2959 ext/bigdecimal/bigdecimal.c         fprintf(fp,SZ_NaN);
fprintf          2963 ext/bigdecimal/bigdecimal.c         fprintf(fp,SZ_INF);
fprintf          2967 ext/bigdecimal/bigdecimal.c         fprintf(fp,SZ_NINF);
fprintf          2971 ext/bigdecimal/bigdecimal.c         fprintf(fp,"0.0");
fprintf          2985 ext/bigdecimal/bigdecimal.c                     fprintf(fp, "-");
fprintf          2988 ext/bigdecimal/bigdecimal.c                 nc += fprintf(fp, "0.");
fprintf          2996 ext/bigdecimal/bigdecimal.c                             nc += fprintf(fp, "%lu", nn);    /* The reading zero(s) */
fprintf          3004 ext/bigdecimal/bigdecimal.c                             nc += fprintf(fp, " ");
fprintf          3010 ext/bigdecimal/bigdecimal.c                 nc += fprintf(fp, "E%ld", VpExponent10(a));
fprintf          3012 ext/bigdecimal/bigdecimal.c                 nc += fprintf(fp, "0.0");
fprintf          3019 ext/bigdecimal/bigdecimal.c                     fprintf(fp, "\n");
fprintf          3023 ext/bigdecimal/bigdecimal.c                     fprintf(fp, "\t");
fprintf          3027 ext/bigdecimal/bigdecimal.c                     fprintf(fp, "\n");
fprintf          3031 ext/bigdecimal/bigdecimal.c                     fprintf(fp, "%c", *(cntl_chr + j));
fprintf          3035 ext/bigdecimal/bigdecimal.c                 fprintf(fp, "%c", *(cntl_chr + j));
fprintf           877 ext/nkf/nkf-utf8/nkf.c                       fprintf(stderr, "Can't stat %s\n", origfname);
fprintf           881 ext/nkf/nkf-utf8/nkf.c                       fprintf(stderr, "Can't set permission %s\n", outfname);
fprintf           888 ext/nkf/nkf-utf8/nkf.c                       fprintf(stderr, "Can't set timestamp %s\n", outfname);
fprintf           894 ext/nkf/nkf-utf8/nkf.c                       fprintf(stderr, "Can't set timestamp %s\n", outfname);
fprintf           904 ext/nkf/nkf-utf8/nkf.c                       fprintf(stderr, "Can't rename %s to %s\n",
fprintf          3788 ext/nkf/nkf-utf8/nkf.c         fprintf(stderr, "%s\n", str);
fprintf          4852 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"nkf internal module connection failure.\n");
fprintf          4864 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"USAGE:  nkf(nkf32,wnkf,nkf2) -[flags] [in file] .. [out file for -O flag]\n");
fprintf          4865 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"Flags:\n");
fprintf          4866 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"b,u      Output is buffered (DEFAULT),Output is unbuffered\n");
fprintf          4868 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"j,s,e,w  Outout code is JIS 7 bit, Shift JIS (DEFAULT), AT&T JIS (EUC), UTF-8N\n");
fprintf          4871 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"j,s,e,w  Outout code is JIS 7 bit (DEFAULT), Shift JIS, AT&T JIS (EUC), UTF-8N\n");
fprintf          4874 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"j,s,e,w  Outout code is JIS 7 bit, Shift JIS, AT&T JIS (EUC) (DEFAULT), UTF-8N\n");
fprintf          4877 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"j,s,e,w  Outout code is JIS 7 bit, Shift JIS, AT&T JIS (EUC), UTF-8N (DEFAULT)\n");
fprintf          4880 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"         After 'w' you can add more options. (80?|16((B|L)0?)?) \n");
fprintf          4882 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"J,S,E,W  Input assumption is JIS 7 bit , Shift JIS, AT&T JIS (EUC), UTF-8\n");
fprintf          4884 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"         After 'W' you can add more options. (8|16(B|L)?) \n");
fprintf          4886 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"t        no conversion\n");
fprintf          4887 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"i_/o_    Output sequence to designate JIS-kanji/ASCII (DEFAULT B)\n");
fprintf          4888 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"r        {de/en}crypt ROT13/47\n");
fprintf          4889 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"h        1 katakana->hiragana, 2 hiragana->katakana, 3 both\n");
fprintf          4890 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"v        Show this usage. V: show version\n");
fprintf          4891 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"m[BQN0]  MIME decode [B:base64,Q:quoted,N:non-strict,0:no decode]\n");
fprintf          4892 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"M[BQ]    MIME encode [B:base64 Q:quoted]\n");
fprintf          4893 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"l        ISO8859-1 (Latin-1) support\n");
fprintf          4894 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"f/F      Folding: -f60 or -f or -f60-10 (fold margin 10) F preserve nl\n");
fprintf          4895 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"Z[0-3]   Convert X0208 alphabet to ASCII  1: Kankaku to space,2: 2 spaces,\n");
fprintf          4896 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"                                          3: Convert HTML Entity\n");
fprintf          4897 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"X,x      Assume X0201 kana in MS-Kanji, -x preserves X0201\n");
fprintf          4898 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"B[0-2]   Broken input  0: missing ESC,1: any X on ESC-[($]-X,2: ASCII on NL\n");
fprintf          4900 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"T        Text mode output\n");
fprintf          4902 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"O        Output to File (DEFAULT 'nkf.out')\n");
fprintf          4903 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"d,c      Delete \\r in line feed and \\032, Add \\r in line feed\n");
fprintf          4904 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"I        Convert non ISO-2022-JP charactor to GETA\n");
fprintf          4905 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"-L[uwm]  line mode u:LF w:CRLF m:CR (DEFAULT noconversion)\n");
fprintf          4906 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"long name options\n");
fprintf          4907 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr," --fj,--unix,--mac,--windows                        convert for the system\n");
fprintf          4908 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr," --jis,--euc,--sjis,--utf8,--utf16,--mime,--base64  convert for the code\n");
fprintf          4909 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr," --hiragana, --katakana    Hiragana/Katakana Conversion\n");
fprintf          4910 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr," --x0212                   Convert JISX0212\n");
fprintf          4911 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr," --cp932, --no-cp932       CP932 compatibility\n");
fprintf          4912 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr," --prefix=    Insert escape before troublesome characters of Shift_JIS\n");
fprintf          4914 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr," --cap-input, --url-input  Convert hex after ':' or '%%'\n");
fprintf          4917 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr," --numchar-input   Convert Unicode Character Reference\n");
fprintf          4920 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr," --utf8mac-input   UTF-8-MAC input\n");
fprintf          4923 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr," --ms-ucs-map      Microsoft UCS Mapping Compatible\n");
fprintf          4926 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr," --overwrite       Overwrite original listed files by filtered result\n");
fprintf          4928 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr," -g, --guess       Guess the input code\n");
fprintf          4929 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr," --help,--version\n");
fprintf          4936 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"Network Kanji Filter Version %s (%s) "
fprintf          4950 ext/nkf/nkf-utf8/nkf.c     fprintf(stderr,"\n%s\n",CopyRight);
fprintf           332 ext/openssl/openssl_missing.c 	    fprintf(stderr,
fprintf           339 ext/openssl/ossl.c 	fprintf(stderr, "OSSL_DEBUG: ");
fprintf           343 ext/openssl/ossl.c 	fprintf(stderr, " [CONTEXT N/A]\n");
fprintf           363 ext/openssl/ossl.c 	    fprintf(stderr, "OSSL_DEBUG: IS NOW ON!\n");
fprintf           366 ext/openssl/ossl.c 	    fprintf(stderr, "OSSL_DEBUG: IS NOW OFF!\n");
fprintf           166 ext/openssl/ossl.h     fprintf(stderr, "OSSL_DEBUG: "); \
fprintf           167 ext/openssl/ossl.h     fprintf(stderr, fmt, ##__VA_ARGS__); \
fprintf           168 ext/openssl/ossl.h     fprintf(stderr, " [in %s (%s:%d)]\n", __func__, __FILE__, __LINE__); \
fprintf           400 ext/socket/getaddrinfo.c 				fprintf(stderr, "panic!\n");
fprintf           666 ext/syck/gram.c #  define YYFPRINTF fprintf
fprintf            25 ext/syck/syck.c     fprintf( stderr, "\nAssertion failed: %s, line %u\n",
fprintf            65 ext/tk/tcltklib.c #define DUMP1(ARG1) if (ruby_debug) { fprintf(stderr, "tcltklib: %s\n", ARG1); fflush(stderr); }
fprintf            66 ext/tk/tcltklib.c #define DUMP2(ARG1, ARG2) if (ruby_debug) { fprintf(stderr, "tcltklib: ");\
fprintf            67 ext/tk/tcltklib.c fprintf(stderr, ARG1, ARG2); fprintf(stderr, "\n"); fflush(stderr); }
fprintf            68 ext/tk/tcltklib.c #define DUMP3(ARG1, ARG2, ARG3) if (ruby_debug) { fprintf(stderr, "tcltklib: ");\
fprintf            69 ext/tk/tcltklib.c fprintf(stderr, ARG1, ARG2, ARG3); fprintf(stderr, "\n"); fflush(stderr); }
fprintf            34 ext/win32ole/win32ole.c #define DOUT fprintf(stderr,"[%d]\n",__LINE__)
fprintf            35 ext/win32ole/win32ole.c #define DOUTS(x) fprintf(stderr,"[%d]:" #x "=%s\n",__LINE__,x)
fprintf            36 ext/win32ole/win32ole.c #define DOUTMSG(x) fprintf(stderr, "[%d]:" #x "\n",__LINE__)
fprintf            37 ext/win32ole/win32ole.c #define DOUTI(x) fprintf(stderr, "[%ld]:" #x "=%d\n",__LINE__,x)
fprintf            38 ext/win32ole/win32ole.c #define DOUTD(x) fprintf(stderr, "[%d]:" #x "=%f\n",__LINE__,x)
fprintf            84 gc.c           	fprintf(stderr, "[FATAL] failed to allocate memory\n");
fprintf            41 missing/erf.c      fprintf(stderr, "erf.c:%d:p_gamma() could not converge.", __LINE__);
fprintf            64 missing/erf.c      fprintf(stderr, "erf.c:%d:q_gamma() could not converge.", __LINE__);
fprintf          1256 process.c      	fprintf(stderr, "%s:%d: command not found: %s\n",
fprintf          1449 regcomp.c          fprintf(stderr, "compile_tree: undefined node type %d\n", NTYPE(node));
fprintf          4288 regcomp.c          fprintf(stderr, "optimize_node_left: undefined node type %d\n",
fprintf          4455 regcomp.c          fprintf(f, "(%u)", a);
fprintf          4462 regcomp.c          fprintf(f, "(%u)", b);
fprintf          4470 regcomp.c        fprintf(f, "[");
fprintf          4473 regcomp.c          fprintf(f, "begin-buf");
fprintf          4477 regcomp.c          if (q) fprintf(f, ", ");
fprintf          4479 regcomp.c          fprintf(f, "begin-line");
fprintf          4482 regcomp.c          if (q) fprintf(f, ", ");
fprintf          4484 regcomp.c          fprintf(f, "begin-pos");
fprintf          4487 regcomp.c          if (q) fprintf(f, ", ");
fprintf          4489 regcomp.c          fprintf(f, "end-buf");
fprintf          4492 regcomp.c          if (q) fprintf(f, ", ");
fprintf          4494 regcomp.c          fprintf(f, "semi-end-buf");
fprintf          4497 regcomp.c          if (q) fprintf(f, ", ");
fprintf          4499 regcomp.c          fprintf(f, "end-line");
fprintf          4502 regcomp.c          if (q) fprintf(f, ", ");
fprintf          4504 regcomp.c          fprintf(f, "anychar-star");
fprintf          4507 regcomp.c          if (q) fprintf(f, ", ");
fprintf          4508 regcomp.c          fprintf(f, "anychar-star-pl");
fprintf          4511 regcomp.c        fprintf(f, "]");
fprintf          4520 regcomp.c        fprintf(f, "optimize: %s\n", on[reg->optimize]);
fprintf          4521 regcomp.c        fprintf(f, "  anchor: "); print_anchor(f, reg->anchor);
fprintf          4524 regcomp.c        fprintf(f, "\n");
fprintf          4527 regcomp.c          fprintf(f, "  sub anchor: "); print_anchor(f, reg->sub_anchor);
fprintf          4528 regcomp.c          fprintf(f, "\n");
fprintf          4530 regcomp.c        fprintf(f, "\n");
fprintf          4534 regcomp.c          fprintf(f, "exact: [");
fprintf          4538 regcomp.c          fprintf(f, "]: length: %d\n", (reg->exact_end - reg->exact));
fprintf          4546 regcomp.c          fprintf(f, "map: n=%d\n", n);
fprintf          4558 regcomp.c                  fprintf(f, "%d", i);
fprintf          4561 regcomp.c            fprintf(f, "]\n");
fprintf          5143 regcomp.c        fprintf(f, ":%d:", len);
fprintf          5158 regcomp.c        fprintf(f, "[%s", op2name(*bp));
fprintf          5167 regcomp.c            fprintf(f, ":(%d)", addr);
fprintf          5171 regcomp.c            fprintf(f, ":(%d)", addr);
fprintf          5175 regcomp.c            fprintf(f, ":%d", len);
fprintf          5180 regcomp.c            fprintf(f, ":%d", mem);
fprintf          5186 regcomp.c      	fprintf(f, ":%d", option);
fprintf          5233 regcomp.c      	fprintf(f, ":%d:%d:", mb_len, len);
fprintf          5253 regcomp.c            fprintf(f, ":%d", n);
fprintf          5259 regcomp.c            fprintf(f, ":%d", n);
fprintf          5271 regcomp.c            fprintf(f, ":%d:%d", (int )code, len);
fprintf          5285 regcomp.c            fprintf(f, ":%d:%d:%d", n, (int )code, len);
fprintf          5294 regcomp.c              fprintf(f, ":%u:%d", (unsigned int )cc, n);
fprintf          5301 regcomp.c            fprintf(f, ":%d", mem);
fprintf          5311 regcomp.c      	fprintf(f, "%d", mem);
fprintf          5322 regcomp.c      	fprintf(f, ":%d:%d", mem, addr);
fprintf          5330 regcomp.c            fprintf(f, ":(%d)", addr);
fprintf          5337 regcomp.c            fprintf(f, ":%d", len);
fprintf          5343 regcomp.c            fprintf(f, ":%d:(%d)", len, addr);
fprintf          5347 regcomp.c            fprintf(stderr, "onig_print_compiled_byte_code: undefined code %d\n",
fprintf          5362 regcomp.c        fprintf(f, "code length: %d\n", reg->used);
fprintf          5369 regcomp.c      	fprintf(f, "\n");
fprintf          5376 regcomp.c        fprintf(f, "\n");
fprintf          5388 regcomp.c          fprintf(f, "ERROR: null node!!!\n");
fprintf          5397 regcomp.c            fprintf(f, "<list:%x>\n", (int )node);
fprintf          5399 regcomp.c            fprintf(f, "<alt:%x>\n", (int )node);
fprintf          5404 regcomp.c      	fprintf(f, "ERROR: list/alt right is not a cons. %d\n", NTYPE(node));
fprintf          5412 regcomp.c          fprintf(f, "<string%s:%x>",
fprintf          5418 regcomp.c      	fprintf(f, " 0x%02x", *p);
fprintf          5424 regcomp.c          fprintf(f, "<cclass:%x>", (int )node);
fprintf          5429 regcomp.c      	if (i > 0) fprintf(f, ",");
fprintf          5430 regcomp.c      	fprintf(f, "%0x", bbuf->p[i]);
fprintf          5436 regcomp.c          fprintf(f, "<ctype:%x> ", (int )node);
fprintf          5441 regcomp.c            fprintf(f, "ERROR: undefined ctype.\n");
fprintf          5447 regcomp.c          fprintf(f, "<anychar:%x>", (int )node);
fprintf          5451 regcomp.c          fprintf(f, "<anchor:%x> ", (int )node);
fprintf          5472 regcomp.c            fprintf(f, "ERROR: undefined anchor type.\n");
fprintf          5482 regcomp.c            fprintf(f, "<backref:%x>", (int )node);
fprintf          5485 regcomp.c      	fprintf(f, "%d", p[i]);
fprintf          5494 regcomp.c            fprintf(f, "<call:%x>", (int )node);
fprintf          5501 regcomp.c          fprintf(f, "<qualifier:%x>{%d,%d}%s\n", (int )node,
fprintf          5508 regcomp.c          fprintf(f, "<effect:%x> ", (int )node);
fprintf          5511 regcomp.c            fprintf(f, "option:%d\n", NEFFECT(node).option);
fprintf          5515 regcomp.c            fprintf(f, "memory:%d", NEFFECT(node).regnum);
fprintf          5518 regcomp.c            fprintf(f, "stop-bt");
fprintf          5524 regcomp.c          fprintf(f, "\n");
fprintf          5529 regcomp.c          fprintf(f, "print_indent_tree: undefined node type %d\n", NTYPE(node));
fprintf          5535 regcomp.c          fprintf(f, "\n");
fprintf          1125 regexec.c        fprintf(f, "   count      prev        time\n");
fprintf          1127 regexec.c          fprintf(f, "%8d: %8d: %10ld: %s\n",
fprintf          1130 regexec.c        fprintf(f, "\nmax stack depth: %d\n", MaxStackDepth);
fprintf          1238 regexec.c        fprintf(stderr, "match_at: str: %d, end: %d, start: %d, sprev: %d\n",
fprintf          1240 regexec.c        fprintf(stderr, "size: %d, start offset: %d\n",
fprintf          1252 regexec.c            fprintf(stderr, "%4d> \"", (int )(s - str));
fprintf          1264 regexec.c            fprintf(stderr, "\n");
fprintf          2221 regexec.c      	  fprintf(stderr, "NULL_CHECK_END: skip  id:%d, s:%d\n",
fprintf          2256 regexec.c      	  fprintf(stderr, "NULL_CHECK_END_MEMST: skip  id:%d, s:%d\n",
fprintf          2282 regexec.c      	  fprintf(stderr, "NULL_CHECK_END_MEMST_PUSH: skip  id:%d, s:%d\n",
fprintf          2735 regexec.c        fprintf(stderr, "bm_search_notrev: text: %d, text_end: %d, text_range: %d\n",
fprintf          2966 regexec.c        fprintf(stderr, "forward_search_range: str: %d, end: %d, s: %d, range: %d\n",
fprintf          3069 regexec.c          fprintf(stderr,
fprintf          3169 regexec.c          fprintf(stderr, "backward_search_range: low: %d, high: %d\n",
fprintf          3177 regexec.c        fprintf(stderr, "backward_search_range: fail.\n");
fprintf          3211 regexec.c        fprintf(stderr,
fprintf          3316 regexec.c          fprintf(stderr, "onig_search: empty string.\n");
fprintf          3332 regexec.c        fprintf(stderr, "onig_search(apply anchor): end: %d, start: %d, range: %d\n",
fprintf          3471 regexec.c          fprintf(stderr, "onig_search: error %d\n", r);
fprintf          3481 regexec.c          fprintf(stderr, "onig_search: error %d\n", r);
fprintf           403 regparse.c       fprintf(fp, "%s: ", e->name);
fprintf           407 regparse.c         fprintf(fp, "%d", e->back_ref1);
fprintf           410 regparse.c           if (i > 0) fprintf(fp, ", ");
fprintf           411 regparse.c           fprintf(fp, "%d", e->back_refs[i]);
fprintf           424 regparse.c         fprintf(fp, "name table\n");
fprintf           584 regparse.c         fprintf(fp, "name table\n");
fprintf           587 regparse.c           fprintf(fp, "%s: ", e->name);
fprintf           592 regparse.c     	fprintf(fp, "%d", e->back_ref1);
fprintf           596 regparse.c     	  if (j > 0) fprintf(fp, ", ");
fprintf           597 regparse.c     	  fprintf(fp, "%d", e->back_refs[j]);
fprintf           584 ruby.c         		fprintf(stderr, "%s: no code specified for -e\n", origargv[0]);
fprintf           716 ruby.c         		fprintf(stderr, "%s: invalid option --%s  (-h will show valid options)\n",
fprintf           734 ruby.c         		fprintf(stderr, format, origargv[0], (int)(unsigned char)*s);
fprintf           137 st.c               fprintf(f, "collision: %d\n", collision);
fprintf          3695 win32/win32.c  		    Debug(fprintf(stderr, "couldn't get stack base:%p:%d\n",
fprintf          3699 win32/win32.c  		    Debug(fprintf(stderr, "couldn't release stack:%p:%d\n",


fptr_finalize

fptr_finalize    2019 io.c           	fptr_finalize(fptr, noraise);
fptr_finalize    2756 io.c               fptr_finalize(fptr, noraise);


fputc

fputc            4536 regcomp.c            fputc(*p, f);
fputc            4549 regcomp.c            fputc('[', f);
fputc            4556 regcomp.c                  fputc(i, f);
fputc            5135 regcomp.c        while (len-- > 0) { fputc(*s++, f); }
fputc            5144 regcomp.c        while (x-- > 0) { fputc(*s++, f); }
fputc            5235 regcomp.c      	while (n-- > 0) { fputc(*bp++, f); }
fputc            5416 regcomp.c      	fputc(*p, f);
fputc            1262 regexec.c            for (i = 0; i < 20 - (bp - buf); i++) fputc(' ', stderr);
fputc              51 wince/wince.h  #define _fputc fputc


frame_dup

frame_dup        7894 eval.c         	frame_dup(&tmp->frame);
frame_dup        7911 eval.c             frame_dup(&dup->frame);
frame_dup        7986 eval.c             frame_dup(&data->frame);
frame_dup        8101 eval.c             frame_dup(&data->frame);
frame_dup        8509 eval.c             frame_dup(&data->frame);


free

free             2043 array.c        	free(RARRAY(copy)->ptr);
free              362 dir.c          	if (dir->path) free(dir->path);
free              364 dir.c              free(dir);
free              395 dir.c              if (dp->path) free(dp->path);
free              781 dir.c          	args.old_path = rb_tainted_str_new2(cwd); free(cwd);
free              812 dir.c              free(path);
free             1095 dir.c          	    free(tmp->str);
free             1096 dir.c          	free(tmp);
free             1216 dir.c          	    free(tmp);
free             1260 dir.c          	    free(buf);
free             1261 dir.c          	    free(new_beg);
free             1292 dir.c          		free(name);
free             1294 dir.c          		free(buf);
free             1295 dir.c          		free(new_beg);
free             1300 dir.c          	free(copy_beg);
free             1331 dir.c              free(buf);
free             1427 dir.c          	free(buf);
free              139 dln.c          	free(*buf);\
free              143 dln.c              free(*buf);\
free              282 dln.c          	free(reloc);
free              314 dln.c          	free(buffer);
free              384 dln.c          	free(syms);
free              454 dln.c          	free(addr);
free              601 dln.c              free(undef->name);
free              602 dln.c              free(undef);
free              630 dln.c          	free(undef->name);
free              663 dln.c          	free(reloc);
free              680 dln.c          		    free(key);
free              692 dln.c          		    free(key);
free              761 dln.c          		free(key);
free              896 dln.c              free(reloc);
free              897 dln.c              free(syms);
free              914 dln.c              if (syms) free(syms);
free              915 dln.c              if (reloc) free(reloc);
free              916 dln.c              if (block) free((char*)block);
free             1015 dln.c          		free(data);
free             1020 dln.c          	free(data);
free             1058 dln.c          		    free(syms);
free             6616 eval.c         	    free(ruby_scope->local_tbl);
free             6969 eval.c         	    free(ftptr);
free             7578 eval.c         	    free(tmp);
free             7596 eval.c         	    free(tmp);
free             7852 eval.c         	free(tmp);
free             7865 eval.c         	free(tmp);
free             8767 eval.c             method = Data_Make_Struct(rb_cUnboundMethod, struct METHOD, bm_mark, free, data);
free             8862 eval.c             clone = Data_Make_Struct(CLASS_OF(self),struct METHOD, bm_mark, free, data);
free             9021 eval.c             method = Data_Make_Struct(rb_cMethod,struct METHOD,bm_mark,free,bound);
free             9590 eval.c             if (fds->fdset) free(fds->fdset);
free             10049 eval.c             if (th->stk_ptr) free(th->stk_ptr);
free             10052 eval.c             if (th->bstr_ptr) free(th->bstr_ptr);
free             10063 eval.c             if (th != main_thread) free(th);
free             10335 eval.c             if (th->stk_ptr) free(th->stk_ptr);
free             12660 eval.c             group = Data_Make_Struct(klass, struct thgroup, 0, free, data);
free               98 ext/curses/curses.c     free(winp);
free              675 ext/curses/curses.c     free(mdata->mevent);
free               57 ext/dbm/dbm.c  	free(dbmp);
free               77 ext/digest/digest.c     obj = Data_Wrap_Struct(klass, 0, free, pctx);
free              184 ext/digest/digest.c     free(pctx2);
free              207 ext/digest/digest.c     free(pctx2);
free               19 ext/dl/cptr.c        if (data->free) {
free               20 ext/dl/cptr.c  	  (*(data->free))(data->ptr);
free               49 ext/dl/cptr.c    data->free = func;
free              103 ext/dl/cptr.c    data->free = 0;
free              136 ext/dl/cptr.c      if (data->ptr && data->free) {
free              138 ext/dl/cptr.c        (*(data->free))(data->ptr);
free              142 ext/dl/cptr.c      data->free = f;
free              225 ext/dl/cptr.c        data->free = RCFUNC_DATA(val)->ptr;
free              228 ext/dl/cptr.c        data->free = NUM2PTR(rb_Integer(val));
free              241 ext/dl/cptr.c    return rb_dlcfunc_new(pdata->free, DLTYPE_VOID, "free<anonymous>", CFUNC_CDECL);
free              298 ext/dl/cptr.c  	   rb_class2name(CLASS_OF(self)), data, data->ptr, data->size, data->free);
free              171 ext/dl/dl.h        freefunc_t free;
free               58 ext/gdbm/gdbm.c 	free(dbmp);
free              489 ext/gdbm/gdbm.c 	    free(key.dptr);
free              492 ext/gdbm/gdbm.c 	free(key.dptr);
free              499 ext/gdbm/gdbm.c                 free(key.dptr);
free              500 ext/gdbm/gdbm.c                 if (nextkey.dptr) free(nextkey.dptr);
free              503 ext/gdbm/gdbm.c             free(key.dptr);
free              613 ext/gdbm/gdbm.c         free(key.dptr);
free              635 ext/gdbm/gdbm.c             free(key.dptr);
free              733 ext/gdbm/gdbm.c         free(key.dptr);
free              907 ext/nkf/nkf-utf8/nkf.c                   free(outfname);
free             4095 ext/nkf/nkf-utf8/nkf.c 			    free(lwsp_buf);
free             4116 ext/nkf/nkf-utf8/nkf.c 	    free(lwsp_buf);
free             4214 ext/nkf/nkf-utf8/nkf.c 			free(lwsp_buf);
free             4235 ext/nkf/nkf-utf8/nkf.c 	free(lwsp_buf);
free               71 ext/openssl/ossl_cipher.c 	free(ctx);
free               45 ext/openssl/ossl_hmac.c     free(ctx);
free              326 ext/openssl/ossl_x509ext.c 	free(s);
free              330 ext/openssl/ossl_x509ext.c 	free(s);
free               93 ext/readline/readline.c     if (buff) free(buff);
free              605 ext/readline/readline.c         free(entry->line);
free              606 ext/readline/readline.c         free(entry);
free              705 ext/readline/readline.c 	    free(matches[i]);
free              707 ext/readline/readline.c 	free(matches);
free              732 ext/readline/readline.c 	    free(matches[i]);
free              734 ext/readline/readline.c 	free(matches);
free              173 ext/sdbm/_sdbm.c 	free((char *) dirname);
free              233 ext/sdbm/_sdbm.c 	free((char *) db);
free              246 ext/sdbm/_sdbm.c 		free((char *) db);
free              670 ext/sdbm/_sdbm.c 	register int free;
free              674 ext/sdbm/_sdbm.c 	free = off - (n + 1) * sizeof(short);
free              677 ext/sdbm/_sdbm.c 	debug(("free %d need %d\n", free, need));
free              679 ext/sdbm/_sdbm.c 	return need <= free;
free               49 ext/sdbm/init.c     free(dbmp);
free              173 ext/socket/getaddrinfo.c 		goto free;\
free              183 ext/socket/getaddrinfo.c 		goto free;\
free              218 ext/socket/getaddrinfo.c 			free(ai->ai_canonname);
free              220 ext/socket/getaddrinfo.c 		free(ai);
free              532 ext/socket/getaddrinfo.c  free:
free              574 ext/socket/getaddrinfo.c  free:
free              683 ext/socket/getaddrinfo.c  free:
free              168 ext/strscan/strscan.c     free(p);
free              332 ext/syck/bytecode.c                     free( qstr );
free              347 ext/syck/bytecode.c                     free( qstr );
free              361 ext/syck/bytecode.c                         free( lvl->domain );
free              367 ext/syck/bytecode.c                         free( qstr );
free              374 ext/syck/bytecode.c                         free( qstr );
free              198 ext/syck/emitter.c     free( e->levels[e->lvl_idx].domain );
free              408 ext/syck/emitter.c             free( an );
free              419 ext/syck/emitter.c             free( an );
free              504 ext/syck/emitter.c         free( spcs );
free              156 ext/syck/gram.c #  define YYFREE free
free               22 ext/syck/rubyext.c     } free;
free              358 ext/syck/syck.c     free( p->levels[p->lvl_idx].domain );
free               54 ext/syck/syck.h #define S_FREE(n) if (n) { free(n); n = NULL; }
free             2115 ext/syck/token.c                         free( chr_text );
free             2177 ext/syck/token.c                             free( qstr );
free             2192 ext/syck/token.c                             free( qstr );
free             2206 ext/syck/token.c                                 free( lvl->domain );
free             2212 ext/syck/token.c                                 free( qstr );
free             2318 ext/syck/token.c                         free( chr_text );
free               47 ext/syslog/syslog.c     free((void *)syslog_ident);
free              133 ext/tk/tcltklib.c     free(buf);
free              147 ext/tk/tcltklib.c     free(buf);
free              870 ext/tk/tcltklib.c         free(argv);
free              884 ext/tk/tcltklib.c         free(argv);
free              901 ext/tk/tcltklib.c         free(argv);
free             1724 ext/tk/tcltklib.c     free(ptr);
free             2020 ext/tk/tcltklib.c     free(q->done);
free             2021 ext/tk/tcltklib.c     free(q);
free             2162 ext/tk/tcltklib.c     free(buf);
free             2282 ext/tk/tcltklib.c             free(buf);
free             2461 ext/tk/tcltklib.c     free(arg);
free             2562 ext/tk/tcltklib.c         free(buf);
free             2610 ext/tk/tcltklib.c     free(arg);
free             4454 ext/tk/tcltklib.c             free(ptr);
free             4461 ext/tk/tcltklib.c             free(ptr);
free             4470 ext/tk/tcltklib.c         free(ptr);
free             5542 ext/tk/tcltklib.c     free(alloc_done);
free             5543 ext/tk/tcltklib.c     if (argv) free(argv);
free             5858 ext/tk/tcltklib.c     free(alloc_done);
free             5859 ext/tk/tcltklib.c     free(eval_str);
free             6086 ext/tk/tcltklib.c     free(buf);
free             6245 ext/tk/tcltklib.c     free(buf);
free             6322 ext/tk/tcltklib.c     free(src_buf);
free             6323 ext/tk/tcltklib.c     free(dst_buf);
free             6439 ext/tk/tcltklib.c         free(argv);
free             6634 ext/tk/tcltklib.c         free(argv);
free             6647 ext/tk/tcltklib.c         free(objv);
free             6649 ext/tk/tcltklib.c         free(argv[0]);
free             6650 ext/tk/tcltklib.c         free(argv);
free             6741 ext/tk/tcltklib.c         free(av[i]);
free             6744 ext/tk/tcltklib.c     free(av);
free             6934 ext/tk/tcltklib.c     free(alloc_done);
free             7579 ext/tk/tcltklib.c     free(flagPtr);
free             7686 ext/tk/tcltklib.c     free(info);
free             1102 ext/tk/tkutil/tkutil.c         if (ptr->key != (char*)NULL) free(ptr->key);
free             1103 ext/tk/tkutil/tkutil.c         if (ptr->type != (char*)NULL) free(ptr->type);
free             1104 ext/tk/tkutil/tkutil.c         if (ptr->ivar != (ID*)NULL) free(ptr->ivar);
free             1105 ext/tk/tkutil/tkutil.c         free(ptr);
free             1279 ext/tk/tkutil/tkutil.c     free(buf);
free             1310 ext/tk/tkutil/tkutil.c     free(buf);
free             1338 ext/tk/tkutil/tkutil.c     free(buf);
free              251 ext/win32ole/win32ole.c         free(p);
free              286 ext/win32ole/win32ole.c     free(psz);
free              570 ext/win32ole/win32ole.c     if(pSource) free(pSource);
free              571 ext/win32ole/win32ole.c     if(pDescription) free(pDescription);
free              699 ext/win32ole/win32ole.c     free(p);
free              786 ext/win32ole/win32ole.c             if(pub) free(pub);
free              787 ext/win32ole/win32ole.c             if(psab) free(psab);
free              788 ext/win32ole/win32ole.c             if(pid) free(pid);
free              811 ext/win32ole/win32ole.c         if(pub) free(pub);
free              812 ext/win32ole/win32ole.c         if(psab) free(psab);
free              813 ext/win32ole/win32ole.c         if(pid) free(pid);
free             1110 ext/win32ole/win32ole.c             if(pID) free(pID);
free             1111 ext/win32ole/win32ole.c             if(pLB) free(pLB);
free             1112 ext/win32ole/win32ole.c             if(pUB) free(pUB);
free             1149 ext/win32ole/win32ole.c         if(pID) free(pID);
free             1150 ext/win32ole/win32ole.c         if(pLB) free(pLB);
free             1151 ext/win32ole/win32ole.c         if(pUB) free(pUB);
free             1202 ext/win32ole/win32ole.c         if(p) free(p);
free             1281 ext/win32ole/win32ole.c             if(p) free(p);
free             1507 ext/win32ole/win32ole.c                     free(pName);
free             6415 ext/win32ole/win32ole.c         free(pEVObj);
free             6516 ext/win32ole/win32ole.c                 free(pstr);
free              405 ext/zlib/zlib.c     free(address);
free              825 ext/zlib/zlib.c     free(z);
free             1757 ext/zlib/zlib.c     free(gz);
free              171 file.c             return Data_Wrap_Struct(klass, NULL, free, nst);
free             2117 file.c         	free(buf);
free             2121 file.c             free(buf);
free             2283 file.c         	free(oldcwd);
free             2484 file.c         		free(dir);
free             2503 file.c         	    free(dir);
free             3393 file.c         	free(DATA_PTR(obj));
free             3416 file.c         	free(DATA_PTR(copy));
free             4010 file.c         	free(buf);
free              184 gc.c           	RUBY_CRITICAL(free(x));
free              261 gc.c           	RUBY_CRITICAL(free(tmp));
free              269 gc.c           	    RUBY_CRITICAL(free(t));
free              289 gc.c           	} free;
free              373 gc.c           	p->as.free.flags = 0;
free              374 gc.c           	p->as.free.next = freelist;
free              390 gc.c               freelist = freelist->as.free.next;
free              548 gc.c           	free(value);
free              975 gc.c           	RVALUE *tmp = p->as.free.next;
free              978 gc.c           	    p->as.free.flags = 0;
free              979 gc.c           	    p->as.free.next = freelist;
free              993 gc.c           	    free(heaps[i].slot);
free             1025 gc.c           	RVALUE *free = freelist;
free             1035 gc.c           		    p->as.free.flags = FL_MARK; /* remain marked */
free             1036 gc.c           		    p->as.free.next = final_list;
free             1040 gc.c           		    p->as.free.flags = 0;
free             1041 gc.c           		    p->as.free.next = freelist;
free             1060 gc.c           	    for (pp = final_list; pp != final; pp = pp->as.free.next) {
free             1061 gc.c           		p->as.free.flags |= FL_SINGLETON; /* freeing page mark */
free             1063 gc.c           	    freelist = free;	/* cancel this page from freelist */
free             1090 gc.c               RANY(p)->as.free.flags = 0;
free             1091 gc.c               RANY(p)->as.free.next = freelist;
free             1127 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.string.ptr));
free             1132 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.array.ptr));
free             1145 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.regexp.str));
free             1151 gc.c           		RUBY_CRITICAL(free(DATA_PTR(obj)));
free             1161 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.match.regs));
free             1180 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.bignum.digits));
free             1187 gc.c           		RUBY_CRITICAL(free(RANY(obj)->as.node.u1.tbl));
free             1191 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.node.u1.node));
free             1201 gc.c           		RUBY_CRITICAL(free(RANY(obj)->as.scope.local_tbl));
free             1203 gc.c           		RUBY_CRITICAL(free(vars));
free             1209 gc.c           	    RUBY_CRITICAL(free(RANY(obj)->as.rstruct.ptr));
free             1839 gc.c           		p->as.free.flags = 0;
free             1841 gc.c           		    RUBY_CRITICAL(free(DATA_PTR(p)));
free             1849 gc.c           		    p->as.free.flags = 0;
free             1720 hash.c         	    free(environ[i]);
free             2029 io.c           	free(fptr->path);
free             2035 io.c                   free(fptr->rbuf);
free             2039 io.c                   free(fptr->wbuf);
free             2042 io.c               free(fptr);
free             2712 io.c           	free(list);
free             2720 io.c           	    free(tmp);
free             3308 io.c               if (fptr->path) free(fptr->path);
free             3407 io.c           	free(fptr->path);
free             5337 io.c           	if (ruby_inplace_mode) free(ruby_inplace_mode);
free             5342 io.c               if (ruby_inplace_mode) free(ruby_inplace_mode);
free              130 missing/os2.c  	    free(argv);
free              131 missing/os2.c  	    free(cmd2);
free              135 missing/os2.c      free(cmd2);
free              136 missing/os2.c      free(argv);
free               71 pack.c             free(t);				\
free               72 pack.c             free(zp);				\
free              249 random.c           free(buf);
free             1309 re.c               if (re->str) free(re->str);
free               90 regint.h       #define xfree       free
free              376 ruby.c         	free(list->name);
free              377 ruby.c         	free(list);
free              608 ruby.c         	    if (ruby_inplace_mode) free(ruby_inplace_mode);
free              407 ruby.h             rb_data_object_alloc(klass,sval,(RUBY_DATA_FUNC)mark,(RUBY_DATA_FUNC)free)
free              412 ruby.h             Data_Wrap_Struct(klass,mark,free,sval)\
free               59 rubyio.h       	free(RFILE(obj)->fptr);\
free              205 st.c           	    free(ptr);
free              209 st.c               free(table->bins);
free              210 st.c               free(table);
free              319 st.c               free(table->bins);
free              341 st.c           	free(new_table);
free              351 st.c           		free(new_table->bins);
free              352 st.c           		free(new_table);
free              384 st.c           	free(ptr);
free              395 st.c           	    free(tmp);
free              485 st.c           		free(tmp);
free              238 string.c           if (!FL_TEST(str, ELTS_SHARED)) free(RSTRING(str)->ptr);
free             2018 string.c       	    free(RSTRING(str)->ptr);
free             2111 string.c       	    free(RSTRING(str)->ptr);
free             2148 string.c       	free(RSTRING(str)->ptr);
free               38 time.c             if (tobj) free(tobj);
free             1801 time.c         	free(*buf);
free             1877 time.c         		free(buf);
free             1889 time.c             if (buf != buffer) free(buf);
free              632 util.c         	    free(buf);
free              645 util.c         	free(buf);
free              557 variable.c     	    free(next);
free              750 variable.c     		free(trace);
free              753 variable.c     	    free(var);
free             1050 win32/win32.c  	free(buf);
free             1054 win32/win32.c  	free(patt->str);
free             1055 win32/win32.c      free(patt);
free             1326 win32/win32.c  	if (curr->flags & NTMALLOC) free(curr->str);
free             1327 win32/win32.c  	free(curr);
free             1332 win32/win32.c      free(cmdline);
free             1564 win32/win32.c      free(dirp->start);
free             1565 win32/win32.c      free(dirp->bits);
free             1566 win32/win32.c      free(dirp);
free             2478 win32/win32.c  	    free(proto_buffers);
free             3760 win32/win32.c      while (*t) free(*t++);
free             3761 win32/win32.c      free(env);
free               37 wince/direct.c 	free(wdir);
free               50 wince/direct.c 	free(wdir);
free               33 wince/io_wce.c 	free(wold);
free               34 wince/io_wce.c 	free(wnew);
free               47 wince/io_wce.c 	free(wfile);
free               76 wince/io_wce.c 	free(wfile);
free               19 wince/stdio.c  	free(wfilename);
free               20 wince/stdio.c  	free(wmode);
free               33 wince/stdio.c  	free(wmode);
free               35 wince/string_wce.c 	free(w1);
free               36 wince/string_wce.c 	free(w2);
free               64 wince/string_wce.c 	free(w1);
free               65 wince/string_wce.c 	free(w2);
free               83 wince/string_wce.c 	free(wstr);
free               84 wince/string_wce.c 	free(wcs);
free               31 wince/sys/stat.c 		free(wfilename);
free               57 wince/sys/stat.c 				free(wfilename);
free               63 wince/sys/stat.c 			free(wfilename);
free               75 wince/sys/stat.c 	free(wfilename);
free               29 wince/sys/utime.c 	free(w);
free               36 wince/wince.c  	free(mb);
free               37 wince/wince.c  	free(lpFileNameW);
free               50 wince/wince.c  	free( lpwProcName );
free               68 wince/wince.c  	free(acmd);
free               74 wince/wince.c  	free(_commandLine);
free               94 wince/wince.c  	free(lpwFileName);
free              106 wince/wince.c  	free(lpwFileName);
free              119 wince/wince.c  	free(wfn1);
free              120 wince/wince.c  	free(wfn2);
free              137 wince/wince.c  	free(woldname);
free              138 wince/wince.c  	free(wnewname);
free              150 wince/wince.c  	free(wpath);
free              188 wince/wince.c  		free( wname );
free              194 wince/wince.c  	free( avalue );
free              195 wince/wince.c  	free( wname );
free              224 wince/wince.c  	free(wname);
free              225 wince/wince.c  	free(wvalue);
free              295 wince/wince.c  	free(mb);
free              324 wince/wince.c  	free(wappname);
free              325 wince/wince.c  	free(wcommandline);
free              326 wince/wince.c  	free(wdir);
free              340 wince/wince.c  	free(wname);
free              356 wince/wince.c  	free(lpWBuffer);
free              371 wince/wince.c  	free(wpath);
free              375 wince/wince.c  	free(mb);
free              391 wince/wince.c  	free(mb1);
free              408 wince/wince.c  	free(wfilename);
free              458 wince/wince.c  	free(wlibname);
free              476 wince/wince.c  	free(wlibname);
free              518 wince/wince.c  	free(tfname); free(tmode);
free              533 wince/wince.c  	free(buf);
free              548 wince/wince.c  		free(buf);


free_any_io

free_any_io       253 ext/syck/syck.c     free_any_io( p );
free_any_io       301 ext/syck/syck.c     free_any_io( p );
free_any_io       320 ext/syck/syck.c     free_any_io( p );
free_any_io       408 ext/syck/syck.h void free_any_io( SyckParser * );


free_dbm

free_dbm           94 ext/dbm/dbm.c      return Data_Wrap_Struct(klass, 0, free_dbm, 0);
free_dbm          159 ext/dbm/dbm.c      VALUE obj = Data_Wrap_Struct(klass, 0, free_dbm, 0);
free_dbm           96 ext/gdbm/gdbm.c     return Data_Wrap_Struct(klass, 0, free_dbm, 0);
free_dbm          155 ext/gdbm/gdbm.c     free_dbm(DATA_PTR(obj));
free_dbm          169 ext/gdbm/gdbm.c     VALUE obj = Data_Wrap_Struct(klass, 0, free_dbm, 0);


free_dir

free_dir          373 dir.c              VALUE obj = Data_Make_Struct(klass, struct dir_data, 0, free_dir, dirp);
free_dir          428 dir.c              VALUE dir = Data_Make_Struct(klass, struct dir_data, 0, free_dir, dp);
free_dir         1632 dir.c          	RDATA(dir)->dfree != (RUBY_DATA_FUNC)free_dir) {


free_invoke_arguments

free_invoke_arguments 6780 ext/tk/tcltklib.c     free_invoke_arguments(argc, av);
free_invoke_arguments 6939 ext/tk/tcltklib.c     free_invoke_arguments(argc, av);


free_sdbm

free_sdbm          85 ext/sdbm/init.c     return Data_Wrap_Struct(klass, 0, free_sdbm, 0);
free_sdbm         137 ext/sdbm/init.c     VALUE obj = Data_Wrap_Struct(klass, 0, free_sdbm, 0);


free_unused_heaps

free_unused_heaps 1084 gc.c               free_unused_heaps();
free_unused_heaps 1806 gc.c               free_unused_heaps();


freeaddrinfo

freeaddrinfo      158 ext/socket/addrinfo.h extern void freeaddrinfo __P((struct addrinfo *));
freeaddrinfo      534 ext/socket/getaddrinfo.c 		freeaddrinfo(top);
freeaddrinfo      576 ext/socket/getaddrinfo.c 		freeaddrinfo(cur);
freeaddrinfo      685 ext/socket/getaddrinfo.c 		freeaddrinfo(top);
freeaddrinfo     1140 ext/socket/socket.c 	freeaddrinfo(arg->remote.res);
freeaddrinfo     1144 ext/socket/socket.c 	freeaddrinfo(arg->local.res);
freeaddrinfo     1352 ext/socket/socket.c 		     RUBY_METHOD_FUNC(freeaddrinfo), (VALUE)addr);
freeaddrinfo     1565 ext/socket/socket.c     freeaddrinfo(res);
freeaddrinfo     1626 ext/socket/socket.c 		    RUBY_METHOD_FUNC(freeaddrinfo), (VALUE)arg.res);
freeaddrinfo     1645 ext/socket/socket.c 	freeaddrinfo(res0);
freeaddrinfo     1648 ext/socket/socket.c     freeaddrinfo(res0);
freeaddrinfo     1678 ext/socket/socket.c 	    freeaddrinfo(res0);
freeaddrinfo     1685 ext/socket/socket.c     freeaddrinfo(res0);
freeaddrinfo     2895 ext/socket/socket.c     freeaddrinfo(res);
freeaddrinfo     3026 ext/socket/socket.c 		freeaddrinfo(res);
freeaddrinfo     3030 ext/socket/socket.c 	freeaddrinfo(res);
freeaddrinfo     3035 ext/socket/socket.c     if (res) freeaddrinfo(res);
freeaddrinfo     3039 ext/socket/socket.c     if (res) freeaddrinfo(res);
freeaddrinfo     3050 ext/socket/socket.c     freeaddrinfo(res);


freehostent

freehostent       157 ext/socket/addrinfo.h extern void freehostent __P((struct hostent *));
freehostent       570 ext/socket/getaddrinfo.c 		freehostent(hp);
freehostent       579 ext/socket/getaddrinfo.c 		freehostent(hp);
freehostent       679 ext/socket/getaddrinfo.c 	freehostent(hp);
freehostent       688 ext/socket/getaddrinfo.c 		freehostent(hp);
freehostent       248 ext/socket/getnameinfo.c 				freehostent(hp);
freehostent       254 ext/socket/getnameinfo.c 			freehostent(hp);


freopen

freopen           742 ext/nkf/nkf-utf8/nkf.c     if (freopen("","wb",stdout) == NULL)
freopen           756 ext/nkf/nkf-utf8/nkf.c       if (freopen("","rb",stdin) == NULL) return (-1);
freopen           832 ext/nkf/nkf-utf8/nkf.c 		  if(freopen(outfname, "w", stdout) == NULL) {
freopen           838 ext/nkf/nkf-utf8/nkf.c                       if (freopen("","wb",stdout) == NULL)
freopen           847 ext/nkf/nkf-utf8/nkf.c                  if (freopen("","rb",fin) == NULL)
freopen          3420 io.c                   if (freopen(RSTRING(fname)->ptr, mode, fptr->stdio_file) == 0) {
freopen           102 wince/wince.h  FILE *freopen(const char *filename, const char *mode, FILE *file);


fromDefaultEnc_toUTF8

fromDefaultEnc_toUTF8  785 ext/tk/tkutil/tkutil.c                 return fromDefaultEnc_toUTF8(obj, self);
fromDefaultEnc_toUTF8  797 ext/tk/tkutil/tkutil.c                 return fromDefaultEnc_toUTF8(rb_str_new2(rb_id2name(SYM2ID(obj))), self);


fsdbm_alloc

fsdbm_alloc        80 ext/sdbm/init.c static VALUE fsdbm_alloc _((VALUE));
fsdbm_alloc       712 ext/sdbm/init.c     rb_define_alloc_func(rb_cDBM, fsdbm_alloc);


fsdbm_clear

fsdbm_clear       442 ext/sdbm/init.c     fsdbm_clear(obj);
fsdbm_clear       739 ext/sdbm/init.c     rb_define_method(rb_cDBM, "clear", fsdbm_clear, 0);


fsdbm_close

fsdbm_close       144 ext/sdbm/init.c         return rb_ensure(rb_yield, obj, fsdbm_close, obj);
fsdbm_close       716 ext/sdbm/init.c     rb_define_method(rb_cDBM, "close", fsdbm_close, 0);


fsdbm_delete

fsdbm_delete      456 ext/sdbm/init.c 	fsdbm_delete(obj, keystr);
fsdbm_delete      735 ext/sdbm/init.c     rb_define_method(rb_cDBM, "delete", fsdbm_delete, 1);


fsdbm_delete_if

fsdbm_delete_if   736 ext/sdbm/init.c     rb_define_method(rb_cDBM, "delete_if", fsdbm_delete_if, 0);
fsdbm_delete_if   737 ext/sdbm/init.c     rb_define_method(rb_cDBM, "reject!", fsdbm_delete_if, 0);


fsdbm_each_pair

fsdbm_each_pair   728 ext/sdbm/init.c     rb_define_method(rb_cDBM, "each", fsdbm_each_pair, 0);
fsdbm_each_pair   731 ext/sdbm/init.c     rb_define_method(rb_cDBM, "each_pair", fsdbm_each_pair, 0);


fsdbm_fetch

fsdbm_fetch       176 ext/sdbm/init.c     return fsdbm_fetch(obj, keystr, Qnil);
fsdbm_fetch       188 ext/sdbm/init.c     valstr = fsdbm_fetch(obj, keystr, ifnone);
fsdbm_fetch       252 ext/sdbm/init.c         rb_ary_push(new, fsdbm_fetch(obj, argv[i], Qnil));


fsdbm_has_key

fsdbm_has_key     744 ext/sdbm/init.c     rb_define_method(rb_cDBM, "include?", fsdbm_has_key, 1);
fsdbm_has_key     745 ext/sdbm/init.c     rb_define_method(rb_cDBM, "has_key?", fsdbm_has_key, 1);
fsdbm_has_key     746 ext/sdbm/init.c     rb_define_method(rb_cDBM, "member?", fsdbm_has_key, 1);
fsdbm_has_key     748 ext/sdbm/init.c     rb_define_method(rb_cDBM, "key?", fsdbm_has_key, 1);


fsdbm_has_value

fsdbm_has_value   747 ext/sdbm/init.c     rb_define_method(rb_cDBM, "has_value?", fsdbm_has_value, 1);
fsdbm_has_value   749 ext/sdbm/init.c     rb_define_method(rb_cDBM, "value?", fsdbm_has_value, 1);


fsdbm_initialize

fsdbm_initialize  139 ext/sdbm/init.c     if (NIL_P(fsdbm_initialize(argc, argv, obj))) {
fsdbm_initialize  715 ext/sdbm/init.c     rb_define_method(rb_cDBM, "initialize", fsdbm_initialize, -1);


fsdbm_length

fsdbm_length      725 ext/sdbm/init.c     rb_define_method(rb_cDBM, "length", fsdbm_length, 0);
fsdbm_length      726 ext/sdbm/init.c     rb_define_method(rb_cDBM, "size", fsdbm_length, 0);


fsdbm_store

fsdbm_store       416 ext/sdbm/init.c static VALUE fsdbm_store _((VALUE,VALUE,VALUE));
fsdbm_store       426 ext/sdbm/init.c     fsdbm_store(dbm, RARRAY(pair)->ptr[0], RARRAY(pair)->ptr[1]);
fsdbm_store       720 ext/sdbm/init.c     rb_define_method(rb_cDBM, "[]=", fsdbm_store, 2);
fsdbm_store       721 ext/sdbm/init.c     rb_define_method(rb_cDBM, "store", fsdbm_store, 2);


fsdbm_to_hash

fsdbm_to_hash     702 ext/sdbm/init.c     return rb_hash_delete_if(fsdbm_to_hash(obj));
fsdbm_to_hash     752 ext/sdbm/init.c     rb_define_method(rb_cDBM, "to_hash", fsdbm_to_hash, 0);


fstat

fstat             213 ext/sdbm/_sdbm.c 			if (fstat(db->dirf, &dstat) == 0) {
fstat              85 file.c         	if (fstat(fd, &st) < 0) return -1;
fstat             633 file.c         	return fstat(fptr->fd, st);
fstat             717 file.c             if (fstat(fptr->fd, &st) == -1) {
fstat            1586 file.c             if (fstat(fptr->fd, &st) == -1) {
fstat            1629 file.c             if (fstat(fptr->fd, &st) == -1) {
fstat            1675 file.c             if (fstat(fptr->fd, &st) == -1) {
fstat             193 io.c               if (fstat(fd, &sbuf) < 0)
fstat             398 io.c                   if (fstat(fptr->fd, &buf) == 0 &&
fstat            1190 io.c               if (fstat(fptr->fd, &st) == 0  && S_ISREG(st.st_mode)
fstat            4127 io.c           		    fstat(fr, &st);
fstat            4163 io.c           		    fstat(fw, &st2);
fstat             287 random.c               if (fstat(fd, &statbuf) == 0 && S_ISCHR(statbuf.st_mode)) {
fstat            3169 win32/win32.c      int ret = fstat(fd, st);
fstat              60 wince/sys/stat.h int fstat(int file, struct stat *sbuf);


gai_strerror

gai_strerror      162 ext/socket/addrinfo.h extern char *gai_strerror __P((int));
gai_strerror      665 ext/socket/socket.c     rb_raise(rb_eSocket, "%s: %s", reason, gai_strerror(error));


garbage_collect

garbage_collect    76 gc.c           static int garbage_collect(void);
garbage_collect   109 gc.c           	garbage_collect();
garbage_collect   113 gc.c           	if (garbage_collect()) {
garbage_collect   156 gc.c               if (always_gc) garbage_collect();
garbage_collect   159 gc.c           	if (garbage_collect()) {
garbage_collect   386 gc.c               if ((always_gc || !freelist) && !garbage_collect())
garbage_collect  1365 gc.c               garbage_collect();


gc_mark

gc_mark           553 gc.c           static void gc_mark(VALUE ptr, int lev);
gc_mark           617 gc.c           	    gc_mark(v, 0);
gc_mark           635 gc.c               gc_mark(value, lev);
gc_mark           655 gc.c               gc_mark(key, lev);
gc_mark           656 gc.c               gc_mark(value, lev);
gc_mark           677 gc.c           	gc_mark(obj, 0);
gc_mark           712 gc.c               gc_mark(ptr, 0);
gc_mark           753 gc.c           	    gc_mark((VALUE)obj->as.node.u2.node, lev);
gc_mark           766 gc.c           	    gc_mark((VALUE)obj->as.node.u1.node, lev);
gc_mark           791 gc.c           	    gc_mark((VALUE)obj->as.node.u1.node, lev);
gc_mark           829 gc.c           	    gc_mark((VALUE)obj->as.node.u3.node, lev);
gc_mark           863 gc.c           		gc_mark((VALUE)obj->as.node.u1.node, lev);
gc_mark           866 gc.c           		gc_mark((VALUE)obj->as.node.u2.node, lev);
gc_mark           869 gc.c           		gc_mark((VALUE)obj->as.node.u3.node, lev);
gc_mark           875 gc.c               gc_mark(obj->as.basic.klass, lev);
gc_mark           895 gc.c           		gc_mark(*ptr++, lev);
gc_mark           936 gc.c           	gc_mark(obj->as.varmap.val, lev);
gc_mark           946 gc.c           		gc_mark(*vars++, lev);
gc_mark           957 gc.c           		gc_mark(*ptr++, lev);
gc_mark          1222 gc.c               gc_mark((VALUE)frame->node, 0);
gc_mark          1298 gc.c               gc_mark((VALUE)ruby_scope, 0);
gc_mark          1299 gc.c               gc_mark((VALUE)ruby_dyna_vars, 0);


gc_mark_children

gc_mark_children  554 gc.c           static void gc_mark_children(VALUE ptr, int lev);
gc_mark_children  568 gc.c           		gc_mark_children((VALUE)p, 0);
gc_mark_children  587 gc.c           	gc_mark_children(*p, 0);
gc_mark_children  706 gc.c               gc_mark_children(ptr, lev+1);


genrand_int32

genrand_int32     169 random.c           unsigned long a=genrand_int32()>>5, b=genrand_int32()>>6;
genrand_int32     359 random.c                   val |= genrand_int32() << (i * 32);
genrand_int32     397 random.c                   rnd = genrand_int32() & mask;


genrand_real

genrand_real      465 random.c                           return rb_float_new(genrand_real());
genrand_real      482 random.c       	return rb_float_new(genrand_real());


get2comp

get2comp           89 bignum.c           get2comp(x);
get2comp         1006 bignum.c           if (!RBIGNUM(x)->sign) get2comp(z);
get2comp         1013 bignum.c           if (RBIGNUM(x)->sign) get2comp(z);
get2comp         1592 bignum.c       	get2comp(y);
get2comp         1596 bignum.c       	get2comp(x);
get2comp         1621 bignum.c           if (!RBIGNUM(z)->sign) get2comp(z);
get2comp         1648 bignum.c       	get2comp(y);
get2comp         1652 bignum.c       	get2comp(x);
get2comp         1677 bignum.c           if (!RBIGNUM(z)->sign) get2comp(z);
get2comp         1706 bignum.c       	get2comp(y);
get2comp         1710 bignum.c       	get2comp(x);
get2comp         1737 bignum.c           if (!RBIGNUM(z)->sign) get2comp(z);
get2comp         1808 bignum.c       	get2comp(x);
get2comp         1823 bignum.c       	get2comp(z);
get2comp         1867 bignum.c       	get2comp(x);


getDevice

getDevice         179 ext/pty/pty.c  static void getDevice _((int*, int*));
getDevice         223 ext/pty/pty.c      getDevice(&master,&slave);


get_addr

get_addr          145 ext/socket/getaddrinfo.c static int get_addr __P((const char *, int, struct addrinfo **,
get_addr          523 ext/socket/getaddrinfo.c 	error = get_addr(hostname, pai->ai_family, &top, pai, port);


get_backtrace

get_backtrace    1143 eval.c         	errat = get_backtrace(ruby_errinfo);
get_backtrace    4356 eval.c         	at = get_backtrace(mesg);
get_backtrace    6203 eval.c         		errat = get_backtrace(ruby_errinfo);
get_backtrace    7395 eval.c             return get_backtrace(ruby_errinfo);
get_backtrace    10936 eval.c         	VALUE oldbt = get_backtrace(th->errinfo);


get_char_length_tree

get_char_length_tree 1001 regcomp.c      static int get_char_length_tree(Node* node, regex_t* reg, int* len);
get_char_length_tree 1181 regcomp.c      	r = get_char_length_tree(node->target, reg, &n);
get_char_length_tree 1200 regcomp.c      	r = get_char_length_tree(node->target, reg, &n);
get_char_length_tree 2888 regcomp.c        r = get_char_length_tree(an->target, reg, &len);


get_char_length_tree1

get_char_length_tree1 2000 regcomp.c            r = get_char_length_tree1(NCONS(node).left, reg, &tlen, level);
get_char_length_tree1 2011 regcomp.c            r = get_char_length_tree1(NCONS(node).left, reg, &tlen, level);
get_char_length_tree1 2013 regcomp.c      	r = get_char_length_tree1(NCONS(node).left, reg, &tlen2, level);
get_char_length_tree1 2047 regcomp.c      	r = get_char_length_tree1(qn->target, reg, &tlen, level);
get_char_length_tree1 2059 regcomp.c            r = get_char_length_tree1(NCALL(node).target, reg, len, level);
get_char_length_tree1 2088 regcomp.c      	  r = get_char_length_tree1(en->target, reg, len, level);
get_char_length_tree1 2098 regcomp.c      	r = get_char_length_tree1(en->target, reg, len, level);
get_char_length_tree1 2120 regcomp.c        return get_char_length_tree1(node, reg, len, 0);


get_digest_base_metadata

get_digest_base_metadata   71 ext/digest/digest.c     algo = get_digest_base_metadata(klass);
get_digest_base_metadata   89 ext/digest/digest.c     algo = get_digest_base_metadata(klass);
get_digest_base_metadata  108 ext/digest/digest.c     algo = get_digest_base_metadata(klass);
get_digest_base_metadata  128 ext/digest/digest.c     algo = get_digest_base_metadata(rb_obj_class(copy));
get_digest_base_metadata  129 ext/digest/digest.c     if (algo != get_digest_base_metadata(rb_obj_class(obj))) {
get_digest_base_metadata  146 ext/digest/digest.c     algo = get_digest_base_metadata(rb_obj_class(self));
get_digest_base_metadata  174 ext/digest/digest.c     algo = get_digest_base_metadata(rb_obj_class(self));
get_digest_base_metadata  197 ext/digest/digest.c     algo = get_digest_base_metadata(rb_obj_class(self));
get_digest_base_metadata  220 ext/digest/digest.c     algo = get_digest_base_metadata(klass);


get_eval_string_core

get_eval_string_core  227 ext/tk/tkutil/tkutil.c static VALUE get_eval_string_core _((VALUE, VALUE, VALUE));
get_eval_string_core  325 ext/tk/tkutil/tkutil.c                         str_val = get_eval_string_core(val2, enc_flag, self);
get_eval_string_core  347 ext/tk/tkutil/tkutil.c                 str_val = get_eval_string_core(val, enc_flag, self);
get_eval_string_core  438 ext/tk/tkutil/tkutil.c                 str_val = get_eval_string_core(val, enc_flag, self);
get_eval_string_core  563 ext/tk/tkutil/tkutil.c                 = get_eval_string_core(RARRAY(pair)->ptr[2], Qtrue, self);
get_eval_string_core  583 ext/tk/tkutil/tkutil.c                 = get_eval_string_core(val, Qtrue, self);
get_eval_string_core  614 ext/tk/tkutil/tkutil.c         = get_eval_string_core(val, Qnil, RARRAY(args)->ptr[1]);
get_eval_string_core  656 ext/tk/tkutil/tkutil.c         rb_ary_push(ary, get_eval_string_core(val, Qtrue,
get_eval_string_core  665 ext/tk/tkutil/tkutil.c         = get_eval_string_core(val, Qtrue, RARRAY(args)->ptr[1]);
get_eval_string_core  828 ext/tk/tkutil/tkutil.c             return get_eval_string_core(rb_funcall(obj, ID_path, 0, 0),
get_eval_string_core  846 ext/tk/tkutil/tkutil.c             return get_eval_string_core(rb_funcall(obj, ID_to_eval, 0, 0),
get_eval_string_core  850 ext/tk/tkutil/tkutil.c             return get_eval_string_core(rb_funcall(obj, ID_path, 0, 0),
get_eval_string_core  875 ext/tk/tkutil/tkutil.c     return get_eval_string_core(obj, enc_flag, self);
get_eval_string_core  886 ext/tk/tkutil/tkutil.c         return get_eval_string_core(obj, Qtrue, self);
get_eval_string_core  928 ext/tk/tkutil/tkutil.c                 = get_eval_string_core(argv[idx], argv[1], self);


get_eventloop_tick

get_eventloop_tick  995 ext/tk/tcltklib.c         return get_eventloop_tick(self);
get_eventloop_tick 1000 ext/tk/tcltklib.c         return get_eventloop_tick(self);
get_eventloop_tick 1009 ext/tk/tcltklib.c     return get_eventloop_tick(self);
get_eventloop_tick 7813 ext/tk/tcltklib.c     rb_define_module_function(lib, "get_eventloop_tick",get_eventloop_tick,0);


get_eventloop_weight

get_eventloop_weight 1102 ext/tk/tcltklib.c         return get_eventloop_weight(self);
get_eventloop_weight 1107 ext/tk/tcltklib.c         return get_eventloop_weight(self);
get_eventloop_weight 1116 ext/tk/tcltklib.c     return get_eventloop_weight(self);
get_eventloop_weight 7820 ext/tk/tcltklib.c                               get_eventloop_weight, 0);


get_gzfile

get_gzfile        135 ext/zlib/zlib.c static struct gzfile *get_gzfile _((VALUE));
get_gzfile       2441 ext/zlib/zlib.c     return get_gzfile(obj)->io;
get_gzfile       2451 ext/zlib/zlib.c     return rb_uint2inum(get_gzfile(obj)->crc);
get_gzfile       2461 ext/zlib/zlib.c     return rb_time_new(get_gzfile(obj)->mtime, (time_t)0);
get_gzfile       2471 ext/zlib/zlib.c     return INT2FIX(get_gzfile(obj)->level);
get_gzfile       2481 ext/zlib/zlib.c     return INT2FIX(get_gzfile(obj)->os_code);
get_gzfile       2492 ext/zlib/zlib.c     VALUE str = get_gzfile(obj)->orig_name;
get_gzfile       2508 ext/zlib/zlib.c     VALUE str = get_gzfile(obj)->comment;
get_gzfile       2523 ext/zlib/zlib.c     return INT2NUM(get_gzfile(obj)->lineno);
get_gzfile       2533 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       2545 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       2569 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       2592 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       2616 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       2633 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       2660 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       2671 ext/zlib/zlib.c     return (get_gzfile(obj)->z.flags & GZFILE_FLAG_SYNC) ? Qtrue : Qfalse;
get_gzfile       2685 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       2703 ext/zlib/zlib.c     return rb_uint2inum(get_gzfile(obj)->z.stream.total_in);
get_gzfile       2713 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       2817 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       2842 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       2858 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       3008 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       3035 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       3067 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       3089 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       3135 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);
get_gzfile       3188 ext/zlib/zlib.c     struct gzfile *gz = get_gzfile(obj);


get_head_value_node

get_head_value_node 2353 regcomp.c          n = get_head_value_node(NCONS(node).left, exact, reg);
get_head_value_node 2385 regcomp.c      	  n = get_head_value_node(qn->target, exact, reg);
get_head_value_node 2399 regcomp.c      	  n = get_head_value_node(NEFFECT(node).target, exact, reg);
get_head_value_node 2406 regcomp.c      	n = get_head_value_node(en->target, exact, reg);
get_head_value_node 2414 regcomp.c            n = get_head_value_node(NANCHOR(node).target, exact, reg);
get_head_value_node 2914 regcomp.c            qn->next_head_exact = get_head_value_node(next_node, 1, reg);
get_head_value_node 2921 regcomp.c      	  x = get_head_value_node(qn->target, 0, reg);
get_head_value_node 2923 regcomp.c      	    y = get_head_value_node(next_node,  0, reg);
get_head_value_node 3197 regcomp.c      	  qn->head_exact = get_head_value_node(qn->target, 1, reg);


get_iconv_opt

get_iconv_opt     559 ext/iconv/iconv.c     get_iconv_opt(&opt, options);
get_iconv_opt     581 ext/iconv/iconv.c     get_iconv_opt(&opt, options);


get_inline

get_inline         33 ext/syck/bytecode.c char *get_inline( SyckParser *parser );
get_inline        302 ext/syck/bytecode.c             sycklval->name = get_inline( parser );
get_inline        313 ext/syck/bytecode.c             sycklval->name = get_inline( parser );
get_inline        325 ext/syck/bytecode.c             qstr = get_inline( parser );


get_ip

get_ip            651 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(interp);
get_ip            699 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(interp);
get_ip            991 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(self);
get_ip           1043 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(self);
get_ip           1098 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(self);
get_ip           1204 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(self);
get_ip           1808 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(self);
get_ip           1924 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(self);
get_ip           2070 ext/tk/tcltklib.c         struct tcltkip *ptr = get_ip(self);
get_ip           4865 ext/tk/tcltklib.c     struct tcltkip *master = get_ip(interp);
get_ip           4961 ext/tk/tcltklib.c     struct tcltkip *master = get_ip(self);
get_ip           4998 ext/tk/tcltklib.c     if (Tcl_GetMaster(get_ip(self)->ip) == get_ip(master)->ip) {
get_ip           5030 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(interp);
get_ip           5076 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(self);
get_ip           5093 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(interp);
get_ip           5126 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(self);
get_ip           5141 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(self);
get_ip           5160 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(self);
get_ip           5179 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(self);
get_ip           5230 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(self);
get_ip           5260 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(self);
get_ip           5282 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(self);
get_ip           5295 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(self);
get_ip           5423 ext/tk/tcltklib.c     ptr = get_ip(q->interp);
get_ip           5474 ext/tk/tcltklib.c     if (!NIL_P(ip_obj) && deleted_ip(get_ip(ip_obj))) {
get_ip           5584 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(self);
get_ip           5878 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(interp);
get_ip           5937 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(self);
get_ip           5956 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(self);
get_ip           6002 ext/tk/tcltklib.c         ptr = get_ip(ip_obj);
get_ip           6148 ext/tk/tcltklib.c     } else if (get_ip(ip_obj) == (struct tcltkip *)NULL) {
get_ip           6151 ext/tk/tcltklib.c         interp = get_ip(ip_obj)->ip;
get_ip           6493 ext/tk/tcltklib.c     ptr = get_ip(interp);
get_ip           6765 ext/tk/tcltklib.c     ptr = get_ip(interp);
get_ip           6960 ext/tk/tcltklib.c     ptr = get_ip(self);
get_ip           6998 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(interp);
get_ip           7126 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(interp);
get_ip           7263 ext/tk/tcltklib.c     struct tcltkip *ptr = get_ip(interp);
get_ip           7405 ext/tk/tcltklib.c     } else if (get_ip(ip_obj) == (struct tcltkip *)NULL) {
get_ip           7408 ext/tk/tcltklib.c         interp = get_ip(ip_obj)->ip;


get_max_match_length

get_max_match_length 1870 regcomp.c            r = get_max_match_length(NCONS(node).left, &tmax, env);
get_max_match_length 1878 regcomp.c            r = get_max_match_length(NCONS(node).left, &tmax, env);
get_max_match_length 1920 regcomp.c      	r = get_max_match_length(nodes[backs[i]], &tmax, env);
get_max_match_length 1930 regcomp.c            r = get_max_match_length(NCALL(node).target, max, env);
get_max_match_length 1941 regcomp.c      	r = get_max_match_length(qn->target, max, env);
get_max_match_length 1961 regcomp.c      	  r = get_max_match_length(en->target, max, env);
get_max_match_length 1971 regcomp.c      	r = get_max_match_length(en->target, max, env);
get_max_match_length 3147 regcomp.c      	  r = get_max_match_length(target, &d, env);
get_max_match_length 4160 regcomp.c            r = get_max_match_length(nodes[backs[0]], &max, env->scan_env);
get_max_match_length 4165 regcomp.c      	r = get_max_match_length(nodes[backs[i]], &tmax, env->scan_env);


get_min_match_length

get_min_match_length 1750 regcomp.c            r = get_min_match_length(nodes[backs[0]], min, env);
get_min_match_length 1754 regcomp.c      	r = get_min_match_length(nodes[backs[i]], &tmin, env);
get_min_match_length 1769 regcomp.c            r = get_min_match_length(NCALL(node).target, min, env);
get_min_match_length 1775 regcomp.c            r = get_min_match_length(NCONS(node).left, &tmin, env);
get_min_match_length 1786 regcomp.c      	r = get_min_match_length(x, &tmin, env);
get_min_match_length 1820 regcomp.c      	r = get_min_match_length(qn->target, min, env);
get_min_match_length 1836 regcomp.c      	  r = get_min_match_length(en->target, min, env);
get_min_match_length 1846 regcomp.c      	r = get_min_match_length(en->target, min, env);
get_min_match_length 2497 regcomp.c      	  ret = get_min_match_length(NCONS(x).left, &min, env);
get_min_match_length 3135 regcomp.c      	r = get_min_match_length(target, &d, env);
get_min_match_length 4158 regcomp.c            r = get_min_match_length(nodes[backs[0]], &min, env->scan_env);
get_min_match_length 4163 regcomp.c      	r = get_min_match_length(nodes[backs[i]], &tmin, env->scan_env);


get_name

get_name          142 ext/socket/getaddrinfo.c static int get_name __P((const char *, const struct afd *,
get_name          512 ext/socket/getaddrinfo.c 				get_name(pton, &afdl[i], &top, pton, pai, port);


get_no_event_wait

get_no_event_wait 1047 ext/tk/tcltklib.c         return get_no_event_wait(self);
get_no_event_wait 1052 ext/tk/tcltklib.c         return get_no_event_wait(self);
get_no_event_wait 1061 ext/tk/tcltklib.c     return get_no_event_wait(self);
get_no_event_wait 7815 ext/tk/tcltklib.c     rb_define_module_function(lib, "get_no_event_wait", get_no_event_wait, 0);


get_obj_from_str

get_obj_from_str 6707 ext/tk/tcltklib.c         av[i] = get_obj_from_str(argv[i]);
get_obj_from_str 7149 ext/tk/tcltklib.c         valobj = get_obj_from_str(value);
get_obj_from_str 7421 ext/tk/tcltklib.c         listobj = get_obj_from_str(list_str);


get_pat

get_pat          1207 string.c       static VALUE get_pat(VALUE, int);
get_pat          1233 string.c           return rb_funcall2(get_pat(re, 0), rb_intern("match"), argc, argv);
get_pat          1835 string.c           pat = get_pat(argv[0], 1);
get_pat          1938 string.c           pat = get_pat(argv[0], 1);
get_pat          3247 string.c       	    spat = get_pat(spat, 1);
get_pat          3845 string.c           pat = get_pat(pat, 1);


get_pid

get_pid          3562 process.c          rb_define_virtual_variable("$$", get_pid, 0);
get_pid          3623 process.c          rb_define_module_function(rb_mProcess, "pid", get_pid, 0);


get_stack_tail

get_stack_tail    105 ext/racc/cparse/cparse.c static VALUE get_stack_tail _((VALUE stack, long len));
get_stack_tail    135 ext/racc/cparse/cparse.c #define GET_TAIL(s, len) get_stack_tail(s, len)


get_stat

get_stat          206 file.c         	time_t t1 = get_stat(self)->st_mtime;
get_stat          207 file.c         	time_t t2 = get_stat(other)->st_mtime;
get_stat          231 file.c             return INT2NUM(get_stat(self)->st_dev);
get_stat          249 file.c             long dev = get_stat(self)->st_dev;
get_stat          271 file.c             long dev = get_stat(self)->st_dev;
get_stat          293 file.c             return ULL2NUM(get_stat(self)->st_ino);
get_stat          295 file.c             return ULONG2NUM(get_stat(self)->st_ino);
get_stat          316 file.c             return UINT2NUM((unsigned short)(get_stat(self)->st_mode));
get_stat          318 file.c             return UINT2NUM(get_stat(self)->st_mode);
get_stat          337 file.c             return UINT2NUM(get_stat(self)->st_nlink);
get_stat          354 file.c             return UINT2NUM(get_stat(self)->st_uid);
get_stat          370 file.c             return UINT2NUM(get_stat(self)->st_gid);
get_stat          390 file.c             return ULONG2NUM(get_stat(self)->st_rdev);
get_stat          411 file.c             long rdev = get_stat(self)->st_rdev;
get_stat          433 file.c             long rdev = get_stat(self)->st_rdev;
get_stat          452 file.c             return OFFT2NUM(get_stat(self)->st_size);
get_stat          470 file.c             return ULONG2NUM(get_stat(self)->st_blksize);
get_stat          491 file.c             return ULONG2NUM(get_stat(self)->st_blocks);
get_stat          512 file.c             return rb_time_new(get_stat(self)->st_atime, 0);
get_stat          528 file.c             return rb_time_new(get_stat(self)->st_mtime, 0);
get_stat          546 file.c             return rb_time_new(get_stat(self)->st_ctime, 0);
get_stat         3445 file.c             return rb_file_ftype(get_stat(obj));
get_stat         3462 file.c             if (S_ISDIR(get_stat(obj)->st_mode)) return Qtrue;
get_stat         3478 file.c             if (S_ISFIFO(get_stat(obj)->st_mode)) return Qtrue;
get_stat         3505 file.c             if (S_ISLNK(get_stat(obj)->st_mode)) return Qtrue;
get_stat         3526 file.c             if (S_ISSOCK(get_stat(obj)->st_mode)) return Qtrue;
get_stat         3549 file.c             if (S_ISBLK(get_stat(obj)->st_mode)) return Qtrue;
get_stat         3570 file.c             if (S_ISCHR(get_stat(obj)->st_mode)) return Qtrue;
get_stat         3590 file.c             if (get_stat(obj)->st_uid == geteuid()) return Qtrue;
get_stat         3597 file.c             if (get_stat(obj)->st_uid == getuid()) return Qtrue;
get_stat         3617 file.c             if (get_stat(obj)->st_gid == getegid()) return Qtrue;
get_stat         3636 file.c             struct stat *st = get_stat(obj);
get_stat         3668 file.c             struct stat *st = get_stat(obj);
get_stat         3675 file.c             if (group_member(get_stat(obj)->st_gid))
get_stat         3701 file.c             if ((get_stat(obj)->st_mode & (S_IROTH)) == S_IROTH) {
get_stat         3702 file.c               return UINT2NUM(get_stat(obj)->st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
get_stat         3724 file.c             struct stat *st = get_stat(obj);
get_stat         3754 file.c             struct stat *st = get_stat(obj);
get_stat         3761 file.c             if (group_member(get_stat(obj)->st_gid))
get_stat         3787 file.c             if ((get_stat(obj)->st_mode & (S_IWOTH)) == S_IWOTH) {
get_stat         3788 file.c               return UINT2NUM(get_stat(obj)->st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
get_stat         3812 file.c             struct stat *st = get_stat(obj);
get_stat         3840 file.c             struct stat *st = get_stat(obj);
get_stat         3847 file.c             if (group_member(get_stat(obj)->st_gid))
get_stat         3870 file.c             if (S_ISREG(get_stat(obj)->st_mode)) return Qtrue;
get_stat         3888 file.c             if (get_stat(obj)->st_size == 0) return Qtrue;
get_stat         3906 file.c             off_t size = get_stat(obj)->st_size;
get_stat         3927 file.c             if (get_stat(obj)->st_mode & S_ISUID) return Qtrue;
get_stat         3948 file.c             if (get_stat(obj)->st_mode & S_ISGID) return Qtrue;
get_stat         3969 file.c             if (get_stat(obj)->st_mode & S_ISVTX) return Qtrue;


get_str_from_obj

get_str_from_obj 5374 ext/tk/tcltklib.c     strval = get_str_from_obj(retObj);
get_str_from_obj 7041 ext/tk/tcltklib.c         strval = get_str_from_obj(ret);
get_str_from_obj 7177 ext/tk/tcltklib.c         strval = get_str_from_obj(ret);
get_str_from_obj 7449 ext/tk/tcltklib.c             elem = get_str_from_obj(objv[idx]);


get_strio

get_strio          35 ext/stringio/stringio.c static struct StringIO* get_strio _((VALUE));
get_strio          97 ext/stringio/stringio.c #define StringIO(obj) get_strio(obj)


get_zstream

get_zstream        64 ext/zlib/zlib.c static struct zstream *get_zstream _((VALUE));
get_zstream       930 ext/zlib/zlib.c     zstream_end(get_zstream(obj));
get_zstream       942 ext/zlib/zlib.c     zstream_reset(get_zstream(obj));
get_zstream       954 ext/zlib/zlib.c     struct zstream *z = get_zstream(obj);
get_zstream      1019 ext/zlib/zlib.c     struct zstream *z = get_zstream(obj);
get_zstream      1045 ext/zlib/zlib.c     return rb_uint2inum(get_zstream(obj)->stream.total_in);
get_zstream      1055 ext/zlib/zlib.c     return rb_uint2inum(get_zstream(obj)->stream.total_out);
get_zstream      1067 ext/zlib/zlib.c     return INT2FIX(get_zstream(obj)->stream.data_type);
get_zstream      1077 ext/zlib/zlib.c 	return rb_uint2inum(get_zstream(obj)->stream.adler);
get_zstream      1087 ext/zlib/zlib.c     return ZSTREAM_IS_FINISHED(get_zstream(obj)) ? Qtrue : Qfalse;
get_zstream      1170 ext/zlib/zlib.c     struct zstream *z1 = get_zstream(self);
get_zstream      1171 ext/zlib/zlib.c     struct zstream *z2 = get_zstream(orig);
get_zstream      1279 ext/zlib/zlib.c     struct zstream *z = get_zstream(obj);
get_zstream      1303 ext/zlib/zlib.c     do_deflate(get_zstream(obj), src, Z_NO_FLUSH);
get_zstream      1322 ext/zlib/zlib.c     struct zstream *z = get_zstream(obj);
get_zstream      1350 ext/zlib/zlib.c     struct zstream *z = get_zstream(obj);
get_zstream      1385 ext/zlib/zlib.c     struct zstream *z = get_zstream(obj);
get_zstream      1536 ext/zlib/zlib.c     struct zstream *z = get_zstream(obj);
get_zstream      1574 ext/zlib/zlib.c     struct zstream *z = get_zstream(obj);
get_zstream      1606 ext/zlib/zlib.c     struct zstream *z = get_zstream(obj);
get_zstream      1624 ext/zlib/zlib.c     struct zstream *z = get_zstream(obj);
get_zstream      1647 ext/zlib/zlib.c     struct zstream *z = get_zstream(obj);


getaddrinfo

getaddrinfo       143 ext/socket/addrinfo.h extern int getaddrinfo __P((
getaddrinfo       149 ext/socket/socket.c 	return getaddrinfo(nodename, servname, hints, res);
getaddrinfo       156 ext/socket/socket.c 	error = getaddrinfo(nodename, servname, &tmp_hints, res);
getaddrinfo       180 ext/socket/socket.c     int error = getaddrinfo(nodename, servname, hints, res);
getaddrinfo       814 ext/socket/socket.c     error = getaddrinfo(hostp, portp, &hints, &res);
getaddrinfo      2889 ext/socket/socket.c     error = getaddrinfo(hptr, pptr, &hints, &res);
getaddrinfo      3005 ext/socket/socket.c 	error = getaddrinfo(hptr, pptr, &hints, &res);


getc

getc             1796 ext/nkf/nkf-utf8/nkf.c     return getc(f);
getc             1900 io.c               c = getc(f);
getc              102 win32/win32.h  #define fgetc(_stream)		getc(_stream)


getchar

getchar          1421 ext/bigdecimal/bigdecimal.c             getchar();
getchar          1425 ext/bigdecimal/bigdecimal.c             getchar();
getchar           104 win32/win32.h  #define fgetchar()		getchar()


getcwd

getcwd            630 util.c             while (!getcwd(buf, size)) {
getcwd           2919 win32/win32.c      if (getcwd(buffer, size) == NULL) {
getcwd              9 wince/direct.h char *getcwd(char* buffer, int maxlen);


getdbit

getdbit           113 ext/sdbm/_sdbm.c static int getdbit proto((DBM *, long));
getdbit           495 ext/sdbm/_sdbm.c 	while (dbit < db->maxbno && getdbit(db, dbit))


getegid

getegid           847 file.c             else if (getegid() == st.st_gid || group_member(st.st_gid))
getegid          1327 file.c             if (st.st_gid == getegid()) return Qtrue;
getegid          3617 file.c             if (get_stat(obj)->st_gid == getegid()) return Qtrue;
getegid          2554 process.c      	if (getegid() == gid) {
getegid          2890 process.c      		      (getegid() == gid)? -1: gid,
getegid          2896 process.c      			 (getegid() == gid)? -1: gid) < 0) rb_sys_fail(0);
getegid          2898 process.c      	    if (setregid(gid, (getegid() == gid)? -1: gid) < 0) rb_sys_fail(0);
getegid          2900 process.c      	} else if (/* getgid() == gid && */ getegid() != gid) {
getegid          2901 process.c      	    if (setregid(getegid(), gid) < 0) rb_sys_fail(0);
getegid          2912 process.c      	    if (getegid() != gid && setegid(gid) < 0) rb_sys_fail(0);
getegid          2914 process.c      	} else if (/* SAVED_GROUP_ID != gid && */ getegid() == gid) {
getegid          3085 process.c          int egid = getegid();
getegid          3279 process.c          egid = getegid();
getegid          3456 process.c          egid = getegid();
getegid          3494 process.c          egid = getegid();
getegid          3716 process.c          SAVED_GROUP_ID = getegid();
getegid          1108 ruby.c             egid = (int)getegid();
getegid           305 win32/win32.h  extern rb_gid_t  getegid (void);


getenv

getenv             55 dir.c          char *getenv();
getenv            764 dir.c          	const char *dist = getenv("HOME");
getenv            766 dir.c          	    dist = getenv("LOGDIR");
getenv             73 dln.c          char *getenv();
getenv            973 dln.c              path = getenv("DLN_LIBRARY_PATH");
getenv           1612 dln.c          	path = getenv(PATH_ENV);
getenv           1726 dln.c          		home = getenv("HOME");
getenv             33 ext/etc/etc.c  char *getenv();
getenv             51 ext/etc/etc.c      if (!login) login = getenv("USER");
getenv             53 ext/etc/etc.c      login = getenv("USER");
getenv            288 ext/openssl/openssl_missing.c     file = getenv("OPENSSL_CONF");
getenv            200 ext/pty/pty.c      char		*p,*getenv();
getenv            209 ext/pty/pty.c  	if ((p = getenv("SHELL")) != NULL) {
getenv            291 ext/socket/getaddrinfo.c 			char *q = getenv("GAI");
getenv             99 ext/tk/stubs.c     ruby_tcl_dll = getenv("RUBY_TCL_DLL");
getenv            150 ext/tk/stubs.c     ruby_tk_dll = getenv("RUBY_TK_DLL");
getenv           2411 file.c         	    char *dir = getenv("HOME");
getenv           1543 hash.c             val = getenv(nam);
getenv           1582 hash.c             env = getenv(nam);
getenv           1618 hash.c             env = getenv(nam);
getenv           1645 hash.c         	path_tainted_p(getenv(PATH_ENV));
getenv           2097 hash.c             if (getenv(s)) return Qtrue;
getenv           2194 hash.c         	    VALUE val = env_str_new2(getenv(RSTRING(key)->ptr));
getenv             30 main.c             always_gc = getenv("RUBY_ALWAYS_GC") != NULL;
getenv             63 missing/os2.c      if ((shell = getenv("RUBYSHELL")) != NULL && *shell != '\0') {
getenv             72 missing/os2.c      } else if ((shell = getenv("SHELL")) != NULL && *shell != '\0') {
getenv             81 missing/os2.c      } else if ((shell = getenv("COMSPEC")) != NULL && *shell != '\0') {
getenv            238 missing/strftime.c 	tz = getenv("TZ");
getenv             46 ruby.c         char *getenv();
getenv            122 ruby.c         	newp = getenv("RUBYLIB_PREFIX");
getenv            307 ruby.c         	ruby_incpush(getenv("RUBYLIB"));
getenv            746 ruby.c             if (rb_safe_level() == 0 && (s = getenv("RUBYOPT"))) {
getenv            800 ruby.c         		char *path = getenv("RUBYPATH");
getenv            807 ruby.c         		    script = dln_find_file(argv[0], getenv(PATH_ENV));
getenv            918 win32/win32.c  	if ((shell = getenv("RUBYSHELL")) && (redir = has_redirection(cmd))) {
getenv            923 win32/win32.c  	else if ((shell = getenv("COMSPEC")) &&
getenv            108 wince/wince.h  char *getenv(const char *charstuff);


geteuid

geteuid           830 file.c             euid = geteuid();
geteuid          1297 file.c             if (st.st_uid == geteuid()) return Qtrue;
geteuid          3590 file.c             if (get_stat(obj)->st_uid == geteuid()) return Qtrue;
geteuid          2191 process.c      	if (geteuid() == uid) {
geteuid          2240 process.c          if (geteuid() == 0) { /* root-user */
geteuid          2297 process.c      		      (geteuid() == uid)? -1: uid,
geteuid          2303 process.c      			 (geteuid() == uid)? -1: uid) < 0) rb_sys_fail(0);
geteuid          2305 process.c      	    if (setreuid(uid, (geteuid() == uid)? -1: uid) < 0) rb_sys_fail(0);
geteuid          2307 process.c      	} else if (/* getuid() == uid && */ geteuid() != uid) {
geteuid          2308 process.c      	    if (setreuid(geteuid(), uid) < 0) rb_sys_fail(0);
geteuid          2319 process.c      	    if (geteuid() != uid && seteuid(uid) < 0) rb_sys_fail(0);
geteuid          2321 process.c      	} else if (/* SAVED_USER_ID != uid && */ geteuid() == uid) {
geteuid          2832 process.c          if (geteuid() == 0) { /* root-user */
geteuid          2977 process.c          int euid = geteuid();
geteuid          3040 process.c          if (geteuid() == 0) rb_sys_fail(0);
geteuid          3150 process.c          if (geteuid() == 0 /* root user */) rb_sys_fail(0);
geteuid          3222 process.c          euid = geteuid();
geteuid          3347 process.c          euid = geteuid();
geteuid          3386 process.c          euid = geteuid();
geteuid          3715 process.c          SAVED_USER_ID = geteuid();
geteuid          1106 ruby.c             euid = (int)geteuid();
geteuid           303 win32/win32.h  extern rb_uid_t  geteuid (void);


getgid

getgid            388 ext/pty/pty.c  		chown(SlaveName, getuid(), getgid());
getgid            792 file.c             if (getgid() ==  gid)
getgid           2528 process.c          int gid = getgid();
getgid           2840 process.c      	if (getgid() == gid) {
getgid           2862 process.c      	if (getgid() == gid) {
getgid           2889 process.c      	if (setresgid((getgid() == gid)? -1: gid,
getgid           2895 process.c      	    if (setregid((getgid() == gid)? -1: gid,
getgid           2897 process.c      	} else if (getgid() != gid) {
getgid           2913 process.c      	    if (getgid() != gid && setrgid(gid) < 0) rb_sys_fail(0);
getgid           2915 process.c      	    if (getgid() != gid) {
getgid           2923 process.c      	} else if (/* getegid() != gid && */ getgid() == gid) {
getgid           2933 process.c      	if (getgid() == gid) {
getgid           2942 process.c      	if (getgid() == gid && SAVED_GROUP_ID == gid) {
getgid           2949 process.c      	if (getgid() == gid && SAVED_GROUP_ID == gid) {
getgid           3112 process.c          if (egid == getgid()) {
getgid           3131 process.c          gid = getgid();
getgid           3278 process.c          gid = getgid();
getgid           3455 process.c          gid = getgid();
getgid           3493 process.c          gid = getgid();
getgid           1107 ruby.c             gid = (int)getgid();
getgid            304 win32/win32.h  extern rb_gid_t  getgid (void);


gethostbyaddr

gethostbyaddr     560 ext/socket/getaddrinfo.c 	hp = gethostbyaddr((char*)addr, afd->a_addrlen, AF_INET);
gethostbyaddr     237 ext/socket/getnameinfo.c 		hp = gethostbyaddr(addr, afd->a_addrlen, afd->a_af);
gethostbyaddr    2749 ext/socket/socket.c     h = gethostbyaddr(RSTRING(addr)->ptr, RSTRING(addr)->len, t);
gethostbyaddr    2519 win32/win32.c  	r = gethostbyaddr(addr, len, type);


gethostbyname

gethostbyname     612 ext/socket/getaddrinfo.c 	hp = gethostbyname((char*)hostname);
gethostbyname    1320 ext/socket/socket.c     if (addr->ai_canonname && (h = gethostbyname(addr->ai_canonname))) {
gethostbyname    2536 win32/win32.c  	r = gethostbyname(name);


gethostname

gethostname      2639 ext/socket/socket.c     if (gethostname(buf, (int)sizeof buf - 1) < 0)
gethostname      2553 win32/win32.c  	r = gethostname(name, len);


getlogin

getlogin           35 ext/etc/etc.c  char *getlogin();
getlogin           50 ext/etc/etc.c      login = getlogin();


getnameinfo

getnameinfo       148 ext/socket/addrinfo.h extern int getnameinfo __P((
getnameinfo       676 ext/socket/socket.c     error = getnameinfo(addr, SA_LEN(addr), buf, len, NULL, 0, NI_NUMERICHOST);
getnameinfo       881 ext/socket/socket.c 	error = getnameinfo(sockaddr, SA_LEN(sockaddr), hbuf, sizeof(hbuf),
getnameinfo       887 ext/socket/socket.c     error = getnameinfo(sockaddr, SA_LEN(sockaddr), hbuf, sizeof(hbuf),
getnameinfo      3014 ext/socket/socket.c     error = getnameinfo(sap, SA_LEN(sap), hbuf, sizeof(hbuf),
getnameinfo      3022 ext/socket/socket.c 	    error = getnameinfo(sap, SA_LEN(sap), hbuf2, sizeof(hbuf2),


getnext

getnext           116 ext/sdbm/_sdbm.c static datum getnext proto((DBM *));
getnext           469 ext/sdbm/_sdbm.c 	return getnext(db);
getnext           478 ext/sdbm/_sdbm.c 	return getnext(db);


getnkey

getnkey            66 ext/sdbm/_sdbm.c static datum getnkey proto((char *, int));
getnkey           595 ext/sdbm/_sdbm.c 		key = getnkey(db->pagbuf, db->keyptr);


getpage

getpage           115 ext/sdbm/_sdbm.c static int getpage proto((DBM *, long));
getpage           258 ext/sdbm/_sdbm.c 	if (getpage(db, exhash(key)))
getpage           274 ext/sdbm/_sdbm.c 	if (getpage(db, exhash(key))) {
getpage           312 ext/sdbm/_sdbm.c 	if (getpage(db, (hash = exhash(key)))) {


getpair

getpair            63 ext/sdbm/_sdbm.c static datum getpair proto((char *, datum));
getpair           259 ext/sdbm/_sdbm.c 		return getpair(db->pagbuf, key);


getpeername

getpeername       471 ext/socket/socket.c     if (getpeername(fptr->fd, (struct sockaddr*)buf, &len) < 0)
getpeername      1542 ext/socket/socket.c     if (getpeername(fptr->fd, (struct sockaddr*)&addr, &len) < 0)
getpeername      1980 ext/socket/socket.c     if (getpeername(fptr->fd, (struct sockaddr*)&addr, &len) < 0)
getpeername      2268 win32/win32.c  	r = getpeername(TO_SOCKET(s), addr, addrlen);


getpid

getpid            226 ext/pty/pty.c      currentPid = getpid();
getpid            234 ext/pty/pty.c  	currentPid = getpid();
getpid            134 process.c          return INT2FIX(getpid());
getpid           1804 process.c        pid = getpid();
getpid            297 random.c           seed[2] ^= getpid() ^ (n++ << 16);
getpid           3770 win32/win32.c      pid = getpid();


getprotobyname

getprotobyname   2570 win32/win32.c  	r = getprotobyname(name);
getprotobyname    321 wince/winsock2.c 	pe1 = *getprotobyname("UDP");


getservbyname

getservbyname     403 ext/socket/getaddrinfo.c 			if ((sp = getservbyname((char*)servname, proto)) == NULL)
getservbyname    2793 ext/socket/socket.c     sp = getservbyname(StringValueCStr(service),  StringValueCStr(proto));
getservbyname    2604 win32/win32.c  	r = getservbyname(name, proto);


getservbyport

getservbyport     191 ext/socket/getnameinfo.c 		sp = getservbyport(port, (flags & NI_DGRAM) ? "udp" : "tcp");
getservbyport    2821 ext/socket/socket.c     sp = getservbyport(NUM2INT(port),  StringValueCStr(proto));
getservbyport    2621 win32/win32.c  	r = getservbyport(port, proto);
getservbyport     330 wince/winsock2.c 	se1 = *getservbyport(0x1327, "tcp");


getsockname

getsockname       457 ext/socket/socket.c     if (getsockname(fptr->fd, (struct sockaddr*)buf, &len) < 0)
getsockname      1527 ext/socket/socket.c     if (getsockname(fptr->fd, (struct sockaddr*)&addr, &len) < 0)
getsockname      1708 ext/socket/socket.c 	if (getsockname(fptr->fd, (struct sockaddr*)&addr, &len) < 0)
getsockname      1963 ext/socket/socket.c     if (getsockname(fptr->fd, (struct sockaddr*)&addr, &len) < 0)
getsockname      2285 win32/win32.c  	r = getsockname(TO_SOCKET(s), addr, addrlen);
getsockname      2681 win32/win32.c  	    if (getsockname(svr, addr, &len) < 0)


getsockopt

getsockopt        439 ext/socket/socket.c     if (getsockopt(fptr->fd, level, option, buf, &len) < 0)
getsockopt        940 ext/socket/socket.c 	    if (getsockopt(fd, SOL_SOCKET, SO_ERROR, (void *)&sockerr,
getsockopt       1065 ext/socket/socket.c 		status = getsockopt(fd, SOL_SOCKET, SO_ERROR, (void *)&sockerr, &sockerrlen);
getsockopt       1095 ext/socket/socket.c 		    status = getsockopt(fd, SOL_SOCKET, SO_ERROR, (void *)&sockerr, &sockerrlen);
getsockopt       1711 win32/win32.c  	retval = getsockopt(sock, SOL_SOCKET, SO_TYPE, sockbuf, &optlen);
getsockopt       2300 win32/win32.c  	r = getsockopt(TO_SOCKET(s), level, optname, optval, optlen);


gettable

gettable          904 parse.y        				$$ = NEW_OP_ASGN_OR(gettable(vid), $1);
gettable          911 parse.y        				$$ = NEW_OP_ASGN_AND(gettable(vid), $1);
gettable          915 parse.y        				$$->nd_value = call_op(gettable(vid),$2,1,$3);
gettable         1659 parse.y        				$$ = NEW_OP_ASGN_OR(gettable(vid), $1);
gettable         1666 parse.y        				$$ = NEW_OP_ASGN_AND(gettable(vid), $1);
gettable         1670 parse.y        				$$->nd_value = call_op(gettable(vid),$2,1,$3);
gettable         3932 parse.y        			$$ = gettable($1);


gettable_gen

gettable_gen      287 parse.y        static NODE *gettable_gen(struct parser_params*,ID);
gettable_gen      288 parse.y        #define gettable(id) gettable_gen(parser,id)


gettimeofday

gettimeofday     9918 eval.c             gettimeofday(&tv, NULL);
gettimeofday      431 missing/strftime.c 			gettimeofday(&tv, &zone);
gettimeofday      437 missing/strftime.c 			gettimeofday(&tv, &zone);
gettimeofday      463 missing/strftime.c 			gettimeofday(& tv, & zone);
gettimeofday      294 random.c           gettimeofday(&tv, 0);
gettimeofday     1065 regexec.c      #define GETTIME(t)        gettimeofday(&(t), (struct timezone* )0)
gettimeofday       97 time.c             if (gettimeofday(&tobj->tv, 0) < 0) {
gettimeofday      205 win32/win32.h  extern int gettimeofday(struct timeval *, struct timezone *);


getuid

getuid            137 ext/etc/etc.c  	uid = getuid();
getuid            213 ext/pty/pty.c  	    pwent = getpwuid(getuid());
getuid            281 ext/pty/pty.c  	seteuid(getuid());
getuid            388 ext/pty/pty.c  		chown(SlaveName, getuid(), getgid());
getuid           1307 file.c             if (st.st_uid == getuid()) return Qtrue;
getuid           3597 file.c             if (get_stat(obj)->st_uid == getuid()) return Qtrue;
getuid           2164 process.c          int uid = getuid();
getuid           2248 process.c      	if (getuid() == uid) {
getuid           2270 process.c      	if (getuid() == uid) {
getuid           2296 process.c      	if (setresuid((getuid() == uid)? -1: uid,
getuid           2302 process.c      	    if (setreuid((getuid() == uid)? -1: uid,
getuid           2304 process.c      	} else if (getuid() != uid) {
getuid           2320 process.c      	    if (getuid() != uid && setruid(uid) < 0) rb_sys_fail(0);
getuid           2322 process.c      	    if (getuid() != uid) {
getuid           2330 process.c      	} else if (/* geteuid() != uid && */ getuid() == uid) {
getuid           2340 process.c      	if (getuid() == uid) {
getuid           2349 process.c      	if (getuid() == uid && SAVED_USER_ID == uid) {
getuid           2356 process.c      	if (getuid() == uid && SAVED_USER_ID == uid) {
getuid           3002 process.c          if (euid == getuid()) {
getuid           3021 process.c          uid = getuid();
getuid           3221 process.c          uid = getuid();
getuid           3346 process.c          uid = getuid();
getuid           3385 process.c          uid = getuid();
getuid           1105 ruby.c             uid = (int)getuid();
getuid            302 win32/win32.h  extern rb_uid_t  getuid (void);


glob_call_func

glob_call_func   1210 dir.c          	    status = glob_call_func(func, path, arg);
glob_call_func   1215 dir.c          	    status = glob_call_func(func, tmp, arg);


glob_helper

glob_helper      1259 dir.c          	    status = glob_helper(buf, 1, YES, new_isdir, new_beg, new_end, flags, func, arg);
glob_helper      1293 dir.c          		status = glob_helper(buf, 1, UNKNOWN, UNKNOWN, new_beg, new_end, flags, func, arg);
glob_helper      1329 dir.c              status = glob_helper(buf, 0, UNKNOWN, UNKNOWN, &list, &list + 1, flags, func, arg);


global_id

global_id         455 variable.c         ID id = global_id(name);
global_id         673 variable.c         entry = rb_global_entry(global_id(name));
global_id         682 variable.c         entry = rb_global_entry(global_id(name));


gmtime

gmtime            482 time.c             tm = (utc_p ? gmtime : localtime)(&guess);
gmtime            495 time.c         	    (tm = (utc_p ? gmtime : localtime)(&guess)) != NULL) {
gmtime            505 time.c             tm = (utc_p ? gmtime : localtime)(&guess_lo);
gmtime            512 time.c             tm = (utc_p ? gmtime : localtime)(&guess_hi);
gmtime            609 time.c         	tm = (utc_p ? gmtime : localtime)(&guess);
gmtime            727 time.c         	if ((tmp = gmtime(&t)) &&
gmtime           1088 time.c             tm_tmp = gmtime(&t);
gmtime           1718 time.c         	u = gmtime(&t);
gmtime           1924 time.c             tm = gmtime(&t);
gmtime             51 wince/time.h   struct tm *gmtime(const time_t *tod);
gmtime            266 wince/time_wce.c 	tm1 = *gmtime(&t1);


group_member

group_member      847 file.c             else if (getegid() == st.st_gid || group_member(st.st_gid))
group_member     3675 file.c             if (group_member(get_stat(obj)->st_gid))
group_member     3761 file.c             if (group_member(get_stat(obj)->st_gid))
group_member     3847 file.c             if (group_member(get_stat(obj)->st_gid))


gzfile_calc_crc

gzfile_calc_crc   126 ext/zlib/zlib.c static void gzfile_calc_crc _((struct gzfile*, VALUE));
gzfile_calc_crc  2173 ext/zlib/zlib.c     gzfile_calc_crc(gz, dst);
gzfile_calc_crc  2214 ext/zlib/zlib.c     gzfile_calc_crc(gz, dst);
gzfile_calc_crc  2244 ext/zlib/zlib.c     gzfile_calc_crc(gz, dst);
gzfile_calc_crc  3158 ext/zlib/zlib.c 	    gzfile_calc_crc(gz, str);
gzfile_calc_crc  3169 ext/zlib/zlib.c     gzfile_calc_crc(gz, str);


gzfile_check_footer

gzfile_check_footer  123 ext/zlib/zlib.c static void gzfile_check_footer _((struct gzfile*));
gzfile_check_footer 2167 ext/zlib/zlib.c 	    gzfile_check_footer(gz);
gzfile_check_footer 2206 ext/zlib/zlib.c 	    gzfile_check_footer(gz);
gzfile_check_footer 2238 ext/zlib/zlib.c 	    gzfile_check_footer(gz);
gzfile_check_footer 2313 ext/zlib/zlib.c 	gzfile_check_footer(gz);
gzfile_check_footer 2343 ext/zlib/zlib.c 	gzfile_check_footer(gz);


gzfile_close

gzfile_close      110 ext/zlib/zlib.c static void gzfile_close _((struct gzfile*, int));
gzfile_close     2387 ext/zlib/zlib.c 	gzfile_close(gz, 1);
gzfile_close     2620 ext/zlib/zlib.c     gzfile_close(gz, 1);
gzfile_close     2637 ext/zlib/zlib.c     gzfile_close(gz, 0);


gzfile_ensure_close

gzfile_ensure_close  136 ext/zlib/zlib.c static VALUE gzfile_ensure_close _((VALUE));
gzfile_ensure_close 2404 ext/zlib/zlib.c 	return rb_ensure(rb_yield, obj, gzfile_ensure_close, obj);


gzfile_finalize

gzfile_finalize   130 ext/zlib/zlib.c static VALUE gzfile_finalize _((VALUE));
gzfile_finalize  2291 ext/zlib/zlib.c 	    rb_protect(gzfile_finalize, (VALUE)gz, &aborted);


gzfile_free

gzfile_free       107 ext/zlib/zlib.c static void gzfile_free _((struct gzfile*));
gzfile_free      1769 ext/zlib/zlib.c     obj = Data_Make_Struct(klass, struct gzfile, gzfile_mark, gzfile_free, gz);


gzfile_get16

gzfile_get16      117 ext/zlib/zlib.c static unsigned int gzfile_get16 _((const unsigned char*));
gzfile_get16     2043 ext/zlib/zlib.c 	len = gzfile_get16(RSTRING(gz->z.input)->ptr);


gzfile_get32

gzfile_get32      118 ext/zlib/zlib.c static unsigned long gzfile_get32 _((const unsigned char*));
gzfile_get32     2035 ext/zlib/zlib.c     gz->mtime = gzfile_get32(&head[4]);
gzfile_get32     2081 ext/zlib/zlib.c     crc = gzfile_get32(RSTRING(gz->z.input)->ptr);
gzfile_get32     2082 ext/zlib/zlib.c     length = gzfile_get32(RSTRING(gz->z.input)->ptr + 4);


gzfile_make_footer

gzfile_make_footer  121 ext/zlib/zlib.c static void gzfile_make_footer _((struct gzfile*));
gzfile_make_footer 2282 ext/zlib/zlib.c     gzfile_make_footer(gz);


gzfile_make_header

gzfile_make_header  120 ext/zlib/zlib.c static void gzfile_make_header _((struct gzfile*));
gzfile_make_header 2102 ext/zlib/zlib.c 	gzfile_make_header(gz);
gzfile_make_header 2278 ext/zlib/zlib.c 	gzfile_make_header(gz);


gzfile_mark

gzfile_mark       106 ext/zlib/zlib.c static void gzfile_mark _((struct gzfile*));
gzfile_mark      1769 ext/zlib/zlib.c     obj = Data_Make_Struct(klass, struct gzfile, gzfile_mark, gzfile_free, gz);


gzfile_new

gzfile_new        108 ext/zlib/zlib.c static VALUE gzfile_new _((VALUE, const struct zstream_funcs*, void (*) _((struct gzfile*))));
gzfile_new       1785 ext/zlib/zlib.c #define gzfile_writer_new(gz) gzfile_new((gz),&deflate_funcs,gzfile_writer_end)
gzfile_new       1786 ext/zlib/zlib.c #define gzfile_reader_new(gz) gzfile_new((gz),&inflate_funcs,gzfile_reader_end)


gzfile_read

gzfile_read       127 ext/zlib/zlib.c static VALUE gzfile_read _((struct gzfile*, int));
gzfile_read      3048 ext/zlib/zlib.c     return gzfile_read(gz, len);
gzfile_read      3092 ext/zlib/zlib.c     dst = gzfile_read(gz, 1);
gzfile_read      3228 ext/zlib/zlib.c 	    return gzfile_read(gz, rslen);
gzfile_read      3254 ext/zlib/zlib.c     dst = gzfile_read(gz, n);


gzfile_read_all

gzfile_read_all   128 ext/zlib/zlib.c static VALUE gzfile_read_all _((struct gzfile*));
gzfile_read_all  3041 ext/zlib/zlib.c 	return gzfile_read_all(gz);
gzfile_read_all  3206 ext/zlib/zlib.c 	dst = gzfile_read_all(gz);


gzfile_read_header

gzfile_read_header  122 ext/zlib/zlib.c static void gzfile_read_header _((struct gzfile*));
gzfile_read_header 2995 ext/zlib/zlib.c     gzfile_read_header(gz);


gzfile_read_more

gzfile_read_more  125 ext/zlib/zlib.c static long gzfile_read_more _((struct gzfile*));
gzfile_read_more 2163 ext/zlib/zlib.c 	gzfile_read_more(gz);
gzfile_read_more 2202 ext/zlib/zlib.c 	gzfile_read_more(gz);
gzfile_read_more 2234 ext/zlib/zlib.c 	gzfile_read_more(gz);
gzfile_read_more 3150 ext/zlib/zlib.c 	gzfile_read_more(gz);
gzfile_read_more 3161 ext/zlib/zlib.c 		gzfile_read_more(gz);
gzfile_read_more 3230 ext/zlib/zlib.c 	gzfile_read_more(gz);
gzfile_read_more 3238 ext/zlib/zlib.c 	    gzfile_read_more(gz);


gzfile_read_raw

gzfile_read_raw   114 ext/zlib/zlib.c static VALUE gzfile_read_raw _((struct gzfile*));
gzfile_read_raw  1874 ext/zlib/zlib.c 	str = gzfile_read_raw(gz);
gzfile_read_raw  1893 ext/zlib/zlib.c 	str = gzfile_read_raw(gz);
gzfile_read_raw  2120 ext/zlib/zlib.c 	str = gzfile_read_raw(gz);


gzfile_read_raw_ensure

gzfile_read_raw_ensure  115 ext/zlib/zlib.c static int gzfile_read_raw_ensure _((struct gzfile*, int));
gzfile_read_raw_ensure 2001 ext/zlib/zlib.c     if (!gzfile_read_raw_ensure(gz, 10)) {  /* 10 is the size of gzip header */
gzfile_read_raw_ensure 2040 ext/zlib/zlib.c 	if (!gzfile_read_raw_ensure(gz, 2)) {
gzfile_read_raw_ensure 2044 ext/zlib/zlib.c 	if (!gzfile_read_raw_ensure(gz, 2 + len)) {
gzfile_read_raw_ensure 2077 ext/zlib/zlib.c     if (!gzfile_read_raw_ensure(gz, 8)) { /* 8 is the size of gzip footer */


gzfile_read_raw_partial

gzfile_read_raw_partial  112 ext/zlib/zlib.c static VALUE gzfile_read_raw_partial _((VALUE));
gzfile_read_raw_partial 1861 ext/zlib/zlib.c     return rb_rescue2(gzfile_read_raw_partial, (VALUE)gz,


gzfile_read_raw_rescue

gzfile_read_raw_rescue  113 ext/zlib/zlib.c static VALUE gzfile_read_raw_rescue _((VALUE));
gzfile_read_raw_rescue 1862 ext/zlib/zlib.c                       gzfile_read_raw_rescue, (VALUE)gz,


gzfile_read_raw_until_zero

gzfile_read_raw_until_zero  116 ext/zlib/zlib.c static char *gzfile_read_raw_until_zero _((struct gzfile*, long));
gzfile_read_raw_until_zero 2050 ext/zlib/zlib.c 	p = gzfile_read_raw_until_zero(gz, 0);
gzfile_read_raw_until_zero 2057 ext/zlib/zlib.c 	p = gzfile_read_raw_until_zero(gz, 0);


gzfile_reader_end

gzfile_reader_end  132 ext/zlib/zlib.c static void gzfile_reader_end _((struct gzfile*));
gzfile_reader_end 1786 ext/zlib/zlib.c #define gzfile_reader_new(gz) gzfile_new((gz),&inflate_funcs,gzfile_reader_end)


gzfile_reader_get_unused

gzfile_reader_get_unused  134 ext/zlib/zlib.c static VALUE gzfile_reader_get_unused _((struct gzfile*));
gzfile_reader_get_unused 3023 ext/zlib/zlib.c     return gzfile_reader_get_unused(gz);


gzfile_reader_rewind

gzfile_reader_rewind  133 ext/zlib/zlib.c static void gzfile_reader_rewind _((struct gzfile*));
gzfile_reader_rewind 3009 ext/zlib/zlib.c     gzfile_reader_rewind(gz);


gzfile_reset

gzfile_reset      109 ext/zlib/zlib.c static void gzfile_reset _((struct gzfile*));
gzfile_reset     2331 ext/zlib/zlib.c     gzfile_reset(gz);


gzfile_s_open

gzfile_s_open     138 ext/zlib/zlib.c static VALUE gzfile_s_open _((int, VALUE*, VALUE, const char*));
gzfile_s_open    2767 ext/zlib/zlib.c     return gzfile_s_open(argc, argv, klass, "wb");
gzfile_s_open    2966 ext/zlib/zlib.c     return gzfile_s_open(argc, argv, klass, "rb");


gzfile_set32

gzfile_set32      119 ext/zlib/zlib.c static void gzfile_set32 _((unsigned long n, unsigned char*));
gzfile_set32     1964 ext/zlib/zlib.c     gzfile_set32(gz->mtime, &buf[4]);
gzfile_set32     1987 ext/zlib/zlib.c     gzfile_set32(gz->crc, buf);
gzfile_set32     1988 ext/zlib/zlib.c     gzfile_set32(gz->z.stream.total_in, &buf[4]);


gzfile_ungetc

gzfile_ungetc     129 ext/zlib/zlib.c static void gzfile_ungetc _((struct gzfile*, int));
gzfile_ungetc    3136 ext/zlib/zlib.c     gzfile_ungetc(gz, NUM2CHR(ch));


gzfile_write

gzfile_write      124 ext/zlib/zlib.c static void gzfile_write _((struct gzfile*, Bytef*, uInt));
gzfile_write     2847 ext/zlib/zlib.c     gzfile_write(gz, RSTRING(str)->ptr, RSTRING(str)->len);
gzfile_write     2861 ext/zlib/zlib.c     gzfile_write(gz, &c, 1);


gzfile_write_raw

gzfile_write_raw  111 ext/zlib/zlib.c static void gzfile_write_raw _((struct gzfile*));
gzfile_write_raw 2110 ext/zlib/zlib.c     gzfile_write_raw(gz);
gzfile_write_raw 2264 ext/zlib/zlib.c     gzfile_write_raw(gz);
gzfile_write_raw 2299 ext/zlib/zlib.c     gzfile_write_raw(gz);
gzfile_write_raw 2828 ext/zlib/zlib.c     gzfile_write_raw(gz);


gzfile_writer_end

gzfile_writer_end  131 ext/zlib/zlib.c static void gzfile_writer_end _((struct gzfile*));
gzfile_writer_end 1785 ext/zlib/zlib.c #define gzfile_writer_new(gz) gzfile_new((gz),&deflate_funcs,gzfile_writer_end)


gzreader_gets

gzreader_gets     179 ext/zlib/zlib.c static VALUE gzreader_gets _((int, VALUE*, VALUE));
gzreader_gets    3272 ext/zlib/zlib.c     dst = gzreader_gets(argc, argv, obj);
gzreader_gets    3306 ext/zlib/zlib.c     while (!NIL_P(str = gzreader_gets(argc, argv, obj))) {
gzreader_gets    3323 ext/zlib/zlib.c     while (!NIL_P(str = gzreader_gets(argc, argv, obj))) {


gzreader_skip_linebreaks

gzreader_skip_linebreaks  178 ext/zlib/zlib.c static void gzreader_skip_linebreaks _((struct gzfile*));
gzreader_skip_linebreaks 3222 ext/zlib/zlib.c 	gzreader_skip_linebreaks(gz);
gzreader_skip_linebreaks 3256 ext/zlib/zlib.c 	gzreader_skip_linebreaks(gz);


h_conv

h_conv            297 ext/nkf/nkf-utf8/nkf.c STATIC  int     h_conv PROTO((FILE *f,int c2,int c1));
h_conv           1968 ext/nkf/nkf-utf8/nkf.c                     if (h_conv(f, c2, c1)==EOF)


handle_rescue

handle_rescue    2367 eval.c         static int handle_rescue(VALUE,NODE*);
handle_rescue    3114 eval.c         		    if (handle_rescue(self, resq)) {


has_drive_letter

has_drive_letter 2297 file.c             if (has_drive_letter(path)) path += 2;
has_drive_letter 2332 file.c             if (has_drive_letter(path))
has_drive_letter 2457 file.c             else if (has_drive_letter(s)) {
has_drive_letter 2472 file.c         		if (has_drive_letter(p) && TOLOWER(p[0]) == TOLOWER(s[0])) {
has_drive_letter 2763 file.c             if (has_drive_letter(name) && isdirsep(*(name + 2))) {
has_drive_letter 2771 file.c             if (has_drive_letter(name) && root == name + 2 && p - name == 2)
has_drive_letter 3986 file.c             if (has_drive_letter(path) && isdirsep(path[2])) return 1;


has_redirection

has_redirection    82 win32/win32.c  static int has_redirection(const char *);
has_redirection   918 win32/win32.c  	if ((shell = getenv("RUBYSHELL")) && (redir = has_redirection(cmd))) {
has_redirection   924 win32/win32.c  		 ((redir < 0 ? has_redirection(cmd) : redir) ||


hash

hash             2484 array.c            VALUE hash = rb_hash_new();
hash             2488 array.c        	rb_hash_aset(hash, RARRAY(ary1)->ptr[i], Qtrue);
hash             2492 array.c        	    rb_hash_aset(hash, RARRAY(ary2)->ptr[i], Qtrue);
hash             2495 array.c            return hash;
hash             2514 array.c            volatile VALUE hash;
hash             2517 array.c            hash = ary_make_hash(to_ary(ary2), 0);
hash             2521 array.c        	if (st_lookup(RHASH(hash)->tbl, RARRAY(ary1)->ptr[i], 0)) continue;
hash             2541 array.c            VALUE hash, ary3, v, vv;
hash             2547 array.c            hash = ary_make_hash(ary2, 0);
hash             2551 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
hash             2573 array.c            VALUE hash, ary3;
hash             2579 array.c            hash = ary_make_hash(ary1, ary2);
hash             2583 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
hash             2589 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
hash             2613 array.c            VALUE hash, v, vv;
hash             2616 array.c            hash = ary_make_hash(ary, 0);
hash             2618 array.c            if (RARRAY(ary)->len == RHASH(hash)->tbl->num_entries) {
hash             2623 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
hash             3601 eval.c         	    VALUE hash = rb_hash_new();
hash             3612 eval.c         		rb_hash_aset(hash, key, val);
hash             3614 eval.c         	    result = hash;
hash             8428 eval.c             long hash;
hash             8431 eval.c             hash = (long)data->body;
hash             8432 eval.c             hash ^= (long)data->var;
hash             8433 eval.c             hash ^= data->frame.uniq << 16;
hash             8434 eval.c             hash ^= data->flags;
hash             8436 eval.c             return INT2FIX(hash);
hash             8740 eval.c             long hash;
hash             8743 eval.c             hash = (long)m->klass;
hash             8744 eval.c             hash ^= (long)m->rklass;
hash             8745 eval.c             hash ^= (long)m->recv;
hash             8746 eval.c             hash ^= (long)m->body;
hash             8748 eval.c             return INT2FIX(hash);
hash             13023 eval.c             VALUE hash = rb_thread_local_aref(rb_thread_current(), recursive_key);
hash             13025 eval.c             if (NIL_P(hash) || TYPE(hash) != T_HASH) {
hash             13029 eval.c         	VALUE list = rb_hash_aref(hash, ID2SYM(ruby_frame->this_func));
hash             13039 eval.c             VALUE hash = rb_thread_local_aref(rb_thread_current(), recursive_key);
hash             13043 eval.c             if (NIL_P(hash) || TYPE(hash) != T_HASH) {
hash             13044 eval.c         	hash = rb_hash_new();
hash             13045 eval.c         	rb_thread_local_aset(rb_thread_current(), recursive_key, hash);
hash             13049 eval.c         	list = rb_hash_aref(hash, sym);
hash             13053 eval.c         	rb_hash_aset(hash, sym, list);
hash             13061 eval.c             VALUE hash = rb_thread_local_aref(rb_thread_current(), recursive_key);
hash             13065 eval.c             if (NIL_P(hash) || TYPE(hash) != T_HASH) {
hash             13071 eval.c             list = rb_hash_aref(hash, sym);
hash              159 ext/bigdecimal/bigdecimal.c     U_LONG hash,i;
hash              162 ext/bigdecimal/bigdecimal.c     hash = (U_LONG)p->sign;
hash              164 ext/bigdecimal/bigdecimal.c     if(hash==2) {
hash              166 ext/bigdecimal/bigdecimal.c             hash = 31 * hash + p->frac[i];
hash              167 ext/bigdecimal/bigdecimal.c             hash ^= p->frac[i];
hash              169 ext/bigdecimal/bigdecimal.c         hash += p->exponent;
hash              171 ext/bigdecimal/bigdecimal.c     return INT2FIX(hash);
hash              417 ext/dbm/dbm.c      VALUE hash = rb_hash_new();
hash              424 ext/dbm/dbm.c  	rb_hash_aset(hash, valstr, keystr);
hash              426 ext/dbm/dbm.c      return hash;
hash              704 ext/dbm/dbm.c      VALUE hash;
hash              707 ext/dbm/dbm.c      hash = rb_hash_new();
hash              710 ext/dbm/dbm.c  	rb_hash_aset(hash, rb_tainted_str_new(key.dptr, key.dsize),
hash              714 ext/dbm/dbm.c      return hash;
hash              519 ext/gdbm/gdbm.c     VALUE hash = rb_hash_new();
hash              526 ext/gdbm/gdbm.c 	rb_hash_aset(hash, valstr, keystr);
hash              528 ext/gdbm/gdbm.c     return hash;
hash              893 ext/gdbm/gdbm.c     VALUE keystr, hash;
hash              896 ext/gdbm/gdbm.c     hash = rb_hash_new();
hash              900 ext/gdbm/gdbm.c         rb_hash_aset(hash, keystr, rb_gdbm_fetch2(dbm, keystr));
hash              903 ext/gdbm/gdbm.c     return hash;
hash              249 ext/openssl/ossl_config.c     rb_iterate(rb_each, hash, set_conf_section_i, (VALUE)arg);
hash              250 ext/openssl/ossl_config.c     return hash;
hash              264 ext/openssl/ossl_config.c     VALUE hash;
hash              266 ext/openssl/ossl_config.c     hash = rb_hash_new();
hash              271 ext/openssl/ossl_config.c 	return hash;
hash              275 ext/openssl/ossl_config.c 	return hash;
hash              279 ext/openssl/ossl_config.c 	rb_hash_aset(hash, rb_str_new2(entry->name), rb_str_new2(entry->value));
hash              282 ext/openssl/ossl_config.c     return hash;
hash              233 ext/openssl/ossl_pkey_dh.c     VALUE hash;
hash              237 ext/openssl/ossl_pkey_dh.c     hash = rb_hash_new();
hash              239 ext/openssl/ossl_pkey_dh.c     rb_hash_aset(hash, rb_str_new2("p"), ossl_bn_new(pkey->pkey.dh->p));
hash              240 ext/openssl/ossl_pkey_dh.c     rb_hash_aset(hash, rb_str_new2("g"), ossl_bn_new(pkey->pkey.dh->g));
hash              241 ext/openssl/ossl_pkey_dh.c     rb_hash_aset(hash, rb_str_new2("pub_key"), ossl_bn_new(pkey->pkey.dh->pub_key));
hash              242 ext/openssl/ossl_pkey_dh.c     rb_hash_aset(hash, rb_str_new2("priv_key"), ossl_bn_new(pkey->pkey.dh->priv_key));
hash              244 ext/openssl/ossl_pkey_dh.c     return hash;
hash              261 ext/openssl/ossl_pkey_dsa.c     VALUE hash;
hash              265 ext/openssl/ossl_pkey_dsa.c     hash = rb_hash_new();
hash              267 ext/openssl/ossl_pkey_dsa.c     rb_hash_aset(hash, rb_str_new2("p"), ossl_bn_new(pkey->pkey.dsa->p));
hash              268 ext/openssl/ossl_pkey_dsa.c     rb_hash_aset(hash, rb_str_new2("q"), ossl_bn_new(pkey->pkey.dsa->q));
hash              269 ext/openssl/ossl_pkey_dsa.c     rb_hash_aset(hash, rb_str_new2("g"), ossl_bn_new(pkey->pkey.dsa->g));
hash              270 ext/openssl/ossl_pkey_dsa.c     rb_hash_aset(hash, rb_str_new2("pub_key"), ossl_bn_new(pkey->pkey.dsa->pub_key));
hash              271 ext/openssl/ossl_pkey_dsa.c     rb_hash_aset(hash, rb_str_new2("priv_key"), ossl_bn_new(pkey->pkey.dsa->priv_key));
hash              273 ext/openssl/ossl_pkey_dsa.c     return hash;
hash              352 ext/openssl/ossl_pkey_rsa.c     VALUE hash;
hash              356 ext/openssl/ossl_pkey_rsa.c     hash = rb_hash_new();
hash              358 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("n"), ossl_bn_new(pkey->pkey.rsa->n));
hash              359 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("e"), ossl_bn_new(pkey->pkey.rsa->e));
hash              360 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("d"), ossl_bn_new(pkey->pkey.rsa->d));
hash              361 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("p"), ossl_bn_new(pkey->pkey.rsa->p));
hash              362 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("q"), ossl_bn_new(pkey->pkey.rsa->q));
hash              363 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("dmp1"), ossl_bn_new(pkey->pkey.rsa->dmp1));
hash              364 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("dmq1"), ossl_bn_new(pkey->pkey.rsa->dmq1));
hash              365 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("iqmp"), ossl_bn_new(pkey->pkey.rsa->iqmp));
hash              367 ext/openssl/ossl_pkey_rsa.c     return hash;
hash              273 ext/openssl/ossl_x509name.c     unsigned long hash;
hash              277 ext/openssl/ossl_x509name.c     hash = X509_NAME_hash(name);
hash              279 ext/openssl/ossl_x509name.c     return ULONG2NUM(hash);
hash              308 ext/openssl/ossl_x509name.c     VALUE utf8str, ptrstr, ia5str, hash;
hash              329 ext/openssl/ossl_x509name.c     hash = rb_hash_new();
hash              330 ext/openssl/ossl_x509name.c     RHASH(hash)->ifnone = utf8str;
hash              331 ext/openssl/ossl_x509name.c     rb_hash_aset(hash, rb_str_new2("C"), ptrstr);
hash              332 ext/openssl/ossl_x509name.c     rb_hash_aset(hash, rb_str_new2("countryName"), ptrstr);
hash              333 ext/openssl/ossl_x509name.c     rb_hash_aset(hash, rb_str_new2("serialNumber"), ptrstr);
hash              334 ext/openssl/ossl_x509name.c     rb_hash_aset(hash, rb_str_new2("dnQualifier"), ptrstr);
hash              335 ext/openssl/ossl_x509name.c     rb_hash_aset(hash, rb_str_new2("DC"), ia5str);
hash              336 ext/openssl/ossl_x509name.c     rb_hash_aset(hash, rb_str_new2("domainComponent"), ia5str);
hash              337 ext/openssl/ossl_x509name.c     rb_hash_aset(hash, rb_str_new2("emailAddress"), ia5str);
hash              338 ext/openssl/ossl_x509name.c     rb_define_const(cX509Name, "OBJECT_TYPE_TEMPLATE", hash);
hash              298 ext/sdbm/_sdbm.c 	register long hash;
hash              312 ext/sdbm/_sdbm.c 	if (getpage(db, (hash = exhash(key)))) {
hash              327 ext/sdbm/_sdbm.c 			if (!makroom(db, hash, need))
hash              376 ext/sdbm/_sdbm.c 		newp = (hash & db->hmask) | (db->hmask + 1);
hash              404 ext/sdbm/_sdbm.c 		if (hash & (db->hmask + 1)) {
hash              429 ext/sdbm/_sdbm.c 			((hash & (db->hmask + 1)) ? 2 : 1);
hash              496 ext/sdbm/_sdbm.c 		dbit = 2 * dbit + ((hash & ((long) 1 << hbit++)) ? 2 : 1);
hash              503 ext/sdbm/_sdbm.c 	pagb = hash & db->hmask;
hash              395 ext/sdbm/init.c     VALUE hash = rb_hash_new();
hash              402 ext/sdbm/init.c 	rb_hash_aset(hash, valstr, keystr);
hash              404 ext/sdbm/init.c     return hash;
hash              685 ext/sdbm/init.c     VALUE hash;
hash              688 ext/sdbm/init.c     hash = rb_hash_new();
hash              691 ext/sdbm/init.c 	rb_hash_aset(hash, rb_tainted_str_new(key.dptr, key.dsize),
hash              695 ext/sdbm/init.c     return hash;
hash               31 ext/syck/rubyext.c     struct RHash   hash;
hash               40 ext/syck/rubyext.c    long hash;
hash               32 ext/syck/yaml2byte.c    long hash;
hash               42 ext/syck/yaml2byte.c     ret->hash   = HASH;
hash               56 ext/syck/yaml2byte.c     assert(str && HASH == str->hash);
hash               89 ext/syck/yaml2byte.c     assert(str && HASH == str->hash);
hash               90 ext/syck/yaml2byte.c     assert(ext && HASH == ext->hash);
hash              210 ext/tk/tkutil/tkutil.c     rb_hash_aset(hash, rb_funcall(key, ID_to_s, 0, 0), value);
hash              626 ext/tk/tkutil/tkutil.c     volatile VALUE dst = rb_ary_new2(2 * RHASH(hash)->tbl->num_entries);
hash              633 ext/tk/tkutil/tkutil.c     st_foreach(RHASH(hash)->tbl, push_kv, args);
hash              677 ext/tk/tkutil/tkutil.c     volatile VALUE dst = rb_ary_new2(2 * RHASH(hash)->tbl->num_entries);
hash              684 ext/tk/tkutil/tkutil.c     st_foreach(RHASH(hash)->tbl, push_kv_enc, args);
hash              698 ext/tk/tkutil/tkutil.c     return ary2list2(hash2kv(hash, Qnil, self), Qfalse, self);
hash              707 ext/tk/tkutil/tkutil.c     return ary2list2(hash2kv_enc(hash, Qnil, self), Qfalse, self);
hash              716 ext/tk/tkutil/tkutil.c     volatile VALUE hash, enc_flag, ary;
hash              726 ext/tk/tkutil/tkutil.c         hash = argv[0];
hash              734 ext/tk/tkutil/tkutil.c     switch(TYPE(hash)) {
hash              737 ext/tk/tkutil/tkutil.c             return assoc2kv_enc(hash, ary, self);
hash              739 ext/tk/tkutil/tkutil.c             return assoc2kv(hash, ary, self);
hash              744 ext/tk/tkutil/tkutil.c             return hash2kv_enc(hash, ary, self);
hash              746 ext/tk/tkutil/tkutil.c             return hash2kv(hash, ary, self);
hash              757 ext/tk/tkutil/tkutil.c         if (hash == TK_None) {
hash              297 gc.c           	struct RHash   hash;
hash              901 gc.c           	mark_hash(obj->as.hash.tbl, lev);
hash              902 gc.c           	ptr = obj->as.hash.ifnone;
hash             1136 gc.c           	if (RANY(obj)->as.hash.tbl) {
hash             1137 gc.c           	    st_free_table(RANY(obj)->as.hash.tbl);
hash               30 hash.c             return rb_obj_freeze(hash);
hash              135 hash.c             VALUE hash;
hash              146 hash.c             tbl = RHASH(arg->hash)->tbl;
hash              149 hash.c             if (RHASH(arg->hash)->tbl != tbl) {
hash              155 hash.c         	FL_SET(arg->hash, HASH_DELETED);
hash              167 hash.c             RHASH(hash)->iter_lev--;
hash              169 hash.c             if (RHASH(hash)->iter_lev == 0) {
hash              170 hash.c         	if (FL_TEST(hash, HASH_DELETED)) {
hash              171 hash.c         	    st_cleanup_safe(RHASH(hash)->tbl, Qundef);
hash              172 hash.c         	    FL_UNSET(hash, HASH_DELETED);
hash              181 hash.c             if (st_foreach(RHASH(arg->hash)->tbl, hash_foreach_iter, (st_data_t)arg)) {
hash              192 hash.c             RHASH(hash)->iter_lev++;
hash              193 hash.c             arg.hash = hash;
hash              196 hash.c             rb_ensure(hash_foreach_call, (VALUE)&arg, hash_foreach_ensure, hash);
hash              204 hash.c             NEWOBJ(hash, struct RHash);
hash              205 hash.c             OBJSETUP(hash, klass, T_HASH);
hash              207 hash.c             hash->ifnone = Qnil;
hash              208 hash.c             hash->tbl = st_init_table(&objhash);
hash              210 hash.c             return (VALUE)hash;
hash              222 hash.c             if (!RHASH(hash)->tbl) rb_raise(rb_eTypeError, "uninitialized Hash");
hash              223 hash.c             if (OBJ_FROZEN(hash)) rb_error_frozen("hash");
hash              224 hash.c             if (!OBJ_TAINTED(hash) && rb_safe_level() >= 4)
hash              268 hash.c             rb_hash_modify(hash);
hash              273 hash.c         	RHASH(hash)->ifnone = rb_block_proc();
hash              274 hash.c         	FL_SET(hash, HASH_PROC_DEFAULT);
hash              278 hash.c         	RHASH(hash)->ifnone = ifnone;
hash              281 hash.c             return hash;
hash              300 hash.c             VALUE hash;
hash              304 hash.c         	hash = hash_alloc(klass);
hash              306 hash.c         	RHASH(hash)->ifnone = Qnil;
hash              307 hash.c         	RHASH(hash)->tbl = st_copy(RHASH(argv[0])->tbl);
hash              309 hash.c         	return hash;
hash              316 hash.c             hash = hash_alloc(klass);
hash              318 hash.c                 rb_hash_aset(hash, argv[i], argv[i + 1]);
hash              321 hash.c             return hash;
hash              327 hash.c             return rb_convert_type(hash, T_HASH, "Hash", "to_hash");
hash              362 hash.c             if (RHASH(hash)->iter_lev > 0) {
hash              365 hash.c             rb_hash_modify(hash);
hash              366 hash.c             tbl = st_init_table_with_size(&objhash, RHASH(hash)->tbl->num_entries);
hash              367 hash.c             rb_hash_foreach(hash, rb_hash_rehash_i, (st_data_t)tbl);
hash              368 hash.c             st_free_table(RHASH(hash)->tbl);
hash              369 hash.c             RHASH(hash)->tbl = tbl;
hash              371 hash.c             return hash;
hash              393 hash.c             if (!st_lookup(RHASH(hash)->tbl, key, &val)) {
hash              394 hash.c         	return rb_funcall(hash, id_default, 1, key);
hash              441 hash.c             if (!st_lookup(RHASH(hash)->tbl, key, &val)) {
hash              478 hash.c             if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
hash              479 hash.c         	return rb_funcall(RHASH(hash)->ifnone, id_call, 2, hash, key);
hash              481 hash.c             return RHASH(hash)->ifnone;
hash              507 hash.c             rb_hash_modify(hash);
hash              508 hash.c             RHASH(hash)->ifnone = ifnone;
hash              509 hash.c             FL_UNSET(hash, HASH_PROC_DEFAULT);
hash              531 hash.c             if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
hash              532 hash.c         	return RHASH(hash)->ifnone;
hash              567 hash.c             rb_hash_foreach(hash, key_i, (st_data_t)args);
hash              577 hash.c             return rb_hash_key(hash, value);
hash              603 hash.c             rb_hash_modify(hash);
hash              604 hash.c             if (RHASH(hash)->iter_lev > 0) {
hash              605 hash.c         	if (st_delete_safe(RHASH(hash)->tbl, (st_data_t*)&key, &val, Qundef)) {
hash              606 hash.c         	    FL_SET(hash, HASH_DELETED);
hash              610 hash.c             else if (st_delete(RHASH(hash)->tbl, (st_data_t*)&key, &val))
hash              653 hash.c             rb_hash_modify(hash);
hash              655 hash.c             rb_hash_foreach(hash, shift_i, (st_data_t)&var);
hash              660 hash.c             else if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
hash              661 hash.c         	return rb_funcall(RHASH(hash)->ifnone, id_call, 2, hash, Qnil);
hash              664 hash.c         	return RHASH(hash)->ifnone;
hash              673 hash.c         	rb_hash_delete(hash, key);
hash              693 hash.c             rb_hash_modify(hash);
hash              694 hash.c             rb_hash_foreach(hash, delete_if_i, hash);
hash              695 hash.c             return hash;
hash              709 hash.c             int n = RHASH(hash)->tbl->num_entries;
hash              710 hash.c             rb_hash_delete_if(hash);
hash              711 hash.c             if (n == RHASH(hash)->tbl->num_entries) return Qnil;
hash              712 hash.c             return hash;
hash              728 hash.c             return rb_hash_delete_if(rb_obj_dup(hash));
hash              758 hash.c         	rb_ary_push(result, rb_hash_aref(hash, argv[i]));
hash              781 hash.c             RETURN_ENUMERATOR(hash, 0, 0);
hash              783 hash.c             rb_hash_foreach(hash, select_i, result);
hash              807 hash.c             rb_hash_modify(hash);
hash              808 hash.c             if (RHASH(hash)->tbl->num_entries > 0) {
hash              809 hash.c         	rb_hash_foreach(hash, clear_i, 0);
hash              812 hash.c             return hash;
hash              836 hash.c             rb_hash_modify(hash);
hash              837 hash.c             if (TYPE(key) != T_STRING || st_lookup(RHASH(hash)->tbl, key, 0)) {
hash              838 hash.c         	st_insert(RHASH(hash)->tbl, key, val);
hash              841 hash.c         	st_add_direct(RHASH(hash)->tbl, rb_str_new4(key), val);
hash              850 hash.c         	rb_hash_aset(hash, key, val);
hash              872 hash.c             if (hash == hash2) return hash;
hash              873 hash.c             rb_hash_clear(hash);
hash              874 hash.c             rb_hash_foreach(hash2, replace_i, hash);
hash              875 hash.c             RHASH(hash)->ifnone = RHASH(hash2)->ifnone;
hash              877 hash.c         	FL_SET(hash, HASH_PROC_DEFAULT);
hash              880 hash.c         	FL_UNSET(hash, HASH_PROC_DEFAULT);
hash              883 hash.c             return hash;
hash              902 hash.c             return INT2FIX(RHASH(hash)->tbl->num_entries);
hash              919 hash.c             if (RHASH(hash)->tbl->num_entries == 0)
hash              951 hash.c             RETURN_ENUMERATOR(hash, 0, 0);
hash              952 hash.c             rb_hash_foreach(hash, each_value_i, 0);
hash              953 hash.c             return hash;
hash              982 hash.c             RETURN_ENUMERATOR(hash, 0, 0);
hash              983 hash.c             rb_hash_foreach(hash, each_key_i, 0);
hash              984 hash.c             return hash;
hash             1015 hash.c             RETURN_ENUMERATOR(hash, 0, 0);
hash             1016 hash.c             rb_hash_foreach(hash, each_pair_i, 0);
hash             1017 hash.c             return hash;
hash             1051 hash.c             RETURN_ENUMERATOR(hash, 0, 0);
hash             1052 hash.c             rb_hash_foreach(hash, each_i, 0);
hash             1053 hash.c             return hash;
hash             1081 hash.c             rb_hash_foreach(hash, to_a_i, ary);
hash             1082 hash.c             if (OBJ_TAINTED(hash)) OBJ_TAINT(ary);
hash             1105 hash.c             VALUE entries = rb_hash_to_a(hash);
hash             1137 hash.c             rb_hash_foreach(hash, inspect_i, str);
hash             1139 hash.c             OBJ_INFECT(str, hash);
hash             1154 hash.c             if (RHASH(hash)->tbl == 0 || RHASH(hash)->tbl->num_entries == 0)
hash             1156 hash.c             return rb_exec_recursive(inspect_hash, hash, 0);
hash             1163 hash.c             return rb_ary_to_s(rb_hash_to_a(hash));
hash             1182 hash.c             return rb_exec_recursive(to_s_hash, hash, 0);
hash             1195 hash.c             return hash;
hash             1224 hash.c             rb_hash_foreach(hash, keys_i, ary);
hash             1255 hash.c             rb_hash_foreach(hash, values_i, ary);
hash             1278 hash.c             if (st_lookup(RHASH(hash)->tbl, key, 0)) {
hash             1315 hash.c             rb_hash_foreach(hash, rb_hash_search_value, (st_data_t)data);
hash             1397 hash.c             rb_hash_aset(hash, value, key);
hash             1418 hash.c             rb_hash_foreach(hash, rb_hash_invert_i, h);
hash             1426 hash.c             rb_hash_aset(hash, key, value);
hash             1434 hash.c             if (rb_hash_has_key(hash, key)) {
hash             1435 hash.c         	value = rb_yield_values(3, key, rb_hash_aref(hash, key), value);
hash             1437 hash.c             rb_hash_aset(hash, key, value);
hash             2160 hash.c             VALUE hash;
hash             2163 hash.c             hash = rb_hash_new();
hash             2168 hash.c         	    rb_hash_aset(hash, env_str_new(*env, s-*env),
hash             2174 hash.c             return hash;
hash             2229 hash.c             if (env == hash) return env;
hash             2230 hash.c             hash = to_hash(hash);
hash             2231 hash.c             rb_hash_foreach(hash, env_replace_i, keys);
hash             2255 hash.c             if (env == hash) return env;
hash             2256 hash.c             hash = to_hash(hash);
hash             2257 hash.c             rb_hash_foreach(hash, env_update_i, 0);
hash              128 lex.c                register int key = hash (str, len);
hash              834 numeric.c          int i, hash;
hash              839 numeric.c          for (hash=0, i=0; i<sizeof(double);i++) {
hash              840 numeric.c      	hash += c[i] * 971;
hash              842 numeric.c          if (hash < 0) hash = -hash;
hash              843 numeric.c          return INT2FIX(hash);
hash             4560 parse.y        	VALUE hash, fname;
hash             4562 parse.y        	hash = rb_const_get(rb_cObject, rb_intern("SCRIPT_LINES__"));
hash             4563 parse.y        	if (TYPE(hash) == T_HASH) {
hash             4565 parse.y        	    ruby_debug_lines = rb_hash_aref(hash, fname);
hash             4568 parse.y        		rb_hash_aset(hash, fname, ruby_debug_lines);
hash              199 range.c            long hash = EXCL(range);
hash              203 range.c            hash ^= v << 1;
hash              205 range.c            hash ^= v << 9;
hash              206 range.c            hash ^= EXCL(range) << 24;
hash              208 range.c            return LONG2FIX(hash);
hash               21 st.c               unsigned int hash;
hash               61 st.c           #define do_hash(key,table) (unsigned int)(*(table)->type->hash)((key))
hash              214 st.c           ((ptr) != 0 && (ptr->hash != (hash_val) || !EQUAL((table), (key), (ptr)->key)))
hash              262 st.c               entry->hash = hash_val;\
hash              313 st.c           	    hash_val = ptr->hash % new_num_bins;
hash               16 st.h               int (*hash)();
hash              983 time.c             long hash;
hash              986 time.c             hash = tobj->tv.tv_sec ^ tobj->tv.tv_usec;
hash              987 time.c             return LONG2FIX(hash);


hash2kv

hash2kv           232 ext/tk/tkutil/tkutil.c static VALUE hash2kv _((VALUE, VALUE, VALUE));
hash2kv           303 ext/tk/tkutil/tkutil.c                 val = hash2kv(val, Qnil, self);
hash2kv           698 ext/tk/tkutil/tkutil.c     return ary2list2(hash2kv(hash, Qnil, self), Qfalse, self);
hash2kv           746 ext/tk/tkutil/tkutil.c             return hash2kv(hash, ary, self);
hash2kv           924 ext/tk/tkutil/tkutil.c                 hash2kv(argv[idx], dst, self);


hash2kv_enc

hash2kv_enc       233 ext/tk/tkutil/tkutil.c static VALUE hash2kv_enc _((VALUE, VALUE, VALUE));
hash2kv_enc       301 ext/tk/tkutil/tkutil.c                 val = hash2kv_enc(val, Qnil, self);
hash2kv_enc       707 ext/tk/tkutil/tkutil.c     return ary2list2(hash2kv_enc(hash, Qnil, self), Qfalse, self);
hash2kv_enc       744 ext/tk/tkutil/tkutil.c             return hash2kv_enc(hash, ary, self);
hash2kv_enc       922 ext/tk/tkutil/tkutil.c                 hash2kv_enc(argv[idx], dst, self);


hash2list

hash2list         230 ext/tk/tkutil/tkutil.c static VALUE hash2list _((VALUE, VALUE));
hash2list         318 ext/tk/tkutil/tkutil.c                         str_val = hash2list(val2, self);
hash2list         430 ext/tk/tkutil/tkutil.c                 str_val = hash2list(val, self);
hash2list         807 ext/tk/tkutil/tkutil.c             return hash2list(obj, self);


hash2list_enc

hash2list_enc     231 ext/tk/tkutil/tkutil.c static VALUE hash2list_enc _((VALUE, VALUE));
hash2list_enc     316 ext/tk/tkutil/tkutil.c                         str_val = hash2list_enc(val2, self);
hash2list_enc     432 ext/tk/tkutil/tkutil.c                 str_val = hash2list_enc(val, self);
hash2list_enc     805 ext/tk/tkutil/tkutil.c             return hash2list_enc(obj, self);


hash_alloc

hash_alloc        199 hash.c         static VALUE hash_alloc(VALUE);
hash_alloc        216 hash.c             return hash_alloc(rb_cHash);
hash_alloc        304 hash.c         	hash = hash_alloc(klass);
hash_alloc        316 hash.c             hash = hash_alloc(klass);
hash_alloc       2285 hash.c             rb_define_alloc_func(rb_cHash, hash_alloc);


header

header            373 ext/syck/emitter.c             char *header = S_ALLOC_N( char, 64 );
header            374 ext/syck/emitter.c             S_MEMZERO( header, char, 64 );
header            375 ext/syck/emitter.c             sprintf( header, "--- %%YAML:%d.%d ", SYCK_YAML_MAJOR, SYCK_YAML_MINOR );
header            376 ext/syck/emitter.c             syck_emitter_write( e, header, strlen( header ) );
header            377 ext/syck/emitter.c             S_FREE( header );
header            140 missing/alloca.c static header *last_alloca_header = NULL; /* -> last alloca header */
header            157 missing/alloca.c     register header	*hp;	/* traverses linked list */
header            163 missing/alloca.c 	  register header	*np = hp->h.next;
header            181 missing/alloca.c     register pointer	new = xmalloc (sizeof (header) + size);
header            184 missing/alloca.c     ((header *)new)->h.next = last_alloca_header;
header            185 missing/alloca.c     ((header *)new)->h.deep = depth;
header            187 missing/alloca.c     last_alloca_header = (header *)new;
header            191 missing/alloca.c     return (pointer)((char *)new + sizeof(header));


heredoc_end

heredoc_end      4732 parse.y        	    if (heredoc_end > 0) {
heredoc_end      4733 parse.y        		ruby_sourceline = heredoc_end;
heredoc_end      4734 parse.y        		heredoc_end = 0;
heredoc_end      5294 parse.y            heredoc_end = ruby_sourceline;


heredoc_restore

heredoc_restore  5334 parse.y        	heredoc_restore(lex_strterm);
heredoc_restore  5339 parse.y        	heredoc_restore(lex_strterm);
heredoc_restore  5395 parse.y            heredoc_restore(lex_strterm);


hex

hex                44 ext/digest/rmd160/rmd160hl.c     static const char hex[]="0123456789abcdef";
hex                54 ext/digest/rmd160/rmd160hl.c 	p[i + i] = hex[(uint32_t)digest[i] >> 4];
hex                55 ext/digest/rmd160/rmd160hl.c 	p[i + i + 1] = hex[digest[i] & 0x0f];
hex                18 ext/digest/rmd160/rmd160ossl.c     static const char hex[]="0123456789abcdef";
hex                28 ext/digest/rmd160/rmd160ossl.c 	p[i + i] = hex[(uint32_t)digest[i] >> 4];
hex                29 ext/digest/rmd160/rmd160ossl.c 	p[i + i + 1] = hex[digest[i] & 0x0f];
hex                45 ext/digest/sha1/sha1hl.c     static const char hex[]="0123456789abcdef";
hex                55 ext/digest/sha1/sha1hl.c 	p[i + i] = hex[((uint32_t)digest[i]) >> 4];
hex                56 ext/digest/sha1/sha1hl.c 	p[i + i + 1] = hex[digest[i] & 0x0f];
hex                18 ext/digest/sha1/sha1ossl.c     static const char hex[]="0123456789abcdef";
hex                28 ext/digest/sha1/sha1ossl.c 	p[i + i] = hex[((uint32_t)digest[i]) >> 4];
hex                29 ext/digest/sha1/sha1ossl.c 	p[i + i + 1] = hex[digest[i] & 0x0f];
hex              4137 ext/nkf/nkf-utf8/nkf.c         return ((hex(c2)<<4) + hex(c3));
hex                20 ext/openssl/ossl.c     static const char hex[]="0123456789abcdef";
hex                36 ext/openssl/ossl.c 	(*hexbuf)[2 * i] = hex[((unsigned char)buf[i]) >> 4];
hex                37 ext/openssl/ossl.c 	(*hexbuf)[2 * i + 1] = hex[buf[i] & 0x0f];
hex               843 missing/vsnprintf.c 			goto hex;
hex               846 missing/vsnprintf.c hex:


hex2bin

hex2bin          3863 ext/nkf/nkf-utf8/nkf.c     return (hex2bin(c2) << 4) | hex2bin(c3);
hex2bin          3924 ext/nkf/nkf-utf8/nkf.c                     c |= hex2bin(buf[i]);
hex2bin          3938 ext/nkf/nkf-utf8/nkf.c                     c += hex2bin(buf[i]);


hex2num

hex2num          1824 pack.c         			    if ((c1 = hex2num(*s)) == -1) break;
hex2num          1826 pack.c         			    if ((c2 = hex2num(*s)) == -1) break;


hex_getc

hex_getc         3870 ext/nkf/nkf-utf8/nkf.c     return hex_getc(':', f, i_cgetc, i_cungetc);
hex_getc         3885 ext/nkf/nkf-utf8/nkf.c     return hex_getc('%', f, i_ugetc, i_uungetc);


hira_conv

hira_conv         323 ext/nkf/nkf-utf8/nkf.c STATIC  void    hira_conv PROTO((int c2,int c1));
hira_conv        1868 ext/nkf/nkf-utf8/nkf.c 	o_hira_conv = oconv; oconv = hira_conv;


hist_length

hist_length       811 ext/readline/readline.c     rb_define_singleton_method(history,"length", hist_length, 0);
hist_length       812 ext/readline/readline.c     rb_define_singleton_method(history,"size", hist_length, 0);


history_node_new

history_node_new  126 regexec.c        clone = history_node_new();
history_node_new  963 regexec.c              child = history_node_new();
history_node_new 1324 regexec.c                      region->history_root = node = history_node_new();


history_root_free

history_root_free  159 regexec.c        history_root_free(region);
history_root_free  249 regexec.c          history_root_free(r);
history_root_free  283 regexec.c        history_root_free(to);


history_tree_add_child

history_tree_add_child  137 regexec.c          history_tree_add_child(clone, child);
history_tree_add_child  967 regexec.c              r = history_tree_add_child(node, child);


history_tree_clear

history_tree_clear   59 regexec.c        history_tree_clear(node);
history_tree_clear 1329 regexec.c                      history_tree_clear(node);


history_tree_clone

history_tree_clone  132 regexec.c          child = history_tree_clone(node->childs[i]);
history_tree_clone  286 regexec.c          to->history_root = history_tree_clone(from->history_root);


history_tree_free

history_tree_free   33 regexec.c      static void history_tree_free(OnigCaptureTreeNode* node);
history_tree_free   43 regexec.c              history_tree_free(node->childs[i]);
history_tree_free   67 regexec.c          history_tree_free(r->history_root);
history_tree_free  134 regexec.c            history_tree_free(clone);


hmac_final

hmac_final        128 ext/openssl/ossl_hmac.c     hmac_final(ctx, &buf, &buf_len);
hmac_final        143 ext/openssl/ossl_hmac.c     hmac_final(ctx, &buf, &buf_len);


host_str

host_str          803 ext/socket/socket.c     hostp = host_str(host, hbuf, sizeof(hbuf));
host_str         1316 ext/socket/socket.c 	hostp = host_str(host, hbuf, sizeof(hbuf));


htond

htond             310 pack.c         			 y = htond((DOUBLE_SWAPPER)y),	\
htond             327 pack.c         #define HTOND(x,y)	htond(x)


htonf

htonf             284 pack.c         			 y = htonf((FLOAT_SWAPPER)y),	\
htonf             301 pack.c         #define HTONF(x,y)	htonf(x)


htonl

htonl             257 ext/socket/getaddrinfo.c 	    in.s_addr = htonl(
htonl             735 ext/socket/socket.c 	make_inetaddr(htonl(i), hbuf, len);
htonl              35 pack.c         # define NATINT_HTONL(x) (natint?htonl(x):hton32(x))
htonl              41 pack.c         # define NATINT_HTONL(x) htonl(x)
htonl            2652 win32/win32.c  	sock_in4.sin_addr.s_addr = htonl(INADDR_LOOPBACK);


htons

htons             383 ext/socket/getaddrinfo.c 			port = htons((unsigned short)atoi(servname));
htons              34 pack.c         # define NATINT_HTONS(x) (natint?htons(x):hton16(x))
htons              40 pack.c         # define NATINT_HTONS(x) htons(x)


htovd

htovd             314 pack.c         			 y = htovd((DOUBLE_SWAPPER)y),	\
htovd             328 pack.c         #define HTOVD(x,y)	htovd(x)


htovf

htovf             288 pack.c         			 y = htovf((FLOAT_SWAPPER)y),	\
htovf             302 pack.c         #define HTOVF(x,y)	htovf(x)


htovl

htovl              33 pack.c         # define NATINT_HTOVL(x) (natint?htovl(x):htov32(x))
htovl              39 pack.c         # define NATINT_HTOVL(x) htovl(x)


htovs

htovs              32 pack.c         # define NATINT_HTOVS(x) (natint?htovs(x):htov16(x))
htovs              38 pack.c         # define NATINT_HTOVS(x) htovs(x)


hypot

hypot             417 math.c             return rb_float_new(hypot(RFLOAT(x)->value, RFLOAT(y)->value));
hypot              57 missing.h      extern double hypot(double, double);


iconv_conv

iconv_conv        121 ext/iconv/iconv.c static VALUE iconv_conv _((int argc, VALUE *argv, VALUE self));
iconv_conv       1057 ext/iconv/iconv.c     rb_define_method(rb_cIconv, "conv", iconv_conv, -1);


iconv_convert

iconv_convert     112 ext/iconv/iconv.c static VALUE iconv_convert _((iconv_t cd, VALUE str, int start, int length, struct iconv_env_t* env));
iconv_convert     599 ext/iconv/iconv.c 	VALUE s = iconv_convert(env->cd, last = *(env->argv), 0, -1, env);
iconv_convert     604 ext/iconv/iconv.c 	VALUE s = iconv_convert(env->cd, Qnil, 0, 0, env);
iconv_convert     745 ext/iconv/iconv.c     return iconv_convert(VALUE2ICONV(cd), Qnil, 0, 0, NULL);
iconv_convert     795 ext/iconv/iconv.c     return iconv_convert(VALUE2ICONV(cd), str,
iconv_convert     815 ext/iconv/iconv.c     str = iconv_convert(cd, Qnil, 0, 0, NULL);
iconv_convert     818 ext/iconv/iconv.c 	    s = iconv_convert(cd, *argv++, 0, -1, NULL);
iconv_convert     824 ext/iconv/iconv.c 	s = iconv_convert(cd, Qnil, 0, 0, NULL);


iconv_create

iconv_create      107 ext/iconv/iconv.c static iconv_t iconv_create _((VALUE to, VALUE from, struct rb_iconv_opt_t *opt));
iconv_create      562 ext/iconv/iconv.c     DATA_PTR(self) = (void *)ICONV2VALUE(iconv_create(to, from, &opt));
iconv_create      582 ext/iconv/iconv.c     cd = ICONV2VALUE(iconv_create(to, from, &opt));
iconv_create      642 ext/iconv/iconv.c     arg.cd = iconv_create(argv[0], argv[1], NULL);
iconv_create      663 ext/iconv/iconv.c     arg.cd = iconv_create(to, from, NULL);


iconv_ctl

iconv_ctl         845 ext/iconv/iconv.c     iconv_ctl(self, ICONV_TRIVIALP, trivial);
iconv_ctl         864 ext/iconv/iconv.c     iconv_ctl(self, ICONV_GET_TRANSLITERATE, trans);
iconv_ctl         883 ext/iconv/iconv.c     iconv_ctl(self, ICONV_SET_TRANSLITERATE, trans);
iconv_ctl         901 ext/iconv/iconv.c     iconv_ctl(self, ICONV_GET_DISCARD_ILSEQ, dis);
iconv_ctl         920 ext/iconv/iconv.c     iconv_ctl(self, ICONV_SET_DISCARD_ILSEQ, dis);


iconv_dfree

iconv_dfree       108 ext/iconv/iconv.c static void iconv_dfree _((void *cd));
iconv_dfree       210 ext/iconv/iconv.c #define ICONV_FREE iconv_dfree


iconv_fail

iconv_fail        102 ext/iconv/iconv.c static VALUE iconv_fail _((VALUE error, VALUE success, VALUE failed, struct iconv_env_t* env, const char *mesg));
iconv_fail        178 ext/iconv/iconv.c 	    iconv_fail(rb_eIconvInvalidEncoding,
iconv_fail        351 ext/iconv/iconv.c 	    rescue = iconv_fail(error, Qnil, Qnil, env, 0);
iconv_fail        435 ext/iconv/iconv.c 	    rescue = iconv_fail(error, ret, str, env, errmsg);


iconv_failure_failed

iconv_failure_failed  105 ext/iconv/iconv.c static VALUE iconv_failure_failed _((VALUE self));
iconv_failure_failed 1067 ext/iconv/iconv.c     rb_define_method(rb_eIconvFailure, "failed", iconv_failure_failed, 0);


iconv_failure_initialize

iconv_failure_initialize  103 ext/iconv/iconv.c static VALUE iconv_failure_initialize _((VALUE error, VALUE mesg, VALUE success, VALUE failed));
iconv_failure_initialize 1065 ext/iconv/iconv.c     rb_define_method(rb_eIconvFailure, "initialize", iconv_failure_initialize, 3);


iconv_failure_success

iconv_failure_success  104 ext/iconv/iconv.c static VALUE iconv_failure_success _((VALUE self));
iconv_failure_success 1066 ext/iconv/iconv.c     rb_define_method(rb_eIconvFailure, "success", iconv_failure_success, 0);


iconv_finish

iconv_finish      119 ext/iconv/iconv.c static VALUE iconv_finish _((VALUE self));
iconv_finish      586 ext/iconv/iconv.c 	return rb_ensure(rb_yield, self, (VALUE(*)())iconv_finish, self);
iconv_finish     1055 ext/iconv/iconv.c     rb_define_method(rb_cIconv, "close", iconv_finish, 0);


iconv_free

iconv_free        109 ext/iconv/iconv.c static VALUE iconv_free _((VALUE cd));
iconv_free        560 ext/iconv/iconv.c     iconv_free(check_iconv(self));
iconv_free        643 ext/iconv/iconv.c     return rb_ensure(iconv_s_convert, (VALUE)&arg, iconv_free, ICONV2VALUE(arg.cd));
iconv_free        664 ext/iconv/iconv.c     return rb_ensure(iconv_s_convert, (VALUE)&arg, iconv_free, ICONV2VALUE(arg.cd));
iconv_free        756 ext/iconv/iconv.c     return rb_ensure(iconv_init_state, cd, iconv_free, cd);


iconv_iconv

iconv_iconv       120 ext/iconv/iconv.c static VALUE iconv_iconv _((int argc, VALUE *argv, VALUE self));
iconv_iconv      1056 ext/iconv/iconv.c     rb_define_method(rb_cIconv, "iconv", iconv_iconv, -1);


iconv_init_state

iconv_init_state  118 ext/iconv/iconv.c static VALUE iconv_init_state _((VALUE cd));
iconv_init_state  756 ext/iconv/iconv.c     return rb_ensure(iconv_init_state, cd, iconv_free, cd);


iconv_initialize

iconv_initialize  114 ext/iconv/iconv.c static VALUE iconv_initialize _((int argc, VALUE *argv, VALUE self));
iconv_initialize 1054 ext/iconv/iconv.c     rb_define_method(rb_cIconv, "initialize", iconv_initialize, -1);


iconv_s_allocate

iconv_s_allocate  113 ext/iconv/iconv.c static VALUE iconv_s_allocate _((VALUE klass));
iconv_s_allocate 1048 ext/iconv/iconv.c     rb_define_alloc_func(rb_cIconv, iconv_s_allocate);


iconv_s_convert

iconv_s_convert   116 ext/iconv/iconv.c static VALUE iconv_s_convert _((struct iconv_env_t* env));
iconv_s_convert   643 ext/iconv/iconv.c     return rb_ensure(iconv_s_convert, (VALUE)&arg, iconv_free, ICONV2VALUE(arg.cd));
iconv_s_convert   664 ext/iconv/iconv.c     return rb_ensure(iconv_s_convert, (VALUE)&arg, iconv_free, ICONV2VALUE(arg.cd));


iconv_s_iconv

iconv_s_iconv     117 ext/iconv/iconv.c static VALUE iconv_s_iconv _((int argc, VALUE *argv, VALUE self));
iconv_s_iconv    1050 ext/iconv/iconv.c     rb_define_singleton_method(rb_cIconv, "iconv", iconv_s_iconv, -1);


iconv_s_open

iconv_s_open      115 ext/iconv/iconv.c static VALUE iconv_s_open _((int argc, VALUE *argv, VALUE self));
iconv_s_open     1049 ext/iconv/iconv.c     rb_define_singleton_method(rb_cIconv, "open", iconv_s_open, -1);


iconv_try

iconv_try         110 ext/iconv/iconv.c static VALUE iconv_try _((iconv_t cd, const char **inptr, size_t *inlen, char **outptr, size_t *outlen));
iconv_try         348 ext/iconv/iconv.c 	error = iconv_try(cd, &inptr, &inlen, &outptr, &outlen);
iconv_try         393 ext/iconv/iconv.c 	error = iconv_try(cd, &inptr, &inlen, &outptr, &outlen);


ifndef_ripper

ifndef_ripper    1598 parse.y        op		: '|'		{ ifndef_ripper($$ = '|'); }
ifndef_ripper    1599 parse.y        		| '^'		{ ifndef_ripper($$ = '^'); }
ifndef_ripper    1600 parse.y        		| '&'		{ ifndef_ripper($$ = '&'); }
ifndef_ripper    1601 parse.y        		| tCMP		{ ifndef_ripper($$ = tCMP); }
ifndef_ripper    1602 parse.y        		| tEQ		{ ifndef_ripper($$ = tEQ); }
ifndef_ripper    1603 parse.y        		| tEQQ		{ ifndef_ripper($$ = tEQQ); }
ifndef_ripper    1604 parse.y        		| tMATCH	{ ifndef_ripper($$ = tMATCH); }
ifndef_ripper    1605 parse.y        		| '>'		{ ifndef_ripper($$ = '>'); }
ifndef_ripper    1606 parse.y        		| tGEQ		{ ifndef_ripper($$ = tGEQ); }
ifndef_ripper    1607 parse.y        		| '<'		{ ifndef_ripper($$ = '<'); }
ifndef_ripper    1608 parse.y        		| tLEQ		{ ifndef_ripper($$ = tLEQ); }
ifndef_ripper    1609 parse.y        		| tLSHFT	{ ifndef_ripper($$ = tLSHFT); }
ifndef_ripper    1610 parse.y        		| tRSHFT	{ ifndef_ripper($$ = tRSHFT); }
ifndef_ripper    1611 parse.y        		| '+'		{ ifndef_ripper($$ = '+'); }
ifndef_ripper    1612 parse.y        		| '-'		{ ifndef_ripper($$ = '-'); }
ifndef_ripper    1613 parse.y        		| '*'		{ ifndef_ripper($$ = '*'); }
ifndef_ripper    1614 parse.y        		| tSTAR		{ ifndef_ripper($$ = '*'); }
ifndef_ripper    1615 parse.y        		| '/'		{ ifndef_ripper($$ = '/'); }
ifndef_ripper    1616 parse.y        		| '%'		{ ifndef_ripper($$ = '%'); }
ifndef_ripper    1617 parse.y        		| tPOW		{ ifndef_ripper($$ = tPOW); }
ifndef_ripper    1618 parse.y        		| '~'		{ ifndef_ripper($$ = '~'); }
ifndef_ripper    1619 parse.y        		| tUPLUS	{ ifndef_ripper($$ = tUPLUS); }
ifndef_ripper    1620 parse.y        		| tUMINUS	{ ifndef_ripper($$ = tUMINUS); }
ifndef_ripper    1621 parse.y        		| tAREF		{ ifndef_ripper($$ = tAREF); }
ifndef_ripper    1622 parse.y        		| tASET		{ ifndef_ripper($$ = tASET); }
ifndef_ripper    1623 parse.y        		| '`'		{ ifndef_ripper($$ = '`'); }
ifndef_ripper    3921 parse.y        		| kNIL {ifndef_ripper($$ = kNIL);}
ifndef_ripper    3922 parse.y        		| kSELF {ifndef_ripper($$ = kSELF);}
ifndef_ripper    3923 parse.y        		| kTRUE {ifndef_ripper($$ = kTRUE);}
ifndef_ripper    3924 parse.y        		| kFALSE {ifndef_ripper($$ = kFALSE);}
ifndef_ripper    3925 parse.y        		| k__FILE__ {ifndef_ripper($$ = k__FILE__);}
ifndef_ripper    3926 parse.y        		| k__LINE__ {ifndef_ripper($$ = k__LINE__);}


in_def

in_def            842 parse.y        			if (in_def || in_single) {
in_def            866 parse.y        			if (in_def || in_single) {
in_def           1395 parse.y        			if (in_def || in_single)
in_def           1407 parse.y        			if (in_def || in_single)
in_def           1469 parse.y        			if (in_def || in_single)
in_def           1482 parse.y        			if (in_def || in_single)
in_def           2744 parse.y        			if (in_def || in_single)
in_def           2771 parse.y        			$<num>$ = in_def;
in_def           2772 parse.y        			in_def = 0;
in_def           2798 parse.y        			in_def = $<num>4;
in_def           2810 parse.y        			if (in_def || in_single)
in_def           2839 parse.y        			in_def++;
in_def           2857 parse.y        			in_def--;
in_def           7252 parse.y        	if (in_def || in_single)
in_def           7257 parse.y        	if (in_def || in_single) return NEW_CVASGN(id, val);


in_defined

in_defined       2061 parse.y        		| kDEFINED opt_nl {in_defined = 1;} arg
in_defined       2064 parse.y        		        in_defined = 0;
in_defined       2596 parse.y        		| kDEFINED opt_nl '(' {in_defined = 1;} expr rparen
in_defined       2599 parse.y        		        in_defined = 0;
in_defined       8152 parse.y            if (in_defined) return;	/* no check needed */


in_single

in_single         842 parse.y        			if (in_def || in_single) {
in_single         866 parse.y        			if (in_def || in_single) {
in_single        1395 parse.y        			if (in_def || in_single)
in_single        1407 parse.y        			if (in_def || in_single)
in_single        1469 parse.y        			if (in_def || in_single)
in_single        1482 parse.y        			if (in_def || in_single)
in_single        2744 parse.y        			if (in_def || in_single)
in_single        2780 parse.y        			$<num>$ = in_single;
in_single        2781 parse.y        			in_single = 0;
in_single        2799 parse.y        			in_single = $<num>6;
in_single        2810 parse.y        			if (in_def || in_single)
in_single        2868 parse.y        			in_single++;
in_single        2886 parse.y        			in_single--;
in_single        7252 parse.y        	if (in_def || in_single)
in_single        7257 parse.y        	if (in_def || in_single) return NEW_CVASGN(id, val);


index

index             281 ext/nkf/nkf-utf8/nkf.c     int index;
index            1511 ext/nkf/nkf-utf8/nkf.c     ptr->buf[ptr->index++] = c;
index            1518 ext/nkf/nkf-utf8/nkf.c     ptr->index = 0;
index            1736 ext/nkf/nkf-utf8/nkf.c               if (ptr->index > ptr->stat){
index             527 ext/readline/readline.c     i = NUM2INT(index);
index             549 ext/readline/readline.c     i = NUM2INT(index);
index             602 ext/readline/readline.c     entry = remove_history(index);
index             681 ext/readline/readline.c     i = NUM2INT(index);
index            3322 ext/tk/tcltklib.c     int done, index;
index            3391 ext/tk/tcltklib.c                               "option", 0, &index);
index            3406 ext/tk/tcltklib.c             index = TKWAIT_VARIABLE;
index            3409 ext/tk/tcltklib.c             index = TKWAIT_VISIBILITY;
index            3411 ext/tk/tcltklib.c             index = TKWAIT_WINDOW;
index            3435 ext/tk/tcltklib.c     switch ((enum options) index) {
index            3893 ext/tk/tcltklib.c     int index;
index            3960 ext/tk/tcltklib.c                               "option", 0, &index);
index            3976 ext/tk/tcltklib.c             index = TKWAIT_VARIABLE;
index            3979 ext/tk/tcltklib.c             index = TKWAIT_VISIBILITY;
index            3981 ext/tk/tcltklib.c             index = TKWAIT_WINDOW;
index            4011 ext/tk/tcltklib.c     switch ((enum options) index) {
index            7000 ext/tk/tcltklib.c     volatile VALUE varname, index, flag;
index            7003 ext/tk/tcltklib.c     index   = argv[1];
index            7027 ext/tk/tcltklib.c                                 NIL_P(index) ? NULL : RSTRING(index)->ptr,
index            7062 ext/tk/tcltklib.c                               NIL_P(index) ? NULL : RSTRING(index)->ptr,
index            7096 ext/tk/tcltklib.c     if (!NIL_P(index)) StringValue(index);
index            7099 ext/tk/tcltklib.c     argv[1] = index;
index            7128 ext/tk/tcltklib.c     volatile VALUE varname, index, value, flag;
index            7131 ext/tk/tcltklib.c     index   = argv[1];
index            7161 ext/tk/tcltklib.c                                 NIL_P(index) ? NULL : RSTRING(index)->ptr,
index            7199 ext/tk/tcltklib.c                               NIL_P(index) ? NULL : RSTRING(index)->ptr,
index            7230 ext/tk/tcltklib.c     if (!NIL_P(index)) StringValue(index);
index            7234 ext/tk/tcltklib.c     argv[1] = index;
index            7264 ext/tk/tcltklib.c     volatile VALUE varname, index, flag;
index            7267 ext/tk/tcltklib.c     index   = argv[1];
index            7281 ext/tk/tcltklib.c                                       NIL_P(index) ? NULL : RSTRING(index)->ptr,
index            7304 ext/tk/tcltklib.c     if (!NIL_P(index)) StringValue(index);
index            7307 ext/tk/tcltklib.c     argv[1] = index;
index            7343 ext/tk/tcltklib.c     return ip_get_variable2(self, varname, index,
index            7364 ext/tk/tcltklib.c     return ip_set_variable2(self, varname, index, value,
index            7383 ext/tk/tcltklib.c     return ip_unset_variable2(self, varname, index,
index             174 ext/win32ole/win32ole.c     UINT index;
index             179 ext/win32ole/win32ole.c     UINT index;
index             185 ext/win32ole/win32ole.c     UINT index;
index            1460 ext/win32ole/win32ole.c     unsigned int index;
index            1474 ext/win32ole/win32ole.c     for (index = 0; index < count; index++) {
index            1475 ext/win32ole/win32ole.c         hr = pTypeLib->lpVtbl->GetTypeInfo(pTypeLib, index, &pTypeInfo);
index            1761 ext/win32ole/win32ole.c     unsigned int index;
index            1781 ext/win32ole/win32ole.c         hr = pTypeInfo->lpVtbl->GetContainingTypeLib(pTypeInfo, &pTypeLib, &index);
index            2106 ext/win32ole/win32ole.c     unsigned int index, i;
index            2108 ext/win32ole/win32ole.c     index = pOp->dp.cNamedArgs;
index            2116 ext/win32ole/win32ole.c         for(i = 1; i < index + 1; i++) {
index            2120 ext/win32ole/win32ole.c         for(i = 0; i < index; i++ ) {
index            2128 ext/win32ole/win32ole.c     pOp->pNamedArgs[index + 1] = ole_mb2wc(StringValuePtr(key), -1);
index            2131 ext/win32ole/win32ole.c     VariantInit(&(pOp->dp.rgvarg[index]));
index            2132 ext/win32ole/win32ole.c     ole_val2variant(value, &(pOp->dp.rgvarg[index]));
index            2690 ext/win32ole/win32ole.c     unsigned int index;
index            2730 ext/win32ole/win32ole.c     for(index = 0; index < dispParams.cArgs; ++index) {
index            2731 ext/win32ole/win32ole.c         VariantClear(&propertyValue[index]);
index            3176 ext/win32ole/win32ole.c     unsigned int index;
index            3179 ext/win32ole/win32ole.c     hr = pTypeInfo->lpVtbl->GetContainingTypeLib( pTypeInfo, &pTypeLib, &index );
index            3183 ext/win32ole/win32ole.c     hr = pTypeLib->lpVtbl->GetDocumentation( pTypeLib, index,
index            3252 ext/win32ole/win32ole.c     unsigned int index;
index            3254 ext/win32ole/win32ole.c     hr = pTypeInfo->lpVtbl->GetContainingTypeLib(pTypeInfo, &pTypeLib, &index);
index            4755 ext/win32ole/win32ole.c         pvar->index = i;
index            4893 ext/win32ole/win32ole.c     return ole_variable_ole_type(pvar->pTypeInfo, pvar->index);
index            4930 ext/win32ole/win32ole.c     return ole_variable_ole_type_detail(pvar->pTypeInfo, pvar->index);
index            4977 ext/win32ole/win32ole.c     return ole_variable_value(pvar->pTypeInfo, pvar->index);
index            5026 ext/win32ole/win32ole.c     return ole_variable_visible(pvar->pTypeInfo, pvar->index);
index            5085 ext/win32ole/win32ole.c     return ole_variable_kind(pvar->pTypeInfo, pvar->index);
index            5128 ext/win32ole/win32ole.c     return ole_variable_varkind(pvar->pTypeInfo, pvar->index);
index            5151 ext/win32ole/win32ole.c     pmethod->index = index;
index            5167 ext/win32ole/win32ole.c     pmethod->index = 0;
index            5259 ext/win32ole/win32ole.c     return ole_method_return_type(pmethod->pTypeInfo, pmethod->index);
index            5296 ext/win32ole/win32ole.c     return ole_method_return_vtype(pmethod->pTypeInfo, pmethod->index);
index            5333 ext/win32ole/win32ole.c     return ole_method_return_type_detail(pmethod->pTypeInfo, pmethod->index);
index            5390 ext/win32ole/win32ole.c     return ole_method_invkind(pmethod->pTypeInfo, pmethod->index);
index            5410 ext/win32ole/win32ole.c     return ole_method_invoke_kind(pmethod->pTypeInfo, pmethod->index);
index            5450 ext/win32ole/win32ole.c     return ole_method_visible(pmethod->pTypeInfo, pmethod->index);
index            5539 ext/win32ole/win32ole.c                             pmethod->index,
index            5621 ext/win32ole/win32ole.c     return ole_method_helpstring(pmethod->pTypeInfo, pmethod->index);
index            5655 ext/win32ole/win32ole.c     return ole_method_helpfile(pmethod->pTypeInfo, pmethod->index);
index            5687 ext/win32ole/win32ole.c     return ole_method_helpcontext(pmethod->pTypeInfo, pmethod->index);
index            5721 ext/win32ole/win32ole.c     return ole_method_dispid(pmethod->pTypeInfo, pmethod->index);
index            5755 ext/win32ole/win32ole.c     return ole_method_offset_vtbl(pmethod->pTypeInfo, pmethod->index);
index            5790 ext/win32ole/win32ole.c     return ole_method_size_params(pmethod->pTypeInfo, pmethod->index);
index            5824 ext/win32ole/win32ole.c     return ole_method_size_opt_params(pmethod->pTypeInfo, pmethod->index);
index            5860 ext/win32ole/win32ole.c             pparam->index = i - 1;
index            5888 ext/win32ole/win32ole.c     return ole_method_params(pmethod->pTypeInfo, pmethod->index);
index            5928 ext/win32ole/win32ole.c                             &(pFuncDesc->lprgelemdescParam[index].tdesc), Qnil);
index            5950 ext/win32ole/win32ole.c                               pparam->index);
index            5966 ext/win32ole/win32ole.c                      &(pFuncDesc->lprgelemdescParam[index].tdesc), typedetail);
index            5988 ext/win32ole/win32ole.c                                      pparam->index);
index            6004 ext/win32ole/win32ole.c     if (V_UNION1((&(pFuncDesc->lprgelemdescParam[index])), paramdesc).wParamFlags &mask)
index            6026 ext/win32ole/win32ole.c                                pparam->index, PARAMFLAG_FIN);
index            6054 ext/win32ole/win32ole.c                                pparam->index, PARAMFLAG_FOUT);
index            6073 ext/win32ole/win32ole.c                                pparam->index, PARAMFLAG_FOPT);
index            6093 ext/win32ole/win32ole.c                                pparam->index, PARAMFLAG_FRETVAL);
index            6112 ext/win32ole/win32ole.c     pElemDesc = &pFuncDesc->lprgelemdescParam[index];
index            6157 ext/win32ole/win32ole.c                              pparam->index);
index            6436 ext/win32ole/win32ole.c     unsigned int index;
index            6455 ext/win32ole/win32ole.c                                                  &index);
index            6468 ext/win32ole/win32ole.c     for (index = 0; index < count; index++) {
index            6470 ext/win32ole/win32ole.c                                            index,
index              98 missing/os2.c  	    !isalpha(*s) && index("$&*(){}[]'\";\\|?<>~`\n",*s)) {
index             105 missing/os2.c  	    !isalpha(*s) && index("^()<>|&\n",*s)) {
index             465 regexec.c      #define STACK_AT(index)        (stk_base + (index))
index              37 win32/win32.c  #ifndef index
index            1390 win32/win32.c      if (index("/\\:", *CharPrev(scanname, scanname + strlen(scanname))) == NULL)


inet_ntop

inet_ntop         227 ext/socket/getnameinfo.c 		if (inet_ntop(afd->a_af, addr, numaddr, sizeof(numaddr))
inet_ntop         259 ext/socket/getnameinfo.c 			if (inet_ntop(afd->a_af, addr, numaddr, sizeof(numaddr))


inet_pton

inet_pton         292 ext/socket/getaddrinfo.c 			if (q && inet_pton(AF_INET6, q, &faith_prefix) == 1)
inet_pton         469 ext/socket/getaddrinfo.c 		if (inet_pton(afdl[i].a_af, hostname, pton)) {


inf

inf               185 ext/openssl/openssl_missing.c     X509_CRL_INFO *inf;
inf               187 ext/openssl/openssl_missing.c     inf = crl->crl;
inf               188 ext/openssl/openssl_missing.c     if (!inf->revoked)
inf               189 ext/openssl/openssl_missing.c 	inf->revoked = sk_X509_REVOKED_new(OSSL_X509_REVOKED_cmp);
inf               190 ext/openssl/openssl_missing.c     if (!inf->revoked || !sk_X509_REVOKED_push(inf->revoked, rev))
inf              5569 ext/tk/tcltklib.c     struct call_eval_info *inf = (struct call_eval_info *)arg;
inf              5571 ext/tk/tcltklib.c     inf->ptr->return_value = Tcl_EvalObj(inf->ptr->ip, inf->cmd);
inf              5606 ext/tk/tcltklib.c           struct call_eval_info inf;
inf              5615 ext/tk/tcltklib.c           inf.ptr = ptr;
inf              5616 ext/tk/tcltklib.c           inf.cmd = cmd;
inf              5617 ext/tk/tcltklib.c           ret = rb_protect(call_tcl_eval, (VALUE)&inf, &status);
inf              6403 ext/tk/tcltklib.c     struct invoke_info *inf = (struct invoke_info *)arg;
inf              6406 ext/tk/tcltklib.c     int argc = inf->objc;
inf              6412 ext/tk/tcltklib.c     if (!inf->cmdinfo.isNativeObjectProc) {
inf              6416 ext/tk/tcltklib.c             argv[i] = Tcl_GetStringFromObj(inf->objv[i], &len);
inf              6422 ext/tk/tcltklib.c     Tcl_ResetResult(inf->ptr->ip);
inf              6426 ext/tk/tcltklib.c     if (inf->cmdinfo.isNativeObjectProc) {
inf              6427 ext/tk/tcltklib.c         inf->ptr->return_value
inf              6428 ext/tk/tcltklib.c             = (*(inf->cmdinfo.objProc))(inf->cmdinfo.objClientData,
inf              6429 ext/tk/tcltklib.c                                         inf->ptr->ip, inf->objc, inf->objv);
inf              6435 ext/tk/tcltklib.c         inf->ptr->return_value
inf              6436 ext/tk/tcltklib.c             = (*(inf->cmdinfo.proc))(inf->cmdinfo.clientData, inf->ptr->ip,
inf              6442 ext/tk/tcltklib.c         inf->ptr->return_value
inf              6443 ext/tk/tcltklib.c             = (*(inf->cmdinfo.proc))(inf->cmdinfo.clientData, inf->ptr->ip,
inf              6444 ext/tk/tcltklib.c                                      inf->argc, inf->argv);
inf              6474 ext/tk/tcltklib.c     struct invoke_info inf;
inf              6567 ext/tk/tcltklib.c     inf.ptr = ptr;
inf              6568 ext/tk/tcltklib.c     inf.cmdinfo = info;
inf              6570 ext/tk/tcltklib.c     inf.objc = objc;
inf              6571 ext/tk/tcltklib.c     inf.objv = objv;
inf              6573 ext/tk/tcltklib.c     inf.argc = argc;
inf              6574 ext/tk/tcltklib.c     inf.argv = argv;
inf              6578 ext/tk/tcltklib.c     ret = rb_protect(invoke_tcl_proc, (VALUE)&inf, &status);
inf              1112 ext/tk/tkutil/tkutil.c     struct cbsubst_info *inf;
inf              1116 ext/tk/tkutil/tkutil.c     inf = ALLOC(struct cbsubst_info);
inf              1118 ext/tk/tkutil/tkutil.c     inf->size = 0;
inf              1120 ext/tk/tkutil/tkutil.c     inf->key = ALLOC_N(char, 1);
inf              1121 ext/tk/tkutil/tkutil.c     inf->key[0] = '\0';
inf              1123 ext/tk/tkutil/tkutil.c     inf->type = ALLOC_N(char, 1);
inf              1124 ext/tk/tkutil/tkutil.c     inf->type[0] = '\0';
inf              1127 ext/tk/tkutil/tkutil.c     inf->ivar = ivar;
inf              1130 ext/tk/tkutil/tkutil.c     inf->proc = proc;
inf              1133 ext/tk/tkutil/tkutil.c     inf->aliases = aliases;
inf              1136 ext/tk/tkutil/tkutil.c                  Data_Wrap_Struct(cSUBST_INFO, subst_mark, subst_free, inf));
inf              1145 ext/tk/tkutil/tkutil.c     struct cbsubst_info *inf;
inf              1149 ext/tk/tkutil/tkutil.c                     struct cbsubst_info, inf);
inf              1152 ext/tk/tkutil/tkutil.c         rb_ivar_set(self, inf->ivar[idx], argv[idx]);
inf              1209 ext/tk/tkutil/tkutil.c     struct cbsubst_info *inf;
inf              1216 ext/tk/tkutil/tkutil.c                     struct cbsubst_info, inf);
inf              1220 ext/tk/tkutil/tkutil.c     return rb_funcall(inf->aliases, rb_intern("update"), 1, tbl);
inf              1229 ext/tk/tkutil/tkutil.c     struct cbsubst_info *inf;
inf              1236 ext/tk/tkutil/tkutil.c                     struct cbsubst_info, inf);
inf              1240 ext/tk/tkutil/tkutil.c     len = strlen(inf->key);
inf              1256 ext/tk/tkutil/tkutil.c         if (!NIL_P(ret = rb_hash_aref(inf->aliases, arg_sym))) {
inf              1263 ext/tk/tkutil/tkutil.c             if (inf->ivar[j] == id) break;
inf              1271 ext/tk/tkutil/tkutil.c         *(ptr++) = *(inf->key + j);
inf              1318 ext/tk/tkutil/tkutil.c     struct cbsubst_info *inf;
inf              1324 ext/tk/tkutil/tkutil.c                     struct cbsubst_info, inf);
inf              1326 ext/tk/tkutil/tkutil.c     len = strlen(inf->key);
inf              1331 ext/tk/tkutil/tkutil.c         *(ptr++) = *(inf->key + i);
inf              1336 ext/tk/tkutil/tkutil.c     ret = rb_ary_new3(2, rb_str_new2(inf->key), rb_str_new2(buf));
inf              1358 ext/tk/tkutil/tkutil.c     volatile VALUE inf;
inf              1376 ext/tk/tkutil/tkutil.c         inf = RARRAY(key_inf)->ptr[idx];
inf              1377 ext/tk/tkutil/tkutil.c         if (TYPE(inf) != T_ARRAY) continue;
inf              1378 ext/tk/tkutil/tkutil.c         *(key  + real_len) = (char)NUM2INT(RARRAY(inf)->ptr[0]);
inf              1379 ext/tk/tkutil/tkutil.c         *(type + real_len) = (char)NUM2INT(RARRAY(inf)->ptr[1]);
inf              1385 ext/tk/tkutil/tkutil.c                               rb_id2name(SYM2ID(RARRAY(inf)->ptr[2])))
inf              1389 ext/tk/tkutil/tkutil.c         rb_attr(self, SYM2ID(RARRAY(inf)->ptr[2]), 1, 0, Qtrue);
inf              1403 ext/tk/tkutil/tkutil.c         inf = RARRAY(proc_inf)->ptr[idx];
inf              1404 ext/tk/tkutil/tkutil.c         if (TYPE(inf) != T_ARRAY) continue;
inf              1405 ext/tk/tkutil/tkutil.c         rb_hash_aset(proc, RARRAY(inf)->ptr[0], RARRAY(inf)->ptr[1]);
inf              1428 ext/tk/tkutil/tkutil.c     struct cbsubst_info *inf;
inf              1444 ext/tk/tkutil/tkutil.c                     struct cbsubst_info, inf);
inf              1453 ext/tk/tkutil/tkutil.c           ptr = strchr(inf->key, *(RSTRING(arg_key)->ptr + idx));
inf              1457 ext/tk/tkutil/tkutil.c             c = *(inf->type + (ptr - inf->key));
inf              1458 ext/tk/tkutil/tkutil.c             proc = rb_hash_aref(inf->proc, INT2FIX(c));
inf                55 missing/isinf.c 	pinf = inf();


infect

infect             61 ext/strscan/strscan.c static VALUE infect _((VALUE str, struct strscanner *p));
infect            138 ext/strscan/strscan.c     return infect(rb_str_new(S_PBEG(p) + beg_i, end_i - beg_i), p);
infect            149 ext/strscan/strscan.c     return infect(rb_str_new(S_PBEG(p) + beg_i, len), p);
infect            783 ext/strscan/strscan.c         return infect(rb_str_new("", 0), p);
infect           1059 ext/strscan/strscan.c         return infect(rb_str_new("", 0), p);
infect           1121 ext/strscan/strscan.c         return infect(rb_str_new(buf, len), p);
infect           1126 ext/strscan/strscan.c         return infect(rb_str_new(buf, len), p);
infect           1134 ext/strscan/strscan.c         return infect(rb_str_new(buf, len), p);
infect           1143 ext/strscan/strscan.c     return infect(rb_str_new(buf, len), p);


infected_str_new

infected_str_new 1366 pack.c         		rb_ary_push(ary, infected_str_new(s, len, str));
infected_str_new 1377 pack.c         		rb_ary_push(ary, infected_str_new(s, t-s, str));
infected_str_new 1385 pack.c         	    rb_ary_push(ary, infected_str_new(s, len, str));
infected_str_new 1716 pack.c         		VALUE buf = infected_str_new(0, (send - s)*3/4, str);
infected_str_new 1772 pack.c         		VALUE buf = infected_str_new(0, (send - s)*3/4, str);
infected_str_new 1816 pack.c         		VALUE buf = infected_str_new(0, send - s, str);


inflate_run

inflate_run        93 ext/zlib/zlib.c static VALUE inflate_run _((VALUE));
inflate_run      1497 ext/zlib/zlib.c     dst = rb_ensure(inflate_run, (VALUE)args, zstream_end, (VALUE)&z);


init_copy

init_copy         226 object.c           init_copy(clone, obj);
init_copy         259 object.c           init_copy(dup, obj);


init_des

init_des          114 missing/crypt.c STATIC init_des(), init_perm(), permute();
init_des          592 missing/crypt.c 		init_des();


init_funcname

init_funcname     874 dln.c          	init_funcname(&buf, need_init);
init_funcname    1283 dln.c              init_funcname(&buf, file);
init_funcname    1311 dln.c              init_funcname(&buf, file);


init_genrand

init_genrand      102 random.c           init_genrand(19650218UL);
init_genrand      133 random.c           if (initf==0) init_genrand(5489UL);
init_genrand      239 random.c               init_genrand(buf[0]);


init_inetsock

init_inetsock    1254 ext/socket/socket.c     return init_inetsock(sock, remote_host, remote_serv,
init_inetsock    1270 ext/socket/socket.c     return init_inetsock(sock, host, serv, Qnil, Qnil, INET_SOCKS);
init_inetsock    1380 ext/socket/socket.c 	return init_inetsock(sock, arg1, arg2, Qnil, Qnil, INET_SERVER);
init_inetsock    1382 ext/socket/socket.c 	return init_inetsock(sock, Qnil, arg1, Qnil, Qnil, INET_SERVER);


init_mark_stack

init_mark_stack   562 gc.c               init_mark_stack();
init_mark_stack   584 gc.c               init_mark_stack();
init_mark_stack  1285 gc.c               init_mark_stack();


init_perm

init_perm         114 missing/crypt.c STATIC init_des(), init_perm(), permute();
init_perm         772 missing/crypt.c 	init_perm(PC1ROT, perm, 8, 8);
init_perm         796 missing/crypt.c 		init_perm(PC2ROT[j], perm, 8, 8);
init_perm         820 missing/crypt.c 	init_perm(IE3264, perm, 4, 8);
init_perm         837 missing/crypt.c 	init_perm(CF6464, perm, 8, 8);


init_sigchld

init_sigchld      961 signal.c           init_sigchld(SIGCLD);
init_sigchld      964 signal.c           init_sigchld(SIGCHLD);


init_sock

init_sock         224 ext/socket/socket.c     VALUE sock = init_sock(rb_obj_alloc(klass), NUM2INT(fd));
init_sock        1220 ext/socket/socket.c     return init_sock(arg->sock, fd);
init_sock        1423 ext/socket/socket.c     return init_sock(rb_obj_alloc(klass), fd2);
init_sock        1509 ext/socket/socket.c     init_sock(sock, fd);
init_sock        1589 ext/socket/socket.c     return init_sock(sock, fd);
init_sock        2092 ext/socket/socket.c     return init_sock(sock, fd);
init_sock        2112 ext/socket/socket.c     return rb_assoc_new(init_sock(rb_obj_alloc(klass), sp[0]),
init_sock        2113 ext/socket/socket.c 			init_sock(rb_obj_alloc(klass), sp[1]));


init_stdhandle

init_stdhandle    398 win32/win32.c  static void init_stdhandle(void);
init_stdhandle    423 win32/win32.c      init_stdhandle();


init_unixsock

init_unixsock    1695 ext/socket/socket.c     return init_unixsock(sock, path, 0);
init_unixsock    1719 ext/socket/socket.c     return init_unixsock(sock, path, 1);


initialize_cclass

initialize_cclass 1103 regparse.c       initialize_cclass(&(NCCLASS(node)));
initialize_cclass 4165 regparse.c     	initialize_cclass(cc);


initialize_params

initialize_params  212 ext/racc/cparse/cparse.c static void initialize_params _((struct cparse_params *v,
initialize_params  242 ext/racc/cparse/cparse.c     initialize_params(v, parser, arg, Qnil, Qnil);
initialize_params  258 ext/racc/cparse/cparse.c     initialize_params(v, parser, arg, lexer, lexmid);


ino_t

ino_t              14 win32/dir.h        ino_t d_ino;
ino_t              43 wince/sys/stat.h   ino_t st_ino;


ins_methods_i

ins_methods_i     613 class.c            return class_instance_method_list(argc, argv, mod, ins_methods_i);
ins_methods_i     724 class.c            st_foreach(list, ins_methods_i, ary);


ins_methods_push

ins_methods_push  518 class.c            return ins_methods_push(name, type, ary, -1); /* everything but private */
ins_methods_push  524 class.c            return ins_methods_push(name, type, ary, NOEX_PROTECTED);
ins_methods_push  530 class.c            return ins_methods_push(name, type, ary, NOEX_PRIVATE);
ins_methods_push  536 class.c            return ins_methods_push(name, type, ary, NOEX_PUBLIC);


inspect1

inspect1          114 ext/strscan/strscan.c static VALUE inspect1 _((struct strscanner *p));
inspect1         1136 ext/strscan/strscan.c     a = inspect1(p);


inspect2

inspect2          115 ext/strscan/strscan.c static VALUE inspect2 _((struct strscanner *p));
inspect2         1129 ext/strscan/strscan.c         b = inspect2(p);
inspect2         1137 ext/strscan/strscan.c     b = inspect2(p);


inspect_i

inspect_i        1137 hash.c             rb_hash_foreach(hash, inspect_i, str);
inspect_i         337 object.c       	st_foreach_safe(ROBJECT(obj)->iv_tbl, inspect_i, str);


install_sighandler

install_sighandler  929 signal.c           install_sighandler(SIGINT, sighandler);
install_sighandler  931 signal.c           install_sighandler(SIGHUP, sighandler);
install_sighandler  934 signal.c           install_sighandler(SIGQUIT, sighandler);
install_sighandler  937 signal.c           install_sighandler(SIGALRM, sighandler);
install_sighandler  940 signal.c           install_sighandler(SIGUSR1, sighandler);
install_sighandler  943 signal.c           install_sighandler(SIGUSR2, sighandler);
install_sighandler  948 signal.c           install_sighandler(SIGBUS, sigbus);
install_sighandler  953 signal.c           install_sighandler(SIGSEGV, sigsegv);
install_sighandler  957 signal.c           install_sighandler(SIGPIPE, sigpipe);


int_chr

int_chr          3317 ext/bigdecimal/bigdecimal.c         if(int_chr[0] == '-') {
int_chr          3321 ext/bigdecimal/bigdecimal.c         } else if(int_chr[0] == '+') {
int_chr          3353 ext/bigdecimal/bigdecimal.c             a->frac[ind_a] = a->frac[ind_a] * 10 + int_chr[i] - '0';
int_chr           146 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpCtoV(Real *a,char *int_chr,U_LONG ni,char *frac,U_LONG nf,char *exp_chr,U_LONG ne);
int_chr          2849 numeric.c          rb_define_method(rb_cInteger, "chr", int_chr, 0);


int_succ

int_succ         2847 numeric.c          rb_define_method(rb_cInteger, "succ", int_succ, 0);
int_succ         2848 numeric.c          rb_define_method(rb_cInteger, "next", int_succ, 0);


int_to_i

int_to_i         2850 numeric.c          rb_define_method(rb_cInteger, "to_i", int_to_i, 0);
int_to_i         2851 numeric.c          rb_define_method(rb_cInteger, "to_int", int_to_i, 0);
int_to_i         2852 numeric.c          rb_define_method(rb_cInteger, "floor", int_to_i, 0);
int_to_i         2853 numeric.c          rb_define_method(rb_cInteger, "ceil", int_to_i, 0);
int_to_i         2854 numeric.c          rb_define_method(rb_cInteger, "round", int_to_i, 0);
int_to_i         2855 numeric.c          rb_define_method(rb_cInteger, "truncate", int_to_i, 0);


internal_id

internal_id       317 parse.y        static ID   internal_id(void);
internal_id      4203 parse.y        			    $$ = NEW_DASGN_CURR(internal_id(), 0);
internal_id      7740 parse.y        	node->nd_cnt = local_append(internal_id());


intersect_fds

intersect_fds    10618 eval.c         		    intersect_fds(&readfds, &th->readfds, max);
intersect_fds    10619 eval.c         		    intersect_fds(&writefds, &th->writefds, max);
intersect_fds    10620 eval.c         		    intersect_fds(&exceptfds, &th->exceptfds, max);
intersect_fds    10645 eval.c         		    n = intersect_fds(&readfds, &th->readfds, max) +
intersect_fds    10646 eval.c         			intersect_fds(&writefds, &th->writefds, max) +
intersect_fds    10647 eval.c         			intersect_fds(&exceptfds, &th->exceptfds, max);


intptr_t

intptr_t           33 wince/process.h intptr_t _spawnle(int, const char *, const char *, ...);
intptr_t           34 wince/process.h intptr_t _spawnvpe(int, const char *, const char * const *,
intptr_t           34 wince/process_wce.c intptr_t _spawnle(int mode,
intptr_t           41 wince/process_wce.c intptr_t _spawnvpe(int mode,


invoke_queue_handler

invoke_queue_handler 6798 ext/tk/tcltklib.c int invoke_queue_handler _((Tcl_Event *, int));
invoke_queue_handler 6917 ext/tk/tcltklib.c     ivq->ev.proc = invoke_queue_handler;


io_alloc

io_alloc         2663 io.c               return rb_file_open_internal(io_alloc(rb_cFile), fname, mode);
io_alloc         2684 io.c               return rb_file_sysopen_internal(io_alloc(rb_cFile), fname, flags, mode);
io_alloc         2949 io.c               port = io_alloc(rb_cIO);
io_alloc         3845 io.c               VALUE io = io_alloc(klass);
io_alloc         5469 io.c               rb_define_alloc_func(rb_cIO, io_alloc);


io_check_tty

io_check_tty     2655 io.c               io_check_tty(fptr);
io_check_tty     2676 io.c               io_check_tty(fptr);
io_check_tty     3856 io.c               io_check_tty(fp);
io_check_tty     3935 io.c                   io_check_tty(fp);


io_close

io_close         3051 io.c           	return rb_ensure(rb_yield, port, io_close, port);
io_close         3104 io.c           	return rb_ensure(rb_yield, io, io_close, io);
io_close         3238 io.c           		return rb_ensure(rb_yield, io, io_close, io);


io_fflush

io_fflush         231 io.c           static int io_fflush(OpenFile *);
io_fflush         290 io.c               io_fflush(fptr);
io_fflush         314 io.c                   io_fflush(fptr);
io_fflush         569 io.c                   if (io_fflush(fptr) < 0)
io_fflush         726 io.c                   io_fflush(fptr);
io_fflush        1023 io.c               io_fflush(fptr);
io_fflush        1196 io.c           	io_fflush(fptr);
io_fflush        1987 io.c                   io_fflush(fptr);
io_fflush        3298 io.c           	io_fflush(orig);
io_fflush        3301 io.c           	io_fflush(fptr);


io_fread

io_fread         1176 io.c               n = io_fread(str, 0, &of);
io_fread         1226 io.c           	n = io_fread(str, bytes, fptr);
io_fread         1420 io.c               n = io_fread(str, 0, fptr);


io_fwrite

io_fwrite         622 io.c               return io_fwrite(rb_str_new(ptr, len), &of);
io_fwrite         663 io.c               n = io_fwrite(str, fptr);


io_getc

io_getc           942 io.c               ch = io_getc(fptr);
io_getc          1154 io.c           	c = io_getc(fptr);
io_getc          1475 io.c           	c = io_getc(fptr);
io_getc          1514 io.c           	c = io_getc(fptr);
io_getc          1852 io.c           	c = io_getc(fptr);
io_getc          1883 io.c               c = io_getc(fptr);


io_getpartial

io_getpartial    1354 io.c               ret = io_getpartial(argc, argv, io);
io_getpartial    5182 io.c                   tmp = io_getpartial(argc, argv, current_file);


io_new_instance

io_new_instance  4892 io.c               r = rb_protect(io_new_instance, (VALUE)args, &state);
io_new_instance  4900 io.c               w = rb_protect(io_new_instance, (VALUE)args, &state);


io_read

io_read          5006 io.c               return io_read(arg->argc, &arg->sep, arg->io);
io_read          5134 io.c           	tmp = io_read(argc, argv, current_file);
io_read          5526 io.c               rb_define_method(rb_cIO, "read",  io_read, -1);


io_ready_p

io_ready_p         37 ext/io/wait/wait.c static VALUE io_ready_p _((VALUE io));
io_ready_p        141 ext/io/wait/wait.c     rb_define_method(rb_cIO, "ready?", io_ready_p, 0);


io_seek

io_seek           768 io.c               pos = io_seek(fptr, pos, whence);
io_seek           827 io.c               pos = io_seek(fptr, pos, SEEK_SET);
io_seek           853 io.c               if (io_seek(fptr, 0L, 0) < 0) rb_sys_fail(fptr->path);
io_seek          3338 io.c           	    if (io_seek(fptr, pos, SEEK_SET) < 0) {
io_seek          3341 io.c           	    if (io_seek(orig, pos, SEEK_SET) < 0) {
io_seek          3462 io.c               io_seek(fptr, io_tell(orig), SEEK_SET);


io_tell

io_tell           755 io.c               pos = io_tell(fptr);
io_tell          3295 io.c           	pos = io_tell(orig);
io_tell          3462 io.c               io_seek(fptr, io_tell(orig), SEEK_SET);


io_ungetc

io_ungetc         945 io.c           	io_ungetc(ch, fptr);
io_ungetc        1516 io.c           	    io_ungetc(c, fptr);
io_ungetc        1950 io.c               if (io_ungetc(cc, fptr) == EOF && cc != EOF) {


io_unread

io_unread         291 io.c               io_unread(fptr);
io_unread         326 io.c                   io_unread(fptr);
io_unread         729 io.c                   io_unread(fptr);


io_wait

io_wait            38 ext/io/wait/wait.c static VALUE io_wait _((int argc, VALUE *argv, VALUE io));
io_wait           142 ext/io/wait/wait.c     rb_define_method(rb_cIO, "wait", io_wait, -1);


ioctl

ioctl              66 ext/io/wait/wait.c     if (ioctl(fptr->fd, FIONREAD, &n)) rb_sys_fail(0);
ioctl             133 ext/io/wait/wait.c     if (ioctl(fptr->fd, FIONREAD, &n)) rb_sys_fail(0);
ioctl             252 ext/pty/pty.c  	    if (ioctl(i, TIOCNOTTY, (char *)0))
ioctl             265 ext/pty/pty.c  	(void) ioctl(slave, TIOCSCTTY, (char *)0);
ioctl             359 ext/pty/pty.c  			if(ioctl(j, I_PUSH, "ptem") != -1) {
ioctl             360 ext/pty/pty.c  			    if(ioctl(j, I_PUSH, "ldterm") != -1) {
ioctl            4578 io.c               retval = io_p?ioctl(fd, cmd, (void*)narg):fcntl(fd, cmd, narg);
ioctl            4580 io.c               retval = io_p?ioctl(fd, cmd, narg):fcntl(fd, cmd, narg);
ioctl            4588 io.c               retval = ioctl(fd, cmd, narg);
ioctl            1816 process.c          ioctl(fd, TIOCNOTTY, NULL);
ioctl             301 win32/win32.h  extern int       ioctl (int, int, ...);


ioctl_arg

ioctl_arg          60 ext/io/wait/wait.c     ioctl_arg n;
ioctl_arg         104 ext/io/wait/wait.c     ioctl_arg n;


ioctlsocket

ioctlsocket        23 ext/io/wait/wait.c #define ioctl ioctlsocket
ioctlsocket      2317 win32/win32.c  	r = ioctlsocket(TO_SOCKET(s), cmd, argp);
ioctlsocket      2785 win32/win32.c  	ret = ioctlsocket(sock, FIONBIO, &ioctlArg);


ioerr

ioerr             261 ext/sdbm/_sdbm.c 	return ioerr(db), nullitem;
ioerr             282 ext/sdbm/_sdbm.c 			return ioerr(db), -1;
ioerr             287 ext/sdbm/_sdbm.c 	return ioerr(db), -1;
ioerr             328 ext/sdbm/_sdbm.c 				return ioerr(db), -1;
ioerr             337 ext/sdbm/_sdbm.c 			return ioerr(db), -1;
ioerr             344 ext/sdbm/_sdbm.c 	return ioerr(db), -1;
ioerr             464 ext/sdbm/_sdbm.c 		return ioerr(db), nullitem;
ioerr             615 ext/sdbm/_sdbm.c 	return ioerr(db), nullitem;


ip_CallWhenDeleted

ip_CallWhenDeleted 4850 ext/tk/tcltklib.c     Tcl_CallWhenDeleted(ptr->ip, ip_CallWhenDeleted, (ClientData)mainWin);
ip_CallWhenDeleted 4948 ext/tk/tcltklib.c     Tcl_CallWhenDeleted(slave->ip, ip_CallWhenDeleted, (ClientData)mainWin);


ip_InterpExitObjCmd

ip_InterpExitObjCmd 4823 ext/tk/tcltklib.c     Tcl_CreateObjCommand(ptr->ip, "interp_exit", ip_InterpExitObjCmd,
ip_InterpExitObjCmd 4933 ext/tk/tcltklib.c     Tcl_CreateObjCommand(slave->ip, "exit", ip_InterpExitObjCmd,
ip_InterpExitObjCmd 5111 ext/tk/tcltklib.c     Tcl_CreateObjCommand(ptr->ip, "exit", ip_InterpExitObjCmd,
ip_InterpExitObjCmd 5213 ext/tk/tcltklib.c         Tcl_CreateObjCommand(ptr->ip, "exit", ip_InterpExitObjCmd,


ip_RubyExitObjCmd

ip_RubyExitObjCmd 4826 ext/tk/tcltklib.c     Tcl_CreateObjCommand(ptr->ip, "ruby_exit", ip_RubyExitObjCmd,
ip_RubyExitObjCmd 4829 ext/tk/tcltklib.c     Tcl_CreateObjCommand(ptr->ip, "exit", ip_RubyExitObjCmd,
ip_RubyExitObjCmd 5200 ext/tk/tcltklib.c         Tcl_CreateObjCommand(ptr->ip, "exit", ip_RubyExitObjCmd,


ip_alloc

ip_alloc         4480 ext/tk/tcltklib.c static VALUE ip_alloc _((VALUE));
ip_alloc         7848 ext/tk/tcltklib.c     rb_define_alloc_func(ip, ip_alloc);


ip_eval_real

ip_eval_real     5720 ext/tk/tcltklib.c     return ip_eval_real(q->interp, q->str, q->len);
ip_eval_real     5756 ext/tk/tcltklib.c         ret = ip_eval_real(q->interp, q->str, q->len);
ip_eval_real     5801 ext/tk/tcltklib.c         result = ip_eval_real(self, RSTRING(str)->ptr, RSTRING(str)->len);


ip_finalize

ip_finalize        82 ext/tk/tcltklib.c static void ip_finalize _((Tcl_Interp*));
ip_finalize      2644 ext/tk/tcltklib.c         ip_finalize(interp);
ip_finalize      2693 ext/tk/tcltklib.c         ip_finalize(interp);
ip_finalize      4297 ext/tk/tcltklib.c                 ip_finalize(slave);
ip_finalize      4339 ext/tk/tcltklib.c                 ip_finalize(slave);
ip_finalize      4466 ext/tk/tcltklib.c         ip_finalize(ptr->ip);
ip_finalize      4653 ext/tk/tcltklib.c     ip_finalize(ip);
ip_finalize      5241 ext/tk/tcltklib.c     ip_finalize(ptr->ip);


ip_free

ip_free          4485 ext/tk/tcltklib.c     return Data_Wrap_Struct(self, 0, ip_free, 0);
ip_free          4952 ext/tk/tcltklib.c     return Data_Wrap_Struct(CLASS_OF(interp), 0, ip_free, slave);


ip_get_result_string_obj

ip_get_result_string_obj 5669 ext/tk/tcltklib.c     ret =  ip_get_result_string_obj(ptr->ip);
ip_get_result_string_obj 5704 ext/tk/tcltklib.c     ret =  ip_get_result_string_obj(ptr->ip);
ip_get_result_string_obj 6678 ext/tk/tcltklib.c     return ip_get_result_string_obj(ptr->ip);


ip_get_variable

ip_get_variable  7333 ext/tk/tcltklib.c     return ip_get_variable(self, varname,
ip_get_variable  7873 ext/tk/tcltklib.c     rb_define_method(ip, "_get_variable", ip_get_variable, 2);


ip_get_variable2

ip_get_variable2 7117 ext/tk/tcltklib.c     return ip_get_variable2(self, varname, Qnil, flag);
ip_get_variable2 7343 ext/tk/tcltklib.c     return ip_get_variable2(self, varname, index,
ip_get_variable2 7874 ext/tk/tcltklib.c     rb_define_method(ip, "_get_variable2", ip_get_variable2, 3);


ip_invoke

ip_invoke         121 ext/tk/tcltklib.c static VALUE ip_invoke _((int, VALUE*, VALUE));
ip_invoke        7865 ext/tk/tcltklib.c     rb_define_method(ip, "_invoke", ip_invoke, -1);


ip_invoke_core

ip_invoke_core   6777 ext/tk/tcltklib.c     v = ip_invoke_core(interp, argc, av);
ip_invoke_core   6795 ext/tk/tcltklib.c     return ip_invoke_core(q->interp, q->argc, q->argv);
ip_invoke_core   6832 ext/tk/tcltklib.c         ret = ip_invoke_core(q->interp, q->argc, q->argv);


ip_invoke_real

ip_invoke_real    120 ext/tk/tcltklib.c static VALUE ip_invoke_real _((int, VALUE*, VALUE));
ip_invoke_real   4239 ext/tk/tcltklib.c     return ip_invoke_real(2, argv, self);
ip_invoke_real   4255 ext/tk/tcltklib.c     return ip_invoke_real(3, argv, self);
ip_invoke_real   6881 ext/tk/tcltklib.c         result = ip_invoke_real(argc, argv, ip_obj);


ip_invoke_with_position

ip_invoke_with_position 6976 ext/tk/tcltklib.c     return ip_invoke_with_position(argc, argv, obj, TCL_QUEUE_TAIL);
ip_invoke_with_position 6987 ext/tk/tcltklib.c     return ip_invoke_with_position(argc, argv, obj, TCL_QUEUE_HEAD);


ip_null_namespace

ip_null_namespace 2638 ext/tk/tcltklib.c         && !ip_null_namespace(interp)
ip_null_namespace 4374 ext/tk/tcltklib.c     if (ip_null_namespace(ip)) {


ip_rbNamespaceObjCmd

ip_rbNamespaceObjCmd 4563 ext/tk/tcltklib.c static int ip_rbNamespaceObjCmd _((ClientData, Tcl_Interp *, int,
ip_rbNamespaceObjCmd 4634 ext/tk/tcltklib.c     Tcl_CreateObjCommand(interp, "namespace", ip_rbNamespaceObjCmd,


ip_rbTkWaitObjCmd

ip_rbTkWaitObjCmd 3028 ext/tk/tcltklib.c static int ip_rbTkWaitObjCmd _((ClientData, Tcl_Interp *, int,
ip_rbTkWaitObjCmd 3912 ext/tk/tcltklib.c         return ip_rbTkWaitObjCmd(clientData, interp, objc, objv);
ip_rbTkWaitObjCmd 4507 ext/tk/tcltklib.c     Tcl_CreateObjCommand(interp, "tkwait", ip_rbTkWaitObjCmd,


ip_rbUpdateObjCmd

ip_rbUpdateObjCmd 2757 ext/tk/tcltklib.c static int ip_rbUpdateObjCmd _((ClientData, Tcl_Interp *, int,
ip_rbUpdateObjCmd 2944 ext/tk/tcltklib.c         return ip_rbUpdateObjCmd(clientData, interp, objc, objv);
ip_rbUpdateObjCmd 4540 ext/tk/tcltklib.c     Tcl_CreateObjCommand(interp, "update", ip_rbUpdateObjCmd,


ip_rbVwaitObjCmd

ip_rbVwaitObjCmd 3024 ext/tk/tcltklib.c static int ip_rbVwaitObjCmd _((ClientData, Tcl_Interp *, int,
ip_rbVwaitObjCmd 3777 ext/tk/tcltklib.c         return ip_rbVwaitObjCmd(clientData, interp, objc, objv);
ip_rbVwaitObjCmd 4496 ext/tk/tcltklib.c     Tcl_CreateObjCommand(interp, "vwait", ip_rbVwaitObjCmd,


ip_rb_threadTkWaitObjCmd

ip_rb_threadTkWaitObjCmd 3030 ext/tk/tcltklib.c static int ip_rb_threadTkWaitObjCmd _((ClientData, Tcl_Interp *, int,
ip_rb_threadTkWaitObjCmd 3343 ext/tk/tcltklib.c         return ip_rb_threadTkWaitObjCmd(clientData, interp, objc, objv);
ip_rb_threadTkWaitObjCmd 4529 ext/tk/tcltklib.c     Tcl_CreateObjCommand(interp, "thread_tkwait", ip_rb_threadTkWaitObjCmd,


ip_rb_threadUpdateObjCmd

ip_rb_threadUpdateObjCmd 2902 ext/tk/tcltklib.c static int ip_rb_threadUpdateObjCmd _((ClientData, Tcl_Interp *, int,
ip_rb_threadUpdateObjCmd 4551 ext/tk/tcltklib.c     Tcl_CreateObjCommand(interp, "thread_update", ip_rb_threadUpdateObjCmd,


ip_rb_threadVwaitObjCmd

ip_rb_threadVwaitObjCmd 3026 ext/tk/tcltklib.c static int ip_rb_threadVwaitObjCmd _((ClientData, Tcl_Interp *, int,
ip_rb_threadVwaitObjCmd 3102 ext/tk/tcltklib.c         return ip_rb_threadVwaitObjCmd(clientData, interp, objc, objv);
ip_rb_threadVwaitObjCmd 4518 ext/tk/tcltklib.c     Tcl_CreateObjCommand(interp, "thread_vwait", ip_rb_threadVwaitObjCmd,


ip_replace_wait_commands

ip_replace_wait_commands 4844 ext/tk/tcltklib.c     ip_replace_wait_commands(ptr->ip, mainWin);
ip_replace_wait_commands 4942 ext/tk/tcltklib.c     ip_replace_wait_commands(slave->ip, mainWin);


ip_ruby_cmd

ip_ruby_cmd       349 ext/tk/tcltklib.c static int ip_ruby_cmd _((ClientData, Tcl_Interp *, int, Tcl_Obj *CONST*));
ip_ruby_cmd       352 ext/tk/tcltklib.c static int ip_ruby_cmd _((ClientData, Tcl_Interp *, int, char **));
ip_ruby_cmd      4806 ext/tk/tcltklib.c     Tcl_CreateObjCommand(ptr->ip, "ruby_cmd", ip_ruby_cmd, (ClientData)NULL,
ip_ruby_cmd      4816 ext/tk/tcltklib.c     Tcl_CreateCommand(ptr->ip, "ruby_cmd", ip_ruby_cmd, (ClientData)NULL,


ip_ruby_eval

ip_ruby_eval      348 ext/tk/tcltklib.c static int ip_ruby_eval _((ClientData, Tcl_Interp *, int, Tcl_Obj *CONST*));
ip_ruby_eval      351 ext/tk/tcltklib.c static int ip_ruby_eval _((ClientData, Tcl_Interp *, int, char **));
ip_ruby_eval     4800 ext/tk/tcltklib.c     Tcl_CreateObjCommand(ptr->ip, "ruby", ip_ruby_eval, (ClientData)NULL,
ip_ruby_eval     4803 ext/tk/tcltklib.c     Tcl_CreateObjCommand(ptr->ip, "ruby_eval", ip_ruby_eval, (ClientData)NULL,
ip_ruby_eval     4810 ext/tk/tcltklib.c     Tcl_CreateCommand(ptr->ip, "ruby", ip_ruby_eval, (ClientData)NULL,
ip_ruby_eval     4813 ext/tk/tcltklib.c     Tcl_CreateCommand(ptr->ip, "ruby_eval", ip_ruby_eval, (ClientData)NULL,


ip_set_variable

ip_set_variable  7353 ext/tk/tcltklib.c     return ip_set_variable(self, varname, value,
ip_set_variable  7875 ext/tk/tcltklib.c     rb_define_method(ip, "_set_variable", ip_set_variable, 3);


ip_set_variable2

ip_set_variable2 7254 ext/tk/tcltklib.c     return ip_set_variable2(self, varname, Qnil, value, flag);
ip_set_variable2 7364 ext/tk/tcltklib.c     return ip_set_variable2(self, varname, index, value,
ip_set_variable2 7876 ext/tk/tcltklib.c     rb_define_method(ip, "_set_variable2", ip_set_variable2, 4);


ip_unset_variable

ip_unset_variable 7373 ext/tk/tcltklib.c     return ip_unset_variable(self, varname,
ip_unset_variable 7877 ext/tk/tcltklib.c     rb_define_method(ip, "_unset_variable", ip_unset_variable, 2);


ip_unset_variable2

ip_unset_variable2 7325 ext/tk/tcltklib.c     return ip_unset_variable2(self, varname, Qnil, flag);
ip_unset_variable2 7383 ext/tk/tcltklib.c     return ip_unset_variable2(self, varname, index,
ip_unset_variable2 7878 ext/tk/tcltklib.c     rb_define_method(ip, "_unset_variable2", ip_unset_variable2, 3);


ip_wrap_namespace_command

ip_wrap_namespace_command 4847 ext/tk/tcltklib.c     ip_wrap_namespace_command(ptr->ip);
ip_wrap_namespace_command 4945 ext/tk/tcltklib.c     ip_wrap_namespace_command(slave->ip);


ipaddr

ipaddr            544 ext/socket/socket.c static VALUE ipaddr _((struct sockaddr*, int));
ipaddr            617 ext/socket/socket.c 	  return rb_assoc_new(str, ipaddr((struct sockaddr*)buf, fptr->mode & FMODE_NOREVLOOKUP));
ipaddr           1293 ext/socket/socket.c     VALUE (*ipaddr)_((struct sockaddr*, size_t));
ipaddr           1302 ext/socket/socket.c     VALUE (*ipaddr)_((struct sockaddr*, size_t)) = arg->ipaddr;
ipaddr           1334 ext/socket/socket.c 	rb_ary_push(ary, (*ipaddr)(ai->ai_addr, ai->ai_addrlen));
ipaddr           1350 ext/socket/socket.c     arg.ipaddr = ipaddr;
ipaddr           1529 ext/socket/socket.c     return ipaddr((struct sockaddr*)&addr, fptr->mode & FMODE_NOREVLOOKUP);
ipaddr           1544 ext/socket/socket.c     return ipaddr((struct sockaddr*)&addr, fptr->mode & FMODE_NOREVLOOKUP);
ipaddr           2682 ext/socket/socket.c 	ary = ipaddr(res->ai_addr, do_not_reverse_lookup);


is_absolute_path

is_absolute_path 2395 file.c         static int is_absolute_path(const char*);
is_absolute_path 2491 file.c             else if (!is_absolute_path(s)) {
is_absolute_path 4005 file.c             if (!is_absolute_path(p0)) {
is_absolute_path 4110 file.c             if (is_absolute_path(f)) {
is_absolute_path 4171 file.c             if (is_absolute_path(f)) {


is_alnum

is_alnum         3335 ext/nkf/nkf-utf8/nkf.c 		} else if (!is_alnum(prev0)) {
is_alnum         3735 ext/nkf/nkf-utf8/nkf.c                 c1=='-'||c1=='_'||is_alnum(c1) ) continue;
is_alnum         4316 ext/nkf/nkf-utf8/nkf.c         if (!( (c=='+'||c=='/'|| c=='=' || c=='?' || is_alnum(c))))


is_asgn_or_id

is_asgn_or_id     905 parse.y        				if (is_asgn_or_id(vid)) {
is_asgn_or_id    1660 parse.y        				if (is_asgn_or_id(vid)) {


is_attrset_id

is_attrset_id    8456 parse.y        	    if (id > tLAST_TOKEN && !is_attrset_id(id)) {
is_attrset_id    8503 parse.y            if (is_attrset_id(id)) {


is_class_id

is_class_id      7201 parse.y            else if (is_class_id(id)) {
is_class_id      7256 parse.y            else if (is_class_id(id)) {
is_class_id      8566 parse.y            if (is_class_id(id)) return Qtrue;


is_const_id

is_const_id      7198 parse.y            else if (is_const_id(id)) {
is_const_id      7251 parse.y            else if (is_const_id(id)) {
is_const_id      8559 parse.y            if (is_const_id(id)) return Qtrue;


is_defined

is_defined       2164 eval.c         static const char* is_defined(VALUE, NODE*, char*, int);
is_defined       2177 eval.c         		if (!is_defined(self, node->nd_head, buf, 0))
is_defined       2183 eval.c             else if (!is_defined(self, node, buf, 0)) {
is_defined       2220 eval.c         	if (!is_defined(self, node->nd_recv, buf, Qtrue)) return 0;
is_defined       2314 eval.c         	if (!is_defined(self, node->nd_recv, buf, Qtrue)) return 0;
is_defined       3445 eval.c         	if ((node->nd_aid && !is_defined(self, node->nd_head, 0, 0)) ||
is_defined       3939 eval.c         	    const char *desc = is_defined(self, node->nd_head, buf, 0);


is_digit

is_digit          629 missing/vsnprintf.c 			while (is_digit(ch)) {
is_digit          649 missing/vsnprintf.c 			} while (is_digit(ch));


is_global_id

is_global_id     6624 parse.y        	    if (!is_global_id(yylval_id())) {
is_global_id     7192 parse.y            else if (is_global_id(id)) {
is_global_id     7245 parse.y            else if (is_global_id(id)) {


is_identchar

is_identchar     5241 parse.y        	if (!is_identchar(uc)) {
is_identchar     5256 parse.y        		 (uc = (unsigned char)c, is_identchar(uc)));
is_identchar     5924 parse.y        	else if ((ISALNUM(c) || c == '_') && lex_p < lex_pend && is_identchar(*lex_p)) {
is_identchar     6578 parse.y        	    if (is_identchar(uc)) {
is_identchar     6615 parse.y        	    if (is_identchar(uc)) {
is_identchar     6658 parse.y        	    if (!is_identchar(uc)) {
is_identchar     6684 parse.y        	if (!is_identchar(uc)) {
is_identchar     6707 parse.y        	if (!is_identchar(uc)) {
is_identchar     6729 parse.y            } while (is_identchar(uc));
is_identchar     6730 parse.y            if ((c == '!' || c == '?') && is_identchar(tok()[0]) && !peek('=')) {
is_identchar     8326 parse.y        	if (is_identchar(*m)) m += mbclen(*m);
is_identchar     8397 parse.y        	while (is_identchar(*m)) m += mbclen(*m);
is_identchar     8471 parse.y        	while (m <= name + last && is_identchar(*m)) {


is_instance_id

is_instance_id   7195 parse.y            else if (is_instance_id(id)) {
is_instance_id   7248 parse.y            else if (is_instance_id(id)) {
is_instance_id   8573 parse.y            if (is_instance_id(id)) return Qtrue;


is_invalid_qualifier_target

is_invalid_qualifier_target 2045 regparse.c           return is_invalid_qualifier_target(NEFFECT(node).target);
is_invalid_qualifier_target 2050 regparse.c           if (! is_invalid_qualifier_target(NCONS(node).left)) return 0;
is_invalid_qualifier_target 2057 regparse.c           if (is_invalid_qualifier_target(NCONS(node).left)) return 1;
is_invalid_qualifier_target 5017 regparse.c           if (is_invalid_qualifier_target(*targetp))


is_left_anchor

is_left_anchor   3561 regcomp.c        if (is_left_anchor(anc))
is_left_anchor   3570 regcomp.c        if (is_left_anchor(anc))


is_local_id

is_local_id      4106 parse.y        			if (!is_local_id($1))
is_local_id      4149 parse.y        			if (!is_local_id($1))
is_local_id      4188 parse.y        			if (!is_local_id($2))
is_local_id      4221 parse.y        			if (!is_local_id($2))
is_local_id      6841 parse.y        	    if (last_state != EXPR_DOT && is_local_id(ident) && lvar_defined(ident)) {
is_local_id      7185 parse.y            else if (is_local_id(id)) {
is_local_id      7230 parse.y            else if (is_local_id(id)) {
is_local_id      7277 parse.y            if (!is_local_id(name)) {
is_local_id      8516 parse.y        	if (is_local_id(id2)) {
is_local_id      8580 parse.y            if (is_local_id(id)) return Qtrue;


is_newline

is_newline        136 ext/syck/token.c     if ( *(YYCURSOR - 1) == ' ' || is_newline( YYCURSOR - 1 ) ) \
is_newline        180 ext/syck/token.c                 while ( is_newline( fc ) ) fc--; \
is_newline        198 ext/syck/token.c         if ( is_newline( ++indent ) ) \
is_newline        241 ext/syck/token.c int is_newline( char *ptr );
is_newline        863 ext/syck/token.c {   if ( is_newline( YYCURSOR - 1 ) )
is_newline       1043 ext/syck/token.c                         if ( *YYCURSOR == '#' || is_newline( YYCURSOR ) || is_newline( YYCURSOR - 1 ) )


is_not_socket

is_not_socket    2085 win32/win32.c      nonsock += extract_fd(&else_rd, rd, is_not_socket);
is_not_socket    2094 win32/win32.c      nonsock += extract_fd(&else_wr, wr, is_not_socket);


is_notop_id

is_notop_id        49 parse.y        #define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL)
is_notop_id        50 parse.y        #define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL)
is_notop_id        51 parse.y        #define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE)
is_notop_id        52 parse.y        #define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET)
is_notop_id        53 parse.y        #define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST)
is_notop_id        54 parse.y        #define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS)
is_notop_id        55 parse.y        #define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK)
is_notop_id        57 parse.y        #define is_asgn_or_id(id) ((is_notop_id(id)) && \


is_pointer_to_heap

is_pointer_to_heap  616 gc.c           	if (is_pointer_to_heap((void *)v)) {
is_pointer_to_heap  676 gc.c               if (is_pointer_to_heap((void *)obj)) {
is_pointer_to_heap  862 gc.c           	    if (is_pointer_to_heap(obj->as.node.u1.node)) {
is_pointer_to_heap  865 gc.c           	    if (is_pointer_to_heap(obj->as.node.u2.node)) {
is_pointer_to_heap  868 gc.c           	    if (is_pointer_to_heap(obj->as.node.u3.node)) {
is_pointer_to_heap  965 gc.c           	       is_pointer_to_heap(obj) ? "corrupted object" : "non object");
is_pointer_to_heap 1894 gc.c               if (!is_pointer_to_heap((void *)ptr)|| BUILTIN_TYPE(ptr) >= T_BLOCK) {


is_ruby_native_thread

is_ruby_native_thread 10483 eval.c             if (!is_ruby_native_thread()) {
is_ruby_native_thread 1256 ext/tk/tcltklib.c     if (!is_ruby_native_thread()) {
is_ruby_native_thread 1264 ext/tk/tcltklib.c     if (!is_ruby_native_thread()) {
is_ruby_native_thread 2380 ext/tk/tcltklib.c     if (!is_ruby_native_thread()) {
is_ruby_native_thread 2788 ext/tk/tcltklib.c     if (!is_ruby_native_thread()) {
is_ruby_native_thread 2935 ext/tk/tcltklib.c     if (!is_ruby_native_thread()) {
is_ruby_native_thread 3112 ext/tk/tcltklib.c     if (!is_ruby_native_thread()) {
is_ruby_native_thread 5746 ext/tk/tcltklib.c         if (!is_ruby_native_thread()) {
is_ruby_native_thread 7928 ext/tk/tcltklib.c     is_ruby_native_thread();
is_ruby_native_thread 1273 gc.c               if (!is_ruby_native_thread()) {
is_ruby_native_thread  732 ruby.h         int is_ruby_native_thread(void);
is_ruby_native_thread  453 signal.c           if (!is_ruby_native_thread() && !rb_trap_accept_nativethreads[sig]) {
is_ruby_native_thread  482 signal.c           if (!is_ruby_native_thread() && !rb_trap_accept_nativethreads[sig]) {
is_ruby_native_thread  497 signal.c           if (!is_ruby_native_thread() && !rb_trap_accept_nativethreads[sig]) {


is_socket

is_socket        2156 io.c               if (is_socket(fptr->fd, fptr->path)) {
is_socket        2201 io.c               if (is_socket(fptr->fd, fptr->path)) {
is_socket        1730 win32/win32.c      return is_socket(TO_SOCKET(fd));
is_socket        1938 win32/win32.c      return !is_socket(sock);
is_socket        2766 win32/win32.c      if (!is_socket(sock)) {
is_socket        3784 win32/win32.c      if (!is_socket(sock)) {
is_socket        3802 win32/win32.c      if (!is_socket(sock)) {


is_special_global_name

is_special_global_name 8347 parse.y        	if (is_special_global_name(++m)) return Qtrue;
is_special_global_name 8423 parse.y        	if (is_special_global_name(++m)) goto new_id;


isalnum

isalnum            71 ruby.h         #define ISALNUM(c) (ISASCII(c) && isalnum((int)(unsigned char)(c)))
isalnum           182 wince/wince.h    #define ispunct(c) ( !(isalnum(c)||isspace(c))?1:0 )


isalpha

isalpha            98 missing/os2.c  	    !isalpha(*s) && index("$&*(){}[]'\";\\|?<>~`\n",*s)) {
isalpha           105 missing/os2.c  	    !isalpha(*s) && index("^()<>|&\n",*s)) {
isalpha            72 ruby.h         #define ISALPHA(c) (ISASCII(c) && isalpha((int)(unsigned char)(c)))
isalpha           574 win32/win32.c      while (isalpha(c)) {
isalpha          3280 win32/win32.c      st->st_dev = st->st_rdev = (isalpha(path[0]) && path[1] == ':') ?
isalpha           179 wince/wince.h    #define isalnum(c) ( (isalpha(c)||isdigit(c))?1:0 )


isatty

isatty             69 ext/readline/readline.c     if (!isatty(0) && errno == EBADF) rb_raise(rb_eIOError, "stdin closed");
isatty           1974 io.c               if (isatty(fptr->fd) == 0)
isatty           2642 io.c               if (isatty(fptr->fd))
isatty           3850 io.c               if (!isatty(fd)) {
isatty             85 x68/select.c   	    if (isatty (fd))


isdigit

isdigit           450 bignum.c       	else if (isdigit(c)) {
isdigit          1250 dln.c          	while (isdigit(*message[i])) message[i]++;
isdigit           230 ext/socket/getaddrinfo.c 		if (! isdigit(*q))
isdigit           271 ext/syck/rubyext.c         while ( isdigit( *end ) ) end++;
isdigit          2365 ext/syck/token.c             else if ( isdigit( *yyt ) )
isdigit           146 missing/strtod.c 	if (!isdigit(c)) {
isdigit           222 missing/strtod.c 	while (isdigit(*p)) {
isdigit            73 ruby.h         #define ISDIGIT(c) (ISASCII(c) && isdigit((int)(unsigned char)(c)))
isdigit           179 wince/wince.h    #define isalnum(c) ( (isalpha(c)||isdigit(c))?1:0 )


isdirsep

isdirsep         2299 file.c             while (isdirsep(*path)) path++;
isdirsep         2307 file.c             while (*s && !isdirsep(*s)) {
isdirsep         2323 file.c             if (isdirsep(path[0]) && isdirsep(path[1])) {
isdirsep         2325 file.c         	while (isdirsep(*path)) path++;
isdirsep         2326 file.c         	if (*(path = nextdirsep(path)) && path[1] && !isdirsep(path[1]))
isdirsep         2345 file.c         	if (isdirsep(*path)) {
isdirsep         2347 file.c         	    while (isdirsep(*path)) path++;
isdirsep         2363 file.c         	if (isdirsep(*path)) {
isdirsep         2365 file.c         	    while (isdirsep(*path)) path++;
isdirsep         2410 file.c         	if (isdirsep(s[1]) || s[1] == '\0') {
isdirsep         2458 file.c         	if (isdirsep(s[2])) {
isdirsep         2506 file.c         	if (isdirsep(*s)) {
isdirsep         2517 file.c         	do s++; while (isdirsep(*s));
isdirsep         2540 file.c         		    if (*(s+1) == '\0' || isdirsep(*(s+1))) {
isdirsep         2689 file.c             while (isdirsep(*name))
isdirsep         2719 file.c         	while (isdirsep(*p)) p++; /* skip last / */
isdirsep         2750 file.c             if (root > name + 1 && isdirsep(*name))
isdirsep         2763 file.c             if (has_drive_letter(name) && isdirsep(*(name + 2))) {
isdirsep         2903 file.c         	    if (RSTRING(tmp)->ptr && isdirsep(RSTRING(tmp)->ptr[0])) {
isdirsep         3986 file.c             if (has_drive_letter(path) && isdirsep(path[2])) return 1;
isdirsep         3989 file.c             if (isdirsep(path[0]) && isdirsep(path[1])) return 1;
isdirsep          567 win32/win32.c      if ((i == 0 || i > 0 && isdirsep(interp[i-1])) &&


isinf

isinf             805 bignum.c           if (isinf(d)) {
isinf             844 bignum.c           if (isinf(d)) {
isinf            3488 ext/bigdecimal/bigdecimal.c     if(isinf(d)) {
isinf             281 marshal.c          if (isinf(d)) {
isinf              65 missing.h      #ifndef isinf
isinf              70 missing.h      extern int isinf(double);
isinf              15 missing/erf.c  #  ifndef isinf
isinf               6 missing/finite.c     return !isnan(n) && !isinf(n);
isinf             712 missing/vsnprintf.c 			if (isinf(_double)) {
isinf             488 numeric.c          if (isinf(value))
isinf            1138 numeric.c          if (isinf(value)) {
isinf            1164 numeric.c          if (isinf(value) || isnan(value))
isinf             708 sprintf.c      		if (isnan(fval) || isinf(fval)) {
isinf               5 vms/vms.h      extern int isinf(double);


islower

islower           453 bignum.c       	else if (islower(c)) {
islower           530 missing/strftime.c 				if (islower(tbuf[i]))
islower            70 ruby.h         #define ISLOWER(c) (ISASCII(c) && islower((int)(unsigned char)(c)))


ismbchar

ismbchar         4495 parse.y        #define is_identchar(c) (SIGN_EXTEND_CHAR(c)!=-1&&(ISALNUM(c) || (c) == '_' || ismbchar(c)))
ismbchar         5119 parse.y        	else if (ismbchar(uc)) {
ismbchar         5920 parse.y        	else if (ismbchar(uc)) {
ismbchar         6497 parse.y        		if (ISALNUM(term) || ismbchar(uc)) {
ismbchar         6719 parse.y        	if (ismbchar(uc)) {
ismbchar         8396 parse.y        	if (*m != '_' && !ISALPHA(*m) && !ismbchar(*m)) return Qfalse;
ismbchar          270 re.c           	if (*p == '/' || (!ISPRINT(*p) && !ismbchar(*p))) {
ismbchar          293 re.c           	    else if (ismbchar(*p)) {
ismbchar         1723 re.c           	if (ismbchar(*s)) {
ismbchar         1752 re.c           	if (ismbchar(*s)) {
ismbchar         1996 re.c           	if (ismbchar(uc)) {
ismbchar         2349 string.c       	if (ismbchar(c) && p < pend) {
ismbchar         2522 string.c       	if (ismbchar(*s)) {
ismbchar         2574 string.c       	if (ismbchar(*s)) {
ismbchar         2636 string.c       	if (ismbchar(*s)) {
ismbchar         2687 string.c       	if (ismbchar(*s)) {


isnan

isnan             808 bignum.c           if (isnan(d)) {
isnan             936 bignum.c       	    if (isnan(a)) return Qfalse;
isnan            3484 ext/bigdecimal/bigdecimal.c     if(isnan(d)) {
isnan             285 marshal.c          else if (isnan(d)) {
isnan              68 missing.h      #  define isinf(x) (!finite(x) && !isnan(x))
isnan              76 missing.h      extern int isnan(double);
isnan              12 missing/erf.c  #  ifndef isnan
isnan              73 missing/erf.c          if (isnan(x)) return x;      /* erf(NaN)   = NaN   */
isnan              83 missing/erf.c          if (isnan(x)) return x;      /* erfc(NaN)   = NaN      */
isnan               6 missing/finite.c     return !isnan(n) && !isinf(n);
isnan              33 missing/isinf.c     return (!finite(n) && !isnan(n));
isnan             719 missing/vsnprintf.c 			if (isnan(_double)) {
isnan             490 numeric.c          else if(isnan(value))
isnan             812 numeric.c      	if (isnan(b)) return Qfalse;
isnan             818 numeric.c          if (isnan(a)) return Qfalse;
isnan             849 numeric.c          if (isnan(a) || isnan(b)) return Qnil;
isnan             914 numeric.c      	if (isnan(b)) return Qfalse;
isnan             920 numeric.c          if (isnan(a)) return Qfalse;
isnan             949 numeric.c      	if (isnan(b)) return Qfalse;
isnan             955 numeric.c          if (isnan(a)) return Qfalse;
isnan             983 numeric.c      	if (isnan(b)) return Qfalse;
isnan             989 numeric.c          if (isnan(a)) return Qfalse;
isnan            1018 numeric.c      	if (isnan(b)) return Qfalse;
isnan            1024 numeric.c          if (isnan(a)) return Qfalse;
isnan            1046 numeric.c      	if (isnan(a) || isnan(b)) return Qfalse;
isnan            1118 numeric.c          return isnan(value) ? Qtrue : Qfalse;
isnan            1164 numeric.c          if (isinf(value) || isnan(value))
isnan            2165 object.c       	  if (isnan(RFLOAT(f)->value)) {
isnan             708 sprintf.c      		if (isnan(fval) || isinf(fval)) {
isnan             711 sprintf.c      		    if  (isnan(fval)) {
isnan             718 sprintf.c      		    if ((!isnan(fval) && fval < 0.0) || (flags & FPLUS))
isnan             726 sprintf.c      			if (!isnan(fval) && fval < 0.0)
isnan             735 sprintf.c      			if (!isnan(fval) && fval < 0.0) {
isnan             753 sprintf.c      			if (!isnan(fval) && fval < 0.0)
isnan               6 vms/vms.h      extern int isnan(double);
isnan             231 win32/win32.h  #ifndef isnan


iso2022jp_check_conv

iso2022jp_check_conv  325 ext/nkf/nkf-utf8/nkf.c STATIC  void    iso2022jp_check_conv PROTO((int c2,int c1));
iso2022jp_check_conv 1865 ext/nkf/nkf-utf8/nkf.c 	o_iso2022jp_check_conv = oconv; oconv = iso2022jp_check_conv;


iso8601wknum

iso8601wknum      548 missing/strftime.c 			sprintf(tbuf, "%02d", iso8601wknum(timeptr));
iso8601wknum      570 missing/strftime.c 			w = iso8601wknum(timeptr);
iso8601wknum      707 missing/strftime.c 			weeknum = iso8601wknum(& dec31ly);


isprint

isprint           318 oniguruma.h      (isprint((int )code) && !isspace((int )code))
isprint            67 ruby.h         #define ISPRINT(c) (ISASCII(c) && isprint((int)(unsigned char)(c)))


isreadable

isreadable         87 x68/select.c   		if (XFD_ISSET (fd, rfds) && isreadable (accmode) && _dos_k_keysns ())
isreadable        117 x68/select.c   		if (XFD_ISSET (fd, rfds) && isreadable (accmode) && _dos_ioctrlis (fd))


isspace

isspace           120 missing/os2.c  	while (*s && isspace(*s)) s++;
isspace           123 missing/os2.c  	while (*s && !isspace(*s)) s++;
isspace           124 missing/strtod.c     while (isspace(*p)) {
isspace            11 missing/strtol.c     while (isspace(*p)) {
isspace            81 missing/strtoul.c     while (isspace(*p)) {
isspace           318 oniguruma.h      (isprint((int )code) && !isspace((int )code))
isspace            68 ruby.h         #define ISSPACE(c) (ISASCII(c) && isspace((int)(unsigned char)(c)))
isspace           573 win32/win32.c      } while (isspace(c));
isspace           182 wince/wince.h    #define ispunct(c) ( !(isalnum(c)||isspace(c))?1:0 )


isupper

isupper           456 bignum.c       	else if (isupper(c)) {
isupper            28 ext/readline/readline.c #define TOLOWER(c) (isupper(c) ? tolower(c) : c)
isupper            66 missing/os2.c  	    *s = isupper(*s) ? tolower(*s) : *s;
isupper            75 missing/os2.c  	    *s = isupper(*s) ? tolower(*s) : *s;
isupper            84 missing/os2.c  	    *s = isupper(*s) ? tolower(*s) : *s;
isupper            69 ruby.h         #define ISUPPER(c) (ISASCII(c) && isupper((int)(unsigned char)(c)))


iswritable

iswritable         93 x68/select.c   		if (XFD_ISSET (fd, wfds) && iswritable (accmode))
iswritable        123 x68/select.c   		if (XFD_ISSET (fd, wfds) && iswritable (accmode) && _dos_ioctrlos (fd))


itoh4

itoh4            4466 ext/nkf/nkf-utf8/nkf.c 	    (*o_mputc)(itoh4(((c>>4)&0xf)));
itoh4            4467 ext/nkf/nkf-utf8/nkf.c 	    (*o_mputc)(itoh4((c&0xf)));


ivar_get

ivar_get          940 variable.c         return ivar_get(obj, id, Qtrue);
ivar_get          946 variable.c         return ivar_get(obj, id, Qfalse);


ivar_i

ivar_i           1024 variable.c     	    st_foreach_safe(ROBJECT(obj)->iv_tbl, ivar_i, ary);
ivar_i           1033 variable.c     		st_foreach_safe(tbl, ivar_i, ary);


j_oconv

j_oconv           318 ext/nkf/nkf-utf8/nkf.c STATIC  void    j_oconv PROTO((int c2,int c1));
j_oconv           529 ext/nkf/nkf-utf8/nkf.c #   define  DEFAULT_CONV j_oconv
j_oconv          1146 ext/nkf/nkf-utf8/nkf.c             output_conv = j_oconv;


jmp_buf

jmp_buf           148 eval.c         static jmp_buf function_call_may_return_twice_jmp_buf;
jmp_buf           167 eval.c         typedef jmp_buf rb_jmpbuf_t;
jmp_buf          1268 gc.c               jmp_buf save_regs_gc_mark;


join_der

join_der          696 ext/openssl/ossl_asn1.c 	value = join_der(value);
join_der          974 ext/openssl/ossl_asn1.c     value = join_der(ossl_asn1_get_value(self));


join_path

join_path        1214 dir.c          	    char *tmp = join_path(path, dirsep, "");
join_path        1229 dir.c          	    char *buf = join_path(path, dirsep, dp->d_name);
join_path        1291 dir.c          		buf = join_path(path, dirsep, name);


jump_tag_but_local_jump

jump_tag_but_local_jump 1754 eval.c             jump_tag_but_local_jump(state, val);
jump_tag_but_local_jump 5752 eval.c         		jump_tag_but_local_jump(state, result);
jump_tag_but_local_jump 6631 eval.c             if (state) jump_tag_but_local_jump(state, Qundef);


k__END__

k__END__          263 ext/ripper/eventids2.c     {k__END__,          &ripper_id___end__},
k__END__         6698 parse.y        	    ripper_dispatch_scan_event(parser, k__END__);


k_strcpy

k_strcpy          273 regparse.c       k_strcpy(r + (dest_end - dest), src, src_end);
k_strcpy          286 regparse.c       k_strcpy(r, dest, dest_end);
k_strcpy          287 regparse.c       k_strcpy(r + (dest_end - dest), src, src_end);
k_strcpy         1347 regparse.c     	k_strcpy(NSTRING(node).s + len, s, end);
k_strcpy         1362 regparse.c           k_strcpy(NSTRING(node).s + len, s, end);


kanji_convert

kanji_convert     296 ext/nkf/nkf-utf8/nkf.c STATIC  int     kanji_convert PROTO((FILE *f));
kanji_convert     764 ext/nkf/nkf-utf8/nkf.c           kanji_convert(stdin);
kanji_convert     857 ext/nkf/nkf-utf8/nkf.c                   kanji_convert(fin);
kanji_convert     111 ext/nkf/nkf.c    kanji_convert(NULL);
kanji_convert     239 ext/nkf/nkf.c    kanji_convert( NULL );


kcode_getter

kcode_getter     2225 re.c               rb_define_virtual_variable("$KCODE", kcode_getter, kcode_setter);
kcode_getter     2226 re.c               rb_define_virtual_variable("$-K", kcode_getter, kcode_setter);


kcode_reset_option

kcode_reset_option  250 re.c               kcode_reset_option();
kcode_reset_option  480 re.c           	    kcode_reset_option();
kcode_reset_option  856 re.c           	kcode_reset_option();
kcode_reset_option  901 re.c           	kcode_reset_option();
kcode_reset_option  918 re.c           	kcode_reset_option();
kcode_reset_option 1345 re.c           	kcode_reset_option();
kcode_reset_option 1824 re.c               kcode_reset_option();


kcode_set_option

kcode_set_option  248 re.c               kcode_set_option(re);
kcode_set_option  470 re.c           	    kcode_set_option(re);
kcode_set_option  828 re.c           	    kcode_set_option(re);
kcode_set_option  854 re.c           	kcode_set_option(re);
kcode_set_option  899 re.c           	kcode_set_option(re);
kcode_set_option 1333 re.c           	kcode_set_option((VALUE)re);


kcode_setter

kcode_setter     2225 re.c               rb_define_virtual_variable("$KCODE", kcode_getter, kcode_setter);
kcode_setter     2226 re.c               rb_define_virtual_variable("$-K", kcode_getter, kcode_setter);


key2keyname

key2keyname       506 ext/tk/tkutil/tkutil.c             RARRAY(dst)->ptr[RARRAY(dst)->len++] = key2keyname(pair);
key2keyname       515 ext/tk/tkutil/tkutil.c                 = key2keyname(RARRAY(pair)->ptr[0]);
key2keyname       522 ext/tk/tkutil/tkutil.c                 = key2keyname(RARRAY(pair)->ptr[0]);
key2keyname       557 ext/tk/tkutil/tkutil.c             RARRAY(dst)->ptr[RARRAY(dst)->len++] = key2keyname(pair);
key2keyname       567 ext/tk/tkutil/tkutil.c                 = key2keyname(RARRAY(pair)->ptr[0]);
key2keyname       574 ext/tk/tkutil/tkutil.c                 = key2keyname(RARRAY(pair)->ptr[0]);
key2keyname       606 ext/tk/tkutil/tkutil.c     rb_ary_push(ary, key2keyname(key));
key2keyname       609 ext/tk/tkutil/tkutil.c     RARRAY(ary)->ptr[RARRAY(ary)->len++] = key2keyname(key);
key2keyname       654 ext/tk/tkutil/tkutil.c     rb_ary_push(ary, key2keyname(key));
key2keyname       660 ext/tk/tkutil/tkutil.c     RARRAY(ary)->ptr[RARRAY(ary)->len++] = key2keyname(key);


kill

kill              169 ext/pty/pty.c  	else if (kill(info->child_pid, 0) == 0) {
kill              282 signal.c       	    if (kill(-pid, sig) < 0)
kill              290 signal.c       	    if (kill(FIX2INT(argv[i]), sig) < 0)
kill              211 win32/win32.h  extern int kill(int, int);


last_status_set

last_status_set   584 process.c      	last_status_set(*st, pid);
last_status_set   614 process.c      	last_status_set(*st, result);
last_status_set   642 process.c          last_status_set(status, pid);
last_status_set   804 process.c      	last_status_set(status, pid);
last_status_set  1108 process.c          last_status_set(status == -1 ? 127 : status, 0);
last_status_set  1146 process.c      	    last_status_set(status == -1 ? 127 : status, 0);
last_status_set  1563 process.c          last_status_set(status == -1 ? 127 : status, 0);
last_status_set  1565 process.c          last_status_set((status & 0xff) << 8, 0);


lesser

lesser            825 string.c           len = lesser(RSTRING(str1)->len, RSTRING(str2)->len);
lesser            877 string.c       	       lesser(RSTRING(str1)->len, RSTRING(str2)->len)) == 0)
lesser            955 string.c           len = lesser(RSTRING(str1)->len, RSTRING(str2)->len);


lex_get_str

lex_get_str      4653 parse.y            lex_gets = lex_get_str;
lex_get_str      9113 parse.y        	parser->parser_lex_gets = lex_get_str;


lex_gets

lex_gets         4653 parse.y            lex_gets = lex_get_str;
lex_gets         4694 parse.y            lex_gets = lex_io_gets;


lex_gets_ptr

lex_gets_ptr     4613 parse.y            if (lex_gets_ptr) {
lex_gets_ptr     4614 parse.y        	if (RSTRING(s)->len == lex_gets_ptr) return Qnil;
lex_gets_ptr     4615 parse.y        	beg += lex_gets_ptr;
lex_gets_ptr     4622 parse.y            lex_gets_ptr = end - RSTRING(s)->ptr;
lex_gets_ptr     4654 parse.y            lex_gets_ptr = 0;


lex_goto_eol

lex_goto_eol     5266 parse.y            lex_goto_eol(parser);
lex_goto_eol     5286 parse.y            lex_goto_eol(parser);
lex_goto_eol     5363 parse.y        	    lex_goto_eol(parser);
lex_goto_eol     5741 parse.y        		lex_goto_eol(parser);
lex_goto_eol     5745 parse.y        		    lex_goto_eol(parser);
lex_goto_eol     5763 parse.y        		lex_goto_eol(parser);
lex_goto_eol     6697 parse.y        	    lex_goto_eol(parser);


lex_input

lex_input        4655 parse.y            lex_input = s;
lex_input        4695 parse.y            lex_input = file;
lex_input        4710 parse.y        	if (lex_input) {


lex_lastline

lex_lastline     4743 parse.y        	    lex_lastline = v;
lex_lastline     4746 parse.y        	    lex_lastline = 0;
lex_lastline     5270 parse.y        				  lex_lastline);		/* nd_orig */
lex_lastline     5290 parse.y            lex_lastline = line;
lex_lastline     5345 parse.y        	    p = RSTRING(lex_lastline)->ptr;
lex_lastline     6693 parse.y        	    lex_lastline = 0;


lex_p

lex_p            4459 parse.y            if (lex_p < parser->tokp) rb_raise(rb_eRuntimeError, "lex_p < tokp");
lex_p            4460 parse.y            if (lex_p == parser->tokp) return;
lex_p            4461 parse.y            str = rb_str_new(parser->tokp, lex_p - parser->tokp);
lex_p            4506 parse.y            p = lex_p;
lex_p            4513 parse.y            pe = lex_p;
lex_p            4527 parse.y        	i = lex_p - p;
lex_p            4656 parse.y            lex_pbeg = lex_p = lex_pend = 0;
lex_p            4696 parse.y            lex_pbeg = lex_p = lex_pend = 0;
lex_p            4707 parse.y            if (lex_p == lex_pend) {
lex_p            4738 parse.y        	    lex_pbeg = lex_p = RSTRING(v)->ptr;
lex_p            4739 parse.y        	    lex_pend = lex_p + RSTRING(v)->len;
lex_p            4750 parse.y            c = (unsigned char)*lex_p++;
lex_p            4751 parse.y            if (c == '\r' && lex_p < lex_pend && *lex_p == '\n') {
lex_p            4752 parse.y        	lex_p++;
lex_p            4763 parse.y            lex_p--;
lex_p            4764 parse.y            if (lex_p > lex_pbeg && lex_p[0] == '\n' && lex_p[-1] == '\r') {
lex_p            4765 parse.y        	lex_p--;
lex_p            4770 parse.y        #define was_bol() (lex_p == lex_pbeg + 1)
lex_p            4771 parse.y        #define peek(c) (lex_p != lex_pend && (c) == *lex_p)
lex_p            4839 parse.y        	    c = scan_oct(lex_p, 3, &numlen);
lex_p            4840 parse.y        	    lex_p += numlen;
lex_p            4848 parse.y        	    c = scan_hex(lex_p, 2, &numlen);
lex_p            4853 parse.y        	    lex_p += numlen;
lex_p            4936 parse.y        	    scan_hex(lex_p, 2, &numlen);
lex_p            5079 parse.y        	else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) {
lex_p            5080 parse.y        	    int c2 = *lex_p;
lex_p            5265 parse.y            len = lex_p - lex_pbeg;
lex_p            5293 parse.y            lex_p = lex_pbeg + here->nd_nth;
lex_p            5576 parse.y        	if (lex_pend - lex_p >= 2 &&
lex_p            5577 parse.y        	    (unsigned char)lex_p[0] == 0xbb &&
lex_p            5578 parse.y        	    (unsigned char)lex_p[1] == 0xbf) {
lex_p            5580 parse.y        	    lex_p += 2;
lex_p            5658 parse.y        	    parser_pragma(parser, lex_p, lex_pend - lex_p);
lex_p            5660 parse.y        	lex_p = lex_pend;
lex_p            5737 parse.y        	    if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) {
lex_p            5758 parse.y        		    if (strncmp(lex_p, "end", 3) == 0 &&
lex_p            5759 parse.y        			(lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) {
lex_p            5924 parse.y        	else if ((ISALNUM(c) || c == '_') && lex_p < lex_pend && is_identchar(*lex_p)) {
lex_p            6762 parse.y        			(!peek('=') || (lex_p + 1 < lex_pend && lex_p[1] == '>'))) {
lex_p            6816 parse.y        		if (peek(':') && !(lex_p + 1 < lex_pend && lex_p[1] == ':')) {


lex_pbeg

lex_pbeg         4473 parse.y            parser->tokp = lex_pbeg + parser->delayed_col;
lex_pbeg         4507 parse.y            while (lex_pbeg <= p) {
lex_pbeg         4656 parse.y            lex_pbeg = lex_p = lex_pend = 0;
lex_pbeg         4696 parse.y            lex_pbeg = lex_p = lex_pend = 0;
lex_pbeg         4724 parse.y        		    parser->delayed_col = parser->tokp - lex_pbeg;
lex_pbeg         4738 parse.y        	    lex_pbeg = lex_p = RSTRING(v)->ptr;
lex_pbeg         4764 parse.y            if (lex_p > lex_pbeg && lex_p[0] == '\n' && lex_p[-1] == '\r') {
lex_pbeg         4770 parse.y        #define was_bol() (lex_p == lex_pbeg + 1)
lex_pbeg         5265 parse.y            len = lex_p - lex_pbeg;
lex_pbeg         5291 parse.y            lex_pbeg = RSTRING(line)->ptr;
lex_pbeg         5292 parse.y            lex_pend = lex_pbeg + RSTRING(line)->len;
lex_pbeg         5293 parse.y            lex_p = lex_pbeg + here->nd_nth;
lex_pbeg         5307 parse.y            const char *p = lex_pbeg;


lex_pend

lex_pend         4514 parse.y            while (pe < lex_pend) {
lex_pend         4656 parse.y            lex_pbeg = lex_p = lex_pend = 0;
lex_pend         4696 parse.y            lex_pbeg = lex_p = lex_pend = 0;
lex_pend         4707 parse.y            if (lex_p == lex_pend) {
lex_pend         4718 parse.y        	    if (parser->tokp < lex_pend) {
lex_pend         4722 parse.y        				   parser->tokp, lex_pend - parser->tokp);
lex_pend         4728 parse.y        				   parser->tokp, lex_pend - parser->tokp);
lex_pend         4739 parse.y        	    lex_pend = lex_p + RSTRING(v)->len;
lex_pend         4751 parse.y            if (c == '\r' && lex_p < lex_pend && *lex_p == '\n') {
lex_pend         4771 parse.y        #define peek(c) (lex_p != lex_pend && (c) == *lex_p)
lex_pend         5079 parse.y        	else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) {
lex_pend         5292 parse.y            lex_pend = lex_pbeg + RSTRING(line)->len;
lex_pend         5313 parse.y            n= lex_pend - (p + len);
lex_pend         5346 parse.y        	    pend = lex_pend;
lex_pend         5362 parse.y        	    if (pend < lex_pend) rb_str_cat(str, "\n", 1);
lex_pend         5576 parse.y        	if (lex_pend - lex_p >= 2 &&
lex_pend         5658 parse.y        	    parser_pragma(parser, lex_p, lex_pend - lex_p);
lex_pend         5660 parse.y        	lex_p = lex_pend;
lex_pend         5759 parse.y        			(lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) {
lex_pend         5924 parse.y        	else if ((ISALNUM(c) || c == '_') && lex_p < lex_pend && is_identchar(*lex_p)) {
lex_pend         6762 parse.y        			(!peek('=') || (lex_p + 1 < lex_pend && lex_p[1] == '>'))) {
lex_pend         6816 parse.y        		if (peek(':') && !(lex_p + 1 < lex_pend && lex_p[1] == ':')) {


lex_state

lex_state         619 parse.y        			lex_state = EXPR_BEG;
lex_state         728 parse.y        stmt		: kALIAS fitem {lex_state = EXPR_FNAME;} fitem
lex_state        1546 parse.y        			lex_state = EXPR_END;
lex_state        1556 parse.y        			lex_state = EXPR_END;
lex_state        1588 parse.y        		| undef_list ',' {lex_state = EXPR_FNAME;} fitem
lex_state        2387 parse.y        		| tLPAREN_ARG  {lex_state = EXPR_ENDARG;} rparen
lex_state        2396 parse.y        		| tLPAREN_ARG call_args2 {lex_state = EXPR_ENDARG;} rparen
lex_state        2509 parse.y        		| tLPAREN_ARG expr {lex_state = EXPR_ENDARG;} rparen
lex_state        2865 parse.y        		| kDEF singleton dot_or_colon {lex_state = EXPR_FNAME;} fname
lex_state        2870 parse.y        			lex_state = EXPR_END; /* force for args */
lex_state        3779 parse.y        			lex_state = EXPR_BEG;
lex_state        3795 parse.y        			lex_state = EXPR_BEG;
lex_state        3843 parse.y        			lex_state = EXPR_END;
lex_state        3861 parse.y        			lex_state = EXPR_END;
lex_state        3963 parse.y        			lex_state = EXPR_BEG;
lex_state        3985 parse.y        			lex_state = EXPR_BEG;
lex_state        4260 parse.y        		| '(' {lex_state = EXPR_BEG;} expr rparen
lex_state        5590 parse.y        #define IS_ARG() (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG)
lex_state        5591 parse.y        #define IS_BEG() (lex_state == EXPR_BEG || lex_state == EXPR_MID || lex_state == EXPR_VALUE || lex_state == EXPR_CLASS)
lex_state        5611 parse.y        		lex_state = EXPR_END;
lex_state        5619 parse.y        		lex_state = EXPR_END;
lex_state        5667 parse.y        	switch (lex_state) {
lex_state        5684 parse.y        	lex_state = EXPR_BEG;
lex_state        5691 parse.y        		lex_state = EXPR_BEG;
lex_state        5700 parse.y        		lex_state = EXPR_BEG;
lex_state        5715 parse.y        	switch (lex_state) {
lex_state        5717 parse.y        	    lex_state = EXPR_ARG; break;
lex_state        5719 parse.y        	    lex_state = EXPR_BEG; break;
lex_state        5724 parse.y        	lex_state = EXPR_BEG;
lex_state        5771 parse.y        	switch (lex_state) {
lex_state        5773 parse.y        	    lex_state = EXPR_ARG; break;
lex_state        5775 parse.y        	    lex_state = EXPR_BEG; break;
lex_state        5796 parse.y        	    lex_state != EXPR_END &&
lex_state        5797 parse.y        	    lex_state != EXPR_END2 &&
lex_state        5798 parse.y        	    lex_state != EXPR_DOT &&
lex_state        5799 parse.y        	    lex_state != EXPR_ENDARG &&
lex_state        5800 parse.y        	    lex_state != EXPR_CLASS &&
lex_state        5805 parse.y        	switch (lex_state) {
lex_state        5807 parse.y        	    lex_state = EXPR_ARG; break;
lex_state        5809 parse.y        	    lex_state = EXPR_BEG; break;
lex_state        5821 parse.y        		lex_state = EXPR_BEG;
lex_state        5831 parse.y        	switch (lex_state) {
lex_state        5833 parse.y        	    lex_state = EXPR_ARG; break;
lex_state        5835 parse.y        	    lex_state = EXPR_BEG; break;
lex_state        5843 parse.y        		lex_state = EXPR_BEG;
lex_state        5857 parse.y        	if (lex_state == EXPR_FNAME) {
lex_state        5858 parse.y        	    lex_state = EXPR_END;
lex_state        5861 parse.y        	if (lex_state == EXPR_DOT) {
lex_state        5863 parse.y        		lex_state = EXPR_CMDARG;
lex_state        5865 parse.y        		lex_state = EXPR_ARG;
lex_state        5876 parse.y        	if (lex_state == EXPR_END ||
lex_state        5877 parse.y        	    lex_state == EXPR_END2 ||
lex_state        5878 parse.y        	    lex_state == EXPR_ENDARG) {
lex_state        5879 parse.y        	    lex_state = EXPR_VALUE;
lex_state        5917 parse.y        	    lex_state = EXPR_VALUE;
lex_state        5931 parse.y        	lex_state = EXPR_END;
lex_state        5937 parse.y        	    lex_state = EXPR_BEG;
lex_state        5940 parse.y        		lex_state = EXPR_BEG;
lex_state        5948 parse.y        	    lex_state = EXPR_BEG;
lex_state        5962 parse.y        	switch (lex_state) {
lex_state        5964 parse.y        	    lex_state = EXPR_ARG; break;
lex_state        5966 parse.y        	    lex_state = EXPR_BEG;
lex_state        5972 parse.y        	    lex_state = EXPR_BEG;
lex_state        5975 parse.y        		lex_state = EXPR_BEG;
lex_state        5983 parse.y        	    lex_state = EXPR_BEG;
lex_state        5986 parse.y        	if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
lex_state        5987 parse.y        	    lex_state = EXPR_ARG;
lex_state        5990 parse.y        	    lex_state = EXPR_BEG;
lex_state        5997 parse.y        	if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
lex_state        5998 parse.y        	    lex_state = EXPR_ARG;
lex_state        6007 parse.y        	    lex_state = EXPR_BEG;
lex_state        6013 parse.y        	    lex_state = EXPR_BEG;
lex_state        6021 parse.y        	lex_state = EXPR_BEG;
lex_state        6027 parse.y        	if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
lex_state        6028 parse.y        	    lex_state = EXPR_ARG;
lex_state        6037 parse.y        	    lex_state = EXPR_BEG;
lex_state        6041 parse.y        	    enum lex_state_e state = lex_state;
lex_state        6042 parse.y        	    lex_state = EXPR_ARG;
lex_state        6056 parse.y        	    lex_state = EXPR_BEG;
lex_state        6063 parse.y        	lex_state = EXPR_BEG;
lex_state        6068 parse.y        	lex_state = EXPR_BEG;
lex_state        6080 parse.y        	lex_state = EXPR_DOT;
lex_state        6090 parse.y        	    lex_state = EXPR_END;
lex_state        6307 parse.y        	lex_state = EXPR_END;
lex_state        6314 parse.y        		lex_state == EXPR_CLASS || (IS_ARG() && space_seen)) {
lex_state        6315 parse.y        		lex_state = EXPR_BEG;
lex_state        6318 parse.y        	    lex_state = EXPR_DOT;
lex_state        6321 parse.y        	if (lex_state == EXPR_END || lex_state == EXPR_END2 ||
lex_state        6322 parse.y        	    lex_state == EXPR_ENDARG || ISSPACE(c)) {
lex_state        6324 parse.y        	    lex_state = EXPR_BEG;
lex_state        6338 parse.y        	lex_state = EXPR_FNAME;
lex_state        6348 parse.y        	    lex_state = EXPR_BEG;
lex_state        6359 parse.y        	switch (lex_state) {
lex_state        6361 parse.y        	    lex_state = EXPR_ARG; break;
lex_state        6363 parse.y        	    lex_state = EXPR_BEG; break;
lex_state        6370 parse.y        	    lex_state = EXPR_BEG;
lex_state        6373 parse.y        	switch (lex_state) {
lex_state        6375 parse.y        	    lex_state = EXPR_ARG; break;
lex_state        6377 parse.y        	    lex_state = EXPR_BEG; break;
lex_state        6383 parse.y        	if (lex_state != EXPR_END2 && peek(';')) {
lex_state        6384 parse.y        	    lex_state = EXPR_END2;
lex_state        6387 parse.y        	lex_state = EXPR_BEG;
lex_state        6392 parse.y        	lex_state = EXPR_BEG;
lex_state        6396 parse.y        	if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
lex_state        6401 parse.y        	switch (lex_state) {
lex_state        6403 parse.y        	    lex_state = EXPR_ARG; break;
lex_state        6405 parse.y        	    lex_state = EXPR_BEG; break;
lex_state        6414 parse.y        	    if (lex_state == EXPR_CMDARG) {
lex_state        6417 parse.y        	    else if (lex_state == EXPR_ARG) {
lex_state        6425 parse.y        	lex_state = EXPR_BEG;
lex_state        6430 parse.y        	if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
lex_state        6431 parse.y        	    lex_state = EXPR_ARG;
lex_state        6448 parse.y        	lex_state = EXPR_BEG;
lex_state        6455 parse.y        	    lex_state = EXPR_BEG;
lex_state        6460 parse.y        	if (IS_ARG() || lex_state == EXPR_END || lex_state == EXPR_END2)
lex_state        6462 parse.y        	else if (lex_state == EXPR_ENDARG)
lex_state        6468 parse.y        	lex_state = EXPR_BEG;
lex_state        6544 parse.y        		lex_state = EXPR_FNAME;
lex_state        6554 parse.y        	    lex_state = EXPR_BEG;
lex_state        6560 parse.y        	switch (lex_state) {
lex_state        6562 parse.y        	    lex_state = EXPR_ARG; break;
lex_state        6564 parse.y        	    lex_state = EXPR_BEG; break;
lex_state        6570 parse.y        	last_state = lex_state;
lex_state        6571 parse.y        	lex_state = EXPR_END;
lex_state        6741 parse.y        	last_state = lex_state;
lex_state        6744 parse.y        	    lex_state = EXPR_END;
lex_state        6748 parse.y        	    lex_state = EXPR_END;
lex_state        6760 parse.y        		if (lex_state == EXPR_FNAME) {
lex_state        6779 parse.y        	    if (lex_state != EXPR_DOT) {
lex_state        6785 parse.y        		    enum lex_state_e state = lex_state;
lex_state        6786 parse.y        		    lex_state = kw->state;
lex_state        6807 parse.y        			    lex_state = EXPR_BEG;
lex_state        6813 parse.y        	    if ((lex_state == EXPR_BEG && !cmd_state) ||
lex_state        6814 parse.y        		lex_state == EXPR_ARG ||
lex_state        6815 parse.y        		lex_state == EXPR_CMDARG) {
lex_state        6817 parse.y        		    lex_state = EXPR_BEG;
lex_state        6824 parse.y        		lex_state == EXPR_DOT ||
lex_state        6827 parse.y        		    lex_state = EXPR_CMDARG;
lex_state        6830 parse.y        		    lex_state = EXPR_ARG;
lex_state        6834 parse.y        		lex_state = EXPR_END;
lex_state        6842 parse.y        		lex_state = EXPR_END;


lex_strterm

lex_strterm      3777 parse.y        			$<node>$ = lex_strterm;
lex_strterm      3778 parse.y        			lex_strterm = 0;
lex_strterm      3784 parse.y        			lex_strterm = $<node>2;
lex_strterm      3793 parse.y        			$<node>$ = lex_strterm;
lex_strterm      3794 parse.y        			lex_strterm = 0;
lex_strterm      3801 parse.y        			lex_strterm = $<node>2;
lex_strterm      4592 parse.y            lex_strterm = 0;
lex_strterm      5267 parse.y            lex_strterm = rb_node_newnode(NODE_HEREDOC,
lex_strterm      5271 parse.y            nd_set_line(lex_strterm, ruby_sourceline);
lex_strterm      5334 parse.y        	heredoc_restore(lex_strterm);
lex_strterm      5335 parse.y        	lex_strterm = 0;
lex_strterm      5339 parse.y        	heredoc_restore(lex_strterm);
lex_strterm      5395 parse.y            heredoc_restore(lex_strterm);
lex_strterm      5396 parse.y            lex_strterm = NEW_STRTERM(-1, 0, 0);
lex_strterm      5605 parse.y            if (lex_strterm) {
lex_strterm      5607 parse.y        	if (nd_type(lex_strterm) == NODE_HEREDOC) {
lex_strterm      5608 parse.y        	    token = here_document(lex_strterm);
lex_strterm      5610 parse.y        		lex_strterm = 0;
lex_strterm      5615 parse.y        	    token = parse_string(lex_strterm);
lex_strterm      5617 parse.y        		rb_gc_force_recycle((VALUE)lex_strterm);
lex_strterm      5618 parse.y        		lex_strterm = 0;
lex_strterm      5853 parse.y        	lex_strterm = NEW_STRTERM(str_dquote, '"', 0);
lex_strterm      5868 parse.y        	lex_strterm = NEW_STRTERM(str_xquote, '`', 0);
lex_strterm      5872 parse.y        	lex_strterm = NEW_STRTERM(str_squote, '\'', 0);
lex_strterm      6329 parse.y        	    lex_strterm = NEW_STRTERM(str_ssym, c, 0);
lex_strterm      6332 parse.y        	    lex_strterm = NEW_STRTERM(str_dsym, c, 0);
lex_strterm      6343 parse.y        	    lex_strterm = NEW_STRTERM(str_regexp, '/', 0);
lex_strterm      6355 parse.y        		lex_strterm = NEW_STRTERM(str_regexp, '/', 0);
lex_strterm      6515 parse.y        		lex_strterm = NEW_STRTERM(str_dquote, term, paren);
lex_strterm      6519 parse.y        		lex_strterm = NEW_STRTERM(str_squote, term, paren);
lex_strterm      6523 parse.y        		lex_strterm = NEW_STRTERM(str_dquote | STR_FUNC_QWORDS, term, paren);
lex_strterm      6529 parse.y        		lex_strterm = NEW_STRTERM(str_squote | STR_FUNC_QWORDS, term, paren);
lex_strterm      6535 parse.y        		lex_strterm = NEW_STRTERM(str_xquote, term, paren);
lex_strterm      6539 parse.y        		lex_strterm = NEW_STRTERM(str_regexp, term, paren);
lex_strterm      6543 parse.y        		lex_strterm = NEW_STRTERM(str_ssym, term, paren);


lexer_i

lexer_i           207 ext/racc/cparse/cparse.c static VALUE lexer_i _((VALUE block_args, VALUE data, VALUE self));
lexer_i           275 ext/racc/cparse/cparse.c     rb_iterate(lexer_iter, v->value_v, lexer_i, v->value_v);


lexer_iter

lexer_iter        206 ext/racc/cparse/cparse.c static VALUE lexer_iter _((VALUE data));
lexer_iter        275 ext/racc/cparse/cparse.c     rb_iterate(lexer_iter, v->value_v, lexer_i, v->value_v);


lib_UTF_backslash_core

lib_UTF_backslash_core 6336 ext/tk/tcltklib.c     return lib_UTF_backslash_core(self, str, 0);
lib_UTF_backslash_core 6344 ext/tk/tcltklib.c     return lib_UTF_backslash_core(self, str, 1);


lib_conv_listelement

lib_conv_listelement 7829 ext/tk/tcltklib.c                               lib_conv_listelement, 1);
lib_conv_listelement 7890 ext/tk/tcltklib.c     rb_define_method(ip, "_conv_listelement", lib_conv_listelement, 1);


lib_do_one_event_core

lib_do_one_event_core 2103 ext/tk/tcltklib.c     return lib_do_one_event_core(argc, argv, self, 0);
lib_do_one_event_core 2112 ext/tk/tcltklib.c     return lib_do_one_event_core(argc, argv, self, 0);


lib_eventloop_ensure

lib_eventloop_ensure 1775 ext/tk/tcltklib.c                      lib_eventloop_ensure, (VALUE)args);
lib_eventloop_ensure 1778 ext/tk/tcltklib.c                      lib_eventloop_ensure, (VALUE)args);


lib_eventloop_launcher

lib_eventloop_launcher 1798 ext/tk/tcltklib.c     return lib_eventloop_launcher(RTEST(check_rootwidget), 0,
lib_eventloop_launcher 1827 ext/tk/tcltklib.c     return lib_eventloop_launcher(RTEST(check_rootwidget), 0,
lib_eventloop_launcher 2010 ext/tk/tcltklib.c     foundEvent = RTEST(lib_eventloop_launcher(/* not check root-widget */0, 0,
lib_eventloop_launcher 2841 ext/tk/tcltklib.c     ret = RTEST(lib_eventloop_launcher(0, flags, (int *)NULL, interp)); /* ignore result */
lib_eventloop_launcher 3174 ext/tk/tcltklib.c     foundEvent = RTEST(lib_eventloop_launcher(/* not check root-widget */0,
lib_eventloop_launcher 3462 ext/tk/tcltklib.c         lib_eventloop_launcher(check_rootwidget_flag, 0, &done, interp);
lib_eventloop_launcher 3531 ext/tk/tcltklib.c         lib_eventloop_launcher(check_rootwidget_flag, 0, &done, interp);
lib_eventloop_launcher 3628 ext/tk/tcltklib.c         lib_eventloop_launcher(check_rootwidget_flag, 0, &done, interp);


lib_eventloop_main_core

lib_eventloop_main_core 1651 ext/tk/tcltklib.c     return lib_eventloop_main_core(args);
lib_eventloop_main_core 1657 ext/tk/tcltklib.c     ret = rb_protect(lib_eventloop_main_core, args, &status);
lib_eventloop_main_core 1777 ext/tk/tcltklib.c     return rb_ensure(lib_eventloop_main_core, (VALUE)args,


lib_evloop_abort_on_exc

lib_evloop_abort_on_exc 1182 ext/tk/tcltklib.c     return lib_evloop_abort_on_exc(self);
lib_evloop_abort_on_exc 1197 ext/tk/tcltklib.c     return lib_evloop_abort_on_exc(self);
lib_evloop_abort_on_exc 1210 ext/tk/tcltklib.c         return lib_evloop_abort_on_exc(self);
lib_evloop_abort_on_exc 1215 ext/tk/tcltklib.c         return lib_evloop_abort_on_exc(self);
lib_evloop_abort_on_exc 7809 ext/tk/tcltklib.c                              lib_evloop_abort_on_exc, 0);


lib_evloop_abort_on_exc_set

lib_evloop_abort_on_exc_set 1217 ext/tk/tcltklib.c     return lib_evloop_abort_on_exc_set(self, val);
lib_evloop_abort_on_exc_set 7811 ext/tk/tcltklib.c                              lib_evloop_abort_on_exc_set, 1);


lib_fromUTF8_core

lib_fromUTF8_core 6264 ext/tk/tcltklib.c     return lib_fromUTF8_core(Qnil, str, encodename);
lib_fromUTF8_core 6278 ext/tk/tcltklib.c     return lib_fromUTF8_core(self, str, encodename);


lib_get_system_encoding

lib_get_system_encoding 6369 ext/tk/tcltklib.c         return lib_get_system_encoding(self);
lib_get_system_encoding 7838 ext/tk/tcltklib.c                               lib_get_system_encoding, 0);
lib_get_system_encoding 7842 ext/tk/tcltklib.c                               lib_get_system_encoding, 0);


lib_mainloop

lib_mainloop     1819 ext/tk/tcltklib.c     return lib_mainloop(argc, argv, self);
lib_mainloop     7800 ext/tk/tcltklib.c     rb_define_module_function(lib, "mainloop", lib_mainloop, -1);


lib_mainloop_watchdog

lib_mainloop_watchdog 1935 ext/tk/tcltklib.c     return lib_mainloop_watchdog(argc, argv, self);
lib_mainloop_watchdog 7804 ext/tk/tcltklib.c                               lib_mainloop_watchdog, -1);


lib_merge_tklist

lib_merge_tklist 7827 ext/tk/tcltklib.c     rb_define_module_function(lib, "_merge_tklist", lib_merge_tklist, -1);
lib_merge_tklist 7889 ext/tk/tcltklib.c     rb_define_method(ip, "_merge_tklist", lib_merge_tklist, -1);


lib_set_system_encoding

lib_set_system_encoding 7840 ext/tk/tcltklib.c                               lib_set_system_encoding, 1);
lib_set_system_encoding 7844 ext/tk/tcltklib.c                               lib_set_system_encoding, 1);


lib_split_tklist_core

lib_split_tklist_core 7508 ext/tk/tcltklib.c     return lib_split_tklist_core(Qnil, list_str);
lib_split_tklist_core 7517 ext/tk/tcltklib.c     return lib_split_tklist_core(self, list_str);


lib_toUTF8_core

lib_toUTF8_core  6105 ext/tk/tcltklib.c     return lib_toUTF8_core(Qnil, str, encodename);
lib_toUTF8_core  6119 ext/tk/tcltklib.c     return lib_toUTF8_core(self, str, encodename);


limited_rand

limited_rand      466 random.c                       return LONG2NUM(limited_rand(FIX2LONG((VALUE)limit)));
limited_rand      485 random.c           val = limited_rand(max-1);


link

link             7463 eval.c             struct end_proc_data *link = ALLOC(struct end_proc_data);
link             7468 eval.c             link->next = *list;
link             7469 eval.c             link->func = func;
link             7470 eval.c             link->data = data;
link             7471 eval.c             link->safe = ruby_safe_level;
link             7472 eval.c             *list = link;
link             7478 eval.c             struct end_proc_data *link;
link             7480 eval.c             link = end_procs;
link             7481 eval.c             while (link) {
link             7482 eval.c         	rb_gc_mark(link->data);
link             7483 eval.c         	link = link->next;
link             7485 eval.c             link = ephemeral_end_procs;
link             7486 eval.c             while (link) {
link             7487 eval.c         	rb_gc_mark(link->data);
link             7488 eval.c         	link = link->next;
link             7490 eval.c             link = tmp_end_procs;
link             7491 eval.c             while (link) {
link             7492 eval.c         	rb_gc_mark(link->data);
link             7493 eval.c         	link = link->next;
link             7559 eval.c             struct end_proc_data *link, *tmp;
link             7564 eval.c         	tmp_end_procs = link = ephemeral_end_procs;
link             7566 eval.c         	while (link) {
link             7569 eval.c         		ruby_safe_level = link->safe;
link             7570 eval.c         		(*link->func)(link->data);
link             7576 eval.c         	    tmp = link;
link             7577 eval.c         	    tmp_end_procs = link = link->next;
link             7582 eval.c         	tmp_end_procs = link = end_procs;
link             7584 eval.c         	while (link) {
link             7587 eval.c         		ruby_safe_level = link->safe;
link             7588 eval.c         		(*link->func)(link->data);
link             7594 eval.c         	    tmp = link;
link             7595 eval.c         	    tmp_end_procs = link = link->next;
link             2045 file.c             if (link(StringValueCStr(from), StringValueCStr(to)) < 0) {
link              204 win32/win32.h  extern int link(const char *, const char *);


list_append

list_append       263 parse.y        static NODE *list_append(NODE*,NODE*);
list_append       934 parse.y        			$3 = list_append($3, NEW_NIL());
list_append      1284 parse.y        			$$ = NEW_MASGN(list_append($1,$2), 0);
list_append      1345 parse.y        			$$ = list_append($1, $2);
list_append      1689 parse.y        			$3 = list_append($3, NEW_NIL());
list_append      2170 parse.y        			$$ = list_append($2, $4);
list_append      2232 parse.y        			$$ = list_append($1, NEW_HASH($3));
list_append      2242 parse.y        			$$ = arg_concat(list_append($1, NEW_HASH($3)), $6);
list_append      2324 parse.y        			$$ = list_append(NEW_LIST($1), NEW_HASH($3));
list_append      2334 parse.y        			$$ = list_append(list_concat(NEW_LIST($1),$3), NEW_HASH($5));
list_append      2344 parse.y        			$$ = arg_concat(list_append(NEW_LIST($1), NEW_HASH($3)), $6);
list_append      2355 parse.y        			$$ = arg_concat(list_append(list_concat(NEW_LIST($1), $3), NEW_HASH($5)), $8);
list_append      2435 parse.y        			$$ = list_append($1, $3);
list_append      2445 parse.y        			$$ = list_append($1, $3);
list_append      3008 parse.y        			$$ = list_append($1, $3);
list_append      3471 parse.y        			$$ = list_append($1, NEW_WHEN($4, 0, 0));
list_append      3681 parse.y        			$$ = list_append($1, evstr2dstr($2));
list_append      3731 parse.y        			$$ = list_append($1, $2);
list_append      4327 parse.y        			$$ = list_append(NEW_LIST($1), $3);
list_append      4335 parse.y        			$$ = list_append(NEW_LIST(NEW_LIT(ID2SYM($1))), $2);
list_append      7053 parse.y        	head = list_append(node, head);
list_append      7062 parse.y        	    list_append(head, tail);
list_append      7085 parse.y        	list_append(head, tail);
list_append      7095 parse.y        	node = list_append(NEW_DSTR(rb_str_new(0, 0)), node);
list_append      7348 parse.y        	return list_append(node1, node2);


list_concat

list_concat       264 parse.y        static NODE *list_concat(NODE*,NODE*);
list_concat       935 parse.y        			list_concat(args, $3);
list_concat      1690 parse.y        			list_concat(args, $3);
list_concat      2269 parse.y        			$$ = arg_blk_pass(list_concat(NEW_LIST($1),$3), $4);
list_concat      2295 parse.y        			$$ = arg_concat(list_concat(NEW_LIST($1),$3), $6);
list_concat      2334 parse.y        			$$ = list_append(list_concat(NEW_LIST($1),$3), NEW_HASH($5));
list_concat      2355 parse.y        			$$ = arg_concat(list_append(list_concat(NEW_LIST($1), $3), NEW_HASH($5)), $8);
list_concat      4317 parse.y        			$$ = list_concat($1, $3);
list_concat      7076 parse.y        	    list_concat(head, tail);
list_concat      7890 parse.y        	return list_concat(NEW_LIST(node1), node2);


listen

listen           1217 ext/socket/socket.c 	listen(fd, 5);
listen           1507 ext/socket/socket.c     if (server) listen(fd, 5);
listen           2443 ext/socket/socket.c     if (listen(fptr->fd, backlog) < 0)
listen           2334 win32/win32.c  	r = listen(TO_SOCKET(s), backlog);
listen           2684 win32/win32.c  		listen(svr, 5);


literal_concat

literal_concat    266 parse.y        static NODE *literal_concat(NODE*,NODE*);
literal_concat   3575 parse.y        			$$ = literal_concat($1, $2);
literal_concat   3699 parse.y        			$$ = literal_concat($1, $2);
literal_concat   3749 parse.y        			$$ = literal_concat($1, $2);
literal_concat   3767 parse.y        			$$ = literal_concat($1, $2);


literal_node

literal_node     7742 parse.y        	    int b = literal_node(node->nd_beg);
literal_node     7743 parse.y        	    int e = literal_node(node->nd_end);


load

load             1302 dln.c              if (load(file) == -1) {
load             1379 dln.c          	init_fct = (void(*)())load((char*)file, 1, 0);
load             1355 marshal.c          v = rb_ensure(load, (VALUE)&arg, load_ensure, (VALUE)&arg);
load             1199 variable.c         st_data_t load = 0;
load             1205 variable.c     	st_delete(tbl, (st_data_t*)&id, &load);
load             1217 variable.c         return (NODE *)load;
load             1224 variable.c         NODE *load = autoload_delete(klass, id);
load             1226 variable.c         if (!load || !(file = load->nd_lit) || rb_provided(RSTRING(file)->ptr)) {
load             1229 variable.c         return rb_require_safe(file, load->nd_nth);
load             1237 variable.c         st_data_t load;
load             1240 variable.c     	!(tbl = check_autoload_table(val)) || !st_lookup(tbl, id, &load)) {
load             1243 variable.c         file = ((NODE *)load)->nd_lit;


load_1

load_1           1013 dln.c          	    if (load_1(fd, target_offset, 0) == -1) {
load_1           1059 dln.c          		    if (load_1(fd, offset, 0) == -1) {
load_1           1099 dln.c              result = load_1(fd, 0, file);


load_failed

load_failed      6554 eval.c         	load_failed(fname);
load_failed      6974 eval.c         	load_failed(fname);


load_file

load_file          58 ruby.c         static void load_file(const char *, int);
load_file         834 ruby.c         	load_file(script, 1);
load_file         976 ruby.c             load_file(fname, 0);
load_file         983 ruby.c             load_file("-", 1);


load_header

load_header       372 dln.c              if (load_header(fd, &hdr, 0) == -1) return -1;
load_header       653 dln.c              if (load_header(fd, &hdr, disp) == -1) return -1;
load_header      1043 dln.c          		if (load_header(fd, &hdr, offset) == -1)


load_lib

load_lib          188 dln.c          static int load_lib();
load_lib          871 dln.c          	    if (load_lib(libc) == -1) goto err_exit;
load_lib          891 dln.c          		load_lib(*libs_to_be_linked);
load_lib          904 dln.c          	    if (load_lib(libc) == -1) goto err_exit;
load_lib         1091 dln.c          	return load_lib(file);


load_stdin

load_stdin         57 ruby.c         static void load_stdin(void);
load_stdin        831 ruby.c         	load_stdin();


load_sym

load_sym          373 dln.c              syms = load_sym(fd, &hdr, 0);
load_sym          661 dln.c              syms = load_sym(fd, &hdr, disp);
load_sym         1045 dln.c          		syms = load_sym(fd, &hdr, offset);


local_append

local_append     4206 parse.y        			    $$ = NEW_NODE(NODE_LASGN,0,0,local_append(0));
local_append     7740 parse.y        	node->nd_cnt = local_append(internal_id());
local_append     8056 parse.y            return local_append(id);


local_append_gen

local_append_gen  309 parse.y        static int  local_append_gen(struct parser_params*, ID);
local_append_gen  310 parse.y        #define local_append(id) local_append_gen(parser, id)


local_cnt

local_cnt         277 node.h         #define NEW_LASGN(v,val) NEW_NODE(NODE_LASGN,v,val,local_cnt(v))
local_cnt         290 node.h         #define NEW_LVAR(v) NEW_NODE(NODE_LVAR,v,0,local_cnt(v))
local_cnt         295 node.h         #define NEW_NTH_REF(n)  NEW_NODE(NODE_NTH_REF,0,n,local_cnt('~'))
local_cnt         296 node.h         #define NEW_BACK_REF(n) NEW_NODE(NODE_BACK_REF,0,n,local_cnt('~'))
local_cnt         318 node.h         #define NEW_BLOCK_ARG(v) NEW_NODE(NODE_BLOCK_ARG,v,0,local_cnt(v))
local_cnt        4113 parse.y        			    local_cnt($1);
local_cnt        6587 parse.y        	    (void)local_cnt(c);
local_cnt        7131 parse.y            local_cnt('~');
local_cnt        7724 parse.y        	local_cnt('_');
local_cnt        7725 parse.y        	local_cnt('~');
local_cnt        7758 parse.y        	    local_cnt('_');
local_cnt        7759 parse.y        	    local_cnt('~');
local_cnt        8600 parse.y            cnt = local_cnt(c);


local_cnt_gen

local_cnt_gen     311 parse.y        static int  local_cnt_gen(struct parser_params*, ID);
local_cnt_gen     312 parse.y        #define local_cnt(id) local_cnt_gen(parser, id)


local_id

local_id         4223 parse.y        			else if (!dyna_in_block() && local_id($2))
local_id         5422 parse.y            return (dyna_in_block() && rb_dvar_defined(id)) || local_id(id);
local_id         7187 parse.y        	if (local_id(id)) return NEW_LVAR(id);
local_id         7237 parse.y        	else if (local_id(id) || !dyna_in_block()) {
local_id         7269 parse.y            if (rb_dvar_defined(name) || local_id(name)) {


local_id_gen

local_id_gen      313 parse.y        static int  local_id_gen(struct parser_params*, ID);
local_id_gen      314 parse.y        #define local_id(id) local_id_gen(parser, id)


local_pop

local_pop         857 parse.y        		        local_pop();
local_pop        2761 parse.y        			local_pop();
local_pop        2796 parse.y        			local_pop();
local_pop        2827 parse.y        			local_pop();
local_pop        2856 parse.y        			local_pop();
local_pop        2885 parse.y        			local_pop();
local_pop        8126 parse.y            local_pop();


local_pop_gen

local_pop_gen     307 parse.y        static void local_pop_gen(struct parser_params*);
local_pop_gen     308 parse.y        #define local_pop() local_pop_gen(parser)


local_push

local_push        845 parse.y        			local_push(0);
local_push       2747 parse.y        			local_push(0);
local_push       2783 parse.y        			local_push(0);
local_push       2813 parse.y        			local_push(0);
local_push       2840 parse.y        			local_push(0);
local_push       2869 parse.y        			local_push(0);
local_push       8074 parse.y            local_push(1);


local_push_gen

local_push_gen    305 parse.y        static void local_push_gen(struct parser_params*,int);
local_push_gen    306 parse.y        #define local_push(top) local_push_gen(parser,top)


local_tbl

local_tbl          37 env.h              ID *local_tbl;
local_tbl         857 eval.c             if (!ruby_scope->local_tbl) return NULL;
local_tbl         858 eval.c             if (cnt >= ruby_scope->local_tbl[0]) return NULL;
local_tbl         859 eval.c             id = ruby_scope->local_tbl[cnt+1];
local_tbl         968 eval.c             _scope->local_tbl = 0;		\
local_tbl         986 eval.c         	ruby_scope->local_tbl  = 0;	\
local_tbl        3365 eval.c         		ruby_scope->local_tbl = node->nd_tbl;
local_tbl        3369 eval.c         		ruby_scope->local_tbl  = 0;
local_tbl        3981 eval.c         	ruby_scope->local_tbl = node->nd_tbl;
local_tbl        3985 eval.c         	ruby_scope->local_tbl  = 0;
local_tbl        5687 eval.c         		ruby_scope->local_tbl = body->nd_tbl;
local_tbl        5692 eval.c         		ruby_scope->local_tbl  = 0;
local_tbl        6615 eval.c         	if (ruby_scope->local_tbl) /* toplevel was empty */
local_tbl        6616 eval.c         	    free(ruby_scope->local_tbl);
local_tbl        7428 eval.c             tbl = ruby_scope->local_tbl;
local_tbl        7816 eval.c             if (scope->local_tbl) {
local_tbl        7817 eval.c         	tbl = scope->local_tbl;
local_tbl        8237 eval.c                 scope->local_tbl = _block.scope->local_tbl;
local_tbl        11880 eval.c             tbl = ruby_scope->local_tbl;
local_tbl         942 gc.c           	    int n = obj->as.scope.local_tbl[0]+1;
local_tbl        1201 gc.c           		RUBY_CRITICAL(free(RANY(obj)->as.scope.local_tbl));
local_tbl         248 node.h         #define NEW_SCOPE(b) NEW_NODE(NODE_SCOPE,local_tbl(),0,(b))
local_tbl        8075 parse.y            lvtbl->cnt = ruby_scope->local_tbl?ruby_scope->local_tbl[0]:0;
local_tbl        8078 parse.y        	MEMCPY(lvtbl->tbl, ruby_scope->local_tbl, ID, lvtbl->cnt+1);
local_tbl        8096 parse.y        	i = ruby_scope->local_tbl?ruby_scope->local_tbl[0]:0;
local_tbl        8119 parse.y        	    if (ruby_scope->local_tbl && ruby_scope->local_vars[-1] == 0) {
local_tbl        8120 parse.y        		xfree(ruby_scope->local_tbl);
local_tbl        8123 parse.y        	    ruby_scope->local_tbl = local_tbl();


local_tbl_gen

local_tbl_gen     315 parse.y        static ID  *local_tbl_gen(struct parser_params*);
local_tbl_gen     316 parse.y        #define local_tbl() local_tbl_gen(parser)


localjump_error

localjump_error  1687 eval.c         	localjump_error("unexpected return", val, state);
localjump_error  1690 eval.c         	localjump_error("unexpected break", val, state);
localjump_error  1693 eval.c         	localjump_error("unexpected next", val, state);
localjump_error  1696 eval.c         	localjump_error("unexpected redo", Qnil, state);
localjump_error  1699 eval.c         	localjump_error("retry outside of rescue clause", Qnil, state);
localjump_error  4579 eval.c             localjump_error(mesg, result, state);
localjump_error  4607 eval.c             localjump_error("unexpected return", retval, TAG_RETURN);
localjump_error  4634 eval.c             localjump_error("unexpected break", retval, TAG_BREAK);
localjump_error  4644 eval.c         	localjump_error("no block given", Qnil, 0);


localtime

localtime         898 missing/strftime.c 	tm = localtime(&clock);
localtime         482 time.c             tm = (utc_p ? gmtime : localtime)(&guess);
localtime         495 time.c         	    (tm = (utc_p ? gmtime : localtime)(&guess)) != NULL) {
localtime         505 time.c             tm = (utc_p ? gmtime : localtime)(&guess_lo);
localtime         512 time.c             tm = (utc_p ? gmtime : localtime)(&guess_hi);
localtime         609 time.c         	tm = (utc_p ? gmtime : localtime)(&guess);
localtime         640 time.c         		    tm = localtime(&guess2);
localtime         652 time.c         				tm = localtime(&guess2);
localtime         665 time.c         		    tm = localtime(&guess2);
localtime         677 time.c         				tm = localtime(&guess2);
localtime         745 time.c         	if ((tmp = localtime(&t)) &&
localtime        1045 time.c             tm_tmp = localtime(&t);
localtime        3822 win32/win32.c      tm = localtime(&time);
localtime          50 wince/time.h   struct tm *localtime(const time_t *ptime);
localtime         219 wince/time_wce.c 	tms = *localtime(t);
localtime         264 wince/time_wce.c 	tm1 = *localtime(&t1);


log

log              2441 ext/socket/socket.c     backlog = NUM2INT(log);
log               294 math.c         # define log(x) ((x) < 0.0 ? nan("") : log(x))
log               312 math.c             d = log(RFLOAT(x)->value);
log                46 missing/acosh.c     return log(x);
log                63 missing/acosh.c 	z = log(z + z);
log                66 missing/acosh.c 	z = log(z + sqrt(z * z + 1));
log                81 missing/acosh.c     z = log(z > 1 ? -1 : (1 + z) / (1 - z)) / 2;
log                35 missing/erf.c      result = term = exp(a * log(x) - x - loggamma_a) / a;
log                54 missing/erf.c      w = exp(a * log(x) - x - loggamma_a);


log10

log10             295 math.c         # define log10(x) ((x) < 0.0 ? nan("") : log10(x))
log10             333 math.c             d = log10(RFLOAT(x)->value);


logop

logop            1043 parse.y        			$$ = logop(NODE_AND, $1, $3);
logop            1051 parse.y        			$$ = logop(NODE_OR, $1, $3);
logop            2048 parse.y        			$$ = logop(NODE_AND, $1, $3);
logop            2056 parse.y        			$$ = logop(NODE_OR, $1, $3);


logop_gen

logop_gen         244 parse.y        static NODE *logop_gen(struct parser_params*,enum node_type,NODE*,NODE*);
logop_gen         245 parse.y        #define logop(type,node1,node2) logop_gen(parser, type, node1, node2)


long_toobig

long_toobig       792 marshal.c      	if (c > sizeof(long)) long_toobig(c);
long_toobig       803 marshal.c      	if (c > sizeof(long)) long_toobig(c);


lpar_beg

lpar_beg         3206 parse.y        			$<num>$ = lpar_beg;
lpar_beg         3207 parse.y        			lpar_beg = ++paren_nest;
lpar_beg         3219 parse.y        			lpar_beg = $<num>2;
lpar_beg         6454 parse.y        	if (lpar_beg && lpar_beg == paren_nest) {
lpar_beg         6456 parse.y        	    lpar_beg = 0;
lpar_beg         6791 parse.y        			if (lpar_beg && lpar_beg == paren_nest) {
lpar_beg         6792 parse.y        			    lpar_beg = 0;


lseek

lseek             198 dln.c              lseek(fd, disp, 0);
lseek             272 dln.c              lseek(fd, disp + N_TXTOFF(*hdrp) + hdrp->a_text + hdrp->a_data, 0);
lseek             301 dln.c              lseek(fd, N_SYMOFF(*hdrp) + hdrp->a_syms + disp, 0);
lseek             312 dln.c              lseek(fd, disp + N_SYMOFF(*hdrp), 0);
lseek             385 dln.c          	lseek(fd, 0L, 0);
lseek             440 dln.c              lseek(fd, disp + N_TXTOFF(*hdrp), 0);
lseek            1034 dln.c          		lseek(fd, offset, 0);
lseek             280 ext/sdbm/_sdbm.c 		if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0
lseek             335 ext/sdbm/_sdbm.c 		if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0
lseek             392 ext/sdbm/_sdbm.c 	oldtail = lseek(db->pagf, 0L, SEEK_END);
lseek             395 ext/sdbm/_sdbm.c 		if (lseek(db->pagf, 0L, SEEK_END) < 0 ||
lseek             405 ext/sdbm/_sdbm.c 			if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0
lseek             411 ext/sdbm/_sdbm.c 		else if (lseek(db->pagf, OFF_PAG(newp), SEEK_SET) < 0
lseek             432 ext/sdbm/_sdbm.c 		if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0
lseek             462 ext/sdbm/_sdbm.c 	if (lseek(db->pagf, OFF_PAG(0), SEEK_SET) < 0
lseek             515 ext/sdbm/_sdbm.c 		if (lseek(db->pagf, OFF_PAG(pagb), SEEK_SET) < 0
lseek             540 ext/sdbm/_sdbm.c 		if (lseek(db->dirf, OFF_DIR(dirb), SEEK_SET) < 0
lseek             563 ext/sdbm/_sdbm.c 		if (lseek(db->dirf, OFF_DIR(dirb), SEEK_SET) < 0
lseek             576 ext/sdbm/_sdbm.c 	if (lseek(db->dirf, OFF_DIR(dirb), SEEK_SET) < 0
lseek             605 ext/sdbm/_sdbm.c 			if (lseek(db->pagf, OFF_PAG(db->blkptr), SEEK_SET) < 0)
lseek             253 io.c               r = lseek(fptr->fd, -fptr->rbuf_len, SEEK_CUR);
lseek             295 io.c           #define io_seek(fptr, ofs, whence) lseek(flush_before_seek(fptr)->fd, ofs, whence)
lseek             296 io.c           #define io_tell(fptr) lseek(flush_before_seek(fptr)->fd, 0, SEEK_CUR)
lseek            1197 io.c           	pos = lseek(fptr->fd, 0, SEEK_CUR);
lseek            2251 io.c               pos = lseek(fptr->fd, pos, whence);


lstat

lstat              66 dir.c          #if !defined HAVE_LSTAT && !defined lstat
lstat             925 dir.c              int ret = lstat(path, pst);
lstat              63 file.c         #if !defined HAVE_LSTAT && !defined lstat
lstat             745 file.c             if (lstat(StringValueCStr(fname), &st) == -1) {
lstat             779 file.c             if (lstat(fptr->path, &st) == -1) {
lstat             950 file.c             if (lstat(StringValueCStr(fname), &st) < 0) return Qfalse;
lstat            1541 file.c             if (lstat(StringValueCStr(fname), &st) == -1) {


lvar_defined_gen

lvar_defined_gen  339 parse.y        static int lvar_defined_gen(struct parser_params*, ID);
lvar_defined_gen  340 parse.y        #define lvar_defined(id) lvar_defined_gen(parser, id)


lvtbl

lvtbl            7986 parse.y            local->prev = lvtbl;
lvtbl            7994 parse.y            lvtbl = local;
lvtbl            8005 parse.y            struct local_vars *local = lvtbl->prev;
lvtbl            8007 parse.y            if (lvtbl->tbl) {
lvtbl            8008 parse.y        	if (!lvtbl->nofree) xfree(lvtbl->tbl);
lvtbl            8009 parse.y        	else lvtbl->tbl[0] = lvtbl->cnt;
lvtbl            8011 parse.y            if (lvtbl->dnames) {
lvtbl            8012 parse.y        	xfree(lvtbl->dnames);
lvtbl            8014 parse.y            ruby_dyna_vars = lvtbl->dyna_vars;
lvtbl            8015 parse.y            xfree(lvtbl);
lvtbl            8016 parse.y            lvtbl = local;
lvtbl            8022 parse.y            lvtbl->nofree = 1;
lvtbl            8023 parse.y            return lvtbl->tbl;
lvtbl            8029 parse.y            if (lvtbl->tbl == 0) {
lvtbl            8030 parse.y        	lvtbl->tbl = ALLOC_N(ID, 4);
lvtbl            8031 parse.y        	lvtbl->tbl[0] = 0;
lvtbl            8032 parse.y        	lvtbl->tbl[1] = '_';
lvtbl            8033 parse.y        	lvtbl->tbl[2] = '~';
lvtbl            8034 parse.y        	lvtbl->cnt = 2;
lvtbl            8039 parse.y        	REALLOC_N(lvtbl->tbl, ID, lvtbl->cnt+2);
lvtbl            8042 parse.y            lvtbl->tbl[lvtbl->cnt+1] = id;
lvtbl            8043 parse.y            return lvtbl->cnt++;
lvtbl            8051 parse.y            if (id == 0) return lvtbl->cnt;
lvtbl            8053 parse.y            for (cnt=1, max=lvtbl->cnt+1; cnt<max;cnt++) {
lvtbl            8054 parse.y        	if (lvtbl->tbl[cnt] == id) return cnt-1;
lvtbl            8064 parse.y            if (lvtbl == 0) return Qfalse;
lvtbl            8065 parse.y            for (i=3, max=lvtbl->cnt+1; i<max; i++) {
lvtbl            8066 parse.y        	if (lvtbl->tbl[i] == id) return Qtrue;
lvtbl            8075 parse.y            lvtbl->cnt = ruby_scope->local_tbl?ruby_scope->local_tbl[0]:0;
lvtbl            8076 parse.y            if (lvtbl->cnt > 0) {
lvtbl            8077 parse.y        	lvtbl->tbl = ALLOC_N(ID, lvtbl->cnt+3);
lvtbl            8078 parse.y        	MEMCPY(lvtbl->tbl, ruby_scope->local_tbl, ID, lvtbl->cnt+1);
lvtbl            8081 parse.y        	lvtbl->tbl = 0;
lvtbl            8084 parse.y        	lvtbl->dlev = 1;
lvtbl            8086 parse.y        	lvtbl->dlev = 0;
lvtbl            8092 parse.y            int len = lvtbl->cnt;
lvtbl            8135 parse.y            for (i=0; i<lvtbl->dname_size; i++) {
lvtbl            8136 parse.y        	if (lvtbl->dnames[i] == id) return;
lvtbl            8138 parse.y            if (lvtbl->dname_size == 0) {
lvtbl            8139 parse.y        	lvtbl->dnames = ALLOC_N(ID, 1);
lvtbl            8142 parse.y        	REALLOC_N(lvtbl->dnames, ID, lvtbl->dname_size+1);
lvtbl            8144 parse.y            lvtbl->dnames[lvtbl->dname_size++] = id;
lvtbl            8153 parse.y            for (i=0; i<lvtbl->dname_size; i++) {
lvtbl            8154 parse.y        	if (lvtbl->dnames[i] == id) {
lvtbl            8167 parse.y            lvtbl->dlev++;
lvtbl            8174 parse.y            lvtbl->dlev--;
lvtbl            8181 parse.y            return (lvtbl->dlev > 0);


mSyslogConstants_LOG_UPTO

mSyslogConstants_LOG_UPTO  256 ext/syslog/syslog.c     rb_define_module_function(mSyslog, "LOG_UPTO", mSyslogConstants_LOG_UPTO, 1);
mSyslogConstants_LOG_UPTO  262 ext/syslog/syslog.c     rb_define_module_function(mSyslogConstants, "LOG_UPTO", mSyslogConstants_LOG_UPTO, 1);


mSyslog_close

mSyslog_close      95 ext/syslog/syslog.c         rb_ensure(rb_yield, self, mSyslog_close, self);
mSyslog_close     103 ext/syslog/syslog.c     mSyslog_close(self);
mSyslog_close     251 ext/syslog/syslog.c     rb_define_module_function(mSyslog, "close", mSyslog_close, 0);


mSyslog_open

mSyslog_open      105 ext/syslog/syslog.c     return mSyslog_open(argc, argv, self);
mSyslog_open      241 ext/syslog/syslog.c     rb_define_module_function(mSyslog, "open", mSyslog_open, -1);


mSyslog_reopen

mSyslog_reopen    242 ext/syslog/syslog.c     rb_define_module_function(mSyslog, "reopen", mSyslog_reopen, -1);
mSyslog_reopen    243 ext/syslog/syslog.c     rb_define_module_function(mSyslog, "open!", mSyslog_reopen, -1);


main

main                4 win32/winmain.c extern int main(int, char**, char**);
main                9 win32/winmain.c     return main(0, NULL, NULL);
main                5 wince/wincemain.c extern int main(int, char**, char**);
main               17 wince/wincemain.c     return main(0, NULL, NULL);


make_backtrace

make_backtrace   4338 eval.c         static VALUE make_backtrace(void);
make_backtrace   4358 eval.c         	    at = make_backtrace();
make_backtrace   10937 eval.c         	VALUE errat = make_backtrace();


make_capture_history_tree

make_capture_history_tree  970 regexec.c              r = make_capture_history_tree(child, kp, stk_top, str, reg);
make_capture_history_tree 1337 regexec.c                    r = make_capture_history_tree(region->history_root, &stkp,


make_hostent

make_hostent     1368 ext/socket/socket.c     return make_hostent(host, sock_addrinfo(host, Qnil, SOCK_STREAM, AI_CANONNAME), tcp_sockaddr);
make_hostent     2724 ext/socket/socket.c     return make_hostent(host, sock_addrinfo(host, Qnil, SOCK_STREAM, AI_CANONNAME), sock_sockaddr);


make_inetaddr

make_inetaddr     735 ext/socket/socket.c 	make_inetaddr(htonl(i), hbuf, len);
make_inetaddr     744 ext/socket/socket.c 	    make_inetaddr(INADDR_ANY, hbuf, len);
make_inetaddr     747 ext/socket/socket.c 	    make_inetaddr(INADDR_BROADCAST, hbuf, len);


make_ipaddr

make_ipaddr      1360 ext/socket/socket.c     return make_ipaddr(addr);
make_ipaddr      1567 ext/socket/socket.c     return make_ipaddr((struct sockaddr*)&addr);
make_ipaddr      3065 ext/socket/socket.c     host = make_ipaddr((struct sockaddr*)sockaddr);


make_ipaddr0

make_ipaddr0      688 ext/socket/socket.c     make_ipaddr0(addr, buf, sizeof(buf));
make_ipaddr0      704 ext/socket/socket.c     make_ipaddr0((struct sockaddr*)&sin, buf, len);


make_mask

make_mask         351 random.c           unsigned long mask = make_mask(limit);
make_mask         395 random.c               mask = mask ? 0xffffffff : make_mask(lim);


make_struct

make_struct       235 struct.c           return make_struct(nm, ary, rb_cStruct);
make_struct       294 struct.c           st = make_struct(name, rest, klass);


make_time_t

make_time_t       768 time.c             time = time_new_internal(klass, make_time_t(&tm, utc_p), usec);
make_time_t      2015 time.c         	sec = make_time_t(&tm, Qtrue);


makroom

makroom           117 ext/sdbm/_sdbm.c static int makroom proto((DBM *, long, int));
makroom           327 ext/sdbm/_sdbm.c 			if (!makroom(db, hash, need))


malloc

malloc            686 ext/curses/curses.c   mdata->mevent = (MEVENT*)malloc(sizeof(MEVENT));
malloc             49 ext/digest/rmd160/rmd160hl.c     if (p == NULL && (p = malloc(41)) == NULL)
malloc             23 ext/digest/rmd160/rmd160ossl.c     if (p == NULL && (p = malloc(41)) == NULL)
malloc             50 ext/digest/sha1/sha1hl.c     if (p == NULL && (p = malloc(41)) == NULL)
malloc             23 ext/digest/sha1/sha1ossl.c     if (p == NULL && (p = malloc(41)) == NULL)
malloc            789 ext/nkf/nkf-utf8/nkf.c                       outfname = malloc(strlen(origfname)
malloc           4056 ext/nkf/nkf-utf8/nkf.c 	    lwsp_buf = malloc((lwsp_size+5)*sizeof(char));
malloc           4172 ext/nkf/nkf-utf8/nkf.c 	lwsp_buf = malloc((lwsp_size+5)*sizeof(char));
malloc            163 ext/sdbm/_sdbm.c 	if ((dirname = malloc((unsigned) n)) == NULL)
malloc            187 ext/sdbm/_sdbm.c 	if ((db = (DBM *) malloc(sizeof(DBM))) == NULL)
malloc            169 ext/socket/getaddrinfo.c 	if (((ai)->ai_canonname = (char *)malloc(strlen(str) + 1)) != NULL) {\
malloc            179 ext/socket/getaddrinfo.c 	if (((ai) = (struct addrinfo *)malloc(sizeof(struct addrinfo) +\
malloc            159 ext/syck/gram.c #  define YYMALLOC malloc
malloc             51 ext/syck/syck.h #define S_ALLOC_N(type,n) (type*)malloc(sizeof(type)*(n))
malloc             52 ext/syck/syck.h #define S_ALLOC(type) (type*)malloc(sizeof(type))
malloc            111 gc.c               RUBY_CRITICAL(mem = malloc(size));
malloc            114 gc.c           	    RUBY_CRITICAL(mem = malloc(size));
malloc            349 gc.c           		p = heaps = (struct heaps_slot *)malloc(length);
malloc            355 gc.c           	RUBY_CRITICAL(p = heaps[heaps_used].slot = (RVALUE*)malloc(sizeof(RVALUE)*heap_slots));
malloc            243 missing/strftime.c 			savetz = (char *) malloc(tzlen + 1);
malloc             63 pack.c             zp = malloc(sizeof(xtype));		\
malloc             66 pack.c             t = malloc(sizeof(xtype));		\
malloc             87 regint.h       #define xmalloc     malloc
malloc             56 st.c           #define alloc(type) (type*)malloc((size_t)sizeof(type))
malloc           2458 win32/win32.c  	    proto_buffers = (WSAPROTOCOL_INFO *)malloc(proto_buffers_len);
malloc             13 wince/string_wce.c 	p = malloc( strlen(str)+1 );
malloc             32 wince/wince.c  	lpFileNameW = (LPWSTR)malloc( size*sizeof(wchar_t) );
malloc             66 wince/wince.c  	_commandLine = (char*)malloc( strlen(acmd)+5 );
malloc            545 wince/wince.c  		buf = malloc( len+1 );
malloc            563 wince/wince.c  	wbuf = (wchar_t*)malloc( (length+1)*sizeof(wchar_t) );
malloc            578 wince/wince.c  	pChar = (char*)malloc(charlength+1);


map_charset

map_charset       154 ext/iconv/iconv.c     const char* tocode = map_charset(&to);
map_charset       155 ext/iconv/iconv.c     const char* fromcode = map_charset(&from);


map_errno

map_errno         726 win32/win32.c  		errno = map_errno(GetLastError());
map_errno         737 win32/win32.c  		errno = map_errno(GetLastError());
map_errno         742 win32/win32.c  		errno = map_errno(GetLastError());
map_errno         753 win32/win32.c  		errno = map_errno(GetLastError());
map_errno         758 win32/win32.c  		errno = map_errno(GetLastError());
map_errno         972 win32/win32.c  	errno = map_errno(GetLastError());
map_errno        1401 win32/win32.c  	errno = map_errno(GetLastError());
map_errno        2027 win32/win32.c  		errno = map_errno(WSAGetLastError());
map_errno        2204 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2227 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2246 win32/win32.c  		errno = map_errno(r);
map_errno        2270 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2287 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2302 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2319 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2336 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2353 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2371 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2388 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2406 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2423 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2440 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2499 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2521 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2538 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2555 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2572 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2589 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2606 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2623 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2700 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2787 win32/win32.c  	    errno = map_errno(WSAGetLastError());
map_errno        2810 win32/win32.c  	    errno = map_errno(GetLastError());
map_errno        2859 win32/win32.c  	    errno = map_errno(GetLastError());
map_errno        2988 win32/win32.c  		    errno = map_errno(GetLastError());
map_errno        3042 win32/win32.c  	    myerrno = map_errno(GetLastError());
map_errno        3051 win32/win32.c  	errno = map_errno(GetLastError());
map_errno        3102 win32/win32.c  	errno = map_errno(GetLastError());
map_errno        3134 win32/win32.c  	    errno = map_errno(GetLastError());
map_errno        3274 win32/win32.c  	    errno = map_errno(GetLastError());
map_errno        3791 win32/win32.c  	errno = map_errno(WSAGetLastError());
map_errno        3809 win32/win32.c  	errno = map_errno(WSAGetLastError());
map_errno        3833 win32/win32.c  	errno = map_errno(GetLastError());
map_errno        3864 win32/win32.c  	    errno = map_errno(GetLastError());
map_errno        3869 win32/win32.c  		errno = map_errno(GetLastError());
map_errno        3905 win32/win32.c  	    errno = map_errno(GetLastError());
map_errno        3927 win32/win32.c  	    errno = map_errno(GetLastError());
map_errno        3947 win32/win32.c  	    errno = map_errno(GetLastError());


map_position_value

map_position_value 3697 regcomp.c          v2 = map_position_value(enc, now->s[0]);
map_position_value 3698 regcomp.c          v1 = map_position_value(enc, alt->s[0]);
map_position_value 3750 regcomp.c          map->value += map_position_value(enc, c);
map_position_value 3850 regcomp.c            val += map_position_value(enc, i);


mark_hash

mark_hash         670 gc.c               mark_hash(tbl, 0);
mark_hash         901 gc.c           	mark_hash(obj->as.hash.tbl, lev);


mark_locations_array

mark_locations_array  629 gc.c               mark_locations_array(start,n);
mark_locations_array  856 gc.c           	    mark_locations_array((VALUE*)obj->as.node.u1.value,
mark_locations_array 1307 gc.c               mark_locations_array((VALUE*)save_regs_gc_mark, sizeof(save_regs_gc_mark) / sizeof(VALUE *));


mark_source_filename

mark_source_filename  741 gc.c           	mark_source_filename(obj->as.node.nd_file);
mark_source_filename 1015 gc.c               mark_source_filename(ruby_sourcefile);


mark_tbl

mark_tbl          649 gc.c               mark_tbl(tbl, 0);
mark_tbl          880 gc.c           	mark_tbl(obj->as.klass.m_tbl, lev);
mark_tbl          881 gc.c           	mark_tbl(obj->as.klass.iv_tbl, lev);
mark_tbl          918 gc.c           	mark_tbl(obj->as.object.iv_tbl, lev);
mark_tbl         1301 gc.c           	mark_tbl(finalizer_table, 0);


marshal_dump

marshal_dump     1410 marshal.c          rb_define_module_function(rb_mMarshal, "dump", marshal_dump, -1);
marshal_dump     1427 marshal.c          return marshal_dump(argc, argv);


marshal_load

marshal_load     1411 marshal.c          rb_define_module_function(rb_mMarshal, "load", marshal_load, -1);
marshal_load     1412 marshal.c          rb_define_module_function(rb_mMarshal, "restore", marshal_load, -1);
marshal_load     1433 marshal.c          return marshal_load(1, &port);


massign

massign          1041 eval.c         static VALUE massign(VALUE,NODE*,VALUE,int);
massign          3453 eval.c         	result = massign(self, node, rb_eval(self, node->nd_value), 0);
massign          4721 eval.c         		massign(self, var, val, lambda);
massign          5060 eval.c         	massign(self, lhs, svalue_to_mrhs(val, lhs->nd_head), pcall);


match_alloc

match_alloc       934 re.c           	match = match_alloc(rb_cMatch);
match_alloc      2260 re.c               rb_define_alloc_func(rb_cMatch, match_alloc);


match_array

match_array      1137 re.c               return match_array(match, 0);
match_array      1156 re.c               return match_array(match, 1);


match_at

match_at         2951 regexec.c          r = match_at(reg, str, end, at, prev, &msa);
match_at         3228 regexec.c        r = match_at(reg, str, end, s, prev, &msa);\


match_fds

match_fds        10639 eval.c         		    (match_fds(&readfds, &th->readfds, max) ||
match_fds        10640 eval.c         		     match_fds(&writefds, &th->writefds, max) ||
match_fds        10641 eval.c         		     match_fds(&exceptfds, &th->exceptfds, max))) {


match_getter

match_getter     2184 re.c               return match_getter();
match_getter     2218 re.c               rb_define_virtual_variable("$~", match_getter, match_setter);


match_op

match_op         2000 parse.y        			$$ = match_op($1, $3);
match_op         2008 parse.y        			$$ = NEW_NOT(match_op($1, $3));


match_op_gen

match_op_gen      302 parse.y        static NODE *match_op_gen(struct parser_params*,NODE*,NODE*);
match_op_gen      303 parse.y        #define match_op(node1,node2) match_op_gen(parser, node1, node2)


match_size

match_size       2264 re.c               rb_define_method(rb_cMatch, "size", match_size, 0);
match_size       2265 re.c               rb_define_method(rb_cMatch, "length", match_size, 0);


match_to_a

match_to_a       1187 re.c           	return rb_ary_aref(argc, argv, match_to_a(match));
match_to_a       2269 re.c               rb_define_method(rb_cMatch, "to_a", match_to_a, 0);


max

max               174 compar.c           if (RTEST(cmp_gt(x, max))) return Qfalse;
max              9656 eval.c             int size = howmany(max, NFDBITS) * sizeof(fd_mask);
max              9659 eval.c             dst->maxfd = max;
max              10405 eval.c             if (max >= rb_fd_max(src)) max = rb_fd_max(src) - 1;
max              10406 eval.c             for (i=0; i<=max; i++) {
max              10419 eval.c             if (max >= rb_fd_max(src)) max = rb_fd_max(src) - 1;
max              10420 eval.c             if (max >= rb_fd_max(dst)) max = rb_fd_max(dst) - 1;
max              10421 eval.c             for (i=0; i<=max; i++) {
max              10434 eval.c             if (max >= rb_fd_max(dst)) max = rb_fd_max(dst) - 1;
max              10435 eval.c             for (i=0; i<=max; i++) {
max              10455 eval.c             if (max >= rb_fd_max(src)) max = rb_fd_max(src) - 1;
max              10456 eval.c             for (i=0; i<=max; i++) {
max              10478 eval.c             int n, max;
max              10504 eval.c             max = -1;
max              10524 eval.c         	    if (max < th->fd) max = th->fd;
max              10531 eval.c         	    if (max < th->fd) max = th->fd;
max              10576 eval.c         	n = rb_fd_select(max+1, &readfds, &writefds, &exceptfds, delay_ptr);
max              10603 eval.c         			n = max;
max              10618 eval.c         		    intersect_fds(&readfds, &th->readfds, max);
max              10619 eval.c         		    intersect_fds(&writefds, &th->writefds, max);
max              10620 eval.c         		    intersect_fds(&exceptfds, &th->exceptfds, max);
max              10639 eval.c         		    (match_fds(&readfds, &th->readfds, max) ||
max              10640 eval.c         		     match_fds(&writefds, &th->writefds, max) ||
max              10641 eval.c         		     match_fds(&exceptfds, &th->exceptfds, max))) {
max              10645 eval.c         		    n = intersect_fds(&readfds, &th->readfds, max) +
max              10646 eval.c         			intersect_fds(&writefds, &th->writefds, max) +
max              10647 eval.c         			intersect_fds(&exceptfds, &th->exceptfds, max);
max              10861 eval.c         	    n = select(max, read, write, except, tvp);
max              10889 eval.c             if (read) rb_fd_copy(&curr_thread->readfds, read, max);
max              10891 eval.c             if (write) rb_fd_copy(&curr_thread->writefds, write, max);
max              10893 eval.c             if (except) rb_fd_copy(&curr_thread->exceptfds, except, max);
max              10895 eval.c             curr_thread->fd = max;
max              1706 hash.c         	int max;
max              1709 hash.c         	for (max = i; environ[max]; max++) ;
max              1710 hash.c         	tmpenv = ALLOC_N(char*, max+2);
max              1711 hash.c         	for (j=0; j<max; j++)		/* copy environment */
max              1713 hash.c         	tmpenv[max] = 0;
max              4402 io.c               int max = 0, n;
max              4416 io.c           	    if (max < fptr->fd) max = fptr->fd;
max              4432 io.c           	    if (max < fptr->fd) max = fptr->fd;
max              4444 io.c           	    if (max < fptr->fd) max = fptr->fd;
max              4452 io.c               max++;
max              4454 io.c               n = rb_thread_select(max, rp, wp, ep, tp);
max              8049 parse.y            int cnt, max;
max              8053 parse.y            for (cnt=1, max=lvtbl->cnt+1; cnt<max;cnt++) {
max              8062 parse.y            int i, max;
max              8065 parse.y            for (i=3, max=lvtbl->cnt+1; i<max; i++) {
max               437 random.c           long val, max;
max               446 random.c       	    max = (long)RFLOAT(vmax)->value;
max               471 random.c       	max = 0;
max               477 random.c       	max = FIX2LONG(vmax);
max               481 random.c           if (max == 0) {
max               484 random.c           if (max < 0) max = -max;
max               485 random.c           val = limited_rand(max-1);
max              1866 regcomp.c        *max = 0;
max              1872 regcomp.c      	*max = distance_add(*max, tmax);
max              1879 regcomp.c            if (r == 0 && *max < tmax) *max = tmax;
max              1886 regcomp.c            *max = sn->end - sn->s;
max              1894 regcomp.c            *max = ONIGENC_MBC_MAXLEN_DIST(env->enc);
max              1904 regcomp.c          *max = ONIGENC_MBC_MAXLEN_DIST(env->enc);
max              1914 regcomp.c      	*max = ONIG_INFINITE_DISTANCE;
max              1922 regcomp.c      	if (*max < tmax) *max = tmax;
max              1930 regcomp.c            r = get_max_match_length(NCALL(node).target, max, env);
max              1932 regcomp.c            *max = ONIG_INFINITE_DISTANCE;
max              1941 regcomp.c      	r = get_max_match_length(qn->target, max, env);
max              1942 regcomp.c      	if (r == 0 && *max != 0) {
max              1944 regcomp.c      	    *max = distance_multiply(*max, qn->upper);
max              1946 regcomp.c      	    *max = ONIG_INFINITE_DISTANCE;
max              1959 regcomp.c      	  *max = en->max_len;
max              1961 regcomp.c      	  r = get_max_match_length(en->target, max, env);
max              1963 regcomp.c      	    en->max_len = *max;
max              1971 regcomp.c      	r = get_max_match_length(en->target, max, env);
max              3337 regcomp.c        OnigDistance max;  /* max byte length */
max              3426 regcomp.c        if (mm->max == ONIG_INFINITE_DISTANCE) return 0;
max              3428 regcomp.c        d = mm->max - mm->min;
max              3456 regcomp.c        return (a->min == b->min && a->max == b->max) ? 1 : 0;
max              3464 regcomp.c        mml->max = max;
max              3470 regcomp.c        mml->min = mml->max = 0;
max              3477 regcomp.c        to->max = from->max;
max              3484 regcomp.c        to->max = distance_add(to->max, from->max);
max              3492 regcomp.c        to->max = distance_add(to->max, len);
max              3500 regcomp.c        if (to->max < from->max) to->max = from->max;
max              3837 regcomp.c        if (add->value == 0 || to->mmd.max < add->mmd.min) {
max              3888 regcomp.c        concat_opt_anc_info(&tanc, &to->anc, &add->anc, to->len.max, add->len.max);
max              3891 regcomp.c        if (add->exb.len > 0 && to->len.max == 0) {
max              3893 regcomp.c      			to->len.max, add->len.max);
max              3897 regcomp.c        if (add->map.value > 0 && to->len.max == 0) {
max              3898 regcomp.c          if (add->map.mmd.max == 0)
max              3905 regcomp.c        if (add->len.max != 0)
max              3922 regcomp.c          if (add->len.max > 0) {
max              3923 regcomp.c            if (to->expr.len > (int )add->len.max)
max              3924 regcomp.c      	to->expr.len = add->len.max;
max              3926 regcomp.c            if (to->expr.mmd.max == 0)
max              4014 regcomp.c              int n, max;
max              4028 regcomp.c                max = ONIGENC_MBC_MAXLEN_DIST(env->enc) * n;
max              4031 regcomp.c                max = slen;
max              4033 regcomp.c              set_mml(&opt->len, slen, max);
max              4050 regcomp.c      	OnigDistance max = ONIGENC_MBC_MAXLEN_DIST(env->enc);
max              4052 regcomp.c      	set_mml(&opt->len, min, max);
max              4068 regcomp.c            int i, min, max;
max              4070 regcomp.c            max = ONIGENC_MBC_MAXLEN_DIST(env->enc);
max              4072 regcomp.c            if (max == 1) {
max              4096 regcomp.c            set_mml(&opt->len, min, max);
max              4103 regcomp.c            OnigDistance max = ONIGENC_MBC_MAXLEN_DIST(env->enc);
max              4104 regcomp.c            set_mml(&opt->len, min, max);
max              4149 regcomp.c            OnigDistance min, max, tmin, tmax;
max              4160 regcomp.c            r = get_max_match_length(nodes[backs[0]], &max, env->scan_env);
max              4168 regcomp.c      	if (max < tmax) max = tmax;
max              4170 regcomp.c            if (r == 0) set_mml(&opt->len, min, max);
max              4190 regcomp.c            OnigDistance min, max;
max              4198 regcomp.c      	if (env->mmd.max == 0 &&
max              4232 regcomp.c      	max = (nopt.len.max > 0 ? ONIG_INFINITE_DISTANCE : 0);
max              4234 regcomp.c      	max = distance_multiply(nopt.len.max, qn->upper);
max              4236 regcomp.c            set_mml(&opt->len, min, max);
max              4259 regcomp.c      	  OnigDistance min, max;
max              4262 regcomp.c      	  max = ONIG_INFINITE_DISTANCE;
max              4264 regcomp.c      	  if (IS_EFFECT_MAX_FIXED(en)) max = en->max_len;
max              4265 regcomp.c      	  set_mml(&opt->len, min, max);
max              4339 regcomp.c        reg->dmax = e->mmd.max;
max              4358 regcomp.c        reg->dmax       = m->mmd.max;
max              4400 regcomp.c          reg->anchor_dmax = opt.len.max;
max              4421 regcomp.c          if (opt.len.max == 0)
max              2728 string.c           int gen, now, max;
max              2750 string.c       		    t->max = *(USTR)t->p++;
max              2755 string.c       	else if (++t->now < t->max) {
max              2760 string.c       	    return t->max;
max              2791 string.c           trsrc.max = trrepl.max = 0;
max              2911 string.c           tr.gen = tr.now = tr.max = 0;


mbclen

mbclen            702 ext/strscan/strscan.c     len = mbclen(*CURPTR(p));
mbclen           5120 parse.y        	    int i, len = mbclen(uc)-1;
mbclen           5230 parse.y        	    len = mbclen(uc);
mbclen           5253 parse.y        	    len = mbclen(uc);
mbclen           6720 parse.y        	    int i, len = mbclen(uc)-1;
mbclen           8326 parse.y        	if (is_identchar(*m)) m += mbclen(*m);
mbclen           8397 parse.y        	while (is_identchar(*m)) m += mbclen(*m);
mbclen           8472 parse.y        	    m += mbclen(*m);
mbclen            247 re.c           	return mbclen(uc);
mbclen            249 re.c               len = mbclen(uc);
mbclen            274 re.c           	p += mbclen(*p);
mbclen            283 re.c           		int n = mbclen(p[1]) + 1;
mbclen            294 re.c           	    	rb_str_buf_cat(str, p, mbclen(*p));
mbclen            295 re.c           		p += mbclen(*p);
mbclen           1724 re.c           	    int n = mbclen(*s);
mbclen           1753 re.c           	    int n = mbclen(*s);
mbclen           1997 re.c           	    s += mbclen(uc) - 1;
mbclen             22 regex.h        #define ismbchar(c) (mbclen((c)) != 1)
mbclen           2350 string.c       	    int len = mbclen(c);
mbclen           2523 string.c       	    s+=mbclen(*s) - 1;
mbclen           2575 string.c       	    s+=mbclen(*s) - 1;
mbclen           2637 string.c       	    s+=mbclen(*s) - 1;
mbclen           2688 string.c       	    s+=mbclen(*s) - 1;


mbclen2

mbclen2          1993 string.c       	    len = mbclen2(RSTRING(str)->ptr[END(0)], pat);
mbclen2          3297 string.c       		    rb_ary_push(result, rb_str_substr(str, beg, mbclen2(RSTRING(str)->ptr[beg],spat)));
mbclen2          3301 string.c       		    start += mbclen2(RSTRING(str)->ptr[start],spat);
mbclen2          3786 string.c       		*start = END(0)+mbclen2(RSTRING(str)->ptr[END(0)],pat);


mblen

mblen             101 dir.c          # define Next(p) ((p) + mblen(p, RUBY_MBCHAR_MAXSIZE))
mblen             108 dir.c              int n = mblen(p, RUBY_MBCHAR_MAXSIZE);
mblen            2241 file.c         #   define CharNext(p) ((p) + mblen(p, RUBY_MBCHAR_MAXSIZE))
mblen             905 regexec.c        end  = s1 + mblen;
mblen             906 regexec.c        end2 = s2 + mblen;
mblen             249 ruby.c         	p += mblen(p, RUBY_MBCHAR_MAXSIZE);
mblen             341 util.c             for (p = buf; *p; p += mblen(p, RUBY_MBCHAR_MAXSIZE))


md5_process

md5_process       381 ext/digest/md5/md5.c 	md5_process(pms, pms->buffer);
md5_process       386 ext/digest/md5/md5.c 	md5_process(pms, p);


med3

med3              501 util.c         	  m1 = med3(p1, p2, p3);
med3              505 util.c         	  m3 = med3(p1, p2, p3);
med3              513 util.c               m = med3(m1, m, m3);


memcmp

memcmp            171 dir.c          	    const int ret = memcmp(p1, p2, len1 < len2 ? len1 : len2);
memcmp           1382 ext/bigdecimal/bigdecimal.c #define MemCmp(x,y,z) memcmp(x,y,z)
memcmp            233 ext/dbm/dbm.c  	    memcmp(val.dptr, RSTRING(valstr)->ptr, val.dsize) == 0) {
memcmp            671 ext/dbm/dbm.c  	    memcmp(val.dptr, RSTRING(valstr)->ptr, val.dsize) == 0)
memcmp            429 ext/digest/md5/md5.c 	return memcmp(pctx1->count, pctx2->count, sizeof(pctx1->count)) == 0
memcmp            430 ext/digest/md5/md5.c 		&& memcmp(pctx1->state, pctx2->state, sizeof(pctx1->state)) == 0
memcmp            431 ext/digest/md5/md5.c 		&& memcmp(pctx1->buffer, pctx2->buffer, sizeof(pctx1->buffer)) == 0;
memcmp             29 ext/digest/md5/md5ossl.c       && memcmp(pctx1->data, pctx2->data, sizeof(pctx1->data)) == 0;
memcmp            459 ext/digest/rmd160/rmd160.c 		&& memcmp(pctx1->length, pctx2->length, sizeof(pctx1->length)) == 0
memcmp            460 ext/digest/rmd160/rmd160.c 		&& memcmp(pctx1->state, pctx2->state, sizeof(pctx1->state)) == 0
memcmp            461 ext/digest/rmd160/rmd160.c 		&& memcmp(pctx1->bbuffer, pctx2->bbuffer, sizeof(pctx1->bbuffer)) == 0;
memcmp             44 ext/digest/rmd160/rmd160ossl.c 	  && memcmp(pctx1->data, pctx2->data, sizeof(pctx1->data)) == 0;
memcmp            280 ext/digest/sha1/sha1.c 	return memcmp(pctx1->count, pctx2->count, sizeof(pctx1->count)) == 0
memcmp            281 ext/digest/sha1/sha1.c 		&& memcmp(pctx1->state, pctx2->state, sizeof(pctx1->state)) == 0
memcmp            282 ext/digest/sha1/sha1.c 		&& memcmp(pctx1->buffer, pctx2->buffer, sizeof(pctx1->buffer)) == 0;
memcmp             44 ext/digest/sha1/sha1ossl.c 	  && memcmp(pctx1->data, pctx2->data, sizeof(pctx1->data)) == 0;
memcmp            583 ext/digest/sha2/sha2.c 		&& memcmp(pctx1->state, pctx2->state, sizeof(pctx1->state)) == 0
memcmp            584 ext/digest/sha2/sha2.c 		&& memcmp(pctx1->buffer, pctx2->buffer, sizeof(pctx1->buffer)) == 0;
memcmp            885 ext/digest/sha2/sha2.c 	return memcmp(pctx1->bitcount, pctx2->bitcount, sizeof(pctx1->bitcount)) == 0
memcmp            886 ext/digest/sha2/sha2.c 		&& memcmp(pctx1->state, pctx2->state, sizeof(pctx1->state)) == 0
memcmp            887 ext/digest/sha2/sha2.c 		&& memcmp(pctx1->buffer, pctx2->buffer, sizeof(pctx1->buffer)) == 0;
memcmp            934 ext/digest/sha2/sha2.c 	return memcmp(pctx1->bitcount, pctx2->bitcount, sizeof(pctx1->bitcount)) == 0
memcmp            935 ext/digest/sha2/sha2.c 		&& memcmp(pctx1->state, pctx2->state, sizeof(pctx1->state)) == 0
memcmp            936 ext/digest/sha2/sha2.c 		&& memcmp(pctx1->buffer, pctx2->buffer, sizeof(pctx1->buffer)) == 0;
memcmp            328 ext/gdbm/gdbm.c             memcmp(RSTRING(valstr)->ptr, RSTRING(valstr2)->ptr,
memcmp            775 ext/gdbm/gdbm.c             memcmp(RSTRING(valstr)->ptr, RSTRING(valstr2)->ptr,
memcmp            400 ext/iconv/iconv.c 		memcmp(buffer, tmpstart, outlen)) /* something differs */
memcmp            852 ext/sdbm/_sdbm.c 		    memcmp(key, pag + GET_SHORT(ino,i), siz) == 0)
memcmp            211 ext/sdbm/init.c 	    memcmp(val.dptr, RSTRING(valstr)->ptr, val.dsize) == 0)
memcmp            652 ext/sdbm/init.c 	    memcmp(val.dptr, RSTRING(valstr)->ptr, val.dsize) == 0)
memcmp             61 ext/syck/syck.h #define S_MEMCMP(p1,p2,type,n) memcmp((p1), (p2), sizeof(type)*(n))
memcmp           3248 ext/zlib/zlib.c 	    if (rslen == 1 || memcmp(p, rsptr, rslen) == 0) break;
memcmp           1662 hash.c         	    memcmp(env[i],nam,len) == 0
memcmp           1588 io.c           		if (memcmp(RSTRING(str)->ptr + RSTRING(str)->len - rslen,
memcmp             58 missing/isinf.c     return memcmp(&n, &pinf, sizeof n) == 0
memcmp             59 missing/isinf.c 	|| memcmp(&n, &ninf, sizeof n) == 0;
memcmp             94 re.c           	return memcmp(p1, p2, len);
memcmp            137 re.c           	    return memcmp(x, s, m) == 0 ? 0 : -1;
memcmp            145 re.c           	while (hx != hy || memcmp(x, s, m)) {
memcmp           1391 re.c           	&& memcmp(RREGEXP(reg_cache)->str, RSTRING(str)->ptr, RSTRING(str)->len) == 0)
memcmp           1456 re.c               if (memcmp(RREGEXP(re1)->str, RREGEXP(re2)->str, RREGEXP(re1)->len) == 0 &&
memcmp            491 ruby.h         #define MEMCMP(p1,p2,type,n) memcmp((p1), (p2), sizeof(type)*(n))
memcmp            876 string.c           if (memcmp(RSTRING(str1)->ptr, RSTRING(str2)->ptr,
memcmp            284 wince/time_wce.c 	if( 0==memcmp( &tm1, &tm2, sizeof(struct tm) ) )


memcpy

memcpy            202 bignum.c           memcpy(buf, (char*)&q, SIZEOF_LONG_LONG);
memcpy            214 bignum.c           memcpy(&q, buf, SIZEOF_LONG_LONG);
memcpy            264 bignum.c           memcpy(buf, (char*)BDIGITS(val), len);
memcpy            283 bignum.c           memcpy((char*)BDIGITS(big), buf, QUAD_SIZE);
memcpy            142 dir.c          	    memcpy(buf1, p1, len1);
memcpy            151 dir.c          	    memcpy(buf2, p2, len2);
memcpy           1062 dir.c          	    memcpy(buf, p, m-p);
memcpy           1106 dir.c              memcpy(buf, path, len);
memcpy           1408 dir.c          	memcpy(buf, s, lbrace-s);
memcpy           1422 dir.c          	    memcpy(buf+shift, t, p-t);
memcpy           1731 dln.c          		    memcpy(bp, home, i);
memcpy           1740 dln.c          		memcpy(bp, dp, l);
memcpy           1759 dln.c          	memcpy(bp, fname, i + 1);
memcpy           9661 eval.c             memcpy(dst->fdset, src, size);
memcpy           2031 ext/bigdecimal/bigdecimal.c         memcpy(c->frac, a->frac, n * sizeof(U_LONG));
memcpy            134 ext/digest/digest.c     memcpy(pctx2, pctx1, algo->ctx_size);
memcpy            181 ext/digest/digest.c     memcpy(pctx2, pctx1, len);
memcpy            204 ext/digest/digest.c     memcpy(pctx2, pctx1, len);
memcpy            225 ext/digest/md5/md5.c 	memcpy(xbuf, data, 64);
memcpy            376 ext/digest/md5/md5.c 	memcpy(pms->buffer + offset, p, copy);
memcpy            390 ext/digest/md5/md5.c 	memcpy(pms->buffer, p, left);
memcpy            373 ext/digest/rmd160/rmd160.c                 (void)memcpy(context->bbuffer + context->buflen, data, nbytes);
memcpy            380 ext/digest/rmd160/rmd160.c                 (void)memcpy(context->bbuffer + context->buflen, data, ofs);
memcpy            382 ext/digest/rmd160/rmd160.c                 (void)memcpy(X, context->bbuffer, sizeof(X));
memcpy            393 ext/digest/rmd160/rmd160.c                         (void)memcpy(X, data + (64 * i) + ofs, sizeof(X));
memcpy            405 ext/digest/rmd160/rmd160.c                 memcpy(context->bbuffer, data + (64 * i) + ofs, context->buflen);
memcpy            429 ext/digest/rmd160/rmd160.c 	(void)memcpy(X, context->bbuffer, sizeof(X));
memcpy            148 ext/digest/sha1/sha1.c     (void)memcpy(block, buffer, 64);
memcpy            238 ext/digest/sha1/sha1.c 	(void)memcpy(&context->buffer[j], data, (i = 64-j));
memcpy            246 ext/digest/sha1/sha1.c     (void)memcpy(&context->buffer[j], &data[i], len - i);
memcpy            133 ext/digest/sha2/sha2.c #define MEMCPY_BCOPY(d,s,l)	memcpy((d), (s), (l))
memcpy            394 ext/dl/cptr.c  	memcpy((char *)RPTR_DATA(self)->ptr + offset, mem, len);
memcpy             25 ext/openssl/openssl_missing.c     memcpy(out, in, sizeof(HMAC_CTX));
memcpy            120 ext/openssl/openssl_missing.c     memcpy(out, in, sizeof(EVP_CIPHER_CTX));
memcpy            126 ext/openssl/openssl_missing.c 	memcpy(out->cipher_data, in->cipher_data, in->cipher->ctx_size);
memcpy            318 ext/openssl/openssl_missing.c 	memcpy(buf, key, i);
memcpy            134 ext/openssl/ossl.c     if(!NIL_P(str)) memcpy(RSTRING(str)->ptr, buf, len);
memcpy            182 ext/openssl/ossl.c 	memcpy(buf, RSTRING(pass)->ptr, len);
memcpy            357 ext/openssl/ossl_asn1.c     memcpy(buf, bstr->data, len);
memcpy            707 ext/openssl/ossl_asn1.c     memcpy(p, RSTRING(value)->ptr, RSTRING(value)->len);
memcpy            989 ext/openssl/ossl_asn1.c     memcpy(p, RSTRING(value)->ptr, RSTRING(value)->len);
memcpy            148 ext/openssl/ossl_cipher.c 	if (NIL_P(init_v)) memcpy(iv, "OpenSSL for Ruby rulez!", sizeof(iv));
memcpy            156 ext/openssl/ossl_cipher.c 		memcpy(iv, RSTRING(init_v)->ptr, RSTRING(init_v)->len);
memcpy            158 ext/openssl/ossl_cipher.c 	    else memcpy(iv, RSTRING(init_v)->ptr, sizeof(iv));
memcpy            324 ext/openssl/ossl_x509ext.c     memcpy(s, RSTRING(data)->ptr, RSTRING(data)->len);
memcpy            409 ext/sdbm/_sdbm.c 			(void) memcpy(pag, new, PBLKSIZ);
memcpy            698 ext/sdbm/_sdbm.c 		(void) memcpy(pag + off, key.dptr, key.dsize);
memcpy            705 ext/sdbm/_sdbm.c 		(void) memcpy(pag + off, val.dptr, val.dsize);
memcpy            873 ext/sdbm/_sdbm.c 	(void) memcpy(cur, pag, PBLKSIZ);
memcpy            185 ext/socket/getaddrinfo.c 	memcpy(ai, pai, sizeof(struct addrinfo));\
memcpy            192 ext/socket/getaddrinfo.c 	memcpy(p + (afd)->a_off, (addr), (afd)->a_addrlen);\
memcpy            265 ext/socket/getaddrinfo.c 	memcpy(pton, &in, sizeof(in));
memcpy            332 ext/socket/getaddrinfo.c 		memcpy(pai, hints, sizeof(*pai));
memcpy            666 ext/socket/getaddrinfo.c 			memcpy(&in6->s6_addr32[0], &faith_prefix,
memcpy            668 ext/socket/getaddrinfo.c 			memcpy(&in6->s6_addr32[3], ap, sizeof(struct in_addr));
memcpy            126 ext/socket/getnameinfo.c 	memcpy(&in.s_addr, addr, sizeof(in.s_addr));
memcpy           1564 ext/socket/socket.c     memcpy(&addr, res->ai_addr, res->ai_addrlen);
memcpy           2927 ext/socket/socket.c 	memcpy(&ss, RSTRING(sa)->ptr, RSTRING(sa)->len);
memcpy           1162 ext/strscan/strscan.c     memcpy(bp, CURPTR(p) - len, len); bp += len;
memcpy           1178 ext/strscan/strscan.c         memcpy(bp, CURPTR(p), len); bp += len;
memcpy           1182 ext/strscan/strscan.c         memcpy(bp, CURPTR(p), len); bp += len;
memcpy            117 ext/syck/node.c     memcpy( n->data.str->ptr, str, len );
memcpy            141 ext/syck/node.c     memcpy( n->data.str->ptr, str, len );
memcpy            154 ext/syck/rubyext.c             memcpy( buf + skip, RSTRING(str2)->ptr, len );
memcpy             59 ext/syck/syck.h #define S_MEMCPY(p1,p2,type,n) memcpy((p1), (p2), sizeof(type)*(n))
memcpy           2152 ext/tk/tcltklib.c     memcpy(buf, RSTRING(msg)->ptr, RSTRING(msg)->len);
memcpy           2445 ext/tk/tcltklib.c       memcpy(arg, str, len);
memcpy           2559 ext/tk/tcltklib.c         memcpy(buf + 1, str, len);
memcpy           5818 ext/tk/tcltklib.c     memcpy(eval_str, RSTRING(str)->ptr, RSTRING(str)->len);
memcpy           6067 ext/tk/tcltklib.c     memcpy(buf, RSTRING(str)->ptr, RSTRING(str)->len);
memcpy           6225 ext/tk/tcltklib.c     memcpy(buf, RSTRING(str)->ptr, RSTRING(str)->len);
memcpy           6304 ext/tk/tcltklib.c     memcpy(src_buf, RSTRING(str)->ptr, RSTRING(str)->len);
memcpy           6547 ext/tk/tcltklib.c             memcpy(unknown_objv + 1, objv, sizeof(Tcl_Obj *)*objc);
memcpy           6553 ext/tk/tcltklib.c             memcpy(unknown_argv + 1, argv, sizeof(char *)*argc);
memcpy            513 ext/zlib/zlib.c     memcpy(RSTRING(z->buf)->ptr + z->buf_filled, src, len);
memcpy           2222 ext/zlib/zlib.c         memcpy(RSTRING(outbuf)->ptr, RSTRING(dst)->ptr, RSTRING(dst)->len);
memcpy           2438 file.c         	    memcpy(p, b, s-b);
memcpy           2462 file.c         	    memcpy(p, s, 2);
memcpy           2572 file.c         		memcpy(++p, b, s-b);
memcpy           2586 file.c         	memcpy(++p, b, s-b);
memcpy            250 missing/vsnprintf.c #define	COPY(n)	  (void)memcpy((void *)fp->_p, (void *)p, (size_t)(n))
memcpy            145 pack.c             memcpy(utmp,&dtmp,sizeof(double));
memcpy            149 pack.c             memcpy(&dtmp,utmp,sizeof(double));
memcpy            163 pack.c             memcpy(utmp,&dtmp,sizeof(double));
memcpy            167 pack.c             memcpy(&dtmp,utmp,sizeof(double));
memcpy            283 pack.c         #define HTONF(x,y)	(memcpy(&y,&x,sizeof(float)),	\
memcpy            285 pack.c         			 memcpy(&x,&y,sizeof(float)),	\
memcpy            287 pack.c         #define HTOVF(x,y)	(memcpy(&y,&x,sizeof(float)),	\
memcpy            289 pack.c         			 memcpy(&x,&y,sizeof(float)),	\
memcpy            291 pack.c         #define NTOHF(x,y)	(memcpy(&y,&x,sizeof(float)),	\
memcpy            293 pack.c         			 memcpy(&x,&y,sizeof(float)),	\
memcpy            295 pack.c         #define VTOHF(x,y)	(memcpy(&y,&x,sizeof(float)),	\
memcpy            297 pack.c         			 memcpy(&x,&y,sizeof(float)),	\
memcpy            309 pack.c         #define HTOND(x,y)	(memcpy(&y,&x,sizeof(double)),	\
memcpy            311 pack.c         			 memcpy(&x,&y,sizeof(double)),	\
memcpy            313 pack.c         #define HTOVD(x,y)	(memcpy(&y,&x,sizeof(double)),	\
memcpy            315 pack.c         			 memcpy(&x,&y,sizeof(double)),	\
memcpy            317 pack.c         #define NTOHD(x,y)	(memcpy(&y,&x,sizeof(double)),	\
memcpy            319 pack.c         			 memcpy(&x,&y,sizeof(double)),	\
memcpy            321 pack.c         #define VTOHD(x,y)	(memcpy(&y,&x,sizeof(double)),	\
memcpy            323 pack.c         			 memcpy(&x,&y,sizeof(double)),	\
memcpy           1497 pack.c         		memcpy(OFF16(&tmp), s, NATINT_LEN(short,2));
memcpy           1509 pack.c         		memcpy(OFF16(&tmp), s, NATINT_LEN(unsigned short,2));
memcpy           1520 pack.c         		memcpy(&tmp, s, sizeof(int));
memcpy           1531 pack.c         		memcpy(&tmp, s, sizeof(unsigned int));
memcpy           1542 pack.c         		memcpy(OFF32(&tmp), s, NATINT_LEN(long,4));
memcpy           1553 pack.c         		memcpy(OFF32(&tmp), s, NATINT_LEN(unsigned long,4));
memcpy           1582 pack.c         		memcpy(OFF16B(&tmp), s, NATINT_LEN(unsigned short,2));
memcpy           1593 pack.c         		memcpy(OFF32B(&tmp), s, NATINT_LEN(unsigned long,4));
memcpy           1604 pack.c         		memcpy(OFF16(&tmp), s, NATINT_LEN(unsigned short,2));
memcpy           1615 pack.c         		memcpy(OFF32(&tmp), s, NATINT_LEN(long,4));
memcpy           1627 pack.c         		memcpy(&tmp, s, sizeof(float));
memcpy           1640 pack.c         		memcpy(&tmp, s, sizeof(float));
memcpy           1654 pack.c         		memcpy(&tmp, s, sizeof(double));
memcpy           1667 pack.c         		memcpy(&tmp, s, sizeof(double));
memcpy           1680 pack.c         		memcpy(&tmp, s, sizeof(float));
memcpy           1694 pack.c         		memcpy(&tmp, s, sizeof(double));
memcpy           1754 pack.c         			memcpy(ptr, hunk, mlen);
memcpy           1864 pack.c         		memcpy(&t, s, sizeof(char *));
memcpy           1906 pack.c         		    memcpy(&t, s, sizeof(char *));
memcpy           1043 process.c          memcpy(ss, str, s-str);
memcpy           1341 re.c               memcpy(re->str, s, len);
memcpy           1747 re.c               memcpy(t, RSTRING(str)->ptr, s - RSTRING(str)->ptr);
memcpy            115 regint.h       #define xmemcpy     memcpy
memcpy           1075 ruby.c         	memcpy(origargv[0], s, i);
memcpy           1079 ruby.c         	memcpy(origargv[0], s, i);
memcpy            489 ruby.h         #define MEMCPY(p1,p2,type,n) memcpy((p1), (p2), sizeof(type)*(n))
memcpy             92 sprintf.c          memcpy(&buf[blen], s, l);\
memcpy            432 sprintf.c      			memcpy(&buf[blen], RSTRING(str)->ptr, len);
memcpy             85 string.c       	memcpy(RSTRING(str)->ptr, ptr, len);
memcpy            349 string.c           memcpy(RSTRING(str3)->ptr, RSTRING(str1)->ptr, RSTRING(str1)->len);
memcpy            350 string.c           memcpy(RSTRING(str3)->ptr + RSTRING(str1)->len,
memcpy            385 string.c       	memcpy(RSTRING(str2)->ptr + i,
memcpy            438 string.c       	memcpy(ptr, RSTRING(str)->ptr, RSTRING(str)->len);
memcpy            648 string.c           memcpy(RSTRING(str)->ptr + RSTRING(str)->len, ptr, len);
memcpy            670 string.c       	memcpy(RSTRING(str)->ptr + RSTRING(str)->len, ptr, len);
memcpy            705 string.c           memcpy(RSTRING(str)->ptr + RSTRING(str)->len,
memcpy            723 string.c       	    memcpy(RSTRING(str)->ptr + RSTRING(str)->len,
memcpy           1863 string.c       	memcpy(RSTRING(str)->ptr + BEG(0),
memcpy           1982 string.c       	memcpy(bp, cp, len);
memcpy           1984 string.c       	memcpy(bp, RSTRING(val)->ptr, RSTRING(val)->len);
memcpy           1994 string.c       	    memcpy(bp, RSTRING(str)->ptr+END(0), len);
memcpy           2010 string.c       	memcpy(bp, cp, RSTRING(str)->len - offset);
memcpy           2122 string.c       	memcpy(RSTRING(str)->ptr, RSTRING(str2)->ptr, RSTRING(str2)->len);
memcpy           4069 string.c       		memcpy(p,f,flen);
memcpy           4077 string.c           memcpy(p, RSTRING(str)->ptr, RSTRING(str)->len);
memcpy           4087 string.c       		memcpy(p,f,flen);
memcpy            211 util.c         	(void)memcpy(p, strEQ(ext, suffix1) ? suffix2 : suffix1, 5);
memcpy            214 util.c             memcpy(RSTRING(str)->ptr, buf, RSTRING(str)->len);
memcpy            618 util.c             memcpy(tmp, str, len);
memcpy            655 win32/win32.c  		memcpy(q, s, n = p - s); q += n; s = p;
memcpy            664 win32/win32.c  	memcpy(q, s, n = p - s);
memcpy            941 win32/win32.c  			memcpy(tmp, cmd, len);
memcpy            950 win32/win32.c  		    memcpy(p, cmd, len);
memcpy           1250 win32/win32.c  		    memcpy(p - ((slashes + 1) >> 1), p + (~slashes & 1),


memmove

memmove           663 bignum.c           memmove(RBIGNUM(x)->sign?s:s+1, s+j, RSTRING(ss)->len);
memmove          1021 dir.c          		memmove(t, s, p - s);
memmove          1032 dir.c          	memmove(t, s, p - s); /* move '\0' too */
memmove          2834 ext/bigdecimal/bigdecimal.c                 memmove(&(a->frac[0]),&(a->frac[i]),(a->Prec)*sizeof(U_LONG));
memmove          3064 ext/bigdecimal/bigdecimal.c             memmove(psz + i + 1, psz + i, ie - i + 1);
memmove           816 ext/sdbm/_sdbm.c 		memmove(dst, src, m);
memmove           157 ext/syck/node.c             memmove( go, go + 1, end - go );
memmove            60 ext/syck/syck.h #define S_MEMMOVE(p1,p2,type,n) memmove((p1), (p2), sizeof(type)*(n))
memmove           557 ext/zlib/zlib.c     memmove(RSTRING(z->buf)->ptr, RSTRING(z->buf)->ptr + len,
memmove           577 ext/zlib/zlib.c     memmove(RSTRING(z->buf)->ptr + 1, RSTRING(z->buf)->ptr, z->buf_filled);
memmove           616 ext/zlib/zlib.c 	memmove(RSTRING(z->input)->ptr, RSTRING(z->input)->ptr + len,
memmove            86 missing.h      extern void *memmove(void *, const void *, size_t);
memmove           506 numeric.c          memmove(p, e, strlen(e)+1);
memmove           116 regint.h       #define xmemmove    memmove
memmove           490 ruby.h         #define MEMMOVE(p1,p2,type,n) memmove((p1), (p2), sizeof(type)*(n))
memmove           581 sprintf.c      				memmove(s+1, s, strlen(s)+1);
memmove          1318 string.c       	memmove(s+1, s, RSTRING(str)->len - n);
memmove          1547 string.c       	memmove(RSTRING(str)->ptr + beg + RSTRING(val)->len,
memmove          1555 string.c       	memmove(RSTRING(str)->ptr+beg, RSTRING(val)->ptr, RSTRING(val)->len);
memmove          1859 string.c       	    memmove(RSTRING(str)->ptr + BEG(0) + RSTRING(repl)->len,
memmove          3649 string.c       	memmove(RSTRING(str)->ptr, s, RSTRING(str)->len);
memmove          1776 win32/win32.c  	memmove(p, p + 1, strlen(p));
memmove          1924 win32/win32.c  	    memmove(


memset

memset            255 bignum.c           memset(buf, 0, QUAD_SIZE);
memset            459 dln.c          	memset(addr +  hdrp->a_text + hdrp->a_data, 0, hdrp->a_bss);
memset            462 dln.c          	memset(addr +  hdrp->a_text + hdrp->a_data, 0, bss);
memset           9618 eval.c         	memset((char *)fds->fdset + o, 0, m - o);
memset           1405 ext/bigdecimal/bigdecimal.c     memset(p,0,mb);
memset           2540 ext/bigdecimal/bigdecimal.c     memset(c->frac, 0, (nc + 1) * sizeof(U_LONG));        /* Initialize c  */
memset           3292 ext/bigdecimal/bigdecimal.c     memset(a->frac, 0, ma * sizeof(U_LONG));
memset           3515 ext/bigdecimal/bigdecimal.c     memset(m->frac, 0, mm * sizeof(U_LONG));
memset           3759 ext/bigdecimal/bigdecimal.c     memset(y->frac+ix+1, 0, (y->Prec - (ix+1)) * sizeof(U_LONG));
memset            369 ext/digest/rmd160/rmd160.c 	(void)memset(X, 0, sizeof(X));
memset            426 ext/digest/rmd160/rmd160.c 	(void)memset(context->bbuffer + context->buflen + 1, 0,
memset            437 ext/digest/rmd160/rmd160.c 		(void)memset(X, 0, sizeof(X));
memset            132 ext/digest/sha2/sha2.c #define MEMSET_BZERO(p,l)	memset((p), 0, (l))
memset            118 ext/digest/sha2/sha2hl.c 		(void) memset(ctx, 0, sizeof(SHA256_CTX));
memset            120 ext/digest/sha2/sha2hl.c 	(void) memset(digest, 0, SHA256_DIGEST_LENGTH);
memset            178 ext/digest/sha2/sha2hl.c 		(void) memset(ctx, 0, sizeof(SHA384_CTX));
memset            180 ext/digest/sha2/sha2hl.c 	(void) memset(digest, 0, SHA384_DIGEST_LENGTH);
memset            238 ext/digest/sha2/sha2hl.c 		(void) memset(ctx, 0, sizeof(SHA512_CTX));
memset            240 ext/digest/sha2/sha2hl.c 	(void) memset(digest, 0, SHA512_DIGEST_LENGTH);
memset            254 ext/dl/cfunc.c     memset(stack, 0, sizeof(DLSTACK_TYPE) * DLSTACK_SIZE);
memset             69 ext/dl/cptr.c    memset(ptr,0,(size_t)size);
memset             56 ext/openssl/openssl_missing.c     memset(ctx, 0, sizeof(EVP_MD_CTX));
memset             67 ext/openssl/openssl_missing.c     memset(ctx, 0, sizeof(EVP_MD_CTX));
memset             86 ext/openssl/openssl_missing.c     memset(ctx, 0, sizeof(EVP_MD_CTX));
memset            107 ext/openssl/openssl_missing.c     memset(ctx, 0, sizeof(HMAC_CTX));
memset            327 ext/openssl/openssl_missing.c 	    memset(buf, 0, (unsigned int)num);
memset            107 ext/openssl/openssl_missing.h #define OPENSSL_cleanse(p, l) memset(p, 0, l)
memset             32 ext/openssl/ossl_asn1.c     memset(&tm, 0, sizeof(struct tm));
memset            560 ext/openssl/ossl_asn1.c     memset(ret, 0, sizeof(ASN1_TYPE));
memset            155 ext/openssl/ossl_cipher.c 		memset(iv, 0, EVP_MAX_IV_LENGTH);
memset            222 ext/sdbm/_sdbm.c 				(void) memset(db->pagbuf, 0, PBLKSIZ);
memset            223 ext/sdbm/_sdbm.c 				(void) memset(db->dirbuf, 0, DBLKSIZ);
memset            393 ext/sdbm/_sdbm.c 	memset(zer, 0, PBLKSIZ);
memset            461 ext/sdbm/_sdbm.c 	(void) memset(db->pagbuf, 0, PBLKSIZ);
memset            513 ext/sdbm/_sdbm.c 		(void) memset(db->pagbuf, 0, PBLKSIZ);
memset            874 ext/sdbm/_sdbm.c 	(void) memset(pag, 0, PBLKSIZ);
memset            875 ext/sdbm/_sdbm.c 	(void) memset(new, 0, PBLKSIZ);
memset            187 ext/socket/getaddrinfo.c 	memset((ai)->ai_addr, 0, (afd)->a_socklen);\
memset             58 ext/syck/syck.h #define S_MEMZERO(p,type,n) memset((p), 0, sizeof(type)*(n))
memset           1597 ext/win32ole/win32ole.c     memset(&serverinfo, 0, sizeof(COSERVERINFO));
memset           1599 ext/win32ole/win32ole.c     memset(&multi_qi, 0, sizeof(MULTI_QI));
memset           2183 ext/win32ole/win32ole.c     memset(&excepinfo, 0, sizeof(EXCEPINFO));
memset           2295 ext/win32ole/win32ole.c             memset(&excepinfo, 0, sizeof(EXCEPINFO));
memset           2316 ext/win32ole/win32ole.c                 memset(&excepinfo, 0, sizeof(EXCEPINFO));
memset           2335 ext/win32ole/win32ole.c             memset(&excepinfo, 0, sizeof(EXCEPINFO));
memset           2409 ext/win32ole/win32ole.c     memset(&excepinfo, 0, sizeof(EXCEPINFO));
memset           2410 ext/win32ole/win32ole.c     memset(&dispParams, 0, sizeof(DISPPARAMS));
memset           2708 ext/win32ole/win32ole.c     memset(&excepinfo, 0, sizeof(excepinfo));
memset           2821 ext/win32ole/win32ole.c     memset(&excepinfo, 0, sizeof(excepinfo));
memset           2520 file.c         	memset(buf, '/', p - buf);
memset            140 gc.c               memset(mem, 0, n * size);
memset           1421 gc.c               memset(&m, 0, sizeof(m));
memset            218 random.c           memset(buf, 0, len * sizeof(long));
memset            273 random.c           memset(digits, 0, big->len * SIZEOF_BDIGITS);
memset            114 regint.h       #define xmemset     memset
memset            267 ruby.c             memset(&m, 0, sizeof(m));
memset            411 ruby.h             memset(sval, 0, sizeof(type)),\
memset            488 ruby.h         #define MEMZERO(p,type,n) memset((p), 0, sizeof(type)*(n))
memset             98 sprintf.c          memset(&buf[blen], c, l);\
memset            261 util.c             memset(&r, 0, sizeof(r));
memset            209 win32/win32.c  	memset(&osver, 0, sizeof(OSVERSIONINFO));
memset            259 win32/win32.c      memset(&o, 0, sizeof(o));
memset            656 win32/win32.c  		memset(q, '\\', ++bs); q += bs; bs = 0;
memset            871 win32/win32.c      memset(&aStartupInfo, 0, sizeof (STARTUPINFO));
memset            872 win32/win32.c      memset(&aProcessInformation, 0, sizeof (PROCESS_INFORMATION));
memset           2658 win32/win32.c  	memset(&sock_in6, 0, sizeof(sock_in6));
memset           3195 win32/win32.c      memset(&tm, 0, sizeof(tm));
memset           3253 win32/win32.c      memset(st, 0, sizeof(struct stat));
memset           3693 win32/win32.c  		memset(&m, 0, sizeof(m));
memset            501 wince/wince.c  	memset(p,0,length);
memset            203 wince/winsock2.c 	memset( &pe, 0, sizeof(struct protoent) );
memset            223 wince/winsock2.c 	memset( &pe, 0, sizeof(struct protoent) );
memset            246 wince/winsock2.c 	memset( &se, 0, sizeof(struct servent) );
memset            284 wince/winsock2.c 	memset( &se, 0, sizeof(struct servent) );


method_arity

method_arity     4638 eval.c         static int method_arity(VALUE);
method_arity     8336 eval.c         	    return method_arity(data->body->nd_tval);
method_arity     9097 eval.c             int n = method_arity(method);


method_arity_m

method_arity_m   9421 eval.c             rb_define_method(rb_cMethod, "arity", method_arity_m, 0);
method_arity_m   9435 eval.c             rb_define_method(rb_cUnboundMethod, "arity", method_arity_m, 0);


method_call

method_call       323 enumerator.c       return method_call(e->method, e->args);
method_call       536 parse.y        %type <node> bodystmt compstmt stmts stmt expr arg primary command command_call method_call
method_call      2617 parse.y        		| method_call
method_call      2618 parse.y        		| method_call brace_block
method_call      3313 parse.y        method_call	: operation paren_args


method_clone

method_clone     9418 eval.c             rb_define_method(rb_cMethod, "clone", method_clone, 0);
method_clone     9434 eval.c             rb_define_method(rb_cUnboundMethod, "clone", method_clone, 0);


method_entry

method_entry      571 class.c        	st_foreach(RCLASS(mod)->m_tbl, method_entry, (st_data_t)list);
method_entry      714 class.c        	st_foreach(RCLASS(klass)->m_tbl, method_entry, (st_data_t)list);
method_entry      719 class.c        	    st_foreach(RCLASS(klass)->m_tbl, method_entry, (st_data_t)list);


method_eq

method_eq        9415 eval.c             rb_define_method(rb_cMethod, "==", method_eq, 1);
method_eq        9416 eval.c             rb_define_method(rb_cMethod, "eql?", method_eq, 1);
method_eq        9431 eval.c             rb_define_method(rb_cUnboundMethod, "==", method_eq, 1);
method_eq        9432 eval.c             rb_define_method(rb_cUnboundMethod, "eql?", method_eq, 1);


method_hash

method_hash      9417 eval.c             rb_define_method(rb_cMethod, "hash", method_hash, 0);
method_hash      9433 eval.c             rb_define_method(rb_cUnboundMethod, "hash", method_hash, 0);


method_inspect

method_inspect   9422 eval.c             rb_define_method(rb_cMethod, "inspect", method_inspect, 0);
method_inspect   9423 eval.c             rb_define_method(rb_cMethod, "to_s", method_inspect, 0);
method_inspect   9436 eval.c             rb_define_method(rb_cUnboundMethod, "inspect", method_inspect, 0);
method_inspect   9437 eval.c             rb_define_method(rb_cUnboundMethod, "to_s", method_inspect, 0);


method_missing

method_missing   5784 eval.c         	    return method_missing(recv, mid, argc, argv, scope==CALLING_VCALL?CSTAT_VCALL:0);
method_missing   5792 eval.c         	    return method_missing(recv, mid, argc, argv, CSTAT_SUPER);
method_missing   5794 eval.c         	return method_missing(recv, mid, argc, argv, scope==CALLING_VCALL?CSTAT_VCALL:0);
method_missing   5800 eval.c         	    return method_missing(recv, mid, argc, argv, CSTAT_PRIV);
method_missing   5810 eval.c         		return method_missing(recv, mid, argc, argv, CSTAT_PROT);
method_missing   5944 eval.c         	return method_missing(self, ruby_frame->this_func, argc, argv, CSTAT_SUPER);


mime_begin

mime_begin        339 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_begin PROTO((FILE *f));
mime_begin       2087 ext/nkf/nkf-utf8/nkf.c 			} else if (mime_begin(f) == EOF)


mime_begin_strict

mime_begin_strict  343 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_begin_strict PROTO((FILE *f));
mime_begin_strict 2083 ext/nkf/nkf-utf8/nkf.c 			    if (mime_begin_strict(f) == EOF)


mime_getc

mime_getc         340 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_getc PROTO((FILE *f));
mime_getc        1904 ext/nkf/nkf-utf8/nkf.c 	i_mgetc = i_getc; i_getc = mime_getc;
mime_getc        3622 ext/nkf/nkf-utf8/nkf.c     if (i_getc!=mime_getc) {
mime_getc        3623 ext/nkf/nkf-utf8/nkf.c 	i_mgetc = i_getc; i_getc = mime_getc;


mime_getc_buf

mime_getc_buf     344 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_getc_buf PROTO((FILE *f));
mime_getc_buf    3626 ext/nkf/nkf-utf8/nkf.c 	    i_mgetc_buf = i_mgetc; i_mgetc = mime_getc_buf;


mime_integrity

mime_integrity    346 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_integrity PROTO((FILE *f,const unsigned char *p));
mime_integrity   3688 ext/nkf/nkf-utf8/nkf.c             return mime_integrity(f,mime_pattern[j]);


mime_prechar

mime_prechar      349 ext/nkf/nkf-utf8/nkf.c STATIC  void    mime_prechar PROTO((int c2, int c1));
mime_prechar     3113 ext/nkf/nkf-utf8/nkf.c     mime_prechar(c2, c1);


mime_putc

mime_putc         350 ext/nkf/nkf-utf8/nkf.c STATIC  void    mime_putc PROTO((int c));
mime_putc        1851 ext/nkf/nkf-utf8/nkf.c 	o_putc = mime_putc;
mime_putc        4412 ext/nkf/nkf-utf8/nkf.c 	mime_putc(mimeout_buf[i]);


mime_ungetc

mime_ungetc       341 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_ungetc PROTO((int c,FILE *f));
mime_ungetc      1905 ext/nkf/nkf-utf8/nkf.c 	i_mungetc = i_ungetc; i_ungetc = mime_ungetc;
mime_ungetc      3624 ext/nkf/nkf-utf8/nkf.c 	i_mungetc = i_ungetc; i_ungetc = mime_ungetc;


mime_ungetc_buf

mime_ungetc_buf   345 ext/nkf/nkf-utf8/nkf.c STATIC  int     mime_ungetc_buf  PROTO((int c,FILE *f));
mime_ungetc_buf  3627 ext/nkf/nkf-utf8/nkf.c 	    i_mungetc_buf = i_mungetc; i_mungetc = mime_ungetc_buf;


mimeout_addchar

mimeout_addchar  4554 ext/nkf/nkf-utf8/nkf.c             mimeout_addchar(c);
mimeout_addchar  4569 ext/nkf/nkf-utf8/nkf.c 	    mimeout_addchar(mimeout_buf[i]);
mimeout_addchar  4654 ext/nkf/nkf-utf8/nkf.c                         mimeout_addchar(mimeout_buf[i]);
mimeout_addchar  4694 ext/nkf/nkf-utf8/nkf.c                         mimeout_addchar(mimeout_buf[i]);
mimeout_addchar  4707 ext/nkf/nkf-utf8/nkf.c 	    mimeout_addchar(mimeout_buf[i]);
mimeout_addchar  4718 ext/nkf/nkf-utf8/nkf.c     mimeout_addchar(c);


mktime

mktime            742 time.c         	if ((t = mktime(&buf)) != -1)
mktime           2902 win32/win32.c      t = mktime(&tm);
mktime           3202 win32/win32.c      t = mktime(&tm);
mktime             48 wince/time.h   time_t mktime(struct tm* pt);
mktime            265 wince/time_wce.c 	t1 = mktime(&tm1);


mmarg

mmarg             417 util.c         #define mmswap(a,b) mmswap_((a),(b),mmarg)
mmarg             443 util.c         #define mmrot3(a,b,c) mmrot3_((a),(b),(c),mmarg)


mmrot3

mmrot3            528 util.c         	mmrot3(r,m,l); goto loopA;                           /*3-5-2*/
mmrot3            546 util.c         	mmrot3(l,m,r); goto loopA;                           /*7-5-6*/


mmswap

mmswap            485 util.c               if ((*cmp)(L,R,d) > 0) mmswap(L,R); goto nxt;
mmswap            527 util.c         	if ((*cmp)(l,r,d) <= 0) {mmswap(m,r); goto loopA;}     /*3-5-4*/
mmswap            539 util.c         	  while (l<r) {mmswap(l,r); l+=size; r-=size;}  /* reverse region */
mmswap            542 util.c         	fail2: mmswap(l,r); goto loopA;                      /*7-5-3*/
mmswap            545 util.c         	if ((*cmp)(l,r,d) <= 0) {mmswap(l,m); goto loopB;}   /*7-5-8*/
mmswap            548 util.c               mmswap(l,r); goto loopA;                               /*7-5-5*/
mmswap            552 util.c             if (t > 0) {mmswap(l,r); goto loopB;}                    /*5-5-3*/
mmswap            558 util.c               if ((t = (*cmp)(l,m,d)) > 0) {mmswap(l,r); l = L; goto loopA;}/*575-5*/
mmswap            559 util.c               if (t < 0)                 {mmswap(L,l); l = L; goto loopB;}  /*535-5*/
mmswap            566 util.c         	  {l -= size; if (l != m) mmswap(m,l); l -= size; goto fin;}
mmswap            573 util.c         	  {l -= size; if (l != m) mmswap(m,l); l -= size; goto fin;}
mmswap            578 util.c               mmswap(l,r);    /* swap left and right */
mmswap            585 util.c         	  {r += size; if (r != m) mmswap(r,m); r += size; goto fin;}
mmswap            592 util.c         	  {r += size; if (r != m) mmswap(r,m); r += size; goto fin;}
mmswap            597 util.c               mmswap(l,r);    /* swap left and right */


mnew

mnew             8810 eval.c             return mnew(CLASS_OF(obj), obj, rb_to_id(vid), rb_cMethod);
mnew             8848 eval.c             return mnew(mod, Qundef, rb_to_id(vid), rb_cUnboundMethod);


mod_av_set

mod_av_set       1516 variable.c         mod_av_set(klass, id, val, Qtrue);
mod_av_set       1542 variable.c         mod_av_set(klass, id, val, Qfalse);


module_setup

module_setup     1039 eval.c         static VALUE module_setup(VALUE,NODE*);
module_setup     3876 eval.c         	    result = module_setup(klass, node);
module_setup     3910 eval.c         	    result = module_setup(module, node);
module_setup     3932 eval.c         	    result = module_setup(klass, node);


moreswitches

moreswitches      771 ruby.c         		s = moreswitches(s);
moreswitches      944 ruby.c         			p = moreswitches(p+1);


move_to_next_entry

move_to_next_entry 1514 win32/win32.c  	move_to_next_entry(dirp);
move_to_next_entry 1542 win32/win32.c  	move_to_next_entry(dirp);


mproc

mproc            9213 eval.c             VALUE proc = rb_iterate((VALUE(*)(VALUE))mproc, 0, func, val);
mproc            9238 eval.c             proc = rb_iterate((VALUE(*)(VALUE))mproc, 0, bmcall, method);


my_getcwd

my_getcwd         779 dir.c          	char *cwd = my_getcwd();
my_getcwd         809 dir.c              path = my_getcwd();
my_getcwd        2279 file.c             oldcwd = my_getcwd();
my_getcwd        2281 file.c         	drvcwd = my_getcwd();
my_getcwd        2497 file.c         	    char *dir = my_getcwd();
my_getcwd        4006 file.c         	char *buf = my_getcwd();


nR0

nR0                91 ext/digest/sha1/sha1.c     nR0(a,b,c,d,e, 0); nR0(e,a,b,c,d, 1); nR0(d,e,a,b,c, 2); nR0(c,d,e,a,b, 3);
nR0                92 ext/digest/sha1/sha1.c     nR0(b,c,d,e,a, 4); nR0(a,b,c,d,e, 5); nR0(e,a,b,c,d, 6); nR0(d,e,a,b,c, 7);
nR0                93 ext/digest/sha1/sha1.c     nR0(c,d,e,a,b, 8); nR0(b,c,d,e,a, 9); nR0(a,b,c,d,e,10); nR0(e,a,b,c,d,11);
nR0                94 ext/digest/sha1/sha1.c     nR0(d,e,a,b,c,12); nR0(c,d,e,a,b,13); nR0(b,c,d,e,a,14); nR0(a,b,c,d,e,15);


nR2

nR2               101 ext/digest/sha1/sha1.c     nR2(a,b,c,d,e,20); nR2(e,a,b,c,d,21); nR2(d,e,a,b,c,22); nR2(c,d,e,a,b,23);
nR2               102 ext/digest/sha1/sha1.c     nR2(b,c,d,e,a,24); nR2(a,b,c,d,e,25); nR2(e,a,b,c,d,26); nR2(d,e,a,b,c,27);
nR2               103 ext/digest/sha1/sha1.c     nR2(c,d,e,a,b,28); nR2(b,c,d,e,a,29); nR2(a,b,c,d,e,30); nR2(e,a,b,c,d,31);
nR2               104 ext/digest/sha1/sha1.c     nR2(d,e,a,b,c,32); nR2(c,d,e,a,b,33); nR2(b,c,d,e,a,34); nR2(a,b,c,d,e,35);
nR2               105 ext/digest/sha1/sha1.c     nR2(e,a,b,c,d,36); nR2(d,e,a,b,c,37); nR2(c,d,e,a,b,38); nR2(b,c,d,e,a,39);


nR3

nR3               111 ext/digest/sha1/sha1.c     nR3(a,b,c,d,e,40); nR3(e,a,b,c,d,41); nR3(d,e,a,b,c,42); nR3(c,d,e,a,b,43);
nR3               112 ext/digest/sha1/sha1.c     nR3(b,c,d,e,a,44); nR3(a,b,c,d,e,45); nR3(e,a,b,c,d,46); nR3(d,e,a,b,c,47);
nR3               113 ext/digest/sha1/sha1.c     nR3(c,d,e,a,b,48); nR3(b,c,d,e,a,49); nR3(a,b,c,d,e,50); nR3(e,a,b,c,d,51);
nR3               114 ext/digest/sha1/sha1.c     nR3(d,e,a,b,c,52); nR3(c,d,e,a,b,53); nR3(b,c,d,e,a,54); nR3(a,b,c,d,e,55);
nR3               115 ext/digest/sha1/sha1.c     nR3(e,a,b,c,d,56); nR3(d,e,a,b,c,57); nR3(c,d,e,a,b,58); nR3(b,c,d,e,a,59);


nR4

nR4               121 ext/digest/sha1/sha1.c     nR4(a,b,c,d,e,60); nR4(e,a,b,c,d,61); nR4(d,e,a,b,c,62); nR4(c,d,e,a,b,63);
nR4               122 ext/digest/sha1/sha1.c     nR4(b,c,d,e,a,64); nR4(a,b,c,d,e,65); nR4(e,a,b,c,d,66); nR4(d,e,a,b,c,67);
nR4               123 ext/digest/sha1/sha1.c     nR4(c,d,e,a,b,68); nR4(b,c,d,e,a,69); nR4(a,b,c,d,e,70); nR4(e,a,b,c,d,71);
nR4               124 ext/digest/sha1/sha1.c     nR4(d,e,a,b,c,72); nR4(c,d,e,a,b,73); nR4(b,c,d,e,a,74); nR4(a,b,c,d,e,75);
nR4               125 ext/digest/sha1/sha1.c     nR4(e,a,b,c,d,76); nR4(d,e,a,b,c,77); nR4(c,d,e,a,b,78); nR4(b,c,d,e,a,79);


name_err_initialize

name_err_initialize  632 error.c            name_err_initialize(argc, argv, self);
name_err_initialize  965 error.c            rb_define_method(rb_eNameError, "initialize", name_err_initialize, -1);


name_err_mesg_to_str

name_err_mesg_to_str  971 error.c            rb_define_method(rb_cNameErrorMesg, "to_str", name_err_mesg_to_str, 0);
name_err_mesg_to_str  972 error.c            rb_define_method(rb_cNameErrorMesg, "_dump", name_err_mesg_to_str, 1);


name_find

name_find         714 regparse.c       e = name_find(reg, name, name_end);
name_find         817 regparse.c       e = name_find(reg, name, name_end);


names_clear

names_clear       459 regparse.c       r = names_clear(reg);
names_clear       643 regparse.c       r = names_clear(reg);
names_clear      5156 regparse.c       names_clear(reg);


nan

nan               292 math.c         #  define nan(x) nan()
nan               294 math.c         # define log(x) ((x) < 0.0 ? nan("") : log(x))
nan               295 math.c         # define log10(x) ((x) < 0.0 ? nan("") : log10(x))


nd_1st

nd_1st           3157 eval.c         	result = rb_eval(self, node->nd_1st);
nd_1st           3163 eval.c         	result = rb_eval(self, node->nd_1st);
nd_1st           7730 parse.y        	node->nd_1st = cond0(parser, node->nd_1st);


nd_2nd

nd_2nd           3159 eval.c         	node = node->nd_2nd;
nd_2nd           3165 eval.c         	node = node->nd_2nd;
nd_2nd           7427 parse.y        	    node = node->nd_2nd;
nd_2nd           7731 parse.y        	node->nd_2nd = cond0(parser, node->nd_2nd);
nd_2nd           7784 parse.y        	while ((second = node->nd_2nd) != 0 && nd_type(second) == type) {
nd_2nd           7787 parse.y        	node->nd_2nd = NEW_NODE(type, second, right, 0);


nd_aid

nd_aid           3433 eval.c         	    rb_funcall2(recv, node->nd_next->nd_aid, 1, &val);
nd_aid           3445 eval.c         	if ((node->nd_aid && !is_defined(self, node->nd_head, 0, 0)) ||
nd_aid            906 parse.y        				    $$->nd_aid = vid;
nd_aid           1661 parse.y        				    $$->nd_aid = vid;


nd_alen

nd_alen          2144 eval.c         #define SETUP_ARGS(anode) SETUP_ARGS0(anode, anode->nd_alen)
nd_alen          2174 eval.c         	argc=node->nd_alen;
nd_alen          3392 eval.c         	    SETUP_ARGS0(node->nd_args->nd_next, node->nd_args->nd_alen - 1);
nd_alen          3627 eval.c         	    i = node->nd_alen;
nd_alen          3643 eval.c         	    i = node->nd_alen;
nd_alen          3018 parse.y        			if ($1->nd_alen == 1) {
nd_alen          4297 parse.y        			if ($1->nd_alen%2 != 0) {
nd_alen          7010 parse.y            list->nd_alen += 1;
nd_alen          7029 parse.y            head->nd_alen += tail->nd_alen;
nd_alen          7083 parse.y        	    head->nd_alen = 1;


nd_argc

nd_argc          5621 eval.c         	    int len = body->nd_argc;
nd_argc          9037 eval.c         	if (body->nd_argc < 0) return -1;
nd_argc          9038 eval.c         	return body->nd_argc;


nd_args

nd_args          2205 eval.c         		return arg_defined(self, node->nd_args, buf, "super");
nd_args          2242 eval.c         	    return arg_defined(self, node->nd_args, buf,
nd_args          3255 eval.c         	    SETUP_ARGS(node->nd_args);
nd_args          3273 eval.c         	    SETUP_ARGS(node->nd_args);
nd_args          3288 eval.c         	    SETUP_ARGS(node->nd_args);
nd_args          3335 eval.c         		SETUP_ARGS(node->nd_args);
nd_args          3391 eval.c         	    rval = node->nd_args->nd_head;
nd_args          3392 eval.c         	    SETUP_ARGS0(node->nd_args->nd_next, node->nd_args->nd_alen - 1);
nd_args          4714 eval.c         		var = var->nd_args;
nd_args          4978 eval.c             if (node->nd_args) {
nd_args          4979 eval.c         	if ((long)(node->nd_args) == -1) {
nd_args          4983 eval.c         	    assign(self, node->nd_args, rb_ary_new4(len-i, RARRAY(val)->ptr+i), pcall);
nd_args          4986 eval.c         	    assign(self, node->nd_args, rb_ary_new2(0), pcall);
nd_args          5076 eval.c         	    if (!lhs->nd_args) {
nd_args          5086 eval.c         		args = rb_eval(self, lhs->nd_args);
nd_args          5145 eval.c             if (!node->nd_args) {
nd_args          5150 eval.c             SETUP_ARGS(node->nd_args);
nd_args          8343 eval.c         	var = var->nd_args;
nd_args          8357 eval.c         	if (var->nd_args) return -n-1;
nd_args          7376 parse.y        	lhs->nd_args = arg_add(lhs->nd_args, rhs);


nd_beg

nd_beg           3176 eval.c         	    VALUE beg = rb_eval(self, node->nd_beg);
nd_beg           3187 eval.c         		if (RTEST(rb_eval(self, node->nd_beg))) {
nd_beg           3209 eval.c         		result = RTEST(rb_eval(self, node->nd_beg)) ? Qtrue : Qfalse;
nd_beg           7736 parse.y        	node->nd_beg = range_op(parser, node->nd_beg);
nd_beg           7742 parse.y        	    int b = literal_node(node->nd_beg);


nd_body

nd_body            62 class.c            st_insert(tbl, mid, (st_data_t)NEW_METHOD(body->nd_body, body->nd_noex));
nd_body           546 class.c        	if (!body->nd_body) type = -1; /* none */
nd_body           453 eval.c             if ((body = search_method(klass, id, &origin)) == 0 || !body->nd_body) {
nd_body           471 eval.c         	body = body->nd_body;
nd_body           488 eval.c         	body = body->nd_body;
nd_body           532 eval.c         	!body->nd_body) {
nd_body           598 eval.c             if (!body || !body->nd_body) {
nd_body          1334 eval.c         	node = node->nd_body;
nd_body          1925 eval.c             if (!body || !body->nd_body) {
nd_body          2022 eval.c             if (!orig || !orig->nd_body) {
nd_body          2027 eval.c             if (!orig || !orig->nd_body) {
nd_body          2033 eval.c             body = orig->nd_body;
nd_body          2043 eval.c         	if (node->nd_cnt == 0 && node->nd_body) {
nd_body          2743 eval.c         	node = node->nd_body;
nd_body          2782 eval.c         		rb_eval(self, node->nd_body);
nd_body          2821 eval.c         	    node = node->nd_body;
nd_body          2845 eval.c         			    node = node->nd_body;
nd_body          2853 eval.c         		    node = node->nd_body;
nd_body          2867 eval.c         	    node = node->nd_body;
nd_body          2886 eval.c         				node = node->nd_body;
nd_body          2894 eval.c         			node = node->nd_body;
nd_body          2913 eval.c         		rb_eval(self, node->nd_body);
nd_body          2948 eval.c         		rb_eval(self, node->nd_body);
nd_body          2980 eval.c         	PUSH_BLOCK(node->nd_var, node->nd_body);
nd_body          2995 eval.c         	    PUSH_BLOCK(node->nd_var, node->nd_body);
nd_body          3117 eval.c         			result = rb_eval(self, resq->nd_body);
nd_body          3169 eval.c         	if (RTEST(rb_eval(self, node->nd_body))) result = Qfalse;
nd_body          3228 eval.c         	    result = rb_ary_concat(args, splat_value(rb_eval(self, node->nd_body)));
nd_body          3235 eval.c         	    result = rb_ary_push(args, rb_eval(self, node->nd_body));
nd_body          3659 eval.c         	result = rb_obj_as_string(rb_eval(self, node->nd_body));
nd_body          3741 eval.c         		if (RTEST(ruby_verbose) && ruby_class == origin && body->nd_cnt == 0 && body->nd_body) {
nd_body          3755 eval.c         	    if (body && origin == ruby_class && body->nd_body == 0) {
nd_body          3962 eval.c             NODE * volatile node = n->nd_body;
nd_body          4713 eval.c         		bvar = var->nd_body;
nd_body          7209 eval.c         	    if (body == 0 || body->nd_body == 0) {
nd_body          7212 eval.c         	    if (nd_type(body->nd_body) != NODE_ZSUPER) {
nd_body          7218 eval.c         	rb_add_method(rb_singleton_class(module), id, body->nd_body, NOEX_PUBLIC);
nd_body          8625 eval.c         			 (VALUE)&arg, rb_eval(self, node->nd_body));
nd_body           779 parse.y        			    $$->nd_else = $$->nd_body;
nd_body           780 parse.y        			    $$->nd_body = 0;
nd_body           792 parse.y        			    $$->nd_body = $$->nd_else;
nd_body           803 parse.y        			    $$ = NEW_WHILE(cond($3), $1->nd_body, 0);
nd_body           819 parse.y        			    $$ = NEW_UNTIL(cond($3), $1->nd_body, 0);
nd_body          1148 parse.y        			$3->nd_body = block_append($3->nd_body,
nd_body          2642 parse.y        			    NODE *tmp = $$->nd_body;
nd_body          2643 parse.y        			    $$->nd_body = $$->nd_else;
nd_body          2659 parse.y        			    NODE *tmp = $$->nd_body;
nd_body          2660 parse.y        			    $$->nd_body = $$->nd_else;
nd_body          3217 parse.y        			$$->nd_body = block_append($$->nd_body, $5);
nd_body          3271 parse.y        			$3->nd_body = block_append($3->nd_body,
nd_body          3409 parse.y        			$3->nd_body = block_append($3->nd_body,
nd_body          3435 parse.y        			$3->nd_body = block_append($3->nd_body,
nd_body          7416 parse.y        	    node = node->nd_body;
nd_body          7420 parse.y        	    if (!value_expr(node->nd_body)) return Qfalse;
nd_body          7550 parse.y        	*n = (*n)->nd_body;
nd_body          7579 parse.y        	    *body = node = node->nd_body;
nd_body          7585 parse.y        	    if (subnodes(nd_body, nd_else)) break;
nd_body          7588 parse.y        	    body = &node->nd_body;
nd_body          7591 parse.y        	    if (!subnodes(nd_body, nd_next)) goto end;
nd_body          7801 parse.y        	*nodep = c->nd_body;
nd_body          7896 parse.y        	node2->nd_body = arg_prepend(node1, node2->nd_body);
nd_body          8209 parse.y        	node = node->nd_body;
nd_body          8215 parse.y        	prelude->nd_body = node;
nd_body          8228 parse.y        	node = node->nd_body;
nd_body          8242 parse.y        	prelude->nd_body = node;


nd_cflag

nd_cflag         3690 eval.c         				    node->nd_cflag);
nd_cflag         3694 eval.c         				    node->nd_cflag);
nd_cflag         3646 parse.y        			    node->nd_cflag = options & ~RE_OPTION_ONCE;


nd_cfnc

nd_cfnc          4777 eval.c         	      node->nd_cfnc != bmcall)) {
nd_cfnc          4813 eval.c         		result = (*node->nd_cfnc)(val, node->nd_tval, self);
nd_cfnc          4817 eval.c         		result = (*node->nd_cfnc)(val, node->nd_tval, self);
nd_cfnc          5634 eval.c         		    result = call_cfunc(body->nd_cfnc, recv, len, argc, argv);
nd_cfnc          5643 eval.c         		result = call_cfunc(body->nd_cfnc, recv, len, argc, argv);
nd_cfnc          8335 eval.c         	    data->body->nd_cfnc == bmcall) {


nd_clss

nd_clss          1758 eval.c         #define ruby_cbase (ruby_cref->nd_clss)
nd_clss          1767 eval.c         	struct RClass *klass = RCLASS(cbase->nd_clss);
nd_clss          1779 eval.c             return rb_const_defined(cref->nd_clss, id);
nd_clss          1789 eval.c         	VALUE klass = cbase->nd_clss;
nd_clss          1803 eval.c             return rb_const_get(cref->nd_clss, id);
nd_clss          1811 eval.c             while (cref && cref->nd_next && (NIL_P(cref->nd_clss) || FL_TEST(cref->nd_clss, FL_SINGLETON))) {
nd_clss          1817 eval.c             if (NIL_P(cref->nd_clss)) {
nd_clss          1820 eval.c             return cref->nd_clss;
nd_clss          1845 eval.c         	if (!NIL_P(cbase->nd_clss)) rb_ary_push(ary, cbase->nd_clss);
nd_clss          1875 eval.c         	if (!NIL_P(cbase->nd_clss)) {
nd_clss          1876 eval.c         	    data = rb_mod_const_at(cbase->nd_clss, data);


nd_cnt

nd_cnt           2034 eval.c             orig->nd_cnt++;
nd_cnt           2043 eval.c         	if (node->nd_cnt == 0 && node->nd_body) {
nd_cnt           2162 eval.c         #define MATCH_DATA *rb_svar(node->nd_cnt)
nd_cnt           3184 eval.c         	    VALUE *flip = rb_svar(node->nd_cnt);
nd_cnt           3206 eval.c         	    VALUE *flip = rb_svar(node->nd_cnt);
nd_cnt           3460 eval.c         	ruby_scope->local_vars[node->nd_cnt] = result;
nd_cnt           3513 eval.c         	result = ruby_scope->local_vars[node->nd_cnt];
nd_cnt           3541 eval.c         	    ruby_scope->local_vars[node->nd_cnt] = result;
nd_cnt           3741 eval.c         		if (RTEST(ruby_verbose) && ruby_class == origin && body->nd_cnt == 0 && body->nd_body) {
nd_cnt           5028 eval.c         	ruby_scope->local_vars[lhs->nd_cnt] = val;
nd_cnt           7740 parse.y        	node->nd_cnt = local_append(internal_id());


nd_cond

nd_cond          2820 eval.c         	if (RTEST(rb_eval(self, node->nd_cond))) {
nd_cond          2909 eval.c         	    if (node->nd_state && !RTEST(rb_eval(self, node->nd_cond)))
nd_cond          2916 eval.c         	    } while (RTEST(rb_eval(self, node->nd_cond)));
nd_cond          2944 eval.c         	    if (node->nd_state && RTEST(rb_eval(self, node->nd_cond)))
nd_cond          2951 eval.c         	    } while (!RTEST(rb_eval(self, node->nd_cond)));
nd_cond           778 parse.y        			if (cond_negative(&$$->nd_cond)) {
nd_cond           791 parse.y        			if (cond_negative(&$$->nd_cond)) {
nd_cond           808 parse.y        			if (cond_negative(&$$->nd_cond)) {
nd_cond           824 parse.y        			if (cond_negative(&$$->nd_cond)) {
nd_cond          2641 parse.y        			if (cond_negative(&$$->nd_cond)) {
nd_cond          2658 parse.y        			if (cond_negative(&$$->nd_cond)) {
nd_cond          2674 parse.y        			if (cond_negative(&$$->nd_cond)) {
nd_cond          2688 parse.y        			if (cond_negative(&$$->nd_cond)) {


nd_cpath

nd_cpath         3830 eval.c         	    cbase = class_prefix(self, node->nd_cpath);
nd_cpath         3831 eval.c         	    cname = node->nd_cpath->nd_mid;
nd_cpath         3888 eval.c         	    cbase = class_prefix(self, node->nd_cpath);
nd_cpath         3889 eval.c         	    cname = node->nd_cpath->nd_mid;


nd_cval

nd_cval          5668 eval.c         	result = proc_invoke(body->nd_cval, rb_ary_new4(argc, argv), recv, klass);
nd_cval          9046 eval.c         	return rb_proc_arity(body->nd_cval);
nd_cval          9236 eval.c         	return mdata->body->nd_cval;


nd_defn

nd_defn          3723 eval.c         	if (node->nd_defn) {
nd_defn          3759 eval.c         	    defn = copy_node_scope(node->nd_defn, ruby_cref);
nd_defn          3770 eval.c         	if (node->nd_defn) {
nd_defn          3795 eval.c         	    defn = copy_node_scope(node->nd_defn, ruby_cref);


nd_else

nd_else          2824 eval.c         	    node = node->nd_else;
nd_else          3133 eval.c         	    if (!rescuing && (node = node->nd_else)) { /* else clause given */
nd_else          3486 eval.c         	    rb_const_set(class_prefix(self, node->nd_else), node->nd_else->nd_mid, result);
nd_else          5041 eval.c         	    rb_const_set(class_prefix(self, lhs->nd_else), lhs->nd_else->nd_mid, val);
nd_else           779 parse.y        			    $$->nd_else = $$->nd_body;
nd_else           792 parse.y        			    $$->nd_body = $$->nd_else;
nd_else           793 parse.y        			    $$->nd_else = 0;
nd_else          2643 parse.y        			    $$->nd_body = $$->nd_else;
nd_else          2644 parse.y        			    $$->nd_else = tmp;
nd_else          2660 parse.y        			    $$->nd_body = $$->nd_else;
nd_else          2661 parse.y        			    $$->nd_else = tmp;
nd_else          7421 parse.y        	    node = node->nd_else;
nd_else          7585 parse.y        	    if (subnodes(nd_body, nd_else)) break;


nd_end

nd_end           3177 eval.c         	    VALUE end = rb_eval(self, node->nd_end);
nd_end           3188 eval.c         		    *flip = RTEST(rb_eval(self, node->nd_end))?Qfalse:Qtrue;
nd_end           3196 eval.c         		if (RTEST(rb_eval(self, node->nd_end))) {
nd_end           3213 eval.c         		if (RTEST(rb_eval(self, node->nd_end))) {
nd_end           4166 parse.y        			$$->nd_end = $$;
nd_end           6962 parse.y        	end->nd_end = end;
nd_end           6967 parse.y        	end = h->nd_end;
nd_end           6989 parse.y        	tail->nd_end = tail;
nd_end           6992 parse.y            h->nd_end = tail->nd_end;
nd_end           7004 parse.y        	last = list->nd_next->nd_end;
nd_end           7012 parse.y            list->nd_next->nd_end = last->nd_next;
nd_end           7023 parse.y        	last = head->nd_next->nd_end;
nd_end           7032 parse.y        	head->nd_next->nd_end = tail->nd_next->nd_end;
nd_end           7035 parse.y        	head->nd_next->nd_end = tail;
nd_end           7582 parse.y        	    body = &node->nd_end->nd_head;
nd_end           7737 parse.y        	node->nd_end = range_op(parser, node->nd_end);
nd_end           7743 parse.y        	    int e = literal_node(node->nd_end);


nd_ensr

nd_ensr          3145 eval.c         	if (node->nd_ensr) {
nd_ensr          3149 eval.c         	    rb_eval(self, node->nd_ensr);


nd_entry

nd_entry         2290 eval.c         	if (rb_gvar_defined(node->nd_entry)) {
nd_entry         3475 eval.c         	rb_gvar_set(node->nd_entry, result);
nd_entry         3521 eval.c         	result = rb_gvar_get(node->nd_entry);
nd_entry         5018 eval.c         	rb_gvar_set(lhs->nd_entry, val);


nd_frml

nd_frml          5513 eval.c             i = node->nd_frml ? RARRAY(node->nd_frml)->len : 0;
nd_frml          5537 eval.c         	VALUE a = node->nd_frml;
nd_frml          9052 eval.c         	n = body->nd_frml ? RARRAY(body->nd_frml)->len : 0;


nd_func

nd_func          5159 parse.y            int func = quote->nd_func;
nd_func          5172 parse.y        	    quote->nd_func = -1;


nd_head

nd_head           477 eval.c         	    body = ent->method = body->nd_head;
nd_head           492 eval.c         	    body = body->nd_head;
nd_head          1333 eval.c         	rb_eval(self, node->nd_head);
nd_head          2038 eval.c         	body = body->nd_head;
nd_head          2106 eval.c              (void*)tmp__protect_tmp->nd_head)
nd_head          2125 eval.c         		argv[i] = rb_eval(self,n->nd_head);\
nd_head          2177 eval.c         		if (!is_defined(self, node->nd_head, buf, 0))
nd_head          2655 eval.c             if (cpath->nd_head) {
nd_head          2656 eval.c         	VALUE c = rb_eval(self, cpath->nd_head);
nd_head          2732 eval.c         	node = node->nd_head;
nd_head          2833 eval.c         	    tag = node->nd_head;
nd_head          2838 eval.c         		if (tag->nd_head && nd_type(tag->nd_head) == NODE_WHEN) {
nd_head          2839 eval.c         		    VALUE v = rb_eval(self, tag->nd_head->nd_head);
nd_head          2852 eval.c         		if (RTEST(rb_eval(self, tag->nd_head))) {
nd_head          2866 eval.c         	    val = rb_eval(self, node->nd_head);
nd_head          2874 eval.c         		tag = node->nd_head;
nd_head          2879 eval.c         		    if (tag->nd_head && nd_type(tag->nd_head) == NODE_WHEN) {
nd_head          2880 eval.c         			VALUE v = rb_eval(self, tag->nd_head->nd_head);
nd_head          2893 eval.c         		    if (RTEST(rb_funcall2(rb_eval(self, tag->nd_head), eqq, 1, &val))) {
nd_head          3061 eval.c         	result = splat_value(rb_eval(self, node->nd_head));
nd_head          3065 eval.c         	result = rb_ary_to_ary(rb_eval(self, node->nd_head));
nd_head          3069 eval.c         	result = avalue_splat(rb_eval(self, node->nd_head));
nd_head          3074 eval.c         	if (node->nd_head) {
nd_head          3075 eval.c         	    result = rb_eval(self, node->nd_head);
nd_head          3093 eval.c         		result = rb_eval(self, node->nd_head);
nd_head          3120 eval.c         		    resq = resq->nd_head; /* next rescue */
nd_head          3142 eval.c         	    result = rb_eval(self, node->nd_head);
nd_head          3227 eval.c         	    VALUE args = rb_eval(self, node->nd_head);
nd_head          3234 eval.c         	    VALUE args = rb_ary_dup(rb_eval(self, node->nd_head));
nd_head          3391 eval.c         	    rval = node->nd_args->nd_head;
nd_head          3439 eval.c         	result = rb_eval(self, node->nd_head);
nd_head          3445 eval.c         	if ((node->nd_aid && !is_defined(self, node->nd_head, 0, 0)) ||
nd_head          3446 eval.c         	    !RTEST(result = rb_eval(self, node->nd_head))) {
nd_head          3552 eval.c         	    klass = rb_eval(self, node->nd_head);
nd_head          3604 eval.c         	    list = node->nd_head;
nd_head          3606 eval.c         		key = rb_eval(self, list->nd_head);
nd_head          3610 eval.c         		val = rb_eval(self, list->nd_head);
nd_head          3630 eval.c         		RARRAY(ary)->ptr[i++] = rb_eval(self, node->nd_head);
nd_head          3646 eval.c         		RARRAY(val)->ptr[i++] = rb_eval(self, node->nd_head);
nd_head          3673 eval.c         		if (list->nd_head) {
nd_head          3674 eval.c         		    switch (nd_type(list->nd_head)) {
nd_head          3676 eval.c         			str2 = list->nd_head->nd_lit;
nd_head          3679 eval.c         			str2 = rb_eval(self, list->nd_head);
nd_head          3939 eval.c         	    const char *desc = is_defined(self, node->nd_head, buf, 0);
nd_head          4719 eval.c         		    val = svalue_to_mrhs(val, var->nd_head);
nd_head          4725 eval.c         		    val = svalue_to_mrhs(val, var->nd_head);
nd_head          4731 eval.c         		    bvar = var->nd_next->nd_head;
nd_head          4733 eval.c         		var = var->nd_head;
nd_head          4972 eval.c             list = node->nd_head;
nd_head          4974 eval.c         	assign(self, list->nd_head, RARRAY(val)->ptr[i], pcall);
nd_head          4995 eval.c         	assign(self, list->nd_head, Qnil, pcall);
nd_head          5060 eval.c         	massign(self, lhs, svalue_to_mrhs(val, lhs->nd_head), pcall);
nd_head          5548 eval.c         	    assign(recv, opt->nd_head, *argv, 1);
nd_head          5714 eval.c         		    node = body->nd_head;
nd_head          8351 eval.c         	list = var->nd_head;
nd_head          9050 eval.c         	    body = body->nd_head;
nd_head           640 parse.y        				void_expr(node->nd_head);
nd_head           890 parse.y        			$1->nd_value = ($1->nd_head) ? NEW_TO_ARY($3) : NEW_ARRAY($3);
nd_head          1021 parse.y        			$1->nd_value = ($1->nd_head) ? NEW_TO_ARY($3) : NEW_ARRAY($3);
nd_head          3019 parse.y        			    $$ = $1->nd_head;
nd_head          6971 parse.y            nd = end->nd_head;
nd_head          7075 parse.y        	    tail->nd_head = NEW_STR(tail->nd_lit);
nd_head          7412 parse.y        	    node = node->nd_head;
nd_head          7537 parse.y        	void_expr(node->nd_head);
nd_head          7582 parse.y        	    body = &node->nd_end->nd_head;
nd_head          7594 parse.y        	    if (!subnodes(nd_head, nd_resq)) goto end;
nd_head          7597 parse.y        	    if (!subnodes(nd_head, nd_resq)) goto end;
nd_head          7822 parse.y        		node = node->nd_head;
nd_head          7843 parse.y        	    node = node->nd_head;
nd_head          7879 parse.y        	node2->nd_head = node1;
nd_head          7893 parse.y        	return arg_concat(node1, node2->nd_head);
nd_head          7927 parse.y        	if (!tmp->nd_head) break;
nd_head          7928 parse.y        	if (arg_dup_check(tmp->nd_head->nd_vid, m, list, tmp)) {
nd_head          7954 parse.y        	a->nd_iter = NEW_CALL(r,m,a->nd_head);
nd_head          7964 parse.y        	a->nd_iter = NEW_FCALL(m,a->nd_head);
nd_head          7974 parse.y        	a->nd_iter = NEW_SUPER(a->nd_head);


nd_iter

nd_iter          3002 eval.c         		    result = rb_eval(self, node->nd_iter);
nd_iter          3013 eval.c         		    recv = rb_eval(self, node->nd_iter);
nd_iter          8623 eval.c             arg.iter = node->nd_iter;
nd_iter          1174 parse.y        			    $3->nd_iter = $$;
nd_iter          1198 parse.y        			    $5->nd_iter = $$;
nd_iter          1222 parse.y        			    $5->nd_iter = $$;
nd_iter          2609 parse.y        			$2->nd_iter = NEW_FCALL($1, 0);
nd_iter          2611 parse.y        			fixpos($2->nd_iter, $2);
nd_iter          2622 parse.y        			$2->nd_iter = $1;
nd_iter          3286 parse.y        			$2->nd_iter = $1;
nd_iter          7954 parse.y        	a->nd_iter = NEW_CALL(r,m,a->nd_head);
nd_iter          7964 parse.y        	a->nd_iter = NEW_FCALL(m,a->nd_head);
nd_iter          7974 parse.y        	a->nd_iter = NEW_SUPER(a->nd_head);


nd_line

nd_line          1069 eval.c         			      ruby_sourceline = nd_line(ruby_current_node))
nd_line          1079 eval.c         	ruby_sourceline = nd_line(ruby_current_node);
nd_line          1393 eval.c         		    tag->nd_file, nd_line(tag));
nd_line          2536 eval.c         	ruby_sourceline = nd_line(node);
nd_line          4757 eval.c         				len, cnode->nd_file, nd_line(cnode));
nd_line          5993 eval.c         	    str = rb_sprintf("%s:%d:in `%s'", n->nd_file, nd_line(n),
nd_line          5997 eval.c         	    str = rb_sprintf("%s:%d", n->nd_file, nd_line(n));
nd_line          6129 eval.c         	    line = nd_line(data->frame.node);
nd_line          8458 eval.c         			 node->nd_file, nd_line(node));
nd_line          9241 eval.c             nd_set_line(bdata->body, nd_line(mdata->body));
nd_line          10696 eval.c         			th->node->nd_file, nd_line(th->node));
nd_line          11964 eval.c         		 node->nd_file, nd_line(node));
nd_line          5197 parse.y        	ruby_sourceline = nd_line(quote);
nd_line          5295 parse.y            ruby_sourceline = nd_line(here);
nd_line          6903 parse.y            return nd_line(node);
nd_line          6922 parse.y            nd_set_line(node, nd_line(orig));
nd_line          6929 parse.y            ruby_sourceline = nd_line(node);
nd_line          6938 parse.y            ruby_sourceline = nd_line(node);
nd_line          7522 parse.y        	ruby_sourceline = nd_line(node);
nd_line          7910 parse.y        	ruby_sourceline = nd_line(node);


nd_lit

nd_lit           2748 eval.c         	result = rb_reg_match2(node->nd_lit);
nd_lit           3655 eval.c         	result = rb_str_new3(node->nd_lit);
nd_lit           3671 eval.c         	    str = rb_str_new3(node->nd_lit);
nd_lit           3676 eval.c         			str2 = list->nd_head->nd_lit;
nd_lit           3696 eval.c         		node->nd_lit = result;
nd_lit           3715 eval.c         	result = rb_funcall(self, '`', 1, rb_str_new3(node->nd_lit));
nd_lit           3719 eval.c         	result = node->nd_lit;
nd_lit           1793 parse.y        			if (nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) &&
nd_lit           1794 parse.y        			    nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) {
nd_lit           1795 parse.y        			    $1->nd_lit = rb_range_new($1->nd_lit, $3->nd_lit, Qfalse);
nd_lit           1810 parse.y        			if (nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) &&
nd_lit           1811 parse.y        			    nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) {
nd_lit           1812 parse.y        			    $1->nd_lit = rb_range_new($1->nd_lit, $3->nd_lit, Qtrue);
nd_lit           3630 parse.y        				VALUE src = node->nd_lit;
nd_lit           3632 parse.y        				node->nd_lit = rb_reg_compile(RSTRING(src)->ptr,
nd_lit           3873 parse.y        				lit = $$->nd_lit;
nd_lit           3879 parse.y        				    $$->nd_lit = ID2SYM(rb_intern(RSTRING($$->nd_lit)->ptr));
nd_lit           5296 parse.y            dispose_string(here->nd_lit);
nd_lit           5327 parse.y            eos = RSTRING(here->nd_lit)->ptr;
nd_lit           5328 parse.y            len = RSTRING(here->nd_lit)->len - 1;
nd_lit           7058 parse.y        	    rb_str_concat(head->nd_lit, tail->nd_lit);
nd_lit           7068 parse.y        	    rb_str_concat(head->nd_lit, tail->nd_lit);
nd_lit           7069 parse.y        	    tail->nd_lit = head->nd_lit;
nd_lit           7075 parse.y        	    tail->nd_head = NEW_STR(tail->nd_lit);
nd_lit           7142 parse.y        	    if (TYPE(node1->nd_lit) == T_REGEXP) {
nd_lit           7155 parse.y        	    if (TYPE(node2->nd_lit) == T_REGEXP) {
nd_lit           7680 parse.y            if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) {
nd_lit           7755 parse.y        	if (TYPE(node->nd_lit) == T_REGEXP) {
nd_lit           7859 parse.y            switch (TYPE(node->nd_lit)) {
nd_lit           7861 parse.y        	node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit));
nd_lit           7864 parse.y        	node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0);
nd_lit           7867 parse.y        	RFLOAT(node->nd_lit)->value = -RFLOAT(node->nd_lit)->value;
nd_lit           1226 variable.c         if (!load || !(file = load->nd_lit) || rb_provided(RSTRING(file)->ptr)) {
nd_lit           1243 variable.c         file = ((NODE *)load)->nd_lit;


nd_mid

nd_mid            476 eval.c         	    *idp = ent->mid0 = body->nd_mid;
nd_mid            491 eval.c         	    *idp = body->nd_mid;
nd_mid           2036 eval.c         	def = body->nd_mid;
nd_mid           2230 eval.c         		ID id = node->nd_mid;
nd_mid           2240 eval.c         	    else if (!rb_method_boundp(val, node->nd_mid, call))
nd_mid           2320 eval.c         	    if (rb_const_defined_from(val, node->nd_mid))
nd_mid           2324 eval.c         	    if (rb_method_boundp(CLASS_OF(val), node->nd_mid, 1)) {
nd_mid           2331 eval.c         	if (rb_const_defined_from(rb_cObject, node->nd_mid)) {
nd_mid           3260 eval.c         	    rb_call(CLASS_OF(recv),recv,node->nd_mid,argc,argv,scope);
nd_mid           3278 eval.c         	    result = rb_call(CLASS_OF(recv),recv,node->nd_mid,argc,argv,CALLING_NORMAL);
nd_mid           3293 eval.c         	    result = rb_call(CLASS_OF(self),self,node->nd_mid,argc,argv,CALLING_FCALL);
nd_mid           3299 eval.c         	result = rb_call(CLASS_OF(self),self,node->nd_mid,0,0,CALLING_VCALL);
nd_mid           3394 eval.c         	    switch (node->nd_mid) {
nd_mid           3404 eval.c         		val = rb_funcall(val, node->nd_mid, 1, rb_eval(self, rval));
nd_mid           3419 eval.c         	    switch (node->nd_next->nd_mid) {
nd_mid           3429 eval.c         		val = rb_funcall(val, node->nd_next->nd_mid, 1,
nd_mid           3486 eval.c         	    rb_const_set(class_prefix(self, node->nd_else), node->nd_else->nd_mid, result);
nd_mid           3553 eval.c         	    if (rb_is_const_id(node->nd_mid)) {
nd_mid           3557 eval.c         		    result = rb_const_get_from(klass, node->nd_mid);
nd_mid           3566 eval.c         		result = rb_funcall(klass, node->nd_mid, 0, 0);
nd_mid           3572 eval.c         	result = rb_const_get_from(rb_cObject, node->nd_mid);
nd_mid           3731 eval.c         	    if (ruby_class == rb_cObject && node->nd_mid == init) {
nd_mid           3734 eval.c         	    if (node->nd_mid == __id__ || node->nd_mid == __send__) {
nd_mid           3736 eval.c         			rb_id2name(node->nd_mid));
nd_mid           3739 eval.c         	    body = search_method(ruby_class, node->nd_mid, &origin);
nd_mid           3742 eval.c         		    rb_warning("method redefined; discarding old %s", rb_id2name(node->nd_mid));
nd_mid           3746 eval.c         	    if (SCOPE_TEST(SCOPE_PRIVATE) || node->nd_mid == init) {
nd_mid           3760 eval.c         	    rb_add_method(ruby_class, node->nd_mid, defn, noex);
nd_mid           3763 eval.c         			      node->nd_mid, defn, NOEX_PUBLIC);
nd_mid           3781 eval.c         			 rb_id2name(node->nd_mid),
nd_mid           3787 eval.c         	    if (st_lookup(RCLASS(klass)->m_tbl, node->nd_mid, (st_data_t *)&body)) {
nd_mid           3792 eval.c         		    rb_warning("redefine %s", rb_id2name(node->nd_mid));
nd_mid           3796 eval.c         	    rb_add_method(klass, node->nd_mid, defn,
nd_mid           3831 eval.c         	    cname = node->nd_cpath->nd_mid;
nd_mid           3889 eval.c         	    cname = node->nd_cpath->nd_mid;
nd_mid           5041 eval.c         	    rb_const_set(class_prefix(self, lhs->nd_else), lhs->nd_else->nd_mid, val);
nd_mid           5080 eval.c         		rb_call(CLASS_OF(recv), recv, lhs->nd_mid, 1, &val, scope);
nd_mid           5090 eval.c         		rb_call(CLASS_OF(recv), recv, lhs->nd_mid,
nd_mid           7448 parse.y        	switch (node->nd_mid) {
nd_mid           7467 parse.y        	    useless = rb_id2name(node->nd_mid);


nd_nest

nd_nest          5170 parse.y            if (c == term && !quote->nd_nest) {
nd_nest          5196 parse.y            if (tokadd_string(func, term, paren, &quote->nd_nest) == -1) {


nd_next

nd_next           961 eval.c         #define POP_CREF() ruby_cref = ruby_cref->nd_next
nd_next          1766 eval.c             while (cbase && cbase->nd_next) {
nd_next          1777 eval.c         	cbase = cbase->nd_next;
nd_next          1788 eval.c             while (cbase && cbase->nd_next) {
nd_next          1801 eval.c         	cbase = cbase->nd_next;
nd_next          1811 eval.c             while (cref && cref->nd_next && (NIL_P(cref->nd_clss) || FL_TEST(cref->nd_clss, FL_SINGLETON))) {
nd_next          1812 eval.c         	cref = cref->nd_next;
nd_next          1813 eval.c         	if (!cref->nd_next) {
nd_next          1844 eval.c             while (cbase && cbase->nd_next) {
nd_next          1846 eval.c         	cbase = cbase->nd_next;
nd_next          1878 eval.c         	cbase = cbase->nd_next;
nd_next          2089 eval.c             NODE *copy = NEW_NODE(NODE_SCOPE,0,rval,node->nd_next);
nd_next          2126 eval.c         		n=n->nd_next;\
nd_next          2179 eval.c         		node = node->nd_next;
nd_next          2731 eval.c         	contnode = node->nd_next;
nd_next          2849 eval.c         		    tag = tag->nd_next;
nd_next          2856 eval.c         		tag = tag->nd_next;
nd_next          2858 eval.c         	    node = node->nd_next;
nd_next          2890 eval.c         			tag = tag->nd_next;
nd_next          2897 eval.c         		    tag = tag->nd_next;
nd_next          2899 eval.c         		node = node->nd_next;
nd_next          3372 eval.c         		result = rb_eval(self, node->nd_next);
nd_next          3392 eval.c         	    SETUP_ARGS0(node->nd_args->nd_next, node->nd_args->nd_alen - 1);
nd_next          3414 eval.c         	    ID id = node->nd_next->nd_vid;
nd_next          3419 eval.c         	    switch (node->nd_next->nd_mid) {
nd_next          3429 eval.c         		val = rb_funcall(val, node->nd_next->nd_mid, 1,
nd_next          3433 eval.c         	    rb_funcall2(recv, node->nd_next->nd_aid, 1, &val);
nd_next          3607 eval.c         		list = list->nd_next;
nd_next          3611 eval.c         		list = list->nd_next;
nd_next          3629 eval.c         	    for (i=0;node;node=node->nd_next) {
nd_next          3645 eval.c         	    for (i=0;node;node=node->nd_next) {
nd_next          3669 eval.c         	    NODE *list = node->nd_next;
nd_next          3685 eval.c         		list = list->nd_next;
nd_next          3993 eval.c         	result = rb_eval(ruby_cbase, node->nd_next);
nd_next          4730 eval.c         		if (var->nd_next) {
nd_next          4731 eval.c         		    bvar = var->nd_next->nd_head;
nd_next          4975 eval.c         	list = list->nd_next;
nd_next          4996 eval.c         	list = list->nd_next;
nd_next          5003 eval.c         	list = list->nd_next;
nd_next          5523 eval.c         	    optnode = optnode->nd_next;
nd_next          5551 eval.c         	    opt = opt->nd_next;
nd_next          5694 eval.c         	    b2 = body = body->nd_next;
nd_next          5715 eval.c         		    body = body->nd_next;
nd_next          8355 eval.c         	    list = list->nd_next;
nd_next          9048 eval.c         	body = body->nd_next;	/* skip NODE_SCOPE */
nd_next           637 parse.y        				while (node->nd_next) {
nd_next           638 parse.y        				    node = node->nd_next;
nd_next          6991 parse.y            end->nd_next = tail;
nd_next          7003 parse.y            if (list->nd_next) {
nd_next          7004 parse.y        	last = list->nd_next->nd_end;
nd_next          7011 parse.y            last->nd_next = NEW_LIST(item);
nd_next          7012 parse.y            list->nd_next->nd_end = last->nd_next;
nd_next          7022 parse.y            if (head->nd_next) {
nd_next          7023 parse.y        	last = head->nd_next->nd_end;
nd_next          7030 parse.y            last->nd_next = tail;
nd_next          7031 parse.y            if (tail->nd_next) {
nd_next          7032 parse.y        	head->nd_next->nd_end = tail->nd_next->nd_end;
nd_next          7035 parse.y        	head->nd_next->nd_end = tail;
nd_next          7409 parse.y        	    while (node->nd_next) {
nd_next          7410 parse.y        		node = node->nd_next;
nd_next          7536 parse.y        	if (!node->nd_next) return;
nd_next          7538 parse.y        	node = node->nd_next;
nd_next          7591 parse.y        	    if (!subnodes(nd_body, nd_next)) goto end;
nd_next          7821 parse.y        	    if (node->nd_next == 0) {
nd_next          7842 parse.y        	if (nd_type(node) == NODE_ARRAY && node->nd_next == 0) {
nd_next          7932 parse.y        	tmp = tmp->nd_next;


nd_noex

nd_noex            62 class.c            st_insert(tbl, mid, (st_data_t)NEW_METHOD(body->nd_body, body->nd_noex));
nd_noex           547 class.c        	else type = VISI(body->nd_noex);
nd_noex           469 eval.c         	ent->noex   = body->nd_noex;
nd_noex           470 eval.c         	if (noexp) *noexp = body->nd_noex;
nd_noex           487 eval.c         	if (noexp) *noexp = body->nd_noex;
nd_noex           601 eval.c             if (body->nd_noex != noex) {
nd_noex           603 eval.c         	    body->nd_noex = noex;
nd_noex          2048 eval.c               (st_data_t)NEW_METHOD(NEW_FBODY(body, def, origin), orig->nd_noex));
nd_noex          3797 eval.c         			  NOEX_PUBLIC|(body?body->nd_noex&NOEX_UNDEF:0));


nd_nth

nd_nth           2337 eval.c         	if (RTEST(rb_reg_nth_defined(node->nd_nth, MATCH_DATA))) {
nd_nth           2339 eval.c         	    sprintf(buf, "$%d", (int)node->nd_nth);
nd_nth           2347 eval.c         	    sprintf(buf, "$%c", (char)node->nd_nth);
nd_nth           3576 eval.c         	result = rb_reg_nth_match(node->nd_nth, MATCH_DATA);
nd_nth           3580 eval.c         	switch (node->nd_nth) {
nd_nth            749 parse.y        			sprintf(buf, "$%c", (char)$3->nd_nth);
nd_nth           5293 parse.y            lex_p = lex_pbeg + here->nd_nth;
nd_nth           7328 parse.y        	rb_compile_error("Can't set variable $%ld", node->nd_nth);
nd_nth           7331 parse.y        	rb_compile_error("Can't set variable $%c", (int)node->nd_nth);
nd_nth           1229 variable.c         return rb_require_safe(file, load->nd_nth);


nd_opt

nd_opt           5518 eval.c         	NODE *optnode = node->nd_opt;
nd_opt           5544 eval.c             if (node->nd_opt) {
nd_opt           5545 eval.c         	NODE *opt = node->nd_opt;
nd_opt           9053 eval.c         	if (body->nd_opt || body->nd_rest)


nd_orig

nd_orig           474 eval.c         	    *klassp = body->nd_orig;
nd_orig           475 eval.c         	    ent->origin = body->nd_orig;
nd_orig           490 eval.c         	    *klassp = body->nd_orig;
nd_orig          2037 eval.c         	origin = body->nd_orig;
nd_orig          5289 parse.y            line = here->nd_orig;


nd_recv

nd_recv          2218 eval.c         	if (node->nd_recv == (NODE *)1) goto check_bound;
nd_recv          2220 eval.c         	if (!is_defined(self, node->nd_recv, buf, Qtrue)) return 0;
nd_recv          2222 eval.c         	val = rb_eval(self, node->nd_recv);
nd_recv          2314 eval.c         	if (!is_defined(self, node->nd_recv, buf, Qtrue)) return 0;
nd_recv          2316 eval.c         	val = rb_eval(self, node->nd_recv);
nd_recv          2754 eval.c         	    VALUE l = rb_eval(self,node->nd_recv);
nd_recv          2763 eval.c         	    VALUE r = rb_eval(self,node->nd_recv);
nd_recv          3247 eval.c         	    if (node->nd_recv == (NODE *)1) {
nd_recv          3252 eval.c         		recv = rb_eval(self, node->nd_recv);
nd_recv          3272 eval.c         	    recv = rb_eval(self, node->nd_recv);
nd_recv          3390 eval.c         	    recv = rb_eval(self, node->nd_recv);
nd_recv          3417 eval.c         	    recv = rb_eval(self, node->nd_recv);
nd_recv          3771 eval.c         	    VALUE recv = rb_eval(self, node->nd_recv);
nd_recv          3918 eval.c         	    result = rb_eval(self, node->nd_recv);
nd_recv          5068 eval.c         	    if (lhs->nd_recv == (NODE *)1) {
nd_recv          5073 eval.c         		recv = rb_eval(self, lhs->nd_recv);


nd_resq

nd_resq          3109 eval.c         		NODE *resq = node->nd_resq;
nd_resq          7594 parse.y        	    if (!subnodes(nd_head, nd_resq)) goto end;
nd_resq          7597 parse.y        	    if (!subnodes(nd_head, nd_resq)) goto end;


nd_rest

nd_rest          5517 eval.c             if (!node->nd_rest) {
nd_rest          5557 eval.c             if (!node->nd_rest) {
nd_rest          5570 eval.c         	assign(recv, node->nd_rest, v, 1);
nd_rest          9053 eval.c         	if (body->nd_opt || body->nd_rest)


nd_rval

nd_rval          3356 eval.c         	    if (node->nd_rval) {
nd_rval          3358 eval.c         		ruby_cref = (NODE*)node->nd_rval;
nd_rval          5678 eval.c         	    if (body->nd_rval) {
nd_rval          5680 eval.c         		ruby_cref = (NODE*)body->nd_rval;


nd_set_line

nd_set_line      9241 eval.c             nd_set_line(bdata->body, nd_line(mdata->body));
nd_set_line      1151 parse.y        			nd_set_line($$, $<num>1);
nd_set_line      2501 parse.y        				nd_set_line($3, $<num>1);
nd_set_line      2504 parse.y        			nd_set_line($$, $<num>1);
nd_set_line      2760 parse.y        			nd_set_line($$, $<num>4);
nd_set_line      2826 parse.y        			nd_set_line($$, $<num>3);
nd_set_line      3274 parse.y        			nd_set_line($$, $<num>1);
nd_set_line      3412 parse.y        			nd_set_line($$, $<num>1);
nd_set_line      3438 parse.y        			nd_set_line($$, $<num>1);
nd_set_line      5151 parse.y            nd_set_line(node, ruby_sourceline);
nd_set_line      5271 parse.y            nd_set_line(lex_strterm, ruby_sourceline);
nd_set_line      6884 parse.y            nd_set_line(n, ruby_sourceline);
nd_set_line      6922 parse.y            nd_set_line(node, nd_line(orig));


nd_set_type

nd_set_type      2737 eval.c         	nd_set_type(node, NODE_NIL); /* exec just once */
nd_set_type      3695 eval.c         		nd_set_type(node, NODE_LIT);
nd_set_type       809 parse.y        			    nd_set_type($$, NODE_UNTIL);
nd_set_type       825 parse.y        			    nd_set_type($$, NODE_WHILE);
nd_set_type      2675 parse.y        			    nd_set_type($$, NODE_UNTIL);
nd_set_type      2689 parse.y        			    nd_set_type($$, NODE_WHILE);
nd_set_type      3449 parse.y        			nd_set_type($$, NODE_ITER);
nd_set_type      3602 parse.y        				nd_set_type(node, NODE_XSTR);
nd_set_type      3605 parse.y        				nd_set_type(node, NODE_DXSTR);
nd_set_type      3631 parse.y        				nd_set_type(node, NODE_LIT);
nd_set_type      3641 parse.y        				nd_set_type(node, NODE_DREGX_ONCE);
nd_set_type      3644 parse.y        				nd_set_type(node, NODE_DREGX);
nd_set_type      3870 parse.y        				nd_set_type($$, NODE_DSYM);
nd_set_type      3880 parse.y        				    nd_set_type($$, NODE_LIT);
nd_set_type      6883 parse.y            nd_set_type(n, type);
nd_set_type      7074 parse.y        	    nd_set_type(tail, NODE_ARRAY);
nd_set_type      7082 parse.y        	    nd_set_type(head, NODE_DSTR);
nd_set_type      7738 parse.y        	if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2);
nd_set_type      7739 parse.y        	else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3);
nd_set_type      7757 parse.y        	    nd_set_type(node, NODE_MATCH);
nd_set_type      7825 parse.y        		nd_set_type(node, NODE_VALUES);


nd_state

nd_state         2909 eval.c         	    if (node->nd_state && !RTEST(rb_eval(self, node->nd_cond)))
nd_state         2944 eval.c         	    if (node->nd_state && RTEST(rb_eval(self, node->nd_cond)))
nd_state         3082 eval.c         	result = rb_yield_0(result, 0, 0, 0, node->nd_state);
nd_state         4792 eval.c         	    if (node->nd_state == YIELD_FUNC_AVALUE) {
nd_state         4801 eval.c         		if (val == Qundef && node->nd_state != YIELD_FUNC_SVALUE)
nd_state         9216 eval.c             data->body->nd_state = YIELD_FUNC_AVALUE;
nd_state         9242 eval.c             bdata->body->nd_state = YIELD_FUNC_SVALUE;


nd_stts

nd_stts          3041 eval.c         	break_jump(rb_eval(self, node->nd_stts));
nd_stts          3046 eval.c         	return_value(rb_eval(self, node->nd_stts));
nd_stts          3222 eval.c         	return_jump(rb_eval(self, node->nd_stts));
nd_stts          7576 parse.y        	    *body = node = node->nd_stts;


nd_super

nd_super         3836 eval.c         	    if (node->nd_super) {
nd_super         3837 eval.c         	       super = rb_eval(self, node->nd_super);


nd_tbl

nd_tbl           2091 eval.c             if (node->nd_tbl) {
nd_tbl           2092 eval.c         	copy->nd_tbl = ALLOC_N(ID, node->nd_tbl[0]+1);
nd_tbl           2093 eval.c         	MEMCPY(copy->nd_tbl, node->nd_tbl, ID, node->nd_tbl[0]+1);
nd_tbl           2096 eval.c         	copy->nd_tbl = 0;
nd_tbl           3360 eval.c         	    if (node->nd_tbl) {
nd_tbl           3361 eval.c         		VALUE *vars = ALLOCA_N(VALUE, node->nd_tbl[0]+1);
nd_tbl           3364 eval.c         		rb_mem_clear(ruby_scope->local_vars, node->nd_tbl[0]);
nd_tbl           3365 eval.c         		ruby_scope->local_tbl = node->nd_tbl;
nd_tbl           3976 eval.c             if (node->nd_tbl) {
nd_tbl           3977 eval.c         	VALUE *vars = TMP_ALLOC(node->nd_tbl[0]+1);
nd_tbl           3980 eval.c         	rb_mem_clear(ruby_scope->local_vars, node->nd_tbl[0]);
nd_tbl           3981 eval.c         	ruby_scope->local_tbl = node->nd_tbl;
nd_tbl           5683 eval.c         	    if (body->nd_tbl) {
nd_tbl           5684 eval.c         		local_vars = TMP_ALLOC(body->nd_tbl[0]+1);
nd_tbl           5686 eval.c         		rb_mem_clear(local_vars, body->nd_tbl[0]);
nd_tbl           5687 eval.c         		ruby_scope->local_tbl = body->nd_tbl;


nd_tval

nd_tval          4813 eval.c         		result = (*node->nd_cfnc)(val, node->nd_tval, self);
nd_tval          4817 eval.c         		result = (*node->nd_cfnc)(val, node->nd_tval, self);
nd_tval          8336 eval.c         	    return method_arity(data->body->nd_tval);


nd_type

nd_type           391 eval.c         	node && nd_type(node) != NODE_ZSUPER &&
nd_type           395 eval.c             else if (FL_TEST(klass, FL_SINGLETON) && node && nd_type(node) == NODE_CFUNC &&
nd_type           472 eval.c         	if (nd_type(body) == NODE_FBODY) {
nd_type           489 eval.c         	if (nd_type(body) == NODE_FBODY) {
nd_type          1332 eval.c             if (nd_type(node) == NODE_PRELUDE) {
nd_type          2035 eval.c             if (nd_type(body) == NODE_FBODY) { /* was alias */
nd_type          2118 eval.c             else if (nd_type(n) == NODE_ARRAY) {\
nd_type          2173 eval.c             if (nd_type(node) == NODE_ARRAY) {
nd_type          2197 eval.c             switch (nd_type(node)) {
nd_type          2204 eval.c         	    if (nd_type(node) == NODE_SUPER) {
nd_type          2225 eval.c         	    int call = nd_type(node)==NODE_CALL;
nd_type          2243 eval.c         			       nd_type(node) == NODE_ATTRASGN ?
nd_type          2667 eval.c             else if (nd_type(cpath) == NODE_COLON2) {
nd_type          2699 eval.c                 rb_bug("unknown node type %d (%p)", nd_type(node), node);
nd_type          2725 eval.c             switch (nd_type(node)) {
nd_type          2832 eval.c         	    if (nd_type(node) != NODE_WHEN) goto again;
nd_type          2838 eval.c         		if (tag->nd_head && nd_type(tag->nd_head) == NODE_WHEN) {
nd_type          2871 eval.c         		if (nd_type(node) != NODE_WHEN) {
nd_type          2879 eval.c         		    if (tag->nd_head && nd_type(tag->nd_head) == NODE_WHEN) {
nd_type          3001 eval.c         		if (nd_type(node) == NODE_ITER) {
nd_type          3004 eval.c         		else if (nd_type(node) == NODE_LAMBDA) {
nd_type          3178 eval.c         	    result = rb_range_new(beg, end, nd_type(node) == NODE_DOT3);
nd_type          3318 eval.c         	    if (nd_type(node) == NODE_ZSUPER) {
nd_type          3674 eval.c         		    switch (nd_type(list->nd_head)) {
nd_type          3687 eval.c         	    switch (nd_type(node)) {
nd_type          4712 eval.c         	    else if (!bvar && nd_type(var) == NODE_BLOCK_PASS) {
nd_type          4717 eval.c         	    else if (nd_type(var) == NODE_MASGN) {
nd_type          4723 eval.c         	    else if (nd_type(var) == NODE_ARGS) {
nd_type          4729 eval.c         	    else if (nd_type(var) == NODE_BLOCK) {
nd_type          4776 eval.c         	     (!node || nd_type(node) != NODE_IFUNC ||
nd_type          4791 eval.c         	if (nd_type(node) == NODE_CFUNC || nd_type(node) == NODE_IFUNC) {
nd_type          5016 eval.c             switch (nd_type(lhs)) {
nd_type          5509 eval.c             if (nd_type(node) != NODE_ARGS) {
nd_type          5618 eval.c             switch (nd_type(body)) {
nd_type          5709 eval.c         		if (nd_type(body) == NODE_ARGS) {
nd_type          5713 eval.c         		else if (nd_type(body) == NODE_BLOCK) {
nd_type          7212 eval.c         	    if (nd_type(body->nd_body) != NODE_ZSUPER) {
nd_type          8334 eval.c         	if (data->body && nd_type(data->body) == NODE_IFUNC &&
nd_type          8342 eval.c             if (nd_type(var) == NODE_BLOCK_ARG) {
nd_type          8347 eval.c             switch (nd_type(var)) {
nd_type          8652 eval.c             if (nd_type(body) == NODE_ZSUPER) {
nd_type          9035 eval.c             switch (nd_type(body)) {
nd_type          9049 eval.c         	if (nd_type(body) == NODE_BLOCK)
nd_type          9057 eval.c         	rb_raise(rb_eArgError, "invalid node 0x%x", nd_type(body));
nd_type          9235 eval.c             if (nd_type(mdata->body) == NODE_BMETHOD) {
nd_type           742 gc.c           	switch (nd_type(obj)) {
nd_type          1184 gc.c           	switch (nd_type(obj)) {
nd_type           634 parse.y        			    if (nd_type($2) != NODE_BLOCK) void_expr($2);
nd_type           802 parse.y        			if ($1 && nd_type($1) == NODE_BEGIN) {
nd_type           818 parse.y        			if ($1 && nd_type($1) == NODE_BEGIN) {
nd_type           932 parse.y        			if ($3 && nd_type($3) != NODE_ARRAY)
nd_type          1687 parse.y        			if ($3 && nd_type($3) != NODE_ARRAY)
nd_type          1793 parse.y        			if (nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) &&
nd_type          1794 parse.y        			    nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) {
nd_type          1810 parse.y        			if (nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) &&
nd_type          1811 parse.y        			    nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) {
nd_type          1891 parse.y        			if ($2 && nd_type($2) == NODE_LIT) {
nd_type          2499 parse.y        			    if (nd_type($3) == NODE_RESCUE ||
nd_type          2500 parse.y        				nd_type($3) == NODE_ENSURE)
nd_type          3381 parse.y        			if ($1 && nd_type($1) == NODE_SELF)
nd_type          3600 parse.y        			    switch (nd_type(node)) {
nd_type          3627 parse.y        			else switch (nd_type(node)) {
nd_type          3868 parse.y        			    switch (nd_type($$)) {
nd_type          4249 parse.y        			if (nd_type($1) == NODE_SELF) {
nd_type          4267 parse.y        			    switch (nd_type($3)) {
nd_type          5607 parse.y        	if (nd_type(lex_strterm) == NODE_HEREDOC) {
nd_type          6897 parse.y            return (enum node_type)nd_type(node);
nd_type          6951 parse.y            switch (nd_type(h)) {
nd_type          6972 parse.y            switch (nd_type(nd)) {
nd_type          6987 parse.y            if (nd_type(tail) != NODE_BLOCK) {
nd_type          7050 parse.y            htype = nd_type(head);
nd_type          7055 parse.y            switch (nd_type(tail)) {
nd_type          7094 parse.y            if (nd_type(node) == NODE_EVSTR) {
nd_type          7106 parse.y        	switch (nd_type(node)) {
nd_type          7136 parse.y        	switch (nd_type(node1)) {
nd_type          7149 parse.y        	switch (nd_type(node2)) {
nd_type          7290 parse.y            if (recv && nd_type(recv) == NODE_SELF)
nd_type          7300 parse.y            if (node && nd_type(node) == NODE_BLOCK_PASS) {
nd_type          7316 parse.y            if (recv && nd_type(recv) == NODE_SELF)
nd_type          7326 parse.y            switch (nd_type(node)) {
nd_type          7347 parse.y            if (nd_type(node1) == NODE_ARRAY) {
nd_type          7361 parse.y            switch (nd_type(lhs)) {
nd_type          7393 parse.y        	switch (nd_type(node)) {
nd_type          7446 parse.y            switch (nd_type(node)) {
nd_type          7533 parse.y            if (nd_type(node) != NODE_BLOCK) return;
nd_type          7547 parse.y        	if (nd_type(*n) != NODE_BEGIN) {
nd_type          7570 parse.y        	switch (nd_type(node)) {
nd_type          7611 parse.y            switch (nd_type(node)) {
nd_type          7626 parse.y            switch (nd_type(node->nd_value)) {
nd_type          7679 parse.y            type = nd_type(node);
nd_type          7691 parse.y            switch (nd_type(node)) {
nd_type          7714 parse.y            switch (nd_type(node)) {
nd_type          7738 parse.y        	if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2);
nd_type          7739 parse.y        	else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3);
nd_type          7782 parse.y            if (left && nd_type(left) == type) {
nd_type          7784 parse.y        	while ((second = node->nd_2nd) != 0 && nd_type(second) == type) {
nd_type          7799 parse.y            switch (nd_type(c)) {
nd_type          7810 parse.y            if (node && nd_type(node) == NODE_BLOCK_PASS) {
nd_type          7820 parse.y        	if (nd_type(node) == NODE_ARRAY) {
nd_type          7828 parse.y        	else if (nd_type(node) == NODE_SPLAT) {
nd_type          7842 parse.y        	if (nd_type(node) == NODE_ARRAY && node->nd_next == 0) {
nd_type          7846 parse.y        	else if (node && nd_type(node) == NODE_SPLAT) {
nd_type          7888 parse.y            switch (nd_type(node2)) {
nd_type          7900 parse.y        	rb_bug("unknown nodetype(%d) for arg_prepend", nd_type(node2));
nd_type          7953 parse.y            if (a && nd_type(a) == NODE_BLOCK_PASS) {
nd_type          7963 parse.y            if (a && nd_type(a) == NODE_BLOCK_PASS) {
nd_type          7973 parse.y            if (a && nd_type(a) == NODE_BLOCK_PASS) {
nd_type          8207 parse.y            if (node && (nd_type(node) == NODE_PRELUDE)) {
nd_type          8226 parse.y            if (node && (nd_type(node) == NODE_PRELUDE)) {


nd_value

nd_value         2755 eval.c         	    VALUE r = rb_eval(self,node->nd_value);
nd_value         2764 eval.c         	    VALUE l = rb_eval(self,node->nd_value);
nd_value         3422 eval.c         		val = rb_eval(self, node->nd_value);
nd_value         3426 eval.c         		val = rb_eval(self, node->nd_value);
nd_value         3430 eval.c         				 rb_eval(self, node->nd_value));
nd_value         3441 eval.c         	node = node->nd_value;
nd_value         3447 eval.c         	    node = node->nd_value;
nd_value         3453 eval.c         	result = massign(self, node, rb_eval(self, node->nd_value), 0);
nd_value         3459 eval.c         	result = rb_eval(self, node->nd_value);
nd_value         3464 eval.c         	result = rb_eval(self, node->nd_value);
nd_value         3469 eval.c         	result = rb_eval(self, node->nd_value);
nd_value         3474 eval.c         	result = rb_eval(self, node->nd_value);
nd_value         3479 eval.c         	result = rb_eval(self, node->nd_value);
nd_value         3484 eval.c         	result = rb_eval(self, node->nd_value);
nd_value         3500 eval.c         	result = rb_eval(self, node->nd_value);
nd_value         3505 eval.c         	result = rb_eval(self, node->nd_value);
nd_value          890 parse.y        			$1->nd_value = ($1->nd_head) ? NEW_TO_ARY($3) : NEW_ARRAY($3);
nd_value          903 parse.y        				$1->nd_value = $3;
nd_value          910 parse.y        				$1->nd_value = $3;
nd_value          915 parse.y        				$$->nd_value = call_op(gettable(vid),$2,1,$3);
nd_value         1021 parse.y        			$1->nd_value = ($1->nd_head) ? NEW_TO_ARY($3) : NEW_ARRAY($3);
nd_value         1030 parse.y        			$1->nd_value = $3;
nd_value         1658 parse.y        				$1->nd_value = $3;
nd_value         1665 parse.y        				$1->nd_value = $3;
nd_value         1670 parse.y        				$$->nd_value = call_op(gettable(vid),$2,1,$3);
nd_value         7371 parse.y        	lhs->nd_value = rhs;
nd_value         7626 parse.y            switch (nd_type(node->nd_value)) {
nd_value         7633 parse.y        	parser_warn(node->nd_value, "found = in conditional, should be ==");


nd_var

nd_var           2980 eval.c         	PUSH_BLOCK(node->nd_var, node->nd_body);
nd_var           2995 eval.c         	    PUSH_BLOCK(node->nd_var, node->nd_body);


nd_vid

nd_vid           2296 eval.c         	if (rb_ivar_defined(self, node->nd_vid)) {
nd_vid           2302 eval.c         	if (ev_const_defined(ruby_cref, node->nd_vid, self)) {
nd_vid           2308 eval.c         	if (rb_cvar_defined(cvar_cbase(), node->nd_vid)) {
nd_vid           3414 eval.c         	    ID id = node->nd_next->nd_vid;
nd_vid           3465 eval.c         	dvar_asgn(node->nd_vid, result);
nd_vid           3470 eval.c         	dvar_asgn_curr(node->nd_vid, result);
nd_vid           3480 eval.c         	rb_ivar_set(self, node->nd_vid, result);
nd_vid           3485 eval.c         	if (node->nd_vid == 0) {
nd_vid           3492 eval.c         	    rb_const_set(ruby_cbase, node->nd_vid, result);
nd_vid           3501 eval.c         	rb_cvar_set(cvar_cbase(), node->nd_vid, result, Qtrue);
nd_vid           3506 eval.c         	rb_cvar_set(cvar_cbase(), node->nd_vid, result, Qfalse);
nd_vid           3517 eval.c         	result = rb_dvar_ref(node->nd_vid);
nd_vid           3525 eval.c         	result = rb_ivar_get(self, node->nd_vid);
nd_vid           3529 eval.c         	result = ev_const_get(ruby_cref, node->nd_vid, self);
nd_vid           3533 eval.c         	result = rb_cvar_get(cvar_cbase(), node->nd_vid);
nd_vid           5022 eval.c         	rb_ivar_set(self, lhs->nd_vid, val);
nd_vid           5032 eval.c         	dvar_asgn(lhs->nd_vid, val);
nd_vid           5036 eval.c         	dvar_asgn_curr(lhs->nd_vid, val);
nd_vid           5040 eval.c         	if (lhs->nd_vid == 0) {
nd_vid           5044 eval.c         	    rb_const_set(ruby_cbase, lhs->nd_vid, val);
nd_vid           5052 eval.c         	rb_cvar_set(cvar_cbase(), lhs->nd_vid, val, Qtrue);
nd_vid           5056 eval.c         	rb_cvar_set(cvar_cbase(), lhs->nd_vid, val, Qfalse);
nd_vid           5653 eval.c         	result = rb_attr_get(recv, body->nd_vid);
nd_vid           5659 eval.c         	result = rb_ivar_set(recv, body->nd_vid, argv[0]);
nd_vid            901 parse.y        			    ID vid = $1->nd_vid;
nd_vid           1656 parse.y        			    ID vid = $1->nd_vid;
nd_vid           7928 parse.y        	if (arg_dup_check(tmp->nd_head->nd_vid, m, list, tmp)) {
nd_vid           7935 parse.y        	if (arg_dup_check(r->nd_vid, m, list, r)) {
nd_vid           7941 parse.y        	if (arg_dup_check(b->nd_vid, m, list, b)) {


negate_lit

negate_lit        278 parse.y        static NODE *negate_lit(NODE*);
negate_lit       3901 parse.y        			$$ = negate_lit($2);
negate_lit       3909 parse.y        			$$ = negate_lit($2);


new_args

new_args         4000 parse.y        			$$ = new_args($1, $3, $5, $6);
new_args         4008 parse.y        			$$ = new_args($1, $3, 0, $4);
new_args         4016 parse.y        			$$ = new_args($1, 0, $3, $4);
new_args         4024 parse.y        			$$ = new_args($1, 0, 0, $2);
new_args         4032 parse.y        			$$ = new_args(0, $1, $3, $4);
new_args         4040 parse.y        			$$ = new_args(0, $1, 0, $2);
new_args         4048 parse.y        			$$ = new_args(0, 0, $1, $2);
new_args         4056 parse.y        			$$ = new_args(0, 0, 0, $1);
new_args         4064 parse.y        			$$ = new_args(0, 0, 0, 0);


new_args_gen

new_args_gen      273 parse.y        static NODE *new_args_gen(struct parser_params*,VALUE,NODE*,NODE*,NODE*);
new_args_gen      274 parse.y        #define new_args(f,o,r,b) new_args_gen(parser, f,o,r,b)


new_bv_gen

new_bv_gen        291 parse.y        static NODE *new_bv_gen(struct parser_params*,ID,NODE*);
new_bv_gen        292 parse.y        #define new_bv(id,node) new_bv_gen(parser, id, node)


new_call

new_call          281 parse.y        static NODE *new_call(NODE*,ID,NODE*);
new_call         1118 parse.y        			$$ = new_call($1, $3, $4);
new_call         1127 parse.y        			$$ = new_call($1, $3, $4);
new_call         1186 parse.y        			$$ = new_call($1, $3, $4);
new_call         1195 parse.y        			$$ = new_call($1, $3, $4);
new_call         1210 parse.y        			$$ = new_call($1, $3, $4);
new_call         1219 parse.y        			$$ = new_call($1, $3, $4);
new_call         3296 parse.y        			$$ = new_call($1, $3, $4);
new_call         3305 parse.y        			$$ = new_call($1, $3, $4);
new_call         3325 parse.y        			$$ = new_call($1, $3, $4);
new_call         3335 parse.y        			$$ = new_call($1, $3, $4);
new_call         3345 parse.y        			$$ = new_call($1, $3, 0);
new_call         3370 parse.y        			$$ = new_call($2, rb_intern("call"), $4);


new_dvar

new_dvar          809 eval.c             ruby_dyna_vars = new_dvar(id, value, ruby_dyna_vars);
new_dvar          831 eval.c         	ruby_dyna_vars = new_dvar(id, value, 0);
new_dvar          834 eval.c         	vars = new_dvar(id, value, ruby_dyna_vars->next);
new_dvar         4682 eval.c         	ruby_dyna_vars = new_dvar(0, 0, block->dyna_vars);


new_evstr

new_evstr         267 parse.y        static NODE *new_evstr(NODE*);
new_evstr        3806 parse.y        			$$ = new_evstr($3);


new_fcall

new_fcall        1162 parse.y        			$$ = new_fcall($1, $2);
new_fcall        1171 parse.y        			$$ = new_fcall($1, $2);
new_fcall        3316 parse.y        			$$ = new_fcall($1, $2);


new_fcall_gen

new_fcall_gen     282 parse.y        static NODE *new_fcall_gen(struct parser_params*,ID,NODE*);
new_fcall_gen     283 parse.y        #define new_fcall(id,args) new_fcall_gen(parser, id, args)


new_size

new_size          154 st.c               size = new_size(size);	/* round up to prime number */
new_size          306 st.c               new_num_bins = new_size(old_num_bins+1);


new_super

new_super         284 parse.y        static NODE *new_super(NODE*);
new_super        1234 parse.y        			$$ = new_super($2);
new_super        3353 parse.y        			$$ = new_super($2);


new_yield

new_yield         285 parse.y        static NODE *new_yield(NODE*);
new_yield        1243 parse.y        			$$ = new_yield($2);
new_yield        2575 parse.y        			$$ = new_yield($3);


newline_len

newline_len        43 ext/syck/token.c #define NEWLINE(ptr)    YYLINEPTR = ptr + newline_len(ptr); if ( YYLINEPTR > YYLINECTPTR ) { YYLINE++; YYLINECTPTR = YYLINEPTR; }
newline_len       242 ext/syck/token.c int newline_len( char *ptr );
newline_len      1548 ext/syck/token.c                             int nl_len = newline_len( YYTOKEN++ );
newline_len      1785 ext/syck/token.c                             int nl_len = newline_len( YYTOKEN++ );
newline_len      1942 ext/syck/token.c                                 int nl_len = newline_len( YYTOKEN++ );
newline_len      2437 ext/syck/token.c                             int nl_len = newline_len( pacer++ );
newline_len      2695 ext/syck/token.c     return newline_len( ptr );


newline_node

newline_node      249 parse.y        static NODE *newline_node(NODE*);
newline_node      709 parse.y        			$$ = newline_node(remove_begin($1));
newline_node      717 parse.y        			$$ = block_append($1, newline_node(remove_begin($3)));
newline_node     2133 parse.y        			$$ = newline_node(NEW_SPLAT($2));


newtok

newtok           4994 parse.y            newtok();
newtok           5183 parse.y            newtok();
newtok           5225 parse.y        	newtok();
newtok           5248 parse.y        	newtok();
newtok           5371 parse.y        	newtok();
newtok           6091 parse.y        	    newtok();
newtok           6572 parse.y        	newtok();
newtok           6669 parse.y        	newtok();
newtok           6702 parse.y        	newtok();
newtok           6712 parse.y        	newtok();


next_argv

next_argv        4065 io.c                if (!next_argv()) return Qnil;\
next_argv        4202 io.c               if (!next_argv()) return Qnil;
next_argv        4264 io.c               if (!next_argv()) return Qnil;
next_argv        4285 io.c               if (!next_argv()) return Qnil;
next_argv        4314 io.c               if (!next_argv()) rb_eof_error();
next_argv        5042 io.c               if (!next_argv()) {
next_argv        5052 io.c               if (!next_argv()) {
next_argv        5062 io.c               if (!next_argv()) {
next_argv        5072 io.c               if (!next_argv()) {
next_argv        5082 io.c               if (!next_argv()) {
next_argv        5092 io.c               next_argv();
next_argv        5127 io.c               if (!next_argv()) {
next_argv        5172 io.c               if (!next_argv()) {
next_argv        5205 io.c               if (!next_argv()) return Qnil;
next_argv        5240 io.c               if (!next_argv()) return Qnil;
next_argv        5243 io.c           	    if (!next_argv()) return argf;
next_argv        5269 io.c               next_argv();
next_argv        5276 io.c               next_argv();
next_argv        5284 io.c               next_argv();
next_argv        5303 io.c               next_argv();
next_argv        5315 io.c               next_argv();


next_state_val

next_state_val   4032 regparse.c           r = next_state_val(cc, &vs, v, &val_israw, in_israw, in_type, &val_type,
next_state_val   4148 regparse.c     	  r = next_state_val(cc, &vs, 0, &val_israw, 0, val_type,
next_state_val   4188 regparse.c         r = next_state_val(cc, &vs, 0, &val_israw, 0, val_type,


nextc

nextc            4808 parse.y            switch (c = nextc()) {
nextc            4864 parse.y        	if ((c = nextc()) != '-') {
nextc            4869 parse.y        	if ((c = nextc()) == '\\') {
nextc            4878 parse.y        	if ((c = nextc()) != '-') {
nextc            4884 parse.y        	if ((c = nextc())== '\\') {
nextc            4907 parse.y            switch (c = nextc()) {
nextc            4919 parse.y        		c = nextc();
nextc            4942 parse.y        		tokadd(nextc());
nextc            4947 parse.y        	if ((c = nextc()) != '-') {
nextc            4956 parse.y        	if ((c = nextc()) != '-') {
nextc            4967 parse.y        	if ((c = nextc()) == '\\') {
nextc            4995 parse.y            while (c = nextc(), ISALPHA(c)) {
nextc            5067 parse.y            while ((c = nextc()) != -1) {
nextc            5087 parse.y        	    c = nextc();
nextc            5124 parse.y        		c = nextc();
nextc            5165 parse.y            c = nextc();
nextc            5167 parse.y        	do {c = nextc();} while (ISSPACE(c));
nextc            5185 parse.y        	switch (c = nextc()) {
nextc            5210 parse.y            int c = nextc(), term, func = 0, len;
nextc            5214 parse.y        	c = nextc();
nextc            5228 parse.y        	while ((c = nextc()) != -1 && c != term) {
nextc            5231 parse.y        	    do {tokadd(c);} while (--len > 0 && (c = nextc()) != -1);
nextc            5254 parse.y        	    do {tokadd(c);} while (--len > 0 && (c = nextc()) != -1);
nextc            5255 parse.y        	} while ((c = nextc()) != -1 &&
nextc            5331 parse.y            if ((c = nextc()) == -1) {
nextc            5364 parse.y        	    if (nextc() == -1) {
nextc            5373 parse.y        	    switch (c = nextc()) {
nextc            5390 parse.y        	    tokadd(nextc());
nextc            5391 parse.y        	    if ((c = nextc()) == -1) goto error;
nextc            5570 parse.y            int c = nextc();
nextc            5628 parse.y            while ((c = nextc())) {
nextc            5642 parse.y            switch (c = nextc()) {
nextc            5688 parse.y        	if ((c = nextc()) == '*') {
nextc            5689 parse.y        	    if ((c = nextc()) == '=') {
nextc            5725 parse.y        	if ((c = nextc()) == '=') {
nextc            5752 parse.y        		    c = nextc();
nextc            5777 parse.y        	if ((c = nextc()) == '=') {
nextc            5778 parse.y        	    if ((c = nextc()) == '=') {
nextc            5794 parse.y        	c = nextc();
nextc            5812 parse.y        	    if ((c = nextc()) == '>') {
nextc            5819 parse.y        	    if ((c = nextc()) == '=') {
nextc            5837 parse.y        	if ((c = nextc()) == '=') {
nextc            5841 parse.y        	    if ((c = nextc()) == '=') {
nextc            5882 parse.y        	c = nextc();
nextc            5936 parse.y        	if ((c = nextc()) == '&') {
nextc            5938 parse.y        	    if ((c = nextc()) == '=') {
nextc            5971 parse.y        	if ((c = nextc()) == '|') {
nextc            5973 parse.y        	    if ((c = nextc()) == '=') {
nextc            5996 parse.y        	c = nextc();
nextc            6026 parse.y        	c = nextc();
nextc            6069 parse.y        	if ((c = nextc()) == '.') {
nextc            6070 parse.y        	    if ((c = nextc()) == '.') {
nextc            6094 parse.y        		c = nextc();
nextc            6098 parse.y        		c = nextc();
nextc            6101 parse.y        		    c = nextc();
nextc            6112 parse.y        			} while ((c = nextc()) != -1);
nextc            6125 parse.y        		    c = nextc();
nextc            6136 parse.y        			} while ((c = nextc()) != -1);
nextc            6149 parse.y        		    c = nextc();
nextc            6160 parse.y        			} while ((c = nextc()) != -1);
nextc            6177 parse.y        		    c = nextc();
nextc            6194 parse.y        		    } while ((c = nextc()) != -1);
nextc            6234 parse.y        			int c0 = nextc();
nextc            6262 parse.y        		    c = nextc();
nextc            6276 parse.y        		c = nextc();
nextc            6311 parse.y        	c = nextc();
nextc            6346 parse.y        	if ((c = nextc()) == '=') {
nextc            6368 parse.y        	if ((c = nextc()) == '=') {
nextc            6397 parse.y        	    if ((c = nextc()) != '@') {
nextc            6432 parse.y        	    if ((c = nextc()) == ']') {
nextc            6433 parse.y        		if ((c = nextc()) == '=') {
nextc            6472 parse.y        	c = nextc();
nextc            6488 parse.y        	    c = nextc();
nextc            6495 parse.y        		term = nextc();
nextc            6524 parse.y        		do {c = nextc();} while (ISSPACE(c));
nextc            6530 parse.y        		do {c = nextc();} while (ISSPACE(c));
nextc            6552 parse.y        	if ((c = nextc()) == '=') {
nextc            6573 parse.y        	c = nextc();
nextc            6576 parse.y        	    c = nextc();
nextc            6613 parse.y        	    c = nextc();
nextc            6648 parse.y        		c = nextc();
nextc            6668 parse.y        	c = nextc();
nextc            6673 parse.y        	    c = nextc();
nextc            6723 parse.y        		c = nextc();
nextc            6727 parse.y        	c = nextc();
nextc            6761 parse.y        		    if ((c = nextc()) == '=' && !peek('~') && !peek('>') &&
nextc            6818 parse.y        		    nextc();


nextdirsep

nextdirsep       2326 file.c         	if (*(path = nextdirsep(path)) && path[1] && !isdirsep(path[1]))
nextdirsep       2327 file.c         	    path = nextdirsep(path + 1);
nextdirsep       2436 file.c         	    s = nextdirsep(b = s);


nfc_getc

nfc_getc          416 ext/nkf/nkf-utf8/nkf.c STATIC int nfc_getc PROTO((FILE *f));
nfc_getc         1899 ext/nkf/nkf-utf8/nkf.c         i_nfc_getc = i_getc; i_getc = nfc_getc;


nfc_ungetc

nfc_ungetc        417 ext/nkf/nkf-utf8/nkf.c STATIC int nfc_ungetc PROTO((int c,FILE *f));
nfc_ungetc       1900 ext/nkf/nkf-utf8/nkf.c         i_nfc_ungetc = i_ungetc; i_ungetc= nfc_ungetc;


nkf_isblank

nkf_isblank      3615 ext/nkf/nkf-utf8/nkf.c #define nkf_isspace(c) (nkf_isblank(c) || c == CR || c == NL)
nkf_isblank      4379 ext/nkf/nkf-utf8/nkf.c 	if (mimeout_buf_count>0 && nkf_isblank(mimeout_buf[i])){
nkf_isblank      4652 ext/nkf/nkf-utf8/nkf.c                 if (nkf_isblank(c)) {


nkf_isdigit

nkf_isdigit      3613 ext/nkf/nkf-utf8/nkf.c #define nkf_isxdigit(c)  (nkf_isdigit(c) || ('a'<=c && c<='f') || ('A'<=c && c <= 'F'))
nkf_isdigit      3617 ext/nkf/nkf-utf8/nkf.c #define nkf_isalnum(c) (nkf_isdigit(c) || nkf_isalpha(c))
nkf_isdigit      3830 ext/nkf/nkf-utf8/nkf.c     if (nkf_isdigit(x)) return x - '0';
nkf_isdigit      3931 ext/nkf/nkf-utf8/nkf.c                     if (!nkf_isdigit(buf[i])){


nkf_isspace

nkf_isspace      4600 ext/nkf/nkf-utf8/nkf.c             if (nkf_isspace(c)) {
nkf_isspace      4619 ext/nkf/nkf-utf8/nkf.c                     if (!nkf_isspace(mimeout_buf[0])){


nkf_isxdigit

nkf_isxdigit     3853 ext/nkf/nkf-utf8/nkf.c     if (!nkf_isxdigit(c2)){
nkf_isxdigit     3858 ext/nkf/nkf-utf8/nkf.c     if (!nkf_isxdigit(c3)){
nkf_isxdigit     3917 ext/nkf/nkf-utf8/nkf.c                     if (!nkf_isxdigit(buf[i])){


nkf_toupper

nkf_toupper      3661 ext/nkf/nkf-utf8/nkf.c         if ( ((r[i] = c1 = (*i_getc)(f))==EOF) || nkf_toupper(c1) != p[i] ) {
nkf_toupper      3667 ext/nkf/nkf-utf8/nkf.c                 if (k==i && nkf_toupper(c1)==p[k]) break;
nkf_toupper      3831 ext/nkf/nkf-utf8/nkf.c     return nkf_toupper(x) - 'A' + 10;


no_blockarg

no_blockarg      7819 parse.y        	no_blockarg(node);
no_blockarg      7841 parse.y        	no_blockarg(node);


no_connection

no_connection     326 ext/nkf/nkf-utf8/nkf.c STATIC  void    no_connection PROTO((int c2,int c1));
no_connection     544 ext/nkf/nkf-utf8/nkf.c STATIC void (*oconv)PROTO((int c2,int c1)) = no_connection;
no_connection     548 ext/nkf/nkf-utf8/nkf.c STATIC void (*o_zconv)PROTO((int c2,int c1)) = no_connection;
no_connection     549 ext/nkf/nkf-utf8/nkf.c STATIC void (*o_fconv)PROTO((int c2,int c1)) = no_connection;
no_connection     550 ext/nkf/nkf-utf8/nkf.c STATIC void (*o_crconv)PROTO((int c2,int c1)) = no_connection;
no_connection     551 ext/nkf/nkf-utf8/nkf.c STATIC void (*o_rot_conv)PROTO((int c2,int c1)) = no_connection;
no_connection     552 ext/nkf/nkf-utf8/nkf.c STATIC void (*o_hira_conv)PROTO((int c2,int c1)) = no_connection;
no_connection     553 ext/nkf/nkf-utf8/nkf.c STATIC void (*o_base64conv)PROTO((int c2,int c1)) = no_connection;
no_connection     554 ext/nkf/nkf-utf8/nkf.c STATIC void (*o_iso2022jp_check_conv)PROTO((int c2,int c1)) = no_connection;
no_connection    4804 ext/nkf/nkf-utf8/nkf.c     o_zconv = no_connection;
no_connection    4805 ext/nkf/nkf-utf8/nkf.c     o_fconv = no_connection;
no_connection    4806 ext/nkf/nkf-utf8/nkf.c     o_crconv = no_connection;
no_connection    4807 ext/nkf/nkf-utf8/nkf.c     o_rot_conv = no_connection;
no_connection    4808 ext/nkf/nkf-utf8/nkf.c     o_hira_conv = no_connection;
no_connection    4809 ext/nkf/nkf-utf8/nkf.c     o_base64conv = no_connection;
no_connection    4810 ext/nkf/nkf-utf8/nkf.c     o_iso2022jp_check_conv = no_connection;


no_connection2

no_connection2    327 ext/nkf/nkf-utf8/nkf.c STATIC  int     no_connection2 PROTO((int c2,int c1,int c0));
no_connection2    546 ext/nkf/nkf-utf8/nkf.c STATIC int (*iconv)PROTO((int c2,int c1,int c0)) = no_connection2;
no_connection2   4845 ext/nkf/nkf-utf8/nkf.c     no_connection2(c2,c1,0);


no_putc

no_putc           446 ext/nkf/nkf-utf8/nkf.c STATIC void no_putc PROTO((int c));
no_putc          1846 ext/nkf/nkf-utf8/nkf.c         o_putc = no_putc;


noconvert

noconvert         294 ext/nkf/nkf-utf8/nkf.c STATIC  int     noconvert PROTO((FILE *f));
noconvert         762 ext/nkf/nkf-utf8/nkf.c           noconvert(stdin);
noconvert         854 ext/nkf/nkf-utf8/nkf.c                   noconvert(fin);


node_assign

node_assign       881 parse.y        			$$ = node_assign($1, $3);
node_assign      1013 parse.y        			$$ = node_assign($1, NEW_SVALUE($3));
node_assign      1638 parse.y        			$$ = node_assign($1, $3);
node_assign      1646 parse.y        			$$ = node_assign($1, NEW_RESCUE($3, NEW_RESBODY(0,$5,0), 0));
node_assign      3496 parse.y        			    $3 = node_assign($3, NEW_ERRINFO());


node_assign_gen

node_assign_gen   299 parse.y        static NODE *node_assign_gen(struct parser_params*,NODE*,NODE*);
node_assign_gen   300 parse.y        #define node_assign(node1, node2) node_assign_gen(parser, node1, node2)


node_new

node_new         1099 regparse.c       Node* node = node_new();
node_new         1114 regparse.c       Node* node = node_new();
node_new         1158 regparse.c       Node* node = node_new();
node_new         1168 regparse.c       Node* node = node_new();
node_new         1177 regparse.c       Node* node = node_new();
node_new         1194 regparse.c       Node* node = node_new();
node_new         1205 regparse.c       Node* node = node_new();
node_new         1218 regparse.c       Node* node = node_new();
node_new         1257 regparse.c       Node* node = node_new();
node_new         1273 regparse.c       Node* node = node_new();
node_new         1292 regparse.c       Node* node = node_new();
node_new         1407 regparse.c       Node* node = node_new();


node_new_alt

node_new_alt     4590 regparse.c                 *ptail = node_new_alt(snode, NULL_NODE);
node_new_alt     4945 regparse.c               work = node_new_alt(*np, alt_root);
node_new_alt     5109 regparse.c         *top  = node_new_alt(node, NULL);
node_new_alt     5117 regparse.c           *headp = node_new_alt(node, NULL);


node_new_anychar

node_new_anychar 4957 regparse.c         *np = node_new_anychar();
node_new_anychar 4962 regparse.c         *np = node_new_anychar();


node_new_cclass

node_new_cclass  3761 regparse.c       *np = node_new_cclass();
node_new_cclass  3942 regparse.c       *np = node = node_new_cclass();
node_new_cclass  4870 regparse.c                 *np = node_new_cclass();


node_new_effect

node_new_effect  1308 regparse.c       return node_new_effect(type);
node_new_effect  1314 regparse.c       Node* node = node_new_effect(EFFECT_MEMORY);
node_new_effect  1328 regparse.c       Node* node = node_new_effect(EFFECT_OPTION);
node_new_effect  4277 regparse.c           *np = node_new_effect(EFFECT_STOP_BACKTRACK);
node_new_effect  5029 regparse.c     	en = node_new_effect(EFFECT_STOP_BACKTRACK);


node_new_effect_memory

node_new_effect_memory 4306 regparse.c     	*np = node_new_effect_memory(env->option, 1);
node_new_effect_memory 4330 regparse.c     	*np = node_new_effect_memory(env->option, 0);
node_new_effect_memory 4429 regparse.c         *np = node_new_effect_memory(env->option, 0);


node_new_empty

node_new_empty   4693 regparse.c       *np = node_new_empty();
node_new_empty   4996 regparse.c     	*np = node_new_empty();


node_new_list

node_new_list    1188 regparse.c       return node_new_list(left, right);
node_new_list    5041 regparse.c     	*targetp = node_new_list(*targetp, NULL);
node_new_list    5043 regparse.c     	tmp = NCONS(*targetp).right = node_new_list(qn, NULL);
node_new_list    5069 regparse.c         *top  = node_new_list(node, NULL);
node_new_list    5081 regparse.c     	*headp = node_new_list(node, NULL);


node_new_option

node_new_option  4393 regparse.c     	    *np = node_new_option(option);
node_new_option  4407 regparse.c     	    *np = node_new_option(option);


node_new_qualifier

node_new_qualifier 4964 regparse.c         qn = node_new_qualifier(0, REPEAT_INFINITE, 0);
node_new_qualifier 5020 regparse.c           qn = node_new_qualifier(tok->u.repeat.lower, tok->u.repeat.upper,


node_new_str

node_new_str     1425 regparse.c       return node_new_str(s, end);
node_new_str     1431 regparse.c       Node* node = node_new_str(s, end);
node_new_str     1439 regparse.c       return node_new_str(NULL, NULL);
node_new_str     1460 regparse.c           n = node_new_str(p, sn->end);
node_new_str     4727 regparse.c           *np = node_new_str(tok->backp, *src);
node_new_str     4778 regparse.c           *np = node_new_str(buf, buf + num);
node_new_str     4796 regparse.c           *np = node_new_str(qstart, qend);


node_new_str_raw

node_new_str_raw 1448 regparse.c       return node_new_str_raw(p, p + 1);
node_new_str_raw 4581 regparse.c                     snode = node_new_str_raw(buf, buf + len);
node_new_str_raw 4776 regparse.c           *np = node_new_str_raw(buf, buf + num);


noname_disable_map

noname_disable_map 1469 regcomp.c            r = noname_disable_map(&(NCONS(node).left), map, counter);
noname_disable_map 1477 regcomp.c            r = noname_disable_map(ptarget, map, counter);
noname_disable_map 1492 regcomp.c      	  r = noname_disable_map(&(en->target), map, counter);
noname_disable_map 1498 regcomp.c      	  r = noname_disable_map(plink, map, counter);
noname_disable_map 1502 regcomp.c      	r = noname_disable_map(&(en->target), map, counter);
noname_disable_map 1615 regcomp.c        r = noname_disable_map(root, map, &counter);


not_code_range_buf

not_code_range_buf 1745 regparse.c     	return not_code_range_buf(enc, bbuf2, pbuf);
not_code_range_buf 1761 regparse.c         r = not_code_range_buf(enc, bbuf2, pbuf);
not_code_range_buf 1881 regparse.c           r = not_code_range_buf(enc, cc->mbuf, &tbuf);
not_code_range_buf 1934 regparse.c     	r = not_code_range_buf(enc, pbuf, &tbuf);
not_code_range_buf 1992 regparse.c     	r = not_code_range_buf(enc, pbuf, &tbuf);


ntohd

ntohd             318 pack.c         			 y = ntohd((DOUBLE_SWAPPER)y),	\
ntohd             329 pack.c         #define NTOHD(x,y)	ntohd(x)


ntohf

ntohf             292 pack.c         			 y = ntohf((FLOAT_SWAPPER)y),	\
ntohf             303 pack.c         #define NTOHF(x,y)	ntohf(x)


ntohl

ntohl             129 ext/socket/getnameinfo.c 	unsigned long x = ntohl(*(unsigned long*)addr);
ntohl             205 ext/socket/getnameinfo.c 		v4a = ntohl(((struct sockaddr_in *)sa)->sin_addr.s_addr);
ntohl            1595 pack.c         		rb_ary_push(ary, ULONG2NUM(ntohl(tmp)));


ntohs

ntohs             185 ext/socket/getnameinfo.c 		snprintf(numserv, sizeof(numserv), "%d", ntohs(port));
ntohs            2795 ext/socket/socket.c 	port = ntohs(sp->s_port);
ntohs            3067 ext/socket/socket.c     return rb_assoc_new(INT2NUM(ntohs(sockaddr->sin_port)), host);
ntohs             182 pack.c         #ifdef ntohs
ntohs             225 pack.c         #ifndef ntohs
ntohs             250 pack.c         #ifdef ntohs
ntohs            1584 pack.c         		rb_ary_push(ary, UINT2NUM(ntohs(tmp)));


num2i32

num2i32           673 pack.c         		c = num2i32(from);
num2i32           684 pack.c         		s = num2i32(from);
num2i32           695 pack.c         		i = num2i32(from);
num2i32           706 pack.c         		l = num2i32(from);
num2i32           727 pack.c         		s = num2i32(from);
num2i32           738 pack.c         		l = num2i32(from);
num2i32           749 pack.c         		s = num2i32(from);
num2i32           760 pack.c         		l = num2i32(from);


num_div

num_div           307 numeric.c          return rb_assoc_new(num_div(x, y), rb_funcall(x, '%', 1, y));
num_div          2820 numeric.c          rb_define_method(rb_cNumeric, "div", num_div, 1);


num_equal

num_equal         815 numeric.c      	return num_equal(x, y);
num_equal        2246 numeric.c      	return num_equal(x, y);


num_floor

num_floor         246 numeric.c      static VALUE num_floor(VALUE num);
num_floor         260 numeric.c          return num_floor(rb_funcall(x, '/', 1, y));
num_floor        2832 numeric.c          rb_define_method(rb_cNumeric, "floor", num_floor, 0);


num_to_asn1integer

num_to_asn1integer  205 ext/openssl/ossl_asn1.c     return num_to_asn1integer(obj, NULL);
num_to_asn1integer   29 ext/openssl/ossl_asn1.h ASN1_INTEGER *num_to_asn1integer(VALUE, ASN1_INTEGER *);
num_to_asn1integer  300 ext/openssl/ossl_x509cert.c 	num_to_asn1integer(num, X509_get_serialNumber(x509));
num_to_asn1integer  111 ext/openssl/ossl_x509revoked.c     rev->serialNumber = num_to_asn1integer(num, rev->serialNumber);


num_to_long

num_to_long        61 ext/racc/cparse/cparse.c static inline long num_to_long _((VALUE n));
num_to_long       611 ext/racc/cparse/cparse.c         v->curstate = num_to_long(LAST_I(v->state));
num_to_long       662 ext/racc/cparse/cparse.c     v->errstatus = num_to_long(rb_ivar_get(v->parser, id_errstatus));
num_to_long       737 ext/racc/cparse/cparse.c     k2 = num_to_long(LAST_I(v->state));
num_to_long       738 ext/racc/cparse/cparse.c     k1 = num_to_long(reduce_to) - v->nt_base;


numbered_ref_check

numbered_ref_check 1580 regcomp.c            r = numbered_ref_check(NCONS(node).left);
numbered_ref_check 1584 regcomp.c          r = numbered_ref_check(NQUALIFIER(node).target);
numbered_ref_check 1587 regcomp.c          r = numbered_ref_check(NEFFECT(node).target);
numbered_ref_check 4768 regcomp.c            r = numbered_ref_check(root);


numberof

numberof          355 ext/openssl/ossl_pkcs7.c     for(i = 0; i < numberof(p7_type_tab); i++){
numberof          149 ext/openssl/ossl_ssl.c     for(i = 0; i < numberof(ossl_sslctx_attrs); i++){
numberof          161 ext/openssl/ossl_ssl.c     for (i = 0; i < numberof(ossl_ssl_method_tab); i++) {
numberof          868 ext/openssl/ossl_ssl.c     for(i = 0; i < numberof(ossl_sslctx_attrs); i++)
numberof          877 ext/openssl/ossl_ssl.c     for(i = 0; i < numberof(ossl_ssl_attr_readers); i++)
numberof          879 ext/openssl/ossl_ssl.c     for(i = 0; i < numberof(ossl_ssl_attrs); i++)


numchar_getc

numchar_getc      440 ext/nkf/nkf-utf8/nkf.c STATIC int numchar_getc PROTO((FILE *f));
numchar_getc     1893 ext/nkf/nkf-utf8/nkf.c         i_ngetc = i_getc; i_getc = numchar_getc;


numchar_ungetc

numchar_ungetc    441 ext/nkf/nkf-utf8/nkf.c STATIC int numchar_ungetc PROTO((int c,FILE *f));
numchar_ungetc   1894 ext/nkf/nkf-utf8/nkf.c         i_nungetc = i_ungetc; i_ungetc= numchar_ungetc;


numcmp

numcmp             40 st.c           static int numcmp(long, long);
numcmp             43 st.c               numcmp,


numhash

numhash            41 st.c           static int numhash(long);
numhash            44 st.c               numhash,


obj2long

obj2long          305 time.c             year = obj2long(v[0]);
obj2long          338 time.c         		    tm->tm_mon = obj2long(s)-1;
obj2long          343 time.c         	    tm->tm_mon = obj2long(v[1])-1;
obj2long          350 time.c         	tm->tm_mday = obj2long(v[2]);
obj2long          352 time.c             tm->tm_hour = NIL_P(v[3])?0:obj2long(v[3]);
obj2long          353 time.c             tm->tm_min  = NIL_P(v[4])?0:obj2long(v[4]);
obj2long          354 time.c             tm->tm_sec  = NIL_P(v[5])?0:obj2long(v[5]);
obj2long          358 time.c         	    *usec = obj2long(v[6]);


obj_free

obj_free          969 gc.c           static void obj_free(VALUE);
obj_free         1032 gc.c           		    obj_free((VALUE)p);


obj_to_asn1obj

obj_to_asn1obj    537 ext/openssl/ossl_asn1.c 	ptr = obj_to_asn1obj(value);
obj_to_asn1obj   1050 ext/openssl/ossl_asn1.c     a1obj = obj_to_asn1obj(val);


obj_to_enum

obj_to_enum       371 enumerator.c       rb_define_method(rb_mKernel, "to_enum", obj_to_enum, -1);
obj_to_enum       372 enumerator.c       rb_define_method(rb_mKernel, "enum_for", obj_to_enum, -1);


off_t

off_t             602 dir.c              off_t p = NUM2OFFT(pos);
off_t            2951 file.c             off_t pos;
off_t            3004 file.c             off_t pos;
off_t            3906 file.c             off_t size = get_stat(obj)->st_size;
off_t              56 io.c           #if !HAVE_OFF_T && !defined(off_t)
off_t             248 io.c               off_t r;
off_t             752 io.c               off_t pos;
off_t             764 io.c               off_t pos;
off_t             823 io.c               off_t pos;
off_t            1187 io.c               off_t siz = READ_DATA_PENDING_COUNT(fptr);
off_t            1188 io.c               off_t pos;
off_t            2238 io.c               off_t pos;
off_t            3274 io.c               off_t pos = 0;
off_t             293 ruby.h         # define NUM2OFFT(x) ((off_t)NUM2LL(x))
off_t              49 wince/sys/stat.h   off_t st_size;


offsetof

offsetof          167 ext/socket/addrinfo.h #ifndef offsetof
offsetof          123 ext/socket/getaddrinfo.c 	 offsetof(struct sockaddr_in6, sin6_addr),
offsetof          131 ext/socket/getaddrinfo.c 	 offsetof(struct sockaddr_in, sin_addr),
offsetof           97 ext/socket/getnameinfo.c 	 offsetof(struct sockaddr_in6, sin6_addr)},
offsetof          104 ext/socket/getnameinfo.c 	 offsetof(struct sockaddr_in, sin_addr)},


ole_classes_from_typelib

ole_classes_from_typelib 3590 ext/win32ole/win32ole.c         ole_classes_from_typelib(pTypeLib, classes);
ole_classes_from_typelib 4176 ext/win32ole/win32ole.c         ole_classes_from_typelib(pTypeLib, classes);


ole_const_load

ole_const_load   1788 ext/win32ole/win32ole.c             ole_const_load(pTypeLib, klass, self);
ole_const_load   1791 ext/win32ole/win32ole.c             ole_const_load(pTypeLib, cWIN32OLE, self);
ole_const_load   1806 ext/win32ole/win32ole.c             ole_const_load(pTypeLib, klass, self);
ole_const_load   1809 ext/win32ole/win32ole.c             ole_const_load(pTypeLib, cWIN32OLE, self);


ole_docinfo_from_type

ole_docinfo_from_type  208 ext/win32ole/win32ole.c static HRESULT ole_docinfo_from_type _((ITypeInfo *, BSTR *, BSTR *, DWORD *, BSTR *));
ole_docinfo_from_type 3354 ext/win32ole/win32ole.c     hr = ole_docinfo_from_type(pRefTypeInfo, &bstr, NULL, NULL, NULL);
ole_docinfo_from_type 4524 ext/win32ole/win32ole.c     hr = ole_docinfo_from_type(pTypeInfo, NULL, &bhelpstr, NULL, NULL);
ole_docinfo_from_type 4591 ext/win32ole/win32ole.c     hr = ole_docinfo_from_type(pTypeInfo, NULL, NULL, NULL, &bhelpfile);
ole_docinfo_from_type 4622 ext/win32ole/win32ole.c     hr = ole_docinfo_from_type(pTypeInfo, NULL, NULL,
ole_docinfo_from_type 5561 ext/win32ole/win32ole.c         hr = ole_docinfo_from_type(pmethod->pTypeInfo, &name, NULL, NULL, NULL);


ole_excepinfo2msg

ole_excepinfo2msg 2354 ext/win32ole/win32ole.c         v = ole_excepinfo2msg(&excepinfo);
ole_excepinfo2msg 2564 ext/win32ole/win32ole.c         v = ole_excepinfo2msg(&excepinfo);
ole_excepinfo2msg 2734 ext/win32ole/win32ole.c         v = ole_excepinfo2msg(&excepinfo);


ole_initialize

ole_initialize   1066 ext/win32ole/win32ole.c     ole_initialize();
ole_initialize   1627 ext/win32ole/win32ole.c     ole_initialize();
ole_initialize   1683 ext/win32ole/win32ole.c     ole_initialize();
ole_initialize   3697 ext/win32ole/win32ole.c     ole_initialize();
ole_initialize   6857 ext/win32ole/win32ole.c     ole_initialize();


ole_invoke

ole_invoke       2382 ext/win32ole/win32ole.c     return ole_invoke(argc, argv, self, DISPATCH_METHOD|DISPATCH_PROPERTYGET);
ole_invoke       2665 ext/win32ole/win32ole.c     return ole_invoke(argc, argv, self, DISPATCH_PROPERTYPUT);
ole_invoke       2681 ext/win32ole/win32ole.c     return ole_invoke(1, &property, self, DISPATCH_PROPERTYGET);
ole_invoke       2881 ext/win32ole/win32ole.c         return ole_invoke(argc, argv, self, DISPATCH_METHOD|DISPATCH_PROPERTYGET);


ole_invoke2

ole_invoke2      2598 ext/win32ole/win32ole.c     return ole_invoke2(self, dispid, args, types, DISPATCH_METHOD);
ole_invoke2      2620 ext/win32ole/win32ole.c     return ole_invoke2(self, dispid, args, types, DISPATCH_PROPERTYGET);
ole_invoke2      2642 ext/win32ole/win32ole.c     return ole_invoke2(self, dispid, args, types, DISPATCH_PROPERTYPUT);


ole_mb2wc

ole_mb2wc         825 ext/win32ole/win32ole.c         V_BSTR(var) = ole_mb2wc(StringValuePtr(val), -1);
ole_mb2wc         870 ext/win32ole/win32ole.c             *V_BSTRREF(var) = ole_mb2wc(StringValuePtr(val), -1);
ole_mb2wc        1360 ext/win32ole/win32ole.c     pbuf  = ole_mb2wc(StringValuePtr(ole), -1);
ole_mb2wc        1547 ext/win32ole/win32ole.c             pbuf  = ole_mb2wc(clsid, -1);
ole_mb2wc        1586 ext/win32ole/win32ole.c     pbuf  = ole_mb2wc(StringValuePtr(ole), -1);
ole_mb2wc        1598 ext/win32ole/win32ole.c     serverinfo.pwszName = ole_mb2wc(StringValuePtr(host), -1);
ole_mb2wc        1635 ext/win32ole/win32ole.c     pbuf  = ole_mb2wc(StringValuePtr(moniker), -1);
ole_mb2wc        1692 ext/win32ole/win32ole.c     pBuf  = ole_mb2wc(StringValuePtr(svr_name), -1);
ole_mb2wc        1800 ext/win32ole/win32ole.c         pBuf = ole_mb2wc(StringValuePtr(file), -1);
ole_mb2wc        2076 ext/win32ole/win32ole.c     pBuf  = ole_mb2wc(StringValuePtr(svr_name), -1);
ole_mb2wc        2128 ext/win32ole/win32ole.c     pOp->pNamedArgs[index + 1] = ole_mb2wc(StringValuePtr(key), -1);
ole_mb2wc        2197 ext/win32ole/win32ole.c     wcmdname = ole_mb2wc(StringValuePtr(cmd), -1);
ole_mb2wc        2224 ext/win32ole/win32ole.c         op.pNamedArgs[0] = ole_mb2wc(StringValuePtr(cmd), -1);
ole_mb2wc        2713 ext/win32ole/win32ole.c     pBuf[0]  = ole_mb2wc(StringValuePtr(property), -1);
ole_mb2wc        3585 ext/win32ole/win32ole.c         pbuf = ole_mb2wc(StringValuePtr(file), -1);
ole_mb2wc        4170 ext/win32ole/win32ole.c         pbuf = ole_mb2wc(StringValuePtr(path), -1);
ole_mb2wc        4219 ext/win32ole/win32ole.c     pbuf = ole_mb2wc(StringValuePtr(file), -1);


ole_method_docinfo_from_type

ole_method_docinfo_from_type 5597 ext/win32ole/win32ole.c     hr = ole_method_docinfo_from_type(pTypeInfo, method_index, NULL, &bhelpstring,
ole_method_docinfo_from_type 5631 ext/win32ole/win32ole.c     hr = ole_method_docinfo_from_type(pTypeInfo, method_index, NULL, NULL,
ole_method_docinfo_from_type 5665 ext/win32ole/win32ole.c     hr = ole_method_docinfo_from_type(pTypeInfo, method_index, NULL, NULL,


ole_method_invkind

ole_method_invkind 5358 ext/win32ole/win32ole.c     VALUE invkind = ole_method_invkind(pTypeInfo, method_index);
ole_method_invkind 5390 ext/win32ole/win32ole.c     return ole_method_invkind(pmethod->pTypeInfo, pmethod->index);


ole_method_sub

ole_method_sub   2942 ext/win32ole/win32ole.c     method = ole_method_sub(self, 0, pTypeInfo, name);
ole_method_sub   2953 ext/win32ole/win32ole.c        method = ole_method_sub(self, pTypeInfo, pRefTypeInfo, name);


ole_methods

ole_methods      3114 ext/win32ole/win32ole.c     return ole_methods( self, INVOKE_FUNC | INVOKE_PROPERTYGET | INVOKE_PROPERTYPUT);
ole_methods      3131 ext/win32ole/win32ole.c     return ole_methods( self, INVOKE_PROPERTYGET);
ole_methods      3148 ext/win32ole/win32ole.c     return ole_methods( self, INVOKE_PROPERTYPUT);
ole_methods      3166 ext/win32ole/win32ole.c     return ole_methods( self, INVOKE_FUNC);


ole_methods_from_typeinfo

ole_methods_from_typeinfo 3094 ext/win32ole/win32ole.c     rb_ary_concat(methods, ole_methods_from_typeinfo(pTypeInfo, mask));
ole_methods_from_typeinfo 4815 ext/win32ole/win32ole.c     return ole_methods_from_typeinfo(ptype->pTypeInfo, INVOKE_FUNC | INVOKE_PROPERTYGET | INVOKE_PROPERTYPUT | INVOKE_PROPERTYPUTREF);


ole_methods_sub

ole_methods_sub  3020 ext/win32ole/win32ole.c     ole_methods_sub(0, pTypeInfo, methods, mask);
ole_methods_sub  3028 ext/win32ole/win32ole.c        ole_methods_sub(pTypeInfo, pRefTypeInfo, methods, mask);


ole_param_flag_mask

ole_param_flag_mask 6025 ext/win32ole/win32ole.c     return ole_param_flag_mask(pparam->pTypeInfo, pparam->method_index,
ole_param_flag_mask 6053 ext/win32ole/win32ole.c     return ole_param_flag_mask(pparam->pTypeInfo, pparam->method_index,
ole_param_flag_mask 6072 ext/win32ole/win32ole.c     return ole_param_flag_mask(pparam->pTypeInfo, pparam->method_index,
ole_param_flag_mask 6092 ext/win32ole/win32ole.c     return ole_param_flag_mask(pparam->pTypeInfo, pparam->method_index,


ole_ptrtype2val

ole_ptrtype2val  3478 ext/win32ole/win32ole.c         return ole_ptrtype2val(pTypeInfo, pTypeDesc, typedetails);
ole_ptrtype2val  3482 ext/win32ole/win32ole.c         return ole_ptrtype2val(pTypeInfo, pTypeDesc, typedetails);


ole_raise

ole_raise         620 ext/win32ole/win32ole.c             ole_raise(hr, rb_eRuntimeError, "fail: OLE initialize");
ole_raise        1029 ext/win32ole/win32ole.c         ole_raise(hr, rb_eRuntimeError, "failed to change type");
ole_raise        1594 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
ole_raise        1604 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
ole_raise        1631 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
ole_raise        1640 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
ole_raise        1651 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
ole_raise        1704 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
ole_raise        1711 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
ole_raise        1779 ext/win32ole/win32ole.c             ole_raise(hr, rb_eRuntimeError, "failed to GetTypeInfo");
ole_raise        1784 ext/win32ole/win32ole.c             ole_raise(hr, rb_eRuntimeError, "failed to GetContainingTypeLib");
ole_raise        1804 ext/win32ole/win32ole.c           ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to LoadTypeLibEx");
ole_raise        2083 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
ole_raise        2092 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
ole_raise        2202 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
ole_raise        2239 ext/win32ole/win32ole.c             ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
ole_raise        2355 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "%s%s",
ole_raise        2565 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "_invoke %s",
ole_raise        2720 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
ole_raise        2735 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, StringValuePtr(v));
ole_raise        2832 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to get IEnum Interface");
ole_raise        2845 ext/win32ole/win32ole.c         ole_raise(hr, rb_eRuntimeError, "failed to get IEnum Interface");
ole_raise        2901 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
ole_raise        2940 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
ole_raise        2976 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
ole_raise        3017 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
ole_raise        3050 ext/win32ole/win32ole.c         ole_raise(hr, rb_eRuntimeError, "failed to GetTypeInfo");
ole_raise        3060 ext/win32ole/win32ole.c         ole_raise(hr, rb_eRuntimeError, "failed to GetContainingTypeLib");
ole_raise        3217 ext/win32ole/win32ole.c         ole_raise(hr, rb_eRuntimeError, "failed to GetTypeInfo");
ole_raise        3300 ext/win32ole/win32ole.c         ole_raise(hr, rb_eRuntimeError, "failed to GetTypeInfo");
ole_raise        3546 ext/win32ole/win32ole.c         ole_raise(hr, rb_eRuntimeError, "failed to get ITypeInfo");
ole_raise        3588 ext/win32ole/win32ole.c           ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to LoadTypeLibEx");
ole_raise        4174 ext/win32ole/win32ole.c             ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to LoadTypeLibEx from `%s'",
ole_raise        4222 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to LoadTypeLibEx");
ole_raise        4430 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
ole_raise        4462 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
ole_raise        4494 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
ole_raise        4737 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
ole_raise        4861 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetVarDesc");
ole_raise        4906 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetVarDesc");
ole_raise        5236 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetFuncDesc");
ole_raise        5273 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetFuncDesc");
ole_raise        5346 ext/win32ole/win32ole.c         ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetFuncDesc");
ole_raise        6711 ext/win32ole/win32ole.c         ole_raise(hr, rb_eRuntimeError, "interface not found");
ole_raise        6721 ext/win32ole/win32ole.c         ole_raise(hr, rb_eRuntimeError,
ole_raise        6731 ext/win32ole/win32ole.c         ole_raise(hr, rb_eRuntimeError, "failed to query IConnectionPoint");
ole_raise        6739 ext/win32ole/win32ole.c         ole_raise(hr, rb_eRuntimeError, "Advise Error");


ole_set_member

ole_set_member   1080 ext/win32ole/win32ole.c     ole_set_member(obj, pDispatch);
ole_set_member   1609 ext/win32ole/win32ole.c     ole_set_member(self, (IDispatch*)multi_qi.pItf);
ole_set_member   2097 ext/win32ole/win32ole.c     ole_set_member(self, pDispatch);


ole_set_safe_array

ole_set_safe_array  738 ext/win32ole/win32ole.c         ole_set_safe_array(dim, psa, pid, pub, val, dim);
ole_set_safe_array  742 ext/win32ole/win32ole.c         ole_set_safe_array(n-1, psa, pid, pub, val, dim);
ole_set_safe_array  808 ext/win32ole/win32ole.c             ole_set_safe_array(dim-1, psa, pid, pub, val, dim-1);


ole_type_from_itypeinfo

ole_type_from_itypeinfo 3219 ext/win32ole/win32ole.c     type = ole_type_from_itypeinfo(pTypeInfo);
ole_type_from_itypeinfo 4692 ext/win32ole/win32ole.c         type = ole_type_from_itypeinfo(pRefTypeInfo);


ole_typedesc2val

ole_typedesc2val 3366 ext/win32ole/win32ole.c static VALUE ole_typedesc2val();
ole_typedesc2val 3378 ext/win32ole/win32ole.c            type = ole_typedesc2val(pTypeInfo, p, typedetails);
ole_typedesc2val 3381 ext/win32ole/win32ole.c            rb_str_concat(type, ole_typedesc2val(pTypeInfo, p, typedetails));
ole_typedesc2val 4562 ext/win32ole/win32ole.c     alias = ole_typedesc2val(pTypeInfo, &(pTypeAttr->tdescAlias), Qnil);
ole_typedesc2val 4862 ext/win32ole/win32ole.c     type = ole_typedesc2val(pTypeInfo, &(pVarDesc->elemdescVar.tdesc), Qnil);
ole_typedesc2val 4907 ext/win32ole/win32ole.c     ole_typedesc2val(pTypeInfo, &(pVarDesc->elemdescVar.tdesc), type);
ole_typedesc2val 5238 ext/win32ole/win32ole.c     type = ole_typedesc2val(pTypeInfo, &(pFuncDesc->elemdescFunc.tdesc), Qnil);
ole_typedesc2val 5312 ext/win32ole/win32ole.c     ole_typedesc2val(pTypeInfo, &(pFuncDesc->elemdescFunc.tdesc), type);
ole_typedesc2val 5927 ext/win32ole/win32ole.c     type = ole_typedesc2val(pTypeInfo,
ole_typedesc2val 5965 ext/win32ole/win32ole.c     ole_typedesc2val(pTypeInfo,


ole_typelib_from_itypeinfo

ole_typelib_from_itypeinfo 3302 ext/win32ole/win32ole.c     vtlib = ole_typelib_from_itypeinfo(pTypeInfo);
ole_typelib_from_itypeinfo 4661 ext/win32ole/win32ole.c     return ole_typelib_from_itypeinfo(ptype->pTypeInfo);


ole_val2variant

ole_val2variant   211 ext/win32ole/win32ole.c static void ole_val2variant(VALUE, VARIANT*);
ole_val2variant   317 ext/win32ole/win32ole.c     ole_val2variant(v, pVarResult);
ole_val2variant   479 ext/win32ole/win32ole.c static void ole_val2variant();
ole_val2variant   733 ext/win32ole/win32ole.c         ole_val2variant(val1, &var);
ole_val2variant  1005 ext/win32ole/win32ole.c     ole_val2variant(val, &(pvar->realvar));
ole_val2variant  1040 ext/win32ole/win32ole.c     ole_val2variant(val, var);
ole_val2variant  2132 ext/win32ole/win32ole.c     ole_val2variant(value, &(pOp->dp.rgvarg[index]));
ole_val2variant  2267 ext/win32ole/win32ole.c                 ole_val2variant(param, &realargs[n]);
ole_val2variant  2293 ext/win32ole/win32ole.c                 ole_val2variant(param, &op.dp.rgvarg[n]);
ole_val2variant  2459 ext/win32ole/win32ole.c                     ole_val2variant(elem, &velem);
ole_val2variant  2498 ext/win32ole/win32ole.c                 ole_val2variant(param, &realargs[i]);
ole_val2variant  2725 ext/win32ole/win32ole.c     ole_val2variant(value, &propertyValue[0]);
ole_val2variant  6378 ext/win32ole/win32ole.c         ole_val2variant(result, pvarResult);
ole_val2variant  6884 ext/win32ole/win32ole.c         ole_val2variant(val, &(pvar->var));


ole_var2ptr_var

ole_var2ptr_var  1008 ext/win32ole/win32ole.c             ole_var2ptr_var(&(pvar->realvar), &(pvar->var));
ole_var2ptr_var  1017 ext/win32ole/win32ole.c                 ole_var2ptr_var(&(pvar->realvar), &(pvar->var));


ole_variant2val

ole_variant2val   210 ext/win32ole/win32ole.c static VALUE ole_variant2val(VARIANT*);
ole_variant2val   307 ext/win32ole/win32ole.c         *(parg + i) = ole_variant2val(&pDispParams->rgvarg[args - i - 1]);
ole_variant2val  1132 ext/win32ole/win32ole.c                 val = ole_variant2val(&variant);
ole_variant2val  1496 ext/win32ole/win32ole.c                 val = ole_variant2val(V_UNION1(pVarDesc, lpvarValue));
ole_variant2val  2148 ext/win32ole/win32ole.c         rb_ary_push(argv, ole_variant2val(&realargs[end]));
ole_variant2val  2358 ext/win32ole/win32ole.c     obj = ole_variant2val(&result);
ole_variant2val  2574 ext/win32ole/win32ole.c     obj = ole_variant2val(&result);
ole_variant2val  2770 ext/win32ole/win32ole.c         obj = ole_variant2val(&variant);
ole_variant2val  4945 ext/win32ole/win32ole.c         val = ole_variant2val(V_UNION1(pVarDesc, lpvarValue));
ole_variant2val  6116 ext/win32ole/win32ole.c          defval = ole_variant2val(&pParamDescEx->varDefaultValue);
ole_variant2val  6363 ext/win32ole/win32ole.c         rb_ary_push(args, ole_variant2val(pvar));
ole_variant2val  6900 ext/win32ole/win32ole.c     val = ole_variant2val(&(pvar->var));


ole_wc2mb

ole_wc2mb         209 ext/win32ole/win32ole.c static char *ole_wc2mb(LPWSTR);
ole_wc2mb         284 ext/win32ole/win32ole.c     char* psz = ole_wc2mb(*rgszNames); // support only one method
ole_wc2mb         545 ext/win32ole/win32ole.c         pSource = ole_wc2mb(pExInfo->bstrSource);
ole_wc2mb         548 ext/win32ole/win32ole.c         pDescription = ole_wc2mb(pExInfo->bstrDescription);
ole_wc2mb         695 ext/win32ole/win32ole.c     char *p = ole_wc2mb(pw);
ole_wc2mb        1198 ext/win32ole/win32ole.c             p = ole_wc2mb(*V_BSTRREF(pvar));
ole_wc2mb        1200 ext/win32ole/win32ole.c             p = ole_wc2mb(V_BSTR(pvar));
ole_wc2mb        1279 ext/win32ole/win32ole.c             char *p = ole_wc2mb(V_BSTR(&variant));
ole_wc2mb        1495 ext/win32ole/win32ole.c                 pName = ole_wc2mb(bstr);
ole_wc2mb        6501 ext/win32ole/win32ole.c                 pstr = ole_wc2mb(bstr);


ole_wc2vstr

ole_wc2vstr        80 ext/win32ole/win32ole.c #define WC2VSTR(x) ole_wc2vstr((x), TRUE)
ole_wc2vstr      3263 ext/win32ole/win32ole.c         guid = ole_wc2vstr(bstr, FALSE);
ole_wc2vstr      4326 ext/win32ole/win32ole.c         guid = ole_wc2vstr(bstr, FALSE);


olemethod_from_typeinfo

olemethod_from_typeinfo  207 ext/win32ole/win32ole.c static VALUE olemethod_from_typeinfo _((VALUE, ITypeInfo *, VALUE));
olemethod_from_typeinfo 3548 ext/win32ole/win32ole.c     obj = olemethod_from_typeinfo(method, pTypeInfo, cmdname);
olemethod_from_typeinfo 5195 ext/win32ole/win32ole.c         obj = olemethod_from_typeinfo(self, ptype->pTypeInfo, method);


olemethod_set_member

olemethod_set_member  204 ext/win32ole/win32ole.c static VALUE olemethod_set_member _((VALUE, ITypeInfo *, ITypeInfo *, int, VALUE));
olemethod_set_member 2916 ext/win32ole/win32ole.c             olemethod_set_member(self, pTypeInfo, pOwnerTypeInfo, i, fname);
olemethod_set_member 2992 ext/win32ole/win32ole.c             olemethod_set_member(method, pTypeInfo, pOwnerTypeInfo,


oletype_set_member

oletype_set_member  206 ext/win32ole/win32ole.c static VALUE oletype_set_member  _((VALUE, ITypeInfo *, VALUE));
oletype_set_member 1845 ext/win32ole/win32ole.c         oletype_set_member(type, pTypeInfo, WC2VSTR(bstr));
oletype_set_member 3190 ext/win32ole/win32ole.c     oletype_set_member(type, pTypeInfo, WC2VSTR(bstr));
oletype_set_member 3744 ext/win32ole/win32ole.c             oletype_set_member(self, pTypeInfo, typelib);


oletypelib_set_member

oletypelib_set_member 3812 ext/win32ole/win32ole.c                 oletypelib_set_member(typelib, name, guid, version);
oletypelib_set_member 3905 ext/win32ole/win32ole.c         oletypelib_set_member(self, typelib, guid, version);
oletypelib_set_member 3947 ext/win32ole/win32ole.c                 oletypelib_set_member(self, typelib, guid, ver);


one

one               188 ext/openssl/ossl_ocsp.c     OCSP_ONEREQ *one;
one               197 ext/openssl/ossl_ocsp.c 	one = OCSP_request_onereq_get0(req, i);
one               198 ext/openssl/ossl_ocsp.c 	if(!(id = OCSP_CERTID_dup(OCSP_onereq_get0_id(one))))
one                46 missing/isinf.c static double inf (void) { return one() / zero(); }


onig_alloc_init

onig_alloc_init   471 re.c                       r = onig_alloc_init(&rp, ONIG_OPTION_DEFAULT,
onig_alloc_init   614 re.c               r = onig_alloc_init(&rp, flags,
onig_alloc_init  4668 regcomp.c        r = onig_alloc_init(&reg, ONIG_OPTION_NONE, ONIGENC_AMBIGUOUS_MATCH_DEFAULT,
onig_alloc_init  4949 regcomp.c        r = onig_alloc_init(reg, option, ONIGENC_AMBIGUOUS_MATCH_DEFAULT,
onig_alloc_init   787 regint.h       extern int  onig_alloc_init P_((regex_t** reg, OnigOptionType option, OnigAmbigType ambig_flag, OnigEncoding enc, OnigSyntaxType* syntax));


onig_bbuf_init

onig_bbuf_init    430 regint.h       #define BBUF_INIT(buf,size)    onig_bbuf_init((BBuf* )(buf), (size))
onig_bbuf_init    786 regint.h       extern int  onig_bbuf_init P_((BBuf* buf, int size));


onig_chain_link_add

onig_chain_link_add 4892 regcomp.c          onig_chain_link_add(reg, new_reg);
onig_chain_link_add  790 regint.h       extern void onig_chain_link_add P_((regex_t* to, regex_t* add));


onig_chain_reduce

onig_chain_reduce 4653 regcomp.c            onig_chain_reduce(from);
onig_chain_reduce 2922 regexec.c            onig_chain_reduce(reg);
onig_chain_reduce 3195 regexec.c            onig_chain_reduce(reg);
onig_chain_reduce  789 regint.h       extern void onig_chain_reduce P_((regex_t* reg));


onig_compile

onig_compile      478 re.c           		 err = (onig_compile(rp, ptr, ptr + len, NULL) != 0);
onig_compile      623 re.c               r = onig_compile(rp, (UChar*)s, (UChar*)(s + len), &einfo);
onig_compile     4953 regcomp.c        r = onig_compile(*reg, pattern, pattern_end, einfo);
onig_compile      788 regint.h       extern int  onig_compile P_((regex_t* reg, const UChar* pattern, const UChar* pattern_end, OnigErrorInfo* einfo));


onig_error_code_to_format

onig_error_code_to_format  201 regerror.c         q = onig_error_code_to_format(code);
onig_error_code_to_format  232 regerror.c         q = onig_error_code_to_format(code);
onig_error_code_to_format  784 regint.h       extern char* onig_error_code_to_format P_((int code));


onig_error_code_to_str

onig_error_code_to_str  779 oniguruma.h    int onig_error_code_to_str PV_((UChar* s, int err_code, ...));
onig_error_code_to_str  619 re.c           	onig_error_code_to_str((UChar*)err, r);
onig_error_code_to_str  627 re.c           	(void )onig_error_code_to_str((UChar*)err, r, &einfo);
onig_error_code_to_str  837 re.c           	     (void )onig_error_code_to_str((UChar*)err, r, &einfo);
onig_error_code_to_str  927 re.c           	    onig_error_code_to_str((UChar*)err, result);


onig_free

onig_free        1142 gc.c           	    onig_free(RANY(obj)->as.regexp.ptr);
onig_free         789 oniguruma.h    void onig_free P_((regex_t*));
onig_free         481 re.c           	    onig_free(rp);
onig_free         626 re.c           	onig_free(rp);
onig_free        1308 re.c               if (re->ptr) onig_free(re->ptr);
onig_free        4576 regcomp.c        if (IS_NOT_NULL(reg->chain))            onig_free(reg->chain);
onig_free        4955 regcomp.c          onig_free(*reg);


onig_free_body

onig_free_body   4587 regcomp.c          onig_free_body(reg);
onig_free_body   4594 regcomp.c        onig_free_body(to);\


onig_free_node_list

onig_free_node_list 4995 regcomp.c        onig_free_node_list();
onig_free_node_list  306 regparse.h     extern int    onig_free_node_list(void);


onig_free_shared_cclass_table

onig_free_shared_cclass_table 4986 regcomp.c        extern int onig_free_shared_cclass_table(void);
onig_free_shared_cclass_table 4999 regcomp.c        onig_free_shared_cclass_table();


onig_init

onig_init         777 oniguruma.h    int onig_init P_((void));
onig_init        4904 regcomp.c          onig_init();


onig_is_code_in_cc

onig_is_code_in_cc 2296 regcomp.c      	  return (onig_is_code_in_cc(reg->enc, code, cc) != 0 ? 0 : 1);
onig_is_code_in_cc 4570 regparse.c           if (onig_is_code_in_cc(enc, ccs[i].code, cc)) {
onig_is_code_in_cc 4913 regparse.c                 in_cc = onig_is_code_in_cc(env->enc, ccs[i].from, cc);
onig_is_code_in_cc  293 regparse.h     extern int    onig_is_code_in_cc P_((OnigEncoding enc, OnigCodePoint code, CClassNode* cc));


onig_is_in_code_range

onig_is_in_code_range 2133 regcomp.c            found = (onig_is_in_code_range(cc->mbuf->p, code) != 0 ? 1 : 0);
onig_is_in_code_range  131 regenc.h       extern int  onig_is_in_code_range P_((const UChar* p, OnigCodePoint code));
onig_is_in_code_range 1178 regexec.c          in_cc = onig_is_in_code_range(p, code);
onig_is_in_code_range 1634 regexec.c      	if (! onig_is_in_code_range(p, code)) goto fail;
onig_is_in_code_range 1638 regexec.c      	if (! onig_is_in_code_range(q, code)) goto fail;
onig_is_in_code_range 1699 regexec.c      	if (onig_is_in_code_range(p, code)) goto fail;
onig_is_in_code_range 1703 regexec.c      	if (onig_is_in_code_range(q, code)) goto fail;
onig_is_in_code_range 3683 utf8.c           return onig_is_in_code_range((UChar* )range, code);


onig_match

onig_match        437 ext/strscan/strscan.c         ret = onig_match(RREGEXP(regex)->ptr, (UChar* )CURPTR(p),
onig_match        797 oniguruma.h    int onig_match P_((regex_t*, const UChar* str, const UChar* end, const UChar* at, OnigRegion* region, OnigOptionType option));


onig_name_to_group_numbers

onig_name_to_group_numbers  813 oniguruma.h    int onig_name_to_group_numbers P_((regex_t* reg, const UChar* name, const UChar* name_end, int** nums));
onig_name_to_group_numbers 2775 regcomp.c            n = onig_name_to_group_numbers(env->reg, cn->name, cn->name_end, &refs);
onig_name_to_group_numbers  839 regparse.c       n = onig_name_to_group_numbers(reg, name, name_end, &nums);
onig_name_to_group_numbers 3141 regparse.c     	  num = onig_name_to_group_numbers(env->reg, prev, name_end, &backs);


onig_names_free

onig_names_free  4579 regcomp.c        onig_names_free(reg);
onig_names_free   307 regparse.h     extern int    onig_names_free P_((regex_t* reg));


onig_new

onig_new          785 oniguruma.h    int onig_new P_((regex_t**, const UChar* pattern, const UChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo));
onig_new         4886 regcomp.c        r = onig_new(&new_reg, pattern, pattern_end, option, enc, syntax, einfo);


onig_node_conv_to_str_node

onig_node_conv_to_str_node 3176 regcomp.c      	    onig_node_conv_to_str_node(node, NSTRING(target).flag);
onig_node_conv_to_str_node  298 regparse.h     extern void   onig_node_conv_to_str_node P_((Node* node, int raw));


onig_node_free

onig_node_free   1497 regcomp.c      	  onig_node_free(node);
onig_node_free   3044 regcomp.c          onig_node_free(root);      /* free original string node */
onig_node_free   3181 regcomp.c      	    onig_node_free(target);
onig_node_free   4845 regcomp.c        onig_node_free(root);
onig_node_free   4872 regcomp.c        if (IS_NOT_NULL(root)) onig_node_free(root);
onig_node_free    981 regparse.c         onig_node_free(NCONS(node).left);
onig_node_free   1018 regparse.c           onig_node_free(NQUALIFIER(node).target);
onig_node_free   1023 regparse.c           onig_node_free(NEFFECT(node).target);
onig_node_free   1033 regparse.c           onig_node_free(NANCHOR(node).target);
onig_node_free   1243 regparse.c           onig_node_free(node);
onig_node_free   1416 regparse.c         onig_node_free(node);
onig_node_free   2158 regparse.c       onig_node_free(cnode);
onig_node_free   4139 regparse.c     	onig_node_free(anode);
onig_node_free   4229 regparse.c       onig_node_free(*np);
onig_node_free   4334 regparse.c     	  onig_node_free(*np);
onig_node_free   4338 regparse.c     	  onig_node_free(*np);
onig_node_free   4947 regparse.c                 onig_node_free(alt_root);
onig_node_free   5101 regparse.c         onig_node_free(node);
onig_node_free    300 regparse.h     extern void   onig_node_free P_((Node* node));


onig_node_new_anchor

onig_node_new_anchor 2867 regcomp.c          insert_node = onig_node_new_anchor(anc_type);
onig_node_new_anchor 4271 regparse.c           *np = onig_node_new_anchor(ANCHOR_PREC_READ);
onig_node_new_anchor 4274 regparse.c           *np = onig_node_new_anchor(ANCHOR_PREC_READ_NOT);
onig_node_new_anchor 4283 regparse.c     	*np = onig_node_new_anchor(ANCHOR_LOOK_BEHIND);
onig_node_new_anchor 4285 regparse.c     	*np = onig_node_new_anchor(ANCHOR_LOOK_BEHIND_NOT);
onig_node_new_anchor 4987 regparse.c         *np = onig_node_new_anchor(tok->u.anchor);
onig_node_new_anchor  302 regparse.h     extern Node*  onig_node_new_anchor P_((int type));


onig_node_new_effect

onig_node_new_effect 2925 regcomp.c      	      Node* en = onig_node_new_effect(EFFECT_STOP_BACKTRACK);
onig_node_new_effect  301 regparse.h     extern Node*  onig_node_new_effect P_((int type));


onig_node_new_list

onig_node_new_list 2985 regcomp.c              root = onig_node_new_list(snode, NULL);
onig_node_new_list 2990 regcomp.c      	*tailp = onig_node_new_list(snode, NULL);
onig_node_new_list 3032 regcomp.c            root = onig_node_new_list(snode, NULL);
onig_node_new_list 3037 regcomp.c            *tailp = onig_node_new_list(snode, NULL);
onig_node_new_list  304 regparse.h     extern Node*  onig_node_new_list P_((Node* left, Node* right));


onig_node_new_str

onig_node_new_str 2974 regcomp.c              snode = onig_node_new_str(prev_start, wp);
onig_node_new_str 2980 regcomp.c              snode = onig_node_new_str(prev_start, prev);
onig_node_new_str 3021 regcomp.c            snode = onig_node_new_str(prev_start, wp);
onig_node_new_str 3027 regcomp.c            snode = onig_node_new_str(prev_start, end);
onig_node_new_str  303 regparse.h     extern Node*  onig_node_new_str P_((const UChar* s, const UChar* end));


onig_node_str_cat

onig_node_str_cat 3178 regcomp.c      	      r = onig_node_str_cat(node, sn->s, sn->end);
onig_node_str_cat 1376 regparse.c       return onig_node_str_cat(node, s, s + 1);
onig_node_str_cat 1415 regparse.c       if (onig_node_str_cat(node, s, end)) {
onig_node_str_cat 4585 regparse.c                     r = onig_node_str_cat(snode, buf, buf + len);
onig_node_str_cat 4735 regparse.c     	r = onig_node_str_cat(*np, tok->backp, *src);
onig_node_str_cat  299 regparse.h     extern int    onig_node_str_cat P_((Node* node, const UChar* s, const UChar* end));


onig_node_str_clear

onig_node_str_clear 3043 regcomp.c          onig_node_str_clear(root); /* should be after swap! */
onig_node_str_clear  305 regparse.h     extern void   onig_node_str_clear P_((Node* node));


onig_null_warn

onig_null_warn    708 oniguruma.h    extern void onig_null_warn P_((const char* s, ...));
onig_null_warn    709 oniguruma.h    #define ONIG_NULL_WARN       onig_null_warn
onig_null_warn     66 regparse.c     static OnigWarnFunc onig_warn = onig_null_warn;
onig_null_warn     72 regparse.c     static OnigWarnFunc onig_verb_warn = onig_null_warn;
onig_null_warn   2511 regparse.c       if (onig_warn == onig_null_warn) return ;
onig_null_warn   2526 regparse.c       if (onig_warn == onig_null_warn) return ;
onig_null_warn   4508 regparse.c               if (onig_verb_warn != onig_null_warn) {
onig_null_warn   4518 regparse.c               if (onig_verb_warn != onig_null_warn) {


onig_parse_make_tree

onig_parse_make_tree 4757 regcomp.c        r = onig_parse_make_tree(&root, pattern, pattern_end, reg, &scan_env);
onig_parse_make_tree  308 regparse.h     extern int    onig_parse_make_tree P_((Node** root, const UChar* pattern, const UChar* end, regex_t* reg, ScanEnv* env));


onig_print_compiled_byte_code

onig_print_compiled_byte_code 5373 regcomp.c          onig_print_compiled_byte_code(f, bp, &bp, reg->enc);
onig_print_compiled_byte_code 1263 regexec.c            onig_print_compiled_byte_code(stderr, p, NULL, encode);
onig_print_compiled_byte_code  776 regint.h       extern void onig_print_compiled_byte_code P_((FILE* f, UChar* bp, UChar** nextp, OnigEncoding enc));


onig_print_names

onig_print_names 4849 regcomp.c        onig_print_names(stderr, reg);
onig_print_names  312 regparse.h     extern int onig_print_names(FILE*, regex_t*);


onig_print_statistics

onig_print_statistics 4991 regcomp.c        onig_print_statistics(stderr);
onig_print_statistics 1103 regexec.c        onig_print_statistics(stderr);
onig_print_statistics  780 regint.h       extern void onig_print_statistics P_((FILE* f));


onig_recompile

onig_recompile    791 oniguruma.h    int onig_recompile P_((regex_t*, const UChar* pattern, const UChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo));
onig_recompile    832 re.c           	r = onig_recompile(reg, pattern, pattern + RREGEXP(re)->len,


onig_reduce_nested_qualifier

onig_reduce_nested_qualifier 1479 regcomp.c      	onig_reduce_nested_qualifier(node, *ptarget);
onig_reduce_nested_qualifier 4534 regparse.c     	onig_reduce_nested_qualifier(qnode, target);
onig_reduce_nested_qualifier  297 regparse.h     extern void   onig_reduce_nested_qualifier P_((Node* pnode, Node* cnode));


onig_region_clear

onig_region_clear  672 ext/strscan/strscan.c     onig_region_clear(&(p->regs));
onig_region_clear  807 oniguruma.h    void onig_region_clear P_((OnigRegion* region));
onig_region_clear  200 regexec.c        onig_region_clear(region);
onig_region_clear 3466 regexec.c          onig_region_clear(region);


onig_region_copy

onig_region_copy  240 ext/strscan/strscan.c 	onig_region_copy(&self->regs, &orig->regs);
onig_region_copy  805 oniguruma.h    void onig_region_copy P_((OnigRegion* to, OnigRegion* from));
onig_region_copy  676 re.c               onig_region_copy(RMATCH(obj)->regs, RMATCH(orig)->regs);
onig_region_copy  943 re.c               onig_region_copy(RMATCH(match)->regs, &regs);


onig_region_free

onig_region_free  167 ext/strscan/strscan.c     onig_region_free(&(p->regs), 0);
onig_region_free 1160 gc.c           	    onig_region_free(RANY(obj)->as.match.regs, 0);
onig_region_free  803 oniguruma.h    void onig_region_free P_((OnigRegion* region, int free_self));
onig_region_free  674 re.c               onig_region_free(RMATCH(obj)->regs, 0);


onig_region_init

onig_region_init  180 ext/strscan/strscan.c     onig_region_init(&(p->regs));
onig_region_init  801 oniguruma.h    void onig_region_init P_((OnigRegion* region));
onig_region_init  235 regexec.c        onig_region_init(r);


onig_region_resize

onig_region_resize  809 oniguruma.h    int onig_region_resize P_((OnigRegion* region, int n));
onig_region_resize  198 regexec.c        r = onig_region_resize(region, n);
onig_region_resize  210 regexec.c          int r = onig_region_resize(region, at + 1);


onig_region_resize_clear

onig_region_resize_clear 2944 regexec.c          r = onig_region_resize_clear(region, reg->num_mem + 1);
onig_region_resize_clear 3221 regexec.c          r = onig_region_resize_clear(region, reg->num_mem + 1);


onig_region_set

onig_region_set   673 ext/strscan/strscan.c     onig_region_set(&(p->regs), 0, 0, p->curr - p->prev);
onig_region_set   811 oniguruma.h    int onig_region_set P_((OnigRegion* region, int at, int beg, int end));


onig_renumber_name_table

onig_renumber_name_table 1639 regcomp.c        return onig_renumber_name_table(reg, map);
onig_renumber_name_table  290 regparse.h     extern int    onig_renumber_name_table P_((regex_t* reg, GroupNumRemap* map));


onig_scan_env_set_error_string

onig_scan_env_set_error_string 2784 regcomp.c      	  onig_scan_env_set_error_string(env,
onig_scan_env_set_error_string 2796 regcomp.c      	  onig_scan_env_set_error_string(env,
onig_scan_env_set_error_string 2804 regcomp.c      	onig_scan_env_set_error_string(env,
onig_scan_env_set_error_string 2813 regcomp.c      	  onig_scan_env_set_error_string(env,
onig_scan_env_set_error_string  779 regparse.c         onig_scan_env_set_error_string(env, ONIGERR_MULTIPLEX_DEFINED_NAME,
onig_scan_env_set_error_string 2464 regparse.c         onig_scan_env_set_error_string(env, r, *src, name_end);
onig_scan_env_set_error_string 2502 regparse.c         onig_scan_env_set_error_string(env, r, *src, name_end);
onig_scan_env_set_error_string 3143 regparse.c     	    onig_scan_env_set_error_string(env,
onig_scan_env_set_error_string 3746 regparse.c       onig_scan_env_set_error_string(env, ONIGERR_INVALID_CHAR_PROPERTY_NAME,
onig_scan_env_set_error_string  295 regparse.h     extern void   onig_scan_env_set_error_string P_((ScanEnv* env, int ecode, UChar* arg, UChar* arg_end));


onig_scan_unsigned_number

onig_scan_unsigned_number 2782 regcomp.c      	num = onig_scan_unsigned_number(&p, cn->name_end, env->enc);
onig_scan_unsigned_number 2250 regparse.c       low = onig_scan_unsigned_number(&p, end, env->enc);
onig_scan_unsigned_number 2269 regparse.c         up = onig_scan_unsigned_number(&p, end, env->enc);
onig_scan_unsigned_number 3085 regparse.c           num = onig_scan_unsigned_number(&p, end, enc);
onig_scan_unsigned_number  296 regparse.h     extern int    onig_scan_unsigned_number P_((UChar** src, const UChar* end, OnigEncoding enc));


onig_search

onig_search       442 ext/strscan/strscan.c         ret = onig_search(RREGEXP(regex)->ptr,
onig_search       795 oniguruma.h    int onig_search P_((regex_t*, const UChar* str, const UChar* end, const UChar* start, const UChar* range, OnigRegion* region, OnigOptionType option));
onig_search       910 re.c               result = onig_search(RREGEXP(re)->ptr,


onig_snprintf_with_pattern

onig_snprintf_with_pattern  785 regint.h       extern void  onig_snprintf_with_pattern PV_((char buf[], int bufsize, OnigEncoding enc, char* pat, char* pat_end, char *fmt, ...));
onig_snprintf_with_pattern 2516 regparse.c         onig_snprintf_with_pattern(buf, WARN_BUFSIZE, env->enc,
onig_snprintf_with_pattern 2530 regparse.c         onig_snprintf_with_pattern(buf, WARN_BUFSIZE, (env)->enc,
onig_snprintf_with_pattern 4509 regparse.c                 onig_snprintf_with_pattern(buf, WARN_BUFSIZE, env->enc,
onig_snprintf_with_pattern 4519 regparse.c                 onig_snprintf_with_pattern(buf, WARN_BUFSIZE, env->enc,


onig_st_add_direct

onig_st_add_direct  154 regint.h       #define st_add_direct                  onig_st_add_direct
onig_st_add_direct 4862 regparse.c                 onig_st_add_direct(OnigTypeCClassTable, (st_data_t )new_key,


onig_st_foreach

onig_st_foreach   153 regint.h       #define st_foreach                     onig_st_foreach
onig_st_foreach   425 regparse.c         onig_st_foreach(t, i_print_name_entry, (HashDataType )fp);
onig_st_foreach   448 regparse.c         onig_st_foreach(t, i_free_name_entry, 0);
onig_st_foreach   519 regparse.c         onig_st_foreach(t, i_names, (HashDataType )&narg);
onig_st_foreach   547 regparse.c         onig_st_foreach(t, i_renumber_name, (HashDataType )map);
onig_st_foreach  4668 regparse.c         onig_st_foreach(OnigTypeCClassTable, i_free_shared_class, 0);


onig_st_free_table

onig_st_free_table  156 regint.h       #define st_free_table                  onig_st_free_table
onig_st_free_table  463 regparse.c       if (IS_NOT_NULL(t)) onig_st_free_table(t);


onig_st_init_strend_table_with_size

onig_st_init_strend_table_with_size  146 regint.h       #define st_init_strend_table_with_size onig_st_init_strend_table_with_size
onig_st_init_strend_table_with_size  718 regparse.c           t = onig_st_init_strend_table_with_size(5);


onig_st_init_table_with_size

onig_st_init_table_with_size  141 regint.h       #define st_init_table_with_size        onig_st_init_table_with_size
onig_st_init_table_with_size  324 regparse.c         return onig_st_init_table_with_size(&type_strend_hash, size);
onig_st_init_table_with_size 4840 regparse.c                     = onig_st_init_table_with_size(&type_type_cclass_hash, 10);


onig_st_insert

onig_st_insert    149 regint.h       #define st_insert                      onig_st_insert
onig_st_insert    347 regparse.c       result = onig_st_insert(table, (st_data_t )key, value);


onig_st_insert_strend

onig_st_insert_strend  150 regint.h       #define st_insert_strend               onig_st_insert_strend
onig_st_insert_strend  726 regparse.c         onig_st_insert_strend(t, e->name, (e->name + (name_end - name)),


onig_st_lookup

onig_st_lookup    151 regint.h       #define st_lookup                      onig_st_lookup
onig_st_lookup    335 regparse.c         return onig_st_lookup(table, (st_data_t )(&key), value);
onig_st_lookup   4847 regparse.c                   if (onig_st_lookup(OnigTypeCClassTable, (st_data_t )&key,


onig_st_lookup_strend

onig_st_lookup_strend  152 regint.h       #define st_lookup_strend               onig_st_lookup_strend
onig_st_lookup_strend  476 regparse.c         onig_st_lookup_strend(t, name, name_end, (HashDataType* )((void* )(&e)));


onig_statistics_init

onig_statistics_init 4975 regcomp.c        onig_statistics_init();
onig_statistics_init  779 regint.h       extern void onig_statistics_init P_((void));


onig_strncmp

onig_strncmp      663 regparse.c           if (len == e->name_len && onig_strncmp(name, e->name, len) == 0)
onig_strncmp      294 regparse.h     extern int    onig_strncmp P_((const UChar* s1, const UChar* s2, int n));


onig_transfer

onig_transfer    4889 regcomp.c          onig_transfer(reg, new_reg);
onig_transfer     791 regint.h       extern void onig_transfer P_((regex_t* to, regex_t* from));


onigenc_always_true_is_allowed_reverse_match

onigenc_always_true_is_allowed_reverse_match   66 ascii.c          onigenc_always_true_is_allowed_reverse_match
onigenc_always_true_is_allowed_reverse_match   88 regenc.h       ONIG_EXTERN int onigenc_always_true_is_allowed_reverse_match P_((const UChar* s, const UChar* end));
onigenc_always_true_is_allowed_reverse_match 3737 utf8.c           onigenc_always_true_is_allowed_reverse_match


onigenc_ascii_get_all_pair_ambig_codes

onigenc_ascii_get_all_pair_ambig_codes   61 ascii.c          onigenc_ascii_get_all_pair_ambig_codes,
onigenc_ascii_get_all_pair_ambig_codes  226 euc_jp.c         onigenc_ascii_get_all_pair_ambig_codes,
onigenc_ascii_get_all_pair_ambig_codes   72 regenc.h       ONIG_EXTERN int onigenc_ascii_get_all_pair_ambig_codes P_((OnigAmbigType flag, OnigPairAmbigCodes** acs));
onigenc_ascii_get_all_pair_ambig_codes  237 sjis.c           onigenc_ascii_get_all_pair_ambig_codes,


onigenc_ascii_is_mbc_ambiguous

onigenc_ascii_is_mbc_ambiguous   60 ascii.c          onigenc_ascii_is_mbc_ambiguous,
onigenc_ascii_is_mbc_ambiguous   81 regenc.h       ONIG_EXTERN int onigenc_ascii_is_mbc_ambiguous P_((OnigAmbigType flag, const UChar** p, const UChar* end));


onigenc_ascii_mbc_to_normalize

onigenc_ascii_mbc_to_normalize   59 ascii.c          onigenc_ascii_mbc_to_normalize,
onigenc_ascii_mbc_to_normalize   80 regenc.h       ONIG_EXTERN int onigenc_ascii_mbc_to_normalize P_((OnigAmbigType flag, const UChar** p, const UChar* end, UChar* lower));


onigenc_code_to_mbc

onigenc_code_to_mbc  299 oniguruma.h    #define ONIGENC_CODE_TO_MBC(enc,code,buf)  onigenc_code_to_mbc(enc, code, buf)
onigenc_code_to_mbc  336 oniguruma.h    int onigenc_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf));


onigenc_ess_tsett_get_all_comp_ambig_codes

onigenc_ess_tsett_get_all_comp_ambig_codes   75 regenc.h       ONIG_EXTERN int onigenc_ess_tsett_get_all_comp_ambig_codes P_((OnigAmbigType flag, OnigCompAmbigCodes** acs));
onigenc_ess_tsett_get_all_comp_ambig_codes 3733 utf8.c           onigenc_ess_tsett_get_all_comp_ambig_codes,


onigenc_get_default_encoding

onigenc_get_default_encoding  419 oniguruma.h    OnigEncoding onigenc_get_default_encoding P_(());
onigenc_get_default_encoding  473 re.c                                           onigenc_get_default_encoding(),
onigenc_get_default_encoding  616 re.c                                   onigenc_get_default_encoding(),
onigenc_get_default_encoding  833 re.c           			   reg->options, onigenc_get_default_encoding(),


onigenc_get_left_adjust_char_head

onigenc_get_left_adjust_char_head  286 oniguruma.h            onigenc_get_left_adjust_char_head(enc, start, s)
onigenc_get_left_adjust_char_head  427 oniguruma.h    UChar* onigenc_get_left_adjust_char_head P_((OnigEncoding enc, const UChar* start, const UChar* s));


onigenc_get_prev_char_head

onigenc_get_prev_char_head  425 oniguruma.h    UChar* onigenc_get_prev_char_head P_((OnigEncoding enc, const UChar* start, const UChar* s));
onigenc_get_prev_char_head 2488 regexec.c            sprev = (UChar* )onigenc_get_prev_char_head(encode, str, s);
onigenc_get_prev_char_head 2506 regexec.c      	sprev = (UChar* )onigenc_get_prev_char_head(encode, str, s);
onigenc_get_prev_char_head 2693 regexec.c          s = (UChar* )onigenc_get_prev_char_head(enc, adjust_text, s);
onigenc_get_prev_char_head 2719 regexec.c          s = (UChar* )onigenc_get_prev_char_head(enc, adjust_text, s);
onigenc_get_prev_char_head 2905 regexec.c          s = onigenc_get_prev_char_head(enc, adjust_text, s);
onigenc_get_prev_char_head 2950 regexec.c          prev = (UChar* )onigenc_get_prev_char_head(reg->enc, str, at);
onigenc_get_prev_char_head 3018 regexec.c      	  prev = onigenc_get_prev_char_head(reg->enc,
onigenc_get_prev_char_head 3027 regexec.c      	  prev = (UChar* )onigenc_get_prev_char_head(reg->enc,
onigenc_get_prev_char_head 3042 regexec.c      	  *low_prev = onigenc_get_prev_char_head(reg->enc, s, p);
onigenc_get_prev_char_head 3044 regexec.c      	  *low_prev = onigenc_get_prev_char_head(reg->enc,
onigenc_get_prev_char_head 3055 regexec.c      	    *low_prev = onigenc_get_prev_char_head(reg->enc,
onigenc_get_prev_char_head 3060 regexec.c      	    *low_prev = onigenc_get_prev_char_head(reg->enc,
onigenc_get_prev_char_head 3135 regexec.c      	  prev = onigenc_get_prev_char_head(reg->enc, adjrange, p);
onigenc_get_prev_char_head 3145 regexec.c      	  prev = onigenc_get_prev_char_head(reg->enc, adjrange, p);
onigenc_get_prev_char_head 3153 regexec.c      	  p = onigenc_get_prev_char_head(reg->enc, adjrange, p);
onigenc_get_prev_char_head 3274 regexec.c      	    start = onigenc_get_prev_char_head(reg->enc, str, end);
onigenc_get_prev_char_head 3341 regexec.c            prev = onigenc_get_prev_char_head(reg->enc, str, s);
onigenc_get_prev_char_head 3418 regexec.c      	    prev = onigenc_get_prev_char_head(reg->enc, str, s);
onigenc_get_prev_char_head 3446 regexec.c            prev = onigenc_get_prev_char_head(reg->enc, str, s);
onigenc_get_prev_char_head 1458 regparse.c         p = onigenc_get_prev_char_head(enc, sn->s, sn->end);


onigenc_get_right_adjust_char_head

onigenc_get_right_adjust_char_head  429 oniguruma.h    UChar* onigenc_get_right_adjust_char_head P_((OnigEncoding enc, const UChar* start, const UChar* s));
onigenc_get_right_adjust_char_head  871 re.c           	      p = onigenc_get_right_adjust_char_head(enc, string, string + pos);
onigenc_get_right_adjust_char_head 3165 regexec.c            *high = onigenc_get_right_adjust_char_head(reg->enc, adjrange, *high);
onigenc_get_right_adjust_char_head 3272 regexec.c      	    start = onigenc_get_right_adjust_char_head(reg->enc, str, start);


onigenc_get_right_adjust_char_head_with_prev

onigenc_get_right_adjust_char_head_with_prev  423 oniguruma.h    UChar* onigenc_get_right_adjust_char_head_with_prev P_((OnigEncoding enc, const UChar* start, const UChar* s, const UChar** prev));
onigenc_get_right_adjust_char_head_with_prev 3052 regexec.c      	  *low = onigenc_get_right_adjust_char_head_with_prev(reg->enc, s,


onigenc_init

onigenc_init      415 oniguruma.h    int onigenc_init P_(());
onigenc_init     4971 regcomp.c        onigenc_init();


onigenc_is_allowed_reverse_match

onigenc_is_allowed_reverse_match  284 oniguruma.h            onigenc_is_allowed_reverse_match(enc, s, end)
onigenc_is_allowed_reverse_match  342 oniguruma.h    int onigenc_is_allowed_reverse_match P_((OnigEncoding enc, const UChar* s, const UChar* end));


onigenc_is_code_ctype

onigenc_is_code_ctype  307 oniguruma.h            onigenc_is_code_ctype(enc,code,ctype)
onigenc_is_code_ctype  334 oniguruma.h    int onigenc_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, int ctype));


onigenc_is_mbc_ambiguous

onigenc_is_mbc_ambiguous  280 oniguruma.h            onigenc_is_mbc_ambiguous(enc,flag,pp,end)
onigenc_is_mbc_ambiguous  340 oniguruma.h    int onigenc_is_mbc_ambiguous P_((OnigEncoding enc, OnigAmbigType flag, const UChar** pp, const UChar* end));


onigenc_is_mbc_newline_0x0a

onigenc_is_mbc_newline_0x0a   55 ascii.c          onigenc_is_mbc_newline_0x0a,
onigenc_is_mbc_newline_0x0a  220 euc_jp.c         onigenc_is_mbc_newline_0x0a,
onigenc_is_mbc_newline_0x0a   77 regenc.h       ONIG_EXTERN int onigenc_is_mbc_newline_0x0a P_((const UChar* p, const UChar* end));
onigenc_is_mbc_newline_0x0a  231 sjis.c           onigenc_is_mbc_newline_0x0a,
onigenc_is_mbc_newline_0x0a 3726 utf8.c           onigenc_is_mbc_newline_0x0a,


onigenc_iso_8859_1_get_all_pair_ambig_codes

onigenc_iso_8859_1_get_all_pair_ambig_codes   74 regenc.h       ONIG_EXTERN int onigenc_iso_8859_1_get_all_pair_ambig_codes P_((OnigAmbigType flag, OnigPairAmbigCodes** acs));
onigenc_iso_8859_1_get_all_pair_ambig_codes 3732 utf8.c           onigenc_iso_8859_1_get_all_pair_ambig_codes,


onigenc_mbn_is_mbc_ambiguous

onigenc_mbn_is_mbc_ambiguous  155 euc_jp.c         return onigenc_mbn_is_mbc_ambiguous(ONIG_ENCODING_EUC_JP, flag, pp, end);
onigenc_mbn_is_mbc_ambiguous   94 regenc.h       ONIG_EXTERN int onigenc_mbn_is_mbc_ambiguous P_((OnigEncoding enc, OnigAmbigType flag, const UChar** p, const UChar* end));
onigenc_mbn_is_mbc_ambiguous  163 sjis.c           return onigenc_mbn_is_mbc_ambiguous(ONIG_ENCODING_SJIS, flag, pp, end);


onigenc_not_support_get_ctype_code_range

onigenc_not_support_get_ctype_code_range   64 ascii.c          onigenc_not_support_get_ctype_code_range,
onigenc_not_support_get_ctype_code_range  229 euc_jp.c         onigenc_not_support_get_ctype_code_range,
onigenc_not_support_get_ctype_code_range   76 regenc.h       ONIG_EXTERN int onigenc_not_support_get_ctype_code_range P_((int ctype, OnigCodePoint* sbr[], OnigCodePoint* mbr[]));
onigenc_not_support_get_ctype_code_range  240 sjis.c           onigenc_not_support_get_ctype_code_range,


onigenc_nothing_get_all_comp_ambig_codes

onigenc_nothing_get_all_comp_ambig_codes   62 ascii.c          onigenc_nothing_get_all_comp_ambig_codes,
onigenc_nothing_get_all_comp_ambig_codes  227 euc_jp.c         onigenc_nothing_get_all_comp_ambig_codes,
onigenc_nothing_get_all_comp_ambig_codes   73 regenc.h       ONIG_EXTERN int onigenc_nothing_get_all_comp_ambig_codes P_((OnigAmbigType flag, OnigCompAmbigCodes** acs));
onigenc_nothing_get_all_comp_ambig_codes  238 sjis.c           onigenc_nothing_get_all_comp_ambig_codes,


onigenc_set_default_caseconv_table

onigenc_set_default_caseconv_table  421 oniguruma.h    void  onigenc_set_default_caseconv_table P_((const UChar* table));
onigenc_set_default_caseconv_table 2203 re.c               onigenc_set_default_caseconv_table((UChar*)casetable);
onigenc_set_default_caseconv_table 4972 regcomp.c        onigenc_set_default_caseconv_table((UChar* )0);


onigenc_set_default_encoding

onigenc_set_default_encoding  417 oniguruma.h    int onigenc_set_default_encoding P_((OnigEncoding enc));
onigenc_set_default_encoding  206 re.c           	onigenc_set_default_encoding(ONIG_ENCODING_ASCII);
onigenc_set_default_encoding  209 re.c           	onigenc_set_default_encoding(ONIG_ENCODING_EUC_JP);
onigenc_set_default_encoding  212 re.c           	onigenc_set_default_encoding(ONIG_ENCODING_SJIS);
onigenc_set_default_encoding  215 re.c           	onigenc_set_default_encoding(ONIG_ENCODING_UTF8);
onigenc_set_default_encoding  226 re.c           	onigenc_set_default_encoding(ONIG_ENCODING_ASCII);
onigenc_set_default_encoding  229 re.c           	onigenc_set_default_encoding(ONIG_ENCODING_EUC_JP);
onigenc_set_default_encoding  232 re.c           	onigenc_set_default_encoding(ONIG_ENCODING_SJIS);
onigenc_set_default_encoding  235 re.c           	onigenc_set_default_encoding(ONIG_ENCODING_UTF8);
onigenc_set_default_encoding 2095 re.c           	onigenc_set_default_encoding(ONIG_ENCODING_EUC_JP);
onigenc_set_default_encoding 2100 re.c           	onigenc_set_default_encoding(ONIG_ENCODING_SJIS);
onigenc_set_default_encoding 2105 re.c           	onigenc_set_default_encoding(ONIG_ENCODING_UTF8);
onigenc_set_default_encoding 2114 re.c           	onigenc_set_default_encoding(ONIG_ENCODING_ASCII);
onigenc_set_default_encoding 2205 re.c               onigenc_set_default_encoding(ONIG_ENCODING_EUC_JP);
onigenc_set_default_encoding 2208 re.c               onigenc_set_default_encoding(ONIG_ENCODING_SJIS);
onigenc_set_default_encoding 2211 re.c               onigenc_set_default_encoding(ONIG_ENCODING_UTF8);
onigenc_set_default_encoding 2213 re.c               onigenc_set_default_encoding(ONIG_ENCODING_ASCII);


onigenc_single_byte_code_to_mbc

onigenc_single_byte_code_to_mbc   58 ascii.c          onigenc_single_byte_code_to_mbc,
onigenc_single_byte_code_to_mbc   86 regenc.h       ONIG_EXTERN int onigenc_single_byte_code_to_mbc P_((OnigCodePoint code, UChar *buf));


onigenc_single_byte_code_to_mbclen

onigenc_single_byte_code_to_mbclen   57 ascii.c          onigenc_single_byte_code_to_mbclen,
onigenc_single_byte_code_to_mbclen   84 regenc.h       ONIG_EXTERN int onigenc_single_byte_code_to_mbclen P_((OnigCodePoint code));


onigenc_single_byte_left_adjust_char_head

onigenc_single_byte_left_adjust_char_head   65 ascii.c          onigenc_single_byte_left_adjust_char_head,
onigenc_single_byte_left_adjust_char_head   87 regenc.h       ONIG_EXTERN UChar* onigenc_single_byte_left_adjust_char_head P_((const UChar* start, const UChar* s));


onigenc_single_byte_mbc_enc_len

onigenc_single_byte_mbc_enc_len   42 ascii.c          onigenc_single_byte_mbc_enc_len,
onigenc_single_byte_mbc_enc_len   82 regenc.h       ONIG_EXTERN int onigenc_single_byte_mbc_enc_len P_((const UChar* p));


onigenc_single_byte_mbc_to_code

onigenc_single_byte_mbc_to_code   56 ascii.c          onigenc_single_byte_mbc_to_code,
onigenc_single_byte_mbc_to_code   83 regenc.h       ONIG_EXTERN OnigCodePoint onigenc_single_byte_mbc_to_code P_((const UChar* p, const UChar* end));


onigenc_step

onigenc_step      128 regenc.h       onigenc_step P_((OnigEncoding enc, const UChar* p, const UChar* end, int n));
onigenc_step     3640 regparse.c           p = (UChar* )onigenc_step(enc, p, end, pb->len);


onigenc_step_back

onigenc_step_back  362 oniguruma.h            onigenc_step_back((enc),(start),(s),(n))
onigenc_step_back  408 oniguruma.h    UChar* onigenc_step_back P_((OnigEncoding enc, const UChar* start, const UChar* s, int n));


onigenc_str_bytelen_null

onigenc_str_bytelen_null  435 oniguruma.h    int onigenc_str_bytelen_null P_((OnigEncoding enc, const UChar* p));
onigenc_str_bytelen_null  233 regerror.c         len = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, q);
onigenc_str_bytelen_null  261 regerror.c         s = buf + onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, buf);
onigenc_str_bytelen_null  284 regerror.c                 blen = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, bs);
onigenc_str_bytelen_null  293 regerror.c     	len = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, bs);


onigenc_strlen

onigenc_strlen    431 oniguruma.h    int onigenc_strlen P_((OnigEncoding enc, const UChar* p, const UChar* end));
onigenc_strlen   4027 regcomp.c                n = onigenc_strlen(env->enc, sn->s, sn->end);
onigenc_strlen   3635 regparse.c       if (onigenc_strlen(enc, p, end) < POSIX_BRACKET_NAME_MAX_LEN + 2)
onigenc_strlen   3695 regparse.c       len = onigenc_strlen(enc, p, end);


onigenc_with_ascii_strncmp

onigenc_with_ascii_strncmp  126 regenc.h       onigenc_with_ascii_strncmp P_((OnigEncoding enc, const UChar* p, const UChar* end, const UChar* sascii /* ascii */, int n));
onigenc_with_ascii_strncmp 3639 regparse.c         if (onigenc_with_ascii_strncmp(enc, p, end, pb->name, pb->len) == 0) {
onigenc_with_ascii_strncmp 3641 regparse.c           if (onigenc_with_ascii_strncmp(enc, p, end, ":]", 2) != 0)
onigenc_with_ascii_strncmp 3698 regparse.c             onigenc_with_ascii_strncmp(enc, p, end, pb->name, pb->len) == 0)


open

open              983 dir.c              int open = 0;
open              988 dir.c          	    open = 1;
open              991 dir.c          	    open = 0;
open              995 dir.c          	    if (!open)
open              367 dln.c              if (file == NULL || (fd = open(file, O_RDONLY)) < 0) {
open              977 dln.c              fd = open(file, O_RDONLY);
open             1094 dln.c              fd = open(file, O_RDONLY);
open               73 ext/digest/rmd160/rmd160hl.c     if ((fd = open(filename, O_RDONLY)) < 0)
open               76 ext/digest/sha1/sha1hl.c     if ((fd = open(filename,O_RDONLY)) < 0)
open               85 ext/digest/sha2/sha2hl.c 	if ((fd = open(filename, O_RDONLY)) < 0)
open              146 ext/digest/sha2/sha2hl.c 	if ((fd = open(filename, O_RDONLY)) < 0)
open              206 ext/digest/sha2/sha2hl.c 	if ((fd = open(filename, O_RDONLY)) < 0)
open              152 ext/dl/dl.h        int  open;
open               13 ext/dl/handle.c   if( dlhandle->ptr && dlhandle->open && dlhandle->enable_close ){
open               24 ext/dl/handle.c   dlhandle->open = 0;
open               37 ext/dl/handle.c   dlhandle->open = 0;
open               82 ext/dl/handle.c   if( dlhandle->ptr && dlhandle->open && dlhandle->enable_close ){
open               86 ext/dl/handle.c   dlhandle->open = 1;
open              156 ext/dl/handle.c     if( ! dlhandle->open ){
open              810 ext/nkf/nkf-utf8/nkf.c                       fd = open(outfname, O_WRONLY | O_CREAT | O_TRUNC,
open              249 ext/pty/pty.c  	if ((i = open("/dev/tty", O_RDONLY)) < 0)
open              269 ext/pty/pty.c  	slave = open(SlaveName, O_RDWR);
open              333 ext/pty/pty.c      *slave = open(name, O_RDWR);
open              351 ext/pty/pty.c      if((i = open("/dev/ptmx", O_RDWR, 0)) != -1) {
open              357 ext/pty/pty.c  		    if((j = open(pn, O_RDWR, 0)) != -1) {
open              383 ext/pty/pty.c  	if ((i = open(MasterName,O_RDWR,0)) >= 0) {
open              386 ext/pty/pty.c  	    if ((j = open(SlaveName,O_RDWR,0)) >= 0) {
open              208 ext/sdbm/_sdbm.c 	if ((db->pagf = open(pagname, flags, mode)) > -1) {
open              209 ext/sdbm/_sdbm.c 		if ((db->dirf = open(dirname, flags, mode)) > -1) {
open             2965 file.c         	if ((tmpfd = open(StringValueCStr(path), O_RDWR)) < 0) {
open             2969 file.c         	if ((tmpfd = open(StringValueCStr(path), 0)) < 0) {
open              154 io.c           #define open(file_spec, flags, mode)  open(file_spec, flags, mode, "rfm=stmlf")
open             2562 io.c               fd = open(fname, flags, mode);
open             2566 io.c           	    fd = open(fname, flags, mode);
open             1815 process.c        if ((fd = open("/dev/tty", O_RDWR)) >= 0) {
open             2784 process.c          if (!RTEST(noclose) && (n = open("/dev/null", O_RDWR, 0)) != -1) {
open              276 random.c           if ((fd = open("/dev/urandom", O_RDONLY


open_ifs_socket

open_ifs_socket  2497 win32/win32.c  	s = open_ifs_socket(af, type, protocol);
open_ifs_socket  2676 win32/win32.c  	    svr = open_ifs_socket(af, type, protocol);
open_ifs_socket  2686 win32/win32.c  	    w = open_ifs_socket(af, type, protocol);


open_mime

open_mime         351 ext/nkf/nkf-utf8/nkf.c STATIC  void    open_mime PROTO((int c));
open_mime        4626 ext/nkf/nkf-utf8/nkf.c                     open_mime(output_mode);
open_mime        4646 ext/nkf/nkf-utf8/nkf.c             open_mime(output_mode);
open_mime        4715 ext/nkf/nkf-utf8/nkf.c 	    open_mime(output_mode);


opendir

opendir           398 dir.c              dp->dir = opendir(RSTRING(dirname)->ptr);
opendir           402 dir.c          	    dp->dir = opendir(RSTRING(dirname)->ptr);
opendir           935 dir.c              DIR *dirp = opendir(path);


optimize_node_left

optimize_node_left 3975 regcomp.c      	r = optimize_node_left(NCONS(nd).left, &nopt, &nenv);
optimize_node_left 3990 regcomp.c      	r = optimize_node_left(NCONS(nd).left, &nopt, env);
optimize_node_left 4123 regcomp.c      	r = optimize_node_left(NANCHOR(node).target, &nopt, env);
optimize_node_left 4181 regcomp.c            r = optimize_node_left(NCALL(node).target, opt, env);
optimize_node_left 4194 regcomp.c            r = optimize_node_left(qn->target, &nopt, env);
optimize_node_left 4250 regcomp.c      	  r = optimize_node_left(en->target, opt, env);
optimize_node_left 4270 regcomp.c      	  r = optimize_node_left(en->target, opt, env);
optimize_node_left 4280 regcomp.c      	r = optimize_node_left(en->target, opt, env);
optimize_node_left 4390 regcomp.c        r = optimize_node_left(node, &opt, &env);


options

options           524 ext/iconv/iconv.c     if (!NIL_P(options)) {
options           525 ext/iconv/iconv.c 	rb_iterate(rb_each, options, get_iconv_opt_i, (VALUE)opt);
options           555 ext/iconv/iconv.c     VALUE to, from, options;
options           558 ext/iconv/iconv.c     rb_scan_args(argc, argv, "21", &to, &from, &options);
options           559 ext/iconv/iconv.c     get_iconv_opt(&opt, options);
options           577 ext/iconv/iconv.c     VALUE to, from, options, cd;
options           580 ext/iconv/iconv.c     rb_scan_args(argc, argv, "21", &to, &from, &options);
options           581 ext/iconv/iconv.c     get_iconv_opt(&opt, options);
options           357 ext/nkf/nkf-utf8/nkf.c STATIC  void    options PROTO((unsigned char *c));
options           708 ext/nkf/nkf-utf8/nkf.c         options(cp);
options            92 ext/nkf/nkf.c    options(opt_ptr);
options           780 ext/syck/rubyext.c     VALUE options;
options           781 ext/syck/rubyext.c     if (rb_scan_args(argc, argv, "01", &options) == 0)
options           783 ext/syck/rubyext.c         options = rb_hash_new();
options           787 ext/syck/rubyext.c         Check_Type(options, T_HASH);
options           789 ext/syck/rubyext.c     rb_ivar_set(self, s_options, options);
options          1969 ext/syck/rubyext.c     VALUE options, tmp;
options          1980 ext/syck/rubyext.c     if (rb_scan_args(argc, argv, "01", &options) == 0)
options          1982 ext/syck/rubyext.c         options = rb_hash_new();
options          1983 ext/syck/rubyext.c         rb_ivar_set(self, s_options, options);
options          1985 ext/syck/rubyext.c     else if ( !NIL_P(tmp = rb_check_string_type(options)) )
options          1989 ext/syck/rubyext.c     else if ( rb_respond_to( options, s_write ) )
options          1991 ext/syck/rubyext.c         bonus->port = options;
options          1995 ext/syck/rubyext.c         Check_Type(options, T_HASH);
options          1996 ext/syck/rubyext.c         rb_ivar_set(self, s_options, options);
options          3325 ext/tk/tcltklib.c     enum options { TKWAIT_VARIABLE, TKWAIT_VISIBILITY, TKWAIT_WINDOW };
options          3435 ext/tk/tcltklib.c     switch ((enum options) index) {
options          3896 ext/tk/tcltklib.c     enum options { TKWAIT_VARIABLE, TKWAIT_VISIBILITY, TKWAIT_WINDOW };
options          4011 ext/tk/tcltklib.c     switch ((enum options) index) {
options          1089 marshal.c      	    int options = r_byte(arg);
options          1090 marshal.c      	    v = r_entry(rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len, options), arg);
options           469 oniguruma.h    #define ONIG_OPTION_ON(options,regopt)      ((options) |= (regopt))
options           470 oniguruma.h    #define ONIG_OPTION_OFF(options,regopt)     ((options) &= ~(regopt))
options           471 oniguruma.h    #define ONIG_IS_OPTION_ON(options,option)   ((options) & (option))
options           478 oniguruma.h      OnigOptionType options;    /* default option */
options           741 oniguruma.h      OnigOptionType    options;
options           855 oniguruma.h    void onig_set_syntax_options P_((OnigSyntaxType* syntax, OnigOptionType options));
options          3622 parse.y        			int options = $3;
options          3625 parse.y        			    node = NEW_LIT(rb_reg_compile("", 0, options & ~RE_OPTION_ONCE));
options          3634 parse.y        							      options & ~RE_OPTION_ONCE);
options          3640 parse.y        			    if (options & RE_OPTION_ONCE) {
options          3646 parse.y        			    node->nd_cflag = options & ~RE_OPTION_ONCE;
options          4991 parse.y            int options = 0;
options          4998 parse.y        	    options |= ONIG_OPTION_IGNORECASE;
options          5001 parse.y        	    options |= ONIG_OPTION_EXTEND;
options          5004 parse.y        	    options |= ONIG_OPTION_MULTILINE;
options          5007 parse.y        	    options |= RE_OPTION_ONCE;
options          5032 parse.y            return options | kcode;
options           324 re.c           	if (RREGEXP(re)->ptr->options & ONIG_OPTION_MULTILINE)
options           326 re.c           	if (RREGEXP(re)->ptr->options & ONIG_OPTION_IGNORECASE)
options           328 re.c           	if (RREGEXP(re)->ptr->options & ONIG_OPTION_EXTEND)
options           415 re.c               int options;
options           423 re.c               options = RREGEXP(re)->ptr->options;
options           433 re.c           		    options |= ONIG_OPTION_MULTILINE;
options           436 re.c           		    options |= ONIG_OPTION_IGNORECASE;
options           439 re.c           		    options |= ONIG_OPTION_EXTEND;
options           450 re.c           		    options &= ~ONIG_OPTION_MULTILINE;
options           453 re.c           		    options &= ~ONIG_OPTION_IGNORECASE;
options           456 re.c           		    options &= ~ONIG_OPTION_EXTEND;
options           484 re.c           	    options = RREGEXP(re)->ptr->options;
options           490 re.c               if (options & ONIG_OPTION_MULTILINE) rb_str_buf_cat2(str, "m");
options           491 re.c               if (options & ONIG_OPTION_IGNORECASE) rb_str_buf_cat2(str, "i");
options           492 re.c               if (options & ONIG_OPTION_EXTEND) rb_str_buf_cat2(str, "x");
options           494 re.c               if ((options & embeddable) != embeddable) {
options           496 re.c           	if (!(options & ONIG_OPTION_MULTILINE)) rb_str_buf_cat2(str, "m");
options           497 re.c           	if (!(options & ONIG_OPTION_IGNORECASE)) rb_str_buf_cat2(str, "i");
options           498 re.c           	if (!(options & ONIG_OPTION_EXTEND)) rb_str_buf_cat2(str, "x");
options           532 re.c               if (RREGEXP(re)->ptr->options & ONIG_OPTION_IGNORECASE) return Qtrue;
options           563 re.c               int options = rb_reg_options(re);
options           564 re.c               return INT2NUM(options);
options           804 re.c           	RREGEXP(re)->ptr->options |= ONIG_OPTION_IGNORECASE;
options           809 re.c           	RREGEXP(re)->ptr->options &= ~ONIG_OPTION_IGNORECASE;
options           833 re.c           			   reg->options, onigenc_get_default_encoding(),
options          1313 re.c               switch (options & ~0xf) {
options          1332 re.c               if (options & ~0xf) {
options          1336 re.c           	options |= ONIG_OPTION_IGNORECASE;
options          1339 re.c               re->ptr = make_regexp(s, len, options & 0xf, ce);
options          1344 re.c               if (options & ~0xf) {
options          1367 re.c               rb_reg_initialize(re, s, len, options, Qfalse);
options          1376 re.c               rb_reg_initialize(re, s, len, options, Qtrue);
options          1423 re.c               hashval = RREGEXP(re)->ptr->options;
options          1458 re.c           	RREGEXP(re1)->ptr->options == RREGEXP(re2)->ptr->options) {
options          1657 re.c           	flags = RREGEXP(argv[0])->ptr->options & 0xf;
options          1864 re.c               int options;
options          1867 re.c               options = RREGEXP(re)->ptr->options &
options          1870 re.c           	options |= rb_reg_get_kcode(re);
options          1872 re.c               return options;
options           778 regcomp.c            if (IS_MULTILINE(reg->options))
options           786 regcomp.c            if (IS_MULTILINE(reg->options))
options           895 regcomp.c        OnigOptionType prev = reg->options;
options           897 regcomp.c        reg->options = node->option;
options           899 regcomp.c        reg->options = prev;
options           915 regcomp.c        OnigOptionType prev = reg->options;
options           926 regcomp.c        reg->options = node->option;
options           928 regcomp.c        reg->options = prev;
options          1272 regcomp.c      	r = ((!IS_IGNORECASE(reg->options) && br->back_static[0] <= 3)
options          1376 regcomp.c          if (IS_MULTILINE(reg->options))
options          1389 regcomp.c      	if (IS_IGNORECASE(reg->options)) {
options          1410 regcomp.c              if (IS_IGNORECASE(reg->options)) {
options          2364 regcomp.c      	  !NSTRING_IS_RAW(node) && IS_IGNORECASE(reg->options)) {
options          2396 regcomp.c      	  OnigOptionType options = reg->options;
options          2398 regcomp.c      	  reg->options = NEFFECT(node).option;
options          2400 regcomp.c      	  reg->options = options;
options          3094 regcomp.c          if (IS_IGNORECASE(reg->options) && !NSTRING_IS_RAW(node)) {
options          3211 regcomp.c      	  OnigOptionType options = reg->options;
options          3212 regcomp.c      	  reg->options = NEFFECT(node).option;
options          3214 regcomp.c      	  reg->options = options;
options          3343 regcomp.c        OnigOptionType  options;
options          4179 regcomp.c            OnigOptionType save = env->options;
options          4180 regcomp.c            env->options = NEFFECT(NCALL(node).target).option;
options          4182 regcomp.c            env->options = save;
options          4200 regcomp.c      	  if (IS_POSIXLINE(env->options))
options          4247 regcomp.c      	  OnigOptionType save = env->options;
options          4249 regcomp.c      	  env->options = en->option;
options          4251 regcomp.c      	  env->options = save;
options          4385 regcomp.c        env.options    = reg->options;
options          4764 regcomp.c            !ONIG_IS_OPTION_ON(reg->options, ONIG_OPTION_CAPTURE_GROUP)) {
options          4802 regcomp.c        if (IS_FIND_CONDITION(reg->options))
options          4914 regcomp.c          option |= syntax->options;
options          4918 regcomp.c          option |= syntax->options;
options          4921 regcomp.c        (*reg)->options          = option;
options           362 regexec.c        OnigOptionType options;
options           369 regexec.c        (msa).options = (arg_option);\
options          1209 regexec.c        OnigOptionType option = reg->options;
options          1277 regexec.c      	  if (IS_POSIX_REGION(msa->options)) {
options          1922 regexec.c      	if (IS_NOTBOL(msa->options)) goto fail;
options          1938 regexec.c      	  if (IS_NOTEOL(msa->options)) goto fail;
options          1957 regexec.c      	  if (IS_NOTEOL(msa->options)) goto fail;   /* Is it needed? */
options          3461 regexec.c        if (IS_FIND_NOT_EMPTY(reg->options) && region
options          3500 regexec.c        return reg->options;
options          5160 regparse.c       env->option      = reg->options;
options          2829 win32/win32.c      if (options == WNOHANG) {
options           126 wince/wince.h  	DWORD access, BOOL inherit, DWORD options);


or_code_range_buf

or_code_range_buf 1928 regparse.c           r = or_code_range_buf(enc, buf1, 0, buf2, 0, &pbuf);
or_code_range_buf 1989 regparse.c           r = or_code_range_buf(enc, buf1, not1, buf2, not2, &pbuf);


ossl_ASN1_TYPE_free

ossl_ASN1_TYPE_free  939 ext/openssl/ossl_asn1.c 	ossl_ASN1_TYPE_free(asn1);
ossl_ASN1_TYPE_free  954 ext/openssl/ossl_asn1.c     ossl_ASN1_TYPE_free(asn1);


ossl_asn1_decode0

ossl_asn1_decode0  756 ext/openssl/ossl_asn1.c 		value = ossl_asn1_decode0(&p, length, &off, depth+1, 0, yield);
ossl_asn1_decode0  759 ext/openssl/ossl_asn1.c 	    else value = ossl_asn1_decode0(&p, len, &off, depth+1, 0, yield);
ossl_asn1_decode0  828 ext/openssl/ossl_asn1.c     ossl_asn1_decode0(&p, RSTRING(tmp)->len, &offset, 0, 0, 1);
ossl_asn1_decode0  844 ext/openssl/ossl_asn1.c     ary = ossl_asn1_decode0(&p, RSTRING(tmp)->len, &offset, 0, 1, 0);
ossl_asn1_decode0  861 ext/openssl/ossl_asn1.c     ret = ossl_asn1_decode0(&p, RSTRING(tmp)->len, &offset, 0, 0, 0);


ossl_asn1_default_tag

ossl_asn1_default_tag  488 ext/openssl/ossl_asn1.c static int ossl_asn1_default_tag(VALUE obj);
ossl_asn1_default_tag  499 ext/openssl/ossl_asn1.c     tag = ossl_asn1_default_tag(obj);
ossl_asn1_default_tag  887 ext/openssl/ossl_asn1.c 	tag = INT2NUM(ossl_asn1_default_tag(self));
ossl_asn1_default_tag  970 ext/openssl/ossl_asn1.c     tag = ossl_asn1_default_tag(self);


ossl_asn1_get_asn1type

ossl_asn1_get_asn1type  935 ext/openssl/ossl_asn1.c     asn1 = ossl_asn1_get_asn1type(self);
ossl_asn1_get_asn1type   55 ext/openssl/ossl_asn1.h ASN1_TYPE *ossl_asn1_get_asn1type(VALUE);
ossl_asn1_get_asn1type  165 ext/openssl/ossl_x509attr.c     if(!(a1type = ossl_asn1_get_asn1type(value)))


ossl_asn1_get_tag

ossl_asn1_get_tag  588 ext/openssl/ossl_asn1.c     tag = ossl_asn1_get_tag(obj);
ossl_asn1_get_tag  932 ext/openssl/ossl_asn1.c     tn = NUM2INT(ossl_asn1_get_tag(self));
ossl_asn1_get_tag  971 ext/openssl/ossl_asn1.c     tn = NUM2INT(ossl_asn1_get_tag(self));


ossl_asn1_get_value

ossl_asn1_get_value  500 ext/openssl/ossl_asn1.c     value = ossl_asn1_get_value(obj);
ossl_asn1_get_value  693 ext/openssl/ossl_asn1.c     value = ossl_asn1_get_value(self);
ossl_asn1_get_value  974 ext/openssl/ossl_asn1.c     value = join_der(ossl_asn1_get_value(self));
ossl_asn1_get_value  999 ext/openssl/ossl_asn1.c     rb_ary_each(ossl_asn1_get_value(self));
ossl_asn1_get_value 1022 ext/openssl/ossl_asn1.c     val = ossl_asn1_get_value(self);
ossl_asn1_get_value 1035 ext/openssl/ossl_asn1.c     val = ossl_asn1_get_value(self);
ossl_asn1_get_value 1049 ext/openssl/ossl_asn1.c     val = ossl_asn1_get_value(self);


ossl_asn1_initialize

ossl_asn1_initialize 1119 ext/openssl/ossl_asn1.c     rb_define_method(cASN1Primitive, "initialize", ossl_asn1_initialize, -1);
ossl_asn1_initialize 1125 ext/openssl/ossl_asn1.c     rb_define_method(cASN1Constructive, "initialize", ossl_asn1_initialize, -1);


ossl_asn1_is_explicit

ossl_asn1_is_explicit  934 ext/openssl/ossl_asn1.c     explicit = ossl_asn1_is_explicit(self);
ossl_asn1_is_explicit  973 ext/openssl/ossl_asn1.c     explicit = ossl_asn1_is_explicit(self);


ossl_asn1_set_tag

ossl_asn1_set_tag  661 ext/openssl/ossl_asn1.c     ossl_asn1_set_tag(self, tag);
ossl_asn1_set_tag  891 ext/openssl/ossl_asn1.c     ossl_asn1_set_tag(self, tag);


ossl_asn1_set_tag_class

ossl_asn1_set_tag_class  663 ext/openssl/ossl_asn1.c     ossl_asn1_set_tag_class(self, tag_class);
ossl_asn1_set_tag_class  894 ext/openssl/ossl_asn1.c     ossl_asn1_set_tag_class(self, tag_class);


ossl_asn1_set_value

ossl_asn1_set_value  662 ext/openssl/ossl_asn1.c     ossl_asn1_set_value(self, value);
ossl_asn1_set_value  892 ext/openssl/ossl_asn1.c     ossl_asn1_set_value(self, value);


ossl_asn1_tag_class

ossl_asn1_tag_class  701 ext/openssl/ossl_asn1.c     tag_class = ossl_asn1_tag_class(self);
ossl_asn1_tag_class  933 ext/openssl/ossl_asn1.c     tc = ossl_asn1_tag_class(self);
ossl_asn1_tag_class  972 ext/openssl/ossl_asn1.c     tc = ossl_asn1_tag_class(self);


ossl_bn_copy

ossl_bn_copy      614 ext/openssl/ossl_bn.c     rb_define_copy_func(cBN, ossl_bn_copy);
ossl_bn_copy      615 ext/openssl/ossl_bn.c     rb_define_method(cBN, "copy", ossl_bn_copy, 1);


ossl_bn_new

ossl_bn_new       114 ext/openssl/ossl_asn1.c     num = ossl_bn_new(bn);
ossl_bn_new        17 ext/openssl/ossl_bn.h VALUE ossl_bn_new(BIGNUM *);
ossl_bn_new        90 ext/openssl/ossl_pkey.h 	return ossl_bn_new(bn);						\
ossl_bn_new       239 ext/openssl/ossl_pkey_dh.c     rb_hash_aset(hash, rb_str_new2("p"), ossl_bn_new(pkey->pkey.dh->p));
ossl_bn_new       240 ext/openssl/ossl_pkey_dh.c     rb_hash_aset(hash, rb_str_new2("g"), ossl_bn_new(pkey->pkey.dh->g));
ossl_bn_new       241 ext/openssl/ossl_pkey_dh.c     rb_hash_aset(hash, rb_str_new2("pub_key"), ossl_bn_new(pkey->pkey.dh->pub_key));
ossl_bn_new       242 ext/openssl/ossl_pkey_dh.c     rb_hash_aset(hash, rb_str_new2("priv_key"), ossl_bn_new(pkey->pkey.dh->priv_key));
ossl_bn_new       267 ext/openssl/ossl_pkey_dsa.c     rb_hash_aset(hash, rb_str_new2("p"), ossl_bn_new(pkey->pkey.dsa->p));
ossl_bn_new       268 ext/openssl/ossl_pkey_dsa.c     rb_hash_aset(hash, rb_str_new2("q"), ossl_bn_new(pkey->pkey.dsa->q));
ossl_bn_new       269 ext/openssl/ossl_pkey_dsa.c     rb_hash_aset(hash, rb_str_new2("g"), ossl_bn_new(pkey->pkey.dsa->g));
ossl_bn_new       270 ext/openssl/ossl_pkey_dsa.c     rb_hash_aset(hash, rb_str_new2("pub_key"), ossl_bn_new(pkey->pkey.dsa->pub_key));
ossl_bn_new       271 ext/openssl/ossl_pkey_dsa.c     rb_hash_aset(hash, rb_str_new2("priv_key"), ossl_bn_new(pkey->pkey.dsa->priv_key));
ossl_bn_new       358 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("n"), ossl_bn_new(pkey->pkey.rsa->n));
ossl_bn_new       359 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("e"), ossl_bn_new(pkey->pkey.rsa->e));
ossl_bn_new       360 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("d"), ossl_bn_new(pkey->pkey.rsa->d));
ossl_bn_new       361 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("p"), ossl_bn_new(pkey->pkey.rsa->p));
ossl_bn_new       362 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("q"), ossl_bn_new(pkey->pkey.rsa->q));
ossl_bn_new       363 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("dmp1"), ossl_bn_new(pkey->pkey.rsa->dmp1));
ossl_bn_new       364 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("dmq1"), ossl_bn_new(pkey->pkey.rsa->dmq1));
ossl_bn_new       365 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("iqmp"), ossl_bn_new(pkey->pkey.rsa->iqmp));


ossl_bn_to_i

ossl_bn_to_i      225 ext/openssl/ossl_bn.c 	self = ossl_bn_to_i(self);
ossl_bn_to_i      692 ext/openssl/ossl_bn.c     rb_define_method(cBN, "to_i", ossl_bn_to_i, 0);


ossl_bn_to_s

ossl_bn_to_s      221 ext/openssl/ossl_bn.c 	self = ossl_bn_to_s(0, NULL, self);
ossl_bn_to_s      691 ext/openssl/ossl_bn.c     rb_define_method(cBN, "to_s", ossl_bn_to_s, -1);


ossl_buf2str

ossl_buf2str      116 ext/openssl/ossl.h VALUE ossl_buf2str(char *buf, int len);
ossl_buf2str      359 ext/openssl/ossl_asn1.c     ret = ossl_buf2str(buf, len);
ossl_buf2str      957 ext/openssl/ossl_asn1.c     str = ossl_buf2str(buf, reallen); /* buf will be free in ossl_buf2str */
ossl_buf2str      179 ext/openssl/ossl_bn.c 	str = ossl_buf2str(buf, strlen(buf));
ossl_buf2str      183 ext/openssl/ossl_bn.c 	str = ossl_buf2str(buf, strlen(buf));
ossl_buf2str      170 ext/openssl/ossl_digest.c     digest = ossl_buf2str(buf, buf_len);
ossl_buf2str      190 ext/openssl/ossl_digest.c     hexdigest = ossl_buf2str(hexbuf, 2 * buf_len);
ossl_buf2str      129 ext/openssl/ossl_hmac.c     digest = ossl_buf2str(buf, buf_len);
ossl_buf2str      149 ext/openssl/ossl_hmac.c     hexdigest = ossl_buf2str(hexbuf, 2 * buf_len);
ossl_buf2str      183 ext/openssl/ossl_hmac.c     hexdigest = ossl_buf2str(hexbuf, 2 * buf_len);
ossl_buf2str      108 ext/openssl/ossl_ns_spki.c     str = ossl_buf2str(data, strlen(data));


ossl_call_verify_cb_proc

ossl_call_verify_cb_proc  220 ext/openssl/ossl.c 	    ret = rb_ensure(ossl_call_verify_cb_proc, (VALUE)&args,
ossl_call_verify_cb_proc  148 ext/openssl/ossl.h VALUE ossl_call_verify_cb_proc(struct ossl_verify_cb_args *);


ossl_cipher_alloc

ossl_cipher_alloc   33 ext/openssl/ossl_cipher.c static VALUE ossl_cipher_alloc(VALUE klass);
ossl_cipher_alloc   54 ext/openssl/ossl_cipher.c     ret = ossl_cipher_alloc(cCipher);
ossl_cipher_alloc  353 ext/openssl/ossl_cipher.c     rb_define_alloc_func(cCipher, ossl_cipher_alloc);


ossl_cipher_init

ossl_cipher_init  178 ext/openssl/ossl_cipher.c     return ossl_cipher_init(argc, argv, self, 1);
ossl_cipher_init  184 ext/openssl/ossl_cipher.c     return ossl_cipher_init(argc, argv, self, 0);


ossl_cipher_new

ossl_cipher_new    19 ext/openssl/ossl_cipher.h VALUE ossl_cipher_new(const EVP_CIPHER *);
ossl_cipher_new   186 ext/openssl/ossl_engine.c     return ossl_cipher_new(ciph);


ossl_config_add_value

ossl_config_add_value  240 ext/openssl/ossl_config.c     ossl_config_add_value(arg[0], arg[1], name, value);
ossl_config_add_value  451 ext/openssl/ossl_config.c     rb_define_method(cConfig, "add_value", ossl_config_add_value, 3);


ossl_config_get_section

ossl_config_get_section  289 ext/openssl/ossl_config.c     return ossl_config_get_section(self, section);
ossl_config_get_section  452 ext/openssl/ossl_config.c     rb_define_method(cConfig, "[]", ossl_config_get_section, 1);


ossl_config_get_sections

ossl_config_get_sections  420 ext/openssl/ossl_config.c     VALUE str, ary = ossl_config_get_sections(self);
ossl_config_get_sections  455 ext/openssl/ossl_config.c     rb_define_method(cConfig, "sections", ossl_config_get_sections, 0);


ossl_config_get_value

ossl_config_get_value  229 ext/openssl/ossl_config.c     return ossl_config_get_value(self, section, name);
ossl_config_get_value  449 ext/openssl/ossl_config.c     rb_define_method(cConfig, "get_value", ossl_config_get_value, 2);


ossl_create_dh

ossl_create_dh    442 ext/openssl/ossl_pkey_dh.c     OSSL_DEFAULT_DH_512 = ossl_create_dh(
ossl_create_dh    445 ext/openssl/ossl_pkey_dh.c     OSSL_DEFAULT_DH_1024 = ossl_create_dh(


ossl_debug

ossl_debug        182 ext/openssl/ossl.h void ossl_debug(const char *, ...);
ossl_debug        183 ext/openssl/ossl.h #define OSSL_Debug ossl_debug


ossl_dh_new

ossl_dh_new        56 ext/openssl/ossl_pkey.c 	return ossl_dh_new(pkey);
ossl_dh_new        77 ext/openssl/ossl_pkey.h VALUE ossl_dh_new(EVP_PKEY *);


ossl_digest_alloc

ossl_digest_alloc   31 ext/openssl/ossl_digest.c static VALUE ossl_digest_alloc(VALUE klass);
ossl_digest_alloc   52 ext/openssl/ossl_digest.c     ret = ossl_digest_alloc(cDigest);
ossl_digest_alloc  273 ext/openssl/ossl_digest.c     rb_define_alloc_func(cDigest, ossl_digest_alloc);


ossl_digest_digest

ossl_digest_digest  202 ext/openssl/ossl_digest.c     return ossl_digest_digest(obj);
ossl_digest_digest  222 ext/openssl/ossl_digest.c 	str2 = ossl_digest_digest(other);
ossl_digest_digest  229 ext/openssl/ossl_digest.c 	str1 = ossl_digest_digest(self);
ossl_digest_digest  282 ext/openssl/ossl_digest.c     rb_define_method(cDigest, "digest", ossl_digest_digest, 0);


ossl_digest_hexdigest

ossl_digest_hexdigest  212 ext/openssl/ossl_digest.c     return ossl_digest_hexdigest(obj);
ossl_digest_hexdigest  231 ext/openssl/ossl_digest.c 	str1 = ossl_digest_hexdigest(self);
ossl_digest_hexdigest  283 ext/openssl/ossl_digest.c     rb_define_method(cDigest, "hexdigest", ossl_digest_hexdigest, 0);


ossl_digest_new

ossl_digest_new    19 ext/openssl/ossl_digest.h VALUE ossl_digest_new(const EVP_MD *);
ossl_digest_new   209 ext/openssl/ossl_engine.c     return ossl_digest_new(md);


ossl_digest_update

ossl_digest_update   78 ext/openssl/ossl_digest.c VALUE ossl_digest_update(VALUE, VALUE);
ossl_digest_update  100 ext/openssl/ossl_digest.c     if (!NIL_P(data)) return ossl_digest_update(self, data);
ossl_digest_update  200 ext/openssl/ossl_digest.c     ossl_digest_update(obj, data);
ossl_digest_update  210 ext/openssl/ossl_digest.c     ossl_digest_update(obj, data);
ossl_digest_update  287 ext/openssl/ossl_digest.c     rb_define_method(cDigest, "update", ossl_digest_update, 1);


ossl_dsa_new

ossl_dsa_new       52 ext/openssl/ossl_pkey.c 	return ossl_dsa_new(pkey);
ossl_dsa_new       66 ext/openssl/ossl_pkey.h VALUE ossl_dsa_new(EVP_PKEY *);


ossl_engine_get_id

ossl_engine_get_id  334 ext/openssl/ossl_engine.c     rb_str_append(str, ossl_engine_get_id(self));
ossl_engine_get_id  357 ext/openssl/ossl_engine.c     rb_define_method(cEngine, "id", ossl_engine_get_id, 0);


ossl_engine_get_name

ossl_engine_get_name  336 ext/openssl/ossl_engine.c     rb_str_append(str, ossl_engine_get_name(self));
ossl_engine_get_name  358 ext/openssl/ossl_engine.c     rb_define_method(cEngine, "name", ossl_engine_get_name, 0);


ossl_engine_s_load

ossl_engine_s_load  114 ext/openssl/ossl_engine.c     ossl_engine_s_load(1, &id, klass);
ossl_engine_s_load  351 ext/openssl/ossl_engine.c     rb_define_singleton_method(cEngine, "load", ossl_engine_s_load, -1);


ossl_generate_cb

ossl_generate_cb   41 ext/openssl/ossl_pkey.h void ossl_generate_cb(int, int, void *);
ossl_generate_cb   90 ext/openssl/ossl_pkey_dh.c 	    rb_block_given_p() ? ossl_generate_cb : NULL,
ossl_generate_cb   90 ext/openssl/ossl_pkey_dsa.c 	    rb_block_given_p() ? ossl_generate_cb : NULL,
ossl_generate_cb   83 ext/openssl/ossl_pkey_rsa.c 	    rb_block_given_p() ? ossl_generate_cb : NULL,


ossl_i2d_ASN1_TYPE

ossl_i2d_ASN1_TYPE  937 ext/openssl/ossl_asn1.c     length = ASN1_object_size(1, ossl_i2d_ASN1_TYPE(asn1, NULL), tn);
ossl_i2d_ASN1_TYPE  943 ext/openssl/ossl_asn1.c     if(tc == V_ASN1_UNIVERSAL) ossl_i2d_ASN1_TYPE(asn1, &p);
ossl_i2d_ASN1_TYPE  946 ext/openssl/ossl_asn1.c 	    ASN1_put_object(&p, 1, ossl_i2d_ASN1_TYPE(asn1, NULL), tn, tc);
ossl_i2d_ASN1_TYPE  947 ext/openssl/ossl_asn1.c 	    ossl_i2d_ASN1_TYPE(asn1, &p);
ossl_i2d_ASN1_TYPE  950 ext/openssl/ossl_asn1.c 	    ossl_i2d_ASN1_TYPE(asn1, &p);


ossl_membio2str

ossl_membio2str   420 ext/openssl/ossl_asn1.c 	ret = ossl_membio2str(bio);
ossl_membio2str    17 ext/openssl/ossl_bio.h VALUE ossl_membio2str(BIO*);
ossl_membio2str   151 ext/openssl/ossl_pkcs7.c     data = out ? ossl_membio2str(out) : Qnil;
ossl_membio2str   185 ext/openssl/ossl_pkcs7.c     str = ossl_membio2str(out);
ossl_membio2str   672 ext/openssl/ossl_pkcs7.c     data = ossl_membio2str(out);
ossl_membio2str   701 ext/openssl/ossl_pkcs7.c     str = ossl_membio2str(out); /* out will be free */
ossl_membio2str   775 ext/openssl/ossl_pkcs7.c     str = ossl_membio2str(out);
ossl_membio2str   199 ext/openssl/ossl_pkey_dh.c     str = ossl_membio2str(out);
ossl_membio2str   267 ext/openssl/ossl_pkey_dh.c     str = ossl_membio2str(out);
ossl_membio2str   222 ext/openssl/ossl_pkey_dsa.c     str = ossl_membio2str(out);
ossl_membio2str   296 ext/openssl/ossl_pkey_dsa.c     str = ossl_membio2str(out);
ossl_membio2str   217 ext/openssl/ossl_pkey_rsa.c     str = ossl_membio2str(out);
ossl_membio2str   390 ext/openssl/ossl_pkey_rsa.c     str = ossl_membio2str(out);
ossl_membio2str   145 ext/openssl/ossl_x509attr.c 	ret = ossl_membio2str(out);
ossl_membio2str   207 ext/openssl/ossl_x509cert.c     str = ossl_membio2str(out);
ossl_membio2str   228 ext/openssl/ossl_x509cert.c     str = ossl_membio2str(out);
ossl_membio2str   320 ext/openssl/ossl_x509cert.c     str = ossl_membio2str(out);
ossl_membio2str   368 ext/openssl/ossl_x509ext.c 	ret = ossl_membio2str(out);
ossl_membio2str   386 ext/openssl/ossl_x509ext.c     ret = ossl_membio2str(out);
ossl_membio2str   197 ext/openssl/ossl_x509name.c     str = ossl_membio2str(out);


ossl_membio2str0

ossl_membio2str0   72 ext/openssl/ossl_bio.c     return rb_protect((VALUE(*)_((VALUE)))ossl_membio2str0, (VALUE)bio, status);
ossl_membio2str0   16 ext/openssl/ossl_bio.h VALUE ossl_membio2str0(BIO*);


ossl_obj2bio

ossl_obj2bio       53 ext/openssl/ossl_bio.c      ret = (BIO*)rb_protect((VALUE(*)_((VALUE)))ossl_obj2bio, obj, status);
ossl_obj2bio       14 ext/openssl/ossl_bio.h BIO *ossl_obj2bio(VALUE);
ossl_obj2bio       73 ext/openssl/ossl_config.c     bio = ossl_obj2bio(str);
ossl_obj2bio       91 ext/openssl/ossl_pkcs12.c     in = ossl_obj2bio(arg);
ossl_obj2bio      146 ext/openssl/ossl_pkcs7.c     in = ossl_obj2bio(arg);
ossl_obj2bio      174 ext/openssl/ossl_pkcs7.c     in = NIL_P(data) ? NULL : ossl_obj2bio(data);
ossl_obj2bio      206 ext/openssl/ossl_pkcs7.c     in = ossl_obj2bio(data);
ossl_obj2bio      257 ext/openssl/ossl_pkcs7.c     in = ossl_obj2bio(data);
ossl_obj2bio      300 ext/openssl/ossl_pkcs7.c     in = ossl_obj2bio(arg);
ossl_obj2bio      652 ext/openssl/ossl_pkcs7.c     in = NIL_P(indata) ? NULL : ossl_obj2bio(indata);
ossl_obj2bio      714 ext/openssl/ossl_pkcs7.c     in = ossl_obj2bio(data);
ossl_obj2bio      145 ext/openssl/ossl_pkey_dh.c 	in = ossl_obj2bio(arg);
ossl_obj2bio      137 ext/openssl/ossl_pkey_dsa.c 	in = ossl_obj2bio(arg);
ossl_obj2bio      127 ext/openssl/ossl_pkey_rsa.c 	in = ossl_obj2bio(arg);
ossl_obj2bio      140 ext/openssl/ossl_x509cert.c     in = ossl_obj2bio(arg);
ossl_obj2bio      101 ext/openssl/ossl_x509crl.c     in = ossl_obj2bio(arg);
ossl_obj2bio      109 ext/openssl/ossl_x509req.c     in = ossl_obj2bio(arg);


ossl_pem_passwd_cb

ossl_pem_passwd_cb  129 ext/openssl/ossl.h int ossl_pem_passwd_cb(char *, int, int, void *);
ossl_pem_passwd_cb  122 ext/openssl/ossl_engine.c 		0, NULL, (void(*)())ossl_pem_passwd_cb);
ossl_pem_passwd_cb   75 ext/openssl/ossl_pkey.c     pkey = PEM_read_PrivateKey(fp, NULL, ossl_pem_passwd_cb, NULL);
ossl_pem_passwd_cb  138 ext/openssl/ossl_pkey_dsa.c 	dsa = PEM_read_bio_DSAPrivateKey(in, NULL, ossl_pem_passwd_cb, passwd);
ossl_pem_passwd_cb  212 ext/openssl/ossl_pkey_dsa.c 					 NULL, 0, ossl_pem_passwd_cb, passwd)){
ossl_pem_passwd_cb  128 ext/openssl/ossl_pkey_rsa.c 	rsa = PEM_read_bio_RSAPrivateKey(in, NULL, ossl_pem_passwd_cb, passwd);
ossl_pem_passwd_cb  207 ext/openssl/ossl_pkey_rsa.c 					 NULL, 0, ossl_pem_passwd_cb, passwd)) {


ossl_pkcs7_add_certificate

ossl_pkcs7_add_certificate  575 ext/openssl/ossl_pkcs7.c     return ossl_pkcs7_add_certificate(arg, i);
ossl_pkcs7_add_certificate  951 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7, "add_certificate", ossl_pkcs7_add_certificate, 1);


ossl_pkcs7_add_crl

ossl_pkcs7_add_crl  615 ext/openssl/ossl_pkcs7.c     return ossl_pkcs7_add_crl(arg, i);
ossl_pkcs7_add_crl  954 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7, "add_crl", ossl_pkcs7_add_crl, 1);


ossl_pkcs7_get_data

ossl_pkcs7_get_data  170 ext/openssl/ossl_pkcs7.c     if(NIL_P(data)) data = ossl_pkcs7_get_data(pkcs7);
ossl_pkcs7_get_data  651 ext/openssl/ossl_pkcs7.c     if(NIL_P(indata)) indata = ossl_pkcs7_get_data(self);


ossl_pkcs7_set_data

ossl_pkcs7_set_data  153 ext/openssl/ossl_pkcs7.c     ossl_pkcs7_set_data(ret, data);
ossl_pkcs7_set_data  221 ext/openssl/ossl_pkcs7.c     ossl_pkcs7_set_data(ret, data);
ossl_pkcs7_set_data  270 ext/openssl/ossl_pkcs7.c     ossl_pkcs7_set_data(ret, data);
ossl_pkcs7_set_data  307 ext/openssl/ossl_pkcs7.c     ossl_pkcs7_set_data(self, Qnil);
ossl_pkcs7_set_data  673 ext/openssl/ossl_pkcs7.c     ossl_pkcs7_set_data(self, data);
ossl_pkcs7_set_data  728 ext/openssl/ossl_pkcs7.c     ossl_pkcs7_set_data(self, Qnil);


ossl_pkcs7_set_err_string

ossl_pkcs7_set_err_string  154 ext/openssl/ossl_pkcs7.c     ossl_pkcs7_set_err_string(ret, Qnil);
ossl_pkcs7_set_err_string  222 ext/openssl/ossl_pkcs7.c     ossl_pkcs7_set_err_string(ret, Qnil);
ossl_pkcs7_set_err_string  308 ext/openssl/ossl_pkcs7.c     ossl_pkcs7_set_err_string(self, Qnil);
ossl_pkcs7_set_err_string  671 ext/openssl/ossl_pkcs7.c     ossl_pkcs7_set_err_string(self, msg ? rb_str_new2(msg) : Qnil);


ossl_pkey_new

ossl_pkey_new     233 ext/openssl/ossl_engine.c     obj = ossl_pkey_new(pkey);
ossl_pkey_new     258 ext/openssl/ossl_engine.c     return ossl_pkey_new(pkey);
ossl_pkey_new     147 ext/openssl/ossl_ns_spki.c     return ossl_pkey_new(pkey); /* NO DUP - OK */
ossl_pkey_new      98 ext/openssl/ossl_pkcs12.c     pkey = rb_protect((VALUE(*)_((VALUE)))ossl_pkey_new, (VALUE)key,
ossl_pkey_new      81 ext/openssl/ossl_pkey.c     return ossl_pkey_new(pkey);
ossl_pkey_new      43 ext/openssl/ossl_pkey.h VALUE ossl_pkey_new(EVP_PKEY *);
ossl_pkey_new     448 ext/openssl/ossl_x509cert.c     return ossl_pkey_new(pkey); /* NO DUP - OK */
ossl_pkey_new     316 ext/openssl/ossl_x509req.c     return ossl_pkey_new(pkey); /* NO DUP - OK */


ossl_protect_membio2str

ossl_protect_membio2str   81 ext/openssl/ossl_bio.c     ret = ossl_protect_membio2str(bio, &status);
ossl_protect_membio2str   18 ext/openssl/ossl_bio.h VALUE ossl_protect_membio2str(BIO*,int*);


ossl_raise

ossl_raise         60 ext/openssl/ossl.c     if (!sk) ossl_raise(eOSSLError, NULL);
ossl_raise         66 ext/openssl/ossl.c             ossl_raise(eOSSLError, "object not X509 cert in array");
ossl_raise         85 ext/openssl/ossl.h     ossl_raise(rb_eTypeError, "wrong argument (%s)! (Expected kind of %s)",\
ossl_raise         92 ext/openssl/ossl.h     ossl_raise(rb_eTypeError, "wrong argument (%s)! (Expected instance of %s)",\
ossl_raise         99 ext/openssl/ossl.h     ossl_raise(rb_eTypeError, "wrong argument type");\
ossl_raise        135 ext/openssl/ossl.h NORETURN(void ossl_raise(VALUE, const char *, ...));
ossl_raise         38 ext/openssl/ossl_asn1.c 	    ossl_raise(rb_eTypeError, "bad UTCTIME format");
ossl_raise         49 ext/openssl/ossl_asn1.c 	    ossl_raise(rb_eTypeError, "bad GENERALIZEDTIME format" );
ossl_raise        101 ext/openssl/ossl_asn1.c 	ossl_raise(rb_eTypeError, "ASN1_INTEGER is NULL!");
ossl_raise        104 ext/openssl/ossl_asn1.c 	ossl_raise(eOSSLError, NULL);
ossl_raise        109 ext/openssl/ossl_asn1.c 	ossl_raise(eOSSLError, NULL);
ossl_raise        132 ext/openssl/ossl_asn1.c 	    ossl_raise(eOSSLError, NULL);
ossl_raise        137 ext/openssl/ossl_asn1.c 	ossl_raise(eOSSLError, NULL);
ossl_raise        149 ext/openssl/ossl_asn1.c 	ossl_raise(eOSSLError, NULL);
ossl_raise        216 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
ossl_raise        231 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
ossl_raise        243 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, "nil expected");
ossl_raise        245 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
ossl_raise        258 ext/openssl/ossl_asn1.c     if(!a1obj) ossl_raise(eASN1Error, "invalid OBJECT ID");
ossl_raise        271 ext/openssl/ossl_asn1.c         ossl_raise(eASN1Error, NULL);
ossl_raise        284 ext/openssl/ossl_asn1.c         ossl_raise(eASN1Error, NULL);
ossl_raise        297 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
ossl_raise        314 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
ossl_raise        329 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
ossl_raise        348 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
ossl_raise        352 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
ossl_raise        374 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
ossl_raise        391 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
ossl_raise        408 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
ossl_raise        416 ext/openssl/ossl_asn1.c 	    ossl_raise(eASN1Error, NULL);
ossl_raise        436 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
ossl_raise        554 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, "unsupported ASN.1 type");
ossl_raise        558 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, "ASN1_TYPE alloc failure");
ossl_raise        577 ext/openssl/ossl_asn1.c     ossl_raise(eASN1Error, "universal tag for %s not found",
ossl_raise        590 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, "tag number not specified");
ossl_raise        610 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, "invalid tag default");
ossl_raise        635 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, "invalid tag class");
ossl_raise        658 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, "invalid tag class");
ossl_raise        660 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, "tag number for Universal too large");
ossl_raise        703 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
ossl_raise        728 ext/openssl/ossl_asn1.c 	if(j & 0x80) ossl_raise(eASN1Error, NULL);
ossl_raise        743 ext/openssl/ossl_asn1.c 	if(len > length) ossl_raise(eASN1Error, "value is too short");
ossl_raise        874 ext/openssl/ossl_asn1.c 	    ossl_raise(eASN1Error, "must specify tag number");
ossl_raise        878 ext/openssl/ossl_asn1.c 	    ossl_raise(eASN1Error, "invalid tag default");
ossl_raise        882 ext/openssl/ossl_asn1.c 	    ossl_raise(eASN1Error, "invalid tag class");
ossl_raise        884 ext/openssl/ossl_asn1.c 	    ossl_raise(eASN1Error, "tag number for Universal too large");
ossl_raise        940 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, "cannot alloc buffer");
ossl_raise       1011 ext/openssl/ossl_asn1.c 	ossl_raise(eASN1Error, NULL);
ossl_raise         37 ext/openssl/ossl_bio.c 	    ossl_raise(eOSSLError, NULL);
ossl_raise         43 ext/openssl/ossl_bio.c 	if (!bio) ossl_raise(eOSSLError, NULL);
ossl_raise         16 ext/openssl/ossl_bn.c     ossl_raise(rb_eRuntimeError, "BN wasn't initialized!"); \
ossl_raise         24 ext/openssl/ossl_bn.c     ossl_raise(rb_eRuntimeError, "BN wasn't initialized!"); \
ossl_raise         50 ext/openssl/ossl_bn.c 	ossl_raise(eBNError, NULL);
ossl_raise         69 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);
ossl_raise         74 ext/openssl/ossl_bn.c 	ossl_raise(rb_eTypeError, "Cannot convert into OpenSSL::BN");
ossl_raise         96 ext/openssl/ossl_bn.c 	ossl_raise(eBNError, NULL);
ossl_raise        120 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);
ossl_raise        128 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);
ossl_raise        133 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);
ossl_raise        138 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);
ossl_raise        143 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);
ossl_raise        147 ext/openssl/ossl_bn.c 	ossl_raise(rb_eArgError, "illegal radix %d", base);
ossl_raise        169 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);
ossl_raise        175 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);
ossl_raise        178 ext/openssl/ossl_bn.c 	if (!(buf = BN_bn2dec(bn))) ossl_raise(eBNError, NULL);
ossl_raise        182 ext/openssl/ossl_bn.c 	if (!(buf = BN_bn2hex(bn))) ossl_raise(eBNError, NULL);
ossl_raise        186 ext/openssl/ossl_bn.c 	ossl_raise(rb_eArgError, "illegal radix %d", base);
ossl_raise        202 ext/openssl/ossl_bn.c 	ossl_raise(eBNError, NULL);
ossl_raise        229 ext/openssl/ossl_bn.c 	    ossl_raise(rb_eTypeError, "Don't know how to coerce");
ossl_raise        258 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);			\
ossl_raise        262 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);			\
ossl_raise        277 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);			\
ossl_raise        281 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);			\
ossl_raise        297 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);				\
ossl_raise        301 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);				\
ossl_raise        322 ext/openssl/ossl_bn.c 	ossl_raise(eBNError, NULL);
ossl_raise        326 ext/openssl/ossl_bn.c 	ossl_raise(eBNError, NULL);
ossl_raise        331 ext/openssl/ossl_bn.c 	ossl_raise(eBNError, NULL);
ossl_raise        348 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);				\
ossl_raise        352 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);				\
ossl_raise        369 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);			\
ossl_raise        401 ext/openssl/ossl_bn.c 		ossl_raise(eBNError, NULL);		\
ossl_raise        405 ext/openssl/ossl_bn.c 		ossl_raise(eBNError, NULL);		\
ossl_raise        430 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);				\
ossl_raise        434 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);				\
ossl_raise        449 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);				\
ossl_raise        453 ext/openssl/ossl_bn.c 	    ossl_raise(eBNError, NULL);				\
ossl_raise        477 ext/openssl/ossl_bn.c 	    ossl_raise(rb_eArgError,
ossl_raise        484 ext/openssl/ossl_bn.c 	ossl_raise(eBNError, NULL);
ossl_raise        488 ext/openssl/ossl_bn.c 	ossl_raise(eBNError, NULL);
ossl_raise        519 ext/openssl/ossl_bn.c 	ossl_raise(eBNError, NULL);
ossl_raise        561 ext/openssl/ossl_bn.c 	ossl_raise(eBNError, NULL);
ossl_raise        590 ext/openssl/ossl_bn.c 	ossl_raise(eBNError, NULL);
ossl_raise        604 ext/openssl/ossl_bn.c 	ossl_raise(rb_eRuntimeError, "Cannot init BN_CTX");
ossl_raise         18 ext/openssl/ossl_cipher.c 	ossl_raise(rb_eRuntimeError, "Cipher not inititalized!"); \
ossl_raise         58 ext/openssl/ossl_cipher.c 	ossl_raise(eCipherError, NULL);
ossl_raise         97 ext/openssl/ossl_cipher.c 	ossl_raise(rb_eRuntimeError, "unsupported cipher algorithm (%s)", name);
ossl_raise        100 ext/openssl/ossl_cipher.c 	ossl_raise(eCipherError, NULL);
ossl_raise        115 ext/openssl/ossl_cipher.c 	ossl_raise(eCipherError, NULL);
ossl_raise        127 ext/openssl/ossl_cipher.c 	ossl_raise(eCipherError, NULL);
ossl_raise        169 ext/openssl/ossl_cipher.c 	ossl_raise(eCipherError, NULL);
ossl_raise        210 ext/openssl/ossl_cipher.c 	ossl_raise(eCipherError, NULL);
ossl_raise        232 ext/openssl/ossl_cipher.c 	ossl_raise(eCipherError, NULL);
ossl_raise        250 ext/openssl/ossl_cipher.c 	ossl_raise(eCipherError, NULL);
ossl_raise        277 ext/openssl/ossl_cipher.c         ossl_raise(eCipherError, "key length too short");
ossl_raise        280 ext/openssl/ossl_cipher.c         ossl_raise(eCipherError, NULL);
ossl_raise        294 ext/openssl/ossl_cipher.c         ossl_raise(eCipherError, "iv length too short");
ossl_raise        297 ext/openssl/ossl_cipher.c 	ossl_raise(eCipherError, NULL);
ossl_raise        310 ext/openssl/ossl_cipher.c         ossl_raise(eCipherError, NULL);
ossl_raise        324 ext/openssl/ossl_cipher.c 	ossl_raise(eCipherError, NULL);
ossl_raise         15 ext/openssl/ossl_config.c 	ossl_raise(rb_eRuntimeError, "Config wasn't intitialized!"); \
ossl_raise         22 ext/openssl/ossl_config.c 	ossl_raise(rb_eRuntimeError, "Config wasn't intitialized!"); \
ossl_raise         77 ext/openssl/ossl_config.c 	ossl_raise(eConfigError, NULL);
ossl_raise         82 ext/openssl/ossl_config.c 	if (eline <= 0) ossl_raise(eConfigError, "wrong config format");
ossl_raise         83 ext/openssl/ossl_config.c 	else ossl_raise(eConfigError, "error in line %d", eline);
ossl_raise         84 ext/openssl/ossl_config.c 	ossl_raise(eConfigError, NULL);
ossl_raise        110 ext/openssl/ossl_config.c 	ossl_raise(eConfigError, NULL);
ossl_raise        144 ext/openssl/ossl_config.c 		ossl_raise(eConfigError, "wrong config file %s", filename);
ossl_raise        146 ext/openssl/ossl_config.c 		ossl_raise(eConfigError, "error in %s:%d", filename, eline);
ossl_raise        176 ext/openssl/ossl_config.c 	    ossl_raise(eConfigError, NULL);
ossl_raise        180 ext/openssl/ossl_config.c 	ossl_raise(eConfigError, NULL);
ossl_raise        188 ext/openssl/ossl_config.c 	ossl_raise(eConfigError, "_CONF_add_string failure");
ossl_raise         16 ext/openssl/ossl_digest.c 	ossl_raise(rb_eRuntimeError, "Digest CTX wasn't initialized!"); \
ossl_raise         71 ext/openssl/ossl_digest.c 	ossl_raise(rb_eRuntimeError, "EVP_MD_CTX_create() failed");
ossl_raise         95 ext/openssl/ossl_digest.c 	ossl_raise(rb_eRuntimeError, "Unsupported digest algorithm (%s).", name);
ossl_raise        116 ext/openssl/ossl_digest.c 	ossl_raise(eDigestError, NULL);
ossl_raise        150 ext/openssl/ossl_digest.c 	ossl_raise(eDigestError, NULL);
ossl_raise        154 ext/openssl/ossl_digest.c 	ossl_raise(eDigestError, "Cannot allocate mem for digest");
ossl_raise        187 ext/openssl/ossl_digest.c 	ossl_raise(eDigestError, "Memory alloc error");
ossl_raise         17 ext/openssl/ossl_engine.c 	ossl_raise(rb_eRuntimeError, "ENGINE wasn't initialized."); \
ossl_raise         24 ext/openssl/ossl_engine.c         ossl_raise(rb_eRuntimeError, "ENGINE wasn't initialized."); \
ossl_raise        116 ext/openssl/ossl_engine.c 	ossl_raise(eEngineError, NULL);
ossl_raise        120 ext/openssl/ossl_engine.c 	ossl_raise(eEngineError, NULL);
ossl_raise        135 ext/openssl/ossl_engine.c        ossl_raise(eEngineError, NULL);
ossl_raise        164 ext/openssl/ossl_engine.c     if(!ENGINE_finish(e)) ossl_raise(eEngineError, NULL);
ossl_raise        180 ext/openssl/ossl_engine.c     if(!tmp) ossl_raise(eEngineError, "no such cipher `%s'", s);
ossl_raise        184 ext/openssl/ossl_engine.c     if(!ciph) ossl_raise(eEngineError, NULL);
ossl_raise        203 ext/openssl/ossl_engine.c     if(!tmp) ossl_raise(eEngineError, "no such digest `%s'", s);
ossl_raise        207 ext/openssl/ossl_engine.c     if(!md) ossl_raise(eEngineError, NULL);
ossl_raise        232 ext/openssl/ossl_engine.c     if (!pkey) ossl_raise(eEngineError, NULL);
ossl_raise        256 ext/openssl/ossl_engine.c     if (!pkey) ossl_raise(eEngineError, NULL);
ossl_raise        286 ext/openssl/ossl_engine.c     if (!ret) ossl_raise(eEngineError, NULL);
ossl_raise         20 ext/openssl/ossl_hmac.c 	ossl_raise(rb_eRuntimeError, "HMAC wasn't initialized"); \
ossl_raise         85 ext/openssl/ossl_hmac.c 	ossl_raise(eHMACError, NULL);
ossl_raise        108 ext/openssl/ossl_hmac.c 	ossl_raise(eHMACError, NULL);
ossl_raise        113 ext/openssl/ossl_hmac.c 	ossl_raise(eHMACError, "Cannot allocate memory for hmac");
ossl_raise        146 ext/openssl/ossl_hmac.c 	ossl_raise(eHMACError, "Memory alloc error");
ossl_raise        181 ext/openssl/ossl_hmac.c 	ossl_raise(eHMACError, "Cannot convert buf to hexbuf");
ossl_raise         15 ext/openssl/ossl_ns_spki.c 	ossl_raise(rb_eRuntimeError, "SPKI wasn't initialized!"); \
ossl_raise         22 ext/openssl/ossl_ns_spki.c 	ossl_raise(rb_eRuntimeError, "SPKI wasn't initialized!"); \
ossl_raise         47 ext/openssl/ossl_ns_spki.c 	ossl_raise(eSPKIError, NULL);
ossl_raise         68 ext/openssl/ossl_ns_spki.c 	    ossl_raise(eSPKIError, NULL);
ossl_raise         87 ext/openssl/ossl_ns_spki.c         ossl_raise(eX509CertError, NULL);
ossl_raise         91 ext/openssl/ossl_ns_spki.c         ossl_raise(eX509CertError, NULL);
ossl_raise        106 ext/openssl/ossl_ns_spki.c 	ossl_raise(eSPKIError, NULL);
ossl_raise        123 ext/openssl/ossl_ns_spki.c 	ossl_raise(eSPKIError, NULL);
ossl_raise        127 ext/openssl/ossl_ns_spki.c 	ossl_raise(eSPKIError, NULL);
ossl_raise        144 ext/openssl/ossl_ns_spki.c 	ossl_raise(eSPKIError, NULL);
ossl_raise        157 ext/openssl/ossl_ns_spki.c 	ossl_raise(eSPKIError, NULL);
ossl_raise        187 ext/openssl/ossl_ns_spki.c 	ossl_raise(eSPKIError, NULL);
ossl_raise        204 ext/openssl/ossl_ns_spki.c 	ossl_raise(eSPKIError, NULL);
ossl_raise        225 ext/openssl/ossl_ns_spki.c 	ossl_raise(eSPKIError, NULL);
ossl_raise         17 ext/openssl/ossl_ocsp.c     if(!req) ossl_raise(rb_eRuntimeError, "Request wasn't initialized!"); \
ossl_raise         22 ext/openssl/ossl_ocsp.c     if(!req) ossl_raise(rb_eRuntimeError, "Request wasn't initialized!"); \
ossl_raise         30 ext/openssl/ossl_ocsp.c     if(!res) ossl_raise(rb_eRuntimeError, "Response wasn't initialized!"); \
ossl_raise         35 ext/openssl/ossl_ocsp.c     if(!res) ossl_raise(rb_eRuntimeError, "Response wasn't initialized!"); \
ossl_raise         43 ext/openssl/ossl_ocsp.c     if(!res) ossl_raise(rb_eRuntimeError, "Response wasn't initialized!"); \
ossl_raise         48 ext/openssl/ossl_ocsp.c     if(!res) ossl_raise(rb_eRuntimeError, "Response wasn't initialized!"); \
ossl_raise         56 ext/openssl/ossl_ocsp.c     if(!cid) ossl_raise(rb_eRuntimeError, "Cert ID wasn't initialized!"); \
ossl_raise         61 ext/openssl/ossl_ocsp.c     if(!cid) ossl_raise(rb_eRuntimeError, "Cert ID wasn't initialized!"); \
ossl_raise         96 ext/openssl/ossl_ocsp.c 	ossl_raise(eOCSPError, NULL);
ossl_raise        115 ext/openssl/ossl_ocsp.c 	    ossl_raise(eOCSPError, "cannot load DER encoded request");
ossl_raise        139 ext/openssl/ossl_ocsp.c     if(!ret) ossl_raise(eOCSPError, NULL);
ossl_raise        179 ext/openssl/ossl_ocsp.c 	ossl_raise(eOCSPError, NULL);
ossl_raise        199 ext/openssl/ossl_ocsp.c 	    ossl_raise(eOCSPError, NULL);
ossl_raise        230 ext/openssl/ossl_ocsp.c     if(!ret) ossl_raise(eOCSPError, NULL);
ossl_raise        266 ext/openssl/ossl_ocsp.c 	ossl_raise(eOCSPError, NULL);
ossl_raise        270 ext/openssl/ossl_ocsp.c 	ossl_raise(eOCSPError, NULL);
ossl_raise        290 ext/openssl/ossl_ocsp.c 	ossl_raise(eOCSPError, NULL);
ossl_raise        303 ext/openssl/ossl_ocsp.c 	ossl_raise(eOCSPError, NULL);
ossl_raise        322 ext/openssl/ossl_ocsp.c 	    ossl_raise(eOCSPError, "cannot load DER encoded response");
ossl_raise        378 ext/openssl/ossl_ocsp.c 	ossl_raise(eOCSPError, NULL);
ossl_raise        382 ext/openssl/ossl_ocsp.c 	ossl_raise(eOCSPError, NULL);
ossl_raise        398 ext/openssl/ossl_ocsp.c 	ossl_raise(eOCSPError, NULL);
ossl_raise        441 ext/openssl/ossl_ocsp.c     if(!ret) ossl_raise(eOCSPError, NULL);
ossl_raise        508 ext/openssl/ossl_ocsp.c     if(error) ossl_raise(eOCSPError, NULL);
ossl_raise        538 ext/openssl/ossl_ocsp.c 	    ossl_raise(eOCSPError, NULL);
ossl_raise        584 ext/openssl/ossl_ocsp.c     if(!ret) ossl_raise(eOCSPError, NULL);
ossl_raise        620 ext/openssl/ossl_ocsp.c 	ossl_raise(eOCSPError, NULL);
ossl_raise        635 ext/openssl/ossl_ocsp.c 	ossl_raise(eOCSPError, NULL);
ossl_raise          9 ext/openssl/ossl_pkcs12.c     if(!p12) ossl_raise(rb_eRuntimeError, "PKCS12 wasn't initialized."); \
ossl_raise         15 ext/openssl/ossl_pkcs12.c     if(!p12) ossl_raise(rb_eRuntimeError, "PKCS12 wasn't initialized."); \
ossl_raise         46 ext/openssl/ossl_pkcs12.c     if(!(p12 = PKCS12_new())) ossl_raise(ePKCS12Error, NULL);
ossl_raise         72 ext/openssl/ossl_pkcs12.c     if(!p12) ossl_raise(ePKCS12Error, NULL);
ossl_raise         97 ext/openssl/ossl_pkcs12.c 	ossl_raise(ePKCS12Error, NULL);
ossl_raise        130 ext/openssl/ossl_pkcs12.c 	ossl_raise(ePKCS12Error, NULL);
ossl_raise        134 ext/openssl/ossl_pkcs12.c 	ossl_raise(ePKCS12Error, NULL);
ossl_raise         15 ext/openssl/ossl_pkcs7.c 	ossl_raise(rb_eRuntimeError, "PKCS7 wasn't initialized."); \
ossl_raise         22 ext/openssl/ossl_pkcs7.c 	ossl_raise(rb_eRuntimeError, "PKCS7 wasn't initialized."); \
ossl_raise         32 ext/openssl/ossl_pkcs7.c 	ossl_raise(rb_eRuntimeError, "PKCS7si wasn't initialized."); \
ossl_raise         39 ext/openssl/ossl_pkcs7.c 	ossl_raise(rb_eRuntimeError, "PKCS7si wasn't initialized."); \
ossl_raise         49 ext/openssl/ossl_pkcs7.c 	ossl_raise(rb_eRuntimeError, "PKCS7ri wasn't initialized."); \
ossl_raise         56 ext/openssl/ossl_pkcs7.c 	ossl_raise(rb_eRuntimeError, "PKCS7ri wasn't initialized."); \
ossl_raise         91 ext/openssl/ossl_pkcs7.c     if (!pkcs7) ossl_raise(ePKCS7Error, NULL);
ossl_raise        104 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
ossl_raise        117 ext/openssl/ossl_pkcs7.c     if (!pkcs7) ossl_raise(ePKCS7Error, NULL);
ossl_raise        130 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
ossl_raise        150 ext/openssl/ossl_pkcs7.c     if(!pkcs7) ossl_raise(ePKCS7Error, NULL);
ossl_raise        177 ext/openssl/ossl_pkcs7.c         ossl_raise(ePKCS7Error, NULL);
ossl_raise        182 ext/openssl/ossl_pkcs7.c         ossl_raise(ePKCS7Error, NULL);
ossl_raise        218 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
ossl_raise        251 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, "Must specify cipher");
ossl_raise        266 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
ossl_raise        283 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
ossl_raise        326 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
ossl_raise        357 ext/openssl/ossl_pkcs7.c 	    ossl_raise(ePKCS7Error, "unknown type \"%s\"", s);
ossl_raise        374 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
ossl_raise        405 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, "must specify a boolean");
ossl_raise        407 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
ossl_raise        435 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
ossl_raise        451 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, "Could not add signer.");
ossl_raise        476 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, "Negative number of signers!");
ossl_raise        497 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, "Could not add recipient.");
ossl_raise        520 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, "Negative number of recipient!");
ossl_raise        540 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
ossl_raise        606 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
ossl_raise        666 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
ossl_raise        696 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
ossl_raise        699 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
ossl_raise        718 ext/openssl/ossl_pkcs7.c 	    ossl_raise(ePKCS7Error, NULL);
ossl_raise        734 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
ossl_raise        750 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
ossl_raise        754 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
ossl_raise        769 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
ossl_raise        773 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
ossl_raise        790 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
ossl_raise        810 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
ossl_raise        845 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
ossl_raise        869 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
ossl_raise        885 ext/openssl/ossl_pkcs7.c 	ossl_raise(ePKCS7Error, NULL);
ossl_raise         43 ext/openssl/ossl_pkey.c 	ossl_raise(ePKeyError, "Cannot make new key from NULL.");
ossl_raise         59 ext/openssl/ossl_pkey.c 	ossl_raise(ePKeyError, "unsupported key type");
ossl_raise         72 ext/openssl/ossl_pkey.c 	ossl_raise(ePKeyError, "%s", strerror(errno));
ossl_raise         78 ext/openssl/ossl_pkey.c 	ossl_raise(ePKeyError, NULL);
ossl_raise        100 ext/openssl/ossl_pkey.c 	ossl_raise(rb_eArgError, "Private key is needed.");
ossl_raise        124 ext/openssl/ossl_pkey.c 	ossl_raise(rb_eArgError, "Private key is needed.");
ossl_raise        142 ext/openssl/ossl_pkey.c 	ossl_raise(ePKeyError, NULL);
ossl_raise        153 ext/openssl/ossl_pkey.c 	ossl_raise(rb_eNotImpError, "OpenSSL::PKey::PKey is an abstract class.");
ossl_raise        167 ext/openssl/ossl_pkey.c 	ossl_raise(rb_eArgError, "Private key is needed.");
ossl_raise        175 ext/openssl/ossl_pkey.c 	ossl_raise(ePKeyError, NULL);
ossl_raise        200 ext/openssl/ossl_pkey.c 	ossl_raise(ePKeyError, NULL);
ossl_raise        108 ext/openssl/ossl_pkey.h 		ossl_raise(eBNError, NULL);				\
ossl_raise        110 ext/openssl/ossl_pkey.h 		ossl_raise(eBNError, NULL);				\
ossl_raise         18 ext/openssl/ossl_pkey_dh.c 	ossl_raise(rb_eRuntimeError, "THIS IS NOT A DH!") ; \
ossl_raise         70 ext/openssl/ossl_pkey_dh.c 	    ossl_raise(rb_eTypeError, "Not a DH key!");
ossl_raise         75 ext/openssl/ossl_pkey_dh.c 	ossl_raise(eDHError, NULL);
ossl_raise        116 ext/openssl/ossl_pkey_dh.c 	ossl_raise(eDHError, NULL);
ossl_raise        140 ext/openssl/ossl_pkey_dh.c 	    ossl_raise(eDHError, NULL);
ossl_raise        152 ext/openssl/ossl_pkey_dh.c 	if (!dh) ossl_raise(eDHError, NULL);
ossl_raise        156 ext/openssl/ossl_pkey_dh.c 	ossl_raise(eDHError, NULL);
ossl_raise        193 ext/openssl/ossl_pkey_dh.c 	ossl_raise(eDHError, NULL);
ossl_raise        197 ext/openssl/ossl_pkey_dh.c 	ossl_raise(eDHError, NULL);
ossl_raise        214 ext/openssl/ossl_pkey_dh.c 	ossl_raise(eDHError, NULL);
ossl_raise        218 ext/openssl/ossl_pkey_dh.c 	ossl_raise(eDHError, NULL);
ossl_raise        261 ext/openssl/ossl_pkey_dh.c 	ossl_raise(eDHError, NULL);
ossl_raise        265 ext/openssl/ossl_pkey_dh.c 	ossl_raise(eDHError, NULL);
ossl_raise        287 ext/openssl/ossl_pkey_dh.c 	ossl_raise(eDHError, NULL);
ossl_raise        320 ext/openssl/ossl_pkey_dh.c 	ossl_raise(eDHError, "Failed to generate key");
ossl_raise        339 ext/openssl/ossl_pkey_dh.c 	ossl_raise(eDHError, NULL);
ossl_raise        404 ext/openssl/ossl_pkey_dh.c     if ((dh = DH_new()) == NULL) ossl_raise(eDHError, NULL);
ossl_raise        409 ext/openssl/ossl_pkey_dh.c 	ossl_raise(eDHError, NULL);
ossl_raise         18 ext/openssl/ossl_pkey_dsa.c 	ossl_raise(rb_eRuntimeError, "THIS IS NOT A DSA!"); \
ossl_raise         64 ext/openssl/ossl_pkey_dsa.c 	    ossl_raise(rb_eTypeError, "Not a DSA key!");
ossl_raise         69 ext/openssl/ossl_pkey_dsa.c 	ossl_raise(eDSAError, NULL);
ossl_raise        110 ext/openssl/ossl_pkey_dsa.c 	ossl_raise(eDSAError, NULL);
ossl_raise        131 ext/openssl/ossl_pkey_dsa.c 	    ossl_raise(eDSAError, NULL);
ossl_raise        156 ext/openssl/ossl_pkey_dsa.c 	if (!dsa) ossl_raise(eDSAError, "Neither PUB key nor PRIV key:");
ossl_raise        160 ext/openssl/ossl_pkey_dsa.c 	ossl_raise(eDSAError, NULL);
ossl_raise        208 ext/openssl/ossl_pkey_dsa.c 	ossl_raise(eDSAError, NULL);
ossl_raise        214 ext/openssl/ossl_pkey_dsa.c 	    ossl_raise(eDSAError, NULL);
ossl_raise        219 ext/openssl/ossl_pkey_dsa.c 	    ossl_raise(eDSAError, NULL);
ossl_raise        242 ext/openssl/ossl_pkey_dsa.c 	ossl_raise(eDSAError, NULL);
ossl_raise        246 ext/openssl/ossl_pkey_dsa.c 	ossl_raise(eDSAError, NULL);
ossl_raise        290 ext/openssl/ossl_pkey_dsa.c 	ossl_raise(eDSAError, NULL);
ossl_raise        294 ext/openssl/ossl_pkey_dsa.c 	ossl_raise(eDSAError, NULL);
ossl_raise        317 ext/openssl/ossl_pkey_dsa.c 	ossl_raise(eDSAError, NULL);
ossl_raise        334 ext/openssl/ossl_pkey_dsa.c 	ossl_raise(eDSAError, "Private DSA key needed!");
ossl_raise        339 ext/openssl/ossl_pkey_dsa.c 	ossl_raise(eDSAError, NULL);
ossl_raise        360 ext/openssl/ossl_pkey_dsa.c 	ossl_raise(eDSAError, NULL);
ossl_raise         18 ext/openssl/ossl_pkey_rsa.c 	ossl_raise(rb_eRuntimeError, "THIS IS NOT A RSA!") ; \
ossl_raise         65 ext/openssl/ossl_pkey_rsa.c 	    ossl_raise(rb_eTypeError, "Not a RSA key!");
ossl_raise         70 ext/openssl/ossl_pkey_rsa.c 	ossl_raise(eRSAError, NULL);
ossl_raise        101 ext/openssl/ossl_pkey_rsa.c 	ossl_raise(eRSAError, NULL);
ossl_raise        122 ext/openssl/ossl_pkey_rsa.c 	if (!rsa) ossl_raise(eRSAError, NULL);
ossl_raise        150 ext/openssl/ossl_pkey_rsa.c 	if (!rsa) ossl_raise(eRSAError, "Neither PUB key nor PRIV key:");
ossl_raise        154 ext/openssl/ossl_pkey_rsa.c 	ossl_raise(eRSAError, NULL);
ossl_raise        203 ext/openssl/ossl_pkey_rsa.c 	ossl_raise(eRSAError, NULL);
ossl_raise        209 ext/openssl/ossl_pkey_rsa.c 	    ossl_raise(eRSAError, NULL);
ossl_raise        214 ext/openssl/ossl_pkey_rsa.c 	    ossl_raise(eRSAError, NULL);
ossl_raise        237 ext/openssl/ossl_pkey_rsa.c 	ossl_raise(eRSAError, NULL);
ossl_raise        241 ext/openssl/ossl_pkey_rsa.c 	ossl_raise(eRSAError, NULL);
ossl_raise        264 ext/openssl/ossl_pkey_rsa.c     if (buf_len < 0) ossl_raise(eRSAError, NULL);
ossl_raise        286 ext/openssl/ossl_pkey_rsa.c     if (buf_len < 0) ossl_raise(eRSAError, NULL);
ossl_raise        302 ext/openssl/ossl_pkey_rsa.c 	ossl_raise(eRSAError, "private key needed.");
ossl_raise        311 ext/openssl/ossl_pkey_rsa.c     if (buf_len < 0) ossl_raise(eRSAError, NULL);
ossl_raise        327 ext/openssl/ossl_pkey_rsa.c 	ossl_raise(eRSAError, "private key needed.");
ossl_raise        336 ext/openssl/ossl_pkey_rsa.c     if (buf_len < 0) ossl_raise(eRSAError, NULL);
ossl_raise        384 ext/openssl/ossl_pkey_rsa.c 	ossl_raise(eRSAError, NULL);
ossl_raise        388 ext/openssl/ossl_pkey_rsa.c 	ossl_raise(eRSAError, NULL);
ossl_raise        411 ext/openssl/ossl_pkey_rsa.c 	ossl_raise(eRSAError, NULL);
ossl_raise         45 ext/openssl/ossl_rand.c 	ossl_raise(eRandomError, NULL);
ossl_raise         55 ext/openssl/ossl_rand.c 	ossl_raise(eRandomError, NULL);
ossl_raise         67 ext/openssl/ossl_rand.c 	ossl_raise(eRandomError, NULL);
ossl_raise         80 ext/openssl/ossl_rand.c 	ossl_raise(eRandomError, NULL);
ossl_raise         92 ext/openssl/ossl_rand.c 	ossl_raise(eRandomError, NULL);
ossl_raise        103 ext/openssl/ossl_rand.c 	ossl_raise(eRandomError, NULL);
ossl_raise        133 ext/openssl/ossl_ssl.c         ossl_raise(eSSLError, "SSL_CTX_new:");
ossl_raise        168 ext/openssl/ossl_ssl.c         ossl_raise(rb_eArgError, "unknown SSL method `%s'.", s);
ossl_raise        172 ext/openssl/ossl_ssl.c         ossl_raise(eSSLError, "SSL_CTX_set_ssl_version:");
ossl_raise        282 ext/openssl/ossl_ssl.c 	ossl_raise(eSSLError, NULL);
ossl_raise        338 ext/openssl/ossl_ssl.c             ossl_raise(eSSLError, "SSL_CTX_use_certificate:");
ossl_raise        342 ext/openssl/ossl_ssl.c             ossl_raise(eSSLError, "SSL_CTX_use_PrivateKey:");
ossl_raise        345 ext/openssl/ossl_ssl.c             ossl_raise(eSSLError, "SSL_CTX_check_private_key:");
ossl_raise        356 ext/openssl/ossl_ssl.c         	    ossl_raise(eSSLError, "SSL_CTX_add_client_CA");
ossl_raise        364 ext/openssl/ossl_ssl.c         	ossl_raise(eSSLError, "SSL_CTX_add_client_CA");
ossl_raise        399 ext/openssl/ossl_ssl.c 	    ossl_raise(eSSLError, "SSL_CTX_set_session_id_context:");
ossl_raise        476 ext/openssl/ossl_ssl.c         ossl_raise(eSSLError, "SSL_CTX is not initialized.");
ossl_raise        480 ext/openssl/ossl_ssl.c         ossl_raise(eSSLError, "SSL_CTX_set_cipher_list:");
ossl_raise        545 ext/openssl/ossl_ssl.c             ossl_raise(eSSLError, "SSL_new:");
ossl_raise        593 ext/openssl/ossl_ssl.c 	    ossl_raise(eSSLError, NULL);
ossl_raise        654 ext/openssl/ossl_ssl.c 		ossl_raise(eSSLError, "SSL_read:");
ossl_raise        698 ext/openssl/ossl_ssl.c 		ossl_raise(eSSLError, "SSL_write:");
ossl_raise         15 ext/openssl/ossl_x509attr.c 	ossl_raise(rb_eRuntimeError, "ATTR wasn't initialized!"); \
ossl_raise         22 ext/openssl/ossl_x509attr.c 	ossl_raise(rb_eRuntimeError, "ATTR wasn't initialized!"); \
ossl_raise         51 ext/openssl/ossl_x509attr.c 	ossl_raise(eX509AttrError, NULL);
ossl_raise         65 ext/openssl/ossl_x509attr.c 	ossl_raise(eX509AttrError, NULL);
ossl_raise         81 ext/openssl/ossl_x509attr.c 	ossl_raise(eX509AttrError, NULL);
ossl_raise        101 ext/openssl/ossl_x509attr.c 	    ossl_raise(eX509AttrError, NULL);
ossl_raise        121 ext/openssl/ossl_x509attr.c     if(!obj) ossl_raise(eX509AttrError, NULL);
ossl_raise        143 ext/openssl/ossl_x509attr.c 	    ossl_raise(eX509AttrError, NULL);
ossl_raise        166 ext/openssl/ossl_x509attr.c 	ossl_raise(eASN1Error, "could not get ASN1_TYPE");
ossl_raise        169 ext/openssl/ossl_x509attr.c 	ossl_raise(eASN1Error, "couldn't set SEQUENCE for attribute value.");
ossl_raise        223 ext/openssl/ossl_x509attr.c 	ossl_raise(eX509AttrError, NULL);
ossl_raise        227 ext/openssl/ossl_x509attr.c 	ossl_raise(eX509AttrError, NULL);
ossl_raise         15 ext/openssl/ossl_x509cert.c 	ossl_raise(rb_eRuntimeError, "CERT wasn't initialized!"); \
ossl_raise         22 ext/openssl/ossl_x509cert.c 	ossl_raise(rb_eRuntimeError, "CERT wasn't initialized!"); \
ossl_raise         51 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
ossl_raise         67 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, "%s", strerror(errno));
ossl_raise         82 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
ossl_raise        121 ext/openssl/ossl_x509cert.c     if (!x509) ossl_raise(eX509CertError, NULL);
ossl_raise        147 ext/openssl/ossl_x509cert.c     if (!x509) ossl_raise(eX509CertError, NULL);
ossl_raise        164 ext/openssl/ossl_x509cert.c     if (!x509) ossl_raise(eX509CertError, NULL);
ossl_raise        182 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
ossl_raise        186 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
ossl_raise        201 ext/openssl/ossl_x509cert.c     if (!out) ossl_raise(eX509CertError, NULL);
ossl_raise        205 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
ossl_raise        222 ext/openssl/ossl_x509cert.c     if (!out) ossl_raise(eX509CertError, NULL);
ossl_raise        226 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
ossl_raise        246 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
ossl_raise        272 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, "version must be >= 0!");
ossl_raise        276 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
ossl_raise        314 ext/openssl/ossl_x509cert.c     if (!out) ossl_raise(eX509CertError, NULL);
ossl_raise        318 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
ossl_raise        333 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
ossl_raise        346 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
ossl_raise        360 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
ossl_raise        373 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
ossl_raise        387 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
ossl_raise        402 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
ossl_raise        416 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
ossl_raise        431 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
ossl_raise        445 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
ossl_raise        458 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
ossl_raise        475 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
ossl_raise        494 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
ossl_raise        571 ext/openssl/ossl_x509cert.c 	    ossl_raise(eX509CertError, NULL);
ossl_raise        589 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, NULL);
ossl_raise         15 ext/openssl/ossl_x509crl.c 	ossl_raise(rb_eRuntimeError, "CRL wasn't initialized!"); \
ossl_raise         22 ext/openssl/ossl_x509crl.c 	ossl_raise(rb_eRuntimeError, "CRL wasn't initialized!"); \
ossl_raise         67 ext/openssl/ossl_x509crl.c     if(!tmp) ossl_raise(eX509CRLError, NULL);
ossl_raise         83 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
ossl_raise        108 ext/openssl/ossl_x509crl.c     if (!crl) ossl_raise(eX509CRLError, NULL);
ossl_raise        123 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
ossl_raise        150 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, "version must be >= 0!");
ossl_raise        154 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
ossl_raise        170 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
ossl_raise        174 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
ossl_raise        200 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
ossl_raise        224 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
ossl_raise        250 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
ossl_raise        299 ext/openssl/ossl_x509crl.c 	    ossl_raise(eX509CRLError, NULL);
ossl_raise        316 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
ossl_raise        334 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
ossl_raise        348 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
ossl_raise        367 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
ossl_raise        371 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
ossl_raise        390 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
ossl_raise        394 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
ossl_raise        413 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
ossl_raise        417 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
ossl_raise        474 ext/openssl/ossl_x509crl.c 	    ossl_raise(eX509CRLError, NULL);
ossl_raise        492 ext/openssl/ossl_x509crl.c 	ossl_raise(eX509CRLError, NULL);
ossl_raise         15 ext/openssl/ossl_x509ext.c 	ossl_raise(rb_eRuntimeError, "EXT wasn't initialized!"); \
ossl_raise         22 ext/openssl/ossl_x509ext.c 	ossl_raise(rb_eRuntimeError, "EXT wasn't initialized!"); \
ossl_raise         31 ext/openssl/ossl_x509ext.c         ossl_raise(rb_eRuntimeError, "CTX wasn't allocated!"); \
ossl_raise         38 ext/openssl/ossl_x509ext.c 	ossl_raise(rb_eRuntimeError, "CTX wasn't initialized!"); \
ossl_raise         64 ext/openssl/ossl_x509ext.c 	ossl_raise(eX509ExtError, NULL);
ossl_raise         88 ext/openssl/ossl_x509ext.c 	ossl_raise(eX509ExtError, NULL);
ossl_raise        234 ext/openssl/ossl_x509ext.c     if(!nid) ossl_raise(eX509ExtError, "unknown OID `%s'", RSTRING(oid)->ptr);
ossl_raise        247 ext/openssl/ossl_x509ext.c 	ossl_raise(eX509ExtError, "%s = %s",
ossl_raise        265 ext/openssl/ossl_x509ext.c 	ossl_raise(eX509ExtError, NULL);
ossl_raise        286 ext/openssl/ossl_x509ext.c 	    ossl_raise(eX509ExtError, NULL);
ossl_raise        306 ext/openssl/ossl_x509ext.c     if(!obj) ossl_raise(eX509ExtError, NULL);
ossl_raise        323 ext/openssl/ossl_x509ext.c 	ossl_raise(eX509ExtError, "malloc error");
ossl_raise        327 ext/openssl/ossl_x509ext.c 	ossl_raise(eX509ExtError, NULL);
ossl_raise        332 ext/openssl/ossl_x509ext.c 	ossl_raise(eX509ExtError, NULL);
ossl_raise        366 ext/openssl/ossl_x509ext.c 	    ossl_raise(eX509ExtError, NULL);
ossl_raise        383 ext/openssl/ossl_x509ext.c 	ossl_raise(eX509ExtError, NULL);
ossl_raise        410 ext/openssl/ossl_x509ext.c 	ossl_raise(eX509ExtError, NULL);
ossl_raise        414 ext/openssl/ossl_x509ext.c 	ossl_raise(eX509ExtError, NULL);
ossl_raise         15 ext/openssl/ossl_x509name.c 	ossl_raise(rb_eRuntimeError, "Name wasn't initialized."); \
ossl_raise         22 ext/openssl/ossl_x509name.c 	ossl_raise(rb_eRuntimeError, "Name wasn't initialized."); \
ossl_raise         56 ext/openssl/ossl_x509name.c 	ossl_raise(eX509NameError, NULL);
ossl_raise         83 ext/openssl/ossl_x509name.c 	ossl_raise(eX509NameError, NULL);
ossl_raise        136 ext/openssl/ossl_x509name.c 		ossl_raise(eX509NameError, NULL);
ossl_raise        157 ext/openssl/ossl_x509name.c 	ossl_raise(eX509NameError, NULL);
ossl_raise        221 ext/openssl/ossl_x509name.c 	    ossl_raise(eX509NameError, NULL);
ossl_raise        224 ext/openssl/ossl_x509name.c 	    ossl_raise(eX509NameError, NULL);
ossl_raise        292 ext/openssl/ossl_x509name.c 	ossl_raise(eX509NameError, NULL);
ossl_raise        296 ext/openssl/ossl_x509name.c 	ossl_raise(eX509NameError, NULL);
ossl_raise         15 ext/openssl/ossl_x509req.c 	ossl_raise(rb_eRuntimeError, "Req wasn't initialized!"); \
ossl_raise         22 ext/openssl/ossl_x509req.c 	ossl_raise(rb_eRuntimeError, "Req wasn't initialized!"); \
ossl_raise         51 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
ossl_raise         75 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
ossl_raise         91 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
ossl_raise        116 ext/openssl/ossl_x509req.c     if (!req) ossl_raise(eX509ReqError, NULL);
ossl_raise        131 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
ossl_raise        149 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
ossl_raise        153 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
ossl_raise        172 ext/openssl/ossl_x509req.c 	ossl_raise(eX509CertError, NULL);
ossl_raise        176 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
ossl_raise        192 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
ossl_raise        196 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
ossl_raise        218 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
ossl_raise        244 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, "version must be >= 0!");
ossl_raise        248 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
ossl_raise        262 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
ossl_raise        276 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
ossl_raise        293 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
ossl_raise        297 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
ossl_raise        313 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
ossl_raise        328 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
ossl_raise        345 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
ossl_raise        364 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
ossl_raise        416 ext/openssl/ossl_x509req.c 	    ossl_raise(eX509ReqError, NULL);
ossl_raise        429 ext/openssl/ossl_x509req.c 	ossl_raise(eX509ReqError, NULL);
ossl_raise         15 ext/openssl/ossl_x509revoked.c 	ossl_raise(rb_eRuntimeError, "REV wasn't initialized!"); \
ossl_raise         22 ext/openssl/ossl_x509revoked.c 	ossl_raise(rb_eRuntimeError, "REV wasn't initialized!"); \
ossl_raise         51 ext/openssl/ossl_x509revoked.c 	ossl_raise(eX509RevError, NULL);
ossl_raise         65 ext/openssl/ossl_x509revoked.c 	ossl_raise(eX509RevError, NULL);
ossl_raise         81 ext/openssl/ossl_x509revoked.c 	ossl_raise(eX509RevError, NULL);
ossl_raise        135 ext/openssl/ossl_x509revoked.c 	ossl_raise(eX509RevError, NULL);
ossl_raise        188 ext/openssl/ossl_x509revoked.c 	    ossl_raise(eX509RevError, NULL);
ossl_raise        202 ext/openssl/ossl_x509revoked.c 	ossl_raise(eX509RevError, NULL);
ossl_raise         16 ext/openssl/ossl_x509store.c 	ossl_raise(rb_eRuntimeError, "STORE wasn't initialized!"); \
ossl_raise         23 ext/openssl/ossl_x509store.c 	ossl_raise(rb_eRuntimeError, "STORE wasn't initialized!"); \
ossl_raise         33 ext/openssl/ossl_x509store.c 	ossl_raise(rb_eRuntimeError, "STORE_CTX wasn't initialized!"); \
ossl_raise         40 ext/openssl/ossl_x509store.c 	ossl_raise(rb_eRuntimeError, "STORE_CTX is out of scope!"); \
ossl_raise         99 ext/openssl/ossl_x509store.c         ossl_raise(eX509StoreError, NULL);
ossl_raise        213 ext/openssl/ossl_x509store.c     if(lookup == NULL) ossl_raise(eX509StoreError, NULL);
ossl_raise        215 ext/openssl/ossl_x509store.c         ossl_raise(eX509StoreError, NULL);
ossl_raise        234 ext/openssl/ossl_x509store.c     if(lookup == NULL) ossl_raise(eX509StoreError, NULL);
ossl_raise        236 ext/openssl/ossl_x509store.c         ossl_raise(eX509StoreError, NULL);
ossl_raise        249 ext/openssl/ossl_x509store.c         ossl_raise(eX509StoreError, NULL);
ossl_raise        264 ext/openssl/ossl_x509store.c         ossl_raise(eX509StoreError, NULL);
ossl_raise        279 ext/openssl/ossl_x509store.c         ossl_raise(eX509StoreError, NULL);
ossl_raise        353 ext/openssl/ossl_x509store.c         ossl_raise(eX509StoreError, NULL);
ossl_raise        382 ext/openssl/ossl_x509store.c         ossl_raise(eX509StoreError, NULL);


ossl_rsa_buf_size

ossl_rsa_buf_size  260 ext/openssl/ossl_pkey_rsa.c     str = rb_str_new(0, ossl_rsa_buf_size(pkey));
ossl_rsa_buf_size  282 ext/openssl/ossl_pkey_rsa.c     str = rb_str_new(0, ossl_rsa_buf_size(pkey));
ossl_rsa_buf_size  307 ext/openssl/ossl_pkey_rsa.c     str = rb_str_new(0, ossl_rsa_buf_size(pkey));
ossl_rsa_buf_size  332 ext/openssl/ossl_pkey_rsa.c     str = rb_str_new(0, ossl_rsa_buf_size(pkey));


ossl_rsa_new

ossl_rsa_new       48 ext/openssl/ossl_pkey.c 	return ossl_rsa_new(pkey);
ossl_rsa_new       57 ext/openssl/ossl_pkey.h VALUE ossl_rsa_new(EVP_PKEY *);


ossl_ssl_cipher_to_ary

ossl_ssl_cipher_to_ary  445 ext/openssl/ossl_ssl.c         rb_ary_push(ary, ossl_ssl_cipher_to_ary(cipher));
ossl_ssl_cipher_to_ary  813 ext/openssl/ossl_ssl.c     return ossl_ssl_cipher_to_ary(cipher);


ossl_ssl_def_const

ossl_ssl_def_const  897 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(VERIFY_NONE);
ossl_ssl_def_const  898 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(VERIFY_PEER);
ossl_ssl_def_const  899 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(VERIFY_FAIL_IF_NO_PEER_CERT);
ossl_ssl_def_const  900 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(VERIFY_CLIENT_ONCE);
ossl_ssl_def_const  913 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_ALL);
ossl_ssl_def_const  915 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION);
ossl_ssl_def_const  918 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_SINGLE_ECDH_USE);
ossl_ssl_def_const  920 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_SINGLE_DH_USE);
ossl_ssl_def_const  921 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_EPHEMERAL_RSA);
ossl_ssl_def_const  923 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_CIPHER_SERVER_PREFERENCE);
ossl_ssl_def_const  925 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_TLS_ROLLBACK_BUG);
ossl_ssl_def_const  926 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_NO_SSLv2);
ossl_ssl_def_const  927 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_NO_SSLv3);
ossl_ssl_def_const  928 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_NO_TLSv1);
ossl_ssl_def_const  929 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_PKCS1_CHECK_1);
ossl_ssl_def_const  930 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_PKCS1_CHECK_2);
ossl_ssl_def_const  931 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_NETSCAPE_CA_DN_BUG);
ossl_ssl_def_const  932 ext/openssl/ossl_ssl.c     ossl_ssl_def_const(OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG);


ossl_ssl_get_io

ossl_ssl_get_io   549 ext/openssl/ossl_ssl.c         io = ossl_ssl_get_io(self);
ossl_ssl_get_io   580 ext/openssl/ossl_ssl.c     GetOpenFile(ossl_ssl_get_io(self), fptr);
ossl_ssl_get_io   633 ext/openssl/ossl_ssl.c     GetOpenFile(ossl_ssl_get_io(self), fptr);
ossl_ssl_get_io   661 ext/openssl/ossl_ssl.c         return rb_funcall(ossl_ssl_get_io(self), id_sysread, 2, len, str);
ossl_ssl_get_io   681 ext/openssl/ossl_ssl.c     GetOpenFile(ossl_ssl_get_io(self), fptr);
ossl_ssl_get_io   705 ext/openssl/ossl_ssl.c 	return rb_funcall(ossl_ssl_get_io(self), id_syswrite, 1, str);
ossl_ssl_get_io   720 ext/openssl/ossl_ssl.c 	rb_funcall(ossl_ssl_get_io(self), rb_intern("close"), 0);


ossl_ssl_setup

ossl_ssl_setup    603 ext/openssl/ossl_ssl.c     ossl_ssl_setup(self);
ossl_ssl_setup    610 ext/openssl/ossl_ssl.c     ossl_ssl_setup(self);


ossl_ssl_shutdown

ossl_ssl_shutdown  501 ext/openssl/ossl_ssl.c     ossl_ssl_shutdown(ssl);
ossl_ssl_shutdown  718 ext/openssl/ossl_ssl.c     ossl_ssl_shutdown(ssl);


ossl_sslctx_get_client_cert_cb

ossl_sslctx_get_client_cert_cb  381 ext/openssl/ossl_ssl.c     if (RTEST(ossl_sslctx_get_client_cert_cb(self)))
ossl_sslctx_get_client_cert_cb  557 ext/openssl/ossl_ssl.c 	cb = ossl_sslctx_get_client_cert_cb(v_ctx);


ossl_sslctx_get_tmp_dh_cb

ossl_sslctx_get_tmp_dh_cb  303 ext/openssl/ossl_ssl.c     if (RTEST(ossl_sslctx_get_tmp_dh_cb(self))){
ossl_sslctx_get_tmp_dh_cb  559 ext/openssl/ossl_ssl.c 	cb = ossl_sslctx_get_tmp_dh_cb(v_ctx);


ossl_start_ssl

ossl_start_ssl    604 ext/openssl/ossl_ssl.c     return ossl_start_ssl(self, SSL_connect);
ossl_start_ssl    611 ext/openssl/ossl_ssl.c     return ossl_start_ssl(self, SSL_accept);


ossl_str_adjust

ossl_str_adjust   709 ext/openssl/ossl_asn1.c     ossl_str_adjust(der, p);
ossl_str_adjust   991 ext/openssl/ossl_asn1.c     ossl_str_adjust(str, p);
ossl_str_adjust    92 ext/openssl/ossl_ns_spki.c     ossl_str_adjust(str, p);
ossl_str_adjust   271 ext/openssl/ossl_ocsp.c     ossl_str_adjust(str, p);
ossl_str_adjust   383 ext/openssl/ossl_ocsp.c     ossl_str_adjust(str, p);
ossl_str_adjust   135 ext/openssl/ossl_pkcs12.c     ossl_str_adjust(str, p);
ossl_str_adjust   755 ext/openssl/ossl_pkcs7.c     ossl_str_adjust(str, p);
ossl_str_adjust   219 ext/openssl/ossl_pkey_dh.c     ossl_str_adjust(str, p);
ossl_str_adjust   247 ext/openssl/ossl_pkey_dsa.c     ossl_str_adjust(str, p);
ossl_str_adjust   242 ext/openssl/ossl_pkey_rsa.c     ossl_str_adjust(str, p);
ossl_str_adjust   197 ext/openssl/ossl_x509attr.c 	ossl_str_adjust(str, p);
ossl_str_adjust   206 ext/openssl/ossl_x509attr.c 	ossl_str_adjust(str, p);
ossl_str_adjust   187 ext/openssl/ossl_x509cert.c     ossl_str_adjust(str, p);
ossl_str_adjust   415 ext/openssl/ossl_x509ext.c     ossl_str_adjust(str, p);
ossl_str_adjust   297 ext/openssl/ossl_x509name.c     ossl_str_adjust(str, p);
ossl_str_adjust   177 ext/openssl/ossl_x509req.c     ossl_str_adjust(str, p);


ossl_to_der

ossl_to_der       268 ext/openssl/ossl.c 	return ossl_to_der(obj);
ossl_to_der       155 ext/openssl/ossl.h VALUE ossl_to_der(VALUE);
ossl_to_der       295 ext/openssl/ossl_asn1.c     str = ossl_to_der(obj);


ossl_to_der_if_possible

ossl_to_der_if_possible  156 ext/openssl/ossl.h VALUE ossl_to_der_if_possible(VALUE);
ossl_to_der_if_possible  671 ext/openssl/ossl_asn1.c     i = ossl_to_der_if_possible(i);
ossl_to_der_if_possible  825 ext/openssl/ossl_asn1.c     obj = ossl_to_der_if_possible(obj);
ossl_to_der_if_possible  841 ext/openssl/ossl_asn1.c     obj = ossl_to_der_if_possible(obj);
ossl_to_der_if_possible  858 ext/openssl/ossl_asn1.c     obj = ossl_to_der_if_possible(obj);
ossl_to_der_if_possible  110 ext/openssl/ossl_ocsp.c 	arg = ossl_to_der_if_possible(arg);
ossl_to_der_if_possible  317 ext/openssl/ossl_ocsp.c 	arg = ossl_to_der_if_possible(arg);
ossl_to_der_if_possible  299 ext/openssl/ossl_pkcs7.c     arg = ossl_to_der_if_possible(arg);
ossl_to_der_if_possible  144 ext/openssl/ossl_pkey_dh.c 	arg = ossl_to_der_if_possible(arg);
ossl_to_der_if_possible  136 ext/openssl/ossl_pkey_dsa.c 	arg = ossl_to_der_if_possible(arg);
ossl_to_der_if_possible  126 ext/openssl/ossl_pkey_rsa.c 	arg = ossl_to_der_if_possible(arg);
ossl_to_der_if_possible   96 ext/openssl/ossl_x509attr.c 	oid = ossl_to_der_if_possible(oid);
ossl_to_der_if_possible  139 ext/openssl/ossl_x509cert.c     arg = ossl_to_der_if_possible(arg);
ossl_to_der_if_possible  100 ext/openssl/ossl_x509crl.c     arg = ossl_to_der_if_possible(arg);
ossl_to_der_if_possible  281 ext/openssl/ossl_x509ext.c 	oid = ossl_to_der_if_possible(oid);
ossl_to_der_if_possible  320 ext/openssl/ossl_x509ext.c     data = ossl_to_der_if_possible(data);
ossl_to_der_if_possible  132 ext/openssl/ossl_x509name.c 	    VALUE str = ossl_to_der_if_possible(arg);
ossl_to_der_if_possible  108 ext/openssl/ossl_x509req.c     arg = ossl_to_der_if_possible(arg);


ossl_verify_cb

ossl_verify_cb    149 ext/openssl/ossl.h int ossl_verify_cb(int, X509_STORE_CTX *);
ossl_verify_cb    270 ext/openssl/ossl_ssl.c     return ossl_verify_cb(preverify_ok, ctx);
ossl_verify_cb    127 ext/openssl/ossl_x509store.c     X509_STORE_set_verify_cb_func(store, ossl_verify_cb);


ossl_x509_get_issuer

ossl_x509_get_issuer  611 ext/openssl/ossl_x509cert.c     rb_str_append(str, rb_inspect(ossl_x509_get_issuer(self)));
ossl_x509_get_issuer  655 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "issuer", ossl_x509_get_issuer, 0);


ossl_x509_get_not_after

ossl_x509_get_not_after  623 ext/openssl/ossl_x509cert.c     rb_str_append(str, rb_inspect(ossl_x509_get_not_after(self)));
ossl_x509_get_not_after  659 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "not_after", ossl_x509_get_not_after, 0);


ossl_x509_get_not_before

ossl_x509_get_not_before  619 ext/openssl/ossl_x509cert.c     rb_str_append(str, rb_inspect(ossl_x509_get_not_before(self)));
ossl_x509_get_not_before  657 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "not_before", ossl_x509_get_not_before, 0);


ossl_x509_get_serial

ossl_x509_get_serial  615 ext/openssl/ossl_x509cert.c     rb_str_append(str, rb_inspect(ossl_x509_get_serial(self)));
ossl_x509_get_serial  651 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "serial", ossl_x509_get_serial, 0);


ossl_x509_get_subject

ossl_x509_get_subject  607 ext/openssl/ossl_x509cert.c     rb_str_append(str, rb_inspect(ossl_x509_get_subject(self)));
ossl_x509_get_subject  653 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "subject", ossl_x509_get_subject, 0);


ossl_x509_new

ossl_x509_new     101 ext/openssl/ossl_pkcs12.c     cert = rb_protect((VALUE(*)_((VALUE)))ossl_x509_new, (VALUE)x509, &st);
ossl_x509_new     746 ext/openssl/ossl_ssl.c     return ossl_x509_new(cert);
ossl_x509_new     768 ext/openssl/ossl_ssl.c     obj = ossl_x509_new(cert);
ossl_x509_new     794 ext/openssl/ossl_ssl.c 	rb_ary_push(ary, ossl_x509_new(cert));
ossl_x509_new      37 ext/openssl/ossl_x509.h VALUE ossl_x509_new(X509 *);
ossl_x509_new     221 ext/openssl/ossl_x509req.c     return ossl_x509_new(x509);
ossl_x509_new     432 ext/openssl/ossl_x509store.c 	rb_ary_push(ary, ossl_x509_new(x509));
ossl_x509_new     488 ext/openssl/ossl_x509store.c     return ossl_x509_new(X509_STORE_CTX_get_current_cert(ctx));


ossl_x509attr_new

ossl_x509attr_new   27 ext/openssl/ossl_x509.h VALUE ossl_x509attr_new(X509_ATTRIBUTE *);
ossl_x509attr_new  391 ext/openssl/ossl_x509req.c 	rb_ary_push(ary, ossl_x509attr_new(attr));


ossl_x509crl_new

ossl_x509crl_new   49 ext/openssl/ossl_x509.h VALUE ossl_x509crl_new(X509_CRL *);
ossl_x509crl_new  500 ext/openssl/ossl_x509store.c     return ossl_x509crl_new(ctx->current_crl);


ossl_x509ext_new

ossl_x509ext_new  550 ext/openssl/ossl_ocsp.c 	    rb_ary_push(ext, ossl_x509ext_new(x509ext));
ossl_x509ext_new   61 ext/openssl/ossl_x509.h VALUE ossl_x509ext_new(X509_EXTENSION *);
ossl_x509ext_new  542 ext/openssl/ossl_x509cert.c 	rb_ary_push(ary, ossl_x509ext_new(ext));
ossl_x509ext_new  446 ext/openssl/ossl_x509crl.c 	rb_ary_push(ary, ossl_x509ext_new(ext));
ossl_x509ext_new  160 ext/openssl/ossl_x509revoked.c 	rb_ary_push(ary, ossl_x509ext_new(ext));


ossl_x509extfactory_set_crl

ossl_x509extfactory_set_crl  200 ext/openssl/ossl_x509ext.c 	ossl_x509extfactory_set_crl(self, crl);
ossl_x509extfactory_set_crl  442 ext/openssl/ossl_x509ext.c     rb_define_method(cX509ExtFactory, "crl=", ossl_x509extfactory_set_crl, 1);


ossl_x509extfactory_set_issuer_cert

ossl_x509extfactory_set_issuer_cert  194 ext/openssl/ossl_x509ext.c 	ossl_x509extfactory_set_issuer_cert(self, issuer_cert);
ossl_x509extfactory_set_issuer_cert  439 ext/openssl/ossl_x509ext.c     rb_define_method(cX509ExtFactory, "issuer_certificate=", ossl_x509extfactory_set_issuer_cert, 1);


ossl_x509extfactory_set_subject_cert

ossl_x509extfactory_set_subject_cert  196 ext/openssl/ossl_x509ext.c 	ossl_x509extfactory_set_subject_cert(self, subject_cert);
ossl_x509extfactory_set_subject_cert  440 ext/openssl/ossl_x509ext.c     rb_define_method(cX509ExtFactory, "subject_certificate=", ossl_x509extfactory_set_subject_cert, 1);


ossl_x509extfactory_set_subject_req

ossl_x509extfactory_set_subject_req  198 ext/openssl/ossl_x509ext.c 	ossl_x509extfactory_set_subject_req(self, subject_req);
ossl_x509extfactory_set_subject_req  441 ext/openssl/ossl_x509ext.c     rb_define_method(cX509ExtFactory, "subject_request=", ossl_x509extfactory_set_subject_req, 1);


ossl_x509name_add_entry

ossl_x509name_add_entry   91 ext/openssl/ossl_x509name.c static VALUE ossl_x509name_add_entry(int, VALUE*, VALUE);
ossl_x509name_add_entry  107 ext/openssl/ossl_x509name.c     ossl_x509name_add_entry(3, entry, self);
ossl_x509name_add_entry  316 ext/openssl/ossl_x509name.c     rb_define_method(cX509Name, "add_entry", ossl_x509name_add_entry, -1);


ossl_x509name_cmp0

ossl_x509name_cmp0  251 ext/openssl/ossl_x509name.c     result = ossl_x509name_cmp0(self, other);
ossl_x509name_cmp0  264 ext/openssl/ossl_x509name.c     result = ossl_x509name_cmp0(self, other);


ossl_x509name_new

ossl_x509name_new  823 ext/openssl/ossl_pkcs7.c     return ossl_x509name_new(p7si->issuer_and_serial->issuer);
ossl_x509name_new  898 ext/openssl/ossl_pkcs7.c     return ossl_x509name_new(p7ri->issuer_and_serial->issuer);
ossl_x509name_new   72 ext/openssl/ossl_x509.h VALUE ossl_x509name_new(X509_NAME *);
ossl_x509name_new  336 ext/openssl/ossl_x509cert.c     return ossl_x509name_new(name);
ossl_x509name_new  363 ext/openssl/ossl_x509cert.c     return ossl_x509name_new(name);
ossl_x509name_new  189 ext/openssl/ossl_x509crl.c     return ossl_x509name_new(X509_CRL_get_issuer(crl)); /* NO DUP - don't free */
ossl_x509name_new  265 ext/openssl/ossl_x509req.c     return ossl_x509name_new(name);


ossl_x509req_new

ossl_x509req_new   82 ext/openssl/ossl_x509.h VALUE ossl_x509req_new(X509_REQ *);
ossl_x509req_new  248 ext/openssl/ossl_x509cert.c     obj = ossl_x509req_new(req);


ossl_x509revoked_new

ossl_x509revoked_new   93 ext/openssl/ossl_x509.h VALUE ossl_x509revoked_new(X509_REVOKED *);
ossl_x509revoked_new  274 ext/openssl/ossl_x509crl.c 	revoked = ossl_x509revoked_new(rev);


ossl_x509stctx_clear_ptr

ossl_x509stctx_clear_ptr  221 ext/openssl/ossl.c 			    ossl_x509stctx_clear_ptr, rctx);
ossl_x509stctx_clear_ptr  109 ext/openssl/ossl_x509.h VALUE ossl_x509stctx_clear_ptr(VALUE);


ossl_x509stctx_free

ossl_x509stctx_free   35 ext/openssl/ossl_x509store.c     obj = Data_Wrap_Struct(klass, 0, ossl_x509stctx_free, ctx); \
ossl_x509stctx_free  312 ext/openssl/ossl_x509store.c static void ossl_x509stctx_free(X509_STORE_CTX*);


ossl_x509stctx_get_chain

ossl_x509stctx_get_chain  287 ext/openssl/ossl_x509store.c static VALUE ossl_x509stctx_get_chain(VALUE);
ossl_x509stctx_get_chain  304 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@chain", ossl_x509stctx_get_chain(ctx));
ossl_x509stctx_get_chain  600 ext/openssl/ossl_x509store.c     rb_define_method(x509stctx,"chain",       ossl_x509stctx_get_chain,0);


ossl_x509stctx_get_err

ossl_x509stctx_get_err  285 ext/openssl/ossl_x509store.c static VALUE ossl_x509stctx_get_err(VALUE);
ossl_x509stctx_get_err  302 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@error", ossl_x509stctx_get_err(ctx));
ossl_x509stctx_get_err  601 ext/openssl/ossl_x509store.c     rb_define_method(x509stctx,"error",       ossl_x509stctx_get_err, 0);


ossl_x509stctx_get_err_string

ossl_x509stctx_get_err_string  286 ext/openssl/ossl_x509store.c static VALUE ossl_x509stctx_get_err_string(VALUE);
ossl_x509stctx_get_err_string  303 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@error_string", ossl_x509stctx_get_err_string(ctx));
ossl_x509stctx_get_err_string  603 ext/openssl/ossl_x509store.c     rb_define_method(x509stctx,"error_string",ossl_x509stctx_get_err_string,0);


ossl_x509stctx_new

ossl_x509stctx_new  213 ext/openssl/ossl.c 	rctx = rb_protect((VALUE(*)(VALUE))ossl_x509stctx_new,
ossl_x509stctx_new  108 ext/openssl/ossl_x509.h VALUE ossl_x509stctx_new(X509_STORE_CTX *);


ossl_x509stctx_set_flags

ossl_x509stctx_set_flags  360 ext/openssl/ossl_x509store.c static VALUE ossl_x509stctx_set_flags(VALUE, VALUE);
ossl_x509stctx_set_flags  386 ext/openssl/ossl_x509store.c     ossl_x509stctx_set_flags(self, rb_iv_get(store, "@flags"));
ossl_x509stctx_set_flags  608 ext/openssl/ossl_x509store.c     rb_define_method(x509stctx,"flags=",      ossl_x509stctx_set_flags, 1);


ossl_x509stctx_set_purpose

ossl_x509stctx_set_purpose  361 ext/openssl/ossl_x509store.c static VALUE ossl_x509stctx_set_purpose(VALUE, VALUE);
ossl_x509stctx_set_purpose  387 ext/openssl/ossl_x509store.c     ossl_x509stctx_set_purpose(self, rb_iv_get(store, "@purpose"));
ossl_x509stctx_set_purpose  609 ext/openssl/ossl_x509store.c     rb_define_method(x509stctx,"purpose=",    ossl_x509stctx_set_purpose, 1);


ossl_x509stctx_set_time

ossl_x509stctx_set_time  363 ext/openssl/ossl_x509store.c static VALUE ossl_x509stctx_set_time(VALUE, VALUE);
ossl_x509stctx_set_time  391 ext/openssl/ossl_x509store.c 	ossl_x509stctx_set_time(self, t);
ossl_x509stctx_set_time  611 ext/openssl/ossl_x509store.c     rb_define_method(x509stctx,"time=",       ossl_x509stctx_set_time, 1);


ossl_x509stctx_set_trust

ossl_x509stctx_set_trust  362 ext/openssl/ossl_x509store.c static VALUE ossl_x509stctx_set_trust(VALUE, VALUE);
ossl_x509stctx_set_trust  388 ext/openssl/ossl_x509store.c     ossl_x509stctx_set_trust(self, rb_iv_get(store, "@trust"));
ossl_x509stctx_set_trust  610 ext/openssl/ossl_x509store.c     rb_define_method(x509stctx,"trust=",      ossl_x509stctx_set_trust, 1);


ossl_x509store_set_vfy_cb

ossl_x509store_set_vfy_cb  128 ext/openssl/ossl_x509store.c     ossl_x509store_set_vfy_cb(self, Qnil);
ossl_x509store_set_vfy_cb  583 ext/openssl/ossl_x509store.c     rb_define_method(cX509Store, "verify_callback=", ossl_x509store_set_vfy_cb, 1);


p_gamma

p_gamma            53 missing/erf.c      if (x < 1 + a) return 1 - p_gamma(a, x, loggamma_a);
p_gamma            76 missing/erf.c      if (x >= 0) return   p_gamma(0.5, x * x, LOG_PI_OVER_2);
p_gamma            77 missing/erf.c      else        return - p_gamma(0.5, x * x, LOG_PI_OVER_2);
p_gamma            87 missing/erf.c      else        return  1 + p_gamma(0.5, x * x, LOG_PI_OVER_2);


p_gid_exchange

p_gid_exchange   3483 process.c          return p_gid_exchange(obj);
p_gid_exchange   3500 process.c          p_gid_exchange(obj);
p_gid_exchange   3732 process.c          rb_define_module_function(rb_mProcGID, "re_exchange", p_gid_exchange, 0);


p_gid_sw_ensure

p_gid_sw_ensure  3462 process.c      	    return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, SAVED_GROUP_ID);
p_gid_sw_ensure  3470 process.c      	    return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, egid);
p_gid_sw_ensure  3503 process.c      	return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, obj);


p_len_string

p_len_string     5207 regcomp.c            p_len_string(f, len, 1, bp);
p_len_string     5219 regcomp.c            p_len_string(f, len, 2, bp);
p_len_string     5224 regcomp.c            p_len_string(f, len, 3, bp);
p_len_string     5246 regcomp.c            p_len_string(f, len, 1, bp);


p_string

p_string         5196 regcomp.c            p_string(f, 1, bp++); break;
p_string         5198 regcomp.c            p_string(f, 2, bp); bp += 2; break;
p_string         5200 regcomp.c            p_string(f, 3, bp); bp += 3; break;
p_string         5202 regcomp.c            p_string(f, 4, bp); bp += 4; break;
p_string         5204 regcomp.c            p_string(f, 5, bp); bp += 5; break;
p_string         5212 regcomp.c            p_string(f, 2, bp); bp += 2; break;
p_string         5214 regcomp.c            p_string(f, 4, bp); bp += 4; break;
p_string         5216 regcomp.c            p_string(f, 6, bp); bp += 6; break;
p_string         5241 regcomp.c            p_string(f, len, bp);
p_string         5331 regcomp.c            p_string(f, 1, bp);
p_string         5495 regcomp.c            p_string(f, cn->name_end - cn->name, cn->name);


p_uid_exchange

p_uid_exchange   3375 process.c          return p_uid_exchange(obj);
p_uid_exchange   3392 process.c          p_uid_exchange(obj);
p_uid_exchange   3731 process.c          rb_define_module_function(rb_mProcUID, "re_exchange", p_uid_exchange, 0);


p_uid_sw_ensure

p_uid_sw_ensure  3353 process.c      	    return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, SAVED_USER_ID);
p_uid_sw_ensure  3361 process.c      	    return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, euid);
p_uid_sw_ensure  3395 process.c      	return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, obj);


params

params            153 ext/Win32API/Win32API.c 	unsigned long params[16];
params            155 ext/Win32API/Win32API.c #define params param.params
params            191 ext/Win32API/Win32API.c 	params[i] = lParam;
params            237 ext/racc/cparse/cparse.c     struct cparse_params params;
params            238 ext/racc/cparse/cparse.c     struct cparse_params *v = &params;
params            253 ext/racc/cparse/cparse.c     struct cparse_params params;
params            254 ext/racc/cparse/cparse.c     struct cparse_params *v = &params;
params           1633 ext/tk/tcltklib.c     struct evloop_params *params = (struct evloop_params *)args;
params           1635 ext/tk/tcltklib.c     check_rootwidget_flag = params->check_root;
params           1637 ext/tk/tcltklib.c     if (lib_eventloop_core(params->check_root,
params           1638 ext/tk/tcltklib.c                            params->update_flag,
params           1639 ext/tk/tcltklib.c                            params->check_var,
params           1640 ext/tk/tcltklib.c                            params->interp)) {
params           5838 ext/win32ole/win32ole.c     VALUE params = rb_ary_new();
params           5841 ext/win32ole/win32ole.c         return params;
params           5850 ext/win32ole/win32ole.c         return params;
params           5862 ext/win32ole/win32ole.c             rb_ary_push(params, param);
params           5866 ext/win32ole/win32ole.c      return params;


paren_nest

paren_nest       3207 parse.y        			lpar_beg = ++paren_nest;
paren_nest       6303 parse.y        	paren_nest--;
paren_nest       6422 parse.y        	paren_nest++;
paren_nest       6429 parse.y        	paren_nest++;
paren_nest       6454 parse.y        	if (lpar_beg && lpar_beg == paren_nest) {
paren_nest       6457 parse.y        	    --paren_nest;
paren_nest       6791 parse.y        			if (lpar_beg && lpar_beg == paren_nest) {
paren_nest       6793 parse.y        			    --paren_nest;


parse_branch

parse_branch     5099 regparse.c       r = parse_branch(&node, tok, term, src, end, env);
parse_branch     5114 regparse.c           r = parse_branch(&node, tok, term, src, end, env);


parse_char_class

parse_char_class 4134 regparse.c     	r = parse_char_class(&anode, tok, &p, end, env);
parse_char_class 4897 regparse.c           r = parse_char_class(np, tok, src, end, env);


parse_config

parse_config       40 ext/openssl/ossl_config.c static CONF *parse_config(VALUE, CONF*);
parse_config       60 ext/openssl/ossl_config.c     return parse_config(str, NULL);
parse_config       97 ext/openssl/ossl_config.c     conf = parse_config(str, NULL);
parse_config      124 ext/openssl/ossl_config.c     parse_config(str, conf);


parse_ctype_to_enc_ctype

parse_ctype_to_enc_ctype 4053 regparse.c     	ctype = parse_ctype_to_enc_ctype(tok->u.subtype, &not);
parse_ctype_to_enc_ctype 4824 regparse.c     	  ctype = parse_ctype_to_enc_ctype(tok->u.subtype, &not);
parse_ctype_to_enc_ctype 4869 regparse.c                 ctype = parse_ctype_to_enc_ctype(tok->u.subtype, &not);


parse_exp

parse_exp        5062 regparse.c       r = parse_exp(&node, tok, term, src, end, env);
parse_exp        5072 regparse.c           r = parse_exp(&node, tok, term, src, end, env);


parse_main

parse_main        216 ext/racc/cparse/cparse.c static void parse_main _((struct cparse_params *v,
parse_main        244 ext/racc/cparse/cparse.c     parse_main(v, Qnil, Qnil, 0);
parse_main        261 ext/racc/cparse/cparse.c     parse_main(v, Qnil, Qnil, 0);
parse_main        300 ext/racc/cparse/cparse.c     parse_main(v, tok, val, 1);


parse_subexp

parse_subexp     4233 regparse.c     static int parse_subexp(Node** top, OnigToken* tok, int term,
parse_subexp     4264 regparse.c           r = parse_subexp(np, tok, term, &p, end, env);
parse_subexp     4404 regparse.c     	    r = parse_subexp(&target, tok, term, &p, end, env);
parse_subexp     4439 regparse.c       r = parse_subexp(&target, tok, term, &p, end, env);
parse_subexp     4708 regparse.c           r = parse_subexp(&target, tok, term, src, end, env);
parse_subexp     5143 regparse.c       r = parse_subexp(top, &tok, TK_EOT, src, end, env);


parser

parser            146 ext/racc/cparse/cparse.c     VALUE parser;          /* parser object */
parser            242 ext/racc/cparse/cparse.c     initialize_params(v, parser, arg, Qnil, Qnil);
parser            258 ext/racc/cparse/cparse.c     initialize_params(v, parser, arg, lexer, lexmid);
parser            336 ext/racc/cparse/cparse.c     v->parser = parser;
parser            341 ext/racc/cparse/cparse.c     v->debug = RTEST(rb_ivar_get(parser, id_yydebug));
parser            374 ext/racc/cparse/cparse.c     rb_ivar_set(parser, id_errstatus, LONG2NUM(v->errstatus));
parser            467 ext/racc/cparse/cparse.c                 tmp = rb_funcall(v->parser, id_nexttoken, 0);
parser            475 ext/racc/cparse/cparse.c                 rb_funcall(v->parser, id_d_read_token,
parser            512 ext/racc/cparse/cparse.c                 rb_ivar_set(v->parser, id_errstatus, LONG2NUM(v->errstatus));
parser            535 ext/racc/cparse/cparse.c             rb_funcall(v->parser, id_d_next_state,
parser            543 ext/racc/cparse/cparse.c     if (v->debug) rb_funcall(v->parser, id_d_accept, 0);
parser            553 ext/racc/cparse/cparse.c         rb_funcall(v->parser, id_onerror,
parser            566 ext/racc/cparse/cparse.c     rb_ivar_set(v->parser, id_errstatus, LONG2NUM(v->errstatus));
parser            614 ext/racc/cparse/cparse.c             rb_funcall(v->parser, id_d_e_pop,
parser            647 ext/racc/cparse/cparse.c         rb_funcall(v->parser, id_d_shift,
parser            662 ext/racc/cparse/cparse.c     v->errstatus = num_to_long(rb_ivar_get(v->parser, id_errstatus));
parser            717 ext/racc/cparse/cparse.c             tmp = rb_funcall(v->parser, mid,
parser            721 ext/racc/cparse/cparse.c             tmp = rb_funcall(v->parser, mid,
parser            730 ext/racc/cparse/cparse.c         rb_funcall(v->parser, id_d_reduce,
parser             21 ext/syck/bytecode.c #define YYCURSOR    parser->cursor
parser             22 ext/syck/bytecode.c #define YYMARKER    parser->marker
parser             23 ext/syck/bytecode.c #define YYLIMIT     parser->limit
parser             24 ext/syck/bytecode.c #define YYTOKEN     parser->token
parser             25 ext/syck/bytecode.c #define YYTOKTMP    parser->toktmp
parser             26 ext/syck/bytecode.c #define YYLINEPTR   parser->lineptr
parser             27 ext/syck/bytecode.c #define YYLINECTPTR parser->linectptr
parser             28 ext/syck/bytecode.c #define YYLINE      parser->linect
parser             29 ext/syck/bytecode.c #define YYFILL(n)   syck_parser_read(parser)
parser             49 ext/syck/bytecode.c #define ADD_LEVEL(len, status)  syck_parser_add_level( parser, len, status )
parser             50 ext/syck/bytecode.c #define POP_LEVEL()     syck_parser_pop_level( parser )
parser             51 ext/syck/bytecode.c #define CURRENT_LEVEL() syck_parser_current_level( parser )
parser             56 ext/syck/bytecode.c #define FORCE_NEXT_TOKEN(tok)    parser->force_token = tok;
parser            111 ext/syck/bytecode.c             syck_parser_pop_level( parser ); \
parser            138 ext/syck/bytecode.c     syck_parser_ptr = parser;
parser            141 ext/syck/bytecode.c         syck_parser_read( parser );
parser            144 ext/syck/bytecode.c     if ( parser->force_token != 0 )
parser            146 ext/syck/bytecode.c         int t = parser->force_token;
parser            147 ext/syck/bytecode.c         parser->force_token = 0;
parser            302 ext/syck/bytecode.c             sycklval->name = get_inline( parser );
parser            303 ext/syck/bytecode.c             syck_hdlr_remove_anchor( parser, sycklval->name );
parser            313 ext/syck/bytecode.c             sycklval->name = get_inline( parser );
parser            325 ext/syck/bytecode.c             qstr = get_inline( parser );
parser           1089 ext/syck/bytecode.c             if ( parser->implicit_typing == 1 )
parser           1091 ext/syck/bytecode.c                 try_tag_implicit( sycklval->nodeData, parser->taguri_expansion );
parser            103 ext/syck/gram.c #define YYPARSE_PARAM   parser
parser            104 ext/syck/gram.c #define YYLEX_PARAM     parser
parser            108 ext/syck/gram.c         if ( ((SyckParser *)parser)->taguri_expansion == 1 ) \
parser           1199 ext/syck/gram.c            ((SyckParser *)parser)->root = syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData );
parser           1206 ext/syck/gram.c            ((SyckParser *)parser)->root = syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData );
parser           1213 ext/syck/gram.c            ((SyckParser *)parser)->eof = 1;
parser           1220 ext/syck/gram.c             syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
parser           1241 ext/syck/gram.c            yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
parser           1262 ext/syck/gram.c                     NULL_NODE( parser, n );
parser           1270 ext/syck/gram.c                    if ( ((SyckParser *)parser)->implicit_typing == 1 )
parser           1272 ext/syck/gram.c                       try_tag_implicit( yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
parser           1281 ext/syck/gram.c                     syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
parser           1302 ext/syck/gram.c                    yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
parser           1309 ext/syck/gram.c                syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
parser           1325 ext/syck/gram.c                if ( ((SyckParser *)parser)->implicit_typing == 1 )
parser           1327 ext/syck/gram.c                   try_tag_implicit( yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
parser           1336 ext/syck/gram.c                yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
parser           1347 ext/syck/gram.c                yyval.nodeData = syck_hdlr_get_anchor( (SyckParser *)parser, yyvsp[0].name );
parser           1355 ext/syck/gram.c                if ( ((SyckParser *)parser)->taguri_expansion == 1 )
parser           1391 ext/syck/gram.c                     yyval.nodeId = syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData );
parser           1398 ext/syck/gram.c                     syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
parser           1406 ext/syck/gram.c                     syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
parser           1430 ext/syck/gram.c                     yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-2].name, yyvsp[0].nodeData );
parser           1437 ext/syck/gram.c                     yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
parser           1480 ext/syck/gram.c                     yyval.nodeData = syck_new_seq( syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
parser           1487 ext/syck/gram.c                     syck_seq_add( yyvsp[-2].nodeData, syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
parser           1495 ext/syck/gram.c                     apply_seq_in_map( (SyckParser *)parser, yyvsp[-1].nodeData );
parser           1503 ext/syck/gram.c                     apply_seq_in_map( (SyckParser *)parser, yyvsp[-1].nodeData );
parser           1511 ext/syck/gram.c                     syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
parser           1519 ext/syck/gram.c                     syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
parser           1543 ext/syck/gram.c                     yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-2].name, yyvsp[0].nodeData );
parser           1550 ext/syck/gram.c                     yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
parser           1565 ext/syck/gram.c                         syck_hdlr_add_node( (SyckParser *)parser, yyvsp[-2].nodeData ),
parser           1566 ext/syck/gram.c                         syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
parser           1588 ext/syck/gram.c                     apply_seq_in_map( (SyckParser *)parser, yyvsp[-2].nodeData );
parser           1607 ext/syck/gram.c                         syck_hdlr_add_node( (SyckParser *)parser, yyvsp[-2].nodeData ),
parser           1608 ext/syck/gram.c                         syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
parser           1639 ext/syck/gram.c                     NULL_NODE( parser, n );
parser           1641 ext/syck/gram.c                         syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ),
parser           1642 ext/syck/gram.c                         syck_hdlr_add_node( (SyckParser *)parser, n ) );
parser           1889 ext/syck/gram.c         syck_hdlr_add_node( parser, n->shortcut ) );
parser            109 ext/syck/rubyext.c     SyckParser *parser = syck_new_parser();
parser            110 ext/syck/rubyext.c     taint = syck_parser_assign_io(parser, &port);
parser            111 ext/syck/rubyext.c     syck_parser_handler( parser, syck_yaml2byte_handler );
parser            112 ext/syck/rubyext.c     syck_parser_error_handler( parser, NULL );
parser            113 ext/syck/rubyext.c     syck_parser_implicit_typing( parser, 0 );
parser            114 ext/syck/rubyext.c     syck_parser_taguri_expansion( parser, 0 );
parser            115 ext/syck/rubyext.c     oid = syck_parse( parser );
parser            116 ext/syck/rubyext.c     syck_lookup_sym( parser, oid, (char **)&sav );
parser            123 ext/syck/rubyext.c     syck_free_parser( parser );
parser            176 ext/syck/rubyext.c         syck_parser_str( parser, RSTRING(port)->ptr, RSTRING(port)->len, NULL );
parser            182 ext/syck/rubyext.c         syck_parser_str( parser, (char *)port, 0, rb_syck_io_str_read );
parser            681 ext/syck/rubyext.c     SyckParser *parser;
parser            682 ext/syck/rubyext.c     Data_Get_Struct(p, SyckParser, parser);
parser            683 ext/syck/rubyext.c     syck_parser_handler( parser, rb_syck_load_handler );
parser            689 ext/syck/rubyext.c     syck_parser_implicit_typing( parser, 1 );
parser            690 ext/syck/rubyext.c     syck_parser_taguri_expansion( parser, 1 );
parser            698 ext/syck/rubyext.c         syck_parser_set_input_type( parser, syck_bytecode_utf8 );
parser            702 ext/syck/rubyext.c         syck_parser_set_input_type( parser, syck_yaml_utf8 );
parser            704 ext/syck/rubyext.c     syck_parser_error_handler( parser, rb_syck_err_handler );
parser            705 ext/syck/rubyext.c     syck_parser_bad_anchor_handler( parser, rb_syck_bad_anchor_handler );
parser            722 ext/syck/rubyext.c     struct parser_xtra *bonus = (struct parser_xtra *)parser->bonus;
parser            723 ext/syck/rubyext.c     rb_gc_mark_maybe(parser->root);
parser            724 ext/syck/rubyext.c     rb_gc_mark_maybe(parser->root_on_error);
parser            729 ext/syck/rubyext.c     if ( parser->anchors != NULL )
parser            731 ext/syck/rubyext.c         st_foreach( parser->anchors, syck_st_mark_nodes, 0 );
parser            733 ext/syck/rubyext.c     if ( parser->bad_anchors != NULL )
parser            735 ext/syck/rubyext.c         st_foreach( parser->bad_anchors, syck_st_mark_nodes, 0 );
parser            759 ext/syck/rubyext.c     SyckParser *parser = syck_new_parser();
parser            761 ext/syck/rubyext.c     parser->bonus = S_ALLOC( struct parser_xtra );
parser            762 ext/syck/rubyext.c     S_MEMZERO( parser->bonus, struct parser_xtra, 1 );
parser            764 ext/syck/rubyext.c     pobj = Data_Wrap_Struct( class, syck_mark_parser, rb_syck_free_parser, parser );
parser            766 ext/syck/rubyext.c     syck_parser_set_root_on_error( parser, Qnil );
parser            801 ext/syck/rubyext.c     SyckParser *parser;
parser            805 ext/syck/rubyext.c         Data_Get_Struct(self, SyckParser, parser);
parser            806 ext/syck/rubyext.c         parser->bufsize = n;
parser            818 ext/syck/rubyext.c     SyckParser *parser;
parser            820 ext/syck/rubyext.c     Data_Get_Struct(self, SyckParser, parser);
parser            821 ext/syck/rubyext.c     return INT2FIX( parser->bufsize );
parser            834 ext/syck/rubyext.c     SyckParser *parser;
parser            841 ext/syck/rubyext.c     Data_Get_Struct(self, SyckParser, parser);
parser            844 ext/syck/rubyext.c     bonus = (struct parser_xtra *)parser->bonus;
parser            845 ext/syck/rubyext.c     bonus->taint = syck_parser_assign_io(parser, &port);
parser            851 ext/syck/rubyext.c     return syck_parse( parser );
parser            864 ext/syck/rubyext.c     SyckParser *parser;
parser            871 ext/syck/rubyext.c     Data_Get_Struct(self, SyckParser, parser);
parser            874 ext/syck/rubyext.c     bonus = (struct parser_xtra *)parser->bonus;
parser            875 ext/syck/rubyext.c     bonus->taint = syck_parser_assign_io(parser, &port);
parser            885 ext/syck/rubyext.c         v = syck_parse( parser );
parser            886 ext/syck/rubyext.c         if ( parser->eof == 1 )
parser             24 ext/syck/token.c #define YYCURSOR    parser->cursor
parser             25 ext/syck/token.c #define YYMARKER    parser->marker
parser             26 ext/syck/token.c #define YYLIMIT     parser->limit
parser             27 ext/syck/token.c #define YYTOKEN     parser->token
parser             28 ext/syck/token.c #define YYTOKTMP    parser->toktmp
parser             29 ext/syck/token.c #define YYLINEPTR   parser->lineptr
parser             30 ext/syck/token.c #define YYLINECTPTR parser->linectptr
parser             31 ext/syck/token.c #define YYLINE      parser->linect
parser             32 ext/syck/token.c #define YYFILL(n)   syck_parser_read(parser)
parser             48 ext/syck/token.c #define ADD_LEVEL(len, status)  syck_parser_add_level( parser, len, status )
parser             49 ext/syck/token.c #define POP_LEVEL()     syck_parser_pop_level( parser )
parser             50 ext/syck/token.c #define CURRENT_LEVEL() syck_parser_current_level( parser )
parser             55 ext/syck/token.c #define FORCE_NEXT_TOKEN(tok)    parser->force_token = tok;
parser             83 ext/syck/token.c             syck_parser_pop_level( parser ); \
parser            127 ext/syck/token.c         if ( parser->implicit_typing == 1 ) \
parser            129 ext/syck/token.c             try_tag_implicit( sycklval->nodeData, parser->taguri_expansion ); \
parser            160 ext/syck/token.c         if ( ((SyckParser *)parser)->taguri_expansion == 1 ) \
parser            224 ext/syck/token.c             parser->lvl_idx--; \
parser            227 ext/syck/token.c             parser->lvl_idx++; \
parser            255 ext/syck/token.c     switch ( parser->input_type )
parser            258 ext/syck/token.c         return sycklex_yaml_utf8( sycklval, parser );
parser            269 ext/syck/token.c         return sycklex_bytecode_utf8( sycklval, parser );
parser            281 ext/syck/token.c     syck_parser_ptr = parser;
parser            284 ext/syck/token.c         syck_parser_read( parser );
parser            287 ext/syck/token.c     if ( parser->force_token != 0 )
parser            289 ext/syck/token.c         int t = parser->force_token;
parser            290 ext/syck/token.c         parser->force_token = 0;
parser            348 ext/syck/token.c {   eat_comments( parser );
parser            804 ext/syck/token.c {   eat_comments( parser );
parser           1033 ext/syck/token.c                         syck_hdlr_remove_anchor(parser, sycklval->name);
parser           1659 ext/syck/token.c {   eat_comments( parser );
parser           1834 ext/syck/token.c                         if ( ((SyckParser *)parser)->taguri_expansion == 1 )
parser           2002 ext/syck/token.c                         if ( ((SyckParser *)parser)->taguri_expansion == 1 )
parser           2493 ext/syck/token.c                             eat_comments( parser );
parser            222 ext/syck/yaml2byte.c     SyckParser *parser = syck_new_parser();
parser            223 ext/syck/yaml2byte.c     syck_parser_str_auto( parser, yamlstr, NULL );
parser            224 ext/syck/yaml2byte.c     syck_parser_handler( parser, syck_yaml2byte_handler );
parser            225 ext/syck/yaml2byte.c     syck_parser_error_handler( parser, NULL );
parser            226 ext/syck/yaml2byte.c     syck_parser_implicit_typing( parser, 1 );
parser            227 ext/syck/yaml2byte.c     syck_parser_taguri_expansion( parser, 1 );
parser            228 ext/syck/yaml2byte.c     oid = syck_parse( parser );
parser            230 ext/syck/yaml2byte.c     if ( syck_lookup_sym( parser, oid, (char **)&sav ) == 1 ) {
parser            241 ext/syck/yaml2byte.c     syck_free_parser( parser );
parser             28 parse.y        #define YYMALLOC(size)		rb_parser_malloc(parser, size)
parser             29 parse.y        #define YYREALLOC(ptr, size)	rb_parser_realloc(parser, ptr, size)
parser             30 parse.y        #define YYCALLOC(nelem, size)	rb_parser_calloc(parser, nelem, size)
parser             31 parse.y        #define YYFREE(ptr)		rb_parser_free(parser, ptr)
parser            195 parse.y        #define yyerror(msg) parser_yyerror(parser, msg)
parser            201 parse.y        #define ruby_eval_tree		(parser->parser_eval_tree)
parser            202 parse.y        #define ruby_eval_tree_begin	(parser->parser_eval_tree_begin)
parser            203 parse.y        #define lex_strterm		(parser->parser_lex_strterm)
parser            204 parse.y        #define lex_state		(parser->parser_lex_state)
parser            205 parse.y        #define cond_stack		(parser->parser_cond_stack)
parser            206 parse.y        #define cmdarg_stack		(parser->parser_cmdarg_stack)
parser            207 parse.y        #define class_nest		(parser->parser_class_nest)
parser            208 parse.y        #define paren_nest		(parser->parser_paren_nest)
parser            209 parse.y        #define lpar_beg		(parser->parser_lpar_beg)
parser            210 parse.y        #define in_single		(parser->parser_in_single)
parser            211 parse.y        #define in_def			(parser->parser_in_def)
parser            212 parse.y        #define compile_for_eval	(parser->parser_compile_for_eval)
parser            213 parse.y        #define cur_mid			(parser->parser_cur_mid)
parser            214 parse.y        #define in_defined		(parser->parser_in_defined)
parser            215 parse.y        #define tokenbuf		(parser->parser_tokenbuf)
parser            216 parse.y        #define tokidx			(parser->parser_tokidx)
parser            217 parse.y        #define toksiz			(parser->parser_toksiz)
parser            218 parse.y        #define lex_input		(parser->parser_lex_input)
parser            219 parse.y        #define lex_lastline		(parser->parser_lex_lastline)
parser            220 parse.y        #define lex_pbeg		(parser->parser_lex_pbeg)
parser            221 parse.y        #define lex_p			(parser->parser_lex_p)
parser            222 parse.y        #define lex_pend		(parser->parser_lex_pend)
parser            223 parse.y        #define heredoc_end		(parser->parser_heredoc_end)
parser            224 parse.y        #define command_start		(parser->parser_command_start)
parser            225 parse.y        #define lex_gets_ptr		(parser->parser_lex_gets_ptr)
parser            226 parse.y        #define lex_gets		(parser->parser_lex_gets)
parser            227 parse.y        #define lvtbl			(parser->parser_lvtbl)
parser            228 parse.y        #define ruby__end__seen		(parser->parser_ruby__end__seen)
parser            230 parse.y        #define ruby_sourceline		(parser->parser_ruby_sourceline)
parser            231 parse.y        #define ruby_sourcefile		(parser->parser_ruby_sourcefile)
parser            233 parse.y        #define ruby_debug_lines	(parser->debug_lines)
parser            243 parse.y        #define cond(node) cond_gen(parser, node)
parser            245 parse.y        #define logop(type,node1,node2) logop_gen(parser, type, node1, node2)
parser            255 parse.y        #define value_expr(node) value_expr_gen(parser, (node) = remove_begin(node))
parser            256 parse.y        #define void_expr(node) void_expr_gen(parser, (node) = remove_begin(node))
parser            258 parse.y        #define void_stmts(node) void_stmts_gen(parser, node)
parser            271 parse.y        #define call_op(recv,id,narg,arg1) call_op_gen(parser, recv,id,narg,arg1)
parser            274 parse.y        #define new_args(f,o,r,b) new_args_gen(parser, f,o,r,b)
parser            276 parse.y        #define shadowing_lvar(name) shadowing_lvar_gen(parser, name)
parser            283 parse.y        #define new_fcall(id,args) new_fcall_gen(parser, id, args)
parser            288 parse.y        #define gettable(id) gettable_gen(parser,id)
parser            290 parse.y        #define assignable(id,node) assignable_gen(parser, id, node)
parser            292 parse.y        #define new_bv(id,node) new_bv_gen(parser, id, node)
parser            294 parse.y        #define aryset(node1,node2) aryset_gen(parser, node1, node2)
parser            296 parse.y        #define attrset(node,id) attrset_gen(parser, node, id)
parser            300 parse.y        #define node_assign(node1, node2) node_assign_gen(parser, node1, node2)
parser            303 parse.y        #define match_op(node1,node2) match_op_gen(parser, node1, node2)
parser            306 parse.y        #define local_push(top) local_push_gen(parser,top)
parser            308 parse.y        #define local_pop() local_pop_gen(parser)
parser            310 parse.y        #define local_append(id) local_append_gen(parser, id)
parser            312 parse.y        #define local_cnt(id) local_cnt_gen(parser, id)
parser            314 parse.y        #define local_id(id) local_id_gen(parser, id)
parser            316 parse.y        #define local_tbl() local_tbl_gen(parser)
parser            320 parse.y        #define dyna_push() dyna_push_gen(parser)
parser            322 parse.y        #define dyna_pop(vars) dyna_pop_gen(parser, vars)
parser            324 parse.y        #define dyna_in_block() dyna_in_block_gen(parser)
parser            326 parse.y        #define dyna_init(node, pre) dyna_init_gen(parser, node, pre)
parser            328 parse.y        #define dyna_var(id) dyna_var_gen(parser, id)
parser            330 parse.y        #define dyna_check(id) dyna_check_gen(parser, id)
parser            333 parse.y        #define top_local_init() top_local_init_gen(parser)
parser            335 parse.y        #define top_local_setup() top_local_setup_gen(parser)
parser            340 parse.y        #define lvar_defined(id) lvar_defined_gen(parser, id)
parser            372 parse.y        #define dispatch0(n)            ripper_dispatch0(parser, TOKEN_PASTE(ripper_id_, n))
parser            373 parse.y        #define dispatch1(n,a)          ripper_dispatch1(parser, TOKEN_PASTE(ripper_id_, n), a)
parser            374 parse.y        #define dispatch2(n,a,b)        ripper_dispatch2(parser, TOKEN_PASTE(ripper_id_, n), a, b)
parser            375 parse.y        #define dispatch3(n,a,b,c)      ripper_dispatch3(parser, TOKEN_PASTE(ripper_id_, n), a, b, c)
parser            376 parse.y        #define dispatch4(n,a,b,c,d)    ripper_dispatch4(parser, TOKEN_PASTE(ripper_id_, n), a, b, c, d)
parser            377 parse.y        #define dispatch5(n,a,b,c,d,e)  ripper_dispatch5(parser, TOKEN_PASTE(ripper_id_, n), a, b, c, d, e)
parser            428 parse.y        # define rb_warn0(fmt)    ripper_warn0(parser, fmt)
parser            429 parse.y        # define rb_warnI(fmt,a)  ripper_warnI(parser, fmt, a)
parser            430 parse.y        # define rb_warnS(fmt,a)  ripper_warnS(parser, fmt, a)
parser            431 parse.y        # define rb_warning0(fmt) ripper_warning0(parser, fmt)
parser            432 parse.y        # define rb_warningS(fmt,a) ripper_warningS(parser, fmt, a)
parser            444 parse.y        # define PARSER_ARG parser,
parser           4407 parse.y        # define yylval  (*((YYSTYPE*)(parser->parser_yylval)))
parser           4414 parse.y        # define nextc()                   parser_nextc(parser)
parser           4415 parse.y        # define pushback(c)               parser_pushback(parser, c)
parser           4416 parse.y        # define newtok()                  parser_newtok(parser)
parser           4417 parse.y        # define tokadd(c)                 parser_tokadd(parser, c)
parser           4418 parse.y        # define read_escape()             parser_read_escape(parser)
parser           4419 parse.y        # define tokadd_escape(t)          parser_tokadd_escape(parser, t)
parser           4420 parse.y        # define regx_options()            parser_regx_options(parser)
parser           4421 parse.y        # define tokadd_string(f,t,p,n)    parser_tokadd_string(parser,f,t,p,n)
parser           4422 parse.y        # define parse_string(n)           parser_parse_string(parser,n)
parser           4423 parse.y        # define here_document(n)          parser_here_document(parser,n)
parser           4424 parse.y        # define heredoc_identifier()      parser_heredoc_identifier(parser)
parser           4425 parse.y        # define heredoc_restore(n)        parser_heredoc_restore(parser,n)
parser           4426 parse.y        # define whole_match_p(e,l,i)      parser_whole_match_p(parser,e,l,i)
parser           4459 parse.y            if (lex_p < parser->tokp) rb_raise(rb_eRuntimeError, "lex_p < tokp");
parser           4460 parse.y            if (lex_p == parser->tokp) return;
parser           4461 parse.y            str = rb_str_new(parser->tokp, lex_p - parser->tokp);
parser           4462 parse.y            yylval.val = ripper_dispatch1(parser, ripper_token2eventid(t), str);
parser           4463 parse.y            ripper_flush(parser);
parser           4470 parse.y            const char *saved_tokp = parser->tokp;
parser           4472 parse.y            ruby_sourceline = parser->delayed_line;
parser           4473 parse.y            parser->tokp = lex_pbeg + parser->delayed_col;
parser           4474 parse.y            yylval.val = ripper_dispatch1(parser, ripper_token2eventid(t), parser->delayed);
parser           4475 parse.y            parser->delayed = Qnil;
parser           4477 parse.y            parser->tokp = saved_tokp;
parser           4554 parse.y            struct parser_params *parser;
parser           4557 parse.y            Data_Get_Struct(vparser, struct parser_params, parser);
parser           4584 parse.y            parser_prepare(parser);
parser           4585 parse.y            n = yyparse((void*)parser);
parser           4629 parse.y            VALUE line = (*parser->parser_lex_gets)(parser, parser->parser_lex_input);
parser           4650 parse.y            struct parser_params *parser;
parser           4652 parse.y            Data_Get_Struct(vparser, struct parser_params, parser);
parser           4691 parse.y            struct parser_params *parser;
parser           4693 parse.y            Data_Get_Struct(vparser, struct parser_params, parser);
parser           4708 parse.y        	if (parser->eofp)
parser           4711 parse.y        	    VALUE v = lex_getline(parser);
parser           4714 parse.y        		parser->eofp = Qtrue;
parser           4718 parse.y        	    if (parser->tokp < lex_pend) {
parser           4719 parse.y        		if (NIL_P(parser->delayed)) {
parser           4720 parse.y        		    parser->delayed = rb_str_buf_new(1024);
parser           4721 parse.y        		    rb_str_buf_cat(parser->delayed,
parser           4722 parse.y        				   parser->tokp, lex_pend - parser->tokp);
parser           4723 parse.y        		    parser->delayed_line = ruby_sourceline;
parser           4724 parse.y        		    parser->delayed_col = parser->tokp - lex_pbeg;
parser           4727 parse.y        		    rb_str_buf_cat(parser->delayed,
parser           4728 parse.y        				   parser->tokp, lex_pend - parser->tokp);
parser           4737 parse.y        	    parser->line_count++;
parser           4741 parse.y        	    ripper_flush(parser);
parser           4769 parse.y        #define lex_goto_eol(parser) (parser->parser_lex_p = parser->parser_lex_pend)
parser           5146 parse.y        # define NEW_STRTERM(func, term, paren) ripper_new_strterm(parser, func, term, paren)
parser           5263 parse.y            ripper_dispatch_scan_event(parser, tHEREDOC_BEG);
parser           5266 parse.y            lex_goto_eol(parser);
parser           5273 parse.y            ripper_flush(parser);
parser           5284 parse.y            if (!NIL_P(parser->delayed))
parser           5285 parse.y        	ripper_dispatch_delayed_token(parser, tSTRING_CONTENT);
parser           5286 parse.y            lex_goto_eol(parser);
parser           5287 parse.y            ripper_dispatch_scan_event(parser, tHEREDOC_END);
parser           5299 parse.y            ripper_flush(parser);
parser           5363 parse.y        	    lex_goto_eol(parser);
parser           5415 parse.y        #define arg_ambiguous() ripper_arg_ambiguous(parser)
parser           5435 parse.y            if (parser && parser->line_count != (parser->has_shebang ? 2 : 1))
parser           5555 parse.y        		(*p->func)(parser, RSTRING(name)->ptr, RSTRING(val)->ptr);
parser           5573 parse.y        	if (peek('!')) parser->has_shebang = 1;
parser           5640 parse.y            ripper_dispatch_scan_event(parser, tSP);
parser           5656 parse.y        	if (!parser->has_shebang || parser->line_count != 1) {
parser           5658 parse.y        	    parser_pragma(parser, lex_p, lex_pend - lex_p);
parser           5662 parse.y        	ripper_dispatch_scan_event(parser, tCOMMENT);
parser           5675 parse.y        		ripper_dispatch_scan_event(parser, tIGNORED_NL);
parser           5741 parse.y        		lex_goto_eol(parser);
parser           5742 parse.y        		ripper_dispatch_scan_event(parser, tEMBDOC_BEG);
parser           5745 parse.y        		    lex_goto_eol(parser);
parser           5748 parse.y        			ripper_dispatch_scan_event(parser, tEMBDOC);
parser           5763 parse.y        		lex_goto_eol(parser);
parser           5765 parse.y        		ripper_dispatch_scan_event(parser, tEMBDOC_END);
parser           6476 parse.y        	    ripper_dispatch_scan_event(parser, tSP);
parser           6697 parse.y        	    lex_goto_eol(parser);
parser           6698 parse.y        	    ripper_dispatch_scan_event(parser, k__END__);
parser           6856 parse.y            struct parser_params *parser = (struct parser_params*)p;
parser           6860 parse.y            parser->parser_yylval = (union tmpyystype*)lval;
parser           6861 parse.y            parser->parser_yylval->val = Qundef;
parser           6863 parse.y            t = parser_yylex(parser);
parser           6865 parse.y            if (!NIL_P(parser->delayed)) {
parser           6866 parse.y        	ripper_dispatch_delayed_token(parser, t);
parser           6870 parse.y        	ripper_dispatch_scan_event(parser, t);
parser           7678 parse.y            node = cond0(parser, node);
parser           7712 parse.y            assign_in_cond(parser, node);
parser           7730 parse.y        	node->nd_1st = cond0(parser, node->nd_1st);
parser           7731 parse.y        	node->nd_2nd = cond0(parser, node->nd_2nd);
parser           7736 parse.y        	node->nd_beg = range_op(parser, node->nd_beg);
parser           7737 parse.y        	node->nd_end = range_op(parser, node->nd_end);
parser           7775 parse.y            return cond0(parser, node);
parser           8595 parse.y            struct parser_params *parser;
parser           8598 parse.y            Data_Get_Struct(vparser, struct parser_params, parser);
parser           8653 parse.y            parser->eofp = Qfalse;
parser           8655 parse.y            parser->parser_lex_strterm = 0;
parser           8656 parse.y            parser->parser_cond_stack = 0;
parser           8657 parse.y            parser->parser_cmdarg_stack = 0;
parser           8658 parse.y            parser->parser_class_nest = 0;
parser           8659 parse.y            parser->parser_paren_nest = 0;
parser           8660 parse.y            parser->parser_lpar_beg = 0;
parser           8661 parse.y            parser->parser_in_single = 0;
parser           8662 parse.y            parser->parser_in_def = 0;
parser           8663 parse.y            parser->parser_in_defined = 0;
parser           8664 parse.y            parser->parser_compile_for_eval = 0;
parser           8665 parse.y            parser->parser_cur_mid = 0;
parser           8666 parse.y            parser->parser_tokenbuf = NULL;
parser           8667 parse.y            parser->parser_tokidx = 0;
parser           8668 parse.y            parser->parser_toksiz = 0;
parser           8669 parse.y            parser->parser_heredoc_end = 0;
parser           8670 parse.y            parser->parser_command_start = Qtrue;
parser           8671 parse.y            parser->parser_lex_pbeg = 0;
parser           8672 parse.y            parser->parser_lex_p = 0;
parser           8673 parse.y            parser->parser_lex_pend = 0;
parser           8674 parse.y            parser->parser_lvtbl = 0;
parser           8675 parse.y            parser->parser_ruby__end__seen = 0;
parser           8677 parse.y            parser->parser_eval_tree_begin = 0;
parser           8678 parse.y            parser->parser_eval_tree = 0;
parser           8680 parse.y            parser->parser_ruby_sourcefile = Qnil;
parser           8681 parse.y            parser->delayed = Qnil;
parser           8683 parse.y            parser->result = Qnil;
parser           8684 parse.y            parser->parsing_thread = Qnil;
parser           8685 parse.y            parser->toplevel_p = Qtrue;
parser           8688 parse.y            parser->heap = NULL;
parser           8764 parse.y            struct parser_params *parser;
parser           8766 parse.y            Data_Get_Struct(vparser, struct parser_params, parser);
parser           8873 parse.y            return rb_funcall(parser->value, mid, 0);
parser           8880 parse.y            return rb_funcall(parser->value, mid, 1, a);
parser           8888 parse.y            return rb_funcall(parser->value, mid, 2, a, b);
parser           8897 parse.y            return rb_funcall(parser->value, mid, 3, a, b, c);
parser           8907 parse.y            return rb_funcall(parser->value, mid, 4, a, b, c, d);
parser           8918 parse.y            return rb_funcall(parser->value, mid, 5, a, b, c, d, e);
parser           9033 parse.y            rb_funcall(parser->value, rb_intern("compile_error"), 1, str);
parser           9039 parse.y            rb_funcall(parser->value, rb_intern("warn"), 1, rb_str_new2(fmt));
parser           9045 parse.y            rb_funcall(parser->value, rb_intern("warn"), 2,
parser           9052 parse.y            rb_funcall(parser->value, rb_intern("warn"), 2,
parser           9059 parse.y            rb_funcall(parser->value, rb_intern("warning"), 1, rb_str_new2(fmt));
parser           9065 parse.y            rb_funcall(parser->value, rb_intern("warning"), 2,
parser           9103 parse.y            struct parser_params *parser;
parser           9106 parse.y            Data_Get_Struct(self, struct parser_params, parser);
parser           9109 parse.y                parser->parser_lex_gets = ripper_lex_get_generic;
parser           9113 parse.y        	parser->parser_lex_gets = lex_get_str;
parser           9115 parse.y            parser->parser_lex_input = src;
parser           9116 parse.y            parser->eofp = Qfalse;
parser           9123 parse.y            parser_initialize(parser);
parser           9124 parse.y            parser->parser_ruby_sourcefile = fname;
parser           9125 parse.y            parser->parser_ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1;
parser           9158 parse.y            struct parser_params *parser;
parser           9166 parse.y            struct parser_params *parser;
parser           9168 parse.y            Data_Get_Struct(parser_v, struct parser_params, parser);
parser           9169 parse.y            parser_prepare(parser);
parser           9170 parse.y            ripper_yyparse((void*)parser);
parser           9171 parse.y            return parser->result;
parser           9177 parse.y            struct parser_params *parser;
parser           9179 parse.y            Data_Get_Struct(parser_v, struct parser_params, parser);
parser           9180 parse.y            parser->parsing_thread = Qnil;
parser           9193 parse.y            struct parser_params *parser;
parser           9195 parse.y            Data_Get_Struct(self, struct parser_params, parser);
parser           9196 parse.y            if (!ripper_initialized_p(parser)) {
parser           9199 parse.y            if (!NIL_P(parser->parsing_thread)) {
parser           9200 parse.y        	if (parser->parsing_thread == rb_thread_current())
parser           9205 parse.y            parser->parsing_thread = rb_thread_current();
parser           9208 parse.y            return parser->result;
parser           9221 parse.y            struct parser_params *parser;
parser           9224 parse.y            Data_Get_Struct(self, struct parser_params, parser);
parser           9225 parse.y            if (!ripper_initialized_p(parser)) {
parser           9228 parse.y            if (NIL_P(parser->parsing_thread)) return Qnil;
parser           9229 parse.y            col = parser->tokp - parser->parser_lex_pbeg;
parser           9243 parse.y            struct parser_params *parser;
parser           9245 parse.y            Data_Get_Struct(self, struct parser_params, parser);
parser           9246 parse.y            if (!ripper_initialized_p(parser)) {
parser           9249 parse.y            if (NIL_P(parser->parsing_thread)) return Qnil;
parser           9250 parse.y            return INT2NUM(parser->parser_ruby_sourceline);
parser            850 ruby.c             VALUE parser;
parser            963 ruby.c             parser = rb_parser_new();
parser            964 ruby.c             ruby_eval_tree = rb_parser_compile_file(parser, fname, f, line_start);
parser            965 ruby.c             if (script && rb_parser_end_seen_p(parser)) {


parser_free

parser_free      8751 parse.y            return Data_Wrap_Struct(0, parser_mark, parser_free, p);
parser_free      9083 parse.y            self = Data_Wrap_Struct(klass, parser_mark, parser_free, p);


parser_here_document

parser_here_document 4412 parse.y        static int parser_here_document(struct parser_params*,NODE*);
parser_here_document 4423 parse.y        # define here_document(n)          parser_here_document(parser,n)


parser_initialize

parser_initialize 8742 parse.y            parser_initialize(p);
parser_initialize 9123 parse.y            parser_initialize(parser);


parser_mark

parser_mark      8751 parse.y            return Data_Wrap_Struct(0, parser_mark, parser_free, p);
parser_mark      9083 parse.y            self = Data_Wrap_Struct(klass, parser_mark, parser_free, p);


parser_parse_string

parser_parse_string 4411 parse.y        static int parser_parse_string(struct parser_params*,NODE*);
parser_parse_string 4422 parse.y        # define parse_string(n)           parser_parse_string(parser,n)


parser_prepare

parser_prepare   4544 parse.y        static void parser_prepare(struct parser_params *parser);
parser_prepare   4584 parse.y            parser_prepare(parser);
parser_prepare   9169 parse.y            parser_prepare(parser);


parser_regx_options

parser_regx_options 4409 parse.y        static int parser_regx_options(struct parser_params*);
parser_regx_options 4420 parse.y        # define regx_options()            parser_regx_options(parser)


parser_tokadd_string

parser_tokadd_string 4410 parse.y        static int parser_tokadd_string(struct parser_params*,int,int,int,long*);
parser_tokadd_string 4421 parse.y        # define tokadd_string(f,t,p,n)    parser_tokadd_string(parser,f,t,p,n)


parser_warn

parser_warn      7633 parse.y        	parser_warn(node->nd_value, "found = in conditional, should be ==");
parser_warn      7658 parse.y            if (!e_option_supplied()) parser_warn(node, str);
parser_warn      7745 parse.y        		parser_warn(node, "range literal in condition");


parser_warning

parser_warning   6958 parse.y        	parser_warning(h, "unused literal ignored");
parser_warning   6979 parse.y        	    parser_warning(nd, "statement not reached");
parser_warning   7396 parse.y        	    parser_warning(node, "void value expression");
parser_warning   7664 parse.y            if (!e_option_supplied()) parser_warning(node, str);
parser_warning   7751 parse.y        	parser_warning(node, "literal in condition");
parser_warning   7762 parse.y        	    parser_warning(node, "literal in condition");


parser_yyerror

parser_yyerror    194 parse.y        static int parser_yyerror(struct parser_params*, const char*);
parser_yyerror    195 parse.y        #define yyerror(msg) parser_yyerror(parser, msg)


path2class

path2class        974 marshal.c      	    VALUE c = path2class(r_unique(arg));
path2class       1131 marshal.c      	    klass = path2class(r_unique(arg));
path2class       1160 marshal.c      	    VALUE klass = path2class(r_unique(arg));
path2class       1179 marshal.c      	    VALUE klass = path2class(r_unique(arg));
path2class       1201 marshal.c      	    VALUE klass = path2class(r_unique(arg));
path2class       1214 marshal.c                 VALUE klass = path2class(r_unique(arg));
path2class       1252 marshal.c      	    v = path2class(RSTRING(str)->ptr);


path2module

path2module       959 marshal.c      	    VALUE m = path2module(r_unique(arg));
path2module      1261 marshal.c      	    v = path2module(RSTRING(str)->ptr);


path_check_0

path_check_0     4014 file.c         	return path_check_0(newpath, loadpath);
path_check_0     4042 file.c             return path_check_0(rb_str_new2(path), Qfalse);
path_check_0     4063 file.c         	if (!path_check_0(rb_str_new(p0, p - p0), Qtrue)) {


path_tainted_p

path_tainted_p   1645 hash.c         	path_tainted_p(getenv(PATH_ENV));
path_tainted_p   1787 hash.c         	    path_tainted_p(value);


pause

pause            10681 eval.c         	    pause();
pause            11305 eval.c         	pause();


peek

peek             5573 parse.y        	if (peek('!')) parser->has_shebang = 1;
peek             6383 parse.y        	if (lex_state != EXPR_END2 && peek(';')) {
peek             6730 parse.y            if ((c == '!' || c == '?') && is_identchar(tok()[0]) && !peek('=')) {
peek             6761 parse.y        		    if ((c = nextc()) == '=' && !peek('~') && !peek('>') &&
peek             6762 parse.y        			(!peek('=') || (lex_p + 1 < lex_pend && lex_p[1] == '>'))) {
peek             6816 parse.y        		if (peek(':') && !(lex_p + 1 < lex_pend && lex_p[1] == ':')) {


pending_exception_check0

pending_exception_check0 1378 ext/tk/tcltklib.c             if (pending_exception_check0()) {
pending_exception_check0 1512 ext/tk/tcltklib.c                     if (pending_exception_check0()) {
pending_exception_check0 2086 ext/tk/tcltklib.c     if (pending_exception_check0()) {


pending_exception_check1

pending_exception_check1 5642 ext/tk/tcltklib.c     if (pending_exception_check1(thr_crit_bup, ptr)) {
pending_exception_check1 5688 ext/tk/tcltklib.c     if (pending_exception_check1(thr_crit_bup, ptr)) {
pending_exception_check1 6655 ext/tk/tcltklib.c     if (pending_exception_check1(thr_crit_bup, ptr)) {


permute

permute           114 missing/crypt.c STATIC init_des(), init_perm(), permute();
permute           298 missing/crypt.c 	{ C_block tblk; permute(cpp,&tblk,p,8); LOAD (d,d0,d1,tblk); }
permute           300 missing/crypt.c 	{ C_block tblk; permute(cpp,&tblk,p,4); LOAD (d,d0,d1,tblk); }


pipe

pipe              712 ext/nkf/nkf-utf8/nkf.c             if (pipe(fds) < 0 || (pid = fork()) < 0){
pipe             2865 io.c                   if (pipe(arg.pair) < 0)
pipe             2869 io.c                   if (pipe(arg.pair) < 0)
pipe             4886 io.c               if (pipe(pipes) == -1)
pipe             1316 process.c      	if (pipe(ep)) return -1;
pipe              777 win32/win32.c  	*pipe = rb_w32_open_osfhandle((long)hDupFile, pipemode);
pipe              779 win32/win32.c  	if (*pipe == -1) {


pipe_open

pipe_open        3032 io.c           	port = pipe_open(RARRAY(tmp)->len, argv, mode);
pipe_open        3037 io.c           	port = pipe_open(1, &pname, mode);
pipe_open        3262 io.c           	return pipe_open(1, &cmd, mode);
pipe_open        4381 io.c               port = pipe_open(1, &str, "r");


pkcs7_get_certs_or_crls

pkcs7_get_certs_or_crls  584 ext/openssl/ossl_pkcs7.c     certs = pkcs7_get_certs_or_crls(self, 1);
pkcs7_get_certs_or_crls  594 ext/openssl/ossl_pkcs7.c     return ossl_x509_sk2ary(pkcs7_get_certs_or_crls(self, 1));
pkcs7_get_certs_or_crls  624 ext/openssl/ossl_pkcs7.c     crls = pkcs7_get_certs_or_crls(self, 0);
pkcs7_get_certs_or_crls  634 ext/openssl/ossl_pkcs7.c     return ossl_x509crl_sk2ary(pkcs7_get_certs_or_crls(self, 0));


pointer

pointer            61 missing/alloca.c extern pointer	xmalloc();
pointer           142 missing/alloca.c pointer
pointer           165 missing/alloca.c 	  xfree ((pointer) hp);	/* collect garbage */
pointer           181 missing/alloca.c     register pointer	new = xmalloc (sizeof (header) + size);
pointer           191 missing/alloca.c     return (pointer)((char *)new + sizeof(header));


poll_child_status

poll_child_status 2842 win32/win32.c  	    if ((pid = poll_child_status(child, stat_loc))) return pid;
poll_child_status 2863 win32/win32.c  	return poll_child_status(ChildRecord + ret, stat_loc);
poll_child_status 2872 win32/win32.c  	while (!(pid = poll_child_status(child, stat_loc))) {


pop_thread_anchor

pop_thread_anchor 1008 eval.c         static void pop_thread_anchor(struct ruby_env *);
pop_thread_anchor 1015 eval.c         	pop_thread_anchor(&_interp);		 \


popen_redirect

popen_redirect   2813 io.c               popen_redirect(p);
popen_redirect   2884 io.c           	    popen_redirect(&arg);


popular_qualifier_num

popular_qualifier_num 2120 regparse.c       pnum = popular_qualifier_num(p);
popular_qualifier_num 2121 regparse.c       cnum = popular_qualifier_num(c);
popular_qualifier_num 4500 regparse.c             nestq_num   = popular_qualifier_num(qn);
popular_qualifier_num 4501 regparse.c             targetq_num = popular_qualifier_num(qnt);
popular_qualifier_num 4533 regparse.c           if (popular_qualifier_num(qnt) >= 0 && popular_qualifier_num(qn) >= 0) {


posix_signal

posix_signal     11718 eval.c         	posix_signal(SIGVTALRM, catch_timer);
posix_signal      459 intern.h       void posix_signal(int, RETSIGTYPE (*)(int));


pragma_marker

pragma_marker    5494 parse.y            if (!(beg = pragma_marker(str, len))) return Qfalse;
pragma_marker    5495 parse.y            if (!(end = pragma_marker(beg, str + len - beg))) return Qfalse;


prep_io

prep_io          3866 io.c               VALUE io = prep_io(fileno(f), mode|FMODE_PREP, klass, path);
prep_io          4173 io.c           		    rb_stdout = prep_io(fw, FMODE_WRITABLE, rb_cFile, fn);
prep_io          4176 io.c           		current_file = prep_io(fr, FMODE_READABLE, rb_cFile, fn);


prep_stdio

prep_stdio       5562 io.c               rb_stdin = prep_stdio(stdin, FMODE_READABLE, rb_cIO, "<STDIN>");
prep_stdio       5564 io.c               rb_stdout = prep_stdio(stdout, FMODE_WRITABLE, rb_cIO, "<STDOUT>");
prep_stdio       5566 io.c               rb_stderr = prep_stdio(stderr, FMODE_WRITABLE|FMODE_SYNC, rb_cIO, "<STDERR>");


prep_window

prep_window       133 ext/curses/curses.c     rb_stdscr = prep_window(cWindow, stdscr);
prep_window       812 ext/curses/curses.c     win = prep_window(rb_obj_class(obj), window);


preserving_errno

preserving_errno  969 process.c          preserving_errno(after_exec());
preserving_errno 1036 process.c      	    preserving_errno(after_exec());
preserving_errno 1255 process.c          preserving_errno({
preserving_errno 1318 process.c      	    preserving_errno((close(ep[0]), close(ep[1])));
preserving_errno 1341 process.c      		preserving_errno((close(ep[0]), close(ep[1])));


print_anchor

print_anchor     4521 regcomp.c        fprintf(f, "  anchor: "); print_anchor(f, reg->anchor);
print_anchor     4527 regcomp.c          fprintf(f, "  sub anchor: "); print_anchor(f, reg->sub_anchor);


print_compiled_byte_code_list

print_compiled_byte_code_list 4721 regcomp.c      static void print_compiled_byte_code_list P_((FILE* f, regex_t* reg));
print_compiled_byte_code_list 4851 regcomp.c        print_compiled_byte_code_list(stderr, reg);


print_guessed_code

print_guessed_code  454 ext/nkf/nkf-utf8/nkf.c STATIC  void    print_guessed_code PROTO((char *filename));
print_guessed_code  765 ext/nkf/nkf-utf8/nkf.c           if (guess_f) print_guessed_code(NULL);
print_guessed_code  859 ext/nkf/nkf-utf8/nkf.c                   if (guess_f) print_guessed_code(filename);


print_indent_tree

print_indent_tree 5401 regcomp.c          print_indent_tree(f, NCONS(node).left, indent + add);
print_indent_tree 5407 regcomp.c            print_indent_tree(f, NCONS(node).left, indent + add);
print_indent_tree 5504 regcomp.c          print_indent_tree(f, NQUALIFIER(node).target, indent + add);
print_indent_tree 5512 regcomp.c            print_indent_tree(f, NEFFECT(node).target, indent + add);
print_indent_tree 5525 regcomp.c          print_indent_tree(f, NEFFECT(node).target, indent + add);
print_indent_tree 5544 regcomp.c        print_indent_tree(f, node, 0);


print_optimize_info

print_optimize_info 4373 regcomp.c      static void print_optimize_info(FILE* f, regex_t* reg);
print_optimize_info 4426 regcomp.c        print_optimize_info(stderr, reg);


print_tree

print_tree       4724 regcomp.c      static void print_tree P_((FILE* f, Node* node));
print_tree       4775 regcomp.c        print_tree(stderr, root);


print_undef

print_undef       599 eval.c         	print_undef(klass, name);
print_undef      2028 eval.c         	print_undef(klass, def);
print_undef      8649 eval.c         	print_undef(rklass, oid);


proc_alloc

proc_alloc       8147 eval.c             VALUE block = proc_alloc(klass, Qfalse);
proc_alloc       8163 eval.c             return proc_alloc(rb_cProc, Qfalse);
proc_alloc       8170 eval.c             return proc_alloc(rb_cProc, Qtrue);
proc_alloc       8184 eval.c             return proc_alloc(rb_cProc, Qtrue);


proc_clone

proc_clone       8089 eval.c         	    obj = proc_clone(obj);
proc_clone       9334 eval.c         	body = proc_clone(body);
proc_clone       9397 eval.c             rb_define_method(rb_cProc, "clone", proc_clone, 0);
proc_clone       9483 eval.c             rb_define_method(rb_cBinding, "clone", proc_clone, 0);


proc_dup

proc_dup         9398 eval.c             rb_define_method(rb_cProc, "dup", proc_dup, 0);
proc_dup         9484 eval.c             rb_define_method(rb_cBinding, "dup", proc_dup, 0);


proc_eq

proc_eq          9402 eval.c             rb_define_method(rb_cProc, "==", proc_eq, 1);
proc_eq          9403 eval.c             rb_define_method(rb_cProc, "eql?", proc_eq, 1);


proc_exec_v

proc_exec_v       985 process.c      	return proc_exec_v(args, prog);
proc_exec_v      1052 process.c      	return proc_exec_v(argv, 0);


proc_get_safe_level

proc_get_safe_level 8069 eval.c             ruby_safe_level = proc_get_safe_level(data);
proc_get_safe_level 8548 eval.c         	ruby_safe_level > proc_get_safe_level(proc)) {


proc_getegid

proc_getegid     3699 process.c          rb_define_module_function(rb_mProcess, "egid", proc_getegid, 0);
proc_getegid     3724 process.c          rb_define_module_function(rb_mProcGID, "eid", proc_getegid, 0);
proc_getegid     3745 process.c          rb_define_module_function(rb_mProcID_Syscall, "getegid", proc_getegid, 0);


proc_geteuid

proc_geteuid     3697 process.c          rb_define_module_function(rb_mProcess, "euid", proc_geteuid, 0);
proc_geteuid     3723 process.c          rb_define_module_function(rb_mProcUID, "eid", proc_geteuid, 0);
proc_geteuid     3743 process.c          rb_define_module_function(rb_mProcID_Syscall, "geteuid", proc_geteuid, 0);


proc_getgid

proc_getgid      3695 process.c          rb_define_module_function(rb_mProcess, "gid", proc_getgid, 0);
proc_getgid      3722 process.c          rb_define_module_function(rb_mProcGID, "rid", proc_getgid, 0);
proc_getgid      3744 process.c          rb_define_module_function(rb_mProcID_Syscall, "getgid", proc_getgid, 0);


proc_getgroups

proc_getgroups   2665 process.c          return proc_getgroups(obj);
proc_getgroups   2697 process.c          return proc_getgroups(obj);
proc_getgroups   3702 process.c          rb_define_module_function(rb_mProcess, "groups", proc_getgroups, 0);


proc_getuid

proc_getuid      3693 process.c          rb_define_module_function(rb_mProcess, "uid", proc_getuid, 0);
proc_getuid      3721 process.c          rb_define_module_function(rb_mProcUID, "rid", proc_getuid, 0);
proc_getuid      3742 process.c          rb_define_module_function(rb_mProcID_Syscall, "getuid", proc_getuid, 0);


proc_invoke

proc_invoke       207 eval.c         static VALUE proc_invoke(VALUE,VALUE,VALUE,VALUE);
proc_invoke      2551 eval.c         	proc_invoke(trace_func, rb_ary_new3(6, rb_str_new2(event_name),
proc_invoke      5668 eval.c         	result = proc_invoke(body->nd_cval, rb_ary_new4(argc, argv), recv, klass);
proc_invoke      7507 eval.c             proc_invoke(data, rb_ary_new2(0), Qundef, 0);
proc_invoke      8321 eval.c             return proc_invoke(proc, args, Qundef, 0);


proc_jump_error

proc_jump_error  4888 eval.c         	    proc_jump_error(TAG_BREAK, result);
proc_jump_error  8266 eval.c         	proc_jump_error(TAG_RETRY, Qnil); /* xxx */
proc_jump_error  8271 eval.c         	    proc_jump_error(state, result);
proc_jump_error  8598 eval.c         	    proc_jump_error(state, prot_tag->retval);


proc_lambda

proc_lambda       208 eval.c         static VALUE proc_lambda(void);
proc_lambda      2985 eval.c         	result = proc_lambda();
proc_lambda      9304 eval.c         	body = proc_lambda();
proc_lambda      9410 eval.c             rb_define_global_function("lambda", proc_lambda, 0);


proc_options

proc_options      447 ruby.c         static void proc_options(int argc, char **argv);
proc_options      462 ruby.c             proc_options(argc, argv);
proc_options     1210 ruby.c             proc_options(argc, argv);


proc_safe_level_p

proc_safe_level_p 8068 eval.c             if (!proc_safe_level_p(data)) return;
proc_safe_level_p 8591 eval.c             if (proc_safe_level_p(proc)) ruby_safe_level = safe;


proc_save_safe_level

proc_save_safe_level 8116 eval.c             proc_save_safe_level(block);
proc_save_safe_level 9335 eval.c         	proc_save_safe_level(body);


proc_set_safe_level

proc_set_safe_level 8248 eval.c         	proc_set_safe_level(proc);
proc_set_safe_level 8575 eval.c         	proc_set_safe_level(proc);


proc_setegid

proc_setegid     3459 process.c      	proc_setegid(obj, INT2FIX(gid));
proc_setegid     3467 process.c      	proc_setegid(obj, INT2FIX(SAVED_GROUP_ID));
proc_setegid     3700 process.c          rb_define_module_function(rb_mProcess, "egid=", proc_setegid, 1);


proc_seteuid

proc_seteuid     3350 process.c      	proc_seteuid(obj, INT2FIX(uid));
proc_seteuid     3358 process.c      	proc_seteuid(obj, INT2FIX(SAVED_USER_ID));
proc_seteuid     3698 process.c          rb_define_module_function(rb_mProcess, "euid=", proc_seteuid, 1);


proc_setsid

proc_setsid      2779 process.c          proc_setsid();
proc_setsid      3631 process.c          rb_define_module_function(rb_mProcess, "setsid", proc_setsid, 0);


proc_spawn_v

proc_spawn_v     1126 process.c      	return proc_spawn_v(args, prog ? RSTRING(prog)->ptr : 0);
proc_spawn_v     1159 process.c          return argv[0] ? proc_spawn_v(argv, 0) : -1;


proc_wait

proc_wait         754 process.c          VALUE pid = proc_wait(argc, argv);
proc_wait        3594 process.c          rb_define_module_function(rb_mProcess, "wait", proc_wait, -1);
proc_wait        3596 process.c          rb_define_module_function(rb_mProcess, "waitpid", proc_wait, -1);


proc_wait2

proc_wait2       3595 process.c          rb_define_module_function(rb_mProcess, "wait2", proc_wait2, -1);
proc_wait2       3597 process.c          rb_define_module_function(rb_mProcess, "waitpid2", proc_wait2, -1);


process_sflag

process_sflag     822 ruby.c             process_sflag();
process_sflag     837 ruby.c             process_sflag();


proto

proto              61 ext/sdbm/_sdbm.c static int   fitpair proto((char *, int));
proto              62 ext/sdbm/_sdbm.c static void  putpair proto((char *, datum, datum));
proto              63 ext/sdbm/_sdbm.c static datum getpair proto((char *, datum));
proto              64 ext/sdbm/_sdbm.c static int   delpair proto((char *, datum));
proto              65 ext/sdbm/_sdbm.c static int   chkpage proto((char *));
proto              66 ext/sdbm/_sdbm.c static datum getnkey proto((char *, int));
proto              67 ext/sdbm/_sdbm.c static void  splpage proto((char *, char *, long));
proto              69 ext/sdbm/_sdbm.c static int   duppair proto((char *, datum));
proto             113 ext/sdbm/_sdbm.c static int getdbit proto((DBM *, long));
proto             114 ext/sdbm/_sdbm.c static int setdbit proto((DBM *, long));
proto             115 ext/sdbm/_sdbm.c static int getpage proto((DBM *, long));
proto             116 ext/sdbm/_sdbm.c static datum getnext proto((DBM *));
proto             117 ext/sdbm/_sdbm.c static int makroom proto((DBM *, long, int));
proto             641 ext/sdbm/_sdbm.c static int seepair proto((char *, int, char *, int));
proto              70 ext/sdbm/sdbm.h extern DBM *sdbm_open proto((char *, int, int));
proto              71 ext/sdbm/sdbm.h extern void sdbm_close proto((DBM *));
proto              72 ext/sdbm/sdbm.h extern datum sdbm_fetch proto((DBM *, datum));
proto              73 ext/sdbm/sdbm.h extern int sdbm_delete proto((DBM *, datum));
proto              74 ext/sdbm/sdbm.h extern int sdbm_store proto((DBM *, datum, datum, int));
proto              75 ext/sdbm/sdbm.h extern datum sdbm_firstkey proto((DBM *));
proto              76 ext/sdbm/sdbm.h extern datum sdbm_nextkey proto((DBM *));
proto              81 ext/sdbm/sdbm.h extern DBM *sdbm_prep proto((char *, char *, int, int));
proto              82 ext/sdbm/sdbm.h extern long sdbm_hash proto((char *, int));
proto             386 ext/socket/getaddrinfo.c 			char *proto;
proto             388 ext/socket/getaddrinfo.c 			proto = NULL;
proto             391 ext/socket/getaddrinfo.c 				proto = NULL;
proto             394 ext/socket/getaddrinfo.c 				proto = "udp";
proto             397 ext/socket/getaddrinfo.c 				proto = "tcp";
proto             403 ext/socket/getaddrinfo.c 			if ((sp = getservbyname((char*)servname, proto)) == NULL)
proto             908 ext/socket/socket.c     fd = socket(domain, type, proto);
proto             912 ext/socket/socket.c 	    fd = socket(domain, type, proto);
proto            2784 ext/socket/socket.c     VALUE service, proto;
proto            2788 ext/socket/socket.c     rb_scan_args(argc, argv, "11", &service, &proto);
proto            2789 ext/socket/socket.c     if (NIL_P(proto)) proto = rb_str_new2("tcp");
proto            2791 ext/socket/socket.c     StringValue(proto);
proto            2793 ext/socket/socket.c     sp = getservbyname(StringValueCStr(service),  StringValueCStr(proto));
proto            2803 ext/socket/socket.c 	    rb_raise(rb_eSocket, "no such service %s/%s", s, RSTRING(proto)->ptr);
proto            2814 ext/socket/socket.c     VALUE port, proto;
proto            2817 ext/socket/socket.c     rb_scan_args(argc, argv, "11", &port, &proto);
proto            2818 ext/socket/socket.c     if (NIL_P(proto)) proto = rb_str_new2("tcp");
proto            2819 ext/socket/socket.c     StringValue(proto);
proto            2821 ext/socket/socket.c     sp = getservbyport(NUM2INT(port),  StringValueCStr(proto));
proto            2823 ext/socket/socket.c 	rb_raise(rb_eSocket, "no such service for port %d/%s", NUM2INT(port), RSTRING(proto)->ptr);
proto            2604 win32/win32.c  	r = getservbyname(name, proto);
proto            2621 win32/win32.c  	r = getservbyport(port, proto);
proto             227 wince/winsock2.c 		if( proto == _proto_table[i].num )
proto             244 wince/winsock2.c 	int slen = strlen(name), plen = strlen(proto);
proto             248 wince/winsock2.c 	if( proto==NULL ) return NULL;
proto             249 wince/winsock2.c 	if( 0!=strnicmp( proto, "tcp", 3 ) &&
proto             250 wince/winsock2.c 		0!=strnicmp( proto, "udp", 3 ) )
proto             256 wince/winsock2.c 			0==strnicmp( proto, _serv_table[i].protoname, plen ) )
proto             275 wince/winsock2.c 	int plen = strlen(proto);
proto             286 wince/winsock2.c 	if( proto==NULL ) return NULL;
proto             287 wince/winsock2.c 	if( 0!=strnicmp( proto, "tcp", 3 ) &&
proto             288 wince/winsock2.c 		0!=strnicmp( proto, "udp", 3 ) )
proto             294 wince/winsock2.c 			0==strnicmp( proto, _serv_table[i].protoname, plen ) )


prtab

prtab             116 missing/crypt.c STATIC prtab();
prtab             770 missing/crypt.c 	prtab("pc1tab", perm, 8);
prtab             794 missing/crypt.c 		prtab("pc2tab", perm, 8);
prtab             818 missing/crypt.c 	prtab("ietab", perm, 8);
prtab             835 missing/crypt.c 	prtab("cftab", perm, 8);


pst_pid

pst_pid           275 process.c          pid = pst_pid(st);
pst_pid          3612 process.c          rb_define_method(rb_cProcStatus, "pid", pst_pid, 0);


pst_to_i

pst_to_i          238 process.c          return rb_fix2str(pst_to_i(st), 10);
pst_to_i          327 process.c          return rb_equal(pst_to_i(st1), st2);
pst_to_i         3607 process.c          rb_define_method(rb_cProcStatus, "to_i", pst_to_i, 0);
pst_to_i         3608 process.c          rb_define_method(rb_cProcStatus, "to_int", pst_to_i, 0);


pty_getpty

pty_getpty        476 ext/pty/pty.c      rb_define_module_function(cPTY,"getpty",pty_getpty,-1);
pty_getpty        477 ext/pty/pty.c      rb_define_module_function(cPTY,"spawn",pty_getpty,-1);


push_glob

push_glob        1488 dir.c          	int status = push_glob(ary, RSTRING(str)->ptr + offset, flags);
push_glob        1513 dir.c          	status = push_glob(ary, RSTRING(str)->ptr, flags);


push_hold_buf

push_hold_buf     298 ext/nkf/nkf-utf8/nkf.c STATIC  int     push_hold_buf PROTO((int c2));
push_hold_buf    2291 ext/nkf/nkf-utf8/nkf.c     push_hold_buf(c2);
push_hold_buf    2292 ext/nkf/nkf-utf8/nkf.c     push_hold_buf(c1);
push_hold_buf    2301 ext/nkf/nkf-utf8/nkf.c         if (push_hold_buf(c1) == EOF || estab_f){


push_thread_anchor

push_thread_anchor 1007 eval.c         static void push_thread_anchor(struct ruby_env *);
push_thread_anchor 1013 eval.c         	push_thread_anchor(&_interp);


pushback

pushback         4838 parse.y        	    pushback(c);
pushback         4866 parse.y        	    pushback(c);
pushback         4880 parse.y        	    pushback(c);
pushback         4922 parse.y        		    pushback(c);
pushback         4949 parse.y        	    pushback(c);
pushback         4958 parse.y        	    pushback(c);
pushback         5026 parse.y            pushback(c);
pushback         5074 parse.y        		pushback(c);
pushback         5082 parse.y        		pushback(c);
pushback         5101 parse.y        		    pushback(c);
pushback         5107 parse.y        		    pushback(c);
pushback         5128 parse.y        	    pushback(c);
pushback         5180 parse.y        	pushback(c);
pushback         5188 parse.y        	    pushback(c);
pushback         5195 parse.y            pushback(c);
pushback         5242 parse.y        	    pushback(c);
pushback         5244 parse.y        		pushback('-');
pushback         5257 parse.y        	pushback(c);
pushback         5376 parse.y        		pushback(c);
pushback         5384 parse.y        	    pushback(c);
pushback         5587 parse.y            pushback(c);
pushback         5639 parse.y            pushback(c);
pushback         5694 parse.y        	    pushback(c);
pushback         5703 parse.y        	    pushback(c);
pushback         5731 parse.y        	pushback(c);
pushback         5781 parse.y        	    pushback(c);
pushback         5790 parse.y        	pushback(c);
pushback         5815 parse.y        	    pushback(c);
pushback         5824 parse.y        	    pushback(c);
pushback         5827 parse.y        	pushback(c);
pushback         5846 parse.y        	    pushback(c);
pushback         5849 parse.y        	pushback(c);
pushback         5916 parse.y        	    pushback(c);
pushback         5943 parse.y        	    pushback(c);
pushback         5951 parse.y        	pushback(c);
pushback         5978 parse.y        	    pushback(c);
pushback         5992 parse.y        	pushback(c);
pushback         6002 parse.y        	    pushback(c);
pushback         6014 parse.y        	    pushback(c);
pushback         6022 parse.y        	pushback(c);
pushback         6032 parse.y        	    pushback(c);
pushback         6057 parse.y        	    pushback(c);
pushback         6064 parse.y        	pushback(c);
pushback         6073 parse.y        	    pushback(c);
pushback         6076 parse.y        	pushback(c);
pushback         6114 parse.y        		    pushback(c);
pushback         6138 parse.y        		    pushback(c);
pushback         6162 parse.y        		    pushback(c);
pushback         6196 parse.y        			pushback(c);
pushback         6203 parse.y        			pushback(c);
pushback         6214 parse.y        		    pushback(c);
pushback         6236 parse.y        			    pushback(c0);
pushback         6251 parse.y        			pushback(c);
pushback         6280 parse.y        	    pushback(c);
pushback         6323 parse.y        	    pushback(c);
pushback         6335 parse.y        	    pushback(c);
pushback         6351 parse.y        	pushback(c);
pushback         6379 parse.y        	pushback(c);
pushback         6398 parse.y        		pushback(c);
pushback         6436 parse.y        		pushback(c);
pushback         6439 parse.y        	    pushback(c);
pushback         6480 parse.y        	pushback(c);
pushback         6525 parse.y        		pushback(c);
pushback         6531 parse.y        		pushback(c);
pushback         6566 parse.y        	pushback(c);
pushback         6583 parse.y        	    pushback(c);
pushback         6619 parse.y        		pushback(c);
pushback         6650 parse.y        	    pushback(c);
pushback         6659 parse.y        		pushback(c);
pushback         6685 parse.y        	    pushback(c);
pushback         6734 parse.y        	pushback(c);
pushback         6768 parse.y        			pushback(c);


putc

putc             5128 regcomp.c        for (i = 0; i < indent; i++) putc(' ', f);
putc              103 win32/win32.h  #define fputc(_c, _stream)	putc(_c, _stream)


putchar

putchar          1818 ext/nkf/nkf-utf8/nkf.c       putchar(c);
putchar           105 win32/win32.h  #define fputchar(_c)		putchar(_c)


putpair

putpair            62 ext/sdbm/_sdbm.c static void  putpair proto((char *, datum, datum));
putpair           333 ext/sdbm/_sdbm.c 		(void) putpair(db->pagbuf, key, val);
putpair           886 ext/sdbm/_sdbm.c 		(void) putpair((exhash(key) & sbit) ? new : pag, key, val);


q_gamma

q_gamma            24 missing/erf.c  static double q_gamma(double, double, double);
q_gamma            33 missing/erf.c      if (x >= 1 + a) return 1 - q_gamma(a, x, loggamma_a);
q_gamma            86 missing/erf.c      if (x >= 0) return  q_gamma(0.5, x * x, LOG_PI_OVER_2);


qpencode

qpencode          368 pack.c         static void qpencode(VALUE,VALUE,long);
qpencode          910 pack.c         	    qpencode(res, from, len);


quad_t

quad_t            680 missing/vsnprintf.c 				uqval = va_arg(ap, quad_t);
quad_t            681 missing/vsnprintf.c 				if ((quad_t)uqval < 0) {
quad_t            761 missing/vsnprintf.c 				*va_arg(ap, quad_t *) = ret;


qualifiers_memory_node_info

qualifiers_memory_node_info 1675 regcomp.c      	v = qualifiers_memory_node_info(NCONS(node).left);
qualifiers_memory_node_info 1687 regcomp.c            r = qualifiers_memory_node_info(NCALL(node).target);
qualifiers_memory_node_info 1695 regcomp.c      	r = qualifiers_memory_node_info(qn->target);
qualifiers_memory_node_info 1710 regcomp.c      	r = qualifiers_memory_node_info(en->target);
qualifiers_memory_node_info 3140 regcomp.c      	  r = qualifiers_memory_node_info(target);


r_byte

r_byte            784 marshal.c          int c = SIGN_EXTEND_CHAR(r_byte(arg));
r_byte            795 marshal.c      	    x |= (long)r_byte(arg) << (8*i);
r_byte            807 marshal.c      	    x |= (long)r_byte(arg) << (8*i);
r_byte            869 marshal.c          if (r_byte(arg) == TYPE_SYMLINK) {
r_byte            936 marshal.c          int type = r_byte(arg);
r_byte           1045 marshal.c      	    big->sign = (r_byte(arg) == '+');
r_byte           1089 marshal.c      	    int options = r_byte(arg);
r_byte           1338 marshal.c          major = r_byte(&arg);
r_byte           1339 marshal.c          minor = r_byte(&arg);


r_bytes

r_bytes           860 marshal.c          id = rb_intern(RSTRING(r_bytes(arg))->ptr);
r_bytes           884 marshal.c          return r_bytes(arg);
r_bytes          1015 marshal.c      	    VALUE str = r_bytes(arg);
r_bytes          1088 marshal.c      	    volatile VALUE str = r_bytes(arg);
r_bytes          1241 marshal.c      	    volatile VALUE str = r_bytes(arg);
r_bytes          1250 marshal.c      	    volatile VALUE str = r_bytes(arg);
r_bytes          1259 marshal.c      	    volatile VALUE str = r_bytes(arg);


r_bytes0

r_bytes0          813 marshal.c      #define r_bytes(arg) r_bytes0(r_long(arg), (arg))
r_bytes0         1047 marshal.c      	    data = r_bytes0(len * 2, arg);


r_entry

r_entry          1033 marshal.c      	    r_entry(v, arg);
r_entry          1078 marshal.c      	    r_entry(v, arg);
r_entry          1083 marshal.c      	v = r_entry(r_string(arg), arg);
r_entry          1090 marshal.c      	    v = r_entry(rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len, options), arg);
r_entry          1099 marshal.c      	    r_entry(v, arg);
r_entry          1112 marshal.c      	    r_entry(v, arg);
r_entry          1143 marshal.c      	    r_entry(v, arg);
r_entry          1173 marshal.c      	    r_entry(v, arg);
r_entry          1193 marshal.c      	    r_entry(v, arg);
r_entry          1207 marshal.c      	    r_entry(v, arg);
r_entry          1229 marshal.c                 r_entry(v, arg);
r_entry          1244 marshal.c      	    r_entry(v, arg);
r_entry          1253 marshal.c      	    r_entry(v, arg);
r_entry          1262 marshal.c      	    r_entry(v, arg);


r_ivar

r_ivar            953 marshal.c      	    if (ivar) r_ivar(v, arg);
r_ivar           1169 marshal.c      		r_ivar(data, arg);
r_ivar           1208 marshal.c      	    r_ivar(v, arg);


r_le

r_le              231 range.c        	while (RTEST(c = r_le(v, e))) {
r_le              630 range.c        	if (r_le(beg, val)) {
r_le              635 range.c        		if (r_le(val, end)) return Qtrue;
r_le              664 range.c            if (r_le(beg, val)) {
r_le              669 range.c        	    if (r_le(val, end)) return Qtrue;


r_long

r_long            813 marshal.c      #define r_bytes(arg) r_bytes0(r_long(arg), (arg))
r_long            847 marshal.c          long num = r_long(arg);
r_long            900 marshal.c          len = r_long(arg);
r_long            941 marshal.c      	id = r_long(arg);
r_long           1007 marshal.c      	    long i = r_long(arg);
r_long           1046 marshal.c      	    len = r_long(arg);
r_long           1096 marshal.c      	    volatile long len = r_long(arg); /* gcc 2.7.2.3 -O2 bug?? */
r_long           1109 marshal.c      	    long len = r_long(arg);
r_long           1136 marshal.c      	    len = r_long(arg);


r_lt

r_lt              225 range.c        	while (r_lt(v, e)) {
r_lt              632 range.c        		if (r_lt(val, end)) return Qtrue;
r_lt              666 range.c        	    if (r_lt(val, end)) return Qtrue;


r_object

r_object          741 marshal.c      static VALUE r_object(struct load_arg *arg);
r_object          904 marshal.c      	    VALUE val = r_object(arg);
r_object         1101 marshal.c      		rb_ary_push(v, r_object(arg));
r_object         1114 marshal.c      		VALUE key = r_object(arg);
r_object         1115 marshal.c      		VALUE value = r_object(arg);
r_object         1119 marshal.c      		RHASH(v)->ifnone = r_object(arg);
r_object         1153 marshal.c      		rb_struct_aset(v, LONG2FIX(i), r_object(arg));
r_object         1194 marshal.c      	    data = r_object(arg);
r_object         1292 marshal.c          return r_object(arg);


r_object0

r_object0         952 marshal.c      	    v = r_object0(arg, 0, &ivar, extmod);
r_object0         964 marshal.c      	    v = r_object0(arg, 0, 0, extmod);
r_object0         979 marshal.c      	    v = r_object0(arg, 0, 0, extmod);
r_object0        1235 marshal.c                 rb_funcall(v, s_load_data, 1, r_object0(arg, 0, 0, extmod));
r_object0        1286 marshal.c          return r_object0(arg, arg->proc, 0, Qnil);


r_string

r_string         1083 marshal.c      	v = r_entry(r_string(arg), arg);
r_string         1167 marshal.c      	    data = r_string(arg);


r_symbol

r_symbol          878 marshal.c          return rb_id2name(r_symbol(arg));
r_symbol          903 marshal.c      	    ID id = r_symbol(arg);
r_symbol         1145 marshal.c      		slot = r_symbol(arg);


r_symlink

r_symlink         870 marshal.c      	return r_symlink(arg);
r_symlink        1271 marshal.c      	return ID2SYM(r_symlink(arg));


r_symreal

r_symreal         872 marshal.c          return r_symreal(arg);
r_symreal        1267 marshal.c      	v = ID2SYM(r_symreal(arg));


r_unique

r_unique          959 marshal.c      	    VALUE m = path2module(r_unique(arg));
r_unique          974 marshal.c      	    VALUE c = path2class(r_unique(arg));
r_unique         1131 marshal.c      	    klass = path2class(r_unique(arg));
r_unique         1160 marshal.c      	    VALUE klass = path2class(r_unique(arg));
r_unique         1179 marshal.c      	    VALUE klass = path2class(r_unique(arg));
r_unique         1201 marshal.c      	    VALUE klass = path2class(r_unique(arg));
r_unique         1214 marshal.c                 VALUE klass = path2class(r_unique(arg));


racc_cparse

racc_cparse       201 ext/racc/cparse/cparse.c static VALUE racc_cparse _((VALUE parser, VALUE arg, VALUE sysdebug));
racc_cparse       799 ext/racc/cparse/cparse.c     rb_define_private_method(Parser, "_racc_do_parse_c", racc_cparse, 2);


racc_yyparse

racc_yyparse      202 ext/racc/cparse/cparse.c static VALUE racc_yyparse _((VALUE parser, VALUE lexer, VALUE lexmid,
racc_yyparse      800 ext/racc/cparse/cparse.c     rb_define_private_method(Parser, "_racc_yyparse_c", racc_yyparse, 4);


raise

raise            1597 ext/bigdecimal/bigdecimal.c              goto raise;
raise            1600 ext/bigdecimal/bigdecimal.c              goto raise;
raise            1603 ext/bigdecimal/bigdecimal.c              goto raise;
raise            1606 ext/bigdecimal/bigdecimal.c              goto raise;
raise            1609 ext/bigdecimal/bigdecimal.c              goto raise;
raise            1612 ext/bigdecimal/bigdecimal.c              goto raise;
raise            1617 ext/bigdecimal/bigdecimal.c raise:
raise            1922 object.c       	if (raise) {
raise            2955 win32/win32.c  	if ((ret = raise(sig)) != 0) {
raise              60 wince/signal.h int raise(int sig);


raise_from_wait

raise_from_wait   160 ext/pty/pty.c  	    raise_from_wait("stopped", info);
raise_from_wait   164 ext/pty/pty.c  	    raise_from_wait("stopped", info);
raise_from_wait   170 ext/pty/pty.c  	    raise_from_wait("changed", info);
raise_from_wait   173 ext/pty/pty.c  	    raise_from_wait("exited", info);


raise_socket_error

raise_socket_error  678 ext/socket/socket.c 	raise_socket_error("getnameinfo", error);
raise_socket_error  819 ext/socket/socket.c 	raise_socket_error("getaddrinfo", error);
raise_socket_error  890 ext/socket/socket.c 	raise_socket_error("getnameinfo", error);
raise_socket_error 2891 ext/socket/socket.c 	raise_socket_error("getaddrinfo", error);
raise_socket_error 3036 ext/socket/socket.c     raise_socket_error("getaddrinfo", error);
raise_socket_error 3040 ext/socket/socket.c     raise_socket_error("getnameinfo", error);


raise_zlib_error

raise_zlib_error  665 ext/zlib/zlib.c 	raise_zlib_error(err, z->stream.msg);
raise_zlib_error  697 ext/zlib/zlib.c 	raise_zlib_error(err, z->stream.msg);
raise_zlib_error  753 ext/zlib/zlib.c 	    raise_zlib_error(err, z->stream.msg);
raise_zlib_error  791 ext/zlib/zlib.c 	    raise_zlib_error(err, z->stream.msg);
raise_zlib_error  806 ext/zlib/zlib.c 	raise_zlib_error(err, z->stream.msg);
raise_zlib_error 1156 ext/zlib/zlib.c 	raise_zlib_error(err, z->stream.msg);
raise_zlib_error 1176 ext/zlib/zlib.c 	raise_zlib_error(err, 0);
raise_zlib_error 1231 ext/zlib/zlib.c 	raise_zlib_error(err, z.stream.msg);
raise_zlib_error 1366 ext/zlib/zlib.c 	raise_zlib_error(err, z->stream.msg);
raise_zlib_error 1394 ext/zlib/zlib.c 	raise_zlib_error(err, z->stream.msg);
raise_zlib_error 1443 ext/zlib/zlib.c 	raise_zlib_error(err, z->stream.msg);
raise_zlib_error 1491 ext/zlib/zlib.c 	raise_zlib_error(err, z.stream.msg);
raise_zlib_error 1632 ext/zlib/zlib.c 	raise_zlib_error(err, z->stream.msg);
raise_zlib_error 1656 ext/zlib/zlib.c 	raise_zlib_error(err, z->stream.msg);
raise_zlib_error 2796 ext/zlib/zlib.c 	raise_zlib_error(err, gz->z.stream.msg);
raise_zlib_error 2991 ext/zlib/zlib.c 	raise_zlib_error(err, gz->z.stream.msg);


rand_init

rand_init         329 random.c           old = rand_init(seed);
rand_init         441 random.c       	rand_init(random_seed());


random_seed

random_seed       327 random.c       	seed = random_seed();
random_seed       441 random.c       	rand_init(random_seed());


range_each_func

range_each_func   338 range.c        	    range_each_func(range, step_i, b, e, args);
range_each_func   401 range.c        	range_each_func(range, each_i, beg, end, NULL);


range_failed

range_failed       45 range.c        	v = rb_rescue(range_check, (VALUE)args, range_failed, 0);
range_failed       46 range.c        	if (NIL_P(v)) range_failed();


range_first

range_first       740 range.c            rb_define_method(rb_cRange, "first", range_first, 0);
range_first       742 range.c            rb_define_method(rb_cRange, "begin", range_first, 0);


range_include

range_include     735 range.c            rb_define_method(rb_cRange, "===", range_include, 1);
range_include     751 range.c            rb_define_method(rb_cRange, "member?", range_include, 1);
range_include     752 range.c            rb_define_method(rb_cRange, "include?", range_include, 1);


range_init

range_init         59 range.c            range_init(range, beg, end, exclude_end);
range_init         82 range.c            range_init(range, beg, end, RTEST(flags));


range_last

range_last        741 range.c            rb_define_method(rb_cRange, "last", range_last, 0);
range_last        743 range.c            rb_define_method(rb_cRange, "end", range_last, 0);


range_op

range_op         7736 parse.y        	node->nd_beg = range_op(parser, node->nd_beg);
range_op         7737 parse.y        	node->nd_end = range_op(parser, node->nd_end);


rb_Array

rb_Array         1684 dir.c              return rb_ensure(rb_Array, dir, dir_close, dir);
rb_Array         2646 eval.c             return rb_values_from_ary(rb_Array(v));
rb_Array          471 ext/iconv/iconv.c     i = rb_Array(i);
rb_Array          179 ext/readline/readline.c 	ary = rb_Array(ary);
rb_Array          386 intern.h       VALUE rb_Array(VALUE);
rb_Array         2273 object.c           return rb_Array(arg);


rb_Float

rb_Float         4057 ext/win32ole/win32ole.c     return rb_Float(ver);
rb_Float          384 intern.h       VALUE rb_Float(VALUE);
rb_Float           19 math.c         #define Need_Float(x) (x) = rb_Float(x)
rb_Float          104 numeric.c          return rb_assoc_new(rb_Float(y), rb_Float(x));
rb_Float          517 numeric.c          return rb_assoc_new(rb_Float(y), x);
rb_Float         1296 numeric.c          return flo_floor(rb_Float(num));
rb_Float         1318 numeric.c          return flo_ceil(rb_Float(num));
rb_Float         1333 numeric.c          return flo_round(rb_Float(num));
rb_Float         1348 numeric.c          return flo_truncate(rb_Float(num));
rb_Float         2188 object.c           return rb_Float(arg);
rb_Float         2210 object.c           return RFLOAT(rb_Float(val))->value;
rb_Float          772 pack.c         		f = RFLOAT(rb_Float(from))->value;
rb_Float          783 pack.c         		f = RFLOAT(rb_Float(from))->value;
rb_Float          795 pack.c         		d = RFLOAT(rb_Float(from))->value;
rb_Float          807 pack.c         		d = RFLOAT(rb_Float(from))->value;
rb_Float          818 pack.c         		f = RFLOAT(rb_Float(from))->value;
rb_Float          830 pack.c         		d = RFLOAT(rb_Float(from))->value;
rb_Float          707 sprintf.c      		fval = RFLOAT(rb_Float(val))->value;


rb_Integer

rb_Integer        120 ext/dl/cfunc.c     saddr = (void*)(NUM2PTR(rb_Integer(addr)));
rb_Integer        119 ext/dl/cptr.c      p = (void*)(NUM2PTR(rb_Integer(ptr)));
rb_Integer        122 ext/dl/cptr.c      p = (void*)(NUM2PTR(rb_Integer(ptr)));
rb_Integer        126 ext/dl/cptr.c      p = (void*)(NUM2PTR(rb_Integer(ptr)));
rb_Integer        228 ext/dl/cptr.c        data->free = NUM2PTR(rb_Integer(val));
rb_Integer        445 ext/dl/cptr.c  	return rb_dlptr_new(NUM2PTR(rb_Integer(val)), 0, NULL);
rb_Integer         74 ext/openssl/ossl_asn1.c     return (time_t)NUM2LONG(rb_Integer(time));
rb_Integer        471 ext/openssl/ossl_ocsp.c 	tmp = rb_protect(rb_Integer, revtime, &rstatus);
rb_Integer        475 ext/openssl/ossl_ocsp.c     tmp = rb_protect(rb_Integer, thisupd, &rstatus);
rb_Integer        478 ext/openssl/ossl_ocsp.c     tmp = rb_protect(rb_Integer, nextupd, &rstatus);
rb_Integer        559 ext/openssl/ossl_x509store.c     t = NUM2LONG(rb_Integer(time));
rb_Integer       4075 ext/win32ole/win32ole.c     return rb_Integer(rb_ary_entry(ary, 0));
rb_Integer       4093 ext/win32ole/win32ole.c     return rb_Integer(rb_ary_entry(ary, 1));
rb_Integer       2556 ext/zlib/zlib.c 	val = rb_Integer(mtime);
rb_Integer        383 intern.h       VALUE rb_Integer(VALUE);
rb_Integer       2048 object.c           return rb_Integer(arg);
rb_Integer        474 random.c       	vmax = rb_Integer(vmax);
rb_Integer        513 sprintf.c      		    val = rb_Integer(val);


rb_String

rb_String         130 ext/openssl/ossl_asn1.c 	obj = rb_String(obj);
rb_String          67 ext/openssl/ossl_bn.c 	obj = rb_String(obj);
rb_String         465 ext/openssl/ossl_ssl.c             elem = rb_String(elem);
rb_String        3832 ext/win32ole/win32ole.c     version_str = rb_String(major);
rb_String        3834 ext/win32ole/win32ole.c         minor_str = rb_String(minor);
rb_String         385 intern.h       VALUE rb_String(VALUE);
rb_String        2246 object.c           return rb_String(arg);


rb_add_event_hook

rb_add_event_hook 2479 eval.c             rb_add_event_hook(call_trace_func, RUBY_EVENT_ALL);
rb_add_event_hook  389 node.h         void rb_add_event_hook(rb_event_hook_func_t,rb_event_t);


rb_add_method

rb_add_method     733 class.c            rb_add_method(klass, name, NEW_CFUNC(func,argc), NOEX_PUBLIC);
rb_add_method     739 class.c            rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PUBLIC);
rb_add_method     745 class.c            rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PROTECTED);
rb_add_method     751 class.c            rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PRIVATE);
rb_add_method     757 class.c            rb_add_method(klass, rb_intern(name), 0, NOEX_UNDEF);
rb_add_method     419 eval.c             rb_add_method(CLASS_OF(klass), ID_ALLOCATOR, NEW_CFUNC(func, 0), NOEX_PRIVATE);
rb_add_method     426 eval.c             rb_add_method(CLASS_OF(klass), ID_ALLOCATOR, 0, NOEX_UNDEF);
rb_add_method     606 eval.c         	    rb_add_method(klass, name, NEW_ZSUPER(), noex);
rb_add_method     670 eval.c         	rb_add_method(klass, id, NEW_IVAR(attriv), noex);
rb_add_method     673 eval.c         	rb_add_method(klass, rb_id_attrset(id), NEW_ATTRSET(attriv), noex);
rb_add_method    1945 eval.c             rb_add_method(klass, id, 0, NOEX_PUBLIC);
rb_add_method    3760 eval.c         	    rb_add_method(ruby_class, node->nd_mid, defn, noex);
rb_add_method    3762 eval.c         		rb_add_method(rb_singleton_class(ruby_class),
rb_add_method    3796 eval.c         	    rb_add_method(klass, node->nd_mid, defn,
rb_add_method    7218 eval.c         	rb_add_method(rb_singleton_class(module), id, body->nd_body, NOEX_PUBLIC);
rb_add_method    9356 eval.c             rb_add_method(mod, id, node, noex);
rb_add_method     364 node.h         void rb_add_method(VALUE, ID, NODE *, int);


rb_alias

rb_alias          823 class.c            rb_alias(klass, rb_intern(name1), rb_intern(name2));
rb_alias         2082 eval.c             rb_alias(mod, rb_to_id(newname), rb_to_id(oldname));
rb_alias         3814 eval.c         	rb_alias(ruby_class, rb_to_id(rb_eval(self, node->u1.node)),
rb_alias         1349 ext/strscan/strscan.c     rb_alias(StringScanner, rb_intern("bol?"), rb_intern("beginning_of_line?"));
rb_alias         1199 ext/tk/tkutil/tkutil.c     rb_alias(klass, key_id, value_id);
rb_alias          212 intern.h       void rb_alias(VALUE, ID, ID);


rb_alias_variable

rb_alias_variable 3820 eval.c         	rb_alias_variable(node->u1.id, node->u2.id);
rb_alias_variable  539 intern.h       void rb_alias_variable(ID, ID);


rb_any_to_s

rb_any_to_s       703 error.c        		d = rb_any_to_s(obj);
rb_any_to_s       363 intern.h       VALUE rb_any_to_s(VALUE);
rb_any_to_s      1103 io.c               if (!fptr || !fptr->path) return rb_any_to_s(obj);
rb_any_to_s      1148 object.c       	    rb_str_append(s, rb_any_to_s(v));
rb_any_to_s      2413 object.c           rb_define_method(rb_mKernel, "to_s", rb_any_to_s, 0);
rb_any_to_s      2277 re.c               rb_define_method(rb_cMatch, "inspect", rb_any_to_s, 0); /* in object.c */
rb_any_to_s       268 string.c       	return rb_any_to_s(obj);


rb_apply

rb_apply         2479 ext/tk/tcltklib.c     ret = rb_apply(arg->receiver, arg->method, arg->args);
rb_apply           98 ext/tk/tkutil/tkutil.c     return rb_apply(rb_hash_aref(CALLBACK_TABLE, id), ID_call, rest);
rb_apply          376 ext/tk/tkutil/tkutil.c         val = rb_apply(cTclTkLib, ID_merge_tklist, dst);
rb_apply          385 ext/tk/tkutil/tkutil.c         return rb_apply(cTclTkLib, ID_merge_tklist, dst);
rb_apply          470 ext/tk/tkutil/tkutil.c         val = rb_apply(cTclTkLib, ID_merge_tklist, dst);
rb_apply          479 ext/tk/tkutil/tkutil.c         return rb_apply(cTclTkLib, ID_merge_tklist, dst);
rb_apply         3237 ext/win32ole/win32ole.c     return rb_apply(cWIN32OLE_TYPELIB, rb_intern("new"), args);
rb_apply         6370 ext/win32ole/win32ole.c         result = rb_apply(handler, rb_intern("call"), args);
rb_apply         6374 ext/win32ole/win32ole.c         result = rb_apply(handler, rb_intern("call"), args);
rb_apply          225 intern.h       VALUE rb_apply(VALUE, ID, VALUE);


rb_aref

rb_aref           105 ext/openssl/ossl_x509name.c     if(NIL_P(entry[2])) entry[2] = rb_aref(template, entry[0]);
rb_aref           153 ext/openssl/ossl_x509name.c     if(NIL_P(type)) type = rb_aref(OBJECT_TYPE_TEMPLATE, oid);


rb_ary_aref

rb_ary_aref      2859 array.c            rb_define_method(rb_cArray, "[]", rb_ary_aref, -1);
rb_ary_aref      2904 array.c            rb_define_method(rb_cArray, "slice", rb_ary_aref, -1);
rb_ary_aref        44 intern.h       VALUE rb_ary_aref(int, VALUE*, VALUE);
rb_ary_aref      1187 re.c           	return rb_ary_aref(argc, argv, match_to_a(match));


rb_ary_assoc

rb_ary_assoc     2907 array.c            rb_define_method(rb_cArray, "assoc", rb_ary_assoc, 1);
rb_ary_assoc       65 intern.h       VALUE rb_ary_assoc(VALUE, VALUE);


rb_ary_clear

rb_ary_clear     2899 array.c            rb_define_method(rb_cArray, "clear", rb_ary_clear, 0);
rb_ary_clear     2146 ext/win32ole/win32ole.c     rb_ary_clear(argv);
rb_ary_clear       62 intern.h       VALUE rb_ary_clear(VALUE);
rb_ary_clear     1187 ruby.c             rb_ary_clear(rb_argv);


rb_ary_cmp

rb_ary_cmp       2902 array.c            rb_define_method(rb_cArray, "<=>", rb_ary_cmp, 1);
rb_ary_cmp         68 intern.h       VALUE rb_ary_cmp(VALUE, VALUE);


rb_ary_collect

rb_ary_collect   2885 array.c            rb_define_method(rb_cArray, "collect", rb_ary_collect, 0);
rb_ary_collect   2887 array.c            rb_define_method(rb_cArray, "map", rb_ary_collect, 0);


rb_ary_collect_bang

rb_ary_collect_bang 2886 array.c            rb_define_method(rb_cArray, "collect!", rb_ary_collect_bang, 0);
rb_ary_collect_bang 2888 array.c            rb_define_method(rb_cArray, "map!", rb_ary_collect_bang, 0);


rb_ary_compact_bang

rb_ary_compact_bang 2697 array.c            rb_ary_compact_bang(ary);
rb_ary_compact_bang 2920 array.c            rb_define_method(rb_cArray, "compact!", rb_ary_compact_bang, 0);


rb_ary_concat

rb_ary_concat    2865 array.c            rb_define_method(rb_cArray, "concat", rb_ary_concat, 1);
rb_ary_concat    3228 eval.c         	    result = rb_ary_concat(args, splat_value(rb_eval(self, node->nd_body)));
rb_ary_concat    5605 eval.c         	args = rb_ary_concat(rb_ary_new4(argc, argv), splat_value(argv[argc]));
rb_ary_concat     638 ext/tk/tkutil/tkutil.c         return rb_ary_concat(ary, dst);
rb_ary_concat     689 ext/tk/tkutil/tkutil.c         return rb_ary_concat(ary, dst);
rb_ary_concat    3094 ext/win32ole/win32ole.c     rb_ary_concat(methods, ole_methods_from_typeinfo(pTypeInfo, mask));
rb_ary_concat      64 intern.h       VALUE rb_ary_concat(VALUE, VALUE);
rb_ary_concat     200 ruby.c         	rb_ary_concat(rb_load_path, ary);
rb_ary_concat     458 string.c       	rb_ary_concat(RSTRING(str)->aux.shared, add);


rb_ary_delete

rb_ary_delete    2891 array.c            rb_define_method(rb_cArray, "delete", rb_ary_delete, 1);
rb_ary_delete    1666 gc.c               rb_ary_delete(finalizers, block);
rb_ary_delete    2215 hash.c         	    rb_ary_delete(keys, key);
rb_ary_delete      60 intern.h       VALUE rb_ary_delete(VALUE, VALUE);


rb_ary_delete_at

rb_ary_delete_at 1804 array.c            return rb_ary_delete_at(ary, NUM2LONG(pos));
rb_ary_delete_at 1854 array.c            return rb_ary_delete_at(ary, NUM2LONG(arg1));
rb_ary_delete_at 6784 ext/win32ole/win32ole.c         rb_ary_delete_at(events, at);
rb_ary_delete_at   61 intern.h       VALUE rb_ary_delete_at(VALUE, long);


rb_ary_dup

rb_ary_dup       1459 array.c            return rb_ary_reverse(rb_ary_dup(ary));
rb_ary_dup       1576 array.c            ary = rb_ary_dup(ary);
rb_ary_dup       1901 array.c            ary = rb_ary_dup(ary);
rb_ary_dup       2000 array.c            if (alen == 0) return rb_ary_dup(ary);
rb_ary_dup       2645 array.c            ary = rb_ary_dup(ary);
rb_ary_dup       2696 array.c            ary = rb_ary_dup(ary);
rb_ary_dup       2825 array.c            ary = rb_ary_dup(ary);
rb_ary_dup        203 enumerator.c   	rb_yield(rb_ary_dup(ary));
rb_ary_dup       3234 eval.c         	    VALUE args = rb_ary_dup(rb_eval(self, node->nd_head));
rb_ary_dup         46 intern.h       VALUE rb_ary_dup(VALUE);


rb_ary_each

rb_ary_each      2872 array.c            rb_define_method(rb_cArray, "each", rb_ary_each, 0);
rb_ary_each      1620 dir.c          	rb_ary_each(ary);
rb_ary_each       999 ext/openssl/ossl_asn1.c     rb_ary_each(ossl_asn1_get_value(self));
rb_ary_each        54 intern.h       VALUE rb_ary_each(VALUE);


rb_ary_elt

rb_ary_elt        658 array.c            return rb_ary_elt(ary, offset);
rb_ary_elt       1708 array.c        	    rb_ary_push(result, rb_ary_elt(ary, i));
rb_ary_elt       1960 array.c        	    rb_ary_push(tmp, rb_ary_elt(ary, i));
rb_ary_elt       1962 array.c        		rb_ary_push(tmp, rb_ary_elt(argv[j], i));
rb_ary_elt       1973 array.c        	rb_ary_push(tmp, rb_ary_elt(ary, i));
rb_ary_elt       1975 array.c        	    rb_ary_push(tmp, rb_ary_elt(argv[j], i));
rb_ary_elt       2002 array.c        	tmp = to_ary(rb_ary_elt(ary, i));
rb_ary_elt       2015 array.c        	    rb_ary_store(rb_ary_elt(result, j), i, rb_ary_elt(tmp, j));
rb_ary_elt       2351 array.c        	if (!rb_equal(rb_ary_elt(ary1, i), rb_ary_elt(ary2, i)))
rb_ary_elt       2374 array.c        	if (!rb_eql(rb_ary_elt(ary1, i), rb_ary_elt(ary2, i)))
rb_ary_elt       2470 array.c        	VALUE v = rb_funcall(rb_ary_elt(ary1, i), id_cmp, 1, rb_ary_elt(ary2, i));
rb_ary_elt       2522 array.c        	rb_ary_push(ary3, rb_ary_elt(ary1, i));
rb_ary_elt       2550 array.c        	v = vv = rb_ary_elt(ary1, i);
rb_ary_elt       2582 array.c        	v = vv = rb_ary_elt(ary1, i);
rb_ary_elt       2588 array.c        	v = vv = rb_ary_elt(ary2, i);
rb_ary_elt       2622 array.c        	v = vv = rb_ary_elt(ary, i);
rb_ary_elt       2757 array.c        	tmp = rb_check_array_type(rb_ary_elt(ary, i));


rb_ary_entry

rb_ary_entry      741 array.c        	return rb_ary_entry(ary, FIX2LONG(arg));
rb_ary_entry      752 array.c            return rb_ary_entry(ary, NUM2LONG(arg));
rb_ary_entry      773 array.c            return rb_ary_entry(ary, NUM2LONG(pos));
rb_ary_entry     1683 array.c            return rb_get_values_at(ary, RARRAY(ary)->len, argc, argv, rb_ary_entry);
rb_ary_entry     1012 enum.c         	rb_ary_push(tmp, rb_ary_entry(RARRAY(args)->ptr[i], idx));
rb_ary_entry     10941 eval.c         	    rb_ary_unshift(errat, rb_ary_entry(oldbt, 0));
rb_ary_entry      171 ext/Win32API/Win32API.c 	switch (FIX2INT(rb_ary_entry(obj_import, i))) {
rb_ary_entry      176 ext/Win32API/Win32API.c 	    lParam = NUM2ULONG(rb_ary_entry(args, i));
rb_ary_entry      179 ext/Win32API/Win32API.c 	    str = rb_ary_entry(args, i);
rb_ary_entry      472 ext/iconv/iconv.c     name = rb_ary_entry(i, 0);
rb_ary_entry      473 ext/iconv/iconv.c     val = rb_ary_entry(i, 1);
rb_ary_entry       63 ext/openssl/ossl.c         val = rb_ary_entry(ary, i);
rb_ary_entry      845 ext/openssl/ossl_asn1.c     ret = rb_ary_entry(ary, 0);
rb_ary_entry      238 ext/openssl/ossl_config.c     name = rb_ary_entry(i, 0);
rb_ary_entry      239 ext/openssl/ossl_config.c     value = rb_ary_entry(i, 1);
rb_ary_entry      189 ext/openssl/ossl_ssl.c     GetX509CertPtr(cert = rb_ary_entry(ary, 0));
rb_ary_entry      190 ext/openssl/ossl_ssl.c     GetPKeyPtr(key = rb_ary_entry(ary, 1));
rb_ary_entry      463 ext/openssl/ossl_ssl.c             elem = rb_ary_entry(v, i);
rb_ary_entry      464 ext/openssl/ossl_ssl.c             if (TYPE(elem) == T_ARRAY) elem = rb_ary_entry(elem, 0);
rb_ary_entry       97 ext/openssl/ossl_x509name.c     VALUE self = rb_ary_entry(args, 0);
rb_ary_entry       98 ext/openssl/ossl_x509name.c     VALUE template = rb_ary_entry(args, 1);
rb_ary_entry      102 ext/openssl/ossl_x509name.c     entry[0] = rb_ary_entry(i, 0);
rb_ary_entry      103 ext/openssl/ossl_x509name.c     entry[1] = rb_ary_entry(i, 1);
rb_ary_entry      104 ext/openssl/ossl_x509name.c     entry[2] = rb_ary_entry(i, 2);
rb_ary_entry     1043 ext/syck/rubyext.c     VALUE ivname = rb_ary_entry( vars, 0 );
rb_ary_entry     1050 ext/syck/rubyext.c     rb_iv_set( obj, ivn, rb_ary_entry( vars, 1 ) );
rb_ary_entry     1065 ext/syck/rubyext.c         VALUE tpart = rb_to_id( rb_ary_entry( tparts, i ) );
rb_ary_entry     1551 ext/syck/rubyext.c             syck_seq_add( node, rb_ary_entry(val, i) );
rb_ary_entry     1640 ext/syck/rubyext.c             VALUE key = rb_ary_entry(keys, i);
rb_ary_entry     1676 ext/syck/rubyext.c             VALUE key = rb_ary_entry(keys, i);
rb_ary_entry      712 ext/win32ole/win32ole.c         obj = rb_ary_entry(obj, pid[i]);
rb_ary_entry      778 ext/win32ole/win32ole.c             val1 = rb_ary_entry(val1, 0);
rb_ary_entry      799 ext/win32ole/win32ole.c             val1 = rb_ary_entry(val1, 0);
rb_ary_entry     2113 ext/win32ole/win32ole.c     key = rb_ary_entry(pair, 0);
rb_ary_entry     2130 ext/win32ole/win32ole.c     value = rb_ary_entry(pair, 1);
rb_ary_entry     2208 ext/win32ole/win32ole.c     param = rb_ary_entry(paramS, argc-2);
rb_ary_entry     2262 ext/win32ole/win32ole.c             param = rb_ary_entry(paramS, i-cNamedArgs);
rb_ary_entry     2292 ext/win32ole/win32ole.c                 param = rb_ary_entry(paramS, i-cNamedArgs);
rb_ary_entry     2313 ext/win32ole/win32ole.c                     param = rb_ary_entry(paramS, i-cNamedArgs);
rb_ary_entry     2421 ext/win32ole/win32ole.c         tp = rb_ary_entry(types, j);
rb_ary_entry     2424 ext/win32ole/win32ole.c         param = rb_ary_entry(args, j);
rb_ary_entry     2458 ext/win32ole/win32ole.c                     VALUE elem = rb_ary_entry(param, ent);
rb_ary_entry     3857 ext/win32ole/win32ole.c     VALUE guid = rb_ary_entry(args, 0);
rb_ary_entry     3858 ext/win32ole/win32ole.c     version_str = make_version_str(rb_ary_entry(args, 1), rb_ary_entry(args, 2));
rb_ary_entry     3995 ext/win32ole/win32ole.c     typelib = rb_ary_entry(args, 0);
rb_ary_entry     4075 ext/win32ole/win32ole.c     return rb_Integer(rb_ary_entry(ary, 0));
rb_ary_entry     4093 ext/win32ole/win32ole.c     return rb_Integer(rb_ary_entry(ary, 1));
rb_ary_entry     6252 ext/win32ole/win32ole.c         event = rb_ary_entry(ary, i);
rb_ary_entry     6253 ext/win32ole/win32ole.c         event_name = rb_ary_entry(event, 1);
rb_ary_entry     6282 ext/win32ole/win32ole.c         event = rb_ary_entry(ary, i);
rb_ary_entry     6283 ext/win32ole/win32ole.c         event_name = rb_ary_entry(event, 1);
rb_ary_entry     6306 ext/win32ole/win32ole.c         v = rb_ary_entry(ary, i);
rb_ary_entry     6336 ext/win32ole/win32ole.c     obj = rb_ary_entry(ary_ole_event, pEV->m_event_id);
rb_ary_entry     6365 ext/win32ole/win32ole.c     handler = rb_ary_entry(event, 0);
rb_ary_entry     6367 ext/win32ole/win32ole.c     if (rb_ary_entry(event, 3) == Qtrue) {
rb_ary_entry     6881 ext/win32ole/win32ole.c     val = rb_ary_entry(args, 0);
rb_ary_entry     6886 ext/win32ole/win32ole.c         vvt = rb_ary_entry(args, 1);
rb_ary_entry       53 intern.h       VALUE rb_ary_entry(VALUE, long);
rb_ary_entry     4472 io.c           		    rb_ary_push(list, rb_ary_entry(read, i));
rb_ary_entry     4482 io.c           		    rb_ary_push(list, rb_ary_entry(write, i));
rb_ary_entry     4492 io.c           		    rb_ary_push(list, rb_ary_entry(except, i));
rb_ary_entry      426 struct.c       	rb_yield_values(2, rb_ary_entry(members, i), RSTRUCT(s)->ptr[i]);


rb_ary_flatten_bang

rb_ary_flatten_bang 2826 array.c            rb_ary_flatten_bang(ary);
rb_ary_flatten_bang 2922 array.c            rb_define_method(rb_cArray, "flatten!", rb_ary_flatten_bang, 0);


rb_ary_includes

rb_ary_includes  2749 array.c            if (rb_ary_includes(memo, id)) {
rb_ary_includes  2901 array.c            rb_define_method(rb_cArray, "include?", rb_ary_includes, 1);
rb_ary_includes  13032 eval.c         	return rb_ary_includes(list, rb_obj_id(obj));
rb_ary_includes  2214 hash.c         	if (rb_ary_includes(keys, key)) {
rb_ary_includes    67 intern.h       VALUE rb_ary_includes(VALUE, VALUE);
rb_ary_includes  4136 parse.y        			if (rb_ary_includes($$, arg)) {
rb_ary_includes  7909 parse.y            if ((m && rb_ary_includes(m, sym)) || rb_ary_includes(list, sym)) {
rb_ary_includes  1604 variable.c     	if (!rb_ary_includes(ary, kval)) {


rb_ary_join

rb_ary_join      1254 array.c            return rb_ary_join(arg[0], arg[1]);
rb_ary_join      1322 array.c            return rb_ary_join(ary, sep);
rb_ary_join      1340 array.c            return rb_ary_join(ary, rb_output_fs);
rb_ary_join      2233 array.c        	return rb_ary_join(ary, tmp);
rb_ary_join      1105 ext/syck/rubyext.c                 partial = rb_ary_join( parts, colon );
rb_ary_join      1123 ext/syck/rubyext.c                         subclass = rb_ary_join( subclass_parts, colon );
rb_ary_join      1175 ext/syck/rubyext.c                     VALUE name = rb_ary_join( parts, colon );
rb_ary_join      1181 ext/syck/rubyext.c                     VALUE name = rb_ary_join( parts, colon );
rb_ary_join      2307 ext/tk/tcltklib.c             backtrace = rb_ary_join(backtrace, rb_str_new2("\n"));
rb_ary_join      4194 file.c         	tmp = rb_ary_join(tmp, rb_str_new2(PATH_SEP));
rb_ary_join        55 intern.h       VALUE rb_ary_join(VALUE, VALUE);
rb_ary_join      2943 io.c           	prog = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" "));
rb_ary_join      1560 process.c          if (argc) prog = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" "));


rb_ary_modify

rb_ary_modify     342 array.c            rb_ary_modify(ary);
rb_ary_modify     400 array.c            rb_ary_modify(ary);
rb_ary_modify     593 array.c            rb_ary_modify(ary);
rb_ary_modify     992 array.c            rb_ary_modify(ary);
rb_ary_modify    1415 array.c            rb_ary_modify(ary);
rb_ary_modify    1549 array.c            rb_ary_modify(ary);
rb_ary_modify    1629 array.c            rb_ary_modify(ary);
rb_ary_modify    1752 array.c            rb_ary_modify(ary);
rb_ary_modify    1777 array.c            rb_ary_modify(ary);
rb_ary_modify    1873 array.c            rb_ary_modify(ary);
rb_ary_modify    2038 array.c            rb_ary_modify(copy);
rb_ary_modify    2065 array.c            rb_ary_modify(ary);
rb_ary_modify    2133 array.c            rb_ary_modify(ary);
rb_ary_modify    2666 array.c            rb_ary_modify(ary);


rb_ary_modify_check

rb_ary_modify_check   59 array.c            rb_ary_modify_check(ary);
rb_ary_modify_check  498 array.c            rb_ary_modify_check(ary);
rb_ary_modify_check  531 array.c            rb_ary_modify_check(ary);
rb_ary_modify_check  543 array.c            rb_ary_modify_check(ary);
rb_ary_modify_check  580 array.c            rb_ary_modify_check(ary);


rb_ary_new

rb_ary_new       2518 array.c            ary3 = rb_ary_new();
rb_ary_new       2797 array.c        		memo = rb_ary_new();
rb_ary_new        414 class.c            VALUE ary = rb_ary_new();
rb_ary_new        477 class.c            VALUE p, ary = rb_ary_new();
rb_ary_new        576 class.c            ary = rb_ary_new();
rb_ary_new        723 class.c            ary = rb_ary_new();
rb_ary_new        882 class.c        	    if (var) *var = rb_ary_new();
rb_ary_new       1485 dir.c              ary = rb_ary_new();
rb_ary_new       1506 dir.c              VALUE ary = rb_ary_new();
rb_ary_new         65 enum.c             VALUE ary = rb_ary_new();
rb_ary_new        203 enum.c             ary = rb_ary_new();
rb_ary_new        236 enum.c             ary = rb_ary_new();
rb_ary_new        278 enum.c             ary = rb_ary_new();
rb_ary_new        297 enum.c             VALUE ary = rb_ary_new();
rb_ary_new        390 enum.c             ary[0] = rb_ary_new();
rb_ary_new        391 enum.c             ary[1] = rb_ary_new();
rb_ary_new        525 enum.c         	ary = rb_ary_new();
rb_ary_new       1056 enum.c             result = rb_block_given_p() ? Qnil : rb_ary_new();
rb_ary_new       1842 eval.c             VALUE ary = rb_ary_new();
rb_ary_new       3619 eval.c         	result = rb_ary_new();
rb_ary_new       5962 eval.c             ary = rb_ary_new();
rb_ary_new       7425 eval.c             VALUE ary = rb_ary_new();
rb_ary_new       7789 eval.c             rb_load_path = rb_ary_new();
rb_ary_new       7793 eval.c             rb_features = rb_ary_new();
rb_ary_new       7804 eval.c             ruby_dln_librefs = rb_ary_new();
rb_ary_new       11062 eval.c             VALUE ary = rb_ary_new();
rb_ary_new       12451 eval.c             VALUE ary = rb_ary_new();
rb_ary_new       12686 eval.c             ary = rb_ary_new();
rb_ary_new       13052 eval.c         	list = rb_ary_new();
rb_ary_new         70 ext/Win32API/Win32API.c     a_import = rb_ary_new();
rb_ary_new        244 ext/dbm/dbm.c      VALUE new = rb_ary_new();
rb_ary_new        355 ext/dbm/dbm.c      VALUE ret, ary = rb_ary_new();
rb_ary_new        610 ext/dbm/dbm.c      ary = rb_ary_new();
rb_ary_new        628 ext/dbm/dbm.c      ary = rb_ary_new();
rb_ary_new        687 ext/dbm/dbm.c      ary = rb_ary_new();
rb_ary_new        305 ext/etc/etc.c      mem = rb_ary_new();
rb_ary_new        340 ext/gdbm/gdbm.c     VALUE new = rb_ary_new();
rb_ary_new        448 ext/gdbm/gdbm.c     VALUE ret, ary = rb_ary_new();
rb_ary_new        709 ext/gdbm/gdbm.c     ary = rb_ary_new();
rb_ary_new        729 ext/gdbm/gdbm.c     ary = rb_ary_new();
rb_ary_new        792 ext/gdbm/gdbm.c     ary = rb_ary_new();
rb_ary_new        720 ext/iconv/iconv.c     args[1] = rb_block_given_p() ? 0 : rb_ary_new();
rb_ary_new        936 ext/iconv/iconv.c     VALUE ary = rb_ary_new();
rb_ary_new        108 ext/openssl/ossl.c 	return rb_ary_new();			\
rb_ary_new        319 ext/openssl/ossl.c     ary = rb_ary_new();
rb_ary_new        723 ext/openssl/ossl_asn1.c     ary = rb_ary_new();
rb_ary_new        731 ext/openssl/ossl_asn1.c 	    VALUE arg = rb_ary_new();
rb_ary_new       1102 ext/openssl/ossl_asn1.c     ary = rb_ary_new();
rb_ary_new        309 ext/openssl/ossl_config.c     ary = rb_ary_new();
rb_ary_new        399 ext/openssl/ossl_config.c     return rb_ary_new();
rb_ary_new         98 ext/openssl/ossl_engine.c     ary = rb_ary_new();
rb_ary_new        311 ext/openssl/ossl_engine.c     ary = rb_ary_new();
rb_ary_new        314 ext/openssl/ossl_engine.c 	    tmp = rb_ary_new();
rb_ary_new        195 ext/openssl/ossl_ocsp.c     ary = (count > 0) ? rb_ary_new() : Qnil;
rb_ary_new        527 ext/openssl/ossl_ocsp.c     ret = rb_ary_new();
rb_ary_new        539 ext/openssl/ossl_ocsp.c 	ary = rb_ary_new();
rb_ary_new        546 ext/openssl/ossl_ocsp.c 	ext = rb_ary_new();
rb_ary_new        473 ext/openssl/ossl_pkcs7.c 	return rb_ary_new();
rb_ary_new        518 ext/openssl/ossl_pkcs7.c     if (!sk) return rb_ary_new();
rb_ary_new        439 ext/openssl/ossl_ssl.c         return rb_ary_new();
rb_ary_new        537 ext/openssl/ossl_x509cert.c 	return rb_ary_new();
rb_ary_new        268 ext/openssl/ossl_x509crl.c 	return rb_ary_new();
rb_ary_new        441 ext/openssl/ossl_x509crl.c 	return rb_ary_new();
rb_ary_new        216 ext/openssl/ossl_x509name.c 	return rb_ary_new();
rb_ary_new        386 ext/openssl/ossl_x509req.c 	return rb_ary_new();
rb_ary_new        155 ext/openssl/ossl_x509revoked.c 	return rb_ary_new();
rb_ary_new        427 ext/openssl/ossl_x509store.c 	return rb_ary_new();
rb_ary_new        696 ext/racc/cparse/cparse.c             tmp_v = rb_ary_new();
rb_ary_new        698 ext/racc/cparse/cparse.c             tmp_t = rb_ary_new();
rb_ary_new        702 ext/readline/readline.c 	result = rb_ary_new();
rb_ary_new        729 ext/readline/readline.c 	result = rb_ary_new();
rb_ary_new        221 ext/sdbm/init.c     VALUE new = rb_ary_new();
rb_ary_new        334 ext/sdbm/init.c     VALUE ret, ary = rb_ary_new();
rb_ary_new        591 ext/sdbm/init.c     ary = rb_ary_new();
rb_ary_new        609 ext/sdbm/init.c     ary = rb_ary_new();
rb_ary_new        668 ext/sdbm/init.c     ary = rb_ary_new();
rb_ary_new       1311 ext/socket/socket.c     ary = rb_ary_new();
rb_ary_new       1321 ext/socket/socket.c 	names = rb_ary_new();
rb_ary_new       2680 ext/socket/socket.c     base = rb_ary_new();
rb_ary_new       2758 ext/socket/socket.c     ary = rb_ary_new();
rb_ary_new       2760 ext/socket/socket.c     names = rb_ary_new();
rb_ary_new        969 ext/stringio/stringio.c     VALUE ary = rb_ary_new(), line;
rb_ary_new       1098 ext/syck/rubyext.c             VALUE subclass_parts = rb_ary_new();
rb_ary_new       2113 ext/syck/rubyext.c     seq = rb_funcall( cSeq, s_new, 3, type_id, rb_ary_new(), style );
rb_ary_new        751 ext/tk/tkutil/tkutil.c             return rb_ary_new();
rb_ary_new        759 ext/tk/tkutil/tkutil.c                 return rb_ary_new();
rb_ary_new       1419 ext/tk/tkutil/tkutil.c   return rb_ary_new();
rb_ary_new       1126 ext/win32ole/win32ole.c             val2 = rb_ary_new();
rb_ary_new       1141 ext/win32ole/win32ole.c                             obj = rb_ary_new();
rb_ary_new       1143 ext/win32ole/win32ole.c                         val2 = rb_ary_new();
rb_ary_new       3014 ext/win32ole/win32ole.c     VALUE methods = rb_ary_new();
rb_ary_new       3089 ext/win32ole/win32ole.c     methods = rb_ary_new();
rb_ary_new       3233 ext/win32ole/win32ole.c     VALUE args = rb_ary_new();
rb_ary_new       3579 ext/win32ole/win32ole.c     classes = rb_ary_new();
rb_ary_new       3617 ext/win32ole/win32ole.c     VALUE typelibs = rb_ary_new();
rb_ary_new       3668 ext/win32ole/win32ole.c     VALUE progids = rb_ary_new();
rb_ary_new       3792 ext/win32ole/win32ole.c     VALUE typelibs = rb_ary_new();
rb_ary_new       4167 ext/win32ole/win32ole.c     VALUE classes = rb_ary_new();
rb_ary_new       4676 ext/win32ole/win32ole.c     VALUE types = rb_ary_new();
rb_ary_new       4734 ext/win32ole/win32ole.c     VALUE variables = rb_ary_new();
rb_ary_new       4903 ext/win32ole/win32ole.c     VALUE type = rb_ary_new();
rb_ary_new       5306 ext/win32ole/win32ole.c     VALUE type = rb_ary_new();
rb_ary_new       5838 ext/win32ole/win32ole.c     VALUE params = rb_ary_new();
rb_ary_new       5961 ext/win32ole/win32ole.c     VALUE typedetail = rb_ary_new();
rb_ary_new       6355 ext/win32ole/win32ole.c     args = rb_ary_new();
rb_ary_new       6368 ext/win32ole/win32ole.c         argv = rb_ary_new();
rb_ary_new       6779 ext/win32ole/win32ole.c         events = rb_ary_new();
rb_ary_new       6908 ext/win32ole/win32ole.c     ary_ole_event = rb_ary_new();
rb_ary_new       6965 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "ARGV", rb_ary_new());
rb_ary_new       3322 ext/zlib/zlib.c     dst = rb_ary_new();
rb_ary_new       4186 file.c         	tmp = rb_ary_new();
rb_ary_new       1936 gc.c               finalizers = rb_ary_new();
rb_ary_new        782 hash.c             result = rb_ary_new();
rb_ary_new       1080 hash.c             ary = rb_ary_new();
rb_ary_new       1223 hash.c             ary = rb_ary_new();
rb_ary_new       1254 hash.c             ary = rb_ary_new();
rb_ary_new       1800 hash.c             ary = rb_ary_new();
rb_ary_new       1835 hash.c             ary = rb_ary_new();
rb_ary_new       1871 hash.c             ary = rb_ary_new();
rb_ary_new       1945 hash.c             result = rb_ary_new();
rb_ary_new       1960 hash.c             result = rb_ary_new();
rb_ary_new       2039 hash.c             ary = rb_ary_new();
rb_ary_new         35 intern.h       VALUE rb_ary_new(void);
rb_ary_new       1779 io.c               ary = rb_ary_new();
rb_ary_new       4351 io.c               ary = rb_ary_new();
rb_ary_new       4461 io.c               rb_ary_push(res, rp?rb_ary_new():rb_ary_new2(0));
rb_ary_new       4462 io.c               rb_ary_push(res, wp?rb_ary_new():rb_ary_new2(0));
rb_ary_new       4463 io.c               rb_ary_push(res, ep?rb_ary_new():rb_ary_new2(0));
rb_ary_new        935 pack.c         		    associates = rb_ary_new();
rb_ary_new       1309 pack.c             ary = rb_ary_new();
rb_ary_new       4567 parse.y        		ruby_debug_lines = rb_ary_new();
rb_ary_new       7924 parse.y            list = rb_ary_new();
rb_ary_new        787 process.c          result = rb_ary_new();
rb_ary_new       2597 process.c          ary = rb_ary_new();
rb_ary_new       1239 re.c           	VALUE result = rb_ary_new();
rb_ary_new        186 ruby.c         	VALUE ary = rb_ary_new();
rb_ary_new       1163 ruby.c             rb_argv = rb_ary_new();
rb_ary_new       3251 string.c           result = rb_ary_new();
rb_ary_new       3847 string.c       	VALUE ary = rb_ary_new();
rb_ary_new        226 struct.c           ary = rb_ary_new();
rb_ary_new        697 struct.c           result = rb_ary_new();
rb_ary_new        592 variable.c     	VALUE ary = rb_ary_new();
rb_ary_new        712 variable.c         VALUE ary = rb_ary_new();
rb_ary_new       1018 variable.c         ary = rb_ary_new();
rb_ary_new       1630 variable.c         VALUE ary = rb_ary_new();


rb_ary_new2

rb_ary_new2       134 array.c            return rb_ary_new2(ARY_DEFAULT_SIZE);
rb_ary_new2       146 array.c            ary = rb_ary_new2(n);
rb_ary_new2       163 array.c            ary = rb_ary_new2(n);
rb_ary_new2      1237 array.c            VALUE dup = rb_ary_new2(RARRAY(ary)->len);
rb_ary_new2      1389 array.c        	VALUE dup = rb_ary_new2(RARRAY(ary)->len);
rb_ary_new2      1602 array.c            collect = rb_ary_new2(RARRAY(ary)->len);
rb_ary_new2      1639 array.c            VALUE result = rb_ary_new2(argc);
rb_ary_new2      1705 array.c            result = rb_ary_new2(RARRAY(ary)->len);
rb_ary_new2      1958 array.c        	    VALUE tmp = rb_ary_new2(argc+1);
rb_ary_new2      1969 array.c            result = rb_ary_new2(len);
rb_ary_new2      1971 array.c        	VALUE tmp = rb_ary_new2(argc+1);
rb_ary_new2      2005 array.c        	    result = rb_ary_new2(elen);
rb_ary_new2      2007 array.c        		rb_ary_store(result, j, rb_ary_new2(alen));
rb_ary_new2      2182 array.c            z = rb_ary_new2(len);
rb_ary_new2      2545 array.c            ary3 = rb_ary_new2(RARRAY(ary1)->len < RARRAY(ary2)->len ?
rb_ary_new2      2578 array.c            ary3 = rb_ary_new2(RARRAY(ary1)->len+RARRAY(ary2)->len);
rb_ary_new2       522 enum.c         	ary  = rb_ary_new2(RARRAY(obj)->len);
rb_ary_new2      1009 enum.c             tmp = rb_ary_new2(RARRAY(args)->len + 1);
rb_ary_new2       139 enumerator.c   	memo[0] = rb_ary_new2(size);
rb_ary_new2       168 enumerator.c       args[0] = rb_ary_new2(size);
rb_ary_new2       235 enumerator.c       args[0] = rb_ary_new2(size);
rb_ary_new2      2599 eval.c             if (v == Qundef) return rb_ary_new2(0);
rb_ary_new2      3628 eval.c         	    ary = rb_ary_new2(i);
rb_ary_new2      4986 eval.c         	    assign(self, node->nd_args, rb_ary_new2(0), pcall);
rb_ary_new2      5568 eval.c         	    v = rb_ary_new2(0);
rb_ary_new2      7507 eval.c             proc_invoke(data, rb_ary_new2(0), Qundef, 0);
rb_ary_new2      1120 ext/bigdecimal/bigdecimal.c     obj  = rb_ary_new2(4);
rb_ary_new2       271 ext/dbm/dbm.c      VALUE new = rb_ary_new2(argc);
rb_ary_new2       366 ext/gdbm/gdbm.c     VALUE new = rb_ary_new2(argc);
rb_ary_new2       641 ext/iconv/iconv.c     arg.ret = rb_ary_new2(argc);
rb_ary_new2       688 ext/iconv/iconv.c     VALUE ary = rb_ary_new2(namescount);
rb_ary_new2       110 ext/openssl/ossl.c     ary = rb_ary_new2(num);			\
rb_ary_new2       478 ext/openssl/ossl_pkcs7.c     ary = rb_ary_new2(num);
rb_ary_new2       522 ext/openssl/ossl_pkcs7.c     ary = rb_ary_new2(num);
rb_ary_new2        29 ext/openssl/ossl_pkey.c     ary = rb_ary_new2(2);
rb_ary_new2       412 ext/openssl/ossl_ssl.c     ary = rb_ary_new2(4);
rb_ary_new2       442 ext/openssl/ossl_ssl.c     ary = rb_ary_new2(num);
rb_ary_new2       791 ext/openssl/ossl_ssl.c     ary = rb_ary_new2(num);
rb_ary_new2       539 ext/openssl/ossl_x509cert.c     ary = rb_ary_new2(count);
rb_ary_new2       270 ext/openssl/ossl_x509crl.c     ary = rb_ary_new2(num);
rb_ary_new2       443 ext/openssl/ossl_x509crl.c     ary = rb_ary_new2(count);
rb_ary_new2       218 ext/openssl/ossl_x509name.c     ret = rb_ary_new2(entries);
rb_ary_new2       388 ext/openssl/ossl_x509req.c     ary = rb_ary_new2(count);
rb_ary_new2       157 ext/openssl/ossl_x509revoked.c     ary = rb_ary_new2(count);
rb_ary_new2       429 ext/openssl/ossl_x509store.c     ary = rb_ary_new2(num);
rb_ary_new2       435 ext/pty/pty.c      res = rb_ary_new2(3);
rb_ary_new2       130 ext/racc/cparse/cparse.c #define NEW_STACK() rb_ary_new2(STACK_INIT_LEN)
rb_ary_new2       248 ext/sdbm/init.c     VALUE new = rb_ary_new2(argc);
rb_ary_new2      1329 ext/socket/socket.c 	names = rb_ary_new2(0);
rb_ary_new2       533 ext/syck/rubyext.c             obj = rb_ary_new2( n->data.list->idx );
rb_ary_new2       974 ext/syck/rubyext.c             obj = rb_ary_new2( n->data.list->idx );
rb_ary_new2      1296 ext/syck/rubyext.c             v = rb_ary_new2( syck_seq_count( n ) );
rb_ary_new2      2587 ext/tk/tcltklib.c     args = rb_ary_new2(argc - 2);
rb_ary_new2      5512 ext/tk/tcltklib.c     result = rb_ary_new2(1);
rb_ary_new2      5826 ext/tk/tcltklib.c     result = rb_ary_new2(1);
rb_ary_new2      6905 ext/tk/tcltklib.c     result = rb_ary_new2(1);
rb_ary_new2      7443 ext/tk/tcltklib.c         ary = rb_ary_new2(objc);
rb_ary_new2      7480 ext/tk/tcltklib.c         ary = rb_ary_new2(argc);
rb_ary_new2      7917 ext/tk/tcltklib.c     eventloop_stack = rb_ary_new2(DEFAULT_EVENTLOOP_DEPTH);
rb_ary_new2       273 ext/tk/tkutil/tkutil.c     dst = rb_ary_new2(size);
rb_ary_new2       418 ext/tk/tkutil/tkutil.c     dst = rb_ary_new2(size);
rb_ary_new2       499 ext/tk/tkutil/tkutil.c     volatile VALUE dst = rb_ary_new2(2 * RARRAY(assoc)->len);
rb_ary_new2       524 ext/tk/tkutil/tkutil.c             val = rb_ary_new2(RARRAY(pair)->len - 1);
rb_ary_new2       550 ext/tk/tkutil/tkutil.c     volatile VALUE dst = rb_ary_new2(2 * RARRAY(assoc)->len);
rb_ary_new2       576 ext/tk/tkutil/tkutil.c             val = rb_ary_new2(RARRAY(pair)->len - 1);
rb_ary_new2       625 ext/tk/tkutil/tkutil.c     volatile VALUE args = rb_ary_new2(2);
rb_ary_new2       626 ext/tk/tkutil/tkutil.c     volatile VALUE dst = rb_ary_new2(2 * RHASH(hash)->tbl->num_entries);
rb_ary_new2       676 ext/tk/tkutil/tkutil.c     volatile VALUE args = rb_ary_new2(2);
rb_ary_new2       677 ext/tk/tkutil/tkutil.c     volatile VALUE dst = rb_ary_new2(2 * RHASH(hash)->tbl->num_entries);
rb_ary_new2       917 ext/tk/tkutil/tkutil.c     dst = rb_ary_new2(size);
rb_ary_new2      1433 ext/tk/tkutil/tkutil.c     volatile VALUE dst = rb_ary_new2(len);
rb_ary_new2       340 ext/zlib/zlib.c     dst = rb_ary_new2(256);
rb_ary_new2       754 hash.c             VALUE result = rb_ary_new2(argc);
rb_ary_new2        36 intern.h       VALUE rb_ary_new2(long);
rb_ary_new2      4460 io.c               res = rb_ary_new2(3);
rb_ary_new2      4461 io.c               rb_ary_push(res, rp?rb_ary_new():rb_ary_new2(0));
rb_ary_new2      4462 io.c               rb_ary_push(res, wp?rb_ary_new():rb_ary_new2(0));
rb_ary_new2      4463 io.c               rb_ary_push(res, ep?rb_ary_new():rb_ary_new2(0));
rb_ary_new2       961 marshal.c                  if (NIL_P(extmod)) extmod = rb_ary_new2(0);
rb_ary_new2      1098 marshal.c      	    v = rb_ary_new2(len);
rb_ary_new2      1138 marshal.c      	    values = rb_ary_new2(len);
rb_ary_new2       743 object.c           return rb_ary_new2(0);
rb_ary_new2      8550 parse.y            VALUE ary = rb_ary_new2(global_symbols.tbl->num_entries);
rb_ary_new2      1089 re.c               VALUE ary = rb_ary_new2(regs->num_regs);
rb_ary_new2      3223 string.c       		return rb_ary_new2(0);
rb_ary_new2      3796 string.c       	result = rb_ary_new2(regs->num_regs);
rb_ary_new2        64 struct.c           ary = rb_ary_new2(RARRAY(members)->len);
rb_ary_new2      1415 variable.c         if (!tbl) return rb_ary_new2(0);
rb_ary_new2      1416 variable.c         ary = rb_ary_new2(tbl->num_entries);


rb_ary_new3

rb_ary_new3       965 array.c            return rb_ary_new3(1, obj);
rb_ary_new3       442 error.c        	if (t == T_STRING) return rb_ary_new3(1, bt);
rb_ary_new3      2551 eval.c         	proc_invoke(trace_func, rb_ary_new3(6, rb_str_new2(event_name),
rb_ary_new3      2602 eval.c         	return rb_ary_new3(1, v);
rb_ary_new3      2609 eval.c         	return rb_ary_new3(1, v);
rb_ary_new3      9843 eval.c             arg[1] = rb_ary_new3(1, INT2FIX(sig));
rb_ary_new3       628 ext/curses/curses.c   return rb_ary_new3(3,INT2FIX(r),INT2FIX(g),INT2FIX(b));
rb_ary_new3       637 ext/curses/curses.c   return rb_ary_new3(2,INT2FIX(f),INT2FIX(b));
rb_ary_new3       179 ext/iconv/iconv.c 		       Qnil, rb_ary_new3(2, to, from), NULL, s);
rb_ary_new3       336 ext/openssl/ossl_bn.c     return rb_ary_new3(2, obj1, obj2);
rb_ary_new3       377 ext/openssl/ossl_config.c         args = rb_ary_new3(3, section, name, value);
rb_ary_new3       127 ext/openssl/ossl_x509name.c 	    args = rb_ary_new3(2, self, template);
rb_ary_new3       227 ext/openssl/ossl_x509name.c 	ary = rb_ary_new3(3, rb_str_new2(short_name),
rb_ary_new3       897 ext/socket/socket.c     ary = rb_ary_new3(4, family, port, addr1, addr2);
rb_ary_new3      1082 ext/tk/tcltklib.c     return rb_ary_new3(2, loop_max, no_event);
rb_ary_new3      1089 ext/tk/tcltklib.c     return rb_ary_new3(2, INT2NUM(event_loop_max), INT2NUM(no_event_tick));
rb_ary_new3      1336 ext/tk/tkutil/tkutil.c     ret = rb_ary_new3(2, rb_str_new2(inf->key), rb_str_new2(buf));
rb_ary_new3      6801 ext/win32ole/win32ole.c     data = rb_ary_new3(4, rb_block_proc(), event, args, is_ary_arg);
rb_ary_new3      1735 gc.c               block = rb_ary_new3(2, INT2FIX(ruby_safe_level), block);
rb_ary_new3      1744 gc.c           	st_add_direct(finalizer_table, obj, rb_ary_new3(1, block));
rb_ary_new3      1782 gc.c           	if (!args[1]) args[1] = rb_ary_new3(1, objid);
rb_ary_new3      1789 gc.c           	    if (!args[1]) args[1] = rb_ary_new3(1, objid);
rb_ary_new3        37 intern.h       VALUE rb_ary_new3(long,...);
rb_ary_new3      4129 parse.y        			$$ = rb_ary_new3(1, arg);
rb_ary_new3       523 signal.c       	rb_eval_cmd(trap_exit, rb_ary_new3(1, INT2FIX(0)), trap_list[0].safe);
rb_ary_new3      3224 string.c       	    return rb_ary_new3(1, str);
rb_ary_new3      1761 time.c             return rb_ary_new3(10,
rb_ary_new3       490 variable.c         rb_eval_cmd(cmd, rb_ary_new3(1, val), 0);
rb_ary_new3       609 variable.c     		return rb_ary_new3(1, cmd);


rb_ary_new4

rb_ary_new4      1114 array.c            rb_ary_splice(ary, pos, 0, rb_ary_new4(argc - 1, argv + 1));
rb_ary_new4       878 class.c        	    if (var) *var = rb_ary_new4(argc-i, argv+i);
rb_ary_new4      1058 enum.c             memo[1] = rb_ary_new4(argc, argv);
rb_ary_new4       277 enumerator.c       if (argc) ptr->args = rb_ary_new4(argc, argv);
rb_ary_new4      4983 eval.c         	    assign(self, node->nd_args, rb_ary_new4(len-i, RARRAY(val)->ptr+i), pcall);
rb_ary_new4      5386 eval.c         	    args[n++] = rb_ary_new4(argc-1, argv+1);
rb_ary_new4      5429 eval.c         	return (*func)(recv, rb_ary_new4(argc, argv));
rb_ary_new4      5564 eval.c         	    v = rb_ary_new4(argc,argv);
rb_ary_new4      5605 eval.c         	args = rb_ary_concat(rb_ary_new4(argc, argv), splat_value(argv[argc]));
rb_ary_new4      5668 eval.c         	result = proc_invoke(body->nd_cval, rb_ary_new4(argc, argv), recv, klass);
rb_ary_new4      12628 eval.c         	th->result = rb_ary_new4(argc, argv);
rb_ary_new4       300 ext/iconv/iconv.c 	    args[2] = rb_ary_new4(env->argc, env->argv);
rb_ary_new4       115 ext/racc/cparse/cparse.c     return rb_ary_new4(len, RARRAY(stack)->ptr + RARRAY(stack)->len - len);
rb_ary_new4        38 intern.h       VALUE rb_ary_new4(long, const VALUE *);
rb_ary_new4      2943 io.c           	prog = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" "));
rb_ary_new4      1560 process.c          if (argc) prog = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" "));
rb_ary_new4       499 struct.c           return rb_ary_new4(RSTRUCT(s)->len, RSTRUCT(s)->ptr);


rb_ary_plus

rb_ary_plus      2910 array.c            rb_define_method(rb_cArray, "+", rb_ary_plus, 1);
rb_ary_plus       537 ext/tk/tkutil/tkutil.c         return rb_ary_plus(ary, dst);
rb_ary_plus       590 ext/tk/tkutil/tkutil.c         return rb_ary_plus(ary, dst);
rb_ary_plus       935 ext/tk/tkutil/tkutil.c     return rb_ary_plus(argv[0], dst);
rb_ary_plus        63 intern.h       VALUE rb_ary_plus(VALUE, VALUE);


rb_ary_pop

rb_ary_pop        528 array.c        	return rb_ary_pop(ary);
rb_ary_pop       2764 array.c            rb_ary_pop(memo);
rb_ary_pop       13078 eval.c             rb_ary_pop(list);
rb_ary_pop        124 ext/racc/cparse/cparse.c         rb_ary_pop(stack);
rb_ary_pop        132 ext/racc/cparse/cparse.c #define POP(s) rb_ary_pop(s)
rb_ary_pop        567 ext/syck/rubyext.c                         VALUE end = rb_ary_pop( tmp );
rb_ary_pop       1003 ext/syck/rubyext.c                         VALUE end = rb_ary_pop( v );
rb_ary_pop       1104 ext/syck/rubyext.c                 rb_ary_unshift( subclass_parts, rb_ary_pop( parts ) );
rb_ary_pop       1699 ext/tk/tcltklib.c     while((eventloop_thread = rb_ary_pop(eventloop_stack))) {
rb_ary_pop         50 intern.h       VALUE rb_ary_pop(VALUE);
rb_ary_pop        966 marshal.c                      m = rb_ary_pop(extmod);
rb_ary_pop       1185 marshal.c                          VALUE m = rb_ary_pop(extmod);
rb_ary_pop       3333 string.c       	    rb_ary_pop(result);


rb_ary_push

rb_ary_push       490 array.c        	rb_ary_push(ary, *argv++);
rb_ary_push      1604 array.c        	rb_ary_push(collect, rb_yield(RARRAY(ary)->ptr[i]));
rb_ary_push      1644 array.c        	    rb_ary_push(result, (*func)(obj, FIX2LONG(argv[i])));
rb_ary_push      1655 array.c        		rb_ary_push(result, (*func)(obj, j+beg));
rb_ary_push      1659 array.c        	rb_ary_push(result, (*func)(obj, NUM2LONG(argv[i])));
rb_ary_push      1708 array.c        	    rb_ary_push(result, rb_ary_elt(ary, i));
rb_ary_push      1960 array.c        	    rb_ary_push(tmp, rb_ary_elt(ary, i));
rb_ary_push      1962 array.c        		rb_ary_push(tmp, rb_ary_elt(argv[j], i));
rb_ary_push      1973 array.c        	rb_ary_push(tmp, rb_ary_elt(ary, i));
rb_ary_push      1975 array.c        	    rb_ary_push(tmp, rb_ary_elt(argv[j], i));
rb_ary_push      1977 array.c        	rb_ary_push(result, tmp);
rb_ary_push      2522 array.c        	rb_ary_push(ary3, rb_ary_elt(ary1, i));
rb_ary_push      2552 array.c        	    rb_ary_push(ary3, v);
rb_ary_push      2584 array.c        	    rb_ary_push(ary3, v);
rb_ary_push      2590 array.c        	    rb_ary_push(ary3, v);
rb_ary_push      2752 array.c            rb_ary_push(memo, id);
rb_ary_push      2866 array.c            rb_define_method(rb_cArray, "<<", rb_ary_push, 1);
rb_ary_push       419 class.c        	    rb_ary_push(ary, RBASIC(p)->klass);
rb_ary_push       483 class.c        	    rb_ary_push(ary, RBASIC(p)->klass);
rb_ary_push       486 class.c        	    rb_ary_push(ary, p);
rb_ary_push       510 class.c        	rb_ary_push(ary, rb_str_new2(rb_id2name(name)));
rb_ary_push      1378 dir.c              rb_ary_push(ary, rb_tainted_str_new2(path));
rb_ary_push        30 enum.c         	rb_ary_push(arg[1], i);
rb_ary_push        39 enum.c         	rb_ary_push(arg[1], rb_yield(i));
rb_ary_push       178 enum.c         	rb_ary_push(ary, i);
rb_ary_push       213 enum.c         	rb_ary_push(ary, i);
rb_ary_push       245 enum.c             rb_ary_push(ary, rb_yield(i));
rb_ary_push       253 enum.c             rb_ary_push(ary, i);
rb_ary_push       363 enum.c         	rb_ary_push(ary[0], i);
rb_ary_push       366 enum.c         	rb_ary_push(ary[1], i);
rb_ary_push       431 enum.c             rb_ary_push(ary, (VALUE)memo);
rb_ary_push      1012 enum.c         	rb_ary_push(tmp, rb_ary_entry(RARRAY(args)->ptr[i], idx));
rb_ary_push      1018 enum.c         	rb_ary_push(result, tmp);
rb_ary_push       135 enumerator.c       rb_ary_push(ary, val);
rb_ary_push       201 enumerator.c       rb_ary_push(ary, val);
rb_ary_push      1845 eval.c         	if (!NIL_P(cbase->nd_clss)) rb_ary_push(ary, cbase->nd_clss);
rb_ary_push      1849 eval.c         	rb_ary_push(ary, ruby_wrapper);
rb_ary_push      3235 eval.c         	    result = rb_ary_push(args, rb_eval(self, node->nd_body));
rb_ary_push      5087 eval.c         		rb_ary_push(args, val);
rb_ary_push      5978 eval.c         	rb_ary_push(ary, str);
rb_ary_push      5999 eval.c         	rb_ary_push(ary, str);
rb_ary_push      6763 eval.c             rb_ary_push(rb_features, feature);
rb_ary_push      6952 eval.c         		    rb_ary_push(ruby_dln_librefs, LONG2NUM(handle));
rb_ary_push      7433 eval.c         	    rb_ary_push(ary, rb_str_new2(rb_id2name(tbl[i])));
rb_ary_push      7440 eval.c         	    rb_ary_push(ary, rb_str_new2(rb_id2name(vars->id)));
rb_ary_push      11069 eval.c         	    rb_ary_push(ary, th->thread);
rb_ary_push      12428 eval.c             rb_ary_push(ary, ID2SYM(key));
rb_ary_push      12690 eval.c         	    rb_ary_push(ary, th->thread);
rb_ary_push      13055 eval.c             rb_ary_push(list, rb_obj_id(obj));
rb_ary_push        80 ext/Win32API/Win32API.c 		rb_ary_push(a_import, INT2FIX(_T_NUMBER));
rb_ary_push        83 ext/Win32API/Win32API.c 		rb_ary_push(a_import, INT2FIX(_T_POINTER));
rb_ary_push        86 ext/Win32API/Win32API.c 		rb_ary_push(a_import, INT2FIX(_T_INTEGER));
rb_ary_push        97 ext/Win32API/Win32API.c 		rb_ary_push(a_import, INT2FIX(_T_NUMBER));
rb_ary_push       100 ext/Win32API/Win32API.c 		rb_ary_push(a_import, INT2FIX(_T_POINTER));
rb_ary_push       103 ext/Win32API/Win32API.c 		rb_ary_push(a_import, INT2FIX(_T_INTEGER));
rb_ary_push      1121 ext/bigdecimal/bigdecimal.c     rb_ary_push(obj, INT2FIX(s));
rb_ary_push      1122 ext/bigdecimal/bigdecimal.c     rb_ary_push(obj, obj1);
rb_ary_push      1123 ext/bigdecimal/bigdecimal.c     rb_ary_push(obj, INT2FIX(10));
rb_ary_push      1124 ext/bigdecimal/bigdecimal.c     rb_ary_push(obj, INT2NUM(e));
rb_ary_push       257 ext/dbm/dbm.c  	    rb_ary_push(new, assoc);
rb_ary_push       275 ext/dbm/dbm.c          rb_ary_push(new, fdbm_fetch(obj, argv[i], Qnil));
rb_ary_push       369 ext/dbm/dbm.c  	if (RTEST(ret)) rb_ary_push(ary, keystr);
rb_ary_push       612 ext/dbm/dbm.c  	rb_ary_push(ary, rb_tainted_str_new(key.dptr, key.dsize));
rb_ary_push       631 ext/dbm/dbm.c  	rb_ary_push(ary, rb_tainted_str_new(val.dptr, val.dsize));
rb_ary_push       690 ext/dbm/dbm.c  	rb_ary_push(ary, rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize),
rb_ary_push       308 ext/etc/etc.c  	rb_ary_push(mem, safe_setup_str(*tbl));
rb_ary_push       352 ext/gdbm/gdbm.c 	    rb_ary_push(new, assoc);
rb_ary_push       370 ext/gdbm/gdbm.c         rb_ary_push(new, rb_gdbm_fetch3(obj, argv[i]));
rb_ary_push       462 ext/gdbm/gdbm.c 	if (RTEST(ret)) rb_ary_push(ary, keystr);
rb_ary_push       713 ext/gdbm/gdbm.c         rb_ary_push(ary, keystr);
rb_ary_push       734 ext/gdbm/gdbm.c 	rb_ary_push(ary, valstr);
rb_ary_push       796 ext/gdbm/gdbm.c         rb_ary_push(ary, rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr)));
rb_ary_push       640 ext/iconv/iconv.c     arg.append = rb_ary_push;
rb_ary_push       691 ext/iconv/iconv.c 	rb_ary_push(ary, rb_str_new2(names[i]));
rb_ary_push       694 ext/iconv/iconv.c 	return rb_ary_push(p->array, ary);
rb_ary_push       938 ext/iconv/iconv.c     rb_ary_push(ary, ID2SYM(rb_intern("trivial?")));
rb_ary_push       941 ext/iconv/iconv.c     rb_ary_push(ary, ID2SYM(rb_intern("transliterate?")));
rb_ary_push       944 ext/iconv/iconv.c     rb_ary_push(ary, ID2SYM(rb_intern("transliterate=")));
rb_ary_push       947 ext/iconv/iconv.c     rb_ary_push(ary, ID2SYM(rb_intern("discard_ilseq?")));
rb_ary_push       950 ext/iconv/iconv.c     rb_ary_push(ary, ID2SYM(rb_intern("discard_ilseq=")));
rb_ary_push       114 ext/openssl/ossl.c 	rb_ary_push(ary, ossl_##name##_new(t));	\
rb_ary_push       321 ext/openssl/ossl.c         rb_ary_push(ary, rb_str_new2(ERR_error_string(e, NULL)));
rb_ary_push       732 ext/openssl/ossl_asn1.c 	    rb_ary_push(arg, LONG2NUM(depth));
rb_ary_push       733 ext/openssl/ossl_asn1.c 	    rb_ary_push(arg, LONG2NUM(off));
rb_ary_push       734 ext/openssl/ossl_asn1.c 	    rb_ary_push(arg, LONG2NUM(hlen));
rb_ary_push       735 ext/openssl/ossl_asn1.c 	    rb_ary_push(arg, LONG2NUM(len));
rb_ary_push       736 ext/openssl/ossl_asn1.c 	    rb_ary_push(arg, (j & V_ASN1_CONSTRUCTED) ? Qtrue : Qfalse);
rb_ary_push       737 ext/openssl/ossl_asn1.c 	    rb_ary_push(arg, ossl_asn1_class2sym(tc));
rb_ary_push       738 ext/openssl/ossl_asn1.c 	    rb_ary_push(arg, INT2NUM(tag));
rb_ary_push       808 ext/openssl/ossl_asn1.c 	rb_ary_push(ary, asn1data);
rb_ary_push       297 ext/openssl/ossl_config.c     rb_ary_push(ary, rb_str_new2(cv->section));
rb_ary_push       101 ext/openssl/ossl_engine.c         rb_ary_push(ary, obj);
rb_ary_push       315 ext/openssl/ossl_engine.c 	    rb_ary_push(tmp, rb_str_new2(p->cmd_name));
rb_ary_push       316 ext/openssl/ossl_engine.c 	    rb_ary_push(tmp, rb_str_new2(p->cmd_desc));
rb_ary_push       317 ext/openssl/ossl_engine.c 	    rb_ary_push(tmp, ossl_engine_cmd_flag_to_name(p->cmd_flags));
rb_ary_push       318 ext/openssl/ossl_engine.c 	    rb_ary_push(ary, tmp);
rb_ary_push       201 ext/openssl/ossl_ocsp.c 	rb_ary_push(ary, tmp);
rb_ary_push       540 ext/openssl/ossl_ocsp.c 	rb_ary_push(ary, ossl_ocspcertid_new(cid));
rb_ary_push       541 ext/openssl/ossl_ocsp.c 	rb_ary_push(ary, INT2NUM(status));
rb_ary_push       542 ext/openssl/ossl_ocsp.c 	rb_ary_push(ary, INT2NUM(reason));
rb_ary_push       543 ext/openssl/ossl_ocsp.c 	rb_ary_push(ary, revtime ? asn1time_to_time(revtime) : Qnil);
rb_ary_push       544 ext/openssl/ossl_ocsp.c 	rb_ary_push(ary, thisupd ? asn1time_to_time(thisupd) : Qnil);
rb_ary_push       545 ext/openssl/ossl_ocsp.c 	rb_ary_push(ary, nextupd ? asn1time_to_time(nextupd) : Qnil);
rb_ary_push       550 ext/openssl/ossl_ocsp.c 	    rb_ary_push(ext, ossl_x509ext_new(x509ext));
rb_ary_push       552 ext/openssl/ossl_ocsp.c 	rb_ary_push(ary, ext);
rb_ary_push       553 ext/openssl/ossl_ocsp.c 	rb_ary_push(ret, ary);
rb_ary_push       481 ext/openssl/ossl_pkcs7.c 	rb_ary_push(ary, ossl_pkcs7si_new(si));
rb_ary_push       525 ext/openssl/ossl_pkcs7.c 	rb_ary_push(ary, ossl_pkcs7ri_new(si));
rb_ary_push       413 ext/openssl/ossl_ssl.c     rb_ary_push(ary, rb_str_new2(SSL_CIPHER_get_name(cipher)));
rb_ary_push       414 ext/openssl/ossl_ssl.c     rb_ary_push(ary, rb_str_new2(SSL_CIPHER_get_version(cipher)));
rb_ary_push       416 ext/openssl/ossl_ssl.c     rb_ary_push(ary, INT2FIX(bits));
rb_ary_push       417 ext/openssl/ossl_ssl.c     rb_ary_push(ary, INT2FIX(alg_bits));
rb_ary_push       445 ext/openssl/ossl_ssl.c         rb_ary_push(ary, ossl_ssl_cipher_to_ary(cipher));
rb_ary_push       794 ext/openssl/ossl_ssl.c 	rb_ary_push(ary, ossl_x509_new(cert));
rb_ary_push       542 ext/openssl/ossl_x509cert.c 	rb_ary_push(ary, ossl_x509ext_new(ext));
rb_ary_push       275 ext/openssl/ossl_x509crl.c 	rb_ary_push(ary, revoked);
rb_ary_push       446 ext/openssl/ossl_x509crl.c 	rb_ary_push(ary, ossl_x509ext_new(ext));
rb_ary_push       230 ext/openssl/ossl_x509name.c 	rb_ary_push(ret, ary);
rb_ary_push       391 ext/openssl/ossl_x509req.c 	rb_ary_push(ary, ossl_x509attr_new(attr));
rb_ary_push       160 ext/openssl/ossl_x509revoked.c 	rb_ary_push(ary, ossl_x509ext_new(ext));
rb_ary_push       432 ext/openssl/ossl_x509store.c 	rb_ary_push(ary, ossl_x509_new(x509));
rb_ary_push       704 ext/readline/readline.c 	    rb_ary_push(result, rb_tainted_str_new2(matches[i]));
rb_ary_push       731 ext/readline/readline.c 	    rb_ary_push(result, rb_tainted_str_new2(matches[i]));
rb_ary_push       234 ext/sdbm/init.c 	    rb_ary_push(new, assoc);
rb_ary_push       252 ext/sdbm/init.c         rb_ary_push(new, fsdbm_fetch(obj, argv[i], Qnil));
rb_ary_push       347 ext/sdbm/init.c 	if (RTEST(ret)) rb_ary_push(ary, keystr);
rb_ary_push       593 ext/sdbm/init.c 	rb_ary_push(ary, rb_tainted_str_new(key.dptr, key.dsize));
rb_ary_push       612 ext/sdbm/init.c 	rb_ary_push(ary, rb_tainted_str_new(val.dptr, val.dsize));
rb_ary_push       671 ext/sdbm/init.c 	rb_ary_push(ary, rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize),
rb_ary_push      1318 ext/socket/socket.c     rb_ary_push(ary, rb_str_new2(hostp));
rb_ary_push      1324 ext/socket/socket.c 		rb_ary_push(names, rb_str_new2(*pch));
rb_ary_push      1331 ext/socket/socket.c     rb_ary_push(ary, names);
rb_ary_push      1332 ext/socket/socket.c     rb_ary_push(ary, INT2NUM(addr->ai_family));
rb_ary_push      1334 ext/socket/socket.c 	rb_ary_push(ary, (*ipaddr)(ai->ai_addr, ai->ai_addrlen));
rb_ary_push      2686 ext/socket/socket.c 	rb_ary_push(ary, INT2FIX(res->ai_family));
rb_ary_push      2687 ext/socket/socket.c 	rb_ary_push(ary, INT2FIX(res->ai_socktype));
rb_ary_push      2688 ext/socket/socket.c 	rb_ary_push(ary, INT2FIX(res->ai_protocol));
rb_ary_push      2689 ext/socket/socket.c 	rb_ary_push(base, ary);
rb_ary_push      2759 ext/socket/socket.c     rb_ary_push(ary, rb_str_new2(h->h_name));
rb_ary_push      2761 ext/socket/socket.c     rb_ary_push(ary, names);
rb_ary_push      2764 ext/socket/socket.c 	    rb_ary_push(names, rb_str_new2(*pch));
rb_ary_push      2767 ext/socket/socket.c     rb_ary_push(ary, INT2NUM(h->h_addrtype));
rb_ary_push      2770 ext/socket/socket.c 	rb_ary_push(ary, rb_str_new(*pch, h->h_length));
rb_ary_push      2773 ext/socket/socket.c     rb_ary_push(ary, rb_str_new(h->h_addr, h->h_length));
rb_ary_push       971 ext/stringio/stringio.c 	rb_ary_push(ary, line);
rb_ary_push       573 ext/syck/rubyext.c                             rb_ary_push( tmp, obj );
rb_ary_push      1008 ext/syck/rubyext.c                             rb_ary_push( v, obj );
rb_ary_push      1574 ext/syck/rubyext.c     rb_ary_push( rb_ivar_get( self, s_value ), val );
rb_ary_push      1760 ext/tk/tcltklib.c     rb_ary_push(eventloop_stack, parent_evloop);
rb_ary_push       606 ext/tk/tkutil/tkutil.c     rb_ary_push(ary, key2keyname(key));
rb_ary_push       607 ext/tk/tkutil/tkutil.c     if (val != TK_None) rb_ary_push(ary, val);
rb_ary_push       654 ext/tk/tkutil/tkutil.c     rb_ary_push(ary, key2keyname(key));
rb_ary_push       656 ext/tk/tkutil/tkutil.c         rb_ary_push(ary, get_eval_string_core(val, Qtrue,
rb_ary_push      1133 ext/win32ole/win32ole.c                 rb_ary_push(val2, val);
rb_ary_push      1142 ext/win32ole/win32ole.c                         rb_ary_push(obj, val2);
rb_ary_push      1847 ext/win32ole/win32ole.c         rb_ary_push(classes, type);
rb_ary_push      2148 ext/win32ole/win32ole.c         rb_ary_push(argv, ole_variant2val(&realargs[end]));
rb_ary_push      2994 ext/win32ole/win32ole.c             rb_ary_push(methods, method);
rb_ary_push      3234 ext/win32ole/win32ole.c     rb_ary_push(args, guid);
rb_ary_push      3235 ext/win32ole/win32ole.c     rb_ary_push(args, major_version);
rb_ary_push      3236 ext/win32ole/win32ole.c     rb_ary_push(args, minor_version);
rb_ary_push      3362 ext/win32ole/win32ole.c         rb_ary_push(typedetails, type);
rb_ary_push      3397 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("I2"));
rb_ary_push      3401 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("I4"));
rb_ary_push      3405 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("R4"));
rb_ary_push      3409 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("R8"));
rb_ary_push      3413 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("CY"));
rb_ary_push      3417 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("DATE"));
rb_ary_push      3421 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("BSTR"));
rb_ary_push      3425 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("BOOL"));
rb_ary_push      3429 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("VARIANT"));
rb_ary_push      3433 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("DECIMAL"));
rb_ary_push      3437 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("I1"));
rb_ary_push      3441 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("UI1"));
rb_ary_push      3445 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("UI2"));
rb_ary_push      3449 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("UI4"));
rb_ary_push      3453 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("I8"));
rb_ary_push      3457 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("UI8"));
rb_ary_push      3461 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("INT"));
rb_ary_push      3465 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("UINT"));
rb_ary_push      3469 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("VOID"));
rb_ary_push      3473 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("HRESULT"));
rb_ary_push      3477 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("PTR"));
rb_ary_push      3481 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("SAFEARRAY"));
rb_ary_push      3485 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("CARRAY"));
rb_ary_push      3489 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("USERDEFINED"));
rb_ary_push      3499 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("DISPATCH"));
rb_ary_push      3503 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("ERROR"));
rb_ary_push      3508 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("LPWSTR"));
rb_ary_push      3512 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("LPSTR"));
rb_ary_push      3644 ext/win32ole/win32ole.c                 rb_ary_push(typelibs, v);
rb_ary_push      3682 ext/win32ole/win32ole.c             rb_ary_push(progids, v);
rb_ary_push      3684 ext/win32ole/win32ole.c             rb_ary_push(progids, v);
rb_ary_push      3813 ext/win32ole/win32ole.c                 rb_ary_push(typelibs, typelib);
rb_ary_push      4694 ext/win32ole/win32ole.c             rb_ary_push(types, type);
rb_ary_push      4757 ext/win32ole/win32ole.c         rb_ary_push(variables, var);
rb_ary_push      5862 ext/win32ole/win32ole.c             rb_ary_push(params, param);
rb_ary_push      6357 ext/win32ole/win32ole.c         rb_ary_push(args, ev);
rb_ary_push      6363 ext/win32ole/win32ole.c         rb_ary_push(args, ole_variant2val(pvar));
rb_ary_push      6369 ext/win32ole/win32ole.c         rb_ary_push(args, argv);
rb_ary_push      6751 ext/win32ole/win32ole.c     rb_ary_push(ary_ole_event, self);
rb_ary_push      6786 ext/win32ole/win32ole.c     rb_ary_push(events, data);
rb_ary_push       343 ext/zlib/zlib.c 	rb_ary_push(dst, rb_uint2inum(crctbl[i]));
rb_ary_push      3324 ext/zlib/zlib.c 	rb_ary_push(dst, str);
rb_ary_push      4191 file.c         		rb_ary_push(tmp, str);
rb_ary_push      1655 gc.c               rb_ary_push(finalizers, block);
rb_ary_push      1741 gc.c           	rb_ary_push(table, block);
rb_ary_push       736 hash.c         	rb_ary_push(result, rb_assoc_new(key, value));
rb_ary_push       758 hash.c         	rb_ary_push(result, rb_hash_aref(hash, argv[i]));
rb_ary_push      1060 hash.c             rb_ary_push(ary, rb_assoc_new(key, value));
rb_ary_push      1202 hash.c             rb_ary_push(ary, key);
rb_ary_push      1233 hash.c             rb_ary_push(ary, value);
rb_ary_push      1805 hash.c         	    rb_ary_push(ary, env_str_new(*env, s-*env));
rb_ary_push      1840 hash.c         	    rb_ary_push(ary, env_str_new2(s+1));
rb_ary_push      1876 hash.c         	    rb_ary_push(ary, env_str_new(*env, s-*env));
rb_ary_push      1877 hash.c         	    rb_ary_push(ary, env_str_new2(s+1));
rb_ary_push      1947 hash.c         	rb_ary_push(result, rb_f_getenv(Qnil, argv[i]));
rb_ary_push      1968 hash.c         		rb_ary_push(result, rb_assoc_new(k, v));
rb_ary_push      2044 hash.c         	    rb_ary_push(ary, rb_assoc_new(env_str_new(*env, s-*env),
rb_ary_push        49 intern.h       VALUE rb_ary_push(VALUE, VALUE);
rb_ary_push      1781 io.c           	rb_ary_push(ary, line);
rb_ary_push      4353 io.c           	rb_ary_push(ary, line);
rb_ary_push      4461 io.c               rb_ary_push(res, rp?rb_ary_new():rb_ary_new2(0));
rb_ary_push      4462 io.c               rb_ary_push(res, wp?rb_ary_new():rb_ary_new2(0));
rb_ary_push      4463 io.c               rb_ary_push(res, ep?rb_ary_new():rb_ary_new2(0));
rb_ary_push      4472 io.c           		    rb_ary_push(list, rb_ary_entry(read, i));
rb_ary_push      4482 io.c           		    rb_ary_push(list, rb_ary_entry(write, i));
rb_ary_push      4492 io.c           		    rb_ary_push(list, rb_ary_entry(except, i));
rb_ary_push       962 marshal.c                  rb_ary_push(extmod, m);
rb_ary_push      1101 marshal.c      		rb_ary_push(v, r_object(arg));
rb_ary_push      1140 marshal.c      		rb_ary_push(values, Qnil);
rb_ary_push       937 pack.c         		rb_ary_push(associates, from);
rb_ary_push      1139 pack.c         #define PACK_ITEM_ADJUST() while (tmp--) rb_ary_push(ary, Qnil)
rb_ary_push      1366 pack.c         		rb_ary_push(ary, infected_str_new(s, len, str));
rb_ary_push      1377 pack.c         		rb_ary_push(ary, infected_str_new(s, t-s, str));
rb_ary_push      1385 pack.c         	    rb_ary_push(ary, infected_str_new(s, len, str));
rb_ary_push      1400 pack.c         		rb_ary_push(ary, bitstr = rb_str_new(0, len));
rb_ary_push      1420 pack.c         		rb_ary_push(ary, bitstr = rb_str_new(0, len));
rb_ary_push      1440 pack.c         		rb_ary_push(ary, bitstr = rb_str_new(0, len));
rb_ary_push      1462 pack.c         		rb_ary_push(ary, bitstr = rb_str_new(0, len));
rb_ary_push      1479 pack.c         		rb_ary_push(ary, INT2FIX(c));
rb_ary_push      1488 pack.c         		rb_ary_push(ary, INT2FIX(c));
rb_ary_push      1500 pack.c         		rb_ary_push(ary, INT2FIX(tmp));
rb_ary_push      1511 pack.c         		rb_ary_push(ary, INT2FIX(tmp));
rb_ary_push      1522 pack.c         		rb_ary_push(ary, INT2NUM(tmp));
rb_ary_push      1533 pack.c         		rb_ary_push(ary, UINT2NUM(tmp));
rb_ary_push      1545 pack.c         		rb_ary_push(ary, LONG2NUM(tmp));
rb_ary_push      1555 pack.c         		rb_ary_push(ary, ULONG2NUM(tmp));
rb_ary_push      1565 pack.c         		rb_ary_push(ary, rb_quad_unpack(tmp, 1));
rb_ary_push      1574 pack.c         		rb_ary_push(ary, rb_quad_unpack(tmp, 0));
rb_ary_push      1584 pack.c         		rb_ary_push(ary, UINT2NUM(ntohs(tmp)));
rb_ary_push      1595 pack.c         		rb_ary_push(ary, ULONG2NUM(ntohl(tmp)));
rb_ary_push      1606 pack.c         		rb_ary_push(ary, UINT2NUM(vtohs(tmp)));
rb_ary_push      1617 pack.c         		rb_ary_push(ary, ULONG2NUM(vtohl(tmp)));
rb_ary_push      1629 pack.c         		rb_ary_push(ary, rb_float_new((double)tmp));
rb_ary_push      1643 pack.c         		rb_ary_push(ary, rb_float_new((double)tmp));
rb_ary_push      1657 pack.c         		rb_ary_push(ary, rb_float_new(tmp));
rb_ary_push      1669 pack.c         		rb_ary_push(ary, rb_float_new(tmp));
rb_ary_push      1683 pack.c         		rb_ary_push(ary, rb_float_new((double)tmp));
rb_ary_push      1697 pack.c         		rb_ary_push(ary, rb_float_new(tmp));
rb_ary_push      1710 pack.c         		rb_ary_push(ary, ULONG2NUM(l));
rb_ary_push      1766 pack.c         		rb_ary_push(ary, buf);
rb_ary_push      1810 pack.c         		rb_ary_push(ary, buf);
rb_ary_push      1837 pack.c         		rb_ary_push(ary, buf);
rb_ary_push      1892 pack.c         		rb_ary_push(ary, tmp);
rb_ary_push      1932 pack.c         		    rb_ary_push(ary, tmp);
rb_ary_push      1946 pack.c         			rb_ary_push(ary, ULONG2NUM(ul));
rb_ary_push      1957 pack.c         				rb_ary_push(ary, big);
rb_ary_push      4139 parse.y        			rb_ary_push($$, arg);
rb_ary_push      4575 parse.y        		rb_ary_push(ruby_debug_lines, str);
rb_ary_push      4632 parse.y        	rb_ary_push(ruby_debug_lines, line);
rb_ary_push      7913 parse.y            rb_ary_push(list, sym);
rb_ary_push      8527 parse.y            rb_ary_push(ary, ID2SYM(value));
rb_ary_push       643 process.c          rb_ary_push(ary, rb_assoc_new(INT2NUM(pid), rb_last_status));
rb_ary_push       805 process.c      	rb_ary_push(result, rb_assoc_new(INT2NUM(pid), rb_last_status));
rb_ary_push       816 process.c      	rb_ary_push(result, rb_assoc_new(INT2NUM(pid), rb_last_status));
rb_ary_push      2599 process.c      	rb_ary_push(ary, INT2NUM(groups[i]));
rb_ary_push      1096 re.c           	    rb_ary_push(ary, Qnil);
rb_ary_push      1101 re.c           	    rb_ary_push(ary, str);
rb_ary_push      1247 re.c           		rb_ary_push(result, str);
rb_ary_push       192 ruby.c         		rb_ary_push(ary, (*filter)(rubylib_mangled_path(p, (int)(s-p))));
rb_ary_push       196 ruby.c         		rb_ary_push(ary, (*filter)(rubylib_mangled_path2(p)));
rb_ary_push       203 ruby.c         	rb_ary_push(rb_load_path, (*filter)(rubylib_mangled_path2(path)));
rb_ary_push      1192 ruby.c         	rb_ary_push(rb_argv, arg);
rb_ary_push      3272 string.c       		    rb_ary_push(result, rb_str_substr(str, beg, end-beg));
rb_ary_push      3293 string.c       		    rb_ary_push(result, rb_str_new("", 0));
rb_ary_push      3297 string.c       		    rb_ary_push(result, rb_str_substr(str, beg, mbclen2(RSTRING(str)->ptr[beg],spat)));
rb_ary_push      3307 string.c       		rb_ary_push(result, rb_str_substr(str, beg, end-beg));
rb_ary_push      3318 string.c       		rb_ary_push(result, tmp);
rb_ary_push      3328 string.c       	rb_ary_push(result, tmp);
rb_ary_push      3798 string.c       	    rb_ary_push(result, rb_reg_nth_match(i, match));
rb_ary_push      3851 string.c       	    rb_ary_push(ary, result);
rb_ary_push        67 struct.c       	rb_ary_push(ary, rb_str_new2(rb_id2name(SYM2ID(*p))));
rb_ary_push       231 struct.c       	rb_ary_push(ary, ID2SYM(slot));
rb_ary_push       700 struct.c       	    rb_ary_push(result, RSTRUCT(s)->ptr[i]);
rb_ary_push       596 variable.c     	    rb_ary_push(ary, (VALUE)trace->data);
rb_ary_push       696 variable.c         rb_ary_push(ary, rb_str_new2(rb_id2name(key)));
rb_ary_push       720 variable.c     	    rb_ary_push(ary, rb_str_new2(buf));
rb_ary_push       991 variable.c     	rb_ary_push(ary, rb_str_new2(rb_id2name(key)));
rb_ary_push      1405 variable.c         rb_ary_push(ary, rb_str_new2(rb_id2name(key)));
rb_ary_push      1605 variable.c     	    rb_ary_push(ary, kval);


rb_ary_rassoc

rb_ary_rassoc    2908 array.c            rb_define_method(rb_cArray, "rassoc", rb_ary_rassoc, 1);
rb_ary_rassoc      66 intern.h       VALUE rb_ary_rassoc(VALUE, VALUE);


rb_ary_reject_bang

rb_ary_reject_bang 1902 array.c            rb_ary_reject_bang(ary);
rb_ary_reject_bang 1920 array.c            rb_ary_reject_bang(ary);
rb_ary_reject_bang 2895 array.c            rb_define_method(rb_cArray, "reject!", rb_ary_reject_bang, 0);


rb_ary_replace

rb_ary_replace    273 array.c        static VALUE rb_ary_replace(VALUE, VALUE);
rb_ary_replace    330 array.c        	    rb_ary_replace(ary, val);
rb_ary_replace   1390 array.c        	rb_ary_replace(dup, ary);
rb_ary_replace   2847 array.c            rb_define_method(rb_cArray, "initialize_copy", rb_ary_replace, 1);
rb_ary_replace   2898 array.c            rb_define_method(rb_cArray, "replace", rb_ary_replace, 1);


rb_ary_reverse

rb_ary_reverse   1443 array.c            return rb_ary_reverse(ary);
rb_ary_reverse   1459 array.c            return rb_ary_reverse(rb_ary_dup(ary));
rb_ary_reverse    572 ext/syck/rubyext.c                             tmp = rb_ary_reverse( tmp );
rb_ary_reverse   1007 ext/syck/rubyext.c                             v = rb_ary_reverse( v );
rb_ary_reverse     57 intern.h       VALUE rb_ary_reverse(VALUE);


rb_ary_shift

rb_ary_shift      577 array.c        	return rb_ary_shift(ary);
rb_ary_shift      199 enumerator.c   	rb_ary_shift(ary);
rb_ary_shift      709 ext/readline/readline.c 	    rb_ary_shift(result);
rb_ary_shift      736 ext/readline/readline.c 	    rb_ary_shift(result);
rb_ary_shift      366 ext/syck/rubyext.c                 obj = rb_ary_shift( arr );
rb_ary_shift     1172 ext/syck/rubyext.c                 VALUE scheme = rb_ary_shift( parts );
rb_ary_shift     1180 ext/syck/rubyext.c                     VALUE domain = rb_ary_shift( parts );
rb_ary_shift       51 intern.h       VALUE rb_ary_shift(VALUE);
rb_ary_shift     4107 io.c           	    filename = rb_ary_shift(rb_argv);
rb_ary_shift      441 ruby.c         	    rb_ary_shift(rb_argv);


rb_ary_sort

rb_ary_sort      2883 array.c            rb_define_method(rb_cArray, "sort", rb_ary_sort, 0);
rb_ary_sort       417 enum.c             return rb_ary_sort(enum_to_a(obj));
rb_ary_sort        58 intern.h       VALUE rb_ary_sort(VALUE);


rb_ary_sort_bang

rb_ary_sort_bang 1577 array.c            rb_ary_sort_bang(ary);
rb_ary_sort_bang 2884 array.c            rb_define_method(rb_cArray, "sort!", rb_ary_sort_bang, 0);
rb_ary_sort_bang 1106 hash.c             rb_ary_sort_bang(entries);
rb_ary_sort_bang   59 intern.h       VALUE rb_ary_sort_bang(VALUE);


rb_ary_splice

rb_ary_splice    1064 array.c        	rb_ary_splice(ary, NUM2LONG(argv[0]), NUM2LONG(argv[1]), argv[2]);
rb_ary_splice    1076 array.c        	rb_ary_splice(ary, beg, len, argv[1]);
rb_ary_splice    1114 array.c            rb_ary_splice(ary, pos, 0, rb_ary_new4(argc - 1, argv + 1));
rb_ary_splice    1846 array.c        	rb_ary_splice(ary, pos, len, Qundef);	/* Qnil/rb_ary_new2(0) */
rb_ary_splice    2204 array.c        	rb_ary_splice(x, RARRAY(x)->len, 0, y);
rb_ary_splice    2753 array.c            rb_ary_splice(ary, idx, 1, ary2);


rb_ary_store

rb_ary_store      354 array.c        	    rb_ary_store(ary, i, rb_yield(LONG2NUM(i)));
rb_ary_store      469 array.c            rb_ary_store(ary, RARRAY(ary)->len, item);
rb_ary_store      632 array.c            rb_ary_store(ary, len + argc - 1, Qnil);
rb_ary_store     1082 array.c            rb_ary_store(ary, offset, argv[1]);
rb_ary_store     1631 array.c        	rb_ary_store(ary, i, rb_yield(RARRAY(ary)->ptr[i]));
rb_ary_store     1741 array.c        	    rb_ary_store(ary, i2, e);
rb_ary_store     1878 array.c        	    rb_ary_store(ary, i2, v);
rb_ary_store     2007 array.c        		rb_ary_store(result, j, rb_ary_new2(alen));
rb_ary_store     2015 array.c        	    rb_ary_store(rb_ary_elt(result, j), i, rb_ary_elt(tmp, j));
rb_ary_store     2624 array.c        	    rb_ary_store(ary, j++, v);
rb_ary_store     1010 enum.c             rb_ary_store(tmp, 0, val);
rb_ary_store     1107 ext/openssl/ossl_asn1.c 	rb_ary_store(ary, i, rb_str_new2(ossl_asn1_info[i].name));
rb_ary_store       30 ext/openssl/ossl_pkey.c     rb_ary_store(ary, 0, INT2NUM(p));
rb_ary_store       31 ext/openssl/ossl_pkey.c     rb_ary_store(ary, 1, INT2NUM(n));
rb_ary_store      436 ext/pty/pty.c      rb_ary_store(res,0,(VALUE)rport);
rb_ary_store      437 ext/pty/pty.c      rb_ary_store(res,1,(VALUE)wport);
rb_ary_store      438 ext/pty/pty.c      rb_ary_store(res,2,INT2FIX(info.child_pid));
rb_ary_store      131 ext/racc/cparse/cparse.c #define PUSH(s, i) rb_ary_store(s, RARRAY(s)->len, i)
rb_ary_store      536 ext/syck/rubyext.c                 rb_ary_store( obj, i, syck_seq_read( n, i ) );
rb_ary_store      977 ext/syck/rubyext.c                 rb_ary_store( obj, i, syck_seq_read( n, i ) );
rb_ary_store     1299 ext/syck/rubyext.c                 rb_ary_store( v, i, syck_seq_read( n, i ) );
rb_ary_store       45 intern.h       void rb_ary_store(VALUE, long, VALUE);


rb_ary_subseq

rb_ary_subseq     733 array.c        	return rb_ary_subseq(ary, beg, len);
rb_ary_subseq     750 array.c        	return rb_ary_subseq(ary, beg, len);
rb_ary_subseq    1845 array.c        	arg2 = rb_ary_subseq(ary, pos, len);


rb_ary_to_ary

rb_ary_to_ary     989 array.c        	rpl = rb_ary_to_ary(rpl);
rb_ary_to_ary    2137 eval.c         	    args = rb_ary_to_ary(args);\
rb_ary_to_ary    2842 eval.c         		    if (TYPE(v) != T_ARRAY) v = rb_ary_to_ary(v);
rb_ary_to_ary    2883 eval.c         			if (TYPE(v) != T_ARRAY) v = rb_ary_to_ary(v);
rb_ary_to_ary    3065 eval.c         	result = rb_ary_to_ary(rb_eval(self, node->nd_head));
rb_ary_to_ary      47 intern.h       VALUE rb_ary_to_ary(VALUE);


rb_ary_to_s

rb_ary_to_s      2849 array.c            rb_define_method(rb_cArray, "to_s", rb_ary_to_s, 0);
rb_ary_to_s      1163 hash.c             return rb_ary_to_s(rb_hash_to_a(hash));
rb_ary_to_s        48 intern.h       VALUE rb_ary_to_s(VALUE);


rb_ary_uniq_bang

rb_ary_uniq_bang 2646 array.c            rb_ary_uniq_bang(ary);
rb_ary_uniq_bang 2918 array.c            rb_define_method(rb_cArray, "uniq!", rb_ary_uniq_bang, 0);


rb_ary_unshift

rb_ary_unshift   10941 eval.c         	    rb_ary_unshift(errat, rb_ary_entry(oldbt, 0));
rb_ary_unshift   1104 ext/syck/rubyext.c                 rb_ary_unshift( subclass_parts, rb_ary_pop( parts ) );
rb_ary_unshift     52 intern.h       VALUE rb_ary_unshift(VALUE, VALUE);
rb_ary_unshift    290 struct.c       	    rb_ary_unshift(rest, ID2SYM(id));


rb_assoc_new

rb_assoc_new     1475 bignum.c           return rb_assoc_new(bignorm(div), bignorm(mod));
rb_assoc_new     1906 bignum.c       	return rb_assoc_new(rb_int2big(FIX2LONG(y)), x);
rb_assoc_new     1909 bignum.c              return rb_assoc_new(y, x);
rb_assoc_new      394 enum.c             return rb_assoc_new(ary[0], ary[1]);
rb_assoc_new      149 ext/bigdecimal/bigdecimal.c     obj = rb_assoc_new(INT2NUM(p->Prec*VpBaseFig()),
rb_assoc_new      429 ext/bigdecimal/bigdecimal.c        obj = rb_assoc_new(other, BigDecimal_to_f(self));
rb_assoc_new      432 ext/bigdecimal/bigdecimal.c        obj = rb_assoc_new(b->obj, self);
rb_assoc_new      778 ext/bigdecimal/bigdecimal.c     obj = rb_assoc_new(ToValue(div), ToValue(mod));
rb_assoc_new      253 ext/dbm/dbm.c  	assoc = rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize),
rb_assoc_new      344 ext/dbm/dbm.c      return rb_assoc_new(keystr, valstr);
rb_assoc_new      367 ext/dbm/dbm.c          ret = rb_protect(rb_yield, rb_assoc_new(rb_str_dup(keystr), valstr), &status);
rb_assoc_new      592 ext/dbm/dbm.c  	rb_yield(rb_assoc_new(keystr, valstr));
rb_assoc_new      690 ext/dbm/dbm.c  	rb_ary_push(ary, rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize),
rb_assoc_new      348 ext/gdbm/gdbm.c 	VALUE assoc = rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr));
rb_assoc_new      438 ext/gdbm/gdbm.c     return rb_assoc_new(keystr, valstr);
rb_assoc_new      460 ext/gdbm/gdbm.c         ret = rb_protect(rb_yield, rb_assoc_new(keystr, valstr), &status);
rb_assoc_new      693 ext/gdbm/gdbm.c         rb_yield(rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr)));
rb_assoc_new      796 ext/gdbm/gdbm.c         rb_ary_push(ary, rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr)));
rb_assoc_new      232 ext/openssl/ossl_bn.c     return rb_assoc_new(other, self);
rb_assoc_new      230 ext/sdbm/init.c 	assoc = rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize),
rb_assoc_new      323 ext/sdbm/init.c     return rb_assoc_new(keystr, valstr);
rb_assoc_new      345 ext/sdbm/init.c         ret = rb_protect(rb_yield, rb_assoc_new(rb_str_dup(keystr), valstr), &status);
rb_assoc_new      574 ext/sdbm/init.c 	rb_yield(rb_assoc_new(keystr, valstr));
rb_assoc_new      671 ext/sdbm/init.c 	rb_ary_push(ary, rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize),
rb_assoc_new      617 ext/socket/socket.c 	  return rb_assoc_new(str, ipaddr((struct sockaddr*)buf, fptr->mode & FMODE_NOREVLOOKUP));
rb_assoc_new      619 ext/socket/socket.c 	  return rb_assoc_new(str, Qnil);
rb_assoc_new      623 ext/socket/socket.c 	return rb_assoc_new(str, unixaddr((struct sockaddr_un*)buf));
rb_assoc_new      626 ext/socket/socket.c 	return rb_assoc_new(str, rb_str_new(buf, alen));
rb_assoc_new     1948 ext/socket/socket.c     return rb_assoc_new(rb_str_new2("AF_UNIX"),
rb_assoc_new     2112 ext/socket/socket.c     return rb_assoc_new(init_sock(rb_obj_alloc(klass), sp[0]),
rb_assoc_new     2575 ext/socket/socket.c     return rb_assoc_new(sock2, rb_str_new(buf, len));
rb_assoc_new     2628 ext/socket/socket.c     return rb_assoc_new(sock2, rb_str_new(buf, len));
rb_assoc_new     3032 ext/socket/socket.c     return rb_assoc_new(rb_str_new2(hbuf), rb_str_new2(pbuf));
rb_assoc_new     3067 ext/socket/socket.c     return rb_assoc_new(INT2NUM(ntohs(sockaddr->sin_port)), host);
rb_assoc_new     2845 file.c             return rb_assoc_new(rb_file_s_dirname(Qnil, path), rb_file_s_basename(1,&path));
rb_assoc_new      658 hash.c         	return rb_assoc_new(var.key, var.val);
rb_assoc_new      736 hash.c         	rb_ary_push(result, rb_assoc_new(key, value));
rb_assoc_new     1024 hash.c             rb_yield(rb_assoc_new(key, value));
rb_assoc_new     1060 hash.c             rb_ary_push(ary, rb_assoc_new(key, value));
rb_assoc_new     1888 hash.c         	    rb_yield(rb_assoc_new(RARRAY(ary)->ptr[i], RARRAY(ary)->ptr[i+1]));
rb_assoc_new     1968 hash.c         		rb_ary_push(result, rb_assoc_new(k, v));
rb_assoc_new     2044 hash.c         	    rb_ary_push(ary, rb_assoc_new(env_str_new(*env, s-*env),
rb_assoc_new     2196 hash.c         	    return rb_assoc_new(key, val);
rb_assoc_new       33 intern.h       VALUE rb_assoc_new(VALUE, VALUE);
rb_assoc_new     4908 io.c               return rb_assoc_new(r, w);
rb_assoc_new      383 math.c             return rb_assoc_new(rb_float_new(d), INT2NUM(exp));
rb_assoc_new      103 numeric.c      	return rb_assoc_new(y, x);
rb_assoc_new      104 numeric.c          return rb_assoc_new(rb_Float(y), rb_Float(x));
rb_assoc_new      307 numeric.c          return rb_assoc_new(num_div(x, y), rb_funcall(x, '%', 1, y));
rb_assoc_new      517 numeric.c          return rb_assoc_new(rb_Float(y), x);
rb_assoc_new      718 numeric.c          return rb_assoc_new(a, b);
rb_assoc_new     2164 numeric.c      	return rb_assoc_new(LONG2NUM(div), LONG2NUM(mod));
rb_assoc_new     2178 numeric.c      	    return rb_assoc_new(a, b);
rb_assoc_new      643 process.c          rb_ary_push(ary, rb_assoc_new(INT2NUM(pid), rb_last_status));
rb_assoc_new      756 process.c          return rb_assoc_new(pid, rb_last_status);
rb_assoc_new      805 process.c      	rb_ary_push(result, rb_assoc_new(INT2NUM(pid), rb_last_status));
rb_assoc_new      816 process.c      	rb_ary_push(result, rb_assoc_new(INT2NUM(pid), rb_last_status));
rb_assoc_new     1935 process.c          return rb_assoc_new(RLIM2NUM(rlim.rlim_cur), RLIM2NUM(rlim.rlim_max));
rb_assoc_new      722 re.c           	return rb_assoc_new(Qnil, Qnil);
rb_assoc_new      724 re.c               return rb_assoc_new(INT2FIX(RMATCH(match)->regs->beg[i]),


rb_atomic_t

rb_atomic_t        28 rubysig.h          rb_atomic_t trap_immediate = ATOMIC_SET(rb_trap_immediate, 1)
rb_atomic_t        65 rubysig.h      RUBY_EXTERN rb_atomic_t rb_trap_immediate;
rb_atomic_t        77 rubysig.h      RUBY_EXTERN rb_atomic_t rb_trap_pending;
rb_atomic_t       301 signal.c       static rb_atomic_t trap_pending_list[NSIG];
rb_atomic_t       303 signal.c       rb_atomic_t rb_trap_pending;
rb_atomic_t       304 signal.c       rb_atomic_t rb_trap_immediate;


rb_attr

rb_attr           829 class.c            rb_attr(klass, rb_intern(name), read, write, Qfalse);
rb_attr          1111 ext/openssl/ossl_asn1.c     rb_attr(cASN1Data, rb_intern("value"), 1, 1, Qtrue);
rb_attr          1112 ext/openssl/ossl_asn1.c     rb_attr(cASN1Data, rb_intern("tag"), 1, 1, Qtrue);
rb_attr          1113 ext/openssl/ossl_asn1.c     rb_attr(cASN1Data, rb_intern("tag_class"), 1, 1, Qtrue);
rb_attr          1118 ext/openssl/ossl_asn1.c     rb_attr(cASN1Primitive, rb_intern("tagging"), 1, 1, Qtrue);
rb_attr          1124 ext/openssl/ossl_asn1.c     rb_attr(cASN1Constructive, rb_intern("tagging"), 1, 1, Qtrue);
rb_attr          1165 ext/openssl/ossl_asn1.c     rb_attr(cASN1BitString, rb_intern("unused_bits"), 1, 1, Qtrue);
rb_attr           149 ext/openssl/ossl_pkcs12.c     rb_attr(cPKCS12, rb_intern("key"), 1, 0, Qfalse);
rb_attr           150 ext/openssl/ossl_pkcs12.c     rb_attr(cPKCS12, rb_intern("certificate"), 1, 0, Qfalse);
rb_attr           151 ext/openssl/ossl_pkcs12.c     rb_attr(cPKCS12, rb_intern("ca_certs"), 1, 0, Qfalse);
rb_attr           936 ext/openssl/ossl_pkcs7.c     rb_attr(cPKCS7, rb_intern("data"), 1, 0, Qfalse);
rb_attr           937 ext/openssl/ossl_pkcs7.c     rb_attr(cPKCS7, rb_intern("error_string"), 1, 1, Qfalse);
rb_attr           869 ext/openssl/ossl_ssl.c         rb_attr(cSSLContext, rb_intern(ossl_sslctx_attrs[i]), 1, 1, Qfalse);
rb_attr           878 ext/openssl/ossl_ssl.c         rb_attr(cSSLSocket, rb_intern(ossl_ssl_attr_readers[i]), 1, 0, Qfalse);
rb_attr           880 ext/openssl/ossl_ssl.c         rb_attr(cSSLSocket, rb_intern(ossl_ssl_attrs[i]), 1, 1, Qfalse);
rb_attr           433 ext/openssl/ossl_x509ext.c     rb_attr(cX509ExtFactory, rb_intern("issuer_certificate"), 1, 0, Qfalse);
rb_attr           434 ext/openssl/ossl_x509ext.c     rb_attr(cX509ExtFactory, rb_intern("subject_certificate"), 1, 0, Qfalse);
rb_attr           435 ext/openssl/ossl_x509ext.c     rb_attr(cX509ExtFactory, rb_intern("subject_request"), 1, 0, Qfalse);
rb_attr           436 ext/openssl/ossl_x509ext.c     rb_attr(cX509ExtFactory, rb_intern("crl"), 1, 0, Qfalse);
rb_attr           437 ext/openssl/ossl_x509ext.c     rb_attr(cX509ExtFactory, rb_intern("config"), 1, 0, Qfalse);
rb_attr           577 ext/openssl/ossl_x509store.c     rb_attr(cX509Store, rb_intern("verify_callback"), 1, 0, Qfalse);
rb_attr           578 ext/openssl/ossl_x509store.c     rb_attr(cX509Store, rb_intern("error"), 1, 0, Qfalse);
rb_attr           579 ext/openssl/ossl_x509store.c     rb_attr(cX509Store, rb_intern("error_string"), 1, 0, Qfalse);
rb_attr           580 ext/openssl/ossl_x509store.c     rb_attr(cX509Store, rb_intern("chain"), 1, 0, Qfalse);
rb_attr          1389 ext/tk/tkutil/tkutil.c         rb_attr(self, SYM2ID(RARRAY(inf)->ptr[2]), 1, 0, Qtrue);
rb_attr           213 intern.h       void rb_attr(VALUE,ID,int,int,int);
rb_attr          1562 object.c           rb_attr(klass, rb_to_id(name), 1, RTEST(pub), Qtrue);
rb_attr          1581 object.c       	rb_attr(klass, rb_to_id(argv[i]), 1, 0, Qtrue);
rb_attr          1600 object.c       	rb_attr(klass, rb_to_id(argv[i]), 0, 1, Qtrue);
rb_attr          1624 object.c       	rb_attr(klass, rb_to_id(argv[i]), 1, 1, Qtrue);


rb_attr_get

rb_attr_get       344 error.c            VALUE mesg = rb_attr_get(exc, rb_intern("mesg"));
rb_attr_get       488 error.c            if (!rb_equal(rb_attr_get(exc, id_mesg), rb_attr_get(obj, id_mesg)))
rb_attr_get       526 error.c            return rb_attr_get(exc, rb_intern("status"));
rb_attr_get       540 error.c            VALUE status = rb_attr_get(exc, rb_intern("status"));
rb_attr_get       593 error.c            return rb_attr_get(self, rb_intern("name"));
rb_attr_get       606 error.c            VALUE mesg = rb_attr_get(exc, rb_intern("mesg"));
rb_attr_get       740 error.c            return rb_attr_get(self, rb_intern("args"));
rb_attr_get       879 error.c            return rb_attr_get(self, rb_intern("errno"));
rb_attr_get       898 error.c            num = rb_attr_get(exc, rb_intern("errno"));
rb_attr_get      5653 eval.c         	result = rb_attr_get(recv, body->nd_vid);
rb_attr_get      6204 eval.c         		mesg  = rb_attr_get(ruby_errinfo, rb_intern("mesg"));
rb_attr_get       973 ext/iconv/iconv.c     return rb_attr_get(self, rb_success);
rb_attr_get       986 ext/iconv/iconv.c     return rb_attr_get(self, rb_failed);
rb_attr_get       999 ext/iconv/iconv.c     VALUE success = rb_attr_get(self, rb_success);
rb_attr_get      1000 ext/iconv/iconv.c     VALUE failed = rb_attr_get(self, rb_failed);
rb_attr_get       159 ext/openssl/ossl_asn1.c #define ossl_asn1_get_value(o)       rb_attr_get((o),rb_intern("@value"))
rb_attr_get       160 ext/openssl/ossl_asn1.c #define ossl_asn1_get_tag(o)         rb_attr_get((o),rb_intern("@tag"))
rb_attr_get       161 ext/openssl/ossl_asn1.c #define ossl_asn1_get_tagging(o)     rb_attr_get((o),rb_intern("@tagging"))
rb_attr_get       162 ext/openssl/ossl_asn1.c #define ossl_asn1_get_tag_class(o)   rb_attr_get((o),rb_intern("@tag_class"))
rb_attr_get       512 ext/openssl/ossl_asn1.c         rflag = rb_attr_get(obj, rb_intern("@unused_bits"));
rb_attr_get       139 ext/readline/readline.c     return rb_attr_get(mReadline, completion_proc);
rb_attr_get       156 ext/readline/readline.c     return rb_attr_get(mReadline, completion_case_fold);
rb_attr_get       170 ext/readline/readline.c     proc = rb_attr_get(mReadline, completion_proc);
rb_attr_get       176 ext/readline/readline.c     case_fold = RTEST(rb_attr_get(mReadline, completion_case_fold));
rb_attr_get       839 ext/syck/rubyext.c     input = rb_hash_aref( rb_attr_get( self, s_options ), sym_input );
rb_attr_get       840 ext/syck/rubyext.c     model = rb_hash_aref( rb_attr_get( self, s_options ), sym_model );
rb_attr_get       847 ext/syck/rubyext.c     bonus->resolver = rb_attr_get( self, s_resolver );
rb_attr_get       869 ext/syck/rubyext.c     input = rb_hash_aref( rb_attr_get( self, s_options ), sym_input );
rb_attr_get       870 ext/syck/rubyext.c     model = rb_hash_aref( rb_attr_get( self, s_options ), sym_model );
rb_attr_get       876 ext/syck/rubyext.c     bonus->resolver = rb_attr_get( self, s_resolver );
rb_attr_get       928 ext/syck/rubyext.c     VALUE tags = rb_attr_get(self, s_tags);
rb_attr_get      1088 ext/syck/rubyext.c         VALUE tags = rb_attr_get(self, s_tags);
rb_attr_get      2137 ext/tk/tcltklib.c     enc = rb_attr_get(exc, ID_at_enc);
rb_attr_get      2139 ext/tk/tcltklib.c         enc = rb_attr_get(msg, ID_at_enc);
rb_attr_get      5342 ext/tk/tcltklib.c     VALUE enc = rb_attr_get(str, ID_at_enc);
rb_attr_get      6018 ext/tk/tcltklib.c             enc = rb_attr_get(str, ID_at_enc);
rb_attr_get      6023 ext/tk/tcltklib.c                     enc = rb_attr_get(ip_obj, ID_at_enc);
rb_attr_get      6161 ext/tk/tcltklib.c             enc = rb_attr_get(str, ID_at_enc);
rb_attr_get      6174 ext/tk/tcltklib.c             enc = rb_attr_get(ip_obj, ID_at_enc);
rb_attr_get       550 intern.h       VALUE rb_attr_get(VALUE, ID);


rb_autoload

rb_autoload      7725 eval.c             rb_autoload(mod, id, RSTRING(file)->ptr);
rb_autoload       532 intern.h       void rb_autoload(VALUE, ID, const char*);


rb_autoload_load

rb_autoload_load 1795 eval.c         		    if (!RTEST(rb_autoload_load(klass, id))) break;
rb_autoload_load  533 intern.h       VALUE rb_autoload_load(VALUE, ID);
rb_autoload_load 1288 variable.c     		if (!RTEST(rb_autoload_load(tmp, id))) break;


rb_autoload_p

rb_autoload_p    1771 eval.c         		if (result == Qundef && NIL_P(rb_autoload_p((VALUE)klass, id))) {
rb_autoload_p    7745 eval.c             return rb_autoload_p(mod, rb_to_id(sym));
rb_autoload_p     534 intern.h       VALUE rb_autoload_p(VALUE, ID);


rb_backref_error

rb_backref_error  298 parse.y        static void rb_backref_error(NODE*);
rb_backref_error 1003 parse.y        			rb_backref_error($1);
rb_backref_error 1417 parse.y        			rb_backref_error($1);
rb_backref_error 1495 parse.y        			rb_backref_error($1);
rb_backref_error 1780 parse.y        			rb_backref_error($1);


rb_backref_get

rb_backref_get   10152 eval.c             tval = rb_backref_get();
rb_backref_get   10247 eval.c             tval = rb_backref_get();
rb_backref_get    400 intern.h       VALUE rb_backref_get(void);
rb_backref_get    932 re.c               match = rb_backref_get();
rb_backref_get   1064 re.c               return rb_reg_last_match(rb_backref_get());
rb_backref_get   1070 re.c               return rb_reg_match_pre(rb_backref_get());
rb_backref_get   1076 re.c               return rb_reg_match_post(rb_backref_get());
rb_backref_get   1082 re.c               return rb_reg_match_last(rb_backref_get());
rb_backref_get   1605 re.c               result = rb_backref_get();
rb_backref_get   2143 re.c               VALUE match = rb_backref_get();
rb_backref_get   2182 re.c           	return rb_reg_nth_match(NUM2INT(nth), rb_backref_get());
rb_backref_get   1402 string.c       	return rb_reg_nth_match(nth, rb_backref_get());
rb_backref_get   1579 string.c           match = rb_backref_get();
rb_backref_get   1838 string.c       	match = rb_backref_get();
rb_backref_get   1956 string.c       	match = rb_backref_get();
rb_backref_get   3290 string.c       	    regs = RMATCH(rb_backref_get())->regs;
rb_backref_get   3779 string.c       	match = rb_backref_get();
rb_backref_get   3850 string.c       	    match = rb_backref_get();
rb_backref_get   3858 string.c       	match = rb_backref_get();
rb_backref_get    717 variable.c         if (!NIL_P(rb_backref_get())) {


rb_backref_set

rb_backref_set   10153 eval.c             rb_backref_set(th->last_match);
rb_backref_set   10248 eval.c             rb_backref_set(tmp->last_match);
rb_backref_set    401 intern.h       void rb_backref_set(VALUE);
rb_backref_set    891 re.c           	rb_backref_set(Qnil);
rb_backref_set    922 re.c           	    rb_backref_set(Qnil);
rb_backref_set    945 re.c               rb_backref_set(match);
rb_backref_set   1468 re.c           	rb_backref_set(Qnil);
rb_backref_set   1529 re.c           	    rb_backref_set(Qnil);
rb_backref_set   1560 re.c           	rb_backref_set(Qnil);
rb_backref_set   1602 re.c           	rb_backref_set(Qnil);
rb_backref_set   2156 re.c               rb_backref_set(val);
rb_backref_set   1020 string.c       		rb_backref_set(Qnil);
rb_backref_set   1125 string.c       		    rb_backref_set(Qnil);
rb_backref_set   1848 string.c       	    rb_backref_set(match);
rb_backref_set   1966 string.c       	    rb_backref_set(match);
rb_backref_set   2013 string.c           rb_backref_set(match);
rb_backref_set   3853 string.c       	rb_backref_set(match);
rb_backref_set   3861 string.c       	rb_backref_set(match);	/* restore $~ value */
rb_backref_set   3863 string.c           rb_backref_set(match);


rb_big2dbl

rb_big2dbl        864 bignum.c           return rb_float_new(rb_big2dbl(x));
rb_big2dbl        891 bignum.c       	return rb_dbl_cmp(rb_big2dbl(x), RFLOAT(y)->value);
rb_big2dbl        937 bignum.c       	    b = rb_big2dbl(x);
rb_big2dbl       1125 bignum.c       	return rb_float_new(rb_big2dbl(x) + RFLOAT(y)->value);
rb_big2dbl       1150 bignum.c       	return rb_float_new(rb_big2dbl(x) - RFLOAT(y)->value);
rb_big2dbl       1174 bignum.c       	return rb_float_new(rb_big2dbl(x) * RFLOAT(y)->value);
rb_big2dbl       1380 bignum.c       	return rb_float_new(rb_big2dbl(x) / RFLOAT(y)->value);
rb_big2dbl       1493 bignum.c           double dx = rb_big2dbl(x);
rb_big2dbl       1502 bignum.c       	dy = rb_big2dbl(y);
rb_big2dbl       1542 bignum.c       	d = rb_big2dbl(y);
rb_big2dbl       1567 bignum.c           return rb_float_new(pow(rb_big2dbl(x), d));
rb_big2dbl        833 ext/win32ole/win32ole.c         V_R8(var) = rb_big2dbl(val);
rb_big2dbl        914 ext/win32ole/win32ole.c             *V_R8REF(var) = rb_big2dbl(val);
rb_big2dbl         97 intern.h       double rb_big2dbl(VALUE);
rb_big2dbl        548 numeric.c      	return rb_float_new(RFLOAT(x)->value + rb_big2dbl(y));
rb_big2dbl        571 numeric.c      	return rb_float_new(RFLOAT(x)->value - rb_big2dbl(y));
rb_big2dbl        594 numeric.c      	return rb_float_new(RFLOAT(x)->value * rb_big2dbl(y));
rb_big2dbl        621 numeric.c      	d = rb_big2dbl(y);
rb_big2dbl        677 numeric.c      	fy = rb_big2dbl(y);
rb_big2dbl        707 numeric.c      	fy = rb_big2dbl(y);
rb_big2dbl        736 numeric.c      	return rb_float_new(pow(RFLOAT(x)->value, rb_big2dbl(y)));
rb_big2dbl        808 numeric.c      	b = rb_big2dbl(y);
rb_big2dbl        877 numeric.c      	b = rb_big2dbl(y);
rb_big2dbl        909 numeric.c      	b = rb_big2dbl(y);
rb_big2dbl        944 numeric.c      	b = rb_big2dbl(y);
rb_big2dbl        978 numeric.c      	b = rb_big2dbl(y);
rb_big2dbl       1013 numeric.c      	b = rb_big2dbl(y);
rb_big2dbl       2054 numeric.c      	return rb_float_new((double)FIX2LONG(y) / rb_big2dbl(y));
rb_big2dbl       2153 object.c       	return rb_float_new(rb_big2dbl(val));


rb_big2ll

rb_big2ll          91 intern.h       LONG_LONG rb_big2ll(VALUE);
rb_big2ll        1626 numeric.c      	return rb_big2ll(val);


rb_big2long

rb_big2long        84 intern.h       long rb_big2long(VALUE);
rb_big2long        85 intern.h       #define rb_big2int(x) rb_big2long(x)
rb_big2long      1480 numeric.c      	return rb_big2long(val);


rb_big2str

rb_big2str        692 bignum.c           return rb_big2str(x, base);
rb_big2str        117 ext/bigdecimal/bigdecimal.c         bg = rb_big2str(v, 10);
rb_big2str         83 intern.h       VALUE rb_big2str(VALUE, int);
rb_big2str       1887 numeric.c      	return rb_big2str(rb_int2big(FIX2INT(x)), 2);
rb_big2str        590 sprintf.c      			tmp = rb_big2str(val, base);
rb_big2str        612 sprintf.c      			tmp1 = tmp = rb_big2str(val, base);


rb_big2ull

rb_big2ull         92 intern.h       unsigned LONG_LONG rb_big2ull(VALUE);
rb_big2ull       1647 numeric.c      	return rb_big2ull(val);


rb_big2ulong

rb_big2ulong     2557 ext/zlib/zlib.c 	gz->mtime = FIXNUM_P(val) ? FIX2INT(val) : rb_big2ulong(val);
rb_big2ulong       86 intern.h       unsigned long rb_big2ulong(VALUE);
rb_big2ulong       87 intern.h       #define rb_big2uint(x) rb_big2ulong(x)
rb_big2ulong     1492 numeric.c      	return rb_big2ulong(val);


rb_big2ulong_pack

rb_big2ulong_pack  333 pack.c         unsigned long rb_big2ulong_pack(VALUE x);
rb_big2ulong_pack  342 pack.c         	return rb_big2ulong_pack(x);


rb_big_2comp

rb_big_2comp       73 intern.h       void rb_big_2comp(VALUE);
rb_big_2comp      610 sprintf.c      			    rb_big_2comp(val);


rb_big_and

rb_big_and       1993 bignum.c           rb_define_method(rb_cBignum, "&", rb_big_and, 1);
rb_big_and        107 intern.h       VALUE rb_big_and(VALUE, VALUE);
rb_big_and       2416 numeric.c      	return rb_big_and(y, x);


rb_big_clone

rb_big_clone      637 bignum.c           t = rb_big_clone(x);
rb_big_clone      980 bignum.c           VALUE z = rb_big_clone(x);
rb_big_clone     1002 bignum.c           VALUE z = rb_big_clone(x);
rb_big_clone     1235 bignum.c       	z = rb_big_clone(x);
rb_big_clone     1263 bignum.c       	yy = rb_big_clone(y);
rb_big_clone     1318 bignum.c       	*divp = rb_big_clone(z);
rb_big_clone     1325 bignum.c       	*modp = rb_big_clone(z);
rb_big_clone     1591 bignum.c       	y = rb_big_clone(y);
rb_big_clone     1595 bignum.c       	x = rb_big_clone(x);
rb_big_clone     1647 bignum.c       	y = rb_big_clone(y);
rb_big_clone     1651 bignum.c       	x = rb_big_clone(x);
rb_big_clone     1705 bignum.c       	y = rb_big_clone(y);
rb_big_clone     1709 bignum.c       	x = rb_big_clone(x);
rb_big_clone     1807 bignum.c       	save_x = x = rb_big_clone(x);
rb_big_clone     1866 bignum.c       	x = rb_big_clone(x);
rb_big_clone     1932 bignum.c       	x = rb_big_clone(x);
rb_big_clone       72 intern.h       VALUE rb_big_clone(VALUE);
rb_big_clone      376 random.c           val = (struct RBignum *)rb_big_clone((VALUE)limit);
rb_big_clone      459 random.c                       limit = (struct RBignum *)rb_big_clone(vmax);
rb_big_clone      609 sprintf.c      			    val = rb_big_clone(val);


rb_big_cmp

rb_big_cmp       2001 bignum.c           rb_define_method(rb_cBignum, "<=>", rb_big_cmp, 1);
rb_big_cmp         98 intern.h       VALUE rb_big_cmp(VALUE, VALUE);
rb_big_cmp       2271 numeric.c      	return rb_big_cmp(rb_int2big(FIX2LONG(x)), y);
rb_big_cmp       2298 numeric.c      	return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) > 0 ? Qtrue : Qfalse;
rb_big_cmp       2325 numeric.c      	return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) >= 0 ? Qtrue : Qfalse;
rb_big_cmp       2352 numeric.c      	return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) < 0 ? Qtrue : Qfalse;
rb_big_cmp       2379 numeric.c      	return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) <= 0 ? Qtrue : Qfalse;


rb_big_div

rb_big_div       1985 bignum.c           rb_define_method(rb_cBignum, "/", rb_big_div, 1);
rb_big_div       1987 bignum.c           rb_define_method(rb_cBignum, "div", rb_big_div, 1);
rb_big_div        103 intern.h       VALUE rb_big_div(VALUE, VALUE);
rb_big_div       2074 numeric.c      	return rb_big_div(x, y);


rb_big_divmod

rb_big_divmod    1988 bignum.c           rb_define_method(rb_cBignum, "divmod", rb_big_divmod, 1);
rb_big_divmod     105 intern.h       VALUE rb_big_divmod(VALUE, VALUE);
rb_big_divmod    2169 numeric.c      	return rb_big_divmod(x, y);
rb_big_divmod     952 pack.c         			from = rb_big_divmod(from, big128);


rb_big_eq

rb_big_eq        2002 bignum.c           rb_define_method(rb_cBignum, "==", rb_big_eq, 1);
rb_big_eq          99 intern.h       VALUE rb_big_eq(VALUE, VALUE);
rb_big_eq        2242 numeric.c      	return rb_big_eq(y, x);


rb_big_lshift

rb_big_lshift    1798 bignum.c           if (shift < 0) return rb_big_lshift(x, INT2FIX(-shift));
rb_big_lshift    1997 bignum.c           rb_define_method(rb_cBignum, "<<", rb_big_lshift, 1);
rb_big_lshift     110 intern.h       VALUE rb_big_lshift(VALUE, VALUE);
rb_big_lshift    2480 numeric.c      	return rb_big_lshift(rb_int2big(val), y);


rb_big_minus

rb_big_minus     1983 bignum.c           rb_define_method(rb_cBignum, "-", rb_big_minus, 1);
rb_big_minus      101 intern.h       VALUE rb_big_minus(VALUE, VALUE);
rb_big_minus     1950 numeric.c      	    r = rb_big_minus(rb_int2big(a), rb_int2big(b));
rb_big_minus     1957 numeric.c      	return rb_big_minus(x, y);
rb_big_minus      462 random.c                   limit = (struct RBignum *)rb_big_minus((VALUE)limit, INT2FIX(1));


rb_big_modulo

rb_big_modulo    1986 bignum.c           rb_define_method(rb_cBignum, "%", rb_big_modulo, 1);
rb_big_modulo    1989 bignum.c           rb_define_method(rb_cBignum, "modulo", rb_big_modulo, 1);
rb_big_modulo     104 intern.h       VALUE rb_big_modulo(VALUE, VALUE);
rb_big_modulo    2137 numeric.c      	return rb_big_modulo(x, y);


rb_big_mul

rb_big_mul       1984 bignum.c           rb_define_method(rb_cBignum, "*", rb_big_mul, 1);
rb_big_mul        102 intern.h       VALUE rb_big_mul(VALUE, VALUE);
rb_big_mul       1993 numeric.c      	    r = rb_big_mul(rb_int2big(a), rb_int2big(b));
rb_big_mul       1999 numeric.c      	return rb_big_mul(y, x);
rb_big_mul       1954 pack.c         			    big = rb_big_mul(big, big128);


rb_big_mul0

rb_big_mul0      1211 bignum.c           return bignorm(rb_big_mul0(x, y));
rb_big_mul0      1555 bignum.c       		    x = rb_big_mul0(x, x);
rb_big_mul0      1557 bignum.c       		z = rb_big_mul0(z, x);


rb_big_norm

rb_big_norm        74 intern.h       VALUE rb_big_norm(VALUE);
rb_big_norm      1077 marshal.c      	    v = rb_big_norm((VALUE)big);
rb_big_norm      2534 numeric.c      	idx = rb_big_norm(idx);
rb_big_norm       303 random.c           return rb_big_norm((VALUE)big);
rb_big_norm       410 random.c           return rb_big_norm((VALUE)val);


rb_big_or

rb_big_or        1994 bignum.c           rb_define_method(rb_cBignum, "|", rb_big_or, 1);
rb_big_or         108 intern.h       VALUE rb_big_or(VALUE, VALUE);
rb_big_or        2435 numeric.c      	return rb_big_or(y, x);


rb_big_plus

rb_big_plus      1982 bignum.c           rb_define_method(rb_cBignum, "+", rb_big_plus, 1);
rb_big_plus       100 intern.h       VALUE rb_big_plus(VALUE, VALUE);
rb_big_plus      1914 numeric.c      	    r = rb_big_plus(rb_int2big(a), rb_int2big(b));
rb_big_plus      1920 numeric.c      	return rb_big_plus(y, x);
rb_big_plus      1955 pack.c         			    big = rb_big_plus(big, rb_uint2big(*s & 0x7f));


rb_big_pow

rb_big_pow       1992 bignum.c           rb_define_method(rb_cBignum, "**", rb_big_pow, 1);
rb_big_pow        106 intern.h       VALUE rb_big_pow(VALUE, VALUE);
rb_big_pow       2208 numeric.c      	    return rb_big_pow(rb_int2big(a), y);
rb_big_pow       2215 numeric.c      	return rb_big_pow(x, y);


rb_big_rshift

rb_big_rshift    1742 bignum.c       static VALUE rb_big_rshift(VALUE,VALUE);
rb_big_rshift    1762 bignum.c           if (shift < 0) return rb_big_rshift(x, INT2FIX(-shift));
rb_big_rshift    1998 bignum.c           rb_define_method(rb_cBignum, ">>", rb_big_rshift, 1);


rb_big_xor

rb_big_xor       1995 bignum.c           rb_define_method(rb_cBignum, "^", rb_big_xor, 1);
rb_big_xor        109 intern.h       VALUE rb_big_xor(VALUE, VALUE);
rb_big_xor       2454 numeric.c      	return rb_big_xor(y, x);


rb_block_given_p

rb_block_given_p  321 array.c        	if (rb_block_given_p()) {
rb_block_given_p  347 array.c            if (rb_block_given_p()) {
rb_block_given_p  855 array.c            block_given = rb_block_given_p();
rb_block_given_p 1519 array.c        	       rb_block_given_p()?sort_1:sort_2, &data);
rb_block_given_p 1746 array.c        	if (rb_block_given_p()) {
rb_block_given_p 1956 array.c            if (rb_block_given_p()) {
rb_block_given_p 2106 array.c            if (rb_block_given_p()) {
rb_block_given_p 2721 array.c            if (rb_block_given_p()) {
rb_block_given_p  889 class.c        	if (rb_block_given_p()) {
rb_block_given_p  431 dir.c              if (rb_block_given_p()) {
rb_block_given_p  773 dir.c          	if (!rb_block_given_p() || rb_thread_current() != chdir_thread)
rb_block_given_p  777 dir.c              if (rb_block_given_p()) {
rb_block_given_p 1619 dir.c              if (rb_block_given_p()) {
rb_block_given_p   71 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? grep_iter_i : grep_i, (VALUE)arg);
rb_block_given_p  114 enum.c         	if (rb_block_given_p()) {
rb_block_given_p  584 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? all_iter_i : all_i, (VALUE)&result);
rb_block_given_p  631 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? any_iter_i : any_i, (VALUE)&result);
rb_block_given_p  684 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? one_iter_i : one_i, (VALUE)&result);
rb_block_given_p  729 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? none_iter_i : none_i, (VALUE)&result);
rb_block_given_p  787 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? min_ii : min_i, (VALUE)&result);
rb_block_given_p  845 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? max_ii : max_i, (VALUE)&result);
rb_block_given_p 1014 enum.c             if (rb_block_given_p()) {
rb_block_given_p 1056 enum.c             result = rb_block_given_p() ? Qnil : rb_ary_new();
rb_block_given_p  270 enumerator.c       if (rb_block_given_p()) {
rb_block_given_p 2253 eval.c         	if (rb_block_given_p()) {
rb_block_given_p 3539 eval.c         	if (rb_block_given_p()) {
rb_block_given_p 4526 eval.c             return rb_block_given_p();
rb_block_given_p 4643 eval.c             if (!rb_block_given_p()) {
rb_block_given_p 5749 eval.c         		if (rb_block_given_p()) JUMP_TAG(state);
rb_block_given_p 5839 eval.c             PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
rb_block_given_p 6373 eval.c             if (rb_block_given_p()) {
rb_block_given_p 7274 eval.c             PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
rb_block_given_p 7548 eval.c             if (!rb_block_given_p()) {
rb_block_given_p 8079 eval.c             if (!rb_block_given_p() && !rb_f_block_given_p()) {
rb_block_given_p 8082 eval.c             if (proc && !rb_block_given_p()) {
rb_block_given_p 8218 eval.c             if (rb_block_given_p() && ruby_frame->callee) {
rb_block_given_p 8899 eval.c             PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
rb_block_given_p 11954 eval.c             if (!rb_block_given_p()) {
rb_block_given_p 11983 eval.c             if (!rb_block_given_p()) {
rb_block_given_p 1308 ext/curses/curses.c   if( rb_block_given_p() ){
rb_block_given_p  165 ext/dbm/dbm.c      if (rb_block_given_p()) {
rb_block_given_p  187 ext/dbm/dbm.c  	if (ifnone == Qnil && rb_block_given_p())
rb_block_given_p  211 ext/dbm/dbm.c      if (argc == 1 && !rb_block_given_p() && NIL_P(valstr))
rb_block_given_p  307 ext/dbm/dbm.c  	if (rb_block_given_p()) return rb_yield(keystr);
rb_block_given_p   89 ext/dl/handle.c   if( rb_block_given_p() ){
rb_block_given_p  217 ext/etc/etc.c      if (rb_block_given_p()) {
rb_block_given_p  422 ext/etc/etc.c      if (rb_block_given_p()) {
rb_block_given_p  175 ext/gdbm/gdbm.c     if (rb_block_given_p()) {
rb_block_given_p  282 ext/gdbm/gdbm.c 	if (ifnone == Qnil && rb_block_given_p())
rb_block_given_p  306 ext/gdbm/gdbm.c     if (argc == 1 && !rb_block_given_p() && NIL_P(valstr))
rb_block_given_p  304 ext/iconv/iconv.c     if (!rb_block_given_p()) rb_exc_raise(error);
rb_block_given_p  585 ext/iconv/iconv.c     if (rb_block_given_p()) {
rb_block_given_p  720 ext/iconv/iconv.c     args[1] = rb_block_given_p() ? 0 : rb_ary_new();
rb_block_given_p  161 ext/openssl/ossl.c     if (pwd || !rb_block_given_p())
rb_block_given_p  118 ext/openssl/ossl_engine.c     if(rb_block_given_p()) rb_yield(obj);
rb_block_given_p   90 ext/openssl/ossl_pkey_dh.c 	    rb_block_given_p() ? ossl_generate_cb : NULL,
rb_block_given_p   90 ext/openssl/ossl_pkey_dsa.c 	    rb_block_given_p() ? ossl_generate_cb : NULL,
rb_block_given_p   83 ext/openssl/ossl_pkey_rsa.c 	    rb_block_given_p() ? ossl_generate_cb : NULL,
rb_block_given_p  297 ext/openssl/ossl_x509store.c     proc = rb_block_given_p() ?  rb_block_proc() :
rb_block_given_p  444 ext/pty/pty.c      if (rb_block_given_p()) {
rb_block_given_p  143 ext/sdbm/init.c     if (rb_block_given_p()) {
rb_block_given_p  165 ext/sdbm/init.c 	if (ifnone == Qnil && rb_block_given_p())
rb_block_given_p  189 ext/sdbm/init.c     if (argc == 1 && !rb_block_given_p() && NIL_P(valstr))
rb_block_given_p  285 ext/sdbm/init.c 	if (rb_block_given_p()) return rb_yield(keystr);
rb_block_given_p  202 ext/stringio/stringio.c     if (!rb_block_given_p()) return obj;
rb_block_given_p   94 ext/syslog/syslog.c     if (rb_block_given_p()) {
rb_block_given_p   60 ext/tk/tkutil/tkutil.c     if (rb_block_given_p()) rb_obj_instance_eval(0, 0, obj);
rb_block_given_p 2403 ext/zlib/zlib.c     if (rb_block_given_p()) {
rb_block_given_p  269 hash.c             if (rb_block_given_p()) {
rb_block_given_p  437 hash.c             block_given = rb_block_given_p();
rb_block_given_p  612 hash.c             if (rb_block_given_p()) {
rb_block_given_p 1465 hash.c             if (rb_block_given_p()) {
rb_block_given_p 1567 hash.c             if (NIL_P(val) && rb_block_given_p()) rb_yield(name);
rb_block_given_p 1609 hash.c             block_given = rb_block_given_p();
rb_block_given_p 2243 hash.c         	if (rb_block_given_p()) {
rb_block_given_p  146 intern.h       	if (!rb_block_given_p())					\
rb_block_given_p 3041 io.c           	if (rb_block_given_p()) {
rb_block_given_p 3050 io.c               if (rb_block_given_p()) {
rb_block_given_p 3103 io.c               if (rb_block_given_p()) {
rb_block_given_p 3237 io.c           	    if (rb_block_given_p()) {
rb_block_given_p 4026 io.c               if (rb_block_given_p()) {
rb_block_given_p 1364 object.c           if (rb_block_given_p()) {
rb_block_given_p 1423 process.c      	if (rb_block_given_p()) {
rb_block_given_p 3351 process.c      	if (rb_block_given_p()) {
rb_block_given_p 3359 process.c      	if (rb_block_given_p()) {
rb_block_given_p 3393 process.c          if (rb_block_given_p()) {
rb_block_given_p 3460 process.c      	if (rb_block_given_p()) {
rb_block_given_p 3468 process.c      	if (rb_block_given_p()) {
rb_block_given_p 3501 process.c          if (rb_block_given_p()) {
rb_block_given_p  454 range.c            if (rb_block_given_p()) {
rb_block_given_p  485 range.c            if (rb_block_given_p() || (EXCL(range) && !ip)) {
rb_block_given_p  575 ruby.h         int rb_block_given_p(void);
rb_block_given_p 1823 string.c           if (argc == 1 && rb_block_given_p()) {
rb_block_given_p 3846 string.c           if (!rb_block_given_p()) {
rb_block_given_p  295 struct.c           if (rb_block_given_p()) {


rb_block_pass

rb_block_pass    8624 eval.c             return rb_block_pass((VALUE (*)(VALUE))call_block,
rb_block_pass    11849 eval.c         	    th->result = rb_block_pass(rb_thread_yield_0, arg, proc);


rb_block_proc

rb_block_proc     890 class.c        	    *var = rb_block_proc();
rb_block_proc     271 enumerator.c   	ptr->proc = rb_block_proc();
rb_block_proc    3006 eval.c         		    result = rb_block_proc();
rb_block_proc    3540 eval.c         	    result = rb_block_proc();
rb_block_proc    4768 eval.c         		    blk = rb_block_proc();
rb_block_proc    7518 eval.c             rb_set_end_proc(call_end_proc, rb_block_proc());
rb_block_proc    7551 eval.c             proc = rb_block_proc();
rb_block_proc    8221 eval.c         	bvar = rb_block_proc();
rb_block_proc    9188 eval.c             proc = rb_block_proc();
rb_block_proc    9409 eval.c             rb_define_global_function("proc", rb_block_proc, 0);
rb_block_proc    11738 eval.c         	new_thread.proc = rb_block_proc();
rb_block_proc     297 ext/openssl/ossl_x509store.c     proc = rb_block_given_p() ?  rb_block_proc() :
rb_block_proc    1996 ext/tk/tcltklib.c         proc = rb_block_proc();
rb_block_proc     130 ext/tk/tkutil/tkutil.c         cmd = rb_block_proc();
rb_block_proc     135 ext/tk/tkutil/tkutil.c         cmd = rb_block_proc();
rb_block_proc    6801 ext/win32ole/win32ole.c     data = rb_ary_new3(4, rb_block_proc(), event, args, is_ary_arg);
rb_block_proc    1726 gc.c           	block = rb_block_proc();
rb_block_proc     273 hash.c         	RHASH(hash)->ifnone = rb_block_proc();
rb_block_proc     239 intern.h       VALUE rb_block_proc(void);
rb_block_proc     766 signal.c       	arg.cmd = rb_block_proc();
rb_block_proc     525 variable.c     	cmd = rb_block_proc();


rb_bug

rb_bug            778 class.c        	rb_bug("unknown immediate %ld", obj);
rb_bug           1184 dir.c          	    rb_bug("continuous RECURSIVEs");
rb_bug            206 error.c        	rb_bug("undef leaked to the Ruby space");
rb_bug            234 error.c        	rb_bug("unknown type 0x%x (0x%x given)", t, TYPE(x));
rb_bug           1053 error.c        	rb_bug("rb_sys_fail(%s) - errno == 0", mesg ? mesg : "");
rb_bug           1410 eval.c         	rb_bug("Unknown longjmp status %d", ex);
rb_bug           2653 eval.c         	rb_bug("class path missing");
rb_bug           2693 eval.c                 rb_bug("terminated node (%p)", node);
rb_bug           2696 eval.c                 rb_bug("not a node 0x%02lx (%p)", BUILTIN_TYPE(node), node);
rb_bug           2699 eval.c                 rb_bug("unknown node type %d (%p)", nd_type(node), node);
rb_bug           3185 eval.c         	    if (!flip) rb_bug("unexpected local variable");
rb_bug           3207 eval.c         	    if (!flip) rb_bug("unexpected local variable");
rb_bug           3458 eval.c         	    rb_bug("unexpected local variable assignment");
rb_bug           3511 eval.c         	    rb_bug("unexpected local variable");
rb_bug           3538 eval.c         	    rb_bug("unexpected block argument");
rb_bug           3594 eval.c         	    rb_bug("unexpected back-ref");
rb_bug           3609 eval.c         		    rb_bug("odd number list for Hash");
rb_bug           5027 eval.c         	    rb_bug("unexpected local variable assignment");
rb_bug           5097 eval.c         	rb_bug("bug in variable assignment");
rb_bug           5510 eval.c         	rb_bug("no argument-node");
rb_bug           5624 eval.c         		rb_bug("bad argc (%d) specified for `%s(%s)'",
rb_bug           7210 eval.c         		rb_bug("undefined method `%s'; can't happen", rb_id2name(id));
rb_bug           10317 eval.c             if (!th->stk_ptr) rb_bug("unsaved context");
rb_bug           10484 eval.c         	rb_bug("cross-thread violation on rb_thread_schedule()");
rb_bug            522 ext/bigdecimal/bigdecimal.c     rb_bug("Undefined operation in BigDecimalCmp()");
rb_bug           2801 ext/bigdecimal/bigdecimal.c     rb_bug("ERROR(VpDivd): space for remainder too small.");
rb_bug            131 ext/dl/cptr.c      rb_bug("rb_dlptr_initialize");
rb_bug            165 ext/dl/cptr.c      rb_bug("rb_dlptr_s_malloc");
rb_bug            261 ext/dl/cptr.c      rb_bug("rb_dlptr_to_s");
rb_bug            284 ext/dl/cptr.c      rb_bug("rb_dlptr_to_str");
rb_bug            363 ext/dl/cptr.c  	rb_bug("rb_dlptr_aref()");
rb_bug            398 ext/dl/cptr.c  	rb_bug("rb_dlptr_aset()");
rb_bug             67 ext/dl/handle.c     rb_bug("rb_dlhandle_new");
rb_bug            628 ext/socket/socket.c 	rb_bug("s_recvfrom called with bad value");
rb_bug           1257 ext/tk/tcltklib.c         rb_bug("cross-thread violation on eventloop_sleep()");
rb_bug           1265 ext/tk/tcltklib.c         rb_bug("cross-thread violation on eventloop_sleep()");
rb_bug           2381 ext/tk/tcltklib.c         rb_bug("cross-thread violation on tcl_protect()");
rb_bug           2789 ext/tk/tcltklib.c         rb_bug("cross-thread violation on ip_ruby_eval()");
rb_bug           2808 ext/tk/tcltklib.c                 rb_bug("ip_rbUpdateObjCmd: bad option index to UpdateOptions");
rb_bug           2936 ext/tk/tcltklib.c         rb_bug("cross-thread violation on ip_ruby_eval()");
rb_bug           2968 ext/tk/tcltklib.c                 rb_bug("ip_rb_threadUpdateObjCmd: bad option index to UpdateOptions");
rb_bug           3113 ext/tk/tcltklib.c         rb_bug("cross-thread violation on ip_ruby_eval()");
rb_bug           5747 ext/tk/tcltklib.c             rb_bug("cross-thread violation on eval_queue_handler()");
rb_bug            737 gc.c           	rb_bug("rb_gc_mark() called for broken object");
rb_bug            963 gc.c           	rb_bug("rb_gc_mark(): unknown data type 0x%lx(%p) %s",
rb_bug           1103 gc.c           	rb_bug("obj_free() called for broken object");
rb_bug           1214 gc.c           	rb_bug("gc_sweep(): unknown data type 0x%lx(%p)",
rb_bug           1274 gc.c           	rb_bug("cross-thread violation on rb_gc()");
rb_bug           7900 parse.y        	rb_bug("unknown nodetype(%d) for arg_prepend", nd_type(node2));
rb_bug           9011 parse.y        	    rb_bug("cannot convert ID to string: %ld", (unsigned long)id);
rb_bug            591 re.c           	    rb_bug("unknown kcode - should not happen");
rb_bug           1841 re.c               rb_bug("wrong reg_kcode value (0x%x)", reg_kcode);
rb_bug            558 ruby.h         PRINTF_ARGS(NORETURN(void rb_bug(const char*, ...)), 1, 2);
rb_bug            449 signal.c       	rb_bug("trap_handler: Bad signal %d", sig);
rb_bug            488 signal.c           rb_bug("Bus Error");
rb_bug            503 signal.c           rb_bug("Segmentation fault");
rb_bug             40 struct.c       	rb_bug("non-initialized struct");
rb_bug            733 struct.c       	rb_bug("inconsistent struct"); /* should never happen */
rb_bug            781 struct.c       	rb_bug("inconsistent struct"); /* should never happen */
rb_bug            155 variable.c     	    rb_bug("class path is not set properly");


rb_call

rb_call          1038 eval.c         static VALUE rb_call(VALUE,VALUE,ID,int,const VALUE*,calling_scope_t);
rb_call          3017 eval.c         		    result = rb_call(CLASS_OF(recv),recv,each,0,0,CALLING_NORMAL);
rb_call          3260 eval.c         	    rb_call(CLASS_OF(recv),recv,node->nd_mid,argc,argv,scope);
rb_call          3278 eval.c         	    result = rb_call(CLASS_OF(recv),recv,node->nd_mid,argc,argv,CALLING_NORMAL);
rb_call          3293 eval.c         	    result = rb_call(CLASS_OF(self),self,node->nd_mid,argc,argv,CALLING_FCALL);
rb_call          3299 eval.c         	result = rb_call(CLASS_OF(self),self,node->nd_mid,0,0,CALLING_VCALL);
rb_call          5080 eval.c         		rb_call(CLASS_OF(recv), recv, lhs->nd_mid, 1, &val, scope);
rb_call          5090 eval.c         		rb_call(CLASS_OF(recv), recv, lhs->nd_mid,
rb_call          5828 eval.c             return rb_call(CLASS_OF(recv), recv, mid, argc, argv, CALLING_FCALL);
rb_call          5840 eval.c             vid = rb_call(CLASS_OF(recv), recv, rb_to_id(vid), argc, argv, scope);
rb_call          5916 eval.c             return rb_call(CLASS_OF(recv), recv, mid, n, argv, CALLING_FCALL);
rb_call          5922 eval.c             return rb_call(CLASS_OF(recv), recv, mid, argc, argv, CALLING_FCALL);
rb_call          5928 eval.c             return rb_call(CLASS_OF(recv), recv, mid, argc, argv, CALLING_NORMAL);
rb_call          5948 eval.c             result = rb_call(RCLASS(klass)->super, self, ruby_frame->this_func, argc, argv, CALLING_SUPER);


rb_call0

rb_call0         5816 eval.c             return rb_call0(klass, recv, mid, id, argc, argv, body, noex);
rb_call0         8900 eval.c             result = rb_call0(data->klass,data->recv,data->id,data->oid,argc,argv,data->body,safe);


rb_call_inits

rb_call_inits    1245 eval.c         void rb_call_inits(void);
rb_call_inits    1303 eval.c         	rb_call_inits();


rb_call_super

rb_call_super     510 error.c            rb_call_super(argc, argv);
rb_call_super     578 error.c            rb_call_super(argc, argv);
rb_call_super     864 error.c            rb_call_super(1, &mesg);
rb_call_super    3341 eval.c         	    result = rb_call_super(argc, argv);
rb_call_super    5663 eval.c         	result = rb_call_super(argc, argv);
rb_call_super     273 ext/iconv/iconv.c     rb_call_super(1, &mesg);
rb_call_super     525 ext/openssl/ossl_ssl.c     rb_call_super(0, 0);
rb_call_super     224 ext/stringio/stringio.c     rb_call_super(0, 0);
rb_call_super    2060 ext/win32ole/win32ole.c     rb_call_super(0, 0);
rb_call_super     455 range.c        	return rb_call_super(0, 0);
rb_call_super     486 range.c        	return rb_call_super(0, 0);
rb_call_super     640 range.c            return rb_call_super(1, &val);
rb_call_super     545 ruby.h         VALUE rb_call_super(int, const VALUE*);


rb_check_argv

rb_check_argv     413 intern.h       VALUE rb_check_argv(int, VALUE*);
rb_check_argv    2844 io.c               prog = rb_check_argv(argc, argv);
rb_check_argv    1225 process.c          prog = rb_check_argv(argc, argv);
rb_check_argv    1538 process.c          prog = rb_check_argv(argc, argv);


rb_check_array_type

rb_check_array_type  328 array.c        	val = rb_check_array_type(size);
rb_check_array_type 2757 array.c        	tmp = rb_check_array_type(rb_ary_elt(ary, i));
rb_check_array_type 2794 array.c        	tmp = rb_check_array_type(ary2);
rb_check_array_type 1610 dir.c              ary = rb_check_array_type(str);
rb_check_array_type 1122 eval.c             return rb_check_array_type(info);
rb_check_array_type 2574 eval.c             tmp = rb_check_array_type(v);
rb_check_array_type 2582 eval.c         	top = rb_check_array_type(RARRAY(tmp)->ptr[0]);
rb_check_array_type 2600 eval.c             tmp = rb_check_array_type(v);
rb_check_array_type 2605 eval.c         	top = rb_check_array_type(RARRAY(tmp)->ptr[0]);
rb_check_array_type 2620 eval.c             tmp = rb_check_array_type(v);
rb_check_array_type  123 ext/openssl/ossl_x509name.c 	VALUE tmp = rb_check_array_type(arg);
rb_check_array_type 2934 ext/socket/socket.c     tmp = rb_check_array_type(sa);
rb_check_array_type  565 ext/syck/rubyext.c                     else if ( !NIL_P(tmp = rb_check_array_type(v)) )
rb_check_array_type 1545 ext/syck/rubyext.c     val = rb_check_array_type( val );
rb_check_array_type   34 intern.h       VALUE rb_check_array_type(VALUE);
rb_check_array_type 3027 io.c               tmp = rb_check_array_type(pname);
rb_check_array_type 3690 io.c           	    line = rb_check_array_type(argv[i]);
rb_check_array_type 2252 object.c           VALUE tmp = rb_check_array_type(val);
rb_check_array_type 1175 process.c          tmp = rb_check_array_type(argv[0]);


rb_check_convert_type

rb_check_convert_type  270 array.c            return rb_check_convert_type(ary, T_ARRAY, "Array", "to_ary");
rb_check_convert_type 8539 eval.c         	b = rb_check_convert_type(proc, T_DATA, "Proc", "to_proc");
rb_check_convert_type  322 ext/syck/rubyext.c     if ( !NIL_P(tmp = rb_check_convert_type(entry, T_HASH, "Hash", "to_hash")) )
rb_check_convert_type  558 ext/syck/rubyext.c                     if ( !NIL_P(tmp = rb_check_convert_type(v, T_HASH, "Hash", "to_hash")) )
rb_check_convert_type  568 ext/syck/rubyext.c                         VALUE tmph = rb_check_convert_type(end, T_HASH, "Hash", "to_hash");
rb_check_convert_type 1629 ext/syck/rubyext.c         VALUE hsh = rb_check_convert_type(val, T_HASH, "Hash", "to_hash");
rb_check_convert_type 1664 ext/syck/rubyext.c         VALUE hsh = rb_check_convert_type(val, T_HASH, "Hash", "to_hash");
rb_check_convert_type  628 file.c             tmp = rb_check_convert_type(file, T_FILE, "IO", "to_io");
rb_check_convert_type  646 file.c             tmp = rb_check_convert_type(*file, T_FILE, "IO", "to_io");
rb_check_convert_type  380 intern.h       VALUE rb_check_convert_type(VALUE,int,const char*,const char*);
rb_check_convert_type  242 io.c               return rb_check_convert_type(io, T_FILE, "IO", "to_io");
rb_check_convert_type 3993 io.c           	VALUE fd = rb_check_convert_type(argv[0], T_FIXNUM, "Fixnum", "to_int");
rb_check_convert_type 1900 re.c                   v = rb_check_convert_type(argv[0], T_REGEXP, "Regexp", "to_regexp");
rb_check_convert_type 1918 re.c                       v = rb_check_convert_type(argv[i], T_REGEXP, "Regexp", "to_regexp");
rb_check_convert_type  519 string.c           str = rb_check_convert_type(str, T_STRING, "String", "to_str");


rb_check_frozen

rb_check_frozen   127 ext/digest/digest.c     rb_check_frozen(copy);
rb_check_frozen   511 ext/openssl/ossl_bn.c     rb_check_frozen(self);
rb_check_frozen   109 ext/openssl/ossl_cipher.c     rb_check_frozen(self);
rb_check_frozen   109 ext/openssl/ossl_digest.c     rb_check_frozen(self);
rb_check_frozen    78 ext/openssl/ossl_hmac.c     rb_check_frozen(self);
rb_check_frozen   318 ext/openssl/ossl_pkcs7.c     rb_check_frozen(self);
rb_check_frozen   457 ext/openssl/ossl_ssl.c     rb_check_frozen(self);
rb_check_frozen   157 ext/openssl/ossl_x509cert.c     rb_check_frozen(self);
rb_check_frozen   118 ext/openssl/ossl_x509crl.c     rb_check_frozen(self);
rb_check_frozen   126 ext/openssl/ossl_x509req.c     rb_check_frozen(self);
rb_check_frozen  3410 file.c             rb_check_frozen(copy);
rb_check_frozen   162 intern.h       void rb_check_frozen(VALUE);
rb_check_frozen   210 io.c               rb_check_frozen(io);
rb_check_frozen   269 object.c           rb_check_frozen(obj);
rb_check_frozen  1648 re.c               rb_check_frozen(self);
rb_check_frozen  1969 re.c               rb_check_frozen(copy);
rb_check_frozen   507 struct.c           rb_check_frozen(copy);
rb_check_frozen    58 time.c             rb_check_frozen(time);


rb_check_inheritable

rb_check_inheritable   52 class.c            rb_check_inheritable(super);
rb_check_inheritable 3838 eval.c         	       rb_check_inheritable(super);
rb_check_inheritable  119 intern.h       void rb_check_inheritable(VALUE);
rb_check_inheritable 1392 object.c       	rb_check_inheritable(super);


rb_check_safe_obj

rb_check_safe_obj  280 eval.c             rb_check_safe_obj(x);
rb_check_safe_obj 1999 ext/socket/socket.c 	rb_check_safe_obj(domain);
rb_check_safe_obj 2050 ext/socket/socket.c 	rb_check_safe_obj(type);
rb_check_safe_obj  104 file.c             rb_check_safe_obj(obj);
rb_check_safe_obj  118 file.c         	rb_check_safe_obj(tmp);
rb_check_safe_obj  247 ruby.h         void rb_check_safe_obj(VALUE);
rb_check_safe_obj  251 ruby.h             rb_check_safe_obj(v);\


rb_check_safe_str

rb_check_safe_str  248 ruby.h         void rb_check_safe_str(VALUE);
rb_check_safe_str  254 ruby.h         #define Check_SafeStr(v) rb_check_safe_str((VALUE)(v))


rb_check_string_type

rb_check_string_type 1268 array.c        	tmp = rb_check_string_type(RARRAY(ary)->ptr[i]);
rb_check_string_type 2231 array.c            tmp = rb_check_string_type(times);
rb_check_string_type 1996 ext/socket/socket.c     tmp = rb_check_string_type(domain);
rb_check_string_type 2047 ext/socket/socket.c     tmp = rb_check_string_type(type);
rb_check_string_type 2921 ext/socket/socket.c     tmp = rb_check_string_type(sa);
rb_check_string_type  173 ext/syck/rubyext.c     if (!NIL_P(tmp = rb_check_string_type(port))) {
rb_check_string_type 1199 ext/syck/rubyext.c     VALUE tmp = rb_check_string_type(val);
rb_check_string_type 1219 ext/syck/rubyext.c     VALUE tmp = rb_check_string_type(val);
rb_check_string_type 1985 ext/syck/rubyext.c     else if ( !NIL_P(tmp = rb_check_string_type(options)) )
rb_check_string_type  105 file.c             tmp = rb_check_string_type(obj);
rb_check_string_type  487 intern.h       VALUE rb_check_string_type(VALUE);
rb_check_string_type 3243 io.c           	    VALUE tmp = rb_check_string_type(argv[0]);
rb_check_string_type 4617 io.c           	VALUE tmp = rb_check_string_type(arg);
rb_check_string_type 4761 io.c           	VALUE v = rb_check_string_type(*argv);
rb_check_string_type 1521 object.c       	tmp = rb_check_string_type(name);
rb_check_string_type 2646 process.c      	    VALUE tmp = rb_check_string_type(g);
rb_check_string_type  309 range.c        	VALUE tmp = rb_check_string_type(b);
rb_check_string_type 1527 re.c           	str = rb_check_string_type(str);
rb_check_string_type  264 signal.c       	    str = rb_check_string_type(argv[0]);
rb_check_string_type  574 signal.c       	command = rb_check_string_type(arg->cmd);
rb_check_string_type 1047 string.c       	  tmp = rb_check_string_type(sub);
rb_check_string_type 1789 string.c       	val = rb_check_string_type(pat);
rb_check_string_type  286 struct.c       	VALUE tmp = rb_check_string_type(name);
rb_check_string_type  324 time.c         	VALUE s = rb_check_string_type(v[1]);


rb_check_to_integer

rb_check_to_integer  381 intern.h       VALUE rb_check_to_integer(VALUE, const char *);
rb_check_to_integer  515 range.c        	b = rb_check_to_integer(range, "begin");
rb_check_to_integer  517 range.c        	e = rb_check_to_integer(range, "end");
rb_check_to_integer  628 range.c        	!NIL_P(rb_check_to_integer(beg, "to_int")) ||
rb_check_to_integer  629 range.c        	!NIL_P(rb_check_to_integer(end, "to_int"))) {


rb_check_type

rb_check_type     958 ext/tk/tkutil/tkutil.c     rb_check_type(value, T_STRING);
rb_check_type    1018 ext/tk/tkutil/tkutil.c     rb_check_type(value, T_STRING);
rb_check_type    1056 ext/tk/tkutil/tkutil.c     rb_check_type(value, T_STRING);
rb_check_type    1068 ext/tk/tkutil/tkutil.c     rb_check_type(value, T_STRING);
rb_check_type     235 ruby.h         void rb_check_type(VALUE,int);
rb_check_type     236 ruby.h         #define Check_Type(v,t) rb_check_type((VALUE)(v),t)


rb_class2name

rb_class2name     241 class.c        		rb_class2name(outer), name);
rb_class2name     308 class.c        		 rb_class2name(outer), rb_obj_classname(module));
rb_class2name     294 eval.c         		  rb_class2name(klass));
rb_class2name     398 eval.c         		rb_class2name(rb_iv_get(klass, "__attached__")));
rb_class2name     534 eval.c         		      rb_id2name(mid), rb_class2name(klass));
rb_class2name    1943 eval.c         		      rb_id2name(id),s0,rb_class2name(c));
rb_class2name    5409 eval.c         	rb_raise(rb_eTypeError, "allocator undefined for %s", rb_class2name(obj));
rb_class2name    5625 eval.c         		       len, rb_class2name(klass), rb_id2name(id));
rb_class2name    9017 eval.c         		     rb_class2name(data->rklass));
rb_class2name    9166 eval.c         	rb_str_buf_cat2(str, rb_class2name(data->rklass));
rb_class2name    9169 eval.c         	    rb_str_buf_cat2(str, rb_class2name(data->klass));
rb_class2name    9326 eval.c         			 rb_class2name(rklass));
rb_class2name    11924 eval.c         		 rb_class2name(klass));
rb_class2name     298 ext/dl/cptr.c  	   rb_class2name(CLASS_OF(self)), data, data->ptr, data->size, data->free);
rb_class2name     225 ext/iconv/iconv.c 	rb_raise(rb_eArgError, "Iconv expected (%s)", rb_class2name(CLASS_OF(obj)));
rb_class2name     998 ext/iconv/iconv.c     char *cname = rb_class2name(CLASS_OF(self));
rb_class2name      86 ext/openssl/ossl.h                rb_obj_classname(obj), rb_class2name(klass));\
rb_class2name      93 ext/openssl/ossl.h                rb_obj_classname(obj), rb_class2name(klass));\
rb_class2name     578 ext/openssl/ossl_asn1.c 	       rb_class2name(CLASS_OF(obj)));
rb_class2name     150 ext/openssl/ossl_cipher.c 	    char *cname  = rb_class2name(rb_obj_class(self));
rb_class2name     421 ext/openssl/ossl_config.c     char *cname = rb_class2name(rb_obj_class(self));
rb_class2name     329 ext/openssl/ossl_engine.c     char *cname = rb_class2name(rb_obj_class(self));
rb_class2name     600 ext/openssl/ossl_x509cert.c     char *cname = rb_class2name(rb_obj_class(self));
rb_class2name     400 ext/racc/cparse/cparse.c                  rb_class2name(CLASS_OF(block_args)));
rb_class2name      80 ext/stringio/stringio.c 		 rb_class2name(CLASS_OF(self)));
rb_class2name    1120 ext/strscan/strscan.c                        rb_class2name(CLASS_OF(self)));
rb_class2name    1125 ext/strscan/strscan.c                        rb_class2name(CLASS_OF(self)));
rb_class2name    1131 ext/strscan/strscan.c                        rb_class2name(CLASS_OF(self)),
rb_class2name    1139 ext/strscan/strscan.c                    rb_class2name(CLASS_OF(self)),
rb_class2name     156 ext/syslog/syslog.c       rb_raise(rb_eTypeError, "type mismatch: %s given", rb_class2name(CLASS_OF(pri)));
rb_class2name     171 ext/syslog/syslog.c 	  rb_class2name(self),
rb_class2name     178 ext/syslog/syslog.c 	  "<#%s: opened=false>", rb_class2name(self));
rb_class2name    4027 io.c           	char *cname = rb_class2name(klass);
rb_class2name     353 marshal.c      	path = rb_class2name(RBASIC(klass)->klass);
rb_class2name    1149 marshal.c      			     rb_class2name(klass),
rb_class2name    1165 marshal.c      			 rb_class2name(klass));
rb_class2name    1191 marshal.c      			 rb_class2name(klass));
rb_class2name    1233 marshal.c                              rb_class2name(klass));
rb_class2name      89 prec.c                     rb_obj_classname(x), rb_class2name(module));
rb_class2name     278 process.c          str = rb_sprintf("#<%s: pid=%ld", rb_class2name(CLASS_OF(st)), NUM2LONG(pid));
rb_class2name     533 ruby.h         char *rb_class2name(VALUE);
rb_class2name     434 struct.c           char *cname = rb_class2name(rb_obj_class(s));
rb_class2name     196 variable.c     		s = rb_class2name(RBASIC(klass)->klass);
rb_class2name     282 variable.c         return rb_class2name(CLASS_OF(obj));
rb_class2name    1102 variable.c     		      rb_class2name(klass),
rb_class2name    1293 variable.c     			rb_id2name(id), rb_class2name(klass), rb_id2name(id));
rb_class2name    1358 variable.c     		 rb_class2name(mod), rb_id2name(id));
rb_class2name    1361 variable.c     		  rb_class2name(mod), rb_id2name(id));
rb_class2name    1555 variable.c     		  rb_id2name(id), rb_class2name(klass));
rb_class2name    1676 variable.c     		 rb_id2name(id), rb_class2name(mod));
rb_class2name    1679 variable.c     		  rb_id2name(id), rb_class2name(mod));


rb_class_boot

rb_class_boot      56 class.c            return rb_class_boot(super);
rb_class_boot     159 class.c        	VALUE klass = rb_class_boot(super);
rb_class_boot     112 intern.h       VALUE rb_class_boot(VALUE);
rb_class_boot    1335 object.c           return rb_class_boot(0);
rb_class_boot    2280 object.c           VALUE obj = rb_class_boot(super);


rb_class_inherited

rb_class_inherited  217 class.c            rb_class_inherited(super, klass);
rb_class_inherited  246 class.c            rb_class_inherited(super, klass);
rb_class_inherited 3874 eval.c         		rb_class_inherited(super, klass);
rb_class_inherited  120 intern.h       VALUE rb_class_inherited(VALUE, VALUE);
rb_class_inherited 1396 object.c           rb_class_inherited(super, klass);
rb_class_inherited  179 struct.c       	rb_class_inherited(klass, nstr);


rb_class_inherited_p

rb_class_inherited_p 9324 eval.c         	    if (!RTEST(rb_class_inherited_p(mod, rklass))) {
rb_class_inherited_p  378 intern.h       VALUE rb_class_inherited_p(VALUE, VALUE);
rb_class_inherited_p  984 marshal.c      	    if (TYPE(v) == T_MODULE || !RTEST(rb_class_inherited_p(c, RBASIC(v)->klass))) {
rb_class_inherited_p 1242 object.c           return rb_class_inherited_p(mod, arg);
rb_class_inherited_p 1269 object.c           return rb_class_inherited_p(arg, mod);
rb_class_inherited_p 1315 object.c           cmp = rb_class_inherited_p(mod, arg);
rb_class_inherited_p 2475 object.c           rb_define_method(rb_cModule, "<=", rb_class_inherited_p, 1);


rb_class_init_copy

rb_class_init_copy  115 intern.h       VALUE rb_class_init_copy(VALUE, VALUE);
rb_class_init_copy 2518 object.c           rb_define_method(rb_cClass, "initialize_copy", rb_class_init_copy, 1); /* in class.c */


rb_class_instance_methods

rb_class_instance_methods  127 intern.h       VALUE rb_class_instance_methods(int, VALUE*, VALUE);
rb_class_instance_methods 1722 object.c       	return rb_class_instance_methods(1, args, CLASS_OF(obj));
rb_class_instance_methods 2492 object.c           rb_define_method(rb_cModule, "instance_methods", rb_class_instance_methods, -1); /* in class.c */


rb_class_name

rb_class_name     346 error.c            if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc));
rb_class_name     382 error.c        	return rb_str_dup(rb_class_name(klass));
rb_class_name     386 error.c            klass = rb_class_name(klass);
rb_class_name     609 error.c            if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc));
rb_class_name    1186 eval.c         	epath = rb_class_name(eclass);
rb_class_name     531 intern.h       VALUE rb_class_name(VALUE);
rb_class_name    1155 object.c           return rb_str_dup(rb_class_name(klass));
rb_class_name     276 variable.c         return RSTRING(rb_class_name(klass))->ptr;


rb_class_new

rb_class_new      180 class.c            klass = rb_class_new(super);
rb_class_new      113 intern.h       VALUE rb_class_new(VALUE);
rb_class_new      177 struct.c       	nstr = rb_class_new(klass);


rb_class_new_instance

rb_class_new_instance  559 error.c            exc = rb_class_new_instance(2, argv, rb_eNameError);
rb_class_new_instance  939 error.c            rb_define_singleton_method(rb_eException, "exception", rb_class_new_instance, -1);
rb_class_new_instance 1057 error.c            rb_exc_raise(rb_class_new_instance(1, &arg, get_syserr(n)));
rb_class_new_instance 4216 eval.c             rb_exc_raise(rb_class_new_instance(2, args, rb_eSystemExit));
rb_class_new_instance 5388 eval.c         	exc = rb_class_new_instance(n, args, exc);
rb_class_new_instance 12252 eval.c             rb_thread_main_jump(rb_class_new_instance(2, args, rb_eSystemExit),
rb_class_new_instance   18 ext/dl/dl.c        return rb_class_new_instance(argc, argv, rb_cDLHandle);
rb_class_new_instance  303 ext/iconv/iconv.c     error = rb_class_new_instance(3, args, error);
rb_class_new_instance  198 ext/openssl/ossl_digest.c     VALUE obj = rb_class_new_instance(1, &str, klass);
rb_class_new_instance  208 ext/openssl/ossl_digest.c     VALUE obj = rb_class_new_instance(1, &str, klass);
rb_class_new_instance  201 ext/stringio/stringio.c     VALUE obj = rb_class_new_instance(argc, argv, klass);
rb_class_new_instance   58 ext/tk/tkutil/tkutil.c     VALUE obj = rb_class_new_instance(argc, argv, klass);
rb_class_new_instance 2401 ext/zlib/zlib.c     VALUE obj = rb_class_new_instance(argc, argv, klass);
rb_class_new_instance  238 intern.h       VALUE rb_class_new_instance(int, VALUE*, VALUE);
rb_class_new_instance 3101 io.c               VALUE io = rb_class_new_instance(argc, argv, klass);
rb_class_new_instance 4032 io.c               return rb_class_new_instance(argc, argv, klass);
rb_class_new_instance 4840 io.c               return rb_class_new_instance(2, (VALUE*)args+1, *(VALUE*)args);
rb_class_new_instance 2516 object.c           rb_define_method(rb_cClass, "new", rb_class_new_instance, -1);
rb_class_new_instance 1896 re.c                   return rb_class_new_instance(1, args, rb_cRegexp);
rb_class_new_instance 1906 re.c                       return rb_class_new_instance(1, args, rb_cRegexp);
rb_class_new_instance 1960 re.c                   return rb_class_new_instance(3, args, rb_cRegexp);
rb_class_new_instance 2230 re.c               rb_define_singleton_method(rb_cRegexp, "compile", rb_class_new_instance, -1);
rb_class_new_instance  428 ruby.c         		    rb_exc_raise(rb_class_new_instance(2, name_error, rb_eNameError));
rb_class_new_instance  198 struct.c           rb_define_singleton_method(nstr, "new", rb_class_new_instance, -1);
rb_class_new_instance  199 struct.c           rb_define_singleton_method(nstr, "[]", rb_class_new_instance, -1);
rb_class_new_instance  347 struct.c           return rb_class_new_instance(RARRAY(values)->len, RARRAY(values)->ptr, klass);
rb_class_new_instance  366 struct.c           return rb_class_new_instance(size, mem, klass);
rb_class_new_instance 2070 time.c             rb_define_singleton_method(rb_cTime, "now", rb_class_new_instance, -1);


rb_class_path

rb_class_path     527 intern.h       VALUE rb_class_path(VALUE);
rb_class_path     102 marshal.c          VALUE path = rb_class_path(klass);
rb_class_path     215 variable.c     	str = rb_str_dup(rb_class_path(under));
rb_class_path     270 variable.c         return rb_class_path(rb_class_real(klass));


rb_class_private_instance_methods

rb_class_private_instance_methods  130 intern.h       VALUE rb_class_private_instance_methods(int, VALUE*, VALUE);
rb_class_private_instance_methods 1773 object.c       	return rb_class_private_instance_methods(1, args, CLASS_OF(obj));
rb_class_private_instance_methods 1775 object.c           return rb_class_private_instance_methods(argc, argv, CLASS_OF(obj));
rb_class_private_instance_methods 2498 object.c       		     rb_class_private_instance_methods, -1);   /* in class.c */


rb_class_protected_instance_methods

rb_class_protected_instance_methods  129 intern.h       VALUE rb_class_protected_instance_methods(int, VALUE*, VALUE);
rb_class_protected_instance_methods 1752 object.c       	return rb_class_protected_instance_methods(1, args, CLASS_OF(obj));
rb_class_protected_instance_methods 1754 object.c           return rb_class_protected_instance_methods(argc, argv, CLASS_OF(obj));
rb_class_protected_instance_methods 2496 object.c       		     rb_class_protected_instance_methods, -1); /* in class.c */


rb_class_public_instance_methods

rb_class_public_instance_methods  128 intern.h       VALUE rb_class_public_instance_methods(int, VALUE*, VALUE);
rb_class_public_instance_methods 1794 object.c       	return rb_class_public_instance_methods(1, args, CLASS_OF(obj));
rb_class_public_instance_methods 1796 object.c           return rb_class_public_instance_methods(argc, argv, CLASS_OF(obj));
rb_class_public_instance_methods 2494 object.c       		     rb_class_public_instance_methods, -1);    /* in class.c */


rb_class_real

rb_class_real     165 class.c        	metasuper = RBASIC(rb_class_real(super))->klass;
rb_class_real     205 class.c        	if (rb_class_real(RCLASS(klass)->super) != super) {
rb_class_real     234 class.c        	if (rb_class_real(RCLASS(klass)->super) != super) {
rb_class_real    2237 eval.c         		    !rb_obj_is_kind_of(self, rb_class_real(val)))
rb_class_real    3851 eval.c         		    tmp = rb_class_real(RCLASS(klass)->super);
rb_class_real    5809 eval.c         	    if (!rb_obj_is_kind_of(ruby_frame->self, rb_class_real(defined_class)))
rb_class_real     377 intern.h       VALUE rb_class_real(VALUE);
rb_class_real     110 marshal.c          if (rb_path2class(n) != rb_class_real(klass)) {
rb_class_real     368 marshal.c          path = RSTRING(class2path(rb_class_real(klass)))->ptr;
rb_class_real     378 marshal.c          klass = rb_class_real(klass);
rb_class_real     163 object.c           return rb_class_real(CLASS_OF(obj));
rb_class_real    1423 object.c           if (rb_obj_class(obj) != rb_class_real(klass)) {
rb_class_real     270 variable.c         return rb_class_path(rb_class_real(klass));


rb_clear_cache

rb_clear_cache    391 class.c            if (changed) rb_clear_cache();
rb_clear_cache    210 intern.h       void rb_clear_cache(void);


rb_clear_cache_by_class

rb_clear_cache_by_class 7006 eval.c             rb_clear_cache_by_class(self);
rb_clear_cache_by_class 1119 gc.c           	rb_clear_cache_by_class((VALUE)obj);
rb_clear_cache_by_class  211 intern.h       void rb_clear_cache_by_class(VALUE);


rb_clear_cache_by_id

rb_clear_cache_by_id  402 eval.c             rb_clear_cache_by_id(mid);
rb_clear_cache_by_id 2041 eval.c             rb_clear_cache_by_id(name);


rb_cmperr

rb_cmperr          23 compar.c       	rb_cmperr(a, b);
rb_cmperr         169 numeric.c      	rb_cmperr(x0, y0);
rb_cmperr        2690 numeric.c      	if (NIL_P(c)) rb_cmperr(i, to);
rb_cmperr        2728 numeric.c      	if (NIL_P(c)) rb_cmperr(i, to);


rb_cmpint

rb_cmpint        1483 array.c            n = rb_cmpint(retval, a, b);
rb_cmpint        1505 array.c            n = rb_cmpint(retval, a, b);
rb_cmpint          57 compar.c           if (rb_cmpint(c, a[0], a[1]) == 0) return Qtrue;
rb_cmpint         100 compar.c           if (rb_cmpint(c, x, y) > 0) return Qtrue;
rb_cmpint         117 compar.c           if (rb_cmpint(c, x, y) >= 0) return Qtrue;
rb_cmpint         134 compar.c           if (rb_cmpint(c, x, y) < 0) return Qtrue;
rb_cmpint         151 compar.c           if (rb_cmpint(c, x, y) <= 0) return Qtrue;
rb_cmpint         441 enum.c             return rb_cmpint(rb_funcall(a, id_cmp, 1, b), a, b);
rb_cmpint         743 enum.c         	if (rb_cmpint(cmp, i, *memo) < 0) {
rb_cmpint         760 enum.c         	if (rb_cmpint(cmp, i, *memo) < 0) {
rb_cmpint         802 enum.c         	if (rb_cmpint(cmp, i, *memo) > 0) {
rb_cmpint         819 enum.c         	if (rb_cmpint(cmp, i, *memo) > 0) {
rb_cmpint         860 enum.c             else if (rb_cmpint(rb_funcall(v, id_cmp, 1, memo[0]), v, memo[0]) < 0) {
rb_cmpint         901 enum.c             else if (rb_cmpint(rb_funcall(v, id_cmp, 1, memo[0]), v, memo[0]) > 0) {
rb_cmpint         140 intern.h       int rb_cmpint(VALUE, VALUE, VALUE);
rb_cmpint         138 range.c            if (rb_cmpint(r, a, b) < 0) return Qtrue;
rb_cmpint         149 range.c            c = rb_cmpint(r, a, b);
rb_cmpint         460 range.c        	int c = rb_cmpint(rb_funcall(b, id_cmp, 1, e), b, e);
rb_cmpint         490 range.c        	int c = rb_cmpint(rb_funcall(b, id_cmp, 1, e), b, e);


rb_compile_error

rb_compile_error  446 parse.y        # define compile_error rb_compile_error
rb_compile_error 4505 parse.y            rb_compile_error("%s", msg);
rb_compile_error 5133 parse.y        	    rb_compile_error(PARSER_ARG  "symbol cannot contain '\\0'");
rb_compile_error 5198 parse.y        	rb_compile_error(PARSER_ARG  "unterminated string meets end of file");
rb_compile_error 5234 parse.y        	    rb_compile_error(PARSER_ARG  "unterminated here document identifier");
rb_compile_error 5333 parse.y        	rb_compile_error(PARSER_ARG  "can't find string \"%s\" anywhere before EOF", eos);
rb_compile_error 5754 parse.y        			rb_compile_error(PARSER_ARG  "embedded document meets end of file");
rb_compile_error 5884 parse.y        	    rb_compile_error(PARSER_ARG  "incomplete character syntax");
rb_compile_error 6503 parse.y        		rb_compile_error(PARSER_ARG  "unterminated quoted string meets end of file");
rb_compile_error 6625 parse.y        		rb_compile_error(PARSER_ARG  "invalid global variable `%s'", rb_id2name(yylval.id));
rb_compile_error 6677 parse.y        		rb_compile_error(PARSER_ARG  "`@%c' is not allowed as an instance variable name", c);
rb_compile_error 6680 parse.y        		rb_compile_error(PARSER_ARG  "`@@%c' is not allowed as a class variable name", c);
rb_compile_error 6708 parse.y        	    rb_compile_error(PARSER_ARG  "Invalid char `\\%03o' in expression", c);
rb_compile_error 7204 parse.y            rb_compile_error("identifier %s is not valid", rb_id2name(id));
rb_compile_error 7261 parse.y        	rb_compile_error("identifier %s is not valid", rb_id2name(id));
rb_compile_error 7328 parse.y        	rb_compile_error("Can't set variable $%ld", node->nd_nth);
rb_compile_error 7331 parse.y        	rb_compile_error("Can't set variable $%c", (int)node->nd_nth);
rb_compile_error 7811 parse.y        	rb_compile_error("block argument should not be given");
rb_compile_error  515 re.c           	rb_compile_error("%s: %s", err, RSTRING(desc)->ptr);


rb_compile_error_append

rb_compile_error_append 4525 parse.y        	rb_compile_error_append("%s", buf);
rb_compile_error_append 4536 parse.y        	rb_compile_error_append("%s", buf);


rb_compile_string

rb_compile_string 6079 eval.c             node = rb_compile_string(file, src, line);
rb_compile_string  361 node.h         NODE *rb_compile_string(const char*, VALUE, int);
rb_compile_string 4665 parse.y            return rb_compile_string(f, rb_str_new(s, len), line);
rb_compile_string  828 ruby.c         	ruby_eval_tree = rb_compile_string(script, e_script, 1);


rb_const_defined

rb_const_defined  200 class.c            if (rb_const_defined(rb_cObject, id)) {
rb_const_defined  283 class.c            if (rb_const_defined(rb_cObject, id)) {
rb_const_defined 1779 eval.c             return rb_const_defined(cref->nd_clss, id);
rb_const_defined  791 ext/racc/cparse/cparse.c     if (rb_const_defined(rb_cObject, id_racc)) {
rb_const_defined 1302 ext/strscan/strscan.c     if (!rb_const_defined(rb_cObject, id_scanerr)) {
rb_const_defined 1066 ext/syck/rubyext.c         if ( !rb_const_defined( tclass, tpart ) ) return Qnil;
rb_const_defined  558 intern.h       int rb_const_defined(VALUE, ID);
rb_const_defined 4559 parse.y        	rb_const_defined(rb_cObject, rb_intern("SCRIPT_LINES__"))) {
rb_const_defined  244 variable.c     	if (!rb_const_defined(c, id)) {


rb_const_defined_0

rb_const_defined_0 1466 variable.c         return rb_const_defined_0(klass, id, Qtrue, Qtrue);
rb_const_defined_0 1472 variable.c         return rb_const_defined_0(klass, id, Qfalse, Qtrue);
rb_const_defined_0 1478 variable.c         return rb_const_defined_0(klass, id, Qtrue, Qfalse);


rb_const_defined_at

rb_const_defined_at  229 class.c            if (rb_const_defined_at(outer, id)) {
rb_const_defined_at  303 class.c            if (rb_const_defined_at(outer, id)) {
rb_const_defined_at 3844 eval.c         	    if (rb_const_defined_at(cbase, cname)) {
rb_const_defined_at 3890 eval.c         	    if (rb_const_defined_at(cbase, cname)) {
rb_const_defined_at  559 intern.h       int rb_const_defined_at(VALUE, ID);
rb_const_defined_at 1691 object.c           return rb_const_defined_at(mod, id);
rb_const_defined_at  188 struct.c       	if (rb_const_defined_at(klass, id)) {
rb_const_defined_at 1356 variable.c         if (rb_const_defined_at(mod, id)) {


rb_const_defined_from

rb_const_defined_from 2320 eval.c         	    if (rb_const_defined_from(val, node->nd_mid))
rb_const_defined_from 2331 eval.c         	if (rb_const_defined_from(rb_cObject, node->nd_mid)) {
rb_const_defined_from  560 intern.h       int rb_const_defined_from(VALUE, ID);


rb_const_get

rb_const_get      201 class.c        	klass = rb_const_get(rb_cObject, id);
rb_const_get      284 class.c        	module = rb_const_get(rb_cObject, id);
rb_const_get      850 error.c        	error = rb_const_get(klass, rb_intern("Errno"));
rb_const_get      905 error.c        	num = rb_const_get(klass, rb_intern("Errno"));
rb_const_get      907 error.c            e = rb_const_get(self, rb_intern("Errno"));
rb_const_get     1803 eval.c             return rb_const_get(cref->nd_clss, id);
rb_const_get     5382 eval.c         	args[n++] = rb_funcall(rb_const_get(exc, rb_intern("message")), '!',
rb_const_get       31 ext/openssl/ossl_x509name.c   rb_const_get(cX509Name, rb_intern("OBJECT_TYPE_TEMPLATE"))
rb_const_get       33 ext/openssl/ossl_x509name.c   rb_const_get(cX509Name, rb_intern("DEFAULT_OBJECT_TYPE"))
rb_const_get      792 ext/racc/cparse/cparse.c         Racc = rb_const_get(rb_cObject, id_racc);
rb_const_get      492 ext/syck/rubyext.c                     cDate = rb_const_get( rb_cObject, rb_intern("Date") );
rb_const_get     1067 ext/syck/rubyext.c         tclass = rb_const_get( tclass, tpart );
rb_const_get     2321 ext/syck/rubyext.c     rb_include_module( cBadAlias, rb_const_get( rb_cObject, rb_intern("Comparable") ) );
rb_const_get     2548 ext/tk/tcltklib.c         receiver = rb_const_get(rb_cObject, rb_intern(str));
rb_const_get     7767 ext/tk/tcltklib.c     eLocalJumpError = rb_const_get(rb_cObject, rb_intern("LocalJumpError"));
rb_const_get     1148 ext/tk/tkutil/tkutil.c     Data_Get_Struct(rb_const_get(rb_obj_class(self), ID_SUBST_INFO),
rb_const_get     1215 ext/tk/tkutil/tkutil.c     Data_Get_Struct(rb_const_get(self, ID_SUBST_INFO),
rb_const_get     1235 ext/tk/tkutil/tkutil.c     Data_Get_Struct(rb_const_get(self, ID_SUBST_INFO),
rb_const_get     1323 ext/tk/tkutil/tkutil.c     Data_Get_Struct(rb_const_get(self, ID_SUBST_INFO),
rb_const_get     1443 ext/tk/tkutil/tkutil.c     Data_Get_Struct(rb_const_get(self, ID_SUBST_INFO),
rb_const_get     1525 ext/tk/tkutil/tkutil.c     cMethod = rb_const_get(rb_cObject, rb_intern("Method"));
rb_const_get     1580 ext/tk/tkutil/tkutil.c     cTclTkLib = rb_const_get(rb_cObject, rb_intern("TclTkLib"));
rb_const_get     2143 ext/win32ole/win32ole.c     VALUE argv = rb_const_get(cWIN32OLE, rb_intern("ARGV"));
rb_const_get      561 intern.h       VALUE rb_const_get(VALUE, ID);
rb_const_get     1646 object.c           return rb_const_get(mod, id);
rb_const_get     4562 parse.y        	hash = rb_const_get(rb_cObject, rb_intern("SCRIPT_LINES__"));


rb_const_get_0

rb_const_get_0   1312 variable.c         return rb_const_get_0(klass, id, Qtrue, Qtrue);
rb_const_get_0   1318 variable.c         return rb_const_get_0(klass, id, Qfalse, Qtrue);
rb_const_get_0   1324 variable.c         return rb_const_get_0(klass, id, Qtrue, Qfalse);


rb_const_get_at

rb_const_get_at   230 class.c        	klass = rb_const_get_at(outer, id);
rb_const_get_at   304 class.c        	module = rb_const_get_at(outer, id);
rb_const_get_at  3845 eval.c         		klass = rb_const_get_at(cbase, cname);
rb_const_get_at  3891 eval.c         		module = rb_const_get_at(cbase, cname);
rb_const_get_at   793 ext/racc/cparse/cparse.c         Parser = rb_const_get_at(Racc, rb_intern("Parser"));
rb_const_get_at   562 intern.h       VALUE rb_const_get_at(VALUE, ID);
rb_const_get_at   248 variable.c     	c = rb_const_get_at(c, id);


rb_const_get_from

rb_const_get_from 3557 eval.c         		    result = rb_const_get_from(klass, node->nd_mid);
rb_const_get_from 3572 eval.c         	result = rb_const_get_from(rb_cObject, node->nd_mid);
rb_const_get_from  563 intern.h       VALUE rb_const_get_from(VALUE, ID);


rb_const_list

rb_const_list    1884 eval.c             return rb_const_list(data);
rb_const_list     555 intern.h       VALUE rb_const_list(void*);
rb_const_list    1435 variable.c         return rb_const_list(rb_mod_const_of(mod, 0));


rb_const_set

rb_const_set      216 class.c            rb_const_set(rb_cObject, id, klass);
rb_const_set      245 class.c            rb_const_set(outer, id, klass);
rb_const_set      291 class.c            rb_const_set(rb_cObject, id, module);
rb_const_set      311 class.c            rb_const_set(outer, id, module);
rb_const_set     3486 eval.c         	    rb_const_set(class_prefix(self, node->nd_else), node->nd_else->nd_mid, result);
rb_const_set     3492 eval.c         	    rb_const_set(ruby_cbase, node->nd_vid, result);
rb_const_set     3866 eval.c         		rb_const_set(cbase, cname, klass);
rb_const_set     3903 eval.c         		rb_const_set(cbase, cname, module);
rb_const_set     5041 eval.c         	    rb_const_set(class_prefix(self, lhs->nd_else), lhs->nd_else->nd_mid, val);
rb_const_set     5044 eval.c         	    rb_const_set(ruby_cbase, lhs->nd_vid, val);
rb_const_set     1303 ext/strscan/strscan.c 	rb_const_set(rb_cObject, id_scanerr, ScanError);
rb_const_set     1307 ext/strscan/strscan.c     rb_const_set(StringScanner, rb_intern("Version"), tmp);
rb_const_set     1310 ext/strscan/strscan.c     rb_const_set(StringScanner, rb_intern("Id"), tmp);
rb_const_set     1135 ext/tk/tkutil/tkutil.c     rb_const_set(cCB_SUBST, ID_SUBST_INFO,
rb_const_set     1408 ext/tk/tkutil/tkutil.c     rb_const_set(self, ID_SUBST_INFO,
rb_const_set      564 intern.h       void rb_const_set(VALUE, ID, VALUE);
rb_const_set     1669 object.c           rb_const_set(mod, id, value);
rb_const_set     2285 object.c           rb_const_set((rb_cObject ? rb_cObject : obj), id, obj);
rb_const_set     1179 variable.c         rb_const_set(mod, id, Qundef);
rb_const_set     1530 variable.c         rb_const_set(klass, id, val);


rb_cont_call

rb_cont_call     12881 eval.c             rb_define_method(rb_cCont, "call", rb_cont_call, -1);
rb_cont_call     12882 eval.c             rb_define_method(rb_cCont, "[]", rb_cont_call, -1);


rb_convert_type

rb_convert_type   258 array.c            return rb_convert_type(ary, T_ARRAY, "Array", "to_ary");
rb_convert_type   264 array.c            return rb_convert_type(ary, T_ARRAY, "Array", "to_a");
rb_convert_type  1054 enum.c         	argv[i] = rb_convert_type(argv[i], T_ARRAY, "Array", "to_a");
rb_convert_type   497 ext/stringio/stringio.c     orig = rb_convert_type(orig, T_DATA, "StringIO", "to_strio");
rb_convert_type   222 ext/tk/tkutil/tkutil.c     keys = rb_convert_type(keys, T_HASH, "Hash", "to_hash");
rb_convert_type   327 hash.c             return rb_convert_type(hash, T_HASH, "Hash", "to_hash");
rb_convert_type   379 intern.h       VALUE rb_convert_type(VALUE,int,const char*,const char*);
rb_convert_type   236 io.c               return rb_convert_type(io, T_FILE, "IO", "to_io");
rb_convert_type  2164 object.c       	  VALUE f = rb_convert_type(val, T_FLOAT, "Float", "to_f");
rb_convert_type  2227 object.c           return rb_convert_type(val, T_STRING, "String", "to_s");
rb_convert_type  2255 object.c       	return rb_convert_type(val, T_ARRAY, "Array", "to_a");
rb_convert_type   230 string.c           return rb_convert_type(str, T_STRING, "String", "to_str");


rb_copy_generic_ivar

rb_copy_generic_ivar  541 intern.h       void rb_copy_generic_ivar(VALUE,VALUE);
rb_copy_generic_ivar  174 object.c           rb_copy_generic_ivar(dest, obj);
rb_copy_generic_ivar  320 ruby.h             if (FL_TEST(obj, FL_EXIVAR)) rb_copy_generic_ivar((VALUE)clone,(VALUE)obj);\
rb_copy_generic_ivar  324 ruby.h             if (FL_TEST(obj, FL_EXIVAR)) rb_copy_generic_ivar((VALUE)dup,(VALUE)obj);\
rb_copy_generic_ivar 1965 time.c             rb_copy_generic_ivar(str, time);
rb_copy_generic_ivar 2040 time.c             rb_copy_generic_ivar(time, str);


rb_cstr2inum

rb_cstr2inum      392 ext/bigdecimal/bigdecimal.c     return rb_cstr2inum(psz,10);
rb_cstr2inum      379 ext/syck/rubyext.c                 obj = rb_cstr2inum( n->data.str->ptr, 16 );
rb_cstr2inum      384 ext/syck/rubyext.c                 obj = rb_cstr2inum( n->data.str->ptr, 8 );
rb_cstr2inum      414 ext/syck/rubyext.c                 obj = rb_cstr2inum( n->data.str->ptr, 10 );
rb_cstr2inum       81 intern.h       VALUE rb_cstr2inum(const char*, int);


rb_cstr_to_dbl

rb_cstr_to_dbl    993 ext/tk/tkutil/tkutil.c     return rb_float_new(rb_cstr_to_dbl(RSTRING(value)->ptr, 1));
rb_cstr_to_dbl    387 intern.h       double rb_cstr_to_dbl(const char*, int);
rb_cstr_to_dbl   2139 object.c           return rb_cstr_to_dbl(s, badcheck);


rb_cstr_to_inum

rb_cstr_to_inum   515 bignum.c           return rb_cstr_to_inum(s, base, badcheck);
rb_cstr_to_inum   577 bignum.c           return rb_cstr_to_inum(str, base, base==0);
rb_cstr_to_inum   111 ext/openssl/ossl_asn1.c     num = rb_cstr_to_inum(txt, 10, Qtrue);
rb_cstr_to_inum   204 ext/openssl/ossl_bn.c     num = rb_cstr_to_inum(txt, 10, Qtrue);
rb_cstr_to_inum   979 ext/tk/tkutil/tkutil.c     return rb_cstr_to_inum(RSTRING(value)->ptr, 10, 1);
rb_cstr_to_inum   986 ext/tk/tkutil/tkutil.c     return rb_cstr_to_inum(RSTRING(value)->ptr, 0, 1);
rb_cstr_to_inum    79 intern.h       VALUE rb_cstr_to_inum(const char*, int, int);
rb_cstr_to_inum  6120 parse.y        		    set_yylval_literal(rb_cstr_to_inum(tok(), 16, Qfalse));
rb_cstr_to_inum  6144 parse.y        		    set_yylval_literal(rb_cstr_to_inum(tok(), 2, Qfalse));
rb_cstr_to_inum  6168 parse.y        		    set_yylval_literal(rb_cstr_to_inum(tok(), 10, Qfalse));
rb_cstr_to_inum  6199 parse.y        			set_yylval_literal(rb_cstr_to_inum(tok(), 8, Qfalse));
rb_cstr_to_inum  6297 parse.y        	    set_yylval_literal(rb_cstr_to_inum(tok(), 10, Qfalse));


rb_curses_define_const

rb_curses_define_const 1584 ext/curses/curses.c     rb_curses_define_const(A_ATTRIBUTES);
rb_curses_define_const 1586 ext/curses/curses.c     rb_curses_define_const(A_NORMAL);
rb_curses_define_const 1588 ext/curses/curses.c     rb_curses_define_const(A_STANDOUT);
rb_curses_define_const 1589 ext/curses/curses.c     rb_curses_define_const(A_UNDERLINE);
rb_curses_define_const 1590 ext/curses/curses.c     rb_curses_define_const(A_REVERSE);
rb_curses_define_const 1591 ext/curses/curses.c     rb_curses_define_const(A_BLINK);
rb_curses_define_const 1592 ext/curses/curses.c     rb_curses_define_const(A_DIM);
rb_curses_define_const 1593 ext/curses/curses.c     rb_curses_define_const(A_BOLD);
rb_curses_define_const 1594 ext/curses/curses.c     rb_curses_define_const(A_PROTECT);
rb_curses_define_const 1596 ext/curses/curses.c     rb_curses_define_const(A_INVIS);
rb_curses_define_const 1598 ext/curses/curses.c     rb_curses_define_const(A_ALTCHARSET);
rb_curses_define_const 1599 ext/curses/curses.c     rb_curses_define_const(A_CHARTEXT);
rb_curses_define_const 1601 ext/curses/curses.c     rb_curses_define_const(A_HORIZONTAL);
rb_curses_define_const 1604 ext/curses/curses.c     rb_curses_define_const(A_LEFT);
rb_curses_define_const 1607 ext/curses/curses.c     rb_curses_define_const(A_LOW);
rb_curses_define_const 1610 ext/curses/curses.c     rb_curses_define_const(A_RIGHT);
rb_curses_define_const 1613 ext/curses/curses.c     rb_curses_define_const(A_TOP);
rb_curses_define_const 1616 ext/curses/curses.c     rb_curses_define_const(A_VERTICAL);
rb_curses_define_const 1618 ext/curses/curses.c     rb_curses_define_const(A_COLOR);
rb_curses_define_const 1621 ext/curses/curses.c     rb_curses_define_const(COLORS);
rb_curses_define_const 1623 ext/curses/curses.c     rb_curses_define_const(COLOR_BLACK);
rb_curses_define_const 1624 ext/curses/curses.c     rb_curses_define_const(COLOR_RED);
rb_curses_define_const 1625 ext/curses/curses.c     rb_curses_define_const(COLOR_GREEN);
rb_curses_define_const 1626 ext/curses/curses.c     rb_curses_define_const(COLOR_YELLOW);
rb_curses_define_const 1627 ext/curses/curses.c     rb_curses_define_const(COLOR_BLUE);
rb_curses_define_const 1628 ext/curses/curses.c     rb_curses_define_const(COLOR_MAGENTA);
rb_curses_define_const 1629 ext/curses/curses.c     rb_curses_define_const(COLOR_CYAN);
rb_curses_define_const 1630 ext/curses/curses.c     rb_curses_define_const(COLOR_WHITE);
rb_curses_define_const 1634 ext/curses/curses.c     rb_curses_define_const(BUTTON1_PRESSED);
rb_curses_define_const 1637 ext/curses/curses.c     rb_curses_define_const(BUTTON1_RELEASED);
rb_curses_define_const 1640 ext/curses/curses.c     rb_curses_define_const(BUTTON1_CLICKED);
rb_curses_define_const 1643 ext/curses/curses.c     rb_curses_define_const(BUTTON1_DOUBLE_CLICKED);
rb_curses_define_const 1646 ext/curses/curses.c     rb_curses_define_const(BUTTON1_TRIPLE_CLICKED);
rb_curses_define_const 1649 ext/curses/curses.c     rb_curses_define_const(BUTTON2_PRESSED);
rb_curses_define_const 1652 ext/curses/curses.c     rb_curses_define_const(BUTTON2_RELEASED);
rb_curses_define_const 1655 ext/curses/curses.c     rb_curses_define_const(BUTTON2_CLICKED);
rb_curses_define_const 1658 ext/curses/curses.c     rb_curses_define_const(BUTTON2_DOUBLE_CLICKED);
rb_curses_define_const 1661 ext/curses/curses.c     rb_curses_define_const(BUTTON2_TRIPLE_CLICKED);
rb_curses_define_const 1664 ext/curses/curses.c     rb_curses_define_const(BUTTON3_PRESSED);
rb_curses_define_const 1667 ext/curses/curses.c     rb_curses_define_const(BUTTON3_RELEASED);
rb_curses_define_const 1670 ext/curses/curses.c     rb_curses_define_const(BUTTON3_CLICKED);
rb_curses_define_const 1673 ext/curses/curses.c     rb_curses_define_const(BUTTON3_DOUBLE_CLICKED);
rb_curses_define_const 1676 ext/curses/curses.c     rb_curses_define_const(BUTTON3_TRIPLE_CLICKED);
rb_curses_define_const 1679 ext/curses/curses.c     rb_curses_define_const(BUTTON4_PRESSED);
rb_curses_define_const 1682 ext/curses/curses.c     rb_curses_define_const(BUTTON4_RELEASED);
rb_curses_define_const 1685 ext/curses/curses.c     rb_curses_define_const(BUTTON4_CLICKED);
rb_curses_define_const 1688 ext/curses/curses.c     rb_curses_define_const(BUTTON4_DOUBLE_CLICKED);
rb_curses_define_const 1691 ext/curses/curses.c     rb_curses_define_const(BUTTON4_TRIPLE_CLICKED);
rb_curses_define_const 1694 ext/curses/curses.c     rb_curses_define_const(BUTTON_SHIFT);
rb_curses_define_const 1697 ext/curses/curses.c     rb_curses_define_const(BUTTON_CTRL);
rb_curses_define_const 1700 ext/curses/curses.c     rb_curses_define_const(BUTTON_ALT);
rb_curses_define_const 1703 ext/curses/curses.c     rb_curses_define_const(ALL_MOUSE_EVENTS);
rb_curses_define_const 1706 ext/curses/curses.c     rb_curses_define_const(REPORT_MOUSE_POSITION);
rb_curses_define_const 1711 ext/curses/curses.c     rb_curses_define_const(KEY_MOUSE);
rb_curses_define_const 1715 ext/curses/curses.c     rb_curses_define_const(KEY_MIN);
rb_curses_define_const 1719 ext/curses/curses.c     rb_curses_define_const(KEY_BREAK);
rb_curses_define_const 1723 ext/curses/curses.c     rb_curses_define_const(KEY_DOWN);
rb_curses_define_const 1727 ext/curses/curses.c     rb_curses_define_const(KEY_UP);
rb_curses_define_const 1731 ext/curses/curses.c     rb_curses_define_const(KEY_LEFT);
rb_curses_define_const 1735 ext/curses/curses.c     rb_curses_define_const(KEY_RIGHT);
rb_curses_define_const 1739 ext/curses/curses.c     rb_curses_define_const(KEY_HOME);
rb_curses_define_const 1743 ext/curses/curses.c     rb_curses_define_const(KEY_BACKSPACE);
rb_curses_define_const 1760 ext/curses/curses.c     rb_curses_define_const(KEY_DL);
rb_curses_define_const 1764 ext/curses/curses.c     rb_curses_define_const(KEY_IL);
rb_curses_define_const 1768 ext/curses/curses.c     rb_curses_define_const(KEY_DC);
rb_curses_define_const 1772 ext/curses/curses.c     rb_curses_define_const(KEY_IC);
rb_curses_define_const 1776 ext/curses/curses.c     rb_curses_define_const(KEY_EIC);
rb_curses_define_const 1780 ext/curses/curses.c     rb_curses_define_const(KEY_CLEAR);
rb_curses_define_const 1784 ext/curses/curses.c     rb_curses_define_const(KEY_EOS);
rb_curses_define_const 1788 ext/curses/curses.c     rb_curses_define_const(KEY_EOL);
rb_curses_define_const 1792 ext/curses/curses.c     rb_curses_define_const(KEY_SF);
rb_curses_define_const 1796 ext/curses/curses.c     rb_curses_define_const(KEY_SR);
rb_curses_define_const 1800 ext/curses/curses.c     rb_curses_define_const(KEY_NPAGE);
rb_curses_define_const 1804 ext/curses/curses.c     rb_curses_define_const(KEY_PPAGE);
rb_curses_define_const 1808 ext/curses/curses.c     rb_curses_define_const(KEY_STAB);
rb_curses_define_const 1812 ext/curses/curses.c     rb_curses_define_const(KEY_CTAB);
rb_curses_define_const 1816 ext/curses/curses.c     rb_curses_define_const(KEY_CATAB);
rb_curses_define_const 1820 ext/curses/curses.c     rb_curses_define_const(KEY_ENTER);
rb_curses_define_const 1824 ext/curses/curses.c     rb_curses_define_const(KEY_SRESET);
rb_curses_define_const 1828 ext/curses/curses.c     rb_curses_define_const(KEY_RESET);
rb_curses_define_const 1832 ext/curses/curses.c     rb_curses_define_const(KEY_PRINT);
rb_curses_define_const 1836 ext/curses/curses.c     rb_curses_define_const(KEY_LL);
rb_curses_define_const 1840 ext/curses/curses.c     rb_curses_define_const(KEY_A1);
rb_curses_define_const 1844 ext/curses/curses.c     rb_curses_define_const(KEY_A3);
rb_curses_define_const 1848 ext/curses/curses.c     rb_curses_define_const(KEY_B2);
rb_curses_define_const 1852 ext/curses/curses.c     rb_curses_define_const(KEY_C1);
rb_curses_define_const 1856 ext/curses/curses.c     rb_curses_define_const(KEY_C3);
rb_curses_define_const 1860 ext/curses/curses.c     rb_curses_define_const(KEY_BTAB);
rb_curses_define_const 1864 ext/curses/curses.c     rb_curses_define_const(KEY_BEG);
rb_curses_define_const 1868 ext/curses/curses.c     rb_curses_define_const(KEY_CANCEL);
rb_curses_define_const 1872 ext/curses/curses.c     rb_curses_define_const(KEY_CLOSE);
rb_curses_define_const 1876 ext/curses/curses.c     rb_curses_define_const(KEY_COMMAND);
rb_curses_define_const 1880 ext/curses/curses.c     rb_curses_define_const(KEY_COPY);
rb_curses_define_const 1884 ext/curses/curses.c     rb_curses_define_const(KEY_CREATE);
rb_curses_define_const 1888 ext/curses/curses.c     rb_curses_define_const(KEY_END);
rb_curses_define_const 1892 ext/curses/curses.c     rb_curses_define_const(KEY_EXIT);
rb_curses_define_const 1896 ext/curses/curses.c     rb_curses_define_const(KEY_FIND);
rb_curses_define_const 1900 ext/curses/curses.c     rb_curses_define_const(KEY_HELP);
rb_curses_define_const 1904 ext/curses/curses.c     rb_curses_define_const(KEY_MARK);
rb_curses_define_const 1908 ext/curses/curses.c     rb_curses_define_const(KEY_MESSAGE);
rb_curses_define_const 1912 ext/curses/curses.c     rb_curses_define_const(KEY_MOVE);
rb_curses_define_const 1916 ext/curses/curses.c     rb_curses_define_const(KEY_NEXT);
rb_curses_define_const 1920 ext/curses/curses.c     rb_curses_define_const(KEY_OPEN);
rb_curses_define_const 1924 ext/curses/curses.c     rb_curses_define_const(KEY_OPTIONS);
rb_curses_define_const 1928 ext/curses/curses.c     rb_curses_define_const(KEY_PREVIOUS);
rb_curses_define_const 1932 ext/curses/curses.c     rb_curses_define_const(KEY_REDO);
rb_curses_define_const 1936 ext/curses/curses.c     rb_curses_define_const(KEY_REFERENCE);
rb_curses_define_const 1940 ext/curses/curses.c     rb_curses_define_const(KEY_REFRESH);
rb_curses_define_const 1944 ext/curses/curses.c     rb_curses_define_const(KEY_REPLACE);
rb_curses_define_const 1948 ext/curses/curses.c     rb_curses_define_const(KEY_RESTART);
rb_curses_define_const 1952 ext/curses/curses.c     rb_curses_define_const(KEY_RESUME);
rb_curses_define_const 1956 ext/curses/curses.c     rb_curses_define_const(KEY_SAVE);
rb_curses_define_const 1960 ext/curses/curses.c     rb_curses_define_const(KEY_SBEG);
rb_curses_define_const 1964 ext/curses/curses.c     rb_curses_define_const(KEY_SCANCEL);
rb_curses_define_const 1968 ext/curses/curses.c     rb_curses_define_const(KEY_SCOMMAND);
rb_curses_define_const 1972 ext/curses/curses.c     rb_curses_define_const(KEY_SCOPY);
rb_curses_define_const 1976 ext/curses/curses.c     rb_curses_define_const(KEY_SCREATE);
rb_curses_define_const 1980 ext/curses/curses.c     rb_curses_define_const(KEY_SDC);
rb_curses_define_const 1984 ext/curses/curses.c     rb_curses_define_const(KEY_SDL);
rb_curses_define_const 1988 ext/curses/curses.c     rb_curses_define_const(KEY_SELECT);
rb_curses_define_const 1992 ext/curses/curses.c     rb_curses_define_const(KEY_SEND);
rb_curses_define_const 1996 ext/curses/curses.c     rb_curses_define_const(KEY_SEOL);
rb_curses_define_const 2000 ext/curses/curses.c     rb_curses_define_const(KEY_SEXIT);
rb_curses_define_const 2004 ext/curses/curses.c     rb_curses_define_const(KEY_SFIND);
rb_curses_define_const 2008 ext/curses/curses.c     rb_curses_define_const(KEY_SHELP);
rb_curses_define_const 2012 ext/curses/curses.c     rb_curses_define_const(KEY_SHOME);
rb_curses_define_const 2016 ext/curses/curses.c     rb_curses_define_const(KEY_SIC);
rb_curses_define_const 2020 ext/curses/curses.c     rb_curses_define_const(KEY_SLEFT);
rb_curses_define_const 2024 ext/curses/curses.c     rb_curses_define_const(KEY_SMESSAGE);
rb_curses_define_const 2028 ext/curses/curses.c     rb_curses_define_const(KEY_SMOVE);
rb_curses_define_const 2032 ext/curses/curses.c     rb_curses_define_const(KEY_SNEXT);
rb_curses_define_const 2036 ext/curses/curses.c     rb_curses_define_const(KEY_SOPTIONS);
rb_curses_define_const 2040 ext/curses/curses.c     rb_curses_define_const(KEY_SPREVIOUS);
rb_curses_define_const 2044 ext/curses/curses.c     rb_curses_define_const(KEY_SPRINT);
rb_curses_define_const 2048 ext/curses/curses.c     rb_curses_define_const(KEY_SREDO);
rb_curses_define_const 2052 ext/curses/curses.c     rb_curses_define_const(KEY_SREPLACE);
rb_curses_define_const 2056 ext/curses/curses.c     rb_curses_define_const(KEY_SRIGHT);
rb_curses_define_const 2060 ext/curses/curses.c     rb_curses_define_const(KEY_SRSUME);
rb_curses_define_const 2064 ext/curses/curses.c     rb_curses_define_const(KEY_SSAVE);
rb_curses_define_const 2068 ext/curses/curses.c     rb_curses_define_const(KEY_SSUSPEND);
rb_curses_define_const 2072 ext/curses/curses.c     rb_curses_define_const(KEY_SUNDO);
rb_curses_define_const 2076 ext/curses/curses.c     rb_curses_define_const(KEY_SUSPEND);
rb_curses_define_const 2080 ext/curses/curses.c     rb_curses_define_const(KEY_UNDO);
rb_curses_define_const 2084 ext/curses/curses.c     rb_curses_define_const(KEY_RESIZE);
rb_curses_define_const 2088 ext/curses/curses.c     rb_curses_define_const(KEY_MAX);


rb_cvar_defined

rb_cvar_defined  2308 eval.c         	if (rb_cvar_defined(cvar_cbase(), node->nd_vid)) {
rb_cvar_defined    49 ext/digest/digest.c     if (rb_cvar_defined(klass, id_metadata) == Qfalse) {
rb_cvar_defined   567 intern.h       VALUE rb_cvar_defined(VALUE, ID);
rb_cvar_defined  1674 variable.c         if (rb_cvar_defined(mod, id)) {


rb_cvar_get

rb_cvar_get      3533 eval.c         	result = rb_cvar_get(cvar_cbase(), node->nd_vid);
rb_cvar_get        53 ext/digest/digest.c     obj = rb_cvar_get(klass, id_metadata);
rb_cvar_get       570 intern.h       VALUE rb_cvar_get(VALUE, ID);
rb_cvar_get      1882 object.c           return rb_cvar_get(obj, id);
rb_cvar_get      1585 variable.c         return rb_cvar_get(klass, id);


rb_cvar_set

rb_cvar_set      3501 eval.c         	rb_cvar_set(cvar_cbase(), node->nd_vid, result, Qtrue);
rb_cvar_set      3506 eval.c         	rb_cvar_set(cvar_cbase(), node->nd_vid, result, Qfalse);
rb_cvar_set      5052 eval.c         	rb_cvar_set(cvar_cbase(), lhs->nd_vid, val, Qtrue);
rb_cvar_set      5056 eval.c         	rb_cvar_set(cvar_cbase(), lhs->nd_vid, val, Qfalse);
rb_cvar_set        33 ext/digest/md5/md5init.c     rb_cvar_set(cDigest_MD5, rb_intern("metadata"),
rb_cvar_set        36 ext/digest/rmd160/rmd160init.c     rb_cvar_set(cDigest_RMD160, id_metadata,
rb_cvar_set        33 ext/digest/sha1/sha1init.c     rb_cvar_set(cDigest_SHA1, rb_intern("metadata"),
rb_cvar_set        43 ext/digest/sha2/sha2init.c     rb_cvar_set(cDigest_SHA##bitlen, id_metadata, \
rb_cvar_set       569 intern.h       void rb_cvar_set(VALUE, ID, VALUE, int);
rb_cvar_set      1911 object.c           rb_cvar_set(obj, id, val, Qfalse);
rb_cvar_set      1575 variable.c         rb_cvar_set(klass, id, val, Qfalse);
rb_cvar_set      1596 variable.c         rb_cvar_set(klass, id, val, Qtrue);


rb_data_object_alloc

rb_data_object_alloc  404 ruby.h         VALUE rb_data_object_alloc(VALUE,void*,RUBY_DATA_FUNC,RUBY_DATA_FUNC);
rb_data_object_alloc  407 ruby.h             rb_data_object_alloc(klass,sval,(RUBY_DATA_FUNC)mark,(RUBY_DATA_FUNC)free)


rb_dbl2big

rb_dbl2big         96 intern.h       VALUE rb_dbl2big(double);
rb_dbl2big       1190 numeric.c      	return rb_dbl2big(f);
rb_dbl2big       1216 numeric.c      	return rb_dbl2big(f);
rb_dbl2big       1249 numeric.c      	return rb_dbl2big(f);
rb_dbl2big       1274 numeric.c      	return rb_dbl2big(f);
rb_dbl2big       2009 object.c       	return rb_dbl2big(RFLOAT(val)->value);
rb_dbl2big        450 random.c                   vmax = rb_dbl2big(-RFLOAT(vmax)->value);
rb_dbl2big        452 random.c                   vmax = rb_dbl2big(RFLOAT(vmax)->value);
rb_dbl2big        499 sprintf.c      		    val = rb_dbl2big(RFLOAT(val)->value);


rb_dbl_cmp

rb_dbl_cmp        891 bignum.c       	return rb_dbl_cmp(rb_big2dbl(x), RFLOAT(y)->value);
rb_dbl_cmp        360 intern.h       VALUE rb_dbl_cmp(double, double);
rb_dbl_cmp        887 numeric.c          return rb_dbl_cmp(a, b);
rb_dbl_cmp       2273 numeric.c      	return rb_dbl_cmp((double)FIX2LONG(x), RFLOAT(y)->value);


rb_define_alias

rb_define_alias  2876 array.c            rb_define_alias(rb_cArray,  "size", "length");
rb_define_alias   214 ext/Win32API/Win32API.c     rb_define_alias(cWin32API,  "Call", "call");
rb_define_alias  1474 ext/curses/curses.c     rb_define_alias(mCurses, "crmode", "cbreak");
rb_define_alias  1475 ext/curses/curses.c     rb_define_alias(mCurses, "nocrmode", "nocbreak");
rb_define_alias  1163 ext/openssl/ossl_asn1.c     rb_define_alias(cASN1ObjectId, "short_name", "sn");
rb_define_alias  1164 ext/openssl/ossl_asn1.c     rb_define_alias(cASN1ObjectId, "long_name", "ln");
rb_define_alias   646 ext/openssl/ossl_bn.c     rb_define_alias(cBN, "<=>", "cmp");
rb_define_alias   649 ext/openssl/ossl_bn.c     rb_define_alias(cBN, "==", "eql?");
rb_define_alias   650 ext/openssl/ossl_bn.c     rb_define_alias(cBN, "===", "eql?");
rb_define_alias   693 ext/openssl/ossl_bn.c     rb_define_alias(cBN, "to_int", "to_i");
rb_define_alias   445 ext/openssl/ossl_config.c     rb_define_alias(CLASS_OF(cConfig), "load", "new");
rb_define_alias   284 ext/openssl/ossl_digest.c     rb_define_alias(cDigest, "inspect", "hexdigest");
rb_define_alias   285 ext/openssl/ossl_digest.c     rb_define_alias(cDigest, "to_s", "hexdigest");
rb_define_alias   288 ext/openssl/ossl_digest.c     rb_define_alias(cDigest, "<<", "update");
rb_define_alias   206 ext/openssl/ossl_hmac.c     rb_define_alias(cHMAC, "<<", "update");
rb_define_alias   209 ext/openssl/ossl_hmac.c     rb_define_alias(cHMAC, "inspect", "hexdigest");
rb_define_alias   210 ext/openssl/ossl_hmac.c     rb_define_alias(cHMAC, "to_s", "hexdigest");
rb_define_alias   247 ext/openssl/ossl_ns_spki.c     rb_define_alias(cSPKI, "to_s", "to_pem");
rb_define_alias   958 ext/openssl/ossl_pkcs7.c     rb_define_alias(cPKCS7,  "data=", "add_data");
rb_define_alias   962 ext/openssl/ossl_pkcs7.c     rb_define_alias(cPKCS7,  "to_s", "to_pem");
rb_define_alias   970 ext/openssl/ossl_pkcs7.c     rb_define_alias(cPKCS7Signer, "name", "issuer");
rb_define_alias   429 ext/openssl/ossl_pkey_dh.c     rb_define_alias(cDH, "to_pem", "export");
rb_define_alias   430 ext/openssl/ossl_pkey_dh.c     rb_define_alias(cDH, "to_s", "export");
rb_define_alias   392 ext/openssl/ossl_pkey_dsa.c     rb_define_alias(cDSA, "to_pem", "export");
rb_define_alias   393 ext/openssl/ossl_pkey_dsa.c     rb_define_alias(cDSA, "to_s", "export");
rb_define_alias   473 ext/openssl/ossl_pkey_rsa.c     rb_define_alias(cRSA, "to_pem", "export");
rb_define_alias   474 ext/openssl/ossl_pkey_rsa.c     rb_define_alias(cRSA, "to_s", "export");
rb_define_alias   881 ext/openssl/ossl_ssl.c     rb_define_alias(cSSLSocket, "to_io", "io");
rb_define_alias   646 ext/openssl/ossl_x509cert.c     rb_define_alias(cX509Cert, "to_s", "to_pem");
rb_define_alias   529 ext/openssl/ossl_x509crl.c     rb_define_alias(cX509CRL, "to_s", "to_pem");
rb_define_alias   320 ext/openssl/ossl_x509name.c     rb_define_alias(cX509Name, "<=>", "cmp");
rb_define_alias   451 ext/openssl/ossl_x509req.c     rb_define_alias(cX509Req, "to_s", "to_pem");
rb_define_alias  6959 ext/win32ole/win32ole.c     rb_define_alias(cWIN32OLE, "ole_method_help", "ole_method");
rb_define_alias  6961 ext/win32ole/win32ole.c     rb_define_alias(cWIN32OLE, "ole_obj_help", "ole_type");
rb_define_alias  7008 ext/win32ole/win32ole.c     rb_define_alias(cWIN32OLE_TYPELIB, "to_s", "name");
rb_define_alias  7021 ext/win32ole/win32ole.c     rb_define_alias(cWIN32OLE_TYPE, "to_s", "name");
rb_define_alias  7043 ext/win32ole/win32ole.c     rb_define_alias(cWIN32OLE_VARIABLE, "to_s", "name");
rb_define_alias  7066 ext/win32ole/win32ole.c     rb_define_alias(cWIN32OLE_METHOD, "to_s", "name");
rb_define_alias  7077 ext/win32ole/win32ole.c     rb_define_alias(cWIN32OLE_PARAM, "to_s", "name");
rb_define_alias  5513 io.c               rb_define_alias(rb_cIO, "to_i", "fileno");
rb_define_alias  3729 process.c          rb_define_alias(rb_mProcUID, "eid=", "grant_privilege");
rb_define_alias  3730 process.c          rb_define_alias(rb_mProcGID, "eid=", "grant_privilege");
rb_define_alias   522 ruby.h         void rb_define_alias(VALUE,const char*,const char*);


rb_define_alloc_func

rb_define_alloc_func 2844 array.c            rb_define_alloc_func(rb_cArray, ary_alloc);
rb_define_alloc_func 1805 dir.c              rb_define_alloc_func(rb_cDir, dir_s_alloc);
rb_define_alloc_func  383 enumerator.c       rb_define_alloc_func(rb_cEnumerator, enumerator_allocate);
rb_define_alloc_func 12887 eval.c             rb_define_alloc_func(cThGroup, thgroup_s_alloc);
rb_define_alloc_func 1530 ext/curses/curses.c     rb_define_alloc_func(cWindow, window_s_allocate);
rb_define_alloc_func  731 ext/dbm/dbm.c      rb_define_alloc_func(rb_cDBM, fdbm_alloc);
rb_define_alloc_func  257 ext/digest/digest.c     rb_define_alloc_func(cDigest_Base, rb_digest_base_alloc);
rb_define_alloc_func  496 ext/dl/cfunc.c     rb_define_alloc_func(rb_cDLCFunc, rb_dlcfunc_s_allocate);
rb_define_alloc_func  455 ext/dl/cptr.c      rb_define_alloc_func(rb_cDLCPtr, rb_dlptr_s_allocate);
rb_define_alloc_func  219 ext/dl/handle.c     rb_define_alloc_func(rb_cDLHandle, rb_dlhandle_s_allocate);
rb_define_alloc_func  921 ext/gdbm/gdbm.c     rb_define_alloc_func(rb_cGDBM, fgdbm_s_alloc);
rb_define_alloc_func 1048 ext/iconv/iconv.c     rb_define_alloc_func(rb_cIconv, iconv_s_allocate);
rb_define_alloc_func  611 ext/openssl/ossl_bn.c     rb_define_alloc_func(cBN, ossl_bn_alloc);
rb_define_alloc_func  353 ext/openssl/ossl_cipher.c     rb_define_alloc_func(cCipher, ossl_cipher_alloc);
rb_define_alloc_func  446 ext/openssl/ossl_config.c     rb_define_alloc_func(cConfig, ossl_config_s_alloc);
rb_define_alloc_func  273 ext/openssl/ossl_digest.c     rb_define_alloc_func(cDigest, ossl_digest_alloc);
rb_define_alloc_func  350 ext/openssl/ossl_engine.c     rb_define_alloc_func(cEngine, ossl_engine_s_alloc);
rb_define_alloc_func  198 ext/openssl/ossl_hmac.c     rb_define_alloc_func(cHMAC, ossl_hmac_alloc);
rb_define_alloc_func  242 ext/openssl/ossl_ns_spki.c     rb_define_alloc_func(cSPKI, ossl_spki_alloc);
rb_define_alloc_func  687 ext/openssl/ossl_ocsp.c     rb_define_alloc_func(cOCSPReq, ossl_ocspreq_alloc);
rb_define_alloc_func  699 ext/openssl/ossl_ocsp.c     rb_define_alloc_func(cOCSPRes, ossl_ocspres_alloc);
rb_define_alloc_func  707 ext/openssl/ossl_ocsp.c     rb_define_alloc_func(cOCSPBasicRes, ossl_ocspbres_alloc);
rb_define_alloc_func  717 ext/openssl/ossl_ocsp.c     rb_define_alloc_func(cOCSPCertId, ossl_ocspcid_alloc);
rb_define_alloc_func  148 ext/openssl/ossl_pkcs12.c     rb_define_alloc_func(cPKCS12, ossl_pkcs12_s_allocate);
rb_define_alloc_func  938 ext/openssl/ossl_pkcs7.c     rb_define_alloc_func(cPKCS7, ossl_pkcs7_alloc);
rb_define_alloc_func  967 ext/openssl/ossl_pkcs7.c     rb_define_alloc_func(cPKCS7Signer, ossl_pkcs7si_alloc);
rb_define_alloc_func  975 ext/openssl/ossl_pkcs7.c     rb_define_alloc_func(cPKCS7Recipient, ossl_pkcs7ri_alloc);
rb_define_alloc_func  217 ext/openssl/ossl_pkey.c     rb_define_alloc_func(cPKey, ossl_pkey_alloc);
rb_define_alloc_func  867 ext/openssl/ossl_ssl.c     rb_define_alloc_func(cSSLContext, ossl_sslctx_s_alloc);
rb_define_alloc_func  876 ext/openssl/ossl_ssl.c     rb_define_alloc_func(cSSLSocket, ossl_ssl_s_alloc);
rb_define_alloc_func  242 ext/openssl/ossl_x509attr.c     rb_define_alloc_func(cX509Attr, ossl_x509attr_alloc);
rb_define_alloc_func  640 ext/openssl/ossl_x509cert.c     rb_define_alloc_func(cX509Cert, ossl_x509_alloc);
rb_define_alloc_func  509 ext/openssl/ossl_x509crl.c     rb_define_alloc_func(cX509CRL, ossl_x509crl_alloc);
rb_define_alloc_func  430 ext/openssl/ossl_x509ext.c     rb_define_alloc_func(cX509ExtFactory, ossl_x509extfactory_alloc);
rb_define_alloc_func  447 ext/openssl/ossl_x509ext.c     rb_define_alloc_func(cX509Ext, ossl_x509ext_alloc);
rb_define_alloc_func  314 ext/openssl/ossl_x509name.c     rb_define_alloc_func(cX509Name, ossl_x509name_alloc);
rb_define_alloc_func  445 ext/openssl/ossl_x509req.c     rb_define_alloc_func(cX509Req, ossl_x509req_alloc);
rb_define_alloc_func  218 ext/openssl/ossl_x509revoked.c     rb_define_alloc_func(cX509Rev, ossl_x509revoked_alloc);
rb_define_alloc_func  581 ext/openssl/ossl_x509store.c     rb_define_alloc_func(cX509Store, ossl_x509store_alloc);
rb_define_alloc_func  597 ext/openssl/ossl_x509store.c     rb_define_alloc_func(cX509StoreContext, ossl_x509stctx_alloc);
rb_define_alloc_func  712 ext/sdbm/init.c     rb_define_alloc_func(rb_cDBM, fsdbm_alloc);
rb_define_alloc_func 1233 ext/stringio/stringio.c     rb_define_alloc_func(StringIO, strio_s_allocate);
rb_define_alloc_func 1312 ext/strscan/strscan.c     rb_define_alloc_func(StringScanner, strscan_s_allocate);
rb_define_alloc_func 2244 ext/syck/rubyext.c     rb_define_alloc_func( cParser, syck_parser_s_alloc );
rb_define_alloc_func 2270 ext/syck/rubyext.c     rb_define_alloc_func( cScalar, syck_scalar_alloc );
rb_define_alloc_func 2276 ext/syck/rubyext.c     rb_define_alloc_func( cSeq, syck_seq_alloc );
rb_define_alloc_func 2282 ext/syck/rubyext.c     rb_define_alloc_func( cMap, syck_map_alloc );
rb_define_alloc_func 2348 ext/syck/rubyext.c     rb_define_alloc_func( cEmitter, syck_emitter_s_alloc );
rb_define_alloc_func 7848 ext/tk/tcltklib.c     rb_define_alloc_func(ip, ip_alloc);
rb_define_alloc_func 6923 ext/win32ole/win32ole.c     rb_define_alloc_func(cWIN32OLE, fole_s_allocate);
rb_define_alloc_func 7014 ext/win32ole/win32ole.c     rb_define_alloc_func(cWIN32OLE_TYPE, foletype_s_allocate);
rb_define_alloc_func 7046 ext/win32ole/win32ole.c     rb_define_alloc_func(cWIN32OLE_METHOD, folemethod_s_allocate);
rb_define_alloc_func 7081 ext/win32ole/win32ole.c     rb_define_alloc_func(cWIN32OLE_EVENT, fev_s_allocate);
rb_define_alloc_func 7089 ext/win32ole/win32ole.c     rb_define_alloc_func(cWIN32OLE_VARIANT, folevariant_s_allocate);
rb_define_alloc_func 3464 ext/zlib/zlib.c     rb_define_alloc_func(cDeflate, rb_deflate_s_allocate);
rb_define_alloc_func 3475 ext/zlib/zlib.c     rb_define_alloc_func(cInflate, rb_inflate_s_allocate);
rb_define_alloc_func 3548 ext/zlib/zlib.c     rb_define_alloc_func(cGzipWriter, rb_gzwriter_s_allocate);
rb_define_alloc_func 3559 ext/zlib/zlib.c     rb_define_alloc_func(cGzipReader, rb_gzreader_s_allocate);
rb_define_alloc_func 4367 file.c             rb_define_alloc_func(rb_cStat,  rb_stat_s_alloc);
rb_define_alloc_func 2285 hash.c             rb_define_alloc_func(rb_cHash, hash_alloc);
rb_define_alloc_func  208 intern.h       void rb_define_alloc_func(VALUE, VALUE (*)(VALUE));
rb_define_alloc_func 5469 io.c               rb_define_alloc_func(rb_cIO, io_alloc);
rb_define_alloc_func 2380 object.c           rb_define_alloc_func(rb_cObject, rb_class_allocate_instance);
rb_define_alloc_func 2490 object.c           rb_define_alloc_func(rb_cModule, rb_module_s_alloc);
rb_define_alloc_func 2520 object.c           rb_define_alloc_func(rb_cClass, rb_class_s_alloc);
rb_define_alloc_func 9282 parse.y            rb_define_alloc_func(Ripper, ripper_s_allocate);
rb_define_alloc_func 2229 re.c               rb_define_alloc_func(rb_cRegexp, rb_reg_s_alloc);
rb_define_alloc_func 2260 re.c               rb_define_alloc_func(rb_cMatch, match_alloc);
rb_define_alloc_func 4189 string.c           rb_define_alloc_func(rb_cString, str_alloc);
rb_define_alloc_func  197 struct.c           rb_define_alloc_func(nstr, struct_alloc);
rb_define_alloc_func 2069 time.c             rb_define_alloc_func(rb_cTime, time_s_alloc);


rb_define_attr

rb_define_attr   2218 ext/syck/rubyext.c     rb_define_attr( cResolver, "tags", 1, 1 );
rb_define_attr   2241 ext/syck/rubyext.c     rb_define_attr( cParser, "options", 1, 1 );
rb_define_attr   2242 ext/syck/rubyext.c     rb_define_attr( cParser, "resolver", 1, 1 );
rb_define_attr   2243 ext/syck/rubyext.c     rb_define_attr( cParser, "input", 1, 1 );
rb_define_attr   2257 ext/syck/rubyext.c     rb_define_attr( cNode, "emitter", 1, 1 );
rb_define_attr   2258 ext/syck/rubyext.c     rb_define_attr( cNode, "resolver", 1, 1 );
rb_define_attr   2259 ext/syck/rubyext.c     rb_define_attr( cNode, "kind", 1, 0 );
rb_define_attr   2260 ext/syck/rubyext.c     rb_define_attr( cNode, "type_id", 1, 0 );
rb_define_attr   2261 ext/syck/rubyext.c     rb_define_attr( cNode, "value", 1, 0 );
rb_define_attr   2271 ext/syck/rubyext.c     rb_define_attr( cNode, "value", 1, 0 );
rb_define_attr   2292 ext/syck/rubyext.c     rb_define_attr( cPrivateType, "type_id", 1, 1 );
rb_define_attr   2293 ext/syck/rubyext.c     rb_define_attr( cPrivateType, "value", 1, 1 );
rb_define_attr   2300 ext/syck/rubyext.c     rb_define_attr( cDomainType, "domain", 1, 1 );
rb_define_attr   2301 ext/syck/rubyext.c     rb_define_attr( cDomainType, "type_id", 1, 1 );
rb_define_attr   2302 ext/syck/rubyext.c     rb_define_attr( cDomainType, "value", 1, 1 );
rb_define_attr   2309 ext/syck/rubyext.c     rb_define_attr( cYObject, "class", 1, 1 );
rb_define_attr   2310 ext/syck/rubyext.c     rb_define_attr( cYObject, "ivars", 1, 1 );
rb_define_attr   2318 ext/syck/rubyext.c     rb_define_attr( cBadAlias, "name", 1, 1 );
rb_define_attr   2337 ext/syck/rubyext.c     rb_define_attr( cOut, "emitter", 1, 1 );
rb_define_attr   2347 ext/syck/rubyext.c     rb_define_attr( cEmitter, "level", 1, 1 );
rb_define_attr    523 ruby.h         void rb_define_attr(VALUE,const char*,int,int);


rb_define_class

rb_define_class  2841 array.c            rb_cArray  = rb_define_class("Array", rb_cObject);
rb_define_class  2927 array.c            rb_cValues  = rb_define_class("Values", rb_cArray);
rb_define_class  1977 bignum.c           rb_cBignum = rb_define_class("Bignum", rb_cInteger);
rb_define_class  1801 dir.c              rb_cDir = rb_define_class("Dir", rb_cObject);
rb_define_class   938 error.c            rb_eException   = rb_define_class("Exception", rb_cObject);
rb_define_class   949 error.c            rb_eSystemExit  = rb_define_class("SystemExit", rb_eException);
rb_define_class   954 error.c            rb_eFatal  	    = rb_define_class("fatal", rb_eException);
rb_define_class   955 error.c            rb_eSignal      = rb_define_class("SignalException", rb_eException);
rb_define_class   956 error.c            rb_eInterrupt   = rb_define_class("Interrupt", rb_eSignal);
rb_define_class   958 error.c            rb_eStandardError = rb_define_class("StandardError", rb_eException);
rb_define_class   959 error.c            rb_eTypeError     = rb_define_class("TypeError", rb_eStandardError);
rb_define_class   960 error.c            rb_eArgError      = rb_define_class("ArgumentError", rb_eStandardError);
rb_define_class   961 error.c            rb_eIndexError    = rb_define_class("IndexError", rb_eStandardError);
rb_define_class   962 error.c            rb_eKeyError      = rb_define_class("KeyError", rb_eIndexError);
rb_define_class   963 error.c            rb_eRangeError    = rb_define_class("RangeError", rb_eStandardError);
rb_define_class   964 error.c            rb_eNameError     = rb_define_class("NameError", rb_eStandardError);
rb_define_class   974 error.c            rb_eNoMethodError = rb_define_class("NoMethodError", rb_eNameError);
rb_define_class   978 error.c            rb_eScriptError = rb_define_class("ScriptError", rb_eException);
rb_define_class   979 error.c            rb_eSyntaxError = rb_define_class("SyntaxError", rb_eScriptError);
rb_define_class   980 error.c            rb_eLoadError   = rb_define_class("LoadError", rb_eScriptError);
rb_define_class   981 error.c            rb_eNotImpError = rb_define_class("NotImplementedError", rb_eScriptError);
rb_define_class   983 error.c            rb_eRuntimeError = rb_define_class("RuntimeError", rb_eStandardError);
rb_define_class   984 error.c            rb_eSecurityError = rb_define_class("SecurityError", rb_eStandardError);
rb_define_class   985 error.c            rb_eNoMemError = rb_define_class("NoMemoryError", rb_eException);
rb_define_class   988 error.c            rb_eSystemCallError = rb_define_class("SystemCallError", rb_eStandardError);
rb_define_class  9381 eval.c             rb_eLocalJumpError = rb_define_class("LocalJumpError", rb_eStandardError);
rb_define_class  9388 eval.c             rb_eSysStackError = rb_define_class("SystemStackError", rb_eException);
rb_define_class  9393 eval.c             rb_cProc = rb_define_class("Proc", rb_cObject);
rb_define_class  9412 eval.c             rb_cMethod = rb_define_class("Method", rb_cObject);
rb_define_class  9428 eval.c             rb_cUnboundMethod = rb_define_class("UnboundMethod", rb_cObject);
rb_define_class  9480 eval.c             rb_cBinding = rb_define_class("Binding", rb_cObject);
rb_define_class  12828 eval.c             rb_eThreadError = rb_define_class("ThreadError", rb_eStandardError);
rb_define_class  12829 eval.c             rb_cThread = rb_define_class("Thread", rb_cObject);
rb_define_class  12878 eval.c             rb_cCont = rb_define_class("Continuation", rb_cObject);
rb_define_class  12886 eval.c             cThGroup = rb_define_class("ThreadGroup", rb_cObject);
rb_define_class   211 ext/Win32API/Win32API.c     VALUE cWin32API = rb_define_class("Win32API", rb_cObject);
rb_define_class  1252 ext/bigdecimal/bigdecimal.c     rb_cBigDecimal = rb_define_class("BigDecimal",rb_cNumeric);
rb_define_class   727 ext/dbm/dbm.c      rb_cDBM = rb_define_class("DBM", rb_cObject);
rb_define_class   728 ext/dbm/dbm.c      rb_eDBMError = rb_define_class("DBMError", rb_eStandardError);
rb_define_class   916 ext/gdbm/gdbm.c     rb_cGDBM = rb_define_class("GDBM", rb_cObject);
rb_define_class   917 ext/gdbm/gdbm.c     rb_eGDBMError = rb_define_class("GDBMError", rb_eStandardError);
rb_define_class   918 ext/gdbm/gdbm.c     rb_eGDBMFatalError = rb_define_class("GDBMFatalError", rb_eException);
rb_define_class  1046 ext/iconv/iconv.c     VALUE rb_cIconv = rb_define_class("Iconv", rb_cData);
rb_define_class   708 ext/sdbm/init.c     rb_cDBM = rb_define_class("SDBM", rb_cObject);
rb_define_class   709 ext/sdbm/init.c     rb_eDBMError = rb_define_class("SDBMError", rb_eStandardError);
rb_define_class  3145 ext/socket/socket.c     rb_eSocket = rb_define_class("SocketError", rb_eStandardError);
rb_define_class  3147 ext/socket/socket.c     rb_cBasicSocket = rb_define_class("BasicSocket", rb_cIO);
rb_define_class  3168 ext/socket/socket.c     rb_cIPSocket = rb_define_class("IPSocket", rb_cBasicSocket);
rb_define_class  3175 ext/socket/socket.c     rb_cTCPSocket = rb_define_class("TCPSocket", rb_cIPSocket);
rb_define_class  3181 ext/socket/socket.c     rb_cSOCKSSocket = rb_define_class("SOCKSSocket", rb_cTCPSocket);
rb_define_class  3189 ext/socket/socket.c     rb_cTCPServer = rb_define_class("TCPServer", rb_cTCPSocket);
rb_define_class  3196 ext/socket/socket.c     rb_cUDPSocket = rb_define_class("UDPSocket", rb_cIPSocket);
rb_define_class  3204 ext/socket/socket.c     rb_cUNIXSocket = rb_define_class("UNIXSocket", rb_cBasicSocket);
rb_define_class  3216 ext/socket/socket.c     rb_cUNIXServer = rb_define_class("UNIXServer", rb_cUNIXSocket);
rb_define_class  3224 ext/socket/socket.c     rb_cSocket = rb_define_class("Socket", rb_cBasicSocket);
rb_define_class  1230 ext/stringio/stringio.c     VALUE StringIO = rb_define_class("StringIO", rb_cData);
rb_define_class  1300 ext/strscan/strscan.c     StringScanner = rb_define_class("StringScanner", rb_cObject);
rb_define_class  7699 ext/tk/tcltklib.c     VALUE ip = rb_define_class("TclTkIp", rb_cObject);
rb_define_class  7760 ext/tk/tcltklib.c     eTkCallbackReturn = rb_define_class("TkCallbackReturn", rb_eStandardError);
rb_define_class  7761 ext/tk/tcltklib.c     eTkCallbackBreak = rb_define_class("TkCallbackBreak", rb_eStandardError);
rb_define_class  7762 ext/tk/tcltklib.c     eTkCallbackContinue = rb_define_class("TkCallbackContinue",
rb_define_class  7769 ext/tk/tcltklib.c     eTkLocalJumpError = rb_define_class("TkLocalJumpError", eLocalJumpError);
rb_define_class  7771 ext/tk/tcltklib.c     eTkCallbackRetry  = rb_define_class("TkCallbackRetry", eTkLocalJumpError);
rb_define_class  7772 ext/tk/tcltklib.c     eTkCallbackRedo   = rb_define_class("TkCallbackRedo",  eTkLocalJumpError);
rb_define_class  7773 ext/tk/tcltklib.c     eTkCallbackThrow  = rb_define_class("TkCallbackThrow", eTkLocalJumpError);
rb_define_class  1515 ext/tk/tkutil/tkutil.c     VALUE cTK = rb_define_class("TkKernel", rb_cObject);
rb_define_class  1569 ext/tk/tkutil/tkutil.c     cTkCallbackEntry = rb_define_class("TkCallbackEntry", cTK);
rb_define_class  1574 ext/tk/tkutil/tkutil.c     cTkObject = rb_define_class("TkObject", cTK);
rb_define_class  6921 ext/win32ole/win32ole.c     cWIN32OLE = rb_define_class("WIN32OLE", rb_cObject);
rb_define_class  6998 ext/win32ole/win32ole.c     cWIN32OLE_TYPELIB = rb_define_class("WIN32OLE_TYPELIB", rb_cObject);
rb_define_class  7010 ext/win32ole/win32ole.c     cWIN32OLE_TYPE = rb_define_class("WIN32OLE_TYPE", rb_cObject);
rb_define_class  7035 ext/win32ole/win32ole.c     cWIN32OLE_VARIABLE = rb_define_class("WIN32OLE_VARIABLE", rb_cObject);
rb_define_class  7045 ext/win32ole/win32ole.c     cWIN32OLE_METHOD = rb_define_class("WIN32OLE_METHOD", rb_cObject);
rb_define_class  7068 ext/win32ole/win32ole.c     cWIN32OLE_PARAM = rb_define_class("WIN32OLE_PARAM", rb_cObject);
rb_define_class  7079 ext/win32ole/win32ole.c     cWIN32OLE_EVENT = rb_define_class("WIN32OLE_EVENT", rb_cObject);
rb_define_class  7088 ext/win32ole/win32ole.c     cWIN32OLE_VARIANT = rb_define_class("WIN32OLE_VARIANT", rb_cObject);
rb_define_class  7093 ext/win32ole/win32ole.c     eWIN32OLE_RUNTIME_ERROR = rb_define_class("WIN32OLERuntimeError", rb_eRuntimeError);
rb_define_class  4268 file.c             rb_cFile = rb_define_class("File", rb_cIO);
rb_define_class  2281 hash.c             rb_cHash = rb_define_class("Hash", rb_cObject);
rb_define_class  5439 io.c               rb_eIOError = rb_define_class("IOError", rb_eStandardError);
rb_define_class  5440 io.c               rb_eEOFError = rb_define_class("EOFError", rb_eIOError);
rb_define_class  5466 io.c               rb_cIO = rb_define_class("IO", rb_cObject);
rb_define_class  2806 numeric.c          rb_eZeroDivError = rb_define_class("ZeroDivisionError", rb_eStandardError);
rb_define_class  2807 numeric.c          rb_eFloatDomainError = rb_define_class("FloatDomainError", rb_eRangeError);
rb_define_class  2808 numeric.c          rb_cNumeric = rb_define_class("Numeric", rb_cObject);
rb_define_class  2838 numeric.c          rb_cInteger = rb_define_class("Integer", rb_cNumeric);
rb_define_class  2857 numeric.c          rb_cFixnum = rb_define_class("Fixnum", rb_cInteger);
rb_define_class  2901 numeric.c          rb_cFloat  = rb_define_class("Float", rb_cNumeric);
rb_define_class  2443 object.c           rb_cNilClass = rb_define_class("NilClass", rb_cObject);
rb_define_class  2458 object.c           rb_cSymbol = rb_define_class("Symbol", rb_cObject);
rb_define_class  2524 object.c           rb_cData = rb_define_class("Data", rb_cObject);
rb_define_class  2531 object.c           rb_cTrueClass = rb_define_class("TrueClass", rb_cObject);
rb_define_class  2540 object.c           rb_cFalseClass = rb_define_class("FalseClass", rb_cObject);
rb_define_class  9278 parse.y            Ripper = rb_define_class("Ripper", rb_cObject);
rb_define_class   731 range.c            rb_cRange = rb_define_class("Range", rb_cObject);
rb_define_class  2201 re.c               rb_eRegexpError = rb_define_class("RegexpError", rb_eStandardError);
rb_define_class  2228 re.c               rb_cRegexp = rb_define_class("Regexp", rb_cObject);
rb_define_class  2258 re.c               rb_cMatch  = rb_define_class("MatchData", rb_cObject);
rb_define_class   501 ruby.h         VALUE rb_define_class(const char*,VALUE);
rb_define_class  4186 string.c           rb_cString  = rb_define_class("String", rb_cObject);
rb_define_class   826 struct.c           rb_cStruct = rb_define_class("Struct", rb_cObject);
rb_define_class  2066 time.c             rb_cTime = rb_define_class("Time", rb_cObject);


rb_define_class_id

rb_define_class_id  213 class.c            klass = rb_define_class_id(id, super);
rb_define_class_id  243 class.c            klass = rb_define_class_id(id, super);
rb_define_class_id 3864 eval.c         		klass = rb_define_class_id(cname, super);
rb_define_class_id  121 intern.h       VALUE rb_define_class_id(ID, VALUE);


rb_define_class_under

rb_define_class_under  380 enumerator.c       rb_cEnumerator = rb_define_class_under(rb_mEnumerable, "Enumerator", rb_cObject);
rb_define_class_under  790 error.c        	error = rb_define_class_under(rb_mErrno, name, rb_eSystemCallError);
rb_define_class_under  968 error.c            rb_cNameErrorMesg = rb_define_class_under(rb_eNameError, "message", rb_cData);
rb_define_class_under 1451 ext/curses/curses.c     cMouseEvent = rb_define_class_under(mCurses,"MouseEvent",rb_cObject);
rb_define_class_under 1529 ext/curses/curses.c     cWindow = rb_define_class_under(mCurses, "Window", rb_cData);
rb_define_class_under  255 ext/digest/digest.c     cDigest_Base = rb_define_class_under(mDigest, "Base", rb_cObject);
rb_define_class_under   31 ext/digest/md5/md5init.c     cDigest_MD5 = rb_define_class_under(mDigest, "MD5", cDigest_Base);
rb_define_class_under   32 ext/digest/rmd160/rmd160init.c     cDigest_RMD160 = rb_define_class_under(mDigest, "RMD160", cDigest_Base);
rb_define_class_under   31 ext/digest/sha1/sha1init.c     cDigest_SHA1 = rb_define_class_under(mDigest, "SHA1", cDigest_Base);
rb_define_class_under   41 ext/digest/sha2/sha2init.c     cDigest_SHA##bitlen = rb_define_class_under(mDigest, "SHA" #bitlen, cDigest_Base); \
rb_define_class_under  495 ext/dl/cfunc.c     rb_cDLCFunc = rb_define_class_under(rb_mDL, "CFunc", rb_cObject);
rb_define_class_under  454 ext/dl/cptr.c      rb_cDLCPtr = rb_define_class_under(rb_mDL, "CPtr", rb_cObject);
rb_define_class_under   90 ext/dl/dl.c        rb_eDLError = rb_define_class_under(rb_mDL, "DLError", rb_eStandardError);
rb_define_class_under   91 ext/dl/dl.c        rb_eDLTypeError = rb_define_class_under(rb_mDL, "DLTypeError", rb_eDLError);
rb_define_class_under  218 ext/dl/handle.c     rb_cDLHandle = rb_define_class_under(rb_mDL, "Handle", rb_cObject);
rb_define_class_under 1070 ext/iconv/iconv.c     rb_eIconvInvalidEncoding = rb_define_class_under(rb_cIconv, "InvalidEncoding", rb_eArgError);
rb_define_class_under 1071 ext/iconv/iconv.c     rb_eIconvIllegalSeq = rb_define_class_under(rb_cIconv, "IllegalSequence", rb_eArgError);
rb_define_class_under 1072 ext/iconv/iconv.c     rb_eIconvInvalidChar = rb_define_class_under(rb_cIconv, "InvalidCharacter", rb_eArgError);
rb_define_class_under 1073 ext/iconv/iconv.c     rb_eIconvOutOfRange = rb_define_class_under(rb_cIconv, "OutOfRange", rb_eRuntimeError);
rb_define_class_under 1074 ext/iconv/iconv.c     rb_eIconvBrokenLibrary = rb_define_class_under(rb_cIconv, "BrokenLibrary", rb_eRuntimeError);
rb_define_class_under  425 ext/openssl/ossl.c     eOSSLError = rb_define_class_under(mOSSL,"OpenSSLError",rb_eStandardError);
rb_define_class_under 1098 ext/openssl/ossl_asn1.c     eASN1Error = rb_define_class_under(mASN1, "ASN1Error", eOSSLError);
rb_define_class_under 1110 ext/openssl/ossl_asn1.c     cASN1Data = rb_define_class_under(mASN1, "ASN1Data", rb_cObject);
rb_define_class_under 1117 ext/openssl/ossl_asn1.c     cASN1Primitive = rb_define_class_under(mASN1, "Primitive", cASN1Data);
rb_define_class_under 1122 ext/openssl/ossl_asn1.c     cASN1Constructive = rb_define_class_under(mASN1,"Constructive", cASN1Data);
rb_define_class_under 1131 ext/openssl/ossl_asn1.c     cASN1##name = rb_define_class_under(mASN1, #name, cASN1##super);\
rb_define_class_under  607 ext/openssl/ossl_bn.c     eBNError = rb_define_class_under(mOSSL, "BNError", eOSSLError);
rb_define_class_under  609 ext/openssl/ossl_bn.c     cBN = rb_define_class_under(mOSSL, "BN", rb_cObject);
rb_define_class_under  350 ext/openssl/ossl_cipher.c     eCipherError = rb_define_class_under(mOSSL, "CipherError", eOSSLError);
rb_define_class_under  351 ext/openssl/ossl_cipher.c     cCipher = rb_define_class_under(mCipher, "Cipher", rb_cObject);
rb_define_class_under  438 ext/openssl/ossl_config.c     eConfigError = rb_define_class_under(mOSSL, "ConfigError", eOSSLError);
rb_define_class_under  439 ext/openssl/ossl_config.c     cConfig = rb_define_class_under(mOSSL, "Config", rb_cObject);
rb_define_class_under  269 ext/openssl/ossl_digest.c     eDigestError = rb_define_class_under(mDigest, "DigestError", eOSSLError);
rb_define_class_under  271 ext/openssl/ossl_digest.c     cDigest = rb_define_class_under(mDigest, "Digest", rb_cObject);
rb_define_class_under  347 ext/openssl/ossl_engine.c     cEngine = rb_define_class_under(mOSSL, "Engine", rb_cObject);
rb_define_class_under  348 ext/openssl/ossl_engine.c     eEngineError = rb_define_class_under(cEngine, "EngineError", eOSSLError);
rb_define_class_under  194 ext/openssl/ossl_hmac.c     eHMACError = rb_define_class_under(mOSSL, "HMACError", eOSSLError);
rb_define_class_under  196 ext/openssl/ossl_hmac.c     cHMAC = rb_define_class_under(mOSSL, "HMAC", rb_cObject);
rb_define_class_under  238 ext/openssl/ossl_ns_spki.c     eSPKIError = rb_define_class_under(mNetscape, "SPKIError", eOSSLError);
rb_define_class_under  240 ext/openssl/ossl_ns_spki.c     cSPKI = rb_define_class_under(mNetscape, "SPKI", rb_cObject);
rb_define_class_under  684 ext/openssl/ossl_ocsp.c     eOCSPError = rb_define_class_under(mOCSP, "OCSPError", rb_cObject);
rb_define_class_under  686 ext/openssl/ossl_ocsp.c     cOCSPReq = rb_define_class_under(mOCSP, "Request", rb_cObject);
rb_define_class_under  697 ext/openssl/ossl_ocsp.c     cOCSPRes = rb_define_class_under(mOCSP, "Response", rb_cObject);
rb_define_class_under  706 ext/openssl/ossl_ocsp.c     cOCSPBasicRes = rb_define_class_under(mOCSP, "BasicResponse", rb_cObject);
rb_define_class_under  716 ext/openssl/ossl_ocsp.c     cOCSPCertId = rb_define_class_under(mOCSP, "CertificateId", rb_cObject);
rb_define_class_under  144 ext/openssl/ossl_pkcs12.c     cPKCS12 = rb_define_class_under(mPKCS12, "PKCS12", rb_cObject);
rb_define_class_under  145 ext/openssl/ossl_pkcs12.c     ePKCS12Error = rb_define_class_under(mPKCS12, "PKCS12Error", eOSSLError);
rb_define_class_under  929 ext/openssl/ossl_pkcs7.c     ePKCS7Error = rb_define_class_under(mPKCS7, "PKCS7Error", eOSSLError);
rb_define_class_under  931 ext/openssl/ossl_pkcs7.c     cPKCS7 = rb_define_class_under(mPKCS7, "PKCS7", rb_cObject);
rb_define_class_under  965 ext/openssl/ossl_pkcs7.c     cPKCS7Signer = rb_define_class_under(mPKCS7, "SignerInfo", rb_cObject);
rb_define_class_under  974 ext/openssl/ossl_pkcs7.c     cPKCS7Recipient = rb_define_class_under(mPKCS7,"RecipientInfo",rb_cObject);
rb_define_class_under  213 ext/openssl/ossl_pkey.c     ePKeyError = rb_define_class_under(mPKey, "PKeyError", eOSSLError);
rb_define_class_under  215 ext/openssl/ossl_pkey.c     cPKey = rb_define_class_under(mPKey, "PKey", rb_cObject);
rb_define_class_under  421 ext/openssl/ossl_pkey_dh.c     eDHError = rb_define_class_under(mPKey, "DHError", ePKeyError);
rb_define_class_under  422 ext/openssl/ossl_pkey_dh.c     cDH = rb_define_class_under(mPKey, "DH", cPKey);
rb_define_class_under  381 ext/openssl/ossl_pkey_dsa.c     eDSAError = rb_define_class_under(mPKey, "DSAError", ePKeyError);
rb_define_class_under  383 ext/openssl/ossl_pkey_dsa.c     cDSA = rb_define_class_under(mPKey, "DSA", cPKey);
rb_define_class_under  462 ext/openssl/ossl_pkey_rsa.c     eRSAError = rb_define_class_under(mPKey, "RSAError", ePKeyError);
rb_define_class_under  464 ext/openssl/ossl_pkey_rsa.c     cRSA = rb_define_class_under(mPKey, "RSA", cPKey);
rb_define_class_under  120 ext/openssl/ossl_rand.c     eRandomError = rb_define_class_under(mRandom, "RandomError", eOSSLError);
rb_define_class_under  863 ext/openssl/ossl_ssl.c     eSSLError = rb_define_class_under(mSSL, "SSLError", eOSSLError);
rb_define_class_under  866 ext/openssl/ossl_ssl.c     cSSLContext = rb_define_class_under(mSSL, "SSLContext", rb_cObject);
rb_define_class_under  875 ext/openssl/ossl_ssl.c     cSSLSocket = rb_define_class_under(mSSL, "SSLSocket", rb_cObject);
rb_define_class_under  239 ext/openssl/ossl_x509attr.c     eX509AttrError = rb_define_class_under(mX509, "AttributeError", eOSSLError);
rb_define_class_under  241 ext/openssl/ossl_x509attr.c     cX509Attr = rb_define_class_under(mX509, "Attribute", rb_cObject);
rb_define_class_under  636 ext/openssl/ossl_x509cert.c     eX509CertError = rb_define_class_under(mX509, "CertificateError", eOSSLError);
rb_define_class_under  638 ext/openssl/ossl_x509cert.c     cX509Cert = rb_define_class_under(mX509, "Certificate", rb_cObject);
rb_define_class_under  505 ext/openssl/ossl_x509crl.c     eX509CRLError = rb_define_class_under(mX509, "CRLError", eOSSLError);
rb_define_class_under  507 ext/openssl/ossl_x509crl.c     cX509CRL = rb_define_class_under(mX509, "CRL", rb_cObject);
rb_define_class_under  426 ext/openssl/ossl_x509ext.c     eX509ExtError = rb_define_class_under(mX509, "ExtensionError", eOSSLError);
rb_define_class_under  428 ext/openssl/ossl_x509ext.c     cX509ExtFactory = rb_define_class_under(mX509, "ExtensionFactory", rb_cObject);
rb_define_class_under  446 ext/openssl/ossl_x509ext.c     cX509Ext = rb_define_class_under(mX509, "Extension", rb_cObject);
rb_define_class_under  311 ext/openssl/ossl_x509name.c     eX509NameError = rb_define_class_under(mX509, "NameError", eOSSLError);
rb_define_class_under  312 ext/openssl/ossl_x509name.c     cX509Name = rb_define_class_under(mX509, "Name", rb_cObject);
rb_define_class_under  441 ext/openssl/ossl_x509req.c     eX509ReqError = rb_define_class_under(mX509, "RequestError", eOSSLError);
rb_define_class_under  443 ext/openssl/ossl_x509req.c     cX509Req = rb_define_class_under(mX509, "Request", rb_cObject);
rb_define_class_under  214 ext/openssl/ossl_x509revoked.c     eX509RevError = rb_define_class_under(mX509, "RevokedError", eOSSLError);
rb_define_class_under  216 ext/openssl/ossl_x509revoked.c     cX509Rev = rb_define_class_under(mX509, "Revoked", rb_cObject);
rb_define_class_under  574 ext/openssl/ossl_x509store.c     eX509StoreError = rb_define_class_under(mX509, "StoreError", eOSSLError);
rb_define_class_under  576 ext/openssl/ossl_x509store.c     cX509Store = rb_define_class_under(mX509, "Store", rb_cObject);
rb_define_class_under  595 ext/openssl/ossl_x509store.c     cX509StoreContext = rb_define_class_under(mX509,"StoreContext",rb_cObject);
rb_define_class_under  481 ext/pty/pty.c      eChildExited = rb_define_class_under(cPTY,"ChildExited",rb_eRuntimeError);
rb_define_class_under  797 ext/racc/cparse/cparse.c         Parser = rb_define_class_under(Racc, "Parser", rb_cObject);
rb_define_class_under  806 ext/racc/cparse/cparse.c     CparseParams = rb_define_class_under(Racc, "CparseParams", rb_cObject);
rb_define_class_under 1301 ext/strscan/strscan.c     ScanError = rb_define_class_under(StringScanner, "Error", rb_eStandardError);
rb_define_class_under 2217 ext/syck/rubyext.c     cResolver = rb_define_class_under( rb_syck, "Resolver", rb_cObject );
rb_define_class_under 2240 ext/syck/rubyext.c     cParser = rb_define_class_under( rb_syck, "Parser", rb_cObject );
rb_define_class_under 2255 ext/syck/rubyext.c     cNode = rb_define_class_under( rb_syck, "Node", rb_cObject );
rb_define_class_under 2269 ext/syck/rubyext.c     cScalar = rb_define_class_under( rb_syck, "Scalar", cNode );
rb_define_class_under 2275 ext/syck/rubyext.c     cSeq = rb_define_class_under( rb_syck, "Seq", cNode );
rb_define_class_under 2281 ext/syck/rubyext.c     cMap = rb_define_class_under( rb_syck, "Map", cNode );
rb_define_class_under 2291 ext/syck/rubyext.c     cPrivateType = rb_define_class_under( rb_yaml, "PrivateType", rb_cObject );
rb_define_class_under 2299 ext/syck/rubyext.c     cDomainType = rb_define_class_under( rb_yaml, "DomainType", rb_cObject );
rb_define_class_under 2308 ext/syck/rubyext.c     cYObject = rb_define_class_under( rb_yaml, "Object", rb_cObject );
rb_define_class_under 2317 ext/syck/rubyext.c     cBadAlias = rb_define_class_under( rb_syck, "BadAlias", rb_cObject );
rb_define_class_under 2326 ext/syck/rubyext.c     cMergeKey = rb_define_class_under( rb_syck, "MergeKey", rb_cObject );
rb_define_class_under 2331 ext/syck/rubyext.c     cDefaultKey = rb_define_class_under( rb_syck, "DefaultKey", rb_cObject );
rb_define_class_under 2336 ext/syck/rubyext.c     cOut = rb_define_class_under( rb_syck, "Out", rb_cObject );
rb_define_class_under 2346 ext/syck/rubyext.c     cEmitter = rb_define_class_under( rb_syck, "Emitter", rb_cObject );
rb_define_class_under 1541 ext/tk/tkutil/tkutil.c     cCB_SUBST = rb_define_class_under(mTK, "CallbackSubst", rb_cObject);
rb_define_class_under 1544 ext/tk/tkutil/tkutil.c     cSUBST_INFO = rb_define_class_under(cCB_SUBST, "Info", rb_cObject);
rb_define_class_under 3421 ext/zlib/zlib.c     cZError = rb_define_class_under(mZlib, "Error", rb_eStandardError);
rb_define_class_under 3422 ext/zlib/zlib.c     cStreamEnd    = rb_define_class_under(mZlib, "StreamEnd", cZError);
rb_define_class_under 3423 ext/zlib/zlib.c     cNeedDict     = rb_define_class_under(mZlib, "NeedDict", cZError);
rb_define_class_under 3424 ext/zlib/zlib.c     cDataError    = rb_define_class_under(mZlib, "DataError", cZError);
rb_define_class_under 3425 ext/zlib/zlib.c     cStreamError  = rb_define_class_under(mZlib, "StreamError", cZError);
rb_define_class_under 3426 ext/zlib/zlib.c     cMemError     = rb_define_class_under(mZlib, "MemError", cZError);
rb_define_class_under 3427 ext/zlib/zlib.c     cBufError     = rb_define_class_under(mZlib, "BufError", cZError);
rb_define_class_under 3428 ext/zlib/zlib.c     cVersionError = rb_define_class_under(mZlib, "VersionError", cZError);
rb_define_class_under 3438 ext/zlib/zlib.c     cZStream = rb_define_class_under(mZlib, "ZStream", rb_cObject);
rb_define_class_under 3462 ext/zlib/zlib.c     cDeflate = rb_define_class_under(mZlib, "Deflate", cZStream);
rb_define_class_under 3473 ext/zlib/zlib.c     cInflate = rb_define_class_under(mZlib, "Inflate", cZStream);
rb_define_class_under 3510 ext/zlib/zlib.c     cGzipFile = rb_define_class_under(mZlib, "GzipFile", rb_cObject);
rb_define_class_under 3511 ext/zlib/zlib.c     cGzError = rb_define_class_under(cGzipFile, "Error", cZError);
rb_define_class_under 3513 ext/zlib/zlib.c     cNoFooter = rb_define_class_under(cGzipFile, "NoFooter", cGzError);
rb_define_class_under 3514 ext/zlib/zlib.c     cCRCError = rb_define_class_under(cGzipFile, "CRCError", cGzError);
rb_define_class_under 3515 ext/zlib/zlib.c     cLengthError = rb_define_class_under(cGzipFile,"LengthError",cGzError);
rb_define_class_under 3517 ext/zlib/zlib.c     cGzipWriter = rb_define_class_under(mZlib, "GzipWriter", cGzipFile);
rb_define_class_under 3518 ext/zlib/zlib.c     cGzipReader = rb_define_class_under(mZlib, "GzipReader", cGzipFile);
rb_define_class_under 4366 file.c             rb_cStat = rb_define_class_under(rb_cFile, "Stat", rb_cObject);
rb_define_class_under 3601 process.c          rb_cProcStatus = rb_define_class_under(rb_mProcess, "Status", rb_cObject);
rb_define_class_under  503 ruby.h         VALUE rb_define_class_under(VALUE, const char*, VALUE);
rb_define_class_under  192 struct.c       	nstr = rb_define_class_under(klass, rb_id2name(id), klass);


rb_define_const

rb_define_const   791 error.c        	rb_define_const(error, "Errno", INT2NUM(n));
rb_define_const   795 error.c        	rb_define_const(rb_mErrno, name, error);
rb_define_const  12894 eval.c             rb_define_const(cThGroup, "Default", thgroup_default);
rb_define_const  1267 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "BASE", INT2FIX((S_INT)VpBaseVal()));
rb_define_const  1270 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "EXCEPTION_ALL",INT2FIX(VP_EXCEPTION_ALL));
rb_define_const  1271 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "EXCEPTION_NaN",INT2FIX(VP_EXCEPTION_NaN));
rb_define_const  1272 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "EXCEPTION_INFINITY",INT2FIX(VP_EXCEPTION_INFINITY));
rb_define_const  1273 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "EXCEPTION_UNDERFLOW",INT2FIX(VP_EXCEPTION_UNDERFLOW));
rb_define_const  1274 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "EXCEPTION_OVERFLOW",INT2FIX(VP_EXCEPTION_OVERFLOW));
rb_define_const  1275 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "EXCEPTION_ZERODIVIDE",INT2FIX(VP_EXCEPTION_ZERODIVIDE));
rb_define_const  1278 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "ROUND_MODE",INT2FIX(VP_ROUND_MODE));
rb_define_const  1279 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "ROUND_UP",INT2FIX(VP_ROUND_UP));
rb_define_const  1280 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "ROUND_DOWN",INT2FIX(VP_ROUND_DOWN));
rb_define_const  1281 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "ROUND_HALF_UP",INT2FIX(VP_ROUND_HALF_UP));
rb_define_const  1282 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "ROUND_HALF_DOWN",INT2FIX(VP_ROUND_HALF_DOWN));
rb_define_const  1283 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "ROUND_CEILING",INT2FIX(VP_ROUND_CEIL));
rb_define_const  1284 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "ROUND_FLOOR",INT2FIX(VP_ROUND_FLOOR));
rb_define_const  1285 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "ROUND_HALF_EVEN",INT2FIX(VP_ROUND_HALF_EVEN));
rb_define_const  1288 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "SIGN_NaN",INT2FIX(VP_SIGN_NaN));
rb_define_const  1289 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_ZERO",INT2FIX(VP_SIGN_POSITIVE_ZERO));
rb_define_const  1290 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_ZERO",INT2FIX(VP_SIGN_NEGATIVE_ZERO));
rb_define_const  1291 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_FINITE",INT2FIX(VP_SIGN_POSITIVE_FINITE));
rb_define_const  1292 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_FINITE",INT2FIX(VP_SIGN_NEGATIVE_FINITE));
rb_define_const  1293 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_INFINITE",INT2FIX(VP_SIGN_POSITIVE_INFINITE));
rb_define_const  1294 ext/bigdecimal/bigdecimal.c     rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_INFINITE",INT2FIX(VP_SIGN_NEGATIVE_INFINITE));
rb_define_const  1581 ext/curses/curses.c #define rb_curses_define_const(c) rb_define_const(mCurses,#c,UINT2NUM(c))
rb_define_const  1712 ext/curses/curses.c     rb_define_const(mKey, "MOUSE", INT2NUM(KEY_MOUSE));
rb_define_const  1716 ext/curses/curses.c     rb_define_const(mKey, "MIN", INT2NUM(KEY_MIN));
rb_define_const  1720 ext/curses/curses.c     rb_define_const(mKey, "BREAK", INT2NUM(KEY_BREAK));
rb_define_const  1724 ext/curses/curses.c     rb_define_const(mKey, "DOWN", INT2NUM(KEY_DOWN));
rb_define_const  1728 ext/curses/curses.c     rb_define_const(mKey, "UP", INT2NUM(KEY_UP));
rb_define_const  1732 ext/curses/curses.c     rb_define_const(mKey, "LEFT", INT2NUM(KEY_LEFT));
rb_define_const  1736 ext/curses/curses.c     rb_define_const(mKey, "RIGHT", INT2NUM(KEY_RIGHT));
rb_define_const  1740 ext/curses/curses.c     rb_define_const(mKey, "HOME", INT2NUM(KEY_HOME));
rb_define_const  1744 ext/curses/curses.c     rb_define_const(mKey, "BACKSPACE", INT2NUM(KEY_BACKSPACE));
rb_define_const  1753 ext/curses/curses.c 	rb_define_const(mCurses, c, INT2NUM(KEY_F(i)));
rb_define_const  1755 ext/curses/curses.c 	rb_define_const(mKey, c, INT2NUM(KEY_F(i)));
rb_define_const  1761 ext/curses/curses.c     rb_define_const(mKey, "DL", INT2NUM(KEY_DL));
rb_define_const  1765 ext/curses/curses.c     rb_define_const(mKey, "IL", INT2NUM(KEY_IL));
rb_define_const  1769 ext/curses/curses.c     rb_define_const(mKey, "DC", INT2NUM(KEY_DC));
rb_define_const  1773 ext/curses/curses.c     rb_define_const(mKey, "IC", INT2NUM(KEY_IC));
rb_define_const  1777 ext/curses/curses.c     rb_define_const(mKey, "EIC", INT2NUM(KEY_EIC));
rb_define_const  1781 ext/curses/curses.c     rb_define_const(mKey, "CLEAR", INT2NUM(KEY_CLEAR));
rb_define_const  1785 ext/curses/curses.c     rb_define_const(mKey, "EOS", INT2NUM(KEY_EOS));
rb_define_const  1789 ext/curses/curses.c     rb_define_const(mKey, "EOL", INT2NUM(KEY_EOL));
rb_define_const  1793 ext/curses/curses.c     rb_define_const(mKey, "SF", INT2NUM(KEY_SF));
rb_define_const  1797 ext/curses/curses.c     rb_define_const(mKey, "SR", INT2NUM(KEY_SR));
rb_define_const  1801 ext/curses/curses.c     rb_define_const(mKey, "NPAGE", INT2NUM(KEY_NPAGE));
rb_define_const  1805 ext/curses/curses.c     rb_define_const(mKey, "PPAGE", INT2NUM(KEY_PPAGE));
rb_define_const  1809 ext/curses/curses.c     rb_define_const(mKey, "STAB", INT2NUM(KEY_STAB));
rb_define_const  1813 ext/curses/curses.c     rb_define_const(mKey, "CTAB", INT2NUM(KEY_CTAB));
rb_define_const  1817 ext/curses/curses.c     rb_define_const(mKey, "CATAB", INT2NUM(KEY_CATAB));
rb_define_const  1821 ext/curses/curses.c     rb_define_const(mKey, "ENTER", INT2NUM(KEY_ENTER));
rb_define_const  1825 ext/curses/curses.c     rb_define_const(mKey, "SRESET", INT2NUM(KEY_SRESET));
rb_define_const  1829 ext/curses/curses.c     rb_define_const(mKey, "RESET", INT2NUM(KEY_RESET));
rb_define_const  1833 ext/curses/curses.c     rb_define_const(mKey, "PRINT", INT2NUM(KEY_PRINT));
rb_define_const  1837 ext/curses/curses.c     rb_define_const(mKey, "LL", INT2NUM(KEY_LL));
rb_define_const  1841 ext/curses/curses.c     rb_define_const(mKey, "A1", INT2NUM(KEY_A1));
rb_define_const  1845 ext/curses/curses.c     rb_define_const(mKey, "A3", INT2NUM(KEY_A3));
rb_define_const  1849 ext/curses/curses.c     rb_define_const(mKey, "B2", INT2NUM(KEY_B2));
rb_define_const  1853 ext/curses/curses.c     rb_define_const(mKey, "C1", INT2NUM(KEY_C1));
rb_define_const  1857 ext/curses/curses.c     rb_define_const(mKey, "C3", INT2NUM(KEY_C3));
rb_define_const  1861 ext/curses/curses.c     rb_define_const(mKey, "BTAB", INT2NUM(KEY_BTAB));
rb_define_const  1865 ext/curses/curses.c     rb_define_const(mKey, "BEG", INT2NUM(KEY_BEG));
rb_define_const  1869 ext/curses/curses.c     rb_define_const(mKey, "CANCEL", INT2NUM(KEY_CANCEL));
rb_define_const  1873 ext/curses/curses.c     rb_define_const(mKey, "CLOSE", INT2NUM(KEY_CLOSE));
rb_define_const  1877 ext/curses/curses.c     rb_define_const(mKey, "COMMAND", INT2NUM(KEY_COMMAND));
rb_define_const  1881 ext/curses/curses.c     rb_define_const(mKey, "COPY", INT2NUM(KEY_COPY));
rb_define_const  1885 ext/curses/curses.c     rb_define_const(mKey, "CREATE", INT2NUM(KEY_CREATE));
rb_define_const  1889 ext/curses/curses.c     rb_define_const(mKey, "END", INT2NUM(KEY_END));
rb_define_const  1893 ext/curses/curses.c     rb_define_const(mKey, "EXIT", INT2NUM(KEY_EXIT));
rb_define_const  1897 ext/curses/curses.c     rb_define_const(mKey, "FIND", INT2NUM(KEY_FIND));
rb_define_const  1901 ext/curses/curses.c     rb_define_const(mKey, "HELP", INT2NUM(KEY_HELP));
rb_define_const  1905 ext/curses/curses.c     rb_define_const(mKey, "MARK", INT2NUM(KEY_MARK));
rb_define_const  1909 ext/curses/curses.c     rb_define_const(mKey, "MESSAGE", INT2NUM(KEY_MESSAGE));
rb_define_const  1913 ext/curses/curses.c     rb_define_const(mKey, "MOVE", INT2NUM(KEY_MOVE));
rb_define_const  1917 ext/curses/curses.c     rb_define_const(mKey, "NEXT", INT2NUM(KEY_NEXT));
rb_define_const  1921 ext/curses/curses.c     rb_define_const(mKey, "OPEN", INT2NUM(KEY_OPEN));
rb_define_const  1925 ext/curses/curses.c     rb_define_const(mKey, "OPTIONS", INT2NUM(KEY_OPTIONS));
rb_define_const  1929 ext/curses/curses.c     rb_define_const(mKey, "PREVIOUS", INT2NUM(KEY_PREVIOUS));
rb_define_const  1933 ext/curses/curses.c     rb_define_const(mKey, "REDO", INT2NUM(KEY_REDO));
rb_define_const  1937 ext/curses/curses.c     rb_define_const(mKey, "REFERENCE", INT2NUM(KEY_REFERENCE));
rb_define_const  1941 ext/curses/curses.c     rb_define_const(mKey, "REFRESH", INT2NUM(KEY_REFRESH));
rb_define_const  1945 ext/curses/curses.c     rb_define_const(mKey, "REPLACE", INT2NUM(KEY_REPLACE));
rb_define_const  1949 ext/curses/curses.c     rb_define_const(mKey, "RESTART", INT2NUM(KEY_RESTART));
rb_define_const  1953 ext/curses/curses.c     rb_define_const(mKey, "RESUME", INT2NUM(KEY_RESUME));
rb_define_const  1957 ext/curses/curses.c     rb_define_const(mKey, "SAVE", INT2NUM(KEY_SAVE));
rb_define_const  1961 ext/curses/curses.c     rb_define_const(mKey, "SBEG", INT2NUM(KEY_SBEG));
rb_define_const  1965 ext/curses/curses.c     rb_define_const(mKey, "SCANCEL", INT2NUM(KEY_SCANCEL));
rb_define_const  1969 ext/curses/curses.c     rb_define_const(mKey, "SCOMMAND", INT2NUM(KEY_SCOMMAND));
rb_define_const  1973 ext/curses/curses.c     rb_define_const(mKey, "SCOPY", INT2NUM(KEY_SCOPY));
rb_define_const  1977 ext/curses/curses.c     rb_define_const(mKey, "SCREATE", INT2NUM(KEY_SCREATE));
rb_define_const  1981 ext/curses/curses.c     rb_define_const(mKey, "SDC", INT2NUM(KEY_SDC));
rb_define_const  1985 ext/curses/curses.c     rb_define_const(mKey, "SDL", INT2NUM(KEY_SDL));
rb_define_const  1989 ext/curses/curses.c     rb_define_const(mKey, "SELECT", INT2NUM(KEY_SELECT));
rb_define_const  1993 ext/curses/curses.c     rb_define_const(mKey, "SEND", INT2NUM(KEY_SEND));
rb_define_const  1997 ext/curses/curses.c     rb_define_const(mKey, "SEOL", INT2NUM(KEY_SEOL));
rb_define_const  2001 ext/curses/curses.c     rb_define_const(mKey, "SEXIT", INT2NUM(KEY_SEXIT));
rb_define_const  2005 ext/curses/curses.c     rb_define_const(mKey, "SFIND", INT2NUM(KEY_SFIND));
rb_define_const  2009 ext/curses/curses.c     rb_define_const(mKey, "SHELP", INT2NUM(KEY_SHELP));
rb_define_const  2013 ext/curses/curses.c     rb_define_const(mKey, "SHOME", INT2NUM(KEY_SHOME));
rb_define_const  2017 ext/curses/curses.c     rb_define_const(mKey, "SIC", INT2NUM(KEY_SIC));
rb_define_const  2021 ext/curses/curses.c     rb_define_const(mKey, "SLEFT", INT2NUM(KEY_SLEFT));
rb_define_const  2025 ext/curses/curses.c     rb_define_const(mKey, "SMESSAGE", INT2NUM(KEY_SMESSAGE));
rb_define_const  2029 ext/curses/curses.c     rb_define_const(mKey, "SMOVE", INT2NUM(KEY_SMOVE));
rb_define_const  2033 ext/curses/curses.c     rb_define_const(mKey, "SNEXT", INT2NUM(KEY_SNEXT));
rb_define_const  2037 ext/curses/curses.c     rb_define_const(mKey, "SOPTIONS", INT2NUM(KEY_SOPTIONS));
rb_define_const  2041 ext/curses/curses.c     rb_define_const(mKey, "SPREVIOUS", INT2NUM(KEY_SPREVIOUS));
rb_define_const  2045 ext/curses/curses.c     rb_define_const(mKey, "SPRINT", INT2NUM(KEY_SPRINT));
rb_define_const  2049 ext/curses/curses.c     rb_define_const(mKey, "SREDO", INT2NUM(KEY_SREDO));
rb_define_const  2053 ext/curses/curses.c     rb_define_const(mKey, "SREPLACE", INT2NUM(KEY_SREPLACE));
rb_define_const  2057 ext/curses/curses.c     rb_define_const(mKey, "SRIGHT", INT2NUM(KEY_SRIGHT));
rb_define_const  2061 ext/curses/curses.c     rb_define_const(mKey, "SRSUME", INT2NUM(KEY_SRSUME));
rb_define_const  2065 ext/curses/curses.c     rb_define_const(mKey, "SSAVE", INT2NUM(KEY_SSAVE));
rb_define_const  2069 ext/curses/curses.c     rb_define_const(mKey, "SSUSPEND", INT2NUM(KEY_SSUSPEND));
rb_define_const  2073 ext/curses/curses.c     rb_define_const(mKey, "SUNDO", INT2NUM(KEY_SUNDO));
rb_define_const  2077 ext/curses/curses.c     rb_define_const(mKey, "SUSPEND", INT2NUM(KEY_SUSPEND));
rb_define_const  2081 ext/curses/curses.c     rb_define_const(mKey, "UNDO", INT2NUM(KEY_UNDO));
rb_define_const  2085 ext/curses/curses.c     rb_define_const(mKey, "RESIZE", INT2NUM(KEY_RESIZE));
rb_define_const  2089 ext/curses/curses.c     rb_define_const(mKey, "MAX", INT2NUM(KEY_MAX));
rb_define_const  2096 ext/curses/curses.c 	rb_define_const(mCurses, name, INT2FIX(c - 'A' + 1));
rb_define_const   774 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "READER",  INT2FIX(O_RDONLY|RUBY_DBM_RW_BIT));
rb_define_const   775 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "WRITER",  INT2FIX(O_RDWR|RUBY_DBM_RW_BIT));
rb_define_const   776 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "WRCREAT", INT2FIX(O_RDWR|O_CREAT|RUBY_DBM_RW_BIT));
rb_define_const   777 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "NEWDB",   INT2FIX(O_RDWR|O_CREAT|O_TRUNC|RUBY_DBM_RW_BIT));
rb_define_const   780 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "VERSION",  rb_str_new2(DB_VERSION_STRING));
rb_define_const   782 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "VERSION",  rb_str_new2("unknown"));
rb_define_const   482 ext/dl/cptr.c      rb_define_const(rb_mDL, "NULL", rb_dlptr_new(0, 0, 0));
rb_define_const    93 ext/dl/dl.c        rb_define_const(rb_mDL, "MAX_CALLBACK", INT2NUM(MAX_CALLBACK));
rb_define_const    94 ext/dl/dl.c        rb_define_const(rb_mDL, "DLSTACK_SIZE", INT2NUM(DLSTACK_SIZE));
rb_define_const    98 ext/dl/dl.c        rb_define_const(rb_mDL, "RTLD_GLOBAL", INT2NUM(RTLD_GLOBAL));
rb_define_const    99 ext/dl/dl.c        rb_define_const(rb_mDL, "RTLD_LAZY",   INT2NUM(RTLD_LAZY));
rb_define_const   100 ext/dl/dl.c        rb_define_const(rb_mDL, "RTLD_NOW",    INT2NUM(RTLD_NOW));
rb_define_const   102 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_VOID",  INT2NUM(DLTYPE_VOID));
rb_define_const   103 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_VOIDP",  INT2NUM(DLTYPE_VOIDP));
rb_define_const   104 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_CHAR",  INT2NUM(DLTYPE_CHAR));
rb_define_const   105 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_SHORT",  INT2NUM(DLTYPE_SHORT));
rb_define_const   106 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_INT",  INT2NUM(DLTYPE_INT));
rb_define_const   107 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_LONG",  INT2NUM(DLTYPE_LONG));
rb_define_const   109 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_LONG_LONG",  INT2NUM(DLTYPE_LONG_LONG));
rb_define_const   111 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_FLOAT",  INT2NUM(DLTYPE_FLOAT));
rb_define_const   112 ext/dl/dl.c        rb_define_const(rb_mDL, "TYPE_DOUBLE",  INT2NUM(DLTYPE_DOUBLE));
rb_define_const   114 ext/dl/dl.c        rb_define_const(rb_mDL, "ALIGN_VOIDP", INT2NUM(ALIGN_VOIDP));
rb_define_const   115 ext/dl/dl.c        rb_define_const(rb_mDL, "ALIGN_CHAR",  INT2NUM(ALIGN_CHAR));
rb_define_const   116 ext/dl/dl.c        rb_define_const(rb_mDL, "ALIGN_SHORT", INT2NUM(ALIGN_SHORT));
rb_define_const   117 ext/dl/dl.c        rb_define_const(rb_mDL, "ALIGN_INT",   INT2NUM(ALIGN_INT));
rb_define_const   118 ext/dl/dl.c        rb_define_const(rb_mDL, "ALIGN_LONG",  INT2NUM(ALIGN_LONG));
rb_define_const   120 ext/dl/dl.c        rb_define_const(rb_mDL, "ALIGN_LONG_LONG",  INT2NUM(ALIGN_LONG_LONG));
rb_define_const   122 ext/dl/dl.c        rb_define_const(rb_mDL, "ALIGN_FLOAT", INT2NUM(ALIGN_FLOAT));
rb_define_const   123 ext/dl/dl.c        rb_define_const(rb_mDL, "ALIGN_DOUBLE",INT2NUM(ALIGN_DOUBLE));
rb_define_const   125 ext/dl/dl.c        rb_define_const(rb_mDL, "SIZEOF_VOIDP", INT2NUM(sizeof(void*)));
rb_define_const   126 ext/dl/dl.c        rb_define_const(rb_mDL, "SIZEOF_CHAR",  INT2NUM(sizeof(char)));
rb_define_const   127 ext/dl/dl.c        rb_define_const(rb_mDL, "SIZEOF_SHORT", INT2NUM(sizeof(short)));
rb_define_const   128 ext/dl/dl.c        rb_define_const(rb_mDL, "SIZEOF_INT",   INT2NUM(sizeof(int)));
rb_define_const   129 ext/dl/dl.c        rb_define_const(rb_mDL, "SIZEOF_LONG",  INT2NUM(sizeof(long)));
rb_define_const   131 ext/dl/dl.c        rb_define_const(rb_mDL, "SIZEOF_LONG_LONG",  INT2NUM(sizeof(LONG_LONG)));
rb_define_const   133 ext/dl/dl.c        rb_define_const(rb_mDL, "SIZEOF_FLOAT", INT2NUM(sizeof(float)));
rb_define_const   134 ext/dl/dl.c        rb_define_const(rb_mDL, "SIZEOF_DOUBLE",INT2NUM(sizeof(double)));
rb_define_const   144 ext/dl/dl.c        rb_define_const(rb_mDL, "RUBY_FREE", PTR2NUM(ruby_xfree));
rb_define_const   145 ext/dl/dl.c        rb_define_const(rb_mDL, "BUILD_RUBY_PLATFORM", rb_str_new2(RUBY_PLATFORM));
rb_define_const   146 ext/dl/dl.c        rb_define_const(rb_mDL, "BUILD_RUBY_VERSION",  rb_str_new2(RUBY_VERSION));
rb_define_const   117 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "F_DUPFD", INT2NUM(F_DUPFD));
rb_define_const   120 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "F_GETFD", INT2NUM(F_GETFD));
rb_define_const   123 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "F_GETLK", INT2NUM(F_GETLK));
rb_define_const   126 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "F_SETFD", INT2NUM(F_SETFD));
rb_define_const   129 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "F_GETFL", INT2NUM(F_GETFL));
rb_define_const   132 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "F_SETFL", INT2NUM(F_SETFL));
rb_define_const   135 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "F_SETLK", INT2NUM(F_SETLK));
rb_define_const   138 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "F_SETLKW", INT2NUM(F_SETLKW));
rb_define_const   141 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "FD_CLOEXEC", INT2NUM(FD_CLOEXEC));
rb_define_const   144 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "F_RDLCK", INT2NUM(F_RDLCK));
rb_define_const   147 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "F_UNLCK", INT2NUM(F_UNLCK));
rb_define_const   150 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "F_WRLCK", INT2NUM(F_WRLCK));
rb_define_const   153 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_CREAT", INT2NUM(O_CREAT));
rb_define_const   156 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_EXCL", INT2NUM(O_EXCL));
rb_define_const   159 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_NOCTTY", INT2NUM(O_NOCTTY));
rb_define_const   162 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_TRUNC", INT2NUM(O_TRUNC));
rb_define_const   165 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_APPEND", INT2NUM(O_APPEND));
rb_define_const   168 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_NONBLOCK", INT2NUM(O_NONBLOCK));
rb_define_const   171 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_NDELAY", INT2NUM(O_NDELAY));
rb_define_const   174 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_RDONLY", INT2NUM(O_RDONLY));
rb_define_const   177 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_RDWR", INT2NUM(O_RDWR));
rb_define_const   180 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_WRONLY", INT2NUM(O_WRONLY));
rb_define_const   183 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_ACCMODE", INT2FIX(O_ACCMODE));
rb_define_const   185 ext/fcntl/fcntl.c     rb_define_const(mFcntl, "O_ACCMODE", INT2FIX(O_RDONLY | O_WRONLY | O_RDWR));
rb_define_const   970 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "READER",  INT2FIX(GDBM_READER|RUBY_GDBM_RW_BIT));
rb_define_const   971 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "WRITER",  INT2FIX(GDBM_WRITER|RUBY_GDBM_RW_BIT));
rb_define_const   972 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "WRCREAT", INT2FIX(GDBM_WRCREAT|RUBY_GDBM_RW_BIT));
rb_define_const   973 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "NEWDB",   INT2FIX(GDBM_NEWDB|RUBY_GDBM_RW_BIT));
rb_define_const   975 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "FAST", INT2FIX(GDBM_FAST));
rb_define_const   981 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "SYNC",    INT2FIX(GDBM_SYNC));
rb_define_const   984 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "NOLOCK",  INT2FIX(GDBM_NOLOCK));
rb_define_const   986 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "VERSION",  rb_str_new2(gdbm_version));
rb_define_const   276 ext/nkf/nkf.c    rb_define_const(mKconv, "AUTO", INT2FIX(_AUTO));
rb_define_const   277 ext/nkf/nkf.c    rb_define_const(mKconv, "JIS", INT2FIX(_JIS));
rb_define_const   278 ext/nkf/nkf.c    rb_define_const(mKconv, "EUC", INT2FIX(_EUC));
rb_define_const   279 ext/nkf/nkf.c    rb_define_const(mKconv, "SJIS", INT2FIX(_SJIS));
rb_define_const   280 ext/nkf/nkf.c    rb_define_const(mKconv, "BINARY", INT2FIX(_BINARY));
rb_define_const   281 ext/nkf/nkf.c    rb_define_const(mKconv, "NOCONV", INT2FIX(_NOCONV));
rb_define_const   282 ext/nkf/nkf.c    rb_define_const(mKconv, "ASCII", INT2FIX(_ASCII));
rb_define_const   283 ext/nkf/nkf.c    rb_define_const(mKconv, "UTF8", INT2FIX(_UTF8));
rb_define_const   284 ext/nkf/nkf.c    rb_define_const(mKconv, "UTF16", INT2FIX(_UTF16));
rb_define_const   285 ext/nkf/nkf.c    rb_define_const(mKconv, "UTF32", INT2FIX(_UTF32));
rb_define_const   286 ext/nkf/nkf.c    rb_define_const(mKconv, "UNKNOWN", INT2FIX(_UNKNOWN));
rb_define_const   287 ext/nkf/nkf.c    rb_define_const(mKconv, "VERSION", rb_str_new2(RUBY_NKF_VERSION));
rb_define_const   289 ext/nkf/nkf.c    rb_define_const(mKconv, "NKF_VERSION", rb_str_new2(NKF_VERSION));
rb_define_const   290 ext/nkf/nkf.c    rb_define_const(mKconv, "NKF_RELEASE_DATE", rb_str_new2(NKF_RELEASE_DATE));
rb_define_const   291 ext/nkf/nkf.c    rb_define_const(mKconv, "REVISION", rb_str_new2(RUBY_NKF_REVISION));
rb_define_const   417 ext/openssl/ossl.c     rb_define_const(mOSSL, "VERSION", rb_str_new2(OSSL_VERSION));
rb_define_const   418 ext/openssl/ossl.c     rb_define_const(mOSSL, "OPENSSL_VERSION", rb_str_new2(OPENSSL_VERSION_TEXT));
rb_define_const   419 ext/openssl/ossl.c     rb_define_const(mOSSL, "OPENSSL_VERSION_NUMBER", INT2NUM(OPENSSL_VERSION_NUMBER));
rb_define_const  1103 ext/openssl/ossl_asn1.c     rb_define_const(mASN1, "UNIVERSAL_TAG_NAME", ary);
rb_define_const  1106 ext/openssl/ossl_asn1.c 	rb_define_const(mASN1, ossl_asn1_info[i].name, INT2NUM(i));
rb_define_const   441 ext/openssl/ossl_config.c     rb_define_const(cConfig, "DEFAULT_CONFIG_FILE",
rb_define_const   342 ext/openssl/ossl_engine.c #define DefEngineConst(x) rb_define_const(cEngine, #x, INT2NUM(ENGINE_##x))
rb_define_const   723 ext/openssl/ossl_ocsp.c #define DefOCSPConst(x) rb_define_const(mOCSP, #x, INT2NUM(OCSP_##x))
rb_define_const   755 ext/openssl/ossl_ocsp.c #define DefOCSPVConst(x) rb_define_const(mOCSP, "V_" #x, INT2NUM(V_OCSP_##x))
rb_define_const   966 ext/openssl/ossl_pkcs7.c     rb_define_const(mPKCS7, "Signer", cPKCS7Signer);
rb_define_const   981 ext/openssl/ossl_pkcs7.c #define DefPKCS7Const(x) rb_define_const(mPKCS7, #x, INT2NUM(PKCS7_##x))
rb_define_const   457 ext/openssl/ossl_pkey_rsa.c #define DefRSAConst(x) rb_define_const(cRSA, #x,INT2FIX(RSA_##x))
rb_define_const   895 ext/openssl/ossl_ssl.c #define ossl_ssl_def_const(x) rb_define_const(mSSL, #x, INT2FIX(SSL_##x))
rb_define_const    15 ext/openssl/ossl_x509.c #define DefX509Const(x) rb_define_const(mX509, #x,INT2FIX(X509_##x))
rb_define_const    17 ext/openssl/ossl_x509.c   rb_define_const(mX509, "DEFAULT_" #x, rb_str_new2(X509_get_default_##i()))
rb_define_const   328 ext/openssl/ossl_x509name.c     rb_define_const(cX509Name, "DEFAULT_OBJECT_TYPE", utf8str);
rb_define_const   338 ext/openssl/ossl_x509name.c     rb_define_const(cX509Name, "OBJECT_TYPE_TEMPLATE", hash);
rb_define_const   340 ext/openssl/ossl_x509name.c     rb_define_const(cX509Name, "COMPAT", ULONG2NUM(XN_FLAG_COMPAT));
rb_define_const   341 ext/openssl/ossl_x509name.c     rb_define_const(cX509Name, "RFC2253", ULONG2NUM(XN_FLAG_RFC2253));
rb_define_const   342 ext/openssl/ossl_x509name.c     rb_define_const(cX509Name, "ONELINE", ULONG2NUM(XN_FLAG_ONELINE));
rb_define_const   343 ext/openssl/ossl_x509name.c     rb_define_const(cX509Name, "MULTILINE", ULONG2NUM(XN_FLAG_MULTILINE));
rb_define_const   801 ext/racc/cparse/cparse.c     rb_define_const(Parser, "Racc_Runtime_Core_Version_C",
rb_define_const   803 ext/racc/cparse/cparse.c     rb_define_const(Parser, "Racc_Runtime_Core_Id_C",
rb_define_const   815 ext/readline/readline.c     rb_define_const(mReadline, "HISTORY", history);
rb_define_const   820 ext/readline/readline.c     rb_define_const(mReadline, "FILENAME_COMPLETION_PROC", fcomp);
rb_define_const   825 ext/readline/readline.c     rb_define_const(mReadline, "USERNAME_COMPLETION_PROC", ucomp);
rb_define_const   827 ext/readline/readline.c     rb_define_const(mReadline, "VERSION", rb_str_new2(rl_library_version));
rb_define_const   829 ext/readline/readline.c     rb_define_const(mReadline, "VERSION", rb_str_new2("2.0 or prior version"));
rb_define_const  3113 ext/socket/socket.c     rb_define_const(rb_cSocket, name, INT2FIX(value));
rb_define_const  3114 ext/socket/socket.c     rb_define_const(mConst, name, INT2FIX(value));
rb_define_const  2147 ext/syck/rubyext.c     rb_define_const( rb_syck, "VERSION", rb_str_new2( SYCK_VERSION ) );
rb_define_const  2231 ext/syck/rubyext.c     rb_define_const( rb_syck, "DefaultResolver", oDefaultResolver );
rb_define_const  2235 ext/syck/rubyext.c     rb_define_const( rb_syck, "GenericResolver", oGenericResolver );
rb_define_const   265 ext/syslog/syslog.c     rb_define_const(mSyslogConstants, #id, INT2NUM(id))
rb_define_const  7722 ext/tk/tcltklib.c     rb_define_const(lib, "COMPILE_INFO", tcltklib_compile_info());
rb_define_const  7724 ext/tk/tcltklib.c     rb_define_const(lib, "RELEASE_DATE",
rb_define_const  7727 ext/tk/tcltklib.c     rb_define_const(lib, "FINALIZE_PROC_NAME",
rb_define_const  7732 ext/tk/tcltklib.c     rb_define_const(ev_flag, "NONE",      INT2FIX(0));
rb_define_const  7733 ext/tk/tcltklib.c     rb_define_const(ev_flag, "WINDOW",    INT2FIX(TCL_WINDOW_EVENTS));
rb_define_const  7734 ext/tk/tcltklib.c     rb_define_const(ev_flag, "FILE",      INT2FIX(TCL_FILE_EVENTS));
rb_define_const  7735 ext/tk/tcltklib.c     rb_define_const(ev_flag, "TIMER",     INT2FIX(TCL_TIMER_EVENTS));
rb_define_const  7736 ext/tk/tcltklib.c     rb_define_const(ev_flag, "IDLE",      INT2FIX(TCL_IDLE_EVENTS));
rb_define_const  7737 ext/tk/tcltklib.c     rb_define_const(ev_flag, "ALL",       INT2FIX(TCL_ALL_EVENTS));
rb_define_const  7738 ext/tk/tcltklib.c     rb_define_const(ev_flag, "DONT_WAIT", INT2FIX(TCL_DONT_WAIT));
rb_define_const  7742 ext/tk/tcltklib.c     rb_define_const(var_flag, "NONE",           INT2FIX(0));
rb_define_const  7743 ext/tk/tcltklib.c     rb_define_const(var_flag, "GLOBAL_ONLY",    INT2FIX(TCL_GLOBAL_ONLY));
rb_define_const  7745 ext/tk/tcltklib.c     rb_define_const(var_flag, "NAMESPACE_ONLY", INT2FIX(TCL_NAMESPACE_ONLY));
rb_define_const  7747 ext/tk/tcltklib.c     rb_define_const(var_flag, "NAMESPACE_ONLY", INT2FIX(0));
rb_define_const  7749 ext/tk/tcltklib.c     rb_define_const(var_flag, "LEAVE_ERR_MSG",  INT2FIX(TCL_LEAVE_ERR_MSG));
rb_define_const  7750 ext/tk/tcltklib.c     rb_define_const(var_flag, "APPEND_VALUE",   INT2FIX(TCL_APPEND_VALUE));
rb_define_const  7751 ext/tk/tcltklib.c     rb_define_const(var_flag, "LIST_ELEMENT",   INT2FIX(TCL_LIST_ELEMENT));
rb_define_const  7753 ext/tk/tcltklib.c     rb_define_const(var_flag, "PARSE_VARNAME",  INT2FIX(TCL_PARSE_PART1));
rb_define_const  7755 ext/tk/tcltklib.c     rb_define_const(var_flag, "PARSE_VARNAME",  INT2FIX(0));
rb_define_const  1520 ext/tk/tkutil/tkutil.c     rb_define_const(mTK, "RELEASE_DATE",
rb_define_const  1591 ext/tk/tkutil/tkutil.c     rb_define_const(mTK, "None", TK_None);
rb_define_const  1500 ext/win32ole/win32ole.c                     rb_define_const(klass, pName, val);
rb_define_const  1516 ext/win32ole/win32ole.c     rb_define_const(klass, "CONSTANTS", constant);
rb_define_const  6964 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "VERSION", rb_str_new2(WIN32OLE_VERSION));
rb_define_const  6965 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "ARGV", rb_ary_new());
rb_define_const  6966 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_ACP"       ,INT2FIX(CP_ACP));
rb_define_const  6967 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_OEMCP"     ,INT2FIX(CP_OEMCP));
rb_define_const  6968 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_MACCP"     ,INT2FIX(CP_MACCP));
rb_define_const  6969 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_THREAD_ACP",INT2FIX(CP_THREAD_ACP));
rb_define_const  6970 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_SYMBOL"    ,INT2FIX(CP_SYMBOL));
rb_define_const  6971 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_UTF7"      ,INT2FIX(CP_UTF7));
rb_define_const  6972 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "CP_UTF8"      ,INT2FIX(CP_UTF8));
rb_define_const  6975 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_I2", INT2FIX(VT_I2));
rb_define_const  6976 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_I4", INT2FIX(VT_I4));
rb_define_const  6977 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_R4", INT2FIX(VT_R4));
rb_define_const  6978 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_R8", INT2FIX(VT_R8));
rb_define_const  6979 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_CY", INT2FIX(VT_CY));
rb_define_const  6980 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_DATE", INT2FIX(VT_DATE));
rb_define_const  6981 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_BSTR", INT2FIX(VT_BSTR));
rb_define_const  6982 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_USERDEFINED", INT2FIX(VT_USERDEFINED));
rb_define_const  6983 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_PTR", INT2FIX(VT_PTR));
rb_define_const  6984 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_DISPATCH", INT2FIX(VT_DISPATCH));
rb_define_const  6985 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_ERROR", INT2FIX(VT_ERROR));
rb_define_const  6986 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_BOOL", INT2FIX(VT_BOOL));
rb_define_const  6987 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_VARIANT", INT2FIX(VT_VARIANT));
rb_define_const  6988 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_UNKNOWN", INT2FIX(VT_UNKNOWN));
rb_define_const  6989 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_I1", INT2FIX(VT_I1));
rb_define_const  6990 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_UI1", INT2FIX(VT_UI1));
rb_define_const  6991 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_UI2", INT2FIX(VT_UI2));
rb_define_const  6992 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_UI4", INT2FIX(VT_UI4));
rb_define_const  6993 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_INT", INT2FIX(VT_INT));
rb_define_const  6994 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_UINT", INT2FIX(VT_UINT));
rb_define_const  6995 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_ARRAY", INT2FIX(VT_ARRAY));
rb_define_const  6996 ext/win32ole/win32ole.c     rb_define_const(mWIN32OLE_VARIANT, "VT_BYREF", INT2FIX(VT_BYREF));
rb_define_const  3435 ext/zlib/zlib.c     rb_define_const(mZlib, "VERSION", rb_str_new2(RUBY_ZLIB_VERSION));
rb_define_const  3436 ext/zlib/zlib.c     rb_define_const(mZlib, "ZLIB_VERSION", rb_str_new2(ZLIB_VERSION));
rb_define_const  3458 ext/zlib/zlib.c     rb_define_const(mZlib, "BINARY", INT2FIX(Z_BINARY));
rb_define_const  3459 ext/zlib/zlib.c     rb_define_const(mZlib, "ASCII", INT2FIX(Z_ASCII));
rb_define_const  3460 ext/zlib/zlib.c     rb_define_const(mZlib, "UNKNOWN", INT2FIX(Z_UNKNOWN));
rb_define_const  3483 ext/zlib/zlib.c     rb_define_const(mZlib, "NO_COMPRESSION", INT2FIX(Z_NO_COMPRESSION));
rb_define_const  3484 ext/zlib/zlib.c     rb_define_const(mZlib, "BEST_SPEED", INT2FIX(Z_BEST_SPEED));
rb_define_const  3485 ext/zlib/zlib.c     rb_define_const(mZlib, "BEST_COMPRESSION", INT2FIX(Z_BEST_COMPRESSION));
rb_define_const  3486 ext/zlib/zlib.c     rb_define_const(mZlib, "DEFAULT_COMPRESSION",
rb_define_const  3489 ext/zlib/zlib.c     rb_define_const(mZlib, "FILTERED", INT2FIX(Z_FILTERED));
rb_define_const  3490 ext/zlib/zlib.c     rb_define_const(mZlib, "HUFFMAN_ONLY", INT2FIX(Z_HUFFMAN_ONLY));
rb_define_const  3491 ext/zlib/zlib.c     rb_define_const(mZlib, "DEFAULT_STRATEGY", INT2FIX(Z_DEFAULT_STRATEGY));
rb_define_const  3493 ext/zlib/zlib.c     rb_define_const(mZlib, "MAX_WBITS", INT2FIX(MAX_WBITS));
rb_define_const  3494 ext/zlib/zlib.c     rb_define_const(mZlib, "DEF_MEM_LEVEL", INT2FIX(DEF_MEM_LEVEL));
rb_define_const  3495 ext/zlib/zlib.c     rb_define_const(mZlib, "MAX_MEM_LEVEL", INT2FIX(MAX_MEM_LEVEL));
rb_define_const  3497 ext/zlib/zlib.c     rb_define_const(mZlib, "NO_FLUSH", INT2FIX(Z_NO_FLUSH));
rb_define_const  3498 ext/zlib/zlib.c     rb_define_const(mZlib, "SYNC_FLUSH", INT2FIX(Z_SYNC_FLUSH));
rb_define_const  3499 ext/zlib/zlib.c     rb_define_const(mZlib, "FULL_FLUSH", INT2FIX(Z_FULL_FLUSH));
rb_define_const  3500 ext/zlib/zlib.c     rb_define_const(mZlib, "FINISH", INT2FIX(Z_FINISH));
rb_define_const  3575 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_CODE", INT2FIX(OS_CODE));
rb_define_const  3576 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_MSDOS", INT2FIX(OS_MSDOS));
rb_define_const  3577 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_AMIGA", INT2FIX(OS_AMIGA));
rb_define_const  3578 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_VMS", INT2FIX(OS_VMS));
rb_define_const  3579 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_UNIX", INT2FIX(OS_UNIX));
rb_define_const  3580 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_ATARI", INT2FIX(OS_ATARI));
rb_define_const  3581 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_OS2", INT2FIX(OS_OS2));
rb_define_const  3582 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_MACOS", INT2FIX(OS_MACOS));
rb_define_const  3583 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_TOPS20", INT2FIX(OS_TOPS20));
rb_define_const  3584 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_WIN32", INT2FIX(OS_WIN32));
rb_define_const  3586 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_VMCMS", INT2FIX(OS_VMCMS));
rb_define_const  3587 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_ZSYSTEM", INT2FIX(OS_ZSYSTEM));
rb_define_const  3588 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_CPM", INT2FIX(OS_CPM));
rb_define_const  3589 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_QDOS", INT2FIX(OS_QDOS));
rb_define_const  3590 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_RISCOS", INT2FIX(OS_RISCOS));
rb_define_const  3591 ext/zlib/zlib.c     rb_define_const(mZlib, "OS_UNKNOWN", INT2FIX(OS_UNKNOWN));
rb_define_const  3979 file.c             rb_define_const(rb_mFConst, name, value);
rb_define_const  4331 file.c             rb_define_const(rb_cFile, "Separator", separator);
rb_define_const  4332 file.c             rb_define_const(rb_cFile, "SEPARATOR", separator);
rb_define_const  4337 file.c             rb_define_const(rb_cFile, "ALT_SEPARATOR", rb_obj_freeze(rb_str_new2("\\")));
rb_define_const  4339 file.c             rb_define_const(rb_cFile, "ALT_SEPARATOR", Qnil);
rb_define_const  4341 file.c             rb_define_const(rb_cFile, "PATH_SEPARATOR", rb_obj_freeze(rb_str_new2(PATH_SEP)));
rb_define_const  5537 io.c               rb_define_const(rb_cIO, "SEEK_SET", INT2FIX(SEEK_SET));
rb_define_const  5538 io.c               rb_define_const(rb_cIO, "SEEK_CUR", INT2FIX(SEEK_CUR));
rb_define_const  5539 io.c               rb_define_const(rb_cIO, "SEEK_END", INT2FIX(SEEK_END));
rb_define_const  1414 marshal.c          rb_define_const(rb_mMarshal, "MAJOR_VERSION", INT2FIX(MARSHAL_MAJOR));
rb_define_const  1415 marshal.c          rb_define_const(rb_mMarshal, "MINOR_VERSION", INT2FIX(MARSHAL_MINOR));
rb_define_const   462 math.c             rb_define_const(rb_mMath, "PI", rb_float_new(M_PI));
rb_define_const   464 math.c             rb_define_const(rb_mMath, "PI", rb_float_new(atan(1.0)*4.0));
rb_define_const   468 math.c             rb_define_const(rb_mMath, "E", rb_float_new(M_E));
rb_define_const   470 math.c             rb_define_const(rb_mMath, "E", rb_float_new(exp(1.0)));
rb_define_const  2909 numeric.c          rb_define_const(rb_cFloat, "ROUNDS", INT2FIX(FLT_ROUNDS));
rb_define_const  2910 numeric.c          rb_define_const(rb_cFloat, "RADIX", INT2FIX(FLT_RADIX));
rb_define_const  2911 numeric.c          rb_define_const(rb_cFloat, "MANT_DIG", INT2FIX(DBL_MANT_DIG));
rb_define_const  2912 numeric.c          rb_define_const(rb_cFloat, "DIG", INT2FIX(DBL_DIG));
rb_define_const  2913 numeric.c          rb_define_const(rb_cFloat, "MIN_EXP", INT2FIX(DBL_MIN_EXP));
rb_define_const  2914 numeric.c          rb_define_const(rb_cFloat, "MAX_EXP", INT2FIX(DBL_MAX_EXP));
rb_define_const  2915 numeric.c          rb_define_const(rb_cFloat, "MIN_10_EXP", INT2FIX(DBL_MIN_10_EXP));
rb_define_const  2916 numeric.c          rb_define_const(rb_cFloat, "MAX_10_EXP", INT2FIX(DBL_MAX_10_EXP));
rb_define_const  2917 numeric.c          rb_define_const(rb_cFloat, "MIN", rb_float_new(DBL_MIN));
rb_define_const  2918 numeric.c          rb_define_const(rb_cFloat, "MAX", rb_float_new(DBL_MAX));
rb_define_const  2919 numeric.c          rb_define_const(rb_cFloat, "EPSILON", rb_float_new(DBL_EPSILON));
rb_define_const  9279 parse.y            rb_define_const(Ripper, "Version", rb_str_new2(RIPPER_VERSION));
rb_define_const  3575 process.c          rb_define_const(rb_mProcess, "WNOHANG", INT2FIX(WNOHANG));
rb_define_const  3577 process.c          rb_define_const(rb_mProcess, "WNOHANG", INT2FIX(0));
rb_define_const  3580 process.c          rb_define_const(rb_mProcess, "WUNTRACED", INT2FIX(WUNTRACED));
rb_define_const  3582 process.c          rb_define_const(rb_mProcess, "WUNTRACED", INT2FIX(0));
rb_define_const  3637 process.c          rb_define_const(rb_mProcess, "PRIO_PROCESS", INT2FIX(PRIO_PROCESS));
rb_define_const  3638 process.c          rb_define_const(rb_mProcess, "PRIO_PGRP", INT2FIX(PRIO_PGRP));
rb_define_const  3639 process.c          rb_define_const(rb_mProcess, "PRIO_USER", INT2FIX(PRIO_USER));
rb_define_const  3650 process.c          rb_define_const(rb_mProcess, "RLIM_INFINITY", RLIM2NUM(RLIM_INFINITY));
rb_define_const  3653 process.c          rb_define_const(rb_mProcess, "RLIM_SAVED_MAX", RLIM2NUM(RLIM_SAVED_MAX));
rb_define_const  3656 process.c          rb_define_const(rb_mProcess, "RLIM_SAVED_CUR", RLIM2NUM(RLIM_SAVED_CUR));
rb_define_const  3659 process.c          rb_define_const(rb_mProcess, "RLIMIT_CORE", INT2FIX(RLIMIT_CORE));
rb_define_const  3662 process.c          rb_define_const(rb_mProcess, "RLIMIT_CPU", INT2FIX(RLIMIT_CPU));
rb_define_const  3665 process.c          rb_define_const(rb_mProcess, "RLIMIT_DATA", INT2FIX(RLIMIT_DATA));
rb_define_const  3668 process.c          rb_define_const(rb_mProcess, "RLIMIT_FSIZE", INT2FIX(RLIMIT_FSIZE));
rb_define_const  3671 process.c          rb_define_const(rb_mProcess, "RLIMIT_NOFILE", INT2FIX(RLIMIT_NOFILE));
rb_define_const  3674 process.c          rb_define_const(rb_mProcess, "RLIMIT_STACK", INT2FIX(RLIMIT_STACK));
rb_define_const  3677 process.c          rb_define_const(rb_mProcess, "RLIMIT_AS", INT2FIX(RLIMIT_AS));
rb_define_const  3680 process.c          rb_define_const(rb_mProcess, "RLIMIT_MEMLOCK", INT2FIX(RLIMIT_MEMLOCK));
rb_define_const  3683 process.c          rb_define_const(rb_mProcess, "RLIMIT_NPROC", INT2FIX(RLIMIT_NPROC));
rb_define_const  3686 process.c          rb_define_const(rb_mProcess, "RLIMIT_RSS", INT2FIX(RLIMIT_RSS));
rb_define_const  3689 process.c          rb_define_const(rb_mProcess, "RLIMIT_SBSIZE", INT2FIX(RLIMIT_SBSIZE));
rb_define_const  2252 re.c               rb_define_const(rb_cRegexp, "IGNORECASE", INT2FIX(ONIG_OPTION_IGNORECASE));
rb_define_const  2253 re.c               rb_define_const(rb_cRegexp, "EXTENDED", INT2FIX(ONIG_OPTION_EXTEND));
rb_define_const  2254 re.c               rb_define_const(rb_cRegexp, "MULTILINE", INT2FIX(ONIG_OPTION_MULTILINE));
rb_define_const   513 ruby.h         void rb_define_const(VALUE,const char*,VALUE);
rb_define_const  1536 variable.c         rb_define_const(rb_cObject, name, val);


rb_define_copy_func

rb_define_copy_func  614 ext/openssl/ossl_bn.c     rb_define_copy_func(cBN, ossl_bn_copy);
rb_define_copy_func  354 ext/openssl/ossl_cipher.c     rb_define_copy_func(cCipher, ossl_cipher_copy);
rb_define_copy_func  447 ext/openssl/ossl_config.c     rb_define_copy_func(cConfig, ossl_config_copy);
rb_define_copy_func  280 ext/openssl/ossl_digest.c     rb_define_copy_func(cDigest, ossl_digest_copy);
rb_define_copy_func  203 ext/openssl/ossl_hmac.c     rb_define_copy_func(cHMAC, ossl_hmac_copy);
rb_define_copy_func  939 ext/openssl/ossl_pkcs7.c     rb_define_copy_func(cPKCS7, ossl_pkcs7_copy);
rb_define_copy_func  642 ext/openssl/ossl_x509cert.c     rb_define_copy_func(cX509Cert, ossl_x509_copy);
rb_define_copy_func  511 ext/openssl/ossl_x509crl.c     rb_define_copy_func(cX509CRL, ossl_x509crl_copy);
rb_define_copy_func  447 ext/openssl/ossl_x509req.c     rb_define_copy_func(cX509Req, ossl_x509req_copy);


rb_define_global_const

rb_define_global_const 1308 eval.c         	rb_define_global_const("TOPLEVEL_BINDING", rb_f_binding(ruby_top_self));
rb_define_global_const 3169 ext/socket/socket.c     rb_define_global_const("IPsocket", rb_cIPSocket);
rb_define_global_const 3176 ext/socket/socket.c     rb_define_global_const("TCPsocket", rb_cTCPSocket);
rb_define_global_const 3182 ext/socket/socket.c     rb_define_global_const("SOCKSsocket", rb_cSOCKSSocket);
rb_define_global_const 3190 ext/socket/socket.c     rb_define_global_const("TCPserver", rb_cTCPServer);
rb_define_global_const 3197 ext/socket/socket.c     rb_define_global_const("UDPsocket", rb_cUDPSocket);
rb_define_global_const 3205 ext/socket/socket.c     rb_define_global_const("UNIXsocket", rb_cUNIXSocket);
rb_define_global_const 3217 ext/socket/socket.c     rb_define_global_const("UNIXserver", rb_cUNIXServer);
rb_define_global_const 2383 hash.c             rb_define_global_const("ENV", envtbl);
rb_define_global_const 2386 hash.c             rb_define_global_const("ENV", envtbl);
rb_define_global_const 5576 io.c               rb_define_global_const("STDIN", rb_stdin);
rb_define_global_const 5577 io.c               rb_define_global_const("STDOUT", rb_stdout);
rb_define_global_const 5578 io.c               rb_define_global_const("STDERR", rb_stderr);
rb_define_global_const 5583 io.c               rb_define_global_const("ARGF", argf);
rb_define_global_const 2456 object.c           rb_define_global_const("NIL", Qnil);
rb_define_global_const 2538 object.c           rb_define_global_const("TRUE", Qtrue);
rb_define_global_const 2547 object.c           rb_define_global_const("FALSE", Qfalse);
rb_define_global_const 2259 re.c               rb_define_global_const("MatchingData", rb_cMatch);
rb_define_global_const  966 ruby.c         	rb_define_global_const("DATA", f);
rb_define_global_const 1164 ruby.c             rb_define_global_const("ARGV", rb_argv);
rb_define_global_const  514 ruby.h         void rb_define_global_const(const char*,VALUE);
rb_define_global_const   28 version.c          rb_define_global_const("RUBY_VERSION", v);
rb_define_global_const   29 version.c          rb_define_global_const("RUBY_RELEASE_DATE", d);
rb_define_global_const   30 version.c          rb_define_global_const("RUBY_PLATFORM", p);


rb_define_global_function

rb_define_global_function  996 error.c            rb_define_global_function("warn", rb_warn_m, 1);
rb_define_global_function 7630 eval.c             rb_define_global_function("eval", rb_f_eval, -1);
rb_define_global_function 7631 eval.c             rb_define_global_function("iterator?", rb_f_block_given_p, 0);
rb_define_global_function 7632 eval.c             rb_define_global_function("block_given?", rb_f_block_given_p, 0);
rb_define_global_function 7633 eval.c             rb_define_global_function("method_missing", rb_method_missing, -1);
rb_define_global_function 7634 eval.c             rb_define_global_function("loop", rb_f_loop, 0);
rb_define_global_function 7641 eval.c             rb_define_global_function("raise", rb_f_raise, -1);
rb_define_global_function 7642 eval.c             rb_define_global_function("fail", rb_f_raise, -1);
rb_define_global_function 7644 eval.c             rb_define_global_function("caller", rb_f_caller, -1);
rb_define_global_function 7646 eval.c             rb_define_global_function("exit", rb_f_exit, -1);
rb_define_global_function 7647 eval.c             rb_define_global_function("abort", rb_f_abort, -1);
rb_define_global_function 7649 eval.c             rb_define_global_function("at_exit", rb_f_at_exit, 0);
rb_define_global_function 7651 eval.c             rb_define_global_function("catch", rb_f_catch, 1);
rb_define_global_function 7652 eval.c             rb_define_global_function("throw", rb_f_throw, -1);
rb_define_global_function 7653 eval.c             rb_define_global_function("global_variables", rb_f_global_variables, 0); /* in variable.c */
rb_define_global_function 7654 eval.c             rb_define_global_function("local_variables", rb_f_local_variables, 0);
rb_define_global_function 7696 eval.c             rb_define_global_function("trace_var", rb_f_trace_var, -1); /* in variable.c */
rb_define_global_function 7697 eval.c             rb_define_global_function("untrace_var", rb_f_untrace_var, -1); /* in variable.c */
rb_define_global_function 7699 eval.c             rb_define_global_function("set_trace_func", set_trace_func, 1);
rb_define_global_function 7795 eval.c             rb_define_global_function("load", rb_f_load, -1);
rb_define_global_function 7796 eval.c             rb_define_global_function("require", rb_f_require, 1);
rb_define_global_function 7799 eval.c             rb_define_global_function("autoload",  rb_f_autoload,   2);
rb_define_global_function 7800 eval.c             rb_define_global_function("autoload?", rb_f_autoload_p, 1);
rb_define_global_function 9409 eval.c             rb_define_global_function("proc", rb_block_proc, 0);
rb_define_global_function 9410 eval.c             rb_define_global_function("lambda", proc_lambda, 0);
rb_define_global_function 9486 eval.c             rb_define_global_function("binding", rb_f_binding, 0);
rb_define_global_function 12883 eval.c             rb_define_global_function("callcc", rb_callcc, 0);
rb_define_global_function 1255 ext/bigdecimal/bigdecimal.c     rb_define_global_function("BigDecimal", BigDecimal_global_new, -1);
rb_define_global_function 4364 file.c             rb_define_global_function("test", rb_f_test, -1);
rb_define_global_function 5447 io.c               rb_define_global_function("syscall", rb_f_syscall, -1);
rb_define_global_function 5449 io.c               rb_define_global_function("open", rb_f_open, -1);
rb_define_global_function 5450 io.c               rb_define_global_function("printf", rb_f_printf, -1);
rb_define_global_function 5451 io.c               rb_define_global_function("print", rb_f_print, -1);
rb_define_global_function 5452 io.c               rb_define_global_function("putc", rb_f_putc, 1);
rb_define_global_function 5453 io.c               rb_define_global_function("puts", rb_f_puts, -1);
rb_define_global_function 5454 io.c               rb_define_global_function("gets", rb_f_gets, -1);
rb_define_global_function 5455 io.c               rb_define_global_function("readline", rb_f_readline, -1);
rb_define_global_function 5456 io.c               rb_define_global_function("getc", rb_f_getc, 0);
rb_define_global_function 5457 io.c               rb_define_global_function("select", rb_f_select, -1);
rb_define_global_function 5459 io.c               rb_define_global_function("readlines", rb_f_readlines, -1);
rb_define_global_function 5461 io.c               rb_define_global_function("`", rb_f_backquote, 1);
rb_define_global_function 5463 io.c               rb_define_global_function("p", rb_f_p, -1);
rb_define_global_function 2434 object.c           rb_define_global_function("sprintf", rb_f_sprintf, -1); /* in sprintf.c */
rb_define_global_function 2435 object.c           rb_define_global_function("format", rb_f_sprintf, -1);  /* in sprintf.c */
rb_define_global_function 2437 object.c           rb_define_global_function("Integer", rb_f_integer, 1);
rb_define_global_function 2438 object.c           rb_define_global_function("Float", rb_f_float, 1);
rb_define_global_function 2440 object.c           rb_define_global_function("String", rb_f_string, 1);
rb_define_global_function 2441 object.c           rb_define_global_function("Array", rb_f_array, 1);
rb_define_global_function 3564 process.c          rb_define_global_function("exec", rb_f_exec, -1);
rb_define_global_function 3565 process.c          rb_define_global_function("fork", rb_f_fork, 0);
rb_define_global_function 3566 process.c          rb_define_global_function("exit!", rb_f_exit_bang, -1);
rb_define_global_function 3567 process.c          rb_define_global_function("system", rb_f_system, -1);
rb_define_global_function 3568 process.c          rb_define_global_function("spawn", rb_f_spawn, -1);
rb_define_global_function 3569 process.c          rb_define_global_function("sleep", rb_f_sleep, -1);
rb_define_global_function  492 random.c           rb_define_global_function("srand", rb_f_srand, -1);
rb_define_global_function  493 random.c           rb_define_global_function("rand", rb_f_rand, -1);
rb_define_global_function 1117 regexec.c        rb_define_global_function("onig_stat_print", onig_stat_print, 0);
rb_define_global_function  519 ruby.h         void rb_define_global_function(const char*,VALUE(*)(ANYARGS),int);
rb_define_global_function  925 signal.c           rb_define_global_function("trap", sig_trap, -1);


rb_define_hooked_variable

rb_define_hooked_variable 7628 eval.c             rb_define_hooked_variable("$!", &ruby_errinfo, 0, errinfo_setter);
rb_define_hooked_variable 5484 io.c               rb_define_hooked_variable("$,", &rb_output_fs, 0, rb_str_setter);
rb_define_hooked_variable 5490 io.c               rb_define_hooked_variable("$/", &rb_rs, 0, rb_str_setter);
rb_define_hooked_variable 5491 io.c               rb_define_hooked_variable("$-0", &rb_rs, 0, rb_str_setter);
rb_define_hooked_variable 5492 io.c               rb_define_hooked_variable("$\\", &rb_output_rs, 0, rb_str_setter);
rb_define_hooked_variable 5494 io.c               rb_define_hooked_variable("$.", &lineno, 0, lineno_setter);
rb_define_hooked_variable 5563 io.c               rb_define_hooked_variable("$stdout", &rb_stdout, 0, stdout_setter);
rb_define_hooked_variable 5565 io.c               rb_define_hooked_variable("$stderr", &rb_stderr, 0, stdout_setter);
rb_define_hooked_variable 5567 io.c               rb_define_hooked_variable("$>", &rb_stdout, 0, stdout_setter);
rb_define_hooked_variable 5572 io.c               rb_define_hooked_variable("$defout", &rb_stdout, 0, defout_setter);
rb_define_hooked_variable 5573 io.c               rb_define_hooked_variable("$deferr", &rb_stderr, 0, deferr_setter);
rb_define_hooked_variable 1150 ruby.c             rb_define_hooked_variable("$VERBOSE", &ruby_verbose, 0, verbose_setter);
rb_define_hooked_variable 1151 ruby.c             rb_define_hooked_variable("$-v", &ruby_verbose, 0, verbose_setter);
rb_define_hooked_variable 1152 ruby.c             rb_define_hooked_variable("$-w", &ruby_verbose, 0, verbose_setter);
rb_define_hooked_variable 1159 ruby.c             rb_define_hooked_variable("$0", &rb_progname, 0, set_arg0);
rb_define_hooked_variable 1160 ruby.c             rb_define_hooked_variable("$PROGRAM_NAME", &rb_progname, 0, set_arg0);
rb_define_hooked_variable  511 ruby.h         void rb_define_hooked_variable(const char*,VALUE*,VALUE(*)(ANYARGS),void(*)(ANYARGS));
rb_define_hooked_variable  467 variable.c         rb_define_hooked_variable(name, var, 0, 0);
rb_define_hooked_variable  473 variable.c         rb_define_hooked_variable(name, var, 0, readonly_setter);
rb_define_hooked_variable  484 variable.c         rb_define_hooked_variable(name, 0, getter, setter);


rb_define_method

rb_define_method 2846 array.c            rb_define_method(rb_cArray, "initialize", rb_ary_initialize, -1);
rb_define_method 2847 array.c            rb_define_method(rb_cArray, "initialize_copy", rb_ary_replace, 1);
rb_define_method 2849 array.c            rb_define_method(rb_cArray, "to_s", rb_ary_to_s, 0);
rb_define_method 2850 array.c            rb_define_method(rb_cArray, "inspect", rb_ary_inspect, 0);
rb_define_method 2851 array.c            rb_define_method(rb_cArray, "to_a", rb_ary_to_a, 0);
rb_define_method 2852 array.c            rb_define_method(rb_cArray, "to_ary", rb_ary_to_ary_m, 0);
rb_define_method 2853 array.c            rb_define_method(rb_cArray, "frozen?",  rb_ary_frozen_p, 0);
rb_define_method 2855 array.c            rb_define_method(rb_cArray, "==", rb_ary_equal, 1);
rb_define_method 2856 array.c            rb_define_method(rb_cArray, "eql?", rb_ary_eql, 1);
rb_define_method 2857 array.c            rb_define_method(rb_cArray, "hash", rb_ary_hash, 0);
rb_define_method 2859 array.c            rb_define_method(rb_cArray, "[]", rb_ary_aref, -1);
rb_define_method 2860 array.c            rb_define_method(rb_cArray, "[]=", rb_ary_aset, -1);
rb_define_method 2861 array.c            rb_define_method(rb_cArray, "at", rb_ary_at, 1);
rb_define_method 2862 array.c            rb_define_method(rb_cArray, "fetch", rb_ary_fetch, -1);
rb_define_method 2863 array.c            rb_define_method(rb_cArray, "first", rb_ary_first, -1);
rb_define_method 2864 array.c            rb_define_method(rb_cArray, "last", rb_ary_last, -1);
rb_define_method 2865 array.c            rb_define_method(rb_cArray, "concat", rb_ary_concat, 1);
rb_define_method 2866 array.c            rb_define_method(rb_cArray, "<<", rb_ary_push, 1);
rb_define_method 2867 array.c            rb_define_method(rb_cArray, "push", rb_ary_push_m, -1);
rb_define_method 2868 array.c            rb_define_method(rb_cArray, "pop", rb_ary_pop_m, -1);
rb_define_method 2869 array.c            rb_define_method(rb_cArray, "shift", rb_ary_shift_m, -1);
rb_define_method 2870 array.c            rb_define_method(rb_cArray, "unshift", rb_ary_unshift_m, -1);
rb_define_method 2871 array.c            rb_define_method(rb_cArray, "insert", rb_ary_insert, -1);
rb_define_method 2872 array.c            rb_define_method(rb_cArray, "each", rb_ary_each, 0);
rb_define_method 2873 array.c            rb_define_method(rb_cArray, "each_index", rb_ary_each_index, 0);
rb_define_method 2874 array.c            rb_define_method(rb_cArray, "reverse_each", rb_ary_reverse_each, 0);
rb_define_method 2875 array.c            rb_define_method(rb_cArray, "length", rb_ary_length, 0);
rb_define_method 2877 array.c            rb_define_method(rb_cArray, "empty?", rb_ary_empty_p, 0);
rb_define_method 2878 array.c            rb_define_method(rb_cArray, "index", rb_ary_index, -1);
rb_define_method 2879 array.c            rb_define_method(rb_cArray, "rindex", rb_ary_rindex, -1);
rb_define_method 2880 array.c            rb_define_method(rb_cArray, "join", rb_ary_join_m, -1);
rb_define_method 2881 array.c            rb_define_method(rb_cArray, "reverse", rb_ary_reverse_m, 0);
rb_define_method 2882 array.c            rb_define_method(rb_cArray, "reverse!", rb_ary_reverse_bang, 0);
rb_define_method 2883 array.c            rb_define_method(rb_cArray, "sort", rb_ary_sort, 0);
rb_define_method 2884 array.c            rb_define_method(rb_cArray, "sort!", rb_ary_sort_bang, 0);
rb_define_method 2885 array.c            rb_define_method(rb_cArray, "collect", rb_ary_collect, 0);
rb_define_method 2886 array.c            rb_define_method(rb_cArray, "collect!", rb_ary_collect_bang, 0);
rb_define_method 2887 array.c            rb_define_method(rb_cArray, "map", rb_ary_collect, 0);
rb_define_method 2888 array.c            rb_define_method(rb_cArray, "map!", rb_ary_collect_bang, 0);
rb_define_method 2889 array.c            rb_define_method(rb_cArray, "select", rb_ary_select, 0);
rb_define_method 2890 array.c            rb_define_method(rb_cArray, "values_at", rb_ary_values_at, -1);
rb_define_method 2891 array.c            rb_define_method(rb_cArray, "delete", rb_ary_delete, 1);
rb_define_method 2892 array.c            rb_define_method(rb_cArray, "delete_at", rb_ary_delete_at_m, 1);
rb_define_method 2893 array.c            rb_define_method(rb_cArray, "delete_if", rb_ary_delete_if, 0);
rb_define_method 2894 array.c            rb_define_method(rb_cArray, "reject", rb_ary_reject, 0);
rb_define_method 2895 array.c            rb_define_method(rb_cArray, "reject!", rb_ary_reject_bang, 0);
rb_define_method 2896 array.c            rb_define_method(rb_cArray, "zip", rb_ary_zip, -1);
rb_define_method 2897 array.c            rb_define_method(rb_cArray, "transpose", rb_ary_transpose, 0);
rb_define_method 2898 array.c            rb_define_method(rb_cArray, "replace", rb_ary_replace, 1);
rb_define_method 2899 array.c            rb_define_method(rb_cArray, "clear", rb_ary_clear, 0);
rb_define_method 2900 array.c            rb_define_method(rb_cArray, "fill", rb_ary_fill, -1);
rb_define_method 2901 array.c            rb_define_method(rb_cArray, "include?", rb_ary_includes, 1);
rb_define_method 2902 array.c            rb_define_method(rb_cArray, "<=>", rb_ary_cmp, 1);
rb_define_method 2904 array.c            rb_define_method(rb_cArray, "slice", rb_ary_aref, -1);
rb_define_method 2905 array.c            rb_define_method(rb_cArray, "slice!", rb_ary_slice_bang, -1);
rb_define_method 2907 array.c            rb_define_method(rb_cArray, "assoc", rb_ary_assoc, 1);
rb_define_method 2908 array.c            rb_define_method(rb_cArray, "rassoc", rb_ary_rassoc, 1);
rb_define_method 2910 array.c            rb_define_method(rb_cArray, "+", rb_ary_plus, 1);
rb_define_method 2911 array.c            rb_define_method(rb_cArray, "*", rb_ary_times, 1);
rb_define_method 2913 array.c            rb_define_method(rb_cArray, "-", rb_ary_diff, 1);
rb_define_method 2914 array.c            rb_define_method(rb_cArray, "&", rb_ary_and, 1);
rb_define_method 2915 array.c            rb_define_method(rb_cArray, "|", rb_ary_or, 1);
rb_define_method 2917 array.c            rb_define_method(rb_cArray, "uniq", rb_ary_uniq, 0);
rb_define_method 2918 array.c            rb_define_method(rb_cArray, "uniq!", rb_ary_uniq_bang, 0);
rb_define_method 2919 array.c            rb_define_method(rb_cArray, "compact", rb_ary_compact, 0);
rb_define_method 2920 array.c            rb_define_method(rb_cArray, "compact!", rb_ary_compact_bang, 0);
rb_define_method 2921 array.c            rb_define_method(rb_cArray, "flatten", rb_ary_flatten, 0);
rb_define_method 2922 array.c            rb_define_method(rb_cArray, "flatten!", rb_ary_flatten_bang, 0);
rb_define_method 2923 array.c            rb_define_method(rb_cArray, "nitems", rb_ary_nitems, 0);
rb_define_method 1979 bignum.c           rb_define_method(rb_cBignum, "to_s", rb_big_to_s, -1);
rb_define_method 1980 bignum.c           rb_define_method(rb_cBignum, "coerce", rb_big_coerce, 1);
rb_define_method 1981 bignum.c           rb_define_method(rb_cBignum, "-@", rb_big_uminus, 0);
rb_define_method 1982 bignum.c           rb_define_method(rb_cBignum, "+", rb_big_plus, 1);
rb_define_method 1983 bignum.c           rb_define_method(rb_cBignum, "-", rb_big_minus, 1);
rb_define_method 1984 bignum.c           rb_define_method(rb_cBignum, "*", rb_big_mul, 1);
rb_define_method 1985 bignum.c           rb_define_method(rb_cBignum, "/", rb_big_div, 1);
rb_define_method 1986 bignum.c           rb_define_method(rb_cBignum, "%", rb_big_modulo, 1);
rb_define_method 1987 bignum.c           rb_define_method(rb_cBignum, "div", rb_big_div, 1);
rb_define_method 1988 bignum.c           rb_define_method(rb_cBignum, "divmod", rb_big_divmod, 1);
rb_define_method 1989 bignum.c           rb_define_method(rb_cBignum, "modulo", rb_big_modulo, 1);
rb_define_method 1990 bignum.c           rb_define_method(rb_cBignum, "remainder", rb_big_remainder, 1);
rb_define_method 1991 bignum.c           rb_define_method(rb_cBignum, "quo", rb_big_quo, 1);
rb_define_method 1992 bignum.c           rb_define_method(rb_cBignum, "**", rb_big_pow, 1);
rb_define_method 1993 bignum.c           rb_define_method(rb_cBignum, "&", rb_big_and, 1);
rb_define_method 1994 bignum.c           rb_define_method(rb_cBignum, "|", rb_big_or, 1);
rb_define_method 1995 bignum.c           rb_define_method(rb_cBignum, "^", rb_big_xor, 1);
rb_define_method 1996 bignum.c           rb_define_method(rb_cBignum, "~", rb_big_neg, 0);
rb_define_method 1997 bignum.c           rb_define_method(rb_cBignum, "<<", rb_big_lshift, 1);
rb_define_method 1998 bignum.c           rb_define_method(rb_cBignum, ">>", rb_big_rshift, 1);
rb_define_method 1999 bignum.c           rb_define_method(rb_cBignum, "[]", rb_big_aref, 1);
rb_define_method 2001 bignum.c           rb_define_method(rb_cBignum, "<=>", rb_big_cmp, 1);
rb_define_method 2002 bignum.c           rb_define_method(rb_cBignum, "==", rb_big_eq, 1);
rb_define_method 2003 bignum.c           rb_define_method(rb_cBignum, "eql?", rb_big_eql, 1);
rb_define_method 2004 bignum.c           rb_define_method(rb_cBignum, "hash", rb_big_hash, 0);
rb_define_method 2005 bignum.c           rb_define_method(rb_cBignum, "to_f", rb_big_to_f, 0);
rb_define_method 2006 bignum.c           rb_define_method(rb_cBignum, "abs", rb_big_abs, 0);
rb_define_method 2007 bignum.c           rb_define_method(rb_cBignum, "size", rb_big_size, 0);
rb_define_method  804 class.c            rb_define_method(rb_singleton_class(obj), name, func, argc);
rb_define_method  219 compar.c           rb_define_method(rb_mComparable, "==", cmp_equal, 1);
rb_define_method  220 compar.c           rb_define_method(rb_mComparable, ">", cmp_gt, 1);
rb_define_method  221 compar.c           rb_define_method(rb_mComparable, ">=", cmp_ge, 1);
rb_define_method  222 compar.c           rb_define_method(rb_mComparable, "<", cmp_lt, 1);
rb_define_method  223 compar.c           rb_define_method(rb_mComparable, "<=", cmp_le, 1);
rb_define_method  224 compar.c           rb_define_method(rb_mComparable, "between?", cmp_between, 2);
rb_define_method 1810 dir.c              rb_define_method(rb_cDir,"initialize", dir_initialize, 1);
rb_define_method 1811 dir.c              rb_define_method(rb_cDir,"path", dir_path, 0);
rb_define_method 1812 dir.c              rb_define_method(rb_cDir,"inspect", dir_inspect, 0);
rb_define_method 1813 dir.c              rb_define_method(rb_cDir,"read", dir_read, 0);
rb_define_method 1814 dir.c              rb_define_method(rb_cDir,"each", dir_each, 0);
rb_define_method 1815 dir.c              rb_define_method(rb_cDir,"rewind", dir_rewind, 0);
rb_define_method 1816 dir.c              rb_define_method(rb_cDir,"tell", dir_tell, 0);
rb_define_method 1817 dir.c              rb_define_method(rb_cDir,"seek", dir_seek, 1);
rb_define_method 1818 dir.c              rb_define_method(rb_cDir,"pos", dir_tell, 0);
rb_define_method 1819 dir.c              rb_define_method(rb_cDir,"pos=", dir_set_pos, 1);
rb_define_method 1820 dir.c              rb_define_method(rb_cDir,"close", dir_close, 0);
rb_define_method 1081 enum.c             rb_define_method(rb_mEnumerable,"to_a", enum_to_a, 0);
rb_define_method 1082 enum.c             rb_define_method(rb_mEnumerable,"entries", enum_to_a, 0);
rb_define_method 1084 enum.c             rb_define_method(rb_mEnumerable,"sort", enum_sort, 0);
rb_define_method 1085 enum.c             rb_define_method(rb_mEnumerable,"sort_by", enum_sort_by, 0);
rb_define_method 1086 enum.c             rb_define_method(rb_mEnumerable,"grep", enum_grep, 1);
rb_define_method 1087 enum.c             rb_define_method(rb_mEnumerable,"count", enum_count, -1);
rb_define_method 1088 enum.c             rb_define_method(rb_mEnumerable,"find", enum_find, -1);
rb_define_method 1089 enum.c             rb_define_method(rb_mEnumerable,"detect", enum_find, -1);
rb_define_method 1090 enum.c             rb_define_method(rb_mEnumerable,"find_all", enum_find_all, 0);
rb_define_method 1091 enum.c             rb_define_method(rb_mEnumerable,"select", enum_find_all, 0);
rb_define_method 1092 enum.c             rb_define_method(rb_mEnumerable,"reject", enum_reject, 0);
rb_define_method 1093 enum.c             rb_define_method(rb_mEnumerable,"collect", enum_collect, 0);
rb_define_method 1094 enum.c             rb_define_method(rb_mEnumerable,"map", enum_collect, 0);
rb_define_method 1095 enum.c             rb_define_method(rb_mEnumerable,"inject", enum_inject, -1);
rb_define_method 1096 enum.c             rb_define_method(rb_mEnumerable,"partition", enum_partition, 0);
rb_define_method 1097 enum.c             rb_define_method(rb_mEnumerable,"all?", enum_all, 0);
rb_define_method 1098 enum.c             rb_define_method(rb_mEnumerable,"any?", enum_any, 0);
rb_define_method 1099 enum.c             rb_define_method(rb_mEnumerable,"one?", enum_one, 0);
rb_define_method 1100 enum.c             rb_define_method(rb_mEnumerable,"none?", enum_none, 0);
rb_define_method 1101 enum.c             rb_define_method(rb_mEnumerable,"min", enum_min, 0);
rb_define_method 1102 enum.c             rb_define_method(rb_mEnumerable,"max", enum_max, 0);
rb_define_method 1103 enum.c             rb_define_method(rb_mEnumerable,"min_by", enum_min_by, 0);
rb_define_method 1104 enum.c             rb_define_method(rb_mEnumerable,"max_by", enum_max_by, 0);
rb_define_method 1105 enum.c             rb_define_method(rb_mEnumerable,"member?", enum_member, 1);
rb_define_method 1106 enum.c             rb_define_method(rb_mEnumerable,"include?", enum_member, 1);
rb_define_method 1107 enum.c             rb_define_method(rb_mEnumerable,"each_with_index", enum_each_with_index, 0);
rb_define_method 1108 enum.c             rb_define_method(rb_mEnumerable, "zip", enum_zip, -1);
rb_define_method  371 enumerator.c       rb_define_method(rb_mKernel, "to_enum", obj_to_enum, -1);
rb_define_method  372 enumerator.c       rb_define_method(rb_mKernel, "enum_for", obj_to_enum, -1);
rb_define_method  374 enumerator.c       rb_define_method(rb_mEnumerable, "enum_with_index", enumerator_enum_with_index, 0);
rb_define_method  375 enumerator.c       rb_define_method(rb_mEnumerable, "each_slice", enum_each_slice, 1);
rb_define_method  376 enumerator.c       rb_define_method(rb_mEnumerable, "enum_slice", enumerator_enum_slice, 1);
rb_define_method  377 enumerator.c       rb_define_method(rb_mEnumerable, "each_cons", enum_each_cons, 1);
rb_define_method  378 enumerator.c       rb_define_method(rb_mEnumerable, "enum_cons", enumerator_enum_cons, 1);
rb_define_method  384 enumerator.c       rb_define_method(rb_cEnumerator, "initialize", enumerator_initialize, -1);
rb_define_method  385 enumerator.c       rb_define_method(rb_cEnumerator, "each", enumerator_each, 0);
rb_define_method  386 enumerator.c       rb_define_method(rb_cEnumerator, "with_index", enumerator_with_index, 0);
rb_define_method  940 error.c            rb_define_method(rb_eException, "exception", exc_exception, -1);
rb_define_method  941 error.c            rb_define_method(rb_eException, "initialize", exc_initialize, -1);
rb_define_method  942 error.c            rb_define_method(rb_eException, "==", exc_equal, 1);
rb_define_method  943 error.c            rb_define_method(rb_eException, "to_s", exc_to_s, 0);
rb_define_method  944 error.c            rb_define_method(rb_eException, "message", exc_message, 0);
rb_define_method  945 error.c            rb_define_method(rb_eException, "inspect", exc_inspect, 0);
rb_define_method  946 error.c            rb_define_method(rb_eException, "backtrace", exc_backtrace, 0);
rb_define_method  947 error.c            rb_define_method(rb_eException, "set_backtrace", exc_set_backtrace, 1);
rb_define_method  950 error.c            rb_define_method(rb_eSystemExit, "initialize", exit_initialize, -1);
rb_define_method  951 error.c            rb_define_method(rb_eSystemExit, "status", exit_status, 0);
rb_define_method  952 error.c            rb_define_method(rb_eSystemExit, "success?", exit_success_p, 0);
rb_define_method  965 error.c            rb_define_method(rb_eNameError, "initialize", name_err_initialize, -1);
rb_define_method  966 error.c            rb_define_method(rb_eNameError, "name", name_err_name, 0);
rb_define_method  967 error.c            rb_define_method(rb_eNameError, "to_s", name_err_to_s, 0);
rb_define_method  970 error.c            rb_define_method(rb_cNameErrorMesg, "==", name_err_mesg_equal, 1);
rb_define_method  971 error.c            rb_define_method(rb_cNameErrorMesg, "to_str", name_err_mesg_to_str, 0);
rb_define_method  972 error.c            rb_define_method(rb_cNameErrorMesg, "_dump", name_err_mesg_to_str, 1);
rb_define_method  975 error.c            rb_define_method(rb_eNoMethodError, "initialize", nometh_err_initialize, -1);
rb_define_method  976 error.c            rb_define_method(rb_eNoMethodError, "args", nometh_err_args, 0);
rb_define_method  989 error.c            rb_define_method(rb_eSystemCallError, "initialize", syserr_initialize, -1);
rb_define_method  990 error.c            rb_define_method(rb_eSystemCallError, "errno", syserr_errno, 0);
rb_define_method 7636 eval.c             rb_define_method(rb_mKernel, "respond_to?", obj_respond_to, -1);
rb_define_method 7656 eval.c             rb_define_method(rb_mKernel, "send", rb_f_send, -1);
rb_define_method 7657 eval.c             rb_define_method(rb_mKernel, "__send__", rb_f_send, -1);
rb_define_method 7658 eval.c             rb_define_method(rb_mKernel, "funcall", rb_f_funcall, -1);
rb_define_method 7659 eval.c             rb_define_method(rb_mKernel, "instance_eval", rb_obj_instance_eval, -1);
rb_define_method 7660 eval.c             rb_define_method(rb_mKernel, "instance_exec", rb_obj_instance_exec, -1);
rb_define_method 7669 eval.c             rb_define_method(rb_cModule, "method_defined?", rb_mod_method_defined, 1);
rb_define_method 7670 eval.c             rb_define_method(rb_cModule, "public_method_defined?", rb_mod_public_method_defined, 1);
rb_define_method 7671 eval.c             rb_define_method(rb_cModule, "private_method_defined?", rb_mod_private_method_defined, 1);
rb_define_method 7672 eval.c             rb_define_method(rb_cModule, "protected_method_defined?", rb_mod_protected_method_defined, 1);
rb_define_method 7673 eval.c             rb_define_method(rb_cModule, "public_class_method", rb_mod_public_method, -1);
rb_define_method 7674 eval.c             rb_define_method(rb_cModule, "private_class_method", rb_mod_private_method, -1);
rb_define_method 7675 eval.c             rb_define_method(rb_cModule, "module_eval", rb_mod_module_eval, -1);
rb_define_method 7676 eval.c             rb_define_method(rb_cModule, "class_eval", rb_mod_module_eval, -1);
rb_define_method 7677 eval.c             rb_define_method(rb_cModule, "module_exec", rb_mod_module_exec, -1);
rb_define_method 7678 eval.c             rb_define_method(rb_cModule, "class_exec", rb_mod_module_exec, -1);
rb_define_method 7694 eval.c             rb_define_method(rb_mKernel, "extend", rb_obj_extend, -1);
rb_define_method 7797 eval.c             rb_define_method(rb_cModule, "autoload",  rb_mod_autoload,   2);
rb_define_method 7798 eval.c             rb_define_method(rb_cModule, "autoload?", rb_mod_autoload_p, 1);
rb_define_method 9382 eval.c             rb_define_method(rb_eLocalJumpError, "exit_value", localjump_xvalue, 0);
rb_define_method 9383 eval.c             rb_define_method(rb_eLocalJumpError, "reason", localjump_reason, 0);
rb_define_method 9397 eval.c             rb_define_method(rb_cProc, "clone", proc_clone, 0);
rb_define_method 9398 eval.c             rb_define_method(rb_cProc, "dup", proc_dup, 0);
rb_define_method 9399 eval.c             rb_define_method(rb_cProc, "call", rb_proc_call, -2);
rb_define_method 9400 eval.c             rb_define_method(rb_cProc, "arity", proc_arity, 0);
rb_define_method 9401 eval.c             rb_define_method(rb_cProc, "[]", rb_proc_call, -2);
rb_define_method 9402 eval.c             rb_define_method(rb_cProc, "==", proc_eq, 1);
rb_define_method 9403 eval.c             rb_define_method(rb_cProc, "eql?", proc_eq, 1);
rb_define_method 9404 eval.c             rb_define_method(rb_cProc, "hash", proc_hash, 0);
rb_define_method 9405 eval.c             rb_define_method(rb_cProc, "to_s", proc_to_s, 0);
rb_define_method 9406 eval.c             rb_define_method(rb_cProc, "to_proc", proc_to_self, 0);
rb_define_method 9407 eval.c             rb_define_method(rb_cProc, "binding", proc_binding, 0);
rb_define_method 9415 eval.c             rb_define_method(rb_cMethod, "==", method_eq, 1);
rb_define_method 9416 eval.c             rb_define_method(rb_cMethod, "eql?", method_eq, 1);
rb_define_method 9417 eval.c             rb_define_method(rb_cMethod, "hash", method_hash, 0);
rb_define_method 9418 eval.c             rb_define_method(rb_cMethod, "clone", method_clone, 0);
rb_define_method 9419 eval.c             rb_define_method(rb_cMethod, "call", rb_method_call, -1);
rb_define_method 9420 eval.c             rb_define_method(rb_cMethod, "[]", rb_method_call, -1);
rb_define_method 9421 eval.c             rb_define_method(rb_cMethod, "arity", method_arity_m, 0);
rb_define_method 9422 eval.c             rb_define_method(rb_cMethod, "inspect", method_inspect, 0);
rb_define_method 9423 eval.c             rb_define_method(rb_cMethod, "to_s", method_inspect, 0);
rb_define_method 9424 eval.c             rb_define_method(rb_cMethod, "to_proc", method_proc, 0);
rb_define_method 9425 eval.c             rb_define_method(rb_cMethod, "unbind", method_unbind, 0);
rb_define_method 9426 eval.c             rb_define_method(rb_mKernel, "method", rb_obj_method, 1);
rb_define_method 9431 eval.c             rb_define_method(rb_cUnboundMethod, "==", method_eq, 1);
rb_define_method 9432 eval.c             rb_define_method(rb_cUnboundMethod, "eql?", method_eq, 1);
rb_define_method 9433 eval.c             rb_define_method(rb_cUnboundMethod, "hash", method_hash, 0);
rb_define_method 9434 eval.c             rb_define_method(rb_cUnboundMethod, "clone", method_clone, 0);
rb_define_method 9435 eval.c             rb_define_method(rb_cUnboundMethod, "arity", method_arity_m, 0);
rb_define_method 9436 eval.c             rb_define_method(rb_cUnboundMethod, "inspect", method_inspect, 0);
rb_define_method 9437 eval.c             rb_define_method(rb_cUnboundMethod, "to_s", method_inspect, 0);
rb_define_method 9438 eval.c             rb_define_method(rb_cUnboundMethod, "bind", umethod_bind, 1);
rb_define_method 9439 eval.c             rb_define_method(rb_cModule, "instance_method", rb_mod_method, 1);
rb_define_method 9483 eval.c             rb_define_method(rb_cBinding, "clone", proc_clone, 0);
rb_define_method 9484 eval.c             rb_define_method(rb_cBinding, "dup", proc_dup, 0);
rb_define_method 9485 eval.c             rb_define_method(rb_cBinding, "eval", bind_eval, -1);
rb_define_method 12833 eval.c             rb_define_method(rb_cThread, "initialize", rb_thread_initialize, -2);
rb_define_method 12851 eval.c             rb_define_method(rb_cThread, "run", rb_thread_run, 0);
rb_define_method 12852 eval.c             rb_define_method(rb_cThread, "wakeup", rb_thread_wakeup, 0);
rb_define_method 12853 eval.c             rb_define_method(rb_cThread, "kill", rb_thread_kill, 0);
rb_define_method 12854 eval.c             rb_define_method(rb_cThread, "terminate", rb_thread_kill, 0);
rb_define_method 12855 eval.c             rb_define_method(rb_cThread, "exit", rb_thread_kill, 0);
rb_define_method 12856 eval.c             rb_define_method(rb_cThread, "value", rb_thread_value, 0);
rb_define_method 12857 eval.c             rb_define_method(rb_cThread, "status", rb_thread_status, 0);
rb_define_method 12858 eval.c             rb_define_method(rb_cThread, "join", rb_thread_join_m, -1);
rb_define_method 12859 eval.c             rb_define_method(rb_cThread, "alive?", rb_thread_alive_p, 0);
rb_define_method 12860 eval.c             rb_define_method(rb_cThread, "stop?", rb_thread_stop_p, 0);
rb_define_method 12861 eval.c             rb_define_method(rb_cThread, "raise", rb_thread_raise_m, -1);
rb_define_method 12863 eval.c             rb_define_method(rb_cThread, "abort_on_exception", rb_thread_abort_exc, 0);
rb_define_method 12864 eval.c             rb_define_method(rb_cThread, "abort_on_exception=", rb_thread_abort_exc_set, 1);
rb_define_method 12866 eval.c             rb_define_method(rb_cThread, "priority", rb_thread_priority, 0);
rb_define_method 12867 eval.c             rb_define_method(rb_cThread, "priority=", rb_thread_priority_set, 1);
rb_define_method 12868 eval.c             rb_define_method(rb_cThread, "safe_level", rb_thread_safe_level, 0);
rb_define_method 12869 eval.c             rb_define_method(rb_cThread, "group", rb_thread_group, 0);
rb_define_method 12871 eval.c             rb_define_method(rb_cThread, "[]", rb_thread_aref, 1);
rb_define_method 12872 eval.c             rb_define_method(rb_cThread, "[]=", rb_thread_aset, 2);
rb_define_method 12873 eval.c             rb_define_method(rb_cThread, "key?", rb_thread_key_p, 1);
rb_define_method 12874 eval.c             rb_define_method(rb_cThread, "keys", rb_thread_keys, 0);
rb_define_method 12876 eval.c             rb_define_method(rb_cThread, "inspect", rb_thread_inspect, 0);
rb_define_method 12881 eval.c             rb_define_method(rb_cCont, "call", rb_cont_call, -1);
rb_define_method 12882 eval.c             rb_define_method(rb_cCont, "[]", rb_cont_call, -1);
rb_define_method 12888 eval.c             rb_define_method(cThGroup, "list", thgroup_list, 0);
rb_define_method 12889 eval.c             rb_define_method(cThGroup, "enclose", thgroup_enclose, 0);
rb_define_method 12890 eval.c             rb_define_method(cThGroup, "enclosed?", thgroup_enclosed_p, 0);
rb_define_method 12891 eval.c             rb_define_method(cThGroup, "add", thgroup_add, 1);
rb_define_method  212 ext/Win32API/Win32API.c     rb_define_method(cWin32API, "initialize", Win32API_initialize, 4);
rb_define_method  213 ext/Win32API/Win32API.c     rb_define_method(cWin32API, "call", Win32API_Call, -1);
rb_define_method 1297 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "precs", BigDecimal_prec, 0);
rb_define_method 1298 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "add", BigDecimal_add2, 2);
rb_define_method 1299 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "sub", BigDecimal_sub2, 2);
rb_define_method 1300 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "mult", BigDecimal_mult2, 2);
rb_define_method 1301 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "div",BigDecimal_div2, -1);
rb_define_method 1302 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "hash", BigDecimal_hash, 0);
rb_define_method 1303 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "to_s", BigDecimal_to_s, -1);
rb_define_method 1304 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "to_i", BigDecimal_to_i, 0);
rb_define_method 1305 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "to_int", BigDecimal_to_i, 0);
rb_define_method 1306 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "split", BigDecimal_split, 0);
rb_define_method 1307 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "+", BigDecimal_add, 1);
rb_define_method 1308 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "-", BigDecimal_sub, 1);
rb_define_method 1309 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "+@", BigDecimal_uplus, 0);
rb_define_method 1310 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "-@", BigDecimal_neg, 0);
rb_define_method 1311 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "*", BigDecimal_mult, 1);
rb_define_method 1312 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "/", BigDecimal_div, 1);
rb_define_method 1313 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "quo", BigDecimal_div, 1);
rb_define_method 1314 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "%", BigDecimal_mod, 1);
rb_define_method 1315 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "modulo", BigDecimal_mod, 1);
rb_define_method 1316 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "remainder", BigDecimal_remainder, 1);
rb_define_method 1317 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "divmod", BigDecimal_divmod, 1);
rb_define_method 1319 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "to_f", BigDecimal_to_f, 0);
rb_define_method 1320 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "abs", BigDecimal_abs, 0);
rb_define_method 1321 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "sqrt", BigDecimal_sqrt, 1);
rb_define_method 1322 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "fix", BigDecimal_fix, 0);
rb_define_method 1323 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "round", BigDecimal_round, -1);
rb_define_method 1324 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "frac", BigDecimal_frac, 0);
rb_define_method 1325 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "floor", BigDecimal_floor, -1);
rb_define_method 1326 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "ceil", BigDecimal_ceil, -1);
rb_define_method 1327 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "power", BigDecimal_power, 1);
rb_define_method 1328 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "**", BigDecimal_power, 1);
rb_define_method 1329 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "<=>", BigDecimal_comp, 1);
rb_define_method 1330 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "==", BigDecimal_eq, 1);
rb_define_method 1331 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "===", BigDecimal_eq, 1);
rb_define_method 1332 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "eql?", BigDecimal_eq, 1);
rb_define_method 1333 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "!=", BigDecimal_ne, 1);
rb_define_method 1334 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "<", BigDecimal_lt, 1);
rb_define_method 1335 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "<=", BigDecimal_le, 1);
rb_define_method 1336 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, ">", BigDecimal_gt, 1);
rb_define_method 1337 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, ">=", BigDecimal_ge, 1);
rb_define_method 1338 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "zero?", BigDecimal_zero, 0);
rb_define_method 1339 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "nonzero?", BigDecimal_nonzero, 0);
rb_define_method 1340 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "coerce", BigDecimal_coerce, 1);
rb_define_method 1341 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "inspect", BigDecimal_inspect, 0);
rb_define_method 1342 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "exponent", BigDecimal_exponent, 0);
rb_define_method 1343 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "sign", BigDecimal_sign, 0);
rb_define_method 1344 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "nan?",      BigDecimal_IsNaN, 0);
rb_define_method 1345 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "infinite?", BigDecimal_IsInfinite, 0);
rb_define_method 1346 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "finite?",   BigDecimal_IsFinite, 0);
rb_define_method 1347 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "truncate",  BigDecimal_truncate, -1);
rb_define_method 1348 ext/bigdecimal/bigdecimal.c     rb_define_method(rb_cBigDecimal, "_dump", BigDecimal_dump, -1);
rb_define_method 1453 ext/curses/curses.c     rb_define_method(cMouseEvent, "eid", curs_mouse_id, 0);
rb_define_method 1454 ext/curses/curses.c     rb_define_method(cMouseEvent, "x", curs_mouse_x, 0);
rb_define_method 1455 ext/curses/curses.c     rb_define_method(cMouseEvent, "y", curs_mouse_y, 0);
rb_define_method 1456 ext/curses/curses.c     rb_define_method(cMouseEvent, "z", curs_mouse_z, 0);
rb_define_method 1457 ext/curses/curses.c     rb_define_method(cMouseEvent, "bstate", curs_mouse_bstate, 0);
rb_define_method 1531 ext/curses/curses.c     rb_define_method(cWindow, "initialize", window_initialize, 4);
rb_define_method 1532 ext/curses/curses.c     rb_define_method(cWindow, "subwin", window_subwin, 4);
rb_define_method 1533 ext/curses/curses.c     rb_define_method(cWindow, "close", window_close, 0);
rb_define_method 1534 ext/curses/curses.c     rb_define_method(cWindow, "clear", window_clear, 0);
rb_define_method 1535 ext/curses/curses.c     rb_define_method(cWindow, "clrtoeol", window_clrtoeol, 0);
rb_define_method 1536 ext/curses/curses.c     rb_define_method(cWindow, "refresh", window_refresh, 0);
rb_define_method 1537 ext/curses/curses.c     rb_define_method(cWindow, "noutrefresh", window_noutrefresh, 0);
rb_define_method 1538 ext/curses/curses.c     rb_define_method(cWindow, "box", window_box, -1);
rb_define_method 1539 ext/curses/curses.c     rb_define_method(cWindow, "move", window_move, 2);
rb_define_method 1540 ext/curses/curses.c     rb_define_method(cWindow, "setpos", window_setpos, 2);
rb_define_method 1542 ext/curses/curses.c     rb_define_method(cWindow, "color_set", window_color_set, 1);
rb_define_method 1544 ext/curses/curses.c     rb_define_method(cWindow, "cury", window_cury, 0);
rb_define_method 1545 ext/curses/curses.c     rb_define_method(cWindow, "curx", window_curx, 0);
rb_define_method 1546 ext/curses/curses.c     rb_define_method(cWindow, "maxy", window_maxy, 0);
rb_define_method 1547 ext/curses/curses.c     rb_define_method(cWindow, "maxx", window_maxx, 0);
rb_define_method 1548 ext/curses/curses.c     rb_define_method(cWindow, "begy", window_begy, 0);
rb_define_method 1549 ext/curses/curses.c     rb_define_method(cWindow, "begx", window_begx, 0);
rb_define_method 1550 ext/curses/curses.c     rb_define_method(cWindow, "standout", window_standout, 0);
rb_define_method 1551 ext/curses/curses.c     rb_define_method(cWindow, "standend", window_standend, 0);
rb_define_method 1552 ext/curses/curses.c     rb_define_method(cWindow, "inch", window_inch, 0);
rb_define_method 1553 ext/curses/curses.c     rb_define_method(cWindow, "addch", window_addch, 1);
rb_define_method 1554 ext/curses/curses.c     rb_define_method(cWindow, "insch", window_insch, 1);
rb_define_method 1555 ext/curses/curses.c     rb_define_method(cWindow, "addstr", window_addstr, 1);
rb_define_method 1556 ext/curses/curses.c     rb_define_method(cWindow, "<<", window_addstr2, 1);
rb_define_method 1557 ext/curses/curses.c     rb_define_method(cWindow, "getch", window_getch, 0);
rb_define_method 1558 ext/curses/curses.c     rb_define_method(cWindow, "getstr", window_getstr, 0);
rb_define_method 1559 ext/curses/curses.c     rb_define_method(cWindow, "delch", window_delch, 0);
rb_define_method 1560 ext/curses/curses.c     rb_define_method(cWindow, "deleteln", window_deleteln, 0);
rb_define_method 1561 ext/curses/curses.c     rb_define_method(cWindow, "insertln", window_insertln, 0);
rb_define_method 1562 ext/curses/curses.c     rb_define_method(cWindow, "scroll", window_scroll, 0);
rb_define_method 1563 ext/curses/curses.c     rb_define_method(cWindow, "scrollok", window_scrollok, 1);
rb_define_method 1564 ext/curses/curses.c     rb_define_method(cWindow, "idlok", window_idlok, 1);
rb_define_method 1565 ext/curses/curses.c     rb_define_method(cWindow, "setscrreg", window_setscrreg, 2);
rb_define_method 1566 ext/curses/curses.c     rb_define_method(cWindow, "scrl", window_scrl, 1);
rb_define_method 1567 ext/curses/curses.c     rb_define_method(cWindow, "resize", window_resize, 2);
rb_define_method 1568 ext/curses/curses.c     rb_define_method(cWindow, "keypad", window_keypad, 1);
rb_define_method 1569 ext/curses/curses.c     rb_define_method(cWindow, "keypad=", window_keypad, 1);
rb_define_method 1571 ext/curses/curses.c     rb_define_method(cWindow, "attroff", window_attroff, 1);
rb_define_method 1572 ext/curses/curses.c     rb_define_method(cWindow, "attron", window_attron, 1);
rb_define_method 1573 ext/curses/curses.c     rb_define_method(cWindow, "attrset", window_attrset, 1);
rb_define_method 1574 ext/curses/curses.c     rb_define_method(cWindow, "bkgdset", window_bkgdset, 1);
rb_define_method 1575 ext/curses/curses.c     rb_define_method(cWindow, "bkgd", window_bkgd, 1);
rb_define_method 1576 ext/curses/curses.c     rb_define_method(cWindow, "getbkgd", window_getbkgd, 0);
rb_define_method 1578 ext/curses/curses.c     rb_define_method(cWindow, "nodelay=", window_nodelay, 1);
rb_define_method 1579 ext/curses/curses.c     rb_define_method(cWindow, "timeout=", window_timeout, 1);
rb_define_method  734 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "initialize", fdbm_initialize, -1);
rb_define_method  735 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "close", fdbm_close, 0);
rb_define_method  736 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "closed?", fdbm_closed, 0);
rb_define_method  737 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "[]", fdbm_aref, 1);
rb_define_method  738 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "fetch", fdbm_fetch_m, -1);
rb_define_method  739 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "[]=", fdbm_store, 2);
rb_define_method  740 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "store", fdbm_store, 2);
rb_define_method  741 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "index",  fdbm_index, 1);
rb_define_method  742 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "select",  fdbm_select, 0);
rb_define_method  743 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "values_at", fdbm_values_at, -1);
rb_define_method  744 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "length", fdbm_length, 0);
rb_define_method  745 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "size", fdbm_length, 0);
rb_define_method  746 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "empty?", fdbm_empty_p, 0);
rb_define_method  747 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "each", fdbm_each_pair, 0);
rb_define_method  748 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "each_value", fdbm_each_value, 0);
rb_define_method  749 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "each_key", fdbm_each_key, 0);
rb_define_method  750 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "each_pair", fdbm_each_pair, 0);
rb_define_method  751 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "keys", fdbm_keys, 0);
rb_define_method  752 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "values", fdbm_values, 0);
rb_define_method  753 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "shift", fdbm_shift, 0);
rb_define_method  754 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "delete", fdbm_delete, 1);
rb_define_method  755 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "delete_if", fdbm_delete_if, 0);
rb_define_method  756 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "reject!", fdbm_delete_if, 0);
rb_define_method  757 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "reject", fdbm_reject, 0);
rb_define_method  758 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "clear", fdbm_clear, 0);
rb_define_method  759 ext/dbm/dbm.c      rb_define_method(rb_cDBM,"invert", fdbm_invert, 0);
rb_define_method  760 ext/dbm/dbm.c      rb_define_method(rb_cDBM,"update", fdbm_update, 1);
rb_define_method  761 ext/dbm/dbm.c      rb_define_method(rb_cDBM,"replace", fdbm_replace, 1);
rb_define_method  763 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "include?", fdbm_has_key, 1);
rb_define_method  764 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "has_key?", fdbm_has_key, 1);
rb_define_method  765 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "member?", fdbm_has_key, 1);
rb_define_method  766 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "has_value?", fdbm_has_value, 1);
rb_define_method  767 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "key?", fdbm_has_key, 1);
rb_define_method  768 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "value?", fdbm_has_value, 1);
rb_define_method  770 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "to_a", fdbm_to_a, 0);
rb_define_method  771 ext/dbm/dbm.c      rb_define_method(rb_cDBM, "to_hash", fdbm_to_hash, 0);
rb_define_method  261 ext/digest/digest.c     rb_define_method(cDigest_Base, "initialize", rb_digest_base_init, -1);
rb_define_method  262 ext/digest/digest.c     rb_define_method(cDigest_Base, "initialize_copy",  rb_digest_base_copy, 1);
rb_define_method  263 ext/digest/digest.c     rb_define_method(cDigest_Base, "update", rb_digest_base_update, 1);
rb_define_method  264 ext/digest/digest.c     rb_define_method(cDigest_Base, "<<", rb_digest_base_update, 1);
rb_define_method  265 ext/digest/digest.c     rb_define_method(cDigest_Base, "digest", rb_digest_base_digest, 0);
rb_define_method  266 ext/digest/digest.c     rb_define_method(cDigest_Base, "hexdigest", rb_digest_base_hexdigest, 0);
rb_define_method  267 ext/digest/digest.c     rb_define_method(cDigest_Base, "to_s", rb_digest_base_hexdigest, 0);
rb_define_method  268 ext/digest/digest.c     rb_define_method(cDigest_Base, "==", rb_digest_base_equal, 1);
rb_define_method  501 ext/dl/cfunc.c     rb_define_method(rb_cDLCFunc, "initialize", rb_dlcfunc_initialize, -1);
rb_define_method  502 ext/dl/cfunc.c     rb_define_method(rb_cDLCFunc, "call", rb_dlcfunc_call, 1);
rb_define_method  503 ext/dl/cfunc.c     rb_define_method(rb_cDLCFunc, "[]",   rb_dlcfunc_call, 1);
rb_define_method  504 ext/dl/cfunc.c     rb_define_method(rb_cDLCFunc, "name", rb_dlcfunc_name, 0);
rb_define_method  505 ext/dl/cfunc.c     rb_define_method(rb_cDLCFunc, "ctype", rb_dlcfunc_ctype, 0);
rb_define_method  506 ext/dl/cfunc.c     rb_define_method(rb_cDLCFunc, "ctype=", rb_dlcfunc_set_ctype, 1);
rb_define_method  507 ext/dl/cfunc.c     rb_define_method(rb_cDLCFunc, "calltype", rb_dlcfunc_calltype, 0);
rb_define_method  508 ext/dl/cfunc.c     rb_define_method(rb_cDLCFunc, "calltype=", rb_dlcfunc_set_calltype, 1);
rb_define_method  509 ext/dl/cfunc.c     rb_define_method(rb_cDLCFunc, "ptr",  rb_dlcfunc_ptr, 0);
rb_define_method  510 ext/dl/cfunc.c     rb_define_method(rb_cDLCFunc, "ptr=", rb_dlcfunc_set_ptr, 1);
rb_define_method  511 ext/dl/cfunc.c     rb_define_method(rb_cDLCFunc, "inspect", rb_dlcfunc_inspect, 0);
rb_define_method  512 ext/dl/cfunc.c     rb_define_method(rb_cDLCFunc, "to_s", rb_dlcfunc_inspect, 0);
rb_define_method  513 ext/dl/cfunc.c     rb_define_method(rb_cDLCFunc, "to_i", rb_dlcfunc_to_i, 0);
rb_define_method  459 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "initialize", rb_dlptr_initialize, -1);
rb_define_method  460 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "free=", rb_dlptr_free_set, 1);
rb_define_method  461 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "free",  rb_dlptr_free_get, 0);
rb_define_method  462 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "to_i",  rb_dlptr_to_i, 0);
rb_define_method  463 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "to_value",  rb_dlptr_to_value, 0);
rb_define_method  464 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "ptr",   rb_dlptr_ptr, 0);
rb_define_method  465 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "+@", rb_dlptr_ptr, 0);
rb_define_method  466 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "ref",   rb_dlptr_ref, 0);
rb_define_method  467 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "-@", rb_dlptr_ref, 0);
rb_define_method  468 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "null?", rb_dlptr_null_p, 0);
rb_define_method  469 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "to_s", rb_dlptr_to_s, -1);
rb_define_method  470 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "to_str", rb_dlptr_to_str, -1);
rb_define_method  471 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "inspect", rb_dlptr_inspect, 0);
rb_define_method  472 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "<=>", rb_dlptr_cmp, 1);
rb_define_method  473 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "==", rb_dlptr_eql, 1);
rb_define_method  474 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "eql?", rb_dlptr_eql, 1);
rb_define_method  475 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "+", rb_dlptr_plus, 1);
rb_define_method  476 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "-", rb_dlptr_minus, 1);
rb_define_method  477 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "[]", rb_dlptr_aref, -1);
rb_define_method  478 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "[]=", rb_dlptr_aset, -1);
rb_define_method  479 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "size", rb_dlptr_size, -1);
rb_define_method  480 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "size=", rb_dlptr_size, -1);
rb_define_method  220 ext/dl/handle.c     rb_define_method(rb_cDLHandle, "initialize", rb_dlhandle_initialize, -1);
rb_define_method  221 ext/dl/handle.c     rb_define_method(rb_cDLHandle, "to_i", rb_dlhandle_to_i, 0);
rb_define_method  222 ext/dl/handle.c     rb_define_method(rb_cDLHandle, "close", rb_dlhandle_close, 0);
rb_define_method  223 ext/dl/handle.c     rb_define_method(rb_cDLHandle, "sym",  rb_dlhandle_sym, 1);
rb_define_method  224 ext/dl/handle.c     rb_define_method(rb_cDLHandle, "[]",  rb_dlhandle_sym,  1);
rb_define_method  225 ext/dl/handle.c     rb_define_method(rb_cDLHandle, "disable_close", rb_dlhandle_disable_close, 0);
rb_define_method  226 ext/dl/handle.c     rb_define_method(rb_cDLHandle, "enable_close", rb_dlhandle_enable_close, 0);
rb_define_method  924 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "initialize", fgdbm_initialize, -1);
rb_define_method  925 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "close", fgdbm_close, 0);
rb_define_method  926 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "closed?", fgdbm_closed, 0);
rb_define_method  927 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "[]", fgdbm_aref, 1);
rb_define_method  928 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "fetch", fgdbm_fetch_m, -1);
rb_define_method  929 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "[]=", fgdbm_store, 2);
rb_define_method  930 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "store", fgdbm_store, 2);
rb_define_method  931 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "index",  fgdbm_index, 1);
rb_define_method  932 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "select",  fgdbm_select, 0);
rb_define_method  933 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "values_at",  fgdbm_values_at, -1);
rb_define_method  934 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "length", fgdbm_length, 0);
rb_define_method  935 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "size", fgdbm_length, 0);
rb_define_method  936 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "empty?", fgdbm_empty_p, 0);
rb_define_method  937 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "each", fgdbm_each_pair, 0);
rb_define_method  938 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "each_value", fgdbm_each_value, 0);
rb_define_method  939 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "each_key", fgdbm_each_key, 0);
rb_define_method  940 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "each_pair", fgdbm_each_pair, 0);
rb_define_method  941 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "keys", fgdbm_keys, 0);
rb_define_method  942 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "values", fgdbm_values, 0);
rb_define_method  943 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "shift", fgdbm_shift, 0);
rb_define_method  944 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "delete", fgdbm_delete, 1);
rb_define_method  945 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "delete_if", fgdbm_delete_if, 0);
rb_define_method  946 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "reject!", fgdbm_delete_if, 0);
rb_define_method  947 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "reject", fgdbm_reject, 0);
rb_define_method  948 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "clear", fgdbm_clear, 0);
rb_define_method  949 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM,"invert", fgdbm_invert, 0);
rb_define_method  950 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM,"update", fgdbm_update, 1);
rb_define_method  951 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM,"replace", fgdbm_replace, 1);
rb_define_method  952 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM,"reorganize", fgdbm_reorganize, 0);
rb_define_method  953 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM,"sync", fgdbm_sync, 0);
rb_define_method  955 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM,"cachesize=", fgdbm_set_cachesize, 1);
rb_define_method  956 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM,"fastmode=", fgdbm_set_fastmode, 1);
rb_define_method  957 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM,"syncmode=", fgdbm_set_syncmode, 1);
rb_define_method  959 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "include?", fgdbm_has_key, 1);
rb_define_method  960 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "has_key?", fgdbm_has_key, 1);
rb_define_method  961 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "member?", fgdbm_has_key, 1);
rb_define_method  962 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "has_value?", fgdbm_has_value, 1);
rb_define_method  963 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "key?", fgdbm_has_key, 1);
rb_define_method  964 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "value?", fgdbm_has_value, 1);
rb_define_method  966 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "to_a", fgdbm_to_a, 0);
rb_define_method  967 ext/gdbm/gdbm.c     rb_define_method(rb_cGDBM, "to_hash", fgdbm_to_hash, 0);
rb_define_method 1054 ext/iconv/iconv.c     rb_define_method(rb_cIconv, "initialize", iconv_initialize, -1);
rb_define_method 1055 ext/iconv/iconv.c     rb_define_method(rb_cIconv, "close", iconv_finish, 0);
rb_define_method 1056 ext/iconv/iconv.c     rb_define_method(rb_cIconv, "iconv", iconv_iconv, -1);
rb_define_method 1057 ext/iconv/iconv.c     rb_define_method(rb_cIconv, "conv", iconv_conv, -1);
rb_define_method 1058 ext/iconv/iconv.c     rb_define_method(rb_cIconv, "trivial?", iconv_trivialp, 0);
rb_define_method 1059 ext/iconv/iconv.c     rb_define_method(rb_cIconv, "transliterate?", iconv_get_transliterate, 0);
rb_define_method 1060 ext/iconv/iconv.c     rb_define_method(rb_cIconv, "transliterate=", iconv_set_transliterate, 1);
rb_define_method 1061 ext/iconv/iconv.c     rb_define_method(rb_cIconv, "discard_ilseq?", iconv_get_discard_ilseq, 0);
rb_define_method 1062 ext/iconv/iconv.c     rb_define_method(rb_cIconv, "discard_ilseq=", iconv_set_discard_ilseq, 1);
rb_define_method 1065 ext/iconv/iconv.c     rb_define_method(rb_eIconvFailure, "initialize", iconv_failure_initialize, 3);
rb_define_method 1066 ext/iconv/iconv.c     rb_define_method(rb_eIconvFailure, "success", iconv_failure_success, 0);
rb_define_method 1067 ext/iconv/iconv.c     rb_define_method(rb_eIconvFailure, "failed", iconv_failure_failed, 0);
rb_define_method 1068 ext/iconv/iconv.c     rb_define_method(rb_eIconvFailure, "inspect", iconv_failure_inspect, 0);
rb_define_method  141 ext/io/wait/wait.c     rb_define_method(rb_cIO, "ready?", io_ready_p, 0);
rb_define_method  142 ext/io/wait/wait.c     rb_define_method(rb_cIO, "wait", io_wait, -1);
rb_define_method 1114 ext/openssl/ossl_asn1.c     rb_define_method(cASN1Data, "initialize", ossl_asn1data_initialize, 3);
rb_define_method 1115 ext/openssl/ossl_asn1.c     rb_define_method(cASN1Data, "to_der", ossl_asn1data_to_der, 0);
rb_define_method 1119 ext/openssl/ossl_asn1.c     rb_define_method(cASN1Primitive, "initialize", ossl_asn1_initialize, -1);
rb_define_method 1120 ext/openssl/ossl_asn1.c     rb_define_method(cASN1Primitive, "to_der", ossl_asn1prim_to_der, 0);
rb_define_method 1125 ext/openssl/ossl_asn1.c     rb_define_method(cASN1Constructive, "initialize", ossl_asn1_initialize, -1);
rb_define_method 1126 ext/openssl/ossl_asn1.c     rb_define_method(cASN1Constructive, "to_der", ossl_asn1cons_to_der, 0);
rb_define_method 1127 ext/openssl/ossl_asn1.c     rb_define_method(cASN1Constructive, "each", ossl_asn1cons_each, 0);
rb_define_method 1160 ext/openssl/ossl_asn1.c     rb_define_method(cASN1ObjectId, "sn", ossl_asn1obj_get_sn, 0);
rb_define_method 1161 ext/openssl/ossl_asn1.c     rb_define_method(cASN1ObjectId, "ln", ossl_asn1obj_get_ln, 0);
rb_define_method 1162 ext/openssl/ossl_asn1.c     rb_define_method(cASN1ObjectId, "oid", ossl_asn1obj_get_oid, 0);
rb_define_method  612 ext/openssl/ossl_bn.c     rb_define_method(cBN, "initialize", ossl_bn_initialize, -1);
rb_define_method  615 ext/openssl/ossl_bn.c     rb_define_method(cBN, "copy", ossl_bn_copy, 1);
rb_define_method  619 ext/openssl/ossl_bn.c     rb_define_method(cBN, "num_bytes", ossl_bn_num_bytes, 0);
rb_define_method  620 ext/openssl/ossl_bn.c     rb_define_method(cBN, "num_bits", ossl_bn_num_bits, 0);
rb_define_method  623 ext/openssl/ossl_bn.c     rb_define_method(cBN, "+", ossl_bn_add, 1);
rb_define_method  624 ext/openssl/ossl_bn.c     rb_define_method(cBN, "-", ossl_bn_sub, 1);
rb_define_method  625 ext/openssl/ossl_bn.c     rb_define_method(cBN, "*", ossl_bn_mul, 1);
rb_define_method  626 ext/openssl/ossl_bn.c     rb_define_method(cBN, "sqr", ossl_bn_sqr, 0);
rb_define_method  627 ext/openssl/ossl_bn.c     rb_define_method(cBN, "/", ossl_bn_div, 1);
rb_define_method  628 ext/openssl/ossl_bn.c     rb_define_method(cBN, "%", ossl_bn_mod, 1);
rb_define_method  631 ext/openssl/ossl_bn.c     rb_define_method(cBN, "mod_add", ossl_bn_mod_add, 2);
rb_define_method  632 ext/openssl/ossl_bn.c     rb_define_method(cBN, "mod_sub", ossl_bn_mod_sub, 2);
rb_define_method  633 ext/openssl/ossl_bn.c     rb_define_method(cBN, "mod_mul", ossl_bn_mod_mul, 2);
rb_define_method  634 ext/openssl/ossl_bn.c     rb_define_method(cBN, "mod_sqr", ossl_bn_mod_sqr, 1);
rb_define_method  635 ext/openssl/ossl_bn.c     rb_define_method(cBN, "**", ossl_bn_exp, 1);
rb_define_method  636 ext/openssl/ossl_bn.c     rb_define_method(cBN, "mod_exp", ossl_bn_mod_exp, 2);
rb_define_method  637 ext/openssl/ossl_bn.c     rb_define_method(cBN, "gcd", ossl_bn_gcd, 1);
rb_define_method  645 ext/openssl/ossl_bn.c     rb_define_method(cBN, "cmp", ossl_bn_cmp, 1);
rb_define_method  647 ext/openssl/ossl_bn.c     rb_define_method(cBN, "ucmp", ossl_bn_ucmp, 1);
rb_define_method  648 ext/openssl/ossl_bn.c     rb_define_method(cBN, "eql?", ossl_bn_eql, 1);
rb_define_method  651 ext/openssl/ossl_bn.c     rb_define_method(cBN, "zero?", ossl_bn_is_zero, 0);
rb_define_method  652 ext/openssl/ossl_bn.c     rb_define_method(cBN, "one?", ossl_bn_is_one, 0);
rb_define_method  654 ext/openssl/ossl_bn.c     rb_define_method(cBN, "odd?", ossl_bn_is_odd, 0);
rb_define_method  668 ext/openssl/ossl_bn.c     rb_define_method(cBN, "prime?", ossl_bn_is_prime, -1);
rb_define_method  670 ext/openssl/ossl_bn.c     rb_define_method(cBN, "set_bit!", ossl_bn_set_bit, 1);
rb_define_method  671 ext/openssl/ossl_bn.c     rb_define_method(cBN, "clear_bit!", ossl_bn_clear_bit, 1);
rb_define_method  672 ext/openssl/ossl_bn.c     rb_define_method(cBN, "bit_set?", ossl_bn_is_bit_set, 1);
rb_define_method  673 ext/openssl/ossl_bn.c     rb_define_method(cBN, "mask_bits!", ossl_bn_mask_bits, 1);
rb_define_method  674 ext/openssl/ossl_bn.c     rb_define_method(cBN, "<<", ossl_bn_lshift, 1);
rb_define_method  676 ext/openssl/ossl_bn.c     rb_define_method(cBN, ">>", ossl_bn_rshift, 1);
rb_define_method  691 ext/openssl/ossl_bn.c     rb_define_method(cBN, "to_s", ossl_bn_to_s, -1);
rb_define_method  692 ext/openssl/ossl_bn.c     rb_define_method(cBN, "to_i", ossl_bn_to_i, 0);
rb_define_method  694 ext/openssl/ossl_bn.c     rb_define_method(cBN, "to_bn", ossl_bn_to_bn, 0);
rb_define_method  695 ext/openssl/ossl_bn.c     rb_define_method(cBN, "coerce", ossl_bn_coerce, 1);
rb_define_method  704 ext/openssl/ossl_bn.c     rb_define_method(cBN, "mod_inverse", ossl_bn_mod_inverse, 1);
rb_define_method  713 ext/openssl/ossl_bn.c     rb_define_method(cBN, "prime_fasttest?", ossl_bn_is_prime_fasttest, -1);
rb_define_method  355 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "initialize", ossl_cipher_initialize, 1);
rb_define_method  356 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "reset", ossl_cipher_reset, 0);
rb_define_method  357 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "encrypt", ossl_cipher_encrypt, -1);
rb_define_method  358 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "decrypt", ossl_cipher_decrypt, -1);
rb_define_method  359 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "pkcs5_keyivgen", ossl_cipher_pkcs5_keyivgen, -1);
rb_define_method  360 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "update", ossl_cipher_update, 1);
rb_define_method  361 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "final", ossl_cipher_final, 0);
rb_define_method  362 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "name", ossl_cipher_name, 0);
rb_define_method  363 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "key=", ossl_cipher_set_key, 1);
rb_define_method  364 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "key_len=", ossl_cipher_set_key_length, 1);
rb_define_method  365 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "key_len", ossl_cipher_key_length, 0);
rb_define_method  366 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "iv=", ossl_cipher_set_iv, 1);
rb_define_method  367 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "iv_len", ossl_cipher_iv_length, 0);
rb_define_method  368 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "block_size", ossl_cipher_block_size, 0);
rb_define_method  369 ext/openssl/ossl_cipher.c     rb_define_method(cCipher, "padding=", ossl_cipher_set_padding, 1);
rb_define_method  448 ext/openssl/ossl_config.c     rb_define_method(cConfig, "initialize", ossl_config_initialize, -1);
rb_define_method  449 ext/openssl/ossl_config.c     rb_define_method(cConfig, "get_value", ossl_config_get_value, 2);
rb_define_method  450 ext/openssl/ossl_config.c     rb_define_method(cConfig, "value", ossl_config_get_value_old, -1);
rb_define_method  451 ext/openssl/ossl_config.c     rb_define_method(cConfig, "add_value", ossl_config_add_value, 3);
rb_define_method  452 ext/openssl/ossl_config.c     rb_define_method(cConfig, "[]", ossl_config_get_section, 1);
rb_define_method  453 ext/openssl/ossl_config.c     rb_define_method(cConfig, "section", ossl_config_get_section_old, 1);
rb_define_method  454 ext/openssl/ossl_config.c     rb_define_method(cConfig, "[]=", ossl_config_set_section, 2);
rb_define_method  455 ext/openssl/ossl_config.c     rb_define_method(cConfig, "sections", ossl_config_get_sections, 0);
rb_define_method  456 ext/openssl/ossl_config.c     rb_define_method(cConfig, "to_s", ossl_config_to_s, 0);
rb_define_method  457 ext/openssl/ossl_config.c     rb_define_method(cConfig, "each", ossl_config_each, 0);
rb_define_method  458 ext/openssl/ossl_config.c     rb_define_method(cConfig, "inspect", ossl_config_inspect, 0);
rb_define_method  277 ext/openssl/ossl_digest.c     rb_define_method(cDigest, "initialize", ossl_digest_initialize, -1);
rb_define_method  278 ext/openssl/ossl_digest.c     rb_define_method(cDigest, "reset", ossl_digest_reset, 0);
rb_define_method  282 ext/openssl/ossl_digest.c     rb_define_method(cDigest, "digest", ossl_digest_digest, 0);
rb_define_method  283 ext/openssl/ossl_digest.c     rb_define_method(cDigest, "hexdigest", ossl_digest_hexdigest, 0);
rb_define_method  287 ext/openssl/ossl_digest.c     rb_define_method(cDigest, "update", ossl_digest_update, 1);
rb_define_method  290 ext/openssl/ossl_digest.c     rb_define_method(cDigest, "==", ossl_digest_equal, 1);
rb_define_method  292 ext/openssl/ossl_digest.c     rb_define_method(cDigest, "name", ossl_digest_name, 0);
rb_define_method  293 ext/openssl/ossl_digest.c     rb_define_method(cDigest, "size", ossl_digest_size, 0);
rb_define_method  357 ext/openssl/ossl_engine.c     rb_define_method(cEngine, "id", ossl_engine_get_id, 0);
rb_define_method  358 ext/openssl/ossl_engine.c     rb_define_method(cEngine, "name", ossl_engine_get_name, 0);
rb_define_method  359 ext/openssl/ossl_engine.c     rb_define_method(cEngine, "finish", ossl_engine_finish, 0);
rb_define_method  360 ext/openssl/ossl_engine.c     rb_define_method(cEngine, "cipher", ossl_engine_get_cipher, 1);
rb_define_method  361 ext/openssl/ossl_engine.c     rb_define_method(cEngine, "digest",  ossl_engine_get_digest, 1);
rb_define_method  362 ext/openssl/ossl_engine.c     rb_define_method(cEngine, "load_private_key", ossl_engine_load_privkey, -1);
rb_define_method  363 ext/openssl/ossl_engine.c     rb_define_method(cEngine, "load_public_key", ossl_engine_load_pubkey, -1);
rb_define_method  364 ext/openssl/ossl_engine.c     rb_define_method(cEngine, "set_default", ossl_engine_set_default, 1);
rb_define_method  365 ext/openssl/ossl_engine.c     rb_define_method(cEngine, "ctrl_cmd", ossl_engine_ctrl_cmd, -1);
rb_define_method  366 ext/openssl/ossl_engine.c     rb_define_method(cEngine, "cmds", ossl_engine_get_cmds, 0);
rb_define_method  367 ext/openssl/ossl_engine.c     rb_define_method(cEngine, "inspect", ossl_engine_inspect, 0);
rb_define_method  202 ext/openssl/ossl_hmac.c     rb_define_method(cHMAC, "initialize", ossl_hmac_initialize, 2);
rb_define_method  205 ext/openssl/ossl_hmac.c     rb_define_method(cHMAC, "update", ossl_hmac_update, 1);
rb_define_method  207 ext/openssl/ossl_hmac.c     rb_define_method(cHMAC, "digest", ossl_hmac_digest, 0);
rb_define_method  208 ext/openssl/ossl_hmac.c     rb_define_method(cHMAC, "hexdigest", ossl_hmac_hexdigest, 0);
rb_define_method  243 ext/openssl/ossl_ns_spki.c     rb_define_method(cSPKI, "initialize", ossl_spki_initialize, -1);
rb_define_method  245 ext/openssl/ossl_ns_spki.c     rb_define_method(cSPKI, "to_der", ossl_spki_to_der, 0);
rb_define_method  246 ext/openssl/ossl_ns_spki.c     rb_define_method(cSPKI, "to_pem", ossl_spki_to_pem, 0);
rb_define_method  248 ext/openssl/ossl_ns_spki.c     rb_define_method(cSPKI, "to_text", ossl_spki_print, 0);
rb_define_method  249 ext/openssl/ossl_ns_spki.c     rb_define_method(cSPKI, "public_key", ossl_spki_get_public_key, 0);
rb_define_method  250 ext/openssl/ossl_ns_spki.c     rb_define_method(cSPKI, "public_key=", ossl_spki_set_public_key, 1);
rb_define_method  251 ext/openssl/ossl_ns_spki.c     rb_define_method(cSPKI, "sign", ossl_spki_sign, 2);
rb_define_method  252 ext/openssl/ossl_ns_spki.c     rb_define_method(cSPKI, "verify", ossl_spki_verify, 1);
rb_define_method  253 ext/openssl/ossl_ns_spki.c     rb_define_method(cSPKI, "challenge", ossl_spki_get_challenge, 0);
rb_define_method  254 ext/openssl/ossl_ns_spki.c     rb_define_method(cSPKI, "challenge=", ossl_spki_set_challenge, 1);
rb_define_method  688 ext/openssl/ossl_ocsp.c     rb_define_method(cOCSPReq, "initialize", ossl_ocspreq_initialize, -1);
rb_define_method  689 ext/openssl/ossl_ocsp.c     rb_define_method(cOCSPReq, "add_nonce", ossl_ocspreq_add_nonce, -1);
rb_define_method  690 ext/openssl/ossl_ocsp.c     rb_define_method(cOCSPReq, "check_nonce", ossl_ocspreq_check_nonce, 1);
rb_define_method  691 ext/openssl/ossl_ocsp.c     rb_define_method(cOCSPReq, "add_certid", ossl_ocspreq_add_certid, 1);
rb_define_method  692 ext/openssl/ossl_ocsp.c     rb_define_method(cOCSPReq, "certid", ossl_ocspreq_get_certid, 0);
rb_define_method  693 ext/openssl/ossl_ocsp.c     rb_define_method(cOCSPReq, "sign", ossl_ocspreq_sign, -1);
rb_define_method  694 ext/openssl/ossl_ocsp.c     rb_define_method(cOCSPReq, "verify", ossl_ocspreq_verify, -1);
rb_define_method  695 ext/openssl/ossl_ocsp.c     rb_define_method(cOCSPReq, "to_der", ossl_ocspreq_to_der, 0);
rb_define_method  700 ext/openssl/ossl_ocsp.c     rb_define_method(cOCSPRes, "initialize", ossl_ocspres_initialize, -1);
rb_define_method  701 ext/openssl/ossl_ocsp.c     rb_define_method(cOCSPRes, "status", ossl_ocspres_status, 0);
rb_define_method  702 ext/openssl/ossl_ocsp.c     rb_define_method(cOCSPRes, "status_string", ossl_ocspres_status_string, 0);
rb_define_method  703 ext/openssl/ossl_ocsp.c     rb_define_method(cOCSPRes, "basic", ossl_ocspres_get_basic, 0);
rb_define_method  704 ext/openssl/ossl_ocsp.c     rb_define_method(cOCSPRes, "to_der", ossl_ocspres_to_der, 0);
rb_define_method  708 ext/openssl/ossl_ocsp.c     rb_define_method(cOCSPBasicRes, "initialize", ossl_ocspbres_initialize, -1);
rb_define_method  709 ext/openssl/ossl_ocsp.c     rb_define_method(cOCSPBasicRes, "copy_nonce", ossl_ocspbres_copy_nonce, 1);
rb_define_method  710 ext/openssl/ossl_ocsp.c     rb_define_method(cOCSPBasicRes, "add_nonce", ossl_ocspbres_add_nonce, -1);
rb_define_method  711 ext/openssl/ossl_ocsp.c     rb_define_method(cOCSPBasicRes, "add_status", ossl_ocspbres_add_status, 7);
rb_define_method  712 ext/openssl/ossl_ocsp.c     rb_define_method(cOCSPBasicRes, "status", ossl_ocspbres_get_status, 0);
rb_define_method  713 ext/openssl/ossl_ocsp.c     rb_define_method(cOCSPBasicRes, "sign", ossl_ocspbres_sign, -1);
rb_define_method  714 ext/openssl/ossl_ocsp.c     rb_define_method(cOCSPBasicRes, "verify", ossl_ocspbres_verify, -1);
rb_define_method  718 ext/openssl/ossl_ocsp.c     rb_define_method(cOCSPCertId, "initialize", ossl_ocspcid_initialize, 2);
rb_define_method  719 ext/openssl/ossl_ocsp.c     rb_define_method(cOCSPCertId, "cmp", ossl_ocspcid_cmp, 1);
rb_define_method  720 ext/openssl/ossl_ocsp.c     rb_define_method(cOCSPCertId, "cmp_issuer", ossl_ocspcid_cmp_issuer, 1);
rb_define_method  721 ext/openssl/ossl_ocsp.c     rb_define_method(cOCSPCertId, "serial", ossl_ocspcid_get_serial, 0);
rb_define_method  152 ext/openssl/ossl_pkcs12.c     rb_define_method(cPKCS12, "initialize", ossl_pkcs12_initialize, -1);
rb_define_method  153 ext/openssl/ossl_pkcs12.c     rb_define_method(cPKCS12, "to_der", ossl_pkcs12_to_der, 0);
rb_define_method  940 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7, "initialize", ossl_pkcs7_initialize, -1);
rb_define_method  941 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7, "type=", ossl_pkcs7_set_type, 1);
rb_define_method  942 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7, "type", ossl_pkcs7_get_type, 0);
rb_define_method  943 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7, "detached=", ossl_pkcs7_set_detached, 1);
rb_define_method  944 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7, "detached", ossl_pkcs7_get_detached, 0);
rb_define_method  945 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7, "detached?", ossl_pkcs7_detached_p, 0);
rb_define_method  946 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7, "cipher=", ossl_pkcs7_set_cipher, 1);
rb_define_method  947 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7, "add_signer", ossl_pkcs7_add_signer, 1);
rb_define_method  948 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7, "signers", ossl_pkcs7_get_signer, 0);
rb_define_method  949 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7, "add_recipient", ossl_pkcs7_add_recipient, 1);
rb_define_method  950 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7, "recipients", ossl_pkcs7_get_recipient, 0);
rb_define_method  951 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7, "add_certificate", ossl_pkcs7_add_certificate, 1);
rb_define_method  952 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7, "certificates=", ossl_pkcs7_set_certificates, 1);
rb_define_method  953 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7, "certificates", ossl_pkcs7_get_certificates, 0);
rb_define_method  954 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7, "add_crl", ossl_pkcs7_add_crl, 1);
rb_define_method  955 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7, "crls=", ossl_pkcs7_set_crls, 1);
rb_define_method  956 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7, "crls", ossl_pkcs7_get_crls, 0);
rb_define_method  957 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7, "add_data", ossl_pkcs7_add_data, 1);
rb_define_method  959 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7, "verify", ossl_pkcs7_verify, -1);
rb_define_method  960 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7, "decrypt", ossl_pkcs7_decrypt, -1);
rb_define_method  961 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7, "to_pem", ossl_pkcs7_to_pem, 0);
rb_define_method  963 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7, "to_der", ossl_pkcs7_to_der, 0);
rb_define_method  968 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7Signer, "initialize", ossl_pkcs7si_initialize,3);
rb_define_method  969 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7Signer, "issuer", ossl_pkcs7si_get_issuer, 0);
rb_define_method  971 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7Signer, "serial", ossl_pkcs7si_get_serial,0);
rb_define_method  972 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7Signer,"signed_time",ossl_pkcs7si_get_signed_time,0);
rb_define_method  976 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7Recipient, "initialize", ossl_pkcs7ri_initialize,1);
rb_define_method  977 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7Recipient, "issuer", ossl_pkcs7ri_get_issuer,0);
rb_define_method  978 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7Recipient, "serial", ossl_pkcs7ri_get_serial,0);
rb_define_method  979 ext/openssl/ossl_pkcs7.c     rb_define_method(cPKCS7Recipient, "enc_key", ossl_pkcs7ri_get_enc_key,0);
rb_define_method  218 ext/openssl/ossl_pkey.c     rb_define_method(cPKey, "initialize", ossl_pkey_initialize, 0);
rb_define_method  220 ext/openssl/ossl_pkey.c     rb_define_method(cPKey, "sign", ossl_pkey_sign, 2);
rb_define_method  221 ext/openssl/ossl_pkey.c     rb_define_method(cPKey, "verify", ossl_pkey_verify, 3);
rb_define_method  116 ext/openssl/ossl_pkey.h 	rb_define_method(class, #name, ossl_##keytype##_get_##name, 0);	\
rb_define_method  117 ext/openssl/ossl_pkey.h 	rb_define_method(class, #name "=", ossl_##keytype##_set_##name, 1);\
rb_define_method  424 ext/openssl/ossl_pkey_dh.c     rb_define_method(cDH, "initialize", ossl_dh_initialize, -1);
rb_define_method  425 ext/openssl/ossl_pkey_dh.c     rb_define_method(cDH, "public?", ossl_dh_is_public, 0);
rb_define_method  426 ext/openssl/ossl_pkey_dh.c     rb_define_method(cDH, "private?", ossl_dh_is_private, 0);
rb_define_method  427 ext/openssl/ossl_pkey_dh.c     rb_define_method(cDH, "to_text", ossl_dh_to_text, 0);
rb_define_method  428 ext/openssl/ossl_pkey_dh.c     rb_define_method(cDH, "export", ossl_dh_export, 0);
rb_define_method  431 ext/openssl/ossl_pkey_dh.c     rb_define_method(cDH, "to_der", ossl_dh_to_der, 0);
rb_define_method  432 ext/openssl/ossl_pkey_dh.c     rb_define_method(cDH, "public_key", ossl_dh_to_public_key, 0);
rb_define_method  433 ext/openssl/ossl_pkey_dh.c     rb_define_method(cDH, "params_ok?", ossl_dh_check_params, 0);
rb_define_method  434 ext/openssl/ossl_pkey_dh.c     rb_define_method(cDH, "generate_key!", ossl_dh_generate_key, 0);
rb_define_method  435 ext/openssl/ossl_pkey_dh.c     rb_define_method(cDH, "compute_key", ossl_dh_compute_key, 1);
rb_define_method  440 ext/openssl/ossl_pkey_dh.c     rb_define_method(cDH, "params", ossl_dh_get_params, 0);
rb_define_method  386 ext/openssl/ossl_pkey_dsa.c     rb_define_method(cDSA, "initialize", ossl_dsa_initialize, -1);
rb_define_method  388 ext/openssl/ossl_pkey_dsa.c     rb_define_method(cDSA, "public?", ossl_dsa_is_public, 0);
rb_define_method  389 ext/openssl/ossl_pkey_dsa.c     rb_define_method(cDSA, "private?", ossl_dsa_is_private, 0);
rb_define_method  390 ext/openssl/ossl_pkey_dsa.c     rb_define_method(cDSA, "to_text", ossl_dsa_to_text, 0);
rb_define_method  391 ext/openssl/ossl_pkey_dsa.c     rb_define_method(cDSA, "export", ossl_dsa_export, -1);
rb_define_method  394 ext/openssl/ossl_pkey_dsa.c     rb_define_method(cDSA, "to_der", ossl_dsa_to_der, 0);
rb_define_method  395 ext/openssl/ossl_pkey_dsa.c     rb_define_method(cDSA, "public_key", ossl_dsa_to_public_key, 0);
rb_define_method  396 ext/openssl/ossl_pkey_dsa.c     rb_define_method(cDSA, "syssign", ossl_dsa_sign, 1);
rb_define_method  397 ext/openssl/ossl_pkey_dsa.c     rb_define_method(cDSA, "sysverify", ossl_dsa_verify, 2);
rb_define_method  405 ext/openssl/ossl_pkey_dsa.c     rb_define_method(cDSA, "params", ossl_dsa_get_params, 0);
rb_define_method  467 ext/openssl/ossl_pkey_rsa.c     rb_define_method(cRSA, "initialize", ossl_rsa_initialize, -1);
rb_define_method  469 ext/openssl/ossl_pkey_rsa.c     rb_define_method(cRSA, "public?", ossl_rsa_is_public, 0);
rb_define_method  470 ext/openssl/ossl_pkey_rsa.c     rb_define_method(cRSA, "private?", ossl_rsa_is_private, 0);
rb_define_method  471 ext/openssl/ossl_pkey_rsa.c     rb_define_method(cRSA, "to_text", ossl_rsa_to_text, 0);
rb_define_method  472 ext/openssl/ossl_pkey_rsa.c     rb_define_method(cRSA, "export", ossl_rsa_export, -1);
rb_define_method  475 ext/openssl/ossl_pkey_rsa.c     rb_define_method(cRSA, "to_der", ossl_rsa_to_der, 0);
rb_define_method  476 ext/openssl/ossl_pkey_rsa.c     rb_define_method(cRSA, "public_key", ossl_rsa_to_public_key, 0);
rb_define_method  477 ext/openssl/ossl_pkey_rsa.c     rb_define_method(cRSA, "public_encrypt", ossl_rsa_public_encrypt, -1);
rb_define_method  478 ext/openssl/ossl_pkey_rsa.c     rb_define_method(cRSA, "public_decrypt", ossl_rsa_public_decrypt, -1);
rb_define_method  479 ext/openssl/ossl_pkey_rsa.c     rb_define_method(cRSA, "private_encrypt", ossl_rsa_private_encrypt, -1);
rb_define_method  480 ext/openssl/ossl_pkey_rsa.c     rb_define_method(cRSA, "private_decrypt", ossl_rsa_private_decrypt, -1);
rb_define_method  491 ext/openssl/ossl_pkey_rsa.c     rb_define_method(cRSA, "params", ossl_rsa_get_params, 0);
rb_define_method  109 ext/openssl/ossl_rand.c 	rb_define_method(class, name, func, argc); \
rb_define_method  870 ext/openssl/ossl_ssl.c     rb_define_method(cSSLContext, "initialize",  ossl_sslctx_initialize, -1);
rb_define_method  871 ext/openssl/ossl_ssl.c     rb_define_method(cSSLContext, "ciphers",     ossl_sslctx_get_ciphers, 0);
rb_define_method  872 ext/openssl/ossl_ssl.c     rb_define_method(cSSLContext, "ciphers=",    ossl_sslctx_set_ciphers, 1);
rb_define_method  882 ext/openssl/ossl_ssl.c     rb_define_method(cSSLSocket, "initialize", ossl_ssl_initialize, -1);
rb_define_method  883 ext/openssl/ossl_ssl.c     rb_define_method(cSSLSocket, "connect",    ossl_ssl_connect, 0);
rb_define_method  884 ext/openssl/ossl_ssl.c     rb_define_method(cSSLSocket, "accept",     ossl_ssl_accept, 0);
rb_define_method  885 ext/openssl/ossl_ssl.c     rb_define_method(cSSLSocket, "sysread",    ossl_ssl_read, -1);
rb_define_method  886 ext/openssl/ossl_ssl.c     rb_define_method(cSSLSocket, "syswrite",   ossl_ssl_write, 1);
rb_define_method  887 ext/openssl/ossl_ssl.c     rb_define_method(cSSLSocket, "sysclose",   ossl_ssl_close, 0);
rb_define_method  888 ext/openssl/ossl_ssl.c     rb_define_method(cSSLSocket, "cert",       ossl_ssl_get_cert, 0);
rb_define_method  889 ext/openssl/ossl_ssl.c     rb_define_method(cSSLSocket, "peer_cert",  ossl_ssl_get_peer_cert, 0);
rb_define_method  890 ext/openssl/ossl_ssl.c     rb_define_method(cSSLSocket, "peer_cert_chain", ossl_ssl_get_peer_cert_chain, 0);
rb_define_method  891 ext/openssl/ossl_ssl.c     rb_define_method(cSSLSocket, "cipher",     ossl_ssl_get_cipher, 0);
rb_define_method  892 ext/openssl/ossl_ssl.c     rb_define_method(cSSLSocket, "state",      ossl_ssl_get_state, 0);
rb_define_method  893 ext/openssl/ossl_ssl.c     rb_define_method(cSSLSocket, "pending",    ossl_ssl_pending, 0);
rb_define_method  243 ext/openssl/ossl_x509attr.c     rb_define_method(cX509Attr, "initialize", ossl_x509attr_initialize, -1);
rb_define_method  244 ext/openssl/ossl_x509attr.c     rb_define_method(cX509Attr, "oid=", ossl_x509attr_set_oid, 1);
rb_define_method  245 ext/openssl/ossl_x509attr.c     rb_define_method(cX509Attr, "oid", ossl_x509attr_get_oid, 0);
rb_define_method  246 ext/openssl/ossl_x509attr.c     rb_define_method(cX509Attr, "value=", ossl_x509attr_set_value, 1);
rb_define_method  247 ext/openssl/ossl_x509attr.c     rb_define_method(cX509Attr, "value", ossl_x509attr_get_value, 0);
rb_define_method  248 ext/openssl/ossl_x509attr.c     rb_define_method(cX509Attr, "to_der", ossl_x509attr_to_der, 0);
rb_define_method  641 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "initialize", ossl_x509_initialize, -1);
rb_define_method  644 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "to_der", ossl_x509_to_der, 0);
rb_define_method  645 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "to_pem", ossl_x509_to_pem, 0);
rb_define_method  647 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "to_text", ossl_x509_to_text, 0);
rb_define_method  648 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "version", ossl_x509_get_version, 0);
rb_define_method  649 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "version=", ossl_x509_set_version, 1);
rb_define_method  650 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "signature_algorithm", ossl_x509_get_signature_algorithm, 0);
rb_define_method  651 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "serial", ossl_x509_get_serial, 0);
rb_define_method  652 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "serial=", ossl_x509_set_serial, 1);
rb_define_method  653 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "subject", ossl_x509_get_subject, 0);
rb_define_method  654 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "subject=", ossl_x509_set_subject, 1);
rb_define_method  655 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "issuer", ossl_x509_get_issuer, 0);
rb_define_method  656 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "issuer=", ossl_x509_set_issuer, 1);
rb_define_method  657 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "not_before", ossl_x509_get_not_before, 0);
rb_define_method  658 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "not_before=", ossl_x509_set_not_before, 1);
rb_define_method  659 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "not_after", ossl_x509_get_not_after, 0);
rb_define_method  660 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "not_after=", ossl_x509_set_not_after, 1);
rb_define_method  661 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "public_key", ossl_x509_get_public_key, 0);
rb_define_method  662 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "public_key=", ossl_x509_set_public_key, 1);
rb_define_method  663 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "sign", ossl_x509_sign, 2);
rb_define_method  664 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "verify", ossl_x509_verify, 1);
rb_define_method  665 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "check_private_key", ossl_x509_check_private_key, 1);
rb_define_method  666 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "extensions", ossl_x509_get_extensions, 0);
rb_define_method  667 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "extensions=", ossl_x509_set_extensions, 1);
rb_define_method  668 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "add_extension", ossl_x509_add_extension, 1);
rb_define_method  669 ext/openssl/ossl_x509cert.c     rb_define_method(cX509Cert, "inspect", ossl_x509_inspect, 0);
rb_define_method  510 ext/openssl/ossl_x509crl.c     rb_define_method(cX509CRL, "initialize", ossl_x509crl_initialize, -1);
rb_define_method  513 ext/openssl/ossl_x509crl.c     rb_define_method(cX509CRL, "version", ossl_x509crl_get_version, 0);
rb_define_method  514 ext/openssl/ossl_x509crl.c     rb_define_method(cX509CRL, "version=", ossl_x509crl_set_version, 1);
rb_define_method  515 ext/openssl/ossl_x509crl.c     rb_define_method(cX509CRL, "signature_algorithm", ossl_x509crl_get_signature_algorithm, 0);
rb_define_method  516 ext/openssl/ossl_x509crl.c     rb_define_method(cX509CRL, "issuer", ossl_x509crl_get_issuer, 0);
rb_define_method  517 ext/openssl/ossl_x509crl.c     rb_define_method(cX509CRL, "issuer=", ossl_x509crl_set_issuer, 1);
rb_define_method  518 ext/openssl/ossl_x509crl.c     rb_define_method(cX509CRL, "last_update", ossl_x509crl_get_last_update, 0);
rb_define_method  519 ext/openssl/ossl_x509crl.c     rb_define_method(cX509CRL, "last_update=", ossl_x509crl_set_last_update, 1);
rb_define_method  520 ext/openssl/ossl_x509crl.c     rb_define_method(cX509CRL, "next_update", ossl_x509crl_get_next_update, 0);
rb_define_method  521 ext/openssl/ossl_x509crl.c     rb_define_method(cX509CRL, "next_update=", ossl_x509crl_set_next_update, 1);
rb_define_method  522 ext/openssl/ossl_x509crl.c     rb_define_method(cX509CRL, "revoked", ossl_x509crl_get_revoked, 0);
rb_define_method  523 ext/openssl/ossl_x509crl.c     rb_define_method(cX509CRL, "revoked=", ossl_x509crl_set_revoked, 1);
rb_define_method  524 ext/openssl/ossl_x509crl.c     rb_define_method(cX509CRL, "add_revoked", ossl_x509crl_add_revoked, 1);
rb_define_method  525 ext/openssl/ossl_x509crl.c     rb_define_method(cX509CRL, "sign", ossl_x509crl_sign, 2);
rb_define_method  526 ext/openssl/ossl_x509crl.c     rb_define_method(cX509CRL, "verify", ossl_x509crl_verify, 1);
rb_define_method  527 ext/openssl/ossl_x509crl.c     rb_define_method(cX509CRL, "to_der", ossl_x509crl_to_der, 0);
rb_define_method  528 ext/openssl/ossl_x509crl.c     rb_define_method(cX509CRL, "to_pem", ossl_x509crl_to_pem, 0);
rb_define_method  530 ext/openssl/ossl_x509crl.c     rb_define_method(cX509CRL, "to_text", ossl_x509crl_to_text, 0);
rb_define_method  531 ext/openssl/ossl_x509crl.c     rb_define_method(cX509CRL, "extensions", ossl_x509crl_get_extensions, 0);
rb_define_method  532 ext/openssl/ossl_x509crl.c     rb_define_method(cX509CRL, "extensions=", ossl_x509crl_set_extensions, 1);
rb_define_method  533 ext/openssl/ossl_x509crl.c     rb_define_method(cX509CRL, "add_extension", ossl_x509crl_add_extension, 1);
rb_define_method  431 ext/openssl/ossl_x509ext.c     rb_define_method(cX509ExtFactory, "initialize", ossl_x509extfactory_initialize, -1);
rb_define_method  439 ext/openssl/ossl_x509ext.c     rb_define_method(cX509ExtFactory, "issuer_certificate=", ossl_x509extfactory_set_issuer_cert, 1);
rb_define_method  440 ext/openssl/ossl_x509ext.c     rb_define_method(cX509ExtFactory, "subject_certificate=", ossl_x509extfactory_set_subject_cert, 1);
rb_define_method  441 ext/openssl/ossl_x509ext.c     rb_define_method(cX509ExtFactory, "subject_request=", ossl_x509extfactory_set_subject_req, 1);
rb_define_method  442 ext/openssl/ossl_x509ext.c     rb_define_method(cX509ExtFactory, "crl=", ossl_x509extfactory_set_crl, 1);
rb_define_method  443 ext/openssl/ossl_x509ext.c     rb_define_method(cX509ExtFactory, "config=", ossl_x509extfactory_set_config, 1);
rb_define_method  444 ext/openssl/ossl_x509ext.c     rb_define_method(cX509ExtFactory, "create_ext", ossl_x509extfactory_create_ext, -1);
rb_define_method  448 ext/openssl/ossl_x509ext.c     rb_define_method(cX509Ext, "initialize", ossl_x509ext_initialize, -1);
rb_define_method  449 ext/openssl/ossl_x509ext.c     rb_define_method(cX509Ext, "oid=", ossl_x509ext_set_oid, 1);
rb_define_method  450 ext/openssl/ossl_x509ext.c     rb_define_method(cX509Ext, "value=", ossl_x509ext_set_value, 1);
rb_define_method  451 ext/openssl/ossl_x509ext.c     rb_define_method(cX509Ext, "critical=", ossl_x509ext_set_critical, 1);
rb_define_method  452 ext/openssl/ossl_x509ext.c     rb_define_method(cX509Ext, "oid", ossl_x509ext_get_oid, 0);
rb_define_method  453 ext/openssl/ossl_x509ext.c     rb_define_method(cX509Ext, "value", ossl_x509ext_get_value, 0);
rb_define_method  454 ext/openssl/ossl_x509ext.c     rb_define_method(cX509Ext, "critical?", ossl_x509ext_get_critical, 0);
rb_define_method  455 ext/openssl/ossl_x509ext.c     rb_define_method(cX509Ext, "to_der", ossl_x509ext_to_der, 0);
rb_define_method  315 ext/openssl/ossl_x509name.c     rb_define_method(cX509Name, "initialize", ossl_x509name_initialize, -1);
rb_define_method  316 ext/openssl/ossl_x509name.c     rb_define_method(cX509Name, "add_entry", ossl_x509name_add_entry, -1);
rb_define_method  317 ext/openssl/ossl_x509name.c     rb_define_method(cX509Name, "to_s", ossl_x509name_to_s, -1);
rb_define_method  318 ext/openssl/ossl_x509name.c     rb_define_method(cX509Name, "to_a", ossl_x509name_to_a, 0);
rb_define_method  319 ext/openssl/ossl_x509name.c     rb_define_method(cX509Name, "cmp", ossl_x509name_cmp, 1);
rb_define_method  321 ext/openssl/ossl_x509name.c     rb_define_method(cX509Name, "eql?", ossl_x509name_eql, 1);
rb_define_method  322 ext/openssl/ossl_x509name.c     rb_define_method(cX509Name, "hash", ossl_x509name_hash, 0);
rb_define_method  323 ext/openssl/ossl_x509name.c     rb_define_method(cX509Name, "to_der", ossl_x509name_to_der, 0);
rb_define_method  446 ext/openssl/ossl_x509req.c     rb_define_method(cX509Req, "initialize", ossl_x509req_initialize, -1);
rb_define_method  449 ext/openssl/ossl_x509req.c     rb_define_method(cX509Req, "to_pem", ossl_x509req_to_pem, 0);
rb_define_method  450 ext/openssl/ossl_x509req.c     rb_define_method(cX509Req, "to_der", ossl_x509req_to_der, 0);
rb_define_method  452 ext/openssl/ossl_x509req.c     rb_define_method(cX509Req, "to_text", ossl_x509req_to_text, 0);
rb_define_method  453 ext/openssl/ossl_x509req.c     rb_define_method(cX509Req, "version", ossl_x509req_get_version, 0);
rb_define_method  454 ext/openssl/ossl_x509req.c     rb_define_method(cX509Req, "version=", ossl_x509req_set_version, 1);
rb_define_method  455 ext/openssl/ossl_x509req.c     rb_define_method(cX509Req, "subject", ossl_x509req_get_subject, 0);
rb_define_method  456 ext/openssl/ossl_x509req.c     rb_define_method(cX509Req, "subject=", ossl_x509req_set_subject, 1);
rb_define_method  457 ext/openssl/ossl_x509req.c     rb_define_method(cX509Req, "signature_algorithm", ossl_x509req_get_signature_algorithm, 0);
rb_define_method  458 ext/openssl/ossl_x509req.c     rb_define_method(cX509Req, "public_key", ossl_x509req_get_public_key, 0);
rb_define_method  459 ext/openssl/ossl_x509req.c     rb_define_method(cX509Req, "public_key=", ossl_x509req_set_public_key, 1);
rb_define_method  460 ext/openssl/ossl_x509req.c     rb_define_method(cX509Req, "sign", ossl_x509req_sign, 2);
rb_define_method  461 ext/openssl/ossl_x509req.c     rb_define_method(cX509Req, "verify", ossl_x509req_verify, 1);
rb_define_method  462 ext/openssl/ossl_x509req.c     rb_define_method(cX509Req, "attributes", ossl_x509req_get_attributes, 0);
rb_define_method  463 ext/openssl/ossl_x509req.c     rb_define_method(cX509Req, "attributes=", ossl_x509req_set_attributes, 1);
rb_define_method  464 ext/openssl/ossl_x509req.c     rb_define_method(cX509Req, "add_attribute", ossl_x509req_add_attribute, 1);
rb_define_method  219 ext/openssl/ossl_x509revoked.c     rb_define_method(cX509Rev, "initialize", ossl_x509revoked_initialize, -1);
rb_define_method  221 ext/openssl/ossl_x509revoked.c     rb_define_method(cX509Rev, "serial", ossl_x509revoked_get_serial, 0);
rb_define_method  222 ext/openssl/ossl_x509revoked.c     rb_define_method(cX509Rev, "serial=", ossl_x509revoked_set_serial, 1);
rb_define_method  223 ext/openssl/ossl_x509revoked.c     rb_define_method(cX509Rev, "time", ossl_x509revoked_get_time, 0);
rb_define_method  224 ext/openssl/ossl_x509revoked.c     rb_define_method(cX509Rev, "time=", ossl_x509revoked_set_time, 1);
rb_define_method  225 ext/openssl/ossl_x509revoked.c     rb_define_method(cX509Rev, "extensions", ossl_x509revoked_get_extensions, 0);
rb_define_method  226 ext/openssl/ossl_x509revoked.c     rb_define_method(cX509Rev, "extensions=", ossl_x509revoked_set_extensions, 1);
rb_define_method  227 ext/openssl/ossl_x509revoked.c     rb_define_method(cX509Rev, "add_extension", ossl_x509revoked_add_extension, 1);
rb_define_method  582 ext/openssl/ossl_x509store.c     rb_define_method(cX509Store, "initialize",   ossl_x509store_initialize, -1);
rb_define_method  583 ext/openssl/ossl_x509store.c     rb_define_method(cX509Store, "verify_callback=", ossl_x509store_set_vfy_cb, 1);
rb_define_method  584 ext/openssl/ossl_x509store.c     rb_define_method(cX509Store, "flags=",       ossl_x509store_set_flags, 1);
rb_define_method  585 ext/openssl/ossl_x509store.c     rb_define_method(cX509Store, "purpose=",     ossl_x509store_set_purpose, 1);
rb_define_method  586 ext/openssl/ossl_x509store.c     rb_define_method(cX509Store, "trust=",       ossl_x509store_set_trust, 1);
rb_define_method  587 ext/openssl/ossl_x509store.c     rb_define_method(cX509Store, "time=",        ossl_x509store_set_time, 1);
rb_define_method  588 ext/openssl/ossl_x509store.c     rb_define_method(cX509Store, "add_path",     ossl_x509store_add_path, 1);
rb_define_method  589 ext/openssl/ossl_x509store.c     rb_define_method(cX509Store, "add_file",     ossl_x509store_add_file, 1);
rb_define_method  590 ext/openssl/ossl_x509store.c     rb_define_method(cX509Store, "set_default_paths", ossl_x509store_set_default_paths, 0);
rb_define_method  591 ext/openssl/ossl_x509store.c     rb_define_method(cX509Store, "add_cert",     ossl_x509store_add_cert, 1);
rb_define_method  592 ext/openssl/ossl_x509store.c     rb_define_method(cX509Store, "add_crl",      ossl_x509store_add_crl, 1);
rb_define_method  593 ext/openssl/ossl_x509store.c     rb_define_method(cX509Store, "verify",       ossl_x509store_verify, -1);
rb_define_method  598 ext/openssl/ossl_x509store.c     rb_define_method(x509stctx,"initialize",  ossl_x509stctx_initialize, -1);
rb_define_method  599 ext/openssl/ossl_x509store.c     rb_define_method(x509stctx,"verify",      ossl_x509stctx_verify, 0);
rb_define_method  600 ext/openssl/ossl_x509store.c     rb_define_method(x509stctx,"chain",       ossl_x509stctx_get_chain,0);
rb_define_method  601 ext/openssl/ossl_x509store.c     rb_define_method(x509stctx,"error",       ossl_x509stctx_get_err, 0);
rb_define_method  602 ext/openssl/ossl_x509store.c     rb_define_method(x509stctx,"error=",      ossl_x509stctx_set_error, 1);
rb_define_method  603 ext/openssl/ossl_x509store.c     rb_define_method(x509stctx,"error_string",ossl_x509stctx_get_err_string,0);
rb_define_method  604 ext/openssl/ossl_x509store.c     rb_define_method(x509stctx,"error_depth", ossl_x509stctx_get_err_depth, 0);
rb_define_method  605 ext/openssl/ossl_x509store.c     rb_define_method(x509stctx,"current_cert",ossl_x509stctx_get_curr_cert, 0);
rb_define_method  606 ext/openssl/ossl_x509store.c     rb_define_method(x509stctx,"current_crl", ossl_x509stctx_get_curr_crl, 0);
rb_define_method  607 ext/openssl/ossl_x509store.c     rb_define_method(x509stctx,"cleanup",     ossl_x509stctx_cleanup, 0);
rb_define_method  608 ext/openssl/ossl_x509store.c     rb_define_method(x509stctx,"flags=",      ossl_x509stctx_set_flags, 1);
rb_define_method  609 ext/openssl/ossl_x509store.c     rb_define_method(x509stctx,"purpose=",    ossl_x509stctx_set_purpose, 1);
rb_define_method  610 ext/openssl/ossl_x509store.c     rb_define_method(x509stctx,"trust=",      ossl_x509stctx_set_trust, 1);
rb_define_method  611 ext/openssl/ossl_x509store.c     rb_define_method(x509stctx,"time=",       ossl_x509stctx_set_time, 1);
rb_define_method   15 ext/openssl/ruby_missing.h 	rb_define_method(klass, "initialize_copy", func, 1)
rb_define_method  482 ext/pty/pty.c      rb_define_method(eChildExited,"status",echild_status,0);
rb_define_method  715 ext/sdbm/init.c     rb_define_method(rb_cDBM, "initialize", fsdbm_initialize, -1);
rb_define_method  716 ext/sdbm/init.c     rb_define_method(rb_cDBM, "close", fsdbm_close, 0);
rb_define_method  717 ext/sdbm/init.c     rb_define_method(rb_cDBM, "closed?", fsdbm_closed, 0);
rb_define_method  718 ext/sdbm/init.c     rb_define_method(rb_cDBM, "[]", fsdbm_aref, 1);
rb_define_method  719 ext/sdbm/init.c     rb_define_method(rb_cDBM, "fetch", fsdbm_fetch_m, -1);
rb_define_method  720 ext/sdbm/init.c     rb_define_method(rb_cDBM, "[]=", fsdbm_store, 2);
rb_define_method  721 ext/sdbm/init.c     rb_define_method(rb_cDBM, "store", fsdbm_store, 2);
rb_define_method  722 ext/sdbm/init.c     rb_define_method(rb_cDBM, "index",  fsdbm_index, 1);
rb_define_method  723 ext/sdbm/init.c     rb_define_method(rb_cDBM, "select",  fsdbm_select, 0);
rb_define_method  724 ext/sdbm/init.c     rb_define_method(rb_cDBM, "values_at",  fsdbm_values_at, -1);
rb_define_method  725 ext/sdbm/init.c     rb_define_method(rb_cDBM, "length", fsdbm_length, 0);
rb_define_method  726 ext/sdbm/init.c     rb_define_method(rb_cDBM, "size", fsdbm_length, 0);
rb_define_method  727 ext/sdbm/init.c     rb_define_method(rb_cDBM, "empty?", fsdbm_empty_p, 0);
rb_define_method  728 ext/sdbm/init.c     rb_define_method(rb_cDBM, "each", fsdbm_each_pair, 0);
rb_define_method  729 ext/sdbm/init.c     rb_define_method(rb_cDBM, "each_value", fsdbm_each_value, 0);
rb_define_method  730 ext/sdbm/init.c     rb_define_method(rb_cDBM, "each_key", fsdbm_each_key, 0);
rb_define_method  731 ext/sdbm/init.c     rb_define_method(rb_cDBM, "each_pair", fsdbm_each_pair, 0);
rb_define_method  732 ext/sdbm/init.c     rb_define_method(rb_cDBM, "keys", fsdbm_keys, 0);
rb_define_method  733 ext/sdbm/init.c     rb_define_method(rb_cDBM, "values", fsdbm_values, 0);
rb_define_method  734 ext/sdbm/init.c     rb_define_method(rb_cDBM, "shift", fsdbm_shift, 0);
rb_define_method  735 ext/sdbm/init.c     rb_define_method(rb_cDBM, "delete", fsdbm_delete, 1);
rb_define_method  736 ext/sdbm/init.c     rb_define_method(rb_cDBM, "delete_if", fsdbm_delete_if, 0);
rb_define_method  737 ext/sdbm/init.c     rb_define_method(rb_cDBM, "reject!", fsdbm_delete_if, 0);
rb_define_method  738 ext/sdbm/init.c     rb_define_method(rb_cDBM, "reject", fsdbm_reject, 0);
rb_define_method  739 ext/sdbm/init.c     rb_define_method(rb_cDBM, "clear", fsdbm_clear, 0);
rb_define_method  740 ext/sdbm/init.c     rb_define_method(rb_cDBM,"invert", fsdbm_invert, 0);
rb_define_method  741 ext/sdbm/init.c     rb_define_method(rb_cDBM,"update", fsdbm_update, 1);
rb_define_method  742 ext/sdbm/init.c     rb_define_method(rb_cDBM,"replace", fsdbm_replace, 1);
rb_define_method  744 ext/sdbm/init.c     rb_define_method(rb_cDBM, "include?", fsdbm_has_key, 1);
rb_define_method  745 ext/sdbm/init.c     rb_define_method(rb_cDBM, "has_key?", fsdbm_has_key, 1);
rb_define_method  746 ext/sdbm/init.c     rb_define_method(rb_cDBM, "member?", fsdbm_has_key, 1);
rb_define_method  747 ext/sdbm/init.c     rb_define_method(rb_cDBM, "has_value?", fsdbm_has_value, 1);
rb_define_method  748 ext/sdbm/init.c     rb_define_method(rb_cDBM, "key?", fsdbm_has_key, 1);
rb_define_method  749 ext/sdbm/init.c     rb_define_method(rb_cDBM, "value?", fsdbm_has_value, 1);
rb_define_method  751 ext/sdbm/init.c     rb_define_method(rb_cDBM, "to_a", fsdbm_to_a, 0);
rb_define_method  752 ext/sdbm/init.c     rb_define_method(rb_cDBM, "to_hash", fsdbm_to_hash, 0);
rb_define_method 3156 ext/socket/socket.c     rb_define_method(rb_cBasicSocket, "close_read", bsock_close_read, 0);
rb_define_method 3157 ext/socket/socket.c     rb_define_method(rb_cBasicSocket, "close_write", bsock_close_write, 0);
rb_define_method 3158 ext/socket/socket.c     rb_define_method(rb_cBasicSocket, "shutdown", bsock_shutdown, -1);
rb_define_method 3159 ext/socket/socket.c     rb_define_method(rb_cBasicSocket, "setsockopt", bsock_setsockopt, 3);
rb_define_method 3160 ext/socket/socket.c     rb_define_method(rb_cBasicSocket, "getsockopt", bsock_getsockopt, 2);
rb_define_method 3161 ext/socket/socket.c     rb_define_method(rb_cBasicSocket, "getsockname", bsock_getsockname, 0);
rb_define_method 3162 ext/socket/socket.c     rb_define_method(rb_cBasicSocket, "getpeername", bsock_getpeername, 0);
rb_define_method 3163 ext/socket/socket.c     rb_define_method(rb_cBasicSocket, "send", bsock_send, -1);
rb_define_method 3164 ext/socket/socket.c     rb_define_method(rb_cBasicSocket, "recv", bsock_recv, -1);
rb_define_method 3165 ext/socket/socket.c     rb_define_method(rb_cBasicSocket, "do_not_reverse_lookup", bsock_do_not_reverse_lookup, 0);
rb_define_method 3166 ext/socket/socket.c     rb_define_method(rb_cBasicSocket, "do_not_reverse_lookup=", bsock_do_not_reverse_lookup_set, 1);
rb_define_method 3170 ext/socket/socket.c     rb_define_method(rb_cIPSocket, "addr", ip_addr, 0);
rb_define_method 3171 ext/socket/socket.c     rb_define_method(rb_cIPSocket, "peeraddr", ip_peeraddr, 0);
rb_define_method 3172 ext/socket/socket.c     rb_define_method(rb_cIPSocket, "recvfrom", ip_recvfrom, -1);
rb_define_method 3178 ext/socket/socket.c     rb_define_method(rb_cTCPSocket, "initialize", tcp_init, -1);
rb_define_method 3183 ext/socket/socket.c     rb_define_method(rb_cSOCKSSocket, "initialize", socks_init, 2);
rb_define_method 3185 ext/socket/socket.c     rb_define_method(rb_cSOCKSSocket, "close", socks_s_close, 0);
rb_define_method 3191 ext/socket/socket.c     rb_define_method(rb_cTCPServer, "accept", tcp_accept, 0);
rb_define_method 3192 ext/socket/socket.c     rb_define_method(rb_cTCPServer, "sysaccept", tcp_sysaccept, 0);
rb_define_method 3193 ext/socket/socket.c     rb_define_method(rb_cTCPServer, "initialize", tcp_svr_init, -1);
rb_define_method 3194 ext/socket/socket.c     rb_define_method(rb_cTCPServer, "listen", sock_listen, 1);
rb_define_method 3198 ext/socket/socket.c     rb_define_method(rb_cUDPSocket, "initialize", udp_init, -1);
rb_define_method 3199 ext/socket/socket.c     rb_define_method(rb_cUDPSocket, "connect", udp_connect, 2);
rb_define_method 3200 ext/socket/socket.c     rb_define_method(rb_cUDPSocket, "bind", udp_bind, 2);
rb_define_method 3201 ext/socket/socket.c     rb_define_method(rb_cUDPSocket, "send", udp_send, -1);
rb_define_method 3206 ext/socket/socket.c     rb_define_method(rb_cUNIXSocket, "initialize", unix_init, 1);
rb_define_method 3207 ext/socket/socket.c     rb_define_method(rb_cUNIXSocket, "path", unix_path, 0);
rb_define_method 3208 ext/socket/socket.c     rb_define_method(rb_cUNIXSocket, "addr", unix_addr, 0);
rb_define_method 3209 ext/socket/socket.c     rb_define_method(rb_cUNIXSocket, "peeraddr", unix_peeraddr, 0);
rb_define_method 3210 ext/socket/socket.c     rb_define_method(rb_cUNIXSocket, "recvfrom", unix_recvfrom, -1);
rb_define_method 3211 ext/socket/socket.c     rb_define_method(rb_cUNIXSocket, "send_io", unix_send_io, 1);
rb_define_method 3212 ext/socket/socket.c     rb_define_method(rb_cUNIXSocket, "recv_io", unix_recv_io, -1);
rb_define_method 3218 ext/socket/socket.c     rb_define_method(rb_cUNIXServer, "initialize", unix_svr_init, 1);
rb_define_method 3219 ext/socket/socket.c     rb_define_method(rb_cUNIXServer, "accept", unix_accept, 0);
rb_define_method 3220 ext/socket/socket.c     rb_define_method(rb_cUNIXServer, "sysaccept", unix_sysaccept, 0);
rb_define_method 3221 ext/socket/socket.c     rb_define_method(rb_cUNIXServer, "listen", sock_listen, 1);
rb_define_method 3226 ext/socket/socket.c     rb_define_method(rb_cSocket, "initialize", sock_initialize, 3);
rb_define_method 3227 ext/socket/socket.c     rb_define_method(rb_cSocket, "connect", sock_connect, 1);
rb_define_method 3228 ext/socket/socket.c     rb_define_method(rb_cSocket, "bind", sock_bind, 1);
rb_define_method 3229 ext/socket/socket.c     rb_define_method(rb_cSocket, "listen", sock_listen, 1);
rb_define_method 3230 ext/socket/socket.c     rb_define_method(rb_cSocket, "accept", sock_accept, 0);
rb_define_method 3231 ext/socket/socket.c     rb_define_method(rb_cSocket, "sysaccept", sock_sysaccept, 0);
rb_define_method 3233 ext/socket/socket.c     rb_define_method(rb_cSocket, "recvfrom", sock_recvfrom, -1);
rb_define_method 1235 ext/stringio/stringio.c     rb_define_method(StringIO, "initialize", strio_initialize, -1);
rb_define_method 1236 ext/stringio/stringio.c     rb_define_method(StringIO, "initialize_copy", strio_copy, 1);
rb_define_method 1237 ext/stringio/stringio.c     rb_define_method(StringIO, "reopen", strio_reopen, -1);
rb_define_method 1239 ext/stringio/stringio.c     rb_define_method(StringIO, "string", strio_get_string, 0);
rb_define_method 1240 ext/stringio/stringio.c     rb_define_method(StringIO, "string=", strio_set_string, 1);
rb_define_method 1241 ext/stringio/stringio.c     rb_define_method(StringIO, "lineno", strio_get_lineno, 0);
rb_define_method 1242 ext/stringio/stringio.c     rb_define_method(StringIO, "lineno=", strio_set_lineno, 1);
rb_define_method 1244 ext/stringio/stringio.c     rb_define_method(StringIO, "binmode", strio_binmode, 0);
rb_define_method 1245 ext/stringio/stringio.c     rb_define_method(StringIO, "close", strio_close, 0);
rb_define_method 1246 ext/stringio/stringio.c     rb_define_method(StringIO, "close_read", strio_close_read, 0);
rb_define_method 1247 ext/stringio/stringio.c     rb_define_method(StringIO, "close_write", strio_close_write, 0);
rb_define_method 1248 ext/stringio/stringio.c     rb_define_method(StringIO, "closed?", strio_closed, 0);
rb_define_method 1249 ext/stringio/stringio.c     rb_define_method(StringIO, "closed_read?", strio_closed_read, 0);
rb_define_method 1250 ext/stringio/stringio.c     rb_define_method(StringIO, "closed_write?", strio_closed_write, 0);
rb_define_method 1251 ext/stringio/stringio.c     rb_define_method(StringIO, "eof", strio_eof, 0);
rb_define_method 1252 ext/stringio/stringio.c     rb_define_method(StringIO, "eof?", strio_eof, 0);
rb_define_method 1253 ext/stringio/stringio.c     rb_define_method(StringIO, "fcntl", strio_fcntl, -1);
rb_define_method 1254 ext/stringio/stringio.c     rb_define_method(StringIO, "flush", strio_flush, 0);
rb_define_method 1255 ext/stringio/stringio.c     rb_define_method(StringIO, "fsync", strio_fsync, 0);
rb_define_method 1256 ext/stringio/stringio.c     rb_define_method(StringIO, "pos", strio_get_pos, 0);
rb_define_method 1257 ext/stringio/stringio.c     rb_define_method(StringIO, "pos=", strio_set_pos, 1);
rb_define_method 1258 ext/stringio/stringio.c     rb_define_method(StringIO, "rewind", strio_rewind, 0);
rb_define_method 1259 ext/stringio/stringio.c     rb_define_method(StringIO, "seek", strio_seek, -1);
rb_define_method 1260 ext/stringio/stringio.c     rb_define_method(StringIO, "sync", strio_get_sync, 0);
rb_define_method 1261 ext/stringio/stringio.c     rb_define_method(StringIO, "sync=", strio_set_sync, 1);
rb_define_method 1262 ext/stringio/stringio.c     rb_define_method(StringIO, "tell", strio_tell, 0);
rb_define_method 1263 ext/stringio/stringio.c     rb_define_method(StringIO, "path", strio_path, 0);
rb_define_method 1265 ext/stringio/stringio.c     rb_define_method(StringIO, "each", strio_each, -1);
rb_define_method 1266 ext/stringio/stringio.c     rb_define_method(StringIO, "each_byte", strio_each_byte, 0);
rb_define_method 1267 ext/stringio/stringio.c     rb_define_method(StringIO, "each_line", strio_each, -1);
rb_define_method 1268 ext/stringio/stringio.c     rb_define_method(StringIO, "getc", strio_getc, 0);
rb_define_method 1269 ext/stringio/stringio.c     rb_define_method(StringIO, "ungetc", strio_ungetc, 1);
rb_define_method 1270 ext/stringio/stringio.c     rb_define_method(StringIO, "readchar", strio_readchar, 0);
rb_define_method 1271 ext/stringio/stringio.c     rb_define_method(StringIO, "gets", strio_gets, -1);
rb_define_method 1272 ext/stringio/stringio.c     rb_define_method(StringIO, "readline", strio_readline, -1);
rb_define_method 1273 ext/stringio/stringio.c     rb_define_method(StringIO, "readlines", strio_readlines, -1);
rb_define_method 1274 ext/stringio/stringio.c     rb_define_method(StringIO, "read", strio_read, -1);
rb_define_method 1275 ext/stringio/stringio.c     rb_define_method(StringIO, "sysread", strio_sysread, -1);
rb_define_method 1276 ext/stringio/stringio.c     rb_define_method(StringIO, "readpartial", strio_sysread, -1);
rb_define_method 1278 ext/stringio/stringio.c     rb_define_method(StringIO, "write", strio_write, 1);
rb_define_method 1279 ext/stringio/stringio.c     rb_define_method(StringIO, "<<", strio_addstr, 1);
rb_define_method 1280 ext/stringio/stringio.c     rb_define_method(StringIO, "print", strio_print, -1);
rb_define_method 1281 ext/stringio/stringio.c     rb_define_method(StringIO, "printf", strio_printf, -1);
rb_define_method 1282 ext/stringio/stringio.c     rb_define_method(StringIO, "putc", strio_putc, 1);
rb_define_method 1283 ext/stringio/stringio.c     rb_define_method(StringIO, "puts", strio_puts, -1);
rb_define_method 1284 ext/stringio/stringio.c     rb_define_method(StringIO, "syswrite", strio_syswrite, 1);
rb_define_method 1286 ext/stringio/stringio.c     rb_define_method(StringIO, "isatty", strio_isatty, 0);
rb_define_method 1287 ext/stringio/stringio.c     rb_define_method(StringIO, "tty?", strio_isatty, 0);
rb_define_method 1288 ext/stringio/stringio.c     rb_define_method(StringIO, "pid", strio_pid, 0);
rb_define_method 1289 ext/stringio/stringio.c     rb_define_method(StringIO, "fileno", strio_fileno, 0);
rb_define_method 1290 ext/stringio/stringio.c     rb_define_method(StringIO, "size", strio_size, 0);
rb_define_method 1291 ext/stringio/stringio.c     rb_define_method(StringIO, "length", strio_size, 0);
rb_define_method 1292 ext/stringio/stringio.c     rb_define_method(StringIO, "truncate", strio_truncate, 1);
rb_define_method 1316 ext/strscan/strscan.c     rb_define_method(StringScanner, "reset",       strscan_reset,       0);
rb_define_method 1317 ext/strscan/strscan.c     rb_define_method(StringScanner, "terminate",   strscan_terminate,   0);
rb_define_method 1318 ext/strscan/strscan.c     rb_define_method(StringScanner, "clear",       strscan_clear,       0);
rb_define_method 1319 ext/strscan/strscan.c     rb_define_method(StringScanner, "string",      strscan_get_string,  0);
rb_define_method 1320 ext/strscan/strscan.c     rb_define_method(StringScanner, "string=",     strscan_set_string,  1);
rb_define_method 1321 ext/strscan/strscan.c     rb_define_method(StringScanner, "concat",      strscan_concat,      1);
rb_define_method 1322 ext/strscan/strscan.c     rb_define_method(StringScanner, "<<",          strscan_concat,      1);
rb_define_method 1323 ext/strscan/strscan.c     rb_define_method(StringScanner, "pos",         strscan_get_pos,     0);
rb_define_method 1324 ext/strscan/strscan.c     rb_define_method(StringScanner, "pos=",        strscan_set_pos,     1);
rb_define_method 1325 ext/strscan/strscan.c     rb_define_method(StringScanner, "pointer",     strscan_get_pos,     0);
rb_define_method 1326 ext/strscan/strscan.c     rb_define_method(StringScanner, "pointer=",    strscan_set_pos,     1);
rb_define_method 1328 ext/strscan/strscan.c     rb_define_method(StringScanner, "scan",        strscan_scan,        1);
rb_define_method 1329 ext/strscan/strscan.c     rb_define_method(StringScanner, "skip",        strscan_skip,        1);
rb_define_method 1330 ext/strscan/strscan.c     rb_define_method(StringScanner, "match?",      strscan_match_p,     1);
rb_define_method 1331 ext/strscan/strscan.c     rb_define_method(StringScanner, "check",       strscan_check,       1);
rb_define_method 1332 ext/strscan/strscan.c     rb_define_method(StringScanner, "scan_full",   strscan_scan_full,   3);
rb_define_method 1334 ext/strscan/strscan.c     rb_define_method(StringScanner, "scan_until",  strscan_scan_until,  1);
rb_define_method 1335 ext/strscan/strscan.c     rb_define_method(StringScanner, "skip_until",  strscan_skip_until,  1);
rb_define_method 1336 ext/strscan/strscan.c     rb_define_method(StringScanner, "exist?",      strscan_exist_p,     1);
rb_define_method 1337 ext/strscan/strscan.c     rb_define_method(StringScanner, "check_until", strscan_check_until, 1);
rb_define_method 1338 ext/strscan/strscan.c     rb_define_method(StringScanner, "search_full", strscan_search_full, 3);
rb_define_method 1340 ext/strscan/strscan.c     rb_define_method(StringScanner, "getch",       strscan_getch,       0);
rb_define_method 1341 ext/strscan/strscan.c     rb_define_method(StringScanner, "get_byte",    strscan_get_byte,    0);
rb_define_method 1342 ext/strscan/strscan.c     rb_define_method(StringScanner, "getbyte",     strscan_getbyte,     0);
rb_define_method 1343 ext/strscan/strscan.c     rb_define_method(StringScanner, "peek",        strscan_peek,        1);
rb_define_method 1344 ext/strscan/strscan.c     rb_define_method(StringScanner, "peep",        strscan_peep,        1);
rb_define_method 1346 ext/strscan/strscan.c     rb_define_method(StringScanner, "unscan",      strscan_unscan,      0);
rb_define_method 1348 ext/strscan/strscan.c     rb_define_method(StringScanner, "beginning_of_line?", strscan_bol_p, 0);
rb_define_method 1350 ext/strscan/strscan.c     rb_define_method(StringScanner, "eos?",        strscan_eos_p,       0);
rb_define_method 1351 ext/strscan/strscan.c     rb_define_method(StringScanner, "empty?",      strscan_empty_p,     0);
rb_define_method 1352 ext/strscan/strscan.c     rb_define_method(StringScanner, "rest?",       strscan_rest_p,      0);
rb_define_method 1354 ext/strscan/strscan.c     rb_define_method(StringScanner, "matched?",    strscan_matched_p,   0);
rb_define_method 1355 ext/strscan/strscan.c     rb_define_method(StringScanner, "matched",     strscan_matched,     0);
rb_define_method 1356 ext/strscan/strscan.c     rb_define_method(StringScanner, "matched_size", strscan_matched_size, 0);
rb_define_method 1357 ext/strscan/strscan.c     rb_define_method(StringScanner, "matchedsize", strscan_matchedsize, 0);
rb_define_method 1358 ext/strscan/strscan.c     rb_define_method(StringScanner, "[]",          strscan_aref,        1);
rb_define_method 1359 ext/strscan/strscan.c     rb_define_method(StringScanner, "pre_match",   strscan_pre_match,   0);
rb_define_method 1360 ext/strscan/strscan.c     rb_define_method(StringScanner, "post_match",  strscan_post_match,  0);
rb_define_method 1362 ext/strscan/strscan.c     rb_define_method(StringScanner, "rest",        strscan_rest,        0);
rb_define_method 1363 ext/strscan/strscan.c     rb_define_method(StringScanner, "rest_size",   strscan_rest_size,   0);
rb_define_method 1364 ext/strscan/strscan.c     rb_define_method(StringScanner, "restsize",    strscan_restsize,    0);
rb_define_method 1366 ext/strscan/strscan.c     rb_define_method(StringScanner, "inspect",     strscan_inspect,     0);
rb_define_method 2219 ext/syck/rubyext.c     rb_define_method( cResolver, "initialize", syck_resolver_initialize, 0 );
rb_define_method 2220 ext/syck/rubyext.c     rb_define_method( cResolver, "add_type", syck_resolver_add_type, 2 );
rb_define_method 2221 ext/syck/rubyext.c     rb_define_method( cResolver, "use_types_at", syck_resolver_use_types_at, 1 );
rb_define_method 2222 ext/syck/rubyext.c     rb_define_method( cResolver, "detect_implicit", syck_resolver_detect_implicit, 1 );
rb_define_method 2223 ext/syck/rubyext.c     rb_define_method( cResolver, "transfer", syck_resolver_transfer, 2 );
rb_define_method 2224 ext/syck/rubyext.c     rb_define_method( cResolver, "node_import", syck_resolver_node_import, 1 );
rb_define_method 2225 ext/syck/rubyext.c     rb_define_method( cResolver, "tagurize", syck_resolver_tagurize, 1 );
rb_define_method 2245 ext/syck/rubyext.c     rb_define_method(cParser, "initialize", syck_parser_initialize, -1 );
rb_define_method 2246 ext/syck/rubyext.c     rb_define_method(cParser, "bufsize=", syck_parser_bufsize_set, 1 );
rb_define_method 2247 ext/syck/rubyext.c     rb_define_method(cParser, "bufsize", syck_parser_bufsize_get, 0 );
rb_define_method 2248 ext/syck/rubyext.c     rb_define_method(cParser, "load", syck_parser_load, -1);
rb_define_method 2249 ext/syck/rubyext.c     rb_define_method(cParser, "load_documents", syck_parser_load_documents, -1);
rb_define_method 2250 ext/syck/rubyext.c     rb_define_method(cParser, "set_resolver", syck_parser_set_resolver, 1);
rb_define_method 2256 ext/syck/rubyext.c     rb_define_method( cNode, "initialize_copy", syck_node_init_copy, 1 );
rb_define_method 2262 ext/syck/rubyext.c     rb_define_method( cNode, "type_id=", syck_node_type_id_set, 1 );
rb_define_method 2263 ext/syck/rubyext.c     rb_define_method( cNode, "transform", syck_node_transform, 0);
rb_define_method 2272 ext/syck/rubyext.c     rb_define_method( cScalar, "initialize", syck_scalar_initialize, 3 );
rb_define_method 2273 ext/syck/rubyext.c     rb_define_method( cScalar, "value=", syck_scalar_value_set, 1 );
rb_define_method 2274 ext/syck/rubyext.c     rb_define_method( cScalar, "style=", syck_scalar_style_set, 1 );
rb_define_method 2277 ext/syck/rubyext.c     rb_define_method( cSeq, "initialize", syck_seq_initialize, 3 );
rb_define_method 2278 ext/syck/rubyext.c     rb_define_method( cSeq, "value=", syck_seq_value_set, 1 );
rb_define_method 2279 ext/syck/rubyext.c     rb_define_method( cSeq, "add", syck_seq_add_m, 1 );
rb_define_method 2280 ext/syck/rubyext.c     rb_define_method( cSeq, "style=", syck_seq_style_set, 1 );
rb_define_method 2283 ext/syck/rubyext.c     rb_define_method( cMap, "initialize", syck_map_initialize, 3 );
rb_define_method 2284 ext/syck/rubyext.c     rb_define_method( cMap, "value=", syck_map_value_set, 1 );
rb_define_method 2285 ext/syck/rubyext.c     rb_define_method( cMap, "add", syck_map_add_m, 2 );
rb_define_method 2286 ext/syck/rubyext.c     rb_define_method( cMap, "style=", syck_map_style_set, 1 );
rb_define_method 2294 ext/syck/rubyext.c     rb_define_method( cPrivateType, "initialize", syck_privatetype_initialize, 2);
rb_define_method 2303 ext/syck/rubyext.c     rb_define_method( cDomainType, "initialize", syck_domaintype_initialize, 3);
rb_define_method 2311 ext/syck/rubyext.c     rb_define_method( cYObject, "initialize", syck_yobject_initialize, 2);
rb_define_method 2312 ext/syck/rubyext.c     rb_define_method( cYObject, "yaml_initialize", syck_yobject_initialize, 2);
rb_define_method 2319 ext/syck/rubyext.c     rb_define_method( cBadAlias, "initialize", syck_badalias_initialize, 1);
rb_define_method 2320 ext/syck/rubyext.c     rb_define_method( cBadAlias, "<=>", syck_badalias_cmp, 1);
rb_define_method 2338 ext/syck/rubyext.c     rb_define_method( cOut, "initialize", syck_out_initialize, 1 );
rb_define_method 2339 ext/syck/rubyext.c     rb_define_method( cOut, "map", syck_out_map, -1 );
rb_define_method 2340 ext/syck/rubyext.c     rb_define_method( cOut, "seq", syck_out_seq, -1 );
rb_define_method 2341 ext/syck/rubyext.c     rb_define_method( cOut, "scalar", syck_out_scalar, -1 );
rb_define_method 2349 ext/syck/rubyext.c     rb_define_method( cEmitter, "initialize", syck_emitter_reset, -1 );
rb_define_method 2350 ext/syck/rubyext.c     rb_define_method( cEmitter, "reset", syck_emitter_reset, -1 );
rb_define_method 2351 ext/syck/rubyext.c     rb_define_method( cEmitter, "emit", syck_emitter_emit, -1 );
rb_define_method 2352 ext/syck/rubyext.c     rb_define_method( cEmitter, "set_resolver", syck_emitter_set_resolver, 1);
rb_define_method 2353 ext/syck/rubyext.c     rb_define_method( cEmitter, "node_export", syck_emitter_node_export, 1);
rb_define_method 7849 ext/tk/tcltklib.c     rb_define_method(ip, "initialize", ip_init, -1);
rb_define_method 7850 ext/tk/tcltklib.c     rb_define_method(ip, "create_slave", ip_create_slave, -1);
rb_define_method 7851 ext/tk/tcltklib.c     rb_define_method(ip, "slave_of?", ip_is_slave_of_p, 1);
rb_define_method 7852 ext/tk/tcltklib.c     rb_define_method(ip, "make_safe", ip_make_safe, 0);
rb_define_method 7853 ext/tk/tcltklib.c     rb_define_method(ip, "safe?", ip_is_safe_p, 0);
rb_define_method 7854 ext/tk/tcltklib.c     rb_define_method(ip, "allow_ruby_exit?", ip_allow_ruby_exit_p, 0);
rb_define_method 7855 ext/tk/tcltklib.c     rb_define_method(ip, "allow_ruby_exit=", ip_allow_ruby_exit_set, 1);
rb_define_method 7856 ext/tk/tcltklib.c     rb_define_method(ip, "delete", ip_delete, 0);
rb_define_method 7857 ext/tk/tcltklib.c     rb_define_method(ip, "deleted?", ip_is_deleted_p, 0);
rb_define_method 7858 ext/tk/tcltklib.c     rb_define_method(ip, "has_mainwindow?", ip_has_mainwindow_p, 0);
rb_define_method 7859 ext/tk/tcltklib.c     rb_define_method(ip, "invalid_namespace?", ip_has_invalid_namespace_p, 0);
rb_define_method 7860 ext/tk/tcltklib.c     rb_define_method(ip, "_eval", ip_eval, 1);
rb_define_method 7861 ext/tk/tcltklib.c     rb_define_method(ip, "_toUTF8", ip_toUTF8, -1);
rb_define_method 7862 ext/tk/tcltklib.c     rb_define_method(ip, "_fromUTF8", ip_fromUTF8, -1);
rb_define_method 7863 ext/tk/tcltklib.c     rb_define_method(ip, "_thread_vwait", ip_thread_vwait, 1);
rb_define_method 7864 ext/tk/tcltklib.c     rb_define_method(ip, "_thread_tkwait", ip_thread_tkwait, 2);
rb_define_method 7865 ext/tk/tcltklib.c     rb_define_method(ip, "_invoke", ip_invoke, -1);
rb_define_method 7866 ext/tk/tcltklib.c     rb_define_method(ip, "_immediate_invoke", ip_invoke_immediate, -1);
rb_define_method 7867 ext/tk/tcltklib.c     rb_define_method(ip, "_return_value", ip_retval, 0);
rb_define_method 7869 ext/tk/tcltklib.c     rb_define_method(ip, "_create_console", ip_create_console, 0);
rb_define_method 7873 ext/tk/tcltklib.c     rb_define_method(ip, "_get_variable", ip_get_variable, 2);
rb_define_method 7874 ext/tk/tcltklib.c     rb_define_method(ip, "_get_variable2", ip_get_variable2, 3);
rb_define_method 7875 ext/tk/tcltklib.c     rb_define_method(ip, "_set_variable", ip_set_variable, 3);
rb_define_method 7876 ext/tk/tcltklib.c     rb_define_method(ip, "_set_variable2", ip_set_variable2, 4);
rb_define_method 7877 ext/tk/tcltklib.c     rb_define_method(ip, "_unset_variable", ip_unset_variable, 2);
rb_define_method 7878 ext/tk/tcltklib.c     rb_define_method(ip, "_unset_variable2", ip_unset_variable2, 3);
rb_define_method 7879 ext/tk/tcltklib.c     rb_define_method(ip, "_get_global_var", ip_get_global_var, 1);
rb_define_method 7880 ext/tk/tcltklib.c     rb_define_method(ip, "_get_global_var2", ip_get_global_var2, 2);
rb_define_method 7881 ext/tk/tcltklib.c     rb_define_method(ip, "_set_global_var", ip_set_global_var, 2);
rb_define_method 7882 ext/tk/tcltklib.c     rb_define_method(ip, "_set_global_var2", ip_set_global_var2, 3);
rb_define_method 7883 ext/tk/tcltklib.c     rb_define_method(ip, "_unset_global_var", ip_unset_global_var, 1);
rb_define_method 7884 ext/tk/tcltklib.c     rb_define_method(ip, "_unset_global_var2", ip_unset_global_var2, 2);
rb_define_method 7888 ext/tk/tcltklib.c     rb_define_method(ip, "_split_tklist", ip_split_tklist, 1);
rb_define_method 7889 ext/tk/tcltklib.c     rb_define_method(ip, "_merge_tklist", lib_merge_tklist, -1);
rb_define_method 7890 ext/tk/tcltklib.c     rb_define_method(ip, "_conv_listelement", lib_conv_listelement, 1);
rb_define_method 7894 ext/tk/tcltklib.c     rb_define_method(ip, "mainloop", ip_mainloop, -1);
rb_define_method 7895 ext/tk/tcltklib.c     rb_define_method(ip, "mainloop_watchdog", ip_mainloop_watchdog, -1);
rb_define_method 7896 ext/tk/tcltklib.c     rb_define_method(ip, "do_one_event", ip_do_one_event, -1);
rb_define_method 7897 ext/tk/tcltklib.c     rb_define_method(ip, "mainloop_abort_on_exception",
rb_define_method 7899 ext/tk/tcltklib.c     rb_define_method(ip, "mainloop_abort_on_exception=",
rb_define_method 7901 ext/tk/tcltklib.c     rb_define_method(ip, "set_eventloop_tick", ip_set_eventloop_tick, 1);
rb_define_method 7902 ext/tk/tcltklib.c     rb_define_method(ip, "get_eventloop_tick", ip_get_eventloop_tick, 0);
rb_define_method 7903 ext/tk/tcltklib.c     rb_define_method(ip, "set_no_event_wait", ip_set_no_event_wait, 1);
rb_define_method 7904 ext/tk/tcltklib.c     rb_define_method(ip, "get_no_event_wait", ip_get_no_event_wait, 0);
rb_define_method 7905 ext/tk/tcltklib.c     rb_define_method(ip, "set_eventloop_weight", ip_set_eventloop_weight, 2);
rb_define_method 7906 ext/tk/tcltklib.c     rb_define_method(ip, "get_eventloop_weight", ip_get_eventloop_weight, 0);
rb_define_method 7907 ext/tk/tcltklib.c     rb_define_method(ip, "set_max_block_time", set_max_block_time, 1);
rb_define_method 7908 ext/tk/tcltklib.c     rb_define_method(ip, "restart", ip_restart, 0);
rb_define_method 1563 ext/tk/tkutil/tkutil.c     rb_define_method(cCB_SUBST, "initialize", cbsubst_initialize, -1);
rb_define_method 1575 ext/tk/tkutil/tkutil.c     rb_define_method(cTkObject, "path", tkobj_path, 0);
rb_define_method 1618 ext/tk/tkutil/tkutil.c     rb_define_method(mTK, "_toUTF8", tk_toUTF8, -1);
rb_define_method 1619 ext/tk/tkutil/tkutil.c     rb_define_method(mTK, "_fromUTF8", tk_fromUTF8, -1);
rb_define_method 1620 ext/tk/tkutil/tkutil.c     rb_define_method(mTK, "_symbolkey2str", tk_symbolkey2str, 1);
rb_define_method 1621 ext/tk/tkutil/tkutil.c     rb_define_method(mTK, "hash_kv", tk_hash_kv, -1);
rb_define_method 1622 ext/tk/tkutil/tkutil.c     rb_define_method(mTK, "_get_eval_string", tk_get_eval_string, -1);
rb_define_method 1623 ext/tk/tkutil/tkutil.c     rb_define_method(mTK, "_get_eval_enc_str", tk_get_eval_enc_str, 1);
rb_define_method 1624 ext/tk/tkutil/tkutil.c     rb_define_method(mTK, "_conv_args", tk_conv_args, -1);
rb_define_method 1626 ext/tk/tkutil/tkutil.c     rb_define_method(mTK, "bool", tcl2rb_bool, 1);
rb_define_method 1627 ext/tk/tkutil/tkutil.c     rb_define_method(mTK, "number", tcl2rb_number, 1);
rb_define_method 1628 ext/tk/tkutil/tkutil.c     rb_define_method(mTK, "string", tcl2rb_string, 1);
rb_define_method 1629 ext/tk/tkutil/tkutil.c     rb_define_method(mTK, "num_or_str", tcl2rb_num_or_str, 1);
rb_define_method 6925 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "initialize", fole_initialize, -1);
rb_define_method 6936 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "invoke", fole_invoke, -1);
rb_define_method 6937 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "[]", fole_getproperty, 1);
rb_define_method 6938 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "_invoke", fole_invoke2, 3);
rb_define_method 6939 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "_getproperty", fole_getproperty2, 3);
rb_define_method 6940 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "_setproperty", fole_setproperty2, 3);
rb_define_method 6943 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "[]=", fole_setproperty, -1);
rb_define_method 6945 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "ole_free", fole_free, 0);
rb_define_method 6947 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "each", fole_each, 0);
rb_define_method 6948 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "method_missing", fole_missing, -1);
rb_define_method 6951 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "setproperty", fole_setproperty, -1);
rb_define_method 6953 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "ole_methods", fole_methods, 0);
rb_define_method 6954 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "ole_get_methods", fole_get_methods, 0);
rb_define_method 6955 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "ole_put_methods", fole_put_methods, 0);
rb_define_method 6956 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "ole_func_methods", fole_func_methods, 0);
rb_define_method 6958 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "ole_method", fole_method_help, 1);
rb_define_method 6960 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "ole_type", fole_type, 0);
rb_define_method 6962 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE, "ole_typelib", fole_typelib, 0);
rb_define_method 7000 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPELIB, "initialize", foletypelib_initialize, -2);
rb_define_method 7001 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPELIB, "guid", foletypelib_guid, 0);
rb_define_method 7002 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPELIB, "name", foletypelib_name, 0);
rb_define_method 7003 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPELIB, "version", foletypelib_version, 0);
rb_define_method 7004 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPELIB, "major_version", foletypelib_major_version, 0);
rb_define_method 7005 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPELIB, "minor_version", foletypelib_minor_version, 0);
rb_define_method 7006 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPELIB, "path", foletypelib_path, 0);
rb_define_method 7007 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPELIB, "ole_classes", foletypelib_ole_classes, 0);
rb_define_method 7015 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "initialize", foletype_initialize, 2);
rb_define_method 7016 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "name", foletype_name, 0);
rb_define_method 7017 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "ole_type", foletype_ole_type, 0);
rb_define_method 7018 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "guid", foletype_guid, 0);
rb_define_method 7019 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "progid", foletype_progid, 0);
rb_define_method 7020 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "visible?", foletype_visible, 0);
rb_define_method 7023 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "major_version", foletype_major_version, 0);
rb_define_method 7024 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "minor_version", foletype_minor_version, 0);
rb_define_method 7025 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "typekind", foletype_typekind, 0);
rb_define_method 7026 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "helpstring", foletype_helpstring, 0);
rb_define_method 7027 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "src_type", foletype_src_type, 0);
rb_define_method 7028 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "helpfile", foletype_helpfile, 0);
rb_define_method 7029 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "helpcontext", foletype_helpcontext, 0);
rb_define_method 7030 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "variables", foletype_variables, 0);
rb_define_method 7031 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "ole_methods", foletype_methods, -1);
rb_define_method 7032 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "ole_typelib", foletype_ole_typelib, 0);
rb_define_method 7033 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_TYPE, "implemented_ole_types", foletype_impl_ole_types, 0);
rb_define_method 7036 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_VARIABLE, "name", folevariable_name, 0);
rb_define_method 7037 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_VARIABLE, "ole_type", folevariable_ole_type, 0);
rb_define_method 7038 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_VARIABLE, "ole_type_detail", folevariable_ole_type_detail, 0);
rb_define_method 7039 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_VARIABLE, "value", folevariable_value, 0);
rb_define_method 7040 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_VARIABLE, "visible?", folevariable_visible, 0);
rb_define_method 7041 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_VARIABLE, "variable_kind", folevariable_variable_kind, 0);
rb_define_method 7042 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_VARIABLE, "varkind", folevariable_varkind, 0);
rb_define_method 7047 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "initialize", folemethod_initialize, 2);
rb_define_method 7049 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "name", folemethod_name, 0);
rb_define_method 7050 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "return_type", folemethod_return_type, 0);
rb_define_method 7051 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "return_vtype", folemethod_return_vtype, 0);
rb_define_method 7052 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "return_type_detail", folemethod_return_type_detail, 0);
rb_define_method 7053 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "invoke_kind", folemethod_invoke_kind, 0);
rb_define_method 7054 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "invkind", folemethod_invkind, 0);
rb_define_method 7055 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "visible?", folemethod_visible, 0);
rb_define_method 7056 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "event?", folemethod_event, 0);
rb_define_method 7057 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "event_interface", folemethod_event_interface, 0);
rb_define_method 7058 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "helpstring", folemethod_helpstring, 0);
rb_define_method 7059 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "helpfile", folemethod_helpfile, 0);
rb_define_method 7060 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "helpcontext", folemethod_helpcontext, 0);
rb_define_method 7061 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "dispid", folemethod_dispid, 0);
rb_define_method 7062 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "offset_vtbl", folemethod_offset_vtbl, 0);
rb_define_method 7063 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "size_params", folemethod_size_params, 0);
rb_define_method 7064 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "size_opt_params", folemethod_size_opt_params, 0);
rb_define_method 7065 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_METHOD, "params", folemethod_params, 0);
rb_define_method 7069 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_PARAM, "name", foleparam_name, 0);
rb_define_method 7070 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_PARAM, "ole_type", foleparam_ole_type, 0);
rb_define_method 7071 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_PARAM, "ole_type_detail", foleparam_ole_type_detail, 0);
rb_define_method 7072 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_PARAM, "input?", foleparam_input, 0);
rb_define_method 7073 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_PARAM, "output?", foleparam_output, 0);
rb_define_method 7074 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_PARAM, "optional?", foleparam_optional, 0);
rb_define_method 7075 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_PARAM, "retval?", foleparam_retval, 0);
rb_define_method 7076 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_PARAM, "default", foleparam_default, 0);
rb_define_method 7082 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_EVENT, "initialize", fev_initialize, -1);
rb_define_method 7085 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_EVENT, "on_event", fev_on_event, -1);
rb_define_method 7086 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_EVENT, "on_event_with_outargs", fev_on_event_with_outargs, -1);
rb_define_method 7090 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_VARIANT, "initialize", folevariant_initialize, -2);
rb_define_method 7091 ext/win32ole/win32ole.c     rb_define_method(cWIN32OLE_VARIANT, "value", folevariant_value, 0);
rb_define_method 3440 ext/zlib/zlib.c     rb_define_method(cZStream, "avail_out", rb_zstream_avail_out, 0);
rb_define_method 3441 ext/zlib/zlib.c     rb_define_method(cZStream, "avail_out=", rb_zstream_set_avail_out, 1);
rb_define_method 3442 ext/zlib/zlib.c     rb_define_method(cZStream, "avail_in", rb_zstream_avail_in, 0);
rb_define_method 3443 ext/zlib/zlib.c     rb_define_method(cZStream, "total_in", rb_zstream_total_in, 0);
rb_define_method 3444 ext/zlib/zlib.c     rb_define_method(cZStream, "total_out", rb_zstream_total_out, 0);
rb_define_method 3445 ext/zlib/zlib.c     rb_define_method(cZStream, "data_type", rb_zstream_data_type, 0);
rb_define_method 3446 ext/zlib/zlib.c     rb_define_method(cZStream, "adler", rb_zstream_adler, 0);
rb_define_method 3447 ext/zlib/zlib.c     rb_define_method(cZStream, "finished?", rb_zstream_finished_p, 0);
rb_define_method 3448 ext/zlib/zlib.c     rb_define_method(cZStream, "stream_end?", rb_zstream_finished_p, 0);
rb_define_method 3449 ext/zlib/zlib.c     rb_define_method(cZStream, "closed?", rb_zstream_closed_p, 0);
rb_define_method 3450 ext/zlib/zlib.c     rb_define_method(cZStream, "ended?", rb_zstream_closed_p, 0);
rb_define_method 3451 ext/zlib/zlib.c     rb_define_method(cZStream, "close", rb_zstream_end, 0);
rb_define_method 3452 ext/zlib/zlib.c     rb_define_method(cZStream, "end", rb_zstream_end, 0);
rb_define_method 3453 ext/zlib/zlib.c     rb_define_method(cZStream, "reset", rb_zstream_reset, 0);
rb_define_method 3454 ext/zlib/zlib.c     rb_define_method(cZStream, "finish", rb_zstream_finish, 0);
rb_define_method 3455 ext/zlib/zlib.c     rb_define_method(cZStream, "flush_next_in", rb_zstream_flush_next_in, 0);
rb_define_method 3456 ext/zlib/zlib.c     rb_define_method(cZStream, "flush_next_out", rb_zstream_flush_next_out, 0);
rb_define_method 3465 ext/zlib/zlib.c     rb_define_method(cDeflate, "initialize", rb_deflate_initialize, -1);
rb_define_method 3466 ext/zlib/zlib.c     rb_define_method(cDeflate, "initialize_copy", rb_deflate_init_copy, 0);
rb_define_method 3467 ext/zlib/zlib.c     rb_define_method(cDeflate, "deflate", rb_deflate_deflate, -1);
rb_define_method 3468 ext/zlib/zlib.c     rb_define_method(cDeflate, "<<", rb_deflate_addstr, 1);
rb_define_method 3469 ext/zlib/zlib.c     rb_define_method(cDeflate, "flush", rb_deflate_flush, -1);
rb_define_method 3470 ext/zlib/zlib.c     rb_define_method(cDeflate, "params", rb_deflate_params, 2);
rb_define_method 3471 ext/zlib/zlib.c     rb_define_method(cDeflate, "set_dictionary", rb_deflate_set_dictionary, 1);
rb_define_method 3476 ext/zlib/zlib.c     rb_define_method(cInflate, "initialize", rb_inflate_initialize, -1);
rb_define_method 3477 ext/zlib/zlib.c     rb_define_method(cInflate, "inflate", rb_inflate_inflate, 1);
rb_define_method 3478 ext/zlib/zlib.c     rb_define_method(cInflate, "<<", rb_inflate_addstr, 1);
rb_define_method 3479 ext/zlib/zlib.c     rb_define_method(cInflate, "sync", rb_inflate_sync, 1);
rb_define_method 3480 ext/zlib/zlib.c     rb_define_method(cInflate, "sync_point?", rb_inflate_sync_point_p, 0);
rb_define_method 3481 ext/zlib/zlib.c     rb_define_method(cInflate, "set_dictionary", rb_inflate_set_dictionary, 1);
rb_define_method 3523 ext/zlib/zlib.c     rb_define_method(cGzipFile, "to_io", rb_gzfile_to_io, 0);
rb_define_method 3524 ext/zlib/zlib.c     rb_define_method(cGzipFile, "crc", rb_gzfile_crc, 0);
rb_define_method 3525 ext/zlib/zlib.c     rb_define_method(cGzipFile, "mtime", rb_gzfile_mtime, 0);
rb_define_method 3526 ext/zlib/zlib.c     rb_define_method(cGzipFile, "level", rb_gzfile_level, 0);
rb_define_method 3527 ext/zlib/zlib.c     rb_define_method(cGzipFile, "os_code", rb_gzfile_os_code, 0);
rb_define_method 3528 ext/zlib/zlib.c     rb_define_method(cGzipFile, "orig_name", rb_gzfile_orig_name, 0);
rb_define_method 3529 ext/zlib/zlib.c     rb_define_method(cGzipFile, "comment", rb_gzfile_comment, 0);
rb_define_method 3530 ext/zlib/zlib.c     rb_define_method(cGzipReader, "lineno", rb_gzfile_lineno, 0);
rb_define_method 3531 ext/zlib/zlib.c     rb_define_method(cGzipReader, "lineno=", rb_gzfile_set_lineno, 1);
rb_define_method 3532 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "mtime=", rb_gzfile_set_mtime, 1);
rb_define_method 3533 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "orig_name=", rb_gzfile_set_orig_name,1);
rb_define_method 3534 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "comment=", rb_gzfile_set_comment, 1);
rb_define_method 3535 ext/zlib/zlib.c     rb_define_method(cGzipFile, "close", rb_gzfile_close, 0);
rb_define_method 3536 ext/zlib/zlib.c     rb_define_method(cGzipFile, "finish", rb_gzfile_finish, 0);
rb_define_method 3537 ext/zlib/zlib.c     rb_define_method(cGzipFile, "closed?", rb_gzfile_closed_p, 0);
rb_define_method 3538 ext/zlib/zlib.c     rb_define_method(cGzipReader, "eof", rb_gzfile_eof_p, 0);
rb_define_method 3539 ext/zlib/zlib.c     rb_define_method(cGzipReader, "eof?", rb_gzfile_eof_p, 0);
rb_define_method 3540 ext/zlib/zlib.c     rb_define_method(cGzipFile, "sync", rb_gzfile_sync, 0);
rb_define_method 3541 ext/zlib/zlib.c     rb_define_method(cGzipFile, "sync=", rb_gzfile_set_sync, 1);
rb_define_method 3542 ext/zlib/zlib.c     rb_define_method(cGzipReader, "pos", rb_gzfile_total_out, 0);
rb_define_method 3543 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "pos", rb_gzfile_total_in, 0);
rb_define_method 3544 ext/zlib/zlib.c     rb_define_method(cGzipReader, "tell", rb_gzfile_total_out, 0);
rb_define_method 3545 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "tell", rb_gzfile_total_in, 0);
rb_define_method 3549 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "initialize", rb_gzwriter_initialize,-1);
rb_define_method 3550 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "flush", rb_gzwriter_flush, -1);
rb_define_method 3551 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "write", rb_gzwriter_write, 1);
rb_define_method 3552 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "putc", rb_gzwriter_putc, 1);
rb_define_method 3553 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "<<", rb_gzwriter_addstr, 1);
rb_define_method 3554 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "printf", rb_gzwriter_printf, -1);
rb_define_method 3555 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "print", rb_gzwriter_print, -1);
rb_define_method 3556 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "puts", rb_gzwriter_puts, -1);
rb_define_method 3560 ext/zlib/zlib.c     rb_define_method(cGzipReader, "initialize", rb_gzreader_initialize, 1);
rb_define_method 3561 ext/zlib/zlib.c     rb_define_method(cGzipReader, "rewind", rb_gzreader_rewind, 0);
rb_define_method 3562 ext/zlib/zlib.c     rb_define_method(cGzipReader, "unused", rb_gzreader_unused, 0);
rb_define_method 3563 ext/zlib/zlib.c     rb_define_method(cGzipReader, "read", rb_gzreader_read, -1);
rb_define_method 3564 ext/zlib/zlib.c     rb_define_method(cGzipReader, "readpartial", rb_gzreader_readpartial, -1);
rb_define_method 3565 ext/zlib/zlib.c     rb_define_method(cGzipReader, "getc", rb_gzreader_getc, 0);
rb_define_method 3566 ext/zlib/zlib.c     rb_define_method(cGzipReader, "readchar", rb_gzreader_readchar, 0);
rb_define_method 3567 ext/zlib/zlib.c     rb_define_method(cGzipReader, "each_byte", rb_gzreader_each_byte, 0);
rb_define_method 3568 ext/zlib/zlib.c     rb_define_method(cGzipReader, "ungetc", rb_gzreader_ungetc, 1);
rb_define_method 3569 ext/zlib/zlib.c     rb_define_method(cGzipReader, "gets", rb_gzreader_gets, -1);
rb_define_method 3570 ext/zlib/zlib.c     rb_define_method(cGzipReader, "readline", rb_gzreader_readline, -1);
rb_define_method 3571 ext/zlib/zlib.c     rb_define_method(cGzipReader, "each", rb_gzreader_each, -1);
rb_define_method 3572 ext/zlib/zlib.c     rb_define_method(cGzipReader, "each_line", rb_gzreader_each, -1);
rb_define_method 3573 ext/zlib/zlib.c     rb_define_method(cGzipReader, "readlines", rb_gzreader_readlines, -1);
rb_define_method 4343 file.c             rb_define_method(rb_cIO, "stat",  rb_io_stat, 0); /* this is IO's method */
rb_define_method 4344 file.c             rb_define_method(rb_cFile, "lstat",  rb_file_lstat, 0);
rb_define_method 4346 file.c             rb_define_method(rb_cFile, "atime", rb_file_atime, 0);
rb_define_method 4347 file.c             rb_define_method(rb_cFile, "mtime", rb_file_mtime, 0);
rb_define_method 4348 file.c             rb_define_method(rb_cFile, "ctime", rb_file_ctime, 0);
rb_define_method 4350 file.c             rb_define_method(rb_cFile, "chmod", rb_file_chmod, 1);
rb_define_method 4351 file.c             rb_define_method(rb_cFile, "chown", rb_file_chown, 2);
rb_define_method 4352 file.c             rb_define_method(rb_cFile, "truncate", rb_file_truncate, 1);
rb_define_method 4354 file.c             rb_define_method(rb_cFile, "flock", rb_file_flock, 1);
rb_define_method 4363 file.c             rb_define_method(rb_cFile, "path",  rb_file_path, 0);
rb_define_method 4368 file.c             rb_define_method(rb_cStat, "initialize", rb_stat_init, 1);
rb_define_method 4369 file.c             rb_define_method(rb_cStat, "initialize_copy", rb_stat_init_copy, 1);
rb_define_method 4373 file.c             rb_define_method(rb_cStat, "<=>", rb_stat_cmp, 1);
rb_define_method 4375 file.c             rb_define_method(rb_cStat, "dev", rb_stat_dev, 0);
rb_define_method 4376 file.c             rb_define_method(rb_cStat, "dev_major", rb_stat_dev_major, 0);
rb_define_method 4377 file.c             rb_define_method(rb_cStat, "dev_minor", rb_stat_dev_minor, 0);
rb_define_method 4378 file.c             rb_define_method(rb_cStat, "ino", rb_stat_ino, 0);
rb_define_method 4379 file.c             rb_define_method(rb_cStat, "mode", rb_stat_mode, 0);
rb_define_method 4380 file.c             rb_define_method(rb_cStat, "nlink", rb_stat_nlink, 0);
rb_define_method 4381 file.c             rb_define_method(rb_cStat, "uid", rb_stat_uid, 0);
rb_define_method 4382 file.c             rb_define_method(rb_cStat, "gid", rb_stat_gid, 0);
rb_define_method 4383 file.c             rb_define_method(rb_cStat, "rdev", rb_stat_rdev, 0);
rb_define_method 4384 file.c             rb_define_method(rb_cStat, "rdev_major", rb_stat_rdev_major, 0);
rb_define_method 4385 file.c             rb_define_method(rb_cStat, "rdev_minor", rb_stat_rdev_minor, 0);
rb_define_method 4386 file.c             rb_define_method(rb_cStat, "size", rb_stat_size, 0);
rb_define_method 4387 file.c             rb_define_method(rb_cStat, "blksize", rb_stat_blksize, 0);
rb_define_method 4388 file.c             rb_define_method(rb_cStat, "blocks", rb_stat_blocks, 0);
rb_define_method 4389 file.c             rb_define_method(rb_cStat, "atime", rb_stat_atime, 0);
rb_define_method 4390 file.c             rb_define_method(rb_cStat, "mtime", rb_stat_mtime, 0);
rb_define_method 4391 file.c             rb_define_method(rb_cStat, "ctime", rb_stat_ctime, 0);
rb_define_method 4393 file.c             rb_define_method(rb_cStat, "inspect", rb_stat_inspect, 0);
rb_define_method 4395 file.c             rb_define_method(rb_cStat, "ftype", rb_stat_ftype, 0);
rb_define_method 4397 file.c             rb_define_method(rb_cStat, "directory?",  rb_stat_d, 0);
rb_define_method 4398 file.c             rb_define_method(rb_cStat, "readable?",  rb_stat_r, 0);
rb_define_method 4399 file.c             rb_define_method(rb_cStat, "readable_real?",  rb_stat_R, 0);
rb_define_method 4400 file.c             rb_define_method(rb_cStat, "world_readable?", rb_stat_wr, 0);
rb_define_method 4401 file.c             rb_define_method(rb_cStat, "writable?",  rb_stat_w, 0);
rb_define_method 4402 file.c             rb_define_method(rb_cStat, "writable_real?",  rb_stat_W, 0);
rb_define_method 4403 file.c             rb_define_method(rb_cStat, "world_writable?", rb_stat_ww, 0);
rb_define_method 4404 file.c             rb_define_method(rb_cStat, "executable?",  rb_stat_x, 0);
rb_define_method 4405 file.c             rb_define_method(rb_cStat, "executable_real?",  rb_stat_X, 0);
rb_define_method 4406 file.c             rb_define_method(rb_cStat, "file?",  rb_stat_f, 0);
rb_define_method 4407 file.c             rb_define_method(rb_cStat, "zero?",  rb_stat_z, 0);
rb_define_method 4408 file.c             rb_define_method(rb_cStat, "size?",  rb_stat_s, 0);
rb_define_method 4409 file.c             rb_define_method(rb_cStat, "owned?",  rb_stat_owned, 0);
rb_define_method 4410 file.c             rb_define_method(rb_cStat, "grpowned?",  rb_stat_grpowned, 0);
rb_define_method 4412 file.c             rb_define_method(rb_cStat, "pipe?",  rb_stat_p, 0);
rb_define_method 4413 file.c             rb_define_method(rb_cStat, "symlink?",  rb_stat_l, 0);
rb_define_method 4414 file.c             rb_define_method(rb_cStat, "socket?",  rb_stat_S, 0);
rb_define_method 4416 file.c             rb_define_method(rb_cStat, "blockdev?",  rb_stat_b, 0);
rb_define_method 4417 file.c             rb_define_method(rb_cStat, "chardev?",  rb_stat_c, 0);
rb_define_method 4419 file.c             rb_define_method(rb_cStat, "setuid?",  rb_stat_suid, 0);
rb_define_method 4420 file.c             rb_define_method(rb_cStat, "setgid?",  rb_stat_sgid, 0);
rb_define_method 4421 file.c             rb_define_method(rb_cStat, "sticky?",  rb_stat_sticky, 0);
rb_define_method 1918 gc.c               rb_define_method(rb_mGC, "garbage_collect", rb_gc_start, 0);
rb_define_method 2287 hash.c             rb_define_method(rb_cHash,"initialize", rb_hash_initialize, -1);
rb_define_method 2288 hash.c             rb_define_method(rb_cHash,"initialize_copy", rb_hash_replace, 1);
rb_define_method 2289 hash.c             rb_define_method(rb_cHash,"rehash", rb_hash_rehash, 0);
rb_define_method 2291 hash.c             rb_define_method(rb_cHash,"to_hash", rb_hash_to_hash, 0);
rb_define_method 2292 hash.c             rb_define_method(rb_cHash,"to_a", rb_hash_to_a, 0);
rb_define_method 2293 hash.c             rb_define_method(rb_cHash,"to_s", rb_hash_to_s, 0);
rb_define_method 2294 hash.c             rb_define_method(rb_cHash,"inspect", rb_hash_inspect, 0);
rb_define_method 2296 hash.c             rb_define_method(rb_cHash,"==", rb_hash_equal, 1);
rb_define_method 2297 hash.c             rb_define_method(rb_cHash,"[]", rb_hash_aref, 1);
rb_define_method 2298 hash.c             rb_define_method(rb_cHash,"fetch", rb_hash_fetch, -1);
rb_define_method 2299 hash.c             rb_define_method(rb_cHash,"[]=", rb_hash_aset, 2);
rb_define_method 2300 hash.c             rb_define_method(rb_cHash,"store", rb_hash_aset, 2);
rb_define_method 2301 hash.c             rb_define_method(rb_cHash,"default", rb_hash_default, -1);
rb_define_method 2302 hash.c             rb_define_method(rb_cHash,"default=", rb_hash_set_default, 1);
rb_define_method 2303 hash.c             rb_define_method(rb_cHash,"default_proc", rb_hash_default_proc, 0);
rb_define_method 2304 hash.c             rb_define_method(rb_cHash,"key", rb_hash_key, 1);
rb_define_method 2305 hash.c             rb_define_method(rb_cHash,"index", rb_hash_index, 1);
rb_define_method 2306 hash.c             rb_define_method(rb_cHash,"size", rb_hash_size, 0);
rb_define_method 2307 hash.c             rb_define_method(rb_cHash,"length", rb_hash_size, 0);
rb_define_method 2308 hash.c             rb_define_method(rb_cHash,"empty?", rb_hash_empty_p, 0);
rb_define_method 2310 hash.c             rb_define_method(rb_cHash,"each", rb_hash_each, 0);
rb_define_method 2311 hash.c             rb_define_method(rb_cHash,"each_value", rb_hash_each_value, 0);
rb_define_method 2312 hash.c             rb_define_method(rb_cHash,"each_key", rb_hash_each_key, 0);
rb_define_method 2313 hash.c             rb_define_method(rb_cHash,"each_pair", rb_hash_each_pair, 0);
rb_define_method 2314 hash.c             rb_define_method(rb_cHash,"sort", rb_hash_sort, 0);
rb_define_method 2316 hash.c             rb_define_method(rb_cHash,"keys", rb_hash_keys, 0);
rb_define_method 2317 hash.c             rb_define_method(rb_cHash,"values", rb_hash_values, 0);
rb_define_method 2318 hash.c             rb_define_method(rb_cHash,"values_at", rb_hash_values_at, -1);
rb_define_method 2320 hash.c             rb_define_method(rb_cHash,"shift", rb_hash_shift, 0);
rb_define_method 2321 hash.c             rb_define_method(rb_cHash,"delete", rb_hash_delete, 1);
rb_define_method 2322 hash.c             rb_define_method(rb_cHash,"delete_if", rb_hash_delete_if, 0);
rb_define_method 2323 hash.c             rb_define_method(rb_cHash,"select", rb_hash_select, 0);
rb_define_method 2324 hash.c             rb_define_method(rb_cHash,"reject", rb_hash_reject, 0);
rb_define_method 2325 hash.c             rb_define_method(rb_cHash,"reject!", rb_hash_reject_bang, 0);
rb_define_method 2326 hash.c             rb_define_method(rb_cHash,"clear", rb_hash_clear, 0);
rb_define_method 2327 hash.c             rb_define_method(rb_cHash,"invert", rb_hash_invert, 0);
rb_define_method 2328 hash.c             rb_define_method(rb_cHash,"update", rb_hash_update, 1);
rb_define_method 2329 hash.c             rb_define_method(rb_cHash,"replace", rb_hash_replace, 1);
rb_define_method 2330 hash.c             rb_define_method(rb_cHash,"merge!", rb_hash_update, 1);
rb_define_method 2331 hash.c             rb_define_method(rb_cHash,"merge", rb_hash_merge, 1);
rb_define_method 2333 hash.c             rb_define_method(rb_cHash,"include?", rb_hash_has_key, 1);
rb_define_method 2334 hash.c             rb_define_method(rb_cHash,"member?", rb_hash_has_key, 1);
rb_define_method 2335 hash.c             rb_define_method(rb_cHash,"has_key?", rb_hash_has_key, 1);
rb_define_method 2336 hash.c             rb_define_method(rb_cHash,"has_value?", rb_hash_has_value, 1);
rb_define_method 2337 hash.c             rb_define_method(rb_cHash,"key?", rb_hash_has_key, 1);
rb_define_method 2338 hash.c             rb_define_method(rb_cHash,"value?", rb_hash_has_value, 1);
rb_define_method 5464 io.c               rb_define_method(rb_mKernel, "display", rb_obj_display, -1);
rb_define_method 5481 io.c               rb_define_method(rb_cIO, "initialize", rb_io_initialize, -1);
rb_define_method 5497 io.c               rb_define_method(rb_cIO, "initialize_copy", rb_io_init_copy, 1);
rb_define_method 5498 io.c               rb_define_method(rb_cIO, "reopen", rb_io_reopen, -1);
rb_define_method 5500 io.c               rb_define_method(rb_cIO, "print", rb_io_print, -1);
rb_define_method 5501 io.c               rb_define_method(rb_cIO, "putc", rb_io_putc, 1);
rb_define_method 5502 io.c               rb_define_method(rb_cIO, "puts", rb_io_puts, -1);
rb_define_method 5503 io.c               rb_define_method(rb_cIO, "printf", rb_io_printf, -1);
rb_define_method 5505 io.c               rb_define_method(rb_cIO, "each",  rb_io_each_line, -1);
rb_define_method 5506 io.c               rb_define_method(rb_cIO, "each_line",  rb_io_each_line, -1);
rb_define_method 5507 io.c               rb_define_method(rb_cIO, "each_byte",  rb_io_each_byte, 0);
rb_define_method 5509 io.c               rb_define_method(rb_cIO, "syswrite", rb_io_syswrite, 1);
rb_define_method 5510 io.c               rb_define_method(rb_cIO, "sysread",  rb_io_sysread, -1);
rb_define_method 5512 io.c               rb_define_method(rb_cIO, "fileno", rb_io_fileno, 0);
rb_define_method 5514 io.c               rb_define_method(rb_cIO, "to_io", rb_io_to_io, 0);
rb_define_method 5516 io.c               rb_define_method(rb_cIO, "fsync",   rb_io_fsync, 0);
rb_define_method 5517 io.c               rb_define_method(rb_cIO, "sync",   rb_io_sync, 0);
rb_define_method 5518 io.c               rb_define_method(rb_cIO, "sync=",  rb_io_set_sync, 1);
rb_define_method 5520 io.c               rb_define_method(rb_cIO, "lineno",   rb_io_lineno, 0);
rb_define_method 5521 io.c               rb_define_method(rb_cIO, "lineno=",  rb_io_set_lineno, 1);
rb_define_method 5523 io.c               rb_define_method(rb_cIO, "readlines",  rb_io_readlines, -1);
rb_define_method 5525 io.c               rb_define_method(rb_cIO, "readpartial",  io_readpartial, -1);
rb_define_method 5526 io.c               rb_define_method(rb_cIO, "read",  io_read, -1);
rb_define_method 5527 io.c               rb_define_method(rb_cIO, "write", io_write, 1);
rb_define_method 5528 io.c               rb_define_method(rb_cIO, "gets",  rb_io_gets_m, -1);
rb_define_method 5529 io.c               rb_define_method(rb_cIO, "readline",  rb_io_readline, -1);
rb_define_method 5530 io.c               rb_define_method(rb_cIO, "getc",  rb_io_getc, 0);
rb_define_method 5531 io.c               rb_define_method(rb_cIO, "readchar",  rb_io_readchar, 0);
rb_define_method 5532 io.c               rb_define_method(rb_cIO, "ungetc",rb_io_ungetc, 1);
rb_define_method 5533 io.c               rb_define_method(rb_cIO, "<<",    rb_io_addstr, 1);
rb_define_method 5534 io.c               rb_define_method(rb_cIO, "flush", rb_io_flush, 0);
rb_define_method 5535 io.c               rb_define_method(rb_cIO, "tell", rb_io_tell, 0);
rb_define_method 5536 io.c               rb_define_method(rb_cIO, "seek", rb_io_seek_m, -1);
rb_define_method 5540 io.c               rb_define_method(rb_cIO, "rewind", rb_io_rewind, 0);
rb_define_method 5541 io.c               rb_define_method(rb_cIO, "pos", rb_io_tell, 0);
rb_define_method 5542 io.c               rb_define_method(rb_cIO, "pos=", rb_io_set_pos, 1);
rb_define_method 5543 io.c               rb_define_method(rb_cIO, "eof", rb_io_eof, 0);
rb_define_method 5544 io.c               rb_define_method(rb_cIO, "eof?", rb_io_eof, 0);
rb_define_method 5546 io.c               rb_define_method(rb_cIO, "close", rb_io_close_m, 0);
rb_define_method 5547 io.c               rb_define_method(rb_cIO, "closed?", rb_io_closed, 0);
rb_define_method 5548 io.c               rb_define_method(rb_cIO, "close_read", rb_io_close_read, 0);
rb_define_method 5549 io.c               rb_define_method(rb_cIO, "close_write", rb_io_close_write, 0);
rb_define_method 5551 io.c               rb_define_method(rb_cIO, "isatty", rb_io_isatty, 0);
rb_define_method 5552 io.c               rb_define_method(rb_cIO, "tty?", rb_io_isatty, 0);
rb_define_method 5553 io.c               rb_define_method(rb_cIO, "binmode",  rb_io_binmode, 0);
rb_define_method 5554 io.c               rb_define_method(rb_cIO, "sysseek", rb_io_sysseek, -1);
rb_define_method 5556 io.c               rb_define_method(rb_cIO, "ioctl", rb_io_ioctl, -1);
rb_define_method 5557 io.c               rb_define_method(rb_cIO, "fcntl", rb_io_fcntl, -1);
rb_define_method 5558 io.c               rb_define_method(rb_cIO, "pid", rb_io_pid, 0);
rb_define_method 5559 io.c               rb_define_method(rb_cIO, "inspect",  rb_io_inspect, 0);
rb_define_method 5633 io.c               rb_define_method(rb_cFile, "initialize",  rb_file_initialize, -1);
rb_define_method 2810 numeric.c          rb_define_method(rb_cNumeric, "singleton_method_added", num_sadded, 1);
rb_define_method 2812 numeric.c          rb_define_method(rb_cNumeric, "initialize_copy", num_init_copy, 1);
rb_define_method 2813 numeric.c          rb_define_method(rb_cNumeric, "coerce", num_coerce, 1);
rb_define_method 2815 numeric.c          rb_define_method(rb_cNumeric, "+@", num_uplus, 0);
rb_define_method 2816 numeric.c          rb_define_method(rb_cNumeric, "-@", num_uminus, 0);
rb_define_method 2817 numeric.c          rb_define_method(rb_cNumeric, "<=>", num_cmp, 1);
rb_define_method 2818 numeric.c          rb_define_method(rb_cNumeric, "eql?", num_eql, 1);
rb_define_method 2819 numeric.c          rb_define_method(rb_cNumeric, "quo", num_quo, 1);
rb_define_method 2820 numeric.c          rb_define_method(rb_cNumeric, "div", num_div, 1);
rb_define_method 2821 numeric.c          rb_define_method(rb_cNumeric, "divmod", num_divmod, 1);
rb_define_method 2822 numeric.c          rb_define_method(rb_cNumeric, "modulo", num_modulo, 1);
rb_define_method 2823 numeric.c          rb_define_method(rb_cNumeric, "remainder", num_remainder, 1);
rb_define_method 2824 numeric.c          rb_define_method(rb_cNumeric, "abs", num_abs, 0);
rb_define_method 2825 numeric.c          rb_define_method(rb_cNumeric, "to_int", num_to_int, 0);
rb_define_method 2827 numeric.c          rb_define_method(rb_cNumeric, "scalar?", num_scalar_p, 0);
rb_define_method 2828 numeric.c          rb_define_method(rb_cNumeric, "integer?", num_int_p, 0);
rb_define_method 2829 numeric.c          rb_define_method(rb_cNumeric, "zero?", num_zero_p, 0);
rb_define_method 2830 numeric.c          rb_define_method(rb_cNumeric, "nonzero?", num_nonzero_p, 0);
rb_define_method 2832 numeric.c          rb_define_method(rb_cNumeric, "floor", num_floor, 0);
rb_define_method 2833 numeric.c          rb_define_method(rb_cNumeric, "ceil", num_ceil, 0);
rb_define_method 2834 numeric.c          rb_define_method(rb_cNumeric, "round", num_round, 0);
rb_define_method 2835 numeric.c          rb_define_method(rb_cNumeric, "truncate", num_truncate, 0);
rb_define_method 2836 numeric.c          rb_define_method(rb_cNumeric, "step", num_step, -1);
rb_define_method 2842 numeric.c          rb_define_method(rb_cInteger, "integer?", int_int_p, 0);
rb_define_method 2843 numeric.c          rb_define_method(rb_cInteger, "upto", int_upto, 1);
rb_define_method 2844 numeric.c          rb_define_method(rb_cInteger, "downto", int_downto, 1);
rb_define_method 2845 numeric.c          rb_define_method(rb_cInteger, "times", int_dotimes, 0);
rb_define_method 2847 numeric.c          rb_define_method(rb_cInteger, "succ", int_succ, 0);
rb_define_method 2848 numeric.c          rb_define_method(rb_cInteger, "next", int_succ, 0);
rb_define_method 2849 numeric.c          rb_define_method(rb_cInteger, "chr", int_chr, 0);
rb_define_method 2850 numeric.c          rb_define_method(rb_cInteger, "to_i", int_to_i, 0);
rb_define_method 2851 numeric.c          rb_define_method(rb_cInteger, "to_int", int_to_i, 0);
rb_define_method 2852 numeric.c          rb_define_method(rb_cInteger, "floor", int_to_i, 0);
rb_define_method 2853 numeric.c          rb_define_method(rb_cInteger, "ceil", int_to_i, 0);
rb_define_method 2854 numeric.c          rb_define_method(rb_cInteger, "round", int_to_i, 0);
rb_define_method 2855 numeric.c          rb_define_method(rb_cInteger, "truncate", int_to_i, 0);
rb_define_method 2862 numeric.c          rb_define_method(rb_cFixnum, "to_s", fix_to_s, -1);
rb_define_method 2864 numeric.c          rb_define_method(rb_cFixnum, "id2name", fix_id2name, 0);
rb_define_method 2865 numeric.c          rb_define_method(rb_cFixnum, "to_sym", fix_to_sym, 0);
rb_define_method 2867 numeric.c          rb_define_method(rb_cFixnum, "-@", fix_uminus, 0);
rb_define_method 2868 numeric.c          rb_define_method(rb_cFixnum, "+", fix_plus, 1);
rb_define_method 2869 numeric.c          rb_define_method(rb_cFixnum, "-", fix_minus, 1);
rb_define_method 2870 numeric.c          rb_define_method(rb_cFixnum, "*", fix_mul, 1);
rb_define_method 2871 numeric.c          rb_define_method(rb_cFixnum, "/", fix_div, 1);
rb_define_method 2872 numeric.c          rb_define_method(rb_cFixnum, "div", fix_idiv, 1);
rb_define_method 2873 numeric.c          rb_define_method(rb_cFixnum, "%", fix_mod, 1);
rb_define_method 2874 numeric.c          rb_define_method(rb_cFixnum, "modulo", fix_mod, 1);
rb_define_method 2875 numeric.c          rb_define_method(rb_cFixnum, "divmod", fix_divmod, 1);
rb_define_method 2876 numeric.c          rb_define_method(rb_cFixnum, "quo", fix_quo, 1);
rb_define_method 2877 numeric.c          rb_define_method(rb_cFixnum, "**", fix_pow, 1);
rb_define_method 2879 numeric.c          rb_define_method(rb_cFixnum, "abs", fix_abs, 0);
rb_define_method 2881 numeric.c          rb_define_method(rb_cFixnum, "==", fix_equal, 1);
rb_define_method 2882 numeric.c          rb_define_method(rb_cFixnum, "<=>", fix_cmp, 1);
rb_define_method 2883 numeric.c          rb_define_method(rb_cFixnum, ">",  fix_gt, 1);
rb_define_method 2884 numeric.c          rb_define_method(rb_cFixnum, ">=", fix_ge, 1);
rb_define_method 2885 numeric.c          rb_define_method(rb_cFixnum, "<",  fix_lt, 1);
rb_define_method 2886 numeric.c          rb_define_method(rb_cFixnum, "<=", fix_le, 1);
rb_define_method 2888 numeric.c          rb_define_method(rb_cFixnum, "~", fix_rev, 0);
rb_define_method 2889 numeric.c          rb_define_method(rb_cFixnum, "&", fix_and, 1);
rb_define_method 2890 numeric.c          rb_define_method(rb_cFixnum, "|", fix_or,  1);
rb_define_method 2891 numeric.c          rb_define_method(rb_cFixnum, "^", fix_xor, 1);
rb_define_method 2892 numeric.c          rb_define_method(rb_cFixnum, "[]", fix_aref, 1);
rb_define_method 2894 numeric.c          rb_define_method(rb_cFixnum, "<<", fix_lshift, 1);
rb_define_method 2895 numeric.c          rb_define_method(rb_cFixnum, ">>", fix_rshift, 1);
rb_define_method 2897 numeric.c          rb_define_method(rb_cFixnum, "to_f", fix_to_f, 0);
rb_define_method 2898 numeric.c          rb_define_method(rb_cFixnum, "size", fix_size, 0);
rb_define_method 2899 numeric.c          rb_define_method(rb_cFixnum, "zero?", fix_zero_p, 0);
rb_define_method 2921 numeric.c          rb_define_method(rb_cFloat, "to_s", flo_to_s, 0);
rb_define_method 2922 numeric.c          rb_define_method(rb_cFloat, "coerce", flo_coerce, 1);
rb_define_method 2923 numeric.c          rb_define_method(rb_cFloat, "-@", flo_uminus, 0);
rb_define_method 2924 numeric.c          rb_define_method(rb_cFloat, "+", flo_plus, 1);
rb_define_method 2925 numeric.c          rb_define_method(rb_cFloat, "-", flo_minus, 1);
rb_define_method 2926 numeric.c          rb_define_method(rb_cFloat, "*", flo_mul, 1);
rb_define_method 2927 numeric.c          rb_define_method(rb_cFloat, "/", flo_div, 1);
rb_define_method 2928 numeric.c          rb_define_method(rb_cFloat, "%", flo_mod, 1);
rb_define_method 2929 numeric.c          rb_define_method(rb_cFloat, "modulo", flo_mod, 1);
rb_define_method 2930 numeric.c          rb_define_method(rb_cFloat, "divmod", flo_divmod, 1);
rb_define_method 2931 numeric.c          rb_define_method(rb_cFloat, "**", flo_pow, 1);
rb_define_method 2932 numeric.c          rb_define_method(rb_cFloat, "==", flo_eq, 1);
rb_define_method 2933 numeric.c          rb_define_method(rb_cFloat, "<=>", flo_cmp, 1);
rb_define_method 2934 numeric.c          rb_define_method(rb_cFloat, ">",  flo_gt, 1);
rb_define_method 2935 numeric.c          rb_define_method(rb_cFloat, ">=", flo_ge, 1);
rb_define_method 2936 numeric.c          rb_define_method(rb_cFloat, "<",  flo_lt, 1);
rb_define_method 2937 numeric.c          rb_define_method(rb_cFloat, "<=", flo_le, 1);
rb_define_method 2938 numeric.c          rb_define_method(rb_cFloat, "eql?", flo_eql, 1);
rb_define_method 2939 numeric.c          rb_define_method(rb_cFloat, "hash", flo_hash, 0);
rb_define_method 2940 numeric.c          rb_define_method(rb_cFloat, "to_f", flo_to_f, 0);
rb_define_method 2941 numeric.c          rb_define_method(rb_cFloat, "abs", flo_abs, 0);
rb_define_method 2942 numeric.c          rb_define_method(rb_cFloat, "zero?", flo_zero_p, 0);
rb_define_method 2944 numeric.c          rb_define_method(rb_cFloat, "to_i", flo_truncate, 0);
rb_define_method 2945 numeric.c          rb_define_method(rb_cFloat, "to_int", flo_truncate, 0);
rb_define_method 2946 numeric.c          rb_define_method(rb_cFloat, "floor", flo_floor, 0);
rb_define_method 2947 numeric.c          rb_define_method(rb_cFloat, "ceil", flo_ceil, 0);
rb_define_method 2948 numeric.c          rb_define_method(rb_cFloat, "round", flo_round, 0);
rb_define_method 2949 numeric.c          rb_define_method(rb_cFloat, "truncate", flo_truncate, 0);
rb_define_method 2951 numeric.c          rb_define_method(rb_cFloat, "nan?",      flo_is_nan_p, 0);
rb_define_method 2952 numeric.c          rb_define_method(rb_cFloat, "infinite?", flo_is_infinite_p, 0);
rb_define_method 2953 numeric.c          rb_define_method(rb_cFloat, "finite?",   flo_is_finite_p, 0);
rb_define_method 2390 object.c           rb_define_method(rb_mKernel, "nil?", rb_false, 0);
rb_define_method 2391 object.c           rb_define_method(rb_mKernel, "==", rb_obj_equal, 1);
rb_define_method 2392 object.c           rb_define_method(rb_mKernel, "equal?", rb_obj_equal, 1);
rb_define_method 2393 object.c           rb_define_method(rb_mKernel, "===", rb_equal, 1);
rb_define_method 2394 object.c           rb_define_method(rb_mKernel, "=~", rb_obj_pattern_match, 1);
rb_define_method 2396 object.c           rb_define_method(rb_mKernel, "eql?", rb_obj_equal, 1);
rb_define_method 2398 object.c           rb_define_method(rb_mKernel, "hash", rb_obj_id, 0);
rb_define_method 2399 object.c           rb_define_method(rb_mKernel, "__id__", rb_obj_id, 0);
rb_define_method 2400 object.c           rb_define_method(rb_mKernel, "object_id", rb_obj_id, 0);
rb_define_method 2401 object.c           rb_define_method(rb_mKernel, "class", rb_obj_class, 0);
rb_define_method 2403 object.c           rb_define_method(rb_mKernel, "clone", rb_obj_clone, 0);
rb_define_method 2404 object.c           rb_define_method(rb_mKernel, "dup", rb_obj_dup, 0);
rb_define_method 2405 object.c           rb_define_method(rb_mKernel, "initialize_copy", rb_obj_init_copy, 1);
rb_define_method 2407 object.c           rb_define_method(rb_mKernel, "taint", rb_obj_taint, 0);
rb_define_method 2408 object.c           rb_define_method(rb_mKernel, "tainted?", rb_obj_tainted, 0);
rb_define_method 2409 object.c           rb_define_method(rb_mKernel, "untaint", rb_obj_untaint, 0);
rb_define_method 2410 object.c           rb_define_method(rb_mKernel, "freeze", rb_obj_freeze, 0);
rb_define_method 2411 object.c           rb_define_method(rb_mKernel, "frozen?", rb_obj_frozen_p, 0);
rb_define_method 2413 object.c           rb_define_method(rb_mKernel, "to_s", rb_any_to_s, 0);
rb_define_method 2414 object.c           rb_define_method(rb_mKernel, "inspect", rb_obj_inspect, 0);
rb_define_method 2415 object.c           rb_define_method(rb_mKernel, "methods", rb_obj_methods, -1);
rb_define_method 2416 object.c           rb_define_method(rb_mKernel, "singleton_methods", rb_obj_singleton_methods, -1); /* in class.c */
rb_define_method 2417 object.c           rb_define_method(rb_mKernel, "protected_methods", rb_obj_protected_methods, -1);
rb_define_method 2418 object.c           rb_define_method(rb_mKernel, "private_methods", rb_obj_private_methods, -1);
rb_define_method 2419 object.c           rb_define_method(rb_mKernel, "public_methods", rb_obj_public_methods, -1);
rb_define_method 2420 object.c           rb_define_method(rb_mKernel, "instance_variables", rb_obj_instance_variables, 0); /* in variable.c */
rb_define_method 2421 object.c           rb_define_method(rb_mKernel, "instance_variable_get", rb_obj_ivar_get, 1);
rb_define_method 2422 object.c           rb_define_method(rb_mKernel, "instance_variable_set", rb_obj_ivar_set, 2);
rb_define_method 2426 object.c           rb_define_method(rb_mKernel, "instance_of?", rb_obj_is_instance_of, 1);
rb_define_method 2427 object.c           rb_define_method(rb_mKernel, "kind_of?", rb_obj_is_kind_of, 1);
rb_define_method 2428 object.c           rb_define_method(rb_mKernel, "is_a?", rb_obj_is_kind_of, 1);
rb_define_method 2444 object.c           rb_define_method(rb_cNilClass, "to_i", nil_to_i, 0);
rb_define_method 2445 object.c           rb_define_method(rb_cNilClass, "to_f", nil_to_f, 0);
rb_define_method 2446 object.c           rb_define_method(rb_cNilClass, "to_s", nil_to_s, 0);
rb_define_method 2447 object.c           rb_define_method(rb_cNilClass, "to_a", nil_to_a, 0);
rb_define_method 2448 object.c           rb_define_method(rb_cNilClass, "inspect", nil_inspect, 0);
rb_define_method 2449 object.c           rb_define_method(rb_cNilClass, "&", false_and, 1);
rb_define_method 2450 object.c           rb_define_method(rb_cNilClass, "|", false_or, 1);
rb_define_method 2451 object.c           rb_define_method(rb_cNilClass, "^", false_xor, 1);
rb_define_method 2453 object.c           rb_define_method(rb_cNilClass, "nil?", rb_true, 0);
rb_define_method 2463 object.c           rb_define_method(rb_cSymbol, "to_i", sym_to_i, 0);
rb_define_method 2464 object.c           rb_define_method(rb_cSymbol, "inspect", sym_inspect, 0);
rb_define_method 2465 object.c           rb_define_method(rb_cSymbol, "to_s", sym_to_s, 0);
rb_define_method 2466 object.c           rb_define_method(rb_cSymbol, "id2name", sym_to_s, 0);
rb_define_method 2467 object.c           rb_define_method(rb_cSymbol, "to_sym", sym_to_sym, 0);
rb_define_method 2468 object.c           rb_define_method(rb_cSymbol, "===", rb_obj_equal, 1);
rb_define_method 2470 object.c           rb_define_method(rb_cModule, "freeze", rb_mod_freeze, 0);
rb_define_method 2471 object.c           rb_define_method(rb_cModule, "===", rb_mod_eqq, 1);
rb_define_method 2472 object.c           rb_define_method(rb_cModule, "==", rb_obj_equal, 1);
rb_define_method 2473 object.c           rb_define_method(rb_cModule, "<=>",  rb_mod_cmp, 1);
rb_define_method 2474 object.c           rb_define_method(rb_cModule, "<",  rb_mod_lt, 1);
rb_define_method 2475 object.c           rb_define_method(rb_cModule, "<=", rb_class_inherited_p, 1);
rb_define_method 2476 object.c           rb_define_method(rb_cModule, ">",  rb_mod_gt, 1);
rb_define_method 2477 object.c           rb_define_method(rb_cModule, ">=", rb_mod_ge, 1);
rb_define_method 2478 object.c           rb_define_method(rb_cModule, "initialize_copy", rb_mod_init_copy, 1); /* in class.c */
rb_define_method 2479 object.c           rb_define_method(rb_cModule, "to_s", rb_mod_to_s, 0);
rb_define_method 2480 object.c           rb_define_method(rb_cModule, "included_modules", rb_mod_included_modules, 0); /* in class.c */
rb_define_method 2481 object.c           rb_define_method(rb_cModule, "include?", rb_mod_include_p, 1); /* in class.c */
rb_define_method 2482 object.c           rb_define_method(rb_cModule, "name", rb_mod_name, 0);  /* in variable.c */
rb_define_method 2483 object.c           rb_define_method(rb_cModule, "ancestors", rb_mod_ancestors, 0); /* in class.c */
rb_define_method 2491 object.c           rb_define_method(rb_cModule, "initialize", rb_mod_initialize, 0);
rb_define_method 2492 object.c           rb_define_method(rb_cModule, "instance_methods", rb_class_instance_methods, -1); /* in class.c */
rb_define_method 2493 object.c           rb_define_method(rb_cModule, "public_instance_methods",
rb_define_method 2495 object.c           rb_define_method(rb_cModule, "protected_instance_methods",
rb_define_method 2497 object.c           rb_define_method(rb_cModule, "private_instance_methods",
rb_define_method 2500 object.c           rb_define_method(rb_cModule, "constants", rb_mod_constants, 0); /* in variable.c */
rb_define_method 2501 object.c           rb_define_method(rb_cModule, "const_get", rb_mod_const_get, 1);
rb_define_method 2502 object.c           rb_define_method(rb_cModule, "const_set", rb_mod_const_set, 2);
rb_define_method 2503 object.c           rb_define_method(rb_cModule, "const_defined?", rb_mod_const_defined, 1);
rb_define_method 2506 object.c           rb_define_method(rb_cModule, "const_missing",
rb_define_method 2508 object.c           rb_define_method(rb_cModule, "class_variables",
rb_define_method 2510 object.c           rb_define_method(rb_cModule, "remove_class_variable",
rb_define_method 2512 object.c           rb_define_method(rb_cModule, "class_variable_get", rb_mod_cvar_get, 1);
rb_define_method 2513 object.c           rb_define_method(rb_cModule, "class_variable_set", rb_mod_cvar_set, 2);
rb_define_method 2515 object.c           rb_define_method(rb_cClass, "allocate", rb_obj_alloc, 0);
rb_define_method 2516 object.c           rb_define_method(rb_cClass, "new", rb_class_new_instance, -1);
rb_define_method 2517 object.c           rb_define_method(rb_cClass, "initialize", rb_class_initialize, -1);
rb_define_method 2518 object.c           rb_define_method(rb_cClass, "initialize_copy", rb_class_init_copy, 1); /* in class.c */
rb_define_method 2519 object.c           rb_define_method(rb_cClass, "superclass", rb_class_superclass, 0);
rb_define_method 2532 object.c           rb_define_method(rb_cTrueClass, "to_s", true_to_s, 0);
rb_define_method 2533 object.c           rb_define_method(rb_cTrueClass, "&", true_and, 1);
rb_define_method 2534 object.c           rb_define_method(rb_cTrueClass, "|", true_or, 1);
rb_define_method 2535 object.c           rb_define_method(rb_cTrueClass, "^", true_xor, 1);
rb_define_method 2541 object.c           rb_define_method(rb_cFalseClass, "to_s", false_to_s, 0);
rb_define_method 2542 object.c           rb_define_method(rb_cFalseClass, "&", false_and, 1);
rb_define_method 2543 object.c           rb_define_method(rb_cFalseClass, "|", false_or, 1);
rb_define_method 2544 object.c           rb_define_method(rb_cFalseClass, "^", false_xor, 1);
rb_define_method 2086 pack.c             rb_define_method(rb_cArray, "pack", pack_pack, 1);
rb_define_method 2087 pack.c             rb_define_method(rb_cString, "unpack", pack_unpack, 1);
rb_define_method 9283 parse.y            rb_define_method(Ripper, "initialize", ripper_initialize, -1);
rb_define_method 9284 parse.y            rb_define_method(Ripper, "parse", ripper_parse, 0);
rb_define_method 9285 parse.y            rb_define_method(Ripper, "column", ripper_column, 0);
rb_define_method 9286 parse.y            rb_define_method(Ripper, "lineno", ripper_lineno, 0);
rb_define_method 9287 parse.y            rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0);
rb_define_method 9289 parse.y            rb_define_method(rb_mKernel, "assert_Qundef", ripper_assert_Qundef, 2);
rb_define_method 9290 parse.y            rb_define_method(rb_mKernel, "rawVALUE", ripper_value, 1);
rb_define_method 9291 parse.y            rb_define_method(rb_mKernel, "validate_object", ripper_validate_object, 1);
rb_define_method  130 prec.c             rb_define_method(rb_mPrecision, "prec", prec_prec, 1);
rb_define_method  131 prec.c             rb_define_method(rb_mPrecision, "prec_i", prec_prec_i, 0);
rb_define_method  132 prec.c             rb_define_method(rb_mPrecision, "prec_f", prec_prec_f, 0);
rb_define_method 3604 process.c          rb_define_method(rb_cProcStatus, "==", pst_equal, 1);
rb_define_method 3605 process.c          rb_define_method(rb_cProcStatus, "&", pst_bitand, 1);
rb_define_method 3606 process.c          rb_define_method(rb_cProcStatus, ">>", pst_rshift, 1);
rb_define_method 3607 process.c          rb_define_method(rb_cProcStatus, "to_i", pst_to_i, 0);
rb_define_method 3608 process.c          rb_define_method(rb_cProcStatus, "to_int", pst_to_i, 0);
rb_define_method 3609 process.c          rb_define_method(rb_cProcStatus, "to_s", pst_to_s, 0);
rb_define_method 3610 process.c          rb_define_method(rb_cProcStatus, "inspect", pst_inspect, 0);
rb_define_method 3612 process.c          rb_define_method(rb_cProcStatus, "pid", pst_pid, 0);
rb_define_method 3614 process.c          rb_define_method(rb_cProcStatus, "stopped?", pst_wifstopped, 0);
rb_define_method 3615 process.c          rb_define_method(rb_cProcStatus, "stopsig", pst_wstopsig, 0);
rb_define_method 3616 process.c          rb_define_method(rb_cProcStatus, "signaled?", pst_wifsignaled, 0);
rb_define_method 3617 process.c          rb_define_method(rb_cProcStatus, "termsig", pst_wtermsig, 0);
rb_define_method 3618 process.c          rb_define_method(rb_cProcStatus, "exited?", pst_wifexited, 0);
rb_define_method 3619 process.c          rb_define_method(rb_cProcStatus, "exitstatus", pst_wexitstatus, 0);
rb_define_method 3620 process.c          rb_define_method(rb_cProcStatus, "success?", pst_success_p, 0);
rb_define_method 3621 process.c          rb_define_method(rb_cProcStatus, "coredump?", pst_wcoredump, 0);
rb_define_method  733 range.c            rb_define_method(rb_cRange, "initialize", range_initialize, -1);
rb_define_method  734 range.c            rb_define_method(rb_cRange, "==", range_eq, 1);
rb_define_method  735 range.c            rb_define_method(rb_cRange, "===", range_include, 1);
rb_define_method  736 range.c            rb_define_method(rb_cRange, "eql?", range_eql, 1);
rb_define_method  737 range.c            rb_define_method(rb_cRange, "hash", range_hash, 0);
rb_define_method  738 range.c            rb_define_method(rb_cRange, "each", range_each, 0);
rb_define_method  739 range.c            rb_define_method(rb_cRange, "step", range_step, -1);
rb_define_method  740 range.c            rb_define_method(rb_cRange, "first", range_first, 0);
rb_define_method  741 range.c            rb_define_method(rb_cRange, "last", range_last, 0);
rb_define_method  742 range.c            rb_define_method(rb_cRange, "begin", range_first, 0);
rb_define_method  743 range.c            rb_define_method(rb_cRange, "end", range_last, 0);
rb_define_method  744 range.c            rb_define_method(rb_cRange, "min", range_min, 0);
rb_define_method  745 range.c            rb_define_method(rb_cRange, "max", range_max, 0);
rb_define_method  746 range.c            rb_define_method(rb_cRange, "to_s", range_to_s, 0);
rb_define_method  747 range.c            rb_define_method(rb_cRange, "inspect", range_inspect, 0);
rb_define_method  749 range.c            rb_define_method(rb_cRange, "exclude_end?", range_exclude_end_p, 0);
rb_define_method  751 range.c            rb_define_method(rb_cRange, "member?", range_include, 1);
rb_define_method  752 range.c            rb_define_method(rb_cRange, "include?", range_include, 1);
rb_define_method  753 range.c            rb_define_method(rb_cRange, "cover?", range_cover, 1);
rb_define_method 2236 re.c               rb_define_method(rb_cRegexp, "initialize", rb_reg_initialize_m, -1);
rb_define_method 2237 re.c               rb_define_method(rb_cRegexp, "initialize_copy", rb_reg_init_copy, 1);
rb_define_method 2238 re.c               rb_define_method(rb_cRegexp, "hash", rb_reg_hash, 0);
rb_define_method 2239 re.c               rb_define_method(rb_cRegexp, "eql?", rb_reg_equal, 1);
rb_define_method 2240 re.c               rb_define_method(rb_cRegexp, "==", rb_reg_equal, 1);
rb_define_method 2241 re.c               rb_define_method(rb_cRegexp, "=~", rb_reg_match, 1);
rb_define_method 2242 re.c               rb_define_method(rb_cRegexp, "===", rb_reg_eqq, 1);
rb_define_method 2243 re.c               rb_define_method(rb_cRegexp, "~", rb_reg_match2, 0);
rb_define_method 2244 re.c               rb_define_method(rb_cRegexp, "match", rb_reg_match_m, -1);
rb_define_method 2245 re.c               rb_define_method(rb_cRegexp, "to_s", rb_reg_to_s, 0);
rb_define_method 2246 re.c               rb_define_method(rb_cRegexp, "inspect", rb_reg_inspect, 0);
rb_define_method 2247 re.c               rb_define_method(rb_cRegexp, "source", rb_reg_source, 0);
rb_define_method 2248 re.c               rb_define_method(rb_cRegexp, "casefold?", rb_reg_casefold_p, 0);
rb_define_method 2249 re.c               rb_define_method(rb_cRegexp, "options", rb_reg_options_m, 0);
rb_define_method 2250 re.c               rb_define_method(rb_cRegexp, "kcode", rb_reg_kcode_m, 0);
rb_define_method 2263 re.c               rb_define_method(rb_cMatch, "initialize_copy", match_init_copy, 1);
rb_define_method 2264 re.c               rb_define_method(rb_cMatch, "size", match_size, 0);
rb_define_method 2265 re.c               rb_define_method(rb_cMatch, "length", match_size, 0);
rb_define_method 2266 re.c               rb_define_method(rb_cMatch, "offset", match_offset, 1);
rb_define_method 2267 re.c               rb_define_method(rb_cMatch, "begin", match_begin, 1);
rb_define_method 2268 re.c               rb_define_method(rb_cMatch, "end", match_end, 1);
rb_define_method 2269 re.c               rb_define_method(rb_cMatch, "to_a", match_to_a, 0);
rb_define_method 2270 re.c               rb_define_method(rb_cMatch, "[]", match_aref, -1);
rb_define_method 2271 re.c               rb_define_method(rb_cMatch, "captures", match_captures, 0);
rb_define_method 2272 re.c               rb_define_method(rb_cMatch, "select", match_select, -1);
rb_define_method 2273 re.c               rb_define_method(rb_cMatch, "values_at", match_values_at, -1);
rb_define_method 2274 re.c               rb_define_method(rb_cMatch, "pre_match", rb_reg_match_pre, 0);
rb_define_method 2275 re.c               rb_define_method(rb_cMatch, "post_match", rb_reg_match_post, 0);
rb_define_method 2276 re.c               rb_define_method(rb_cMatch, "to_s", match_to_s, 0);
rb_define_method 2277 re.c               rb_define_method(rb_cMatch, "inspect", rb_any_to_s, 0); /* in object.c */
rb_define_method 2278 re.c               rb_define_method(rb_cMatch, "string", match_string, 0);
rb_define_method  517 ruby.h         void rb_define_method(VALUE,const char*,VALUE(*)(ANYARGS),int);
rb_define_method 4190 string.c           rb_define_method(rb_cString, "initialize", rb_str_init, -1);
rb_define_method 4191 string.c           rb_define_method(rb_cString, "initialize_copy", rb_str_replace, 1);
rb_define_method 4192 string.c           rb_define_method(rb_cString, "<=>", rb_str_cmp_m, 1);
rb_define_method 4193 string.c           rb_define_method(rb_cString, "==", rb_str_equal, 1);
rb_define_method 4194 string.c           rb_define_method(rb_cString, "eql?", rb_str_eql, 1);
rb_define_method 4195 string.c           rb_define_method(rb_cString, "hash", rb_str_hash_m, 0);
rb_define_method 4196 string.c           rb_define_method(rb_cString, "casecmp", rb_str_casecmp, 1);
rb_define_method 4197 string.c           rb_define_method(rb_cString, "+", rb_str_plus, 1);
rb_define_method 4198 string.c           rb_define_method(rb_cString, "*", rb_str_times, 1);
rb_define_method 4199 string.c           rb_define_method(rb_cString, "%", rb_str_format_m, 1);
rb_define_method 4200 string.c           rb_define_method(rb_cString, "[]", rb_str_aref_m, -1);
rb_define_method 4201 string.c           rb_define_method(rb_cString, "[]=", rb_str_aset_m, -1);
rb_define_method 4202 string.c           rb_define_method(rb_cString, "insert", rb_str_insert, 2);
rb_define_method 4203 string.c           rb_define_method(rb_cString, "length", rb_str_length, 0);
rb_define_method 4204 string.c           rb_define_method(rb_cString, "size", rb_str_length, 0);
rb_define_method 4205 string.c           rb_define_method(rb_cString, "empty?", rb_str_empty, 0);
rb_define_method 4206 string.c           rb_define_method(rb_cString, "=~", rb_str_match, 1);
rb_define_method 4207 string.c           rb_define_method(rb_cString, "match", rb_str_match_m, -1);
rb_define_method 4208 string.c           rb_define_method(rb_cString, "succ", rb_str_succ, 0);
rb_define_method 4209 string.c           rb_define_method(rb_cString, "succ!", rb_str_succ_bang, 0);
rb_define_method 4210 string.c           rb_define_method(rb_cString, "next", rb_str_succ, 0);
rb_define_method 4211 string.c           rb_define_method(rb_cString, "next!", rb_str_succ_bang, 0);
rb_define_method 4212 string.c           rb_define_method(rb_cString, "upto", rb_str_upto_m, 1);
rb_define_method 4213 string.c           rb_define_method(rb_cString, "index", rb_str_index_m, -1);
rb_define_method 4214 string.c           rb_define_method(rb_cString, "rindex", rb_str_rindex_m, -1);
rb_define_method 4215 string.c           rb_define_method(rb_cString, "replace", rb_str_replace, 1);
rb_define_method 4216 string.c           rb_define_method(rb_cString, "clear", rb_str_clear, 0);
rb_define_method 4218 string.c           rb_define_method(rb_cString, "to_i", rb_str_to_i, -1);
rb_define_method 4219 string.c           rb_define_method(rb_cString, "to_f", rb_str_to_f, 0);
rb_define_method 4220 string.c           rb_define_method(rb_cString, "to_s", rb_str_to_s, 0);
rb_define_method 4221 string.c           rb_define_method(rb_cString, "to_str", rb_str_to_s, 0);
rb_define_method 4222 string.c           rb_define_method(rb_cString, "inspect", rb_str_inspect, 0);
rb_define_method 4223 string.c           rb_define_method(rb_cString, "dump", rb_str_dump, 0);
rb_define_method 4225 string.c           rb_define_method(rb_cString, "upcase", rb_str_upcase, 0);
rb_define_method 4226 string.c           rb_define_method(rb_cString, "downcase", rb_str_downcase, 0);
rb_define_method 4227 string.c           rb_define_method(rb_cString, "capitalize", rb_str_capitalize, 0);
rb_define_method 4228 string.c           rb_define_method(rb_cString, "swapcase", rb_str_swapcase, 0);
rb_define_method 4230 string.c           rb_define_method(rb_cString, "upcase!", rb_str_upcase_bang, 0);
rb_define_method 4231 string.c           rb_define_method(rb_cString, "downcase!", rb_str_downcase_bang, 0);
rb_define_method 4232 string.c           rb_define_method(rb_cString, "capitalize!", rb_str_capitalize_bang, 0);
rb_define_method 4233 string.c           rb_define_method(rb_cString, "swapcase!", rb_str_swapcase_bang, 0);
rb_define_method 4235 string.c           rb_define_method(rb_cString, "hex", rb_str_hex, 0);
rb_define_method 4236 string.c           rb_define_method(rb_cString, "oct", rb_str_oct, 0);
rb_define_method 4237 string.c           rb_define_method(rb_cString, "split", rb_str_split_m, -1);
rb_define_method 4238 string.c           rb_define_method(rb_cString, "reverse", rb_str_reverse, 0);
rb_define_method 4239 string.c           rb_define_method(rb_cString, "reverse!", rb_str_reverse_bang, 0);
rb_define_method 4240 string.c           rb_define_method(rb_cString, "concat", rb_str_concat, 1);
rb_define_method 4241 string.c           rb_define_method(rb_cString, "<<", rb_str_concat, 1);
rb_define_method 4242 string.c           rb_define_method(rb_cString, "crypt", rb_str_crypt, 1);
rb_define_method 4243 string.c           rb_define_method(rb_cString, "intern", rb_str_intern, 0);
rb_define_method 4244 string.c           rb_define_method(rb_cString, "to_sym", rb_str_intern, 0);
rb_define_method 4246 string.c           rb_define_method(rb_cString, "include?", rb_str_include, 1);
rb_define_method 4248 string.c           rb_define_method(rb_cString, "scan", rb_str_scan, 1);
rb_define_method 4250 string.c           rb_define_method(rb_cString, "ljust", rb_str_ljust, -1);
rb_define_method 4251 string.c           rb_define_method(rb_cString, "rjust", rb_str_rjust, -1);
rb_define_method 4252 string.c           rb_define_method(rb_cString, "center", rb_str_center, -1);
rb_define_method 4254 string.c           rb_define_method(rb_cString, "sub", rb_str_sub, -1);
rb_define_method 4255 string.c           rb_define_method(rb_cString, "gsub", rb_str_gsub, -1);
rb_define_method 4256 string.c           rb_define_method(rb_cString, "chop", rb_str_chop, 0);
rb_define_method 4257 string.c           rb_define_method(rb_cString, "chomp", rb_str_chomp, -1);
rb_define_method 4258 string.c           rb_define_method(rb_cString, "strip", rb_str_strip, 0);
rb_define_method 4259 string.c           rb_define_method(rb_cString, "lstrip", rb_str_lstrip, 0);
rb_define_method 4260 string.c           rb_define_method(rb_cString, "rstrip", rb_str_rstrip, 0);
rb_define_method 4262 string.c           rb_define_method(rb_cString, "sub!", rb_str_sub_bang, -1);
rb_define_method 4263 string.c           rb_define_method(rb_cString, "gsub!", rb_str_gsub_bang, -1);
rb_define_method 4264 string.c           rb_define_method(rb_cString, "chop!", rb_str_chop_bang, 0);
rb_define_method 4265 string.c           rb_define_method(rb_cString, "chomp!", rb_str_chomp_bang, -1);
rb_define_method 4266 string.c           rb_define_method(rb_cString, "strip!", rb_str_strip_bang, 0);
rb_define_method 4267 string.c           rb_define_method(rb_cString, "lstrip!", rb_str_lstrip_bang, 0);
rb_define_method 4268 string.c           rb_define_method(rb_cString, "rstrip!", rb_str_rstrip_bang, 0);
rb_define_method 4270 string.c           rb_define_method(rb_cString, "tr", rb_str_tr, 2);
rb_define_method 4271 string.c           rb_define_method(rb_cString, "tr_s", rb_str_tr_s, 2);
rb_define_method 4272 string.c           rb_define_method(rb_cString, "delete", rb_str_delete, -1);
rb_define_method 4273 string.c           rb_define_method(rb_cString, "squeeze", rb_str_squeeze, -1);
rb_define_method 4274 string.c           rb_define_method(rb_cString, "count", rb_str_count, -1);
rb_define_method 4276 string.c           rb_define_method(rb_cString, "tr!", rb_str_tr_bang, 2);
rb_define_method 4277 string.c           rb_define_method(rb_cString, "tr_s!", rb_str_tr_s_bang, 2);
rb_define_method 4278 string.c           rb_define_method(rb_cString, "delete!", rb_str_delete_bang, -1);
rb_define_method 4279 string.c           rb_define_method(rb_cString, "squeeze!", rb_str_squeeze_bang, -1);
rb_define_method 4281 string.c           rb_define_method(rb_cString, "each_line", rb_str_each_line, -1);
rb_define_method 4282 string.c           rb_define_method(rb_cString, "each", rb_str_each_line, -1);
rb_define_method 4283 string.c           rb_define_method(rb_cString, "each_byte", rb_str_each_byte, 0);
rb_define_method 4285 string.c           rb_define_method(rb_cString, "sum", rb_str_sum, -1);
rb_define_method 4287 string.c           rb_define_method(rb_cString, "slice", rb_str_aref_m, -1);
rb_define_method 4288 string.c           rb_define_method(rb_cString, "slice!", rb_str_slice_bang, -1);
rb_define_method  832 struct.c           rb_define_method(rb_cStruct, "initialize", rb_struct_initialize, -2);
rb_define_method  833 struct.c           rb_define_method(rb_cStruct, "initialize_copy", rb_struct_init_copy, 1);
rb_define_method  835 struct.c           rb_define_method(rb_cStruct, "==", rb_struct_equal, 1);
rb_define_method  836 struct.c           rb_define_method(rb_cStruct, "eql?", rb_struct_eql, 1);
rb_define_method  837 struct.c           rb_define_method(rb_cStruct, "hash", rb_struct_hash, 0);
rb_define_method  839 struct.c           rb_define_method(rb_cStruct, "to_s", rb_struct_inspect, 0);
rb_define_method  840 struct.c           rb_define_method(rb_cStruct, "inspect", rb_struct_inspect, 0);
rb_define_method  841 struct.c           rb_define_method(rb_cStruct, "to_a", rb_struct_to_a, 0);
rb_define_method  842 struct.c           rb_define_method(rb_cStruct, "values", rb_struct_to_a, 0);
rb_define_method  843 struct.c           rb_define_method(rb_cStruct, "size", rb_struct_size, 0);
rb_define_method  844 struct.c           rb_define_method(rb_cStruct, "length", rb_struct_size, 0);
rb_define_method  846 struct.c           rb_define_method(rb_cStruct, "each", rb_struct_each, 0);
rb_define_method  847 struct.c           rb_define_method(rb_cStruct, "each_pair", rb_struct_each_pair, 0);
rb_define_method  848 struct.c           rb_define_method(rb_cStruct, "[]", rb_struct_aref, 1);
rb_define_method  849 struct.c           rb_define_method(rb_cStruct, "[]=", rb_struct_aset, 2);
rb_define_method  850 struct.c           rb_define_method(rb_cStruct, "select", rb_struct_select, -1);
rb_define_method  851 struct.c           rb_define_method(rb_cStruct, "values_at", rb_struct_values_at, -1);
rb_define_method  853 struct.c           rb_define_method(rb_cStruct, "members", rb_struct_members_m, 0);
rb_define_method 2079 time.c             rb_define_method(rb_cTime, "to_i", time_to_i, 0);
rb_define_method 2080 time.c             rb_define_method(rb_cTime, "to_f", time_to_f, 0);
rb_define_method 2081 time.c             rb_define_method(rb_cTime, "<=>", time_cmp, 1);
rb_define_method 2082 time.c             rb_define_method(rb_cTime, "eql?", time_eql, 1);
rb_define_method 2083 time.c             rb_define_method(rb_cTime, "hash", time_hash, 0);
rb_define_method 2084 time.c             rb_define_method(rb_cTime, "initialize", time_init, 0);
rb_define_method 2085 time.c             rb_define_method(rb_cTime, "initialize_copy", time_init_copy, 1);
rb_define_method 2087 time.c             rb_define_method(rb_cTime, "localtime", time_localtime, 0);
rb_define_method 2088 time.c             rb_define_method(rb_cTime, "gmtime", time_gmtime, 0);
rb_define_method 2089 time.c             rb_define_method(rb_cTime, "utc", time_gmtime, 0);
rb_define_method 2090 time.c             rb_define_method(rb_cTime, "getlocal", time_getlocaltime, 0);
rb_define_method 2091 time.c             rb_define_method(rb_cTime, "getgm", time_getgmtime, 0);
rb_define_method 2092 time.c             rb_define_method(rb_cTime, "getutc", time_getgmtime, 0);
rb_define_method 2094 time.c             rb_define_method(rb_cTime, "ctime", time_asctime, 0);
rb_define_method 2095 time.c             rb_define_method(rb_cTime, "asctime", time_asctime, 0);
rb_define_method 2096 time.c             rb_define_method(rb_cTime, "to_s", time_to_s, 0);
rb_define_method 2097 time.c             rb_define_method(rb_cTime, "inspect", time_to_s, 0);
rb_define_method 2098 time.c             rb_define_method(rb_cTime, "to_a", time_to_a, 0);
rb_define_method 2100 time.c             rb_define_method(rb_cTime, "+", time_plus, 1);
rb_define_method 2101 time.c             rb_define_method(rb_cTime, "-", time_minus, 1);
rb_define_method 2103 time.c             rb_define_method(rb_cTime, "succ", time_succ, 0);
rb_define_method 2104 time.c             rb_define_method(rb_cTime, "sec", time_sec, 0);
rb_define_method 2105 time.c             rb_define_method(rb_cTime, "min", time_min, 0);
rb_define_method 2106 time.c             rb_define_method(rb_cTime, "hour", time_hour, 0);
rb_define_method 2107 time.c             rb_define_method(rb_cTime, "mday", time_mday, 0);
rb_define_method 2108 time.c             rb_define_method(rb_cTime, "day", time_mday, 0);
rb_define_method 2109 time.c             rb_define_method(rb_cTime, "mon", time_mon, 0);
rb_define_method 2110 time.c             rb_define_method(rb_cTime, "month", time_mon, 0);
rb_define_method 2111 time.c             rb_define_method(rb_cTime, "year", time_year, 0);
rb_define_method 2112 time.c             rb_define_method(rb_cTime, "wday", time_wday, 0);
rb_define_method 2113 time.c             rb_define_method(rb_cTime, "yday", time_yday, 0);
rb_define_method 2114 time.c             rb_define_method(rb_cTime, "isdst", time_isdst, 0);
rb_define_method 2115 time.c             rb_define_method(rb_cTime, "dst?", time_isdst, 0);
rb_define_method 2116 time.c             rb_define_method(rb_cTime, "zone", time_zone, 0);
rb_define_method 2117 time.c             rb_define_method(rb_cTime, "gmtoff", time_utc_offset, 0);
rb_define_method 2118 time.c             rb_define_method(rb_cTime, "gmt_offset", time_utc_offset, 0);
rb_define_method 2119 time.c             rb_define_method(rb_cTime, "utc_offset", time_utc_offset, 0);
rb_define_method 2121 time.c             rb_define_method(rb_cTime, "utc?", time_utc_p, 0);
rb_define_method 2122 time.c             rb_define_method(rb_cTime, "gmt?", time_utc_p, 0);
rb_define_method 2124 time.c             rb_define_method(rb_cTime, "sunday?", time_sunday, 0);
rb_define_method 2125 time.c             rb_define_method(rb_cTime, "monday?", time_monday, 0);
rb_define_method 2126 time.c             rb_define_method(rb_cTime, "tuesday?", time_tuesday, 0);
rb_define_method 2127 time.c             rb_define_method(rb_cTime, "wednesday?", time_wednesday, 0);
rb_define_method 2128 time.c             rb_define_method(rb_cTime, "thursday?", time_thursday, 0);
rb_define_method 2129 time.c             rb_define_method(rb_cTime, "friday?", time_friday, 0);
rb_define_method 2130 time.c             rb_define_method(rb_cTime, "saturday?", time_saturday, 0);
rb_define_method 2132 time.c             rb_define_method(rb_cTime, "tv_sec", time_to_i, 0);
rb_define_method 2133 time.c             rb_define_method(rb_cTime, "tv_usec", time_usec, 0);
rb_define_method 2134 time.c             rb_define_method(rb_cTime, "usec", time_usec, 0);
rb_define_method 2136 time.c             rb_define_method(rb_cTime, "strftime", time_strftime, 1);
rb_define_method 2139 time.c             rb_define_method(rb_cTime, "_dump", time_dump, -1);
rb_define_method 2143 time.c             rb_define_method(rb_cTime, "marshal_dump", time_mdump, 0);
rb_define_method 2144 time.c             rb_define_method(rb_cTime, "marshal_load", time_mload, 1);


rb_define_method_id

rb_define_method_id  132 intern.h       void rb_define_method_id(VALUE, ID, VALUE (*)(ANYARGS), int);
rb_define_method_id  205 struct.c       		rb_define_method_id(nstr, id, ref_func[i], 0);
rb_define_method_id  208 struct.c       		rb_define_method_id(nstr, id, rb_struct_ref, 0);
rb_define_method_id  210 struct.c       	    rb_define_method_id(nstr, rb_id_attrset(id), rb_struct_set, 1);


rb_define_module

rb_define_module  218 compar.c           rb_mComparable = rb_define_module("Comparable");
rb_define_module 1079 enum.c             rb_mEnumerable = rb_define_module("Enumerable");
rb_define_module  993 error.c            rb_mErrno = rb_define_module("Errno");
rb_define_module 1445 ext/curses/curses.c     mCurses    = rb_define_module("Curses");
rb_define_module  253 ext/digest/digest.c     mDigest = rb_define_module("Digest");
rb_define_module   89 ext/dl/dl.c        rb_mDL = rb_define_module("DL");
rb_define_module  506 ext/etc/etc.c      mEtc = rb_define_module("Etc");
rb_define_module  115 ext/fcntl/fcntl.c     VALUE mFcntl = rb_define_module("Fcntl");
rb_define_module  269 ext/nkf/nkf.c    VALUE mKconv = rb_define_module("NKF");
rb_define_module  412 ext/openssl/ossl.c     mOSSL = rb_define_module("OpenSSL");
rb_define_module  475 ext/pty/pty.c      cPTY = rb_define_module("PTY");
rb_define_module  796 ext/racc/cparse/cparse.c         Racc = rb_define_module("Racc");
rb_define_module  757 ext/readline/readline.c     mReadline = rb_define_module("Readline");
rb_define_module 2145 ext/syck/rubyext.c     VALUE rb_yaml = rb_define_module( "YAML" );
rb_define_module  235 ext/syslog/syslog.c     mSyslog = rb_define_module("Syslog");
rb_define_module 7698 ext/tk/tcltklib.c     VALUE lib = rb_define_module("TclTkLib");
rb_define_module 1516 ext/tk/tkutil/tkutil.c     VALUE mTK = rb_define_module("TkUtil");
rb_define_module 3419 ext/zlib/zlib.c     mZlib = rb_define_module("Zlib");
rb_define_module 4267 file.c             rb_mFileTest = rb_define_module("FileTest");
rb_define_module 1914 gc.c               rb_mGC = rb_define_module("GC");
rb_define_module 1920 gc.c               rb_mObSpace = rb_define_module("ObjectSpace");
rb_define_module 1396 marshal.c          VALUE rb_mMarshal = rb_define_module("Marshal");
rb_define_module  459 math.c             rb_mMath = rb_define_module("Math");
rb_define_module 2378 object.c           rb_mKernel = rb_define_module("Kernel");
rb_define_module  128 prec.c             rb_mPrecision = rb_define_module("Precision");
rb_define_module 3571 process.c          rb_mProcess = rb_define_module("Process");
rb_define_module  502 ruby.h         VALUE rb_define_module(const char*);
rb_define_module  923 signal.c           VALUE mSignal = rb_define_module("Signal");


rb_define_module_function

rb_define_module_function  817 class.c            rb_define_module_function(rb_mKernel, name, func, argc);
rb_define_module_function 1460 ext/curses/curses.c     rb_define_module_function(mCurses, "init_screen", curses_init_screen, 0);
rb_define_module_function 1461 ext/curses/curses.c     rb_define_module_function(mCurses, "close_screen", curses_close_screen, 0);
rb_define_module_function 1462 ext/curses/curses.c     rb_define_module_function(mCurses, "closed?", curses_closed, 0);
rb_define_module_function 1463 ext/curses/curses.c     rb_define_module_function(mCurses, "stdscr", curses_stdscr, 0);
rb_define_module_function 1464 ext/curses/curses.c     rb_define_module_function(mCurses, "refresh", curses_refresh, 0);
rb_define_module_function 1465 ext/curses/curses.c     rb_define_module_function(mCurses, "doupdate", curses_doupdate, 0);
rb_define_module_function 1466 ext/curses/curses.c     rb_define_module_function(mCurses, "clear", curses_clear, 0);
rb_define_module_function 1467 ext/curses/curses.c     rb_define_module_function(mCurses, "clrtoeol", curses_clrtoeol, 0);
rb_define_module_function 1468 ext/curses/curses.c     rb_define_module_function(mCurses, "echo", curses_echo, 0);
rb_define_module_function 1469 ext/curses/curses.c     rb_define_module_function(mCurses, "noecho", curses_noecho, 0);
rb_define_module_function 1470 ext/curses/curses.c     rb_define_module_function(mCurses, "raw", curses_raw, 0);
rb_define_module_function 1471 ext/curses/curses.c     rb_define_module_function(mCurses, "noraw", curses_noraw, 0);
rb_define_module_function 1472 ext/curses/curses.c     rb_define_module_function(mCurses, "cbreak", curses_cbreak, 0);
rb_define_module_function 1473 ext/curses/curses.c     rb_define_module_function(mCurses, "nocbreak", curses_nocbreak, 0);
rb_define_module_function 1476 ext/curses/curses.c     rb_define_module_function(mCurses, "nl", curses_nl, 0);
rb_define_module_function 1477 ext/curses/curses.c     rb_define_module_function(mCurses, "nonl", curses_nonl, 0);
rb_define_module_function 1478 ext/curses/curses.c     rb_define_module_function(mCurses, "beep", curses_beep, 0);
rb_define_module_function 1479 ext/curses/curses.c     rb_define_module_function(mCurses, "flash", curses_flash, 0);
rb_define_module_function 1480 ext/curses/curses.c     rb_define_module_function(mCurses, "ungetch", curses_ungetch, 1);
rb_define_module_function 1481 ext/curses/curses.c     rb_define_module_function(mCurses, "setpos", curses_setpos, 2);
rb_define_module_function 1482 ext/curses/curses.c     rb_define_module_function(mCurses, "standout", curses_standout, 0);
rb_define_module_function 1483 ext/curses/curses.c     rb_define_module_function(mCurses, "standend", curses_standend, 0);
rb_define_module_function 1484 ext/curses/curses.c     rb_define_module_function(mCurses, "inch", curses_inch, 0);
rb_define_module_function 1485 ext/curses/curses.c     rb_define_module_function(mCurses, "addch", curses_addch, 1);
rb_define_module_function 1486 ext/curses/curses.c     rb_define_module_function(mCurses, "insch", curses_insch, 1);
rb_define_module_function 1487 ext/curses/curses.c     rb_define_module_function(mCurses, "addstr", curses_addstr, 1);
rb_define_module_function 1488 ext/curses/curses.c     rb_define_module_function(mCurses, "getch", curses_getch, 0);
rb_define_module_function 1489 ext/curses/curses.c     rb_define_module_function(mCurses, "getstr", curses_getstr, 0);
rb_define_module_function 1490 ext/curses/curses.c     rb_define_module_function(mCurses, "delch", curses_delch, 0);
rb_define_module_function 1491 ext/curses/curses.c     rb_define_module_function(mCurses, "deleteln", curses_deleteln, 0);
rb_define_module_function 1492 ext/curses/curses.c     rb_define_module_function(mCurses, "insertln", curses_insertln, 0);
rb_define_module_function 1493 ext/curses/curses.c     rb_define_module_function(mCurses, "keyname", curses_keyname, 1);
rb_define_module_function 1494 ext/curses/curses.c     rb_define_module_function(mCurses, "lines", curses_lines, 0);
rb_define_module_function 1495 ext/curses/curses.c     rb_define_module_function(mCurses, "cols", curses_cols, 0);
rb_define_module_function 1496 ext/curses/curses.c     rb_define_module_function(mCurses, "curs_set", curses_curs_set, 1);
rb_define_module_function 1497 ext/curses/curses.c     rb_define_module_function(mCurses, "scrl", curses_scrl, 1);
rb_define_module_function 1498 ext/curses/curses.c     rb_define_module_function(mCurses, "setscrreg", curses_setscrreg, 2);
rb_define_module_function 1499 ext/curses/curses.c     rb_define_module_function(mCurses, "attroff", curses_attroff, 1);
rb_define_module_function 1500 ext/curses/curses.c     rb_define_module_function(mCurses, "attron", curses_attron, 1);
rb_define_module_function 1501 ext/curses/curses.c     rb_define_module_function(mCurses, "attrset", curses_attrset, 1);
rb_define_module_function 1502 ext/curses/curses.c     rb_define_module_function(mCurses, "bkgdset", curses_bkgdset, 1);
rb_define_module_function 1503 ext/curses/curses.c     rb_define_module_function(mCurses, "bkgd", curses_bkgd, 1);
rb_define_module_function 1504 ext/curses/curses.c     rb_define_module_function(mCurses, "resizeterm", curses_resizeterm, 2);
rb_define_module_function 1505 ext/curses/curses.c     rb_define_module_function(mCurses, "resize", curses_resizeterm, 2);
rb_define_module_function 1507 ext/curses/curses.c     rb_define_module_function(mCurses, "start_color", curses_start_color, 0);
rb_define_module_function 1508 ext/curses/curses.c     rb_define_module_function(mCurses, "init_pair", curses_init_pair, 3);
rb_define_module_function 1509 ext/curses/curses.c     rb_define_module_function(mCurses, "init_color", curses_init_color, 4);
rb_define_module_function 1510 ext/curses/curses.c     rb_define_module_function(mCurses, "has_colors?", curses_has_colors, 0);
rb_define_module_function 1511 ext/curses/curses.c     rb_define_module_function(mCurses, "can_change_color?",
rb_define_module_function 1513 ext/curses/curses.c     rb_define_module_function(mCurses, "color_content", curses_color_content, 1);
rb_define_module_function 1514 ext/curses/curses.c     rb_define_module_function(mCurses, "pair_content", curses_pair_content, 1);
rb_define_module_function 1515 ext/curses/curses.c     rb_define_module_function(mCurses, "color_pair", curses_color_pair, 1);
rb_define_module_function 1516 ext/curses/curses.c     rb_define_module_function(mCurses, "pair_number", curses_pair_number, 1);
rb_define_module_function 1519 ext/curses/curses.c     rb_define_module_function(mCurses, "getmouse", curses_getmouse, 0);
rb_define_module_function 1520 ext/curses/curses.c     rb_define_module_function(mCurses, "ungetmouse", curses_ungetmouse, 1);
rb_define_module_function 1521 ext/curses/curses.c     rb_define_module_function(mCurses, "mouseinterval", curses_mouseinterval, 1);
rb_define_module_function 1522 ext/curses/curses.c     rb_define_module_function(mCurses, "mousemask", curses_mousemask, 1);
rb_define_module_function 1525 ext/curses/curses.c     rb_define_module_function(mCurses, "timeout=", curses_timeout, 1);
rb_define_module_function 1526 ext/curses/curses.c     rb_define_module_function(mCurses, "def_prog_mode", curses_def_prog_mode, 0);
rb_define_module_function 1527 ext/curses/curses.c     rb_define_module_function(mCurses, "reset_prog_mode", curses_reset_prog_mode, 0);
rb_define_module_function  497 ext/dl/cfunc.c     rb_define_module_function(rb_cDLCFunc, "last_error", rb_dl_get_last_error, 0);
rb_define_module_function  499 ext/dl/cfunc.c     rb_define_module_function(rb_cDLCFunc, "win32_last_error", rb_dl_get_win32_last_error, 0);
rb_define_module_function  136 ext/dl/dl.c        rb_define_module_function(rb_mDL, "dlwrap", rb_dl_value2ptr, 1);
rb_define_module_function  137 ext/dl/dl.c        rb_define_module_function(rb_mDL, "dlunwrap", rb_dl_ptr2value, 1);
rb_define_module_function  139 ext/dl/dl.c        rb_define_module_function(rb_mDL, "dlopen", rb_dl_dlopen, -1);
rb_define_module_function  140 ext/dl/dl.c        rb_define_module_function(rb_mDL, "malloc", rb_dl_malloc, 1);
rb_define_module_function  141 ext/dl/dl.c        rb_define_module_function(rb_mDL, "realloc", rb_dl_realloc, 2);
rb_define_module_function  142 ext/dl/dl.c        rb_define_module_function(rb_mDL, "free", rb_dl_free, 1);
rb_define_module_function  508 ext/etc/etc.c      rb_define_module_function(mEtc, "getlogin", etc_getlogin, 0);
rb_define_module_function  510 ext/etc/etc.c      rb_define_module_function(mEtc, "getpwuid", etc_getpwuid, -1);
rb_define_module_function  511 ext/etc/etc.c      rb_define_module_function(mEtc, "getpwnam", etc_getpwnam, 1);
rb_define_module_function  512 ext/etc/etc.c      rb_define_module_function(mEtc, "setpwent", etc_setpwent, 0);
rb_define_module_function  513 ext/etc/etc.c      rb_define_module_function(mEtc, "endpwent", etc_endpwent, 0);
rb_define_module_function  514 ext/etc/etc.c      rb_define_module_function(mEtc, "getpwent", etc_getpwent, 0);
rb_define_module_function  515 ext/etc/etc.c      rb_define_module_function(mEtc, "passwd", etc_passwd, 0);
rb_define_module_function  517 ext/etc/etc.c      rb_define_module_function(mEtc, "getgrgid", etc_getgrgid, 1);
rb_define_module_function  518 ext/etc/etc.c      rb_define_module_function(mEtc, "getgrnam", etc_getgrnam, 1);
rb_define_module_function  519 ext/etc/etc.c      rb_define_module_function(mEtc, "group", etc_group, 0);
rb_define_module_function  520 ext/etc/etc.c      rb_define_module_function(mEtc, "setgrent", etc_setgrent, 0);
rb_define_module_function  521 ext/etc/etc.c      rb_define_module_function(mEtc, "endgrent", etc_endgrent, 0);
rb_define_module_function  522 ext/etc/etc.c      rb_define_module_function(mEtc, "getgrent", etc_getgrent, 0);
rb_define_module_function  271 ext/nkf/nkf.c    rb_define_module_function(mKconv, "nkf", rb_nkf_kconv, 2);
rb_define_module_function  272 ext/nkf/nkf.c    rb_define_module_function(mKconv, "guess", rb_nkf_guess2, 1);
rb_define_module_function  273 ext/nkf/nkf.c    rb_define_module_function(mKconv, "guess1", rb_nkf_guess1, 1);
rb_define_module_function  274 ext/nkf/nkf.c    rb_define_module_function(mKconv, "guess2", rb_nkf_guess2, 1);
rb_define_module_function  437 ext/openssl/ossl.c     rb_define_module_function(mOSSL, "debug", ossl_debug_get, 0);
rb_define_module_function  438 ext/openssl/ossl.c     rb_define_module_function(mOSSL, "debug=", ossl_debug_set, 1);
rb_define_module_function  439 ext/openssl/ossl.c     rb_define_module_function(mOSSL, "errors", ossl_get_errors, 0);
rb_define_module_function 1099 ext/openssl/ossl_asn1.c     rb_define_module_function(mASN1, "traverse", ossl_asn1_traverse, 1);
rb_define_module_function 1100 ext/openssl/ossl_asn1.c     rb_define_module_function(mASN1, "decode", ossl_asn1_decode, 1);
rb_define_module_function 1101 ext/openssl/ossl_asn1.c     rb_define_module_function(mASN1, "decode_all", ossl_asn1_decode_all, 1);
rb_define_module_function 1132 ext/openssl/ossl_asn1.c     rb_define_module_function(mASN1, #name, ossl_asn1_##name, -1);\
rb_define_module_function  146 ext/openssl/ossl_pkcs12.c     rb_define_module_function(mPKCS12, "create", ossl_pkcs12_s_create, -1);
rb_define_module_function  476 ext/pty/pty.c      rb_define_module_function(cPTY,"getpty",pty_getpty,-1);
rb_define_module_function  477 ext/pty/pty.c      rb_define_module_function(cPTY,"spawn",pty_getpty,-1);
rb_define_module_function  478 ext/pty/pty.c      rb_define_module_function(cPTY,"protect_signal",pty_protect,0);
rb_define_module_function  479 ext/pty/pty.c      rb_define_module_function(cPTY,"reset_signal",pty_reset_signal,0);
rb_define_module_function  758 ext/readline/readline.c     rb_define_module_function(mReadline, "readline",
rb_define_module_function 2148 ext/syck/rubyext.c     rb_define_module_function( rb_syck, "compile", rb_syck_compile, 1 );
rb_define_module_function  241 ext/syslog/syslog.c     rb_define_module_function(mSyslog, "open", mSyslog_open, -1);
rb_define_module_function  242 ext/syslog/syslog.c     rb_define_module_function(mSyslog, "reopen", mSyslog_reopen, -1);
rb_define_module_function  243 ext/syslog/syslog.c     rb_define_module_function(mSyslog, "open!", mSyslog_reopen, -1);
rb_define_module_function  244 ext/syslog/syslog.c     rb_define_module_function(mSyslog, "opened?", mSyslog_isopen, 0);
rb_define_module_function  246 ext/syslog/syslog.c     rb_define_module_function(mSyslog, "ident", mSyslog_ident, 0);
rb_define_module_function  247 ext/syslog/syslog.c     rb_define_module_function(mSyslog, "options", mSyslog_options, 0);
rb_define_module_function  248 ext/syslog/syslog.c     rb_define_module_function(mSyslog, "facility", mSyslog_facility, 0);
rb_define_module_function  250 ext/syslog/syslog.c     rb_define_module_function(mSyslog, "log", mSyslog_log, -1);
rb_define_module_function  251 ext/syslog/syslog.c     rb_define_module_function(mSyslog, "close", mSyslog_close, 0);
rb_define_module_function  252 ext/syslog/syslog.c     rb_define_module_function(mSyslog, "mask", mSyslog_get_mask, 0);
rb_define_module_function  253 ext/syslog/syslog.c     rb_define_module_function(mSyslog, "mask=", mSyslog_set_mask, 1);
rb_define_module_function  255 ext/syslog/syslog.c     rb_define_module_function(mSyslog, "LOG_MASK", mSyslogConstants_LOG_MASK, 1);
rb_define_module_function  256 ext/syslog/syslog.c     rb_define_module_function(mSyslog, "LOG_UPTO", mSyslogConstants_LOG_UPTO, 1);
rb_define_module_function  258 ext/syslog/syslog.c     rb_define_module_function(mSyslog, "inspect", mSyslog_inspect, 0);
rb_define_module_function  259 ext/syslog/syslog.c     rb_define_module_function(mSyslog, "instance", mSyslog_instance, 0);
rb_define_module_function  261 ext/syslog/syslog.c     rb_define_module_function(mSyslogConstants, "LOG_MASK", mSyslogConstants_LOG_MASK, 1);
rb_define_module_function  262 ext/syslog/syslog.c     rb_define_module_function(mSyslogConstants, "LOG_UPTO", mSyslogConstants_LOG_UPTO, 1);
rb_define_module_function  359 ext/syslog/syslog.c     rb_define_module_function(mSyslog, #name, mSyslog_##name, -1)
rb_define_module_function 7800 ext/tk/tcltklib.c     rb_define_module_function(lib, "mainloop", lib_mainloop, -1);
rb_define_module_function 7801 ext/tk/tcltklib.c     rb_define_module_function(lib, "mainloop_thread?",
rb_define_module_function 7803 ext/tk/tcltklib.c     rb_define_module_function(lib, "mainloop_watchdog",
rb_define_module_function 7805 ext/tk/tcltklib.c     rb_define_module_function(lib, "do_thread_callback",
rb_define_module_function 7807 ext/tk/tcltklib.c     rb_define_module_function(lib, "do_one_event", lib_do_one_event, -1);
rb_define_module_function 7808 ext/tk/tcltklib.c     rb_define_module_function(lib, "mainloop_abort_on_exception",
rb_define_module_function 7810 ext/tk/tcltklib.c     rb_define_module_function(lib, "mainloop_abort_on_exception=",
rb_define_module_function 7812 ext/tk/tcltklib.c     rb_define_module_function(lib, "set_eventloop_tick",set_eventloop_tick,1);
rb_define_module_function 7813 ext/tk/tcltklib.c     rb_define_module_function(lib, "get_eventloop_tick",get_eventloop_tick,0);
rb_define_module_function 7814 ext/tk/tcltklib.c     rb_define_module_function(lib, "set_no_event_wait", set_no_event_wait, 1);
rb_define_module_function 7815 ext/tk/tcltklib.c     rb_define_module_function(lib, "get_no_event_wait", get_no_event_wait, 0);
rb_define_module_function 7816 ext/tk/tcltklib.c     rb_define_module_function(lib, "set_eventloop_weight",
rb_define_module_function 7818 ext/tk/tcltklib.c     rb_define_module_function(lib, "set_max_block_time", set_max_block_time,1);
rb_define_module_function 7819 ext/tk/tcltklib.c     rb_define_module_function(lib, "get_eventloop_weight",
rb_define_module_function 7821 ext/tk/tcltklib.c     rb_define_module_function(lib, "num_of_mainwindows",
rb_define_module_function 7826 ext/tk/tcltklib.c     rb_define_module_function(lib, "_split_tklist", lib_split_tklist, 1);
rb_define_module_function 7827 ext/tk/tcltklib.c     rb_define_module_function(lib, "_merge_tklist", lib_merge_tklist, -1);
rb_define_module_function 7828 ext/tk/tcltklib.c     rb_define_module_function(lib, "_conv_listelement",
rb_define_module_function 7830 ext/tk/tcltklib.c     rb_define_module_function(lib, "_toUTF8", lib_toUTF8, -1);
rb_define_module_function 7831 ext/tk/tcltklib.c     rb_define_module_function(lib, "_fromUTF8", lib_fromUTF8, -1);
rb_define_module_function 7832 ext/tk/tcltklib.c     rb_define_module_function(lib, "_subst_UTF_backslash",
rb_define_module_function 7834 ext/tk/tcltklib.c     rb_define_module_function(lib, "_subst_Tcl_backslash",
rb_define_module_function 7837 ext/tk/tcltklib.c     rb_define_module_function(lib, "encoding_system",
rb_define_module_function 7839 ext/tk/tcltklib.c     rb_define_module_function(lib, "encoding_system=",
rb_define_module_function 7841 ext/tk/tcltklib.c     rb_define_module_function(lib, "encoding",
rb_define_module_function 7843 ext/tk/tcltklib.c     rb_define_module_function(lib, "encoding=",
rb_define_module_function 3430 ext/zlib/zlib.c     rb_define_module_function(mZlib, "zlib_version", rb_zlib_version, 0);
rb_define_module_function 3431 ext/zlib/zlib.c     rb_define_module_function(mZlib, "adler32", rb_zlib_adler32, -1);
rb_define_module_function 3432 ext/zlib/zlib.c     rb_define_module_function(mZlib, "crc32", rb_zlib_crc32, -1);
rb_define_module_function 3433 ext/zlib/zlib.c     rb_define_module_function(mZlib, "crc_table", rb_zlib_crc_table, 0);
rb_define_module_function 4227 file.c             rb_define_module_function(rb_mFileTest, name, func, argc);
rb_define_module_function 1921 gc.c               rb_define_module_function(rb_mObSpace, "each_object", os_each_obj, -1);
rb_define_module_function 1922 gc.c               rb_define_module_function(rb_mObSpace, "garbage_collect", rb_gc_start, 0);
rb_define_module_function 1923 gc.c               rb_define_module_function(rb_mObSpace, "add_finalizer", add_final, 1);
rb_define_module_function 1924 gc.c               rb_define_module_function(rb_mObSpace, "remove_finalizer", rm_final, 1);
rb_define_module_function 1925 gc.c               rb_define_module_function(rb_mObSpace, "finalizers", finals, 0);
rb_define_module_function 1926 gc.c               rb_define_module_function(rb_mObSpace, "call_finalizer", call_final, 1);
rb_define_module_function 1928 gc.c               rb_define_module_function(rb_mObSpace, "define_finalizer", define_final, -1);
rb_define_module_function 1929 gc.c               rb_define_module_function(rb_mObSpace, "undefine_finalizer", undefine_final, 1);
rb_define_module_function 1931 gc.c               rb_define_module_function(rb_mObSpace, "_id2ref", id2ref, 1);
rb_define_module_function 1410 marshal.c          rb_define_module_function(rb_mMarshal, "dump", marshal_dump, -1);
rb_define_module_function 1411 marshal.c          rb_define_module_function(rb_mMarshal, "load", marshal_load, -1);
rb_define_module_function 1412 marshal.c          rb_define_module_function(rb_mMarshal, "restore", marshal_load, -1);
rb_define_module_function  473 math.c             rb_define_module_function(rb_mMath, "atan2", math_atan2, 2);
rb_define_module_function  474 math.c             rb_define_module_function(rb_mMath, "cos", math_cos, 1);
rb_define_module_function  475 math.c             rb_define_module_function(rb_mMath, "sin", math_sin, 1);
rb_define_module_function  476 math.c             rb_define_module_function(rb_mMath, "tan", math_tan, 1);
rb_define_module_function  478 math.c             rb_define_module_function(rb_mMath, "acos", math_acos, 1);
rb_define_module_function  479 math.c             rb_define_module_function(rb_mMath, "asin", math_asin, 1);
rb_define_module_function  480 math.c             rb_define_module_function(rb_mMath, "atan", math_atan, 1);
rb_define_module_function  482 math.c             rb_define_module_function(rb_mMath, "cosh", math_cosh, 1);
rb_define_module_function  483 math.c             rb_define_module_function(rb_mMath, "sinh", math_sinh, 1);
rb_define_module_function  484 math.c             rb_define_module_function(rb_mMath, "tanh", math_tanh, 1);
rb_define_module_function  486 math.c             rb_define_module_function(rb_mMath, "acosh", math_acosh, 1);
rb_define_module_function  487 math.c             rb_define_module_function(rb_mMath, "asinh", math_asinh, 1);
rb_define_module_function  488 math.c             rb_define_module_function(rb_mMath, "atanh", math_atanh, 1);
rb_define_module_function  490 math.c             rb_define_module_function(rb_mMath, "exp", math_exp, 1);
rb_define_module_function  491 math.c             rb_define_module_function(rb_mMath, "log", math_log, 1);
rb_define_module_function  492 math.c             rb_define_module_function(rb_mMath, "log10", math_log10, 1);
rb_define_module_function  493 math.c             rb_define_module_function(rb_mMath, "sqrt", math_sqrt, 1);
rb_define_module_function  495 math.c             rb_define_module_function(rb_mMath, "frexp", math_frexp, 1);
rb_define_module_function  496 math.c             rb_define_module_function(rb_mMath, "ldexp", math_ldexp, 2);
rb_define_module_function  498 math.c             rb_define_module_function(rb_mMath, "hypot", math_hypot, 2);
rb_define_module_function  500 math.c             rb_define_module_function(rb_mMath, "erf",  math_erf,  1);
rb_define_module_function  501 math.c             rb_define_module_function(rb_mMath, "erfc", math_erfc, 1);
rb_define_module_function 3593 process.c          rb_define_module_function(rb_mProcess, "kill", rb_f_kill, -1); /* in signal.c */
rb_define_module_function 3594 process.c          rb_define_module_function(rb_mProcess, "wait", proc_wait, -1);
rb_define_module_function 3595 process.c          rb_define_module_function(rb_mProcess, "wait2", proc_wait2, -1);
rb_define_module_function 3596 process.c          rb_define_module_function(rb_mProcess, "waitpid", proc_wait, -1);
rb_define_module_function 3597 process.c          rb_define_module_function(rb_mProcess, "waitpid2", proc_wait2, -1);
rb_define_module_function 3598 process.c          rb_define_module_function(rb_mProcess, "waitall", proc_waitall, 0);
rb_define_module_function 3599 process.c          rb_define_module_function(rb_mProcess, "detach", proc_detach, 1);
rb_define_module_function 3623 process.c          rb_define_module_function(rb_mProcess, "pid", get_pid, 0);
rb_define_module_function 3624 process.c          rb_define_module_function(rb_mProcess, "ppid", get_ppid, 0);
rb_define_module_function 3626 process.c          rb_define_module_function(rb_mProcess, "getpgrp", proc_getpgrp, 0);
rb_define_module_function 3627 process.c          rb_define_module_function(rb_mProcess, "setpgrp", proc_setpgrp, 0);
rb_define_module_function 3628 process.c          rb_define_module_function(rb_mProcess, "getpgid", proc_getpgid, 1);
rb_define_module_function 3629 process.c          rb_define_module_function(rb_mProcess, "setpgid", proc_setpgid, 2);
rb_define_module_function 3631 process.c          rb_define_module_function(rb_mProcess, "setsid", proc_setsid, 0);
rb_define_module_function 3633 process.c          rb_define_module_function(rb_mProcess, "getpriority", proc_getpriority, 2);
rb_define_module_function 3634 process.c          rb_define_module_function(rb_mProcess, "setpriority", proc_setpriority, 3);
rb_define_module_function 3643 process.c          rb_define_module_function(rb_mProcess, "getrlimit", proc_getrlimit, 1);
rb_define_module_function 3646 process.c          rb_define_module_function(rb_mProcess, "setrlimit", proc_setrlimit, -1);
rb_define_module_function 3693 process.c          rb_define_module_function(rb_mProcess, "uid", proc_getuid, 0);
rb_define_module_function 3694 process.c          rb_define_module_function(rb_mProcess, "uid=", proc_setuid, 1);
rb_define_module_function 3695 process.c          rb_define_module_function(rb_mProcess, "gid", proc_getgid, 0);
rb_define_module_function 3696 process.c          rb_define_module_function(rb_mProcess, "gid=", proc_setgid, 1);
rb_define_module_function 3697 process.c          rb_define_module_function(rb_mProcess, "euid", proc_geteuid, 0);
rb_define_module_function 3698 process.c          rb_define_module_function(rb_mProcess, "euid=", proc_seteuid, 1);
rb_define_module_function 3699 process.c          rb_define_module_function(rb_mProcess, "egid", proc_getegid, 0);
rb_define_module_function 3700 process.c          rb_define_module_function(rb_mProcess, "egid=", proc_setegid, 1);
rb_define_module_function 3701 process.c          rb_define_module_function(rb_mProcess, "initgroups", proc_initgroups, 2);
rb_define_module_function 3702 process.c          rb_define_module_function(rb_mProcess, "groups", proc_getgroups, 0);
rb_define_module_function 3703 process.c          rb_define_module_function(rb_mProcess, "groups=", proc_setgroups, 1);
rb_define_module_function 3704 process.c          rb_define_module_function(rb_mProcess, "maxgroups", proc_getmaxgroups, 0);
rb_define_module_function 3705 process.c          rb_define_module_function(rb_mProcess, "maxgroups=", proc_setmaxgroups, 1);
rb_define_module_function 3707 process.c          rb_define_module_function(rb_mProcess, "daemon", proc_daemon, -1);
rb_define_module_function 3709 process.c          rb_define_module_function(rb_mProcess, "times", rb_proc_times, 0);
rb_define_module_function 3721 process.c          rb_define_module_function(rb_mProcUID, "rid", proc_getuid, 0);
rb_define_module_function 3722 process.c          rb_define_module_function(rb_mProcGID, "rid", proc_getgid, 0);
rb_define_module_function 3723 process.c          rb_define_module_function(rb_mProcUID, "eid", proc_geteuid, 0);
rb_define_module_function 3724 process.c          rb_define_module_function(rb_mProcGID, "eid", proc_getegid, 0);
rb_define_module_function 3725 process.c          rb_define_module_function(rb_mProcUID, "change_privilege", p_uid_change_privilege, 1);
rb_define_module_function 3726 process.c          rb_define_module_function(rb_mProcGID, "change_privilege", p_gid_change_privilege, 1);
rb_define_module_function 3727 process.c          rb_define_module_function(rb_mProcUID, "grant_privilege", p_uid_grant_privilege, 1);
rb_define_module_function 3728 process.c          rb_define_module_function(rb_mProcGID, "grant_privilege", p_gid_grant_privilege, 1);
rb_define_module_function 3731 process.c          rb_define_module_function(rb_mProcUID, "re_exchange", p_uid_exchange, 0);
rb_define_module_function 3732 process.c          rb_define_module_function(rb_mProcGID, "re_exchange", p_gid_exchange, 0);
rb_define_module_function 3733 process.c          rb_define_module_function(rb_mProcUID, "re_exchangeable?", p_uid_exchangeable, 0);
rb_define_module_function 3734 process.c          rb_define_module_function(rb_mProcGID, "re_exchangeable?", p_gid_exchangeable, 0);
rb_define_module_function 3735 process.c          rb_define_module_function(rb_mProcUID, "sid_available?", p_uid_have_saved_id, 0);
rb_define_module_function 3736 process.c          rb_define_module_function(rb_mProcGID, "sid_available?", p_gid_have_saved_id, 0);
rb_define_module_function 3737 process.c          rb_define_module_function(rb_mProcUID, "switch", p_uid_switch, 0);
rb_define_module_function 3738 process.c          rb_define_module_function(rb_mProcGID, "switch", p_gid_switch, 0);
rb_define_module_function 3742 process.c          rb_define_module_function(rb_mProcID_Syscall, "getuid", proc_getuid, 0);
rb_define_module_function 3743 process.c          rb_define_module_function(rb_mProcID_Syscall, "geteuid", proc_geteuid, 0);
rb_define_module_function 3744 process.c          rb_define_module_function(rb_mProcID_Syscall, "getgid", proc_getgid, 0);
rb_define_module_function 3745 process.c          rb_define_module_function(rb_mProcID_Syscall, "getegid", proc_getegid, 0);
rb_define_module_function 3747 process.c          rb_define_module_function(rb_mProcID_Syscall, "setuid", p_sys_setuid, 1);
rb_define_module_function 3748 process.c          rb_define_module_function(rb_mProcID_Syscall, "setgid", p_sys_setgid, 1);
rb_define_module_function 3750 process.c          rb_define_module_function(rb_mProcID_Syscall, "setruid", p_sys_setruid, 1);
rb_define_module_function 3751 process.c          rb_define_module_function(rb_mProcID_Syscall, "setrgid", p_sys_setrgid, 1);
rb_define_module_function 3753 process.c          rb_define_module_function(rb_mProcID_Syscall, "seteuid", p_sys_seteuid, 1);
rb_define_module_function 3754 process.c          rb_define_module_function(rb_mProcID_Syscall, "setegid", p_sys_setegid, 1);
rb_define_module_function 3756 process.c          rb_define_module_function(rb_mProcID_Syscall, "setreuid", p_sys_setreuid, 2);
rb_define_module_function 3757 process.c          rb_define_module_function(rb_mProcID_Syscall, "setregid", p_sys_setregid, 2);
rb_define_module_function 3759 process.c          rb_define_module_function(rb_mProcID_Syscall, "setresuid", p_sys_setresuid, 3);
rb_define_module_function 3760 process.c          rb_define_module_function(rb_mProcID_Syscall, "setresgid", p_sys_setresgid, 3);
rb_define_module_function 3761 process.c          rb_define_module_function(rb_mProcID_Syscall, "issetugid", p_sys_issetugid, 0);
rb_define_module_function  518 ruby.h         void rb_define_module_function(VALUE,const char*,VALUE(*)(ANYARGS),int);
rb_define_module_function  926 signal.c           rb_define_module_function(mSignal, "trap", sig_trap, -1);
rb_define_module_function  927 signal.c           rb_define_module_function(mSignal, "list", sig_list, 0);


rb_define_module_id

rb_define_module_id  289 class.c            module = rb_define_module_id(id);
rb_define_module_id  310 class.c            module = rb_define_module_id(id);
rb_define_module_id 3901 eval.c         		module = rb_define_module_id(cname);
rb_define_module_id  123 intern.h       VALUE rb_define_module_id(ID);


rb_define_module_under

rb_define_module_under 1446 ext/curses/curses.c     mKey       = rb_define_module_under(mCurses, "Key");
rb_define_module_under 1064 ext/iconv/iconv.c     rb_eIconvFailure = rb_define_module_under(rb_cIconv, "Failure");
rb_define_module_under 1097 ext/openssl/ossl_asn1.c     mASN1 = rb_define_module_under(mOSSL, "ASN1");
rb_define_module_under  349 ext/openssl/ossl_cipher.c     mCipher = rb_define_module_under(mOSSL, "Cipher");
rb_define_module_under  267 ext/openssl/ossl_digest.c     mDigest = rb_define_module_under(mOSSL, "Digest");
rb_define_module_under  236 ext/openssl/ossl_ns_spki.c     mNetscape = rb_define_module_under(mOSSL, "Netscape");
rb_define_module_under  682 ext/openssl/ossl_ocsp.c     mOCSP = rb_define_module_under(mOSSL, "OCSP");
rb_define_module_under  143 ext/openssl/ossl_pkcs12.c     mPKCS12 = rb_define_module_under(mOSSL, "PKCS12");
rb_define_module_under  927 ext/openssl/ossl_pkcs7.c     mPKCS7 = rb_define_module_under(mOSSL, "PKCS7");
rb_define_module_under  211 ext/openssl/ossl_pkey.c     mPKey = rb_define_module_under(mOSSL, "PKey");
rb_define_module_under  118 ext/openssl/ossl_rand.c     mRandom = rb_define_module_under(mOSSL, "Random");
rb_define_module_under  862 ext/openssl/ossl_ssl.c     mSSL = rb_define_module_under(mOSSL, "SSL");
rb_define_module_under   22 ext/openssl/ossl_x509.c     mX509 = rb_define_module_under(mOSSL, "X509");
rb_define_module_under 3254 ext/socket/socket.c     mConst = rb_define_module_under(rb_cSocket, "Constants");
rb_define_module_under 2146 ext/syck/rubyext.c     VALUE rb_syck = rb_define_module_under( rb_yaml, "Syck" );
rb_define_module_under  237 ext/syslog/syslog.c     mSyslogConstants = rb_define_module_under(mSyslog, "Constants");
rb_define_module_under 7701 ext/tk/tcltklib.c     VALUE ev_flag = rb_define_module_under(lib, "EventFlag");
rb_define_module_under 7702 ext/tk/tcltklib.c     VALUE var_flag = rb_define_module_under(lib, "VarAccessFlag");
rb_define_module_under 6974 ext/win32ole/win32ole.c     mWIN32OLE_VARIANT = rb_define_module_under(cWIN32OLE, "VARIANT");
rb_define_module_under 4356 file.c             rb_mFConst = rb_define_module_under(rb_cFile, "Constants");
rb_define_module_under 3718 process.c          rb_mProcUID = rb_define_module_under(rb_mProcess, "UID");
rb_define_module_under 3719 process.c          rb_mProcGID = rb_define_module_under(rb_mProcess, "GID");
rb_define_module_under 3740 process.c          rb_mProcID_Syscall = rb_define_module_under(rb_mProcess, "Sys");
rb_define_module_under  504 ruby.h         VALUE rb_define_module_under(VALUE, const char*);


rb_define_private_method

rb_define_private_method  810 class.c            rb_define_private_method(module, name, func, argc);
rb_define_private_method 7662 eval.c             rb_define_private_method(rb_cModule, "append_features", rb_mod_append_features, 1);
rb_define_private_method 7663 eval.c             rb_define_private_method(rb_cModule, "extend_object", rb_mod_extend_object, 1);
rb_define_private_method 7664 eval.c             rb_define_private_method(rb_cModule, "include", rb_mod_include, -1);
rb_define_private_method 7665 eval.c             rb_define_private_method(rb_cModule, "public", rb_mod_public, -1);
rb_define_private_method 7666 eval.c             rb_define_private_method(rb_cModule, "protected", rb_mod_protected, -1);
rb_define_private_method 7667 eval.c             rb_define_private_method(rb_cModule, "private", rb_mod_private, -1);
rb_define_private_method 7668 eval.c             rb_define_private_method(rb_cModule, "module_function", rb_mod_modfunc, -1);
rb_define_private_method 7682 eval.c             rb_define_private_method(rb_cModule, "remove_method", rb_mod_remove_method, -1);
rb_define_private_method 7683 eval.c             rb_define_private_method(rb_cModule, "undef_method", rb_mod_undef_method, -1);
rb_define_private_method 7684 eval.c             rb_define_private_method(rb_cModule, "alias_method", rb_mod_alias_method, 2);
rb_define_private_method 7685 eval.c             rb_define_private_method(rb_cModule, "define_method", rb_mod_define_method, -1);
rb_define_private_method  799 ext/racc/cparse/cparse.c     rb_define_private_method(Parser, "_racc_do_parse_c", racc_cparse, 2);
rb_define_private_method  800 ext/racc/cparse/cparse.c     rb_define_private_method(Parser, "_racc_yyparse_c", racc_yyparse, 4);
rb_define_private_method 1313 ext/strscan/strscan.c     rb_define_private_method(StringScanner, "initialize", strscan_initialize, -1);
rb_define_private_method 1314 ext/strscan/strscan.c     rb_define_private_method(StringScanner, "initialize_copy", strscan_init_copy, 1);
rb_define_private_method  136 intern.h       void rb_define_private_method(VALUE, const char*, VALUE (*)(ANYARGS), int);
rb_define_private_method 2381 object.c           rb_define_private_method(rb_cObject, "initialize", rb_obj_dummy, 0);
rb_define_private_method 2382 object.c           rb_define_private_method(rb_cClass, "inherited", rb_obj_dummy, 1);
rb_define_private_method 2383 object.c           rb_define_private_method(rb_cModule, "included", rb_obj_dummy, 1);
rb_define_private_method 2384 object.c           rb_define_private_method(rb_cModule, "extended", rb_obj_dummy, 1);
rb_define_private_method 2385 object.c           rb_define_private_method(rb_cModule, "method_added", rb_obj_dummy, 1);
rb_define_private_method 2386 object.c           rb_define_private_method(rb_cModule, "method_removed", rb_obj_dummy, 1);
rb_define_private_method 2387 object.c           rb_define_private_method(rb_cModule, "method_undefined", rb_obj_dummy, 1);
rb_define_private_method 2423 object.c           rb_define_private_method(rb_mKernel, "remove_instance_variable",
rb_define_private_method 2430 object.c           rb_define_private_method(rb_mKernel, "singleton_method_added", rb_obj_dummy, 1);
rb_define_private_method 2431 object.c           rb_define_private_method(rb_mKernel, "singleton_method_removed", rb_obj_dummy, 1);
rb_define_private_method 2432 object.c           rb_define_private_method(rb_mKernel, "singleton_method_undefined", rb_obj_dummy, 1);
rb_define_private_method 2485 object.c           rb_define_private_method(rb_cModule, "attr", rb_mod_attr, -1);
rb_define_private_method 2486 object.c           rb_define_private_method(rb_cModule, "attr_reader", rb_mod_attr_reader, -1);
rb_define_private_method 2487 object.c           rb_define_private_method(rb_cModule, "attr_writer", rb_mod_attr_writer, -1);
rb_define_private_method 2488 object.c           rb_define_private_method(rb_cModule, "attr_accessor", rb_mod_attr_accessor, -1);
rb_define_private_method 2504 object.c           rb_define_private_method(rb_cModule, "remove_const",


rb_define_readonly_variable

rb_define_readonly_variable 7786 eval.c             rb_define_readonly_variable("$:", &rb_load_path);
rb_define_readonly_variable 7787 eval.c             rb_define_readonly_variable("$-I", &rb_load_path);
rb_define_readonly_variable 7788 eval.c             rb_define_readonly_variable("$LOAD_PATH", &rb_load_path);
rb_define_readonly_variable 7791 eval.c             rb_define_readonly_variable("$\"", &rb_features);
rb_define_readonly_variable 7792 eval.c             rb_define_readonly_variable("$LOADED_FEATURES", &rb_features);
rb_define_readonly_variable 5580 io.c               rb_define_readonly_variable("$<", &argf);
rb_define_readonly_variable 5622 io.c               rb_define_readonly_variable("$FILENAME", &filename);
rb_define_readonly_variable 3563 process.c          rb_define_readonly_variable("$?", &rb_last_status);
rb_define_readonly_variable 1156 ruby.c             rb_define_readonly_variable("$-p", &do_print);
rb_define_readonly_variable 1157 ruby.c             rb_define_readonly_variable("$-l", &do_line);
rb_define_readonly_variable 1162 ruby.c             rb_define_readonly_variable("$*", &rb_argv);
rb_define_readonly_variable 1165 ruby.c             rb_define_readonly_variable("$-a", &do_split);
rb_define_readonly_variable  512 ruby.h         void rb_define_readonly_variable(const char*,VALUE*);


rb_define_singleton_method

rb_define_singleton_method 2845 array.c            rb_define_singleton_method(rb_cArray, "[]", rb_ary_s_create, -1);
rb_define_singleton_method  811 class.c            rb_define_singleton_method(module, name, func, argc);
rb_define_singleton_method 1806 dir.c              rb_define_singleton_method(rb_cDir, "open", dir_s_open, 1);
rb_define_singleton_method 1807 dir.c              rb_define_singleton_method(rb_cDir, "foreach", dir_foreach, 1);
rb_define_singleton_method 1808 dir.c              rb_define_singleton_method(rb_cDir, "entries", dir_entries, 1);
rb_define_singleton_method 1822 dir.c              rb_define_singleton_method(rb_cDir,"chdir", dir_s_chdir, -1);
rb_define_singleton_method 1823 dir.c              rb_define_singleton_method(rb_cDir,"getwd", dir_s_getwd, 0);
rb_define_singleton_method 1824 dir.c              rb_define_singleton_method(rb_cDir,"pwd", dir_s_getwd, 0);
rb_define_singleton_method 1825 dir.c              rb_define_singleton_method(rb_cDir,"chroot", dir_s_chroot, 1);
rb_define_singleton_method 1826 dir.c              rb_define_singleton_method(rb_cDir,"mkdir", dir_s_mkdir, -1);
rb_define_singleton_method 1827 dir.c              rb_define_singleton_method(rb_cDir,"rmdir", dir_s_rmdir, 1);
rb_define_singleton_method 1828 dir.c              rb_define_singleton_method(rb_cDir,"delete", dir_s_rmdir, 1);
rb_define_singleton_method 1829 dir.c              rb_define_singleton_method(rb_cDir,"unlink", dir_s_rmdir, 1);
rb_define_singleton_method 1831 dir.c              rb_define_singleton_method(rb_cDir,"glob", dir_s_glob, -1);
rb_define_singleton_method 1832 dir.c              rb_define_singleton_method(rb_cDir,"[]", dir_s_aref, -1);
rb_define_singleton_method 1834 dir.c              rb_define_singleton_method(rb_cFile,"fnmatch", file_s_fnmatch, -1);
rb_define_singleton_method 1835 dir.c              rb_define_singleton_method(rb_cFile,"fnmatch?", file_s_fnmatch, -1);
rb_define_singleton_method  939 error.c            rb_define_singleton_method(rb_eException, "exception", rb_class_new_instance, -1);
rb_define_singleton_method  969 error.c            rb_define_singleton_method(rb_cNameErrorMesg, "!", name_err_mesg_new, 3);
rb_define_singleton_method  973 error.c            rb_define_singleton_method(rb_cNameErrorMesg, "_load", name_err_mesg_load, 1);
rb_define_singleton_method  991 error.c            rb_define_singleton_method(rb_eSystemCallError, "===", syserr_eqq, 1);
rb_define_singleton_method  994 error.c            rb_define_singleton_method(rb_mErrno, "const_missing", errno_missing, 1);
rb_define_singleton_method 7687 eval.c             rb_define_singleton_method(rb_cModule, "nesting", rb_mod_nesting, 0);
rb_define_singleton_method 7688 eval.c             rb_define_singleton_method(rb_cModule, "constants", rb_mod_s_constants, 0);
rb_define_singleton_method 7690 eval.c             rb_define_singleton_method(ruby_top_self, "include", top_include, -1);
rb_define_singleton_method 7691 eval.c             rb_define_singleton_method(ruby_top_self, "public", top_public, -1);
rb_define_singleton_method 7692 eval.c             rb_define_singleton_method(ruby_top_self, "private", top_private, -1);
rb_define_singleton_method 9395 eval.c             rb_define_singleton_method(rb_cProc, "new", proc_s_new, -1);
rb_define_singleton_method 12832 eval.c             rb_define_singleton_method(rb_cThread, "new", rb_thread_s_new, -1);
rb_define_singleton_method 12834 eval.c             rb_define_singleton_method(rb_cThread, "start", rb_thread_start, -2);
rb_define_singleton_method 12835 eval.c             rb_define_singleton_method(rb_cThread, "fork", rb_thread_start, -2);
rb_define_singleton_method 12837 eval.c             rb_define_singleton_method(rb_cThread, "stop", rb_thread_stop, 0);
rb_define_singleton_method 12838 eval.c             rb_define_singleton_method(rb_cThread, "kill", rb_thread_s_kill, 1);
rb_define_singleton_method 12839 eval.c             rb_define_singleton_method(rb_cThread, "exit", rb_thread_exit, 0);
rb_define_singleton_method 12840 eval.c             rb_define_singleton_method(rb_cThread, "pass", rb_thread_pass, 0);
rb_define_singleton_method 12841 eval.c             rb_define_singleton_method(rb_cThread, "current", rb_thread_current, 0);
rb_define_singleton_method 12842 eval.c             rb_define_singleton_method(rb_cThread, "main", rb_thread_main, 0);
rb_define_singleton_method 12843 eval.c             rb_define_singleton_method(rb_cThread, "list", rb_thread_list, 0);
rb_define_singleton_method 12845 eval.c             rb_define_singleton_method(rb_cThread, "critical", rb_thread_critical_get, 0);
rb_define_singleton_method 12846 eval.c             rb_define_singleton_method(rb_cThread, "critical=", rb_thread_critical_set, 1);
rb_define_singleton_method 12848 eval.c             rb_define_singleton_method(rb_cThread, "abort_on_exception", rb_thread_s_abort_exc, 0);
rb_define_singleton_method 12849 eval.c             rb_define_singleton_method(rb_cThread, "abort_on_exception=", rb_thread_s_abort_exc_set, 1);
rb_define_singleton_method 1258 ext/bigdecimal/bigdecimal.c     rb_define_singleton_method(rb_cBigDecimal, "new", BigDecimal_new, -1);
rb_define_singleton_method 1259 ext/bigdecimal/bigdecimal.c     rb_define_singleton_method(rb_cBigDecimal, "mode", BigDecimal_mode, -1);
rb_define_singleton_method 1260 ext/bigdecimal/bigdecimal.c     rb_define_singleton_method(rb_cBigDecimal, "limit", BigDecimal_limit, -1);
rb_define_singleton_method 1261 ext/bigdecimal/bigdecimal.c     rb_define_singleton_method(rb_cBigDecimal, "double_fig", BigDecimal_double_fig, 0);
rb_define_singleton_method 1262 ext/bigdecimal/bigdecimal.c     rb_define_singleton_method(rb_cBigDecimal, "induced_from",BigDecimal_induced_from, 1);
rb_define_singleton_method 1263 ext/bigdecimal/bigdecimal.c     rb_define_singleton_method(rb_cBigDecimal, "_load", BigDecimal_load, 1);
rb_define_singleton_method 1264 ext/bigdecimal/bigdecimal.c     rb_define_singleton_method(rb_cBigDecimal, "ver", BigDecimal_version, 0);
rb_define_singleton_method  732 ext/dbm/dbm.c      rb_define_singleton_method(rb_cDBM, "open", fdbm_s_open, -1);
rb_define_singleton_method  258 ext/digest/digest.c     rb_define_singleton_method(cDigest_Base, "digest", rb_digest_base_s_digest, 1);
rb_define_singleton_method  259 ext/digest/digest.c     rb_define_singleton_method(cDigest_Base, "hexdigest", rb_digest_base_s_hexdigest, 1);
rb_define_singleton_method  456 ext/dl/cptr.c      rb_define_singleton_method(rb_cDLCPtr, "malloc", rb_dlptr_s_malloc, -1);
rb_define_singleton_method  457 ext/dl/cptr.c      rb_define_singleton_method(rb_cDLCPtr, "to_ptr", rb_dlptr_s_to_ptr, 1);
rb_define_singleton_method  458 ext/dl/cptr.c      rb_define_singleton_method(rb_cDLCPtr, "[]", rb_dlptr_s_to_ptr, 1);
rb_define_singleton_method  922 ext/gdbm/gdbm.c     rb_define_singleton_method(rb_cGDBM, "open", fgdbm_s_open, -1);
rb_define_singleton_method 1049 ext/iconv/iconv.c     rb_define_singleton_method(rb_cIconv, "open", iconv_s_open, -1);
rb_define_singleton_method 1050 ext/iconv/iconv.c     rb_define_singleton_method(rb_cIconv, "iconv", iconv_s_iconv, -1);
rb_define_singleton_method 1051 ext/iconv/iconv.c     rb_define_singleton_method(rb_cIconv, "conv", iconv_s_conv, 3);
rb_define_singleton_method 1052 ext/iconv/iconv.c     rb_define_singleton_method(rb_cIconv, "list", iconv_s_list, 0);
rb_define_singleton_method 1053 ext/iconv/iconv.c     rb_define_singleton_method(rb_cIconv, "ctlmethods", iconv_s_ctlmethods, 0);
rb_define_singleton_method 1088 ext/iconv/iconv.c     rb_define_singleton_method(rb_cIconv, "charset_map", charset_map_get, 0);
rb_define_singleton_method 1159 ext/openssl/ossl_asn1.c     rb_define_singleton_method(cASN1ObjectId, "register", ossl_asn1obj_s_register, 3);
rb_define_singleton_method  662 ext/openssl/ossl_bn.c     rb_define_singleton_method(cBN, "rand", ossl_bn_s_rand, -1);
rb_define_singleton_method  663 ext/openssl/ossl_bn.c     rb_define_singleton_method(cBN, "pseudo_rand", ossl_bn_s_pseudo_rand, -1);
rb_define_singleton_method  664 ext/openssl/ossl_bn.c     rb_define_singleton_method(cBN, "rand_range", ossl_bn_s_rand_range, 1);
rb_define_singleton_method  665 ext/openssl/ossl_bn.c     rb_define_singleton_method(cBN, "pseudo_rand_range", ossl_bn_s_pseudo_rand_range, 1);
rb_define_singleton_method  667 ext/openssl/ossl_bn.c     rb_define_singleton_method(cBN, "generate_prime", ossl_bn_s_generate_prime, -1);
rb_define_singleton_method  444 ext/openssl/ossl_config.c     rb_define_singleton_method(cConfig, "parse", ossl_config_s_parse, 1);
rb_define_singleton_method  274 ext/openssl/ossl_digest.c     rb_define_singleton_method(cDigest, "digest", ossl_digest_s_digest, 2);
rb_define_singleton_method  275 ext/openssl/ossl_digest.c     rb_define_singleton_method(cDigest, "hexdigest", ossl_digest_s_hexdigest, 2);
rb_define_singleton_method  351 ext/openssl/ossl_engine.c     rb_define_singleton_method(cEngine, "load", ossl_engine_s_load, -1);
rb_define_singleton_method  352 ext/openssl/ossl_engine.c     rb_define_singleton_method(cEngine, "cleanup", ossl_engine_s_cleanup, 0);
rb_define_singleton_method  353 ext/openssl/ossl_engine.c     rb_define_singleton_method(cEngine, "engines", ossl_engine_s_engines, 0);
rb_define_singleton_method  354 ext/openssl/ossl_engine.c     rb_define_singleton_method(cEngine, "by_id", ossl_engine_s_by_id, 1);
rb_define_singleton_method  199 ext/openssl/ossl_hmac.c     rb_define_singleton_method(cHMAC, "digest", ossl_hmac_s_digest, 3);
rb_define_singleton_method  200 ext/openssl/ossl_hmac.c     rb_define_singleton_method(cHMAC, "hexdigest", ossl_hmac_s_hexdigest, 3);
rb_define_singleton_method  698 ext/openssl/ossl_ocsp.c     rb_define_singleton_method(cOCSPRes, "create", ossl_ocspres_s_create, 2);
rb_define_singleton_method  932 ext/openssl/ossl_pkcs7.c     rb_define_singleton_method(mPKCS7, "read_smime", ossl_pkcs7_s_read_smime, 1);
rb_define_singleton_method  933 ext/openssl/ossl_pkcs7.c     rb_define_singleton_method(mPKCS7, "write_smime", ossl_pkcs7_s_write_smime, -1);
rb_define_singleton_method  934 ext/openssl/ossl_pkcs7.c     rb_define_singleton_method(mPKCS7, "sign",  ossl_pkcs7_s_sign, -1);
rb_define_singleton_method  935 ext/openssl/ossl_pkcs7.c     rb_define_singleton_method(mPKCS7, "encrypt", ossl_pkcs7_s_encrypt, -1);
rb_define_singleton_method  423 ext/openssl/ossl_pkey_dh.c     rb_define_singleton_method(cDH, "generate", ossl_dh_s_generate, -1);
rb_define_singleton_method  385 ext/openssl/ossl_pkey_dsa.c     rb_define_singleton_method(cDSA, "generate", ossl_dsa_s_generate, 1);
rb_define_singleton_method  466 ext/openssl/ossl_pkey_rsa.c     rb_define_singleton_method(cRSA, "generate", ossl_rsa_s_generate, -1);
rb_define_singleton_method  110 ext/openssl/ossl_rand.c 	rb_define_singleton_method(class, name, func, argc);
rb_define_singleton_method  760 ext/readline/readline.c     rb_define_singleton_method(mReadline, "input=",
rb_define_singleton_method  762 ext/readline/readline.c     rb_define_singleton_method(mReadline, "output=",
rb_define_singleton_method  764 ext/readline/readline.c     rb_define_singleton_method(mReadline, "completion_proc=",
rb_define_singleton_method  766 ext/readline/readline.c     rb_define_singleton_method(mReadline, "completion_proc",
rb_define_singleton_method  768 ext/readline/readline.c     rb_define_singleton_method(mReadline, "completion_case_fold=",
rb_define_singleton_method  770 ext/readline/readline.c     rb_define_singleton_method(mReadline, "completion_case_fold",
rb_define_singleton_method  772 ext/readline/readline.c     rb_define_singleton_method(mReadline, "vi_editing_mode",
rb_define_singleton_method  774 ext/readline/readline.c     rb_define_singleton_method(mReadline, "emacs_editing_mode",
rb_define_singleton_method  776 ext/readline/readline.c     rb_define_singleton_method(mReadline, "completion_append_character=",
rb_define_singleton_method  778 ext/readline/readline.c     rb_define_singleton_method(mReadline, "completion_append_character",
rb_define_singleton_method  780 ext/readline/readline.c     rb_define_singleton_method(mReadline, "basic_word_break_characters=",
rb_define_singleton_method  782 ext/readline/readline.c     rb_define_singleton_method(mReadline, "basic_word_break_characters",
rb_define_singleton_method  784 ext/readline/readline.c     rb_define_singleton_method(mReadline, "completer_word_break_characters=",
rb_define_singleton_method  786 ext/readline/readline.c     rb_define_singleton_method(mReadline, "completer_word_break_characters",
rb_define_singleton_method  788 ext/readline/readline.c     rb_define_singleton_method(mReadline, "basic_quote_characters=",
rb_define_singleton_method  790 ext/readline/readline.c     rb_define_singleton_method(mReadline, "basic_quote_characters",
rb_define_singleton_method  792 ext/readline/readline.c     rb_define_singleton_method(mReadline, "completer_quote_characters=",
rb_define_singleton_method  794 ext/readline/readline.c     rb_define_singleton_method(mReadline, "completer_quote_characters",
rb_define_singleton_method  796 ext/readline/readline.c     rb_define_singleton_method(mReadline, "filename_quote_characters=",
rb_define_singleton_method  798 ext/readline/readline.c     rb_define_singleton_method(mReadline, "filename_quote_characters",
rb_define_singleton_method  803 ext/readline/readline.c     rb_define_singleton_method(history,"to_s", hist_to_s, 0);
rb_define_singleton_method  804 ext/readline/readline.c     rb_define_singleton_method(history,"[]", hist_get, 1);
rb_define_singleton_method  805 ext/readline/readline.c     rb_define_singleton_method(history,"[]=", hist_set, 2);
rb_define_singleton_method  806 ext/readline/readline.c     rb_define_singleton_method(history,"<<", hist_push, 1);
rb_define_singleton_method  807 ext/readline/readline.c     rb_define_singleton_method(history,"push", hist_push_method, -1);
rb_define_singleton_method  808 ext/readline/readline.c     rb_define_singleton_method(history,"pop", hist_pop, 0);
rb_define_singleton_method  809 ext/readline/readline.c     rb_define_singleton_method(history,"shift", hist_shift, 0);
rb_define_singleton_method  810 ext/readline/readline.c     rb_define_singleton_method(history,"each", hist_each, 0);
rb_define_singleton_method  811 ext/readline/readline.c     rb_define_singleton_method(history,"length", hist_length, 0);
rb_define_singleton_method  812 ext/readline/readline.c     rb_define_singleton_method(history,"size", hist_length, 0);
rb_define_singleton_method  813 ext/readline/readline.c     rb_define_singleton_method(history,"empty?", hist_empty_p, 0);
rb_define_singleton_method  814 ext/readline/readline.c     rb_define_singleton_method(history,"delete_at", hist_delete_at, 1);
rb_define_singleton_method  818 ext/readline/readline.c     rb_define_singleton_method(fcomp, "call",
rb_define_singleton_method  823 ext/readline/readline.c     rb_define_singleton_method(ucomp, "call",
rb_define_singleton_method  713 ext/sdbm/init.c     rb_define_singleton_method(rb_cDBM, "open", fsdbm_s_open, -1);
rb_define_singleton_method 3150 ext/socket/socket.c     rb_define_singleton_method(rb_cBasicSocket, "do_not_reverse_lookup",
rb_define_singleton_method 3152 ext/socket/socket.c     rb_define_singleton_method(rb_cBasicSocket, "do_not_reverse_lookup=",
rb_define_singleton_method 3154 ext/socket/socket.c     rb_define_singleton_method(rb_cBasicSocket, "for_fd", bsock_s_for_fd, 1);
rb_define_singleton_method 3173 ext/socket/socket.c     rb_define_singleton_method(rb_cIPSocket, "getaddress", ip_s_getaddress, 1);
rb_define_singleton_method 3177 ext/socket/socket.c     rb_define_singleton_method(rb_cTCPSocket, "gethostbyname", tcp_s_gethostbyname, 1);
rb_define_singleton_method 3213 ext/socket/socket.c     rb_define_singleton_method(rb_cUNIXSocket, "socketpair", unix_s_socketpair, -1);
rb_define_singleton_method 3214 ext/socket/socket.c     rb_define_singleton_method(rb_cUNIXSocket, "pair", unix_s_socketpair, -1);
rb_define_singleton_method 3235 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "socketpair", sock_s_socketpair, 3);
rb_define_singleton_method 3236 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "pair", sock_s_socketpair, 3);
rb_define_singleton_method 3237 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "gethostname", sock_gethostname, 0);
rb_define_singleton_method 3238 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "gethostbyname", sock_s_gethostbyname, 1);
rb_define_singleton_method 3239 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "gethostbyaddr", sock_s_gethostbyaddr, -1);
rb_define_singleton_method 3240 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "getservbyname", sock_s_getservbyname, -1);
rb_define_singleton_method 3241 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "getservbyport", sock_s_getservbyport, -1);
rb_define_singleton_method 3242 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "getaddrinfo", sock_s_getaddrinfo, -1);
rb_define_singleton_method 3243 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "getnameinfo", sock_s_getnameinfo, -1);
rb_define_singleton_method 3244 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "sockaddr_in", sock_s_pack_sockaddr_in, 2);
rb_define_singleton_method 3245 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "pack_sockaddr_in", sock_s_pack_sockaddr_in, 2);
rb_define_singleton_method 3246 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "unpack_sockaddr_in", sock_s_unpack_sockaddr_in, 1);
rb_define_singleton_method 3248 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "sockaddr_un", sock_s_pack_sockaddr_un, 1);
rb_define_singleton_method 3249 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "pack_sockaddr_un", sock_s_pack_sockaddr_un, 1);
rb_define_singleton_method 3250 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "unpack_sockaddr_un", sock_s_unpack_sockaddr_un, 1);
rb_define_singleton_method 1234 ext/stringio/stringio.c     rb_define_singleton_method(StringIO, "open", strio_s_open, -1);
rb_define_singleton_method 1315 ext/strscan/strscan.c     rb_define_singleton_method(StringScanner, "must_C_version", strscan_s_mustc, 0);
rb_define_singleton_method 2229 ext/syck/rubyext.c     rb_define_singleton_method( oDefaultResolver, "node_import", syck_defaultresolver_node_import, 1 );
rb_define_singleton_method 2230 ext/syck/rubyext.c     rb_define_singleton_method( oDefaultResolver, "detect_implicit", syck_defaultresolver_detect_implicit, 1 );
rb_define_singleton_method 2234 ext/syck/rubyext.c     rb_define_singleton_method( oGenericResolver, "node_import", syck_genericresolver_node_import, 1 );
rb_define_singleton_method 1542 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(cCB_SUBST, "inspect", cbsubst_inspect, 0);
rb_define_singleton_method 1545 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(cSUBST_INFO, "inspect", substinfo_inspect, 0);
rb_define_singleton_method 1548 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(cCB_SUBST, "ret_val", cbsubst_ret_val, 1);
rb_define_singleton_method 1549 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(cCB_SUBST, "scan_args", cbsubst_scan_args, 2);
rb_define_singleton_method 1550 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(cCB_SUBST, "subst_arg",
rb_define_singleton_method 1552 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(cCB_SUBST, "_get_subst_key",
rb_define_singleton_method 1554 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(cCB_SUBST, "_get_all_subst_keys",
rb_define_singleton_method 1556 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(cCB_SUBST, "_setup_subst_table",
rb_define_singleton_method 1558 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(cCB_SUBST, "_get_extra_args_tbl",
rb_define_singleton_method 1560 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(cCB_SUBST, "_define_attribute_aliases",
rb_define_singleton_method 1570 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(cTkCallbackEntry, "inspect", tk_cbe_inspect, 0);
rb_define_singleton_method 1586 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(cTK, "new", tk_s_new, -1);
rb_define_singleton_method 1592 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(TK_None, "to_s", tkNone_to_s, 0);
rb_define_singleton_method 1593 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(TK_None, "inspect", tkNone_to_s, 0);
rb_define_singleton_method 1601 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(mTK, "eval_cmd", tk_eval_cmd, -1);
rb_define_singleton_method 1602 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(mTK, "callback", tk_do_callback, -1);
rb_define_singleton_method 1603 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(mTK, "install_cmd", tk_install_cmd, -1);
rb_define_singleton_method 1604 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(mTK, "uninstall_cmd", tk_uninstall_cmd, 1);
rb_define_singleton_method 1605 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(mTK, "_symbolkey2str", tk_symbolkey2str, 1);
rb_define_singleton_method 1606 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(mTK, "hash_kv", tk_hash_kv, -1);
rb_define_singleton_method 1607 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(mTK, "_get_eval_string",
rb_define_singleton_method 1609 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(mTK, "_get_eval_enc_str",
rb_define_singleton_method 1611 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(mTK, "_conv_args", tk_conv_args, -1);
rb_define_singleton_method 1613 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(mTK, "bool", tcl2rb_bool, 1);
rb_define_singleton_method 1614 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(mTK, "number", tcl2rb_number, 1);
rb_define_singleton_method 1615 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(mTK, "string", tcl2rb_string, 1);
rb_define_singleton_method 1616 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(mTK, "num_or_str", tcl2rb_num_or_str, 1);
rb_define_singleton_method 6927 ext/win32ole/win32ole.c     rb_define_singleton_method(cWIN32OLE, "connect", fole_s_connect, -1);
rb_define_singleton_method 6928 ext/win32ole/win32ole.c     rb_define_singleton_method(cWIN32OLE, "const_load", fole_s_const_load, -1);
rb_define_singleton_method 6930 ext/win32ole/win32ole.c     rb_define_singleton_method(cWIN32OLE, "ole_free", fole_s_free, 1);
rb_define_singleton_method 6931 ext/win32ole/win32ole.c     rb_define_singleton_method(cWIN32OLE, "ole_reference_count", fole_s_reference_count, 1);
rb_define_singleton_method 6932 ext/win32ole/win32ole.c     rb_define_singleton_method(cWIN32OLE, "ole_show_help", fole_s_show_help, -1);
rb_define_singleton_method 6933 ext/win32ole/win32ole.c     rb_define_singleton_method(cWIN32OLE, "codepage", fole_s_get_code_page, 0);
rb_define_singleton_method 6934 ext/win32ole/win32ole.c     rb_define_singleton_method(cWIN32OLE, "codepage=", fole_s_set_code_page, 1);
rb_define_singleton_method 6999 ext/win32ole/win32ole.c     rb_define_singleton_method(cWIN32OLE_TYPELIB, "typelibs", foletypelib_s_typelibs, 0);
rb_define_singleton_method 7011 ext/win32ole/win32ole.c     rb_define_singleton_method(cWIN32OLE_TYPE, "ole_classes", foletype_s_ole_classes, 1);
rb_define_singleton_method 7012 ext/win32ole/win32ole.c     rb_define_singleton_method(cWIN32OLE_TYPE, "typelibs", foletype_s_typelibs, 0);
rb_define_singleton_method 7013 ext/win32ole/win32ole.c     rb_define_singleton_method(cWIN32OLE_TYPE, "progids", foletype_s_progids, 0);
rb_define_singleton_method 7083 ext/win32ole/win32ole.c     rb_define_singleton_method(cWIN32OLE_EVENT, "message_loop", fev_s_msg_loop, 0);
rb_define_singleton_method 3463 ext/zlib/zlib.c     rb_define_singleton_method(cDeflate, "deflate", rb_deflate_s_deflate, -1);
rb_define_singleton_method 3474 ext/zlib/zlib.c     rb_define_singleton_method(cInflate, "inflate", rb_inflate_s_inflate, 1);
rb_define_singleton_method 3521 ext/zlib/zlib.c     rb_define_singleton_method(cGzipFile, "wrap", rb_gzfile_s_wrap, -1);
rb_define_singleton_method 3547 ext/zlib/zlib.c     rb_define_singleton_method(cGzipWriter, "open", rb_gzwriter_s_open,-1);
rb_define_singleton_method 3558 ext/zlib/zlib.c     rb_define_singleton_method(cGzipReader, "open", rb_gzreader_s_open,-1);
rb_define_singleton_method 4228 file.c             rb_define_singleton_method(rb_cFile, name, func, argc);
rb_define_singleton_method 4301 file.c             rb_define_singleton_method(rb_cFile, "stat",  rb_file_s_stat, 1);
rb_define_singleton_method 4302 file.c             rb_define_singleton_method(rb_cFile, "lstat", rb_file_s_lstat, 1);
rb_define_singleton_method 4303 file.c             rb_define_singleton_method(rb_cFile, "ftype", rb_file_s_ftype, 1);
rb_define_singleton_method 4305 file.c             rb_define_singleton_method(rb_cFile, "atime", rb_file_s_atime, 1);
rb_define_singleton_method 4306 file.c             rb_define_singleton_method(rb_cFile, "mtime", rb_file_s_mtime, 1);
rb_define_singleton_method 4307 file.c             rb_define_singleton_method(rb_cFile, "ctime", rb_file_s_ctime, 1);
rb_define_singleton_method 4309 file.c             rb_define_singleton_method(rb_cFile, "utime", rb_file_s_utime, -1);
rb_define_singleton_method 4310 file.c             rb_define_singleton_method(rb_cFile, "chmod", rb_file_s_chmod, -1);
rb_define_singleton_method 4311 file.c             rb_define_singleton_method(rb_cFile, "chown", rb_file_s_chown, -1);
rb_define_singleton_method 4312 file.c             rb_define_singleton_method(rb_cFile, "lchmod", rb_file_s_lchmod, -1);
rb_define_singleton_method 4313 file.c             rb_define_singleton_method(rb_cFile, "lchown", rb_file_s_lchown, -1);
rb_define_singleton_method 4315 file.c             rb_define_singleton_method(rb_cFile, "link", rb_file_s_link, 2);
rb_define_singleton_method 4316 file.c             rb_define_singleton_method(rb_cFile, "symlink", rb_file_s_symlink, 2);
rb_define_singleton_method 4317 file.c             rb_define_singleton_method(rb_cFile, "readlink", rb_file_s_readlink, 1);
rb_define_singleton_method 4319 file.c             rb_define_singleton_method(rb_cFile, "unlink", rb_file_s_unlink, -2);
rb_define_singleton_method 4320 file.c             rb_define_singleton_method(rb_cFile, "delete", rb_file_s_unlink, -2);
rb_define_singleton_method 4321 file.c             rb_define_singleton_method(rb_cFile, "rename", rb_file_s_rename, 2);
rb_define_singleton_method 4322 file.c             rb_define_singleton_method(rb_cFile, "umask", rb_file_s_umask, -1);
rb_define_singleton_method 4323 file.c             rb_define_singleton_method(rb_cFile, "truncate", rb_file_s_truncate, 2);
rb_define_singleton_method 4324 file.c             rb_define_singleton_method(rb_cFile, "expand_path", rb_file_s_expand_path, -1);
rb_define_singleton_method 4325 file.c             rb_define_singleton_method(rb_cFile, "basename", rb_file_s_basename, -1);
rb_define_singleton_method 4326 file.c             rb_define_singleton_method(rb_cFile, "dirname", rb_file_s_dirname, 1);
rb_define_singleton_method 4327 file.c             rb_define_singleton_method(rb_cFile, "extname", rb_file_s_extname, 1);
rb_define_singleton_method 4328 file.c             rb_define_singleton_method(rb_cFile, "path", rb_file_s_path, 1);
rb_define_singleton_method 4333 file.c             rb_define_singleton_method(rb_cFile, "split",  rb_file_s_split, 1);
rb_define_singleton_method 4334 file.c             rb_define_singleton_method(rb_cFile, "join",   rb_file_s_join, -2);
rb_define_singleton_method 1915 gc.c               rb_define_singleton_method(rb_mGC, "start", rb_gc_start, 0);
rb_define_singleton_method 1916 gc.c               rb_define_singleton_method(rb_mGC, "enable", rb_gc_enable, 0);
rb_define_singleton_method 1917 gc.c               rb_define_singleton_method(rb_mGC, "disable", rb_gc_disable, 0);
rb_define_singleton_method 2286 hash.c             rb_define_singleton_method(rb_cHash, "[]", rb_hash_s_create, -1);
rb_define_singleton_method 2345 hash.c             rb_define_singleton_method(envtbl,"[]", rb_f_getenv, 1);
rb_define_singleton_method 2346 hash.c             rb_define_singleton_method(envtbl,"fetch", env_fetch, -1);
rb_define_singleton_method 2347 hash.c             rb_define_singleton_method(envtbl,"[]=", env_aset, 2);
rb_define_singleton_method 2348 hash.c             rb_define_singleton_method(envtbl,"store", env_aset, 2);
rb_define_singleton_method 2349 hash.c             rb_define_singleton_method(envtbl,"each", env_each, 0);
rb_define_singleton_method 2350 hash.c             rb_define_singleton_method(envtbl,"each_pair", env_each_pair, 0);
rb_define_singleton_method 2351 hash.c             rb_define_singleton_method(envtbl,"each_key", env_each_key, 0);
rb_define_singleton_method 2352 hash.c             rb_define_singleton_method(envtbl,"each_value", env_each_value, 0);
rb_define_singleton_method 2353 hash.c             rb_define_singleton_method(envtbl,"delete", env_delete_m, 1);
rb_define_singleton_method 2354 hash.c             rb_define_singleton_method(envtbl,"delete_if", env_delete_if, 0);
rb_define_singleton_method 2355 hash.c             rb_define_singleton_method(envtbl,"clear", env_clear, 0);
rb_define_singleton_method 2356 hash.c             rb_define_singleton_method(envtbl,"reject", env_reject, 0);
rb_define_singleton_method 2357 hash.c             rb_define_singleton_method(envtbl,"reject!", env_reject_bang, 0);
rb_define_singleton_method 2358 hash.c             rb_define_singleton_method(envtbl,"select", env_select, 0);
rb_define_singleton_method 2359 hash.c             rb_define_singleton_method(envtbl,"shift", env_shift, 0);
rb_define_singleton_method 2360 hash.c             rb_define_singleton_method(envtbl,"invert", env_invert, 0);
rb_define_singleton_method 2361 hash.c             rb_define_singleton_method(envtbl,"replace", env_replace, 1);
rb_define_singleton_method 2362 hash.c             rb_define_singleton_method(envtbl,"update", env_update, 1);
rb_define_singleton_method 2363 hash.c             rb_define_singleton_method(envtbl,"inspect", env_inspect, 0);
rb_define_singleton_method 2364 hash.c             rb_define_singleton_method(envtbl,"rehash", env_none, 0);
rb_define_singleton_method 2365 hash.c             rb_define_singleton_method(envtbl,"to_a", env_to_a, 0);
rb_define_singleton_method 2366 hash.c             rb_define_singleton_method(envtbl,"to_s", env_to_s, 0);
rb_define_singleton_method 2367 hash.c             rb_define_singleton_method(envtbl,"key", env_key, 1);
rb_define_singleton_method 2368 hash.c             rb_define_singleton_method(envtbl,"index", env_index, 1);
rb_define_singleton_method 2369 hash.c             rb_define_singleton_method(envtbl,"size", env_size, 0);
rb_define_singleton_method 2370 hash.c             rb_define_singleton_method(envtbl,"length", env_size, 0);
rb_define_singleton_method 2371 hash.c             rb_define_singleton_method(envtbl,"empty?", env_empty_p, 0);
rb_define_singleton_method 2372 hash.c             rb_define_singleton_method(envtbl,"keys", env_keys, 0);
rb_define_singleton_method 2373 hash.c             rb_define_singleton_method(envtbl,"values", env_values, 0);
rb_define_singleton_method 2374 hash.c             rb_define_singleton_method(envtbl,"values_at", env_values_at, -1);
rb_define_singleton_method 2375 hash.c             rb_define_singleton_method(envtbl,"include?", env_has_key, 1);
rb_define_singleton_method 2376 hash.c             rb_define_singleton_method(envtbl,"member?", env_has_key, 1);
rb_define_singleton_method 2377 hash.c             rb_define_singleton_method(envtbl,"has_key?", env_has_key, 1);
rb_define_singleton_method 2378 hash.c             rb_define_singleton_method(envtbl,"has_value?", env_has_value, 1);
rb_define_singleton_method 2379 hash.c             rb_define_singleton_method(envtbl,"key?", env_has_key, 1);
rb_define_singleton_method 2380 hash.c             rb_define_singleton_method(envtbl,"value?", env_has_value, 1);
rb_define_singleton_method 2381 hash.c             rb_define_singleton_method(envtbl,"to_hash", env_to_hash, 0);
rb_define_singleton_method  137 intern.h       void rb_define_singleton_method(VALUE, const char*, VALUE(*)(ANYARGS), int);
rb_define_singleton_method 5470 io.c               rb_define_singleton_method(rb_cIO, "new", rb_io_s_new, -1);
rb_define_singleton_method 5471 io.c               rb_define_singleton_method(rb_cIO, "open",  rb_io_s_open, -1);
rb_define_singleton_method 5472 io.c               rb_define_singleton_method(rb_cIO, "sysopen",  rb_io_s_sysopen, -1);
rb_define_singleton_method 5473 io.c               rb_define_singleton_method(rb_cIO, "for_fd", rb_io_s_for_fd, -1);
rb_define_singleton_method 5474 io.c               rb_define_singleton_method(rb_cIO, "popen", rb_io_s_popen, -1);
rb_define_singleton_method 5475 io.c               rb_define_singleton_method(rb_cIO, "foreach", rb_io_s_foreach, -1);
rb_define_singleton_method 5476 io.c               rb_define_singleton_method(rb_cIO, "readlines", rb_io_s_readlines, -1);
rb_define_singleton_method 5477 io.c               rb_define_singleton_method(rb_cIO, "read", rb_io_s_read, -1);
rb_define_singleton_method 5478 io.c               rb_define_singleton_method(rb_cIO, "select", rb_f_select, -1);
rb_define_singleton_method 5479 io.c               rb_define_singleton_method(rb_cIO, "pipe", rb_io_s_pipe, 0);
rb_define_singleton_method 5585 io.c               rb_define_singleton_method(argf, "to_s", argf_to_s, 0);
rb_define_singleton_method 5587 io.c               rb_define_singleton_method(argf, "fileno", argf_fileno, 0);
rb_define_singleton_method 5588 io.c               rb_define_singleton_method(argf, "to_i", argf_fileno, 0);
rb_define_singleton_method 5589 io.c               rb_define_singleton_method(argf, "to_io", argf_to_io, 0);
rb_define_singleton_method 5590 io.c               rb_define_singleton_method(argf, "each",  argf_each_line, -1);
rb_define_singleton_method 5591 io.c               rb_define_singleton_method(argf, "each_line",  argf_each_line, -1);
rb_define_singleton_method 5592 io.c               rb_define_singleton_method(argf, "each_byte",  argf_each_byte, 0);
rb_define_singleton_method 5594 io.c               rb_define_singleton_method(argf, "read",  argf_read, -1);
rb_define_singleton_method 5595 io.c               rb_define_singleton_method(argf, "readpartial",  argf_readpartial, -1);
rb_define_singleton_method 5596 io.c               rb_define_singleton_method(argf, "readlines", rb_f_readlines, -1);
rb_define_singleton_method 5597 io.c               rb_define_singleton_method(argf, "to_a", rb_f_readlines, -1);
rb_define_singleton_method 5598 io.c               rb_define_singleton_method(argf, "gets", rb_f_gets, -1);
rb_define_singleton_method 5599 io.c               rb_define_singleton_method(argf, "readline", rb_f_readline, -1);
rb_define_singleton_method 5600 io.c               rb_define_singleton_method(argf, "getc", argf_getc, 0);
rb_define_singleton_method 5601 io.c               rb_define_singleton_method(argf, "readchar", argf_readchar, 0);
rb_define_singleton_method 5602 io.c               rb_define_singleton_method(argf, "tell", argf_tell, 0);
rb_define_singleton_method 5603 io.c               rb_define_singleton_method(argf, "seek", argf_seek_m, -1);
rb_define_singleton_method 5604 io.c               rb_define_singleton_method(argf, "rewind", argf_rewind, 0);
rb_define_singleton_method 5605 io.c               rb_define_singleton_method(argf, "pos", argf_tell, 0);
rb_define_singleton_method 5606 io.c               rb_define_singleton_method(argf, "pos=", argf_set_pos, 1);
rb_define_singleton_method 5607 io.c               rb_define_singleton_method(argf, "eof", argf_eof, 0);
rb_define_singleton_method 5608 io.c               rb_define_singleton_method(argf, "eof?", argf_eof, 0);
rb_define_singleton_method 5609 io.c               rb_define_singleton_method(argf, "binmode", argf_binmode, 0);
rb_define_singleton_method 5611 io.c               rb_define_singleton_method(argf, "filename", argf_filename, 0);
rb_define_singleton_method 5612 io.c               rb_define_singleton_method(argf, "path", argf_filename, 0);
rb_define_singleton_method 5613 io.c               rb_define_singleton_method(argf, "file", argf_file, 0);
rb_define_singleton_method 5614 io.c               rb_define_singleton_method(argf, "skip", argf_skip, 0);
rb_define_singleton_method 5615 io.c               rb_define_singleton_method(argf, "close", argf_close_m, 0);
rb_define_singleton_method 5616 io.c               rb_define_singleton_method(argf, "closed?", argf_closed, 0);
rb_define_singleton_method 5618 io.c               rb_define_singleton_method(argf, "lineno",   argf_lineno, 0);
rb_define_singleton_method 5619 io.c               rb_define_singleton_method(argf, "lineno=",  argf_set_lineno, 1);
rb_define_singleton_method 2859 numeric.c          rb_define_singleton_method(rb_cFixnum, "induced_from", rb_fix_induced_from, 1);
rb_define_singleton_method 2860 numeric.c          rb_define_singleton_method(rb_cInteger, "induced_from", rb_int_induced_from, 1);
rb_define_singleton_method 2906 numeric.c          rb_define_singleton_method(rb_cFloat, "induced_from", rb_flo_induced_from, 1);
rb_define_singleton_method 2459 object.c           rb_define_singleton_method(rb_cSymbol, "all_symbols", rb_sym_all_symbols, 0); /* in parse.y */
rb_define_singleton_method 2529 object.c           rb_define_singleton_method(ruby_top_self, "to_s", main_to_s, 0);
rb_define_singleton_method 9280 parse.y            rb_define_singleton_method(Ripper, "yydebug", ripper_s_get_yydebug, 0);
rb_define_singleton_method 9281 parse.y            rb_define_singleton_method(Ripper, "yydebug=", ripper_s_set_yydebug, 1);
rb_define_singleton_method  113 prec.c             rb_define_singleton_method(include, "induced_from", prec_induced_from, 1);
rb_define_singleton_method  129 prec.c             rb_define_singleton_method(rb_mPrecision, "included", prec_included, 1);
rb_define_singleton_method 3586 process.c          rb_define_singleton_method(rb_mProcess, "exec", rb_f_exec, -1);
rb_define_singleton_method 3587 process.c          rb_define_singleton_method(rb_mProcess, "fork", rb_f_fork, 0);
rb_define_singleton_method 3588 process.c          rb_define_singleton_method(rb_mProcess, "spawn", rb_f_spawn, -1);
rb_define_singleton_method 3589 process.c          rb_define_singleton_method(rb_mProcess, "exit!", rb_f_exit_bang, -1);
rb_define_singleton_method 3590 process.c          rb_define_singleton_method(rb_mProcess, "exit", rb_f_exit, -1);   /* in eval.c */
rb_define_singleton_method 3591 process.c          rb_define_singleton_method(rb_mProcess, "abort", rb_f_abort, -1); /* in eval.c */
rb_define_singleton_method 2230 re.c               rb_define_singleton_method(rb_cRegexp, "compile", rb_class_new_instance, -1);
rb_define_singleton_method 2231 re.c               rb_define_singleton_method(rb_cRegexp, "quote", rb_reg_s_quote, -1);
rb_define_singleton_method 2232 re.c               rb_define_singleton_method(rb_cRegexp, "escape", rb_reg_s_quote, -1);
rb_define_singleton_method 2233 re.c               rb_define_singleton_method(rb_cRegexp, "union", rb_reg_s_union, -1);
rb_define_singleton_method 2234 re.c               rb_define_singleton_method(rb_cRegexp, "last_match", rb_reg_s_last_match, -1);
rb_define_singleton_method  198 struct.c           rb_define_singleton_method(nstr, "new", rb_class_new_instance, -1);
rb_define_singleton_method  199 struct.c           rb_define_singleton_method(nstr, "[]", rb_class_new_instance, -1);
rb_define_singleton_method  200 struct.c           rb_define_singleton_method(nstr, "members", rb_struct_s_members_m, 0);
rb_define_singleton_method  830 struct.c           rb_define_singleton_method(rb_cStruct, "new", rb_struct_s_def, -1);
rb_define_singleton_method 2070 time.c             rb_define_singleton_method(rb_cTime, "now", rb_class_new_instance, -1);
rb_define_singleton_method 2071 time.c             rb_define_singleton_method(rb_cTime, "at", time_s_at, -1);
rb_define_singleton_method 2072 time.c             rb_define_singleton_method(rb_cTime, "utc", time_s_mkutc, -1);
rb_define_singleton_method 2073 time.c             rb_define_singleton_method(rb_cTime, "gm", time_s_mkutc, -1);
rb_define_singleton_method 2074 time.c             rb_define_singleton_method(rb_cTime, "local", time_s_mktime, -1);
rb_define_singleton_method 2075 time.c             rb_define_singleton_method(rb_cTime, "mktime", time_s_mktime, -1);
rb_define_singleton_method 2077 time.c             rb_define_singleton_method(rb_cTime, "times", time_s_times, 0);
rb_define_singleton_method 2140 time.c             rb_define_singleton_method(rb_cTime, "_load", time_load, 1);


rb_define_syslog_const

rb_define_syslog_const  269 ext/syslog/syslog.c     rb_define_syslog_const(LOG_PID);
rb_define_syslog_const  272 ext/syslog/syslog.c     rb_define_syslog_const(LOG_CONS);
rb_define_syslog_const  275 ext/syslog/syslog.c     rb_define_syslog_const(LOG_ODELAY); /* deprecated */
rb_define_syslog_const  278 ext/syslog/syslog.c     rb_define_syslog_const(LOG_NDELAY);
rb_define_syslog_const  281 ext/syslog/syslog.c     rb_define_syslog_const(LOG_NOWAIT); /* deprecated */
rb_define_syslog_const  284 ext/syslog/syslog.c     rb_define_syslog_const(LOG_PERROR);
rb_define_syslog_const  289 ext/syslog/syslog.c     rb_define_syslog_const(LOG_AUTH);
rb_define_syslog_const  292 ext/syslog/syslog.c     rb_define_syslog_const(LOG_AUTHPRIV);
rb_define_syslog_const  295 ext/syslog/syslog.c     rb_define_syslog_const(LOG_CONSOLE);
rb_define_syslog_const  298 ext/syslog/syslog.c     rb_define_syslog_const(LOG_CRON);
rb_define_syslog_const  301 ext/syslog/syslog.c     rb_define_syslog_const(LOG_DAEMON);
rb_define_syslog_const  304 ext/syslog/syslog.c     rb_define_syslog_const(LOG_FTP);
rb_define_syslog_const  307 ext/syslog/syslog.c     rb_define_syslog_const(LOG_KERN);
rb_define_syslog_const  310 ext/syslog/syslog.c     rb_define_syslog_const(LOG_LPR);
rb_define_syslog_const  313 ext/syslog/syslog.c     rb_define_syslog_const(LOG_MAIL);
rb_define_syslog_const  316 ext/syslog/syslog.c     rb_define_syslog_const(LOG_NEWS);
rb_define_syslog_const  319 ext/syslog/syslog.c    rb_define_syslog_const(LOG_NTP);
rb_define_syslog_const  322 ext/syslog/syslog.c     rb_define_syslog_const(LOG_SECURITY);
rb_define_syslog_const  325 ext/syslog/syslog.c     rb_define_syslog_const(LOG_SYSLOG);
rb_define_syslog_const  328 ext/syslog/syslog.c     rb_define_syslog_const(LOG_USER);
rb_define_syslog_const  331 ext/syslog/syslog.c     rb_define_syslog_const(LOG_UUCP);
rb_define_syslog_const  334 ext/syslog/syslog.c     rb_define_syslog_const(LOG_LOCAL0);
rb_define_syslog_const  337 ext/syslog/syslog.c     rb_define_syslog_const(LOG_LOCAL1);
rb_define_syslog_const  340 ext/syslog/syslog.c     rb_define_syslog_const(LOG_LOCAL2);
rb_define_syslog_const  343 ext/syslog/syslog.c     rb_define_syslog_const(LOG_LOCAL3);
rb_define_syslog_const  346 ext/syslog/syslog.c     rb_define_syslog_const(LOG_LOCAL4);
rb_define_syslog_const  349 ext/syslog/syslog.c     rb_define_syslog_const(LOG_LOCAL5);
rb_define_syslog_const  352 ext/syslog/syslog.c     rb_define_syslog_const(LOG_LOCAL6);
rb_define_syslog_const  355 ext/syslog/syslog.c     rb_define_syslog_const(LOG_LOCAL7);
rb_define_syslog_const  363 ext/syslog/syslog.c     rb_define_syslog_const(LOG_EMERG);
rb_define_syslog_const  367 ext/syslog/syslog.c     rb_define_syslog_const(LOG_ALERT);
rb_define_syslog_const  371 ext/syslog/syslog.c     rb_define_syslog_const(LOG_CRIT);
rb_define_syslog_const  375 ext/syslog/syslog.c     rb_define_syslog_const(LOG_ERR);
rb_define_syslog_const  379 ext/syslog/syslog.c     rb_define_syslog_const(LOG_WARNING);
rb_define_syslog_const  383 ext/syslog/syslog.c     rb_define_syslog_const(LOG_NOTICE);
rb_define_syslog_const  387 ext/syslog/syslog.c     rb_define_syslog_const(LOG_INFO);
rb_define_syslog_const  391 ext/syslog/syslog.c     rb_define_syslog_const(LOG_DEBUG);


rb_define_syslog_shortcut

rb_define_syslog_shortcut  364 ext/syslog/syslog.c     rb_define_syslog_shortcut(emerg);
rb_define_syslog_shortcut  368 ext/syslog/syslog.c     rb_define_syslog_shortcut(alert);
rb_define_syslog_shortcut  372 ext/syslog/syslog.c     rb_define_syslog_shortcut(crit);
rb_define_syslog_shortcut  376 ext/syslog/syslog.c     rb_define_syslog_shortcut(err);
rb_define_syslog_shortcut  380 ext/syslog/syslog.c     rb_define_syslog_shortcut(warning);
rb_define_syslog_shortcut  384 ext/syslog/syslog.c     rb_define_syslog_shortcut(notice);
rb_define_syslog_shortcut  388 ext/syslog/syslog.c     rb_define_syslog_shortcut(info);
rb_define_syslog_shortcut  392 ext/syslog/syslog.c     rb_define_syslog_shortcut(debug);


rb_define_variable

rb_define_variable 5561 io.c               rb_define_variable("$stdin", &rb_stdin);
rb_define_variable 1154 ruby.c             rb_define_variable("$DEBUG", &ruby_debug);
rb_define_variable 1155 ruby.c             rb_define_variable("$-d", &ruby_debug);
rb_define_variable  509 ruby.h         void rb_define_variable(const char*,VALUE*);
rb_define_variable 4293 string.c           rb_define_variable("$;", &rb_fs);
rb_define_variable 4294 string.c           rb_define_variable("$-F", &rb_fs);


rb_define_virtual_variable

rb_define_virtual_variable 7627 eval.c             rb_define_virtual_variable("$@", errat_getter, errat_setter);
rb_define_virtual_variable 7702 eval.c             rb_define_virtual_variable("$SAFE", safe_getter, safe_setter);
rb_define_virtual_variable 5495 io.c               rb_define_virtual_variable("$_", rb_lastline_get, rb_lastline_set);
rb_define_virtual_variable 5625 io.c               rb_define_virtual_variable("$-i", opt_i_get, opt_i_set);
rb_define_virtual_variable 3562 process.c          rb_define_virtual_variable("$$", get_pid, 0);
rb_define_virtual_variable 2218 re.c               rb_define_virtual_variable("$~", match_getter, match_setter);
rb_define_virtual_variable 2219 re.c               rb_define_virtual_variable("$&", last_match_getter, 0);
rb_define_virtual_variable 2220 re.c               rb_define_virtual_variable("$`", prematch_getter, 0);
rb_define_virtual_variable 2221 re.c               rb_define_virtual_variable("$'", postmatch_getter, 0);
rb_define_virtual_variable 2222 re.c               rb_define_virtual_variable("$+", last_paren_match_getter, 0);
rb_define_virtual_variable 2224 re.c               rb_define_virtual_variable("$=", ignorecase_getter, ignorecase_setter);
rb_define_virtual_variable 2225 re.c               rb_define_virtual_variable("$KCODE", kcode_getter, kcode_setter);
rb_define_virtual_variable 2226 re.c               rb_define_virtual_variable("$-K", kcode_getter, kcode_setter);
rb_define_virtual_variable 1153 ruby.c             rb_define_virtual_variable("$-W", opt_W_getter, 0);
rb_define_virtual_variable  510 ruby.h         void rb_define_virtual_variable(const char*,VALUE(*)(ANYARGS),void(*)(ANYARGS));


rb_deflate_addstr

rb_deflate_addstr   88 ext/zlib/zlib.c static VALUE rb_deflate_addstr _((VALUE, VALUE));
rb_deflate_addstr 3468 ext/zlib/zlib.c     rb_define_method(cDeflate, "<<", rb_deflate_addstr, 1);


rb_deflate_deflate

rb_deflate_deflate   87 ext/zlib/zlib.c static VALUE rb_deflate_deflate _((int, VALUE*, VALUE));
rb_deflate_deflate 3467 ext/zlib/zlib.c     rb_define_method(cDeflate, "deflate", rb_deflate_deflate, -1);


rb_deflate_flush

rb_deflate_flush   89 ext/zlib/zlib.c static VALUE rb_deflate_flush _((int, VALUE*, VALUE));
rb_deflate_flush 3469 ext/zlib/zlib.c     rb_define_method(cDeflate, "flush", rb_deflate_flush, -1);


rb_deflate_init_copy

rb_deflate_init_copy   83 ext/zlib/zlib.c static VALUE rb_deflate_init_copy _((VALUE, VALUE));
rb_deflate_init_copy 3466 ext/zlib/zlib.c     rb_define_method(cDeflate, "initialize_copy", rb_deflate_init_copy, 0);


rb_deflate_initialize

rb_deflate_initialize   82 ext/zlib/zlib.c static VALUE rb_deflate_initialize _((int, VALUE*, VALUE));
rb_deflate_initialize 3465 ext/zlib/zlib.c     rb_define_method(cDeflate, "initialize", rb_deflate_initialize, -1);


rb_deflate_params

rb_deflate_params   90 ext/zlib/zlib.c static VALUE rb_deflate_params _((VALUE, VALUE, VALUE));
rb_deflate_params 3470 ext/zlib/zlib.c     rb_define_method(cDeflate, "params", rb_deflate_params, 2);


rb_deflate_s_allocate

rb_deflate_s_allocate   81 ext/zlib/zlib.c static VALUE rb_deflate_s_allocate _((VALUE));
rb_deflate_s_allocate 3464 ext/zlib/zlib.c     rb_define_alloc_func(cDeflate, rb_deflate_s_allocate);


rb_deflate_s_deflate

rb_deflate_s_deflate   85 ext/zlib/zlib.c static VALUE rb_deflate_s_deflate _((int, VALUE*, VALUE));
rb_deflate_s_deflate 3463 ext/zlib/zlib.c     rb_define_singleton_method(cDeflate, "deflate", rb_deflate_s_deflate, -1);


rb_deflate_set_dictionary

rb_deflate_set_dictionary   91 ext/zlib/zlib.c static VALUE rb_deflate_set_dictionary _((VALUE, VALUE));
rb_deflate_set_dictionary 3471 ext/zlib/zlib.c     rb_define_method(cDeflate, "set_dictionary", rb_deflate_set_dictionary, 1);


rb_detach_process

rb_detach_process  303 ext/pty/pty.c      rb_detach_process(info->child_pid);
rb_detach_process  421 intern.h       VALUE rb_detach_process(int);
rb_detach_process  891 process.c          return rb_detach_process(NUM2INT(pid));


rb_digest_base_alloc

rb_digest_base_alloc   87 ext/digest/digest.c     volatile VALUE obj = rb_digest_base_alloc(klass);
rb_digest_base_alloc  106 ext/digest/digest.c     volatile VALUE obj = rb_digest_base_alloc(klass);
rb_digest_base_alloc  257 ext/digest/digest.c     rb_define_alloc_func(cDigest_Base, rb_digest_base_alloc);


rb_digest_base_digest

rb_digest_base_digest  235 ext/digest/digest.c 	str1 = rb_digest_base_digest(self);
rb_digest_base_digest  265 ext/digest/digest.c     rb_define_method(cDigest_Base, "digest", rb_digest_base_digest, 0);


rb_digest_base_hexdigest

rb_digest_base_hexdigest  237 ext/digest/digest.c 	str1 = rb_digest_base_hexdigest(self);
rb_digest_base_hexdigest  266 ext/digest/digest.c     rb_define_method(cDigest_Base, "hexdigest", rb_digest_base_hexdigest, 0);
rb_digest_base_hexdigest  267 ext/digest/digest.c     rb_define_method(cDigest_Base, "to_s", rb_digest_base_hexdigest, 0);


rb_digest_base_update

rb_digest_base_update  161 ext/digest/digest.c     if (!NIL_P(arg)) rb_digest_base_update(self, arg);
rb_digest_base_update  263 ext/digest/digest.c     rb_define_method(cDigest_Base, "update", rb_digest_base_update, 1);
rb_digest_base_update  264 ext/digest/digest.c     rb_define_method(cDigest_Base, "<<", rb_digest_base_update, 1);


rb_dlcfunc_call

rb_dlcfunc_call   502 ext/dl/cfunc.c     rb_define_method(rb_cDLCFunc, "call", rb_dlcfunc_call, 1);
rb_dlcfunc_call   503 ext/dl/cfunc.c     rb_define_method(rb_cDLCFunc, "[]",   rb_dlcfunc_call, 1);


rb_dlcfunc_inspect

rb_dlcfunc_inspect  511 ext/dl/cfunc.c     rb_define_method(rb_cDLCFunc, "inspect", rb_dlcfunc_inspect, 0);
rb_dlcfunc_inspect  512 ext/dl/cfunc.c     rb_define_method(rb_cDLCFunc, "to_s", rb_dlcfunc_inspect, 0);


rb_dlcfunc_new

rb_dlcfunc_new    241 ext/dl/cptr.c    return rb_dlcfunc_new(pdata->free, DLTYPE_VOID, "free<anonymous>", CFUNC_CDECL);
rb_dlcfunc_new    178 ext/dl/dl.h    VALUE rb_dlcfunc_new(void (*func)(), int dltype, const char * name, ID calltype);


rb_dlhandle_close

rb_dlhandle_close   90 ext/dl/handle.c     rb_ensure(rb_yield, self, rb_dlhandle_close, self);
rb_dlhandle_close  222 ext/dl/handle.c     rb_define_method(rb_cDLHandle, "close", rb_dlhandle_close, 0);


rb_dlhandle_sym

rb_dlhandle_sym   223 ext/dl/handle.c     rb_define_method(rb_cDLHandle, "sym",  rb_dlhandle_sym, 1);
rb_dlhandle_sym   224 ext/dl/handle.c     rb_define_method(rb_cDLHandle, "[]",  rb_dlhandle_sym,  1);


rb_dlptr2cptr

rb_dlptr2cptr     306 ext/dl/cptr.c    ptr1 = rb_dlptr2cptr(self);
rb_dlptr2cptr     307 ext/dl/cptr.c    ptr2 = rb_dlptr2cptr(other);
rb_dlptr2cptr     316 ext/dl/cptr.c    ptr1 = rb_dlptr2cptr(self);
rb_dlptr2cptr     317 ext/dl/cptr.c    ptr2 = rb_dlptr2cptr(other);
rb_dlptr2cptr     327 ext/dl/cptr.c    ptr = rb_dlptr2cptr(self);
rb_dlptr2cptr     339 ext/dl/cptr.c    ptr = rb_dlptr2cptr(self);
rb_dlptr2cptr     389 ext/dl/cptr.c  	    mem = rb_dlptr2cptr(arg2);


rb_dlptr_eql

rb_dlptr_eql      473 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "==", rb_dlptr_eql, 1);
rb_dlptr_eql      474 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "eql?", rb_dlptr_eql, 1);


rb_dlptr_malloc

rb_dlptr_malloc   168 ext/dl/cptr.c    obj = rb_dlptr_malloc(s,f);
rb_dlptr_malloc   181 ext/dl/dl.h    VALUE rb_dlptr_malloc(long size, freefunc_t func);


rb_dlptr_new

rb_dlptr_new       70 ext/dl/cptr.c    return rb_dlptr_new(ptr, size, func);
rb_dlptr_new      196 ext/dl/cptr.c    return rb_dlptr_new(*((void**)(data->ptr)),0,0);
rb_dlptr_new      205 ext/dl/cptr.c    return rb_dlptr_new(&(data->ptr),0,0);
rb_dlptr_new      330 ext/dl/cptr.c    return rb_dlptr_new((char *)ptr + num, size - num, 0);
rb_dlptr_new      342 ext/dl/cptr.c    return rb_dlptr_new((char *)ptr - num, size + num, 0);
rb_dlptr_new      429 ext/dl/cptr.c  	return rb_dlptr_new(fp, 0, NULL);
rb_dlptr_new      433 ext/dl/cptr.c          return rb_dlptr_new(ptr, RSTRING(val)->len, NULL);
rb_dlptr_new      445 ext/dl/cptr.c  	return rb_dlptr_new(NUM2PTR(rb_Integer(val)), 0, NULL);
rb_dlptr_new      482 ext/dl/cptr.c      rb_define_const(rb_mDL, "NULL", rb_dlptr_new(0, 0, 0));
rb_dlptr_new      179 ext/dl/dl.h    VALUE rb_dlptr_new(void *ptr, long size, freefunc_t func);


rb_dlptr_new2

rb_dlptr_new2      59 ext/dl/cptr.c    return rb_dlptr_new2(rb_cDLCPtr, ptr, size, func);
rb_dlptr_new2     180 ext/dl/dl.h    VALUE rb_dlptr_new2(VALUE klass, void *ptr, long size, freefunc_t func);


rb_dlptr_ptr

rb_dlptr_ptr      464 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "ptr",   rb_dlptr_ptr, 0);
rb_dlptr_ptr      465 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "+@", rb_dlptr_ptr, 0);


rb_dlptr_ref

rb_dlptr_ref      466 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "ref",   rb_dlptr_ref, 0);
rb_dlptr_ref      467 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "-@", rb_dlptr_ref, 0);


rb_dlptr_s_to_ptr

rb_dlptr_s_to_ptr  457 ext/dl/cptr.c      rb_define_singleton_method(rb_cDLCPtr, "to_ptr", rb_dlptr_s_to_ptr, 1);
rb_dlptr_s_to_ptr  458 ext/dl/cptr.c      rb_define_singleton_method(rb_cDLCPtr, "[]", rb_dlptr_s_to_ptr, 1);


rb_dlptr_size

rb_dlptr_size     479 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "size", rb_dlptr_size, -1);
rb_dlptr_size     480 ext/dl/cptr.c      rb_define_method(rb_cDLCPtr, "size=", rb_dlptr_size, -1);


rb_dvar_curr

rb_dvar_curr      216 intern.h       VALUE rb_dvar_curr(ID);
rb_dvar_curr     7231 parse.y        	if (rb_dvar_curr(id)) {


rb_dvar_defined

rb_dvar_defined   215 intern.h       VALUE rb_dvar_defined(ID);
rb_dvar_defined  5422 parse.y            return (dyna_in_block() && rb_dvar_defined(id)) || local_id(id);
rb_dvar_defined  7186 parse.y        	if (dyna_in_block() && rb_dvar_defined(id)) return NEW_DVAR(id);
rb_dvar_defined  7234 parse.y        	else if (rb_dvar_defined(id)) {
rb_dvar_defined  7269 parse.y            if (rb_dvar_defined(name) || local_id(name)) {


rb_dvar_push

rb_dvar_push     11886 eval.c         		rb_dvar_push(id, Qfalse);
rb_dvar_push     11889 eval.c             rb_dvar_push('_', Qnil);
rb_dvar_push     11890 eval.c             rb_dvar_push('~', Qnil);
rb_dvar_push      219 intern.h       void rb_dvar_push(ID, VALUE);
rb_dvar_push     7997 parse.y        	rb_dvar_push(0, (VALUE)ruby_dyna_vars);
rb_dvar_push     8134 parse.y            rb_dvar_push(id, Qnil);
rb_dvar_push     8166 parse.y            rb_dvar_push(0, 0);


rb_dvar_ref

rb_dvar_ref      3517 eval.c         	result = rb_dvar_ref(node->nd_vid);
rb_dvar_ref       217 intern.h       VALUE rb_dvar_ref(ID);


rb_each

rb_each            71 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? grep_iter_i : grep_i, (VALUE)arg);
rb_each           120 enum.c         	rb_iterate(rb_each, obj, count_i, (VALUE)&args);
rb_each           126 enum.c         	rb_iterate(rb_each, obj, count_iter_i, (VALUE)&n);
rb_each           164 enum.c             rb_iterate(rb_each, obj, find_i, (VALUE)&memo);
rb_each           204 enum.c             rb_iterate(rb_each, obj, find_all_i, ary);
rb_each           237 enum.c             rb_iterate(rb_each, obj, reject_i, ary);
rb_each           279 enum.c             rb_iterate(rb_each, obj, collect_i, ary);
rb_each           299 enum.c             rb_iterate(rb_each, obj, collect_all, ary);
rb_each           354 enum.c             rb_iterate(rb_each, obj, inject_i, (VALUE)&memo);
rb_each           392 enum.c             rb_iterate(rb_each, obj, partition_i, (VALUE)ary);
rb_each           528 enum.c             rb_iterate(rb_each, obj, sort_by_i, ary);
rb_each           584 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? all_iter_i : all_i, (VALUE)&result);
rb_each           631 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? any_iter_i : any_i, (VALUE)&result);
rb_each           684 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? one_iter_i : one_i, (VALUE)&result);
rb_each           729 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? none_iter_i : none_i, (VALUE)&result);
rb_each           787 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? min_ii : min_i, (VALUE)&result);
rb_each           845 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? max_ii : max_i, (VALUE)&result);
rb_each           887 enum.c             rb_iterate(rb_each, obj, min_by_i, (VALUE)memo);
rb_each           928 enum.c             rb_iterate(rb_each, obj, max_by_i, (VALUE)memo);
rb_each           962 enum.c             rb_iterate(rb_each, obj, member_i, (VALUE)memo);
rb_each           996 enum.c             rb_iterate(rb_each, obj, each_with_index_i, (VALUE)&memo);
rb_each          1060 enum.c             rb_iterate(rb_each, obj, zip_i, (VALUE)memo);
rb_each           171 enumerator.c       rb_iterate(rb_each, obj, each_slice_i, (VALUE)args);
rb_each           238 enumerator.c       rb_iterate(rb_each, obj, each_cons_i, (VALUE)args);
rb_each           525 ext/iconv/iconv.c 	rb_iterate(rb_each, options, get_iconv_opt_i, (VALUE)opt);
rb_each           681 ext/openssl/ossl_asn1.c     rb_iterate(rb_each, enumerable, join_der_i, str);
rb_each           249 ext/openssl/ossl_config.c     rb_iterate(rb_each, hash, set_conf_section_i, (VALUE)arg);
rb_each           586 ext/openssl/ossl_pkcs7.c     rb_iterate(rb_each, ary, ossl_pkcs7_set_certs_i, self);
rb_each           626 ext/openssl/ossl_pkcs7.c     rb_iterate(rb_each, ary, ossl_pkcs7_set_crls_i, self);
rb_each           327 ext/openssl/ossl_ssl.c 	rb_iterate(rb_each, val, ossl_sslctx_add_extra_chain_cert_i, self);
rb_each           128 ext/openssl/ossl_x509name.c 	    rb_iterate(rb_each, tmp, ossl_x509name_init_i, args);
rb_each           574 ext/syck/rubyext.c                             rb_iterate( rb_each, tmp, syck_merge_i, dup );
rb_each          1009 ext/syck/rubyext.c                             rb_iterate( rb_each, v, syck_merge_i, dup );
rb_each          1166 ext/syck/rubyext.c                     rb_iterate( rb_each, val, syck_set_ivars, obj );
rb_each          2221 ext/win32ole/win32ole.c         rb_iterate(rb_each, param, hash2named_arg, (VALUE)&op);
rb_each          5244 io.c           	    rb_iterate(rb_each, current_file, rb_yield, 0);
rb_each           571 ruby.h         VALUE rb_each(VALUE);


rb_ensure

rb_ensure        1552 array.c        	rb_ensure(sort_internal, ary, sort_unlock, ary);
rb_ensure         432 dir.c          	return rb_ensure(rb_yield, dir, dir_close, dir);
rb_ensure         784 dir.c          	return rb_ensure(chdir_yield, (VALUE)&args, chdir_restore, (VALUE)&args);
rb_ensure        1663 dir.c              rb_ensure(dir_each, dir, dir_close, dir);
rb_ensure        1684 dir.c              return rb_ensure(rb_Array, dir, dir_close, dir);
rb_ensure         166 ext/dbm/dbm.c          return rb_ensure(rb_yield, obj, fdbm_close, obj);
rb_ensure          90 ext/dl/handle.c     rb_ensure(rb_yield, self, rb_dlhandle_close, self);
rb_ensure         222 ext/etc/etc.c  	rb_ensure(passwd_iterate, 0, passwd_ensure, 0);
rb_ensure         427 ext/etc/etc.c  	rb_ensure(group_iterate, 0, group_ensure, 0);
rb_ensure         176 ext/gdbm/gdbm.c         return rb_ensure(rb_yield, obj, fgdbm_close, obj);
rb_ensure         586 ext/iconv/iconv.c 	return rb_ensure(rb_yield, self, (VALUE(*)())iconv_finish, self);
rb_ensure         643 ext/iconv/iconv.c     return rb_ensure(iconv_s_convert, (VALUE)&arg, iconv_free, ICONV2VALUE(arg.cd));
rb_ensure         664 ext/iconv/iconv.c     return rb_ensure(iconv_s_convert, (VALUE)&arg, iconv_free, ICONV2VALUE(arg.cd));
rb_ensure         756 ext/iconv/iconv.c     return rb_ensure(iconv_init_state, cd, iconv_free, cd);
rb_ensure         125 ext/io/wait/wait.c     i = (int)rb_ensure(wait_readable, (VALUE)&arg,
rb_ensure         220 ext/openssl/ossl.c 	    ret = rb_ensure(ossl_call_verify_cb_proc, (VALUE)&args,
rb_ensure         445 ext/pty/pty.c  	rb_ensure(rb_yield, res, pty_finalize_syswait, (VALUE)&thinfo);
rb_ensure         144 ext/sdbm/init.c         return rb_ensure(rb_yield, obj, fsdbm_close, obj);
rb_ensure         989 ext/socket/socket.c     return (int)rb_ensure(try_wait_connectable, (VALUE)&arg,
rb_ensure        1238 ext/socket/socket.c     return rb_ensure(init_inetsock_internal, (VALUE)&arg,
rb_ensure        1351 ext/socket/socket.c     return rb_ensure(make_hostent_internal, (VALUE)&arg,
rb_ensure        1625 ext/socket/socket.c     ret = rb_ensure(udp_connect_internal, (VALUE)&arg,
rb_ensure         203 ext/stringio/stringio.c     return rb_ensure(rb_yield, obj, strio_finalize, obj);
rb_ensure          95 ext/syslog/syslog.c         rb_ensure(rb_yield, self, mSyslog_close, self);
rb_ensure        1774 ext/tk/tcltklib.c     return rb_ensure(lib_eventloop_main, (VALUE)args,
rb_ensure        1777 ext/tk/tcltklib.c     return rb_ensure(lib_eventloop_main_core, (VALUE)args,
rb_ensure        1914 ext/tk/tcltklib.c     return rb_ensure(lib_watchdog_core, check_rootwidget,
rb_ensure        1974 ext/tk/tcltklib.c     return rb_ensure(_thread_call_proc_core, (VALUE)q,
rb_ensure        2849 ext/win32ole/win32ole.c     rb_ensure(ole_each_sub, (VALUE)pEnum, ole_ienum_free, (VALUE)pEnum);
rb_ensure        1237 ext/zlib/zlib.c     dst = rb_ensure(deflate_run, (VALUE)args, zstream_end, (VALUE)&z);
rb_ensure        1497 ext/zlib/zlib.c     dst = rb_ensure(inflate_run, (VALUE)args, zstream_end, (VALUE)&z);
rb_ensure        2404 ext/zlib/zlib.c 	return rb_ensure(rb_yield, obj, gzfile_ensure_close, obj);
rb_ensure         196 hash.c             rb_ensure(hash_foreach_call, (VALUE)&arg, hash_foreach_ensure, hash);
rb_ensure         487 io.c           	rb_ensure(wait_readable, (VALUE)&rfds,
rb_ensure         530 io.c           	rb_ensure(wait_writable, (VALUE)&wfds,
rb_ensure        3051 io.c           	return rb_ensure(rb_yield, port, io_close, port);
rb_ensure        3104 io.c           	return rb_ensure(rb_yield, io, io_close, io);
rb_ensure        3238 io.c           		return rb_ensure(rb_yield, io, io_close, io);
rb_ensure        4561 io.c               return rb_ensure(select_call, (VALUE)&args, select_end, (VALUE)&args);
rb_ensure        4967 io.c               return rb_ensure(io_s_foreach, (VALUE)&arg, rb_io_close, arg.io);
rb_ensure        5000 io.c               return rb_ensure(io_s_readlines, (VALUE)&arg, rb_io_close, arg.io);
rb_ensure        5036 io.c               return rb_ensure(io_s_read, (VALUE)&arg, rb_io_close, arg.io);
rb_ensure         727 marshal.c          rb_ensure(dump, (VALUE)&c_arg, dump_ensure, (VALUE)&arg);
rb_ensure        1355 marshal.c          v = rb_ensure(load, (VALUE)&arg, load_ensure, (VALUE)&arg);
rb_ensure        9206 parse.y            rb_ensure(ripper_parse0, self, ripper_ensure, self);
rb_ensure        3353 process.c      	    return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, SAVED_USER_ID);
rb_ensure        3361 process.c      	    return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, euid);
rb_ensure        3395 process.c      	return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, obj);
rb_ensure        3462 process.c      	    return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, SAVED_GROUP_ID);
rb_ensure        3470 process.c      	    return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, egid);
rb_ensure        3503 process.c      	return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, obj);
rb_ensure        1039 regexec.c        rb_ensure(trap_exec, arg, trap_ensure, arg);
rb_ensure         580 ruby.h         VALUE rb_ensure(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE);
rb_ensure         784 signal.c           return rb_ensure(trap, (VALUE)&arg, trap_ensure, (VALUE)&arg);
rb_ensure         663 variable.c     	rb_ensure(trace_ev, (VALUE)&trace, trace_en, (VALUE)var);


rb_enumeratorize

rb_enumeratorize  113 enumerator.c       return rb_enumeratorize(obj, meth, argc, argv);
rb_enumeratorize  126 enumerator.c       return rb_enumeratorize(obj, sym_each_with_index, 0, 0);
rb_enumeratorize  189 enumerator.c       return rb_enumeratorize(obj, sym_each_slice, 1, &n);
rb_enumeratorize  253 enumerator.c       return rb_enumeratorize(obj, sym_each_cons, 1, &n);
rb_enumeratorize  144 intern.h       VALUE rb_enumeratorize(VALUE, VALUE, int, VALUE *);
rb_enumeratorize  147 intern.h       	    return rb_enumeratorize(obj, ID2SYM(rb_frame_this_func()),	\


rb_env_path_tainted

rb_env_path_tainted 1585 hash.c         	if (strcasecmp(nam, PATH_ENV) == 0 && !rb_env_path_tainted())
rb_env_path_tainted 1587 hash.c         	if (strcmp(nam, PATH_ENV) == 0 && !rb_env_path_tainted())
rb_env_path_tainted 1627 hash.c             if (strcasecmp(nam, PATH_ENV) == 0 && !rb_env_path_tainted())
rb_env_path_tainted 1629 hash.c             if (strcmp(nam, PATH_ENV) == 0 && !rb_env_path_tainted())
rb_env_path_tainted  325 intern.h       int rb_env_path_tainted(void);
rb_env_path_tainted  911 process.c          if (rb_env_path_tainted()) {


rb_eof_error

rb_eof_error      643 ext/openssl/ossl_ssl.c 		rb_eof_error();
rb_eof_error      651 ext/openssl/ossl_ssl.c 		if(ERR_peek_error() == 0 && nread == 0) rb_eof_error();
rb_eof_error      780 ext/stringio/stringio.c     if (NIL_P(c)) rb_eof_error();
rb_eof_error      930 ext/stringio/stringio.c     if (NIL_P(line)) rb_eof_error();
rb_eof_error     1159 ext/stringio/stringio.c 	rb_eof_error();
rb_eof_error     1356 io.c                   rb_eof_error();
rb_eof_error     1746 io.c           	rb_eof_error();
rb_eof_error     1920 io.c           	rb_eof_error();
rb_eof_error     2356 io.c           	rb_eof_error();
rb_eof_error     4314 io.c               if (!next_argv()) rb_eof_error();
rb_eof_error     4318 io.c           	rb_eof_error();
rb_eof_error     5174 io.c                   rb_eof_error();
rb_eof_error     5186 io.c                       rb_eof_error();
rb_eof_error     5191 io.c                       rb_eof_error();
rb_eof_error     5229 io.c           	rb_eof_error();
rb_eof_error      759 marshal.c      	if (NIL_P(v)) rb_eof_error();


rb_eql

rb_eql           2374 array.c        	if (!rb_eql(rb_ary_elt(ary1, i), rb_ary_elt(ary2, i)))
rb_eql             41 hash.c             return (VALUE)rb_eql(args[0], args[1]);
rb_eql            362 intern.h       int rb_eql(VALUE, VALUE);
rb_eql            177 range.c            if (!rb_eql(rb_ivar_get(range, id_beg), rb_ivar_get(obj, id_beg)))
rb_eql            179 range.c            if (!rb_eql(rb_ivar_get(range, id_end), rb_ivar_get(obj, id_end)))
rb_eql            785 struct.c       	if (!rb_eql(RSTRUCT(s)->ptr[i], RSTRUCT(s2)->ptr[i])) return Qfalse;


rb_equal

rb_equal          906 array.c        	    if (rb_equal(RARRAY(ary)->ptr[i], val))
rb_equal          946 array.c        	    if (rb_equal(RARRAY(ary)->ptr[i], val))
rb_equal         1739 array.c        	if (rb_equal(e, item)) continue;
rb_equal         2287 array.c        	    rb_equal(RARRAY(v)->ptr[0], key))
rb_equal         2317 array.c        	    rb_equal(RARRAY(v)->ptr[1], value))
rb_equal         2347 array.c        	return rb_equal(ary2, ary1);
rb_equal         2351 array.c        	if (!rb_equal(rb_ary_elt(ary1, i), rb_ary_elt(ary2, i)))
rb_equal         2431 array.c        	if (rb_equal(RARRAY(ary)->ptr[i], item)) {
rb_equal          941 bignum.c       	return rb_equal(y, x);
rb_equal           79 enum.c             if (rb_equal(i, arg[0])) {
rb_equal          935 enum.c             if (rb_equal(item, memo[0])) {
rb_equal          488 error.c            if (!rb_equal(rb_attr_get(exc, id_mesg), rb_attr_get(obj, id_mesg)))
rb_equal          490 error.c            if (!rb_equal(exc_backtrace(exc), exc_backtrace(obj)))
rb_equal          670 error.c        	if (!rb_equal(ptr1[i], ptr2[i]))
rb_equal          908 error.c            if (FIXNUM_P(num) ? num == e : rb_equal(num, e))
rb_equal          540 hash.c             if (rb_equal(value, args[0])) {
rb_equal         1288 hash.c             if (rb_equal(value, data[1])) {
rb_equal         1334 hash.c             if (!rb_equal(val1, val2)) {
rb_equal         1351 hash.c         	return rb_equal(hash2, hash1);
rb_equal         1356 hash.c         	if (!(rb_equal(RHASH(hash1)->ifnone, RHASH(hash2)->ifnone) &&
rb_equal          341 numeric.c          if ((!rb_equal(z, INT2FIX(0))) &&
rb_equal          410 numeric.c          if (rb_equal(num, INT2FIX(0))) {
rb_equal          761 numeric.c          return rb_equal(x, y);
rb_equal         1396 numeric.c      	if (rb_equal(step, INT2FIX(0))) {
rb_equal         2393 object.c           rb_define_method(rb_mKernel, "===", rb_equal, 1);
rb_equal          327 process.c          return rb_equal(pst_to_i(st1), st2);
rb_equal          122 range.c            if (!rb_equal(rb_ivar_get(range, id_beg), rb_ivar_get(obj, id_beg)))
rb_equal          124 range.c            if (!rb_equal(rb_ivar_get(range, id_end), rb_ivar_get(obj, id_end)))
rb_equal          323 range.c        	    if (rb_equal(step, INT2FIX(0))) rb_raise(rb_eArgError, "step can't be 0");
rb_equal          552 ruby.h         VALUE rb_equal(VALUE,VALUE);
rb_equal          854 string.c       	return rb_equal(str2, str1);
rb_equal          737 struct.c       	if (!rb_equal(RSTRUCT(s)->ptr[i], RSTRUCT(s2)->ptr[i])) return Qfalse;


rb_error_frozen

rb_error_frozen    47 array.c            if (OBJ_FROZEN(ary)) rb_error_frozen("array");
rb_error_frozen  1095 error.c            if (OBJ_FROZEN(obj)) rb_error_frozen(rb_obj_classname(obj));
rb_error_frozen   401 eval.c             if (OBJ_FROZEN(klass)) rb_error_frozen("class/module");
rb_error_frozen   527 eval.c             if (OBJ_FROZEN(klass)) rb_error_frozen("class/module");
rb_error_frozen  1904 eval.c         	rb_error_frozen(desc);
rb_error_frozen  3785 eval.c         	    if (OBJ_FROZEN(recv)) rb_error_frozen("object");
rb_error_frozen  12371 eval.c             if (OBJ_FROZEN(thread)) rb_error_frozen("thread locals");
rb_error_frozen   286 ext/dbm/dbm.c      if (OBJ_FROZEN(obj)) rb_error_frozen("DBM");
rb_error_frozen   381 ext/gdbm/gdbm.c     if (OBJ_FROZEN(obj)) rb_error_frozen("GDBM");
rb_error_frozen   263 ext/sdbm/init.c     if (OBJ_FROZEN(obj)) rb_error_frozen("SDBM");
rb_error_frozen   223 hash.c             if (OBJ_FROZEN(hash)) rb_error_frozen("hash");
rb_error_frozen   593 object.c       	    rb_error_frozen("object");
rb_error_frozen   614 object.c       	    rb_error_frozen("object");
rb_error_frozen   424 string.c           if (OBJ_FROZEN(str)) rb_error_frozen("string");
rb_error_frozen   144 struct.c           if (OBJ_FROZEN(s)) rb_error_frozen("Struct");
rb_error_frozen   954 variable.c         if (OBJ_FROZEN(obj)) rb_error_frozen("object");
rb_error_frozen  1071 variable.c         if (OBJ_FROZEN(obj)) rb_error_frozen("object");
rb_error_frozen  1347 variable.c         if (OBJ_FROZEN(mod)) rb_error_frozen("class/module");
rb_error_frozen  1490 variable.c     	    rb_error_frozen("module");
rb_error_frozen  1493 variable.c     	    rb_error_frozen("class");
rb_error_frozen  1669 variable.c         if (OBJ_FROZEN(mod)) rb_error_frozen("class/module");


rb_eval

rb_eval          1019 eval.c         static VALUE rb_eval(VALUE,NODE*);
rb_eval          1333 eval.c         	rb_eval(self, node->nd_head);
rb_eval          1337 eval.c             return rb_eval(self, node);
rb_eval          2125 eval.c         		argv[i] = rb_eval(self,n->nd_head);\
rb_eval          2135 eval.c         	VALUE args = rb_eval(self,n);\
rb_eval          2222 eval.c         	val = rb_eval(self, node->nd_recv);
rb_eval          2316 eval.c         	val = rb_eval(self, node->nd_recv);
rb_eval          2355 eval.c         	    rb_eval(self, node);
rb_eval          2656 eval.c         	VALUE c = rb_eval(self, cpath->nd_head);
rb_eval          2728 eval.c         	    result = rb_eval(self, node);
rb_eval          2754 eval.c         	    VALUE l = rb_eval(self,node->nd_recv);
rb_eval          2755 eval.c         	    VALUE r = rb_eval(self,node->nd_value);
rb_eval          2763 eval.c         	    VALUE r = rb_eval(self,node->nd_recv);
rb_eval          2764 eval.c         	    VALUE l = rb_eval(self,node->nd_value);
rb_eval          2782 eval.c         		rb_eval(self, node->nd_body);
rb_eval          2820 eval.c         	if (RTEST(rb_eval(self, node->nd_cond))) {
rb_eval          2839 eval.c         		    VALUE v = rb_eval(self, tag->nd_head->nd_head);
rb_eval          2852 eval.c         		if (RTEST(rb_eval(self, tag->nd_head))) {
rb_eval          2866 eval.c         	    val = rb_eval(self, node->nd_head);
rb_eval          2880 eval.c         			VALUE v = rb_eval(self, tag->nd_head->nd_head);
rb_eval          2893 eval.c         		    if (RTEST(rb_funcall2(rb_eval(self, tag->nd_head), eqq, 1, &val))) {
rb_eval          2909 eval.c         	    if (node->nd_state && !RTEST(rb_eval(self, node->nd_cond)))
rb_eval          2913 eval.c         		rb_eval(self, node->nd_body);
rb_eval          2916 eval.c         	    } while (RTEST(rb_eval(self, node->nd_cond)));
rb_eval          2944 eval.c         	    if (node->nd_state && RTEST(rb_eval(self, node->nd_cond)))
rb_eval          2948 eval.c         		rb_eval(self, node->nd_body);
rb_eval          2951 eval.c         	    } while (!RTEST(rb_eval(self, node->nd_cond)));
rb_eval          3002 eval.c         		    result = rb_eval(self, node->nd_iter);
rb_eval          3013 eval.c         		    recv = rb_eval(self, node->nd_iter);
rb_eval          3041 eval.c         	break_jump(rb_eval(self, node->nd_stts));
rb_eval          3046 eval.c         	return_value(rb_eval(self, node->nd_stts));
rb_eval          3061 eval.c         	result = splat_value(rb_eval(self, node->nd_head));
rb_eval          3065 eval.c         	result = rb_ary_to_ary(rb_eval(self, node->nd_head));
rb_eval          3069 eval.c         	result = avalue_splat(rb_eval(self, node->nd_head));
rb_eval          3075 eval.c         	    result = rb_eval(self, node->nd_head);
rb_eval          3093 eval.c         		result = rb_eval(self, node->nd_head);
rb_eval          3117 eval.c         			result = rb_eval(self, resq->nd_body);
rb_eval          3142 eval.c         	    result = rb_eval(self, node->nd_head);
rb_eval          3149 eval.c         	    rb_eval(self, node->nd_ensr);
rb_eval          3157 eval.c         	result = rb_eval(self, node->nd_1st);
rb_eval          3163 eval.c         	result = rb_eval(self, node->nd_1st);
rb_eval          3169 eval.c         	if (RTEST(rb_eval(self, node->nd_body))) result = Qfalse;
rb_eval          3176 eval.c         	    VALUE beg = rb_eval(self, node->nd_beg);
rb_eval          3177 eval.c         	    VALUE end = rb_eval(self, node->nd_end);
rb_eval          3187 eval.c         		if (RTEST(rb_eval(self, node->nd_beg))) {
rb_eval          3188 eval.c         		    *flip = RTEST(rb_eval(self, node->nd_end))?Qfalse:Qtrue;
rb_eval          3196 eval.c         		if (RTEST(rb_eval(self, node->nd_end))) {
rb_eval          3209 eval.c         		result = RTEST(rb_eval(self, node->nd_beg)) ? Qtrue : Qfalse;
rb_eval          3213 eval.c         		if (RTEST(rb_eval(self, node->nd_end))) {
rb_eval          3222 eval.c         	return_jump(rb_eval(self, node->nd_stts));
rb_eval          3227 eval.c         	    VALUE args = rb_eval(self, node->nd_head);
rb_eval          3228 eval.c         	    result = rb_ary_concat(args, splat_value(rb_eval(self, node->nd_body)));
rb_eval          3234 eval.c         	    VALUE args = rb_ary_dup(rb_eval(self, node->nd_head));
rb_eval          3235 eval.c         	    result = rb_ary_push(args, rb_eval(self, node->nd_body));
rb_eval          3252 eval.c         		recv = rb_eval(self, node->nd_recv);
rb_eval          3272 eval.c         	    recv = rb_eval(self, node->nd_recv);
rb_eval          3372 eval.c         		result = rb_eval(self, node->nd_next);
rb_eval          3390 eval.c         	    recv = rb_eval(self, node->nd_recv);
rb_eval          3397 eval.c         		val = rb_eval(self, rval);
rb_eval          3401 eval.c         		val = rb_eval(self, rval);
rb_eval          3404 eval.c         		val = rb_funcall(val, node->nd_mid, 1, rb_eval(self, rval));
rb_eval          3417 eval.c         	    recv = rb_eval(self, node->nd_recv);
rb_eval          3422 eval.c         		val = rb_eval(self, node->nd_value);
rb_eval          3426 eval.c         		val = rb_eval(self, node->nd_value);
rb_eval          3430 eval.c         				 rb_eval(self, node->nd_value));
rb_eval          3439 eval.c         	result = rb_eval(self, node->nd_head);
rb_eval          3446 eval.c         	    !RTEST(result = rb_eval(self, node->nd_head))) {
rb_eval          3453 eval.c         	result = massign(self, node, rb_eval(self, node->nd_value), 0);
rb_eval          3459 eval.c         	result = rb_eval(self, node->nd_value);
rb_eval          3464 eval.c         	result = rb_eval(self, node->nd_value);
rb_eval          3469 eval.c         	result = rb_eval(self, node->nd_value);
rb_eval          3474 eval.c         	result = rb_eval(self, node->nd_value);
rb_eval          3479 eval.c         	result = rb_eval(self, node->nd_value);
rb_eval          3484 eval.c         	result = rb_eval(self, node->nd_value);
rb_eval          3500 eval.c         	result = rb_eval(self, node->nd_value);
rb_eval          3505 eval.c         	result = rb_eval(self, node->nd_value);
rb_eval          3552 eval.c         	    klass = rb_eval(self, node->nd_head);
rb_eval          3606 eval.c         		key = rb_eval(self, list->nd_head);
rb_eval          3610 eval.c         		val = rb_eval(self, list->nd_head);
rb_eval          3630 eval.c         		RARRAY(ary)->ptr[i++] = rb_eval(self, node->nd_head);
rb_eval          3646 eval.c         		RARRAY(val)->ptr[i++] = rb_eval(self, node->nd_head);
rb_eval          3659 eval.c         	result = rb_obj_as_string(rb_eval(self, node->nd_body));
rb_eval          3679 eval.c         			str2 = rb_eval(self, list->nd_head);
rb_eval          3771 eval.c         	    VALUE recv = rb_eval(self, node->nd_recv);
rb_eval          3806 eval.c         	rb_undef(ruby_class, rb_to_id(rb_eval(self, node->u2.node)));
rb_eval          3814 eval.c         	rb_alias(ruby_class, rb_to_id(rb_eval(self, node->u1.node)),
rb_eval          3815 eval.c         		             rb_to_id(rb_eval(self, node->u2.node)));
rb_eval          3837 eval.c         	       super = rb_eval(self, node->nd_super);
rb_eval          3918 eval.c         	    result = rb_eval(self, node->nd_recv);
rb_eval          3993 eval.c         	result = rb_eval(ruby_cbase, node->nd_next);
rb_eval          4821 eval.c         	    result = rb_eval(self, node);
rb_eval          5073 eval.c         		recv = rb_eval(self, lhs->nd_recv);
rb_eval          5086 eval.c         		args = rb_eval(self, lhs->nd_args);
rb_eval          5554 eval.c         	    rb_eval(recv, opt);
rb_eval          5724 eval.c         		result = rb_eval(recv, body);
rb_eval          8615 eval.c             return rb_eval(arg->self, arg->iter);
rb_eval          8625 eval.c         			 (VALUE)&arg, rb_eval(self, node->nd_body));


rb_eval_cmd

rb_eval_cmd      9831 eval.c             return rb_eval_cmd(p[0], p[1], (int)p[2]);
rb_eval_cmd        84 ext/tk/tkutil/tkutil.c     return rb_eval_cmd(cmd, rest, 0);
rb_eval_cmd      1765 gc.c               rb_eval_cmd(args[0], args[1], (int)args[2]);
rb_eval_cmd       221 intern.h       VALUE rb_eval_cmd(VALUE, VALUE, int);
rb_eval_cmd       523 signal.c       	rb_eval_cmd(trap_exit, rb_ary_new3(1, INT2FIX(0)), trap_list[0].safe);
rb_eval_cmd       490 variable.c         rb_eval_cmd(cmd, rb_ary_new3(1, val), 0);


rb_eval_string

rb_eval_string   1587 eval.c             return rb_protect((VALUE (*)(VALUE))rb_eval_string, (VALUE)str, state);
rb_eval_string   2458 ext/tk/tcltklib.c     code = tcl_protect(interp, rb_eval_string, (VALUE)arg);
rb_eval_string    538 ruby.h         VALUE rb_eval_string(const char*);


rb_eval_string_protect

rb_eval_string_protect 1609 eval.c             val = rb_eval_string_protect(str, &status);
rb_eval_string_protect  539 ruby.h         VALUE rb_eval_string_protect(const char*, int*);


rb_event_hook_t

rb_event_hook_t  1051 eval.c         static rb_event_hook_t *event_hooks;
rb_event_hook_t  1055 eval.c         	rb_event_hook_t *hook; \
rb_event_hook_t  2383 eval.c             rb_event_hook_t *hook;
rb_event_hook_t  2385 eval.c             hook = ALLOC(rb_event_hook_t);
rb_event_hook_t  2395 eval.c             rb_event_hook_t *prev, *hook;
rb_event_hook_t  2463 eval.c             rb_event_hook_t *hook;


rb_event_t

rb_event_t       1047 eval.c             rb_event_t events;
rb_event_t       1065 eval.c         static void call_trace_func(rb_event_t,NODE*,VALUE,ID,VALUE);
rb_event_t       2381 eval.c         rb_add_event_hook(rb_event_hook_func_t func, rb_event_t events)
rb_event_t       2484 eval.c         get_event_name(rb_event_t event)
rb_event_t       2509 eval.c         call_trace_func(rb_event_t event, NODE *node, VALUE self, ID id, VALUE klass /* OK */)
rb_event_t        389 node.h         void rb_add_event_hook(rb_event_hook_func_t,rb_event_t);


rb_exc_new

rb_exc_new        277 error.c            return rb_exc_new(etype, s, strlen(s));
rb_exc_new       4351 eval.c         	mesg = rb_exc_new(rb_eRuntimeError, 0, 0);
rb_exc_new        310 ext/openssl/ossl.c     rb_exc_raise(rb_exc_new(exc, buf, len));
rb_exc_new        152 intern.h       VALUE rb_exc_new(VALUE, const char*, long);


rb_exc_new2

rb_exc_new2      1008 error.c            rb_exc_raise(rb_exc_new2(exc, buf));
rb_exc_new2      1020 error.c            rb_exc_raise(rb_exc_new2(rb_eLoadError, buf));
rb_exc_new2      1042 error.c            rb_exc_fatal(rb_exc_new2(rb_eFatal, buf));
rb_exc_new2      1477 error.c        	    ruby_errinfo = rb_exc_new2(rb_eSyntaxError, s);
rb_exc_new2      1629 eval.c             VALUE exc = rb_exc_new2(rb_eLocalJumpError, mesg);
rb_exc_new2      9386 eval.c             exception_error = rb_exc_new2(rb_eFatal, "exception reentered");
rb_exc_new2      9390 eval.c             sysstack_error = rb_exc_new2(rb_eSysStackError, "stack level too deep");
rb_exc_new2      10367 eval.c         	    VALUE exc = rb_exc_new2(rb_eIOError, "stream closed");
rb_exc_new2      10392 eval.c             e = rb_exc_new2(rb_eFatal, msg);
rb_exc_new2      11798 eval.c         		th->errinfo = rb_exc_new2(rb_eSecurityError, buf);
rb_exc_new2       143 ext/pty/pty.c      exc = rb_exc_new2(eChildExited, buf);
rb_exc_new2       657 ext/tk/tcltklib.c     einfo = rb_exc_new2(exc, buf);
rb_exc_new2       711 ext/tk/tcltklib.c             return rb_exc_new2(rb_eLoadError,
rb_exc_new2       732 ext/tk/tcltklib.c             return rb_exc_new2(rb_eLoadError,
rb_exc_new2       751 ext/tk/tcltklib.c         return rb_exc_new2(rb_eRuntimeError, ptr->ip->result);
rb_exc_new2      1343 ext/tk/tcltklib.c                             = rb_exc_new2(rb_eException, "unknown exception");
rb_exc_new2      1361 ext/tk/tcltklib.c                         rb_exc_raise(rb_exc_new2(rb_eFatal, "FATAL"));
rb_exc_new2      1463 ext/tk/tcltklib.c                                     = rb_exc_new2(rb_eException,
rb_exc_new2      1482 ext/tk/tcltklib.c                                 rb_exc_raise(rb_exc_new2(rb_eFatal, "FATAL"));
rb_exc_new2      1535 ext/tk/tcltklib.c                                         = rb_exc_new2(rb_eException,
rb_exc_new2      1554 ext/tk/tcltklib.c                                     rb_exc_raise(rb_exc_new2(rb_eFatal,
rb_exc_new2      1663 ext/tk/tcltklib.c                 = rb_exc_new2(rb_eException, "unknown exception");
rb_exc_new2      1671 ext/tk/tcltklib.c             rbtk_pending_exception = rb_exc_new2(rb_eFatal, "FATAL");
rb_exc_new2      2238 ext/tk/tcltklib.c                 exc = rb_exc_new2(eTkCallbackRetry, "retry jump error");
rb_exc_new2      2247 ext/tk/tcltklib.c                 exc = rb_exc_new2(eTkCallbackRedo,  "redo jump error");
rb_exc_new2      2255 ext/tk/tcltklib.c                 exc = rb_exc_new2(rb_eException, "unknown exception");
rb_exc_new2      2263 ext/tk/tcltklib.c                 exc = rb_exc_new2(rb_eFatal, "FATAL");
rb_exc_new2      2272 ext/tk/tcltklib.c                 exc = rb_exc_new2(eTkCallbackThrow,  "throw jump error");
rb_exc_new2      2281 ext/tk/tcltklib.c             exc = rb_exc_new2(rb_eException, buf);
rb_exc_new2      2412 ext/tk/tcltklib.c         rbtk_pending_exception = rb_exc_new2(rb_eRuntimeError,
rb_exc_new2      2428 ext/tk/tcltklib.c         rbtk_pending_exception = rb_exc_new2(rb_eArgError,
rb_exc_new2      2514 ext/tk/tcltklib.c         rbtk_pending_exception = rb_exc_new2(rb_eRuntimeError,
rb_exc_new2      2525 ext/tk/tcltklib.c         rbtk_pending_exception = rb_exc_new2(rb_eArgError,
rb_exc_new2      2572 ext/tk/tcltklib.c         rbtk_pending_exception = rb_exc_new2(rb_eArgError,
rb_exc_new2      2705 ext/tk/tcltklib.c         rbtk_pending_exception = rb_exc_new2(rb_eSystemExit,
rb_exc_new2      2733 ext/tk/tcltklib.c         rbtk_pending_exception = rb_exc_new2(rb_eSystemExit,
rb_exc_new2      2783 ext/tk/tcltklib.c         rbtk_pending_exception = rb_exc_new2(rb_eRuntimeError,
rb_exc_new2      2930 ext/tk/tcltklib.c         rbtk_pending_exception = rb_exc_new2(rb_eRuntimeError,
rb_exc_new2      3091 ext/tk/tcltklib.c         rbtk_pending_exception = rb_exc_new2(rb_eRuntimeError,
rb_exc_new2      3332 ext/tk/tcltklib.c         rbtk_pending_exception = rb_exc_new2(rb_eRuntimeError,
rb_exc_new2      3769 ext/tk/tcltklib.c         rbtk_pending_exception = rb_exc_new2(rb_eRuntimeError,
rb_exc_new2      3904 ext/tk/tcltklib.c         rbtk_pending_exception = rb_exc_new2(rb_eRuntimeError,
rb_exc_new2      4875 ext/tk/tcltklib.c         return rb_exc_new2(rb_eRuntimeError,
rb_exc_new2      4916 ext/tk/tcltklib.c         return rb_exc_new2(rb_eRuntimeError,
rb_exc_new2      5098 ext/tk/tcltklib.c         return rb_exc_new2(rb_eRuntimeError, "interpreter is deleted");
rb_exc_new2      5102 ext/tk/tcltklib.c         return rb_exc_new2(rb_eRuntimeError, Tcl_GetStringResult(ptr->ip));
rb_exc_new2      5621 ext/tk/tcltklib.c                   rbtk_pending_exception = rb_exc_new2(rb_eException,
rb_exc_new2      5630 ext/tk/tcltklib.c                   rbtk_pending_exception = rb_exc_new2(rb_eFatal, "FATAL");
rb_exc_new2      5887 ext/tk/tcltklib.c         return rb_exc_new2(rb_eRuntimeError, "interpreter is deleted");
rb_exc_new2      6582 ext/tk/tcltklib.c             rbtk_pending_exception = rb_exc_new2(rb_eException,
rb_exc_new2      6591 ext/tk/tcltklib.c             rbtk_pending_exception = rb_exc_new2(rb_eFatal, "FATAL");
rb_exc_new2      7033 ext/tk/tcltklib.c             exc = rb_exc_new2(rb_eRuntimeError, Tcl_GetStringResult(ptr->ip));
rb_exc_new2      7068 ext/tk/tcltklib.c             exc = rb_exc_new2(rb_eRuntimeError, Tcl_GetStringResult(ptr->ip));
rb_exc_new2      7169 ext/tk/tcltklib.c             exc = rb_exc_new2(rb_eRuntimeError, Tcl_GetStringResult(ptr->ip));
rb_exc_new2      7204 ext/tk/tcltklib.c             return rb_exc_new2(rb_eRuntimeError, ptr->ip->result);
rb_exc_new2      7286 ext/tk/tcltklib.c             return rb_exc_new2(rb_eRuntimeError, Tcl_GetStringResult(ptr->ip));
rb_exc_new2       209 ext/zlib/zlib.c 	exc = rb_exc_new2(cStreamEnd, msg);
rb_exc_new2       212 ext/zlib/zlib.c 	exc = rb_exc_new2(cNeedDict, msg);
rb_exc_new2       215 ext/zlib/zlib.c 	exc = rb_exc_new2(cStreamError, msg);
rb_exc_new2       218 ext/zlib/zlib.c 	exc = rb_exc_new2(cDataError, msg);
rb_exc_new2       221 ext/zlib/zlib.c 	exc = rb_exc_new2(cBufError, msg);
rb_exc_new2       224 ext/zlib/zlib.c 	exc = rb_exc_new2(cVersionError, msg);
rb_exc_new2       227 ext/zlib/zlib.c 	exc = rb_exc_new2(cMemError, msg);
rb_exc_new2       236 ext/zlib/zlib.c 	  exc = rb_exc_new2(cZError, buf);
rb_exc_new2      1941 gc.c               nomem_error = rb_exc_new2(rb_eNoMemError, "failed to allocate memory");
rb_exc_new2       153 intern.h       VALUE rb_exc_new2(VALUE, const char*);


rb_exc_new3

rb_exc_new3      1484 error.c        	    ruby_errinfo = rb_exc_new3(rb_eSyntaxError, str);
rb_exc_new3      1567 eval.c             rb_exc_raise(rb_exc_new3(rb_eSyntaxError, str));
rb_exc_new3      4467 eval.c         	    mesg = rb_exc_new3(rb_eRuntimeError, argv[0]);
rb_exc_new3      2232 ext/tk/tcltklib.c             exc = rb_exc_new3(type, str);
rb_exc_new3       154 intern.h       VALUE rb_exc_new3(VALUE, VALUE);


rb_exc_raise

rb_exc_raise      560 error.c            rb_exc_raise(exc);
rb_exc_raise     1008 error.c            rb_exc_raise(rb_exc_new2(exc, buf));
rb_exc_raise     1020 error.c            rb_exc_raise(rb_exc_new2(rb_eLoadError, buf));
rb_exc_raise     1057 error.c            rb_exc_raise(rb_class_new_instance(1, &arg, get_syserr(n)));
rb_exc_raise     1567 eval.c             rb_exc_raise(rb_exc_new3(rb_eSyntaxError, str));
rb_exc_raise     1648 eval.c             rb_exc_raise(exc);
rb_exc_raise     4216 eval.c             rb_exc_raise(rb_class_new_instance(2, args, rb_eSystemExit));
rb_exc_raise     5299 eval.c         	    rb_exc_raise(sysstack_error);
rb_exc_raise     5390 eval.c         	rb_exc_raise(exc);
rb_exc_raise     6213 eval.c         	    rb_exc_raise(ruby_errinfo);
rb_exc_raise     6629 eval.c         	rb_exc_raise(ruby_errinfo);
rb_exc_raise     6633 eval.c         	rb_exc_raise(ruby_errinfo);
rb_exc_raise     10191 eval.c         	rb_exc_raise(th_raise_exception);
rb_exc_raise     10394 eval.c         	rb_exc_raise(e);
rb_exc_raise     10944 eval.c         	rb_exc_raise(errinfo);
rb_exc_raise      304 ext/iconv/iconv.c     if (!rb_block_given_p()) rb_exc_raise(error);
rb_exc_raise      310 ext/openssl/ossl.c     rb_exc_raise(rb_exc_new(exc, buf, len));
rb_exc_raise      787 ext/tk/tcltklib.c             rb_exc_raise(exc);
rb_exc_raise      826 ext/tk/tcltklib.c             rb_exc_raise(exc);
rb_exc_raise     1351 ext/tk/tcltklib.c                                 rb_exc_raise(exc);
rb_exc_raise     1361 ext/tk/tcltklib.c                         rb_exc_raise(rb_exc_new2(rb_eFatal, "FATAL"));
rb_exc_raise     1363 ext/tk/tcltklib.c                         rb_exc_raise(ruby_errinfo);
rb_exc_raise     1472 ext/tk/tcltklib.c                                         rb_exc_raise(exc);
rb_exc_raise     1482 ext/tk/tcltklib.c                                 rb_exc_raise(rb_exc_new2(rb_eFatal, "FATAL"));
rb_exc_raise     1484 ext/tk/tcltklib.c                                 rb_exc_raise(ruby_errinfo);
rb_exc_raise     1544 ext/tk/tcltklib.c                                             rb_exc_raise(exc);
rb_exc_raise     1554 ext/tk/tcltklib.c                                     rb_exc_raise(rb_exc_new2(rb_eFatal,
rb_exc_raise     1557 ext/tk/tcltklib.c                                     rb_exc_raise(ruby_errinfo);
rb_exc_raise     2026 ext/tk/tcltklib.c             rb_exc_raise(ruby_errinfo);
rb_exc_raise     2032 ext/tk/tcltklib.c         rb_exc_raise(exc);
rb_exc_raise     5486 ext/tk/tcltklib.c             rb_exc_raise(result);
rb_exc_raise     5550 ext/tk/tcltklib.c         rb_exc_raise(ret);
rb_exc_raise     5803 ext/tk/tcltklib.c             rb_exc_raise(result);
rb_exc_raise     5863 ext/tk/tcltklib.c         rb_exc_raise(ret);
rb_exc_raise     6883 ext/tk/tcltklib.c             rb_exc_raise(result);
rb_exc_raise     6944 ext/tk/tcltklib.c         rb_exc_raise(ret);
rb_exc_raise      240 ext/zlib/zlib.c     rb_exc_raise(exc);
rb_exc_raise       88 gc.c               rb_exc_raise(nomem_error);
rb_exc_raise      428 ruby.c         		    rb_exc_raise(rb_class_new_instance(2, name_error, rb_eNameError));


rb_exec

rb_exec           414 intern.h       int rb_exec(const struct rb_exec_arg*);
rb_exec          2821 io.c               return rb_exec(&p->exec);
rb_exec          1236 process.c          rb_exec(&e);
rb_exec          1548 process.c          status = rb_fork(&status, (int (*)(void*))rb_exec, &earg);


rb_exec_end_proc

rb_exec_end_proc 1438 eval.c         void rb_exec_end_proc(void);
rb_exec_end_proc 1448 eval.c             rb_exec_end_proc();
rb_exec_end_proc  251 intern.h       void rb_exec_end_proc(void);


rb_exec_recursive

rb_exec_recursive 1287 array.c        		tmp = rb_exec_recursive(recursive_join, ary, (VALUE)args);
rb_exec_recursive 1374 array.c            return rb_exec_recursive(inspect_ary, ary, 0);
rb_exec_recursive 2409 array.c            return rb_exec_recursive(recursive_hash, ary, 0);
rb_exec_recursive 2894 file.c         		tmp = rb_exec_recursive(file_inspect_join, ary, (VALUE)args);
rb_exec_recursive 1156 hash.c             return rb_exec_recursive(inspect_hash, hash, 0);
rb_exec_recursive 1182 hash.c             return rb_exec_recursive(to_s_hash, hash, 0);
rb_exec_recursive  283 intern.h       VALUE rb_exec_recursive(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE);
rb_exec_recursive 3692 io.c           		rb_exec_recursive(io_puts_ary, line, out);
rb_exec_recursive  370 object.c       	return rb_exec_recursive(inspect_obj, obj, str);
rb_exec_recursive  481 struct.c           return rb_exec_recursive(inspect_struct, s, 0);


rb_exit

rb_exit           489 dln.c          	rb_exit(1);
rb_exit          4294 eval.c             rb_exit(istatus);
rb_exit          4318 eval.c         	rb_exit(EXIT_FAILURE);
rb_exit          11160 eval.c             if (th == th->next || th == main_thread) rb_exit(EXIT_SUCCESS);
rb_exit          12242 eval.c         	rb_exit(EXIT_SUCCESS);
rb_exit           561 ruby.h         NORETURN(void rb_exit(int));


rb_extend_object

rb_extend_object 1600 eval.c             rb_extend_object(ruby_top_self, ruby_wrapper);
rb_extend_object 3870 eval.c         		rb_extend_object(klass, ruby_wrapper);
rb_extend_object 3906 eval.c         		rb_extend_object(module, ruby_wrapper);
rb_extend_object 3928 eval.c         		rb_extend_object(klass, ruby_wrapper);
rb_extend_object 6571 eval.c         	rb_extend_object(self, ruby_wrapper);
rb_extend_object 7315 eval.c             rb_extend_object(obj, mod);
rb_extend_object  802 ext/readline/readline.c     rb_extend_object(history, rb_mEnumerable);
rb_extend_object 2343 hash.c             rb_extend_object(envtbl, rb_mEnumerable);
rb_extend_object 5582 io.c               rb_extend_object(argf, rb_mEnumerable);
rb_extend_object  967 marshal.c                      rb_extend_object(v, m);
rb_extend_object 1186 marshal.c                          rb_extend_object(v, m);
rb_extend_object  507 ruby.h         void rb_extend_object(VALUE,VALUE);


rb_f_END

rb_f_END          210 eval.c         static void rb_f_END(void);
rb_f_END         2736 eval.c         	rb_f_END();


rb_f_abort

rb_f_abort       7647 eval.c             rb_define_global_function("abort", rb_f_abort, -1);
rb_f_abort        203 intern.h       VALUE rb_f_abort(int,VALUE*);
rb_f_abort       3591 process.c          rb_define_singleton_method(rb_mProcess, "abort", rb_f_abort, -1); /* in eval.c */


rb_f_binding

rb_f_binding      209 eval.c         static VALUE rb_f_binding(VALUE);
rb_f_binding     1308 eval.c         	rb_define_global_const("TOPLEVEL_BINDING", rb_f_binding(ruby_top_self));
rb_f_binding     2555 eval.c         					    self ? rb_f_binding(self) : Qnil,
rb_f_binding     9486 eval.c             rb_define_global_function("binding", rb_f_binding, 0);


rb_f_block_given_p

rb_f_block_given_p  211 eval.c         static VALUE rb_f_block_given_p(void);
rb_f_block_given_p 7631 eval.c             rb_define_global_function("iterator?", rb_f_block_given_p, 0);
rb_f_block_given_p 7632 eval.c             rb_define_global_function("block_given?", rb_f_block_given_p, 0);
rb_f_block_given_p 7985 eval.c             data->iter = rb_f_block_given_p();
rb_f_block_given_p 8079 eval.c             if (!rb_block_given_p() && !rb_f_block_given_p()) {


rb_f_catch

rb_f_catch       7448 eval.c         static VALUE rb_f_catch(VALUE,VALUE);
rb_f_catch       7651 eval.c             rb_define_global_function("catch", rb_f_catch, 1);


rb_f_eval

rb_f_eval        7630 eval.c             rb_define_global_function("eval", rb_f_eval, -1);
rb_f_eval        8038 eval.c             return rb_f_eval(argc+1, args, data->self);


rb_f_exec

rb_f_exec         190 ext/pty/pty.c      return rb_f_exec(arg->argc, arg->argv);
rb_f_exec         416 intern.h       VALUE rb_f_exec(int,VALUE*);
rb_f_exec        3564 process.c          rb_define_global_function("exec", rb_f_exec, -1);
rb_f_exec        3586 process.c          rb_define_singleton_method(rb_mProcess, "exec", rb_f_exec, -1);


rb_f_exit

rb_f_exit        7646 eval.c             rb_define_global_function("exit", rb_f_exit, -1);
rb_f_exit         202 intern.h       VALUE rb_f_exit(int,VALUE*);
rb_f_exit        3590 process.c          rb_define_singleton_method(rb_mProcess, "exit", rb_f_exit, -1);   /* in eval.c */


rb_f_exit_bang

rb_f_exit_bang   3566 process.c          rb_define_global_function("exit!", rb_f_exit_bang, -1);
rb_f_exit_bang   3589 process.c          rb_define_singleton_method(rb_mProcess, "exit!", rb_f_exit_bang, -1);


rb_f_fork

rb_f_fork        3565 process.c          rb_define_global_function("fork", rb_f_fork, 0);
rb_f_fork        3587 process.c          rb_define_singleton_method(rb_mProcess, "fork", rb_f_fork, 0);


rb_f_getenv

rb_f_getenv      1918 hash.c         	VALUE val = rb_f_getenv(Qnil, RARRAY(keys)->ptr[i]);
rb_f_getenv      1947 hash.c         	rb_ary_push(result, rb_f_getenv(Qnil, argv[i]));
rb_f_getenv      1987 hash.c         	VALUE val = rb_f_getenv(Qnil, RARRAY(keys)->ptr[i]);
rb_f_getenv      2244 hash.c         	    val = rb_yield_values(3, key, rb_f_getenv(Qnil, key), val);
rb_f_getenv      2345 hash.c             rb_define_singleton_method(envtbl,"[]", rb_f_getenv, 1);


rb_f_gets

rb_f_gets        4281 io.c           	return rb_f_gets(0, 0);
rb_f_gets        4316 io.c               line = rb_f_gets(argc, argv);
rb_f_gets        5454 io.c               rb_define_global_function("gets", rb_f_gets, -1);
rb_f_gets        5598 io.c               rb_define_singleton_method(argf, "gets", rb_f_gets, -1);


rb_f_global_variables

rb_f_global_variables 7653 eval.c             rb_define_global_function("global_variables", rb_f_global_variables, 0); /* in variable.c */
rb_f_global_variables  538 intern.h       VALUE rb_f_global_variables(void);


rb_f_kill

rb_f_kill         455 intern.h       VALUE rb_f_kill(int, VALUE*);
rb_f_kill        3593 process.c          rb_define_module_function(rb_mProcess, "kill", rb_f_kill, -1); /* in signal.c */


rb_f_raise

rb_f_raise       7641 eval.c             rb_define_global_function("raise", rb_f_raise, -1);
rb_f_raise       7642 eval.c             rb_define_global_function("fail", rb_f_raise, -1);


rb_f_readline

rb_f_readline    5455 io.c               rb_define_global_function("readline", rb_f_readline, -1);
rb_f_readline    5599 io.c               rb_define_singleton_method(argf, "readline", rb_f_readline, -1);


rb_f_readlines

rb_f_readlines   5459 io.c               rb_define_global_function("readlines", rb_f_readlines, -1);
rb_f_readlines   5596 io.c               rb_define_singleton_method(argf, "readlines", rb_f_readlines, -1);
rb_f_readlines   5597 io.c               rb_define_singleton_method(argf, "to_a", rb_f_readlines, -1);


rb_f_require

rb_f_require     7796 eval.c             rb_define_global_function("require", rb_f_require, 1);
rb_f_require      235 intern.h       VALUE rb_f_require(VALUE, VALUE);


rb_f_select

rb_f_select      5457 io.c               rb_define_global_function("select", rb_f_select, -1);
rb_f_select      5478 io.c               rb_define_singleton_method(rb_cIO, "select", rb_f_select, -1);


rb_f_send

rb_f_send        7656 eval.c             rb_define_method(rb_mKernel, "send", rb_f_send, -1);
rb_f_send        7657 eval.c             rb_define_method(rb_mKernel, "__send__", rb_f_send, -1);


rb_f_spawn

rb_f_spawn       3568 process.c          rb_define_global_function("spawn", rb_f_spawn, -1);
rb_f_spawn       3588 process.c          rb_define_singleton_method(rb_mProcess, "spawn", rb_f_spawn, -1);


rb_f_sprintf

rb_f_sprintf      716 error.c        	mesg = rb_f_sprintf(3, args);
rb_f_sprintf       33 ext/syslog/syslog.c     str = rb_f_sprintf(argc, argv);
rb_f_sprintf      469 intern.h       VALUE rb_f_sprintf(int, const VALUE*);
rb_f_sprintf     3482 io.c               rb_io_write(out, rb_f_sprintf(argc, argv));
rb_f_sprintf     3511 io.c               rb_io_write(out, rb_f_sprintf(argc, argv));
rb_f_sprintf     2434 object.c           rb_define_global_function("sprintf", rb_f_sprintf, -1); /* in sprintf.c */
rb_f_sprintf     2435 object.c           rb_define_global_function("format", rb_f_sprintf, -1);  /* in sprintf.c */


rb_f_throw

rb_f_throw       7652 eval.c             rb_define_global_function("throw", rb_f_throw, -1);
rb_f_throw       13017 eval.c             rb_f_throw(2, argv);


rb_f_trace_var

rb_f_trace_var   7380 eval.c         VALUE rb_f_trace_var(int, VALUE *);
rb_f_trace_var   7696 eval.c             rb_define_global_function("trace_var", rb_f_trace_var, -1); /* in variable.c */
rb_f_trace_var    536 intern.h       VALUE rb_f_trace_var(int, VALUE*);


rb_f_untrace_var

rb_f_untrace_var 7381 eval.c         VALUE rb_f_untrace_var(int, VALUE *);
rb_f_untrace_var 7697 eval.c             rb_define_global_function("untrace_var", rb_f_untrace_var, -1); /* in variable.c */
rb_f_untrace_var  537 intern.h       VALUE rb_f_untrace_var(int, VALUE*);
rb_f_untrace_var  528 variable.c     	return rb_f_untrace_var(argc, argv);


rb_fatal

rb_fatal          910 class.c            rb_fatal("bad scan arg format: %s", fmt);
rb_fatal          130 dir.c          	rb_fatal("CompareImpl: negative len");
rb_fatal          140 dir.c          		rb_fatal("CompareImpl: too large len");
rb_fatal          149 dir.c          		rb_fatal("CompareImpl: too large len");
rb_fatal         1618 ext/bigdecimal/bigdecimal.c     if(fatal) rb_fatal(str);
rb_fatal         4151 io.c           			rb_fatal("Can't do inplace edit without backup");
rb_fatal          135 ruby.c         		rb_fatal("malformed RUBYLIB_PREFIX");
rb_fatal          158 ruby.c         	rb_fatal("malformed RUBYLIB_PREFIX");
rb_fatal          616 ruby.c         		rb_fatal("Can't chdir to %s", s);
rb_fatal          628 ruby.c         		rb_fatal("Can't chdir");
rb_fatal          631 ruby.c         		rb_fatal("Can't chdir to %s", s);
rb_fatal          933 ruby.c         		    rb_fatal("Can't exec %s", path);
rb_fatal          557 ruby.h         PRINTF_ARGS(NORETURN(void rb_fatal(const char*, ...)), 1, 2);
rb_fatal          158 util.c                 rb_fatal("Cannot do inplace edit on long filename (%ld characters)",
rb_fatal         1439 win32/win32.c              rb_fatal ("opendir: malloc failed!\n");
rb_fatal         1446 win32/win32.c  		rb_fatal ("opendir: malloc failed!\n");
rb_fatal         2176 win32/win32.c  	rb_fatal ("Unable to locate winsock library!\n");
rb_fatal         2178 win32/win32.c  	rb_fatal("could not find version 2 of winsock dll\n");
rb_fatal         2187 win32/win32.c  	rb_fatal("Unable to create interrupt event!\n");
rb_fatal         3711 win32/win32.c  	rb_fatal("failed to launch waiter thread:%d", GetLastError());


rb_fd_clr

rb_fd_clr        9683 eval.c         #define FD_CLR(i, f)	rb_fd_clr(i, f)
rb_fd_clr         174 intern.h       void rb_fd_clr(int, rb_fdset_t *);


rb_fd_copy

rb_fd_copy       10889 eval.c             if (read) rb_fd_copy(&curr_thread->readfds, read, max);
rb_fd_copy       10891 eval.c             if (write) rb_fd_copy(&curr_thread->writefds, write, max);
rb_fd_copy       10893 eval.c             if (except) rb_fd_copy(&curr_thread->exceptfds, except, max);
rb_fd_copy        176 intern.h       void rb_fd_copy(rb_fdset_t *, const fd_set *, int);


rb_fd_init

rb_fd_init       9801 eval.c             rb_fd_init(&(src)->readfds),		\
rb_fd_init       9802 eval.c             rb_fd_init(&(src)->writefds),		\
rb_fd_init       9803 eval.c             rb_fd_init(&(src)->exceptfds),		\
rb_fd_init       10499 eval.c             rb_fd_init(&readfds);
rb_fd_init       10500 eval.c             rb_fd_init(&writefds);
rb_fd_init       10501 eval.c             rb_fd_init(&exceptfds);
rb_fd_init       11529 eval.c             rb_fd_init(&th->readfds);\
rb_fd_init       11530 eval.c             rb_fd_init(&th->writefds);\
rb_fd_init       11531 eval.c             rb_fd_init(&th->exceptfds);\
rb_fd_init        122 ext/io/wait/wait.c     rb_fd_init(&arg.fds);
rb_fd_init        985 ext/socket/socket.c     rb_fd_init(&arg.fds_w);
rb_fd_init        986 ext/socket/socket.c     rb_fd_init(&arg.fds_e);
rb_fd_init        170 intern.h       void rb_fd_init(volatile rb_fdset_t *);
rb_fd_init        484 io.c           	rb_fd_init(&rfds);
rb_fd_init        527 io.c           	rb_fd_init(&wfds);
rb_fd_init       4558 io.c           	rb_fd_init(&args.fdsets[i]);


rb_fd_isset

rb_fd_isset      9684 eval.c         #define FD_ISSET(i, f)	rb_fd_isset(i, f)
rb_fd_isset       935 ext/socket/socket.c 	if (rb_fd_isset(fd, fds_w)) {
rb_fd_isset       938 ext/socket/socket.c 	else if (rb_fd_isset(fd, fds_e)) {
rb_fd_isset       175 intern.h       int rb_fd_isset(int, const rb_fdset_t *);
rb_fd_isset      4470 io.c           		if (rb_fd_isset(fptr->fd, &fds[0]) ||
rb_fd_isset      4471 io.c           		    rb_fd_isset(fptr->fd, &fds[3])) {
rb_fd_isset      4481 io.c           		if (rb_fd_isset(fptr->fd, &fds[1])) {
rb_fd_isset      4491 io.c           		if (rb_fd_isset(fptr->fd, &fds[2])) {


rb_fd_max

rb_fd_max        10405 eval.c             if (max >= rb_fd_max(src)) max = rb_fd_max(src) - 1;
rb_fd_max        10419 eval.c             if (max >= rb_fd_max(src)) max = rb_fd_max(src) - 1;
rb_fd_max        10420 eval.c             if (max >= rb_fd_max(dst)) max = rb_fd_max(dst) - 1;
rb_fd_max        10434 eval.c             if (max >= rb_fd_max(dst)) max = rb_fd_max(dst) - 1;
rb_fd_max        10455 eval.c             if (max >= rb_fd_max(src)) max = rb_fd_max(src) - 1;
rb_fd_max          84 ext/io/wait/wait.c     return (VALUE)rb_thread_select(rb_fd_max(fds), rb_fd_ptr(fds), NULL, NULL, arg->timeout);
rb_fd_max         463 io.c               return rb_thread_select(rb_fd_max(rfds), rb_fd_ptr(rfds), NULL, NULL, NULL);
rb_fd_max         506 io.c               return rb_thread_select(rb_fd_max(wfds), NULL, rb_fd_ptr(wfds), NULL, NULL);


rb_fd_ptr

rb_fd_ptr        9673 eval.c             return select(n, rb_fd_ptr(readfds), rb_fd_ptr(writefds), rb_fd_ptr(exceptfds), timeout);
rb_fd_ptr        10903 eval.c             if (read) *read = *rb_fd_ptr(&curr_thread->readfds);
rb_fd_ptr        10904 eval.c             if (write) *write = *rb_fd_ptr(&curr_thread->writefds);
rb_fd_ptr        10905 eval.c             if (except) *except = *rb_fd_ptr(&curr_thread->exceptfds);
rb_fd_ptr          84 ext/io/wait/wait.c     return (VALUE)rb_thread_select(rb_fd_max(fds), rb_fd_ptr(fds), NULL, NULL, arg->timeout);
rb_fd_ptr         128 ext/io/wait/wait.c     i = rb_thread_select(fd + 1, rb_fd_ptr(&arg.fds), NULL, NULL, arg.timeout);
rb_fd_ptr         933 ext/socket/socket.c 	rb_thread_select(fd+1, 0, rb_fd_ptr(fds_w), rb_fd_ptr(fds_e), 0);
rb_fd_ptr         463 io.c               return rb_thread_select(rb_fd_max(rfds), rb_fd_ptr(rfds), NULL, NULL, NULL);
rb_fd_ptr         506 io.c               return rb_thread_select(rb_fd_max(wfds), NULL, rb_fd_ptr(wfds), NULL, NULL);
rb_fd_ptr        4422 io.c           	rp = rb_fd_ptr(&fds[0]);
rb_fd_ptr        4434 io.c           	wp = rb_fd_ptr(&fds[1]);
rb_fd_ptr        4446 io.c           	ep = rb_fd_ptr(&fds[2]);


rb_fd_resize

rb_fd_resize     9628 eval.c             rb_fd_resize(n, fds);
rb_fd_resize     9670 eval.c             rb_fd_resize(n - 1, readfds);
rb_fd_resize     9671 eval.c             rb_fd_resize(n - 1, writefds);
rb_fd_resize     9672 eval.c             rb_fd_resize(n - 1, exceptfds);


rb_fd_select

rb_fd_select     10576 eval.c         	n = rb_fd_select(max+1, &readfds, &writefds, &exceptfds, delay_ptr);
rb_fd_select      177 intern.h       int rb_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);


rb_fd_set

rb_fd_set        9682 eval.c         #define FD_SET(i, f)	rb_fd_set(i, f)
rb_fd_set         123 ext/io/wait/wait.c     rb_fd_set(fd, &arg.fds);
rb_fd_set         930 ext/socket/socket.c 	rb_fd_set(fd, fds_w);
rb_fd_set         931 ext/socket/socket.c 	rb_fd_set(fd, fds_e);
rb_fd_set         173 intern.h       void rb_fd_set(int, rb_fdset_t *);
rb_fd_set         485 io.c           	rb_fd_set(f, &rfds);
rb_fd_set         528 io.c           	rb_fd_set(f, &wfds);
rb_fd_set        4411 io.c           	    rb_fd_set(fptr->fd, &fds[0]);
rb_fd_set        4414 io.c           		rb_fd_set(fptr->fd, &fds[3]);
rb_fd_set        4431 io.c           	    rb_fd_set(fptr->fd, &fds[1]);
rb_fd_set        4443 io.c           	    rb_fd_set(fptr->fd, &fds[2]);


rb_fd_term

rb_fd_term       10060 eval.c             rb_fd_term(&th->readfds);
rb_fd_term       10061 eval.c             rb_fd_term(&th->writefds);
rb_fd_term       10062 eval.c             rb_fd_term(&th->exceptfds);
rb_fd_term       10584 eval.c         		    rb_fd_term(&readfds);
rb_fd_term       10585 eval.c         		    rb_fd_term(&writefds);
rb_fd_term       10586 eval.c         		    rb_fd_term(&exceptfds);
rb_fd_term       10660 eval.c             rb_fd_term(&readfds);
rb_fd_term       10661 eval.c             rb_fd_term(&writefds);
rb_fd_term       10662 eval.c             rb_fd_term(&exceptfds);
rb_fd_term        126 ext/io/wait/wait.c 		       (VALUE (*)_((VALUE)))rb_fd_term, (VALUE)&arg.fds);
rb_fd_term        973 ext/socket/socket.c     rb_fd_term(&p->fds_w);
rb_fd_term        974 ext/socket/socket.c     rb_fd_term(&p->fds_e);
rb_fd_term        171 intern.h       void rb_fd_term(rb_fdset_t *);
rb_fd_term        488 io.c           		  (VALUE (*)(VALUE))rb_fd_term, (VALUE)&rfds);
rb_fd_term        531 io.c           		  (VALUE (*)(VALUE))rb_fd_term, (VALUE)&wfds);
rb_fd_term       4525 io.c           	rb_fd_term(&p->fdsets[i]);


rb_fd_zero

rb_fd_zero       9681 eval.c         #define FD_ZERO(f)	rb_fd_zero(f)
rb_fd_zero        927 ext/socket/socket.c 	rb_fd_zero(fds_w);
rb_fd_zero        928 ext/socket/socket.c 	rb_fd_zero(fds_e);
rb_fd_zero        172 intern.h       void rb_fd_zero(rb_fdset_t *);


rb_fdopen

rb_fdopen        3877 io.c                   fptr->stdio_file = rb_fdopen(fptr->fd, rb_io_flags_mode(fptr->mode));
rb_fdopen          85 rubyio.h       FILE *rb_fdopen(int, const char*);


rb_fdset_t

rb_fdset_t       9579 eval.c             volatile rb_fdset_t *fds;
rb_fdset_t       9588 eval.c             rb_fdset_t *fds;
rb_fdset_t       9597 eval.c             rb_fdset_t *fds;
rb_fdset_t       9608 eval.c             rb_fdset_t *fds;
rb_fdset_t       9626 eval.c             rb_fdset_t *fds;
rb_fdset_t       9635 eval.c             rb_fdset_t *fds;
rb_fdset_t       9644 eval.c             const rb_fdset_t *fds;
rb_fdset_t       9652 eval.c             rb_fdset_t *dst;
rb_fdset_t       9667 eval.c             rb_fdset_t *readfds, *writefds, *exceptfds;
rb_fdset_t       9736 eval.c             rb_fdset_t readfds;
rb_fdset_t       9737 eval.c             rb_fdset_t writefds;
rb_fdset_t       9738 eval.c             rb_fdset_t exceptfds;
rb_fdset_t       9776 eval.c             rb_fdset_t readfds;
rb_fdset_t       9777 eval.c             rb_fdset_t writefds;
rb_fdset_t       9778 eval.c             rb_fdset_t exceptfds;
rb_fdset_t       10400 eval.c         copy_fds(rb_fdset_t *dst, rb_fdset_t *src, int max)
rb_fdset_t       10415 eval.c         match_fds(rb_fdset_t *dst, rb_fdset_t *src, int max)
rb_fdset_t       10430 eval.c         intersect_fds(rb_fdset_t *src, rb_fdset_t *dst, int max)
rb_fdset_t       10451 eval.c         find_bad_fds(rb_fdset_t *dst, rb_fdset_t *src, int max)
rb_fdset_t       10473 eval.c             rb_fdset_t readfds;
rb_fdset_t       10474 eval.c             rb_fdset_t writefds;
rb_fdset_t       10475 eval.c             rb_fdset_t exceptfds;
rb_fdset_t         72 ext/io/wait/wait.c     rb_fdset_t fds;
rb_fdset_t         82 ext/io/wait/wait.c     rb_fdset_t *fds = &arg->fds;
rb_fdset_t        921 ext/socket/socket.c     rb_fdset_t *fds_w, *fds_e;
rb_fdset_t        955 ext/socket/socket.c     rb_fdset_t fds_w;
rb_fdset_t        956 ext/socket/socket.c     rb_fdset_t fds_e;
rb_fdset_t        170 intern.h       void rb_fd_init(volatile rb_fdset_t *);
rb_fdset_t        171 intern.h       void rb_fd_term(rb_fdset_t *);
rb_fdset_t        172 intern.h       void rb_fd_zero(rb_fdset_t *);
rb_fdset_t        173 intern.h       void rb_fd_set(int, rb_fdset_t *);
rb_fdset_t        174 intern.h       void rb_fd_clr(int, rb_fdset_t *);
rb_fdset_t        175 intern.h       int rb_fd_isset(int, const rb_fdset_t *);
rb_fdset_t        176 intern.h       void rb_fd_copy(rb_fdset_t *, const fd_set *, int);
rb_fdset_t        177 intern.h       int rb_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
rb_fdset_t        461 io.c               rb_fdset_t *rfds = (rb_fdset_t *)p;
rb_fdset_t        470 io.c               rb_fdset_t rfds;
rb_fdset_t        504 io.c               rb_fdset_t *wfds = (rb_fdset_t *)p;
rb_fdset_t        513 io.c               rb_fdset_t wfds;
rb_fdset_t       4396 io.c           select_internal(VALUE read, VALUE write, VALUE except, struct timeval *tp, rb_fdset_t *fds)
rb_fdset_t       4504 io.c               rb_fdset_t fdsets[4];


rb_feature_p

rb_feature_p     6739 eval.c             if (rb_feature_p(feature, 0, Qfalse))
rb_feature_p     6752 eval.c         	if (rb_feature_p(feature, 0, Qfalse))
rb_feature_p     6825 eval.c         	    if (rb_feature_p(ftptr, ext, Qtrue)) return 'r';
rb_feature_p     6829 eval.c         		if (!rb_feature_p(ftptr, ext, Qtrue))
rb_feature_p     6836 eval.c         	    if (rb_feature_p(ftptr, ext, Qfalse)) return 's';
rb_feature_p     6843 eval.c         		if (!rb_feature_p(ftptr, ext, Qfalse))
rb_feature_p     6853 eval.c         		if (!rb_feature_p(ftptr, ext, Qfalse))
rb_feature_p     6860 eval.c         	    if (rb_feature_p(ftptr, ext, Qfalse)) return 's';
rb_feature_p     6864 eval.c         		if (!rb_feature_p(ftptr, ext, Qfalse))
rb_feature_p     6870 eval.c             else if ((ft = rb_feature_p(ftptr, 0, Qfalse)) == 'r') {
rb_feature_p     6880 eval.c         	return rb_feature_p(ftptr, 0, Qfalse);
rb_feature_p     6886 eval.c         	if (rb_feature_p(ftptr, ext, !--type)) break;


rb_file_const

rb_file_const    1837 dir.c              rb_file_const("FNM_NOESCAPE", INT2FIX(FNM_NOESCAPE));
rb_file_const    1838 dir.c              rb_file_const("FNM_PATHNAME", INT2FIX(FNM_PATHNAME));
rb_file_const    1839 dir.c              rb_file_const("FNM_DOTMATCH", INT2FIX(FNM_DOTMATCH));
rb_file_const    1840 dir.c              rb_file_const("FNM_CASEFOLD", INT2FIX(FNM_CASEFOLD));
rb_file_const    1841 dir.c              rb_file_const("FNM_SYSCASE", INT2FIX(FNM_SYSCASE));
rb_file_const    4358 file.c             rb_file_const("LOCK_SH", INT2FIX(LOCK_SH));
rb_file_const    4359 file.c             rb_file_const("LOCK_EX", INT2FIX(LOCK_EX));
rb_file_const    4360 file.c             rb_file_const("LOCK_UN", INT2FIX(LOCK_UN));
rb_file_const    4361 file.c             rb_file_const("LOCK_NB", INT2FIX(LOCK_NB));
rb_file_const     288 intern.h       void rb_file_const(const char*, VALUE);
rb_file_const    5635 io.c               rb_file_const("RDONLY", INT2FIX(O_RDONLY));
rb_file_const    5636 io.c               rb_file_const("WRONLY", INT2FIX(O_WRONLY));
rb_file_const    5637 io.c               rb_file_const("RDWR", INT2FIX(O_RDWR));
rb_file_const    5638 io.c               rb_file_const("APPEND", INT2FIX(O_APPEND));
rb_file_const    5639 io.c               rb_file_const("CREAT", INT2FIX(O_CREAT));
rb_file_const    5640 io.c               rb_file_const("EXCL", INT2FIX(O_EXCL));
rb_file_const    5643 io.c               rb_file_const("NONBLOCK", INT2FIX(O_NONBLOCK));
rb_file_const    5645 io.c               rb_file_const("NONBLOCK", INT2FIX(O_NDELAY));
rb_file_const    5648 io.c               rb_file_const("TRUNC", INT2FIX(O_TRUNC));
rb_file_const    5650 io.c               rb_file_const("NOCTTY", INT2FIX(O_NOCTTY));
rb_file_const    5653 io.c               rb_file_const("BINARY", INT2FIX(O_BINARY));
rb_file_const    5656 io.c               rb_file_const("SYNC", INT2FIX(O_SYNC));


rb_file_expand_path

rb_file_expand_path 6827 eval.c         		tmp = rb_file_expand_path(tmp, Qnil);
rb_file_expand_path 6841 eval.c         		tmp = rb_file_expand_path(tmp, Qnil);
rb_file_expand_path 6851 eval.c         		tmp = rb_file_expand_path(tmp, Qnil);
rb_file_expand_path 6862 eval.c         		tmp = rb_file_expand_path(tmp, Qnil);
rb_file_expand_path 6875 eval.c             tmp = rb_file_expand_path(tmp, Qnil);
rb_file_expand_path 1452 file.c             fname1 = rb_file_expand_path(fname1, Qnil);
rb_file_expand_path 1453 file.c             fname2 = rb_file_expand_path(fname2, Qnil);
rb_file_expand_path 2626 file.c         	return rb_file_expand_path(argv[0], Qnil);
rb_file_expand_path 2630 file.c             return rb_file_expand_path(fname, dname);
rb_file_expand_path 4101 file.c         	fname = rb_file_expand_path(*filep, Qnil);
rb_file_expand_path 4154 file.c         	path = rb_file_expand_path(path, Qnil);
rb_file_expand_path  287 intern.h       VALUE rb_file_expand_path(VALUE, VALUE);
rb_file_expand_path  225 ruby.c             return rb_file_expand_path(path, Qnil);


rb_file_ftype

rb_file_ftype    1545 file.c             return rb_file_ftype(&st);
rb_file_ftype    3445 file.c             return rb_file_ftype(get_stat(obj));


rb_file_join

rb_file_join     2850 file.c         static VALUE rb_file_join(VALUE ary, VALUE sep);
rb_file_join     2857 file.c             return rb_file_join(arg[0], arg[1]);
rb_file_join     2930 file.c             return rb_file_join(args, separator);


rb_file_open

rb_file_open     2428 ext/zlib/zlib.c     io = rb_file_open(RSTRING(filename)->ptr, mode);
rb_file_open      345 intern.h       VALUE rb_file_open(const char*, const char*);
rb_file_open     3265 io.c           	return rb_file_open(fname, mode);
rb_file_open      866 ruby.c         	f = rb_file_open(fname, "r");


rb_file_open_internal

rb_file_open_internal 2663 io.c               return rb_file_open_internal(io_alloc(rb_cFile), fname, mode);
rb_file_open_internal 3080 io.c           	rb_file_open_internal(io, RSTRING(fname)->ptr, mode);


rb_file_s_basename

rb_file_s_basename 2845 file.c             return rb_assoc_new(rb_file_s_dirname(Qnil, path), rb_file_s_basename(1,&path));
rb_file_s_basename 4325 file.c             rb_define_singleton_method(rb_cFile, "basename", rb_file_s_basename, -1);


rb_file_s_dirname

rb_file_s_dirname 2845 file.c             return rb_assoc_new(rb_file_s_dirname(Qnil, path), rb_file_s_basename(1,&path));
rb_file_s_dirname 4326 file.c             rb_define_singleton_method(rb_cFile, "dirname", rb_file_s_dirname, 1);


rb_file_s_expand_path

rb_file_s_expand_path 4324 file.c             rb_define_singleton_method(rb_cFile, "expand_path", rb_file_s_expand_path, -1);
rb_file_s_expand_path  286 intern.h       VALUE rb_file_s_expand_path(int, VALUE *);


rb_file_s_stat

rb_file_s_stat    750 file.c             return rb_file_s_stat(klass, fname);
rb_file_s_stat   4301 file.c             rb_define_singleton_method(rb_cFile, "stat",  rb_file_s_stat, 1);


rb_file_s_unlink

rb_file_s_unlink 4319 file.c             rb_define_singleton_method(rb_cFile, "unlink", rb_file_s_unlink, -2);
rb_file_s_unlink 4320 file.c             rb_define_singleton_method(rb_cFile, "delete", rb_file_s_unlink, -2);


rb_file_sysopen_internal

rb_file_sysopen_internal 2684 io.c               return rb_file_sysopen_internal(io_alloc(rb_cFile), fname, flags, mode);
rb_file_sysopen_internal 3076 io.c           	rb_file_sysopen_internal(io, RSTRING(fname)->ptr, flags, fmode);


rb_find_file

rb_find_file     6552 eval.c             tmp = rb_find_file(fname);
rb_find_file     6826 eval.c         	    if (tmp = rb_find_file(fname)) {
rb_find_file     6850 eval.c         	    if (tmp = rb_find_file(tmp)) {
rb_find_file     6861 eval.c         	    if (tmp = rb_find_file(fname)) {
rb_find_file      290 intern.h       VALUE rb_find_file(VALUE);


rb_find_file_ext

rb_find_file_ext 6840 eval.c         	    if (rb_find_file_ext(&tmp, loadable_ext+1)) {
rb_find_file_ext 6874 eval.c             type = rb_find_file_ext(&tmp, loadable_ext);
rb_find_file_ext  289 intern.h       int rb_find_file_ext(VALUE*, const char* const*);


rb_fix2int

rb_fix2int        272 ruby.h         long rb_fix2int(VALUE);
rb_fix2int        273 ruby.h         #define FIX2INT(x) rb_fix2int((VALUE)x)


rb_fix2str

rb_fix2str        597 bignum.c       	return rb_fix2str(x, base);
rb_fix2str        895 ext/tk/tcltklib.c         argv[1] = RSTRING(rb_fix2str(INT2NUM(state), 10))->ptr;
rb_fix2str       3516 ext/win32ole/win32ole.c         rb_str_concat(str, rb_fix2str(INT2FIX(pTypeDesc->vt), 10));
rb_fix2str        359 intern.h       VALUE rb_fix2str(VALUE, int);
rb_fix2str       1889 numeric.c          return rb_fix2str(x, base);
rb_fix2str        238 process.c          return rb_fix2str(pst_to_i(st), 10);


rb_fix2uint

rb_fix2uint       276 ruby.h         unsigned long rb_fix2uint(VALUE);
rb_fix2uint       277 ruby.h         #define FIX2UINT(x) rb_fix2uint(x)


rb_float_new

rb_float_new      864 bignum.c           return rb_float_new(rb_big2dbl(x));
rb_float_new     1125 bignum.c       	return rb_float_new(rb_big2dbl(x) + RFLOAT(y)->value);
rb_float_new     1150 bignum.c       	return rb_float_new(rb_big2dbl(x) - RFLOAT(y)->value);
rb_float_new     1174 bignum.c       	return rb_float_new(rb_big2dbl(x) * RFLOAT(y)->value);
rb_float_new     1380 bignum.c       	return rb_float_new(rb_big2dbl(x) / RFLOAT(y)->value);
rb_float_new     1512 bignum.c           return rb_float_new(dx / dy);
rb_float_new     1567 bignum.c           return rb_float_new(pow(rb_big2dbl(x), d));
rb_float_new      411 ext/bigdecimal/bigdecimal.c     if(VpVtoD(&d, &e, p)!=1) return rb_float_new(d);
rb_float_new      416 ext/bigdecimal/bigdecimal.c        if(d>0.0) return rb_float_new(DBL_MAX);
rb_float_new      417 ext/bigdecimal/bigdecimal.c        else      return rb_float_new(-DBL_MAX);
rb_float_new      419 ext/bigdecimal/bigdecimal.c     return rb_float_new(d*d2);
rb_float_new      350 ext/dl/cfunc.c 	    result = rb_float_new(ret); \
rb_float_new      360 ext/dl/cfunc.c 	    result = rb_float_new(ret); \
rb_float_new      448 ext/dl/cfunc.c 	    result = rb_float_new(ret); \
rb_float_new      458 ext/dl/cfunc.c 	    result = rb_float_new(ret); \
rb_float_new      439 ext/syck/rubyext.c                 obj = rb_float_new( total );
rb_float_new      443 ext/syck/rubyext.c                 obj = rb_float_new( S_nan() );
rb_float_new      447 ext/syck/rubyext.c                 obj = rb_float_new( S_inf() );
rb_float_new      451 ext/syck/rubyext.c                 obj = rb_float_new( -S_inf() );
rb_float_new      458 ext/syck/rubyext.c                 obj = rb_float_new( f );
rb_float_new      993 ext/tk/tkutil/tkutil.c     return rb_float_new(rb_cstr_to_dbl(RSTRING(value)->ptr, 1));
rb_float_new     1182 ext/win32ole/win32ole.c             obj = rb_float_new(*V_R4REF(pvar));
rb_float_new     1184 ext/win32ole/win32ole.c             obj = rb_float_new(V_R4(pvar));
rb_float_new     1189 ext/win32ole/win32ole.c             obj = rb_float_new(*V_R8REF(pvar));
rb_float_new     1191 ext/win32ole/win32ole.c             obj = rb_float_new(V_R8(pvar));
rb_float_new      357 intern.h       VALUE rb_float_new(double);
rb_float_new     1032 marshal.c      	    v = rb_float_new(d);
rb_float_new       39 math.c             return rb_float_new(atan2(RFLOAT(y)->value, RFLOAT(x)->value));
rb_float_new       56 math.c             return rb_float_new(cos(RFLOAT(x)->value));
rb_float_new       72 math.c             return rb_float_new(sin(RFLOAT(x)->value));
rb_float_new       88 math.c             return rb_float_new(tan(RFLOAT(x)->value));
rb_float_new      109 math.c             return rb_float_new(d);
rb_float_new      130 math.c             return rb_float_new(d);
rb_float_new      144 math.c             return rb_float_new(atan(RFLOAT(x)->value));
rb_float_new      168 math.c             return rb_float_new(cosh(RFLOAT(x)->value));
rb_float_new      192 math.c             return rb_float_new(sinh(RFLOAT(x)->value));
rb_float_new      216 math.c             return rb_float_new(tanh(RFLOAT(x)->value));
rb_float_new      237 math.c             return rb_float_new(d);
rb_float_new      251 math.c             return rb_float_new(asinh(RFLOAT(x)->value));
rb_float_new      272 math.c             return rb_float_new(d);
rb_float_new      286 math.c             return rb_float_new(exp(RFLOAT(x)->value));
rb_float_new      316 math.c             return rb_float_new(d);
rb_float_new      337 math.c             return rb_float_new(d);
rb_float_new      359 math.c             return rb_float_new(d);
rb_float_new      383 math.c             return rb_assoc_new(rb_float_new(d), INT2NUM(exp));
rb_float_new      400 math.c             return rb_float_new(ldexp(RFLOAT(x)->value, NUM2INT(n)));
rb_float_new      417 math.c             return rb_float_new(hypot(RFLOAT(x)->value, RFLOAT(y)->value));
rb_float_new      431 math.c             return rb_float_new(erf(RFLOAT(x)->value));
rb_float_new      445 math.c             return rb_float_new(erfc(RFLOAT(x)->value));
rb_float_new      462 math.c             rb_define_const(rb_mMath, "PI", rb_float_new(M_PI));
rb_float_new      464 math.c             rb_define_const(rb_mMath, "PI", rb_float_new(atan(1.0)*4.0));
rb_float_new      468 math.c             rb_define_const(rb_mMath, "E", rb_float_new(M_E));
rb_float_new      470 math.c             rb_define_const(rb_mMath, "E", rb_float_new(exp(1.0)));
rb_float_new      530 numeric.c          return rb_float_new(-RFLOAT(flt)->value);
rb_float_new      546 numeric.c      	return rb_float_new(RFLOAT(x)->value + (double)FIX2LONG(y));
rb_float_new      548 numeric.c      	return rb_float_new(RFLOAT(x)->value + rb_big2dbl(y));
rb_float_new      550 numeric.c      	return rb_float_new(RFLOAT(x)->value + RFLOAT(y)->value);
rb_float_new      569 numeric.c      	return rb_float_new(RFLOAT(x)->value - (double)FIX2LONG(y));
rb_float_new      571 numeric.c      	return rb_float_new(RFLOAT(x)->value - rb_big2dbl(y));
rb_float_new      573 numeric.c      	return rb_float_new(RFLOAT(x)->value - RFLOAT(y)->value);
rb_float_new      592 numeric.c      	return rb_float_new(RFLOAT(x)->value * (double)FIX2LONG(y));
rb_float_new      594 numeric.c      	return rb_float_new(RFLOAT(x)->value * rb_big2dbl(y));
rb_float_new      596 numeric.c      	return rb_float_new(RFLOAT(x)->value * RFLOAT(y)->value);
rb_float_new      619 numeric.c      	return rb_float_new(RFLOAT(x)->value / (double)f_y);
rb_float_new      622 numeric.c      	return rb_float_new(RFLOAT(x)->value / d);
rb_float_new      624 numeric.c      	return rb_float_new(RFLOAT(x)->value / RFLOAT(y)->value);
rb_float_new      686 numeric.c          return rb_float_new(mod);
rb_float_new      716 numeric.c          a = rb_float_new(div);
rb_float_new      717 numeric.c          b = rb_float_new(mod);
rb_float_new      734 numeric.c              return rb_float_new(pow(RFLOAT(x)->value, (double)FIX2LONG(y)));
rb_float_new      736 numeric.c      	return rb_float_new(pow(RFLOAT(x)->value, rb_big2dbl(y)));
rb_float_new      738 numeric.c              return rb_float_new(pow(RFLOAT(x)->value, RFLOAT(y)->value));
rb_float_new     1080 numeric.c          return rb_float_new(val);
rb_float_new     1433 numeric.c      	    rb_yield(rb_float_new(i*unit+beg));
rb_float_new     1922 numeric.c      	return rb_float_new((double)FIX2LONG(x) + RFLOAT(y)->value);
rb_float_new     1959 numeric.c      	return rb_float_new((double)FIX2LONG(x) - RFLOAT(y)->value);
rb_float_new     2001 numeric.c      	return rb_float_new((double)FIX2LONG(x) * RFLOAT(y)->value);
rb_float_new     2050 numeric.c      	return rb_float_new((double)FIX2LONG(x) / (double)FIX2LONG(y));
rb_float_new     2054 numeric.c      	return rb_float_new((double)FIX2LONG(y) / rb_big2dbl(y));
rb_float_new     2056 numeric.c      	return rb_float_new((double)FIX2LONG(x) / RFLOAT(y)->value);
rb_float_new     2077 numeric.c      	    return rb_float_new((double)FIX2LONG(x) / RFLOAT(y)->value);
rb_float_new     2143 numeric.c      	    return rb_float_new(mod);
rb_float_new     2176 numeric.c      	    a = rb_float_new(div);
rb_float_new     2177 numeric.c      	    b = rb_float_new(mod);
rb_float_new     2210 numeric.c      	return rb_float_new(pow((double)a, (double)b));
rb_float_new     2217 numeric.c      	return rb_float_new(pow((double)FIX2LONG(x), RFLOAT(y)->value));
rb_float_new     2568 numeric.c          return rb_float_new(val);
rb_float_new     2917 numeric.c          rb_define_const(rb_cFloat, "MIN", rb_float_new(DBL_MIN));
rb_float_new     2918 numeric.c          rb_define_const(rb_cFloat, "MAX", rb_float_new(DBL_MAX));
rb_float_new     2919 numeric.c          rb_define_const(rb_cFloat, "EPSILON", rb_float_new(DBL_EPSILON));
rb_float_new      712 object.c           return rb_float_new(0.0);
rb_float_new     2147 object.c       	return rb_float_new((double)FIX2LONG(val));
rb_float_new     2153 object.c       	return rb_float_new(rb_big2dbl(val));
rb_float_new     2156 object.c       	return rb_float_new(rb_str_to_dbl(val, Qtrue));
rb_float_new     1629 pack.c         		rb_ary_push(ary, rb_float_new((double)tmp));
rb_float_new     1643 pack.c         		rb_ary_push(ary, rb_float_new((double)tmp));
rb_float_new     1657 pack.c         		rb_ary_push(ary, rb_float_new(tmp));
rb_float_new     1669 pack.c         		rb_ary_push(ary, rb_float_new(tmp));
rb_float_new     1683 pack.c         		rb_ary_push(ary, rb_float_new((double)tmp));
rb_float_new     1697 pack.c         		rb_ary_push(ary, rb_float_new(tmp));
rb_float_new     6294 parse.y        		set_yylval_literal(rb_float_new(d));
rb_float_new     3539 process.c      			 utime = rb_float_new((double)buf.tms_utime / HZ),
rb_float_new     3540 process.c      			 stime = rb_float_new((double)buf.tms_stime / HZ),
rb_float_new     3541 process.c      			 cutime = rb_float_new((double)buf.tms_cutime / HZ),
rb_float_new     3542 process.c      			 sctime = rb_float_new((double)buf.tms_cstime / HZ));
rb_float_new      465 random.c                           return rb_float_new(genrand_real());
rb_float_new      482 random.c       	return rb_float_new(genrand_real());
rb_float_new     2302 string.c           return rb_float_new(rb_str_to_dbl(str, Qfalse));
rb_float_new      859 time.c             return rb_float_new((double)tobj->tv.tv_sec+(double)tobj->tv.tv_usec/1e6);
rb_float_new     1307 time.c         	return rb_float_new(f);


rb_fork

rb_fork           415 intern.h       int rb_fork(int*, int (*)(void*), void*);
rb_fork          2879 io.c           	pid = rb_fork(&status, popen_exec, &arg);
rb_fork          2882 io.c           	pid = rb_fork(&status, 0, 0);
rb_fork          1417 process.c          switch (pid = rb_fork(0, 0, 0)) {
rb_fork          1548 process.c          status = rb_fork(&status, (int (*)(void*))rb_exec, &earg);
rb_fork          2770 process.c          switch (rb_fork(0, 0, 0)) {


rb_frame_this_func

rb_frame_this_func  147 intern.h       	    return rb_enumeratorize(obj, ID2SYM(rb_frame_this_func()),	\
rb_frame_this_func  227 intern.h       ID rb_frame_this_func(void);
rb_frame_this_func 4057 io.c               return rb_funcall3(current_file, rb_frame_this_func(), argc, argv);
rb_frame_this_func  151 numeric.c          return rb_funcall(x, rb_frame_this_func(), 1, y);
rb_frame_this_func  158 numeric.c      	return rb_funcall(x, rb_frame_this_func(), 1, y);
rb_frame_this_func  168 numeric.c      	NIL_P(c = rb_funcall(x, rb_frame_this_func(), 1, y))) {
rb_frame_this_func  112 struct.c           return rb_struct_getmember(obj, rb_frame_this_func());
rb_frame_this_func  159 struct.c       	if (rb_id_attrset(SYM2ID(slot)) == rb_frame_this_func()) {
rb_frame_this_func  163 struct.c           rb_name_error(rb_frame_this_func(), "`%s' is not a struct member",
rb_frame_this_func  164 struct.c       		  rb_id2name(rb_frame_this_func()));


rb_free_generic_ivar

rb_free_generic_ivar 1108 gc.c           	rb_free_generic_ivar((VALUE)obj);
rb_free_generic_ivar  544 intern.h       void rb_free_generic_ivar(VALUE);


rb_frozen_class_p

rb_frozen_class_p  350 class.c            rb_frozen_class_p(klass);
rb_frozen_class_p 1920 eval.c             rb_frozen_class_p(klass);
rb_frozen_class_p 2016 eval.c             rb_frozen_class_p(klass);
rb_frozen_class_p 3738 eval.c         	    rb_frozen_class_p(ruby_class);
rb_frozen_class_p  133 intern.h       void rb_frozen_class_p(VALUE);


rb_funcall

rb_funcall       1504 array.c            retval = rb_funcall(a, id_cmp, 1, b);
rb_funcall       2470 array.c        	VALUE v = rb_funcall(rb_ary_elt(ary1, i), id_cmp, 1, rb_ary_elt(ary2, i));
rb_funcall        190 class.c            return rb_funcall(super, rb_intern("inherited"), 1, klass);
rb_funcall         30 compar.c           if (RTEST(rb_funcall(val, '>', 1, INT2FIX(0)))) return 1;
rb_funcall         31 compar.c           if (RTEST(rb_funcall(val, '<', 1, INT2FIX(0)))) return -1;
rb_funcall         54 compar.c           VALUE c = rb_funcall(a[0], cmp, 1, a[1]);
rb_funcall         98 compar.c           VALUE c = rb_funcall(x, cmp, 1, y);
rb_funcall        115 compar.c           VALUE c = rb_funcall(x, cmp, 1, y);
rb_funcall        132 compar.c           VALUE c = rb_funcall(x, cmp, 1, y);
rb_funcall        149 compar.c           VALUE c = rb_funcall(x, cmp, 1, y);
rb_funcall        468 dir.c              return rb_funcall(dir, rb_intern("to_s"), 0, 0);
rb_funcall       1629 dir.c              VALUE dir = rb_funcall(rb_cDir, rb_intern("open"), 1, path);
rb_funcall         23 enum.c             return rb_funcall(obj, id_each, 0, 0);
rb_funcall         29 enum.c             if (RTEST(rb_funcall(arg[0], id_eqq, 1, i))) {
rb_funcall         38 enum.c             if (RTEST(rb_funcall(arg[0], id_eqq, 1, i))) {
rb_funcall        169 enum.c         	return rb_funcall(if_none, rb_intern("call"), 0, 0);
rb_funcall        441 enum.c             return rb_cmpint(rb_funcall(a, id_cmp, 1, b), a, b);
rb_funcall        742 enum.c         	cmp = rb_funcall(i, id_cmp, 1, *memo);
rb_funcall        801 enum.c         	cmp = rb_funcall(i, id_cmp, 1, *memo);
rb_funcall        860 enum.c             else if (rb_cmpint(rb_funcall(v, id_cmp, 1, memo[0]), v, memo[0]) < 0) {
rb_funcall        901 enum.c             else if (rb_cmpint(rb_funcall(v, id_cmp, 1, memo[0]), v, memo[0]) > 0) {
rb_funcall        271 error.c            return rb_funcall(etype, rb_intern("new"), 1, rb_str_new(ptr, len));
rb_funcall        284 error.c            return rb_funcall(etype, rb_intern("new"), 1, str);
rb_funcall        364 error.c            return rb_funcall(exc, rb_intern("to_s"), 0, 0);
rb_funcall        407 eval.c         	    rb_funcall(rb_iv_get(klass, "__attached__"), singleton_added, 1, ID2SYM(mid));
rb_funcall        410 eval.c         	    rb_funcall(klass, added, 1, ID2SYM(mid));
rb_funcall        538 eval.c         	rb_funcall(rb_iv_get(klass, "__attached__"), singleton_removed, 1, ID2SYM(mid));
rb_funcall        541 eval.c         	rb_funcall(klass, removed, 1, ID2SYM(mid));
rb_funcall       1120 eval.c             info = rb_funcall(info, rb_intern("backtrace"), 0);
rb_funcall       1128 eval.c             rb_funcall(info, rb_intern("set_backtrace"), 1, bt);
rb_funcall       1170 eval.c         	e = rb_funcall(ruby_errinfo, rb_intern("message"), 0, 0);
rb_funcall       1947 eval.c         	rb_funcall(rb_iv_get(klass, "__attached__"),
rb_funcall       1951 eval.c         	rb_funcall(klass, undefined, 1, ID2SYM(id));
rb_funcall       2050 eval.c         	rb_funcall(singleton, singleton_added, 1, ID2SYM(name));
rb_funcall       2053 eval.c         	rb_funcall(klass, added, 1, ID2SYM(name));
rb_funcall       2769 eval.c         		result = rb_funcall(l, match, 1, r);
rb_funcall       3404 eval.c         		val = rb_funcall(val, node->nd_mid, 1, rb_eval(self, rval));
rb_funcall       3418 eval.c         	    val = rb_funcall(recv, id, 0);
rb_funcall       3429 eval.c         		val = rb_funcall(val, node->nd_next->nd_mid, 1,
rb_funcall       3566 eval.c         		result = rb_funcall(klass, node->nd_mid, 0, 0);
rb_funcall       3702 eval.c         		result = rb_funcall(self, '`', 1, str);
rb_funcall       3715 eval.c         	result = rb_funcall(self, '`', 1, rb_str_new3(node->nd_lit));
rb_funcall       4481 eval.c         	mesg = rb_funcall(argv[0], exception, n, argv[1]);
rb_funcall       5157 eval.c         	if (RTEST(rb_funcall(*argv, eqq, 1, ruby_errinfo))) return 1;
rb_funcall       5382 eval.c         	args[n++] = rb_funcall(rb_const_get(exc, rb_intern("message")), '!',
rb_funcall       7265 eval.c         	rb_funcall(argv[argc], rb_intern("append_features"), 1, module);
rb_funcall       7266 eval.c         	rb_funcall(argv[argc], rb_intern("included"), 1, module);
rb_funcall       7354 eval.c         	rb_funcall(argv[argc], rb_intern("extend_object"), 1, obj);
rb_funcall       7355 eval.c         	rb_funcall(argv[argc], rb_intern("extended"), 1, obj);
rb_funcall       12957 eval.c             return rb_funcall(Qnil, rb_intern("catch"), 1, tag);
rb_funcall        435 ext/dbm/dbm.c      return rb_funcall(obj, rb_intern("each_pair"), 0, 0);
rb_funcall        436 ext/dl/cptr.c  	VALUE vptr = rb_funcall(val, id_to_ptr, 0);
rb_funcall        537 ext/gdbm/gdbm.c     return rb_funcall(obj, rb_intern("each_pair"), 0, 0);
rb_funcall        196 ext/openssl/ossl.c     return rb_funcall(args->proc, rb_intern("call"), 2,
rb_funcall        258 ext/openssl/ossl.c     tmp = rb_funcall(obj, ossl_s_to_der, 0);
rb_funcall        799 ext/openssl/ossl_asn1.c 	    asn1data = rb_funcall(klass, rb_intern("new"), 1, value);
rb_funcall        805 ext/openssl/ossl_asn1.c 	    asn1data = rb_funcall(cASN1Data, rb_intern("new"), 3,
rb_funcall         58 ext/openssl/ossl_config.c     str = rb_funcall(obj, rb_intern("to_s"), 0);
rb_funcall        122 ext/openssl/ossl_config.c     str = rb_funcall(self, rb_intern("to_s"), 0);
rb_funcall         99 ext/openssl/ossl_pkey.c     if (rb_funcall(obj, id_private_q, 0, NULL) != Qtrue) {
rb_funcall        123 ext/openssl/ossl_pkey.c     if (rb_funcall(obj, id_private_q, 0, NULL) != Qtrue) {
rb_funcall        166 ext/openssl/ossl_pkey.c     if (rb_funcall(self, id_private_q, 0, NULL) != Qtrue) {
rb_funcall        187 ext/openssl/ossl_ssl.c     ary = rb_funcall(cb, rb_intern("call"), 1, obj);
rb_funcall        224 ext/openssl/ossl_ssl.c     dh = rb_funcall(cb, rb_intern("call"), 3, args[0], args[1], args[2]);
rb_funcall        517 ext/openssl/ossl_ssl.c         ctx = rb_funcall(cSSLContext, rb_intern("new"), 0);
rb_funcall        661 ext/openssl/ossl_ssl.c         return rb_funcall(ossl_ssl_get_io(self), id_sysread, 2, len, str);
rb_funcall        705 ext/openssl/ossl_ssl.c 	return rb_funcall(ossl_ssl_get_io(self), id_syswrite, 1, str);
rb_funcall        720 ext/openssl/ossl_ssl.c 	rb_funcall(ossl_ssl_get_io(self), rb_intern("close"), 0);
rb_funcall        105 ext/openssl/ossl_x509attr.c     rb_funcall(self, rb_intern("oid="), 1, oid);
rb_funcall        106 ext/openssl/ossl_x509attr.c     rb_funcall(self, rb_intern("value="), 1, value);
rb_funcall        208 ext/openssl/ossl_x509attr.c     asn1 = rb_funcall(mASN1, rb_intern("decode"), 1, str);
rb_funcall        289 ext/openssl/ossl_x509ext.c     rb_funcall(self, rb_intern("oid="), 1, oid);
rb_funcall        290 ext/openssl/ossl_x509ext.c     rb_funcall(self, rb_intern("value="), 1, value);
rb_funcall        291 ext/openssl/ossl_x509ext.c     if(argc > 2) rb_funcall(self, rb_intern("critical="), 1, critical);
rb_funcall         92 ext/openssl/ossl_x509name.c #define rb_aref(obj, key) rb_funcall(obj, id_aref, 1, key)
rb_funcall        296 ext/openssl/ossl_x509store.c     ctx = rb_funcall(cX509StoreContext, rb_intern("new"), 3, self, cert, chain);
rb_funcall        300 ext/openssl/ossl_x509store.c     result = rb_funcall(ctx, rb_intern("verify"), 0);
rb_funcall        145 ext/pty/pty.c      rb_funcall(info->thread, rb_intern("raise"), 1, exc);
rb_funcall        302 ext/pty/pty.c      rb_funcall(info->thread, rb_intern("value"), 0);
rb_funcall        285 ext/racc/cparse/cparse.c     rb_funcall(v->lexer, v->lexmid, 0);
rb_funcall        467 ext/racc/cparse/cparse.c                 tmp = rb_funcall(v->parser, id_nexttoken, 0);
rb_funcall        475 ext/racc/cparse/cparse.c                 rb_funcall(v->parser, id_d_read_token,
rb_funcall        535 ext/racc/cparse/cparse.c             rb_funcall(v->parser, id_d_next_state,
rb_funcall        543 ext/racc/cparse/cparse.c     if (v->debug) rb_funcall(v->parser, id_d_accept, 0);
rb_funcall        553 ext/racc/cparse/cparse.c         rb_funcall(v->parser, id_onerror,
rb_funcall        614 ext/racc/cparse/cparse.c             rb_funcall(v->parser, id_d_e_pop,
rb_funcall        647 ext/racc/cparse/cparse.c         rb_funcall(v->parser, id_d_shift,
rb_funcall        670 ext/racc/cparse/cparse.c     return rb_funcall(rb_mKernel, id_catch, 1, sym_raccjump);
rb_funcall        717 ext/racc/cparse/cparse.c             tmp = rb_funcall(v->parser, mid,
rb_funcall        721 ext/racc/cparse/cparse.c             tmp = rb_funcall(v->parser, mid,
rb_funcall        730 ext/racc/cparse/cparse.c         rb_funcall(v->parser, id_d_reduce,
rb_funcall        177 ext/readline/readline.c     ary = rb_funcall(proc, rb_intern("call"), 1, rb_tainted_str_new2(text));
rb_funcall        413 ext/sdbm/init.c     return rb_funcall(obj, rb_intern("each_pair"), 0, 0);
rb_funcall        302 ext/syck/rubyext.c         time = rb_funcall(rb_cTime, s_utc, 6, year, mon, day, hour, min, sec);
rb_funcall        303 ext/syck/rubyext.c         tmp = NUM2LONG(rb_funcall(time, s_to_i, 0)) - tz_offset;
rb_funcall        304 ext/syck/rubyext.c         return rb_funcall(rb_cTime, s_at, 2, LONG2NUM(tmp), LONG2NUM(usec));
rb_funcall        309 ext/syck/rubyext.c         return rb_funcall(rb_cTime, s_utc, 7, year, mon, day, hour, min, sec, LONG2NUM(usec));
rb_funcall        325 ext/syck/rubyext.c         rb_funcall( hsh, s_update, 1, entry );
rb_funcall        364 ext/syck/rubyext.c                 rb_funcall( obj, s_tr_bang, 2, rb_str_new2( "\n\t " ), rb_str_new2( "" ) );
rb_funcall        365 ext/syck/rubyext.c                 arr = rb_funcall( obj, s_unpack, 1, rb_str_new2( "m" ) );
rb_funcall        495 ext/syck/rubyext.c                 obj = rb_funcall( cDate, s_new, 3, year, mon, day );
rb_funcall        503 ext/syck/rubyext.c                 obj = rb_funcall( cMergeKey, s_new, 0 );
rb_funcall        507 ext/syck/rubyext.c                 obj = rb_funcall( cDefaultKey, s_new, 0 );
rb_funcall        513 ext/syck/rubyext.c                 obj = rb_funcall( oDefaultResolver, s_transfer, 2,
rb_funcall        560 ext/syck/rubyext.c                         VALUE dup = rb_funcall( tmp, s_dup, 0 );
rb_funcall        561 ext/syck/rubyext.c                         rb_funcall( dup, s_update, 1, obj );
rb_funcall        571 ext/syck/rubyext.c                             VALUE dup = rb_funcall( tmph, s_dup, 0 );
rb_funcall        582 ext/syck/rubyext.c                     rb_funcall( obj, s_default_set, 1, v );
rb_funcall        620 ext/syck/rubyext.c     obj = rb_funcall( resolver, s_node_import, 1, Data_Wrap_Struct( cNode, NULL, NULL, n ) );
rb_funcall        633 ext/syck/rubyext.c     if ( bonus->proc != 0 ) rb_funcall(bonus->proc, s_call, 1, obj);
rb_funcall        687 ext/syck/rubyext.c         rb_funcall( p, s_set_resolver, 1, oGenericResolver );
rb_funcall        804 ext/syck/rubyext.c         int n = NUM2INT(rb_funcall(size, s_to_i, 0));
rb_funcall        892 ext/syck/rubyext.c         rb_funcall( proc, s_call, 1, v );
rb_funcall        996 ext/syck/rubyext.c                         VALUE dup = rb_funcall( v, s_dup, 0 );
rb_funcall        997 ext/syck/rubyext.c                         rb_funcall( dup, s_update, 1, obj );
rb_funcall       1006 ext/syck/rubyext.c                             VALUE dup = rb_funcall( end, s_dup, 0 );
rb_funcall       1017 ext/syck/rubyext.c                     rb_funcall( obj, s_default_set, 1, v );
rb_funcall       1031 ext/syck/rubyext.c         obj = rb_funcall( self, s_transfer, 2, rb_str_new2( n->type_id ), obj );
rb_funcall       1081 ext/syck/rubyext.c         type = rb_funcall( self, s_detect_implicit, 1, val );
rb_funcall       1120 ext/syck/rubyext.c                          RTEST( rb_funcall( target_class, s_tag_subclasses, 0 ) ) )
rb_funcall       1124 ext/syck/rubyext.c                         subclass = rb_funcall( target_class, s_tag_read_class, 1, subclass );
rb_funcall       1149 ext/syck/rubyext.c             obj = rb_funcall( target_class, s_call, 2, type, val );
rb_funcall       1155 ext/syck/rubyext.c                 obj = rb_funcall( target_class, s_yaml_new, 3, subclass, type, val );
rb_funcall       1162 ext/syck/rubyext.c                     rb_funcall( obj, s_yaml_initialize, 2, type, val );
rb_funcall       1176 ext/syck/rubyext.c                     obj = rb_funcall( cPrivateType, s_new, 2, name, val );
rb_funcall       1182 ext/syck/rubyext.c                     obj = rb_funcall( cDomainType, s_new, 3, domain, name, val );
rb_funcall       1243 ext/syck/rubyext.c         obj = rb_funcall( self, s_transfer, 2, rb_str_new2( n->type_id ), obj );
rb_funcall       1290 ext/syck/rubyext.c             obj = rb_funcall( cScalar, s_new, 3, t, v, style );
rb_funcall       1305 ext/syck/rubyext.c             obj = rb_funcall( cSeq, s_new, 3, t, v, style );
rb_funcall       1319 ext/syck/rubyext.c             obj = rb_funcall( cMap, s_new, 3, t, v, style );
rb_funcall       1346 ext/syck/rubyext.c     VALUE val = rb_funcall( str1, s_cmp, 1, str2 );
rb_funcall       1439 ext/syck/rubyext.c     rb_funcall( self, s_type_id_set, 1, type_id );
rb_funcall       1440 ext/syck/rubyext.c     rb_funcall( self, s_value_set, 1, val );
rb_funcall       1441 ext/syck/rubyext.c     rb_funcall( self, s_style_set, 1, style );
rb_funcall       1529 ext/syck/rubyext.c     rb_funcall( self, s_type_id_set, 1, type_id );
rb_funcall       1530 ext/syck/rubyext.c     rb_funcall( self, s_value_set, 1, val );
rb_funcall       1531 ext/syck/rubyext.c     rb_funcall( self, s_style_set, 1, style );
rb_funcall       1571 ext/syck/rubyext.c         val = rb_funcall( emitter, s_node_export, 1, val );
rb_funcall       1637 ext/syck/rubyext.c         keys = rb_funcall( hsh, s_keys, 0 );
rb_funcall       1646 ext/syck/rubyext.c     rb_funcall( self, s_type_id_set, 1, type_id );
rb_funcall       1647 ext/syck/rubyext.c     rb_funcall( self, s_value_set, 1, val );
rb_funcall       1648 ext/syck/rubyext.c     rb_funcall( self, s_style_set, 1, style );
rb_funcall       1673 ext/syck/rubyext.c         keys = rb_funcall( hsh, s_keys, 0 );
rb_funcall       1697 ext/syck/rubyext.c         key = rb_funcall( emitter, s_node_export, 1, key );
rb_funcall       1698 ext/syck/rubyext.c         val = rb_funcall( emitter, s_node_export, 1, val );
rb_funcall       1795 ext/syck/rubyext.c                     syck_map_add( n, rb_funcall( syck_map_read( orig_n, map_key, i ), s_transform, 0 ),
rb_funcall       1796 ext/syck/rubyext.c                                      rb_funcall( syck_map_read( orig_n, map_value, i ), s_transform, 0 ) );
rb_funcall       1807 ext/syck/rubyext.c                     syck_seq_add( n, rb_funcall( syck_seq_read( orig_n, i ), s_transform, 0 ) );
rb_funcall       1826 ext/syck/rubyext.c     return rb_funcall( oDefaultResolver, s_node_import, 1, t );
rb_funcall       1956 ext/syck/rubyext.c     rb_ivar_set( pobj, s_out, rb_funcall( cOut, s_new, 1, pobj ) );
rb_funcall       2028 ext/syck/rubyext.c     if ( !NIL_P( oid ) && RTEST( rb_funcall( bonus->data, s_haskey, 1, oid ) ) ) {
rb_funcall       2031 ext/syck/rubyext.c         symple = rb_funcall( proc, s_call, 1, rb_ivar_get( self, s_out ) );
rb_funcall       2056 ext/syck/rubyext.c     return rb_funcall( node, s_to_yaml, 1, self );
rb_funcall       2094 ext/syck/rubyext.c     map = rb_funcall( cMap, s_new, 3, type_id, rb_hash_new(), style );
rb_funcall       2113 ext/syck/rubyext.c     seq = rb_funcall( cSeq, s_new, 3, type_id, rb_ary_new(), style );
rb_funcall       2134 ext/syck/rubyext.c     scalar = rb_funcall( cScalar, s_new, 3, type_id, str, style );
rb_funcall       2228 ext/syck/rubyext.c     oDefaultResolver = rb_funcall( cResolver, rb_intern( "new" ), 0 );
rb_funcall       2233 ext/syck/rubyext.c     oGenericResolver = rb_funcall( cResolver, rb_intern( "new" ), 0 );
rb_funcall       1131 ext/tk/tcltklib.c         divmod = rb_funcall(time, rb_intern("divmod"), 1, LONG2NUM(1000000));
rb_funcall       1138 ext/tk/tcltklib.c         divmod = rb_funcall(time, rb_intern("divmod"), 1, INT2FIX(1));
rb_funcall       1144 ext/tk/tcltklib.c                  RSTRING(rb_funcall(time, ID_inspect, 0, 0))->ptr);
rb_funcall       1716 ext/tk/tcltklib.c         if (RTEST(rb_funcall(eventloop_thread, ID_alive_p, 0, 0))) {
rb_funcall       1753 ext/tk/tcltklib.c         while(!RTEST(rb_funcall(parent_evloop, ID_stop_p, 0))) {
rb_funcall       1850 ext/tk/tcltklib.c         if (RTEST(rb_funcall(watchdog_thread, ID_stop_p, 0))) {
rb_funcall       1851 ext/tk/tcltklib.c             rb_funcall(watchdog_thread, ID_kill, 0);
rb_funcall       1873 ext/tk/tcltklib.c             if (RTEST(rb_funcall(eventloop_thread, ID_stop_p, 0))) {
rb_funcall       1956 ext/tk/tcltklib.c     return rb_funcall(q->proc, ID_call, 0);
rb_funcall       1982 ext/tk/tcltklib.c     return rb_funcall(th, ID_value, 0);
rb_funcall       2013 ext/tk/tcltklib.c     if (RTEST(rb_funcall(th, ID_alive_p, 0))) {
rb_funcall       2014 ext/tk/tcltklib.c         rb_funcall(th, ID_kill, 0);
rb_funcall       2134 ext/tk/tcltklib.c     msg = rb_funcall(exc, ID_message, 0, 0);
rb_funcall       2146 ext/tk/tcltklib.c         enc = rb_funcall(enc, ID_to_s, 0, 0);
rb_funcall       2189 ext/tk/tcltklib.c         return rb_funcall(obj, ID_join, 1, rb_str_new2(" "));
rb_funcall       2193 ext/tk/tcltklib.c             return rb_funcall(obj, ID_to_s, 0, 0);
rb_funcall       2197 ext/tk/tcltklib.c     return rb_funcall(obj, ID_inspect, 0, 0);
rb_funcall       2306 ext/tk/tcltklib.c         if (!NIL_P(backtrace = rb_funcall(exc, ID_backtrace, 0, 0))) {
rb_funcall       5433 ext/tk/tcltklib.c         ret = rb_funcall(rb_proc_new(callq_safelevel_handler, q_dat),
rb_funcall       5752 ext/tk/tcltklib.c         ret = rb_funcall(rb_proc_new(evq_safelevel_handler, q_dat),
rb_funcall       6372 ext/tk/tcltklib.c     enc_name = rb_funcall(enc_name, ID_to_s, 0, 0);
rb_funcall       6826 ext/tk/tcltklib.c         ret = rb_funcall(rb_proc_new(ivq_safelevel_handler, q_dat),
rb_funcall        114 ext/tk/tkutil/tkutil.c     id_num = rb_funcall(id_num, ID_to_s, 0, 0);
rb_funcall        210 ext/tk/tkutil/tkutil.c     rb_hash_aset(hash, rb_funcall(key, ID_to_s, 0, 0), value);
rb_funcall        246 ext/tk/tkutil/tkutil.c     sys_enc = rb_funcall(cTclTkLib, ID_encoding, 0, 0);
rb_funcall        248 ext/tk/tkutil/tkutil.c       sys_enc = rb_funcall(cTclTkLib, ID_encoding_system, 0, 0);
rb_funcall        249 ext/tk/tkutil/tkutil.c       sys_enc = rb_funcall(sys_enc, ID_to_s, 0, 0);
rb_funcall        259 ext/tk/tkutil/tkutil.c         dst_enc = rb_funcall(enc_flag, ID_to_s, 0, 0);
rb_funcall        286 ext/tk/tkutil/tkutil.c                     str_enc = rb_funcall(str_enc, ID_to_s, 0, 0);
rb_funcall        333 ext/tk/tkutil/tkutil.c                         str_enc = rb_funcall(str_enc, ID_to_s, 0, 0);
rb_funcall        353 ext/tk/tkutil/tkutil.c                         str_enc = rb_funcall(str_enc, ID_to_s, 0, 0);
rb_funcall        370 ext/tk/tkutil/tkutil.c                 str_val = rb_funcall(self, ID_toUTF8, 1, str_val);
rb_funcall        372 ext/tk/tkutil/tkutil.c                 str_val = rb_funcall(cTclTkLib, ID_toUTF8, 1, str_val);
rb_funcall        378 ext/tk/tkutil/tkutil.c             val = rb_funcall(cTclTkLib, ID_fromUTF8, 2, val, dst_enc);
rb_funcall        400 ext/tk/tkutil/tkutil.c     sys_enc = rb_funcall(cTclTkLib, ID_encoding, 0, 0);
rb_funcall        402 ext/tk/tkutil/tkutil.c       sys_enc = rb_funcall(cTclTkLib, ID_encoding_system, 0, 0);
rb_funcall        403 ext/tk/tkutil/tkutil.c       sys_enc = rb_funcall(sys_enc, ID_to_s, 0, 0);
rb_funcall        413 ext/tk/tkutil/tkutil.c         dst_enc = rb_funcall(enc_flag, ID_to_s, 0, 0);
rb_funcall        448 ext/tk/tkutil/tkutil.c                     str_enc = rb_funcall(str_enc, ID_to_s, 0, 0);
rb_funcall        464 ext/tk/tkutil/tkutil.c                 str_val = rb_funcall(self, ID_toUTF8, 1, str_val);
rb_funcall        466 ext/tk/tkutil/tkutil.c                 str_val = rb_funcall(cTclTkLib, ID_toUTF8, 1, str_val);
rb_funcall        472 ext/tk/tkutil/tkutil.c             val = rb_funcall(cTclTkLib, ID_fromUTF8, 2, val, dst_enc);
rb_funcall        487 ext/tk/tkutil/tkutil.c     return rb_str_append(rb_str_new2("-"), rb_funcall(key, ID_to_s, 0, 0));
rb_funcall        778 ext/tk/tkutil/tkutil.c         return rb_funcall(obj, ID_to_s, 0, 0);
rb_funcall        783 ext/tk/tkutil/tkutil.c                 return rb_funcall(self, ID_toUTF8, 1, obj);
rb_funcall        794 ext/tk/tkutil/tkutil.c                 return rb_funcall(self, ID_toUTF8, 1,
rb_funcall        823 ext/tk/tkutil/tkutil.c         return rb_funcall(obj, ID_source, 0, 0);
rb_funcall        828 ext/tk/tkutil/tkutil.c             return get_eval_string_core(rb_funcall(obj, ID_path, 0, 0),
rb_funcall        836 ext/tk/tkutil/tkutil.c                 return rb_funcall(self, ID_install_cmd, 1, obj);
rb_funcall        846 ext/tk/tkutil/tkutil.c             return get_eval_string_core(rb_funcall(obj, ID_to_eval, 0, 0),
rb_funcall        850 ext/tk/tkutil/tkutil.c             return get_eval_string_core(rb_funcall(obj, ID_path, 0, 0),
rb_funcall        853 ext/tk/tkutil/tkutil.c             return rb_funcall(obj, ID_to_s, 0, 0);
rb_funcall        858 ext/tk/tkutil/tkutil.c                RSTRING(rb_funcall(obj, rb_intern("inspect"), 0, 0))->ptr);
rb_funcall        960 ext/tk/tkutil/tkutil.c     value = rb_funcall(value, ID_downcase, 0);
rb_funcall       1220 ext/tk/tkutil/tkutil.c     return rb_funcall(inf->aliases, rb_intern("update"), 1, tbl);
rb_funcall       1294 ext/tk/tkutil/tkutil.c     list = rb_funcall(cTclTkLib, ID_split_tklist, 1, str);
rb_funcall       1466 ext/tk/tkutil/tkutil.c                 = rb_funcall(proc, ID_call, 1, RARRAY(val_ary)->ptr[idx]);
rb_funcall        455 ext/win32ole/win32ole.c     y = FIX2INT(rb_funcall(tmobj, rb_intern("year"), 0));
rb_funcall        456 ext/win32ole/win32ole.c     m = FIX2INT(rb_funcall(tmobj, rb_intern("month"), 0));
rb_funcall        457 ext/win32ole/win32ole.c     d = FIX2INT(rb_funcall(tmobj, rb_intern("mday"), 0));
rb_funcall        458 ext/win32ole/win32ole.c     hh = FIX2INT(rb_funcall(tmobj, rb_intern("hour"), 0));
rb_funcall        459 ext/win32ole/win32ole.c     mm = FIX2INT(rb_funcall(tmobj, rb_intern("min"), 0));
rb_funcall        460 ext/win32ole/win32ole.c     ss = FIX2INT(rb_funcall(tmobj, rb_intern("sec"), 0));
rb_funcall       1956 ext/win32ole/win32ole.c         helpfile = rb_funcall(target, rb_intern("helpfile"), 0);
rb_funcall       1962 ext/win32ole/win32ole.c         helpcontext = rb_funcall(target, rb_intern("helpcontext"), 0);
rb_funcall       2217 ext/win32ole/win32ole.c         cNamedArgs = NUM2INT(rb_funcall(param, rb_intern("length"), 0));
rb_funcall       3811 ext/win32ole/win32ole.c                 typelib = rb_funcall(cWIN32OLE_TYPELIB, rb_intern("allocate"), 0);
rb_funcall       4168 ext/win32ole/win32ole.c     path = rb_funcall(self, rb_intern("path"), 0);
rb_funcall       6745 ext/win32ole/win32ole.c         = NUM2INT(rb_funcall(ary_ole_event, rb_intern("length"), 0));
rb_funcall       1810 ext/zlib/zlib.c 	rb_funcall(io, id_close, 0);
rb_funcall       1823 ext/zlib/zlib.c 	rb_funcall(gz->io, id_write, 1, str);
rb_funcall       1826 ext/zlib/zlib.c 	    rb_funcall(gz->io, id_flush, 0);
rb_funcall       1837 ext/zlib/zlib.c     str = rb_funcall(gz->io, id_readpartial, 1, INT2FIX(GZFILE_READ_SIZE));
rb_funcall       1849 ext/zlib/zlib.c         str = rb_funcall(gz->io, id_read, 1, INT2FIX(GZFILE_READ_SIZE));
rb_funcall       2330 ext/zlib/zlib.c     rb_funcall(gz->io, id_seek, 2, rb_int2inum(-n), INT2FIX(1));
rb_funcall       2830 ext/zlib/zlib.c 	rb_funcall(gz->io, id_flush, 0);
rb_funcall        112 file.c         	obj = rb_funcall(obj, to_path, 0, 0);
rb_funcall         70 hash.c             return rb_funcall(obj, id_hash, 0);
rb_funcall         89 hash.c         	hval = rb_funcall(a, id_hash, 0);
rb_funcall         91 hash.c         	    hval = rb_funcall(hval, '%', 1, INT2FIX(536870923));
rb_funcall        394 hash.c         	return rb_funcall(hash, id_default, 1, key);
rb_funcall        479 hash.c         	return rb_funcall(RHASH(hash)->ifnone, id_call, 2, hash, key);
rb_funcall        661 hash.c         	return rb_funcall(RHASH(hash)->ifnone, id_call, 2, hash, Qnil);
rb_funcall        655 io.c           	return rb_funcall(io, id_write, 1, str);
rb_funcall        672 io.c               return rb_funcall(io, id_write, 1, str);
rb_funcall        720 io.c                   return rb_funcall(io, id_flush, 0);
rb_funcall       2097 io.c               return rb_funcall(io, rb_intern("close"), 0, 0);
rb_funcall        462 marshal.c      	    v = rb_funcall(obj, s_mdump, 0, 0);
rb_funcall        471 marshal.c      	    v = rb_funcall(obj, s_dump, 1, INT2NUM(limit));
rb_funcall        616 marshal.c      		v = rb_funcall(obj, s_dump_data, 0);
rb_funcall       1172 marshal.c      	    v = rb_funcall(klass, s_load, 1, data);
rb_funcall       1195 marshal.c      	    rb_funcall(v, s_mload, 1, data);
rb_funcall       1221 marshal.c      	       v = rb_funcall(klass, s_alloc, 0);
rb_funcall       1235 marshal.c                 rb_funcall(v, s_load_data, 1, r_object0(arg, 0, 0, extmod));
rb_funcall       1278 marshal.c      	rb_funcall(proc, rb_intern("call"), 1, v);
rb_funcall        110 numeric.c          return rb_funcall(x[1], id_coerce, 1, x[0]);
rb_funcall        151 numeric.c          return rb_funcall(x, rb_frame_this_func(), 1, y);
rb_funcall        158 numeric.c      	return rb_funcall(x, rb_frame_this_func(), 1, y);
rb_funcall        168 numeric.c      	NIL_P(c = rb_funcall(x, rb_frame_this_func(), 1, y))) {
rb_funcall        229 numeric.c          return rb_funcall(zero, '-', 1, num);
rb_funcall        242 numeric.c          return rb_funcall(x, '/', 1, y);
rb_funcall        260 numeric.c          return num_floor(rb_funcall(x, '/', 1, y));
rb_funcall        307 numeric.c          return rb_assoc_new(num_div(x, y), rb_funcall(x, '%', 1, y));
rb_funcall        321 numeric.c          return rb_funcall(x, '%', 1, y);
rb_funcall        339 numeric.c          VALUE z = rb_funcall(x, '%', 1, y);
rb_funcall        342 numeric.c      	((RTEST(rb_funcall(x, '<', 1, INT2FIX(0))) &&
rb_funcall        343 numeric.c      	  RTEST(rb_funcall(y, '>', 1, INT2FIX(0)))) ||
rb_funcall        344 numeric.c      	 (RTEST(rb_funcall(x, '>', 1, INT2FIX(0))) &&
rb_funcall        345 numeric.c      	  RTEST(rb_funcall(y, '<', 1, INT2FIX(0)))))) {
rb_funcall        346 numeric.c      	return rb_funcall(z, '-', 1, y);
rb_funcall        393 numeric.c          if (RTEST(rb_funcall(num, '<', 1, INT2FIX(0)))) {
rb_funcall        394 numeric.c      	return rb_funcall(num, rb_intern("-@"), 0);
rb_funcall        432 numeric.c          if (RTEST(rb_funcall(num, rb_intern("zero?"), 0, 0))) {
rb_funcall        449 numeric.c          return rb_funcall(num, id_to_i, 0, 0);
rb_funcall        783 numeric.c          return rb_funcall(y, id_eq, 1, x);
rb_funcall       1440 numeric.c      	if (RTEST(rb_funcall(step, '>', 1, INT2FIX(0)))) {
rb_funcall       1447 numeric.c      	    if (RTEST(rb_funcall(i, cmp, 1, to))) break;
rb_funcall       1449 numeric.c      	    i = rb_funcall(i, '+', 1, step);
rb_funcall       1551 numeric.c          if (RTEST(rb_funcall(INT2FIX(0), '<', 1, val))) {
rb_funcall       1714 numeric.c          return rb_funcall(num, '+', 1, INT2FIX(1));
rb_funcall       1789 numeric.c             return rb_funcall(x, id_to_i, 0);
rb_funcall       1809 numeric.c             return rb_funcall(x, rb_intern("to_f"), 0);
rb_funcall       2686 numeric.c      	while (!(c = rb_funcall(i, '>', 1, to))) {
rb_funcall       2688 numeric.c      	    i = rb_funcall(i, '+', 1, INT2FIX(1));
rb_funcall       2724 numeric.c      	while (!(c = rb_funcall(i, '<', 1, to))) {
rb_funcall       2726 numeric.c      	    i = rb_funcall(i, '-', 1, INT2FIX(1));
rb_funcall       2764 numeric.c      	    if (!RTEST(rb_funcall(i, '<', 1, num))) break;
rb_funcall       2766 numeric.c      	    i = rb_funcall(i, '+', 1, INT2FIX(1));
rb_funcall         51 object.c           result = rb_funcall(obj1, id_eq, 1, obj2);
rb_funcall         59 object.c           return RTEST(rb_funcall(obj1, id_eql, 1, obj2));
rb_funcall        188 object.c           rb_funcall(dest, id_init_copy, 1, obj);
rb_funcall        301 object.c           return rb_obj_as_string(rb_funcall(obj, id_inspect, 0, 0));
rb_funcall        372 object.c           return rb_funcall(obj, rb_intern("to_s"), 0, 0);
rb_funcall       1422 object.c           obj = rb_funcall(klass, ID_ALLOCATOR, 0, 0);
rb_funcall       1934 object.c           return rb_funcall(val, m, 0);
rb_funcall       5550 parse.y        	rb_funcall(name, rb_intern("downcase!"), 0);
rb_funcall       7864 parse.y        	node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0);
rb_funcall       8873 parse.y            return rb_funcall(parser->value, mid, 0);
rb_funcall       8880 parse.y            return rb_funcall(parser->value, mid, 1, a);
rb_funcall       8888 parse.y            return rb_funcall(parser->value, mid, 2, a, b);
rb_funcall       8897 parse.y            return rb_funcall(parser->value, mid, 3, a, b, c);
rb_funcall       8907 parse.y            return rb_funcall(parser->value, mid, 4, a, b, c, d);
rb_funcall       8918 parse.y            return rb_funcall(parser->value, mid, 5, a, b, c, d, e);
rb_funcall       9033 parse.y            rb_funcall(parser->value, rb_intern("compile_error"), 1, str);
rb_funcall       9039 parse.y            rb_funcall(parser->value, rb_intern("warn"), 1, rb_str_new2(fmt));
rb_funcall       9045 parse.y            rb_funcall(parser->value, rb_intern("warn"), 2,
rb_funcall       9052 parse.y            rb_funcall(parser->value, rb_intern("warn"), 2,
rb_funcall       9059 parse.y            rb_funcall(parser->value, rb_intern("warning"), 1, rb_str_new2(fmt));
rb_funcall       9065 parse.y            rb_funcall(parser->value, rb_intern("warning"), 2,
rb_funcall       9072 parse.y            return rb_funcall(src, ripper_id_gets, 0);
rb_funcall         37 prec.c             return rb_funcall(klass, prc_if, 1, x);
rb_funcall         53 prec.c             return rb_funcall(x, prc_pr, 1, klass);
rb_funcall         69 prec.c             return rb_funcall(x, prc_pr, 1, klass);
rb_funcall         31 range.c            return rb_funcall(args[0], id_cmp, 1, args[1]);
rb_funcall        135 range.c            VALUE r = rb_funcall(a, id_cmp, 1, b);
rb_funcall        146 range.c            VALUE r = rb_funcall(a, id_cmp, 1, b);
rb_funcall        227 range.c        	    v = rb_funcall(v, id_succ, 0, 0);
rb_funcall        234 range.c        	    v = rb_funcall(v, id_succ, 0, 0);
rb_funcall        324 range.c        	    while (RTEST(rb_funcall(b, c, 1, e))) {
rb_funcall        326 range.c        		b = rb_funcall(b, '+', 1, step);
rb_funcall        460 range.c        	int c = rb_cmpint(rb_funcall(b, id_cmp, 1, e), b, e);
rb_funcall        490 range.c        	int c = rb_cmpint(rb_funcall(b, id_cmp, 1, e), b, e);
rb_funcall        497 range.c        	    return rb_funcall(e, '-', 1, INT2FIX(1));
rb_funcall        519 range.c        	excl = RTEST(rb_funcall(range, rb_intern("exclude_end?"), 0));
rb_funcall        541 ruby.h         VALUE rb_funcall(VALUE, ID, int, ...);
rb_funcall        266 string.c           str = rb_funcall(obj, id_to_s, 0);
rb_funcall        921 string.c       	    VALUE tmp = rb_funcall(str2, rb_intern("<=>"), 1, str1);
rb_funcall        925 string.c       		return rb_funcall(LONG2FIX(0), '-', 1, tmp);
rb_funcall       1202 string.c       	return rb_funcall(y, rb_intern("=~"), 1, x);
rb_funcall       1355 string.c           after_end = rb_funcall(end, succ, 0, 0);
rb_funcall       1360 string.c       	current = rb_funcall(current, succ, 0, 0);
rb_funcall       4008 string.c       	    sum = rb_funcall(sum, '+', 1, INT2FIX((unsigned char)*p));
rb_funcall       4014 string.c       	    mod = rb_funcall(INT2FIX(1), rb_intern("<<"), 1, INT2FIX(bits));
rb_funcall       4015 string.c       	    mod = rb_funcall(mod, '-', 1, INT2FIX(1));
rb_funcall       4016 string.c       	    sum = rb_funcall(sum, '&', 1, mod);
rb_funcall       1112 variable.c         return rb_funcall(klass, rb_intern("const_missing"), 1, ID2SYM(id));


rb_funcall2

rb_funcall2      1723 eval.c         	    val = rb_funcall2(cmd, rb_intern("call"), RARRAY(arg)->len, RARRAY(arg)->ptr);
rb_funcall2      2885 eval.c         			    if (RTEST(rb_funcall2(RARRAY(v)->ptr[i], eqq, 1, &val))){
rb_funcall2      2893 eval.c         		    if (RTEST(rb_funcall2(rb_eval(self, tag->nd_head), eqq, 1, &val))) {
rb_funcall2      3393 eval.c         	    val = rb_funcall2(recv, aref, argc-1, argv);
rb_funcall2      3407 eval.c         	    rb_funcall2(recv, aset, argc, argv);
rb_funcall2      3433 eval.c         	    rb_funcall2(recv, node->nd_next->nd_aid, 1, &val);
rb_funcall2      4024 eval.c         	return rb_funcall2(obj, respond_to, n, args);
rb_funcall2      5416 eval.c             return rb_funcall2(obj, missing, argc+1, nargv);
rb_funcall2      7275 eval.c             rb_funcall2(obj, init, argc, argv);
rb_funcall2       142 ext/iconv/iconv.c 	VALUE key = rb_funcall2(val, rb_intern("downcase"), 0, 0);
rb_funcall2        63 ext/openssl/ossl_asn1.c     return rb_funcall2(rb_cTime, rb_intern("utc"), 6, argv);
rb_funcall2      1908 ext/socket/socket.c         return rb_funcall2(klass, for_fd, ff_argc, ff_argv);
rb_funcall2       149 ext/syck/rubyext.c         VALUE str2 = rb_funcall2(src, s_read, 1, &n);
rb_funcall2       180 ext/syck/rubyext.c             rb_funcall2(port, s_binmode, 0, 0);
rb_funcall2       100 ext/tk/tkutil/tkutil.c     return rb_funcall2(rb_hash_aref(CALLBACK_TABLE, argv[0]),
rb_funcall2       169 ext/tk/tkutil/tkutil.c     return rb_funcall2(cTclTkLib, ID_toUTF8, argc, argv);
rb_funcall2       178 ext/tk/tkutil/tkutil.c     return rb_funcall2(cTclTkLib, ID_fromUTF8, argc, argv);
rb_funcall2       316 ext/win32ole/win32ole.c     v = rb_funcall2(p->obj, dispIdMember, args, parg);
rb_funcall2      3235 io.c           	    VALUE io = rb_funcall2(argv[0], to_open, argc-1, argv+1);
rb_funcall2       709 marshal.c      	    rb_funcall2(port, s_binmode, 0, 0);
rb_funcall2       758 marshal.c      	VALUE v = rb_funcall2(src, s_getc, 0, 0);
rb_funcall2       834 marshal.c      	str = rb_funcall2(src, s_read, 1, &n);
rb_funcall2      1328 marshal.c      	    rb_funcall2(port, s_binmode, 0, 0);
rb_funcall2       542 ruby.h         VALUE rb_funcall2(VALUE, ID, int, const VALUE*);
rb_funcall2      1233 string.c           return rb_funcall2(get_pat(re, 0), rb_intern("match"), argc, argv);


rb_funcall3

rb_funcall3      1059 ext/openssl/ossl_asn1.c { return rb_funcall3(cASN1##klass, rb_intern("new"), argc, argv); }
rb_funcall3      4057 io.c               return rb_funcall3(current_file, rb_frame_this_func(), argc, argv);
rb_funcall3      4075 io.c           	rb_funcall3(file, rb_intern("close"), 0, 0);
rb_funcall3      4266 io.c           	line = rb_funcall3(current_file, rb_intern("gets"), argc, argv);
rb_funcall3      4332 io.c           	return rb_funcall3(rb_stdin, rb_intern("getc"), 0, 0);
rb_funcall3      5207 io.c           	byte = rb_funcall3(current_file, rb_intern("getc"), 0, 0);
rb_funcall3       543 ruby.h         VALUE rb_funcall3(VALUE, ID, int, const VALUE*);


rb_gc

rb_gc             401 dir.c          	    rb_gc();
rb_gc             164 ext/iconv/iconv.c 	    rb_gc();
rb_gc             911 ext/socket/socket.c 	    rb_gc();
rb_gc            1410 ext/socket/socket.c 	    rb_gc();
rb_gc            2106 ext/socket/socket.c 	    rb_gc();
rb_gc            1382 gc.c               rb_gc();
rb_gc             307 intern.h       void rb_gc(void);
rb_gc             367 io.c           	    rb_gc();
rb_gc            2565 io.c           	    rb_gc();
rb_gc            2583 io.c           	    rb_gc();
rb_gc            2615 io.c           	    rb_gc();


rb_gc_abort_threads

rb_gc_abort_threads 1005 gc.c           void rb_gc_abort_threads(void);
rb_gc_abort_threads 1354 gc.c           	rb_gc_abort_threads();


rb_gc_call_finalizer_at_exit

rb_gc_call_finalizer_at_exit 1456 eval.c             rb_gc_call_finalizer_at_exit();
rb_gc_call_finalizer_at_exit  310 intern.h       void rb_gc_call_finalizer_at_exit(void);


rb_gc_copy_finalizer

rb_gc_copy_finalizer  308 intern.h       void rb_gc_copy_finalizer(VALUE,VALUE);
rb_gc_copy_finalizer  175 object.c           rb_gc_copy_finalizer(dest, obj);


rb_gc_disable

rb_gc_disable    2217 ext/tk/tcltklib.c         old_gc = rb_gc_disable();
rb_gc_disable    2537 ext/tk/tcltklib.c     old_gc = rb_gc_disable();
rb_gc_disable    7446 ext/tk/tcltklib.c         old_gc = rb_gc_disable();
rb_gc_disable    7483 ext/tk/tcltklib.c         old_gc = rb_gc_disable();
rb_gc_disable    7540 ext/tk/tcltklib.c     old_gc = rb_gc_disable();
rb_gc_disable     907 ext/tk/tkutil/tkutil.c     old_gc = rb_gc_disable();
rb_gc_disable    1441 ext/tk/tkutil/tkutil.c     old_gc = rb_gc_disable();
rb_gc_disable    1917 gc.c               rb_define_singleton_method(rb_mGC, "disable", rb_gc_disable, 0);
rb_gc_disable     312 intern.h       VALUE rb_gc_disable(void);


rb_gc_enable

rb_gc_enable     2286 ext/tk/tcltklib.c         if (old_gc == Qfalse) rb_gc_enable();
rb_gc_enable     2600 ext/tk/tcltklib.c     if (old_gc == Qfalse) rb_gc_enable();
rb_gc_enable     7456 ext/tk/tcltklib.c         if (old_gc == Qfalse) rb_gc_enable();
rb_gc_enable     7496 ext/tk/tcltklib.c         if (old_gc == Qfalse) rb_gc_enable();
rb_gc_enable     7586 ext/tk/tcltklib.c     if (old_gc == Qfalse) rb_gc_enable();
rb_gc_enable      932 ext/tk/tkutil/tkutil.c     if (old_gc == Qfalse) rb_gc_enable();
rb_gc_enable     1470 ext/tk/tkutil/tkutil.c     if (old_gc == Qfalse) rb_gc_enable();
rb_gc_enable     1916 gc.c               rb_define_singleton_method(rb_mGC, "enable", rb_gc_enable, 0);
rb_gc_enable      311 intern.h       VALUE rb_gc_enable(void);


rb_gc_finalize_deferred

rb_gc_finalize_deferred 5601 eval.c         	rb_gc_finalize_deferred();
rb_gc_finalize_deferred 1366 gc.c               rb_gc_finalize_deferred();
rb_gc_finalize_deferred  309 intern.h       void rb_gc_finalize_deferred(void);


rb_gc_force_recycle

rb_gc_force_recycle  989 eval.c         	    rb_gc_force_recycle((VALUE)ruby_scope);\
rb_gc_force_recycle 4856 eval.c         	    rb_gc_force_recycle((VALUE)ruby_dyna_vars);
rb_gc_force_recycle 4859 eval.c         		rb_gc_force_recycle((VALUE)vars);
rb_gc_force_recycle 5435 ext/tk/tcltklib.c         rb_gc_force_recycle(q_dat);
rb_gc_force_recycle 5754 ext/tk/tcltklib.c         rb_gc_force_recycle(q_dat);
rb_gc_force_recycle 6828 ext/tk/tcltklib.c         rb_gc_force_recycle(q_dat);
rb_gc_force_recycle  306 intern.h       void rb_gc_force_recycle(VALUE);
rb_gc_force_recycle 3020 parse.y        			    rb_gc_force_recycle((VALUE)$1);
rb_gc_force_recycle 4596 parse.y        	rb_gc_force_recycle((VALUE)tmp);
rb_gc_force_recycle 5057 parse.y            rb_gc_force_recycle(str);
rb_gc_force_recycle 5297 parse.y            rb_gc_force_recycle((VALUE)here);
rb_gc_force_recycle 5617 parse.y        		rb_gc_force_recycle((VALUE)lex_strterm);
rb_gc_force_recycle 7059 parse.y        	    rb_gc_force_recycle((VALUE)tail);
rb_gc_force_recycle 7070 parse.y        	    rb_gc_force_recycle((VALUE)head);
rb_gc_force_recycle 8824 parse.y        	    rb_gc_force_recycle((VALUE)n);
rb_gc_force_recycle  384 ruby.c             rb_gc_force_recycle((VALUE)save[1]);
rb_gc_force_recycle 1212 variable.c     		rb_gc_force_recycle(val);
rb_gc_force_recycle 1259 variable.c     	    rb_gc_force_recycle(val);


rb_gc_mark

rb_gc_mark         58 enumerator.c       rb_gc_mark(ptr->method);
rb_gc_mark         59 enumerator.c       rb_gc_mark(ptr->proc);
rb_gc_mark         60 enumerator.c       rb_gc_mark(ptr->args);
rb_gc_mark       7482 eval.c         	rb_gc_mark(link->data);
rb_gc_mark       7487 eval.c         	rb_gc_mark(link->data);
rb_gc_mark       7492 eval.c         	rb_gc_mark(link->data);
rb_gc_mark       7831 eval.c         	rb_gc_mark((VALUE)data->scope);
rb_gc_mark       7832 eval.c         	rb_gc_mark((VALUE)data->var);
rb_gc_mark       7833 eval.c         	rb_gc_mark((VALUE)data->body);
rb_gc_mark       7834 eval.c         	rb_gc_mark((VALUE)data->self);
rb_gc_mark       7835 eval.c         	rb_gc_mark((VALUE)data->dyna_vars);
rb_gc_mark       7836 eval.c         	rb_gc_mark((VALUE)data->cref);
rb_gc_mark       7837 eval.c         	rb_gc_mark(data->wrapper);
rb_gc_mark       7838 eval.c         	rb_gc_mark(data->block_obj);
rb_gc_mark       8631 eval.c             rb_gc_mark(data->rklass);
rb_gc_mark       8632 eval.c             rb_gc_mark(data->klass);
rb_gc_mark       8633 eval.c             rb_gc_mark(data->recv);
rb_gc_mark       8634 eval.c             rb_gc_mark((VALUE)data->body);
rb_gc_mark       9931 eval.c             rb_gc_mark(th->result);
rb_gc_mark       9932 eval.c             rb_gc_mark(th->thread);
rb_gc_mark       9933 eval.c             if (th->join) rb_gc_mark(th->join->thread);
rb_gc_mark       9935 eval.c             rb_gc_mark(th->klass);
rb_gc_mark       9936 eval.c             rb_gc_mark(th->wrapper);
rb_gc_mark       9937 eval.c             rb_gc_mark((VALUE)th->cref);
rb_gc_mark       9939 eval.c             rb_gc_mark((VALUE)th->scope);
rb_gc_mark       9940 eval.c             rb_gc_mark((VALUE)th->dyna_vars);
rb_gc_mark       9941 eval.c             rb_gc_mark(th->errinfo);
rb_gc_mark       9942 eval.c             rb_gc_mark(th->last_status);
rb_gc_mark       9943 eval.c             rb_gc_mark(th->last_line);
rb_gc_mark       9944 eval.c             rb_gc_mark(th->last_match);
rb_gc_mark       9946 eval.c             rb_gc_mark(th->thgroup);
rb_gc_mark       9994 eval.c             rb_gc_mark(((rb_thread_t)value)->thread);
rb_gc_mark       10004 eval.c             rb_gc_mark((VALUE)ruby_cref);
rb_gc_mark       10007 eval.c             rb_gc_mark(main_thread->thread);
rb_gc_mark       10008 eval.c             rb_gc_mark(curr_thread->thread);
rb_gc_mark       10019 eval.c         	rb_gc_mark(th->thread);
rb_gc_mark       10022 eval.c         	rb_gc_mark(new_thread.thread->thread);
rb_gc_mark       10023 eval.c         	rb_gc_mark(new_thread.proc);
rb_gc_mark       10024 eval.c         	rb_gc_mark(new_thread.arg);
rb_gc_mark       10041 eval.c         	    rb_gc_mark(th->thread);
rb_gc_mark         60 ext/stringio/stringio.c 	rb_gc_mark(ptr->string);
rb_gc_mark        160 ext/strscan/strscan.c     rb_gc_mark(p->str);
rb_gc_mark        725 ext/syck/rubyext.c     rb_gc_mark( bonus->data );
rb_gc_mark        726 ext/syck/rubyext.c     rb_gc_mark( bonus->proc );
rb_gc_mark        727 ext/syck/rubyext.c     rb_gc_mark( bonus->resolver );
rb_gc_mark       1401 ext/syck/rubyext.c                 rb_gc_mark( syck_seq_read( n, i ) );
rb_gc_mark       1408 ext/syck/rubyext.c                 rb_gc_mark( syck_map_read( n, map_key, i ) );
rb_gc_mark       1409 ext/syck/rubyext.c                 rb_gc_mark( syck_map_read( n, map_value, i ) );
rb_gc_mark       1922 ext/syck/rubyext.c     rb_gc_mark( bonus->oid  );
rb_gc_mark       1923 ext/syck/rubyext.c     rb_gc_mark( bonus->data );
rb_gc_mark       1924 ext/syck/rubyext.c     rb_gc_mark( bonus->port );
rb_gc_mark        282 ext/tk/tcltklib.c     rb_gc_mark(q->interp);
rb_gc_mark        283 ext/tk/tcltklib.c     rb_gc_mark(q->result);
rb_gc_mark        284 ext/tk/tcltklib.c     rb_gc_mark(q->thread);
rb_gc_mark        290 ext/tk/tcltklib.c     rb_gc_mark(q->interp);
rb_gc_mark        291 ext/tk/tcltklib.c     rb_gc_mark(q->result);
rb_gc_mark        292 ext/tk/tcltklib.c     rb_gc_mark(q->thread);
rb_gc_mark        301 ext/tk/tcltklib.c         rb_gc_mark(q->argv[i]);
rb_gc_mark        304 ext/tk/tcltklib.c     rb_gc_mark(q->interp);
rb_gc_mark        305 ext/tk/tcltklib.c     rb_gc_mark(q->result);
rb_gc_mark        306 ext/tk/tcltklib.c     rb_gc_mark(q->thread);
rb_gc_mark       1948 ext/tk/tcltklib.c     rb_gc_mark(q->proc);
rb_gc_mark       1093 ext/tk/tkutil/tkutil.c     rb_gc_mark(ptr->proc);
rb_gc_mark       1094 ext/tk/tkutil/tkutil.c     rb_gc_mark(ptr->aliases);
rb_gc_mark        815 ext/zlib/zlib.c     rb_gc_mark(z->buf);
rb_gc_mark        816 ext/zlib/zlib.c     rb_gc_mark(z->input);
rb_gc_mark       1743 ext/zlib/zlib.c     rb_gc_mark(gz->io);
rb_gc_mark       1744 ext/zlib/zlib.c     rb_gc_mark(gz->orig_name);
rb_gc_mark       1745 ext/zlib/zlib.c     rb_gc_mark(gz->comment);
rb_gc_mark        305 intern.h       void rb_gc_mark(VALUE);
rb_gc_mark       8697 parse.y            rb_gc_mark((VALUE)p->parser_lex_strterm);
rb_gc_mark       8698 parse.y            rb_gc_mark(p->parser_lex_input);
rb_gc_mark       8699 parse.y            rb_gc_mark(p->parser_lex_lastline);
rb_gc_mark       8701 parse.y            rb_gc_mark((VALUE)p->parser_eval_tree_begin) ;
rb_gc_mark       8702 parse.y            rb_gc_mark((VALUE)p->parser_eval_tree) ;
rb_gc_mark       8703 parse.y            rb_gc_mark(p->debug_lines);
rb_gc_mark       8705 parse.y            rb_gc_mark(p->parser_ruby_sourcefile);
rb_gc_mark       8706 parse.y            rb_gc_mark(p->delayed);
rb_gc_mark       8707 parse.y            rb_gc_mark(p->value);
rb_gc_mark       8708 parse.y            rb_gc_mark(p->result);
rb_gc_mark       8709 parse.y            rb_gc_mark(p->parsing_thread);
rb_gc_mark       8712 parse.y            rb_gc_mark((VALUE)p->heap);
rb_gc_mark        315 signal.c       	    rb_gc_mark(trap_list[i].cmd);
rb_gc_mark        862 variable.c         rb_gc_mark(value);


rb_gc_mark_frame

rb_gc_mark_frame   30 env.h          void rb_gc_mark_frame(struct FRAME *);
rb_gc_mark_frame 7830 eval.c         	rb_gc_mark_frame(&data->frame);
rb_gc_mark_frame 9966 eval.c         	rb_gc_mark_frame(frame);
rb_gc_mark_frame 9972 eval.c         		rb_gc_mark_frame(tmp);
rb_gc_mark_frame 9981 eval.c         	rb_gc_mark_frame(&block->frame);
rb_gc_mark_frame 1289 gc.c           	rb_gc_mark_frame(frame);
rb_gc_mark_frame 1293 gc.c           		rb_gc_mark_frame(tmp);


rb_gc_mark_global_tbl

rb_gc_mark_global_tbl 1334 gc.c               rb_gc_mark_global_tbl();
rb_gc_mark_global_tbl  535 intern.h       void rb_gc_mark_global_tbl(void);


rb_gc_mark_locations

rb_gc_mark_locations  641 error.c            rb_gc_mark_locations(ptr, ptr+3);
rb_gc_mark_locations 9953 eval.c         	rb_gc_mark_locations(th->stk_ptr, th->stk_ptr+th->stk_len);
rb_gc_mark_locations 9955 eval.c         	rb_gc_mark_locations(th->stk_ptr+2, th->stk_ptr+th->stk_len+2);
rb_gc_mark_locations 9959 eval.c         	    rb_gc_mark_locations(th->bstr_ptr, th->bstr_ptr+th->bstr_len);
rb_gc_mark_locations 1309 gc.c               rb_gc_mark_locations((VALUE*)STACK_END, rb_gc_stack_start);
rb_gc_mark_locations 1311 gc.c               rb_gc_mark_locations(rb_gc_stack_start, (VALUE*)STACK_END + 1);
rb_gc_mark_locations 1314 gc.c           	rb_gc_mark_locations((VALUE*)STACK_END, rb_gc_stack_start);
rb_gc_mark_locations 1316 gc.c           	rb_gc_mark_locations(rb_gc_stack_start, (VALUE*)STACK_END + 1);
rb_gc_mark_locations 1321 gc.c               rb_gc_mark_locations(rb_gc_register_stack_start, (VALUE*)rb_ia64_bsp());
rb_gc_mark_locations 1324 gc.c               rb_gc_mark_locations((VALUE*)((char*)STACK_END + 2),
rb_gc_mark_locations  301 intern.h       void rb_gc_mark_locations(VALUE*, VALUE*);


rb_gc_mark_maybe

rb_gc_mark_maybe  723 ext/syck/rubyext.c     rb_gc_mark_maybe(parser->root);
rb_gc_mark_maybe  724 ext/syck/rubyext.c     rb_gc_mark_maybe(parser->root_on_error);
rb_gc_mark_maybe 1395 ext/syck/rubyext.c     rb_gc_mark_maybe( n->id );
rb_gc_mark_maybe 1331 gc.c           	rb_gc_mark_maybe(*list->varptr);
rb_gc_mark_maybe  304 intern.h       void rb_gc_mark_maybe(VALUE);
rb_gc_mark_maybe  381 variable.c         if (data) rb_gc_mark_maybe(data);
rb_gc_mark_maybe  400 variable.c         if (var) rb_gc_mark_maybe(*var);
rb_gc_mark_maybe  418 variable.c     	if (trace->data) rb_gc_mark_maybe(trace->data);


rb_gc_mark_parser

rb_gc_mark_parser 1342 gc.c               rb_gc_mark_parser();
rb_gc_mark_parser  393 intern.h       void rb_gc_mark_parser(void);


rb_gc_mark_threads

rb_gc_mark_threads 1327 gc.c               rb_gc_mark_threads();
rb_gc_mark_threads  256 intern.h       void rb_gc_mark_threads(void);


rb_gc_mark_trap_list

rb_gc_mark_trap_list 1337 gc.c               rb_gc_mark_trap_list();
rb_gc_mark_trap_list  456 intern.h       void rb_gc_mark_trap_list(void);


rb_gc_register_address

rb_gc_register_address 1448 ext/curses/curses.c     rb_gc_register_address(&rb_stdscr);
rb_gc_register_address 1086 ext/iconv/iconv.c     rb_gc_register_address(&charset_map);
rb_gc_register_address  281 gc.c               rb_gc_register_address(var);
rb_gc_register_address 1933 gc.c               rb_gc_register_address(&rb_mObSpace);
rb_gc_register_address  526 ruby.h         void rb_gc_register_address(VALUE*);


rb_gc_start

rb_gc_start      1915 gc.c               rb_define_singleton_method(rb_mGC, "start", rb_gc_start, 0);
rb_gc_start      1918 gc.c               rb_define_method(rb_mGC, "garbage_collect", rb_gc_start, 0);
rb_gc_start      1922 gc.c               rb_define_module_function(rb_mObSpace, "garbage_collect", rb_gc_start, 0);
rb_gc_start       313 intern.h       VALUE rb_gc_start(void);


rb_gc_unregister_address

rb_gc_unregister_address  162 ext/curses/curses.c     rb_gc_unregister_address(&rb_stdscr);
rb_gc_unregister_address 1935 gc.c               rb_gc_unregister_address(&rb_mObSpace);
rb_gc_unregister_address  527 ruby.h         void rb_gc_unregister_address(VALUE*);


rb_gdbm_delete

rb_gdbm_delete    419 ext/gdbm/gdbm.c     rb_gdbm_delete(obj, keystr);
rb_gdbm_delete    436 ext/gdbm/gdbm.c     rb_gdbm_delete(obj, keystr);
rb_gdbm_delete    467 ext/gdbm/gdbm.c         rb_gdbm_delete(obj, RARRAY(ary)->ptr[i]);


rb_gdbm_fetch

rb_gdbm_fetch     215 ext/gdbm/gdbm.c     return rb_gdbm_fetch(dbm, key);
rb_gdbm_fetch     732 ext/gdbm/gdbm.c 	valstr = rb_gdbm_fetch(dbm, key);


rb_gdbm_fetch2

rb_gdbm_fetch2    226 ext/gdbm/gdbm.c     return rb_gdbm_fetch2(dbm, keystr);
rb_gdbm_fetch2    325 ext/gdbm/gdbm.c 	valstr2 = rb_gdbm_fetch2(dbm, keystr);
rb_gdbm_fetch2    348 ext/gdbm/gdbm.c 	VALUE assoc = rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr));
rb_gdbm_fetch2    435 ext/gdbm/gdbm.c     valstr = rb_gdbm_fetch2(dbm, keystr);
rb_gdbm_fetch2    459 ext/gdbm/gdbm.c 	valstr = rb_gdbm_fetch2(dbm, keystr);
rb_gdbm_fetch2    524 ext/gdbm/gdbm.c 	valstr = rb_gdbm_fetch2(dbm, keystr);
rb_gdbm_fetch2    657 ext/gdbm/gdbm.c         rb_yield(rb_gdbm_fetch2(dbm, keystr));
rb_gdbm_fetch2    693 ext/gdbm/gdbm.c         rb_yield(rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr)));
rb_gdbm_fetch2    771 ext/gdbm/gdbm.c 	valstr2 = rb_gdbm_fetch2(dbm, keystr);
rb_gdbm_fetch2    796 ext/gdbm/gdbm.c         rb_ary_push(ary, rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr)));
rb_gdbm_fetch2    900 ext/gdbm/gdbm.c         rb_hash_aset(hash, keystr, rb_gdbm_fetch2(dbm, keystr));


rb_gdbm_fetch3

rb_gdbm_fetch3    280 ext/gdbm/gdbm.c     valstr = rb_gdbm_fetch3(obj, keystr);
rb_gdbm_fetch3    293 ext/gdbm/gdbm.c     return rb_gdbm_fetch3(obj, keystr);
rb_gdbm_fetch3    370 ext/gdbm/gdbm.c         rb_ary_push(new, rb_gdbm_fetch3(obj, argv[i]));


rb_gdbm_firstkey

rb_gdbm_firstkey  322 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
rb_gdbm_firstkey  346 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
rb_gdbm_firstkey  433 ext/gdbm/gdbm.c     keystr = rb_gdbm_firstkey(dbm);
rb_gdbm_firstkey  456 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
rb_gdbm_firstkey  522 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
rb_gdbm_firstkey  654 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
rb_gdbm_firstkey  672 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
rb_gdbm_firstkey  690 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
rb_gdbm_firstkey  710 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
rb_gdbm_firstkey  768 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
rb_gdbm_firstkey  793 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
rb_gdbm_firstkey  897 ext/gdbm/gdbm.c     for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);


rb_gdbm_modify

rb_gdbm_modify    392 ext/gdbm/gdbm.c     rb_gdbm_modify(obj);
rb_gdbm_modify    431 ext/gdbm/gdbm.c     rb_gdbm_modify(obj);
rb_gdbm_modify    451 ext/gdbm/gdbm.c     rb_gdbm_modify(obj);
rb_gdbm_modify    482 ext/gdbm/gdbm.c     rb_gdbm_modify(obj);
rb_gdbm_modify    579 ext/gdbm/gdbm.c     rb_gdbm_modify(obj);
rb_gdbm_modify    809 ext/gdbm/gdbm.c     rb_gdbm_modify(obj);
rb_gdbm_modify    822 ext/gdbm/gdbm.c     rb_gdbm_modify(obj);


rb_gdbm_nextkey

rb_gdbm_nextkey   323 ext/gdbm/gdbm.c          keystr = rb_gdbm_nextkey(dbm, keystr)) {
rb_gdbm_nextkey   347 ext/gdbm/gdbm.c 	 keystr = rb_gdbm_nextkey(dbm, keystr)) {
rb_gdbm_nextkey   457 ext/gdbm/gdbm.c          keystr = rb_gdbm_nextkey(dbm, keystr)) {
rb_gdbm_nextkey   523 ext/gdbm/gdbm.c          keystr = rb_gdbm_nextkey(dbm, keystr)) {
rb_gdbm_nextkey   655 ext/gdbm/gdbm.c          keystr = rb_gdbm_nextkey(dbm, keystr)) {
rb_gdbm_nextkey   673 ext/gdbm/gdbm.c          keystr = rb_gdbm_nextkey(dbm, keystr)) {
rb_gdbm_nextkey   691 ext/gdbm/gdbm.c          keystr = rb_gdbm_nextkey(dbm, keystr)) {
rb_gdbm_nextkey   711 ext/gdbm/gdbm.c          keystr = rb_gdbm_nextkey(dbm, keystr)) {
rb_gdbm_nextkey   769 ext/gdbm/gdbm.c          keystr = rb_gdbm_nextkey(dbm, keystr)) {
rb_gdbm_nextkey   794 ext/gdbm/gdbm.c          keystr = rb_gdbm_nextkey(dbm, keystr)) {
rb_gdbm_nextkey   898 ext/gdbm/gdbm.c          keystr = rb_gdbm_nextkey(dbm, keystr)) {


rb_generic_ivar_table

rb_generic_ivar_table  540 intern.h       struct st_table* rb_generic_ivar_table(VALUE);
rb_generic_ivar_table  426 marshal.c          if (ivtbl = rb_generic_ivar_table(obj)) {
rb_generic_ivar_table  475 marshal.c      	    if (!ivtbl && (ivtbl = rb_generic_ivar_table(v))) {


rb_get_kcode

rb_get_kcode      442 intern.h       const char* rb_get_kcode(void);
rb_get_kcode     4580 parse.y            kcode_save = rb_get_kcode();
rb_get_kcode     2083 re.c               return rb_str_new2(rb_get_kcode());


rb_get_method_body

rb_get_method_body  513 eval.c             return rb_get_method_body(&klass, &id, &noex);
rb_get_method_body  625 eval.c             if (rb_get_method_body(&klass, &id, &noex)) {
rb_get_method_body 2232 eval.c         		if (!rb_get_method_body(&val, &id, &noex))
rb_get_method_body 4123 eval.c             if (rb_get_method_body(&mod, &id, &noex)) {
rb_get_method_body 4162 eval.c             if (rb_get_method_body(&mod, &id, &noex)) {
rb_get_method_body 4201 eval.c             if (rb_get_method_body(&mod, &id, &noex)) {
rb_get_method_body 5790 eval.c             else if ((body = rb_get_method_body(&klass, &id, &noex)) == 0) {
rb_get_method_body 8648 eval.c             if ((body = rb_get_method_body(&klass, &id, &noex)) == 0) {


rb_get_path

rb_get_path       132 file.c         	path = rb_get_path(args->ptr[i]);
rb_get_path      2827 file.c             return rb_get_path(fname);
rb_get_path       256 ruby.h         VALUE rb_get_path(VALUE);
rb_get_path       257 ruby.h         #define FilePathValue(v) ((v) = rb_get_path(v))


rb_get_values_at

rb_get_values_at 1683 array.c            return rb_get_values_at(ary, RARRAY(ary)->len, argc, argv, rb_ary_entry);
rb_get_values_at   70 intern.h       VALUE rb_get_values_at(VALUE, long, int, VALUE*, VALUE(*)(VALUE,long));
rb_get_values_at 1214 re.c               return rb_get_values_at(match, RMATCH(match)->regs->num_regs, argc, argv, match_entry);
rb_get_values_at  665 struct.c           return rb_get_values_at(s, RSTRUCT(s)->len, argc, argv, struct_entry);


rb_gets

rb_gets          2780 eval.c         	    while (!NIL_P(rb_gets())) {
rb_gets           346 intern.h       VALUE rb_gets(void);


rb_glob

rb_glob           496 ruby.h         void rb_glob(const char*,void(*)(const char*,VALUE),VALUE);
rb_glob           348 util.c             rb_glob(buf, push_element, (VALUE)&info);


rb_glob_caller

rb_glob_caller   1365 dir.c              return ruby_glob0(path, flags | GLOB_VERBOSE, rb_glob_caller, (VALUE)&args);
rb_glob_caller   1474 dir.c              return ruby_brace_glob0(str, flags | GLOB_VERBOSE, rb_glob_caller, (VALUE)&args);


rb_global_entry

rb_global_entry   276 node.h         #define NEW_GASGN(v,val) NEW_NODE(NODE_GASGN,v,val,rb_global_entry(v))
rb_global_entry   289 node.h         #define NEW_GVAR(v) NEW_NODE(NODE_GVAR,v,0,rb_global_entry(v))
rb_global_entry   370 node.h         struct global_entry *rb_global_entry(ID);
rb_global_entry   457 variable.c         gvar = rb_global_entry(id)->var;
rb_global_entry   530 variable.c         entry = rb_global_entry(rb_to_id(var));
rb_global_entry   673 variable.c         entry = rb_global_entry(global_id(name));
rb_global_entry   682 variable.c         entry = rb_global_entry(global_id(name));
rb_global_entry   734 variable.c         entry2 = rb_global_entry(name2);


rb_global_variable

rb_global_variable 7623 eval.c             rb_global_variable((VALUE*)&top_scope);
rb_global_variable 7624 eval.c             rb_global_variable((VALUE*)&ruby_eval_tree);
rb_global_variable 7625 eval.c             rb_global_variable((VALUE*)&ruby_dyna_vars);
rb_global_variable 7638 eval.c             rb_global_variable((VALUE*)&basic_respond_to);
rb_global_variable 7700 eval.c             rb_global_variable(&trace_func);
rb_global_variable 7801 eval.c             rb_global_variable(&ruby_wrapper);
rb_global_variable 7803 eval.c             rb_global_variable(&ruby_dln_librefs);
rb_global_variable 9385 eval.c             rb_global_variable(&exception_error);
rb_global_variable 9389 eval.c             rb_global_variable(&sysstack_error);
rb_global_variable 12884 eval.c             rb_global_variable(&cont_protect);
rb_global_variable 12892 eval.c             rb_global_variable(&thgroup_default);
rb_global_variable  524 ext/etc/etc.c      rb_global_variable(&sPasswd);
rb_global_variable  552 ext/etc/etc.c      rb_global_variable(&sGroup);
rb_global_variable 2227 ext/syck/rubyext.c     rb_global_variable( &oDefaultResolver );
rb_global_variable 2232 ext/syck/rubyext.c     rb_global_variable( &oGenericResolver );
rb_global_variable 7710 ext/tk/tcltklib.c     rb_global_variable(&eTkCallbackReturn);
rb_global_variable 7711 ext/tk/tcltklib.c     rb_global_variable(&eTkCallbackBreak);
rb_global_variable 7712 ext/tk/tcltklib.c     rb_global_variable(&eTkCallbackContinue);
rb_global_variable 7714 ext/tk/tcltklib.c     rb_global_variable(&eventloop_thread);
rb_global_variable 7715 ext/tk/tcltklib.c     rb_global_variable(&eventloop_stack);
rb_global_variable 7716 ext/tk/tcltklib.c     rb_global_variable(&watchdog_thread);
rb_global_variable 7718 ext/tk/tcltklib.c     rb_global_variable(&rbtk_pending_exception);
rb_global_variable 1524 ext/tk/tkutil/tkutil.c     rb_global_variable(&cMethod);
rb_global_variable 1568 ext/tk/tkutil/tkutil.c     rb_global_variable(&cTkCallbackEntry);
rb_global_variable 1573 ext/tk/tkutil/tkutil.c     rb_global_variable(&cTkObject);
rb_global_variable 1579 ext/tk/tkutil/tkutil.c     rb_global_variable(&cTclTkLib);
rb_global_variable 1589 ext/tk/tkutil/tkutil.c     rb_global_variable(&TK_None);
rb_global_variable 1597 ext/tk/tkutil/tkutil.c     rb_global_variable(&CALLBACK_TABLE);
rb_global_variable 6907 ext/win32ole/win32ole.c     rb_global_variable(&ary_ole_event);
rb_global_variable 6918 ext/win32ole/win32ole.c     rb_global_variable(&com_hash);
rb_global_variable 1934 gc.c               rb_global_variable(&finalizers);
rb_global_variable 1940 gc.c               rb_global_variable(&nomem_error);
rb_global_variable 5486 io.c               rb_global_variable(&rb_default_rs);
rb_global_variable 5621 io.c               rb_global_variable(&current_file);
rb_global_variable 2527 object.c           rb_global_variable(&ruby_top_self);
rb_global_variable  494 random.c           rb_global_variable(&saved_seed);
rb_global_variable 2256 re.c               rb_global_variable(&reg_cache);
rb_global_variable 1166 ruby.c             rb_global_variable(&rb_argv0);
rb_global_variable  525 ruby.h         void rb_global_variable(VALUE*);


rb_gv_get

rb_gv_get          66 ext/syslog/syslog.c         ident = rb_gv_get("$0");
rb_gv_get        2551 ext/tk/tcltklib.c         receiver = rb_gv_get(str);
rb_gv_get        2561 ext/tk/tcltklib.c         receiver = rb_gv_get(buf);
rb_gv_get         548 ruby.h         VALUE rb_gv_get(const char*);


rb_gv_set

rb_gv_set         437 ruby.c         	    rb_gv_set(s, v);
rb_gv_set         547 ruby.h         VALUE rb_gv_set(const char*, VALUE);


rb_gvar_defined

rb_gvar_defined  2290 eval.c         	if (rb_gvar_defined(node->nd_entry)) {
rb_gvar_defined   373 node.h         VALUE rb_gvar_defined(struct global_entry *);


rb_gvar_get

rb_gvar_get      3521 eval.c         	result = rb_gvar_get(node->nd_entry);
rb_gvar_get       371 node.h         VALUE rb_gvar_get(struct global_entry *);
rb_gvar_get       683 variable.c         return rb_gvar_get(entry);


rb_gvar_set

rb_gvar_set      3475 eval.c         	rb_gvar_set(node->nd_entry, result);
rb_gvar_set      5018 eval.c         	rb_gvar_set(lhs->nd_entry, val);
rb_gvar_set       372 node.h         VALUE rb_gvar_set(struct global_entry *, VALUE);
rb_gvar_set       674 variable.c         return rb_gvar_set(entry, val);


rb_gzfile_close

rb_gzfile_close   152 ext/zlib/zlib.c static VALUE rb_gzfile_close _((VALUE));
rb_gzfile_close  3535 ext/zlib/zlib.c     rb_define_method(cGzipFile, "close", rb_gzfile_close, 0);


rb_gzfile_closed_p

rb_gzfile_closed_p  154 ext/zlib/zlib.c static VALUE rb_gzfile_closed_p _((VALUE));
rb_gzfile_closed_p 3537 ext/zlib/zlib.c     rb_define_method(cGzipFile, "closed?", rb_gzfile_closed_p, 0);


rb_gzfile_comment

rb_gzfile_comment  146 ext/zlib/zlib.c static VALUE rb_gzfile_comment _((VALUE));
rb_gzfile_comment 3529 ext/zlib/zlib.c     rb_define_method(cGzipFile, "comment", rb_gzfile_comment, 0);


rb_gzfile_crc

rb_gzfile_crc     141 ext/zlib/zlib.c static VALUE rb_gzfile_crc _((VALUE));
rb_gzfile_crc    3524 ext/zlib/zlib.c     rb_define_method(cGzipFile, "crc", rb_gzfile_crc, 0);


rb_gzfile_eof_p

rb_gzfile_eof_p   155 ext/zlib/zlib.c static VALUE rb_gzfile_eof_p _((VALUE));
rb_gzfile_eof_p  3538 ext/zlib/zlib.c     rb_define_method(cGzipReader, "eof", rb_gzfile_eof_p, 0);
rb_gzfile_eof_p  3539 ext/zlib/zlib.c     rb_define_method(cGzipReader, "eof?", rb_gzfile_eof_p, 0);


rb_gzfile_finish

rb_gzfile_finish  153 ext/zlib/zlib.c static VALUE rb_gzfile_finish _((VALUE));
rb_gzfile_finish 3536 ext/zlib/zlib.c     rb_define_method(cGzipFile, "finish", rb_gzfile_finish, 0);


rb_gzfile_level

rb_gzfile_level   143 ext/zlib/zlib.c static VALUE rb_gzfile_level _((VALUE));
rb_gzfile_level  3526 ext/zlib/zlib.c     rb_define_method(cGzipFile, "level", rb_gzfile_level, 0);


rb_gzfile_lineno

rb_gzfile_lineno  147 ext/zlib/zlib.c static VALUE rb_gzfile_lineno _((VALUE));
rb_gzfile_lineno 3530 ext/zlib/zlib.c     rb_define_method(cGzipReader, "lineno", rb_gzfile_lineno, 0);


rb_gzfile_mtime

rb_gzfile_mtime   142 ext/zlib/zlib.c static VALUE rb_gzfile_mtime _((VALUE));
rb_gzfile_mtime  3525 ext/zlib/zlib.c     rb_define_method(cGzipFile, "mtime", rb_gzfile_mtime, 0);


rb_gzfile_orig_name

rb_gzfile_orig_name  145 ext/zlib/zlib.c static VALUE rb_gzfile_orig_name _((VALUE));
rb_gzfile_orig_name 3528 ext/zlib/zlib.c     rb_define_method(cGzipFile, "orig_name", rb_gzfile_orig_name, 0);


rb_gzfile_os_code

rb_gzfile_os_code  144 ext/zlib/zlib.c static VALUE rb_gzfile_os_code _((VALUE));
rb_gzfile_os_code 3527 ext/zlib/zlib.c     rb_define_method(cGzipFile, "os_code", rb_gzfile_os_code, 0);


rb_gzfile_s_wrap

rb_gzfile_s_wrap  137 ext/zlib/zlib.c static VALUE rb_gzfile_s_wrap _((int, VALUE*, VALUE));
rb_gzfile_s_wrap 2431 ext/zlib/zlib.c     return rb_gzfile_s_wrap(argc, argv, klass);
rb_gzfile_s_wrap 3521 ext/zlib/zlib.c     rb_define_singleton_method(cGzipFile, "wrap", rb_gzfile_s_wrap, -1);


rb_gzfile_set_comment

rb_gzfile_set_comment  151 ext/zlib/zlib.c static VALUE rb_gzfile_set_comment _((VALUE, VALUE));
rb_gzfile_set_comment 3534 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "comment=", rb_gzfile_set_comment, 1);


rb_gzfile_set_lineno

rb_gzfile_set_lineno  148 ext/zlib/zlib.c static VALUE rb_gzfile_set_lineno _((VALUE, VALUE));
rb_gzfile_set_lineno 3531 ext/zlib/zlib.c     rb_define_method(cGzipReader, "lineno=", rb_gzfile_set_lineno, 1);


rb_gzfile_set_mtime

rb_gzfile_set_mtime  149 ext/zlib/zlib.c static VALUE rb_gzfile_set_mtime _((VALUE, VALUE));
rb_gzfile_set_mtime 3532 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "mtime=", rb_gzfile_set_mtime, 1);


rb_gzfile_set_orig_name

rb_gzfile_set_orig_name  150 ext/zlib/zlib.c static VALUE rb_gzfile_set_orig_name _((VALUE, VALUE));
rb_gzfile_set_orig_name 3533 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "orig_name=", rb_gzfile_set_orig_name,1);


rb_gzfile_set_sync

rb_gzfile_set_sync  157 ext/zlib/zlib.c static VALUE rb_gzfile_set_sync _((VALUE, VALUE));
rb_gzfile_set_sync 3541 ext/zlib/zlib.c     rb_define_method(cGzipFile, "sync=", rb_gzfile_set_sync, 1);


rb_gzfile_sync

rb_gzfile_sync    156 ext/zlib/zlib.c static VALUE rb_gzfile_sync _((VALUE));
rb_gzfile_sync   3540 ext/zlib/zlib.c     rb_define_method(cGzipFile, "sync", rb_gzfile_sync, 0);


rb_gzfile_to_io

rb_gzfile_to_io   140 ext/zlib/zlib.c static VALUE rb_gzfile_to_io _((VALUE));
rb_gzfile_to_io  3523 ext/zlib/zlib.c     rb_define_method(cGzipFile, "to_io", rb_gzfile_to_io, 0);


rb_gzfile_total_in

rb_gzfile_total_in  158 ext/zlib/zlib.c static VALUE rb_gzfile_total_in _((VALUE));
rb_gzfile_total_in 3543 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "pos", rb_gzfile_total_in, 0);
rb_gzfile_total_in 3545 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "tell", rb_gzfile_total_in, 0);


rb_gzfile_total_out

rb_gzfile_total_out  159 ext/zlib/zlib.c static VALUE rb_gzfile_total_out _((VALUE));
rb_gzfile_total_out 3542 ext/zlib/zlib.c     rb_define_method(cGzipReader, "pos", rb_gzfile_total_out, 0);
rb_gzfile_total_out 3544 ext/zlib/zlib.c     rb_define_method(cGzipReader, "tell", rb_gzfile_total_out, 0);


rb_gzreader_each

rb_gzreader_each  182 ext/zlib/zlib.c static VALUE rb_gzreader_each _((int, VALUE*, VALUE));
rb_gzreader_each 3571 ext/zlib/zlib.c     rb_define_method(cGzipReader, "each", rb_gzreader_each, -1);
rb_gzreader_each 3572 ext/zlib/zlib.c     rb_define_method(cGzipReader, "each_line", rb_gzreader_each, -1);


rb_gzreader_each_byte

rb_gzreader_each_byte  176 ext/zlib/zlib.c static VALUE rb_gzreader_each_byte _((VALUE));
rb_gzreader_each_byte 3567 ext/zlib/zlib.c     rb_define_method(cGzipReader, "each_byte", rb_gzreader_each_byte, 0);


rb_gzreader_getc

rb_gzreader_getc  174 ext/zlib/zlib.c static VALUE rb_gzreader_getc _((VALUE));
rb_gzreader_getc 3107 ext/zlib/zlib.c     dst = rb_gzreader_getc(obj);
rb_gzreader_getc 3122 ext/zlib/zlib.c     while (!NIL_P(c = rb_gzreader_getc(obj))) {
rb_gzreader_getc 3565 ext/zlib/zlib.c     rb_define_method(cGzipReader, "getc", rb_gzreader_getc, 0);


rb_gzreader_gets

rb_gzreader_gets  180 ext/zlib/zlib.c static VALUE rb_gzreader_gets _((int, VALUE*, VALUE));
rb_gzreader_gets 3289 ext/zlib/zlib.c     dst = rb_gzreader_gets(argc, argv, obj);
rb_gzreader_gets 3569 ext/zlib/zlib.c     rb_define_method(cGzipReader, "gets", rb_gzreader_gets, -1);


rb_gzreader_initialize

rb_gzreader_initialize  170 ext/zlib/zlib.c static VALUE rb_gzreader_initialize _((VALUE, VALUE));
rb_gzreader_initialize 3560 ext/zlib/zlib.c     rb_define_method(cGzipReader, "initialize", rb_gzreader_initialize, 1);


rb_gzreader_read

rb_gzreader_read  173 ext/zlib/zlib.c static VALUE rb_gzreader_read _((int, VALUE*, VALUE));
rb_gzreader_read 3563 ext/zlib/zlib.c     rb_define_method(cGzipReader, "read", rb_gzreader_read, -1);


rb_gzreader_readchar

rb_gzreader_readchar  175 ext/zlib/zlib.c static VALUE rb_gzreader_readchar _((VALUE));
rb_gzreader_readchar 3566 ext/zlib/zlib.c     rb_define_method(cGzipReader, "readchar", rb_gzreader_readchar, 0);


rb_gzreader_readline

rb_gzreader_readline  181 ext/zlib/zlib.c static VALUE rb_gzreader_readline _((int, VALUE*, VALUE));
rb_gzreader_readline 3570 ext/zlib/zlib.c     rb_define_method(cGzipReader, "readline", rb_gzreader_readline, -1);


rb_gzreader_readlines

rb_gzreader_readlines  183 ext/zlib/zlib.c static VALUE rb_gzreader_readlines _((int, VALUE*, VALUE));
rb_gzreader_readlines 3573 ext/zlib/zlib.c     rb_define_method(cGzipReader, "readlines", rb_gzreader_readlines, -1);


rb_gzreader_rewind

rb_gzreader_rewind  171 ext/zlib/zlib.c static VALUE rb_gzreader_rewind _((VALUE));
rb_gzreader_rewind 3561 ext/zlib/zlib.c     rb_define_method(cGzipReader, "rewind", rb_gzreader_rewind, 0);


rb_gzreader_s_allocate

rb_gzreader_s_allocate  168 ext/zlib/zlib.c static VALUE rb_gzreader_s_allocate _((VALUE));
rb_gzreader_s_allocate 3559 ext/zlib/zlib.c     rb_define_alloc_func(cGzipReader, rb_gzreader_s_allocate);


rb_gzreader_s_open

rb_gzreader_s_open  169 ext/zlib/zlib.c static VALUE rb_gzreader_s_open _((int, VALUE*, VALUE));
rb_gzreader_s_open 3558 ext/zlib/zlib.c     rb_define_singleton_method(cGzipReader, "open", rb_gzreader_s_open,-1);


rb_gzreader_ungetc

rb_gzreader_ungetc  177 ext/zlib/zlib.c static VALUE rb_gzreader_ungetc _((VALUE, VALUE));
rb_gzreader_ungetc 3568 ext/zlib/zlib.c     rb_define_method(cGzipReader, "ungetc", rb_gzreader_ungetc, 1);


rb_gzreader_unused

rb_gzreader_unused  172 ext/zlib/zlib.c static VALUE rb_gzreader_unused _((VALUE));
rb_gzreader_unused 3562 ext/zlib/zlib.c     rb_define_method(cGzipReader, "unused", rb_gzreader_unused, 0);


rb_gzwriter_flush

rb_gzwriter_flush  164 ext/zlib/zlib.c static VALUE rb_gzwriter_flush _((int, VALUE*, VALUE));
rb_gzwriter_flush 3550 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "flush", rb_gzwriter_flush, -1);


rb_gzwriter_initialize

rb_gzwriter_initialize  163 ext/zlib/zlib.c static VALUE rb_gzwriter_initialize _((int, VALUE*, VALUE));
rb_gzwriter_initialize 3549 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "initialize", rb_gzwriter_initialize,-1);


rb_gzwriter_putc

rb_gzwriter_putc  166 ext/zlib/zlib.c static VALUE rb_gzwriter_putc _((VALUE, VALUE));
rb_gzwriter_putc 3552 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "putc", rb_gzwriter_putc, 1);


rb_gzwriter_s_allocate

rb_gzwriter_s_allocate  161 ext/zlib/zlib.c static VALUE rb_gzwriter_s_allocate _((VALUE));
rb_gzwriter_s_allocate 3548 ext/zlib/zlib.c     rb_define_alloc_func(cGzipWriter, rb_gzwriter_s_allocate);


rb_gzwriter_s_open

rb_gzwriter_s_open  162 ext/zlib/zlib.c static VALUE rb_gzwriter_s_open _((int, VALUE*, VALUE));
rb_gzwriter_s_open 3547 ext/zlib/zlib.c     rb_define_singleton_method(cGzipWriter, "open", rb_gzwriter_s_open,-1);


rb_gzwriter_write

rb_gzwriter_write  165 ext/zlib/zlib.c static VALUE rb_gzwriter_write _((VALUE, VALUE));
rb_gzwriter_write 3551 ext/zlib/zlib.c     rb_define_method(cGzipWriter, "write", rb_gzwriter_write, 1);


rb_hash

rb_hash          2392 array.c        	n = rb_hash(RARRAY(ary)->ptr[i]);
rb_hash           317 intern.h       VALUE rb_hash(VALUE);
rb_hash           202 range.c            v = rb_hash(rb_ivar_get(range, id_beg));
rb_hash           204 range.c            v = rb_hash(rb_ivar_get(range, id_end));
rb_hash           755 struct.c           h = rb_hash(rb_obj_class(s));
rb_hash           758 struct.c       	n = rb_hash(RSTRUCT(s)->ptr[i]);


rb_hash_aref

rb_hash_aref     13029 eval.c         	VALUE list = rb_hash_aref(hash, ID2SYM(ruby_frame->this_func));
rb_hash_aref     13049 eval.c         	list = rb_hash_aref(hash, sym);
rb_hash_aref     13071 eval.c             list = rb_hash_aref(hash, sym);
rb_hash_aref      471 ext/racc/cparse/cparse.c             tmp = rb_hash_aref(v->token_table, tok);
rb_hash_aref      198 ext/syck/rubyext.c    VALUE val = rb_hash_aref( hsh, key );
rb_hash_aref      839 ext/syck/rubyext.c     input = rb_hash_aref( rb_attr_get( self, s_options ), sym_input );
rb_hash_aref      840 ext/syck/rubyext.c     model = rb_hash_aref( rb_attr_get( self, s_options ), sym_model );
rb_hash_aref      869 ext/syck/rubyext.c     input = rb_hash_aref( rb_attr_get( self, s_options ), sym_input );
rb_hash_aref      870 ext/syck/rubyext.c     model = rb_hash_aref( rb_attr_get( self, s_options ), sym_model );
rb_hash_aref     1089 ext/syck/rubyext.c         VALUE target_class = rb_hash_aref( tags, type );
rb_hash_aref     1106 ext/syck/rubyext.c                 target_class = rb_hash_aref( tags, partial );
rb_hash_aref     1110 ext/syck/rubyext.c                     target_class = rb_hash_aref( tags, partial );
rb_hash_aref     1641 ext/syck/rubyext.c             syck_map_add( node, key, rb_hash_aref(hsh, key) );
rb_hash_aref     1677 ext/syck/rubyext.c             syck_map_add( node, key, rb_hash_aref(hsh, key) );
rb_hash_aref     2029 ext/syck/rubyext.c         symple = rb_hash_aref( bonus->data, oid );
rb_hash_aref       98 ext/tk/tkutil/tkutil.c     return rb_apply(rb_hash_aref(CALLBACK_TABLE, id), ID_call, rest);
rb_hash_aref      100 ext/tk/tkutil/tkutil.c     return rb_funcall2(rb_hash_aref(CALLBACK_TABLE, argv[0]),
rb_hash_aref     1256 ext/tk/tkutil/tkutil.c         if (!NIL_P(ret = rb_hash_aref(inf->aliases, arg_sym))) {
rb_hash_aref     1458 ext/tk/tkutil/tkutil.c             proc = rb_hash_aref(inf->proc, INT2FIX(c));
rb_hash_aref      758 hash.c         	rb_ary_push(result, rb_hash_aref(hash, argv[i]));
rb_hash_aref     1435 hash.c         	value = rb_yield_values(3, key, rb_hash_aref(hash, key), value);
rb_hash_aref     2297 hash.c             rb_define_method(rb_cHash,"[]", rb_hash_aref, 1);
rb_hash_aref      320 intern.h       VALUE rb_hash_aref(VALUE, VALUE);
rb_hash_aref      942 marshal.c      	v = rb_hash_aref(arg->data, LONG2FIX(id));
rb_hash_aref     4565 parse.y        	    ruby_debug_lines = rb_hash_aref(hash, fname);


rb_hash_aset

rb_hash_aset     2488 array.c        	rb_hash_aset(hash, RARRAY(ary1)->ptr[i], Qtrue);
rb_hash_aset     2492 array.c        	    rb_hash_aset(hash, RARRAY(ary2)->ptr[i], Qtrue);
rb_hash_aset     3612 eval.c         		rb_hash_aset(hash, key, val);
rb_hash_aset     13053 eval.c         	rb_hash_aset(hash, sym, list);
rb_hash_aset      424 ext/dbm/dbm.c  	rb_hash_aset(hash, valstr, keystr);
rb_hash_aset      710 ext/dbm/dbm.c  	rb_hash_aset(hash, rb_tainted_str_new(key.dptr, key.dsize),
rb_hash_aset      526 ext/gdbm/gdbm.c 	rb_hash_aset(hash, valstr, keystr);
rb_hash_aset      900 ext/gdbm/gdbm.c         rb_hash_aset(hash, keystr, rb_gdbm_fetch2(dbm, keystr));
rb_hash_aset      279 ext/openssl/ossl_config.c 	rb_hash_aset(hash, rb_str_new2(entry->name), rb_str_new2(entry->value));
rb_hash_aset      239 ext/openssl/ossl_pkey_dh.c     rb_hash_aset(hash, rb_str_new2("p"), ossl_bn_new(pkey->pkey.dh->p));
rb_hash_aset      240 ext/openssl/ossl_pkey_dh.c     rb_hash_aset(hash, rb_str_new2("g"), ossl_bn_new(pkey->pkey.dh->g));
rb_hash_aset      241 ext/openssl/ossl_pkey_dh.c     rb_hash_aset(hash, rb_str_new2("pub_key"), ossl_bn_new(pkey->pkey.dh->pub_key));
rb_hash_aset      242 ext/openssl/ossl_pkey_dh.c     rb_hash_aset(hash, rb_str_new2("priv_key"), ossl_bn_new(pkey->pkey.dh->priv_key));
rb_hash_aset      267 ext/openssl/ossl_pkey_dsa.c     rb_hash_aset(hash, rb_str_new2("p"), ossl_bn_new(pkey->pkey.dsa->p));
rb_hash_aset      268 ext/openssl/ossl_pkey_dsa.c     rb_hash_aset(hash, rb_str_new2("q"), ossl_bn_new(pkey->pkey.dsa->q));
rb_hash_aset      269 ext/openssl/ossl_pkey_dsa.c     rb_hash_aset(hash, rb_str_new2("g"), ossl_bn_new(pkey->pkey.dsa->g));
rb_hash_aset      270 ext/openssl/ossl_pkey_dsa.c     rb_hash_aset(hash, rb_str_new2("pub_key"), ossl_bn_new(pkey->pkey.dsa->pub_key));
rb_hash_aset      271 ext/openssl/ossl_pkey_dsa.c     rb_hash_aset(hash, rb_str_new2("priv_key"), ossl_bn_new(pkey->pkey.dsa->priv_key));
rb_hash_aset      358 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("n"), ossl_bn_new(pkey->pkey.rsa->n));
rb_hash_aset      359 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("e"), ossl_bn_new(pkey->pkey.rsa->e));
rb_hash_aset      360 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("d"), ossl_bn_new(pkey->pkey.rsa->d));
rb_hash_aset      361 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("p"), ossl_bn_new(pkey->pkey.rsa->p));
rb_hash_aset      362 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("q"), ossl_bn_new(pkey->pkey.rsa->q));
rb_hash_aset      363 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("dmp1"), ossl_bn_new(pkey->pkey.rsa->dmp1));
rb_hash_aset      364 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("dmq1"), ossl_bn_new(pkey->pkey.rsa->dmq1));
rb_hash_aset      365 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("iqmp"), ossl_bn_new(pkey->pkey.rsa->iqmp));
rb_hash_aset      331 ext/openssl/ossl_x509name.c     rb_hash_aset(hash, rb_str_new2("C"), ptrstr);
rb_hash_aset      332 ext/openssl/ossl_x509name.c     rb_hash_aset(hash, rb_str_new2("countryName"), ptrstr);
rb_hash_aset      333 ext/openssl/ossl_x509name.c     rb_hash_aset(hash, rb_str_new2("serialNumber"), ptrstr);
rb_hash_aset      334 ext/openssl/ossl_x509name.c     rb_hash_aset(hash, rb_str_new2("dnQualifier"), ptrstr);
rb_hash_aset      335 ext/openssl/ossl_x509name.c     rb_hash_aset(hash, rb_str_new2("DC"), ia5str);
rb_hash_aset      336 ext/openssl/ossl_x509name.c     rb_hash_aset(hash, rb_str_new2("domainComponent"), ia5str);
rb_hash_aset      337 ext/openssl/ossl_x509name.c     rb_hash_aset(hash, rb_str_new2("emailAddress"), ia5str);
rb_hash_aset      402 ext/sdbm/init.c 	rb_hash_aset(hash, valstr, keystr);
rb_hash_aset      691 ext/sdbm/init.c 	rb_hash_aset(hash, rb_tainted_str_new(key.dptr, key.dsize),
rb_hash_aset      202 ext/syck/rubyext.c        rb_hash_aset(hsh, key, val);
rb_hash_aset      588 ext/syck/rubyext.c                     rb_hash_aset( obj, k, v );
rb_hash_aset      635 ext/syck/rubyext.c     rb_hash_aset(bonus->data, INT2FIX(RHASH(bonus->data)->tbl->num_entries), obj);
rb_hash_aset      929 ext/syck/rubyext.c     rb_hash_aset( tags, taguri, cls );
rb_hash_aset     1023 ext/syck/rubyext.c                     rb_hash_aset( obj, k, v );
rb_hash_aset     1313 ext/syck/rubyext.c                 rb_hash_aset( v, syck_map_read( n, map_key, i ), syck_map_read( n, map_value, i ) );
rb_hash_aset     1701 ext/syck/rubyext.c     rb_hash_aset( rb_ivar_get( self, s_value ), key, val );
rb_hash_aset     1910 ext/syck/rubyext.c         rb_hash_aset( bonus->data, bonus->oid, node );
rb_hash_aset      116 ext/tk/tkutil/tkutil.c     rb_hash_aset(CALLBACK_TABLE, id_num, cmd);
rb_hash_aset      210 ext/tk/tkutil/tkutil.c     rb_hash_aset(hash, rb_funcall(key, ID_to_s, 0, 0), value);
rb_hash_aset     1405 ext/tk/tkutil/tkutil.c         rb_hash_aset(proc, RARRAY(inf)->ptr[0], RARRAY(inf)->ptr[1]);
rb_hash_aset     1503 ext/win32ole/win32ole.c                     rb_hash_aset(constant, rb_str_new2(pName), val);
rb_hash_aset      318 hash.c                 rb_hash_aset(hash, argv[i], argv[i + 1]);
rb_hash_aset      850 hash.c         	rb_hash_aset(hash, key, val);
rb_hash_aset     1397 hash.c             rb_hash_aset(hash, value, key);
rb_hash_aset     1426 hash.c             rb_hash_aset(hash, key, value);
rb_hash_aset     1437 hash.c             rb_hash_aset(hash, key, value);
rb_hash_aset     2168 hash.c         	    rb_hash_aset(hash, env_str_new(*env, s-*env),
rb_hash_aset     2299 hash.c             rb_define_method(rb_cHash,"[]=", rb_hash_aset, 2);
rb_hash_aset     2300 hash.c             rb_define_method(rb_cHash,"store", rb_hash_aset, 2);
rb_hash_aset      321 intern.h       VALUE rb_hash_aset(VALUE, VALUE, VALUE);
rb_hash_aset      890 marshal.c          rb_hash_aset(arg->data, INT2FIX(RHASH(arg->data)->tbl->num_entries), v);
rb_hash_aset     1116 marshal.c      		rb_hash_aset(v, key, value);
rb_hash_aset     4568 parse.y        		rb_hash_aset(hash, fname, ruby_debug_lines);
rb_hash_aset      806 signal.c       	rb_hash_aset(h, rb_str_new2(sigs->signm), INT2FIX(sigs->signo));


rb_hash_clear

rb_hash_clear     873 hash.c             rb_hash_clear(hash);
rb_hash_clear    2326 hash.c             rb_define_method(rb_cHash,"clear", rb_hash_clear, 0);


rb_hash_delete

rb_hash_delete    159 ext/tk/tkutil/tkutil.c     return rb_hash_delete(CALLBACK_TABLE,
rb_hash_delete    673 hash.c         	rb_hash_delete(hash, key);
rb_hash_delete   2321 hash.c             rb_define_method(rb_cHash,"delete", rb_hash_delete, 1);
rb_hash_delete    323 intern.h       VALUE rb_hash_delete(VALUE,VALUE);


rb_hash_delete_if

rb_hash_delete_if  721 ext/dbm/dbm.c      return rb_hash_delete_if(fdbm_to_hash(obj));
rb_hash_delete_if  910 ext/gdbm/gdbm.c     return rb_hash_delete_if(fgdbm_to_hash(obj));
rb_hash_delete_if  702 ext/sdbm/init.c     return rb_hash_delete_if(fsdbm_to_hash(obj));
rb_hash_delete_if  710 hash.c             rb_hash_delete_if(hash);
rb_hash_delete_if  728 hash.c             return rb_hash_delete_if(rb_obj_dup(hash));
rb_hash_delete_if 2180 hash.c             return rb_hash_delete_if(env_to_hash());
rb_hash_delete_if 2322 hash.c             rb_define_method(rb_cHash,"delete_if", rb_hash_delete_if, 0);
rb_hash_delete_if  322 intern.h       VALUE rb_hash_delete_if(VALUE);


rb_hash_foreach

rb_hash_foreach  1218 ext/tk/tkutil/tkutil.c     rb_hash_foreach(tbl, each_attr_def, self);
rb_hash_foreach   367 hash.c             rb_hash_foreach(hash, rb_hash_rehash_i, (st_data_t)tbl);
rb_hash_foreach   567 hash.c             rb_hash_foreach(hash, key_i, (st_data_t)args);
rb_hash_foreach   655 hash.c             rb_hash_foreach(hash, shift_i, (st_data_t)&var);
rb_hash_foreach   694 hash.c             rb_hash_foreach(hash, delete_if_i, hash);
rb_hash_foreach   783 hash.c             rb_hash_foreach(hash, select_i, result);
rb_hash_foreach   809 hash.c         	rb_hash_foreach(hash, clear_i, 0);
rb_hash_foreach   874 hash.c             rb_hash_foreach(hash2, replace_i, hash);
rb_hash_foreach   952 hash.c             rb_hash_foreach(hash, each_value_i, 0);
rb_hash_foreach   983 hash.c             rb_hash_foreach(hash, each_key_i, 0);
rb_hash_foreach  1016 hash.c             rb_hash_foreach(hash, each_pair_i, 0);
rb_hash_foreach  1052 hash.c             rb_hash_foreach(hash, each_i, 0);
rb_hash_foreach  1081 hash.c             rb_hash_foreach(hash, to_a_i, ary);
rb_hash_foreach  1137 hash.c             rb_hash_foreach(hash, inspect_i, str);
rb_hash_foreach  1224 hash.c             rb_hash_foreach(hash, keys_i, ary);
rb_hash_foreach  1255 hash.c             rb_hash_foreach(hash, values_i, ary);
rb_hash_foreach  1315 hash.c             rb_hash_foreach(hash, rb_hash_search_value, (st_data_t)data);
rb_hash_foreach  1363 hash.c             rb_hash_foreach(hash1, equal_i, (st_data_t)&data);
rb_hash_foreach  1418 hash.c             rb_hash_foreach(hash, rb_hash_invert_i, h);
rb_hash_foreach  1466 hash.c         	rb_hash_foreach(hash2, rb_hash_update_block_i, hash1);
rb_hash_foreach  1469 hash.c         	rb_hash_foreach(hash2, rb_hash_update_i, hash1);
rb_hash_foreach  2231 hash.c             rb_hash_foreach(hash, env_replace_i, keys);
rb_hash_foreach  2257 hash.c             rb_hash_foreach(hash, env_update_i, 0);
rb_hash_foreach   316 intern.h       void rb_hash_foreach(VALUE, int (*)(ANYARGS), VALUE);
rb_hash_foreach   579 marshal.c      	    rb_hash_foreach(obj, hash_each, (st_data_t)&c_arg);


rb_hash_has_key

rb_hash_has_key  1434 hash.c             if (rb_hash_has_key(hash, key)) {
rb_hash_has_key  2333 hash.c             rb_define_method(rb_cHash,"include?", rb_hash_has_key, 1);
rb_hash_has_key  2334 hash.c             rb_define_method(rb_cHash,"member?", rb_hash_has_key, 1);
rb_hash_has_key  2335 hash.c             rb_define_method(rb_cHash,"has_key?", rb_hash_has_key, 1);
rb_hash_has_key  2337 hash.c             rb_define_method(rb_cHash,"key?", rb_hash_has_key, 1);


rb_hash_has_value

rb_hash_has_value 2336 hash.c             rb_define_method(rb_cHash,"has_value?", rb_hash_has_value, 1);
rb_hash_has_value 2338 hash.c             rb_define_method(rb_cHash,"value?", rb_hash_has_value, 1);


rb_hash_invert

rb_hash_invert   2206 hash.c             return rb_hash_invert(env_to_hash());
rb_hash_invert   2327 hash.c             rb_define_method(rb_cHash,"invert", rb_hash_invert, 0);


rb_hash_key

rb_hash_key       577 hash.c             return rb_hash_key(hash, value);
rb_hash_key      2304 hash.c             rb_define_method(rb_cHash,"key", rb_hash_key, 1);


rb_hash_modify

rb_hash_modify    268 hash.c             rb_hash_modify(hash);
rb_hash_modify    365 hash.c             rb_hash_modify(hash);
rb_hash_modify    507 hash.c             rb_hash_modify(hash);
rb_hash_modify    603 hash.c             rb_hash_modify(hash);
rb_hash_modify    653 hash.c             rb_hash_modify(hash);
rb_hash_modify    693 hash.c             rb_hash_modify(hash);
rb_hash_modify    807 hash.c             rb_hash_modify(hash);
rb_hash_modify    836 hash.c             rb_hash_modify(hash);


rb_hash_new

rb_hash_new      2484 array.c            VALUE hash = rb_hash_new();
rb_hash_new      3601 eval.c         	    VALUE hash = rb_hash_new();
rb_hash_new      13044 eval.c         	hash = rb_hash_new();
rb_hash_new       417 ext/dbm/dbm.c      VALUE hash = rb_hash_new();
rb_hash_new       707 ext/dbm/dbm.c      hash = rb_hash_new();
rb_hash_new       519 ext/gdbm/gdbm.c     VALUE hash = rb_hash_new();
rb_hash_new       896 ext/gdbm/gdbm.c     hash = rb_hash_new();
rb_hash_new      1087 ext/iconv/iconv.c     charset_map = rb_hash_new();
rb_hash_new       266 ext/openssl/ossl_config.c     hash = rb_hash_new();
rb_hash_new       237 ext/openssl/ossl_pkey_dh.c     hash = rb_hash_new();
rb_hash_new       265 ext/openssl/ossl_pkey_dsa.c     hash = rb_hash_new();
rb_hash_new       356 ext/openssl/ossl_pkey_rsa.c     hash = rb_hash_new();
rb_hash_new       329 ext/openssl/ossl_x509name.c     hash = rb_hash_new();
rb_hash_new       395 ext/sdbm/init.c     VALUE hash = rb_hash_new();
rb_hash_new       688 ext/sdbm/init.c     hash = rb_hash_new();
rb_hash_new       201 ext/syck/rubyext.c        val = rb_hash_new();
rb_hash_new       545 ext/syck/rubyext.c             obj = rb_hash_new();
rb_hash_new       783 ext/syck/rubyext.c         options = rb_hash_new();
rb_hash_new       846 ext/syck/rubyext.c     bonus->data = rb_hash_new();
rb_hash_new       882 ext/syck/rubyext.c         bonus->data = rb_hash_new();
rb_hash_new       916 ext/syck/rubyext.c     VALUE tags = rb_hash_new();
rb_hash_new       917 ext/syck/rubyext.c     rb_ivar_set(self, s_tags, rb_hash_new());
rb_hash_new       982 ext/syck/rubyext.c             obj = rb_hash_new();
rb_hash_new      1310 ext/syck/rubyext.c             v = rb_hash_new();
rb_hash_new      1978 ext/syck/rubyext.c     bonus->data = rb_hash_new();
rb_hash_new      1982 ext/syck/rubyext.c         options = rb_hash_new();
rb_hash_new      2094 ext/syck/rubyext.c     map = rb_funcall( cMap, s_new, 3, type_id, rb_hash_new(), style );
rb_hash_new       219 ext/tk/tkutil/tkutil.c     volatile VALUE new_keys = rb_hash_new();
rb_hash_new      1129 ext/tk/tkutil/tkutil.c     proc = rb_hash_new();
rb_hash_new      1132 ext/tk/tkutil/tkutil.c     aliases = rb_hash_new();
rb_hash_new      1356 ext/tk/tkutil/tkutil.c     volatile VALUE proc = rb_hash_new();
rb_hash_new      1357 ext/tk/tkutil/tkutil.c     volatile VALUE aliases = rb_hash_new();
rb_hash_new      1598 ext/tk/tkutil/tkutil.c     CALLBACK_TABLE = rb_hash_new();
rb_hash_new      1472 ext/win32ole/win32ole.c     constant = rb_hash_new();
rb_hash_new      1416 hash.c             VALUE h = rb_hash_new();
rb_hash_new      2163 hash.c             hash = rb_hash_new();
rb_hash_new       318 intern.h       VALUE rb_hash_new(void);
rb_hash_new      1111 marshal.c      	    v = rb_hash_new();
rb_hash_new      1352 marshal.c          arg.data   = rb_hash_new();
rb_hash_new       802 signal.c           VALUE h = rb_hash_new();


rb_hash_replace

rb_hash_replace  2288 hash.c             rb_define_method(rb_cHash,"initialize_copy", rb_hash_replace, 1);
rb_hash_replace  2329 hash.c             rb_define_method(rb_cHash,"replace", rb_hash_replace, 1);


rb_hash_size

rb_hash_size     2306 hash.c             rb_define_method(rb_cHash,"size", rb_hash_size, 0);
rb_hash_size     2307 hash.c             rb_define_method(rb_cHash,"length", rb_hash_size, 0);


rb_hash_to_a

rb_hash_to_a     1105 hash.c             VALUE entries = rb_hash_to_a(hash);
rb_hash_to_a     1163 hash.c             return rb_ary_to_s(rb_hash_to_a(hash));
rb_hash_to_a     2292 hash.c             rb_define_method(rb_cHash,"to_a", rb_hash_to_a, 0);


rb_hash_update

rb_hash_update   1493 hash.c             return rb_hash_update(rb_obj_dup(hash1), hash2);
rb_hash_update   2328 hash.c             rb_define_method(rb_cHash,"update", rb_hash_update, 1);
rb_hash_update   2330 hash.c             rb_define_method(rb_cHash,"merge!", rb_hash_update, 1);


rb_id2name

rb_id2name        510 class.c        	rb_ary_push(ary, rb_str_new2(rb_id2name(name)));
rb_id2name       1028 error.c        	     rb_id2name(ruby_frame->callee));
rb_id2name        248 eval.c         		     rb_id2name(ruby_frame->callee), ruby_safe_level);
rb_id2name        268 eval.c         		     rb_id2name(ruby_frame->callee));
rb_id2name        292 eval.c         		  rb_id2name(id),
rb_id2name        529 eval.c         	rb_warn("removing `%s' may cause serious problem", rb_id2name(mid));
rb_id2name        534 eval.c         		      rb_id2name(mid), rb_class2name(klass));
rb_id2name        659 eval.c         	rb_name_error(id, "invalid attribute name `%s'", rb_id2name(id));
rb_id2name        661 eval.c             name = rb_id2name(id);
rb_id2name       1105 eval.c         			rb_id2name(ruby_frame->callee));
rb_id2name       1918 eval.c         	rb_raise(rb_eSecurityError, "Insecure: can't undef `%s'", rb_id2name(id));
rb_id2name       1922 eval.c         	rb_warn("undefining `%s' may cause serious problem", rb_id2name(id));
rb_id2name       1943 eval.c         		      rb_id2name(id),s0,rb_class2name(c));
rb_id2name       2044 eval.c         	    rb_warning("discarding old %s", rb_id2name(name));
rb_id2name       3312 eval.c         				  rb_id2name(ruby_frame->this_func));
rb_id2name       3736 eval.c         			rb_id2name(node->nd_mid));
rb_id2name       3742 eval.c         		    rb_warning("method redefined; discarding old %s", rb_id2name(node->nd_mid));
rb_id2name       3781 eval.c         			 rb_id2name(node->nd_mid),
rb_id2name       3792 eval.c         		    rb_warning("redefine %s", rb_id2name(node->nd_mid));
rb_id2name       3848 eval.c         			     rb_id2name(cname));
rb_id2name       3854 eval.c         				 rb_id2name(cname));
rb_id2name       3865 eval.c         		rb_set_class_path(klass, cbase, rb_id2name(cname));
rb_id2name       3894 eval.c         			     rb_id2name(cname));
rb_id2name       3902 eval.c         		rb_set_class_path(module, cbase, rb_id2name(cname));
rb_id2name       5625 eval.c         		       len, rb_class2name(klass), rb_id2name(id));
rb_id2name       5699 eval.c         			     rb_id2name(id));
rb_id2name       5778 eval.c         		 rb_id2name(mid), recv);
rb_id2name       5938 eval.c         		      rb_id2name(ruby_frame->this_func));
rb_id2name       5970 eval.c         			     rb_id2name(frame->this_func));
rb_id2name       5994 eval.c         			     rb_id2name(frame->prev->this_func));
rb_id2name       6395 eval.c         			 rb_id2name(ruby_frame->callee),
rb_id2name       6396 eval.c         			 rb_id2name(ruby_frame->callee));
rb_id2name       7210 eval.c         		rb_bug("undefined method `%s'; can't happen", rb_id2name(id));
rb_id2name       7433 eval.c         	    rb_ary_push(ary, rb_str_new2(rb_id2name(tbl[i])));
rb_id2name       7440 eval.c         	    rb_ary_push(ary, rb_str_new2(rb_id2name(vars->id)));
rb_id2name       9174 eval.c             rb_str_buf_cat2(str, rb_id2name(data->oid));
rb_id2name       12995 eval.c         		     rb_id2name(SYM2ID(tag)),
rb_id2name       13001 eval.c         	rb_name_error(SYM2ID(tag), "uncaught throw `%s'", rb_id2name(SYM2ID(tag)));
rb_id2name        353 ext/openssl/ossl_pkcs7.c     if(TYPE(sym) == T_SYMBOL) s = rb_id2name(SYM2ID(sym));
rb_id2name        158 ext/openssl/ossl_ssl.c 	s = rb_id2name(SYM2ID(ssl_method));
rb_id2name        265 ext/racc/cparse/cparse.c                  rb_id2name(v->lexmid));
rb_id2name        398 ext/racc/cparse/cparse.c                  v->lex_is_iterator ? rb_id2name(v->lexmid) : "next_token",
rb_id2name        405 ext/racc/cparse/cparse.c                  v->lex_is_iterator ? rb_id2name(v->lexmid) : "next_token",
rb_id2name        795 ext/tk/tkutil/tkutil.c                                   rb_str_new2(rb_id2name(SYM2ID(obj))));
rb_id2name        797 ext/tk/tkutil/tkutil.c                 return fromDefaultEnc_toUTF8(rb_str_new2(rb_id2name(SYM2ID(obj))), self);
rb_id2name        800 ext/tk/tkutil/tkutil.c             return rb_str_new2(rb_id2name(SYM2ID(obj)));
rb_id2name       1250 ext/tk/tkutil/tkutil.c             str = rb_id2name(SYM2ID(arg_sym));
rb_id2name       1257 ext/tk/tkutil/tkutil.c             str = rb_id2name(SYM2ID(ret));
rb_id2name       1385 ext/tk/tkutil/tkutil.c                               rb_id2name(SYM2ID(RARRAY(inf)->ptr[2])))
rb_id2name       2869 ext/win32ole/win32ole.c     mname = rb_id2name(id);
rb_id2name       1889 gc.c               if (SYMBOL_P(ptr) && rb_id2name(SYM2ID((VALUE)ptr)) != 0) {
rb_id2name       3815 io.c           		 rb_id2name(id), rb_id2name(mid),
rb_id2name        307 marshal.c          char *sym = rb_id2name(id);
rb_id2name        878 marshal.c          return rb_id2name(r_symbol(arg));
rb_id2name       1150 marshal.c      			     rb_id2name(slot),
rb_id2name       1151 marshal.c      			     rb_id2name(SYM2ID(RARRAY(mem)->ptr[i])));
rb_id2name        187 numeric.c      	     rb_id2name(rb_to_id(name)),
rb_id2name       2610 numeric.c          char *name = rb_id2name(FIX2UINT(fix));
rb_id2name       2633 numeric.c          if (rb_id2name(id)) {
rb_id2name        320 object.c           ivname = rb_id2name(id);
rb_id2name       1052 object.c           name = rb_id2name(id);
rb_id2name       1078 object.c           return rb_str_new2(rb_id2name(SYM2ID(sym)));
rb_id2name       1513 object.c       	if (!rb_id2name(id)) {
rb_id2name       1644 object.c       	rb_name_error(id, "wrong constant name %s", rb_id2name(id));
rb_id2name       1667 object.c       	rb_name_error(id, "wrong constant name %s", rb_id2name(id));
rb_id2name       1689 object.c       	rb_name_error(id, "wrong constant name %s", rb_id2name(id));
rb_id2name       1823 object.c       	rb_name_error(id, "`%s' is not allowed as an instance variable name", rb_id2name(id));
rb_id2name       1855 object.c       	rb_name_error(id, "`%s' is not allowed as an instance variable name", rb_id2name(id));
rb_id2name       1880 object.c       	rb_name_error(id, "`%s' is not allowed as an class variable name", rb_id2name(id));
rb_id2name       1909 object.c       	rb_name_error(id, "`%s' is not allowed as an class variable name", rb_id2name(id));
rb_id2name       6625 parse.y        		rb_compile_error(PARSER_ARG  "invalid global variable `%s'", rb_id2name(yylval.id));
rb_id2name       7204 parse.y            rb_compile_error("identifier %s is not valid", rb_id2name(id));
rb_id2name       7261 parse.y        	rb_compile_error("identifier %s is not valid", rb_id2name(id));
rb_id2name       7270 parse.y        	rb_warningS("shadowing outer local variable - %s", rb_id2name(name));
rb_id2name       7279 parse.y        		      rb_id2name(name));
rb_id2name       7467 parse.y        	    useless = rb_id2name(node->nd_mid);
rb_id2name       8155 parse.y        	    rb_warnS("out-of-scope variable - %s", rb_id2name(id));
rb_id2name       8507 parse.y        	name = rb_id2name(id2);
rb_id2name       8514 parse.y        	    return rb_id2name(id);
rb_id2name       9009 parse.y        	name = rb_id2name(id);
rb_id2name       2135 re.c               rb_warn("modifying %s is deprecated", rb_id2name(id));
rb_id2name        530 ruby.h         char *rb_id2name(ID);
rb_id2name        240 signal.c       	s = rb_id2name(SYM2ID(argv[0]));
rb_id2name        618 signal.c       	s = rb_id2name(SYM2ID(arg->sig));
rb_id2name       4164 string.c       	rb_raise(rb_eTypeError, "value of %s must be String", rb_id2name(id));
rb_id2name         67 struct.c       	rb_ary_push(ary, rb_str_new2(rb_id2name(SYM2ID(*p))));
rb_id2name        105 struct.c           rb_name_error(id, "%s is not struct member", rb_id2name(id));
rb_id2name        164 struct.c       		  rb_id2name(rb_frame_this_func()));
rb_id2name        192 struct.c       	nstr = rb_define_class_under(klass, rb_id2name(id), klass);
rb_id2name        455 struct.c       	    p = rb_id2name(id);
rb_id2name        531 struct.c           rb_name_error(id, "no member '%s' in struct", rb_id2name(id));
rb_id2name        593 struct.c           rb_name_error(id, "no member '%s' in struct", rb_id2name(id));
rb_id2name         48 variable.c         path = rb_str_new2(rb_id2name(name));
rb_id2name         59 variable.c     	tmp = rb_str_new2(rb_id2name(fc->name));
rb_id2name        150 variable.c     	    path = rb_str_new2(rb_id2name(SYM2ID(path)));
rb_id2name        346 variable.c         rb_warning("global variable `%s' not initialized", rb_id2name(id));
rb_id2name        406 variable.c         rb_name_error(id, "%s is a read-only variable", rb_id2name(id));
rb_id2name        587 variable.c     	rb_name_error(id, "undefined global variable %s", rb_id2name(id));
rb_id2name        696 variable.c         rb_ary_push(ary, rb_str_new2(rb_id2name(key)));
rb_id2name        791 variable.c     	rb_warning("instance variable %s not initialized", rb_id2name(id));
rb_id2name        932 variable.c     	rb_warning("instance variable %s not initialized", rb_id2name(id));
rb_id2name        991 variable.c     	rb_ary_push(ary, rb_str_new2(rb_id2name(key)));
rb_id2name       1073 variable.c     	rb_name_error(id, "`%s' is not allowed as an instance variable name", rb_id2name(id));
rb_id2name       1092 variable.c         rb_name_error(id, "instance variable %s not defined", rb_id2name(id));
rb_id2name       1103 variable.c     		      rb_id2name(id));
rb_id2name       1105 variable.c     	rb_name_error(id, "uninitialized constant %s", rb_id2name(id));
rb_id2name       1170 variable.c     	rb_raise(rb_eNameError, "autoload must be constant name: %s", rb_id2name(id));
rb_id2name       1293 variable.c     			rb_id2name(id), rb_class2name(klass), rb_id2name(id));
rb_id2name       1343 variable.c     	rb_name_error(id, "`%s' is not allowed as a constant name", rb_id2name(id));
rb_id2name       1358 variable.c     		 rb_class2name(mod), rb_id2name(id));
rb_id2name       1361 variable.c     		  rb_class2name(mod), rb_id2name(id));
rb_id2name       1405 variable.c         rb_ary_push(ary, rb_str_new2(rb_id2name(key)));
rb_id2name       1506 variable.c     		rb_warn("already initialized %s %s", dest, rb_id2name(id));
rb_id2name       1555 variable.c     		  rb_id2name(id), rb_class2name(klass));
rb_id2name       1603 variable.c     	VALUE kval = rb_str_new2(rb_id2name(key));
rb_id2name       1665 variable.c     	rb_name_error(id, "wrong class variable name %s", rb_id2name(id));
rb_id2name       1676 variable.c     		 rb_id2name(id), rb_class2name(mod));
rb_id2name       1679 variable.c     		  rb_id2name(id), rb_class2name(mod));


rb_id_attrset

rb_id_attrset     673 eval.c         	rb_add_method(klass, rb_id_attrset(id), NEW_ATTRSET(attriv), noex);
rb_id_attrset     392 intern.h       ID rb_id_attrset(ID);
rb_id_attrset     286 node.h         #define NEW_OP_ASGN22(i,o) NEW_NODE(NODE_OP_ASGN2,i,o,rb_id_attrset(i))
rb_id_attrset    7320 parse.y            return NEW_ATTRASGN(recv, rb_id_attrset(id), 0);
rb_id_attrset    8457 parse.y        		id = rb_id_attrset(id);
rb_id_attrset     159 struct.c       	if (rb_id_attrset(SYM2ID(slot)) == rb_frame_this_func()) {
rb_id_attrset     210 struct.c       	    rb_define_method_id(nstr, rb_id_attrset(id), rb_struct_set, 1);


rb_include_module

rb_include_module 2842 array.c            rb_include_module(rb_cArray, rb_mEnumerable);
rb_include_module 1803 dir.c              rb_include_module(rb_cDir, rb_mEnumerable);
rb_include_module  381 enumerator.c       rb_include_module(rb_cEnumerator, rb_mEnumerable);
rb_include_module 3871 eval.c         		rb_include_module(klass, ruby_wrapper);
rb_include_module 3907 eval.c         		rb_include_module(module, ruby_wrapper);
rb_include_module 3929 eval.c         		rb_include_module(klass, ruby_wrapper);
rb_include_module 7246 eval.c             rb_include_module(dest, module);
rb_include_module 7282 eval.c             rb_include_module(rb_singleton_class(obj), module);
rb_include_module  729 ext/dbm/dbm.c      rb_include_module(rb_cDBM, rb_mEnumerable);
rb_include_module  919 ext/gdbm/gdbm.c     rb_include_module(rb_cGDBM, rb_mEnumerable);
rb_include_module 1075 ext/iconv/iconv.c     rb_include_module(rb_eIconvInvalidEncoding, rb_eIconvFailure);
rb_include_module 1076 ext/iconv/iconv.c     rb_include_module(rb_eIconvIllegalSeq, rb_eIconvFailure);
rb_include_module 1077 ext/iconv/iconv.c     rb_include_module(rb_eIconvInvalidChar, rb_eIconvFailure);
rb_include_module 1078 ext/iconv/iconv.c     rb_include_module(rb_eIconvOutOfRange, rb_eIconvFailure);
rb_include_module 1079 ext/iconv/iconv.c     rb_include_module(rb_eIconvBrokenLibrary, rb_eIconvFailure);
rb_include_module 1123 ext/openssl/ossl_asn1.c     rb_include_module(cASN1Constructive, rb_mEnumerable);
rb_include_module  443 ext/openssl/ossl_config.c     rb_include_module(cConfig, rb_mEnumerable);
rb_include_module  710 ext/sdbm/init.c     rb_include_module(rb_cDBM, rb_mEnumerable);
rb_include_module 1232 ext/stringio/stringio.c     rb_include_module(StringIO, rb_mEnumerable);
rb_include_module 2321 ext/syck/rubyext.c     rb_include_module( cBadAlias, rb_const_get( rb_cObject, rb_intern("Comparable") ) );
rb_include_module  239 ext/syslog/syslog.c     rb_include_module(mSyslog, mSyslogConstants);
rb_include_module 3519 ext/zlib/zlib.c     rb_include_module(cGzipReader, rb_mEnumerable);
rb_include_module 4357 file.c             rb_include_module(rb_cIO, rb_mFConst);
rb_include_module 4371 file.c             rb_include_module(rb_cStat, rb_mComparable);
rb_include_module 2283 hash.c             rb_include_module(rb_cHash, rb_mEnumerable);
rb_include_module 5467 io.c               rb_include_module(rb_cIO, rb_mEnumerable);
rb_include_module 2811 numeric.c          rb_include_module(rb_cNumeric, rb_mComparable);
rb_include_module 2846 numeric.c          rb_include_module(rb_cInteger, rb_mPrecision);
rb_include_module 2858 numeric.c          rb_include_module(rb_cFixnum, rb_mPrecision);
rb_include_module 2907 numeric.c          rb_include_module(rb_cFloat, rb_mPrecision);
rb_include_module 2379 object.c           rb_include_module(rb_cObject, rb_mKernel);
rb_include_module  732 range.c            rb_include_module(rb_cRange, rb_mEnumerable);
rb_include_module  506 ruby.h         void rb_include_module(VALUE,VALUE);
rb_include_module 4187 string.c           rb_include_module(rb_cString, rb_mComparable);
rb_include_module 4188 string.c           rb_include_module(rb_cString, rb_mEnumerable);
rb_include_module  827 struct.c           rb_include_module(rb_cStruct, rb_mEnumerable);
rb_include_module 2067 time.c             rb_include_module(rb_cTime, rb_mComparable);


rb_inflate_addstr

rb_inflate_addstr   99 ext/zlib/zlib.c static VALUE rb_inflate_addstr _((VALUE, VALUE));
rb_inflate_addstr 3478 ext/zlib/zlib.c     rb_define_method(cInflate, "<<", rb_inflate_addstr, 1);


rb_inflate_inflate

rb_inflate_inflate   98 ext/zlib/zlib.c static VALUE rb_inflate_inflate _((VALUE, VALUE));
rb_inflate_inflate 3477 ext/zlib/zlib.c     rb_define_method(cInflate, "inflate", rb_inflate_inflate, 1);


rb_inflate_initialize

rb_inflate_initialize   95 ext/zlib/zlib.c static VALUE rb_inflate_initialize _((int, VALUE*, VALUE));
rb_inflate_initialize 3476 ext/zlib/zlib.c     rb_define_method(cInflate, "initialize", rb_inflate_initialize, -1);


rb_inflate_s_allocate

rb_inflate_s_allocate   94 ext/zlib/zlib.c static VALUE rb_inflate_s_allocate _((VALUE));
rb_inflate_s_allocate 3475 ext/zlib/zlib.c     rb_define_alloc_func(cInflate, rb_inflate_s_allocate);


rb_inflate_s_inflate

rb_inflate_s_inflate   96 ext/zlib/zlib.c static VALUE rb_inflate_s_inflate _((VALUE, VALUE));
rb_inflate_s_inflate 3474 ext/zlib/zlib.c     rb_define_singleton_method(cInflate, "inflate", rb_inflate_s_inflate, 1);


rb_inflate_set_dictionary

rb_inflate_set_dictionary  102 ext/zlib/zlib.c static VALUE rb_inflate_set_dictionary _((VALUE, VALUE));
rb_inflate_set_dictionary 3481 ext/zlib/zlib.c     rb_define_method(cInflate, "set_dictionary", rb_inflate_set_dictionary, 1);


rb_inflate_sync

rb_inflate_sync   100 ext/zlib/zlib.c static VALUE rb_inflate_sync _((VALUE, VALUE));
rb_inflate_sync  3479 ext/zlib/zlib.c     rb_define_method(cInflate, "sync", rb_inflate_sync, 1);


rb_inflate_sync_point_p

rb_inflate_sync_point_p  101 ext/zlib/zlib.c static VALUE rb_inflate_sync_point_p _((VALUE));
rb_inflate_sync_point_p 3480 ext/zlib/zlib.c     rb_define_method(cInflate, "sync_point?", rb_inflate_sync_point_p, 0);


rb_inspect

rb_inspect       1353 array.c        	s = rb_inspect(RARRAY(ary)->ptr[i]);
rb_inspect         41 compar.c       	y = rb_inspect(y);
rb_inspect        701 error.c        	    d = rb_protect(rb_inspect, obj, 0);
rb_inspect       9151 eval.c         	    rb_str_buf_append(str, rb_inspect(data->klass));
rb_inspect       9154 eval.c         	    rb_str_buf_append(str, rb_inspect(v));
rb_inspect       9158 eval.c         	    rb_str_buf_append(str, rb_inspect(data->recv));
rb_inspect       9160 eval.c         	    rb_str_buf_append(str, rb_inspect(v));
rb_inspect       13066 eval.c         	VALUE symname = rb_inspect(sym);
rb_inspect       13067 eval.c         	VALUE thrname = rb_inspect(rb_thread_current());
rb_inspect       13073 eval.c         	VALUE symname = rb_inspect(sym);
rb_inspect       13074 eval.c         	VALUE thrname = rb_inspect(rb_thread_current());
rb_inspect        128 ext/bigdecimal/bigdecimal.c                     RSTRING(rb_inspect(v))->ptr:
rb_inspect        288 ext/iconv/iconv.c 	args[0] = rb_inspect(failed);
rb_inspect        291 ext/iconv/iconv.c 	args[0] = rb_inspect(rb_str_substr(failed, 0, FAILED_MAXLEN));
rb_inspect        513 ext/iconv/iconv.c 	name = rb_inspect(name);
rb_inspect       1003 ext/iconv/iconv.c     str = rb_str_buf_append(str, rb_inspect(success));
rb_inspect       1005 ext/iconv/iconv.c     str = rb_str_buf_append(str, rb_inspect(failed));
rb_inspect        426 ext/openssl/ossl_config.c     rb_str_append(str, rb_inspect(ary));
rb_inspect        607 ext/openssl/ossl_x509cert.c     rb_str_append(str, rb_inspect(ossl_x509_get_subject(self)));
rb_inspect        611 ext/openssl/ossl_x509cert.c     rb_str_append(str, rb_inspect(ossl_x509_get_issuer(self)));
rb_inspect        615 ext/openssl/ossl_x509cert.c     rb_str_append(str, rb_inspect(ossl_x509_get_serial(self)));
rb_inspect        619 ext/openssl/ossl_x509cert.c     rb_str_append(str, rb_inspect(ossl_x509_get_not_before(self)));
rb_inspect        623 ext/openssl/ossl_x509cert.c     rb_str_append(str, rb_inspect(ossl_x509_get_not_after(self)));
rb_inspect        613 file.c         	    rb_str_append(str, rb_inspect(v));
rb_inspect       1119 hash.c             str2 = rb_inspect(key);
rb_inspect       1123 hash.c             str2 = rb_inspect(value);
rb_inspect       2020 hash.c         	    i = rb_inspect(rb_str_new2(s+1));
rb_inspect        364 intern.h       VALUE rb_inspect(VALUE);
rb_inspect       3726 io.c               rb_io_write(rb_stdout, rb_obj_as_string(rb_inspect(obj)));
rb_inspect       3943 io.c           	    VALUE s = rb_inspect(orig);
rb_inspect        116 numeric.c          volatile VALUE v = rb_inspect(x[1]);
rb_inspect        323 object.c           str2 = rb_inspect(value);
rb_inspect        774 object.c       		 RSTRING(rb_inspect(y))->ptr,
rb_inspect       1145 object.c       	    rb_str_append(s, rb_inspect(v));
rb_inspect       1525 object.c       	rb_raise(rb_eTypeError, "%s is not a symbol", RSTRING(rb_inspect(name))->ptr);
rb_inspect        586 range.c            str = rb_inspect(rb_ivar_get(range, id_beg));
rb_inspect        587 range.c            str2 = rb_inspect(rb_ivar_get(range, id_end));
rb_inspect       1927 re.c                                   str1 = rb_inspect(kcode_re);
rb_inspect       1928 re.c                                   str2 = rb_inspect(v);
rb_inspect        414 sprintf.c      		if (*p == 'p') arg = rb_inspect(arg);
rb_inspect        459 struct.c       	    rb_str_append(str, rb_inspect(slot));
rb_inspect        462 struct.c       	rb_str_append(str, rb_inspect(RSTRUCT(s)->ptr[i]));
rb_inspect       1158 variable.c     	rb_raise(rb_eTypeError, "wrong autoload table: %s", RSTRING(rb_inspect(av))->ptr);


rb_int2big

rb_int2big        173 bignum.c           return rb_int2big(n);
rb_int2big        258 bignum.c       	val = rb_int2big(FIX2LONG(val));
rb_int2big        884 bignum.c       	y = rb_int2big(FIX2LONG(y));
rb_int2big        927 bignum.c       	y = rb_int2big(FIX2LONG(y));
rb_int2big       1119 bignum.c       	y = rb_int2big(FIX2LONG(y));
rb_int2big       1144 bignum.c       	y = rb_int2big(FIX2LONG(y));
rb_int2big       1167 bignum.c       	y = rb_int2big(FIX2LONG(y));
rb_int2big       1228 bignum.c       	if (divp) *divp = rb_int2big(0);
rb_int2big       1349 bignum.c       	if (divp) *divp = bigadd(*divp, rb_int2big(1), 0);
rb_int2big       1373 bignum.c       	y = rb_int2big(FIX2LONG(y));
rb_int2big       1406 bignum.c       	y = rb_int2big(FIX2LONG(y));
rb_int2big       1436 bignum.c       	y = rb_int2big(FIX2LONG(y));
rb_int2big       1464 bignum.c       	y = rb_int2big(FIX2LONG(y));
rb_int2big       1588 bignum.c       	y = rb_int2big(FIX2LONG(y));
rb_int2big       1643 bignum.c       	y = rb_int2big(FIX2LONG(y));
rb_int2big       1701 bignum.c       	y = rb_int2big(FIX2LONG(y));
rb_int2big       1906 bignum.c       	return rb_assoc_new(rb_int2big(FIX2LONG(y)), x);
rb_int2big         76 intern.h       VALUE rb_int2big(long);
rb_int2big        448 marshal.c      	    w_object(rb_int2big(FIX2LONG(obj)), arg, limit);
rb_int2big       1887 numeric.c      	return rb_big2str(rb_int2big(FIX2INT(x)), 2);
rb_int2big       1914 numeric.c      	    r = rb_big_plus(rb_int2big(a), rb_int2big(b));
rb_int2big       1950 numeric.c      	    r = rb_big_minus(rb_int2big(a), rb_int2big(b));
rb_int2big       1956 numeric.c      	x = rb_int2big(FIX2LONG(x));
rb_int2big       1993 numeric.c      	    r = rb_big_mul(rb_int2big(a), rb_int2big(b));
rb_int2big       2073 numeric.c      	x = rb_int2big(FIX2LONG(x));
rb_int2big       2136 numeric.c      	x = rb_int2big(FIX2LONG(x));
rb_int2big       2168 numeric.c      	x = rb_int2big(FIX2LONG(x));
rb_int2big       2208 numeric.c      	    return rb_big_pow(rb_int2big(a), y);
rb_int2big       2214 numeric.c      	x = rb_int2big(FIX2LONG(x));
rb_int2big       2271 numeric.c      	return rb_big_cmp(rb_int2big(FIX2LONG(x)), y);
rb_int2big       2298 numeric.c      	return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) > 0 ? Qtrue : Qfalse;
rb_int2big       2325 numeric.c      	return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) >= 0 ? Qtrue : Qfalse;
rb_int2big       2352 numeric.c      	return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) < 0 ? Qtrue : Qfalse;
rb_int2big       2379 numeric.c      	return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) <= 0 ? Qtrue : Qfalse;
rb_int2big       2480 numeric.c      	return rb_big_lshift(rb_int2big(val), y);
rb_int2big        535 sprintf.c      			val = rb_int2big(v);


rb_int2inum

rb_int2inum       578 dir.c              return rb_int2inum(pos);
rb_int2inum      2330 ext/zlib/zlib.c     rb_funcall(gz->io, id_seek, 2, rb_int2inum(-n), INT2FIX(1));
rb_int2inum        78 intern.h       VALUE rb_int2inum(long);
rb_int2inum       152 ruby.h         VALUE rb_int2inum(long);
rb_int2inum       153 ruby.h         #define INT2NUM(v) rb_int2inum(v)
rb_int2inum       155 ruby.h         #define rb_int_new(v) rb_int2inum(v)
rb_int2inum      4031 string.c       	return rb_int2inum(sum);


rb_intern

rb_intern         962 array.c            if (rb_respond_to(obj, rb_intern("to_ary"))) {
rb_intern        2344 array.c        	if (!rb_respond_to(ary2, rb_intern("to_ary"))) {
rb_intern        2925 array.c            id_cmp = rb_intern("<=>");
rb_intern          79 class.c        	id = rb_intern("__classpath__");
rb_intern          81 class.c        	id = rb_intern("__classid__");
rb_intern         147 class.c        	st_insert(RCLASS(klass)->iv_tbl, rb_intern("__attached__"), obj);
rb_intern         190 class.c            return rb_funcall(super, rb_intern("inherited"), 1, klass);
rb_intern         199 class.c            id = rb_intern(name);
rb_intern         228 class.c            id = rb_intern(name);
rb_intern         282 class.c            id = rb_intern(name);
rb_intern         302 class.c            id = rb_intern(name);
rb_intern         739 class.c            rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PUBLIC);
rb_intern         745 class.c            rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PROTECTED);
rb_intern         751 class.c            rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PRIVATE);
rb_intern         757 class.c            rb_add_method(klass, rb_intern(name), 0, NOEX_UNDEF);
rb_intern         823 class.c            rb_alias(klass, rb_intern(name1), rb_intern(name2));
rb_intern         829 class.c            rb_attr(klass, rb_intern(name), read, write, Qfalse);
rb_intern         226 compar.c           cmp = rb_intern("<=>");
rb_intern         468 dir.c              return rb_funcall(dir, rb_intern("to_s"), 0, 0);
rb_intern        1629 dir.c              VALUE dir = rb_funcall(rb_cDir, rb_intern("open"), 1, path);
rb_intern         169 enum.c         	return rb_funcall(if_none, rb_intern("call"), 0, 0);
rb_intern        1110 enum.c             id_eqq  = rb_intern("===");
rb_intern        1111 enum.c             id_each = rb_intern("each");
rb_intern        1112 enum.c             id_cmp  = rb_intern("<=>");
rb_intern         388 enumerator.c       sym_each		= ID2SYM(rb_intern("each"));
rb_intern         389 enumerator.c       sym_each_with_index	= ID2SYM(rb_intern("each_with_index"));
rb_intern         390 enumerator.c       sym_each_slice	= ID2SYM(rb_intern("each_slice"));
rb_intern         391 enumerator.c       sym_each_cons	= ID2SYM(rb_intern("each_cons"));
rb_intern         271 error.c            return rb_funcall(etype, rb_intern("new"), 1, rb_str_new(ptr, len));
rb_intern         284 error.c            return rb_funcall(etype, rb_intern("new"), 1, str);
rb_intern         344 error.c            VALUE mesg = rb_attr_get(exc, rb_intern("mesg"));
rb_intern         364 error.c            return rb_funcall(exc, rb_intern("to_s"), 0, 0);
rb_intern         427 error.c            ID bt = rb_intern("bt");
rb_intern         483 error.c            ID id_mesg = rb_intern("mesg");
rb_intern         526 error.c            return rb_attr_get(exc, rb_intern("status"));
rb_intern         540 error.c            VALUE status = rb_attr_get(exc, rb_intern("status"));
rb_intern         593 error.c            return rb_attr_get(self, rb_intern("name"));
rb_intern         606 error.c            VALUE mesg = rb_attr_get(exc, rb_intern("mesg"));
rb_intern         740 error.c            return rb_attr_get(self, rb_intern("args"));
rb_intern         850 error.c        	error = rb_const_get(klass, rb_intern("Errno"));
rb_intern         879 error.c            return rb_attr_get(self, rb_intern("errno"));
rb_intern         898 error.c            num = rb_attr_get(exc, rb_intern("errno"));
rb_intern         905 error.c        	num = rb_const_get(klass, rb_intern("Errno"));
rb_intern         907 error.c            e = rb_const_get(self, rb_intern("Errno"));
rb_intern         392 eval.c         	(mid == rb_intern("initialize" )|| mid == rb_intern("initialize_copy"))) {
rb_intern         396 eval.c         	     mid == rb_intern("allocate")) {
rb_intern         548 eval.c             remove_method(klass, rb_intern(name));
rb_intern         668 eval.c             attriv = rb_intern(buf);
rb_intern        1120 eval.c             info = rb_funcall(info, rb_intern("backtrace"), 0);
rb_intern        1128 eval.c             rb_funcall(info, rb_intern("set_backtrace"), 1, bt);
rb_intern        1170 eval.c         	e = rb_funcall(ruby_errinfo, rb_intern("message"), 0, 0);
rb_intern        1635 eval.c         	id = rb_intern("break"); break;
rb_intern        1637 eval.c         	id = rb_intern("redo"); break;
rb_intern        1639 eval.c         	id = rb_intern("retry"); break;
rb_intern        1641 eval.c         	id = rb_intern("next"); break;
rb_intern        1643 eval.c         	id = rb_intern("return"); break;
rb_intern        1645 eval.c         	id = rb_intern("noreason"); break;
rb_intern        1723 eval.c         	    val = rb_funcall2(cmd, rb_intern("call"), RARRAY(arg)->len, RARRAY(arg)->ptr);
rb_intern        4477 eval.c         	exception = rb_intern("exception");
rb_intern        5382 eval.c         	args[n++] = rb_funcall(rb_const_get(exc, rb_intern("message")), '!',
rb_intern        6204 eval.c         		mesg  = rb_attr_get(ruby_errinfo, rb_intern("mesg"));
rb_intern        7265 eval.c         	rb_funcall(argv[argc], rb_intern("append_features"), 1, module);
rb_intern        7266 eval.c         	rb_funcall(argv[argc], rb_intern("included"), 1, module);
rb_intern        7354 eval.c         	rb_funcall(argv[argc], rb_intern("extend_object"), 1, obj);
rb_intern        7355 eval.c         	rb_funcall(argv[argc], rb_intern("extended"), 1, obj);
rb_intern        7605 eval.c             init = rb_intern("initialize");
rb_intern        7606 eval.c             eqq = rb_intern("===");
rb_intern        7607 eval.c             each = rb_intern("each");
rb_intern        7609 eval.c             aref = rb_intern("[]");
rb_intern        7610 eval.c             aset = rb_intern("[]=");
rb_intern        7611 eval.c             match = rb_intern("=~");
rb_intern        7612 eval.c             missing = rb_intern("method_missing");
rb_intern        7613 eval.c             added = rb_intern("method_added");
rb_intern        7614 eval.c             singleton_added = rb_intern("singleton_method_added");
rb_intern        7615 eval.c             removed = rb_intern("method_removed");
rb_intern        7616 eval.c             singleton_removed = rb_intern("singleton_method_removed");
rb_intern        7617 eval.c             undefined = rb_intern("method_undefined");
rb_intern        7618 eval.c             singleton_undefined = rb_intern("singleton_method_undefined");
rb_intern        7620 eval.c             __id__ = rb_intern("__id__");
rb_intern        7621 eval.c             __send__ = rb_intern("__send__");
rb_intern        7637 eval.c             respond_to   = rb_intern("respond_to?");
rb_intern        12899 eval.c             recursive_key = rb_intern("__recursive_key__");
rb_intern        12957 eval.c             return rb_funcall(Qnil, rb_intern("catch"), 1, tag);
rb_intern        12963 eval.c             return rb_iterate((VALUE(*)(VALUE))catch_i, ID2SYM(rb_intern(tag)), func, data);
rb_intern        13015 eval.c             argv[0] = ID2SYM(rb_intern(tag));
rb_intern         435 ext/dbm/dbm.c      return rb_funcall(obj, rb_intern("each_pair"), 0, 0);
rb_intern         270 ext/digest/digest.c     id_metadata = rb_intern("metadata");
rb_intern          33 ext/digest/md5/md5init.c     rb_cvar_set(cDigest_MD5, rb_intern("metadata"),
rb_intern          34 ext/digest/rmd160/rmd160init.c     id_metadata = rb_intern("metadata");
rb_intern          33 ext/digest/sha1/sha1init.c     rb_cvar_set(cDigest_SHA1, rb_intern("metadata"),
rb_intern          35 ext/digest/sha2/sha2init.c     id_metadata = rb_intern("metadata");
rb_intern         491 ext/dl/cfunc.c     id_last_error = rb_intern("__DL2_LAST_ERROR__");
rb_intern         493 ext/dl/cfunc.c     id_win32_last_error = rb_intern("__DL2_WIN32_LAST_ERROR__");
rb_intern         452 ext/dl/cptr.c      id_to_ptr = rb_intern("to_ptr");
rb_intern          86 ext/dl/dl.c        rbdl_id_cdecl = rb_intern("cdecl");
rb_intern          87 ext/dl/dl.c        rbdl_id_stdcall = rb_intern("stdcall");
rb_intern         537 ext/gdbm/gdbm.c     return rb_funcall(obj, rb_intern("each_pair"), 0, 0);
rb_intern         142 ext/iconv/iconv.c 	VALUE key = rb_funcall2(val, rb_intern("downcase"), 0, 0);
rb_intern         938 ext/iconv/iconv.c     rb_ary_push(ary, ID2SYM(rb_intern("trivial?")));
rb_intern         941 ext/iconv/iconv.c     rb_ary_push(ary, ID2SYM(rb_intern("transliterate?")));
rb_intern         944 ext/iconv/iconv.c     rb_ary_push(ary, ID2SYM(rb_intern("transliterate=")));
rb_intern         947 ext/iconv/iconv.c     rb_ary_push(ary, ID2SYM(rb_intern("discard_ilseq?")));
rb_intern         950 ext/iconv/iconv.c     rb_ary_push(ary, ID2SYM(rb_intern("discard_ilseq=")));
rb_intern        1081 ext/iconv/iconv.c     rb_success = rb_intern("success");
rb_intern        1082 ext/iconv/iconv.c     rb_failed = rb_intern("failed");
rb_intern        1083 ext/iconv/iconv.c     id_transliterate = rb_intern("transliterate");
rb_intern        1084 ext/iconv/iconv.c     id_discard_ilseq = rb_intern("discard_ilseq");
rb_intern         196 ext/openssl/ossl.c     return rb_funcall(args->proc, rb_intern("call"), 2,
rb_intern         444 ext/openssl/ossl.c     ossl_s_to_der = rb_intern("to_der");
rb_intern          63 ext/openssl/ossl_asn1.c     return rb_funcall2(rb_cTime, rb_intern("utc"), 6, argv);
rb_intern         159 ext/openssl/ossl_asn1.c #define ossl_asn1_get_value(o)       rb_attr_get((o),rb_intern("@value"))
rb_intern         160 ext/openssl/ossl_asn1.c #define ossl_asn1_get_tag(o)         rb_attr_get((o),rb_intern("@tag"))
rb_intern         161 ext/openssl/ossl_asn1.c #define ossl_asn1_get_tagging(o)     rb_attr_get((o),rb_intern("@tagging"))
rb_intern         162 ext/openssl/ossl_asn1.c #define ossl_asn1_get_tag_class(o)   rb_attr_get((o),rb_intern("@tag_class"))
rb_intern         512 ext/openssl/ossl_asn1.c         rflag = rb_attr_get(obj, rb_intern("@unused_bits"));
rb_intern         799 ext/openssl/ossl_asn1.c 	    asn1data = rb_funcall(klass, rb_intern("new"), 1, value);
rb_intern         805 ext/openssl/ossl_asn1.c 	    asn1data = rb_funcall(cASN1Data, rb_intern("new"), 3,
rb_intern        1059 ext/openssl/ossl_asn1.c { return rb_funcall3(cASN1##klass, rb_intern("new"), argc, argv); }
rb_intern        1090 ext/openssl/ossl_asn1.c     sUNIVERSAL = rb_intern("UNIVERSAL");
rb_intern        1091 ext/openssl/ossl_asn1.c     sCONTEXT_SPECIFIC = rb_intern("CONTEXT_SPECIFIC");
rb_intern        1092 ext/openssl/ossl_asn1.c     sAPPLICATION = rb_intern("APPLICATION");
rb_intern        1093 ext/openssl/ossl_asn1.c     sPRIVATE = rb_intern("PRIVATE");
rb_intern        1094 ext/openssl/ossl_asn1.c     sEXPLICIT = rb_intern("EXPLICIT");
rb_intern        1095 ext/openssl/ossl_asn1.c     sIMPLICIT = rb_intern("IMPLICIT");
rb_intern        1111 ext/openssl/ossl_asn1.c     rb_attr(cASN1Data, rb_intern("value"), 1, 1, Qtrue);
rb_intern        1112 ext/openssl/ossl_asn1.c     rb_attr(cASN1Data, rb_intern("tag"), 1, 1, Qtrue);
rb_intern        1113 ext/openssl/ossl_asn1.c     rb_attr(cASN1Data, rb_intern("tag_class"), 1, 1, Qtrue);
rb_intern        1118 ext/openssl/ossl_asn1.c     rb_attr(cASN1Primitive, rb_intern("tagging"), 1, 1, Qtrue);
rb_intern        1124 ext/openssl/ossl_asn1.c     rb_attr(cASN1Constructive, rb_intern("tagging"), 1, 1, Qtrue);
rb_intern        1165 ext/openssl/ossl_asn1.c     rb_attr(cASN1BitString, rb_intern("unused_bits"), 1, 1, Qtrue);
rb_intern          58 ext/openssl/ossl_config.c     str = rb_funcall(obj, rb_intern("to_s"), 0);
rb_intern         122 ext/openssl/ossl_config.c     str = rb_funcall(self, rb_intern("to_s"), 0);
rb_intern         149 ext/openssl/ossl_pkcs12.c     rb_attr(cPKCS12, rb_intern("key"), 1, 0, Qfalse);
rb_intern         150 ext/openssl/ossl_pkcs12.c     rb_attr(cPKCS12, rb_intern("certificate"), 1, 0, Qfalse);
rb_intern         151 ext/openssl/ossl_pkcs12.c     rb_attr(cPKCS12, rb_intern("ca_certs"), 1, 0, Qfalse);
rb_intern         386 ext/openssl/ossl_pkcs7.c 	return ID2SYM(rb_intern("signed"));
rb_intern         388 ext/openssl/ossl_pkcs7.c 	return ID2SYM(rb_intern("encrypted"));
rb_intern         390 ext/openssl/ossl_pkcs7.c 	return ID2SYM(rb_intern("enveloped"));
rb_intern         392 ext/openssl/ossl_pkcs7.c 	return ID2SYM(rb_intern("signedAndEnveloped"));
rb_intern         394 ext/openssl/ossl_pkcs7.c 	return ID2SYM(rb_intern("data"));
rb_intern         936 ext/openssl/ossl_pkcs7.c     rb_attr(cPKCS7, rb_intern("data"), 1, 0, Qfalse);
rb_intern         937 ext/openssl/ossl_pkcs7.c     rb_attr(cPKCS7, rb_intern("error_string"), 1, 1, Qfalse);
rb_intern         223 ext/openssl/ossl_pkey.c     id_private_q = rb_intern("private?");
rb_intern         187 ext/openssl/ossl_ssl.c     ary = rb_funcall(cb, rb_intern("call"), 1, obj);
rb_intern         224 ext/openssl/ossl_ssl.c     dh = rb_funcall(cb, rb_intern("call"), 3, args[0], args[1], args[2]);
rb_intern         517 ext/openssl/ossl_ssl.c         ctx = rb_funcall(cSSLContext, rb_intern("new"), 0);
rb_intern         659 ext/openssl/ossl_ssl.c         ID id_sysread = rb_intern("sysread");
rb_intern         703 ext/openssl/ossl_ssl.c         ID id_syswrite = rb_intern("syswrite");
rb_intern         720 ext/openssl/ossl_ssl.c 	rb_funcall(ossl_ssl_get_io(self), rb_intern("close"), 0);
rb_intern         869 ext/openssl/ossl_ssl.c         rb_attr(cSSLContext, rb_intern(ossl_sslctx_attrs[i]), 1, 1, Qfalse);
rb_intern         878 ext/openssl/ossl_ssl.c         rb_attr(cSSLSocket, rb_intern(ossl_ssl_attr_readers[i]), 1, 0, Qfalse);
rb_intern         880 ext/openssl/ossl_ssl.c         rb_attr(cSSLSocket, rb_intern(ossl_ssl_attrs[i]), 1, 1, Qfalse);
rb_intern         105 ext/openssl/ossl_x509attr.c     rb_funcall(self, rb_intern("oid="), 1, oid);
rb_intern         106 ext/openssl/ossl_x509attr.c     rb_funcall(self, rb_intern("value="), 1, value);
rb_intern         208 ext/openssl/ossl_x509attr.c     asn1 = rb_funcall(mASN1, rb_intern("decode"), 1, str);
rb_intern         289 ext/openssl/ossl_x509ext.c     rb_funcall(self, rb_intern("oid="), 1, oid);
rb_intern         290 ext/openssl/ossl_x509ext.c     rb_funcall(self, rb_intern("value="), 1, value);
rb_intern         291 ext/openssl/ossl_x509ext.c     if(argc > 2) rb_funcall(self, rb_intern("critical="), 1, critical);
rb_intern         433 ext/openssl/ossl_x509ext.c     rb_attr(cX509ExtFactory, rb_intern("issuer_certificate"), 1, 0, Qfalse);
rb_intern         434 ext/openssl/ossl_x509ext.c     rb_attr(cX509ExtFactory, rb_intern("subject_certificate"), 1, 0, Qfalse);
rb_intern         435 ext/openssl/ossl_x509ext.c     rb_attr(cX509ExtFactory, rb_intern("subject_request"), 1, 0, Qfalse);
rb_intern         436 ext/openssl/ossl_x509ext.c     rb_attr(cX509ExtFactory, rb_intern("crl"), 1, 0, Qfalse);
rb_intern         437 ext/openssl/ossl_x509ext.c     rb_attr(cX509ExtFactory, rb_intern("config"), 1, 0, Qfalse);
rb_intern          31 ext/openssl/ossl_x509name.c   rb_const_get(cX509Name, rb_intern("OBJECT_TYPE_TEMPLATE"))
rb_intern          33 ext/openssl/ossl_x509name.c   rb_const_get(cX509Name, rb_intern("DEFAULT_OBJECT_TYPE"))
rb_intern         310 ext/openssl/ossl_x509name.c     id_aref = rb_intern("[]");
rb_intern         296 ext/openssl/ossl_x509store.c     ctx = rb_funcall(cX509StoreContext, rb_intern("new"), 3, self, cert, chain);
rb_intern         300 ext/openssl/ossl_x509store.c     result = rb_funcall(ctx, rb_intern("verify"), 0);
rb_intern         577 ext/openssl/ossl_x509store.c     rb_attr(cX509Store, rb_intern("verify_callback"), 1, 0, Qfalse);
rb_intern         578 ext/openssl/ossl_x509store.c     rb_attr(cX509Store, rb_intern("error"), 1, 0, Qfalse);
rb_intern         579 ext/openssl/ossl_x509store.c     rb_attr(cX509Store, rb_intern("error_string"), 1, 0, Qfalse);
rb_intern         580 ext/openssl/ossl_x509store.c     rb_attr(cX509Store, rb_intern("chain"), 1, 0, Qfalse);
rb_intern         124 ext/pty/pty.c      return rb_ivar_get(self, rb_intern("status"));
rb_intern         145 ext/pty/pty.c      rb_funcall(info->thread, rb_intern("raise"), 1, exc);
rb_intern         302 ext/pty/pty.c      rb_funcall(info->thread, rb_intern("value"), 0);
rb_intern         789 ext/racc/cparse/cparse.c     ID id_racc = rb_intern("Racc");
rb_intern         793 ext/racc/cparse/cparse.c         Parser = rb_const_get_at(Racc, rb_intern("Parser"));
rb_intern         810 ext/racc/cparse/cparse.c     id_yydebug      = rb_intern("@yydebug");
rb_intern         811 ext/racc/cparse/cparse.c     id_nexttoken    = rb_intern("next_token");
rb_intern         812 ext/racc/cparse/cparse.c     id_onerror      = rb_intern("on_error");
rb_intern         813 ext/racc/cparse/cparse.c     id_noreduce     = rb_intern("_reduce_none");
rb_intern         814 ext/racc/cparse/cparse.c     id_catch        = rb_intern("catch");
rb_intern         815 ext/racc/cparse/cparse.c     id_errstatus    = rb_intern("@racc_error_status");
rb_intern         816 ext/racc/cparse/cparse.c     sym_raccjump    = id_to_value(rb_intern("racc_jump"));
rb_intern         818 ext/racc/cparse/cparse.c     id_d_shift       = rb_intern("racc_shift");
rb_intern         819 ext/racc/cparse/cparse.c     id_d_reduce      = rb_intern("racc_reduce");
rb_intern         820 ext/racc/cparse/cparse.c     id_d_accept      = rb_intern("racc_accept");
rb_intern         821 ext/racc/cparse/cparse.c     id_d_read_token  = rb_intern("racc_read_token");
rb_intern         822 ext/racc/cparse/cparse.c     id_d_next_state  = rb_intern("racc_next_state");
rb_intern         823 ext/racc/cparse/cparse.c     id_d_e_pop       = rb_intern("racc_e_pop");
rb_intern         129 ext/readline/readline.c     if (!rb_respond_to(proc, rb_intern("call")))
rb_intern         177 ext/readline/readline.c     ary = rb_funcall(proc, rb_intern("call"), 1, rb_tainted_str_new2(text));
rb_intern         754 ext/readline/readline.c     completion_proc = rb_intern(COMPLETION_PROC);
rb_intern         755 ext/readline/readline.c     completion_case_fold = rb_intern(COMPLETION_CASE_FOLD);
rb_intern          66 ext/ripper/eventids2.c     ripper_id_backref = rb_intern("on_backref");
rb_intern          67 ext/ripper/eventids2.c     ripper_id_backtick = rb_intern("on_backtick");
rb_intern          68 ext/ripper/eventids2.c     ripper_id_comma = rb_intern("on_comma");
rb_intern          69 ext/ripper/eventids2.c     ripper_id_const = rb_intern("on_const");
rb_intern          70 ext/ripper/eventids2.c     ripper_id_cvar = rb_intern("on_cvar");
rb_intern          71 ext/ripper/eventids2.c     ripper_id_embexpr_beg = rb_intern("on_embexpr_beg");
rb_intern          72 ext/ripper/eventids2.c     ripper_id_embexpr_end = rb_intern("on_embexpr_end");
rb_intern          73 ext/ripper/eventids2.c     ripper_id_embvar = rb_intern("on_embvar");
rb_intern          74 ext/ripper/eventids2.c     ripper_id_float = rb_intern("on_float");
rb_intern          75 ext/ripper/eventids2.c     ripper_id_gvar = rb_intern("on_gvar");
rb_intern          76 ext/ripper/eventids2.c     ripper_id_ident = rb_intern("on_ident");
rb_intern          77 ext/ripper/eventids2.c     ripper_id_int = rb_intern("on_int");
rb_intern          78 ext/ripper/eventids2.c     ripper_id_ivar = rb_intern("on_ivar");
rb_intern          79 ext/ripper/eventids2.c     ripper_id_kw = rb_intern("on_kw");
rb_intern          80 ext/ripper/eventids2.c     ripper_id_lbrace = rb_intern("on_lbrace");
rb_intern          81 ext/ripper/eventids2.c     ripper_id_lbracket = rb_intern("on_lbracket");
rb_intern          82 ext/ripper/eventids2.c     ripper_id_lparen = rb_intern("on_lparen");
rb_intern          83 ext/ripper/eventids2.c     ripper_id_nl = rb_intern("on_nl");
rb_intern          84 ext/ripper/eventids2.c     ripper_id_op = rb_intern("on_op");
rb_intern          85 ext/ripper/eventids2.c     ripper_id_period = rb_intern("on_period");
rb_intern          86 ext/ripper/eventids2.c     ripper_id_rbrace = rb_intern("on_rbrace");
rb_intern          87 ext/ripper/eventids2.c     ripper_id_rbracket = rb_intern("on_rbracket");
rb_intern          88 ext/ripper/eventids2.c     ripper_id_rparen = rb_intern("on_rparen");
rb_intern          89 ext/ripper/eventids2.c     ripper_id_semicolon = rb_intern("on_semicolon");
rb_intern          90 ext/ripper/eventids2.c     ripper_id_symbeg = rb_intern("on_symbeg");
rb_intern          91 ext/ripper/eventids2.c     ripper_id_tstring_beg = rb_intern("on_tstring_beg");
rb_intern          92 ext/ripper/eventids2.c     ripper_id_tstring_content = rb_intern("on_tstring_content");
rb_intern          93 ext/ripper/eventids2.c     ripper_id_tstring_end = rb_intern("on_tstring_end");
rb_intern          94 ext/ripper/eventids2.c     ripper_id_words_beg = rb_intern("on_words_beg");
rb_intern          95 ext/ripper/eventids2.c     ripper_id_qwords_beg = rb_intern("on_qwords_beg");
rb_intern          96 ext/ripper/eventids2.c     ripper_id_words_sep = rb_intern("on_words_sep");
rb_intern          97 ext/ripper/eventids2.c     ripper_id_regexp_beg = rb_intern("on_regexp_beg");
rb_intern          98 ext/ripper/eventids2.c     ripper_id_regexp_end = rb_intern("on_regexp_end");
rb_intern          99 ext/ripper/eventids2.c     ripper_id_label = rb_intern("on_label");
rb_intern         100 ext/ripper/eventids2.c     ripper_id_tlambda = rb_intern("on_tlambda");
rb_intern         101 ext/ripper/eventids2.c     ripper_id_tlambda_arg = rb_intern("on_tlambda_arg");
rb_intern         102 ext/ripper/eventids2.c     ripper_id_tlambeg = rb_intern("on_tlambeg");
rb_intern         104 ext/ripper/eventids2.c     ripper_id_ignored_nl = rb_intern("on_ignored_nl");
rb_intern         105 ext/ripper/eventids2.c     ripper_id_comment = rb_intern("on_comment");
rb_intern         106 ext/ripper/eventids2.c     ripper_id_embdoc_beg = rb_intern("on_embdoc_beg");
rb_intern         107 ext/ripper/eventids2.c     ripper_id_embdoc = rb_intern("on_embdoc");
rb_intern         108 ext/ripper/eventids2.c     ripper_id_embdoc_end = rb_intern("on_embdoc_end");
rb_intern         109 ext/ripper/eventids2.c     ripper_id_sp = rb_intern("on_sp");
rb_intern         110 ext/ripper/eventids2.c     ripper_id_heredoc_beg = rb_intern("on_heredoc_beg");
rb_intern         111 ext/ripper/eventids2.c     ripper_id_heredoc_end = rb_intern("on_heredoc_end");
rb_intern         112 ext/ripper/eventids2.c     ripper_id___end__ = rb_intern("on___end__");
rb_intern         113 ext/ripper/eventids2.c     ripper_id_CHAR = rb_intern("on_CHAR");
rb_intern         413 ext/sdbm/init.c     return rb_funcall(obj, rb_intern("each_pair"), 0, 0);
rb_intern        1904 ext/socket/socket.c 	    for_fd = rb_intern("for_fd");
rb_intern        1297 ext/strscan/strscan.c     ID id_scanerr = rb_intern("ScanError");
rb_intern        1307 ext/strscan/strscan.c     rb_const_set(StringScanner, rb_intern("Version"), tmp);
rb_intern        1310 ext/strscan/strscan.c     rb_const_set(StringScanner, rb_intern("Id"), tmp);
rb_intern        1349 ext/strscan/strscan.c     rb_alias(StringScanner, rb_intern("bol?"), rb_intern("beginning_of_line?"));
rb_intern         492 ext/syck/rubyext.c                     cDate = rb_const_get( rb_cObject, rb_intern("Date") );
rb_intern        2153 ext/syck/rubyext.c     s_new = rb_intern("new");
rb_intern        2154 ext/syck/rubyext.c     s_utc = rb_intern("utc");
rb_intern        2155 ext/syck/rubyext.c     s_at = rb_intern("at");
rb_intern        2156 ext/syck/rubyext.c     s_to_f = rb_intern("to_f");
rb_intern        2157 ext/syck/rubyext.c     s_to_i = rb_intern("to_i");
rb_intern        2158 ext/syck/rubyext.c     s_read = rb_intern("read");
rb_intern        2159 ext/syck/rubyext.c     s_binmode = rb_intern("binmode");
rb_intern        2160 ext/syck/rubyext.c     s_transfer = rb_intern("transfer");
rb_intern        2161 ext/syck/rubyext.c     s_call = rb_intern("call");
rb_intern        2162 ext/syck/rubyext.c     s_cmp = rb_intern("<=>");
rb_intern        2163 ext/syck/rubyext.c     s_intern = rb_intern("intern");
rb_intern        2164 ext/syck/rubyext.c     s_update = rb_intern("update");
rb_intern        2165 ext/syck/rubyext.c     s_detect_implicit = rb_intern("detect_implicit");
rb_intern        2166 ext/syck/rubyext.c     s_dup = rb_intern("dup");
rb_intern        2167 ext/syck/rubyext.c     s_default_set = rb_intern("default=");
rb_intern        2168 ext/syck/rubyext.c     s_match = rb_intern("match");
rb_intern        2169 ext/syck/rubyext.c     s_push = rb_intern("push");
rb_intern        2170 ext/syck/rubyext.c     s_haskey = rb_intern("has_key?");
rb_intern        2171 ext/syck/rubyext.c     s_keys = rb_intern("keys");
rb_intern        2172 ext/syck/rubyext.c     s_node_import = rb_intern("node_import");
rb_intern        2173 ext/syck/rubyext.c     s_tr_bang = rb_intern("tr!");
rb_intern        2174 ext/syck/rubyext.c     s_unpack = rb_intern("unpack");
rb_intern        2175 ext/syck/rubyext.c     s_write = rb_intern("write");
rb_intern        2176 ext/syck/rubyext.c     s_tag_read_class = rb_intern( "yaml_tag_read_class" );
rb_intern        2177 ext/syck/rubyext.c     s_tag_subclasses = rb_intern( "yaml_tag_subclasses?" );
rb_intern        2178 ext/syck/rubyext.c     s_emitter = rb_intern( "emitter" );
rb_intern        2179 ext/syck/rubyext.c     s_set_resolver = rb_intern( "set_resolver" );
rb_intern        2180 ext/syck/rubyext.c     s_node_export = rb_intern( "node_export" );
rb_intern        2181 ext/syck/rubyext.c     s_to_yaml = rb_intern( "to_yaml" );
rb_intern        2182 ext/syck/rubyext.c     s_transform = rb_intern( "transform" );
rb_intern        2183 ext/syck/rubyext.c     s_yaml_new = rb_intern("yaml_new");
rb_intern        2184 ext/syck/rubyext.c     s_yaml_initialize = rb_intern("yaml_initialize");
rb_intern        2186 ext/syck/rubyext.c     s_tags = rb_intern("@tags");
rb_intern        2187 ext/syck/rubyext.c     s_name = rb_intern("@name");
rb_intern        2188 ext/syck/rubyext.c     s_options = rb_intern("@options");
rb_intern        2189 ext/syck/rubyext.c     s_kind = rb_intern("@kind");
rb_intern        2190 ext/syck/rubyext.c     s_type_id = rb_intern("@type_id");
rb_intern        2191 ext/syck/rubyext.c     s_type_id_set = rb_intern("type_id=");
rb_intern        2192 ext/syck/rubyext.c     s_resolver = rb_intern("@resolver");
rb_intern        2193 ext/syck/rubyext.c     s_level = rb_intern( "@level" );
rb_intern        2194 ext/syck/rubyext.c     s_style = rb_intern("@style");
rb_intern        2195 ext/syck/rubyext.c     s_style_set = rb_intern("style=");
rb_intern        2196 ext/syck/rubyext.c     s_value = rb_intern("@value");
rb_intern        2197 ext/syck/rubyext.c     s_value_set = rb_intern("value=");
rb_intern        2198 ext/syck/rubyext.c     s_out = rb_intern("@out");
rb_intern        2199 ext/syck/rubyext.c     s_input = rb_intern("@input");
rb_intern        2201 ext/syck/rubyext.c     sym_model = ID2SYM(rb_intern("Model"));
rb_intern        2202 ext/syck/rubyext.c     sym_generic = ID2SYM(rb_intern("Generic"));
rb_intern        2203 ext/syck/rubyext.c     sym_bytecode = ID2SYM(rb_intern("bytecode"));
rb_intern        2204 ext/syck/rubyext.c     sym_map = ID2SYM(rb_intern("map"));
rb_intern        2205 ext/syck/rubyext.c     sym_scalar = ID2SYM(rb_intern("scalar"));
rb_intern        2206 ext/syck/rubyext.c     sym_seq = ID2SYM(rb_intern("seq"));
rb_intern        2207 ext/syck/rubyext.c     sym_1quote = ID2SYM(rb_intern("quote1"));
rb_intern        2208 ext/syck/rubyext.c     sym_2quote = ID2SYM(rb_intern("quote2"));
rb_intern        2209 ext/syck/rubyext.c     sym_fold = ID2SYM(rb_intern("fold"));
rb_intern        2210 ext/syck/rubyext.c     sym_literal = ID2SYM(rb_intern("literal"));
rb_intern        2211 ext/syck/rubyext.c     sym_plain = ID2SYM(rb_intern("plain"));
rb_intern        2212 ext/syck/rubyext.c     sym_inline = ID2SYM(rb_intern("inline"));
rb_intern        2228 ext/syck/rubyext.c     oDefaultResolver = rb_funcall( cResolver, rb_intern( "new" ), 0 );
rb_intern        2233 ext/syck/rubyext.c     oGenericResolver = rb_funcall( cResolver, rb_intern( "new" ), 0 );
rb_intern        2321 ext/syck/rubyext.c     rb_include_module( cBadAlias, rb_const_get( rb_cObject, rb_intern("Comparable") ) );
rb_intern        1131 ext/tk/tcltklib.c         divmod = rb_funcall(time, rb_intern("divmod"), 1, LONG2NUM(1000000));
rb_intern        1138 ext/tk/tcltklib.c         divmod = rb_funcall(time, rb_intern("divmod"), 1, INT2FIX(1));
rb_intern        2548 ext/tk/tcltklib.c         receiver = rb_const_get(rb_cObject, rb_intern(str));
rb_intern        2584 ext/tk/tcltklib.c     method = rb_intern(str);
rb_intern        7767 ext/tk/tcltklib.c     eLocalJumpError = rb_const_get(rb_cObject, rb_intern("LocalJumpError"));
rb_intern        7777 ext/tk/tcltklib.c     ID_at_enc = rb_intern("@encoding");
rb_intern        7778 ext/tk/tcltklib.c     ID_at_interp = rb_intern("@interp");
rb_intern        7780 ext/tk/tcltklib.c     ID_stop_p = rb_intern("stop?");
rb_intern        7781 ext/tk/tcltklib.c     ID_alive_p = rb_intern("alive?");
rb_intern        7782 ext/tk/tcltklib.c     ID_kill = rb_intern("kill");
rb_intern        7783 ext/tk/tcltklib.c     ID_join = rb_intern("join");
rb_intern        7784 ext/tk/tcltklib.c     ID_value = rb_intern("value");
rb_intern        7786 ext/tk/tcltklib.c     ID_call = rb_intern("call");
rb_intern        7787 ext/tk/tcltklib.c     ID_backtrace = rb_intern("backtrace");
rb_intern        7788 ext/tk/tcltklib.c     ID_message = rb_intern("message");
rb_intern        7790 ext/tk/tcltklib.c     ID_at_reason = rb_intern("@reason");
rb_intern        7791 ext/tk/tcltklib.c     ID_return = rb_intern("return");
rb_intern        7792 ext/tk/tcltklib.c     ID_break = rb_intern("break");
rb_intern        7793 ext/tk/tcltklib.c     ID_next = rb_intern("next");
rb_intern        7795 ext/tk/tcltklib.c     ID_to_s = rb_intern("to_s");
rb_intern        7796 ext/tk/tcltklib.c     ID_inspect = rb_intern("inspect");
rb_intern         858 ext/tk/tkutil/tkutil.c                RSTRING(rb_funcall(obj, rb_intern("inspect"), 0, 0))->ptr);
rb_intern        1177 ext/tk/tkutil/tkutil.c         key_id = rb_intern(RSTRING(key)->ptr);
rb_intern        1189 ext/tk/tkutil/tkutil.c         value_id = rb_intern(RSTRING(value)->ptr);
rb_intern        1220 ext/tk/tkutil/tkutil.c     return rb_funcall(inf->aliases, rb_intern("update"), 1, tbl);
rb_intern        1246 ext/tk/tkutil/tkutil.c             arg_sym = ID2SYM(rb_intern(str));
rb_intern        1260 ext/tk/tkutil/tkutil.c         id = rb_intern(RSTRING(rb_str_cat2(rb_str_new2("@"), str))->ptr);
rb_intern        1382 ext/tk/tkutil/tkutil.c             = rb_intern(
rb_intern        1525 ext/tk/tkutil/tkutil.c     cMethod = rb_const_get(rb_cObject, rb_intern("Method"));
rb_intern        1527 ext/tk/tkutil/tkutil.c     ID_path = rb_intern("path");
rb_intern        1528 ext/tk/tkutil/tkutil.c     ID_at_path = rb_intern("@path");
rb_intern        1529 ext/tk/tkutil/tkutil.c     ID_at_enc = rb_intern("@encoding");
rb_intern        1530 ext/tk/tkutil/tkutil.c     ID_to_eval = rb_intern("to_eval");
rb_intern        1531 ext/tk/tkutil/tkutil.c     ID_to_s = rb_intern("to_s");
rb_intern        1532 ext/tk/tkutil/tkutil.c     ID_source = rb_intern("source");
rb_intern        1533 ext/tk/tkutil/tkutil.c     ID_downcase = rb_intern("downcase");
rb_intern        1534 ext/tk/tkutil/tkutil.c     ID_install_cmd = rb_intern("install_cmd");
rb_intern        1535 ext/tk/tkutil/tkutil.c     ID_merge_tklist = rb_intern("_merge_tklist");
rb_intern        1536 ext/tk/tkutil/tkutil.c     ID_encoding = rb_intern("encoding");
rb_intern        1537 ext/tk/tkutil/tkutil.c     ID_encoding_system = rb_intern("encoding_system");
rb_intern        1538 ext/tk/tkutil/tkutil.c     ID_call = rb_intern("call");
rb_intern        1547 ext/tk/tkutil/tkutil.c     ID_SUBST_INFO = rb_intern("SUBST_INFO");
rb_intern        1580 ext/tk/tkutil/tkutil.c     cTclTkLib = rb_const_get(rb_cObject, rb_intern("TclTkLib"));
rb_intern        1581 ext/tk/tkutil/tkutil.c     ID_split_tklist = rb_intern("_split_tklist");
rb_intern        1582 ext/tk/tkutil/tkutil.c     ID_toUTF8 = rb_intern("_toUTF8");
rb_intern        1583 ext/tk/tkutil/tkutil.c     ID_fromUTF8 = rb_intern("_fromUTF8");
rb_intern         285 ext/win32ole/win32ole.c     *rgDispId = rb_intern(psz);
rb_intern         311 ext/win32ole/win32ole.c             dispIdMember = rb_intern("call");
rb_intern         313 ext/win32ole/win32ole.c             dispIdMember = rb_intern("value");
rb_intern         455 ext/win32ole/win32ole.c     y = FIX2INT(rb_funcall(tmobj, rb_intern("year"), 0));
rb_intern         456 ext/win32ole/win32ole.c     m = FIX2INT(rb_funcall(tmobj, rb_intern("month"), 0));
rb_intern         457 ext/win32ole/win32ole.c     d = FIX2INT(rb_funcall(tmobj, rb_intern("mday"), 0));
rb_intern         458 ext/win32ole/win32ole.c     hh = FIX2INT(rb_funcall(tmobj, rb_intern("hour"), 0));
rb_intern         459 ext/win32ole/win32ole.c     mm = FIX2INT(rb_funcall(tmobj, rb_intern("min"), 0));
rb_intern         460 ext/win32ole/win32ole.c     ss = FIX2INT(rb_funcall(tmobj, rb_intern("sec"), 0));
rb_intern        1498 ext/win32ole/win32ole.c                 id = rb_intern(pName);
rb_intern        1956 ext/win32ole/win32ole.c         helpfile = rb_funcall(target, rb_intern("helpfile"), 0);
rb_intern        1958 ext/win32ole/win32ole.c             name = rb_ivar_get(target, rb_intern("name"));
rb_intern        1962 ext/win32ole/win32ole.c         helpcontext = rb_funcall(target, rb_intern("helpcontext"), 0);
rb_intern        2143 ext/win32ole/win32ole.c     VALUE argv = rb_const_get(cWIN32OLE, rb_intern("ARGV"));
rb_intern        2217 ext/win32ole/win32ole.c         cNamedArgs = NUM2INT(rb_funcall(param, rb_intern("length"), 0));
rb_intern        3237 ext/win32ole/win32ole.c     return rb_apply(cWIN32OLE_TYPELIB, rb_intern("new"), args);
rb_intern        3711 ext/win32ole/win32ole.c     rb_ivar_set(self, rb_intern("name"), name);
rb_intern        3766 ext/win32ole/win32ole.c     rb_ivar_set(self, rb_intern("name"), typelib);
rb_intern        3767 ext/win32ole/win32ole.c     rb_ivar_set(self, rb_intern("guid"), guid);
rb_intern        3768 ext/win32ole/win32ole.c     rb_ivar_set(self, rb_intern("version"), version);
rb_intern        3811 ext/win32ole/win32ole.c                 typelib = rb_funcall(cWIN32OLE_TYPELIB, rb_intern("allocate"), 0);
rb_intern        4024 ext/win32ole/win32ole.c     return rb_ivar_get(self, rb_intern("guid"));
rb_intern        4040 ext/win32ole/win32ole.c     return rb_ivar_get(self, rb_intern("name"));
rb_intern        4056 ext/win32ole/win32ole.c     VALUE ver = rb_ivar_get(self, rb_intern("version"));
rb_intern        4073 ext/win32ole/win32ole.c     VALUE ver = rb_ivar_get(self, rb_intern("version"));
rb_intern        4091 ext/win32ole/win32ole.c     VALUE ver = rb_ivar_get(self, rb_intern("version"));
rb_intern        4144 ext/win32ole/win32ole.c     VALUE guid = rb_ivar_get(self, rb_intern("guid"));
rb_intern        4145 ext/win32ole/win32ole.c     VALUE version = rb_ivar_get(self, rb_intern("version"));
rb_intern        4168 ext/win32ole/win32ole.c     path = rb_funcall(self, rb_intern("path"), 0);
rb_intern        4245 ext/win32ole/win32ole.c     return rb_ivar_get(self, rb_intern("name"));
rb_intern        4756 ext/win32ole/win32ole.c         rb_ivar_set(var, rb_intern("name"), WC2VSTR(bstr));
rb_intern        4848 ext/win32ole/win32ole.c     return rb_ivar_get(self, rb_intern("name"));
rb_intern        5152 ext/win32ole/win32ole.c     rb_ivar_set(self, rb_intern("name"), name);
rb_intern        5222 ext/win32ole/win32ole.c     return rb_ivar_get(self, rb_intern("name"));
rb_intern        5540 ext/win32ole/win32ole.c                             rb_ivar_get(self, rb_intern("name")));
rb_intern        5861 ext/win32ole/win32ole.c             rb_ivar_set(param, rb_intern("name"), WC2VSTR(bstrs[i]));
rb_intern        5912 ext/win32ole/win32ole.c     return rb_ivar_get(self, rb_intern("name"));
rb_intern        6370 ext/win32ole/win32ole.c         result = rb_apply(handler, rb_intern("call"), args);
rb_intern        6374 ext/win32ole/win32ole.c         result = rb_apply(handler, rb_intern("call"), args);
rb_intern        6745 ext/win32ole/win32ole.c         = NUM2INT(rb_funcall(ary_ole_event, rb_intern("length"), 0));
rb_intern        6909 ext/win32ole/win32ole.c     id_events = rb_intern("events");
rb_intern        3503 ext/zlib/zlib.c     id_write = rb_intern("write");
rb_intern        3504 ext/zlib/zlib.c     id_read = rb_intern("read");
rb_intern        3505 ext/zlib/zlib.c     id_readpartial = rb_intern("readpartial");
rb_intern        3506 ext/zlib/zlib.c     id_flush = rb_intern("flush");
rb_intern        3507 ext/zlib/zlib.c     id_seek = rb_intern("seek");
rb_intern        3508 ext/zlib/zlib.c     id_close = rb_intern("close");
rb_intern         109 file.c         	to_path = rb_intern("to_path");
rb_intern        1651 gc.c               if (!rb_respond_to(block, rb_intern("call"))) {
rb_intern        1728 gc.c               else if (!rb_respond_to(block, rb_intern("call"))) {
rb_intern        1348 hash.c         	if (!rb_respond_to(hash2, rb_intern("to_hash"))) {
rb_intern        2277 hash.c             id_hash = rb_intern("hash");
rb_intern        2278 hash.c             id_call = rb_intern("call");
rb_intern        2279 hash.c             id_default = rb_intern("default");
rb_intern        2097 io.c               return rb_funcall(io, rb_intern("close"), 0, 0);
rb_intern        3232 io.c           	ID to_open = rb_intern("to_open");
rb_intern        4075 io.c           	rb_funcall3(file, rb_intern("close"), 0, 0);
rb_intern        4266 io.c           	line = rb_funcall3(current_file, rb_intern("gets"), argc, argv);
rb_intern        4332 io.c           	return rb_funcall3(rb_stdin, rb_intern("getc"), 0, 0);
rb_intern        5207 io.c           	byte = rb_funcall3(current_file, rb_intern("getc"), 0, 0);
rb_intern        5442 io.c               id_write = rb_intern("write");
rb_intern        5443 io.c               id_read = rb_intern("read");
rb_intern        5444 io.c               id_getc = rb_intern("getc");
rb_intern        5445 io.c               id_flush = rb_intern("flush");
rb_intern         327 marshal.c          w_symbol(rb_intern(s), arg);
rb_intern         860 marshal.c          id = rb_intern(RSTRING(r_bytes(arg))->ptr);
rb_intern        1278 marshal.c      	rb_funcall(proc, rb_intern("call"), 1, v);
rb_intern        1322 marshal.c          if (rb_respond_to(port, rb_intern("to_str"))) {
rb_intern        1398 marshal.c          s_dump = rb_intern("_dump");
rb_intern        1399 marshal.c          s_load = rb_intern("_load");
rb_intern        1400 marshal.c          s_mdump = rb_intern("marshal_dump");
rb_intern        1401 marshal.c          s_mload = rb_intern("marshal_load");
rb_intern        1402 marshal.c          s_dump_data = rb_intern("_dump_data");
rb_intern        1403 marshal.c          s_load_data = rb_intern("_load_data");
rb_intern        1404 marshal.c          s_alloc = rb_intern("_alloc");
rb_intern        1405 marshal.c          s_getc = rb_intern("getc");
rb_intern        1406 marshal.c          s_read = rb_intern("read");
rb_intern        1407 marshal.c          s_write = rb_intern("write");
rb_intern        1408 marshal.c          s_binmode = rb_intern("binmode");
rb_intern         394 numeric.c      	return rb_funcall(num, rb_intern("-@"), 0);
rb_intern         432 numeric.c          if (RTEST(rb_funcall(num, rb_intern("zero?"), 0, 0))) {
rb_intern        1809 numeric.c             return rb_funcall(x, rb_intern("to_f"), 0);
rb_intern        2802 numeric.c          id_coerce = rb_intern("coerce");
rb_intern        2803 numeric.c          id_to_i = rb_intern("to_i");
rb_intern        2804 numeric.c          id_eq = rb_intern("==");
rb_intern         372 object.c           return rb_funcall(obj, rb_intern("to_s"), 0, 0);
rb_intern        1498 object.c           return rb_intern(RSTRING(str)->ptr);
rb_intern        1920 object.c           m = rb_intern(method);
rb_intern        2281 object.c           ID id = rb_intern(name);
rb_intern        2549 object.c           id_eq = rb_intern("==");
rb_intern        2550 object.c           id_eql = rb_intern("eql?");
rb_intern        2551 object.c           id_inspect = rb_intern("inspect");
rb_intern        2552 object.c           id_init_copy = rb_intern("initialize_copy");
rb_intern         750 parse.y        			$$ = NEW_VALIAS($2, rb_intern(buf));
rb_intern        3370 parse.y        			$$ = new_call($2, rb_intern("call"), $4);
rb_intern        3879 parse.y        				    $$->nd_lit = ID2SYM(rb_intern(RSTRING($$->nd_lit)->ptr));
rb_intern        4559 parse.y        	rb_const_defined(rb_cObject, rb_intern("SCRIPT_LINES__"))) {
rb_intern        4562 parse.y        	hash = rb_const_get(rb_cObject, rb_intern("SCRIPT_LINES__"));
rb_intern        5550 parse.y        	rb_funcall(name, rb_intern("downcase!"), 0);
rb_intern        6607 parse.y        	    set_yylval_id(rb_intern(tok()));
rb_intern        6623 parse.y        	    set_yylval_id(rb_intern(tok()));
rb_intern        6788 parse.y        			set_yylval_id(rb_intern(kw->name));
rb_intern        6819 parse.y        		    set_yylval_id(rb_intern(tok()));
rb_intern        6838 parse.y        	    ID ident = rb_intern(tok());
rb_intern        7682 parse.y        	return call_op(node,tEQ,1,NEW_GVAR(rb_intern("$.")));
rb_intern        7726 parse.y        	return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_")));
rb_intern        8212 parse.y        			NEW_FCALL(rb_intern("print"),
rb_intern        8213 parse.y        				  NEW_ARRAY(NEW_GVAR(rb_intern("$_")))));
rb_intern        8231 parse.y        	node = block_append(NEW_GASGN(rb_intern("$F"),
rb_intern        8232 parse.y        				      NEW_CALL(NEW_GVAR(rb_intern("$_")),
rb_intern        8233 parse.y        					       rb_intern("split"), 0)),
rb_intern        8237 parse.y        	node = block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")),
rb_intern        8238 parse.y        				     rb_intern("chop!"), 0), node);
rb_intern        8455 parse.y        	    id = rb_intern(buf);
rb_intern        8513 parse.y        	    rb_intern(buf);
rb_intern        8996 parse.y        	return ID2SYM(rb_intern(buf));
rb_intern        8999 parse.y        	return ID2SYM(rb_intern(name));
rb_intern        9015 parse.y            return ID2SYM(rb_intern(name));
rb_intern        9021 parse.y            return ID2SYM(rb_intern(s));
rb_intern        9033 parse.y            rb_funcall(parser->value, rb_intern("compile_error"), 1, str);
rb_intern        9039 parse.y            rb_funcall(parser->value, rb_intern("warn"), 1, rb_str_new2(fmt));
rb_intern        9045 parse.y            rb_funcall(parser->value, rb_intern("warn"), 2,
rb_intern        9052 parse.y            rb_funcall(parser->value, rb_intern("warn"), 2,
rb_intern        9059 parse.y            rb_funcall(parser->value, rb_intern("warning"), 1, rb_str_new2(fmt));
rb_intern        9065 parse.y            rb_funcall(parser->value, rb_intern("warning"), 2,
rb_intern        9294 parse.y            ripper_id_gets = rb_intern("gets");
rb_intern        9298 parse.y            rb_intern("||");
rb_intern        9299 parse.y            rb_intern("&&");
rb_intern         134 prec.c             prc_pr = rb_intern("prec");
rb_intern         135 prec.c             prc_if = rb_intern("induced_from");
rb_intern          80 range.c        	rb_name_error(rb_intern("initialize"), "`initialize' called twice");
rb_intern         321 range.c        	    ID c = rb_intern(EXCL(range) ? "<" : "<=");
rb_intern         519 range.c        	excl = RTEST(rb_funcall(range, rb_intern("exclude_end?"), 0));
rb_intern         755 range.c            id_cmp = rb_intern("<=>");
rb_intern         756 range.c            id_succ = rb_intern("succ");
rb_intern         757 range.c            id_beg = rb_intern("begin");
rb_intern         758 range.c            id_end = rb_intern("end");
rb_intern         759 range.c            id_excl = rb_intern("excl");
rb_intern         529 ruby.h         ID rb_intern(const char*);
rb_intern         851 string.c       	if (!rb_respond_to(str2, rb_intern("to_str"))) {
rb_intern         914 string.c       	if (!rb_respond_to(str2, rb_intern("to_str"))) {
rb_intern         917 string.c       	else if (!rb_respond_to(str2, rb_intern("<=>"))) {
rb_intern         921 string.c       	    VALUE tmp = rb_funcall(str2, rb_intern("<=>"), 1, str1);
rb_intern        1202 string.c       	return rb_funcall(y, rb_intern("=~"), 1, x);
rb_intern        1233 string.c           return rb_funcall2(get_pat(re, 0), rb_intern("match"), argc, argv);
rb_intern        1349 string.c           ID succ = rb_intern("succ");
rb_intern        3971 string.c           id = rb_intern(RSTRING(str)->ptr);
rb_intern        4014 string.c       	    mod = rb_funcall(INT2FIX(1), rb_intern("<<"), 1, INT2FIX(bits));
rb_intern        4290 string.c           id_to_s = rb_intern("to_s");
rb_intern          24 struct.c           id = rb_intern(name);
rb_intern         184 struct.c       	id = rb_intern(cname);
rb_intern         230 struct.c       	ID slot = rb_intern(mem);
rb_intern          30 variable.c         autoload = rb_intern("__autoload__");
rb_intern          31 variable.c         classpath = rb_intern("__classpath__");
rb_intern          32 variable.c         tmp_classpath = rb_intern("__tmp_classpath__");
rb_intern         145 variable.c     	    ID classid = rb_intern("__classid__");
rb_intern         238 variable.c     	id = rb_intern(RSTRING(str)->ptr);
rb_intern         437 variable.c         if (name[0] == '$') id = rb_intern(name);
rb_intern         442 variable.c     	id = rb_intern(buf);
rb_intern        1112 variable.c         return rb_funcall(klass, rb_intern("const_missing"), 1, ID2SYM(id));
rb_intern        1522 variable.c         ID id = rb_intern(name);
rb_intern        1571 variable.c         ID id = rb_intern(name);
rb_intern        1581 variable.c         ID id = rb_intern(name);
rb_intern        1591 variable.c         ID id = rb_intern(name);
rb_intern        1686 variable.c         ID id = rb_intern(name);
rb_intern        1694 variable.c         ID id = rb_intern(name);


rb_interrupt

rb_interrupt     10171 eval.c         	rb_interrupt();
rb_interrupt     12183 eval.c         	rb_interrupt();
rb_interrupt      224 intern.h       void rb_interrupt(void);


rb_invalid_str

rb_invalid_str    485 bignum.c       	    rb_invalid_str(s, "Integer");
rb_invalid_str   2074 object.c       	    rb_invalid_str(q, "Float()");


rb_io_addstr

rb_io_addstr     1020 ext/stringio/stringio.c #define strio_addstr rb_io_addstr
rb_io_addstr     2871 ext/zlib/zlib.c #define rb_gzwriter_addstr  rb_io_addstr
rb_io_addstr      341 intern.h       VALUE rb_io_addstr(VALUE, VALUE);
rb_io_addstr     5533 io.c               rb_define_method(rb_cIO, "<<",    rb_io_addstr, 1);


rb_io_binmode

rb_io_binmode     340 intern.h       VALUE rb_io_binmode(VALUE);
rb_io_binmode    3348 io.c           	rb_io_binmode(io);
rb_io_binmode    3464 io.c           	rb_io_binmode(dest);
rb_io_binmode    4174 io.c           		    if (stdout_binmode) rb_io_binmode(rb_stdout);
rb_io_binmode    4178 io.c           	    if (binmode) rb_io_binmode(current_file);
rb_io_binmode    5286 io.c               rb_io_binmode(current_file);
rb_io_binmode    5553 io.c               rb_define_method(rb_cIO, "binmode",  rb_io_binmode, 0);
rb_io_binmode     871 ruby.c         		rb_io_binmode(f);


rb_io_check_closed

rb_io_check_closed  132 ext/io/wait/wait.c     rb_io_check_closed(fptr);
rb_io_check_closed  588 ext/socket/socket.c     rb_io_check_closed(fptr);
rb_io_check_closed 3060 file.c         	    rb_io_check_closed(fptr);
rb_io_check_closed  165 io.c           	rb_io_check_closed(fptr);\
rb_io_check_closed  249 io.c               rb_io_check_closed(fptr);
rb_io_check_closed  309 io.c               rb_io_check_closed(fptr);
rb_io_check_closed  321 io.c               rb_io_check_closed(fptr);
rb_io_check_closed  418 io.c               rb_io_check_closed(fptr);
rb_io_check_closed  422 io.c                   rb_io_check_closed(fptr);
rb_io_check_closed  450 io.c                   rb_io_check_closed(fptr);
rb_io_check_closed  576 io.c           	    rb_io_check_closed(fptr);
rb_io_check_closed  596 io.c                       rb_io_check_closed(fptr);
rb_io_check_closed 1153 io.c           	rb_io_check_closed(fptr);
rb_io_check_closed 1474 io.c           	rb_io_check_closed(fptr);
rb_io_check_closed 1513 io.c           	rb_io_check_closed(fptr);
rb_io_check_closed 2085 io.c               rb_io_check_closed(RFILE(io)->fptr);
rb_io_check_closed 2287 io.c                   rb_io_check_closed(fptr);
rb_io_check_closed 2343 io.c               rb_io_check_closed(fptr);
rb_io_check_closed   54 rubyio.h       #define GetOpenFile(obj,fp) rb_io_check_closed((fp) = RFILE(rb_io_taint_check(obj))->fptr)
rb_io_check_closed   93 rubyio.h       void rb_io_check_closed(OpenFile*);


rb_io_check_initialized

rb_io_check_initialized  157 file.c             rb_io_check_initialized(fptr);
rb_io_check_initialized  225 io.c               rb_io_check_initialized(fptr);
rb_io_check_initialized 2125 io.c               rb_io_check_initialized(fptr);
rb_io_check_initialized   92 rubyio.h       void rb_io_check_initialized(OpenFile*);


rb_io_check_io

rb_io_check_io    652 io.c               tmp = rb_io_check_io(io);
rb_io_check_io   3380 io.c           	VALUE tmp = rb_io_check_io(fname);
rb_io_check_io   3921 io.c               orig = rb_io_check_io(fnum);


rb_io_check_readable

rb_io_check_readable   63 ext/io/wait/wait.c     rb_io_check_readable(fptr);
rb_io_check_readable  109 ext/io/wait/wait.c     rb_io_check_readable(fptr);
rb_io_check_readable   27 ext/openssl/ossl_bio.c 	rb_io_check_readable(fptr);
rb_io_check_readable  551 ext/openssl/ossl_ssl.c         rb_io_check_readable(fptr);
rb_io_check_readable  938 io.c               rb_io_check_readable(fptr);
rb_io_check_readable 1265 io.c               rb_io_check_readable(fptr);
rb_io_check_readable 1395 io.c           	rb_io_check_readable(fptr);
rb_io_check_readable 1413 io.c               rb_io_check_readable(fptr);
rb_io_check_readable 1555 io.c               rb_io_check_readable(fptr);
rb_io_check_readable 1615 io.c               rb_io_check_readable(fptr);
rb_io_check_readable 1679 io.c               rb_io_check_readable(fptr);
rb_io_check_readable 1706 io.c               rb_io_check_readable(fptr);
rb_io_check_readable 1850 io.c           	rb_io_check_readable(fptr);
rb_io_check_readable 1880 io.c               rb_io_check_readable(fptr);
rb_io_check_readable 1948 io.c               rb_io_check_readable(fptr);
rb_io_check_readable 2335 io.c               rb_io_check_readable(fptr);
rb_io_check_readable   89 rubyio.h       void rb_io_check_readable(OpenFile*);


rb_io_check_writable

rb_io_check_writable  552 ext/openssl/ossl_ssl.c         rb_io_check_writable(fptr);
rb_io_check_writable  661 io.c               rb_io_check_writable(fptr);
rb_io_check_writable 2281 io.c               rb_io_check_writable(fptr);
rb_io_check_writable   88 rubyio.h       void rb_io_check_writable(OpenFile*);


rb_io_close

rb_io_close       272 ext/socket/socket.c 	return rb_io_close(sock);
rb_io_close       290 ext/socket/socket.c 	return rb_io_close(sock);
rb_io_close      1285 ext/socket/socket.c     return rb_io_close(sock);
rb_io_close       337 intern.h       VALUE rb_io_close(VALUE);
rb_io_close      2086 io.c               rb_io_close(io);
rb_io_close      2094 io.c           	rb_io_close(io);
rb_io_close      2164 io.c                       return rb_io_close(io);
rb_io_close      2170 io.c               return rb_io_close(io);
rb_io_close      2209 io.c                       return rb_io_close(io);
rb_io_close      2216 io.c               return rb_io_close(io);
rb_io_close      4073 io.c           	rb_io_close(file);
rb_io_close      4125 io.c           			rb_io_close(rb_stdout);
rb_io_close      4386 io.c               rb_io_close(port);
rb_io_close      4903 io.c           	if (!NIL_P(r)) rb_io_close(r);
rb_io_close      4967 io.c               return rb_ensure(io_s_foreach, (VALUE)&arg, rb_io_close, arg.io);
rb_io_close      5000 io.c               return rb_ensure(io_s_readlines, (VALUE)&arg, rb_io_close, arg.io);
rb_io_close      5036 io.c               return rb_ensure(io_s_read, (VALUE)&arg, rb_io_close, arg.io);
rb_io_close       969 ruby.c         	rb_io_close(f);
rb_io_close        58 rubyio.h       	rb_io_close(obj);\


rb_io_closed

rb_io_closed     5317 io.c               return rb_io_closed(current_file);
rb_io_closed     5547 io.c               rb_define_method(rb_cIO, "closed?", rb_io_closed, 0);


rb_io_ctl

rb_io_ctl        4689 io.c               return rb_io_ctl(io, req, arg, 1);
rb_io_ctl        4712 io.c               return rb_io_ctl(io, req, arg, 0);


rb_io_each_line

rb_io_each_line  5505 io.c               rb_define_method(rb_cIO, "each",  rb_io_each_line, -1);
rb_io_each_line  5506 io.c               rb_define_method(rb_cIO, "each_line",  rb_io_each_line, -1);


rb_io_eof

rb_io_eof         339 intern.h       VALUE rb_io_eof(VALUE);
rb_io_eof        5103 io.c           	if (rb_io_eof(current_file)) {
rb_io_eof        5543 io.c               rb_define_method(rb_cIO, "eof", rb_io_eof, 0);
rb_io_eof        5544 io.c               rb_define_method(rb_cIO, "eof?", rb_io_eof, 0);


rb_io_fileno

rb_io_fileno     5086 io.c               return rb_io_fileno(current_file);
rb_io_fileno     5512 io.c               rb_define_method(rb_cIO, "fileno", rb_io_fileno, 0);


rb_io_flags_mode

rb_io_flags_mode 2654 io.c               fptr->fd = rb_sysopen(fptr->path, rb_io_mode_modenum(rb_io_flags_mode(fptr->mode)), 0666);
rb_io_flags_mode 3025 io.c           	mode = rb_io_flags_mode(rb_io_mode_flags(StringValuePtr(pmode)));
rb_io_flags_mode 3289 io.c           		     PREP_STDIO_NAME(fptr), rb_io_flags_mode(fptr->mode),
rb_io_flags_mode 3290 io.c           		     rb_io_flags_mode(orig->mode));
rb_io_flags_mode 3400 io.c           		     PREP_STDIO_NAME(fptr), rb_io_flags_mode(fptr->mode),
rb_io_flags_mode 3401 io.c           		     rb_io_flags_mode(flags));
rb_io_flags_mode 3412 io.c               mode = rb_io_flags_mode(fptr->mode);
rb_io_flags_mode 3877 io.c                   fptr->stdio_file = rb_fdopen(fptr->fd, rb_io_flags_mode(fptr->mode));


rb_io_flush

rb_io_flush      3012 file.c             rb_io_flush(obj);
rb_io_flush      3112 file.c         	rb_io_flush(obj);
rb_io_flush       338 intern.h       VALUE rb_io_flush(VALUE);
rb_io_flush       870 io.c                       rb_io_flush(rb_stdout);
rb_io_flush      2855 io.c                   rb_io_flush(rb_stdout);
rb_io_flush      2856 io.c                   rb_io_flush(rb_stderr);
rb_io_flush      3043 io.c                       rb_io_flush(rb_stdout);
rb_io_flush      3044 io.c                       rb_io_flush(rb_stderr);
rb_io_flush      3451 io.c               rb_io_flush(io);
rb_io_flush      3756 io.c           	rb_io_flush(rb_stdout);
rb_io_flush      5534 io.c               rb_define_method(rb_cIO, "flush", rb_io_flush, 0);
rb_io_flush      1310 process.c          rb_io_flush(rb_stdout);
rb_io_flush      1311 process.c          rb_io_flush(rb_stderr);


rb_io_fptr_cleanup

rb_io_fptr_cleanup 2033 io.c           	rb_io_fptr_cleanup(fptr, Qtrue);
rb_io_fptr_cleanup 2057 io.c               rb_io_fptr_cleanup(fptr, Qfalse);


rb_io_fptr_finalize

rb_io_fptr_finalize   37 gc.c           int rb_io_fptr_finalize(struct OpenFile*);
rb_io_fptr_finalize 1166 gc.c           	    rb_io_fptr_finalize(RANY(obj)->as.file.fptr);
rb_io_fptr_finalize 1848 gc.c           		if (rb_io_fptr_finalize(RANY(p)->as.file.fptr)) {
rb_io_fptr_finalize 2735 io.c           	rb_io_fptr_finalize(list->fptr);
rb_io_fptr_finalize   90 rubyio.h       int rb_io_fptr_finalize(OpenFile*);


rb_io_get_io

rb_io_get_io     3276 io.c               nfile = rb_io_get_io(nfile);
rb_io_get_io     3446 io.c               io = rb_io_get_io(io);
rb_io_get_io     4410 io.c           	    GetOpenFile(rb_io_get_io(RARRAY(read)->ptr[i]), fptr);
rb_io_get_io     4430 io.c           	    GetOpenFile(rb_io_get_io(RARRAY(write)->ptr[i]), fptr);
rb_io_get_io     4442 io.c           	    GetOpenFile(rb_io_get_io(RARRAY(except)->ptr[i]), fptr);
rb_io_get_io     4469 io.c           		GetOpenFile(rb_io_get_io(RARRAY(read)->ptr[i]), fptr);
rb_io_get_io     4480 io.c           		GetOpenFile(rb_io_get_io(RARRAY(write)->ptr[i]), fptr);
rb_io_get_io     4490 io.c           		GetOpenFile(rb_io_get_io(RARRAY(except)->ptr[i]), fptr);


rb_io_getc

rb_io_getc        335 intern.h       VALUE rb_io_getc(VALUE);
rb_io_getc       1917 io.c               VALUE c = rb_io_getc(io);
rb_io_getc       4334 io.c               return rb_io_getc(rb_stdin);
rb_io_getc       5210 io.c           	byte = rb_io_getc(current_file);
rb_io_getc       5530 io.c               rb_define_method(rb_cIO, "getc",  rb_io_getc, 0);
rb_io_getc        897 ruby.c         	c = rb_io_getc(f);
rb_io_getc        899 ruby.c         	    c = rb_io_getc(f);


rb_io_getline

rb_io_getline    1648 io.c               str = rb_io_getline(rs, io);
rb_io_getline    1780 io.c               while (!NIL_P(line = rb_io_getline(rs, io))) {
rb_io_getline    1820 io.c               while (!NIL_P(str = rb_io_getline(rs, io))) {
rb_io_getline    4216 io.c           	line = rb_io_getline(rs, current_file);
rb_io_getline    4926 io.c               while (!NIL_P(str = rb_io_getline(arg->sep, arg->io))) {


rb_io_getline_fast

rb_io_getline_fast 1561 io.c           	return rb_io_getline_fast(fptr, '\n');
rb_io_getline_fast 1577 io.c           	    return rb_io_getline_fast(fptr, (unsigned char)RSTRING(rs)->ptr[0]);
rb_io_getline_fast 1616 io.c               return rb_io_getline_fast(fptr, '\n');


rb_io_gets

rb_io_gets        334 intern.h       VALUE rb_io_gets(VALUE);
rb_io_gets       4204 io.c           	line = rb_io_gets(current_file);
rb_io_gets       4286 io.c               line = rb_io_gets(current_file);
rb_io_gets       4677 parse.y            return rb_io_gets(io);
rb_io_gets        884 ruby.c         	    while (!NIL_P(line = rb_io_gets(f))) {
rb_io_gets        901 ruby.c         		line = rb_io_gets(f);


rb_io_gets_m

rb_io_gets_m     1743 io.c               VALUE line = rb_io_gets_m(argc, argv, io);
rb_io_gets_m     5528 io.c               rb_define_method(rb_cIO, "gets",  rb_io_gets_m, -1);


rb_io_initialize

rb_io_initialize 3997 io.c           	    return rb_io_initialize(argc, argv, io);
rb_io_initialize 4048 io.c               rb_io_initialize(argc, argv, io);
rb_io_initialize 5481 io.c               rb_define_method(rb_cIO, "initialize", rb_io_initialize, -1);


rb_io_isatty

rb_io_isatty     5551 io.c               rb_define_method(rb_cIO, "isatty", rb_io_isatty, 0);
rb_io_isatty     5552 io.c               rb_define_method(rb_cIO, "tty?", rb_io_isatty, 0);


rb_io_mode_flags

rb_io_mode_flags  427 ext/pty/pty.c      rfptr->mode = rb_io_mode_flags("r");
rb_io_mode_flags  431 ext/pty/pty.c      wfptr->mode = rb_io_mode_flags("w") | FMODE_SYNC;
rb_io_mode_flags  234 ext/stringio/stringio.c 	    ptr->flags = rb_io_mode_flags(m);
rb_io_mode_flags 2652 io.c               fptr->mode = rb_io_mode_flags(mode);
rb_io_mode_flags 2828 io.c               int modef = rb_io_mode_flags(mode);
rb_io_mode_flags 3025 io.c           	mode = rb_io_flags_mode(rb_io_mode_flags(StringValuePtr(pmode)));
rb_io_mode_flags 3395 io.c           	int flags = rb_io_mode_flags(StringValuePtr(nmode));
rb_io_mode_flags   86 rubyio.h       int  rb_io_mode_flags(const char*);


rb_io_mode_modenum

rb_io_mode_modenum 2654 io.c               fptr->fd = rb_sysopen(fptr->path, rb_io_mode_modenum(rb_io_flags_mode(fptr->mode)), 0666);
rb_io_mode_modenum 2837 io.c               int openmode = rb_io_mode_modenum(mode);
rb_io_mode_modenum 3072 io.c           	    flags = rb_io_mode_modenum(RSTRING(vmode)->ptr);
rb_io_mode_modenum 3135 io.c           	flags = rb_io_mode_modenum(RSTRING(vmode)->ptr);
rb_io_mode_modenum 3414 io.c                   fptr->fd = rb_sysopen(fptr->path, rb_io_mode_modenum(mode), 0666);
rb_io_mode_modenum 3433 io.c                   fptr->fd = rb_sysopen(fptr->path, rb_io_mode_modenum(mode), 0666);
rb_io_mode_modenum 3918 io.c           	    flags = rb_io_mode_modenum(RSTRING(mode)->ptr);


rb_io_modenum_flags

rb_io_modenum_flags  229 ext/stringio/stringio.c 	    ptr->flags = rb_io_modenum_flags(flags);
rb_io_modenum_flags 2674 io.c               fptr->mode = rb_io_modenum_flags(flags);
rb_io_modenum_flags 3934 io.c           	fp->mode = rb_io_modenum_flags(flags);
rb_io_modenum_flags 3947 io.c           	    fmode = rb_io_modenum_flags(flags);
rb_io_modenum_flags   87 rubyio.h       int  rb_io_modenum_flags(int);


rb_io_open

rb_io_open       4964 io.c               arg.io = rb_io_open(RSTRING(fname)->ptr, "r");
rb_io_open       4998 io.c               arg.io = rb_io_open(RSTRING(fname)->ptr, "r");
rb_io_open       5031 io.c               arg.io = rb_io_open(RSTRING(fname)->ptr, "r");


rb_io_print

rb_io_print      1029 ext/stringio/stringio.c #define strio_print rb_io_print
rb_io_print      2881 ext/zlib/zlib.c #define rb_gzwriter_print  rb_io_print
rb_io_print       343 intern.h       VALUE rb_io_print(int, VALUE*, VALUE);
rb_io_print      3594 io.c               rb_io_print(argc, argv, rb_stdout);
rb_io_print      5500 io.c               rb_define_method(rb_cIO, "print", rb_io_print, -1);


rb_io_printf

rb_io_printf     1037 ext/stringio/stringio.c #define strio_printf rb_io_printf
rb_io_printf     2876 ext/zlib/zlib.c #define rb_gzwriter_printf  rb_io_printf
rb_io_printf      342 intern.h       VALUE rb_io_printf(int, VALUE*, VALUE);
rb_io_printf     5503 io.c               rb_define_method(rb_cIO, "printf", rb_io_printf, -1);


rb_io_putc

rb_io_putc       3635 io.c               return rb_io_putc(rb_stdout, ch);
rb_io_putc       5501 io.c               rb_define_method(rb_cIO, "putc", rb_io_putc, 1);


rb_io_puts

rb_io_puts       4325 eval.c         	rb_io_puts(1, &mesg, rb_stderr);
rb_io_puts       1070 ext/stringio/stringio.c #define strio_puts rb_io_puts
rb_io_puts       2886 ext/zlib/zlib.c #define rb_gzwriter_puts  rb_io_puts
rb_io_puts        344 intern.h       VALUE rb_io_puts(int, VALUE*, VALUE);
rb_io_puts       3649 io.c           	rb_io_puts(1, &tmp, out);
rb_io_puts       3719 io.c               rb_io_puts(argc, argv, rb_stdout);
rb_io_puts       5502 io.c               rb_define_method(rb_cIO, "puts", rb_io_puts, -1);


rb_io_read_pending

rb_io_read_pending   64 ext/io/wait/wait.c     if (rb_io_read_pending(fptr)) return Qtrue;
rb_io_read_pending  119 ext/io/wait/wait.c     if (rb_io_read_pending(fptr)) return Qtrue;
rb_io_read_pending  579 ext/socket/socket.c     if (rb_io_read_pending(fptr)) {
rb_io_read_pending  101 rubyio.h       int rb_io_read_pending(OpenFile*);


rb_io_readlines

rb_io_readlines  4973 io.c               return rb_io_readlines(arg->argc, &arg->sep, arg->io);
rb_io_readlines  5523 io.c               rb_define_method(rb_cIO, "readlines",  rb_io_readlines, -1);


rb_io_rewind

rb_io_rewind     5076 io.c               return rb_io_rewind(current_file);
rb_io_rewind     5540 io.c               rb_define_method(rb_cIO, "rewind", rb_io_rewind, 0);


rb_io_s_open

rb_io_s_open     3254 io.c               return rb_io_s_open(argc, argv, rb_cFile);
rb_io_s_open     5471 io.c               rb_define_singleton_method(rb_cIO, "open",  rb_io_s_open, -1);


rb_io_s_popen

rb_io_s_popen    3249 io.c           		    return rb_io_s_popen(argc, argv, rb_cIO);
rb_io_s_popen    5474 io.c               rb_define_singleton_method(rb_cIO, "popen", rb_io_s_popen, -1);


rb_io_seek

rb_io_seek        805 io.c               return rb_io_seek(io, offset, whence);
rb_io_seek       5034 io.c           	rb_io_seek(arg.io, offset, SEEK_SET);


rb_io_seek_m

rb_io_seek_m     5056 io.c               return rb_io_seek_m(argc, argv, current_file);
rb_io_seek_m     5536 io.c               rb_define_method(rb_cIO, "seek", rb_io_seek_m, -1);


rb_io_set_pos

rb_io_set_pos    5066 io.c               return rb_io_set_pos(current_file, offset);
rb_io_set_pos    5542 io.c               rb_define_method(rb_cIO, "pos=", rb_io_set_pos, 1);


rb_io_stat

rb_io_stat        784 file.c             return rb_io_stat(obj);
rb_io_stat       4343 file.c             rb_define_method(rb_cIO, "stat",  rb_io_stat, 0); /* this is IO's method */


rb_io_stdio_file

rb_io_stdio_file  425 ext/dl/cptr.c  	fp = rb_io_stdio_file(fptr);
rb_io_stdio_file  106 ext/readline/readline.c     rl_instream = rb_io_stdio_file(ifp);
rb_io_stdio_file  119 ext/readline/readline.c     rl_outstream = rb_io_stdio_file(ofp);
rb_io_stdio_file   82 rubyio.h       FILE *rb_io_stdio_file(OpenFile *fptr);


rb_io_synchronized

rb_io_synchronized  214 ext/socket/socket.c     rb_io_synchronized(fp);
rb_io_synchronized 2771 io.c               rb_io_synchronized(fptr);
rb_io_synchronized 2885 io.c           	    rb_io_synchronized(RFILE(orig_stdout)->fptr);
rb_io_synchronized 2886 io.c           	    rb_io_synchronized(RFILE(orig_stderr)->fptr);
rb_io_synchronized 4906 io.c               rb_io_synchronized(RFILE(w)->fptr);
rb_io_synchronized   91 rubyio.h       void rb_io_synchronized(OpenFile*);


rb_io_taint_check

rb_io_taint_check  156 file.c             fptr = RFILE(rb_io_taint_check(obj))->fptr;
rb_io_taint_check 1102 io.c               fptr = RFILE(rb_io_taint_check(obj))->fptr;
rb_io_taint_check 3387 io.c               rb_io_taint_check(file);
rb_io_taint_check   54 rubyio.h       #define GetOpenFile(obj,fp) rb_io_check_closed((fp) = RFILE(rb_io_taint_check(obj))->fptr)
rb_io_taint_check   97 rubyio.h       VALUE rb_io_taint_check(VALUE);


rb_io_tell

rb_io_tell       5046 io.c               return rb_io_tell(current_file);
rb_io_tell       5535 io.c               rb_define_method(rb_cIO, "tell", rb_io_tell, 0);
rb_io_tell       5541 io.c               rb_define_method(rb_cIO, "pos", rb_io_tell, 0);


rb_io_ungetc

rb_io_ungetc      336 intern.h       VALUE rb_io_ungetc(VALUE, VALUE);
rb_io_ungetc     5532 io.c               rb_define_method(rb_cIO, "ungetc",rb_io_ungetc, 1);
rb_io_ungetc      949 ruby.c         		rb_io_ungetc(f, INT2FIX('\n'));
rb_io_ungetc      950 ruby.c         		rb_io_ungetc(f, INT2FIX('!'));
rb_io_ungetc      953 ruby.c         		rb_io_ungetc(f, c);
rb_io_ungetc      955 ruby.c         	    rb_io_ungetc(f, INT2FIX('#'));
rb_io_ungetc      958 ruby.c         	    rb_io_ungetc(f, c);


rb_io_wait_readable

rb_io_wait_readable  588 ext/openssl/ossl_ssl.c             rb_io_wait_readable(fptr->fd);
rb_io_wait_readable  648 ext/openssl/ossl_ssl.c                 rb_io_wait_readable(fptr->fd);
rb_io_wait_readable  693 ext/openssl/ossl_ssl.c                 rb_io_wait_readable(fptr->fd);
rb_io_wait_readable  597 ext/socket/socket.c 	if (rb_io_wait_readable(fd)) {
rb_io_wait_readable 1416 ext/socket/socket.c 	    if (!rb_io_wait_readable(fd)) break;
rb_io_wait_readable 1837 ext/socket/socket.c     rb_io_wait_readable(fptr->fd);
rb_io_wait_readable  885 io.c                       if (rb_io_wait_readable(fptr->fd))
rb_io_wait_readable 1283 io.c                       if (rb_io_wait_readable(fptr->fd))
rb_io_wait_readable   94 rubyio.h       int rb_io_wait_readable(int);


rb_io_wait_writable

rb_io_wait_writable  585 ext/openssl/ossl_ssl.c             rb_io_wait_writable(fptr->fd);
rb_io_wait_writable  645 ext/openssl/ossl_ssl.c                 rb_io_wait_writable(fptr->fd);
rb_io_wait_writable  690 ext/openssl/ossl_ssl.c                 rb_io_wait_writable(fptr->fd);
rb_io_wait_writable  508 ext/socket/socket.c 	if (rb_io_wait_writable(fd)) {
rb_io_wait_writable 1681 ext/socket/socket.c 	if (rb_io_wait_writable(fptr->fd)) {
rb_io_wait_writable  449 io.c               if (rb_io_wait_writable(fptr->fd)) {
rb_io_wait_writable  595 io.c                   if (rb_io_wait_writable(fptr->fd)) {
rb_io_wait_writable   95 rubyio.h       int rb_io_wait_writable(int);


rb_io_write

rb_io_write       144 error.c        	rb_io_write(rb_stderr, mesg);
rb_io_write       145 error.c        	rb_io_write(rb_stderr, rb_default_rs);
rb_io_write      1891 ext/syck/rubyext.c         rb_io_write( dest, rb_str_new( str, len ) );
rb_io_write       333 intern.h       VALUE rb_io_write(VALUE, VALUE);
rb_io_write       694 io.c               rb_io_write(io, str);
rb_io_write      3482 io.c               rb_io_write(out, rb_f_sprintf(argc, argv));
rb_io_write      3511 io.c               rb_io_write(out, rb_f_sprintf(argc, argv));
rb_io_write      3550 io.c           	    rb_io_write(out, rb_output_fs);
rb_io_write      3554 io.c           	    rb_io_write(out, rb_str_new2("nil"));
rb_io_write      3557 io.c           	    rb_io_write(out, argv[i]);
rb_io_write      3562 io.c           	rb_io_write(out, rb_output_rs);
rb_io_write      3619 io.c               rb_io_write(io, rb_str_new(&c, 1));
rb_io_write      3682 io.c           	rb_io_write(out, rb_default_rs);
rb_io_write      3697 io.c           	rb_io_write(out, line);
rb_io_write      3700 io.c           	    rb_io_write(out, rb_default_rs);
rb_io_write      3726 io.c               rb_io_write(rb_stdout, rb_obj_as_string(rb_inspect(obj)));
rb_io_write      3727 io.c               rb_io_write(rb_stdout, rb_default_rs);
rb_io_write      3793 io.c               rb_io_write(out, self);
rb_io_write      3801 io.c               rb_io_write(rb_stderr, rb_str_new(mesg, len));
rb_io_write       125 marshal.c      	rb_io_write(arg->dest, buf);
rb_io_write       637 marshal.c      	rb_io_write(arg->arg->dest, arg->arg->str);


rb_is_class_id

rb_is_class_id    396 intern.h       int rb_is_class_id(ID);
rb_is_class_id   1879 object.c           if (!rb_is_class_id(id)) {
rb_is_class_id   1908 object.c           if (!rb_is_class_id(id)) {
rb_is_class_id   1572 variable.c         if (!rb_is_class_id(id)) {
rb_is_class_id   1582 variable.c         if (!rb_is_class_id(id)) {
rb_is_class_id   1593 variable.c         if (!rb_is_class_id(id)) {
rb_is_class_id   1602 variable.c         if (rb_is_class_id(key)) {
rb_is_class_id   1664 variable.c         if (!rb_is_class_id(id)) {


rb_is_const_id

rb_is_const_id    658 eval.c             if (!rb_is_local_id(id) && !rb_is_const_id(id)) {
rb_is_const_id   3553 eval.c         	    if (rb_is_const_id(node->nd_mid)) {
rb_is_const_id   1499 ext/win32ole/win32ole.c                 if (rb_is_const_id(id)) {
rb_is_const_id    394 intern.h       int rb_is_const_id(ID);
rb_is_const_id   1643 object.c           if (!rb_is_const_id(id)) {
rb_is_const_id   1666 object.c           if (!rb_is_const_id(id)) {
rb_is_const_id   1688 object.c           if (!rb_is_const_id(id)) {
rb_is_const_id    185 struct.c       	if (!rb_is_const_id(id)) {
rb_is_const_id    203 struct.c       	if (rb_is_local_id(id) || rb_is_const_id(id)) {
rb_is_const_id    454 struct.c       	if (rb_is_local_id(id) || rb_is_const_id(id)) {
rb_is_const_id     71 variable.c         if (!rb_is_const_id(key)) return ST_CONTINUE;
rb_is_const_id   1169 variable.c         if (!rb_is_const_id(id)) {
rb_is_const_id   1342 variable.c         if (!rb_is_const_id(id)) {
rb_is_const_id   1368 variable.c         if (rb_is_const_id(key)) {
rb_is_const_id   1524 variable.c         if (!rb_is_const_id(id)) {


rb_is_instance_id

rb_is_instance_id  395 intern.h       int rb_is_instance_id(ID);
rb_is_instance_id  312 object.c           if (!rb_is_instance_id(id)) return ST_CONTINUE;
rb_is_instance_id 1822 object.c           if (!rb_is_instance_id(id)) {
rb_is_instance_id 1854 object.c           if (!rb_is_instance_id(id)) {
rb_is_instance_id  990 variable.c         if (rb_is_instance_id(key)) {
rb_is_instance_id 1072 variable.c         if (!rb_is_instance_id(id)) {


rb_is_local_id

rb_is_local_id    658 eval.c             if (!rb_is_local_id(id) && !rb_is_const_id(id)) {
rb_is_local_id   7432 eval.c         	    if (!rb_is_local_id(tbl[i])) continue; /* skip flip states */
rb_is_local_id   7439 eval.c         	if (vars->id && rb_is_local_id(vars->id)) { /* skip $_, $~ and flip states */
rb_is_local_id   11885 eval.c         	    if (id != 0 && !rb_is_local_id(id))  /* push flip states */
rb_is_local_id    397 intern.h       int rb_is_local_id(ID);
rb_is_local_id    203 struct.c       	if (rb_is_local_id(id) || rb_is_const_id(id)) {
rb_is_local_id    454 struct.c       	if (rb_is_local_id(id) || rb_is_const_id(id)) {


rb_iter_break

rb_iter_break     136 enum.c         	rb_iter_break();
rb_iter_break     547 enum.c         	rb_iter_break();
rb_iter_break     557 enum.c         	rb_iter_break();
rb_iter_break     593 enum.c         	rb_iter_break();
rb_iter_break     603 enum.c         	rb_iter_break();
rb_iter_break     694 enum.c         	rb_iter_break();
rb_iter_break     704 enum.c         	rb_iter_break();
rb_iter_break     937 enum.c         	rb_iter_break();
rb_iter_break     302 ext/racc/cparse/cparse.c        rb_iter_break();
rb_iter_break     560 ruby.h         NORETURN(void rb_iter_break(void));


rb_iterate

rb_iterate         71 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? grep_iter_i : grep_i, (VALUE)arg);
rb_iterate        120 enum.c         	rb_iterate(rb_each, obj, count_i, (VALUE)&args);
rb_iterate        126 enum.c         	rb_iterate(rb_each, obj, count_iter_i, (VALUE)&n);
rb_iterate        164 enum.c             rb_iterate(rb_each, obj, find_i, (VALUE)&memo);
rb_iterate        204 enum.c             rb_iterate(rb_each, obj, find_all_i, ary);
rb_iterate        237 enum.c             rb_iterate(rb_each, obj, reject_i, ary);
rb_iterate        279 enum.c             rb_iterate(rb_each, obj, collect_i, ary);
rb_iterate        299 enum.c             rb_iterate(rb_each, obj, collect_all, ary);
rb_iterate        354 enum.c             rb_iterate(rb_each, obj, inject_i, (VALUE)&memo);
rb_iterate        392 enum.c             rb_iterate(rb_each, obj, partition_i, (VALUE)ary);
rb_iterate        528 enum.c             rb_iterate(rb_each, obj, sort_by_i, ary);
rb_iterate        584 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? all_iter_i : all_i, (VALUE)&result);
rb_iterate        631 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? any_iter_i : any_i, (VALUE)&result);
rb_iterate        684 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? one_iter_i : one_i, (VALUE)&result);
rb_iterate        729 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? none_iter_i : none_i, (VALUE)&result);
rb_iterate        787 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? min_ii : min_i, (VALUE)&result);
rb_iterate        845 enum.c             rb_iterate(rb_each, obj, rb_block_given_p() ? max_ii : max_i, (VALUE)&result);
rb_iterate        887 enum.c             rb_iterate(rb_each, obj, min_by_i, (VALUE)memo);
rb_iterate        928 enum.c             rb_iterate(rb_each, obj, max_by_i, (VALUE)memo);
rb_iterate        962 enum.c             rb_iterate(rb_each, obj, member_i, (VALUE)memo);
rb_iterate        996 enum.c             rb_iterate(rb_each, obj, each_with_index_i, (VALUE)&memo);
rb_iterate       1060 enum.c             rb_iterate(rb_each, obj, zip_i, (VALUE)memo);
rb_iterate        171 enumerator.c       rb_iterate(rb_each, obj, each_slice_i, (VALUE)args);
rb_iterate        238 enumerator.c       rb_iterate(rb_each, obj, each_cons_i, (VALUE)args);
rb_iterate        339 enumerator.c       return rb_iterate(enumerator_iter, (VALUE)e, e->iter, (VALUE)e);
rb_iterate        364 enumerator.c       return rb_iterate(enumerator_iter, (VALUE)e,
rb_iterate       9213 eval.c             VALUE proc = rb_iterate((VALUE(*)(VALUE))mproc, 0, func, val);
rb_iterate       9238 eval.c             proc = rb_iterate((VALUE(*)(VALUE))mproc, 0, bmcall, method);
rb_iterate       12963 eval.c             return rb_iterate((VALUE(*)(VALUE))catch_i, ID2SYM(rb_intern(tag)), func, data);
rb_iterate        456 ext/dbm/dbm.c      rb_iterate(each_pair, other, update_i, obj);
rb_iterate        465 ext/dbm/dbm.c      rb_iterate(each_pair, other, update_i, obj);
rb_iterate        558 ext/gdbm/gdbm.c     rb_iterate(each_pair, other, update_i, obj);
rb_iterate        567 ext/gdbm/gdbm.c     rb_iterate(each_pair, other, update_i, obj);
rb_iterate        525 ext/iconv/iconv.c 	rb_iterate(rb_each, options, get_iconv_opt_i, (VALUE)opt);
rb_iterate        681 ext/openssl/ossl_asn1.c     rb_iterate(rb_each, enumerable, join_der_i, str);
rb_iterate        249 ext/openssl/ossl_config.c     rb_iterate(rb_each, hash, set_conf_section_i, (VALUE)arg);
rb_iterate        586 ext/openssl/ossl_pkcs7.c     rb_iterate(rb_each, ary, ossl_pkcs7_set_certs_i, self);
rb_iterate        626 ext/openssl/ossl_pkcs7.c     rb_iterate(rb_each, ary, ossl_pkcs7_set_crls_i, self);
rb_iterate        327 ext/openssl/ossl_ssl.c 	rb_iterate(rb_each, val, ossl_sslctx_add_extra_chain_cert_i, self);
rb_iterate        128 ext/openssl/ossl_x509name.c 	    rb_iterate(rb_each, tmp, ossl_x509name_init_i, args);
rb_iterate        275 ext/racc/cparse/cparse.c     rb_iterate(lexer_iter, v->value_v, lexer_i, v->value_v);
rb_iterate        661 ext/racc/cparse/cparse.c     code = rb_iterate(catch_iter, Qnil, reduce0, v->value_v);
rb_iterate        434 ext/sdbm/init.c     rb_iterate(each_pair, other, update_i, obj);
rb_iterate        443 ext/sdbm/init.c     rb_iterate(each_pair, other, update_i, obj);
rb_iterate        574 ext/syck/rubyext.c                             rb_iterate( rb_each, tmp, syck_merge_i, dup );
rb_iterate       1009 ext/syck/rubyext.c                             rb_iterate( rb_each, v, syck_merge_i, dup );
rb_iterate       1166 ext/syck/rubyext.c                     rb_iterate( rb_each, val, syck_set_ivars, obj );
rb_iterate       2221 ext/win32ole/win32ole.c         rb_iterate(rb_each, param, hash2named_arg, (VALUE)&op);
rb_iterate       5244 io.c           	    rb_iterate(rb_each, current_file, rb_yield, 0);
rb_iterate        318 range.c        	    rb_iterate(str_step, (VALUE)args, step_i, (VALUE)iter);
rb_iterate        398 range.c        	rb_iterate(str_step, (VALUE)args, step_i, (VALUE)iter);
rb_iterate        577 ruby.h         VALUE rb_iterate(VALUE(*)(VALUE),VALUE,VALUE(*)(ANYARGS),VALUE);


rb_iv_get

rb_iv_get         783 class.c        	rb_iv_get(RBASIC(obj)->klass, "__attached__") == obj) {
rb_iv_get         398 eval.c         		rb_class2name(rb_iv_get(klass, "__attached__")));
rb_iv_get         407 eval.c         	    rb_funcall(rb_iv_get(klass, "__attached__"), singleton_added, 1, ID2SYM(mid));
rb_iv_get         538 eval.c         	rb_funcall(rb_iv_get(klass, "__attached__"), singleton_removed, 1, ID2SYM(mid));
rb_iv_get        1354 eval.c             VALUE st = rb_iv_get(err, "status");
rb_iv_get        1497 eval.c         	VALUE st = rb_iv_get(err, "status");
rb_iv_get        1660 eval.c             return rb_iv_get(exc, "@exit_value");
rb_iv_get        1674 eval.c             return rb_iv_get(exc, "@reason");
rb_iv_get        1930 eval.c         	    VALUE obj = rb_iv_get(klass, "__attached__");
rb_iv_get        1947 eval.c         	rb_funcall(rb_iv_get(klass, "__attached__"),
rb_iv_get        2031 eval.c         	singleton = rb_iv_get(klass, "__attached__");
rb_iv_get        2543 eval.c         	    klass = rb_iv_get(klass, "__attached__");
rb_iv_get        9148 eval.c         	VALUE v = rb_iv_get(data->klass, "__attached__");
rb_iv_get         157 ext/Win32API/Win32API.c     VALUE obj_proc = rb_iv_get(obj, "__proc__");
rb_iv_get         158 ext/Win32API/Win32API.c     VALUE obj_import = rb_iv_get(obj, "__import__");
rb_iv_get         159 ext/Win32API/Win32API.c     VALUE obj_export = rb_iv_get(obj, "__export__");
rb_iv_get          26 ext/openssl/ossl_pkcs12.c #define ossl_pkcs12_get_key(o)        rb_iv_get((o), "@key")
rb_iv_get          27 ext/openssl/ossl_pkcs12.c #define ossl_pkcs12_get_cert(o)       rb_iv_get((o), "@certificate")
rb_iv_get          28 ext/openssl/ossl_pkcs12.c #define ossl_pkcs12_get_ca_certs(o)   rb_iv_get((o), "@ca_certs")
rb_iv_get          67 ext/openssl/ossl_pkcs7.c #define ossl_pkcs7_get_data(o)         rb_iv_get((o), "@data")
rb_iv_get          69 ext/openssl/ossl_pkcs7.c #define ossl_pkcs7_get_err_string(o)   rb_iv_get((o), "@error_string")
rb_iv_get          21 ext/openssl/ossl_pkey.h #define OSSL_PKEY_IS_PRIVATE(obj)  (rb_iv_get((obj), "private") == Qtrue)
rb_iv_get          47 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_sess_id_ctx(o, v) rb_iv_get((o),"@session_id_context"(v))
rb_iv_get          49 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_cert(o)          rb_iv_get((o),"@cert")
rb_iv_get          50 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_key(o)           rb_iv_get((o),"@key")
rb_iv_get          51 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_client_ca(o)     rb_iv_get((o),"@client_ca")
rb_iv_get          52 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_ca_file(o)       rb_iv_get((o),"@ca_file")
rb_iv_get          53 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_ca_path(o)       rb_iv_get((o),"@ca_path")
rb_iv_get          54 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_timeout(o)       rb_iv_get((o),"@timeout")
rb_iv_get          55 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_verify_mode(o)   rb_iv_get((o),"@verify_mode")
rb_iv_get          56 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_verify_dep(o)    rb_iv_get((o),"@verify_depth")
rb_iv_get          57 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_verify_cb(o)     rb_iv_get((o),"@verify_callback")
rb_iv_get          58 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_options(o)       rb_iv_get((o),"@options")
rb_iv_get          59 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_cert_store(o)    rb_iv_get((o),"@cert_store")
rb_iv_get          60 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_extra_cert(o)    rb_iv_get((o),"@extra_chain_cert")
rb_iv_get          61 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_client_cert_cb(o) rb_iv_get((o),"@client_cert_cb")
rb_iv_get          62 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_tmp_dh_cb(o)     rb_iv_get((o),"@tmp_dh_callback")
rb_iv_get          63 ext/openssl/ossl_ssl.c #define ossl_sslctx_get_sess_id_ctx(o)   rb_iv_get((o),"@session_id_context")
rb_iv_get          72 ext/openssl/ossl_ssl.c #define ossl_ssl_get_io(o)           rb_iv_get((o),"@io")
rb_iv_get          73 ext/openssl/ossl_ssl.c #define ossl_ssl_get_ctx(o)          rb_iv_get((o),"@context")
rb_iv_get          74 ext/openssl/ossl_ssl.c #define ossl_ssl_get_sync_close(o)   rb_iv_get((o),"@sync_close")
rb_iv_get          75 ext/openssl/ossl_ssl.c #define ossl_ssl_get_x509(o)         rb_iv_get((o),"@x509")
rb_iv_get          76 ext/openssl/ossl_ssl.c #define ossl_ssl_get_key(o)          rb_iv_get((o),"@key")
rb_iv_get          77 ext/openssl/ossl_ssl.c #define ossl_ssl_get_tmp_dh(o)       rb_iv_get((o),"@tmp_dh")
rb_iv_get         239 ext/openssl/ossl_x509ext.c     rconf = rb_iv_get(self, "@config");
rb_iv_get         298 ext/openssl/ossl_x509store.c 	   rb_iv_get(self, "@verify_callback");
rb_iv_get         386 ext/openssl/ossl_x509store.c     ossl_x509stctx_set_flags(self, rb_iv_get(store, "@flags"));
rb_iv_get         387 ext/openssl/ossl_x509store.c     ossl_x509stctx_set_purpose(self, rb_iv_get(store, "@purpose"));
rb_iv_get         388 ext/openssl/ossl_x509store.c     ossl_x509stctx_set_trust(self, rb_iv_get(store, "@trust"));
rb_iv_get         390 ext/openssl/ossl_x509store.c     if (!NIL_P(t = rb_iv_get(store, "@time")))
rb_iv_get         392 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@verify_callback", rb_iv_get(store, "@verify_callback"));
rb_iv_get         406 ext/openssl/ossl_x509store.c                                (void*)rb_iv_get(self, "@verify_callback"));
rb_iv_get         549 intern.h       VALUE rb_iv_get(VALUE, const char*);
rb_iv_get        1140 object.c       	VALUE v = rb_iv_get(klass, "__attached__");
rb_iv_get         224 process.c          return rb_iv_get(st, "status");
rb_iv_get         256 process.c          return rb_iv_get(st, "pid");
rb_iv_get         549 ruby.h         VALUE rb_iv_get(VALUE, const char*);


rb_iv_set

rb_iv_set         301 error.c            rb_iv_set(exc, "mesg", arg);
rb_iv_set         302 error.c            rb_iv_set(exc, "bt", Qnil);
rb_iv_set         468 error.c            return rb_iv_set(exc, "bt", check_backtrace(bt));
rb_iv_set         511 error.c            rb_iv_set(exc, "status", status);
rb_iv_set         579 error.c            rb_iv_set(self, "name", name);
rb_iv_set         612 error.c        	rb_iv_set(exc, "mesg", mesg = str);
rb_iv_set         633 error.c            rb_iv_set(self, "args", args);
rb_iv_set         865 error.c            rb_iv_set(self, "errno", error);
rb_iv_set        1632 eval.c             rb_iv_set(exc, "@exit_value", value);
rb_iv_set        1647 eval.c             rb_iv_set(exc, "@reason", ID2SYM(id));
rb_iv_set          56 ext/Win32API/Win32API.c     rb_iv_set(self, "__hdll__", Data_Wrap_Struct(rb_cData, 0, Win32API_FreeLibrary, (void*)hdll));
rb_iv_set          66 ext/Win32API/Win32API.c     rb_iv_set(self, "__dll__", UINT2NUM((unsigned long)hdll));
rb_iv_set          67 ext/Win32API/Win32API.c     rb_iv_set(self, "__dllname__", dllname);
rb_iv_set          68 ext/Win32API/Win32API.c     rb_iv_set(self, "__proc__", UINT2NUM((unsigned long)hproc));
rb_iv_set         114 ext/Win32API/Win32API.c     rb_iv_set(self, "__import__", a_import);
rb_iv_set         135 ext/Win32API/Win32API.c     rb_iv_set(self, "__export__", INT2FIX(ex));
rb_iv_set         164 ext/openssl/ossl_asn1.c #define ossl_asn1_set_value(o,v)     rb_iv_set((o),"@value",(v))
rb_iv_set         165 ext/openssl/ossl_asn1.c #define ossl_asn1_set_tag(o,v)       rb_iv_set((o),"@tag",(v))
rb_iv_set         166 ext/openssl/ossl_asn1.c #define ossl_asn1_set_tagging(o,v)   rb_iv_set((o),"@tagging",(v))
rb_iv_set         167 ext/openssl/ossl_asn1.c #define ossl_asn1_set_tag_class(o,v) rb_iv_set((o),"@tag_class",(v))
rb_iv_set         801 ext/openssl/ossl_asn1.c 		rb_iv_set(asn1data, "@unused_bits", LONG2NUM(flag));
rb_iv_set          23 ext/openssl/ossl_pkcs12.c #define ossl_pkcs12_set_key(o,v)      rb_iv_set((o), "@key", (v))
rb_iv_set          24 ext/openssl/ossl_pkcs12.c #define ossl_pkcs12_set_cert(o,v)     rb_iv_set((o), "@certificate", (v))
rb_iv_set          25 ext/openssl/ossl_pkcs12.c #define ossl_pkcs12_set_ca_certs(o,v) rb_iv_set((o), "@ca_certs", (v))
rb_iv_set          66 ext/openssl/ossl_pkcs7.c #define ossl_pkcs7_set_data(o,v)       rb_iv_set((o), "@data", (v))
rb_iv_set          68 ext/openssl/ossl_pkcs7.c #define ossl_pkcs7_set_err_string(o,v) rb_iv_set((o), "@error_string", (v))
rb_iv_set          19 ext/openssl/ossl_pkey.h #define OSSL_PKEY_SET_PRIVATE(obj) rb_iv_set((obj), "private", Qtrue)
rb_iv_set          20 ext/openssl/ossl_pkey.h #define OSSL_PKEY_SET_PUBLIC(obj)  rb_iv_set((obj), "private", Qfalse)
rb_iv_set          33 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_cert(o,v)        rb_iv_set((o),"@cert",(v))
rb_iv_set          34 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_key(o,v)         rb_iv_set((o),"@key",(v))
rb_iv_set          35 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_client_ca(o,v)   rb_iv_set((o),"@client_ca",(v))
rb_iv_set          36 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_ca_file(o,v)     rb_iv_set((o),"@ca_file",(v))
rb_iv_set          37 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_ca_path(o,v)     rb_iv_set((o),"@ca_path",(v))
rb_iv_set          38 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_timeout(o,v)     rb_iv_set((o),"@timeout",(v))
rb_iv_set          39 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_verify_mode(o,v) rb_iv_set((o),"@verify_mode",(v))
rb_iv_set          40 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_verify_dep(o,v)  rb_iv_set((o),"@verify_depth",(v))
rb_iv_set          41 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_verify_cb(o,v)   rb_iv_set((o),"@verify_callback",(v))
rb_iv_set          42 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_options(o,v)     rb_iv_set((o),"@options",(v))
rb_iv_set          43 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_cert_store(o,v)  rb_iv_set((o),"@cert_store",(v))
rb_iv_set          44 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_extra_cert(o,v)  rb_iv_set((o),"@extra_chain_cert",(v))
rb_iv_set          45 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_client_cert_cb(o,v) rb_iv_set((o),"@client_cert_cb",(v))
rb_iv_set          46 ext/openssl/ossl_ssl.c #define ossl_sslctx_set_tmp_dh_cb(o,v)   rb_iv_set((o),"@tmp_dh_callback",(v))
rb_iv_set          79 ext/openssl/ossl_ssl.c #define ossl_ssl_set_io(o,v)         rb_iv_set((o),"@io",(v))
rb_iv_set          80 ext/openssl/ossl_ssl.c #define ossl_ssl_set_ctx(o,v)        rb_iv_set((o),"@context",(v))
rb_iv_set          81 ext/openssl/ossl_ssl.c #define ossl_ssl_set_sync_close(o,v) rb_iv_set((o),"@sync_close",(v))
rb_iv_set          82 ext/openssl/ossl_ssl.c #define ossl_ssl_set_x509(o,v)       rb_iv_set((o),"@x509",(v))
rb_iv_set          83 ext/openssl/ossl_ssl.c #define ossl_ssl_set_key(o,v)        rb_iv_set((o),"@key",(v))
rb_iv_set          84 ext/openssl/ossl_ssl.c #define ossl_ssl_set_tmp_dh(o,v)     rb_iv_set((o),"@tmp_dh",(v))
rb_iv_set         152 ext/openssl/ossl_ssl.c 	rb_iv_set(self, buf, Qnil);
rb_iv_set         123 ext/openssl/ossl_x509ext.c     rb_iv_set(self, "@issuer_certificate", cert);
rb_iv_set         135 ext/openssl/ossl_x509ext.c     rb_iv_set(self, "@subject_certificate", cert);
rb_iv_set         147 ext/openssl/ossl_x509ext.c     rb_iv_set(self, "@subject_request", req);
rb_iv_set         159 ext/openssl/ossl_x509ext.c     rb_iv_set(self, "@crl", crl);
rb_iv_set         173 ext/openssl/ossl_x509ext.c     rb_iv_set(self, "@config", config);
rb_iv_set         116 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@verify_callback", cb);
rb_iv_set         131 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@flags", INT2NUM(0));
rb_iv_set         132 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@purpose", INT2NUM(0));
rb_iv_set         133 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@trust", INT2NUM(0));
rb_iv_set         137 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@error", Qnil);
rb_iv_set         138 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@error_string", Qnil);
rb_iv_set         139 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@chain", Qnil);
rb_iv_set         140 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@time", Qnil);
rb_iv_set         155 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@flags", flags);
rb_iv_set         171 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@purpose", purpose);
rb_iv_set         187 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@trust", trust);
rb_iv_set         196 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@time", time);
rb_iv_set         299 ext/openssl/ossl_x509store.c     rb_iv_set(ctx, "@verify_callback", proc);
rb_iv_set         302 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@error", ossl_x509stctx_get_err(ctx));
rb_iv_set         303 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@error_string", ossl_x509stctx_get_err_string(ctx));
rb_iv_set         304 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@chain", ossl_x509stctx_get_chain(ctx));
rb_iv_set         392 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@verify_callback", rb_iv_get(store, "@verify_callback"));
rb_iv_set         393 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@cert", cert);
rb_iv_set         144 ext/pty/pty.c      rb_iv_set(exc, "status", rb_last_status);
rb_iv_set        1050 ext/syck/rubyext.c     rb_iv_set( obj, ivn, rb_ary_entry( vars, 1 ) );
rb_iv_set        1295 ext/syck/rubyext.c             rb_iv_set(obj, "@kind", sym_seq);
rb_iv_set        1309 ext/syck/rubyext.c             rb_iv_set(obj, "@kind", sym_map);
rb_iv_set        1333 ext/syck/rubyext.c     rb_iv_set( self, "@name", val );
rb_iv_set        1357 ext/syck/rubyext.c     rb_iv_set( self, "@domain", domain );
rb_iv_set        1358 ext/syck/rubyext.c     rb_iv_set( self, "@type_id", type_id );
rb_iv_set        1359 ext/syck/rubyext.c     rb_iv_set( self, "@value", val );
rb_iv_set        1370 ext/syck/rubyext.c     rb_iv_set( self, "@class", klass );
rb_iv_set        1371 ext/syck/rubyext.c     rb_iv_set( self, "@ivars", ivars );
rb_iv_set        1382 ext/syck/rubyext.c     rb_iv_set( self, "@type_id", type_id );
rb_iv_set        1383 ext/syck/rubyext.c     rb_iv_set( self, "@value", val );
rb_iv_set        1438 ext/syck/rubyext.c     rb_iv_set( self, "@kind", sym_scalar );
rb_iv_set        1480 ext/syck/rubyext.c     rb_iv_set( self, "@style", style );
rb_iv_set        1499 ext/syck/rubyext.c     rb_iv_set( self, "@value", val );
rb_iv_set        1528 ext/syck/rubyext.c     rb_iv_set( self, "@kind", sym_seq );
rb_iv_set        1555 ext/syck/rubyext.c     rb_iv_set( self, "@value", val );
rb_iv_set        1598 ext/syck/rubyext.c     rb_iv_set( self, "@style", style );
rb_iv_set        1645 ext/syck/rubyext.c     rb_iv_set( self, "@kind", sym_seq );
rb_iv_set        1681 ext/syck/rubyext.c     rb_iv_set( self, "@value", val );
rb_iv_set        1725 ext/syck/rubyext.c     rb_iv_set( self, "@style", style );
rb_iv_set        1770 ext/syck/rubyext.c     rb_iv_set( self, "@type_id", type_id );
rb_iv_set        2707 ext/tk/tcltklib.c         rb_iv_set(rbtk_pending_exception, "status", INT2FIX(0));
rb_iv_set        2735 ext/tk/tcltklib.c         rb_iv_set(rbtk_pending_exception, "status", INT2FIX(state));
rb_iv_set         548 intern.h       VALUE rb_iv_set(VALUE, const char*, VALUE);
rb_iv_set         203 process.c          rb_iv_set(rb_last_status, "status", INT2FIX(status));
rb_iv_set         204 process.c          rb_iv_set(rb_last_status, "pid", INT2FIX(pid));
rb_iv_set         550 ruby.h         VALUE rb_iv_set(VALUE, const char*, VALUE);
rb_iv_set         194 struct.c           rb_iv_set(nstr, "__size__", LONG2NUM(RARRAY(members)->len));
rb_iv_set         195 struct.c           rb_iv_set(nstr, "__members__", members);
rb_iv_set         264 variable.c         rb_iv_set(klass, "__classid__", ID2SYM(id));


rb_ivar_defined

rb_ivar_defined   429 error.c            if (!rb_ivar_defined(exc, bt)) return Qnil;
rb_ivar_defined  2296 eval.c         	if (rb_ivar_defined(self, node->nd_vid)) {
rb_ivar_defined   547 intern.h       VALUE rb_ivar_defined(VALUE, ID);
rb_ivar_defined    79 range.c            if (rb_ivar_defined(range, id_beg)) {
rb_ivar_defined    26 struct.c       	if (rb_ivar_defined(c, id))


rb_ivar_get

rb_ivar_get       430 error.c            return rb_ivar_get(exc, bt);
rb_ivar_get      3525 eval.c         	result = rb_ivar_get(self, node->nd_vid);
rb_ivar_get       124 ext/pty/pty.c      return rb_ivar_get(self, rb_intern("status"));
rb_ivar_get       341 ext/racc/cparse/cparse.c     v->debug = RTEST(rb_ivar_get(parser, id_yydebug));
rb_ivar_get       662 ext/racc/cparse/cparse.c     v->errstatus = num_to_long(rb_ivar_get(v->parser, id_errstatus));
rb_ivar_get       694 ext/syck/rubyext.c         input = rb_ivar_get( p, s_input );
rb_ivar_get      1344 ext/syck/rubyext.c     VALUE str1 = rb_ivar_get( alias1, s_name );
rb_ivar_get      1345 ext/syck/rubyext.c     VALUE str2 = rb_ivar_get( alias2, s_name );
rb_ivar_get      1567 ext/syck/rubyext.c     VALUE emitter = rb_ivar_get( self, s_emitter );
rb_ivar_get      1574 ext/syck/rubyext.c     rb_ary_push( rb_ivar_get( self, s_value ), val );
rb_ivar_get      1693 ext/syck/rubyext.c     VALUE emitter = rb_ivar_get( self, s_emitter );
rb_ivar_get      1701 ext/syck/rubyext.c     rb_hash_aset( rb_ivar_get( self, s_value ), key, val );
rb_ivar_get      2019 ext/syck/rubyext.c     int level = FIX2INT(rb_ivar_get(self, s_level)) + 1;
rb_ivar_get      2031 ext/syck/rubyext.c         symple = rb_funcall( proc, s_call, 1, rb_ivar_get( self, s_out ) );
rb_ivar_get      2095 ext/syck/rubyext.c     syck_out_mark( rb_ivar_get( self, s_emitter ), map );
rb_ivar_get      2114 ext/syck/rubyext.c     syck_out_mark( rb_ivar_get( self, s_emitter ), seq );
rb_ivar_get      2135 ext/syck/rubyext.c     syck_out_mark( rb_ivar_get( self, s_emitter ), scalar );
rb_ivar_get      2335 ext/tk/tcltklib.c             VALUE reason = rb_ivar_get(exc, ID_at_reason);
rb_ivar_get       284 ext/tk/tkutil/tkutil.c                 str_enc = rb_ivar_get(str_val, ID_at_enc);
rb_ivar_get       331 ext/tk/tkutil/tkutil.c                     str_enc = rb_ivar_get(str_val, ID_at_enc);
rb_ivar_get       351 ext/tk/tkutil/tkutil.c                     str_enc = rb_ivar_get(str_val, ID_at_enc);
rb_ivar_get       446 ext/tk/tkutil/tkutil.c                 str_enc = rb_ivar_get(str_val, ID_at_enc);
rb_ivar_get      1505 ext/tk/tkutil/tkutil.c     return rb_ivar_get(self, ID_at_path);
rb_ivar_get      1958 ext/win32ole/win32ole.c             name = rb_ivar_get(target, rb_intern("name"));
rb_ivar_get      4024 ext/win32ole/win32ole.c     return rb_ivar_get(self, rb_intern("guid"));
rb_ivar_get      4040 ext/win32ole/win32ole.c     return rb_ivar_get(self, rb_intern("name"));
rb_ivar_get      4056 ext/win32ole/win32ole.c     VALUE ver = rb_ivar_get(self, rb_intern("version"));
rb_ivar_get      4073 ext/win32ole/win32ole.c     VALUE ver = rb_ivar_get(self, rb_intern("version"));
rb_ivar_get      4091 ext/win32ole/win32ole.c     VALUE ver = rb_ivar_get(self, rb_intern("version"));
rb_ivar_get      4144 ext/win32ole/win32ole.c     VALUE guid = rb_ivar_get(self, rb_intern("guid"));
rb_ivar_get      4145 ext/win32ole/win32ole.c     VALUE version = rb_ivar_get(self, rb_intern("version"));
rb_ivar_get      4245 ext/win32ole/win32ole.c     return rb_ivar_get(self, rb_intern("name"));
rb_ivar_get      4848 ext/win32ole/win32ole.c     return rb_ivar_get(self, rb_intern("name"));
rb_ivar_get      5222 ext/win32ole/win32ole.c     return rb_ivar_get(self, rb_intern("name"));
rb_ivar_get      5540 ext/win32ole/win32ole.c                             rb_ivar_get(self, rb_intern("name")));
rb_ivar_get      5912 ext/win32ole/win32ole.c     return rb_ivar_get(self, rb_intern("name"));
rb_ivar_get      6341 ext/win32ole/win32ole.c     ary = rb_ivar_get(obj, id_events);
rb_ivar_get      6777 ext/win32ole/win32ole.c     VALUE events = rb_ivar_get(obj, id_events);
rb_ivar_get       545 intern.h       VALUE rb_ivar_get(VALUE, ID);
rb_ivar_get      1825 object.c           return rb_ivar_get(obj, id);
rb_ivar_get        18 range.c        #define EXCL(r) RTEST(rb_ivar_get((r), id_excl))
rb_ivar_get       122 range.c            if (!rb_equal(rb_ivar_get(range, id_beg), rb_ivar_get(obj, id_beg)))
rb_ivar_get       124 range.c            if (!rb_equal(rb_ivar_get(range, id_end), rb_ivar_get(obj, id_end)))
rb_ivar_get       177 range.c            if (!rb_eql(rb_ivar_get(range, id_beg), rb_ivar_get(obj, id_beg)))
rb_ivar_get       179 range.c            if (!rb_eql(rb_ivar_get(range, id_end), rb_ivar_get(obj, id_end)))
rb_ivar_get       202 range.c            v = rb_hash(rb_ivar_get(range, id_beg));
rb_ivar_get       204 range.c            v = rb_hash(rb_ivar_get(range, id_end));
rb_ivar_get       288 range.c            b = rb_ivar_get(range, id_beg);
rb_ivar_get       289 range.c            e = rb_ivar_get(range, id_end);
rb_ivar_get       376 range.c            beg = rb_ivar_get(range, id_beg);
rb_ivar_get       377 range.c            end = rb_ivar_get(range, id_end);
rb_ivar_get       417 range.c            return rb_ivar_get(range, id_beg);
rb_ivar_get       436 range.c            return rb_ivar_get(range, id_end);
rb_ivar_get       458 range.c        	VALUE b = rb_ivar_get(range, id_beg);
rb_ivar_get       459 range.c        	VALUE e = rb_ivar_get(range, id_end);
rb_ivar_get       482 range.c            VALUE e = rb_ivar_get(range, id_end);
rb_ivar_get       489 range.c        	VALUE b = rb_ivar_get(range, id_beg);
rb_ivar_get       510 range.c        	b = rb_ivar_get(range, id_beg);
rb_ivar_get       511 range.c        	e = rb_ivar_get(range, id_end);
rb_ivar_get       561 range.c            str = rb_obj_as_string(rb_ivar_get(range, id_beg));
rb_ivar_get       562 range.c            str2 = rb_obj_as_string(rb_ivar_get(range, id_end));
rb_ivar_get       586 range.c            str = rb_inspect(rb_ivar_get(range, id_beg));
rb_ivar_get       587 range.c            str2 = rb_inspect(rb_ivar_get(range, id_end));
rb_ivar_get       621 range.c            VALUE beg = rb_ivar_get(range, id_beg);
rb_ivar_get       622 range.c            VALUE end = rb_ivar_get(range, id_end);
rb_ivar_get       662 range.c            beg = rb_ivar_get(range, id_beg);
rb_ivar_get       663 range.c            end = rb_ivar_get(range, id_end);
rb_ivar_get        27 struct.c       	    return rb_ivar_get(c, id);
rb_ivar_get      1688 variable.c         return rb_ivar_get(obj, id);


rb_ivar_set

rb_ivar_set      3480 eval.c         	rb_ivar_set(self, node->nd_vid, result);
rb_ivar_set      5022 eval.c         	rb_ivar_set(self, lhs->nd_vid, val);
rb_ivar_set      5659 eval.c         	result = rb_ivar_set(recv, body->nd_vid, argv[0]);
rb_ivar_set       274 ext/iconv/iconv.c     rb_ivar_set(error, rb_success, success);
rb_ivar_set       275 ext/iconv/iconv.c     rb_ivar_set(error, rb_failed, failed);
rb_ivar_set       374 ext/racc/cparse/cparse.c     rb_ivar_set(parser, id_errstatus, LONG2NUM(v->errstatus));
rb_ivar_set       512 ext/racc/cparse/cparse.c                 rb_ivar_set(v->parser, id_errstatus, LONG2NUM(v->errstatus));
rb_ivar_set       566 ext/racc/cparse/cparse.c     rb_ivar_set(v->parser, id_errstatus, LONG2NUM(v->errstatus));
rb_ivar_set       131 ext/readline/readline.c     return rb_ivar_set(mReadline, completion_proc, proc);
rb_ivar_set       148 ext/readline/readline.c     return rb_ivar_set(mReadline, completion_case_fold, val);
rb_ivar_set       789 ext/syck/rubyext.c     rb_ivar_set(self, s_options, options);
rb_ivar_set       790 ext/syck/rubyext.c     rb_ivar_set(self, s_input, Qnil);
rb_ivar_set       905 ext/syck/rubyext.c     rb_ivar_set( self, s_resolver, resolver );
rb_ivar_set       917 ext/syck/rubyext.c     rb_ivar_set(self, s_tags, rb_hash_new());
rb_ivar_set       940 ext/syck/rubyext.c     rb_ivar_set( self, s_tags, hsh );
rb_ivar_set      1907 ext/syck/rubyext.c     rb_ivar_set( node, s_emitter, emitter );
rb_ivar_set      1956 ext/syck/rubyext.c     rb_ivar_set( pobj, s_out, rb_funcall( cOut, s_new, 1, pobj ) );
rb_ivar_set      1983 ext/syck/rubyext.c         rb_ivar_set(self, s_options, options);
rb_ivar_set      1996 ext/syck/rubyext.c         rb_ivar_set(self, s_options, options);
rb_ivar_set      2000 ext/syck/rubyext.c     rb_ivar_set(self, s_level, INT2FIX(0));
rb_ivar_set      2001 ext/syck/rubyext.c     rb_ivar_set(self, s_resolver, Qnil);
rb_ivar_set      2020 ext/syck/rubyext.c     rb_ivar_set(self, s_level, INT2FIX(level));
rb_ivar_set      2037 ext/syck/rubyext.c     rb_ivar_set(self, s_level, INT2FIX(level));
rb_ivar_set      2066 ext/syck/rubyext.c     rb_ivar_set( self, s_resolver, resolver );
rb_ivar_set      2077 ext/syck/rubyext.c     rb_ivar_set( self, s_emitter, emitter );
rb_ivar_set       658 ext/tk/tcltklib.c     rb_ivar_set(einfo, ID_at_interp, interp);
rb_ivar_set      5329 ext/tk/tcltklib.c     if (binary) rb_ivar_set(str, ID_at_enc, rb_str_new2("binary"));
rb_ivar_set      6078 ext/tk/tcltklib.c     rb_ivar_set(str, ID_at_enc, rb_tainted_str_new2("utf-8"));
rb_ivar_set      6199 ext/tk/tcltklib.c             rb_ivar_set(str, ID_at_enc, rb_tainted_str_new2("binary"));
rb_ivar_set      6236 ext/tk/tcltklib.c     rb_ivar_set(str, ID_at_enc, encodename);
rb_ivar_set       379 ext/tk/tkutil/tkutil.c             rb_ivar_set(val, ID_at_enc, dst_enc);
rb_ivar_set       381 ext/tk/tkutil/tkutil.c             rb_ivar_set(val, ID_at_enc, rb_str_new2("utf-8"));
rb_ivar_set       473 ext/tk/tkutil/tkutil.c             rb_ivar_set(val, ID_at_enc, dst_enc);
rb_ivar_set       475 ext/tk/tkutil/tkutil.c             rb_ivar_set(val, ID_at_enc, rb_str_new2("utf-8"));
rb_ivar_set      1152 ext/tk/tkutil/tkutil.c         rb_ivar_set(self, inf->ivar[idx], argv[idx]);
rb_ivar_set      3711 ext/win32ole/win32ole.c     rb_ivar_set(self, rb_intern("name"), name);
rb_ivar_set      3766 ext/win32ole/win32ole.c     rb_ivar_set(self, rb_intern("name"), typelib);
rb_ivar_set      3767 ext/win32ole/win32ole.c     rb_ivar_set(self, rb_intern("guid"), guid);
rb_ivar_set      3768 ext/win32ole/win32ole.c     rb_ivar_set(self, rb_intern("version"), version);
rb_ivar_set      4756 ext/win32ole/win32ole.c         rb_ivar_set(var, rb_intern("name"), WC2VSTR(bstr));
rb_ivar_set      5152 ext/win32ole/win32ole.c     rb_ivar_set(self, rb_intern("name"), name);
rb_ivar_set      5861 ext/win32ole/win32ole.c             rb_ivar_set(param, rb_intern("name"), WC2VSTR(bstrs[i]));
rb_ivar_set      6780 ext/win32ole/win32ole.c         rb_ivar_set(obj, id_events, events);
rb_ivar_set       546 intern.h       VALUE rb_ivar_set(VALUE, ID, VALUE);
rb_ivar_set       905 marshal.c      	    rb_ivar_set(obj, id, val);
rb_ivar_set      1857 object.c           return rb_ivar_set(obj, id, val);
rb_ivar_set        19 range.c        #define SET_EXCL(r,v) rb_ivar_set((r), id_excl, (v) ? Qtrue : Qfalse)
rb_ivar_set        50 range.c            rb_ivar_set(range, id_beg, beg);
rb_ivar_set        51 range.c            rb_ivar_set(range, id_end, end);
rb_ivar_set       200 variable.c     	rb_ivar_set(klass, tmp_classpath, path);
rb_ivar_set       219 variable.c         rb_ivar_set(klass, classpath, str);
rb_ivar_set      1696 variable.c         return rb_ivar_set(obj, id, val);


rb_jmpbuf_t

rb_jmpbuf_t        90 eval.c         NORETURN(static void rb_jump_context(rb_jmpbuf_t, int));
rb_jmpbuf_t        93 eval.c             rb_jmpbuf_t env;
rb_jmpbuf_t       890 eval.c             rb_jmpbuf_t buf;
rb_jmpbuf_t      9692 eval.c             rb_jmpbuf_t context;


rb_jump_tag

rb_jump_tag      1372 dir.c              if (status) rb_jump_tag(status);
rb_jump_tag      1490 dir.c          	if (status) rb_jump_tag(status);
rb_jump_tag      1514 dir.c          	if (status) rb_jump_tag(status);
rb_jump_tag      10587 eval.c         		    rb_jump_tag(status);
rb_jump_tag       382 ext/dbm/dbm.c      if (status) rb_jump_tag(status);
rb_jump_tag       468 ext/gdbm/gdbm.c     if (status) rb_jump_tag(status);
rb_jump_tag       723 ext/iconv/iconv.c     if (state) rb_jump_tag(state);
rb_jump_tag        88 ext/openssl/ossl.c     if(status) rb_jump_tag(status);
rb_jump_tag       136 ext/openssl/ossl.c     if(status) rb_jump_tag(status);
rb_jump_tag       333 ext/openssl/ossl_asn1.c     if(status) rb_jump_tag(status);
rb_jump_tag       378 ext/openssl/ossl_asn1.c     if(status) rb_jump_tag(status);
rb_jump_tag       440 ext/openssl/ossl_asn1.c     if(status) rb_jump_tag(status);
rb_jump_tag        83 ext/openssl/ossl_bio.c     if(status) rb_jump_tag(status);
rb_jump_tag       509 ext/openssl/ossl_ocsp.c     if(rstatus) rb_jump_tag(rstatus);
rb_jump_tag       115 ext/openssl/ossl_pkcs12.c     if(st) rb_jump_tag(st);
rb_jump_tag       212 ext/openssl/ossl_pkcs7.c 	    rb_jump_tag(status);
rb_jump_tag       261 ext/openssl/ossl_pkcs7.c 	rb_jump_tag(status);
rb_jump_tag       658 ext/openssl/ossl_pkcs7.c 	    rb_jump_tag(status);
rb_jump_tag        83 ext/readline/readline.c         rb_jump_tag(status);
rb_jump_tag       360 ext/sdbm/init.c     if (status) rb_jump_tag(status);
rb_jump_tag      1498 ext/socket/socket.c 	    rb_jump_tag(prot);
rb_jump_tag       778 ext/tk/tcltklib.c                 rb_jump_tag(TAG_RETRY);
rb_jump_tag       781 ext/tk/tcltklib.c                 rb_jump_tag(TAG_REDO);
rb_jump_tag       784 ext/tk/tcltklib.c                 rb_jump_tag(TAG_THROW);
rb_jump_tag       818 ext/tk/tcltklib.c                 rb_jump_tag(TAG_RETRY);
rb_jump_tag       821 ext/tk/tcltklib.c                 rb_jump_tag(TAG_REDO);
rb_jump_tag       824 ext/tk/tcltklib.c                 rb_jump_tag(TAG_THROW);
rb_jump_tag      4896 io.c           	rb_jump_tag(state);
rb_jump_tag      4904 io.c           	rb_jump_tag(state);
rb_jump_tag      1344 process.c      	    if (state && !status) rb_jump_tag(state);
rb_jump_tag       374 ruby.c         	if (state) rb_jump_tag(state);
rb_jump_tag      3450 win32/win32.c  	rb_jump_tag(status);


rb_lastline_get

rb_lastline_get  10149 eval.c             tval = rb_lastline_get();
rb_lastline_get  10244 eval.c             tval = rb_lastline_get();
rb_lastline_get   402 intern.h       VALUE rb_lastline_get(void);
rb_lastline_get  3545 io.c           	line = rb_lastline_get();
rb_lastline_get  5495 io.c               rb_define_virtual_variable("$_", rb_lastline_get, rb_lastline_set);
rb_lastline_get  1557 re.c               VALUE line = rb_lastline_get();


rb_lastline_set

rb_lastline_set  10150 eval.c             rb_lastline_set(th->last_line);
rb_lastline_set  10245 eval.c             rb_lastline_set(tmp->last_line);
rb_lastline_set   913 ext/stringio/stringio.c     rb_lastline_set(str);
rb_lastline_set  3274 ext/zlib/zlib.c 	rb_lastline_set(dst);
rb_lastline_set   403 intern.h       void rb_lastline_set(VALUE);
rb_lastline_set  1649 io.c               rb_lastline_set(str);
rb_lastline_set  4271 io.c               rb_lastline_set(line);
rb_lastline_set  4292 io.c               rb_lastline_set(line);
rb_lastline_set  5495 io.c               rb_define_virtual_variable("$_", rb_lastline_get, rb_lastline_set);


rb_ll2inum

rb_ll2inum         89 intern.h       VALUE rb_ll2inum(LONG_LONG);
rb_ll2inum        162 ruby.h         VALUE rb_ll2inum(LONG_LONG);
rb_ll2inum        163 ruby.h         #define LL2NUM(v) rb_ll2inum(v)


rb_load

rb_load          6643 eval.c         	rb_load(fname, wrap);
rb_load          6673 eval.c             rb_load(fname, RTEST(wrap));
rb_load          6941 eval.c         		    rb_load(path, 0);
rb_load           230 intern.h       void rb_load(VALUE, int);


rb_load_fail

rb_load_fail      854 ruby.c             if (!fname) rb_load_fail(fname);
rb_load_fail      862 ruby.c         	    rb_load_fail(fname);


rb_load_file

rb_load_file     6600 eval.c         	rb_load_file(RSTRING(fname)->ptr);
rb_load_file      446 intern.h       void rb_load_file(const char*);


rb_loaderror

rb_loaderror     1255 dln.c              rb_loaderror(errbuf);
rb_loaderror     1280 dln.c              if (strlen(file) >= MAXPATHLEN) rb_loaderror("filename too long");
rb_loaderror     1294 dln.c          	rb_loaderror("%s - %s\n%s", dln_strerror(), buf, file);
rb_loaderror     1359 dln.c          	    rb_loaderror("%s - %s", strerror(errno), file);
rb_loaderror     1366 dln.c          		rb_loaderror("%s - %s", strerror(ENOSYM), file);
rb_loaderror     1419 dln.c          	    rb_loaderror("Failed to load %.200s", file);
rb_loaderror     1426 dln.c          	    rb_loaderror("Failed to lookup Init function %.200s", file);
rb_loaderror     1451 dln.c          	    rb_loaderror("Failed to load %.200s", file);
rb_loaderror     1458 dln.c          	    rb_loaderror("Failed to lookup Init function %.200s",file);
rb_loaderror     1478 dln.c          	rb_loaderror("Failed to load %.200s", file);
rb_loaderror     1501 dln.c          	rb_loaderror("Failed to lookup Init function %.200s", file);
rb_loaderror     1506 dln.c          	rb_loaderror(errmsg, strerror(err_stat), buf);
rb_loaderror     1537 dln.c          	  rb_loaderror("Unresolved Alias - %s", file);
rb_loaderror     1547 dln.c          	  rb_loaderror("%s - %s",errMessage , file);
rb_loaderror     1554 dln.c          	  rb_loaderror("Unresolved symbols - %s" , file);
rb_loaderror     1599 dln.c              rb_loaderror("%s - %s", error, file);
rb_loaderror     1083 error.c            rb_loaderror("%s -- %s", strerror(errno), path);


rb_longjmp

rb_longjmp       4406 eval.c             rb_longjmp(TAG_RAISE, mesg);
rb_longjmp       4412 eval.c             rb_longjmp(TAG_FATAL, mesg);
rb_longjmp       4503 eval.c         	rb_longjmp(TAG_RAISE, mesg);
rb_longjmp       4506 eval.c             rb_longjmp(TAG_RAISE, mesg);


rb_make_exception

rb_make_exception  218 eval.c         static VALUE rb_make_exception(int argc, VALUE *argv);
rb_make_exception 4448 eval.c             rb_raise_jump(rb_make_exception(argc, argv));
rb_make_exception 12266 eval.c             exc = rb_make_exception(argc, argv);


rb_make_metaclass

rb_make_metaclass  181 class.c            rb_make_metaclass(klass, RBASIC(super)->klass);
rb_make_metaclass  787 class.c        	klass = rb_make_metaclass(obj, RBASIC(obj)->klass);
rb_make_metaclass  118 intern.h       VALUE rb_make_metaclass(VALUE, VALUE);
rb_make_metaclass 1395 object.c           rb_make_metaclass(klass, RBASIC(super)->klass);
rb_make_metaclass 2374 object.c           metaclass = rb_make_metaclass(rb_cObject, rb_cClass);
rb_make_metaclass 2375 object.c           metaclass = rb_make_metaclass(rb_cModule, metaclass);
rb_make_metaclass 2376 object.c           metaclass = rb_make_metaclass(rb_cClass, metaclass);
rb_make_metaclass  178 struct.c       	rb_make_metaclass(nstr, RBASIC(klass)->klass);


rb_mark_end_proc

rb_mark_end_proc 1333 gc.c               rb_mark_end_proc();
rb_mark_end_proc  250 intern.h       void rb_mark_end_proc(void);


rb_mark_generic_ivar

rb_mark_generic_ivar  731 gc.c           	rb_mark_generic_ivar(ptr);
rb_mark_generic_ivar  542 intern.h       void rb_mark_generic_ivar(VALUE);


rb_mark_generic_ivar_tbl

rb_mark_generic_ivar_tbl 1340 gc.c               rb_mark_generic_ivar_tbl();
rb_mark_generic_ivar_tbl  543 intern.h       void rb_mark_generic_ivar_tbl(void);


rb_mark_hash

rb_mark_hash     6919 ext/win32ole/win32ole.c     com_hash = Data_Wrap_Struct(rb_cData, rb_mark_hash, st_free_table, st_init_numtable());
rb_mark_hash      303 intern.h       void rb_mark_hash(struct st_table*);


rb_mark_tbl

rb_mark_tbl      9945 eval.c             rb_mark_tbl(th->locals);
rb_mark_tbl      1336 gc.c               rb_mark_tbl(rb_class_tbl);
rb_mark_tbl       302 intern.h       void rb_mark_tbl(struct st_table*);
rb_mark_tbl       855 variable.c     	rb_mark_tbl(tbl);
rb_mark_tbl      1156 variable.c         if (RDATA(av)->dmark != (RUBY_DATA_FUNC)rb_mark_tbl ||
rb_mark_tbl      1185 variable.c     	av = Data_Wrap_Struct(0, rb_mark_tbl, st_free_table, 0);


rb_match_busy

rb_match_busy    1606 re.c               rb_match_busy(result);
rb_match_busy    2146 re.c               rb_match_busy(match);
rb_match_busy      35 re.h           void rb_match_busy(VALUE);
rb_match_busy    1844 string.c       	    rb_match_busy(match);
rb_match_busy    1959 string.c       	    rb_match_busy(match);
rb_match_busy    3859 string.c       	rb_match_busy(match);


rb_mem_clear

rb_mem_clear      415 array.c        	rb_mem_clear(RARRAY(ary)->ptr + RARRAY(ary)->len,
rb_mem_clear     1000 array.c        	rb_mem_clear(RARRAY(ary)->ptr + RARRAY(ary)->len, beg - RARRAY(ary)->len);
rb_mem_clear     2140 array.c        	rb_mem_clear(RARRAY(ary)->ptr + RARRAY(ary)->len, end - RARRAY(ary)->len);
rb_mem_clear     3364 eval.c         		rb_mem_clear(ruby_scope->local_vars, node->nd_tbl[0]);
rb_mem_clear     3980 eval.c         	rb_mem_clear(ruby_scope->local_vars, node->nd_tbl[0]);
rb_mem_clear     5686 eval.c         		rb_mem_clear(local_vars, body->nd_tbl[0]);
rb_mem_clear       32 intern.h       void rb_mem_clear(register VALUE*, register long);
rb_mem_clear     8104 parse.y        		    rb_mem_clear(vars+i, len-i);
rb_mem_clear     8108 parse.y        		    rb_mem_clear(vars, len);
rb_mem_clear     8117 parse.y        		rb_mem_clear(ruby_scope->local_vars+i, len-i);
rb_mem_clear      320 struct.c       	rb_mem_clear(RSTRUCT(self)->ptr+RARRAY(values)->len,
rb_mem_clear      338 struct.c           rb_mem_clear(st->ptr, n);


rb_memcicmp

rb_memcicmp      1455 file.c             if (rb_memcicmp(RSTRING(fname1)->ptr, RSTRING(fname2)->ptr, RSTRING(fname1)->len))
rb_memcicmp       428 intern.h       int rb_memcicmp(char*,char*,long);
rb_memcicmp        96 re.c               return rb_memcicmp(p1, p2, len);
rb_memcicmp       121 re.c           	    return rb_memcicmp(x, s, m) == 0 ? 0 : -1;
rb_memcicmp       129 re.c           	while (hx != hy || rb_memcicmp(x, s, m)) {
rb_memcicmp       956 string.c           retval = rb_memcicmp(RSTRING(str1)->ptr, RSTRING(str2)->ptr, len);


rb_memcmp

rb_memcmp         427 intern.h       int rb_memcmp(char*,char*,long);
rb_memcmp         826 string.c           retval = rb_memcmp(RSTRING(str1)->ptr, RSTRING(str2)->ptr, len);
rb_memcmp        1080 string.c       	    if (rb_memcmp(s, t, len) == 0) {
rb_memcmp        3418 string.c       	     rb_memcmp(RSTRING(rs)->ptr, p-rslen, rslen) == 0)) {
rb_memcmp        3586 string.c       	 rb_memcmp(RSTRING(rs)->ptr, p+len-rslen, rslen) == 0)) {


rb_memerror

rb_memerror       140 dln.c          	rb_memerror();\
rb_memerror      10109 eval.c         	if (!ptr) rb_memerror();
rb_memerror      10122 eval.c                 if (!ptr) rb_memerror();
rb_memerror       117 gc.c           	    rb_memerror();
rb_memerror       163 gc.c           	    rb_memerror();
rb_memerror       351 gc.c           	if (p == 0) rb_memerror();
rb_memerror       359 gc.c           		rb_memerror();
rb_memerror       387 gc.c           	rb_memerror();


rb_memsearch

rb_memsearch      429 intern.h       long rb_memsearch(char*,long,char*,long);
rb_memsearch      978 string.c           pos = rb_memsearch(RSTRING(sub)->ptr, RSTRING(sub)->len,


rb_method_boundp

rb_method_boundp 2203 eval.c         	if (rb_method_boundp(RCLASS(val)->super, ruby_frame->this_func, 0)) {
rb_method_boundp 2240 eval.c         	    else if (!rb_method_boundp(val, node->nd_mid, call))
rb_method_boundp 2324 eval.c         	    if (rb_method_boundp(CLASS_OF(val), node->nd_mid, 1)) {
rb_method_boundp 4017 eval.c         	return rb_method_boundp(klass, id, !priv);
rb_method_boundp 4051 eval.c             if (rb_method_boundp(CLASS_OF(obj), id, !RTEST(priv))) {
rb_method_boundp 4086 eval.c             return rb_method_boundp(mod, rb_to_id(mid), 1);
rb_method_boundp  214 intern.h       int rb_method_boundp(VALUE, ID, int);


rb_method_call

rb_method_call     44 enumerator.c       return rb_method_call(argc, argv, method);
rb_method_call   9202 eval.c             ret = rb_method_call(RARRAY(a)->len, RARRAY(a)->ptr, method);
rb_method_call   9419 eval.c             rb_define_method(rb_cMethod, "call", rb_method_call, -1);
rb_method_call   9420 eval.c             rb_define_method(rb_cMethod, "[]", rb_method_call, -1);
rb_method_call    245 intern.h       VALUE rb_method_call(int, VALUE*, VALUE);


rb_method_missing

rb_method_missing 5405 eval.c         	rb_method_missing(argc, argv, obj);
rb_method_missing 7633 eval.c             rb_define_global_function("method_missing", rb_method_missing, -1);


rb_method_node

rb_method_node   4016 eval.c             if (rb_method_node(klass, respond_to) == basic_respond_to) {
rb_method_node   7639 eval.c             basic_respond_to = rb_method_node(rb_cObject, respond_to);
rb_method_node   9113 eval.c             NODE *node = rb_method_node(mod, id);
rb_method_node    367 node.h         NODE* rb_method_node(VALUE klass, ID id);


rb_mod_ancestors

rb_mod_ancestors  126 intern.h       VALUE rb_mod_ancestors(VALUE);
rb_mod_ancestors 2483 object.c           rb_define_method(rb_cModule, "ancestors", rb_mod_ancestors, 0); /* in class.c */


rb_mod_autoload

rb_mod_autoload  7762 eval.c             return rb_mod_autoload(ruby_cbase, sym, file);
rb_mod_autoload  7797 eval.c             rb_define_method(rb_cModule, "autoload",  rb_mod_autoload,   2);


rb_mod_autoload_p

rb_mod_autoload_p 7780 eval.c             return rb_mod_autoload_p(ruby_cbase, sym);
rb_mod_autoload_p 7798 eval.c             rb_define_method(rb_cModule, "autoload?", rb_mod_autoload_p, 1);


rb_mod_class_variables

rb_mod_class_variables  574 intern.h       VALUE rb_mod_class_variables(VALUE);
rb_mod_class_variables 2509 object.c       		     rb_mod_class_variables, 0); /* in variable.c */


rb_mod_const_at

rb_mod_const_at  1876 eval.c         	    data = rb_mod_const_at(cbase->nd_clss, data);
rb_mod_const_at   553 intern.h       void *rb_mod_const_at(VALUE, void*);
rb_mod_const_at  1394 variable.c     	data = rb_mod_const_at(tmp, data);


rb_mod_const_missing

rb_mod_const_missing  566 intern.h       VALUE rb_mod_const_missing(VALUE,VALUE);
rb_mod_const_missing 2507 object.c       		     rb_mod_const_missing, 1); /* in variable.c */


rb_mod_const_of

rb_mod_const_of  1882 eval.c         	data = rb_mod_const_of(ruby_cbase, data);
rb_mod_const_of   554 intern.h       void *rb_mod_const_of(VALUE, void*);
rb_mod_const_of  1435 variable.c         return rb_const_list(rb_mod_const_of(mod, 0));


rb_mod_constants

rb_mod_constants  556 intern.h       VALUE rb_mod_constants(VALUE);
rb_mod_constants  565 intern.h       VALUE rb_mod_constants(VALUE);
rb_mod_constants 2500 object.c           rb_define_method(rb_cModule, "constants", rb_mod_constants, 0); /* in variable.c */


rb_mod_define_method

rb_mod_define_method  216 eval.c         static VALUE rb_mod_define_method(int, VALUE*, VALUE);
rb_mod_define_method 7685 eval.c             rb_define_private_method(rb_cModule, "define_method", rb_mod_define_method, -1);


rb_mod_ge

rb_mod_ge        1287 object.c           return rb_mod_ge(mod, arg);
rb_mod_ge        2477 object.c           rb_define_method(rb_cModule, ">=", rb_mod_ge, 1);


rb_mod_include

rb_mod_include   7375 eval.c         	return rb_mod_include(argc, argv, ruby_wrapper);
rb_mod_include   7377 eval.c             return rb_mod_include(argc, argv, rb_cObject);
rb_mod_include   7664 eval.c             rb_define_private_method(rb_cModule, "include", rb_mod_include, -1);


rb_mod_include_p

rb_mod_include_p  125 intern.h       VALUE rb_mod_include_p(VALUE, VALUE);
rb_mod_include_p 2481 object.c           rb_define_method(rb_cModule, "include?", rb_mod_include_p, 1); /* in class.c */


rb_mod_included_modules

rb_mod_included_modules  124 intern.h       VALUE rb_mod_included_modules(VALUE);
rb_mod_included_modules 2480 object.c           rb_define_method(rb_cModule, "included_modules", rb_mod_included_modules, 0); /* in class.c */


rb_mod_init_copy

rb_mod_init_copy  103 class.c            return rb_mod_init_copy(clone, orig);
rb_mod_init_copy  114 intern.h       VALUE rb_mod_init_copy(VALUE, VALUE);
rb_mod_init_copy 2478 object.c           rb_define_method(rb_cModule, "initialize_copy", rb_mod_init_copy, 1); /* in class.c */


rb_mod_initialize

rb_mod_initialize 1397 object.c           rb_mod_initialize(klass);
rb_mod_initialize 2491 object.c           rb_define_method(rb_cModule, "initialize", rb_mod_initialize, 0);


rb_mod_method_arity

rb_mod_method_arity 9120 eval.c             return rb_mod_method_arity(CLASS_OF(obj), id);
rb_mod_method_arity  246 intern.h       int rb_mod_method_arity(VALUE, ID);


rb_mod_module_eval

rb_mod_module_eval 7675 eval.c             rb_define_method(rb_cModule, "module_eval", rb_mod_module_eval, -1);
rb_mod_module_eval 7676 eval.c             rb_define_method(rb_cModule, "class_eval", rb_mod_module_eval, -1);
rb_mod_module_eval  229 intern.h       VALUE rb_mod_module_eval(int, VALUE*, VALUE);
rb_mod_module_eval 1365 object.c       	rb_mod_module_eval(0, 0, module);
rb_mod_module_eval  296 struct.c       	rb_mod_module_eval(0, 0, st);


rb_mod_module_exec

rb_mod_module_exec 7677 eval.c             rb_define_method(rb_cModule, "module_exec", rb_mod_module_exec, -1);
rb_mod_module_exec 7678 eval.c             rb_define_method(rb_cModule, "class_exec", rb_mod_module_exec, -1);


rb_mod_name

rb_mod_name       526 intern.h       VALUE rb_mod_name(VALUE);
rb_mod_name      2482 object.c           rb_define_method(rb_cModule, "name", rb_mod_name, 0);  /* in variable.c */


rb_mod_private

rb_mod_private   7143 eval.c             return rb_mod_private(argc, argv, rb_cObject);
rb_mod_private   7667 eval.c             rb_define_private_method(rb_cModule, "private", rb_mod_private, -1);


rb_mod_public

rb_mod_public    7137 eval.c             return rb_mod_public(argc, argv, rb_cObject);
rb_mod_public    7665 eval.c             rb_define_private_method(rb_cModule, "public", rb_mod_public, -1);


rb_mod_remove_const

rb_mod_remove_const  557 intern.h       VALUE rb_mod_remove_const(VALUE, VALUE);
rb_mod_remove_const 2505 object.c       			     rb_mod_remove_const, 1); /* in variable.c */
rb_mod_remove_const  190 struct.c       	    rb_mod_remove_const(klass, ID2SYM(id));


rb_mod_remove_cvar

rb_mod_remove_cvar  575 intern.h       VALUE rb_mod_remove_cvar(VALUE, VALUE);
rb_mod_remove_cvar 2511 object.c       		     rb_mod_remove_cvar, 1); /* in variable.c */


rb_mod_to_s

rb_mod_to_s      1168 object.c           rb_mod_to_s(mod);
rb_mod_to_s      2479 object.c           rb_define_method(rb_cModule, "to_s", rb_mod_to_s, 0);


rb_module_new

rb_module_new     270 class.c            mdl = rb_module_new();
rb_module_new    1598 eval.c             PUSH_CLASS(ruby_wrapper = rb_module_new());
rb_module_new    6569 eval.c         	ruby_class = ruby_wrapper = rb_module_new();
rb_module_new     122 intern.h       VALUE rb_module_new(void);
rb_module_new    1326 object.c           VALUE mod = rb_module_new();


rb_name_class

rb_name_class     215 class.c            rb_name_class(klass, id);
rb_name_class     271 class.c            rb_name_class(mdl, id);
rb_name_class     530 intern.h       void rb_name_class(VALUE, ID);
rb_name_class    2283 object.c           rb_name_class(obj, id);


rb_name_error

rb_name_error     206 class.c        	    rb_name_error(id, "%s is already defined", name);
rb_name_error     235 class.c        	    rb_name_error(id, "%s is already defined", name);
rb_name_error     291 eval.c             rb_name_error(id, "undefined method `%s' for %s `%s'",
rb_name_error     533 eval.c         	rb_name_error(mid, "method `%s' not defined in %s",
rb_name_error     659 eval.c         	rb_name_error(id, "invalid attribute name `%s'", rb_id2name(id));
rb_name_error    1942 eval.c         	rb_name_error(id, "undefined method `%s' for%s `%s'",
rb_name_error    3310 eval.c         		    rb_name_error(ruby_frame->callee,
rb_name_error    5937 eval.c         	rb_name_error(ruby_frame->callee, "calling `super' from `%s' is prohibited",
rb_name_error    13001 eval.c         	rb_name_error(SYM2ID(tag), "uncaught throw `%s'", rb_id2name(SYM2ID(tag)));
rb_name_error    1644 object.c       	rb_name_error(id, "wrong constant name %s", rb_id2name(id));
rb_name_error    1667 object.c       	rb_name_error(id, "wrong constant name %s", rb_id2name(id));
rb_name_error    1689 object.c       	rb_name_error(id, "wrong constant name %s", rb_id2name(id));
rb_name_error    1823 object.c       	rb_name_error(id, "`%s' is not allowed as an instance variable name", rb_id2name(id));
rb_name_error    1855 object.c       	rb_name_error(id, "`%s' is not allowed as an instance variable name", rb_id2name(id));
rb_name_error    1880 object.c       	rb_name_error(id, "`%s' is not allowed as an class variable name", rb_id2name(id));
rb_name_error    1909 object.c       	rb_name_error(id, "`%s' is not allowed as an class variable name", rb_id2name(id));
rb_name_error      80 range.c        	rb_name_error(rb_intern("initialize"), "`initialize' called twice");
rb_name_error     105 struct.c           rb_name_error(id, "%s is not struct member", rb_id2name(id));
rb_name_error     163 struct.c           rb_name_error(rb_frame_this_func(), "`%s' is not a struct member",
rb_name_error     186 struct.c       	    rb_name_error(id, "identifier %s needs to be constant", cname);
rb_name_error     531 struct.c           rb_name_error(id, "no member '%s' in struct", rb_id2name(id));
rb_name_error     593 struct.c           rb_name_error(id, "no member '%s' in struct", rb_id2name(id));
rb_name_error     406 variable.c         rb_name_error(id, "%s is a read-only variable", rb_id2name(id));
rb_name_error     587 variable.c     	rb_name_error(id, "undefined global variable %s", rb_id2name(id));
rb_name_error    1073 variable.c     	rb_name_error(id, "`%s' is not allowed as an instance variable name", rb_id2name(id));
rb_name_error    1092 variable.c         rb_name_error(id, "instance variable %s not defined", rb_id2name(id));
rb_name_error    1101 variable.c     	rb_name_error(id, "uninitialized constant %s::%s",
rb_name_error    1105 variable.c     	rb_name_error(id, "uninitialized constant %s", rb_id2name(id));
rb_name_error    1343 variable.c     	rb_name_error(id, "`%s' is not allowed as a constant name", rb_id2name(id));
rb_name_error    1357 variable.c     	rb_name_error(id, "cannot remove %s::%s",
rb_name_error    1360 variable.c         rb_name_error(id, "constant %s::%s not defined",
rb_name_error    1554 variable.c         rb_name_error(id,"uninitialized class variable %s in %s",
rb_name_error    1573 variable.c     	rb_name_error(id, "wrong class variable name %s", name);
rb_name_error    1583 variable.c     	rb_name_error(id, "wrong class variable name %s", name);
rb_name_error    1594 variable.c     	rb_name_error(id, "wrong class variable name %s", name);
rb_name_error    1665 variable.c     	rb_name_error(id, "wrong class variable name %s", rb_id2name(id));
rb_name_error    1675 variable.c     	rb_name_error(id, "cannot remove %s for %s",
rb_name_error    1678 variable.c         rb_name_error(id, "class variable %s not defined for %s",


rb_need_block

rb_need_block    4663 eval.c             rb_need_block();
rb_need_block     576 ruby.h         void rb_need_block(void);


rb_newobj

rb_newobj        6880 parse.y            NODE *n = (NODE*)rb_newobj();
rb_newobj         310 ruby.h         VALUE rb_newobj(void);
rb_newobj         311 ruby.h         #define NEWOBJ(obj,type) type *obj = (type*)rb_newobj()


rb_nkf_guess2

rb_nkf_guess2     272 ext/nkf/nkf.c    rb_define_module_function(mKconv, "guess", rb_nkf_guess2, 1);
rb_nkf_guess2     274 ext/nkf/nkf.c    rb_define_module_function(mKconv, "guess2", rb_nkf_guess2, 1);


rb_node_arity

rb_node_arity    9107 eval.c             return rb_node_arity(data->body);
rb_node_arity    9114 eval.c             return rb_node_arity(node);
rb_node_arity     368 node.h         int rb_node_arity(NODE* node);


rb_node_newnode

rb_node_newnode   430 enum.c             memo = rb_node_newnode(NODE_MEMO, v, i, 0);
rb_node_newnode  1306 eval.c         	top_cref = rb_node_newnode(NODE_CREF,rb_cObject,0,0);
rb_node_newnode  5227 eval.c             cont_protect = (VALUE)rb_node_newnode(NODE_MEMO, cont_protect, 0, 0);
rb_node_newnode   239 node.h         #define NEW_NODE(t,a0,a1,a2) rb_node_newnode((t),(VALUE)(a0),(VALUE)(a1),(VALUE)(a2))
rb_node_newnode   365 node.h         NODE *rb_node_newnode(enum node_type,VALUE,VALUE,VALUE);
rb_node_newnode  5142 parse.y        	rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0)
rb_node_newnode  5267 parse.y            lex_strterm = rb_node_newnode(NODE_HEREDOC,
rb_node_newnode  8772 parse.y        #define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parserp->heap, 0)
rb_node_newnode  1192 variable.c         st_insert(tbl, id, (st_data_t)rb_node_newnode(NODE_MEMO, fn, ruby_safe_level, 0));


rb_notimplement

rb_notimplement   580 dir.c              rb_notimplement();
rb_notimplement   609 dir.c              rb_notimplement();
rb_notimplement   849 dir.c              rb_notimplement();
rb_notimplement  1592 dln.c              rb_notimplement();
rb_notimplement   175 ext/curses/curses.c     rb_notimplement();
rb_notimplement   336 ext/curses/curses.c     rb_notimplement();
rb_notimplement   734 ext/curses/curses.c     rb_notimplement();
rb_notimplement   744 ext/curses/curses.c     rb_notimplement();
rb_notimplement   754 ext/curses/curses.c     rb_notimplement();
rb_notimplement  1404 ext/curses/curses.c     rb_notimplement();
rb_notimplement  1423 ext/curses/curses.c     rb_notimplement();
rb_notimplement  1437 ext/curses/curses.c     rb_notimplement();
rb_notimplement    50 ext/digest/digest.c 	rb_notimplement();
rb_notimplement   481 ext/iconv/iconv.c 		rb_notimplement();
rb_notimplement   489 ext/iconv/iconv.c 		rb_notimplement();
rb_notimplement   500 ext/iconv/iconv.c 		rb_notimplement();
rb_notimplement   508 ext/iconv/iconv.c 		rb_notimplement();
rb_notimplement   726 ext/iconv/iconv.c     rb_notimplement();
rb_notimplement   848 ext/iconv/iconv.c     rb_notimplement();
rb_notimplement   867 ext/iconv/iconv.c     rb_notimplement();
rb_notimplement   885 ext/iconv/iconv.c     rb_notimplement();
rb_notimplement   904 ext/iconv/iconv.c     rb_notimplement();
rb_notimplement   922 ext/iconv/iconv.c     rb_notimplement();
rb_notimplement   326 ext/openssl/ossl_cipher.c     rb_notimplement();
rb_notimplement   165 ext/openssl/ossl_config.c     rb_notimplement();
rb_notimplement   188 ext/openssl/ossl_engine.c     rb_notimplement();
rb_notimplement   211 ext/openssl/ossl_engine.c     rb_notimplement();
rb_notimplement   179 ext/openssl/ossl_x509ext.c     rb_notimplement();
rb_notimplement   235 ext/readline/readline.c     rb_notimplement();
rb_notimplement   249 ext/readline/readline.c     rb_notimplement();
rb_notimplement   273 ext/readline/readline.c     rb_notimplement();
rb_notimplement   293 ext/readline/readline.c     rb_notimplement();
rb_notimplement   320 ext/readline/readline.c     rb_notimplement();
rb_notimplement   335 ext/readline/readline.c     rb_notimplement();
rb_notimplement   362 ext/readline/readline.c     rb_notimplement();
rb_notimplement   377 ext/readline/readline.c     rb_notimplement();
rb_notimplement   405 ext/readline/readline.c     rb_notimplement();
rb_notimplement   420 ext/readline/readline.c     rb_notimplement();
rb_notimplement   448 ext/readline/readline.c     rb_notimplement();
rb_notimplement   463 ext/readline/readline.c     rb_notimplement();
rb_notimplement   491 ext/readline/readline.c     rb_notimplement();
rb_notimplement   506 ext/readline/readline.c     rb_notimplement();
rb_notimplement   560 ext/readline/readline.c     rb_notimplement();
rb_notimplement   611 ext/readline/readline.c     rb_notimplement();
rb_notimplement   444 ext/socket/socket.c     rb_notimplement();
rb_notimplement  1803 ext/socket/socket.c     rb_notimplement();
rb_notimplement  1911 ext/socket/socket.c     rb_notimplement();
rb_notimplement  2115 ext/socket/socket.c     rb_notimplement();
rb_notimplement  2665 ext/socket/socket.c     rb_notimplement();
rb_notimplement   334 ext/stringio/stringio.c     rb_notimplement();
rb_notimplement  5065 ext/tk/tcltklib.c     rb_notimplement();
rb_notimplement  1788 file.c             rb_notimplement();
rb_notimplement  1933 file.c             rb_notimplement();
rb_notimplement  2050 file.c             rb_notimplement();
rb_notimplement  2080 file.c             rb_notimplement();
rb_notimplement  2125 file.c             rb_notimplement();
rb_notimplement  2980 file.c             rb_notimplement();
rb_notimplement  3021 file.c             rb_notimplement();
rb_notimplement  1028 io.c               rb_notimplement();
rb_notimplement  4585 io.c           	rb_notimplement();
rb_notimplement  4665 io.c               rb_notimplement();
rb_notimplement  4714 io.c               rb_notimplement();
rb_notimplement  4832 io.c               rb_notimplement();
rb_notimplement  4910 io.c               rb_notimplement();
rb_notimplement    97 missing/flock.c         rb_notimplement();
rb_notimplement   105 missing/flock.c         rb_notimplement();
rb_notimplement   125 missing/flock.c     rb_notimplement();
rb_notimplement  1439 process.c          rb_notimplement();
rb_notimplement  1693 process.c          rb_notimplement();
rb_notimplement  1720 process.c          rb_notimplement();
rb_notimplement  1747 process.c          rb_notimplement();
rb_notimplement  1773 process.c          rb_notimplement();
rb_notimplement  1821 process.c          rb_notimplement();
rb_notimplement  1858 process.c          rb_notimplement();
rb_notimplement  1890 process.c          rb_notimplement();
rb_notimplement  1937 process.c          rb_notimplement();
rb_notimplement  1999 process.c          rb_notimplement();
rb_notimplement  2051 process.c          rb_notimplement();
rb_notimplement  2074 process.c          rb_notimplement();
rb_notimplement  2096 process.c          rb_notimplement();
rb_notimplement  2120 process.c          rb_notimplement();
rb_notimplement  2144 process.c          rb_notimplement();
rb_notimplement  2195 process.c      	    rb_notimplement();
rb_notimplement  2199 process.c          rb_notimplement();
rb_notimplement  2292 process.c      	rb_notimplement();
rb_notimplement  2363 process.c      	rb_notimplement();
rb_notimplement  2387 process.c          rb_notimplement();
rb_notimplement  2409 process.c          rb_notimplement();
rb_notimplement  2432 process.c          rb_notimplement();
rb_notimplement  2456 process.c          rb_notimplement();
rb_notimplement  2479 process.c          rb_notimplement();
rb_notimplement  2508 process.c          rb_notimplement();
rb_notimplement  2558 process.c      	    rb_notimplement();
rb_notimplement  2562 process.c          rb_notimplement();
rb_notimplement  2603 process.c          rb_notimplement();
rb_notimplement  2667 process.c          rb_notimplement();
rb_notimplement  2699 process.c          rb_notimplement();
rb_notimplement  2793 process.c          rb_notimplement();
rb_notimplement  2885 process.c      	rb_notimplement();
rb_notimplement  2956 process.c      	rb_notimplement();
rb_notimplement  3006 process.c      	rb_notimplement();
rb_notimplement  3009 process.c          rb_notimplement();
rb_notimplement  3043 process.c          rb_notimplement();
rb_notimplement  3116 process.c      	rb_notimplement();
rb_notimplement  3119 process.c          rb_notimplement();
rb_notimplement  3153 process.c          rb_notimplement();
rb_notimplement  3231 process.c          rb_notimplement();
rb_notimplement  3288 process.c          rb_notimplement();
rb_notimplement  3544 process.c          rb_notimplement();
rb_notimplement   562 ruby.h         NORETURN(void rb_notimplement(void));
rb_notimplement  3038 win32/win32.c  		rb_notimplement();


rb_num2dbl

rb_num2dbl       10999 eval.c             if (!NIL_P(limit)) delay = rb_num2dbl(limit);
rb_num2dbl        298 ruby.h         double rb_num2dbl(VALUE);
rb_num2dbl        299 ruby.h         #define NUM2DBL(x) rb_num2dbl((VALUE)(x))


rb_num2fix

rb_num2fix        358 intern.h       VALUE rb_num2fix(VALUE);
rb_num2fix       1771 numeric.c          return rb_num2fix(x);


rb_num2int

rb_num2int        270 ruby.h         long rb_num2int(VALUE);
rb_num2int        271 ruby.h         #define NUM2INT(x) (FIXNUM_P(x)?FIX2INT(x):rb_num2int((VALUE)x))


rb_num2ll

rb_num2ll        1649 numeric.c          return (unsigned LONG_LONG)rb_num2ll(val);
rb_num2ll         286 ruby.h         LONG_LONG rb_num2ll(VALUE);
rb_num2ll         288 ruby.h         # define NUM2LL(x) (FIXNUM_P(x)?FIX2LONG(x):rb_num2ll((VALUE)x))


rb_num2long

rb_num2long      1494 numeric.c          return (unsigned long)rb_num2long(val);
rb_num2long      1529 numeric.c          long num = rb_num2long(val);
rb_num2long      1539 numeric.c          long num = FIXNUM_P(val)?FIX2LONG(val):rb_num2long(val);
rb_num2long      1576 numeric.c          return rb_num2long(val);
rb_num2long      1593 numeric.c          v = rb_num2long(val);
rb_num2long       265 ruby.h         long rb_num2long(VALUE);
rb_num2long       267 ruby.h         #define NUM2LONG(x) (FIXNUM_P(x)?FIX2LONG(x):rb_num2long((VALUE)x))


rb_num2uint

rb_num2uint      1564 numeric.c              return rb_num2uint(val);
rb_num2uint       274 ruby.h         unsigned long rb_num2uint(VALUE);
rb_num2uint       275 ruby.h         #define NUM2UINT(x) rb_num2uint(x)


rb_num2ull

rb_num2ull        287 ruby.h         unsigned LONG_LONG rb_num2ull(VALUE);
rb_num2ull        289 ruby.h         # define NUM2ULL(x) rb_num2ull((VALUE)x)


rb_num2ulong

rb_num2ulong     1549 numeric.c          unsigned long num = rb_num2ulong(val);
rb_num2ulong      266 ruby.h         unsigned long rb_num2ulong(VALUE);
rb_num2ulong      268 ruby.h         #define NUM2ULONG(x) rb_num2ulong((VALUE)x)


rb_num_coerce_bin

rb_num_coerce_bin 1128 bignum.c       	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 1153 bignum.c       	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 1177 bignum.c       	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 1383 bignum.c       	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 1413 bignum.c       	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 1443 bignum.c       	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 1471 bignum.c       	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 1510 bignum.c       	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 1565 bignum.c       	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin   42 ext/bigdecimal/bigdecimal.c #define DoSomeOne(x,y) rb_num_coerce_bin(x,y)
rb_num_coerce_bin  354 intern.h       VALUE rb_num_coerce_bin(VALUE, VALUE);
rb_num_coerce_bin  552 numeric.c      	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin  575 numeric.c      	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin  598 numeric.c      	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin  626 numeric.c      	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin  683 numeric.c      	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin  713 numeric.c      	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin  740 numeric.c              return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 1924 numeric.c      	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 1961 numeric.c      	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 2003 numeric.c      	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 2058 numeric.c      	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 2084 numeric.c      	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 2146 numeric.c      	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 2181 numeric.c      	return rb_num_coerce_bin(x, y);
rb_num_coerce_bin 2219 numeric.c      	return rb_num_coerce_bin(x, y);


rb_num_coerce_cmp

rb_num_coerce_cmp  894 bignum.c       	return rb_num_coerce_cmp(x, y);
rb_num_coerce_cmp  508 ext/bigdecimal/bigdecimal.c     if(!b) return rb_num_coerce_cmp(self,r);
rb_num_coerce_cmp  355 intern.h       VALUE rb_num_coerce_cmp(VALUE, VALUE);
rb_num_coerce_cmp  885 numeric.c      	return rb_num_coerce_cmp(x, y);
rb_num_coerce_cmp 2275 numeric.c      	return rb_num_coerce_cmp(x, y);


rb_num_coerce_relop

rb_num_coerce_relop  356 intern.h       VALUE rb_num_coerce_relop(VALUE, VALUE);
rb_num_coerce_relop  918 numeric.c      	return rb_num_coerce_relop(x, y);
rb_num_coerce_relop  953 numeric.c      	return rb_num_coerce_relop(x, y);
rb_num_coerce_relop  987 numeric.c      	return rb_num_coerce_relop(x, y);
rb_num_coerce_relop 1022 numeric.c      	return rb_num_coerce_relop(x, y);
rb_num_coerce_relop 2302 numeric.c      	return rb_num_coerce_relop(x, y);
rb_num_coerce_relop 2329 numeric.c      	return rb_num_coerce_relop(x, y);
rb_num_coerce_relop 2356 numeric.c      	return rb_num_coerce_relop(x, y);
rb_num_coerce_relop 2383 numeric.c      	return rb_num_coerce_relop(x, y);


rb_num_zerodiv

rb_num_zerodiv   1225 bignum.c           if (BIGZEROP(y)) rb_num_zerodiv();
rb_num_zerodiv    353 intern.h       void rb_num_zerodiv(void);
rb_num_zerodiv   2012 numeric.c          if (y == 0) rb_num_zerodiv();


rb_obj_alloc

rb_obj_alloc     12893 eval.c             thgroup_default = rb_obj_alloc(cThGroup);
rb_obj_alloc      113 ext/curses/curses.c     obj = rb_obj_alloc(class);
rb_obj_alloc      194 ext/gdbm/gdbm.c     str = rb_obj_alloc(rb_cString);
rb_obj_alloc      240 ext/gdbm/gdbm.c     str = rb_obj_alloc(rb_cString);
rb_obj_alloc      264 ext/gdbm/gdbm.c     str = rb_obj_alloc(rb_cString);
rb_obj_alloc      419 ext/pty/pty.c      VALUE rport = rb_obj_alloc(rb_cFile);
rb_obj_alloc      420 ext/pty/pty.c      VALUE wport = rb_obj_alloc(rb_cFile);
rb_obj_alloc      801 ext/readline/readline.c     history = rb_obj_alloc(rb_cObject);
rb_obj_alloc      817 ext/readline/readline.c     fcomp = rb_obj_alloc(rb_cObject);
rb_obj_alloc      822 ext/readline/readline.c     ucomp = rb_obj_alloc(rb_cObject);
rb_obj_alloc      224 ext/socket/socket.c     VALUE sock = init_sock(rb_obj_alloc(klass), NUM2INT(fd));
rb_obj_alloc     1423 ext/socket/socket.c     return init_sock(rb_obj_alloc(klass), fd2);
rb_obj_alloc     2112 ext/socket/socket.c     return rb_assoc_new(init_sock(rb_obj_alloc(klass), sp[0]),
rb_obj_alloc     2113 ext/socket/socket.c 			init_sock(rb_obj_alloc(klass), sp[1]));
rb_obj_alloc     1159 ext/syck/rubyext.c                 obj = rb_obj_alloc( subclass );
rb_obj_alloc     1590 ext/tk/tkutil/tkutil.c     TK_None = rb_obj_alloc(rb_cObject);
rb_obj_alloc     2342 hash.c             envtbl = rb_obj_alloc(rb_cObject);
rb_obj_alloc      367 intern.h       VALUE rb_obj_alloc(VALUE);
rb_obj_alloc     4047 io.c               VALUE io = rb_obj_alloc(klass);
rb_obj_alloc     5581 io.c               argf = rb_obj_alloc(rb_cObject);
rb_obj_alloc      985 marshal.c      		VALUE tmp = rb_obj_alloc(c);
rb_obj_alloc     1182 marshal.c      	    v = rb_obj_alloc(klass);
rb_obj_alloc     1203 marshal.c      	    v = rb_obj_alloc(klass);
rb_obj_alloc     1224 marshal.c      	       v = rb_obj_alloc(klass);
rb_obj_alloc      223 object.c           clone = rb_obj_alloc(rb_obj_class(obj));
rb_obj_alloc      258 object.c           dup = rb_obj_alloc(rb_obj_class(obj));
rb_obj_alloc     1454 object.c           obj = rb_obj_alloc(klass);
rb_obj_alloc     2515 object.c           rb_define_method(rb_cClass, "allocate", rb_obj_alloc, 0);
rb_obj_alloc     2528 object.c           ruby_top_self = rb_obj_alloc(rb_cObject);
rb_obj_alloc      202 process.c          rb_last_status = rb_obj_alloc(rb_cProcStatus);
rb_obj_alloc       57 range.c            VALUE range = rb_obj_alloc(rb_cRange);


rb_obj_as_string

rb_obj_as_string 1291 array.c        	    tmp = rb_obj_as_string(tmp);
rb_obj_as_string  224 error.c        		    etype = RSTRING(rb_obj_as_string(x))->ptr;
rb_obj_as_string  380 error.c            exc = rb_obj_as_string(exc);
rb_obj_as_string 1480 error.c        	    VALUE str = rb_obj_as_string(ruby_errinfo);
rb_obj_as_string 1565 eval.c         	rb_str_append(str, rb_obj_as_string(ruby_errinfo));
rb_obj_as_string 2663 eval.c         		     RSTRING(rb_obj_as_string(c))->ptr);
rb_obj_as_string 3561 eval.c         			     RSTRING(rb_obj_as_string(klass))->ptr);
rb_obj_as_string 3659 eval.c         	result = rb_obj_as_string(rb_eval(self, node->nd_body));
rb_obj_as_string 4373 eval.c         	    e = rb_obj_as_string(e);
rb_obj_as_string  478 ext/dbm/dbm.c      keystr = rb_obj_as_string(keystr);
rb_obj_as_string  479 ext/dbm/dbm.c      valstr = rb_obj_as_string(valstr);
rb_obj_as_string  185 ext/readline/readline.c 	temp = rb_obj_as_string(RARRAY(ary)->ptr[i]);
rb_obj_as_string  994 ext/stringio/stringio.c 	str = rb_obj_as_string(str);
rb_obj_as_string 2231 ext/tk/tcltklib.c             rb_str_append(str, rb_obj_as_string(ruby_errinfo));
rb_obj_as_string 2845 ext/zlib/zlib.c 	str = rb_obj_as_string(str);
rb_obj_as_string  486 intern.h       VALUE rb_obj_as_string(VALUE);
rb_obj_as_string  651 io.c               str = rb_obj_as_string(str);
rb_obj_as_string 2278 io.c           	str = rb_obj_as_string(str);
rb_obj_as_string 3695 io.c           	    line = rb_obj_as_string(argv[i]);
rb_obj_as_string 3726 io.c               rb_io_write(rb_stdout, rb_obj_as_string(rb_inspect(obj)));
rb_obj_as_string  301 object.c           return rb_obj_as_string(rb_funcall(obj, id_inspect, 0, 0));
rb_obj_as_string  907 pack.c         	    from = rb_obj_as_string(NEXTFROM);
rb_obj_as_string  561 range.c            str = rb_obj_as_string(rb_ivar_get(range, id_beg));
rb_obj_as_string  562 range.c            str2 = rb_obj_as_string(rb_ivar_get(range, id_end));
rb_obj_as_string  415 sprintf.c      		str = rb_obj_as_string(arg);
rb_obj_as_string 1845 string.c       	    repl = rb_obj_as_string(rb_yield(rb_reg_nth_match(0, match)));
rb_obj_as_string 1960 string.c       	    val = rb_obj_as_string(rb_yield(rb_reg_nth_match(0, match)));


rb_obj_call_init

rb_obj_call_init 8149 eval.c             rb_obj_call_init(block, argc, argv);
rb_obj_call_init 11921 eval.c             rb_obj_call_init(th->thread, argc, argv);
rb_obj_call_init  237 intern.h       void rb_obj_call_init(VALUE, int, VALUE*);
rb_obj_call_init 1455 object.c           rb_obj_call_init(obj, argc, argv);


rb_obj_class

rb_obj_class      675 array.c            klass = rb_obj_class(ary);
rb_obj_class     1388 array.c            if (rb_obj_class(ary) != rb_cArray) {
rb_obj_class     2237 array.c            if (len == 0) return ary_new(rb_obj_class(ary), 0);
rb_obj_class     2246 array.c            ary2 = ary_new(rb_obj_class(ary), len);
rb_obj_class      486 error.c            if (rb_obj_class(exc) != rb_obj_class(obj))
rb_obj_class      664 error.c            if (rb_obj_class(obj2) != rb_cNameErrorMesg)
rb_obj_class      833 error.c            VALUE klass = rb_obj_class(self);
rb_obj_class     7932 eval.c             bind = Data_Make_Struct(rb_obj_class(self),struct BLOCK,blk_mark,blk_free,data);
rb_obj_class     7950 eval.c             bind = Data_Make_Struct(rb_obj_class(self),struct BLOCK,blk_mark,blk_free,data);
rb_obj_class     8220 eval.c         	    klass = rb_obj_class(proc);
rb_obj_class      812 ext/curses/curses.c     win = prep_window(rb_obj_class(obj), window);
rb_obj_class      128 ext/digest/digest.c     algo = get_digest_base_metadata(rb_obj_class(copy));
rb_obj_class      129 ext/digest/digest.c     if (algo != get_digest_base_metadata(rb_obj_class(obj))) {
rb_obj_class      146 ext/digest/digest.c     algo = get_digest_base_metadata(rb_obj_class(self));
rb_obj_class      174 ext/digest/digest.c     algo = get_digest_base_metadata(rb_obj_class(self));
rb_obj_class      197 ext/digest/digest.c     algo = get_digest_base_metadata(rb_obj_class(self));
rb_obj_class      219 ext/digest/digest.c     klass = rb_obj_class(self);
rb_obj_class      222 ext/digest/digest.c     if (rb_obj_class(other) == klass) {
rb_obj_class       98 ext/openssl/ossl.h   if (!rb_obj_is_instance_of(obj1, rb_obj_class(obj2))) {\
rb_obj_class      150 ext/openssl/ossl_cipher.c 	    char *cname  = rb_class2name(rb_obj_class(self));
rb_obj_class      421 ext/openssl/ossl_config.c     char *cname = rb_class2name(rb_obj_class(self));
rb_obj_class      329 ext/openssl/ossl_engine.c     char *cname = rb_class2name(rb_obj_class(self));
rb_obj_class      600 ext/openssl/ossl_x509cert.c     char *cname = rb_class2name(rb_obj_class(self));
rb_obj_class     2297 ext/tk/tcltklib.c         volatile VALUE eclass = rb_obj_class(exc);
rb_obj_class     1148 ext/tk/tkutil/tkutil.c     Data_Get_Struct(rb_const_get(rb_obj_class(self), ID_SUBST_INFO),
rb_obj_class      205 file.c             if (rb_obj_is_kind_of(other, rb_obj_class(self))) {
rb_obj_class     3412 file.c             if (!rb_obj_is_instance_of(orig, rb_obj_class(copy))) {
rb_obj_class      376 intern.h       VALUE rb_obj_class(VALUE);
rb_obj_class      223 object.c           clone = rb_obj_alloc(rb_obj_class(obj));
rb_obj_class      258 object.c           dup = rb_obj_alloc(rb_obj_class(obj));
rb_obj_class      270 object.c           if (TYPE(obj) != TYPE(orig) || rb_obj_class(obj) != rb_obj_class(orig)) {
rb_obj_class      396 object.c           if (rb_obj_class(obj) == c) return Qtrue;
rb_obj_class     1423 object.c           if (rb_obj_class(obj) != rb_class_real(klass)) {
rb_obj_class     2401 object.c           rb_define_method(rb_mKernel, "class", rb_obj_class, 0);
rb_obj_class      119 range.c            if (!rb_obj_is_instance_of(obj, rb_obj_class(range)))
rb_obj_class      174 range.c            if (!rb_obj_is_instance_of(obj, rb_obj_class(range)))
rb_obj_class      670 re.c               if (!rb_obj_is_instance_of(orig, rb_obj_class(obj))) {
rb_obj_class     1971 re.c               if (!rb_obj_is_instance_of(re, rb_obj_class(copy))) {
rb_obj_class      323 ruby.h             OBJSETUP(dup,rb_obj_class(obj),(RBASIC(obj)->flags)&(T_MASK|FL_EXIVAR|FL_TAINT));\
rb_obj_class      141 string.c           return str_new3(rb_obj_class(str), str);
rb_obj_class      169 string.c           klass = rb_obj_class(orig);
rb_obj_class      193 string.c           return str_new(rb_obj_class(obj), ptr, len);
rb_obj_class      278 string.c           VALUE dup = str_alloc(rb_obj_class(str));
rb_obj_class     2027 string.c       	RBASIC(dest)->klass = rb_obj_class(str);
rb_obj_class     2317 string.c           if (rb_obj_class(str) != rb_cString) {
rb_obj_class       48 struct.c           VALUE members = rb_struct_s_members(rb_obj_class(s));
rb_obj_class       89 struct.c           return rb_struct_s_members_m(rb_obj_class(obj));
rb_obj_class      308 struct.c           VALUE klass = rb_obj_class(self);
rb_obj_class      434 struct.c           char *cname = rb_class2name(rb_obj_class(s));
rb_obj_class      508 struct.c           if (!rb_obj_is_instance_of(s, rb_obj_class(copy))) {
rb_obj_class      731 struct.c           if (rb_obj_class(s) != rb_obj_class(s2)) return Qfalse;
rb_obj_class      755 struct.c           h = rb_hash(rb_obj_class(s));
rb_obj_class      779 struct.c           if (rb_obj_class(s) != rb_obj_class(s2)) return Qfalse;
rb_obj_class      192 variable.c     	    if (rb_obj_class(klass) == rb_cModule) {


rb_obj_classname

rb_obj_classname 1913 bignum.c       		 rb_obj_classname(y));
rb_obj_classname   41 class.c        		 rb_obj_classname(super));
rb_obj_classname  287 class.c        	rb_raise(rb_eTypeError, "%s is not a module", rb_obj_classname(module));
rb_obj_classname  308 class.c        		 rb_class2name(outer), rb_obj_classname(module));
rb_obj_classname   45 compar.c       	classname = rb_obj_classname(y);
rb_obj_classname   48 compar.c       	     rb_obj_classname(x), classname);
rb_obj_classname  462 dir.c          	char *c = rb_obj_classname(dir);
rb_obj_classname 1634 dir.c          		 rb_obj_classname(dir));
rb_obj_classname   72 enumerator.c   		 rb_obj_classname(obj));
rb_obj_classname  227 error.c        		    etype = rb_obj_classname(x);
rb_obj_classname  711 error.c        	    rb_str_cat2(d, rb_obj_classname(obj));
rb_obj_classname 1095 error.c            if (OBJ_FROZEN(obj)) rb_error_frozen(rb_obj_classname(obj));
rb_obj_classname  283 eval.c         		 rb_obj_classname(x));
rb_obj_classname 3782 eval.c         			 rb_obj_classname(recv));
rb_obj_classname 3921 eval.c         			 rb_obj_classname(result));
rb_obj_classname 4375 eval.c         			rb_obj_classname(ruby_errinfo),
rb_obj_classname 6106 eval.c         		     rb_obj_classname(scope));
rb_obj_classname 8452 eval.c             char *cname = rb_obj_classname(self);
rb_obj_classname 8542 eval.c         		     rb_obj_classname(proc));
rb_obj_classname 9143 eval.c             s = rb_obj_classname(method);
rb_obj_classname 9311 eval.c         		     rb_obj_classname(body));
rb_obj_classname 10071 eval.c         		 rb_obj_classname(data));
rb_obj_classname 12469 eval.c             char *cname = rb_obj_classname(thread);
rb_obj_classname 12784 eval.c         		 rb_obj_classname(thread));
rb_obj_classname  129 ext/bigdecimal/bigdecimal.c                     rb_obj_classname(v)
rb_obj_classname   86 ext/openssl/ossl.h                rb_obj_classname(obj), rb_class2name(klass));\
rb_obj_classname   93 ext/openssl/ossl.h                rb_obj_classname(obj), rb_class2name(klass));\
rb_obj_classname  215 ext/strscan/strscan.c                  rb_obj_classname(obj));
rb_obj_classname  588 file.c             rb_str_buf_cat2(str, rb_obj_classname(self));
rb_obj_classname 1653 gc.c           		 rb_obj_classname(block));
rb_obj_classname 1730 gc.c           		 rb_obj_classname(block));
rb_obj_classname 1104 io.c               cname = rb_obj_classname(obj);
rb_obj_classname 3816 io.c           		 rb_obj_classname(val));
rb_obj_classname  614 marshal.c      			     rb_obj_classname(obj));
rb_obj_classname  623 marshal.c      		     rb_obj_classname(obj));
rb_obj_classname  121 numeric.c      	     rb_obj_classname(x[1]),
rb_obj_classname  122 numeric.c      	     rb_obj_classname(x[0]));
rb_obj_classname  188 numeric.c      	     rb_obj_classname(x));
rb_obj_classname  197 numeric.c          rb_raise(rb_eTypeError, "can't copy %s", rb_obj_classname(x));
rb_obj_classname 1792 numeric.c                      rb_obj_classname(x));
rb_obj_classname 1814 numeric.c                      rb_obj_classname(x));
rb_obj_classname  170 object.c               rb_raise(rb_eTypeError, "[bug] frozen object (%s) allocated", rb_obj_classname(dest));
rb_obj_classname  221 object.c               rb_raise(rb_eTypeError, "can't clone %s", rb_obj_classname(obj));
rb_obj_classname  256 object.c               rb_raise(rb_eTypeError, "can't dup %s", rb_obj_classname(obj));
rb_obj_classname  289 object.c           char *cname = rb_obj_classname(obj);
rb_obj_classname  368 object.c       	c = rb_obj_classname(obj);
rb_obj_classname  775 object.c       		 rb_obj_classname(y));
rb_obj_classname 1927 object.c       		     rb_obj_classname(val),
rb_obj_classname 1945 object.c       	char *cname = rb_obj_classname(val);
rb_obj_classname 1947 object.c       		 cname, tname, cname, method, rb_obj_classname(v));
rb_obj_classname 1962 object.c       	char *cname = rb_obj_classname(val);
rb_obj_classname 1964 object.c       		 cname, tname, cname, method, rb_obj_classname(v));
rb_obj_classname 1975 object.c       	char *cname = rb_obj_classname(val);
rb_obj_classname 1977 object.c       		 cname, cname, method, rb_obj_classname(v));
rb_obj_classname  344 pack.c             rb_raise(rb_eTypeError, "can't convert %s to `integer'", rb_obj_classname(x));
rb_obj_classname 8862 parse.y        		 x, rb_obj_classname(x));
rb_obj_classname   89 prec.c                     rb_obj_classname(x), rb_class2name(module));
rb_obj_classname  214 random.c                          rb_obj_classname(vseed));
rb_obj_classname  334 range.c        			 rb_obj_classname(b));
rb_obj_classname  381 range.c        		 rb_obj_classname(beg));
rb_obj_classname  534 ruby.h         char *rb_obj_classname(VALUE);
rb_obj_classname  270 signal.c       		     rb_obj_classname(argv[0]));
rb_obj_classname 1050 string.c       		       rb_obj_classname(sub));
rb_obj_classname 1170 string.c       		 rb_obj_classname(sub));
rb_obj_classname  198 time.c         		 rb_obj_classname(time), tstr);


rb_obj_clone

rb_obj_clone      327 error.c            exc = rb_obj_clone(self);
rb_obj_clone     1599 eval.c             ruby_top_self = rb_obj_clone(ruby_top_self);
rb_obj_clone     6570 eval.c         	self = rb_obj_clone(ruby_top_self);
rb_obj_clone      368 intern.h       VALUE rb_obj_clone(VALUE);
rb_obj_clone     2403 object.c           rb_define_method(rb_mKernel, "clone", rb_obj_clone, 0);


rb_obj_dummy

rb_obj_dummy     2381 object.c           rb_define_private_method(rb_cObject, "initialize", rb_obj_dummy, 0);
rb_obj_dummy     2382 object.c           rb_define_private_method(rb_cClass, "inherited", rb_obj_dummy, 1);
rb_obj_dummy     2383 object.c           rb_define_private_method(rb_cModule, "included", rb_obj_dummy, 1);
rb_obj_dummy     2384 object.c           rb_define_private_method(rb_cModule, "extended", rb_obj_dummy, 1);
rb_obj_dummy     2385 object.c           rb_define_private_method(rb_cModule, "method_added", rb_obj_dummy, 1);
rb_obj_dummy     2386 object.c           rb_define_private_method(rb_cModule, "method_removed", rb_obj_dummy, 1);
rb_obj_dummy     2387 object.c           rb_define_private_method(rb_cModule, "method_undefined", rb_obj_dummy, 1);
rb_obj_dummy     2430 object.c           rb_define_private_method(rb_mKernel, "singleton_method_added", rb_obj_dummy, 1);
rb_obj_dummy     2431 object.c           rb_define_private_method(rb_mKernel, "singleton_method_removed", rb_obj_dummy, 1);
rb_obj_dummy     2432 object.c           rb_define_private_method(rb_mKernel, "singleton_method_undefined", rb_obj_dummy, 1);


rb_obj_dup

rb_obj_dup       10938 eval.c         	VALUE errinfo = rb_obj_dup(th->errinfo);
rb_obj_dup        297 ext/iconv/iconv.c 	args[1] = env->append(rb_obj_dup(env->ret), success);
rb_obj_dup       6183 ext/tk/tcltklib.c                   encodename = rb_obj_dup(enc);
rb_obj_dup        728 hash.c             return rb_hash_delete_if(rb_obj_dup(hash));
rb_obj_dup       1493 hash.c             return rb_hash_update(rb_obj_dup(hash1), hash2);
rb_obj_dup        369 intern.h       VALUE rb_obj_dup(VALUE);
rb_obj_dup       2404 object.c           rb_define_method(rb_mKernel, "dup", rb_obj_dup, 0);


rb_obj_equal

rb_obj_equal     2391 object.c           rb_define_method(rb_mKernel, "==", rb_obj_equal, 1);
rb_obj_equal     2392 object.c           rb_define_method(rb_mKernel, "equal?", rb_obj_equal, 1);
rb_obj_equal     2396 object.c           rb_define_method(rb_mKernel, "eql?", rb_obj_equal, 1);
rb_obj_equal     2468 object.c           rb_define_method(rb_cSymbol, "===", rb_obj_equal, 1);
rb_obj_equal     2472 object.c           rb_define_method(rb_cModule, "==", rb_obj_equal, 1);


rb_obj_freeze

rb_obj_freeze      72 array.c            return rb_obj_freeze(ary);
rb_obj_freeze     392 ext/openssl/ossl_ssl.c     rb_obj_freeze(self);
rb_obj_freeze     336 ext/strscan/strscan.c     rb_obj_freeze(p->str);
rb_obj_freeze    1306 ext/strscan/strscan.c     rb_obj_freeze(tmp);
rb_obj_freeze    1309 ext/strscan/strscan.c     rb_obj_freeze(tmp);
rb_obj_freeze    7684 ext/tk/tcltklib.c     ret = rb_obj_freeze(rb_str_new2(info));
rb_obj_freeze    7725 ext/tk/tcltklib.c                     rb_obj_freeze(rb_str_new2(tcltklib_release_date)));
rb_obj_freeze    1521 ext/tk/tkutil/tkutil.c                     rb_obj_freeze(rb_str_new2(tkutil_release_date)));
rb_obj_freeze    4330 file.c             separator = rb_obj_freeze(rb_str_new2("/"));
rb_obj_freeze    4337 file.c             rb_define_const(rb_cFile, "ALT_SEPARATOR", rb_obj_freeze(rb_str_new2("\\")));
rb_obj_freeze    4341 file.c             rb_define_const(rb_cFile, "PATH_SEPARATOR", rb_obj_freeze(rb_str_new2(PATH_SEP)));
rb_obj_freeze      30 hash.c             return rb_obj_freeze(hash);
rb_obj_freeze    1521 hash.c             rb_obj_freeze(str);
rb_obj_freeze    1592 hash.c         	    rb_obj_freeze(str);
rb_obj_freeze     374 intern.h       VALUE rb_obj_freeze(VALUE);
rb_obj_freeze    1169 object.c           return rb_obj_freeze(mod);
rb_obj_freeze    2410 object.c           rb_define_method(rb_mKernel, "freeze", rb_obj_freeze, 0);
rb_obj_freeze     564 string.c           return rb_obj_freeze(str);
rb_obj_freeze      24 version.c          VALUE v = rb_obj_freeze(rb_str_new2(ruby_version));
rb_obj_freeze      25 version.c          VALUE d = rb_obj_freeze(rb_str_new2(ruby_release_date));
rb_obj_freeze      26 version.c          VALUE p = rb_obj_freeze(rb_str_new2(ruby_platform));


rb_obj_id

rb_obj_id        2748 array.c            id = rb_obj_id(ary2);
rb_obj_id        13032 eval.c         	return rb_ary_includes(list, rb_obj_id(obj));
rb_obj_id        13055 eval.c             rb_ary_push(list, rb_obj_id(obj));
rb_obj_id        1776 gc.c               objid = rb_obj_id(obj);	/* make obj into id */
rb_obj_id         375 intern.h       VALUE rb_obj_id(VALUE);
rb_obj_id        2398 object.c           rb_define_method(rb_mKernel, "hash", rb_obj_id, 0);
rb_obj_id        2399 object.c           rb_define_method(rb_mKernel, "__id__", rb_obj_id, 0);
rb_obj_id        2400 object.c           rb_define_method(rb_mKernel, "object_id", rb_obj_id, 0);


rb_obj_init_copy

rb_obj_init_copy   70 class.c            rb_obj_init_copy(clone, orig);
rb_obj_init_copy  370 intern.h       VALUE rb_obj_init_copy(VALUE,VALUE);
rb_obj_init_copy 2405 object.c           rb_define_method(rb_mKernel, "initialize_copy", rb_obj_init_copy, 1);


rb_obj_instance_eval

rb_obj_instance_eval 7659 eval.c             rb_define_method(rb_mKernel, "instance_eval", rb_obj_instance_eval, -1);
rb_obj_instance_eval   60 ext/tk/tkutil/tkutil.c     if (rb_block_given_p()) rb_obj_instance_eval(0, 0, obj);
rb_obj_instance_eval  228 intern.h       VALUE rb_obj_instance_eval(int, VALUE*, VALUE);


rb_obj_instance_variables

rb_obj_instance_variables  551 intern.h       VALUE rb_obj_instance_variables(VALUE);
rb_obj_instance_variables 2420 object.c           rb_define_method(rb_mKernel, "instance_variables", rb_obj_instance_variables, 0); /* in variable.c */


rb_obj_is_instance_of

rb_obj_is_instance_of   91 ext/openssl/ossl.h   if (!rb_obj_is_instance_of(obj, klass)) {\
rb_obj_is_instance_of   98 ext/openssl/ossl.h   if (!rb_obj_is_instance_of(obj1, rb_obj_class(obj2))) {\
rb_obj_is_instance_of  152 ext/openssl/ossl_pkey.c     if (rb_obj_is_instance_of(self, cPKey)) {
rb_obj_is_instance_of 1164 ext/syck/rubyext.c                 else if ( !NIL_P( obj ) && rb_obj_is_instance_of( val, rb_cHash ) )
rb_obj_is_instance_of 3412 file.c             if (!rb_obj_is_instance_of(orig, rb_obj_class(copy))) {
rb_obj_is_instance_of  365 intern.h       VALUE rb_obj_is_instance_of(VALUE, VALUE);
rb_obj_is_instance_of 2426 object.c           rb_define_method(rb_mKernel, "instance_of?", rb_obj_is_instance_of, 1);
rb_obj_is_instance_of  119 range.c            if (!rb_obj_is_instance_of(obj, rb_obj_class(range)))
rb_obj_is_instance_of  174 range.c            if (!rb_obj_is_instance_of(obj, rb_obj_class(range)))
rb_obj_is_instance_of  670 re.c               if (!rb_obj_is_instance_of(orig, rb_obj_class(obj))) {
rb_obj_is_instance_of 1971 re.c               if (!rb_obj_is_instance_of(re, rb_obj_class(copy))) {
rb_obj_is_instance_of  508 struct.c           if (!rb_obj_is_instance_of(s, rb_obj_class(copy))) {


rb_obj_is_kind_of

rb_obj_is_kind_of  895 error.c            if (!rb_obj_is_kind_of(exc, rb_eSystemCallError)) return Qfalse;
rb_obj_is_kind_of 1402 eval.c         	if (rb_obj_is_kind_of(ruby_errinfo, rb_eSystemExit)) {
rb_obj_is_kind_of 1496 eval.c             if (err && rb_obj_is_kind_of(err, rb_eSystemExit)) {
rb_obj_is_kind_of 2237 eval.c         		    !rb_obj_is_kind_of(self, rb_class_real(val)))
rb_obj_is_kind_of 4367 eval.c         	&& !rb_obj_is_kind_of(ruby_errinfo, rb_eSystemExit)) {
rb_obj_is_kind_of 4488 eval.c         	if (!rb_obj_is_kind_of(mesg, rb_eException))
rb_obj_is_kind_of 5146 eval.c         	return rb_obj_is_kind_of(ruby_errinfo, rb_eStandardError);
rb_obj_is_kind_of 5154 eval.c         	if (!rb_obj_is_kind_of(argv[0], rb_cModule)) {
rb_obj_is_kind_of 5188 eval.c         	    if (rb_obj_is_kind_of(ruby_errinfo, eclass)) {
rb_obj_is_kind_of 5809 eval.c         	    if (!rb_obj_is_kind_of(ruby_frame->self, rb_class_real(defined_class)))
rb_obj_is_kind_of 7386 eval.c             if (!NIL_P(val) && !rb_obj_is_kind_of(val, rb_eException)) {
rb_obj_is_kind_of 9014 eval.c         	else if (!rb_obj_is_kind_of(recv, data->rklass)) {
rb_obj_is_kind_of 10188 eval.c         	if (!rb_obj_is_kind_of(ruby_errinfo, rb_eSystemExit)) {
rb_obj_is_kind_of 11793 eval.c         	else if (rb_obj_is_kind_of(ruby_errinfo, rb_eSystemExit)) {
rb_obj_is_kind_of   81 ext/dl/cfunc.c   if( rb_obj_is_kind_of(val, rb_cDLCFunc) ){
rb_obj_is_kind_of   79 ext/dl/cptr.c    if (rb_obj_is_kind_of(val, rb_cDLCPtr)) {
rb_obj_is_kind_of  224 ext/dl/cptr.c    if( rb_obj_is_kind_of(val, rb_cDLCFunc) == Qtrue ){
rb_obj_is_kind_of  388 ext/dl/cptr.c  	else if( rb_obj_is_kind_of(arg2, rb_cDLCPtr) ){
rb_obj_is_kind_of  420 ext/dl/cptr.c      if( rb_obj_is_kind_of(val, rb_cIO) == Qtrue ){
rb_obj_is_kind_of  431 ext/dl/cptr.c      else if( rb_obj_is_kind_of(val, rb_cString) == Qtrue ){
rb_obj_is_kind_of  437 ext/dl/cptr.c  	if( rb_obj_is_kind_of(vptr, rb_cDLCPtr) ){
rb_obj_is_kind_of   64 ext/openssl/ossl.c         if (!rb_obj_is_kind_of(val, cX509Cert)) {
rb_obj_is_kind_of   84 ext/openssl/ossl.h   if (!rb_obj_is_kind_of(obj, klass)) {\
rb_obj_is_kind_of  127 ext/openssl/ossl_asn1.c     if (RTEST(rb_obj_is_kind_of(obj, cBN))) {
rb_obj_is_kind_of  573 ext/openssl/ossl_asn1.c 	   rb_obj_is_kind_of(obj, *ossl_asn1_info[i].klass)){
rb_obj_is_kind_of  694 ext/openssl/ossl_asn1.c     if(rb_obj_is_kind_of(value, rb_cArray)){
rb_obj_is_kind_of  770 ext/openssl/ossl_asn1.c 	    if(!rb_obj_is_kind_of(value, rb_cArray)){
rb_obj_is_kind_of   62 ext/openssl/ossl_bn.c     if (RTEST(rb_obj_is_kind_of(obj, cBN))) {
rb_obj_is_kind_of  115 ext/openssl/ossl_bn.c     if (RTEST(rb_obj_is_kind_of(str, cBN))) {
rb_obj_is_kind_of  228 ext/openssl/ossl_bn.c 	if (!RTEST(rb_obj_is_kind_of(other, cBN))) {
rb_obj_is_kind_of  221 ext/openssl/ossl_digest.c     if (rb_obj_is_kind_of(other, cDigest) == Qtrue) {
rb_obj_is_kind_of  732 ext/socket/socket.c     else if (rb_obj_is_kind_of(host, rb_cInteger)) {
rb_obj_is_kind_of 1761 ext/socket/socket.c     if (rb_obj_is_kind_of(val, rb_cIO)) {
rb_obj_is_kind_of  555 ext/syck/rubyext.c                 if ( rb_obj_is_kind_of( k, cMergeKey ) )
rb_obj_is_kind_of  580 ext/syck/rubyext.c                 else if ( rb_obj_is_kind_of( k, cDefaultKey ) )
rb_obj_is_kind_of  992 ext/syck/rubyext.c                 if ( rb_obj_is_kind_of( k, cMergeKey ) )
rb_obj_is_kind_of  994 ext/syck/rubyext.c                     if ( rb_obj_is_kind_of( v, rb_cHash ) )
rb_obj_is_kind_of 1001 ext/syck/rubyext.c                     else if ( rb_obj_is_kind_of( v, rb_cArray ) )
rb_obj_is_kind_of 1004 ext/syck/rubyext.c                         if ( rb_obj_is_kind_of( end, rb_cHash ) )
rb_obj_is_kind_of 1015 ext/syck/rubyext.c                 else if ( rb_obj_is_kind_of( k, cDefaultKey ) )
rb_obj_is_kind_of  769 ext/tk/tcltklib.c     if (!NIL_P(exc) && rb_obj_is_kind_of(exc, rb_eException)) {
rb_obj_is_kind_of  776 ext/tk/tcltklib.c             if (rb_obj_is_kind_of(exc, eTkCallbackRetry)) {
rb_obj_is_kind_of  779 ext/tk/tcltklib.c             } else if (rb_obj_is_kind_of(exc, eTkCallbackRedo)) {
rb_obj_is_kind_of  782 ext/tk/tcltklib.c             } else if (rb_obj_is_kind_of(exc, eTkCallbackThrow)) {
rb_obj_is_kind_of  801 ext/tk/tcltklib.c     if (!NIL_P(exc) && rb_obj_is_kind_of(exc, rb_eException)) {
rb_obj_is_kind_of  816 ext/tk/tcltklib.c             if (rb_obj_is_kind_of(exc, eTkCallbackRetry)) {
rb_obj_is_kind_of  819 ext/tk/tcltklib.c             } else if (rb_obj_is_kind_of(exc, eTkCallbackRedo)) {
rb_obj_is_kind_of  822 ext/tk/tcltklib.c             } else if (rb_obj_is_kind_of(exc, eTkCallbackThrow)) {
rb_obj_is_kind_of 2329 ext/tk/tcltklib.c         if (rb_obj_is_kind_of(exc, eTkLocalJumpError)) {
rb_obj_is_kind_of 2334 ext/tk/tcltklib.c         if (rb_obj_is_kind_of(exc, eLocalJumpError)) {
rb_obj_is_kind_of 2850 ext/tk/tcltklib.c         if (rb_obj_is_kind_of(rbtk_pending_exception, rb_eSystemExit)
rb_obj_is_kind_of 2851 ext/tk/tcltklib.c             || rb_obj_is_kind_of(rbtk_pending_exception, rb_eInterrupt)) {
rb_obj_is_kind_of 3196 ext/tk/tcltklib.c         if (rb_obj_is_kind_of(rbtk_pending_exception, rb_eSystemExit)
rb_obj_is_kind_of 3197 ext/tk/tcltklib.c             || rb_obj_is_kind_of(rbtk_pending_exception, rb_eInterrupt)) {
rb_obj_is_kind_of 3484 ext/tk/tcltklib.c             if (rb_obj_is_kind_of(rbtk_pending_exception, rb_eSystemExit)
rb_obj_is_kind_of 3485 ext/tk/tcltklib.c                 || rb_obj_is_kind_of(rbtk_pending_exception, rb_eInterrupt)) {
rb_obj_is_kind_of 3543 ext/tk/tcltklib.c             if (rb_obj_is_kind_of(rbtk_pending_exception, rb_eSystemExit)
rb_obj_is_kind_of 3544 ext/tk/tcltklib.c                 || rb_obj_is_kind_of(rbtk_pending_exception, rb_eInterrupt)) {
rb_obj_is_kind_of 3637 ext/tk/tcltklib.c             if (rb_obj_is_kind_of(rbtk_pending_exception, rb_eSystemExit)
rb_obj_is_kind_of 3638 ext/tk/tcltklib.c                 || rb_obj_is_kind_of(rbtk_pending_exception, rb_eInterrupt)) {
rb_obj_is_kind_of 4994 ext/tk/tcltklib.c     if (!rb_obj_is_kind_of(master, tcltkip_class)) {
rb_obj_is_kind_of 5485 ext/tk/tcltklib.c         if (rb_obj_is_kind_of(result, rb_eException)) {
rb_obj_is_kind_of 5548 ext/tk/tcltklib.c     if (rb_obj_is_kind_of(ret, rb_eException)) {
rb_obj_is_kind_of 5802 ext/tk/tcltklib.c         if (rb_obj_is_kind_of(result, rb_eException)) {
rb_obj_is_kind_of 5862 ext/tk/tcltklib.c     if (rb_obj_is_kind_of(ret, rb_eException)) {
rb_obj_is_kind_of 6882 ext/tk/tcltklib.c         if (rb_obj_is_kind_of(result, rb_eException)) {
rb_obj_is_kind_of 6942 ext/tk/tcltklib.c     if (rb_obj_is_kind_of(ret, rb_eException)) {
rb_obj_is_kind_of  826 ext/tk/tkutil/tkutil.c         if (rb_obj_is_kind_of(obj, cTkObject)) {
rb_obj_is_kind_of  832 ext/tk/tkutil/tkutil.c         if (rb_obj_is_kind_of(obj, rb_cProc)
rb_obj_is_kind_of  833 ext/tk/tkutil/tkutil.c             || rb_obj_is_kind_of(obj, cMethod)
rb_obj_is_kind_of  834 ext/tk/tkutil/tkutil.c             || rb_obj_is_kind_of(obj, cTkCallbackEntry)) {
rb_obj_is_kind_of  752 ext/win32ole/win32ole.c     if(rb_obj_is_kind_of(val, cWIN32OLE)) {
rb_obj_is_kind_of  759 ext/win32ole/win32ole.c     if (rb_obj_is_kind_of(val, rb_cTime)) {
rb_obj_is_kind_of 1774 ext/win32ole/win32ole.c     if (rb_obj_is_kind_of(ole, cWIN32OLE)) {
rb_obj_is_kind_of 1954 ext/win32ole/win32ole.c     if (rb_obj_is_kind_of(target, cWIN32OLE_TYPE) ||
rb_obj_is_kind_of 1955 ext/win32ole/win32ole.c         rb_obj_is_kind_of(target, cWIN32OLE_METHOD)) {
rb_obj_is_kind_of 2263 ext/win32ole/win32ole.c             if (rb_obj_is_kind_of(param, cWIN32OLE_VARIANT)) {
rb_obj_is_kind_of 5192 ext/win32ole/win32ole.c     if (rb_obj_is_kind_of(oletype, cWIN32OLE_TYPE)) {
rb_obj_is_kind_of 6337 ext/win32ole/win32ole.c     if (!rb_obj_is_kind_of(obj, cWIN32OLE_EVENT)) {
rb_obj_is_kind_of 6694 ext/win32ole/win32ole.c     if (!rb_obj_is_kind_of(ole, cWIN32OLE)) {
rb_obj_is_kind_of 1848 ext/zlib/zlib.c     if (rb_obj_is_kind_of(ruby_errinfo, rb_eNoMethodError)) {
rb_obj_is_kind_of  205 file.c             if (rb_obj_is_kind_of(other, rb_obj_class(self))) {
rb_obj_is_kind_of 1583 gc.c           		    if (rb_obj_is_kind_of((VALUE)p, of)) {
rb_obj_is_kind_of  366 intern.h       VALUE rb_obj_is_kind_of(VALUE, VALUE);
rb_obj_is_kind_of 1185 object.c           return rb_obj_is_kind_of(arg, mod);
rb_obj_is_kind_of 1974 object.c           if (!rb_obj_is_kind_of(v, rb_cInteger)) {
rb_obj_is_kind_of 1986 object.c           if (!rb_obj_is_kind_of(v, rb_cInteger)) {
rb_obj_is_kind_of 2427 object.c           rb_define_method(rb_mKernel, "kind_of?", rb_obj_is_kind_of, 1);
rb_obj_is_kind_of 2428 object.c           rb_define_method(rb_mKernel, "is_a?", rb_obj_is_kind_of, 1);
rb_obj_is_kind_of  320 range.c        	else if (rb_obj_is_kind_of(b, rb_cNumeric)) {
rb_obj_is_kind_of  483 range.c            int ip = FIXNUM_P(e) || rb_obj_is_kind_of(e, rb_cInteger);
rb_obj_is_kind_of  509 range.c            if (rb_obj_is_kind_of(range, rb_cRange)) {
rb_obj_is_kind_of  624 range.c        	     rb_obj_is_kind_of(beg, rb_cNumeric) ||
rb_obj_is_kind_of  625 range.c        	     rb_obj_is_kind_of(end, rb_cNumeric);


rb_obj_is_proc

rb_obj_is_proc   2471 eval.c             if (!rb_obj_is_proc(trace)) {
rb_obj_is_proc   6104 eval.c         	if (!rb_obj_is_proc(scope)) {
rb_obj_is_proc   8538 eval.c             if (!rb_obj_is_proc(proc)) {
rb_obj_is_proc   8540 eval.c         	if (!rb_obj_is_proc(b)) {
rb_obj_is_proc   9309 eval.c         	if (!rb_obj_is_method(body) && !rb_obj_is_proc(body)) {


rb_obj_method

rb_obj_method     269 enumerator.c       ptr->method = rb_obj_method(obj, meth);
rb_obj_method    9426 eval.c             rb_define_method(rb_mKernel, "method", rb_obj_method, 1);
rb_obj_method     244 intern.h       VALUE rb_obj_method(VALUE, VALUE);


rb_obj_remove_instance_variable

rb_obj_remove_instance_variable  552 intern.h       VALUE rb_obj_remove_instance_variable(VALUE, VALUE);
rb_obj_remove_instance_variable 2424 object.c       			     rb_obj_remove_instance_variable, 1); /* in variable.c */


rb_obj_respond_to

rb_obj_respond_to 4031 eval.c             return rb_obj_respond_to(obj, id, Qfalse);
rb_obj_respond_to  369 ext/tk/tkutil/tkutil.c             if (rb_obj_respond_to(self, ID_toUTF8, Qtrue)) {
rb_obj_respond_to  463 ext/tk/tkutil/tkutil.c             if (rb_obj_respond_to(self, ID_toUTF8, Qtrue)) {
rb_obj_respond_to  782 ext/tk/tkutil/tkutil.c             if (rb_obj_respond_to(self, ID_toUTF8, Qtrue)) {
rb_obj_respond_to  793 ext/tk/tkutil/tkutil.c             if (rb_obj_respond_to(self, ID_toUTF8, Qtrue)) {
rb_obj_respond_to  835 ext/tk/tkutil/tkutil.c             if (rb_obj_respond_to(self, ID_install_cmd, Qtrue)) {
rb_obj_respond_to  844 ext/tk/tkutil/tkutil.c         if (rb_obj_respond_to(obj, ID_to_eval, Qtrue)) {
rb_obj_respond_to  848 ext/tk/tkutil/tkutil.c         } else if (rb_obj_respond_to(obj, ID_path, Qtrue)) {
rb_obj_respond_to  852 ext/tk/tkutil/tkutil.c         } else if (rb_obj_respond_to(obj, ID_to_s, Qtrue)) {
rb_obj_respond_to  222 intern.h       int rb_obj_respond_to(VALUE, ID, int);
rb_obj_respond_to 9108 parse.y            if (rb_obj_respond_to(src, ripper_id_gets, 0)) {


rb_obj_singleton_methods

rb_obj_singleton_methods  131 intern.h       VALUE rb_obj_singleton_methods(int, VALUE*, VALUE);
rb_obj_singleton_methods 1732 object.c       	return rb_obj_singleton_methods(argc, argv, obj);
rb_obj_singleton_methods 2416 object.c           rb_define_method(rb_mKernel, "singleton_methods", rb_obj_singleton_methods, -1); /* in class.c */


rb_obj_taint

rb_obj_taint      606 ext/socket/socket.c     rb_obj_taint(str);
rb_obj_taint      371 intern.h       VALUE rb_obj_taint(VALUE);
rb_obj_taint     2407 object.c           rb_define_method(rb_mKernel, "taint", rb_obj_taint, 0);


rb_obj_tainted

rb_obj_tainted    372 intern.h       VALUE rb_obj_tainted(VALUE);
rb_obj_tainted   2408 object.c           rb_define_method(rb_mKernel, "tainted?", rb_obj_tainted, 0);


rb_obj_untaint

rb_obj_untaint    373 intern.h       VALUE rb_obj_untaint(VALUE);
rb_obj_untaint   2409 object.c           rb_define_method(rb_mKernel, "untaint", rb_obj_untaint, 0);


rb_p

rb_p             3753 io.c           	rb_p(argv[i]);
rb_p              536 ruby.h         void rb_p(VALUE);


rb_parser_append_print

rb_parser_append_print 1196 ruby.c         NODE *rb_parser_append_print(NODE*);
rb_parser_append_print 1217 ruby.c         	ruby_eval_tree = rb_parser_append_print(ruby_eval_tree);


rb_parser_calloc

rb_parser_calloc   30 parse.y        #define YYCALLOC(nelem, size)	rb_parser_calloc(parser, nelem, size)
rb_parser_calloc  190 parse.y        void *rb_parser_calloc(struct parser_params *, size_t, size_t);


rb_parser_compile_file

rb_parser_compile_file  358 node.h         NODE *rb_parser_compile_file(VALUE, const char*, VALUE, int);
rb_parser_compile_file 4685 parse.y            return rb_parser_compile_file(vparser, f, file, start);
rb_parser_compile_file  964 ruby.c             ruby_eval_tree = rb_parser_compile_file(parser, fname, f, line_start);


rb_parser_compile_string

rb_parser_compile_string  357 node.h         NODE *rb_parser_compile_string(VALUE, const char*, VALUE, int);
rb_parser_compile_string 4644 parse.y            return rb_parser_compile_string(vparser, f, s, line);
rb_parser_compile_string 4671 parse.y            return rb_parser_compile_string(vparser, f, rb_str_new(s, len), line);


rb_parser_end_seen_p

rb_parser_end_seen_p  354 node.h         VALUE rb_parser_end_seen_p(VALUE);
rb_parser_end_seen_p 9287 parse.y            rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0);
rb_parser_end_seen_p  965 ruby.c             if (script && rb_parser_end_seen_p(parser)) {


rb_parser_free

rb_parser_free     31 parse.y        #define YYFREE(ptr)		rb_parser_free(parser, ptr)
rb_parser_free    191 parse.y        void rb_parser_free(struct parser_params *, void *);


rb_parser_malloc

rb_parser_malloc   28 parse.y        #define YYMALLOC(size)		rb_parser_malloc(parser, size)
rb_parser_malloc  188 parse.y        void *rb_parser_malloc(struct parser_params *, size_t);


rb_parser_new

rb_parser_new     353 node.h         VALUE rb_parser_new(void);
rb_parser_new    4642 parse.y            VALUE volatile vparser = rb_parser_new();
rb_parser_new    4683 parse.y            VALUE volatile vparser = rb_parser_new();
rb_parser_new    8594 parse.y            VALUE volatile vparser = rb_parser_new();
rb_parser_new     963 ruby.c             parser = rb_parser_new();


rb_parser_realloc

rb_parser_realloc   29 parse.y        #define YYREALLOC(ptr, size)	rb_parser_realloc(parser, ptr, size)
rb_parser_realloc  189 parse.y        void *rb_parser_realloc(struct parser_params *, void *, size_t);


rb_parser_while_loop

rb_parser_while_loop 1197 ruby.c         NODE *rb_parser_while_loop(NODE*, int, int);
rb_parser_while_loop 1220 ruby.c         	ruby_eval_tree = rb_parser_while_loop(ruby_eval_tree, do_line, do_split);


rb_path2class

rb_path2class      28 ext/digest/md5/md5init.c     mDigest = rb_path2class("Digest");
rb_path2class      29 ext/digest/md5/md5init.c     cDigest_Base = rb_path2class("Digest::Base");
rb_path2class      29 ext/digest/rmd160/rmd160init.c     mDigest = rb_path2class("Digest");
rb_path2class      30 ext/digest/rmd160/rmd160init.c     cDigest_Base = rb_path2class("Digest::Base");
rb_path2class      28 ext/digest/sha1/sha1init.c     mDigest = rb_path2class("Digest");
rb_path2class      29 ext/digest/sha1/sha1init.c     cDigest_Base = rb_path2class("Digest::Base");
rb_path2class      37 ext/digest/sha2/sha2init.c     mDigest = rb_path2class("Digest");
rb_path2class      38 ext/digest/sha2/sha2init.c     cDigest_Base = rb_path2class("Digest::Base");
rb_path2class     529 intern.h       VALUE rb_path2class(const char*);
rb_path2class     110 marshal.c          if (rb_path2class(n) != rb_class_real(klass)) {
rb_path2class     913 marshal.c          VALUE v = rb_path2class(path);
rb_path2class     924 marshal.c          VALUE v = rb_path2class(path);
rb_path2class    1243 marshal.c      	    v = rb_path2class(RSTRING(str)->ptr);


rb_path_check

rb_path_check    4200 file.c         	    if (rb_safe_level() >= 1 && !rb_path_check(lpath)) {
rb_path_check    1638 hash.c             path_tainted = rb_path_check(path)?0:1;
rb_path_check     324 intern.h       int rb_path_check(const char*);


rb_path_end

rb_path_end       824 dir.c              if (path && *(pend = rb_path_end(rb_path_skip_prefix(path)))) {
rb_path_end      2358 file.c         #define chompdirsep rb_path_end
rb_path_end       294 intern.h       char *rb_path_end(const char *);


rb_path_last_separator

rb_path_last_separator 2339 file.c         #define strrdirsep rb_path_last_separator
rb_path_last_separator  293 intern.h       char *rb_path_last_separator(const char *);


rb_path_next

rb_path_next     2303 file.c         #define nextdirsep rb_path_next
rb_path_next      291 intern.h       char *rb_path_next(const char *);


rb_path_skip_prefix

rb_path_skip_prefix  824 dir.c              if (path && *(pend = rb_path_end(rb_path_skip_prefix(path)))) {
rb_path_skip_prefix 1318 dir.c              root = rb_path_skip_prefix(root);
rb_path_skip_prefix 2314 file.c         #define skipprefix rb_path_skip_prefix
rb_path_skip_prefix  292 intern.h       char *rb_path_skip_prefix(const char *);


rb_proc_arity

rb_proc_arity    8385 eval.c             int arity = rb_proc_arity(proc);
rb_proc_arity    9046 eval.c         	return rb_proc_arity(body->nd_cval);
rb_proc_arity     243 intern.h       int rb_proc_arity(VALUE);


rb_proc_call

rb_proc_call       32 enumerator.c       return rb_proc_call(proc, args);
rb_proc_call     9399 eval.c             rb_define_method(rb_cProc, "call", rb_proc_call, -2);
rb_proc_call     9401 eval.c             rb_define_method(rb_cProc, "[]", rb_proc_call, -2);
rb_proc_call      242 intern.h       VALUE rb_proc_call(VALUE, VALUE);


rb_proc_exec

rb_proc_exec      412 intern.h       int rb_proc_exec(const char*);
rb_proc_exec     1249 process.c      	rb_proc_exec(prog);


rb_proc_exec_n

rb_proc_exec_n    411 intern.h       int rb_proc_exec_n(int, VALUE*, const char*);
rb_proc_exec_n   1252 process.c      	rb_proc_exec_n(argc, argv, prog);


rb_proc_new

rb_proc_new      5433 ext/tk/tcltklib.c         ret = rb_funcall(rb_proc_new(callq_safelevel_handler, q_dat),
rb_proc_new      5752 ext/tk/tcltklib.c         ret = rb_funcall(rb_proc_new(evq_safelevel_handler, q_dat),
rb_proc_new      6826 ext/tk/tcltklib.c         ret = rb_funcall(rb_proc_new(ivq_safelevel_handler, q_dat),
rb_proc_new       241 intern.h       VALUE rb_proc_new(VALUE (*)(ANYARGS/* VALUE yieldarg[, VALUE procarg] */), VALUE);


rb_proc_times

rb_proc_times     420 intern.h       VALUE rb_proc_times(VALUE);
rb_proc_times    3709 process.c          rb_define_module_function(rb_mProcess, "times", rb_proc_times, 0);
rb_proc_times    1904 time.c             return rb_proc_times(obj);


rb_protect

rb_protect        908 dir.c              ((flags & GLOB_VERBOSE) && rb_protect((VALUE (*)(VALUE))rb_sys_warning, (VALUE)(val), 0))
rb_protect       1349 dir.c              rb_protect(glob_func_caller, a, &status);
rb_protect        701 error.c        	    d = rb_protect(rb_inspect, obj, 0);
rb_protect       1587 eval.c             return rb_protect((VALUE (*)(VALUE))rb_eval_string, (VALUE)str, state);
rb_protect       9848 eval.c             val = rb_protect(run_trap_eval, (VALUE)&arg, &state);
rb_protect       10582 eval.c         		rb_protect((VALUE (*)(VALUE))rb_trap_exec, Qnil, &status);
rb_protect        367 ext/dbm/dbm.c          ret = rb_protect(rb_yield, rb_assoc_new(rb_str_dup(keystr), valstr), &status);
rb_protect        460 ext/gdbm/gdbm.c         ret = rb_protect(rb_yield, rb_assoc_new(keystr, valstr), &status);
rb_protect        708 ext/iconv/iconv.c     rb_protect(list_iconv_i, (VALUE)&list, state);
rb_protect         77 ext/openssl/ossl.c     return (STACK_OF(X509)*)rb_protect((VALUE(*)_((VALUE)))ossl_x509_ary2sk0,
rb_protect        133 ext/openssl/ossl.c     str = rb_protect((VALUE(*)_((VALUE)))ossl_str_new, len, &status);
rb_protect        171 ext/openssl/ossl.c 	pass  = rb_protect(ossl_pem_passwd_cb0, rflag, &status);
rb_protect        213 ext/openssl/ossl.c 	rctx = rb_protect((VALUE(*)(VALUE))ossl_x509stctx_new,
rb_protect        330 ext/openssl/ossl_asn1.c     ret = rb_protect((VALUE(*)_((VALUE)))asn1integer_to_num,
rb_protect        375 ext/openssl/ossl_asn1.c     ret = rb_protect((VALUE(*)_((VALUE)))asn1integer_to_num,
rb_protect        437 ext/openssl/ossl_asn1.c     ret = rb_protect((VALUE(*)_((VALUE)))asn1time_to_time,
rb_protect         53 ext/openssl/ossl_bio.c      ret = (BIO*)rb_protect((VALUE(*)_((VALUE)))ossl_obj2bio, obj, status);
rb_protect         72 ext/openssl/ossl_bio.c     return rb_protect((VALUE(*)_((VALUE)))ossl_membio2str0, (VALUE)bio, status);
rb_protect        471 ext/openssl/ossl_ocsp.c 	tmp = rb_protect(rb_Integer, revtime, &rstatus);
rb_protect        475 ext/openssl/ossl_ocsp.c     tmp = rb_protect(rb_Integer, thisupd, &rstatus);
rb_protect        478 ext/openssl/ossl_ocsp.c     tmp = rb_protect(rb_Integer, nextupd, &rstatus);
rb_protect         98 ext/openssl/ossl_pkcs12.c     pkey = rb_protect((VALUE(*)_((VALUE)))ossl_pkey_new, (VALUE)key,
rb_protect        101 ext/openssl/ossl_pkcs12.c     cert = rb_protect((VALUE(*)_((VALUE)))ossl_x509_new, (VALUE)x509, &st);
rb_protect        105 ext/openssl/ossl_pkcs12.c 	    rb_protect((VALUE(*)_((VALUE)))ossl_x509_sk2ary, (VALUE)x509s, &st);
rb_protect        204 ext/openssl/ossl_ssl.c     success = rb_protect((VALUE(*)_((VALUE)))ossl_call_client_cert_cb,
rb_protect        241 ext/openssl/ossl_ssl.c     success = rb_protect((VALUE(*)_((VALUE)))ossl_call_tmp_dh_callback,
rb_protect        286 ext/pty/pty.c  	rb_protect(pty_exec, (VALUE)&arg, &status);
rb_protect         71 ext/readline/readline.c     buff = (char*)rb_protect((VALUE(*)_((VALUE)))readline, (VALUE)prompt,
rb_protect        345 ext/sdbm/init.c         ret = rb_protect(rb_yield, rb_assoc_new(rb_str_dup(keystr), valstr), &status);
rb_protect       1495 ext/socket/socket.c         status = rb_protect(unixsock_connect_internal, (VALUE)&arg, &prot);
rb_protect       1336 ext/tk/tcltklib.c             found_event = RTEST(rb_protect(call_DoOneEvent,
rb_protect       1456 ext/tk/tcltklib.c                     st = RTEST(rb_protect(call_DoOneEvent,
rb_protect       1528 ext/tk/tcltklib.c                         rb_protect(eventloop_sleep, Qnil, &status);
rb_protect       1657 ext/tk/tcltklib.c     ret = rb_protect(lib_eventloop_main_core, args, &status);
rb_protect       2017 ext/tk/tcltklib.c         ret = rb_protect(_thread_call_proc_value, th, &status);
rb_protect       2211 ext/tk/tcltklib.c     ret = rb_protect(proc, data, &status);
rb_protect       5617 ext/tk/tcltklib.c           ret = rb_protect(call_tcl_eval, (VALUE)&inf, &status);
rb_protect       6578 ext/tk/tcltklib.c     ret = rb_protect(invoke_tcl_proc, (VALUE)&inf, &status);
rb_protect       2291 ext/zlib/zlib.c 	    rb_protect(gzfile_finalize, (VALUE)gz, &aborted);
rb_protect       1783 gc.c           	rb_protect((VALUE(*)(VALUE))run_single_final, (VALUE)args, &status);
rb_protect       1791 gc.c           	    rb_protect((VALUE(*)(VALUE))run_single_final, (VALUE)args, &status);
rb_protect        248 intern.h       VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*);
rb_protect       4892 io.c               r = rb_protect(io_new_instance, (VALUE)args, &state);
rb_protect       4900 io.c               w = rb_protect(io_new_instance, (VALUE)args, &state);
rb_protect       1334 process.c      		rb_protect((VALUE (*)())rb_thread_sleep, 1, &state);
rb_protect       1374 process.c      		rb_protect(proc_syswait, (VALUE)pid, status);
rb_protect       1426 process.c      	    rb_protect(rb_yield, Qundef, &status);
rb_protect        373 ruby.c         	rb_protect((VALUE (*)(VALUE))rb_require, (VALUE)list->name, &state);
rb_protect       3446 win32/win32.c      RUBY_CRITICAL(rb_protect((VALUE (*)(VALUE))h->handler, (VALUE)h->arg, &h->status);


rb_provide

rb_provide        393 enumerator.c       rb_provide("enumerator.so");	/* for backward compatibility */
rb_provide        234 intern.h       void rb_provide(const char*);


rb_provide_feature

rb_provide_feature 6769 eval.c             rb_provide_feature(rb_str_new2(feature));
rb_provide_feature 6955 eval.c         		rb_provide_feature(path);


rb_provided

rb_provided       233 intern.h       int rb_provided(const char*);
rb_provided      1226 variable.c         if (!load || !(file = load->nd_lit) || rb_provided(RSTRING(file)->ptr)) {
rb_provided      1248 variable.c         if (!rb_provided(RSTRING(file)->ptr)) {


rb_push_glob

rb_push_glob     1534 dir.c          	return rb_push_glob(argv[0], 0);
rb_push_glob     1612 dir.c          	ary = rb_push_glob(str, flags);


rb_quad_pack

rb_quad_pack       94 intern.h       void rb_quad_pack(char*,VALUE);
rb_quad_pack      717 pack.c         		rb_quad_pack(tmp, from);


rb_quad_unpack

rb_quad_unpack     95 intern.h       VALUE rb_quad_unpack(const char*,int);
rb_quad_unpack   1565 pack.c         		rb_ary_push(ary, rb_quad_unpack(tmp, 1));
rb_quad_unpack   1574 pack.c         		rb_ary_push(ary, rb_quad_unpack(tmp, 0));


rb_raise

rb_raise           49 array.c        	rb_raise(rb_eRuntimeError, "can't modify array during iteration");
rb_raise           51 array.c        	rb_raise(rb_eSecurityError, "Insecure: can't modify array");
rb_raise          110 array.c        	rb_raise(rb_eArgError, "negative array size (or size too big)");
rb_raise          113 array.c        	rb_raise(rb_eArgError, "array size too big");
rb_raise          337 array.c        	rb_raise(rb_eArgError, "negative array size");
rb_raise          340 array.c        	rb_raise(rb_eArgError, "array size too big");
rb_raise          395 array.c        	    rb_raise(rb_eIndexError, "index %ld out of array",
rb_raise          409 array.c        	    rb_raise(rb_eArgError, "index too big");
rb_raise          437 array.c        	rb_raise(rb_eArgError, "negative array size");
rb_raise          867 array.c        	    rb_raise(rb_eIndexError, "index %ld out of array", idx);
rb_raise          973 array.c            if (len < 0) rb_raise(rb_eIndexError, "negative length (%ld)", len);
rb_raise          978 array.c        	    rb_raise(rb_eIndexError, "index %ld out of array", beg);
rb_raise         1068 array.c        	rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)", argc);
rb_raise         1105 array.c        	rb_raise(rb_eArgError, "wrong number of arguments (at least 1)");
rb_raise         1472 array.c        	rb_raise(rb_eRuntimeError, "array modified during sort");
rb_raise         2011 array.c        	    rb_raise(rb_eIndexError, "element size differs (%ld should be %ld)",
rb_raise         2239 array.c        	rb_raise(rb_eArgError, "negative argument");
rb_raise         2242 array.c        	rb_raise(rb_eArgError, "argument too big");
rb_raise         2750 array.c        	rb_raise(rb_eArgError, "tried to flatten recursive array");
rb_raise          262 bignum.c       	rb_raise(rb_eRangeError, "bignum too big to convert into `quad int'");
rb_raise          393 bignum.c       	    rb_raise(rb_eArgError, "illegal radix %d", base);
rb_raise          627 bignum.c       	rb_raise(rb_eArgError, "illegal radix %d", base);
rb_raise          704 bignum.c       	    rb_raise(rb_eRangeError, "bignum too big to convert into `%s'", type);
rb_raise          733 bignum.c       	    rb_raise(rb_eRangeError, "bignum out of range of unsigned long");
rb_raise          746 bignum.c       	rb_raise(rb_eRangeError, "bignum too big to convert into `long'");
rb_raise          762 bignum.c       	rb_raise(rb_eRangeError, "bignum too big to convert into `%s'", type);
rb_raise          788 bignum.c       	rb_raise(rb_eRangeError, "bignum too big to convert into `long long'");
rb_raise          806 bignum.c       	rb_raise(rb_eFloatDomainError, d < 0 ? "-Infinity" : "Infinity");
rb_raise          809 bignum.c       	rb_raise(rb_eFloatDomainError, "NaN");
rb_raise         1912 bignum.c       	rb_raise(rb_eTypeError, "can't coerce %s to Bignum",
rb_raise           40 class.c        	rb_raise(rb_eTypeError, "superclass must be a Class (%s given)",
rb_raise           44 class.c        	rb_raise(rb_eTypeError, "can't make subclass of singleton class");
rb_raise           54 class.c        	rb_raise(rb_eTypeError, "can't make subclass of Class");
rb_raise           98 class.c        	rb_raise(rb_eTypeError, "already initialized class");
rb_raise          101 class.c        	rb_raise(rb_eTypeError, "can't copy singleton class");
rb_raise          203 class.c        	    rb_raise(rb_eTypeError, "%s is not a class", name);
rb_raise          232 class.c        	    rb_raise(rb_eTypeError, "%s is not a class", name);
rb_raise          287 class.c        	rb_raise(rb_eTypeError, "%s is not a module", rb_obj_classname(module));
rb_raise          307 class.c        	rb_raise(rb_eTypeError, "%s::%s is not a module",
rb_raise          368 class.c        	    rb_raise(rb_eArgError, "cyclic include detected");
rb_raise          772 class.c        	rb_raise(rb_eTypeError, "can't define singleton");
rb_raise          849 class.c        	    rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", argc, n);
rb_raise          904 class.c        	rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", argc, i);
rb_raise           47 compar.c           rb_raise(rb_eArgError, "comparison of %s with %s failed",
rb_raise          441 dir.c              rb_raise(rb_eIOError, "closed directory");
rb_raise          767 dir.c          	    if (!dist) rb_raise(rb_eArgError, "HOME/LOGDIR not set");
rb_raise         1633 dir.c          	rb_raise(rb_eTypeError, "wrong argument type %s (expected Dir)",
rb_raise         1266 dln.c              rb_raise(rb_eLoadError, "this executable file can't load extension libraries");
rb_raise          428 enum.c         	rb_raise(rb_eRuntimeError, "sort_by reentered");
rb_raise          533 enum.c         	rb_raise(rb_eRuntimeError, "sort_by reentered");
rb_raise           70 enumerator.c   	rb_raise(rb_eTypeError,
rb_raise           75 enumerator.c   	rb_raise(rb_eArgError, "uninitialized enumerator");
rb_raise          166 enumerator.c       if (size <= 0) rb_raise(rb_eArgError, "invalid slice size");
rb_raise          234 enumerator.c       if (size <= 0) rb_raise(rb_eArgError, "invalid size");
rb_raise          303 enumerator.c   	rb_raise(rb_eArgError, "wrong number of argument (0 for 1)");
rb_raise          229 error.c        		rb_raise(rb_eTypeError, "wrong argument type %s (expected %s)",
rb_raise          444 error.c        	    rb_raise(rb_eTypeError, err);
rb_raise          448 error.c        		rb_raise(rb_eTypeError, err);
rb_raise          748 error.c            rb_raise(rb_eArgError, "invalid value for %s: %s", type, RSTRING(s)->ptr);
rb_raise          843 error.c        		rb_raise(rb_eTypeError, "invalid instance type");
rb_raise         1026 error.c            rb_raise(rb_eNotImpError,
rb_raise         1089 error.c            rb_raise(rb_eRuntimeError, "can't modify frozen %s", what);
rb_raise          247 eval.c         	    rb_raise(rb_eSecurityError, "Insecure operation `%s' at level %d",
rb_raise          251 eval.c         	    rb_raise(rb_eSecurityError, "Insecure operation at level %d", ruby_safe_level);
rb_raise          267 eval.c         	    rb_raise(rb_eSecurityError, "Insecure operation - %s",
rb_raise          271 eval.c         	    rb_raise(rb_eSecurityError, "Insecure operation: -r");
rb_raise          282 eval.c         	rb_raise(rb_eTypeError, "wrong argument type %s (expected String)",
rb_raise          388 eval.c         	rb_raise(rb_eSecurityError, "Insecure: can't define method");
rb_raise          525 eval.c         	rb_raise(rb_eSecurityError, "Insecure: can't remove method");
rb_raise          663 eval.c         	rb_raise(rb_eArgError, "argument needs to be symbol or string");
rb_raise         1818 eval.c         	rb_raise(rb_eTypeError, "no class variables available");
rb_raise         1918 eval.c         	rb_raise(rb_eSecurityError, "Insecure: can't undef `%s'", rb_id2name(id));
rb_raise         2472 eval.c         	rb_raise(rb_eTypeError, "trace_func needs to be Proc");
rb_raise         2662 eval.c         	    rb_raise(rb_eTypeError, "%s is not a class/module",
rb_raise         3315 eval.c         		    rb_raise(rb_eNoMethodError, "super called outside of method");
rb_raise         3324 eval.c                                 rb_raise(rb_eRuntimeError,
rb_raise         3490 eval.c         		rb_raise(rb_eTypeError, "no class/module to define constant");
rb_raise         3498 eval.c         	    rb_raise(rb_eTypeError, "no class/module to define class variable");
rb_raise         3560 eval.c         		    rb_raise(rb_eTypeError, "%s is not a class/module",
rb_raise         3729 eval.c         		rb_raise(rb_eTypeError, "no class/module to add method");
rb_raise         3776 eval.c         		rb_raise(rb_eSecurityError, "Insecure: can't define singleton method");
rb_raise         3779 eval.c         		rb_raise(rb_eTypeError,
rb_raise         3789 eval.c         		    rb_raise(rb_eSecurityError, "redefining method prohibited");
rb_raise         3804 eval.c         	    rb_raise(rb_eTypeError, "no class to undef method");
rb_raise         3812 eval.c         	    rb_raise(rb_eTypeError, "no class to make alias");
rb_raise         3834 eval.c         		rb_raise(rb_eTypeError, "no outer class/module");
rb_raise         3847 eval.c         		    rb_raise(rb_eTypeError, "%s is not a class",
rb_raise         3853 eval.c         			rb_raise(rb_eTypeError, "superclass mismatch for class %s",
rb_raise         3859 eval.c         		    rb_raise(rb_eSecurityError, "extending class prohibited");
rb_raise         3886 eval.c         		rb_raise(rb_eTypeError, "no outer class/module");
rb_raise         3893 eval.c         		    rb_raise(rb_eTypeError, "%s is not a module",
rb_raise         3897 eval.c         		    rb_raise(rb_eSecurityError, "extending module prohibited");
rb_raise         3920 eval.c         		rb_raise(rb_eTypeError, "no singleton class for %s",
rb_raise         3924 eval.c         		rb_raise(rb_eSecurityError, "Insecure: can't extend object");
rb_raise         4418 eval.c             rb_raise(rb_eInterrupt, "");
rb_raise         4479 eval.c         	    rb_raise(rb_eTypeError, "exception class/object expected");
rb_raise         4484 eval.c         	rb_raise(rb_eArgError, "wrong number of arguments");
rb_raise         4489 eval.c         	    rb_raise(rb_eTypeError, "exception object expected");
rb_raise         4603 eval.c         	    rb_raise(rb_eThreadError, "return can't jump across threads");
rb_raise         4702 eval.c         		    rb_raise(rb_eArgError, "wrong number of arguments (%ld for 0)",
rb_raise         4708 eval.c         		    rb_raise(rb_eArgError, "wrong number of arguments (%ld for 0)",
rb_raise         4778 eval.c         	rb_raise(rb_eArgError, "wrong number of arguments (%ld for 0)",
rb_raise         5005 eval.c             rb_raise(rb_eArgError, "wrong number of arguments (%ld for %ld)", len, i);
rb_raise         5155 eval.c         	    rb_raise(rb_eTypeError, "class or module required for rescue clause");
rb_raise         5353 eval.c         	rb_raise(rb_eArgError, "no id given");
rb_raise         5409 eval.c         	rb_raise(rb_eTypeError, "allocator undefined for %s", rb_class2name(obj));
rb_raise         5423 eval.c         	rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)",
rb_raise         5497 eval.c         	rb_raise(rb_eArgError, "too many arguments (%d)", len);
rb_raise         5515 eval.c         	rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", argc, i);
rb_raise         5526 eval.c         	    rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", argc, nopt);
rb_raise         5651 eval.c         	    rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc);
rb_raise         5658 eval.c         	    rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc);
rb_raise         5698 eval.c         		    rb_raise(rb_eSecurityError, "calling insecure method: %s",
rb_raise         5777 eval.c         	rb_raise(rb_eNotImpError, "method `%s' called on terminated object (%p)",
rb_raise         5836 eval.c             if (argc == 0) rb_raise(rb_eArgError, "no method name given");
rb_raise         6040 eval.c             if (lev < 0) rb_raise(rb_eArgError, "negative level (%d)", lev);
rb_raise         6105 eval.c         	    rb_raise(rb_eTypeError, "wrong argument type %s (expected Proc/Binding)",
rb_raise         6251 eval.c         	    rb_raise(rb_eSecurityError, "Insecure: can't modify trusted binding");
rb_raise         6375 eval.c         	    rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc);
rb_raise         6384 eval.c         	    rb_raise(rb_eArgError, "block not supplied");
rb_raise         6394 eval.c         		rb_raise(rb_eArgError, "wrong number of arguments: %s(src) or %s{..}",
rb_raise         6895 eval.c             rb_raise(rb_eLoadError, "no such file to load -- %s", RSTRING(fname)->ptr);
rb_raise         6993 eval.c         	rb_raise(rb_eSecurityError, "Insecure: can't change method visibility");
rb_raise         7190 eval.c         	rb_raise(rb_eTypeError, "module_function must be called for modules");
rb_raise         7350 eval.c         	rb_raise(rb_eArgError, "wrong number of arguments (0 for 1)");
rb_raise         7387 eval.c         	rb_raise(rb_eTypeError, "assigning non-exception to $!");
rb_raise         7402 eval.c         	rb_raise(rb_eArgError, "$! not set");
rb_raise         7549 eval.c         	rb_raise(rb_eArgError, "called without a block");
rb_raise         8080 eval.c         	rb_raise(rb_eArgError, "tried to create Proc object without a block");
rb_raise         8541 eval.c         	    rb_raise(rb_eTypeError, "wrong argument type %s (expected Proc)",
rb_raise         8549 eval.c         	rb_raise(rb_eSecurityError, "Insecure: tainted block value");
rb_raise         8891 eval.c         	rb_raise(rb_eTypeError, "can't call unbound method; bind first");
rb_raise         9005 eval.c         	    rb_raise(rb_eTypeError, "singleton method called for a different object");
rb_raise         9016 eval.c         	    rb_raise(rb_eTypeError, "bind argument must be an instance of %s",
rb_raise         9057 eval.c         	rb_raise(rb_eArgError, "invalid node 0x%x", nd_type(body));
rb_raise         9310 eval.c         	    rb_raise(rb_eTypeError, "wrong argument type %s (expected Proc/Method)",
rb_raise         9315 eval.c         	rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc);
rb_raise         9322 eval.c         		rb_raise(rb_eTypeError, "can't bind singleton method to a different class");
rb_raise         9325 eval.c         		rb_raise(rb_eTypeError, "bind argument must be a subclass of %s",
rb_raise         9344 eval.c         	rb_raise(rb_eTypeError, "wrong argument type (expected Proc/Method)");
rb_raise         9905 eval.c         	rb_raise(rb_eSecurityError, "tried to downgrade safe level from %d to %d",
rb_raise         10070 eval.c         	rb_raise(rb_eTypeError, "wrong argument type %s (expected Thread)",
rb_raise         10183 eval.c         	rb_raise(rb_eSignal, "SIG%s", th_signm);
rb_raise         10917 eval.c         	    rb_raise(rb_eThreadError, "thread %p tried to join itself",
rb_raise         10920 eval.c         	    rb_raise(rb_eThreadError, "Thread#join: deadlock %p - mutual join(%p)",
rb_raise         11101 eval.c         	rb_raise(rb_eThreadError, "killed thread");
rb_raise         11261 eval.c         	rb_raise(rb_eThreadError, "stopping only thread\n\tnote: use sleep to stop forever");
rb_raise         11710 eval.c         	rb_raise(rb_eThreadError,
rb_raise         11923 eval.c         	rb_raise(rb_eThreadError, "uninitialized thread - check `%s#initialize'",
rb_raise         11955 eval.c         	rb_raise(rb_eThreadError, "must be called with a block");
rb_raise         11961 eval.c         	    rb_raise(rb_eThreadError, "already initialized thread");
rb_raise         11963 eval.c         	rb_raise(rb_eThreadError, "already initialized thread - %s:%d",
rb_raise         11984 eval.c         	rb_raise(rb_eThreadError, "must be called with a block");
rb_raise         12201 eval.c         	rb_raise(rb_eSignal, "SIG%s", sig);
rb_raise         12263 eval.c         	rb_raise(rb_eArgError, "unstarted thread");
rb_raise         12326 eval.c         	rb_raise(rb_eSecurityError, "Insecure: thread locals");
rb_raise         12369 eval.c         	rb_raise(rb_eSecurityError, "Insecure: can't modify thread locals");
rb_raise         12615 eval.c         	rb_raise(rb_eRuntimeError, "continuation called across threads");
rb_raise         12618 eval.c         	rb_raise(rb_eRuntimeError, "continuation called across trap");
rb_raise         12783 eval.c         	rb_raise(rb_eTypeError, "wrong argument type %s (expected Thread)",
rb_raise         12788 eval.c               rb_raise(rb_eThreadError, "can't move to the frozen thread group");
rb_raise         12792 eval.c         	rb_raise(rb_eThreadError, "can't move to the enclosed thread group");
rb_raise         12799 eval.c         	rb_raise(rb_eThreadError, "can't move from the frozen thread group");
rb_raise         12803 eval.c         	rb_raise(rb_eThreadError, "can't move from the enclosed thread group");
rb_raise         12994 eval.c         	    rb_raise(rb_eThreadError, "uncaught throw `%s' in thread %p",
rb_raise         13068 eval.c         	rb_raise(rb_eTypeError, "invalid inspect_tbl hash for %s in %s",
rb_raise         13075 eval.c         	rb_raise(rb_eTypeError, "invalid inspect_tbl list for %s in %s",
rb_raise           55 ext/Win32API/Win32API.c 	rb_raise(rb_eRuntimeError, "LoadLibrary: %s\n", RSTRING(dllname)->ptr);
rb_raise           63 ext/Win32API/Win32API.c 	    rb_raise(rb_eRuntimeError, "GetProcAddress: %s or %s\n",
rb_raise          111 ext/Win32API/Win32API.c 	rb_raise(rb_eRuntimeError, "too many parameters: %d\n", RARRAY(a_import)->len);
rb_raise          166 ext/Win32API/Win32API.c 	rb_raise(rb_eRuntimeError, "wrong number of parameters: expected %d, got %d",
rb_raise          126 ext/bigdecimal/bigdecimal.c         rb_raise(rb_eTypeError, "%s can't be coerced into BigDecimal",
rb_raise          205 ext/bigdecimal/bigdecimal.c             rb_raise(rb_eTypeError, "load failed: invalid character in the marshaled string");
rb_raise          233 ext/bigdecimal/bigdecimal.c             rb_raise(rb_eTypeError, "second argument must be true or false");
rb_raise          253 ext/bigdecimal/bigdecimal.c             rb_raise(rb_eTypeError, "invalid rounding mode");
rb_raise          259 ext/bigdecimal/bigdecimal.c     rb_raise(rb_eTypeError, "first argument for BigDecimal#mode invalid");
rb_raise          291 ext/bigdecimal/bigdecimal.c         rb_raise(rb_eArgError, "argument must be positive");
rb_raise          943 ext/bigdecimal/bigdecimal.c             rb_raise(rb_eTypeError, "invalid rounding mode");
rb_raise         1231 ext/bigdecimal/bigdecimal.c             rb_raise(rb_eArgError, "argument must be positive");
rb_raise         1619 ext/bigdecimal/bigdecimal.c     else   rb_raise(exc,str);
rb_raise           82 ext/curses/curses.c     rb_raise(rb_eRuntimeError, "already closed window");
rb_raise           87 ext/curses/curses.c 	rb_raise(rb_eSecurityError, "Insecure: operation on untainted window");\
rb_raise          110 ext/curses/curses.c 	rb_raise(rb_eRuntimeError, "failed to create window");
rb_raise          130 ext/curses/curses.c 	rb_raise(rb_eRuntimeError, "can't initialize curses");
rb_raise          661 ext/curses/curses.c   rb_raise(rb_eRuntimeError, "no such mouse event");
rb_raise          666 ext/curses/curses.c 	rb_raise(rb_eSecurityError, "Insecure: operation on untainted mouse");\
rb_raise           37 ext/dbm/dbm.c      rb_raise(rb_eDBMError, "closed DBM file");
rb_raise          212 ext/dbm/dbm.c  	rb_raise(rb_eIndexError, "key not found");
rb_raise          316 ext/dbm/dbm.c  	rb_raise(rb_eDBMError, "dbm_delete failed");
rb_raise          379 ext/dbm/dbm.c  	    rb_raise(rb_eDBMError, "dbm_delete failed");
rb_raise          401 ext/dbm/dbm.c  	    rb_raise(rb_eDBMError, "dbm_delete failed");
rb_raise          446 ext/dbm/dbm.c  	rb_raise(rb_eArgError, "pair must be [key, value]");
rb_raise          494 ext/dbm/dbm.c  	rb_raise(rb_eDBMError, "dbm_store failed");
rb_raise           68 ext/digest/digest.c 	rb_raise(rb_eNotImpError, "Digest::Base is an abstract class");
rb_raise          130 ext/digest/digest.c 	rb_raise(rb_eTypeError, "wrong argument class");
rb_raise           89 ext/dl/cfunc.c     rb_raise(rb_eTypeError, "DL::CFunc was expected");
rb_raise          240 ext/dl/cfunc.c   default: rb_raise(rb_eArgError, "too many arguments"); \
rb_raise          260 ext/dl/cfunc.c 	rb_raise(rb_eDLError, "can't call null-function");
rb_raise          266 ext/dl/cfunc.c 	    rb_raise(rb_eDLError, "too many arguments (stack overflow)");
rb_raise          366 ext/dl/cfunc.c 	    rb_raise(rb_eDLTypeError, "unknown type %d", cfunc->type);
rb_raise          464 ext/dl/cfunc.c 	    rb_raise(rb_eDLTypeError, "unknown type %d", cfunc->type);
rb_raise          468 ext/dl/cfunc.c 	rb_raise(rb_eDLError, "unsupported call type: %x", cfunc->calltype);
rb_raise           87 ext/dl/cptr.c      rb_raise(rb_eTypeError, "DL::PtrData was expected");
rb_raise          441 ext/dl/cptr.c  	    rb_raise(rb_eDLError, "to_ptr should return a CPtr object");
rb_raise           73 ext/dl/handle.c     rb_raise(rb_eDLError, err);
rb_raise           78 ext/dl/handle.c     rb_raise(rb_eDLError, err);
rb_raise          157 ext/dl/handle.c 	rb_raise(rb_eDLError, "closed handle");
rb_raise          189 ext/dl/handle.c 		    rb_raise(rb_eDLError, "unknown symbol \"%s\"", name);
rb_raise          207 ext/dl/handle.c 	    rb_raise(rb_eDLError, "unknown symbol \"%s\"", name);
rb_raise          140 ext/etc/etc.c      if (pwd == 0) rb_raise(rb_eArgError, "can't find user for %d", uid);
rb_raise          164 ext/etc/etc.c      if (pwd == 0) rb_raise(rb_eArgError, "can't find user for %s", RSTRING(nam)->ptr);
rb_raise          219 ext/etc/etc.c  	    rb_raise(rb_eRuntimeError, "parallel passwd iteration");
rb_raise          342 ext/etc/etc.c      if (grp == 0) rb_raise(rb_eArgError, "can't find group for %d", gid);
rb_raise          369 ext/etc/etc.c      if (grp == 0) rb_raise(rb_eArgError, "can't find group for %s", RSTRING(nam)->ptr);
rb_raise          424 ext/etc/etc.c  	    rb_raise(rb_eRuntimeError, "parallel group iteration");
rb_raise           27 ext/gdbm/gdbm.c     rb_raise(rb_eGDBMFatalError, msg);
rb_raise           38 ext/gdbm/gdbm.c     rb_raise(rb_eRuntimeError, "closed GDBM file");
rb_raise          151 ext/gdbm/gdbm.c 	    rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
rb_raise          307 ext/gdbm/gdbm.c 	rb_raise(rb_eIndexError, "key not found");
rb_raise          404 ext/gdbm/gdbm.c 	rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
rb_raise          490 ext/gdbm/gdbm.c 	    rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
rb_raise          501 ext/gdbm/gdbm.c                 rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
rb_raise          548 ext/gdbm/gdbm.c 	rb_raise(rb_eArgError, "pair must be [key, value]");
rb_raise          593 ext/gdbm/gdbm.c 	rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
rb_raise          839 ext/gdbm/gdbm.c 	rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
rb_raise          858 ext/gdbm/gdbm.c 	rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
rb_raise          881 ext/gdbm/gdbm.c 	rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
rb_raise          225 ext/iconv/iconv.c 	rb_raise(rb_eArgError, "Iconv expected (%s)", rb_class2name(CLASS_OF(obj)));
rb_raise          340 ext/iconv/iconv.c 	rb_raise(rb_eArgError, "closed iconv");
rb_raise          514 ext/iconv/iconv.c 	rb_raise(rb_eArgError, "unknown option - %s", StringValueCStr(name));
rb_raise          636 ext/iconv/iconv.c 	rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", argc, 2);
rb_raise          201 ext/openssl/ossl_cipher.c 	    rb_raise(eCipherError, "salt must be an 8-octet string");
rb_raise          228 ext/openssl/ossl_cipher.c         rb_raise(rb_eArgError, "data must not be empty");
rb_raise          150 ext/openssl/ossl_config.c     else rb_raise(rb_eArgError, "wrong number of arguments (0 for 1)");
rb_raise           25 ext/openssl/ossl_pkey.h 	rb_raise(rb_eRuntimeError, "PKEY wasn't initialized!"); \
rb_raise           33 ext/openssl/ossl_pkey.h 	rb_raise(rb_eRuntimeError, "PKEY wasn't initialized!");\
rb_raise          191 ext/openssl/ossl_x509name.c 	rb_raise(eX509NameError, NULL);
rb_raise          195 ext/openssl/ossl_x509name.c 	rb_raise(eX509NameError, NULL);
rb_raise          318 ext/pty/pty.c  	rb_raise(rb_eRuntimeError, "openpty() failed");
rb_raise          330 ext/pty/pty.c  	rb_raise(rb_eRuntimeError, "_getpty() failed");
rb_raise          376 ext/pty/pty.c      rb_raise(rb_eRuntimeError, "can't get Master/Slave device");
rb_raise          395 ext/pty/pty.c      rb_raise(rb_eRuntimeError, "can't get %s", SlaveName);
rb_raise           77 ext/racc/cparse/cparse.c         rb_raise(rb_eTypeError, "not symbol");
rb_raise          264 ext/racc/cparse/cparse.c         rb_raise(rb_eArgError, "%s() is finished before EndOfToken",
rb_raise          298 ext/racc/cparse/cparse.c         rb_raise(rb_eArgError, "extra token after EndOfToken");
rb_raise          345 ext/racc/cparse/cparse.c         rb_raise(RaccBug, "[Racc Bug] wrong arg.size %ld", RARRAY(arg)->len);
rb_raise          396 ext/racc/cparse/cparse.c         rb_raise(rb_eTypeError,
rb_raise          403 ext/racc/cparse/cparse.c         rb_raise(rb_eArgError,
rb_raise          458 ext/racc/cparse/cparse.c                 if (v->fin) rb_raise(rb_eArgError, "token given after EOF");
rb_raise          531 ext/racc/cparse/cparse.c             rb_raise(RaccBug, "[Racc Bug] unknown act value %ld", act);
rb_raise          633 ext/racc/cparse/cparse.c         rb_raise(RaccBug, "[Racc Bug] unknown act value %ld", act);
rb_raise          736 ext/racc/cparse/cparse.c         rb_raise(RaccBug, "state stack unexpectedly empty");
rb_raise           69 ext/readline/readline.c     if (!isatty(0) && errno == EBADF) rb_raise(rb_eIOError, "stdin closed");
rb_raise          130 ext/readline/readline.c 	rb_raise(rb_eArgError, "argument must respond to `call'");
rb_raise          533 ext/readline/readline.c 	rb_raise(rb_eIndexError, "invalid index");
rb_raise          556 ext/readline/readline.c 	rb_raise(rb_eIndexError, "invalid index");
rb_raise          685 ext/readline/readline.c 	rb_raise(rb_eIndexError, "invalid index");
rb_raise          280 ext/ripper/eventids2.c     rb_raise(rb_eRuntimeError, "[Ripper FATAL] unknown token %d", tok);
rb_raise           29 ext/sdbm/init.c     rb_raise(rb_eDBMError, "closed SDBM file");
rb_raise          190 ext/sdbm/init.c 	rb_raise(rb_eIndexError, "key not found");
rb_raise          294 ext/sdbm/init.c 	rb_raise(rb_eDBMError, "dbm_delete failed");
rb_raise          357 ext/sdbm/init.c 	    rb_raise(rb_eDBMError, "sdbm_delete failed");
rb_raise          379 ext/sdbm/init.c 	    rb_raise(rb_eDBMError, "sdbm_delete failed");
rb_raise          424 ext/sdbm/init.c 	rb_raise(rb_eArgError, "pair must be [key, value]");
rb_raise          477 ext/sdbm/init.c 	rb_raise(rb_eDBMError, "sdbm_store failed");
rb_raise          242 ext/socket/socket.c 	rb_raise(rb_eSecurityError, "Insecure: can't shutdown socket");
rb_raise          250 ext/socket/socket.c 	    rb_raise(rb_eArgError, "`how' should be either 0, 1, 2");
rb_raise          267 ext/socket/socket.c 	rb_raise(rb_eSecurityError, "Insecure: can't close socket");
rb_raise          286 ext/socket/socket.c 	rb_raise(rb_eSecurityError, "Insecure: can't close socket");
rb_raise          580 ext/socket/socket.c 	rb_raise(rb_eIOError, "recv for buffered IO");
rb_raise          590 ext/socket/socket.c 	rb_raise(rb_eRuntimeError, "buffer string modified");
rb_raise          613 ext/socket/socket.c 	    rb_raise(rb_eTypeError, "sockaddr size differs - should not happen");
rb_raise          665 ext/socket/socket.c     rb_raise(rb_eSocket, "%s: %s", reason, gai_strerror(error));
rb_raise          750 ext/socket/socket.c 	    rb_raise(rb_eArgError, "hostname too long (%d)", strlen(name));
rb_raise          778 ext/socket/socket.c 	    rb_raise(rb_eArgError, "service name too long (%d)", strlen(serv));
rb_raise          817 ext/socket/socket.c 	    rb_raise(rb_eSocket, "newline at the end of hostname");
rb_raise         1281 ext/socket/socket.c 	rb_raise(rb_eSecurityError, "Insecure: can't close socket");
rb_raise         1770 ext/socket/socket.c 	rb_raise(rb_eTypeError, "neither IO nor file descriptor");
rb_raise         1866 ext/socket/socket.c       rb_raise(rb_eSocket,
rb_raise         1871 ext/socket/socket.c       rb_raise(rb_eSocket,
rb_raise         1876 ext/socket/socket.c       rb_raise(rb_eSocket,
rb_raise         1881 ext/socket/socket.c       rb_raise(rb_eSocket,
rb_raise         1887 ext/socket/socket.c 	rb_raise(rb_eSocket,
rb_raise         2042 ext/socket/socket.c 	    rb_raise(rb_eSocket, "unknown socket domain %s", ptr);
rb_raise         2073 ext/socket/socket.c 	    rb_raise(rb_eSocket, "unknown socket type %s", ptr);
rb_raise         2678 ext/socket/socket.c 	rb_raise(rb_eSocket, "host not found");
rb_raise         2713 ext/socket/socket.c         rb_raise(rb_eSocket, "unknown socket family:%d", addr->sa_family);
rb_raise         2753 ext/socket/socket.c 	rb_raise(rb_eSocket, "%s", (char*)hstrerror(h_errno));
rb_raise         2755 ext/socket/socket.c 	rb_raise(rb_eSocket, "host not found");
rb_raise         2803 ext/socket/socket.c 	    rb_raise(rb_eSocket, "no such service %s/%s", s, RSTRING(proto)->ptr);
rb_raise         2823 ext/socket/socket.c 	rb_raise(rb_eSocket, "no such service for port %d/%s", NUM2INT(port), RSTRING(proto)->ptr);
rb_raise         2925 ext/socket/socket.c 	    rb_raise(rb_eTypeError, "sockaddr length too big");
rb_raise         2929 ext/socket/socket.c 	    rb_raise(rb_eTypeError, "sockaddr size differs - should not happen");
rb_raise         2961 ext/socket/socket.c 	    rb_raise(rb_eArgError, "array size should be 3 or 4, %ld given",
rb_raise         3010 ext/socket/socket.c 	rb_raise(rb_eTypeError, "expecting String or Array");
rb_raise         3027 ext/socket/socket.c 		rb_raise(rb_eSocket, "sockaddr resolved to multiple nodename");
rb_raise         3096 ext/socket/socket.c 	rb_raise(rb_eTypeError, "sockaddr_un size differs - %ld required; %d given",
rb_raise           79 ext/stringio/stringio.c 	rb_raise(rb_eTypeError, "wrong argument type %s (expected StringIO)",
rb_raise           92 ext/stringio/stringio.c 	rb_raise(rb_eIOError, "uninitialized stream");
rb_raise          108 ext/stringio/stringio.c 	rb_raise(rb_eIOError, "not opened for reading");
rb_raise          118 ext/stringio/stringio.c 	rb_raise(rb_eIOError, "not opened for writing");
rb_raise          131 ext/stringio/stringio.c 	rb_raise(rb_eIOError, "not modifiable string");
rb_raise          384 ext/stringio/stringio.c 	rb_raise(rb_eIOError, "closed stream");
rb_raise          403 ext/stringio/stringio.c 	rb_raise(rb_eIOError, "closing non-duplex IO for reading");
rb_raise          422 ext/stringio/stringio.c 	rb_raise(rb_eIOError, "closing non-duplex IO for writing");
rb_raise          654 ext/stringio/stringio.c 	rb_raise(rb_eArgError, "invalid whence %ld", NUM2LONG(whence));
rb_raise         1097 ext/stringio/stringio.c 		rb_raise(rb_eArgError, "negative length %ld given", len);
rb_raise         1123 ext/stringio/stringio.c 	rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc);
rb_raise         1195 ext/stringio/stringio.c 	rb_raise(rb_eIOError, "not opened");
rb_raise           54 ext/strscan/strscan.c     if (NIL_P(var->str)) rb_raise(rb_eArgError, "uninitialized StringScanner object");\
rb_raise          213 ext/strscan/strscan.c         rb_raise(rb_eTypeError,
rb_raise          411 ext/strscan/strscan.c     if (i < 0) rb_raise(rb_eRangeError, "index out of range");
rb_raise          412 ext/strscan/strscan.c     if (i > S_LEN(p)) rb_raise(rb_eRangeError, "index out of range");
rb_raise          448 ext/strscan/strscan.c     if (ret == -2) rb_raise(ScanError, "regexp buffer overflow");
rb_raise          821 ext/strscan/strscan.c         rb_raise(ScanError, "unscan failed: previous match record not exist");
rb_raise          185 ext/syck/rubyext.c         rb_raise(rb_eTypeError, "instance of IO needed");
rb_raise          653 ext/syck/rubyext.c     rb_raise(rb_eArgError, "%s on line %d, col %d: `%s'",
rb_raise         1634 ext/syck/rubyext.c             rb_raise( rb_eTypeError, "wrong argument type" );
rb_raise         1669 ext/syck/rubyext.c             rb_raise( rb_eTypeError, "wrong argument type" );
rb_raise         1744 ext/syck/rubyext.c         rb_raise( rb_eTypeError, "wrong argument type" );
rb_raise           26 ext/syslog/syslog.c         rb_raise(rb_eArgError, "no log message supplied");
rb_raise           30 ext/syslog/syslog.c         rb_raise(rb_eRuntimeError, "must open syslog before write");
rb_raise           42 ext/syslog/syslog.c         rb_raise(rb_eRuntimeError, "syslog not opened");
rb_raise           60 ext/syslog/syslog.c         rb_raise(rb_eRuntimeError, "syslog already open");
rb_raise          136 ext/syslog/syslog.c         rb_raise(rb_eRuntimeError, "must open syslog before setting log mask");
rb_raise          149 ext/syslog/syslog.c         rb_raise(rb_eArgError, "wrong number of arguments (%d for 2+)", argc);
rb_raise          156 ext/syslog/syslog.c       rb_raise(rb_eTypeError, "type mismatch: %s given", rb_class2name(CLASS_OF(pri)));
rb_raise          677 ext/tk/tcltklib.c             rb_raise(rb_eLoadError, "tcltklib: fail to open tcl_dll");
rb_raise          679 ext/tk/tcltklib.c             rb_raise(rb_eLoadError, "tcltklib: can't find Tcl_FindExecutable");
rb_raise          681 ext/tk/tcltklib.c             rb_raise(rb_eLoadError, "tcltklib: can't find Tcl_CreateInterp()");
rb_raise          683 ext/tk/tcltklib.c             rb_raise(rb_eLoadError, "tcltklib: can't find Tcl_DeleteInterp()");
rb_raise          685 ext/tk/tcltklib.c             rb_raise(rb_eRuntimeError, "tcltklib: fail to create a new IP to call Tcl_InitStubs()");
rb_raise          687 ext/tk/tcltklib.c             rb_raise(rb_eRuntimeError, "tcltklib: fail to Tcl_InitStubs()");
rb_raise          689 ext/tk/tcltklib.c             rb_raise(rb_eRuntimeError, "tcltklib: unknown error(%d) on ruby_tcl_stubs_init()", st);
rb_raise          955 ext/tk/tcltklib.c         rb_raise(rb_eArgError,
rb_raise         1022 ext/tk/tcltklib.c         rb_raise(rb_eArgError,
rb_raise         1076 ext/tk/tcltklib.c         rb_raise(rb_eArgError, "weight parameters must be positive numbers");
rb_raise         1143 ext/tk/tcltklib.c         rb_raise(rb_eArgError, "invalid value for time: '%s'",
rb_raise         2052 ext/tk/tcltklib.c         rb_raise(rb_eRuntimeError, "eventloop is already running");
rb_raise         2420 ext/tk/tcltklib.c         rb_raise(rb_eArgError,
rb_raise         2521 ext/tk/tcltklib.c         rb_raise(rb_eArgError, "too few arguments");
rb_raise         2566 ext/tk/tcltklib.c         rb_raise(rb_eArgError,
rb_raise         4676 ext/tk/tcltklib.c         rb_raise(rb_eSecurityError,
rb_raise         4697 ext/tk/tcltklib.c             rb_raise(rb_eLoadError, "tcltklib: fail to open tcl_dll");
rb_raise         4699 ext/tk/tcltklib.c             rb_raise(rb_eLoadError, "tcltklib: can't find Tcl_FindExecutable");
rb_raise         4701 ext/tk/tcltklib.c             rb_raise(rb_eLoadError, "tcltklib: can't find Tcl_CreateInterp()");
rb_raise         4703 ext/tk/tcltklib.c             rb_raise(rb_eLoadError, "tcltklib: can't find Tcl_DeleteInterp()");
rb_raise         4705 ext/tk/tcltklib.c             rb_raise(rb_eRuntimeError, "tcltklib: fail to create a new IP");
rb_raise         4707 ext/tk/tcltklib.c             rb_raise(rb_eRuntimeError, "tcltklib: fail to Tcl_InitStubs()");
rb_raise         4709 ext/tk/tcltklib.c             rb_raise(rb_eRuntimeError, "tcltklib: unknown error(%d) on ruby_tcl_create_ip_and_stubs_init", st);
rb_raise         4718 ext/tk/tcltklib.c       rb_raise(rb_eRuntimeError, "a new Tk interpreter has a NULL namespace");
rb_raise         4733 ext/tk/tcltklib.c         rb_raise(rb_eRuntimeError, "%s", Tcl_GetStringResult(ptr->ip));
rb_raise         4773 ext/tk/tcltklib.c             rb_raise(rb_eLoadError, "tcltklib: can't find Tk_Init()");
rb_raise         4775 ext/tk/tcltklib.c             rb_raise(rb_eRuntimeError, "tcltklib: fail to Tk_Init(). %s",
rb_raise         4778 ext/tk/tcltklib.c             rb_raise(rb_eRuntimeError, "tcltklib: fail to Tk_InitStubs(). %s",
rb_raise         4781 ext/tk/tcltklib.c             rb_raise(rb_eRuntimeError, "tcltklib: unknown error(%d) on ruby_tk_stubs_init", st);
rb_raise         4968 ext/tk/tcltklib.c         rb_raise(rb_eRuntimeError,
rb_raise         4995 ext/tk/tcltklib.c         rb_raise(rb_eArgError, "expected TclTkIp object");
rb_raise         5049 ext/tk/tcltklib.c         rb_raise(rb_eRuntimeError, "fail to create console-window");
rb_raise         5062 ext/tk/tcltklib.c         rb_raise(rb_eRuntimeError, "fail to create console-window");
rb_raise         5080 ext/tk/tcltklib.c         rb_raise(rb_eRuntimeError, "interpreter is deleted");
rb_raise         5130 ext/tk/tcltklib.c         rb_raise(rb_eRuntimeError, "interpreter is deleted");
rb_raise         5145 ext/tk/tcltklib.c         rb_raise(rb_eRuntimeError, "interpreter is deleted");
rb_raise         5164 ext/tk/tcltklib.c         rb_raise(rb_eRuntimeError, "interpreter is deleted");
rb_raise         5186 ext/tk/tcltklib.c         rb_raise(rb_eRuntimeError, "interpreter is deleted");
rb_raise         5190 ext/tk/tcltklib.c         rb_raise(rb_eSecurityError,
rb_raise         5945 ext/tk/tcltklib.c         rb_raise(rb_eRuntimeError, "interpreter is deleted");
rb_raise         5964 ext/tk/tcltklib.c         rb_raise(rb_eRuntimeError, "interpreter is deleted");
rb_raise         6056 ext/tk/tcltklib.c             rb_raise(rb_eArgError, "unknown encoding name '%s'",
rb_raise         6212 ext/tk/tcltklib.c             rb_raise(rb_eArgError, "unknown encoding name '%s'",
rb_raise         6375 ext/tk/tcltklib.c         rb_raise(rb_eArgError, "unknown encoding name '%s'",
rb_raise         6873 ext/tk/tcltklib.c         rb_raise(rb_eArgError, "command name missing");
rb_raise         7430 ext/tk/tcltklib.c                 rb_raise(rb_eRuntimeError, "can't get elements from list");
rb_raise         7432 ext/tk/tcltklib.c                 rb_raise(rb_eRuntimeError, "%s", Tcl_GetStringResult(interp));
rb_raise         7474 ext/tk/tcltklib.c                 rb_raise(rb_eRuntimeError, "can't get elements from list");
rb_raise         7476 ext/tk/tcltklib.c                 rb_raise(rb_eRuntimeError, "%s", interp->result);
rb_raise         7937 ext/tk/tcltklib.c         rb_raise(rb_eLoadError, "tcltklib: fail to open tcl_dll");
rb_raise         7939 ext/tk/tcltklib.c         rb_raise(rb_eLoadError, "tcltklib: can't find Tcl_FindExecutable");
rb_raise         7941 ext/tk/tcltklib.c         rb_raise(rb_eLoadError, "tcltklib: unknown error(%d) on ruby_open_tcl_dll", ret);
rb_raise          729 ext/tk/tkutil/tkutil.c         rb_raise(rb_eArgError, "too few arguments");
rb_raise          731 ext/tk/tkutil/tkutil.c         rb_raise(rb_eArgError, "too many arguments");
rb_raise          764 ext/tk/tkutil/tkutil.c         rb_raise(rb_eArgError, "Hash is expected for 1st argument");
rb_raise          902 ext/tk/tkutil/tkutil.c       rb_raise(rb_eArgError, "too few arguments");
rb_raise         1000 ext/tk/tkutil/tkutil.c     rb_raise(rb_eArgError,
rb_raise         1183 ext/tk/tkutil/tkutil.c         rb_raise(rb_eArgError,
rb_raise         1195 ext/tk/tkutil/tkutil.c         rb_raise(rb_eArgError,
rb_raise         1212 ext/tk/tkutil/tkutil.c         rb_raise(rb_eArgError, "expected a Hash");
rb_raise         1253 ext/tk/tkutil/tkutil.c             rb_raise(rb_eArgError, "arg #%d is not a String or a Symbol", i);
rb_raise         1267 ext/tk/tkutil/tkutil.c             rb_raise(rb_eArgError, "cannot find attribute :%s", str);
rb_raise           76 ext/win32ole/win32ole.c         rb_raise(rb_eRuntimeError, "failed to get Dispatch Interface");\
rb_raise          598 ext/win32ole/win32ole.c         rb_raise(ecs, "%s\n%s", buf, StringValuePtr(err_msg));
rb_raise          601 ext/win32ole/win32ole.c         rb_raise(ecs, "%s", buf);
rb_raise          789 ext/win32ole/win32ole.c             rb_raise(rb_eRuntimeError, "memory allocation error");
rb_raise         1113 ext/win32ole/win32ole.c             rb_raise(rb_eRuntimeError, "memory allocation error");
rb_raise         1578 ext/win32ole/win32ole.c         rb_raise(rb_eRuntimeError, "failed to load OLE32");
rb_raise         1583 ext/win32ole/win32ole.c         rb_raise(rb_eRuntimeError, "CoCreateInstanceEx is not supported in this environment");
rb_raise         1687 ext/win32ole/win32ole.c         rb_raise(rb_eSecurityError, "Insecure Object Connection - %s",
rb_raise         1772 ext/win32ole/win32ole.c         rb_raise(rb_eTypeError, "2nd parameter must be Class or Module");
rb_raise         1814 ext/win32ole/win32ole.c         rb_raise(rb_eTypeError, "1st parameter must be WIN32OLE instance");
rb_raise         1959 ext/win32ole/win32ole.c             rb_raise(rb_eRuntimeError, "no helpfile of `%s'",
rb_raise         1967 ext/win32ole/win32ole.c         rb_raise(rb_eTypeError, "1st parameter must be (String|WIN32OLE_TYPE|WIN32OLE_METHOD)");
rb_raise         1971 ext/win32ole/win32ole.c         rb_raise(rb_eRuntimeError, "failed to open help file `%s'",
rb_raise         2016 ext/win32ole/win32ole.c         rb_raise(eWIN32OLE_RUNTIME_ERROR, "codepage should be WIN32OLE::CP_ACP, WIN32OLE::CP_OEMCP, WIN32OLE::CP_MACCP, WIN32OLE::CP_THREAD_ACP, WIN32OLE::CP_SYMBOL, WIN32OLE::CP_UTF7, WIN32OLE::CP_UTF8");
rb_raise         2064 ext/win32ole/win32ole.c         rb_raise(rb_eSecurityError, "Insecure Object Creation - %s",
rb_raise         2069 ext/win32ole/win32ole.c             rb_raise(rb_eSecurityError, "Insecure Object Creation - %s",
rb_raise         2195 ext/win32ole/win32ole.c         rb_raise(rb_eRuntimeError, "failed to get dispatch interface");
rb_raise         2506 ext/win32ole/win32ole.c                         rb_raise(rb_eTypeError, "not valid value");
rb_raise         2871 ext/win32ole/win32ole.c         rb_raise(rb_eRuntimeError, "fail: unknown method or property");
rb_raise         3222 ext/win32ole/win32ole.c         rb_raise(rb_eRuntimeError, "failed to create WIN32OLE_TYPE obj from ITypeInfo");
rb_raise         3305 ext/win32ole/win32ole.c         rb_raise(rb_eRuntimeError, "failed to get type library info.");
rb_raise         3551 ext/win32ole/win32ole.c         rb_raise(eWIN32OLE_RUNTIME_ERROR, "not found %s",
rb_raise         3593 ext/win32ole/win32ole.c         rb_raise(rb_eTypeError, "1st argument should be TypeLib string");
rb_raise         3992 ext/win32ole/win32ole.c         rb_raise(rb_eArgError, "wrong number of arguments (%d for 1..3)", len);
rb_raise         4005 ext/win32ole/win32ole.c         rb_raise(eWIN32OLE_RUNTIME_ERROR, "not found type library `%s`",
rb_raise         4179 ext/win32ole/win32ole.c         rb_raise(eWIN32OLE_RUNTIME_ERROR, "failed to get type library path");
rb_raise         4226 ext/win32ole/win32ole.c         rb_raise(eWIN32OLE_RUNTIME_ERROR, "not found `%s` in `%s`",
rb_raise         5197 ext/win32ole/win32ole.c             rb_raise(eWIN32OLE_RUNTIME_ERROR, "not found %s",
rb_raise         5202 ext/win32ole/win32ole.c         rb_raise(rb_eTypeError, "1st argument should be WIN32OLE_TYPE object");
rb_raise         6695 ext/win32ole/win32ole.c         rb_raise(rb_eTypeError, "1st parameter must be WIN32OLE object");
rb_raise         6700 ext/win32ole/win32ole.c             rb_raise(rb_eSecurityError, "Insecure Event Creation - %s",
rb_raise         6878 ext/win32ole/win32ole.c         rb_raise(rb_eArgError, "wrong number of arguments (%d for 1..3)", len);
rb_raise          853 ext/zlib/zlib.c 	rb_raise(cZError, "stream is not ready");
rb_raise         1895 ext/zlib/zlib.c 	    rb_raise(cGzError, "unexpected end of file");
rb_raise         2002 ext/zlib/zlib.c 	rb_raise(cGzError, "not in gzip format");
rb_raise         2008 ext/zlib/zlib.c 	rb_raise(cGzError, "not in gzip format");
rb_raise         2011 ext/zlib/zlib.c 	rb_raise(cGzError, "unsupported compression method %d", head[2]);
rb_raise         2016 ext/zlib/zlib.c 	rb_raise(cGzError, "multi-part gzip file is not supported");
rb_raise         2019 ext/zlib/zlib.c 	rb_raise(cGzError, "encrypted gzip file is not supported");
rb_raise         2022 ext/zlib/zlib.c 	rb_raise(cGzError, "unknown flags 0x%02x", flags);
rb_raise         2041 ext/zlib/zlib.c 	    rb_raise(cGzError, "unexpected end of file");
rb_raise         2045 ext/zlib/zlib.c 	    rb_raise(cGzError, "unexpected end of file");
rb_raise         2078 ext/zlib/zlib.c 	rb_raise(cNoFooter, "footer is not found");
rb_raise         2088 ext/zlib/zlib.c 	rb_raise(cCRCError, "invalid compressed data -- crc error");
rb_raise         2091 ext/zlib/zlib.c 	rb_raise(cLengthError, "invalid compressed data -- length error");
rb_raise         2123 ext/zlib/zlib.c 		rb_raise(cGzError, "unexpected end of file");
rb_raise         2159 ext/zlib/zlib.c         rb_raise(rb_eArgError, "negative length %d given", len);
rb_raise         2188 ext/zlib/zlib.c         rb_raise(rb_eArgError, "negative length %d given", len);
rb_raise         2210 ext/zlib/zlib.c 	rb_raise(rb_eEOFError, "end of file reached");
rb_raise         2360 ext/zlib/zlib.c 	rb_raise(cGzError, "closed gzip stream");
rb_raise         2424 ext/zlib/zlib.c 	rb_raise(rb_eArgError, "wrong number of arguments (0 for 1)");
rb_raise         2549 ext/zlib/zlib.c 	rb_raise(cGzError, "header is already written");
rb_raise         2574 ext/zlib/zlib.c 	rb_raise(cGzError, "header is already written");
rb_raise         2597 ext/zlib/zlib.c 	rb_raise(cGzError, "header is already written");
rb_raise         3046 ext/zlib/zlib.c 	rb_raise(rb_eArgError, "negative length %d given", len);
rb_raise         3075 ext/zlib/zlib.c 	rb_raise(rb_eArgError, "negative length %d given", len);
rb_raise         3109 ext/zlib/zlib.c 	rb_raise(rb_eEOFError, "end of file reached");
rb_raise         3179 ext/zlib/zlib.c 	rb_raise(rb_eRuntimeError, "rs modified");
rb_raise         3291 ext/zlib/zlib.c 	rb_raise(rb_eEOFError, "end of file reached");
rb_raise          185 file.c             if (!st) rb_raise(rb_eTypeError, "uninitialized File::Stat");
rb_raise         2228 file.c         	rb_raise(rb_eArgError, "wrong number of arguments");
rb_raise         2414 file.c         		rb_raise(rb_eArgError, "couldn't find HOME environment -- expanding `%s'", s);
rb_raise         2445 file.c         		rb_raise(rb_eArgError, "user %s doesn't exist", buf);
rb_raise         3010 file.c         	rb_raise(rb_eIOError, "not opened for writing");
rb_raise         3143 file.c             if (n != argc) rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", argc, n);
rb_raise         3222 file.c             if (argc == 0) rb_raise(rb_eArgError, "wrong number of arguments");
rb_raise         3347 file.c             rb_raise(rb_eArgError, "unknown command ?%c", cmd);
rb_raise         3413 file.c         	rb_raise(rb_eTypeError, "wrong argument class");
rb_raise         4103 file.c         	    rb_raise(rb_eSecurityError, "loading from unsafe file %s", f);
rb_raise         4156 file.c         	    rb_raise(rb_eSecurityError, "loading from unsafe path %s", f);
rb_raise         4165 file.c         	    rb_raise(rb_eSecurityError, "loading from unsafe file %s", f);
rb_raise         4173 file.c         	    rb_raise(rb_eSecurityError, "loading from unsafe file %s", f);
rb_raise         4179 file.c         	rb_raise(rb_eSecurityError, "loading from non-absolute path %s", f);
rb_raise         4201 file.c         		rb_raise(rb_eSecurityError, "loading from unsafe path %s", lpath);
rb_raise         4214 file.c         	rb_raise(rb_eSecurityError, "loading from unsafe file %s", f);
rb_raise          103 gc.c           	rb_raise(rb_eNoMemError, "negative allocation size (or too big)");
rb_raise          129 gc.c           	rb_raise(rb_eArgError, "malloc: possible integer overflow");
rb_raise          151 gc.c           	rb_raise(rb_eArgError, "negative re-allocation size");
rb_raise          175 gc.c           	rb_raise(rb_eArgError, "realloc: possible integer overflow");
rb_raise         1652 gc.c           	rb_raise(rb_eArgError, "wrong type argument %s (should be callable)",
rb_raise         1729 gc.c           	rb_raise(rb_eArgError, "wrong type argument %s (should be callable)",
rb_raise         1895 gc.c           	rb_raise(rb_eRangeError, "%p is not id value", p0);
rb_raise         1898 gc.c           	rb_raise(rb_eRangeError, "%p is recycled object", p0);
rb_raise          130 hash.c         	rb_raise(rb_eRuntimeError, "hash modified during iteration");
rb_raise          150 hash.c         	rb_raise(rb_eRuntimeError, "rehash occurred during iteration");
rb_raise          182 hash.c          	rb_raise(rb_eRuntimeError, "hash modified during iteration");
rb_raise          222 hash.c             if (!RHASH(hash)->tbl) rb_raise(rb_eTypeError, "uninitialized Hash");
rb_raise          225 hash.c         	rb_raise(rb_eSecurityError, "Insecure: can't modify hash");
rb_raise          271 hash.c         	    rb_raise(rb_eArgError, "wrong number of arguments");
rb_raise          313 hash.c         	rb_raise(rb_eArgError, "odd number of arguments for Hash");
rb_raise          363 hash.c         	rb_raise(rb_eRuntimeError, "rehash during iteration");
rb_raise          444 hash.c         	    rb_raise(rb_eKeyError, "key not found");
rb_raise         1541 hash.c         	rb_raise(rb_eArgError, "bad environment variable name");
rb_raise         1580 hash.c         	rb_raise(rb_eArgError, "bad environment variable name");
rb_raise         1616 hash.c         	rb_raise(rb_eArgError, "bad environment variable name");
rb_raise         1622 hash.c         	    rb_raise(rb_eKeyError, "key not found");
rb_raise         1763 hash.c         	rb_raise(rb_eSecurityError, "can't change environment variable");
rb_raise         1771 hash.c         	rb_raise(rb_eArgError, "bad environment variable name");
rb_raise         1773 hash.c         	rb_raise(rb_eArgError, "bad environment variable value");
rb_raise         2096 hash.c         	rb_raise(rb_eArgError, "bad environment variable name");
rb_raise          202 io.c               rb_raise(rb_eEOFError, "end of file reached");
rb_raise          209 io.c           	rb_raise(rb_eSecurityError, "Insecure: operation on untainted IO");
rb_raise          218 io.c           	rb_raise(rb_eIOError, "uninitialized stream");
rb_raise          227 io.c           	rb_raise(rb_eIOError, "closed stream");
rb_raise          311 io.c           	rb_raise(rb_eIOError, "not opened for reading");
rb_raise          323 io.c           	rb_raise(rb_eIOError, "not opened for writing");
rb_raise         1201 io.c           		rb_raise(rb_eIOError, "file too big for single read");
rb_raise         1251 io.c           	rb_raise(rb_eArgError, "negative length %ld given", len);
rb_raise         1273 io.c           	rb_raise(rb_eRuntimeError, "buffer string modified");
rb_raise         1400 io.c           	rb_raise(rb_eArgError, "negative length %ld given", len);
rb_raise         1418 io.c           	rb_raise(rb_eRuntimeError, "buffer string modified");
rb_raise         1544 io.c           	rb_raise(rb_eRuntimeError, "rs modified");
rb_raise         1951 io.c           	rb_raise(rb_eIOError, "ungetc failed");
rb_raise         2083 io.c           	rb_raise(rb_eSecurityError, "Insecure: can't close");
rb_raise         2153 io.c           	rb_raise(rb_eSecurityError, "Insecure: can't close");
rb_raise         2168 io.c           	rb_raise(rb_eIOError, "closing non-duplex IO for reading");
rb_raise         2198 io.c           	rb_raise(rb_eSecurityError, "Insecure: can't close");
rb_raise         2214 io.c           	rb_raise(rb_eIOError, "closing non-duplex IO for writing");
rb_raise         2246 io.c           	rb_raise(rb_eIOError, "sysseek for buffered IO");
rb_raise         2338 io.c           	rb_raise(rb_eIOError, "sysread for buffered IO");
rb_raise         2345 io.c           	rb_raise(rb_eRuntimeError, "buffer string modified");
rb_raise         2382 io.c           	rb_raise(rb_eIOError, "buffer already filled with text-mode content");
rb_raise         2417 io.c               rb_raise(rb_eArgError, "illegal access modenum %o", flags);
rb_raise         2439 io.c           	rb_raise(rb_eArgError, "illegal access mode %s", mode);
rb_raise         2508 io.c           	rb_raise(rb_eArgError, "illegal access mode %s", mode);
rb_raise         2553 io.c               rb_raise(rb_eArgError, "illegal access modenum %o", flags);
rb_raise         3278 io.c           	rb_raise(rb_eSecurityError, "Insecure: can't reopen");
rb_raise         3287 io.c           	    rb_raise(rb_eArgError,
rb_raise         3398 io.c           	    rb_raise(rb_eArgError,
rb_raise         3814 io.c           	rb_raise(rb_eTypeError, "%s must have %s method, %s given",
rb_raise         3938 io.c           	rb_raise(rb_eRuntimeError, "reinitializing IO");
rb_raise         3944 io.c           	    rb_raise(rb_eIOError, "too many shared IO for %s", StringValuePtr(s));
rb_raise         3950 io.c           		    rb_raise(rb_eArgError, "incompatible mode 0%o", flags);
rb_raise         3953 io.c           		    rb_raise(rb_eArgError, "incompatible mode \"%s\"", RSTRING(mode)->ptr);
rb_raise         3990 io.c           	rb_raise(rb_eRuntimeError, "reinitializing File");
rb_raise         4650 io.c           	rb_raise(rb_eArgError, "return value overflowed string");
rb_raise         4758 io.c           	rb_raise(rb_eArgError, "too few arguments for syscall");
rb_raise         5043 io.c           	rb_raise(rb_eArgError, "no stream to tell");
rb_raise         5053 io.c           	rb_raise(rb_eArgError, "no stream to seek");
rb_raise         5063 io.c           	rb_raise(rb_eArgError, "no stream to set position");
rb_raise         5073 io.c           	rb_raise(rb_eArgError, "no stream to rewind");
rb_raise         5083 io.c           	rb_raise(rb_eArgError, "no stream");
rb_raise          106 marshal.c      	rb_raise(rb_eTypeError, "can't dump anonymous %s %s",
rb_raise          111 marshal.c      	rb_raise(rb_eTypeError, "%s can't be referred", n);
rb_raise          159 marshal.c      	rb_raise(rb_eTypeError, "long too big to dump");
rb_raise          325 marshal.c      	rb_raise(rb_eTypeError, "can't dump anonymous class %s", s);
rb_raise          348 marshal.c      	    rb_raise(rb_eTypeError, "singleton can't be dumped");
rb_raise          413 marshal.c      	rb_raise(rb_eArgError, "exceed depth limit");
rb_raise          473 marshal.c      		rb_raise(rb_eTypeError, "_dump() must return string");
rb_raise          489 marshal.c      		rb_raise(rb_eTypeError, "singleton class can't be dumped");
rb_raise          573 marshal.c      		rb_raise(rb_eTypeError, "can't dump hash with default proc");
rb_raise          612 marshal.c      		    rb_raise(rb_eTypeError,
rb_raise          622 marshal.c      	    rb_raise(rb_eTypeError, "can't dump %s",
rb_raise          704 marshal.c      	    rb_raise(rb_eTypeError, "instance of IO needed");
rb_raise          753 marshal.c      	    rb_raise(rb_eArgError, "marshal data too short");
rb_raise          768 marshal.c          rb_raise(rb_eTypeError, "long too big for this architecture (size %d, given %d)",
rb_raise          828 marshal.c      	    rb_raise(rb_eArgError, "marshal data too short");
rb_raise          852 marshal.c          rb_raise(rb_eArgError, "bad symbol");
rb_raise          916 marshal.c      	rb_raise(rb_eArgError, "%s does not refer class", path);
rb_raise          927 marshal.c      	rb_raise(rb_eArgError, "%s does not refer module", path);
rb_raise          944 marshal.c      	    rb_raise(rb_eArgError, "dump format error (unlinked)");
rb_raise          977 marshal.c      		rb_raise(rb_eTypeError, "singleton can't be loaded");
rb_raise          982 marshal.c      		rb_raise(rb_eArgError, "dump format error (user class)");
rb_raise         1134 marshal.c      		rb_raise(rb_eTypeError, "uninitialized struct");
rb_raise         1148 marshal.c      		    rb_raise(rb_eTypeError, "struct %s not compatible (:%s for :%s)",
rb_raise         1164 marshal.c      		rb_raise(rb_eTypeError, "class %s needs to have method `_load'",
rb_raise         1190 marshal.c      		rb_raise(rb_eTypeError, "instance of %s needs to have method `marshal_load'",
rb_raise         1205 marshal.c      		rb_raise(rb_eArgError, "dump format error");
rb_raise         1227 marshal.c                     rb_raise(rb_eArgError, "dump format error");
rb_raise         1231 marshal.c                     rb_raise(rb_eTypeError,
rb_raise         1274 marshal.c      	rb_raise(rb_eArgError, "dump format error(0x%x)", type);
rb_raise         1333 marshal.c      	rb_raise(rb_eTypeError, "instance of IO needed");
rb_raise         1341 marshal.c      	rb_raise(rb_eTypeError, "incompatible marshal file format (can't be read)\n\
rb_raise           79 numeric.c          rb_raise(rb_eZeroDivError, "divided by 0");
rb_raise          118 numeric.c          rb_raise(rb_eTypeError, "%s can't be coerced into %s",
rb_raise          137 numeric.c      	    rb_raise(rb_eTypeError, "coerce must return [x, y]");
rb_raise          185 numeric.c          rb_raise(rb_eTypeError,
rb_raise          197 numeric.c          rb_raise(rb_eTypeError, "can't copy %s", rb_obj_classname(x));
rb_raise         1394 numeric.c      	    rb_raise(rb_eArgError, "wrong number of arguments");
rb_raise         1397 numeric.c      	    rb_raise(rb_eArgError, "step can't be 0");
rb_raise         1459 numeric.c      	rb_raise(rb_eTypeError, "no implicit conversion from nil to integer");
rb_raise         1476 numeric.c      	    rb_raise(rb_eRangeError, "float %s out of range of integer", buf);
rb_raise         1513 numeric.c          rb_raise(rb_eRangeError, "integer %ld too %s to convert to `int'", num, s);
rb_raise         1521 numeric.c      	rb_raise(rb_eRangeError, "integer %lu too big to convert to `unsigned int'", num);
rb_raise         1595 numeric.c      	rb_raise(rb_eRangeError, "integer %ld out of range of fixnum", v);
rb_raise         1605 numeric.c      	rb_raise(rb_eTypeError, "no implicit conversion from nil");
rb_raise         1622 numeric.c      	    rb_raise(rb_eRangeError, "float %s out of range of long long", buf);
rb_raise         1629 numeric.c      	rb_raise(rb_eTypeError, "no implicit conversion from string");
rb_raise         1634 numeric.c      	rb_raise(rb_eTypeError, "no implicit conversion from boolean");
rb_raise         1736 numeric.c      	rb_raise(rb_eRangeError, "%ld out of char range", i);
rb_raise         1791 numeric.c             rb_raise(rb_eTypeError, "failed to convert %s into Integer",
rb_raise         1813 numeric.c             rb_raise(rb_eTypeError, "failed to convert %s into Float",
rb_raise         1840 numeric.c      	rb_raise(rb_eArgError, "illegal radix %d", base);
rb_raise          170 object.c               rb_raise(rb_eTypeError, "[bug] frozen object (%s) allocated", rb_obj_classname(dest));
rb_raise          221 object.c               rb_raise(rb_eTypeError, "can't clone %s", rb_obj_classname(obj));
rb_raise          256 object.c               rb_raise(rb_eTypeError, "can't dup %s", rb_obj_classname(obj));
rb_raise          271 object.c       	rb_raise(rb_eTypeError, "initialize_copy should take same class object");
rb_raise          393 object.c       	rb_raise(rb_eTypeError, "class or module required");
rb_raise          439 object.c       	rb_raise(rb_eTypeError, "class or module required");
rb_raise          652 object.c       	    rb_raise(rb_eSecurityError, "Insecure: can't freeze object");
rb_raise          773 object.c       	rb_raise(rb_eTypeError, "tried to add %s(%s) to nil",
rb_raise         1211 object.c       	rb_raise(rb_eTypeError, "compared with non class/module");
rb_raise         1266 object.c       	rb_raise(rb_eTypeError, "compared with non class/module");
rb_raise         1386 object.c       	rb_raise(rb_eTypeError, "already initialized class");
rb_raise         1417 object.c       	rb_raise(rb_eTypeError, "can't instantiate uninitialized class");
rb_raise         1420 object.c       	rb_raise(rb_eTypeError, "can't create instance of singleton class");
rb_raise         1424 object.c       	rb_raise(rb_eTypeError, "wrong instance allocation");
rb_raise         1478 object.c       	rb_raise(rb_eTypeError, "uninitialized class");
rb_raise         1493 object.c       	rb_raise(rb_eArgError, "empty symbol string");
rb_raise         1496 object.c       	rb_raise(rb_eArgError, "Symbols should not contain NUL (\\0)");
rb_raise         1514 object.c       	    rb_raise(rb_eArgError, "%ld is not a symbol", id);
rb_raise         1525 object.c       	rb_raise(rb_eTypeError, "%s is not a symbol", RSTRING(rb_inspect(name))->ptr);
rb_raise         1923 object.c       	    rb_raise(rb_eTypeError, "can't convert %s into %s",
rb_raise         1946 object.c       	rb_raise(rb_eTypeError, "can't convert %s to %s (%s#%s gives %s)",
rb_raise         1963 object.c       	rb_raise(rb_eTypeError, "can't convert %s to %s (%s#%s gives %s)",
rb_raise         1976 object.c       	rb_raise(rb_eTypeError, "can't convert %s to Integer (%s#%s gives %s)",
rb_raise         2113 object.c       	rb_raise(rb_eArgError, "Float %s out of range", q);
rb_raise         2136 object.c       	    rb_raise(rb_eArgError, "string for Float contains null byte");
rb_raise         2159 object.c       	rb_raise(rb_eTypeError, "can't convert nil into Float");
rb_raise         2166 object.c       	      rb_raise(rb_eArgError, "invalid value for Float()");
rb_raise         2199 object.c       	rb_raise(rb_eTypeError, "no implicit conversion to float from string");
rb_raise         2203 object.c       	rb_raise(rb_eTypeError, "no implicit conversion to float from nil");
rb_raise          344 pack.c             rb_raise(rb_eTypeError, "can't convert %s to `integer'", rb_obj_classname(x));
rb_raise          461 pack.c         #define NEXTFROM (items-- > 0 ? RARRAY(ary)->ptr[idx++] : (rb_raise(rb_eArgError, toofew),0))
rb_raise          465 pack.c         	    rb_raise(rb_eRuntimeError, "format string modified");
rb_raise          489 pack.c         		rb_raise(rb_eArgError, "'%c' allowed only after types %s", *p, natstr);
rb_raise          849 pack.c         		rb_raise(rb_eArgError, "X outside of string");
rb_raise          862 pack.c         	    rb_raise(rb_eArgError, "%% is not supported");
rb_raise          875 pack.c         		    rb_raise(rb_eRangeError, "pack(U): value out of range");
rb_raise          918 pack.c         		    rb_raise(rb_eArgError, "too short buffer for P(%ld for %ld)",
rb_raise          962 pack.c         			rb_raise(rb_eArgError, "can't compress negative numbers");
rb_raise         1334 pack.c         		rb_raise(rb_eArgError, "'%c' allowed only after types %s", *p, natstr);
rb_raise         1353 pack.c         	    rb_raise(rb_eArgError, "%% is not supported");
rb_raise         1843 pack.c         		rb_raise(rb_eArgError, "@ outside of string");
rb_raise         1849 pack.c         		rb_raise(rb_eArgError, "X outside of string");
rb_raise         1855 pack.c         		rb_raise(rb_eArgError, "x outside of string");
rb_raise         1871 pack.c         			rb_raise(rb_eArgError, "no associated pointer");
rb_raise         1885 pack.c         			rb_raise(rb_eArgError, "non associated pointer");
rb_raise         1913 pack.c         			    rb_raise(rb_eArgError, "no associated pointer");
rb_raise         1924 pack.c         			    rb_raise(rb_eArgError, "non associated pointer");
rb_raise         2020 pack.c             rb_raise(rb_eRangeError, "pack(U): value out of range");
rb_raise         2046 pack.c         	rb_raise(rb_eArgError, "malformed UTF-8 character");
rb_raise         2056 pack.c         	rb_raise(rb_eArgError, "malformed UTF-8 character");
rb_raise         2059 pack.c         	rb_raise(rb_eArgError, "malformed UTF-8 character (expected %ld bytes, given %ld bytes)",
rb_raise         2068 pack.c         		rb_raise(rb_eArgError, "malformed UTF-8 character");
rb_raise         2078 pack.c         	rb_raise(rb_eArgError, "redundant UTF-8 sequence");
rb_raise         4459 parse.y            if (lex_p < parser->tokp) rb_raise(rb_eRuntimeError, "lex_p < tokp");
rb_raise         8846 parse.y        	rb_raise(rb_eArgError, "Qundef given");
rb_raise         8850 parse.y        	rb_raise(rb_eArgError, "invalid pointer: %p", x);
rb_raise         8859 parse.y        	rb_raise(rb_eArgError, "NODE given: %p", x);
rb_raise         8861 parse.y        	rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)",
rb_raise         9197 parse.y        	rb_raise(rb_eArgError, "method called for uninitialized object");
rb_raise         9201 parse.y        	    rb_raise(rb_eArgError, "Ripper#parse is not reentrant");
rb_raise         9203 parse.y        	    rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe");
rb_raise         9226 parse.y        	rb_raise(rb_eArgError, "method called for uninitialized object");
rb_raise         9247 parse.y        	rb_raise(rb_eArgError, "method called for uninitialized object");
rb_raise         9260 parse.y        	rb_raise(rb_eArgError, RSTRING(msg)->ptr);
rb_raise           88 prec.c             rb_raise(rb_eTypeError, "undefined conversion from %s into %s",
rb_raise          590 process.c      	rb_raise(rb_eArgError, "can't do waitpid with flags");
rb_raise          913 process.c      	    rb_raise(rb_eSecurityError, "Insecure PATH - %s", str);
rb_raise         1171 process.c      	rb_raise(rb_eArgError, "wrong number of arguments");
rb_raise         1178 process.c      	    rb_raise(rb_eArgError, "wrong first argument");
rb_raise         1657 process.c      	rb_raise(rb_eArgError, "wrong number of arguments");
rb_raise         2009 process.c      	rb_raise(rb_eRuntimeError, "can't handle UID while evaluating block given to Process::UID.switch method");
rb_raise         2019 process.c      	rb_raise(rb_eRuntimeError, "can't handle GID while evaluating block given to Process::UID.switch method");
rb_raise         2635 process.c      	rb_raise(rb_eArgError, "too many groups, %lu max", (unsigned long)maxgroups);
rb_raise         2654 process.c      		    rb_raise(rb_eArgError,
rb_raise          213 random.c                 rb_raise(rb_eTypeError, "failed to convert %s into Integer",
rb_raise           24 range.c            rb_raise(rb_eArgError, "bad value for range");
rb_raise          296 range.c        	rb_raise(rb_eArgError, "step can't be negative");
rb_raise          298 range.c            if (unit == 0) rb_raise(rb_eArgError, "step can't be 0");
rb_raise          323 range.c        	    if (rb_equal(step, INT2FIX(0))) rb_raise(rb_eArgError, "step can't be 0");
rb_raise          333 range.c        		rb_raise(rb_eTypeError, "can't iterate from %s",
rb_raise          380 range.c        	rb_raise(rb_eTypeError, "can't iterate from %s",
rb_raise          543 range.c        	rb_raise(rb_eRangeError, "%ld..%s%ld out of range",
rb_raise          258 re.c           	rb_raise(rb_eTypeError, "uninitialized Regexp");
rb_raise          517 re.c           	rb_raise(rb_eRegexpError, "%s: %s", err, RSTRING(desc)->ptr);
rb_raise          671 re.c           	rb_raise(rb_eTypeError, "wrong argument class");
rb_raise          719 re.c           	rb_raise(rb_eIndexError, "index %d out of matches", i);
rb_raise          747 re.c           	rb_raise(rb_eIndexError, "index %d out of matches", i);
rb_raise          774 re.c           	rb_raise(rb_eIndexError, "index %d out of matches", i);
rb_raise         1234 re.c           	rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc);
rb_raise         1650 re.c           	rb_raise(rb_eArgError, "wrong number of arguments");
rb_raise         1929 re.c                                   rb_raise(rb_eArgError, "mixed kcode: %s and %s",
rb_raise         1972 re.c           	rb_raise(rb_eTypeError, "wrong argument type");
rb_raise          770 ruby.c         		    rb_raise(rb_eRuntimeError, "illegal switch in RUBYOPT: -%c", *s);
rb_raise          894 ruby.c         	    rb_raise(rb_eLoadError, "no Ruby script found in input");
rb_raise         1026 ruby.c             if (origargv == 0) rb_raise(rb_eRuntimeError, "$0 not initialized");
rb_raise         1122 ruby.c                 rb_raise(rb_eSecurityError, "no %s allowed while running setuid", s);
rb_raise         1124 ruby.c                 rb_raise(rb_eSecurityError, "no %s allowed while running setgid", s);
rb_raise         1126 ruby.c                 rb_raise(rb_eSecurityError, "no %s allowed in tainted mode", s);
rb_raise          556 ruby.h         PRINTF_ARGS(NORETURN(void rb_raise(VALUE, const char*, ...)), 2, 3);
rb_raise          233 signal.c       	rb_raise(rb_eArgError, "wrong number of arguments -- kill(sig, pid...)");
rb_raise          241 signal.c       	if (!s) rb_raise(rb_eArgError, "bad signal");
rb_raise          254 signal.c       	    rb_raise(rb_eArgError, "unsupported name `SIG%s'", s);
rb_raise          269 signal.c       	    rb_raise(rb_eArgError, "bad signal type %s",
rb_raise          619 signal.c       	if (!s) rb_raise(rb_eArgError, "bad signal");
rb_raise          630 signal.c       	    rb_raise(rb_eArgError, "unsupported signal SIG%s", s);
rb_raise          634 signal.c       	rb_raise(rb_eArgError, "invalid signal number (%d)", sig);
rb_raise          638 signal.c       	rb_raise(rb_eArgError, "SIGVTALRM reserved for Thread; can't set handler");
rb_raise          761 signal.c       	rb_raise(rb_eArgError, "wrong number of arguments -- trap(sig, cmd)/trap(sig){...}");
rb_raise          773 signal.c       	rb_raise(rb_eSecurityError, "Insecure: tainted signal trap");
rb_raise          104 sprintf.c          (rb_raise(rb_eArgError, "unnumbered(%d) mixed with numbered", nextarg), 0) : \
rb_raise          108 sprintf.c          (rb_raise(rb_eArgError, "numbered(%d) after unnumbered(%d)", n, posarg), 0) : \
rb_raise          109 sprintf.c          ((n < 1) ? (rb_raise(rb_eArgError, "invalid index - %d$", n), 0) : \
rb_raise          113 sprintf.c          ((nth >= argc) ? (rb_raise(rb_eArgError, "too few arguments"), 0) : argv[nth])
rb_raise          121 sprintf.c      	    rb_raise(rb_eArgError, #val " too big"); \
rb_raise          126 sprintf.c      	rb_raise(rb_eArgError, "malformed format string - %%*[0-9]"); \
rb_raise          289 sprintf.c      		rb_raise(rb_eArgError, "malformed format string - %%%c", *p);
rb_raise          291 sprintf.c      		rb_raise(rb_eArgError, "malformed format string");
rb_raise          325 sprintf.c      		    rb_raise(rb_eArgError, "width too big");
rb_raise          330 sprintf.c      		rb_raise(rb_eArgError, "malformed format string - %%[0-9]");
rb_raise          334 sprintf.c      		    rb_raise(rb_eArgError, "value given twice - %d$", n);
rb_raise          346 sprintf.c      		rb_raise(rb_eArgError, "width given twice");
rb_raise          359 sprintf.c      		rb_raise(rb_eArgError, "precision given twice");
rb_raise          378 sprintf.c      		rb_raise(rb_eArgError, "malformed format string - %%.[0-9]");
rb_raise          387 sprintf.c      		rb_raise(rb_eArgError, "illegal format character - %%");
rb_raise          791 sprintf.c      	if (RTEST(ruby_debug)) rb_raise(rb_eArgError, mesg);
rb_raise          854 sprintf.c      	rb_raise(rb_eRuntimeError, "rb_vsprintf reentered");
rb_raise           46 string.c       	rb_raise(rb_eRuntimeError, "string modified");
rb_raise           54 string.c       	rb_raise(rb_eRuntimeError, "string frozen");
rb_raise           77 string.c       	rb_raise(rb_eArgError, "negative string size (or size too big)");
rb_raise          101 string.c       	rb_raise(rb_eArgError, "NULL pointer given");
rb_raise          377 string.c       	rb_raise(rb_eArgError, "negative argument");
rb_raise          380 string.c       	rb_raise(rb_eArgError, "argument too big");
rb_raise          422 string.c       	rb_raise(rb_eRuntimeError, "can't modify string; temporarily locked");
rb_raise          426 string.c       	rb_raise(rb_eSecurityError, "Insecure: can't modify string");
rb_raise          511 string.c       	rb_raise(rb_eArgError, "string contains null byte");
rb_raise          587 string.c       	rb_raise(rb_eRuntimeError, "temporal locking already locked string");
rb_raise          597 string.c       	rb_raise(rb_eRuntimeError, "temporal unlocking already unlocked string");
rb_raise          607 string.c       	rb_raise(rb_eArgError, "negative string size (or size too big)");
rb_raise          631 string.c       	rb_raise(rb_eArgError, "negative string size (or size too big)");
rb_raise          665 string.c       	rb_raise(rb_eArgError, "negative string size (or size too big)");
rb_raise         1049 string.c       	      rb_raise(rb_eTypeError, "type mismatch: %s given",
rb_raise         1169 string.c       	rb_raise(rb_eTypeError, "type mismatch: %s given",
rb_raise         1196 string.c       	rb_raise(rb_eTypeError, "type mismatch: String given");
rb_raise         1230 string.c       	rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc);
rb_raise         1514 string.c       	rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc);
rb_raise         1522 string.c           if (len < 0) rb_raise(rb_eIndexError, "negative length %ld", len);
rb_raise         1529 string.c       	rb_raise(rb_eIndexError, "index %ld out of string", beg);
rb_raise         1577 string.c       	rb_raise(rb_eIndexError, "regexp not matched");
rb_raise         1582 string.c       	rb_raise(rb_eIndexError, "index %d out of regexp", nth);
rb_raise         1593 string.c       	rb_raise(rb_eIndexError, "regexp group %d not matched", nth);
rb_raise         1611 string.c       	    rb_raise(rb_eIndexError, "index %ld out of string", idx);
rb_raise         1638 string.c       	    rb_raise(rb_eIndexError, "string not matched");
rb_raise         1695 string.c       	rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)", argc);
rb_raise         1763 string.c       	rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc);
rb_raise         1832 string.c       	rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)", argc);
rb_raise         1935 string.c       	rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)", argc);
rb_raise         1964 string.c       		rb_raise(rb_eRuntimeError, "block should not cheat");
rb_raise         2279 string.c       	rb_raise(rb_eArgError, "illegal radix %d", base);
rb_raise         2952 string.c       	rb_raise(rb_eArgError, "wrong number of arguments");
rb_raise         3144 string.c       	rb_raise(rb_eArgError, "wrong number of arguments");
rb_raise         3929 string.c       	rb_raise(rb_eArgError, "salt too short (need >=2 bytes)");
rb_raise         3967 string.c       	rb_raise(rb_eArgError, "interning empty string");
rb_raise         3970 string.c       	rb_raise(rb_eArgError, "symbol string may not contain `\\0'");
rb_raise         4052 string.c       	    rb_raise(rb_eArgError, "zero width padding");
rb_raise         4164 string.c       	rb_raise(rb_eTypeError, "value of %s must be String", rb_id2name(id));
rb_raise           51 struct.c       	rb_raise(rb_eTypeError, "struct size differs (%ld required %ld given)",
rb_raise          146 struct.c              rb_raise(rb_eSecurityError, "Insecure: can't modify Struct");
rb_raise          316 struct.c       	rb_raise(rb_eArgError, "struct size differs");
rb_raise          509 struct.c       	rb_raise(rb_eTypeError, "wrong argument class");
rb_raise          566 struct.c               rb_raise(rb_eIndexError, "offset %ld too small for struct(size:%ld)",
rb_raise          569 struct.c               rb_raise(rb_eIndexError, "offset %ld too large for struct(size:%ld)",
rb_raise          584 struct.c       	rb_raise(rb_eTypeError, "struct size differs (%ld required %ld given)",
rb_raise          629 struct.c               rb_raise(rb_eIndexError, "offset %ld too small for struct(size:%ld)",
rb_raise          633 struct.c               rb_raise(rb_eIndexError, "offset %ld too large for struct(size:%ld)",
rb_raise          695 struct.c       	rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc);
rb_raise           60 time.c         	rb_raise(rb_eSecurityError, "Insecure: can't modify Time");
rb_raise          116 time.c         	    rb_raise(rb_eRangeError, "out of Time range");
rb_raise          124 time.c         	    rb_raise(rb_eRangeError, "out of Time range");
rb_raise          130 time.c         	rb_raise(rb_eArgError, "time must be positive");
rb_raise          170 time.c         	    rb_raise(rb_eArgError, "%s must be positive", tstr);
rb_raise          176 time.c         	    rb_raise(rb_eArgError, "%s must be positive", tstr);
rb_raise          183 time.c         		rb_raise(rb_eRangeError, "%f out of Time range", RFLOAT(time)->value);
rb_raise          192 time.c         	    rb_raise(rb_eArgError, "%s must be positive", tstr);
rb_raise          197 time.c         	rb_raise(rb_eTypeError, "can't convert %s into %s",
rb_raise          373 time.c         	rb_raise(rb_eArgError, "argument out of range");
rb_raise          709 time.c             rb_raise(rb_eArgError, "time out of range");
rb_raise          712 time.c             rb_raise(rb_eArgError, "gmtime/localtime error");
rb_raise          999 time.c         	rb_raise(rb_eTypeError, "wrong argument type");
rb_raise         1047 time.c         	rb_raise(rb_eArgError, "localtime error");
rb_raise         1090 time.c         	rb_raise(rb_eArgError, "gmtime error");
rb_raise         1230 time.c         	rb_raise(rb_eRangeError, "time %s %f out of Time range",
rb_raise         1238 time.c         	    rb_raise(rb_eRangeError, "time - %f out of Time range", v);
rb_raise         1244 time.c         	    rb_raise(rb_eRangeError, "time + %f out of Time range", v);
rb_raise         1272 time.c         	rb_raise(rb_eTypeError, "time + time?");
rb_raise         1720 time.c         	    rb_raise(rb_eArgError, "gmtime error");
rb_raise         1927 time.c         	rb_raise(rb_eArgError, "year too big to marshal");
rb_raise         1988 time.c         	rb_raise(rb_eTypeError, "marshaled time format differ");
rb_raise          230 variable.c     	rb_raise(rb_eArgError, "can't retrieve anonymous class %s", path);
rb_raise          246 variable.c     	    rb_raise(rb_eArgError, "undefined class/module %.*s", p-path, path);
rb_raise          254 variable.c     	    rb_raise(rb_eTypeError, "%s does not refer class/module", path);
rb_raise          532 variable.c     	rb_raise(rb_eSecurityError, "Insecure: tainted variable trace");
rb_raise          656 variable.c     	rb_raise(rb_eSecurityError, "Insecure: can't change global variable value");
rb_raise          732 variable.c     	rb_raise(rb_eSecurityError, "Insecure: can't alias global variable");
rb_raise          743 variable.c     	    rb_raise(rb_eRuntimeError, "can't alias in tracer");
rb_raise          953 variable.c     	rb_raise(rb_eSecurityError, "Insecure: can't modify instance variable");
rb_raise         1070 variable.c     	rb_raise(rb_eSecurityError, "Insecure: can't modify instance variable");
rb_raise         1158 variable.c     	rb_raise(rb_eTypeError, "wrong autoload table: %s", RSTRING(rb_inspect(av))->ptr);
rb_raise         1170 variable.c     	rb_raise(rb_eNameError, "autoload must be constant name: %s", rb_id2name(id));
rb_raise         1173 variable.c     	rb_raise(rb_eArgError, "empty file name");
rb_raise         1246 variable.c     	rb_raise(rb_eArgError, "empty file name");
rb_raise         1346 variable.c     	rb_raise(rb_eSecurityError, "Insecure: can't remove constant");
rb_raise         1487 variable.c     	rb_raise(rb_eSecurityError, "Insecure: can't set %s", dest);
rb_raise         1668 variable.c     	rb_raise(rb_eSecurityError, "Insecure: can't remove class variable");


rb_raise_jump

rb_raise_jump    4448 eval.c             rb_raise_jump(rb_make_exception(argc, argv));
rb_raise_jump    10180 eval.c         	rb_raise_jump(th_raise_exception);
rb_raise_jump    12268 eval.c         	rb_raise_jump(exc);


rb_range_beg_len

rb_range_beg_len  744 array.c            switch (rb_range_beg_len(arg, &beg, &len, RARRAY(ary)->len, 0)) {
rb_range_beg_len 1074 array.c            if (rb_range_beg_len(argv[0], &beg, &len, RARRAY(ary)->len, 1)) {
rb_range_beg_len 1648 array.c        	switch (rb_range_beg_len(argv[i], &beg, &len, olen, 0)) {
rb_range_beg_len 1850 array.c            if (!FIXNUM_P(arg1) && rb_range_beg_len(arg1, &pos, &len, RARRAY(ary)->len, 1)) {
rb_range_beg_len 2120 array.c        	if (rb_range_beg_len(arg1, &beg, &len, RARRAY(ary)->len, 1)) {
rb_range_beg_len  424 intern.h       VALUE rb_range_beg_len(VALUE, long*, long*, long, int);
rb_range_beg_len 1439 string.c       	    switch (rb_range_beg_len(indx, &beg, &len, RSTRING(str)->len, 0)) {
rb_range_beg_len 1647 string.c       	    if (rb_range_beg_len(indx, &beg, &len, RSTRING(str)->len, 2)) {


rb_range_new

rb_range_new     3178 eval.c         	    result = rb_range_new(beg, end, nd_type(node) == NODE_DOT3);
rb_range_new      423 intern.h       VALUE rb_range_new(VALUE, VALUE, int);
rb_range_new     1795 parse.y        			    $1->nd_lit = rb_range_new($1->nd_lit, $3->nd_lit, Qfalse);
rb_range_new     1812 parse.y        			    $1->nd_lit = rb_range_new($1->nd_lit, $3->nd_lit, Qtrue);


rb_read_check

rb_read_check     420 ext/curses/curses.c     rb_read_check(stdin);
rb_read_check     432 ext/curses/curses.c     rb_read_check(stdin);
rb_read_check    1149 ext/curses/curses.c     rb_read_check(stdin);
rb_read_check    1163 ext/curses/curses.c     rb_read_check(stdin);
rb_read_check     102 rubyio.h       void rb_read_check(FILE*);


rb_reg_adjust_startpos

rb_reg_adjust_startpos 1479 re.c           	pos = rb_reg_adjust_startpos(re, str, pos, 0);
rb_reg_adjust_startpos   34 re.h           long rb_reg_adjust_startpos(VALUE, VALUE, long, long);
rb_reg_adjust_startpos 1028 string.c       	pos = rb_reg_adjust_startpos(sub, str, pos, 0);
rb_reg_adjust_startpos 1139 string.c       	    pos = rb_reg_adjust_startpos(sub, str, pos, 1);


rb_reg_check

rb_reg_check      323 re.c           	rb_reg_check(re);
rb_reg_check      367 re.c               rb_reg_check(re);
rb_reg_check      387 re.c               rb_reg_check(re);
rb_reg_check      421 re.c               rb_reg_check(re);
rb_reg_check      531 re.c               rb_reg_check(re);
rb_reg_check      799 re.c               rb_reg_check(re);
rb_reg_check      829 re.c           	rb_reg_check(re);
rb_reg_check      850 re.c               rb_reg_check(re);
rb_reg_check      895 re.c               rb_reg_check(re);
rb_reg_check     1422 re.c               rb_reg_check(re);
rb_reg_check     1454 re.c               rb_reg_check(re1); rb_reg_check(re2);
rb_reg_check     1656 re.c           	rb_reg_check(argv[0]);
rb_reg_check     1866 re.c               rb_reg_check(re);
rb_reg_check     1974 re.c               rb_reg_check(re);


rb_reg_compile

rb_reg_compile    437 intern.h       VALUE rb_reg_compile(const char*, long, int);
rb_reg_compile   3625 parse.y        			    node = NEW_LIT(rb_reg_compile("", 0, options & ~RE_OPTION_ONCE));
rb_reg_compile   3632 parse.y        				node->nd_lit = rb_reg_compile(RSTRING(src)->ptr,


rb_reg_desc

rb_reg_desc       388 re.c               return rb_reg_desc(RREGEXP(re)->str, RREGEXP(re)->len, re);
rb_reg_desc       512 re.c               VALUE desc = rb_reg_desc(s, len, re);


rb_reg_equal

rb_reg_equal     2239 re.c               rb_define_method(rb_cRegexp, "eql?", rb_reg_equal, 1);
rb_reg_equal     2240 re.c               rb_define_method(rb_cRegexp, "==", rb_reg_equal, 1);


rb_reg_expr_str

rb_reg_expr_str   320 re.c               rb_reg_expr_str(str, s, len);
rb_reg_expr_str   502 re.c               rb_reg_expr_str(str, ptr, len);


rb_reg_initialize

rb_reg_initialize 1367 re.c               rb_reg_initialize(re, s, len, options, Qfalse);
rb_reg_initialize 1376 re.c               rb_reg_initialize(re, s, len, options, Qtrue);
rb_reg_initialize 1708 re.c               rb_reg_initialize(self, s, len, flags, Qfalse);
rb_reg_initialize 1975 re.c               rb_reg_initialize(copy, RREGEXP(re)->str, RREGEXP(re)->len,


rb_reg_last_match

rb_reg_last_match 3582 eval.c         	    result = rb_reg_last_match(MATCH_DATA);
rb_reg_last_match  432 intern.h       VALUE rb_reg_last_match(VALUE);
rb_reg_last_match 1064 re.c               return rb_reg_last_match(rb_backref_get());
rb_reg_last_match 1268 re.c               VALUE str = rb_reg_last_match(match);


rb_reg_match

rb_reg_match     2756 eval.c         	    result = rb_reg_match(l, r);
rb_reg_match     2766 eval.c         		result = rb_reg_match(r, l);
rb_reg_match      438 intern.h       VALUE rb_reg_match(VALUE, VALUE);
rb_reg_match     2241 re.c               rb_define_method(rb_cRegexp, "=~", rb_reg_match, 1);
rb_reg_match     1199 string.c       	return rb_reg_match(y, x);


rb_reg_match2

rb_reg_match2    2748 eval.c         	result = rb_reg_match2(node->nd_lit);
rb_reg_match2     439 intern.h       VALUE rb_reg_match2(VALUE);
rb_reg_match2    2243 re.c               rb_define_method(rb_cRegexp, "~", rb_reg_match2, 0);


rb_reg_match_last

rb_reg_match_last 3591 eval.c         	    result = rb_reg_match_last(MATCH_DATA);
rb_reg_match_last  435 intern.h       VALUE rb_reg_match_last(VALUE);
rb_reg_match_last 1082 re.c               return rb_reg_match_last(rb_backref_get());


rb_reg_match_pos

rb_reg_match_pos 1500 re.c               return rb_reg_match_pos(re, str, 0);
rb_reg_match_pos 1600 re.c               result = rb_reg_match_pos(re, str, pos);


rb_reg_match_post

rb_reg_match_post 3588 eval.c         	    result = rb_reg_match_post(MATCH_DATA);
rb_reg_match_post  434 intern.h       VALUE rb_reg_match_post(VALUE);
rb_reg_match_post 1076 re.c               return rb_reg_match_post(rb_backref_get());
rb_reg_match_post 2275 re.c               rb_define_method(rb_cMatch, "post_match", rb_reg_match_post, 0);


rb_reg_match_pre

rb_reg_match_pre 3585 eval.c         	    result = rb_reg_match_pre(MATCH_DATA);
rb_reg_match_pre  433 intern.h       VALUE rb_reg_match_pre(VALUE);
rb_reg_match_pre 1070 re.c               return rb_reg_match_pre(rb_backref_get());
rb_reg_match_pre 2274 re.c               rb_define_method(rb_cMatch, "pre_match", rb_reg_match_pre, 0);


rb_reg_mbclen2

rb_reg_mbclen2     40 re.h           int rb_reg_mbclen2(unsigned int, VALUE);
rb_reg_mbclen2     41 re.h           #define mbclen2(c,re) rb_reg_mbclen2((c),(re))


rb_reg_new

rb_reg_new       3689 eval.c         		result = rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len,
rb_reg_new       3693 eval.c         		result = rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len,
rb_reg_new        436 intern.h       VALUE rb_reg_new(const char*, long, int);
rb_reg_new       1090 marshal.c      	    v = r_entry(rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len, options), arg);
rb_reg_new       1396 re.c               return reg_cache = rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len,
rb_reg_new        637 ruby.c         		rb_fs = rb_reg_new(s, strlen(s), 0);


rb_reg_nth_defined

rb_reg_nth_defined 2337 eval.c         	if (RTEST(rb_reg_nth_defined(node->nd_nth, MATCH_DATA))) {
rb_reg_nth_defined 2345 eval.c         	if (RTEST(rb_reg_nth_defined(0, MATCH_DATA))) {
rb_reg_nth_defined  430 intern.h       VALUE rb_reg_nth_defined(int, VALUE);


rb_reg_nth_match

rb_reg_nth_match 3576 eval.c         	result = rb_reg_nth_match(node->nd_nth, MATCH_DATA);
rb_reg_nth_match  431 intern.h       VALUE rb_reg_nth_match(int, VALUE);
rb_reg_nth_match  993 re.c               return rb_reg_nth_match(0, match);
rb_reg_nth_match 1058 re.c               return rb_reg_nth_match(i, match);
rb_reg_nth_match 1189 re.c               return rb_reg_nth_match(FIX2INT(idx), match);
rb_reg_nth_match 1195 re.c               return rb_reg_nth_match(n, match);
rb_reg_nth_match 2182 re.c           	return rb_reg_nth_match(NUM2INT(nth), rb_backref_get());
rb_reg_nth_match 1402 string.c       	return rb_reg_nth_match(nth, rb_backref_get());
rb_reg_nth_match 1845 string.c       	    repl = rb_obj_as_string(rb_yield(rb_reg_nth_match(0, match)));
rb_reg_nth_match 1960 string.c       	    val = rb_obj_as_string(rb_yield(rb_reg_nth_match(0, match)));
rb_reg_nth_match 3794 string.c       	    return rb_reg_nth_match(0, match);
rb_reg_nth_match 3798 string.c       	    rb_ary_push(result, rb_reg_nth_match(i, match));


rb_reg_options

rb_reg_options    440 intern.h       int rb_reg_options(VALUE);
rb_reg_options    548 marshal.c      	    w_byte(rb_reg_options(obj), arg);
rb_reg_options    563 re.c               int options = rb_reg_options(re);
rb_reg_options   1976 re.c           		      rb_reg_options(re), Qfalse);


rb_reg_prepare_re

rb_reg_prepare_re  851 re.c               if (may_need_recompile) rb_reg_prepare_re(re);
rb_reg_prepare_re  896 re.c               if (may_need_recompile) rb_reg_prepare_re(re);


rb_reg_quote

rb_reg_quote     1823 re.c               str = rb_reg_quote(str);
rb_reg_quote       36 re.h           VALUE rb_reg_quote(VALUE);
rb_reg_quote     1797 string.c       	pat = rb_reg_quote(pat);
rb_reg_quote     3243 string.c       		spat = rb_reg_regcomp(rb_reg_quote(spat));


rb_reg_raise

rb_reg_raise      620 re.c           	rb_reg_raise(s, len, err, 0, ce);
rb_reg_raise      628 re.c           	rb_reg_raise(s, len, err, 0, ce);
rb_reg_raise      838 re.c           	     rb_reg_raise(pattern, RREGEXP(re)->len, err, re, Qfalse);
rb_reg_raise      928 re.c           	    rb_reg_raise(RREGEXP(re)->str, RREGEXP(re)->len, err, 0, Qfalse);


rb_reg_regcomp

rb_reg_regcomp     31 re.h           VALUE rb_reg_regcomp(VALUE);
rb_reg_regcomp   1800 string.c           return rb_reg_regcomp(pat);
rb_reg_regcomp   3243 string.c       		spat = rb_reg_regcomp(rb_reg_quote(spat));


rb_reg_regsub

rb_reg_regsub      33 re.h           VALUE rb_reg_regsub(VALUE, VALUE, struct re_registers *);
rb_reg_regsub    1851 string.c       	    repl = rb_reg_regsub(repl, str, regs);
rb_reg_regsub    1969 string.c       	    val = rb_reg_regsub(repl, str, regs);


rb_reg_s_alloc

rb_reg_s_alloc   1365 re.c               VALUE re = rb_reg_s_alloc(rb_cRegexp);
rb_reg_s_alloc   1374 re.c               VALUE re = rb_reg_s_alloc(rb_cRegexp);
rb_reg_s_alloc   2229 re.c               rb_define_alloc_func(rb_cRegexp, rb_reg_s_alloc);


rb_reg_s_quote

rb_reg_s_quote   1905 re.c                       args[0] = rb_reg_s_quote(argc, argv);
rb_reg_s_quote   1937 re.c                           v = rb_reg_s_quote(1, args);
rb_reg_s_quote   2231 re.c               rb_define_singleton_method(rb_cRegexp, "quote", rb_reg_s_quote, -1);
rb_reg_s_quote   2232 re.c               rb_define_singleton_method(rb_cRegexp, "escape", rb_reg_s_quote, -1);


rb_reg_search

rb_reg_search    1481 re.c               pos = rb_reg_search(re, str, pos, 0);
rb_reg_search    1534 re.c               start = rb_reg_search(re, str, 0, 0);
rb_reg_search    1564 re.c               start = rb_reg_search(re, line, 0, 0);
rb_reg_search      32 re.h           long rb_reg_search(VALUE, VALUE, long, long);
rb_reg_search    1029 string.c       	pos = rb_reg_search(sub, str, pos, 0);
rb_reg_search    1140 string.c       	    pos = rb_reg_search(sub, str, pos, 1);
rb_reg_search    1401 string.c           if (rb_reg_search(re, str, 0, 0) >= 0) {
rb_reg_search    1576 string.c           if (rb_reg_search(re, str, 0, 0) < 0) {
rb_reg_search    1836 string.c           if (rb_reg_search(pat, str, 0, 0) >= 0) {
rb_reg_search    1940 string.c           beg = rb_reg_search(pat, str, 0, 0);
rb_reg_search    2000 string.c       	beg = rb_reg_search(pat, str, offset, 0);
rb_reg_search    3289 string.c       	while ((end = rb_reg_search(spat, str, start, 0)) >= 0) {
rb_reg_search    3778 string.c           if (rb_reg_search(pat, str, *start, 0) >= 0) {


rb_reg_to_s

rb_reg_to_s      1933 re.c                           v = rb_reg_to_s(v);
rb_reg_to_s      2245 re.c               rb_define_method(rb_cRegexp, "to_s", rb_reg_to_s, 0);


rb_remove_event_hook

rb_remove_event_hook 2468 eval.c         	rb_remove_event_hook(call_trace_func);
rb_remove_event_hook  390 node.h         int rb_remove_event_hook(rb_event_hook_func_t);


rb_remove_history

rb_remove_history  622 ext/readline/readline.c 	return rb_remove_history(history_length - 1);
rb_remove_history  634 ext/readline/readline.c 	return rb_remove_history(0);
rb_remove_history  687 ext/readline/readline.c     return rb_remove_history(i);


rb_require

rb_require         26 ext/digest/md5/md5init.c     rb_require("digest.so");
rb_require         27 ext/digest/rmd160/rmd160init.c     rb_require("digest.so");
rb_require         26 ext/digest/sha1/sha1init.c     rb_require("digest.so");
rb_require         33 ext/digest/sha2/sha2init.c     rb_require("digest.so");
rb_require        491 ext/syck/rubyext.c                     rb_require( "date" );
rb_require       1578 ext/tk/tkutil/tkutil.c     rb_require("tcltklib");
rb_require        373 ruby.c         	rb_protect((VALUE (*)(VALUE))rb_require, (VALUE)list->name, &state);
rb_require        584 ruby.h         VALUE rb_require(const char*);


rb_require_safe

rb_require_safe  6811 eval.c             return rb_require_safe(fname, ruby_safe_level);
rb_require_safe  6986 eval.c             return rb_require_safe(fn, ruby_safe_level);
rb_require_safe   236 intern.h       VALUE rb_require_safe(VALUE, int);
rb_require_safe  1229 variable.c         return rb_require_safe(file, load->nd_nth);


rb_rescue

rb_rescue          84 compar.c           return rb_rescue(cmp_eq, (VALUE)a, cmp_failed, 0);
rb_rescue         134 numeric.c          ary = rb_rescue(coerce_body, (VALUE)a, err?coerce_rescue:0, (VALUE)a);
rb_rescue          45 range.c        	v = rb_rescue(range_check, (VALUE)args, range_failed, 0);
rb_rescue         578 ruby.h         VALUE rb_rescue(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE);


rb_rescue2

rb_rescue2       5215 eval.c             return rb_rescue2(b_proc, data1, r_proc, data2, rb_eStandardError, (VALUE)0);
rb_rescue2       1009 ext/tk/tkutil/tkutil.c     return rb_rescue2(tkstr_to_float, value,
rb_rescue2       1022 ext/tk/tkutil/tkutil.c     return rb_rescue2(tkstr_to_int, value,
rb_rescue2       1072 ext/tk/tkutil/tkutil.c     return rb_rescue2(tkstr_to_number, value,
rb_rescue2       1861 ext/zlib/zlib.c     return rb_rescue2(gzfile_read_raw_partial, (VALUE)gz,
rb_rescue2       5177 io.c                   tmp = rb_rescue2(argf_forward, (VALUE)argv,
rb_rescue2        579 ruby.h         VALUE rb_rescue2(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE,...);


rb_reserved_word

rb_reserved_word    4 lex.c          const struct kwtable *rb_reserved_word(const char *, unsigned int);
rb_reserved_word 6783 parse.y        		kw = rb_reserved_word(tok(), toklen());


rb_respond_to

rb_respond_to     962 array.c            if (rb_respond_to(obj, rb_intern("to_ary"))) {
rb_respond_to    2344 array.c        	if (!rb_respond_to(ary2, rb_intern("to_ary"))) {
rb_respond_to    4478 eval.c         	if (!rb_respond_to(argv[0], exception)) {
rb_respond_to     435 ext/dl/cptr.c      else if( rb_respond_to(val, id_to_ptr) ){
rb_respond_to     267 ext/openssl/ossl.c     if(rb_respond_to(obj, ossl_s_to_der))
rb_respond_to     129 ext/readline/readline.c     if (!rb_respond_to(proc, rb_intern("call")))
rb_respond_to     178 ext/syck/rubyext.c     else if (rb_respond_to(port, s_read)) {
rb_respond_to     179 ext/syck/rubyext.c         if (rb_respond_to(port, s_binmode)) {
rb_respond_to     803 ext/syck/rubyext.c     if ( rb_respond_to( size, s_to_i ) ) {
rb_respond_to    1119 ext/syck/rubyext.c                     if ( RARRAY(subclass_parts)->len > 0 && rb_respond_to( target_class, s_tag_subclasses ) &&
rb_respond_to    1147 ext/syck/rubyext.c         if ( rb_respond_to( target_class, s_call ) )
rb_respond_to    1153 ext/syck/rubyext.c             if ( rb_respond_to( target_class, s_yaml_new ) )
rb_respond_to    1160 ext/syck/rubyext.c                 if ( rb_respond_to( obj, s_yaml_initialize ) )
rb_respond_to    1570 ext/syck/rubyext.c     if ( rb_respond_to( emitter, s_node_export ) ) {
rb_respond_to    1696 ext/syck/rubyext.c     if ( rb_respond_to( emitter, s_node_export ) ) {
rb_respond_to    1989 ext/syck/rubyext.c     else if ( rb_respond_to( options, s_write ) )
rb_respond_to    2192 ext/tk/tcltklib.c         if (rb_respond_to(obj, ID_to_s)) {
rb_respond_to    1809 ext/zlib/zlib.c     if (closeflag && rb_respond_to(io, id_close)) {
rb_respond_to    1825 ext/zlib/zlib.c 	    && rb_respond_to(gz->io, id_flush))
rb_respond_to    2829 ext/zlib/zlib.c     if (rb_respond_to(gz->io, id_flush)) {
rb_respond_to     111 file.c             if (rb_respond_to(obj, to_path)) {
rb_respond_to    1651 gc.c               if (!rb_respond_to(block, rb_intern("call"))) {
rb_respond_to    1728 gc.c               else if (!rb_respond_to(block, rb_intern("call"))) {
rb_respond_to    1348 hash.c         	if (!rb_respond_to(hash2, rb_intern("to_hash"))) {
rb_respond_to     223 intern.h       int rb_respond_to(VALUE, ID);
rb_respond_to    3234 io.c           	if (rb_respond_to(argv[0], to_open)) {
rb_respond_to    3813 io.c               if (!rb_respond_to(val, mid)) {
rb_respond_to     459 marshal.c      	if (rb_respond_to(obj, s_mdump)) {
rb_respond_to     468 marshal.c      	if (rb_respond_to(obj, s_dump)) {
rb_respond_to     611 marshal.c      		if (!rb_respond_to(obj, s_dump_data)) {
rb_respond_to     702 marshal.c      	if (!rb_respond_to(port, s_write)) {
rb_respond_to     708 marshal.c      	if (rb_respond_to(port, s_binmode)) {
rb_respond_to    1163 marshal.c      	    if (!rb_respond_to(klass, s_load)) {
rb_respond_to    1189 marshal.c      	    if (!rb_respond_to(v, s_mload)) {
rb_respond_to    1215 marshal.c                 if (rb_respond_to(klass, s_alloc)) {
rb_respond_to    1230 marshal.c                 if (!rb_respond_to(v, s_load_data)) {
rb_respond_to    1322 marshal.c          if (rb_respond_to(port, rb_intern("to_str"))) {
rb_respond_to    1326 marshal.c          else if (rb_respond_to(port, s_getc) && rb_respond_to(port, s_read)) {
rb_respond_to    1327 marshal.c      	if (rb_respond_to(port, s_binmode)) {
rb_respond_to    1921 object.c           if (!rb_respond_to(val, m)) {
rb_respond_to     332 range.c        	    if (!rb_respond_to(b, id_succ)) {
rb_respond_to     379 range.c            if (!rb_respond_to(beg, id_succ)) {
rb_respond_to     851 string.c       	if (!rb_respond_to(str2, rb_intern("to_str"))) {
rb_respond_to     914 string.c       	if (!rb_respond_to(str2, rb_intern("to_str"))) {
rb_respond_to     917 string.c       	else if (!rb_respond_to(str2, rb_intern("<=>"))) {


rb_safe_level

rb_safe_level      50 array.c            if (!OBJ_TAINTED(ary) && rb_safe_level() >= 4)
rb_safe_level      86 ext/curses/curses.c     if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4)\
rb_safe_level     665 ext/curses/curses.c     if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4)\
rb_safe_level     241 ext/socket/socket.c     if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) {
rb_safe_level     266 ext/socket/socket.c     if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) {
rb_safe_level     285 ext/socket/socket.c     if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) {
rb_safe_level    1280 ext/socket/socket.c     if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) {
rb_safe_level    2064 ext/tk/tcltklib.c     if (rb_safe_level() >= 4 || (rb_safe_level() >=1 && OBJ_TAINTED(vflags))) {
rb_safe_level    2692 ext/tk/tcltklib.c     if (rb_safe_level() >= 4 || Tcl_IsSafe(interp)) {
rb_safe_level    5430 ext/tk/tcltklib.c     if (rb_safe_level() != q->safe_level) {
rb_safe_level    5524 ext/tk/tcltklib.c     callq->safe_level = rb_safe_level();
rb_safe_level    5744 ext/tk/tcltklib.c     if (rb_safe_level() != q->safe_level) {
rb_safe_level    5837 ext/tk/tcltklib.c     evq->safe_level = rb_safe_level();
rb_safe_level    6823 ext/tk/tcltklib.c     if (rb_safe_level() != q->safe_level) {
rb_safe_level    6916 ext/tk/tcltklib.c     ivq->safe_level = rb_safe_level();
rb_safe_level    4102 file.c         	if (rb_safe_level() >= 2 && OBJ_TAINTED(fname)) {
rb_safe_level    4155 file.c         	if (rb_safe_level() >= 1 && OBJ_TAINTED(path)) {
rb_safe_level    4164 file.c         	if (rb_safe_level() >= 1 && !fpath_check(f)) {
rb_safe_level    4172 file.c         	if (rb_safe_level() >= 1 && !fpath_check(f)) {
rb_safe_level    4178 file.c             if (rb_safe_level() >= 4) {
rb_safe_level    4200 file.c         	    if (rb_safe_level() >= 1 && !rb_path_check(lpath)) {
rb_safe_level    4213 file.c             if (rb_safe_level() >= 1 && !fpath_check(f)) {
rb_safe_level      83 gc.c               if (!nomem_error || (recurse > 0 && rb_safe_level() < 4)) {
rb_safe_level     224 hash.c             if (!OBJ_TAINTED(hash) && rb_safe_level() >= 4)
rb_safe_level    1762 hash.c             if (rb_safe_level() >= 4) {
rb_safe_level     208 io.c               if (!OBJ_TAINTED(io) && rb_safe_level() >= 4)
rb_safe_level    2082 io.c               if (rb_safe_level() >= 4 && !OBJ_TAINTED(io)) {
rb_safe_level    2152 io.c               if (rb_safe_level() >= 4 && !OBJ_TAINTED(io)) {
rb_safe_level    2197 io.c               if (rb_safe_level() >= 4 && !OBJ_TAINTED(io)) {
rb_safe_level    3277 io.c               if (rb_safe_level() >= 4 && (!OBJ_TAINTED(io) || !OBJ_TAINTED(nfile))) {
rb_safe_level     651 object.c       	if (rb_safe_level() >= 4 && !OBJ_TAINTED(obj)) {
rb_safe_level    4558 parse.y            if (!compile_for_eval && rb_safe_level() == 0 &&
rb_safe_level     912 process.c      	if (rb_safe_level() > 0) {
rb_safe_level     937 re.c           	if (rb_safe_level() >= 3)
rb_safe_level     306 ruby.c             if (rb_safe_level() == 0) {
rb_safe_level     327 ruby.c             if (rb_safe_level() == 0) {
rb_safe_level     746 ruby.c             if (rb_safe_level() == 0 && (s = getenv("RUBYOPT"))) {
rb_safe_level     784 ruby.c             if (rb_safe_level() >= 4) {
rb_safe_level     840 ruby.c             if (rb_safe_level() >= 4) {
rb_safe_level    1125 ruby.c             if (rb_safe_level() > 0)
rb_safe_level     315 ruby.h             if (rb_safe_level() >= 3) FL_SET(obj, FL_TAINT);\
rb_safe_level     425 string.c           if (!OBJ_TAINTED(str) && rb_safe_level() >= 4)
rb_safe_level     145 struct.c           if (!OBJ_TAINTED(s) && rb_safe_level() >= 4)
rb_safe_level      59 time.c             if (!OBJ_TAINTED(time) && rb_safe_level() >= 4)
rb_safe_level     655 variable.c         if (rb_safe_level() >= 4)
rb_safe_level     731 variable.c         if (rb_safe_level() >= 4)
rb_safe_level     952 variable.c         if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4)
rb_safe_level    1069 variable.c         if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4)
rb_safe_level    1345 variable.c         if (!OBJ_TAINTED(mod) && rb_safe_level() >= 4)
rb_safe_level    1486 variable.c         if (!OBJ_TAINTED(klass) && rb_safe_level() >= 4)
rb_safe_level    1667 variable.c         if (!OBJ_TAINTED(mod) && rb_safe_level() >= 4)


rb_scan_args

rb_scan_args      319 array.c            if (rb_scan_args(argc, argv, "02", &size, &val) == 0) {
rb_scan_args      431 array.c            rb_scan_args(argc, argv, "1", &nv);
rb_scan_args      736 array.c        	rb_scan_args(argc, argv, "11", 0, 0);
rb_scan_args      854 array.c            rb_scan_args(argc, argv, "11", &pos, &ifnone);
rb_scan_args      896 array.c            if (rb_scan_args(argc, argv, "01", &val) == 0) {
rb_scan_args      934 array.c            if (rb_scan_args(argc, argv, "01", &val) == 0) {
rb_scan_args     1319 array.c            rb_scan_args(argc, argv, "01", &sep);
rb_scan_args     1838 array.c            if (rb_scan_args(argc, argv, "11", &arg1, &arg2) == 2) {
rb_scan_args     2108 array.c        	rb_scan_args(argc, argv, "02", &arg1, &arg2);
rb_scan_args     2112 array.c        	rb_scan_args(argc, argv, "12", &item, &arg1, &arg2);
rb_scan_args      689 bignum.c           rb_scan_args(argc, argv, "01", &b);
rb_scan_args      565 class.c        	rb_scan_args(argc, argv, "01", &r);
rb_scan_args      707 class.c            rb_scan_args(argc, argv, "01", &recur);
rb_scan_args      760 dir.c              if (rb_scan_args(argc, argv, "01", &path) == 1) {
rb_scan_args      873 dir.c              if (rb_scan_args(argc, argv, "11", &path, &vmode) == 2) {
rb_scan_args     1605 dir.c              if (rb_scan_args(argc, argv, "11", &str, &rflags) == 2)
rb_scan_args     1773 dir.c              if (rb_scan_args(argc, argv, "21", &pattern, &path, &rflags) == 3)
rb_scan_args      117 enum.c         	rb_scan_args(argc, argv, "1", &item);
rb_scan_args      162 enum.c             rb_scan_args(argc, argv, "01", &if_none);
rb_scan_args      352 enum.c             if (rb_scan_args(argc, argv, "01", &memo) == 0)
rb_scan_args      300 error.c            rb_scan_args(argc, argv, "01", &arg);
rb_scan_args      836 error.c        	rb_scan_args(argc, argv, "11", &mesg, &error);
rb_scan_args      849 error.c        	rb_scan_args(argc, argv, "01", &mesg);
rb_scan_args     4049 eval.c             rb_scan_args(argc, argv, "11", &mid, &priv);
rb_scan_args     4275 eval.c             if (rb_scan_args(argc, argv, "01", &status) == 1) {
rb_scan_args     4323 eval.c         	rb_scan_args(argc, argv, "1", &mesg);
rb_scan_args     6036 eval.c             rb_scan_args(argc, argv, "01", &level);
rb_scan_args     6247 eval.c             rb_scan_args(argc, argv, "13", &src, &scope, &vfile, &vline);
rb_scan_args     6672 eval.c             rb_scan_args(argc, argv, "11", &fname, &wrap);
rb_scan_args     8034 eval.c             rb_scan_args(argc, argv, "12", &args[0], &args[2], &args[3]);
rb_scan_args     10998 eval.c             rb_scan_args(argc, argv, "01", &limit);
rb_scan_args     12984 eval.c             rb_scan_args(argc, argv, "11", &tag, &value);
rb_scan_args      161 ext/Win32API/Win32API.c     int items = rb_scan_args(argc, argv, "0*", &args);
rb_scan_args      182 ext/bigdecimal/bigdecimal.c     rb_scan_args(argc, argv, "01", &dummy);
rb_scan_args      223 ext/bigdecimal/bigdecimal.c     if(rb_scan_args(argc,argv,"11",&which,&val)==1) val = Qnil;
rb_scan_args      787 ext/bigdecimal/bigdecimal.c     int na = rb_scan_args(argc,argv,"11",&b,&n);
rb_scan_args      928 ext/bigdecimal/bigdecimal.c     int na = rb_scan_args(argc,argv,"02",&vLoc,&vRound);
rb_scan_args      968 ext/bigdecimal/bigdecimal.c     if(rb_scan_args(argc,argv,"01",&vLoc)==0) {
rb_scan_args     1007 ext/bigdecimal/bigdecimal.c     if(rb_scan_args(argc,argv,"01",&vLoc)==0) {
rb_scan_args     1032 ext/bigdecimal/bigdecimal.c     if(rb_scan_args(argc,argv,"01",&vLoc)==0) {
rb_scan_args     1062 ext/bigdecimal/bigdecimal.c     if(rb_scan_args(argc,argv,"01",&f)==1) {
rb_scan_args     1190 ext/bigdecimal/bigdecimal.c     if(rb_scan_args(argc,argv,"11",&iniValue,&nFig)==1) {
rb_scan_args     1209 ext/bigdecimal/bigdecimal.c     if(rb_scan_args(argc,argv,"11",&iniValue,&nFig)==1) {
rb_scan_args     1225 ext/bigdecimal/bigdecimal.c     if(rb_scan_args(argc,argv,"01",&nFig)==1) {
rb_scan_args     1027 ext/curses/curses.c     rb_scan_args(argc, argv, "21", &vert, &hor, &corn);
rb_scan_args      108 ext/dbm/dbm.c      if (rb_scan_args(argc, argv, "12", &file, &vmode, &vflags) == 1) {
rb_scan_args      209 ext/dbm/dbm.c      rb_scan_args(argc, argv, "11", &keystr, &ifnone);
rb_scan_args      159 ext/digest/digest.c     rb_scan_args(argc, argv, "01", &arg);
rb_scan_args      118 ext/dl/cfunc.c     rb_scan_args(argc, argv, "13", &addr, &type, &name, &calltype);
rb_scan_args      117 ext/dl/cptr.c    switch (rb_scan_args(argc, argv, "12", &ptr, &size, &sym)) {
rb_scan_args      155 ext/dl/cptr.c    switch (rb_scan_args(argc, argv, "11", &size, &sym)) {
rb_scan_args      252 ext/dl/cptr.c    switch (rb_scan_args(argc, argv, "01", &arg1)) {
rb_scan_args      275 ext/dl/cptr.c    switch (rb_scan_args(argc, argv, "01", &arg1)) {
rb_scan_args      352 ext/dl/cptr.c      switch( rb_scan_args(argc, argv, "11", &arg0, &arg1) ){
rb_scan_args      376 ext/dl/cptr.c      switch( rb_scan_args(argc, argv, "21", &arg0, &arg1, &arg2) ){
rb_scan_args      408 ext/dl/cptr.c    if (rb_scan_args(argc, argv, "01", &size) == 0){
rb_scan_args       53 ext/dl/handle.c   switch( rb_scan_args(argc, argv, "02", &lib, &flag) ){
rb_scan_args      133 ext/etc/etc.c      if (rb_scan_args(argc, argv, "01", &id) == 1) {
rb_scan_args      110 ext/gdbm/gdbm.c     if (rb_scan_args(argc, argv, "12", &file, &vmode, &vflags) == 1) {
rb_scan_args      304 ext/gdbm/gdbm.c     rb_scan_args(argc, argv, "11", &keystr, &ifnone);
rb_scan_args      558 ext/iconv/iconv.c     rb_scan_args(argc, argv, "21", &to, &from, &options);
rb_scan_args      580 ext/iconv/iconv.c     rb_scan_args(argc, argv, "21", &to, &from, &options);
rb_scan_args      793 ext/iconv/iconv.c     rb_scan_args(argc, argv, "12", &str, &n1, &n2);
rb_scan_args      110 ext/io/wait/wait.c     rb_scan_args(argc, argv, "01", &timeout);
rb_scan_args      871 ext/openssl/ossl_asn1.c     rb_scan_args(argc, argv, "13", &value, &tag, &tagging, &tag_class);
rb_scan_args      110 ext/openssl/ossl_bn.c     if (rb_scan_args(argc, argv, "11", &str, &bs) == 2) {
rb_scan_args      160 ext/openssl/ossl_bn.c     if (rb_scan_args(argc, argv, "01", &bs) == 1) {
rb_scan_args      421 ext/openssl/ossl_bn.c 	switch (rb_scan_args(argc, argv, "12", &bits, &fill, &odd)) {	\
rb_scan_args      468 ext/openssl/ossl_bn.c     rb_scan_args(argc, argv, "13", &vnum, &vsafe, &vadd, &vrem);
rb_scan_args      551 ext/openssl/ossl_bn.c     if (rb_scan_args(argc, argv, "01", &vchecks) == 0) {
rb_scan_args      574 ext/openssl/ossl_bn.c     rb_scan_args(argc, argv, "02", &vchecks, &vtrivdiv);
rb_scan_args      140 ext/openssl/ossl_cipher.c     if(rb_scan_args(argc, argv, "02", &pass, &init_v) > 0){
rb_scan_args      196 ext/openssl/ossl_cipher.c     rb_scan_args(argc, argv, "13", &vpass, &vsalt, &viter, &vdigest);
rb_scan_args      137 ext/openssl/ossl_config.c     rb_scan_args(argc, argv, "01", &path);
rb_scan_args      218 ext/openssl/ossl_config.c     rb_scan_args(argc, argv, "11", &section, &name);
rb_scan_args       88 ext/openssl/ossl_digest.c     rb_scan_args(argc, argv, "11", &type, &data);
rb_scan_args       57 ext/openssl/ossl_engine.c     rb_scan_args(argc, argv, "01", &name);
rb_scan_args      223 ext/openssl/ossl_engine.c     rb_scan_args(argc, argv, "02", &id, &data);
rb_scan_args      247 ext/openssl/ossl_engine.c     rb_scan_args(argc, argv, "02", &id, &data);
rb_scan_args      281 ext/openssl/ossl_engine.c     rb_scan_args(argc, argv, "11", &cmd, &val);
rb_scan_args       61 ext/openssl/ossl_ns_spki.c     if (rb_scan_args(argc, argv, "01", &buffer) == 0) {
rb_scan_args      108 ext/openssl/ossl_ocsp.c     rb_scan_args(argc, argv, "01", &arg);
rb_scan_args      129 ext/openssl/ossl_ocsp.c     rb_scan_args(argc, argv, "01", &val);
rb_scan_args      218 ext/openssl/ossl_ocsp.c     rb_scan_args(argc, argv, "22", &signer_cert, &signer_key, &certs, &flags);
rb_scan_args      244 ext/openssl/ossl_ocsp.c     rb_scan_args(argc, argv, "21", &certs, &store, &flags);
rb_scan_args      315 ext/openssl/ossl_ocsp.c     rb_scan_args(argc, argv, "01", &arg);
rb_scan_args      431 ext/openssl/ossl_ocsp.c     rb_scan_args(argc, argv, "01", &val);
rb_scan_args      570 ext/openssl/ossl_ocsp.c     rb_scan_args(argc, argv, "22", &signer_cert, &signer_key, &certs, &flags);
rb_scan_args      598 ext/openssl/ossl_ocsp.c     rb_scan_args(argc, argv, "21", &certs, &store, &flags);
rb_scan_args       63 ext/openssl/ossl_pkcs12.c     rb_scan_args(argc, argv, "41", &pass, &name, &pkey, &cert, &ca);
rb_scan_args       89 ext/openssl/ossl_pkcs12.c     if(rb_scan_args(argc, argv, "02", &arg, &pass) == 0) return self;
rb_scan_args      168 ext/openssl/ossl_pkcs7.c     rb_scan_args(argc, argv, "12", &pkcs7, &data, &flags);
rb_scan_args      202 ext/openssl/ossl_pkcs7.c     rb_scan_args(argc, argv, "32", &cert, &key, &data, &certs, &flags);
rb_scan_args      240 ext/openssl/ossl_pkcs7.c     rb_scan_args(argc, argv, "22", &certs, &data, &cipher, &flags);
rb_scan_args      297 ext/openssl/ossl_pkcs7.c     if(rb_scan_args(argc, argv, "01", &arg) == 0)
rb_scan_args      649 ext/openssl/ossl_pkcs7.c     rb_scan_args(argc, argv, "22", &certs, &store, &indata, &flags);
rb_scan_args      690 ext/openssl/ossl_pkcs7.c     rb_scan_args(argc, argv, "21", &pkey, &cert, &flags);
rb_scan_args      109 ext/openssl/ossl_pkey_dh.c     if (rb_scan_args(argc, argv, "11", &size, &gen) == 2) {
rb_scan_args      132 ext/openssl/ossl_pkey_dh.c     if(rb_scan_args(argc, argv, "02", &arg, &gen) == 0) {
rb_scan_args      126 ext/openssl/ossl_pkey_dsa.c     if(rb_scan_args(argc, argv, "02", &arg, &pass) == 0) {
rb_scan_args      200 ext/openssl/ossl_pkey_dsa.c     rb_scan_args(argc, argv, "02", &cipher, &pass);
rb_scan_args       94 ext/openssl/ossl_pkey_rsa.c     rb_scan_args(argc, argv, "11", &size, &exp);
rb_scan_args      117 ext/openssl/ossl_pkey_rsa.c     if(rb_scan_args(argc, argv, "02", &arg, &pass) == 0) {
rb_scan_args      194 ext/openssl/ossl_pkey_rsa.c     rb_scan_args(argc, argv, "02", &cipher, &pass);
rb_scan_args      257 ext/openssl/ossl_pkey_rsa.c     rb_scan_args(argc, argv, "11", &buffer, &padding);
rb_scan_args      279 ext/openssl/ossl_pkey_rsa.c     rb_scan_args(argc, argv, "11", &buffer, &padding);
rb_scan_args      304 ext/openssl/ossl_pkey_rsa.c     rb_scan_args(argc, argv, "11", &buffer, &padding);
rb_scan_args      329 ext/openssl/ossl_pkey_rsa.c     rb_scan_args(argc, argv, "11", &buffer, &padding);
rb_scan_args      154 ext/openssl/ossl_ssl.c     if (rb_scan_args(argc, argv, "01", &ssl_method) == 0){
rb_scan_args      516 ext/openssl/ossl_ssl.c     if (rb_scan_args(argc, argv, "11", &io, &ctx) == 1) {
rb_scan_args      622 ext/openssl/ossl_ssl.c     rb_scan_args(argc, argv, "11", &len, &str);
rb_scan_args       95 ext/openssl/ossl_x509attr.c     if(rb_scan_args(argc, argv, "11", &oid, &value) == 1){
rb_scan_args      135 ext/openssl/ossl_x509cert.c     if (rb_scan_args(argc, argv, "01", &arg) == 0) {
rb_scan_args       97 ext/openssl/ossl_x509crl.c     if (rb_scan_args(argc, argv, "01", &arg) == 0) {
rb_scan_args      191 ext/openssl/ossl_x509ext.c     rb_scan_args(argc, argv, "04",
rb_scan_args      227 ext/openssl/ossl_x509ext.c     rb_scan_args(argc, argv, "21", &oid, &value, &critical);
rb_scan_args      280 ext/openssl/ossl_x509ext.c     if(rb_scan_args(argc, argv, "12", &oid, &value, &critical) == 1){
rb_scan_args      119 ext/openssl/ossl_x509name.c     if (rb_scan_args(argc, argv, "02", &arg, &template) == 0) {
rb_scan_args      150 ext/openssl/ossl_x509name.c     rb_scan_args(argc, argv, "21", &oid, &value, &type);
rb_scan_args      186 ext/openssl/ossl_x509name.c     rb_scan_args(argc, argv, "01", &flag);
rb_scan_args      105 ext/openssl/ossl_x509req.c     if (rb_scan_args(argc, argv, "01", &arg) == 0) {
rb_scan_args      295 ext/openssl/ossl_x509store.c     rb_scan_args(argc, argv, "11", &cert, &chain);
rb_scan_args      374 ext/openssl/ossl_x509store.c     rb_scan_args(argc, argv, "12", &store, &cert, &chain);
rb_scan_args       64 ext/readline/readline.c     if (rb_scan_args(argc, argv, "02", &tmp, &add_hist) > 0) {
rb_scan_args       99 ext/sdbm/init.c     if (rb_scan_args(argc, argv, "11", &file, &vmode) == 1) {
rb_scan_args      187 ext/sdbm/init.c     rb_scan_args(argc, argv, "11", &keystr, &ifnone);
rb_scan_args      244 ext/socket/socket.c     rb_scan_args(argc, argv, "01", &howto);
rb_scan_args      488 ext/socket/socket.c     rb_scan_args(argc, argv, "21", &mesg, &flags, &to);
rb_scan_args      572 ext/socket/socket.c     rb_scan_args(argc, argv, "11", &len, &flg);
rb_scan_args     1251 ext/socket/socket.c     rb_scan_args(argc, argv, "22", &remote_host, &remote_serv,
rb_scan_args     1379 ext/socket/socket.c     if (rb_scan_args(argc, argv, "11", &arg1, &arg2) == 2)
rb_scan_args     1581 ext/socket/socket.c     if (rb_scan_args(argc, argv, "01", &arg) == 1) {
rb_scan_args     1668 ext/socket/socket.c     rb_scan_args(argc, argv, "4", &mesg, &flags, &host, &port);
rb_scan_args     1829 ext/socket/socket.c     rb_scan_args(argc, argv, "02", &klass, &mode);
rb_scan_args     2129 ext/socket/socket.c     rb_scan_args(argc, argv, "02", &type, &protocol);
rb_scan_args     2739 ext/socket/socket.c     rb_scan_args(argc, argv, "11", &addr, &type);
rb_scan_args     2788 ext/socket/socket.c     rb_scan_args(argc, argv, "11", &service, &proto);
rb_scan_args     2817 ext/socket/socket.c     rb_scan_args(argc, argv, "11", &port, &proto);
rb_scan_args     2840 ext/socket/socket.c     rb_scan_args(argc, argv, "24", &host, &port, &family, &socktype, &protocol, &flags);
rb_scan_args     2915 ext/socket/socket.c     rb_scan_args(argc, argv, "11", &sa, &flags);
rb_scan_args      225 ext/stringio/stringio.c     switch (rb_scan_args(argc, argv, "02", &string, &mode)) {
rb_scan_args      642 ext/stringio/stringio.c     rb_scan_args(argc, argv, "11", NULL, &whence);
rb_scan_args      838 ext/stringio/stringio.c 	rb_scan_args(argc, argv, "1", &str);
rb_scan_args      201 ext/strscan/strscan.c     rb_scan_args(argc, argv, "11", &str, &need_dup);
rb_scan_args      781 ext/syck/rubyext.c     if (rb_scan_args(argc, argv, "01", &options) == 0)
rb_scan_args      837 ext/syck/rubyext.c     rb_scan_args(argc, argv, "11", &port, &proc);
rb_scan_args      867 ext/syck/rubyext.c     rb_scan_args(argc, argv, "1&", &port, &proc);
rb_scan_args     1980 ext/syck/rubyext.c     if (rb_scan_args(argc, argv, "01", &options) == 0)
rb_scan_args     2022 ext/syck/rubyext.c     rb_scan_args(argc, argv, "1&", &oid, &proc);
rb_scan_args     2091 ext/syck/rubyext.c     if (rb_scan_args(argc, argv, "11", &type_id, &style) == 1) {
rb_scan_args     2110 ext/syck/rubyext.c     if (rb_scan_args(argc, argv, "11", &type_id, &style) == 1) {
rb_scan_args     2131 ext/syck/rubyext.c     if (rb_scan_args(argc, argv, "21", &type_id, &str, &style) == 2) {
rb_scan_args       63 ext/syslog/syslog.c     rb_scan_args(argc, argv, "03", &ident, &opt, &fac);
rb_scan_args     1790 ext/tk/tcltklib.c     if (rb_scan_args(argc, argv, "01", &check_rootwidget) == 0) {
rb_scan_args     1906 ext/tk/tcltklib.c     if (rb_scan_args(argc, argv, "01", &check_rootwidget) == 0) {
rb_scan_args     1995 ext/tk/tcltklib.c     if (rb_scan_args(argc, argv, "01", &proc) == 0) {
rb_scan_args     2057 ext/tk/tcltklib.c     if (rb_scan_args(argc, argv, "01", &vflags) == 0) {
rb_scan_args     4737 ext/tk/tcltklib.c     cnt = rb_scan_args(argc, argv, "02", &argv0, &opts);
rb_scan_args     4973 ext/tk/tcltklib.c     if (rb_scan_args(argc, argv, "11", &name, &safemode) == 1) {
rb_scan_args     6102 ext/tk/tcltklib.c     if (rb_scan_args(argc, argv, "11", &str, &encodename) == 1) {
rb_scan_args     6116 ext/tk/tcltklib.c     if (rb_scan_args(argc, argv, "11", &str, &encodename) == 1) {
rb_scan_args     6261 ext/tk/tcltklib.c     if (rb_scan_args(argc, argv, "11", &str, &encodename) == 1) {
rb_scan_args     6275 ext/tk/tcltklib.c     if (rb_scan_args(argc, argv, "11", &str, &encodename) == 1) {
rb_scan_args       83 ext/tk/tkutil/tkutil.c     rb_scan_args(argc, argv, "1*", &cmd, &rest);
rb_scan_args       97 ext/tk/tkutil/tkutil.c     rb_scan_args(argc, argv, "1*", &id, &rest);
rb_scan_args      129 ext/tk/tkutil/tkutil.c     if (rb_scan_args(argc, argv, "01", &cmd) == 0) {
rb_scan_args      871 ext/tk/tkutil/tkutil.c     if (rb_scan_args(argc, argv, "11", &obj, &enc_flag) == 1) {
rb_scan_args     1584 ext/win32ole/win32ole.c     rb_scan_args(argc, argv, "2*", &ole, &host, &others);
rb_scan_args     1685 ext/win32ole/win32ole.c     rb_scan_args(argc, argv, "1*", &svr_name, &others);
rb_scan_args     1768 ext/win32ole/win32ole.c     rb_scan_args(argc, argv, "11", &ole, &klass);
rb_scan_args     1953 ext/win32ole/win32ole.c     rb_scan_args(argc, argv, "11", &target, &helpcontext);
rb_scan_args     2061 ext/win32ole/win32ole.c     rb_scan_args(argc, argv, "11*", &svr_name, &host, &others);
rb_scan_args     2192 ext/win32ole/win32ole.c     rb_scan_args(argc, argv, "1*", &cmd, &paramS);
rb_scan_args     6692 ext/win32ole/win32ole.c     rb_scan_args(argc, argv, "11", &ole, &itf);
rb_scan_args     6797 ext/win32ole/win32ole.c     rb_scan_args(argc, argv, "01*", &event, &args);
rb_scan_args      270 ext/zlib/zlib.c     rb_scan_args(argc, argv, "02", &str, &vsum);
rb_scan_args     1149 ext/zlib/zlib.c     rb_scan_args(argc, argv, "04", &level, &wbits, &memlevel, &strategy);
rb_scan_args     1224 ext/zlib/zlib.c     rb_scan_args(argc, argv, "11", &src, &level);
rb_scan_args     1282 ext/zlib/zlib.c     rb_scan_args(argc, argv, "11", &src, &flush);
rb_scan_args     1326 ext/zlib/zlib.c     rb_scan_args(argc, argv, "01", &v_flush);
rb_scan_args     1438 ext/zlib/zlib.c     rb_scan_args(argc, argv, "01", &wbits);
rb_scan_args     2788 ext/zlib/zlib.c     rb_scan_args(argc, argv, "12", &io, &level, &strategy);
rb_scan_args     2821 ext/zlib/zlib.c     rb_scan_args(argc, argv, "01", &v_flush);
rb_scan_args     3039 ext/zlib/zlib.c     rb_scan_args(argc, argv, "01", &vlen);
rb_scan_args     3071 ext/zlib/zlib.c     rb_scan_args(argc, argv, "11", &vlen, &outbuf);
rb_scan_args     3199 ext/zlib/zlib.c 	rb_scan_args(argc, argv, "1", &rs);
rb_scan_args     1710 file.c             rb_scan_args(argc, argv, "1*", &vmode, &rest);
rb_scan_args     1778 file.c             rb_scan_args(argc, argv, "1*", &vmode, &rest);
rb_scan_args     1828 file.c             rb_scan_args(argc, argv, "2*", &o, &g, &rest);
rb_scan_args     1912 file.c             rb_scan_args(argc, argv, "2*", &o, &g, &rest);
rb_scan_args     1965 file.c             rb_scan_args(argc, argv, "2*", &atime, &mtime, &rest);
rb_scan_args     1999 file.c             rb_scan_args(argc, argv, "2*", &atime, &mtime, &rest);
rb_scan_args     2628 file.c             rb_scan_args(argc, argv, "11", &fname, &dname);
rb_scan_args     2679 file.c             if (rb_scan_args(argc, argv, "11", &fname, &fext) == 2) {
rb_scan_args     1634 gc.c               if (rb_scan_args(argc, argv, "01", &of) == 0) {
rb_scan_args     1724 gc.c               rb_scan_args(argc, argv, "11", &obj, &block);
rb_scan_args      277 hash.c         	rb_scan_args(argc, argv, "01", &ifnone);
rb_scan_args      435 hash.c             rb_scan_args(argc, argv, "11", &key, &if_none);
rb_scan_args      477 hash.c             rb_scan_args(argc, argv, "01", &key);
rb_scan_args     1608 hash.c             rb_scan_args(argc, argv, "11", &key, &if_none);
rb_scan_args      801 io.c               if (rb_scan_args(argc, argv, "11", &offset, &ptrname) == 2) {
rb_scan_args     1248 io.c               rb_scan_args(argc, argv, "11", &length, &str);
rb_scan_args     1390 io.c               rb_scan_args(argc, argv, "02", &length, &str);
rb_scan_args     1645 io.c           	rb_scan_args(argc, argv, "1", &rs);
rb_scan_args     1776 io.c           	rb_scan_args(argc, argv, "1", &rs);
rb_scan_args     1817 io.c           	rb_scan_args(argc, argv, "1", &rs);
rb_scan_args     2240 io.c               if (rb_scan_args(argc, argv, "11", &offset, &ptrname) == 2) {
rb_scan_args     2321 io.c               rb_scan_args(argc, argv, "11", &len, &str);
rb_scan_args     3018 io.c               if (rb_scan_args(argc, argv, "11", &pname, &pmode) == 1) {
rb_scan_args     3063 io.c               rb_scan_args(argc, argv, "12", &fname, &vmode, &perm);
rb_scan_args     3128 io.c               rb_scan_args(argc, argv, "12", &fname, &vmode, &perm);
rb_scan_args     3379 io.c               if (rb_scan_args(argc, argv, "11", &fname, &nmode) == 1) {
rb_scan_args     3789 io.c               if (rb_scan_args(argc, argv, "01", &out) == 0) {
rb_scan_args     3911 io.c               rb_scan_args(argc, argv, "11", &fnum, &mode);
rb_scan_args     4213 io.c           	    rb_scan_args(argc, argv, "1", &rs);
rb_scan_args     4548 io.c               rb_scan_args(argc, argv, "13", &args.read, &args.write, &args.except, &timeout);
rb_scan_args     4688 io.c               rb_scan_args(argc, argv, "11", &req, &arg);
rb_scan_args     4711 io.c               rb_scan_args(argc, argv, "11", &req, &arg);
rb_scan_args     4956 io.c               rb_scan_args(argc, argv, "11", &fname, &arg.sep);
rb_scan_args     4995 io.c               rb_scan_args(argc, argv, "11", &fname, &arg.sep);
rb_scan_args     5028 io.c               rb_scan_args(argc, argv, "12", &fname, &arg.sep, &offset);
rb_scan_args     5116 io.c               rb_scan_args(argc, argv, "02", &length, &str);
rb_scan_args     5166 io.c               rb_scan_args(argc, argv, "11", &length, &str);
rb_scan_args      689 marshal.c          rb_scan_args(argc, argv, "12", &obj, &a1, &a2);
rb_scan_args     1321 marshal.c          rb_scan_args(argc, argv, "11", &port, &proc);
rb_scan_args     1881 numeric.c          rb_scan_args(argc, argv, "01", &b);
rb_scan_args     1388 object.c           if (rb_scan_args(argc, argv, "01", &super) == 0) {
rb_scan_args     1561 object.c           rb_scan_args(argc, argv, "11", &name, &pub);
rb_scan_args     1727 object.c       	rb_scan_args(argc, argv, "1", &recur);
rb_scan_args     9107 parse.y            rb_scan_args(argc, argv, "12", &src, &fname, &lineno);
rb_scan_args      715 process.c          rb_scan_args(argc, argv, "02", &vpid, &vflags);
rb_scan_args     1462 process.c          if (rb_scan_args(argc, argv, "01", &status) == 1) {
rb_scan_args     1987 process.c          rb_scan_args(argc, argv, "21", &resource, &rlim_cur, &rlim_max);
rb_scan_args     2763 process.c          rb_scan_args(argc, argv, "02", &nochdir, &noclose);
rb_scan_args      326 random.c           if (rb_scan_args(argc, argv, "01", &seed) == 0) {
rb_scan_args      439 random.c           rb_scan_args(argc, argv, "01", &vmax);
rb_scan_args       77 range.c            rb_scan_args(argc, argv, "21", &beg, &end, &flags);
rb_scan_args      290 range.c            if (rb_scan_args(argc, argv, "01", &step) == 0) {
rb_scan_args     1184 re.c               rb_scan_args(argc, argv, "11", &idx, &rest);
rb_scan_args     1593 re.c               if (rb_scan_args(argc, argv, "11", &str, &initpos) == 2) {
rb_scan_args     1816 re.c               rb_scan_args(argc, argv, "11", &str, &kcode);
rb_scan_args     2181 re.c               if (rb_scan_args(argc, argv, "01", &nth) == 1) {
rb_scan_args      544 ruby.h         int rb_scan_args(int, const VALUE*, const char*, ...);
rb_scan_args      296 string.c           if (rb_scan_args(argc, argv, "01", &orig) == 1)
rb_scan_args     1010 string.c           if (rb_scan_args(argc, argv, "11", &sub, &initpos) == 2) {
rb_scan_args     1119 string.c           if (rb_scan_args(argc, argv, "11", &sub, &position) == 2) {
rb_scan_args     2274 string.c           rb_scan_args(argc, argv, "01", &b);
rb_scan_args     3218 string.c           if (rb_scan_args(argc, argv, "02", &spat, &limit) == 2) {
rb_scan_args     3392 string.c           if (rb_scan_args(argc, argv, "01", &rs) == 0) {
rb_scan_args     3534 string.c           if (rb_scan_args(argc, argv, "01", &rs) == 0) {
rb_scan_args     3995 string.c           if (rb_scan_args(argc, argv, "01", &vbits) == 0) {
rb_scan_args     4045 string.c           rb_scan_args(argc, argv, "11", &w, &pad);
rb_scan_args      280 struct.c           rb_scan_args(argc, argv, "1*", &name, &rest);
rb_scan_args      245 time.c             if (rb_scan_args(argc, argv, "11", &time, &t) == 2) {
rb_scan_args      298 time.c         	rb_scan_args(argc, argv, "17", &v[0],&v[1],&v[2],&v[3],&v[4],&v[5],&v[6],&v[7]);
rb_scan_args     1963 time.c             rb_scan_args(argc, argv, "01", 0);
rb_scan_args      524 variable.c         if (rb_scan_args(argc, argv, "11", &var, &cmd) == 1) {
rb_scan_args      584 variable.c         rb_scan_args(argc, argv, "11", &var, &cmd);


rb_secure

rb_secure         352 class.c        	rb_secure(4);
rb_secure         759 dir.c              rb_secure(2);
rb_secure         808 dir.c              rb_secure(4);
rb_secure         821 dir.c              rb_secure(2);
rb_secure         259 eval.c             if (!OBJ_TAINTED(obj)) rb_secure(4);
rb_secure         274 eval.c             rb_secure(4);
rb_secure         522 eval.c         	rb_secure(4);
rb_secure         592 eval.c         	rb_secure(4);
rb_secure        1915 eval.c         	rb_secure(4);
rb_secure        2019 eval.c         	rb_secure(4);
rb_secure        2465 eval.c             rb_secure(4);
rb_secure        4274 eval.c             rb_secure(4);
rb_secure        4313 eval.c             rb_secure(4);
rb_secure        6549 eval.c             if (!wrap) rb_secure(4);
rb_secure        6563 eval.c         	rb_secure(4);		/* should alter global state */
rb_secure        7372 eval.c             rb_secure(4);
rb_secure        11156 eval.c         	rb_secure(4);
rb_secure        11363 eval.c             rb_secure(4);
rb_secure        11446 eval.c             rb_secure(4);
rb_secure        11480 eval.c             rb_secure(4);
rb_secure        12312 eval.c         	rb_secure(4);
rb_secure        12780 eval.c             rb_secure(4);
rb_secure         126 ext/curses/curses.c     rb_secure(4);
rb_secure         781 ext/curses/curses.c     rb_secure(4);
rb_secure         285 ext/dbm/dbm.c      rb_secure(4);
rb_secure          60 ext/dl/cfunc.c   rb_secure(4);
rb_secure          45 ext/dl/cptr.c    rb_secure(4);
rb_secure          67 ext/dl/cptr.c    rb_secure(4);
rb_secure          99 ext/dl/cptr.c    rb_secure(4);
rb_secure          17 ext/dl/dl.c        rb_secure(2);
rb_secure         141 ext/dl/handle.c     rb_secure(2);
rb_secure          48 ext/etc/etc.c      rb_secure(4);
rb_secure         132 ext/etc/etc.c      rb_secure(4);
rb_secure         216 ext/etc/etc.c      rb_secure(4);
rb_secure         339 ext/etc/etc.c      rb_secure(4);
rb_secure         366 ext/etc/etc.c      rb_secure(4);
rb_secure         421 ext/etc/etc.c      rb_secure(4);
rb_secure         380 ext/gdbm/gdbm.c     rb_secure(4);
rb_secure          63 ext/readline/readline.c     rb_secure(4);
rb_secure         103 ext/readline/readline.c     rb_secure(4);
rb_secure         116 ext/readline/readline.c     rb_secure(4);
rb_secure         128 ext/readline/readline.c     rb_secure(4);
rb_secure         138 ext/readline/readline.c     rb_secure(4);
rb_secure         147 ext/readline/readline.c     rb_secure(4);
rb_secure         155 ext/readline/readline.c     rb_secure(4);
rb_secure         231 ext/readline/readline.c     rb_secure(4);
rb_secure         245 ext/readline/readline.c     rb_secure(4);
rb_secure         259 ext/readline/readline.c     rb_secure(4);
rb_secure         285 ext/readline/readline.c     rb_secure(4);
rb_secure         305 ext/readline/readline.c     rb_secure(4);
rb_secure         330 ext/readline/readline.c     rb_secure(4);
rb_secure         347 ext/readline/readline.c     rb_secure(4);
rb_secure         372 ext/readline/readline.c     rb_secure(4);
rb_secure         389 ext/readline/readline.c     rb_secure(4);
rb_secure         415 ext/readline/readline.c     rb_secure(4);
rb_secure         432 ext/readline/readline.c     rb_secure(4);
rb_secure         458 ext/readline/readline.c     rb_secure(4);
rb_secure         475 ext/readline/readline.c     rb_secure(4);
rb_secure         501 ext/readline/readline.c     rb_secure(4);
rb_secure         526 ext/readline/readline.c     rb_secure(4);
rb_secure         548 ext/readline/readline.c     rb_secure(4);
rb_secure         570 ext/readline/readline.c     rb_secure(4);
rb_secure         584 ext/readline/readline.c     rb_secure(4);
rb_secure         601 ext/readline/readline.c     rb_secure(4);
rb_secure         620 ext/readline/readline.c     rb_secure(4);
rb_secure         632 ext/readline/readline.c     rb_secure(4);
rb_secure         647 ext/readline/readline.c     rb_secure(4);
rb_secure         661 ext/readline/readline.c     rb_secure(4);
rb_secure         669 ext/readline/readline.c     rb_secure(4);
rb_secure         680 ext/readline/readline.c     rb_secure(4);
rb_secure         262 ext/sdbm/init.c     rb_secure(4);
rb_secure         353 ext/socket/socket.c     rb_secure(2);
rb_secure         487 ext/socket/socket.c     rb_secure(4);
rb_secure         533 ext/socket/socket.c     rb_secure(4);
rb_secure         651 ext/socket/socket.c     rb_secure(4);
rb_secure        1367 ext/socket/socket.c     rb_secure(3);
rb_secure        1395 ext/socket/socket.c     rb_secure(3);
rb_secure        1580 ext/socket/socket.c     rb_secure(3);
rb_secure        1621 ext/socket/socket.c     rb_secure(3);
rb_secure        1638 ext/socket/socket.c     rb_secure(3);
rb_secure        1667 ext/socket/socket.c     rb_secure(4);
rb_secure        2087 ext/socket/socket.c     rb_secure(3);
rb_secure        2440 ext/socket/socket.c     rb_secure(4);
rb_secure        2638 ext/socket/socket.c     rb_secure(3);
rb_secure        2656 ext/socket/socket.c     rb_secure(3);
rb_secure        2723 ext/socket/socket.c     rb_secure(3);
rb_secure         121 ext/stringio/stringio.c 	rb_secure(4);
rb_secure         362 ext/stringio/stringio.c     if (!OBJ_TAINTED(self)) rb_secure(4);
rb_secure         567 ext/stringio/stringio.c     if (!OBJ_TAINTED(self)) rb_secure(4);
rb_secure         952 ext/tk/tcltklib.c     rb_secure(4);
rb_secure        1019 ext/tk/tcltklib.c     rb_secure(4);
rb_secure        1073 ext/tk/tcltklib.c     rb_secure(4);
rb_secure        1189 ext/tk/tcltklib.c     rb_secure(4);
rb_secure        1206 ext/tk/tcltklib.c     rb_secure(4);
rb_secure        4978 ext/tk/tcltklib.c         rb_secure(4);
rb_secure        5182 ext/tk/tcltklib.c     rb_secure(4);
rb_secure        5939 ext/tk/tcltklib.c     rb_secure(4);
rb_secure        5958 ext/tk/tcltklib.c     rb_secure(4);
rb_secure        6986 ext/tk/tcltklib.c     rb_secure(4);
rb_secure        1681 ext/win32ole/win32ole.c     rb_secure(4);
rb_secure        1767 ext/win32ole/win32ole.c     rb_secure(4);
rb_secure        1832 ext/win32ole/win32ole.c     rb_secure(4);
rb_secure        2059 ext/win32ole/win32ole.c     rb_secure(4);
rb_secure        2754 ext/win32ole/win32ole.c     rb_secure(4);
rb_secure        3578 ext/win32ole/win32ole.c     rb_secure(4);
rb_secure        6691 ext/win32ole/win32ole.c     rb_secure(4);
rb_secure         130 file.c             rb_secure(4);
rb_secure         627 file.c             rb_secure(2);
rb_secure         687 file.c             rb_secure(4);
rb_secure         743 file.c             rb_secure(2);
rb_secure         776 file.c             rb_secure(2);
rb_secure         948 file.c             rb_secure(2);
rb_secure        1069 file.c             rb_secure(2);
rb_secure        1086 file.c             rb_secure(2);
rb_secure        1139 file.c             rb_secure(2);
rb_secure        1156 file.c             rb_secure(2);
rb_secure        1201 file.c             rb_secure(2);
rb_secure        1218 file.c             rb_secure(2);
rb_secure        1338 file.c             rb_secure(2);
rb_secure        1430 file.c             rb_secure(2);
rb_secure        1539 file.c             rb_secure(2);
rb_secure        1709 file.c             rb_secure(2);
rb_secure        1736 file.c             rb_secure(2);
rb_secure        1777 file.c             rb_secure(2);
rb_secure        1827 file.c             rb_secure(2);
rb_secure        1867 file.c             rb_secure(2);
rb_secure        1911 file.c             rb_secure(2);
rb_secure        2041 file.c             rb_secure(2);
rb_secure        2071 file.c             rb_secure(2);
rb_secure        2105 file.c             rb_secure(2);
rb_secure        2152 file.c             rb_secure(2);
rb_secure        2172 file.c             rb_secure(2);
rb_secure        2219 file.c             rb_secure(2);
rb_secure        2953 file.c             rb_secure(2);
rb_secure        3006 file.c             rb_secure(2);
rb_secure        3107 file.c             rb_secure(2);
rb_secure        3141 file.c             rb_secure(2);
rb_secure        3387 file.c             rb_secure(2);
rb_secure        1633 gc.c               rb_secure(4);
rb_secure        1881 gc.c               rb_secure(4);
rb_secure        1537 hash.c             rb_secure(4);
rb_secure        1576 hash.c             rb_secure(4);
rb_secure        1607 hash.c             rb_secure(4);
rb_secure        1799 hash.c             rb_secure(4);
rb_secure        1820 hash.c             rb_secure(4);
rb_secure        1834 hash.c             rb_secure(4);
rb_secure        1855 hash.c             rb_secure(4);
rb_secure        1870 hash.c             rb_secure(4);
rb_secure        1915 hash.c             rb_secure(4);
rb_secure        1944 hash.c             rb_secure(4);
rb_secure        1959 hash.c             rb_secure(4);
rb_secure        1984 hash.c             rb_secure(4);
rb_secure        2007 hash.c             rb_secure(4);
rb_secure        2038 hash.c             rb_secure(4);
rb_secure        2065 hash.c             rb_secure(4);
rb_secure        2078 hash.c             rb_secure(4);
rb_secure        2093 hash.c             rb_secure(4);
rb_secure        2106 hash.c             rb_secure(4);
rb_secure        2130 hash.c             rb_secure(4);
rb_secure        2162 hash.c             rb_secure(4);
rb_secure        2188 hash.c             rb_secure(4);
rb_secure        2227 hash.c             rb_secure(4);
rb_secure        2254 hash.c             rb_secure(4);
rb_secure         650 io.c               rb_secure(4);
rb_secure        2276 io.c               rb_secure(4);
rb_secure        3378 io.c               rb_secure(4);
rb_secure        3910 io.c               rb_secure(4);
rb_secure        4605 io.c               rb_secure(2);
rb_secure        4756 io.c               rb_secure(2);
rb_secure         590 object.c           rb_secure(4);
rb_secure         611 object.c           rb_secure(3);
rb_secure         133 process.c          rb_secure(2);
rb_secure         157 process.c        rb_secure(2);
rb_secure         713 process.c          rb_secure(2);
rb_secure         786 process.c          rb_secure(2);
rb_secure         890 process.c          rb_secure(2);
rb_secure        1415 process.c          rb_secure(2);
rb_secure        1461 process.c          rb_secure(4);
rb_secure        1682 process.c          rb_secure(2);
rb_secure        1710 process.c          rb_secure(2);
rb_secure        1742 process.c          rb_secure(2);
rb_secure        1766 process.c          rb_secure(2);
rb_secure        1795 process.c          rb_secure(2);
rb_secure        1803 process.c        rb_secure(2);
rb_secure        1849 process.c          rb_secure(2);
rb_secure        1881 process.c          rb_secure(2);
rb_secure        1930 process.c          rb_secure(2);
rb_secure        1985 process.c          rb_secure(2);
rb_secure        2007 process.c          rb_secure(2);
rb_secure        2017 process.c          rb_secure(2);
rb_secure        2501 process.c          rb_secure(2);
rb_secure        2762 process.c          rb_secure(2);
rb_secure         325 random.c           rb_secure(4);
rb_secure         259 ruby.h         void rb_secure(int);
rb_secure         231 signal.c           rb_secure(2);
rb_secure         759 signal.c           rb_secure(2);
rb_secure         523 variable.c         rb_secure(4);
rb_secure        1528 variable.c     	rb_secure(4);


rb_secure_update

rb_secure_update  252 ext/dl/cfunc.c     rb_secure_update(self);
rb_secure_update  263 ruby.h         void rb_secure_update(VALUE);


rb_set_class_path

rb_set_class_path  244 class.c            rb_set_class_path(klass, outer, name);
rb_set_class_path  312 class.c            rb_set_class_path(module, outer, name);
rb_set_class_path 3865 eval.c         		rb_set_class_path(klass, cbase, rb_id2name(cname));
rb_set_class_path 3902 eval.c         		rb_set_class_path(module, cbase, rb_id2name(cname));
rb_set_class_path  528 intern.h       void rb_set_class_path(VALUE, VALUE, const char*);


rb_set_end_proc

rb_set_end_proc  7518 eval.c             rb_set_end_proc(call_end_proc, rb_block_proc());
rb_set_end_proc  7552 eval.c             rb_set_end_proc(call_end_proc, proc);
rb_set_end_proc  2101 ext/curses/curses.c     rb_set_end_proc(curses_finalize, 0);
rb_set_end_proc   249 intern.h       void rb_set_end_proc(void (*)(VALUE), VALUE);


rb_set_kcode

rb_set_kcode      441 intern.h       void rb_set_kcode(const char*);
rb_set_kcode     4588 parse.y            rb_set_kcode(kcode_save);
rb_set_kcode     5437 parse.y            rb_set_kcode(val);
rb_set_kcode     5579 parse.y        	    rb_set_kcode("UTF-8");
rb_set_kcode     1818 re.c           	rb_set_kcode(StringValuePtr(kcode));
rb_set_kcode     2123 re.c               rb_set_kcode(StringValuePtr(val));
rb_set_kcode      643 ruby.c         		rb_set_kcode(s);


rb_set_safe_level

rb_set_safe_level 5393 ext/tk/tcltklib.c     rb_set_safe_level(q->safe_level);
rb_set_safe_level 5719 ext/tk/tcltklib.c     rb_set_safe_level(q->safe_level);
rb_set_safe_level 6794 ext/tk/tcltklib.c     rb_set_safe_level(q->safe_level);
rb_set_safe_level  658 ruby.c         		rb_set_safe_level(v);
rb_set_safe_level  757 ruby.c         	    rb_set_safe_level(v);
rb_set_safe_level 1114 ruby.c         	rb_set_safe_level(1);
rb_set_safe_level  262 ruby.h         void rb_set_safe_level(int);


rb_setegid_core

rb_setegid_core  3176 process.c          return rb_setegid_core(NUM2INT(id));
rb_setegid_core  3430 process.c          return rb_setegid_core(id);


rb_seteuid_core

rb_seteuid_core  3066 process.c          return rb_seteuid_core(NUM2INT(id));
rb_seteuid_core  3321 process.c          return rb_seteuid_core(id);


rb_singleton_class

rb_singleton_class  804 class.c            rb_define_method(rb_singleton_class(obj), name, func, argc);
rb_singleton_class 3762 eval.c         		rb_add_method(rb_singleton_class(ruby_class),
rb_singleton_class 3786 eval.c         	    klass = rb_singleton_class(recv);
rb_singleton_class 3925 eval.c         	    klass = rb_singleton_class(result);
rb_singleton_class 6439 eval.c         	klass = rb_singleton_class(self);
rb_singleton_class 6471 eval.c         	klass = rb_singleton_class(self);
rb_singleton_class 7218 eval.c         	rb_add_method(rb_singleton_class(module), id, body->nd_body, NOEX_PUBLIC);
rb_singleton_class 7282 eval.c             rb_include_module(rb_singleton_class(obj), module);
rb_singleton_class  138 intern.h       VALUE rb_singleton_class(VALUE);


rb_singleton_class_attached

rb_singleton_class_attached  134 class.c        	rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)clone);
rb_singleton_class_attached  163 class.c        	rb_singleton_class_attached(klass, obj);
rb_singleton_class_attached  117 intern.h       void rb_singleton_class_attached(VALUE,VALUE);
rb_singleton_class_attached  319 ruby.h             rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)clone);\


rb_singleton_class_clone

rb_singleton_class_clone   72 class.c        	RBASIC(clone)->klass = rb_singleton_class_clone(orig);
rb_singleton_class_clone  122 class.c        	    RBASIC(clone)->klass = rb_singleton_class_clone(klass);
rb_singleton_class_clone  116 intern.h       VALUE rb_singleton_class_clone(VALUE);
rb_singleton_class_clone  224 object.c           RBASIC(clone)->klass = rb_singleton_class_clone(obj);
rb_singleton_class_clone  318 ruby.h             OBJSETUP(clone,rb_singleton_class_clone((VALUE)obj),RBASIC(obj)->flags);\


rb_source_filename

rb_source_filename 1577 eval.c             ruby_sourcefile = rb_source_filename("(eval)");
rb_source_filename 6946 eval.c         		    ruby_sourcefile = rb_source_filename(RSTRING(path)->ptr);
rb_source_filename  300 intern.h       char *rb_source_filename(const char*);
rb_source_filename 4582 parse.y            ruby_sourcefile = rb_source_filename(f);
rb_source_filename  810 ruby.c         		script = ruby_sourcefile = rb_source_filename(script);
rb_source_filename  825 ruby.c             ruby_sourcefile = rb_source_filename(argv0);
rb_source_filename  931 ruby.c         		    ruby_sourcefile = rb_source_filename(fname);
rb_source_filename 1096 ruby.c         	ruby_sourcefile = rb_source_filename(name);
rb_source_filename 1149 ruby.c             ruby_sourcefile = rb_source_filename("ruby");


rb_spawn

rb_spawn          419 intern.h       int rb_spawn(int, VALUE*);
rb_spawn         1594 process.c          status = rb_spawn(argc, argv);
rb_spawn         1617 process.c          pid = rb_spawn(argc, argv);


rb_sprintf

rb_sprintf        858 error.c        	mesg = rb_sprintf("%s - %.*s", err,
rb_sprintf       5969 eval.c         	    str = rb_sprintf("%s:%d:in `%s'", ruby_sourcefile, ruby_sourceline,
rb_sprintf       5976 eval.c         	    str = rb_sprintf("%s:%d", ruby_sourcefile, ruby_sourceline);
rb_sprintf       5993 eval.c         	    str = rb_sprintf("%s:%d:in `%s'", n->nd_file, nd_line(n),
rb_sprintf       5997 eval.c         	    str = rb_sprintf("%s:%d", n->nd_file, nd_line(n));
rb_sprintf       8457 eval.c         	str = rb_sprintf("#<%s:%p@%s:%d>", cname, data->body,
rb_sprintf       8461 eval.c         	str = rb_sprintf("#<%s:%p>", cname, data->body);
rb_sprintf       12474 eval.c             str = rb_sprintf("#<%s:%p %s>", cname, thread, status);
rb_sprintf       1108 io.c               return rb_sprintf("#<%s:%s%s>", cname, fptr->path, st);
rb_sprintf        292 object.c           str = rb_sprintf("#<%s:%p>", cname, obj);
rb_sprintf        369 object.c       	str = rb_sprintf("-<%s:%p", c, obj);
rb_sprintf        278 process.c          str = rb_sprintf("#<%s: pid=%ld", rb_class2name(CLASS_OF(st)), NUM2LONG(pid));
rb_sprintf        439 struct.c       	return rb_sprintf("#<struct %s:...>", cname);
rb_sprintf        443 struct.c           str = rb_sprintf("#<struct %s ", cname);
rb_sprintf        199 variable.c     	path = rb_sprintf("#<%s:%p>", s, klass);


rb_stat

rb_stat           689 file.c             if (rb_stat(fname, &st) < 0) {
rb_stat           892 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
rb_stat           914 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
rb_stat           984 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
rb_stat          1012 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
rb_stat          1034 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
rb_stat          1054 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
rb_stat          1120 file.c             if (rb_stat(fname, &st) < 0) return Qnil;
rb_stat          1182 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
rb_stat          1241 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
rb_stat          1259 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
rb_stat          1277 file.c             if (rb_stat(fname, &st) < 0) return Qnil;
rb_stat          1296 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
rb_stat          1306 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
rb_stat          1326 file.c             if (rb_stat(fname, &st) < 0) return Qfalse;
rb_stat          1420 file.c             if (rb_stat(fname1, &st1) < 0) return Qfalse;
rb_stat          1421 file.c             if (rb_stat(fname2, &st2) < 0) return Qfalse;
rb_stat          1473 file.c             if (rb_stat(fname, &st) < 0)
rb_stat          1563 file.c             if (rb_stat(fname, &st) < 0)
rb_stat          1607 file.c             if (rb_stat(fname, &st) < 0)
rb_stat          1652 file.c             if (rb_stat(fname, &st) < 0)
rb_stat          3306 file.c         	if (rb_stat(argv[1], &st) == -1) {
rb_stat          3329 file.c         	if (rb_stat(argv[1], &st1) < 0) return Qfalse;
rb_stat          3330 file.c         	if (rb_stat(argv[2], &st2) < 0) return Qfalse;


rb_stat_atime

rb_stat_atime     582 file.c         	{"atime",   rb_stat_atime},
rb_stat_atime    4389 file.c             rb_define_method(rb_cStat, "atime", rb_stat_atime, 0);


rb_stat_blksize

rb_stat_blksize   580 file.c         	{"blksize", rb_stat_blksize},
rb_stat_blksize  4387 file.c             rb_define_method(rb_cStat, "blksize", rb_stat_blksize, 0);


rb_stat_blocks

rb_stat_blocks    581 file.c         	{"blocks",  rb_stat_blocks},
rb_stat_blocks   4388 file.c             rb_define_method(rb_cStat, "blocks", rb_stat_blocks, 0);


rb_stat_ctime

rb_stat_ctime     584 file.c         	{"ctime",   rb_stat_ctime},
rb_stat_ctime    4391 file.c             rb_define_method(rb_cStat, "ctime", rb_stat_ctime, 0);


rb_stat_dev

rb_stat_dev       572 file.c         	{"dev",	    rb_stat_dev},
rb_stat_dev      4375 file.c             rb_define_method(rb_cStat, "dev", rb_stat_dev, 0);


rb_stat_gid

rb_stat_gid       577 file.c         	{"gid",	    rb_stat_gid},
rb_stat_gid      4382 file.c             rb_define_method(rb_cStat, "gid", rb_stat_gid, 0);


rb_stat_grpowned

rb_stat_grpowned 3643 file.c             if (rb_stat_grpowned(obj))
rb_stat_grpowned 3731 file.c             if (rb_stat_grpowned(obj))
rb_stat_grpowned 3819 file.c             if (rb_stat_grpowned(obj))
rb_stat_grpowned 4410 file.c             rb_define_method(rb_cStat, "grpowned?",  rb_stat_grpowned, 0);


rb_stat_ino

rb_stat_ino       573 file.c         	{"ino",	    rb_stat_ino},
rb_stat_ino      4378 file.c             rb_define_method(rb_cStat, "ino", rb_stat_ino, 0);


rb_stat_mode

rb_stat_mode      574 file.c         	{"mode",    rb_stat_mode},
rb_stat_mode     4379 file.c             rb_define_method(rb_cStat, "mode", rb_stat_mode, 0);


rb_stat_mtime

rb_stat_mtime     583 file.c         	{"mtime",   rb_stat_mtime},
rb_stat_mtime    4390 file.c             rb_define_method(rb_cStat, "mtime", rb_stat_mtime, 0);


rb_stat_nlink

rb_stat_nlink     575 file.c         	{"nlink",   rb_stat_nlink},
rb_stat_nlink    4380 file.c             rb_define_method(rb_cStat, "nlink", rb_stat_nlink, 0);


rb_stat_owned

rb_stat_owned    3639 file.c             if (rb_stat_owned(obj))
rb_stat_owned    3727 file.c             if (rb_stat_owned(obj))
rb_stat_owned    3815 file.c             if (rb_stat_owned(obj))
rb_stat_owned    4409 file.c             rb_define_method(rb_cStat, "owned?",  rb_stat_owned, 0);


rb_stat_rdev

rb_stat_rdev      578 file.c         	{"rdev",    rb_stat_rdev},
rb_stat_rdev     4383 file.c             rb_define_method(rb_cStat, "rdev", rb_stat_rdev, 0);


rb_stat_rowned

rb_stat_rowned   3671 file.c             if (rb_stat_rowned(obj))
rb_stat_rowned   3757 file.c             if (rb_stat_rowned(obj))
rb_stat_rowned   3843 file.c             if (rb_stat_rowned(obj))


rb_stat_size

rb_stat_size      579 file.c         	{"size",    rb_stat_size},
rb_stat_size     4386 file.c             rb_define_method(rb_cStat, "size", rb_stat_size, 0);


rb_stat_uid

rb_stat_uid       576 file.c         	{"uid",	    rb_stat_uid},
rb_stat_uid      4381 file.c             rb_define_method(rb_cStat, "uid", rb_stat_uid, 0);


rb_str2cstr

rb_str2cstr       302 ruby.h         char *rb_str2cstr(VALUE,long*);
rb_str2cstr       304 ruby.h         #define STR2CSTR(x) rb_str2cstr((VALUE)(x),0)


rb_str_append

rb_str_append    1565 eval.c         	rb_str_append(str, rb_obj_as_string(ruby_errinfo));
rb_str_append    3682 eval.c         		    rb_str_append(str, str2);
rb_str_append     661 ext/iconv/iconv.c     arg.append = rb_str_append;
rb_str_append     673 ext/openssl/ossl_asn1.c     rb_str_append(str, i);
rb_str_append     426 ext/openssl/ossl_config.c     rb_str_append(str, rb_inspect(ary));
rb_str_append     334 ext/openssl/ossl_engine.c     rb_str_append(str, ossl_engine_get_id(self));
rb_str_append     336 ext/openssl/ossl_engine.c     rb_str_append(str, ossl_engine_get_name(self));
rb_str_append     466 ext/openssl/ossl_ssl.c             rb_str_append(str, elem);
rb_str_append     607 ext/openssl/ossl_x509cert.c     rb_str_append(str, rb_inspect(ossl_x509_get_subject(self)));
rb_str_append     611 ext/openssl/ossl_x509cert.c     rb_str_append(str, rb_inspect(ossl_x509_get_issuer(self)));
rb_str_append     615 ext/openssl/ossl_x509cert.c     rb_str_append(str, rb_inspect(ossl_x509_get_serial(self)));
rb_str_append     619 ext/openssl/ossl_x509cert.c     rb_str_append(str, rb_inspect(ossl_x509_get_not_before(self)));
rb_str_append     623 ext/openssl/ossl_x509cert.c     rb_str_append(str, rb_inspect(ossl_x509_get_not_after(self)));
rb_str_append     236 ext/openssl/ossl_x509ext.c     rb_str_append(valstr, value);
rb_str_append     364 ext/strscan/strscan.c     rb_str_append(p->str, str);
rb_str_append    1109 ext/syck/rubyext.c                     rb_str_append( partial, colon );
rb_str_append    2231 ext/tk/tcltklib.c             rb_str_append(str, rb_obj_as_string(ruby_errinfo));
rb_str_append     115 ext/tk/tkutil/tkutil.c     id_num = rb_str_append(rb_str_new2(cmd_id_prefix), id_num);
rb_str_append     117 ext/tk/tkutil/tkutil.c     return rb_str_append(rb_str_new2(cmd_id_head), id_num);
rb_str_append     487 ext/tk/tkutil/tkutil.c     return rb_str_append(rb_str_new2("-"), rb_funcall(key, ID_to_s, 0, 0));
rb_str_append    3836 ext/win32ole/win32ole.c         rb_str_append(version_str, minor_str);
rb_str_append     613 file.c         	    rb_str_append(str, rb_inspect(v));
rb_str_append     500 intern.h       VALUE rb_str_append(VALUE, VALUE);
rb_str_append    5137 io.c               else if (!NIL_P(tmp)) rb_str_append(str, tmp);
rb_str_append     324 object.c           rb_str_append(str, str2);
rb_str_append    1145 object.c       	    rb_str_append(s, rb_inspect(v));
rb_str_append    1148 object.c       	    rb_str_append(s, rb_any_to_s(v));
rb_str_append     565 range.c            rb_str_append(str, str2);
rb_str_append     590 range.c            rb_str_append(str, str2);
rb_str_append     763 string.c           str1 = rb_str_append(str1, str2);
rb_str_append     459 struct.c       	    rb_str_append(str, rb_inspect(slot));
rb_str_append     462 struct.c       	rb_str_append(str, rb_inspect(RSTRUCT(s)->ptr[i]));
rb_str_append      55 variable.c     	    rb_str_append(tmp, path);
rb_str_append      61 variable.c     	rb_str_append(tmp, path);


rb_str_aref_m

rb_str_aref_m    1769 string.c           result = rb_str_aref_m(argc, buf, str);
rb_str_aref_m    4200 string.c           rb_define_method(rb_cString, "[]", rb_str_aref_m, -1);
rb_str_aref_m    4287 string.c           rb_define_method(rb_cString, "slice", rb_str_aref_m, -1);


rb_str_aset_m

rb_str_aset_m    1771 string.c       	rb_str_aset_m(argc+1, buf, str);
rb_str_aset_m    4201 string.c           rb_define_method(rb_cString, "[]=", rb_str_aset_m, -1);


rb_str_associate

rb_str_associate  509 intern.h       void rb_str_associate(VALUE, VALUE);
rb_str_associate  997 pack.c         	rb_str_associate(res, associates);


rb_str_associated

rb_str_associated  510 intern.h       VALUE rb_str_associated(VALUE);
rb_str_associated 1870 pack.c         		    if (!(a = rb_str_associated(str))) {
rb_str_associated 1912 pack.c         			if (!(a = rb_str_associated(str))) {


rb_str_buf_append

rb_str_buf_append 1294 array.c        	    rb_str_buf_append(result, sep);
rb_str_buf_append 1295 array.c        	rb_str_buf_append(result, tmp);
rb_str_buf_append 1356 array.c        	rb_str_buf_append(str, s);
rb_str_buf_append  387 error.c            rb_str_buf_append(str, klass);
rb_str_buf_append  389 error.c            rb_str_buf_append(str, exc);
rb_str_buf_append 9151 eval.c         	    rb_str_buf_append(str, rb_inspect(data->klass));
rb_str_buf_append 9154 eval.c         	    rb_str_buf_append(str, rb_inspect(v));
rb_str_buf_append 9158 eval.c         	    rb_str_buf_append(str, rb_inspect(data->recv));
rb_str_buf_append 9160 eval.c         	    rb_str_buf_append(str, rb_inspect(v));
rb_str_buf_append  820 ext/iconv/iconv.c 		rb_str_buf_append(str, s);
rb_str_buf_append  826 ext/iconv/iconv.c 	    rb_str_buf_append(str, s);
rb_str_buf_append 1003 ext/iconv/iconv.c     str = rb_str_buf_append(str, rb_inspect(success));
rb_str_buf_append 1005 ext/iconv/iconv.c     str = rb_str_buf_append(str, rb_inspect(failed));
rb_str_buf_append 2907 file.c         		rb_str_buf_append(result, sep);
rb_str_buf_append 2910 file.c         	rb_str_buf_append(result, tmp);
rb_str_buf_append 1120 hash.c             rb_str_buf_append(str, str2);
rb_str_buf_append 1124 hash.c             rb_str_buf_append(str, str2);
rb_str_buf_append 2021 hash.c         	    rb_str_buf_append(str, i);
rb_str_buf_append  483 intern.h       VALUE rb_str_buf_append(VALUE, VALUE);
rb_str_buf_append 1939 re.c                       rb_str_buf_append(source, v);
rb_str_buf_append  729 string.c       	    return rb_str_buf_append(str, str2);


rb_str_buf_cat

rb_str_buf_cat    388 error.c            rb_str_buf_cat(str, ": ", 2);
rb_str_buf_cat    390 error.c            rb_str_buf_cat(str, ">", 1);
rb_str_buf_cat   1563 eval.c             rb_str_buf_cat(str, "\n", 1);
rb_str_buf_cat    407 ext/iconv/iconv.c 			ret = rb_str_buf_cat(ret, instart, tmpstart - instart);
rb_str_buf_cat    413 ext/iconv/iconv.c 		    ret = rb_str_buf_cat(ret, buffer, outlen);
rb_str_buf_cat   1002 ext/iconv/iconv.c     str = rb_str_buf_cat(str, ": ", 2);
rb_str_buf_cat   1004 ext/iconv/iconv.c     str = rb_str_buf_cat(str, ", ", 2);
rb_str_buf_cat   1006 ext/iconv/iconv.c     return rb_str_buf_cat(str, ">", 1);
rb_str_buf_cat    493 ext/zlib/zlib.c 	rb_str_buf_cat(z->buf, src, len);
rb_str_buf_cat    596 ext/zlib/zlib.c 	rb_str_buf_cat(z->input, src, len);
rb_str_buf_cat    600 ext/zlib/zlib.c 	rb_str_buf_cat(z->input, src, len);
rb_str_buf_cat   2018 hash.c         	    rb_str_buf_cat(str, *env, s-*env);
rb_str_buf_cat    484 intern.h       VALUE rb_str_buf_cat(VALUE, const char*, long);
rb_str_buf_cat   1466 io.c           		rb_str_buf_cat(str, &ch, 1);
rb_str_buf_cat    122 marshal.c          rb_str_buf_cat(buf, s, n);
rb_str_buf_cat    527 pack.c         		    rb_str_buf_cat(res, ptr, len);
rb_str_buf_cat    529 pack.c         			rb_str_buf_cat(res, nul10, 1);
rb_str_buf_cat    532 pack.c         		    rb_str_buf_cat(res, ptr, plen);
rb_str_buf_cat    535 pack.c         			rb_str_buf_cat(res, (type == 'A')?spc10:nul10, 10);
rb_str_buf_cat    538 pack.c         		    rb_str_buf_cat(res, (type == 'A')?spc10:nul10, len);
rb_str_buf_cat    558 pack.c         			    rb_str_buf_cat(res, &c, 1);
rb_str_buf_cat    566 pack.c         			rb_str_buf_cat(res, &c, 1);
rb_str_buf_cat    588 pack.c         			    rb_str_buf_cat(res, &c, 1);
rb_str_buf_cat    596 pack.c         			rb_str_buf_cat(res, &c, 1);
rb_str_buf_cat    621 pack.c         			    rb_str_buf_cat(res, &c, 1);
rb_str_buf_cat    627 pack.c         			rb_str_buf_cat(res, &c, 1);
rb_str_buf_cat    652 pack.c         			    rb_str_buf_cat(res, &c, 1);
rb_str_buf_cat    658 pack.c         			rb_str_buf_cat(res, &c, 1);
rb_str_buf_cat    674 pack.c         		rb_str_buf_cat(res, &c, sizeof(char));
rb_str_buf_cat    685 pack.c         		rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2));
rb_str_buf_cat    696 pack.c         		rb_str_buf_cat(res, OFF32(&i), NATINT_LEN(int,4));
rb_str_buf_cat    707 pack.c         		rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4));
rb_str_buf_cat    718 pack.c         		rb_str_buf_cat(res, (char*)&tmp, QUAD_SIZE);
rb_str_buf_cat    729 pack.c         		rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2));
rb_str_buf_cat    740 pack.c         		rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4));
rb_str_buf_cat    751 pack.c         		rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2));
rb_str_buf_cat    762 pack.c         		rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4));
rb_str_buf_cat    773 pack.c         		rb_str_buf_cat(res, (char*)&f, sizeof(float));
rb_str_buf_cat    785 pack.c         		rb_str_buf_cat(res, (char*)&f, sizeof(float));
rb_str_buf_cat    797 pack.c         		rb_str_buf_cat(res, (char*)&d, sizeof(double));
rb_str_buf_cat    808 pack.c         		rb_str_buf_cat(res, (char*)&d, sizeof(double));
rb_str_buf_cat    820 pack.c         		rb_str_buf_cat(res, (char*)&f, sizeof(float));
rb_str_buf_cat    832 pack.c         		rb_str_buf_cat(res, (char*)&d, sizeof(double));
rb_str_buf_cat    839 pack.c         		rb_str_buf_cat(res, nul10, 10);
rb_str_buf_cat    842 pack.c         	    rb_str_buf_cat(res, nul10, len);
rb_str_buf_cat    878 pack.c         		rb_str_buf_cat(res, (char*)buf, le);
rb_str_buf_cat    938 pack.c         		rb_str_buf_cat(res, (char*)&t, sizeof(char*));
rb_str_buf_cat    954 pack.c         			rb_str_buf_cat(buf, &c, sizeof(char));
rb_str_buf_cat    969 pack.c         		    rb_str_buf_cat(buf, &c, sizeof(char));
rb_str_buf_cat    982 pack.c         		    rb_str_buf_cat(res, RSTRING(buf)->ptr, RSTRING(buf)->len);
rb_str_buf_cat    986 pack.c         		    rb_str_buf_cat(res, &c, sizeof(char));
rb_str_buf_cat   1043 pack.c             rb_str_buf_cat(str, buff, i);
rb_str_buf_cat   1087 pack.c         	    rb_str_buf_cat(str, buff, i);
rb_str_buf_cat   1097 pack.c         	rb_str_buf_cat(str, buff, i);
rb_str_buf_cat   4721 parse.y        		    rb_str_buf_cat(parser->delayed,
rb_str_buf_cat   4727 parse.y        		    rb_str_buf_cat(parser->delayed,
rb_str_buf_cat    277 re.c           	rb_str_buf_cat(str, s, len);
rb_str_buf_cat    284 re.c           		rb_str_buf_cat(str, p, n);
rb_str_buf_cat    290 re.c           		rb_str_buf_cat(str, &c, 1);
rb_str_buf_cat    291 re.c           		rb_str_buf_cat(str, p, 1);
rb_str_buf_cat    294 re.c           	    	rb_str_buf_cat(str, p, mbclen(*p));
rb_str_buf_cat    299 re.c           		rb_str_buf_cat(str, p, 1);
rb_str_buf_cat    305 re.c           		rb_str_buf_cat(str, b, 4);
rb_str_buf_cat    308 re.c           		rb_str_buf_cat(str, p, 1);
rb_str_buf_cat   2004 re.c           	    rb_str_buf_cat(val, p, ss-p);
rb_str_buf_cat   2007 re.c           	    rb_str_buf_cat(val, p, ss-p);
rb_str_buf_cat   2022 re.c           	    rb_str_buf_cat(val, RSTRING(src)->ptr, BEG(0));
rb_str_buf_cat   2026 re.c           	    rb_str_buf_cat(val, RSTRING(src)->ptr+END(0), RSTRING(src)->len-END(0));
rb_str_buf_cat   2036 re.c           	    rb_str_buf_cat(val, s-1, 1);
rb_str_buf_cat   2040 re.c           	    rb_str_buf_cat(val, s-2, 2);
rb_str_buf_cat   2047 re.c           	    rb_str_buf_cat(val, RSTRING(src)->ptr+BEG(no), END(no)-BEG(no));
rb_str_buf_cat   2054 re.c           	    rb_str_buf_cat(val, p, e-p);
rb_str_buf_cat   2057 re.c           	    rb_str_buf_cat(val, p, e-p);
rb_str_buf_cat    222 string.c           rb_str_buf_cat(str, ptr, len);
rb_str_buf_cat    658 string.c           return rb_str_buf_cat(str, ptr, strlen(ptr));
rb_str_buf_cat    676 string.c           return rb_str_buf_cat(str, ptr, len);
rb_str_buf_cat   2351 string.c       	    rb_str_buf_cat(result, p - 1, len);
rb_str_buf_cat   2356 string.c       	    rb_str_buf_cat(result, s, 2);
rb_str_buf_cat   2360 string.c       	    rb_str_buf_cat(result, s, 1);
rb_str_buf_cat   2364 string.c       	    rb_str_buf_cat(result, s, 2);
rb_str_buf_cat   2368 string.c       	    rb_str_buf_cat(result, s, 2);
rb_str_buf_cat   2372 string.c       	    rb_str_buf_cat(result, s, 2);
rb_str_buf_cat   2376 string.c       	    rb_str_buf_cat(result, s, 2);
rb_str_buf_cat   2380 string.c       	    rb_str_buf_cat(result, s, 2);
rb_str_buf_cat   2384 string.c       	    rb_str_buf_cat(result, s, 2);
rb_str_buf_cat   2388 string.c       	    rb_str_buf_cat(result, s, 2);


rb_str_buf_cat2

rb_str_buf_cat2  1355 array.c        	if (i > 0) rb_str_buf_cat2(str, ", ");
rb_str_buf_cat2  1358 array.c            rb_str_buf_cat2(str, "]");
rb_str_buf_cat2  1560 eval.c         	rb_str_buf_cat2(str, " in ");
rb_str_buf_cat2  1561 eval.c         	rb_str_buf_cat2(str, at);
rb_str_buf_cat2  9144 eval.c             rb_str_buf_cat2(str, s);
rb_str_buf_cat2  9145 eval.c             rb_str_buf_cat2(str, ": ");
rb_str_buf_cat2  9159 eval.c         	    rb_str_buf_cat2(str, "(");
rb_str_buf_cat2  9161 eval.c         	    rb_str_buf_cat2(str, ")");
rb_str_buf_cat2  9166 eval.c         	rb_str_buf_cat2(str, rb_class2name(data->rklass));
rb_str_buf_cat2  9168 eval.c         	    rb_str_buf_cat2(str, "(");
rb_str_buf_cat2  9169 eval.c         	    rb_str_buf_cat2(str, rb_class2name(data->klass));
rb_str_buf_cat2  9170 eval.c         	    rb_str_buf_cat2(str, ")");
rb_str_buf_cat2  9173 eval.c             rb_str_buf_cat2(str, sharp);
rb_str_buf_cat2  9174 eval.c             rb_str_buf_cat2(str, rb_id2name(data->oid));
rb_str_buf_cat2  9175 eval.c             rb_str_buf_cat2(str, ">");
rb_str_buf_cat2  1001 ext/iconv/iconv.c     VALUE str = rb_str_buf_cat2(rb_str_new2("#<"), cname);
rb_str_buf_cat2   588 file.c             rb_str_buf_cat2(str, rb_obj_classname(self));
rb_str_buf_cat2   589 file.c             rb_str_buf_cat2(str, " ");
rb_str_buf_cat2   595 file.c         	    rb_str_buf_cat2(str, ", ");
rb_str_buf_cat2   597 file.c         	rb_str_buf_cat2(str, member[i].name);
rb_str_buf_cat2   598 file.c         	rb_str_buf_cat2(str, "=");
rb_str_buf_cat2   604 file.c         	    rb_str_buf_cat2(str, buf);
rb_str_buf_cat2   610 file.c         	    rb_str_buf_cat2(str, buf);
rb_str_buf_cat2   616 file.c             rb_str_buf_cat2(str, ">");
rb_str_buf_cat2  1122 hash.c             rb_str_buf_cat2(str, "=>");
rb_str_buf_cat2  1138 hash.c             rb_str_buf_cat2(str, "}");
rb_str_buf_cat2  2014 hash.c         	    rb_str_buf_cat2(str, ", ");
rb_str_buf_cat2  2017 hash.c         	    rb_str_buf_cat2(str, "\"");
rb_str_buf_cat2  2019 hash.c         	    rb_str_buf_cat2(str, "\"=>");
rb_str_buf_cat2  2026 hash.c             rb_str_buf_cat2(str, "}");
rb_str_buf_cat2   485 intern.h       VALUE rb_str_buf_cat2(VALUE, const char*);
rb_str_buf_cat2   321 re.c               rb_str_buf_cat2(str, "/");
rb_str_buf_cat2   325 re.c           	    rb_str_buf_cat2(str, "m");
rb_str_buf_cat2   327 re.c           	    rb_str_buf_cat2(str, "i");
rb_str_buf_cat2   329 re.c           	    rb_str_buf_cat2(str, "x");
rb_str_buf_cat2   334 re.c           		rb_str_buf_cat2(str, "n");
rb_str_buf_cat2   337 re.c           		rb_str_buf_cat2(str, "e");
rb_str_buf_cat2   340 re.c           		rb_str_buf_cat2(str, "s");
rb_str_buf_cat2   343 re.c           		rb_str_buf_cat2(str, "u");
rb_str_buf_cat2   490 re.c               if (options & ONIG_OPTION_MULTILINE) rb_str_buf_cat2(str, "m");
rb_str_buf_cat2   491 re.c               if (options & ONIG_OPTION_IGNORECASE) rb_str_buf_cat2(str, "i");
rb_str_buf_cat2   492 re.c               if (options & ONIG_OPTION_EXTEND) rb_str_buf_cat2(str, "x");
rb_str_buf_cat2   495 re.c           	rb_str_buf_cat2(str, "-");
rb_str_buf_cat2   496 re.c           	if (!(options & ONIG_OPTION_MULTILINE)) rb_str_buf_cat2(str, "m");
rb_str_buf_cat2   497 re.c           	if (!(options & ONIG_OPTION_IGNORECASE)) rb_str_buf_cat2(str, "i");
rb_str_buf_cat2   498 re.c           	if (!(options & ONIG_OPTION_EXTEND)) rb_str_buf_cat2(str, "x");
rb_str_buf_cat2   501 re.c               rb_str_buf_cat2(str, ":");
rb_str_buf_cat2   503 re.c               rb_str_buf_cat2(str, ")");
rb_str_buf_cat2  1917 re.c                           rb_str_buf_cat2(source, "|");
rb_str_buf_cat2  2392 string.c       	    rb_str_buf_cat2(result, s);
rb_str_buf_cat2  2395 string.c           rb_str_buf_cat2(result, "\"");


rb_str_buf_new

rb_str_buf_new   1275 array.c            result = rb_str_buf_new(len);
rb_str_buf_new    492 ext/zlib/zlib.c 	z->buf = rb_str_buf_new(len);
rb_str_buf_new    595 ext/zlib/zlib.c 	z->input = rb_str_buf_new(len);
rb_str_buf_new   2881 file.c             result = rb_str_buf_new(len);
rb_str_buf_new    481 intern.h       VALUE rb_str_buf_new(long);
rb_str_buf_new   1453 io.c           		*strp = str = rb_str_buf_new(len);
rb_str_buf_new   1469 io.c           		*strp = str = rb_str_buf_new(1);
rb_str_buf_new    706 marshal.c      	arg.str = rb_str_buf_new(0);
rb_str_buf_new    713 marshal.c      	port = rb_str_buf_new(0);
rb_str_buf_new    455 pack.c             res = rb_str_buf_new(0);
rb_str_buf_new   4720 parse.y        		    parser->delayed = rb_str_buf_new(1024);
rb_str_buf_new   1912 re.c                   VALUE source = rb_str_buf_new(0);
rb_str_buf_new   2003 re.c           	    val = rb_str_buf_new(ss-p);
rb_str_buf_new   2053 re.c           	    val = rb_str_buf_new(e-p);
rb_str_buf_new    268 sprintf.c          result = rb_str_buf_new(bsiz);
rb_str_buf_new    879 sprintf.c          result = rb_str_buf_new(f._w);
rb_str_buf_new    221 string.c           str = rb_str_buf_new(len);


rb_str_buf_new2

rb_str_buf_new2  1351 array.c            str = rb_str_buf_new2("[");
rb_str_buf_new2   385 error.c            str = rb_str_buf_new2("#<");
rb_str_buf_new2  1558 eval.c             str = rb_str_buf_new2("compile error");
rb_str_buf_new2  9142 eval.c             str = rb_str_buf_new2("#<");
rb_str_buf_new2   587 file.c             str = rb_str_buf_new2("#<");
rb_str_buf_new2  1136 hash.c             str = rb_str_buf_new2("{");
rb_str_buf_new2  2008 hash.c             str = rb_str_buf_new2("{");
rb_str_buf_new2   482 intern.h       VALUE rb_str_buf_new2(const char*);
rb_str_buf_new2   318 re.c               VALUE str = rb_str_buf_new2("/");
rb_str_buf_new2   419 re.c               VALUE str = rb_str_buf_new2("(?");
rb_str_buf_new2  2343 string.c           VALUE result = rb_str_buf_new2("\"");


rb_str_capitalize_bang

rb_str_capitalize_bang 2665 string.c           rb_str_capitalize_bang(str);
rb_str_capitalize_bang 4232 string.c           rb_define_method(rb_cString, "capitalize!", rb_str_capitalize_bang, 0);


rb_str_cat

rb_str_cat         60 ext/Win32API/Win32API.c 	str = rb_str_cat(str, "A", 1);
rb_str_cat        433 ext/iconv/iconv.c 		rb_str_cat(ret, instart, inptr - instart);
rb_str_cat        456 ext/iconv/iconv.c 	rb_str_cat(ret, instart, inptr - instart);
rb_str_cat       1003 ext/stringio/stringio.c 	rb_str_cat(ptr->string, RSTRING(str)->ptr, len);
rb_str_cat       1889 ext/syck/rubyext.c         rb_str_cat( dest, str, len );
rb_str_cat        558 ext/win32ole/win32ole.c         rb_str_cat(error_msg, pSource, strlen(pSource));
rb_str_cat        561 ext/win32ole/win32ole.c         rb_str_cat(error_msg, "<Unknown>", 9);
rb_str_cat       3380 ext/win32ole/win32ole.c            rb_str_cat(type, ",", 1);
rb_str_cat       2765 file.c         	rb_str_cat(dirname, skiproot(name + 2), p - skiproot(name + 2));
rb_str_cat       2772 file.c         	rb_str_cat(dirname, ".", 1);
rb_str_cat        498 intern.h       VALUE rb_str_cat(VALUE, const char*, long);
rb_str_cat       1484 io.c           	    rb_str_cat(str, &ch, 1);
rb_str_cat       5359 parse.y        		rb_str_cat(str, p, pend - p);
rb_str_cat       5362 parse.y        	    if (pend < lex_pend) rb_str_cat(str, "\n", 1);
rb_str_cat        564 range.c            rb_str_cat(str, "...", EXCL(range)?3:2);
rb_str_cat        589 range.c            rb_str_cat(str, "...", EXCL(range)?3:2);
rb_str_cat        425 ruby.c         			rb_str_cat(name_error[0], s, p - s);
rb_str_cat        682 string.c           return rb_str_cat(str, ptr, strlen(ptr));
rb_str_cat        760 string.c       	    return rb_str_cat(str1, &c, 1);
rb_str_cat       1874 time.c         	    rb_str_cat(str, buf, len);
rb_str_cat       1881 time.c         	    if (p > fmt) rb_str_cat(str, fmt, p - fmt);
rb_str_cat        164 util.c             rb_str_cat(str, suffix, extlen);


rb_str_cat2

rb_str_cat2       710 error.c        	    rb_str_cat2(d, ":");
rb_str_cat2       711 error.c        	    rb_str_cat2(d, rb_obj_classname(obj));
rb_str_cat2      1482 error.c        	    rb_str_cat2(str, "\n");
rb_str_cat2      1483 error.c        	    rb_str_cat2(str, s);
rb_str_cat2      6848 eval.c         	    rb_str_cat2(tmp, DLEXT);
rb_str_cat2       292 ext/iconv/iconv.c 	rb_str_cat2(args[0], "...");
rb_str_cat2       325 ext/openssl/ossl_config.c     rb_str_cat2(str, "[ ");
rb_str_cat2       326 ext/openssl/ossl_config.c     rb_str_cat2(str, cv->section);
rb_str_cat2       327 ext/openssl/ossl_config.c     rb_str_cat2(str, " ]\n");
rb_str_cat2       330 ext/openssl/ossl_config.c 	rb_str_cat2(str, v->name ? v->name : "None");
rb_str_cat2       331 ext/openssl/ossl_config.c 	rb_str_cat2(str, "=");
rb_str_cat2       332 ext/openssl/ossl_config.c 	rb_str_cat2(str, v->value ? v->value : "None");
rb_str_cat2       333 ext/openssl/ossl_config.c 	rb_str_cat2(str, "\n");
rb_str_cat2       335 ext/openssl/ossl_config.c     rb_str_cat2(str, "\n");
rb_str_cat2       424 ext/openssl/ossl_config.c     rb_str_cat2(str, cname);
rb_str_cat2       425 ext/openssl/ossl_config.c     rb_str_cat2(str, " sections=");
rb_str_cat2       427 ext/openssl/ossl_config.c     rb_str_cat2(str, ">");
rb_str_cat2       332 ext/openssl/ossl_engine.c     rb_str_cat2(str, cname);
rb_str_cat2       333 ext/openssl/ossl_engine.c     rb_str_cat2(str, " id=\"");
rb_str_cat2       335 ext/openssl/ossl_engine.c     rb_str_cat2(str, "\" name=\"");
rb_str_cat2       337 ext/openssl/ossl_engine.c     rb_str_cat2(str, "\">");
rb_str_cat2       467 ext/openssl/ossl_ssl.c             if (i < RARRAY(v)->len-1) rb_str_cat2(str, ":");
rb_str_cat2       829 ext/openssl/ossl_ssl.c         rb_str_cat2(ret, ": ");
rb_str_cat2       830 ext/openssl/ossl_ssl.c         rb_str_cat2(ret, SSL_state_string_long(ssl));
rb_str_cat2       603 ext/openssl/ossl_x509cert.c     rb_str_cat2(str, cname);
rb_str_cat2       604 ext/openssl/ossl_x509cert.c     rb_str_cat2(str, " ");
rb_str_cat2       606 ext/openssl/ossl_x509cert.c     rb_str_cat2(str, "subject=");
rb_str_cat2       608 ext/openssl/ossl_x509cert.c     rb_str_cat2(str, ", ");
rb_str_cat2       610 ext/openssl/ossl_x509cert.c     rb_str_cat2(str, "issuer=");
rb_str_cat2       612 ext/openssl/ossl_x509cert.c     rb_str_cat2(str, ", ");
rb_str_cat2       614 ext/openssl/ossl_x509cert.c     rb_str_cat2(str, "serial=");
rb_str_cat2       616 ext/openssl/ossl_x509cert.c     rb_str_cat2(str, ", ");
rb_str_cat2       618 ext/openssl/ossl_x509cert.c     rb_str_cat2(str, "not_before=");
rb_str_cat2       620 ext/openssl/ossl_x509cert.c     rb_str_cat2(str, ", ");
rb_str_cat2       622 ext/openssl/ossl_x509cert.c     rb_str_cat2(str, "not_after=");
rb_str_cat2       625 ext/openssl/ossl_x509cert.c     str = rb_str_cat2(str, ">");
rb_str_cat2      1260 ext/tk/tkutil/tkutil.c         id = rb_intern(RSTRING(rb_str_cat2(rb_str_new2("@"), str))->ptr);
rb_str_cat2      1384 ext/tk/tkutil/tkutil.c                   rb_str_cat2(rb_str_new2("@"),
rb_str_cat2       526 ext/win32ole/win32ole.c             rb_str_cat2(msg, p_msg);
rb_str_cat2       563 ext/win32ole/win32ole.c     rb_str_cat2(error_msg, "\n      ");
rb_str_cat2       565 ext/win32ole/win32ole.c         rb_str_cat2(error_msg, pDescription);
rb_str_cat2       568 ext/win32ole/win32ole.c         rb_str_cat2(error_msg, "<No Description>");
rb_str_cat2      1539 ext/win32ole/win32ole.c     rb_str_cat2(subkey, "\\CLSID");
rb_str_cat2      3835 ext/win32ole/win32ole.c         rb_str_cat2(version_str, ".");
rb_str_cat2      4110 ext/win32ole/win32ole.c     rb_str_cat2(key, "\\");
rb_str_cat2      4012 file.c         	rb_str_cat2(newpath, "/");
rb_str_cat2      4013 file.c         	rb_str_cat2(newpath, p0);
rb_str_cat2      4113 file.c         	    rb_str_cat2(fname, ext[i]);
rb_str_cat2      4134 file.c         	    rb_str_cat2(fname, ext[j]);
rb_str_cat2      1117 hash.c         	rb_str_cat2(str, ", ");
rb_str_cat2       499 intern.h       VALUE rb_str_cat2(VALUE, const char*);
rb_str_cat2      4133 io.c           			rb_str_cat2(str, ruby_inplace_mode);
rb_str_cat2       315 object.c       	rb_str_cat2(str, " ");
rb_str_cat2       318 object.c       	rb_str_cat2(str, ", ");
rb_str_cat2       321 object.c           rb_str_cat2(str, ivname);
rb_str_cat2       322 object.c           rb_str_cat2(str, "=");
rb_str_cat2       334 object.c       	rb_str_cat2(str, " ...");
rb_str_cat2       339 object.c           rb_str_cat2(str, ">");
rb_str_cat2      1142 object.c       	rb_str_cat2(s, "Class:");
rb_str_cat2      1151 object.c       	rb_str_cat2(s, ">");
rb_str_cat2       288 process.c      	rb_str_cat2(str, buf);
rb_str_cat2       299 process.c      	rb_str_cat2(str, buf);
rb_str_cat2       303 process.c      	rb_str_cat2(str, buf);
rb_str_cat2       307 process.c      	rb_str_cat2(str, ",coredumped");
rb_str_cat2       310 process.c          rb_str_cat2(str, ">");
rb_str_cat2       422 ruby.c         			rb_str_cat2(name_error[0], s);
rb_str_cat2       591 ruby.c         	    rb_str_cat2(e_script, s);
rb_str_cat2       592 ruby.c         	    rb_str_cat2(e_script, "\n");
rb_str_cat2       450 struct.c       	    rb_str_cat2(str, ", ");
rb_str_cat2       456 struct.c       	    rb_str_cat2(str, p);
rb_str_cat2       461 struct.c       	rb_str_cat2(str, "=");
rb_str_cat2       464 struct.c           rb_str_cat2(str, ">");
rb_str_cat2        54 variable.c     	    rb_str_cat2(tmp, "::");
rb_str_cat2        60 variable.c     	rb_str_cat2(tmp, "::");
rb_str_cat2       216 variable.c     	rb_str_cat2(str, "::");
rb_str_cat2       217 variable.c     	rb_str_cat2(str, name);


rb_str_chomp_bang

rb_str_chomp_bang 3619 string.c           rb_str_chomp_bang(argc, argv, str);
rb_str_chomp_bang 4265 string.c           rb_define_method(rb_cString, "chomp!", rb_str_chomp_bang, -1);


rb_str_chop_bang

rb_str_chop_bang 3513 string.c           rb_str_chop_bang(str);
rb_str_chop_bang 4264 string.c           rb_define_method(rb_cString, "chop!", rb_str_chop_bang, 0);


rb_str_cmp

rb_str_cmp       1501 array.c        	if (TYPE(b) == T_STRING) return rb_str_cmp(a, b);
rb_str_cmp        240 ext/digest/digest.c 	&& rb_str_cmp(str1, str2) == 0)
rb_str_cmp        234 ext/openssl/ossl_digest.c 	&& rb_str_cmp(str1, str2) == 0) {
rb_str_cmp       1173 ext/syck/rubyext.c                 if ( rb_str_cmp( scheme, str_xprivate ) == 0 )
rb_str_cmp        290 ext/tk/tkutil/tkutil.c                 if (!rb_str_cmp(str_enc, dst_enc)) {
rb_str_cmp        337 ext/tk/tkutil/tkutil.c                     if (!rb_str_cmp(str_enc, dst_enc)) {
rb_str_cmp        357 ext/tk/tkutil/tkutil.c                     if (!rb_str_cmp(str_enc, dst_enc)) {
rb_str_cmp        452 ext/tk/tkutil/tkutil.c                 if (!rb_str_cmp(str_enc, dst_enc)) {
rb_str_cmp       1421 ext/win32ole/win32ole.c             if (rb_str_cmp(typelib, ole) == 0) {
rb_str_cmp       3066 ext/win32ole/win32ole.c         if (SUCCEEDED(hr) && rb_str_cmp(WC2VSTR(bstr), type) == 0) {
rb_str_cmp       3743 ext/win32ole/win32ole.c         if (rb_str_cmp(oleclass, typelib) == 0) {
rb_str_cmp       3946 ext/win32ole/win32ole.c             if (rb_str_cmp(typelib, tlib) == 0) {
rb_str_cmp       5510 ext/win32ole/win32ole.c             if (rb_str_cmp(method_name, name) == 0) {
rb_str_cmp       6260 ext/win32ole/win32ole.c                  rb_str_cmp(ev, event_name) == 0) {
rb_str_cmp       6288 ext/win32ole/win32ole.c         else if (rb_str_cmp(ev, event_name) == 0) {
rb_str_cmp         55 hash.c         	return rb_str_cmp(a, b);
rb_str_cmp        503 intern.h       int rb_str_cmp(VALUE, VALUE);
rb_str_cmp        857 string.c       	rb_str_cmp(str1, str2) == 0) {
rb_str_cmp        931 string.c       	result = rb_str_cmp(str1, str2);
rb_str_cmp       1353 string.c           n = rb_str_cmp(beg, end);


rb_str_concat

rb_str_concat     438 ext/iconv/iconv.c 		    rb_str_concat(ret, RARRAY(rescue)->ptr[0]);
rb_str_concat     447 ext/iconv/iconv.c 		rb_str_concat(ret, rescue);
rb_str_concat    1538 ext/win32ole/win32ole.c     rb_str_concat(subkey, com);
rb_str_concat    3381 ext/win32ole/win32ole.c            rb_str_concat(type, ole_typedesc2val(pTypeInfo, p, typedetails));
rb_str_concat    3516 ext/win32ole/win32ole.c         rb_str_concat(str, rb_fix2str(INT2FIX(pTypeDesc->vt), 10));
rb_str_concat    4109 ext/win32ole/win32ole.c     rb_str_concat(key, guid);
rb_str_concat    4111 ext/win32ole/win32ole.c     rb_str_concat(key, version);
rb_str_concat     501 intern.h       VALUE rb_str_concat(VALUE, VALUE);
rb_str_concat    7058 parse.y        	    rb_str_concat(head->nd_lit, tail->nd_lit);
rb_str_concat    7068 parse.y        	    rb_str_concat(head->nd_lit, tail->nd_lit);
rb_str_concat    4240 string.c           rb_define_method(rb_cString, "concat", rb_str_concat, 1);
rb_str_concat    4241 string.c           rb_define_method(rb_cString, "<<", rb_str_concat, 1);


rb_str_delete_bang

rb_str_delete_bang 2765 string.c       static VALUE rb_str_delete_bang(int,VALUE*,VALUE);
rb_str_delete_bang 2785 string.c       	return rb_str_delete_bang(1, &src, str);
rb_str_delete_bang 2999 string.c           rb_str_delete_bang(argc, argv, str);
rb_str_delete_bang 4278 string.c           rb_define_method(rb_cString, "delete!", rb_str_delete_bang, -1);


rb_str_derive

rb_str_derive     111 ext/iconv/iconv.c static VALUE rb_str_derive _((VALUE str, const char* ptr, int len));
rb_str_derive     431 ext/iconv/iconv.c 		ret = rb_str_derive(str, instart, inptr - instart);
rb_str_derive     434 ext/iconv/iconv.c 	    str = rb_str_derive(str, inptr, inlen);
rb_str_derive     454 ext/iconv/iconv.c 	ret = rb_str_derive(str, instart, inptr - instart);


rb_str_downcase_bang

rb_str_downcase_bang 2604 string.c           rb_str_downcase_bang(str);
rb_str_downcase_bang 4231 string.c           rb_define_method(rb_cString, "downcase!", rb_str_downcase_bang, 0);


rb_str_dump

rb_str_dump      1163 ext/strscan/strscan.c     return rb_str_dump(rb_str_new(buf, bp - buf));
rb_str_dump      1184 ext/strscan/strscan.c     return rb_str_dump(rb_str_new(buf, bp - buf));
rb_str_dump       507 intern.h       VALUE rb_str_dump(VALUE);
rb_str_dump      1057 object.c       	str = rb_str_dump(str);
rb_str_dump      4223 string.c           rb_define_method(rb_cString, "dump", rb_str_dump, 0);


rb_str_dup

rb_str_dup        382 error.c        	return rb_str_dup(rb_class_name(klass));
rb_str_dup        367 ext/dbm/dbm.c          ret = rb_protect(rb_yield, rb_assoc_new(rb_str_dup(keystr), valstr), &status);
rb_str_dup        345 ext/sdbm/init.c         ret = rb_protect(rb_yield, rb_assoc_new(rb_str_dup(keystr), valstr), &status);
rb_str_dup        335 ext/strscan/strscan.c     p->str = rb_str_dup(str);
rb_str_dup       2347 ext/zlib/zlib.c     str = rb_str_dup(gz->z.input);
rb_str_dup       2494 ext/zlib/zlib.c 	str = rb_str_dup(str);
rb_str_dup       2510 ext/zlib/zlib.c 	str = rb_str_dup(str);
rb_str_dup       2576 ext/zlib/zlib.c     s = rb_str_dup(rb_str_to_str(str));
rb_str_dup       2599 ext/zlib/zlib.c     s = rb_str_dup(rb_str_to_str(str));
rb_str_dup       4112 file.c         	    fname = rb_str_dup(*filep);
rb_str_dup       4133 file.c         	    fname = rb_str_dup(*filep);
rb_str_dup        488 intern.h       VALUE rb_str_dup(VALUE);
rb_str_dup       1155 object.c           return rb_str_dup(rb_class_name(klass));
rb_str_dup        563 range.c            str = rb_str_dup(str);
rb_str_dup        588 range.c            str = rb_str_dup(str);
rb_str_dup        578 string.c           str = rb_str_dup(str);
rb_str_dup       1430 string.c       	    return rb_str_dup(indx);
rb_str_dup       1908 string.c           str = rb_str_dup(str);
rb_str_dup       1943 string.c       	return rb_str_dup(str);
rb_str_dup       2200 string.c           if (RSTRING(str)->len <= 1) return rb_str_dup(str);
rb_str_dup       2551 string.c           str = rb_str_dup(str);
rb_str_dup       2603 string.c           str = rb_str_dup(str);
rb_str_dup       2664 string.c           str = rb_str_dup(str);
rb_str_dup       2720 string.c           str = rb_str_dup(str);
rb_str_dup       2897 string.c           str = rb_str_dup(str);
rb_str_dup       2998 string.c           str = rb_str_dup(str);
rb_str_dup       3076 string.c           str = rb_str_dup(str);
rb_str_dup       3113 string.c           str = rb_str_dup(str);
rb_str_dup       3512 string.c           str = rb_str_dup(str);
rb_str_dup       3618 string.c           str = rb_str_dup(str);
rb_str_dup       3671 string.c           str = rb_str_dup(str);
rb_str_dup       3728 string.c           str = rb_str_dup(str);
rb_str_dup       3766 string.c           str = rb_str_dup(str);
rb_str_dup       4055 string.c           if (width < 0 || RSTRING(str)->len >= width) return rb_str_dup(str);
rb_str_dup         53 variable.c     	    tmp = rb_str_dup(tmp);
rb_str_dup        174 variable.c         if (!NIL_P(path)) return rb_str_dup(path);
rb_str_dup        215 variable.c     	str = rb_str_dup(rb_class_path(under));


rb_str_each_line

rb_str_each_line 4281 string.c           rb_define_method(rb_cString, "each_line", rb_str_each_line, -1);
rb_str_each_line 4282 string.c           rb_define_method(rb_cString, "each", rb_str_each_line, -1);


rb_str_equal

rb_str_equal     1357 string.c           while (!rb_str_equal(current, after_end)) {
rb_str_equal     1359 string.c       	if (!excl && rb_str_equal(current, end)) break;
rb_str_equal     1362 string.c       	if (excl && rb_str_equal(current, end)) break;
rb_str_equal     4193 string.c           rb_define_method(rb_cString, "==", rb_str_equal, 1);


rb_str_format

rb_str_format     472 intern.h       VALUE rb_str_format(int, const VALUE *, VALUE);
rb_str_format     240 sprintf.c          return rb_str_format(argc - 1, argv + 1, GETNTHARG(0));
rb_str_format     413 string.c       	return rb_str_format(RARRAY(arg)->len, RARRAY(arg)->ptr, str);
rb_str_format     415 string.c           return rb_str_format(1, &arg, str);


rb_str_hash

rb_str_hash        85 hash.c         	return rb_str_hash(a);
rb_str_hash       502 intern.h       int rb_str_hash(VALUE);
rb_str_hash       813 string.c           int key = rb_str_hash(str);


rb_str_index

rb_str_index      935 dln.c              int rb_str_index;
rb_str_index     1003 dln.c          	    char *name = name_base + base->rb_str_index;
rb_str_index     1056 string.c       	pos = rb_str_index(str, sub, pos);
rb_str_index     1429 string.c       	if (rb_str_index(str, indx, 0) != -1)
rb_str_index     1636 string.c       	beg = rb_str_index(str, indx, 0);
rb_str_index     2240 string.c           i = rb_str_index(str, arg, 0);


rb_str_inspect

rb_str_inspect    746 error.c            VALUE s = rb_str_inspect(rb_str_new2(str));
rb_str_inspect    506 intern.h       VALUE rb_str_inspect(VALUE);
rb_str_inspect   4222 string.c           rb_define_method(rb_cString, "inspect", rb_str_inspect, 0);


rb_str_intern

rb_str_intern    3705 eval.c         		result = rb_str_intern(str);
rb_str_intern     512 intern.h       VALUE rb_str_intern(VALUE);
rb_str_intern    4243 string.c           rb_define_method(rb_cString, "intern", rb_str_intern, 0);
rb_str_intern    4244 string.c           rb_define_method(rb_cString, "to_sym", rb_str_intern, 0);


rb_str_justify

rb_str_justify   4117 string.c           return rb_str_justify(argc, argv, str, 'l');
rb_str_justify   4137 string.c           return rb_str_justify(argc, argv, str, 'r');
rb_str_justify   4157 string.c           return rb_str_justify(argc, argv, str, 'c');


rb_str_length

rb_str_length    4203 string.c           rb_define_method(rb_cString, "length", rb_str_length, 0);
rb_str_length    4204 string.c           rb_define_method(rb_cString, "size", rb_str_length, 0);


rb_str_locktmp

rb_str_locktmp    489 intern.h       VALUE rb_str_locktmp(VALUE);
rb_str_locktmp   1953 string.c           rb_str_locktmp(dest);


rb_str_lstrip_bang

rb_str_lstrip_bang 3672 string.c           rb_str_lstrip_bang(str);
rb_str_lstrip_bang 3745 string.c           VALUE l = rb_str_lstrip_bang(str);
rb_str_lstrip_bang 4267 string.c           rb_define_method(rb_cString, "lstrip!", rb_str_lstrip_bang, 0);


rb_str_modify

rb_str_modify     186 ext/Win32API/Win32API.c 		rb_str_modify(str);
rb_str_modify     627 ext/openssl/ossl_ssl.c         rb_str_modify(str);
rb_str_modify     734 ext/stringio/stringio.c 	rb_str_modify(ptr->string);
rb_str_modify    1092 ext/stringio/stringio.c 	rb_str_modify(str);
rb_str_modify     495 intern.h       void rb_str_modify(VALUE);
rb_str_modify    1259 io.c           	rb_str_modify(str);
rb_str_modify    1408 io.c           	rb_str_modify(str);
rb_str_modify    2329 io.c           	rb_str_modify(str);
rb_str_modify    4634 io.c           	    rb_str_modify(arg);
rb_str_modify    4765 io.c           	    rb_str_modify(v);
rb_str_modify     237 string.c           rb_str_modify(str);
rb_str_modify     610 string.c           rb_str_modify(str);
rb_str_modify     633 string.c           rb_str_modify(str);
rb_str_modify     668 string.c       	rb_str_modify(str);
rb_str_modify     690 string.c           rb_str_modify(str);
rb_str_modify     718 string.c           rb_str_modify(str);
rb_str_modify    1525 string.c           rb_str_modify(str);
rb_str_modify    1619 string.c       	    rb_str_modify(str);
rb_str_modify    1837 string.c       	rb_str_modify(str);
rb_str_modify    2120 string.c       	rb_str_modify(str);
rb_str_modify    2172 string.c       	rb_str_modify(str);
rb_str_modify    2519 string.c           rb_str_modify(str);
rb_str_modify    2571 string.c           rb_str_modify(str);
rb_str_modify    2628 string.c           rb_str_modify(str);
rb_str_modify    2684 string.c           rb_str_modify(str);
rb_str_modify    2821 string.c           rb_str_modify(str);
rb_str_modify    2962 string.c           rb_str_modify(str);
rb_str_modify    3036 string.c           rb_str_modify(str);
rb_str_modify    3477 string.c       	rb_str_modify(str);
rb_str_modify    3541 string.c       	    rb_str_modify(str);
rb_str_modify    3572 string.c       	    rb_str_modify(str);
rb_str_modify    3587 string.c       	rb_str_modify(str);
rb_str_modify    3647 string.c       	rb_str_modify(str);
rb_str_modify    3705 string.c       	rb_str_modify(str);


rb_str_new

rb_str_new       1264 array.c            if (RARRAY(ary)->len == 0) return rb_str_new(0, 0);
rb_str_new       1338 array.c            if (RARRAY(ary)->len == 0) return rb_str_new(0, 0);
rb_str_new        639 bignum.c           ss = rb_str_new(0, j);
rb_str_new        464 dir.c          	VALUE s = rb_str_new(0, len);
rb_str_new        825 dir.c          	*dir = rb_str_new(path, pend - path);
rb_str_new        271 error.c            return rb_funcall(etype, rb_intern("new"), 1, rb_str_new(ptr, len));
rb_str_new       4223 eval.c         	terminate_process(status, rb_str_new("exit", 4));
rb_str_new       6837 eval.c         	    tmp = rb_str_new(RSTRING(fname)->ptr, ext-RSTRING(fname)->ptr);
rb_str_new         95 ext/digest/digest.c     str = rb_str_new(0, algo->digest_len);
rb_str_new        114 ext/digest/digest.c     str = rb_str_new(0, algo->digest_len * 2);
rb_str_new        177 ext/digest/digest.c     str = rb_str_new(0, algo->digest_len);
rb_str_new        200 ext/digest/digest.c     str = rb_str_new(0, algo->digest_len * 2);
rb_str_new        170 ext/iconv/iconv.c 	    volatile VALUE msg = rb_str_new(0, strlen(s) + RSTRING(to)->len +
rb_str_new        315 ext/iconv/iconv.c 	return rb_str_new(ptr, len);
rb_str_new        321 ext/iconv/iconv.c 	ret = rb_str_new(ptr, len);
rb_str_new        357 ext/iconv/iconv.c 		str = rb_str_new(&c, 1);
rb_str_new        403 ext/iconv/iconv.c 		    ret = rb_str_new(buffer, outlen);
rb_str_new        410 ext/iconv/iconv.c 			ret = rb_str_new(instart, tmpstart - instart);
rb_str_new        662 ext/iconv/iconv.c     arg.ret = rb_str_new(0, 0);
rb_str_new        100 ext/nkf/nkf.c    result = rb_str_new(0, i_len*3 + 10);
rb_str_new        124 ext/openssl/ossl.c     return rb_str_new(0, size);
rb_str_new         83 ext/openssl/ossl_asn1.c     return rb_str_new(str->data, str->length);
rb_str_new        680 ext/openssl/ossl_asn1.c     VALUE str = rb_str_new(0, 0);
rb_str_new        704 ext/openssl/ossl_asn1.c     der = rb_str_new(0, length);
rb_str_new        762 ext/openssl/ossl_asn1.c 	    value = rb_str_new(p, len);
rb_str_new        978 ext/openssl/ossl_asn1.c     str = rb_str_new(0, length);
rb_str_new         64 ext/openssl/ossl_bio.c     ret = rb_str_new(buf->data, buf->length);
rb_str_new        167 ext/openssl/ossl_bn.c         str = rb_str_new(0, len);
rb_str_new        173 ext/openssl/ossl_bn.c         str = rb_str_new(0, len);
rb_str_new        230 ext/openssl/ossl_cipher.c     str = rb_str_new(0, in_len+EVP_CIPHER_CTX_block_size(ctx));
rb_str_new        248 ext/openssl/ossl_cipher.c     str = rb_str_new(0, EVP_CIPHER_CTX_block_size(ctx));
rb_str_new        345 ext/openssl/ossl_config.c     str = rb_str_new(0, 0);
rb_str_new        406 ext/openssl/ossl_config.c     return rb_str_new(0, 0);
rb_str_new        165 ext/openssl/ossl_hmac.c     return rb_str_new(buf, buf_len);
rb_str_new         88 ext/openssl/ossl_ns_spki.c     str = rb_str_new(0, len);
rb_str_new        130 ext/openssl/ossl_ns_spki.c     str = rb_str_new(buf->data, buf->length);
rb_str_new        174 ext/openssl/ossl_ns_spki.c     return rb_str_new(spki->spkac->challenge->data,
rb_str_new        267 ext/openssl/ossl_ocsp.c     str = rb_str_new(0, len);
rb_str_new        379 ext/openssl/ossl_ocsp.c     str = rb_str_new(0, len);
rb_str_new        131 ext/openssl/ossl_pkcs12.c     str = rb_str_new(0, len);
rb_str_new        751 ext/openssl/ossl_pkcs7.c     str = rb_str_new(0, len);
rb_str_new        173 ext/openssl/ossl_pkey.c     str = rb_str_new(0, EVP_PKEY_size(pkey)+16);
rb_str_new        215 ext/openssl/ossl_pkey_dh.c     str = rb_str_new(0, len);
rb_str_new        337 ext/openssl/ossl_pkey_dh.c     str = rb_str_new(0, len);
rb_str_new        243 ext/openssl/ossl_pkey_dsa.c     str = rb_str_new(0, len);
rb_str_new        336 ext/openssl/ossl_pkey_dsa.c     str = rb_str_new(0, ossl_dsa_buf_size(pkey));
rb_str_new        238 ext/openssl/ossl_pkey_rsa.c     str = rb_str_new(0, len);
rb_str_new        260 ext/openssl/ossl_pkey_rsa.c     str = rb_str_new(0, ossl_rsa_buf_size(pkey));
rb_str_new        282 ext/openssl/ossl_pkey_rsa.c     str = rb_str_new(0, ossl_rsa_buf_size(pkey));
rb_str_new        307 ext/openssl/ossl_pkey_rsa.c     str = rb_str_new(0, ossl_rsa_buf_size(pkey));
rb_str_new        332 ext/openssl/ossl_pkey_rsa.c     str = rb_str_new(0, ossl_rsa_buf_size(pkey));
rb_str_new         65 ext/openssl/ossl_rand.c     str = rb_str_new(0, FIX2INT(len));
rb_str_new         78 ext/openssl/ossl_rand.c     str = rb_str_new(0, FIX2INT(len));
rb_str_new        624 ext/openssl/ossl_ssl.c     if(NIL_P(str)) str = rb_str_new(0, ilen);
rb_str_new        194 ext/openssl/ossl_x509attr.c 	str = rb_str_new(0, length);
rb_str_new        202 ext/openssl/ossl_x509attr.c 	str = rb_str_new(0, length);
rb_str_new        224 ext/openssl/ossl_x509attr.c     str = rb_str_new(0, len);
rb_str_new        183 ext/openssl/ossl_x509cert.c     str = rb_str_new(0, len);
rb_str_new        177 ext/openssl/ossl_x509crl.c     str = rb_str_new(buf->data, buf->length);
rb_str_new        374 ext/openssl/ossl_x509crl.c     str = rb_str_new(buf->data, buf->length);
rb_str_new        397 ext/openssl/ossl_x509crl.c     str = rb_str_new(buf->data, buf->length);
rb_str_new        420 ext/openssl/ossl_x509crl.c     str = rb_str_new(buf->data, buf->length);
rb_str_new        411 ext/openssl/ossl_x509ext.c     str = rb_str_new(0, len);
rb_str_new        228 ext/openssl/ossl_x509name.c         		  rb_str_new(entry->value->data, entry->value->length),
rb_str_new        293 ext/openssl/ossl_x509name.c     str = rb_str_new(0, len);
rb_str_new        156 ext/openssl/ossl_x509req.c     str = rb_str_new(buf->data, buf->length);
rb_str_new        173 ext/openssl/ossl_x509req.c     str = rb_str_new(0, len);
rb_str_new        199 ext/openssl/ossl_x509req.c     str = rb_str_new(buf->data, buf->length);
rb_str_new        300 ext/openssl/ossl_x509req.c     str = rb_str_new(buf->data, buf->length);
rb_str_new        391 ext/racc/cparse/cparse.c         *val = rb_str_new("$", 1);
rb_str_new        289 ext/readline/readline.c     str = rb_str_new("", 1);
rb_str_new        442 ext/socket/socket.c     return rb_str_new(buf, len);
rb_str_new        459 ext/socket/socket.c     return rb_str_new(buf, len);
rb_str_new        473 ext/socket/socket.c     return rb_str_new(buf, len);
rb_str_new        626 ext/socket/socket.c 	return rb_assoc_new(str, rb_str_new(buf, alen));
rb_str_new       2575 ext/socket/socket.c     return rb_assoc_new(sock2, rb_str_new(buf, len));
rb_str_new       2628 ext/socket/socket.c     return rb_assoc_new(sock2, rb_str_new(buf, len));
rb_str_new       2716 ext/socket/socket.c     return rb_str_new(ptr, len);
rb_str_new       2770 ext/socket/socket.c 	rb_ary_push(ary, rb_str_new(*pch, h->h_length));
rb_str_new       2773 ext/socket/socket.c     rb_ary_push(ary, rb_str_new(h->h_addr, h->h_length));
rb_str_new       3048 ext/socket/socket.c     VALUE addr = rb_str_new((char*)res->ai_addr, res->ai_addrlen);
rb_str_new       3081 ext/socket/socket.c     addr = rb_str_new((char*)&sockaddr, sizeof(sockaddr));
rb_str_new        251 ext/stringio/stringio.c 	string = rb_str_new("", 0);
rb_str_new       1111 ext/stringio/stringio.c 		str = rb_str_new(0, 0);
rb_str_new       1135 ext/stringio/stringio.c 	str = rb_str_new(0, 0);
rb_str_new        138 ext/strscan/strscan.c     return infect(rb_str_new(S_PBEG(p) + beg_i, end_i - beg_i), p);
rb_str_new        149 ext/strscan/strscan.c     return infect(rb_str_new(S_PBEG(p) + beg_i, len), p);
rb_str_new        783 ext/strscan/strscan.c         return infect(rb_str_new("", 0), p);
rb_str_new       1059 ext/strscan/strscan.c         return infect(rb_str_new("", 0), p);
rb_str_new       1121 ext/strscan/strscan.c         return infect(rb_str_new(buf, len), p);
rb_str_new       1126 ext/strscan/strscan.c         return infect(rb_str_new(buf, len), p);
rb_str_new       1134 ext/strscan/strscan.c         return infect(rb_str_new(buf, len), p);
rb_str_new       1143 ext/strscan/strscan.c     return infect(rb_str_new(buf, len), p);
rb_str_new       1163 ext/strscan/strscan.c     return rb_str_dump(rb_str_new(buf, bp - buf));
rb_str_new       1184 ext/strscan/strscan.c     return rb_str_dump(rb_str_new(buf, bp - buf));
rb_str_new        354 ext/syck/rubyext.c                 obj = rb_str_new( n->data.str->ptr, n->data.str->len );
rb_str_new        363 ext/syck/rubyext.c                 obj = rb_str_new( n->data.str->ptr, n->data.str->len );
rb_str_new        515 ext/syck/rubyext.c                                   rb_str_new( n->data.str->ptr + 1, n->data.str->len - 1 ) );
rb_str_new        519 ext/syck/rubyext.c                 obj = rb_str_new( n->data.str->ptr, n->data.str->len );
rb_str_new        524 ext/syck/rubyext.c                 obj = rb_str_new( n->data.str->ptr, n->data.str->len );
rb_str_new        970 ext/syck/rubyext.c             obj = rb_str_new( n->data.str->ptr, n->data.str->len );
rb_str_new       1269 ext/syck/rubyext.c             v = rb_str_new( n->data.str->ptr, n->data.str->len );
rb_str_new       1891 ext/syck/rubyext.c         rb_io_write( dest, rb_str_new( str, len ) );
rb_str_new       5328 ext/tk/tcltklib.c     str = s ? rb_str_new(s, len) : rb_str_new2("");
rb_str_new       6077 ext/tk/tcltklib.c     str = rb_str_new(Tcl_DStringValue(&dstr), Tcl_DStringLength(&dstr));
rb_str_new       6235 ext/tk/tcltklib.c     str = rb_str_new(Tcl_DStringValue(&dstr), Tcl_DStringLength(&dstr));
rb_str_new       6319 ext/tk/tcltklib.c     str = rb_str_new(dst_buf, dst_len);
rb_str_new       7582 ext/tk/tcltklib.c     str = rb_str_new(result, dst - result - 1);
rb_str_new       7612 ext/tk/tcltklib.c     dst = rb_str_new(0, len + 1);
rb_str_new       7617 ext/tk/tcltklib.c     dst = rb_str_new(0, len + 1);
rb_str_new       1046 ext/tk/tkutil/tkutil.c         return rb_str_new(ptr + 1, len - 2);
rb_str_new       2875 ext/win32ole/win32ole.c         argv[0] = rb_str_new(mname, n-1);
rb_str_new        440 ext/zlib/zlib.c 	z->buf = rb_str_new(0, ZSTREAM_INITIAL_BUFSIZE);
rb_str_new        472 ext/zlib/zlib.c 	z->buf = rb_str_new(0, size);
rb_str_new        528 ext/zlib/zlib.c 	dst = rb_str_new(0, 0);
rb_str_new        646 ext/zlib/zlib.c 	dst = rb_str_new(0, 0);
rb_str_new        790 ext/zlib/zlib.c 	    rest = rb_str_new(z->stream.next_in, z->stream.avail_in);
rb_str_new        805 ext/zlib/zlib.c 	rest = rb_str_new(z->stream.next_in, z->stream.avail_in);
rb_str_new       1548 ext/zlib/zlib.c 	    dst = rb_str_new(0, 0);
rb_str_new       2052 ext/zlib/zlib.c 	gz->orig_name = rb_str_new(RSTRING(gz->z.input)->ptr, len);
rb_str_new       2059 ext/zlib/zlib.c 	gz->comment = rb_str_new(RSTRING(gz->z.input)->ptr, len);
rb_str_new       2161 ext/zlib/zlib.c 	return rb_str_new(0, 0);
rb_str_new       2195 ext/zlib/zlib.c             return rb_str_new(0, 0);
rb_str_new       2240 ext/zlib/zlib.c 	return rb_str_new(0, 0);
rb_str_new       2600 file.c             return file_expand_path(fname, dname, rb_str_new(0, MAXPATHLEN + 2));
rb_str_new       2724 file.c             basename = rb_str_new(p, f);
rb_str_new       2764 file.c         	dirname = rb_str_new(name, 3);
rb_str_new       2769 file.c             dirname = rb_str_new(name, p - name);
rb_str_new       2808 file.c             extname = rb_str_new(e, chompdirsep(e) - e);	/* keep the dot, too! */
rb_str_new       2867 file.c             if (RARRAY(ary)->len == 0) return rb_str_new(0, 0);
rb_str_new       4063 file.c         	if (!path_check_0(rb_str_new(p0, p - p0), Qtrue)) {
rb_str_new        474 intern.h       VALUE rb_str_new(const char*, long);
rb_str_new        622 io.c               return io_fwrite(rb_str_new(ptr, len), &of);
rb_str_new       1175 io.c               str = rb_str_new(ptr, len);
rb_str_new       1219 io.c           	str = rb_str_new(0, siz);
rb_str_new       1255 io.c           	str = rb_str_new(0, len);
rb_str_new       1487 io.c           	    *strp = str = rb_str_new(&ch, 1);
rb_str_new       2325 io.c           	str = rb_str_new(0, ilen);
rb_str_new       3247 io.c           		    argv[0] = rb_str_new(str+1, RSTRING(tmp)->len-1);
rb_str_new       3619 io.c               rb_io_write(io, rb_str_new(&c, 1));
rb_str_new       3801 io.c               rb_io_write(rb_stderr, rb_str_new(mesg, len));
rb_str_new       4382 io.c               if (NIL_P(port)) return rb_str_new(0,0);
rb_str_new       5193 io.c                       str = rb_str_new(NULL, 0);
rb_str_new        820 marshal.c          if (len == 0) return rb_str_new(0, 0);
rb_str_new        823 marshal.c      	    str = rb_str_new(RSTRING(arg->src)->ptr+arg->offset, len);
rb_str_new       1738 numeric.c          return rb_str_new(&c, 1);
rb_str_new       1053 object.c           str = rb_str_new(0, strlen(name)+1);
rb_str_new        945 pack.c         		VALUE buf = rb_str_new(0, 0);
rb_str_new       1144 pack.c             VALUE s = rb_str_new(ptr, len);
rb_str_new       1400 pack.c         		rb_ary_push(ary, bitstr = rb_str_new(0, len));
rb_str_new       1420 pack.c         		rb_ary_push(ary, bitstr = rb_str_new(0, len));
rb_str_new       1440 pack.c         		rb_ary_push(ary, bitstr = rb_str_new(0, len));
rb_str_new       1462 pack.c         		rb_ary_push(ary, bitstr = rb_str_new(0, len));
rb_str_new       3559 parse.y        			    node = NEW_STR(rb_str_new(0, 0));
rb_str_new       3597 parse.y        			    node = NEW_XSTR(rb_str_new(0, 0));
rb_str_new       3608 parse.y        				node = NEW_NODE(NODE_DXSTR, rb_str_new(0, 0), 1, NEW_LIST(node));
rb_str_new       3638 parse.y        			    node = NEW_NODE(NODE_DSTR, rb_str_new(0, 0), 1, NEW_LIST(node));
rb_str_new       3885 parse.y        				$$ = NEW_NODE(NODE_DSYM, rb_str_new(0, 0), 1, NEW_LIST($$));
rb_str_new       4461 parse.y            str = rb_str_new(parser->tokp, lex_p - parser->tokp);
rb_str_new       4572 parse.y        	    VALUE str = rb_str_new(0,0);
rb_str_new       4623 parse.y            return rb_str_new(beg, end - beg);
rb_str_new       4665 parse.y            return rb_compile_string(f, rb_str_new(s, len), line);
rb_str_new       4671 parse.y            return rb_parser_compile_string(vparser, f, rb_str_new(s, len), line);
rb_str_new       5203 parse.y            set_yylval_str(rb_str_new(tok(), toklen()));
rb_str_new       5268 parse.y        				  rb_str_new(tok(), toklen()),	/* nd_lit */
rb_str_new       5361 parse.y        		str = rb_str_new(p, pend - p);
rb_str_new       5387 parse.y        		set_yylval_str(rb_str_new(tok(), toklen()));
rb_str_new       5393 parse.y        	str = rb_str_new(tok(), toklen());
rb_str_new       5491 parse.y        	: ((_s) = rb_str_new((_p), (_n))))
rb_str_new       7052 parse.y        	NODE *node = NEW_DSTR(rb_str_new(0, 0));
rb_str_new       7095 parse.y        	node = list_append(NEW_DSTR(rb_str_new(0, 0)), node);
rb_str_new        368 re.c               str = rb_str_new(RREGEXP(re)->str,RREGEXP(re)->len);
rb_str_new       1270 re.c               if (NIL_P(str)) str = rb_str_new(0,0);
rb_str_new       1744 re.c               tmp = rb_str_new(0, RSTRING(str)->len*2);
rb_str_new        167 ruby.c         #define rubylib_mangled_path(s, l) rb_str_new((s), (l))
rb_str_new        588 ruby.c         		e_script = rb_str_new(0,0);
rb_str_new        686 ruby.c         		    rb_rs = rb_str_new(&c, 1);
rb_str_new        620 sprintf.c      				tmp = rb_str_new(0, 3+strlen(s));
rb_str_new        103 string.c           return rb_str_new(ptr, strlen(ptr));
rb_str_new        109 string.c           VALUE str = rb_str_new(ptr, len);
rb_str_new        348 string.c           str3 = rb_str_new(0, RSTRING(str1)->len+RSTRING(str2)->len);
rb_str_new       1768 string.c           buf[i] = rb_str_new(0,0);
rb_str_new       3293 string.c       		    rb_ary_push(result, rb_str_new("", 0));
rb_str_new       1201 time.c             return rb_str_new(buf, len);
rb_str_new       1677 time.c             return rb_str_new(buf, len);
rb_str_new       1871 time.c         	str = rb_str_new(0, 0);
rb_str_new       1888 time.c             str = rb_str_new(buf, len);
rb_str_new       1948 time.c             return rb_str_new(buf, 8);
rb_str_new        175 variable.c         return rb_str_new(0,0);
rb_str_new        237 variable.c     	str = rb_str_new(pbeg, p-pbeg);


rb_str_new2

rb_str_new2      1252 array.c        	return rb_str_new2("[...]");
rb_str_new2      1373 array.c            if (RARRAY(ary)->len == 0) return rb_str_new2("[]");
rb_str_new2       601 bignum.c       	return rb_str_new2("0");
rb_str_new2       510 class.c        	rb_ary_push(ary, rb_str_new2(rb_id2name(name)));
rb_str_new2       487 dir.c              return rb_str_new2(dirp->path);
rb_str_new2       769 dir.c          	path = rb_str_new2(dist);
rb_str_new2       557 error.c            argv[0] = rb_str_new2(buf);
rb_str_new2       709 error.c        	    d = rb_str_new2(desc);
rb_str_new2       746 error.c            VALUE s = rb_str_inspect(rb_str_new2(str));
rb_str_new2       862 error.c        	mesg = rb_str_new2(err);
rb_str_new2      1056 error.c            arg = mesg ? rb_str_new2(mesg) : Qnil;
rb_str_new2      1578 eval.c             v = eval(ruby_top_self, rb_str_new2(str), Qnil, 0, 0);
rb_str_new2      2549 eval.c         	srcfile = rb_str_new2(ruby_sourcefile?ruby_sourcefile:"(ruby)");
rb_str_new2      2551 eval.c         	proc_invoke(trace_func, rb_ary_new3(6, rb_str_new2(event_name),
rb_str_new2      3941 eval.c         	    if (desc) result = rb_str_new2(desc);
rb_str_new2      5383 eval.c         			       3, rb_str_new2(format), obj, argv[0]);
rb_str_new2      5973 eval.c         	    str = rb_str_new2(ruby_sourcefile);
rb_str_new2      6207 eval.c         			rb_str_update(mesg, 0, 0, rb_str_new2(": "));
rb_str_new2      6750 eval.c             if (search_required(rb_str_new2(feature), &fname)) {
rb_str_new2      6769 eval.c             rb_provide_feature(rb_str_new2(feature));
rb_str_new2      6984 eval.c             VALUE fn = rb_str_new2(fname);
rb_str_new2      7433 eval.c         	    rb_ary_push(ary, rb_str_new2(rb_id2name(tbl[i])));
rb_str_new2      7440 eval.c         	    rb_ary_push(ary, rb_str_new2(rb_id2name(vars->id)));
rb_str_new2      12046 eval.c             return rb_str_new2(thread_status_name(th->status));
rb_str_new2      12245 eval.c             args[1] = rb_str_new2("exit");
rb_str_new2       201 ext/Win32API/Win32API.c 	return rb_str_new2((char *)ret);
rb_str_new2        54 ext/bigdecimal/bigdecimal.c     return rb_str_new2("1.0.1");
rb_str_new2       188 ext/bigdecimal/bigdecimal.c     return rb_str_new2(psz);
rb_str_new2      1097 ext/bigdecimal/bigdecimal.c     return rb_str_new2(psz);
rb_str_new2      1119 ext/bigdecimal/bigdecimal.c     obj1 = rb_str_new2(psz1);
rb_str_new2      1153 ext/bigdecimal/bigdecimal.c     obj = rb_str_new2(pszAll);
rb_str_new2       483 ext/curses/curses.c     return rb_str_new2(name);
rb_str_new2       780 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "VERSION",  rb_str_new2(DB_VERSION_STRING));
rb_str_new2       782 ext/dbm/dbm.c      rb_define_const(rb_cDBM, "VERSION",  rb_str_new2("unknown"));
rb_str_new2       299 ext/dl/cptr.c    return rb_str_new2(str);
rb_str_new2       145 ext/dl/dl.c        rb_define_const(rb_mDL, "BUILD_RUBY_PLATFORM", rb_str_new2(RUBY_PLATFORM));
rb_str_new2       146 ext/dl/dl.c        rb_define_const(rb_mDL, "BUILD_RUBY_VERSION",  rb_str_new2(RUBY_VERSION));
rb_str_new2       986 ext/gdbm/gdbm.c     rb_define_const(rb_cGDBM, "VERSION",  rb_str_new2(gdbm_version));
rb_str_new2       285 ext/iconv/iconv.c 	args[0] = rb_str_new2(mesg);
rb_str_new2       691 ext/iconv/iconv.c 	rb_ary_push(ary, rb_str_new2(names[i]));
rb_str_new2      1001 ext/iconv/iconv.c     VALUE str = rb_str_buf_cat2(rb_str_new2("#<"), cname);
rb_str_new2       287 ext/nkf/nkf.c    rb_define_const(mKconv, "VERSION", rb_str_new2(RUBY_NKF_VERSION));
rb_str_new2       289 ext/nkf/nkf.c    rb_define_const(mKconv, "NKF_VERSION", rb_str_new2(NKF_VERSION));
rb_str_new2       290 ext/nkf/nkf.c    rb_define_const(mKconv, "NKF_RELEASE_DATE", rb_str_new2(NKF_RELEASE_DATE));
rb_str_new2       291 ext/nkf/nkf.c    rb_define_const(mKconv, "REVISION", rb_str_new2(RUBY_NKF_REVISION));
rb_str_new2       321 ext/openssl/ossl.c         rb_ary_push(ary, rb_str_new2(ERR_error_string(e, NULL)));
rb_str_new2       417 ext/openssl/ossl.c     rb_define_const(mOSSL, "VERSION", rb_str_new2(OSSL_VERSION));
rb_str_new2       418 ext/openssl/ossl.c     rb_define_const(mOSSL, "OPENSSL_VERSION", rb_str_new2(OPENSSL_VERSION_TEXT));
rb_str_new2       411 ext/openssl/ossl_asn1.c 	ret = rb_str_new2(OBJ_nid2sn(nid));
rb_str_new2      1024 ext/openssl/ossl_asn1.c 	ret = rb_str_new2(OBJ_nid2sn(nid));
rb_str_new2      1037 ext/openssl/ossl_asn1.c 	ret = rb_str_new2(OBJ_nid2ln(nid));
rb_str_new2      1054 ext/openssl/ossl_asn1.c     return rb_str_new2(buf);
rb_str_new2      1107 ext/openssl/ossl_asn1.c 	rb_ary_store(ary, i, rb_str_new2(ossl_asn1_info[i].name));
rb_str_new2       265 ext/openssl/ossl_cipher.c     return rb_str_new2(EVP_CIPHER_name(EVP_CIPHER_CTX_cipher(ctx)));
rb_str_new2       210 ext/openssl/ossl_config.c     return rb_str_new2(str);
rb_str_new2       221 ext/openssl/ossl_config.c     if (NIL_P(section)) section = rb_str_new2("");
rb_str_new2       225 ext/openssl/ossl_config.c 	section = rb_str_new2("");
rb_str_new2       279 ext/openssl/ossl_config.c 	rb_hash_aset(hash, rb_str_new2(entry->name), rb_str_new2(entry->value));
rb_str_new2       297 ext/openssl/ossl_config.c     rb_ary_push(ary, rb_str_new2(cv->section));
rb_str_new2       372 ext/openssl/ossl_config.c     section = rb_str_new2(cv->section);
rb_str_new2       375 ext/openssl/ossl_config.c 	name = v->name ? rb_str_new2(v->name) : Qnil;
rb_str_new2       376 ext/openssl/ossl_config.c 	value = v->value ? rb_str_new2(v->value) : Qnil;
rb_str_new2       423 ext/openssl/ossl_config.c     str = rb_str_new2("#<");
rb_str_new2       442 ext/openssl/ossl_config.c 		    rb_str_new2(CONF_get1_default_config_file()));
rb_str_new2       248 ext/openssl/ossl_digest.c     return rb_str_new2(EVP_MD_name(EVP_MD_CTX_md(ctx)));
rb_str_new2       147 ext/openssl/ossl_engine.c     return rb_str_new2(ENGINE_get_id(e));
rb_str_new2       155 ext/openssl/ossl_engine.c     return rb_str_new2(ENGINE_get_name(e));
rb_str_new2       295 ext/openssl/ossl_engine.c     case ENGINE_CMD_FLAG_NUMERIC:  return rb_str_new2("NUMERIC");
rb_str_new2       296 ext/openssl/ossl_engine.c     case ENGINE_CMD_FLAG_STRING:   return rb_str_new2("STRING");
rb_str_new2       297 ext/openssl/ossl_engine.c     case ENGINE_CMD_FLAG_NO_INPUT: return rb_str_new2("NO_INPUT");
rb_str_new2       298 ext/openssl/ossl_engine.c     case ENGINE_CMD_FLAG_INTERNAL: return rb_str_new2("INTERNAL");
rb_str_new2       299 ext/openssl/ossl_engine.c     default: return rb_str_new2("UNKNOWN");
rb_str_new2       315 ext/openssl/ossl_engine.c 	    rb_ary_push(tmp, rb_str_new2(p->cmd_name));
rb_str_new2       316 ext/openssl/ossl_engine.c 	    rb_ary_push(tmp, rb_str_new2(p->cmd_desc));
rb_str_new2       331 ext/openssl/ossl_engine.c     str = rb_str_new2("#<");
rb_str_new2       171 ext/openssl/ossl_ns_spki.c 	return rb_str_new2(NULL);
rb_str_new2       350 ext/openssl/ossl_ocsp.c     return rb_str_new2(OCSP_response_status_str(st));
rb_str_new2       671 ext/openssl/ossl_pkcs7.c     ossl_pkcs7_set_err_string(self, msg ? rb_str_new2(msg) : Qnil);
rb_str_new2       239 ext/openssl/ossl_pkey_dh.c     rb_hash_aset(hash, rb_str_new2("p"), ossl_bn_new(pkey->pkey.dh->p));
rb_str_new2       240 ext/openssl/ossl_pkey_dh.c     rb_hash_aset(hash, rb_str_new2("g"), ossl_bn_new(pkey->pkey.dh->g));
rb_str_new2       241 ext/openssl/ossl_pkey_dh.c     rb_hash_aset(hash, rb_str_new2("pub_key"), ossl_bn_new(pkey->pkey.dh->pub_key));
rb_str_new2       242 ext/openssl/ossl_pkey_dh.c     rb_hash_aset(hash, rb_str_new2("priv_key"), ossl_bn_new(pkey->pkey.dh->priv_key));
rb_str_new2       267 ext/openssl/ossl_pkey_dsa.c     rb_hash_aset(hash, rb_str_new2("p"), ossl_bn_new(pkey->pkey.dsa->p));
rb_str_new2       268 ext/openssl/ossl_pkey_dsa.c     rb_hash_aset(hash, rb_str_new2("q"), ossl_bn_new(pkey->pkey.dsa->q));
rb_str_new2       269 ext/openssl/ossl_pkey_dsa.c     rb_hash_aset(hash, rb_str_new2("g"), ossl_bn_new(pkey->pkey.dsa->g));
rb_str_new2       270 ext/openssl/ossl_pkey_dsa.c     rb_hash_aset(hash, rb_str_new2("pub_key"), ossl_bn_new(pkey->pkey.dsa->pub_key));
rb_str_new2       271 ext/openssl/ossl_pkey_dsa.c     rb_hash_aset(hash, rb_str_new2("priv_key"), ossl_bn_new(pkey->pkey.dsa->priv_key));
rb_str_new2       358 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("n"), ossl_bn_new(pkey->pkey.rsa->n));
rb_str_new2       359 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("e"), ossl_bn_new(pkey->pkey.rsa->e));
rb_str_new2       360 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("d"), ossl_bn_new(pkey->pkey.rsa->d));
rb_str_new2       361 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("p"), ossl_bn_new(pkey->pkey.rsa->p));
rb_str_new2       362 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("q"), ossl_bn_new(pkey->pkey.rsa->q));
rb_str_new2       363 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("dmp1"), ossl_bn_new(pkey->pkey.rsa->dmp1));
rb_str_new2       364 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("dmq1"), ossl_bn_new(pkey->pkey.rsa->dmq1));
rb_str_new2       365 ext/openssl/ossl_pkey_rsa.c     rb_hash_aset(hash, rb_str_new2("iqmp"), ossl_bn_new(pkey->pkey.rsa->iqmp));
rb_str_new2       413 ext/openssl/ossl_ssl.c     rb_ary_push(ary, rb_str_new2(SSL_CIPHER_get_name(cipher)));
rb_str_new2       414 ext/openssl/ossl_ssl.c     rb_ary_push(ary, rb_str_new2(SSL_CIPHER_get_version(cipher)));
rb_str_new2       461 ext/openssl/ossl_ssl.c         str = rb_str_new2(NULL);
rb_str_new2       827 ext/openssl/ossl_ssl.c     ret = rb_str_new2(SSL_state_string(ssl));
rb_str_new2        17 ext/openssl/ossl_x509.c   rb_define_const(mX509, "DEFAULT_" #x, rb_str_new2(X509_get_default_##i()))
rb_str_new2       140 ext/openssl/ossl_x509attr.c 	ret = rb_str_new2(OBJ_nid2sn(nid));
rb_str_new2       602 ext/openssl/ossl_x509cert.c     str = rb_str_new2("#<");
rb_str_new2       235 ext/openssl/ossl_x509ext.c     valstr = rb_str_new2(RTEST(critical) ? "critical," : "");
rb_str_new2       363 ext/openssl/ossl_x509ext.c 	ret = rb_str_new2(OBJ_nid2sn(nid));
rb_str_new2       172 ext/openssl/ossl_x509name.c     str = rb_str_new2(buf);
rb_str_new2       227 ext/openssl/ossl_x509name.c 	ary = rb_ary_new3(3, rb_str_new2(short_name),
rb_str_new2       331 ext/openssl/ossl_x509name.c     rb_hash_aset(hash, rb_str_new2("C"), ptrstr);
rb_str_new2       332 ext/openssl/ossl_x509name.c     rb_hash_aset(hash, rb_str_new2("countryName"), ptrstr);
rb_str_new2       333 ext/openssl/ossl_x509name.c     rb_hash_aset(hash, rb_str_new2("serialNumber"), ptrstr);
rb_str_new2       334 ext/openssl/ossl_x509name.c     rb_hash_aset(hash, rb_str_new2("dnQualifier"), ptrstr);
rb_str_new2       335 ext/openssl/ossl_x509name.c     rb_hash_aset(hash, rb_str_new2("DC"), ia5str);
rb_str_new2       336 ext/openssl/ossl_x509name.c     rb_hash_aset(hash, rb_str_new2("domainComponent"), ia5str);
rb_str_new2       337 ext/openssl/ossl_x509name.c     rb_hash_aset(hash, rb_str_new2("emailAddress"), ia5str);
rb_str_new2       468 ext/openssl/ossl_x509store.c     return rb_str_new2(X509_verify_cert_error_string(err));
rb_str_new2       219 ext/pty/pty.c  	v = rb_str_new2(shellname);
rb_str_new2       802 ext/racc/cparse/cparse.c                     rb_str_new2(RACC_VERSION));
rb_str_new2       804 ext/racc/cparse/cparse.c         rb_str_new2("$raccId: cparse.c,v 1.3 2003/11/03 12:20:54 aamine Exp $"));
rb_str_new2       515 ext/readline/readline.c     return rb_str_new2("HISTORY");
rb_str_new2       827 ext/readline/readline.c     rb_define_const(mReadline, "VERSION", rb_str_new2(rl_library_version));
rb_str_new2       829 ext/readline/readline.c     rb_define_const(mReadline, "VERSION", rb_str_new2("2.0 or prior version"));
rb_str_new2       689 ext/socket/socket.c     return rb_str_new2(buf);
rb_str_new2       854 ext/socket/socket.c 	family = rb_str_new2("AF_UNSPEC");
rb_str_new2       857 ext/socket/socket.c 	family = rb_str_new2("AF_INET");
rb_str_new2       861 ext/socket/socket.c 	family = rb_str_new2("AF_INET6");
rb_str_new2       866 ext/socket/socket.c 	family = rb_str_new2("AF_LOCAL");
rb_str_new2       870 ext/socket/socket.c 	family = rb_str_new2("AF_UNIX");
rb_str_new2       875 ext/socket/socket.c 	family = rb_str_new2(pbuf);
rb_str_new2       884 ext/socket/socket.c 	    addr1 = rb_str_new2(hbuf);
rb_str_new2       892 ext/socket/socket.c     addr2 = rb_str_new2(hbuf);
rb_str_new2      1318 ext/socket/socket.c     rb_ary_push(ary, rb_str_new2(hostp));
rb_str_new2      1324 ext/socket/socket.c 		rb_ary_push(names, rb_str_new2(*pch));
rb_str_new2      1712 ext/socket/socket.c     return rb_str_new2(fptr->path);
rb_str_new2      1948 ext/socket/socket.c     return rb_assoc_new(rb_str_new2("AF_UNIX"),
rb_str_new2      1949 ext/socket/socket.c 			rb_str_new2(sockaddr->sun_path));
rb_str_new2      2643 ext/socket/socket.c     return rb_str_new2(buf);
rb_str_new2      2658 ext/socket/socket.c     return rb_str_new2(un.nodename);
rb_str_new2      2684 ext/socket/socket.c 	    RARRAY(ary)->ptr[2] = rb_str_new2(res->ai_canonname);
rb_str_new2      2759 ext/socket/socket.c     rb_ary_push(ary, rb_str_new2(h->h_name));
rb_str_new2      2764 ext/socket/socket.c 	    rb_ary_push(names, rb_str_new2(*pch));
rb_str_new2      2789 ext/socket/socket.c     if (NIL_P(proto)) proto = rb_str_new2("tcp");
rb_str_new2      2818 ext/socket/socket.c     if (NIL_P(proto)) proto = rb_str_new2("tcp");
rb_str_new2      3032 ext/socket/socket.c     return rb_assoc_new(rb_str_new2(hbuf), rb_str_new2(pbuf));
rb_str_new2      3100 ext/socket/socket.c     path = rb_str_new2(sockaddr->sun_path);
rb_str_new2      1154 ext/strscan/strscan.c     if (p->curr == 0) return rb_str_new2("");
rb_str_new2      1174 ext/strscan/strscan.c     if (EOS_P(p)) return rb_str_new2("");
rb_str_new2      1305 ext/strscan/strscan.c     tmp = rb_str_new2(STRSCAN_VERSION);
rb_str_new2      1308 ext/strscan/strscan.c     tmp = rb_str_new2("$Id: strscan.c,v 1.22 2005/10/06 11:11:23 aamine Exp $");
rb_str_new2       125 ext/syck/rubyext.c     bc = rb_str_new2( ret );
rb_str_new2       364 ext/syck/rubyext.c                 rb_funcall( obj, s_tr_bang, 2, rb_str_new2( "\n\t " ), rb_str_new2( "" ) );
rb_str_new2       365 ext/syck/rubyext.c                 arr = rb_funcall( obj, s_unpack, 1, rb_str_new2( "m" ) );
rb_str_new2       514 ext/syck/rubyext.c                                   rb_str_new2( "tag:ruby.yaml.org,2002:sym" ),
rb_str_new2       668 ext/syck/rubyext.c     VALUE anchor_name = rb_str_new2( a );
rb_str_new2       669 ext/syck/rubyext.c     SyckNode *badanc = syck_new_map( rb_str_new2( "name" ), anchor_name );
rb_str_new2       952 ext/syck/rubyext.c     return rb_str_new2( "" );
rb_str_new2      1031 ext/syck/rubyext.c         obj = rb_funcall( self, s_transfer, 2, rb_str_new2( n->type_id ), obj );
rb_str_new2      1086 ext/syck/rubyext.c         VALUE str_xprivate = rb_str_new2( "x-private" );
rb_str_new2      1087 ext/syck/rubyext.c         VALUE colon = rb_str_new2( ":" );
rb_str_new2      1204 ext/syck/rubyext.c         val = rb_str_new2( taguri );
rb_str_new2      1225 ext/syck/rubyext.c         return rb_str_new2( type_id );
rb_str_new2      1228 ext/syck/rubyext.c     return rb_str_new2( "" );
rb_str_new2      1243 ext/syck/rubyext.c         obj = rb_funcall( self, s_transfer, 2, rb_str_new2( n->type_id ), obj );
rb_str_new2      1262 ext/syck/rubyext.c         t = rb_str_new2(n->type_id);
rb_str_new2      1977 ext/syck/rubyext.c     bonus->port = rb_str_new2( "" );
rb_str_new2      2147 ext/syck/rubyext.c     rb_define_const( rb_syck, "VERSION", rb_str_new2( SYCK_VERSION ) );
rb_str_new2       115 ext/syslog/syslog.c     return syslog_opened ? rb_str_new2(syslog_ident) : Qnil;
rb_str_new2       181 ext/syslog/syslog.c     return rb_str_new2(buf);
rb_str_new2      2180 ext/tk/tcltklib.c         return rb_str_new2("");
rb_str_new2      2183 ext/tk/tcltklib.c         return rb_str_new2("1");
rb_str_new2      2186 ext/tk/tcltklib.c         return rb_str_new2("0");
rb_str_new2      2189 ext/tk/tcltklib.c         return rb_funcall(obj, ID_join, 1, rb_str_new2(" "));
rb_str_new2      2230 ext/tk/tcltklib.c             str = rb_str_new2("LocalJumpError: ");
rb_str_new2      2307 ext/tk/tcltklib.c             backtrace = rb_ary_join(backtrace, rb_str_new2("\n"));
rb_str_new2      4234 ext/tk/tcltklib.c     volatile VALUE cmd_str = rb_str_new2("thread_vwait");
rb_str_new2      4249 ext/tk/tcltklib.c     volatile VALUE cmd_str = rb_str_new2("thread_tkwait");
rb_str_new2      5328 ext/tk/tcltklib.c     str = s ? rb_str_new(s, len) : rb_str_new2("");
rb_str_new2      5329 ext/tk/tcltklib.c     if (binary) rb_ivar_set(str, ID_at_enc, rb_str_new2("binary"));
rb_str_new2      5995 ext/tk/tcltklib.c       return rb_str_new2("");
rb_str_new2      6142 ext/tk/tcltklib.c       return rb_str_new2("");
rb_str_new2      6353 ext/tk/tcltklib.c     return rb_str_new2(Tcl_GetEncodingName((Tcl_Encoding)NULL));
rb_str_new2      7489 ext/tk/tcltklib.c                 elem = rb_str_new2(argv[idx]);
rb_str_new2      7534 ext/tk/tcltklib.c     if (argc == 0) return rb_str_new2("");
rb_str_new2      7684 ext/tk/tcltklib.c     ret = rb_obj_freeze(rb_str_new2(info));
rb_str_new2      7725 ext/tk/tcltklib.c                     rb_obj_freeze(rb_str_new2(tcltklib_release_date)));
rb_str_new2      7728 ext/tk/tcltklib.c                     rb_str_new2(finalize_hook_name));
rb_str_new2        70 ext/tk/tkutil/tkutil.c     return rb_str_new2("None");
rb_str_new2       115 ext/tk/tkutil/tkutil.c     id_num = rb_str_append(rb_str_new2(cmd_id_prefix), id_num);
rb_str_new2       117 ext/tk/tkutil/tkutil.c     return rb_str_append(rb_str_new2(cmd_id_head), id_num);
rb_str_new2       160 ext/tk/tkutil/tkutil.c                           rb_str_new2(RSTRING(cmd_id)->ptr + head_len));
rb_str_new2       381 ext/tk/tkutil/tkutil.c             rb_ivar_set(val, ID_at_enc, rb_str_new2("utf-8"));
rb_str_new2       475 ext/tk/tkutil/tkutil.c             rb_ivar_set(val, ID_at_enc, rb_str_new2("utf-8"));
rb_str_new2       487 ext/tk/tkutil/tkutil.c     return rb_str_append(rb_str_new2("-"), rb_funcall(key, ID_to_s, 0, 0));
rb_str_new2       795 ext/tk/tkutil/tkutil.c                                   rb_str_new2(rb_id2name(SYM2ID(obj))));
rb_str_new2       797 ext/tk/tkutil/tkutil.c                 return fromDefaultEnc_toUTF8(rb_str_new2(rb_id2name(SYM2ID(obj))), self);
rb_str_new2       800 ext/tk/tkutil/tkutil.c             return rb_str_new2(rb_id2name(SYM2ID(obj)));
rb_str_new2       814 ext/tk/tkutil/tkutil.c         return rb_str_new2("0");
rb_str_new2       817 ext/tk/tkutil/tkutil.c         return rb_str_new2("1");
rb_str_new2       820 ext/tk/tkutil/tkutil.c         return rb_str_new2("");
rb_str_new2      1260 ext/tk/tkutil/tkutil.c         id = rb_intern(RSTRING(rb_str_cat2(rb_str_new2("@"), str))->ptr);
rb_str_new2      1277 ext/tk/tkutil/tkutil.c     ret = rb_str_new2(buf);
rb_str_new2      1309 ext/tk/tkutil/tkutil.c     ret = rb_str_new2(buf);
rb_str_new2      1336 ext/tk/tkutil/tkutil.c     ret = rb_ary_new3(2, rb_str_new2(inf->key), rb_str_new2(buf));
rb_str_new2      1384 ext/tk/tkutil/tkutil.c                   rb_str_cat2(rb_str_new2("@"),
rb_str_new2      1480 ext/tk/tkutil/tkutil.c     return rb_str_new2("CallbackSubst");
rb_str_new2      1487 ext/tk/tkutil/tkutil.c     return rb_str_new2("SubstInfo");
rb_str_new2      1496 ext/tk/tkutil/tkutil.c     return rb_str_new2("TkCallbackEntry");
rb_str_new2      1521 ext/tk/tkutil/tkutil.c                     rb_obj_freeze(rb_str_new2(tkutil_release_date)));
rb_str_new2       476 ext/win32ole/win32ole.c     return rb_str_new2(szTime);
rb_str_new2       510 ext/win32ole/win32ole.c     msg = rb_str_new2(strhr);
rb_str_new2       556 ext/win32ole/win32ole.c     error_msg = rb_str_new2(error_code);
rb_str_new2       696 ext/win32ole/win32ole.c     VALUE vstr = rb_str_new2(p);
rb_str_new2      1201 ext/win32ole/win32ole.c         obj = rb_str_new2(p);
rb_str_new2      1280 ext/win32ole/win32ole.c             obj = rb_str_new2(p);
rb_str_new2      1317 ext/win32ole/win32ole.c         return rb_str_new2(buf);
rb_str_new2      1331 ext/win32ole/win32ole.c         return rb_str_new2(buf);
rb_str_new2      1503 ext/win32ole/win32ole.c                     rb_hash_aset(constant, rb_str_new2(pName), val);
rb_str_new2      1537 ext/win32ole/win32ole.c     subkey = rb_str_new2("SOFTWARE\\Classes\\");
rb_str_new2      2880 ext/win32ole/win32ole.c         argv[0] = rb_str_new2(mname);
rb_str_new2      3374 ext/win32ole/win32ole.c     VALUE type = rb_str_new2("");
rb_str_new2      3397 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("I2"));
rb_str_new2      3398 ext/win32ole/win32ole.c         return rb_str_new2("I2");
rb_str_new2      3401 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("I4"));
rb_str_new2      3402 ext/win32ole/win32ole.c         return rb_str_new2("I4");
rb_str_new2      3405 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("R4"));
rb_str_new2      3406 ext/win32ole/win32ole.c         return rb_str_new2("R4");
rb_str_new2      3409 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("R8"));
rb_str_new2      3410 ext/win32ole/win32ole.c         return rb_str_new2("R8");
rb_str_new2      3413 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("CY"));
rb_str_new2      3414 ext/win32ole/win32ole.c         return rb_str_new2("CY");
rb_str_new2      3417 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("DATE"));
rb_str_new2      3418 ext/win32ole/win32ole.c         return rb_str_new2("DATE");
rb_str_new2      3421 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("BSTR"));
rb_str_new2      3422 ext/win32ole/win32ole.c         return rb_str_new2("BSTR");
rb_str_new2      3425 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("BOOL"));
rb_str_new2      3426 ext/win32ole/win32ole.c         return rb_str_new2("BOOL");
rb_str_new2      3429 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("VARIANT"));
rb_str_new2      3430 ext/win32ole/win32ole.c         return rb_str_new2("VARIANT");
rb_str_new2      3433 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("DECIMAL"));
rb_str_new2      3434 ext/win32ole/win32ole.c         return rb_str_new2("DECIMAL");
rb_str_new2      3437 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("I1"));
rb_str_new2      3438 ext/win32ole/win32ole.c         return rb_str_new2("I1");
rb_str_new2      3441 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("UI1"));
rb_str_new2      3442 ext/win32ole/win32ole.c         return rb_str_new2("UI1");
rb_str_new2      3445 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("UI2"));
rb_str_new2      3446 ext/win32ole/win32ole.c         return rb_str_new2("UI2");
rb_str_new2      3449 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("UI4"));
rb_str_new2      3450 ext/win32ole/win32ole.c         return rb_str_new2("UI4");
rb_str_new2      3453 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("I8"));
rb_str_new2      3454 ext/win32ole/win32ole.c         return rb_str_new2("I8");
rb_str_new2      3457 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("UI8"));
rb_str_new2      3458 ext/win32ole/win32ole.c         return rb_str_new2("UI8");
rb_str_new2      3461 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("INT"));
rb_str_new2      3462 ext/win32ole/win32ole.c         return rb_str_new2("INT");
rb_str_new2      3465 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("UINT"));
rb_str_new2      3466 ext/win32ole/win32ole.c         return rb_str_new2("UINT");
rb_str_new2      3469 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("VOID"));
rb_str_new2      3470 ext/win32ole/win32ole.c         return rb_str_new2("VOID");
rb_str_new2      3473 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("HRESULT"));
rb_str_new2      3474 ext/win32ole/win32ole.c         return rb_str_new2("HRESULT");
rb_str_new2      3477 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("PTR"));
rb_str_new2      3481 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("SAFEARRAY"));
rb_str_new2      3485 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("CARRAY"));
rb_str_new2      3486 ext/win32ole/win32ole.c         return rb_str_new2("CARRAY");
rb_str_new2      3489 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("USERDEFINED"));
rb_str_new2      3494 ext/win32ole/win32ole.c         return rb_str_new2("USERDEFINED");
rb_str_new2      3496 ext/win32ole/win32ole.c         return rb_str_new2("UNKNOWN");
rb_str_new2      3499 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("DISPATCH"));
rb_str_new2      3500 ext/win32ole/win32ole.c         return rb_str_new2("DISPATCH");
rb_str_new2      3503 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("ERROR"));
rb_str_new2      3504 ext/win32ole/win32ole.c         return rb_str_new2("ERROR");
rb_str_new2      3508 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("LPWSTR"));
rb_str_new2      3509 ext/win32ole/win32ole.c         return rb_str_new2("LPWSTR");
rb_str_new2      3512 ext/win32ole/win32ole.c             rb_ary_push(typedetails, rb_str_new2("LPSTR"));
rb_str_new2      3513 ext/win32ole/win32ole.c         return rb_str_new2("LPSTR");
rb_str_new2      3515 ext/win32ole/win32ole.c         str = rb_str_new2("Unknown Type ");
rb_str_new2      3667 ext/win32ole/win32ole.c     VALUE v = rb_str_new2("");
rb_str_new2      4108 ext/win32ole/win32ole.c     VALUE key = rb_str_new2("TypeLib\\");
rb_str_new2      4261 ext/win32ole/win32ole.c         type = rb_str_new2("Enum");
rb_str_new2      4264 ext/win32ole/win32ole.c         type = rb_str_new2("Record");
rb_str_new2      4267 ext/win32ole/win32ole.c         type = rb_str_new2("Module");
rb_str_new2      4270 ext/win32ole/win32ole.c         type = rb_str_new2("Interface");
rb_str_new2      4273 ext/win32ole/win32ole.c         type = rb_str_new2("Dispatch");
rb_str_new2      4276 ext/win32ole/win32ole.c         type = rb_str_new2("Class");
rb_str_new2      4279 ext/win32ole/win32ole.c         type = rb_str_new2("Alias");
rb_str_new2      4282 ext/win32ole/win32ole.c         type = rb_str_new2("Union");
rb_str_new2      4285 ext/win32ole/win32ole.c         type = rb_str_new2("Max");
rb_str_new2      5036 ext/win32ole/win32ole.c     VALUE kind = rb_str_new2("UNKNOWN");
rb_str_new2      5042 ext/win32ole/win32ole.c         kind = rb_str_new2("PERINSTANCE");
rb_str_new2      5045 ext/win32ole/win32ole.c         kind = rb_str_new2("STATIC");
rb_str_new2      5048 ext/win32ole/win32ole.c         kind = rb_str_new2("CONSTANT");
rb_str_new2      5051 ext/win32ole/win32ole.c         kind = rb_str_new2("DISPATCH");
rb_str_new2      5357 ext/win32ole/win32ole.c     VALUE type = rb_str_new2("UNKNOWN");
rb_str_new2      5361 ext/win32ole/win32ole.c         type = rb_str_new2("PROPERTY");
rb_str_new2      5363 ext/win32ole/win32ole.c         type =  rb_str_new2("PROPERTYGET");
rb_str_new2      5365 ext/win32ole/win32ole.c         type = rb_str_new2("PROPERTYPUT");
rb_str_new2      5367 ext/win32ole/win32ole.c         type = rb_str_new2("PROPERTYPUTREF");
rb_str_new2      5369 ext/win32ole/win32ole.c         type = rb_str_new2("FUNC");
rb_str_new2      5923 ext/win32ole/win32ole.c     VALUE type = rb_str_new2("UNKNOWN");
rb_str_new2      6964 ext/win32ole/win32ole.c     rb_define_const(cWIN32OLE, "VERSION", rb_str_new2(WIN32OLE_VERSION));
rb_str_new2       256 ext/zlib/zlib.c     str = rb_str_new2(zlibVersion());
rb_str_new2      3435 ext/zlib/zlib.c     rb_define_const(mZlib, "VERSION", rb_str_new2(RUBY_ZLIB_VERSION));
rb_str_new2      3436 ext/zlib/zlib.c     rb_define_const(mZlib, "ZLIB_VERSION", rb_str_new2(ZLIB_VERSION));
rb_str_new2      1516 file.c             return rb_str_new2(t);
rb_str_new2      2761 file.c         	return rb_str_new2(".");
rb_str_new2      2807 file.c         	return rb_str_new2("");
rb_str_new2      2856 file.c             if (recur) return rb_str_new2("[...]");
rb_str_new2      4009 file.c         	newpath = rb_str_new2(buf);
rb_str_new2      4042 file.c             return path_check_0(rb_str_new2(path), Qfalse);
rb_str_new2      4138 file.c         		*filep = rb_str_new2(found);
rb_str_new2      4194 file.c         	tmp = rb_ary_join(tmp, rb_str_new2(PATH_SEP));
rb_str_new2      4217 file.c         	tmp = rb_str_new2(f);
rb_str_new2      4330 file.c             separator = rb_obj_freeze(rb_str_new2("/"));
rb_str_new2      4337 file.c             rb_define_const(rb_cFile, "ALT_SEPARATOR", rb_obj_freeze(rb_str_new2("\\")));
rb_str_new2      4341 file.c             rb_define_const(rb_cFile, "PATH_SEPARATOR", rb_obj_freeze(rb_str_new2(PATH_SEP)));
rb_str_new2      1135 hash.c             if (recur) return rb_str_new2("{...}");
rb_str_new2      1155 hash.c         	return rb_str_new2("{}");
rb_str_new2      1162 hash.c             if (recur) return rb_str_new2("{...}");
rb_str_new2      1590 hash.c         	    VALUE str = rb_str_new2(env);
rb_str_new2      1631 hash.c         	return rb_str_new2(env);
rb_str_new2      1998 hash.c             return rb_str_new2("ENV");
rb_str_new2      2020 hash.c         	    i = rb_inspect(rb_str_new2(s+1));
rb_str_new2       475 intern.h       VALUE rb_str_new2(const char*);
rb_str_new2      2943 io.c           	prog = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" "));
rb_str_new2      3261 io.c           	VALUE cmd = rb_str_new2(fname+1);
rb_str_new2      3554 io.c           	    rb_io_write(out, rb_str_new2("nil"));
rb_str_new2      3647 io.c           	    tmp = rb_str_new2("[...]");
rb_str_new2      3687 io.c           	    line = rb_str_new2("nil");
rb_str_new2      4129 io.c           			str = rb_str_new2(fn);
rb_str_new2      4187 io.c           	filename = rb_str_new2("-");
rb_str_new2      5323 io.c               return rb_str_new2("ARGF");
rb_str_new2      5330 io.c               return rb_str_new2(ruby_inplace_mode);
rb_str_new2      5487 io.c               rb_rs = rb_default_rs = rb_str_new2("\n");
rb_str_new2      5623 io.c               filename = rb_str_new2("-");
rb_str_new2       489 numeric.c      	return rb_str_new2(value < 0 ? "-Infinity" : "Infinity");
rb_str_new2       491 numeric.c      	return rb_str_new2("NaN");
rb_str_new2       507 numeric.c          return rb_str_new2(buf);
rb_str_new2      1843 numeric.c      	return rb_str_new2("0");
rb_str_new2      1857 numeric.c          return rb_str_new2(b);
rb_str_new2      2611 numeric.c          if (name) return rb_str_new2(name);
rb_str_new2       727 object.c           return rb_str_new2("");
rb_str_new2       756 object.c           return rb_str_new2("nil");
rb_str_new2       784 object.c           return rb_str_new2("main");
rb_str_new2       808 object.c           return rb_str_new2("true");
rb_str_new2       885 object.c           return rb_str_new2("false");
rb_str_new2      1078 object.c           return rb_str_new2(rb_id2name(SYM2ID(sym)));
rb_str_new2      1139 object.c       	VALUE s = rb_str_new2("#<");
rb_str_new2      1926 pack.c         			tmp = rb_str_new2(t);
rb_str_new2      4539 parse.y            dispatch1(parse_error, rb_str_new2(msg));
rb_str_new2      4564 parse.y        	    fname = rb_str_new2(f);
rb_str_new2      7180 parse.y        	return NEW_STR(rb_str_new2(ruby_sourcefile));
rb_str_new2      9039 parse.y            rb_funcall(parser->value, rb_intern("warn"), 1, rb_str_new2(fmt));
rb_str_new2      9046 parse.y        	       rb_str_new2(fmt), INT2NUM(a));
rb_str_new2      9053 parse.y        	       rb_str_new2(fmt), rb_str_new2(str));
rb_str_new2      9059 parse.y            rb_funcall(parser->value, rb_intern("warning"), 1, rb_str_new2(fmt));
rb_str_new2      9066 parse.y        	       rb_str_new2(fmt), rb_str_new2(str));
rb_str_new2      9118 parse.y        	fname = rb_str_new2("(ripper)");
rb_str_new2      9279 parse.y            rb_define_const(Ripper, "Version", rb_str_new2(RIPPER_VERSION));
rb_str_new2      1560 process.c          if (argc) prog = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" "));
rb_str_new2       594 re.c           	return rb_str_new2(kcode);
rb_str_new2      1895 re.c                   args[0] = rb_str_new2("(?!)");
rb_str_new2      1948 re.c                       args[2] = rb_str_new2("n");
rb_str_new2      1951 re.c                       args[2] = rb_str_new2("e");
rb_str_new2      1954 re.c                       args[2] = rb_str_new2("s");
rb_str_new2      1957 re.c                       args[2] = rb_str_new2("u");
rb_str_new2      2083 re.c               return rb_str_new2(rb_get_kcode());
rb_str_new2       164 ruby.c         #define rubylib_mangled_path(s, l) rb_str_new2(rubylib_mangle((s), (l)))
rb_str_new2       165 ruby.c         #define rubylib_mangled_path2(s) rb_str_new2(rubylib_mangle((s), 0))
rb_str_new2       168 ruby.c         #define rubylib_mangled_path2(s) rb_str_new2(s)
rb_str_new2       412 ruby.c         		    v = rb_str_new2(p);
rb_str_new2       420 ruby.c         		    name_error[0] = rb_str_new2("invalid name for global variable - ");
rb_str_new2       682 ruby.c         		    rb_rs = rb_str_new2("\n\n");
rb_str_new2       681 signal.c       	if (oldfunc == SIG_IGN) oldcmd = rb_str_new2("IGNORE");
rb_str_new2       682 signal.c       	else if (oldfunc == sighandler) oldcmd = rb_str_new2("DEFAULT");
rb_str_new2       806 signal.c       	rb_hash_aset(h, rb_str_new2(sigs->signm), INT2FIX(sigs->signo));
rb_str_new2       118 string.c           VALUE str = rb_str_new2(ptr);
rb_str_new2      3345 string.c           sep = rb_str_new2(sep0);
rb_str_new2      3933 string.c           result = rb_str_new2(crypt(s, RSTRING(salt)->ptr));
rb_str_new2        67 struct.c       	rb_ary_push(ary, rb_str_new2(rb_id2name(SYM2ID(*p))));
rb_str_new2       225 struct.c           else nm = rb_str_new2(name);
rb_str_new2      1168 time.c             return rb_str_new2(s);
rb_str_new2      1669 time.c         	return rb_str_new2("UTC");
rb_str_new2      1672 time.c             return rb_str_new2(tobj->tm.tm_zone);
rb_str_new2      1674 time.c             return rb_str_new2(tzname[daylight && tobj->tm.tm_isdst]);
rb_str_new2        48 variable.c         path = rb_str_new2(rb_id2name(name));
rb_str_new2        59 variable.c     	tmp = rb_str_new2(rb_id2name(fc->name));
rb_str_new2       150 variable.c     	    path = rb_str_new2(rb_id2name(SYM2ID(path)));
rb_str_new2       212 variable.c     	str = rb_str_new2(name);
rb_str_new2       696 variable.c         rb_ary_push(ary, rb_str_new2(rb_id2name(key)));
rb_str_new2       720 variable.c     	    rb_ary_push(ary, rb_str_new2(buf));
rb_str_new2       991 variable.c     	rb_ary_push(ary, rb_str_new2(rb_id2name(key)));
rb_str_new2      1189 variable.c         fn = rb_str_new2(file);
rb_str_new2      1405 variable.c         rb_ary_push(ary, rb_str_new2(rb_id2name(key)));
rb_str_new2      1603 variable.c     	VALUE kval = rb_str_new2(rb_id2name(key));
rb_str_new2        24 version.c          VALUE v = rb_obj_freeze(rb_str_new2(ruby_version));
rb_str_new2        25 version.c          VALUE d = rb_obj_freeze(rb_str_new2(ruby_release_date));
rb_str_new2        26 version.c          VALUE p = rb_obj_freeze(rb_str_new2(ruby_platform));


rb_str_new3

rb_str_new3      3655 eval.c         	result = rb_str_new3(node->nd_lit);
rb_str_new3      3671 eval.c         	    str = rb_str_new3(node->nd_lit);
rb_str_new3      3715 eval.c         	result = rb_funcall(self, '`', 1, rb_str_new3(node->nd_lit));
rb_str_new3        59 ext/Win32API/Win32API.c 	str = rb_str_new3(proc);
rb_str_new3       476 intern.h       VALUE rb_str_new3(VALUE);
rb_str_new3       549 string.c       	str2 = rb_str_new3(rb_str_new4(str));


rb_str_new4

rb_str_new4      6551 eval.c             fname = rb_str_new4(fname);
rb_str_new4      6924 eval.c         	*(volatile VALUE *)&fname = rb_str_new4(fname);
rb_str_new4       826 ext/openssl/ossl_asn1.c     tmp = rb_str_new4(StringValue(obj));
rb_str_new4       842 ext/openssl/ossl_asn1.c     tmp = rb_str_new4(StringValue(obj));
rb_str_new4       859 ext/openssl/ossl_asn1.c     tmp = rb_str_new4(StringValue(obj));
rb_str_new4      2259 ext/socket/socket.c     addr = rb_str_new4(addr);
rb_str_new4      1447 file.c             fname1 = rb_str_new4(fname1);
rb_str_new4       841 hash.c         	st_add_direct(RHASH(hash)->tbl, rb_str_new4(key), val);
rb_str_new4       477 intern.h       VALUE rb_str_new4(VALUE);
rb_str_new4       944 re.c               RMATCH(match)->str = rb_str_new4(str);
rb_str_new4       263 sprintf.c          fmt = rb_str_new4(fmt);
rb_str_new4       549 string.c       	str2 = rb_str_new3(rb_str_new4(str));
rb_str_new4      1861 time.c             format = rb_str_new4(format);


rb_str_new5

rb_str_new5       478 intern.h       VALUE rb_str_new5(VALUE, const char*, long);
rb_str_new5       383 string.c           str2 = rb_str_new5(str,0, len *= RSTRING(str)->len);
rb_str_new5       545 string.c       	str2 = rb_str_new5(str,0,0);
rb_str_new5       554 string.c       	str2 = rb_str_new5(str, RSTRING(str)->ptr+beg, len);
rb_str_new5      1294 string.c           str = rb_str_new5(orig, RSTRING(orig)->ptr, RSTRING(orig)->len);
rb_str_new5      2202 string.c           obj = rb_str_new5(str, 0, RSTRING(str)->len);
rb_str_new5      2445 string.c           result = rb_str_new5(str, 0, len);
rb_str_new5      3315 string.c       		    tmp = rb_str_new5(str, 0, 0);
rb_str_new5      3325 string.c       	    tmp = rb_str_new5(str, 0, 0);
rb_str_new5      3419 string.c       	    line = rb_str_new5(str, s, p - s);
rb_str_new5      3429 string.c       	line = rb_str_new5(str, s, p - s);
rb_str_new5      4056 string.c           res = rb_str_new5(str, 0, width);


rb_str_plus

rb_str_plus       492 intern.h       VALUE rb_str_plus(VALUE, VALUE);
rb_str_plus      4197 string.c           rb_define_method(rb_cString, "+", rb_str_plus, 1);


rb_str_replace

rb_str_replace    273 string.c       static VALUE rb_str_replace(VALUE, VALUE);
rb_str_replace    279 string.c           rb_str_replace(dup, str);
rb_str_replace    297 string.c       	rb_str_replace(str, orig);
rb_str_replace   2319 string.c       	rb_str_replace(dup, str);
rb_str_replace   4191 string.c           rb_define_method(rb_cString, "initialize_copy", rb_str_replace, 1);
rb_str_replace   4215 string.c           rb_define_method(rb_cString, "replace", rb_str_replace, 1);


rb_str_resize

rb_str_resize      64 ext/nkf/nkf.c      rb_str_resize(result, o_len);
rb_str_resize     628 ext/openssl/ossl_ssl.c         rb_str_resize(str, ilen);
rb_str_resize     243 ext/stringio/stringio.c 	    rb_str_resize(string, 0);
rb_str_resize     729 ext/stringio/stringio.c 	rb_str_resize(ptr->string, pos + len);
rb_str_resize    1100 ext/stringio/stringio.c 		if (!NIL_P(str)) rb_str_resize(str, 0);
rb_str_resize    1114 ext/stringio/stringio.c 		rb_str_resize(str, 0);
rb_str_resize    1131 ext/stringio/stringio.c 	rb_str_resize(str, len);
rb_str_resize    1217 ext/stringio/stringio.c     rb_str_resize(string, l);
rb_str_resize     457 ext/zlib/zlib.c 	rb_str_resize(z->buf, z->buf_filled + inc);
rb_str_resize     479 ext/zlib/zlib.c 	rb_str_resize(z->buf, z->buf_filled + size);
rb_str_resize     502 ext/zlib/zlib.c 	rb_str_resize(z->buf, z->buf_filled + len);
rb_str_resize     532 ext/zlib/zlib.c 	rb_str_resize(dst, z->buf_filled);
rb_str_resize     618 ext/zlib/zlib.c 	rb_str_resize(z->input, RSTRING(z->input)->len - len);
rb_str_resize    2197 ext/zlib/zlib.c             rb_str_resize(outbuf, 0);
rb_str_resize    2209 ext/zlib/zlib.c             rb_str_resize(outbuf, 0);
rb_str_resize    2221 ext/zlib/zlib.c         rb_str_resize(outbuf, RSTRING(dst)->len);
rb_str_resize    2579 ext/zlib/zlib.c 	rb_str_resize(s, p - RSTRING(s)->ptr);
rb_str_resize    2602 ext/zlib/zlib.c 	rb_str_resize(s, p - RSTRING(s)->ptr);
rb_str_resize    2380 file.c             rb_str_resize(result, buflen);\
rb_str_resize     497 intern.h       VALUE rb_str_resize(VALUE, long);
rb_str_resize    1222 io.c           	rb_str_resize(str, siz);
rb_str_resize    1233 io.c           	rb_str_resize(str, siz);
rb_str_resize    1235 io.c               if (bytes != siz) rb_str_resize(str, bytes);
rb_str_resize    1260 io.c                   rb_str_resize(str, len);
rb_str_resize    1288 io.c               rb_str_resize(str, n);
rb_str_resize    1409 io.c           	rb_str_resize(str,len);
rb_str_resize    1423 io.c                   rb_str_resize(str, 0);
rb_str_resize    1426 io.c               rb_str_resize(str, n);
rb_str_resize    1450 io.c           		rb_str_resize(str, last + len);
rb_str_resize    2330 io.c           	rb_str_resize(str, ilen);
rb_str_resize    2354 io.c               rb_str_resize(str, n);
rb_str_resize    4640 io.c           		rb_str_resize(arg, len+1);
rb_str_resize    5122 io.c           	rb_str_resize(str,0);
rb_str_resize    5173 io.c                   rb_str_resize(str, 0);
rb_str_resize     126 marshal.c      	rb_str_resize(buf, 0);
rb_str_resize     638 marshal.c      	rb_str_resize(arg->arg->str, 0);
rb_str_resize    5489 parse.y        	? (rb_str_resize((_s), (_n)), \
rb_str_resize    1791 re.c               rb_str_resize(tmp, t - RSTRING(tmp)->ptr);
rb_str_resize      86 sprintf.c          rb_str_resize(result, bsiz);\
rb_str_resize     794 sprintf.c          rb_str_resize(result, blen);
rb_str_resize     886 sprintf.c          rb_str_resize(result, (char *)f._p - RSTRING(result)->ptr);
rb_str_resize    2121 string.c       	rb_str_resize(str, RSTRING(str2)->len);
rb_str_resize     213 util.c             rb_str_resize(str, strlen(buf));


rb_str_rstrip_bang

rb_str_rstrip_bang 3729 string.c           rb_str_rstrip_bang(str);
rb_str_rstrip_bang 3746 string.c           VALUE r = rb_str_rstrip_bang(str);
rb_str_rstrip_bang 4268 string.c           rb_define_method(rb_cString, "rstrip!", rb_str_rstrip_bang, 0);


rb_str_setter

rb_str_setter     511 intern.h       void rb_str_setter(VALUE, ID, VALUE*);
rb_str_setter    5484 io.c               rb_define_hooked_variable("$,", &rb_output_fs, 0, rb_str_setter);
rb_str_setter    5490 io.c               rb_define_hooked_variable("$/", &rb_rs, 0, rb_str_setter);
rb_str_setter    5491 io.c               rb_define_hooked_variable("$-0", &rb_rs, 0, rb_str_setter);
rb_str_setter    5492 io.c               rb_define_hooked_variable("$\\", &rb_output_rs, 0, rb_str_setter);


rb_str_splice

rb_str_splice    1567 string.c           rb_str_splice(str, beg, len, val);
rb_str_splice    1597 string.c           rb_str_splice(str, start, len, val);
rb_str_splice    1627 string.c       	    rb_str_splice(str, idx, 1, val);
rb_str_splice    1640 string.c       	rb_str_splice(str, beg, RSTRING(indx)->len, val);
rb_str_splice    1648 string.c       		rb_str_splice(str, beg, len, val);
rb_str_splice    1690 string.c       	    rb_str_splice(str, NUM2LONG(argv[0]), NUM2LONG(argv[1]), argv[2]);
rb_str_splice    1728 string.c           rb_str_splice(str, pos, 0, str2);


rb_str_split

rb_str_split     1062 ext/syck/rubyext.c     VALUE tparts = rb_str_split( const_name, "::" );
rb_str_split     1099 ext/syck/rubyext.c             VALUE parts = rb_str_split( type, ":" );
rb_str_split     1171 ext/syck/rubyext.c                 VALUE parts = rb_str_split( type, ":" );
rb_str_split     4074 ext/win32ole/win32ole.c     VALUE ary = rb_str_split(ver, ".");
rb_str_split     4092 ext/win32ole/win32ole.c     VALUE ary = rb_str_split(ver, ".");
rb_str_split      508 intern.h       VALUE rb_str_split(VALUE, const char*);


rb_str_split_m

rb_str_split_m   3346 string.c           return rb_str_split_m(1, &sep, str);
rb_str_split_m   4237 string.c           rb_define_method(rb_cString, "split", rb_str_split_m, -1);


rb_str_squeeze_bang

rb_str_squeeze_bang 3077 string.c           rb_str_squeeze_bang(argc, argv, str);
rb_str_squeeze_bang 4279 string.c           rb_define_method(rb_cString, "squeeze!", rb_str_squeeze_bang, -1);


rb_str_strip_bang

rb_str_strip_bang 3767 string.c           rb_str_strip_bang(str);
rb_str_strip_bang 4266 string.c           rb_define_method(rb_cString, "strip!", rb_str_strip_bang, 0);


rb_str_sub_bang

rb_str_sub_bang  1909 string.c           rb_str_sub_bang(argc, argv, str);
rb_str_sub_bang  4262 string.c           rb_define_method(rb_cString, "sub!", rb_str_sub_bang, -1);


rb_str_subpat

rb_str_subpat    1426 string.c       	return rb_str_subpat(str, indx, 0);
rb_str_subpat    1509 string.c       	    return rb_str_subpat(str, argv[0], NUM2INT(argv[1]));


rb_str_subpat_set

rb_str_subpat_set 1632 string.c       	rb_str_subpat_set(str, indx, 0, val);
rb_str_subpat_set 1687 string.c       	    rb_str_subpat_set(str, argv[0], NUM2INT(argv[1]), argv[2]);


rb_str_substr

rb_str_substr     291 ext/iconv/iconv.c 	args[0] = rb_inspect(rb_str_substr(failed, 0, FAILED_MAXLEN));
rb_str_substr     319 ext/iconv/iconv.c 	ret = rb_str_substr(str, ptr - RSTRING(str)->ptr, len);
rb_str_substr     849 ext/stringio/stringio.c 	str = rb_str_substr(ptr->string, ptr->pos, e - s);
rb_str_substr     865 ext/stringio/stringio.c 	str = rb_str_substr(ptr->string, s - RSTRING(ptr->string)->ptr, e - s);
rb_str_substr     871 ext/stringio/stringio.c 	str = rb_str_substr(ptr->string, ptr->pos, e - s);
rb_str_substr     892 ext/stringio/stringio.c 	str = rb_str_substr(ptr->string, ptr->pos, e - s);
rb_str_substr    1126 ext/stringio/stringio.c 	str = rb_str_substr(ptr->string, ptr->pos, len);
rb_str_substr     554 ext/zlib/zlib.c     dst = rb_str_substr(z->buf, 0, len);
rb_str_substr     494 intern.h       VALUE rb_str_substr(VALUE, long, long);
rb_str_substr     985 re.c               str = rb_str_substr(RMATCH(match)->str, start, len);
rb_str_substr    1015 re.c               str = rb_str_substr(RMATCH(match)->str, 0, RMATCH(match)->BEG(0));
rb_str_substr    1042 re.c               str = rb_str_substr(str, pos, RSTRING(str)->len - pos);
rb_str_substr    1099 re.c           	    VALUE str = rb_str_substr(target, regs->beg[i], regs->end[i]-regs->beg[i]);
rb_str_substr    1244 re.c           	    VALUE str = rb_str_substr(target, regs->beg[i], regs->end[i]-regs->beg[i]);
rb_str_substr    1445 string.c       		tmp = rb_str_substr(str, beg, len);
rb_str_substr    1511 string.c       	return rb_str_substr(str, NUM2LONG(argv[0]), NUM2LONG(argv[1]));
rb_str_substr    3272 string.c       		    rb_ary_push(result, rb_str_substr(str, beg, end-beg));
rb_str_substr    3297 string.c       		    rb_ary_push(result, rb_str_substr(str, beg, mbclen2(RSTRING(str)->ptr[beg],spat)));
rb_str_substr    3307 string.c       		rb_ary_push(result, rb_str_substr(str, beg, end-beg));
rb_str_substr    3317 string.c       		    tmp = rb_str_substr(str, BEG(idx), END(idx)-BEG(idx));
rb_str_substr    3327 string.c       	    tmp = rb_str_substr(str, beg, RSTRING(str)->len-beg);


rb_str_succ

rb_str_succ      1340 string.c           rb_str_shared_replace(str, rb_str_succ(str));
rb_str_succ      4208 string.c           rb_define_method(rb_cString, "succ", rb_str_succ, 0);
rb_str_succ      4210 string.c           rb_define_method(rb_cString, "next", rb_str_succ, 0);


rb_str_succ_bang

rb_str_succ_bang 4209 string.c           rb_define_method(rb_cString, "succ!", rb_str_succ_bang, 0);
rb_str_succ_bang 4211 string.c           rb_define_method(rb_cString, "next!", rb_str_succ_bang, 0);


rb_str_swapcase_bang

rb_str_swapcase_bang 2721 string.c           rb_str_swapcase_bang(str);
rb_str_swapcase_bang 4233 string.c           rb_define_method(rb_cString, "swapcase!", rb_str_swapcase_bang, 0);


rb_str_times

rb_str_times      493 intern.h       VALUE rb_str_times(VALUE, VALUE);
rb_str_times     4198 string.c           rb_define_method(rb_cString, "*", rb_str_times, 1);


rb_str_to_dbl

rb_str_to_dbl     388 intern.h       double rb_str_to_dbl(VALUE, int);
rb_str_to_dbl    2156 object.c       	return rb_float_new(rb_str_to_dbl(val, Qtrue));
rb_str_to_dbl    2302 string.c           return rb_float_new(rb_str_to_dbl(str, Qfalse));


rb_str_to_inum

rb_str_to_inum    583 bignum.c           return rb_str_to_inum(str, base, base==0);
rb_str_to_inum     80 intern.h       VALUE rb_str_to_inum(VALUE, int, int);
rb_str_to_inum   2016 object.c       	return rb_str_to_inum(val, 0, Qtrue);
rb_str_to_inum    504 sprintf.c      		    val = rb_str_to_inum(val, 0, Qtrue);
rb_str_to_inum   2281 string.c           return rb_str_to_inum(str, base, Qfalse);
rb_str_to_inum   3885 string.c           return rb_str_to_inum(str, 16, Qfalse);
rb_str_to_inum   3906 string.c           return rb_str_to_inum(str, -8, Qfalse);
rb_str_to_inum    272 time.c         	obj = rb_str_to_inum(obj, 10, Qfalse);


rb_str_to_s

rb_str_to_s      4220 string.c           rb_define_method(rb_cString, "to_s", rb_str_to_s, 0);
rb_str_to_s      4221 string.c           rb_define_method(rb_cString, "to_str", rb_str_to_s, 0);


rb_str_to_str

rb_str_to_str    2576 ext/zlib/zlib.c     s = rb_str_dup(rb_str_to_str(str));
rb_str_to_str    2599 ext/zlib/zlib.c     s = rb_str_dup(rb_str_to_str(str));
rb_str_to_str     238 ruby.h         VALUE rb_str_to_str(VALUE);
rb_str_to_str     488 string.c       	s = rb_str_to_str(s);


rb_str_unlocktmp

rb_str_unlocktmp  490 intern.h       VALUE rb_str_unlocktmp(VALUE);
rb_str_unlocktmp 2015 string.c           rb_str_unlocktmp(dest);


rb_str_upcase_bang

rb_str_upcase_bang 2552 string.c           rb_str_upcase_bang(str);
rb_str_upcase_bang 4230 string.c           rb_define_method(rb_cString, "upcase!", rb_str_upcase_bang, 0);


rb_str_update

rb_str_update    6207 eval.c         			rb_str_update(mesg, 0, 0, rb_str_new2(": "));
rb_str_update    6208 eval.c         			rb_str_update(mesg, 0, 0, RARRAY(errat)->ptr[0]);
rb_str_update    1007 ext/stringio/stringio.c 	rb_str_update(ptr->string, ptr->pos, len, str);
rb_str_update     505 intern.h       void rb_str_update(VALUE, long, long, VALUE);


rb_str_upto

rb_str_upto       504 intern.h       VALUE rb_str_upto(VALUE, VALUE, int);
rb_str_upto       216 range.c            return rb_str_upto(args[0], args[1], EXCL(args[2]));
rb_str_upto      1395 string.c           return rb_str_upto(beg, end, Qfalse);


rb_strftime

rb_strftime      1873 time.c         	    len = rb_strftime(&buf, p, &tobj->tm);
rb_strftime      1886 time.c         	len = rb_strftime(&buf, RSTRING(format)->ptr, &tobj->tm);


rb_string_value

rb_string_value   239 ruby.h         VALUE rb_string_value(volatile VALUE*);
rb_string_value   243 ruby.h         #define StringValue(v) rb_string_value(&(v))
rb_string_value   501 string.c           return RSTRING(rb_string_value(ptr))->ptr;
rb_string_value   507 string.c           VALUE str = rb_string_value(ptr);


rb_string_value_cstr

rb_string_value_cstr  241 ruby.h         char *rb_string_value_cstr(volatile VALUE*);
rb_string_value_cstr  245 ruby.h         #define StringValueCStr(v) rb_string_value_cstr(&(v))


rb_string_value_ptr

rb_string_value_ptr  240 ruby.h         char *rb_string_value_ptr(volatile VALUE*);
rb_string_value_ptr  244 ruby.h         #define StringValuePtr(v) rb_string_value_ptr(&(v))


rb_struct_alloc

rb_struct_alloc   516 intern.h       VALUE rb_struct_alloc(VALUE, VALUE);
rb_struct_alloc  1142 marshal.c      	    v = rb_struct_alloc(klass, values);


rb_struct_aref

rb_struct_aref    517 intern.h       VALUE rb_struct_aref(VALUE, VALUE);
rb_struct_aref    643 struct.c           return rb_struct_aref(s, LONG2NUM(n));
rb_struct_aref    848 struct.c           rb_define_method(rb_cStruct, "[]", rb_struct_aref, 1);


rb_struct_aset

rb_struct_aset    518 intern.h       VALUE rb_struct_aset(VALUE, VALUE, VALUE);
rb_struct_aset   1153 marshal.c      		rb_struct_aset(v, LONG2FIX(i), r_object(arg));
rb_struct_aset    849 struct.c           rb_define_method(rb_cStruct, "[]=", rb_struct_aset, 2);


rb_struct_define

rb_struct_define  525 ext/etc/etc.c      sPasswd =  rb_struct_define("Passwd",
rb_struct_define  553 ext/etc/etc.c      sGroup = rb_struct_define("Group", "name",
rb_struct_define  515 intern.h       VALUE rb_struct_define(const char*, ...);
rb_struct_define 3712 process.c          S_Tms = rb_struct_define("Tms", "utime", "stime", "cutime", "cstime", NULL);


rb_struct_getmember

rb_struct_getmember  519 intern.h       VALUE rb_struct_getmember(VALUE, ID);
rb_struct_getmember  112 struct.c           return rb_struct_getmember(obj, rb_frame_this_func());


rb_struct_inspect

rb_struct_inspect  839 struct.c           rb_define_method(rb_cStruct, "to_s", rb_struct_inspect, 0);
rb_struct_inspect  840 struct.c           rb_define_method(rb_cStruct, "inspect", rb_struct_inspect, 0);


rb_struct_iv_get

rb_struct_iv_get  520 intern.h       VALUE rb_struct_iv_get(VALUE, const char*);
rb_struct_iv_get   37 struct.c           VALUE members = rb_struct_iv_get(klass, "__members__");
rb_struct_iv_get  313 struct.c           size = rb_struct_iv_get(klass, "__size__");
rb_struct_iv_get  334 struct.c           size = rb_struct_iv_get(klass, "__size__");
rb_struct_iv_get  357 struct.c           sz = rb_struct_iv_get(klass, "__size__");


rb_struct_members

rb_struct_members  522 intern.h       VALUE rb_struct_members(VALUE);
rb_struct_members  593 marshal.c      		mem = rb_struct_members(obj);
rb_struct_members   98 struct.c           members = rb_struct_members(obj);
rb_struct_members  155 struct.c           members = rb_struct_members(obj);
rb_struct_members  424 struct.c           members = rb_struct_members(s);
rb_struct_members  442 struct.c           members = rb_struct_members(s);
rb_struct_members  524 struct.c           members = rb_struct_members(s);
rb_struct_members  580 struct.c           members = rb_struct_members(s);


rb_struct_modify

rb_struct_modify  156 struct.c           rb_struct_modify(obj);
rb_struct_modify  312 struct.c           rb_struct_modify(self);
rb_struct_modify  581 struct.c           rb_struct_modify(s);
rb_struct_modify  636 struct.c           rb_struct_modify(s);


rb_struct_new

rb_struct_new      77 ext/etc/etc.c      return rb_struct_new(sPasswd,
rb_struct_new     311 ext/etc/etc.c      return rb_struct_new(sGroup,
rb_struct_new     514 intern.h       VALUE rb_struct_new(VALUE, ...);
rb_struct_new    3538 process.c          return rb_struct_new(S_Tms,


rb_struct_s_members

rb_struct_s_members  521 intern.h       VALUE rb_struct_s_members(VALUE);
rb_struct_s_members 1132 marshal.c      	    mem = rb_struct_s_members(klass);
rb_struct_s_members   48 struct.c           VALUE members = rb_struct_s_members(rb_obj_class(s));
rb_struct_s_members   63 struct.c           members = rb_struct_s_members(klass);


rb_struct_s_members_m

rb_struct_s_members_m   89 struct.c           return rb_struct_s_members_m(rb_obj_class(obj));
rb_struct_s_members_m  200 struct.c           rb_define_singleton_method(nstr, "members", rb_struct_s_members_m, 0);


rb_struct_size

rb_struct_size    843 struct.c           rb_define_method(rb_cStruct, "size", rb_struct_size, 0);
rb_struct_size    844 struct.c           rb_define_method(rb_cStruct, "length", rb_struct_size, 0);


rb_struct_to_a

rb_struct_to_a    841 struct.c           rb_define_method(rb_cStruct, "to_a", rb_struct_to_a, 0);
rb_struct_to_a    842 struct.c           rb_define_method(rb_cStruct, "values", rb_struct_to_a, 0);


rb_svar

rb_svar          2162 eval.c         #define MATCH_DATA *rb_svar(node->nd_cnt)
rb_svar          3184 eval.c         	    VALUE *flip = rb_svar(node->nd_cnt);
rb_svar          3206 eval.c         	    VALUE *flip = rb_svar(node->nd_cnt);
rb_svar           220 intern.h       VALUE *rb_svar(int);
rb_svar          8608 parse.y            VALUE *var = rb_svar(1);
rb_svar          8618 parse.y            VALUE *var = rb_svar(1);
rb_svar          8630 parse.y            VALUE *var = rb_svar(0);
rb_svar          8640 parse.y            VALUE *var = rb_svar(0);


rb_syck_bad_anchor_handler

rb_syck_bad_anchor_handler   75 ext/syck/rubyext.c SyckNode * rb_syck_bad_anchor_handler _((SyckParser *, char *));
rb_syck_bad_anchor_handler  705 ext/syck/rubyext.c     syck_parser_bad_anchor_handler( parser, rb_syck_bad_anchor_handler );


rb_syck_emitter_handler

rb_syck_emitter_handler   77 ext/syck/rubyext.c void rb_syck_emitter_handler _((SyckEmitter *, st_data_t));
rb_syck_emitter_handler 1953 ext/syck/rubyext.c     syck_emitter_handler( emitter, rb_syck_emitter_handler );


rb_syck_err_handler

rb_syck_err_handler   74 ext/syck/rubyext.c void rb_syck_err_handler _((SyckParser *, char *));
rb_syck_err_handler  704 ext/syck/rubyext.c     syck_parser_error_handler( parser, rb_syck_err_handler );


rb_syck_load_handler

rb_syck_load_handler   73 ext/syck/rubyext.c SYMID rb_syck_load_handler _((SyckParser *, SyckNode *));
rb_syck_load_handler  683 ext/syck/rubyext.c     syck_parser_handler( parser, rb_syck_load_handler );


rb_syck_mktime

rb_syck_mktime    462 ext/syck/rubyext.c                 obj = rb_syck_mktime( n->data.str->ptr, n->data.str->len );
rb_syck_mktime    466 ext/syck/rubyext.c                 obj = rb_syck_mktime( n->data.str->ptr, n->data.str->len );
rb_syck_mktime    499 ext/syck/rubyext.c                 obj = rb_syck_mktime( n->data.str->ptr, n->data.str->len );


rb_syck_output_handler

rb_syck_output_handler   76 ext/syck/rubyext.c void rb_syck_output_handler _((SyckEmitter *, char *, long));
rb_syck_output_handler 1954 ext/syck/rubyext.c     syck_output_handler( emitter, rb_syck_output_handler );


rb_sym_all_symbols

rb_sym_all_symbols  404 intern.h       VALUE rb_sym_all_symbols(void);
rb_sym_all_symbols 2459 object.c           rb_define_singleton_method(rb_cSymbol, "all_symbols", rb_sym_all_symbols, 0); /* in parse.y */


rb_symname_p

rb_symname_p      399 intern.h       int rb_symname_p(const char*);
rb_symname_p     1056 object.c           if (!rb_symname_p(name)) {


rb_sys_fail

rb_sys_fail       405 dir.c          	    rb_sys_fail(RSTRING(dirname)->ptr);
rb_sys_fail       518 dir.c          	rb_sys_fail(0);
rb_sys_fail       681 dir.c          	rb_sys_fail(RSTRING(path)->ptr);
rb_sys_fail       845 dir.c          	rb_sys_fail(RSTRING(path)->ptr);
rb_sys_fail       882 dir.c          	rb_sys_fail(RSTRING(path)->ptr);
rb_sys_fail       901 dir.c          	rb_sys_fail(RSTRING(dir)->ptr);
rb_sys_fail      10790 eval.c         		    rb_sys_fail("sleep");
rb_sys_fail       142 ext/dbm/dbm.c  	rb_sys_fail(RSTRING(file)->ptr);
rb_sys_fail       493 ext/dbm/dbm.c  	if (errno == EPERM) rb_sys_fail(0);
rb_sys_fail        76 ext/etc/etc.c      if (pwd == 0) rb_sys_fail("/etc/passwd");
rb_sys_fail       149 ext/gdbm/gdbm.c 	    rb_sys_fail(RSTRING(file)->ptr);
rb_sys_fail       592 ext/gdbm/gdbm.c 	if (errno == EPERM) rb_sys_fail(0);
rb_sys_fail       177 ext/iconv/iconv.c 	    if (!inval) rb_sys_fail(s);
rb_sys_fail       189 ext/iconv/iconv.c 		rb_sys_fail("ICONV_SET_TRANSLITERATE");
rb_sys_fail       196 ext/iconv/iconv.c 		rb_sys_fail("ICONV_SET_DISCARD_ILSEQ");
rb_sys_fail       216 ext/iconv/iconv.c 	rb_sys_fail("iconv_close");
rb_sys_fail       256 ext/iconv/iconv.c 	    rb_sys_fail("iconv");
rb_sys_fail       531 ext/iconv/iconv.c 	rb_sys_fail(#func) : (void)0)
rb_sys_fail        66 ext/io/wait/wait.c     if (ioctl(fptr->fd, FIONREAD, &n)) rb_sys_fail(0);
rb_sys_fail       131 ext/io/wait/wait.c 	rb_sys_fail(0);
rb_sys_fail       133 ext/io/wait/wait.c     if (ioctl(fptr->fd, FIONREAD, &n)) rb_sys_fail(0);
rb_sys_fail        29 ext/openssl/ossl_bio.c 	    rb_sys_fail(0);
rb_sys_fail        33 ext/openssl/ossl_bio.c 	    rb_sys_fail(0);
rb_sys_fail       591 ext/openssl/ossl_ssl.c 	    if (errno) rb_sys_fail(0);
rb_sys_fail       652 ext/openssl/ossl_ssl.c 		rb_sys_fail(0);
rb_sys_fail       696 ext/openssl/ossl_ssl.c 		if (errno) rb_sys_fail(0);
rb_sys_fail       230 ext/pty/pty.c  	rb_sys_fail("fork failed");
rb_sys_fail       248 ext/pty/pty.c  	    rb_sys_fail("setpgrp()");
rb_sys_fail       250 ext/pty/pty.c  	    rb_sys_fail("/dev/tty");
rb_sys_fail       120 ext/sdbm/init.c 	rb_sys_fail(RSTRING(file)->ptr);
rb_sys_fail       476 ext/sdbm/init.c 	if (errno == EPERM) rb_sys_fail(0);
rb_sys_fail       255 ext/socket/socket.c 	rb_sys_fail(0);
rb_sys_fail       378 ext/socket/socket.c 	rb_sys_fail(fptr->path);
rb_sys_fail       440 ext/socket/socket.c 	rb_sys_fail(fptr->path);
rb_sys_fail       458 ext/socket/socket.c 	rb_sys_fail("getsockname(2)");
rb_sys_fail       472 ext/socket/socket.c 	rb_sys_fail("getpeername(2)");
rb_sys_fail       511 ext/socket/socket.c 	rb_sys_fail("send(2)");
rb_sys_fail       600 ext/socket/socket.c 	rb_sys_fail("recvfrom(2)");
rb_sys_fail       663 ext/socket/socket.c     if (error == EAI_SYSTEM) rb_sys_fail(reason);
rb_sys_fail      1211 ext/socket/socket.c 	rb_sys_fail(syscall);
rb_sys_fail      1420 ext/socket/socket.c 	rb_sys_fail(0);
rb_sys_fail      1479 ext/socket/socket.c 	rb_sys_fail("socket(2)");
rb_sys_fail      1504 ext/socket/socket.c 	rb_sys_fail(sockaddr.sun_path);
rb_sys_fail      1528 ext/socket/socket.c 	rb_sys_fail("getsockname(2)");
rb_sys_fail      1543 ext/socket/socket.c 	rb_sys_fail("getpeername(2)");
rb_sys_fail      1586 ext/socket/socket.c 	rb_sys_fail("socket(2) - udp");
rb_sys_fail      1627 ext/socket/socket.c     if (!ret) rb_sys_fail("connect(2)");
rb_sys_fail      1649 ext/socket/socket.c     rb_sys_fail("bind(2)");
rb_sys_fail      1686 ext/socket/socket.c     rb_sys_fail("sendto(2)");
rb_sys_fail      1709 ext/socket/socket.c 	    rb_sys_fail(0);
rb_sys_fail      1799 ext/socket/socket.c 	rb_sys_fail("sendmsg(2)");
rb_sys_fail      1862 ext/socket/socket.c 	rb_sys_fail("recvmsg(2)");
rb_sys_fail      1964 ext/socket/socket.c 	rb_sys_fail("getsockname(2)");
rb_sys_fail      1981 ext/socket/socket.c 	rb_sys_fail("getsockname(2)");
rb_sys_fail      2090 ext/socket/socket.c     if (fd < 0) rb_sys_fail("socket(2)");
rb_sys_fail      2109 ext/socket/socket.c 	rb_sys_fail("socketpair(2)");
rb_sys_fail      2264 ext/socket/socket.c 	rb_sys_fail("connect(2)");
rb_sys_fail      2358 ext/socket/socket.c 	rb_sys_fail("bind(2)");
rb_sys_fail      2444 ext/socket/socket.c 	rb_sys_fail("listen(2)");
rb_sys_fail      2640 ext/socket/socket.c 	rb_sys_fail("gethostname");
rb_sys_fail        41 ext/stringio/stringio.c #define error_inval(msg) (errno = EINVAL, rb_sys_fail(msg))
rb_sys_fail       240 ext/stringio/stringio.c 	    rb_sys_fail(0);
rb_sys_fail       230 ext/zlib/zlib.c 	rb_sys_fail(msg);
rb_sys_fail       690 file.c         	rb_sys_fail(StringValueCStr(fname));
rb_sys_fail       718 file.c         	rb_sys_fail(fptr->path);
rb_sys_fail       746 file.c         	rb_sys_fail(RSTRING(fname)->ptr);
rb_sys_fail       780 file.c         	rb_sys_fail(fptr->path);
rb_sys_fail      1474 file.c         	rb_sys_fail(StringValueCStr(fname));
rb_sys_fail      1542 file.c         	rb_sys_fail(RSTRING(fname)->ptr);
rb_sys_fail      1564 file.c         	rb_sys_fail(StringValueCStr(fname));
rb_sys_fail      1587 file.c         	rb_sys_fail(fptr->path);
rb_sys_fail      1608 file.c         	rb_sys_fail(RSTRING(fname)->ptr);
rb_sys_fail      1630 file.c         	rb_sys_fail(fptr->path);
rb_sys_fail      1653 file.c         	rb_sys_fail(RSTRING(fname)->ptr);
rb_sys_fail      1676 file.c         	rb_sys_fail(fptr->path);
rb_sys_fail      1685 file.c         	rb_sys_fail(path);
rb_sys_fail      1742 file.c         	rb_sys_fail(fptr->path);
rb_sys_fail      1746 file.c         	rb_sys_fail(fptr->path);
rb_sys_fail      1757 file.c         	rb_sys_fail(path);
rb_sys_fail      1802 file.c         	rb_sys_fail(path);
rb_sys_fail      1874 file.c         	rb_sys_fail(fptr->path);
rb_sys_fail      1877 file.c         	rb_sys_fail(fptr->path);
rb_sys_fail      1889 file.c         	rb_sys_fail(path);
rb_sys_fail      1946 file.c         	rb_sys_fail(path);
rb_sys_fail      1988 file.c         	rb_sys_fail(path);
rb_sys_fail      2022 file.c             rb_sys_fail(buf);
rb_sys_fail      2118 file.c         	rb_sys_fail(RSTRING(path)->ptr);
rb_sys_fail      2134 file.c         	rb_sys_fail(path);
rb_sys_fail      2958 file.c         	rb_sys_fail(RSTRING(path)->ptr);
rb_sys_fail      2966 file.c         	    rb_sys_fail(RSTRING(path)->ptr);
rb_sys_fail      2970 file.c         	    rb_sys_fail(RSTRING(path)->ptr);
rb_sys_fail      2975 file.c         	    rb_sys_fail(RSTRING(path)->ptr);
rb_sys_fail      3015 file.c         	rb_sys_fail(fptr->path);
rb_sys_fail      3019 file.c         	rb_sys_fail(fptr->path);
rb_sys_fail      3129 file.c         	rb_sys_fail(fptr->path);
rb_sys_fail      3307 file.c         	    rb_sys_fail(RSTRING(argv[1])->ptr);
rb_sys_fail      3390 file.c         	rb_sys_fail(RSTRING(fname)->ptr);
rb_sys_fail       194 io.c                   rb_sys_fail(path);
rb_sys_fail       371 io.c           	    rb_sys_fail(0);
rb_sys_fail       664 io.c               if (n == -1L) rb_sys_fail(fptr->path);
rb_sys_fail       756 io.c               if (pos < 0) rb_sys_fail(fptr->path);
rb_sys_fail       769 io.c               if (pos < 0) rb_sys_fail(fptr->path);
rb_sys_fail       828 io.c               if (pos < 0) rb_sys_fail(fptr->path);
rb_sys_fail       853 io.c               if (io_seek(fptr, 0L, 0) < 0) rb_sys_fail(fptr->path);
rb_sys_fail       887 io.c                       rb_sys_fail(fptr->path);
rb_sys_fail      1025 io.c           	rb_sys_fail(fptr->path);
rb_sys_fail      1285 io.c                       rb_sys_fail(fptr->path);
rb_sys_fail      1510 io.c           		rb_sys_fail(fptr->path);
rb_sys_fail      1998 io.c                       rb_sys_fail(fptr->path);
rb_sys_fail      2004 io.c                       rb_sys_fail(fptr->path);
rb_sys_fail      2161 io.c                       rb_sys_fail(fptr->path);
rb_sys_fail      2206 io.c                       rb_sys_fail(fptr->path);
rb_sys_fail      2252 io.c               if (pos == -1) rb_sys_fail(fptr->path);
rb_sys_fail      2293 io.c               if (n == -1) rb_sys_fail(fptr->path);
rb_sys_fail      2352 io.c           	rb_sys_fail(fptr->path);
rb_sys_fail      2385 io.c           	rb_sys_fail(fptr->path);
rb_sys_fail      2569 io.c           	    rb_sys_fail(fname);
rb_sys_fail      2587 io.c           	    rb_sys_fail(fname);
rb_sys_fail      2627 io.c           	    rb_sys_fail(0);
rb_sys_fail      2862 io.c                       rb_sys_fail(cmd);
rb_sys_fail      2866 io.c                       rb_sys_fail(cmd);
rb_sys_fail      2870 io.c                       rb_sys_fail(cmd);
rb_sys_fail      2873 io.c                   rb_sys_fail(cmd);
rb_sys_fail      2897 io.c           	rb_sys_fail(cmd);
rb_sys_fail      2937 io.c           	    rb_sys_fail(RSTRING(prog)->ptr);
rb_sys_fail      2945 io.c               if (!fp) rb_sys_fail(RSTRING(prog)->ptr);
rb_sys_fail      3320 io.c           		rb_sys_fail(orig->path);
rb_sys_fail      3331 io.c           		rb_sys_fail(orig->path);
rb_sys_fail      3339 io.c           		rb_sys_fail(fptr->path);
rb_sys_fail      3342 io.c           		rb_sys_fail(orig->path);
rb_sys_fail      3421 io.c                       rb_sys_fail(fptr->path);
rb_sys_fail      3431 io.c                       rb_sys_fail(fptr->path);
rb_sys_fail      3927 io.c           	    if (flags == -1) rb_sys_fail(0);
rb_sys_fail      4456 io.c           	rb_sys_fail(0);
rb_sys_fail      4648 io.c               if (retval < 0) rb_sys_fail(fptr->path);
rb_sys_fail      4829 io.c               if (retval < 0) rb_sys_fail(0);
rb_sys_fail      4887 io.c           	rb_sys_fail(0);
rb_sys_fail       107 math.c         	rb_sys_fail("acos");
rb_sys_fail       128 math.c         	rb_sys_fail("asin");
rb_sys_fail       235 math.c         	rb_sys_fail("acosh");
rb_sys_fail       270 math.c         	rb_sys_fail("atanh");
rb_sys_fail       314 math.c         	rb_sys_fail("log");
rb_sys_fail       335 math.c         	rb_sys_fail("log10");
rb_sys_fail       357 math.c         	rb_sys_fail("sqrt");
rb_sys_fail       726 process.c      	rb_sys_fail(0);
rb_sys_fail       802 process.c      	    rb_sys_fail(0);
rb_sys_fail       814 process.c      	    rb_sys_fail(0);
rb_sys_fail      1237 process.c          rb_sys_fail(e.prog);
rb_sys_fail      1432 process.c      	rb_sys_fail("fork(2)");
rb_sys_fail      1595 process.c          if (status == -1) rb_sys_fail(RSTRING(argv[0])->ptr);
rb_sys_fail      1618 process.c          if (pid == -1) rb_sys_fail(RSTRING(argv[0])->ptr);
rb_sys_fail      1685 process.c          if (pgrp < 0) rb_sys_fail(0);
rb_sys_fail      1690 process.c          if (pgrp < 0) rb_sys_fail(0);
rb_sys_fail      1716 process.c          if (setpgid(0,0) < 0) rb_sys_fail(0);
rb_sys_fail      1718 process.c          if (setpgrp() < 0) rb_sys_fail(0);
rb_sys_fail      1744 process.c          if (i < 0) rb_sys_fail(0);
rb_sys_fail      1770 process.c          if (setpgid(ipid, ipgrp) < 0) rb_sys_fail(0);
rb_sys_fail      1797 process.c          if (pid < 0) rb_sys_fail(0);
rb_sys_fail      1813 process.c        if (ret == -1) rb_sys_fail(0);
rb_sys_fail      1855 process.c          if (errno) rb_sys_fail(0);
rb_sys_fail      1887 process.c      	rb_sys_fail(0);
rb_sys_fail      1933 process.c      	rb_sys_fail("getrlimit");
rb_sys_fail      1995 process.c      	rb_sys_fail("setrlimit");
rb_sys_fail      2049 process.c          if (setuid(NUM2INT(id)) != 0) rb_sys_fail(0);
rb_sys_fail      2072 process.c          if (setruid(NUM2INT(id)) != 0) rb_sys_fail(0);
rb_sys_fail      2094 process.c          if (seteuid(NUM2INT(id)) != 0) rb_sys_fail(0);
rb_sys_fail      2118 process.c          if (setreuid(NUM2INT(rid),NUM2INT(eid)) != 0) rb_sys_fail(0);
rb_sys_fail      2142 process.c          if (setresuid(NUM2INT(rid),NUM2INT(eid),NUM2INT(sid)) != 0) rb_sys_fail(0);
rb_sys_fail      2184 process.c          if (setresuid(uid, -1, -1) < 0) rb_sys_fail(0);
rb_sys_fail      2186 process.c          if (setreuid(uid, -1) < 0) rb_sys_fail(0);
rb_sys_fail      2188 process.c          if (setruid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2192 process.c      	    if (setuid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2242 process.c      	if (setresuid(uid, uid, uid) < 0) rb_sys_fail(0);
rb_sys_fail      2245 process.c      	if (setuid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2250 process.c      		if (setreuid(-1, uid) < 0) rb_sys_fail(0);
rb_sys_fail      2253 process.c      		    if (setreuid(-1, SAVED_USER_ID) < 0) rb_sys_fail(0);
rb_sys_fail      2254 process.c      		    if (setreuid(SAVED_USER_ID, 0) < 0) rb_sys_fail(0);
rb_sys_fail      2256 process.c      		    if (setreuid(uid, uid) < 0) rb_sys_fail(0);
rb_sys_fail      2259 process.c      		    if (setreuid(0, -1) < 0) rb_sys_fail(0);
rb_sys_fail      2261 process.c      		    if (setreuid(uid, uid) < 0) rb_sys_fail(0);
rb_sys_fail      2266 process.c      	    if (setreuid(uid, uid) < 0) rb_sys_fail(0);
rb_sys_fail      2272 process.c      		if (seteuid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2275 process.c      		    if (setruid(SAVED_USER_ID) < 0) rb_sys_fail(0);
rb_sys_fail      2277 process.c      		    if (setruid(0) < 0) rb_sys_fail(0);
rb_sys_fail      2279 process.c      		    if (setruid(0) < 0) rb_sys_fail(0);
rb_sys_fail      2281 process.c      		    if (seteuid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2282 process.c      		    if (setruid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2287 process.c      	    if (seteuid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2288 process.c      	    if (setruid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2298 process.c      		      (SAVED_USER_ID == uid)? -1: uid) < 0) rb_sys_fail(0);
rb_sys_fail      2303 process.c      			 (geteuid() == uid)? -1: uid) < 0) rb_sys_fail(0);
rb_sys_fail      2305 process.c      	    if (setreuid(uid, (geteuid() == uid)? -1: uid) < 0) rb_sys_fail(0);
rb_sys_fail      2308 process.c      	    if (setreuid(geteuid(), uid) < 0) rb_sys_fail(0);
rb_sys_fail      2310 process.c      	    if (setreuid(uid, -1) < 0) rb_sys_fail(0);
rb_sys_fail      2312 process.c      	    if (setreuid(-1, SAVED_USER_ID) < 0) rb_sys_fail(0);
rb_sys_fail      2313 process.c      	    if (setreuid(SAVED_USER_ID, uid) < 0) rb_sys_fail(0);
rb_sys_fail      2315 process.c      	    if (setreuid(uid, -1) < 0) rb_sys_fail(0);
rb_sys_fail      2319 process.c      	    if (geteuid() != uid && seteuid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2320 process.c      	    if (getuid() != uid && setruid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2323 process.c      		if (setruid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2326 process.c      		if (setruid(SAVED_USER_ID) < 0) rb_sys_fail(0);
rb_sys_fail      2328 process.c      		if (setruid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2331 process.c      	    if (seteuid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2332 process.c      	    if (setruid(SAVED_USER_ID) < 0) rb_sys_fail(0);
rb_sys_fail      2334 process.c      	    if (setruid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2337 process.c      	    rb_sys_fail(0);
rb_sys_fail      2342 process.c      	    if (setuid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2346 process.c      	    rb_sys_fail(0);
rb_sys_fail      2350 process.c      	    if (seteuid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2353 process.c      	    rb_sys_fail(0);
rb_sys_fail      2357 process.c      	    if (setuid(uid) < 0) rb_sys_fail(0);
rb_sys_fail      2360 process.c      	    rb_sys_fail(0);
rb_sys_fail      2385 process.c          if (setgid(NUM2INT(id)) != 0) rb_sys_fail(0);
rb_sys_fail      2407 process.c          if (setrgid(NUM2INT(id)) != 0) rb_sys_fail(0);
rb_sys_fail      2430 process.c          if (setegid(NUM2INT(id)) != 0) rb_sys_fail(0);
rb_sys_fail      2454 process.c          if (setregid(NUM2INT(rid),NUM2INT(eid)) != 0) rb_sys_fail(0);
rb_sys_fail      2477 process.c          if (setresgid(NUM2INT(rid),NUM2INT(eid),NUM2INT(sid)) != 0) rb_sys_fail(0);
rb_sys_fail      2547 process.c          if (setresgid(gid, -1, -1) < 0) rb_sys_fail(0);
rb_sys_fail      2549 process.c          if (setregid(gid, -1) < 0) rb_sys_fail(0);
rb_sys_fail      2551 process.c          if (setrgid((GIDTYPE)gid) < 0) rb_sys_fail(0);
rb_sys_fail      2555 process.c      	    if (setgid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2595 process.c      	rb_sys_fail(0);
rb_sys_fail      2663 process.c      	rb_sys_fail(0);
rb_sys_fail      2695 process.c      	rb_sys_fail(0);
rb_sys_fail      2767 process.c          if (n < 0) rb_sys_fail("daemon");
rb_sys_fail      2834 process.c      	if (setresgid(gid, gid, gid) < 0) rb_sys_fail(0);
rb_sys_fail      2837 process.c      	if (setgid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2842 process.c      		if (setregid(-1, gid) < 0) rb_sys_fail(0);
rb_sys_fail      2845 process.c      		    if (setregid(-1, SAVED_GROUP_ID) < 0) rb_sys_fail(0);
rb_sys_fail      2846 process.c      		    if (setregid(SAVED_GROUP_ID, 0) < 0) rb_sys_fail(0);
rb_sys_fail      2848 process.c      		    if (setregid(gid, gid) < 0) rb_sys_fail(0);
rb_sys_fail      2851 process.c      		    if (setregid(0, 0) < 0) rb_sys_fail(0);
rb_sys_fail      2853 process.c      		    if (setregid(gid, gid) < 0) rb_sys_fail(0);
rb_sys_fail      2858 process.c      	    if (setregid(gid, gid) < 0) rb_sys_fail(0);
rb_sys_fail      2864 process.c      		if (setegid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2867 process.c      		    if (setegid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2868 process.c      		    if (setrgid(SAVED_GROUP_ID) < 0) rb_sys_fail(0);
rb_sys_fail      2870 process.c      		    if (setrgid(0) < 0) rb_sys_fail(0);
rb_sys_fail      2872 process.c      		    if (setrgid(0) < 0) rb_sys_fail(0);
rb_sys_fail      2874 process.c      		    if (setegid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2875 process.c      		    if (setrgid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2880 process.c      	    if (setegid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2881 process.c      	    if (setrgid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2891 process.c      		      (SAVED_GROUP_ID == gid)? -1: gid) < 0) rb_sys_fail(0);
rb_sys_fail      2896 process.c      			 (getegid() == gid)? -1: gid) < 0) rb_sys_fail(0);
rb_sys_fail      2898 process.c      	    if (setregid(gid, (getegid() == gid)? -1: gid) < 0) rb_sys_fail(0);
rb_sys_fail      2901 process.c      	    if (setregid(getegid(), gid) < 0) rb_sys_fail(0);
rb_sys_fail      2903 process.c      	    if (setregid(gid, -1) < 0) rb_sys_fail(0);
rb_sys_fail      2905 process.c      	    if (setregid(-1, SAVED_GROUP_ID) < 0) rb_sys_fail(0);
rb_sys_fail      2906 process.c      	    if (setregid(SAVED_GROUP_ID, gid) < 0) rb_sys_fail(0);
rb_sys_fail      2908 process.c      	    if (setregid(gid, -1) < 0) rb_sys_fail(0);
rb_sys_fail      2912 process.c      	    if (getegid() != gid && setegid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2913 process.c      	    if (getgid() != gid && setrgid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2916 process.c      		if (setrgid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2919 process.c      		if (setrgid(SAVED_GROUP_ID) < 0) rb_sys_fail(0);
rb_sys_fail      2921 process.c      		if (setrgid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2924 process.c      	    if (setegid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2925 process.c      	    if (setrgid(SAVED_GROUP_ID) < 0) rb_sys_fail(0);
rb_sys_fail      2927 process.c      	    if (setrgid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2930 process.c      	    rb_sys_fail(0);
rb_sys_fail      2935 process.c      	    if (setgid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2939 process.c      	    rb_sys_fail(0);
rb_sys_fail      2943 process.c      	    if (setegid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2946 process.c      	    rb_sys_fail(0);
rb_sys_fail      2950 process.c      	    if (setgid(gid) < 0) rb_sys_fail(0);
rb_sys_fail      2953 process.c      	    rb_sys_fail(0);
rb_sys_fail      2995 process.c          if (setresuid(-1, NUM2INT(euid), -1) < 0) rb_sys_fail(0);
rb_sys_fail      2997 process.c          if (setreuid(-1, NUM2INT(euid)) < 0) rb_sys_fail(0);
rb_sys_fail      2999 process.c          if (seteuid(NUM2INT(euid)) < 0) rb_sys_fail(0);
rb_sys_fail      3003 process.c      	if (setuid(euid) < 0) rb_sys_fail(0);
rb_sys_fail      3025 process.c      	if (setresuid(-1,euid,euid) < 0) rb_sys_fail(0);
rb_sys_fail      3028 process.c      	if (setresuid(-1,euid,-1) < 0) rb_sys_fail(0);
rb_sys_fail      3031 process.c          if (setreuid(-1, euid) < 0) rb_sys_fail(0);
rb_sys_fail      3033 process.c      	if (setreuid(euid,uid) < 0) rb_sys_fail(0);
rb_sys_fail      3034 process.c      	if (setreuid(uid,euid) < 0) rb_sys_fail(0);
rb_sys_fail      3038 process.c          if (seteuid(euid) < 0) rb_sys_fail(0);
rb_sys_fail      3040 process.c          if (geteuid() == 0) rb_sys_fail(0);
rb_sys_fail      3041 process.c          if (setuid(euid) < 0) rb_sys_fail(0);
rb_sys_fail      3105 process.c          if (setresgid(-1, NUM2INT(egid), -1) < 0) rb_sys_fail(0);
rb_sys_fail      3107 process.c          if (setregid(-1, NUM2INT(egid)) < 0) rb_sys_fail(0);
rb_sys_fail      3109 process.c          if (setegid(NUM2INT(egid)) < 0) rb_sys_fail(0);
rb_sys_fail      3113 process.c      	if (setgid(egid) < 0) rb_sys_fail(0);
rb_sys_fail      3135 process.c      	if (setresgid(-1,egid,egid) < 0) rb_sys_fail(0);
rb_sys_fail      3138 process.c      	if (setresgid(-1,egid,-1) < 0) rb_sys_fail(0);
rb_sys_fail      3141 process.c          if (setregid(-1, egid) < 0) rb_sys_fail(0);
rb_sys_fail      3143 process.c      	if (setregid(egid,gid) < 0) rb_sys_fail(0);
rb_sys_fail      3144 process.c      	if (setregid(gid,egid) < 0) rb_sys_fail(0);
rb_sys_fail      3148 process.c          if (setegid(egid) < 0) rb_sys_fail(0);
rb_sys_fail      3150 process.c          if (geteuid() == 0 /* root user */) rb_sys_fail(0);
rb_sys_fail      3151 process.c          if (setgid(egid) < 0) rb_sys_fail(0);
rb_sys_fail      3225 process.c          if (setresuid(euid, uid, uid) < 0) rb_sys_fail(0);
rb_sys_fail      3228 process.c          if (setreuid(euid,uid) < 0) rb_sys_fail(0);
rb_sys_fail      3282 process.c          if (setresgid(egid, gid, gid) < 0) rb_sys_fail(0);
rb_sys_fail      3285 process.c          if (setregid(egid,gid) < 0) rb_sys_fail(0);
rb_sys_fail      3367 process.c      	rb_sys_fail(0);
rb_sys_fail      3390 process.c      	rb_sys_fail(0);
rb_sys_fail      3476 process.c      	rb_sys_fail(0);
rb_sys_fail      3498 process.c      	rb_sys_fail(0);
rb_sys_fail       559 ruby.h         NORETURN(void rb_sys_fail(const char*));
rb_sys_fail       284 signal.c       		rb_sys_fail(0);
rb_sys_fail       291 signal.c       		rb_sys_fail(0);
rb_sys_fail        98 time.c         	rb_sys_fail("gettimeofday");
rb_sys_fail       633 util.c         	    rb_sys_fail("getcwd");
rb_sys_fail       646 util.c         	rb_sys_fail("getwd");


rb_sys_warning

rb_sys_warning    908 dir.c              ((flags & GLOB_VERBOSE) && rb_protect((VALUE (*)(VALUE))rb_sys_warning, (VALUE)(val), 0))
rb_sys_warning    567 ruby.h         PRINTF_ARGS(void rb_sys_warning(const char*, ...), 1, 2);


rb_sysopen

rb_sysopen       2654 io.c               fptr->fd = rb_sysopen(fptr->path, rb_io_mode_modenum(rb_io_flags_mode(fptr->mode)), 0666);
rb_sysopen       2675 io.c               fptr->fd = rb_sysopen(fptr->path, flags, mode);
rb_sysopen       3142 io.c               fd = rb_sysopen(path, flags, fmode);
rb_sysopen       3414 io.c                   fptr->fd = rb_sysopen(fptr->path, rb_io_mode_modenum(mode), 0666);
rb_sysopen       3433 io.c                   fptr->fd = rb_sysopen(fptr->path, rb_io_mode_modenum(mode), 0666);
rb_sysopen       4117 io.c           		int fr = rb_sysopen(fn, O_RDONLY, 0);
rb_sysopen       4139 io.c           			fr = rb_sysopen(RSTRING(str)->ptr, O_RDONLY, 0);
rb_sysopen       4161 io.c           		    fw = rb_sysopen(fn, O_WRONLY|O_CREAT|O_TRUNC, 0666);


rb_syswait

rb_syswait        418 intern.h       void rb_syswait(int);
rb_syswait       2061 io.c           	rb_syswait(fptr->pid);
rb_syswait       1266 process.c      #define proc_syswait (VALUE (*)(VALUE))rb_syswait
rb_syswait       1272 process.c          rb_syswait((int)pid);
rb_syswait       1377 process.c      		rb_syswait(pid);
rb_syswait       1597 process.c          rb_syswait(status);
rb_syswait        816 win32/win32.c  	rb_syswait(child->pid);


rb_tainted_str_new

rb_tainted_str_new  512 dir.c          	return rb_tainted_str_new(dp->d_name, NAMLEN(dp));
rb_tainted_str_new  550 dir.c          	rb_yield(rb_tainted_str_new(dp->d_name, NAMLEN(dp)));
rb_tainted_str_new  188 ext/dbm/dbm.c  	    return rb_yield(rb_tainted_str_new(key.dptr, key.dsize));
rb_tainted_str_new  191 ext/dbm/dbm.c      return rb_tainted_str_new(value.dptr, value.dsize);
rb_tainted_str_new  234 ext/dbm/dbm.c  	    return rb_tainted_str_new(key.dptr, key.dsize);
rb_tainted_str_new  253 ext/dbm/dbm.c  	assoc = rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize),
rb_tainted_str_new  254 ext/dbm/dbm.c  			     rb_tainted_str_new(val.dptr, val.dsize));
rb_tainted_str_new  312 ext/dbm/dbm.c      valstr = rb_tainted_str_new(value.dptr, value.dsize);
rb_tainted_str_new  340 ext/dbm/dbm.c      keystr = rb_tainted_str_new(key.dptr, key.dsize);
rb_tainted_str_new  341 ext/dbm/dbm.c      valstr = rb_tainted_str_new(val.dptr, val.dsize);
rb_tainted_str_new  365 ext/dbm/dbm.c  	keystr = rb_tainted_str_new(key.dptr, key.dsize);
rb_tainted_str_new  366 ext/dbm/dbm.c  	valstr = rb_tainted_str_new(val.dptr, val.dsize);
rb_tainted_str_new  422 ext/dbm/dbm.c  	keystr = rb_tainted_str_new(key.dptr, key.dsize);
rb_tainted_str_new  423 ext/dbm/dbm.c  	valstr = rb_tainted_str_new(val.dptr, val.dsize);
rb_tainted_str_new  555 ext/dbm/dbm.c  	rb_yield(rb_tainted_str_new(val.dptr, val.dsize));
rb_tainted_str_new  571 ext/dbm/dbm.c  	rb_yield(rb_tainted_str_new(key.dptr, key.dsize));
rb_tainted_str_new  590 ext/dbm/dbm.c  	keystr = rb_tainted_str_new(key.dptr, key.dsize);
rb_tainted_str_new  591 ext/dbm/dbm.c  	valstr = rb_tainted_str_new(val.dptr, val.dsize);
rb_tainted_str_new  612 ext/dbm/dbm.c  	rb_ary_push(ary, rb_tainted_str_new(key.dptr, key.dsize));
rb_tainted_str_new  631 ext/dbm/dbm.c  	rb_ary_push(ary, rb_tainted_str_new(val.dptr, val.dsize));
rb_tainted_str_new  690 ext/dbm/dbm.c  	rb_ary_push(ary, rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize),
rb_tainted_str_new  691 ext/dbm/dbm.c  				      rb_tainted_str_new(val.dptr, val.dsize)));
rb_tainted_str_new  710 ext/dbm/dbm.c  	rb_hash_aset(hash, rb_tainted_str_new(key.dptr, key.dsize),
rb_tainted_str_new  711 ext/dbm/dbm.c  		           rb_tainted_str_new(val.dptr, val.dsize));
rb_tainted_str_new  258 ext/dl/cptr.c      val = rb_tainted_str_new((char*)(data->ptr), len);
rb_tainted_str_new  277 ext/dl/cptr.c      val = rb_tainted_str_new((char*)(data->ptr),data->size);
rb_tainted_str_new  281 ext/dl/cptr.c      val = rb_tainted_str_new((char*)(data->ptr), len);
rb_tainted_str_new  360 ext/dl/cptr.c  	retval = rb_tainted_str_new((char *)RPTR_DATA(self)->ptr + offset, len);
rb_tainted_str_new  166 ext/sdbm/init.c 	    return rb_yield(rb_tainted_str_new(key.dptr, key.dsize));
rb_tainted_str_new  169 ext/sdbm/init.c     return rb_tainted_str_new(value.dptr, value.dsize);
rb_tainted_str_new  212 ext/sdbm/init.c 	    return rb_tainted_str_new(key.dptr, key.dsize);
rb_tainted_str_new  230 ext/sdbm/init.c 	assoc = rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize),
rb_tainted_str_new  231 ext/sdbm/init.c 			     rb_tainted_str_new(val.dptr, val.dsize));
rb_tainted_str_new  290 ext/sdbm/init.c     valstr = rb_tainted_str_new(value.dptr, value.dsize);
rb_tainted_str_new  316 ext/sdbm/init.c     keystr = rb_tainted_str_new(key.dptr, key.dsize);
rb_tainted_str_new  317 ext/sdbm/init.c     valstr = rb_tainted_str_new(val.dptr, val.dsize);
rb_tainted_str_new  343 ext/sdbm/init.c 	keystr = rb_tainted_str_new(key.dptr, key.dsize);
rb_tainted_str_new  344 ext/sdbm/init.c 	valstr = rb_tainted_str_new(val.dptr, val.dsize);
rb_tainted_str_new  400 ext/sdbm/init.c 	keystr = rb_tainted_str_new(key.dptr, key.dsize);
rb_tainted_str_new  401 ext/sdbm/init.c 	valstr = rb_tainted_str_new(val.dptr, val.dsize);
rb_tainted_str_new  538 ext/sdbm/init.c 	rb_yield(rb_tainted_str_new(val.dptr, val.dsize));
rb_tainted_str_new  554 ext/sdbm/init.c 	rb_yield(rb_tainted_str_new(key.dptr, key.dsize));
rb_tainted_str_new  572 ext/sdbm/init.c 	keystr = rb_tainted_str_new(key.dptr, key.dsize);
rb_tainted_str_new  573 ext/sdbm/init.c 	valstr = rb_tainted_str_new(val.dptr, val.dsize);
rb_tainted_str_new  593 ext/sdbm/init.c 	rb_ary_push(ary, rb_tainted_str_new(key.dptr, key.dsize));
rb_tainted_str_new  612 ext/sdbm/init.c 	rb_ary_push(ary, rb_tainted_str_new(val.dptr, val.dsize));
rb_tainted_str_new  671 ext/sdbm/init.c 	rb_ary_push(ary, rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize),
rb_tainted_str_new  672 ext/sdbm/init.c 				      rb_tainted_str_new(val.dptr, val.dsize)));
rb_tainted_str_new  691 ext/sdbm/init.c 	rb_hash_aset(hash, rb_tainted_str_new(key.dptr, key.dsize),
rb_tainted_str_new  692 ext/sdbm/init.c 		           rb_tainted_str_new(val.dptr, val.dsize));
rb_tainted_str_new  584 ext/socket/socket.c     str = rb_tainted_str_new(0, buflen);
rb_tainted_str_new 2593 ext/tk/tcltklib.c         RARRAY(args)->ptr[RARRAY(args)->len++] = rb_tainted_str_new(str, len);
rb_tainted_str_new 6198 ext/tk/tcltklib.c             str = rb_tainted_str_new(s, len);
rb_tainted_str_new 2120 file.c             v = rb_tainted_str_new(buf, rv);
rb_tainted_str_new 1519 hash.c             VALUE str = rb_tainted_str_new(ptr, len);
rb_tainted_str_new  479 intern.h       VALUE rb_tainted_str_new(const char*, long);
rb_tainted_str_new 1404 io.c           	str = rb_tainted_str_new(0, len);
rb_tainted_str_new 1887 pack.c         		    tmp = rb_tainted_str_new(t, len);
rb_tainted_str_new 1044 ruby.c             rb_progname = rb_tainted_str_new(s, i);
rb_tainted_str_new 1047 ruby.c             rb_progname = rb_tainted_str_new(s, i);


rb_tainted_str_new2

rb_tainted_str_new2 1350 array.c            if (recur) return rb_tainted_str_new2("[...]");
rb_tainted_str_new2  781 dir.c          	args.old_path = rb_tainted_str_new2(cwd); free(cwd);
rb_tainted_str_new2  810 dir.c              cwd = rb_tainted_str_new2(path);
rb_tainted_str_new2 1378 dir.c              rb_ary_push(ary, rb_tainted_str_new2(path));
rb_tainted_str_new2  438 ext/curses/curses.c     return rb_tainted_str_new2(rtn);
rb_tainted_str_new2 1169 ext/curses/curses.c     return rb_tainted_str_new2(rtn);
rb_tainted_str_new2  139 ext/dl/cfunc.c     return cfunc->name ? rb_tainted_str_new2(cfunc->name) : Qnil;
rb_tainted_str_new2  219 ext/dl/cfunc.c     val = rb_tainted_str_new2(str);
rb_tainted_str_new2  254 ext/dl/cptr.c      val = rb_tainted_str_new2((char*)(data->ptr));
rb_tainted_str_new2   57 ext/etc/etc.c  	return rb_tainted_str_new2(login);
rb_tainted_str_new2   67 ext/etc/etc.c      return rb_tainted_str_new2(str);
rb_tainted_str_new2   90 ext/readline/readline.c 	result = rb_tainted_str_new2(buff);
rb_tainted_str_new2  177 ext/readline/readline.c     ary = rb_funcall(proc, rb_intern("call"), 1, rb_tainted_str_new2(text));
rb_tainted_str_new2  333 ext/readline/readline.c     return rb_tainted_str_new2(rl_basic_word_break_characters);
rb_tainted_str_new2  375 ext/readline/readline.c     return rb_tainted_str_new2(rl_completer_word_break_characters);
rb_tainted_str_new2  418 ext/readline/readline.c     return rb_tainted_str_new2(rl_basic_quote_characters);
rb_tainted_str_new2  461 ext/readline/readline.c     return rb_tainted_str_new2(rl_completer_quote_characters);
rb_tainted_str_new2  504 ext/readline/readline.c     return rb_tainted_str_new2(rl_filename_quote_characters);
rb_tainted_str_new2  535 ext/readline/readline.c     return rb_tainted_str_new2(entry->line);
rb_tainted_str_new2  604 ext/readline/readline.c         val = rb_tainted_str_new2(entry->line);
rb_tainted_str_new2  652 ext/readline/readline.c 	rb_yield(rb_tainted_str_new2(entry->line));
rb_tainted_str_new2  704 ext/readline/readline.c 	    rb_ary_push(result, rb_tainted_str_new2(matches[i]));
rb_tainted_str_new2  731 ext/readline/readline.c 	    rb_ary_push(result, rb_tainted_str_new2(matches[i]));
rb_tainted_str_new2 2825 ext/socket/socket.c     return rb_tainted_str_new2(sp->s_name);
rb_tainted_str_new2 2596 ext/tk/tcltklib.c         RARRAY(args)->ptr[RARRAY(args)->len++] = rb_tainted_str_new2(argv[i]);
rb_tainted_str_new2 5379 ext/tk/tcltklib.c     return rb_tainted_str_new2(interp->result);
rb_tainted_str_new2 5603 ext/tk/tcltklib.c           return rb_tainted_str_new2("");
rb_tainted_str_new2 5664 ext/tk/tcltklib.c             return rb_tainted_str_new2("");
rb_tainted_str_new2 5680 ext/tk/tcltklib.c         return rb_tainted_str_new2("");
rb_tainted_str_new2 6078 ext/tk/tcltklib.c     rb_ivar_set(str, ID_at_enc, rb_tainted_str_new2("utf-8"));
rb_tainted_str_new2 6199 ext/tk/tcltklib.c             rb_ivar_set(str, ID_at_enc, rb_tainted_str_new2("binary"));
rb_tainted_str_new2 6221 ext/tk/tcltklib.c         return rb_tainted_str_new2("");
rb_tainted_str_new2 6497 ext/tk/tcltklib.c         return rb_tainted_str_new2("");
rb_tainted_str_new2 6532 ext/tk/tcltklib.c                 return rb_tainted_str_new2("");
rb_tainted_str_new2 6673 ext/tk/tcltklib.c             return rb_tainted_str_new2("");
rb_tainted_str_new2 6769 ext/tk/tcltklib.c         return rb_tainted_str_new2("");
rb_tainted_str_new2 6964 ext/tk/tcltklib.c         return rb_tainted_str_new2("");
rb_tainted_str_new2 7022 ext/tk/tcltklib.c             return rb_tainted_str_new2("");
rb_tainted_str_new2 7057 ext/tk/tcltklib.c             return rb_tainted_str_new2("");
rb_tainted_str_new2 7075 ext/tk/tcltklib.c         strval = rb_tainted_str_new2(ret);
rb_tainted_str_new2 7105 ext/tk/tcltklib.c         return rb_tainted_str_new2("");
rb_tainted_str_new2 7156 ext/tk/tcltklib.c             return rb_tainted_str_new2("");
rb_tainted_str_new2 7194 ext/tk/tcltklib.c             return rb_tainted_str_new2("");
rb_tainted_str_new2 7207 ext/tk/tcltklib.c         strval = rb_tainted_str_new2(ret);
rb_tainted_str_new2 7241 ext/tk/tcltklib.c         return rb_tainted_str_new2("");
rb_tainted_str_new2 7313 ext/tk/tcltklib.c         return rb_tainted_str_new2("");
rb_tainted_str_new2 7487 ext/tk/tcltklib.c                 elem = rb_tainted_str_new2(argv[idx]);
rb_tainted_str_new2 1058 ext/tk/tkutil/tkutil.c     if (RSTRING(value)->ptr == (char*)NULL) return rb_tainted_str_new2("");
rb_tainted_str_new2 1070 ext/tk/tkutil/tkutil.c     if (RSTRING(value)->ptr == (char*)NULL) return rb_tainted_str_new2("");
rb_tainted_str_new2  159 file.c             return rb_tainted_str_new2(fptr->path);
rb_tainted_str_new2  480 intern.h       VALUE rb_tainted_str_new2(const char*);
rb_tainted_str_new2 1087 ruby.c             rb_progname = rb_tainted_str_new2(origargv[0]);
rb_tainted_str_new2 1095 ruby.c         	rb_progname = rb_tainted_str_new2(name);
rb_tainted_str_new2 1189 ruby.c         	VALUE arg = rb_tainted_str_new2(argv[i]);


rb_threadUpdateProc

rb_threadUpdateProc 2887 ext/tk/tcltklib.c static void rb_threadUpdateProc _((ClientData));
rb_threadUpdateProc 3005 ext/tk/tcltklib.c     Tcl_DoWhenIdle(rb_threadUpdateProc, (ClientData) param);


rb_threadVwaitProc

rb_threadVwaitProc 3678 ext/tk/tcltklib.c static char *rb_threadVwaitProc _((ClientData, Tcl_Interp *,
rb_threadVwaitProc 3833 ext/tk/tcltklib.c                        rb_threadVwaitProc, (ClientData) param);
rb_threadVwaitProc 3859 ext/tk/tcltklib.c                        rb_threadVwaitProc, (ClientData) param);
rb_threadVwaitProc 4024 ext/tk/tcltklib.c                          rb_threadVwaitProc, (ClientData) param);
rb_threadVwaitProc 4052 ext/tk/tcltklib.c                            rb_threadVwaitProc, (ClientData) param);


rb_threadWaitVisibilityProc

rb_threadWaitVisibilityProc 3714 ext/tk/tcltklib.c static void rb_threadWaitVisibilityProc _((ClientData, XEvent *));
rb_threadWaitVisibilityProc 4094 ext/tk/tcltklib.c                               rb_threadWaitVisibilityProc, (ClientData) param);
rb_threadWaitVisibilityProc 4116 ext/tk/tcltklib.c                                   rb_threadWaitVisibilityProc,


rb_threadWaitWindowProc

rb_threadWaitWindowProc 3731 ext/tk/tcltklib.c static void rb_threadWaitWindowProc _((ClientData, XEvent *));
rb_threadWaitWindowProc 4184 ext/tk/tcltklib.c                               rb_threadWaitWindowProc, (ClientData) param);


rb_thread_alloc

rb_thread_alloc  11870 eval.c             return rb_thread_start_0(fn, (VALUE)arg, rb_thread_alloc(rb_cThread));
rb_thread_alloc  11917 eval.c             rb_thread_t th = rb_thread_alloc(klass);
rb_thread_alloc  11986 eval.c             return rb_thread_start_0(rb_thread_yield, args, rb_thread_alloc(klass));
rb_thread_alloc  12897 eval.c             main_thread = rb_thread_alloc(rb_cThread);


rb_thread_alone

rb_thread_alone  12485 eval.c             if (rb_thread_alone()) return;
rb_thread_alone  1307 ext/tk/tcltklib.c         if (rb_thread_alone()) {
rb_thread_alone  2940 ext/tk/tcltklib.c     if (rb_thread_alone()
rb_thread_alone  3097 ext/tk/tcltklib.c     if (!rb_thread_alone()
rb_thread_alone  3338 ext/tk/tcltklib.c     if (!rb_thread_alone()
rb_thread_alone  3774 ext/tk/tcltklib.c     if (rb_thread_alone() || eventloop_thread == current_thread) {
rb_thread_alone  3909 ext/tk/tcltklib.c     if (rb_thread_alone() || eventloop_thread == current_thread) {
rb_thread_alone  3044 file.c             if (rb_thread_alone() || (op & LOCK_NB)) {
rb_thread_alone   263 intern.h       int rb_thread_alone(void);
rb_thread_alone   432 io.c                   !rb_thread_alone() &&
rb_thread_alone   582 io.c                       !rb_thread_alone() &&
rb_thread_alone   557 process.c          if (!rb_thread_alone()) {	/* there're other threads to run */
rb_thread_alone   579 process.c      	if (rb_thread_alone()) flags = oflags;
rb_thread_alone   610 process.c      	if (!rb_thread_alone()) rb_thread_schedule();


rb_thread_atfork

rb_thread_atfork  282 intern.h       void rb_thread_atfork(void);
rb_thread_atfork 1422 process.c      	rb_thread_atfork();


rb_thread_check

rb_thread_check  10996 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_check  11098 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_check  11153 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_check  11331 eval.c             return INT2NUM(rb_thread_check(thread)->priority);
rb_thread_check  11364 eval.c             th = rb_thread_check(thread);
rb_thread_check  11389 eval.c             th = rb_thread_check(thread);
rb_thread_check  11464 eval.c             return rb_thread_check(thread)->abort?Qtrue:Qfalse;
rb_thread_check  11481 eval.c             rb_thread_check(thread)->abort = RTEST(val);
rb_thread_check  11499 eval.c             VALUE group = rb_thread_check(thread)->thgroup;
rb_thread_check  11957 eval.c             th = rb_thread_check(thread);
rb_thread_check  12004 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_check  12038 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_check  12065 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_check  12087 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_check  12309 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_check  12324 eval.c             th = rb_thread_check(thread);
rb_thread_check  12366 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_check  12417 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_check  12450 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_check  12470 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_check  12612 eval.c             rb_thread_t th = rb_thread_check(cont);
rb_thread_check  12781 eval.c             th = rb_thread_check(thread);


rb_thread_cleanup

rb_thread_cleanup 1342 eval.c         static void rb_thread_cleanup(void);
rb_thread_cleanup 1481 eval.c         	rb_thread_cleanup();
rb_thread_cleanup 11791 eval.c         	    rb_thread_cleanup();


rb_thread_create

rb_thread_create  440 ext/pty/pty.c      thinfo.thread = rb_thread_create(pty_syswait, (void*)&info);
rb_thread_create 1865 ext/tk/tcltklib.c             evloop = rb_thread_create(watchdog_evloop_launcher,
rb_thread_create 2005 ext/tk/tcltklib.c     th = rb_thread_create(_thread_call_proc, (void*)q);
rb_thread_create  271 intern.h       VALUE rb_thread_create(VALUE (*)(ANYARGS), void*);
rb_thread_create  837 process.c          return rb_thread_create(detach_process_watcher, (void*)&pid);


rb_thread_current

rb_thread_current  699 dir.c          	chdir_thread = rb_thread_current();
rb_thread_current  773 dir.c          	if (!rb_block_given_p() || rb_thread_current() != chdir_thread)
rb_thread_current 7983 eval.c             data->orig_thread = rb_thread_current();
rb_thread_current 8097 eval.c             data->orig_thread = rb_thread_current();
rb_thread_current 8193 eval.c             if (data->orig_thread != rb_thread_current()) {
rb_thread_current 12841 eval.c             rb_define_singleton_method(rb_cThread, "current", rb_thread_current, 0);
rb_thread_current 13023 eval.c             VALUE hash = rb_thread_local_aref(rb_thread_current(), recursive_key);
rb_thread_current 13039 eval.c             VALUE hash = rb_thread_local_aref(rb_thread_current(), recursive_key);
rb_thread_current 13045 eval.c         	rb_thread_local_aset(rb_thread_current(), recursive_key, hash);
rb_thread_current 13061 eval.c             VALUE hash = rb_thread_local_aref(rb_thread_current(), recursive_key);
rb_thread_current 13067 eval.c         	VALUE thrname = rb_inspect(rb_thread_current());
rb_thread_current 13074 eval.c         	VALUE thrname = rb_inspect(rb_thread_current());
rb_thread_current   16 ext/dl/cfunc.c     return rb_thread_local_aref(rb_thread_current(), id_last_error);
rb_thread_current   22 ext/dl/cfunc.c     rb_thread_local_aset(rb_thread_current(), id_last_error, val);
rb_thread_current   33 ext/dl/cfunc.c     return rb_thread_local_aref(rb_thread_current(), id_win32_last_error);
rb_thread_current   39 ext/dl/cfunc.c     rb_thread_local_aset(rb_thread_current(), id_win32_last_error, val);
rb_thread_current  225 ext/pty/pty.c      info->thread = rb_thread_current();
rb_thread_current 1158 ext/tk/tcltklib.c     } else if (rb_thread_current() == eventloop_thread) {
rb_thread_current 1687 ext/tk/tcltklib.c     volatile VALUE current_evloop = rb_thread_current();
rb_thread_current 1744 ext/tk/tcltklib.c     eventloop_thread = rb_thread_current();
rb_thread_current 1856 ext/tk/tcltklib.c     watchdog_thread = rb_thread_current();
rb_thread_current 2926 ext/tk/tcltklib.c     volatile VALUE current_thread = rb_thread_current();
rb_thread_current 3099 ext/tk/tcltklib.c 	&& eventloop_thread != rb_thread_current()) {
rb_thread_current 3340 ext/tk/tcltklib.c 	&& eventloop_thread != rb_thread_current()) {
rb_thread_current 3765 ext/tk/tcltklib.c     volatile VALUE current_thread = rb_thread_current();
rb_thread_current 3900 ext/tk/tcltklib.c     volatile VALUE current_thread = rb_thread_current();
rb_thread_current 5409 ext/tk/tcltklib.c     DUMP2("queue_handler thread : %lx", rb_thread_current());
rb_thread_current 5438 ext/tk/tcltklib.c         DUMP2("call function (current thread:%lx)", rb_thread_current());
rb_thread_current 5450 ext/tk/tcltklib.c     DUMP2("               (current thread:%lx)", rb_thread_current());
rb_thread_current 5468 ext/tk/tcltklib.c     volatile VALUE current = rb_thread_current();
rb_thread_current 5767 ext/tk/tcltklib.c     DUMP2("               (current thread:%lx)", rb_thread_current());
rb_thread_current 5784 ext/tk/tcltklib.c     volatile VALUE current = rb_thread_current();
rb_thread_current 6762 ext/tk/tcltklib.c     DUMP2("invoke_real called by thread:%lx", rb_thread_current());
rb_thread_current 6809 ext/tk/tcltklib.c     DUMP2("invoke queue_thread : %lx", rb_thread_current());
rb_thread_current 6831 ext/tk/tcltklib.c         DUMP2("call invoke_real (current thread:%lx)", rb_thread_current());
rb_thread_current 6843 ext/tk/tcltklib.c     DUMP2("               (current thread:%lx)", rb_thread_current());
rb_thread_current 6861 ext/tk/tcltklib.c     volatile VALUE current = rb_thread_current();
rb_thread_current  278 intern.h       VALUE rb_thread_current(void);
rb_thread_current 9200 parse.y        	if (parser->parsing_thread == rb_thread_current())
rb_thread_current 9205 parse.y            parser->parsing_thread = rb_thread_current();


rb_thread_dead

rb_thread_dead   10517 eval.c         	    if (rb_thread_dead(th->join)) {
rb_thread_dead   10702 eval.c         	if (!rb_thread_dead(curr_thread)) {
rb_thread_dead   10915 eval.c             if (!rb_thread_dead(th)) {
rb_thread_dead   10932 eval.c         	if (!rb_thread_dead(th)) return Qfalse;
rb_thread_dead   12040 eval.c             if (rb_thread_dead(th)) {
rb_thread_dead   12067 eval.c             if (rb_thread_dead(th)) return Qfalse;
rb_thread_dead   12089 eval.c             if (rb_thread_dead(th)) return Qtrue;
rb_thread_dead   12185 eval.c             if (!rb_thread_dead(curr_thread)) {
rb_thread_dead   12204 eval.c             if (!rb_thread_dead(curr_thread)) {
rb_thread_dead   12222 eval.c             if (!rb_thread_dead(curr_thread)) {
rb_thread_dead   12247 eval.c             if (!rb_thread_dead(curr_thread)) {
rb_thread_dead   12265 eval.c             if (rb_thread_dead(th)) return Qnil;
rb_thread_dead   12271 eval.c             if (!rb_thread_dead(curr_thread)) {


rb_thread_deadlock

rb_thread_deadlock 10705 eval.c         	rb_thread_deadlock();
rb_thread_deadlock 10914 eval.c             if (rb_thread_critical) rb_thread_deadlock();


rb_thread_die

rb_thread_die    10345 eval.c             rb_thread_die(th);
rb_thread_die    12488 eval.c         	    rb_thread_die(th);


rb_thread_fd_close

rb_thread_fd_close  262 intern.h       void rb_thread_fd_close(int);
rb_thread_fd_close 2058 io.c               rb_thread_fd_close(fd);
rb_thread_fd_close 3336 io.c           	rb_thread_fd_close(fd);


rb_thread_fd_writable

rb_thread_fd_writable  494 ext/socket/socket.c     rb_thread_fd_writable(fd);
rb_thread_fd_writable  261 intern.h       int rb_thread_fd_writable(int);
rb_thread_fd_writable  421 io.c               if (!rb_thread_fd_writable(fptr->fd)) {
rb_thread_fd_writable  520 io.c           	rb_thread_fd_writable(f);
rb_thread_fd_writable  575 io.c           	if (fptr->stdio_file != stderr && !rb_thread_fd_writable(fptr->fd)) {
rb_thread_fd_writable 2286 io.c               if (!rb_thread_fd_writable(fptr->fd)) {


rb_thread_interrupt

rb_thread_interrupt  272 intern.h       void rb_thread_interrupt(void);
rb_thread_interrupt  389 signal.c       	    rb_thread_interrupt();


rb_thread_join

rb_thread_join   11000 eval.c             if (!rb_thread_join(th, delay))
rb_thread_join   12006 eval.c             while (!rb_thread_join(th, DELAY_INFTY));


rb_thread_kill

rb_thread_kill   11186 eval.c             return rb_thread_kill(th);
rb_thread_kill   11203 eval.c             return rb_thread_kill(curr_thread->thread);
rb_thread_kill   12853 eval.c             rb_define_method(rb_cThread, "kill", rb_thread_kill, 0);
rb_thread_kill   12854 eval.c             rb_define_method(rb_cThread, "terminate", rb_thread_kill, 0);
rb_thread_kill   12855 eval.c             rb_define_method(rb_cThread, "exit", rb_thread_kill, 0);
rb_thread_kill    301 ext/pty/pty.c      rb_thread_kill(info->thread);
rb_thread_kill    270 intern.h       VALUE rb_thread_kill(VALUE);


rb_thread_local_aref

rb_thread_local_aref 12360 eval.c             return rb_thread_local_aref(thread, rb_to_id(id));
rb_thread_local_aref 13023 eval.c             VALUE hash = rb_thread_local_aref(rb_thread_current(), recursive_key);
rb_thread_local_aref 13039 eval.c             VALUE hash = rb_thread_local_aref(rb_thread_current(), recursive_key);
rb_thread_local_aref 13061 eval.c             VALUE hash = rb_thread_local_aref(rb_thread_current(), recursive_key);
rb_thread_local_aref   16 ext/dl/cfunc.c     return rb_thread_local_aref(rb_thread_current(), id_last_error);
rb_thread_local_aref   33 ext/dl/cfunc.c     return rb_thread_local_aref(rb_thread_current(), id_win32_last_error);
rb_thread_local_aref  280 intern.h       VALUE rb_thread_local_aref(VALUE, ID);


rb_thread_local_aset

rb_thread_local_aset 12397 eval.c             return rb_thread_local_aset(thread, rb_to_id(id), val);
rb_thread_local_aset 13045 eval.c         	rb_thread_local_aset(rb_thread_current(), recursive_key, hash);
rb_thread_local_aset   22 ext/dl/cfunc.c     rb_thread_local_aset(rb_thread_current(), id_last_error, val);
rb_thread_local_aset   39 ext/dl/cfunc.c     rb_thread_local_aset(rb_thread_current(), id_win32_last_error, val);
rb_thread_local_aset  281 intern.h       VALUE rb_thread_local_aset(VALUE, ID, VALUE);


rb_thread_main

rb_thread_main   12842 eval.c             rb_define_singleton_method(rb_cThread, "main", rb_thread_main, 0);
rb_thread_main    279 intern.h       VALUE rb_thread_main(void);


rb_thread_main_jump

rb_thread_main_jump 10396 eval.c             rb_thread_main_jump(e, RESTORE_RAISE);
rb_thread_main_jump 11802 eval.c         		rb_thread_main_jump(ruby_errinfo, RESTORE_RAISE);
rb_thread_main_jump 11808 eval.c         	    rb_thread_main_jump(ruby_errinfo, RESTORE_EXIT);
rb_thread_main_jump 12252 eval.c             rb_thread_main_jump(rb_class_new_instance(2, args, rb_eSystemExit),


rb_thread_pass

rb_thread_pass   12840 eval.c             rb_define_singleton_method(rb_cThread, "pass", rb_thread_pass, 0);
rb_thread_pass   9155 parse.y        extern VALUE rb_thread_pass(void);


rb_thread_polling

rb_thread_polling 3059 file.c         	    rb_thread_polling();	/* busy wait */
rb_thread_polling  264 intern.h       void rb_thread_polling(void);
rb_thread_polling  571 process.c      	    rb_thread_polling();
rb_thread_polling  578 process.c      	rb_thread_polling();


rb_thread_raise

rb_thread_raise  10076 eval.c         static VALUE rb_thread_raise(int, VALUE*, rb_thread_t);
rb_thread_raise  10368 eval.c         	    rb_thread_raise(1, &exc, th);
rb_thread_raise  12314 eval.c             rb_thread_raise(argc, argv, th);


rb_thread_ready

rb_thread_ready  9825 eval.c         static void rb_thread_ready(rb_thread_t);
rb_thread_ready  9846 eval.c             rb_thread_ready(curr_thread);
rb_thread_ready  10344 eval.c             rb_thread_ready(th);
rb_thread_ready  10700 eval.c         	rb_thread_ready(next);
rb_thread_ready  11102 eval.c             rb_thread_ready(th);
rb_thread_ready  11162 eval.c             rb_thread_ready(th);
rb_thread_ready  12127 eval.c         	    rb_thread_ready(th);
rb_thread_ready  12181 eval.c             rb_thread_ready(main_thread);
rb_thread_ready  12200 eval.c         	rb_thread_ready(curr_thread);
rb_thread_ready  12203 eval.c             rb_thread_ready(main_thread);
rb_thread_ready  12241 eval.c         	rb_thread_ready(curr_thread);
rb_thread_ready  12246 eval.c             rb_thread_ready(main_thread);
rb_thread_ready  12277 eval.c             rb_thread_ready(th);


rb_thread_remove

rb_thread_remove 11773 eval.c             rb_thread_remove(th);
rb_thread_remove 11862 eval.c             rb_thread_remove(th);


rb_thread_restore_context

rb_thread_restore_context 10381 eval.c             rb_thread_restore_context(main_thread, tag);
rb_thread_restore_context 10724 eval.c         	    rb_thread_restore_context(next, RESTORE_FATAL);
rb_thread_restore_context 10727 eval.c             rb_thread_restore_context(next, RESTORE_NORMAL);
rb_thread_restore_context 12191 eval.c             rb_thread_restore_context(curr_thread, RESTORE_INTERRUPT);
rb_thread_restore_context 12211 eval.c             rb_thread_restore_context(curr_thread, RESTORE_SIGNAL);
rb_thread_restore_context 12231 eval.c             rb_thread_restore_context(curr_thread, RESTORE_TRAP);
rb_thread_restore_context 12282 eval.c             rb_thread_restore_context(curr_thread, RESTORE_RAISE);
rb_thread_restore_context 12632 eval.c             rb_thread_restore_context(th, RESTORE_NORMAL);


rb_thread_restore_context_0

rb_thread_restore_context_0 10280 eval.c             rb_thread_restore_context_0(th, exit, &exit);
rb_thread_restore_context_0 10309 eval.c             rb_thread_restore_context_0(th, exit, space);


rb_thread_run

rb_thread_run    12851 eval.c             rb_define_method(rb_cThread, "run", rb_thread_run, 0);
rb_thread_run    1755 ext/tk/tcltklib.c             rb_thread_run(parent_evloop);
rb_thread_run    1870 ext/tk/tcltklib.c             rb_thread_run(evloop);
rb_thread_run    5451 ext/tk/tcltklib.c     rb_thread_run(q->thread);
rb_thread_run    5768 ext/tk/tcltklib.c     rb_thread_run(q->thread);
rb_thread_run    6844 ext/tk/tcltklib.c     rb_thread_run(q->thread);
rb_thread_run     269 intern.h       VALUE rb_thread_run(VALUE);


rb_thread_save_context

rb_thread_save_context 10201 eval.c             (rb_thread_switch((FLUSH_REGISTER_WINDOWS, ruby_setjmp(rb_thread_save_context(th), (th)->context))))
rb_thread_save_context 10703 eval.c         	    rb_thread_save_context(curr_thread);


rb_thread_schedule

rb_thread_schedule 9858 eval.c         	rb_thread_schedule();
rb_thread_schedule 10740 eval.c             rb_thread_schedule();
rb_thread_schedule 10757 eval.c             rb_thread_schedule();
rb_thread_schedule 10811 eval.c             rb_thread_schedule();
rb_thread_schedule 10902 eval.c             rb_thread_schedule();
rb_thread_schedule 10930 eval.c         	rb_thread_schedule();
rb_thread_schedule 11132 eval.c             if (!rb_thread_critical) rb_thread_schedule();
rb_thread_schedule 11164 eval.c             if (!rb_thread_critical) rb_thread_schedule();
rb_thread_schedule 11230 eval.c             rb_thread_schedule();
rb_thread_schedule 11266 eval.c             rb_thread_schedule();
rb_thread_schedule 11281 eval.c         	rb_thread_schedule();
rb_thread_schedule 11314 eval.c             rb_thread_schedule();
rb_thread_schedule 11367 eval.c             rb_thread_schedule();
rb_thread_schedule 11814 eval.c             rb_thread_schedule();
rb_thread_schedule 12111 eval.c         	rb_thread_schedule();
rb_thread_schedule  442 ext/pty/pty.c      rb_thread_schedule();
rb_thread_schedule   48 ext/readline/readline.c     rb_thread_schedule();
rb_thread_schedule 2007 ext/tk/tcltklib.c     rb_thread_schedule();
rb_thread_schedule  736 ext/zlib/zlib.c 	rb_thread_schedule();
rb_thread_schedule  259 intern.h       void rb_thread_schedule(void);
rb_thread_schedule  599 process.c      		rb_thread_schedule();
rb_thread_schedule  610 process.c      	if (!rb_thread_alone()) rb_thread_schedule();
rb_thread_schedule  799 process.c      		rb_thread_schedule();
rb_thread_schedule   99 regint.h       #define THREAD_PASS                  rb_thread_schedule()
rb_thread_schedule   81 rubysig.h      void rb_thread_schedule(void);
rb_thread_schedule   86 rubysig.h              if (rb_thread_pending) rb_thread_schedule();\
rb_thread_schedule   98 rubysig.h                  rb_thread_schedule();\


rb_thread_select

rb_thread_select   84 ext/io/wait/wait.c     return (VALUE)rb_thread_select(rb_fd_max(fds), rb_fd_ptr(fds), NULL, NULL, arg->timeout);
rb_thread_select  128 ext/io/wait/wait.c     i = rb_thread_select(fd + 1, rb_fd_ptr(&arg.fds), NULL, NULL, arg.timeout);
rb_thread_select  933 ext/socket/socket.c 	rb_thread_select(fd+1, 0, rb_fd_ptr(fds_w), rb_fd_ptr(fds_e), 0);
rb_thread_select  276 intern.h       int rb_thread_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
rb_thread_select  463 io.c               return rb_thread_select(rb_fd_max(rfds), rb_fd_ptr(rfds), NULL, NULL, NULL);
rb_thread_select  490 io.c           	rb_thread_select(f + 1, &rfds, NULL, NULL, NULL);
rb_thread_select  506 io.c               return rb_thread_select(rb_fd_max(wfds), NULL, rb_fd_ptr(wfds), NULL, NULL);
rb_thread_select  533 io.c           	rb_thread_select(f + 1, NULL, &wfds, NULL, NULL);
rb_thread_select 4454 io.c               n = rb_thread_select(max, rp, wp, ep, tp);


rb_thread_signal_exit

rb_thread_signal_exit  275 intern.h       void rb_thread_signal_exit(void);
rb_thread_signal_exit  411 signal.c       	rb_thread_signal_exit();


rb_thread_signal_raise

rb_thread_signal_raise  274 intern.h       void rb_thread_signal_raise(const char*); /* should pass literal */
rb_thread_signal_raise  406 signal.c       	    rb_thread_signal_raise(signo2signm(sig));


rb_thread_sleep

rb_thread_sleep   265 intern.h       void rb_thread_sleep(int);
rb_thread_sleep  2934 io.c           	    rb_thread_sleep(1);
rb_thread_sleep   830 process.c      	rb_thread_sleep(1);
rb_thread_sleep  1330 process.c      		rb_thread_sleep(1);
rb_thread_sleep  1334 process.c      		rb_protect((VALUE (*)())rb_thread_sleep, 1, &state);


rb_thread_sleep_forever

rb_thread_sleep_forever 10814 eval.c         void rb_thread_sleep_forever(void);
rb_thread_sleep_forever 10832 eval.c         	    rb_thread_sleep_forever();
rb_thread_sleep_forever  266 intern.h       void rb_thread_sleep_forever(void);
rb_thread_sleep_forever 1651 process.c      	rb_thread_sleep_forever();


rb_thread_start

rb_thread_start  12834 eval.c             rb_define_singleton_method(rb_cThread, "start", rb_thread_start, -2);
rb_thread_start  12835 eval.c             rb_define_singleton_method(rb_cThread, "fork", rb_thread_start, -2);


rb_thread_start_0

rb_thread_start_0 11870 eval.c             return rb_thread_start_0(fn, (VALUE)arg, rb_thread_alloc(rb_cThread));
rb_thread_start_0 11966 eval.c             return rb_thread_start_0(rb_thread_yield, args, th);
rb_thread_start_0 11986 eval.c             return rb_thread_start_0(rb_thread_yield, args, rb_thread_alloc(klass));


rb_thread_start_1

rb_thread_start_1 1429 eval.c         	    rb_thread_start_1();
rb_thread_start_1 1485 eval.c         	rb_thread_start_1();
rb_thread_start_1 1518 eval.c         	rb_thread_start_1();
rb_thread_start_1 5232 eval.c         	rb_thread_start_1();
rb_thread_start_1 6646 eval.c         	rb_thread_start_1();


rb_thread_start_timer

rb_thread_start_timer 11726 eval.c         	rb_thread_start_timer();
rb_thread_start_timer  257 intern.h       void rb_thread_start_timer(void);
rb_thread_start_timer  900 process.c      #define after_exec() rb_thread_start_timer()


rb_thread_stop

rb_thread_stop   12837 eval.c             rb_define_singleton_method(rb_cThread, "stop", rb_thread_stop, 0);
rb_thread_stop   1566 ext/tk/tcltklib.c                     rb_thread_stop();
rb_thread_stop   3009 ext/tk/tcltklib.c         rb_thread_stop();
rb_thread_stop   3850 ext/tk/tcltklib.c         rb_thread_stop();
rb_thread_stop   4043 ext/tk/tcltklib.c             rb_thread_stop();
rb_thread_stop   4106 ext/tk/tcltklib.c             rb_thread_stop();
rb_thread_stop   4195 ext/tk/tcltklib.c             rb_thread_stop();
rb_thread_stop   5536 ext/tk/tcltklib.c         rb_thread_stop();
rb_thread_stop   5851 ext/tk/tcltklib.c         rb_thread_stop();
rb_thread_stop   6928 ext/tk/tcltklib.c         rb_thread_stop();
rb_thread_stop    267 intern.h       VALUE rb_thread_stop(void);


rb_thread_stop_timer

rb_thread_stop_timer  258 intern.h       void rb_thread_stop_timer(void);
rb_thread_stop_timer  899 process.c      #define before_exec() rb_thread_stop_timer()


rb_thread_t

rb_thread_t       976 eval.c         static rb_thread_t curr_thread = 0;
rb_thread_t       977 eval.c         static rb_thread_t main_thread;
rb_thread_t      6780 eval.c         	if ((rb_thread_t)th == curr_thread) return Qtrue;
rb_thread_t      9741 eval.c             rb_thread_t join;
rb_thread_t      9781 eval.c             rb_thread_t join;
rb_thread_t      9825 eval.c         static void rb_thread_ready(rb_thread_t);
rb_thread_t      9926 eval.c         thread_mark(rb_thread_t th)
rb_thread_t      9987 eval.c             rb_thread_t thread;
rb_thread_t      9994 eval.c             rb_gc_mark(((rb_thread_t)value)->thread);
rb_thread_t      10001 eval.c             rb_thread_t th;
rb_thread_t      10032 eval.c             rb_thread_t th;
rb_thread_t      10047 eval.c         thread_free(rb_thread_t th)
rb_thread_t      10066 eval.c         static rb_thread_t
rb_thread_t      10073 eval.c             return (rb_thread_t)RDATA(data)->data;
rb_thread_t      10076 eval.c         static VALUE rb_thread_raise(int, VALUE*, rb_thread_t);
rb_thread_t      10098 eval.c         rb_thread_save_context(rb_thread_t th)
rb_thread_t      10203 eval.c         NORETURN(static void rb_thread_restore_context(rb_thread_t,int));
rb_thread_t      10204 eval.c         NORETURN(NOINLINE(static void rb_thread_restore_context_0(rb_thread_t,int,void*)));
rb_thread_t      10205 eval.c         NORETURN(NOINLINE(static void stack_extend(rb_thread_t, int, VALUE *)));
rb_thread_t      10208 eval.c         rb_thread_restore_context_0(rb_thread_t th, int exit, void *vp)
rb_thread_t      10211 eval.c             static rb_thread_t tmp;
rb_thread_t      10262 eval.c         NORETURN(NOINLINE(static void register_stack_extend(rb_thread_t, int, void *, VALUE *)));
rb_thread_t      10264 eval.c         register_stack_extend(rb_thread_t th, int exit, void *vp, VALUE *curr_bsp)
rb_thread_t      10287 eval.c         stack_extend(rb_thread_t th, int exit, VALUE *addr_in_prev_frame)
rb_thread_t      10314 eval.c         rb_thread_restore_context(rb_thread_t th, int exit)
rb_thread_t      10322 eval.c         rb_thread_ready(rb_thread_t th)
rb_thread_t      10331 eval.c         rb_thread_die(rb_thread_t th)
rb_thread_t      10340 eval.c         rb_thread_remove(rb_thread_t th)
rb_thread_t      10351 eval.c         rb_thread_dead(rb_thread_t th)
rb_thread_t      10359 eval.c             rb_thread_t th;
rb_thread_t      10468 eval.c             rb_thread_t next;		/* OK */
rb_thread_t      10469 eval.c             rb_thread_t th;
rb_thread_t      10470 eval.c             rb_thread_t curr;
rb_thread_t      10910 eval.c         rb_thread_join(rb_thread_t th, double limit)
rb_thread_t      10996 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_t      11061 eval.c             rb_thread_t th;
rb_thread_t      11098 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_t      11153 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_t      11361 eval.c             rb_thread_t th;
rb_thread_t      11387 eval.c             rb_thread_t th;
rb_thread_t      11557 eval.c         static rb_thread_t
rb_thread_t      11560 eval.c             rb_thread_t th;
rb_thread_t      11664 eval.c         NORETURN(static void rb_thread_terminated(rb_thread_t, int, enum thread_status));
rb_thread_t      11665 eval.c         static VALUE rb_thread_yield(VALUE, rb_thread_t);
rb_thread_t      11687 eval.c         thread_insert(rb_thread_t th)
rb_thread_t      11701 eval.c         rb_thread_start_0(VALUE (*fn)(ANYARGS), VALUE arg, rb_thread_t th)
rb_thread_t      11703 eval.c             volatile rb_thread_t th_save = th;
rb_thread_t      11784 eval.c         rb_thread_terminated(rb_thread_t th, int state, enum thread_status status)
rb_thread_t      11827 eval.c             rb_thread_t th = new_thread.thread;
rb_thread_t      11828 eval.c             volatile rb_thread_t th_save = th;
rb_thread_t      11874 eval.c         rb_thread_yield(VALUE arg, rb_thread_t th)
rb_thread_t      11917 eval.c             rb_thread_t th = rb_thread_alloc(klass);
rb_thread_t      11952 eval.c             rb_thread_t th;
rb_thread_t      12004 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_t      12038 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_t      12065 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_t      12087 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_t      12097 eval.c             rb_thread_t th;
rb_thread_t      12118 eval.c             rb_thread_t curr, th;
rb_thread_t      12257 eval.c         rb_thread_raise(int argc, VALUE *argv, rb_thread_t th)
rb_thread_t      12259 eval.c             volatile rb_thread_t th_save = th;
rb_thread_t      12309 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_t      12321 eval.c             rb_thread_t th;
rb_thread_t      12366 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_t      12417 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_t      12450 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_t      12470 eval.c             rb_thread_t th = rb_thread_check(thread);
rb_thread_t      12483 eval.c             rb_thread_t th;
rb_thread_t      12565 eval.c             rb_thread_t th;
rb_thread_t      12566 eval.c             volatile rb_thread_t th_save;
rb_thread_t      12612 eval.c             rb_thread_t th = rb_thread_check(cont);
rb_thread_t      12682 eval.c             rb_thread_t th;
rb_thread_t      12777 eval.c             rb_thread_t th;


rb_thread_terminated

rb_thread_terminated 11779 eval.c             rb_thread_terminated(th, state, status);
rb_thread_terminated 11863 eval.c             rb_thread_terminated(th, state, status);


rb_thread_trap_eval

rb_thread_trap_eval  273 intern.h       void rb_thread_trap_eval(VALUE, int, int);
rb_thread_trap_eval  414 signal.c       	rb_thread_trap_eval(trap_list[sig].cmd, sig, trap_list[sig].safe);


rb_thread_wait_fd

rb_thread_wait_fd  636 ext/openssl/ossl_ssl.c 	    rb_thread_wait_fd(fptr->fd);
rb_thread_wait_fd  587 ext/socket/socket.c     rb_thread_wait_fd(fd);
rb_thread_wait_fd 1397 ext/socket/socket.c     rb_thread_wait_fd(fd);
rb_thread_wait_fd  260 intern.h       void rb_thread_wait_fd(int);
rb_thread_wait_fd  164 io.c           	rb_thread_wait_fd((fptr)->fd);\
rb_thread_wait_fd  346 io.c           	rb_thread_wait_fd(fileno(fp));
rb_thread_wait_fd  354 io.c           	rb_thread_wait_fd(fptr->fd);
rb_thread_wait_fd  477 io.c           	rb_thread_wait_fd(f);
rb_thread_wait_fd 1152 io.c           	rb_thread_wait_fd(fptr->fd);
rb_thread_wait_fd 1473 io.c           	rb_thread_wait_fd(fptr->fd);
rb_thread_wait_fd 1512 io.c           	rb_thread_wait_fd(fptr->fd);
rb_thread_wait_fd 1897 io.c           	rb_thread_wait_fd(fileno(f));
rb_thread_wait_fd 2342 io.c               rb_thread_wait_fd(fptr->fd);


rb_thread_wait_for

rb_thread_wait_for 10835 eval.c         	rb_thread_wait_for(*timeout);
rb_thread_wait_for 11294 eval.c             rb_thread_wait_for(rb_time_timeval(INT2FIX(sec)));
rb_thread_wait_for 1098 ext/socket/socket.c 			rb_thread_wait_for(tv);
rb_thread_wait_for 1261 ext/tk/tcltklib.c     rb_thread_wait_for(t);
rb_thread_wait_for 1879 ext/tk/tcltklib.c                 rb_thread_wait_for(t0);
rb_thread_wait_for 1881 ext/tk/tcltklib.c                 rb_thread_wait_for(t1);
rb_thread_wait_for  277 intern.h       void rb_thread_wait_for(struct timeval);
rb_thread_wait_for 1654 process.c      	rb_thread_wait_for(rb_time_interval(argv[0]));


rb_thread_wait_other_threads

rb_thread_wait_other_threads 1343 eval.c         static void rb_thread_wait_other_threads(void);
rb_thread_wait_other_threads 1482 eval.c         	rb_thread_wait_other_threads();


rb_thread_wakeup

rb_thread_wakeup 11131 eval.c             rb_thread_wakeup(thread);
rb_thread_wakeup 12852 eval.c             rb_define_method(rb_cThread, "wakeup", rb_thread_wakeup, 0);
rb_thread_wakeup 1718 ext/tk/tcltklib.c             rb_thread_wakeup(eventloop_thread);
rb_thread_wakeup 2896 ext/tk/tcltklib.c     rb_thread_wakeup(param->thread);
rb_thread_wakeup 3706 ext/tk/tcltklib.c     rb_thread_wakeup(param->thread);
rb_thread_wakeup 3728 ext/tk/tcltklib.c     rb_thread_wakeup(param->thread);
rb_thread_wakeup 3742 ext/tk/tcltklib.c     rb_thread_wakeup(param->thread);
rb_thread_wakeup  268 intern.h       VALUE rb_thread_wakeup(VALUE);


rb_thread_yield

rb_thread_yield  11665 eval.c         static VALUE rb_thread_yield(VALUE, rb_thread_t);
rb_thread_yield  11735 eval.c             if (fn == rb_thread_yield && curr_thread->anchor) {
rb_thread_yield  11821 eval.c             return rb_thread_yield(arg, curr_thread);
rb_thread_yield  11966 eval.c             return rb_thread_start_0(rb_thread_yield, args, th);
rb_thread_yield  11986 eval.c             return rb_thread_start_0(rb_thread_yield, args, rb_thread_alloc(klass));


rb_time_interval

rb_time_interval   41 ext/io/wait/wait.c EXTERN struct timeval rb_time_interval _((VALUE time));
rb_time_interval  115 ext/io/wait/wait.c 	timerec = rb_time_interval(timeout);
rb_time_interval  127 io.c           struct timeval rb_time_interval(VALUE);
rb_time_interval 4553 io.c           	timerec = rb_time_interval(timeout);
rb_time_interval   43 process.c      struct timeval rb_time_interval(VALUE);
rb_time_interval 1654 process.c      	rb_thread_wait_for(rb_time_interval(argv[0]));


rb_time_new

rb_time_new      2461 ext/zlib/zlib.c     return rb_time_new(get_gzfile(obj)->mtime, (time_t)0);
rb_time_new        44 file.c         VALUE rb_time_new(time_t, time_t);
rb_time_new       512 file.c             return rb_time_new(get_stat(self)->st_atime, 0);
rb_time_new       528 file.c             return rb_time_new(get_stat(self)->st_mtime, 0);
rb_time_new       546 file.c             return rb_time_new(get_stat(self)->st_ctime, 0);
rb_time_new      1565 file.c             return rb_time_new(st.st_atime, 0);
rb_time_new      1589 file.c             return rb_time_new(st.st_atime, 0);
rb_time_new      1609 file.c             return rb_time_new(st.st_mtime, 0);
rb_time_new      1632 file.c             return rb_time_new(st.st_mtime, 0);
rb_time_new      1654 file.c             return rb_time_new(st.st_ctime, 0);
rb_time_new      1678 file.c             return rb_time_new(st.st_ctime, 0);
rb_time_new      3312 file.c         	    return rb_time_new(st.st_atime, 0);
rb_time_new      3314 file.c         	    return rb_time_new(st.st_mtime, 0);
rb_time_new      3316 file.c         	    return rb_time_new(st.st_ctime, 0);
rb_time_new       524 intern.h       VALUE rb_time_new(time_t, time_t);
rb_time_new      1246 time.c             result = rb_time_new(sec, usec);
rb_time_new      1325 time.c             return rb_time_new(tobj->tv.tv_sec + 1, tobj->tv.tv_usec);


rb_time_timeval

rb_time_timeval  11272 eval.c         struct timeval rb_time_timeval(VALUE time);
rb_time_timeval  11294 eval.c             rb_thread_wait_for(rb_time_timeval(INT2FIX(sec)));
rb_time_timeval    69 ext/openssl/ossl_asn1.c extern struct timeval rb_time_timeval(VALUE);
rb_time_timeval  1937 file.c         struct timeval rb_time_timeval(VALUE time);
rb_time_timeval  1967 file.c             tvp[0] = rb_time_timeval(atime);
rb_time_timeval  1968 file.c             tvp[1] = rb_time_timeval(mtime);
rb_time_timeval  2001 file.c             tv = rb_time_timeval(atime);
rb_time_timeval  2003 file.c             tv = rb_time_timeval(mtime);
rb_time_timeval   250 time.c         	tv = rb_time_timeval(time);


rb_to_id

rb_to_id          565 eval.c         	remove_method(mod, rb_to_id(argv[i]));
rb_to_id         2004 eval.c         	rb_undef(mod, rb_to_id(argv[i]));
rb_to_id         2082 eval.c             rb_alias(mod, rb_to_id(newname), rb_to_id(oldname));
rb_to_id         3806 eval.c         	rb_undef(ruby_class, rb_to_id(rb_eval(self, node->u2.node)));
rb_to_id         3814 eval.c         	rb_alias(ruby_class, rb_to_id(rb_eval(self, node->u1.node)),
rb_to_id         3815 eval.c         		             rb_to_id(rb_eval(self, node->u2.node)));
rb_to_id         4050 eval.c             id = rb_to_id(mid);
rb_to_id         4086 eval.c             return rb_method_boundp(mod, rb_to_id(mid), 1);
rb_to_id         4120 eval.c             ID id = rb_to_id(mid);
rb_to_id         4159 eval.c             ID id = rb_to_id(mid);
rb_to_id         4198 eval.c             ID id = rb_to_id(mid);
rb_to_id         5840 eval.c             vid = rb_call(CLASS_OF(recv), recv, rb_to_id(vid), argc, argv, scope);
rb_to_id         7004 eval.c         	rb_export_method(self, rb_to_id(argv[i]), ex);
rb_to_id         7203 eval.c         	id = rb_to_id(argv[i]);
rb_to_id         7722 eval.c             ID id = rb_to_id(sym);
rb_to_id         7745 eval.c             return rb_autoload_p(mod, rb_to_id(sym));
rb_to_id         8810 eval.c             return mnew(CLASS_OF(obj), obj, rb_to_id(vid), rb_cMethod);
rb_to_id         8848 eval.c             return mnew(mod, Qundef, rb_to_id(vid), rb_cUnboundMethod);
rb_to_id         9303 eval.c         	id = rb_to_id(argv[0]);
rb_to_id         9307 eval.c         	id = rb_to_id(argv[0]);
rb_to_id         12360 eval.c             return rb_thread_local_aref(thread, rb_to_id(id));
rb_to_id         12397 eval.c             return rb_thread_local_aset(thread, rb_to_id(id), val);
rb_to_id         12420 eval.c             if (st_lookup(th->locals, rb_to_id(id), 0))
rb_to_id         12939 eval.c             tag = ID2SYM(rb_to_id(tag));
rb_to_id         12985 eval.c             tag = ID2SYM(rb_to_id(tag));
rb_to_id         1065 ext/syck/rubyext.c         VALUE tpart = rb_to_id( rb_ary_entry( tparts, i ) );
rb_to_id         2868 ext/win32ole/win32ole.c     id = rb_to_id(argv[0]);
rb_to_id          187 numeric.c      	     rb_id2name(rb_to_id(name)),
rb_to_id         1562 object.c           rb_attr(klass, rb_to_id(name), 1, RTEST(pub), Qtrue);
rb_to_id         1581 object.c       	rb_attr(klass, rb_to_id(argv[i]), 1, 0, Qtrue);
rb_to_id         1600 object.c       	rb_attr(klass, rb_to_id(argv[i]), 0, 1, Qtrue);
rb_to_id         1624 object.c       	rb_attr(klass, rb_to_id(argv[i]), 1, 1, Qtrue);
rb_to_id         1641 object.c           ID id = rb_to_id(name);
rb_to_id         1664 object.c           ID id = rb_to_id(name);
rb_to_id         1686 object.c           ID id = rb_to_id(name);
rb_to_id         1820 object.c           ID id = rb_to_id(iv);
rb_to_id         1852 object.c           ID id = rb_to_id(iv);
rb_to_id         1877 object.c           ID id = rb_to_id(iv);
rb_to_id         1906 object.c           ID id = rb_to_id(iv);
rb_to_id          531 ruby.h         ID rb_to_id(VALUE);
rb_to_id          282 struct.c       	id = rb_to_id(RARRAY(rest)->ptr[i]);
rb_to_id          289 struct.c       	    id = rb_to_id(name);
rb_to_id          560 struct.c       	return rb_struct_aref_id(s, rb_to_id(idx));
rb_to_id          623 struct.c       	return rb_struct_aset_id(s, rb_to_id(idx), val);
rb_to_id          530 variable.c         entry = rb_global_entry(rb_to_id(var));
rb_to_id          585 variable.c         id = rb_to_id(var);
rb_to_id         1067 variable.c         ID id = rb_to_id(name);
rb_to_id         1148 variable.c         uninitialized_constant(klass, rb_to_id(name));
rb_to_id         1339 variable.c         ID id = rb_to_id(name);
rb_to_id         1661 variable.c         ID id = rb_to_id(name);


rb_to_int

rb_to_int         183 bignum.c           val = rb_to_int(val);
rb_to_int         256 bignum.c           val = rb_to_int(val);
rb_to_int        1586 bignum.c           y = rb_to_int(yy);
rb_to_int        1641 bignum.c           y = rb_to_int(yy);
rb_to_int        1699 bignum.c           y = rb_to_int(yy);
rb_to_int         382 intern.h       VALUE rb_to_int(VALUE);
rb_to_int        1483 numeric.c      	val = rb_to_int(val);
rb_to_int        1638 numeric.c      	  val = rb_to_int(val);
rb_to_int         338 pack.c             x = rb_to_int(x); /* is nil OK? (should not) */
rb_to_int         872 pack.c         		from = rb_to_int(from);
rb_to_int         202 random.c           seed = rb_to_int(vseed);


rb_to_integer

rb_to_integer    1995 object.c           return rb_to_integer(val, "to_int");
rb_to_integer    2023 object.c       	return rb_to_integer(val, "to_i");


rb_trap_eval

rb_trap_eval     10174 eval.c         	rb_trap_eval(th_cmd, th_sig, th_safe);
rb_trap_eval     12219 eval.c         	rb_trap_eval(cmd, sig, safe);


rb_trap_exec

rb_trap_exec     10582 eval.c         		rb_protect((VALUE (*)(VALUE))rb_trap_exec, Qnil, &status);
rb_trap_exec     1400 ext/tk/tcltklib.c                     rb_trap_exec();
rb_trap_exec     1412 ext/tk/tcltklib.c                         rb_trap_exec();
rb_trap_exec     1502 ext/tk/tcltklib.c                             rb_trap_exec();
rb_trap_exec     1580 ext/tk/tcltklib.c                         rb_trap_exec();
rb_trap_exec     1592 ext/tk/tcltklib.c                             rb_trap_exec();
rb_trap_exec      466 intern.h       void rb_trap_exec(void);
rb_trap_exec     1021 regexec.c        rb_trap_exec();
rb_trap_exec      103 regint.h             rb_trap_exec();\
rb_trap_exec       87 rubysig.h      	if (rb_trap_pending) rb_trap_exec();\
rb_trap_exec      101 rubysig.h         if (rb_trap_pending) rb_trap_exec();\


rb_trap_exit

rb_trap_exit     1445 eval.c         	rb_trap_exit();
rb_trap_exit      465 intern.h       void rb_trap_exit(void);


rb_trap_restore_mask

rb_trap_restore_mask 4389 eval.c             rb_trap_restore_mask();
rb_trap_restore_mask 13003 eval.c             rb_trap_restore_mask();
rb_trap_restore_mask   78 rubysig.h      void rb_trap_restore_mask(void);


rb_uint2big

rb_uint2big       155 bignum.c           big = rb_uint2big(n);
rb_uint2big       166 bignum.c           return rb_uint2big(n);
rb_uint2big       427 bignum.c       	    VALUE big = rb_uint2big(val);
rb_uint2big      1245 bignum.c       	    *modp = rb_uint2big((unsigned long)t2);
rb_uint2big        75 intern.h       VALUE rb_uint2big(unsigned long);
rb_uint2big       950 pack.c         		    VALUE big128 = rb_uint2big(128);
rb_uint2big      1951 pack.c         			VALUE big = rb_uint2big(ul);
rb_uint2big      1952 pack.c         			VALUE big128 = rb_uint2big(128);
rb_uint2big      1955 pack.c         			    big = rb_big_plus(big, rb_uint2big(*s & 0x7f));


rb_uint2inum

rb_uint2inum      289 ext/zlib/zlib.c     return rb_uint2inum(sum);
rb_uint2inum      343 ext/zlib/zlib.c 	rb_ary_push(dst, rb_uint2inum(crctbl[i]));
rb_uint2inum     1006 ext/zlib/zlib.c     return rb_uint2inum(z->stream.avail_out);
rb_uint2inum     1045 ext/zlib/zlib.c     return rb_uint2inum(get_zstream(obj)->stream.total_in);
rb_uint2inum     1055 ext/zlib/zlib.c     return rb_uint2inum(get_zstream(obj)->stream.total_out);
rb_uint2inum     1077 ext/zlib/zlib.c 	return rb_uint2inum(get_zstream(obj)->stream.adler);
rb_uint2inum     2451 ext/zlib/zlib.c     return rb_uint2inum(get_gzfile(obj)->crc);
rb_uint2inum     2703 ext/zlib/zlib.c     return rb_uint2inum(get_gzfile(obj)->z.stream.total_in);
rb_uint2inum     2714 ext/zlib/zlib.c     return rb_uint2inum(gz->z.stream.total_out - gz->z.buf_filled);
rb_uint2inum       77 intern.h       VALUE rb_uint2inum(unsigned long);
rb_uint2inum      156 ruby.h         VALUE rb_uint2inum(unsigned long);
rb_uint2inum      157 ruby.h         #define UINT2NUM(v) rb_uint2inum(v)
rb_uint2inum      159 ruby.h         #define rb_uint_new(v) rb_uint2inum(v)


rb_ull2big

rb_ull2big        551 bignum.c           big = rb_ull2big(n);
rb_ull2big        562 bignum.c           return rb_ull2big(n);


rb_ull2inum

rb_ull2inum        90 intern.h       VALUE rb_ull2inum(unsigned LONG_LONG);
rb_ull2inum       164 ruby.h         VALUE rb_ull2inum(unsigned LONG_LONG);
rb_ull2inum       165 ruby.h         #define ULL2NUM(v) rb_ull2inum(v)


rb_undef

rb_undef         2004 eval.c         	rb_undef(mod, rb_to_id(argv[i]));
rb_undef         3806 eval.c         	rb_undef(ruby_class, rb_to_id(rb_eval(self, node->u2.node)));
rb_undef          134 intern.h       void rb_undef(VALUE, ID);


rb_undef_alloc_func

rb_undef_alloc_func 9394 eval.c             rb_undef_alloc_func(rb_cProc);
rb_undef_alloc_func 9413 eval.c             rb_undef_alloc_func(rb_cMethod);
rb_undef_alloc_func 9429 eval.c             rb_undef_alloc_func(rb_cUnboundMethod);
rb_undef_alloc_func 9481 eval.c             rb_undef_alloc_func(rb_cBinding);
rb_undef_alloc_func 12830 eval.c             rb_undef_alloc_func(rb_cThread);
rb_undef_alloc_func 12879 eval.c             rb_undef_alloc_func(rb_cCont);
rb_undef_alloc_func 3439 ext/zlib/zlib.c     rb_undef_alloc_func(cZStream);
rb_undef_alloc_func 3522 ext/zlib/zlib.c     rb_undef_alloc_func(cGzipFile);
rb_undef_alloc_func  209 intern.h       void rb_undef_alloc_func(VALUE);
rb_undef_alloc_func 2839 numeric.c          rb_undef_alloc_func(rb_cInteger);
rb_undef_alloc_func 2903 numeric.c          rb_undef_alloc_func(rb_cFloat);
rb_undef_alloc_func 2454 object.c           rb_undef_alloc_func(rb_cNilClass);
rb_undef_alloc_func 2460 object.c           rb_undef_alloc_func(rb_cSymbol);
rb_undef_alloc_func 2525 object.c           rb_undef_alloc_func(rb_cData);
rb_undef_alloc_func 2536 object.c           rb_undef_alloc_func(rb_cTrueClass);
rb_undef_alloc_func 2545 object.c           rb_undef_alloc_func(rb_cFalseClass);
rb_undef_alloc_func  829 struct.c           rb_undef_alloc_func(rb_cStruct);


rb_undef_method

rb_undef_method  7680 eval.c             rb_undef_method(rb_cClass, "module_function");
rb_undef_method  9414 eval.c             rb_undef_method(CLASS_OF(rb_cMethod), "new");
rb_undef_method  9430 eval.c             rb_undef_method(CLASS_OF(rb_cUnboundMethod), "new");
rb_undef_method  9482 eval.c             rb_undef_method(CLASS_OF(rb_cBinding), "new");
rb_undef_method  12880 eval.c             rb_undef_method(CLASS_OF(rb_cCont), "new");
rb_undef_method  1452 ext/curses/curses.c     rb_undef_method(CLASS_OF(cMouseEvent),"new");
rb_undef_method   355 ext/openssl/ossl_engine.c     rb_undef_method(CLASS_OF(cEngine), "new");
rb_undef_method  3148 ext/socket/socket.c     rb_undef_method(rb_cBasicSocket, "initialize");
rb_undef_method  2840 numeric.c          rb_undef_method(CLASS_OF(rb_cInteger), "new");
rb_undef_method  2904 numeric.c          rb_undef_method(CLASS_OF(rb_cFloat), "new");
rb_undef_method  2455 object.c           rb_undef_method(CLASS_OF(rb_cNilClass), "new");
rb_undef_method  2461 object.c           rb_undef_method(CLASS_OF(rb_cSymbol), "new");
rb_undef_method  2521 object.c           rb_undef_method(rb_cClass, "extend_object");
rb_undef_method  2522 object.c           rb_undef_method(rb_cClass, "append_features");
rb_undef_method  2537 object.c           rb_undef_method(CLASS_OF(rb_cTrueClass), "new");
rb_undef_method  2546 object.c           rb_undef_method(CLASS_OF(rb_cFalseClass), "new");
rb_undef_method  3602 process.c          rb_undef_method(CLASS_OF(rb_cProcStatus), "new");
rb_undef_method  2261 re.c               rb_undef_method(CLASS_OF(rb_cMatch), "new");
rb_undef_method   521 ruby.h         void rb_undef_method(VALUE,const char*);


rb_values_from_ary

rb_values_from_ary 2646 eval.c             return rb_values_from_ary(rb_Array(v));
rb_values_from_ary   41 intern.h       VALUE rb_values_from_ary(VALUE);


rb_values_new

rb_values_new     252 array.c            return rb_values_new(2, car, cdr);
rb_values_new      30 enumerator.c   	args = rb_values_new(1, args);
rb_values_new    2622 eval.c         	return rb_values_new(1, v);
rb_values_new    2626 eval.c         	return rb_values_new(1, v);
rb_values_new      39 intern.h       VALUE rb_values_new(long,...);


rb_values_new2

rb_values_new2   2619 eval.c             if (v == Qundef) return rb_values_new2(0, 0);
rb_values_new2   3644 eval.c         	    val = rb_values_new2(i, 0);
rb_values_new2   4915 eval.c             val = rb_values_new2(n, 0);
rb_values_new2   6473 eval.c             return yield_under(klass, self, rb_values_new2(argc, argv));
rb_values_new2   6529 eval.c             return yield_under(mod, mod, rb_values_new2(argc, argv));
rb_values_new2     40 intern.h       VALUE rb_values_new2(long, const VALUE *);


rb_vsprintf

rb_vsprintf       471 intern.h       VALUE rb_vsprintf(const char*, va_list);
rb_vsprintf      9031 parse.y            str = rb_vsprintf(fmt, args);
rb_vsprintf       898 sprintf.c          result = rb_vsprintf(format, ap);


rb_w32_Sleep

rb_w32_Sleep     3549 win32/win32.c      return rb_w32_Sleep(msec);
rb_w32_Sleep      112 win32/win32.h  #define sleep(x)		rb_w32_Sleep((x)*1000)
rb_w32_Sleep      113 win32/win32.h  #define Sleep(msec)		(void)rb_w32_Sleep(msec)
rb_w32_Sleep      494 win32/win32.h  int  WINAPI rb_w32_Sleep(unsigned long msec);


rb_w32_accept

rb_w32_accept     165 win32/win32.h  extern int    WSAAPI rb_w32_accept(int, struct sockaddr *, int *);
rb_w32_accept     387 win32/win32.h  #define accept(s, a, l)		rb_w32_accept(s, a, l)


rb_w32_argv_size

rb_w32_argv_size 2920 io.c           	cmd = ALLOCA_N(char, rb_w32_argv_size(args));
rb_w32_argv_size  833 win32/win32.c      int len = rb_w32_argv_size(argv);
rb_w32_argv_size  207 win32/win32.h  extern int rb_w32_argv_size(char *const *);


rb_w32_aspawn

rb_w32_aspawn    1065 process.c      #define proc_spawn_v(argv, prog) rb_w32_aspawn(P_NOWAIT, prog, argv)
rb_w32_aspawn     136 win32/win32.h  #define execv(path,argv)	rb_w32_aspawn(P_OVERLAY,path,argv)
rb_w32_aspawn     210 win32/win32.h  extern int rb_w32_aspawn(int, const char *, char *const *);


rb_w32_asynchronize

rb_w32_asynchronize  334 win32/win32.c      return rb_w32_asynchronize(locker,
rb_w32_asynchronize  504 win32/win32.h  DWORD rb_w32_asynchronize(asynchronous_func_t func, DWORD self, int argc, DWORD* argv, DWORD intrval);


rb_w32_bind

rb_w32_bind       166 win32/win32.h  extern int    WSAAPI rb_w32_bind(int, const struct sockaddr *, int);
rb_w32_bind       390 win32/win32.h  #define bind(s, a, l)		rb_w32_bind(s, a, l)


rb_w32_close

rb_w32_close      109 win32/win32.h  #define close(h)		rb_w32_close(h)
rb_w32_close      491 win32/win32.h  int  rb_w32_close(int);


rb_w32_closedir

rb_w32_closedir    35 win32/dir.h    void           rb_w32_closedir(DIR *);
rb_w32_closedir    42 win32/dir.h    #define closedir  rb_w32_closedir


rb_w32_cmdvector

rb_w32_cmdvector  413 win32/win32.c      *argc = rb_w32_cmdvector(GetCommandLine(), argv);
rb_w32_cmdvector  161 win32/win32.h  extern int    rb_w32_cmdvector(const char *, char ***);


rb_w32_connect

rb_w32_connect    167 win32/win32.h  extern int    WSAAPI rb_w32_connect(int, const struct sockaddr *, int);
rb_w32_connect    393 win32/win32.h  #define connect(s, a, l)	rb_w32_connect(s, a, l)


rb_w32_enter_critical

rb_w32_enter_critical   36 rubysig.h          rb_w32_enter_critical();\
rb_w32_enter_critical  487 win32/win32.h  void rb_w32_enter_critical(void);


rb_w32_fclose

rb_w32_fclose     110 win32/win32.h  #define fclose(f)		rb_w32_fclose(f)
rb_w32_fclose     492 win32/win32.h  int  rb_w32_fclose(FILE*);


rb_w32_fdclr

rb_w32_fdclr      169 win32/win32.h  extern void   rb_w32_fdclr(int, fd_set*);
rb_w32_fdclr      380 win32/win32.h  #define FD_CLR(f, s)		rb_w32_fdclr(f, s)


rb_w32_fdisset

rb_w32_fdisset    170 win32/win32.h  extern int    rb_w32_fdisset(int, fd_set*);
rb_w32_fdisset    383 win32/win32.h  #define FD_ISSET(f, s)		rb_w32_fdisset(f, s)


rb_w32_fdopen

rb_w32_fdopen     128 win32/win32.h  #define fdopen(h, m)		rb_w32_fdopen(h, m)
rb_w32_fdopen     225 win32/win32.h  extern FILE *rb_w32_fdopen(int, const char *);


rb_w32_fdset

rb_w32_fdset      168 win32/win32.h  extern void   rb_w32_fdset(int, fd_set*);
rb_w32_fdset      377 win32/win32.h  #define FD_SET(f, s)		rb_w32_fdset(f, s)


rb_w32_fopen

rb_w32_fopen      126 win32/win32.h  #define fopen(p, m)		rb_w32_fopen(p, m)
rb_w32_fopen      224 win32/win32.h  extern FILE *rb_w32_fopen(const char *, const char *);


rb_w32_free_environ

rb_w32_free_environ 1501 hash.c         #define FREE_ENVIRON(e) rb_w32_free_environ(e)
rb_w32_free_environ  196 win32/win32.h  extern void   rb_w32_free_environ(char **);


rb_w32_fsopen

rb_w32_fsopen     130 win32/win32.h  #define fsopen(p, m, sh)	rb_w32_fsopen(p, m, sh)
rb_w32_fsopen     226 win32/win32.h  extern FILE *rb_w32_fsopen(const char *, const char *, int);


rb_w32_fstat

rb_w32_fstat      124 win32/win32.h  #define fstat(fd,st)		rb_w32_fstat(fd,st)
rb_w32_fstat      223 win32/win32.h  extern int rb_w32_fstat(int, struct stat *);


rb_w32_get_environ

rb_w32_get_environ 1500 hash.c         #define GET_ENVIRON(e) (e = rb_w32_get_environ())
rb_w32_get_environ  195 win32/win32.h  extern char **rb_w32_get_environ(void);


rb_w32_get_osfhandle

rb_w32_get_osfhandle  651 file.c         	f = (HANDLE)rb_w32_get_osfhandle(fptr->fd);
rb_w32_get_osfhandle  184 win32/win32.h  extern SOCKET rb_w32_get_osfhandle(int);
rb_w32_get_osfhandle  459 win32/win32.h  #define get_osfhandle(h)	rb_w32_get_osfhandle(h)


rb_w32_getc

rb_w32_getc        97 win32/win32.h  #define getc(_stream)		rb_w32_getc(_stream)
rb_w32_getc        98 win32/win32.h  #define getchar()		rb_w32_getc(stdin)
rb_w32_getc       490 win32/win32.h  int  rb_w32_getc(FILE*);


rb_w32_getenv

rb_w32_getenv     193 win32/win32.h  extern char * rb_w32_getenv(const char *);
rb_w32_getenv     465 win32/win32.h  #define getenv(n)		rb_w32_getenv(n)
rb_w32_getenv       8 wince/stdlib.c extern char * rb_w32_getenv(const char *);
rb_w32_getenv      13 wince/stdlib.c 	return rb_w32_getenv(env);


rb_w32_gethostbyaddr

rb_w32_gethostbyaddr  185 win32/win32.h  extern struct hostent *WSAAPI rb_w32_gethostbyaddr(const char *, int, int);
rb_w32_gethostbyaddr  435 win32/win32.h  #define gethostbyaddr(a, l, t)	rb_w32_gethostbyaddr(a, l, t)


rb_w32_gethostbyname

rb_w32_gethostbyname  186 win32/win32.h  extern struct hostent *WSAAPI rb_w32_gethostbyname(const char *);
rb_w32_gethostbyname  438 win32/win32.h  #define gethostbyname(n)	rb_w32_gethostbyname(n)


rb_w32_gethostname

rb_w32_gethostname  187 win32/win32.h  extern int    WSAAPI rb_w32_gethostname(char *, int);
rb_w32_gethostname  441 win32/win32.h  #define gethostname(n, l)	rb_w32_gethostname(n, l)


rb_w32_getpeername

rb_w32_getpeername  172 win32/win32.h  extern int    WSAAPI rb_w32_getpeername(int, struct sockaddr *, int *);
rb_w32_getpeername  399 win32/win32.h  #define getpeername(s, a, l)	rb_w32_getpeername(s, a, l)


rb_w32_getpid

rb_w32_getpid     111 win32/win32.h  #define getpid()		rb_w32_getpid()
rb_w32_getpid     213 win32/win32.h  extern rb_pid_t rb_w32_getpid(void);


rb_w32_getprotobyname

rb_w32_getprotobyname  188 win32/win32.h  extern struct protoent *WSAAPI rb_w32_getprotobyname(const char *);
rb_w32_getprotobyname  444 win32/win32.h  #define getprotobyname(n)	rb_w32_getprotobyname(n)


rb_w32_getprotobynumber

rb_w32_getprotobynumber  189 win32/win32.h  extern struct protoent *WSAAPI rb_w32_getprotobynumber(int);
rb_w32_getprotobynumber  447 win32/win32.h  #define getprotobynumber(n)	rb_w32_getprotobynumber(n)


rb_w32_getservbyname

rb_w32_getservbyname  190 win32/win32.h  extern struct servent  *WSAAPI rb_w32_getservbyname(const char *, const char *);
rb_w32_getservbyname  450 win32/win32.h  #define getservbyname(n, p)	rb_w32_getservbyname(n, p)


rb_w32_getservbyport

rb_w32_getservbyport  191 win32/win32.h  extern struct servent  *WSAAPI rb_w32_getservbyport(int, const char *);
rb_w32_getservbyport  453 win32/win32.h  #define getservbyport(p, pr)	rb_w32_getservbyport(p, pr)


rb_w32_getsockname

rb_w32_getsockname  173 win32/win32.h  extern int    WSAAPI rb_w32_getsockname(int, struct sockaddr *, int *);
rb_w32_getsockname  402 win32/win32.h  #define getsockname(s, a, l)	rb_w32_getsockname(s, a, l)


rb_w32_getsockopt

rb_w32_getsockopt  174 win32/win32.h  extern int    WSAAPI rb_w32_getsockopt(int, int, int, char *, int *);
rb_w32_getsockopt  405 win32/win32.h  #define getsockopt(s, v, n, o, l) rb_w32_getsockopt(s, v, n, o, l)


rb_w32_ioctlsocket

rb_w32_ioctlsocket  175 win32/win32.h  extern int    WSAAPI rb_w32_ioctlsocket(int, long, u_long *);
rb_w32_ioctlsocket  408 win32/win32.h  #define ioctlsocket(s, c, a)	rb_w32_ioctlsocket(s, c, a)


rb_w32_is_socket

rb_w32_is_socket   32 ext/io/wait/wait.c #define FIONREAD_POSSIBLE_P(fd) rb_w32_is_socket(fd)
rb_w32_is_socket  184 io.c           #define is_socket(fd, path)	rb_w32_is_socket(fd)
rb_w32_is_socket  164 win32/win32.h  extern int    rb_w32_is_socket(int);


rb_w32_isatty

rb_w32_isatty     139 win32/win32.h  #define isatty(h)		rb_w32_isatty(h)
rb_w32_isatty     215 win32/win32.h  extern int rb_w32_isatty(int);


rb_w32_iswin95

rb_w32_iswin95    658 file.c         	               rb_w32_iswin95() ? 0 : FILE_FLAG_BACKUP_SEMANTICS, NULL);
rb_w32_iswin95   1444 file.c             if (rb_w32_iswin95()) return Qfalse;
rb_w32_iswin95    219 win32/win32.c  #define IsWin95() rb_w32_iswin95()


rb_w32_iswinnt

rb_w32_iswinnt    137 dir.c              if (nocase && rb_w32_iswinnt()) {
rb_w32_iswinnt    218 win32/win32.c  #define IsWinNT() rb_w32_iswinnt()


rb_w32_join_argv

rb_w32_join_argv 2921 io.c           	rb_w32_join_argv(cmd, args);
rb_w32_join_argv  837 win32/win32.c      return rb_w32_spawn(mode, rb_w32_join_argv(cmd, argv), prog);
rb_w32_join_argv  208 win32/win32.h  extern char *rb_w32_join_argv(char *, char *const *);


rb_w32_leave_critical

rb_w32_leave_critical   38 rubysig.h          rb_w32_leave_critical();\
rb_w32_leave_critical  488 win32/win32.h  void rb_w32_leave_critical(void);


rb_w32_listen

rb_w32_listen     176 win32/win32.h  extern int    WSAAPI rb_w32_listen(int, int);
rb_w32_listen     411 win32/win32.h  #define listen(s, b)		rb_w32_listen(s, b)


rb_w32_main_context

rb_w32_main_context  444 signal.c       #define IN_MAIN_CONTEXT(f, a) (rb_w32_main_context(a, f) ? (void)0 : f(a))
rb_w32_main_context  485 win32/win32.h  int  rb_w32_main_context(int arg, void (*handler)(int));


rb_w32_mkdir

rb_w32_mkdir      143 win32/win32.h  #define mkdir(p, m)		rb_w32_mkdir(p, m)
rb_w32_mkdir      217 win32/win32.h  extern int rb_w32_mkdir(const char *, int);


rb_w32_open_osfhandle

rb_w32_open_osfhandle   86 win32/win32.c  static int rb_w32_open_osfhandle(long osfhandle, int flags);
rb_w32_open_osfhandle  777 win32/win32.c  	*pipe = rb_w32_open_osfhandle((long)hDupFile, pipemode);
rb_w32_open_osfhandle 2208 win32/win32.c  	    s = rb_w32_open_osfhandle(r, O_RDWR|O_BINARY);
rb_w32_open_osfhandle 2503 win32/win32.c  	    fd = rb_w32_open_osfhandle(s, O_RDWR|O_BINARY);
rb_w32_open_osfhandle 2724 win32/win32.c      sv[0] = rb_w32_open_osfhandle(pair[0], O_RDWR|O_BINARY);
rb_w32_open_osfhandle 2725 win32/win32.c      sv[1] = rb_w32_open_osfhandle(pair[1], O_RDWR|O_BINARY);


rb_w32_opendir

rb_w32_opendir     30 win32/dir.h    DIR*           rb_w32_opendir(const char*);
rb_w32_opendir     37 win32/dir.h    #define opendir   rb_w32_opendir


rb_w32_osid

rb_w32_osid        78 win32/win32.h  extern DWORD rb_w32_osid(void);
rb_w32_osid        79 win32/win32.h  #define rb_w32_iswinnt()  (rb_w32_osid() == VER_PLATFORM_WIN32_NT)
rb_w32_osid        80 win32/win32.h  #define rb_w32_iswin95()  (rb_w32_osid() == VER_PLATFORM_WIN32_WINDOWS)


rb_w32_pipe_exec

rb_w32_pipe_exec 2927 io.c               while ((pid = rb_w32_pipe_exec(cmd, exename, openmode, &fd)) == -1) {
rb_w32_pipe_exec  162 win32/win32.h  extern rb_pid_t  rb_w32_pipe_exec(const char *, const char *, int, int *);


rb_w32_putc

rb_w32_putc        99 win32/win32.h  #define putc(_c, _stream)	rb_w32_putc(_c, _stream)
rb_w32_putc       100 win32/win32.h  #define putchar(_c)		rb_w32_putc(_c, stdout)
rb_w32_putc       489 win32/win32.h  int  rb_w32_putc(int, FILE*);


rb_w32_readdir

rb_w32_readdir     31 win32/dir.h    struct direct* rb_w32_readdir(DIR *);
rb_w32_readdir     38 win32/dir.h    #define readdir   rb_w32_readdir


rb_w32_recv

rb_w32_recv       177 win32/win32.h  extern int    WSAAPI rb_w32_recv(int, char *, int, int);
rb_w32_recv       414 win32/win32.h  #define recv(s, b, l, f)	rb_w32_recv(s, b, l, f)


rb_w32_recvfrom

rb_w32_recvfrom   178 win32/win32.h  extern int    WSAAPI rb_w32_recvfrom(int, char *, int, int, struct sockaddr *, int *);
rb_w32_recvfrom   417 win32/win32.h  #define recvfrom(s, b, l, f, fr, frl) rb_w32_recvfrom(s, b, l, f, fr, frl)


rb_w32_rename

rb_w32_rename     194 win32/win32.h  extern int    rb_w32_rename(const char *, const char *);
rb_w32_rename     468 win32/win32.h  #define rename(o, n)		rb_w32_rename(o, n)


rb_w32_rewinddir

rb_w32_rewinddir   34 win32/dir.h    void           rb_w32_rewinddir(DIR *);
rb_w32_rewinddir   41 win32/dir.h    #define rewinddir rb_w32_rewinddir
rb_w32_rewinddir 1539 win32/win32.c      rb_w32_rewinddir(dirp);


rb_w32_rmdir

rb_w32_rmdir      145 win32/win32.h  #define rmdir(p)		rb_w32_rmdir(p)
rb_w32_rmdir      218 win32/win32.h  extern int rb_w32_rmdir(const char *);


rb_w32_seekdir

rb_w32_seekdir     33 win32/dir.h    void           rb_w32_seekdir(DIR *, long);
rb_w32_seekdir     40 win32/dir.h    #define seekdir   rb_w32_seekdir


rb_w32_select

rb_w32_select     171 win32/win32.h  extern int    WSAAPI rb_w32_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
rb_w32_select     396 win32/win32.h  #define select(n, r, w, e, t)	rb_w32_select(n, r, w, e, t)


rb_w32_send

rb_w32_send       179 win32/win32.h  extern int    WSAAPI rb_w32_send(int, const char *, int, int);
rb_w32_send       420 win32/win32.h  #define send(s, b, l, f)	rb_w32_send(s, b, l, f)


rb_w32_sendto

rb_w32_sendto     180 win32/win32.h  extern int    WSAAPI rb_w32_sendto(int, const char *, int, int, const struct sockaddr *, int);
rb_w32_sendto     423 win32/win32.h  #define sendto(s, b, l, f, t, tl) rb_w32_sendto(s, b, l, f, t, tl)


rb_w32_setsockopt

rb_w32_setsockopt  181 win32/win32.h  extern int    WSAAPI rb_w32_setsockopt(int, int, int, const char *, int);
rb_w32_setsockopt  426 win32/win32.h  #define setsockopt(s, v, n, o, l) rb_w32_setsockopt(s, v, n, o, l)


rb_w32_shutdown

rb_w32_shutdown   182 win32/win32.h  extern int    WSAAPI rb_w32_shutdown(int, int);
rb_w32_shutdown   429 win32/win32.h  #define shutdown(s, h)		rb_w32_shutdown(s, h)


rb_w32_sleep

rb_w32_sleep     2016 win32/win32.c  	    rb_w32_sleep(timeout->tv_sec * 1000 + timeout->tv_usec / 1000);
rb_w32_sleep     2018 win32/win32.c  	    rb_w32_sleep(INFINITE);
rb_w32_sleep      486 win32/win32.h  int  rb_w32_sleep(unsigned long msec);


rb_w32_snprintf

rb_w32_snprintf   199 win32/win32.h  #define snprintf   rb_w32_snprintf
rb_w32_snprintf   201 win32/win32.h  extern int rb_w32_snprintf(char *, size_t, const char *, ...);


rb_w32_socket

rb_w32_socket     183 win32/win32.h  extern int    WSAAPI rb_w32_socket(int, int, int);
rb_w32_socket     432 win32/win32.h  #define socket(s, t, p)		rb_w32_socket(s, t, p)


rb_w32_socketpair

rb_w32_socketpair  192 win32/win32.h  extern int    rb_w32_socketpair(int, int, int, int *);
rb_w32_socketpair  456 win32/win32.h  #define socketpair(a, t, p, s)	rb_w32_socketpair(a, t, p, s)


rb_w32_spawn

rb_w32_spawn     1002 process.c          rb_w32_spawn(P_OVERLAY, (char *)str, 0);
rb_w32_spawn     1131 process.c      #define proc_spawn(str) rb_w32_spawn(P_NOWAIT, str, 0)
rb_w32_spawn      837 win32/win32.c      return rb_w32_spawn(mode, rb_w32_join_argv(cmd, argv), prog);
rb_w32_spawn      209 win32/win32.h  extern int rb_w32_spawn(int, const char *, const char*);


rb_w32_stat

rb_w32_stat      1367 win32/win32.c      if (rb_w32_stat(filename, &sbuf) < 0)
rb_w32_stat      3849 win32/win32.c      if (rb_w32_stat(path, &stat)) {
rb_w32_stat       134 win32/win32.h  #define stat(path,st)		rb_w32_stat(path,st)
rb_w32_stat       220 win32/win32.h  extern int rb_w32_stat(const char *, struct stat *);


rb_w32_strerror

rb_w32_strerror   309 win32/win32.h  extern char *rb_w32_strerror(int);
rb_w32_strerror   312 win32/win32.h  #define strerror(e) rb_w32_strerror(e)


rb_w32_telldir

rb_w32_telldir     32 win32/dir.h    long           rb_w32_telldir(DIR *);
rb_w32_telldir     39 win32/dir.h    #define telldir   rb_w32_telldir


rb_w32_times

rb_w32_times      471 win32/win32.h  #define times(t)		rb_w32_times(t)
rb_w32_times      481 win32/win32.h  int rb_w32_times(struct tms *);


rb_w32_unlink

rb_w32_unlink     147 win32/win32.h  #define unlink(p)		rb_w32_unlink(p)
rb_w32_unlink     219 win32/win32.h  extern int rb_w32_unlink(const char *);


rb_w32_utime

rb_w32_utime      106 win32/win32.h  #define utime(_p, _t)		rb_w32_utime(_p, _t)
rb_w32_utime      493 win32/win32.h  int  rb_w32_utime(const char *, const struct utimbuf *);


rb_w32_vsnprintf

rb_w32_vsnprintf  198 win32/win32.h  #define vsnprintf(s,n,f,l) rb_w32_vsnprintf(s,n,f,l)
rb_w32_vsnprintf  200 win32/win32.h  extern int rb_w32_vsnprintf(char *, size_t, const char *, va_list);


rb_waitpid

rb_waitpid        155 ext/pty/pty.c  	cpid = rb_waitpid(info->child_pid, &status, WUNTRACED);
rb_waitpid        417 intern.h       int rb_waitpid(int,int*,int);
rb_waitpid        725 process.c          if ((pid = rb_waitpid(pid, &status, flags)) < 0)
rb_waitpid        810 process.c      	pid = rb_waitpid(-1, &status, 0);
rb_waitpid        828 process.c      	cpid = rb_waitpid(*pid_p, &status, WNOHANG);
rb_waitpid       1514 process.c      	i = rb_waitpid(pid, &status, 0);


rb_warn

rb_warn           351 array.c        	    rb_warn("block supersedes default value argument");
rb_warn           857 array.c        	rb_warn("block supersedes default value argument");
rb_warn           845 bignum.c       	rb_warn("Bignum out of Float range");
rb_warn          1541 bignum.c       	rb_warn("in a**b, b may be too big");
rb_warn           211 class.c        	rb_warn("no super class for `%s', Object assumed", name);
rb_warn           240 class.c        	rb_warn("no super class for `%s::%s', Object assumed",
rb_warn           774 dir.c          	    rb_warn("conflicting chdir during another chdir block");
rb_warn           115 enum.c         	    rb_warn("given block not used");
rb_warn           397 eval.c         	rb_warn("defining %s.allocate is deprecated; use rb_define_alloc_func()",
rb_warn           529 eval.c         	rb_warn("removing `%s' may cause serious problem", rb_id2name(mid));
rb_warn          1814 eval.c         	    rb_warn("class variable access from toplevel singleton method");
rb_warn          1922 eval.c         	rb_warn("undefining `%s' may cause serious problem", rb_id2name(id));
rb_warn          3732 eval.c         		rb_warn("redefining Object#initialize may cause infinite loop");
rb_warn          3735 eval.c         		rb_warn("redefining `%s' may cause serious problem",
rb_warn          4756 eval.c         			rb_warn("multiple values for a block parameter (%d for 1)\n\tfrom %s:%d",
rb_warn          5050 eval.c         	    rb_warn("declaring singleton class variable");
rb_warn          8083 eval.c         	rb_warn("tried to create Proc object without a block");
rb_warn          8169 eval.c             rb_warn("rb_f_lambda() is deprecated; use rb_block_proc() instead");
rb_warn          3383 ext/bigdecimal/bigdecimal.c     rb_warn("Conversion from String to BigDecimal overflow (last few digits discarded).");
rb_warn           304 ext/openssl/ossl.c 	    rb_warn("error on stack: %s", ERR_error_string(e, NULL));
rb_warn           179 ext/openssl/ossl.h   rb_warn(fmt, ##__VA_ARGS__); \
rb_warn           185 ext/openssl/ossl.h #define OSSL_Warn rb_warn
rb_warn           228 ext/openssl/ossl_config.c     rb_warn("Config#value is deprecated; use Config#get_value");
rb_warn           288 ext/openssl/ossl_config.c     rb_warn("Config#section is deprecated; use Config#[]");
rb_warn           398 ext/openssl/ossl_config.c     rb_warn("#sections don't work with %s", OPENSSL_VERSION_TEXT);
rb_warn           405 ext/openssl/ossl_config.c     rb_warn("#to_s don't work with %s", OPENSSL_VERSION_TEXT);
rb_warn           412 ext/openssl/ossl_config.c     rb_warn("#each don't work with %s", OPENSSL_VERSION_TEXT);
rb_warn           251 ext/openssl/ossl_ocsp.c     if(!result) rb_warn("%s", ERR_error_string(ERR_peek_error(), NULL));
rb_warn           605 ext/openssl/ossl_ocsp.c     if(!result) rb_warn("%s", ERR_error_string(ERR_peek_error(), NULL));
rb_warn           456 ext/pty/pty.c      rb_warn("PTY::protect_signal is no longer needed");
rb_warn           466 ext/pty/pty.c      rb_warn("PTY::reset_signal is no longer needed");
rb_warn            43 ext/tk/stubs.c         rb_warn("Inconsistency. Loaded Tcl/Tk libraries are enabled nativethread-support. But `tcltklib' is not. The inconsistency causes SEGV or other troubles frequently.");
rb_warn          5659 ext/tk/tcltklib.c                 rb_warn("%s (ignore)", Tcl_GetStringResult(ptr->ip));
rb_warn          6527 ext/tk/tcltklib.c                     rb_warn("invalid command name `%s' (ignore)", cmd);
rb_warn          6670 ext/tk/tcltklib.c                 rb_warn("%s (ignore)", Tcl_GetStringResult(ptr->ip));
rb_warn          2286 ext/zlib/zlib.c 	rb_warn("Zlib::GzipWriter object must be closed explicitly.");
rb_warn          2294 ext/zlib/zlib.c 	    rb_warn("gzip footer is not written; broken gzip file");
rb_warn          4025 file.c         	    rb_warn("Insecure world writable dir %s, mode 0%o", p0, st.st_mode);
rb_warn          1650 gc.c               rb_warn("ObjectSpace::add_finalizer is deprecated; use define_finalizer");
rb_warn          1665 gc.c               rb_warn("ObjectSpace::remove_finalizer is deprecated; use undefine_finalizer");
rb_warn          1676 gc.c               rb_warn("ObjectSpace::finalizers is deprecated");
rb_warn          1687 gc.c               rb_warn("ObjectSpace::call_finalizer is deprecated; use define_finalizer");
rb_warn           439 hash.c         	rb_warn("block supersedes default value argument");
rb_warn           576 hash.c             rb_warn("Hash#index is deprecated; use Hash#key");
rb_warn          1611 hash.c         	rb_warn("block supersedes default value argument");
rb_warn          2152 hash.c             rb_warn("ENV.index is deprecated; use ENV.key");
rb_warn          2249 io.c           	rb_warn("sysseek for buffered IO");
rb_warn          2284 io.c           	rb_warn("syswrite for buffered IO");
rb_warn          2592 io.c           	rb_warn("setvbuf() can't be honoured for %s", fname);
rb_warn          2634 io.c           	rb_warn("setvbuf() can't be honoured (fd=%d)", fd);
rb_warn          3426 io.c                       rb_warn("setvbuf() can't be honoured for %s", RSTRING(fname)->ptr);
rb_warn          3831 io.c               rb_warn("$defout is obsolete; use $stdout instead");
rb_warn          3838 io.c               rb_warn("$deferr is obsolete; use $stderr instead");
rb_warn          4029 io.c           	rb_warn("%s::new() does not take block; use %s::open() instead",
rb_warn          4112 io.c           		    rb_warn("Can't do inplace edit for stdio; skipping");
rb_warn          4142 io.c           			    rb_warn("Can't rename %s to %s: %s, skipping file",
rb_warn          4154 io.c           			    rb_warn("Can't remove %s: %s, skipping file",
rb_warn          4189 io.c           	    rb_warn("Can't do inplace edit for stdio");
rb_warn          4330 io.c               rb_warn("getc is obsolete; use STDIN.getc instead");
rb_warn          1218 marshal.c      		   rb_warn("define `allocate' instead of `_alloc'");
rb_warn          1346 marshal.c      	rb_warn("incompatible marshal file format (can be read)\n\
rb_warn          1511 object.c       	rb_warn("do not use Fixnums as Symbols");
rb_warn          2068 object.c       	rb_warn("Float %*s out of range", end-p, p);
rb_warn          2102 object.c       	    rb_warn("Float %*s out of range", end-p, p);
rb_warn          2219 object.c       	rb_warn("string contains \\0 character");
rb_warn           422 parse.y        # define rb_warn0(fmt)    rb_warn(fmt)
rb_warn           423 parse.y        # define rb_warnI(fmt,a)  rb_warn(fmt,a)
rb_warn           424 parse.y        # define rb_warnS(fmt,a)  rb_warn(fmt,a)
rb_warn           665 parse.y        			    rb_warn("else without rescue is useless");
rb_warn           867 parse.y        			    rb_warn("END in method; use at_exit");
rb_warn          2101 parse.y        			rb_warn("parenthesize argument(s) for future version");
rb_warn          2159 parse.y        			rb_warn("parenthesize argument for future version");
rb_warn          2169 parse.y        			rb_warn("parenthesize argument for future version");
rb_warn          2185 parse.y        			rb_warn("parenthesize argument(s) for future version");
rb_warn          6939 parse.y            rb_warn(mesg);
rb_warn          7523 parse.y        	rb_warn("useless use of %s in void context", useless);
rb_warn          7718 parse.y        	rb_warn("string literal in condition");
rb_warn          1654 re.c           	    rb_warn("flags%s ignored", (argc == 3) ? " and encoding": "");
rb_warn          2135 re.c               rb_warn("modifying %s is deprecated", rb_id2name(id));
rb_warn           108 regint.h       #define DEFAULT_WARN_FUNCTION        rb_warn
rb_warn           569 ruby.h         PRINTF_ARGS(void rb_warn(const char*, ...), 1, 2);
rb_warn           792 sprintf.c      	if (RTEST(ruby_verbose)) rb_warn(mesg);
rb_warn           189 struct.c       	    rb_warn("redefining constant Struct::%s", cname);
rb_warn          1903 time.c             rb_warn("obsolete method Time::times; use Process::times");
rb_warn          1292 variable.c     		rb_warn("toplevel constant %s referenced by %s::%s",
rb_warn          1506 variable.c     		rb_warn("already initialized %s %s", dest, rb_id2name(id));
rb_warn          1525 variable.c     	rb_warn("rb_define_const: invalide name `%s' for constant", name);


rb_warnI

rb_warnI         5912 parse.y        		    rb_warnI("invalid character syntax; use ?\\%c", c2);
rb_warnI         5921 parse.y        	    rb_warnI("multibyte character literal not supported yet; use ?\\%.3o", c);


rb_warnS

rb_warnS         6291 parse.y        		    rb_warnS("Float %s out of range", tok());
rb_warnS         8155 parse.y        	    rb_warnS("out-of-scope variable - %s", rb_id2name(id));


rb_warning

rb_warning        322 array.c        	    rb_warning("given block not used");
rb_warning       1362 dir.c          	rb_warning("Dir.glob() ignores File::FNM_CASEFOLD");
rb_warning        582 eval.c             rb_warning("rb_enable_super() is obsolete");
rb_warning        646 eval.c         	    rb_warning((scope_vmode == SCOPE_MODFUNC) ?
rb_warning       2044 eval.c         	    rb_warning("discarding old %s", rb_id2name(name));
rb_warning       3742 eval.c         		    rb_warning("method redefined; discarding old %s", rb_id2name(node->nd_mid));
rb_warning       3792 eval.c         		    rb_warning("redefine %s", rb_id2name(node->nd_mid));
rb_warning       5013 eval.c         	rb_warning("assigning void value");
rb_warning       7374 eval.c         	rb_warning("main#include in the wrapped load is effective only in wrapper module");
rb_warning        175 ext/openssl/ossl.c 	    rb_warning("password must be longer than 4 bytes");
rb_warning        179 ext/openssl/ossl.c 	    rb_warning("password must be shorter then %d bytes", max_len-1);
rb_warning        174 ext/openssl/ossl.h   rb_warning(fmt, ##__VA_ARGS__); \
rb_warning        184 ext/openssl/ossl.h #define OSSL_Warning rb_warning
rb_warning         53 ext/openssl/ossl_asn1.c 	rb_warning("unknown time format");
rb_warning        151 ext/openssl/ossl_cipher.c 	    rb_warning("key derivation by %s#encrypt is deprecated; "
rb_warning         78 ext/openssl/ossl_engine.c     rb_warning("no such builtin loader for `%s'", RSTRING(name)->ptr);
rb_warning        218 ext/openssl/ossl_hmac.c     rb_warning("HMAC will NOT be avaible: OpenSSL is compiled without HMAC.");
rb_warning        455 ext/openssl/ossl_pkey_dh.c     rb_warning("OpenSSL is compiled without DH support");
rb_warning        414 ext/openssl/ossl_pkey_dsa.c     rb_warning("OpenSSL is compiled without DSA support");
rb_warning        510 ext/openssl/ossl_pkey_rsa.c     rb_warning("OpenSSL is compiled without RSA support");
rb_warning        307 ext/openssl/ossl_ssl.c 	rb_warning("using default DH parameters.");
rb_warning        375 ext/openssl/ossl_ssl.c 	    rb_warning("can't set verify locations");
rb_warning        433 ext/openssl/ossl_ssl.c         rb_warning("SSL_CTX is not initialized.");
rb_warning        660 ext/openssl/ossl_ssl.c         rb_warning("SSL session is not started yet.");
rb_warning        704 ext/openssl/ossl_ssl.c         rb_warning("SSL session is not started yet.");
rb_warning        733 ext/openssl/ossl_ssl.c         rb_warning("SSL session is not started yet.");
rb_warning        759 ext/openssl/ossl_ssl.c         rb_warning("SSL session is not started yet.");
rb_warning        785 ext/openssl/ossl_ssl.c 	rb_warning("SSL session is not started yet.");
rb_warning        808 ext/openssl/ossl_ssl.c         rb_warning("SSL session is not started yet.");
rb_warning        824 ext/openssl/ossl_ssl.c         rb_warning("SSL session is not started yet.");
rb_warning        842 ext/openssl/ossl_ssl.c         rb_warning("SSL session is not started yet.");
rb_warning        304 ext/strscan/strscan.c     rb_warning("StringScanner#clear is obsolete; use #terminate instead");
rb_warning        757 ext/strscan/strscan.c     rb_warning("StringScanner#getbyte is obsolete; use #get_byte instead");
rb_warning        798 ext/strscan/strscan.c     rb_warning("StringScanner#peep is obsolete; use #peek instead");
rb_warning        879 ext/strscan/strscan.c     rb_warning("StringScanner#empty? is obsolete; use #eos? instead");
rb_warning        968 ext/strscan/strscan.c     rb_warning("StringScanner#matchedsize is obsolete; use #matched_size instead");
rb_warning       1090 ext/strscan/strscan.c     rb_warning("StringScanner#restsize is obsolete; use #rest_size instead");
rb_warning         47 ext/tk/stubs.c         rb_warning("Inconsistency.`tcltklib' is enabled nativethread-support. But loaded Tcl/Tk libraries are not. (Probably, the inconsistency doesn't cause any troubles.)");
rb_warning       5657 ext/tk/tcltklib.c                 rb_warning("%s (ignore)", Tcl_GetStringResult(ptr->ip));
rb_warning       6030 ext/tk/tcltklib.c                             rb_warning("Tk-interp has unknown encoding information (@encoding:'%s')", RSTRING(enc)->ptr);
rb_warning       6042 ext/tk/tcltklib.c                     rb_warning("string has unknown encoding information (@encoding:'%s')", RSTRING(enc)->ptr);
rb_warning       6181 ext/tk/tcltklib.c                     rb_warning("Tk-interp has unknown encoding information (@encoding:'%s')", RSTRING(enc)->ptr);
rb_warning       6525 ext/tk/tcltklib.c                     rb_warning("invalid command name `%s' (ignore)", cmd);
rb_warning       6668 ext/tk/tcltklib.c                 rb_warning("%s (ignore)", Tcl_GetStringResult(ptr->ip));
rb_warning        857 ext/tk/tkutil/tkutil.c     rb_warning("fail to convert '%s' to string for Tk",
rb_warning        683 ext/zlib/zlib.c 	    rb_warning("attempt to close uninitialized zstream; ignored.");
rb_warning        689 ext/zlib/zlib.c 	    rb_warning("attempt to close unfinished zstream; reset forced.");
rb_warning       1360 ext/zlib/zlib.c 	    rb_warning("deflateParams() returned Z_BUF_ERROR");
rb_warning        425 parse.y        # define rb_warning0(fmt) rb_warning(fmt)
rb_warning        426 parse.y        # define rb_warningS(fmt,a) rb_warning(fmt,a)
rb_warning       2390 parse.y        			rb_warning("don't put space before argument parentheses");
rb_warning       2399 parse.y        			rb_warning("don't put space before argument parentheses");
rb_warning       5407 parse.y            rb_warning("ambiguous first argument; put parentheses or even spaces");
rb_warning       6930 parse.y            rb_warning(mesg);
rb_warning        109 regint.h       #define DEFAULT_VERB_WARN_FUNCTION   rb_warning
rb_warning        565 ruby.h         PRINTF_ARGS(void rb_warning(const char*, ...), 1, 2);
rb_warning        561 sprintf.c      				rb_warning("negative number for %%u specifier");
rb_warning        616 sprintf.c      				rb_warning("negative number for %%u specifier");
rb_warning        309 time.c         	rb_warning("2 digits year is used");
rb_warning        312 time.c         	rb_warning("2 or 3 digits year is used");
rb_warning       1865 time.c         	rb_warning("strftime called with empty format string");
rb_warning        346 variable.c         rb_warning("global variable `%s' not initialized", rb_id2name(id));
rb_warning        791 variable.c     	rb_warning("instance variable %s not initialized", rb_id2name(id));
rb_warning        932 variable.c     	rb_warning("instance variable %s not initialized", rb_id2name(id));


rb_warning0

rb_warning0      2511 parse.y        			rb_warning0("(...) interpreted as grouped expression");
rb_warning0      5705 parse.y        		rb_warning0("`*' interpreted as argument prefix");
rb_warning0      5953 parse.y        	    rb_warning0("`&' interpreted as argument prefix");
rb_warning0      6418 parse.y        		rb_warning0("don't put space before argument parentheses");


rb_with_disable_interrupt

rb_with_disable_interrupt   64 hash.c             return !rb_with_disable_interrupt(eql, (VALUE)args);
rb_with_disable_interrupt   75 rubysig.h      VALUE rb_with_disable_interrupt(VALUE(*)(ANYARGS),VALUE);


rb_write_error

rb_write_error   1488 error.c        	rb_write_error(s);
rb_write_error   1489 error.c        	rb_write_error("\n");
rb_write_error   1092 eval.c             rb_write_error(buf);
rb_write_error   1095 eval.c         #define warn_print(x) rb_write_error(x)
rb_write_error    347 intern.h       void rb_write_error(const char*);


rb_write_error2

rb_write_error2    98 error.c            rb_write_error2(buf, len);
rb_write_error2  1096 eval.c         #define warn_print2(x,l) rb_write_error2(x,l)
rb_write_error2   348 intern.h       void rb_write_error2(const char*, long);
rb_write_error2  3807 io.c               rb_write_error2(mesg, strlen(mesg));


rb_yield

rb_yield          354 array.c        	    rb_ary_store(ary, i, rb_yield(LONG2NUM(i)));
rb_yield          865 array.c        	if (block_given) return rb_yield(pos);
rb_yield          899 array.c        	    if (RTEST(rb_yield(RARRAY(ary)->ptr[i]))) {
rb_yield          937 array.c        	    if (RTEST(rb_yield(RARRAY(ary)->ptr[i])))
rb_yield         1140 array.c        	rb_yield(RARRAY(ary)->ptr[i]);
rb_yield         1167 array.c        	rb_yield(LONG2NUM(i));
rb_yield         1194 array.c        	rb_yield(RARRAY(ary)->ptr[len]);
rb_yield         1604 array.c        	rb_ary_push(collect, rb_yield(RARRAY(ary)->ptr[i]));
rb_yield         1631 array.c        	rb_ary_store(ary, i, rb_yield(RARRAY(ary)->ptr[i]));
rb_yield         1707 array.c        	if (RTEST(rb_yield(RARRAY(ary)->ptr[i]))) {
rb_yield         1747 array.c        	    return rb_yield(item);
rb_yield         1876 array.c        	if (RTEST(rb_yield(v))) continue;
rb_yield         1964 array.c        	    rb_yield(tmp);
rb_yield         2149 array.c        	    v = rb_yield(LONG2NUM(i));
rb_yield         2726 array.c         	    if (RTEST(rb_yield(v))) n++;
rb_yield          432 dir.c          	return rb_ensure(rb_yield, dir, dir_close, dir);
rb_yield          550 dir.c          	rb_yield(rb_tainted_str_new(dp->d_name, NAMLEN(dp)));
rb_yield          700 dir.c              return rb_yield(args->new_path);
rb_yield           39 enum.c         	rb_ary_push(arg[1], rb_yield(i));
rb_yield           88 enum.c             if (RTEST(rb_yield(i))) {
rb_yield          134 enum.c             if (RTEST(rb_yield(i))) {
rb_yield          177 enum.c             if (RTEST(rb_yield(i))) {
rb_yield          212 enum.c             if (!RTEST(rb_yield(i))) {
rb_yield          245 enum.c             rb_ary_push(ary, rb_yield(i));
rb_yield          362 enum.c             if (RTEST(rb_yield(i))) {
rb_yield          426 enum.c             v = rb_yield(i);
rb_yield          545 enum.c             if (!RTEST(rb_yield(i))) {
rb_yield          591 enum.c             if (RTEST(rb_yield(i))) {
rb_yield          638 enum.c             if (RTEST(rb_yield(i))) {
rb_yield          692 enum.c             if (RTEST(rb_yield(i))) {
rb_yield          855 enum.c             v = rb_yield(i);
rb_yield          896 enum.c             v = rb_yield(i);
rb_yield         1015 enum.c         	rb_yield(tmp);
rb_yield           83 enumerator.c       return rb_yield(proc_call(e->proc, i));
rb_yield          138 enumerator.c   	rb_yield(ary);
rb_yield          174 enumerator.c       if (RARRAY(ary)->len > 0) rb_yield(ary);
rb_yield          203 enumerator.c   	rb_yield(rb_ary_dup(ary));
rb_yield          275 enumerator.c   	ptr->iter = (VALUE (*)(VALUE, struct enumerator *))rb_yield;
rb_yield         12589 eval.c         	return rb_yield(cont);
rb_yield         1309 ext/curses/curses.c     rb_yield(val);
rb_yield          166 ext/dbm/dbm.c          return rb_ensure(rb_yield, obj, fdbm_close, obj);
rb_yield          188 ext/dbm/dbm.c  	    return rb_yield(rb_tainted_str_new(key.dptr, key.dsize));
rb_yield          255 ext/dbm/dbm.c  	v = rb_yield(assoc);
rb_yield          307 ext/dbm/dbm.c  	if (rb_block_given_p()) return rb_yield(keystr);
rb_yield          367 ext/dbm/dbm.c          ret = rb_protect(rb_yield, rb_assoc_new(rb_str_dup(keystr), valstr), &status);
rb_yield          555 ext/dbm/dbm.c  	rb_yield(rb_tainted_str_new(val.dptr, val.dsize));
rb_yield          571 ext/dbm/dbm.c  	rb_yield(rb_tainted_str_new(key.dptr, key.dsize));
rb_yield          592 ext/dbm/dbm.c  	rb_yield(rb_assoc_new(keystr, valstr));
rb_yield           90 ext/dl/handle.c     rb_ensure(rb_yield, self, rb_dlhandle_close, self);
rb_yield          187 ext/etc/etc.c  	rb_yield(setup_passwd(pw));
rb_yield          392 ext/etc/etc.c  	rb_yield(setup_group(pw));
rb_yield          176 ext/gdbm/gdbm.c         return rb_ensure(rb_yield, obj, fgdbm_close, obj);
rb_yield          283 ext/gdbm/gdbm.c 	    return rb_yield(keystr);
rb_yield          349 ext/gdbm/gdbm.c 	VALUE v = rb_yield(assoc);
rb_yield          460 ext/gdbm/gdbm.c         ret = rb_protect(rb_yield, rb_assoc_new(keystr, valstr), &status);
rb_yield          657 ext/gdbm/gdbm.c         rb_yield(rb_gdbm_fetch2(dbm, keystr));
rb_yield          675 ext/gdbm/gdbm.c         rb_yield(keystr);
rb_yield          693 ext/gdbm/gdbm.c         rb_yield(rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr)));
rb_yield          306 ext/iconv/iconv.c     return rb_yield(failed);
rb_yield          586 ext/iconv/iconv.c 	return rb_ensure(rb_yield, self, (VALUE(*)())iconv_finish, self);
rb_yield          696 ext/iconv/iconv.c     return rb_yield(ary);
rb_yield          149 ext/openssl/ossl.c     pass = rb_yield(flag);
rb_yield          739 ext/openssl/ossl_asn1.c 	    rb_yield(arg);
rb_yield          378 ext/openssl/ossl_config.c 	rb_yield(args);
rb_yield          118 ext/openssl/ossl_engine.c     if(rb_block_given_p()) rb_yield(obj);
rb_yield           33 ext/openssl/ossl_pkey.c     rb_yield(ary);
rb_yield          445 ext/pty/pty.c  	rb_ensure(rb_yield, res, pty_finalize_syswait, (VALUE)&thinfo);
rb_yield          457 ext/pty/pty.c      rb_yield(Qnil);
rb_yield          652 ext/readline/readline.c 	rb_yield(rb_tainted_str_new2(entry->line));
rb_yield          144 ext/sdbm/init.c         return rb_ensure(rb_yield, obj, fsdbm_close, obj);
rb_yield          166 ext/sdbm/init.c 	    return rb_yield(rb_tainted_str_new(key.dptr, key.dsize));
rb_yield          232 ext/sdbm/init.c 	v = rb_yield(assoc);
rb_yield          285 ext/sdbm/init.c 	if (rb_block_given_p()) return rb_yield(keystr);
rb_yield          345 ext/sdbm/init.c         ret = rb_protect(rb_yield, rb_assoc_new(rb_str_dup(keystr), valstr), &status);
rb_yield          538 ext/sdbm/init.c 	rb_yield(rb_tainted_str_new(val.dptr, val.dsize));
rb_yield          554 ext/sdbm/init.c 	rb_yield(rb_tainted_str_new(key.dptr, key.dsize));
rb_yield          574 ext/sdbm/init.c 	rb_yield(rb_assoc_new(keystr, valstr));
rb_yield          203 ext/stringio/stringio.c     return rb_ensure(rb_yield, obj, strio_finalize, obj);
rb_yield          695 ext/stringio/stringio.c 	rb_yield(CHR2FIX(c));
rb_yield          951 ext/stringio/stringio.c 	rb_yield(line);
rb_yield         2096 ext/syck/rubyext.c     rb_yield( map );
rb_yield         2115 ext/syck/rubyext.c     rb_yield( seq );
rb_yield           95 ext/syslog/syslog.c         rb_ensure(rb_yield, self, mSyslog_close, self);
rb_yield         2773 ext/win32ole/win32ole.c         rb_yield(obj);
rb_yield         2404 ext/zlib/zlib.c 	return rb_ensure(rb_yield, obj, gzfile_ensure_close, obj);
rb_yield         3123 ext/zlib/zlib.c 	rb_yield(c);
rb_yield         3307 ext/zlib/zlib.c 	rb_yield(str);
rb_yield         1551 gc.c           		    rb_yield((VALUE)p);
rb_yield         1584 gc.c           			rb_yield((VALUE)p);
rb_yield          442 hash.c         	if (block_given) return rb_yield(key);
rb_yield          613 hash.c         	return rb_yield(key);
rb_yield          928 hash.c             rb_yield(value);
rb_yield          960 hash.c             rb_yield(key);
rb_yield         1024 hash.c             rb_yield(rb_assoc_new(key, value));
rb_yield         1567 hash.c             if (NIL_P(val) && rb_block_given_p()) rb_yield(name);
rb_yield         1620 hash.c         	if (block_given) return rb_yield(key);
rb_yield         1823 hash.c         	rb_yield(RARRAY(keys)->ptr[i]);
rb_yield         1858 hash.c         	rb_yield(RARRAY(values)->ptr[i]);
rb_yield         1888 hash.c         	    rb_yield(rb_assoc_new(RARRAY(ary)->ptr[i], RARRAY(ary)->ptr[i+1]));
rb_yield         1821 io.c           	rb_yield(str);
rb_yield         1856 io.c           	rb_yield(INT2FIX(c & 0xff));
rb_yield         3042 io.c           	    rb_yield(Qnil);
rb_yield         3051 io.c           	return rb_ensure(rb_yield, port, io_close, port);
rb_yield         3104 io.c           	return rb_ensure(rb_yield, io, io_close, io);
rb_yield         3238 io.c           		return rb_ensure(rb_yield, io, io_close, io);
rb_yield         4927 io.c           	rb_yield(str);
rb_yield         5244 io.c           	    rb_iterate(rb_each, current_file, rb_yield, 0);
rb_yield         5249 io.c           	rb_yield(str);
rb_yield         5261 io.c           	rb_yield(byte);
rb_yield         1410 numeric.c      		rb_yield(LONG2FIX(i));
rb_yield         1416 numeric.c      		rb_yield(LONG2FIX(i));
rb_yield         1433 numeric.c      	    rb_yield(rb_float_new(i*unit+beg));
rb_yield         1448 numeric.c      	    rb_yield(i);
rb_yield         2680 numeric.c      	    rb_yield(LONG2FIX(i));
rb_yield         2687 numeric.c      	    rb_yield(i);
rb_yield         2718 numeric.c      	    rb_yield(LONG2FIX(i));
rb_yield         2725 numeric.c      	    rb_yield(i);
rb_yield         2757 numeric.c      	    rb_yield(LONG2FIX(i));
rb_yield         2765 numeric.c      	    rb_yield(i);
rb_yield         1426 process.c      	    rb_protect(rb_yield, Qundef, &status);
rb_yield         3353 process.c      	    return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, SAVED_USER_ID);
rb_yield         3361 process.c      	    return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, euid);
rb_yield         3395 process.c      	return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, obj);
rb_yield         3462 process.c      	    return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, SAVED_GROUP_ID);
rb_yield         3470 process.c      	    return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, egid);
rb_yield         3503 process.c      	return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, obj);
rb_yield          246 range.c        	rb_yield(i);
rb_yield          305 range.c        	    rb_yield(LONG2NUM(i));
rb_yield          325 range.c        		rb_yield(b);
rb_yield          347 range.c            rb_yield(v);
rb_yield          389 range.c        	    rb_yield(LONG2NUM(i));
rb_yield         1246 re.c           	    if (RTEST(rb_yield(str))) {
rb_yield          572 ruby.h         VALUE rb_yield(VALUE);
rb_yield         1358 string.c       	rb_yield(current);
rb_yield         1845 string.c       	    repl = rb_obj_as_string(rb_yield(rb_reg_nth_match(0, match)));
rb_yield         1960 string.c       	    val = rb_obj_as_string(rb_yield(rb_reg_nth_match(0, match)));
rb_yield         3399 string.c       	rb_yield(str);
rb_yield         3421 string.c       	    rb_yield(line);
rb_yield         3431 string.c       	rb_yield(line);
rb_yield         3458 string.c       	rb_yield(INT2FIX(RSTRING(str)->ptr[i] & 0xff));
rb_yield         3860 string.c       	rb_yield(result);
rb_yield          394 struct.c       	rb_yield(RSTRUCT(s)->ptr[i]);
rb_yield          699 struct.c       	if (RTEST(rb_yield(RSTRUCT(s)->ptr[i]))) {


rb_yield_0

rb_yield_0       1023 eval.c         static VALUE rb_yield_0(VALUE, VALUE, VALUE, int, int);
rb_yield_0       3082 eval.c         	result = rb_yield_0(result, 0, 0, 0, node->nd_state);
rb_yield_0       4902 eval.c             return rb_yield_0(val, 0, 0, 0, Qfalse);
rb_yield_0       4913 eval.c         	return rb_yield_0(Qundef, 0, 0, 0, Qfalse);
rb_yield_0       4922 eval.c             return rb_yield_0(val, 0, 0, 0, Qtrue);
rb_yield_0       4938 eval.c             return rb_yield_0(values, 0, 0, 0, avalue);
rb_yield_0       4959 eval.c         	rb_yield_0(Qundef, 0, 0, 0, Qfalse);
rb_yield_0       6357 eval.c             return rb_yield_0(args[0], args[1], ruby_class, YIELD_PUBLIC_DEF, avalue);
rb_yield_0       8249 eval.c         	result = rb_yield_0(args, self, (self!=Qundef)?CLASS_OF(self):0,
rb_yield_0       11893 eval.c             return rb_yield_0(arg, 0, 0, YIELD_LAMBDA_CALL, Qtrue);
rb_yield_0       12942 eval.c         	val = rb_yield_0(tag, 0, 0, 0, Qfalse);


rb_yield_values

rb_yield_values  1480 array.c            VALUE retval = rb_yield_values(2, a, b);
rb_yield_values   311 enum.c                 *memo = rb_yield_values(2, *memo, i);
rb_yield_values   759 enum.c         	cmp = rb_yield_values(2, i, *memo);
rb_yield_values   818 enum.c         	cmp = rb_yield_values(2, i, *memo);
rb_yield_values   969 enum.c             rb_yield_values(2, val, INT2FIX(*memo));
rb_yield_values   345 enumerator.c       val = rb_yield_values(2, val, INT2FIX(*memo));
rb_yield_values   672 hash.c             if (RTEST(rb_yield_values(2, key, value))) {
rb_yield_values   735 hash.c             if (RTEST(rb_yield_values(2, key, value)))
rb_yield_values   991 hash.c             rb_yield_values(2, key, value);
rb_yield_values  1435 hash.c         	value = rb_yield_values(3, key, rb_hash_aref(hash, key), value);
rb_yield_values  1885 hash.c         	    rb_yield_values(2, RARRAY(ary)->ptr[i], RARRAY(ary)->ptr[i+1]);
rb_yield_values  1920 hash.c         	    if (RTEST(rb_yield_values(2, RARRAY(keys)->ptr[i], val))) {
rb_yield_values  1967 hash.c         	    if (RTEST(rb_yield_values(2, k, v))) {
rb_yield_values  2244 hash.c         	    val = rb_yield_values(3, key, rb_f_getenv(Qnil, key), val);
rb_yield_values   573 ruby.h         VALUE rb_yield_values(int n, ...);
rb_yield_values   426 struct.c       	rb_yield_values(2, rb_ary_entry(members, i), RSTRUCT(s)->ptr[i]);


rb_zlib_adler32

rb_zlib_adler32    37 ext/zlib/zlib.c static VALUE rb_zlib_adler32 _((int, VALUE*, VALUE));
rb_zlib_adler32  3431 ext/zlib/zlib.c     rb_define_module_function(mZlib, "adler32", rb_zlib_adler32, -1);


rb_zlib_crc32

rb_zlib_crc32      38 ext/zlib/zlib.c static VALUE rb_zlib_crc32 _((int, VALUE*, VALUE));
rb_zlib_crc32    3432 ext/zlib/zlib.c     rb_define_module_function(mZlib, "crc32", rb_zlib_crc32, -1);


rb_zlib_crc_table

rb_zlib_crc_table   39 ext/zlib/zlib.c static VALUE rb_zlib_crc_table _((VALUE));
rb_zlib_crc_table 3433 ext/zlib/zlib.c     rb_define_module_function(mZlib, "crc_table", rb_zlib_crc_table, 0);


rb_zlib_version

rb_zlib_version    35 ext/zlib/zlib.c static VALUE rb_zlib_version _((VALUE));
rb_zlib_version  3430 ext/zlib/zlib.c     rb_define_module_function(mZlib, "zlib_version", rb_zlib_version, 0);


rb_zstream_adler

rb_zstream_adler   77 ext/zlib/zlib.c static VALUE rb_zstream_adler _((VALUE));
rb_zstream_adler 3446 ext/zlib/zlib.c     rb_define_method(cZStream, "adler", rb_zstream_adler, 0);


rb_zstream_avail_in

rb_zstream_avail_in   73 ext/zlib/zlib.c static VALUE rb_zstream_avail_in _((VALUE));
rb_zstream_avail_in 3442 ext/zlib/zlib.c     rb_define_method(cZStream, "avail_in", rb_zstream_avail_in, 0);


rb_zstream_avail_out

rb_zstream_avail_out   71 ext/zlib/zlib.c static VALUE rb_zstream_avail_out _((VALUE));
rb_zstream_avail_out 3440 ext/zlib/zlib.c     rb_define_method(cZStream, "avail_out", rb_zstream_avail_out, 0);


rb_zstream_closed_p

rb_zstream_closed_p   79 ext/zlib/zlib.c static VALUE rb_zstream_closed_p _((VALUE));
rb_zstream_closed_p 3449 ext/zlib/zlib.c     rb_define_method(cZStream, "closed?", rb_zstream_closed_p, 0);
rb_zstream_closed_p 3450 ext/zlib/zlib.c     rb_define_method(cZStream, "ended?", rb_zstream_closed_p, 0);


rb_zstream_data_type

rb_zstream_data_type   76 ext/zlib/zlib.c static VALUE rb_zstream_data_type _((VALUE));
rb_zstream_data_type 3445 ext/zlib/zlib.c     rb_define_method(cZStream, "data_type", rb_zstream_data_type, 0);


rb_zstream_end

rb_zstream_end     66 ext/zlib/zlib.c static VALUE rb_zstream_end _((VALUE));
rb_zstream_end   3451 ext/zlib/zlib.c     rb_define_method(cZStream, "close", rb_zstream_end, 0);
rb_zstream_end   3452 ext/zlib/zlib.c     rb_define_method(cZStream, "end", rb_zstream_end, 0);


rb_zstream_finish

rb_zstream_finish   68 ext/zlib/zlib.c static VALUE rb_zstream_finish _((VALUE));
rb_zstream_finish 3454 ext/zlib/zlib.c     rb_define_method(cZStream, "finish", rb_zstream_finish, 0);


rb_zstream_finished_p

rb_zstream_finished_p   78 ext/zlib/zlib.c static VALUE rb_zstream_finished_p _((VALUE));
rb_zstream_finished_p 3447 ext/zlib/zlib.c     rb_define_method(cZStream, "finished?", rb_zstream_finished_p, 0);
rb_zstream_finished_p 3448 ext/zlib/zlib.c     rb_define_method(cZStream, "stream_end?", rb_zstream_finished_p, 0);


rb_zstream_flush_next_in

rb_zstream_flush_next_in   69 ext/zlib/zlib.c static VALUE rb_zstream_flush_next_in _((VALUE));
rb_zstream_flush_next_in 3455 ext/zlib/zlib.c     rb_define_method(cZStream, "flush_next_in", rb_zstream_flush_next_in, 0);


rb_zstream_flush_next_out

rb_zstream_flush_next_out   70 ext/zlib/zlib.c static VALUE rb_zstream_flush_next_out _((VALUE));
rb_zstream_flush_next_out 3456 ext/zlib/zlib.c     rb_define_method(cZStream, "flush_next_out", rb_zstream_flush_next_out, 0);


rb_zstream_reset

rb_zstream_reset   67 ext/zlib/zlib.c static VALUE rb_zstream_reset _((VALUE));
rb_zstream_reset 3453 ext/zlib/zlib.c     rb_define_method(cZStream, "reset", rb_zstream_reset, 0);


rb_zstream_set_avail_out

rb_zstream_set_avail_out   72 ext/zlib/zlib.c static VALUE rb_zstream_set_avail_out _((VALUE, VALUE));
rb_zstream_set_avail_out 3441 ext/zlib/zlib.c     rb_define_method(cZStream, "avail_out=", rb_zstream_set_avail_out, 1);


rb_zstream_total_in

rb_zstream_total_in   74 ext/zlib/zlib.c static VALUE rb_zstream_total_in _((VALUE));
rb_zstream_total_in 3443 ext/zlib/zlib.c     rb_define_method(cZStream, "total_in", rb_zstream_total_in, 0);


rb_zstream_total_out

rb_zstream_total_out   75 ext/zlib/zlib.c static VALUE rb_zstream_total_out _((VALUE));
rb_zstream_total_out 3444 ext/zlib/zlib.c     rb_define_method(cZStream, "total_out", rb_zstream_total_out, 0);


rbtk_invalid_namespace

rbtk_invalid_namespace  596 ext/tk/tcltklib.c           || rbtk_invalid_namespace(ptr)
rbtk_invalid_namespace 5268 ext/tk/tcltklib.c     if (rbtk_invalid_namespace(ptr)) {


rbtk_preserve_ip

rbtk_preserve_ip 4723 ext/tk/tcltklib.c     rbtk_preserve_ip(ptr);
rbtk_preserve_ip 4924 ext/tk/tcltklib.c     rbtk_preserve_ip(slave);
rbtk_preserve_ip 5609 ext/tk/tcltklib.c           rbtk_preserve_ip(ptr);
rbtk_preserve_ip 5683 ext/tk/tcltklib.c         rbtk_preserve_ip(ptr);
rbtk_preserve_ip 5894 ext/tk/tcltklib.c     rbtk_preserve_ip(ptr);
rbtk_preserve_ip 6501 ext/tk/tcltklib.c     rbtk_preserve_ip(ptr);
rbtk_preserve_ip 7025 ext/tk/tcltklib.c             rbtk_preserve_ip(ptr);
rbtk_preserve_ip 7060 ext/tk/tcltklib.c             rbtk_preserve_ip(ptr);
rbtk_preserve_ip 7159 ext/tk/tcltklib.c             rbtk_preserve_ip(ptr);
rbtk_preserve_ip 7197 ext/tk/tcltklib.c             rbtk_preserve_ip(ptr);


rbtk_release_ip

rbtk_release_ip   811 ext/tk/tcltklib.c                 rbtk_release_ip(ptr);
rbtk_release_ip  5643 ext/tk/tcltklib.c         rbtk_release_ip(ptr);
rbtk_release_ip  5652 ext/tk/tcltklib.c             rbtk_release_ip(ptr);
rbtk_release_ip  5662 ext/tk/tcltklib.c             rbtk_release_ip(ptr);
rbtk_release_ip  5670 ext/tk/tcltklib.c     rbtk_release_ip(ptr);
rbtk_release_ip  5689 ext/tk/tcltklib.c         rbtk_release_ip(ptr);
rbtk_release_ip  5698 ext/tk/tcltklib.c         rbtk_release_ip(ptr);
rbtk_release_ip  5705 ext/tk/tcltklib.c     rbtk_release_ip(ptr);
rbtk_release_ip  5920 ext/tk/tcltklib.c         rbtk_release_ip(ptr);
rbtk_release_ip  5925 ext/tk/tcltklib.c     rbtk_release_ip(ptr);
rbtk_release_ip  6519 ext/tk/tcltklib.c                 rbtk_release_ip(ptr);
rbtk_release_ip  6531 ext/tk/tcltklib.c                 rbtk_release_ip(ptr);
rbtk_release_ip  7035 ext/tk/tcltklib.c             rbtk_release_ip(ptr);
rbtk_release_ip  7046 ext/tk/tcltklib.c         rbtk_release_ip(ptr);
rbtk_release_ip  7070 ext/tk/tcltklib.c             rbtk_release_ip(ptr);
rbtk_release_ip  7077 ext/tk/tcltklib.c         rbtk_release_ip(ptr);
rbtk_release_ip  7171 ext/tk/tcltklib.c             rbtk_release_ip(ptr);
rbtk_release_ip  7182 ext/tk/tcltklib.c         rbtk_release_ip(ptr);
rbtk_release_ip  7210 ext/tk/tcltklib.c         rbtk_release_ip(ptr);


read

read              829 class.c            rb_attr(klass, rb_intern(name), read, write, Qfalse);
read              199 dln.c              size = read(fd, hdrp, sizeof(struct exec));
read              280 dln.c              if (read(fd, reloc, size) !=  size) {
read              302 dln.c              if (read(fd, &size, sizeof(int)) != sizeof(int)) {
read              313 dln.c              if (read(fd, buffer, hdrp->a_syms + size) != hdrp->a_syms + size) {
read              386 dln.c          	if (read(fd, &c, 1) == -1) {
read              391 dln.c          	if (read(fd, &c, 1) == -1) {
read              399 dln.c          	while (read(fd, &c, 1) == 1) {
read              407 dln.c          	while (read(fd, p, 1) == 1) {
read              452 dln.c              if (read(fd, addr, size) !=  size) {
read              979 dln.c              size = read(fd, armagic, SARMAG);
read              986 dln.c              size = read(fd, &ahdr, sizeof(ahdr));
read              998 dln.c          	size = read(fd, data, size);
read             1035 dln.c          		size = read(fd, &ahdr, sizeof(ahdr));
read              669 eval.c             if (read) {
read             10830 eval.c             if (!read && !write && !except) {
read             10861 eval.c         	    n = select(max, read, write, except, tvp);
read             10889 eval.c             if (read) rb_fd_copy(&curr_thread->readfds, read, max);
read             10903 eval.c             if (read) *read = *rb_fd_ptr(&curr_thread->readfds);
read               76 ext/digest/rmd160/rmd160hl.c     while ((num = read(fd, buffer, sizeof(buffer))) > 0)
read               79 ext/digest/sha1/sha1hl.c     while ((num = read(fd, buffer, sizeof(buffer))) > 0)
read               88 ext/digest/sha2/sha2hl.c 	while ((num = read(fd, buffer, sizeof(buffer))) > 0)
read              149 ext/digest/sha2/sha2hl.c 	while ((num = read(fd, buffer, sizeof(buffer))) > 0)
read              209 ext/digest/sha2/sha2hl.c 	while ((num = read(fd, buffer, sizeof(buffer))) > 0)
read              463 ext/sdbm/_sdbm.c 	    || read(db->pagf, db->pagbuf, PBLKSIZ) < 0)
read              516 ext/sdbm/_sdbm.c 		    || read(db->pagf, db->pagbuf, PBLKSIZ) < 0)
read              541 ext/sdbm/_sdbm.c 		    || read(db->dirf, db->dirbuf, DBLKSIZ) < 0)
read              564 ext/sdbm/_sdbm.c 		    || read(db->dirf, db->dirbuf, DBLKSIZ) < 0)
read              608 ext/sdbm/_sdbm.c 		if (read(db->pagf, db->pagbuf, PBLKSIZ) <= 0)
read              306 ext/syck/syck.c     if ( read != NULL )
read              308 ext/syck/syck.c         p->io.file->read = read;
read              312 ext/syck/syck.c         p->io.file->read = syck_io_file_read;
read              327 ext/syck/syck.c     if ( read != NULL )
read              329 ext/syck/syck.c         p->io.str->read = read;
read              333 ext/syck/syck.c         p->io.str->read = syck_io_str_read;
read              340 ext/syck/syck.c     syck_parser_str( p, ptr, strlen( ptr ), read );
read              453 ext/syck/syck.c             len = (p->io.str->read)( p->buffer, p->io.str, SYCK_BUFFERSIZE - 1, skip );
read              458 ext/syck/syck.c             len = (p->io.file->read)( p->buffer, p->io.file, SYCK_BUFFERSIZE - 1, skip );
read              475 ext/syck/syck.c             len = (p->io.str->read)( p->buffer, p->io.str, max_size, skip );
read              480 ext/syck/syck.c             len = (p->io.file->read)( p->buffer, p->io.file, max_size, skip );
read              199 ext/syck/syck.h     SyckIoFileRead read;
read              206 ext/syck/syck.h     SyckIoStrRead read;
read              882 io.c                   r = read(fptr->fd, fptr->rbuf, fptr->rbuf_capa);
read             1280 io.c                   n = read(fptr->fd, RSTRING(str)->ptr, len);
read             2348 io.c               n = read(fptr->fd, RSTRING(str)->ptr, ilen);
read             4407 io.c               if (!NIL_P(read)) {
read             4408 io.c           	Check_Type(read, T_ARRAY);
read             4409 io.c           	for (i=0; i<RARRAY(read)->len; i++) {
read             4410 io.c           	    GetOpenFile(rb_io_get_io(RARRAY(read)->ptr[i]), fptr);
read             4468 io.c           	    for (i=0; i< RARRAY(read)->len; i++) {
read             4469 io.c           		GetOpenFile(rb_io_get_io(RARRAY(read)->ptr[i]), fptr);
read             4472 io.c           		    rb_ary_push(list, rb_ary_entry(read, i));
read             4502 io.c               VALUE read, write, except;
read             4514 io.c               return select_internal(p->read, p->write, p->except, p->timeout, p->fdsets);
read             4548 io.c               rb_scan_args(argc, argv, "13", &args.read, &args.write, &args.except, &timeout);
read             4563 io.c               return select_internal(args.read, args.write, args.except,
read             1368 process.c      	if ((state = read(ep[0], &err, sizeof(err))) < 0) {
read              288 random.c                   read(fd, seed, seed_len);


read_all

read_all         1396 io.c           	return read_all(fptr, remain_size(fptr), str);
read_all         1557 io.c           	str = read_all(fptr, 0, Qnil);
read_all         4385 io.c               result = read_all(fptr, remain_size(fptr), Qnil);


read_buffered_data

read_buffered_data 1147 io.c           	c = read_buffered_data(RSTRING(str)->ptr+offset, n, fptr);
read_buffered_data 1275 io.c               n = read_buffered_data(RSTRING(str)->ptr, len, fptr);
read_buffered_data 1460 io.c           	    read_buffered_data(RSTRING(str)->ptr + last, pending, fptr); /* must not fail */
read_buffered_data 1509 io.c           	    if (!read_buffered_data(buf, cnt - i, fptr)) /* must not fail */


read_escape

read_escape      4870 parse.y        	    return read_escape() | 0x80;
read_escape      4885 parse.y        	    c = read_escape();
read_escape      5109 parse.y        		    c = read_escape();
read_escape      5928 parse.y        	    c = read_escape();


readable

readable           36 ext/stringio/stringio.c static struct StringIO* readable _((struct StringIO *));
readable          485 ext/stringio/stringio.c     struct StringIO *ptr = readable(StringIO(self));
readable          692 ext/stringio/stringio.c     struct StringIO *ptr = readable(StringIO(self));
readable          710 ext/stringio/stringio.c     struct StringIO *ptr = readable(StringIO(self));
readable          752 ext/stringio/stringio.c     struct StringIO *ptr = readable(StringIO(self));
readable          911 ext/stringio/stringio.c     VALUE str = strio_getline(argc, argv, readable(StringIO(self)));
readable          929 ext/stringio/stringio.c     VALUE line = strio_getline(argc, argv, readable(StringIO(self)));
readable          950 ext/stringio/stringio.c     while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) {
readable          970 ext/stringio/stringio.c     while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) {
readable         1084 ext/stringio/stringio.c     struct StringIO *ptr = readable(StringIO(self));


readdir

readdir           510 dir.c              dp = readdir(dirp->dir);
readdir           549 dir.c              for (dp = readdir(dirp->dir); dp != NULL; dp = readdir(dirp->dir)) {
readdir          1228 dir.c          	for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp)) {


readline_attempted_completion_function

readline_attempted_completion_function   41 ext/readline/readline.c static char **readline_attempted_completion_function(const char *text,
readline_attempted_completion_function  832 ext/readline/readline.c     rl_attempted_completion_function = readline_attempted_completion_function;


readline_event

readline_event     40 ext/readline/readline.c static int readline_event(void);
readline_event    834 ext/readline/readline.c     rl_event_hook = readline_event;


readonly_setter

readonly_setter   473 variable.c         rb_define_hooked_variable(name, var, 0, readonly_setter);
readonly_setter   483 variable.c         if (!setter) setter = readonly_setter;


realloc

realloc          9617 eval.c         	fds->fdset = realloc(fds->fdset, m);
realloc          9660 eval.c             dst->fdset = realloc(dst->fdset, size);
realloc          10108 eval.c         	VALUE *ptr = realloc(th->stk_ptr, sizeof(VALUE) * len);
realloc          10121 eval.c                 VALUE *ptr = realloc(th->bstr_ptr, sizeof(VALUE) * len);
realloc          4093 ext/nkf/nkf-utf8/nkf.c 			lwsp_buf_new = realloc(lwsp_buf, (lwsp_size+5)*sizeof(char));
realloc          4212 ext/nkf/nkf-utf8/nkf.c 		    lwsp_buf_new = realloc(lwsp_buf, (lwsp_size+5)*sizeof(char));
realloc            53 ext/syck/syck.h #define S_REALLOC_N(var,type,n) (var)=(type*)realloc((char*)(var),sizeof(type)*(n))
realloc           157 gc.c               RUBY_CRITICAL(mem = realloc(ptr, size));
realloc           160 gc.c           	    RUBY_CRITICAL(mem = realloc(ptr, size));
realloc           345 gc.c           		p = (struct heaps_slot *)realloc(heaps, length);
realloc           256 missing/strftime.c 			savetz = (char *) realloc(savetz, i);
realloc            88 regint.h       #define xrealloc    realloc
realloc          1435 win32/win32.c  	#define Renew(x, y, z) (x = (z *)realloc(x, y))


recv

recv              300 enumerator.c       VALUE recv, meth = sym_each;
recv              304 enumerator.c       recv = *argv++;
recv              309 enumerator.c       return enumerator_init(obj, recv, meth, argc, argv);
recv               61 env.h              VALUE recv;
recv              651 error.c            ptr[1] = recv;
recv             3009 eval.c         		    VALUE recv;
recv             3013 eval.c         		    recv = rb_eval(self, node->nd_iter);
recv             3017 eval.c         		    result = rb_call(CLASS_OF(recv),recv,each,0,0,CALLING_NORMAL);
recv             3241 eval.c         	    VALUE recv;
recv             3248 eval.c         		recv = self;
recv             3252 eval.c         		recv = rb_eval(self, node->nd_recv);
recv             3260 eval.c         	    rb_call(CLASS_OF(recv),recv,node->nd_mid,argc,argv,scope);
recv             3267 eval.c         	    VALUE recv;
recv             3272 eval.c         	    recv = rb_eval(self, node->nd_recv);
recv             3278 eval.c         	    result = rb_call(CLASS_OF(recv),recv,node->nd_mid,argc,argv,CALLING_NORMAL);
recv             3386 eval.c         	    VALUE recv, val;
recv             3390 eval.c         	    recv = rb_eval(self, node->nd_recv);
recv             3393 eval.c         	    val = rb_funcall2(recv, aref, argc-1, argv);
recv             3407 eval.c         	    rb_funcall2(recv, aset, argc, argv);
recv             3415 eval.c         	    VALUE recv, val;
recv             3417 eval.c         	    recv = rb_eval(self, node->nd_recv);
recv             3418 eval.c         	    val = rb_funcall(recv, id, 0);
recv             3433 eval.c         	    rb_funcall2(recv, node->nd_next->nd_aid, 1, &val);
recv             3771 eval.c         	    VALUE recv = rb_eval(self, node->nd_recv);
recv             3775 eval.c         	    if (ruby_safe_level >= 4 && !OBJ_TAINTED(recv)) {
recv             3778 eval.c         	    if (FIXNUM_P(recv) || SYMBOL_P(recv)) {
recv             3782 eval.c         			 rb_obj_classname(recv));
recv             3785 eval.c         	    if (OBJ_FROZEN(recv)) rb_error_frozen("object");
recv             3786 eval.c         	    klass = rb_singleton_class(recv);
recv             5066 eval.c         	    VALUE recv;
recv             5069 eval.c         		recv = self;
recv             5073 eval.c         		recv = rb_eval(self, lhs->nd_recv);
recv             5080 eval.c         		rb_call(CLASS_OF(recv), recv, lhs->nd_mid, 1, &val, scope);
recv             5090 eval.c         		rb_call(CLASS_OF(recv), recv, lhs->nd_mid,
recv             5429 eval.c         	return (*func)(recv, rb_ary_new4(argc, argv));
recv             5432 eval.c         	return (*func)(argc, argv, recv);
recv             5435 eval.c         	return (*func)(recv);
recv             5438 eval.c         	return (*func)(recv, argv[0]);
recv             5441 eval.c         	return (*func)(recv, argv[0], argv[1]);
recv             5444 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2]);
recv             5447 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2], argv[3]);
recv             5450 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4]);
recv             5453 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
recv             5457 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
recv             5461 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
recv             5465 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
recv             5469 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
recv             5473 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
recv             5477 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
recv             5482 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
recv             5487 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
recv             5492 eval.c         	return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
recv             5548 eval.c         	    assign(recv, opt->nd_head, *argv, 1);
recv             5554 eval.c         	    rb_eval(recv, opt);
recv             5570 eval.c         	assign(recv, node->nd_rest, v, 1);
recv             5614 eval.c             ruby_frame->self = recv;
recv             5631 eval.c         				recv, id, klass);
recv             5634 eval.c         		    result = call_cfunc(body->nd_cfnc, recv, len, argc, argv);
recv             5639 eval.c         				recv, id, klass);
recv             5643 eval.c         		result = call_cfunc(body->nd_cfnc, recv, len, argc, argv);
recv             5653 eval.c         	result = rb_attr_get(recv, body->nd_vid);
recv             5659 eval.c         	result = rb_ivar_set(recv, body->nd_vid, argv[0]);
recv             5668 eval.c         	result = proc_invoke(body->nd_cval, rb_ary_new4(argc, argv), recv, klass);
recv             5718 eval.c         		    ruby_frame->argc = formal_assign(recv, node, argc, argv, local_vars);
recv             5722 eval.c         		    EXEC_EVENT_HOOK(RUBY_EVENT_CALL, b2, recv, id, klass);
recv             5724 eval.c         		result = rb_eval(recv, body);
recv             5737 eval.c         		EXEC_EVENT_HOOK(RUBY_EVENT_RETURN, body, recv, id, klass);
recv             5778 eval.c         		 rb_id2name(mid), recv);
recv             5784 eval.c         	    return method_missing(recv, mid, argc, argv, scope==CALLING_VCALL?CSTAT_VCALL:0);
recv             5792 eval.c         	    return method_missing(recv, mid, argc, argv, CSTAT_SUPER);
recv             5794 eval.c         	return method_missing(recv, mid, argc, argv, scope==CALLING_VCALL?CSTAT_VCALL:0);
recv             5800 eval.c         	    return method_missing(recv, mid, argc, argv, CSTAT_PRIV);
recv             5810 eval.c         		return method_missing(recv, mid, argc, argv, CSTAT_PROT);
recv             5816 eval.c             return rb_call0(klass, recv, mid, id, argc, argv, body, noex);
recv             5828 eval.c             return rb_call(CLASS_OF(recv), recv, mid, argc, argv, CALLING_FCALL);
recv             5840 eval.c             vid = rb_call(CLASS_OF(recv), recv, rb_to_id(vid), argc, argv, scope);
recv             5874 eval.c             return send_funcall(argc, argv, recv, scope);
recv             5892 eval.c             return send_funcall(argc, argv, recv, CALLING_FCALL);
recv             5916 eval.c             return rb_call(CLASS_OF(recv), recv, mid, n, argv, CALLING_FCALL);
recv             5922 eval.c             return rb_call(CLASS_OF(recv), recv, mid, argc, argv, CALLING_FCALL);
recv             5928 eval.c             return rb_call(CLASS_OF(recv), recv, mid, argc, argv, CALLING_NORMAL);
recv             8633 eval.c             rb_gc_mark(data->recv);
recv             8664 eval.c             data->recv = obj;
recv             8723 eval.c         	m1->recv != m2->recv || m1->body != m2->body)
recv             8745 eval.c             hash ^= (long)m->recv;
recv             8769 eval.c             data->recv = Qundef;
recv             8890 eval.c             if (data->recv == Qundef) {
recv             8900 eval.c             result = rb_call0(data->klass,data->recv,data->id,data->oid,argc,argv,data->body,safe);
recv             9000 eval.c             VALUE rklass = CLASS_OF(recv), klass = rklass;
recv             9014 eval.c         	else if (!rb_obj_is_kind_of(recv, data->rklass)) {
recv             9023 eval.c             bound->recv = recv;
recv             9150 eval.c         	if (data->recv == Qundef) {
recv             9153 eval.c         	else if (data->recv == v) {
recv             9158 eval.c         	    rb_str_buf_append(str, rb_inspect(data->recv));
recv              271 parse.y        #define call_op(recv,id,narg,arg1) call_op_gen(parser, recv,id,narg,arg1)
recv             7125 parse.y            return NEW_CALL(recv, id, arg1);
recv             7290 parse.y            if (recv && nd_type(recv) == NODE_SELF)
recv             7291 parse.y        	recv = (NODE *)1;
recv             7293 parse.y        	value_expr(recv);
recv             7294 parse.y            return NEW_ATTRASGN(recv, tASET, idx);
recv             7316 parse.y            if (recv && nd_type(recv) == NODE_SELF)
recv             7317 parse.y        	recv = (NODE *)1;
recv             7319 parse.y        	value_expr(recv);
recv             7320 parse.y            return NEW_ATTRASGN(recv, rb_id_attrset(id), 0);
recv             2351 win32/win32.c  	r = recv(TO_SOCKET(s), buf, len, flags);


recvfrom

recvfrom          593 ext/socket/socket.c     slen = recvfrom(fd, RSTRING(str)->ptr, buflen, flags, (struct sockaddr*)buf, &alen);
recvfrom         2369 win32/win32.c  	r = recvfrom(TO_SOCKET(s), buf, len, flags, from, fromlen);


reduce

reduce            221 ext/racc/cparse/cparse.c static int reduce _((struct cparse_params* v, long act));
reduce            415 ext/racc/cparse/cparse.c     switch (reduce(v,act)) {  \


reduce0

reduce0           223 ext/racc/cparse/cparse.c static VALUE reduce0 _((VALUE block_args, VALUE data, VALUE self));
reduce0           661 ext/racc/cparse/cparse.c     code = rb_iterate(catch_iter, Qnil, reduce0, v->value_v);


reduce_nodes

reduce_nodes      259 parse.y        static void reduce_nodes(NODE**);
reduce_nodes     2853 parse.y        			reduce_nodes(&body);
reduce_nodes     2882 parse.y        			reduce_nodes(&body);
reduce_nodes     7567 parse.y             (reduce_nodes(&node->n1), body = &node->n2, 1))


reference_count

reference_count  1880 ext/win32ole/win32ole.c     return INT2NUM(reference_count(pole));
reference_count  1901 ext/win32ole/win32ole.c         if (reference_count(pole) > 0) {


reg_enum_key

reg_enum_key     1403 ext/win32ole/win32ole.c         clsid = reg_enum_key(htypelib, i);
reg_enum_key     1411 ext/win32ole/win32ole.c             ver = reg_enum_key(hclsid, j);
reg_enum_key     1423 ext/win32ole/win32ole.c                     lang = reg_enum_key(hversion, k);
reg_enum_key     3629 ext/win32ole/win32ole.c         clsid = reg_enum_key(htypelib, i);
reg_enum_key     3637 ext/win32ole/win32ole.c             ver = reg_enum_key(hclsid, j);
reg_enum_key     3675 ext/win32ole/win32ole.c         clsid = reg_enum_key(hclsids, i);
reg_enum_key     3800 ext/win32ole/win32ole.c         guid = reg_enum_key(htypelib, i);
reg_enum_key     3807 ext/win32ole/win32ole.c             version = reg_enum_key(hguid, j);
reg_enum_key     3882 ext/win32ole/win32ole.c 	        ver = reg_enum_key(hguid, j);
reg_enum_key     3928 ext/win32ole/win32ole.c         guid = reg_enum_key(htypelib, i);
reg_enum_key     3935 ext/win32ole/win32ole.c             ver = reg_enum_key(hguid, j);
reg_enum_key     4118 ext/win32ole/win32ole.c         lang = reg_enum_key(hkey, k);


reg_get_typelib_file_path

reg_get_typelib_file_path 1428 ext/win32ole/win32ole.c                         if ((file = reg_get_typelib_file_path(hlang)) != Qnil)
reg_get_typelib_file_path 4123 ext/win32ole/win32ole.c             path = reg_get_typelib_file_path(hlang);


reg_get_val

reg_get_val      1341 ext/win32ole/win32ole.c     path = reg_get_val(hkey, "win32");
reg_get_val      1343 ext/win32ole/win32ole.c         path = reg_get_val(hkey, "win16");
reg_get_val      1377 ext/win32ole/win32ole.c     typelib = reg_get_val(hclsid, "InprocServer32");
reg_get_val      1418 ext/win32ole/win32ole.c             typelib = reg_get_val(hversion, NULL);
reg_get_val      3643 ext/win32ole/win32ole.c             if ( (v = reg_get_val(hclsid, StringValuePtr(ver))) != Qnil ) {
reg_get_val      3681 ext/win32ole/win32ole.c         if ((v = reg_get_val(hclsid, "ProgID")) != Qnil)
reg_get_val      3683 ext/win32ole/win32ole.c         if ((v = reg_get_val(hclsid, "VersionIndependentProgID")) != Qnil)
reg_get_val      3810 ext/win32ole/win32ole.c             if ( (name = reg_get_val(hguid, StringValuePtr(version))) != Qnil ) {
reg_get_val      3872 ext/win32ole/win32ole.c             tlib = reg_get_val(hversion, NULL);
reg_get_val      3888 ext/win32ole/win32ole.c 	        tlib = reg_get_val(hversion, NULL);
reg_get_val      3941 ext/win32ole/win32ole.c             tlib = reg_get_val(hversion, NULL);


reg_open_key

reg_open_key     1303 ext/win32ole/win32ole.c     return reg_open_key(hkey, StringValuePtr(key), phkey);
reg_open_key     1368 ext/win32ole/win32ole.c     err = reg_open_key(HKEY_CLASSES_ROOT, "CLSID", &hroot);
reg_open_key     1372 ext/win32ole/win32ole.c     err = reg_open_key(hroot, StringValuePtr(vclsid), &hclsid);
reg_open_key     1398 ext/win32ole/win32ole.c     err = reg_open_key(HKEY_CLASSES_ROOT, "TypeLib", &htypelib);
reg_open_key     3624 ext/win32ole/win32ole.c     err = reg_open_key(HKEY_CLASSES_ROOT, "TypeLib", &htypelib);
reg_open_key     3670 ext/win32ole/win32ole.c     err = reg_open_key(HKEY_CLASSES_ROOT, "CLSID", &hclsids);
reg_open_key     3795 ext/win32ole/win32ole.c     err = reg_open_key(HKEY_CLASSES_ROOT, "TypeLib", &htypelib);
reg_open_key     3860 ext/win32ole/win32ole.c     err = reg_open_key(HKEY_CLASSES_ROOT, "TypeLib", &htypelib);
reg_open_key     3923 ext/win32ole/win32ole.c     err = reg_open_key(HKEY_CLASSES_ROOT, "TypeLib", &htypelib);


reg_open_vkey

reg_open_vkey    1406 ext/win32ole/win32ole.c         err = reg_open_vkey(htypelib, clsid, &hclsid);
reg_open_vkey    1414 ext/win32ole/win32ole.c             err = reg_open_vkey(hclsid, ver, &hversion);
reg_open_vkey    1426 ext/win32ole/win32ole.c                     err = reg_open_vkey(hversion, lang, &hlang);
reg_open_vkey    3632 ext/win32ole/win32ole.c         err = reg_open_vkey(htypelib, clsid, &hclsid);
reg_open_vkey    3678 ext/win32ole/win32ole.c         err = reg_open_vkey(hclsids, clsid, &hclsid);
reg_open_vkey    3803 ext/win32ole/win32ole.c         err = reg_open_vkey(htypelib, guid, &hguid);
reg_open_vkey    3864 ext/win32ole/win32ole.c     err = reg_open_vkey(htypelib, guid, &hguid);
reg_open_vkey    3870 ext/win32ole/win32ole.c         err = reg_open_vkey(hguid, version_str, &hversion);
reg_open_vkey    3885 ext/win32ole/win32ole.c 	        err = reg_open_vkey(hguid, ver, &hversion);
reg_open_vkey    3931 ext/win32ole/win32ole.c         err = reg_open_vkey(htypelib, guid, &hguid);
reg_open_vkey    3938 ext/win32ole/win32ole.c             err = reg_open_vkey(hguid, ver, &hversion);
reg_open_vkey    4113 ext/win32ole/win32ole.c     err = reg_open_vkey(HKEY_CLASSES_ROOT, key, &hkey);
reg_open_vkey    4121 ext/win32ole/win32ole.c         err = reg_open_vkey(hkey, lang, &hlang);


regex_t

regex_t           785 oniguruma.h    int onig_new P_((regex_t**, const UChar* pattern, const UChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo));
regex_t           787 oniguruma.h    int onig_new_deluxe P_((regex_t** reg, const UChar* pattern, const UChar* pattern_end, OnigCompileInfo* ci, OnigErrorInfo* einfo));
regex_t           789 oniguruma.h    void onig_free P_((regex_t*));
regex_t           791 oniguruma.h    int onig_recompile P_((regex_t*, const UChar* pattern, const UChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo));
regex_t           793 oniguruma.h    int onig_recompile_deluxe P_((regex_t* reg, const UChar* pattern, const UChar* pattern_end, OnigCompileInfo* ci, OnigErrorInfo* einfo));
regex_t           795 oniguruma.h    int onig_search P_((regex_t*, const UChar* str, const UChar* end, const UChar* start, const UChar* range, OnigRegion* region, OnigOptionType option));
regex_t           797 oniguruma.h    int onig_match P_((regex_t*, const UChar* str, const UChar* end, const UChar* at, OnigRegion* region, OnigOptionType option));
regex_t           813 oniguruma.h    int onig_name_to_group_numbers P_((regex_t* reg, const UChar* name, const UChar* name_end, int** nums));
regex_t           815 oniguruma.h    int onig_name_to_backref_number P_((regex_t* reg, const UChar* name, const UChar* name_end, OnigRegion *region));
regex_t           817 oniguruma.h    int onig_foreach_name P_((regex_t* reg, int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*), void* arg));
regex_t           819 oniguruma.h    int onig_number_of_names P_((regex_t* reg));
regex_t           821 oniguruma.h    int onig_number_of_captures P_((regex_t* reg));
regex_t           823 oniguruma.h    int onig_number_of_capture_histories P_((regex_t* reg));
regex_t           829 oniguruma.h    OnigEncoding onig_get_encoding P_((regex_t* reg));
regex_t           831 oniguruma.h    OnigOptionType onig_get_options P_((regex_t* reg));
regex_t           833 oniguruma.h    OnigAmbigType onig_get_ambig_flag P_((regex_t* reg));
regex_t           835 oniguruma.h    OnigSyntaxType* onig_get_syntax P_((regex_t* reg));
regex_t           824 re.c           	regex_t *reg;
regex_t           183 regcomp.c      add_opcode(regex_t* reg, int opcode)
regex_t           190 regcomp.c      add_rel_addr(regex_t* reg, int addr)
regex_t           199 regcomp.c      add_abs_addr(regex_t* reg, int addr)
regex_t           208 regcomp.c      add_length(regex_t* reg, int len)
regex_t           217 regcomp.c      add_mem_num(regex_t* reg, int num)
regex_t           226 regcomp.c      add_pointer(regex_t* reg, void* addr)
regex_t           235 regcomp.c      add_option(regex_t* reg, OnigOptionType option)
regex_t           242 regcomp.c      add_opcode_rel_addr(regex_t* reg, int opcode, int addr)
regex_t           253 regcomp.c      add_bytes(regex_t* reg, UChar* bytes, int len)
regex_t           260 regcomp.c      add_bitset(regex_t* reg, BitSetRef bs)
regex_t           267 regcomp.c      add_opcode_option(regex_t* reg, int opcode, OnigOptionType option)
regex_t           277 regcomp.c      static int compile_length_tree(Node* node, regex_t* reg);
regex_t           278 regcomp.c      static int compile_tree(Node* node, regex_t* reg);
regex_t           331 regcomp.c      compile_tree_empty_check(Node* node, regex_t* reg, int empty_info)
regex_t           363 regcomp.c      compile_call(CallNode* node, regex_t* reg)
regex_t           378 regcomp.c      compile_tree_n_times(Node* node, int n, regex_t* reg)
regex_t           391 regcomp.c                                regex_t* reg, int ignore_case)
regex_t           408 regcomp.c                         regex_t* reg, int ignore_case)
regex_t           429 regcomp.c      compile_length_string_node(Node* node, regex_t* reg)
regex_t           468 regcomp.c      compile_length_string_raw_node(StrNode* sn, regex_t* reg)
regex_t           477 regcomp.c      compile_string_node(Node* node, regex_t* reg)
regex_t           516 regcomp.c      compile_string_raw_node(StrNode* sn, regex_t* reg)
regex_t           525 regcomp.c      add_multi_byte_cclass(BBuf* mbuf, regex_t* reg)
regex_t           548 regcomp.c      compile_length_cclass_node(CClassNode* cc, regex_t* reg)
regex_t           578 regcomp.c      compile_cclass_node(CClassNode* cc, regex_t* reg)
regex_t           621 regcomp.c      entry_repeat_range(regex_t* reg, int id, int lower, int upper)
regex_t           653 regcomp.c                                regex_t* reg)
regex_t           690 regcomp.c      compile_length_qualifier_node(QualifierNode* qn, regex_t* reg)
regex_t           765 regcomp.c      compile_qualifier_node(QualifierNode* qn, regex_t* reg)
regex_t           892 regcomp.c      compile_length_option_node(EffectNode* node, regex_t* reg)
regex_t           912 regcomp.c      compile_option_node(EffectNode* node, regex_t* reg)
regex_t           938 regcomp.c      compile_length_effect_node(EffectNode* node, regex_t* reg)
regex_t          1001 regcomp.c      static int get_char_length_tree(Node* node, regex_t* reg, int* len);
regex_t          1004 regcomp.c      compile_effect_node(EffectNode* node, regex_t* reg)
regex_t          1105 regcomp.c      compile_length_anchor_node(AnchorNode* node, regex_t* reg)
regex_t          1138 regcomp.c      compile_anchor_node(AnchorNode* node, regex_t* reg)
regex_t          1222 regcomp.c      compile_length_tree(Node* node, regex_t* reg)
regex_t          1308 regcomp.c      compile_tree(Node* node, regex_t* reg)
regex_t          1603 regcomp.c      disable_noname_group_capture(Node** root, regex_t* reg, ScanEnv* env)
regex_t          1645 regcomp.c      unset_addr_list_fix(UnsetAddrList* uslist, regex_t* reg)
regex_t          1990 regcomp.c      get_char_length_tree1(Node* node, regex_t* reg, int* len, int level)
regex_t          2118 regcomp.c      get_char_length_tree(Node* node, regex_t* reg, int* len)
regex_t          2148 regcomp.c      is_not_included(Node* x, Node* y, regex_t* reg)
regex_t          2332 regcomp.c      get_head_value_node(Node* node, int exact, regex_t* reg)
regex_t          2883 regcomp.c      setup_look_behind(Node* node, regex_t* reg, ScanEnv* env)
regex_t          2904 regcomp.c      next_setup(Node* node, Node* next_node, regex_t* reg)
regex_t          2947 regcomp.c      divide_ambig_string_node(Node* node, regex_t* reg)
regex_t          3064 regcomp.c      setup_tree(Node* node, regex_t* reg, int state, ScanEnv* env)
regex_t          4299 regcomp.c      set_optimize_exact_info(regex_t* reg, OptExactInfo* e)
regex_t          4349 regcomp.c      set_optimize_map_info(regex_t* reg, OptMapInfo* m)
regex_t          4366 regcomp.c      set_sub_anchor(regex_t* reg, OptAncInfo* anc)
regex_t          4373 regcomp.c      static void print_optimize_info(FILE* f, regex_t* reg);
regex_t          4377 regcomp.c      set_optimize_info_from_tree(Node* node, regex_t* reg, ScanEnv* scan_env)
regex_t          4432 regcomp.c      clear_optimize_info(regex_t* reg)
regex_t          4515 regcomp.c      print_optimize_info(FILE* f, regex_t* reg)
regex_t          4569 regcomp.c      onig_free_body(regex_t* reg)
regex_t          4584 regcomp.c      onig_free(regex_t* reg)
regex_t          4595 regcomp.c        xmemcpy(to, from, sizeof(regex_t));\
regex_t          4600 regcomp.c      onig_transfer(regex_t* to, regex_t* from)
regex_t          4614 regcomp.c      onig_chain_link_add(regex_t* to, regex_t* add)
regex_t          4623 regcomp.c      onig_chain_reduce(regex_t* reg)
regex_t          4625 regcomp.c        regex_t *head, *prev;
regex_t          4636 regcomp.c          prev->chain = (regex_t* )NULL;
regex_t          4644 regcomp.c      onig_clone(regex_t** to, regex_t* from)
regex_t          4647 regcomp.c        regex_t* reg;
regex_t          4676 regcomp.c        reg->chain = (regex_t* )NULL;
regex_t          4721 regcomp.c      static void print_compiled_byte_code_list P_((FILE* f, regex_t* reg));
regex_t          4728 regcomp.c      onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end,
regex_t          4879 regcomp.c      onig_recompile(regex_t* reg, const UChar* pattern, const UChar* pattern_end,
regex_t          4884 regcomp.c        regex_t *new_reg;
regex_t          4900 regcomp.c      onig_alloc_init(regex_t** reg, OnigOptionType option, OnigAmbigType ambig_flag,
regex_t          4909 regcomp.c        *reg = (regex_t* )xmalloc(sizeof(regex_t));
regex_t          4927 regcomp.c        (*reg)->chain            = (regex_t* )NULL;
regex_t          4941 regcomp.c      onig_new(regex_t** reg, const UChar* pattern, const UChar* pattern_end,
regex_t          5356 regcomp.c      print_compiled_byte_code_list(FILE* f, regex_t* reg)
regex_t           952 regexec.c                                StackType* stk_top, UChar* str, regex_t* reg)
regex_t           995 regexec.c        regex_t*  reg;
regex_t          1029 regexec.c      onig_exec_trap(regex_t* reg, MatchArg* msa, StackType* stk_base)
regex_t          1200 regexec.c      match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
regex_t          2726 regexec.c      bm_search_notrev(regex_t* reg, const UChar* target, const UChar* target_end,
regex_t          2794 regexec.c      bm_search(regex_t* reg, const UChar* target, const UChar* target_end,
regex_t          2853 regexec.c      bm_search_backward(regex_t* reg, const UChar* target, const UChar* target_end,
regex_t          2911 regexec.c      onig_match(regex_t* reg, const UChar* str, const UChar* end, const UChar* at, OnigRegion* region,
regex_t          2960 regexec.c      forward_search_range(regex_t* reg, const UChar* str, const UChar* end, UChar* s,
regex_t          3085 regexec.c      backward_search_range(regex_t* reg, const UChar* str, const UChar* end,
regex_t          3184 regexec.c      onig_search(regex_t* reg, const UChar* str, const UChar* end,
regex_t          3492 regexec.c      onig_get_encoding(regex_t* reg)
regex_t          3498 regexec.c      onig_get_options(regex_t* reg)
regex_t          3504 regexec.c      onig_get_ambig_flag(regex_t* reg)
regex_t          3510 regexec.c      onig_get_syntax(regex_t* reg)
regex_t          3516 regexec.c      onig_number_of_captures(regex_t* reg)
regex_t          3522 regexec.c      onig_number_of_capture_histories(regex_t* reg)
regex_t           787 regint.h       extern int  onig_alloc_init P_((regex_t** reg, OnigOptionType option, OnigAmbigType ambig_flag, OnigEncoding enc, OnigSyntaxType* syntax));
regex_t           788 regint.h       extern int  onig_compile P_((regex_t* reg, const UChar* pattern, const UChar* pattern_end, OnigErrorInfo* einfo));
regex_t           789 regint.h       extern void onig_chain_reduce P_((regex_t* reg));
regex_t           790 regint.h       extern void onig_chain_link_add P_((regex_t* to, regex_t* add));
regex_t           791 regint.h       extern void onig_transfer P_((regex_t* to, regex_t* from));
regex_t           419 regparse.c     onig_print_names(FILE* fp, regex_t* reg)
regex_t           443 regparse.c     names_clear(regex_t* reg)
regex_t           454 regparse.c     onig_names_free(regex_t* reg)
regex_t           469 regparse.c     name_find(regex_t* reg, const UChar* name, const UChar* name_end)
regex_t           482 regparse.c       int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*);
regex_t           483 regparse.c       regex_t* reg;
regex_t           506 regparse.c     onig_foreach_name(regex_t* reg,
regex_t           507 regparse.c     	   int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*),
regex_t           542 regparse.c     onig_renumber_name_table(regex_t* reg, GroupNumRemap* map)
regex_t           554 regparse.c     onig_number_of_names(regex_t* reg)
regex_t           577 regparse.c     onig_print_names(FILE* fp, regex_t* reg)
regex_t           609 regparse.c     names_clear(regex_t* reg)
regex_t           638 regparse.c     onig_names_free(regex_t* reg)
regex_t           653 regparse.c     name_find(regex_t* reg, UChar* name, UChar* name_end)
regex_t           671 regparse.c     onig_foreach_name(regex_t* reg,
regex_t           672 regparse.c     	   int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*),
regex_t           692 regparse.c     onig_number_of_names(regex_t* reg)
regex_t           705 regparse.c     name_add(regex_t* reg, UChar* name, UChar* name_end, int backref, ScanEnv* env)
regex_t           812 regparse.c     onig_name_to_group_numbers(regex_t* reg, const UChar* name,
regex_t           834 regparse.c     onig_name_to_backref_number(regex_t* reg, const UChar* name,
regex_t           860 regparse.c     onig_name_to_group_numbers(regex_t* reg, const UChar* name,
regex_t           867 regparse.c     onig_name_to_backref_number(regex_t* reg, const UChar* name,
regex_t           874 regparse.c     onig_foreach_name(regex_t* reg,
regex_t           875 regparse.c     	   int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*),
regex_t           882 regparse.c     onig_number_of_names(regex_t* reg)
regex_t          5149 regparse.c     onig_parse_make_tree(Node** root, const UChar* pattern, const UChar* end, regex_t* reg,
regex_t           265 regparse.h       regex_t*        reg;       /* for reg->names only */
regex_t           290 regparse.h     extern int    onig_renumber_name_table P_((regex_t* reg, GroupNumRemap* map));
regex_t           307 regparse.h     extern int    onig_names_free P_((regex_t* reg));
regex_t           308 regparse.h     extern int    onig_parse_make_tree P_((Node** root, const UChar* pattern, const UChar* end, regex_t* reg, ScanEnv* env));
regex_t           312 regparse.h     extern int onig_print_names(FILE*, regex_t*);


register_stack_extend

register_stack_extend 10278 eval.c                 register_stack_extend(th, exit, &exit, (VALUE*)rb_ia64_bsp());
register_stack_extend 10307 eval.c             register_stack_extend(th, exit, space, (VALUE*)rb_ia64_bsp());


regoff_t

regoff_t         1193 regexec.c        regoff_t  rm_so;
regoff_t         1194 regexec.c        regoff_t  rm_eo;


rehash

rehash             54 st.c           static void rehash(st_table *);
rehash            256 st.c           	rehash(table);\


reinit

reinit            359 ext/nkf/nkf-utf8/nkf.c STATIC  void    reinit PROTO(());
reinit             88 ext/nkf/nkf.c    reinit();
reinit            228 ext/nkf/nkf.c    reinit();


remain_size

remain_size      1396 io.c           	return read_all(fptr, remain_size(fptr), str);
remain_size      4385 io.c               result = read_all(fptr, remain_size(fptr), Qnil);


remove_begin

remove_begin      254 parse.y        static NODE *remove_begin(NODE*);
remove_begin      255 parse.y        #define value_expr(node) value_expr_gen(parser, (node) = remove_begin(node))
remove_begin      256 parse.y        #define void_expr(node) void_expr_gen(parser, (node) = remove_begin(node))
remove_begin      709 parse.y        			$$ = newline_node(remove_begin($1));
remove_begin      717 parse.y        			$$ = block_append($1, newline_node(remove_begin($3)));
remove_begin      724 parse.y        			$$ = remove_begin($2);
remove_begin     2852 parse.y        			NODE *body = remove_begin($5);
remove_begin     2881 parse.y        			NODE *body = remove_begin($8);


remove_method

remove_method     548 eval.c             remove_method(klass, rb_intern(name));
remove_method     565 eval.c         	remove_method(mod, rb_to_id(argv[i]));


remove_sign_bits

remove_sign_bits  573 sprintf.c      			    remove_sign_bits(s, base);
remove_sign_bits  619 sprintf.c      				remove_sign_bits(++s, base);


remove_trace

remove_trace      601 variable.c     	if (!entry->var->block_trace) remove_trace(entry->var);
remove_trace      608 variable.c     		if (!entry->var->block_trace) remove_trace(entry->var);
remove_trace      645 variable.c         remove_trace(var);


rename

rename            902 ext/nkf/nkf-utf8/nkf.c                   if (rename(outfname, origfname)) {
rename           2177 file.c             if (rename(src, dst) < 0) {
rename           2189 file.c         		rename(src, dst) == 0)
rename           4138 io.c           			(void)rename(fn, RSTRING(str)->ptr);
rename           4141 io.c           			if (rename(fn, RSTRING(str)->ptr) < 0) {


renumber_by_map

renumber_by_map  1550 regcomp.c            r = renumber_by_map(NCONS(node).left, map);
renumber_by_map  1554 regcomp.c          r = renumber_by_map(NQUALIFIER(node).target, map);
renumber_by_map  1557 regcomp.c          r = renumber_by_map(NEFFECT(node).target, map);
renumber_by_map  1618 regcomp.c        r = renumber_by_map(*root, map);


require_libraries

require_libraries  827 ruby.c         	require_libraries();
require_libraries  960 ruby.c         	require_libraries();	/* Why here? unnatural */


ret_args

ret_args          279 parse.y        static NODE *ret_args(NODE*);
ret_args         1091 parse.y        			$$ = NEW_RETURN(ret_args($2));
ret_args         1099 parse.y        			$$ = NEW_BREAK(ret_args($2));
ret_args         1107 parse.y        			$$ = NEW_NEXT(ret_args($2));


return_jump

return_jump      3222 eval.c         	return_jump(rb_eval(self, node->nd_stts));
return_jump      8276 eval.c         	    return_jump(result);


return_value

return_value     3046 eval.c         	return_value(rb_eval(self, node->nd_stts));
return_value     3150 eval.c         	    return_value(retval);
return_value     5260 eval.c             if (prot_tag) return_value(retval);
return_value      569 ext/tk/tcltklib.c     int return_value;            /* return value */
return_value      867 ext/tk/tcltklib.c         ptr->return_value
return_value      881 ext/tk/tcltklib.c         ptr->return_value = (*(info->proc))(info->clientData, ptr->ip,
return_value      898 ext/tk/tcltklib.c         ptr->return_value = (*(info->proc))(info->clientData, ptr->ip,
return_value     4687 ext/tk/tcltklib.c     ptr->return_value = 0;
return_value     4911 ext/tk/tcltklib.c     slave->return_value = 0;
return_value     5571 ext/tk/tcltklib.c     inf->ptr->return_value = Tcl_EvalObj(inf->ptr->ip, inf->cmd);
return_value     5602 ext/tk/tcltklib.c           ptr->return_value = TCL_OK;
return_value     5612 ext/tk/tcltklib.c           ptr->return_value = Tcl_EvalObj(ptr->ip, cmd);
return_value     5647 ext/tk/tcltklib.c     if (ptr->return_value == TCL_ERROR) {
return_value     5679 ext/tk/tcltklib.c         ptr->return_value = TCL_OK;
return_value     5684 ext/tk/tcltklib.c         ptr->return_value = Tcl_Eval(ptr->ip, cmd_str);
return_value     5693 ext/tk/tcltklib.c     if (ptr->return_value == TCL_ERROR) {
return_value     5701 ext/tk/tcltklib.c     DUMP2("(TCL_Eval result) %d", ptr->return_value);
return_value     5897 ext/tk/tcltklib.c     ptr->return_value = Tcl_Eval(ptr->ip, "destroy .");
return_value     5899 ext/tk/tcltklib.c     DUMP2("(TCL_Eval result) %d", ptr->return_value);
return_value     5904 ext/tk/tcltklib.c     ptr->return_value = Tcl_Eval(ptr->ip, "namespace delete ::tk::msgcat");
return_value     5906 ext/tk/tcltklib.c     DUMP2("(TCL_Eval result) %d", ptr->return_value);
return_value     5911 ext/tk/tcltklib.c     ptr->return_value = Tcl_Eval(ptr->ip, "trace vdelete ::tk_strictMotif w ::tk::EventMotifBindings");
return_value     5913 ext/tk/tcltklib.c     DUMP2("(TCL_Eval result) %d", ptr->return_value);
return_value     6427 ext/tk/tcltklib.c         inf->ptr->return_value
return_value     6435 ext/tk/tcltklib.c         inf->ptr->return_value
return_value     6442 ext/tk/tcltklib.c         inf->ptr->return_value
return_value     6618 ext/tk/tcltklib.c         ptr->return_value = (*info.objProc)(info.objClientData, ptr->ip,
return_value     6631 ext/tk/tcltklib.c         ptr->return_value = (*info.proc)(info.clientData, ptr->ip,
return_value     6637 ext/tk/tcltklib.c         ptr->return_value = (*info.proc)(info.clientData, ptr->ip,
return_value     6661 ext/tk/tcltklib.c     if (ptr->return_value == TCL_ERROR) {
return_value     6967 ext/tk/tcltklib.c     return (INT2FIX(ptr->return_value));
return_value     7280 ext/tk/tcltklib.c     ptr->return_value = Tcl_UnsetVar2(ptr->ip, RSTRING(varname)->ptr,
return_value     7284 ext/tk/tcltklib.c     if (ptr->return_value == TCL_ERROR) {


rewinddir

rewinddir         548 dir.c              rewinddir(dirp->dir);
rewinddir         651 dir.c              rewinddir(dirp->dir);


ripper_compile_error

ripper_compile_error  441 parse.y        static void ripper_compile_error(struct parser_params*, const char *fmt, ...);
ripper_compile_error  442 parse.y        # define rb_compile_error ripper_compile_error
ripper_compile_error  443 parse.y        # define compile_error ripper_compile_error


ripper_dispatch0

ripper_dispatch0  365 parse.y        static VALUE ripper_dispatch0(struct parser_params*,ID);
ripper_dispatch0  372 parse.y        #define dispatch0(n)            ripper_dispatch0(parser, TOKEN_PASTE(ripper_id_, n))


ripper_dispatch1

ripper_dispatch1  366 parse.y        static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
ripper_dispatch1  373 parse.y        #define dispatch1(n,a)          ripper_dispatch1(parser, TOKEN_PASTE(ripper_id_, n), a)
ripper_dispatch1 4462 parse.y            yylval.val = ripper_dispatch1(parser, ripper_token2eventid(t), str);
ripper_dispatch1 4474 parse.y            yylval.val = ripper_dispatch1(parser, ripper_token2eventid(t), parser->delayed);


ripper_dispatch2

ripper_dispatch2  367 parse.y        static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
ripper_dispatch2  374 parse.y        #define dispatch2(n,a,b)        ripper_dispatch2(parser, TOKEN_PASTE(ripper_id_, n), a, b)


ripper_dispatch3

ripper_dispatch3  368 parse.y        static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
ripper_dispatch3  375 parse.y        #define dispatch3(n,a,b,c)      ripper_dispatch3(parser, TOKEN_PASTE(ripper_id_, n), a, b, c)


ripper_dispatch4

ripper_dispatch4  369 parse.y        static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
ripper_dispatch4  376 parse.y        #define dispatch4(n,a,b,c,d)    ripper_dispatch4(parser, TOKEN_PASTE(ripper_id_, n), a, b, c, d)


ripper_dispatch5

ripper_dispatch5  370 parse.y        static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
ripper_dispatch5  377 parse.y        #define dispatch5(n,a,b,c,d,e)  ripper_dispatch5(parser, TOKEN_PASTE(ripper_id_, n), a, b, c, d, e)


ripper_dispatch_delayed_token

ripper_dispatch_delayed_token 5285 parse.y        	ripper_dispatch_delayed_token(parser, tSTRING_CONTENT);
ripper_dispatch_delayed_token 6866 parse.y        	ripper_dispatch_delayed_token(parser, t);


ripper_dispatch_scan_event

ripper_dispatch_scan_event 5263 parse.y            ripper_dispatch_scan_event(parser, tHEREDOC_BEG);
ripper_dispatch_scan_event 5287 parse.y            ripper_dispatch_scan_event(parser, tHEREDOC_END);
ripper_dispatch_scan_event 5640 parse.y            ripper_dispatch_scan_event(parser, tSP);
ripper_dispatch_scan_event 5662 parse.y        	ripper_dispatch_scan_event(parser, tCOMMENT);
ripper_dispatch_scan_event 5675 parse.y        		ripper_dispatch_scan_event(parser, tIGNORED_NL);
ripper_dispatch_scan_event 5742 parse.y        		ripper_dispatch_scan_event(parser, tEMBDOC_BEG);
ripper_dispatch_scan_event 5748 parse.y        			ripper_dispatch_scan_event(parser, tEMBDOC);
ripper_dispatch_scan_event 5765 parse.y        		ripper_dispatch_scan_event(parser, tEMBDOC_END);
ripper_dispatch_scan_event 6476 parse.y        	    ripper_dispatch_scan_event(parser, tSP);
ripper_dispatch_scan_event 6698 parse.y        	    ripper_dispatch_scan_event(parser, k__END__);
ripper_dispatch_scan_event 6870 parse.y        	ripper_dispatch_scan_event(parser, t);


ripper_flush

ripper_flush     4463 parse.y            ripper_flush(parser);
ripper_flush     4741 parse.y        	    ripper_flush(parser);
ripper_flush     5273 parse.y            ripper_flush(parser);
ripper_flush     5299 parse.y            ripper_flush(parser);


ripper_initialized_p

ripper_initialized_p 9196 parse.y            if (!ripper_initialized_p(parser)) {
ripper_initialized_p 9225 parse.y            if (!ripper_initialized_p(parser)) {
ripper_initialized_p 9246 parse.y            if (!ripper_initialized_p(parser)) {


ripper_token2eventid

ripper_token2eventid 4462 parse.y            yylval.val = ripper_dispatch1(parser, ripper_token2eventid(t), str);
ripper_token2eventid 4474 parse.y            yylval.val = ripper_dispatch1(parser, ripper_token2eventid(t), parser->delayed);


ripper_warn0

ripper_warn0      428 parse.y        # define rb_warn0(fmt)    ripper_warn0(parser, fmt)
ripper_warn0      433 parse.y        static void ripper_warn0(struct parser_params*, const char*);


ripper_warnI

ripper_warnI      429 parse.y        # define rb_warnI(fmt,a)  ripper_warnI(parser, fmt, a)
ripper_warnI      434 parse.y        static void ripper_warnI(struct parser_params*, const char*, int);


ripper_warnS

ripper_warnS      430 parse.y        # define rb_warnS(fmt,a)  ripper_warnS(parser, fmt, a)
ripper_warnS      435 parse.y        static void ripper_warnS(struct parser_params*, const char*, const char*);


ripper_warning0

ripper_warning0   431 parse.y        # define rb_warning0(fmt) ripper_warning0(parser, fmt)
ripper_warning0   436 parse.y        static void ripper_warning0(struct parser_params*, const char*);


ripper_warningS

ripper_warningS   432 parse.y        # define rb_warningS(fmt,a) ripper_warningS(parser, fmt, a)
ripper_warningS   437 parse.y        static void ripper_warningS(struct parser_params*, const char*, const char*);


rl_completion_matches

rl_completion_matches  699 ext/readline/readline.c     matches = rl_completion_matches(StringValuePtr(str),
rl_completion_matches  726 ext/readline/readline.c     matches = rl_completion_matches(StringValuePtr(str),


rmext

rmext            2712 file.c         	if (NIL_P(fext) || !(f = rmext(name, StringValueCStr(fext)))) {
rmext            2720 file.c         	if (NIL_P(fext) || !(f = rmext(p, StringValueCStr(fext)))) {


rol

rol                53 ext/digest/sha1/sha1.c # define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \
rol                54 ext/digest/sha1/sha1.c     |(rol(block->l[i],8)&0x00FF00FF))
rol                58 ext/digest/sha1/sha1.c #define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \
rol                64 ext/digest/sha1/sha1.c #define R0(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30);
rol                65 ext/digest/sha1/sha1.c #define R1(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30);
rol                66 ext/digest/sha1/sha1.c #define R2(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30);
rol                67 ext/digest/sha1/sha1.c #define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30);
rol                68 ext/digest/sha1/sha1.c #define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30);


rot47

rot47            3494 ext/nkf/nkf-utf8/nkf.c 	c1 = rot47(c1);
rot47            3495 ext/nkf/nkf-utf8/nkf.c 	c2 = rot47(c2);


rot_conv

rot_conv          322 ext/nkf/nkf-utf8/nkf.c STATIC  void    rot_conv PROTO((int c2,int c1));
rot_conv         1862 ext/nkf/nkf-utf8/nkf.c 	o_rot_conv = oconv; oconv = rot_conv;


rsa_generate

rsa_generate       96 ext/openssl/ossl_pkey_rsa.c     rsa = rsa_generate(NUM2INT(size), NIL_P(exp) ? RSA_F4 : NUM2INT(exp)); /* err handled by rsa_instance */
rsa_generate      121 ext/openssl/ossl_pkey_rsa.c 	rsa = rsa_generate(FIX2INT(arg), NIL_P(pass) ? RSA_F4 : NUM2INT(pass));


rsa_instance

rsa_instance       61 ext/openssl/ossl_pkey_rsa.c 	obj = rsa_instance(cRSA, RSA_new());
rsa_instance       97 ext/openssl/ossl_pkey_rsa.c     obj = rsa_instance(klass, rsa);
rsa_instance      408 ext/openssl/ossl_pkey_rsa.c     obj = rsa_instance(CLASS_OF(self), rsa);


rscheck

rscheck          3241 ext/zlib/zlib.c 	if (!rspara) rscheck(rsptr, rslen, rs);
rscheck          1587 io.c           		if (!rspara) rscheck(rsptr, rslen, rs);


ruby__end__seen

ruby__end__seen  6692 parse.y        	    ruby__end__seen = 1;
ruby__end__seen  8767 parse.y            return ruby__end__seen ? Qtrue : Qfalse;


ruby_add_suffix

ruby_add_suffix  4131 io.c                                   ruby_add_suffix(str, ruby_inplace_mode);
ruby_add_suffix    43 util.h         void ruby_add_suffix(VALUE str, const char *suffix);


ruby_brace_expand

ruby_brace_expand 1424 dir.c          	    status = ruby_brace_expand(buf, flags, func, arg);
ruby_brace_expand 1458 dir.c              return ruby_brace_expand(str, flags, glob_brace, (VALUE)&args);
ruby_brace_expand  498 ruby.h         int ruby_brace_expand(const char*,int,ruby_glob_func*,VALUE);


ruby_brace_glob

ruby_brace_glob   499 ruby.h         int ruby_brace_glob(const char*,int,ruby_glob_func*,VALUE);
ruby_brace_glob  1048 win32/win32.c      ruby_brace_glob(buf, 0, insert, (VALUE)&tail);


ruby_brace_glob0

ruby_brace_glob0 1464 dir.c              return ruby_brace_glob0(str, flags & ~GLOB_VERBOSE, func, arg);
ruby_brace_glob0 1474 dir.c              return ruby_brace_glob0(str, flags | GLOB_VERBOSE, rb_glob_caller, (VALUE)&args);


ruby_cbase

ruby_cbase       1881 eval.c             if (!NIL_P(ruby_cbase)) {
ruby_cbase       1882 eval.c         	data = rb_mod_const_of(ruby_cbase, data);
ruby_cbase       1914 eval.c             if (ruby_cbase == rb_cObject && klass == rb_cObject) {
ruby_cbase       2668 eval.c         	return ruby_cbase;
ruby_cbase       3489 eval.c         	    if (NIL_P(ruby_cbase)) {
ruby_cbase       3492 eval.c         	    rb_const_set(ruby_cbase, node->nd_vid, result);
ruby_cbase       3497 eval.c         	if (NIL_P(ruby_cbase)) {
ruby_cbase       3833 eval.c         	    if (NIL_P(ruby_cbase)) {
ruby_cbase       3885 eval.c         	    if (NIL_P(ruby_cbase)) {
ruby_cbase       3991 eval.c         	EXEC_EVENT_HOOK(RUBY_EVENT_CLASS, n, ruby_cbase,
ruby_cbase       3993 eval.c         	result = rb_eval(ruby_cbase, node->nd_next);
ruby_cbase       5044 eval.c         	    rb_const_set(ruby_cbase, lhs->nd_vid, val);
ruby_cbase       5049 eval.c         	if (RTEST(ruby_verbose) && FL_TEST(ruby_cbase, FL_SINGLETON)) {
ruby_cbase       5682 eval.c         	    PUSH_CLASS(ruby_cbase);
ruby_cbase       6145 eval.c             PUSH_CLASS(ruby_cbase);
ruby_cbase       7762 eval.c             return rb_mod_autoload(ruby_cbase, sym, file);
ruby_cbase       7780 eval.c             return rb_mod_autoload_p(ruby_cbase, sym);


ruby_cleanup

ruby_cleanup     1537 eval.c             exit(ruby_cleanup(ex));
ruby_cleanup      254 intern.h       int ruby_cleanup(int);


ruby_connect

ruby_connect     1197 ext/socket/socket.c 		status = ruby_connect(fd, res->ai_addr, res->ai_addrlen,
ruby_connect     1463 ext/socket/socket.c     return (VALUE)ruby_connect(arg->fd, arg->sockaddr, sizeof(*arg->sockaddr), 0);
ruby_connect     1606 ext/socket/socket.c 	if (ruby_connect(fd, res->ai_addr, res->ai_addrlen, 0) >= 0) {
ruby_connect     2262 ext/socket/socket.c     n = ruby_connect(fd, (struct sockaddr*)RSTRING(addr)->ptr, RSTRING(addr)->len, 0);


ruby_debug_lines

ruby_debug_lines 4565 parse.y        	    ruby_debug_lines = rb_hash_aref(hash, fname);
ruby_debug_lines 4566 parse.y        	    if (NIL_P(ruby_debug_lines)) {
ruby_debug_lines 4567 parse.y        		ruby_debug_lines = rb_ary_new();
ruby_debug_lines 4568 parse.y        		rb_hash_aset(hash, fname, ruby_debug_lines);
ruby_debug_lines 4575 parse.y        		rb_ary_push(ruby_debug_lines, str);
ruby_debug_lines 4586 parse.y            ruby_debug_lines = 0;
ruby_debug_lines 4631 parse.y            if (ruby_debug_lines && !NIL_P(line)) {
ruby_debug_lines 4632 parse.y        	rb_ary_push(ruby_debug_lines, line);


ruby_eval_tree

ruby_eval_tree   1503 eval.c         extern NODE *ruby_eval_tree;
ruby_eval_tree   1515 eval.c         	eval_node(ruby_top_self, ruby_eval_tree);
ruby_eval_tree   6602 eval.c         	node = ruby_eval_tree;
ruby_eval_tree   7624 eval.c             rb_global_variable((VALUE*)&ruby_eval_tree);
ruby_eval_tree    643 parse.y        			ruby_eval_tree = block_append(ruby_eval_tree, $2);
ruby_eval_tree   4599 parse.y        	return NEW_PRELUDE(ruby_eval_tree_begin, ruby_eval_tree);
ruby_eval_tree   4602 parse.y        	return ruby_eval_tree;
ruby_eval_tree    356 ruby.c             extern NODE *ruby_eval_tree;
ruby_eval_tree    361 ruby.c             save[0] = ruby_eval_tree;
ruby_eval_tree    363 ruby.c             ruby_eval_tree = 0;
ruby_eval_tree    383 ruby.c             ruby_eval_tree = save[0];
ruby_eval_tree    468 ruby.c         NODE *ruby_eval_tree;
ruby_eval_tree    828 ruby.c         	ruby_eval_tree = rb_compile_string(script, e_script, 1);
ruby_eval_tree    964 ruby.c             ruby_eval_tree = rb_parser_compile_file(parser, fname, f, line_start);
ruby_eval_tree   1217 ruby.c         	ruby_eval_tree = rb_parser_append_print(ruby_eval_tree);
ruby_eval_tree   1220 ruby.c         	ruby_eval_tree = rb_parser_while_loop(ruby_eval_tree, do_line, do_split);


ruby_eval_tree_begin

ruby_eval_tree_begin  855 parse.y        			ruby_eval_tree_begin = block_append(ruby_eval_tree_begin,
ruby_eval_tree_begin 4598 parse.y            if (ruby_eval_tree_begin) {
ruby_eval_tree_begin 4599 parse.y        	return NEW_PRELUDE(ruby_eval_tree_begin, ruby_eval_tree);


ruby_exec

ruby_exec        1547 eval.c             state = ruby_exec();
ruby_exec         255 intern.h       int ruby_exec(void);


ruby_finalize

ruby_finalize    4225 eval.c             ruby_finalize();
ruby_finalize     252 intern.h       void ruby_finalize(void);


ruby_finalize_0

ruby_finalize_0  1464 eval.c             ruby_finalize_0();
ruby_finalize_0  1479 eval.c         	ruby_finalize_0();


ruby_finalize_1

ruby_finalize_1  1465 eval.c             ruby_finalize_1();
ruby_finalize_1  1493 eval.c             ruby_finalize_1();


ruby_getcwd

ruby_getcwd        59 util.h         char *ruby_getcwd(void);
ruby_getcwd        60 util.h         #define my_getcwd() ruby_getcwd()


ruby_glob0

ruby_glob0       1339 dir.c              return ruby_glob0(path, flags & ~GLOB_VERBOSE, func, arg);
ruby_glob0       1365 dir.c              return ruby_glob0(path, flags | GLOB_VERBOSE, rb_glob_caller, (VALUE)&args);
ruby_glob0       1447 dir.c              return ruby_glob0(path, arg->flags, arg->func, arg->value);


ruby_glob_func

ruby_glob_func   1437 dir.c              ruby_glob_func *func;
ruby_glob_func    497 ruby.h         int ruby_glob(const char*,int,ruby_glob_func*,VALUE);
ruby_glob_func    498 ruby.h         int ruby_brace_expand(const char*,int,ruby_glob_func*,VALUE);
ruby_glob_func    499 ruby.h         int ruby_brace_glob(const char*,int,ruby_glob_func*,VALUE);


ruby_incpush

ruby_incpush      453 intern.h       void ruby_incpush(const char*);
ruby_incpush      307 ruby.c         	ruby_incpush(getenv("RUBYLIB"));
ruby_incpush      311 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_SEARCH_PATH));
ruby_incpush      314 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_SITE_LIB2));
ruby_incpush      316 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_SITE_THIN_ARCHLIB));
ruby_incpush      318 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_SITE_ARCHLIB));
ruby_incpush      319 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_SITE_LIB));
ruby_incpush      321 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_LIB));
ruby_incpush      323 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_THIN_ARCHLIB));
ruby_incpush      325 ruby.c             ruby_incpush(RUBY_RELATIVE(RUBY_ARCHLIB));
ruby_incpush      328 ruby.c         	ruby_incpush(".");


ruby_incpush_expand

ruby_incpush_expand  665 ruby.c         		ruby_incpush_expand(s);
ruby_incpush_expand  667 ruby.c         		ruby_incpush_expand(argv[1]);


ruby_init

ruby_init          41 main.c                 ruby_init();
ruby_init         597 ruby.h         void ruby_init(void);


ruby_init_loadpath

ruby_init_loadpath  452 intern.h       void ruby_init_loadpath(void);
ruby_init_loadpath  268 ruby.c             if (VirtualQuery(ruby_init_loadpath, &m, sizeof(m)) && m.State == MEM_COMMIT)
ruby_init_loadpath  824 ruby.c             ruby_init_loadpath();


ruby_init_stack

ruby_init_stack   587 ruby.h         void ruby_init_stack(VALUE*, void*);
ruby_init_stack   590 ruby.h             ruby_init_stack(&variable_in_this_stack_frame, rb_ia64_bsp());
ruby_init_stack   592 ruby.h         void ruby_init_stack(VALUE*);
ruby_init_stack   595 ruby.h             ruby_init_stack(&variable_in_this_stack_frame);


ruby_longjmp

ruby_longjmp      927 eval.c             ruby_longjmp(prot_tag->buf,(st));	\
ruby_longjmp     10251 eval.c             ruby_longjmp(tmp->context, ex);
ruby_longjmp     11743 eval.c         	ruby_longjmp((prot_tag = ip->tag)->buf, TAG_THREAD);


ruby_native_thread_kill

ruby_native_thread_kill  737 ruby.h         void ruby_native_thread_kill(int);
ruby_native_thread_kill  436 signal.c           ruby_native_thread_kill(sig);


ruby_nativethread_signal

ruby_nativethread_signal  365 signal.c           ruby_nativethread_signal(signum, handler);
ruby_nativethread_signal  461 signal.c               ruby_nativethread_signal(sig, sighandler);
ruby_nativethread_signal  830 signal.c           old = ruby_nativethread_signal(signum, handler);
ruby_nativethread_signal  833 signal.c                   ruby_nativethread_signal(signum, old);


ruby_open_tcl_dll

ruby_open_tcl_dll  144 ext/tk/stubs.c         int ret = ruby_open_tcl_dll(RSTRING(rb_argv0)->ptr);
ruby_open_tcl_dll  174 ext/tk/stubs.c     return( ruby_open_tcl_dll(appname) || ruby_open_tk_dll() );
ruby_open_tcl_dll  215 ext/tk/stubs.c             int ret = ruby_open_tcl_dll(RSTRING(rb_argv0)->ptr);
ruby_open_tcl_dll  410 ext/tk/stubs.c         ruby_open_tcl_dll(RSTRING(rb_argv0)->ptr);
ruby_open_tcl_dll  419 ext/tk/stubs.c     return( ruby_open_tcl_dll(appname) || ruby_open_tk_dll() );
ruby_open_tcl_dll  441 ext/tk/stubs.c         ruby_open_tcl_dll(RSTRING(rb_argv0)->ptr);
ruby_open_tcl_dll    3 ext/tk/stubs.h extern int ruby_open_tcl_dll(char *);
ruby_open_tcl_dll 7932 ext/tk/tcltklib.c     ret = ruby_open_tcl_dll(RSTRING(rb_argv0)->ptr);


ruby_open_tcltk_dll

ruby_open_tcltk_dll  348 ext/tk/stubs.c     st = ruby_open_tcltk_dll(RSTRING(rb_argv0)->ptr);
ruby_open_tcltk_dll    5 ext/tk/stubs.h extern int ruby_open_tcltk_dll(char *);


ruby_open_tk_dll

ruby_open_tk_dll  174 ext/tk/stubs.c     return( ruby_open_tcl_dll(appname) || ruby_open_tk_dll() );
ruby_open_tk_dll  285 ext/tk/stubs.c             int ret = ruby_open_tk_dll();
ruby_open_tk_dll  320 ext/tk/stubs.c             int ret = ruby_open_tk_dll();
ruby_open_tk_dll  419 ext/tk/stubs.c     return( ruby_open_tcl_dll(appname) || ruby_open_tk_dll() );
ruby_open_tk_dll    4 ext/tk/stubs.h extern int ruby_open_tk_dll();


ruby_options

ruby_options       42 main.c                 ruby_options(argc, argv);
ruby_options      598 ruby.h         void ruby_options(int, char**);


ruby_process_options

ruby_process_options 1425 eval.c         	ruby_process_options(argc, argv);
ruby_process_options  450 intern.h       void ruby_process_options(int, char**);


ruby_prog_init

ruby_prog_init   1314 eval.c         	ruby_prog_init();
ruby_prog_init    448 intern.h       void ruby_prog_init(void);


ruby_push_include

ruby_push_include  216 ruby.c             ruby_push_include(path, identical_path);
ruby_push_include  232 ruby.c             ruby_push_include(path, expand_include_path);


ruby_qsort

ruby_qsort       1518 array.c            ruby_qsort(RARRAY(ary)->ptr, RARRAY(ary)->len, sizeof(VALUE),
ruby_qsort        530 enum.c         	ruby_qsort(RARRAY(ary)->ptr, RARRAY(ary)->len, sizeof(VALUE), sort_by_cmp, 0);
ruby_qsort         46 util.h         void ruby_qsort(void*, const int, const int, int (*)(const void*,const void*,void*), void*);


ruby_run

ruby_run           43 main.c                 ruby_run();
ruby_run          599 ruby.h         NORETURN(void ruby_run(void));


ruby_scan_hex

ruby_scan_hex      39 util.h         #define scan_hex ruby_scan_hex
ruby_scan_hex      40 util.h         unsigned long ruby_scan_hex(const char*, int, int*);


ruby_scan_oct

ruby_scan_oct      37 util.h         #define scan_oct ruby_scan_oct
ruby_scan_oct      38 util.h         unsigned long ruby_scan_oct(const char*, int, int*);


ruby_script

ruby_script       447 intern.h       void ruby_script(const char*);
ruby_script       820 ruby.c             ruby_script(script);
ruby_script      1204 ruby.c             ruby_script(argv[0]);	/* for the time being */


ruby_set_argv

ruby_set_argv     449 intern.h       void ruby_set_argv(int, char**);
ruby_set_argv     821 ruby.c             ruby_set_argv(argc, argv);


ruby_set_current_source

ruby_set_current_source   33 error.c            ruby_set_current_source();
ruby_set_current_source 1101 eval.c             ruby_set_current_source();
ruby_set_current_source 1150 eval.c         	ruby_set_current_source();
ruby_set_current_source 4354 eval.c             ruby_set_current_source();
ruby_set_current_source 5967 eval.c         	ruby_set_current_source();
ruby_set_current_source 6141 eval.c         	ruby_set_current_source();
ruby_set_current_source 6197 eval.c             ruby_set_current_source();
ruby_set_current_source 6613 eval.c             ruby_set_current_source();
ruby_set_current_source 6962 eval.c             ruby_set_current_source();
ruby_set_current_source  199 intern.h       void ruby_set_current_source(void);
ruby_set_current_source  367 ruby.c             ruby_set_current_source();
ruby_set_current_source  380 ruby.c         	ruby_set_current_source();


ruby_setenv

ruby_setenv      1547 hash.c         	ruby_setenv(nam, 0);
ruby_setenv      1754 hash.c             ruby_setenv(name, 0);
ruby_setenv      1775 hash.c             ruby_setenv(name, value);
ruby_setenv      1067 ruby.c         	    ruby_setenv("", NULL); /* duplicate environ vars */
ruby_setenv        48 util.h         void ruby_setenv(const char*, const char*);
ruby_setenv        52 util.h         #define setenv(name,val) ruby_setenv(name,val)


ruby_setjmp

ruby_setjmp       922 eval.c         #define EXEC_TAG()    (FLUSH_REGISTER_WINDOWS, ruby_setjmp(((void)0), prot_tag->buf))
ruby_setjmp      10201 eval.c             (rb_thread_switch((FLUSH_REGISTER_WINDOWS, ruby_setjmp(rb_thread_save_context(th), (th)->context))))


ruby_show_copyright

ruby_show_copyright  578 intern.h       void ruby_show_copyright(void);
ruby_show_copyright  781 ruby.c         	ruby_show_copyright();


ruby_show_version

ruby_show_version  577 intern.h       void ruby_show_version(void);
ruby_show_version  522 ruby.c         	    ruby_show_version();
ruby_show_version  777 ruby.c         	ruby_show_version();


ruby_signal

ruby_signal       348 signal.c           ruby_signal(signum, handler);
ruby_signal       357 signal.c           old = ruby_signal(signum, handler);
ruby_signal       463 signal.c               ruby_signal(sig, sighandler);
ruby_signal       678 signal.c           oldfunc = ruby_signal(sig, func);
ruby_signal       816 signal.c           old = ruby_signal(signum, handler);
ruby_signal       818 signal.c       	ruby_signal(signum, old);
ruby_signal       835 signal.c                   ruby_signal(signum, old);
ruby_signal       863 signal.c           oldfunc = ruby_signal(sig, SIG_DFL);
ruby_signal       865 signal.c       	ruby_signal(sig, oldfunc);


ruby_signal_name

ruby_signal_name  467 intern.h       const char *ruby_signal_name(int);
ruby_signal_name  281 process.c      	const char *signame = ruby_signal_name(stopsig);
ruby_signal_name  292 process.c      	const char *signame = ruby_signal_name(termsig);


ruby_socket

ruby_socket      1174 ext/socket/socket.c 	status = ruby_socket(res->ai_family,res->ai_socktype,res->ai_protocol);
ruby_socket      1477 ext/socket/socket.c     fd = ruby_socket(AF_UNIX, SOCK_STREAM, 0);
ruby_socket      1584 ext/socket/socket.c     fd = ruby_socket(socktype, SOCK_DGRAM, 0);
ruby_socket      2089 ext/socket/socket.c     fd = ruby_socket(d, t, NUM2INT(protocol));


ruby_sourcefile

ruby_sourcefile    34 error.c            if (!ruby_sourcefile) {
ruby_sourcefile    38 error.c        	return snprintf(buf, len, "%s: ", ruby_sourcefile);
ruby_sourcefile    41 error.c        	return snprintf(buf, len, "%s:%d: ", ruby_sourcefile, ruby_sourceline);
ruby_sourcefile  1068 eval.c         #define SET_CURRENT_SOURCE() (ruby_sourcefile = ruby_current_node->nd_file, \
ruby_sourcefile  1078 eval.c         	ruby_sourcefile = ruby_current_node->nd_file;
ruby_sourcefile  1102 eval.c             if (ruby_sourcefile) {
ruby_sourcefile  1104 eval.c         	    warn_printf("%s:%d:in `%s'", ruby_sourcefile, ruby_sourceline,
ruby_sourcefile  1108 eval.c         	    warn_printf("%s", ruby_sourcefile);
ruby_sourcefile  1111 eval.c         	    warn_printf("%s:%d", ruby_sourcefile, ruby_sourceline);
ruby_sourcefile  1151 eval.c         	if (ruby_sourcefile)
ruby_sourcefile  1152 eval.c         	    warn_printf("%s:%d", ruby_sourcefile, ruby_sourceline);
ruby_sourcefile  1577 eval.c             ruby_sourcefile = rb_source_filename("(eval)");
ruby_sourcefile  2535 eval.c         	ruby_sourcefile = node->nd_file;
ruby_sourcefile  2549 eval.c         	srcfile = rb_str_new2(ruby_sourcefile?ruby_sourcefile:"(ruby)");
ruby_sourcefile  4355 eval.c             if (ruby_sourcefile && !NIL_P(mesg)) {
ruby_sourcefile  4376 eval.c         			ruby_sourcefile, ruby_sourceline,
ruby_sourcefile  5969 eval.c         	    str = rb_sprintf("%s:%d:in `%s'", ruby_sourcefile, ruby_sourceline,
ruby_sourcefile  5973 eval.c         	    str = rb_str_new2(ruby_sourcefile);
ruby_sourcefile  5976 eval.c         	    str = rb_sprintf("%s:%d", ruby_sourcefile, ruby_sourceline);
ruby_sourcefile  6142 eval.c         	file = ruby_sourcefile;
ruby_sourcefile  6588 eval.c             if (!ruby_current_node && ruby_sourcefile) {
ruby_sourcefile  6612 eval.c             ruby_sourcefile = 0;
ruby_sourcefile  6946 eval.c         		    ruby_sourcefile = rb_source_filename(RSTRING(path)->ptr);
ruby_sourcefile   393 gc.c               RANY(obj)->file = ruby_sourcefile;
ruby_sourcefile  1015 gc.c               mark_source_filename(ruby_sourcefile);
ruby_sourcefile   391 intern.h       RUBY_EXTERN char *ruby_sourcefile;
ruby_sourcefile    63 parse.y        char *ruby_sourcefile;		/* current source file */
ruby_sourcefile  4582 parse.y            ruby_sourcefile = rb_source_filename(f);
ruby_sourcefile  6885 parse.y            n->nd_file = ruby_sourcefile;
ruby_sourcefile  7180 parse.y        	return NEW_STR(rb_str_new2(ruby_sourcefile));
ruby_sourcefile  7650 parse.y            if (strcmp(ruby_sourcefile, "-e") == 0)
ruby_sourcefile  1257 process.c      		ruby_sourcefile, ruby_sourceline, prog);
ruby_sourcefile   810 ruby.c         		script = ruby_sourcefile = rb_source_filename(script);
ruby_sourcefile   825 ruby.c             ruby_sourcefile = rb_source_filename(argv0);
ruby_sourcefile   931 ruby.c         		    ruby_sourcefile = rb_source_filename(fname);
ruby_sourcefile  1096 ruby.c         	ruby_sourcefile = rb_source_filename(name);
ruby_sourcefile  1149 ruby.c             ruby_sourcefile = rb_source_filename("ruby");


ruby_sourceline

ruby_sourceline    37 error.c            else if (ruby_sourceline == 0) {
ruby_sourceline    41 error.c        	return snprintf(buf, len, "%s:%d: ", ruby_sourcefile, ruby_sourceline);
ruby_sourceline  1069 eval.c         			      ruby_sourceline = nd_line(ruby_current_node))
ruby_sourceline  1079 eval.c         	ruby_sourceline = nd_line(ruby_current_node);
ruby_sourceline  1104 eval.c         	    warn_printf("%s:%d:in `%s'", ruby_sourcefile, ruby_sourceline,
ruby_sourceline  1107 eval.c         	else if (ruby_sourceline == 0) {
ruby_sourceline  1111 eval.c         	    warn_printf("%s:%d", ruby_sourcefile, ruby_sourceline);
ruby_sourceline  1152 eval.c         	    warn_printf("%s:%d", ruby_sourcefile, ruby_sourceline);
ruby_sourceline  1154 eval.c         	    warn_printf("%d", ruby_sourceline);
ruby_sourceline  2520 eval.c             if (!node && ruby_sourceline == 0) return;
ruby_sourceline  2536 eval.c         	ruby_sourceline = nd_line(node);
ruby_sourceline  2553 eval.c         					    INT2FIX(ruby_sourceline),
ruby_sourceline  4376 eval.c         			ruby_sourcefile, ruby_sourceline,
ruby_sourceline  5969 eval.c         	    str = rb_sprintf("%s:%d:in `%s'", ruby_sourcefile, ruby_sourceline,
ruby_sourceline  5972 eval.c         	else if (ruby_sourceline == 0) {
ruby_sourceline  5976 eval.c         	    str = rb_sprintf("%s:%d", ruby_sourcefile, ruby_sourceline);
ruby_sourceline  6143 eval.c         	line = ruby_sourceline;
ruby_sourceline  6947 eval.c         		    ruby_sourceline = 0;
ruby_sourceline   394 gc.c               RANY(obj)->line = ruby_sourceline;
ruby_sourceline   390 intern.h       RUBY_EXTERN int   ruby_sourceline;
ruby_sourceline    64 parse.y        int   ruby_sourceline;		/* current line no. */
ruby_sourceline  1139 parse.y        			$<num>1 = ruby_sourceline;
ruby_sourceline  2487 parse.y        			$<num>1 = ruby_sourceline;
ruby_sourceline  2748 parse.y        			$<num>$ = ruby_sourceline;
ruby_sourceline  2814 parse.y        			$<num>$ = ruby_sourceline;
ruby_sourceline  3258 parse.y        			$<num>1 = ruby_sourceline;
ruby_sourceline  3396 parse.y        			$<num>1 = ruby_sourceline;
ruby_sourceline  3422 parse.y        			$<num>1 = ruby_sourceline;
ruby_sourceline  4469 parse.y            int saved_line = ruby_sourceline;
ruby_sourceline  4472 parse.y            ruby_sourceline = parser->delayed_line;
ruby_sourceline  4476 parse.y            ruby_sourceline = saved_line;
ruby_sourceline  4583 parse.y            ruby_sourceline = line - 1;
ruby_sourceline  4723 parse.y        		    parser->delayed_line = ruby_sourceline;
ruby_sourceline  4733 parse.y        		ruby_sourceline = heredoc_end;
ruby_sourceline  4736 parse.y        	    ruby_sourceline++;
ruby_sourceline  5151 parse.y            nd_set_line(node, ruby_sourceline);
ruby_sourceline  5197 parse.y        	ruby_sourceline = nd_line(quote);
ruby_sourceline  5271 parse.y            nd_set_line(lex_strterm, ruby_sourceline);
ruby_sourceline  5294 parse.y            heredoc_end = ruby_sourceline;
ruby_sourceline  5295 parse.y            ruby_sourceline = nd_line(here);
ruby_sourceline  6884 parse.y            nd_set_line(n, ruby_sourceline);
ruby_sourceline  6928 parse.y            int line = ruby_sourceline;
ruby_sourceline  6929 parse.y            ruby_sourceline = nd_line(node);
ruby_sourceline  6931 parse.y            ruby_sourceline = line;
ruby_sourceline  6937 parse.y            int line = ruby_sourceline;
ruby_sourceline  6938 parse.y            ruby_sourceline = nd_line(node);
ruby_sourceline  6940 parse.y            ruby_sourceline = line;
ruby_sourceline  7183 parse.y        	return NEW_LIT(INT2FIX(ruby_sourceline));
ruby_sourceline  7520 parse.y        	int line = ruby_sourceline;
ruby_sourceline  7522 parse.y        	ruby_sourceline = nd_line(node);
ruby_sourceline  7524 parse.y        	ruby_sourceline = line;
ruby_sourceline  7910 parse.y        	ruby_sourceline = nd_line(node);
ruby_sourceline  7920 parse.y            int saved_line = ruby_sourceline;
ruby_sourceline  7946 parse.y            ruby_sourceline = saved_line;
ruby_sourceline  1257 process.c      		ruby_sourcefile, ruby_sourceline, prog);
ruby_sourceline   932 ruby.c         		    ruby_sourceline = 1;


ruby_stack_check

ruby_stack_check 5294 eval.c             if (!overflowing && ruby_stack_check()) {
ruby_stack_check  694 gc.c               if (lev > GC_LEVEL_MAX || (lev == 0 && ruby_stack_check())) {
ruby_stack_check  298 intern.h       int ruby_stack_check(void);


ruby_stack_length

ruby_stack_length 10104 eval.c             len = ruby_stack_length(&pos);
ruby_stack_length  299 intern.h       int ruby_stack_length(VALUE**);


ruby_stop

ruby_stop        1549 eval.c             ruby_stop(ex);
ruby_stop        11772 eval.c             if (th == main_thread) ruby_stop(state);
ruby_stop        11815 eval.c             ruby_stop(0);		/* last thread termination */
ruby_stop        11861 eval.c             if (th == main_thread) ruby_stop(state);
ruby_stop        1427 process.c      	    ruby_stop(status);


ruby_strdup

ruby_strdup      6939 eval.c         		    ftptr = ruby_strdup(RSTRING(path)->ptr);
ruby_strdup       101 ext/tk/stubs.c     if (ruby_tcl_dll) ruby_tcl_dll = ruby_strdup(ruby_tcl_dll);
ruby_strdup       314 util.c             p->path = ruby_strdup(path);
ruby_strdup        55 util.h         char *ruby_strdup(const char*);
ruby_strdup        57 util.h         #define strdup(s) ruby_strdup(s)


ruby_strtod

ruby_strtod        62 util.h         double ruby_strtod(const char*, char **);
ruby_strtod        64 util.h         #define strtod(s,e) ruby_strtod(s,e)


ruby_tcl_create_ip_and_stubs_init

ruby_tcl_create_ip_and_stubs_init  261 ext/tk/stubs.c         tcl_ip = ruby_tcl_create_ip_and_stubs_init(&st);
ruby_tcl_create_ip_and_stubs_init  357 ext/tk/stubs.c     tcl_ip = ruby_tcl_create_ip_and_stubs_init(&st);
ruby_tcl_create_ip_and_stubs_init    8 ext/tk/stubs.h extern Tcl_Interp *ruby_tcl_create_ip_and_stubs_init(int*);
ruby_tcl_create_ip_and_stubs_init 4691 ext/tk/tcltklib.c     ptr->ip = ruby_tcl_create_ip_and_stubs_init(&st);


ruby_tcl_stubs_init

ruby_tcl_stubs_init    9 ext/tk/stubs.h extern int ruby_tcl_stubs_init();
ruby_tcl_stubs_init  672 ext/tk/tcltklib.c         int st = ruby_tcl_stubs_init();


ruby_tk_stubs_init

ruby_tk_stubs_init  370 ext/tk/stubs.c     st = ruby_tk_stubs_init(tcl_ip);
ruby_tk_stubs_init   10 ext/tk/stubs.h extern int ruby_tk_stubs_init(Tcl_Interp*);
ruby_tk_stubs_init  727 ext/tk/tcltklib.c         st = ruby_tk_stubs_init(ptr->ip);
ruby_tk_stubs_init  750 ext/tk/tcltklib.c     if (ruby_tk_stubs_init(ptr->ip) != TCLTK_STUBS_OK) {
ruby_tk_stubs_init 4768 ext/tk/tcltklib.c         st = ruby_tk_stubs_init(ptr->ip);


ruby_tk_stubs_safeinit

ruby_tk_stubs_safeinit   11 ext/tk/stubs.h extern int ruby_tk_stubs_safeinit(Tcl_Interp*);
ruby_tk_stubs_safeinit  706 ext/tk/tcltklib.c         st = ruby_tk_stubs_safeinit(ptr->ip);


ruby_unsetenv

ruby_unsetenv      49 util.h         void ruby_unsetenv(const char*);
ruby_unsetenv      53 util.h         #define unsetenv(name,val) ruby_unsetenv(name);


ruby_xfree

ruby_xfree         49 defines.h      #define xfree ruby_xfree
ruby_xfree        220 ext/dl/cfunc.c     ruby_xfree(str);
ruby_xfree         43 ext/dl/dl.c        ruby_xfree(ptr);
ruby_xfree        144 ext/dl/dl.c        rb_define_const(rb_mDL, "RUBY_FREE", PTR2NUM(ruby_xfree));
ruby_xfree        117 ext/tk/stubs.c     if (ruby_tcl_dll) ruby_xfree(ruby_tcl_dll);
ruby_xfree         57 missing/alloca.c #define xfree ruby_xfree
ruby_xfree        351 util.c         	ruby_xfree(buf);
ruby_xfree        365 util.c         	ruby_xfree(cur);


ruby_xmalloc

ruby_xmalloc       44 defines.h      #define xmalloc ruby_xmalloc
ruby_xmalloc      212 ext/dl/cfunc.c     str = ruby_xmalloc(str_size);
ruby_xmalloc       68 ext/dl/cptr.c    ptr = ruby_xmalloc((size_t)size);
ruby_xmalloc       26 ext/dl/dl.c        ptr = (void*)ruby_xmalloc(NUM2INT(size));
ruby_xmalloc      131 gc.c               return ruby_xmalloc(len);
ruby_xmalloc      153 gc.c               if (!ptr) return ruby_xmalloc(size);
ruby_xmalloc       56 missing/alloca.c #define xmalloc ruby_xmalloc
ruby_xmalloc      336 util.c         	buf = ruby_xmalloc(len + 1);
ruby_xmalloc      356 util.c             rv = ruby_xmalloc((info.count + 1) * sizeof (char *));
ruby_xmalloc     1041 win32/win32.c  	buf = ruby_xmalloc(patt->len + 1);


ruby_xmalloc2

ruby_xmalloc2      45 defines.h      #define xmalloc2 ruby_xmalloc2
ruby_xmalloc2     139 gc.c               mem = ruby_xmalloc2(n, size);


ruby_xrealloc

ruby_xrealloc      47 defines.h      #define xrealloc ruby_xrealloc
ruby_xrealloc      35 ext/dl/dl.c        ptr = (void*)ruby_xrealloc(ptr, NUM2INT(size));
ruby_xrealloc     177 gc.c               return ruby_xrealloc(ptr, len);


rubylib_mangle

rubylib_mangle    164 ruby.c         #define rubylib_mangled_path(s, l) rb_str_new2(rubylib_mangle((s), (l)))
rubylib_mangle    165 ruby.c         #define rubylib_mangled_path2(s) rb_str_new2(rubylib_mangle((s), 0))


rubylib_mangled_path2

rubylib_mangled_path2  196 ruby.c         		rb_ary_push(ary, (*filter)(rubylib_mangled_path2(p)));
rubylib_mangled_path2  203 ruby.c         	rb_ary_push(rb_load_path, (*filter)(rubylib_mangled_path2(path)));


run_final

run_final          74 gc.c           static void run_final(VALUE obj);
run_final         976 gc.c           	run_final((VALUE)p);
run_final        1826 gc.c           		    run_final((VALUE)p);


run_single_final

run_single_final 1783 gc.c           	rb_protect((VALUE(*)(VALUE))run_single_final, (VALUE)args, &status);
run_single_final 1791 gc.c           	    rb_protect((VALUE(*)(VALUE))run_single_final, (VALUE)args, &status);


s2e_conv

s2e_conv          301 ext/nkf/nkf-utf8/nkf.c STATIC  int     s2e_conv PROTO((int c2, int c1, int *p2, int *p1));
s2e_conv         1585 ext/nkf/nkf-utf8/nkf.c               s2e_conv(ptr->buf[0], ptr->buf[1], &ptr->buf[0], &ptr->buf[1]);
s2e_conv         1596 ext/nkf/nkf-utf8/nkf.c               if (s2e_conv(ptr->buf[0], ptr->buf[1], &ptr->buf[0], &ptr->buf[1]) == 0){
s2e_conv         2450 ext/nkf/nkf-utf8/nkf.c         int ret = s2e_conv(c2, c1, &c2, &c1);
s2e_conv         2475 ext/nkf/nkf-utf8/nkf.c                 s2e_conv(s2, s1, &c2, &c1);
s2e_conv         2887 ext/nkf/nkf-utf8/nkf.c                 s2e_conv(s2, s1, &c2, &c1);


s_accept

s_accept         1436 ext/socket/socket.c     return s_accept(rb_cTCPSocket, fptr->fd,
s_accept         1450 ext/socket/socket.c     return s_accept(0, fptr->fd, (struct sockaddr*)&from, &fromlen);
s_accept         1926 ext/socket/socket.c     return s_accept(rb_cUNIXSocket, fptr->fd,
s_accept         1940 ext/socket/socket.c     return s_accept(0, fptr->fd, (struct sockaddr*)&from, &fromlen);
s_accept         2573 ext/socket/socket.c     sock2 = s_accept(rb_cSocket,fptr->fd,(struct sockaddr*)buf,&len);
s_accept         2626 ext/socket/socket.c     sock2 = s_accept(0,fptr->fd,(struct sockaddr*)buf,&len);


s_iconv

s_iconv           300 ext/nkf/nkf-utf8/nkf.c STATIC  int     s_iconv PROTO((int c2,int c1,int c0));
s_iconv           495 ext/nkf/nkf-utf8/nkf.c     {"Shift_JIS", 0, 0, 0, {0, 0, 0}, s_status, s_iconv, 0},
s_iconv          1914 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, s_iconv);
s_iconv          2018 ext/nkf/nkf-utf8/nkf.c                     } else if (SSP<=c1 && c1<0xe0 && iconv == s_iconv) {
s_iconv          2028 ext/nkf/nkf-utf8/nkf.c                     } else if (c1==SSO && iconv != s_iconv) {
s_iconv          2342 ext/nkf/nkf-utf8/nkf.c         }else if (iconv == s_iconv && 0xa1 <= c2 && c2 <= 0xdf){
s_iconv          3582 ext/nkf/nkf-utf8/nkf.c     e_iconv, s_iconv, 0, 0, 0, 0,


s_oconv

s_oconv           317 ext/nkf/nkf-utf8/nkf.c STATIC  void    s_oconv PROTO((int c2,int c1));
s_oconv           532 ext/nkf/nkf-utf8/nkf.c #   define  DEFAULT_CONV s_oconv
s_oconv          1152 ext/nkf/nkf-utf8/nkf.c             output_conv = s_oconv;


s_recvfrom

s_recvfrom        638 ext/socket/socket.c     return s_recvfrom(sock, argc, argv, RECV_RECV);
s_recvfrom       1553 ext/socket/socket.c     return s_recvfrom(sock, argc, argv, RECV_IP);
s_recvfrom       1728 ext/socket/socket.c     return s_recvfrom(sock, argc, argv, RECV_UNIX);
s_recvfrom       2560 ext/socket/socket.c     return s_recvfrom(sock, argc, argv, RECV_SOCKET);


s_status

s_status          485 ext/nkf/nkf-utf8/nkf.c STATIC void s_status PROTO((struct input_code *, int));
s_status          495 ext/nkf/nkf-utf8/nkf.c     {"Shift_JIS", 0, 0, 0, {0, 0, 0}, s_status, s_iconv, 0},


safe_getter

safe_getter       239 eval.c         static VALUE safe_getter(void);
safe_getter      7702 eval.c             rb_define_virtual_variable("$SAFE", safe_getter, safe_setter);


safe_setter

safe_setter       240 eval.c         static void safe_setter(VALUE val);
safe_setter      7702 eval.c             rb_define_virtual_variable("$SAFE", safe_getter, safe_setter);


safe_setup_str

safe_setup_str     78 ext/etc/etc.c  			 safe_setup_str(pwd->pw_name),
safe_setup_str     80 ext/etc/etc.c  			 safe_setup_str(pwd->pw_passwd),
safe_setup_str     85 ext/etc/etc.c  			 safe_setup_str(pwd->pw_gecos),
safe_setup_str     87 ext/etc/etc.c  			 safe_setup_str(pwd->pw_dir),
safe_setup_str     88 ext/etc/etc.c  			 safe_setup_str(pwd->pw_shell),
safe_setup_str     99 ext/etc/etc.c  			 safe_setup_str(pwd->pw_class),
safe_setup_str    102 ext/etc/etc.c  			 safe_setup_str(pwd->pw_comment),
safe_setup_str    308 ext/etc/etc.c  	rb_ary_push(mem, safe_setup_str(*tbl));
safe_setup_str    312 ext/etc/etc.c  			 safe_setup_str(grp->gr_name),
safe_setup_str    314 ext/etc/etc.c  			 safe_setup_str(grp->gr_passwd),


scan_env_add_mem_entry

scan_env_add_mem_entry 4299 regparse.c     	num = scan_env_add_mem_entry(env);
scan_env_add_mem_entry 4332 regparse.c     	num = scan_env_add_mem_entry(env);
scan_env_add_mem_entry 4431 regparse.c         num = scan_env_add_mem_entry(env);


scan_hex

scan_hex         4848 parse.y        	    c = scan_hex(lex_p, 2, &numlen);
scan_hex         4936 parse.y        	    scan_hex(lex_p, 2, &numlen);


scan_oct

scan_oct         4839 parse.y        	    c = scan_oct(lex_p, 3, &numlen);
scan_oct          535 ruby.c         		    v = scan_oct(s, 1, &numlen);
scan_oct          654 ruby.c         		    v = scan_oct(s, 2, &numlen);
scan_oct          678 ruby.c         		v = scan_oct(s, 4, &numlen);
scan_oct          754 ruby.c         		v = scan_oct(s, 2, &numlen);


scan_once

scan_once        3849 string.c       	while (!NIL_P(result = scan_once(str, pat, &start))) {
scan_once        3857 string.c           while (!NIL_P(result = scan_once(str, pat, &start))) {


scan_unsigned_hexadecimal_number

scan_unsigned_hexadecimal_number 2703 regparse.c     	num = scan_unsigned_hexadecimal_number(&p, end, 8, enc);
scan_unsigned_hexadecimal_number 2723 regparse.c     	num = scan_unsigned_hexadecimal_number(&p, end, 2, enc);
scan_unsigned_hexadecimal_number 2739 regparse.c     	num = scan_unsigned_hexadecimal_number(&p, end, 4, enc);
scan_unsigned_hexadecimal_number 3036 regparse.c     	num = scan_unsigned_hexadecimal_number(&p, end, 8, enc);
scan_unsigned_hexadecimal_number 3054 regparse.c     	num = scan_unsigned_hexadecimal_number(&p, end, 2, enc);
scan_unsigned_hexadecimal_number 3070 regparse.c     	num = scan_unsigned_hexadecimal_number(&p, end, 4, enc);


scan_unsigned_octal_number

scan_unsigned_octal_number 2755 regparse.c     	num = scan_unsigned_octal_number(&p, end, 3, enc);
scan_unsigned_octal_number 3116 regparse.c     	num = scan_unsigned_octal_number(&p, end, (c == '0' ? 2:3), enc);


scope_dup

scope_dup         978 eval.c         static void scope_dup(struct SCOPE *);
scope_dup         982 eval.c         	if (_old) scope_dup(_old);	\
scope_dup        1748 eval.c         	scope_dup(saved_scope);
scope_dup        4870 eval.c         	scope_dup(old_scope);
scope_dup        6184 eval.c         	    scope_dup(ruby_scope);
scope_dup        6186 eval.c         		scope_dup(tag->scope);
scope_dup        7893 eval.c         	scope_dup(tmp->scope);
scope_dup        8006 eval.c             scope_dup(data->scope);
scope_dup        8115 eval.c             scope_dup(data->scope);
scope_dup        11753 eval.c             scope_dup(ruby_scope);
scope_dup        11878 eval.c             scope_dup(ruby_block->scope);
scope_dup        12573 eval.c             scope_dup(ruby_scope);
scope_dup        12575 eval.c         	scope_dup(tag->scope);


sdbm_close

sdbm_close         48 ext/sdbm/init.c     if (dbmp->di_dbm) sdbm_close(dbmp->di_dbm);
sdbm_close         59 ext/sdbm/init.c     sdbm_close(dbmp->di_dbm);
sdbm_close         71 ext/sdbm/sdbm.h extern void sdbm_close proto((DBM *));


sdbm_delete

sdbm_delete       292 ext/sdbm/init.c     if (sdbm_delete(dbm, key)) {
sdbm_delete       318 ext/sdbm/init.c     sdbm_delete(dbm, key);
sdbm_delete       356 ext/sdbm/init.c 	if (sdbm_delete(dbm, key)) {
sdbm_delete       378 ext/sdbm/init.c 	if (sdbm_delete(dbm, key)) {
sdbm_delete        73 ext/sdbm/sdbm.h extern int sdbm_delete proto((DBM *, datum));


sdbm_fetch

sdbm_fetch        163 ext/sdbm/init.c     value = sdbm_fetch(dbm, key);
sdbm_fetch        209 ext/sdbm/init.c 	val = sdbm_fetch(dbm, key);
sdbm_fetch        229 ext/sdbm/init.c 	val = sdbm_fetch(dbm, key);
sdbm_fetch        283 ext/sdbm/init.c     value = sdbm_fetch(dbm, key);
sdbm_fetch        315 ext/sdbm/init.c     val = sdbm_fetch(dbm, key);
sdbm_fetch        342 ext/sdbm/init.c 	val = sdbm_fetch(dbm, key);
sdbm_fetch        399 ext/sdbm/init.c 	val = sdbm_fetch(dbm, key);
sdbm_fetch        537 ext/sdbm/init.c 	val = sdbm_fetch(dbm, key);
sdbm_fetch        571 ext/sdbm/init.c 	val = sdbm_fetch(dbm, key);
sdbm_fetch        611 ext/sdbm/init.c 	val = sdbm_fetch(dbm, key);
sdbm_fetch        631 ext/sdbm/init.c     val = sdbm_fetch(dbm, key);
sdbm_fetch        650 ext/sdbm/init.c 	val = sdbm_fetch(dbm, key);
sdbm_fetch        670 ext/sdbm/init.c 	val = sdbm_fetch(dbm, key);
sdbm_fetch        690 ext/sdbm/init.c 	val = sdbm_fetch(dbm, key);
sdbm_fetch         72 ext/sdbm/sdbm.h extern datum sdbm_fetch proto((DBM *, datum));


sdbm_firstkey

sdbm_firstkey     208 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey     227 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey     313 ext/sdbm/init.c     key = sdbm_firstkey(dbm);
sdbm_firstkey     341 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey     377 ext/sdbm/init.c     while (key = sdbm_firstkey(dbm), key.dptr) {
sdbm_firstkey     398 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey     495 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey     516 ext/sdbm/init.c 	for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey     536 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey     553 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey     570 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey     592 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey     610 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey     649 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey     669 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey     689 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_firstkey      75 ext/sdbm/sdbm.h extern datum sdbm_firstkey proto((DBM *));


sdbm_hash

sdbm_hash         123 ext/sdbm/_sdbm.c #define exhash(item)	sdbm_hash((item).dptr, (item).dsize)
sdbm_hash         636 ext/sdbm/_sdbm.c #define exhash(item)	sdbm_hash((item).dptr, (item).dsize)
sdbm_hash          82 ext/sdbm/sdbm.h extern long sdbm_hash proto((char *, int));


sdbm_nextkey

sdbm_nextkey      208 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey      227 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey      341 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey      398 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey      495 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey      516 ext/sdbm/init.c 	for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey      536 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey      553 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey      570 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey      592 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey      610 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey      649 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey      669 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey      689 ext/sdbm/init.c     for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
sdbm_nextkey       76 ext/sdbm/sdbm.h extern datum sdbm_nextkey proto((DBM *));


sdbm_open

sdbm_open         112 ext/sdbm/init.c 	dbm = sdbm_open(RSTRING(file)->ptr, O_RDWR|O_CREAT, mode);
sdbm_open         114 ext/sdbm/init.c 	dbm = sdbm_open(RSTRING(file)->ptr, O_RDWR, 0);
sdbm_open         116 ext/sdbm/init.c 	dbm = sdbm_open(RSTRING(file)->ptr, O_RDONLY, 0);
sdbm_open          70 ext/sdbm/sdbm.h extern DBM *sdbm_open proto((char *, int, int));


sdbm_prep

sdbm_prep         172 ext/sdbm/_sdbm.c 	db = sdbm_prep(dirname, pagname, flags, mode);
sdbm_prep          81 ext/sdbm/sdbm.h extern DBM *sdbm_prep proto((char *, char *, int, int));


sdbm_rdonly

sdbm_rdonly       271 ext/sdbm/_sdbm.c 	if (sdbm_rdonly(db))
sdbm_rdonly       302 ext/sdbm/_sdbm.c 	if (sdbm_rdonly(db))


sdbm_store

sdbm_store        472 ext/sdbm/init.c     if (sdbm_store(dbm, key, val, DBM_REPLACE)) {
sdbm_store         74 ext/sdbm/sdbm.h extern int sdbm_store proto((DBM *, datum, datum, int));


search_method

search_method     453 eval.c             if ((body = search_method(klass, id, &origin)) == 0 || !body->nd_body) {
search_method     594 eval.c             body = search_method(klass, name, &origin);
search_method     596 eval.c         	body = search_method(rb_cObject, name, &origin);
search_method    1924 eval.c             body = search_method(klass, id, &origin);
search_method    2021 eval.c             orig = search_method(klass, def, &origin);
search_method    2024 eval.c         	    orig = search_method(rb_cObject, def, &origin);
search_method    3739 eval.c         	    body = search_method(ruby_class, node->nd_mid, &origin);
search_method    7205 eval.c         	    body = search_method(m, id, &m);
search_method    7207 eval.c         		body = search_method(rb_cObject, id, &m);


search_required

search_required  6730 eval.c         static int search_required(VALUE, VALUE *);
search_required  6750 eval.c             if (search_required(rb_str_new2(feature), &fname)) {
search_required  6925 eval.c         	found = search_required(fname, &path);


search_time_t

search_time_t     738 time.c         	return search_time_t(&buf, utc_p);
search_time_t     756 time.c         	return search_time_t(&buf, utc_p);


secure_visibility

secure_visibility 7002 eval.c             secure_visibility(self);
secure_visibility 7022 eval.c             secure_visibility(module);
secure_visibility 7045 eval.c             secure_visibility(module);
secure_visibility 7077 eval.c             secure_visibility(module);
secure_visibility 7193 eval.c             secure_visibility(module);


security

security          923 process.c          security(prog);
security         1077 process.c          security(prog);
security         1187 process.c          security(RSTRING(prog ? prog : argv[0])->ptr);


seepair

seepair           641 ext/sdbm/_sdbm.c static int seepair proto((char *, int, char *, int));
seepair           726 ext/sdbm/_sdbm.c 	if ((i = seepair(pag, n, key.dptr, key.dsize)) == 0)
seepair           742 ext/sdbm/_sdbm.c 		   seepair(pag, GET_SHORT(ino,0), key.dptr, key.dsize) > 0;
seepair           779 ext/sdbm/_sdbm.c 	if ((i = seepair(pag, n, key.dptr, key.dsize)) == 0)


select

select           9673 eval.c             return select(n, rb_fd_ptr(readfds), rb_fd_ptr(writefds), rb_fd_ptr(exceptfds), timeout);
select           10778 eval.c         	    n = select(0, 0, 0, 0, &time);
select           10861 eval.c         	    n = select(max, read, write, except, tvp);
select           11603 eval.c         	select(0, NULL, NULL, NULL, &tv);
select            194 intern.h       #define rb_fd_select(n, rfds, wfds, efds, timeout)	select(n, rfds, wfds, efds, timeout)
select           2025 win32/win32.c  	    r = select(nfds, rd, wr, ex, timeout);


select_internal

select_internal  4514 io.c               return select_internal(p->read, p->write, p->except, p->timeout, p->fdsets);
select_internal  4563 io.c               return select_internal(args.read, args.write, args.except,


select_opt_exact_info

select_opt_exact_info 3918 regcomp.c        select_opt_exact_info(enc, &to->exm, &add->exb);
select_opt_exact_info 3919 regcomp.c        select_opt_exact_info(enc, &to->exm, &add->exm);
select_opt_exact_info 3927 regcomp.c      	select_opt_exact_info(enc, &to->exb, &to->expr);
select_opt_exact_info 3929 regcomp.c      	select_opt_exact_info(enc, &to->exm, &to->expr);
select_opt_exact_info 4404 regcomp.c          select_opt_exact_info(reg->enc, &opt.exb, &opt.exm);


select_str_opcode

select_str_opcode  394 regcomp.c        int op = select_str_opcode(mb_len, str_len, ignore_case);
select_str_opcode  410 regcomp.c        int op = select_str_opcode(mb_len, str_len, ignore_case);


send

send              504 ext/socket/socket.c 	n = send(fd, RSTRING(mesg)->ptr, RSTRING(mesg)->len, NUM2INT(flags));
send               68 ext/syck/emitter.c     char *send = s + len;
send               81 ext/syck/emitter.c     while (s < send) {
send               93 ext/syck/emitter.c         if (s + 2 < send && s[2] == '=')
send               95 ext/syck/emitter.c         if (c != -1 && s + 3 < send && s[3] == '=') {
send             1054 pack.c             unsigned char *send = s + RSTRING(from)->len;
send             1056 pack.c             while (s < send) {
send             1121 pack.c             if (len > (send-s)/sz) {			\
send             1123 pack.c         	    tmp = len-(send-s)/sz;		\
send             1125 pack.c         	len = (send-s)/sz;			\
send             1292 pack.c             char *s, *send;
send             1305 pack.c             send = s + RSTRING(str)->len;
send             1341 pack.c         	    len = send - s;
send             1357 pack.c         	    if (len > send - s) len = send - s;
send             1375 pack.c         		if (len > send-s) len = send-s;
send             1378 pack.c         		if (t < send) t++;
send             1384 pack.c         	    if (len > send - s) len = send - s;
send             1397 pack.c         		if (p[-1] == '*' || len > (send - s) * 8)
send             1398 pack.c         		    len = (send - s) * 8;
send             1417 pack.c         		if (p[-1] == '*' || len > (send - s) * 8)
send             1418 pack.c         		    len = (send - s) * 8;
send             1437 pack.c         		if (p[-1] == '*' || len > (send - s) * 2)
send             1438 pack.c         		    len = (send - s) * 2;
send             1459 pack.c         		if (p[-1] == '*' || len > (send - s) * 2)
send             1460 pack.c         		    len = (send - s) * 2;
send             1703 pack.c         	    if (len > send - s) len = send - s;
send             1704 pack.c         	    while (len > 0 && s < send) {
send             1705 pack.c         		long alen = send - s;
send             1716 pack.c         		VALUE buf = infected_str_new(0, (send - s)*3/4, str);
send             1720 pack.c         		while (s < send && *s > ' ' && *s < 'a') {
send             1735 pack.c         			if (s < send && *s >= ' ')
send             1739 pack.c         			if (s < send && *s >= ' ')
send             1743 pack.c         			if (s < send && *s >= ' ')
send             1747 pack.c         			if (s < send && *s >= ' ')
send             1760 pack.c         		    else if (s < send && (s+1 == send || s[1] == '\n'))
send             1772 pack.c         		VALUE buf = infected_str_new(0, (send - s)*3/4, str);
send             1789 pack.c         		while (s < send) {
send             1801 pack.c         		    if (s + 2 < send && s[2] == '=')
send             1803 pack.c         		    if (c != -1 && s + 3 < send && s[3] == '=') {
send             1816 pack.c         		VALUE buf = infected_str_new(0, send - s, str);
send             1820 pack.c         		while (s < send) {
send             1822 pack.c         			if (++s == send) break;
send             1825 pack.c         			    if (++s == send) break;
send             1854 pack.c         	    if (len > send - s)
send             1860 pack.c         	    if (sizeof(char *) <= send - s) {
send             1897 pack.c         	    if (len > (send - s) / sizeof(char *))
send             1898 pack.c         		len = (send - s) / sizeof(char *);
send             1900 pack.c         		if (send - s < sizeof(char *))
send             1942 pack.c         		while (len > 0 && s < send) {
send             1953 pack.c         			while (s < send) {
send             1715 re.c               char *s, *send, *t;
send             1720 re.c               send = s + RSTRING(str)->len;
send             1721 re.c               for (; s < send; s++) {
send             1726 re.c           	    while (n-- && s < send)
send             1750 re.c               for (; s < send; s++) {
send             1755 re.c           	    while (n-- && s < send)
send             2779 regparse.c           OnigCodePoint send[] = { (OnigCodePoint )':', (OnigCodePoint )']' };
send             2782 regparse.c           if (str_exist_check_with_esc(send, 2, p, end,
send             2516 string.c           char *s, *send;
send             2520 string.c           s = RSTRING(str)->ptr; send = s + RSTRING(str)->len;
send             2521 string.c           while (s < send) {
send             2568 string.c           char *s, *send;
send             2572 string.c           s = RSTRING(str)->ptr; send = s + RSTRING(str)->len;
send             2573 string.c           while (s < send) {
send             2625 string.c           char *s, *send;
send             2630 string.c           s = RSTRING(str)->ptr; send = s + RSTRING(str)->len;
send             2635 string.c           while (++s < send) {
send             2681 string.c           char *s, *send;
send             2685 string.c           s = RSTRING(str)->ptr; send = s + RSTRING(str)->len;
send             2686 string.c           while (s < send) {
send             2774 string.c           char *s, *send;
send             2822 string.c           s = RSTRING(str)->ptr; send = s + RSTRING(str)->len;
send             2827 string.c       	while (s < send) {
send             2847 string.c       	while (s < send) {
send             2945 string.c           char *s, *send, *t;
send             2965 string.c           send = s + RSTRING(str)->len;
send             2966 string.c           while (s < send) {
send             3016 string.c           char *s, *send, *t;
send             3039 string.c           send = s + RSTRING(str)->len;
send             3041 string.c           while (s < send) {
send             3139 string.c           char *s, *send;
send             3156 string.c           send = s + RSTRING(str)->len;
send             3158 string.c           while (s < send) {
send             2386 win32/win32.c  	r = send(TO_SOCKET(s), buf, len, flags);


send_funcall

send_funcall     5874 eval.c             return send_funcall(argc, argv, recv, scope);
send_funcall     5892 eval.c             return send_funcall(argc, argv, recv, CALLING_FCALL);


sendto

sendto            498 ext/socket/socket.c 	n = sendto(fd, RSTRING(mesg)->ptr, RSTRING(mesg)->len, NUM2INT(flags),
sendto           1675 ext/socket/socket.c 	n = sendto(fptr->fd, RSTRING(mesg)->ptr, RSTRING(mesg)->len, NUM2INT(flags),
sendto           2404 win32/win32.c  	r = sendto(TO_SOCKET(s), buf, len, flags, to, tolen);


set_arg0

set_arg0         1159 ruby.c             rb_define_hooked_variable("$0", &rb_progname, 0, set_arg0);
set_arg0         1160 ruby.c             rb_define_hooked_variable("$PROGRAM_NAME", &rb_progname, 0, set_arg0);


set_argv

set_argv         2345 ext/win32ole/win32ole.c         set_argv(realargs, cNamedArgs, op.dp.cArgs);
set_argv         2571 ext/win32ole/win32ole.c         set_argv(realargs, 0, dispParams.cArgs);


set_backtrace

set_backtrace    4359 eval.c         	    set_backtrace(mesg, at);
set_backtrace    4491 eval.c         	    set_backtrace(mesg, argv[2]);
set_backtrace    7404 eval.c             set_backtrace(ruby_errinfo, val);
set_backtrace    10943 eval.c         	set_backtrace(errinfo, errat);


set_bm_backward_skip

set_bm_backward_skip 3079 regexec.c      static int set_bm_backward_skip P_((UChar* s, UChar* end, OnigEncoding enc,
set_bm_backward_skip 3115 regexec.c            r = set_bm_backward_skip(reg->exact, reg->exact_end, reg->enc,


set_code_score

set_code_score   1482 ext/nkf/nkf-utf8/nkf.c         set_code_score(ptr, SCORE_ERROR);
set_code_score   1484 ext/nkf/nkf-utf8/nkf.c         set_code_score(ptr, SCORE_KANA);
set_code_score   1487 ext/nkf/nkf-utf8/nkf.c         set_code_score(ptr, SCORE_NO_EXIST);
set_code_score   1490 ext/nkf/nkf-utf8/nkf.c         set_code_score(ptr, score_table_A0[c2 & 0x0f]);
set_code_score   1492 ext/nkf/nkf-utf8/nkf.c         set_code_score(ptr, score_table_F0[c2 & 0x0f]);
set_code_score   1494 ext/nkf/nkf-utf8/nkf.c         set_code_score(ptr, SCORE_L2);
set_code_score   1597 ext/nkf/nkf-utf8/nkf.c                   set_code_score(ptr, SCORE_CP932);


set_eventloop_tick

set_eventloop_tick 1002 ext/tk/tcltklib.c     return set_eventloop_tick(self, tick);
set_eventloop_tick 7812 ext/tk/tcltklib.c     rb_define_module_function(lib, "set_eventloop_tick",set_eventloop_tick,1);


set_eventloop_weight

set_eventloop_weight 1109 ext/tk/tcltklib.c     return set_eventloop_weight(self, loop_max, no_event);
set_eventloop_weight 7817 ext/tk/tcltklib.c                               set_eventloop_weight, 2);


set_iconv

set_iconv         299 ext/nkf/nkf-utf8/nkf.c STATIC  void    set_iconv PROTO((int f, int (*iconv_func)(int c2,int c1,int c0)));
set_iconv        1504 ext/nkf/nkf-utf8/nkf.c     if (iconv == ptr->iconv_func) set_iconv(FALSE, 0);
set_iconv        1777 ext/nkf/nkf-utf8/nkf.c             set_iconv(TRUE, result->iconv_func);
set_iconv        1912 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, e_iconv);
set_iconv        1914 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, s_iconv);
set_iconv        1917 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, w_iconv);
set_iconv        1919 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, w_iconv16);
set_iconv        1921 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, w_iconv16);
set_iconv        1924 ext/nkf/nkf-utf8/nkf.c         set_iconv(FALSE, e_iconv);
set_iconv        2207 ext/nkf/nkf-utf8/nkf.c                 input_mode = ASCII; set_iconv(FALSE, 0);
set_iconv        2318 ext/nkf/nkf-utf8/nkf.c         set_iconv(FALSE, result->iconv_func);
set_iconv        2905 ext/nkf/nkf-utf8/nkf.c             set_iconv(FALSE, 0);
set_iconv        3014 ext/nkf/nkf-utf8/nkf.c             set_iconv(FALSE, 0);
set_iconv        3641 ext/nkf/nkf-utf8/nkf.c     if(mime_iconv_back)set_iconv(FALSE, mime_iconv_back);
set_iconv        3681 ext/nkf/nkf-utf8/nkf.c     set_iconv(FALSE, mime_priority_func[j]);


set_input_codename

set_input_codename  456 ext/nkf/nkf-utf8/nkf.c STATIC  void    set_input_codename PROTO((char *codename));
set_input_codename 1420 ext/nkf/nkf-utf8/nkf.c             set_input_codename(p->name);
set_input_codename 2120 ext/nkf/nkf-utf8/nkf.c                         set_input_codename("ISO-2022-JP");
set_input_codename 2271 ext/nkf/nkf-utf8/nkf.c 	    set_input_codename(result->name);


set_max_block_time

set_max_block_time 7818 ext/tk/tcltklib.c     rb_define_module_function(lib, "set_max_block_time", set_max_block_time,1);
set_max_block_time 7907 ext/tk/tcltklib.c     rb_define_method(ip, "set_max_block_time", set_max_block_time, 1);


set_method_visibility

set_method_visibility 7027 eval.c         	set_method_visibility(module, argc, argv, NOEX_PUBLIC);
set_method_visibility 7050 eval.c         	set_method_visibility(module, argc, argv, NOEX_PROTECTED);
set_method_visibility 7082 eval.c         	set_method_visibility(module, argc, argv, NOEX_PRIVATE);
set_method_visibility 7097 eval.c             set_method_visibility(CLASS_OF(obj), argc, argv, NOEX_PUBLIC);
set_method_visibility 7120 eval.c             set_method_visibility(CLASS_OF(obj), argc, argv, NOEX_PRIVATE);
set_method_visibility 7199 eval.c             set_method_visibility(module, argc, argv, NOEX_PRIVATE);


set_mml

set_mml          4011 regcomp.c              set_mml(&opt->len, slen, slen);
set_mml          4033 regcomp.c              set_mml(&opt->len, slen, max);
set_mml          4052 regcomp.c      	set_mml(&opt->len, min, max);
set_mml          4061 regcomp.c      	set_mml(&opt->len, 1, 1);
set_mml          4096 regcomp.c            set_mml(&opt->len, min, max);
set_mml          4104 regcomp.c            set_mml(&opt->len, min, max);
set_mml          4154 regcomp.c      	set_mml(&opt->len, 0, ONIG_INFINITE_DISTANCE);
set_mml          4170 regcomp.c            if (r == 0) set_mml(&opt->len, min, max);
set_mml          4177 regcomp.c            set_mml(&opt->len, 0, ONIG_INFINITE_DISTANCE);
set_mml          4236 regcomp.c            set_mml(&opt->len, min, max);
set_mml          4265 regcomp.c      	  set_mml(&opt->len, min, max);


set_no_event_wait

set_no_event_wait 1054 ext/tk/tcltklib.c     return set_no_event_wait(self, wait);
set_no_event_wait 7814 ext/tk/tcltklib.c     rb_define_module_function(lib, "set_no_event_wait", set_no_event_wait, 1);


set_sub_anchor

set_sub_anchor   4411 regcomp.c            set_sub_anchor(reg, &opt.exb.anc);
set_sub_anchor   4417 regcomp.c          set_sub_anchor(reg, &opt.map.anc);


set_syserr

set_syserr        809 error.c        	error = set_syserr(n, name);
set_syserr       1102 error.c            set_syserr(EPERM, "EPERM");
set_syserr       1105 error.c            set_syserr(ENOENT, "ENOENT");
set_syserr       1108 error.c            set_syserr(ESRCH, "ESRCH");
set_syserr       1111 error.c            set_syserr(EINTR, "EINTR");
set_syserr       1114 error.c            set_syserr(EIO, "EIO");
set_syserr       1117 error.c            set_syserr(ENXIO, "ENXIO");
set_syserr       1120 error.c            set_syserr(E2BIG, "E2BIG");
set_syserr       1123 error.c            set_syserr(ENOEXEC, "ENOEXEC");
set_syserr       1126 error.c            set_syserr(EBADF, "EBADF");
set_syserr       1129 error.c            set_syserr(ECHILD, "ECHILD");
set_syserr       1132 error.c            set_syserr(EAGAIN, "EAGAIN");
set_syserr       1135 error.c            set_syserr(ENOMEM, "ENOMEM");
set_syserr       1138 error.c            set_syserr(EACCES, "EACCES");
set_syserr       1141 error.c            set_syserr(EFAULT, "EFAULT");
set_syserr       1144 error.c            set_syserr(ENOTBLK, "ENOTBLK");
set_syserr       1147 error.c            set_syserr(EBUSY, "EBUSY");
set_syserr       1150 error.c            set_syserr(EEXIST, "EEXIST");
set_syserr       1153 error.c            set_syserr(EXDEV, "EXDEV");
set_syserr       1156 error.c            set_syserr(ENODEV, "ENODEV");
set_syserr       1159 error.c            set_syserr(ENOTDIR, "ENOTDIR");
set_syserr       1162 error.c            set_syserr(EISDIR, "EISDIR");
set_syserr       1165 error.c            set_syserr(EINVAL, "EINVAL");
set_syserr       1168 error.c            set_syserr(ENFILE, "ENFILE");
set_syserr       1171 error.c            set_syserr(EMFILE, "EMFILE");
set_syserr       1174 error.c            set_syserr(ENOTTY, "ENOTTY");
set_syserr       1177 error.c            set_syserr(ETXTBSY, "ETXTBSY");
set_syserr       1180 error.c            set_syserr(EFBIG, "EFBIG");
set_syserr       1183 error.c            set_syserr(ENOSPC, "ENOSPC");
set_syserr       1186 error.c            set_syserr(ESPIPE, "ESPIPE");
set_syserr       1189 error.c            set_syserr(EROFS, "EROFS");
set_syserr       1192 error.c            set_syserr(EMLINK, "EMLINK");
set_syserr       1195 error.c            set_syserr(EPIPE, "EPIPE");
set_syserr       1198 error.c            set_syserr(EDOM, "EDOM");
set_syserr       1201 error.c            set_syserr(ERANGE, "ERANGE");
set_syserr       1204 error.c            set_syserr(EDEADLK, "EDEADLK");
set_syserr       1207 error.c            set_syserr(ENAMETOOLONG, "ENAMETOOLONG");
set_syserr       1210 error.c            set_syserr(ENOLCK, "ENOLCK");
set_syserr       1213 error.c            set_syserr(ENOSYS, "ENOSYS");
set_syserr       1216 error.c            set_syserr(ENOTEMPTY, "ENOTEMPTY");
set_syserr       1219 error.c            set_syserr(ELOOP, "ELOOP");
set_syserr       1222 error.c            set_syserr(EWOULDBLOCK, "EWOULDBLOCK");
set_syserr       1225 error.c            set_syserr(ENOMSG, "ENOMSG");
set_syserr       1228 error.c            set_syserr(EIDRM, "EIDRM");
set_syserr       1231 error.c            set_syserr(ECHRNG, "ECHRNG");
set_syserr       1234 error.c            set_syserr(EL2NSYNC, "EL2NSYNC");
set_syserr       1237 error.c            set_syserr(EL3HLT, "EL3HLT");
set_syserr       1240 error.c            set_syserr(EL3RST, "EL3RST");
set_syserr       1243 error.c            set_syserr(ELNRNG, "ELNRNG");
set_syserr       1246 error.c            set_syserr(EUNATCH, "EUNATCH");
set_syserr       1249 error.c            set_syserr(ENOCSI, "ENOCSI");
set_syserr       1252 error.c            set_syserr(EL2HLT, "EL2HLT");
set_syserr       1255 error.c            set_syserr(EBADE, "EBADE");
set_syserr       1258 error.c            set_syserr(EBADR, "EBADR");
set_syserr       1261 error.c            set_syserr(EXFULL, "EXFULL");
set_syserr       1264 error.c            set_syserr(ENOANO, "ENOANO");
set_syserr       1267 error.c            set_syserr(EBADRQC, "EBADRQC");
set_syserr       1270 error.c            set_syserr(EBADSLT, "EBADSLT");
set_syserr       1273 error.c            set_syserr(EDEADLOCK, "EDEADLOCK");
set_syserr       1276 error.c            set_syserr(EBFONT, "EBFONT");
set_syserr       1279 error.c            set_syserr(ENOSTR, "ENOSTR");
set_syserr       1282 error.c            set_syserr(ENODATA, "ENODATA");
set_syserr       1285 error.c            set_syserr(ETIME, "ETIME");
set_syserr       1288 error.c            set_syserr(ENOSR, "ENOSR");
set_syserr       1291 error.c            set_syserr(ENONET, "ENONET");
set_syserr       1294 error.c            set_syserr(ENOPKG, "ENOPKG");
set_syserr       1297 error.c            set_syserr(EREMOTE, "EREMOTE");
set_syserr       1300 error.c            set_syserr(ENOLINK, "ENOLINK");
set_syserr       1303 error.c            set_syserr(EADV, "EADV");
set_syserr       1306 error.c            set_syserr(ESRMNT, "ESRMNT");
set_syserr       1309 error.c            set_syserr(ECOMM, "ECOMM");
set_syserr       1312 error.c            set_syserr(EPROTO, "EPROTO");
set_syserr       1315 error.c            set_syserr(EMULTIHOP, "EMULTIHOP");
set_syserr       1318 error.c            set_syserr(EDOTDOT, "EDOTDOT");
set_syserr       1321 error.c            set_syserr(EBADMSG, "EBADMSG");
set_syserr       1324 error.c            set_syserr(EOVERFLOW, "EOVERFLOW");
set_syserr       1327 error.c            set_syserr(ENOTUNIQ, "ENOTUNIQ");
set_syserr       1330 error.c            set_syserr(EBADFD, "EBADFD");
set_syserr       1333 error.c            set_syserr(EREMCHG, "EREMCHG");
set_syserr       1336 error.c            set_syserr(ELIBACC, "ELIBACC");
set_syserr       1339 error.c            set_syserr(ELIBBAD, "ELIBBAD");
set_syserr       1342 error.c            set_syserr(ELIBSCN, "ELIBSCN");
set_syserr       1345 error.c            set_syserr(ELIBMAX, "ELIBMAX");
set_syserr       1348 error.c            set_syserr(ELIBEXEC, "ELIBEXEC");
set_syserr       1351 error.c            set_syserr(EILSEQ, "EILSEQ");
set_syserr       1354 error.c            set_syserr(ERESTART, "ERESTART");
set_syserr       1357 error.c            set_syserr(ESTRPIPE, "ESTRPIPE");
set_syserr       1360 error.c            set_syserr(EUSERS, "EUSERS");
set_syserr       1363 error.c            set_syserr(ENOTSOCK, "ENOTSOCK");
set_syserr       1366 error.c            set_syserr(EDESTADDRREQ, "EDESTADDRREQ");
set_syserr       1369 error.c            set_syserr(EMSGSIZE, "EMSGSIZE");
set_syserr       1372 error.c            set_syserr(EPROTOTYPE, "EPROTOTYPE");
set_syserr       1375 error.c            set_syserr(ENOPROTOOPT, "ENOPROTOOPT");
set_syserr       1378 error.c            set_syserr(EPROTONOSUPPORT, "EPROTONOSUPPORT");
set_syserr       1381 error.c            set_syserr(ESOCKTNOSUPPORT, "ESOCKTNOSUPPORT");
set_syserr       1384 error.c            set_syserr(EOPNOTSUPP, "EOPNOTSUPP");
set_syserr       1387 error.c            set_syserr(EPFNOSUPPORT, "EPFNOSUPPORT");
set_syserr       1390 error.c            set_syserr(EAFNOSUPPORT, "EAFNOSUPPORT");
set_syserr       1393 error.c            set_syserr(EADDRINUSE, "EADDRINUSE");
set_syserr       1396 error.c            set_syserr(EADDRNOTAVAIL, "EADDRNOTAVAIL");
set_syserr       1399 error.c            set_syserr(ENETDOWN, "ENETDOWN");
set_syserr       1402 error.c            set_syserr(ENETUNREACH, "ENETUNREACH");
set_syserr       1405 error.c            set_syserr(ENETRESET, "ENETRESET");
set_syserr       1408 error.c            set_syserr(ECONNABORTED, "ECONNABORTED");
set_syserr       1411 error.c            set_syserr(ECONNRESET, "ECONNRESET");
set_syserr       1414 error.c            set_syserr(ENOBUFS, "ENOBUFS");
set_syserr       1417 error.c            set_syserr(EISCONN, "EISCONN");
set_syserr       1420 error.c            set_syserr(ENOTCONN, "ENOTCONN");
set_syserr       1423 error.c            set_syserr(ESHUTDOWN, "ESHUTDOWN");
set_syserr       1426 error.c            set_syserr(ETOOMANYREFS, "ETOOMANYREFS");
set_syserr       1429 error.c            set_syserr(ETIMEDOUT, "ETIMEDOUT");
set_syserr       1432 error.c            set_syserr(ECONNREFUSED, "ECONNREFUSED");
set_syserr       1435 error.c            set_syserr(EHOSTDOWN, "EHOSTDOWN");
set_syserr       1438 error.c            set_syserr(EHOSTUNREACH, "EHOSTUNREACH");
set_syserr       1441 error.c            set_syserr(EALREADY, "EALREADY");
set_syserr       1444 error.c            set_syserr(EINPROGRESS, "EINPROGRESS");
set_syserr       1447 error.c            set_syserr(ESTALE, "ESTALE");
set_syserr       1450 error.c            set_syserr(EUCLEAN, "EUCLEAN");
set_syserr       1453 error.c            set_syserr(ENOTNAM, "ENOTNAM");
set_syserr       1456 error.c            set_syserr(ENAVAIL, "ENAVAIL");
set_syserr       1459 error.c            set_syserr(EISNAM, "EISNAM");
set_syserr       1462 error.c            set_syserr(EREMOTEIO, "EREMOTEIO");
set_syserr       1465 error.c            set_syserr(EDQUOT, "EDQUOT");
set_syserr       1467 error.c            eNOERROR = set_syserr(0, "NOERROR");


set_yylval_id

set_yylval_id    5690 parse.y        		set_yylval_id(tPOW);
set_yylval_id    5699 parse.y        		set_yylval_id('*');
set_yylval_id    5820 parse.y        		set_yylval_id(tLSHFT);
set_yylval_id    5842 parse.y        		set_yylval_id(tRSHFT);
set_yylval_id    5939 parse.y        		set_yylval_id(tANDOP);
set_yylval_id    5947 parse.y        	    set_yylval_id('&');
set_yylval_id    5974 parse.y        		set_yylval_id(tOROP);
set_yylval_id    5982 parse.y        	    set_yylval_id('|');
set_yylval_id    6006 parse.y        	    set_yylval_id('+');
set_yylval_id    6036 parse.y        	    set_yylval_id('-');
set_yylval_id    6347 parse.y        	    set_yylval_id('/');
set_yylval_id    6369 parse.y        	    set_yylval_id('^');
set_yylval_id    6553 parse.y        	    set_yylval_id('%');
set_yylval_id    6607 parse.y        	    set_yylval_id(rb_intern(tok()));
set_yylval_id    6623 parse.y        	    set_yylval_id(rb_intern(tok()));
set_yylval_id    6788 parse.y        			set_yylval_id(rb_intern(kw->name));
set_yylval_id    6819 parse.y        		    set_yylval_id(rb_intern(tok()));
set_yylval_id    6840 parse.y        	    set_yylval_id(ident);


set_yylval_literal

set_yylval_literal 5932 parse.y        	set_yylval_literal(INT2FIX(c));
set_yylval_literal 6120 parse.y        		    set_yylval_literal(rb_cstr_to_inum(tok(), 16, Qfalse));
set_yylval_literal 6144 parse.y        		    set_yylval_literal(rb_cstr_to_inum(tok(), 2, Qfalse));
set_yylval_literal 6168 parse.y        		    set_yylval_literal(rb_cstr_to_inum(tok(), 10, Qfalse));
set_yylval_literal 6199 parse.y        			set_yylval_literal(rb_cstr_to_inum(tok(), 8, Qfalse));
set_yylval_literal 6215 parse.y        		    set_yylval_literal(INT2FIX(0));
set_yylval_literal 6294 parse.y        		set_yylval_literal(rb_float_new(d));
set_yylval_literal 6297 parse.y        	    set_yylval_literal(rb_cstr_to_inum(tok(), 10, Qfalse));


set_yylval_node

set_yylval_node  6639 parse.y        	    set_yylval_node(NEW_BACK_REF(c));
set_yylval_node  6653 parse.y        	    set_yylval_node(NEW_NTH_REF(atoi(tok()+1)));


set_yylval_str

set_yylval_str   5203 parse.y            set_yylval_str(rb_str_new(tok(), toklen()));
set_yylval_str   5387 parse.y        		set_yylval_str(rb_str_new(tok(), toklen()));
set_yylval_str   5397 parse.y            set_yylval_str(str);


setbinmode

setbinmode        745 ext/nkf/nkf-utf8/nkf.c     setbinmode(stdout);
setbinmode        758 ext/nkf/nkf-utf8/nkf.c       setbinmode(stdin);
setbinmode        841 ext/nkf/nkf-utf8/nkf.c                       setbinmode(stdout);
setbinmode        850 ext/nkf/nkf-utf8/nkf.c                  setbinmode(fin);


setdbit

setdbit           114 ext/sdbm/_sdbm.c static int setdbit proto((DBM *, long));
setdbit           415 ext/sdbm/_sdbm.c 		if (!setdbit(db, db->curbit))


seteuid

seteuid           281 ext/pty/pty.c  	seteuid(getuid());
seteuid          2094 process.c          if (seteuid(NUM2INT(id)) != 0) rb_sys_fail(0);
seteuid          2272 process.c      		if (seteuid(uid) < 0) rb_sys_fail(0);
seteuid          2281 process.c      		    if (seteuid(uid) < 0) rb_sys_fail(0);
seteuid          2287 process.c      	    if (seteuid(uid) < 0) rb_sys_fail(0);
seteuid          2319 process.c      	    if (geteuid() != uid && seteuid(uid) < 0) rb_sys_fail(0);
seteuid          2331 process.c      	    if (seteuid(uid) < 0) rb_sys_fail(0);
seteuid          2350 process.c      	    if (seteuid(uid) < 0) rb_sys_fail(0);
seteuid          2999 process.c          if (seteuid(NUM2INT(euid)) < 0) rb_sys_fail(0);
seteuid          3038 process.c          if (seteuid(euid) < 0) rb_sys_fail(0);


setgid

setgid           2385 process.c          if (setgid(NUM2INT(id)) != 0) rb_sys_fail(0);
setgid           2555 process.c      	    if (setgid(gid) < 0) rb_sys_fail(0);
setgid           2837 process.c      	if (setgid(gid) < 0) rb_sys_fail(0);
setgid           2935 process.c      	    if (setgid(gid) < 0) rb_sys_fail(0);
setgid           2950 process.c      	    if (setgid(gid) < 0) rb_sys_fail(0);
setgid           3113 process.c      	if (setgid(egid) < 0) rb_sys_fail(0);
setgid           3151 process.c          if (setgid(egid) < 0) rb_sys_fail(0);
setgid            307 win32/win32.h  extern int       setgid (rb_gid_t);


setjmp

setjmp            152 eval.c            setjmp(function_call_may_return_twice_jmp_buf) : \
setjmp            168 eval.c         #if !defined(setjmp) && defined(HAVE__SETJMP)
setjmp            172 eval.c         #define ruby_setjmp(just_before_setjmp, env) ((just_before_setjmp), setjmp(env))
setjmp             39 gc.c           #if !defined(setjmp) && defined(HAVE__SETJMP)
setjmp           1235 gc.c           #ifdef setjmp
setjmp           1306 gc.c               setjmp(save_regs_gc_mark);


setmode

setmode           125 ext/nkf/nkf-utf8/nkf.c #define setbinmode(fp) setmode(fileno(fp), O_BINARY)
setmode          2384 io.c               if (0 <= fptr->fd && setmode(fptr->fd, O_BINARY) == -1)
setmode          2595 io.c               setmode(fileno(file), O_TEXT);
setmode          3852 io.c           	setmode(fd, O_BINARY);


setsockopt

setsockopt        377 ext/socket/socket.c     if (setsockopt(fptr->fd, level, option, v, vlen) < 0)
setsockopt       1184 ext/socket/socket.c 	    setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
setsockopt       2421 win32/win32.c  	r = setsockopt(TO_SOCKET(s), level, optname, optval, optlen);


setuid

setuid           2049 process.c          if (setuid(NUM2INT(id)) != 0) rb_sys_fail(0);
setuid           2192 process.c      	    if (setuid(uid) < 0) rb_sys_fail(0);
setuid           2245 process.c      	if (setuid(uid) < 0) rb_sys_fail(0);
setuid           2342 process.c      	    if (setuid(uid) < 0) rb_sys_fail(0);
setuid           2357 process.c      	    if (setuid(uid) < 0) rb_sys_fail(0);
setuid           3003 process.c      	if (setuid(euid) < 0) rb_sys_fail(0);
setuid           3041 process.c          if (setuid(euid) < 0) rb_sys_fail(0);
setuid            306 win32/win32.h  extern int       setuid (rb_uid_t);


setup_domain_and_type

setup_domain_and_type 2088 ext/socket/socket.c     setup_domain_and_type(domain, &d, type, &t);
setup_domain_and_type 2102 ext/socket/socket.c     setup_domain_and_type(domain, &d, type, &t);


setup_group

setup_group       343 ext/etc/etc.c      return setup_group(grp);
setup_group       370 ext/etc/etc.c      return setup_group(grp);
setup_group       392 ext/etc/etc.c  	rb_yield(setup_group(pw));
setup_group       430 ext/etc/etc.c  	return setup_group(grp);
setup_group       490 ext/etc/etc.c  	return setup_group(gr);


setup_look_behind

setup_look_behind 3278 regcomp.c      	  r = setup_look_behind(node, reg, env);
setup_look_behind 3290 regcomp.c      	  r = setup_look_behind(node, reg, env);


setup_passwd

setup_passwd      141 ext/etc/etc.c      return setup_passwd(pwd);
setup_passwd      165 ext/etc/etc.c      return setup_passwd(pwd);
setup_passwd      187 ext/etc/etc.c  	rb_yield(setup_passwd(pw));
setup_passwd      225 ext/etc/etc.c  	return setup_passwd(pw);
setup_passwd      291 ext/etc/etc.c  	return setup_passwd(pw);


setup_subexp_call

setup_subexp_call 2750 regcomp.c            r = setup_subexp_call(NCONS(node).left, env);
setup_subexp_call 2756 regcomp.c            r = setup_subexp_call(NCONS(node).left, env);
setup_subexp_call 2761 regcomp.c          r = setup_subexp_call(NQUALIFIER(node).target, env);
setup_subexp_call 2764 regcomp.c          r = setup_subexp_call(NEFFECT(node).target, env);
setup_subexp_call 2833 regcomp.c      	r = setup_subexp_call(an->target, env);
setup_subexp_call 4783 regcomp.c          r = setup_subexp_call(root, &scan_env);


setup_tree

setup_tree       3075 regcomp.c      	r = setup_tree(NCONS(node).left, reg, state, env);
setup_tree       3086 regcomp.c            r = setup_tree(NCONS(node).left, reg, (state | IN_ALT), env);
setup_tree       3163 regcomp.c            r = setup_tree(target, reg, state, env);
setup_tree       3213 regcomp.c      	  r = setup_tree(NEFFECT(node).target, reg, state, env);
setup_tree       3223 regcomp.c              r = setup_tree(en->target, reg, state, env);
setup_tree       3229 regcomp.c      	  r = setup_tree(target, reg, state, env);
setup_tree       3251 regcomp.c      	r = setup_tree(an->target, reg, state, env);
setup_tree       3254 regcomp.c      	r = setup_tree(an->target, reg, (state | IN_NOT), env);
setup_tree       3280 regcomp.c      	  r = setup_tree(an->target, reg, state, env);
setup_tree       3292 regcomp.c      	  r = setup_tree(an->target, reg, (state | IN_NOT), env);
setup_tree       4796 regcomp.c        r = setup_tree(root, reg, 0, &scan_env);


setvbuffer

setvbuffer        751 ext/nkf/nkf-utf8/nkf.c       setvbuffer(stdout, stdobuf, IOBUF_SIZE);
setvbuffer        760 ext/nkf/nkf-utf8/nkf.c       setvbuffer(stdin, stdibuf, IOBUF_SIZE);
setvbuffer        852 ext/nkf/nkf-utf8/nkf.c               setvbuffer(fin, stdibuf, IOBUF_SIZE);


sha2_byte

sha2_byte         526 ext/digest/sha2/sha2.c 	if (digest != (sha2_byte*)0) {
sha2_byte         862 ext/digest/sha2/sha2.c 	if (digest != (sha2_byte*)0) {
sha2_byte         911 ext/digest/sha2/sha2.c 	if (digest != (sha2_byte*)0) {


sha2_word32

sha2_word32        87 ext/digest/sha2/sha2.c 	sha2_word32 tmp = (w); \
sha2_word32       185 ext/digest/sha2/sha2.c const static sha2_word32 K256[64] = {
sha2_word32       205 ext/digest/sha2/sha2.c const static sha2_word32 sha256_initial_hash_value[8] = {
sha2_word32       333 ext/digest/sha2/sha2.c 	sha2_word32	a, b, c, d, e, f, g, h, s0, s1;
sha2_word32       334 ext/digest/sha2/sha2.c 	sha2_word32	T1, *W256;
sha2_word32       337 ext/digest/sha2/sha2.c 	W256 = (sha2_word32*)context->buffer;
sha2_word32       391 ext/digest/sha2/sha2.c 	sha2_word32	a, b, c, d, e, f, g, h, s0, s1;
sha2_word32       392 ext/digest/sha2/sha2.c 	sha2_word32	T1, T2, *W256;
sha2_word32       395 ext/digest/sha2/sha2.c 	W256 = (sha2_word32*)context->buffer;
sha2_word32       492 ext/digest/sha2/sha2.c 			SHA256_Transform(context, (sha2_word32*)context->buffer);
sha2_word32       504 ext/digest/sha2/sha2.c 		SHA256_Transform(context, (const sha2_word32*)data);
sha2_word32       519 ext/digest/sha2/sha2.c 	sha2_word32	*d = (sha2_word32*)digest;
sha2_word32       544 ext/digest/sha2/sha2.c 				SHA256_Transform(context, (sha2_word32*)context->buffer);
sha2_word32       560 ext/digest/sha2/sha2.c 		SHA256_Transform(context, (sha2_word32*)context->buffer);


sha2_word64

sha2_word64        92 ext/digest/sha2/sha2.c 	sha2_word64 tmp = (w); \
sha2_word64       107 ext/digest/sha2/sha2.c 	(w)[0] += (sha2_word64)(n); \
sha2_word64       217 ext/digest/sha2/sha2.c const static sha2_word64 K512[80] = {
sha2_word64       261 ext/digest/sha2/sha2.c const static sha2_word64 sha384_initial_hash_value[8] = {
sha2_word64       273 ext/digest/sha2/sha2.c const static sha2_word64 sha512_initial_hash_value[8] = {
sha2_word64       557 ext/digest/sha2/sha2.c 		*(sha2_word64*)&context->buffer[SHA256_SHORT_BLOCK_LENGTH] = context->bitcount;
sha2_word64       634 ext/digest/sha2/sha2.c 	sha2_word64	a, b, c, d, e, f, g, h, s0, s1;
sha2_word64       635 ext/digest/sha2/sha2.c 	sha2_word64	T1, *W512 = (sha2_word64*)context->buffer;
sha2_word64       689 ext/digest/sha2/sha2.c 	sha2_word64	a, b, c, d, e, f, g, h, s0, s1;
sha2_word64       690 ext/digest/sha2/sha2.c 	sha2_word64	T1, T2, *W512 = (sha2_word64*)context->buffer;
sha2_word64       788 ext/digest/sha2/sha2.c 			SHA512_Transform(context, (const sha2_word64*)context->buffer);
sha2_word64       800 ext/digest/sha2/sha2.c 		SHA512_Transform(context, (const sha2_word64*)data);
sha2_word64       835 ext/digest/sha2/sha2.c 			SHA512_Transform(context, (const sha2_word64*)context->buffer);
sha2_word64       848 ext/digest/sha2/sha2.c 	*(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH] = context->bitcount[1];
sha2_word64       849 ext/digest/sha2/sha2.c 	*(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH+8] = context->bitcount[0];
sha2_word64       852 ext/digest/sha2/sha2.c 	SHA512_Transform(context, (const sha2_word64*)context->buffer);
sha2_word64       856 ext/digest/sha2/sha2.c 	sha2_word64	*d = (sha2_word64*)digest;
sha2_word64       905 ext/digest/sha2/sha2.c 	sha2_word64	*d = (sha2_word64*)digest;


shadowing_lvar

shadowing_lvar   4109 parse.y        			    shadowing_lvar($1);
shadowing_lvar   4152 parse.y        			    shadowing_lvar($1);
shadowing_lvar   4191 parse.y        			    shadowing_lvar($2);
shadowing_lvar   4226 parse.y        			    shadowing_lvar($2);
shadowing_lvar   7282 parse.y            shadowing_lvar(name);


shadowing_lvar_gen

shadowing_lvar_gen  275 parse.y        static void shadowing_lvar_gen(struct parser_params*,ID);
shadowing_lvar_gen  276 parse.y        #define shadowing_lvar(name) shadowing_lvar_gen(parser, name)


shift

shift            1755 bignum.c           int shift = NUM2INT(y);
shift            1756 bignum.c           int s1 = shift/BITSPERDIG;
shift            1757 bignum.c           int s2 = shift%BITSPERDIG;
shift            1762 bignum.c           if (shift < 0) return rb_big_rshift(x, INT2FIX(-shift));
shift            1790 bignum.c           int shift = NUM2INT(y);
shift            1791 bignum.c           long s1 = shift/BITSPERDIG;
shift            1792 bignum.c           long s2 = shift%BITSPERDIG;
shift            1798 bignum.c           if (shift < 0) return rb_big_lshift(x, INT2FIX(-shift));
shift            1851 bignum.c           int shift;
shift            1859 bignum.c           shift = NUM2INT(y);
shift            1860 bignum.c           if (shift < 0) return INT2FIX(0);
shift            1861 bignum.c           s1 = shift/BITSPERDIG;
shift            1862 bignum.c           s2 = shift%BITSPERDIG;
shift            1406 dir.c          	long shift;
shift            1409 dir.c          	shift = (lbrace-s);
shift            1422 dir.c          	    memcpy(buf+shift, t, p-t);
shift            1423 dir.c          	    strcpy(buf+shift+(p-t), rbrace+1);
shift             220 ext/racc/cparse/cparse.c static void shift _((struct cparse_params* v, long act, VALUE tok, VALUE val));
shift             413 ext/racc/cparse/cparse.c #define SHIFT(v,act,tok,val) shift(v,act,tok,val)
shift            1064 marshal.c      		int shift = 0;
shift            1068 marshal.c      		    num |= (int)p[i] << shift;
shift            1069 marshal.c      		    shift += 8;
shift             143 utf8.c         #define UTF8_TRAILS(code, shift) (UChar )((((code) >> (shift)) & 0x3f) | 0x80)


shutdown

shutdown          254 ext/socket/socket.c     if (shutdown(fptr->fd, how) == -1)
shutdown          270 ext/socket/socket.c     shutdown(fptr->fd, 0);
shutdown          292 ext/socket/socket.c     shutdown(fptr->fd, 1);
shutdown         1284 ext/socket/socket.c     shutdown(fptr->fd, 2);
shutdown         2160 io.c                   if (shutdown(fptr->fd, SHUT_RD) < 0)
shutdown         2205 io.c                   if (shutdown(fptr->fd, SHUT_WR) < 0)
shutdown         2438 win32/win32.c  	r = shutdown(TO_SOCKET(s), how);


sig_trap

sig_trap          925 signal.c           rb_define_global_function("trap", sig_trap, -1);
sig_trap          926 signal.c           rb_define_module_function(mSignal, "trap", sig_trap, -1);


sigbus

sigbus            663 signal.c       	    func = sigbus;
sigbus            948 signal.c           install_sighandler(SIGBUS, sigbus);


sighandler

sighandler        461 signal.c               ruby_nativethread_signal(sig, sighandler);
sighandler        463 signal.c               ruby_signal(sig, sighandler);
sighandler        569 signal.c           func = sighandler;
sighandler        659 signal.c       	    func = sighandler;
sighandler        682 signal.c       	else if (oldfunc == sighandler) oldcmd = rb_str_new2("DEFAULT");
sighandler        929 signal.c           install_sighandler(SIGINT, sighandler);
sighandler        931 signal.c           install_sighandler(SIGHUP, sighandler);
sighandler        934 signal.c           install_sighandler(SIGQUIT, sighandler);
sighandler        937 signal.c           install_sighandler(SIGALRM, sighandler);
sighandler        940 signal.c           install_sighandler(SIGUSR1, sighandler);
sighandler        943 signal.c           install_sighandler(SIGUSR2, sighandler);


sighandler_t

sighandler_t      327 signal.c       static sighandler_t
sighandler_t      328 signal.c       ruby_signal(int signum, sighandler_t handler)
sighandler_t      346 signal.c       posix_signal(int signum, sighandler_t handler)
sighandler_t      352 signal.c       static sighandler_t
sighandler_t      353 signal.c       ruby_nativethread_signal(int signum, sighandler_t handler)
sighandler_t      355 signal.c           sighandler_t old;
sighandler_t      363 signal.c       posix_nativethread_signal(int signum, sighandler_t handler)
sighandler_t      371 signal.c       static sighandler_t
sighandler_t      372 signal.c       ruby_nativethread_signal(int signum, sighandler_t handler)
sighandler_t      374 signal.c           sighandler_t old;
sighandler_t      564 signal.c           sighandler_t func, oldfunc;
sighandler_t      812 signal.c       install_sighandler(int signum, sighandler_t handler)
sighandler_t      814 signal.c           sighandler_t old;
sighandler_t      824 signal.c       install_nativethread_sighandler(int signum, sighandler_t handler)
sighandler_t      826 signal.c           sighandler_t old;
sighandler_t      844 signal.c           sighandler_t oldfunc;
sighandler_t       54 wince/signal.h 	sighandler_t sa_handler;


sigma0_256

sigma0_256        323 ext/digest/sha2/sha2.c 	s0 = sigma0_256(s0); \
sigma0_256        434 ext/digest/sha2/sha2.c 		s0 = sigma0_256(s0);


sigma0_512

sigma0_512        624 ext/digest/sha2/sha2.c 	s0 = sigma0_512(s0); \
sigma0_512        730 ext/digest/sha2/sha2.c 		s0 = sigma0_512(s0);


sigma1_256

sigma1_256        325 ext/digest/sha2/sha2.c 	s1 = sigma1_256(s1); \
sigma1_256        436 ext/digest/sha2/sha2.c 		s1 = sigma1_256(s1);


sigma1_512

sigma1_512        626 ext/digest/sha2/sha2.c 	s1 = sigma1_512(s1); \
sigma1_512        732 ext/digest/sha2/sha2.c 		s1 =  sigma1_512(s1);


sign_bits

sign_bits         672 sprintf.c      		    char c = sign_bits(base, p);
sign_bits         681 sprintf.c      			c = sign_bits(base, p);


signal

signal           1454 eval.c             signal(SIGINT, SIG_DFL);
signal           11581 eval.c             signal(sig, catch_timer);
signal           11629 eval.c             signal(sig, catch_timer);
signal           11720 eval.c         	signal(SIGVTALRM, catch_timer);
signal            352 ext/pty/pty.c  	s = signal(SIGCHLD, SIG_DFL);
signal            354 ext/pty/pty.c  	    signal(SIGCHLD, s);
signal           1503 process.c      	hfunc = signal(SIGHUP, SIG_IGN);
signal           1506 process.c      	qfunc = signal(SIGQUIT, SIG_IGN);
signal           1508 process.c      	ifunc = signal(SIGINT, SIG_IGN);
signal           1519 process.c      	signal(SIGHUP, hfunc);
signal           1522 process.c      	signal(SIGQUIT, qfunc);
signal           1524 process.c      	signal(SIGINT, ifunc);
signal            369 signal.c       #define ruby_signal(sig,handler) (rb_trap_accept_nativethreads[sig] = 0, signal((sig),(handler)))
signal            376 signal.c           old = signal(signum, handler);
signal             62 wince/signal.h   void (* signal(int sig, void (__cdecl *func)(int)))(int);


signal_exec

signal_exec       468 signal.c       	IN_MAIN_CONTEXT(signal_exec, sig);
signal_exec       537 signal.c       	    signal_exec(i);


signm2signo

signm2signo       253 signal.c       	if((sig = signm2signo(s)) == 0)
signm2signo       628 signal.c       	sig = signm2signo(s);


signo2signm

signo2signm       196 signal.c           return signo2signm(no);
signo2signm       406 signal.c       	    rb_thread_signal_raise(signo2signm(sig));


sigpipe

sigpipe           673 signal.c       	    func = sigpipe;
sigpipe           957 signal.c           install_sighandler(SIGPIPE, sigpipe);


sigsegv

sigsegv           668 signal.c       	    func = sigsegv;
sigsegv           953 signal.c           install_sighandler(SIGSEGV, sigsegv);


sigsend_to_ruby_thread

sigsend_to_ruby_thread  454 signal.c               sigsend_to_ruby_thread(sig);
sigsend_to_ruby_thread  483 signal.c               sigsend_to_ruby_thread(sig);
sigsend_to_ruby_thread  498 signal.c               sigsend_to_ruby_thread(sig);


sigset_t

sigset_t          423 signal.c           sigset_t mask, old_mask;
sigset_t          547 signal.c           sigset_t mask;
sigset_t          556 signal.c       static sigset_t trap_last_mask;
sigset_t          847 signal.c           sigset_t mask;
sigset_t           55 wince/signal.h 	sigset_t sa_mask;


sinh

sinh              192 math.c             return rb_float_new(sinh(RFLOAT(x)->value));
sinh              200 math.c             return sinh(x) / cosh(x);


size_t

size_t             51 defines.h      void *xmalloc(size_t);
size_t             52 defines.h      void *xmalloc2(size_t,size_t);
size_t             53 defines.h      void *xcalloc(size_t,size_t);
size_t             54 defines.h      void *xrealloc(void*,size_t);
size_t             55 defines.h      void *xrealloc2(void*,size_t,size_t);
size_t            640 eval.c             size_t len;
size_t            171 ext/digest/digest.c     size_t len;
size_t            194 ext/digest/digest.c     size_t len;
size_t             25 ext/digest/digest.h     size_t digest_len;
size_t             26 ext/digest/digest.h     size_t ctx_size;
size_t            356 ext/digest/md5/md5.c MD5_Update(MD5_CTX *pms, const uint8_t *data, size_t nbytes)
size_t            359 ext/digest/md5/md5.c     size_t left = nbytes;
size_t            360 ext/digest/md5/md5.c     size_t offset = (pms->count[0] >> 3) & 63;
size_t            374 ext/digest/md5/md5.c 	size_t copy = (offset + nbytes > 64 ? 64 - offset : nbytes);
size_t            403 ext/digest/md5/md5.c     size_t i;
size_t            420 ext/digest/md5/md5.c     size_t i;
size_t             74 ext/digest/md5/md5.h void	MD5_Update _((MD5_CTX *pms, const uint8_t *data, size_t nbytes));
size_t             12 ext/digest/md5/md5ossl.c     size_t i;
size_t            352 ext/digest/rmd160/rmd160.c RMD160_Update(RMD160_CTX *context, const uint8_t *data, size_t nbytes)
size_t             54 ext/digest/rmd160/rmd160.h void	RMD160_Update _((RMD160_CTX *, const uint8_t *, size_t));
size_t             60 ext/digest/rmd160/rmd160.h char	*RMD160_Data _((const uint8_t *, size_t, char *));
size_t             41 ext/digest/rmd160/rmd160hl.c     size_t i;
size_t             77 ext/digest/rmd160/rmd160hl.c 	RMD160_Update(&ctx, buffer, (size_t)num);
size_t             86 ext/digest/rmd160/rmd160hl.c RMD160_Data(const uint8_t *data, size_t len, char *buf)
size_t             15 ext/digest/rmd160/rmd160ossl.c     size_t i;
size_t            226 ext/digest/sha1/sha1.c     size_t len;
size_t            257 ext/digest/sha1/sha1.c     size_t i;
size_t             37 ext/digest/sha1/sha1.h void	SHA1_Update _((SHA1_CTX *context, const uint8_t *data, size_t len));
size_t             43 ext/digest/sha1/sha1.h char	*SHA1_Data _((const uint8_t *, size_t, char *));
size_t             80 ext/digest/sha1/sha1hl.c 	SHA1_Update(&ctx, buffer, (size_t)num);
size_t             91 ext/digest/sha1/sha1hl.c     size_t len;
size_t            470 ext/digest/sha2/sha2.c void SHA256_Update(SHA256_CTX* context, const sha2_byte *data, size_t len) {
size_t            766 ext/digest/sha2/sha2.c void SHA512_Update(SHA512_CTX* context, const sha2_byte *data, size_t len) {
size_t            900 ext/digest/sha2/sha2.c void SHA384_Update(SHA384_CTX* context, const sha2_byte* data, size_t len) {
size_t            105 ext/digest/sha2/sha2.h void SHA256_Update _((SHA256_CTX*, const uint8_t*, size_t));
size_t            108 ext/digest/sha2/sha2.h char* SHA256_Data _((const uint8_t*, size_t, char[SHA256_DIGEST_STRING_LENGTH]));
size_t            113 ext/digest/sha2/sha2.h void SHA384_Update _((SHA384_CTX*, const uint8_t*, size_t));
size_t            116 ext/digest/sha2/sha2.h char* SHA384_Data _((const uint8_t*, size_t, char[SHA384_DIGEST_STRING_LENGTH]));
size_t            121 ext/digest/sha2/sha2.h void SHA512_Update _((SHA512_CTX*, const uint8_t*, size_t));
size_t            124 ext/digest/sha2/sha2.h char* SHA512_Data _((const uint8_t*, size_t, char[SHA512_DIGEST_STRING_LENGTH]));
size_t             89 ext/digest/sha2/sha2hl.c 		SHA256_Update(&ctx, buffer, (size_t) num);
size_t            125 ext/digest/sha2/sha2hl.c SHA256_Data(const uint8_t * data, size_t len, char *digest)
size_t            150 ext/digest/sha2/sha2hl.c 		SHA384_Update(&ctx, buffer, (size_t) num);
size_t            185 ext/digest/sha2/sha2hl.c SHA384_Data(const uint8_t * data, size_t len, char *digest)
size_t            210 ext/digest/sha2/sha2hl.c 		SHA512_Update(&ctx, buffer, (size_t) num);
size_t            245 ext/digest/sha2/sha2hl.c SHA512_Data(const uint8_t * data, size_t len, char *digest)
size_t             68 ext/dl/cptr.c    ptr = ruby_xmalloc((size_t)size);
size_t             69 ext/dl/cptr.c    memset(ptr,0,(size_t)size);
size_t            350 ext/dl/cptr.c      size_t offset, len;
size_t            373 ext/dl/cptr.c      size_t offset, len;
size_t            110 ext/iconv/iconv.c static VALUE iconv_try _((iconv_t cd, const char **inptr, size_t *inlen, char **outptr, size_t *outlen));
size_t            231 ext/iconv/iconv.c iconv_try(iconv_t cd, const char **inptr, size_t *inlen, char **outptr, size_t *outlen)
size_t            238 ext/iconv/iconv.c     size_t ret;
size_t            242 ext/iconv/iconv.c     if (ret == (size_t)-1) {
size_t            333 ext/iconv/iconv.c     size_t inlen;
size_t            337 ext/iconv/iconv.c     size_t outlen;
size_t            400 ext/openssl/ossl_pkey_dh.c ossl_create_dh(unsigned char *p, size_t plen, unsigned char *g, size_t glen)
size_t            137 ext/socket/addrinfo.h 	size_t	ai_addrlen;	/* length of ai_addr */
size_t            150 ext/socket/addrinfo.h 	size_t salen,
size_t            152 ext/socket/addrinfo.h 	size_t hostlen,
size_t            154 ext/socket/addrinfo.h 	size_t servlen,
size_t            168 ext/socket/addrinfo.h #define offsetof(p_type,field) ((size_t)&(((p_type *)0)->field))
size_t            122 ext/socket/getnameinfo.c 	size_t numaddr_len;
size_t            141 ext/socket/getnameinfo.c 	size_t salen;
size_t            143 ext/socket/getnameinfo.c 	size_t hostlen;
size_t            145 ext/socket/getnameinfo.c 	size_t servlen;
size_t            672 ext/socket/socket.c     size_t len;
size_t            696 ext/socket/socket.c     size_t len;
size_t            727 ext/socket/socket.c     size_t len;
size_t            763 ext/socket/socket.c     size_t len;
size_t           1293 ext/socket/socket.c     VALUE (*ipaddr)_((struct sockaddr*, size_t));
size_t           1302 ext/socket/socket.c     VALUE (*ipaddr)_((struct sockaddr*, size_t)) = arg->ipaddr;
size_t           1344 ext/socket/socket.c     VALUE (*ipaddr)_((struct sockaddr*, size_t));
size_t           1358 ext/socket/socket.c     size_t len;
size_t           2697 ext/socket/socket.c     size_t len;
size_t            184 ext/syck/gram.c #   define YYSIZE_T size_t
size_t            591 ext/syck/gram.c #if ! defined (YYSIZE_T) && defined (size_t)
size_t            592 ext/syck/gram.c # define YYSIZE_T size_t
size_t            597 ext/syck/gram.c #  define YYSIZE_T size_t
size_t             48 ext/syck/implicit.c char *syck_match_implicit( char *str, size_t len )
size_t            239 ext/syck/syck.h     size_t bufsize;
size_t            311 ext/syck/syck.h     size_t bufsize;
size_t            356 ext/syck/syck.h char *syck_match_implicit( char *, size_t );
size_t           3402 ext/tk/tcltklib.c         size_t length = strlen(objv[1]);
size_t           3972 ext/tk/tcltklib.c         size_t length = strlen(objv[1]);
size_t             98 gc.c           ruby_xmalloc(size_t size)
size_t            125 gc.c           ruby_xmalloc2(size_t n, size_t size)
size_t            135 gc.c           ruby_xcalloc(size_t n, size_t size)
size_t            146 gc.c           ruby_xrealloc(void *ptr, size_t size)
size_t            171 gc.c           ruby_xrealloc2(void *ptr, size_t n, size_t size)
size_t            173 gc.c               size_t len = size * n;
size_t           1387 gc.c           ruby_set_stack_size(size_t size)
size_t           1701 hash.c             size_t len;
size_t            296 intern.h       void ruby_set_stack_size(size_t);
size_t             86 missing.h      extern void *memmove(void *, const void *, size_t);
size_t            100 missing.h      extern int strncasecmp(const char *, const char *, size_t);
size_t            113 missing.h      extern size_t strftime(char *, size_t, const char *, const struct tm *);
size_t            132 missing.h      extern int snprintf(char *, size_t n, char const *, ...);
size_t            133 missing.h      extern int vsnprintf(char *, size_t n, char const *, va_list);
size_t              6 missing/memcmp.c memcmp(const void *s1, const void *s2, size_t len)
size_t              6 missing/memmove.c memmove(void *d, const void *s, size_t n)
size_t             35 missing/os2.c  getcwd(char *path, size_t len)
size_t            167 missing/strftime.c size_t
size_t            170 missing/strftime.c size_t maxsize;
size_t            174 missing/strftime.c size_t
size_t            175 missing/strftime.c strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr)
size_t              7 missing/strncasecmp.c strncasecmp(const char *p1, const char *p2, size_t len)
size_t            221 missing/vsnprintf.c 	size_t	iov_len;
size_t            240 missing/vsnprintf.c 	register size_t len;
size_t            250 missing/vsnprintf.c #define	COPY(n)	  (void)memcpy((void *)fp->_p, (void *)p, (size_t)(n))
size_t           1089 missing/vsnprintf.c 	size_t n;
size_t           1115 missing/vsnprintf.c snprintf(char *str, size_t n, char const *fmt, ...)
size_t           1119 missing/vsnprintf.c size_t n;
size_t            188 parse.y        void *rb_parser_malloc(struct parser_params *, size_t);
size_t            189 parse.y        void *rb_parser_realloc(struct parser_params *, void *, size_t);
size_t            190 parse.y        void *rb_parser_calloc(struct parser_params *, size_t, size_t);
size_t           8777 parse.y        rb_parser_malloc(struct parser_params *parserp, size_t size)
size_t           8779 parse.y            size_t cnt = HEAPCNT(1, size);
size_t           8787 parse.y        rb_parser_calloc(struct parser_params *parserp, size_t nelem, size_t size)
size_t           8789 parse.y            size_t cnt = HEAPCNT(nelem, size);
size_t           8797 parse.y        rb_parser_realloc(struct parser_params *parserp, void *ptr, size_t size)
size_t           8800 parse.y            size_t cnt = HEAPCNT(1, size);
size_t           2568 process.c      static size_t maxgroups = 32;
size_t           2587 process.c          size_t ngroups;
size_t           2626 process.c          size_t ngroups;
size_t           2733 process.c          size_t  ngroups = FIX2INT(val);
size_t            850 sprintf.c          size_t len, n;
size_t             56 st.c           #define alloc(type) (type*)malloc((size_t)sizeof(type))
size_t            278 util.c         mblen(const char *s, size_t n)
size_t           3573 win32/win32.c  read(int fd, void *buf, size_t size)
size_t           3880 win32/win32.c  rb_w32_vsnprintf(char *buf, size_t size, const char *format, va_list va)
size_t           3888 win32/win32.c  rb_w32_snprintf(char *buf, size_t size, const char *format, ...)
size_t            200 win32/win32.h  extern int rb_w32_vsnprintf(char *, size_t, const char *, va_list);
size_t            201 win32/win32.h  extern int rb_w32_snprintf(char *, size_t, const char *, ...);
size_t             17 wince/stdlib.c 				size_t maxLength)
size_t             23 wince/stdlib.c int mblen(const char *mbstr, size_t count)
size_t             26 wince/stdlib.c 	size_t i;
size_t             42 wince/stdlib.c 			   size_t num, size_t width,
size_t             45 wince/stdlib.c 	size_t i;
size_t             25 wince/string_wce.c int strnicmp( const char *s1, const char *s2, size_t count )
size_t             28 wince/wince.c  	size_t ret;
size_t            109 wince/wince.h  char *_fullpath(char *absPath, const char *relPath, size_t maxLength);
size_t            114 wince/wince.h  int strnicmp( const char *s1, const char *s2, size_t count );


sizeof_euc_to_utf8_2bytes

sizeof_euc_to_utf8_2bytes 2736 ext/nkf/nkf-utf8/nkf.c         if (0<=c2 && c2<sizeof_euc_to_utf8_2bytes)
sizeof_euc_to_utf8_2bytes 2744 ext/nkf/nkf-utf8/nkf.c         if (0<=c2 && c2<sizeof_euc_to_utf8_2bytes)


sizeof_utf8_to_euc_2bytes

sizeof_utf8_to_euc_2bytes 2515 ext/nkf/nkf-utf8/nkf.c             ret =  w_iconv_common(c2, c1, utf8_to_euc_2bytes, sizeof_utf8_to_euc_2bytes, p2, p1);
sizeof_utf8_to_euc_2bytes 2636 ext/nkf/nkf-utf8/nkf.c             psize = sizeof_utf8_to_euc_2bytes;


sizeof_utf8_to_euc_C2

sizeof_utf8_to_euc_C2 2513 ext/nkf/nkf-utf8/nkf.c             ret = w_iconv_common(c1, c0, pp, sizeof_utf8_to_euc_C2, p2, p1);
sizeof_utf8_to_euc_C2 2632 ext/nkf/nkf-utf8/nkf.c             psize = sizeof_utf8_to_euc_C2;


sjis_code_to_mbclen

sjis_code_to_mbclen  174 sjis.c               return (sjis_code_to_mbclen(code) > 1 ? TRUE : FALSE);
sjis_code_to_mbclen  233 sjis.c           sjis_code_to_mbclen,


skipprefix

skipprefix       2509 file.c         	    p = skipprefix(buf);
skipprefix       2528 file.c             root = skipprefix(buf);
skipprefix       2685 file.c             name = skipprefix(name);
skipprefix       2751 file.c         	root = skipprefix(name = root - 2);


skiproot

skiproot         2486 file.c         	    p = chompdirsep(skiproot(buf));
skiproot         2513 file.c         	    p = chompdirsep(skiproot(buf));
skiproot         2589 file.c             if (p == skiproot(buf) - 1) p++;
skiproot         2748 file.c             root = skiproot(name);
skiproot         2765 file.c         	rb_str_cat(dirname, skiproot(name + 2), p - skiproot(name + 2));


sleep

sleep            9572 eval.c         #  define pause() sleep(0x7fffffff)
sleep            11290 eval.c         	sleep(sec);
sleep             287 ext/pty/pty.c  	sleep(1);


snprintf

snprintf          465 dir.c          	snprintf(RSTRING(s)->ptr, len+1, "#<%s:%s>", c, dirp->path);
snprintf          126 dln.c              snprintf(*buf, len, FUNCNAME_PATTERN, slash + 1);
snprintf          965 dln.c          	snprintf(p, len, "lib%s.a", lib+2);
snprintf         1240 dln.c              snprintf(errbuf, 1024, "load failed - %s ", pathname);
snprintf           38 error.c        	return snprintf(buf, len, "%s: ", ruby_sourcefile);
snprintf           41 error.c        	return snprintf(buf, len, "%s:%d: ", ruby_sourcefile, ruby_sourceline);
snprintf          109 error.c            snprintf(buf, BUFSIZ, "warning: %s", fmt);
snprintf          125 error.c            snprintf(buf, BUFSIZ, "warning: %s", fmt);
snprintf          808 error.c        	snprintf(name, sizeof(name), "E%03d", n);
snprintf         1071 error.c             snprintf(buf, BUFSIZ, "warning: %s", fmt);
snprintf         1072 error.c             snprintf(buf+strlen(buf), BUFSIZ-strlen(buf), ": %s", strerror(errno_save));
snprintf          667 eval.c             snprintf(buf, len, "@%s", name);
snprintf         4578 eval.c             snprintf(mesg, sizeof mesg, "%s from proc-closure", statement);
snprintf          213 ext/dl/cfunc.c     snprintf(str, str_size - 1,
snprintf          297 ext/dl/cptr.c    snprintf(str, 1023, "#<%s:%p ptr=%p size=%ld free=%p>",
snprintf          300 ext/openssl/ossl.c 	len += snprintf(buf+len, BUFSIZ-len, fmt, msg);
snprintf          151 ext/openssl/ossl_ssl.c 	snprintf(buf, sizeof(buf), "@%s", ossl_sslctx_attrs[i]);
snprintf          142 ext/pty/pty.c      snprintf(buf, sizeof(buf), "pty - %s: %d", state, info->child_pid);
snprintf          127 ext/socket/getnameinfo.c 	snprintf(numaddr, numaddr_len, "%s", inet_ntoa(in));
snprintf          130 ext/socket/getnameinfo.c 	snprintf(numaddr, numaddr_len, "%d.%d.%d.%d",
snprintf          185 ext/socket/getnameinfo.c 		snprintf(numserv, sizeof(numserv), "%d", ntohs(port));
snprintf          769 ext/socket/socket.c 	snprintf(pbuf, len, "%ld", FIX2LONG(port));
snprintf         2853 ext/socket/socket.c 	snprintf(pbuf, sizeof(pbuf), "%ld", FIX2LONG(port));
snprintf         2979 ext/socket/socket.c 	    snprintf(pbuf, sizeof(pbuf), "%ld", NUM2LONG(port));
snprintf         1119 ext/strscan/strscan.c         len = snprintf(buf, BUFSIZE, "#<%s (uninitialized)>",
snprintf         1124 ext/strscan/strscan.c         len = snprintf(buf, BUFSIZE, "#<%s fin>",
snprintf         1130 ext/strscan/strscan.c         len = snprintf(buf, BUFSIZE, "#<%s %ld/%ld @ %s>",
snprintf         1138 ext/strscan/strscan.c     len = snprintf(buf, BUFSIZE, "#<%s %ld/%ld %s @ %s>",
snprintf          169 ext/syslog/syslog.c 	snprintf(buf, sizeof(buf),
snprintf          177 ext/syslog/syslog.c 	snprintf(buf, sizeof(buf),
snprintf          106 ext/tk/stubs.c         snprintf(tcl_name, sizeof tcl_name, TCL_NAME, DLEXT);
snprintf          154 ext/tk/stubs.c         snprintf(tk_name, sizeof tk_name, TK_NAME, DLEXT);
snprintf          235 ext/zlib/zlib.c 	  snprintf(buf, BUFSIZ, "unknown zlib error %d: %s", err, msg);
snprintf         2021 file.c             snprintf(buf, len, "(%s, %s)", RSTRING(s1)->ptr, RSTRING(s2)->ptr);
snprintf         1737 hash.c             snprintf(environ[i],len,"%s=%s",name,value); /* all that work just for this */
snprintf          132 missing.h      extern int snprintf(char *, size_t n, char const *, ...);
snprintf          283 process.c      	    snprintf(buf, sizeof(buf), ",stopped(SIG%s=%d)", signame, stopsig);
snprintf          286 process.c      	    snprintf(buf, sizeof(buf), ",stopped(%d)", stopsig);
snprintf          294 process.c      	    snprintf(buf, sizeof(buf), ",signaled(SIG%s=%d)", signame, termsig);
snprintf          297 process.c      	    snprintf(buf, sizeof(buf), ",signaled(%d)", termsig);
snprintf          302 process.c      	snprintf(buf, sizeof(buf), ",exited(%d)", WEXITSTATUS(status));
snprintf           10 vms/vms.h      extern int snprintf();


sock_addrinfo

sock_addrinfo    1162 ext/socket/socket.c     arg->remote.res = sock_addrinfo(arg->remote.host, arg->remote.serv, SOCK_STREAM,
sock_addrinfo    1169 ext/socket/socket.c 	arg->local.res = sock_addrinfo(arg->local.host, arg->local.serv, SOCK_STREAM, 0);
sock_addrinfo    1368 ext/socket/socket.c     return make_hostent(host, sock_addrinfo(host, Qnil, SOCK_STREAM, AI_CANONNAME), tcp_sockaddr);
sock_addrinfo    1561 ext/socket/socket.c     struct addrinfo *res = sock_addrinfo(host, Qnil, SOCK_STREAM, 0);
sock_addrinfo    1622 ext/socket/socket.c     arg.res = sock_addrinfo(host, port, SOCK_DGRAM, 0);
sock_addrinfo    1639 ext/socket/socket.c     res0 = sock_addrinfo(host, port, SOCK_DGRAM, 0);
sock_addrinfo    1671 ext/socket/socket.c     res0 = sock_addrinfo(host, port, SOCK_DGRAM, 0);
sock_addrinfo    2724 ext/socket/socket.c     return make_hostent(host, sock_addrinfo(host, Qnil, SOCK_STREAM, AI_CANONNAME), sock_sockaddr);
sock_addrinfo    3047 ext/socket/socket.c     struct addrinfo *res = sock_addrinfo(host, port, 0, 0);


sock_define_const

sock_define_const 3257 ext/socket/socket.c     sock_define_const("AF_INET6", AF_INET6);
sock_define_const 3258 ext/socket/socket.c     sock_define_const("PF_INET6", PF_INET6);


sock_listen

sock_listen      3194 ext/socket/socket.c     rb_define_method(rb_cTCPServer, "listen", sock_listen, 1);
sock_listen      3221 ext/socket/socket.c     rb_define_method(rb_cUNIXServer, "listen", sock_listen, 1);
sock_listen      3229 ext/socket/socket.c     rb_define_method(rb_cSocket, "listen", sock_listen, 1);


sock_s_pack_sockaddr_in

sock_s_pack_sockaddr_in 3244 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "sockaddr_in", sock_s_pack_sockaddr_in, 2);
sock_s_pack_sockaddr_in 3245 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "pack_sockaddr_in", sock_s_pack_sockaddr_in, 2);


sock_s_pack_sockaddr_un

sock_s_pack_sockaddr_un 3248 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "sockaddr_un", sock_s_pack_sockaddr_un, 1);
sock_s_pack_sockaddr_un 3249 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "pack_sockaddr_un", sock_s_pack_sockaddr_un, 1);


sock_s_socketpair

sock_s_socketpair 2135 ext/socket/socket.c     return sock_s_socketpair(klass, domain, type, protocol);
sock_s_socketpair 3235 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "socketpair", sock_s_socketpair, 3);
sock_s_socketpair 3236 ext/socket/socket.c     rb_define_singleton_method(rb_cSocket, "pair", sock_s_socketpair, 3);


socket

socket            437 ext/socket/getaddrinfo.c 			s = socket(afd->a_af, SOCK_DGRAM, 0);
socket            908 ext/socket/socket.c     fd = socket(domain, type, proto);
socket            912 ext/socket/socket.c 	    fd = socket(domain, type, proto);


socketpair

socketpair       2104 ext/socket/socket.c     if (socketpair(d, t, NUM2INT(protocol), sp) < 0) {
socketpair       2861 io.c                   if (socketpair(AF_UNIX, SOCK_STREAM, 0, arg.pair) < 0)


socketpair_internal

socketpair_internal  674 win32/win32.c  static int socketpair_internal(int af, int type, int protocol, SOCKET *sv);
socketpair_internal  720 win32/win32.c  	    if (socketpair_internal(AF_INET, SOCK_STREAM, 0, pair) < 0) {
socketpair_internal 2722 win32/win32.c      if (socketpair_internal(af, type, protocol, pair) < 0)


special_local_set

special_local_set 8623 parse.y        	special_local_set('~', val);
special_local_set 8645 parse.y        	special_local_set('_', val);


specific_eval

specific_eval    6441 eval.c             return specific_eval(argc, argv, klass, self);
specific_eval    6503 eval.c             return specific_eval(argc, argv, mod, mod);


splat_value

splat_value      3061 eval.c         	result = splat_value(rb_eval(self, node->nd_head));
splat_value      3228 eval.c         	    result = rb_ary_concat(args, splat_value(rb_eval(self, node->nd_body)));
splat_value      5605 eval.c         	args = rb_ary_concat(rb_ary_new4(argc, argv), splat_value(argv[argc]));


splpage

splpage            67 ext/sdbm/_sdbm.c static void  splpage proto((char *, char *, long));
splpage           372 ext/sdbm/_sdbm.c 		(void) splpage(pag, new, db->hmask + 1);


ssl_get_error

ssl_get_error     583 ext/openssl/ossl_ssl.c 	switch(ssl_get_error(ssl, ret)){
ssl_get_error     639 ext/openssl/ossl_ssl.c 	    switch(ssl_get_error(ssl, nread)){
ssl_get_error     686 ext/openssl/ossl_ssl.c 	    switch(ssl_get_error(ssl, nwrite)){


st_add_direct

st_add_direct     214 class.c            st_add_direct(rb_class_tbl, id, klass);
st_add_direct     290 class.c            st_add_direct(rb_class_tbl, id, module);
st_add_direct     548 class.c        	st_add_direct(list, key, type);
st_add_direct     792 error.c        	st_add_direct(syserr_tbl, n, error);
st_add_direct     526 gc.c           	st_add_direct(source_filenames, (st_data_t)ptr, (st_data_t)name);
st_add_direct    1744 gc.c           	st_add_direct(finalizer_table, obj, rb_ary_new3(1, block));
st_add_direct     841 hash.c         	st_add_direct(RHASH(hash)->tbl, rb_str_new4(key), val);
st_add_direct     317 marshal.c      	st_add_direct(arg->symbols, id, arg->symbols->num_entries);
st_add_direct     458 marshal.c      	st_add_direct(arg->data, obj, arg->data->num_entries);
st_add_direct    2284 object.c           st_add_direct(rb_class_tbl, id, obj);
st_add_direct    8480 parse.y            st_add_direct(global_symbols.tbl, (st_data_t)name, id);
st_add_direct    8481 parse.y            st_add_direct(global_symbols.rev, id, (st_data_t)name);
st_add_direct     178 regint.h       #define onig_st_add_direct                  st_add_direct
st_add_direct      52 st.h           void st_add_direct(st_table *, st_data_t, st_data_t);
st_add_direct     338 variable.c     	st_add_direct(rb_global_tbl, id, (st_data_t)entry);
st_add_direct     738 variable.c     	st_add_direct(rb_global_tbl, name1, (st_data_t)entry1);
st_add_direct     811 variable.c     	st_add_direct(generic_iv_tbl, obj, (st_data_t)tbl);
st_add_direct     812 variable.c     	st_add_direct(tbl, id, val);
st_add_direct     908 variable.c     	    st_add_direct(generic_iv_tbl, clone, (st_data_t)st_copy(tbl));
st_add_direct    1186 variable.c     	st_add_direct(tbl, autoload, av);


st_cleanup_safe

st_cleanup_safe   171 hash.c         	    st_cleanup_safe(RHASH(hash)->tbl, Qundef);
st_cleanup_safe   181 regint.h       #define onig_st_cleanup_safe                st_cleanup_safe
st_cleanup_safe    54 st.h           void st_cleanup_safe(st_table *, st_data_t);


st_copy

st_copy            78 class.c        	RCLASS(clone)->iv_tbl = st_copy(RCLASS(orig)->iv_tbl);
st_copy           129 class.c        	    clone->iv_tbl = st_copy(RCLASS(klass)->iv_tbl);
st_copy           307 hash.c         	RHASH(hash)->tbl = st_copy(RHASH(argv[0])->tbl);
st_copy           185 object.c       	    ROBJECT(dest)->iv_tbl = st_copy(ROBJECT(obj)->iv_tbl);
st_copy           182 regint.h       #define onig_st_copy                        st_copy
st_copy            55 st.h           st_table *st_copy(st_table *);
st_copy           905 variable.c     	    st_insert(generic_iv_tbl, clone, (st_data_t)st_copy(tbl));
st_copy           908 variable.c     	    st_add_direct(generic_iv_tbl, clone, (st_data_t)st_copy(tbl));


st_data_t

st_data_t        2551 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
st_data_t        2583 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
st_data_t        2589 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
st_data_t        2623 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
st_data_t          62 class.c            st_insert(tbl, mid, (st_data_t)NEW_METHOD(body->nd_body, body->nd_noex));
st_data_t          80 class.c        	st_delete(RCLASS(clone)->iv_tbl, (st_data_t*)&id, 0);
st_data_t          82 class.c        	st_delete(RCLASS(clone)->iv_tbl, (st_data_t*)&id, 0);
st_data_t          87 class.c        	  (st_data_t)RCLASS(clone)->m_tbl);
st_data_t         133 class.c        	  (st_data_t)clone->m_tbl);
st_data_t         571 class.c        	st_foreach(RCLASS(mod)->m_tbl, method_entry, (st_data_t)list);
st_data_t         714 class.c        	st_foreach(RCLASS(klass)->m_tbl, method_entry, (st_data_t)list);
st_data_t         719 class.c        	    st_foreach(RCLASS(klass)->m_tbl, method_entry, (st_data_t)list);
st_data_t         678 dln.c          		if (st_delete(undef_tbl, (st_data_t*)&key, NULL)) {
st_data_t         691 dln.c          		if (st_delete(undef_tbl, (st_data_t*)&key, NULL)) {
st_data_t         759 dln.c          	    if (st_delete(undef_tbl, (st_data_t*)&key, NULL) != 0) {
st_data_t         404 eval.c             st_insert(RCLASS(klass)->m_tbl, mid, (st_data_t)body);
st_data_t         435 eval.c             while (!st_lookup(RCLASS(klass)->m_tbl, id, (st_data_t *)&body)) {
st_data_t         531 eval.c             if (!st_delete(RCLASS(klass)->m_tbl, &mid, (st_data_t *)&body) ||
st_data_t        2042 eval.c             if (RTEST(ruby_verbose) && st_lookup(RCLASS(klass)->m_tbl, name, (st_data_t *)&node)) {
st_data_t        2048 eval.c               (st_data_t)NEW_METHOD(NEW_FBODY(body, def, origin), orig->nd_noex));
st_data_t        3787 eval.c         	    if (st_lookup(RCLASS(klass)->m_tbl, node->nd_mid, (st_data_t *)&body)) {
st_data_t        6742 eval.c         	if (st_lookup(loading_tbl, (st_data_t)feature, 0)) return Qtrue;
st_data_t        6747 eval.c         	    if (st_lookup(loading_tbl, (st_data_t)buf, 0)) return Qtrue;
st_data_t        6754 eval.c         	if (loading_tbl && st_lookup(loading_tbl, (st_data_t)feature, 0))
st_data_t        6775 eval.c             st_data_t th;
st_data_t        6778 eval.c             if (!st_lookup(loading_tbl, (st_data_t)ftptr, &th)) return Qfalse;
st_data_t        6782 eval.c             } while (st_lookup(loading_tbl, (st_data_t)ftptr, &th));
st_data_t        6940 eval.c         		    st_insert(loading_tbl, (st_data_t)ftptr, (st_data_t)curr_thread);
st_data_t        6968 eval.c         	if (st_delete(loading_tbl, (st_data_t *)&ftptr, 0)) { /* loading done */
st_data_t        12377 eval.c         	st_delete(th->locals, (st_data_t*)&id, 0);
st_data_t         358 ext/syck/emitter.c syck_emit( SyckEmitter *e, st_data_t n )
st_data_t         395 ext/syck/emitter.c         st_lookup( e->markers, n, (st_data_t *)&oid ) &&
st_data_t         396 ext/syck/emitter.c         st_lookup( e->anchors, (st_data_t)oid, (st_data_t *)&anchor_name ) )
st_data_t         403 ext/syck/emitter.c         if ( ! st_lookup( e->anchored, (st_data_t)anchor_name, (st_data_t *)&x ) )
st_data_t         411 ext/syck/emitter.c             st_insert( e->anchored, (st_data_t)anchor_name, (st_data_t)x );
st_data_t        1030 ext/syck/emitter.c void syck_emit_item( SyckEmitter *e, st_data_t n )
st_data_t        1195 ext/syck/emitter.c syck_emitter_mark_node( SyckEmitter *e, st_data_t n )
st_data_t        1213 ext/syck/emitter.c     if ( ! st_lookup( e->markers, n, (st_data_t *)&oid ) )
st_data_t        1219 ext/syck/emitter.c         st_insert( e->markers, n, (st_data_t)oid );
st_data_t        1228 ext/syck/emitter.c         if ( ! st_lookup( e->anchors, (st_data_t)oid, (st_data_t *)&anchor_name ) )
st_data_t        1244 ext/syck/emitter.c             st_insert( e->anchors, (st_data_t)oid, (st_data_t)anchor_name );
st_data_t          40 ext/syck/handler.c         if ( st_lookup( p->bad_anchors, (st_data_t)a, (st_data_t *)&bad ) )
st_data_t          53 ext/syck/handler.c     if ( st_lookup( p->anchors, (st_data_t)a, (st_data_t *)&ntmp ) )
st_data_t          60 ext/syck/handler.c     st_insert( p->anchors, (st_data_t)a, (st_data_t)n );
st_data_t          73 ext/syck/handler.c     if ( st_delete( p->anchors, (st_data_t *)&atmp, (st_data_t *)&ntmp ) )
st_data_t          80 ext/syck/handler.c     st_insert( p->anchors, (st_data_t)a, (st_data_t)1 );
st_data_t          90 ext/syck/handler.c         if ( st_lookup( p->anchors, (st_data_t)a, (st_data_t *)&n ) )
st_data_t         103 ext/syck/handler.c                 if ( ! st_lookup( p->bad_anchors, (st_data_t)a, (st_data_t *)&n ) )
st_data_t         106 ext/syck/handler.c                     st_insert( p->bad_anchors, (st_data_t)a, (st_data_t)n );
st_data_t          77 ext/syck/rubyext.c void rb_syck_emitter_handler _((SyckEmitter *, st_data_t));
st_data_t        1837 ext/syck/rubyext.c     st_data_t data;
st_data_t        2033 ext/syck/rubyext.c     syck_emitter_mark_node( emitter, (st_data_t)symple );
st_data_t        2040 ext/syck/rubyext.c         syck_emit(emitter, (st_data_t)symple);
st_data_t         189 ext/syck/syck.c     st_insert( p->syms, id, (st_data_t)data );
st_data_t         197 ext/syck/syck.c     return st_lookup( p->syms, id, (st_data_t *)data );
st_data_t         367 ext/syck/syck.h SYMID syck_emitter_mark_node( SyckEmitter *, st_data_t );
st_data_t         376 ext/syck/syck.h void syck_emit( SyckEmitter *, st_data_t );
st_data_t         383 ext/syck/syck.h void syck_emit_item( SyckEmitter *, st_data_t );
st_data_t         249 ext/win32ole/win32ole.c         st_data_t key = p->obj;
st_data_t         327 ext/win32ole/win32ole.c     st_data_t data;
st_data_t         521 gc.c               if (!st_lookup(source_filenames, (st_data_t)f, (st_data_t *)&name)) {
st_data_t         526 gc.c           	st_add_direct(source_filenames, (st_data_t)ptr, (st_data_t)name);
st_data_t        1705 gc.c           	st_delete(finalizer_table, (st_data_t*)&obj, 0);
st_data_t        1785 gc.c               if (finalizer_table && st_delete(finalizer_table, (st_data_t*)&obj, &table)) {
st_data_t         105 hash.c             st_data_t arg;
st_data_t         109 hash.c         foreach_safe_i(st_data_t key, st_data_t value, struct foreach_safe_arg *arg)
st_data_t         122 hash.c         st_foreach_safe(st_table *table, int (*func)(ANYARGS), st_data_t a)
st_data_t         129 hash.c             if (st_foreach(table, foreach_safe_i, (st_data_t)&arg)) {
st_data_t         154 hash.c         	st_delete_safe(tbl, (st_data_t*)&key, 0, Qundef);
st_data_t         181 hash.c             if (st_foreach(RHASH(arg->hash)->tbl, hash_foreach_iter, (st_data_t)arg)) {
st_data_t         367 hash.c             rb_hash_foreach(hash, rb_hash_rehash_i, (st_data_t)tbl);
st_data_t         567 hash.c             rb_hash_foreach(hash, key_i, (st_data_t)args);
st_data_t         605 hash.c         	if (st_delete_safe(RHASH(hash)->tbl, (st_data_t*)&key, &val, Qundef)) {
st_data_t         610 hash.c             else if (st_delete(RHASH(hash)->tbl, (st_data_t*)&key, &val))
st_data_t         655 hash.c             rb_hash_foreach(hash, shift_i, (st_data_t)&var);
st_data_t        1315 hash.c             rb_hash_foreach(hash, rb_hash_search_value, (st_data_t)data);
st_data_t        1363 hash.c             rb_hash_foreach(hash1, equal_i, (st_data_t)&data);
st_data_t         308 marshal.c          st_data_t num;
st_data_t         398 marshal.c      	st_foreach_safe(tbl, w_obj_each, (st_data_t)arg);
st_data_t         410 marshal.c          st_data_t num;
st_data_t         579 marshal.c      	    rb_hash_foreach(obj, hash_each, (st_data_t)&c_arg);
st_data_t        8415 parse.y            if (st_lookup(global_symbols.tbl, (st_data_t)name, (st_data_t *)&id))
st_data_t        8480 parse.y            st_add_direct(global_symbols.tbl, (st_data_t)name, id);
st_data_t        8481 parse.y            st_add_direct(global_symbols.rev, id, (st_data_t)name);
st_data_t        8489 parse.y            st_data_t data;
st_data_t         583 process.c          if (pid_tbl && st_lookup(pid_tbl, pid, (st_data_t *)st)) {
st_data_t         585 process.c      	st_delete(pid_tbl, (st_data_t*)&pid, NULL);
st_data_t         609 process.c      	st_insert(pid_tbl, pid, (st_data_t)st);
st_data_t         328 regparse.c     onig_st_lookup_strend(st_table *table, const UChar* str_key, const UChar* end_key, st_data_t *value)
st_data_t         335 regparse.c         return onig_st_lookup(table, (st_data_t )(&key), value);
st_data_t         339 regparse.c     onig_st_insert_strend(st_table *table, const UChar* str_key, const UChar* end_key, st_data_t value)
st_data_t         347 regparse.c       result = onig_st_insert(table, (st_data_t )key, value);
st_data_t         391 regparse.c     typedef st_data_t HashDataType;   /* 1.6 st.h doesn't define st_data_t type */
st_data_t        4847 regparse.c                   if (onig_st_lookup(OnigTypeCClassTable, (st_data_t )&key,
st_data_t        4848 regparse.c                                      (st_data_t* )np)) {
st_data_t        4862 regparse.c                 onig_st_add_direct(OnigTypeCClassTable, (st_data_t )new_key,
st_data_t        4863 regparse.c                                    (st_data_t )*np);
st_data_t          22 st.c               st_data_t key;
st_data_t          23 st.c               st_data_t record;
st_data_t         235 st.c           st_lookup(st_table *table, register st_data_t key, st_data_t *value)
st_data_t         271 st.c           st_insert(register st_table *table, register st_data_t key, st_data_t value)
st_data_t         290 st.c           st_add_direct(st_table *table, st_data_t key, st_data_t value)
st_data_t         365 st.c           st_delete(register st_table *table, register st_data_t *key, st_data_t *value)
st_data_t         404 st.c           st_delete_safe(register st_table *table, register st_data_t *key, st_data_t *value, st_data_t never)
st_data_t         431 st.c           delete_never(st_data_t key, st_data_t value, st_data_t never)
st_data_t         438 st.c           st_cleanup_safe(st_table *table, st_data_t never)
st_data_t         447 st.c           st_foreach(st_table *table, int (*func)(ANYARGS), st_data_t arg)
st_data_t          26 st.h           #define st_is_member(table,key) st_lookup(table,key,(st_data_t *)0)
st_data_t          47 st.h           int st_delete(st_table *, st_data_t *, st_data_t *);
st_data_t          48 st.h           int st_delete_safe(st_table *, st_data_t *, st_data_t *, st_data_t);
st_data_t          49 st.h           int st_insert(st_table *, st_data_t, st_data_t);
st_data_t          50 st.h           int st_lookup(st_table *, st_data_t, st_data_t *);
st_data_t          51 st.h           int st_foreach(st_table *, int (*)(ANYARGS), st_data_t);
st_data_t          52 st.h           void st_add_direct(st_table *, st_data_t, st_data_t);
st_data_t          54 st.h           void st_cleanup_safe(st_table *, st_data_t);
st_data_t          96 variable.c     	    st_foreach(RCLASS(value)->iv_tbl, fc_i, (st_data_t)&arg);
st_data_t         121 variable.c     	st_foreach_safe(RCLASS(rb_cObject)->iv_tbl, fc_i, (st_data_t)&arg);
st_data_t         124 variable.c     	st_foreach_safe(rb_class_tbl, fc_i, (st_data_t)&arg);
st_data_t         152 variable.c     	    st_delete(RCLASS(klass)->iv_tbl, (st_data_t*)&classid, 0);
st_data_t         324 variable.c         if (!st_lookup(rb_global_tbl, id, (st_data_t *)&entry)) {
st_data_t         338 variable.c     	st_add_direct(rb_global_tbl, id, (st_data_t)entry);
st_data_t         586 variable.c         if (!st_lookup(rb_global_tbl, id, (st_data_t *)&entry)) {
st_data_t         735 variable.c         if (!st_lookup(rb_global_tbl, name1, (st_data_t *)&entry1)) {
st_data_t         738 variable.c     	st_add_direct(rb_global_tbl, name1, (st_data_t)entry1);
st_data_t         773 variable.c         if (!st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) return 0;
st_data_t         784 variable.c           if (st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) {
st_data_t         808 variable.c         if (!st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) {
st_data_t         811 variable.c     	st_add_direct(generic_iv_tbl, obj, (st_data_t)tbl);
st_data_t         825 variable.c         if (!st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) return Qfalse;
st_data_t         839 variable.c         if (!st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) return 0;
st_data_t         842 variable.c     	st_delete(generic_iv_tbl, &obj, (st_data_t *)&tbl);
st_data_t         854 variable.c         if (st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) {
st_data_t         889 variable.c         if (st_delete(generic_iv_tbl, &obj, (st_data_t *)&tbl))
st_data_t         900 variable.c         if (st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) {
st_data_t         903 variable.c     	if (st_lookup(generic_iv_tbl, clone, (st_data_t *)&old)) {
st_data_t         905 variable.c     	    st_insert(generic_iv_tbl, clone, (st_data_t)st_copy(tbl));
st_data_t         908 variable.c     	    st_add_direct(generic_iv_tbl, clone, (st_data_t)st_copy(tbl));
st_data_t        1032 variable.c     	    if (st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) {
st_data_t        1080 variable.c     	if (ROBJECT(obj)->iv_tbl && st_delete(ROBJECT(obj)->iv_tbl, (st_data_t*)&id, &val)) {
st_data_t        1192 variable.c         st_insert(tbl, id, (st_data_t)rb_node_newnode(NODE_MEMO, fn, ruby_safe_level, 0));
st_data_t        1199 variable.c         st_data_t load = 0;
st_data_t        1201 variable.c         st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, 0);
st_data_t        1205 variable.c     	st_delete(tbl, (st_data_t*)&id, &load);
st_data_t        1211 variable.c     	    if (st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, &val)) {
st_data_t        1237 variable.c         st_data_t load;
st_data_t        1253 variable.c         st_delete(tbl, (st_data_t*)&id, 0);
st_data_t        1258 variable.c     	if (st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, &val)) {
st_data_t        1349 variable.c         if (RCLASS(mod)->iv_tbl && st_delete(ROBJECT(mod)->iv_tbl, (st_data_t*)&id, &val)) {
st_data_t        1384 variable.c     	st_foreach_safe(RCLASS(mod)->iv_tbl, sv_i, (st_data_t)tbl);
st_data_t        1671 variable.c         if (RCLASS(mod)->iv_tbl && st_delete(ROBJECT(mod)->iv_tbl, (st_data_t*)&id, &val)) {


st_delete

st_delete        2551 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
st_delete        2583 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
st_delete        2589 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
st_delete        2623 array.c        	if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
st_delete          80 class.c        	st_delete(RCLASS(clone)->iv_tbl, (st_data_t*)&id, 0);
st_delete          82 class.c        	st_delete(RCLASS(clone)->iv_tbl, (st_data_t*)&id, 0);
st_delete         678 dln.c          		if (st_delete(undef_tbl, (st_data_t*)&key, NULL)) {
st_delete         691 dln.c          		if (st_delete(undef_tbl, (st_data_t*)&key, NULL)) {
st_delete         759 dln.c          	    if (st_delete(undef_tbl, (st_data_t*)&key, NULL) != 0) {
st_delete         531 eval.c             if (!st_delete(RCLASS(klass)->m_tbl, &mid, (st_data_t *)&body) ||
st_delete        6968 eval.c         	if (st_delete(loading_tbl, (st_data_t *)&ftptr, 0)) { /* loading done */
st_delete        12377 eval.c         	st_delete(th->locals, (st_data_t*)&id, 0);
st_delete          73 ext/syck/handler.c     if ( st_delete( p->anchors, (st_data_t *)&atmp, (st_data_t *)&ntmp ) )
st_delete         250 ext/win32ole/win32ole.c         st_delete(DATA_PTR(com_hash), &key, 0);
st_delete        1705 gc.c           	st_delete(finalizer_table, (st_data_t*)&obj, 0);
st_delete        1785 gc.c               if (finalizer_table && st_delete(finalizer_table, (st_data_t*)&obj, &table)) {
st_delete         610 hash.c             else if (st_delete(RHASH(hash)->tbl, (st_data_t*)&key, &val))
st_delete         585 process.c      	st_delete(pid_tbl, (st_data_t*)&pid, NULL);
st_delete         171 regint.h       #define onig_st_delete                      st_delete
st_delete          47 st.h           int st_delete(st_table *, st_data_t *, st_data_t *);
st_delete         131 variable.c     	st_delete(RCLASS(klass)->iv_tbl, &tmp_classpath, 0);
st_delete         152 variable.c     	    st_delete(RCLASS(klass)->iv_tbl, (st_data_t*)&classid, 0);
st_delete         840 variable.c         status = st_delete(tbl, &id, valp);
st_delete         842 variable.c     	st_delete(generic_iv_tbl, &obj, (st_data_t *)&tbl);
st_delete         889 variable.c         if (st_delete(generic_iv_tbl, &obj, (st_data_t *)&tbl))
st_delete        1080 variable.c     	if (ROBJECT(obj)->iv_tbl && st_delete(ROBJECT(obj)->iv_tbl, (st_data_t*)&id, &val)) {
st_delete        1201 variable.c         st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, 0);
st_delete        1205 variable.c     	st_delete(tbl, (st_data_t*)&id, &load);
st_delete        1211 variable.c     	    if (st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, &val)) {
st_delete        1253 variable.c         st_delete(tbl, (st_data_t*)&id, 0);
st_delete        1258 variable.c     	if (st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, &val)) {
st_delete        1349 variable.c         if (RCLASS(mod)->iv_tbl && st_delete(ROBJECT(mod)->iv_tbl, (st_data_t*)&id, &val)) {
st_delete        1671 variable.c         if (RCLASS(mod)->iv_tbl && st_delete(ROBJECT(mod)->iv_tbl, (st_data_t*)&id, &val)) {


st_delete_safe

st_delete_safe    154 hash.c         	st_delete_safe(tbl, (st_data_t*)&key, 0, Qundef);
st_delete_safe    605 hash.c         	if (st_delete_safe(RHASH(hash)->tbl, (st_data_t*)&key, &val, Qundef)) {
st_delete_safe    172 regint.h       #define onig_st_delete_safe                 st_delete_safe
st_delete_safe     48 st.h           int st_delete_safe(st_table *, st_data_t *, st_data_t *, st_data_t);


st_foreach

st_foreach         86 class.c        	st_foreach(RCLASS(orig)->m_tbl, clone_method,
st_foreach        132 class.c        	st_foreach(RCLASS(klass)->m_tbl, clone_method,
st_foreach        571 class.c        	st_foreach(RCLASS(mod)->m_tbl, method_entry, (st_data_t)list);
st_foreach        577 class.c            st_foreach(list, func, ary);
st_foreach        714 class.c        	st_foreach(RCLASS(klass)->m_tbl, method_entry, (st_data_t)list);
st_foreach        719 class.c        	    st_foreach(RCLASS(klass)->m_tbl, method_entry, (st_data_t)list);
st_foreach        724 class.c            st_foreach(list, ins_methods_i, ary);
st_foreach        480 dln.c              st_foreach(undef_tbl, undef_print, NULL);
st_foreach        615 dln.c              st_foreach(reloc_tbl, reloc_undef, &arg);
st_foreach        688 dln.c          		st_foreach(reloc_tbl, reloc_repl, &data);
st_foreach       1011 dln.c          	    st_foreach(undef_tbl, search_undef, lib_tbl);
st_foreach       10026 eval.c             if (loading_tbl) st_foreach(loading_tbl, mark_loading_thread, 0);
st_foreach       12454 eval.c         	st_foreach(th->locals, thread_keys_i, ary);
st_foreach        156 ext/syck/emitter.c         st_foreach( e->anchors, syck_st_free_anchors, 0 );
st_foreach        731 ext/syck/rubyext.c         st_foreach( parser->anchors, syck_st_mark_nodes, 0 );
st_foreach        735 ext/syck/rubyext.c         st_foreach( parser->bad_anchors, syck_st_mark_nodes, 0 );
st_foreach        216 ext/syck/syck.c         st_foreach( p->anchors, syck_st_free_nodes, 0 );
st_foreach        223 ext/syck/syck.c         st_foreach( p->bad_anchors, syck_st_free_nodes, 0 );
st_foreach        223 ext/tk/tkutil/tkutil.c     st_foreach(RHASH(keys)->tbl, to_strkey, new_keys);
st_foreach        633 ext/tk/tkutil/tkutil.c     st_foreach(RHASH(hash)->tbl, push_kv, args);
st_foreach        684 ext/tk/tkutil/tkutil.c     st_foreach(RHASH(hash)->tbl, push_kv_enc, args);
st_foreach        643 gc.c               st_foreach(tbl, mark_entry, lev);
st_foreach        664 gc.c               st_foreach(tbl, mark_keyvalue, lev);
st_foreach       1017 gc.c                   st_foreach(source_filenames, sweep_source_filename, 0);
st_foreach        129 hash.c             if (st_foreach(table, foreach_safe_i, (st_data_t)&arg)) {
st_foreach        181 hash.c             if (st_foreach(RHASH(arg->hash)->tbl, hash_foreach_iter, (st_data_t)arg)) {
st_foreach       8552 parse.y            st_foreach(global_symbols.tbl, symbols_i, ary);
st_foreach        790 process.c      	st_foreach(pid_tbl, waitall_each, result);
st_foreach        177 regint.h       #define onig_st_foreach                     st_foreach
st_foreach        442 st.c               st_foreach(table, delete_never, never);
st_foreach         51 st.h           int st_foreach(st_table *, int (*)(ANYARGS), st_data_t);
st_foreach         96 variable.c     	    st_foreach(RCLASS(value)->iv_tbl, fc_i, (st_data_t)&arg);
st_foreach        428 variable.c     	st_foreach(rb_global_tbl, mark_global_entry, 0);


st_foreach_safe

st_foreach_safe   315 intern.h       void st_foreach_safe(struct st_table *, int (*)(ANYARGS), unsigned long);
st_foreach_safe   398 marshal.c      	st_foreach_safe(tbl, w_obj_each, (st_data_t)arg);
st_foreach_safe   337 object.c       	st_foreach_safe(ROBJECT(obj)->iv_tbl, inspect_i, str);
st_foreach_safe   121 variable.c     	st_foreach_safe(RCLASS(rb_cObject)->iv_tbl, fc_i, (st_data_t)&arg);
st_foreach_safe   124 variable.c     	st_foreach_safe(rb_class_tbl, fc_i, (st_data_t)&arg);
st_foreach_safe   716 variable.c         st_foreach_safe(rb_global_tbl, gvar_i, ary);
st_foreach_safe   870 variable.c     	st_foreach_safe(tbl, givar_mark_i, 0);
st_foreach_safe   880 variable.c         st_foreach_safe(generic_iv_tbl, givar_i, 0);
st_foreach_safe  1024 variable.c     	    st_foreach_safe(ROBJECT(obj)->iv_tbl, ivar_i, ary);
st_foreach_safe  1033 variable.c     		st_foreach_safe(tbl, ivar_i, ary);
st_foreach_safe  1384 variable.c     	st_foreach_safe(RCLASS(mod)->iv_tbl, sv_i, (st_data_t)tbl);
st_foreach_safe  1417 variable.c         st_foreach_safe(tbl, list_i, ary);
st_foreach_safe  1633 variable.c     	st_foreach_safe(RCLASS(obj)->iv_tbl, cv_i, ary);


st_free_table

st_free_table     578 class.c            st_free_table(list);
st_free_table     725 class.c            st_free_table(list);
st_free_table    1014 dln.c          		st_free_table(lib_tbl);
st_free_table    1021 dln.c          	st_free_table(lib_tbl);
st_free_table    10055 eval.c             if (th->locals) st_free_table(th->locals);
st_free_table     157 ext/syck/emitter.c         st_free_table( e->anchors );
st_free_table     163 ext/syck/emitter.c         st_free_table( e->anchored );
st_free_table     172 ext/syck/emitter.c         st_free_table( e->markers );
st_free_table     217 ext/syck/syck.c         st_free_table( p->anchors );
st_free_table     224 ext/syck/syck.c         st_free_table( p->bad_anchors );
st_free_table     237 ext/syck/syck.c         st_free_table( p->syms );
st_free_table    6919 ext/win32ole/win32ole.c     com_hash = Data_Wrap_Struct(rb_cData, rb_mark_hash, st_free_table, st_init_numtable());
st_free_table    1114 gc.c           	    st_free_table(RANY(obj)->as.object.iv_tbl);
st_free_table    1120 gc.c           	st_free_table(RANY(obj)->as.klass.m_tbl);
st_free_table    1122 gc.c           	    st_free_table(RANY(obj)->as.object.iv_tbl);
st_free_table    1137 gc.c           	    st_free_table(RANY(obj)->as.hash.tbl);
st_free_table     368 hash.c             st_free_table(RHASH(hash)->tbl);
st_free_table     646 marshal.c          st_free_table(arg->symbols);
st_free_table     647 marshal.c          st_free_table(arg->data);
st_free_table    1298 marshal.c          st_free_table(arg->symbols);
st_free_table     181 object.c       	    st_free_table(ROBJECT(dest)->iv_tbl);
st_free_table     180 regint.h       #define onig_st_free_table                  st_free_table
st_free_table      53 st.h           void st_free_table(st_table *);
st_free_table     843 variable.c     	st_free_table(tbl);
st_free_table     890 variable.c     	st_free_table(tbl);
st_free_table     904 variable.c     	    st_free_table(old);
st_free_table    1157 variable.c     	RDATA(av)->dfree != (RUBY_DATA_FUNC)st_free_table) {
st_free_table    1185 variable.c     	av = Data_Wrap_Struct(0, rb_mark_tbl, st_free_table, 0);
st_free_table    1209 variable.c     	    st_free_table(tbl);
st_free_table    1256 variable.c     	st_free_table(tbl);
st_free_table    1418 variable.c         st_free_table(tbl);


st_init_numtable

st_init_numtable   30 class.c            klass->m_tbl = st_init_numtable();
st_init_numtable   85 class.c        	RCLASS(clone)->m_tbl = st_init_numtable();
st_init_numtable  131 class.c        	clone->m_tbl = st_init_numtable();
st_init_numtable  145 class.c        	    RCLASS(klass)->iv_tbl = st_init_numtable();
st_init_numtable  260 class.c            mdl->m_tbl = st_init_numtable();
st_init_numtable  327 class.c        	RCLASS(module)->iv_tbl = st_init_numtable();
st_init_numtable  569 class.c            list = st_init_numtable();
st_init_numtable  712 class.c            list = st_init_numtable();
st_init_numtable  532 dln.c          	reloc_tbl = st_init_numtable();
st_init_numtable  987 error.c            syserr_tbl = st_init_numtable();
st_init_numtable 12374 eval.c         	th->locals = st_init_numtable();
st_init_numtable  400 ext/syck/emitter.c             e->anchored = st_init_numtable();
st_init_numtable 1205 ext/syck/emitter.c         e->markers = st_init_numtable();
st_init_numtable 1225 ext/syck/emitter.c             e->anchors = st_init_numtable();
st_init_numtable  186 ext/syck/syck.c         p->syms = st_init_numtable();
st_init_numtable 6919 ext/win32ole/win32ole.c     com_hash = Data_Wrap_Struct(rb_cData, rb_mark_hash, st_free_table, st_init_numtable());
st_init_numtable 1738 gc.c           	finalizer_table = st_init_numtable();
st_init_numtable  717 marshal.c          arg.symbols = st_init_numtable();
st_init_numtable  718 marshal.c          arg.data    = st_init_numtable();
st_init_numtable 1351 marshal.c          arg.symbols = st_init_numtable();
st_init_numtable  608 process.c      	    pid_tbl = st_init_numtable();
st_init_numtable  166 regint.h       #define onig_st_init_numtable               st_init_numtable
st_init_numtable   43 st.h           st_table *st_init_numtable(void);
st_init_numtable   28 variable.c         rb_global_tbl = st_init_numtable();
st_init_numtable   29 variable.c         rb_class_tbl = st_init_numtable();
st_init_numtable  128 variable.c     	    ROBJECT(klass)->iv_tbl = st_init_numtable();
st_init_numtable  805 variable.c     	generic_iv_tbl = st_init_numtable();
st_init_numtable  810 variable.c     	tbl = st_init_numtable();
st_init_numtable  959 variable.c     	if (!ROBJECT(obj)->iv_tbl) ROBJECT(obj)->iv_tbl = st_init_numtable();
st_init_numtable 1187 variable.c     	DATA_PTR(av) = tbl = st_init_numtable();
st_init_numtable 1381 variable.c     	tbl = st_init_numtable();
st_init_numtable 1497 variable.c     	RCLASS(klass)->iv_tbl = st_init_numtable();


st_init_numtable_with_size

st_init_numtable_with_size 8304 parse.y            global_symbols.rev = st_init_numtable_with_size(200);
st_init_numtable_with_size  167 regint.h       #define onig_st_init_numtable_with_size     st_init_numtable_with_size
st_init_numtable_with_size   44 st.h           st_table *st_init_numtable_with_size(int);


st_init_strtable

st_init_strtable  342 dln.c              tbl = st_init_strtable();
st_init_strtable  420 dln.c              undef_tbl = st_init_strtable();
st_init_strtable  995 dln.c          	lib_tbl = st_init_strtable();
st_init_strtable 6936 eval.c         			loading_tbl = st_init_strtable();
st_init_strtable   51 ext/syck/handler.c         p->anchors = st_init_strtable();
st_init_strtable   71 ext/syck/handler.c         p->anchors = st_init_strtable();
st_init_strtable  101 ext/syck/handler.c                     p->bad_anchors = st_init_strtable();
st_init_strtable 1938 gc.c               source_filenames = st_init_strtable();
st_init_strtable  168 regint.h       #define onig_st_init_strtable               st_init_strtable
st_init_strtable   45 st.h           st_table *st_init_strtable(void);


st_init_strtable_with_size

st_init_strtable_with_size 8303 parse.y            global_symbols.tbl = st_init_strtable_with_size(200);
st_init_strtable_with_size  169 regint.h       #define onig_st_init_strtable_with_size     st_init_strtable_with_size
st_init_strtable_with_size   46 st.h           st_table *st_init_strtable_with_size(int);


st_init_table

st_init_table     208 hash.c             hash->tbl = st_init_table(&objhash);
st_init_table     164 regint.h       #define onig_st_init_table                  st_init_table
st_init_table     174 st.c               return st_init_table(&type_numhash);
st_init_table     186 st.c               return st_init_table(&type_strhash);
st_init_table      41 st.h           st_table *st_init_table(struct st_hash_type *);


st_init_table_with_size

st_init_table_with_size  366 hash.c             tbl = st_init_table_with_size(&objhash, RHASH(hash)->tbl->num_entries);
st_init_table_with_size  165 regint.h       #define onig_st_init_table_with_size        st_init_table_with_size
st_init_table_with_size  168 st.c               return st_init_table_with_size(type, 0);
st_init_table_with_size  180 st.c               return st_init_table_with_size(&type_numhash, size);
st_init_table_with_size  192 st.c               return st_init_table_with_size(&type_strhash, size);
st_init_table_with_size   42 st.h           st_table *st_init_table_with_size(struct st_hash_type *, int);


st_insert

st_insert          62 class.c            st_insert(tbl, mid, (st_data_t)NEW_METHOD(body->nd_body, body->nd_noex));
st_insert         147 class.c        	st_insert(RCLASS(klass)->iv_tbl, rb_intern("__attached__"), obj);
st_insert         349 dln.c          	st_insert(tbl, sym->n_un.n_name, sym);
st_insert         534 dln.c              st_insert(reloc_tbl, u_no++, obj);
st_insert         690 dln.c          		st_insert(undef_tbl, strdup(sym[1].n_un.n_name), NULL);
st_insert         729 dln.c          		    st_insert(undef_tbl, strdup(sym->n_un.n_name), NULL);
st_insert         767 dln.c          	    st_insert(sym_tbl, new_sym->n_un.n_name, new_sym);
st_insert        1005 dln.c          	    st_insert(lib_tbl, name, base->lib_offset + sizeof(ahdr));
st_insert         404 eval.c             st_insert(RCLASS(klass)->m_tbl, mid, (st_data_t)body);
st_insert        2047 eval.c             st_insert(RCLASS(klass)->m_tbl, name,
st_insert        6940 eval.c         		    st_insert(loading_tbl, (st_data_t)ftptr, (st_data_t)curr_thread);
st_insert        12380 eval.c             st_insert(th->locals, id, val);
st_insert         411 ext/syck/emitter.c             st_insert( e->anchored, (st_data_t)anchor_name, (st_data_t)x );
st_insert        1219 ext/syck/emitter.c         st_insert( e->markers, n, (st_data_t)oid );
st_insert        1244 ext/syck/emitter.c             st_insert( e->anchors, (st_data_t)oid, (st_data_t)anchor_name );
st_insert          60 ext/syck/handler.c     st_insert( p->anchors, (st_data_t)a, (st_data_t)n );
st_insert          80 ext/syck/handler.c     st_insert( p->anchors, (st_data_t)a, (st_data_t)1 );
st_insert         106 ext/syck/handler.c                     st_insert( p->bad_anchors, (st_data_t)a, (st_data_t)n );
st_insert         189 ext/syck/syck.c     st_insert( p->syms, id, (st_data_t)data );
st_insert         338 ext/win32ole/win32ole.c         st_insert(tbl, val, (VALUE)pdisp | FIXNUM_FLAG);
st_insert        1757 gc.c           	st_insert(finalizer_table, dest, table);
st_insert         333 hash.c             if (key != Qundef) st_insert(tbl, key, value);
st_insert         838 hash.c         	st_insert(RHASH(hash)->tbl, key, val);
st_insert         861 marshal.c          st_insert(arg->symbols, arg->symbols->num_entries, id);
st_insert         609 process.c      	st_insert(pid_tbl, pid, (st_data_t)st);
st_insert         173 regint.h       #define onig_st_insert                      st_insert
st_insert          49 st.h           int st_insert(st_table *, st_data_t, st_data_t);
st_insert         130 variable.c     	st_insert(ROBJECT(klass)->iv_tbl, classpath, arg.path);
st_insert         151 variable.c     	    st_insert(ROBJECT(klass)->iv_tbl, classpath, path);
st_insert         815 variable.c         st_insert(tbl, id, val);
st_insert         905 variable.c     	    st_insert(generic_iv_tbl, clone, (st_data_t)st_copy(tbl));
st_insert         960 variable.c     	st_insert(ROBJECT(obj)->iv_tbl, id, val);
st_insert        1192 variable.c         st_insert(tbl, id, (st_data_t)rb_node_newnode(NODE_MEMO, fn, ruby_safe_level, 0));
st_insert        1370 variable.c     	    st_insert(tbl, key, key);
st_insert        1510 variable.c         st_insert(RCLASS(klass)->iv_tbl, id, val);


st_lookup

st_lookup        2521 array.c        	if (st_lookup(RHASH(hash)->tbl, RARRAY(ary1)->ptr[i], 0)) continue;
st_lookup         545 class.c            if (!st_lookup(list, key, 0)) {
st_lookup         677 dln.c          	    if (st_lookup(sym_tbl, sym[1].n_un.n_name, &old_sym)) {
st_lookup         700 dln.c          	    if (st_lookup(sym_tbl, sym->n_un.n_name, &old_sym) == 0) {
st_lookup         752 dln.c          	    if (st_lookup(sym_tbl, sym->n_un.n_name, &new_sym) != 0
st_lookup         929 dln.c              if (st_lookup(lib_tbl, key, &offset) == 0) return ST_CONTINUE;
st_lookup        1051 dln.c          			&& st_lookup(undef_tbl, sym->n_un.n_name, NULL)) {
st_lookup        1111 dln.c              if (st_lookup(sym_tbl, name, &sym))
st_lookup         789 error.c            if (!st_lookup(syserr_tbl, n, &error)) {
st_lookup         805 error.c            if (!st_lookup(syserr_tbl, n, &error)) {
st_lookup         840 error.c        	if (!NIL_P(error) && st_lookup(syserr_tbl, NUM2LONG(error), &klass)) {
st_lookup         435 eval.c             while (!st_lookup(RCLASS(klass)->m_tbl, id, (st_data_t *)&body)) {
st_lookup        1770 eval.c         	    if (klass->iv_tbl && st_lookup(klass->iv_tbl, id, &result)) {
st_lookup        1793 eval.c         		   st_lookup(RCLASS(klass)->iv_tbl, id, &result)) {
st_lookup        2042 eval.c             if (RTEST(ruby_verbose) && st_lookup(RCLASS(klass)->m_tbl, name, (st_data_t *)&node)) {
st_lookup        3787 eval.c         	    if (st_lookup(RCLASS(klass)->m_tbl, node->nd_mid, (st_data_t *)&body)) {
st_lookup        6742 eval.c         	if (st_lookup(loading_tbl, (st_data_t)feature, 0)) return Qtrue;
st_lookup        6747 eval.c         	    if (st_lookup(loading_tbl, (st_data_t)buf, 0)) return Qtrue;
st_lookup        6754 eval.c         	if (loading_tbl && st_lookup(loading_tbl, (st_data_t)feature, 0))
st_lookup        6778 eval.c             if (!st_lookup(loading_tbl, (st_data_t)ftptr, &th)) return Qfalse;
st_lookup        6782 eval.c             } while (st_lookup(loading_tbl, (st_data_t)ftptr, &th));
st_lookup        12329 eval.c             if (st_lookup(th->locals, id, &val)) {
st_lookup        12420 eval.c             if (st_lookup(th->locals, rb_to_id(id), 0))
st_lookup         144 ext/iconv/iconv.c 	if (st_lookup(RHASH(charset_map)->tbl, key, &val)) {
st_lookup         395 ext/syck/emitter.c         st_lookup( e->markers, n, (st_data_t *)&oid ) &&
st_lookup         396 ext/syck/emitter.c         st_lookup( e->anchors, (st_data_t)oid, (st_data_t *)&anchor_name ) )
st_lookup         403 ext/syck/emitter.c         if ( ! st_lookup( e->anchored, (st_data_t)anchor_name, (st_data_t *)&x ) )
st_lookup        1213 ext/syck/emitter.c     if ( ! st_lookup( e->markers, n, (st_data_t *)&oid ) )
st_lookup        1228 ext/syck/emitter.c         if ( ! st_lookup( e->anchors, (st_data_t)oid, (st_data_t *)&anchor_name ) )
st_lookup          40 ext/syck/handler.c         if ( st_lookup( p->bad_anchors, (st_data_t)a, (st_data_t *)&bad ) )
st_lookup          53 ext/syck/handler.c     if ( st_lookup( p->anchors, (st_data_t)a, (st_data_t *)&ntmp ) )
st_lookup          90 ext/syck/handler.c         if ( st_lookup( p->anchors, (st_data_t)a, (st_data_t *)&n ) )
st_lookup         103 ext/syck/handler.c                 if ( ! st_lookup( p->bad_anchors, (st_data_t)a, (st_data_t *)&n ) )
st_lookup         197 ext/syck/syck.c     return st_lookup( p->syms, id, (st_data_t *)data );
st_lookup         329 ext/win32ole/win32ole.c     if (st_lookup(tbl, val, &data)) {
st_lookup         521 gc.c               if (!st_lookup(source_filenames, (st_data_t)f, (st_data_t *)&name)) {
st_lookup        1740 gc.c               if (st_lookup(finalizer_table, obj, &table)) {
st_lookup        1756 gc.c               if (st_lookup(finalizer_table, obj, &table)) {
st_lookup         393 hash.c             if (!st_lookup(RHASH(hash)->tbl, key, &val)) {
st_lookup         441 hash.c             if (!st_lookup(RHASH(hash)->tbl, key, &val)) {
st_lookup         837 hash.c             if (TYPE(key) != T_STRING || st_lookup(RHASH(hash)->tbl, key, 0)) {
st_lookup        1278 hash.c             if (st_lookup(RHASH(hash)->tbl, key, 0)) {
st_lookup        1330 hash.c             if (!st_lookup(data->tbl, key, &val2)) {
st_lookup         310 marshal.c          if (st_lookup(arg->symbols, id, &num)) {
st_lookup         420 marshal.c          if (st_lookup(arg->data, obj, &num)) {
st_lookup         849 marshal.c          if (st_lookup(arg->symbols, num, &id)) {
st_lookup        8415 parse.y            if (st_lookup(global_symbols.tbl, (st_data_t)name, (st_data_t *)&id))
st_lookup        8500 parse.y            if (st_lookup(global_symbols.rev, id, &data))
st_lookup         583 process.c          if (pid_tbl && st_lookup(pid_tbl, pid, (st_data_t *)st)) {
st_lookup         175 regint.h       #define onig_st_lookup                      st_lookup
st_lookup          26 st.h           #define st_is_member(table,key) st_lookup(table,key,(st_data_t *)0)
st_lookup          50 st.h           int st_lookup(st_table *, st_data_t, st_data_t *);
st_lookup          52 variable.c     	    st_lookup(ROBJECT(fc->track)->iv_tbl, classpath, &tmp)) {
st_lookup         144 variable.c     	if (!st_lookup(ROBJECT(klass)->iv_tbl, classpath, &path)) {
st_lookup         147 variable.c     	    if (!st_lookup(ROBJECT(klass)->iv_tbl, classid, &path)) {
st_lookup         184 variable.c         if (RCLASS(klass)->iv_tbl && st_lookup(RCLASS(klass)->iv_tbl,
st_lookup         324 variable.c         if (!st_lookup(rb_global_tbl, id, (st_data_t *)&entry)) {
st_lookup         586 variable.c         if (!st_lookup(rb_global_tbl, id, (st_data_t *)&entry)) {
st_lookup         735 variable.c         if (!st_lookup(rb_global_tbl, name1, (st_data_t *)&entry1)) {
st_lookup         773 variable.c         if (!st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) return 0;
st_lookup         784 variable.c           if (st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) {
st_lookup         785 variable.c     	if (st_lookup(tbl, id, &val)) {
st_lookup         808 variable.c         if (!st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) {
st_lookup         825 variable.c         if (!st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) return Qfalse;
st_lookup         826 variable.c         if (st_lookup(tbl, id, &val)) {
st_lookup         839 variable.c         if (!st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) return 0;
st_lookup         854 variable.c         if (st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) {
st_lookup         900 variable.c         if (st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) {
st_lookup         903 variable.c     	if (st_lookup(generic_iv_tbl, clone, (st_data_t *)&old)) {
st_lookup         923 variable.c     	if (ROBJECT(obj)->iv_tbl && st_lookup(ROBJECT(obj)->iv_tbl, id, &val))
st_lookup         976 variable.c     	if (ROBJECT(obj)->iv_tbl && st_lookup(ROBJECT(obj)->iv_tbl, id, 0))
st_lookup        1032 variable.c     	    if (st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) {
st_lookup        1176 variable.c         if ((tbl = RCLASS(mod)->iv_tbl) && st_lookup(tbl, id, &av) && av != Qundef)
st_lookup        1181 variable.c         if (st_lookup(tbl, autoload, &av)) {
st_lookup        1202 variable.c         if (st_lookup(RCLASS(mod)->iv_tbl, autoload, &val)) {
st_lookup        1239 variable.c         if (!st_lookup(RCLASS(mod)->iv_tbl, autoload, &val) ||
st_lookup        1240 variable.c     	!(tbl = check_autoload_table(val)) || !st_lookup(tbl, id, &load)) {
st_lookup        1271 variable.c         if (!tbl || !st_lookup(tbl, id, &val) || val != Qundef) {
st_lookup        1286 variable.c     	while (RCLASS(tmp)->iv_tbl && st_lookup(RCLASS(tmp)->iv_tbl,id,&value)) {
st_lookup        1369 variable.c     	if (!st_lookup(tbl, key, 0)) {
st_lookup        1447 variable.c     	if (RCLASS(tmp)->iv_tbl && st_lookup(RCLASS(tmp)->iv_tbl, id, &value)) {
st_lookup        1502 variable.c     	if (st_lookup(RCLASS(klass)->iv_tbl, id, &value)) {
st_lookup        1550 variable.c         if (RCLASS(klass)->iv_tbl && st_lookup(RCLASS(klass)->iv_tbl,id,&value)) {
st_lookup        1562 variable.c         if (RCLASS(klass)->iv_tbl && st_lookup(RCLASS(klass)->iv_tbl,id,0)) {


st_strend_key

st_strend_key     330 regparse.c         st_strend_key key;
st_strend_key     341 regparse.c       st_strend_key* key;
st_strend_key     344 regparse.c       key = (st_strend_key* )xmalloc(sizeof(st_strend_key));


st_table

st_table           19 class.c        extern st_table *rb_class_tbl;
st_table          558 class.c            st_table *list;
st_table          705 class.c            st_table *list;
st_table          185 dln.c          static st_table *sym_tbl;
st_table          186 dln.c          static st_table *undef_tbl;
st_table          333 dln.c          static st_table *
st_table          338 dln.c              st_table *tbl;
st_table          505 dln.c          static st_table *reloc_tbl = NULL;
st_table          949 dln.c              st_table *lib_tbl = NULL;
st_table          782 error.c        static st_table *syserr_tbl;
st_table         6679 eval.c         static st_table *loading_tbl;
st_table         9008 eval.c         	    st_table *m_tbl = RCLASS(data->rklass)->m_tbl;
st_table         9747 eval.c             st_table *locals;
st_table          255 ext/syck/syck.h     st_table *anchors, *bad_anchors;
st_table          257 ext/syck/syck.h     st_table *syms;
st_table          309 ext/syck/syck.h     st_table *markers, *anchors, *anchored;
st_table          190 gc.c           static st_table *finalizer_table = 0;
st_table          412 gc.c           extern st_table *rb_class_tbl;
st_table          514 gc.c           static st_table *source_filenames;
st_table          103 hash.c             st_table *tbl;
st_table          144 hash.c             st_table *tbl;
st_table          360 hash.c             st_table *tbl;
st_table         1321 hash.c             st_table *tbl;
st_table           88 marshal.c          st_table *symbols;
st_table           89 marshal.c          st_table *data;
st_table          409 marshal.c          st_table *ivtbl = 0;
st_table          735 marshal.c          st_table *symbols;
st_table         2279 object.c           extern st_table *rb_class_tbl;
st_table         8296 parse.y            st_table *tbl;
st_table         8297 parse.y            st_table *rev;
st_table          548 process.c      static st_table *pid_tbl;
st_table          321 regparse.c     static st_table*
st_table          390 regparse.c     typedef st_table  NameTable;
st_table         4650 regparse.c     static st_table* OnigTypeCClassTable;
st_table          142 st.c           st_table*
st_table          145 st.c               st_table *tbl;
st_table          156 st.c               tbl = alloc(st_table);
st_table          165 st.c           st_table*
st_table          171 st.c           st_table*
st_table          177 st.c           st_table*
st_table          183 st.c           st_table*
st_table          189 st.c           st_table*
st_table          324 st.c           st_table*
st_table          327 st.c               st_table *new_table;
st_table          331 st.c               new_table = alloc(st_table);
st_table           41 st.h           st_table *st_init_table(struct st_hash_type *);
st_table           42 st.h           st_table *st_init_table_with_size(struct st_hash_type *, int);
st_table           43 st.h           st_table *st_init_numtable(void);
st_table           44 st.h           st_table *st_init_numtable_with_size(int);
st_table           45 st.h           st_table *st_init_strtable(void);
st_table           46 st.h           st_table *st_init_strtable_with_size(int);
st_table           55 st.h           st_table *st_copy(st_table *);
st_table           21 variable.c     static st_table *rb_global_tbl;
st_table           22 variable.c     st_table *rb_class_tbl;
st_table          764 variable.c     static st_table *generic_iv_tbl;
st_table          766 variable.c     st_table*
st_table          769 variable.c         st_table *tbl;
st_table          780 variable.c         st_table *tbl;
st_table          799 variable.c         st_table *tbl;
st_table          821 variable.c         st_table *tbl;
st_table          835 variable.c         st_table *tbl;
st_table          851 variable.c         st_table *tbl;
st_table          886 variable.c         st_table *tbl;
st_table          896 variable.c         st_table *tbl;
st_table          901 variable.c     	st_table *old;
st_table         1030 variable.c     	    st_table *tbl;
st_table         1379 variable.c         st_table *tbl = data;
st_table         1412 variable.c         st_table *tbl = data;


st_table_entry

st_table_entry     24 st.c               st_table_entry *next;
st_table_entry    160 st.c               tbl->bins = (st_table_entry **)Calloc(size, sizeof(st_table_entry*));
st_table_entry    198 st.c               register st_table_entry *ptr, *next;
st_table_entry    238 st.c               register st_table_entry *ptr;
st_table_entry    254 st.c               st_table_entry *entry;\
st_table_entry    260 st.c               entry = alloc(st_table_entry);\
st_table_entry    274 st.c               register st_table_entry *ptr;
st_table_entry    302 st.c               register st_table_entry *ptr, *next, **new_bins;
st_table_entry    307 st.c               new_bins = (st_table_entry**)Calloc(new_num_bins, sizeof(st_table_entry*));
st_table_entry    328 st.c               st_table_entry *ptr, *entry;
st_table_entry    337 st.c               new_table->bins = (st_table_entry**)
st_table_entry    338 st.c           	Calloc((unsigned)num_bins, sizeof(st_table_entry*));
st_table_entry    349 st.c           	    entry = alloc(st_table_entry);
st_table_entry    368 st.c               st_table_entry *tmp;
st_table_entry    369 st.c               register st_table_entry *ptr;
st_table_entry    407 st.c               register st_table_entry *ptr;
st_table_entry    449 st.c               st_table_entry *ptr, *last, *tmp;


stack_check

stack_check      5356 eval.c             stack_check();
stack_check      5600 eval.c         	stack_check();


stack_extend

stack_extend     10293 eval.c             if (addr_in_prev_frame > th->stk_pos) stack_extend(th, exit, &space[0]);
stack_extend     10295 eval.c             if (addr_in_prev_frame < th->stk_pos + th->stk_len) stack_extend(th, exit, &space[STACK_PAD_SIZE-1]);
stack_extend     10299 eval.c         	if (addr_in_prev_frame > th->stk_pos) stack_extend(th, exit, &space[0]);
stack_extend     10303 eval.c         	if (addr_in_prev_frame < th->stk_pos + th->stk_len) stack_extend(th, exit, &space[STACK_PAD_SIZE-1]);
stack_extend     10318 eval.c             stack_extend(th, exit, &v);


stack_type

stack_type        139 parse.y            stack_type parser_cond_stack;
stack_type        140 parse.y            stack_type parser_cmdarg_stack;
stack_type        470 regexec.c        stk->type = (stack_type);\
stack_type        478 regexec.c        stk->type = (stack_type);\
stack_type        485 regexec.c        stk->type = (stack_type);\


stat

stat               67 dir.c          #define lstat stat
stat              915 dir.c              int ret = stat(path, pst);
stat             1762 dln.c          	if (stat(fbuf, &st) == 0) {
stat             1772 dln.c          	    if (stat(mac_fullpath, &st) == 0) {
stat             1806 dln.c          		if (stat(fbuf, &st) == 0)
stat              279 ext/nkf/nkf-utf8/nkf.c     int stat;
stat              876 ext/nkf/nkf-utf8/nkf.c                   if (stat(origfname, &sb)) {
stat             1501 ext/nkf/nkf-utf8/nkf.c     ptr->stat = -1;
stat             1517 ext/nkf/nkf-utf8/nkf.c     ptr->stat = 0;
stat             1548 ext/nkf/nkf-utf8/nkf.c     switch(ptr->stat){
stat             1565 ext/nkf/nkf-utf8/nkf.c               ptr->stat = 1;
stat             1570 ext/nkf/nkf-utf8/nkf.c               ptr->stat = 2;
stat             1575 ext/nkf/nkf-utf8/nkf.c               ptr->stat = 1;
stat             1614 ext/nkf/nkf-utf8/nkf.c     switch (ptr->stat){
stat             1626 ext/nkf/nkf-utf8/nkf.c               ptr->stat = 1;
stat             1630 ext/nkf/nkf-utf8/nkf.c               ptr->stat = 2;
stat             1649 ext/nkf/nkf-utf8/nkf.c               ptr->stat = 1;
stat             1663 ext/nkf/nkf-utf8/nkf.c     switch (ptr->stat){
stat             1669 ext/nkf/nkf-utf8/nkf.c                   ptr->stat = c;
stat             1677 ext/nkf/nkf-utf8/nkf.c               ptr->stat = 1;
stat             1696 ext/nkf/nkf-utf8/nkf.c           if (ptr->stat != c && (c == 0xfe || c == 0xff)){
stat             1711 ext/nkf/nkf-utf8/nkf.c     switch (ptr->stat){
stat             1723 ext/nkf/nkf-utf8/nkf.c               ptr->stat = 1;
stat             1726 ext/nkf/nkf-utf8/nkf.c               ptr->stat = 2;
stat             1736 ext/nkf/nkf-utf8/nkf.c               if (ptr->index > ptr->stat){
stat             1763 ext/nkf/nkf-utf8/nkf.c         if (p->stat > 0){
stat             1765 ext/nkf/nkf-utf8/nkf.c         }else if(p->stat == 0){
stat               64 file.c         #define lstat stat
stat               73 file.c         	if (stat(path, &st) < 0) return -1;
stat              636 file.c             return stat(StringValueCStr(file), st);
stat              828 file.c             if (stat(path, &st) < 0) return -1;
stat             1340 file.c             if (stat(StringValueCStr(fname), &st) < 0) return Qfalse;
stat             3389 file.c             if (stat(StringValueCStr(fname), &st) == -1) {
stat             4020 file.c         	if (stat(p0, &st) == 0 && S_ISDIR(st.st_mode) && (st.st_mode & S_IWOTH)
stat             3321 win32/win32.c      ret = IsWinNT() ? winnt_stat(buf1, st) : stat(buf1, st);
stat             3846 win32/win32.c      struct stat stat;
stat             3849 win32/win32.c      if (rb_w32_stat(path, &stat)) {
stat               57 wince/sys/stat.h #define _stat stat
stat               59 wince/sys/stat.h int _stat(const char *filename, struct _stat *stat);


stat_new

stat_new          692 file.c             return stat_new(&st);
stat_new          720 file.c             return stat_new(&st);
stat_new          748 file.c             return stat_new(&st);
stat_new          782 file.c             return stat_new(&st);


stat_new_0

stat_new_0        177 file.c             return stat_new_0(rb_cStat, st);
stat_new_0       3370 file.c             return stat_new_0(klass, 0);


status_check

status_check     1550 ext/nkf/nkf-utf8/nkf.c           status_check(ptr, c);
status_check     1616 ext/nkf/nkf-utf8/nkf.c           status_check(ptr, c);
status_check     1713 ext/nkf/nkf-utf8/nkf.c           status_check(ptr, c);


status_clear

status_clear     1524 ext/nkf/nkf-utf8/nkf.c     status_clear(ptr);
status_clear     1563 ext/nkf/nkf-utf8/nkf.c               status_clear(ptr);
status_clear     1587 ext/nkf/nkf-utf8/nkf.c               status_clear(ptr);
status_clear     1598 ext/nkf/nkf-utf8/nkf.c                   status_clear(ptr);
status_clear     1641 ext/nkf/nkf-utf8/nkf.c               status_clear(ptr);
status_clear     1690 ext/nkf/nkf-utf8/nkf.c               status_clear(ptr);
status_clear     1698 ext/nkf/nkf-utf8/nkf.c               status_clear(ptr);
status_clear     1744 ext/nkf/nkf-utf8/nkf.c                   status_clear(ptr);


status_disable

status_disable   1579 ext/nkf/nkf-utf8/nkf.c               status_disable(ptr);
status_disable   1589 ext/nkf/nkf-utf8/nkf.c               status_disable(ptr);
status_disable   1604 ext/nkf/nkf-utf8/nkf.c           status_disable(ptr);
status_disable   1634 ext/nkf/nkf-utf8/nkf.c               status_disable(ptr);
status_disable   1643 ext/nkf/nkf-utf8/nkf.c               status_disable(ptr);
status_disable   1652 ext/nkf/nkf-utf8/nkf.c               status_disable(ptr);
status_disable   1673 ext/nkf/nkf-utf8/nkf.c                   status_disable(ptr);
status_disable   1680 ext/nkf/nkf-utf8/nkf.c               status_disable(ptr);
status_disable   1686 ext/nkf/nkf-utf8/nkf.c               status_disable(ptr);
status_disable   1700 ext/nkf/nkf-utf8/nkf.c               status_disable(ptr);
status_disable   1729 ext/nkf/nkf-utf8/nkf.c               status_disable(ptr);
status_disable   1747 ext/nkf/nkf-utf8/nkf.c               status_disable(ptr);


status_push_ch

status_push_ch   1560 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, SSO);
status_push_ch   1561 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1566 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1571 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1576 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1584 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1595 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1627 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1631 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1639 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1650 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1670 ext/nkf/nkf-utf8/nkf.c                   status_push_ch(ptr, c);
status_push_ch   1678 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1689 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1697 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1724 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1727 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);
status_push_ch   1735 ext/nkf/nkf-utf8/nkf.c               status_push_ch(ptr, c);


status_reinit

status_reinit    1930 ext/nkf/nkf-utf8/nkf.c             status_reinit(p++);
status_reinit    4729 ext/nkf/nkf-utf8/nkf.c             status_reinit(p++);


status_reset

status_reset     1531 ext/nkf/nkf-utf8/nkf.c     status_reset(ptr);
status_reset     1540 ext/nkf/nkf-utf8/nkf.c         status_reset(ptr);
status_reset     1781 ext/nkf/nkf-utf8/nkf.c                 status_reset(ptr);


std_getc

std_getc          333 ext/nkf/nkf-utf8/nkf.c STATIC  int     std_getc PROTO((FILE *f));
std_getc          414 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_nfc_getc)PROTO((FILE *)) = std_getc; /* input of ugetc */
std_getc          422 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_cgetc)PROTO((FILE *)) = std_getc; /* input of cgetc */
std_getc          428 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_ugetc)PROTO((FILE *)) = std_getc; /* input of ugetc */
std_getc          438 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_ngetc)PROTO((FILE *)) = std_getc; /* input of ugetc */
std_getc          560 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_getc)PROTO((FILE *f)) = std_getc; /* general input */
std_getc          563 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_bgetc)PROTO((FILE *)) = std_getc; /* input of mgetc */
std_getc          568 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_mgetc)PROTO((FILE *)) = std_getc; /* input of mgetc */
std_getc          572 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_mgetc_buf)PROTO((FILE *)) = std_getc; /* input of mgetc_buf */
std_getc         1878 ext/nkf/nkf-utf8/nkf.c     i_getc = std_getc;
std_getc         4812 ext/nkf/nkf-utf8/nkf.c     i_getc = std_getc;
std_getc         4814 ext/nkf/nkf-utf8/nkf.c     i_bgetc = std_getc;
std_getc         4817 ext/nkf/nkf-utf8/nkf.c     i_mgetc = std_getc;
std_getc         4819 ext/nkf/nkf-utf8/nkf.c     i_mgetc_buf = std_getc;


std_putc

std_putc          332 ext/nkf/nkf-utf8/nkf.c STATIC  void    std_putc PROTO((int c));
std_putc          558 ext/nkf/nkf-utf8/nkf.c STATIC  void   (*o_putc)PROTO((int c)) = std_putc;
std_putc          566 ext/nkf/nkf-utf8/nkf.c STATIC  void   (*o_mputc)PROTO((int c)) = std_putc ; /* output of mputc */
std_putc         1839 ext/nkf/nkf-utf8/nkf.c     o_putc = std_putc;
std_putc         4811 ext/nkf/nkf-utf8/nkf.c     o_putc = std_putc;
std_putc         4816 ext/nkf/nkf-utf8/nkf.c     o_mputc = std_putc;


std_ungetc

std_ungetc        334 ext/nkf/nkf-utf8/nkf.c STATIC  int     std_ungetc PROTO((int c,FILE *f));
std_ungetc        415 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_nfc_ungetc)PROTO((int c ,FILE *f)) = std_ungetc;
std_ungetc        423 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_cungetc)PROTO((int c ,FILE *f)) = std_ungetc;
std_ungetc        429 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_uungetc)PROTO((int c ,FILE *f)) = std_ungetc;
std_ungetc        439 ext/nkf/nkf-utf8/nkf.c STATIC int (*i_nungetc)PROTO((int c ,FILE *f)) = std_ungetc;
std_ungetc        561 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_ungetc)PROTO((int c,FILE *f)) =std_ungetc;
std_ungetc        564 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_bungetc)PROTO((int c ,FILE *f)) = std_ungetc;
std_ungetc        569 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_mungetc)PROTO((int c ,FILE *f)) = std_ungetc;
std_ungetc        573 ext/nkf/nkf-utf8/nkf.c STATIC  int    (*i_mungetc_buf)PROTO((int c,FILE *f)) = std_ungetc;
std_ungetc       1879 ext/nkf/nkf-utf8/nkf.c     i_ungetc = std_ungetc;
std_ungetc       4813 ext/nkf/nkf-utf8/nkf.c     i_ungetc = std_ungetc;
std_ungetc       4815 ext/nkf/nkf-utf8/nkf.c     i_bungetc = std_ungetc;
std_ungetc       4818 ext/nkf/nkf-utf8/nkf.c     i_mungetc  = std_ungetc;
std_ungetc       4820 ext/nkf/nkf-utf8/nkf.c     i_mungetc_buf = std_ungetc;


stdout_setter

stdout_setter    3830 io.c               stdout_setter(val, id, variable);
stdout_setter    3837 io.c               stdout_setter(val, id, variable);
stdout_setter    5563 io.c               rb_define_hooked_variable("$stdout", &rb_stdout, 0, stdout_setter);
stdout_setter    5565 io.c               rb_define_hooked_variable("$stderr", &rb_stderr, 0, stdout_setter);
stdout_setter    5567 io.c               rb_define_hooked_variable("$>", &rb_stdout, 0, stdout_setter);


step_i

step_i            318 range.c        	    rb_iterate(str_step, (VALUE)args, step_i, (VALUE)iter);
step_i            338 range.c        	    range_each_func(range, step_i, b, e, args);
step_i            398 range.c        	rb_iterate(str_step, (VALUE)args, step_i, (VALUE)iter);


strEQ

strEQ             189 util.c                 if (strEQ(ext, suffix)) goto fallback;
strEQ             211 util.c         	(void)memcpy(p, strEQ(ext, suffix1) ? suffix2 : suffix1, 5);


str_alloc

str_alloc          80 string.c           str = str_alloc(klass);
str_alloc         127 string.c           VALUE str2 = str_alloc(klass);
str_alloc         147 string.c           VALUE str2 = str_alloc(klass);
str_alloc         201 string.c           VALUE str = str_alloc(rb_cString);
str_alloc         278 string.c           VALUE dup = str_alloc(rb_obj_class(str));
str_alloc        2318 string.c       	VALUE dup = str_alloc(rb_cString);
str_alloc        4189 string.c           rb_define_alloc_func(rb_cString, str_alloc);


str_copy

str_copy         5549 parse.y        	str_copy(name, beg, n);
str_copy         5554 parse.y        		str_copy(val, vbeg, vend - vbeg);


str_frozen_check

str_frozen_check 1847 string.c       	    str_frozen_check(str);
str_frozen_check 1962 string.c       	    if (bang) str_frozen_check(str);


str_gsub

str_gsub         2050 string.c           return str_gsub(argc, argv, str, 1);
str_gsub         2088 string.c           return str_gsub(argc, argv, str, 0);


str_independent

str_independent   449 string.c           if (!str_independent(str))
str_independent  2017 string.c       	if (str_independent(str)) {
str_independent  2110 string.c       	if (str_independent(str)) {
str_independent  2147 string.c           if (str_independent(str)) {


str_isnumber

str_isnumber      147 ext/socket/getaddrinfo.c static int str_isnumber __P((const char *));
str_isnumber      377 ext/socket/getaddrinfo.c 		if (str_isnumber(servname)) {
str_isnumber      806 ext/socket/socket.c     if (socktype == 0 && flags == 0 && str_isnumber(portp)) {


str_lower_case_match

str_lower_case_match 2658 regexec.c          if (str_lower_case_match(enc, ambig_flag, target, target_end, s, text_end))
str_lower_case_match 2715 regexec.c          if (str_lower_case_match(enc, ambig_flag,


str_make_independent

str_make_independent  450 string.c       	str_make_independent(str);
str_make_independent  462 string.c       	    str_make_independent(str);


str_mod_check

str_mod_check    1846 string.c       	    str_mod_check(str, p, len);
str_mod_check    1961 string.c       	    str_mod_check(str, sp, slen);
str_mod_check    3422 string.c       	    str_mod_check(str, ptr, len);
str_mod_check    4007 string.c       	    str_mod_check(str, ptr, len);
str_mod_check    4024 string.c       	    str_mod_check(str, ptr, len);


str_new

str_new            94 string.c           return str_new(rb_cString, ptr, len);
str_new           180 string.c       	str = str_new(klass, RSTRING(orig)->ptr, RSTRING(orig)->len);
str_new           193 string.c           return str_new(rb_obj_class(obj), ptr, len);
str_new          1947 string.c           dest = str_new(0, 0, blen);


str_new3

str_new3          141 string.c           return str_new3(rb_obj_class(str), str);
str_new3          174 string.c       	    str = str_new3(klass, str);


str_step

str_step          318 range.c        	    rb_iterate(str_step, (VALUE)args, step_i, (VALUE)iter);
str_step          398 range.c        	rb_iterate(str_step, (VALUE)args, step_i, (VALUE)iter);


str_to_id

str_to_id        1509 object.c       	return str_to_id(name);
str_to_id        1523 object.c       	    return str_to_id(tmp);


strcasecmp

strcasecmp       2915 ext/win32ole/win32ole.c         if (strcasecmp(StringValuePtr(name), StringValuePtr(fname)) == 0) {
strcasecmp       1549 hash.c         	if (strcasecmp(nam, PATH_ENV) == 0)
strcasecmp       1585 hash.c         	if (strcasecmp(nam, PATH_ENV) == 0 && !rb_env_path_tainted())
strcasecmp       1627 hash.c             if (strcasecmp(nam, PATH_ENV) == 0 && !rb_env_path_tainted())
strcasecmp       1777 hash.c             if (strcasecmp(name, PATH_ENV) == 0) {
strcasecmp         96 missing.h      extern int strcasecmp(const char *, const char *);
strcasecmp        943 process.c      	if ((extension = strrchr(prog, '.')) != NULL && strcasecmp(extension, ".bat") == 0) {
strcasecmp       1083 process.c          if ((extension = strrchr(prog, '.')) != NULL && strcasecmp(extension, ".bat") == 0) {
strcasecmp        289 ruby.c         	if (p-libpath > 3 && !strcasecmp(p-4, "/bin")) {
strcasecmp        870 ruby.c         	    if (ext && strcasecmp(ext, ".exe") == 0)
strcasecmp        329 time.c         		    strcasecmp(months[i], RSTRING(v[1])->ptr) == 0) {
strcasecmp        568 win32/win32.c  	strcasecmp(interp+i, "command.com") == 0) {


strchr

strchr             59 dir.c          char *strchr(char*,char);
strchr           1684 dln.c              RETURN_IF(exe_flag && strchr(fname, '/'));
strchr           1691 dln.c              RETURN_IF(exe_flag && strchr(fname, '\\'));
strchr           1702 dln.c          	ep = strchr(dp, PATH_SEP[0]);
strchr           6823 eval.c             if (ext && !strchr(ext, '/')) {
strchr            243 ext/socket/getnameinfo.c 				p = strchr(hp->h_name, '.');
strchr           1453 ext/tk/tkutil/tkutil.c           ptr = strchr(inf->key, *(RSTRING(arg_key)->ptr + idx));
strchr           3230 file.c             if (strchr("bcdefgGkloOprRsSuwWxXz", cmd)) {
strchr           3302 file.c             if (strchr("MAC", cmd)) {
strchr           3325 file.c             if (strchr("=<>", cmd)) {
strchr           4059 file.c             p = strchr(path, sep);
strchr           4068 file.c         	p = strchr(p0, sep);
strchr           4079 file.c             if (strchr(path, ':')) return 1;
strchr           1803 hash.c         	char *s = strchr(*env, '=');
strchr           1838 hash.c         	char *s = strchr(*env, '=');
strchr           1874 hash.c         	char *s = strchr(*env, '=');
strchr           1963 hash.c         	char *s = strchr(*env, '=');
strchr           2011 hash.c         	char *s = strchr(*env, '=');
strchr           2042 hash.c         	char *s = strchr(*env, '=');
strchr           2110 hash.c         	char *s = strchr(*env, '=');
strchr           2134 hash.c         	char *s = strchr(*env, '=');
strchr           2166 hash.c         	char *s = strchr(*env, '=');
strchr           2191 hash.c         	char *s = strchr(*env, '=');
strchr            104 missing.h      extern char *strchr(const char *, int);
strchr            229 missing/strftime.c 	if (strchr(format, '%') == NULL && strlen(format) + 1 >= maxsize)
strchr            494 numeric.c          if (!(e = strchr(buf, 'e'))) {
strchr            499 numeric.c      	if (!(e = strchr(buf, 'e'))) {
strchr           1475 numeric.c      	    if (s = strchr(buf, ' ')) *s = '\0';
strchr           1621 numeric.c      	    if (s = strchr(buf, ' ')) *s = '\0';
strchr            482 pack.c         	    if (strchr(natstr, type)) {
strchr            493 pack.c         	    len = strchr("@Xxu", type) ? 0 : items;
strchr           1327 pack.c         	    if (strchr(natstr, type)) {
strchr           1014 process.c      	if (*s != ' ' && !ISALPHA(*s) && strchr("*?{}[]<>()~&|\\$;'`\"\n",*s)) {
strchr           1142 process.c      	if (*s != ' ' && !ISALPHA(*s) && strchr("*?{}[]<>()~&|\\$;'`\"\n",*s)) {
strchr            184 ruby.c             if (strchr(path, sep)) {
strchr            191 ruby.c         	    if ((s = strchr(p, sep)) != 0) {
strchr            421 ruby.c         		    if (!(p = strchr(p, '='))) {
strchr            769 ruby.c         		if (!strchr("IdvwrK", *s))
strchr             47 util.c             while (len-- && *s && (tmp = strchr(hexdigit, *s))) {
strchr             38 win32/win32.c  #define index(x, y) strchr((x), (y))
strchr            938 win32/win32.c  		if (strchr(".:*?\"/\\", *prog)) {
strchr            947 win32/win32.c  		if (ISSPACE(*prog) || strchr("<>|", *prog)) {


strdup

strdup            408 dir.c              dp->path = strdup(RSTRING(dirname)->ptr);
strdup            517 dln.c              obj->name = strdup(name);
strdup            631 dln.c          	undef->name = strdup(data->name1);
strdup            690 dln.c          		st_insert(undef_tbl, strdup(sym[1].n_un.n_name), NULL);
strdup            729 dln.c          		    st_insert(undef_tbl, strdup(sym->n_un.n_name), NULL);
strdup            766 dln.c          	    new_sym->n_un.n_name = strdup(sym->n_un.n_name);
strdup             64 ext/dl/cfunc.c     data->name = name ? strdup(name) : NULL;
strdup            126 ext/dl/cfunc.c     data->name = sname ? strdup(sname) : 0;
strdup            429 ext/pty/pty.c      rfptr->path = strdup(SlaveName);
strdup            433 ext/pty/pty.c      wfptr->path = strdup(SlaveName);
strdup            192 ext/readline/readline.c         result[0] = strdup(result[1]);
strdup           1511 ext/socket/socket.c     fptr->path = strdup(RSTRING(path)->ptr);
strdup           1710 ext/socket/socket.c 	fptr->path = strdup(addr.sun_path);
strdup             73 ext/syslog/syslog.c     syslog_ident = strdup(RSTRING(ident)->ptr);
strdup            131 ext/tk/tcltklib.c     char *buf = strdup(cmd);
strdup            145 ext/tk/tcltklib.c     char *buf = strdup(cmd);
strdup           6552 ext/tk/tcltklib.c             unknown_argv[0] = strdup("unknown");
strdup           6716 ext/tk/tcltklib.c         av[i] = strdup(StringValuePtr(argv[i]));
strdup           2287 file.c         	drvcwd = strdup(drive);
strdup           1712 hash.c         	    tmpenv[j] = strdup(environ[j]);
strdup           2653 io.c               fptr->path = strdup(fname);
strdup           2673 io.c               fptr->path = strdup(fname);
strdup           3309 io.c               if (orig->path) fptr->path = strdup(orig->path);
strdup           3411 io.c               fptr->path = strdup(RSTRING(fname)->ptr);
strdup           3457 io.c               if (orig->path) fptr->path = strdup(orig->path);
strdup           3857 io.c               if (path) fp->path = strdup(path);
strdup           5344 io.c               ruby_inplace_mode = strdup(RSTRING(val)->ptr);
strdup           8479 parse.y            name = strdup(name);
strdup            609 ruby.c         	    ruby_inplace_mode = strdup(s+1);
strdup           1135 win32/win32.c      ptr = cmdline = strdup(cmd);
strdup            112 wince/wince.h  char *strdup(const char * str);


strdup_with_null

strdup_with_null  724 regparse.c         e->name = strdup_with_null(reg->enc, name, name_end);
strdup_with_null  772 regparse.c         e->name = strdup_with_null(reg->enc, name, name_end);


strend_cmp

strend_cmp        313 regparse.c     static int strend_cmp(st_strend_key*, st_strend_key*);
strend_cmp        317 regparse.c       strend_cmp,


strend_hash

strend_hash       314 regparse.c     static int strend_hash(st_strend_key*);
strend_hash       318 regparse.c       strend_hash,


strerror

strerror         1165 dln.c              char *strerror();
strerror         1181 dln.c          	return strerror(dln_errno);
strerror         1243 dln.c          	ERRBUF_APPEND(strerror(errno));
strerror         1359 dln.c          	    rb_loaderror("%s - %s", strerror(errno), file);
strerror         1366 dln.c          		rb_loaderror("%s - %s", strerror(ENOSYM), file);
strerror         1506 dln.c          	rb_loaderror(errmsg, strerror(err_stat), buf);
strerror          829 error.c            char *strerror();
strerror          852 error.c            if (!NIL_P(error)) err = strerror(NUM2LONG(error));
strerror         1072 error.c             snprintf(buf+strlen(buf), BUFSIZ-strlen(buf), ": %s", strerror(errno_save));
strerror         1083 error.c            rb_loaderror("%s -- %s", strerror(errno), path);
strerror           72 ext/openssl/ossl_pkey.c 	ossl_raise(ePKeyError, "%s", strerror(errno));
strerror           67 ext/openssl/ossl_x509cert.c 	ossl_raise(eX509CertError, "%s", strerror(errno));
strerror         4143 io.c           				    fn, RSTRING(str)->ptr, strerror(errno));
strerror         4155 io.c           				    fn, strerror(errno));
strerror          109 missing.h      extern char *strerror(int);
strerror         1770 win32/win32.c  	strncpy(buffer, strerror(e), sizeof(buffer));


strftime

strftime          113 missing.h      extern size_t strftime(char *, size_t, const char *, const struct tm *);
strftime          315 missing/strftime.c 			strftime(tbuf, sizeof tbuf, "%a %b %e %H:%M:%S %Y", timeptr);
strftime          378 missing/strftime.c 			strftime(tbuf, sizeof tbuf, "%m/%d/%y", timeptr);
strftime          382 missing/strftime.c 			strftime(tbuf, sizeof tbuf, "%H:%M:%S", timeptr);
strftime          487 missing/strftime.c 			strftime(tbuf, sizeof tbuf, "%m/%d/%y", timeptr);
strftime          495 missing/strftime.c 			strftime(tbuf, sizeof tbuf, "%I:%M:%S %p", timeptr);
strftime          499 missing/strftime.c 			strftime(tbuf, sizeof tbuf, "%H:%M", timeptr);
strftime          503 missing/strftime.c 			strftime(tbuf, sizeof tbuf, "%H:%M:%S", timeptr);
strftime          901 missing/strftime.c 		length = strftime(string, MAXTIME, next, tm);
strftime         1196 time.c         	len = strftime(buf, 128, "%a %b %d %H:%M:%S UTC %Y", &tobj->tm);
strftime         1199 time.c         	len = strftime(buf, 128, "%a %b %d %H:%M:%S %Z %Y", &tobj->tm);
strftime         1676 time.c             len = strftime(buf, 64, "%Z", &tobj->tm);
strftime         1787 time.c             len = strftime(*buf, SMALLBUF, format, time);
strftime         1792 time.c         	len = strftime(*buf, size, format, time);


strhash

strhash            48 st.c           static int strhash(const char *);
strhash            51 st.c               strhash,


stricmp

stricmp           150 win32/win32.h  #define strcasecmp(s1, s2)	stricmp(s1, s2)
stricmp           170 wince/wince.h    int stricmp( const char *p1, const char *p2 );


string2hex

string2hex        106 ext/openssl/ossl.h int string2hex(char *, int, char **, int *);
string2hex        185 ext/openssl/ossl_digest.c     if (string2hex(buf, buf_len, &hexbuf, NULL) != 2 * buf_len) {
string2hex        144 ext/openssl/ossl_hmac.c     if (string2hex(buf, buf_len, &hexbuf, NULL) != 2 * buf_len) {
string2hex        180 ext/openssl/ossl_hmac.c     if (string2hex(buf, buf_len, &hexbuf, NULL) != 2 * buf_len) {


string_cmp_ic

string_cmp_ic     892 regexec.c        if (string_cmp_ic(encode, ambig_flag, s1, ps2, len) == 0) \
string_cmp_ic     934 regexec.c        if (string_cmp_ic(encode, ambig_flag, s1, ps2, len) == 0) \


strio_0

strio_0           142 ext/stringio/stringio.c static VALUE strio_0 _((VALUE));
strio_0           551 ext/stringio/stringio.c #define strio_fsync strio_0


strio_alloc

strio_alloc        31 ext/stringio/stringio.c static struct StringIO* strio_alloc _((void));
strio_alloc       222 ext/stringio/stringio.c 	DATA_PTR(self) = ptr = strio_alloc();


strio_close

strio_close       147 ext/stringio/stringio.c static VALUE strio_close _((VALUE));
strio_close      1245 ext/stringio/stringio.c     rb_define_method(StringIO, "close", strio_close, 0);


strio_close_read

strio_close_read  148 ext/stringio/stringio.c static VALUE strio_close_read _((VALUE));
strio_close_read 1246 ext/stringio/stringio.c     rb_define_method(StringIO, "close_read", strio_close_read, 0);


strio_close_write

strio_close_write  149 ext/stringio/stringio.c static VALUE strio_close_write _((VALUE));
strio_close_write 1247 ext/stringio/stringio.c     rb_define_method(StringIO, "close_write", strio_close_write, 0);


strio_closed

strio_closed      150 ext/stringio/stringio.c static VALUE strio_closed _((VALUE));
strio_closed     1248 ext/stringio/stringio.c     rb_define_method(StringIO, "closed?", strio_closed, 0);


strio_closed_read

strio_closed_read  151 ext/stringio/stringio.c static VALUE strio_closed_read _((VALUE));
strio_closed_read 1249 ext/stringio/stringio.c     rb_define_method(StringIO, "closed_read?", strio_closed_read, 0);


strio_closed_write

strio_closed_write  152 ext/stringio/stringio.c static VALUE strio_closed_write _((VALUE));
strio_closed_write 1250 ext/stringio/stringio.c     rb_define_method(StringIO, "closed_write?", strio_closed_write, 0);


strio_copy

strio_copy        569 ext/stringio/stringio.c 	return strio_copy(self, *argv);
strio_copy       1236 ext/stringio/stringio.c     rb_define_method(StringIO, "initialize_copy", strio_copy, 1);


strio_each

strio_each        168 ext/stringio/stringio.c static VALUE strio_each _((int, VALUE *, VALUE));
strio_each       1265 ext/stringio/stringio.c     rb_define_method(StringIO, "each", strio_each, -1);
strio_each       1267 ext/stringio/stringio.c     rb_define_method(StringIO, "each_line", strio_each, -1);


strio_each_byte

strio_each_byte   161 ext/stringio/stringio.c static VALUE strio_each_byte _((VALUE));
strio_each_byte  1266 ext/stringio/stringio.c     rb_define_method(StringIO, "each_byte", strio_each_byte, 0);


strio_eof

strio_eof         153 ext/stringio/stringio.c static VALUE strio_eof _((VALUE));
strio_eof        1251 ext/stringio/stringio.c     rb_define_method(StringIO, "eof", strio_eof, 0);
strio_eof        1252 ext/stringio/stringio.c     rb_define_method(StringIO, "eof?", strio_eof, 0);


strio_extend

strio_extend      760 ext/stringio/stringio.c 	    strio_extend(ptr, pos, 1);
strio_extend     1006 ext/stringio/stringio.c 	strio_extend(ptr, ptr->pos, len);
strio_extend     1058 ext/stringio/stringio.c     strio_extend(ptr, ptr->pos, 1);


strio_false

strio_false       140 ext/stringio/stringio.c static VALUE strio_false _((VALUE));
strio_false      1175 ext/stringio/stringio.c #define strio_isatty strio_false


strio_finalize

strio_finalize    138 ext/stringio/stringio.c static VALUE strio_finalize _((VALUE));
strio_finalize    203 ext/stringio/stringio.c     return rb_ensure(rb_yield, obj, strio_finalize, obj);


strio_first

strio_first       143 ext/stringio/stringio.c static VALUE strio_first _((VALUE, VALUE));
strio_first       678 ext/stringio/stringio.c #define strio_set_sync strio_first


strio_free

strio_free         33 ext/stringio/stringio.c static void strio_free _((struct StringIO *));
strio_free        185 ext/stringio/stringio.c     return Data_Wrap_Struct(klass, strio_mark, strio_free, 0);
strio_free        501 ext/stringio/stringio.c 	strio_free(DATA_PTR(copy));


strio_get_lineno

strio_get_lineno  154 ext/stringio/stringio.c static VALUE strio_get_lineno _((VALUE));
strio_get_lineno 1241 ext/stringio/stringio.c     rb_define_method(StringIO, "lineno", strio_get_lineno, 0);


strio_get_pos

strio_get_pos     156 ext/stringio/stringio.c static VALUE strio_get_pos _((VALUE));
strio_get_pos     680 ext/stringio/stringio.c #define strio_tell strio_get_pos
strio_get_pos    1256 ext/stringio/stringio.c     rb_define_method(StringIO, "pos", strio_get_pos, 0);


strio_get_string

strio_get_string  145 ext/stringio/stringio.c static VALUE strio_get_string _((VALUE));
strio_get_string 1239 ext/stringio/stringio.c     rb_define_method(StringIO, "string", strio_get_string, 0);


strio_get_sync

strio_get_sync    160 ext/stringio/stringio.c static VALUE strio_get_sync _((VALUE));
strio_get_sync   1260 ext/stringio/stringio.c     rb_define_method(StringIO, "sync", strio_get_sync, 0);


strio_getc

strio_getc        162 ext/stringio/stringio.c static VALUE strio_getc _((VALUE));
strio_getc        779 ext/stringio/stringio.c     VALUE c = strio_getc(self);
strio_getc       1268 ext/stringio/stringio.c     rb_define_method(StringIO, "getc", strio_getc, 0);


strio_getline

strio_getline     165 ext/stringio/stringio.c static VALUE strio_getline _((int, VALUE *, struct StringIO *));
strio_getline     911 ext/stringio/stringio.c     VALUE str = strio_getline(argc, argv, readable(StringIO(self)));
strio_getline     929 ext/stringio/stringio.c     VALUE line = strio_getline(argc, argv, readable(StringIO(self)));
strio_getline     950 ext/stringio/stringio.c     while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) {
strio_getline     970 ext/stringio/stringio.c     while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) {


strio_gets

strio_gets        166 ext/stringio/stringio.c static VALUE strio_gets _((int, VALUE *, VALUE));
strio_gets       1271 ext/stringio/stringio.c     rb_define_method(StringIO, "gets", strio_gets, -1);


strio_initialize

strio_initialize  137 ext/stringio/stringio.c static VALUE strio_initialize _((int, VALUE *, VALUE));
strio_initialize  571 ext/stringio/stringio.c     return strio_initialize(argc, argv, self);
strio_initialize 1235 ext/stringio/stringio.c     rb_define_method(StringIO, "initialize", strio_initialize, -1);


strio_isatty

strio_isatty     1286 ext/stringio/stringio.c     rb_define_method(StringIO, "isatty", strio_isatty, 0);
strio_isatty     1287 ext/stringio/stringio.c     rb_define_method(StringIO, "tty?", strio_isatty, 0);


strio_mark

strio_mark         32 ext/stringio/stringio.c static void strio_mark _((struct StringIO *));
strio_mark         40 ext/stringio/stringio.c #define IS_STRIO(obj) (RDATA(obj)->dmark == (RUBY_DATA_FUNC)strio_mark)
strio_mark        185 ext/stringio/stringio.c     return Data_Wrap_Struct(klass, strio_mark, strio_free, 0);


strio_nil

strio_nil         141 ext/stringio/stringio.c static VALUE strio_nil _((VALUE));
strio_nil        1167 ext/stringio/stringio.c #define strio_path strio_nil
strio_nil        1178 ext/stringio/stringio.c #define strio_pid strio_nil
strio_nil        1181 ext/stringio/stringio.c #define strio_fileno strio_nil


strio_putc

strio_putc        171 ext/stringio/stringio.c static VALUE strio_putc _((VALUE, VALUE));
strio_putc       1282 ext/stringio/stringio.c     rb_define_method(StringIO, "putc", strio_putc, 1);


strio_read

strio_read        172 ext/stringio/stringio.c static VALUE strio_read _((int, VALUE *, VALUE));
strio_read       1157 ext/stringio/stringio.c     VALUE val = strio_read(argc, argv, self);
strio_read       1274 ext/stringio/stringio.c     rb_define_method(StringIO, "read", strio_read, -1);


strio_readchar

strio_readchar    164 ext/stringio/stringio.c static VALUE strio_readchar _((VALUE));
strio_readchar   1270 ext/stringio/stringio.c     rb_define_method(StringIO, "readchar", strio_readchar, 0);


strio_readline

strio_readline    167 ext/stringio/stringio.c static VALUE strio_readline _((int, VALUE *, VALUE));
strio_readline   1272 ext/stringio/stringio.c     rb_define_method(StringIO, "readline", strio_readline, -1);


strio_readlines

strio_readlines   169 ext/stringio/stringio.c static VALUE strio_readlines _((int, VALUE *, VALUE));
strio_readlines  1273 ext/stringio/stringio.c     rb_define_method(StringIO, "readlines", strio_readlines, -1);


strio_rewind

strio_rewind      158 ext/stringio/stringio.c static VALUE strio_rewind _((VALUE));
strio_rewind     1258 ext/stringio/stringio.c     rb_define_method(StringIO, "rewind", strio_rewind, 0);


strio_s_allocate

strio_s_allocate  135 ext/stringio/stringio.c static VALUE strio_s_allocate _((VALUE));
strio_s_allocate 1233 ext/stringio/stringio.c     rb_define_alloc_func(StringIO, strio_s_allocate);


strio_s_open

strio_s_open      136 ext/stringio/stringio.c static VALUE strio_s_open _((int, VALUE *, VALUE));
strio_s_open     1234 ext/stringio/stringio.c     rb_define_singleton_method(StringIO, "open", strio_s_open, -1);


strio_seek

strio_seek        159 ext/stringio/stringio.c static VALUE strio_seek _((int, VALUE *, VALUE));
strio_seek       1259 ext/stringio/stringio.c     rb_define_method(StringIO, "seek", strio_seek, -1);


strio_self

strio_self        139 ext/stringio/stringio.c static VALUE strio_self _((VALUE));
strio_self        542 ext/stringio/stringio.c #define strio_binmode strio_self
strio_self        548 ext/stringio/stringio.c #define strio_flush strio_self


strio_set_lineno

strio_set_lineno  155 ext/stringio/stringio.c static VALUE strio_set_lineno _((VALUE, VALUE));
strio_set_lineno 1242 ext/stringio/stringio.c     rb_define_method(StringIO, "lineno=", strio_set_lineno, 1);


strio_set_pos

strio_set_pos     157 ext/stringio/stringio.c static VALUE strio_set_pos _((VALUE, VALUE));
strio_set_pos    1257 ext/stringio/stringio.c     rb_define_method(StringIO, "pos=", strio_set_pos, 1);


strio_set_string

strio_set_string  146 ext/stringio/stringio.c static VALUE strio_set_string _((VALUE, VALUE));
strio_set_string 1240 ext/stringio/stringio.c     rb_define_method(StringIO, "string=", strio_set_string, 1);


strio_size

strio_size        173 ext/stringio/stringio.c static VALUE strio_size _((VALUE));
strio_size       1290 ext/stringio/stringio.c     rb_define_method(StringIO, "size", strio_size, 0);
strio_size       1291 ext/stringio/stringio.c     rb_define_method(StringIO, "length", strio_size, 0);


strio_sysread

strio_sysread    1275 ext/stringio/stringio.c     rb_define_method(StringIO, "sysread", strio_sysread, -1);
strio_sysread    1276 ext/stringio/stringio.c     rb_define_method(StringIO, "readpartial", strio_sysread, -1);


strio_truncate

strio_truncate    174 ext/stringio/stringio.c static VALUE strio_truncate _((VALUE, VALUE));
strio_truncate   1292 ext/stringio/stringio.c     rb_define_method(StringIO, "truncate", strio_truncate, 1);


strio_ungetc

strio_ungetc      163 ext/stringio/stringio.c static VALUE strio_ungetc _((VALUE, VALUE));
strio_ungetc     1269 ext/stringio/stringio.c     rb_define_method(StringIO, "ungetc", strio_ungetc, 1);


strio_unimpl

strio_unimpl      144 ext/stringio/stringio.c static VALUE strio_unimpl _((int, VALUE *, VALUE));
strio_unimpl      545 ext/stringio/stringio.c #define strio_fcntl strio_unimpl


strio_write

strio_write       170 ext/stringio/stringio.c static VALUE strio_write _((VALUE, VALUE));
strio_write      1164 ext/stringio/stringio.c #define strio_syswrite strio_write
strio_write      1278 ext/stringio/stringio.c     rb_define_method(StringIO, "write", strio_write, 1);


strncasecmp

strncasecmp      1660 hash.c         	    strncasecmp(env[i],nam,len) == 0
strncasecmp       100 missing.h      extern int strncasecmp(const char *, const char *, size_t);
strncasecmp       151 ruby.c             if (!newp || l < oldl || strncasecmp(oldp, s, oldl) != 0) {


strnicmp

strnicmp          151 win32/win32.h  #define strncasecmp(s1, s2, n)	strnicmp(s1, s2, n)
strnicmp          114 wince/wince.h  int strnicmp( const char *s1, const char *s2, size_t count );
strnicmp          207 wince/winsock2.c 		if( 0==strnicmp(_proto_table[i].name, name, len) )
strnicmp          249 wince/winsock2.c 	if( 0!=strnicmp( proto, "tcp", 3 ) &&
strnicmp          250 wince/winsock2.c 		0!=strnicmp( proto, "udp", 3 ) )
strnicmp          255 wince/winsock2.c 		if( 0==strnicmp( name, _serv_table[i].servname, slen ) &&
strnicmp          256 wince/winsock2.c 			0==strnicmp( proto, _serv_table[i].protoname, plen ) )
strnicmp          287 wince/winsock2.c 	if( 0!=strnicmp( proto, "tcp", 3 ) &&
strnicmp          288 wince/winsock2.c 		0!=strnicmp( proto, "udp", 3 ) )
strnicmp          294 wince/winsock2.c 			0==strnicmp( proto, _serv_table[i].protoname, plen ) )


strpbrk

strpbrk           645 win32/win32.c  	if (!*p || strpbrk(p, " \t\"")) {
strpbrk          1775 win32/win32.c      while ((p = strpbrk(p, "\r\n")) != NULL) {


strrchr

strrchr          1570 dln.c          	if (p1 = strrchr(fname,'/'))
strrchr          1572 dln.c          	if (p2 = strrchr(fname,'.'))
strrchr          6822 eval.c             ext = strrchr(ftptr = RSTRING(fname)->ptr, '.');
strrchr          6828 eval.c         		ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
strrchr          6842 eval.c         		ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
strrchr          6852 eval.c         		ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
strrchr          6863 eval.c         		ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
strrchr          6885 eval.c         	ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
strrchr          2643 file.c         	e = strrchr(p, *e);
strrchr          2805 file.c             e = strrchr(p, '.');	/* get the last dot of the last component */
strrchr           105 missing.h      extern char *strrchr(const char *, int);
strrchr           943 process.c      	if ((extension = strrchr(prog, '.')) != NULL && strcasecmp(extension, ".bat") == 0) {
strrchr          1083 process.c          if ((extension = strrchr(prog, '.')) != NULL && strcasecmp(extension, ".bat") == 0) {
strrchr           286 ruby.c             p = strrchr(libpath, '/');
strrchr           869 ruby.c         	    char *ext = strrchr(fname, '.');
strrchr           169 wince/wince.h    char *strrchr( const char *p, int c );


strrdirsep

strrdirsep       2543 file.c         			if (!(b = strrdirsep(root))) {
strrdirsep       2711 file.c             else if (!(p = strrdirsep(name))) {
strrdirsep       2756 file.c             p = strrdirsep(root);
strrdirsep       2799 file.c             p = strrdirsep(name);	/* get the last path component */
strrdirsep       4029 file.c         	s = strrdirsep(p0);


strscan_aref

strscan_aref      107 ext/strscan/strscan.c static VALUE strscan_aref _((VALUE self, VALUE idx));
strscan_aref     1358 ext/strscan/strscan.c     rb_define_method(StringScanner, "[]",          strscan_aref,        1);


strscan_bol_p

strscan_bol_p     100 ext/strscan/strscan.c static VALUE strscan_bol_p _((VALUE self));
strscan_bol_p    1348 ext/strscan/strscan.c     rb_define_method(StringScanner, "beginning_of_line?", strscan_bol_p, 0);


strscan_check

strscan_check      85 ext/strscan/strscan.c static VALUE strscan_check _((VALUE self, VALUE re));
strscan_check    1331 ext/strscan/strscan.c     rb_define_method(StringScanner, "check",       strscan_check,       1);


strscan_check_until

strscan_check_until   90 ext/strscan/strscan.c static VALUE strscan_check_until _((VALUE self, VALUE re));
strscan_check_until 1337 ext/strscan/strscan.c     rb_define_method(StringScanner, "check_until", strscan_check_until, 1);


strscan_clear

strscan_clear      74 ext/strscan/strscan.c static VALUE strscan_clear _((VALUE self));
strscan_clear    1318 ext/strscan/strscan.c     rb_define_method(StringScanner, "clear",       strscan_clear,       0);


strscan_concat

strscan_concat     77 ext/strscan/strscan.c static VALUE strscan_concat _((VALUE self, VALUE str));
strscan_concat   1321 ext/strscan/strscan.c     rb_define_method(StringScanner, "concat",      strscan_concat,      1);
strscan_concat   1322 ext/strscan/strscan.c     rb_define_method(StringScanner, "<<",          strscan_concat,      1);


strscan_do_scan

strscan_do_scan    80 ext/strscan/strscan.c static VALUE strscan_do_scan _((VALUE self, VALUE regex,
strscan_do_scan   486 ext/strscan/strscan.c     return strscan_do_scan(self, re, 1, 1, 1);
strscan_do_scan   504 ext/strscan/strscan.c     return strscan_do_scan(self, re, 0, 0, 1);
strscan_do_scan   528 ext/strscan/strscan.c     return strscan_do_scan(self, re, 1, 0, 1);
strscan_do_scan   550 ext/strscan/strscan.c     return strscan_do_scan(self, re, 0, 1, 1);
strscan_do_scan   567 ext/strscan/strscan.c     return strscan_do_scan(self, re, RTEST(s), RTEST(f), 1);
strscan_do_scan   586 ext/strscan/strscan.c     return strscan_do_scan(self, re, 1, 1, 0);
strscan_do_scan   606 ext/strscan/strscan.c     return strscan_do_scan(self, re, 0, 0, 0);
strscan_do_scan   629 ext/strscan/strscan.c     return strscan_do_scan(self, re, 1, 0, 0);
strscan_do_scan   649 ext/strscan/strscan.c     return strscan_do_scan(self, re, 0, 1, 0);
strscan_do_scan   665 ext/strscan/strscan.c     return strscan_do_scan(self, re, RTEST(s), RTEST(f), 0);


strscan_empty_p

strscan_empty_p   102 ext/strscan/strscan.c static VALUE strscan_empty_p _((VALUE self));
strscan_empty_p  1351 ext/strscan/strscan.c     rb_define_method(StringScanner, "empty?",      strscan_empty_p,     0);


strscan_eos_p

strscan_eos_p     101 ext/strscan/strscan.c static VALUE strscan_eos_p _((VALUE self));
strscan_eos_p     880 ext/strscan/strscan.c     return strscan_eos_p(self);
strscan_eos_p    1350 ext/strscan/strscan.c     rb_define_method(StringScanner, "eos?",        strscan_eos_p,       0);


strscan_free

strscan_free       67 ext/strscan/strscan.c static void strscan_free _((struct strscanner *p));
strscan_free      182 ext/strscan/strscan.c     return Data_Wrap_Struct(klass, strscan_mark, strscan_free, p);


strscan_get_byte

strscan_get_byte   95 ext/strscan/strscan.c static VALUE strscan_get_byte _((VALUE self));
strscan_get_byte  758 ext/strscan/strscan.c     return strscan_get_byte(self);
strscan_get_byte 1341 ext/strscan/strscan.c     rb_define_method(StringScanner, "get_byte",    strscan_get_byte,    0);


strscan_get_pos

strscan_get_pos    78 ext/strscan/strscan.c static VALUE strscan_get_pos _((VALUE self));
strscan_get_pos  1323 ext/strscan/strscan.c     rb_define_method(StringScanner, "pos",         strscan_get_pos,     0);
strscan_get_pos  1325 ext/strscan/strscan.c     rb_define_method(StringScanner, "pointer",     strscan_get_pos,     0);


strscan_get_string

strscan_get_string   75 ext/strscan/strscan.c static VALUE strscan_get_string _((VALUE self));
strscan_get_string 1319 ext/strscan/strscan.c     rb_define_method(StringScanner, "string",      strscan_get_string,  0);


strscan_getbyte

strscan_getbyte    96 ext/strscan/strscan.c static VALUE strscan_getbyte _((VALUE self));
strscan_getbyte  1342 ext/strscan/strscan.c     rb_define_method(StringScanner, "getbyte",     strscan_getbyte,     0);


strscan_getch

strscan_getch      94 ext/strscan/strscan.c static VALUE strscan_getch _((VALUE self));
strscan_getch    1340 ext/strscan/strscan.c     rb_define_method(StringScanner, "getch",       strscan_getch,       0);


strscan_init_copy

strscan_init_copy   70 ext/strscan/strscan.c static VALUE strscan_init_copy _((VALUE vself, VALUE vorig));
strscan_init_copy 1314 ext/strscan/strscan.c     rb_define_private_method(StringScanner, "initialize_copy", strscan_init_copy, 1);


strscan_initialize

strscan_initialize   69 ext/strscan/strscan.c static VALUE strscan_initialize _((int argc, VALUE *argv, VALUE self));
strscan_initialize 1313 ext/strscan/strscan.c     rb_define_private_method(StringScanner, "initialize", strscan_initialize, -1);


strscan_inspect

strscan_inspect   113 ext/strscan/strscan.c static VALUE strscan_inspect _((VALUE self));
strscan_inspect  1366 ext/strscan/strscan.c     rb_define_method(StringScanner, "inspect",     strscan_inspect,     0);


strscan_mark

strscan_mark       66 ext/strscan/strscan.c static void strscan_mark _((struct strscanner *p));
strscan_mark      182 ext/strscan/strscan.c     return Data_Wrap_Struct(klass, strscan_mark, strscan_free, p);
strscan_mark      212 ext/strscan/strscan.c     if (TYPE(obj) != T_DATA || RDATA(obj)->dmark != (RUBY_DATA_FUNC)strscan_mark) {


strscan_match_p

strscan_match_p    83 ext/strscan/strscan.c static VALUE strscan_match_p _((VALUE self, VALUE re));
strscan_match_p  1330 ext/strscan/strscan.c     rb_define_method(StringScanner, "match?",      strscan_match_p,     1);


strscan_matched

strscan_matched   105 ext/strscan/strscan.c static VALUE strscan_matched _((VALUE self));
strscan_matched  1355 ext/strscan/strscan.c     rb_define_method(StringScanner, "matched",     strscan_matched,     0);


strscan_matched_p

strscan_matched_p  104 ext/strscan/strscan.c static VALUE strscan_matched_p _((VALUE self));
strscan_matched_p 1354 ext/strscan/strscan.c     rb_define_method(StringScanner, "matched?",    strscan_matched_p,   0);


strscan_matched_size

strscan_matched_size  106 ext/strscan/strscan.c static VALUE strscan_matched_size _((VALUE self));
strscan_matched_size  969 ext/strscan/strscan.c     return strscan_matched_size(self);
strscan_matched_size 1356 ext/strscan/strscan.c     rb_define_method(StringScanner, "matched_size", strscan_matched_size, 0);


strscan_peek

strscan_peek       97 ext/strscan/strscan.c static VALUE strscan_peek _((VALUE self, VALUE len));
strscan_peek      799 ext/strscan/strscan.c     return strscan_peek(self, vlen);
strscan_peek     1343 ext/strscan/strscan.c     rb_define_method(StringScanner, "peek",        strscan_peek,        1);


strscan_peep

strscan_peep       98 ext/strscan/strscan.c static VALUE strscan_peep _((VALUE self, VALUE len));
strscan_peep     1344 ext/strscan/strscan.c     rb_define_method(StringScanner, "peep",        strscan_peep,        1);


strscan_post_match

strscan_post_match  109 ext/strscan/strscan.c static VALUE strscan_post_match _((VALUE self));
strscan_post_match 1360 ext/strscan/strscan.c     rb_define_method(StringScanner, "post_match",  strscan_post_match,  0);


strscan_pre_match

strscan_pre_match  108 ext/strscan/strscan.c static VALUE strscan_pre_match _((VALUE self));
strscan_pre_match 1359 ext/strscan/strscan.c     rb_define_method(StringScanner, "pre_match",   strscan_pre_match,   0);


strscan_rest

strscan_rest      110 ext/strscan/strscan.c static VALUE strscan_rest _((VALUE self));
strscan_rest     1362 ext/strscan/strscan.c     rb_define_method(StringScanner, "rest",        strscan_rest,        0);


strscan_rest_p

strscan_rest_p    103 ext/strscan/strscan.c static VALUE strscan_rest_p _((VALUE self));
strscan_rest_p   1352 ext/strscan/strscan.c     rb_define_method(StringScanner, "rest?",       strscan_rest_p,      0);


strscan_rest_size

strscan_rest_size  111 ext/strscan/strscan.c static VALUE strscan_rest_size _((VALUE self));
strscan_rest_size 1091 ext/strscan/strscan.c     return strscan_rest_size(self);
strscan_rest_size 1363 ext/strscan/strscan.c     rb_define_method(StringScanner, "rest_size",   strscan_rest_size,   0);


strscan_s_allocate

strscan_s_allocate   68 ext/strscan/strscan.c static VALUE strscan_s_allocate _((VALUE klass));
strscan_s_allocate 1312 ext/strscan/strscan.c     rb_define_alloc_func(StringScanner, strscan_s_allocate);


strscan_s_mustc

strscan_s_mustc    72 ext/strscan/strscan.c static VALUE strscan_s_mustc _((VALUE self));
strscan_s_mustc  1315 ext/strscan/strscan.c     rb_define_singleton_method(StringScanner, "must_C_version", strscan_s_mustc, 0);


strscan_scan

strscan_scan       82 ext/strscan/strscan.c static VALUE strscan_scan _((VALUE self, VALUE re));
strscan_scan     1328 ext/strscan/strscan.c     rb_define_method(StringScanner, "scan",        strscan_scan,        1);


strscan_scan_full

strscan_scan_full   86 ext/strscan/strscan.c static VALUE strscan_scan_full _((VALUE self, VALUE re,
strscan_scan_full 1332 ext/strscan/strscan.c     rb_define_method(StringScanner, "scan_full",   strscan_scan_full,   3);


strscan_scan_until

strscan_scan_until   88 ext/strscan/strscan.c static VALUE strscan_scan_until _((VALUE self, VALUE re));
strscan_scan_until 1334 ext/strscan/strscan.c     rb_define_method(StringScanner, "scan_until",  strscan_scan_until,  1);


strscan_search_full

strscan_search_full   91 ext/strscan/strscan.c static VALUE strscan_search_full _((VALUE self, VALUE re,
strscan_search_full 1338 ext/strscan/strscan.c     rb_define_method(StringScanner, "search_full", strscan_search_full, 3);


strscan_set_pos

strscan_set_pos    79 ext/strscan/strscan.c static VALUE strscan_set_pos _((VALUE self, VALUE pos));
strscan_set_pos  1324 ext/strscan/strscan.c     rb_define_method(StringScanner, "pos=",        strscan_set_pos,     1);
strscan_set_pos  1326 ext/strscan/strscan.c     rb_define_method(StringScanner, "pointer=",    strscan_set_pos,     1);


strscan_set_string

strscan_set_string   76 ext/strscan/strscan.c static VALUE strscan_set_string _((VALUE self, VALUE str));
strscan_set_string 1320 ext/strscan/strscan.c     rb_define_method(StringScanner, "string=",     strscan_set_string,  1);


strscan_skip

strscan_skip       84 ext/strscan/strscan.c static VALUE strscan_skip _((VALUE self, VALUE re));
strscan_skip     1329 ext/strscan/strscan.c     rb_define_method(StringScanner, "skip",        strscan_skip,        1);


strscan_skip_until

strscan_skip_until   89 ext/strscan/strscan.c static VALUE strscan_skip_until _((VALUE self, VALUE re));
strscan_skip_until 1335 ext/strscan/strscan.c     rb_define_method(StringScanner, "skip_until",  strscan_skip_until,  1);


strscan_terminate

strscan_terminate   73 ext/strscan/strscan.c static VALUE strscan_terminate _((VALUE self));
strscan_terminate  305 ext/strscan/strscan.c     return strscan_terminate(self);
strscan_terminate 1317 ext/strscan/strscan.c     rb_define_method(StringScanner, "terminate",   strscan_terminate,   0);


strscan_unscan

strscan_unscan     99 ext/strscan/strscan.c static VALUE strscan_unscan _((VALUE self));
strscan_unscan   1346 ext/strscan/strscan.c     rb_define_method(StringScanner, "unscan",      strscan_unscan,      0);


strstr

strstr           1597 ext/syck/implicit.c         othorpe = strstr( tmp1, "#" );
strstr           1601 ext/syck/implicit.c         othorpe = strstr( tmp2, "#" );
strstr            117 missing.h      extern char *strstr(const char *, const char *);
strstr             68 missing/os2.c  	if (strstr(shell, "cmd") || strstr(shell, "4os2"))
strstr             77 missing/os2.c  	if (strstr(shell, "cmd") || strstr(shell, "4os2"))
strstr             86 missing/os2.c  	if (strstr(shell, "cmd") || strstr(shell, "4os2"))
strstr            889 ruby.c         		    if ((p = strstr(RSTRING(line)->ptr, "ruby")) != 0) {
strstr            904 ruby.c         		if ((p = strstr(RSTRING(line)->ptr, "ruby")) == 0) {
strstr            941 ruby.c         		if ((p = strstr(p, " -")) != 0) {


strtod

strtod           1055 ext/syck/bytecode.c                 int total = strtod( count, NULL );
strtod            434 ext/syck/rubyext.c                     bnum = strtod( colon + 1, NULL );
strtod            457 ext/syck/rubyext.c                 f = strtod( n->data.str->ptr, NULL );
strtod           1029 marshal.c      		d = strtod(ptr, &e);
strtod           2066 object.c           d = strtod(p, &end);
strtod           2100 object.c       	d = strtod(p, &end);
strtod           6289 parse.y        		double d = strtod(tok(), 0);


strtol

strtol            227 ext/syck/rubyext.c         year = INT2FIX(strtol(ptr, NULL, 10));
strtol            234 ext/syck/rubyext.c         mon = INT2FIX(strtol(ptr, NULL, 10));
strtol            241 ext/syck/rubyext.c         day = INT2FIX(strtol(ptr, NULL, 10));
strtol            248 ext/syck/rubyext.c         hour = INT2FIX(strtol(ptr, NULL, 10));
strtol            255 ext/syck/rubyext.c         min = INT2FIX(strtol(ptr, NULL, 10));
strtol            262 ext/syck/rubyext.c         sec = INT2FIX(strtol(ptr, NULL, 10));
strtol            273 ext/syck/rubyext.c         usec = strtol(padded, NULL, 10);
strtol            284 ext/syck/rubyext.c         time_t tz_offset = strtol(ptr, NULL, 10) * 3600;
strtol            293 ext/syck/rubyext.c                 tz_offset -= strtol(ptr, NULL, 10) * 60;
strtol            297 ext/syck/rubyext.c                 tz_offset += strtol(ptr, NULL, 10) * 60;
strtol            404 ext/syck/rubyext.c                     bnum = strtol( colon + 1, NULL, 10 );
strtol            475 ext/syck/rubyext.c                 year = INT2FIX(strtol(ptr, NULL, 10));
strtol            480 ext/syck/rubyext.c                 mon = INT2FIX(strtol(ptr, NULL, 10));
strtol            485 ext/syck/rubyext.c                 day = INT2FIX(strtol(ptr, NULL, 10));
strtol           2114 ext/syck/token.c                         ch = strtol( chr_text, NULL, 16 );
strtol           2317 ext/syck/token.c                         ch = strtol( chr_text, NULL, 16 );
strtol           2367 ext/syck/token.c                 forceIndent = strtol( yyt, NULL, 10 );
strtol           2719 ext/tk/tcltklib.c         state = (int)strtol(argv[1], &endptr, 0);


strtoul

strtoul           410 bignum.c       	unsigned long val = strtoul((char*)str, &end, base);
strtoul           716 ext/socket/socket.c     (void)strtoul(p, &ep, 10);
strtoul          2801 ext/socket/socket.c 	port = strtoul(s, &end, 0);
strtoul           127 missing.h      extern unsigned long strtoul(const char *, char **, int);
strtoul            16 missing/strtol.c 	result = -strtoul(p, endptr, base);
strtoul            20 missing/strtol.c 	result = strtoul(p, endptr, base);
strtoul           497 pack.c         	    len = strtoul(p, (char**)&p, 10);
strtoul          1345 pack.c         	    len = strtoul(p, (char**)&p, 10);


struct_alloc

struct_alloc       17 struct.c       static VALUE struct_alloc(VALUE);
struct_alloc      197 struct.c           rb_define_alloc_func(nstr, struct_alloc);


subexp_inf_recursive_check

subexp_inf_recursive_check 2493 regcomp.c      	ret = subexp_inf_recursive_check(NCONS(x).left, env, head);
subexp_inf_recursive_check 2510 regcomp.c      	ret = subexp_inf_recursive_check(NCONS(node).left, env, head);
subexp_inf_recursive_check 2518 regcomp.c          r = subexp_inf_recursive_check(NQUALIFIER(node).target, env, head);
subexp_inf_recursive_check 2529 regcomp.c      	r = subexp_inf_recursive_check(an->target, env, head);
subexp_inf_recursive_check 2536 regcomp.c          r = subexp_inf_recursive_check(NCALL(node).target, env, head);
subexp_inf_recursive_check 2546 regcomp.c            r = subexp_inf_recursive_check(NEFFECT(node).target, env, head);
subexp_inf_recursive_check 2597 regcomp.c      	r = subexp_inf_recursive_check(en->target, env, 1);


subexp_inf_recursive_check_trav

subexp_inf_recursive_check_trav 2569 regcomp.c            r = subexp_inf_recursive_check_trav(NCONS(node).left, env);
subexp_inf_recursive_check_trav 2574 regcomp.c          r = subexp_inf_recursive_check_trav(NQUALIFIER(node).target, env);
subexp_inf_recursive_check_trav 2585 regcomp.c      	r = subexp_inf_recursive_check_trav(an->target, env);
subexp_inf_recursive_check_trav 2601 regcomp.c            r = subexp_inf_recursive_check_trav(en->target, env);
subexp_inf_recursive_check_trav 4787 regcomp.c          r = subexp_inf_recursive_check_trav(root, &scan_env);


subexp_recursive_check

subexp_recursive_check 2624 regcomp.c            r |= subexp_recursive_check(NCONS(node).left);
subexp_recursive_check 2629 regcomp.c          r = subexp_recursive_check(NQUALIFIER(node).target);
subexp_recursive_check 2640 regcomp.c      	r = subexp_recursive_check(an->target);
subexp_recursive_check 2647 regcomp.c          r = subexp_recursive_check(NCALL(node).target);
subexp_recursive_check 2658 regcomp.c            r = subexp_recursive_check(NEFFECT(node).target);
subexp_recursive_check 2722 regcomp.c      	  r = subexp_recursive_check(en->target);


subexp_recursive_check_trav

subexp_recursive_check_trav 2686 regcomp.c      	ret = subexp_recursive_check_trav(NCONS(node).left, env);
subexp_recursive_check_trav 2694 regcomp.c          r = subexp_recursive_check_trav(NQUALIFIER(node).target, env);
subexp_recursive_check_trav 2709 regcomp.c      	r = subexp_recursive_check_trav(an->target, env);
subexp_recursive_check_trav 2727 regcomp.c            r = subexp_recursive_check_trav(en->target, env);
subexp_recursive_check_trav 4785 regcomp.c          r = subexp_recursive_check_trav(root, &scan_env);


subnodes

subnodes         7585 parse.y        	    if (subnodes(nd_body, nd_else)) break;
subnodes         7591 parse.y        	    if (!subnodes(nd_body, nd_next)) goto end;
subnodes         7594 parse.y        	    if (!subnodes(nd_head, nd_resq)) goto end;
subnodes         7597 parse.y        	    if (!subnodes(nd_head, nd_resq)) goto end;


subst_free

subst_free       1136 ext/tk/tkutil/tkutil.c                  Data_Wrap_Struct(cSUBST_INFO, subst_mark, subst_free, inf));
subst_free       1410 ext/tk/tkutil/tkutil.c                                   subst_free, subst_inf));


subst_mark

subst_mark       1136 ext/tk/tkutil/tkutil.c                  Data_Wrap_Struct(cSUBST_INFO, subst_mark, subst_free, inf));
subst_mark       1409 ext/tk/tkutil/tkutil.c                  Data_Wrap_Struct(cSUBST_INFO, subst_mark,


svalue_to_avalue

svalue_to_avalue 4794 eval.c         		    val = svalue_to_avalue(val);
svalue_to_avalue 9201 eval.c             a = svalue_to_avalue(args);


svalue_to_mrhs

svalue_to_mrhs   4719 eval.c         		    val = svalue_to_mrhs(val, var->nd_head);
svalue_to_mrhs   4725 eval.c         		    val = svalue_to_mrhs(val, var->nd_head);
svalue_to_mrhs   5060 eval.c         	massign(self, lhs, svalue_to_mrhs(val, lhs->nd_head), pcall);


swallow

swallow          1574 io.c           	    swallow(fptr, '\n');
swallow          1595 io.c           		swallow(fptr, '\n');


swap16

swap16             76 pack.c         #ifndef swap16
swap16             80 pack.c         #define swaps(x)	swap16(x)
swap16            218 pack.c         #define htov16(x) (endian()?swap16(x):(x))
swap16            220 pack.c         #define hton16(x) (endian()?(x):swap16(x))
swap16            244 pack.c         #define htov16(x) swap16(x)
swap16            275 pack.c         #define hton16(x) swap16(x)


swap_node

swap_node        2928 regcomp.c      	      swap_node(node, en);
swap_node        3042 regcomp.c          swap_node(node, root);


swapd

swapd             204 pack.c         #define ntohd(x) (endian()?(x):swapd(x))
swapd             208 pack.c         #define htond(x) (endian()?(x):swapd(x))
swapd             212 pack.c         #define htovd(x) (endian()?swapd(x):(x))
swapd             216 pack.c         #define vtohd(x) (endian()?swapd(x):(x))
swapd             238 pack.c         #define htovd(x) swapd(x)
swapd             242 pack.c         #define vtohd(x) swapd(x)
swapd             261 pack.c         #define ntohd(x) swapd(x)
swapd             263 pack.c         #define htond(x) swapd(x)


swaps

swaps             165 pack.c             utmp[0] = swaps(utmp[1]);
swaps             166 pack.c             utmp[1] = swaps(utmp0);
swaps             201 pack.c         #define ntohs(x) (endian()?(x):swaps(x))
swaps             205 pack.c         #define htons(x) (endian()?(x):swaps(x))
swaps             209 pack.c         #define htovs(x) (endian()?swaps(x):(x))
swaps             213 pack.c         #define vtohs(x) (endian()?swaps(x):(x))
swaps             235 pack.c         #define htovs(x) swaps(x)
swaps             239 pack.c         #define vtohs(x) swaps(x)
swaps             256 pack.c         #define ntohs(x) swaps(x)
swaps             258 pack.c         #define htons(x) swaps(x)


switch_mime_getc

switch_mime_getc 3691 ext/nkf/nkf-utf8/nkf.c     switch_mime_getc();
switch_mime_getc 3762 ext/nkf/nkf-utf8/nkf.c     switch_mime_getc();
switch_mime_getc 4313 ext/nkf/nkf-utf8/nkf.c 	    switch_mime_getc();
switch_mime_getc 4326 ext/nkf/nkf-utf8/nkf.c     switch_mime_getc();         /* anyway we need buffered getc */


syck_add_sym

syck_add_sym      351 ext/syck/syck.h int syck_add_sym( SyckParser *, char * );
syck_add_sym      210 ext/syck/yaml2byte.c     oid = syck_add_sym( p, (char *) val );


syck_add_transfer

syck_add_transfer 1220 ext/syck/gram.c             syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
syck_add_transfer 1228 ext/syck/gram.c             syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 );
syck_add_transfer 1281 ext/syck/gram.c                     syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
syck_add_transfer 1289 ext/syck/gram.c                     syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 );
syck_add_transfer 1309 ext/syck/gram.c                syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
syck_add_transfer 1317 ext/syck/gram.c                syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 );
syck_add_transfer 1398 ext/syck/gram.c                     syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
syck_add_transfer 1406 ext/syck/gram.c                     syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
syck_add_transfer 1414 ext/syck/gram.c                     syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, 0 );
syck_add_transfer 1422 ext/syck/gram.c                     syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 );
syck_add_transfer 1511 ext/syck/gram.c                     syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
syck_add_transfer 1519 ext/syck/gram.c                     syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
syck_add_transfer 1527 ext/syck/gram.c                     syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, 0 );
syck_add_transfer 1535 ext/syck/gram.c                     syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 );
syck_add_transfer  347 ext/syck/syck.h void syck_add_transfer( char *, SyckNode *, int );


syck_alloc_map

syck_alloc_map   1622 ext/syck/gram.c                     yyval.nodeData = syck_alloc_map();
syck_alloc_map    175 ext/syck/node.c     n = syck_alloc_map();
syck_alloc_map   1611 ext/syck/rubyext.c     node = syck_alloc_map();
syck_alloc_map   1792 ext/syck/rubyext.c                 DATA_PTR(t) = n = syck_alloc_map();
syck_alloc_map    419 ext/syck/syck.h SyckNode *syck_alloc_map();


syck_alloc_node

syck_alloc_node    61 ext/syck/node.c     n = syck_alloc_node( syck_map_kind );
syck_alloc_node    79 ext/syck/node.c     n = syck_alloc_node( syck_seq_kind );
syck_alloc_node    96 ext/syck/node.c     n = syck_alloc_node( syck_str_kind );


syck_alloc_seq

syck_alloc_seq   1473 ext/syck/gram.c                     yyval.nodeData = syck_alloc_seq();
syck_alloc_seq    300 ext/syck/node.c     n = syck_alloc_seq();
syck_alloc_seq   1512 ext/syck/rubyext.c     node = syck_alloc_seq();
syck_alloc_seq   1804 ext/syck/rubyext.c                 DATA_PTR(t) = n = syck_alloc_seq();
syck_alloc_seq    420 ext/syck/syck.h SyckNode *syck_alloc_seq();


syck_alloc_str

syck_alloc_str   1084 ext/syck/bytecode.c             SyckNode *n = syck_alloc_str();
syck_alloc_str    113 ext/syck/node.c     n = syck_alloc_str();
syck_alloc_str   1425 ext/syck/rubyext.c     SyckNode *node = syck_alloc_str();
syck_alloc_str    421 ext/syck/syck.h SyckNode *syck_alloc_str();
syck_alloc_str    121 ext/syck/token.c         SyckNode *n = syck_alloc_str(); \
syck_alloc_str    159 ext/syck/token.c         SyckNode *n = syck_alloc_str(); \
syck_alloc_str   1827 ext/syck/token.c                         SyckNode *n = syck_alloc_str();
syck_alloc_str   1995 ext/syck/token.c                         SyckNode *n = syck_alloc_str();


syck_assert

syck_assert        35 ext/syck/syck.h   void syck_assert( char *, unsigned );
syck_assert        40 ext/syck/syck.h         syck_assert( __FILE__, __LINE__ )


syck_check_limit

syck_check_limit  461 ext/syck/syck.c     syck_check_limit( p, len );
syck_check_limit  483 ext/syck/syck.c     syck_check_limit( p, len );


syck_default_error_handler

syck_default_error_handler  412 ext/syck/syck.h void syck_default_error_handler( SyckParser *, char * );
syck_default_error_handler 2720 ext/syck/token.c         syck_parser_ptr->error_handler = syck_default_error_handler;


syck_emit

syck_emit        1148 ext/syck/emitter.c     syck_emit( e, n );
syck_emit        2040 ext/syck/rubyext.c         syck_emit(emitter, (st_data_t)symple);
syck_emit         376 ext/syck/syck.h void syck_emit( SyckEmitter *, st_data_t );


syck_emit_1quoted

syck_emit_1quoted  749 ext/syck/emitter.c             syck_emit_1quoted( e, force_width, str, len );
syck_emit_1quoted  378 ext/syck/syck.h void syck_emit_1quoted( SyckEmitter *, int, char *, long );


syck_emit_2quoted

syck_emit_2quoted  754 ext/syck/emitter.c             syck_emit_2quoted( e, force_width, str, len );
syck_emit_2quoted  379 ext/syck/syck.h void syck_emit_2quoted( SyckEmitter *, int, char *, long );


syck_emit_end

syck_emit_end    1853 ext/syck/rubyext.c                 syck_emit_end( e );
syck_emit_end    1865 ext/syck/rubyext.c                 syck_emit_end( e );
syck_emit_end     385 ext/syck/syck.h void syck_emit_end( SyckEmitter * );


syck_emit_folded

syck_emit_folded  758 ext/syck/emitter.c             syck_emit_folded( e, force_width, keep_nl, str, len );
syck_emit_folded  380 ext/syck/syck.h void syck_emit_folded( SyckEmitter *, int, char, char *, long );


syck_emit_indent

syck_emit_indent  815 ext/syck/emitter.c             syck_emit_indent( e );
syck_emit_indent  865 ext/syck/emitter.c             syck_emit_indent( e );
syck_emit_indent  924 ext/syck/emitter.c     syck_emit_indent( e );
syck_emit_indent  933 ext/syck/emitter.c                 syck_emit_indent( e );
syck_emit_indent  959 ext/syck/emitter.c     syck_emit_indent( e );
syck_emit_indent  972 ext/syck/emitter.c                     syck_emit_indent( e );
syck_emit_indent  981 ext/syck/emitter.c                         syck_emit_indent( e );
syck_emit_indent 1066 ext/syck/emitter.c             syck_emit_indent( e );
syck_emit_indent 1105 ext/syck/emitter.c                 syck_emit_indent( e );
syck_emit_indent 1115 ext/syck/emitter.c                 syck_emit_indent( e );
syck_emit_indent  387 ext/syck/syck.h void syck_emit_indent( SyckEmitter * );


syck_emit_item

syck_emit_item   1850 ext/syck/rubyext.c                     syck_emit_item( e, syck_map_read( n, map_key, i ) );
syck_emit_item   1851 ext/syck/rubyext.c                     syck_emit_item( e, syck_map_read( n, map_value, i ) );
syck_emit_item   1863 ext/syck/rubyext.c                     syck_emit_item( e, syck_seq_read( n, i ) );
syck_emit_item    383 ext/syck/syck.h void syck_emit_item( SyckEmitter *, st_data_t );


syck_emit_literal

syck_emit_literal  762 ext/syck/emitter.c             syck_emit_literal( e, keep_nl, str, len );
syck_emit_literal  381 ext/syck/syck.h void syck_emit_literal( SyckEmitter *, char, char *, long );


syck_emit_map

syck_emit_map    1847 ext/syck/rubyext.c                 syck_emit_map( e, n->type_id, n->data.pairs->style );
syck_emit_map     384 ext/syck/syck.h void syck_emit_map( SyckEmitter *, char *, enum map_style );


syck_emit_scalar

syck_emit_scalar 1871 ext/syck/rubyext.c                 syck_emit_scalar( e, n->type_id, n->data.str->style, 0, 0, 0, n->data.str->ptr, n->data.str->len );
syck_emit_scalar  377 ext/syck/syck.h void syck_emit_scalar( SyckEmitter *, char *, enum scalar_style, int, int, char, char *, long );


syck_emit_seq

syck_emit_seq    1860 ext/syck/rubyext.c                 syck_emit_seq( e, n->type_id, n->data.list->style );
syck_emit_seq     382 ext/syck/syck.h void syck_emit_seq( SyckEmitter *, char *, enum seq_style );


syck_emit_tag

syck_emit_tag     678 ext/syck/emitter.c         syck_emit_tag( e, tag, implicit );
syck_emit_tag    1001 ext/syck/emitter.c     syck_emit_tag( e, tag, "tag:yaml.org,2002:seq" );
syck_emit_tag    1017 ext/syck/emitter.c     syck_emit_tag( e, tag, "tag:yaml.org,2002:map" );
syck_emit_tag     386 ext/syck/syck.h void syck_emit_tag( SyckEmitter *, char *, char * );


syck_emitter_add_level

syck_emitter_add_level  390 ext/syck/emitter.c     syck_emitter_add_level( e, indent, syck_lvl_open );
syck_emitter_add_level  391 ext/syck/syck.h void syck_emitter_add_level( SyckEmitter *, int, enum syck_level_status );


syck_emitter_clear

syck_emitter_clear  291 ext/syck/emitter.c         syck_emitter_clear( e );
syck_emitter_clear  372 ext/syck/syck.h void syck_emitter_clear( SyckEmitter * );


syck_emitter_current_level

syck_emitter_current_level  364 ext/syck/emitter.c     SyckLevel *lvl = syck_emitter_current_level( e );
syck_emitter_current_level  391 ext/syck/emitter.c     lvl = syck_emitter_current_level( e );
syck_emitter_current_level  447 ext/syck/emitter.c     lvl = syck_emitter_current_level( e );
syck_emitter_current_level  496 ext/syck/emitter.c     SyckLevel *lvl = syck_emitter_current_level( e );
syck_emitter_current_level  648 ext/syck/emitter.c     SyckLevel *lvl = syck_emitter_current_level( e );
syck_emitter_current_level 1000 ext/syck/emitter.c     SyckLevel *lvl = syck_emitter_current_level( e );
syck_emitter_current_level 1016 ext/syck/emitter.c     SyckLevel *lvl = syck_emitter_current_level( e );
syck_emitter_current_level 1032 ext/syck/emitter.c     SyckLevel *lvl = syck_emitter_current_level( e );
syck_emitter_current_level 1156 ext/syck/emitter.c     SyckLevel *lvl = syck_emitter_current_level( e );
syck_emitter_current_level  388 ext/syck/syck.h SyckLevel *syck_emitter_current_level( SyckEmitter * );


syck_emitter_escape

syck_emitter_escape  902 ext/syck/emitter.c                 syck_emitter_escape( e, mark, 1 );
syck_emitter_escape  374 ext/syck/syck.h void syck_emitter_escape( SyckEmitter *, char *, long );


syck_emitter_flush

syck_emitter_flush  300 ext/syck/emitter.c         syck_emitter_flush( e, 0 );
syck_emitter_flush  308 ext/syck/emitter.c 	    syck_emitter_flush( e, 0 );
syck_emitter_flush 2041 ext/syck/rubyext.c         syck_emitter_flush(emitter, 0);
syck_emitter_flush  375 ext/syck/syck.h void syck_emitter_flush( SyckEmitter *, long );


syck_emitter_handler

syck_emitter_handler 1953 ext/syck/rubyext.c     syck_emitter_handler( emitter, rb_syck_emitter_handler );
syck_emitter_handler  370 ext/syck/syck.h void syck_emitter_handler( SyckEmitter *, SyckEmitterHandler );


syck_emitter_mark_node

syck_emitter_mark_node 2033 ext/syck/rubyext.c     syck_emitter_mark_node( emitter, (st_data_t)symple );
syck_emitter_mark_node  367 ext/syck/syck.h SYMID syck_emitter_mark_node( SyckEmitter *, st_data_t );


syck_emitter_parent_level

syck_emitter_parent_level  647 ext/syck/emitter.c     SyckLevel *parent = syck_emitter_parent_level( e );
syck_emitter_parent_level  999 ext/syck/emitter.c     SyckLevel *parent = syck_emitter_parent_level( e );
syck_emitter_parent_level 1015 ext/syck/emitter.c     SyckLevel *parent = syck_emitter_parent_level( e );
syck_emitter_parent_level 1037 ext/syck/emitter.c             SyckLevel *parent = syck_emitter_parent_level( e );
syck_emitter_parent_level 1081 ext/syck/emitter.c             SyckLevel *parent = syck_emitter_parent_level( e );
syck_emitter_parent_level 1157 ext/syck/emitter.c     SyckLevel *parent = syck_emitter_parent_level( e );
syck_emitter_parent_level  389 ext/syck/syck.h SyckLevel *syck_emitter_parent_level( SyckEmitter * );


syck_emitter_pop_level

syck_emitter_pop_level  225 ext/syck/emitter.c         syck_emitter_pop_level( e );
syck_emitter_pop_level  429 ext/syck/emitter.c     syck_emitter_pop_level( e );
syck_emitter_pop_level  390 ext/syck/syck.h void syck_emitter_pop_level( SyckEmitter * );


syck_emitter_reset

syck_emitter_reset 2349 ext/syck/rubyext.c     rb_define_method( cEmitter, "initialize", syck_emitter_reset, -1 );
syck_emitter_reset 2350 ext/syck/rubyext.c     rb_define_method( cEmitter, "reset", syck_emitter_reset, -1 );


syck_emitter_reset_levels

syck_emitter_reset_levels  136 ext/syck/emitter.c     syck_emitter_reset_levels( e );
syck_emitter_reset_levels  258 ext/syck/emitter.c     syck_emitter_reset_levels( e );
syck_emitter_reset_levels  392 ext/syck/syck.h void syck_emitter_reset_levels( SyckEmitter * );


syck_emitter_s_alloc

syck_emitter_s_alloc 1941 ext/syck/rubyext.c VALUE syck_emitter_s_alloc _((VALUE));
syck_emitter_s_alloc 2348 ext/syck/rubyext.c     rb_define_alloc_func( cEmitter, syck_emitter_s_alloc );


syck_emitter_write

syck_emitter_write  376 ext/syck/emitter.c             syck_emitter_write( e, header, strlen( header ) );
syck_emitter_write  381 ext/syck/emitter.c             syck_emitter_write( e, "--- ", 4 );
syck_emitter_write  407 ext/syck/emitter.c             syck_emitter_write( e, an, strlen( anchor_name ) + 2 );
syck_emitter_write  418 ext/syck/emitter.c             syck_emitter_write( e, an, strlen( anchor_name ) + 1 );
syck_emitter_write  431 ext/syck/emitter.c         syck_emitter_write( e, "\n", 1 );
syck_emitter_write  451 ext/syck/emitter.c         syck_emitter_write( e, "! ", 2 );
syck_emitter_write  456 ext/syck/emitter.c         syck_emitter_write( e, "!", 1 );
syck_emitter_write  459 ext/syck/emitter.c             syck_emitter_write( e, tag + skip, taglen - skip );
syck_emitter_write  466 ext/syck/emitter.c                     syck_emitter_write( e, tag + 4, subd - strlen( YAML_DOMAIN ) - ( tag + 4 ) - 1 );
syck_emitter_write  467 ext/syck/emitter.c                     syck_emitter_write( e, "/", 1 );
syck_emitter_write  468 ext/syck/emitter.c                     syck_emitter_write( e, subd + 1, ( tag + taglen ) - ( subd + 1 ) );
syck_emitter_write  470 ext/syck/emitter.c                     syck_emitter_write( e, tag + 4, subd - ( tag + 4 ) );
syck_emitter_write  471 ext/syck/emitter.c                     syck_emitter_write( e, "/", 1 );
syck_emitter_write  472 ext/syck/emitter.c                     syck_emitter_write( e, subd + 1, ( tag + taglen ) - ( subd + 1 ) );
syck_emitter_write  479 ext/syck/emitter.c         syck_emitter_write( e, " ", 1 );
syck_emitter_write  483 ext/syck/emitter.c         syck_emitter_write( e, "!!", 2 );
syck_emitter_write  484 ext/syck/emitter.c         syck_emitter_write( e, tag + 10, strlen( tag ) - 10 );
syck_emitter_write  485 ext/syck/emitter.c         syck_emitter_write( e, " ", 1 );
syck_emitter_write  503 ext/syck/emitter.c         syck_emitter_write( e, spcs, lvl->spaces + 1 );
syck_emitter_write  675 ext/syck/emitter.c             syck_emitter_write( e, "? ", 2 );
syck_emitter_write  766 ext/syck/emitter.c             syck_emitter_write( e, str, len );
syck_emitter_write  772 ext/syck/emitter.c         syck_emitter_write( e, "\n", 1 );
syck_emitter_write  784 ext/syck/emitter.c             syck_emitter_write( e, "\\", 1 );
syck_emitter_write  786 ext/syck/emitter.c                 syck_emitter_write( e, "0", 1 );
syck_emitter_write  789 ext/syck/emitter.c                 syck_emitter_write( e, "x", 1 );
syck_emitter_write  790 ext/syck/emitter.c                 syck_emitter_write( e, (char *)hex_table + ((src[i] & 0xF0) >> 4), 1 );
syck_emitter_write  791 ext/syck/emitter.c                 syck_emitter_write( e, (char *)hex_table + (src[i] & 0x0F), 1 );
syck_emitter_write  796 ext/syck/emitter.c             syck_emitter_write( e, src + i, 1 );
syck_emitter_write  798 ext/syck/emitter.c                 syck_emitter_write( e, "\\", 1 );
syck_emitter_write  812 ext/syck/emitter.c     syck_emitter_write( e, "'", 1 );
syck_emitter_write  819 ext/syck/emitter.c             case '\'':  syck_emitter_write( e, "'", 1 ); break;
syck_emitter_write  824 ext/syck/emitter.c                     syck_emitter_write( e, "\n\n", 2 );
syck_emitter_write  826 ext/syck/emitter.c                     syck_emitter_write( e, "\n", 1 );
syck_emitter_write  837 ext/syck/emitter.c                     syck_emitter_write( e, " ", 1 );
syck_emitter_write  842 ext/syck/emitter.c                 syck_emitter_write( e, mark, 1 );
syck_emitter_write  847 ext/syck/emitter.c     syck_emitter_write( e, "'", 1 );
syck_emitter_write  859 ext/syck/emitter.c     syck_emitter_write( e, "\"", 1 );
syck_emitter_write  863 ext/syck/emitter.c                 syck_emitter_write( e, "\\", 1 );
syck_emitter_write  871 ext/syck/emitter.c             case '"':  syck_emitter_write( e, "\\\"", 2 ); break;
syck_emitter_write  872 ext/syck/emitter.c             case '\\': syck_emitter_write( e, "\\\\", 2 ); break;
syck_emitter_write  873 ext/syck/emitter.c             case '\0': syck_emitter_write( e, "\\0",  2 ); break;
syck_emitter_write  874 ext/syck/emitter.c             case '\a': syck_emitter_write( e, "\\a",  2 ); break;
syck_emitter_write  875 ext/syck/emitter.c             case '\b': syck_emitter_write( e, "\\b",  2 ); break;
syck_emitter_write  876 ext/syck/emitter.c             case '\f': syck_emitter_write( e, "\\f",  2 ); break;
syck_emitter_write  877 ext/syck/emitter.c             case '\r': syck_emitter_write( e, "\\r",  2 ); break;
syck_emitter_write  878 ext/syck/emitter.c             case '\t': syck_emitter_write( e, "\\t",  2 ); break;
syck_emitter_write  879 ext/syck/emitter.c             case '\v': syck_emitter_write( e, "\\v",  2 ); break;
syck_emitter_write  880 ext/syck/emitter.c             case 0x1b: syck_emitter_write( e, "\\e",  2 ); break;
syck_emitter_write  884 ext/syck/emitter.c                 syck_emitter_write( e, "\\n", 2 );
syck_emitter_write  897 ext/syck/emitter.c                     syck_emitter_write( e, " ", 1 );
syck_emitter_write  907 ext/syck/emitter.c     syck_emitter_write( e, "\"", 1 );
syck_emitter_write  918 ext/syck/emitter.c     syck_emitter_write( e, "|", 1 );
syck_emitter_write  920 ext/syck/emitter.c         syck_emitter_write( e, "-", 1 );
syck_emitter_write  922 ext/syck/emitter.c         syck_emitter_write( e, "+", 1 );
syck_emitter_write  929 ext/syck/emitter.c             syck_emitter_write( e, start, end - start );
syck_emitter_write  931 ext/syck/emitter.c                 if ( keep_nl != NL_KEEP ) syck_emitter_write( e, "\n", 1 );
syck_emitter_write  941 ext/syck/emitter.c         syck_emitter_write( e, start, end - start );
syck_emitter_write  953 ext/syck/emitter.c     syck_emitter_write( e, ">", 1 );
syck_emitter_write  955 ext/syck/emitter.c         syck_emitter_write( e, "-", 1 );
syck_emitter_write  957 ext/syck/emitter.c         syck_emitter_write( e, "+", 1 );
syck_emitter_write  964 ext/syck/emitter.c                 syck_emitter_write( e, end, mark - end );
syck_emitter_write  967 ext/syck/emitter.c                     syck_emitter_write( e, "\n", 1 );
syck_emitter_write  970 ext/syck/emitter.c                     if ( keep_nl != NL_KEEP ) syck_emitter_write( e, "\n", 1 );
syck_emitter_write  980 ext/syck/emitter.c                         syck_emitter_write( e, end, mark - end );
syck_emitter_write  990 ext/syck/emitter.c         syck_emitter_write( e, end, mark - end );
syck_emitter_write 1003 ext/syck/emitter.c         syck_emitter_write( e, "[", 1 );
syck_emitter_write 1019 ext/syck/emitter.c         syck_emitter_write( e, "{", 1 );
syck_emitter_write 1043 ext/syck/emitter.c                     syck_emitter_write( e, "?", 1 );
syck_emitter_write 1059 ext/syck/emitter.c                         syck_emitter_write( e, " ", 1 );
syck_emitter_write 1061 ext/syck/emitter.c                     syck_emitter_write( e, "- ", 2 );
syck_emitter_write 1067 ext/syck/emitter.c             syck_emitter_write( e, "- ", 2 );
syck_emitter_write 1074 ext/syck/emitter.c                 syck_emitter_write( e, ", ", 2 );
syck_emitter_write 1087 ext/syck/emitter.c                     syck_emitter_write( e, "?", 1 );
syck_emitter_write 1098 ext/syck/emitter.c                         syck_emitter_write( e, " ", 1 );
syck_emitter_write 1107 ext/syck/emitter.c                 syck_emitter_write( e, ": ", 2 );
syck_emitter_write 1124 ext/syck/emitter.c                     syck_emitter_write( e, spcs, lvl->spaces );
syck_emitter_write 1127 ext/syck/emitter.c                 syck_emitter_write( e, ": ", 2 );
syck_emitter_write 1136 ext/syck/emitter.c                     syck_emitter_write( e, ", ", 2 );
syck_emitter_write 1138 ext/syck/emitter.c                     syck_emitter_write( e, ": ", 2 );
syck_emitter_write 1162 ext/syck/emitter.c                 syck_emitter_write( e, "[]\n", 3 );
syck_emitter_write 1164 ext/syck/emitter.c                 syck_emitter_write( e, "\n", 1 );
syck_emitter_write 1169 ext/syck/emitter.c             syck_emitter_write( e, "]\n", 1 );
syck_emitter_write 1174 ext/syck/emitter.c                 syck_emitter_write( e, "{}\n", 3 );
syck_emitter_write 1176 ext/syck/emitter.c                 syck_emitter_write( e, ":\n", 1 );
syck_emitter_write 1178 ext/syck/emitter.c                 syck_emitter_write( e, "\n", 1 );
syck_emitter_write 1183 ext/syck/emitter.c             syck_emitter_write( e, "}\n", 1 );
syck_emitter_write  373 ext/syck/syck.h void syck_emitter_write( SyckEmitter *, char *, long );


syck_free_emitter

syck_free_emitter 1935 ext/syck/rubyext.c     syck_free_emitter(e);
syck_free_emitter  371 ext/syck/syck.h void syck_free_emitter( SyckEmitter * );


syck_free_members

syck_free_members   34 ext/syck/node.c     syck_free_members( n );
syck_free_members  423 ext/syck/syck.h void syck_free_members( SyckNode * );


syck_free_node

syck_free_node   1590 ext/syck/gram.c                     syck_free_node( yyvsp[0].nodeData );
syck_free_node   1630 ext/syck/gram.c                     syck_free_node( yyvsp[0].nodeData );
syck_free_node     26 ext/syck/handler.c         syck_free_node( n );
syck_free_node     57 ext/syck/handler.c             syck_free_node( ntmp );
syck_free_node     77 ext/syck/handler.c             syck_free_node( ntmp );
syck_free_node   1426 ext/syck/rubyext.c     VALUE obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node );
syck_free_node   1513 ext/syck/rubyext.c     obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node );
syck_free_node   1612 ext/syck/rubyext.c     obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node );
syck_free_node   1785 ext/syck/rubyext.c     t = Data_Wrap_Struct( cNode, syck_node_mark, syck_free_node, 0 );
syck_free_node    203 ext/syck/syck.c     if ( n != (void *)1 ) syck_free_node( n );
syck_free_node    422 ext/syck/syck.h void syck_free_node( SyckNode * );


syck_free_parser

syck_free_parser  123 ext/syck/rubyext.c     syck_free_parser( parser );
syck_free_parser  747 ext/syck/rubyext.c     syck_free_parser(p);
syck_free_parser  394 ext/syck/syck.h void syck_free_parser( SyckParser * );
syck_free_parser  241 ext/syck/yaml2byte.c     syck_free_parser( parser );


syck_hdlr_add_anchor

syck_hdlr_add_anchor 1241 ext/syck/gram.c            yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
syck_hdlr_add_anchor 1302 ext/syck/gram.c                    yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
syck_hdlr_add_anchor 1336 ext/syck/gram.c                yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
syck_hdlr_add_anchor 1430 ext/syck/gram.c                     yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-2].name, yyvsp[0].nodeData );
syck_hdlr_add_anchor 1437 ext/syck/gram.c                     yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
syck_hdlr_add_anchor 1543 ext/syck/gram.c                     yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-2].name, yyvsp[0].nodeData );
syck_hdlr_add_anchor 1550 ext/syck/gram.c                     yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
syck_hdlr_add_anchor  344 ext/syck/syck.h SyckNode *syck_hdlr_add_anchor( SyckParser *, char *, SyckNode * );


syck_hdlr_add_node

syck_hdlr_add_node 1199 ext/syck/gram.c            ((SyckParser *)parser)->root = syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData );
syck_hdlr_add_node 1206 ext/syck/gram.c            ((SyckParser *)parser)->root = syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData );
syck_hdlr_add_node 1391 ext/syck/gram.c                     yyval.nodeId = syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData );
syck_hdlr_add_node 1480 ext/syck/gram.c                     yyval.nodeData = syck_new_seq( syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
syck_hdlr_add_node 1487 ext/syck/gram.c                     syck_seq_add( yyvsp[-2].nodeData, syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
syck_hdlr_add_node 1565 ext/syck/gram.c                         syck_hdlr_add_node( (SyckParser *)parser, yyvsp[-2].nodeData ),
syck_hdlr_add_node 1566 ext/syck/gram.c                         syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
syck_hdlr_add_node 1607 ext/syck/gram.c                         syck_hdlr_add_node( (SyckParser *)parser, yyvsp[-2].nodeData ),
syck_hdlr_add_node 1608 ext/syck/gram.c                         syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
syck_hdlr_add_node 1641 ext/syck/gram.c                         syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ),
syck_hdlr_add_node 1642 ext/syck/gram.c                         syck_hdlr_add_node( (SyckParser *)parser, n ) );
syck_hdlr_add_node 1889 ext/syck/gram.c         syck_hdlr_add_node( parser, n->shortcut ) );
syck_hdlr_add_node  343 ext/syck/syck.h SYMID syck_hdlr_add_node( SyckParser *, SyckNode * );


syck_hdlr_get_anchor

syck_hdlr_get_anchor 1347 ext/syck/gram.c                yyval.nodeData = syck_hdlr_get_anchor( (SyckParser *)parser, yyvsp[0].name );
syck_hdlr_get_anchor  346 ext/syck/syck.h SyckNode *syck_hdlr_get_anchor( SyckParser *, char * );


syck_hdlr_remove_anchor

syck_hdlr_remove_anchor  303 ext/syck/bytecode.c             syck_hdlr_remove_anchor( parser, sycklval->name );
syck_hdlr_remove_anchor  345 ext/syck/syck.h void syck_hdlr_remove_anchor( SyckParser *, char * );
syck_hdlr_remove_anchor 1033 ext/syck/token.c                         syck_hdlr_remove_anchor(parser, sycklval->name);


syck_io_file_read

syck_io_file_read  312 ext/syck/syck.c         p->io.file->read = syck_io_file_read;
syck_io_file_read  362 ext/syck/syck.h long syck_io_file_read( char *, SyckIoFile *, long, long );


syck_io_str_read

syck_io_str_read  333 ext/syck/syck.c         p->io.str->read = syck_io_str_read;
syck_io_str_read  363 ext/syck/syck.h long syck_io_str_read( char *, SyckIoStr *, long, long );


syck_lookup_sym

syck_lookup_sym   116 ext/syck/rubyext.c     syck_lookup_sym( parser, oid, (char **)&sav );
syck_lookup_sym   352 ext/syck/syck.h int syck_lookup_sym( SyckParser *, SYMID, char ** );
syck_lookup_sym   191 ext/syck/yaml2byte.c                 syck_lookup_sym( p, oid, (char **)&sav );
syck_lookup_sym   201 ext/syck/yaml2byte.c                 syck_lookup_sym( p, oid, (char **)&sav );
syck_lookup_sym   204 ext/syck/yaml2byte.c                 syck_lookup_sym( p, oid, (char **)&sav );
syck_lookup_sym   230 ext/syck/yaml2byte.c     if ( syck_lookup_sym( parser, oid, (char **)&sav ) == 1 ) {


syck_map_add

syck_map_add      176 ext/syck/node.c     syck_map_add( n, key, value );
syck_map_add     1641 ext/syck/rubyext.c             syck_map_add( node, key, rb_hash_aref(hsh, key) );
syck_map_add     1677 ext/syck/rubyext.c             syck_map_add( node, key, rb_hash_aref(hsh, key) );
syck_map_add     1700 ext/syck/rubyext.c     syck_map_add( node, key, val );
syck_map_add     1795 ext/syck/rubyext.c                     syck_map_add( n, rb_funcall( syck_map_read( orig_n, map_key, i ), s_transform, 0 ),
syck_map_add      432 ext/syck/syck.h void syck_map_add( SyckNode *, SYMID, SYMID );


syck_map_alloc

syck_map_alloc     81 ext/syck/rubyext.c VALUE syck_map_alloc _((VALUE class));
syck_map_alloc   2282 ext/syck/rubyext.c     rb_define_alloc_func( cMap, syck_map_alloc );


syck_map_assign

syck_map_assign  1888 ext/syck/gram.c     syck_map_assign( n, map_value, map_len - 1,
syck_map_assign   434 ext/syck/syck.h void syck_map_assign( SyckNode *, enum map_part, long, SYMID );


syck_map_count

syck_map_count   1887 ext/syck/gram.c     map_len = syck_map_count( n );
syck_map_count   1311 ext/syck/rubyext.c             for ( i = 0; i < syck_map_count( n ); i++ )
syck_map_count    435 ext/syck/syck.h long syck_map_count( SyckNode * );


syck_map_empty

syck_map_empty   1672 ext/syck/rubyext.c         syck_map_empty( node );
syck_map_empty    431 ext/syck/syck.h void syck_map_empty( SyckNode * );


syck_map_read

syck_map_read     548 ext/syck/rubyext.c                 VALUE k = syck_map_read( n, map_key, i );
syck_map_read     549 ext/syck/rubyext.c                 VALUE v = syck_map_read( n, map_value, i );
syck_map_read     985 ext/syck/rubyext.c                 VALUE k = syck_map_read( n, map_key, i );
syck_map_read     986 ext/syck/rubyext.c                 VALUE v = syck_map_read( n, map_value, i );
syck_map_read    1313 ext/syck/rubyext.c                 rb_hash_aset( v, syck_map_read( n, map_key, i ), syck_map_read( n, map_value, i ) );
syck_map_read    1408 ext/syck/rubyext.c                 rb_gc_mark( syck_map_read( n, map_key, i ) );
syck_map_read    1409 ext/syck/rubyext.c                 rb_gc_mark( syck_map_read( n, map_value, i ) );
syck_map_read    1795 ext/syck/rubyext.c                     syck_map_add( n, rb_funcall( syck_map_read( orig_n, map_key, i ), s_transform, 0 ),
syck_map_read    1796 ext/syck/rubyext.c                                      rb_funcall( syck_map_read( orig_n, map_value, i ), s_transform, 0 ) );
syck_map_read    1850 ext/syck/rubyext.c                     syck_emit_item( e, syck_map_read( n, map_key, i ) );
syck_map_read    1851 ext/syck/rubyext.c                     syck_emit_item( e, syck_map_read( n, map_value, i ) );
syck_map_read     433 ext/syck/syck.h SYMID syck_map_read( SyckNode *, enum map_part, long );
syck_map_read     200 ext/syck/yaml2byte.c                 oid = syck_map_read( n, map_key, i );
syck_map_read     203 ext/syck/yaml2byte.c                 oid = syck_map_read( n, map_value, i );


syck_map_update

syck_map_update  1589 ext/syck/gram.c                     syck_map_update( yyvsp[-2].nodeData, yyvsp[0].nodeData );
syck_map_update  1629 ext/syck/gram.c                     syck_map_update( yyvsp[-2].nodeData, yyvsp[0].nodeData );
syck_map_update   436 ext/syck/syck.h void syck_map_update( SyckNode *, SyckNode * );


syck_match_implicit

syck_match_implicit  663 ext/syck/emitter.c     implicit = syck_match_implicit( str, len );
syck_match_implicit   28 ext/syck/implicit.c             tid = syck_match_implicit( n->data.str->ptr, n->data.str->len );
syck_match_implicit 1224 ext/syck/rubyext.c         type_id = syck_match_implicit( RSTRING(val)->ptr, RSTRING(val)->len );
syck_match_implicit  356 ext/syck/syck.h char *syck_match_implicit( char *, size_t );


syck_merge_i

syck_merge_i      574 ext/syck/rubyext.c                             rb_iterate( rb_each, tmp, syck_merge_i, dup );
syck_merge_i     1009 ext/syck/rubyext.c                             rb_iterate( rb_each, v, syck_merge_i, dup );


syck_move_tokens

syck_move_tokens  452 ext/syck/syck.c             skip = syck_move_tokens( p );
syck_move_tokens  457 ext/syck/syck.c             skip = syck_move_tokens( p );
syck_move_tokens  474 ext/syck/syck.c             skip = syck_move_tokens( p );
syck_move_tokens  479 ext/syck/syck.c             skip = syck_move_tokens( p );


syck_new_emitter

syck_new_emitter 1947 ext/syck/rubyext.c     SyckEmitter *emitter = syck_new_emitter();
syck_new_emitter  366 ext/syck/syck.h SyckEmitter *syck_new_emitter();


syck_new_map

syck_new_map     1564 ext/syck/gram.c                     yyval.nodeData = syck_new_map(
syck_new_map     1606 ext/syck/gram.c                     yyval.nodeData = syck_new_map(
syck_new_map     1640 ext/syck/gram.c                     yyval.nodeData = syck_new_map(
syck_new_map      669 ext/syck/rubyext.c     SyckNode *badanc = syck_new_map( rb_str_new2( "name" ), anchor_name );
syck_new_map      430 ext/syck/syck.h SyckNode *syck_new_map( SYMID, SYMID );


syck_new_parser

syck_new_parser   109 ext/syck/rubyext.c     SyckParser *parser = syck_new_parser();
syck_new_parser   759 ext/syck/rubyext.c     SyckParser *parser = syck_new_parser();
syck_new_parser   393 ext/syck/syck.h SyckParser *syck_new_parser();
syck_new_parser   222 ext/syck/yaml2byte.c     SyckParser *parser = syck_new_parser();


syck_new_seq

syck_new_seq     1444 ext/syck/gram.c                     yyval.nodeData = syck_new_seq( yyvsp[0].nodeId );
syck_new_seq     1480 ext/syck/gram.c                     yyval.nodeData = syck_new_seq( syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
syck_new_seq     1575 ext/syck/gram.c                         yyvsp[-2].nodeData->shortcut = syck_new_seq( yyvsp[0].nodeId );
syck_new_seq      437 ext/syck/syck.h SyckNode *syck_new_seq( SYMID );


syck_new_str

syck_new_str      107 ext/syck/gram.c         SyckNode *node = syck_new_str( "", scalar_plain ); \
syck_new_str      424 ext/syck/syck.h SyckNode *syck_new_str( char *, enum scalar_style );


syck_new_str2

syck_new_str2     105 ext/syck/node.c     return syck_new_str2( str, strlen( str ), style );
syck_new_str2    1813 ext/syck/rubyext.c             DATA_PTR(t) = n = syck_new_str2( orig_n->data.str->ptr, orig_n->data.str->len, orig_n->data.str->style );
syck_new_str2     425 ext/syck/syck.h SyckNode *syck_new_str2( char *, long, enum scalar_style );


syck_node_mark

syck_node_mark    598 ext/syck/rubyext.c static void syck_node_mark( SyckNode *n );
syck_node_mark    711 ext/syck/rubyext.c     if ( n != (void *)1 ) syck_node_mark( n );
syck_node_mark   1414 ext/syck/rubyext.c     if ( n->shortcut ) syck_node_mark( n->shortcut ); /* caution: maybe cyclic */
syck_node_mark   1426 ext/syck/rubyext.c     VALUE obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node );
syck_node_mark   1513 ext/syck/rubyext.c     obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node );
syck_node_mark   1612 ext/syck/rubyext.c     obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node );
syck_node_mark   1785 ext/syck/rubyext.c     t = Data_Wrap_Struct( cNode, syck_node_mark, syck_free_node, 0 );


syck_node_transform

syck_node_transform   68 ext/syck/rubyext.c static VALUE syck_node_transform( VALUE );
syck_node_transform 2263 ext/syck/rubyext.c     rb_define_method( cNode, "transform", syck_node_transform, 0);


syck_out_mark

syck_out_mark    2095 ext/syck/rubyext.c     syck_out_mark( rb_ivar_get( self, s_emitter ), map );
syck_out_mark    2114 ext/syck/rubyext.c     syck_out_mark( rb_ivar_get( self, s_emitter ), seq );
syck_out_mark    2135 ext/syck/rubyext.c     syck_out_mark( rb_ivar_get( self, s_emitter ), scalar );


syck_output_handler

syck_output_handler 1954 ext/syck/rubyext.c     syck_output_handler( emitter, rb_syck_output_handler );
syck_output_handler  369 ext/syck/syck.h void syck_output_handler( SyckEmitter *, SyckOutputHandler );


syck_parse

syck_parse        115 ext/syck/rubyext.c     oid = syck_parse( parser );
syck_parse        851 ext/syck/rubyext.c     return syck_parse( parser );
syck_parse        885 ext/syck/rubyext.c         v = syck_parse( parser );
syck_parse        411 ext/syck/syck.h SYMID syck_parse( SyckParser * );
syck_parse        228 ext/syck/yaml2byte.c     oid = syck_parse( parser );


syck_parser_add_level

syck_parser_add_level   49 ext/syck/bytecode.c #define ADD_LEVEL(len, status)  syck_parser_add_level( parser, len, status )
syck_parser_add_level  406 ext/syck/syck.h void syck_parser_add_level( SyckParser *, int, enum syck_level_status );
syck_parser_add_level   48 ext/syck/token.c #define ADD_LEVEL(len, status)  syck_parser_add_level( parser, len, status )


syck_parser_assign_io

syck_parser_assign_io   78 ext/syck/rubyext.c int syck_parser_assign_io _((SyckParser *, VALUE *));
syck_parser_assign_io  110 ext/syck/rubyext.c     taint = syck_parser_assign_io(parser, &port);
syck_parser_assign_io  845 ext/syck/rubyext.c     bonus->taint = syck_parser_assign_io(parser, &port);
syck_parser_assign_io  875 ext/syck/rubyext.c     bonus->taint = syck_parser_assign_io(parser, &port);


syck_parser_bad_anchor_handler

syck_parser_bad_anchor_handler  705 ext/syck/rubyext.c     syck_parser_bad_anchor_handler( parser, rb_syck_bad_anchor_handler );
syck_parser_bad_anchor_handler  401 ext/syck/syck.h void syck_parser_bad_anchor_handler( SyckParser *, SyckBadAnchorHandler );


syck_parser_current_level

syck_parser_current_level   51 ext/syck/bytecode.c #define CURRENT_LEVEL() syck_parser_current_level( parser )
syck_parser_current_level  405 ext/syck/syck.h SyckLevel *syck_parser_current_level( SyckParser * );
syck_parser_current_level   50 ext/syck/token.c #define CURRENT_LEVEL() syck_parser_current_level( parser )


syck_parser_error_handler

syck_parser_error_handler  112 ext/syck/rubyext.c     syck_parser_error_handler( parser, NULL );
syck_parser_error_handler  704 ext/syck/rubyext.c     syck_parser_error_handler( parser, rb_syck_err_handler );
syck_parser_error_handler  400 ext/syck/syck.h void syck_parser_error_handler( SyckParser *, SyckErrorHandler );
syck_parser_error_handler  225 ext/syck/yaml2byte.c     syck_parser_error_handler( parser, NULL );


syck_parser_handler

syck_parser_handler  111 ext/syck/rubyext.c     syck_parser_handler( parser, syck_yaml2byte_handler );
syck_parser_handler  683 ext/syck/rubyext.c     syck_parser_handler( parser, rb_syck_load_handler );
syck_parser_handler  399 ext/syck/syck.h void syck_parser_handler( SyckParser *, SyckNodeHandler );
syck_parser_handler  224 ext/syck/yaml2byte.c     syck_parser_handler( parser, syck_yaml2byte_handler );


syck_parser_implicit_typing

syck_parser_implicit_typing  113 ext/syck/rubyext.c     syck_parser_implicit_typing( parser, 0 );
syck_parser_implicit_typing  689 ext/syck/rubyext.c     syck_parser_implicit_typing( parser, 1 );
syck_parser_implicit_typing  396 ext/syck/syck.h void syck_parser_implicit_typing( SyckParser *, int );
syck_parser_implicit_typing  226 ext/syck/yaml2byte.c     syck_parser_implicit_typing( parser, 1 );


syck_parser_pop_level

syck_parser_pop_level   50 ext/syck/bytecode.c #define POP_LEVEL()     syck_parser_pop_level( parser )
syck_parser_pop_level  111 ext/syck/bytecode.c             syck_parser_pop_level( parser ); \
syck_parser_pop_level   16 ext/syck/syck.c void syck_parser_pop_level( SyckParser * );
syck_parser_pop_level  106 ext/syck/syck.c         syck_parser_pop_level( p );
syck_parser_pop_level  407 ext/syck/syck.h void syck_parser_pop_level( SyckParser * );
syck_parser_pop_level   49 ext/syck/token.c #define POP_LEVEL()     syck_parser_pop_level( parser )
syck_parser_pop_level   83 ext/syck/token.c             syck_parser_pop_level( parser ); \


syck_parser_read

syck_parser_read   29 ext/syck/bytecode.c #define YYFILL(n)   syck_parser_read(parser)
syck_parser_read  141 ext/syck/bytecode.c         syck_parser_read( parser );
syck_parser_read  409 ext/syck/syck.h long syck_parser_read( SyckParser * );
syck_parser_read   32 ext/syck/token.c #define YYFILL(n)   syck_parser_read(parser)
syck_parser_read  284 ext/syck/token.c         syck_parser_read( parser );


syck_parser_reset_cursor

syck_parser_reset_cursor  302 ext/syck/syck.c 	syck_parser_reset_cursor( p );
syck_parser_reset_cursor  321 ext/syck/syck.c 	syck_parser_reset_cursor( p );


syck_parser_reset_levels

syck_parser_reset_levels  176 ext/syck/syck.c     syck_parser_reset_levels( p );
syck_parser_reset_levels  245 ext/syck/syck.c     syck_parser_reset_levels( p );
syck_parser_reset_levels  493 ext/syck/syck.c     syck_parser_reset_levels( p );


syck_parser_s_alloc

syck_parser_s_alloc  753 ext/syck/rubyext.c VALUE syck_parser_s_alloc _((VALUE));
syck_parser_s_alloc 2244 ext/syck/rubyext.c     rb_define_alloc_func( cParser, syck_parser_s_alloc );


syck_parser_set_input_type

syck_parser_set_input_type  698 ext/syck/rubyext.c         syck_parser_set_input_type( parser, syck_bytecode_utf8 );
syck_parser_set_input_type  702 ext/syck/rubyext.c         syck_parser_set_input_type( parser, syck_yaml_utf8 );


syck_parser_set_root_on_error

syck_parser_set_root_on_error  766 ext/syck/rubyext.c     syck_parser_set_root_on_error( parser, Qnil );
syck_parser_set_root_on_error  395 ext/syck/syck.h void syck_parser_set_root_on_error( SyckParser *, SYMID );


syck_parser_str

syck_parser_str   176 ext/syck/rubyext.c         syck_parser_str( parser, RSTRING(port)->ptr, RSTRING(port)->len, NULL );
syck_parser_str   182 ext/syck/rubyext.c         syck_parser_str( parser, (char *)port, 0, rb_syck_io_str_read );
syck_parser_str   340 ext/syck/syck.c     syck_parser_str( p, ptr, strlen( ptr ), read );
syck_parser_str   403 ext/syck/syck.h void syck_parser_str( SyckParser *, char *, long, SyckIoStrRead );


syck_parser_str_auto

syck_parser_str_auto  404 ext/syck/syck.h void syck_parser_str_auto( SyckParser *, char *, SyckIoStrRead );
syck_parser_str_auto  223 ext/syck/yaml2byte.c     syck_parser_str_auto( parser, yamlstr, NULL );


syck_parser_taguri_expansion

syck_parser_taguri_expansion  114 ext/syck/rubyext.c     syck_parser_taguri_expansion( parser, 0 );
syck_parser_taguri_expansion  690 ext/syck/rubyext.c     syck_parser_taguri_expansion( parser, 1 );
syck_parser_taguri_expansion  397 ext/syck/syck.h void syck_parser_taguri_expansion( SyckParser *, int );
syck_parser_taguri_expansion  227 ext/syck/yaml2byte.c     syck_parser_taguri_expansion( parser, 1 );


syck_replace_str2

syck_replace_str2  126 ext/syck/node.c     syck_replace_str2( n, str, strlen( str ), style );
syck_replace_str2  427 ext/syck/syck.h void syck_replace_str2( SyckNode *, char *, long, enum scalar_style );


syck_scalar_alloc

syck_scalar_alloc   79 ext/syck/rubyext.c VALUE syck_scalar_alloc _((VALUE class));
syck_scalar_alloc 2270 ext/syck/rubyext.c     rb_define_alloc_func( cScalar, syck_scalar_alloc );


syck_scan_scalar

syck_scan_scalar  662 ext/syck/emitter.c     scan = syck_scan_scalar( force_width, str, len );
syck_scan_scalar  398 ext/syck/syck.h int syck_scan_scalar( int, char *, long );


syck_seq_add

syck_seq_add     1451 ext/syck/gram.c                     syck_seq_add( yyvsp[-2].nodeData, yyvsp[0].nodeId );
syck_seq_add     1487 ext/syck/gram.c                     syck_seq_add( yyvsp[-2].nodeData, syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
syck_seq_add     1579 ext/syck/gram.c                         syck_seq_add( yyvsp[-2].nodeData->shortcut, yyvsp[0].nodeId );
syck_seq_add      301 ext/syck/node.c     syck_seq_add( n, value );
syck_seq_add     1551 ext/syck/rubyext.c             syck_seq_add( node, rb_ary_entry(val, i) );
syck_seq_add     1573 ext/syck/rubyext.c     syck_seq_add( node, val );
syck_seq_add     1807 ext/syck/rubyext.c                     syck_seq_add( n, rb_funcall( syck_seq_read( orig_n, i ), s_transform, 0 ) );
syck_seq_add      439 ext/syck/syck.h void syck_seq_add( SyckNode *, SYMID );


syck_seq_alloc

syck_seq_alloc     80 ext/syck/rubyext.c VALUE syck_seq_alloc _((VALUE class));
syck_seq_alloc   2276 ext/syck/rubyext.c     rb_define_alloc_func( cSeq, syck_seq_alloc );


syck_seq_count

syck_seq_count   1296 ext/syck/rubyext.c             v = rb_ary_new2( syck_seq_count( n ) );
syck_seq_count   1297 ext/syck/rubyext.c             for ( i = 0; i < syck_seq_count( n ); i++ )
syck_seq_count    442 ext/syck/syck.h long syck_seq_count( SyckNode * );


syck_seq_empty

syck_seq_empty   1548 ext/syck/rubyext.c         syck_seq_empty( node );
syck_seq_empty    438 ext/syck/syck.h void syck_seq_empty( SyckNode * );


syck_seq_read

syck_seq_read     536 ext/syck/rubyext.c                 rb_ary_store( obj, i, syck_seq_read( n, i ) );
syck_seq_read     977 ext/syck/rubyext.c                 rb_ary_store( obj, i, syck_seq_read( n, i ) );
syck_seq_read    1299 ext/syck/rubyext.c                 rb_ary_store( v, i, syck_seq_read( n, i ) );
syck_seq_read    1401 ext/syck/rubyext.c                 rb_gc_mark( syck_seq_read( n, i ) );
syck_seq_read    1807 ext/syck/rubyext.c                     syck_seq_add( n, rb_funcall( syck_seq_read( orig_n, i ), s_transform, 0 ) );
syck_seq_read    1863 ext/syck/rubyext.c                     syck_emit_item( e, syck_seq_read( n, i ) );
syck_seq_read     441 ext/syck/syck.h SYMID syck_seq_read( SyckNode *, long );
syck_seq_read     190 ext/syck/yaml2byte.c                 oid = syck_seq_read( n, i );


syck_set_model

syck_set_model    842 ext/syck/rubyext.c     syck_set_model( self, input, model );
syck_set_model    872 ext/syck/rubyext.c     syck_set_model( self, input, model );


syck_st_free

syck_st_free      244 ext/syck/syck.c     syck_st_free( p );
syck_st_free      492 ext/syck/syck.c     syck_st_free( p );


syck_st_free_nodes

syck_st_free_nodes  216 ext/syck/syck.c         st_foreach( p->anchors, syck_st_free_nodes, 0 );
syck_st_free_nodes  223 ext/syck/syck.c         st_foreach( p->bad_anchors, syck_st_free_nodes, 0 );


syck_st_mark_nodes

syck_st_mark_nodes  731 ext/syck/rubyext.c         st_foreach( parser->anchors, syck_st_mark_nodes, 0 );
syck_st_mark_nodes  735 ext/syck/rubyext.c         st_foreach( parser->bad_anchors, syck_st_mark_nodes, 0 );


syck_str_blow_away_commas

syck_str_blow_away_commas  378 ext/syck/rubyext.c                 syck_str_blow_away_commas( n );
syck_str_blow_away_commas  383 ext/syck/rubyext.c                 syck_str_blow_away_commas( n );
syck_str_blow_away_commas  391 ext/syck/rubyext.c                 syck_str_blow_away_commas( n );
syck_str_blow_away_commas  413 ext/syck/rubyext.c                 syck_str_blow_away_commas( n );
syck_str_blow_away_commas  421 ext/syck/rubyext.c                 syck_str_blow_away_commas( n );
syck_str_blow_away_commas  456 ext/syck/rubyext.c                 syck_str_blow_away_commas( n );
syck_str_blow_away_commas  428 ext/syck/syck.h void syck_str_blow_away_commas( SyckNode * );


syck_strndup

syck_strndup      362 ext/syck/bytecode.c                         lvl->domain = syck_strndup( qstr + 1, carat - ( qstr + 1 ) );
syck_strndup       66 ext/syck/emitter.c     char *ptr = syck_strndup( s, len );
syck_strndup      214 ext/syck/emitter.c     e->levels[e->lvl_idx].domain = syck_strndup( e->levels[e->lvl_idx-1].domain, strlen( e->levels[e->lvl_idx-1].domain ) );
syck_strndup      233 ext/syck/emitter.c         e->levels[0].domain = syck_strndup( "", 0 );
syck_strndup      114 ext/syck/gram.c             node->type_id = syck_strndup( "null", 4 ); \
syck_strndup     1361 ext/syck/gram.c                    n->type_id = syck_strndup( "str", 3 );
syck_strndup       44 ext/syck/implicit.c         n->type_id = syck_strndup( tid, strlen( tid ) );
syck_strndup     1595 ext/syck/implicit.c         char *tmp1 = syck_strndup( tag1, strlen( tag1 ) );
syck_strndup     1596 ext/syck/implicit.c         char *tmp2 = syck_strndup( tag2, strlen( tag2 ) );
syck_strndup     2484 ext/syck/implicit.c {   return syck_strndup( type_id, strlen( type_id ) ); }
syck_strndup     2931 ext/syck/implicit.c {   return syck_strndup( type_id, strlen( type_id ) ); }
syck_strndup      670 ext/syck/rubyext.c     badanc->type_id = syck_strndup( "tag:ruby.yaml.org,2002:object:YAML::Syck::BadAlias", 53 );
syck_strndup     1495 ext/syck/rubyext.c     node->data.str->ptr = syck_strndup( RSTRING(val)->ptr, RSTRING(val)->len );
syck_strndup     1767 ext/syck/rubyext.c         node->type_id = syck_strndup( RSTRING(type_id)->ptr, RSTRING(type_id)->len );
syck_strndup     1819 ext/syck/rubyext.c         n->type_id = syck_strndup( orig_n->type_id, strlen( orig_n->type_id ) );
syck_strndup     1823 ext/syck/rubyext.c         n->anchor = syck_strndup( orig_n->anchor, strlen( orig_n->anchor ) );
syck_strndup      114 ext/syck/syck.c         p->levels[0].domain = syck_strndup( "", 0 );
syck_strndup      374 ext/syck/syck.c     p->levels[p->lvl_idx].domain = syck_strndup( p->levels[p->lvl_idx-1].domain, strlen( p->levels[p->lvl_idx-1].domain ) );
syck_strndup      361 ext/syck/syck.h char *syck_strndup( char *, long );
syck_strndup      166 ext/syck/token.c             n->type_id = syck_strndup( "str", 3 ); \
syck_strndup      953 ext/syck/token.c                         sycklval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 );
syck_strndup     1026 ext/syck/token.c {   sycklval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 );
syck_strndup     1840 ext/syck/token.c                             n->type_id = syck_strndup( "str", 3 );
syck_strndup     2008 ext/syck/token.c                             n->type_id = syck_strndup( "str", 3 );
syck_strndup     2112 ext/syck/token.c                         char *chr_text = syck_strndup( YYTOKEN, 4 );
syck_strndup     2207 ext/syck/token.c                                 lvl->domain = syck_strndup( qstr, carat - qstr );
syck_strndup     2315 ext/syck/token.c                         char *chr_text = syck_strndup( YYTOKTMP, 4 );


syck_tagcmp

syck_tagcmp       446 ext/syck/emitter.c     if ( ignore != NULL && syck_tagcmp( tag, ignore ) == 0 && e->explicit_typing == 0 ) return;
syck_tagcmp       656 ext/syck/emitter.c          parent->ncount % 2 == 1 && syck_tagcmp( tag, "tag:yaml.org,2002:null" ) == 0 )
syck_tagcmp       667 ext/syck/emitter.c     if ( syck_tagcmp( tag, implicit ) != 0 && syck_tagcmp( tag, "tag:yaml.org,2002:str" ) == 0 ) {
syck_tagcmp       673 ext/syck/emitter.c              ( implicit != NULL && syck_tagcmp( tag, implicit ) == 0 && e->explicit_typing == 0 ) ) ) )
syck_tagcmp       350 ext/syck/syck.h int syck_tagcmp( char *, char * );


syck_taguri

syck_taguri       666 ext/syck/emitter.c     implicit = syck_taguri( YAML_DOMAIN, implicit, strlen( implicit ) );
syck_taguri       110 ext/syck/gram.c             node->type_id = syck_taguri( YAML_DOMAIN, "null", 4 ); \
syck_taguri      1357 ext/syck/gram.c                    n->type_id = syck_taguri( YAML_DOMAIN, "str", 3 );
syck_taguri        42 ext/syck/implicit.c         n->type_id = syck_taguri( YAML_DOMAIN, tid, strlen( tid ) );
syck_taguri      1767 ext/syck/implicit.c {   return syck_taguri( YAML_DOMAIN, type_id, strlen( type_id ) ); }
syck_taguri      2144 ext/syck/implicit.c                     uri = syck_taguri( domain, YYCURSOR, YYLIMIT - YYCURSOR );
syck_taguri      2360 ext/syck/implicit.c                                uri = syck_taguri( domain, YYCURSOR, YYLIMIT - YYCURSOR );
syck_taguri       349 ext/syck/syck.h char *syck_taguri( char *, char *, int );
syck_taguri       162 ext/syck/token.c             n->type_id = syck_taguri( YAML_DOMAIN, "str", 3 ); \
syck_taguri      1836 ext/syck/token.c                             n->type_id = syck_taguri( YAML_DOMAIN, "str", 3 );
syck_taguri      2004 ext/syck/token.c                             n->type_id = syck_taguri( YAML_DOMAIN, "str", 3 );


syck_type_id_to_uri

syck_type_id_to_uri  143 ext/syck/handler.c     n->type_id = syck_type_id_to_uri( uri );
syck_type_id_to_uri 1203 ext/syck/rubyext.c         char *taguri = syck_type_id_to_uri( RSTRING(tmp)->ptr );
syck_type_id_to_uri  354 ext/syck/syck.h char *syck_type_id_to_uri( char * );


syck_xprivate

syck_xprivate    1841 ext/syck/implicit.c {   return syck_xprivate( type_id + 1, strlen( type_id ) - 1 ); }
syck_xprivate     348 ext/syck/syck.h char *syck_xprivate( char *, int );


syck_yaml2byte

syck_yaml2byte    414 ext/syck/syck.h char *syck_yaml2byte( char * );
syck_yaml2byte    252 ext/syck/yaml2byte.c    printf(syck_yaml2byte(yaml));


syck_yaml2byte_handler

syck_yaml2byte_handler  111 ext/syck/rubyext.c     syck_parser_handler( parser, syck_yaml2byte_handler );
syck_yaml2byte_handler  413 ext/syck/syck.h SYMID syck_yaml2byte_handler( SyckParser *, SyckNode * );
syck_yaml2byte_handler  224 ext/syck/yaml2byte.c     syck_parser_handler( parser, syck_yaml2byte_handler );


syck_yobject_initialize

syck_yobject_initialize 2311 ext/syck/rubyext.c     rb_define_method( cYObject, "initialize", syck_yobject_initialize, 2);
syck_yobject_initialize 2312 ext/syck/rubyext.c     rb_define_method( cYObject, "yaml_initialize", syck_yobject_initialize, 2);


syckerror

syckerror          52 ext/syck/gram.c #define yyerror syckerror
syckerror         447 ext/syck/syck.h void syckerror( char * );
syckerror         261 ext/syck/token.c             syckerror( "UTF-16 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
syckerror         265 ext/syck/token.c             syckerror( "UTF-32 is not currently supported in Syck.\nPlease contribute code to help this happen!" );


sycklex

sycklex            51 ext/syck/gram.c #define yylex   sycklex
sycklex           450 ext/syck/syck.h int sycklex( union YYSTYPE *, SyckParser * );


sycklex_bytecode_utf8

sycklex_bytecode_utf8  244 ext/syck/token.c int sycklex_bytecode_utf8( YYSTYPE *, SyckParser * );
sycklex_bytecode_utf8  269 ext/syck/token.c         return sycklex_bytecode_utf8( sycklval, parser );


sycklex_yaml_utf8

sycklex_yaml_utf8  243 ext/syck/token.c int sycklex_yaml_utf8( YYSTYPE *, SyckParser * );
sycklex_yaml_utf8  258 ext/syck/token.c         return sycklex_yaml_utf8( sycklval, parser );


sym_to_s

sym_to_s         2465 object.c           rb_define_method(rb_cSymbol, "to_s", sym_to_s, 0);
sym_to_s         2466 object.c           rb_define_method(rb_cSymbol, "id2name", sym_to_s, 0);


sys_fail2

sys_fail2        2046 file.c         	sys_fail2(from, to);
sys_fail2        2076 file.c         	sys_fail2(from, to);
sys_fail2        2193 file.c         	sys_fail2(from, to);


sys_nerr

sys_nerr            3 missing/strerror.c extern int sys_nerr;
sys_nerr           11 missing/strerror.c     if (error <= sys_nerr && error > 0) {
sys_nerr         1746 win32/win32.c      extern int sys_nerr;
sys_nerr         1760 win32/win32.c      if (e < 0 || e > sys_nerr) {


sys_warning

sys_warning       917 dir.c          	sys_warning(path);
sys_warning       927 dir.c          	sys_warning(path);
sys_warning       937 dir.c          	sys_warning(path);


syslog_write

syslog_write      159 ext/syslog/syslog.c     syslog_write(FIX2INT(pri), argc, argv);
syslog_write      192 ext/syslog/syslog.c     syslog_write(pri, argc, argv); \


system_state

system_state     3404 win32/win32.c  	EnterCriticalSection(system_state());
system_state     3426 win32/win32.c  	LeaveCriticalSection(system_state());


tCOMMENT

tCOMMENT          256 ext/ripper/eventids2.c     {tCOMMENT,          &ripper_id_comment},
tCOMMENT         5662 parse.y        	ripper_dispatch_scan_event(parser, tCOMMENT);


tEMBDOC

tEMBDOC           258 ext/ripper/eventids2.c     {tEMBDOC,           &ripper_id_embdoc},
tEMBDOC          5748 parse.y        			ripper_dispatch_scan_event(parser, tEMBDOC);


tEMBDOC_BEG

tEMBDOC_BEG       257 ext/ripper/eventids2.c     {tEMBDOC_BEG,       &ripper_id_embdoc_beg},
tEMBDOC_BEG      5742 parse.y        		ripper_dispatch_scan_event(parser, tEMBDOC_BEG);


tEMBDOC_END

tEMBDOC_END       259 ext/ripper/eventids2.c     {tEMBDOC_END,       &ripper_id_embdoc_end},
tEMBDOC_END      5765 parse.y        		ripper_dispatch_scan_event(parser, tEMBDOC_END);


tHEREDOC_BEG

tHEREDOC_BEG      261 ext/ripper/eventids2.c     {tHEREDOC_BEG,      &ripper_id_heredoc_beg},
tHEREDOC_BEG     5263 parse.y            ripper_dispatch_scan_event(parser, tHEREDOC_BEG);


tHEREDOC_END

tHEREDOC_END      262 ext/ripper/eventids2.c     {tHEREDOC_END,      &ripper_id_heredoc_end},
tHEREDOC_END     5287 parse.y            ripper_dispatch_scan_event(parser, tHEREDOC_END);


tIGNORED_NL

tIGNORED_NL       255 ext/ripper/eventids2.c     {tIGNORED_NL,       &ripper_id_ignored_nl},
tIGNORED_NL      5675 parse.y        		ripper_dispatch_scan_event(parser, tIGNORED_NL);


tSP

tSP               260 ext/ripper/eventids2.c     {tSP,               &ripper_id_sp},
tSP              5640 parse.y            ripper_dispatch_scan_event(parser, tSP);
tSP              6476 parse.y        	    ripper_dispatch_scan_event(parser, tSP);


tcl2rb_bool

tcl2rb_bool      1613 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(mTK, "bool", tcl2rb_bool, 1);
tcl2rb_bool      1626 ext/tk/tkutil/tkutil.c     rb_define_method(mTK, "bool", tcl2rb_bool, 1);


tcl2rb_num_or_str

tcl2rb_num_or_str 1616 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(mTK, "num_or_str", tcl2rb_num_or_str, 1);
tcl2rb_num_or_str 1629 ext/tk/tkutil/tkutil.c     rb_define_method(mTK, "num_or_str", tcl2rb_num_or_str, 1);


tcl2rb_number

tcl2rb_number    1614 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(mTK, "number", tcl2rb_number, 1);
tcl2rb_number    1627 ext/tk/tkutil/tkutil.c     rb_define_method(mTK, "number", tcl2rb_number, 1);


tcl2rb_string

tcl2rb_string    1615 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(mTK, "string", tcl2rb_string, 1);
tcl2rb_string    1628 ext/tk/tkutil/tkutil.c     rb_define_method(mTK, "string", tcl2rb_string, 1);


tcl_protect

tcl_protect      2458 ext/tk/tcltklib.c     code = tcl_protect(interp, rb_eval_string, (VALUE)arg);
tcl_protect      2608 ext/tk/tcltklib.c     code = tcl_protect(interp, ip_ruby_cmd_core, (VALUE)arg);


tcl_stubs_check

tcl_stubs_check  1742 ext/tk/tcltklib.c     tcl_stubs_check();
tcl_stubs_check  2055 ext/tk/tcltklib.c     tcl_stubs_check();
tcl_stubs_check  5941 ext/tk/tcltklib.c     tcl_stubs_check();
tcl_stubs_check  5960 ext/tk/tcltklib.c     tcl_stubs_check();
tcl_stubs_check  5992 ext/tk/tcltklib.c     tcl_stubs_check();
tcl_stubs_check  6139 ext/tk/tcltklib.c     tcl_stubs_check();
tcl_stubs_check  6293 ext/tk/tcltklib.c     tcl_stubs_check();
tcl_stubs_check  6352 ext/tk/tcltklib.c     tcl_stubs_check();
tcl_stubs_check  6365 ext/tk/tcltklib.c     tcl_stubs_check();
tcl_stubs_check  7401 ext/tk/tcltklib.c     tcl_stubs_check();
tcl_stubs_check  7536 ext/tk/tcltklib.c     tcl_stubs_check();
tcl_stubs_check  7602 ext/tk/tcltklib.c     tcl_stubs_check();


tcl_stubs_init_p

tcl_stubs_init_p  198 ext/tk/stubs.c     if (tcl_stubs_init_p()) {
tcl_stubs_init_p  260 ext/tk/stubs.c     if (!tcl_stubs_init_p()) {
tcl_stubs_init_p    6 ext/tk/stubs.h extern int tcl_stubs_init_p();
tcl_stubs_init_p  671 ext/tk/tcltklib.c     if (!tcl_stubs_init_p()) {


tcltkip_init_tk

tcltkip_init_tk  4899 ext/tk/tcltklib.c             exc = tcltkip_init_tk(interp);
tcltkip_init_tk  5033 ext/tk/tcltklib.c         tcltkip_init_tk(interp);
tcltkip_init_tk  5917 ext/tk/tcltklib.c     exc = tcltkip_init_tk(interp);


terminate_process

terminate_process 4223 eval.c         	terminate_process(status, rb_str_new("exit", 4));
terminate_process 4326 eval.c         	terminate_process(EXIT_FAILURE, mesg);
terminate_process 10189 eval.c         	    terminate_process(EXIT_FAILURE, ruby_errinfo);


test_R

test_R           3274 file.c         	    return test_R(0, argv[1]);
test_R           4274 file.c             define_filetest_function("readable_real?", test_R, 1);


test_S

test_S           3280 file.c         	    return test_S(0, argv[1]);
test_S           4290 file.c             define_filetest_function("socket?", test_S, 1);


test_W

test_W           3289 file.c         	    return test_W(0, argv[1]);
test_W           4277 file.c             define_filetest_function("writable_real?", test_W, 1);


test_X

test_X           3295 file.c         	    return test_X(0, argv[1]);
test_X           4280 file.c             define_filetest_function("executable_real?", test_X, 1);


test_b

test_b           3234 file.c         	    return test_b(0, argv[1]);
test_b           4292 file.c             define_filetest_function("blockdev?", test_b, 1);


test_c

test_c           3237 file.c         	    return test_c(0, argv[1]);
test_c           4293 file.c             define_filetest_function("chardev?", test_c, 1);


test_d

test_d           3240 file.c         	    return test_d(0, argv[1]);
test_d           4270 file.c             define_filetest_function("directory?", test_d, 1);


test_e

test_e           3244 file.c         	    return test_e(0, argv[1]);
test_e           4271 file.c             define_filetest_function("exist?", test_e, 1);
test_e           4272 file.c             define_filetest_function("exists?", test_e, 1); /* temporary */


test_f

test_f           3247 file.c         	    return test_f(0, argv[1]);
test_f           4281 file.c             define_filetest_function("file?", test_f, 1);


test_grpowned

test_grpowned    3253 file.c         	    return test_grpowned(0, argv[1]);
test_grpowned    4286 file.c             define_filetest_function("grpowned?", test_grpowned, 1);


test_identical

test_identical   3322 file.c         	return test_identical(0, argv[1], argv[2]);
test_identical   4299 file.c             define_filetest_function("identical?", test_identical, 2);


test_l

test_l           3259 file.c         	    return test_l(0, argv[1]);
test_l           4289 file.c             define_filetest_function("symlink?", test_l, 1);


test_owned

test_owned       3262 file.c         	    return test_owned(0, argv[1]);
test_owned       4285 file.c             define_filetest_function("owned?", test_owned, 1);


test_p

test_p           3268 file.c         	    return test_p(0, argv[1]);
test_p           4288 file.c             define_filetest_function("pipe?", test_p, 1);


test_r

test_r           3271 file.c         	    return test_r(0, argv[1]);
test_r           4273 file.c             define_filetest_function("readable?", test_r, 1);


test_s

test_s           3277 file.c         	    return test_s(0, argv[1]);
test_s           4283 file.c             define_filetest_function("size?", test_s, 1);


test_sgid

test_sgid        3250 file.c         	    return test_sgid(0, argv[1]);
test_sgid        4296 file.c             define_filetest_function("setgid?", test_sgid, 1);


test_sticky

test_sticky      3256 file.c         	    return test_sticky(0, argv[1]);
test_sticky      4297 file.c             define_filetest_function("sticky?", test_sticky, 1);


test_suid

test_suid        3283 file.c         	    return test_suid(0, argv[1]);
test_suid        4295 file.c             define_filetest_function("setuid?", test_suid, 1);


test_w

test_w           3286 file.c         	    return test_w(0, argv[1]);
test_w           4276 file.c             define_filetest_function("writable?", test_w, 1);


test_x

test_x           3292 file.c         	    return test_x(0, argv[1]);
test_x           4279 file.c             define_filetest_function("executable?", test_x, 1);


test_z

test_z           3298 file.c         	    return test_z(0, argv[1]);
test_z           4282 file.c             define_filetest_function("zero?", test_z, 1);


thread_free

thread_free      11564 eval.c             th->thread = Data_Wrap_Struct(klass, thread_mark, thread_free, th);
thread_free      12571 eval.c             cont = Data_Wrap_Struct(rb_cCont, thread_mark, thread_free, th);


thread_insert

thread_insert    11741 eval.c         	thread_insert(th);
thread_insert    11755 eval.c             thread_insert(th);


thread_mark

thread_mark      10069 eval.c             if (TYPE(data) != T_DATA || RDATA(data)->dmark != (RUBY_DATA_FUNC)thread_mark) {
thread_mark      11564 eval.c             th->thread = Data_Wrap_Struct(klass, thread_mark, thread_free, th);
thread_mark      12571 eval.c             cont = Data_Wrap_Struct(rb_cCont, thread_mark, thread_free, th);


thread_reset_raised

thread_reset_raised 1346 eval.c         static int thread_reset_raised(void);
thread_reset_raised 1413 eval.c             thread_reset_raised();
thread_reset_raised 2547 eval.c             raised = thread_reset_raised();
thread_reset_raised 4384 eval.c         	    thread_reset_raised();
thread_reset_raised 4399 eval.c             thread_reset_raised();


thread_set_raised

thread_set_raised 1345 eval.c         static int thread_set_raised(void);
thread_set_raised 1363 eval.c             if (thread_set_raised()) return EXIT_FAILURE;
thread_set_raised 2559 eval.c             if (raised) thread_set_raised();
thread_set_raised 4345 eval.c             if (thread_set_raised()) {


thread_status_name

thread_status_name 10686 eval.c         			th->thread, thread_status_name(th->status));
thread_status_name 12046 eval.c             return rb_str_new2(thread_status_name(th->status));
thread_status_name 12471 eval.c             const char *status = thread_status_name(th->status);


time

time             10773 eval.c         	limit = timeofday()+(double)time.tv_sec+(double)time.tv_usec*1e-6;
time             10778 eval.c         	    n = select(0, 0, 0, 0, &time);
time             10796 eval.c         	    time.tv_sec = (int)d;
time             10797 eval.c         	    time.tv_usec = (int)((d - (int)d)*1e6);
time             10798 eval.c         	    if (time.tv_usec < 0) {
time             10799 eval.c         		time.tv_usec += (long)1e6;
time             10800 eval.c         		time.tv_sec -= 1;
time             10802 eval.c         	    if (time.tv_sec < 0) return;
time             10807 eval.c             date = timeofday() + (double)time.tv_sec + (double)time.tv_usec*1e-6;
time               31 ext/openssl/ossl_asn1.c     if (!time || !time->data) return Qnil;
time               34 ext/openssl/ossl_asn1.c     switch (time->type) {
time               36 ext/openssl/ossl_asn1.c 	if (sscanf(time->data, "%2d%2d%2d%2d%2d%2dZ", &tm.tm_year, &tm.tm_mon,
time               47 ext/openssl/ossl_asn1.c 	if (sscanf(time->data, "%4d%2d%2d%2d%2d%2dZ", &tm.tm_year, &tm.tm_mon,
time               74 ext/openssl/ossl_asn1.c     return (time_t)NUM2LONG(rb_Integer(time));
time              269 ext/openssl/ossl_asn1.c     sec = time_to_time_t(time);
time              282 ext/openssl/ossl_asn1.c     sec = time_to_time_t(time);
time              429 ext/openssl/ossl_asn1.c     ASN1_TIME *time;
time              435 ext/openssl/ossl_asn1.c     if(!(time = d2i_ASN1_TIME(NULL, &p, length)))
time              438 ext/openssl/ossl_asn1.c 		     (VALUE)time, &status);
time              439 ext/openssl/ossl_asn1.c     ASN1_TIME_free(time);
time              399 ext/openssl/ossl_x509cert.c     sec = time_to_time_t(time);
time              405 ext/openssl/ossl_x509cert.c     return time;
time              428 ext/openssl/ossl_x509cert.c     sec = time_to_time_t(time);
time              434 ext/openssl/ossl_x509cert.c     return time;
time              221 ext/openssl/ossl_x509crl.c     sec = time_to_time_t(time);
time              227 ext/openssl/ossl_x509crl.c     return time;
time              246 ext/openssl/ossl_x509crl.c     sec = time_to_time_t(time);
time              253 ext/openssl/ossl_x509crl.c     return time;
time              132 ext/openssl/ossl_x509revoked.c     sec = time_to_time_t(time);
time              138 ext/openssl/ossl_x509revoked.c     return time;
time              196 ext/openssl/ossl_x509store.c     rb_iv_set(self, "@time", time);
time              197 ext/openssl/ossl_x509store.c     return time;
time              559 ext/openssl/ossl_x509store.c     t = NUM2LONG(rb_Integer(time));
time              563 ext/openssl/ossl_x509store.c     return time;
time              215 ext/syck/rubyext.c     VALUE time;
time              302 ext/syck/rubyext.c         time = rb_funcall(rb_cTime, s_utc, 6, year, mon, day, hour, min, sec);
time              303 ext/syck/rubyext.c         tmp = NUM2LONG(rb_funcall(time, s_to_i, 0)) - tz_offset;
time             1127 ext/tk/tcltklib.c     switch(TYPE(time)) {
time             1131 ext/tk/tcltklib.c         divmod = rb_funcall(time, rb_intern("divmod"), 1, LONG2NUM(1000000));
time             1138 ext/tk/tcltklib.c         divmod = rb_funcall(time, rb_intern("divmod"), 1, INT2FIX(1));
time             1144 ext/tk/tcltklib.c                  RSTRING(rb_funcall(time, ID_inspect, 0, 0))->ptr);
time             1950 ext/zlib/zlib.c 	gz->mtime = time(0);
time             2552 ext/zlib/zlib.c     if (FIXNUM_P(time)) {
time               42 missing/alloca.c -- must know STACK_DIRECTION at compile-time
time              883 missing/strftime.c 	long time();
time              897 missing/strftime.c 	clock = time((long *) 0);
time               35 missing/x68.c      tv->tv_sec = (long)time((time_t*)0);
time             1649 process.c          beg = time(0);
time             1660 process.c          end = time(0) - beg;
time               58 time.c             rb_check_frozen(time);
time               59 time.c             if (!OBJ_TAINTED(time) && rb_safe_level() >= 4)
time               92 time.c             time_modify(time);
time               93 time.c             GetTimeval(time, tobj);
time              101 time.c             return time;
time              139 time.c             VALUE time = time_s_alloc(klass);
time              142 time.c             GetTimeval(time, tobj);
time              147 time.c             return time;
time              166 time.c             switch (TYPE(time)) {
time              168 time.c         	t.tv_sec = FIX2LONG(time);
time              175 time.c         	if (interval && RFLOAT(time)->value < 0.0)
time              180 time.c         	    d = modf(RFLOAT(time)->value, &f);
time              183 time.c         		rb_raise(rb_eRangeError, "%f out of Time range", RFLOAT(time)->value);
time              190 time.c         	t.tv_sec = NUM2LONG(time);
time              198 time.c         		 rb_obj_classname(time), tstr);
time              207 time.c             return time_timeval(time, Qtrue);
time              216 time.c             if (TYPE(time) == T_DATA && RDATA(time)->dfree == time_free) {
time              217 time.c         	GetTimeval(time, tobj);
time              221 time.c             return time_timeval(time, Qfalse);
time              243 time.c             VALUE time, t;
time              245 time.c             if (rb_scan_args(argc, argv, "11", &time, &t) == 2) {
time              246 time.c         	tv.tv_sec = NUM2LONG(time);
time              250 time.c         	tv = rb_time_timeval(time);
time              253 time.c             if (TYPE(time) == T_DATA && RDATA(time)->dfree == time_free) {
time              256 time.c         	GetTimeval(time, tobj);
time              764 time.c             VALUE time;
time              768 time.c             time = time_new_internal(klass, make_time_t(&tm, utc_p), usec);
time              769 time.c             if (utc_p) return time_gmtime(time);
time              770 time.c             return time_localtime(time);
time              837 time.c             GetTimeval(time, tobj);
time              858 time.c             GetTimeval(time, tobj);
time              879 time.c             GetTimeval(time, tobj);
time              967 time.c             GetTimeval(time, tobj);
time              985 time.c             GetTimeval(time, tobj);
time              996 time.c             if (copy == time) return copy;
time              998 time.c             if (TYPE(time) != T_DATA || RDATA(time)->dfree != time_free) {
time             1001 time.c             GetTimeval(time, tobj);
time             1012 time.c             time_init_copy(dup, time);
time             1036 time.c             GetTimeval(time, tobj);
time             1039 time.c         	    return time;
time             1042 time.c         	time_modify(time);
time             1051 time.c             return time;
time             1079 time.c             GetTimeval(time, tobj);
time             1082 time.c         	    return time;
time             1085 time.c         	time_modify(time);
time             1094 time.c             return time;
time             1114 time.c             return time_localtime(time_dup(time));
time             1135 time.c             return time_gmtime(time_dup(time));
time             1141 time.c             if (gmt) return time_gmtime(time);
time             1142 time.c             return time_localtime(time);
time             1161 time.c             GetTimeval(time, tobj);
time             1163 time.c         	time_get_tm(time, tobj->gmt);
time             1191 time.c             GetTimeval(time, tobj);
time             1193 time.c         	time_get_tm(time, tobj->gmt);
time             1324 time.c             GetTimeval(time, tobj);
time             1346 time.c             GetTimeval(time, tobj);
time             1348 time.c         	time_get_tm(time, tobj->gmt);
time             1368 time.c             GetTimeval(time, tobj);
time             1370 time.c         	time_get_tm(time, tobj->gmt);
time             1390 time.c             GetTimeval(time, tobj);
time             1392 time.c         	time_get_tm(time, tobj->gmt);
time             1414 time.c             GetTimeval(time, tobj);
time             1416 time.c         	time_get_tm(time, tobj->gmt);
time             1438 time.c             GetTimeval(time, tobj);
time             1440 time.c         	time_get_tm(time, tobj->gmt);
time             1460 time.c             GetTimeval(time, tobj);
time             1462 time.c         	time_get_tm(time, tobj->gmt);
time             1483 time.c             GetTimeval(time, tobj);
time             1485 time.c         	time_get_tm(time, tobj->gmt);
time             1492 time.c             GetTimeval(time, tobj);\
time             1494 time.c         	time_get_tm(time, tobj->gmt);\
time             1608 time.c             GetTimeval(time, tobj);
time             1610 time.c         	time_get_tm(time, tobj->gmt);
time             1634 time.c             GetTimeval(time, tobj);
time             1636 time.c         	time_get_tm(time, tobj->gmt);
time             1663 time.c             GetTimeval(time, tobj);
time             1665 time.c         	time_get_tm(time, tobj->gmt);
time             1701 time.c             GetTimeval(time, tobj);
time             1703 time.c         	time_get_tm(time, tobj->gmt);
time             1757 time.c             GetTimeval(time, tobj);
time             1759 time.c         	time_get_tm(time, tobj->gmt);
time             1771 time.c         		    time_zone(time));
time             1787 time.c             len = strftime(*buf, SMALLBUF, format, time);
time             1792 time.c         	len = strftime(*buf, size, format, time);
time             1856 time.c             GetTimeval(time, tobj);
time             1858 time.c         	time_get_tm(time, tobj->gmt);
time             1921 time.c             GetTimeval(time, tobj);
time             1964 time.c             str = time_mdump(time);
time             1965 time.c             rb_copy_generic_ivar(str, time);
time             1984 time.c             time_modify(time);
time             2020 time.c             GetTimeval(time, tobj);
time             2025 time.c             return time;
time             2038 time.c             VALUE time = time_s_alloc(klass);
time             2040 time.c             rb_copy_generic_ivar(time, str);
time             2041 time.c             time_mload(time, str);
time             2042 time.c             return time;
time             3822 win32/win32.c      tm = localtime(&time);
time               20 wince/sys/timeb.c 	tp->time     = wce_FILETIME2time_t(&f);
time                7 wince/sys/timeb.h 	time_t time;
time               49 wince/time.h   time_t time( time_t *timer );
time              126 wince/time_wce.c 	__int64 time;
time              130 wince/time_wce.c 	time = t;
time              131 wince/time_wce.c 	time *= _onesec_in100ns;
time              132 wince/time_wce.c 	time += wce_FILETIME2int64(f1970);
time              134 wince/time_wce.c 	f = wce_int642FILETIME(time);
time              263 wince/time_wce.c 	time( &t1 );


time_add

time_add         1274 time.c             return time_add(tobj, time2, 1);
time_add         1309 time.c             return time_add(tobj, time2, -1);


time_asctime

time_asctime     2094 time.c             rb_define_method(rb_cTime, "ctime", time_asctime, 0);
time_asctime     2095 time.c             rb_define_method(rb_cTime, "asctime", time_asctime, 0);


time_dup

time_dup         1114 time.c             return time_localtime(time_dup(time));
time_dup         1135 time.c             return time_gmtime(time_dup(time));


time_free

time_free          47 time.c             obj = Data_Make_Struct(klass, struct time_object, 0, time_free, tobj);
time_free         216 time.c             if (TYPE(time) == T_DATA && RDATA(time)->dfree == time_free) {
time_free         253 time.c             if (TYPE(time) == T_DATA && RDATA(time)->dfree == time_free) {
time_free         905 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
time_free         934 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
time_free         998 time.c             if (TYPE(time) != T_DATA || RDATA(time)->dfree != time_free) {
time_free        1271 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
time_free        1298 time.c             if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {


time_get_tm

time_get_tm       378 time.c         static VALUE time_get_tm(VALUE, int);
time_get_tm      1163 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1193 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1348 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1370 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1392 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1416 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1440 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1462 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1485 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1494 time.c         	time_get_tm(time, tobj->gmt);\
time_get_tm      1610 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1636 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1665 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1703 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1759 time.c         	time_get_tm(time, tobj->gmt);
time_get_tm      1858 time.c         	time_get_tm(time, tobj->gmt);


time_getgmtime

time_getgmtime   2091 time.c             rb_define_method(rb_cTime, "getgm", time_getgmtime, 0);
time_getgmtime   2092 time.c             rb_define_method(rb_cTime, "getutc", time_getgmtime, 0);


time_gmtime

time_gmtime       376 time.c         static VALUE time_gmtime(VALUE);
time_gmtime       769 time.c             if (utc_p) return time_gmtime(time);
time_gmtime      1135 time.c             return time_gmtime(time_dup(time));
time_gmtime      1141 time.c             if (gmt) return time_gmtime(time);
time_gmtime      2088 time.c             rb_define_method(rb_cTime, "gmtime", time_gmtime, 0);
time_gmtime      2089 time.c             rb_define_method(rb_cTime, "utc", time_gmtime, 0);


time_init_copy

time_init_copy   1012 time.c             time_init_copy(dup, time);
time_init_copy   2085 time.c             rb_define_method(rb_cTime, "initialize_copy", time_init_copy, 1);


time_isdst

time_isdst       2114 time.c             rb_define_method(rb_cTime, "isdst", time_isdst, 0);
time_isdst       2115 time.c             rb_define_method(rb_cTime, "dst?", time_isdst, 0);


time_localtime

time_localtime    377 time.c         static VALUE time_localtime(VALUE);
time_localtime    770 time.c             return time_localtime(time);
time_localtime   1114 time.c             return time_localtime(time_dup(time));
time_localtime   1142 time.c             return time_localtime(time);
time_localtime   2087 time.c             rb_define_method(rb_cTime, "localtime", time_localtime, 0);


time_mday

time_mday        2107 time.c             rb_define_method(rb_cTime, "mday", time_mday, 0);
time_mday        2108 time.c             rb_define_method(rb_cTime, "day", time_mday, 0);


time_mdump

time_mdump       1964 time.c             str = time_mdump(time);
time_mdump       2143 time.c             rb_define_method(rb_cTime, "marshal_dump", time_mdump, 0);


time_mload

time_mload       2041 time.c             time_mload(time, str);
time_mload       2144 time.c             rb_define_method(rb_cTime, "marshal_load", time_mload, 1);


time_modify

time_modify        92 time.c             time_modify(time);
time_modify       997 time.c             time_modify(copy);
time_modify      1042 time.c         	time_modify(time);
time_modify      1085 time.c         	time_modify(time);
time_modify      1984 time.c             time_modify(time);


time_mon

time_mon         2109 time.c             rb_define_method(rb_cTime, "mon", time_mon, 0);
time_mon         2110 time.c             rb_define_method(rb_cTime, "month", time_mon, 0);


time_new_internal

time_new_internal  153 time.c             return time_new_internal(rb_cTime, sec, usec);
time_new_internal  252 time.c             t = time_new_internal(klass, tv.tv_sec, tv.tv_usec);
time_new_internal  768 time.c             time = time_new_internal(klass, make_time_t(&tm, utc_p), usec);


time_overflow_p

time_overflow_p   143 time.c             time_overflow_p(&sec, &usec);
time_overflow_p  2018 time.c             time_overflow_p(&sec, &usec);


time_s_alloc

time_s_alloc      139 time.c             VALUE time = time_s_alloc(klass);
time_s_alloc     1011 time.c             VALUE dup = time_s_alloc(rb_cTime);
time_s_alloc     2038 time.c             VALUE time = time_s_alloc(klass);
time_s_alloc     2069 time.c             rb_define_alloc_func(rb_cTime, time_s_alloc);


time_s_mktime

time_s_mktime    2074 time.c             rb_define_singleton_method(rb_cTime, "local", time_s_mktime, -1);
time_s_mktime    2075 time.c             rb_define_singleton_method(rb_cTime, "mktime", time_s_mktime, -1);


time_s_mkutc

time_s_mkutc     2072 time.c             rb_define_singleton_method(rb_cTime, "utc", time_s_mkutc, -1);
time_s_mkutc     2073 time.c             rb_define_singleton_method(rb_cTime, "gm", time_s_mkutc, -1);


time_t

time_t            866 ext/nkf/nkf-utf8/nkf.c                   time_t tb[2];
time_t             71 ext/openssl/ossl_asn1.c time_t
time_t             74 ext/openssl/ossl_asn1.c     return (time_t)NUM2LONG(rb_Integer(time));
time_t            266 ext/openssl/ossl_asn1.c     time_t sec;
time_t            279 ext/openssl/ossl_asn1.c     time_t sec;
time_t             18 ext/openssl/ossl_asn1.h time_t time_to_time_t(VALUE);
time_t            397 ext/openssl/ossl_x509cert.c     time_t sec;
time_t            426 ext/openssl/ossl_x509cert.c     time_t sec;
time_t            219 ext/openssl/ossl_x509crl.c     time_t sec;
time_t            244 ext/openssl/ossl_x509crl.c     time_t sec;
time_t            130 ext/openssl/ossl_x509revoked.c     time_t sec;
time_t            284 ext/syck/rubyext.c         time_t tz_offset = strtol(ptr, NULL, 10) * 3600;
time_t            285 ext/syck/rubyext.c         time_t tmp;
time_t           1252 ext/tk/tcltklib.c     t.tv_sec = (time_t)0;
time_t           1253 ext/tk/tcltklib.c     t.tv_usec = (time_t)(no_event_wait*1000.0);
time_t           1291 ext/tk/tcltklib.c     t.tv_sec = (time_t)0;
time_t           1292 ext/tk/tcltklib.c     t.tv_usec = (time_t)(no_event_wait*1000.0);
time_t           1843 ext/tk/tcltklib.c     t0.tv_sec  = (time_t)0;
time_t           1844 ext/tk/tcltklib.c     t0.tv_usec = (time_t)((NO_THREAD_INTERRUPT_TIME)*1000.0);
time_t           1845 ext/tk/tcltklib.c     t1.tv_sec  = (time_t)0;
time_t           1846 ext/tk/tcltklib.c     t1.tv_usec = (time_t)((WATCHDOG_INTERVAL)*1000.0);
time_t           1719 ext/zlib/zlib.c     time_t mtime;       /* for header */
time_t           2461 ext/zlib/zlib.c     return rb_time_new(get_gzfile(obj)->mtime, (time_t)0);
time_t             44 file.c         VALUE rb_time_new(time_t, time_t);
time_t            206 file.c         	time_t t1 = get_stat(self)->st_mtime;
time_t            207 file.c         	time_t t2 = get_stat(other)->st_mtime;
time_t            524 intern.h       VALUE rb_time_new(time_t, time_t);
time_t             20 missing.h          time_t tv_sec;	/* seconds */
time_t             21 missing.h          time_t tv_usec;	/* microseconds */
time_t             35 missing/x68.c      tv->tv_sec = (long)time((time_t*)0);
time_t            108 time.c         time_overflow_p(time_t *secp, time_t *usecp)
time_t            110 time.c             time_t tmp, sec = *secp, usec = *usecp;
time_t            137 time.c         time_new_internal(VALUE klass, time_t sec, time_t usec)
time_t            151 time.c         rb_time_new(time_t sec, time_t usec)
time_t            181 time.c         	    t.tv_sec = (time_t)f;
time_t            185 time.c         	    t.tv_usec = (time_t)(d*1e6);
time_t            279 time.c         time_arg(int argc, VALUE *argv, struct tm *tm, time_t *usec)
time_t            388 time.c         static time_t
time_t            436 time.c         	   (time_t)(tm_yday +
time_t            462 time.c         static time_t
time_t            465 time.c             time_t guess, guess_lo, guess_hi;
time_t            473 time.c             guess_lo = 1L << (8 * sizeof(time_t) - 1);
time_t            477 time.c             guess_hi = ((time_t)-1) < ((time_t)0) ?
time_t            478 time.c         	       (1UL << (8 * sizeof(time_t) - 1)) - 1 :
time_t            479 time.c         	       ~(time_t)0;
time_t            637 time.c         		time_t guess2;
time_t            716 time.c         static time_t
time_t            719 time.c             time_t t;
time_t            765 time.c             time_t usec;
time_t           1034 time.c             time_t t;
time_t           1077 time.c             time_t t;
time_t           1220 time.c             time_t usec_off, sec, usec;
time_t           1232 time.c             usec_off = (time_t)(d*1e6);
time_t           1714 time.c         	time_t t;
time_t           1918 time.c             time_t t;
time_t           1979 time.c             time_t sec, usec;
time_t           2016 time.c         	usec = (time_t)(s & 0xfffff);
time_t           2891 win32/win32.c      time_t t;
time_t           3181 win32/win32.c  static time_t
time_t           3187 win32/win32.c      time_t t;
time_t           3816 win32/win32.c  unixtime_to_filetime(time_t time, FILETIME *ft)
time_t             18 wince/io.h             time_t      time_create;    /* -1 for FAT file systems */
time_t             19 wince/io.h             time_t      time_access;    /* -1 for FAT file systems */
time_t             20 wince/io.h             time_t      time_write;
time_t             50 wince/sys/stat.h   time_t st_atime;
time_t             51 wince/sys/stat.h   time_t st_mtime;
time_t             52 wince/sys/stat.h   time_t st_ctime;
time_t              7 wince/sys/timeb.h 	time_t time;
time_t              8 wince/sys/utime.h   time_t actime;
time_t              9 wince/sys/utime.h   time_t modtime;
time_t             48 wince/time.h   time_t mktime(struct tm* pt);
time_t             49 wince/time.h   time_t time( time_t *timer );
time_t             50 wince/time.h   struct tm *localtime(const time_t *ptime);
time_t             51 wince/time.h   struct tm *gmtime(const time_t *tod);
time_t             52 wince/time.h   char* ctime( const time_t *t );
time_t             56 wince/time.h   time_t wce_FILETIME2time_t(const FILETIME* pf);
time_t             59 wince/time_wce.c static time_t wce_getYdayFromSYSTEMTIME(const SYSTEMTIME* s)
time_t             69 wince/time_wce.c 	return (time_t)((t/_onesec_in100ns)/(60*60*24));
time_t            107 wince/time_wce.c time_t wce_FILETIME2time_t(const FILETIME* f)
time_t            120 wince/time_wce.c 	return (time_t)(t / _onesec_in100ns);
time_t            123 wince/time_wce.c FILETIME wce_time_t2FILETIME(const time_t t)
time_t            140 wince/time_wce.c time_t time( time_t *timer )
time_t            155 wince/time_wce.c struct tm *localtime( const time_t *timer )
time_t            181 wince/time_wce.c time_t mktime(struct tm* pt)
time_t            196 wince/time_wce.c 	return wce_FILETIME2time_t(&f) - (time_t)diff;
time_t            199 wince/time_wce.c struct tm *gmtime(const time_t *t)
time_t            211 wince/time_wce.c char* ctime( const time_t *t )
time_t            260 wince/time_wce.c 	time_t t1, t2;


time_timeval

time_timeval      207 time.c             return time_timeval(time, Qtrue);
time_timeval      221 time.c             return time_timeval(time, Qfalse);


time_to_i

time_to_i        2079 time.c             rb_define_method(rb_cTime, "to_i", time_to_i, 0);
time_to_i        2132 time.c             rb_define_method(rb_cTime, "tv_sec", time_to_i, 0);


time_to_s

time_to_s        2096 time.c             rb_define_method(rb_cTime, "to_s", time_to_s, 0);
time_to_s        2097 time.c             rb_define_method(rb_cTime, "inspect", time_to_s, 0);


time_to_time_t

time_to_time_t    269 ext/openssl/ossl_asn1.c     sec = time_to_time_t(time);
time_to_time_t    282 ext/openssl/ossl_asn1.c     sec = time_to_time_t(time);
time_to_time_t     18 ext/openssl/ossl_asn1.h time_t time_to_time_t(VALUE);
time_to_time_t    399 ext/openssl/ossl_x509cert.c     sec = time_to_time_t(time);
time_to_time_t    428 ext/openssl/ossl_x509cert.c     sec = time_to_time_t(time);
time_to_time_t    221 ext/openssl/ossl_x509crl.c     sec = time_to_time_t(time);
time_to_time_t    246 ext/openssl/ossl_x509crl.c     sec = time_to_time_t(time);
time_to_time_t    132 ext/openssl/ossl_x509revoked.c     sec = time_to_time_t(time);


time_usec

time_usec        2133 time.c             rb_define_method(rb_cTime, "tv_usec", time_usec, 0);
time_usec        2134 time.c             rb_define_method(rb_cTime, "usec", time_usec, 0);


time_utc_offset

time_utc_offset  2117 time.c             rb_define_method(rb_cTime, "gmtoff", time_utc_offset, 0);
time_utc_offset  2118 time.c             rb_define_method(rb_cTime, "gmt_offset", time_utc_offset, 0);
time_utc_offset  2119 time.c             rb_define_method(rb_cTime, "utc_offset", time_utc_offset, 0);


time_utc_or_local

time_utc_or_local  797 time.c             return time_utc_or_local(argc, argv, Qtrue, klass);
time_utc_or_local  816 time.c             return time_utc_or_local(argc, argv, Qfalse, klass);


time_utc_p

time_utc_p       2121 time.c             rb_define_method(rb_cTime, "utc?", time_utc_p, 0);
time_utc_p       2122 time.c             rb_define_method(rb_cTime, "gmt?", time_utc_p, 0);


time_zone

time_zone        1771 time.c         		    time_zone(time));
time_zone        2116 time.c             rb_define_method(rb_cTime, "zone", time_zone, 0);


timeofday

timeofday        10541 eval.c         	    if (now < 0.0) now = timeofday();
timeofday        10610 eval.c          	    if (now < 0.0) now = timeofday();
timeofday        10773 eval.c         	limit = timeofday()+(double)time.tv_sec+(double)time.tv_usec*1e-6;
timeofday        10794 eval.c         	    d = limit - timeofday();
timeofday        10807 eval.c             date = timeofday() + (double)time.tv_sec + (double)time.tv_usec*1e-6;
timeofday        10841 eval.c         	limit = timeofday()+
timeofday        10871 eval.c         			double d = limit - timeofday();
timeofday        10898 eval.c         	curr_thread->delay = timeofday() +
timeofday        10928 eval.c         	curr_thread->delay = timeofday() + limit;
timeofday        11279 eval.c         	curr_thread->delay = timeofday() + (double)0.06;


times

times            2231 array.c            tmp = rb_check_string_type(times);
times            2236 array.c            len = NUM2LONG(times);
times            3537 process.c          times(&buf);
times            1073 regexec.c      #define GETTIME(t)         times(&(t))
times             375 string.c           len = NUM2LONG(times);
times            3853 win32/win32.c      if (unixtime_to_filetime(times->actime, &atime)) {
times            3856 win32/win32.c      if (unixtime_to_filetime(times->modtime, &mtime)) {


tkNone_to_s

tkNone_to_s      1592 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(TK_None, "to_s", tkNone_to_s, 0);
tkNone_to_s      1593 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(TK_None, "inspect", tkNone_to_s, 0);


tk_conv_args

tk_conv_args     1611 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(mTK, "_conv_args", tk_conv_args, -1);
tk_conv_args     1624 ext/tk/tkutil/tkutil.c     rb_define_method(mTK, "_conv_args", tk_conv_args, -1);


tk_fromUTF8

tk_fromUTF8       200 ext/tk/tkutil/tkutil.c     return tk_fromUTF8(1, argv, self);
tk_fromUTF8      1619 ext/tk/tkutil/tkutil.c     rb_define_method(mTK, "_fromUTF8", tk_fromUTF8, -1);


tk_funcall

tk_funcall        123 ext/tk/tcltklib.c static VALUE tk_funcall _((VALUE(), int, VALUE*, VALUE));
tk_funcall       4985 ext/tk/tcltklib.c     return tk_funcall(ip_create_slave_core, 2, callargv, self);
tk_funcall       5083 ext/tk/tcltklib.c     return tk_funcall(ip_create_console_core, 0, (VALUE*)NULL, self);
tk_funcall       5133 ext/tk/tcltklib.c     return tk_funcall(ip_make_safe_core, 0, (VALUE*)NULL, self);
tk_funcall       5948 ext/tk/tcltklib.c     return tk_funcall(lib_restart_core, 0, (VALUE*)NULL, self);
tk_funcall       7102 ext/tk/tcltklib.c     retval = tk_funcall(ip_get_variable2_core, 3, argv, self);
tk_funcall       7238 ext/tk/tcltklib.c     retval = tk_funcall(ip_set_variable2_core, 4, argv, self);
tk_funcall       7310 ext/tk/tcltklib.c     retval = tk_funcall(ip_unset_variable2_core, 3, argv, self);


tk_get_eval_enc_str

tk_get_eval_enc_str 1610 ext/tk/tkutil/tkutil.c                                tk_get_eval_enc_str, 1);
tk_get_eval_enc_str 1623 ext/tk/tkutil/tkutil.c     rb_define_method(mTK, "_get_eval_enc_str", tk_get_eval_enc_str, 1);


tk_get_eval_string

tk_get_eval_string 1608 ext/tk/tkutil/tkutil.c                                tk_get_eval_string, -1);
tk_get_eval_string 1622 ext/tk/tkutil/tkutil.c     rb_define_method(mTK, "_get_eval_string", tk_get_eval_string, -1);


tk_hash_kv

tk_hash_kv       1606 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(mTK, "hash_kv", tk_hash_kv, -1);
tk_hash_kv       1621 ext/tk/tkutil/tkutil.c     rb_define_method(mTK, "hash_kv", tk_hash_kv, -1);


tk_install_cmd_core

tk_install_cmd_core  132 ext/tk/tkutil/tkutil.c     return tk_install_cmd_core(cmd);
tk_install_cmd_core  139 ext/tk/tkutil/tkutil.c     return tk_install_cmd_core(cmd);
tk_install_cmd_core  838 ext/tk/tkutil/tkutil.c                 return tk_install_cmd_core(obj);


tk_stubs_init_p

tk_stubs_init_p   277 ext/tk/stubs.c     if (tk_stubs_init_p()) {
tk_stubs_init_p   313 ext/tk/stubs.c     if (tk_stubs_init_p()) {
tk_stubs_init_p     7 ext/tk/stubs.h extern int tk_stubs_init_p();
tk_stubs_init_p  1224 ext/tk/tcltklib.c     if (tk_stubs_init_p()) {
tk_stubs_init_p  1405 ext/tk/tcltklib.c             if (check_root && tk_stubs_init_p() && Tk_GetNumMainWindows() == 0) {
tk_stubs_init_p  1585 ext/tk/tcltklib.c                 if (check_root && tk_stubs_init_p() && Tk_GetNumMainWindows() == 0) {
tk_stubs_init_p  1885 ext/tk/tcltklib.c     } while(!check || !tk_stubs_init_p() || Tk_GetNumMainWindows() != 0);
tk_stubs_init_p  3505 ext/tk/tcltklib.c         if (!tk_stubs_init_p() || Tk_MainWindow(interp) == (Tk_Window)NULL) {
tk_stubs_init_p  3602 ext/tk/tcltklib.c         if (!tk_stubs_init_p() || Tk_MainWindow(interp) == (Tk_Window)NULL) {
tk_stubs_init_p  4067 ext/tk/tcltklib.c         if (!tk_stubs_init_p() || Tk_MainWindow(interp) == (Tk_Window)NULL) {
tk_stubs_init_p  4156 ext/tk/tcltklib.c         if (!tk_stubs_init_p() || Tk_MainWindow(interp) == (Tk_Window)NULL) {
tk_stubs_init_p  4400 ext/tk/tcltklib.c     if (tk_stubs_init_p() && Tk_MainWindow(ip) != (Tk_Window)NULL) {
tk_stubs_init_p  4898 ext/tk/tcltklib.c         if (!tk_stubs_init_p()) {
tk_stubs_init_p  4930 ext/tk/tcltklib.c     mainWin = (tk_stubs_init_p())? Tk_MainWindow(slave->ip): (Tk_Window)NULL;
tk_stubs_init_p  5032 ext/tk/tcltklib.c     if (!tk_stubs_init_p()) {
tk_stubs_init_p  5108 ext/tk/tcltklib.c     mainWin = (tk_stubs_init_p())? Tk_MainWindow(ptr->ip): (Tk_Window)NULL;
tk_stubs_init_p  5194 ext/tk/tcltklib.c     mainWin = (tk_stubs_init_p())? Tk_MainWindow(ptr->ip): (Tk_Window)NULL;
tk_stubs_init_p  5297 ext/tk/tcltklib.c     if (deleted_ip(ptr) || !tk_stubs_init_p()) {


tk_symbolkey2str

tk_symbolkey2str 1605 ext/tk/tkutil/tkutil.c     rb_define_singleton_method(mTK, "_symbolkey2str", tk_symbolkey2str, 1);
tk_symbolkey2str 1620 ext/tk/tkutil/tkutil.c     rb_define_method(mTK, "_symbolkey2str", tk_symbolkey2str, 1);


tk_toUTF8

tk_toUTF8         189 ext/tk/tkutil/tkutil.c     return tk_toUTF8(1, argv, self);
tk_toUTF8        1618 ext/tk/tkutil/tkutil.c     rb_define_method(mTK, "_toUTF8", tk_toUTF8, -1);


tkstr_to_number

tkstr_to_number  1032 ext/tk/tkutil/tkutil.c     return tkstr_to_number(value);
tkstr_to_number  1072 ext/tk/tkutil/tkutil.c     return rb_rescue2(tkstr_to_number, value,


tkstr_to_str

tkstr_to_str     1060 ext/tk/tkutil/tkutil.c     return tkstr_to_str(value);
tkstr_to_str     1073 ext/tk/tkutil/tkutil.c                       tkstr_to_str, value,


tmcmp

tmcmp             484 time.c         	d = tmcmp(tptr, tm);
tmcmp             496 time.c         	    d = tmcmp(tptr, tm);
tmcmp             507 time.c             d = tmcmp(tptr, tm);
tmcmp             514 time.c             d = tmcmp(tptr, tm);
tmcmp             613 time.c         	d = tmcmp(tptr, tm);
tmcmp             653 time.c         				if (tmcmp(tptr, tm) == 0) {
tmcmp             678 time.c         				if (tmcmp(tptr, tm) == 0) {


to_ary

to_ary            963 array.c        	return to_ary(obj);
to_ary           2002 array.c        	tmp = to_ary(rb_ary_elt(ary, i));
to_ary           2039 array.c            orig = to_ary(orig);
to_ary           2180 array.c            y = to_ary(y);
to_ary           2202 array.c            y = to_ary(y);
to_ary           2464 array.c            ary2 = to_ary(ary2);
to_ary           2517 array.c            hash = ary_make_hash(to_ary(ary2), 0);
to_ary           2544 array.c            ary2 = to_ary(ary2);
to_ary           2577 array.c            ary2 = to_ary(ary2);


to_char

to_char           380 missing/vsnprintf.c 			*--cp = to_char(val);
to_char           390 missing/vsnprintf.c 			*--cp = to_char(val % 10);
to_char           395 missing/vsnprintf.c 			*--cp = to_char(sval % 10);
to_char           402 missing/vsnprintf.c 			*--cp = to_char(val & 7);
to_char          1072 missing/vsnprintf.c 			*--t = to_char(exp % 10);
to_char          1074 missing/vsnprintf.c 		*--t = to_char(exp);
to_char          1079 missing/vsnprintf.c 		*p++ = to_char(exp);


to_digit

to_digit          354 missing/vsnprintf.c #define is_digit(c)	((unsigned)to_digit(c) <= 9)
to_digit          630 missing/vsnprintf.c 				n = 10 * n + to_digit(ch);
to_digit          647 missing/vsnprintf.c 				n = 10 * n + to_digit(ch);


to_hash

to_hash           871 hash.c             hash2 = to_hash(hash2);
to_hash          1464 hash.c             hash2 = to_hash(hash2);
to_hash          2230 hash.c             hash = to_hash(hash);
to_hash          2256 hash.c             hash = to_hash(hash);


tok

tok               294 ext/racc/cparse/cparse.c     VALUE tok, val;
tok               299 ext/racc/cparse/cparse.c     extract_user_token(v, block_args, &tok, &val);
tok               300 ext/racc/cparse/cparse.c     parse_main(v, tok, val, 1);
tok               390 ext/racc/cparse/cparse.c         *tok = Qfalse;
tok               409 ext/racc/cparse/cparse.c     *tok = AREF(block_args, 0);
tok               413 ext/racc/cparse/cparse.c #define SHIFT(v,act,tok,val) shift(v,act,tok,val)
tok               468 ext/racc/cparse/cparse.c                 extract_user_token(v, tmp, &tok, &val);
tok               471 ext/racc/cparse/cparse.c             tmp = rb_hash_aref(v->token_table, tok);
tok               476 ext/racc/cparse/cparse.c                            3, v->t, tok, val);
tok               646 ext/racc/cparse/cparse.c         PUSH(v->tstack, tok);
tok               648 ext/racc/cparse/cparse.c                    3, tok, v->tstack, v->vstack);
tok               274 ext/ripper/eventids2.c         if (a->token == tok)
tok               277 ext/ripper/eventids2.c     if (tok < 256) {
tok               280 ext/ripper/eventids2.c     rb_raise(rb_eRuntimeError, "[Ripper FATAL] unknown token %d", tok);
tok                56 ext/syck/bytecode.c #define FORCE_NEXT_TOKEN(tok)    parser->force_token = tok;
tok               962 ext/syck/bytecode.c     char *tok;
tok               967 ext/syck/bytecode.c     tok = YYCURSOR;
tok               993 ext/syck/bytecode.c {   YYCURSOR = tok;
tok              1004 ext/syck/bytecode.c {   CAT(str, cap, idx, tok[0]);
tok              1012 ext/syck/bytecode.c {   YYCURSOR = tok;
tok              1029 ext/syck/bytecode.c {   CHK_NL(tok+1);
tok              1051 ext/syck/bytecode.c {   CHK_NL(tok+1);
tok              1052 ext/syck/bytecode.c             if ( tok + 2 < YYCURSOR )
tok              1054 ext/syck/bytecode.c                 char *count = tok + 2;
tok              1073 ext/syck/bytecode.c {   CHK_NL(tok+1);
tok              1105 ext/syck/bytecode.c     char *tok;
tok              1111 ext/syck/bytecode.c         tok = YYCURSOR;
tok              1142 ext/syck/bytecode.c {   CAT(str, cap, idx, tok[0]);
tok              1150 ext/syck/bytecode.c {   YYCURSOR = tok;
tok                55 ext/syck/token.c #define FORCE_NEXT_TOKEN(tok)    parser->force_token = tok;
tok              1537 ext/syck/token.c                         char *tok = YYTOKEN;
tok              1538 ext/syck/token.c                         GOBBLE_UP_YAML_INDENT( indt_len, tok );
tok              2401 ext/syck/token.c                         char *tok = YYTOKEN;
tok              2403 ext/syck/token.c                         GOBBLE_UP_YAML_INDENT( indt_len, tok );
tok              5030 parse.y        		  toklen() > 1 ? "s" : "", tok());
tok              5203 parse.y            set_yylval_str(rb_str_new(tok(), toklen()));
tok              5268 parse.y        				  rb_str_new(tok(), toklen()),	/* nd_lit */
tok              5387 parse.y        		set_yylval_str(rb_str_new(tok(), toklen()));
tok              5393 parse.y        	str = rb_str_new(tok(), toklen());
tok              6120 parse.y        		    set_yylval_literal(rb_cstr_to_inum(tok(), 16, Qfalse));
tok              6144 parse.y        		    set_yylval_literal(rb_cstr_to_inum(tok(), 2, Qfalse));
tok              6168 parse.y        		    set_yylval_literal(rb_cstr_to_inum(tok(), 10, Qfalse));
tok              6199 parse.y        			set_yylval_literal(rb_cstr_to_inum(tok(), 8, Qfalse));
tok              6289 parse.y        		double d = strtod(tok(), 0);
tok              6291 parse.y        		    rb_warnS("Float %s out of range", tok());
tok              6297 parse.y        	    set_yylval_literal(rb_cstr_to_inum(tok(), 10, Qfalse));
tok              6607 parse.y        	    set_yylval_id(rb_intern(tok()));
tok              6623 parse.y        	    set_yylval_id(rb_intern(tok()));
tok              6653 parse.y        	    set_yylval_node(NEW_NTH_REF(atoi(tok()+1)));
tok              6730 parse.y            if ((c == '!' || c == '?') && is_identchar(tok()[0]) && !peek('=')) {
tok              6742 parse.y        	switch (tok()[0]) {
tok              6749 parse.y        	    if (tok()[1] == '@')
tok              6771 parse.y        		if (result == 0 && ISUPPER(tok()[0])) {
tok              6783 parse.y        		kw = rb_reserved_word(tok(), toklen());
tok              6819 parse.y        		    set_yylval_id(rb_intern(tok()));
tok              6838 parse.y        	    ID ident = rb_intern(tok());
tok              2301 regparse.c       tok->type = TK_INTERVAL;
tok              2302 regparse.c       tok->u.repeat.lower = low;
tok              2303 regparse.c       tok->u.repeat.upper = up;
tok              2616 regparse.c         tok->type = TK_EOT;
tok              2617 regparse.c         return tok->type;
tok              2621 regparse.c       tok->type = TK_CHAR;
tok              2622 regparse.c       tok->base = 0;
tok              2623 regparse.c       tok->u.c  = c;
tok              2624 regparse.c       tok->escaped = 0;
tok              2627 regparse.c         tok->type = TK_CC_CLOSE;
tok              2630 regparse.c         tok->type = TK_CC_RANGE;
tok              2639 regparse.c         tok->escaped = 1;
tok              2640 regparse.c         tok->u.c = c;
tok              2643 regparse.c           tok->type = TK_CHAR_TYPE;
tok              2644 regparse.c           tok->u.subtype = CTYPE_WORD;
tok              2647 regparse.c           tok->type = TK_CHAR_TYPE;
tok              2648 regparse.c           tok->u.subtype = CTYPE_NOT_WORD;
tok              2651 regparse.c           tok->type = TK_CHAR_TYPE;
tok              2652 regparse.c           tok->u.subtype = CTYPE_DIGIT;
tok              2655 regparse.c           tok->type = TK_CHAR_TYPE;
tok              2656 regparse.c           tok->u.subtype = CTYPE_NOT_DIGIT;
tok              2659 regparse.c           tok->type = TK_CHAR_TYPE;
tok              2660 regparse.c           tok->u.subtype = CTYPE_WHITE_SPACE;
tok              2663 regparse.c           tok->type = TK_CHAR_TYPE;
tok              2664 regparse.c           tok->u.subtype = CTYPE_NOT_WHITE_SPACE;
tok              2668 regparse.c           tok->type = TK_CHAR_TYPE;
tok              2669 regparse.c           tok->u.subtype = CTYPE_XDIGIT;
tok              2673 regparse.c           tok->type = TK_CHAR_TYPE;
tok              2674 regparse.c           tok->u.subtype = CTYPE_NOT_XDIGIT;
tok              2683 regparse.c     	tok->type = TK_CHAR_PROPERTY;
tok              2684 regparse.c     	tok->u.prop.not = (c == 'P' ? 1 : 0);
tok              2689 regparse.c     	    tok->u.prop.not = (tok->u.prop.not == 0 ? 1 : 0);
tok              2713 regparse.c     	  tok->type   = TK_CODE_POINT;
tok              2714 regparse.c     	  tok->base   = 16;
tok              2715 regparse.c     	  tok->u.code = (OnigCodePoint )num;
tok              2728 regparse.c     	tok->type = TK_RAW_BYTE;
tok              2729 regparse.c     	tok->base = 16;
tok              2730 regparse.c     	tok->u.c  = num;
tok              2744 regparse.c     	tok->type   = TK_CODE_POINT;
tok              2745 regparse.c     	tok->base   = 16;
tok              2746 regparse.c     	tok->u.code = (OnigCodePoint )num;
tok              2760 regparse.c     	tok->type = TK_RAW_BYTE;
tok              2761 regparse.c     	tok->base = 8;
tok              2762 regparse.c     	tok->u.c  = num;
tok              2770 regparse.c           if (tok->u.c != num) {
tok              2771 regparse.c     	tok->u.code = (OnigCodePoint )num;
tok              2772 regparse.c     	tok->type   = TK_CODE_POINT;
tok              2780 regparse.c           tok->backp = p; /* point at '[' is readed */
tok              2784 regparse.c     	tok->type = TK_POSIX_BRACKET_OPEN;
tok              2794 regparse.c     	tok->type = TK_CC_CC_OPEN;
tok              2805 regparse.c           tok->type = TK_CC_AND;
tok              2811 regparse.c       return tok->type;
tok              2827 regparse.c         tok->type = TK_EOT;
tok              2828 regparse.c         return tok->type;
tok              2831 regparse.c       tok->type  = TK_STRING;
tok              2832 regparse.c       tok->base  = 0;
tok              2833 regparse.c       tok->backp = p;
tok              2839 regparse.c         tok->backp = p;
tok              2842 regparse.c         tok->u.c = c;
tok              2843 regparse.c         tok->escaped = 1;
tok              2847 regparse.c           tok->type = TK_OP_REPEAT;
tok              2848 regparse.c           tok->u.repeat.lower = 0;
tok              2849 regparse.c           tok->u.repeat.upper = REPEAT_INFINITE;
tok              2855 regparse.c           tok->type = TK_OP_REPEAT;
tok              2856 regparse.c           tok->u.repeat.lower = 1;
tok              2857 regparse.c           tok->u.repeat.upper = REPEAT_INFINITE;
tok              2863 regparse.c           tok->type = TK_OP_REPEAT;
tok              2864 regparse.c           tok->u.repeat.lower = 0;
tok              2865 regparse.c           tok->u.repeat.upper = 1;
tok              2870 regparse.c     	tok->u.repeat.greedy     = 0;
tok              2871 regparse.c     	tok->u.repeat.possessive = 0;
tok              2877 regparse.c     	      tok->type != TK_INTERVAL)  ||
tok              2879 regparse.c     	      tok->type == TK_INTERVAL))) {
tok              2881 regparse.c     	  tok->u.repeat.greedy     = 1;
tok              2882 regparse.c     	  tok->u.repeat.possessive = 1;
tok              2885 regparse.c     	  tok->u.repeat.greedy     = 1;
tok              2886 regparse.c     	  tok->u.repeat.possessive = 0;
tok              2893 regparse.c           r = fetch_range_qualifier(&p, end, tok, env);
tok              2907 regparse.c           tok->type = TK_ALT;
tok              2912 regparse.c           tok->type = TK_SUBEXP_OPEN;
tok              2917 regparse.c           tok->type = TK_SUBEXP_CLOSE;
tok              2922 regparse.c           tok->type = TK_CHAR_TYPE;
tok              2923 regparse.c           tok->u.subtype = CTYPE_WORD;
tok              2928 regparse.c           tok->type = TK_CHAR_TYPE;
tok              2929 regparse.c           tok->u.subtype = CTYPE_NOT_WORD;
tok              2934 regparse.c           tok->type = TK_ANCHOR;
tok              2935 regparse.c           tok->u.anchor = ANCHOR_WORD_BOUND;
tok              2940 regparse.c           tok->type = TK_ANCHOR;
tok              2941 regparse.c           tok->u.anchor = ANCHOR_NOT_WORD_BOUND;
tok              2947 regparse.c           tok->type = TK_ANCHOR;
tok              2948 regparse.c           tok->u.anchor = ANCHOR_WORD_BEGIN;
tok              2953 regparse.c           tok->type = TK_ANCHOR;
tok              2954 regparse.c           tok->u.anchor = ANCHOR_WORD_END;
tok              2960 regparse.c           tok->type = TK_CHAR_TYPE;
tok              2961 regparse.c           tok->u.subtype = CTYPE_WHITE_SPACE;
tok              2966 regparse.c           tok->type = TK_CHAR_TYPE;
tok              2967 regparse.c           tok->u.subtype = CTYPE_NOT_WHITE_SPACE;
tok              2972 regparse.c           tok->type = TK_CHAR_TYPE;
tok              2973 regparse.c           tok->u.subtype = CTYPE_DIGIT;
tok              2978 regparse.c           tok->type = TK_CHAR_TYPE;
tok              2979 regparse.c           tok->u.subtype = CTYPE_NOT_DIGIT;
tok              2984 regparse.c           tok->type = TK_CHAR_TYPE;
tok              2985 regparse.c           tok->u.subtype = CTYPE_XDIGIT;
tok              2990 regparse.c           tok->type = TK_CHAR_TYPE;
tok              2991 regparse.c           tok->u.subtype = CTYPE_NOT_XDIGIT;
tok              2997 regparse.c           tok->type = TK_ANCHOR;
tok              2998 regparse.c           tok->u.subtype = ANCHOR_BEGIN_BUF;
tok              3003 regparse.c           tok->type = TK_ANCHOR;
tok              3004 regparse.c           tok->u.subtype = ANCHOR_SEMI_END_BUF;
tok              3010 regparse.c           tok->type = TK_ANCHOR;
tok              3011 regparse.c           tok->u.subtype = ANCHOR_END_BUF;
tok              3016 regparse.c           tok->type = TK_ANCHOR;
tok              3017 regparse.c           tok->u.subtype = ANCHOR_BEGIN_POSITION;
tok              3045 regparse.c     	  tok->type   = TK_CODE_POINT;
tok              3046 regparse.c     	  tok->u.code = (OnigCodePoint )num;
tok              3059 regparse.c     	tok->type = TK_RAW_BYTE;
tok              3060 regparse.c     	tok->base = 16;
tok              3061 regparse.c     	tok->u.c  = num;
tok              3075 regparse.c     	tok->type   = TK_CODE_POINT;
tok              3076 regparse.c     	tok->base   = 16;
tok              3077 regparse.c     	tok->u.code = (OnigCodePoint )num;
tok              3097 regparse.c     	tok->type = TK_BACKREF;
tok              3098 regparse.c     	tok->u.backref.num     = 1;
tok              3099 regparse.c     	tok->u.backref.ref1    = num;
tok              3100 regparse.c     	tok->u.backref.by_name = 0;
tok              3121 regparse.c     	tok->type = TK_RAW_BYTE;
tok              3122 regparse.c     	tok->base = 8;
tok              3123 regparse.c     	tok->u.c  = num;
tok              3156 regparse.c     	  tok->type = TK_BACKREF;
tok              3157 regparse.c     	  tok->u.backref.by_name = 1;
tok              3159 regparse.c     	    tok->u.backref.num  = 1;
tok              3160 regparse.c     	    tok->u.backref.ref1 = backs[0];
tok              3163 regparse.c     	    tok->u.backref.num  = num;
tok              3164 regparse.c     	    tok->u.backref.refs = backs;
tok              3184 regparse.c     	  tok->type = TK_CALL;
tok              3185 regparse.c     	  tok->u.call.name     = prev;
tok              3186 regparse.c     	  tok->u.call.name_end = name_end;
tok              3196 regparse.c     	tok->type = TK_QUOTE_OPEN;
tok              3205 regparse.c     	tok->type = TK_CHAR_PROPERTY;
tok              3206 regparse.c     	tok->u.prop.not = (c == 'P' ? 1 : 0);
tok              3211 regparse.c     	    tok->u.prop.not = (tok->u.prop.not == 0 ? 1 : 0);
tok              3224 regparse.c           if (tok->u.c != num) {
tok              3225 regparse.c     	tok->type = TK_CODE_POINT;
tok              3226 regparse.c     	tok->u.code = (OnigCodePoint )num;
tok              3229 regparse.c     	p = tok->backp + enc_len(enc, tok->backp);
tok              3235 regparse.c         tok->u.c = c;
tok              3236 regparse.c         tok->escaped = 0;
tok              3250 regparse.c     	tok->type = TK_ANYCHAR_ANYTIME;
tok              3262 regparse.c           tok->type = TK_ANYCHAR;
tok              3270 regparse.c           tok->type = TK_OP_REPEAT;
tok              3271 regparse.c           tok->u.repeat.lower = 0;
tok              3272 regparse.c           tok->u.repeat.upper = REPEAT_INFINITE;
tok              3281 regparse.c           tok->type = TK_OP_REPEAT;
tok              3282 regparse.c           tok->u.repeat.lower = 1;
tok              3283 regparse.c           tok->u.repeat.upper = REPEAT_INFINITE;
tok              3292 regparse.c           tok->type = TK_OP_REPEAT;
tok              3293 regparse.c           tok->u.repeat.lower = 0;
tok              3294 regparse.c           tok->u.repeat.upper = 1;
tok              3300 regparse.c           r = fetch_range_qualifier(&p, end, tok, env);
tok              3314 regparse.c           tok->type = TK_ALT;
tok              3339 regparse.c           tok->type = TK_SUBEXP_OPEN;
tok              3344 regparse.c           tok->type = TK_SUBEXP_CLOSE;
tok              3349 regparse.c           tok->type = TK_ANCHOR;
tok              3350 regparse.c           tok->u.subtype = (IS_SINGLELINE(env->option)
tok              3356 regparse.c           tok->type = TK_ANCHOR;
tok              3357 regparse.c           tok->u.subtype = (IS_SINGLELINE(env->option)
tok              3363 regparse.c           tok->type = TK_CC_OPEN;
tok              3398 regparse.c       return tok->type;
tok              3766 regparse.c       if (tok->u.prop.not != 0) CCLASS_SET_NOT(cc);
tok              3923 regparse.c       r = fetch_token_in_cc(tok, src, end, env);
tok              3924 regparse.c       if (r == TK_CHAR && tok->u.c == '^' && tok->escaped == 0) {
tok              3926 regparse.c         r = fetch_token_in_cc(tok, src, end, env);
tok              3939 regparse.c         r = tok->type = TK_CHAR;  /* allow []...] */
tok              3953 regparse.c           len = ONIGENC_CODE_TO_MBCLEN(env->enc, tok->u.c);
tok              3961 regparse.c           v = (OnigCodePoint )tok->u.c;
tok              3968 regparse.c           if (! ONIGENC_IS_SINGLEBYTE(env->enc) && tok->base != 0) {
tok              3972 regparse.c     	int i, base = tok->base;
tok              3974 regparse.c     	buf[0] = tok->u.c;
tok              3976 regparse.c     	  r = fetch_token_in_cc(tok, &p, end, env);
tok              3978 regparse.c     	  if (r != TK_RAW_BYTE || tok->base != base) {
tok              3982 regparse.c     	  buf[i] = tok->u.c;
tok              3998 regparse.c     	    r = fetch_token_in_cc(tok, &p, end, env);
tok              4013 regparse.c     	v = (OnigCodePoint )tok->u.c;
tok              4022 regparse.c           v = tok->u.code;
tok              4042 regparse.c     	p = tok->backp;
tok              4043 regparse.c     	v = (OnigCodePoint )tok->u.c;
tok              4053 regparse.c     	ctype = parse_ctype_to_enc_ctype(tok->u.subtype, &not);
tok              4069 regparse.c     	r = add_ctype_to_cc(cc, ctype, tok->u.prop.not, env);
tok              4077 regparse.c     	r = fetch_token_in_cc(tok, &p, end, env);
tok              4094 regparse.c     	v = (OnigCodePoint )tok->u.c;
tok              4097 regparse.c     	r = fetch_token_in_cc(tok, &p, end, env);
tok              4111 regparse.c     	r = fetch_token_in_cc(tok, &p, end, env);
tok              4134 regparse.c     	r = parse_char_class(&anode, tok, &p, end, env);
tok              4180 regparse.c           r = tok->type;
tok              4182 regparse.c           r = fetch_token_in_cc(tok, &p, end, env);
tok              4262 regparse.c           r = fetch_token(tok, &p, end, env);
tok              4264 regparse.c           r = parse_subexp(np, tok, term, &p, end, env);
tok              4402 regparse.c     	    r = fetch_token(tok, &p, end, env);
tok              4404 regparse.c     	    r = parse_subexp(&target, tok, term, &p, end, env);
tok              4437 regparse.c       r = fetch_token(tok, &p, end, env);
tok              4439 regparse.c       r = parse_subexp(&target, tok, term, &p, end, env);
tok              4686 regparse.c       if (tok->type == term)
tok              4689 regparse.c       switch (tok->type) {
tok              4694 regparse.c       return tok->type;
tok              4698 regparse.c         r = parse_effect(np, tok, TK_SUBEXP_CLOSE, src, end, env);
tok              4706 regparse.c           r = fetch_token(tok, src, end, env);
tok              4708 regparse.c           r = parse_subexp(&target, tok, term, src, end, env);
tok              4712 regparse.c           return tok->type;
tok              4720 regparse.c         if (tok->escaped) goto tk_raw_byte;
tok              4727 regparse.c           *np = node_new_str(tok->backp, *src);
tok              4731 regparse.c     	r = fetch_token(tok, src, end, env);
tok              4735 regparse.c     	r = onig_node_str_cat(*np, tok->backp, *src);
tok              4748 regparse.c           *np = node_new_str_raw_char((UChar )tok->u.c);
tok              4752 regparse.c     	r = fetch_token(tok, src, end, env);
tok              4763 regparse.c     	r = node_str_cat_char(*np, (UChar )tok->u.c);
tok              4773 regparse.c           int num = ONIGENC_CODE_TO_MBC(env->enc, tok->u.code, buf);
tok              4804 regparse.c           switch (tok->u.subtype) {
tok              4807 regparse.c     	*np = node_new_ctype(tok->u.subtype);
tok              4824 regparse.c     	  ctype = parse_ctype_to_enc_ctype(tok->u.subtype, &not);
tok              4869 regparse.c                 ctype = parse_ctype_to_enc_ctype(tok->u.subtype, &not);
tok              4889 regparse.c         r = parse_char_property(np, tok, src, end, env);
tok              4897 regparse.c           r = parse_char_class(np, tok, src, end, env);
tok              4971 regparse.c         len = tok->u.backref.num;
tok              4973 regparse.c     	       (len > 1 ? tok->u.backref.refs : &(tok->u.backref.ref1)),
tok              4974 regparse.c     	        tok->u.backref.by_name, env);
tok              4980 regparse.c         *np = node_new_call(tok->u.call.name, tok->u.call.name_end);
tok              4987 regparse.c         *np = onig_node_new_anchor(tok->u.anchor);
tok              5012 regparse.c         r = fetch_token(tok, src, end, env);
tok              5020 regparse.c           qn = node_new_qualifier(tok->u.repeat.lower, tok->u.repeat.upper,
tok              5023 regparse.c           NQUALIFIER(qn).greedy = tok->u.repeat.greedy;
tok              5027 regparse.c           if (tok->u.repeat.possessive != 0) {
tok              5062 regparse.c       r = parse_exp(&node, tok, term, src, end, env);
tok              5072 regparse.c           r = parse_exp(&node, tok, term, src, end, env);
tok              5099 regparse.c       r = parse_branch(&node, tok, term, src, end, env);
tok              5112 regparse.c           r = fetch_token(tok, src, end, env);
tok              5114 regparse.c           r = parse_branch(&node, tok, term, src, end, env);
tok              5121 regparse.c         if (tok->type != term)
tok              5139 regparse.c       OnigToken tok;
tok              5141 regparse.c       r = fetch_token(&tok, src, end, env);
tok              5143 regparse.c       r = parse_subexp(top, &tok, TK_EOT, src, end, env);


tokadd

tokadd           4916 parse.y        	    tokadd('\\');
tokadd           4917 parse.y        	    tokadd(c);
tokadd           4925 parse.y        		tokadd(c);
tokadd           4934 parse.y        	    tokadd('\\');
tokadd           4935 parse.y        	    tokadd(c);
tokadd           4942 parse.y        		tokadd(nextc());
tokadd           4952 parse.y        	tokadd('\\'); tokadd('M'); tokadd('-');
tokadd           4961 parse.y        	tokadd('\\'); tokadd('C'); tokadd('-');
tokadd           4965 parse.y        	tokadd('\\'); tokadd('c');
tokadd           4971 parse.y        	tokadd(c);
tokadd           4981 parse.y        	    tokadd('\\');
tokadd           4982 parse.y        	tokadd(c);
tokadd           5022 parse.y        	    tokadd(c);
tokadd           5092 parse.y        		tokadd('\\');
tokadd           5096 parse.y        		if (func & STR_FUNC_ESCAPE) tokadd(c);
tokadd           5108 parse.y        		    if (func & STR_FUNC_ESCAPE) tokadd('\\');
tokadd           5115 parse.y        		    tokadd('\\');
tokadd           5123 parse.y        		tokadd(c);
tokadd           5136 parse.y        	tokadd(c);
tokadd           5193 parse.y        	tokadd('#');
tokadd           5226 parse.y        	tokadd(func);
tokadd           5231 parse.y        	    do {tokadd(c);} while (--len > 0 && (c = nextc()) != -1);
tokadd           5250 parse.y        	tokadd(func |= str_dquote);
tokadd           5254 parse.y        	    do {tokadd(c);} while (--len > 0 && (c = nextc()) != -1);
tokadd           5381 parse.y        	    tokadd('#');
tokadd           5390 parse.y        	    tokadd(nextc());
tokadd           6093 parse.y        		tokadd(c);
tokadd           6111 parse.y        			    tokadd(c);
tokadd           6135 parse.y        			    tokadd(c);
tokadd           6159 parse.y        			    tokadd(c);
tokadd           6193 parse.y        			tokadd(c);
tokadd           6211 parse.y        		    tokadd('0');
tokadd           6225 parse.y        		    tokadd(c);
tokadd           6241 parse.y        		    tokadd('.');
tokadd           6242 parse.y        		    tokadd(c);
tokadd           6258 parse.y        		    tokadd(c);
tokadd           6264 parse.y        		    tokadd(c);
tokadd           6579 parse.y        		tokadd('$');
tokadd           6580 parse.y        		tokadd('_');
tokadd           6604 parse.y        	    tokadd('$');
tokadd           6605 parse.y        	    tokadd(c);
tokadd           6611 parse.y        	    tokadd('$');
tokadd           6612 parse.y        	    tokadd(c);
tokadd           6616 parse.y        		tokadd(c);
tokadd           6635 parse.y        		tokadd('$');
tokadd           6636 parse.y        		tokadd(c);
tokadd           6645 parse.y        	    tokadd('$');
tokadd           6647 parse.y        		tokadd(c);
tokadd           6663 parse.y        	    tokadd('$');
tokadd           6670 parse.y        	tokadd('@');
tokadd           6672 parse.y        	    tokadd('@');
tokadd           6718 parse.y        	tokadd(c);
tokadd           6724 parse.y        		tokadd(c);
tokadd           6731 parse.y        	tokadd(c);
tokadd           6764 parse.y        			tokadd(c);


tokadd_escape

tokadd_escape    4968 parse.y        	    return tokadd_escape(term);
tokadd_escape    5102 parse.y        		    if (tokadd_escape(term) < 0)


tokadd_string

tokadd_string    5196 parse.y            if (tokadd_string(func, term, paren, &quote->nd_nest) == -1) {
tokadd_string    5385 parse.y        	    if ((c = tokadd_string(func, '\n', 0, NULL)) == -1) goto error;


tokenbuf

tokenbuf         4773 parse.y        #define tokfix() (tokenbuf[tokidx]='\0')
tokenbuf         4774 parse.y        #define tok() tokenbuf
tokenbuf         4776 parse.y        #define toklast() (tokidx>0?tokenbuf[tokidx-1]:0)
tokenbuf         4782 parse.y            if (!tokenbuf) {
tokenbuf         4784 parse.y        	tokenbuf = ALLOC_N(char, 60);
tokenbuf         4788 parse.y        	REALLOC_N(tokenbuf, char, 60);
tokenbuf         4790 parse.y            return tokenbuf;
tokenbuf         4796 parse.y            tokenbuf[tokidx++] = c;
tokenbuf         4799 parse.y        	REALLOC_N(tokenbuf, char, toksiz);


tokfix

tokfix           5028 parse.y        	tokfix();
tokfix           5202 parse.y            tokfix();
tokfix           5261 parse.y            tokfix();
tokfix           6115 parse.y        		    tokfix();
tokfix           6139 parse.y        		    tokfix();
tokfix           6163 parse.y        		    tokfix();
tokfix           6197 parse.y        			tokfix();
tokfix           6281 parse.y        	    tokfix();
tokfix           6606 parse.y        	    tokfix();
tokfix           6622 parse.y        	    tokfix();
tokfix           6652 parse.y        	    tokfix();
tokfix           6736 parse.y            tokfix();
tokfix           6765 parse.y        			tokfix();


tokidx

tokidx           4773 parse.y        #define tokfix() (tokenbuf[tokidx]='\0')
tokidx           4775 parse.y        #define toklen() tokidx
tokidx           4776 parse.y        #define toklast() (tokidx>0?tokenbuf[tokidx-1]:0)
tokidx           4781 parse.y            tokidx = 0;
tokidx           4796 parse.y            tokenbuf[tokidx++] = c;
tokidx           4797 parse.y            if (tokidx >= toksiz) {
tokidx           6676 parse.y        	    if (tokidx == 1) {


toklen

toklen           5027 parse.y            if (toklen()) {
toklen           5030 parse.y        		  toklen() > 1 ? "s" : "", tok());
toklen           5203 parse.y            set_yylval_str(rb_str_new(tok(), toklen()));
toklen           5268 parse.y        				  rb_str_new(tok(), toklen()),	/* nd_lit */
toklen           5387 parse.y        		set_yylval_str(rb_str_new(tok(), toklen()));
toklen           5393 parse.y        	str = rb_str_new(tok(), toklen());
toklen           6097 parse.y        		int start = toklen();
toklen           6116 parse.y        		    if (toklen() == start) {
toklen           6140 parse.y        		    if (toklen() == start) {
toklen           6164 parse.y        		    if (toklen() == start) {
toklen           6195 parse.y        		    if (toklen() > start) {
toklen           6783 parse.y        		kw = rb_reserved_word(tok(), toklen());


toksiz

toksiz           4783 parse.y        	toksiz = 60;
toksiz           4786 parse.y            if (toksiz > 4096) {
toksiz           4787 parse.y        	toksiz = 60;
toksiz           4797 parse.y            if (tokidx >= toksiz) {
toksiz           4798 parse.y        	toksiz *= 2;
toksiz           4799 parse.y        	REALLOC_N(tokenbuf, char, toksiz);


too_many_files

too_many_files   3994 win32/win32.c  	if (too_many_files())
too_many_files   4007 win32/win32.c  	else if (too_many_files())
too_many_files   4018 win32/win32.c  	if (too_many_files())


top_local_init

top_local_init    620 parse.y        			top_local_init();
top_local_init   8599 parse.y            top_local_init();


top_local_init_gen

top_local_init_gen  332 parse.y        static void top_local_init_gen(struct parser_params*);
top_local_init_gen  333 parse.y        #define top_local_init() top_local_init_gen(parser)


top_local_setup

top_local_setup   644 parse.y        			top_local_setup();
top_local_setup  8601 parse.y            top_local_setup();


top_local_setup_gen

top_local_setup_gen  334 parse.y        static void top_local_setup_gen(struct parser_params*);
top_local_setup_gen  335 parse.y        #define top_local_setup() top_local_setup_gen(parser)


tr_setup_table

tr_setup_table   2958 string.c       	tr_setup_table(s, squeez, init);
tr_setup_table   3031 string.c       	    tr_setup_table(s, squeez, init);
tr_setup_table   3150 string.c       	tr_setup_table(s, table, init);


tr_trans

tr_trans         2873 string.c           return tr_trans(str, src, repl, 0);
tr_trans         2898 string.c           tr_trans(str, src, repl, 0);
tr_trans         3093 string.c           return tr_trans(str, src, repl, 1);
tr_trans         3114 string.c           tr_trans(str, src, repl, 1);


translate_char

translate_char    284 ruby.c             translate_char(libpath, '\\', '/');
translate_char    814 ruby.c         	    translate_char(script, '\\', '/');


trap

trap              784 signal.c           return rb_ensure(trap, (VALUE)&arg, trap_ensure, (VALUE)&arg);
trap              786 signal.c           return trap(&arg);
trap             2065 win32/win32.c      fd_set trap;
trap             2104 win32/win32.c  	trap = *ex;
trap             2106 win32/win32.c  	trap.fd_count = 0;
trap             2107 win32/win32.c      if (trap.fd_count < FD_SETSIZE)
trap             2108 win32/win32.c  	trap.fd_array[trap.fd_count++] = (SOCKET)interrupted_event;
trap             2110 win32/win32.c      ex = &trap;


trap_ensure

trap_ensure      1039 regexec.c        rb_ensure(trap_exec, arg, trap_ensure, arg);
trap_ensure       784 signal.c           return rb_ensure(trap, (VALUE)&arg, trap_ensure, (VALUE)&arg);


trnext

trnext           2797 string.c       	while ((c = trnext(&trsrc)) >= 0) {
trnext           2800 string.c       	while ((c = trnext(&trrepl)) >= 0)
trnext           2814 string.c       	while ((c = trnext(&trsrc)) >= 0) {
trnext           2815 string.c       	    r = trnext(&trrepl);
trnext           2925 string.c           while ((c = trnext(&tr)) >= 0) {


try_tag_implicit

try_tag_implicit 1091 ext/syck/bytecode.c                 try_tag_implicit( sycklval->nodeData, parser->taguri_expansion );
try_tag_implicit 1272 ext/syck/gram.c                       try_tag_implicit( yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
try_tag_implicit 1327 ext/syck/gram.c                   try_tag_implicit( yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
try_tag_implicit  355 ext/syck/syck.h void try_tag_implicit( SyckNode *, int );
try_tag_implicit  129 ext/syck/token.c             try_tag_implicit( sycklval->nodeData, parser->taguri_expansion ); \


type_cclass_key

type_cclass_key  4829 regparse.c                 type_cclass_key  key;
type_cclass_key  4830 regparse.c                 type_cclass_key* new_key;
type_cclass_key  4861 regparse.c                 new_key = (type_cclass_key* )xmalloc(sizeof(type_cclass_key));


typeinfo_from_ole

typeinfo_from_ole 3091 ext/win32ole/win32ole.c     hr = typeinfo_from_ole(pole, &pTypeInfo);
typeinfo_from_ole 3544 ext/win32ole/win32ole.c     hr = typeinfo_from_ole(pole, &pTypeInfo);


typelib_file

typelib_file     1796 ext/win32ole/win32ole.c         file = typelib_file(ole);
typelib_file     3581 ext/win32ole/win32ole.c         file = typelib_file(typelib);
typelib_file     4215 ext/win32ole/win32ole.c     file = typelib_file(typelib);


tzset

tzset             382 ext/openssl/ossl.c     tzset();
tzset              97 missing/strftime.c extern void tzset();
tzset             234 missing/strftime.c 		tzset();
tzset             249 missing/strftime.c 		tzset();
tzset             263 missing/strftime.c 		tzset();
tzset             419 win32/win32.c      tzset();
tzset              54 wince/time.h   void tzset();


u_long

u_long             24 ext/io/wait/wait.c #define ioctl_arg u_long
u_long            470 ext/socket/getaddrinfo.c 			u_long v4a;
u_long            154 ext/socket/getnameinfo.c 	u_long v4a;
u_long            490 missing/vsnprintf.c 	u_long	ulval;		/* integer arguments %[diouxX] */
u_long            556 missing/vsnprintf.c 	(flags&LONGINT ? va_arg(ap, u_long) : \
u_long            557 missing/vsnprintf.c 	    flags&SHORTINT ? (u_long)(u_short)va_arg(ap, int) : \
u_long            558 missing/vsnprintf.c 	    (u_long)va_arg(ap, u_int))
u_long            794 missing/vsnprintf.c 			uqval = (u_long)va_arg(ap, void *);
u_long            797 missing/vsnprintf.c 			ulval = (u_long)va_arg(ap, void *);
u_long           2764 win32/win32.c      u_long ioctlArg;


u_quad_t

u_quad_t          492 missing/vsnprintf.c 	u_quad_t uqval;		/* %q integers */
u_quad_t          778 missing/vsnprintf.c 				uqval = va_arg(ap, u_quad_t);
u_quad_t          835 missing/vsnprintf.c 				uqval = va_arg(ap, u_quad_t);
u_quad_t          849 missing/vsnprintf.c 				uqval = va_arg(ap, u_quad_t);


u_short

u_short           108 ext/socket/getaddrinfo.c 	u_short	si_port;
u_short           283 ext/socket/getaddrinfo.c 	u_short port;
u_short           549 ext/socket/getaddrinfo.c 	u_short port = port0 & 0xffff;
u_short           594 ext/socket/getaddrinfo.c 	u_short port = port0 & 0xffff;
u_short            84 ext/socket/getnameinfo.c 	u_short	si_port;
u_short           151 ext/socket/getnameinfo.c 	u_short port;
u_short           557 missing/vsnprintf.c 	    flags&SHORTINT ? (u_long)(u_short)va_arg(ap, int) : \


uid_t

uid_t              69 file.c         be_chown(const char *path, uid_t owner, gid_t group)
uid_t              81 file.c         be_fchown(int fd, uid_t owner, gid_t group)


uint32_t

uint32_t          123 ext/digest/md5/md5.c #define T_MASK ((uint32_t)~0)
uint32_t          193 ext/digest/md5/md5.c     uint32_t
uint32_t          196 ext/digest/md5/md5.c     uint32_t t;
uint32_t          204 ext/digest/md5/md5.c     uint32_t X[16];
uint32_t          217 ext/digest/md5/md5.c     uint32_t xbuf[16];
uint32_t          218 ext/digest/md5/md5.c     const uint32_t *X;
uint32_t          222 ext/digest/md5/md5.c 	X = (const uint32_t *)data;
uint32_t          361 ext/digest/md5/md5.c     uint32_t nbits = (uint32_t)(nbytes << 3);
uint32_t           60 ext/digest/md5/md5.h     uint32_t count[2];	/* message length in bits, lsw first */
uint32_t           61 ext/digest/md5/md5.h     uint32_t state[4];	/* digest buffer */
uint32_t           57 ext/digest/rmd160/rmd160.c     (((uint32_t) *((strptr)+3) << 24) |	\
uint32_t           58 ext/digest/rmd160/rmd160.c     ((uint32_t) *((strptr)+2) << 16) |		\
uint32_t           59 ext/digest/rmd160/rmd160.c     ((uint32_t) *((strptr)+1) <<  8) |		\
uint32_t           60 ext/digest/rmd160/rmd160.c     ((uint32_t) *(strptr)))
uint32_t          146 ext/digest/rmd160/rmd160.c RMD160_Transform(uint32_t state[5], const uint32_t block[16])
uint32_t          148 ext/digest/rmd160/rmd160.c 	uint32_t aa, bb, cc, dd, ee;
uint32_t          149 ext/digest/rmd160/rmd160.c 	uint32_t aaa, bbb, ccc, ddd, eee;
uint32_t          354 ext/digest/rmd160/rmd160.c 	uint32_t X[16];
uint32_t          355 ext/digest/rmd160/rmd160.c 	uint32_t ofs = 0;
uint32_t          356 ext/digest/rmd160/rmd160.c 	uint32_t i;
uint32_t          358 ext/digest/rmd160/rmd160.c 	uint32_t j;
uint32_t          414 ext/digest/rmd160/rmd160.c 	uint32_t i;
uint32_t          415 ext/digest/rmd160/rmd160.c 	uint32_t X[16];
uint32_t          417 ext/digest/rmd160/rmd160.c 	uint32_t j;
uint32_t           32 ext/digest/rmd160/rmd160.h 	uint32_t	state[5];	/* state (ABCDE) */
uint32_t           33 ext/digest/rmd160/rmd160.h 	uint32_t	length[2];	/* number of bits */
uint32_t           35 ext/digest/rmd160/rmd160.h 	uint32_t	buflen;		/* number of chars in bbuffer */
uint32_t           53 ext/digest/rmd160/rmd160.h void	RMD160_Transform _((uint32_t[5], const uint32_t[16]));
uint32_t           54 ext/digest/rmd160/rmd160hl.c 	p[i + i] = hex[(uint32_t)digest[i] >> 4];
uint32_t           28 ext/digest/rmd160/rmd160ossl.c 	p[i + i] = hex[(uint32_t)digest[i] >> 4];
uint32_t           73 ext/digest/sha1/sha1.c     uint32_t l[16];
uint32_t           77 ext/digest/sha1/sha1.c void do_R01(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *);
uint32_t           78 ext/digest/sha1/sha1.c void do_R2(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *);
uint32_t           79 ext/digest/sha1/sha1.c void do_R3(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *);
uint32_t           80 ext/digest/sha1/sha1.c void do_R4(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *);
uint32_t           89 ext/digest/sha1/sha1.c do_R01(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *block)
uint32_t           99 ext/digest/sha1/sha1.c do_R2(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *block)
uint32_t          109 ext/digest/sha1/sha1.c do_R3(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *block)
uint32_t          119 ext/digest/sha1/sha1.c do_R4(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *block)
uint32_t          133 ext/digest/sha1/sha1.c     uint32_t state[5];
uint32_t          136 ext/digest/sha1/sha1.c     uint32_t a, b, c, d, e;
uint32_t          228 ext/digest/sha1/sha1.c     uint32_t i, j;
uint32_t           17 ext/digest/sha1/sha1.h 	uint32_t state[5];
uint32_t           18 ext/digest/sha1/sha1.h 	uint32_t count[2];
uint32_t           35 ext/digest/sha1/sha1.h void	SHA1_Transform _((uint32_t state[5], const uint8_t buffer[64]));
uint32_t           55 ext/digest/sha1/sha1hl.c 	p[i + i] = hex[((uint32_t)digest[i]) >> 4];
uint32_t           28 ext/digest/sha1/sha1ossl.c 	p[i + i] = hex[((uint32_t)digest[i]) >> 4];
uint32_t           67 ext/digest/sha2/sha2.c typedef uint32_t sha2_word32;	/* Exactly 4 bytes */
uint32_t           64 ext/digest/sha2/sha2.h 	uint32_t	state[8];


uint64_t

uint64_t           68 ext/digest/sha2/sha2.c typedef uint64_t sha2_word64;	/* Exactly 8 bytes */
uint64_t           73 ext/digest/sha2/sha2.c #define ULL(number)	(uint64_t)(number)
uint64_t           65 ext/digest/sha2/sha2.h 	uint64_t	bitcount;
uint64_t           69 ext/digest/sha2/sha2.h 	uint64_t	state[8];
uint64_t           70 ext/digest/sha2/sha2.h 	uint64_t	bitcount[2];


uint8_t

uint8_t            73 ext/digest/md5/md5.c 	uint8_t digest[16];
uint8_t            78 ext/digest/md5/md5.c 	MD5_Update(&state, (const uint8_t *)test[i], strlen(test[i]));
uint8_t           191 ext/digest/md5/md5.c md5_process(MD5_CTX *pms, const uint8_t *data /*[64]*/)
uint8_t           205 ext/digest/md5/md5.c     const uint8_t *xp = data;
uint8_t           220 ext/digest/md5/md5.c     if (!((data - (const uint8_t *)0) & 3)) {
uint8_t           356 ext/digest/md5/md5.c MD5_Update(MD5_CTX *pms, const uint8_t *data, size_t nbytes)
uint8_t           358 ext/digest/md5/md5.c     const uint8_t *p = data;
uint8_t           394 ext/digest/md5/md5.c MD5_Final(uint8_t *digest, MD5_CTX *pms)
uint8_t           396 ext/digest/md5/md5.c     static const uint8_t pad[64] = {
uint8_t           402 ext/digest/md5/md5.c     uint8_t data[8];
uint8_t           407 ext/digest/md5/md5.c 	data[i] = (uint8_t)(pms->count[i >> 2] >> ((i & 3) << 3));
uint8_t           413 ext/digest/md5/md5.c 	digest[i] = (uint8_t)(pms->state[i >> 2] >> ((i & 3) << 3));
uint8_t           417 ext/digest/md5/md5.c MD5_End(MD5_CTX *pctx, uint8_t *hexdigest)
uint8_t            62 ext/digest/md5/md5.h     uint8_t buffer[64];	/* accumulate block */
uint8_t            74 ext/digest/md5/md5.h void	MD5_Update _((MD5_CTX *pms, const uint8_t *data, size_t nbytes));
uint8_t            75 ext/digest/md5/md5.h void	MD5_Final _((uint8_t *digest, MD5_CTX *pms));
uint8_t            76 ext/digest/md5/md5.h void	MD5_End _((MD5_CTX *pctx, uint8_t *hexdigest));
uint8_t           352 ext/digest/rmd160/rmd160.c RMD160_Update(RMD160_CTX *context, const uint8_t *data, size_t nbytes)
uint8_t           412 ext/digest/rmd160/rmd160.c RMD160_Final(uint8_t digest[20], RMD160_CTX *context)
uint8_t           424 ext/digest/rmd160/rmd160.c 	context->bbuffer[context->buflen] = (uint8_t)'\200';
uint8_t            34 ext/digest/rmd160/rmd160.h 	uint8_t		bbuffer[64];    /* overflow buffer */
uint8_t            54 ext/digest/rmd160/rmd160.h void	RMD160_Update _((RMD160_CTX *, const uint8_t *, size_t));
uint8_t            55 ext/digest/rmd160/rmd160.h void	RMD160_Final _((uint8_t[20], RMD160_CTX *));
uint8_t            60 ext/digest/rmd160/rmd160.h char	*RMD160_Data _((const uint8_t *, size_t, char *));
uint8_t            43 ext/digest/rmd160/rmd160hl.c     uint8_t digest[20];
uint8_t            64 ext/digest/rmd160/rmd160hl.c     uint8_t buffer[BUFSIZ];
uint8_t            86 ext/digest/rmd160/rmd160hl.c RMD160_Data(const uint8_t *data, size_t len, char *buf)
uint8_t            17 ext/digest/rmd160/rmd160ossl.c     uint8_t digest[20];
uint8_t            72 ext/digest/sha1/sha1.c     uint8_t c[64];
uint8_t           134 ext/digest/sha1/sha1.c     const uint8_t buffer[64];
uint8_t           225 ext/digest/sha1/sha1.c     const uint8_t *data;
uint8_t           254 ext/digest/sha1/sha1.c     uint8_t digest[20];
uint8_t           258 ext/digest/sha1/sha1.c     uint8_t finalcount[8];
uint8_t           264 ext/digest/sha1/sha1.c 	finalcount[i] = (uint8_t)((context->count[(i >= 4 ? 0 : 1)]
uint8_t           267 ext/digest/sha1/sha1.c     SHA1_Update(context, (const uint8_t *)"\200", 1);
uint8_t           269 ext/digest/sha1/sha1.c 	SHA1_Update(context, (const uint8_t *)"\0", 1);
uint8_t           274 ext/digest/sha1/sha1.c 	    digest[i] = (uint8_t)
uint8_t            19 ext/digest/sha1/sha1.h 	uint8_t buffer[64];
uint8_t            35 ext/digest/sha1/sha1.h void	SHA1_Transform _((uint32_t state[5], const uint8_t buffer[64]));
uint8_t            37 ext/digest/sha1/sha1.h void	SHA1_Update _((SHA1_CTX *context, const uint8_t *data, size_t len));
uint8_t            38 ext/digest/sha1/sha1.h void	SHA1_Final _((uint8_t digest[20], SHA1_CTX *context));
uint8_t            43 ext/digest/sha1/sha1.h char	*SHA1_Data _((const uint8_t *, size_t, char *));
uint8_t            44 ext/digest/sha1/sha1hl.c     uint8_t digest[20];
uint8_t            67 ext/digest/sha1/sha1hl.c     uint8_t buffer[BUFSIZ];
uint8_t            90 ext/digest/sha1/sha1hl.c     const uint8_t *data;
uint8_t            17 ext/digest/sha1/sha1ossl.c     uint8_t digest[20];
uint8_t            66 ext/digest/sha2/sha2.c typedef uint8_t  sha2_byte;	/* Exactly 1 byte */
uint8_t            66 ext/digest/sha2/sha2.h 	uint8_t	buffer[SHA256_BLOCK_LENGTH];
uint8_t            71 ext/digest/sha2/sha2.h 	uint8_t	buffer[SHA512_BLOCK_LENGTH];
uint8_t           105 ext/digest/sha2/sha2.h void SHA256_Update _((SHA256_CTX*, const uint8_t*, size_t));
uint8_t           106 ext/digest/sha2/sha2.h void SHA256_Final _((uint8_t[SHA256_DIGEST_LENGTH], SHA256_CTX*));
uint8_t           108 ext/digest/sha2/sha2.h char* SHA256_Data _((const uint8_t*, size_t, char[SHA256_DIGEST_STRING_LENGTH]));
uint8_t           113 ext/digest/sha2/sha2.h void SHA384_Update _((SHA384_CTX*, const uint8_t*, size_t));
uint8_t           114 ext/digest/sha2/sha2.h void SHA384_Final _((uint8_t[SHA384_DIGEST_LENGTH], SHA384_CTX*));
uint8_t           116 ext/digest/sha2/sha2.h char* SHA384_Data _((const uint8_t*, size_t, char[SHA384_DIGEST_STRING_LENGTH]));
uint8_t           121 ext/digest/sha2/sha2.h void SHA512_Update _((SHA512_CTX*, const uint8_t*, size_t));
uint8_t           122 ext/digest/sha2/sha2.h void SHA512_Final _((uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*));
uint8_t           124 ext/digest/sha2/sha2.h char* SHA512_Data _((const uint8_t*, size_t, char[SHA512_DIGEST_STRING_LENGTH]));
uint8_t            76 ext/digest/sha2/sha2hl.c 	uint8_t         buffer[BUFSIZ * 20];
uint8_t           101 ext/digest/sha2/sha2hl.c 	uint8_t         digest[SHA256_DIGEST_LENGTH], *d = digest;
uint8_t           102 ext/digest/sha2/sha2hl.c 	uint8_t	       *ret;
uint8_t           125 ext/digest/sha2/sha2hl.c SHA256_Data(const uint8_t * data, size_t len, char *digest)
uint8_t           138 ext/digest/sha2/sha2hl.c 	uint8_t         buffer[BUFSIZ * 20];
uint8_t           161 ext/digest/sha2/sha2hl.c 	uint8_t         digest[SHA384_DIGEST_LENGTH], *d = digest;
uint8_t           162 ext/digest/sha2/sha2hl.c 	uint8_t	       *ret;
uint8_t           185 ext/digest/sha2/sha2hl.c SHA384_Data(const uint8_t * data, size_t len, char *digest)
uint8_t           198 ext/digest/sha2/sha2hl.c 	uint8_t         buffer[BUFSIZ * 20];
uint8_t           221 ext/digest/sha2/sha2hl.c 	uint8_t         digest[SHA512_DIGEST_LENGTH], *d = digest;
uint8_t           222 ext/digest/sha2/sha2hl.c 	uint8_t	       *ret;
uint8_t           245 ext/digest/sha2/sha2hl.c SHA512_Data(const uint8_t * data, size_t len, char *digest)


umask

umask            2221 file.c         	omask = umask(0);
umask            2222 file.c         	umask(omask);
umask            2225 file.c         	omask = umask(NUM2INT(argv[0]));


umethod_bind

umethod_bind      215 eval.c         static VALUE umethod_bind(VALUE, VALUE);
umethod_bind     9438 eval.c             rb_define_method(rb_cUnboundMethod, "bind", umethod_bind, 1);


undef_getter

undef_getter      307 variable.c     static VALUE undef_getter(ID id);
undef_getter      332 variable.c     	var->getter = undef_getter;
undef_getter      689 variable.c         if (entry->var->getter == undef_getter) return Qfalse;


undef_marker

undef_marker      309 variable.c     static void  undef_marker(void);
undef_marker      334 variable.c     	var->marker = undef_marker;


undef_setter

undef_setter      308 variable.c     static void  undef_setter(VALUE val, ID id, void *data, struct global_variable *var);
undef_setter      333 variable.c     	var->setter = undef_setter;


ungetc

ungetc           1725 ext/zlib/zlib.c     int ungetc;
ungetc           1779 ext/zlib/zlib.c     gz->ungetc = 0;
ungetc           1795 ext/zlib/zlib.c     gz->ungetc = 0;
ungetc           2141 ext/zlib/zlib.c     if (RSTRING(str)->len <= gz->ungetc) {
ungetc           2142 ext/zlib/zlib.c 	gz->ungetc -= RSTRING(str)->len;
ungetc           2145 ext/zlib/zlib.c 	gz->crc = crc32(gz->crc, RSTRING(str)->ptr + gz->ungetc,
ungetc           2146 ext/zlib/zlib.c 			RSTRING(str)->len - gz->ungetc);
ungetc           2147 ext/zlib/zlib.c 	gz->ungetc = 0;
ungetc           2256 ext/zlib/zlib.c     gz->ungetc++;


unix_s_socketpair

unix_s_socketpair 3213 ext/socket/socket.c     rb_define_singleton_method(rb_cUNIXSocket, "socketpair", unix_s_socketpair, -1);
unix_s_socketpair 3214 ext/socket/socket.c     rb_define_singleton_method(rb_cUNIXSocket, "pair", unix_s_socketpair, -1);


unixaddr

unixaddr          546 ext/socket/socket.c static VALUE unixaddr _((struct sockaddr_un*));
unixaddr          623 ext/socket/socket.c 	return rb_assoc_new(str, unixaddr((struct sockaddr_un*)buf));
unixaddr         1967 ext/socket/socket.c     return unixaddr(&addr);
unixaddr         1984 ext/socket/socket.c     return unixaddr(&addr);


unixtime_to_filetime

unixtime_to_filetime 3853 win32/win32.c      if (unixtime_to_filetime(times->actime, &atime)) {
unixtime_to_filetime 3856 win32/win32.c      if (unixtime_to_filetime(times->modtime, &mtime)) {


unknown_node

unknown_node     3947 eval.c         	unknown_node(node);
unknown_node     5759 eval.c         	unknown_node(body);


unlink

unlink            898 ext/nkf/nkf-utf8/nkf.c                   if (unlink(origfname)){
unlink           2133 file.c             if (unlink(path) < 0)
unlink           2188 file.c         		unlink(dst) == 0 &&
unlink           4137 io.c           			(void)unlink(RSTRING(str)->ptr);
unlink           4153 io.c           			if (unlink(fn) < 0) {


unlink_undef

unlink_undef      679 dln.c          		    unlink_undef(key, old_sym->n_value);
unlink_undef      760 dln.c          		unlink_undef(key, sym->n_value);


unset_addr_list_end

unset_addr_list_end 4826 regcomp.c            unset_addr_list_end(&uslist);
unset_addr_list_end 4842 regcomp.c          unset_addr_list_end(&uslist);
unset_addr_list_end 4861 regcomp.c          unset_addr_list_end(&uslist);


unsigned_time_t

unsigned_time_t  1219 time.c             unsigned_time_t sec_off;
unsigned_time_t  1228 time.c             sec_off = (unsigned_time_t)f;


update_i

update_i          456 ext/dbm/dbm.c      rb_iterate(each_pair, other, update_i, obj);
update_i          465 ext/dbm/dbm.c      rb_iterate(each_pair, other, update_i, obj);
update_i          558 ext/gdbm/gdbm.c     rb_iterate(each_pair, other, update_i, obj);
update_i          567 ext/gdbm/gdbm.c     rb_iterate(each_pair, other, update_i, obj);
update_i          434 ext/sdbm/init.c     rb_iterate(each_pair, other, update_i, obj);
update_i          443 ext/sdbm/init.c     rb_iterate(each_pair, other, update_i, obj);


url_getc

url_getc          430 ext/nkf/nkf-utf8/nkf.c STATIC int url_getc PROTO((FILE *f));
url_getc         1887 ext/nkf/nkf-utf8/nkf.c         i_ugetc = i_getc; i_getc = url_getc;


url_ungetc

url_ungetc        431 ext/nkf/nkf-utf8/nkf.c STATIC int url_ungetc PROTO((int c,FILE *f));
url_ungetc       1888 ext/nkf/nkf-utf8/nkf.c         i_uungetc = i_ungetc; i_ungetc= url_ungetc;


usage

usage             354 ext/nkf/nkf-utf8/nkf.c STATIC  void    usage PROTO(());
usage            1190 ext/nkf/nkf-utf8/nkf.c             usage();
usage             562 ruby.c         	    usage(origargv[0]);
usage             712 ruby.c         		usage(origargv[0]);


utf8_to_uv

utf8_to_uv        371 pack.c         static unsigned long utf8_to_uv(char*,long*);
utf8_to_uv       1708 pack.c         		l = utf8_to_uv(s, &alen);


utime

utime             887 ext/nkf/nkf-utf8/nkf.c                   if (utime(outfname, tb)) {
utime             893 ext/nkf/nkf-utf8/nkf.c                   if (utime(outfname, &tb)) {
utime            1987 file.c             if (utime(path, utp) < 0)
utime            3535 process.c          volatile VALUE utime, stime, cutime, sctime;
utime            3539 process.c      			 utime = rb_float_new((double)buf.tms_utime / HZ),
utime              19 wince/sys/utime.h int utime(const char *f, struct utimbuf *t);


utime_internal

utime_internal   1970 file.c             n = apply2files(utime_internal, rest, tvp);
utime_internal   2006 file.c             n = apply2files(utime_internal, rest, &utbuf);


uv_to_utf8

uv_to_utf8        370 pack.c         static int uv_to_utf8(char*,unsigned long);
uv_to_utf8        877 pack.c         		le = uv_to_utf8(buf, l);


vFINAL_TOKEN

vFINAL_TOKEN      455 ext/racc/cparse/cparse.c         if (read_next && (v->t != vFINAL_TOKEN)) {
vFINAL_TOKEN      558 ext/racc/cparse/cparse.c         if (v->t == vFINAL_TOKEN) {


va_alist

va_alist           24 wince/varargs.h #define va_dcl va_list va_alist;
va_alist           25 wince/varargs.h #define va_start(ap) ap = (va_list)&va_alist


va_arg

va_arg            150 array.c        	RARRAY(ary)->ptr[i] = va_arg(ar, VALUE);
va_arg            182 array.c        	RARRAY(val)->ptr[i] = va_arg(ar, VALUE);
va_arg            851 class.c        	    var = va_arg(vargs, VALUE*);
va_arg            863 class.c        	    var = va_arg(vargs, VALUE*);
va_arg            876 class.c        	var = va_arg(vargs, VALUE*);
va_arg            888 class.c        	var = va_arg(vargs, VALUE*);
va_arg           4918 eval.c         	RARRAY(val)->ptr[i] = va_arg(args, VALUE);
va_arg           5187 eval.c         	while (eclass = va_arg(args, VALUE)) {
va_arg           5908 eval.c         	    argv[i] = va_arg(ar, VALUE);
va_arg            552 missing/vsnprintf.c 	(flags&LONGINT ? va_arg(ap, long) : \
va_arg            553 missing/vsnprintf.c 	    flags&SHORTINT ? (long)(short)va_arg(ap, int) : \
va_arg            554 missing/vsnprintf.c 	    (long)va_arg(ap, int))
va_arg            556 missing/vsnprintf.c 	(flags&LONGINT ? va_arg(ap, u_long) : \
va_arg            557 missing/vsnprintf.c 	    flags&SHORTINT ? (u_long)(u_short)va_arg(ap, int) : \
va_arg            558 missing/vsnprintf.c 	    (u_long)va_arg(ap, u_int))
va_arg            612 missing/vsnprintf.c 			if ((width = va_arg(ap, int)) >= 0)
va_arg            624 missing/vsnprintf.c 				n = va_arg(ap, int);
va_arg            669 missing/vsnprintf.c 			*(cp = buf) = va_arg(ap, int);
va_arg            680 missing/vsnprintf.c 				uqval = va_arg(ap, quad_t);
va_arg            710 missing/vsnprintf.c fp_begin:		_double = va_arg(ap, double);
va_arg            761 missing/vsnprintf.c 				*va_arg(ap, quad_t *) = ret;
va_arg            766 missing/vsnprintf.c 				*va_arg(ap, long *) = ret;
va_arg            768 missing/vsnprintf.c 				*va_arg(ap, short *) = ret;
va_arg            770 missing/vsnprintf.c 				*va_arg(ap, int *) = ret;
va_arg            778 missing/vsnprintf.c 				uqval = va_arg(ap, u_quad_t);
va_arg            794 missing/vsnprintf.c 			uqval = (u_long)va_arg(ap, void *);
va_arg            797 missing/vsnprintf.c 			ulval = (u_long)va_arg(ap, void *);
va_arg            809 missing/vsnprintf.c 			if ((cp = va_arg(ap, char *)) == NULL)
va_arg            835 missing/vsnprintf.c 				uqval = va_arg(ap, u_quad_t);
va_arg            849 missing/vsnprintf.c 				uqval = va_arg(ap, u_quad_t);
va_arg            199 regerror.c         einfo = va_arg(vargs, OnigErrorInfo*);
va_arg            229 struct.c           while (mem = va_arg(ar, char*)) {
va_arg            362 struct.c       	mem[i] = va_arg(args, VALUE);
va_arg           2776 win32/win32.c      arg = va_arg(va, int);


va_end

va_end            152 array.c            va_end(ar);
va_end            184 array.c            va_end(ar);
va_end            897 class.c            va_end(vargs);
va_end             73 error.c            va_end(args);
va_end             85 error.c            va_end(args);
va_end            113 error.c            va_end(args);
va_end            129 error.c            va_end(args);
va_end            163 error.c        	va_end(args);
va_end            555 error.c            va_end(args);
va_end           1007 error.c            va_end(args);
va_end           1019 error.c            va_end(args);
va_end           1039 error.c            va_end(args);
va_end           1076 error.c             va_end(args);
va_end           1091 eval.c             va_end(args);
va_end           4921 eval.c             va_end(args);
va_end           5193 eval.c         	va_end(args);
va_end           5910 eval.c         	va_end(ar);
va_end            292 ext/openssl/ossl.c 	va_end(args);
va_end            342 ext/openssl/ossl.c 	va_end(args);
va_end            656 ext/tk/tcltklib.c     va_end(args);
va_end            594 ext/win32ole/win32ole.c     va_end(args);
va_end           1141 missing/vsnprintf.c 	va_end(ap);
va_end           9032 parse.y            va_end(args);
va_end            239 regerror.c       va_end(vargs);
va_end            255 regerror.c       va_end(args);
va_end            899 sprintf.c          va_end(ap);
va_end            233 struct.c           va_end(ar);
va_end            364 struct.c           va_end(args);
va_end           2777 win32/win32.c      va_end(va);
va_end           3895 win32/win32.c      va_end(va);


va_init_list

va_init_list      653 ext/tk/tcltklib.c     va_init_list(args,fmt);
va_init_list      592 ext/win32ole/win32ole.c     va_init_list(args, fmt);


va_list

va_list           142 array.c            va_list ar;
va_list           175 array.c            va_list ar;
va_list           840 class.c            va_list vargs;
va_list            69 error.c            va_list args;
va_list            80 error.c            va_list args;
va_list           105 error.c            va_list args;
va_list           121 error.c            va_list args;
va_list           154 error.c            va_list args;
va_list           550 error.c            va_list args;
va_list          1002 error.c            va_list args;
va_list          1014 error.c            va_list args;
va_list          1034 error.c            va_list args;
va_list          1064 error.c             va_list args;
va_list          1087 eval.c             va_list args;
va_list          4909 eval.c             va_list args;
va_list          5171 eval.c             va_list args;
va_list          5899 eval.c             va_list ar;
va_list           278 ext/openssl/ossl.c     va_list args;
va_list           336 ext/openssl/ossl.c     va_list args;
va_list           648 ext/tk/tcltklib.c     va_list args;
va_list           589 ext/win32ole/win32ole.c     va_list args;
va_list            88 missing/vsnprintf.c #define	_BSD_VA_LIST_ va_list
va_list          1124 missing/vsnprintf.c 	va_list ap;
va_list          9028 parse.y            va_list args;
va_list           187 regerror.c       va_list vargs;
va_list           251 regerror.c       va_list args;
va_list           895 sprintf.c          va_list ap;
va_list           220 struct.c           va_list ar;
va_list           355 struct.c           va_list args;
va_list          2761 win32/win32.c      va_list va;
va_list          3891 win32/win32.c      va_list va;
va_list            24 wince/varargs.h #define va_dcl va_list va_alist;
va_list            25 wince/varargs.h #define va_start(ap) ap = (va_list)&va_alist
va_list            27 wince/varargs.h #define va_end(ap) ap = (va_list)0
va_list           355 wince/wince.c  			lpWBuffer, nSize, (va_list*)args );


va_start

va_start          148 array.c            va_start(ar, n);
va_start          180 array.c            va_start(ar, n);
va_start          842 class.c            va_start(vargs, fmt);
va_start           71 error.c            va_start(args, fmt);
va_start           83 error.c            va_start(args, fmt);
va_start          111 error.c            va_start(args, fmt);
va_start          127 error.c            va_start(args, fmt);
va_start          161 error.c        	va_start(args, fmt);
va_start          553 error.c            va_start(args, fmt);
va_start         1005 error.c            va_start(args,fmt);
va_start         1017 error.c            va_start(args, fmt);
va_start         1037 error.c            va_start(args, fmt);
va_start         1074 error.c             va_start(args, fmt);
va_start         1089 eval.c             va_start(args, fmt);
va_start         4916 eval.c             va_start(args, n);
va_start         5186 eval.c         	va_start(args, data2);
va_start         5900 eval.c             va_start(ar, n);
va_start          290 ext/openssl/ossl.c 	va_start(args, fmt);
va_start          340 ext/openssl/ossl.c 	va_start(args, fmt);
va_start           16 ext/tk/tcltklib.c #define va_init_list(a,b) va_start(a,b)
va_start           19 ext/tk/tcltklib.c #define va_init_list(a,b) va_start(a)
va_start           28 ext/win32ole/win32ole.c #define va_init_list(a,b) va_start(a,b)
va_start           31 ext/win32ole/win32ole.c #define va_init_list(a,b) va_start(a)
va_start         1131 missing/vsnprintf.c 	va_start(ap, fmt);
va_start         1133 missing/vsnprintf.c 	va_start(ap);
va_start         9030 parse.y            va_start(args, fmt);
va_start          189 regerror.c       va_start(vargs, code);
va_start          253 regerror.c       va_start(args, fmt);
va_start          897 sprintf.c          va_start(ap, format);
va_start          228 struct.c           va_start(ar, name);
va_start          360 struct.c           va_start(args, klass);
va_start         2775 win32/win32.c      va_start(va, cmd);
va_start         3893 win32/win32.c      va_start(va, format);


val_getter

val_getter        311 variable.c     static VALUE val_getter(ID id, VALUE val);
val_getter        354 variable.c         var->getter = val_getter;
val_getter        482 variable.c         if (!getter) getter = val_getter;


val_marker

val_marker        313 variable.c     static void  val_marker(VALUE data);
val_marker        356 variable.c         var->marker = val_marker;


val_setter

val_setter        312 variable.c     static void  val_setter(VALUE val, ID id, void *data, struct global_variable *var);
val_setter        355 variable.c         var->setter = val_setter;


valid_filename

valid_filename    139 util.c         static int valid_filename(const char *s);
valid_filename    168 util.c             if (valid_filename(RSTRING(str)->ptr)) return;


validate

validate         8879 parse.y            validate(a);
validate         8886 parse.y            validate(a);
validate         8887 parse.y            validate(b);
validate         8894 parse.y            validate(a);
validate         8895 parse.y            validate(b);
validate         8896 parse.y            validate(c);
validate         8903 parse.y            validate(a);
validate         8904 parse.y            validate(b);
validate         8905 parse.y            validate(c);
validate         8906 parse.y            validate(d);
validate         8913 parse.y            validate(a);
validate         8914 parse.y            validate(b);
validate         8915 parse.y            validate(c);
validate         8916 parse.y            validate(d);
validate         8917 parse.y            validate(e);


value_expr

value_expr        889 parse.y        			value_expr($3);
value_expr        899 parse.y        			value_expr($3);
value_expr        930 parse.y        			value_expr($6);
value_expr        952 parse.y        			value_expr($5);
value_expr        969 parse.y        			value_expr($5);
value_expr        986 parse.y        			value_expr($5);
value_expr       1078 parse.y        			value_expr($$);
value_expr       1654 parse.y        			value_expr($3);
value_expr       1685 parse.y        			value_expr($6);
value_expr       1707 parse.y        			value_expr($5);
value_expr       1724 parse.y        			value_expr($5);
value_expr       1741 parse.y        			value_expr($5);
value_expr       1791 parse.y        			value_expr($1);
value_expr       1792 parse.y        			value_expr($3);
value_expr       1808 parse.y        			value_expr($1);
value_expr       1809 parse.y        			value_expr($3);
value_expr       2089 parse.y        			value_expr($1);
value_expr       2115 parse.y        			value_expr($4);
value_expr       2132 parse.y        			value_expr($2);
value_expr       2241 parse.y        			value_expr($6);
value_expr       2929 parse.y        			value_expr($1);
value_expr       4254 parse.y        			    value_expr($$);
value_expr       4278 parse.y        				value_expr($3);
value_expr       7117 parse.y            value_expr(arg1);
value_expr       7119 parse.y        	value_expr(arg1);
value_expr       7133 parse.y            value_expr(node1);
value_expr       7134 parse.y            value_expr(node2);
value_expr       7211 parse.y            value_expr(val);
value_expr       7293 parse.y        	value_expr(recv);
value_expr       7319 parse.y        	value_expr(recv);
value_expr       7360 parse.y            value_expr(rhs);
value_expr       7420 parse.y        	    if (!value_expr(node->nd_body)) return Qfalse;
value_expr       7677 parse.y            value_expr(node);
value_expr       7774 parse.y            value_expr(node);
value_expr       7781 parse.y            value_expr(left);


value_expr_gen

value_expr_gen    252 parse.y        static int value_expr_gen(struct parser_params*,NODE*);
value_expr_gen    255 parse.y        #define value_expr(node) value_expr_gen(parser, (node) = remove_begin(node))


value_to_id

value_to_id        60 ext/racc/cparse/cparse.c static ID value_to_id _((VALUE v));
value_to_id       339 ext/racc/cparse/cparse.c         v->lexmid = value_to_id(lexmid);
value_to_id       690 ext/racc/cparse/cparse.c     mid = value_to_id(method_id);


var_getter

var_getter        315 variable.c     static VALUE var_getter(ID id, VALUE *var);
var_getter        459 variable.c         gvar->getter = getter?getter:var_getter;


var_marker

var_marker        317 variable.c     static void  var_marker(VALUE *var);
var_marker        461 variable.c         gvar->marker = var_marker;


var_setter

var_setter        316 variable.c     static void  var_setter(VALUE val, ID id, VALUE *var);
var_setter        460 variable.c         gvar->setter = setter?setter:var_setter;


verbose_setter

verbose_setter   1150 ruby.c             rb_define_hooked_variable("$VERBOSE", &ruby_verbose, 0, verbose_setter);
verbose_setter   1151 ruby.c             rb_define_hooked_variable("$-v", &ruby_verbose, 0, verbose_setter);
verbose_setter   1152 ruby.c             rb_define_hooked_variable("$-w", &ruby_verbose, 0, verbose_setter);


version

version           355 ext/nkf/nkf-utf8/nkf.c STATIC  void    version PROTO(());
version          1186 ext/nkf/nkf-utf8/nkf.c             version();
version          4930 ext/nkf/nkf-utf8/nkf.c     version();
version           139 ext/openssl/openssl_missing.c     if (x->crl->version == NULL) {
version           140 ext/openssl/openssl_missing.c 	x->crl->version = M_ASN1_INTEGER_new();
version           141 ext/openssl/openssl_missing.c 	if (x->crl->version == NULL) return 0;
version           143 ext/openssl/openssl_missing.c     return ASN1_INTEGER_set(x->crl->version, version);
version           112 ext/openssl/openssl_missing.h int X509_CRL_set_version(X509_CRL *x, long version);
version           271 ext/openssl/ossl_x509cert.c     if ((ver = NUM2LONG(version)) < 0) {
version           279 ext/openssl/ossl_x509cert.c     return version;
version           149 ext/openssl/ossl_x509crl.c     if ((ver = NUM2LONG(version)) < 0) {
version           157 ext/openssl/ossl_x509crl.c     return version;
version           229 ext/openssl/ossl_x509req.c     long version;
version           232 ext/openssl/ossl_x509req.c     version = X509_REQ_get_version(req);
version           234 ext/openssl/ossl_x509req.c     return LONG2FIX(version);
version           243 ext/openssl/ossl_x509req.c     if ((ver = FIX2LONG(version)) < 0) {
version           251 ext/openssl/ossl_x509req.c     return version;
version          3768 ext/win32ole/win32ole.c     rb_ivar_set(self, rb_intern("version"), version);
version          3790 ext/win32ole/win32ole.c     VALUE version;
version          3807 ext/win32ole/win32ole.c             version = reg_enum_key(hguid, j);
version          3808 ext/win32ole/win32ole.c             if (version == Qnil)
version          3810 ext/win32ole/win32ole.c             if ( (name = reg_get_val(hguid, StringValuePtr(version))) != Qnil ) {
version          3812 ext/win32ole/win32ole.c                 oletypelib_set_member(typelib, name, guid, version);
version          3854 ext/win32ole/win32ole.c     VALUE version = Qnil;
version          3875 ext/win32ole/win32ole.c                 version = version_str;
version          3895 ext/win32ole/win32ole.c 	            version = ver;
version          3905 ext/win32ole/win32ole.c         oletypelib_set_member(self, typelib, guid, version);
version          4111 ext/win32ole/win32ole.c     rb_str_concat(key, version);
version          4145 ext/win32ole/win32ole.c     VALUE version = rb_ivar_get(self, rb_intern("version"));
version          4146 ext/win32ole/win32ole.c     return oletypelib_path(guid, version);
version           478 ruby.c             int version = 0;
version           704 ruby.c         		version = 1;
version           776 ruby.c             if (version) {
version           407 win32/win32.c      WORD version;
version          2167 win32/win32.c      WORD version;
version          2174 win32/win32.c      version = MAKEWORD(2, 0);
version          2175 win32/win32.c      if (WSAStartup(version, &retdata))


void_expr

void_expr         634 parse.y        			    if (nd_type($2) != NODE_BLOCK) void_expr($2);
void_expr         640 parse.y        				void_expr(node->nd_head);
void_expr        7537 parse.y        	void_expr(node->nd_head);


void_expr_gen

void_expr_gen     253 parse.y        static void void_expr_gen(struct parser_params*,NODE*);
void_expr_gen     256 parse.y        #define void_expr(node) void_expr_gen(parser, (node) = remove_begin(node))


void_stmts_gen

void_stmts_gen    257 parse.y        static void void_stmts_gen(struct parser_params*,NODE*);
void_stmts_gen    258 parse.y        #define void_stmts(node) void_stmts_gen(parser, node)


vsnprintf

vsnprintf          52 error.c        	vsnprintf((char*)buf+n, len-n, fmt, args);
vsnprintf          84 error.c            vsnprintf(buf, BUFSIZ, fmt, args);
vsnprintf         554 error.c            vsnprintf(buf, BUFSIZ, fmt, args);
vsnprintf        1006 error.c            vsnprintf(buf, BUFSIZ, fmt, args);
vsnprintf        1018 error.c            vsnprintf(buf, BUFSIZ, fmt, args);
vsnprintf        1038 error.c            vsnprintf(buf, BUFSIZ, fmt, args);
vsnprintf        1090 eval.c             vsnprintf(buf, BUFSIZ, fmt, args);
vsnprintf         291 ext/openssl/ossl.c 	len = vsnprintf(buf, BUFSIZ, fmt, args);
vsnprintf         654 ext/tk/tcltklib.c     vsnprintf(buf, BUFSIZ, fmt, args);
vsnprintf         593 ext/win32ole/win32ole.c     vsnprintf(buf, BUFSIZ, fmt, args);
vsnprintf         133 missing.h      extern int vsnprintf(char *, size_t n, char const *, va_list);
vsnprintf         254 regerror.c       n = vsnprintf(buf, bufsize, fmt, args);
vsnprintf           9 vms/vms.h      extern int vsnprintf();
vsnprintf        3894 win32/win32.c      ret = vsnprintf(buf, size, format, va);


vtohd

vtohd             322 pack.c         			 y = vtohd((DOUBLE_SWAPPER)y),	\
vtohd             330 pack.c         #define VTOHD(x,y)	vtohd(x)


vtohf

vtohf             296 pack.c         			 y = vtohf((FLOAT_SWAPPER)y),	\
vtohf             304 pack.c         #define VTOHF(x,y)	vtohf(x)


w16_status

w16_status        489 ext/nkf/nkf-utf8/nkf.c STATIC void w16_status PROTO((struct input_code *, int));
w16_status        498 ext/nkf/nkf-utf8/nkf.c     {"UTF-16",    0, 0, 0, {0, 0, 0}, w16_status, w_iconv16, 0},


w16e_conv

w16e_conv        2677 ext/nkf/nkf-utf8/nkf.c     else ret = w16e_conv(((c2<<8)&0xff00) + c1, &c2, &c1);
w16e_conv        2862 ext/nkf/nkf-utf8/nkf.c         w16e_conv(c1, &c2, &c1);
w16e_conv        2988 ext/nkf/nkf-utf8/nkf.c         w16e_conv(c1, &c2, &c1);
w16e_conv        3047 ext/nkf/nkf-utf8/nkf.c         w16e_conv(c1, &c2, &c1);


w16w_conv

w16w_conv        2628 ext/nkf/nkf-utf8/nkf.c     w16w_conv(val, &c2, &c1, &c0);
w16w_conv        2777 ext/nkf/nkf-utf8/nkf.c         w16w_conv(c1, &c2, &c1, &c0);
w16w_conv        2799 ext/nkf/nkf-utf8/nkf.c             w16w_conv(val, &c2, &c1, &c0);


w2e_conv

w2e_conv          304 ext/nkf/nkf-utf8/nkf.c STATIC  int     w2e_conv PROTO((int c2,int c1,int c0,int *p2,int *p1));
w2e_conv         1739 ext/nkf/nkf-utf8/nkf.c                   w2e_conv(ptr->buf[0], ptr->buf[1], ptr->buf[2],
w2e_conv         2570 ext/nkf/nkf-utf8/nkf.c 	ret = w2e_conv(c2, c1, c0, &c2, &c1);


w32_io_info

w32_io_info      1432 file.c             f1 = w32_io_info(&fname1, &st1);
w32_io_info      1434 file.c             f2 = w32_io_info(&fname2, &st2);


w_byte

w_byte            146 marshal.c          w_byte((x >> 0) & 0xff, arg);
w_byte            147 marshal.c          w_byte((x >> 8) & 0xff, arg);
w_byte            164 marshal.c      	w_byte(0, arg);
w_byte            168 marshal.c      	w_byte(x + 5, arg);
w_byte            172 marshal.c      	w_byte((x - 5)&0xff, arg);
w_byte            189 marshal.c      	w_byte(buf[i], arg);
w_byte            311 marshal.c      	w_byte(TYPE_SYMLINK, arg);
w_byte            315 marshal.c      	w_byte(TYPE_SYMBOL, arg);
w_byte            354 marshal.c      	w_byte(TYPE_EXTENDED, arg);
w_byte            367 marshal.c          w_byte(type, arg);
w_byte            380 marshal.c      	w_byte(TYPE_UCLASS, arg);
w_byte            421 marshal.c      	w_byte(TYPE_LINK, arg);
w_byte            427 marshal.c      	w_byte(TYPE_IVAR, arg);
w_byte            430 marshal.c      	w_byte(TYPE_NIL, arg);
w_byte            433 marshal.c      	w_byte(TYPE_TRUE, arg);
w_byte            436 marshal.c      	w_byte(TYPE_FALSE, arg);
w_byte            440 marshal.c      	w_byte(TYPE_FIXNUM, arg);
w_byte            444 marshal.c      	    w_byte(TYPE_FIXNUM, arg);
w_byte            476 marshal.c      		w_byte(TYPE_IVAR, arg);
w_byte            491 marshal.c      	    w_byte(TYPE_CLASS, arg);
w_byte            499 marshal.c      	    w_byte(TYPE_MODULE, arg);
w_byte            507 marshal.c      	    w_byte(TYPE_FLOAT, arg);
w_byte            512 marshal.c      	    w_byte(TYPE_BIGNUM, arg);
w_byte            518 marshal.c      		w_byte(sign, arg);
w_byte            540 marshal.c      	    w_byte(TYPE_STRING, arg);
w_byte            546 marshal.c      	    w_byte(TYPE_REGEXP, arg);
w_byte            548 marshal.c      	    w_byte(rb_reg_options(obj), arg);
w_byte            553 marshal.c      	    w_byte(TYPE_ARRAY, arg);
w_byte            569 marshal.c      		w_byte(TYPE_HASH, arg);
w_byte            576 marshal.c      		w_byte(TYPE_HASH_DEF, arg);
w_byte            724 marshal.c          w_byte(MARSHAL_MAJOR, &arg);
w_byte            725 marshal.c          w_byte(MARSHAL_MINOR, &arg);


w_bytes

w_bytes           298 marshal.c      	w_bytes(buf, len + save_mantissa(d, buf + len), arg);
w_bytes           301 marshal.c          w_bytes(buf, strlen(buf), arg);
w_bytes           316 marshal.c      	w_bytes(sym, strlen(sym), arg);
w_bytes           479 marshal.c      	    w_bytes(RSTRING(v)->ptr, RSTRING(v)->len, arg);
w_bytes           494 marshal.c      		w_bytes(RSTRING(path)->ptr, RSTRING(path)->len, arg);
w_bytes           502 marshal.c      		w_bytes(RSTRING(path)->ptr, RSTRING(path)->len, arg);
w_bytes           541 marshal.c      	    w_bytes(RSTRING(obj)->ptr, RSTRING(obj)->len, arg);
w_bytes           547 marshal.c      	    w_bytes(RREGEXP(obj)->str, RREGEXP(obj)->len, arg);


w_class

w_class           463 marshal.c      	    w_class(TYPE_USRMARSHAL, obj, arg, Qfalse);
w_class           478 marshal.c      	    w_class(TYPE_USERDEF, obj, arg, Qfalse);
w_class           586 marshal.c      	    w_class(TYPE_STRUCT, obj, arg, Qtrue);
w_class           602 marshal.c      	    w_class(TYPE_OBJECT, obj, arg, Qtrue);
w_class           610 marshal.c      		w_class(TYPE_DATA, obj, arg, Qtrue);


w_extended

w_extended        366 marshal.c          w_extended(klass, arg, check);
w_extended        377 marshal.c          w_extended(klass, arg, Qtrue);


w_iconv

w_iconv           305 ext/nkf/nkf-utf8/nkf.c STATIC  int     w_iconv PROTO((int c2,int c1,int c0));
w_iconv           497 ext/nkf/nkf-utf8/nkf.c     {"UTF-8",     0, 0, 0, {0, 0, 0}, w_status, w_iconv, 0},
w_iconv          1917 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, w_iconv);
w_iconv          2795 ext/nkf/nkf-utf8/nkf.c 	if (internal_unicode_f && (iconv == w_iconv || iconv == w_iconv16))
w_iconv          2830 ext/nkf/nkf-utf8/nkf.c     if (internal_unicode_f && (iconv == w_iconv || iconv == w_iconv16)){
w_iconv          3584 ext/nkf/nkf-utf8/nkf.c     w_iconv, w_iconv,


w_iconv16

w_iconv16         306 ext/nkf/nkf-utf8/nkf.c STATIC  int     w_iconv16 PROTO((int c2,int c1,int c0));
w_iconv16         498 ext/nkf/nkf-utf8/nkf.c     {"UTF-16",    0, 0, 0, {0, 0, 0}, w16_status, w_iconv16, 0},
w_iconv16        1919 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, w_iconv16);
w_iconv16        1921 ext/nkf/nkf-utf8/nkf.c         set_iconv(-TRUE, w_iconv16);
w_iconv16        1994 ext/nkf/nkf-utf8/nkf.c                 iconv == w_iconv16
w_iconv16        2795 ext/nkf/nkf-utf8/nkf.c 	if (internal_unicode_f && (iconv == w_iconv || iconv == w_iconv16))
w_iconv16        2830 ext/nkf/nkf-utf8/nkf.c     if (internal_unicode_f && (iconv == w_iconv || iconv == w_iconv16)){


w_iconv_common

w_iconv_common    307 ext/nkf/nkf-utf8/nkf.c STATIC  int	w_iconv_common PROTO((int c1,int c0,const unsigned short *const *pp,int psize,int *p2,int *p1));
w_iconv_common   2513 ext/nkf/nkf-utf8/nkf.c             ret = w_iconv_common(c1, c0, pp, sizeof_utf8_to_euc_C2, p2, p1);
w_iconv_common   2515 ext/nkf/nkf-utf8/nkf.c             ret =  w_iconv_common(c2, c1, utf8_to_euc_2bytes, sizeof_utf8_to_euc_2bytes, p2, p1);
w_iconv_common   2633 ext/nkf/nkf-utf8/nkf.c             ret =  w_iconv_common(c1, c0, pp, psize, p2, p1);
w_iconv_common   2637 ext/nkf/nkf-utf8/nkf.c             ret =  w_iconv_common(c2, c1, pp, psize, p2, p1);


w_ivar

w_ivar            465 marshal.c      	    if (ivtbl) w_ivar(0, &c_arg);
w_ivar            481 marshal.c      		w_ivar(ivtbl, &c_arg);
w_ivar            603 marshal.c      	    w_ivar(ROBJECT(obj)->iv_tbl, &c_arg);
w_ivar            628 marshal.c      	w_ivar(ivtbl, &c_arg);


w_long

w_long            116 marshal.c      static void w_long(long, struct dump_arg*);
w_long            139 marshal.c          w_long(n, arg);
w_long            312 marshal.c      	w_long((long)num, arg);
w_long            397 marshal.c      	w_long(tbl->num_entries, arg->arg);
w_long            401 marshal.c      	w_long(0, arg->arg);
w_long            422 marshal.c      	w_long((long)num, arg);
w_long            441 marshal.c      	w_long(FIX2INT(obj), arg);
w_long            445 marshal.c      	    w_long(FIX2LONG(obj), arg);
w_long            519 marshal.c      		w_long(SHORTLEN(len), arg); /* w_short? */
w_long            558 marshal.c      		w_long(len, arg);
w_long            578 marshal.c      	    w_long(RHASH(obj)->tbl->num_entries, arg);
w_long            592 marshal.c      		w_long(len, arg);


w_nbyte

w_nbyte           133 marshal.c          w_nbyte(&c, 1, arg);
w_nbyte           140 marshal.c          w_nbyte(s, n, arg);


w_object

w_object          330 marshal.c      static void w_object(VALUE,struct dump_arg*,int);
w_object          335 marshal.c          w_object(key, arg->arg, arg->limit);
w_object          336 marshal.c          w_object(value, arg->arg, arg->limit);
w_object          389 marshal.c          w_object(value, arg->arg, arg->limit);
w_object          448 marshal.c      	    w_object(rb_int2big(FIX2LONG(obj)), arg, limit);
w_object          464 marshal.c      	    w_object(v, arg, limit);
w_object          560 marshal.c      		    w_object(*ptr, arg, limit);
w_object          581 marshal.c      		w_object(RHASH(obj)->ifnone, arg, limit);
w_object          596 marshal.c      		    w_object(RSTRUCT(obj)->ptr[i], arg, limit);
w_object          617 marshal.c      		w_object(v, arg, limit);
w_object          635 marshal.c          w_object(arg->obj, arg->arg, arg->limit);


w_oconv

w_oconv           312 ext/nkf/nkf-utf8/nkf.c STATIC  void    w_oconv PROTO((int c2,int c1));
w_oconv           538 ext/nkf/nkf-utf8/nkf.c #   define  DEFAULT_CONV w_oconv
w_oconv          1211 ext/nkf/nkf-utf8/nkf.c 		output_conv = w_oconv; cp++;
w_oconv          1217 ext/nkf/nkf-utf8/nkf.c                 output_conv = w_oconv;
w_oconv          2559 ext/nkf/nkf-utf8/nkf.c     } else if (internal_unicode_f && (output_conv == w_oconv || output_conv == w_oconv16)){
w_oconv          2675 ext/nkf/nkf-utf8/nkf.c     if (internal_unicode_f && (output_conv == w_oconv || output_conv == w_oconv16));


w_oconv16

w_oconv16         313 ext/nkf/nkf-utf8/nkf.c STATIC  void    w_oconv16 PROTO((int c2,int c1));
w_oconv16        1197 ext/nkf/nkf-utf8/nkf.c 		output_conv = w_oconv16; cp+=2;
w_oconv16        2559 ext/nkf/nkf-utf8/nkf.c     } else if (internal_unicode_f && (output_conv == w_oconv || output_conv == w_oconv16)){
w_oconv16        2675 ext/nkf/nkf-utf8/nkf.c     if (internal_unicode_f && (output_conv == w_oconv || output_conv == w_oconv16));


w_short

w_short           526 marshal.c      			w_short(num & SHORTMASK, arg);
w_short           531 marshal.c      		    w_short(*d, arg);


w_status

w_status          488 ext/nkf/nkf-utf8/nkf.c STATIC void w_status PROTO((struct input_code *, int));
w_status          497 ext/nkf/nkf-utf8/nkf.c     {"UTF-8",     0, 0, 0, {0, 0, 0}, w_status, w_iconv, 0},


w_symbol

w_symbol          327 marshal.c          w_symbol(rb_intern(s), arg);
w_symbol          388 marshal.c          w_symbol(id, arg->arg);
w_symbol          453 marshal.c      	w_symbol(SYM2ID(obj), arg);
w_symbol          595 marshal.c      		    w_symbol(SYM2ID(RARRAY(mem)->ptr[i]), arg);


w_uclass

w_uclass          539 marshal.c      	    w_uclass(obj, rb_cString, arg);
w_uclass          545 marshal.c      	    w_uclass(obj, rb_cRegexp, arg);
w_uclass          552 marshal.c      	    w_uclass(obj, rb_cArray, arg);
w_uclass          567 marshal.c      	    w_uclass(obj, rb_cHash, arg);


w_unique

w_unique          355 marshal.c      	w_unique(path, arg);
w_unique          369 marshal.c          w_unique(path, arg);
w_unique          381 marshal.c      	w_unique(RSTRING(class2path(klass))->ptr, arg);


wait

wait             1017 ext/tk/tcltklib.c     int t_wait = NUM2INT(wait);
wait             1028 ext/tk/tcltklib.c     return wait;
wait             1054 ext/tk/tcltklib.c     return set_no_event_wait(self, wait);
wait              595 process.c      	result = wait(st);
wait              794 process.c      	pid = wait(&status);
wait             2043 win32/win32.c      while (rest->tv_usec < wait->tv_usec) {
wait             2044 win32/win32.c  	if (rest->tv_sec <= wait->tv_sec) {
wait             2050 win32/win32.c      rest->tv_sec -= wait->tv_sec;
wait             2051 win32/win32.c      rest->tv_usec -= wait->tv_usec;
wait             2115 win32/win32.c  	struct timeval wait;
wait             2118 win32/win32.c  	wait.tv_sec = 0; wait.tv_usec = 10 * 1000; // 10ms
wait             2140 win32/win32.c  		r = do_select(nfds, rd, wr, ex, &wait);
wait             2146 win32/win32.c  	} while (!timeout || subst(&rest, &wait));


wait_connectable0

wait_connectable0  965 ext/socket/socket.c     return (VALUE)wait_connectable0(p->fd, &p->fds_w, &p->fds_e);
wait_connectable0  992 ext/socket/socket.c     return wait_connectable0(fd, &arg.fds_w, &arg.fds_e);


wait_events

wait_events        84 win32/win32.c  static DWORD wait_events(HANDLE event, DWORD timeout);
wait_events      2874 win32/win32.c  	    if (wait_events(child->hProcess, timeout) != WAIT_OBJECT_0) {
wait_events      3556 win32/win32.c      RUBY_CRITICAL(ret = wait_events(NULL, msec));
wait_events      3566 win32/win32.c      RUBY_CRITICAL(wait_events(NULL, 0));
wait_events      3678 win32/win32.c  	    if (wait_events(thr, INFINITE) != WAIT_OBJECT_0) {


wait_readable

wait_readable     125 ext/io/wait/wait.c     i = (int)rb_ensure(wait_readable, (VALUE)&arg,
wait_readable     487 io.c           	rb_ensure(wait_readable, (VALUE)&rfds,


waitpid

waitpid           564 process.c          result = waitpid(pid, st, flags);
waitpid          3061 win32/win32.c      return waitpid(-1, status, 0);
waitpid           206 win32/win32.h  extern rb_pid_t waitpid (rb_pid_t, int *, int);


warn_print

warn_print        112 error.c            warn_print(buf, args);
warn_print        128 error.c            warn_print(buf, args);
warn_print       1075 error.c             warn_print(buf, args);
warn_print       1181 eval.c         	warn_print(": unhandled exception\n");
warn_print       1188 eval.c         	    warn_print(": ");
warn_print       1190 eval.c         	    warn_print("\n");
warn_print       1201 eval.c         	    warn_print(": ");
warn_print       1204 eval.c         		warn_print(" (");
warn_print       1206 eval.c         		warn_print(")\n");
warn_print       1371 eval.c         	warn_print(": unexpected return\n");
warn_print       1375 eval.c         	warn_print(": unexpected next\n");
warn_print       1379 eval.c         	warn_print(": unexpected break\n");
warn_print       1383 eval.c         	warn_print(": unexpected redo\n");
warn_print       1387 eval.c         	warn_print(": retry outside of rescue clause\n");


warn_print2

warn_print2      1164 eval.c         	    warn_print2(RSTRING(mesg)->ptr, RSTRING(mesg)->len);
warn_print2      1189 eval.c         	    warn_print2(RSTRING(epath)->ptr, RSTRING(epath)->len);
warn_print2      1202 eval.c         	    warn_print2(einfo, len);
warn_print2      1205 eval.c         		warn_print2(RSTRING(epath)->ptr, RSTRING(epath)->len);
warn_print2      1209 eval.c         		warn_print2(tail, elen-len-1);


warn_printf

warn_printf      1104 eval.c         	    warn_printf("%s:%d:in `%s'", ruby_sourcefile, ruby_sourceline,
warn_printf      1108 eval.c         	    warn_printf("%s", ruby_sourcefile);
warn_printf      1111 eval.c         	    warn_printf("%s:%d", ruby_sourcefile, ruby_sourceline);
warn_printf      1152 eval.c         	    warn_printf("%s:%d", ruby_sourcefile, ruby_sourceline);
warn_printf      1154 eval.c         	    warn_printf("%d", ruby_sourceline);
warn_printf      1225 eval.c         		warn_printf("\tfrom %s\n", RSTRING(ep->ptr[i])->ptr);
warn_printf      1228 eval.c         		warn_printf("\t ... %ld levels...\n",
warn_printf      1392 eval.c         	    warn_printf("%s:%d: uncaught throw\n",
warn_printf      1397 eval.c         	    warn_printf(": unexpected throw\n");
warn_printf      4374 eval.c         	    warn_printf("Exception `%s' at %s:%d - %s\n",
warn_printf      10685 eval.c         	    warn_printf("deadlock %p: %s:",
warn_printf      10687 eval.c         	    if (th->wait_for & WAIT_FD) warn_printf("F(%d)", th->fd);
warn_printf      10688 eval.c         	    if (th->wait_for & WAIT_SELECT) warn_printf("S");
warn_printf      10689 eval.c         	    if (th->wait_for & WAIT_TIME) warn_printf("T(%f)", th->delay);
warn_printf      10691 eval.c         		warn_printf("J(%p)", th->join ? th->join->thread : 0);
warn_printf      10692 eval.c         	    if (th->wait_for & WAIT_PID) warn_printf("P");
warn_printf      10693 eval.c         	    if (!th->wait_for) warn_printf("-");
warn_printf      10694 eval.c         	    warn_printf(" %s - %s:%d\n",


warn_unless_e_option

warn_unless_e_option 7681 parse.y        	warn_unless_e_option(node, "integer literal in conditional range");
warn_unless_e_option 7756 parse.y        	    warn_unless_e_option(node, "regex literal in condition");


was_bol

was_bol          5338 parse.y            if (was_bol() && whole_match_p(eos, len, indent)) {
was_bol          5735 parse.y        	if (was_bol()) {
was_bol          6691 parse.y        	if (was_bol() && whole_match_p("__END__", 7, 0)) {


wce_FILETIME2int64

wce_FILETIME2int64   67 wince/time_wce.c 	t = wce_FILETIME2int64(f2)-wce_FILETIME2int64(f1);
wce_FILETIME2int64  115 wince/time_wce.c 	offset = wce_FILETIME2int64(f1970) - wce_FILETIME2int64(f1601);
wce_FILETIME2int64  117 wince/time_wce.c 	t = wce_FILETIME2int64(*f);
wce_FILETIME2int64  132 wince/time_wce.c 	time += wce_FILETIME2int64(f1970);
wce_FILETIME2int64  168 wince/time_wce.c 	diff = wce_FILETIME2int64(sf) - wce_FILETIME2int64(lf);
wce_FILETIME2int64  171 wince/time_wce.c 	t = wce_FILETIME2int64(f) - diff;
wce_FILETIME2int64  192 wince/time_wce.c 	diff = (wce_FILETIME2int64(lf)-wce_FILETIME2int64(sf))/_onesec_in100ns;


wce_FILETIME2time_t

wce_FILETIME2time_t  130 wince/io_wce.c 	fi->time_create = wce_FILETIME2time_t( &fda.ftCreationTime );
wce_FILETIME2time_t  131 wince/io_wce.c 	fi->time_access = wce_FILETIME2time_t( &fda.ftLastAccessTime );
wce_FILETIME2time_t  132 wince/io_wce.c 	fi->time_write  = wce_FILETIME2time_t( &fda.ftLastWriteTime );
wce_FILETIME2time_t  152 wince/io_wce.c 	fi->time_create = wce_FILETIME2time_t( &fda.ftCreationTime );
wce_FILETIME2time_t  153 wince/io_wce.c 	fi->time_access = wce_FILETIME2time_t( &fda.ftLastAccessTime );
wce_FILETIME2time_t  154 wince/io_wce.c 	fi->time_write  = wce_FILETIME2time_t( &fda.ftLastWriteTime );
wce_FILETIME2time_t   69 wince/sys/stat.c 	st->st_atime = wce_FILETIME2time_t(&fd.ftLastAccessTime);
wce_FILETIME2time_t   70 wince/sys/stat.c     st->st_mtime = wce_FILETIME2time_t(&fd.ftLastWriteTime);
wce_FILETIME2time_t   71 wince/sys/stat.c     st->st_ctime = wce_FILETIME2time_t(&fd.ftCreationTime);
wce_FILETIME2time_t   96 wince/sys/stat.c 	sbuf->st_ctime = wce_FILETIME2time_t(&ctime);
wce_FILETIME2time_t   97 wince/sys/stat.c 	sbuf->st_atime = wce_FILETIME2time_t(&atime);
wce_FILETIME2time_t   98 wince/sys/stat.c 	sbuf->st_mtime = wce_FILETIME2time_t(&mtime);
wce_FILETIME2time_t   20 wince/sys/timeb.c 	tp->time     = wce_FILETIME2time_t(&f);
wce_FILETIME2time_t   56 wince/time.h   time_t wce_FILETIME2time_t(const FILETIME* pf);
wce_FILETIME2time_t  151 wince/time_wce.c 	*timer = wce_FILETIME2time_t(&f);
wce_FILETIME2time_t  196 wince/time_wce.c 	return wce_FILETIME2time_t(&f) - (time_t)diff;


wce_FreeCommandLine

wce_FreeCommandLine  430 win32/win32.c      wce_FreeCommandLine();
wce_FreeCommandLine  163 wince/wince.h  void wce_FreeCommandLine(void);


wce_SYSTEMTIME2tm

wce_SYSTEMTIME2tm  176 wince/time_wce.c 	tms = wce_SYSTEMTIME2tm(&s);
wce_SYSTEMTIME2tm  207 wince/time_wce.c 	tms = wce_SYSTEMTIME2tm(&s);


wce_SetCommandLine

wce_SetCommandLine  162 wince/wince.h  void wce_SetCommandLine(LPCWSTR wcmd);
wce_SetCommandLine   12 wince/wincemain.c 	wce_SetCommandLine(wcmd);


wce_SetCurrentDir

wce_SetCurrentDir  165 wince/wince.h  void wce_SetCurrentDir();
wce_SetCurrentDir   14 wince/wincemain.c 	wce_SetCurrentDir();


wce_getFILETIMEFromYear

wce_getFILETIMEFromYear   64 wince/time_wce.c 	f1 = wce_getFILETIMEFromYear( s->wYear );
wce_getFILETIMEFromYear  112 wince/time_wce.c 	f1601 = wce_getFILETIMEFromYear(1601);
wce_getFILETIMEFromYear  113 wince/time_wce.c 	f1970 = wce_getFILETIMEFromYear(1970);
wce_getFILETIMEFromYear  128 wince/time_wce.c 	f1970 = wce_getFILETIMEFromYear(1970);


wce_int642FILETIME

wce_int642FILETIME  134 wince/time_wce.c 	f = wce_int642FILETIME(time);
wce_int642FILETIME  172 wince/time_wce.c 	f = wce_int642FILETIME(t);


wce_mbtowc

wce_mbtowc         35 wince/direct.c 	wdir = wce_mbtowc(dir);
wce_mbtowc         48 wince/direct.c 	wdir = wce_mbtowc(dir);
wce_mbtowc         27 wince/io_wce.c 	wold = wce_mbtowc(oldname);
wce_mbtowc         28 wince/io_wce.c 	wnew = wce_mbtowc(newname);
wce_mbtowc         45 wince/io_wce.c 	wfile = wce_mbtowc(file);
wce_mbtowc         71 wince/io_wce.c 	wfile = wce_mbtowc(file);
wce_mbtowc         14 wince/stdio.c  	wfilename = wce_mbtowc(filename);
wce_mbtowc         15 wince/stdio.c  	wmode     = wce_mbtowc(mode);
wce_mbtowc         30 wince/stdio.c  	wmode = wce_mbtowc(mode);
wce_mbtowc         30 wince/string_wce.c 	w1 = wce_mbtowc(s1);
wce_mbtowc         31 wince/string_wce.c 	w2 = wce_mbtowc(s2);
wce_mbtowc         59 wince/string_wce.c 	w1 = wce_mbtowc(s1);
wce_mbtowc         60 wince/string_wce.c 	w2 = wce_mbtowc(s2);
wce_mbtowc         75 wince/string_wce.c 	wstr = wce_mbtowc(str);
wce_mbtowc         76 wince/string_wce.c 	wcs  = wce_mbtowc(cs);
wce_mbtowc         25 wince/sys/utime.c 	w = wce_mbtowc(f);
wce_mbtowc         48 wince/wince.c  	lpwProcName = wce_mbtowc( lpProcName );
wce_mbtowc         92 wince/wince.c  	lpwFileName = wce_mbtowc(lpFileName);
wce_mbtowc        104 wince/wince.c  	lpwFileName = wce_mbtowc(lpFileName);
wce_mbtowc        116 wince/wince.c  	wfn1 = wce_mbtowc(fn1);
wce_mbtowc        117 wince/wince.c  	wfn2 = wce_mbtowc(fn2);
wce_mbtowc        129 wince/wince.c  	woldname = wce_mbtowc(oldname);
wce_mbtowc        130 wince/wince.c  	wnewname = wce_mbtowc(newname);
wce_mbtowc        148 wince/wince.c  	wpath = wce_mbtowc(path);
wce_mbtowc        179 wince/wince.c  	wname  = wce_mbtowc( name );
wce_mbtowc        216 wince/wince.c  	wname  = wce_mbtowc(name);
wce_mbtowc        217 wince/wince.c  	wvalue = wce_mbtowc(value);
wce_mbtowc        316 wince/wince.c  	wappname     = wce_mbtowc(appname);
wce_mbtowc        317 wince/wince.c  	wcommandline = wce_mbtowc(commandline);
wce_mbtowc        318 wince/wince.c  	wdir         = wce_mbtowc(dir);
wce_mbtowc        337 wince/wince.c  	wname = wce_mbtowc(name);
wce_mbtowc        352 wince/wince.c  	lpWBuffer = wce_mbtowc(lpBuffer);
wce_mbtowc        369 wince/wince.c  	wpath = wce_mbtowc(path);
wce_mbtowc        405 wince/wince.c  	wfilename = wce_mbtowc(filename);
wce_mbtowc        456 wince/wince.c  	wlibname = wce_mbtowc(libname);
wce_mbtowc        468 wince/wince.c  	wlibname = wce_mbtowc(lpLibFileName);
wce_mbtowc        516 wince/wince.c  	TCHAR* tmode = wce_mbtowc(mode);
wce_mbtowc        547 wince/wince.c  		tbuf = wce_mbtowc(buf);
wce_mbtowc        551 wince/wince.c  		tbuf = wce_mbtowc(str);
wce_mbtowc        159 wince/wince.h  wchar_t* wce_mbtowc(const char* a);


wce_replaceRelativeDir

wce_replaceRelativeDir   26 wince/sys/stat.c 	wfilename = wce_replaceRelativeDir(filename);
wce_replaceRelativeDir  515 wince/wince.c  	TCHAR* tfname = wce_replaceRelativeDir(fname);
wce_replaceRelativeDir  164 wince/wince.h  TCHAR *wce_replaceRelativeDir(const char* str);


wce_time_t2FILETIME

wce_time_t2FILETIME  170 wince/time_wce.c 	f = wce_time_t2FILETIME(*timer);
wce_time_t2FILETIME  205 wince/time_wce.c 	f = wce_time_t2FILETIME(*t);


wce_wctomb

wce_wctomb         34 wince/wince.c  	mb = wce_wctomb(lpFileNameW);
wce_wctomb         65 wince/wince.c  	acmd = wce_wctomb( wcmd );
wce_wctomb        192 wince/wince.c  	avalue = wce_wctomb( (LPCTSTR)lpData );
wce_wctomb        292 wince/wince.c  	mb = wce_wctomb(wv.szCSDVersion);
wce_wctomb        373 wince/wince.c  	mb = wce_wctomb( wdata.cFileName );
wce_wctomb        389 wince/wince.c  	mb1 = wce_wctomb( wdata.cFileName );
wce_wctomb        531 wince/wince.c  	buf = wce_wctomb(tbuf);
wce_wctomb        160 wince/wince.h  char*    wce_wctomb(const wchar_t* w);


wday_p

wday_p           1512 time.c             wday_p(0);
wday_p           1525 time.c             wday_p(1);
wday_p           1538 time.c             wday_p(2);
wday_p           1551 time.c             wday_p(3);
wday_p           1564 time.c             wday_p(4);
wday_p           1577 time.c             wday_p(5);
wday_p           1590 time.c             wday_p(6);


weeknumber

weeknumber         98 missing/strftime.c static int weeknumber();
weeknumber        365 missing/strftime.c 			sprintf(tbuf, "%02d", weeknumber(timeptr, 0));
weeknumber        374 missing/strftime.c 			sprintf(tbuf, "%02d", weeknumber(timeptr, 1));
weeknumber        651 missing/strftime.c 	weeknum = weeknumber(timeptr, 1);


whole_match_p

whole_match_p    5338 parse.y            if (was_bol() && whole_match_p(eos, len, indent)) {
whole_match_p    5368 parse.y        	} while (!whole_match_p(eos, len, indent));
whole_match_p    5392 parse.y        	} while (!whole_match_p(eos, len, indent));
whole_match_p    6691 parse.y        	if (was_bol() && whole_match_p("__END__", 7, 0)) {


window_addstr

window_addstr    1138 ext/curses/curses.c     window_addstr(obj, str);
window_addstr    1555 ext/curses/curses.c     rb_define_method(cWindow, "addstr", window_addstr, 1);


window_attroff

window_attroff     75 ext/curses/curses.c static VALUE window_attroff();
window_attroff    540 ext/curses/curses.c   return window_attroff(rb_stdscr,attrs);
window_attroff   1571 ext/curses/curses.c     rb_define_method(cWindow, "attroff", window_attroff, 1);


window_attron

window_attron      76 ext/curses/curses.c static VALUE window_attron();
window_attron     547 ext/curses/curses.c   return window_attron(rb_stdscr,attrs);
window_attron    1572 ext/curses/curses.c     rb_define_method(cWindow, "attron", window_attron, 1);


window_attrset

window_attrset     77 ext/curses/curses.c static VALUE window_attrset();
window_attrset    554 ext/curses/curses.c   return window_attrset(rb_stdscr,attrs);
window_attrset   1573 ext/curses/curses.c     rb_define_method(cWindow, "attrset", window_attrset, 1);


window_keypad

window_keypad    1568 ext/curses/curses.c     rb_define_method(cWindow, "keypad", window_keypad, 1);
window_keypad    1569 ext/curses/curses.c     rb_define_method(cWindow, "keypad=", window_keypad, 1);


window_maxx

window_maxx      1038 ext/curses/curses.c       x = NUM2INT(window_maxx(self)) - 1;
window_maxx      1547 ext/curses/curses.c     rb_define_method(cWindow, "maxx", window_maxx, 0);


window_maxy

window_maxy      1039 ext/curses/curses.c       y = NUM2INT(window_maxy(self)) - 1;
window_maxy      1546 ext/curses/curses.c     rb_define_method(cWindow, "maxy", window_maxy, 0);


writable

writable           37 ext/stringio/stringio.c static struct StringIO* writable _((struct StringIO *));
writable          990 ext/stringio/stringio.c     struct StringIO *ptr = writable(StringIO(self));
writable         1049 ext/stringio/stringio.c     struct StringIO *ptr = writable(StringIO(self));
writable         1211 ext/stringio/stringio.c     VALUE string = writable(StringIO(self))->string;


write

write             829 class.c            rb_attr(klass, rb_intern(name), read, write, Qfalse);
write             672 eval.c             if (write) {
write            10830 eval.c             if (!read && !write && !except) {
write            10861 eval.c         	    n = select(max, read, write, except, tvp);
write            10891 eval.c             if (write) rb_fd_copy(&curr_thread->writefds, write, max);
write            10904 eval.c             if (write) *write = *rb_fd_ptr(&curr_thread->writefds);
write             281 ext/sdbm/_sdbm.c 		    || write(db->pagf, db->pagbuf, PBLKSIZ) < 0)
write             336 ext/sdbm/_sdbm.c 		    || write(db->pagf, db->pagbuf, PBLKSIZ) < 0)
write             396 ext/sdbm/_sdbm.c 		    write(db->pagf, zer, PBLKSIZ) < 0) {
write             406 ext/sdbm/_sdbm.c 			    || write(db->pagf, db->pagbuf, PBLKSIZ) < 0)
write             412 ext/sdbm/_sdbm.c 			 || write(db->pagf, new, PBLKSIZ) < 0)
write             433 ext/sdbm/_sdbm.c 		    || write(db->pagf, db->pagbuf, PBLKSIZ) < 0)
write             442 ext/sdbm/_sdbm.c 	(void) write(2, "sdbm: cannot insert after SPLTMAX attempts.\n", 44);
write             577 ext/sdbm/_sdbm.c 	    || write(db->dirf, db->dirbuf, DBLKSIZ) < 0)
write             437 io.c               r = write(fptr->fd, fptr->wbuf+fptr->wbuf_off, l);
write             587 io.c           	r = write(fptr->fd, RSTRING(str)->ptr+offset, l);
write            2290 io.c               n = write(fptr->fd, RSTRING(str)->ptr, RSTRING(str)->len);
write            4427 io.c               if (!NIL_P(write)) {
write            4428 io.c           	Check_Type(write, T_ARRAY);
write            4429 io.c           	for (i=0; i<RARRAY(write)->len; i++) {
write            4430 io.c           	    GetOpenFile(rb_io_get_io(RARRAY(write)->ptr[i]), fptr);
write            4479 io.c           	    for (i=0; i< RARRAY(write)->len; i++) {
write            4480 io.c           		GetOpenFile(rb_io_get_io(RARRAY(write)->ptr[i]), fptr);
write            4482 io.c           		    rb_ary_push(list, rb_ary_entry(write, i));
write            4502 io.c               VALUE read, write, except;
write            4514 io.c               return select_internal(p->read, p->write, p->except, p->timeout, p->fdsets);
write            4548 io.c               rb_scan_args(argc, argv, "13", &args.read, &args.write, &args.except, &timeout);
write            4563 io.c               return select_internal(args.read, args.write, args.except,
write            1356 process.c      	    write(ep[1], &err, sizeof(err));


wsplit_p

wsplit_p          433 io.c                   wsplit_p(fptr)) {
wsplit_p          583 io.c                       wsplit_p(fptr)) {


ww16_conv

ww16_conv         308 ext/nkf/nkf-utf8/nkf.c STATIC  int     ww16_conv PROTO((int c2, int c1, int c0));
ww16_conv        2520 ext/nkf/nkf-utf8/nkf.c             if (p1) *p1 = CLASS_UTF16 | ww16_conv(c2, c1, c0);
ww16_conv        2565 ext/nkf/nkf-utf8/nkf.c 	val = ww16_conv(c2, c1, c0);


x0212_shift

x0212_shift       478 ext/nkf/nkf-utf8/nkf.c STATIC int x0212_shift PROTO((int c));
x0212_shift      2970 ext/nkf/nkf-utf8/nkf.c         c2 = x0212_shift(c2);


x0212_unshift

x0212_unshift     479 ext/nkf/nkf-utf8/nkf.c STATIC int x0212_unshift PROTO((int c));
x0212_unshift    2432 ext/nkf/nkf-utf8/nkf.c         c2 = x0212_unshift(c2);


xalloca

xalloca          1609 regcomp.c        map = (GroupNumRemap* )xalloca(sizeof(GroupNumRemap) * (env->num_mem + 1));
xalloca           379 regexec.c          alloc_addr = (char* )xalloca(sizeof(char*) * (ptr_num));\
xalloca           386 regexec.c          alloc_addr = (char* )xalloca(sizeof(char*) * (ptr_num)\


xcalloc

xcalloc            53 defines.h      void *xcalloc(size_t,size_t);
xcalloc            46 dln.c          void *xcalloc();
xcalloc            74 ext/digest/digest.c     pctx = xcalloc(algo->ctx_size, 1);
xcalloc          8791 parse.y            void *ptr = xcalloc(nelem, size);
xcalloc          1380 win32/win32.c      p = xcalloc(sizeof(DIR), 1);


xfree

xfree              56 defines.h      void xfree(void*);
xfree            2407 eval.c         	    xfree(hook);
xfree            1416 ext/bigdecimal/bigdecimal.c         xfree(pv);
xfree              49 ext/dl/cfunc.c       xfree(data->name);
xfree              51 ext/dl/cfunc.c   xfree(data);
xfree             124 ext/dl/cfunc.c     if( data->name ) xfree(data->name);
xfree             172 ext/dl/handle.c 	    xfree(name_a);
xfree             180 ext/dl/handle.c 		    xfree(name_n);
xfree             199 ext/dl/handle.c 	    xfree(name_n);
xfree              69 ext/stringio/stringio.c 	xfree(ptr);
xfree              60 missing/alloca.c extern void	xfree();
xfree             165 missing/alloca.c 	  xfree ((pointer) hp);	/* collect garbage */
xfree            5056 parse.y            xfree(RSTRING(str)->ptr);
xfree            8008 parse.y        	if (!lvtbl->nofree) xfree(lvtbl->tbl);
xfree            8012 parse.y        	xfree(lvtbl->dnames);
xfree            8015 parse.y            xfree(lvtbl);
xfree            8120 parse.y        		xfree(ruby_scope->local_tbl);
xfree            8723 parse.y        	xfree(p->parser_tokenbuf);
xfree            8727 parse.y        	    xfree(local->tbl);
xfree            8729 parse.y        	xfree(local);
xfree            8731 parse.y            xfree(p);
xfree            8829 parse.y            xfree(ptr);
xfree             157 regcomp.c          xfree(uslist->us);
xfree            4442 regcomp.c          xfree(reg->exact);
xfree            4571 regcomp.c        if (IS_NOT_NULL(reg->p))                xfree(reg->p);
xfree            4572 regcomp.c        if (IS_NOT_NULL(reg->exact))            xfree(reg->exact);
xfree            4573 regcomp.c        if (IS_NOT_NULL(reg->int_map))          xfree(reg->int_map);
xfree            4574 regcomp.c        if (IS_NOT_NULL(reg->int_map_backward)) xfree(reg->int_map_backward);
xfree            4575 regcomp.c        if (IS_NOT_NULL(reg->repeat_range))     xfree(reg->repeat_range);
xfree            4588 regcomp.c          xfree(reg);
xfree            4596 regcomp.c        xfree(from);\
xfree            4816 regcomp.c          xfree(scan_env.mem_nodes_dynamic);
xfree            4874 regcomp.c            xfree(scan_env.mem_nodes_dynamic);
xfree              60 regexec.c        xfree(node);
xfree             244 regexec.c            if (r->beg) xfree(r->beg);
xfree             245 regexec.c            if (r->end) xfree(r->end);
xfree             251 regexec.c          if (free_self) xfree(r);
xfree             374 regexec.c      #define MATCH_ARG_FREE(msa)   if ((msa).stack_p) xfree((msa).stack_p)
xfree            1008 regexec.c            xfree(ta->stk_base);
xfree              89 regparse.c         if (IS_NOT_NULL(bbuf->p)) xfree(bbuf->p);
xfree              90 regparse.c         xfree(bbuf);
xfree             349 regparse.c         xfree(key);
xfree             435 regparse.c       xfree(e->name);
xfree             436 regparse.c       if (IS_NOT_NULL(e->back_refs)) xfree(e->back_refs);
xfree             437 regparse.c       xfree(key);
xfree             438 regparse.c       xfree(e);
xfree             619 regparse.c     	xfree(e->name);
xfree             624 regparse.c     	if (IS_NOT_NULL(e->back_refs)) xfree(e->back_refs);
xfree             629 regparse.c           xfree(t->e);
xfree             647 regparse.c       if (IS_NOT_NULL(t)) xfree(t);
xfree             746 regparse.c     	xfree(t);
xfree             975 regparse.c           xfree(NSTRING(node).s);
xfree             996 regparse.c           xfree(node);
xfree            1028 regparse.c           xfree(NBACKREF(node).back_dynamic);
xfree            1047 regparse.c       xfree(node);
xfree            1061 regparse.c         xfree(n);
xfree            1395 regparse.c         xfree(NSTRING(node).s);
xfree            4658 regparse.c         if (IS_NOT_NULL(cc->mbuf)) xfree(cc->mbuf);
xfree            4659 regparse.c         xfree(node);


xmalloc

xmalloc            51 defines.h      void *xmalloc(size_t);
xmalloc            44 dln.c          #ifndef xmalloc
xmalloc            45 dln.c          void *xmalloc();
xmalloc           125 dln.c              *buf = xmalloc(len);
xmalloc           274 dln.c              reloc = (struct relocation_info*)xmalloc(size);
xmalloc           306 dln.c              buffer = (struct nlist*)xmalloc(hdrp->a_syms + size);
xmalloc           446 dln.c              addr = (unsigned char*)xmalloc(size);
xmalloc           516 dln.c              obj = (struct undef*)xmalloc(sizeof(struct undef));
xmalloc           764 dln.c          	    new_sym = (struct nlist*)xmalloc(sizeof(struct nlist));
xmalloc           996 dln.c          	data = (int*)xmalloc(size);
xmalloc          1401 ext/bigdecimal/bigdecimal.c     void *p = xmalloc((unsigned int)mb);
xmalloc           180 ext/digest/digest.c     pctx2 = xmalloc(len);
xmalloc           203 ext/digest/digest.c     pctx2 = xmalloc(len);
xmalloc           167 ext/dl/handle.c 	    char *name_a = (char*)xmalloc(len+2);
xmalloc           177 ext/dl/handle.c 		    char *name_n = (char*)xmalloc(len+5);
xmalloc           196 ext/dl/handle.c 	    char *name_n = (char*)xmalloc(len+4);
xmalloc           398 ext/zlib/zlib.c     return xmalloc(items * size);
xmalloc          2107 file.c             buf = xmalloc(size);
xmalloc            61 missing/alloca.c extern pointer	xmalloc();
xmalloc           181 missing/alloca.c     register pointer	new = xmalloc (sizeof (header) + size);
xmalloc          8781 parse.y            void *ptr = xmalloc(size);
xmalloc            60 regcomp.c          UChar* r = (UChar* )xmalloc(len + 1);
xmalloc           129 regcomp.c        buf->p = (UChar* )xmalloc(size);
xmalloc           145 regcomp.c        p = (UnsetAddr* )xmalloc(sizeof(UnsetAddr)* size);
xmalloc           628 regcomp.c          p = (OnigRepeatRange* )xmalloc(sizeof(OnigRepeatRange) * REPEAT_RANGE_ALLOC);
xmalloc          3322 regcomp.c            *int_skip = (int* )xmalloc(sizeof(int) * ONIG_CHAR_TABLE_SIZE);
xmalloc          4306 regcomp.c          reg->exact = (UChar* )xmalloc(e->len);
xmalloc          4680 regcomp.c          reg->p = (UChar* )xmalloc(reg->alloc);
xmalloc          4686 regcomp.c          reg->exact = (UChar* )xmalloc(from->exact_end - from->exact);
xmalloc          4694 regcomp.c          reg->int_map = (int* )xmalloc(size);
xmalloc          4701 regcomp.c          reg->int_map_backward = (int* )xmalloc(size);
xmalloc          4909 regcomp.c        *reg = (regex_t* )xmalloc(sizeof(regex_t));
xmalloc            77 regexec.c        node = (OnigCaptureTreeNode* )xmalloc(sizeof(OnigCaptureTreeNode));
xmalloc           100 regexec.c              (OnigCaptureTreeNode** )xmalloc(sizeof(OnigCaptureTreeNode*) * n);
xmalloc           172 regexec.c          region->beg = (int* )xmalloc(n * sizeof(int));
xmalloc           173 regexec.c          region->end = (int* )xmalloc(n * sizeof(int));
xmalloc           234 regexec.c        r = (OnigRegion* )xmalloc(sizeof(OnigRegion));
xmalloc           265 regexec.c            to->beg = (int* )xmalloc(RREGC_SIZE);
xmalloc           266 regexec.c            to->end = (int* )xmalloc(RREGC_SIZE);
xmalloc           430 regexec.c          x = (StackType* )xmalloc(sizeof(StackType) * n * 2);
xmalloc          2838 regexec.c          *skip = (int* )xmalloc(sizeof(int) * ONIG_CHAR_TABLE_SIZE);
xmalloc           100 regparse.c       *rto = to = (BBuf* )xmalloc(sizeof(BBuf));
xmalloc           231 regparse.c       r = (UChar* )xmalloc(slen + term_len);
xmalloc           270 regparse.c         r = (UChar* )xmalloc(capa + 1);
xmalloc           284 regparse.c       r = (UChar* )xmalloc(capa + 1);
xmalloc           344 regparse.c       key = (st_strend_key* )xmalloc(sizeof(st_strend_key));
xmalloc           721 regparse.c         e = (NameEntry* )xmalloc(sizeof(NameEntry));
xmalloc           738 regparse.c           t = (NameTable* )xmalloc(sizeof(NameTable));
xmalloc           744 regparse.c           t->e = (NameEntry* )xmalloc(sizeof(NameEntry) * alloc);
xmalloc           791 regparse.c           e->back_refs = (int* )xmalloc(sizeof(int) * alloc);
xmalloc           925 regparse.c     	p = (Node** )xmalloc(sizeof(Node*) * alloc);
xmalloc          1083 regparse.c       node = (Node* )xmalloc(sizeof(Node));
xmalloc          1143 regparse.c         bbuf = (BBuf* )xmalloc(sizeof(BBuf));
xmalloc          1241 regparse.c         int* p = (int* )xmalloc(sizeof(int) * back_num);
xmalloc          1577 regparse.c       bbuf = *pbuf = (BBuf* )xmalloc(sizeof(BBuf));
xmalloc          4861 regparse.c                 new_key = (type_cclass_key* )xmalloc(sizeof(type_cclass_key));
xmalloc           483 ruby.h         #define ALLOC(type) (type*)xmalloc(sizeof(type))
xmalloc          1790 time.c         	*buf = xmalloc(size);
xmalloc           617 util.c             tmp = xmalloc(len);
xmalloc           628 util.c             char *buf = xmalloc(size);
xmalloc           642 util.c             char *buf = xmalloc(PATH_MAX+1);


xmalloc2

xmalloc2           52 defines.h      void *xmalloc2(size_t,size_t);
xmalloc2          482 ruby.h         #define ALLOC_N(type,n) (type*)xmalloc2((n),sizeof(type))


xmemcpy

xmemcpy            62 regcomp.c          xmemcpy(r, s, len);
xmemcpy          3736 regcomp.c        xmemcpy(map, &clean_info, sizeof(OptMapInfo));
xmemcpy          4308 regcomp.c          xmemcpy(reg->exact, e->s, e->len);
xmemcpy          4595 regcomp.c        xmemcpy(to, from, sizeof(regex_t));\
xmemcpy          4675 regcomp.c        xmemcpy(reg, from, sizeof(onig_t));
xmemcpy          4682 regcomp.c          xmemcpy(reg->p, from->p, reg->alloc);
xmemcpy          4689 regcomp.c          xmemcpy(reg->exact, from->exact, reg->exact_end - reg->exact);
xmemcpy          4696 regcomp.c          xmemcpy(reg->int_map, from->int_map, size);
xmemcpy          4703 regcomp.c          xmemcpy(reg->int_map_backward, from->int_map_backward, size);
xmemcpy           208 regerror.c     	    xmemcpy(p, einfo->par, MAX_ERROR_PAR_LEN - 3);
xmemcpy           210 regerror.c     	    xmemcpy(p, "...", 3);
xmemcpy           214 regerror.c     	    xmemcpy(p, einfo->par, len);
xmemcpy           234 regerror.c         xmemcpy(s, q, len);
xmemcpy           435 regexec.c          xmemcpy(x, stk_base, n * sizeof(StackType));
xmemcpy          1258 regexec.c            if (q < end) { xmemcpy(bp, "...\"", 4); bp += 4; }
xmemcpy          1259 regexec.c            else         { xmemcpy(bp, "\"",    1); bp += 1; }
xmemcpy           457 regint.h         xmemcpy((buf)->p + (pos), (bytes), (n));\
xmemcpy           497 regint.h           xmemcpy((buf)->p + (pos), (bytes), (n));\
xmemcpy           661 regint.h         xmemcpy(&val, (p), sizeof(type));\
xmemcpy           105 regparse.c       xmemcpy(to->p, from->p, from->used);
xmemcpy           217 regparse.c         xmemcpy(dest, src, len);
xmemcpy           233 regparse.c       xmemcpy(r, s, slen);
xmemcpy           926 regparse.c     	xmemcpy(p, env->mem_nodes_static,


xmemmove

xmemmove          476 regint.h         xmemmove((buf)->p + (to), (buf)->p + (from), (n));\
xmemmove          482 regint.h         xmemmove((buf)->p + (to), (buf)->p + (from), (n));\
xmemmove          487 regint.h         xmemmove((buf)->p + (to), (buf)->p + (from), (buf)->used - (from));\


xrealloc

xrealloc           54 defines.h      void *xrealloc(void*,size_t);
xrealloc           47 dln.c          void *xrealloc();
xrealloc         2114 file.c         	buf = xrealloc(buf, size);
xrealloc         8805 parse.y        		n->u1.node = ptr = xrealloc(ptr, size);
xrealloc         8812 parse.y            ptr = xrealloc(ptr, size);
xrealloc          168 regcomp.c          p = (UnsetAddr* )xrealloc(uslist->us, sizeof(UnsetAddr) * size);
xrealloc          636 regcomp.c          p = (OnigRepeatRange* )xrealloc(reg->repeat_range,
xrealloc          105 regexec.c              (OnigCaptureTreeNode** )xrealloc(parent->childs,
xrealloc          181 regexec.c          region->beg = (int* )xrealloc(region->beg, n * sizeof(int));
xrealloc          182 regexec.c          region->end = (int* )xrealloc(region->end, n * sizeof(int));
xrealloc          271 regexec.c          to->beg = (int* )xrealloc(to->beg, RREGC_SIZE);
xrealloc          272 regexec.c          to->end = (int* )xrealloc(to->end, RREGC_SIZE);
xrealloc          446 regexec.c          x = (StackType* )xrealloc(stk_base, sizeof(StackType) * n);
xrealloc          434 regint.h         (buf)->p = (UChar* )xrealloc((buf)->p, (buf)->alloc);\
xrealloc          440 regint.h         (buf)->p = (UChar* )xrealloc((buf)->p, (buf)->alloc);\
xrealloc          448 regint.h           (buf)->p = (UChar* )xrealloc((buf)->p, new_alloc);\
xrealloc          268 regparse.c         r = (UChar* )xrealloc(dest, capa + 1);
xrealloc          757 regparse.c           t->e = (NameEntry* )xrealloc(t->e, sizeof(NameEntry) * alloc);
xrealloc          800 regparse.c     	e->back_refs = (int* )xrealloc(e->back_refs, sizeof(int) * alloc);
xrealloc          931 regparse.c     	p = (Node** )xrealloc(env->mem_nodes_dynamic, sizeof(Node*) * alloc);
xrealloc          636 util.c         	buf = xrealloc(buf, size);


xrealloc2

xrealloc2          55 defines.h      void *xrealloc2(void*,size_t,size_t);
xrealloc2         484 ruby.h         #define REALLOC_N(var,type,n) (var)=(type*)xrealloc2((char*)(var),(n),sizeof(type))


yamlbyte_buff_t

yamlbyte_buff_t    95 ext/syck/yamlbyte.h     yamlbyte_buff_t start;
yamlbyte_buff_t    96 ext/syck/yamlbyte.h     yamlbyte_buff_t finish;  /* open range, *finish is _not_ part */
yamlbyte_buff_t   159 ext/syck/yamlbyte.h             yamlbyte_buff_t buff = NULL;                           \


yamlbyte_char_t

yamlbyte_char_t    29 ext/syck/yamlbyte.h #define YAMLBYTE_FINISH          ((yamlbyte_char_t) 0)
yamlbyte_char_t    30 ext/syck/yamlbyte.h #define YAMLBYTE_DOCUMENT        ((yamlbyte_char_t)'D')
yamlbyte_char_t    31 ext/syck/yamlbyte.h #define YAMLBYTE_DIRECTIVE       ((yamlbyte_char_t)'V')
yamlbyte_char_t    32 ext/syck/yamlbyte.h #define YAMLBYTE_PAUSE           ((yamlbyte_char_t)'P')
yamlbyte_char_t    33 ext/syck/yamlbyte.h #define YAMLBYTE_MAPPING         ((yamlbyte_char_t)'M')
yamlbyte_char_t    34 ext/syck/yamlbyte.h #define YAMLBYTE_SEQUENCE        ((yamlbyte_char_t)'Q')
yamlbyte_char_t    35 ext/syck/yamlbyte.h #define YAMLBYTE_END_BRANCH      ((yamlbyte_char_t)'E')
yamlbyte_char_t    36 ext/syck/yamlbyte.h #define YAMLBYTE_SCALAR          ((yamlbyte_char_t)'S')
yamlbyte_char_t    37 ext/syck/yamlbyte.h #define YAMLBYTE_CONTINUE        ((yamlbyte_char_t)'C')
yamlbyte_char_t    38 ext/syck/yamlbyte.h #define YAMLBYTE_NEWLINE         ((yamlbyte_char_t)'N')
yamlbyte_char_t    39 ext/syck/yamlbyte.h #define YAMLBYTE_NULLCHAR        ((yamlbyte_char_t)'Z')
yamlbyte_char_t    40 ext/syck/yamlbyte.h #define YAMLBYTE_ANCHOR          ((yamlbyte_char_t)'A')
yamlbyte_char_t    41 ext/syck/yamlbyte.h #define YAMLBYTE_ALIAS           ((yamlbyte_char_t)'R')
yamlbyte_char_t    42 ext/syck/yamlbyte.h #define YAMLBYTE_TRANSFER        ((yamlbyte_char_t)'T')
yamlbyte_char_t    44 ext/syck/yamlbyte.h #define YAMLBYTE_COMMENT         ((yamlbyte_char_t)'c')
yamlbyte_char_t    45 ext/syck/yamlbyte.h #define YAMLBYTE_INDENT          ((yamlbyte_char_t)'i')
yamlbyte_char_t    46 ext/syck/yamlbyte.h #define YAMLBYTE_STYLE           ((yamlbyte_char_t)'s')
yamlbyte_char_t    48 ext/syck/yamlbyte.h #define YAMLBYTE_LINE_NUMBER     ((yamlbyte_char_t)'#')
yamlbyte_char_t    49 ext/syck/yamlbyte.h #define YAMLBYTE_WHOLE_SCALAR    ((yamlbyte_char_t)'<')
yamlbyte_char_t    50 ext/syck/yamlbyte.h #define YAMLBYTE_NOTICE          ((yamlbyte_char_t)'!')
yamlbyte_char_t    51 ext/syck/yamlbyte.h #define YAMLBYTE_SPAN            ((yamlbyte_char_t)')')
yamlbyte_char_t    52 ext/syck/yamlbyte.h #define YAMLBYTE_ALLOC           ((yamlbyte_char_t)'@')
yamlbyte_char_t    55 ext/syck/yamlbyte.h #define YAMLBYTE_FLOW            ((yamlbyte_char_t)'>')
yamlbyte_char_t    56 ext/syck/yamlbyte.h #define YAMLBYTE_LITERAL         ((yamlbyte_char_t)'|')
yamlbyte_char_t    57 ext/syck/yamlbyte.h #define YAMLBYTE_BLOCK           ((yamlbyte_char_t)'b')
yamlbyte_char_t    58 ext/syck/yamlbyte.h #define YAMLBYTE_PLAIN           ((yamlbyte_char_t)'p')
yamlbyte_char_t    59 ext/syck/yamlbyte.h #define YAMLBYTE_INLINE_MAPPING  ((yamlbyte_char_t)'{')
yamlbyte_char_t    60 ext/syck/yamlbyte.h #define YAMLBYTE_INLINE_SEQUENCE ((yamlbyte_char_t)'[')
yamlbyte_char_t    61 ext/syck/yamlbyte.h #define YAMLBYTE_SINGLE_QUOTED   ((yamlbyte_char_t)39)
yamlbyte_char_t    62 ext/syck/yamlbyte.h #define YAMLBYTE_DOUBLE_QUOTED   ((yamlbyte_char_t)'"')
yamlbyte_char_t    87 ext/syck/yamlbyte.h typedef const yamlbyte_char_t *yamlbyte_buff_t;
yamlbyte_char_t    94 ext/syck/yamlbyte.h     yamlbyte_char_t bytecode;


yamlbyte_result_t

yamlbyte_result_t  103 ext/syck/yamlbyte.h   yamlbyte_result_t
yamlbyte_result_t  116 ext/syck/yamlbyte.h    yamlbyte_result_t
yamlbyte_result_t  130 ext/syck/yamlbyte.h   yamlbyte_result_t
yamlbyte_result_t  143 ext/syck/yamlbyte.h    yamlbyte_result_t
yamlbyte_result_t  155 ext/syck/yamlbyte.h         yamlbyte_result_t _result = YAMLBYTE_OK;                         \


yield_once

yield_once       3360 win32/win32.c  #define yield_until(condition) do yield_once(); while (!(condition))
yield_once       3524 win32/win32.c      yield_once();
yield_once       3557 win32/win32.c      yield_once();
yield_once       3565 win32/win32.c      yield_once();
yield_once       3682 win32/win32.c  		    yield_once();


yield_under

yield_under      6377 eval.c         	return yield_under(klass, self, Qundef);
yield_under      6473 eval.c             return yield_under(klass, self, rb_values_new2(argc, argv));
yield_under      6529 eval.c             return yield_under(mod, mod, rb_values_new2(argc, argv));


yield_until

yield_until      3453 win32/win32.c      yield_until(0);
yield_until      3531 win32/win32.c  	    yield_until(harg.finished);
yield_until      3676 win32/win32.c  	    yield_until(arg.stackaddr);


yychar

yychar            605 ext/syck/gram.c #define yyclearin	(yychar = YYEMPTY)
yychar            624 ext/syck/gram.c   if (yychar == YYEMPTY && yylen == 1)				\
yychar            626 ext/syck/gram.c       yychar = (Token);						\
yychar            628 ext/syck/gram.c       yytoken = YYTRANSLATE (yychar);				\
yychar            946 ext/syck/gram.c int yychar;
yychar           1000 ext/syck/gram.c   yychar = YYEMPTY;		/* Cause a token to be read.  */
yychar           1112 ext/syck/gram.c   if (yychar == YYEMPTY)
yychar           1115 ext/syck/gram.c       yychar = YYLEX;
yychar           1118 ext/syck/gram.c   if (yychar <= YYEOF)
yychar           1120 ext/syck/gram.c       yychar = yytoken = YYEOF;
yychar           1125 ext/syck/gram.c       yytoken = YYTRANSLATE (yychar);
yychar           1150 ext/syck/gram.c   if (yychar != YYEOF)
yychar           1151 ext/syck/gram.c     yychar = YYEMPTY;
yychar           1690 ext/syck/gram.c 	  int yytype = YYTRANSLATE (yychar);
yychar           1753 ext/syck/gram.c       if (yychar <= YYEOF)
yychar           1757 ext/syck/gram.c 	  if (yychar == YYEOF)
yychar           1771 ext/syck/gram.c 	  yychar = YYEMPTY;


yycompile

yycompile        4659 parse.y            return yycompile(vparser, f, line);
yycompile        4698 parse.y            return yycompile(vparser, f, start);


yydebug

yydebug           671 ext/syck/gram.c   if (yydebug)					\
yydebug           677 ext/syck/gram.c   if (yydebug)					\
yydebug           683 ext/syck/gram.c   if (yydebug)							\
yydebug           715 ext/syck/gram.c   if (yydebug)							\
yydebug           745 ext/syck/gram.c   if (yydebug)				\
yydebug           751 ext/syck/gram.c int yydebug;


yydestruct

yydestruct       1764 ext/syck/gram.c 		 yydestruct (yystos[*yyssp], yyvsp);
yydestruct       1770 ext/syck/gram.c 	  yydestruct (yytoken, &yylval);
yydestruct       1824 ext/syck/gram.c       yydestruct (yystos[yystate], yyvsp);


yyerrok

yyerrok          3972 parse.y        			yyerrok;
yyerrok          4386 parse.y        term		: ';' {yyerrok;}
yyerrok          4391 parse.y        		| terms ';' {yyerrok;}


yyerror

yyerror           634 ext/syck/gram.c       yyerror ("syntax error: cannot back up");\
yyerror          1735 ext/syck/gram.c 	      yyerror (yymsg);
yyerror          1739 ext/syck/gram.c 	    yyerror ("syntax error; also virtual memory exhausted");
yyerror          1743 ext/syck/gram.c 	yyerror ("syntax error");
yyerror          1861 ext/syck/gram.c   yyerror ("parser stack overflow");
yyerror           758 parse.y        			yyerror("can't make alias for the number variables");
yyerror           843 parse.y        			    yyerror("BEGIN in method");
yyerror          1396 parse.y        			    yyerror("dynamic constant assignment");
yyerror          1408 parse.y        			    yyerror("dynamic constant assignment");
yyerror          1470 parse.y        			    yyerror("dynamic constant assignment");
yyerror          1483 parse.y        			    yyerror("dynamic constant assignment");
yyerror          1506 parse.y        			yyerror("class/module name must be CONSTANT");
yyerror          1758 parse.y        			yyerror("constant re-assignment");
yyerror          1769 parse.y        			yyerror("constant re-assignment");
yyerror          2745 parse.y        			    yyerror("class definition in method body");
yyerror          2811 parse.y        			    yyerror("module definition in method body");
yyerror          3863 parse.y        			    yyerror("empty symbol literal");
yyerror          3875 parse.y        				    yyerror("empty symbol literal");
yyerror          4074 parse.y        			yyerror("formal argument cannot be a constant");
yyerror          4082 parse.y        			yyerror("formal argument cannot be an instance variable");
yyerror          4090 parse.y        			yyerror("formal argument cannot be a global variable");
yyerror          4098 parse.y        			yyerror("formal argument cannot be a class variable");
yyerror          4107 parse.y        			    yyerror("formal argument must be local variable");
yyerror          4137 parse.y        			    yyerror("duplicated argument arg");
yyerror          4150 parse.y        			    yyerror("formal argument must be local variable");
yyerror          4189 parse.y        			    yyerror("rest argument must be local variable");
yyerror          4222 parse.y        			    yyerror("block argument must be local variable");
yyerror          4224 parse.y        			    yyerror("duplicated block argument name");
yyerror          4264 parse.y        			    yyerror("can't define singleton method for ().");
yyerror          4276 parse.y        				yyerror("can't define singleton method for literals");
yyerror          4298 parse.y        			    yyerror("odd number list for Hash");
yyerror          4850 parse.y        		yyerror("Invalid escape character syntax");
yyerror          4865 parse.y        	    yyerror("Invalid escape character syntax");
yyerror          4879 parse.y        	    yyerror("Invalid escape character syntax");
yyerror          4894 parse.y        	yyerror("Invalid escape character syntax");
yyerror          4938 parse.y        		yyerror("Invalid escape character syntax");
yyerror          4948 parse.y        	    yyerror("Invalid escape character syntax");
yyerror          4957 parse.y        	    yyerror("Invalid escape character syntax");
yyerror          4976 parse.y        	yyerror("Invalid escape character syntax");
yyerror          6078 parse.y        	    yyerror("no .<digit> floating literal anymore; put 0 before dot");
yyerror          6117 parse.y        			yyerror("numeric literal without digits");
yyerror          6141 parse.y        			yyerror("numeric literal without digits");
yyerror          6165 parse.y        			yyerror("numeric literal without digits");
yyerror          6179 parse.y        			yyerror("numeric literal without digits");
yyerror          6208 parse.y        		    yyerror("Illegal octal digit");
yyerror          6286 parse.y        		yyerror(tmp);
yyerror          6498 parse.y        		    yyerror("unknown type of %string");
yyerror          6548 parse.y        		yyerror("unknown type of %string");
yyerror          7213 parse.y        	yyerror("Can't change the value of self");
yyerror          7216 parse.y        	yyerror("Can't assign to nil");
yyerror          7219 parse.y        	yyerror("Can't assign to true");
yyerror          7222 parse.y        	yyerror("Can't assign to false");
yyerror          7225 parse.y        	yyerror("Can't assign to __FILE__");
yyerror          7228 parse.y        	yyerror("Can't assign to __LINE__");
yyerror          7253 parse.y        	    yyerror("dynamic constant assignment");
yyerror          7404 parse.y        	    if (!cond) yyerror("void value expression");
yyerror          7613 parse.y        	yyerror("multiple assignment in conditional");
yyerror          7929 parse.y        	    yyerror("duplicated optional argument name");
yyerror          7936 parse.y        	    yyerror("duplicated rest argument name");
yyerror          7942 parse.y        	    yyerror("duplicated block argument name");


yylex

yylex             656 ext/syck/gram.c # define YYLEX yylex (&yylval, YYLEX_PARAM)
yylex             658 ext/syck/gram.c # define YYLEX yylex (&yylval)
yylex             236 parse.y        static int yylex(void*, void*);


yylval

yylval            627 ext/syck/gram.c       yylval = (Value);						\
yylval            656 ext/syck/gram.c # define YYLEX yylex (&yylval, YYLEX_PARAM)
yylval            658 ext/syck/gram.c # define YYLEX yylex (&yylval)
yylval            949 ext/syck/gram.c YYSTYPE yylval;
yylval           1126 ext/syck/gram.c       YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
yylval           1153 ext/syck/gram.c   *++yyvsp = yylval;
yylval           1769 ext/syck/gram.c 	  YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
yylval           1770 ext/syck/gram.c 	  yydestruct (yytoken, &yylval);
yylval           1835 ext/syck/gram.c   *++yyvsp = yylval;
yylval           4436 parse.y        # define set_yylval_str(x) yylval.node = NEW_STR(x)
yylval           4437 parse.y        # define set_yylval_num(x) yylval.num = x
yylval           4438 parse.y        # define set_yylval_id(x)  yylval.id = x
yylval           4439 parse.y        # define set_yylval_literal(x) yylval.node = NEW_LIT(x)
yylval           4440 parse.y        # define set_yylval_node(x) yylval.node = x
yylval           4441 parse.y        # define yylval_id() yylval.id
yylval           4448 parse.y        # define yylval_id() SYM2ID(yylval.val)
yylval           4462 parse.y            yylval.val = ripper_dispatch1(parser, ripper_token2eventid(t), str);
yylval           4474 parse.y            yylval.val = ripper_dispatch1(parser, ripper_token2eventid(t), parser->delayed);
yylval           6625 parse.y        		rb_compile_error(PARSER_ARG  "invalid global variable `%s'", rb_id2name(yylval.id));


yynerrs

yynerrs           952 ext/syck/gram.c int yynerrs;
yynerrs           999 ext/syck/gram.c   yynerrs = 0;
yynerrs          1683 ext/syck/gram.c       ++yynerrs;


yyparse

yyparse           906 ext/syck/gram.c int yyparse (void *YYPARSE_PARAM);
yyparse           908 ext/syck/gram.c int yyparse ();
yyparse           912 ext/syck/gram.c int yyparse (void);
yyparse           914 ext/syck/gram.c int yyparse ();
yyparse          4585 parse.y            n = yyparse((void*)parser);


yysigned_char

yysigned_char     323 ext/syck/gram.c static const yysigned_char yyrhs[] =
yysigned_char     441 ext/syck/gram.c static const yysigned_char yydefgoto[] =
yysigned_char     469 ext/syck/gram.c static const yysigned_char yypgoto[] =
yysigned_char     525 ext/syck/gram.c static const yysigned_char yycheck[] =


yystpcpy

yystpcpy          808 ext/syck/gram.c # ifndef yystpcpy
yystpcpy         1721 ext/syck/gram.c 	      char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
yystpcpy         1722 ext/syck/gram.c 	      yyp = yystpcpy (yyp, yytname[yytype]);
yystpcpy         1730 ext/syck/gram.c 			yyp = yystpcpy (yyp, yyprefix);
yystpcpy         1731 ext/syck/gram.c 			yyp = yystpcpy (yyp, yytname[yyx]);


yystrlen

yystrlen          785 ext/syck/gram.c # ifndef yystrlen
yystrlen         1708 ext/syck/gram.c 		yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
yystrlen         1717 ext/syck/gram.c 		     + yystrlen (yytname[yytype]));


yysymprint

yysymprint        678 ext/syck/gram.c     yysymprint Args;				\
yysymprint        686 ext/syck/gram.c       yysymprint (stderr, 					\


z_conv

z_conv            321 ext/nkf/nkf-utf8/nkf.c STATIC  void    z_conv PROTO((int c2,int c1));
z_conv           1875 ext/nkf/nkf-utf8/nkf.c 	o_zconv = oconv; oconv = z_conv;


zero

zero               46 missing/isinf.c static double inf (void) { return one() / zero(); }
zero              224 numeric.c          VALUE zero;
zero              226 numeric.c          zero = INT2FIX(0);
zero              227 numeric.c          do_coerce(&zero, &num, Qtrue);
zero              229 numeric.c          return rb_funcall(zero, '-', 1, num);
zero             2116 win32/win32.c  	struct timeval zero;
zero             2119 win32/win32.c  	zero.tv_sec = 0; zero.tv_usec = 0;         //  0ms
zero             2127 win32/win32.c  		r = do_select(nfds, rd, wr, ex, &zero); // polling


zlib_mem_alloc

zlib_mem_alloc     40 ext/zlib/zlib.c static voidpf zlib_mem_alloc _((voidpf, uInt, uInt));
zlib_mem_alloc    417 ext/zlib/zlib.c     z->stream.zalloc = zlib_mem_alloc;


zlib_mem_free

zlib_mem_free      41 ext/zlib/zlib.c static void zlib_mem_free _((voidpf, voidpf));
zlib_mem_free     418 ext/zlib/zlib.c     z->stream.zfree = zlib_mem_free;


zstream_append_buffer

zstream_append_buffer   48 ext/zlib/zlib.c static void zstream_append_buffer _((struct zstream*, const char*, int));
zstream_append_buffer  519 ext/zlib/zlib.c     zstream_append_buffer((z),RSTRING(v)->ptr,RSTRING(v)->len)
zstream_append_buffer 1967 ext/zlib/zlib.c     zstream_append_buffer(&gz->z, buf, sizeof(buf));
zstream_append_buffer 1971 ext/zlib/zlib.c 	zstream_append_buffer(&gz->z, "\0", 1);
zstream_append_buffer 1975 ext/zlib/zlib.c 	zstream_append_buffer(&gz->z, "\0", 1);
zstream_append_buffer 1989 ext/zlib/zlib.c     zstream_append_buffer(&gz->z, buf, sizeof(buf));


zstream_append_buffer2

zstream_append_buffer2  634 ext/zlib/zlib.c 	zstream_append_buffer2(z, z->input);
zstream_append_buffer2 1547 ext/zlib/zlib.c 	    zstream_append_buffer2(z, src);
zstream_append_buffer2 1581 ext/zlib/zlib.c 	    zstream_append_buffer2(z, src);
zstream_append_buffer2 1970 ext/zlib/zlib.c 	zstream_append_buffer2(&gz->z, gz->orig_name);
zstream_append_buffer2 1974 ext/zlib/zlib.c 	zstream_append_buffer2(&gz->z, gz->comment);


zstream_append_input

zstream_append_input   52 ext/zlib/zlib.c static void zstream_append_input _((struct zstream*, const char*, unsigned int));
zstream_append_input  605 ext/zlib/zlib.c     zstream_append_input((z), RSTRING(v)->ptr, RSTRING(v)->len)
zstream_append_input  719 ext/zlib/zlib.c 	zstream_append_input(z, src, len);
zstream_append_input  751 ext/zlib/zlib.c 		zstream_append_input(z, z->stream.next_in, z->stream.avail_in);
zstream_append_input  764 ext/zlib/zlib.c 	zstream_append_input(z, z->stream.next_in, z->stream.avail_in);
zstream_append_input  785 ext/zlib/zlib.c 	    zstream_append_input(z, src, len);
zstream_append_input  801 ext/zlib/zlib.c 	zstream_append_input(z, z->stream.next_in, z->stream.avail_in);


zstream_append_input2

zstream_append_input2 1876 ext/zlib/zlib.c 	zstream_append_input2(&gz->z, str);
zstream_append_input2 1898 ext/zlib/zlib.c 	zstream_append_input2(&gz->z, str);


zstream_buffer_ungetc

zstream_buffer_ungetc   51 ext/zlib/zlib.c static void zstream_buffer_ungetc _((struct zstream*, int));
zstream_buffer_ungetc 2255 ext/zlib/zlib.c     zstream_buffer_ungetc(&gz->z, c);


zstream_detach_buffer

zstream_detach_buffer   49 ext/zlib/zlib.c static VALUE zstream_detach_buffer _((struct zstream*));
zstream_detach_buffer  551 ext/zlib/zlib.c 	return zstream_detach_buffer(z);
zstream_detach_buffer  958 ext/zlib/zlib.c     dst = zstream_detach_buffer(z);
zstream_detach_buffer  991 ext/zlib/zlib.c     dst = zstream_detach_buffer(z);
zstream_detach_buffer 1191 ext/zlib/zlib.c     return zstream_detach_buffer(z);
zstream_detach_buffer 1285 ext/zlib/zlib.c     dst = zstream_detach_buffer(z);
zstream_detach_buffer 1331 ext/zlib/zlib.c     dst = zstream_detach_buffer(z);
zstream_detach_buffer 1459 ext/zlib/zlib.c     return zstream_detach_buffer(z);
zstream_detach_buffer 1543 ext/zlib/zlib.c 	    dst = zstream_detach_buffer(z);
zstream_detach_buffer 1553 ext/zlib/zlib.c 	dst = zstream_detach_buffer(z);
zstream_detach_buffer 1821 ext/zlib/zlib.c 	str = zstream_detach_buffer(&gz->z);
zstream_detach_buffer 2243 ext/zlib/zlib.c     dst = zstream_detach_buffer(&gz->z);
zstream_detach_buffer 3157 ext/zlib/zlib.c 	    str = zstream_detach_buffer(&gz->z);


zstream_detach_input

zstream_detach_input   56 ext/zlib/zlib.c static VALUE zstream_detach_input _((struct zstream*));
zstream_detach_input  975 ext/zlib/zlib.c     dst = zstream_detach_input(z);


zstream_discard_input

zstream_discard_input   53 ext/zlib/zlib.c static void zstream_discard_input _((struct zstream*, unsigned int));
zstream_discard_input  783 ext/zlib/zlib.c 	    zstream_discard_input(z,
zstream_discard_input 2037 ext/zlib/zlib.c     zstream_discard_input(&gz->z, 10);
zstream_discard_input 2047 ext/zlib/zlib.c 	zstream_discard_input(&gz->z, 2 + len);
zstream_discard_input 2054 ext/zlib/zlib.c 	zstream_discard_input(&gz->z, len + 1);
zstream_discard_input 2061 ext/zlib/zlib.c 	zstream_discard_input(&gz->z, len + 1);
zstream_discard_input 2085 ext/zlib/zlib.c     zstream_discard_input(&gz->z, 8);


zstream_end

zstream_end        58 ext/zlib/zlib.c static VALUE zstream_end _((struct zstream*));
zstream_end       824 ext/zlib/zlib.c     zstream_end(z);
zstream_end       930 ext/zlib/zlib.c     zstream_end(get_zstream(obj));
zstream_end      1237 ext/zlib/zlib.c     dst = rb_ensure(deflate_run, (VALUE)args, zstream_end, (VALUE)&z);
zstream_end      1497 ext/zlib/zlib.c     dst = rb_ensure(inflate_run, (VALUE)args, zstream_end, (VALUE)&z);
zstream_end      2296 ext/zlib/zlib.c 	zstream_end(&gz->z);
zstream_end      2300 ext/zlib/zlib.c     zstream_end(&gz->z);
zstream_end      2316 ext/zlib/zlib.c     zstream_end(&gz->z);


zstream_expand_buffer

zstream_expand_buffer   46 ext/zlib/zlib.c static void zstream_expand_buffer _((struct zstream*));
zstream_expand_buffer  574 ext/zlib/zlib.c 	zstream_expand_buffer(z);
zstream_expand_buffer  729 ext/zlib/zlib.c 	zstream_expand_buffer(z);
zstream_expand_buffer  759 ext/zlib/zlib.c 	zstream_expand_buffer(z);
zstream_expand_buffer 1362 ext/zlib/zlib.c 	zstream_expand_buffer(z);


zstream_expand_buffer_into

zstream_expand_buffer_into   47 ext/zlib/zlib.c static void zstream_expand_buffer_into _((struct zstream*, int));
zstream_expand_buffer_into 1022 ext/zlib/zlib.c     zstream_expand_buffer_into(z, FIX2INT(size));


zstream_free

zstream_free       62 ext/zlib/zlib.c static void zstream_free _((struct zstream*));
zstream_free      837 ext/zlib/zlib.c 			   zstream_mark, zstream_free, z);


zstream_init

zstream_init       45 ext/zlib/zlib.c static void zstream_init _((struct zstream*, const struct zstream_funcs *));
zstream_init      428 ext/zlib/zlib.c #define zstream_init_deflate(z)   zstream_init((z), &deflate_funcs)
zstream_init      429 ext/zlib/zlib.c #define zstream_init_inflate(z)   zstream_init((z), &inflate_funcs)
zstream_init      838 ext/zlib/zlib.c     zstream_init(z, funcs);
zstream_init     1770 ext/zlib/zlib.c     zstream_init(&gz->z, funcs);


zstream_mark

zstream_mark       61 ext/zlib/zlib.c static void zstream_mark _((struct zstream*));
zstream_mark      837 ext/zlib/zlib.c 			   zstream_mark, zstream_free, z);
zstream_mark     1746 ext/zlib/zlib.c     zstream_mark(&gz->z);


zstream_new

zstream_new        63 ext/zlib/zlib.c static VALUE zstream_new _((VALUE, const struct zstream_funcs*));
zstream_new       842 ext/zlib/zlib.c #define zstream_deflate_new(klass)  zstream_new((klass), &deflate_funcs)
zstream_new       843 ext/zlib/zlib.c #define zstream_inflate_new(klass)  zstream_new((klass), &inflate_funcs)


zstream_passthrough_input

zstream_passthrough_input   55 ext/zlib/zlib.c static void zstream_passthrough_input _((struct zstream*));
zstream_passthrough_input 1555 ext/zlib/zlib.c 	    zstream_passthrough_input(z);
zstream_passthrough_input 1587 ext/zlib/zlib.c 	    zstream_passthrough_input(z);


zstream_reset

zstream_reset      57 ext/zlib/zlib.c static void zstream_reset _((struct zstream*));
zstream_reset     691 ext/zlib/zlib.c 	zstream_reset(z);
zstream_reset     942 ext/zlib/zlib.c     zstream_reset(get_zstream(obj));
zstream_reset    1792 ext/zlib/zlib.c     zstream_reset(&gz->z);


zstream_reset_input

zstream_reset_input   54 ext/zlib/zlib.c static void zstream_reset_input _((struct zstream*));
zstream_reset_input  672 ext/zlib/zlib.c     zstream_reset_input(z);
zstream_reset_input  694 ext/zlib/zlib.c     zstream_reset_input(z);
zstream_reset_input  749 ext/zlib/zlib.c 	    zstream_reset_input(z);
zstream_reset_input  762 ext/zlib/zlib.c     zstream_reset_input(z);
zstream_reset_input  788 ext/zlib/zlib.c 	zstream_reset_input(z);


zstream_run

zstream_run        59 ext/zlib/zlib.c static void zstream_run _((struct zstream*, Bytef*, uInt, int));
zstream_run       957 ext/zlib/zlib.c     zstream_run(z, "", 0, Z_FINISH);
zstream_run      1190 ext/zlib/zlib.c     zstream_run(z, RSTRING(src)->ptr, RSTRING(src)->len, Z_FINISH);
zstream_run      1250 ext/zlib/zlib.c 	zstream_run(z, "", 0, Z_FINISH);
zstream_run      1255 ext/zlib/zlib.c 	zstream_run(z, RSTRING(src)->ptr, RSTRING(src)->len, flush);
zstream_run      1329 ext/zlib/zlib.c 	zstream_run(z, "", 0, flush);
zstream_run      1457 ext/zlib/zlib.c     zstream_run(z, RSTRING(src)->ptr, RSTRING(src)->len, Z_SYNC_FLUSH);
zstream_run      1458 ext/zlib/zlib.c     zstream_run(z, "", 0, Z_FINISH);  /* for checking errors */
zstream_run      1509 ext/zlib/zlib.c 	zstream_run(z, "", 0, Z_FINISH);
zstream_run      1514 ext/zlib/zlib.c 	zstream_run(z, RSTRING(src)->ptr, RSTRING(src)->len, Z_SYNC_FLUSH);
zstream_run      2065 ext/zlib/zlib.c 	zstream_run(&gz->z, 0, 0, Z_SYNC_FLUSH);
zstream_run      2107 ext/zlib/zlib.c 	zstream_run(&gz->z, str, len, (gz->z.flags & GZFILE_FLAG_SYNC)
zstream_run      2128 ext/zlib/zlib.c 	    zstream_run(&gz->z, RSTRING(str)->ptr, RSTRING(str)->len,
zstream_run      2281 ext/zlib/zlib.c     zstream_run(&gz->z, "", 0, Z_FINISH);
zstream_run      2825 ext/zlib/zlib.c 	zstream_run(&gz->z, "", 0, flush);


zstream_shift_buffer

zstream_shift_buffer   50 ext/zlib/zlib.c static VALUE zstream_shift_buffer _((struct zstream*, int));
zstream_shift_buffer 2172 ext/zlib/zlib.c     dst = zstream_shift_buffer(&gz->z, len);
zstream_shift_buffer 2213 ext/zlib/zlib.c     dst = zstream_shift_buffer(&gz->z, len);
zstream_shift_buffer 3168 ext/zlib/zlib.c     str = zstream_shift_buffer(&gz->z, n - 1);


zstream_sync

zstream_sync       60 ext/zlib/zlib.c static VALUE zstream_sync _((struct zstream*, Bytef*, uInt));
zstream_sync     1610 ext/zlib/zlib.c     return zstream_sync(z, RSTRING(src)->ptr, RSTRING(src)->len);


array.c

root/array.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. rb_mem_clear
  2. memfill
  3. rb_ary_modify_check
  4. rb_ary_modify
  5. rb_ary_freeze
  6. rb_ary_frozen_p
  7. ary_alloc
  8. ary_new
  9. rb_ary_new2
  10. rb_ary_new
  11. rb_ary_new3
  12. rb_ary_new4
  13. rb_values_new
  14. rb_values_new2
  15. ary_make_shared
  16. ary_shared_array
  17. rb_values_from_ary
  18. rb_ary_from_values
  19. rb_assoc_new
  20. to_ary
  21. to_a
  22. rb_check_array_type
  23. rb_ary_initialize
  24. rb_ary_s_create
  25. rb_ary_store
  26. ary_shared_first
  27. ary_shared_last
  28. rb_ary_push
  29. rb_ary_push_m
  30. rb_ary_pop
  31. rb_ary_pop_m
  32. rb_ary_shift
  33. rb_ary_shift_m
  34. rb_ary_unshift
  35. rb_ary_unshift_m
  36. rb_ary_elt
  37. rb_ary_entry
  38. rb_ary_subseq
  39. rb_ary_aref
  40. rb_ary_at
  41. rb_ary_first
  42. rb_ary_last
  43. rb_ary_fetch
  44. rb_ary_index
  45. rb_ary_rindex
  46. rb_ary_to_ary
  47. rb_ary_splice
  48. rb_ary_aset
  49. rb_ary_insert
  50. rb_ary_each
  51. rb_ary_each_index
  52. rb_ary_reverse_each
  53. rb_ary_length
  54. rb_ary_empty_p
  55. rb_ary_dup
  56. recursive_join
  57. rb_ary_join
  58. rb_ary_join_m
  59. rb_ary_to_s
  60. inspect_ary
  61. rb_ary_inspect
  62. rb_ary_to_a
  63. rb_ary_to_ary_m
  64. rb_ary_reverse
  65. rb_ary_reverse_bang
  66. rb_ary_reverse_m
  67. ary_sort_check
  68. sort_1
  69. sort_2
  70. sort_internal
  71. sort_unlock
  72. rb_ary_sort_bang
  73. rb_ary_sort
  74. rb_ary_collect
  75. rb_ary_collect_bang
  76. rb_get_values_at
  77. rb_ary_values_at
  78. rb_ary_select
  79. rb_ary_delete
  80. rb_ary_delete_at
  81. rb_ary_delete_at_m
  82. rb_ary_slice_bang
  83. rb_ary_reject_bang
  84. rb_ary_reject
  85. rb_ary_delete_if
  86. rb_ary_zip
  87. rb_ary_transpose
  88. rb_ary_replace
  89. rb_ary_clear
  90. rb_ary_fill
  91. rb_ary_plus
  92. rb_ary_concat
  93. rb_ary_times
  94. rb_ary_assoc
  95. rb_ary_rassoc
  96. rb_ary_equal
  97. rb_ary_eql
  98. recursive_hash
  99. rb_ary_hash
  100. rb_ary_includes
  101. rb_ary_cmp
  102. ary_make_hash
  103. rb_ary_diff
  104. rb_ary_and
  105. rb_ary_or
  106. rb_ary_uniq_bang
  107. rb_ary_uniq
  108. rb_ary_compact_bang
  109. rb_ary_compact
  110. rb_ary_nitems
  111. flatten
  112. rb_ary_flatten_bang
  113. rb_ary_flatten
  114. Init_Array
/**********************************************************************

  array.c -

  $Author: akr $
  $Date: 2005/12/12 16:46:59 $
  created at: Fri Aug  6 09:46:12 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto
  Copyright (C) 2000  Network Applied Communication Laboratory, Inc.
  Copyright (C) 2000  Information-technology Promotion Agency, Japan

**********************************************************************/

#include "ruby.h"
#include "util.h"
#include "st.h"
#include "node.h"

VALUE rb_cArray, rb_cValues;

static ID id_cmp;

#define ARY_DEFAULT_SIZE 16

void
rb_mem_clear(register VALUE *mem, register long size)
{
    while (size--) {
        *mem++ = Qnil;
    }
}

static inline void
memfill(register VALUE *mem, register long size, register VALUE val)
{
    while (size--) {
        *mem++ = val;
    }
}

#define ARY_TMPLOCK  FL_USER1

static inline void
rb_ary_modify_check(VALUE ary)
{
    if (OBJ_FROZEN(ary)) rb_error_frozen("array");
    if (FL_TEST(ary, ARY_TMPLOCK))
        rb_raise(rb_eRuntimeError, "can't modify array during iteration");
    if (!OBJ_TAINTED(ary) && rb_safe_level() >= 4)
        rb_raise(rb_eSecurityError, "Insecure: can't modify array");
}

static void
rb_ary_modify(VALUE ary)
{
    VALUE *ptr;

    rb_ary_modify_check(ary);
    if (FL_TEST(ary, ELTS_SHARED)) {
        ptr = ALLOC_N(VALUE, RARRAY(ary)->len);
        FL_UNSET(ary, ELTS_SHARED);
        RARRAY(ary)->aux.capa = RARRAY(ary)->len;
        MEMCPY(ptr, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
        RARRAY(ary)->ptr = ptr;
    }
}

VALUE
rb_ary_freeze(VALUE ary)
{
    return rb_obj_freeze(ary);
}

/*
 *  call-seq:
 *     array.frozen?  -> true or false
 *
 *  Return <code>true</code> if this array is frozen (or temporarily frozen
 *  while being sorted).
 */

static VALUE
rb_ary_frozen_p(VALUE ary)
{
    if (OBJ_FROZEN(ary)) return Qtrue;
    if (FL_TEST(ary, ARY_TMPLOCK)) return Qtrue;
    return Qfalse;
}

static VALUE
ary_alloc(VALUE klass)
{
    NEWOBJ(ary, struct RArray);
    OBJSETUP(ary, klass, T_ARRAY);

    ary->len = 0;
    ary->ptr = 0;
    ary->aux.capa = 0;

    return (VALUE)ary;
}

static VALUE
ary_new(VALUE klass, long len)
{
    VALUE ary;

    if (len < 0) {
        rb_raise(rb_eArgError, "negative array size (or size too big)");
    }
    if (len > 0 && len * sizeof(VALUE) <= len) {
        rb_raise(rb_eArgError, "array size too big");
    }
    if (len == 0) len++;

    ary = ary_alloc(klass);
    RARRAY(ary)->ptr = ALLOC_N(VALUE, len);
    RARRAY(ary)->aux.capa = len;

    return ary;
}

VALUE
rb_ary_new2(long len)
{
    return ary_new(rb_cArray, len);
}

VALUE
rb_ary_new(void)
{
    return rb_ary_new2(ARY_DEFAULT_SIZE);
}

#include <stdarg.h>

VALUE
rb_ary_new3(long n, ...)
{
    va_list ar;
    VALUE ary;
    long i;

    ary = rb_ary_new2(n);

    va_start(ar, n);
    for (i=0; i<n; i++) {
        RARRAY(ary)->ptr[i] = va_arg(ar, VALUE);
    }
    va_end(ar);

    RARRAY(ary)->len = n;
    return ary;
}

VALUE
rb_ary_new4(long n, const VALUE *elts)
{
    VALUE ary;

    ary = rb_ary_new2(n);
    if (n > 0 && elts) {
        MEMCPY(RARRAY(ary)->ptr, elts, VALUE, n);
    }
    RARRAY(ary)->len = n;

    return ary;
}

VALUE
rb_values_new(long n, ...)
{
    va_list ar;
    VALUE val;
    long i;

    val = ary_new(rb_cValues, n);
    va_start(ar, n);
    for (i=0; i<n; i++) {
        RARRAY(val)->ptr[i] = va_arg(ar, VALUE);
    }
    va_end(ar);
    RARRAY(val)->len = n;

    return val;
}

VALUE
rb_values_new2(long n, const VALUE *elts)
{
    VALUE val;

    val = ary_new(rb_cValues, n);
    if (n > 0 && elts) {
        RARRAY(val)->len = n;
        MEMCPY(RARRAY(val)->ptr, elts, VALUE, n);
    }

    return val;
}

static VALUE
ary_make_shared(VALUE ary)
{
    if (!FL_TEST(ary, ELTS_SHARED)) {
        NEWOBJ(shared, struct RArray);
        OBJSETUP(shared, rb_cArray, T_ARRAY);

        shared->len = RARRAY(ary)->len;
        shared->ptr = RARRAY(ary)->ptr;
        shared->aux.capa = RARRAY(ary)->aux.capa;
        RARRAY(ary)->aux.shared = (VALUE)shared;
        FL_SET(ary, ELTS_SHARED);
        OBJ_FREEZE(shared);
        return (VALUE)shared;
    }
    else {
        return RARRAY(ary)->aux.shared;
    }
}

static VALUE
ary_shared_array(VALUE klass, VALUE ary)
{
    VALUE val = ary_alloc(klass);

    ary_make_shared(ary);
    RARRAY(val)->ptr = RARRAY(ary)->ptr;
    RARRAY(val)->len = RARRAY(ary)->len;
    RARRAY(val)->aux.shared = RARRAY(ary)->aux.shared;
    FL_SET(val, ELTS_SHARED);
    return val;
}

VALUE
rb_values_from_ary(VALUE ary)
{
    return ary_shared_array(rb_cValues, ary);
}

VALUE
rb_ary_from_values(VALUE val)
{
    return ary_shared_array(rb_cArray, val);
}

VALUE
rb_assoc_new(VALUE car, VALUE cdr)
{
    return rb_values_new(2, car, cdr);
}

static VALUE
to_ary(VALUE ary)
{
    return rb_convert_type(ary, T_ARRAY, "Array", "to_ary");
}

static VALUE
to_a(VALUE ary)
{
    return rb_convert_type(ary, T_ARRAY, "Array", "to_a");
}

VALUE
rb_check_array_type(VALUE ary)
{
    return rb_check_convert_type(ary, T_ARRAY, "Array", "to_ary");
}

static VALUE rb_ary_replace(VALUE, VALUE);

/*
 *  call-seq:
 *     Array.new(size=0, obj=nil)
 *     Array.new(array)
 *     Array.new(size) {|index| block }
 *
 *  Returns a new array. In the first form, the new array is
 *  empty. In the second it is created with _size_ copies of _obj_
 *  (that is, _size_ references to the same
 *  _obj_). The third form creates a copy of the array
 *  passed as a parameter (the array is generated by calling
 *  to_ary  on the parameter). In the last form, an array
 *  of the given size is created. Each element in this array is
 *  calculated by passing the element's index to the given block and
 *  storing the return value.
 *
 *     Array.new
 *     Array.new(2)
 *     Array.new(5, "A")
 *
 *     # only one copy of the object is created
 *     a = Array.new(2, Hash.new)
 *     a[0]['cat'] = 'feline'
 *     a
 *     a[1]['cat'] = 'Felix'
 *     a
 *
 *     # here multiple copies are created
 *     a = Array.new(2) { Hash.new }
 *     a[0]['cat'] = 'feline'
 *     a
 *
 *     squares = Array.new(5) {|i| i*i}
 *     squares
 *
 *     copy = Array.new(squares)
 */

static VALUE
rb_ary_initialize(int argc, VALUE *argv, VALUE ary)
{
    long len;
    VALUE size, val;

    if (rb_scan_args(argc, argv, "02", &size, &val) == 0) {
        RARRAY(ary)->len = 0;
        if (rb_block_given_p()) {
            rb_warning("given block not used");
        }
        return ary;
    }

    if (argc == 1 && !FIXNUM_P(size)) {
        val = rb_check_array_type(size);
        if (!NIL_P(val)) {
            rb_ary_replace(ary, val);
            return ary;
        }
    }

    len = NUM2LONG(size);
    if (len < 0) {
        rb_raise(rb_eArgError, "negative array size");
    }
    if (len > 0 && len * (long)sizeof(VALUE) <= len) {
        rb_raise(rb_eArgError, "array size too big");
    }
    rb_ary_modify(ary);
    if (len > RARRAY(ary)->aux.capa) {
        REALLOC_N(RARRAY(ary)->ptr, VALUE, len);
        RARRAY(ary)->aux.capa = len;
    }
    if (rb_block_given_p()) {
        long i;

        if (argc == 2) {
            rb_warn("block supersedes default value argument");
        }
        for (i=0; i<len; i++) {
            rb_ary_store(ary, i, rb_yield(LONG2NUM(i)));
            RARRAY(ary)->len = i + 1;
        }
    }
    else {
        memfill(RARRAY(ary)->ptr, len, val);
        RARRAY(ary)->len = len;
    }

    return ary;
}

/*
* Returns a new array populated with the given objects.
*
*   Array.[]( 1, 'a', /^A/ )
*   Array[ 1, 'a', /^A/ ]
*   [ 1, 'a', /^A/ ]
*/

static VALUE
rb_ary_s_create(int argc, VALUE *argv, VALUE klass)
{
    VALUE ary = ary_alloc(klass);

    if (argc > 0) {
        RARRAY(ary)->ptr = ALLOC_N(VALUE, argc);
        MEMCPY(RARRAY(ary)->ptr, argv, VALUE, argc);
    }
    RARRAY(ary)->len = RARRAY(ary)->aux.capa = argc;

    return ary;
}

void
rb_ary_store(VALUE ary, long idx, VALUE val)
{
    if (idx < 0) {
        idx += RARRAY(ary)->len;
        if (idx < 0) {
            rb_raise(rb_eIndexError, "index %ld out of array",
                    idx - RARRAY(ary)->len);
        }
    }

    rb_ary_modify(ary);
    if (idx >= RARRAY(ary)->aux.capa) {
        long new_capa = RARRAY(ary)->aux.capa / 2;

        if (new_capa < ARY_DEFAULT_SIZE) {
            new_capa = ARY_DEFAULT_SIZE;
        }
        new_capa += idx;
        if (new_capa * (long)sizeof(VALUE) <= new_capa) {
            rb_raise(rb_eArgError, "index too big");
        }
        REALLOC_N(RARRAY(ary)->ptr, VALUE, new_capa);
        RARRAY(ary)->aux.capa = new_capa;
    }
    if (idx > RARRAY(ary)->len) {
        rb_mem_clear(RARRAY(ary)->ptr + RARRAY(ary)->len,
                     idx-RARRAY(ary)->len + 1);
    }

    if (idx >= RARRAY(ary)->len) {
        RARRAY(ary)->len = idx + 1;
    }
    RARRAY(ary)->ptr[idx] = val;
}

static VALUE
ary_shared_first(int argc, VALUE *argv, VALUE ary)
{
    VALUE nv, result;
    long n;

    rb_scan_args(argc, argv, "1", &nv);
    n = NUM2LONG(nv);
    if (n > RARRAY(ary)->len) {
        n = RARRAY(ary)->len;
    }
    else if (n < 0) {
        rb_raise(rb_eArgError, "negative array size");
    }
    result = ary_shared_array(rb_cArray, ary);
    RARRAY(result)->len = n;
    return result;
}

static VALUE
ary_shared_last(int argc, VALUE *argv, VALUE ary)
{
    VALUE result = ary_shared_first(argc, argv, ary);

    RARRAY(result)->ptr += RARRAY(ary)->len - RARRAY(result)->len;
    return result;
}

/*
 *  call-seq:
 *     array << obj            -> array
 *
 *  Append---Pushes the given object on to the end of this array. This
 *  expression returns the array itself, so several appends
 *  may be chained together.
 *
 *     [ 1, 2 ] << "c" << "d" << [ 3, 4 ]
 *             #=>  [ 1, 2, "c", "d", [ 3, 4 ] ]
 *
 */

VALUE
rb_ary_push(VALUE ary, VALUE item)
{
    rb_ary_store(ary, RARRAY(ary)->len, item);
    return ary;
}

/*
 *  call-seq:
 *     array.push(obj, ... )   -> array
 *
 *  Append---Pushes the given object(s) on to the end of this array. This
 *  expression returns the array itself, so several appends
 *  may be chained together.
 *
 *     a = [ "a", "b", "c" ]
 *     a.push("d", "e", "f")
 *             #=> ["a", "b", "c", "d", "e", "f"]
 */

static VALUE
rb_ary_push_m(int argc, VALUE *argv, VALUE ary)
{
    while (argc--) {
        rb_ary_push(ary, *argv++);
    }
    return ary;
}

VALUE
rb_ary_pop(VALUE ary)
{
    rb_ary_modify_check(ary);
    if (RARRAY(ary)->len == 0) return Qnil;
    if (!FL_TEST(ary, ELTS_SHARED) &&
            RARRAY(ary)->len * 2 < RARRAY(ary)->aux.capa &&
            RARRAY(ary)->aux.capa > ARY_DEFAULT_SIZE) {
        RARRAY(ary)->aux.capa = RARRAY(ary)->len * 2;
        REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->aux.capa);
    }
    return RARRAY(ary)->ptr[--RARRAY(ary)->len];
}

/*
 *  call-seq:
 *     array.pop  -> obj or nil
 *
 *  Removes the last element from <i>self</i> and returns it, or
 *  <code>nil</code> if the array is empty.
 *
 *     a = [ "a", "b", "c", "d" ]
 *     a.pop     #=> "d"
 *     a.pop(2)  #=> ["b", "c"]
 *     a         #=> ["a"]
 */

static VALUE
rb_ary_pop_m(int argc, VALUE *argv, VALUE ary)
{
    VALUE result;

    if (argc == 0) {
        return rb_ary_pop(ary);
    }

    rb_ary_modify_check(ary);

    result = ary_shared_last(argc, argv, ary);
    RARRAY(ary)->len -= RARRAY(result)->len;
    return result;
}

VALUE
rb_ary_shift(VALUE ary)
{
    VALUE top;

    rb_ary_modify_check(ary);
    if (RARRAY(ary)->len == 0) return Qnil;
    top = RARRAY(ary)->ptr[0];
    ary_make_shared(ary);
    RARRAY(ary)->ptr++;         /* shift ptr */
    RARRAY(ary)->len--;

    return top;
}

/*
 *  call-seq:
 *     array.shift   ->   obj or nil
 *
 *  Returns the first element of <i>self</i> and removes it (shifting all
 *  other elements down by one). Returns <code>nil</code> if the array
 *  is empty.
 *
 *     args = [ "-m", "-q", "filename" ]
 *     args.shift     #=> "-m"
 *     args           #=> ["-q", "filename"]
 *
 *     args = [ "-m", "-q", "filename" ]
 *     args.shift(2)  #=> ["-m", "-q"]
 *     args           #=> ["filename"]
 */

static VALUE
rb_ary_shift_m(int argc, VALUE *argv, VALUE ary)
{
    VALUE result;
    long n;

    if (argc == 0) {
        return rb_ary_shift(ary);
    }

    rb_ary_modify_check(ary);

    result = ary_shared_first(argc, argv, ary);
    n = RARRAY(result)->len;
    RARRAY(ary)->ptr += n;
    RARRAY(ary)->len -= n;

    return result;
}

VALUE
rb_ary_unshift(VALUE ary, VALUE item)
{
    rb_ary_modify(ary);
    if (RARRAY(ary)->len == RARRAY(ary)->aux.capa) {
        long capa_inc = RARRAY(ary)->aux.capa / 2;
        if (capa_inc < ARY_DEFAULT_SIZE) {
            capa_inc = ARY_DEFAULT_SIZE;
        }
        RARRAY(ary)->aux.capa += capa_inc;
        REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->aux.capa);
    }

    /* sliding items */
    MEMMOVE(RARRAY(ary)->ptr + 1, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);

    RARRAY(ary)->len++;
    RARRAY(ary)->ptr[0] = item;

    return ary;
}

/*
 *  call-seq:
 *     array.unshift(obj, ...)  -> array
 *
 *  Prepends objects to the front of <i>array</i>.
 *  other elements up one.
 *
 *     a = [ "b", "c", "d" ]
 *     a.unshift("a")   #=> ["a", "b", "c", "d"]
 *     a.unshift(1, 2)  #=> [ 1, 2, "a", "b", "c", "d"]
 */

static VALUE
rb_ary_unshift_m(int argc, VALUE *argv, VALUE ary)
{
    long len = RARRAY(ary)->len;

    if (argc == 0) return ary;

    /* make rooms by setting the last item */
    rb_ary_store(ary, len + argc - 1, Qnil);

    /* sliding items */
    MEMMOVE(RARRAY(ary)->ptr + argc, RARRAY(ary)->ptr, VALUE, len);
    MEMCPY(RARRAY(ary)->ptr, argv, VALUE, argc);

    return ary;
}

/* faster version - use this if you don't need to treat negative offset */
static inline VALUE
rb_ary_elt(VALUE ary, long offset)
{
    if (RARRAY(ary)->len == 0) return Qnil;
    if (offset < 0 || RARRAY(ary)->len <= offset) {
        return Qnil;
    }
    return RARRAY(ary)->ptr[offset];
}

VALUE
rb_ary_entry(VALUE ary, long offset)
{
    if (offset < 0) {
        offset += RARRAY(ary)->len;
    }
    return rb_ary_elt(ary, offset);
}

static VALUE
rb_ary_subseq(VALUE ary, long beg, long len)
{
    VALUE klass, ary2, shared;
    VALUE *ptr;

    if (beg > RARRAY(ary)->len) return Qnil;
    if (beg < 0 || len < 0) return Qnil;

    if (beg + len > RARRAY(ary)->len) {
        len = RARRAY(ary)->len - beg;
        if (len < 0)
            len = 0;
    }
    klass = rb_obj_class(ary);
    if (len == 0) return ary_new(klass, 0);

    shared = ary_make_shared(ary);
    ptr = RARRAY(ary)->ptr;
    ary2 = ary_alloc(klass);
    RARRAY(ary2)->ptr = ptr + beg;
    RARRAY(ary2)->len = len;
    RARRAY(ary2)->aux.shared = shared;
    FL_SET(ary2, ELTS_SHARED);

    return ary2;
}

/*
 *  call-seq:
 *     array[index]                -> obj      or nil
 *     array[start, length]        -> an_array or nil
 *     array[range]                -> an_array or nil
 *     array.slice(index)          -> obj      or nil
 *     array.slice(start, length)  -> an_array or nil
 *     array.slice(range)          -> an_array or nil
 *
 *  Element Reference---Returns the element at _index_,
 *  or returns a subarray starting at _start_ and
 *  continuing for _length_ elements, or returns a subarray
 *  specified by _range_.
 *  Negative indices count backward from the end of the
 *  array (-1 is the last element). Returns nil if the index
 *  (or starting index) are out of range.
 *
 *     a = [ "a", "b", "c", "d", "e" ]
 *     a[2] +  a[0] + a[1]    #=> "cab"
 *     a[6]                   #=> nil
 *     a[1, 2]                #=> [ "b", "c" ]
 *     a[1..3]                #=> [ "b", "c", "d" ]
 *     a[4..7]                #=> [ "e" ]
 *     a[6..10]               #=> nil
 *     a[-3, 3]               #=> [ "c", "d", "e" ]
 *     # special cases
 *     a[5]                   #=> nil
 *     a[5, 1]                #=> []
 *     a[5..10]               #=> []
 *
 */

VALUE
rb_ary_aref(int argc, VALUE *argv, VALUE ary)
{
    VALUE arg;
    long beg, len;

    if (argc == 2) {
        beg = NUM2LONG(argv[0]);
        len = NUM2LONG(argv[1]);
        if (beg < 0) {
            beg += RARRAY(ary)->len;
        }
        return rb_ary_subseq(ary, beg, len);
    }
    if (argc != 1) {
        rb_scan_args(argc, argv, "11", 0, 0);
    }
    arg = argv[0];
    /* special case - speeding up */
    if (FIXNUM_P(arg)) {
        return rb_ary_entry(ary, FIX2LONG(arg));
    }
    /* check if idx is Range */
    switch (rb_range_beg_len(arg, &beg, &len, RARRAY(ary)->len, 0)) {
      case Qfalse:
        break;
      case Qnil:
        return Qnil;
      default:
        return rb_ary_subseq(ary, beg, len);
    }
    return rb_ary_entry(ary, NUM2LONG(arg));
}

/*
 *  call-seq:
 *     array.at(index)   ->   obj  or nil
 *
 *  Returns the element at _index_. A
 *  negative index counts from the end of _self_.  Returns +nil+
 *  if the index is out of range. See also <code>Array#[]</code>.
 *  (<code>Array#at</code> is slightly faster than <code>Array#[]</code>,
 *  as it does not accept ranges and so on.)
 *
 *     a = [ "a", "b", "c", "d", "e" ]
 *     a.at(0)     #=> "a"
 *     a.at(-1)    #=> "e"
 */

static VALUE
rb_ary_at(VALUE ary, VALUE pos)
{
    return rb_ary_entry(ary, NUM2LONG(pos));
}

/*
 *  call-seq:
 *     array.first     ->   obj or nil
 *     array.first(n)  -> an_array
 *
 *  Returns the first element, or the first +n+ elements, of the array.
 *  If the array is empty, the first form returns <code>nil</code>, and the
 *  second form returns an empty array.
 *
 *     a = [ "q", "r", "s", "t" ]
 *     a.first     #=> "q"
 *     a.first(2)  #=> ["q", "r"]
 */

static VALUE
rb_ary_first(int argc, VALUE *argv, VALUE ary)
{
    if (argc == 0) {
        if (RARRAY(ary)->len == 0) return Qnil;
        return RARRAY(ary)->ptr[0];
    }
    else {
        return ary_shared_first(argc, argv, ary);
    }
}

/*
 *  call-seq:
 *     array.last     ->  obj or nil
 *     array.last(n)  ->  an_array
 *
 *  Returns the last element(s) of <i>self</i>. If the array is empty,
 *  the first form returns <code>nil</code>.
 *
 *     a = [ "w", "x", "y", "z" ]
 *     a.last     #=> "z"
 *     a.last(2)  #=> ["y", "z"]
 */

static VALUE
rb_ary_last(int argc, VALUE *argv, VALUE ary)
{
    if (argc == 0) {
        if (RARRAY(ary)->len == 0) return Qnil;
        return RARRAY(ary)->ptr[RARRAY(ary)->len-1];
    }
    else {
        return ary_shared_last(argc, argv, ary);
    }
}

/*
 *  call-seq:
 *     array.fetch(index)                    -> obj
 *     array.fetch(index, default )          -> obj
 *     array.fetch(index) {|index| block }   -> obj
 *
 *  Tries to return the element at position <i>index</i>. If the index
 *  lies outside the array, the first form throws an
 *  <code>IndexError</code> exception, the second form returns
 *  <i>default</i>, and the third form returns the value of invoking
 *  the block, passing in the index. Negative values of <i>index</i>
 *  count from the end of the array.
 *
 *     a = [ 11, 22, 33, 44 ]
 *     a.fetch(1)               #=> 22
 *     a.fetch(-1)              #=> 44
 *     a.fetch(4, 'cat')        #=> "cat"
 *     a.fetch(4) { |i| i*i }   #=> 16
 */

static VALUE
rb_ary_fetch(int argc, VALUE *argv, VALUE ary)
{
    VALUE pos, ifnone;
    long block_given;
    long idx;

    rb_scan_args(argc, argv, "11", &pos, &ifnone);
    block_given = rb_block_given_p();
    if (block_given && argc == 2) {
        rb_warn("block supersedes default value argument");
    }
    idx = NUM2LONG(pos);

    if (idx < 0) {
        idx +=  RARRAY(ary)->len;
    }
    if (idx < 0 || RARRAY(ary)->len <= idx) {
        if (block_given) return rb_yield(pos);
        if (argc == 1) {
            rb_raise(rb_eIndexError, "index %ld out of array", idx);
        }
        return ifnone;
    }
    return RARRAY(ary)->ptr[idx];
}

/*
 *  call-seq:
 *     array.index(obj)           ->  int or nil
 *     array.index {|item| block} ->  int or nil
 *
 *  Returns the index of the first object in <i>self</i> such that is
 *  <code>==</code> to <i>obj</i>. If a block is given instead of an
 *  argument, returns first object for which <em>block</em> is true.
 *  Returns <code>nil</code> if no match is found.
 *
 *     a = [ "a", "b", "c" ]
 *     a.index("b")        #=> 1
 *     a.index("z")        #=> nil
 *     a.index{|x|x=="b"}  #=> 1
 */

static VALUE
rb_ary_index(int argc, VALUE *argv, VALUE ary)
{
    VALUE val;
    long i;

    if (rb_scan_args(argc, argv, "01", &val) == 0) {
        RETURN_ENUMERATOR(ary, 0, 0);
        for (i=0; i<RARRAY(ary)->len; i++) {
            if (RTEST(rb_yield(RARRAY(ary)->ptr[i]))) {
                return LONG2NUM(i);
            }
        }
    }
    else {
        for (i=0; i<RARRAY(ary)->len; i++) {
            if (rb_equal(RARRAY(ary)->ptr[i], val))
                return LONG2NUM(i);
        }
    }
    return Qnil;
}

/*
 *  call-seq:
 *     array.rindex(obj)    ->  int or nil
 *
 *  Returns the index of the last object in <i>array</i>
 *  <code>==</code> to <i>obj</i>. If a block is given instead of an
 *  argument, returns first object for which <em>block</em> is
 *  true. Returns <code>nil</code> if no match is found.
 *
 *     a = [ "a", "b", "b", "b", "c" ]
 *     a.rindex("b")        #=> 3
 *     a.rindex("z")        #=> nil
 *     a.rindex{|x|x=="b"}  #=> 3
 */

static VALUE
rb_ary_rindex(int argc, VALUE *argv, VALUE ary)
{
    VALUE val;
    long i = RARRAY(ary)->len;

    if (rb_scan_args(argc, argv, "01", &val) == 0) {
        while (i--) {
            RETURN_ENUMERATOR(ary, 0, 0);
            if (RTEST(rb_yield(RARRAY(ary)->ptr[i])))
                return LONG2NUM(i);
            if (i > RARRAY(ary)->len) {
                i = RARRAY(ary)->len;
            }
        }
    }
    else {
        while (i--) {
            if (rb_equal(RARRAY(ary)->ptr[i], val))
                return LONG2NUM(i);
            if (i > RARRAY(ary)->len) {
                i = RARRAY(ary)->len;
            }
        }
    }
    return Qnil;
}

VALUE
rb_ary_to_ary(VALUE obj)
{
    if (TYPE(obj) == T_ARRAY) {
        return obj;
    }
    if (rb_respond_to(obj, rb_intern("to_ary"))) {
        return to_ary(obj);
    }
    return rb_ary_new3(1, obj);
}

static void
rb_ary_splice(VALUE ary, long beg, long len, VALUE rpl)
{
    long rlen;

    if (len < 0) rb_raise(rb_eIndexError, "negative length (%ld)", len);
    if (beg < 0) {
        beg += RARRAY(ary)->len;
        if (beg < 0) {
            beg -= RARRAY(ary)->len;
            rb_raise(rb_eIndexError, "index %ld out of array", beg);
        }
    }
    if (beg + len > RARRAY(ary)->len) {
        len = RARRAY(ary)->len - beg;
    }

    if (rpl == Qundef) {
        rlen = 0;
    }
    else {
        rpl = rb_ary_to_ary(rpl);
        rlen = RARRAY(rpl)->len;
    }
    rb_ary_modify(ary);

    if (beg >= RARRAY(ary)->len) {
        len = beg + rlen;
        if (len >= RARRAY(ary)->aux.capa) {
            REALLOC_N(RARRAY(ary)->ptr, VALUE, len);
            RARRAY(ary)->aux.capa = len;
        }
        rb_mem_clear(RARRAY(ary)->ptr + RARRAY(ary)->len, beg - RARRAY(ary)->len);
        if (rlen > 0) {
            MEMCPY(RARRAY(ary)->ptr + beg, RARRAY(rpl)->ptr, VALUE, rlen);
        }
        RARRAY(ary)->len = len;
    }
    else {
        long alen;

        if (beg + len > RARRAY(ary)->len) {
            len = RARRAY(ary)->len - beg;
        }

        alen = RARRAY(ary)->len + rlen - len;
        if (alen >= RARRAY(ary)->aux.capa) {
            REALLOC_N(RARRAY(ary)->ptr, VALUE, alen);
            RARRAY(ary)->aux.capa = alen;
        }

        if (len != rlen) {
            MEMMOVE(RARRAY(ary)->ptr + beg + rlen, RARRAY(ary)->ptr + beg + len,
                    VALUE, RARRAY(ary)->len - (beg + len));
            RARRAY(ary)->len = alen;
        }
        if (rlen > 0) {
            MEMMOVE(RARRAY(ary)->ptr + beg, RARRAY(rpl)->ptr, VALUE, rlen);
        }
    }
}

/*
 *  call-seq:
 *     array[index]         = obj                     ->  obj
 *     array[start, length] = obj or an_array or nil  ->  obj or an_array or nil
 *     array[range]         = obj or an_array or nil  ->  obj or an_array or nil
 *
 *  Element Assignment---Sets the element at _index_,
 *  or replaces a subarray starting at _start_ and
 *  continuing for _length_ elements, or replaces a subarray
 *  specified by _range_.  If indices are greater than
 *  the current capacity of the array, the array grows
 *  automatically. A negative indices will count backward
 *  from the end of the array. Inserts elements if _length_ is
 *  zero. An +IndexError+ is raised if a negative index points
 *  past the beginning of the array. See also
 *  <code>Array#push</code>, and <code>Array#unshift</code>.
 *
 *     a = Array.new
 *     a[4] = "4";                 #=> [nil, nil, nil, nil, "4"]
 *     a[0, 3] = [ 'a', 'b', 'c' ] #=> ["a", "b", "c", nil, "4"]
 *     a[1..2] = [ 1, 2 ]          #=> ["a", 1, 2, nil, "4"]
 *     a[0, 2] = "?"               #=> ["?", 2, nil, "4"]
 *     a[0..2] = "A"               #=> ["A", "4"]
 *     a[-1]   = "Z"               #=> ["A", "Z"]
 *     a[1..-1] = nil              #=> ["A", nil]
 *     a[1..-1] = []              #=> ["A"]
 */

static VALUE
rb_ary_aset(int argc, VALUE *argv, VALUE ary)
{
    long offset, beg, len;

    if (argc == 3) {
        rb_ary_splice(ary, NUM2LONG(argv[0]), NUM2LONG(argv[1]), argv[2]);
        return argv[2];
    }
    if (argc != 2) {
        rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)", argc);
    }
    if (FIXNUM_P(argv[0])) {
        offset = FIX2LONG(argv[0]);
        goto fixnum;
    }
    if (rb_range_beg_len(argv[0], &beg, &len, RARRAY(ary)->len, 1)) {
        /* check if idx is Range */
        rb_ary_splice(ary, beg, len, argv[1]);
        return argv[1];
    }

    offset = NUM2LONG(argv[0]);
fixnum:
    rb_ary_store(ary, offset, argv[1]);
    return argv[1];
}

/*
 *  call-seq:
 *     array.insert(index, obj...)  -> array
 *
 *  Inserts the given values before the element with the given index
 *  (which may be negative).
 *
 *     a = %w{ a b c d }
 *     a.insert(2, 99)         #=> ["a", "b", 99, "c", "d"]
 *     a.insert(-2, 1, 2, 3)   #=> ["a", "b", 99, "c", 1, 2, 3, "d"]
 */

static VALUE
rb_ary_insert(int argc, VALUE *argv, VALUE ary)
{
    long pos;

    if (argc == 1) return ary;
    if (argc < 1) {
        rb_raise(rb_eArgError, "wrong number of arguments (at least 1)");
    }
    pos = NUM2LONG(argv[0]);
    if (pos == -1) {
        pos = RARRAY(ary)->len;
    }
    if (pos < 0) {
        pos++;
    }
    rb_ary_splice(ary, pos, 0, rb_ary_new4(argc - 1, argv + 1));
    return ary;
}

/*
 *  call-seq:
 *     array.each {|item| block }   ->   array
 *
 *  Calls <i>block</i> once for each element in <i>self</i>, passing that
 *  element as a parameter.
 *
 *     a = [ "a", "b", "c" ]
 *     a.each {|x| print x, " -- " }
 *
 *  produces:
 *
 *     a -- b -- c --
 */

VALUE
rb_ary_each(VALUE ary)
{
    long i;

    RETURN_ENUMERATOR(ary, 0, 0);
    for (i=0; i<RARRAY(ary)->len; i++) {
        rb_yield(RARRAY(ary)->ptr[i]);
    }
    return ary;
}

/*
 *  call-seq:
 *     array.each_index {|index| block }  ->  array
 *
 *  Same as <code>Array#each</code>, but passes the index of the element
 *  instead of the element itself.
 *
 *     a = [ "a", "b", "c" ]
 *     a.each_index {|x| print x, " -- " }
 *
 *  produces:
 *
 *     0 -- 1 -- 2 --
 */

static VALUE
rb_ary_each_index(VALUE ary)
{
    long i;

    RETURN_ENUMERATOR(ary, 0, 0);
    for (i=0; i<RARRAY(ary)->len; i++) {
        rb_yield(LONG2NUM(i));
    }
    return ary;
}

/*
 *  call-seq:
 *     array.reverse_each {|item| block }
 *
 *  Same as <code>Array#each</code>, but traverses <i>self</i> in reverse
 *  order.
 *
 *     a = [ "a", "b", "c" ]
 *     a.reverse_each {|x| print x, " " }
 *
 *  produces:
 *
 *     c b a
 */

static VALUE
rb_ary_reverse_each(VALUE ary)
{
    long len = RARRAY(ary)->len;

    RETURN_ENUMERATOR(ary, 0, 0);
    while (len--) {
        rb_yield(RARRAY(ary)->ptr[len]);
        if (RARRAY(ary)->len < len) {
            len = RARRAY(ary)->len;
        }
    }
    return ary;
}

/*
 *  call-seq:
 *     array.length -> int
 *
 *  Returns the number of elements in <i>self</i>. May be zero.
 *
 *     [ 1, 2, 3, 4, 5 ].length   #=> 5
 */

static VALUE
rb_ary_length(VALUE ary)
{
    return LONG2NUM(RARRAY(ary)->len);
}

/*
 *  call-seq:
 *     array.empty?   -> true or false
 *
 *  Returns <code>true</code> if <i>self</i> array contains no elements.
 *
 *     [].empty?   #=> true
 */

static VALUE
rb_ary_empty_p(VALUE ary)
{
    if (RARRAY(ary)->len == 0)
        return Qtrue;
    return Qfalse;
}

VALUE
rb_ary_dup(VALUE ary)
{
    VALUE dup = rb_ary_new2(RARRAY(ary)->len);

    DUPSETUP(dup, ary);
    MEMCPY(RARRAY(dup)->ptr, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
    RARRAY(dup)->len = RARRAY(ary)->len;
    return dup;
}

extern VALUE rb_output_fs;

static VALUE
recursive_join(VALUE ary, VALUE argp, int recur)
{
    VALUE *arg = (VALUE *)argp;
    if (recur) {
        return rb_str_new2("[...]");
    }
    return rb_ary_join(arg[0], arg[1]);
}

VALUE
rb_ary_join(VALUE ary, VALUE sep)
{
    long len = 1, i;
    int taint = Qfalse;
    VALUE result, tmp;

    if (RARRAY(ary)->len == 0) return rb_str_new(0, 0);
    if (OBJ_TAINTED(ary) || OBJ_TAINTED(sep)) taint = Qtrue;

    for (i=0; i<RARRAY(ary)->len; i++) {
        tmp = rb_check_string_type(RARRAY(ary)->ptr[i]);
        len += NIL_P(tmp) ? 10 : RSTRING(tmp)->len;
    }
    if (!NIL_P(sep)) {
        StringValue(sep);
        len += RSTRING(sep)->len * (RARRAY(ary)->len - 1);
    }
    result = rb_str_buf_new(len);
    for (i=0; i<RARRAY(ary)->len; i++) {
        tmp = RARRAY(ary)->ptr[i];
        switch (TYPE(tmp)) {
          case T_STRING:
            break;
          case T_ARRAY:
            {
                VALUE args[2];

                args[0] = tmp;
                args[1] = sep;
                tmp = rb_exec_recursive(recursive_join, ary, (VALUE)args);
            }
            break;
          default:
            tmp = rb_obj_as_string(tmp);
        }
        if (i > 0 && !NIL_P(sep))
            rb_str_buf_append(result, sep);
        rb_str_buf_append(result, tmp);
        if (OBJ_TAINTED(tmp)) taint = Qtrue;
    }

    if (taint) OBJ_TAINT(result);
    return result;
}

/*
 *  call-seq:
 *     array.join(sep=$,)    -> str
 *
 *  Returns a string created by converting each element of the array to
 *  a string, separated by <i>sep</i>.
 *
 *     [ "a", "b", "c" ].join        #=> "abc"
 *     [ "a", "b", "c" ].join("-")   #=> "a-b-c"
 */

static VALUE
rb_ary_join_m(int argc, VALUE *argv, VALUE ary)
{
    VALUE sep;

    rb_scan_args(argc, argv, "01", &sep);
    if (NIL_P(sep)) sep = rb_output_fs;

    return rb_ary_join(ary, sep);
}

/*
 *  call-seq:
 *     array.to_s -> string
 *
 *  Returns _self_<code>.join</code>.
 *
 *     [ "a", "e", "i", "o" ].to_s   #=> "aeio"
 *
 */

VALUE
rb_ary_to_s(VALUE ary)
{
    if (RARRAY(ary)->len == 0) return rb_str_new(0, 0);

    return rb_ary_join(ary, rb_output_fs);
}

static VALUE
inspect_ary(VALUE ary, VALUE dummy, int recur)
{
    int tainted = OBJ_TAINTED(ary);
    long i;
    VALUE s, str;

    if (recur) return rb_tainted_str_new2("[...]");
    str = rb_str_buf_new2("[");
    for (i=0; i<RARRAY(ary)->len; i++) {
        s = rb_inspect(RARRAY(ary)->ptr[i]);
        if (OBJ_TAINTED(s)) tainted = Qtrue;
        if (i > 0) rb_str_buf_cat2(str, ", ");
        rb_str_buf_append(str, s);
    }
    rb_str_buf_cat2(str, "]");
    if (tainted) OBJ_TAINT(str);
    return str;
}

/*
 *  call-seq:
 *     array.inspect  -> string
 *
 *  Create a printable version of <i>array</i>.
 */

static VALUE
rb_ary_inspect(VALUE ary)
{
    if (RARRAY(ary)->len == 0) return rb_str_new2("[]");
    return rb_exec_recursive(inspect_ary, ary, 0);
}

/*
 *  call-seq:
 *     array.to_a     -> array
 *
 *  Returns _self_. If called on a subclass of Array, converts
 *  the receiver to an Array object.
 */

static VALUE
rb_ary_to_a(VALUE ary)
{
    if (rb_obj_class(ary) != rb_cArray) {
        VALUE dup = rb_ary_new2(RARRAY(ary)->len);
        rb_ary_replace(dup, ary);
        return dup;
    }
    return ary;
}

/*
 *  call-seq:
 *     array.to_ary -> array
 *
 *  Returns _self_.
 */

static VALUE
rb_ary_to_ary_m(VALUE ary)
{
    return ary;
}

VALUE
rb_ary_reverse(VALUE ary)
{
    VALUE *p1, *p2;
    VALUE tmp;

    rb_ary_modify(ary);
    if (RARRAY(ary)->len > 1) {
        p1 = RARRAY(ary)->ptr;
        p2 = p1 + RARRAY(ary)->len - 1; /* points last item */

        while (p1 < p2) {
            tmp = *p1;
            *p1++ = *p2;
            *p2-- = tmp;
        }
    }
    return ary;
}

/*
 *  call-seq:
 *     array.reverse!   -> array
 *
 *  Reverses _self_ in place.
 *
 *     a = [ "a", "b", "c" ]
 *     a.reverse!       #=> ["c", "b", "a"]
 *     a                #=> ["c", "b", "a"]
 */

static VALUE
rb_ary_reverse_bang(VALUE ary)
{
    return rb_ary_reverse(ary);
}

/*
 *  call-seq:
 *     array.reverse -> an_array
 *
 *  Returns a new array containing <i>self</i>'s elements in reverse order.
 *
 *     [ "a", "b", "c" ].reverse   #=> ["c", "b", "a"]
 *     [ 1 ].reverse               #=> [1]
 */

static VALUE
rb_ary_reverse_m(VALUE ary)
{
    return rb_ary_reverse(rb_ary_dup(ary));
}

struct ary_sort_data {
    VALUE ary;
    VALUE *ptr;
    long len;
};

static void
ary_sort_check(struct ary_sort_data *data)
{
    if (RARRAY(data->ary)->ptr != data->ptr || RARRAY(data->ary)->len != data->len) {
        rb_raise(rb_eRuntimeError, "array modified during sort");
    }
}

static int
sort_1(const void *ap, const void *bp, void *data)
{
    VALUE a = *(const VALUE *)ap, b = *(const VALUE *)bp;
    VALUE retval = rb_yield_values(2, a, b);
    int n;

    n = rb_cmpint(retval, a, b);
    ary_sort_check((struct ary_sort_data *)data);
    return n;
}

static int
sort_2(const void *ap, const void *bp, void *data)
{
    VALUE retval;
    VALUE a = *(const VALUE *)ap, b = *(const VALUE *)bp;
    int n;

    if (FIXNUM_P(a) && FIXNUM_P(b)) {
        if ((long)a > (long)b) return 1;
        if ((long)a < (long)b) return -1;
        return 0;
    }
    if (TYPE(a) == T_STRING) {
        if (TYPE(b) == T_STRING) return rb_str_cmp(a, b);
    }

    retval = rb_funcall(a, id_cmp, 1, b);
    n = rb_cmpint(retval, a, b);
    ary_sort_check((struct ary_sort_data *)data);

    return n;
}

static VALUE
sort_internal(VALUE ary)
{
    struct ary_sort_data data;

    data.ary = ary;
    data.ptr = RARRAY(ary)->ptr; data.len = RARRAY(ary)->len;
    ruby_qsort(RARRAY(ary)->ptr, RARRAY(ary)->len, sizeof(VALUE),
               rb_block_given_p()?sort_1:sort_2, &data);
    return ary;
}

static VALUE
sort_unlock(VALUE ary)
{
    FL_UNSET(ary, ARY_TMPLOCK);
    return ary;
}

/*
 *  call-seq:
 *     array.sort!                   -> array
 *     array.sort! {| a,b | block }  -> array
 *
 *  Sorts _self_. Comparisons for
 *  the sort will be done using the <code><=></code> operator or using
 *  an optional code block. The block implements a comparison between
 *  <i>a</i> and <i>b</i>, returning -1, 0, or +1. See also
 *  <code>Enumerable#sort_by</code>.
 *
 *     a = [ "d", "a", "e", "c", "b" ]
 *     a.sort                    #=> ["a", "b", "c", "d", "e"]
 *     a.sort {|x,y| y <=> x }   #=> ["e", "d", "c", "b", "a"]
 */

VALUE
rb_ary_sort_bang(VALUE ary)
{
    rb_ary_modify(ary);
    if (RARRAY(ary)->len > 1) {
        FL_SET(ary, ARY_TMPLOCK);       /* prohibit modification during sort */
        rb_ensure(sort_internal, ary, sort_unlock, ary);
    }
    return ary;
}

/*
 *  call-seq:
 *     array.sort                   -> an_array
 *     array.sort {| a,b | block }  -> an_array
 *
 *  Returns a new array created by sorting <i>self</i>. Comparisons for
 *  the sort will be done using the <code><=></code> operator or using
 *  an optional code block. The block implements a comparison between
 *  <i>a</i> and <i>b</i>, returning -1, 0, or +1. See also
 *  <code>Enumerable#sort_by</code>.
 *
 *     a = [ "d", "a", "e", "c", "b" ]
 *     a.sort                    #=> ["a", "b", "c", "d", "e"]
 *     a.sort {|x,y| y <=> x }   #=> ["e", "d", "c", "b", "a"]
 */

VALUE
rb_ary_sort(VALUE ary)
{
    ary = rb_ary_dup(ary);
    rb_ary_sort_bang(ary);
    return ary;
}

/*
 *  call-seq:
 *     array.collect {|item| block }  -> an_array
 *     array.map     {|item| block }  -> an_array
 *
 *  Invokes <i>block</i> once for each element of <i>self</i>. Creates a
 *  new array containing the values returned by the block.
 *  See also <code>Enumerable#collect</code>.
 *
 *     a = [ "a", "b", "c", "d" ]
 *     a.collect {|x| x + "!" }   #=> ["a!", "b!", "c!", "d!"]
 *     a                          #=> ["a", "b", "c", "d"]
 */

static VALUE
rb_ary_collect(VALUE ary)
{
    long i;
    VALUE collect;

    RETURN_ENUMERATOR(ary, 0, 0);
    collect = rb_ary_new2(RARRAY(ary)->len);
    for (i = 0; i < RARRAY(ary)->len; i++) {
        rb_ary_push(collect, rb_yield(RARRAY(ary)->ptr[i]));
    }
    return collect;
}

/*
 *  call-seq:
 *     array.collect! {|item| block }   ->   array
 *     array.map!     {|item| block }   ->   array
 *
 *  Invokes the block once for each element of _self_, replacing the
 *  element with the value returned by _block_.
 *  See also <code>Enumerable#collect</code>.
 *
 *     a = [ "a", "b", "c", "d" ]
 *     a.collect! {|x| x + "!" }
 *     a             #=>  [ "a!", "b!", "c!", "d!" ]
 */

static VALUE
rb_ary_collect_bang(VALUE ary)
{
    long i;

    RETURN_ENUMERATOR(ary, 0, 0);
    rb_ary_modify(ary);
    for (i = 0; i < RARRAY(ary)->len; i++) {
        rb_ary_store(ary, i, rb_yield(RARRAY(ary)->ptr[i]));
    }
    return ary;
}

VALUE
rb_get_values_at(VALUE obj, long olen, int argc, VALUE *argv, VALUE (*func) (VALUE, long))
{
    VALUE result = rb_ary_new2(argc);
    long beg, len, i, j;

    for (i=0; i<argc; i++) {
        if (FIXNUM_P(argv[i])) {
            rb_ary_push(result, (*func)(obj, FIX2LONG(argv[i])));
            continue;
        }
        /* check if idx is Range */
        switch (rb_range_beg_len(argv[i], &beg, &len, olen, 0)) {
          case Qfalse:
            break;
          case Qnil:
            continue;
          default:
            for (j=0; j<len; j++) {
                rb_ary_push(result, (*func)(obj, j+beg));
            }
            continue;
        }
        rb_ary_push(result, (*func)(obj, NUM2LONG(argv[i])));
    }
    return result;
}

/*
 *  call-seq:
 *     array.values_at(selector,... )  -> an_array
 *
 *  Returns an array containing the elements in
 *  _self_ corresponding to the given selector(s). The selectors
 *  may be either integer indices or ranges.
 *  See also <code>Array#select</code>.
 *
 *     a = %w{ a b c d e f }
 *     a.values_at(1, 3, 5)
 *     a.values_at(1, 3, 5, 7)
 *     a.values_at(-1, -3, -5, -7)
 *     a.values_at(1..3, 2...5)
 */

static VALUE
rb_ary_values_at(int argc, VALUE *argv, VALUE ary)
{
    return rb_get_values_at(ary, RARRAY(ary)->len, argc, argv, rb_ary_entry);
}

/*
 *  call-seq:
 *     array.select {|item| block } -> an_array
 *
 *  Invokes the block passing in successive elements from <i>array</i>,
 *  returning an array containing those elements for which the block
 *  returns a true value (equivalent to <code>Enumerable#select</code>).
 *
 *     a = %w{ a b c d e f }
 *     a.select {|v| v =~ /[aeiou]/}   #=> ["a", "e"]
 */

static VALUE
rb_ary_select(VALUE ary)
{
    VALUE result;
    long i;

    RETURN_ENUMERATOR(ary, 0, 0);
    result = rb_ary_new2(RARRAY(ary)->len);
    for (i = 0; i < RARRAY(ary)->len; i++) {
        if (RTEST(rb_yield(RARRAY(ary)->ptr[i]))) {
            rb_ary_push(result, rb_ary_elt(ary, i));
        }
    }
    return result;
}

/*
 *  call-seq:
 *     array.delete(obj)            -> obj or nil
 *     array.delete(obj) { block }  -> obj or nil
 *
 *  Deletes items from <i>self</i> that are equal to <i>obj</i>. If
 *  the item is not found, returns <code>nil</code>. If the optional
 *  code block is given, returns the result of <i>block</i> if the item
 *  is not found.
 *
 *     a = [ "a", "b", "b", "b", "c" ]
 *     a.delete("b")                   #=> "b"
 *     a                               #=> ["a", "c"]
 *     a.delete("z")                   #=> nil
 *     a.delete("z") { "not found" }   #=> "not found"
 */

VALUE
rb_ary_delete(VALUE ary, VALUE item)
{
    long i1, i2;

    for (i1 = i2 = 0; i1 < RARRAY(ary)->len; i1++) {
        VALUE e = RARRAY(ary)->ptr[i1];

        if (rb_equal(e, item)) continue;
        if (i1 != i2) {
            rb_ary_store(ary, i2, e);
        }
        i2++;
    }
    if (RARRAY(ary)->len == i2) {
        if (rb_block_given_p()) {
            return rb_yield(item);
        }
        return Qnil;
    }

    rb_ary_modify(ary);
    if (RARRAY(ary)->len > i2) {
        RARRAY(ary)->len = i2;
        if (i2 * 2 < RARRAY(ary)->aux.capa &&
            RARRAY(ary)->aux.capa > ARY_DEFAULT_SIZE) {
            REALLOC_N(RARRAY(ary)->ptr, VALUE, i2 * 2);
            RARRAY(ary)->aux.capa = i2 * 2;
        }
    }

    return item;
}

VALUE
rb_ary_delete_at(VALUE ary, long pos)
{
    long i, len = RARRAY(ary)->len;
    VALUE del;

    if (pos >= len) return Qnil;
    if (pos < 0) {
        pos += len;
        if (pos < 0) return Qnil;
    }

    rb_ary_modify(ary);
    del = RARRAY(ary)->ptr[pos];
    for (i = pos + 1; i < len; i++, pos++) {
        RARRAY(ary)->ptr[pos] = RARRAY(ary)->ptr[i];
    }
    RARRAY(ary)->len = pos;

    return del;
}

/*
 *  call-seq:
 *     array.delete_at(index)  -> obj or nil
 *
 *  Deletes the element at the specified index, returning that element,
 *  or <code>nil</code> if the index is out of range. See also
 *  <code>Array#slice!</code>.
 *
 *     a = %w( ant bat cat dog )
 *     a.delete_at(2)    #=> "cat"
 *     a                 #=> ["ant", "bat", "dog"]
 *     a.delete_at(99)   #=> nil
 */

static VALUE
rb_ary_delete_at_m(VALUE ary, VALUE pos)
{
    return rb_ary_delete_at(ary, NUM2LONG(pos));
}

/*
 *  call-seq:
 *     array.slice!(index)         -> obj or nil
 *     array.slice!(start, length) -> sub_array or nil
 *     array.slice!(range)         -> sub_array or nil
 *
 *  Deletes the element(s) given by an index (optionally with a length)
 *  or by a range. Returns the deleted object, subarray, or
 *  <code>nil</code> if the index is out of range. Equivalent to:
 *
 *     def slice!(*args)
 *       result = self[*args]
 *       self[*args] = nil
 *       result
 *     end
 *
 *     a = [ "a", "b", "c" ]
 *     a.slice!(1)     #=> "b"
 *     a               #=> ["a", "c"]
 *     a.slice!(-1)    #=> "c"
 *     a               #=> ["a"]
 *     a.slice!(100)   #=> nil
 *     a               #=> ["a"]
 */

static VALUE
rb_ary_slice_bang(int argc, VALUE *argv, VALUE ary)
{
    VALUE arg1, arg2;
    long pos, len;

    if (rb_scan_args(argc, argv, "11", &arg1, &arg2) == 2) {
        pos = NUM2LONG(arg1);
        len = NUM2LONG(arg2);
      delete_pos_len:
        if (pos < 0) {
            pos = RARRAY(ary)->len + pos;
        }
        arg2 = rb_ary_subseq(ary, pos, len);
        rb_ary_splice(ary, pos, len, Qundef);   /* Qnil/rb_ary_new2(0) */
        return arg2;
    }

    if (!FIXNUM_P(arg1) && rb_range_beg_len(arg1, &pos, &len, RARRAY(ary)->len, 1)) {
        goto delete_pos_len;
    }

    return rb_ary_delete_at(ary, NUM2LONG(arg1));
}

/*
 *  call-seq:
 *     array.reject! {|item| block }  -> array or nil
 *
 *  Equivalent to <code>Array#delete_if</code>, deleting elements from
 *  _self_ for which the block evaluates to true, but returns
 *  <code>nil</code> if no changes were made. Also see
 *  <code>Enumerable#reject</code>.
 */

static VALUE
rb_ary_reject_bang(VALUE ary)
{
    long i1, i2;

    RETURN_ENUMERATOR(ary, 0, 0);
    rb_ary_modify(ary);
    for (i1 = i2 = 0; i1 < RARRAY(ary)->len; i1++) {
        VALUE v = RARRAY(ary)->ptr[i1];
        if (RTEST(rb_yield(v))) continue;
        if (i1 != i2) {
            rb_ary_store(ary, i2, v);
        }
        i2++;
    }
    if (RARRAY(ary)->len == i2) return Qnil;
    if (i2 < RARRAY(ary)->len)
        RARRAY(ary)->len = i2;

    return ary;
}

/*
 *  call-seq:
 *     array.reject {|item| block }  -> an_array
 *
 *  Returns a new array containing the items in _self_
 *  for which the block is not true.
 */

static VALUE
rb_ary_reject(VALUE ary)
{
    RETURN_ENUMERATOR(ary, 0, 0);
    ary = rb_ary_dup(ary);
    rb_ary_reject_bang(ary);
    return ary;
}

/*
 *  call-seq:
 *     array.delete_if {|item| block }  -> array
 *
 *  Deletes every element of <i>self</i> for which <i>block</i> evaluates
 *  to <code>true</code>.
 *
 *     a = [ "a", "b", "c" ]
 *     a.delete_if {|x| x >= "b" }   #=> ["a"]
 */

static VALUE
rb_ary_delete_if(VALUE ary)
{
    rb_ary_reject_bang(ary);
    return ary;
}

/*
 *  call-seq:
 *     array.zip(arg, ...)                   -> an_array
 *     array.zip(arg, ...) {| arr | block }  -> nil
 *
 *  Converts any arguments to arrays, then merges elements of
 *  <i>self</i> with corresponding elements from each argument. This
 *  generates a sequence of <code>self.size</code> <em>n</em>-element
 *  arrays, where <em>n</em> is one more that the count of arguments. If
 *  the size of any argument is less than <code>enumObj.size</code>,
 *  <code>nil</code> values are supplied. If a block given, it is
 *  invoked for each output array, otherwise an array of arrays is
 *  returned.
 *
 *     a = [ 4, 5, 6 ]
 *     b = [ 7, 8, 9 ]
 *
 *     [1,2,3].zip(a, b)      #=> [[1, 4, 7], [2, 5, 8], [3, 6, 9]]
 *     [1,2].zip(a,b)         #=> [[1, 4, 7], [2, 5, 8]]
 *     a.zip([1,2],[8])       #=> [[4,1,8], [5,2,nil], [6,nil,nil]]
 */

static VALUE
rb_ary_zip(int argc, VALUE *argv, VALUE ary)
{
    int i, j;
    long len;
    VALUE result;

    for (i=0; i<argc; i++) {
        argv[i] = to_a(argv[i]);
    }
    if (rb_block_given_p()) {
        for (i=0; i<RARRAY(ary)->len; i++) {
            VALUE tmp = rb_ary_new2(argc+1);

            rb_ary_push(tmp, rb_ary_elt(ary, i));
            for (j=0; j<argc; j++) {
                rb_ary_push(tmp, rb_ary_elt(argv[j], i));
            }
            rb_yield(tmp);
        }
        return Qnil;
    }
    len = RARRAY(ary)->len;
    result = rb_ary_new2(len);
    for (i=0; i<len; i++) {
        VALUE tmp = rb_ary_new2(argc+1);

        rb_ary_push(tmp, rb_ary_elt(ary, i));
        for (j=0; j<argc; j++) {
            rb_ary_push(tmp, rb_ary_elt(argv[j], i));
        }
        rb_ary_push(result, tmp);
    }
    return result;
}

/*
 *  call-seq:
 *     array.transpose -> an_array
 *
 *  Assumes that <i>self</i> is an array of arrays and transposes the
 *  rows and columns.
 *
 *     a = [[1,2], [3,4], [5,6]]
 *     a.transpose   #=> [[1, 3, 5], [2, 4, 6]]
 */

static VALUE
rb_ary_transpose(VALUE ary)
{
    long elen = -1, alen, i, j;
    VALUE tmp, result = 0;

    alen = RARRAY(ary)->len;
    if (alen == 0) return rb_ary_dup(ary);
    for (i=0; i<alen; i++) {
        tmp = to_ary(rb_ary_elt(ary, i));
        if (elen < 0) {         /* first element */
            elen = RARRAY(tmp)->len;
            result = rb_ary_new2(elen);
            for (j=0; j<elen; j++) {
                rb_ary_store(result, j, rb_ary_new2(alen));
            }
        }
        else if (elen != RARRAY(tmp)->len) {
            rb_raise(rb_eIndexError, "element size differs (%ld should be %ld)",
                     RARRAY(tmp)->len, elen);
        }
        for (j=0; j<elen; j++) {
            rb_ary_store(rb_ary_elt(result, j), i, rb_ary_elt(tmp, j));
        }
    }
    return result;
}

/*
 *  call-seq:
 *     array.replace(other_array)  -> array
 *
 *  Replaces the contents of <i>self</i> with the contents of
 *  <i>other_array</i>, truncating or expanding if necessary.
 *
 *     a = [ "a", "b", "c", "d", "e" ]
 *     a.replace([ "x", "y", "z" ])   #=> ["x", "y", "z"]
 *     a                              #=> ["x", "y", "z"]
 */

static VALUE
rb_ary_replace(VALUE copy, VALUE orig)
{
    VALUE shared;

    rb_ary_modify(copy);
    orig = to_ary(orig);
    if (copy == orig) return copy;
    shared = ary_make_shared(orig);
    if (RARRAY(copy)->ptr && !FL_TEST(copy, ELTS_SHARED))
        free(RARRAY(copy)->ptr);
    RARRAY(copy)->ptr = RARRAY(orig)->ptr;
    RARRAY(copy)->len = RARRAY(orig)->len;
    RARRAY(copy)->aux.shared = shared;
    FL_SET(copy, ELTS_SHARED);

    return copy;
}

/*
 *  call-seq:
 *     array.clear    ->  array
 *
 *  Removes all elements from _self_.
 *
 *     a = [ "a", "b", "c", "d", "e" ]
 *     a.clear    #=> [ ]
 */

VALUE
rb_ary_clear(VALUE ary)
{
    rb_ary_modify(ary);
    RARRAY(ary)->len = 0;
    if (ARY_DEFAULT_SIZE * 2 < RARRAY(ary)->aux.capa) {
        REALLOC_N(RARRAY(ary)->ptr, VALUE, ARY_DEFAULT_SIZE * 2);
        RARRAY(ary)->aux.capa = ARY_DEFAULT_SIZE * 2;
    }
    return ary;
}

/*
 *  call-seq:
 *     array.fill(obj)                                -> array
 *     array.fill(obj, start [, length])              -> array
 *     array.fill(obj, range )                        -> array
 *     array.fill {|index| block }                    -> array
 *     array.fill(start [, length] ) {|index| block } -> array
 *     array.fill(range) {|index| block }             -> array
 *
 *  The first three forms set the selected elements of <i>self</i> (which
 *  may be the entire array) to <i>obj</i>. A <i>start</i> of
 *  <code>nil</code> is equivalent to zero. A <i>length</i> of
 *  <code>nil</code> is equivalent to <i>self.length</i>. The last three
 *  forms fill the array with the value of the block. The block is
 *  passed the absolute index of each element to be filled.
 *
 *     a = [ "a", "b", "c", "d" ]
 *     a.fill("x")              #=> ["x", "x", "x", "x"]
 *     a.fill("z", 2, 2)        #=> ["x", "x", "z", "z"]
 *     a.fill("y", 0..1)        #=> ["y", "y", "z", "z"]
 *     a.fill {|i| i*i}         #=> [0, 1, 4, 9]
 *     a.fill(-2) {|i| i*i*i}   #=> [0, 1, 8, 27]
 */

static VALUE
rb_ary_fill(int argc, VALUE *argv, VALUE ary)
{
    VALUE item, arg1, arg2;
    long beg, end, len;
    VALUE *p, *pend;
    int block_p = Qfalse;

    if (rb_block_given_p()) {
        block_p = Qtrue;
        rb_scan_args(argc, argv, "02", &arg1, &arg2);
        argc += 1;              /* hackish */
    }
    else {
        rb_scan_args(argc, argv, "12", &item, &arg1, &arg2);
    }
    switch (argc) {
      case 1:
        beg = 0;
        len = RARRAY(ary)->len;
        break;
      case 2:
        if (rb_range_beg_len(arg1, &beg, &len, RARRAY(ary)->len, 1)) {
            break;
        }
        /* fall through */
      case 3:
        beg = NIL_P(arg1) ? 0 : NUM2LONG(arg1);
        if (beg < 0) {
            beg = RARRAY(ary)->len + beg;
            if (beg < 0) beg = 0;
        }
        len = NIL_P(arg2) ? RARRAY(ary)->len - beg : NUM2LONG(arg2);
        break;
    }
    rb_ary_modify(ary);
    end = beg + len;
    if (end > RARRAY(ary)->len) {
        if (end >= RARRAY(ary)->aux.capa) {
            REALLOC_N(RARRAY(ary)->ptr, VALUE, end);
            RARRAY(ary)->aux.capa = end;
        }
        rb_mem_clear(RARRAY(ary)->ptr + RARRAY(ary)->len, end - RARRAY(ary)->len);
        RARRAY(ary)->len = end;
    }

    if (block_p) {
        VALUE v;
        long i;

        for (i=beg; i<end; i++) {
            v = rb_yield(LONG2NUM(i));
            if (i>=RARRAY(ary)->len) break;
            RARRAY(ary)->ptr[i] = v;
        }
    }
    else {
        p = RARRAY(ary)->ptr + beg;
        pend = p + len;
        while (p < pend) {
            *p++ = item;
        }
    }
    return ary;
}

/*
 *  call-seq:
 *     array + other_array   -> an_array
 *
 *  Concatenation---Returns a new array built by concatenating the
 *  two arrays together to produce a third array.
 *
 *     [ 1, 2, 3 ] + [ 4, 5 ]    #=> [ 1, 2, 3, 4, 5 ]
 */

VALUE
rb_ary_plus(VALUE x, VALUE y)
{
    VALUE z;
    long len;

    y = to_ary(y);
    len = RARRAY(x)->len + RARRAY(y)->len;
    z = rb_ary_new2(len);
    MEMCPY(RARRAY(z)->ptr, RARRAY(x)->ptr, VALUE, RARRAY(x)->len);
    MEMCPY(RARRAY(z)->ptr + RARRAY(x)->len, RARRAY(y)->ptr, VALUE, RARRAY(y)->len);
    RARRAY(z)->len = len;
    return z;
}

/*
 *  call-seq:
 *     array.concat(other_array)   ->  array
 *
 *  Appends the elements in other_array to _self_.
 *
 *     [ "a", "b" ].concat( ["c", "d"] ) #=> [ "a", "b", "c", "d" ]
 */

VALUE
rb_ary_concat(VALUE x, VALUE y)
{
    y = to_ary(y);
    if (RARRAY(y)->len > 0) {
        rb_ary_splice(x, RARRAY(x)->len, 0, y);
    }
    return x;
}

/*
 *  call-seq:
 *     array * int     ->    an_array
 *     array * str     ->    a_string
 *
 *  Repetition---With a String argument, equivalent to
 *  self.join(str). Otherwise, returns a new array
 *  built by concatenating the _int_ copies of _self_.
 *
 *
 *     [ 1, 2, 3 ] * 3    #=> [ 1, 2, 3, 1, 2, 3, 1, 2, 3 ]
 *     [ 1, 2, 3 ] * ","  #=> "1,2,3"
 *
 */

static VALUE
rb_ary_times(VALUE ary, VALUE times)
{
    VALUE ary2, tmp;
    long i, len;

    tmp = rb_check_string_type(times);
    if (!NIL_P(tmp)) {
        return rb_ary_join(ary, tmp);
    }

    len = NUM2LONG(times);
    if (len == 0) return ary_new(rb_obj_class(ary), 0);
    if (len < 0) {
        rb_raise(rb_eArgError, "negative argument");
    }
    if (LONG_MAX/len < RARRAY(ary)->len) {
        rb_raise(rb_eArgError, "argument too big");
    }
    len *= RARRAY(ary)->len;

    ary2 = ary_new(rb_obj_class(ary), len);
    RARRAY(ary2)->len = len;

    for (i=0; i<len; i+=RARRAY(ary)->len) {
        MEMCPY(RARRAY(ary2)->ptr+i, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
    }
    OBJ_INFECT(ary2, ary);

    return ary2;
}

/*
 *  call-seq:
 *     array.assoc(obj)   ->  an_array  or  nil
 *
 *  Searches through an array whose elements are also arrays
 *  comparing _obj_ with the first element of each contained array
 *  using obj.==.
 *  Returns the first contained array that matches (that
 *  is, the first associated array),
 *  or +nil+ if no match is found.
 *  See also <code>Array#rassoc</code>.
 *
 *     s1 = [ "colors", "red", "blue", "green" ]
 *     s2 = [ "letters", "a", "b", "c" ]
 *     s3 = "foo"
 *     a  = [ s1, s2, s3 ]
 *     a.assoc("letters")  #=> [ "letters", "a", "b", "c" ]
 *     a.assoc("foo")      #=> nil
 */

VALUE
rb_ary_assoc(VALUE ary, VALUE key)
{
    long i;
    VALUE v;

    for (i = 0; i < RARRAY(ary)->len; ++i) {
        v = RARRAY(ary)->ptr[i];
        if (TYPE(v) == T_ARRAY &&
            RARRAY(v)->len > 0 &&
            rb_equal(RARRAY(v)->ptr[0], key))
            return v;
    }
    return Qnil;
}

/*
 *  call-seq:
 *     array.rassoc(key) -> an_array or nil
 *
 *  Searches through the array whose elements are also arrays. Compares
 *  <em>key</em> with the second element of each contained array using
 *  <code>==</code>. Returns the first contained array that matches. See
 *  also <code>Array#assoc</code>.
 *
 *     a = [ [ 1, "one"], [2, "two"], [3, "three"], ["ii", "two"] ]
 *     a.rassoc("two")    #=> [2, "two"]
 *     a.rassoc("four")   #=> nil
 */

VALUE
rb_ary_rassoc(VALUE ary, VALUE value)
{
    long i;
    VALUE v;

    for (i = 0; i < RARRAY(ary)->len; ++i) {
        v = RARRAY(ary)->ptr[i];
        if (TYPE(v) == T_ARRAY &&
            RARRAY(v)->len > 1 &&
            rb_equal(RARRAY(v)->ptr[1], value))
            return v;
    }
    return Qnil;
}

/*
 *  call-seq:
 *     array == other_array   ->   bool
 *
 *  Equality---Two arrays are equal if they contain the same number
 *  of elements and if each element is equal to (according to
 *  Object.==) the corresponding element in the other array.
 *
 *     [ "a", "c" ]    == [ "a", "c", 7 ]     #=> false
 *     [ "a", "c", 7 ] == [ "a", "c", 7 ]     #=> true
 *     [ "a", "c", 7 ] == [ "a", "d", "f" ]   #=> false
 *
 */

static VALUE
rb_ary_equal(VALUE ary1, VALUE ary2)
{
    long i;

    if (ary1 == ary2) return Qtrue;
    if (TYPE(ary2) != T_ARRAY) {
        if (!rb_respond_to(ary2, rb_intern("to_ary"))) {
            return Qfalse;
        }
        return rb_equal(ary2, ary1);
    }
    if (RARRAY(ary1)->len != RARRAY(ary2)->len) return Qfalse;
    for (i=0; i<RARRAY(ary1)->len; i++) {
        if (!rb_equal(rb_ary_elt(ary1, i), rb_ary_elt(ary2, i)))
            return Qfalse;
    }
    return Qtrue;
}

/*
 *  call-seq:
 *     array.eql?(other)  -> true or false
 *
 *  Returns <code>true</code> if _array_ and _other_ are the same object,
 *  or are both arrays with the same content.
 */

static VALUE
rb_ary_eql(VALUE ary1, VALUE ary2)
{
    long i;

    if (ary1 == ary2) return Qtrue;
    if (TYPE(ary2) != T_ARRAY) return Qfalse;
    if (RARRAY(ary1)->len != RARRAY(ary2)->len) return Qfalse;
    for (i=0; i<RARRAY(ary1)->len; i++) {
        if (!rb_eql(rb_ary_elt(ary1, i), rb_ary_elt(ary2, i)))
            return Qfalse;
    }
    return Qtrue;
}

static VALUE
recursive_hash(VALUE ary, VALUE dummy, int recur)
{
    long i, h;
    VALUE n;

    if (recur) {
        return LONG2FIX(0);
    }
    h = RARRAY(ary)->len;
    for (i=0; i<RARRAY(ary)->len; i++) {
        h = (h << 1) | (h<0 ? 1 : 0);
        n = rb_hash(RARRAY(ary)->ptr[i]);
        h ^= NUM2LONG(n);
    }
    return LONG2FIX(h);
}

/*
 *  call-seq:
 *     array.hash   -> fixnum
 *
 *  Compute a hash-code for this array. Two arrays with the same content
 *  will have the same hash code (and will compare using <code>eql?</code>).
 */

static VALUE
rb_ary_hash(VALUE ary)
{
    return rb_exec_recursive(recursive_hash, ary, 0);
}

/*
 *  call-seq:
 *     array.include?(obj)   -> true or false
 *
 *  Returns <code>true</code> if the given object is present in
 *  <i>self</i> (that is, if any object <code>==</code> <i>anObject</i>),
 *  <code>false</code> otherwise.
 *
 *     a = [ "a", "b", "c" ]
 *     a.include?("b")   #=> true
 *     a.include?("z")   #=> false
 */

VALUE
rb_ary_includes(VALUE ary, VALUE item)
{
    long i;

    for (i=0; i<RARRAY(ary)->len; i++) {
        if (rb_equal(RARRAY(ary)->ptr[i], item)) {
            return Qtrue;
        }
    }
    return Qfalse;
}

/*
 *  call-seq:
 *     array <=> other_array   ->  -1, 0, +1
 *
 *  Comparison---Returns an integer (-1, 0,
 *  or +1) if this array is less than, equal to, or greater than
 *  other_array.  Each object in each array is compared
 *  (using <=>). If any value isn't
 *  equal, then that inequality is the return value. If all the
 *  values found are equal, then the return is based on a
 *  comparison of the array lengths.  Thus, two arrays are
 *  ``equal'' according to <code>Array#<=></code> if and only if they have
 *  the same length and the value of each element is equal to the
 *  value of the corresponding element in the other array.
 *
 *     [ "a", "a", "c" ]    <=> [ "a", "b", "c" ]   #=> -1
 *     [ 1, 2, 3, 4, 5, 6 ] <=> [ 1, 2 ]            #=> +1
 *
 */

VALUE
rb_ary_cmp(VALUE ary1, VALUE ary2)
{
    long i, len;

    ary2 = to_ary(ary2);
    len = RARRAY(ary1)->len;
    if (len > RARRAY(ary2)->len) {
        len = RARRAY(ary2)->len;
    }
    for (i=0; i<len; i++) {
        VALUE v = rb_funcall(rb_ary_elt(ary1, i), id_cmp, 1, rb_ary_elt(ary2, i));
        if (v != INT2FIX(0)) {
            return v;
        }
    }
    len = RARRAY(ary1)->len - RARRAY(ary2)->len;
    if (len == 0) return INT2FIX(0);
    if (len > 0) return INT2FIX(1);
    return INT2FIX(-1);
}

static VALUE
ary_make_hash(VALUE ary1, VALUE ary2)
{
    VALUE hash = rb_hash_new();
    long i;

    for (i=0; i<RARRAY(ary1)->len; i++) {
        rb_hash_aset(hash, RARRAY(ary1)->ptr[i], Qtrue);
    }
    if (ary2) {
        for (i=0; i<RARRAY(ary2)->len; i++) {
            rb_hash_aset(hash, RARRAY(ary2)->ptr[i], Qtrue);
        }
    }
    return hash;
}

/*
 *  call-seq:
 *     array - other_array    -> an_array
 *
 *  Array Difference---Returns a new array that is a copy of
 *  the original array, removing any items that also appear in
 *  other_array. (If you need set-like behavior, see the
 *  library class Set.)
 *
 *     [ 1, 1, 2, 2, 3, 3, 4, 5 ] - [ 1, 2, 4 ]  #=>  [ 3, 3, 5 ]
 */

static VALUE
rb_ary_diff(VALUE ary1, VALUE ary2)
{
    VALUE ary3;
    volatile VALUE hash;
    long i;

    hash = ary_make_hash(to_ary(ary2), 0);
    ary3 = rb_ary_new();

    for (i=0; i<RARRAY(ary1)->len; i++) {
        if (st_lookup(RHASH(hash)->tbl, RARRAY(ary1)->ptr[i], 0)) continue;
        rb_ary_push(ary3, rb_ary_elt(ary1, i));
    }
    return ary3;
}

/*
 *  call-seq:
 *     array & other_array
 *
 *  Set Intersection---Returns a new array
 *  containing elements common to the two arrays, with no duplicates.
 *
 *     [ 1, 1, 3, 5 ] & [ 1, 2, 3 ]   #=> [ 1, 3 ]
 */

static VALUE
rb_ary_and(VALUE ary1, VALUE ary2)
{
    VALUE hash, ary3, v, vv;
    long i;

    ary2 = to_ary(ary2);
    ary3 = rb_ary_new2(RARRAY(ary1)->len < RARRAY(ary2)->len ?
            RARRAY(ary1)->len : RARRAY(ary2)->len);
    hash = ary_make_hash(ary2, 0);

    for (i=0; i<RARRAY(ary1)->len; i++) {
        v = vv = rb_ary_elt(ary1, i);
        if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
            rb_ary_push(ary3, v);
        }
    }

    return ary3;
}

/*
 *  call-seq:
 *     array | other_array     ->  an_array
 *
 *  Set Union---Returns a new array by joining this array with
 *  other_array, removing duplicates.
 *
 *     [ "a", "b", "c" ] | [ "c", "d", "a" ]
 *            #=> [ "a", "b", "c", "d" ]
 */

static VALUE
rb_ary_or(VALUE ary1, VALUE ary2)
{
    VALUE hash, ary3;
    VALUE v, vv;
    long i;

    ary2 = to_ary(ary2);
    ary3 = rb_ary_new2(RARRAY(ary1)->len+RARRAY(ary2)->len);
    hash = ary_make_hash(ary1, ary2);

    for (i=0; i<RARRAY(ary1)->len; i++) {
        v = vv = rb_ary_elt(ary1, i);
        if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
            rb_ary_push(ary3, v);
        }
    }
    for (i=0; i<RARRAY(ary2)->len; i++) {
        v = vv = rb_ary_elt(ary2, i);
        if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
            rb_ary_push(ary3, v);
        }
    }
    return ary3;
}

/*
 *  call-seq:
 *     array.uniq! -> array or nil
 *
 *  Removes duplicate elements from _self_.
 *  Returns <code>nil</code> if no changes are made (that is, no
 *  duplicates are found).
 *
 *     a = [ "a", "a", "b", "b", "c" ]
 *     a.uniq!   #=> ["a", "b", "c"]
 *     b = [ "a", "b", "c" ]
 *     b.uniq!   #=> nil
 */

static VALUE
rb_ary_uniq_bang(VALUE ary)
{
    VALUE hash, v, vv;
    long i, j;

    hash = ary_make_hash(ary, 0);

    if (RARRAY(ary)->len == RHASH(hash)->tbl->num_entries) {
        return Qnil;
    }
    for (i=j=0; i<RARRAY(ary)->len; i++) {
        v = vv = rb_ary_elt(ary, i);
        if (st_delete(RHASH(hash)->tbl, (st_data_t*)&vv, 0)) {
            rb_ary_store(ary, j++, v);
        }
    }
    RARRAY(ary)->len = j;

    return ary;
}

/*
 *  call-seq:
 *     array.uniq   -> an_array
 *
 *  Returns a new array by removing duplicate values in <i>self</i>.
 *
 *     a = [ "a", "a", "b", "b", "c" ]
 *     a.uniq   #=> ["a", "b", "c"]
 */

static VALUE
rb_ary_uniq(VALUE ary)
{
    ary = rb_ary_dup(ary);
    rb_ary_uniq_bang(ary);
    return ary;
}

/*
 *  call-seq:
 *     array.compact!    ->   array  or  nil
 *
 *  Removes +nil+ elements from array.
 *  Returns +nil+ if no changes were made.
 *
 *     [ "a", nil, "b", nil, "c" ].compact! #=> [ "a", "b", "c" ]
 *     [ "a", "b", "c" ].compact!           #=> nil
 */

static VALUE
rb_ary_compact_bang(VALUE ary)
{
    VALUE *p, *t, *end;

    rb_ary_modify(ary);
    p = t = RARRAY(ary)->ptr;
    end = p + RARRAY(ary)->len;

    while (t < end) {
        if (NIL_P(*t)) t++;
        else *p++ = *t++;
    }
    if (RARRAY(ary)->len == (p - RARRAY(ary)->ptr)) {
        return Qnil;
    }
    RARRAY(ary)->len = RARRAY(ary)->aux.capa = (p - RARRAY(ary)->ptr);
    REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);

    return ary;
}

/*
 *  call-seq:
 *     array.compact     ->  an_array
 *
 *  Returns a copy of _self_ with all +nil+ elements removed.
 *
 *     [ "a", nil, "b", nil, "c", nil ].compact
 *                       #=> [ "a", "b", "c" ]
 */

static VALUE
rb_ary_compact(VALUE ary)
{
    ary = rb_ary_dup(ary);
    rb_ary_compact_bang(ary);
    return ary;
}

/*
 *  call-seq:
 *     array.nitems -> int
 *     array.nitems { |item| block }  -> int
 *
 *  Returns the number of non-<code>nil</code> elements in _self_.
 *  If a block is given, the elements yielding a true value are
 *  counted.
 *
 *  May be zero.
 *
 *     [ 1, nil, 3, nil, 5 ].nitems   #=> 3
 *     [5,6,7,8,9].nitems { |x| x % 2 != 0 }  #=> 3
 */

static VALUE
rb_ary_nitems(VALUE ary)
{
    long n = 0;

    if (rb_block_given_p()) {
        long i;

        for (i=0; i<RARRAY(ary)->len; i++) {
            VALUE v = RARRAY(ary)->ptr[i];
            if (RTEST(rb_yield(v))) n++;
        }
    }
    else {
        VALUE *p = RARRAY(ary)->ptr;
        VALUE *pend = p + RARRAY(ary)->len;

        while (p < pend) {
            if (!NIL_P(*p)) n++;
            p++;
        }
    }
    return LONG2NUM(n);
}

static long
flatten(VALUE ary, long idx, VALUE ary2, VALUE memo)
{
    VALUE id;
    long i = idx;
    long n, lim = idx + RARRAY(ary2)->len;

    id = rb_obj_id(ary2);
    if (rb_ary_includes(memo, id)) {
        rb_raise(rb_eArgError, "tried to flatten recursive array");
    }
    rb_ary_push(memo, id);
    rb_ary_splice(ary, idx, 1, ary2);
    while (i < lim) {
        VALUE tmp;

        tmp = rb_check_array_type(rb_ary_elt(ary, i));
        if (!NIL_P(tmp)) {
            n = flatten(ary, i, tmp, memo);
            i += n; lim += n;
        }
        i++;
    }
    rb_ary_pop(memo);

    return lim - idx - 1;       /* returns number of increased items */
}

/*
 *  call-seq:
 *     array.flatten! -> array or nil
 *
 *  Flattens _self_ in place.
 *  Returns <code>nil</code> if no modifications were made (i.e.,
 *  <i>array</i> contains no subarrays.)
 *
 *     a = [ 1, 2, [3, [4, 5] ] ]
 *     a.flatten!   #=> [1, 2, 3, 4, 5]
 *     a.flatten!   #=> nil
 *     a            #=> [1, 2, 3, 4, 5]
 */

static VALUE
rb_ary_flatten_bang(VALUE ary)
{
    long i = 0;
    int mod = 0;
    VALUE memo = Qnil;

    while (i<RARRAY(ary)->len) {
        VALUE ary2 = RARRAY(ary)->ptr[i];
        VALUE tmp;

        tmp = rb_check_array_type(ary2);
        if (!NIL_P(tmp)) {
            if (NIL_P(memo)) {
                memo = rb_ary_new();
            }
            i += flatten(ary, i, tmp, memo);
            mod = 1;
        }
        i++;
    }
    if (mod == 0) return Qnil;
    return ary;
}

/*
 *  call-seq:
 *     array.flatten -> an_array
 *
 *  Returns a new array that is a one-dimensional flattening of this
 *  array (recursively). That is, for every element that is an array,
 *  extract its elements into the new array.
 *
 *     s = [ 1, 2, 3 ]           #=> [1, 2, 3]
 *     t = [ 4, 5, 6, [7, 8] ]   #=> [4, 5, 6, [7, 8]]
 *     a = [ s, t, 9, 10 ]       #=> [[1, 2, 3], [4, 5, 6, [7, 8]], 9, 10]
 *     a.flatten                 #=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10
 */

static VALUE
rb_ary_flatten(VALUE ary)
{
    ary = rb_ary_dup(ary);
    rb_ary_flatten_bang(ary);
    return ary;
}

/* Arrays are ordered, integer-indexed collections of any object.
 * Array indexing starts at 0, as in C or Java.  A negative index is
 * assumed to be relative to the end of the array---that is, an index of -1
 * indicates the last element of the array, -2 is the next to last
 * element in the array, and so on.
 */

void
Init_Array(void)
{
    rb_cArray  = rb_define_class("Array", rb_cObject);
    rb_include_module(rb_cArray, rb_mEnumerable);

    rb_define_alloc_func(rb_cArray, ary_alloc);
    rb_define_singleton_method(rb_cArray, "[]", rb_ary_s_create, -1);
    rb_define_method(rb_cArray, "initialize", rb_ary_initialize, -1);
    rb_define_method(rb_cArray, "initialize_copy", rb_ary_replace, 1);

    rb_define_method(rb_cArray, "to_s", rb_ary_to_s, 0);
    rb_define_method(rb_cArray, "inspect", rb_ary_inspect, 0);
    rb_define_method(rb_cArray, "to_a", rb_ary_to_a, 0);
    rb_define_method(rb_cArray, "to_ary", rb_ary_to_ary_m, 0);
    rb_define_method(rb_cArray, "frozen?",  rb_ary_frozen_p, 0);

    rb_define_method(rb_cArray, "==", rb_ary_equal, 1);
    rb_define_method(rb_cArray, "eql?", rb_ary_eql, 1);
    rb_define_method(rb_cArray, "hash", rb_ary_hash, 0);

    rb_define_method(rb_cArray, "[]", rb_ary_aref, -1);
    rb_define_method(rb_cArray, "[]=", rb_ary_aset, -1);
    rb_define_method(rb_cArray, "at", rb_ary_at, 1);
    rb_define_method(rb_cArray, "fetch", rb_ary_fetch, -1);
    rb_define_method(rb_cArray, "first", rb_ary_first, -1);
    rb_define_method(rb_cArray, "last", rb_ary_last, -1);
    rb_define_method(rb_cArray, "concat", rb_ary_concat, 1);
    rb_define_method(rb_cArray, "<<", rb_ary_push, 1);
    rb_define_method(rb_cArray, "push", rb_ary_push_m, -1);
    rb_define_method(rb_cArray, "pop", rb_ary_pop_m, -1);
    rb_define_method(rb_cArray, "shift", rb_ary_shift_m, -1);
    rb_define_method(rb_cArray, "unshift", rb_ary_unshift_m, -1);
    rb_define_method(rb_cArray, "insert", rb_ary_insert, -1);
    rb_define_method(rb_cArray, "each", rb_ary_each, 0);
    rb_define_method(rb_cArray, "each_index", rb_ary_each_index, 0);
    rb_define_method(rb_cArray, "reverse_each", rb_ary_reverse_each, 0);
    rb_define_method(rb_cArray, "length", rb_ary_length, 0);
    rb_define_alias(rb_cArray,  "size", "length");
    rb_define_method(rb_cArray, "empty?", rb_ary_empty_p, 0);
    rb_define_method(rb_cArray, "index", rb_ary_index, -1);
    rb_define_method(rb_cArray, "rindex", rb_ary_rindex, -1);
    rb_define_method(rb_cArray, "join", rb_ary_join_m, -1);
    rb_define_method(rb_cArray, "reverse", rb_ary_reverse_m, 0);
    rb_define_method(rb_cArray, "reverse!", rb_ary_reverse_bang, 0);
    rb_define_method(rb_cArray, "sort", rb_ary_sort, 0);
    rb_define_method(rb_cArray, "sort!", rb_ary_sort_bang, 0);
    rb_define_method(rb_cArray, "collect", rb_ary_collect, 0);
    rb_define_method(rb_cArray, "collect!", rb_ary_collect_bang, 0);
    rb_define_method(rb_cArray, "map", rb_ary_collect, 0);
    rb_define_method(rb_cArray, "map!", rb_ary_collect_bang, 0);
    rb_define_method(rb_cArray, "select", rb_ary_select, 0);
    rb_define_method(rb_cArray, "values_at", rb_ary_values_at, -1);
    rb_define_method(rb_cArray, "delete", rb_ary_delete, 1);
    rb_define_method(rb_cArray, "delete_at", rb_ary_delete_at_m, 1);
    rb_define_method(rb_cArray, "delete_if", rb_ary_delete_if, 0);
    rb_define_method(rb_cArray, "reject", rb_ary_reject, 0);
    rb_define_method(rb_cArray, "reject!", rb_ary_reject_bang, 0);
    rb_define_method(rb_cArray, "zip", rb_ary_zip, -1);
    rb_define_method(rb_cArray, "transpose", rb_ary_transpose, 0);
    rb_define_method(rb_cArray, "replace", rb_ary_replace, 1);
    rb_define_method(rb_cArray, "clear", rb_ary_clear, 0);
    rb_define_method(rb_cArray, "fill", rb_ary_fill, -1);
    rb_define_method(rb_cArray, "include?", rb_ary_includes, 1);
    rb_define_method(rb_cArray, "<=>", rb_ary_cmp, 1);

    rb_define_method(rb_cArray, "slice", rb_ary_aref, -1);
    rb_define_method(rb_cArray, "slice!", rb_ary_slice_bang, -1);

    rb_define_method(rb_cArray, "assoc", rb_ary_assoc, 1);
    rb_define_method(rb_cArray, "rassoc", rb_ary_rassoc, 1);

    rb_define_method(rb_cArray, "+", rb_ary_plus, 1);
    rb_define_method(rb_cArray, "*", rb_ary_times, 1);

    rb_define_method(rb_cArray, "-", rb_ary_diff, 1);
    rb_define_method(rb_cArray, "&", rb_ary_and, 1);
    rb_define_method(rb_cArray, "|", rb_ary_or, 1);

    rb_define_method(rb_cArray, "uniq", rb_ary_uniq, 0);
    rb_define_method(rb_cArray, "uniq!", rb_ary_uniq_bang, 0);
    rb_define_method(rb_cArray, "compact", rb_ary_compact, 0);
    rb_define_method(rb_cArray, "compact!", rb_ary_compact_bang, 0);
    rb_define_method(rb_cArray, "flatten", rb_ary_flatten, 0);
    rb_define_method(rb_cArray, "flatten!", rb_ary_flatten_bang, 0);
    rb_define_method(rb_cArray, "nitems", rb_ary_nitems, 0);

    id_cmp = rb_intern("<=>");

    rb_cValues  = rb_define_class("Values", rb_cArray);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ascii.c

root/ascii.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. ascii_is_code_ctype
/**********************************************************************
  ascii.c -  Oniguruma (regular expression library)
**********************************************************************/
/*-
 * Copyright (c) 2002-2004  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#include "regenc.h"

static int
ascii_is_code_ctype(OnigCodePoint code, unsigned int ctype)
{
  if (code < 128)
    return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
  else
    return FALSE;
}

OnigEncodingType OnigEncodingASCII = {
  onigenc_single_byte_mbc_enc_len,
  "US-ASCII",  /* name */
  1,           /* max byte length */
  1,           /* min byte length */
  ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE,
  {
      (OnigCodePoint )'\\'                       /* esc */
    , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.'  */
    , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*'  */
    , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
    , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
    , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
  },
  onigenc_is_mbc_newline_0x0a,
  onigenc_single_byte_mbc_to_code,
  onigenc_single_byte_code_to_mbclen,
  onigenc_single_byte_code_to_mbc,
  onigenc_ascii_mbc_to_normalize,
  onigenc_ascii_is_mbc_ambiguous,
  onigenc_ascii_get_all_pair_ambig_codes,
  onigenc_nothing_get_all_comp_ambig_codes,
  ascii_is_code_ctype,
  onigenc_not_support_get_ctype_code_range,
  onigenc_single_byte_left_adjust_char_head,
  onigenc_always_true_is_allowed_reverse_match
};
/* [<][>][^][v] [top][bottom][index] [help] */


bignum.c

root/bignum.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. bignew_1
  2. rb_big_clone
  3. get2comp
  4. rb_big_2comp
  5. bignorm
  6. rb_big_norm
  7. rb_uint2big
  8. rb_int2big
  9. rb_uint2inum
  10. rb_int2inum
  11. rb_quad_pack
  12. rb_quad_unpack
  13. rb_quad_pack
  14. rb_quad_unpack
  15. rb_cstr_to_inum
  16. rb_str_to_inum
  17. rb_ull2big
  18. rb_ll2big
  19. rb_ull2inum
  20. rb_ll2inum
  21. rb_cstr2inum
  22. rb_str2inum
  23. rb_big2str
  24. rb_big_to_s
  25. big2ulong
  26. rb_big2ulong_pack
  27. rb_big2ulong
  28. rb_big2long
  29. big2ull
  30. rb_big2ull
  31. rb_big2ll
  32. dbl2big
  33. rb_dbl2big
  34. rb_big2dbl
  35. rb_big_to_f
  36. rb_big_cmp
  37. rb_big_eq
  38. rb_big_eql
  39. rb_big_uminus
  40. rb_big_neg
  41. bigsub
  42. bigadd
  43. rb_big_plus
  44. rb_big_minus
  45. rb_big_mul0
  46. rb_big_mul
  47. bigdivrem
  48. bigdivmod
  49. rb_big_div
  50. rb_big_modulo
  51. rb_big_remainder
  52. rb_big_divmod
  53. rb_big_quo
  54. rb_big_pow
  55. rb_big_and
  56. rb_big_or
  57. rb_big_xor
  58. rb_big_lshift
  59. rb_big_rshift
  60. rb_big_aref
  61. rb_big_hash
  62. rb_big_coerce
  63. rb_big_abs
  64. rb_big_size
  65. Init_Bignum
/**********************************************************************

  bignum.c -

  $Author: akr $
  $Date: 2005/12/16 18:59:01 $
  created at: Fri Jun 10 00:48:55 JST 1994

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#include "ruby.h"

#include <math.h>
#include <ctype.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif

VALUE rb_cBignum;

#if defined __MINGW32__
#define USHORT _USHORT
#endif

#define BDIGITS(x) ((BDIGIT*)RBIGNUM(x)->digits)
#define BITSPERDIG (SIZEOF_BDIGITS*CHAR_BIT)
#define BIGRAD ((BDIGIT_DBL)1 << BITSPERDIG)
#define DIGSPERLONG ((unsigned int)(SIZEOF_LONG/SIZEOF_BDIGITS))
#if HAVE_LONG_LONG
# define DIGSPERLL ((unsigned int)(SIZEOF_LONG_LONG/SIZEOF_BDIGITS))
#endif
#define BIGUP(x) ((BDIGIT_DBL)(x) << BITSPERDIG)
#define BIGDN(x) RSHIFT(x,BITSPERDIG)
#define BIGLO(x) ((BDIGIT)((x) & (BIGRAD-1)))
#define BDIGMAX ((BDIGIT)-1)

#define BIGZEROP(x) (RBIGNUM(x)->len == 0 || (RBIGNUM(x)->len == 1 && BDIGITS(x)[0] == 0))

static VALUE
bignew_1(VALUE klass, long len, int sign)
{
    NEWOBJ(big, struct RBignum);
    OBJSETUP(big, klass, T_BIGNUM);
    big->sign = sign?1:0;
    big->len = len;
    big->digits = ALLOC_N(BDIGIT, len);

    return (VALUE)big;
}

#define bignew(len,sign) bignew_1(rb_cBignum,len,sign)

VALUE
rb_big_clone(VALUE x)
{
    VALUE z = bignew_1(CLASS_OF(x), RBIGNUM(x)->len, RBIGNUM(x)->sign);

    MEMCPY(BDIGITS(z), BDIGITS(x), BDIGIT, RBIGNUM(x)->len);
    return z;
}

/* modify a bignum by 2's complement */
static void
get2comp(VALUE x)
{
    long i = RBIGNUM(x)->len;
    BDIGIT *ds = BDIGITS(x);
    BDIGIT_DBL num;

    while (i--) ds[i] = ~ds[i];
    i = 0; num = 1;
    do {
        num += ds[i];
        ds[i++] = BIGLO(num);
        num = BIGDN(num);
    } while (i < RBIGNUM(x)->len);
    if (num != 0) {
        REALLOC_N(RBIGNUM(x)->digits, BDIGIT, ++RBIGNUM(x)->len);
        ds = BDIGITS(x);
        ds[RBIGNUM(x)->len-1] = 1;
    }
}

void
rb_big_2comp(VALUE x)                   /* get 2's complement */
{
    get2comp(x);
}

static VALUE
bignorm(VALUE x)
{
    if (!FIXNUM_P(x)) {
        long len = RBIGNUM(x)->len;
        BDIGIT *ds = BDIGITS(x);

        while (len-- && !ds[len]) ;
        RBIGNUM(x)->len = ++len;

        if (len*SIZEOF_BDIGITS <= sizeof(VALUE)) {
            long num = 0;
            while (len--) {
                num = BIGUP(num) + ds[len];
            }
            if (num >= 0) {
                if (RBIGNUM(x)->sign) {
                    if (POSFIXABLE(num)) return LONG2FIX(num);
                }
                else if (NEGFIXABLE(-(long)num)) return LONG2FIX(-(long)num);
            }
        }
    }
    return x;
}

VALUE
rb_big_norm(VALUE x)
{
    return bignorm(x);
}

VALUE
rb_uint2big(unsigned long n)
{
    BDIGIT_DBL num = n;
    long i = 0;
    BDIGIT *digits;
    VALUE big;

    big = bignew(DIGSPERLONG, 1);
    digits = BDIGITS(big);
    while (i < DIGSPERLONG) {
        digits[i++] = BIGLO(num);
        num = BIGDN(num);
    }

    i = DIGSPERLONG;
    while (--i && !digits[i]) ;
    RBIGNUM(big)->len = i+1;
    return big;
}

VALUE
rb_int2big(long n)
{
    long neg = 0;
    VALUE big;

    if (n < 0) {
        n = -n;
        neg = 1;
    }
    big = rb_uint2big(n);
    if (neg) {
        RBIGNUM(big)->sign = 0;
    }
    return big;
}

VALUE
rb_uint2inum(unsigned long n)
{
    if (POSFIXABLE(n)) return LONG2FIX(n);
    return rb_uint2big(n);
}

VALUE
rb_int2inum(long n)
{
    if (FIXABLE(n)) return LONG2FIX(n);
    return rb_int2big(n);
}

#ifdef HAVE_LONG_LONG

void
rb_quad_pack(char *buf, VALUE val)
{
    LONG_LONG q;

    val = rb_to_int(val);
    if (FIXNUM_P(val)) {
        q = FIX2LONG(val);
    }
    else {
        long len = RBIGNUM(val)->len;
        BDIGIT *ds;

        if (len > SIZEOF_LONG_LONG/SIZEOF_BDIGITS) {
            len = SIZEOF_LONG/SIZEOF_BDIGITS;
        }
        ds = BDIGITS(val);
        q = 0;
        while (len--) {
            q = BIGUP(q);
            q += ds[len];
        }
        if (!RBIGNUM(val)->sign) q = -q;
    }
    memcpy(buf, (char*)&q, SIZEOF_LONG_LONG);
}

VALUE
rb_quad_unpack(const char *buf, int sign)
{
    unsigned LONG_LONG q;
    long neg = 0;
    long i;
    BDIGIT *digits;
    VALUE big;

    memcpy(&q, buf, SIZEOF_LONG_LONG);
    if (sign) {
        if (FIXABLE((LONG_LONG)q)) return LONG2FIX((LONG_LONG)q);
        if ((LONG_LONG)q < 0) {
            q = -(LONG_LONG)q;
            neg = 1;
        }
    }
    else {
        if (POSFIXABLE(q)) return LONG2FIX(q);
    }

    i = 0;
    big = bignew(DIGSPERLL, 1);
    digits = BDIGITS(big);
    while (i < DIGSPERLL) {
        digits[i++] = BIGLO(q);
        q = BIGDN(q);
    }

    i = DIGSPERLL;
    while (i-- && !digits[i]) ;
    RBIGNUM(big)->len = i+1;

    if (neg) {
        RBIGNUM(big)->sign = 0;
    }
    return bignorm(big);
}

#else

#define QUAD_SIZE 8

void
rb_quad_pack(buf, val)
    char *buf;
    VALUE val;
{
    long len;

    memset(buf, 0, QUAD_SIZE);
    val = rb_to_int(val);
    if (FIXNUM_P(val)) {
        val = rb_int2big(FIX2LONG(val));
    }
    len = RBIGNUM(val)->len * SIZEOF_BDIGITS;
    if (len > QUAD_SIZE) {
        rb_raise(rb_eRangeError, "bignum too big to convert into `quad int'");
    }
    memcpy(buf, (char*)BDIGITS(val), len);
    if (!RBIGNUM(val)->sign) {
        len = QUAD_SIZE;
        while (len--) {
            *buf = ~*buf;
            buf++;
        }
    }
}

#define BNEG(b) (RSHIFT(((BDIGIT*)b)[QUAD_SIZE/SIZEOF_BDIGITS-1],BITSPERDIG-1) != 0)

VALUE
rb_quad_unpack(buf, sign)
    const char *buf;
    int sign;
{
    VALUE big = bignew(QUAD_SIZE/SIZEOF_BDIGITS, 1);

    memcpy((char*)BDIGITS(big), buf, QUAD_SIZE);
    if (sign && BNEG(buf)) {
        long len = QUAD_SIZE;
        char *tmp = (char*)BDIGITS(big);

        RBIGNUM(big)->sign = 0;
        while (len--) {
            *tmp = ~*tmp;
            tmp++;
        }
    }

    return bignorm(big);
}

#endif

VALUE
rb_cstr_to_inum(const char *str, int base, int badcheck)
{
    const char *s = str;
    char *end;
    char sign = 1, nondigit = 0;
    int c;
    BDIGIT_DBL num;
    long len, blen = 1;
    long i;
    VALUE z;
    BDIGIT *zds;

    if (!str) {
        if (badcheck) goto bad;
        return INT2FIX(0);
    }
    if (badcheck) {
        while (ISSPACE(*str)) str++;
    }
    else {
        while (ISSPACE(*str) || *str == '_') str++;
    }

    if (str[0] == '+') {
        str++;
    }
    else if (str[0] == '-') {
        str++;
        sign = 0;
    }
    if (str[0] == '+' || str[0] == '-') {
        if (badcheck) goto bad;
        return INT2FIX(0);
    }
    if (base <= 0) {
        if (str[0] == '0') {
            switch (str[1]) {
              case 'x': case 'X':
                base = 16;
                break;
              case 'b': case 'B':
                base = 2;
                break;
              case 'o': case 'O':
                base = 8;
                break;
              case 'd': case 'D':
                base = 10;
                break;
              default:
                base = 8;
            }
        }
        else if (base < -1) {
            base = -base;
        }
        else {
            base = 10;
        }
    }
    switch (base) {
      case 2:
        len = 1;
        if (str[0] == '0' && (str[1] == 'b'||str[1] == 'B')) {
            str += 2;
        }
        break;
      case 3:
        len = 2;
        break;
      case 8:
        if (str[0] == '0' && (str[1] == 'o'||str[1] == 'O')) {
            str += 2;
        }
      case 4: case 5: case 6: case 7:
        len = 3;
        break;
      case 10:
        if (str[0] == '0' && (str[1] == 'd'||str[1] == 'D')) {
            str += 2;
        }
      case 9: case 11: case 12: case 13: case 14: case 15:
        len = 4;
        break;
      case 16:
        len = 4;
        if (str[0] == '0' && (str[1] == 'x'||str[1] == 'X')) {
            str += 2;
        }
        break;
      default:
        if (base < 2 || 36 < base) {
            rb_raise(rb_eArgError, "illegal radix %d", base);
        }
        if (base <= 32) {
            len = 5;
        }
        else {
            len = 6;
        }
        break;
    }
    if (*str == '0') {          /* squeeze preceeding 0s */
        while (*++str == '0');
        --str;
    }
    len *= strlen(str)*sizeof(char);

    if (len <= (sizeof(VALUE)*CHAR_BIT)) {
        unsigned long val = strtoul((char*)str, &end, base);

        if (*end == '_') goto bigparse;
        if (badcheck) {
            if (end == str) goto bad; /* no number */
            while (*end && ISSPACE(*end)) end++;
            if (*end) goto bad;       /* trailing garbage */
        }

        if (POSFIXABLE(val)) {
            if (sign) return LONG2FIX(val);
            else {
                long result = -(long)val;
                return LONG2FIX(result);
            }
        }
        else {
            VALUE big = rb_uint2big(val);
            RBIGNUM(big)->sign = sign;
            return bignorm(big);
        }
    }
  bigparse:
    len = (len/BITSPERDIG)+1;
    if (badcheck && *str == '_') goto bad;

    z = bignew(len, sign);
    zds = BDIGITS(z);
    for (i=len;i--;) zds[i]=0;
    while (c = *str++) {
        if (c == '_') {
            if (badcheck) {
                if (nondigit) goto bad;
                nondigit = c;
            }
            continue;
        }
        else if (!ISASCII(c)) {
            break;
        }
        else if (isdigit(c)) {
            c -= '0';
        }
        else if (islower(c)) {
            c -= 'a' - 10;
        }
        else if (isupper(c)) {
            c -= 'A' - 10;
        }
        else {
            break;
        }
        if (c >= base) break;
        nondigit = 0;
        i = 0;
        num = c;
        for (;;) {
            while (i<blen) {
                num += (BDIGIT_DBL)zds[i]*base;
                zds[i++] = BIGLO(num);
                num = BIGDN(num);
            }
            if (num) {
                blen++;
                continue;
            }
            break;
        }
    }
    if (badcheck) {
        str--;
        if (s+1 < str && str[-1] == '_') goto bad;
        while (*str && ISSPACE(*str)) str++;
        if (*str) {
          bad:
            rb_invalid_str(s, "Integer");
        }
    }

    return bignorm(z);
}

VALUE
rb_str_to_inum(VALUE str, int base, int badcheck)
{
    char *s;
    long len;

    StringValue(str);
    if (badcheck) {
        s = StringValueCStr(str);
    }
    else {
        s = RSTRING(str)->ptr;
    }
    if (s) {
        len = RSTRING(str)->len;
        if (s[len]) {           /* no sentinel somehow */
            char *p = ALLOCA_N(char, len+1);

            MEMCPY(p, s, char, len);
            p[len] = '\0';
            s = p;
        }
    }
    return rb_cstr_to_inum(s, base, badcheck);
}

#if HAVE_LONG_LONG

VALUE
rb_ull2big(unsigned LONG_LONG n)
{
    BDIGIT_DBL num = n;
    long i = 0;
    BDIGIT *digits;
    VALUE big;

    big = bignew(DIGSPERLL, 1);
    digits = BDIGITS(big);
    while (i < DIGSPERLL) {
        digits[i++] = BIGLO(num);
        num = BIGDN(num);
    }

    i = DIGSPERLL;
    while (i-- && !digits[i]) ;
    RBIGNUM(big)->len = i+1;
    return big;
}

VALUE
rb_ll2big(LONG_LONG n)
{
    long neg = 0;
    VALUE big;

    if (n < 0) {
        n = -n;
        neg = 1;
    }
    big = rb_ull2big(n);
    if (neg) {
        RBIGNUM(big)->sign = 0;
    }
    return big;
}

VALUE
rb_ull2inum(unsigned LONG_LONG n)
{
    if (POSFIXABLE(n)) return LONG2FIX(n);
    return rb_ull2big(n);
}

VALUE
rb_ll2inum(LONG_LONG n)
{
    if (FIXABLE(n)) return LONG2FIX(n);
    return rb_ll2big(n);
}

#endif  /* HAVE_LONG_LONG */

VALUE
rb_cstr2inum(const char *str, int base)
{
    return rb_cstr_to_inum(str, base, base==0);
}

VALUE
rb_str2inum(VALUE str, int base)
{
    return rb_str_to_inum(str, base, base==0);
}

const char ruby_digitmap[] = "0123456789abcdefghijklmnopqrstuvwxyz";
VALUE
rb_big2str(VALUE x, int base)
{
    volatile VALUE t;
    BDIGIT *ds;
    long i, j, hbase;
    VALUE ss;
    char *s, c;

    if (FIXNUM_P(x)) {
        return rb_fix2str(x, base);
    }
    i = RBIGNUM(x)->len;
    if (BIGZEROP(x)) {
        return rb_str_new2("0");
    }
    j = SIZEOF_BDIGITS*CHAR_BIT*i;
    switch (base) {
      case 2: break;
      case 3:
        j = j * 647L / 1024;
        break;
      case 4: case 5: case 6: case 7:
        j /= 2;
        break;
      case 8: case 9:
        j /= 3;
        break;
      case 10: case 11: case 12: case 13: case 14: case 15:
        j = j * 241L / 800;
        break;
      case 16: case 17: case 18: case 19: case 20: case 21:
      case 22: case 23: case 24: case 25: case 26: case 27:
      case 28: case 29: case 30: case 31:
        j /= 4;
        break;
      case 32: case 33: case 34: case 35: case 36:
        j /= 5;
        break;
      default:
        rb_raise(rb_eArgError, "illegal radix %d", base);
        break;
    }
    j += 2;

    hbase = base * base;
#if SIZEOF_BDIGITS > 2
    hbase *= hbase;
#endif

    t = rb_big_clone(x);
    ds = BDIGITS(t);
    ss = rb_str_new(0, j);
    s = RSTRING(ss)->ptr;

    s[0] = RBIGNUM(x)->sign ? '+' : '-';
    while (i && j) {
        long k = i;
        BDIGIT_DBL num = 0;

        while (k--) {
            num = BIGUP(num) + ds[k];
            ds[k] = (BDIGIT)(num / hbase);
            num %= hbase;
        }
        if (ds[i-1] == 0) i--;
        k = SIZEOF_BDIGITS;
        while (k--) {
            c = (char)(num % base);
            s[--j] = ruby_digitmap[(int)c];
            num /= base;
            if (i == 0 && num == 0) break;
        }
    }
    while (s[j] == '0') j++;
    RSTRING(ss)->len -= RBIGNUM(x)->sign?j:j-1;
    memmove(RBIGNUM(x)->sign?s:s+1, s+j, RSTRING(ss)->len);
    s[RSTRING(ss)->len] = '\0';

    return ss;
}

/*
 *  call-seq:
 *     big.to_s(base=10)   =>  string
 *
 *  Returns a string containing the representation of <i>big</i> radix
 *  <i>base</i> (2 through 36).
 *
 *     12345654321.to_s         #=> "12345654321"
 *     12345654321.to_s(2)      #=> "1011011111110110111011110000110001"
 *     12345654321.to_s(8)      #=> "133766736061"
 *     12345654321.to_s(16)     #=> "2dfdbbc31"
 *     78546939656932.to_s(36)  #=> "rubyrules"
 */

static VALUE
rb_big_to_s(int argc, VALUE *argv, VALUE x)
{
    VALUE b;
    int base;

    rb_scan_args(argc, argv, "01", &b);
    if (argc == 0) base = 10;
    else base = NUM2INT(b);
    return rb_big2str(x, base);
}

static unsigned long
big2ulong(VALUE x, const char *type, int check)
{
    long len = RBIGNUM(x)->len;
    BDIGIT_DBL num;
    BDIGIT *ds;

    if (len > SIZEOF_LONG/SIZEOF_BDIGITS) {
        if (check)
            rb_raise(rb_eRangeError, "bignum too big to convert into `%s'", type);
        len = SIZEOF_LONG/SIZEOF_BDIGITS;
    }
    ds = BDIGITS(x);
    num = 0;
    while (len--) {
        num = BIGUP(num);
        num += ds[len];
    }
    return num;
}

unsigned long
rb_big2ulong_pack(VALUE x)
{
    unsigned long num = big2ulong(x, "unsigned long", Qfalse);
    if (!RBIGNUM(x)->sign) {
        return -num;
    }
    return num;
}

unsigned long
rb_big2ulong(VALUE x)
{
    unsigned long num = big2ulong(x, "unsigned long", Qtrue);

    if (!RBIGNUM(x)->sign) {
        if ((long)num < 0) {
            rb_raise(rb_eRangeError, "bignum out of range of unsigned long");
        }
        return -num;
    }
    return num;
}

long
rb_big2long(VALUE x)
{
    unsigned long num = big2ulong(x, "long", Qtrue);

    if ((long)num < 0 && (RBIGNUM(x)->sign || (long)num != LONG_MIN)) {
        rb_raise(rb_eRangeError, "bignum too big to convert into `long'");
    }
    if (!RBIGNUM(x)->sign) return -(long)num;
    return num;
}

#if HAVE_LONG_LONG

static unsigned LONG_LONG
big2ull(VALUE x, const char *type)
{
    long len = RBIGNUM(x)->len;
    BDIGIT_DBL num;
    BDIGIT *ds;

    if (len > SIZEOF_LONG_LONG/SIZEOF_BDIGITS)
        rb_raise(rb_eRangeError, "bignum too big to convert into `%s'", type);
    ds = BDIGITS(x);
    num = 0;
    while (len--) {
        num = BIGUP(num);
        num += ds[len];
    }
    return num;
}

unsigned LONG_LONG
rb_big2ull(VALUE x)
{
    unsigned LONG_LONG num = big2ull(x, "unsigned long long");

    if (!RBIGNUM(x)->sign) return -num;
    return num;
}

LONG_LONG
rb_big2ll(VALUE x)
{
    unsigned LONG_LONG num = big2ull(x, "long long");

    if ((LONG_LONG)num < 0 && (RBIGNUM(x)->sign
                               || (LONG_LONG)num != LLONG_MIN)) {
        rb_raise(rb_eRangeError, "bignum too big to convert into `long long'");
    }
    if (!RBIGNUM(x)->sign) return -(LONG_LONG)num;
    return num;
}

#endif  /* HAVE_LONG_LONG */

static VALUE
dbl2big(double d)
{
    long i = 0;
    BDIGIT c;
    BDIGIT *digits;
    VALUE z;
    double u = (d < 0)?-d:d;

    if (isinf(d)) {
        rb_raise(rb_eFloatDomainError, d < 0 ? "-Infinity" : "Infinity");
    }
    if (isnan(d)) {
        rb_raise(rb_eFloatDomainError, "NaN");
    }

    while (!POSFIXABLE(u) || 0 != (long)u) {
        u /= (double)(BIGRAD);
        i++;
    }
    z = bignew(i, d>=0);
    digits = BDIGITS(z);
    while (i--) {
        u *= BIGRAD;
        c = (BDIGIT)u;
        u -= c;
        digits[i] = c;
    }

    return z;
}

VALUE
rb_dbl2big(double d)
{
    return bignorm(dbl2big(d));
}

double
rb_big2dbl(VALUE x)
{
    double d = 0.0;
    long i = RBIGNUM(x)->len;
    BDIGIT *ds = BDIGITS(x);

    while (i--) {
        d = ds[i] + BIGRAD*d;
    }
    if (isinf(d)) {
        rb_warn("Bignum out of Float range");
        d = HUGE_VAL;
    }
    if (!RBIGNUM(x)->sign) d = -d;
    return d;
}

/*
 *  call-seq:
 *     big.to_f -> float
 *
 *  Converts <i>big</i> to a <code>Float</code>. If <i>big</i> doesn't
 *  fit in a <code>Float</code>, the result is infinity.
 *
 */

static VALUE
rb_big_to_f(VALUE x)
{
    return rb_float_new(rb_big2dbl(x));
}

/*
 *  call-seq:
 *     big <=> numeric   => -1, 0, +1
 *
 *  Comparison---Returns -1, 0, or +1 depending on whether <i>big</i> is
 *  less than, equal to, or greater than <i>numeric</i>. This is the
 *  basis for the tests in <code>Comparable</code>.
 *
 */

VALUE
rb_big_cmp(VALUE x, VALUE y)
{
    long xlen = RBIGNUM(x)->len;

    switch (TYPE(y)) {
      case T_FIXNUM:
        y = rb_int2big(FIX2LONG(y));
        break;

      case T_BIGNUM:
        break;

      case T_FLOAT:
        return rb_dbl_cmp(rb_big2dbl(x), RFLOAT(y)->value);

      default:
        return rb_num_coerce_cmp(x, y);
    }

    if (RBIGNUM(x)->sign > RBIGNUM(y)->sign) return INT2FIX(1);
    if (RBIGNUM(x)->sign < RBIGNUM(y)->sign) return INT2FIX(-1);
    if (xlen < RBIGNUM(y)->len)
        return (RBIGNUM(x)->sign) ? INT2FIX(-1) : INT2FIX(1);
    if (xlen > RBIGNUM(y)->len)
        return (RBIGNUM(x)->sign) ? INT2FIX(1) : INT2FIX(-1);

    while(xlen-- && (BDIGITS(x)[xlen]==BDIGITS(y)[xlen]));
    if (-1 == xlen) return INT2FIX(0);
    return (BDIGITS(x)[xlen] > BDIGITS(y)[xlen]) ?
        (RBIGNUM(x)->sign ? INT2FIX(1) : INT2FIX(-1)) :
            (RBIGNUM(x)->sign ? INT2FIX(-1) : INT2FIX(1));
}

/*
 *  call-seq:
 *     big == obj  => true or false
 *
 *  Returns <code>true</code> only if <i>obj</i> has the same value
 *  as <i>big</i>. Contrast this with <code>Bignum#eql?</code>, which
 *  requires <i>obj</i> to be a <code>Bignum</code>.
 *
 *     68719476736 == 68719476736.0   #=> true
 */

VALUE
rb_big_eq(VALUE x, VALUE y)
{
    switch (TYPE(y)) {
      case T_FIXNUM:
        y = rb_int2big(FIX2LONG(y));
        break;
      case T_BIGNUM:
        break;
      case T_FLOAT:
        {
            volatile double a, b;

            a = RFLOAT(y)->value;
            if (isnan(a)) return Qfalse;
            b = rb_big2dbl(x);
            return (a == b)?Qtrue:Qfalse;
        }
      default:
        return rb_equal(y, x);
    }
    if (RBIGNUM(x)->sign != RBIGNUM(y)->sign) return Qfalse;
    if (RBIGNUM(x)->len != RBIGNUM(y)->len) return Qfalse;
    if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM(y)->len) != 0) return Qfalse;
    return Qtrue;
}

/*
 *  call-seq:
 *     big.eql?(obj)   => true or false
 *
 *  Returns <code>true</code> only if <i>obj</i> is a
 *  <code>Bignum</code> with the same value as <i>big</i>. Contrast this
 *  with <code>Bignum#==</code>, which performs type conversions.
 *
 *     68719476736.eql?(68719476736.0)   #=> false
 */

static VALUE
rb_big_eql(VALUE x, VALUE y)
{
    if (TYPE(y) != T_BIGNUM) return Qfalse;
    if (RBIGNUM(x)->sign != RBIGNUM(y)->sign) return Qfalse;
    if (RBIGNUM(x)->len != RBIGNUM(y)->len) return Qfalse;
    if (MEMCMP(BDIGITS(x),BDIGITS(y),BDIGIT,RBIGNUM(y)->len) != 0) return Qfalse;
    return Qtrue;
}

/*
 * call-seq:
 *    -big   =>  other_big
 *
 * Unary minus (returns a new Bignum whose value is 0-big)
 */

static VALUE
rb_big_uminus(VALUE x)
{
    VALUE z = rb_big_clone(x);

    RBIGNUM(z)->sign = !RBIGNUM(x)->sign;

    return bignorm(z);
}

/*
 * call-seq:
 *     ~big  =>  integer
 *
 * Inverts the bits in big. As Bignums are conceptually infinite
 * length, the result acts as if it had an infinite number of one
 * bits to the left. In hex representations, this is displayed
 * as two periods to the left of the digits.
 *
 *   sprintf("%X", ~0x1122334455)    #=> "..FEEDDCCBBAA"
 */

static VALUE
rb_big_neg(VALUE x)
{
    VALUE z = rb_big_clone(x);
    BDIGIT *ds;
    long i;

    if (!RBIGNUM(x)->sign) get2comp(z);
    ds = BDIGITS(z);
    i = RBIGNUM(x)->len;
    while (i--) {
        ds[i] = ~ds[i];
    }
    RBIGNUM(z)->sign = !RBIGNUM(z)->sign;
    if (RBIGNUM(x)->sign) get2comp(z);

    return bignorm(z);
}

static VALUE
bigsub(VALUE x, VALUE y)
{
    VALUE z = 0;
    BDIGIT *zds;
    BDIGIT_DBL_SIGNED num;
    long i = RBIGNUM(x)->len;

    /* if x is larger than y, swap */
    if (RBIGNUM(x)->len < RBIGNUM(y)->len) {
        z = x; x = y; y = z;    /* swap x y */
    }
    else if (RBIGNUM(x)->len == RBIGNUM(y)->len) {
        while (i > 0) {
            i--;
            if (BDIGITS(x)[i] > BDIGITS(y)[i]) {
                break;
            }
            if (BDIGITS(x)[i] < BDIGITS(y)[i]) {
                z = x; x = y; y = z;    /* swap x y */
                break;
            }
        }
    }

    z = bignew(RBIGNUM(x)->len, z==0);
    zds = BDIGITS(z);

    for (i = 0, num = 0; i < RBIGNUM(y)->len; i++) {
        num += (BDIGIT_DBL_SIGNED)BDIGITS(x)[i] - BDIGITS(y)[i];
        zds[i] = BIGLO(num);
        num = BIGDN(num);
    }
    while (num && i < RBIGNUM(x)->len) {
        num += BDIGITS(x)[i];
        zds[i++] = BIGLO(num);
        num = BIGDN(num);
    }
    while (i < RBIGNUM(x)->len) {
        zds[i] = BDIGITS(x)[i];
        i++;
    }

    return z;
}

static VALUE
bigadd(VALUE x, VALUE y, int sign)
{
    VALUE z;
    BDIGIT_DBL num;
    long i, len;

    sign = (sign == RBIGNUM(y)->sign);
    if (RBIGNUM(x)->sign != sign) {
        if (sign) return bigsub(y, x);
        return bigsub(x, y);
    }

    if (RBIGNUM(x)->len > RBIGNUM(y)->len) {
        len = RBIGNUM(x)->len + 1;
        z = x; x = y; y = z;
    }
    else {
        len = RBIGNUM(y)->len + 1;
    }
    z = bignew(len, sign);

    len = RBIGNUM(x)->len;
    for (i = 0, num = 0; i < len; i++) {
        num += (BDIGIT_DBL)BDIGITS(x)[i] + BDIGITS(y)[i];
        BDIGITS(z)[i] = BIGLO(num);
        num = BIGDN(num);
    }
    len = RBIGNUM(y)->len;
    while (num && i < len) {
        num += BDIGITS(y)[i];
        BDIGITS(z)[i++] = BIGLO(num);
        num = BIGDN(num);
    }
    while (i < len) {
        BDIGITS(z)[i] = BDIGITS(y)[i];
        i++;
    }
    BDIGITS(z)[i] = (BDIGIT)num;

    return z;
}

/*
 *  call-seq:
 *     big + other  => Numeric
 *
 *  Adds big and other, returning the result.
 */

VALUE
rb_big_plus(VALUE x, VALUE y)
{
    switch (TYPE(y)) {
      case T_FIXNUM:
        y = rb_int2big(FIX2LONG(y));
        /* fall through */
      case T_BIGNUM:
        return bignorm(bigadd(x, y, 1));

      case T_FLOAT:
        return rb_float_new(rb_big2dbl(x) + RFLOAT(y)->value);

      default:
        return rb_num_coerce_bin(x, y);
    }
}

/*
 *  call-seq:
 *     big - other  => Numeric
 *
 *  Subtracts other from big, returning the result.
 */

VALUE
rb_big_minus(VALUE x, VALUE y)
{
    switch (TYPE(y)) {
      case T_FIXNUM:
        y = rb_int2big(FIX2LONG(y));
        /* fall through */
      case T_BIGNUM:
        return bignorm(bigadd(x, y, 0));

      case T_FLOAT:
        return rb_float_new(rb_big2dbl(x) - RFLOAT(y)->value);

      default:
        return rb_num_coerce_bin(x, y);
    }
}

static VALUE
rb_big_mul0(VALUE x, VALUE y)
{
    long i, j;
    BDIGIT_DBL n = 0;
    VALUE z;
    BDIGIT *zds;

    switch (TYPE(y)) {
      case T_FIXNUM:
        y = rb_int2big(FIX2LONG(y));
        break;

      case T_BIGNUM:
        break;

      case T_FLOAT:
        return rb_float_new(rb_big2dbl(x) * RFLOAT(y)->value);

      default:
        return rb_num_coerce_bin(x, y);
    }

    j = RBIGNUM(x)->len + RBIGNUM(y)->len + 1;
    z = bignew(j, RBIGNUM(x)->sign==RBIGNUM(y)->sign);
    zds = BDIGITS(z);
    while (j--) zds[j] = 0;
    for (i = 0; i < RBIGNUM(x)->len; i++) {
        BDIGIT_DBL dd = BDIGITS(x)[i];
        if (dd == 0) continue;
        n = 0;
        for (j = 0; j < RBIGNUM(y)->len; j++) {
            BDIGIT_DBL ee = n + (BDIGIT_DBL)dd * BDIGITS(y)[j];
            n = zds[i + j] + ee;
            if (ee) zds[i + j] = BIGLO(n);
            n = BIGDN(n);
        }
        if (n) {
            zds[i + j] = n;
        }
    }
    return z;
}

/*
 *  call-seq:
 *     big * other  => Numeric
 *
 *  Multiplies big and other, returning the result.
 */

VALUE
rb_big_mul(VALUE x, VALUE y)
{
    return bignorm(rb_big_mul0(x, y));
}

static void
bigdivrem(VALUE x, VALUE y, VALUE *divp, VALUE *modp)
{
    long nx = RBIGNUM(x)->len, ny = RBIGNUM(y)->len;
    long i, j;
    VALUE yy, z;
    BDIGIT *xds, *yds, *zds, *tds;
    BDIGIT_DBL t2;
    BDIGIT_DBL_SIGNED num;
    BDIGIT dd, q;

    if (BIGZEROP(y)) rb_num_zerodiv();
    yds = BDIGITS(y);
    if (nx < ny || (nx == ny && BDIGITS(x)[nx - 1] < BDIGITS(y)[ny - 1])) {
        if (divp) *divp = rb_int2big(0);
        if (modp) *modp = x;
        return;
    }
    xds = BDIGITS(x);
    if (ny == 1) {
        dd = yds[0];
        z = rb_big_clone(x);
        zds = BDIGITS(z);
        t2 = 0; i = nx;
        while (i--) {
            t2 = BIGUP(t2) + zds[i];
            zds[i] = (BDIGIT)(t2 / dd);
            t2 %= dd;
        }
        RBIGNUM(z)->sign = RBIGNUM(x)->sign==RBIGNUM(y)->sign;
        if (modp) {
            *modp = rb_uint2big((unsigned long)t2);
            RBIGNUM(*modp)->sign = RBIGNUM(x)->sign;
        }
        if (divp) *divp = z;
        return;
    }
    z = bignew(nx==ny?nx+2:nx+1, RBIGNUM(x)->sign==RBIGNUM(y)->sign);
    zds = BDIGITS(z);
    if (nx==ny) zds[nx+1] = 0;
    while (!yds[ny-1]) ny--;

    dd = 0;
    q = yds[ny-1];
    while ((q & (1<<(BITSPERDIG-1))) == 0) {
        q <<= 1;
        dd++;
    }
    if (dd) {
        yy = rb_big_clone(y);
        tds = BDIGITS(yy);
        j = 0;
        t2 = 0;
        while (j<ny) {
            t2 += (BDIGIT_DBL)yds[j]<<dd;
            tds[j++] = BIGLO(t2);
            t2 = BIGDN(t2);
        }
        yds = tds;
        j = 0;
        t2 = 0;
        while (j<nx) {
            t2 += (BDIGIT_DBL)xds[j]<<dd;
            zds[j++] = BIGLO(t2);
            t2 = BIGDN(t2);
        }
        zds[j] = (BDIGIT)t2;
    }
    else {
        zds[nx] = 0;
        j = nx;
        while (j--) zds[j] = xds[j];
    }

    j = nx==ny?nx+1:nx;
    do {
        if (zds[j] ==  yds[ny-1]) q = BIGRAD-1;
        else q = (BDIGIT)((BIGUP(zds[j]) + zds[j-1])/yds[ny-1]);
        if (q) {
            i = 0; num = 0; t2 = 0;
            do {                        /* multiply and subtract */
                BDIGIT_DBL ee;
                t2 += (BDIGIT_DBL)yds[i] * q;
                ee = num - BIGLO(t2);
                num = (BDIGIT_DBL)zds[j - ny + i] + ee;
                if (ee) zds[j - ny + i] = BIGLO(num);
                num = BIGDN(num);
                t2 = BIGDN(t2);
            } while (++i < ny);
            num += zds[j - ny + i] - t2;/* borrow from high digit; don't update */
            while (num) {               /* "add back" required */
                i = 0; num = 0; q--;
                do {
                    BDIGIT_DBL ee = num + yds[i];
                    num = (BDIGIT_DBL)zds[j - ny + i] + ee;
                    if (ee) zds[j - ny + i] = BIGLO(num);
                    num = BIGDN(num);
                } while (++i < ny);
                num--;
            }
        }
        zds[j] = q;
    } while (--j >= ny);
    if (divp) {                 /* move quotient down in z */
        *divp = rb_big_clone(z);
        zds = BDIGITS(*divp);
        j = (nx==ny ? nx+2 : nx+1) - ny;
        for (i = 0;i < j;i++) zds[i] = zds[i+ny];
        RBIGNUM(*divp)->len = i;
    }
    if (modp) {                 /* normalize remainder */
        *modp = rb_big_clone(z);
        zds = BDIGITS(*modp);
        while (--ny && !zds[ny]); ++ny;
        if (dd) {
            t2 = 0; i = ny;
            while(i--) {
                t2 = (t2 | zds[i]) >> dd;
                q = zds[i];
                zds[i] = BIGLO(t2);
                t2 = BIGUP(q);
            }
        }
        RBIGNUM(*modp)->len = ny;
        RBIGNUM(*modp)->sign = RBIGNUM(x)->sign;
    }
}

static void
bigdivmod(VALUE x, VALUE y, VALUE *divp, VALUE *modp)
{
    VALUE mod;

    bigdivrem(x, y, divp, &mod);
    if (RBIGNUM(x)->sign != RBIGNUM(y)->sign && !BIGZEROP(mod)) {
        if (divp) *divp = bigadd(*divp, rb_int2big(1), 0);
        if (modp) *modp = bigadd(mod, y, 1);
    }
    else {
        if (divp) *divp = *divp;
        if (modp) *modp = mod;
    }
}

/*
 *  call-seq:
 *     big / other     => Numeric
 *     big.div(other)  => Numeric
 *
 *  Divides big by other, returning the result.
 */

VALUE
rb_big_div(VALUE x, VALUE y)
{
    VALUE z;

    switch (TYPE(y)) {
      case T_FIXNUM:
        y = rb_int2big(FIX2LONG(y));
        break;

      case T_BIGNUM:
        break;

      case T_FLOAT:
        return rb_float_new(rb_big2dbl(x) / RFLOAT(y)->value);

      default:
        return rb_num_coerce_bin(x, y);
    }
    bigdivmod(x, y, &z, 0);

    return bignorm(z);
}

/*
 *  call-seq:
 *     big % other         => Numeric
 *     big.modulo(other)   => Numeric
 *
 *  Returns big modulo other. See Numeric.divmod for more
 *  information.
 */

VALUE
rb_big_modulo(VALUE x, VALUE y)
{
    VALUE z;

    switch (TYPE(y)) {
      case T_FIXNUM:
        y = rb_int2big(FIX2LONG(y));
        break;

      case T_BIGNUM:
        break;

      default:
        return rb_num_coerce_bin(x, y);
    }
    bigdivmod(x, y, 0, &z);

    return bignorm(z);
}

/*
 *  call-seq:
 *     big.remainder(numeric)    => number
 *
 *  Returns the remainder after dividing <i>big</i> by <i>numeric</i>.
 *
 *     -1234567890987654321.remainder(13731)      #=> -6966
 *     -1234567890987654321.remainder(13731.24)   #=> -9906.22531493148
 */
static VALUE
rb_big_remainder(VALUE x, VALUE y)
{
    VALUE z;

    switch (TYPE(y)) {
      case T_FIXNUM:
        y = rb_int2big(FIX2LONG(y));
        break;

      case T_BIGNUM:
        break;

      default:
        return rb_num_coerce_bin(x, y);
    }
    bigdivrem(x, y, 0, &z);

    return bignorm(z);
}

/*
 *  call-seq:
 *     big.divmod(numeric)   => array
 *
 *  See <code>Numeric#divmod</code>.
 *
 */
VALUE
rb_big_divmod(VALUE x, VALUE y)
{
    VALUE div, mod;

    switch (TYPE(y)) {
      case T_FIXNUM:
        y = rb_int2big(FIX2LONG(y));
        break;

      case T_BIGNUM:
        break;

      default:
        return rb_num_coerce_bin(x, y);
    }
    bigdivmod(x, y, &div, &mod);

    return rb_assoc_new(bignorm(div), bignorm(mod));
}

/*
 *  call-seq:
 *     big.quo(numeric) -> float
 *
 *  Returns the floating point result of dividing <i>big</i> by
 *  <i>numeric</i>.
 *
 *     -1234567890987654321.quo(13731)      #=> -89910996357705.5
 *     -1234567890987654321.quo(13731.24)   #=> -89909424858035.7
 *
 */

static VALUE
rb_big_quo(VALUE x, VALUE y)
{
    double dx = rb_big2dbl(x);
    double dy;

    switch (TYPE(y)) {
      case T_FIXNUM:
        dy = (double)FIX2LONG(y);
        break;

      case T_BIGNUM:
        dy = rb_big2dbl(y);
        break;

      case T_FLOAT:
        dy = RFLOAT(y)->value;
        break;

      default:
        return rb_num_coerce_bin(x, y);
    }
    return rb_float_new(dx / dy);
}

/*
 *  call-seq:
 *     big ** exponent   #=> numeric
 *
 *  Raises _big_ to the _exponent_ power (which may be an integer, float,
 *  or anything that will coerce to a number). The result may be
 *  a Fixnum, Bignum, or Float
 *
 *    123456789 ** 2      #=> 15241578750190521
 *    123456789 ** 1.2    #=> 5126464716.09932
 *    123456789 ** -2     #=> 6.5610001194102e-17
 */

VALUE
rb_big_pow(VALUE x, VALUE y)
{
    double d;
    long yy;

    if (y == INT2FIX(0)) return INT2FIX(1);
    switch (TYPE(y)) {
      case T_FLOAT:
        d = RFLOAT(y)->value;
        break;

      case T_BIGNUM:
        rb_warn("in a**b, b may be too big");
        d = rb_big2dbl(y);
        break;

      case T_FIXNUM:
        yy = FIX2LONG(y);
        if (yy > 0) {
            VALUE z = x;

            for (;;) {
                yy -= 1;
                if (yy == 0) break;
                while (yy % 2 == 0) {
                    yy /= 2;
                    x = rb_big_mul0(x, x);
                }
                z = rb_big_mul0(z, x);
            }
            return bignorm(z);
        }
        d = (double)yy;
        break;

      default:
        return rb_num_coerce_bin(x, y);
    }
    return rb_float_new(pow(rb_big2dbl(x), d));
}

/*
 * call-seq:
 *     big & numeric   =>  integer
 *
 * Performs bitwise +and+ between _big_ and _numeric_.
 */

VALUE
rb_big_and(VALUE xx, VALUE yy)
{
    volatile VALUE x, y, z;
    BDIGIT *ds1, *ds2, *zds;
    long i, l1, l2;
    char sign;

    x = xx;
    y = rb_to_int(yy);
    if (FIXNUM_P(y)) {
        y = rb_int2big(FIX2LONG(y));
    }
    if (!RBIGNUM(y)->sign) {
        y = rb_big_clone(y);
        get2comp(y);
    }
    if (!RBIGNUM(x)->sign) {
        x = rb_big_clone(x);
        get2comp(x);
    }
    if (RBIGNUM(x)->len > RBIGNUM(y)->len) {
        l1 = RBIGNUM(y)->len;
        l2 = RBIGNUM(x)->len;
        ds1 = BDIGITS(y);
        ds2 = BDIGITS(x);
        sign = RBIGNUM(y)->sign;
    }
    else {
        l1 = RBIGNUM(x)->len;
        l2 = RBIGNUM(y)->len;
        ds1 = BDIGITS(x);
        ds2 = BDIGITS(y);
        sign = RBIGNUM(x)->sign;
    }
    z = bignew(l2, RBIGNUM(x)->sign || RBIGNUM(y)->sign);
    zds = BDIGITS(z);

    for (i=0; i<l1; i++) {
        zds[i] = ds1[i] & ds2[i];
    }
    for (; i<l2; i++) {
        zds[i] = sign?0:ds2[i];
    }
    if (!RBIGNUM(z)->sign) get2comp(z);
    return bignorm(z);
}

/*
 * call-seq:
 *     big | numeric   =>  integer
 *
 * Performs bitwise +or+ between _big_ and _numeric_.
 */

VALUE
rb_big_or(VALUE xx, VALUE yy)
{
    volatile VALUE x, y, z;
    BDIGIT *ds1, *ds2, *zds;
    long i, l1, l2;
    char sign;

    x = xx;
    y = rb_to_int(yy);
    if (FIXNUM_P(y)) {
        y = rb_int2big(FIX2LONG(y));
    }

    if (!RBIGNUM(y)->sign) {
        y = rb_big_clone(y);
        get2comp(y);
    }
    if (!RBIGNUM(x)->sign) {
        x = rb_big_clone(x);
        get2comp(x);
    }
    if (RBIGNUM(x)->len > RBIGNUM(y)->len) {
        l1 = RBIGNUM(y)->len;
        l2 = RBIGNUM(x)->len;
        ds1 = BDIGITS(y);
        ds2 = BDIGITS(x);
        sign = RBIGNUM(y)->sign;
    }
    else {
        l1 = RBIGNUM(x)->len;
        l2 = RBIGNUM(y)->len;
        ds1 = BDIGITS(x);
        ds2 = BDIGITS(y);
        sign = RBIGNUM(x)->sign;
    }
    z = bignew(l2, RBIGNUM(x)->sign && RBIGNUM(y)->sign);
    zds = BDIGITS(z);

    for (i=0; i<l1; i++) {
        zds[i] = ds1[i] | ds2[i];
    }
    for (; i<l2; i++) {
        zds[i] = sign?ds2[i]:(BIGRAD-1);
    }
    if (!RBIGNUM(z)->sign) get2comp(z);

    return bignorm(z);
}

/*
 * call-seq:
 *     big ^ numeric   =>  integer
 *
 * Performs bitwise +exclusive or+ between _big_ and _numeric_.
 */

VALUE
rb_big_xor(VALUE xx, VALUE yy)
{
    volatile VALUE x, y;
    VALUE z;
    BDIGIT *ds1, *ds2, *zds;
    long i, l1, l2;
    char sign;

    x = xx;
    y = rb_to_int(yy);
    if (FIXNUM_P(y)) {
        y = rb_int2big(FIX2LONG(y));
    }

    if (!RBIGNUM(y)->sign) {
        y = rb_big_clone(y);
        get2comp(y);
    }
    if (!RBIGNUM(x)->sign) {
        x = rb_big_clone(x);
        get2comp(x);
    }
    if (RBIGNUM(x)->len > RBIGNUM(y)->len) {
        l1 = RBIGNUM(y)->len;
        l2 = RBIGNUM(x)->len;
        ds1 = BDIGITS(y);
        ds2 = BDIGITS(x);
        sign = RBIGNUM(y)->sign;
    }
    else {
        l1 = RBIGNUM(x)->len;
        l2 = RBIGNUM(y)->len;
        ds1 = BDIGITS(x);
        ds2 = BDIGITS(y);
        sign = RBIGNUM(x)->sign;
    }
    RBIGNUM(x)->sign = RBIGNUM(x)->sign?1:0;
    RBIGNUM(y)->sign = RBIGNUM(y)->sign?1:0;
    z = bignew(l2, !(RBIGNUM(x)->sign ^ RBIGNUM(y)->sign));
    zds = BDIGITS(z);

    for (i=0; i<l1; i++) {
        zds[i] = ds1[i] ^ ds2[i];
    }
    for (; i<l2; i++) {
        zds[i] = sign?ds2[i]:~ds2[i];
    }
    if (!RBIGNUM(z)->sign) get2comp(z);

    return bignorm(z);
}

static VALUE rb_big_rshift(VALUE,VALUE);

/*
 * call-seq:
 *     big << numeric   =>  integer
 *
 * Shifts big left _numeric_ positions (right if _numeric_ is negative).
 */

VALUE
rb_big_lshift(VALUE x, VALUE y)
{
    BDIGIT *xds, *zds;
    int shift = NUM2INT(y);
    int s1 = shift/BITSPERDIG;
    int s2 = shift%BITSPERDIG;
    VALUE z;
    BDIGIT_DBL num = 0;
    long len, i;

    if (shift < 0) return rb_big_rshift(x, INT2FIX(-shift));
    len = RBIGNUM(x)->len;
    z = bignew(len+s1+1, RBIGNUM(x)->sign);
    zds = BDIGITS(z);
    for (i=0; i<s1; i++) {
        *zds++ = 0;
    }
    xds = BDIGITS(x);
    for (i=0; i<len; i++) {
        num = num | (BDIGIT_DBL)*xds++<<s2;
        *zds++ = BIGLO(num);
        num = BIGDN(num);
    }
    *zds = BIGLO(num);
    return bignorm(z);
}

/*
 * call-seq:
 *     big >> numeric   =>  integer
 *
 * Shifts big right _numeric_ positions (left if _numeric_ is negative).
 */

static VALUE
rb_big_rshift(VALUE x, VALUE y)
{
    BDIGIT *xds, *zds;
    int shift = NUM2INT(y);
    long s1 = shift/BITSPERDIG;
    long s2 = shift%BITSPERDIG;
    VALUE z;
    BDIGIT_DBL num = 0;
    long i, j;
    volatile VALUE save_x;

    if (shift < 0) return rb_big_lshift(x, INT2FIX(-shift));

    if (s1 > RBIGNUM(x)->len) {
        if (RBIGNUM(x)->sign)
            return INT2FIX(0);
        else
            return INT2FIX(-1);
    }
    if (!RBIGNUM(x)->sign) {
        save_x = x = rb_big_clone(x);
        get2comp(x);
    }
    xds = BDIGITS(x);
    i = RBIGNUM(x)->len; j = i - s1;
    z = bignew(j, RBIGNUM(x)->sign);
    if (!RBIGNUM(x)->sign) {
        num = ((BDIGIT_DBL)~0) << BITSPERDIG;
    }
    zds = BDIGITS(z);
    while (i--, j--) {
        num = (num | xds[i]) >> s2;
        zds[j] = BIGLO(num);
        num = BIGUP(xds[i]);
    }
    if (!RBIGNUM(x)->sign) {
        get2comp(z);
    }
    return bignorm(z);
}

/*
 *  call-seq:
 *     big[n] -> 0, 1
 *
 *  Bit Reference---Returns the <em>n</em>th bit in the (assumed) binary
 *  representation of <i>big</i>, where <i>big</i>[0] is the least
 *  significant bit.
 *
 *     a = 9**15
 *     50.downto(0) do |n|
 *       print a[n]
 *     end
 *
 *  <em>produces:</em>
 *
 *     000101110110100000111000011110010100111100010111001
 *
 */

static VALUE
rb_big_aref(VALUE x, VALUE y)
{
    BDIGIT *xds;
    int shift;
    long s1, s2;

    if (TYPE(y) == T_BIGNUM) {
        if (!RBIGNUM(y)->sign || RBIGNUM(x)->sign)
            return INT2FIX(0);
        return INT2FIX(1);
    }
    shift = NUM2INT(y);
    if (shift < 0) return INT2FIX(0);
    s1 = shift/BITSPERDIG;
    s2 = shift%BITSPERDIG;

    if (!RBIGNUM(x)->sign) {
        if (s1 >= RBIGNUM(x)->len) return INT2FIX(1);
        x = rb_big_clone(x);
        get2comp(x);
    }
    else {
        if (s1 >= RBIGNUM(x)->len) return INT2FIX(0);
    }
    xds = BDIGITS(x);
    if (xds[s1] & (1<<s2))
        return INT2FIX(1);
    return INT2FIX(0);
}

/*
 * call-seq:
 *   big.hash   => fixnum
 *
 * Compute a hash based on the value of _big_.
 */

static VALUE
rb_big_hash(VALUE x)
{
    long i, len, key;
    BDIGIT *digits;

    key = 0; digits = BDIGITS(x); len = RBIGNUM(x)->len;
    for (i=0; i<len; i++) {
        key ^= *digits++;
    }
    return LONG2FIX(key);
}

/*
 * MISSING: documentation
 */

static VALUE
rb_big_coerce(VALUE x, VALUE y)
{
    if (FIXNUM_P(y)) {
        return rb_assoc_new(rb_int2big(FIX2LONG(y)), x);
    }
    else if (TYPE(y) == T_BIGNUM) {
       return rb_assoc_new(y, x);
    }
    else {
        rb_raise(rb_eTypeError, "can't coerce %s to Bignum",
                 rb_obj_classname(y));
    }
    /* not reached */
    return Qnil;
}

/*
 *  call-seq:
 *     big.abs -> aBignum
 *
 *  Returns the absolute value of <i>big</i>.
 *
 *     -1234567890987654321.abs   #=> 1234567890987654321
 */

static VALUE
rb_big_abs(VALUE x)
{
    if (!RBIGNUM(x)->sign) {
        x = rb_big_clone(x);
        RBIGNUM(x)->sign = 1;
    }
    return x;
}

/*
 *  call-seq:
 *     big.size -> integer
 *
 *  Returns the number of bytes in the machine representation of
 *  <i>big</i>.
 *
 *     (256**10 - 1).size   #=> 12
 *     (256**20 - 1).size   #=> 20
 *     (256**40 - 1).size   #=> 40
 */

static VALUE
rb_big_size(VALUE big)
{
    return LONG2FIX(RBIGNUM(big)->len*SIZEOF_BDIGITS);
}

/*
 *  Bignum objects hold integers outside the range of
 *  Fixnum. Bignum objects are created
 *  automatically when integer calculations would otherwise overflow a
 *  Fixnum. When a calculation involving
 *  Bignum objects returns a result that will fit in a
 *  Fixnum, the result is automatically converted.
 *
 *  For the purposes of the bitwise operations and <code>[]</code>, a
 *  Bignum is treated as if it were an infinite-length
 *  bitstring with 2's complement representation.
 *
 *  While Fixnum values are immediate, Bignum
 *  objects are not---assignment and parameter passing work with
 *  references to objects, not the objects themselves.
 *
 */

void
Init_Bignum(void)
{
    rb_cBignum = rb_define_class("Bignum", rb_cInteger);

    rb_define_method(rb_cBignum, "to_s", rb_big_to_s, -1);
    rb_define_method(rb_cBignum, "coerce", rb_big_coerce, 1);
    rb_define_method(rb_cBignum, "-@", rb_big_uminus, 0);
    rb_define_method(rb_cBignum, "+", rb_big_plus, 1);
    rb_define_method(rb_cBignum, "-", rb_big_minus, 1);
    rb_define_method(rb_cBignum, "*", rb_big_mul, 1);
    rb_define_method(rb_cBignum, "/", rb_big_div, 1);
    rb_define_method(rb_cBignum, "%", rb_big_modulo, 1);
    rb_define_method(rb_cBignum, "div", rb_big_div, 1);
    rb_define_method(rb_cBignum, "divmod", rb_big_divmod, 1);
    rb_define_method(rb_cBignum, "modulo", rb_big_modulo, 1);
    rb_define_method(rb_cBignum, "remainder", rb_big_remainder, 1);
    rb_define_method(rb_cBignum, "quo", rb_big_quo, 1);
    rb_define_method(rb_cBignum, "**", rb_big_pow, 1);
    rb_define_method(rb_cBignum, "&", rb_big_and, 1);
    rb_define_method(rb_cBignum, "|", rb_big_or, 1);
    rb_define_method(rb_cBignum, "^", rb_big_xor, 1);
    rb_define_method(rb_cBignum, "~", rb_big_neg, 0);
    rb_define_method(rb_cBignum, "<<", rb_big_lshift, 1);
    rb_define_method(rb_cBignum, ">>", rb_big_rshift, 1);
    rb_define_method(rb_cBignum, "[]", rb_big_aref, 1);

    rb_define_method(rb_cBignum, "<=>", rb_big_cmp, 1);
    rb_define_method(rb_cBignum, "==", rb_big_eq, 1);
    rb_define_method(rb_cBignum, "eql?", rb_big_eql, 1);
    rb_define_method(rb_cBignum, "hash", rb_big_hash, 0);
    rb_define_method(rb_cBignum, "to_f", rb_big_to_f, 0);
    rb_define_method(rb_cBignum, "abs", rb_big_abs, 0);
    rb_define_method(rb_cBignum, "size", rb_big_size, 0);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


class.c

root/class.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. rb_class_boot
  2. rb_check_inheritable
  3. rb_class_new
  4. clone_method
  5. rb_mod_init_copy
  6. rb_class_init_copy
  7. rb_singleton_class_clone
  8. rb_singleton_class_attached
  9. rb_make_metaclass
  10. rb_define_class_id
  11. rb_class_inherited
  12. rb_define_class
  13. rb_define_class_under
  14. rb_module_new
  15. rb_define_module_id
  16. rb_define_module
  17. rb_define_module_under
  18. include_class_new
  19. rb_include_module
  20. rb_mod_included_modules
  21. rb_mod_include_p
  22. rb_mod_ancestors
  23. ins_methods_push
  24. ins_methods_i
  25. ins_methods_prot_i
  26. ins_methods_priv_i
  27. ins_methods_pub_i
  28. method_entry
  29. class_instance_method_list
  30. rb_class_instance_methods
  31. rb_class_protected_instance_methods
  32. rb_class_private_instance_methods
  33. rb_class_public_instance_methods
  34. rb_obj_singleton_methods
  35. rb_define_method_id
  36. rb_define_method
  37. rb_define_protected_method
  38. rb_define_private_method
  39. rb_undef_method
  40. rb_singleton_class
  41. rb_define_singleton_method
  42. rb_define_module_function
  43. rb_define_global_function
  44. rb_define_alias
  45. rb_define_attr
  46. rb_scan_args
/**********************************************************************

  class.c -

  $Author: ocean $
  $Date: 2005/10/20 02:56:21 $
  created at: Tue Aug 10 15:05:44 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#include "ruby.h"
#include "rubysig.h"
#include "node.h"
#include "st.h"
#include <ctype.h>

extern st_table *rb_class_tbl;

VALUE
rb_class_boot(VALUE super)
{
    NEWOBJ(klass, struct RClass);
    OBJSETUP(klass, rb_cClass, T_CLASS);

    klass->super = super;
    klass->iv_tbl = 0;
    klass->m_tbl = 0;           /* safe GC */
    klass->m_tbl = st_init_numtable();

    OBJ_INFECT(klass, super);
    return (VALUE)klass;
}

void
rb_check_inheritable(VALUE super)
{
    if (TYPE(super) != T_CLASS) {
        rb_raise(rb_eTypeError, "superclass must be a Class (%s given)",
                 rb_obj_classname(super));
    }
    if (RBASIC(super)->flags & FL_SINGLETON) {
        rb_raise(rb_eTypeError, "can't make subclass of singleton class");
    }
}

VALUE
rb_class_new(VALUE super)
{
    Check_Type(super, T_CLASS);
    rb_check_inheritable(super);
    if (super == rb_cClass) {
        rb_raise(rb_eTypeError, "can't make subclass of Class");
    }
    return rb_class_boot(super);
}

static int
clone_method(ID mid, NODE *body, st_table *tbl)
{
    st_insert(tbl, mid, (st_data_t)NEW_METHOD(body->nd_body, body->nd_noex));
    return ST_CONTINUE;
}

/* :nodoc: */
VALUE
rb_mod_init_copy(VALUE clone, VALUE orig)
{
    rb_obj_init_copy(clone, orig);
    if (!FL_TEST(CLASS_OF(clone), FL_SINGLETON)) {
        RBASIC(clone)->klass = rb_singleton_class_clone(orig);
    }
    RCLASS(clone)->super = RCLASS(orig)->super;
    if (RCLASS(orig)->iv_tbl) {
        ID id;

        RCLASS(clone)->iv_tbl = st_copy(RCLASS(orig)->iv_tbl);
        id = rb_intern("__classpath__");
        st_delete(RCLASS(clone)->iv_tbl, (st_data_t*)&id, 0);
        id = rb_intern("__classid__");
        st_delete(RCLASS(clone)->iv_tbl, (st_data_t*)&id, 0);
    }
    if (RCLASS(orig)->m_tbl) {
        RCLASS(clone)->m_tbl = st_init_numtable();
        st_foreach(RCLASS(orig)->m_tbl, clone_method,
          (st_data_t)RCLASS(clone)->m_tbl);
    }

    return clone;
}

/* :nodoc: */
VALUE
rb_class_init_copy(VALUE clone, VALUE orig)
{
    if (RCLASS(clone)->super != 0) {
        rb_raise(rb_eTypeError, "already initialized class");
    }
    if (FL_TEST(orig, FL_SINGLETON)) {
        rb_raise(rb_eTypeError, "can't copy singleton class");
    }
    return rb_mod_init_copy(clone, orig);
}

VALUE
rb_singleton_class_clone(VALUE obj)
{
    VALUE klass = RBASIC(obj)->klass;

    if (!FL_TEST(klass, FL_SINGLETON))
        return klass;
    else {
        /* copy singleton(unnamed) class */
        NEWOBJ(clone, struct RClass);
        OBJSETUP(clone, 0, RBASIC(klass)->flags);

        if (BUILTIN_TYPE(obj) == T_CLASS) {
            RBASIC(clone)->klass = (VALUE)clone;
        }
        else {
            RBASIC(clone)->klass = rb_singleton_class_clone(klass);
        }

        clone->super = RCLASS(klass)->super;
        clone->iv_tbl = 0;
        clone->m_tbl = 0;
        if (RCLASS(klass)->iv_tbl) {
            clone->iv_tbl = st_copy(RCLASS(klass)->iv_tbl);
        }
        clone->m_tbl = st_init_numtable();
        st_foreach(RCLASS(klass)->m_tbl, clone_method,
          (st_data_t)clone->m_tbl);
        rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)clone);
        FL_SET(clone, FL_SINGLETON);
        return (VALUE)clone;
    }
}

void
rb_singleton_class_attached(VALUE klass, VALUE obj)
{
    if (FL_TEST(klass, FL_SINGLETON)) {
        if (!RCLASS(klass)->iv_tbl) {
            RCLASS(klass)->iv_tbl = st_init_numtable();
        }
        st_insert(RCLASS(klass)->iv_tbl, rb_intern("__attached__"), obj);
    }
}

VALUE
rb_make_metaclass(VALUE obj, VALUE super)
{
    if (BUILTIN_TYPE(obj) == T_CLASS && FL_TEST(obj, FL_SINGLETON)) {
        return RBASIC(obj)->klass = rb_cClass;
    }
    else {
        VALUE metasuper;
        VALUE klass = rb_class_boot(super);

        FL_SET(klass, FL_SINGLETON);
        RBASIC(obj)->klass = klass;
        rb_singleton_class_attached(klass, obj);

        metasuper = RBASIC(rb_class_real(super))->klass;
        /* metaclass of a superclass may be NULL at boot time */
        if (metasuper) {
            RBASIC(klass)->klass = metasuper;
        }
        return klass;
    }
}

VALUE
rb_define_class_id(ID id, VALUE super)
{
    VALUE klass;

    if (!super) super = rb_cObject;
    klass = rb_class_new(super);
    rb_make_metaclass(klass, RBASIC(super)->klass);

    return klass;
}

VALUE
rb_class_inherited(VALUE super, VALUE klass)
{
    if (!super) super = rb_cObject;
    return rb_funcall(super, rb_intern("inherited"), 1, klass);
}

VALUE
rb_define_class(const char *name, VALUE super)
{
    VALUE klass;
    ID id;

    id = rb_intern(name);
    if (rb_const_defined(rb_cObject, id)) {
        klass = rb_const_get(rb_cObject, id);
        if (TYPE(klass) != T_CLASS) {
            rb_raise(rb_eTypeError, "%s is not a class", name);
        }
        if (rb_class_real(RCLASS(klass)->super) != super) {
            rb_name_error(id, "%s is already defined", name);
        }
        return klass;
    }
    if (!super) {
        rb_warn("no super class for `%s', Object assumed", name);
    }
    klass = rb_define_class_id(id, super);
    st_add_direct(rb_class_tbl, id, klass);
    rb_name_class(klass, id);
    rb_const_set(rb_cObject, id, klass);
    rb_class_inherited(super, klass);

    return klass;
}

VALUE
rb_define_class_under(VALUE outer, const char *name, VALUE super)
{
    VALUE klass;
    ID id;

    id = rb_intern(name);
    if (rb_const_defined_at(outer, id)) {
        klass = rb_const_get_at(outer, id);
        if (TYPE(klass) != T_CLASS) {
            rb_raise(rb_eTypeError, "%s is not a class", name);
        }
        if (rb_class_real(RCLASS(klass)->super) != super) {
            rb_name_error(id, "%s is already defined", name);
        }
        return klass;
    }
    if (!super) {
        rb_warn("no super class for `%s::%s', Object assumed",
                rb_class2name(outer), name);
    }
    klass = rb_define_class_id(id, super);
    rb_set_class_path(klass, outer, name);
    rb_const_set(outer, id, klass);
    rb_class_inherited(super, klass);

    return klass;
}

VALUE
rb_module_new(void)
{
    NEWOBJ(mdl, struct RClass);
    OBJSETUP(mdl, rb_cModule, T_MODULE);

    mdl->super = 0;
    mdl->iv_tbl = 0;
    mdl->m_tbl = 0;
    mdl->m_tbl = st_init_numtable();

    return (VALUE)mdl;
}

VALUE
rb_define_module_id(ID id)
{
    VALUE mdl;

    mdl = rb_module_new();
    rb_name_class(mdl, id);

    return mdl;
}

VALUE
rb_define_module(const char *name)
{
    VALUE module;
    ID id;

    id = rb_intern(name);
    if (rb_const_defined(rb_cObject, id)) {
        module = rb_const_get(rb_cObject, id);
        if (TYPE(module) == T_MODULE)
            return module;
        rb_raise(rb_eTypeError, "%s is not a module", rb_obj_classname(module));
    }
    module = rb_define_module_id(id);
    st_add_direct(rb_class_tbl, id, module);
    rb_const_set(rb_cObject, id, module);

    return module;
}

VALUE
rb_define_module_under(VALUE outer, const char *name)
{
    VALUE module;
    ID id;

    id = rb_intern(name);
    if (rb_const_defined_at(outer, id)) {
        module = rb_const_get_at(outer, id);
        if (TYPE(module) == T_MODULE)
            return module;
        rb_raise(rb_eTypeError, "%s::%s is not a module",
                 rb_class2name(outer), rb_obj_classname(module));
    }
    module = rb_define_module_id(id);
    rb_const_set(outer, id, module);
    rb_set_class_path(module, outer, name);

    return module;
}

static VALUE
include_class_new(VALUE module, VALUE super)
{
    NEWOBJ(klass, struct RClass);
    OBJSETUP(klass, rb_cClass, T_ICLASS);

    if (BUILTIN_TYPE(module) == T_ICLASS) {
        module = RBASIC(module)->klass;
    }
    if (!RCLASS(module)->iv_tbl) {
        RCLASS(module)->iv_tbl = st_init_numtable();
    }
    klass->iv_tbl = RCLASS(module)->iv_tbl;
    klass->m_tbl = RCLASS(module)->m_tbl;
    klass->super = super;
    if (TYPE(module) == T_ICLASS) {
        RBASIC(klass)->klass = RBASIC(module)->klass;
    }
    else {
        RBASIC(klass)->klass = module;
    }
    OBJ_INFECT(klass, module);
    OBJ_INFECT(klass, super);

    return (VALUE)klass;
}

void
rb_include_module(VALUE klass, VALUE module)
{
    VALUE p, c;
    int changed = 0;

    rb_frozen_class_p(klass);
    if (!OBJ_TAINTED(klass)) {
        rb_secure(4);
    }

    if (NIL_P(module)) return;
    if (klass == module) return;

    if (TYPE(module) != T_MODULE) {
        Check_Type(module, T_MODULE);
    }

    OBJ_INFECT(klass, module);
    c = klass;
    while (module) {
        int superclass_seen = Qfalse;

        if (RCLASS(klass)->m_tbl == RCLASS(module)->m_tbl)
            rb_raise(rb_eArgError, "cyclic include detected");
        /* ignore if the module included already in superclasses */
        for (p = RCLASS(klass)->super; p; p = RCLASS(p)->super) {
            switch (BUILTIN_TYPE(p)) {
              case T_ICLASS:
                if (RCLASS(p)->m_tbl == RCLASS(module)->m_tbl) {
                    if (!superclass_seen) {
                        c = p;  /* move insertion point */
                    }
                    goto skip;
                }
                break;
              case T_CLASS:
                superclass_seen = Qtrue;
                break;
            }
        }
        RCLASS(c)->super = include_class_new(module, RCLASS(c)->super);
        c = RCLASS(c)->super;
        changed = 1;
      skip:
        module = RCLASS(module)->super;
    }
    if (changed) rb_clear_cache();
}

/*
 *  call-seq:
 *     mod.included_modules -> array
 *
 *  Returns the list of modules included in <i>mod</i>.
 *
 *     module Mixin
 *     end
 *
 *     module Outer
 *       include Mixin
 *     end
 *
 *     Mixin.included_modules   #=> []
 *     Outer.included_modules   #=> [Mixin]
 */

VALUE
rb_mod_included_modules(VALUE mod)
{
    VALUE ary = rb_ary_new();
    VALUE p;

    for (p = RCLASS(mod)->super; p; p = RCLASS(p)->super) {
        if (BUILTIN_TYPE(p) == T_ICLASS) {
            rb_ary_push(ary, RBASIC(p)->klass);
        }
    }
    return ary;
}

/*
 *  call-seq:
 *     mod.include?(module)    => true or false
 *
 *  Returns <code>true</code> if <i>module</i> is included in
 *  <i>mod</i> or one of <i>mod</i>'s ancestors.
 *
 *     module A
 *     end
 *     class B
 *       include A
 *     end
 *     class C < B
 *     end
 *     B.include?(A)   #=> true
 *     C.include?(A)   #=> true
 *     A.include?(A)   #=> false
 */

VALUE
rb_mod_include_p(VALUE mod, VALUE mod2)
{
    VALUE p;

    Check_Type(mod2, T_MODULE);
    for (p = RCLASS(mod)->super; p; p = RCLASS(p)->super) {
        if (BUILTIN_TYPE(p) == T_ICLASS) {
            if (RBASIC(p)->klass == mod2) return Qtrue;
        }
    }
    return Qfalse;
}

/*
 *  call-seq:
 *     mod.ancestors -> array
 *
 *  Returns a list of modules included in <i>mod</i> (including
 *  <i>mod</i> itself).
 *
 *     module Mod
 *       include Math
 *       include Comparable
 *     end
 *
 *     Mod.ancestors    #=> [Mod, Comparable, Math]
 *     Math.ancestors   #=> [Math]
 */

VALUE
rb_mod_ancestors(VALUE mod)
{
    VALUE p, ary = rb_ary_new();

    for (p = mod; p; p = RCLASS(p)->super) {
        if (FL_TEST(p, FL_SINGLETON))
            continue;
        if (BUILTIN_TYPE(p) == T_ICLASS) {
            rb_ary_push(ary, RBASIC(p)->klass);
        }
        else {
            rb_ary_push(ary, p);
        }
    }
    return ary;
}

#define VISI(x) ((x)&NOEX_MASK)
#define VISI_CHECK(x,f) (VISI(x) == (f))

static int
ins_methods_push(ID name, long type, VALUE ary, long visi)
{
    if (type == -1) return ST_CONTINUE;
    switch (visi) {
      case NOEX_PRIVATE:
      case NOEX_PROTECTED:
      case NOEX_PUBLIC:
        visi = (type == visi);
        break;
      default:
        visi = (type != NOEX_PRIVATE);
        break;
    }
    if (visi) {
        rb_ary_push(ary, rb_str_new2(rb_id2name(name)));
    }
    return ST_CONTINUE;
}

static int
ins_methods_i(ID name, long type, VALUE ary)
{
    return ins_methods_push(name, type, ary, -1); /* everything but private */
}

static int
ins_methods_prot_i(ID name, long type, VALUE ary)
{
    return ins_methods_push(name, type, ary, NOEX_PROTECTED);
}

static int
ins_methods_priv_i(ID name, long type, VALUE ary)
{
    return ins_methods_push(name, type, ary, NOEX_PRIVATE);
}

static int
ins_methods_pub_i(ID name, long type, VALUE ary)
{
    return ins_methods_push(name, type, ary, NOEX_PUBLIC);
}

static int
method_entry(ID key, NODE *body, st_table *list)
{
    long type;

    if (key == ID_ALLOCATOR) return ST_CONTINUE;
    if (!st_lookup(list, key, 0)) {
        if (!body->nd_body) type = -1; /* none */
        else type = VISI(body->nd_noex);
        st_add_direct(list, key, type);
    }
    return ST_CONTINUE;
}

static VALUE
class_instance_method_list(int argc, VALUE *argv, VALUE mod, int (*func) (ID, long, VALUE))
{
    VALUE ary;
    int recur;
    st_table *list;

    if (argc == 0) {
        recur = Qtrue;
    }
    else {
        VALUE r;
        rb_scan_args(argc, argv, "01", &r);
        recur = RTEST(r);
    }

    list = st_init_numtable();
    for (; mod; mod = RCLASS(mod)->super) {
        st_foreach(RCLASS(mod)->m_tbl, method_entry, (st_data_t)list);
        if (BUILTIN_TYPE(mod) == T_ICLASS) continue;
        if (FL_TEST(mod, FL_SINGLETON)) continue;
        if (!recur) break;
    }
    ary = rb_ary_new();
    st_foreach(list, func, ary);
    st_free_table(list);

    return ary;
}

/*
 *  call-seq:
 *     mod.instance_methods(include_super=true)   => array
 *
 *  Returns an array containing the names of public instance methods in
 *  the receiver. For a module, these are the public methods; for a
 *  class, they are the instance (not singleton) methods. With no
 *  argument, or with an argument that is <code>false</code>, the
 *  instance methods in <i>mod</i> are returned, otherwise the methods
 *  in <i>mod</i> and <i>mod</i>'s superclasses are returned.
 *
 *     module A
 *       def method1()  end
 *     end
 *     class B
 *       def method2()  end
 *     end
 *     class C < B
 *       def method3()  end
 *     end
 *
 *     A.instance_methods                #=> ["method1"]
 *     B.instance_methods(false)         #=> ["method2"]
 *     C.instance_methods(false)         #=> ["method3"]
 *     C.instance_methods(true).length   #=> 43
 */

VALUE
rb_class_instance_methods(int argc, VALUE *argv, VALUE mod)
{
    return class_instance_method_list(argc, argv, mod, ins_methods_i);
}

/*
 *  call-seq:
 *     mod.protected_instance_methods(include_super=true)   => array
 *
 *  Returns a list of the protected instance methods defined in
 *  <i>mod</i>. If the optional parameter is not <code>false</code>, the
 *  methods of any ancestors are included.
 */

VALUE
rb_class_protected_instance_methods(int argc, VALUE *argv, VALUE mod)
{
    return class_instance_method_list(argc, argv, mod, ins_methods_prot_i);
}

/*
 *  call-seq:
 *     mod.private_instance_methods(include_super=true)    => array
 *
 *  Returns a list of the private instance methods defined in
 *  <i>mod</i>. If the optional parameter is not <code>false</code>, the
 *  methods of any ancestors are included.
 *
 *     module Mod
 *       def method1()  end
 *       private :method1
 *       def method2()  end
 *     end
 *     Mod.instance_methods           #=> ["method2"]
 *     Mod.private_instance_methods   #=> ["method1"]
 */

VALUE
rb_class_private_instance_methods(int argc, VALUE *argv, VALUE mod)
{
    return class_instance_method_list(argc, argv, mod, ins_methods_priv_i);
}

/*
 *  call-seq:
 *     mod.public_instance_methods(include_super=true)   => array
 *
 *  Returns a list of the public instance methods defined in <i>mod</i>.
 *  If the optional parameter is not <code>false</code>, the methods of
 *  any ancestors are included.
 */

VALUE
rb_class_public_instance_methods(int argc, VALUE *argv, VALUE mod)
{
    return class_instance_method_list(argc, argv, mod, ins_methods_pub_i);
}

/*
 *  call-seq:
 *     obj.singleton_methods(all=true)    => array
 *
 *  Returns an array of the names of singleton methods for <i>obj</i>.
 *  If the optional <i>all</i> parameter is true, the list will include
 *  methods in modules included in <i>obj</i>.
 *
 *     module Other
 *       def three() end
 *     end
 *
 *     class Single
 *       def Single.four() end
 *     end
 *
 *     a = Single.new
 *
 *     def a.one()
 *     end
 *
 *     class << a
 *       include Other
 *       def two()
 *       end
 *     end
 *
 *     Single.singleton_methods    #=> ["four"]
 *     a.singleton_methods(false)  #=> ["two", "one"]
 *     a.singleton_methods         #=> ["two", "one", "three"]
 */

VALUE
rb_obj_singleton_methods(int argc, VALUE *argv, VALUE obj)
{
    VALUE recur, ary, klass;
    st_table *list;

    rb_scan_args(argc, argv, "01", &recur);
    if (argc == 0) {
        recur = Qtrue;
    }
    klass = CLASS_OF(obj);
    list = st_init_numtable();
    if (klass && FL_TEST(klass, FL_SINGLETON)) {
        st_foreach(RCLASS(klass)->m_tbl, method_entry, (st_data_t)list);
        klass = RCLASS(klass)->super;
    }
    if (RTEST(recur)) {
        while (klass && (FL_TEST(klass, FL_SINGLETON) || TYPE(klass) == T_ICLASS)) {
            st_foreach(RCLASS(klass)->m_tbl, method_entry, (st_data_t)list);
            klass = RCLASS(klass)->super;
        }
    }
    ary = rb_ary_new();
    st_foreach(list, ins_methods_i, ary);
    st_free_table(list);

    return ary;
}

void
rb_define_method_id(VALUE klass, ID name, VALUE (*func)(ANYARGS), int argc)
{
    rb_add_method(klass, name, NEW_CFUNC(func,argc), NOEX_PUBLIC);
}

void
rb_define_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc)
{
    rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PUBLIC);
}

void
rb_define_protected_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc)
{
    rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PROTECTED);
}

void
rb_define_private_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc)
{
    rb_add_method(klass, rb_intern(name), NEW_CFUNC(func, argc), NOEX_PRIVATE);
}

void
rb_undef_method(VALUE klass, const char *name)
{
    rb_add_method(klass, rb_intern(name), 0, NOEX_UNDEF);
}

#define SPECIAL_SINGLETON(x,c) do {\
    if (obj == (x)) {\
        return c;\
    }\
} while (0)

VALUE
rb_singleton_class(VALUE obj)
{
    VALUE klass;

    if (FIXNUM_P(obj) || SYMBOL_P(obj)) {
        rb_raise(rb_eTypeError, "can't define singleton");
    }
    if (rb_special_const_p(obj)) {
        SPECIAL_SINGLETON(Qnil, rb_cNilClass);
        SPECIAL_SINGLETON(Qfalse, rb_cFalseClass);
        SPECIAL_SINGLETON(Qtrue, rb_cTrueClass);
        rb_bug("unknown immediate %ld", obj);
    }

    DEFER_INTS;
    if (FL_TEST(RBASIC(obj)->klass, FL_SINGLETON) &&
        rb_iv_get(RBASIC(obj)->klass, "__attached__") == obj) {
        klass = RBASIC(obj)->klass;
    }
    else {
        klass = rb_make_metaclass(obj, RBASIC(obj)->klass);
    }
    if (OBJ_TAINTED(obj)) {
        OBJ_TAINT(klass);
    }
    else {
        FL_UNSET(klass, FL_TAINT);
    }
    if (OBJ_FROZEN(obj)) OBJ_FREEZE(klass);
    ALLOW_INTS;

    return klass;
}

void
rb_define_singleton_method(VALUE obj, const char *name, VALUE (*func)(ANYARGS), int argc)
{
    rb_define_method(rb_singleton_class(obj), name, func, argc);
}

void
rb_define_module_function(VALUE module, const char *name, VALUE (*func)(ANYARGS), int argc)
{
    rb_define_private_method(module, name, func, argc);
    rb_define_singleton_method(module, name, func, argc);
}

void
rb_define_global_function(const char *name, VALUE (*func)(ANYARGS), int argc)
{
    rb_define_module_function(rb_mKernel, name, func, argc);
}

void
rb_define_alias(VALUE klass, const char *name1, const char *name2)
{
    rb_alias(klass, rb_intern(name1), rb_intern(name2));
}

void
rb_define_attr(VALUE klass, const char *name, int read, int write)
{
    rb_attr(klass, rb_intern(name), read, write, Qfalse);
}

#include <stdarg.h>

int
rb_scan_args(int argc, const VALUE *argv, const char *fmt, ...)
{
    int n, i = 0;
    const char *p = fmt;
    VALUE *var;
    va_list vargs;

    va_start(vargs, fmt);

    if (*p == '*') goto rest_arg;

    if (ISDIGIT(*p)) {
        n = *p - '0';
        if (n > argc)
            rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", argc, n);
        for (i=0; i<n; i++) {
            var = va_arg(vargs, VALUE*);
            if (var) *var = argv[i];
        }
        p++;
    }
    else {
        goto error;
    }

    if (ISDIGIT(*p)) {
        n = i + *p - '0';
        for (; i<n; i++) {
            var = va_arg(vargs, VALUE*);
            if (argc > i) {
                if (var) *var = argv[i];
            }
            else {
                if (var) *var = Qnil;
            }
        }
        p++;
    }

    if(*p == '*') {
      rest_arg:
        var = va_arg(vargs, VALUE*);
        if (argc > i) {
            if (var) *var = rb_ary_new4(argc-i, argv+i);
            i = argc;
        }
        else {
            if (var) *var = rb_ary_new();
        }
        p++;
    }

    if (*p == '&') {
        var = va_arg(vargs, VALUE*);
        if (rb_block_given_p()) {
            *var = rb_block_proc();
        }
        else {
            *var = Qnil;
        }
        p++;
    }
    va_end(vargs);

    if (*p != '\0') {
        goto error;
    }

    if (argc > i) {
        rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", argc, i);
    }

    return argc;

  error:
    rb_fatal("bad scan arg format: %s", fmt);
    return 0;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


compar.c

root/compar.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. rb_cmpint
  2. rb_cmperr
  3. cmp_eq
  4. cmp_failed
  5. cmp_equal
  6. cmp_gt
  7. cmp_ge
  8. cmp_lt
  9. cmp_le
  10. cmp_between
  11. Init_Comparable
/**********************************************************************

  compar.c -

  $Author: matz $
  $Date: 2005/12/12 00:35:09 $
  created at: Thu Aug 26 14:39:48 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#include "ruby.h"

VALUE rb_mComparable;

static ID cmp;

int
rb_cmpint(VALUE val, VALUE a, VALUE b)
{
    if (NIL_P(val)) {
        rb_cmperr(a, b);
    }
    if (FIXNUM_P(val)) return FIX2INT(val);
    if (TYPE(val) == T_BIGNUM) {
        if (RBIGNUM(val)->sign) return 1;
        return -1;
    }
    if (RTEST(rb_funcall(val, '>', 1, INT2FIX(0)))) return 1;
    if (RTEST(rb_funcall(val, '<', 1, INT2FIX(0)))) return -1;
    return 0;
}

void
rb_cmperr(VALUE x, VALUE y)
{
    const char *classname;

    if (SPECIAL_CONST_P(y)) {
        y = rb_inspect(y);
        classname = StringValuePtr(y);
    }
    else {
        classname = rb_obj_classname(y);
    }
    rb_raise(rb_eArgError, "comparison of %s with %s failed",
             rb_obj_classname(x), classname);
}

static VALUE
cmp_eq(VALUE *a)
{
    VALUE c = rb_funcall(a[0], cmp, 1, a[1]);

    if (NIL_P(c)) return Qfalse;
    if (rb_cmpint(c, a[0], a[1]) == 0) return Qtrue;
    return Qfalse;
}

static VALUE
cmp_failed(void)
{
    return Qfalse;
}

/*
 *  call-seq:
 *     obj == other    => true or false
 *
 *  Compares two objects based on the receiver's <code><=></code>
 *  method, returning true if it returns 0. Also returns true if
 *  _obj_ and _other_ are the same object.
 */

static VALUE
cmp_equal(VALUE x, VALUE y)
{
    VALUE a[2];

    if (x == y) return Qtrue;

    a[0] = x; a[1] = y;
    return rb_rescue(cmp_eq, (VALUE)a, cmp_failed, 0);
}

/*
 *  call-seq:
 *     obj > other    => true or false
 *
 *  Compares two objects based on the receiver's <code><=></code>
 *  method, returning true if it returns 1.
 */

static VALUE
cmp_gt(VALUE x, VALUE y)
{
    VALUE c = rb_funcall(x, cmp, 1, y);

    if (rb_cmpint(c, x, y) > 0) return Qtrue;
    return Qfalse;
}

/*
 *  call-seq:
 *     obj >= other    => true or false
 *
 *  Compares two objects based on the receiver's <code><=></code>
 *  method, returning true if it returns 0 or 1.
 */

static VALUE
cmp_ge(VALUE x, VALUE y)
{
    VALUE c = rb_funcall(x, cmp, 1, y);

    if (rb_cmpint(c, x, y) >= 0) return Qtrue;
    return Qfalse;
}

/*
 *  call-seq:
 *     obj < other    => true or false
 *
 *  Compares two objects based on the receiver's <code><=></code>
 *  method, returning true if it returns -1.
 */

static VALUE
cmp_lt(VALUE x, VALUE y)
{
    VALUE c = rb_funcall(x, cmp, 1, y);

    if (rb_cmpint(c, x, y) < 0) return Qtrue;
    return Qfalse;
}

/*
 *  call-seq:
 *     obj <= other    => true or false
 *
 *  Compares two objects based on the receiver's <code><=></code>
 *  method, returning true if it returns -1 or 0.
 */

static VALUE
cmp_le(VALUE x, VALUE y)
{
    VALUE c = rb_funcall(x, cmp, 1, y);

    if (rb_cmpint(c, x, y) <= 0) return Qtrue;
    return Qfalse;
}

/*
 *  call-seq:
 *     obj.between?(min, max)    => true or false
 *
 *  Returns <code>false</code> if <i>obj</i> <code><=></code>
 *  <i>min</i> is less than zero or if <i>anObject</i> <code><=></code>
 *  <i>max</i> is greater than zero, <code>true</code> otherwise.
 *
 *     3.between?(1, 5)               #=> true
 *     6.between?(1, 5)               #=> false
 *     'cat'.between?('ant', 'dog')   #=> true
 *     'gnu'.between?('ant', 'dog')   #=> false
 *
 */

static VALUE
cmp_between(VALUE x, VALUE min, VALUE max)
{
    if (RTEST(cmp_lt(x, min))) return Qfalse;
    if (RTEST(cmp_gt(x, max))) return Qfalse;
    return Qtrue;
}

/*
 *  The <code>Comparable</code> mixin is used by classes whose objects
 *  may be ordered. The class must define the <code><=></code> operator,
 *  which compares the receiver against another object, returning -1, 0,
 *  or +1 depending on whether the receiver is less than, equal to, or
 *  greater than the other object. <code>Comparable</code> uses
 *  <code><=></code> to implement the conventional comparison operators
 *  (<code><</code>, <code><=</code>, <code>==</code>, <code>>=</code>,
 *  and <code>></code>) and the method <code>between?</code>.
 *
 *     class SizeMatters
 *       include Comparable
 *       attr :str
 *       def <=>(anOther)
 *         str.size <=> anOther.str.size
 *       end
 *       def initialize(str)
 *         @str = str
 *       end
 *       def inspect
 *         @str
 *       end
 *     end
 *
 *     s1 = SizeMatters.new("Z")
 *     s2 = SizeMatters.new("YY")
 *     s3 = SizeMatters.new("XXX")
 *     s4 = SizeMatters.new("WWWW")
 *     s5 = SizeMatters.new("VVVVV")
 *
 *     s1 < s2                       #=> true
 *     s4.between?(s1, s3)           #=> false
 *     s4.between?(s3, s5)           #=> true
 *     [ s3, s2, s5, s4, s1 ].sort   #=> [Z, YY, XXX, WWWW, VVVVV]
 *
 */

void
Init_Comparable(void)
{
    rb_mComparable = rb_define_module("Comparable");
    rb_define_method(rb_mComparable, "==", cmp_equal, 1);
    rb_define_method(rb_mComparable, ">", cmp_gt, 1);
    rb_define_method(rb_mComparable, ">=", cmp_ge, 1);
    rb_define_method(rb_mComparable, "<", cmp_lt, 1);
    rb_define_method(rb_mComparable, "<=", cmp_le, 1);
    rb_define_method(rb_mComparable, "between?", cmp_between, 2);

    cmp = rb_intern("<=>");
}
/* [<][>][^] [v] [top][bottom][index] [help] */


defines.h

root/defines.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

DEFINITIONS

This source file includes following definitions.
  1. flush_register_windows
/************************************************

  defines.h -

  $Author: akr $
  $Date: 2005/12/27 05:40:04 $
  created at: Wed May 18 00:21:44 JST 1994

************************************************/
#ifndef DEFINES_H
#define DEFINES_H

#define RUBY

#ifdef __cplusplus
# ifndef  HAVE_PROTOTYPES
#  define HAVE_PROTOTYPES 1
# endif
# ifndef  HAVE_STDARG_PROTOTYPES
#  define HAVE_STDARG_PROTOTYPES 1
# endif
#endif

#undef _
#ifdef HAVE_PROTOTYPES
# define _(args) args
#else
# define _(args) ()
#endif

#undef __
#ifdef HAVE_STDARG_PROTOTYPES
# define __(args) args
#else
# define __(args) ()
#endif

#ifdef __cplusplus
#define ANYARGS ...
#else
#define ANYARGS
#endif

#define xmalloc ruby_xmalloc
#define xmalloc2 ruby_xmalloc2
#define xcalloc ruby_xcalloc
#define xrealloc ruby_xrealloc
#define xrealloc2 ruby_xrealloc2
#define xfree ruby_xfree

void *xmalloc(size_t);
void *xmalloc2(size_t,size_t);
void *xcalloc(size_t,size_t);
void *xrealloc(void*,size_t);
void *xrealloc2(void*,size_t,size_t);
void xfree(void*);

#if SIZEOF_LONG_LONG > 0
# define LONG_LONG long long
#elif SIZEOF___INT64 > 0
# define HAVE_LONG_LONG 1
# define LONG_LONG __int64
# undef SIZEOF_LONG_LONG
# define SIZEOF_LONG_LONG SIZEOF___INT64
#endif

#if SIZEOF_INT*2 <= SIZEOF_LONG_LONG
# define BDIGIT unsigned int
# define SIZEOF_BDIGITS SIZEOF_INT
# define BDIGIT_DBL unsigned LONG_LONG
# define BDIGIT_DBL_SIGNED LONG_LONG
#elif SIZEOF_INT*2 <= SIZEOF_LONG
# define BDIGIT unsigned int
# define SIZEOF_BDIGITS SIZEOF_INT
# define BDIGIT_DBL unsigned long
# define BDIGIT_DBL_SIGNED long
#elif SIZEOF_SHORT*2 <= SIZEOF_LONG
# define BDIGIT unsigned short
# define SIZEOF_BDIGITS SIZEOF_SHORT
# define BDIGIT_DBL unsigned long
# define BDIGIT_DBL_SIGNED long
#else
# define BDIGIT unsigned short
# define SIZEOF_BDIGITS (SIZEOF_LONG/2)
# define BDIGIT_DBL unsigned long
# define BDIGIT_DBL_SIGNED long
#endif

#ifdef __CYGWIN__
#undef _WIN32
#endif

#if defined(MSDOS) || defined(_WIN32) || defined(__human68k__) || defined(__EMX__)
#define DOSISH 1
#ifndef _WIN32_WCE
# define DOSISH_DRIVE_LETTER
#endif
#endif

/* define RUBY_USE_EUC/SJIS for default kanji-code */
#ifndef DEFAULT_KCODE
#if defined(DOSISH) || defined(__CYGWIN__) || defined(__MACOS__) || defined(OS2)
#define DEFAULT_KCODE KCODE_SJIS
#else
#define DEFAULT_KCODE KCODE_EUC
#endif
#endif

#ifdef __NeXT__
/* NextStep, OpenStep, Rhapsody */
#ifndef S_IRUSR
#define S_IRUSR 0000400        /* read permission, owner */
#endif
#ifndef S_IRGRP
#define S_IRGRP 0000040        /* read permission, group */
#endif
#ifndef S_IROTH
#define S_IROTH 0000004        /* read permission, other */
#endif
#ifndef S_IWUSR
#define S_IWUSR 0000200        /* write permission, owner */
#endif
#ifndef S_IWGRP
#define S_IWGRP 0000020        /* write permission, group */
#endif
#ifndef S_IWOTH
#define S_IWOTH 0000002        /* write permission, other */
#endif
#ifndef S_IXUSR
#define S_IXUSR 0000100        /* execute/search permission, owner */
#endif
#ifndef S_IXGRP
#define S_IXGRP 0000010        /* execute/search permission, group */
#endif
#ifndef S_IXOTH
#define S_IXOTH 0000001        /* execute/search permission, other */
#endif
#ifndef S_IRWXU
#define S_IRWXU 0000700        /* read, write, execute permissions, owner */
#endif
#ifndef S_IRWXG
#define S_IRWXG 0000070        /* read, write, execute permissions, group */
#endif
#ifndef S_IRWXO
#define S_IRWXO 0000007        /* read, write, execute permissions, other */
#endif
#ifndef S_ISBLK
#define S_ISBLK(mode)  (((mode) & (0170000)) == (0060000))
#endif
#ifndef S_ISCHR
#define S_ISCHR(mode)  (((mode) & (0170000)) == (0020000))
#endif
#ifndef S_ISDIR
#define S_ISDIR(mode)  (((mode) & (0170000)) == (0040000))
#endif
#ifndef S_ISFIFO
#define S_ISFIFO(mode) (((mode) & (0170000)) == (0010000))
#endif
#ifndef S_ISREG
#define S_ISREG(mode)  (((mode) & (0170000)) == (0100000))
#endif
/* Do not trust WORDS_BIGENDIAN from configure since -arch compiler flag may
   result in a different endian.  Instead trust __BIG_ENDIAN__ and
   __LITTLE_ENDIAN__ which are set correctly by -arch. */
#undef WORDS_BIGENDIAN
#ifdef __BIG_ENDIAN__
#define WORDS_BIGENDIAN
#endif
#ifndef __APPLE__
/* NextStep, OpenStep (but not Rhapsody) */
#ifndef GETPGRP_VOID
#define GETPGRP_VOID 1
#endif
#ifndef WNOHANG
#define WNOHANG 01
#endif
#ifndef WUNTRACED
#define WUNTRACED 02
#endif
#ifndef X_OK
#define X_OK 1
#endif
#endif /* __APPLE__ */
#endif /* NeXT */

#ifdef _WIN32
#include "win32/win32.h"
#endif

#if defined(__VMS)
#include "vms/vms.h"
#endif

#if defined(__BEOS__)
#include <net/socket.h> /* intern.h needs fd_set definition */
#endif

#ifdef RUBY_EXPORT
#undef RUBY_EXTERN
#endif

#ifndef RUBY_EXTERN
#define RUBY_EXTERN extern
#endif

#ifndef EXTERN
#define EXTERN RUBY_EXTERN      /* deprecated */
#endif

#ifndef RUBY_MBCHAR_MAXSIZE
#define RUBY_MBCHAR_MAXSIZE INT_MAX
        /* MB_CUR_MAX will not work well in C locale */
#endif

#if defined(sparc) || defined(__sparc__)
static inline void
flush_register_windows(void)
{
    asm
#ifdef __GNUC__
        volatile
#endif
# if defined(__sparc_v9__) || defined(__sparcv9) || defined(__arch64__)
        ("flushw")
# elif defined(linux) || defined(__linux__)
        ("ta  0x83")
# else /* Solaris, OpenBSD, NetBSD, etc. */
        ("ta  0x03")
# endif /* trap always to flush register windows if we are on a Sparc system */
        ;
}
#  define FLUSH_REGISTER_WINDOWS flush_register_windows()
#elif defined(IA64)
void *rb_ia64_bsp(void);
void rb_ia64_flushrs(void);
#  define FLUSH_REGISTER_WINDOWS rb_ia64_flushrs()
#else
#  define FLUSH_REGISTER_WINDOWS ((void)0)
#endif

#if defined(DOSISH)
#define PATH_SEP ";"
#elif defined(riscos)
#define PATH_SEP ","
#else
#define PATH_SEP ":"
#endif
#define PATH_SEP_CHAR PATH_SEP[0]

#if defined(__human68k__)
#define PATH_ENV "path"
#else
#define PATH_ENV "PATH"
#endif

#if defined(DOSISH) && !defined(__human68k__) && !defined(__EMX__)
#define ENV_IGNORECASE
#endif

#ifndef RUBY_PLATFORM
#define RUBY_PLATFORM "unknown-unknown"
#endif

#endif
/* [<][>][^][v] [top][bottom][index] [help] */


dir.c

root/dir.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. emx_mblen
  2. CompareImpl
  3. bracket
  4. fnmatch_helper
  5. fnmatch
  6. free_dir
  7. dir_s_alloc
  8. dir_initialize
  9. dir_s_open
  10. dir_closed
  11. dir_inspect
  12. dir_path
  13. dir_read
  14. dir_each
  15. dir_tell
  16. dir_seek
  17. dir_set_pos
  18. dir_rewind
  19. dir_close
  20. dir_chdir
  21. chdir_yield
  22. chdir_restore
  23. dir_s_chdir
  24. dir_s_getwd
  25. check_dirname
  26. dir_s_chroot
  27. dir_s_mkdir
  28. dir_s_rmdir
  29. do_stat
  30. do_lstat
  31. do_opendir
  32. has_magic
  33. find_dirsep
  34. remove_backslashes
  35. glob_make_pattern
  36. glob_free_pattern
  37. join_path
  38. glob_func_caller
  39. glob_helper
  40. ruby_glob0
  41. ruby_glob
  42. rb_glob_caller
  43. rb_glob2
  44. rb_glob
  45. push_pattern
  46. ruby_brace_expand
  47. glob_brace
  48. ruby_brace_glob0
  49. ruby_brace_glob
  50. push_glob
  51. rb_push_glob
  52. dir_globs
  53. dir_s_aref
  54. dir_s_glob
  55. dir_open_dir
  56. dir_foreach
  57. dir_entries
  58. file_s_fnmatch
  59. Init_Dir
/**********************************************************************

  dir.c -

  $Author: nobu $
  $Date: 2005/12/14 14:40:14 $
  created at: Wed Jan  5 09:51:01 JST 1994

  Copyright (C) 1993-2003 Yukihiro Matsumoto
  Copyright (C) 2000  Network Applied Communication Laboratory, Inc.
  Copyright (C) 2000  Information-technology Promotion Agency, Japan

**********************************************************************/

#include "ruby.h"

#include <sys/types.h>
#include <sys/stat.h>

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#if defined HAVE_DIRENT_H && !defined _WIN32
# include <dirent.h>
# define NAMLEN(dirent) strlen((dirent)->d_name)
#elif defined HAVE_DIRECT_H && !defined _WIN32
# include <direct.h>
# define NAMLEN(dirent) strlen((dirent)->d_name)
#else
# define dirent direct
# if !defined __NeXT__
#  define NAMLEN(dirent) (dirent)->d_namlen
# else
#  /* On some versions of NextStep, d_namlen is always zero, so avoid it. */
#  define NAMLEN(dirent) strlen((dirent)->d_name)
# endif
# if HAVE_SYS_NDIR_H
#  include <sys/ndir.h>
# endif
# if HAVE_SYS_DIR_H
#  include <sys/dir.h>
# endif
# if HAVE_NDIR_H
#  include <ndir.h>
# endif
# ifdef _WIN32
#  include "win32/dir.h"
# endif
#endif

#include <errno.h>

#ifndef HAVE_STDLIB_H
char *getenv();
#endif

#ifndef HAVE_STRING_H
char *strchr(char*,char);
#endif

#include <ctype.h>

#include "util.h"

#if !defined HAVE_LSTAT && !defined lstat
#define lstat stat
#endif

#ifndef CASEFOLD_FILESYSTEM
# if defined DOSISH || defined __VMS
#   define CASEFOLD_FILESYSTEM 1
# else
#   define CASEFOLD_FILESYSTEM 0
# endif
#endif

#define FNM_NOESCAPE    0x01
#define FNM_PATHNAME    0x02
#define FNM_DOTMATCH    0x04
#define FNM_CASEFOLD    0x08
#if CASEFOLD_FILESYSTEM
#define FNM_SYSCASE     FNM_CASEFOLD
#else
#define FNM_SYSCASE     0
#endif

#define FNM_NOMATCH     1
#define FNM_ERROR       2

#define downcase(c) (nocase && ISUPPER(c) ? tolower(c) : (c))
#define compare(c1, c2) (((unsigned char)(c1)) - ((unsigned char)(c2)))

/* caution: in case *p == '\0'
   Next(p) == p + 1 in single byte environment
   Next(p) == p     in multi byte environment
*/
#if defined(CharNext)
# define Next(p) CharNext(p)
#elif defined(DJGPP)
# define Next(p) ((p) + mblen(p, RUBY_MBCHAR_MAXSIZE))
#elif defined(__EMX__)
# define Next(p) ((p) + emx_mblen(p))
static inline int
emx_mblen(p)
    const char *p;
{
    int n = mblen(p, RUBY_MBCHAR_MAXSIZE);
    return (n < 0) ? 1 : n;
}
#endif

#ifndef Next /* single byte environment */
# define Next(p) ((p) + 1)
# define Inc(p) (++(p))
# define Compare(p1, p2) (compare(downcase(*(p1)), downcase(*(p2))))
#else /* multi byte environment */
# define Inc(p) ((p) = Next(p))
# define Compare(p1, p2) (CompareImpl(p1, p2, nocase))
static int
CompareImpl(const char *p1, const char *p2, int nocase)
{
    const int len1 = Next(p1) - p1;
    const int len2 = Next(p2) - p2;
#ifdef _WIN32
    char buf1[10], buf2[10]; /* large enough? */
#endif

    if (len1 < 0 || len2 < 0) {
        rb_fatal("CompareImpl: negative len");
    }

    if (len1 == 0) return  len2;
    if (len2 == 0) return -len1;

#ifdef _WIN32
    if (nocase && rb_w32_iswinnt()) {
        if (len1 > 1) {
            if (len1 >= sizeof(buf1)) {
                rb_fatal("CompareImpl: too large len");
            }
            memcpy(buf1, p1, len1);
            buf1[len1] = '\0';
            CharLower(buf1);
            p1 = buf1; /* trick */
        }
        if (len2 > 1) {
            if (len2 >= sizeof(buf2)) {
                rb_fatal("CompareImpl: too large len");
            }
            memcpy(buf2, p2, len2);
            buf2[len2] = '\0';
            CharLower(buf2);
            p2 = buf2; /* trick */
        }
    }
#endif
    if (len1 == 1)
        if (len2 == 1)
            return compare(downcase(*p1), downcase(*p2));
        else {
            const int ret = compare(downcase(*p1), *p2);
            return ret ? ret : -1;
        }
    else
        if (len2 == 1) {
            const int ret = compare(*p1, downcase(*p2));
            return ret ? ret : 1;
        }
        else {
            const int ret = memcmp(p1, p2, len1 < len2 ? len1 : len2);
            return ret ? ret : len1 - len2;
        }
}
#endif /* environment */

static char *
bracket(
    const char *p, /* pattern (next to '[') */
    const char *s, /* string */
    int flags)
{
    const int nocase = flags & FNM_CASEFOLD;
    const int escape = !(flags & FNM_NOESCAPE);

    int ok = 0, not = 0;

    if (*p == '!' || *p == '^') {
        not = 1;
        p++;
    }

    while (*p != ']') {
        const char *t1 = p;
        if (escape && *t1 == '\\')
            t1++;
        if (!*t1)
            return NULL;
        p = Next(t1);
        if (p[0] == '-' && p[1] != ']') {
            const char *t2 = p + 1;
            if (escape && *t2 == '\\')
                t2++;
            if (!*t2)
                return NULL;
            p = Next(t2);
            if (!ok && Compare(t1, s) <= 0 && Compare(s, t2) <= 0)
                ok = 1;
        }
        else
            if (!ok && Compare(t1, s) == 0)
                ok = 1;
    }

    return ok == not ? NULL : (char *)p + 1;
}

/* If FNM_PATHNAME is set, only path element will be matched. (upto '/' or '\0')
   Otherwise, entire string will be matched.
   End marker itself won't be compared.
   And if function succeeds, *pcur reaches end marker.
*/
#define UNESCAPE(p) (escape && *(p) == '\\' ? (p) + 1 : (p))
#define ISEND(p) (!*(p) || (pathname && *(p) == '/'))
#define RETURN(val) return *pcur = p, *scur = s, (val);

static int
fnmatch_helper(
    const char **pcur, /* pattern */
    const char **scur, /* string */
    int flags)
{
    const int period = !(flags & FNM_DOTMATCH);
    const int pathname = flags & FNM_PATHNAME;
    const int escape = !(flags & FNM_NOESCAPE);
    const int nocase = flags & FNM_CASEFOLD;

    const char *ptmp = 0;
    const char *stmp = 0;

    const char *p = *pcur;
    const char *s = *scur;

    if (period && *s == '.' && *UNESCAPE(p) != '.') /* leading period */
        RETURN(FNM_NOMATCH);

    while (1) {
        switch (*p) {
          case '*':
            do { p++; } while (*p == '*');
            if (ISEND(UNESCAPE(p))) {
                p = UNESCAPE(p);
                RETURN(0);
            }
            if (ISEND(s))
                RETURN(FNM_NOMATCH);
            ptmp = p;
            stmp = s;
            continue;

          case '?':
            if (ISEND(s))
                RETURN(FNM_NOMATCH);
            p++;
            Inc(s);
            continue;

          case '[': {
            const char *t;
            if (ISEND(s))
                RETURN(FNM_NOMATCH);
            if (t = bracket(p + 1, s, flags)) {
                p = t;
                Inc(s);
                continue;
            }
            goto failed;
          }
        }

        /* ordinary */
        p = UNESCAPE(p);
        if (ISEND(s))
            RETURN(ISEND(p) ? 0 : FNM_NOMATCH);
        if (ISEND(p))
            goto failed;
        if (Compare(p, s) != 0)
            goto failed;
        Inc(p);
        Inc(s);
        continue;

      failed: /* try next '*' position */
        if (ptmp && stmp) {
            p = ptmp;
            Inc(stmp); /* !ISEND(*stmp) */
            s = stmp;
            continue;
        }
        RETURN(FNM_NOMATCH);
    }
}

static int
fnmatch(
    const char *p, /* pattern */
    const char *s, /* string */
    int flags)
{
    const int period = !(flags & FNM_DOTMATCH);
    const int pathname = flags & FNM_PATHNAME;

    const char *ptmp = 0;
    const char *stmp = 0;

    if (pathname) {
        while (1) {
            if (p[0] == '*' && p[1] == '*' && p[2] == '/') {
                do { p += 3; } while (p[0] == '*' && p[1] == '*' && p[2] == '/');
                ptmp = p;
                stmp = s;
            }
            if (fnmatch_helper(&p, &s, flags) == 0) {
                while (*s && *s != '/') Inc(s);
                if (*p && *s) {
                    p++;
                    s++;
                    continue;
                }
                if (!*p && !*s)
                    return 0;
            }
            /* failed : try next recursion */
            if (ptmp && stmp && !(period && *stmp == '.')) {
                while (*stmp && *stmp != '/') Inc(stmp);
                if (*stmp) {
                    p = ptmp;
                    stmp++;
                    s = stmp;
                    continue;
                }
            }
            return FNM_NOMATCH;
        }
    }
    else
        return fnmatch_helper(&p, &s, flags);
}

VALUE rb_cDir;

struct dir_data {
    DIR *dir;
    char *path;
};

static void
free_dir(struct dir_data *dir)
{
    if (dir) {
        if (dir->dir) closedir(dir->dir);
        if (dir->path) free(dir->path);
    }
    free(dir);
}

static VALUE dir_close(VALUE);

static VALUE
dir_s_alloc(VALUE klass)
{
    struct dir_data *dirp;
    VALUE obj = Data_Make_Struct(klass, struct dir_data, 0, free_dir, dirp);

    dirp->dir = NULL;
    dirp->path = NULL;

    return obj;
}

/*
 *  call-seq:
 *     Dir.new( string ) -> aDir
 *
 *  Returns a new directory object for the named directory.
 */
static VALUE
dir_initialize(VALUE dir, VALUE dirname)
{
    struct dir_data *dp;

    FilePathValue(dirname);
    Data_Get_Struct(dir, struct dir_data, dp);
    if (dp->dir) closedir(dp->dir);
    if (dp->path) free(dp->path);
    dp->dir = NULL;
    dp->path = NULL;
    dp->dir = opendir(RSTRING(dirname)->ptr);
    if (dp->dir == NULL) {
        if (errno == EMFILE || errno == ENFILE) {
            rb_gc();
            dp->dir = opendir(RSTRING(dirname)->ptr);
        }
        if (dp->dir == NULL) {
            rb_sys_fail(RSTRING(dirname)->ptr);
        }
    }
    dp->path = strdup(RSTRING(dirname)->ptr);

    return dir;
}

/*
 *  call-seq:
 *     Dir.open( string ) => aDir
 *     Dir.open( string ) {| aDir | block } => anObject
 *
 *  With no block, <code>open</code> is a synonym for
 *  <code>Dir::new</code>. If a block is present, it is passed
 *  <i>aDir</i> as a parameter. The directory is closed at the end of
 *  the block, and <code>Dir::open</code> returns the value of the
 *  block.
 */
static VALUE
dir_s_open(VALUE klass, VALUE dirname)
{
    struct dir_data *dp;
    VALUE dir = Data_Make_Struct(klass, struct dir_data, 0, free_dir, dp);

    dir_initialize(dir, dirname);
    if (rb_block_given_p()) {
        return rb_ensure(rb_yield, dir, dir_close, dir);
    }

    return dir;
}

static void
dir_closed(void)
{
    rb_raise(rb_eIOError, "closed directory");
}

#define GetDIR(obj, dirp) do {\
    Data_Get_Struct(obj, struct dir_data, dirp);\
    if (dirp->dir == NULL) dir_closed();\
} while (0)

/*
 *  call-seq:
 *     dir.inspect => string
 *
 *  Return a string describing this Dir object.
 */
static VALUE
dir_inspect(VALUE dir)
{
    struct dir_data *dirp;

    GetDIR(dir, dirp);
    if (dirp->path) {
        char *c = rb_obj_classname(dir);
        int len = strlen(c) + strlen(dirp->path) + 4;
        VALUE s = rb_str_new(0, len);
        snprintf(RSTRING(s)->ptr, len+1, "#<%s:%s>", c, dirp->path);
        return s;
    }
    return rb_funcall(dir, rb_intern("to_s"), 0, 0);
}

/*
 *  call-seq:
 *     dir.path => string or nil
 *
 *  Returns the path parameter passed to <em>dir</em>'s constructor.
 *
 *     d = Dir.new("..")
 *     d.path   #=> ".."
 */
static VALUE
dir_path(VALUE dir)
{
    struct dir_data *dirp;

    GetDIR(dir, dirp);
    if (!dirp->path) return Qnil;
    return rb_str_new2(dirp->path);
}

/*
 *  call-seq:
 *     dir.read => string or nil
 *
 *  Reads the next entry from <em>dir</em> and returns it as a string.
 *  Returns <code>nil</code> at the end of the stream.
 *
 *     d = Dir.new("testdir")
 *     d.read   #=> "."
 *     d.read   #=> ".."
 *     d.read   #=> "config.h"
 */
static VALUE
dir_read(VALUE dir)
{
    struct dir_data *dirp;
    struct dirent *dp;

    GetDIR(dir, dirp);
    errno = 0;
    dp = readdir(dirp->dir);
    if (dp) {
        return rb_tainted_str_new(dp->d_name, NAMLEN(dp));
    }
    else if (errno == 0) {      /* end of stream */
        return Qnil;
    }
    else {
        rb_sys_fail(0);
    }
    return Qnil;                /* not reached */
}

/*
 *  call-seq:
 *     dir.each { |filename| block }  => dir
 *
 *  Calls the block once for each entry in this directory, passing the
 *  filename of each entry as a parameter to the block.
 *
 *     d = Dir.new("testdir")
 *     d.each  {|x| puts "Got #{x}" }
 *
 *  <em>produces:</em>
 *
 *     Got .
 *     Got ..
 *     Got config.h
 *     Got main.rb
 */
static VALUE
dir_each(VALUE dir)
{
    struct dir_data *dirp;
    struct dirent *dp;

    RETURN_ENUMERATOR(dir, 0, 0);
    GetDIR(dir, dirp);
    rewinddir(dirp->dir);
    for (dp = readdir(dirp->dir); dp != NULL; dp = readdir(dirp->dir)) {
        rb_yield(rb_tainted_str_new(dp->d_name, NAMLEN(dp)));
        if (dirp->dir == NULL) dir_closed();
    }
    return dir;
}

/*
 *  call-seq:
 *     dir.pos => integer
 *     dir.tell => integer
 *
 *  Returns the current position in <em>dir</em>. See also
 *  <code>Dir#seek</code>.
 *
 *     d = Dir.new("testdir")
 *     d.tell   #=> 0
 *     d.read   #=> "."
 *     d.tell   #=> 12
 */
static VALUE
dir_tell(VALUE dir)
{
#ifdef HAVE_TELLDIR
    struct dir_data *dirp;
    long pos;

    GetDIR(dir, dirp);
    pos = telldir(dirp->dir);
    return rb_int2inum(pos);
#else
    rb_notimplement();
#endif
}

/*
 *  call-seq:
 *     dir.seek( integer ) => dir
 *
 *  Seeks to a particular location in <em>dir</em>. <i>integer</i>
 *  must be a value returned by <code>Dir#tell</code>.
 *
 *     d = Dir.new("testdir")   #=> #<Dir:0x401b3c40>
 *     d.read                   #=> "."
 *     i = d.tell               #=> 12
 *     d.read                   #=> ".."
 *     d.seek(i)                #=> #<Dir:0x401b3c40>
 *     d.read                   #=> ".."
 */
static VALUE
dir_seek(VALUE dir, VALUE pos)
{
    struct dir_data *dirp;
    off_t p = NUM2OFFT(pos);

    GetDIR(dir, dirp);
#ifdef HAVE_SEEKDIR
    seekdir(dirp->dir, p);
    return dir;
#else
    rb_notimplement();
#endif
}

/*
 *  call-seq:
 *     dir.pos( integer ) => integer
 *
 *  Synonym for <code>Dir#seek</code>, but returns the position
 *  parameter.
 *
 *     d = Dir.new("testdir")   #=> #<Dir:0x401b3c40>
 *     d.read                   #=> "."
 *     i = d.pos                #=> 12
 *     d.read                   #=> ".."
 *     d.pos = i                #=> 12
 *     d.read                   #=> ".."
 */
static VALUE
dir_set_pos(VALUE dir, VALUE pos)
{
    dir_seek(dir, pos);
    return pos;
}

/*
 *  call-seq:
 *     dir.rewind => dir
 *
 *  Repositions <em>dir</em> to the first entry.
 *
 *     d = Dir.new("testdir")
 *     d.read     #=> "."
 *     d.rewind   #=> #<Dir:0x401b3fb0>
 *     d.read     #=> "."
 */
static VALUE
dir_rewind(VALUE dir)
{
    struct dir_data *dirp;

    GetDIR(dir, dirp);
    rewinddir(dirp->dir);
    return dir;
}

/*
 *  call-seq:
 *     dir.close => nil
 *
 *  Closes the directory stream. Any further attempts to access
 *  <em>dir</em> will raise an <code>IOError</code>.
 *
 *     d = Dir.new("testdir")
 *     d.close   #=> nil
 */
static VALUE
dir_close(VALUE dir)
{
    struct dir_data *dirp;

    GetDIR(dir, dirp);
    closedir(dirp->dir);
    dirp->dir = NULL;

    return Qnil;
}

static void
dir_chdir(VALUE path)
{
    if (chdir(RSTRING(path)->ptr) < 0)
        rb_sys_fail(RSTRING(path)->ptr);
}

static int chdir_blocking = 0;
static VALUE chdir_thread = Qnil;

struct chdir_data {
    VALUE old_path, new_path;
    int done;
};

static VALUE
chdir_yield(struct chdir_data *args)
{
    dir_chdir(args->new_path);
    args->done = Qtrue;
    chdir_blocking++;
    if (chdir_thread == Qnil)
        chdir_thread = rb_thread_current();
    return rb_yield(args->new_path);
}

static VALUE
chdir_restore(struct chdir_data *args)
{
    if (args->done) {
        chdir_blocking--;
        if (chdir_blocking == 0)
            chdir_thread = Qnil;
        dir_chdir(args->old_path);
    }
    return Qnil;
}

/*
 *  call-seq:
 *     Dir.chdir( [ string] ) => 0
 *     Dir.chdir( [ string] ) {| path | block }  => anObject
 *
 *  Changes the current working directory of the process to the given
 *  string. When called without an argument, changes the directory to
 *  the value of the environment variable <code>HOME</code>, or
 *  <code>LOGDIR</code>. <code>SystemCallError</code> (probably
 *  <code>Errno::ENOENT</code>) if the target directory does not exist.
 *
 *  If a block is given, it is passed the name of the new current
 *  directory, and the block is executed with that as the current
 *  directory. The original working directory is restored when the block
 *  exits. The return value of <code>chdir</code> is the value of the
 *  block. <code>chdir</code> blocks can be nested, but in a
 *  multi-threaded program an error will be raised if a thread attempts
 *  to open a <code>chdir</code> block while another thread has one
 *  open.
 *
 *     Dir.chdir("/var/spool/mail")
 *     puts Dir.pwd
 *     Dir.chdir("/tmp") do
 *       puts Dir.pwd
 *       Dir.chdir("/usr") do
 *         puts Dir.pwd
 *       end
 *       puts Dir.pwd
 *     end
 *     puts Dir.pwd
 *
 *  <em>produces:</em>
 *
 *     /var/spool/mail
 *     /tmp
 *     /usr
 *     /tmp
 *     /var/spool/mail
 */
static VALUE
dir_s_chdir(int argc, VALUE *argv, VALUE obj)
{
    VALUE path = Qnil;

    rb_secure(2);
    if (rb_scan_args(argc, argv, "01", &path) == 1) {
        FilePathValue(path);
    }
    else {
        const char *dist = getenv("HOME");
        if (!dist) {
            dist = getenv("LOGDIR");
            if (!dist) rb_raise(rb_eArgError, "HOME/LOGDIR not set");
        }
        path = rb_str_new2(dist);
    }

    if (chdir_blocking > 0) {
        if (!rb_block_given_p() || rb_thread_current() != chdir_thread)
            rb_warn("conflicting chdir during another chdir block");
    }

    if (rb_block_given_p()) {
        struct chdir_data args;
        char *cwd = my_getcwd();

        args.old_path = rb_tainted_str_new2(cwd); free(cwd);
        args.new_path = path;
        args.done = Qfalse;
        return rb_ensure(chdir_yield, (VALUE)&args, chdir_restore, (VALUE)&args);
    }
    dir_chdir(path);

    return INT2FIX(0);
}

/*
 *  call-seq:
 *     Dir.getwd => string
 *     Dir.pwd => string
 *
 *  Returns the path to the current working directory of this process as
 *  a string.
 *
 *     Dir.chdir("/tmp")   #=> 0
 *     Dir.getwd           #=> "/tmp"
 */
static VALUE
dir_s_getwd(VALUE dir)
{
    char *path;
    VALUE cwd;

    rb_secure(4);
    path = my_getcwd();
    cwd = rb_tainted_str_new2(path);

    free(path);
    return cwd;
}

static void
check_dirname(volatile VALUE *dir)
{
    char *path, *pend;

    rb_secure(2);
    FilePathValue(*dir);
    path = RSTRING(*dir)->ptr;
    if (path && *(pend = rb_path_end(rb_path_skip_prefix(path)))) {
        *dir = rb_str_new(path, pend - path);
    }
}

/*
 *  call-seq:
 *     Dir.chroot( string ) => 0
 *
 *  Changes this process's idea of the file system root. Only a
 *  privileged process may make this call. Not available on all
 *  platforms. On Unix systems, see <code>chroot(2)</code> for more
 *  information.
 */
static VALUE
dir_s_chroot(VALUE dir, VALUE path)
{
#if defined(HAVE_CHROOT) && !defined(__CHECKER__)
    check_dirname(&path);

    if (chroot(RSTRING(path)->ptr) == -1)
        rb_sys_fail(RSTRING(path)->ptr);

    return INT2FIX(0);
#else
    rb_notimplement();
    return Qnil;                /* not reached */
#endif
}

/*
 *  call-seq:
 *     Dir.mkdir( string [, integer] ) => 0
 *
 *  Makes a new directory named by <i>string</i>, with permissions
 *  specified by the optional parameter <i>anInteger</i>. The
 *  permissions may be modified by the value of
 *  <code>File::umask</code>, and are ignored on NT. Raises a
 *  <code>SystemCallError</code> if the directory cannot be created. See
 *  also the discussion of permissions in the class documentation for
 *  <code>File</code>.
 *
 */
static VALUE
dir_s_mkdir(int argc, VALUE *argv, VALUE obj)
{
    VALUE path, vmode;
    int mode;

    if (rb_scan_args(argc, argv, "11", &path, &vmode) == 2) {
        mode = NUM2INT(vmode);
    }
    else {
        mode = 0777;
    }

    check_dirname(&path);
    if (mkdir(RSTRING(path)->ptr, mode) == -1)
        rb_sys_fail(RSTRING(path)->ptr);

    return INT2FIX(0);
}

/*
 *  call-seq:
 *     Dir.delete( string ) => 0
 *     Dir.rmdir( string ) => 0
 *     Dir.unlink( string ) => 0
 *
 *  Deletes the named directory. Raises a subclass of
 *  <code>SystemCallError</code> if the directory isn't empty.
 */
static VALUE
dir_s_rmdir(VALUE obj, VALUE dir)
{
    check_dirname(&dir);
    if (rmdir(RSTRING(dir)->ptr) < 0)
        rb_sys_fail(RSTRING(dir)->ptr);

    return INT2FIX(0);
}

#define GLOB_VERBOSE    (1 << (sizeof(int) * CHAR_BIT - 1))
#define sys_warning(val) \
    ((flags & GLOB_VERBOSE) && rb_protect((VALUE (*)(VALUE))rb_sys_warning, (VALUE)(val), 0))

/* System call with warning */
static int
do_stat(const char *path, struct stat *pst, int flags)

{
    int ret = stat(path, pst);
    if (ret < 0 && errno != ENOENT)
        sys_warning(path);

    return ret;
}

static int
do_lstat(const char *path, struct stat *pst, int flags)
{
    int ret = lstat(path, pst);
    if (ret < 0 && errno != ENOENT)
        sys_warning(path);

    return ret;
}

static DIR *
do_opendir(const char *path, int flags)
{
    DIR *dirp = opendir(path);
    if (dirp == NULL && errno != ENOENT && errno != ENOTDIR)
        sys_warning(path);

    return dirp;
}

/* Return nonzero if S has any special globbing chars in it.  */
static int
has_magic(const char *s, int flags)
{
    const int escape = !(flags & FNM_NOESCAPE);
    const int nocase = flags & FNM_CASEFOLD;

    register const char *p = s;
    register char c;

    while (c = *p++) {
        switch (c) {
          case '*':
          case '?':
          case '[':
            return 1;

          case '\\':
            if (escape && !(c = *p++))
                return 0;
            continue;

          default:
            if (!FNM_SYSCASE && ISALPHA(c) && nocase)
                return 1;
        }

        p = Next(p-1);
    }

    return 0;
}

/* Find separator in globbing pattern. */
static char *
find_dirsep(const char *s, int flags)
{
    const int escape = !(flags & FNM_NOESCAPE);

    register const char *p = s;
    register char c;
    int open = 0;

    while (c = *p++) {
        switch (c) {
          case '[':
            open = 1;
            continue;
          case ']':
            open = 0;
            continue;

          case '/':
            if (!open)
                return (char *)p-1;
            continue;

          case '\\':
            if (escape && !(c = *p++))
                return (char *)p-1;
            continue;
        }

        p = Next(p-1);
    }

    return (char *)p-1;
}

/* Remove escaping baskclashes */
static void
remove_backslashes(char *p)
{
    char *t = p;
    char *s = p;

    while (*p) {
        if (*p == '\\') {
            if (t != s)
                memmove(t, s, p - s);
            t += p - s;
            s = ++p;
            if (!*p) break;
        }
        Inc(p);
    }

    while (*p++);

    if (t != s)
        memmove(t, s, p - s); /* move '\0' too */
}

/* Globing pattern */
enum glob_pattern_type { PLAIN, MAGICAL, RECURSIVE, MATCH_ALL, MATCH_DIR };

struct glob_pattern {
    char *str;
    enum glob_pattern_type type;
    struct glob_pattern *next;
};

static struct glob_pattern *
glob_make_pattern(const char *p, int flags)
{
    struct glob_pattern *list, *tmp, **tail = &list;
    int dirsep = 0; /* pattern is terminated with '/' */

    while (*p) {
        tmp = ALLOC(struct glob_pattern);
        if (p[0] == '*' && p[1] == '*' && p[2] == '/') {
            /* fold continuous RECURSIVEs (needed in glob_helper) */
            do { p += 3; } while (p[0] == '*' && p[1] == '*' && p[2] == '/');
            tmp->type = RECURSIVE;
            tmp->str = 0;
            dirsep = 1;
        }
        else {
            const char *m = find_dirsep(p, flags);
            char *buf = ALLOC_N(char, m-p+1);
            memcpy(buf, p, m-p);
            buf[m-p] = '\0';
            tmp->type = has_magic(buf, flags) ? MAGICAL : PLAIN;
            tmp->str = buf;
            if (*m) {
                dirsep = 1;
                p = m + 1;
            }
            else {
                dirsep = 0;
                p = m;
            }
        }
        *tail = tmp;
        tail = &tmp->next;
    }

    tmp = ALLOC(struct glob_pattern);
    tmp->type = dirsep ? MATCH_DIR : MATCH_ALL;
    tmp->str = 0;
    *tail = tmp;
    tmp->next = 0;

    return list;
}

static void
glob_free_pattern(struct glob_pattern *list)
{
    while (list) {
        struct glob_pattern *tmp = list;
        list = list->next;
        if (tmp->str)
            free(tmp->str);
        free(tmp);
    }
}

static char *
join_path(const char *path, int dirsep, const char *name)
{
    long len = strlen(path);
    char *buf = ALLOC_N(char, len+strlen(name)+(dirsep?1:0)+1);

    memcpy(buf, path, len);
    if (dirsep) {
        strcpy(buf+len, "/");
        len++;
    }
    strcpy(buf+len, name);
    return buf;
}

enum answer { YES, NO, UNKNOWN };

#ifndef S_ISDIR
#   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
#endif

#ifndef S_ISLNK
#  ifndef S_IFLNK
#    define S_ISLNK(m) (0)
#  else
#    define S_ISLNK(m) ((m & S_IFMT) == S_IFLNK)
#  endif
#endif

struct glob_args {
    void (*func)(const char *, VALUE);
    const char *path;
    VALUE value;
};

static VALUE
glob_func_caller(VALUE val)
{
    struct glob_args *args = (struct glob_args *)val;

    (*args->func)(args->path, args->value);
    return Qnil;
}

#define glob_call_func(func, path, arg) (*func)(path, arg)

static int
glob_helper(
    const char *path,
    int dirsep, /* '/' should be placed before appending child entry's name to 'path'. */
    enum answer exist, /* Does 'path' indicate an existing entry? */
    enum answer isdir, /* Does 'path' indicate a directory or a symlink to a directory? */
    struct glob_pattern **beg,
    struct glob_pattern **end,
    int flags,
    ruby_glob_func *func,
    VALUE arg)
{
    struct stat st;
    int status = 0;
    struct glob_pattern **cur, **new_beg, **new_end;
    int plain = 0, magical = 0, recursive = 0, match_all = 0, match_dir = 0;
    int escape = !(flags & FNM_NOESCAPE);

    for (cur = beg; cur < end; ++cur) {
        struct glob_pattern *p = *cur;
        if (p->type == RECURSIVE) {
            recursive = 1;
            p = p->next;
        }
        switch (p->type) {
        case PLAIN:
            plain = 1;
            break;
        case MAGICAL:
            magical = 1;
            break;
        case MATCH_ALL:
            match_all = 1;
            break;
        case MATCH_DIR:
            match_dir = 1;
            break;
        case RECURSIVE:
            rb_bug("continuous RECURSIVEs");
        }
    }

    if (*path) {
        if (match_all && exist == UNKNOWN) {
            if (do_lstat(path, &st, flags) == 0) {
                exist = YES;
                isdir = S_ISDIR(st.st_mode) ? YES : S_ISLNK(st.st_mode) ? UNKNOWN : NO;
            }
            else {
                exist = NO;
                isdir = NO;
            }
        }
        if (match_dir && isdir == UNKNOWN) {
            if (do_stat(path, &st, flags) == 0) {
                exist = YES;
                isdir = S_ISDIR(st.st_mode) ? YES : NO;
            }
            else {
                exist = NO;
                isdir = NO;
            }
        }
        if (match_all && exist == YES) {
            status = glob_call_func(func, path, arg);
            if (status) return status;
        }
        if (match_dir && isdir == YES) {
            char *tmp = join_path(path, dirsep, "");
            status = glob_call_func(func, tmp, arg);
            free(tmp);
            if (status) return status;
        }
    }

    if (exist == NO || isdir == NO) return 0;

    if (magical || recursive) {
        struct dirent *dp;
        DIR *dirp = do_opendir(*path ? path : ".", flags);
        if (dirp == NULL) return 0;

        for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp)) {
            char *buf = join_path(path, dirsep, dp->d_name);

            enum answer new_isdir = UNKNOWN;
            if (recursive && strcmp(dp->d_name, ".") != 0 && strcmp(dp->d_name, "..") != 0
                && fnmatch("*", dp->d_name, flags) == 0) {
#ifndef _WIN32
                if (do_lstat(buf, &st, flags) == 0)
                    new_isdir = S_ISDIR(st.st_mode) ? YES : S_ISLNK(st.st_mode) ? UNKNOWN : NO;
                else
                    new_isdir = NO;
#else
                new_isdir = dp->d_isdir ? (!dp->d_isrep ? YES : UNKNOWN) : NO;
#endif
            }

            new_beg = new_end = ALLOC_N(struct glob_pattern *, (end - beg) * 2);

            for (cur = beg; cur < end; ++cur) {
                struct glob_pattern *p = *cur;
                if (p->type == RECURSIVE) {
                    if (new_isdir == YES) /* not symlink but real directory */
                        *new_end++ = p; /* append recursive pattern */
                    p = p->next; /* 0 times recursion */
                }
                if (p->type == PLAIN || p->type == MAGICAL) {
                    if (fnmatch(p->str, dp->d_name, flags) == 0)
                        *new_end++ = p->next;
                }
            }

            status = glob_helper(buf, 1, YES, new_isdir, new_beg, new_end, flags, func, arg);
            free(buf);
            free(new_beg);
            if (status) break;
        }

        closedir(dirp);
    }
    else if (plain) {
        struct glob_pattern **copy_beg, **copy_end, **cur2;

        copy_beg = copy_end = ALLOC_N(struct glob_pattern *, end - beg);
        for (cur = beg; cur < end; ++cur)
            *copy_end++ = (*cur)->type == PLAIN ? *cur : 0;

        for (cur = copy_beg; cur < copy_end; ++cur) {
            if (*cur) {
                char *buf;
                char *name;
                name = ALLOC_N(char, strlen((*cur)->str) + 1);
                strcpy(name, (*cur)->str);
                if (escape) remove_backslashes(name);

                new_beg = new_end = ALLOC_N(struct glob_pattern *, end - beg);
                *new_end++ = (*cur)->next;
                for (cur2 = cur + 1; cur2 < copy_end; ++cur2) {
                    if (*cur2 && fnmatch((*cur2)->str, name, flags) == 0) {
                        *new_end++ = (*cur2)->next;
                        *cur2 = 0;
                    }
                }

                buf = join_path(path, dirsep, name);
                free(name);
                status = glob_helper(buf, 1, UNKNOWN, UNKNOWN, new_beg, new_end, flags, func, arg);
                free(buf);
                free(new_beg);
                if (status) break;
            }
        }

        free(copy_beg);
    }

    return status;
}

static int
ruby_glob0(const char *path, int flags, ruby_glob_func *func, VALUE arg)
{
    struct glob_pattern *list;
    const char *root, *start;
    char *buf;
    int n;
    int status;

    start = root = path;
    flags |= FNM_SYSCASE;
#if defined DOSISH
    root = rb_path_skip_prefix(root);
#endif

    if (root && *root == '/') root++;

    n = root - start;
    buf = ALLOC_N(char, n + 1);
    MEMCPY(buf, start, char, n);
    buf[n] = '\0';

    list = glob_make_pattern(root, flags);
    status = glob_helper(buf, 0, UNKNOWN, UNKNOWN, &list, &list + 1, flags, func, arg);
    glob_free_pattern(list);
    free(buf);

    return status;
}

int
ruby_glob(const char *path, int flags, ruby_glob_func *func, VALUE arg)
{
    return ruby_glob0(path, flags & ~GLOB_VERBOSE, func, arg);
}

static int
rb_glob_caller(const char *path, VALUE a)
{
    int status;
    struct glob_args *args = (struct glob_args *)a;

    args->path = path;
    rb_protect(glob_func_caller, a, &status);
    return status;
}

static int
rb_glob2(const char *path, int flags, void (*func)(const char *, VALUE), VALUE arg)
{
    struct glob_args args;

    args.func = func;
    args.value = arg;

    if (flags & FNM_SYSCASE) {
        rb_warning("Dir.glob() ignores File::FNM_CASEFOLD");
    }

    return ruby_glob0(path, flags | GLOB_VERBOSE, rb_glob_caller, (VALUE)&args);
}

void
rb_glob(const char *path, void (*func)(const char *, VALUE), VALUE arg)
{
    int status = rb_glob2(path, 0, func, arg);
    if (status) rb_jump_tag(status);
}

static void
push_pattern(const char *path, VALUE ary)
{
    rb_ary_push(ary, rb_tainted_str_new2(path));
}

int
ruby_brace_expand(const char *str, int flags, ruby_glob_func *func, VALUE arg)
{
    const int escape = !(flags & FNM_NOESCAPE);
    const char *p = str;
    const char *s = p;
    const char *lbrace = 0, *rbrace = 0;
    int nest = 0, status = 0;

    while (*p) {
        if (*p == '{' && nest++ == 0) {
            lbrace = p;
        }
        if (*p == '}' && --nest <= 0) {
            rbrace = p;
            break;
        }
        if (*p == '\\' && escape) {
            if (!*++p) break;
        }
        Inc(p);
    }

    if (lbrace && rbrace) {
        char *buf = ALLOC_N(char, strlen(s) + 1);
        long shift;

        memcpy(buf, s, lbrace-s);
        shift = (lbrace-s);
        p = lbrace;
        while (p < rbrace) {
            const char *t = ++p;
            nest = 0;
            while (p < rbrace && !(*p == ',' && nest == 0)) {
                if (*p == '{') nest++;
                if (*p == '}') nest--;
                if (*p == '\\' && escape) {
                    if (++p == rbrace) break;
                }
                Inc(p);
            }
            memcpy(buf+shift, t, p-t);
            strcpy(buf+shift+(p-t), rbrace+1);
            status = ruby_brace_expand(buf, flags, func, arg);
            if (status) break;
        }
        free(buf);
    }
    else if (!lbrace && !rbrace) {
        status = (*func)(s, arg);
    }

    return status;
}

struct brace_args {
    ruby_glob_func *func;
    VALUE value;
    int flags;
};

static int
glob_brace(const char *path, VALUE val)
{
    struct brace_args *arg = (struct brace_args *)val;

    return ruby_glob0(path, arg->flags, arg->func, arg->value);
}

static int
ruby_brace_glob0(const char *str, int flags, ruby_glob_func *func, VALUE arg)
{
    struct brace_args args;

    args.func = func;
    args.value = arg;
    args.flags = flags;
    return ruby_brace_expand(str, flags, glob_brace, (VALUE)&args);
}

int
ruby_brace_glob(const char *str, int flags, ruby_glob_func *func, VALUE arg)
{
    return ruby_brace_glob0(str, flags & ~GLOB_VERBOSE, func, arg);
}

static int
push_glob(VALUE ary, const char *str, int flags)
{
    struct glob_args args;

    args.func = push_pattern;
    args.value = ary;
    return ruby_brace_glob0(str, flags | GLOB_VERBOSE, rb_glob_caller, (VALUE)&args);
}

static VALUE
rb_push_glob(VALUE str, int flags) /* '\0' is delimiter */
{
    long offset = 0;
    VALUE ary;

    FilePathValue(str);

    ary = rb_ary_new();

    while (offset < RSTRING(str)->len) {
        int status = push_glob(ary, RSTRING(str)->ptr + offset, flags);
        char *p, *pend;
        if (status) rb_jump_tag(status);
        if (offset >= RSTRING(str)->len) break;
        p = RSTRING(str)->ptr + offset;
        p += strlen(p) + 1;
        pend = RSTRING(str)->ptr + RSTRING(str)->len;
        while (p < pend && !*p)
            p++;
        offset = p - RSTRING(str)->ptr;
    }

    return ary;
}

static VALUE
dir_globs(long argc, VALUE *argv, int flags)
{
    VALUE ary = rb_ary_new();
    long i;

    for (i = 0; i < argc; ++i) {
        int status;
        VALUE str = argv[i];
        FilePathValue(str);
        status = push_glob(ary, RSTRING(str)->ptr, flags);
        if (status) rb_jump_tag(status);
    }

    return ary;
}

/*
 *  call-seq:
 *     Dir[ array ]                 => array
 *     Dir[ string [, string ...] ] => array
 *
 *  Equivalent to calling
 *  <code>Dir.glob(</code><i>array,</i><code>0)</code> and
 *  <code>Dir.glob([</code><i>string,...</i><code>],0)</code>.
 *
 */
static VALUE
dir_s_aref(int argc, VALUE *argv, VALUE obj)
{
    if (argc == 1) {
        return rb_push_glob(argv[0], 0);
    }
    return dir_globs(argc, argv, 0);
}

/*
 *  call-seq:
 *     Dir.glob( pattern, [flags] ) => array
 *     Dir.glob( pattern, [flags] ) {| filename | block }  => nil
 *
 *  Returns the filenames found by expanding <i>pattern</i> which is
 *  an +Array+ of the patterns or the pattern +String+, either as an
 *  <i>array</i> or as parameters to the block. Note that this pattern
 *  is not a regexp (it's closer to a shell glob). See
 *  <code>File::fnmatch</code> for the meaning of the <i>flags</i>
 *  parameter. Note that case sensitivity depends on your system (so
 *  <code>File::FNM_CASEFOLD</code> is ignored)
 *
 *  <code>*</code>::        Matches any file. Can be restricted by
 *                          other values in the glob. <code>*</code>
 *                          will match all files; <code>c*</code> will
 *                          match all files beginning with
 *                          <code>c</code>; <code>*c</code> will match
 *                          all files ending with <code>c</code>; and
 *                          <code>*c*</code> will match all files that
 *                          have <code>c</code> in them (including at
 *                          the beginning or end). Equivalent to
 *                          <code>/ .* /x</code> in regexp.
 *  <code>**</code>::       Matches directories recursively.
 *  <code>?</code>::        Matches any one character. Equivalent to
 *                          <code>/.{1}/</code> in regexp.
 *  <code>[set]</code>::    Matches any one character in +set+.
 *                          Behaves exactly like character sets in
 *                          Regexp, including set negation
 *                          (<code>[^a-z]</code>).
 *  <code>{p,q}</code>::    Matches either literal <code>p</code> or
 *                          literal <code>q</code>. Matching literals
 *                          may be more than one character in length.
 *                          More than two literals may be specified.
 *                          Equivalent to pattern alternation in
 *                          regexp.
 *  <code>\</code>::        Escapes the next metacharacter.
 *
 *     Dir["config.?"]                     #=> ["config.h"]
 *     Dir.glob("config.?")                #=> ["config.h"]
 *     Dir.glob("*.[a-z][a-z]")            #=> ["main.rb"]
 *     Dir.glob("*.[^r]*")                 #=> ["config.h"]
 *     Dir.glob("*.{rb,h}")                #=> ["main.rb", "config.h"]
 *     Dir.glob("*")                       #=> ["config.h", "main.rb"]
 *     Dir.glob("*", File::FNM_DOTMATCH)   #=> [".", "..", "config.h", "main.rb"]
 *
 *     rbfiles = File.join("**", "*.rb")
 *     Dir.glob(rbfiles)                   #=> ["main.rb",
 *                                              "lib/song.rb",
 *                                              "lib/song/karaoke.rb"]
 *     libdirs = File.join("**", "lib")
 *     Dir.glob(libdirs)                   #=> ["lib"]
 *
 *     librbfiles = File.join("**", "lib", "**", "*.rb")
 *     Dir.glob(librbfiles)                #=> ["lib/song.rb",
 *                                              "lib/song/karaoke.rb"]
 *
 *     librbfiles = File.join("**", "lib", "*.rb")
 *     Dir.glob(librbfiles)                #=> ["lib/song.rb"]
 */
static VALUE
dir_s_glob(int argc, VALUE *argv, VALUE obj)
{
    VALUE str, rflags, ary;
    int flags;

    if (rb_scan_args(argc, argv, "11", &str, &rflags) == 2)
        flags = NUM2INT(rflags);
    else
        flags = 0;

    ary = rb_check_array_type(str);
    if (NIL_P(ary)) {
        ary = rb_push_glob(str, flags);
    }
    else {
        volatile VALUE v = ary;
        ary = dir_globs(RARRAY(ary)->len, RARRAY(ary)->ptr, flags);
    }

    if (rb_block_given_p()) {
        rb_ary_each(ary);
        return Qnil;
    }
    return ary;
}

static VALUE
dir_open_dir(VALUE path)
{
    VALUE dir = rb_funcall(rb_cDir, rb_intern("open"), 1, path);

    if (TYPE(dir) != T_DATA ||
        RDATA(dir)->dfree != (RUBY_DATA_FUNC)free_dir) {
        rb_raise(rb_eTypeError, "wrong argument type %s (expected Dir)",
                 rb_obj_classname(dir));
    }
    return dir;
}

/*
 *  call-seq:
 *     Dir.foreach( dirname ) {| filename | block }  => nil
 *
 *  Calls the block once for each entry in the named directory, passing
 *  the filename of each entry as a parameter to the block.
 *
 *     Dir.foreach("testdir") {|x| puts "Got #{x}" }
 *
 *  <em>produces:</em>
 *
 *     Got .
 *     Got ..
 *     Got config.h
 *     Got main.rb
 *
 */
static VALUE
dir_foreach(VALUE io, VALUE dirname)
{
    VALUE dir;

    dir = dir_open_dir(dirname);
    rb_ensure(dir_each, dir, dir_close, dir);
    return Qnil;
}

/*
 *  call-seq:
 *     Dir.entries( dirname ) => array
 *
 *  Returns an array containing all of the filenames in the given
 *  directory. Will raise a <code>SystemCallError</code> if the named
 *  directory doesn't exist.
 *
 *     Dir.entries("testdir")   #=> [".", "..", "config.h", "main.rb"]
 *
 */
static VALUE
dir_entries(VALUE io, VALUE dirname)
{
    VALUE dir;

    dir = dir_open_dir(dirname);
    return rb_ensure(rb_Array, dir, dir_close, dir);
}

/*
 *  call-seq:
 *     File.fnmatch( pattern, path, [flags] ) => (true or false)
 *     File.fnmatch?( pattern, path, [flags] ) => (true or false)
 *
 *  Returns true if <i>path</i> matches against <i>pattern</i> The
 *  pattern is not a regular expression; instead it follows rules
 *  similar to shell filename globbing. It may contain the following
 *  metacharacters:
 *
 *  <code>*</code>::        Matches any file. Can be restricted by
 *                          other values in the glob. <code>*</code>
 *                          will match all files; <code>c*</code> will
 *                          match all files beginning with
 *                          <code>c</code>; <code>*c</code> will match
 *                          all files ending with <code>c</code>; and
 *                          <code>*c*</code> will match all files that
 *                          have <code>c</code> in them (including at
 *                          the beginning or end). Equivalent to
 *                          <code>/ .* /x</code> in regexp.
 *  <code>**</code>::       Matches directories recursively or files
 *                          expansively.
 *  <code>?</code>::        Matches any one character. Equivalent to
 *                          <code>/.{1}/</code> in regexp.
 *  <code>[set]</code>::    Matches any one character in +set+.
 *                          Behaves exactly like character sets in
 *                          Regexp, including set negation
 *                          (<code>[^a-z]</code>).
 *  <code>\</code>::        Escapes the next metacharacter.
 *
 *  <i>flags</i> is a bitwise OR of the <code>FNM_xxx</code>
 *  parameters. The same glob pattern and flags are used by
 *  <code>Dir::glob</code>.
 *
 *     File.fnmatch('cat',       'cat')        #=> true  : match entire string
 *     File.fnmatch('cat',       'category')   #=> false : only match partial string
 *     File.fnmatch('c{at,ub}s', 'cats')       #=> false : { } isn't supported
 *
 *     File.fnmatch('c?t',     'cat')          #=> true  : '?' match only 1 character
 *     File.fnmatch('c??t',    'cat')          #=> false : ditto
 *     File.fnmatch('c*',      'cats')         #=> true  : '*' match 0 or more characters
 *     File.fnmatch('c*t',     'c/a/b/t')      #=> true  : ditto
 *     File.fnmatch('ca[a-z]', 'cat')          #=> true  : inclusive bracket expression
 *     File.fnmatch('ca[^t]',  'cat')          #=> false : exclusive bracket expression ('^' or '!')
 *
 *     File.fnmatch('cat', 'CAT')                     #=> false : case sensitive
 *     File.fnmatch('cat', 'CAT', File::FNM_CASEFOLD) #=> true  : case insensitive
 *
 *     File.fnmatch('?',   '/', File::FNM_PATHNAME)  #=> false : wildcard doesn't match '/' on FNM_PATHNAME
 *     File.fnmatch('*',   '/', File::FNM_PATHNAME)  #=> false : ditto
 *     File.fnmatch('[/]', '/', File::FNM_PATHNAME)  #=> false : ditto
 *
 *     File.fnmatch('\?',   '?')                       #=> true  : escaped wildcard becomes ordinary
 *     File.fnmatch('\a',   'a')                       #=> true  : escaped ordinary remains ordinary
 *     File.fnmatch('\a',   '\a', File::FNM_NOESCAPE)  #=> true  : FNM_NOESACPE makes '\' ordinary
 *     File.fnmatch('[\?]', '?')                       #=> true  : can escape inside bracket expression
 *
 *     File.fnmatch('*',   '.profile')                      #=> false : wildcard doesn't match leading
 *     File.fnmatch('*',   '.profile', File::FNM_DOTMATCH)  #=> true    period by default.
 *     File.fnmatch('.*',  '.profile')                      #=> true
 *
 *     rbfiles = File.join("**", "*.rb")
 *     File.fnmatch(rbfiles, 'main.rb')                    #=> false
 *     File.fnmatch(rbfiles, './main.rb')                  #=> false
 *     File.fnmatch(rbfiles, 'lib/song.rb')                #=> true
 *     File.fnmatch('**.rb', 'main.rb')                    #=> true
 *     File.fnmatch('**.rb', './main.rb')                  #=> false
 *     File.fnmatch('**.rb', 'lib/song.rb')                #=> true
 *     File.fnmatch('*',           'dave/.profile')                      #=> true
 *
 *     File.fnmatch('* IGNORE /*', 'dave/.profile', File::FNM_PATHNAME)  #=> false
 *     File.fnmatch('* IGNORE /*', 'dave/.profile', File::FNM_PATHNAME | File::FNM_DOTMATCH) #=> true
 *
 *     File.fnmatch('** IGNORE /foo', 'a/b/c/foo', File::FNM_PATHNAME)     #=> true
 *     File.fnmatch('** IGNORE /foo', '/a/b/c/foo', File::FNM_PATHNAME)    #=> true
 *     File.fnmatch('** IGNORE /foo', 'c:/a/b/c/foo', File::FNM_PATHNAME)  #=> true
 *     File.fnmatch('** IGNORE /foo', 'a/.b/c/foo', File::FNM_PATHNAME)    #=> false
 *     File.fnmatch('** IGNORE /foo', 'a/.b/c/foo', File::FNM_PATHNAME | File::FNM_DOTMATCH) #=> true
 */
static VALUE
file_s_fnmatch(int argc, VALUE *argv, VALUE obj)
{
    VALUE pattern, path;
    VALUE rflags;
    int flags;

    if (rb_scan_args(argc, argv, "21", &pattern, &path, &rflags) == 3)
        flags = NUM2INT(rflags);
    else
        flags = 0;

    StringValue(pattern);
    StringValue(path);

    if (fnmatch(RSTRING(pattern)->ptr, RSTRING(path)->ptr, flags) == 0)
        return Qtrue;

    return Qfalse;
}

/*
 *  Objects of class <code>Dir</code> are directory streams representing
 *  directories in the underlying file system. They provide a variety of
 *  ways to list directories and their contents. See also
 *  <code>File</code>.
 *
 *  The directory used in these examples contains the two regular files
 *  (<code>config.h</code> and <code>main.rb</code>), the parent
 *  directory (<code>..</code>), and the directory itself
 *  (<code>.</code>).
 */
void
Init_Dir(void)
{
    rb_cDir = rb_define_class("Dir", rb_cObject);

    rb_include_module(rb_cDir, rb_mEnumerable);

    rb_define_alloc_func(rb_cDir, dir_s_alloc);
    rb_define_singleton_method(rb_cDir, "open", dir_s_open, 1);
    rb_define_singleton_method(rb_cDir, "foreach", dir_foreach, 1);
    rb_define_singleton_method(rb_cDir, "entries", dir_entries, 1);

    rb_define_method(rb_cDir,"initialize", dir_initialize, 1);
    rb_define_method(rb_cDir,"path", dir_path, 0);
    rb_define_method(rb_cDir,"inspect", dir_inspect, 0);
    rb_define_method(rb_cDir,"read", dir_read, 0);
    rb_define_method(rb_cDir,"each", dir_each, 0);
    rb_define_method(rb_cDir,"rewind", dir_rewind, 0);
    rb_define_method(rb_cDir,"tell", dir_tell, 0);
    rb_define_method(rb_cDir,"seek", dir_seek, 1);
    rb_define_method(rb_cDir,"pos", dir_tell, 0);
    rb_define_method(rb_cDir,"pos=", dir_set_pos, 1);
    rb_define_method(rb_cDir,"close", dir_close, 0);

    rb_define_singleton_method(rb_cDir,"chdir", dir_s_chdir, -1);
    rb_define_singleton_method(rb_cDir,"getwd", dir_s_getwd, 0);
    rb_define_singleton_method(rb_cDir,"pwd", dir_s_getwd, 0);
    rb_define_singleton_method(rb_cDir,"chroot", dir_s_chroot, 1);
    rb_define_singleton_method(rb_cDir,"mkdir", dir_s_mkdir, -1);
    rb_define_singleton_method(rb_cDir,"rmdir", dir_s_rmdir, 1);
    rb_define_singleton_method(rb_cDir,"delete", dir_s_rmdir, 1);
    rb_define_singleton_method(rb_cDir,"unlink", dir_s_rmdir, 1);

    rb_define_singleton_method(rb_cDir,"glob", dir_s_glob, -1);
    rb_define_singleton_method(rb_cDir,"[]", dir_s_aref, -1);

    rb_define_singleton_method(rb_cFile,"fnmatch", file_s_fnmatch, -1);
    rb_define_singleton_method(rb_cFile,"fnmatch?", file_s_fnmatch, -1);

    rb_file_const("FNM_NOESCAPE", INT2FIX(FNM_NOESCAPE));
    rb_file_const("FNM_PATHNAME", INT2FIX(FNM_PATHNAME));
    rb_file_const("FNM_DOTMATCH", INT2FIX(FNM_DOTMATCH));
    rb_file_const("FNM_CASEFOLD", INT2FIX(FNM_CASEFOLD));
    rb_file_const("FNM_SYSCASE", INT2FIX(FNM_SYSCASE));
}
/* [<][>][^] [v] [top][bottom][index] [help] */


dln.c

root/dln.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. init_funcname_len
  2. load_header
  3. load_reloc
  4. load_sym
  5. sym_hash
  6. dln_init
  7. load_text_data
  8. undef_print
  9. dln_print_undef
  10. dln_undefined
  11. link_undef
  12. reloc_undef
  13. unlink_undef
  14. reloc_repl
  15. load_1
  16. search_undef
  17. load_lib
  18. load
  19. dln_sym
  20. dln_strerror
  21. aix_loaderror
  22. dln_load
  23. dln_find_exe
  24. dln_find_file
  25. conv_to_posix_path
  26. dln_find_1
/**********************************************************************

  dln.c -

  $Author: eban $
  $Date: 2005/11/26 11:00:22 $
  created at: Tue Jan 18 17:05:06 JST 1994

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#include "ruby.h"
#include "dln.h"

#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif

#ifdef __CHECKER__
#undef HAVE_DLOPEN
#undef USE_DLN_A_OUT
#undef USE_DLN_DLOPEN
#endif

#ifdef USE_DLN_A_OUT
char *dln_argv0;
#endif

#ifdef _AIX
#pragma alloca
#endif

#if defined(HAVE_ALLOCA_H)
#include <alloca.h>
#endif

#ifdef HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
#endif

#ifndef xmalloc
void *xmalloc();
void *xcalloc();
void *xrealloc();
#endif

#include <stdio.h>
#if defined(_WIN32) || defined(__VMS)
#include "missing/file.h"
#endif
#include <sys/types.h>
#include <sys/stat.h>

#ifndef S_ISDIR
#   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
#endif

#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
#ifndef MAXPATHLEN
# define MAXPATHLEN 1024
#endif

#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif

#ifndef _WIN32
char *getenv();
#endif

#if defined(__VMS)
#pragma builtins
#include <dlfcn.h>
#endif

#ifdef __MACOS__
# include <TextUtils.h>
# include <CodeFragments.h>
# include <Aliases.h>
# include "macruby_private.h"
#endif

#ifdef __BEOS__
# include <image.h>
#endif

int eaccess(const char *, int);

#ifndef NO_DLN_LOAD

#if defined(HAVE_DLOPEN) && !defined(USE_DLN_A_OUT) && !defined(_AIX) && !defined(__APPLE__) && !defined(_UNICOSMP)
/* dynamic load with dlopen() */
# define USE_DLN_DLOPEN
#endif

#ifndef FUNCNAME_PATTERN
# if defined(__hp9000s300) ||  (defined(__NetBSD__) && !defined(__ELF__)) || defined(__BORLANDC__) || (defined(__FreeBSD__) && !defined(__ELF__)) || (defined(__OpenBSD__) && !defined(__ELF__)) || defined(NeXT) || defined(__WATCOMC__) || defined(__APPLE__)
#  define FUNCNAME_PATTERN "_Init_%s"
# else
#  define FUNCNAME_PATTERN "Init_%s"
# endif
#endif

static int
init_funcname_len(char **buf, const char *file)
{
    char *p;
    const char *slash;
    int len;

    /* Load the file as an object one */
    for (slash = file-1; *file; file++) /* Find position of last '/' */
#ifdef __MACOS__
        if (*file == ':') slash = file;
#else
        if (*file == '/') slash = file;
#endif

    len = strlen(FUNCNAME_PATTERN) + strlen(slash + 1);
    *buf = xmalloc(len);
    snprintf(*buf, len, FUNCNAME_PATTERN, slash + 1);
    for (p = *buf; *p; p++) {         /* Delete suffix if it exists */
        if (*p == '.') {
            *p = '\0'; break;
        }
    }
    return p - *buf;
}

#define init_funcname(buf, file) do {\
    int len = init_funcname_len(buf, file);\
    char *tmp = ALLOCA_N(char, len+1);\
    if (!tmp) {\
        free(*buf);\
        rb_memerror();\
    }\
    strcpy(tmp, *buf);\
    free(*buf);\
    *buf = tmp;\
} while (0)

#ifdef USE_DLN_A_OUT

#ifndef LIBC_NAME
# define LIBC_NAME "libc.a"
#endif

#ifndef DLN_DEFAULT_LIB_PATH
#  define DLN_DEFAULT_LIB_PATH "/lib:/usr/lib:/usr/local/lib:."
#endif

#include <errno.h>

static int dln_errno;

#define DLN_ENOEXEC     ENOEXEC /* Exec format error */
#define DLN_ECONFL      1201    /* Symbol name conflict */
#define DLN_ENOINIT     1202    /* No initializer given */
#define DLN_EUNDEF      1203    /* Undefine symbol remains */
#define DLN_ENOTLIB     1204    /* Not a library file */
#define DLN_EBADLIB     1205    /* Malformed library file */
#define DLN_EINIT       1206    /* Not initialized */

static int dln_init_p = 0;

#include <ar.h>
#include <a.out.h>
#ifndef N_COMM
# define N_COMM 0x12
#endif
#ifndef N_MAGIC
# define N_MAGIC(x) (x).a_magic
#endif

#define INVALID_OBJECT(h) (N_MAGIC(h) != OMAGIC)

#include "util.h"
#include "st.h"

static st_table *sym_tbl;
static st_table *undef_tbl;

static int load_lib();

static int
load_header(fd, hdrp, disp)
    int fd;
    struct exec *hdrp;
    long disp;
{
    int size;

    lseek(fd, disp, 0);
    size = read(fd, hdrp, sizeof(struct exec));
    if (size == -1) {
        dln_errno = errno;
        return -1;
    }
    if (size != sizeof(struct exec) || N_BADMAG(*hdrp)) {
        dln_errno = DLN_ENOEXEC;
        return -1;
    }
    return 0;
}

#if defined(sequent)
#define RELOC_SYMBOL(r)                 ((r)->r_symbolnum)
#define RELOC_MEMORY_SUB_P(r)           ((r)->r_bsr)
#define RELOC_PCREL_P(r)                ((r)->r_pcrel || (r)->r_bsr)
#define RELOC_TARGET_SIZE(r)            ((r)->r_length)
#endif

/* Default macros */
#ifndef RELOC_ADDRESS
#define RELOC_ADDRESS(r)                ((r)->r_address)
#define RELOC_EXTERN_P(r)               ((r)->r_extern)
#define RELOC_SYMBOL(r)                 ((r)->r_symbolnum)
#define RELOC_MEMORY_SUB_P(r)           0
#define RELOC_PCREL_P(r)                ((r)->r_pcrel)
#define RELOC_TARGET_SIZE(r)            ((r)->r_length)
#endif

#if defined(sun) && defined(sparc)
/* Sparc (Sun 4) macros */
#  undef relocation_info
#  define relocation_info reloc_info_sparc
#  define R_RIGHTSHIFT(r)       (reloc_r_rightshift[(r)->r_type])
#  define R_BITSIZE(r)          (reloc_r_bitsize[(r)->r_type])
#  define R_LENGTH(r)           (reloc_r_length[(r)->r_type])
static int reloc_r_rightshift[] = {
  0, 0, 0, 0, 0, 0, 2, 2, 10, 0, 0, 0, 0, 0, 0,
};
static int reloc_r_bitsize[] = {
  8, 16, 32, 8, 16, 32, 30, 22, 22, 22, 13, 10, 32, 32, 16,
};
static int reloc_r_length[] = {
  0, 1, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
};
#  define R_PCREL(r) \
    ((r)->r_type >= RELOC_DISP8 && (r)->r_type <= RELOC_WDISP22)
#  define R_SYMBOL(r) ((r)->r_index)
#endif

#if defined(sequent)
#define R_SYMBOL(r)             ((r)->r_symbolnum)
#define R_MEMORY_SUB(r)         ((r)->r_bsr)
#define R_PCREL(r)              ((r)->r_pcrel || (r)->r_bsr)
#define R_LENGTH(r)             ((r)->r_length)
#endif

#ifndef R_SYMBOL
#  define R_SYMBOL(r)           ((r)->r_symbolnum)
#  define R_MEMORY_SUB(r)       0
#  define R_PCREL(r)            ((r)->r_pcrel)
#  define R_LENGTH(r)           ((r)->r_length)
#endif

static struct relocation_info *
load_reloc(fd, hdrp, disp)
     int fd;
     struct exec *hdrp;
     long disp;
{
    struct relocation_info *reloc;
    int size;

    lseek(fd, disp + N_TXTOFF(*hdrp) + hdrp->a_text + hdrp->a_data, 0);
    size = hdrp->a_trsize + hdrp->a_drsize;
    reloc = (struct relocation_info*)xmalloc(size);
    if (reloc == NULL) {
        dln_errno = errno;
        return NULL;
    }

    if (read(fd, reloc, size) !=  size) {
        dln_errno = errno;
        free(reloc);
        return NULL;
    }

    return reloc;
}

static struct nlist *
load_sym(fd, hdrp, disp)
    int fd;
    struct exec *hdrp;
    long disp;
{
    struct nlist * buffer;
    struct nlist * sym;
    struct nlist * end;
    long displ;
    int size;

    lseek(fd, N_SYMOFF(*hdrp) + hdrp->a_syms + disp, 0);
    if (read(fd, &size, sizeof(int)) != sizeof(int)) {
        goto err_noexec;
    }

    buffer = (struct nlist*)xmalloc(hdrp->a_syms + size);
    if (buffer == NULL) {
        dln_errno = errno;
        return NULL;
    }

    lseek(fd, disp + N_SYMOFF(*hdrp), 0);
    if (read(fd, buffer, hdrp->a_syms + size) != hdrp->a_syms + size) {
        free(buffer);
        goto err_noexec;
    }

    sym = buffer;
    end = sym + hdrp->a_syms / sizeof(struct nlist);
    displ = (long)buffer + (long)(hdrp->a_syms);

    while (sym < end) {
        sym->n_un.n_name = (char*)sym->n_un.n_strx + displ;
        sym++;
    }
    return buffer;

  err_noexec:
    dln_errno = DLN_ENOEXEC;
    return NULL;
}

static st_table *
sym_hash(hdrp, syms)
    struct exec *hdrp;
    struct nlist *syms;
{
    st_table *tbl;
    struct nlist *sym = syms;
    struct nlist *end = syms + (hdrp->a_syms / sizeof(struct nlist));

    tbl = st_init_strtable();
    if (tbl == NULL) {
        dln_errno = errno;
        return NULL;
    }

    while (sym < end) {
        st_insert(tbl, sym->n_un.n_name, sym);
        sym++;
    }
    return tbl;
}

static int
dln_init(prog)
    const char *prog;
{
    char *file;
    int fd;
    struct exec hdr;
    struct nlist *syms;

    if (dln_init_p == 1) return 0;

    file = dln_find_exe(prog, NULL);
    if (file == NULL || (fd = open(file, O_RDONLY)) < 0) {
        dln_errno = errno;
        return -1;
    }

    if (load_header(fd, &hdr, 0) == -1) return -1;
    syms = load_sym(fd, &hdr, 0);
    if (syms == NULL) {
        close(fd);
        return -1;
    }
    sym_tbl = sym_hash(&hdr, syms);
    if (sym_tbl == NULL) {      /* file may be start with #! */
        char c = '\0';
        char buf[MAXPATHLEN];
        char *p;

        free(syms);
        lseek(fd, 0L, 0);
        if (read(fd, &c, 1) == -1) {
            dln_errno = errno;
            return -1;
        }
        if (c != '#') goto err_noexec;
        if (read(fd, &c, 1) == -1) {
            dln_errno = errno;
            return -1;
        }
        if (c != '!') goto err_noexec;

        p = buf;
        /* skip forwarding spaces */
        while (read(fd, &c, 1) == 1) {
            if (c == '\n') goto err_noexec;
            if (c != '\t' && c != ' ') {
                *p++ = c;
                break;
            }
        }
        /* read in command name */
        while (read(fd, p, 1) == 1) {
            if (*p == '\n' || *p == '\t' || *p == ' ') break;
            p++;
            if (p-buf >= MAXPATHLEN) {
                dln_errno = ENAMETOOLONG;
                return -1;
            }
        }
        *p = '\0';

        return dln_init(buf);
    }
    dln_init_p = 1;
    undef_tbl = st_init_strtable();
    close(fd);
    return 0;

  err_noexec:
    close(fd);
    dln_errno = DLN_ENOEXEC;
    return -1;
}

static long
load_text_data(fd, hdrp, bss, disp)
    int fd;
    struct exec *hdrp;
    int bss;
    long disp;
{
    int size;
    unsigned char* addr;

    lseek(fd, disp + N_TXTOFF(*hdrp), 0);
    size = hdrp->a_text + hdrp->a_data;

    if (bss == -1) size += hdrp->a_bss;
    else if (bss > 1) size += bss;

    addr = (unsigned char*)xmalloc(size);
    if (addr == NULL) {
        dln_errno = errno;
        return 0;
    }

    if (read(fd, addr, size) !=  size) {
        dln_errno = errno;
        free(addr);
        return 0;
    }

    if (bss == -1) {
        memset(addr +  hdrp->a_text + hdrp->a_data, 0, hdrp->a_bss);
    }
    else if (bss > 0) {
        memset(addr +  hdrp->a_text + hdrp->a_data, 0, bss);
    }

    return (long)addr;
}

static int
undef_print(key, value)
    char *key, *value;
{
    fprintf(stderr, "  %s\n", key);
    return ST_CONTINUE;
}

static void
dln_print_undef()
{
    fprintf(stderr, " Undefined symbols:\n");
    st_foreach(undef_tbl, undef_print, NULL);
}

static void
dln_undefined()
{
    if (undef_tbl->num_entries > 0) {
        fprintf(stderr, "dln: Calling undefined function\n");
        dln_print_undef();
        rb_exit(1);
    }
}

struct undef {
    char *name;
    struct relocation_info reloc;
    long base;
    char *addr;
    union {
        char c;
        short s;
        long l;
    } u;
};

static st_table *reloc_tbl = NULL;
static void
link_undef(name, base, reloc)
    const char *name;
    long base;
    struct relocation_info *reloc;
{
    static int u_no = 0;
    struct undef *obj;
    char *addr = (char*)(reloc->r_address + base);

    obj = (struct undef*)xmalloc(sizeof(struct undef));
    obj->name = strdup(name);
    obj->reloc = *reloc;
    obj->base = base;
    switch (R_LENGTH(reloc)) {
      case 0:           /* byte */
        obj->u.c = *addr;
        break;
      case 1:           /* word */
        obj->u.s = *(short*)addr;
        break;
      case 2:           /* long */
        obj->u.l = *(long*)addr;
        break;
    }
    if (reloc_tbl == NULL) {
        reloc_tbl = st_init_numtable();
    }
    st_insert(reloc_tbl, u_no++, obj);
}

struct reloc_arg {
    const char *name;
    long value;
};

static int
reloc_undef(no, undef, arg)
    int no;
    struct undef *undef;
    struct reloc_arg *arg;
{
    int datum;
    char *address;
#if defined(sun) && defined(sparc)
    unsigned int mask = 0;
#endif

    if (strcmp(arg->name, undef->name) != 0) return ST_CONTINUE;
    address = (char*)(undef->base + undef->reloc.r_address);
    datum = arg->value;

    if (R_PCREL(&(undef->reloc))) datum -= undef->base;
#if defined(sun) && defined(sparc)
    datum += undef->reloc.r_addend;
    datum >>= R_RIGHTSHIFT(&(undef->reloc));
    mask = (1 << R_BITSIZE(&(undef->reloc))) - 1;
    mask |= mask -1;
    datum &= mask;
    switch (R_LENGTH(&(undef->reloc))) {
      case 0:
        *address = undef->u.c;
        *address &= ~mask;
        *address |= datum;
        break;
      case 1:
        *(short *)address = undef->u.s;
        *(short *)address &= ~mask;
        *(short *)address |= datum;
        break;
      case 2:
        *(long *)address = undef->u.l;
        *(long *)address &= ~mask;
        *(long *)address |= datum;
        break;
    }
#else
    switch (R_LENGTH(&(undef->reloc))) {
      case 0:           /* byte */
        if (R_MEMORY_SUB(&(undef->reloc)))
            *address = datum - *address;
        else *address = undef->u.c + datum;
        break;
      case 1:           /* word */
        if (R_MEMORY_SUB(&(undef->reloc)))
            *(short*)address = datum - *(short*)address;
        else *(short*)address = undef->u.s + datum;
        break;
      case 2:           /* long */
        if (R_MEMORY_SUB(&(undef->reloc)))
            *(long*)address = datum - *(long*)address;
        else *(long*)address = undef->u.l + datum;
        break;
    }
#endif
    free(undef->name);
    free(undef);
    return ST_DELETE;
}

static void
unlink_undef(name, value)
    const char *name;
    long value;
{
    struct reloc_arg arg;

    arg.name = name;
    arg.value = value;
    st_foreach(reloc_tbl, reloc_undef, &arg);
}

#ifdef N_INDR
struct indr_data {
    char *name0, *name1;
};

static int
reloc_repl(no, undef, data)
    int no;
    struct undef *undef;
    struct indr_data *data;
{
    if (strcmp(data->name0, undef->name) == 0) {
        free(undef->name);
        undef->name = strdup(data->name1);
    }
    return ST_CONTINUE;
}
#endif

static int
load_1(fd, disp, need_init)
    int fd;
    long disp;
    const char *need_init;
{
    static char *libc = LIBC_NAME;
    struct exec hdr;
    struct relocation_info *reloc = NULL;
    long block = 0;
    long new_common = 0; /* Length of new common */
    struct nlist *syms = NULL;
    struct nlist *sym;
    struct nlist *end;
    int init_p = 0;

    if (load_header(fd, &hdr, disp) == -1) return -1;
    if (INVALID_OBJECT(hdr)) {
        dln_errno = DLN_ENOEXEC;
        return -1;
    }
    reloc = load_reloc(fd, &hdr, disp);
    if (reloc == NULL) return -1;

    syms = load_sym(fd, &hdr, disp);
    if (syms == NULL) {
        free(reloc);
        return -1;
    }

    sym = syms;
    end = syms + (hdr.a_syms / sizeof(struct nlist));
    while (sym < end) {
        struct nlist *old_sym;
        int value = sym->n_value;

#ifdef N_INDR
        if (sym->n_type == (N_INDR | N_EXT)) {
            char *key = sym->n_un.n_name;

            if (st_lookup(sym_tbl, sym[1].n_un.n_name, &old_sym)) {
                if (st_delete(undef_tbl, (st_data_t*)&key, NULL)) {
                    unlink_undef(key, old_sym->n_value);
                    free(key);
                }
            }
            else {
                struct indr_data data;

                data.name0 = sym->n_un.n_name;
                data.name1 = sym[1].n_un.n_name;
                st_foreach(reloc_tbl, reloc_repl, &data);

                st_insert(undef_tbl, strdup(sym[1].n_un.n_name), NULL);
                if (st_delete(undef_tbl, (st_data_t*)&key, NULL)) {
                    free(key);
                }
            }
            sym += 2;
            continue;
        }
#endif
        if (sym->n_type == (N_UNDF | N_EXT)) {
            if (st_lookup(sym_tbl, sym->n_un.n_name, &old_sym) == 0) {
                old_sym = NULL;
            }

            if (value) {
                if (old_sym) {
                    sym->n_type = N_EXT | N_COMM;
                    sym->n_value = old_sym->n_value;
                }
                else {
                    int rnd =
                        value >= sizeof(double) ? sizeof(double) - 1
                            : value >= sizeof(long) ? sizeof(long) - 1
                                : sizeof(short) - 1;

                    sym->n_type = N_COMM;
                    new_common += rnd;
                    new_common &= ~(long)rnd;
                    sym->n_value = new_common;
                    new_common += value;
                }
            }
            else {
                if (old_sym) {
                    sym->n_type = N_EXT | N_COMM;
                    sym->n_value = old_sym->n_value;
                }
                else {
                    sym->n_value = (long)dln_undefined;
                    st_insert(undef_tbl, strdup(sym->n_un.n_name), NULL);
                }
            }
        }
        sym++;
    }

    block = load_text_data(fd, &hdr, hdr.a_bss + new_common, disp);
    if (block == 0) goto err_exit;

    sym = syms;
    while (sym < end) {
        struct nlist *new_sym;
        char *key;

        switch (sym->n_type) {
          case N_COMM:
            sym->n_value += hdr.a_text + hdr.a_data;
          case N_TEXT|N_EXT:
          case N_DATA|N_EXT:

            sym->n_value += block;

            if (st_lookup(sym_tbl, sym->n_un.n_name, &new_sym) != 0
                && new_sym->n_value != (long)dln_undefined) {
                dln_errno = DLN_ECONFL;
                goto err_exit;
            }

            key = sym->n_un.n_name;
            if (st_delete(undef_tbl, (st_data_t*)&key, NULL) != 0) {
                unlink_undef(key, sym->n_value);
                free(key);
            }

            new_sym = (struct nlist*)xmalloc(sizeof(struct nlist));
            *new_sym = *sym;
            new_sym->n_un.n_name = strdup(sym->n_un.n_name);
            st_insert(sym_tbl, new_sym->n_un.n_name, new_sym);
            break;

          case N_TEXT:
          case N_DATA:
            sym->n_value += block;
            break;
        }
        sym++;
    }

    /*
     * First comes the text-relocation
     */
    {
        struct relocation_info * rel = reloc;
        struct relocation_info * rel_beg = reloc +
            (hdr.a_trsize/sizeof(struct relocation_info));
        struct relocation_info * rel_end = reloc +
            (hdr.a_trsize+hdr.a_drsize)/sizeof(struct relocation_info);

        while (rel < rel_end) {
            char *address = (char*)(rel->r_address + block);
            long datum = 0;
#if defined(sun) && defined(sparc)
            unsigned int mask = 0;
#endif

            if(rel >= rel_beg)
                address += hdr.a_text;

            if (rel->r_extern) { /* Look it up in symbol-table */
                sym = &(syms[R_SYMBOL(rel)]);
                switch (sym->n_type) {
                  case N_EXT|N_UNDF:
                    link_undef(sym->n_un.n_name, block, rel);
                  case N_EXT|N_COMM:
                  case N_COMM:
                    datum = sym->n_value;
                    break;
                  default:
                    goto err_exit;
                }
            } /* end.. look it up */
            else { /* is static */
                switch (R_SYMBOL(rel)) {
                  case N_TEXT:
                  case N_DATA:
                    datum = block;
                    break;
                  case N_BSS:
                    datum = block +  new_common;
                    break;
                  case N_ABS:
                    break;
                }
            } /* end .. is static */
            if (R_PCREL(rel)) datum -= block;

#if defined(sun) && defined(sparc)
            datum += rel->r_addend;
            datum >>= R_RIGHTSHIFT(rel);
            mask = (1 << R_BITSIZE(rel)) - 1;
            mask |= mask -1;
            datum &= mask;

            switch (R_LENGTH(rel)) {
              case 0:
                *address &= ~mask;
                *address |= datum;
                break;
              case 1:
                *(short *)address &= ~mask;
                *(short *)address |= datum;
                break;
              case 2:
                *(long *)address &= ~mask;
                *(long *)address |= datum;
                break;
            }
#else
            switch (R_LENGTH(rel)) {
              case 0:           /* byte */
                if (datum < -128 || datum > 127) goto err_exit;
                *address += datum;
                break;
              case 1:           /* word */
                *(short *)address += datum;
                break;
              case 2:           /* long */
                *(long *)address += datum;
                break;
            }
#endif
            rel++;
        }
    }

    if (need_init) {
        int len;
        char **libs_to_be_linked = 0;
        char *buf;

        if (undef_tbl->num_entries > 0) {
            if (load_lib(libc) == -1) goto err_exit;
        }

        init_funcname(&buf, need_init);
        len = strlen(buf);

        for (sym = syms; sym<end; sym++) {
            char *name = sym->n_un.n_name;
            if (name[0] == '_' && sym->n_value >= block) {
                if (strcmp(name+1, "dln_libs_to_be_linked") == 0) {
                    libs_to_be_linked = (char**)sym->n_value;
                }
                else if (strcmp(name+1, buf) == 0) {
                    init_p = 1;
                    ((int (*)())sym->n_value)();
                }
            }
        }
        if (libs_to_be_linked && undef_tbl->num_entries > 0) {
            while (*libs_to_be_linked) {
                load_lib(*libs_to_be_linked);
                libs_to_be_linked++;
            }
        }
    }
    free(reloc);
    free(syms);
    if (need_init) {
        if (init_p == 0) {
            dln_errno = DLN_ENOINIT;
            return -1;
        }
        if (undef_tbl->num_entries > 0) {
            if (load_lib(libc) == -1) goto err_exit;
            if (undef_tbl->num_entries > 0) {
                dln_errno = DLN_EUNDEF;
                return -1;
            }
        }
    }
    return 0;

  err_exit:
    if (syms) free(syms);
    if (reloc) free(reloc);
    if (block) free((char*)block);
    return -1;
}

static int target_offset;
static int
search_undef(key, value, lib_tbl)
    const char *key;
    int value;
    st_table *lib_tbl;
{
    long offset;

    if (st_lookup(lib_tbl, key, &offset) == 0) return ST_CONTINUE;
    target_offset = offset;
    return ST_STOP;
}

struct symdef {
    int rb_str_index;
    int lib_offset;
};

char *dln_librrb_ary_path = DLN_DEFAULT_LIB_PATH;

static int
load_lib(lib)
    const char *lib;
{
    char *path, *file;
    char armagic[SARMAG];
    int fd, size;
    struct ar_hdr ahdr;
    st_table *lib_tbl = NULL;
    int *data, nsym;
    struct symdef *base;
    char *name_base;

    if (dln_init_p == 0) {
        dln_errno = DLN_ENOINIT;
        return -1;
    }

    if (undef_tbl->num_entries == 0) return 0;
    dln_errno = DLN_EBADLIB;

    if (lib[0] == '-' && lib[1] == 'l') {
        long len = strlen(lib) + 4;
        char *p = alloca(len);
        snprintf(p, len, "lib%s.a", lib+2);
        lib = p;
    }

    /* library search path: */
    /* look for environment variable DLN_LIBRARY_PATH first. */
    /* then variable dln_librrb_ary_path. */
    /* if path is still NULL, use "." for path. */
    path = getenv("DLN_LIBRARY_PATH");
    if (path == NULL) path = dln_librrb_ary_path;

    file = dln_find_file(lib, path);
    fd = open(file, O_RDONLY);
    if (fd == -1) goto syserr;
    size = read(fd, armagic, SARMAG);
    if (size == -1) goto syserr;

    if (size != SARMAG) {
        dln_errno = DLN_ENOTLIB;
        goto badlib;
    }
    size = read(fd, &ahdr, sizeof(ahdr));
    if (size == -1) goto syserr;
    if (size != sizeof(ahdr) || sscanf(ahdr.ar_size, "%d", &size) != 1) {
        goto badlib;
    }

    if (strncmp(ahdr.ar_name, "__.SYMDEF", 9) == 0) {
        /* make hash table from __.SYMDEF */

        lib_tbl = st_init_strtable();
        data = (int*)xmalloc(size);
        if (data == NULL) goto syserr;
        size = read(fd, data, size);
        nsym = *data / sizeof(struct symdef);
        base = (struct symdef*)(data + 1);
        name_base = (char*)(base + nsym) + sizeof(int);
        while (nsym > 0) {
            char *name = name_base + base->rb_str_index;

            st_insert(lib_tbl, name, base->lib_offset + sizeof(ahdr));
            nsym--;
            base++;
        }
        for (;;) {
            target_offset = -1;
            st_foreach(undef_tbl, search_undef, lib_tbl);
            if (target_offset == -1) break;
            if (load_1(fd, target_offset, 0) == -1) {
                st_free_table(lib_tbl);
                free(data);
                goto badlib;
            }
            if (undef_tbl->num_entries == 0) break;
        }
        free(data);
        st_free_table(lib_tbl);
    }
    else {
        /* linear library, need to scan (FUTURE) */

        for (;;) {
            int offset = SARMAG;
            int found = 0;
            struct exec hdr;
            struct nlist *syms, *sym, *end;

            while (undef_tbl->num_entries > 0) {
                found = 0;
                lseek(fd, offset, 0);
                size = read(fd, &ahdr, sizeof(ahdr));
                if (size == -1) goto syserr;
                if (size == 0) break;
                if (size != sizeof(ahdr)
                    || sscanf(ahdr.ar_size, "%d", &size) != 1) {
                    goto badlib;
                }
                offset += sizeof(ahdr);
                if (load_header(fd, &hdr, offset) == -1)
                    goto badlib;
                syms = load_sym(fd, &hdr, offset);
                if (syms == NULL) goto badlib;
                sym = syms;
                end = syms + (hdr.a_syms / sizeof(struct nlist));
                while (sym < end) {
                    if (sym->n_type == N_EXT|N_TEXT
                        && st_lookup(undef_tbl, sym->n_un.n_name, NULL)) {
                        break;
                    }
                    sym++;
                }
                if (sym < end) {
                    found++;
                    free(syms);
                    if (load_1(fd, offset, 0) == -1) {
                        goto badlib;
                    }
                }
                offset += size;
                if (offset & 1) offset++;
            }
            if (found) break;
        }
    }
    close(fd);
    return 0;

  syserr:
    dln_errno = errno;
  badlib:
    if (fd >= 0) close(fd);
    return -1;
}

static int
load(file)
    const char *file;
{
    int fd;
    int result;

    if (dln_init_p == 0) {
        if (dln_init(dln_argv0) == -1) return -1;
    }
    result = strlen(file);
    if (file[result-1] == 'a') {
        return load_lib(file);
    }

    fd = open(file, O_RDONLY);
    if (fd == -1) {
        dln_errno = errno;
        return -1;
    }
    result = load_1(fd, 0, file);
    close(fd);

    return result;
}

void*
dln_sym(name)
    const char *name;
{
    struct nlist *sym;

    if (st_lookup(sym_tbl, name, &sym))
        return (void*)sym->n_value;
    return NULL;
}

#endif /* USE_DLN_A_OUT */

#ifdef USE_DLN_DLOPEN
# include <dlfcn.h>
#endif

#ifdef __hpux
#include <errno.h>
#include "dl.h"
#endif

#if defined(_AIX)
#include <ctype.h>      /* for isdigit()        */
#include <errno.h>      /* for global errno     */
#include <sys/ldr.h>
#endif

#ifdef NeXT
#if NS_TARGET_MAJOR < 4
#include <mach-o/rld.h>
#else
#include <mach-o/dyld.h>
#ifndef NSLINKMODULE_OPTION_BINDNOW
#define NSLINKMODULE_OPTION_BINDNOW 1
#endif
#endif
#else
#ifdef __APPLE__
#include <mach-o/dyld.h>
#endif
#endif

#if defined _WIN32 && !defined __CYGWIN__
#include <windows.h>
#endif

#ifdef _WIN32_WCE
#undef FormatMessage
#define FormatMessage FormatMessageA
#undef LoadLibrary
#define LoadLibrary LoadLibraryA
#undef GetProcAddress
#define GetProcAddress GetProcAddressA
#endif

static const char *
dln_strerror(void)
{
#ifdef USE_DLN_A_OUT
    char *strerror();

    switch (dln_errno) {
      case DLN_ECONFL:
        return "Symbol name conflict";
      case DLN_ENOINIT:
        return "No initializer given";
      case DLN_EUNDEF:
        return "Unresolved symbols";
      case DLN_ENOTLIB:
        return "Not a library file";
      case DLN_EBADLIB:
        return "Malformed library file";
      case DLN_EINIT:
        return "Not initialized";
      default:
        return strerror(dln_errno);
    }
#endif

#ifdef USE_DLN_DLOPEN
    return (char*)dlerror();
#endif

#if defined _WIN32 && !defined __CYGWIN__
    static char message[1024];
    int error = GetLastError();
    char *p = message;
    p += sprintf(message, "%d: ", error);
    FormatMessage(
        FORMAT_MESSAGE_FROM_SYSTEM       | FORMAT_MESSAGE_IGNORE_INSERTS,
        NULL,
        error,
        MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
        p,
        sizeof message - strlen(message),
        NULL);

    for (p = message; *p; p++) {
        if (*p == '\n' || *p == '\r')
            *p = ' ';
    }
    return message;
#endif
}

#if defined(_AIX) && ! defined(_IA64)
static void
aix_loaderror(const char *pathname)
{
    char *message[8], errbuf[1024];
    int i,j;

    struct errtab {
        int errnum;
        char *errstr;
    } load_errtab[] = {
        {L_ERROR_TOOMANY,       "too many errors, rest skipped."},
        {L_ERROR_NOLIB,         "can't load library:"},
        {L_ERROR_UNDEF,         "can't find symbol in library:"},
        {L_ERROR_RLDBAD,
             "RLD index out of range or bad relocation type:"},
        {L_ERROR_FORMAT,        "not a valid, executable xcoff file:"},
        {L_ERROR_MEMBER,
             "file not an archive or does not contain requested member:"},
        {L_ERROR_TYPE,          "symbol table mismatch:"},
        {L_ERROR_ALIGN,         "text alignment in file is wrong."},
        {L_ERROR_SYSTEM,        "System error:"},
        {L_ERROR_ERRNO,         NULL}
    };

#define LOAD_ERRTAB_LEN (sizeof(load_errtab)/sizeof(load_errtab[0]))
#define ERRBUF_APPEND(s) strncat(errbuf, s, sizeof(errbuf)-strlen(errbuf)-1)

    snprintf(errbuf, 1024, "load failed - %s ", pathname);

    if (!loadquery(1, &message[0], sizeof(message)))
        ERRBUF_APPEND(strerror(errno));
    for(i = 0; message[i] && *message[i]; i++) {
        int nerr = atoi(message[i]);
        for (j=0; j<LOAD_ERRTAB_LEN; j++) {
           if (nerr == load_errtab[i].errnum && load_errtab[i].errstr)
                ERRBUF_APPEND(load_errtab[i].errstr);
        }
        while (isdigit(*message[i])) message[i]++;
        ERRBUF_APPEND(message[i]);
        ERRBUF_APPEND("\n");
    }
    errbuf[strlen(errbuf)-1] = '\0';    /* trim off last newline */
    rb_loaderror(errbuf);
    return;
}
#endif

#endif /* NO_DLN_LOAD */

void*
dln_load(const char *file)
{
#ifdef NO_DLN_LOAD
    rb_raise(rb_eLoadError, "this executable file can't load extension libraries");
#else

#if !defined(_AIX) && !defined(NeXT)
    const char *error = 0;
#define DLN_ERROR() (error = dln_strerror(), strcpy(ALLOCA_N(char, strlen(error) + 1), error))
#endif

#if defined _WIN32 && !defined __CYGWIN__
    HINSTANCE handle;
    char winfile[MAXPATHLEN];
    void (*init_fct)();
    char *buf;

    if (strlen(file) >= MAXPATHLEN) rb_loaderror("filename too long");

    /* Load the file as an object one */
    init_funcname(&buf, file);

    strcpy(winfile, file);

    /* Load file */
    if ((handle = LoadLibrary(winfile)) == NULL) {
        error = dln_strerror();
        goto failed;
    }

    if ((init_fct = (void(*)())GetProcAddress(handle, buf)) == NULL) {
        rb_loaderror("%s - %s\n%s", dln_strerror(), buf, file);
    }

    /* Call the init code */
    (*init_fct)();
    return handle;
#else
#ifdef USE_DLN_A_OUT
    if (load(file) == -1) {
        error = dln_strerror();
        goto failed;
    }
    return 0;
#else

    char *buf;
    /* Load the file as an object one */
    init_funcname(&buf, file);

#ifdef USE_DLN_DLOPEN
#define DLN_DEFINED
    {
        void *handle;
        void (*init_fct)();

#ifndef RTLD_LAZY
# define RTLD_LAZY 1
#endif
#ifdef __INTERIX
# undef RTLD_GLOBAL
#endif
#ifndef RTLD_GLOBAL
# define RTLD_GLOBAL 0
#endif

        /* Load file */
        if ((handle = (void*)dlopen(file, RTLD_LAZY|RTLD_GLOBAL)) == NULL) {
            error = dln_strerror();
            goto failed;
        }

        init_fct = (void(*)())dlsym(handle, buf);
        if (init_fct == NULL) {
            error = DLN_ERROR();
            dlclose(handle);
            goto failed;
        }
        /* Call the init code */
        (*init_fct)();

        return handle;
    }
#endif /* USE_DLN_DLOPEN */

#ifdef __hpux
#define DLN_DEFINED
    {
        shl_t lib = NULL;
        int flags;
        void (*init_fct)();

        flags = BIND_DEFERRED;
        lib = shl_load(file, flags, 0);
        if (lib == NULL) {
            extern int errno;
            rb_loaderror("%s - %s", strerror(errno), file);
        }
        shl_findsym(&lib, buf, TYPE_PROCEDURE, (void*)&init_fct);
        if (init_fct == NULL) {
            shl_findsym(&lib, buf, TYPE_UNDEFINED, (void*)&init_fct);
            if (init_fct == NULL) {
                errno = ENOSYM;
                rb_loaderror("%s - %s", strerror(ENOSYM), file);
            }
        }
        (*init_fct)();
        return (void*)lib;
    }
#endif /* hpux */

#if defined(_AIX) && ! defined(_IA64)
#define DLN_DEFINED
    {
        void (*init_fct)();

        init_fct = (void(*)())load((char*)file, 1, 0);
        if (init_fct == NULL) {
            aix_loaderror(file);
        }
        if (loadbind(0, (void*)dln_load, (void*)init_fct) == -1) {
            aix_loaderror(file);
        }
        (*init_fct)();
        return (void*)init_fct;
    }
#endif /* _AIX */

#if defined(NeXT) || defined(__APPLE__)
#define DLN_DEFINED
/*----------------------------------------------------
   By SHIROYAMA Takayuki Psi@fortune.nest.or.jp

   Special Thanks...
    Yu tomoak-i@is.aist-nara.ac.jp,
    Mi hisho@tasihara.nest.or.jp,
    sunshine@sunshineco.com,
    and... Miss ARAI Akino(^^;)
 ----------------------------------------------------*/
#if defined(NeXT) && (NS_TARGET_MAJOR < 4)/* NeXTSTEP rld functions */

    {
        NXStream* s;
        unsigned long init_address;
        char *object_files[2] = {NULL, NULL};

        void (*init_fct)();

        object_files[0] = (char*)file;

        s = NXOpenFile(2,NX_WRITEONLY);

        /* Load object file, if return value ==0 ,  load failed*/
        if(rld_load(s, NULL, object_files, NULL) == 0) {
            NXFlush(s);
            NXClose(s);
            rb_loaderror("Failed to load %.200s", file);
        }

        /* lookup the initial function */
        if(rld_lookup(s, buf, &init_address) == 0) {
            NXFlush(s);
            NXClose(s);
            rb_loaderror("Failed to lookup Init function %.200s", file);
        }

        NXFlush(s);
        NXClose(s);

        /* Cannot call *init_address directory, so copy this value to
           funtion pointer */
        init_fct = (void(*)())init_address;
        (*init_fct)();
        return (void*)init_address;
    }
#else/* OPENSTEP dyld functions */
    {
        int dyld_result;
        NSObjectFileImage obj_file; /* handle, but not use it */
        /* "file" is module file name .
           "buf" is pointer to initial function name with "_" . */

        void (*init_fct)();

        dyld_result = NSCreateObjectFileImageFromFile(file, &obj_file);

        if (dyld_result != NSObjectFileImageSuccess) {
            rb_loaderror("Failed to load %.200s", file);
        }

        NSLinkModule(obj_file, file, NSLINKMODULE_OPTION_BINDNOW);

        /* lookup the initial function */
        if(!NSIsSymbolNameDefined(buf)) {
            rb_loaderror("Failed to lookup Init function %.200s",file);
        }
        init_fct = NSAddressOfSymbol(NSLookupAndBindSymbol(buf));
        (*init_fct)();

        return (void*)init_fct;
    }
#endif /* rld or dyld */
#endif

#ifdef __BEOS__
# define DLN_DEFINED
    {
      status_t err_stat;  /* BeOS error status code */
      image_id img_id;    /* extention module unique id */
      void (*init_fct)(); /* initialize function for extention module */

      /* load extention module */
      img_id = load_add_on(file);
      if (img_id <= 0) {
        rb_loaderror("Failed to load %.200s", file);
      }

      /* find symbol for module initialize function. */
      /* The Be Book KernelKit Images section described to use
         B_SYMBOL_TYPE_TEXT for symbol of function, not
         B_SYMBOL_TYPE_CODE. Why ? */
      /* strcat(init_fct_symname, "__Fv"); */  /* parameter nothing. */
      /* "__Fv" dont need! The Be Book Bug ? */
      err_stat = get_image_symbol(img_id, buf,
                                  B_SYMBOL_TYPE_TEXT, (void **)&init_fct);

      if (err_stat != B_NO_ERROR) {
        char real_name[MAXPATHLEN];

        strcpy(real_name, buf);
        strcat(real_name, "__Fv");
        err_stat = get_image_symbol(img_id, real_name,
                                    B_SYMBOL_TYPE_TEXT, (void **)&init_fct);
      }

      if ((B_BAD_IMAGE_ID == err_stat) || (B_BAD_INDEX == err_stat)) {
        unload_add_on(img_id);
        rb_loaderror("Failed to lookup Init function %.200s", file);
      }
      else if (B_NO_ERROR != err_stat) {
        char errmsg[] = "Internal of BeOS version. %.200s (symbol_name = %s)";
        unload_add_on(img_id);
        rb_loaderror(errmsg, strerror(err_stat), buf);
      }

      /* call module initialize function. */
      (*init_fct)();
      return (void*)img_id;
    }
#endif /* __BEOS__*/

#ifdef __MACOS__
# define DLN_DEFINED
    {
      OSErr err;
      FSSpec libspec;
      CFragConnectionID connID;
      Ptr mainAddr;
      char errMessage[1024];
      Boolean isfolder, didsomething;
      Str63 fragname;
      Ptr symAddr;
      CFragSymbolClass class;
      void (*init_fct)();
      char fullpath[MAXPATHLEN];

      strcpy(fullpath, file);

      /* resolve any aliases to find the real file */
      c2pstr(fullpath);
      (void)FSMakeFSSpec(0, 0, fullpath, &libspec);
      err = ResolveAliasFile(&libspec, 1, &isfolder, &didsomething);
      if (err) {
          rb_loaderror("Unresolved Alias - %s", file);
      }

      /* Load the fragment (or return the connID if it is already loaded */
      fragname[0] = 0;
      err = GetDiskFragment(&libspec, 0, 0, fragname,
                            kLoadCFrag, &connID, &mainAddr,
                            errMessage);
      if (err) {
          p2cstr(errMessage);
          rb_loaderror("%s - %s",errMessage , file);
      }

      /* Locate the address of the correct init function */
      c2pstr(buf);
      err = FindSymbol(connID, buf, &symAddr, &class);
      if (err) {
          rb_loaderror("Unresolved symbols - %s" , file);
      }
      init_fct = (void (*)())symAddr;
      (*init_fct)();
      return (void*)init_fct;
    }
#endif /* __MACOS__ */

#if defined(__VMS)
#define DLN_DEFINED
    {
        void *handle, (*init_fct)();
        char *fname, *p1, *p2;

        fname = (char *)__alloca(strlen(file)+1);
        strcpy(fname,file);
        if (p1 = strrchr(fname,'/'))
            fname = p1 + 1;
        if (p2 = strrchr(fname,'.'))
            *p2 = '\0';

        if ((handle = (void*)dlopen(fname, 0)) == NULL) {
            error = dln_strerror();
            goto failed;
        }

        if ((init_fct = (void (*)())dlsym(handle, buf)) == NULL) {
            error = DLN_ERROR();
            dlclose(handle);
            goto failed;
        }
        /* Call the init code */
        (*init_fct)();
        return handle;
    }
#endif /* __VMS */

#ifndef DLN_DEFINED
    rb_notimplement();
#endif

#endif /* USE_DLN_A_OUT */
#endif
#if !defined(_AIX) && !defined(NeXT)
  failed:
    rb_loaderror("%s - %s", error, file);
#endif

#endif /* NO_DLN_LOAD */
    return 0;                   /* dummy return */
}

static char *dln_find_1(const char *fname, const char *path, int exe_flag);

char *
dln_find_exe(const char *fname, const char *path)
{
    if (!path) {
        path = getenv(PATH_ENV);
    }

    if (!path) {
#if defined(MSDOS) || defined(_WIN32) || defined(__human68k__) || defined(__MACOS__)
        path = "/usr/local/bin;/usr/ucb;/usr/bin;/bin;.";
#else
        path = "/usr/local/bin:/usr/ucb:/usr/bin:/bin:.";
#endif
    }
    return dln_find_1(fname, path, 1);
}

char *
dln_find_file(const char *fname, const char *path)
{
#ifndef __MACOS__
    if (!path) path = ".";
    return dln_find_1(fname, path, 0);
#else
    if (!path) path = ".";
    return _macruby_path_conv_posix_to_macos(dln_find_1(fname, path, 0));
#endif
}

#if defined(__CYGWIN32__)
const char *
conv_to_posix_path(win32, posix, len)
    char *win32;
    char *posix;
    int len;
{
    char *first = win32;
    char *p = win32;
    char *dst = posix;

    posix[0] = '\0';
    for (p = win32; *p; p++)
        if (*p == ';') {
            *p = 0;
            cygwin32_conv_to_posix_path(first, posix);
            posix += strlen(posix);
            *posix++ = ':';
            first = p + 1;
            *p = ';';
        }
    if (len < strlen(first))
        fprintf(stderr, "PATH length too long: %s\n", first);
    else
        cygwin32_conv_to_posix_path(first, posix);
    return dst;
}
#endif

static char fbuf[MAXPATHLEN];

static char *
dln_find_1(const char *fname, const char *path, int exe_flag /* non 0 if looking for executable. */)
{
    register const char *dp;
    register const char *ep;
    register char *bp;
    struct stat st;
#ifdef __MACOS__
    const char* mac_fullpath;
#endif

#define RETURN_IF(expr) if (expr) return (char *)fname;

    RETURN_IF(!fname);
    RETURN_IF(fname[0] == '/');
    RETURN_IF(strncmp("./", fname, 2) == 0 || strncmp("../", fname, 3) == 0);
    RETURN_IF(exe_flag && strchr(fname, '/'));
#ifdef DOSISH
    RETURN_IF(fname[0] == '\\');
# ifdef DOSISH_DRIVE_LETTER
    RETURN_IF(strlen(fname) > 2 && fname[1] == ':');
# endif
    RETURN_IF(strncmp(".\\", fname, 2) == 0 || strncmp("..\\", fname, 3) == 0);
    RETURN_IF(exe_flag && strchr(fname, '\\'));
#endif

#undef RETURN_IF

    for (dp = path;; dp = ++ep) {
        register int l;
        int i;
        int fspace;

        /* extract a component */
        ep = strchr(dp, PATH_SEP[0]);
        if (ep == NULL)
            ep = dp+strlen(dp);

        /* find the length of that component */
        l = ep - dp;
        bp = fbuf;
        fspace = sizeof fbuf - 2;
        if (l > 0) {
            /*
            **  If the length of the component is zero length,
            **  start from the current directory.  If the
            **  component begins with "~", start from the
            **  user's $HOME environment variable.  Otherwise
            **  take the path literally.
            */

            if (*dp == '~' && (l == 1 ||
#if defined(DOSISH)
                               dp[1] == '\\' ||
#endif
                               dp[1] == '/')) {
                char *home;

                home = getenv("HOME");
                if (home != NULL) {
                    i = strlen(home);
                    if ((fspace -= i) < 0)
                        goto toolong;
                    memcpy(bp, home, i);
                    bp += i;
                }
                dp++;
                l--;
            }
            if (l > 0) {
                if ((fspace -= l) < 0)
                    goto toolong;
                memcpy(bp, dp, l);
                bp += l;
            }

            /* add a "/" between directory and filename */
            if (ep[-1] != '/')
                *bp++ = '/';
        }

        /* now append the file name */
        i = strlen(fname);
        if ((fspace -= i) < 0) {
          toolong:
            fprintf(stderr, "openpath: pathname too long (ignored)\n");
            *bp = '\0';
            fprintf(stderr, "\tDirectory \"%s\"\n", fbuf);
            fprintf(stderr, "\tFile \"%s\"\n", fname);
            goto next;
        }
        memcpy(bp, fname, i + 1);

#ifndef __MACOS__
        if (stat(fbuf, &st) == 0) {
            if (exe_flag == 0) return fbuf;
            /* looking for executable */
            if (!S_ISDIR(st.st_mode) && eaccess(fbuf, X_OK) == 0)
                return fbuf;
        }
#else
        if (mac_fullpath = _macruby_exist_file_in_libdir_as_posix_name(fbuf)) {
            if (exe_flag == 0) return mac_fullpath;
            /* looking for executable */
            if (stat(mac_fullpath, &st) == 0) {
                if (!S_ISDIR(st.st_mode) && eaccess(mac_fullpath, X_OK) == 0)
                    return mac_fullpath;
            }
        }
#endif
#if defined(DOSISH)
        if (exe_flag) {
            static const char *extension[] = {
#if defined(MSDOS)
                ".com", ".exe", ".bat",
#if defined(DJGPP)
                ".btm", ".sh", ".ksh", ".pl", ".sed",
#endif
#elif defined(__EMX__) || defined(_WIN32)
                ".exe", ".com", ".cmd", ".bat",
/* end of __EMX__ or _WIN32 */
#else
                ".r", ".R", ".x", ".X", ".bat", ".BAT",
/* __human68k__ */
#endif
                (char *) NULL
            };
            int j;

            for (j = 0; extension[j]; j++) {
                if (fspace < strlen(extension[j])) {
                    fprintf(stderr, "openpath: pathname too long (ignored)\n");
                    fprintf(stderr, "\tDirectory \"%.*s\"\n", (int) (bp - fbuf), fbuf);
                    fprintf(stderr, "\tFile \"%s%s\"\n", fname, extension[j]);
                    continue;
                }
                strcpy(bp + i, extension[j]);
#ifndef __MACOS__
                if (stat(fbuf, &st) == 0)
                    return fbuf;
#else
                if (mac_fullpath = _macruby_exist_file_in_libdir_as_posix_name(fbuf))
                    return mac_fullpath;

#endif
            }
        }
#endif /* MSDOS or _WIN32 or __human68k__ or __EMX__ */

      next:
        /* if not, and no other alternatives, life is bleak */
        if (*ep == '\0') {
            return NULL;
        }

        /* otherwise try the next component in the search path */
    }
}
/* [<][>][^] [v] [top][bottom][index] [help] */


dln.h

root/dln.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/**********************************************************************

  dln.h -

  $Author: ocean $
  $Date: 2005/09/14 06:32:30 $
  created at: Wed Jan 19 16:53:09 JST 1994

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#ifndef DLN_H
#define DLN_H

#ifdef __cplusplus
# ifndef  HAVE_PROTOTYPES
#  define HAVE_PROTOTYPES 1
# endif
# ifndef  HAVE_STDARG_PROTOTYPES
#  define HAVE_STDARG_PROTOTYPES 1
# endif
#endif

#undef _
#ifdef HAVE_PROTOTYPES
# define _(args) args
#else
# define _(args) ()
#endif

char *dln_find_exe(const char*,const char*);
char *dln_find_file(const char*,const char*);

#ifdef USE_DLN_A_OUT
extern char *dln_argv0;
#endif

void *dln_load(const char*);
#endif
/* [<][>][^][v][top][bottom][index] [help] */


dmydln.c

root/dmydln.c

/* [<][>][^][v][top][bottom] [index] [help] */
#define NO_DLN_LOAD 1
#include "dln.c"
/* [<][>][^][v][top][bottom][index] [help] */


dmyext.c

root/dmyext.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. Init_ext
void
Init_ext(void)
{
}
/* [<][>][^][v] [top][bottom][index] [help] */


enum.c

root/enum.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. rb_each
  2. grep_i
  3. grep_iter_i
  4. enum_grep
  5. count_i
  6. count_iter_i
  7. enum_count
  8. find_i
  9. enum_find
  10. find_all_i
  11. enum_find_all
  12. reject_i
  13. enum_reject
  14. collect_i
  15. collect_all
  16. enum_collect
  17. enum_to_a
  18. inject_i
  19. enum_inject
  20. partition_i
  21. enum_partition
  22. enum_sort
  23. sort_by_i
  24. sort_by_cmp
  25. enum_sort_by
  26. all_iter_i
  27. all_i
  28. enum_all
  29. any_iter_i
  30. any_i
  31. enum_any
  32. one_iter_i
  33. one_i
  34. enum_one
  35. none_iter_i
  36. none_i
  37. enum_none
  38. min_i
  39. min_ii
  40. enum_min
  41. max_i
  42. max_ii
  43. enum_max
  44. min_by_i
  45. enum_min_by
  46. max_by_i
  47. enum_max_by
  48. member_i
  49. enum_member
  50. each_with_index_i
  51. enum_each_with_index
  52. zip_i
  53. enum_zip
  54. Init_Enumerable
/**********************************************************************

  enum.c -

  $Author: matz $
  $Date: 2005/12/29 12:05:16 $
  created at: Fri Oct  1 15:15:19 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#include "ruby.h"
#include "node.h"
#include "util.h"

VALUE rb_mEnumerable;
static ID id_each, id_eqq, id_cmp;

VALUE
rb_each(VALUE obj)
{
    return rb_funcall(obj, id_each, 0, 0);
}

static VALUE
grep_i(VALUE i, VALUE *arg)
{
    if (RTEST(rb_funcall(arg[0], id_eqq, 1, i))) {
        rb_ary_push(arg[1], i);
    }
    return Qnil;
}

static VALUE
grep_iter_i(VALUE i, VALUE *arg)
{
    if (RTEST(rb_funcall(arg[0], id_eqq, 1, i))) {
        rb_ary_push(arg[1], rb_yield(i));
    }
    return Qnil;
}

/*
 *  call-seq:
 *     enum.grep(pattern)                   => array
 *     enum.grep(pattern) {| obj | block }  => array
 *
 *  Returns an array of every element in <i>enum</i> for which
 *  <code>Pattern === element</code>. If the optional <em>block</em> is
 *  supplied, each matching element is passed to it, and the block's
 *  result is stored in the output array.
 *
 *     (1..100).grep 38..44   #=> [38, 39, 40, 41, 42, 43, 44]
 *     c = IO.constants
 *     c.grep(/SEEK/)         #=> ["SEEK_END", "SEEK_SET", "SEEK_CUR"]
 *     res = c.grep(/SEEK/) {|v| IO.const_get(v) }
 *     res                    #=> [2, 0, 1]
 *
 */

static VALUE
enum_grep(VALUE obj, VALUE pat)
{
    VALUE ary = rb_ary_new();
    VALUE arg[2];

    arg[0] = pat;
    arg[1] = ary;

    rb_iterate(rb_each, obj, rb_block_given_p() ? grep_iter_i : grep_i, (VALUE)arg);

    return ary;
}

static VALUE
count_i(VALUE i, VALUE *arg)
{
    if (rb_equal(i, arg[0])) {
        arg[1]++;
    }
    return Qnil;
}

static VALUE
count_iter_i(VALUE i, long *n)
{
    if (RTEST(rb_yield(i))) {
        (*n)++;
    }
    return Qnil;
}

/*
 *  call-seq:
 *     enum.count(item)             => int
 *     enum.count {| obj | block }  => int
 *
 *  Returns the number of items in <i>enum</i> for which equals to <i>item</i>.
 *  If a block is given, counts the number of elements yielding a true value.
 *
 *     ary = [1, 2, 4, 2]
 *     ary.count(2)          # => 2
 *     ary.count{|x|x%2==0}  # => 3
 *
 */

static VALUE
enum_count(int argc, VALUE *argv, VALUE obj)
{
    if (argc == 1) {
        VALUE item, args[2];

        if (rb_block_given_p()) {
            rb_warn("given block not used");
        }
        rb_scan_args(argc, argv, "1", &item);
        args[0] = item;
        args[1] = 0;
        rb_iterate(rb_each, obj, count_i, (VALUE)&args);
        return INT2NUM(args[1]);
    }
    else {
        long n = 0;

        rb_iterate(rb_each, obj, count_iter_i, (VALUE)&n);
        return INT2NUM(n);
    }
}

static VALUE
find_i(VALUE i, VALUE *memo)
{
    if (RTEST(rb_yield(i))) {
        *memo = i;
        rb_iter_break();
    }
    return Qnil;
}

/*
 *  call-seq:
 *     enum.detect(ifnone = nil) {| obj | block }  => obj or nil
 *     enum.find(ifnone = nil)   {| obj | block }  => obj or nil
 *
 *  Passes each entry in <i>enum</i> to <em>block</em>. Returns the
 *  first for which <em>block</em> is not <code>false</code>.  If no
 *  object matches, calls <i>ifnone</i> and returns its result when it
 *  is specified, or returns <code>nil</code>
 *
 *     (1..10).detect  {|i| i % 5 == 0 and i % 7 == 0 }   #=> nil
 *     (1..100).detect {|i| i % 5 == 0 and i % 7 == 0 }   #=> 35
 *
 */

static VALUE
enum_find(int argc, VALUE *argv, VALUE obj)
{
    VALUE memo = Qundef;
    VALUE if_none;

    rb_scan_args(argc, argv, "01", &if_none);
    RETURN_ENUMERATOR(obj, argc, argv);
    rb_iterate(rb_each, obj, find_i, (VALUE)&memo);
    if (memo != Qundef) {
        return memo;
    }
    if (!NIL_P(if_none)) {
        return rb_funcall(if_none, rb_intern("call"), 0, 0);
    }
    return Qnil;
}

static VALUE
find_all_i(VALUE i, VALUE ary)
{
    if (RTEST(rb_yield(i))) {
        rb_ary_push(ary, i);
    }
    return Qnil;
}

/*
 *  call-seq:
 *     enum.find_all {| obj | block }  => array
 *     enum.select   {| obj | block }  => array
 *
 *  Returns an array containing all elements of <i>enum</i> for which
 *  <em>block</em> is not <code>false</code> (see also
 *  <code>Enumerable#reject</code>).
 *
 *     (1..10).find_all {|i|  i % 3 == 0 }   #=> [3, 6, 9]
 *
 */

static VALUE
enum_find_all(VALUE obj)
{
    VALUE ary;

    RETURN_ENUMERATOR(obj, 0, 0);

    ary = rb_ary_new();
    rb_iterate(rb_each, obj, find_all_i, ary);

    return ary;
}

static VALUE
reject_i(VALUE i, VALUE ary)
{
    if (!RTEST(rb_yield(i))) {
        rb_ary_push(ary, i);
    }
    return Qnil;
}

/*
 *  call-seq:
 *     enum.reject {| obj | block }  => array
 *
 *  Returns an array for all elements of <i>enum</i> for which
 *  <em>block</em> is false (see also <code>Enumerable#find_all</code>).
 *
 *     (1..10).reject {|i|  i % 3 == 0 }   #=> [1, 2, 4, 5, 7, 8, 10]
 *
 */

static VALUE
enum_reject(VALUE obj)
{
    VALUE ary;

    RETURN_ENUMERATOR(obj, 0, 0);

    ary = rb_ary_new();
    rb_iterate(rb_each, obj, reject_i, ary);

    return ary;
}

static VALUE
collect_i(VALUE i, VALUE ary)
{
    rb_ary_push(ary, rb_yield(i));

    return Qnil;
}

static VALUE
collect_all(VALUE i, VALUE ary)
{
    rb_ary_push(ary, i);

    return Qnil;
}

/*
 *  call-seq:
 *     enum.collect {| obj | block }  => array
 *     enum.map     {| obj | block }  => array
 *
 *  Returns a new array with the results of running <em>block</em> once
 *  for every element in <i>enum</i>.
 *
 *     (1..4).collect {|i| i*i }   #=> [1, 4, 9, 16]
 *     (1..4).collect { "cat"  }   #=> ["cat", "cat", "cat", "cat"]
 *
 */

static VALUE
enum_collect(VALUE obj)
{
    VALUE ary;

    RETURN_ENUMERATOR(obj, 0, 0);

    ary = rb_ary_new();
    rb_iterate(rb_each, obj, collect_i, ary);

    return ary;
}

/*
 *  call-seq:
 *     enum.to_a      =>    array
 *     enum.entries   =>    array
 *
 *  Returns an array containing the items in <i>enum</i>.
 *
 *     (1..7).to_a                       #=> [1, 2, 3, 4, 5, 6, 7]
 *     { 'a'=>1, 'b'=>2, 'c'=>3 }.to_a   #=> [["a", 1], ["b", 2], ["c", 3]]
 */
static VALUE
enum_to_a(VALUE obj)
{
    VALUE ary = rb_ary_new();

    rb_iterate(rb_each, obj, collect_all, ary);

    return ary;
}

static VALUE
inject_i(VALUE i, VALUE *memo)
{
    if (*memo == Qundef) {
        *memo = i;
    }
    else {
        *memo = rb_yield_values(2, *memo, i);
    }
    return Qnil;
}

/*
 *  call-seq:
 *     enum.inject(initial) {| memo, obj | block }  => obj
 *     enum.inject          {| memo, obj | block }  => obj
 *
 *  Combines the elements of <i>enum</i> by applying the block to an
 *  accumulator value (<i>memo</i>) and each element in turn. At each
 *  step, <i>memo</i> is set to the value returned by the block. The
 *  first form lets you supply an initial value for <i>memo</i>. The
 *  second form uses the first element of the collection as a the
 *  initial value (and skips that element while iterating).
 *
 *     # Sum some numbers
 *     (5..10).inject {|sum, n| sum + n }              #=> 45
 *     # Multiply some numbers
 *     (5..10).inject(1) {|product, n| product * n }   #=> 151200
 *
 *     # find the longest word
 *     longest = %w{ cat sheep bear }.inject do |memo,word|
 *        memo.length > word.length ? memo : word
 *     end
 *     longest                                         #=> "sheep"
 *
 *     # find the length of the longest word
 *     longest = %w{ cat sheep bear }.inject(0) do |memo,word|
 *        memo >= word.length ? memo : word.length
 *     end
 *     longest                                         #=> 5
 *
 */

static VALUE
enum_inject(int argc, VALUE *argv, VALUE obj)
{
    VALUE memo = Qundef;

    if (rb_scan_args(argc, argv, "01", &memo) == 0)
        memo = Qundef;
    rb_iterate(rb_each, obj, inject_i, (VALUE)&memo);
    if (memo == Qundef) return Qnil;
    return memo;
}

static VALUE
partition_i(VALUE i, VALUE *ary)
{
    if (RTEST(rb_yield(i))) {
        rb_ary_push(ary[0], i);
    }
    else {
        rb_ary_push(ary[1], i);
    }
    return Qnil;
}

/*
 *  call-seq:
 *     enum.partition {| obj | block }  => [ true_array, false_array ]
 *
 *  Returns two arrays, the first containing the elements of
 *  <i>enum</i> for which the block evaluates to true, the second
 *  containing the rest.
 *
 *     (1..6).partition {|i| (i&1).zero?}   #=> [[2, 4, 6], [1, 3, 5]]
 *
 */

static VALUE
enum_partition(VALUE obj)
{
    VALUE ary[2];

    RETURN_ENUMERATOR(obj, 0, 0);

    ary[0] = rb_ary_new();
    ary[1] = rb_ary_new();
    rb_iterate(rb_each, obj, partition_i, (VALUE)ary);

    return rb_assoc_new(ary[0], ary[1]);
}

/*
 *  call-seq:
 *     enum.sort                     => array
 *     enum.sort {| a, b | block }   => array
 *
 *  Returns an array containing the items in <i>enum</i> sorted,
 *  either according to their own <code><=></code> method, or by using
 *  the results of the supplied block. The block should return -1, 0, or
 *  +1 depending on the comparison between <i>a</i> and <i>b</i>. As of
 *  Ruby 1.8, the method <code>Enumerable#sort_by</code> implements a
 *  built-in Schwartzian Transform, useful when key computation or
 *  comparison is expensive..
 *
 *     %w(rhea kea flea).sort         #=> ["flea", "kea", "rhea"]
 *     (1..10).sort {|a,b| b <=> a}   #=> [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
 */

static VALUE
enum_sort(VALUE obj)
{
    return rb_ary_sort(enum_to_a(obj));
}

static VALUE
sort_by_i(VALUE i, VALUE ary)
{
    VALUE v;
    NODE *memo;

    v = rb_yield(i);
    if (RBASIC(ary)->klass) {
        rb_raise(rb_eRuntimeError, "sort_by reentered");
    }
    memo = rb_node_newnode(NODE_MEMO, v, i, 0);
    rb_ary_push(ary, (VALUE)memo);
    return Qnil;
}

static int
sort_by_cmp(const void *ap, const void *bp, void *data)
{
    VALUE a = (*(NODE *const *)ap)->u1.value;
    VALUE b = (*(NODE *const *)bp)->u1.value;

    return rb_cmpint(rb_funcall(a, id_cmp, 1, b), a, b);
}

/*
 *  call-seq:
 *     enum.sort_by {| obj | block }    => array
 *
 *  Sorts <i>enum</i> using a set of keys generated by mapping the
 *  values in <i>enum</i> through the given block.
 *
 *     %w{ apple pear fig }.sort_by {|word| word.length}
                     #=> ["fig", "pear", "apple"]
 *
 *  The current implementation of <code>sort_by</code> generates an
 *  array of tuples containing the original collection element and the
 *  mapped value. This makes <code>sort_by</code> fairly expensive when
 *  the keysets are simple
 *
 *     require 'benchmark'
 *     include Benchmark
 *
 *     a = (1..100000).map {rand(100000)}
 *
 *     bm(10) do |b|
 *       b.report("Sort")    { a.sort }
 *       b.report("Sort by") { a.sort_by {|a| a} }
 *     end
 *
 *  <em>produces:</em>
 *
 *     user     system      total        real
 *     Sort        0.180000   0.000000   0.180000 (  0.175469)
 *     Sort by     1.980000   0.040000   2.020000 (  2.013586)
 *
 *  However, consider the case where comparing the keys is a non-trivial
 *  operation. The following code sorts some files on modification time
 *  using the basic <code>sort</code> method.
 *
 *     files = Dir["*"]
 *     sorted = files.sort {|a,b| File.new(a).mtime <=> File.new(b).mtime}
 *     sorted   #=> ["mon", "tues", "wed", "thurs"]
 *
 *  This sort is inefficient: it generates two new <code>File</code>
 *  objects during every comparison. A slightly better technique is to
 *  use the <code>Kernel#test</code> method to generate the modification
 *  times directly.
 *
 *     files = Dir["*"]
 *     sorted = files.sort { |a,b|
 *       test(?M, a) <=> test(?M, b)
 *     }
 *     sorted   #=> ["mon", "tues", "wed", "thurs"]
 *
 *  This still generates many unnecessary <code>Time</code> objects. A
 *  more efficient technique is to cache the sort keys (modification
 *  times in this case) before the sort. Perl users often call this
 *  approach a Schwartzian Transform, after Randal Schwartz. We
 *  construct a temporary array, where each element is an array
 *  containing our sort key along with the filename. We sort this array,
 *  and then extract the filename from the result.
 *
 *     sorted = Dir["*"].collect { |f|
 *        [test(?M, f), f]
 *     }.sort.collect { |f| f[1] }
 *     sorted   #=> ["mon", "tues", "wed", "thurs"]
 *
 *  This is exactly what <code>sort_by</code> does internally.
 *
 *     sorted = Dir["*"].sort_by {|f| test(?M, f)}
 *     sorted   #=> ["mon", "tues", "wed", "thurs"]
 */

static VALUE
enum_sort_by(VALUE obj)
{
    VALUE ary;
    long i;

    RETURN_ENUMERATOR(obj, 0, 0);

    if (TYPE(obj) == T_ARRAY) {
        ary  = rb_ary_new2(RARRAY(obj)->len);
    }
    else {
        ary = rb_ary_new();
    }
    RBASIC(ary)->klass = 0;
    rb_iterate(rb_each, obj, sort_by_i, ary);
    if (RARRAY(ary)->len > 1) {
        ruby_qsort(RARRAY(ary)->ptr, RARRAY(ary)->len, sizeof(VALUE), sort_by_cmp, 0);
    }
    if (RBASIC(ary)->klass) {
        rb_raise(rb_eRuntimeError, "sort_by reentered");
    }
    for (i=0; i<RARRAY(ary)->len; i++) {
        RARRAY(ary)->ptr[i] = RNODE(RARRAY(ary)->ptr[i])->u2.value;
    }
    RBASIC(ary)->klass = rb_cArray;
    return ary;
}

static VALUE
all_iter_i(VALUE i, VALUE *memo)
{
    if (!RTEST(rb_yield(i))) {
        *memo = Qfalse;
        rb_iter_break();
    }
    return Qnil;
}

static VALUE
all_i(VALUE i, VALUE *memo)
{
    if (!RTEST(i)) {
        *memo = Qfalse;
        rb_iter_break();
    }
    return Qnil;
}

/*
 *  call-seq:
 *     enum.all? [{|obj| block } ]   => true or false
 *
 *  Passes each element of the collection to the given block. The method
 *  returns <code>true</code> if the block never returns
 *  <code>false</code> or <code>nil</code>. If the block is not given,
 *  Ruby adds an implicit block of <code>{|obj| obj}</code> (that is
 *  <code>all?</code> will return <code>true</code> only if none of the
 *  collection members are <code>false</code> or <code>nil</code>.)
 *
 *     %w{ant bear cat}.all? {|word| word.length >= 3}   #=> true
 *     %w{ant bear cat}.all? {|word| word.length >= 4}   #=> false
 *     [ nil, true, 99 ].all?                            #=> false
 *
 */

static VALUE
enum_all(VALUE obj)
{
    VALUE result = Qtrue;

    rb_iterate(rb_each, obj, rb_block_given_p() ? all_iter_i : all_i, (VALUE)&result);
    return result;
}

static VALUE
any_iter_i(VALUE i, VALUE *memo)
{
    if (RTEST(rb_yield(i))) {
        *memo = Qtrue;
        rb_iter_break();
    }
    return Qnil;
}

static VALUE
any_i(VALUE i, VALUE *memo)
{
    if (RTEST(i)) {
        *memo = Qtrue;
        rb_iter_break();
    }
    return Qnil;
}

/*
 *  call-seq:
 *     enum.any? [{|obj| block } ]   => true or false
 *
 *  Passes each element of the collection to the given block. The method
 *  returns <code>true</code> if the block ever returns a value other
 *  that <code>false</code> or <code>nil</code>. If the block is not
 *  given, Ruby adds an implicit block of <code>{|obj| obj}</code> (that
 *  is <code>any?</code> will return <code>true</code> if at least one
 *  of the collection members is not <code>false</code> or
 *  <code>nil</code>.
 *
 *     %w{ant bear cat}.any? {|word| word.length >= 3}   #=> true
 *     %w{ant bear cat}.any? {|word| word.length >= 4}   #=> true
 *     [ nil, true, 99 ].any?                            #=> true
 *
 */

static VALUE
enum_any(VALUE obj)
{
    VALUE result = Qfalse;

    rb_iterate(rb_each, obj, rb_block_given_p() ? any_iter_i : any_i, (VALUE)&result);
    return result;
}

static VALUE
one_iter_i(VALUE i, VALUE *memo)
{
    if (RTEST(rb_yield(i))) {
        if (*memo == Qundef) {
            *memo = Qtrue;
        }
        else if (*memo == Qtrue) {
            *memo = Qfalse;
        }
    }
    return Qnil;
}

static VALUE
one_i(VALUE i, VALUE *memo)
{
    if (RTEST(i)) {
        if (*memo == Qundef) {
            *memo = Qtrue;
        }
        else if (*memo == Qtrue) {
            *memo = Qfalse;
        }
    }
    return Qnil;
}

/*
 *  call-seq:
 *     enum.one? [{|obj| block }]   => true or false
 *
 *  Passes each element of the collection to the given block. The method
 *  returns <code>true</code> if the block returns <code>true</code>
 *  exactly once. If the block is not given, <code>one?</code> will return
 *  <code>true</code> only if exactly one of the collection members are
 *  true.
 *
 *     %w{ant bear cat}.one? {|word| word.length == 4}   #=> true
 *     %w{ant bear cat}.one? {|word| word.length >= 4}   #=> false
 *     [ nil, true, 99 ].one?                            #=> true
 *
 */

static VALUE
enum_one(VALUE obj)
{
    VALUE result = Qundef;

    rb_iterate(rb_each, obj, rb_block_given_p() ? one_iter_i : one_i, (VALUE)&result);
    if (result == Qundef) return Qfalse;
    return result;
}

static VALUE
none_iter_i(VALUE i, VALUE *memo)
{
    if (RTEST(rb_yield(i))) {
        *memo = Qfalse;
        rb_iter_break();
    }
    return Qnil;
}

static VALUE
none_i(VALUE i, VALUE *memo)
{
    if (RTEST(i)) {
        *memo = Qfalse;
        rb_iter_break();
    }
    return Qnil;
}

/*
 *  call-seq:
 *     enum.none? [{|obj| block }]   => true or false
 *
 *  Passes each element of the collection to the given block. The method
 *  returns <code>true</code> if the block never returns <code>true</code>
 *  for all elements. If the block is not given, <code>one?</code> will return
 *  <code>true</code> only if any of the collection members is true.
 *
 *     %w{ant bear cat}.one? {|word| word.length == 4}   #=> true
 *     %w{ant bear cat}.one? {|word| word.length >= 4}   #=> false
 *     [ nil, true, 99 ].one?                            #=> true
 *
 */

static VALUE
enum_none(VALUE obj)
{
    VALUE result = Qtrue;

    rb_iterate(rb_each, obj, rb_block_given_p() ? none_iter_i : none_i, (VALUE)&result);
    return result;
}

static VALUE
min_i(VALUE i, VALUE *memo)
{
    VALUE cmp;

    if (*memo == Qundef) {
        *memo = i;
    }
    else {
        cmp = rb_funcall(i, id_cmp, 1, *memo);
        if (rb_cmpint(cmp, i, *memo) < 0) {
            *memo = i;
        }
    }
    return Qnil;
}

static VALUE
min_ii(VALUE i, VALUE *memo)
{
    VALUE cmp;

    if (*memo == Qundef) {
        *memo = i;
    }
    else {
        cmp = rb_yield_values(2, i, *memo);
        if (rb_cmpint(cmp, i, *memo) < 0) {
            *memo = i;
        }
    }
    return Qnil;
}

/*
 *  call-seq:
 *     enum.min                    => obj
 *     enum.min {| a,b | block }   => obj
 *
 *  Returns the object in <i>enum</i> with the minimum value. The
 *  first form assumes all objects implement <code>Comparable</code>;
 *  the second uses the block to return <em>a <=> b</em>.
 *
 *     a = %w(albatross dog horse)
 *     a.min                                  #=> "albatross"
 *     a.min {|a,b| a.length <=> b.length }   #=> "dog"
 */

static VALUE
enum_min(VALUE obj)
{
    VALUE result = Qundef;

    rb_iterate(rb_each, obj, rb_block_given_p() ? min_ii : min_i, (VALUE)&result);
    if (result == Qundef) return Qnil;
    return result;
}

static VALUE
max_i(VALUE i, VALUE *memo)
{
    VALUE cmp;

    if (*memo == Qundef) {
        *memo = i;
    }
    else {
        cmp = rb_funcall(i, id_cmp, 1, *memo);
        if (rb_cmpint(cmp, i, *memo) > 0) {
            *memo = i;
        }
    }
    return Qnil;
}

static VALUE
max_ii(VALUE i, VALUE *memo)
{
    VALUE cmp;

    if (*memo == Qundef) {
        *memo = i;
    }
    else {
        cmp = rb_yield_values(2, i, *memo);
        if (rb_cmpint(cmp, i, *memo) > 0) {
            *memo = i;
        }
    }
    return Qnil;
}

/*
 *  call-seq:
 *     enum.max                   => obj
 *     enum.max {|a,b| block }    => obj
 *
 *  Returns the object in _enum_ with the maximum value. The
 *  first form assumes all objects implement <code>Comparable</code>;
 *  the second uses the block to return <em>a <=> b</em>.
 *
 *     a = %w(albatross dog horse)
 *     a.max                                  #=> "horse"
 *     a.max {|a,b| a.length <=> b.length }   #=> "albatross"
 */

static VALUE
enum_max(VALUE obj)
{
    VALUE result = Qundef;

    rb_iterate(rb_each, obj, rb_block_given_p() ? max_ii : max_i, (VALUE)&result);
    if (result == Qundef) return Qnil;
    return result;
}

static VALUE
min_by_i(VALUE i, VALUE *memo)
{
    VALUE v;

    v = rb_yield(i);
    if (memo[0] == Qundef) {
        memo[0] = v;
        memo[1] = i;
    }
    else if (rb_cmpint(rb_funcall(v, id_cmp, 1, memo[0]), v, memo[0]) < 0) {
        memo[0] = v;
        memo[1] = i;
    }
    return Qnil;
}

/*
 *  call-seq:
 *     enum.min_by {| obj| block }   => obj
 *
 *  Returns the object in <i>enum</i> that gives the minimum
 *  value from the given block.
 *
 *     a = %w(albatross dog horse)
 *     a.min_by {|x| x.length }   #=> "dog"
 */

static VALUE
enum_min_by(VALUE obj)
{
    VALUE memo[2];

    RETURN_ENUMERATOR(obj, 0, 0);

    memo[0] = Qundef;
    memo[1] = Qnil;
    rb_iterate(rb_each, obj, min_by_i, (VALUE)memo);
    return memo[1];
}

static VALUE
max_by_i(VALUE i, VALUE *memo)
{
    VALUE v;

    v = rb_yield(i);
    if (memo[0] == Qundef) {
        memo[0] = v;
        memo[1] = i;
    }
    else if (rb_cmpint(rb_funcall(v, id_cmp, 1, memo[0]), v, memo[0]) > 0) {
        memo[0] = v;
        memo[1] = i;
    }
    return Qnil;
}

/*
 *  call-seq:
 *     enum.max_by {| obj| block }   => obj
 *
 *  Returns the object in <i>enum</i> that gives the maximum
 *  value from the given block.
 *
 *     a = %w(albatross dog horse)
 *     a.max_by {|x| x.length }   #=> "albatross"
 */

static VALUE
enum_max_by(VALUE obj)
{
    VALUE memo[2];

    RETURN_ENUMERATOR(obj, 0, 0);

    memo[0] = Qundef;
    memo[1] = Qnil;
    rb_iterate(rb_each, obj, max_by_i, (VALUE)memo);
    return memo[1];
}

static VALUE
member_i(VALUE item, VALUE *memo)
{
    if (rb_equal(item, memo[0])) {
        memo[1] = Qtrue;
        rb_iter_break();
    }
    return Qnil;
}

/*
 *  call-seq:
 *     enum.include?(obj)     => true or false
 *     enum.member?(obj)      => true or false
 *
 *  Returns <code>true</code> if any member of <i>enum</i> equals
 *  <i>obj</i>. Equality is tested using <code>==</code>.
 *
 *     IO.constants.include? "SEEK_SET"          #=> true
 *     IO.constants.include? "SEEK_NO_FURTHER"   #=> false
 *
 */

static VALUE
enum_member(VALUE obj, VALUE val)
{
    VALUE memo[2];

    memo[0] = val;
    memo[1] = Qfalse;
    rb_iterate(rb_each, obj, member_i, (VALUE)memo);
    return memo[1];
}

static VALUE
each_with_index_i(VALUE val, VALUE *memo)
{
    rb_yield_values(2, val, INT2FIX(*memo));
    ++*memo;
    return Qnil;
}

/*
 *  call-seq:
 *     enum.each_with_index {|obj, i| block }  -> enum
 *
 *  Calls <em>block</em> with two arguments, the item and its index, for
 *  each item in <i>enum</i>.
 *
 *     hash = Hash.new
 *     %w(cat dog wombat).each_with_index {|item, index|
 *       hash[item] = index
 *     }
 *     hash   #=> {"cat"=>0, "wombat"=>2, "dog"=>1}
 *
 */

static VALUE
enum_each_with_index(VALUE obj)
{
    VALUE memo = 0;

    RETURN_ENUMERATOR(obj, 0, 0);

    rb_iterate(rb_each, obj, each_with_index_i, (VALUE)&memo);
    return obj;
}

static VALUE
zip_i(VALUE val, VALUE *memo)
{
    VALUE result = memo[0];
    VALUE args = memo[1];
    int idx = memo[2]++;
    VALUE tmp;
    int i;

    tmp = rb_ary_new2(RARRAY(args)->len + 1);
    rb_ary_store(tmp, 0, val);
    for (i=0; i<RARRAY(args)->len; i++) {
        rb_ary_push(tmp, rb_ary_entry(RARRAY(args)->ptr[i], idx));
    }
    if (rb_block_given_p()) {
        rb_yield(tmp);
    }
    else {
        rb_ary_push(result, tmp);
    }
    return Qnil;
}

/*
 *  call-seq:
 *     enum.zip(arg, ...)                   => array
 *     enum.zip(arg, ...) {|arr| block }    => nil
 *
 *  Converts any arguments to arrays, then merges elements of
 *  <i>enum</i> with corresponding elements from each argument. This
 *  generates a sequence of <code>enum#size</code> <em>n</em>-element
 *  arrays, where <em>n</em> is one more that the count of arguments. If
 *  the size of any argument is less than <code>enum#size</code>,
 *  <code>nil</code> values are supplied. If a block given, it is
 *  invoked for each output array, otherwise an array of arrays is
 *  returned.
 *
 *     a = [ 4, 5, 6 ]
 *     b = [ 7, 8, 9 ]
 *
 *     (1..3).zip(a, b)      #=> [[1, 4, 7], [2, 5, 8], [3, 6, 9]]
 *     "cat\ndog".zip([1])   #=> [["cat\n", 1], ["dog", nil]]
 *     (1..3).zip            #=> [[1], [2], [3]]
 *
 */

static VALUE
enum_zip(int argc, VALUE *argv, VALUE obj)
{
    int i;
    VALUE result;
    VALUE memo[3];

    for (i=0; i<argc; i++) {
        argv[i] = rb_convert_type(argv[i], T_ARRAY, "Array", "to_a");
    }
    result = rb_block_given_p() ? Qnil : rb_ary_new();
    memo[0] = result;
    memo[1] = rb_ary_new4(argc, argv);
    memo[2] = 0;
    rb_iterate(rb_each, obj, zip_i, (VALUE)memo);

    return result;
}

/*
 *  The <code>Enumerable</code> mixin provides collection classes with
 *  several traversal and searching methods, and with the ability to
 *  sort. The class must provide a method <code>each</code>, which
 *  yields successive members of the collection. If
 *  <code>Enumerable#max</code>, <code>#min</code>, or
 *  <code>#sort</code> is used, the objects in the collection must also
 *  implement a meaningful <code><=></code> operator, as these methods
 *  rely on an ordering between members of the collection.
 */

void
Init_Enumerable(void)
{
    rb_mEnumerable = rb_define_module("Enumerable");

    rb_define_method(rb_mEnumerable,"to_a", enum_to_a, 0);
    rb_define_method(rb_mEnumerable,"entries", enum_to_a, 0);

    rb_define_method(rb_mEnumerable,"sort", enum_sort, 0);
    rb_define_method(rb_mEnumerable,"sort_by", enum_sort_by, 0);
    rb_define_method(rb_mEnumerable,"grep", enum_grep, 1);
    rb_define_method(rb_mEnumerable,"count", enum_count, -1);
    rb_define_method(rb_mEnumerable,"find", enum_find, -1);
    rb_define_method(rb_mEnumerable,"detect", enum_find, -1);
    rb_define_method(rb_mEnumerable,"find_all", enum_find_all, 0);
    rb_define_method(rb_mEnumerable,"select", enum_find_all, 0);
    rb_define_method(rb_mEnumerable,"reject", enum_reject, 0);
    rb_define_method(rb_mEnumerable,"collect", enum_collect, 0);
    rb_define_method(rb_mEnumerable,"map", enum_collect, 0);
    rb_define_method(rb_mEnumerable,"inject", enum_inject, -1);
    rb_define_method(rb_mEnumerable,"partition", enum_partition, 0);
    rb_define_method(rb_mEnumerable,"all?", enum_all, 0);
    rb_define_method(rb_mEnumerable,"any?", enum_any, 0);
    rb_define_method(rb_mEnumerable,"one?", enum_one, 0);
    rb_define_method(rb_mEnumerable,"none?", enum_none, 0);
    rb_define_method(rb_mEnumerable,"min", enum_min, 0);
    rb_define_method(rb_mEnumerable,"max", enum_max, 0);
    rb_define_method(rb_mEnumerable,"min_by", enum_min_by, 0);
    rb_define_method(rb_mEnumerable,"max_by", enum_max_by, 0);
    rb_define_method(rb_mEnumerable,"member?", enum_member, 1);
    rb_define_method(rb_mEnumerable,"include?", enum_member, 1);
    rb_define_method(rb_mEnumerable,"each_with_index", enum_each_with_index, 0);
    rb_define_method(rb_mEnumerable, "zip", enum_zip, -1);

    id_eqq  = rb_intern("===");
    id_each = rb_intern("each");
    id_cmp  = rb_intern("<=>");
}
/* [<][>][^] [v] [top][bottom][index] [help] */


enumerator.c

root/enumerator.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. proc_call
  2. method_call
  3. enumerator_mark
  4. enumerator_ptr
  5. enumerator_iter_i
  6. obj_to_enum
  7. enumerator_enum_with_index
  8. each_slice_i
  9. enum_each_slice
  10. enumerator_enum_slice
  11. each_cons_i
  12. enum_each_cons
  13. enumerator_enum_cons
  14. enumerator_allocate
  15. enumerator_init
  16. enumerator_initialize
  17. rb_enumeratorize
  18. enumerator_iter
  19. enumerator_each
  20. enumerator_with_index_i
  21. enumerator_with_index
  22. Init_Enumerator
/************************************************

  enumerator.c - provides Enumerator class

  $Author: nobu $

  Copyright (C) 2001-2003 Akinori MUSHA

  $Idaemons: /home/cvs/rb/enumerator/enumerator.c,v 1.1.1.1 2001/07/15 10:12:48 knu Exp $
  $RoughId: enumerator.c,v 1.6 2003/07/27 11:03:24 nobu Exp $
  $Id: enumerator.c,v 1.9 2005/10/27 11:35:24 nobu Exp $

************************************************/

#include "ruby.h"

/*
 * Document-class: Enumerable::Enumerator
 *
 * A class which provides a method `each' to be used as an Enumerable
 * object.
 */
static VALUE rb_cEnumerator;
static VALUE sym_each, sym_each_with_index, sym_each_slice, sym_each_cons;

static VALUE
proc_call(VALUE proc, VALUE args)
{
    if (TYPE(args) != T_ARRAY) {
        args = rb_values_new(1, args);
    }
    return rb_proc_call(proc, args);
}

static VALUE
method_call(VALUE method, VALUE args)
{
    int argc = 0;
    VALUE *argv = 0;
    if (args) {
        argc = RARRAY(args)->len;
        argv = RARRAY(args)->ptr;
    }
    return rb_method_call(argc, argv, method);
}

struct enumerator {
    VALUE method;
    VALUE proc;
    VALUE args;
    VALUE (*iter)(VALUE, struct enumerator *);
};

static void
enumerator_mark(void *p)
{
    struct enumerator *ptr = p;
    rb_gc_mark(ptr->method);
    rb_gc_mark(ptr->proc);
    rb_gc_mark(ptr->args);
}

static struct enumerator *
enumerator_ptr(VALUE obj)
{
    struct enumerator *ptr;

    Data_Get_Struct(obj, struct enumerator, ptr);
    if (RDATA(obj)->dmark != enumerator_mark) {
        rb_raise(rb_eTypeError,
                 "wrong argument type %s (expected Enumerable::Enumerator)",
                 rb_obj_classname(obj));
    }
    if (!ptr) {
        rb_raise(rb_eArgError, "uninitialized enumerator");
    }
    return ptr;
}

static VALUE
enumerator_iter_i(VALUE i, struct enumerator *e)
{
    return rb_yield(proc_call(e->proc, i));
}

/*
 *  call-seq:
 *    obj.to_enum(method = :each, *args)
 *    obj.enum_for(method = :each, *args)
 *
 *  Returns Enumerable::Enumerator.new(self, method, *args).
 *
 *  e.g.:
 *     str = "xyz"
 *
 *     enum = str.enum_for(:each_byte)
 *     a = enum.map {|b| '%02x' % b } #=> ["78", "79", "7a"]
 *
 *     # protects an array from being modified
 *     a = [1, 2, 3]
 *     some_method(a.to_enum)
 *
 */
static VALUE
obj_to_enum(int argc, VALUE *argv, VALUE obj)
{
    VALUE meth = sym_each;

    if (argc > 0) {
        --argc;
        meth = *argv++;
    }
    return rb_enumeratorize(obj, meth, argc, argv);
}

/*
 *  call-seq:
 *    enum_with_index
 *
 *  Returns Enumerable::Enumerator.new(self, :each_with_index).
 *
 */
static VALUE
enumerator_enum_with_index(VALUE obj)
{
    return rb_enumeratorize(obj, sym_each_with_index, 0, 0);
}

static VALUE
each_slice_i(VALUE val, VALUE *memo)
{
    VALUE ary = memo[0];
    long size = (long)memo[1];

    rb_ary_push(ary, val);

    if (RARRAY(ary)->len == size) {
        rb_yield(ary);
        memo[0] = rb_ary_new2(size);
    }

    return Qnil;
}

/*
 *  call-seq:
 *    e.each_slice(n) {...}
 *
 *  Iterates the given block for each slice of <n> elements.
 *
 *  e.g.:
 *      (1..10).each_slice(3) {|a| p a}
 *      # outputs below
 *      [1, 2, 3]
 *      [4, 5, 6]
 *      [7, 8, 9]
 *      [10]
 *
 */
static VALUE
enum_each_slice(VALUE obj, VALUE n)
{
    long size = NUM2LONG(n);
    VALUE args[2], ary;

    if (size <= 0) rb_raise(rb_eArgError, "invalid slice size");

    args[0] = rb_ary_new2(size);
    args[1] = (VALUE)size;

    rb_iterate(rb_each, obj, each_slice_i, (VALUE)args);

    ary = args[0];
    if (RARRAY(ary)->len > 0) rb_yield(ary);

    return Qnil;
}

/*
 *  call-seq:
 *    e.enum_slice(n)
 *
 *  Returns Enumerable::Enumerator.new(self, :each_slice, n).
 *
 */
static VALUE
enumerator_enum_slice(VALUE obj, VALUE n)
{
    return rb_enumeratorize(obj, sym_each_slice, 1, &n);
}

static VALUE
each_cons_i(VALUE val, VALUE *memo)
{
    VALUE ary = memo[0];
    long size = (long)memo[1];

    if (RARRAY(ary)->len == size) {
        rb_ary_shift(ary);
    }
    rb_ary_push(ary, val);
    if (RARRAY(ary)->len == size) {
        rb_yield(rb_ary_dup(ary));
    }
    return Qnil;
}

/*
 *  call-seq:
 *    each_cons(n) {...}
 *
 *  Iterates the given block for each array of consecutive <n>
 *  elements.
 *
 *  e.g.:
 *      (1..10).each_cons(3) {|a| p a}
 *      # outputs below
 *      [1, 2, 3]
 *      [2, 3, 4]
 *      [3, 4, 5]
 *      [4, 5, 6]
 *      [5, 6, 7]
 *      [6, 7, 8]
 *      [7, 8, 9]
 *      [8, 9, 10]
 *
 */
static VALUE
enum_each_cons(VALUE obj, VALUE n)
{
    long size = NUM2LONG(n);
    VALUE args[2];

    if (size <= 0) rb_raise(rb_eArgError, "invalid size");
    args[0] = rb_ary_new2(size);
    args[1] = (VALUE)size;

    rb_iterate(rb_each, obj, each_cons_i, (VALUE)args);

    return Qnil;
}

/*
 *  call-seq:
 *    e.enum_cons(n)
 *
 *  Returns Enumerable::Enumerator.new(self, :each_cons, n).
 *
 */
static VALUE
enumerator_enum_cons(VALUE obj, VALUE n)
{
    return rb_enumeratorize(obj, sym_each_cons, 1, &n);
}

static VALUE
enumerator_allocate(VALUE klass)
{
    struct enumerator *ptr;
    return Data_Make_Struct(klass, struct enumerator,
                            enumerator_mark, -1, ptr);
}

static VALUE
enumerator_init(VALUE enum_obj, VALUE obj, VALUE meth, int argc, VALUE *argv)
{
    struct enumerator *ptr = enumerator_ptr(enum_obj);

    ptr->method = rb_obj_method(obj, meth);
    if (rb_block_given_p()) {
        ptr->proc = rb_block_proc();
        ptr->iter = enumerator_iter_i;
    }
    else {
        ptr->iter = (VALUE (*)(VALUE, struct enumerator *))rb_yield;
    }
    if (argc) ptr->args = rb_ary_new4(argc, argv);

    return enum_obj;
}

/*
 *  call-seq:
 *    Enumerable::Enumerator.new(obj, method = :each, *args)
 *
 *  Creates a new Enumerable::Enumerator object, which is to be
 *  used as an Enumerable object using the given object's given
 *  method with the given arguments.
 *
 *  e.g.:
 *      str = "xyz"
 *
 *      enum = Enumerable::Enumerator.new(str, :each_byte)
 *      a = enum.map {|b| '%02x' % b } #=> ["78", "79", "7a"]
 *
 */
static VALUE
enumerator_initialize(int argc, VALUE *argv, VALUE obj)
{
    VALUE recv, meth = sym_each;

    if (argc == 0)
        rb_raise(rb_eArgError, "wrong number of argument (0 for 1)");
    recv = *argv++;
    if (--argc) {
        meth = *argv++;
        --argc;
    }
    return enumerator_init(obj, recv, meth, argc, argv);
}

VALUE
rb_enumeratorize(VALUE obj, VALUE meth, int argc, VALUE *argv)
{
    return enumerator_init(enumerator_allocate(rb_cEnumerator), obj, meth, argc, argv);
}

static VALUE
enumerator_iter(VALUE memo)
{
    struct enumerator *e = (struct enumerator *)memo;

    return method_call(e->method, e->args);
}

/*
 *  call-seq:
 *    enum.each {...}
 *
 *  Iterates the given block using the object and the method specified
 *  in the first place.
 *
 */
static VALUE
enumerator_each(VALUE obj)
{
    struct enumerator *e = enumerator_ptr(obj);

    return rb_iterate(enumerator_iter, (VALUE)e, e->iter, (VALUE)e);
}

static VALUE
enumerator_with_index_i(VALUE val, VALUE *memo)
{
    val = rb_yield_values(2, val, INT2FIX(*memo));
    ++*memo;
    return val;
}

/*
 *  call-seq:
 *    e.with_index {|(*args), idx| ... }
 *
 *  Iterates the given block for each elements with an index, which
 *  start from 0.
 *
 */
static VALUE
enumerator_with_index(VALUE obj)
{
    struct enumerator *e = enumerator_ptr(obj);
    VALUE memo = 0;

    return rb_iterate(enumerator_iter, (VALUE)e,
                      enumerator_with_index_i, (VALUE)&memo);
}

void
Init_Enumerator(void)
{
    rb_define_method(rb_mKernel, "to_enum", obj_to_enum, -1);
    rb_define_method(rb_mKernel, "enum_for", obj_to_enum, -1);

    rb_define_method(rb_mEnumerable, "enum_with_index", enumerator_enum_with_index, 0);
    rb_define_method(rb_mEnumerable, "each_slice", enum_each_slice, 1);
    rb_define_method(rb_mEnumerable, "enum_slice", enumerator_enum_slice, 1);
    rb_define_method(rb_mEnumerable, "each_cons", enum_each_cons, 1);
    rb_define_method(rb_mEnumerable, "enum_cons", enumerator_enum_cons, 1);

    rb_cEnumerator = rb_define_class_under(rb_mEnumerable, "Enumerator", rb_cObject);
    rb_include_module(rb_cEnumerator, rb_mEnumerable);

    rb_define_alloc_func(rb_cEnumerator, enumerator_allocate);
    rb_define_method(rb_cEnumerator, "initialize", enumerator_initialize, -1);
    rb_define_method(rb_cEnumerator, "each", enumerator_each, 0);
    rb_define_method(rb_cEnumerator, "with_index", enumerator_with_index, 0);

    sym_each            = ID2SYM(rb_intern("each"));
    sym_each_with_index = ID2SYM(rb_intern("each_with_index"));
    sym_each_slice      = ID2SYM(rb_intern("each_slice"));
    sym_each_cons       = ID2SYM(rb_intern("each_cons"));

    rb_provide("enumerator.so");        /* for backward compatibility */
}
/* [<][>][^] [v] [top][bottom][index] [help] */


env.h

root/env.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/**********************************************************************

  env.h -

  $Author: matz $
  $Date: 2005/10/21 09:00:01 $
  created at: Mon Jul 11 11:53:03 JST 1994

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#ifndef ENV_H
#define ENV_H

RUBY_EXTERN struct FRAME {
    VALUE self;
    int argc;
    ID callee;
    ID this_func;
    VALUE this_class;
    struct FRAME *prev;
    struct FRAME *tmp;
    struct RNode *node;
    int iter;
    int flags;
    unsigned long uniq;
} *ruby_frame;

void rb_gc_mark_frame(struct FRAME *);

#define FRAME_DMETH  1
#define FRAME_FUNC   2

RUBY_EXTERN struct SCOPE {
    struct RBasic super;
    ID *local_tbl;
    VALUE *local_vars;
    int flags;
} *ruby_scope;

#define SCOPE_ALLOCA  0
#define SCOPE_MALLOC  1
#define SCOPE_NOSTACK 2
#define SCOPE_DONT_RECYCLE 4

RUBY_EXTERN int ruby_in_eval;

RUBY_EXTERN VALUE ruby_class;

struct RVarmap {
    struct RBasic super;
    ID id;
    VALUE val;
    struct RVarmap *next;
};
RUBY_EXTERN struct RVarmap *ruby_dyna_vars;

struct METHOD {
    VALUE klass, rklass;
    VALUE recv;
    ID id, oid;
    int safe_level;
    struct RNode *body;
};

struct BLOCK {
    struct RNode *var;
    struct RNode *body;
    VALUE self;
    struct FRAME frame;
    struct SCOPE *scope;
    VALUE klass;
    struct RNode *cref;
    int iter;
    int vmode;
    int flags;
    int uniq;
    struct RVarmap *dyna_vars;
    VALUE orig_thread;
    VALUE wrapper;
    VALUE block_obj;
    struct BLOCK *outer;
    struct BLOCK *prev;
};

#define BLOCK_D_SCOPE 1
#define BLOCK_LAMBDA  2
#define BLOCK_FROM_METHOD  4

#endif /* ENV_H */
/* [<][>][^][v][top][bottom][index] [help] */


error.c

root/error.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. err_position
  2. err_snprintf
  3. err_print
  4. rb_compile_error
  5. rb_compile_error_append
  6. warn_print
  7. rb_warn
  8. rb_warning
  9. rb_warn_m
  10. rb_bug
  11. rb_check_type
  12. rb_exc_new
  13. rb_exc_new2
  14. rb_exc_new3
  15. exc_initialize
  16. exc_exception
  17. exc_to_s
  18. exc_message
  19. exc_inspect
  20. exc_backtrace
  21. check_backtrace
  22. exc_set_backtrace
  23. exc_equal
  24. exit_initialize
  25. exit_status
  26. exit_success_p
  27. rb_name_error
  28. name_err_initialize
  29. name_err_name
  30. name_err_to_s
  31. nometh_err_initialize
  32. name_err_mesg_mark
  33. name_err_mesg_new
  34. name_err_mesg_equal
  35. name_err_mesg_to_str
  36. name_err_mesg_load
  37. nometh_err_args
  38. rb_invalid_str
  39. set_syserr
  40. get_syserr
  41. syserr_initialize
  42. syserr_errno
  43. syserr_eqq
  44. errno_missing
  45. Init_Exception
  46. rb_raise
  47. rb_loaderror
  48. rb_notimplement
  49. rb_fatal
  50. rb_sys_fail
  51. rb_sys_warning
  52. rb_load_fail
  53. rb_error_frozen
  54. rb_check_frozen
  55. Init_syserr
  56. err_append
/**********************************************************************

  error.c -

  $Author: akr $
  $Date: 2005/09/28 03:51:52 $
  created at: Mon Aug  9 16:11:34 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#include "ruby.h"
#include "env.h"
#include "st.h"

#include <stdio.h>
#include <stdarg.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifndef EXIT_SUCCESS
#define EXIT_SUCCESS 0
#endif

extern const char ruby_version[], ruby_release_date[], ruby_platform[];

int ruby_nerrs;

static int
err_position(char *buf, long len)
{
    ruby_set_current_source();
    if (!ruby_sourcefile) {
        return 0;
    }
    else if (ruby_sourceline == 0) {
        return snprintf(buf, len, "%s: ", ruby_sourcefile);
    }
    else {
        return snprintf(buf, len, "%s:%d: ", ruby_sourcefile, ruby_sourceline);
    }
}

static void
err_snprintf(char *buf, long len, const char *fmt, va_list args)
{
    long n;

    n = err_position(buf, len);
    if (len > n) {
        vsnprintf((char*)buf+n, len-n, fmt, args);
    }
}

static void err_append(const char*);
static void
err_print(const char *fmt, va_list args)
{
    char buf[BUFSIZ];

    err_snprintf(buf, BUFSIZ, fmt, args);
    err_append(buf);
}

void
rb_compile_error(const char *fmt, ...)
{
    va_list args;

    va_start(args, fmt);
    err_print(fmt, args);
    va_end(args);
    ruby_nerrs++;
}

void
rb_compile_error_append(const char *fmt, ...)
{
    va_list args;
    char buf[BUFSIZ];

    va_start(args, fmt);
    vsnprintf(buf, BUFSIZ, fmt, args);
    va_end(args);
    err_append(buf);
}

static void
warn_print(const char *fmt, va_list args)
{
    char buf[BUFSIZ];
    int len;

    err_snprintf(buf, BUFSIZ, fmt, args);
    len = strlen(buf);
    buf[len++] = '\n';
    rb_write_error2(buf, len);
}

void
rb_warn(const char *fmt, ...)
{
    char buf[BUFSIZ];
    va_list args;

    if (NIL_P(ruby_verbose)) return;

    snprintf(buf, BUFSIZ, "warning: %s", fmt);

    va_start(args, fmt);
    warn_print(buf, args);
    va_end(args);
}

/* rb_warning() reports only in verbose mode */
void
rb_warning(const char *fmt, ...)
{
    char buf[BUFSIZ];
    va_list args;

    if (!RTEST(ruby_verbose)) return;

    snprintf(buf, BUFSIZ, "warning: %s", fmt);

    va_start(args, fmt);
    warn_print(buf, args);
    va_end(args);
}

/*
 * call-seq:
 *    warn(msg)   => nil
 *
 * Display the given message (followed by a newline) on STDERR unless
 * warnings are disabled (for example with the <code>-W0</code> flag).
 */

static VALUE
rb_warn_m(VALUE self, VALUE mesg)
{
    if (!NIL_P(ruby_verbose)) {
        rb_io_write(rb_stderr, mesg);
        rb_io_write(rb_stderr, rb_default_rs);
    }
    return Qnil;
}

void
rb_bug(const char *fmt, ...)
{
    char buf[BUFSIZ];
    va_list args;
    FILE *out = stderr;
    int len = err_position(buf, BUFSIZ);

    if (fwrite(buf, 1, len, out) == len ||
        fwrite(buf, 1, len, (out = stdout)) == len) {
        fputs("[BUG] ", out);
        va_start(args, fmt);
        vfprintf(out, fmt, args);
        va_end(args);
        fprintf(out, "\nruby %s (%s) [%s]\n\n",
                ruby_version, ruby_release_date, ruby_platform);
    }
    abort();
}

static struct types {
    int type;
    const char *name;
} builtin_types[] = {
    {T_NIL,     "nil"},
    {T_OBJECT,  "Object"},
    {T_CLASS,   "Class"},
    {T_ICLASS,  "iClass"},      /* internal use: mixed-in module holder */
    {T_MODULE,  "Module"},
    {T_FLOAT,   "Float"},
    {T_STRING,  "String"},
    {T_REGEXP,  "Regexp"},
    {T_ARRAY,   "Array"},
    {T_FIXNUM,  "Fixnum"},
    {T_HASH,    "Hash"},
    {T_STRUCT,  "Struct"},
    {T_BIGNUM,  "Bignum"},
    {T_FILE,    "File"},
    {T_TRUE,    "true"},
    {T_FALSE,   "false"},
    {T_SYMBOL,  "Symbol"},      /* :symbol */
    {T_DATA,    "Data"},        /* internal use: wrapped C pointers */
    {T_MATCH,   "MatchData"},   /* data of $~ */
    {T_VARMAP,  "Varmap"},      /* internal use: dynamic variables */
    {T_SCOPE,   "Scope"},       /* internal use: variable scope */
    {T_NODE,    "Node"},        /* internal use: syntax tree node */
    {T_UNDEF,   "undef"},       /* internal use: #undef; should not happen */
    {-1,        0}
};

void
rb_check_type(VALUE x, int t)
{
    struct types *type = builtin_types;

    if (x == Qundef) {
        rb_bug("undef leaked to the Ruby space");
    }

    if (TYPE(x) != t) {
        while (type->type >= 0) {
            if (type->type == t) {
                char *etype;

                if (NIL_P(x)) {
                    etype = "nil";
                }
                else if (FIXNUM_P(x)) {
                    etype = "Fixnum";
                }
                else if (SYMBOL_P(x)) {
                    etype = "Symbol";
                }
                else if (rb_special_const_p(x)) {
                    etype = RSTRING(rb_obj_as_string(x))->ptr;
                }
                else {
                    etype = rb_obj_classname(x);
                }
                rb_raise(rb_eTypeError, "wrong argument type %s (expected %s)",
                         etype, type->name);
            }
            type++;
        }
        rb_bug("unknown type 0x%x (0x%x given)", t, TYPE(x));
    }
}

/* exception classes */
#include <errno.h>

VALUE rb_eException;
VALUE rb_eSystemExit;
VALUE rb_eInterrupt;
VALUE rb_eSignal;
VALUE rb_eFatal;
VALUE rb_eStandardError;
VALUE rb_eRuntimeError;
VALUE rb_eTypeError;
VALUE rb_eArgError;
VALUE rb_eIndexError;
VALUE rb_eKeyError;
VALUE rb_eRangeError;
VALUE rb_eNameError;
VALUE rb_eNoMethodError;
VALUE rb_eSecurityError;
VALUE rb_eNotImpError;
VALUE rb_eNoMemError;
static VALUE rb_cNameErrorMesg;

VALUE rb_eScriptError;
VALUE rb_eSyntaxError;
VALUE rb_eLoadError;

VALUE rb_eSystemCallError;
VALUE rb_mErrno;
static VALUE eNOERROR;

VALUE
rb_exc_new(VALUE etype, const char *ptr, long len)
{
    return rb_funcall(etype, rb_intern("new"), 1, rb_str_new(ptr, len));
}

VALUE
rb_exc_new2(VALUE etype, const char *s)
{
    return rb_exc_new(etype, s, strlen(s));
}

VALUE
rb_exc_new3(VALUE etype, VALUE str)
{
    StringValue(str);
    return rb_funcall(etype, rb_intern("new"), 1, str);
}

/*
 * call-seq:
 *    Exception.new(msg = nil)   =>  exception
 *
 *  Construct a new Exception object, optionally passing in
 *  a message.
 */

static VALUE
exc_initialize(int argc, VALUE *argv, VALUE exc)
{
    VALUE arg;

    rb_scan_args(argc, argv, "01", &arg);
    rb_iv_set(exc, "mesg", arg);
    rb_iv_set(exc, "bt", Qnil);

    return exc;
}

/*
 *  Document-method: exception
 *
 *  call-seq:
 *     exc.exception(string) -> an_exception or exc
 *
 *  With no argument, or if the argument is the same as the receiver,
 *  return the receiver. Otherwise, create a new
 *  exception object of the same class as the receiver, but with a
 *  message equal to <code>string.to_str</code>.
 *
 */

static VALUE
exc_exception(int argc, VALUE *argv, VALUE self)
{
    VALUE exc;

    if (argc == 0) return self;
    if (argc == 1 && self == argv[0]) return self;
    exc = rb_obj_clone(self);
    exc_initialize(argc, argv, exc);

    return exc;
}

/*
 * call-seq:
 *   exception.to_s   =>  string
 *
 * Returns exception's message (or the name of the exception if
 * no message is set).
 */

static VALUE
exc_to_s(VALUE exc)
{
    VALUE mesg = rb_attr_get(exc, rb_intern("mesg"));

    if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc));
    if (OBJ_TAINTED(exc)) OBJ_TAINT(mesg);
    return mesg;
}

/*
 * call-seq:
 *   exception.message   =>  string
 *
 * Returns the result of invoking <code>exception.to_s</code>.
 * Normally this returns the exception's message or name. By
 * supplying a to_str method, exceptions are agreeing to
 * be used where Strings are expected.
 */

static VALUE
exc_message(VALUE exc)
{
    return rb_funcall(exc, rb_intern("to_s"), 0, 0);
}

/*
 * call-seq:
 *   exception.inspect   => string
 *
 * Return this exception's class name an message
 */

static VALUE
exc_inspect(VALUE exc)
{
    VALUE str, klass;

    klass = CLASS_OF(exc);
    exc = rb_obj_as_string(exc);
    if (RSTRING(exc)->len == 0) {
        return rb_str_dup(rb_class_name(klass));
    }

    str = rb_str_buf_new2("#<");
    klass = rb_class_name(klass);
    rb_str_buf_append(str, klass);
    rb_str_buf_cat(str, ": ", 2);
    rb_str_buf_append(str, exc);
    rb_str_buf_cat(str, ">", 1);

    return str;
}

/*
 *  call-seq:
 *     exception.backtrace    => array
 *
 *  Returns any backtrace associated with the exception. The backtrace
 *  is an array of strings, each containing either ``filename:lineNo: in
 *  `method''' or ``filename:lineNo.''
 *
 *     def a
 *       raise "boom"
 *     end
 *
 *     def b
 *       a()
 *     end
 *
 *     begin
 *       b()
 *     rescue => detail
 *       print detail.backtrace.join("\n")
 *     end
 *
 *  <em>produces:</em>
 *
 *     prog.rb:2:in `a'
 *     prog.rb:6:in `b'
 *     prog.rb:10
*/

static VALUE
exc_backtrace(VALUE exc)
{
    ID bt = rb_intern("bt");

    if (!rb_ivar_defined(exc, bt)) return Qnil;
    return rb_ivar_get(exc, bt);
}

static VALUE
check_backtrace(VALUE bt)
{
    long i;
    static char *err = "backtrace must be Array of String";

    if (!NIL_P(bt)) {
        int t = TYPE(bt);

        if (t == T_STRING) return rb_ary_new3(1, bt);
        if (t != T_ARRAY) {
            rb_raise(rb_eTypeError, err);
        }
        for (i=0;i<RARRAY(bt)->len;i++) {
            if (TYPE(RARRAY(bt)->ptr[i]) != T_STRING) {
                rb_raise(rb_eTypeError, err);
            }
        }
    }
    return bt;
}

/*
 *  call-seq:
 *     exc.set_backtrace(array)   =>  array
 *
 *  Sets the backtrace information associated with <i>exc</i>. The
 *  argument must be an array of <code>String</code> objects in the
 *  format described in <code>Exception#backtrace</code>.
 *
 */

static VALUE
exc_set_backtrace(VALUE exc, VALUE bt)
{
    return rb_iv_set(exc, "bt", check_backtrace(bt));
}

/*
 *  call-seq:
 *     exc == obj   => true or false
 *
 *  Equality---If <i>obj</i> is not an <code>Exception</code>, returns
 *  <code>false</code>. Otherwise, returns <code>true</code> if <i>exc</i> and
 *  <i>obj</i> share same class, messages, and backtrace.
 */

static VALUE
exc_equal(VALUE exc, VALUE obj)
{
    ID id_mesg = rb_intern("mesg");

    if (exc == obj) return Qtrue;
    if (rb_obj_class(exc) != rb_obj_class(obj))
        return Qfalse;
    if (!rb_equal(rb_attr_get(exc, id_mesg), rb_attr_get(obj, id_mesg)))
        return Qfalse;
    if (!rb_equal(exc_backtrace(exc), exc_backtrace(obj)))
        return Qfalse;
    return Qtrue;
}

/*
 * call-seq:
 *   SystemExit.new(status=0)   => system_exit
 *
 * Create a new +SystemExit+ exception with the given status.
 */

static VALUE
exit_initialize(int argc, VALUE *argv, VALUE exc)
{
    VALUE status = INT2FIX(EXIT_SUCCESS);
    if (argc > 0 && FIXNUM_P(argv[0])) {
        status = *argv++;
        --argc;
    }
    rb_call_super(argc, argv);
    rb_iv_set(exc, "status", status);
    return exc;
}

/*
 * call-seq:
 *   system_exit.status   => fixnum
 *
 * Return the status value associated with this system exit.
 */

static VALUE
exit_status(VALUE exc)
{
    return rb_attr_get(exc, rb_intern("status"));
}

/*
 * call-seq:
 *   system_exit.success?  => true or false
 *
 * Returns +true+ if exiting successful, +false+ if not.
 */

static VALUE
exit_success_p(VALUE exc)
{
    VALUE status = rb_attr_get(exc, rb_intern("status"));
    if (NIL_P(status)) return Qtrue;
    if (status == INT2FIX(EXIT_SUCCESS)) return Qtrue;
    return Qfalse;
}

void
rb_name_error(ID id, const char *fmt, ...)
{
    VALUE exc, argv[2];
    va_list args;
    char buf[BUFSIZ];

    va_start(args, fmt);
    vsnprintf(buf, BUFSIZ, fmt, args);
    va_end(args);

    argv[0] = rb_str_new2(buf);
    argv[1] = ID2SYM(id);
    exc = rb_class_new_instance(2, argv, rb_eNameError);
    rb_exc_raise(exc);
}

/*
 * call-seq:
 *   NameError.new(msg [, name])  => name_error
 *
 * Construct a new NameError exception. If given the <i>name</i>
 * parameter may subsequently be examined using the <code>NameError.name</code>
 * method.
 */

static VALUE
name_err_initialize(int argc, VALUE *argv, VALUE self)
{
    VALUE name;

    name = (argc > 1) ? argv[--argc] : Qnil;
    rb_call_super(argc, argv);
    rb_iv_set(self, "name", name);
    return self;
}

/*
 *  call-seq:
 *    name_error.name    =>  string or nil
 *
 *  Return the name associated with this NameError exception.
 */

static VALUE
name_err_name(VALUE self)
{
    return rb_attr_get(self, rb_intern("name"));
}

/*
 * call-seq:
 *  name_error.to_s   => string
 *
 * Produce a nicely-formated string representing the +NameError+.
 */

static VALUE
name_err_to_s(VALUE exc)
{
    VALUE mesg = rb_attr_get(exc, rb_intern("mesg"));
    VALUE str = mesg;

    if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc));
    StringValue(str);
    if (str != mesg) {
        rb_iv_set(exc, "mesg", mesg = str);
    }
    if (OBJ_TAINTED(exc)) OBJ_TAINT(mesg);
    return mesg;
}

/*
 * call-seq:
 *   NoMethodError.new(msg, name [, args])  => no_method_error
 *
 * Construct a NoMethodError exception for a method of the given name
 * called with the given arguments. The name may be accessed using
 * the <code>#name</code> method on the resulting object, and the
 * arguments using the <code>#args</code> method.
 */

static VALUE
nometh_err_initialize(int argc, VALUE *argv, VALUE self)
{
    VALUE args = (argc > 2) ? argv[--argc] : Qnil;
    name_err_initialize(argc, argv, self);
    rb_iv_set(self, "args", args);
    return self;
}

/* :nodoc: */
static void
name_err_mesg_mark(VALUE *ptr)
{
    rb_gc_mark_locations(ptr, ptr+3);
}

/* :nodoc: */
static VALUE
name_err_mesg_new(VALUE obj, VALUE mesg, VALUE recv, VALUE method)
{
    VALUE *ptr = ALLOC_N(VALUE, 3);

    ptr[0] = mesg;
    ptr[1] = recv;
    ptr[2] = method;
    return Data_Wrap_Struct(rb_cNameErrorMesg, name_err_mesg_mark, -1, ptr);
}

/* :nodoc: */
static VALUE
name_err_mesg_equal(VALUE obj1, VALUE obj2)
{
    VALUE *ptr1, *ptr2;
    int i;

    if (obj1 == obj2) return Qtrue;
    if (rb_obj_class(obj2) != rb_cNameErrorMesg)
        return Qfalse;

    Data_Get_Struct(obj1, VALUE, ptr1);
    Data_Get_Struct(obj2, VALUE, ptr2);
    for (i=0; i<3; i++) {
        if (!rb_equal(ptr1[i], ptr2[i]))
            return Qfalse;
    }
    return Qtrue;
}

/* :nodoc: */
static VALUE
name_err_mesg_to_str(VALUE obj)
{
    VALUE *ptr, mesg;
    Data_Get_Struct(obj, VALUE, ptr);

    mesg = ptr[0];
    if (NIL_P(mesg)) return Qnil;
    else {
        char *desc = 0;
        VALUE d = 0, args[3];

        obj = ptr[1];
        switch (TYPE(obj)) {
          case T_NIL:
            desc = "nil";
            break;
          case T_TRUE:
            desc = "true";
            break;
          case T_FALSE:
            desc = "false";
            break;
          default:
            d = rb_protect(rb_inspect, obj, 0);
            if (NIL_P(d) || RSTRING(d)->len > 65) {
                d = rb_any_to_s(obj);
            }
            desc = RSTRING(d)->ptr;
            break;
        }
        if (desc && desc[0] != '#') {
            d = rb_str_new2(desc);
            rb_str_cat2(d, ":");
            rb_str_cat2(d, rb_obj_classname(obj));
        }
        args[0] = mesg;
        args[1] = ptr[2];
        args[2] = d;
        mesg = rb_f_sprintf(3, args);
    }
    if (OBJ_TAINTED(obj)) OBJ_TAINT(mesg);
    return mesg;
}

/* :nodoc: */
static VALUE
name_err_mesg_load(VALUE klass, VALUE str)
{
    return str;
}

/*
 * call-seq:
 *   no_method_error.args  => obj
 *
 * Return the arguments passed in as the third parameter to
 * the constructor.
 */

static VALUE
nometh_err_args(VALUE self)
{
    return rb_attr_get(self, rb_intern("args"));
}

void
rb_invalid_str(const char *str, const char *type)
{
    VALUE s = rb_str_inspect(rb_str_new2(str));

    rb_raise(rb_eArgError, "invalid value for %s: %s", type, RSTRING(s)->ptr);
}

/*
 *  Document-module: Errno
 *
 *  Ruby exception objects are subclasses of <code>Exception</code>.
 *  However, operating systems typically report errors using plain
 *  integers. Module <code>Errno</code> is created dynamically to map
 *  these operating system errors to Ruby classes, with each error
 *  number generating its own subclass of <code>SystemCallError</code>.
 *  As the subclass is created in module <code>Errno</code>, its name
 *  will start <code>Errno::</code>.
 *
 *  The names of the <code>Errno::</code> classes depend on
 *  the environment in which Ruby runs. On a typical Unix or Windows
 *  platform, there are <code>Errno</code> classes such as
 *  <code>Errno::EACCES</code>, <code>Errno::EAGAIN</code>,
 *  <code>Errno::EINTR</code>, and so on.
 *
 *  The integer operating system error number corresponding to a
 *  particular error is available as the class constant
 *  <code>Errno::</code><em>error</em><code>::Errno</code>.
 *
 *     Errno::EACCES::Errno   #=> 13
 *     Errno::EAGAIN::Errno   #=> 11
 *     Errno::EINTR::Errno    #=> 4
 *
 *  The full list of operating system errors on your particular platform
 *  are available as the constants of <code>Errno</code>.
 *
 *     Errno.constants   #=> E2BIG, EACCES, EADDRINUSE, EADDRNOTAVAIL, ...
 */

static st_table *syserr_tbl;

static VALUE
set_syserr(int n, const char *name)
{
    VALUE error;

    if (!st_lookup(syserr_tbl, n, &error)) {
        error = rb_define_class_under(rb_mErrno, name, rb_eSystemCallError);
        rb_define_const(error, "Errno", INT2NUM(n));
        st_add_direct(syserr_tbl, n, error);
    }
    else {
        rb_define_const(rb_mErrno, name, error);
    }
    return error;
}

static VALUE
get_syserr(int n)
{
    VALUE error;

    if (!st_lookup(syserr_tbl, n, &error)) {
        char name[8];   /* some Windows' errno have 5 digits. */

        snprintf(name, sizeof(name), "E%03d", n);
        error = set_syserr(n, name);
    }
    return error;
}

/*
 * call-seq:
 *   SystemCallError.new(msg, errno)  => system_call_error_subclass
 *
 * If _errno_ corresponds to a known system error code, constructs
 * the appropriate <code>Errno</code> class for that error, otherwise
 * constructs a generic <code>SystemCallError</code> object. The
 * error number is subsequently available via the <code>errno</code>
 * method.
 */

static VALUE
syserr_initialize(int argc, VALUE *argv, VALUE self)
{
#if !defined(_WIN32) && !defined(__VMS)
    char *strerror();
#endif
    char *err;
    VALUE mesg, error;
    VALUE klass = rb_obj_class(self);

    if (klass == rb_eSystemCallError) {
        rb_scan_args(argc, argv, "11", &mesg, &error);
        if (argc == 1 && FIXNUM_P(mesg)) {
            error = mesg; mesg = Qnil;
        }
        if (!NIL_P(error) && st_lookup(syserr_tbl, NUM2LONG(error), &klass)) {
            /* change class */
            if (TYPE(self) != T_OBJECT) { /* insurance to avoid type crash */
                rb_raise(rb_eTypeError, "invalid instance type");
            }
            RBASIC(self)->klass = klass;
        }
    }
    else {
        rb_scan_args(argc, argv, "01", &mesg);
        error = rb_const_get(klass, rb_intern("Errno"));
    }
    if (!NIL_P(error)) err = strerror(NUM2LONG(error));
    else err = "unknown error";
    if (!NIL_P(mesg)) {
        VALUE str = mesg;

        StringValue(str);
        mesg = rb_sprintf("%s - %.*s", err,
                          (int)RSTRING(str)->len, RSTRING(str)->ptr);
    }
    else {
        mesg = rb_str_new2(err);
    }
    rb_call_super(1, &mesg);
    rb_iv_set(self, "errno", error);
    return self;
}

/*
 * call-seq:
 *   system_call_error.errno   => fixnum
 *
 * Return this SystemCallError's error number.
 */

static VALUE
syserr_errno(VALUE self)
{
    return rb_attr_get(self, rb_intern("errno"));
}

/*
 * call-seq:
 *   system_call_error === other  => true or false
 *
 * Return +true+ if the receiver is a generic +SystemCallError+, or
 * if the error numbers _self_ and _other_ are the same.
 */

static VALUE
syserr_eqq(VALUE self, VALUE exc)
{
    VALUE num, e;

    if (!rb_obj_is_kind_of(exc, rb_eSystemCallError)) return Qfalse;
    if (self == rb_eSystemCallError) return Qtrue;

    num = rb_attr_get(exc, rb_intern("errno"));
    if (NIL_P(num)) {
        VALUE klass = CLASS_OF(exc);

        while (TYPE(klass) == T_ICLASS || FL_TEST(klass, FL_SINGLETON)) {
            klass = (VALUE)RCLASS(klass)->super;
        }
        num = rb_const_get(klass, rb_intern("Errno"));
    }
    e = rb_const_get(self, rb_intern("Errno"));
    if (FIXNUM_P(num) ? num == e : rb_equal(num, e))
        return Qtrue;
    return Qfalse;
}

/*
 * call-seq:
 *   Errno.const_missing   => SystemCallError
 *
 * Returns default SystemCallError class.
 */
static VALUE
errno_missing(VALUE self, VALUE id)
{
    return eNOERROR;
}

/*
 *  Descendents of class <code>Exception</code> are used to communicate
 *  between <code>raise</code> methods and <code>rescue</code>
 *  statements in <code>begin/end</code> blocks. <code>Exception</code>
 *  objects carry information about the exception---its type (the
 *  exception's class name), an optional descriptive string, and
 *  optional traceback information. Programs may subclass
 *  <code>Exception</code> to add additional information.
 */

void
Init_Exception(void)
{
    rb_eException   = rb_define_class("Exception", rb_cObject);
    rb_define_singleton_method(rb_eException, "exception", rb_class_new_instance, -1);
    rb_define_method(rb_eException, "exception", exc_exception, -1);
    rb_define_method(rb_eException, "initialize", exc_initialize, -1);
    rb_define_method(rb_eException, "==", exc_equal, 1);
    rb_define_method(rb_eException, "to_s", exc_to_s, 0);
    rb_define_method(rb_eException, "message", exc_message, 0);
    rb_define_method(rb_eException, "inspect", exc_inspect, 0);
    rb_define_method(rb_eException, "backtrace", exc_backtrace, 0);
    rb_define_method(rb_eException, "set_backtrace", exc_set_backtrace, 1);

    rb_eSystemExit  = rb_define_class("SystemExit", rb_eException);
    rb_define_method(rb_eSystemExit, "initialize", exit_initialize, -1);
    rb_define_method(rb_eSystemExit, "status", exit_status, 0);
    rb_define_method(rb_eSystemExit, "success?", exit_success_p, 0);

    rb_eFatal       = rb_define_class("fatal", rb_eException);
    rb_eSignal      = rb_define_class("SignalException", rb_eException);
    rb_eInterrupt   = rb_define_class("Interrupt", rb_eSignal);

    rb_eStandardError = rb_define_class("StandardError", rb_eException);
    rb_eTypeError     = rb_define_class("TypeError", rb_eStandardError);
    rb_eArgError      = rb_define_class("ArgumentError", rb_eStandardError);
    rb_eIndexError    = rb_define_class("IndexError", rb_eStandardError);
    rb_eKeyError      = rb_define_class("KeyError", rb_eIndexError);
    rb_eRangeError    = rb_define_class("RangeError", rb_eStandardError);
    rb_eNameError     = rb_define_class("NameError", rb_eStandardError);
    rb_define_method(rb_eNameError, "initialize", name_err_initialize, -1);
    rb_define_method(rb_eNameError, "name", name_err_name, 0);
    rb_define_method(rb_eNameError, "to_s", name_err_to_s, 0);
    rb_cNameErrorMesg = rb_define_class_under(rb_eNameError, "message", rb_cData);
    rb_define_singleton_method(rb_cNameErrorMesg, "!", name_err_mesg_new, 3);
    rb_define_method(rb_cNameErrorMesg, "==", name_err_mesg_equal, 1);
    rb_define_method(rb_cNameErrorMesg, "to_str", name_err_mesg_to_str, 0);
    rb_define_method(rb_cNameErrorMesg, "_dump", name_err_mesg_to_str, 1);
    rb_define_singleton_method(rb_cNameErrorMesg, "_load", name_err_mesg_load, 1);
    rb_eNoMethodError = rb_define_class("NoMethodError", rb_eNameError);
    rb_define_method(rb_eNoMethodError, "initialize", nometh_err_initialize, -1);
    rb_define_method(rb_eNoMethodError, "args", nometh_err_args, 0);

    rb_eScriptError = rb_define_class("ScriptError", rb_eException);
    rb_eSyntaxError = rb_define_class("SyntaxError", rb_eScriptError);
    rb_eLoadError   = rb_define_class("LoadError", rb_eScriptError);
    rb_eNotImpError = rb_define_class("NotImplementedError", rb_eScriptError);

    rb_eRuntimeError = rb_define_class("RuntimeError", rb_eStandardError);
    rb_eSecurityError = rb_define_class("SecurityError", rb_eStandardError);
    rb_eNoMemError = rb_define_class("NoMemoryError", rb_eException);

    syserr_tbl = st_init_numtable();
    rb_eSystemCallError = rb_define_class("SystemCallError", rb_eStandardError);
    rb_define_method(rb_eSystemCallError, "initialize", syserr_initialize, -1);
    rb_define_method(rb_eSystemCallError, "errno", syserr_errno, 0);
    rb_define_singleton_method(rb_eSystemCallError, "===", syserr_eqq, 1);

    rb_mErrno = rb_define_module("Errno");
    rb_define_singleton_method(rb_mErrno, "const_missing", errno_missing, 1);

    rb_define_global_function("warn", rb_warn_m, 1);
}

void
rb_raise(VALUE exc, const char *fmt, ...)
{
    va_list args;
    char buf[BUFSIZ];

    va_start(args,fmt);
    vsnprintf(buf, BUFSIZ, fmt, args);
    va_end(args);
    rb_exc_raise(rb_exc_new2(exc, buf));
}

void
rb_loaderror(const char *fmt, ...)
{
    va_list args;
    char buf[BUFSIZ];

    va_start(args, fmt);
    vsnprintf(buf, BUFSIZ, fmt, args);
    va_end(args);
    rb_exc_raise(rb_exc_new2(rb_eLoadError, buf));
}

void
rb_notimplement(void)
{
    rb_raise(rb_eNotImpError,
             "The %s() function is unimplemented on this machine",
             rb_id2name(ruby_frame->callee));
}

void
rb_fatal(const char *fmt, ...)
{
    va_list args;
    char buf[BUFSIZ];

    va_start(args, fmt);
    vsnprintf(buf, BUFSIZ, fmt, args);
    va_end(args);

    ruby_in_eval = 0;
    rb_exc_fatal(rb_exc_new2(rb_eFatal, buf));
}

void
rb_sys_fail(const char *mesg)
{
    int n = errno;
    VALUE arg;

    errno = 0;
    if (n == 0) {
        rb_bug("rb_sys_fail(%s) - errno == 0", mesg ? mesg : "");
    }

    arg = mesg ? rb_str_new2(mesg) : Qnil;
    rb_exc_raise(rb_class_new_instance(1, &arg, get_syserr(n)));
}

void
rb_sys_warning(const char *fmt, ...)
{
     char buf[BUFSIZ];
     va_list args;
     int errno_save;

     errno_save = errno;

     if (!RTEST(ruby_verbose)) return;

     snprintf(buf, BUFSIZ, "warning: %s", fmt);
     snprintf(buf+strlen(buf), BUFSIZ-strlen(buf), ": %s", strerror(errno_save));

     va_start(args, fmt);
     warn_print(buf, args);
     va_end(args);
     errno = errno_save;
}

void
rb_load_fail(const char *path)
{
    rb_loaderror("%s -- %s", strerror(errno), path);
}

void
rb_error_frozen(const char *what)
{
    rb_raise(rb_eRuntimeError, "can't modify frozen %s", what);
}

void
rb_check_frozen(VALUE obj)
{
    if (OBJ_FROZEN(obj)) rb_error_frozen(rb_obj_classname(obj));
}

void
Init_syserr(void)
{
#ifdef EPERM
    set_syserr(EPERM, "EPERM");
#endif
#ifdef ENOENT
    set_syserr(ENOENT, "ENOENT");
#endif
#ifdef ESRCH
    set_syserr(ESRCH, "ESRCH");
#endif
#ifdef EINTR
    set_syserr(EINTR, "EINTR");
#endif
#ifdef EIO
    set_syserr(EIO, "EIO");
#endif
#ifdef ENXIO
    set_syserr(ENXIO, "ENXIO");
#endif
#ifdef E2BIG
    set_syserr(E2BIG, "E2BIG");
#endif
#ifdef ENOEXEC
    set_syserr(ENOEXEC, "ENOEXEC");
#endif
#ifdef EBADF
    set_syserr(EBADF, "EBADF");
#endif
#ifdef ECHILD
    set_syserr(ECHILD, "ECHILD");
#endif
#ifdef EAGAIN
    set_syserr(EAGAIN, "EAGAIN");
#endif
#ifdef ENOMEM
    set_syserr(ENOMEM, "ENOMEM");
#endif
#ifdef EACCES
    set_syserr(EACCES, "EACCES");
#endif
#ifdef EFAULT
    set_syserr(EFAULT, "EFAULT");
#endif
#ifdef ENOTBLK
    set_syserr(ENOTBLK, "ENOTBLK");
#endif
#ifdef EBUSY
    set_syserr(EBUSY, "EBUSY");
#endif
#ifdef EEXIST
    set_syserr(EEXIST, "EEXIST");
#endif
#ifdef EXDEV
    set_syserr(EXDEV, "EXDEV");
#endif
#ifdef ENODEV
    set_syserr(ENODEV, "ENODEV");
#endif
#ifdef ENOTDIR
    set_syserr(ENOTDIR, "ENOTDIR");
#endif
#ifdef EISDIR
    set_syserr(EISDIR, "EISDIR");
#endif
#ifdef EINVAL
    set_syserr(EINVAL, "EINVAL");
#endif
#ifdef ENFILE
    set_syserr(ENFILE, "ENFILE");
#endif
#ifdef EMFILE
    set_syserr(EMFILE, "EMFILE");
#endif
#ifdef ENOTTY
    set_syserr(ENOTTY, "ENOTTY");
#endif
#ifdef ETXTBSY
    set_syserr(ETXTBSY, "ETXTBSY");
#endif
#ifdef EFBIG
    set_syserr(EFBIG, "EFBIG");
#endif
#ifdef ENOSPC
    set_syserr(ENOSPC, "ENOSPC");
#endif
#ifdef ESPIPE
    set_syserr(ESPIPE, "ESPIPE");
#endif
#ifdef EROFS
    set_syserr(EROFS, "EROFS");
#endif
#ifdef EMLINK
    set_syserr(EMLINK, "EMLINK");
#endif
#ifdef EPIPE
    set_syserr(EPIPE, "EPIPE");
#endif
#ifdef EDOM
    set_syserr(EDOM, "EDOM");
#endif
#ifdef ERANGE
    set_syserr(ERANGE, "ERANGE");
#endif
#ifdef EDEADLK
    set_syserr(EDEADLK, "EDEADLK");
#endif
#ifdef ENAMETOOLONG
    set_syserr(ENAMETOOLONG, "ENAMETOOLONG");
#endif
#ifdef ENOLCK
    set_syserr(ENOLCK, "ENOLCK");
#endif
#ifdef ENOSYS
    set_syserr(ENOSYS, "ENOSYS");
#endif
#ifdef ENOTEMPTY
    set_syserr(ENOTEMPTY, "ENOTEMPTY");
#endif
#ifdef ELOOP
    set_syserr(ELOOP, "ELOOP");
#endif
#ifdef EWOULDBLOCK
    set_syserr(EWOULDBLOCK, "EWOULDBLOCK");
#endif
#ifdef ENOMSG
    set_syserr(ENOMSG, "ENOMSG");
#endif
#ifdef EIDRM
    set_syserr(EIDRM, "EIDRM");
#endif
#ifdef ECHRNG
    set_syserr(ECHRNG, "ECHRNG");
#endif
#ifdef EL2NSYNC
    set_syserr(EL2NSYNC, "EL2NSYNC");
#endif
#ifdef EL3HLT
    set_syserr(EL3HLT, "EL3HLT");
#endif
#ifdef EL3RST
    set_syserr(EL3RST, "EL3RST");
#endif
#ifdef ELNRNG
    set_syserr(ELNRNG, "ELNRNG");
#endif
#ifdef EUNATCH
    set_syserr(EUNATCH, "EUNATCH");
#endif
#ifdef ENOCSI
    set_syserr(ENOCSI, "ENOCSI");
#endif
#ifdef EL2HLT
    set_syserr(EL2HLT, "EL2HLT");
#endif
#ifdef EBADE
    set_syserr(EBADE, "EBADE");
#endif
#ifdef EBADR
    set_syserr(EBADR, "EBADR");
#endif
#ifdef EXFULL
    set_syserr(EXFULL, "EXFULL");
#endif
#ifdef ENOANO
    set_syserr(ENOANO, "ENOANO");
#endif
#ifdef EBADRQC
    set_syserr(EBADRQC, "EBADRQC");
#endif
#ifdef EBADSLT
    set_syserr(EBADSLT, "EBADSLT");
#endif
#ifdef EDEADLOCK
    set_syserr(EDEADLOCK, "EDEADLOCK");
#endif
#ifdef EBFONT
    set_syserr(EBFONT, "EBFONT");
#endif
#ifdef ENOSTR
    set_syserr(ENOSTR, "ENOSTR");
#endif
#ifdef ENODATA
    set_syserr(ENODATA, "ENODATA");
#endif
#ifdef ETIME
    set_syserr(ETIME, "ETIME");
#endif
#ifdef ENOSR
    set_syserr(ENOSR, "ENOSR");
#endif
#ifdef ENONET
    set_syserr(ENONET, "ENONET");
#endif
#ifdef ENOPKG
    set_syserr(ENOPKG, "ENOPKG");
#endif
#ifdef EREMOTE
    set_syserr(EREMOTE, "EREMOTE");
#endif
#ifdef ENOLINK
    set_syserr(ENOLINK, "ENOLINK");
#endif
#ifdef EADV
    set_syserr(EADV, "EADV");
#endif
#ifdef ESRMNT
    set_syserr(ESRMNT, "ESRMNT");
#endif
#ifdef ECOMM
    set_syserr(ECOMM, "ECOMM");
#endif
#ifdef EPROTO
    set_syserr(EPROTO, "EPROTO");
#endif
#ifdef EMULTIHOP
    set_syserr(EMULTIHOP, "EMULTIHOP");
#endif
#ifdef EDOTDOT
    set_syserr(EDOTDOT, "EDOTDOT");
#endif
#ifdef EBADMSG
    set_syserr(EBADMSG, "EBADMSG");
#endif
#ifdef EOVERFLOW
    set_syserr(EOVERFLOW, "EOVERFLOW");
#endif
#ifdef ENOTUNIQ
    set_syserr(ENOTUNIQ, "ENOTUNIQ");
#endif
#ifdef EBADFD
    set_syserr(EBADFD, "EBADFD");
#endif
#ifdef EREMCHG
    set_syserr(EREMCHG, "EREMCHG");
#endif
#ifdef ELIBACC
    set_syserr(ELIBACC, "ELIBACC");
#endif
#ifdef ELIBBAD
    set_syserr(ELIBBAD, "ELIBBAD");
#endif
#ifdef ELIBSCN
    set_syserr(ELIBSCN, "ELIBSCN");
#endif
#ifdef ELIBMAX
    set_syserr(ELIBMAX, "ELIBMAX");
#endif
#ifdef ELIBEXEC
    set_syserr(ELIBEXEC, "ELIBEXEC");
#endif
#ifdef EILSEQ
    set_syserr(EILSEQ, "EILSEQ");
#endif
#ifdef ERESTART
    set_syserr(ERESTART, "ERESTART");
#endif
#ifdef ESTRPIPE
    set_syserr(ESTRPIPE, "ESTRPIPE");
#endif
#ifdef EUSERS
    set_syserr(EUSERS, "EUSERS");
#endif
#ifdef ENOTSOCK
    set_syserr(ENOTSOCK, "ENOTSOCK");
#endif
#ifdef EDESTADDRREQ
    set_syserr(EDESTADDRREQ, "EDESTADDRREQ");
#endif
#ifdef EMSGSIZE
    set_syserr(EMSGSIZE, "EMSGSIZE");
#endif
#ifdef EPROTOTYPE
    set_syserr(EPROTOTYPE, "EPROTOTYPE");
#endif
#ifdef ENOPROTOOPT
    set_syserr(ENOPROTOOPT, "ENOPROTOOPT");
#endif
#ifdef EPROTONOSUPPORT
    set_syserr(EPROTONOSUPPORT, "EPROTONOSUPPORT");
#endif
#ifdef ESOCKTNOSUPPORT
    set_syserr(ESOCKTNOSUPPORT, "ESOCKTNOSUPPORT");
#endif
#ifdef EOPNOTSUPP
    set_syserr(EOPNOTSUPP, "EOPNOTSUPP");
#endif
#ifdef EPFNOSUPPORT
    set_syserr(EPFNOSUPPORT, "EPFNOSUPPORT");
#endif
#ifdef EAFNOSUPPORT
    set_syserr(EAFNOSUPPORT, "EAFNOSUPPORT");
#endif
#ifdef EADDRINUSE
    set_syserr(EADDRINUSE, "EADDRINUSE");
#endif
#ifdef EADDRNOTAVAIL
    set_syserr(EADDRNOTAVAIL, "EADDRNOTAVAIL");
#endif
#ifdef ENETDOWN
    set_syserr(ENETDOWN, "ENETDOWN");
#endif
#ifdef ENETUNREACH
    set_syserr(ENETUNREACH, "ENETUNREACH");
#endif
#ifdef ENETRESET
    set_syserr(ENETRESET, "ENETRESET");
#endif
#ifdef ECONNABORTED
    set_syserr(ECONNABORTED, "ECONNABORTED");
#endif
#ifdef ECONNRESET
    set_syserr(ECONNRESET, "ECONNRESET");
#endif
#ifdef ENOBUFS
    set_syserr(ENOBUFS, "ENOBUFS");
#endif
#ifdef EISCONN
    set_syserr(EISCONN, "EISCONN");
#endif
#ifdef ENOTCONN
    set_syserr(ENOTCONN, "ENOTCONN");
#endif
#ifdef ESHUTDOWN
    set_syserr(ESHUTDOWN, "ESHUTDOWN");
#endif
#ifdef ETOOMANYREFS
    set_syserr(ETOOMANYREFS, "ETOOMANYREFS");
#endif
#ifdef ETIMEDOUT
    set_syserr(ETIMEDOUT, "ETIMEDOUT");
#endif
#ifdef ECONNREFUSED
    set_syserr(ECONNREFUSED, "ECONNREFUSED");
#endif
#ifdef EHOSTDOWN
    set_syserr(EHOSTDOWN, "EHOSTDOWN");
#endif
#ifdef EHOSTUNREACH
    set_syserr(EHOSTUNREACH, "EHOSTUNREACH");
#endif
#ifdef EALREADY
    set_syserr(EALREADY, "EALREADY");
#endif
#ifdef EINPROGRESS
    set_syserr(EINPROGRESS, "EINPROGRESS");
#endif
#ifdef ESTALE
    set_syserr(ESTALE, "ESTALE");
#endif
#ifdef EUCLEAN
    set_syserr(EUCLEAN, "EUCLEAN");
#endif
#ifdef ENOTNAM
    set_syserr(ENOTNAM, "ENOTNAM");
#endif
#ifdef ENAVAIL
    set_syserr(ENAVAIL, "ENAVAIL");
#endif
#ifdef EISNAM
    set_syserr(EISNAM, "EISNAM");
#endif
#ifdef EREMOTEIO
    set_syserr(EREMOTEIO, "EREMOTEIO");
#endif
#ifdef EDQUOT
    set_syserr(EDQUOT, "EDQUOT");
#endif
    eNOERROR = set_syserr(0, "NOERROR");
}

static void
err_append(const char *s)
{
    extern VALUE ruby_errinfo;

    if (ruby_in_eval) {
        if (NIL_P(ruby_errinfo)) {
            ruby_errinfo = rb_exc_new2(rb_eSyntaxError, s);
        }
        else {
            VALUE str = rb_obj_as_string(ruby_errinfo);

            rb_str_cat2(str, "\n");
            rb_str_cat2(str, s);
            ruby_errinfo = rb_exc_new3(rb_eSyntaxError, str);
        }
    }
    else {
        rb_write_error(s);
        rb_write_error("\n");
    }
}
/* [<][>][^] [v] [top][bottom][index] [help] */


euc_jp.c

root/euc_jp.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. eucjp_mbc_enc_len
  2. eucjp_mbc_to_code
  3. eucjp_code_to_mbclen
  4. eucjp_code_to_mbc_first
  5. eucjp_code_to_mbc
  6. eucjp_mbc_to_normalize
  7. eucjp_is_mbc_ambiguous
  8. eucjp_is_code_ctype
  9. eucjp_left_adjust_char_head
  10. eucjp_is_allowed_reverse_match
/**********************************************************************
  euc_jp.c -  Oniguruma (regular expression library)
**********************************************************************/
/*-
 * Copyright (c) 2002-2005  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#include "regenc.h"

#define eucjp_islead(c)    ((UChar )((c) - 0xa1) > 0xfe - 0xa1)

static int EncLen_EUCJP[] = {
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1
};

static int
eucjp_mbc_enc_len(const UChar* p)
{
  return EncLen_EUCJP[*p];
}

static OnigCodePoint
eucjp_mbc_to_code(const UChar* p, const UChar* end)
{
  int c, i, len;
  OnigCodePoint n;

  len = enc_len(ONIG_ENCODING_EUC_JP, p);
  n = (OnigCodePoint )*p++;
  if (len == 1) return n;

  for (i = 1; i < len; i++) {
    if (p >= end) break;
    c = *p++;
    n <<= 8;  n += c;
  }
  return n;
}

static int
eucjp_code_to_mbclen(OnigCodePoint code)
{
  if (ONIGENC_IS_CODE_ASCII(code)) return 1;
  else if ((code & 0xff0000) != 0) return 3;
  else if ((code &   0xff00) != 0) return 2;
  else return 0;
}

#if 0
static int
eucjp_code_to_mbc_first(OnigCodePoint code)
{
  int first;

  if ((code & 0xff0000) != 0) {
    first = (code >> 16) & 0xff;
  }
  else if ((code & 0xff00) != 0) {
    first = (code >> 8) & 0xff;
  }
  else {
    return (int )code;
  }
  return first;
}
#endif

static int
eucjp_code_to_mbc(OnigCodePoint code, UChar *buf)
{
  UChar *p = buf;

  if ((code & 0xff0000) != 0) *p++ = (UChar )(((code >> 16) & 0xff));
  if ((code &   0xff00) != 0) *p++ = (UChar )(((code >>  8) & 0xff));
  *p++ = (UChar )(code & 0xff);

#if 1
  if (enc_len(ONIG_ENCODING_EUC_JP, buf) != (p - buf))
    return ONIGENCERR_INVALID_WIDE_CHAR_VALUE;
#endif
  return p - buf;
}

static int
eucjp_mbc_to_normalize(OnigAmbigType flag,
                       const UChar** pp, const UChar* end, UChar* lower)
{
  int len;
  const UChar* p = *pp;

  if (ONIGENC_IS_MBC_ASCII(p)) {
    if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
      *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
    }
    else {
      *lower = *p;
    }

    (*pp)++;
    return 1;
  }
  else {
    len = enc_len(ONIG_ENCODING_EUC_JP, p);
    if (lower != p) {
      int i;
      for (i = 0; i < len; i++) {
        *lower++ = *p++;
      }
    }
    (*pp) += len;
    return len; /* return byte length of converted char to lower */
  }
}

static int
eucjp_is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end)
{
  return onigenc_mbn_is_mbc_ambiguous(ONIG_ENCODING_EUC_JP, flag, pp, end);
}

static int
eucjp_is_code_ctype(OnigCodePoint code, unsigned int ctype)
{
  if ((ctype & ONIGENC_CTYPE_WORD) != 0) {
    if (code < 128)
      return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
    else
      return (eucjp_code_to_mbclen(code) > 1 ? TRUE : FALSE);

    ctype &= ~ONIGENC_CTYPE_WORD;
    if (ctype == 0) return FALSE;
  }

  if (code < 128)
    return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
  else
    return FALSE;
}

static UChar*
eucjp_left_adjust_char_head(const UChar* start, const UChar* s)
{
  /* In this encoding
     mb-trail bytes doesn't mix with single bytes.
  */
  const UChar *p;
  int len;

  if (s <= start) return (UChar* )s;
  p = s;

  while (!eucjp_islead(*p) && p > start) p--;
  len = enc_len(ONIG_ENCODING_EUC_JP, p);
  if (p + len > s) return (UChar* )p;
  p += len;
  return (UChar* )(p + ((s - p) & ~1));
}

static int
eucjp_is_allowed_reverse_match(const UChar* s, const UChar* end)
{
  const UChar c = *s;
  if (c <= 0x7e || c == 0x8e || c == 0x8f)
    return TRUE;
  else
    return FALSE;
}

OnigEncodingType OnigEncodingEUC_JP = {
  eucjp_mbc_enc_len,
  "EUC-JP",   /* name */
  3,          /* max enc length */
  1,          /* min enc length */
  ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE,
  {
      (OnigCodePoint )'\\'                       /* esc */
    , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.'  */
    , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*'  */
    , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
    , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
    , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
  },
  onigenc_is_mbc_newline_0x0a,
  eucjp_mbc_to_code,
  eucjp_code_to_mbclen,
  eucjp_code_to_mbc,
  eucjp_mbc_to_normalize,
  eucjp_is_mbc_ambiguous,
  onigenc_ascii_get_all_pair_ambig_codes,
  onigenc_nothing_get_all_comp_ambig_codes,
  eucjp_is_code_ctype,
  onigenc_not_support_get_ctype_code_range,
  eucjp_left_adjust_char_head,
  eucjp_is_allowed_reverse_match
};
/* [<][>][^] [v] [top][bottom][index] [help] */


eval.c

root/eval.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. rb_jmpbuf_t
  2. rb_jump_context
  3. rb_secure
  4. rb_secure_update
  5. rb_check_safe_obj
  6. rb_check_safe_str
  7. print_undef
  8. rb_clear_cache
  9. rb_clear_cache_for_undef
  10. rb_clear_cache_by_id
  11. rb_clear_cache_by_class
  12. rb_add_method
  13. rb_define_alloc_func
  14. rb_undef_alloc_func
  15. search_method
  16. rb_get_method_body
  17. rb_method_node
  18. remove_method
  19. rb_remove_method
  20. rb_mod_remove_method
  21. rb_disable_super
  22. rb_enable_super
  23. rb_export_method
  24. rb_method_boundp
  25. rb_attr
  26. new_dvar
  27. rb_dvar_defined
  28. rb_dvar_curr
  29. rb_dvar_ref
  30. rb_dvar_push
  31. dvar_asgn_internal
  32. dvar_asgn
  33. dvar_asgn_curr
  34. rb_svar
  35. CALLING_NORMAL
  36. CALLING_FCALL
  37. CALLING_VCALL
  38. CALLING_SUPER
  39. calling_scope_t
  40. rb_event_hook_t
  41. ruby_set_current_source
  42. warn_printf
  43. error_pos
  44. get_backtrace
  45. set_backtrace
  46. error_print
  47. is_ruby_native_thread
  48. ruby_native_thread_kill
  49. ruby_init
  50. eval_node
  51. sysexit_status
  52. error_handle
  53. ruby_options
  54. ruby_finalize_0
  55. ruby_finalize_1
  56. ruby_finalize
  57. ruby_cleanup
  58. ruby_exec_internal
  59. ruby_exec
  60. ruby_stop
  61. ruby_run
  62. compile_error
  63. rb_eval_string
  64. rb_eval_string_protect
  65. rb_eval_string_wrap
  66. localjump_error
  67. localjump_xvalue
  68. localjump_reason
  69. jump_tag_but_local_jump
  70. rb_eval_cmd
  71. ev_const_defined
  72. ev_const_get
  73. cvar_cbase
  74. rb_mod_nesting
  75. rb_mod_s_constants
  76. rb_frozen_class_p
  77. rb_undef
  78. rb_mod_undef_method
  79. rb_alias
  80. rb_mod_alias_method
  81. copy_node_scope
  82. anode
  83. arg_defined
  84. is_defined
  85. rb_obj_is_proc
  86. rb_add_event_hook
  87. rb_remove_event_hook
  88. set_trace_func
  89. get_event_name
  90. call_trace_func
  91. avalue_to_svalue
  92. svalue_to_avalue
  93. svalue_to_mrhs
  94. avalue_splat
  95. splat_value
  96. class_prefix
  97. unknown_node
  98. rb_eval
  99. module_setup
  100. rb_obj_respond_to
  101. rb_respond_to
  102. obj_respond_to
  103. rb_mod_method_defined
  104. rb_mod_public_method_defined
  105. rb_mod_private_method_defined
  106. rb_mod_protected_method_defined
  107. terminate_process
  108. rb_exit
  109. rb_f_exit
  110. rb_f_abort
  111. rb_iter_break
  112. rb_longjmp
  113. rb_exc_raise
  114. rb_exc_fatal
  115. rb_interrupt
  116. rb_f_raise
  117. rb_make_exception
  118. rb_raise_jump
  119. rb_jump_tag
  120. rb_block_given_p
  121. rb_iterator_p
  122. rb_f_block_given_p
  123. proc_jump_error
  124. return_jump
  125. break_jump
  126. rb_need_block
  127. rb_yield_0
  128. rb_yield
  129. rb_yield_values
  130. rb_yield_splat
  131. rb_f_loop
  132. massign
  133. assign
  134. rb_iterate
  135. handle_rescue
  136. rb_rescue2
  137. rb_rescue
  138. rb_protect
  139. rb_ensure
  140. rb_with_disable_interrupt
  141. stack_check
  142. rb_method_missing
  143. method_missing
  144. call_cfunc
  145. formal_assign
  146. rb_call0
  147. rb_call
  148. rb_apply
  149. send_funcall
  150. rb_f_send
  151. rb_f_funcall
  152. rb_funcall
  153. rb_funcall2
  154. rb_funcall3
  155. rb_call_super
  156. backtrace
  157. rb_f_caller
  158. rb_backtrace
  159. make_backtrace
  160. rb_frame_this_func
  161. compile
  162. eval
  163. rb_f_eval
  164. exec_under
  165. eval_under_i
  166. eval_under
  167. yield_under_i
  168. yield_under
  169. specific_eval
  170. rb_obj_instance_eval
  171. rb_obj_instance_exec
  172. rb_mod_module_eval
  173. rb_mod_module_exec
  174. rb_load
  175. rb_load_protect
  176. rb_f_load
  177. rb_feature_p
  178. rb_provided
  179. rb_provide_feature
  180. rb_provide
  181. load_wait
  182. rb_f_require
  183. search_required
  184. load_failed
  185. rb_require_safe
  186. rb_require
  187. secure_visibility
  188. set_method_visibility
  189. rb_mod_public
  190. rb_mod_protected
  191. rb_mod_private
  192. rb_mod_public_method
  193. rb_mod_private_method
  194. top_public
  195. top_private
  196. rb_mod_modfunc
  197. rb_mod_append_features
  198. rb_mod_include
  199. rb_obj_call_init
  200. rb_extend_object
  201. rb_mod_extend_object
  202. rb_obj_extend
  203. top_include
  204. errinfo_setter
  205. errat_getter
  206. errat_setter
  207. rb_f_local_variables
  208. rb_set_end_proc
  209. rb_mark_end_proc
  210. call_end_proc
  211. rb_f_END
  212. rb_f_at_exit
  213. rb_exec_end_proc
  214. Init_eval
  215. rb_mod_autoload
  216. rb_mod_autoload_p
  217. rb_f_autoload
  218. rb_f_autoload_p
  219. Init_load
  220. scope_dup
  221. blk_mark
  222. frame_free
  223. blk_free
  224. frame_dup
  225. blk_copy_prev
  226. blk_dup
  227. proc_clone
  228. proc_dup
  229. rb_f_binding
  230. bind_eval
  231. proc_save_safe_level
  232. proc_get_safe_level
  233. proc_set_safe_level
  234. proc_alloc
  235. proc_s_new
  236. rb_block_proc
  237. rb_f_lambda
  238. proc_lambda
  239. block_orphan
  240. proc_invoke
  241. rb_proc_call
  242. rb_proc_arity
  243. proc_arity
  244. proc_eq
  245. proc_hash
  246. proc_to_s
  247. proc_to_self
  248. proc_binding
  249. rb_block_pass
  250. call_block
  251. block_pass
  252. bm_mark
  253. mnew
  254. method_eq
  255. method_hash
  256. method_unbind
  257. rb_obj_method
  258. rb_mod_method
  259. method_clone
  260. rb_method_call
  261. umethod_bind
  262. rb_node_arity
  263. method_arity_m
  264. method_arity
  265. rb_mod_method_arity
  266. rb_obj_method_arity
  267. method_inspect
  268. mproc
  269. bmcall
  270. rb_proc_new
  271. method_proc
  272. rb_obj_is_method
  273. rb_mod_define_method
  274. Init_Proc
  275. Init_Binding
  276. win32_get_exception_list
  277. win32_set_exception_list
  278. rb_fd_init
  279. rb_fd_term
  280. rb_fd_zero
  281. rb_fd_resize
  282. rb_fd_set
  283. rb_fd_clr
  284. rb_fd_isset
  285. rb_fd_copy
  286. rb_fd_select
  287. thread_set_raised
  288. thread_reset_raised
  289. run_trap_eval
  290. rb_trap_eval
  291. thread_status_name
  292. rb_set_safe_level
  293. safe_getter
  294. safe_setter
  295. timeofday
  296. thread_mark
  297. mark_loading_thread
  298. rb_gc_mark_threads
  299. rb_gc_abort_threads
  300. thread_free
  301. rb_thread_check
  302. rb_thread_save_context
  303. rb_thread_switch
  304. rb_thread_restore_context_0
  305. register_stack_extend
  306. stack_extend
  307. rb_thread_restore_context
  308. rb_thread_ready
  309. rb_thread_die
  310. rb_thread_remove
  311. rb_thread_dead
  312. rb_thread_fd_close
  313. rb_thread_main_jump
  314. rb_thread_deadlock
  315. copy_fds
  316. match_fds
  317. intersect_fds
  318. find_bad_fds
  319. rb_thread_schedule
  320. rb_thread_wait_fd
  321. rb_thread_fd_writable
  322. rb_thread_wait_for
  323. rb_thread_alone
  324. rb_thread_select
  325. rb_thread_join
  326. rb_thread_join_m
  327. rb_thread_current
  328. rb_thread_main
  329. rb_thread_list
  330. rb_thread_wakeup
  331. rb_thread_run
  332. rb_thread_kill
  333. rb_thread_s_kill
  334. rb_thread_exit
  335. rb_thread_pass
  336. rb_thread_stop
  337. rb_thread_polling
  338. rb_thread_sleep
  339. rb_thread_sleep_forever
  340. rb_thread_priority
  341. rb_thread_priority_set
  342. rb_thread_safe_level
  343. rb_thread_s_abort_exc
  344. rb_thread_s_abort_exc_set
  345. rb_thread_abort_exc
  346. rb_thread_abort_exc_set
  347. rb_thread_group
  348. rb_thread_alloc
  349. catch_timer
  350. thread_timer
  351. rb_thread_start_timer
  352. rb_thread_stop_timer
  353. catch_timer
  354. rb_thread_start_timer
  355. rb_thread_stop_timer
  356. push_thread_anchor
  357. pop_thread_anchor
  358. thread_insert
  359. rb_thread_start_0
  360. rb_thread_terminated
  361. rb_thread_yield_0
  362. rb_thread_start_1
  363. rb_thread_create
  364. rb_thread_yield
  365. rb_thread_s_new
  366. rb_thread_initialize
  367. rb_thread_start
  368. rb_thread_value
  369. rb_thread_status
  370. rb_thread_alive_p
  371. rb_thread_stop_p
  372. rb_thread_wait_other_threads
  373. rb_thread_cleanup
  374. rb_thread_critical_get
  375. rb_thread_critical_set
  376. rb_thread_interrupt
  377. rb_thread_signal_raise
  378. rb_thread_trap_eval
  379. rb_thread_signal_exit
  380. rb_thread_raise
  381. rb_thread_raise_m
  382. rb_thread_local_aref
  383. rb_thread_aref
  384. rb_thread_local_aset
  385. rb_thread_aset
  386. rb_thread_key_p
  387. thread_keys_i
  388. rb_thread_keys
  389. rb_thread_inspect
  390. rb_thread_atfork
  391. rb_callcc
  392. rb_cont_call
  393. thgroup_s_alloc
  394. thgroup_list
  395. thgroup_enclose
  396. thgroup_enclosed_p
  397. thgroup_add
  398. Init_Thread
  399. rb_f_catch
  400. catch_i
  401. rb_catch
  402. rb_f_throw
  403. rb_throw
  404. recursive_check
  405. recursive_push
  406. recursive_pop
  407. rb_exec_recursive
/**********************************************************************

  eval.c -

  $Author: akr $
  $Date: 2006/01/06 21:28:54 $
  created at: Thu Jun 10 14:22:17 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto
  Copyright (C) 2000  Network Applied Communication Laboratory, Inc.
  Copyright (C) 2000  Information-technology Promotion Agency, Japan

**********************************************************************/

#include "ruby.h"
#include "node.h"
#include "env.h"
#include "util.h"
#include "rubysig.h"

#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifndef EXIT_SUCCESS
#define EXIT_SUCCESS 0
#endif
#ifndef EXIT_FAILURE
#define EXIT_FAILURE 1
#endif

#include <stdio.h>
#if defined(HAVE_GETCONTEXT) && defined(HAVE_SETCONTEXT)
#include <ucontext.h>
#define USE_CONTEXT
#endif
#include <setjmp.h>

#include "st.h"
#include "dln.h"

#ifdef __APPLE__
#include <crt_externs.h>
#endif

/* Make alloca work the best possible way.  */
#ifdef __GNUC__
# ifndef atarist
#  ifndef alloca
#   define alloca __builtin_alloca
#  endif
# endif /* atarist */
#else
# ifdef HAVE_ALLOCA_H
#  include <alloca.h>
# else
#  ifdef _AIX
 #pragma alloca
#  else
#   ifndef alloca /* predefined by HP cc +Olibcalls */
void *alloca ();
#   endif
#  endif /* AIX */
# endif /* HAVE_ALLOCA_H */
#endif /* __GNUC__ */

#include <stdarg.h>

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#ifdef __BEOS__
#include <net/socket.h>
#endif

#ifdef __MACOS__
#include "macruby_private.h"
#endif

#ifdef __VMS
#include "vmsruby_private.h"
#endif

#ifdef USE_CONTEXT
typedef struct {
    ucontext_t context;
    volatile int status;
} rb_jmpbuf_t[1];

NORETURN(static void rb_jump_context(rb_jmpbuf_t, int));
static inline void
rb_jump_context(env, val)
    rb_jmpbuf_t env;
    int val;
{
    env->status = val;
    setcontext(&env->context);
    abort();                    /* ensure noreturn */
}
/*
 * FUNCTION_CALL_MAY_RETURN_TWICE is a magic for getcontext, gcc,
 * IA64 register stack and SPARC register window combination problem.
 *
 * Assume following code sequence.
 *
 * 1. set a register in the register stack/window such as r32/l0.
 * 2. call getcontext.
 * 3. use the register.
 * 4. update the register for other use.
 * 5. call setcontext indirectly (or directly).
 *
 * This code should be run as 1->2->3->4->5->3->4.
 * But after second getcontext return (second 3),
 * the register is broken (updated).
 * It's because getcontext/setcontext doesn't preserve the content of the
 * register stack/window.
 *
 * setjmp also doesn't preserve the content of the register stack/window.
 * But it has not the problem because gcc knows setjmp may return twice.
 * gcc detects setjmp and generates setjmp safe code.
 *
 * So setjmp call before getcontext call makes the code somewhat safe.
 * It fix the problem on IA64.
 * It is not required that setjmp is called at run time, since the problem is
 * register usage.
 *
 * Since the magic setjmp is not enough for SPARC,
 * inline asm is used to prohibit registers in register windows.
 *
 * Since the problem is fixed at gcc 4.0.3, the magic is applied only for
 * prior versions of gcc.
 * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21957
 * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22127
 */
#define GCC_VERSION_BEFORE(major, minor, patchlevel) \
    (defined (__GNUC__) && \
     ((__GNUC__ < (major)) ||  \
      (__GNUC__ == (major) && __GNUC_MINOR__ < (minor)) || \
      (__GNUC__ == (major) && __GNUC_MINOR__ == (minor) && __GNUC_PATCHLEVEL__ < (patchlevel))))
#if GCC_VERSION_BEFORE(4,0,3)
#if defined(sparc) || defined(__sparc__)
#define FUNCTION_CALL_MAY_RETURN_TWICE \
 ({ __asm__ volatile ("" : : :  \
    "%o0", "%o1", "%o2", "%o3", "%o4", "%o5", "%o7", \
    "%l0", "%l1", "%l2", "%l3", "%l4", "%l5", "%l6", "%l7", \
    "%i0", "%i1", "%i2", "%i3", "%i4", "%i5", "%i7"); })
#elif defined(IA64)
static jmp_buf function_call_may_return_twice_jmp_buf;
int function_call_may_return_twice_false = 0;
#define FUNCTION_CALL_MAY_RETURN_TWICE \
  (function_call_may_return_twice_false ? \
   setjmp(function_call_may_return_twice_jmp_buf) : \
   0)
#else
#define FUNCTION_CALL_MAY_RETURN_TWICE 0
#endif
#else
#define FUNCTION_CALL_MAY_RETURN_TWICE 0
#endif
#define ruby_longjmp(env, val) rb_jump_context(env, val)
#define ruby_setjmp(just_before_setjmp, j) ((j)->status = 0, \
    (just_before_setjmp), \
    FUNCTION_CALL_MAY_RETURN_TWICE, \
    getcontext(&(j)->context), \
    (j)->status)
#else
typedef jmp_buf rb_jmpbuf_t;
#if !defined(setjmp) && defined(HAVE__SETJMP)
#define ruby_setjmp(just_before_setjmp, env) ((just_before_setjmp), _setjmp(env))
#define ruby_longjmp(env,val) _longjmp(env,val)
#else
#define ruby_setjmp(just_before_setjmp, env) ((just_before_setjmp), setjmp(env))
#define ruby_longjmp(env,val) longjmp(env,val)
#endif
#endif

#include <sys/types.h>
#include <signal.h>
#include <errno.h>

#if defined(__VMS)
#pragma nostandard
#endif

#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif

/*
  Solaris sys/select.h switches select to select_large_fdset to support larger
  file descriptors if FD_SETSIZE is larger than 1024 on 32bit environment.
  But Ruby doesn't change FD_SETSIZE because fd_set is allocated dynamically.
  So following definition is required to use select_large_fdset.
*/
#ifdef HAVE_SELECT_LARGE_FDSET
#define select(n, r, w, e, t) select_large_fdset(n, r, w, e, t)
#endif

#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif

#include <sys/stat.h>

VALUE rb_cProc;
static VALUE rb_cBinding;
static VALUE proc_invoke(VALUE,VALUE,VALUE,VALUE);
static VALUE proc_lambda(void);
static VALUE rb_f_binding(VALUE);
static void rb_f_END(void);
static VALUE rb_f_block_given_p(void);
static VALUE block_pass(VALUE,NODE*);
static VALUE rb_cMethod;
static VALUE rb_cUnboundMethod;
static VALUE umethod_bind(VALUE, VALUE);
static VALUE rb_mod_define_method(int, VALUE*, VALUE);
NORETURN(static void rb_raise_jump(VALUE));
static VALUE rb_make_exception(int argc, VALUE *argv);

static int scope_vmode;
#define SCOPE_PUBLIC    0
#define SCOPE_PRIVATE   1
#define SCOPE_PROTECTED 2
#define SCOPE_MODFUNC   5
#define SCOPE_MASK      7
#define SCOPE_SET(f)  (scope_vmode=(f))
#define SCOPE_TEST(f) (scope_vmode&(f))

NODE* ruby_current_node;
int ruby_safe_level = 0;
/* safe-level:
   0 - strings from streams/environment/ARGV are tainted (default)
   1 - no dangerous operation by tainted value
   2 - process/file operations prohibited
   3 - all generated objects are tainted
   4 - no global (non-tainted) variable modification/no direct output
*/

static VALUE safe_getter(void);
static void safe_setter(VALUE val);

void
rb_secure(int level)
{
    if (level <= ruby_safe_level) {
        if (ruby_frame->callee) {
            rb_raise(rb_eSecurityError, "Insecure operation `%s' at level %d",
                     rb_id2name(ruby_frame->callee), ruby_safe_level);
        }
        else {
            rb_raise(rb_eSecurityError, "Insecure operation at level %d", ruby_safe_level);
        }
    }
}

void
rb_secure_update(VALUE obj)
{
    if (!OBJ_TAINTED(obj)) rb_secure(4);
}

void
rb_check_safe_obj(VALUE x)
{
    if (ruby_safe_level > 0 && OBJ_TAINTED(x)){
        if (ruby_frame->callee) {
            rb_raise(rb_eSecurityError, "Insecure operation - %s",
                     rb_id2name(ruby_frame->callee));
        }
        else {
            rb_raise(rb_eSecurityError, "Insecure operation: -r");
        }
    }
    rb_secure(4);
}

void
rb_check_safe_str(VALUE x)
{
    rb_check_safe_obj(x);
    if (TYPE(x)!= T_STRING) {
        rb_raise(rb_eTypeError, "wrong argument type %s (expected String)",
                 rb_obj_classname(x));
    }
}

NORETURN(static void print_undef(VALUE, ID));
static void
print_undef(VALUE klass, ID id)
{
    rb_name_error(id, "undefined method `%s' for %s `%s'",
                  rb_id2name(id),
                  (TYPE(klass) == T_MODULE) ? "module" : "class",
                  rb_class2name(klass));
}

static ID removed, singleton_removed, undefined, singleton_undefined;

#define CACHE_SIZE 0x800
#define CACHE_MASK 0x7ff
#define EXPR1(c,m) ((((c)>>3)^(m))&CACHE_MASK)

struct cache_entry {            /* method hash table. */
    ID mid;                     /* method's id */
    ID mid0;                    /* method's original id */
    VALUE klass;                /* receiver's class */
    VALUE origin;               /* where method defined  */
    NODE *method;
    int noex;
};

static struct cache_entry cache[CACHE_SIZE];
static int ruby_running = 0;

void
rb_clear_cache(void)
{
   struct cache_entry *ent, *end;

    if (!ruby_running) return;
    ent = cache; end = ent + CACHE_SIZE;
    while (ent < end) {
        ent->mid = 0;
        ent++;
    }
}

static void
rb_clear_cache_for_undef(VALUE klass, ID id)
{
    struct cache_entry *ent, *end;

    if (!ruby_running) return;
    ent = cache; end = ent + CACHE_SIZE;
    while (ent < end) {
        if (ent->origin == klass && ent->mid == id) {
            ent->mid = 0;
        }
        ent++;
    }
}

static void
rb_clear_cache_by_id(ID id)
{
    struct cache_entry *ent, *end;

    if (!ruby_running) return;
    ent = cache; end = ent + CACHE_SIZE;
    while (ent < end) {
        if (ent->mid == id) {
            ent->mid = 0;
        }
        ent++;
    }
}

void
rb_clear_cache_by_class(VALUE klass)
{
    struct cache_entry *ent, *end;

    if (!ruby_running) return;
    ent = cache; end = ent + CACHE_SIZE;
    while (ent < end) {
        if (ent->klass == klass || ent->origin == klass) {
            ent->mid = 0;
        }
        ent++;
    }
}

static ID init, eqq, each, aref, aset, match, missing;
static ID added, singleton_added;
static ID __id__, __send__, respond_to;

#define NOEX_SAFE(n) ((n) >> 4)
#define NOEX_WITH(n, v) ((n) | (v) << 4)
#define NOEX_WITH_SAFE(n) NOEX_WITH(n, ruby_safe_level)

void
rb_add_method(VALUE klass, ID mid, NODE *node, int noex)
{
    NODE *body;

    if (NIL_P(klass)) klass = rb_cObject;
    if (ruby_safe_level >= 4 && (klass == rb_cObject || !OBJ_TAINTED(klass))) {
        rb_raise(rb_eSecurityError, "Insecure: can't define method");
    }
    if (!FL_TEST(klass, FL_SINGLETON) &&
        node && nd_type(node) != NODE_ZSUPER &&
        (mid == rb_intern("initialize" )|| mid == rb_intern("initialize_copy"))) {
        noex = NOEX_PRIVATE | noex;
    }
    else if (FL_TEST(klass, FL_SINGLETON) && node && nd_type(node) == NODE_CFUNC &&
             mid == rb_intern("allocate")) {
        rb_warn("defining %s.allocate is deprecated; use rb_define_alloc_func()",
                rb_class2name(rb_iv_get(klass, "__attached__")));
        mid = ID_ALLOCATOR;
    }
    if (OBJ_FROZEN(klass)) rb_error_frozen("class/module");
    rb_clear_cache_by_id(mid);
    body = NEW_METHOD(node, NOEX_WITH_SAFE(noex));
    st_insert(RCLASS(klass)->m_tbl, mid, (st_data_t)body);
    if (node && mid != ID_ALLOCATOR && ruby_running) {
        if (FL_TEST(klass, FL_SINGLETON)) {
            rb_funcall(rb_iv_get(klass, "__attached__"), singleton_added, 1, ID2SYM(mid));
        }
        else {
            rb_funcall(klass, added, 1, ID2SYM(mid));
        }
    }
}

void
rb_define_alloc_func(VALUE klass, VALUE (*func) (VALUE))
{
    Check_Type(klass, T_CLASS);
    rb_add_method(CLASS_OF(klass), ID_ALLOCATOR, NEW_CFUNC(func, 0), NOEX_PRIVATE);
}

void
rb_undef_alloc_func(VALUE klass)
{
    Check_Type(klass, T_CLASS);
    rb_add_method(CLASS_OF(klass), ID_ALLOCATOR, 0, NOEX_UNDEF);
}

static NODE*
search_method(VALUE klass, ID id, VALUE *origin)
{
    NODE *body;

    if (!klass) return 0;
    while (!st_lookup(RCLASS(klass)->m_tbl, id, (st_data_t *)&body)) {
        klass = RCLASS(klass)->super;
        if (!klass) return 0;
    }

    if (origin) *origin = klass;
    return body;
}

static NODE*
rb_get_method_body(VALUE *klassp, ID *idp, int *noexp)
{
    ID id = *idp;
    VALUE klass = *klassp;
    VALUE origin;
    NODE * volatile body;
    struct cache_entry *ent;

    if ((body = search_method(klass, id, &origin)) == 0 || !body->nd_body) {
        /* store empty info in cache */
        ent = cache + EXPR1(klass, id);
        ent->klass  = klass;
        ent->origin = klass;
        ent->mid = ent->mid0 = id;
        ent->noex   = 0;
        ent->method = 0;

        return 0;
    }

    if (ruby_running) {
        /* store in cache */
        ent = cache + EXPR1(klass, id);
        ent->klass  = klass;
        ent->noex   = body->nd_noex;
        if (noexp) *noexp = body->nd_noex;
        body = body->nd_body;
        if (nd_type(body) == NODE_FBODY) {
            ent->mid = id;
            *klassp = body->nd_orig;
            ent->origin = body->nd_orig;
            *idp = ent->mid0 = body->nd_mid;
            body = ent->method = body->nd_head;
        }
        else {
            *klassp = origin;
            ent->origin = origin;
            ent->mid = ent->mid0 = id;
            ent->method = body;
        }
    }
    else {
        if (noexp) *noexp = body->nd_noex;
        body = body->nd_body;
        if (nd_type(body) == NODE_FBODY) {
            *klassp = body->nd_orig;
            *idp = body->nd_mid;
            body = body->nd_head;
        }
        else {
            *klassp = origin;
        }
    }

    return body;
}

NODE*
rb_method_node(VALUE klass, ID id)
{
    int noex;
    struct cache_entry *ent;

    ent = cache + EXPR1(klass, id);
    if (ent->mid == id && ent->klass == klass && ent->method){
        return ent->method;
    }

    return rb_get_method_body(&klass, &id, &noex);
}

static void
remove_method(VALUE klass, ID mid)
{
    NODE *body;

    if (klass == rb_cObject) {
        rb_secure(4);
    }
    if (ruby_safe_level >= 4 && !OBJ_TAINTED(klass)) {
        rb_raise(rb_eSecurityError, "Insecure: can't remove method");
    }
    if (OBJ_FROZEN(klass)) rb_error_frozen("class/module");
    if (mid == __id__ || mid == __send__ || mid == init) {
        rb_warn("removing `%s' may cause serious problem", rb_id2name(mid));
    }
    if (!st_delete(RCLASS(klass)->m_tbl, &mid, (st_data_t *)&body) ||
        !body->nd_body) {
        rb_name_error(mid, "method `%s' not defined in %s",
                      rb_id2name(mid), rb_class2name(klass));
    }
    rb_clear_cache_for_undef(klass, mid);
    if (FL_TEST(klass, FL_SINGLETON)) {
        rb_funcall(rb_iv_get(klass, "__attached__"), singleton_removed, 1, ID2SYM(mid));
    }
    else {
        rb_funcall(klass, removed, 1, ID2SYM(mid));
    }
}

void
rb_remove_method(VALUE klass, const char *name)
{
    remove_method(klass, rb_intern(name));
}

/*
 *  call-seq:
 *     remove_method(symbol)   => self
 *
 *  Removes the method identified by _symbol_ from the current
 *  class. For an example, see <code>Module.undef_method</code>.
 */

static VALUE
rb_mod_remove_method(int argc, VALUE *argv, VALUE mod)
{
    int i;

    for (i=0; i<argc; i++) {
        remove_method(mod, rb_to_id(argv[i]));
    }
    return mod;
}

#undef rb_disable_super
#undef rb_enable_super

void
rb_disable_super(VALUE klass, const char *name)
{
    /* obsolete - no use */
}

void
rb_enable_super(VALUE klass, const char *name)
{
    rb_warning("rb_enable_super() is obsolete");
}

static void
rb_export_method(VALUE klass, ID name, ID noex)
{
    NODE *body;
    VALUE origin;

    if (klass == rb_cObject) {
        rb_secure(4);
    }
    body = search_method(klass, name, &origin);
    if (!body && TYPE(klass) == T_MODULE) {
        body = search_method(rb_cObject, name, &origin);
    }
    if (!body || !body->nd_body) {
        print_undef(klass, name);
    }
    if (body->nd_noex != noex) {
        if (klass == origin) {
            body->nd_noex = noex;
        }
        else {
            rb_add_method(klass, name, NEW_ZSUPER(), noex);
        }
    }
}

int
rb_method_boundp(VALUE klass, ID id, int ex)
{
    struct cache_entry *ent;
    int noex;

    /* is it in the method cache? */
    ent = cache + EXPR1(klass, id);
    if (ent->mid == id && ent->klass == klass) {
        if (ex && (ent->noex & NOEX_PRIVATE))
            return Qfalse;
        if (!ent->method) return Qfalse;
        return Qtrue;
    }
    if (rb_get_method_body(&klass, &id, &noex)) {
        if (ex && (noex & NOEX_PRIVATE))
            return Qfalse;
        return Qtrue;
    }
    return Qfalse;
}

void
rb_attr(VALUE klass, ID id, int read, int write, int ex)
{
    const char *name;
    char *buf;
    ID attriv;
    int noex;
    size_t len;

    if (!ex) noex = NOEX_PUBLIC;
    else {
        if (SCOPE_TEST(SCOPE_PRIVATE)) {
            noex = NOEX_PRIVATE;
            rb_warning((scope_vmode == SCOPE_MODFUNC) ?
                       "attribute accessor as module_function" :
                       "private attribute?");
        }
        else if (SCOPE_TEST(SCOPE_PROTECTED)) {
            noex = NOEX_PROTECTED;
        }
        else {
            noex = NOEX_PUBLIC;
        }
    }

    if (!rb_is_local_id(id) && !rb_is_const_id(id)) {
        rb_name_error(id, "invalid attribute name `%s'", rb_id2name(id));
    }
    name = rb_id2name(id);
    if (!name) {
        rb_raise(rb_eArgError, "argument needs to be symbol or string");
    }
    len = strlen(name)+2;
    buf = ALLOCA_N(char,len);
    snprintf(buf, len, "@%s", name);
    attriv = rb_intern(buf);
    if (read) {
        rb_add_method(klass, id, NEW_IVAR(attriv), noex);
    }
    if (write) {
        rb_add_method(klass, rb_id_attrset(id), NEW_ATTRSET(attriv), noex);
    }
}

VALUE ruby_errinfo = Qnil;
extern int ruby_nerrs;

static VALUE rb_eLocalJumpError;
static VALUE rb_eSysStackError;

extern VALUE ruby_top_self;

struct FRAME *ruby_frame;
struct SCOPE *ruby_scope;
static struct FRAME *top_frame;
static struct SCOPE *top_scope;

static unsigned long frame_unique = 0;

#define PUSH_FRAME() do {               \
    struct FRAME _frame;                \
    _frame.prev = ruby_frame;           \
    _frame.tmp  = 0;                    \
    _frame.node = ruby_current_node;    \
    _frame.iter = ruby_iter->iter;      \
    _frame.argc = 0;                    \
    _frame.flags = 0;                   \
    _frame.uniq = frame_unique++;       \
    ruby_frame = &_frame

#define POP_FRAME()                     \
    ruby_current_node = _frame.node;    \
    ruby_frame = _frame.prev;           \
} while (0)

static struct BLOCK *ruby_block;
static unsigned long block_unique = 0;

#define PUSH_BLOCK(v,b) do {            \
    struct BLOCK _block;                \
    _block.var = (v);                   \
    _block.body = (b);                  \
    _block.self = self;                 \
    _block.frame = *ruby_frame;         \
    _block.klass = ruby_class;          \
    _block.cref = ruby_cref;            \
    _block.frame.node = ruby_current_node;\
    _block.scope = ruby_scope;          \
    _block.prev = ruby_block;           \
    _block.outer = ruby_block;          \
    _block.iter = ruby_iter->iter;      \
    _block.vmode = scope_vmode;         \
    _block.flags = BLOCK_D_SCOPE;       \
    _block.dyna_vars = ruby_dyna_vars;  \
    _block.wrapper = ruby_wrapper;      \
    _block.block_obj = 0;               \
    _block.uniq = (b)?block_unique++:0; \
    if (b) {                            \
        prot_tag->blkid = _block.uniq;  \
    }                                   \
    ruby_block = &_block

#define POP_BLOCK() \
   ruby_block = _block.prev; \
} while (0)

struct RVarmap *ruby_dyna_vars;
#define PUSH_VARS() do { \
    struct RVarmap * volatile _old; \
    _old = ruby_dyna_vars; \
    ruby_dyna_vars = 0

#define POP_VARS() \
    if (_old && (ruby_scope->flags & SCOPE_DONT_RECYCLE)) {\
        if (RBASIC(_old)->flags) /* unless it's already recycled */ \
            FL_SET(_old, DVAR_DONT_RECYCLE); \
    }\
    ruby_dyna_vars = _old; \
} while (0)

#define DVAR_DONT_RECYCLE FL_USER2

static struct RVarmap*
new_dvar(ID id, VALUE value, struct RVarmap *prev)
{
    NEWOBJ(vars, struct RVarmap);
    OBJSETUP(vars, 0, T_VARMAP);
    vars->id = id;
    vars->val = value;
    vars->next = prev;

    return vars;
}

VALUE
rb_dvar_defined(ID id)
{
    struct RVarmap *vars = ruby_dyna_vars;

    while (vars) {
        if (vars->id == id) return Qtrue;
        vars = vars->next;
    }
    return Qfalse;
}

VALUE
rb_dvar_curr(ID id)
{
    struct RVarmap *vars = ruby_dyna_vars;

    while (vars) {
        if (vars->id == 0) break;
        if (vars->id == id) return Qtrue;
        vars = vars->next;
    }
    return Qfalse;
}

VALUE
rb_dvar_ref(ID id)
{
    struct RVarmap *vars = ruby_dyna_vars;

    while (vars) {
        if (vars->id == id) {
            return vars->val;
        }
        vars = vars->next;
    }
    return Qnil;
}

void
rb_dvar_push(ID id, VALUE value)
{
    ruby_dyna_vars = new_dvar(id, value, ruby_dyna_vars);
}

static void
dvar_asgn_internal(ID id, VALUE value, int curr)
{
    int n = 0;
    struct RVarmap *vars = ruby_dyna_vars;

    while (vars) {
        if (curr && vars->id == 0) {
            /* first null is a dvar header */
            n++;
            if (n == 2) break;
        }
        if (vars->id == id) {
            vars->val = value;
            return;
        }
        vars = vars->next;
    }
    if (!ruby_dyna_vars) {
        ruby_dyna_vars = new_dvar(id, value, 0);
    }
    else {
        vars = new_dvar(id, value, ruby_dyna_vars->next);
        ruby_dyna_vars->next = vars;
    }
}

static inline void
dvar_asgn(ID id, VALUE value)
{
    dvar_asgn_internal(id, value, 0);
}

static inline void
dvar_asgn_curr(ID id, VALUE value)
{
    dvar_asgn_internal(id, value, 1);
}

VALUE *
rb_svar(int cnt)
{
    struct RVarmap *vars = ruby_dyna_vars;
    ID id;

    if (!ruby_scope->local_tbl) return NULL;
    if (cnt >= ruby_scope->local_tbl[0]) return NULL;
    id = ruby_scope->local_tbl[cnt+1];
    while (vars) {
        if (vars->id == id) return &vars->val;
        vars = vars->next;
    }
    if (ruby_scope->local_vars == 0) return NULL;
    return &ruby_scope->local_vars[cnt];
}

struct iter {
    int iter;
    struct iter *prev;
};
static struct iter *ruby_iter;

#define ITER_NOT 0
#define ITER_PRE 1
#define ITER_CUR 2
#define ITER_PAS 3

#define PUSH_ITER(i) do {               \
    struct iter _iter;                  \
    _iter.prev = ruby_iter;             \
    _iter.iter = (i);                   \
    ruby_iter = &_iter

#define POP_ITER()                      \
    ruby_iter = _iter.prev;             \
} while (0)

struct tag {
    rb_jmpbuf_t buf;
    struct FRAME *frame;
    struct iter *iter;
    VALUE tag;
    VALUE retval;
    struct SCOPE *scope;
    VALUE dst;
    struct tag *prev;
    int blkid;
};
static struct tag *prot_tag;

#define PUSH_TAG(ptag) do {             \
    struct tag _tag;                    \
    _tag.retval = Qnil;                 \
    _tag.frame = ruby_frame;            \
    _tag.iter = ruby_iter;              \
    _tag.prev = prot_tag;               \
    _tag.scope = ruby_scope;            \
    _tag.tag = ptag;                    \
    _tag.dst = 0;                       \
    _tag.blkid = 0;                     \
    prot_tag = &_tag

#define PROT_NONE   Qfalse      /* 0 */
#define PROT_THREAD Qtrue       /* 2 */
#define PROT_FUNC   INT2FIX(0)  /* 1 */
#define PROT_LOOP   INT2FIX(1)  /* 3 */
#define PROT_LAMBDA INT2FIX(2)  /* 5 */
#define PROT_YIELD  INT2FIX(3)  /* 7 */
#define PROT_TOP    INT2FIX(4)  /* 9 */

#define EXEC_TAG()    (FLUSH_REGISTER_WINDOWS, ruby_setjmp(((void)0), prot_tag->buf))

#define JUMP_TAG(st) do {               \
    ruby_frame = prot_tag->frame;       \
    ruby_iter = prot_tag->iter;         \
    ruby_longjmp(prot_tag->buf,(st));   \
} while (0)

#define POP_TAG()                       \
    prot_tag = _tag.prev;               \
} while (0)

#define TAG_DST() (_tag.dst == (VALUE)ruby_frame->uniq)

#define TAG_RETURN      0x1
#define TAG_BREAK       0x2
#define TAG_NEXT        0x3
#define TAG_RETRY       0x4
#define TAG_REDO        0x5
#define TAG_RAISE       0x6
#define TAG_THROW       0x7
#define TAG_FATAL       0x8
#define TAG_CONTCALL    0x9
#define TAG_THREAD      0xa
#define TAG_MASK        0xf

VALUE ruby_class;
static VALUE ruby_wrapper;      /* security wrapper */

#define PUSH_CLASS(c) do {              \
    VALUE _class = ruby_class;          \
    ruby_class = (c)

#define POP_CLASS() ruby_class = _class; \
} while (0)

static NODE *ruby_cref = 0;
static NODE *top_cref;
#define PUSH_CREF(c) ruby_cref = NEW_NODE(NODE_CREF,(c),0,ruby_cref)
#define POP_CREF() ruby_cref = ruby_cref->nd_next

#define PUSH_SCOPE() do {               \
    volatile int _vmode = scope_vmode;  \
    struct SCOPE * volatile _old;       \
    NEWOBJ(_scope, struct SCOPE);       \
    OBJSETUP(_scope, 0, T_SCOPE);       \
    _scope->local_tbl = 0;              \
    _scope->local_vars = 0;             \
    _scope->flags = 0;                  \
    _old = ruby_scope;                  \
    ruby_scope = _scope;                \
    scope_vmode = SCOPE_PUBLIC

typedef struct thread * rb_thread_t;
static rb_thread_t curr_thread = 0;
static rb_thread_t main_thread;
static void scope_dup(struct SCOPE *);

#define POP_SCOPE()                     \
    if (ruby_scope->flags & SCOPE_DONT_RECYCLE) {\
        if (_old) scope_dup(_old);      \
    }                                   \
    if (!(ruby_scope->flags & SCOPE_MALLOC)) {\
        ruby_scope->local_vars = 0;     \
        ruby_scope->local_tbl  = 0;     \
        if (!(ruby_scope->flags & SCOPE_DONT_RECYCLE) && \
            ruby_scope != top_scope) {  \
            rb_gc_force_recycle((VALUE)ruby_scope);\
        }                               \
    }                                   \
    ruby_scope->flags |= SCOPE_NOSTACK; \
    ruby_scope = _old;                  \
    scope_vmode = _vmode;               \
} while (0)

struct ruby_env {
    struct ruby_env *prev;
    struct FRAME *frame;
    struct SCOPE *scope;
    struct BLOCK *block;
    struct iter *iter;
    struct tag *tag;
    NODE *cref;
};

static void push_thread_anchor(struct ruby_env *);
static void pop_thread_anchor(struct ruby_env *);

#define PUSH_THREAD_TAG() PUSH_TAG(PROT_THREAD); \
    do {                                         \
        struct ruby_env _interp;                 \
        push_thread_anchor(&_interp);
#define POP_THREAD_TAG()                         \
        pop_thread_anchor(&_interp);             \
    } while (0);                                 \
    POP_TAG()

static VALUE rb_eval(VALUE,NODE*);
static VALUE eval(VALUE,VALUE,VALUE,const char*,int);
static NODE *compile(VALUE, const char*, int);

static VALUE rb_yield_0(VALUE, VALUE, VALUE, int, int);

#define YIELD_LAMBDA_CALL 1
#define YIELD_PROC_CALL   2
#define YIELD_PUBLIC_DEF  4
#define YIELD_FUNC_AVALUE 1
#define YIELD_FUNC_SVALUE 2

typedef enum calling_scope {
    CALLING_NORMAL,
    CALLING_FCALL,
    CALLING_VCALL,
    CALLING_SUPER,
} calling_scope_t;

static VALUE rb_call(VALUE,VALUE,ID,int,const VALUE*,calling_scope_t);
static VALUE module_setup(VALUE,NODE*);

static VALUE massign(VALUE,NODE*,VALUE,int);
static void assign(VALUE,NODE*,VALUE,int);
static int formal_assign(VALUE, NODE*, int, const VALUE*, VALUE*);

typedef struct event_hook {
    rb_event_hook_func_t func;
    rb_event_t events;
    struct event_hook *next;
} rb_event_hook_t;

static rb_event_hook_t *event_hooks;

#define EXEC_EVENT_HOOK(event, node, self, id, klass) \
    do { \
        rb_event_hook_t *hook; \
        \
        for (hook = event_hooks; hook; hook = hook->next) { \
            if (hook->events & event) \
                (*hook->func)(event, node, self, id, klass); \
        } \
    } while (0)

static VALUE trace_func = 0;
static int tracing = 0;
static void call_trace_func(rb_event_t,NODE*,VALUE,ID,VALUE);

#if 0
#define SET_CURRENT_SOURCE() (ruby_sourcefile = ruby_current_node->nd_file, \
                              ruby_sourceline = nd_line(ruby_current_node))
#else
#define SET_CURRENT_SOURCE() ((void)0)
#endif

void
ruby_set_current_source(void)
{
    if (ruby_current_node) {
        ruby_sourcefile = ruby_current_node->nd_file;
        ruby_sourceline = nd_line(ruby_current_node);
    }
}

static void
warn_printf(const char *fmt, ...)
{
    char buf[BUFSIZ];
    va_list args;

    va_start(args, fmt);
    vsnprintf(buf, BUFSIZ, fmt, args);
    va_end(args);
    rb_write_error(buf);
}

#define warn_print(x) rb_write_error(x)
#define warn_print2(x,l) rb_write_error2(x,l)

static void
error_pos(void)
{
    ruby_set_current_source();
    if (ruby_sourcefile) {
        if (ruby_frame->callee) {
            warn_printf("%s:%d:in `%s'", ruby_sourcefile, ruby_sourceline,
                        rb_id2name(ruby_frame->callee));
        }
        else if (ruby_sourceline == 0) {
            warn_printf("%s", ruby_sourcefile);
        }
        else {
            warn_printf("%s:%d", ruby_sourcefile, ruby_sourceline);
        }
    }
}

static VALUE
get_backtrace(VALUE info)
{
    if (NIL_P(info)) return Qnil;
    info = rb_funcall(info, rb_intern("backtrace"), 0);
    if (NIL_P(info)) return Qnil;
    return rb_check_array_type(info);
}

static void
set_backtrace(VALUE info, VALUE bt)
{
    rb_funcall(info, rb_intern("set_backtrace"), 1, bt);
}

static void
error_print(void)
{
    VALUE errat = Qnil;         /* OK */
    volatile VALUE eclass, e;
    char *einfo;
    long elen;

    if (NIL_P(ruby_errinfo)) return;

    PUSH_TAG(PROT_NONE);
    if (EXEC_TAG() == 0) {
        errat = get_backtrace(ruby_errinfo);
    }
    else {
        errat = Qnil;
    }
    if (EXEC_TAG()) goto error;
    if (NIL_P(errat)){
        ruby_set_current_source();
        if (ruby_sourcefile)
            warn_printf("%s:%d", ruby_sourcefile, ruby_sourceline);
        else
            warn_printf("%d", ruby_sourceline);
    }
    else if (RARRAY(errat)->len == 0) {
        error_pos();
    }
    else {
        VALUE mesg = RARRAY(errat)->ptr[0];

        if (NIL_P(mesg)) error_pos();
        else {
            warn_print2(RSTRING(mesg)->ptr, RSTRING(mesg)->len);
        }
    }

    eclass = CLASS_OF(ruby_errinfo);
    if (EXEC_TAG() == 0) {
        e = rb_funcall(ruby_errinfo, rb_intern("message"), 0, 0);
        StringValue(e);
        einfo = RSTRING(e)->ptr;
        elen = RSTRING(e)->len;
    }
    else {
        einfo = "";
        elen = 0;
    }
    if (EXEC_TAG()) goto error;
    if (eclass == rb_eRuntimeError && elen == 0) {
        warn_print(": unhandled exception\n");
    }
    else {
        VALUE epath;

        epath = rb_class_name(eclass);
        if (elen == 0) {
            warn_print(": ");
            warn_print2(RSTRING(epath)->ptr, RSTRING(epath)->len);
            warn_print("\n");
        }
        else {
            char *tail  = 0;
            long len = elen;

            if (RSTRING(epath)->ptr[0] == '#') epath = 0;
            if (tail = memchr(einfo, '\n', elen)) {
                len = tail - einfo;
                tail++;         /* skip newline */
            }
            warn_print(": ");
            warn_print2(einfo, len);
            if (epath) {
                warn_print(" (");
                warn_print2(RSTRING(epath)->ptr, RSTRING(epath)->len);
                warn_print(")\n");
            }
            if (tail) {
                warn_print2(tail, elen-len-1);
            }
        }
    }

    if (!NIL_P(errat)) {
        long i;
        struct RArray *ep = RARRAY(errat);

#define TRACE_MAX (TRACE_HEAD+TRACE_TAIL+5)
#define TRACE_HEAD 8
#define TRACE_TAIL 5

        ep = RARRAY(errat);
        for (i=1; i<ep->len; i++) {
            if (TYPE(ep->ptr[i]) == T_STRING) {
                warn_printf("\tfrom %s\n", RSTRING(ep->ptr[i])->ptr);
            }
            if (i == TRACE_HEAD && ep->len > TRACE_MAX) {
                warn_printf("\t ... %ld levels...\n",
                        ep->len - TRACE_HEAD - TRACE_TAIL);
                i = ep->len - TRACE_TAIL;
            }
        }
    }
  error:
    POP_TAG();
}

#if defined(__APPLE__)
#define environ (*_NSGetEnviron())
#elif !defined(_WIN32) && !defined(__MACOS__) || defined(_WIN32_WCE)
extern char **environ;
#endif
char **rb_origenviron;

void rb_call_inits(void);
void Init_stack(VALUE*);
void Init_heap(void);
void Init_ext(void);

#ifdef HAVE_NATIVETHREAD
static rb_nativethread_t ruby_thid;
int
is_ruby_native_thread(void)
{
    return NATIVETHREAD_EQUAL(ruby_thid, NATIVETHREAD_CURRENT());
}

# ifdef HAVE_NATIVETHREAD_KILL
void
ruby_native_thread_kill(sig)
    int sig;
{
    NATIVETHREAD_KILL(ruby_thid, sig);
}
# endif
#endif

NORETURN(static void rb_thread_start_1(void));

void
ruby_init(void)
{
    static int initialized = 0;
    static struct FRAME frame;
    static struct iter iter;
    int state;

    if (initialized)
        return;
    initialized = 1;
#ifdef HAVE_NATIVETHREAD
    ruby_thid = NATIVETHREAD_CURRENT();
#endif

    ruby_frame = top_frame = &frame;
    ruby_iter = &iter;

#ifdef __MACOS__
    rb_origenviron = 0;
#else
    rb_origenviron = environ;
#endif

    Init_stack((void*)&state);
    Init_heap();
    PUSH_SCOPE();
    top_scope = ruby_scope;
    /* default visibility is private at toplevel */
    SCOPE_SET(SCOPE_PRIVATE);

    PUSH_TAG(PROT_NONE);
    if ((state = EXEC_TAG()) == 0) {
        rb_call_inits();
        ruby_class = rb_cObject;
        ruby_frame->self = ruby_top_self;
        top_cref = rb_node_newnode(NODE_CREF,rb_cObject,0,0);
        ruby_cref = top_cref;
        rb_define_global_const("TOPLEVEL_BINDING", rb_f_binding(ruby_top_self));
#ifdef __MACOS__
        _macruby_init();
#elif defined(__VMS)
        _vmsruby_init();
#endif
        ruby_prog_init();
        ALLOW_INTS;
    }
    POP_TAG();
    if (state) {
        error_print();
        exit(EXIT_FAILURE);
    }
    POP_SCOPE();
    ruby_scope = top_scope;
    top_scope->flags &= ~SCOPE_NOSTACK;
    ruby_running = 1;
}

static VALUE
eval_node(VALUE self, NODE *node)
{
    if (!node) return Qnil;
    if (nd_type(node) == NODE_PRELUDE) {
        rb_eval(self, node->nd_head);
        node = node->nd_body;
    }
    if (!node) return Qnil;
    return rb_eval(self, node);
}

int ruby_in_eval;

static void rb_thread_cleanup(void);
static void rb_thread_wait_other_threads(void);

static int thread_set_raised(void);
static int thread_reset_raised(void);

static VALUE exception_error;
static VALUE sysstack_error;

static int
sysexit_status(VALUE err)
{
    VALUE st = rb_iv_get(err, "status");
    return NUM2INT(st);
}

static int
error_handle(int ex)
{
    int status = EXIT_FAILURE;

    if (thread_set_raised()) return EXIT_FAILURE;
    switch (ex & TAG_MASK) {
      case 0:
        status = EXIT_SUCCESS;
        break;

      case TAG_RETURN:
        error_pos();
        warn_print(": unexpected return\n");
        break;
      case TAG_NEXT:
        error_pos();
        warn_print(": unexpected next\n");
        break;
      case TAG_BREAK:
        error_pos();
        warn_print(": unexpected break\n");
        break;
      case TAG_REDO:
        error_pos();
        warn_print(": unexpected redo\n");
        break;
      case TAG_RETRY:
        error_pos();
        warn_print(": retry outside of rescue clause\n");
        break;
      case TAG_THROW:
        if (prot_tag && prot_tag->frame && prot_tag->frame->node) {
            NODE *tag = prot_tag->frame->node;
            warn_printf("%s:%d: uncaught throw\n",
                    tag->nd_file, nd_line(tag));
        }
        else {
            error_pos();
            warn_printf(": unexpected throw\n");
        }
        break;
      case TAG_RAISE:
      case TAG_FATAL:
        if (rb_obj_is_kind_of(ruby_errinfo, rb_eSystemExit)) {
            status = sysexit_status(ruby_errinfo);
        }
        else {
            error_print();
        }
        break;
      default:
        rb_bug("Unknown longjmp status %d", ex);
        break;
    }
    thread_reset_raised();
    return status;
}

void
ruby_options(int argc, char **argv)
{
    int state;

    Init_stack((void*)&state);
    PUSH_THREAD_TAG();
    if ((state = EXEC_TAG()) == 0) {
        ruby_process_options(argc, argv);
    }
    else {
        if (state == TAG_THREAD) {
            rb_thread_start_1();
        }
        trace_func = 0;
        tracing = 0;
        exit(error_handle(state));
    }
    POP_THREAD_TAG();
}

void rb_exec_end_proc(void);

static void
ruby_finalize_0(void)
{
    PUSH_TAG(PROT_NONE);
    if (EXEC_TAG() == 0) {
        rb_trap_exit();
    }
    POP_TAG();
    rb_exec_end_proc();
}

static void
ruby_finalize_1(void)
{
    signal(SIGINT, SIG_DFL);
    ruby_errinfo = 0;
    rb_gc_call_finalizer_at_exit();
    trace_func = 0;
    tracing = 0;
}

void
ruby_finalize(void)
{
    ruby_finalize_0();
    ruby_finalize_1();
}

int
ruby_cleanup(int ex)
{
    int state;
    volatile VALUE err = ruby_errinfo;

    ruby_safe_level = 0;
    Init_stack((void*)&state);
    PUSH_THREAD_TAG();
    PUSH_ITER(ITER_NOT);
    if ((state = EXEC_TAG()) == 0) {
        ruby_finalize_0();
        if (ruby_errinfo) err = ruby_errinfo;
        rb_thread_cleanup();
        rb_thread_wait_other_threads();
    }
    else if (state == TAG_THREAD) {
        rb_thread_start_1();
    }
    else if (ex == 0) {
        ex = state;
    }
    POP_ITER();
    ruby_errinfo = err;
    ex = error_handle(ex);
    ruby_finalize_1();
    POP_THREAD_TAG();

    if (err && rb_obj_is_kind_of(err, rb_eSystemExit)) {
        VALUE st = rb_iv_get(err, "status");
        return NUM2INT(st);
    }
    return ex;
}

extern NODE *ruby_eval_tree;

static int
ruby_exec_internal(void)
{
    int state;

    PUSH_THREAD_TAG();
    PUSH_ITER(ITER_NOT);
    /* default visibility is private at toplevel */
    SCOPE_SET(SCOPE_PRIVATE);
    if ((state = EXEC_TAG()) == 0) {
        eval_node(ruby_top_self, ruby_eval_tree);
    }
    else if (state == TAG_THREAD) {
        rb_thread_start_1();
    }
    POP_ITER();
    POP_THREAD_TAG();
    return state;
}

int
ruby_exec(void)
{
    volatile NODE *tmp;

    Init_stack((void*)&tmp);
    return ruby_exec_internal();
}

void
ruby_stop(int ex)
{
    exit(ruby_cleanup(ex));
}

void
ruby_run(void)
{
    int state;
    static int ex;

    if (ruby_nerrs > 0) exit(EXIT_FAILURE);
    state = ruby_exec();
    if (state && !ex) ex = state;
    ruby_stop(ex);
}

static void
compile_error(const char *at)
{
    VALUE str;

    ruby_nerrs = 0;
    str = rb_str_buf_new2("compile error");
    if (at) {
        rb_str_buf_cat2(str, " in ");
        rb_str_buf_cat2(str, at);
    }
    rb_str_buf_cat(str, "\n", 1);
    if (!NIL_P(ruby_errinfo)) {
        rb_str_append(str, rb_obj_as_string(ruby_errinfo));
    }
    rb_exc_raise(rb_exc_new3(rb_eSyntaxError, str));
}

VALUE
rb_eval_string(const char *str)
{
    VALUE v;
    NODE *oldsrc = ruby_current_node;

    ruby_current_node = 0;
    ruby_sourcefile = rb_source_filename("(eval)");
    v = eval(ruby_top_self, rb_str_new2(str), Qnil, 0, 0);
    ruby_current_node = oldsrc;

    return v;
}

VALUE
rb_eval_string_protect(const char *str, int *state)
{
    return rb_protect((VALUE (*)(VALUE))rb_eval_string, (VALUE)str, state);
}

VALUE
rb_eval_string_wrap(const char *str, int *state)
{
    int status;
    VALUE self = ruby_top_self;
    VALUE wrapper = ruby_wrapper;
    VALUE val;

    PUSH_CLASS(ruby_wrapper = rb_module_new());
    ruby_top_self = rb_obj_clone(ruby_top_self);
    rb_extend_object(ruby_top_self, ruby_wrapper);
    PUSH_FRAME();
    ruby_frame->callee = 0;
    ruby_frame->this_func = 0;
    ruby_frame->this_class = 0;
    ruby_frame->self = self;
    PUSH_CREF(ruby_wrapper);
    PUSH_SCOPE();

    val = rb_eval_string_protect(str, &status);
    ruby_top_self = self;

    POP_SCOPE();
    POP_FRAME();
    POP_CLASS();
    ruby_wrapper = wrapper;
    if (state) {
        *state = status;
    }
    else if (status) {
        JUMP_TAG(status);
    }
    return val;
}

NORETURN(static void localjump_error(const char*, VALUE, int));
static void
localjump_error(const char *mesg, VALUE value, int reason)
{
    VALUE exc = rb_exc_new2(rb_eLocalJumpError, mesg);
    ID id;

    rb_iv_set(exc, "@exit_value", value);
    switch (reason) {
      case TAG_BREAK:
        id = rb_intern("break"); break;
      case TAG_REDO:
        id = rb_intern("redo"); break;
      case TAG_RETRY:
        id = rb_intern("retry"); break;
      case TAG_NEXT:
        id = rb_intern("next"); break;
      case TAG_RETURN:
        id = rb_intern("return"); break;
      default:
        id = rb_intern("noreason"); break;
    }
    rb_iv_set(exc, "@reason", ID2SYM(id));
    rb_exc_raise(exc);
}

/*
 * call_seq:
 *   local_jump_error.exit_value  => obj
 *
 * Returns the exit value associated with this +LocalJumpError+.
 */
static VALUE
localjump_xvalue(VALUE exc)
{
    return rb_iv_get(exc, "@exit_value");
}

/*
 * call-seq:
 *    local_jump_error.reason   => symbol
 *
 * The reason this block was terminated:
 * :break, :redo, :retry, :next, :return, or :noreason.
 */

static VALUE
localjump_reason(VALUE exc)
{
    return rb_iv_get(exc, "@reason");
}

NORETURN(static void jump_tag_but_local_jump(int,VALUE));
static void
jump_tag_but_local_jump(int state, VALUE val)
{

    if (val == Qundef) val = prot_tag->retval;
    switch (state) {
      case 0:
        break;
      case TAG_RETURN:
        localjump_error("unexpected return", val, state);
        break;
      case TAG_BREAK:
        localjump_error("unexpected break", val, state);
        break;
      case TAG_NEXT:
        localjump_error("unexpected next", val, state);
        break;
      case TAG_REDO:
        localjump_error("unexpected redo", Qnil, state);
        break;
      case TAG_RETRY:
        localjump_error("retry outside of rescue clause", Qnil, state);
        break;
      default:
        break;
    }
    JUMP_TAG(state);
}

VALUE
rb_eval_cmd(VALUE cmd, VALUE arg, int level)
{
    int state;
    VALUE val = Qnil;           /* OK */
    struct SCOPE *saved_scope;
    volatile int safe = ruby_safe_level;

    if (OBJ_TAINTED(cmd)) {
        level = 4;
    }
    if (TYPE(cmd) != T_STRING) {
        PUSH_ITER(ITER_NOT);
        PUSH_TAG(PROT_NONE);
        ruby_safe_level = level;
        if ((state = EXEC_TAG()) == 0) {
            val = rb_funcall2(cmd, rb_intern("call"), RARRAY(arg)->len, RARRAY(arg)->ptr);
        }
        ruby_safe_level = safe;
        POP_TAG();
        POP_ITER();
        if (state) JUMP_TAG(state);
        return val;
    }

    saved_scope = ruby_scope;
    ruby_scope = top_scope;
    PUSH_FRAME();
    ruby_frame->callee = 0;
    ruby_frame->this_func = 0;
    ruby_frame->this_class = 0;
    ruby_frame->self = ruby_top_self;
    PUSH_CREF(ruby_wrapper ? ruby_wrapper : rb_cObject);

    ruby_safe_level = level;

    PUSH_TAG(PROT_NONE);
    if ((state = EXEC_TAG()) == 0) {
        val = eval(ruby_top_self, cmd, Qnil, 0, 0);
    }
    if (ruby_scope->flags & SCOPE_DONT_RECYCLE)
        scope_dup(saved_scope);
    ruby_scope = saved_scope;
    ruby_safe_level = safe;
    POP_TAG();
    POP_FRAME();

    jump_tag_but_local_jump(state, val);
    return val;
}

#define ruby_cbase (ruby_cref->nd_clss)

static VALUE
ev_const_defined(NODE *cref, ID id, VALUE self)
{
    NODE *cbase = cref;
    VALUE result;

    while (cbase && cbase->nd_next) {
        struct RClass *klass = RCLASS(cbase->nd_clss);

        if (!NIL_P(klass)) {
            if (klass->iv_tbl && st_lookup(klass->iv_tbl, id, &result)) {
                if (result == Qundef && NIL_P(rb_autoload_p((VALUE)klass, id))) {
                    return Qfalse;
                }
                return Qtrue;
            }
        }
        cbase = cbase->nd_next;
    }
    return rb_const_defined(cref->nd_clss, id);
}

static VALUE
ev_const_get(NODE *cref, ID id, VALUE self)
{
    NODE *cbase = cref;
    VALUE result;

    while (cbase && cbase->nd_next) {
        VALUE klass = cbase->nd_clss;

        if (!NIL_P(klass)) {
            while (RCLASS(klass)->iv_tbl &&
                   st_lookup(RCLASS(klass)->iv_tbl, id, &result)) {
                if (result == Qundef) {
                    if (!RTEST(rb_autoload_load(klass, id))) break;
                    continue;
                }
                return result;
            }
        }
        cbase = cbase->nd_next;
    }
    return rb_const_get(cref->nd_clss, id);
}

static VALUE
cvar_cbase(void)
{
    NODE *cref = ruby_cref;

    while (cref && cref->nd_next && (NIL_P(cref->nd_clss) || FL_TEST(cref->nd_clss, FL_SINGLETON))) {
        cref = cref->nd_next;
        if (!cref->nd_next) {
            rb_warn("class variable access from toplevel singleton method");
        }
    }
    if (NIL_P(cref->nd_clss)) {
        rb_raise(rb_eTypeError, "no class variables available");
    }
    return cref->nd_clss;
}

/*
 *  call-seq:
 *     Module.nesting    => array
 *
 *  Returns the list of +Modules+ nested at the point of call.
 *
 *     module M1
 *       module M2
 *         $a = Module.nesting
 *       end
 *     end
 *     $a           #=> [M1::M2, M1]
 *     $a[0].name   #=> "M1::M2"
 */

static VALUE
rb_mod_nesting(void)
{
    NODE *cbase = ruby_cref;
    VALUE ary = rb_ary_new();

    while (cbase && cbase->nd_next) {
        if (!NIL_P(cbase->nd_clss)) rb_ary_push(ary, cbase->nd_clss);
        cbase = cbase->nd_next;
    }
    if (ruby_wrapper && RARRAY(ary)->len == 0) {
        rb_ary_push(ary, ruby_wrapper);
    }
    return ary;
}

/*
 *  call-seq:
 *     Module.constants   => array
 *
 *  Returns an array of the names of all constants defined in the
 *  system. This list includes the names of all modules and classes.
 *
 *     p Module.constants.sort[1..5]
 *
 *  <em>produces:</em>
 *
 *     ["ARGV", "ArgumentError", "Array", "Bignum", "Binding"]
 */

static VALUE
rb_mod_s_constants(void)
{
    NODE *cbase = ruby_cref;
    void *data = 0;

    while (cbase) {
        if (!NIL_P(cbase->nd_clss)) {
            data = rb_mod_const_at(cbase->nd_clss, data);
        }
        cbase = cbase->nd_next;
    }

    if (!NIL_P(ruby_cbase)) {
        data = rb_mod_const_of(ruby_cbase, data);
    }
    return rb_const_list(data);
}

void
rb_frozen_class_p(VALUE klass)
{
    char *desc = "something(?!)";

    if (OBJ_FROZEN(klass)) {
        if (FL_TEST(klass, FL_SINGLETON))
            desc = "object";
        else {
            switch (TYPE(klass)) {
              case T_MODULE:
              case T_ICLASS:
                desc = "module"; break;
              case T_CLASS:
                desc = "class"; break;
            }
        }
        rb_error_frozen(desc);
    }
}

void
rb_undef(VALUE klass, ID id)
{
    VALUE origin;
    NODE *body;

    if (ruby_cbase == rb_cObject && klass == rb_cObject) {
        rb_secure(4);
    }
    if (ruby_safe_level >= 4 && !OBJ_TAINTED(klass)) {
        rb_raise(rb_eSecurityError, "Insecure: can't undef `%s'", rb_id2name(id));
    }
    rb_frozen_class_p(klass);
    if (id == __id__ || id == __send__ || id == init) {
        rb_warn("undefining `%s' may cause serious problem", rb_id2name(id));
    }
    body = search_method(klass, id, &origin);
    if (!body || !body->nd_body) {
        char *s0 = " class";
        VALUE c = klass;

        if (FL_TEST(c, FL_SINGLETON)) {
            VALUE obj = rb_iv_get(klass, "__attached__");

            switch (TYPE(obj)) {
              case T_MODULE:
              case T_CLASS:
                c = obj;
                s0 = "";
            }
        }
        else if (TYPE(c) == T_MODULE) {
            s0 = " module";
        }
        rb_name_error(id, "undefined method `%s' for%s `%s'",
                      rb_id2name(id),s0,rb_class2name(c));
    }
    rb_add_method(klass, id, 0, NOEX_PUBLIC);
    if (FL_TEST(klass, FL_SINGLETON)) {
        rb_funcall(rb_iv_get(klass, "__attached__"),
                   singleton_undefined, 1, ID2SYM(id));
    }
    else {
        rb_funcall(klass, undefined, 1, ID2SYM(id));
    }
}

/*
 *  call-seq:
 *     undef_method(symbol)    => self
 *
 *  Prevents the current class from responding to calls to the named
 *  method. Contrast this with <code>remove_method</code>, which deletes
 *  the method from the particular class; Ruby will still search
 *  superclasses and mixed-in modules for a possible receiver.
 *
 *     class Parent
 *       def hello
 *         puts "In parent"
 *       end
 *     end
 *     class Child < Parent
 *       def hello
 *         puts "In child"
 *       end
 *     end
 *
 *
 *     c = Child.new
 *     c.hello
 *
 *
 *     class Child
 *       remove_method :hello  # remove from child, still in parent
 *     end
 *     c.hello
 *
 *
 *     class Child
 *       undef_method :hello   # prevent any calls to 'hello'
 *     end
 *     c.hello
 *
 *  <em>produces:</em>
 *
 *     In child
 *     In parent
 *     prog.rb:23: undefined method `hello' for #<Child:0x401b3bb4> (NoMethodError)
 */

static VALUE
rb_mod_undef_method(int argc, VALUE *argv, VALUE mod)
{
    int i;

    for (i=0; i<argc; i++) {
        rb_undef(mod, rb_to_id(argv[i]));
    }
    return mod;
}

void
rb_alias(VALUE klass, ID name, ID def)
{
    VALUE origin;
    NODE *orig, *body, *node;
    VALUE singleton = 0;

    rb_frozen_class_p(klass);
    if (name == def) return;
    if (klass == rb_cObject) {
        rb_secure(4);
    }
    orig = search_method(klass, def, &origin);
    if (!orig || !orig->nd_body) {
        if (TYPE(klass) == T_MODULE) {
            orig = search_method(rb_cObject, def, &origin);
        }
    }
    if (!orig || !orig->nd_body) {
        print_undef(klass, def);
    }
    if (FL_TEST(klass, FL_SINGLETON)) {
        singleton = rb_iv_get(klass, "__attached__");
    }
    body = orig->nd_body;
    orig->nd_cnt++;
    if (nd_type(body) == NODE_FBODY) { /* was alias */
        def = body->nd_mid;
        origin = body->nd_orig;
        body = body->nd_head;
    }

    rb_clear_cache_by_id(name);
    if (RTEST(ruby_verbose) && st_lookup(RCLASS(klass)->m_tbl, name, (st_data_t *)&node)) {
        if (node->nd_cnt == 0 && node->nd_body) {
            rb_warning("discarding old %s", rb_id2name(name));
        }
    }
    st_insert(RCLASS(klass)->m_tbl, name,
      (st_data_t)NEW_METHOD(NEW_FBODY(body, def, origin), orig->nd_noex));
    if (singleton) {
        rb_funcall(singleton, singleton_added, 1, ID2SYM(name));
    }
    else {
        rb_funcall(klass, added, 1, ID2SYM(name));
    }
}

/*
 *  call-seq:
 *     alias_method(new_name, old_name)   => self
 *
 *  Makes <i>new_name</i> a new copy of the method <i>old_name</i>. This can
 *  be used to retain access to methods that are overridden.
 *
 *     module Mod
 *       alias_method :orig_exit, :exit
 *       def exit(code=0)
 *         puts "Exiting with code #{code}"
 *         orig_exit(code)
 *       end
 *     end
 *     include Mod
 *     exit(99)
 *
 *  <em>produces:</em>
 *
 *     Exiting with code 99
 */

static VALUE
rb_mod_alias_method(VALUE mod, VALUE newname, VALUE oldname)
{
    rb_alias(mod, rb_to_id(newname), rb_to_id(oldname));
    return mod;
}

static NODE*
copy_node_scope(NODE *node, NODE *rval)
{
    NODE *copy = NEW_NODE(NODE_SCOPE,0,rval,node->nd_next);

    if (node->nd_tbl) {
        copy->nd_tbl = ALLOC_N(ID, node->nd_tbl[0]+1);
        MEMCPY(copy->nd_tbl, node->nd_tbl, ID, node->nd_tbl[0]+1);
    }
    else {
        copy->nd_tbl = 0;
    }
    return copy;
}

#ifdef C_ALLOCA
# define TMP_PROTECT NODE * volatile tmp__protect_tmp=0
# define TMP_ALLOC(n)                                                   \
    (tmp__protect_tmp = NEW_NODE(NODE_ALLOCA,                           \
                                 ALLOC_N(VALUE,n),tmp__protect_tmp,n),  \
     (void*)tmp__protect_tmp->nd_head)
#else
# define TMP_PROTECT typedef int foobazzz
# define TMP_ALLOC(n) ALLOCA_N(VALUE,n)
#endif

#define SETUP_ARGS0(anode,alen) do {\
    NODE *n = anode;\
    if (!n) {\
        argc = 0;\
        argv = 0;\
    }\
    else if (nd_type(n) == NODE_ARRAY) {\
        argc=alen;\
        if (argc > 0) {\
            int i;\
            n = anode;\
            argv = TMP_ALLOC(argc);\
            for (i=0;i<argc;i++) {\
                argv[i] = rb_eval(self,n->nd_head);\
                n=n->nd_next;\
            }\
        }\
        else {\
            argc = 0;\
            argv = 0;\
        }\
    }\
    else {\
        VALUE args = rb_eval(self,n);\
        if (TYPE(args) != T_ARRAY)\
            args = rb_ary_to_ary(args);\
        argc = RARRAY(args)->len;\
        argv = ALLOCA_N(VALUE, argc);\
        MEMCPY(argv, RARRAY(args)->ptr, VALUE, argc);\
    }\
} while (0)

#define SETUP_ARGS(anode) SETUP_ARGS0(anode, anode->nd_alen)

#define BEGIN_CALLARGS do {\
    struct BLOCK *tmp_block = ruby_block;\
    int tmp_iter = ruby_iter->iter;\
    switch (tmp_iter) {\
      case ITER_PRE:\
        ruby_block = ruby_block->outer;\
      case ITER_PAS:\
        tmp_iter = ITER_NOT;\
    }\
    PUSH_ITER(tmp_iter)

#define END_CALLARGS \
    ruby_block = tmp_block;\
    POP_ITER();\
} while (0)

#define MATCH_DATA *rb_svar(node->nd_cnt)

static const char* is_defined(VALUE, NODE*, char*, int);

static char*
arg_defined(VALUE self, NODE *node, char *buf, char *type)
{
    int argc;
    int i;

    if (!node) return type;     /* no args */
    if (nd_type(node) == NODE_ARRAY) {
        argc=node->nd_alen;
        if (argc > 0) {
            for (i=0;i<argc;i++) {
                if (!is_defined(self, node->nd_head, buf, 0))
                    return 0;
                node = node->nd_next;
            }
        }
    }
    else if (!is_defined(self, node, buf, 0)) {
        return 0;
    }
    return type;
}

static const char*
is_defined(VALUE self, NODE *node /* OK */, char *buf, int noeval)
{
    VALUE val;                  /* OK */
    int state;
    static const char *ex = "expression";

    if (!node) return ex;
    switch (nd_type(node)) {
      case NODE_SUPER:
      case NODE_ZSUPER:
        if (ruby_frame->this_func == 0) return 0;
        else if (ruby_frame->this_class == 0) return 0;
        val = ruby_frame->this_class;
        if (rb_method_boundp(RCLASS(val)->super, ruby_frame->this_func, 0)) {
            if (nd_type(node) == NODE_SUPER) {
                return arg_defined(self, node->nd_args, buf, "super");
            }
            return "super";
        }
        break;

      case NODE_VCALL:
      case NODE_FCALL:
        val = self;
        goto check_bound;

      case NODE_ATTRASGN:
        val = self;
        if (node->nd_recv == (NODE *)1) goto check_bound;
      case NODE_CALL:
        if (!is_defined(self, node->nd_recv, buf, Qtrue)) return 0;
        if (noeval) return ex;
        val = rb_eval(self, node->nd_recv);
      check_bound:
        {
            int call = nd_type(node)==NODE_CALL;

            val = CLASS_OF(val);
            if (call) {
                int noex;
                ID id = node->nd_mid;

                if (!rb_get_method_body(&val, &id, &noex))
                    break;
                if ((noex & NOEX_PRIVATE))
                    break;
                if ((noex & NOEX_PROTECTED) &&
                    !rb_obj_is_kind_of(self, rb_class_real(val)))
                    break;
            }
            else if (!rb_method_boundp(val, node->nd_mid, call))
                break;
            return arg_defined(self, node->nd_args, buf,
                               nd_type(node) == NODE_ATTRASGN ?
                               "assignment" : "method");
        }
        break;

      case NODE_MATCH2:
      case NODE_MATCH3:
        return "method";

      case NODE_YIELD:
        if (rb_block_given_p()) {
            return "yield";
        }
        break;

      case NODE_SELF:
        return "self";

      case NODE_NIL:
        return "nil";

      case NODE_TRUE:
        return "true";

      case NODE_FALSE:
        return "false";

      case NODE_ATTRSET:
      case NODE_OP_ASGN1:
      case NODE_OP_ASGN2:
      case NODE_MASGN:
      case NODE_LASGN:
      case NODE_DASGN:
      case NODE_DASGN_CURR:
      case NODE_GASGN:
      case NODE_IASGN:
      case NODE_CDECL:
      case NODE_CVDECL:
      case NODE_CVASGN:
        return "assignment";

      case NODE_LVAR:
        return "local-variable";
      case NODE_DVAR:
        return "local-variable(in-block)";

      case NODE_GVAR:
        if (rb_gvar_defined(node->nd_entry)) {
            return "global-variable";
        }
        break;

      case NODE_IVAR:
        if (rb_ivar_defined(self, node->nd_vid)) {
            return "instance-variable";
        }
        break;

      case NODE_CONST:
        if (ev_const_defined(ruby_cref, node->nd_vid, self)) {
            return "constant";
        }
        break;

      case NODE_CVAR:
        if (rb_cvar_defined(cvar_cbase(), node->nd_vid)) {
            return "class variable";
        }
        break;

      case NODE_COLON2:
        if (!is_defined(self, node->nd_recv, buf, Qtrue)) return 0;
        if (noeval) return ex;
        val = rb_eval(self, node->nd_recv);
        switch (TYPE(val)) {
          case T_CLASS:
          case T_MODULE:
            if (rb_const_defined_from(val, node->nd_mid))
                return "constant";
            break;
          default:
            if (rb_method_boundp(CLASS_OF(val), node->nd_mid, 1)) {
                return "method";
            }
        }
        break;

      case NODE_COLON3:
        if (rb_const_defined_from(rb_cObject, node->nd_mid)) {
            return "constant";
        }
        break;

      case NODE_NTH_REF:
        if (RTEST(rb_reg_nth_defined(node->nd_nth, MATCH_DATA))) {
            if (!buf) return ex;
            sprintf(buf, "$%d", (int)node->nd_nth);
            return buf;
        }
        break;

      case NODE_BACK_REF:
        if (RTEST(rb_reg_nth_defined(0, MATCH_DATA))) {
            if (!buf) return ex;
            sprintf(buf, "$%c", (char)node->nd_nth);
            return buf;
        }
        break;

      default:
        PUSH_TAG(PROT_NONE);
        if ((state = EXEC_TAG()) == 0) {
            rb_eval(self, node);
        }
        POP_TAG();
        if (!state) {
            return ex;
        }
        ruby_errinfo = Qnil;
        break;
    }
    return 0;
}

static int handle_rescue(VALUE,NODE*);

static void blk_free(struct BLOCK *data);

static VALUE
rb_obj_is_proc(VALUE proc)
{
    if (TYPE(proc) == T_DATA && RDATA(proc)->dfree == (RUBY_DATA_FUNC)blk_free) {
        return Qtrue;
    }
    return Qfalse;
}

void
rb_add_event_hook(rb_event_hook_func_t func, rb_event_t events)
{
    rb_event_hook_t *hook;

    hook = ALLOC(rb_event_hook_t);
    hook->func = func;
    hook->events = events;
    hook->next = event_hooks;
    event_hooks = hook;
}

int
rb_remove_event_hook(rb_event_hook_func_t func)
{
    rb_event_hook_t *prev, *hook;

    prev = NULL;
    hook = event_hooks;
    while (hook) {
        if (hook->func == func) {
            if (prev) {
                prev->next = hook->next;
            }
            else {
                event_hooks = hook->next;
            }
            xfree(hook);
            return 0;
        }
        prev = hook;
        hook = hook->next;
    }
    return -1;
}

/*
 *  call-seq:
 *     set_trace_func(proc)    => proc
 *     set_trace_func(nil)     => nil
 *
 *  Establishes _proc_ as the handler for tracing, or disables
 *  tracing if the parameter is +nil+. _proc_ takes up
 *  to six parameters: an event name, a filename, a line number, an
 *  object id, a binding, and the name of a class. _proc_ is
 *  invoked whenever an event occurs. Events are: <code>c-call</code>
 *  (call a C-language routine), <code>c-return</code> (return from a
 *  C-language routine), <code>call</code> (call a Ruby method),
 *  <code>class</code> (start a class or module definition),
 *  <code>end</code> (finish a class or module definition),
 *  <code>line</code> (execute code on a new line), <code>raise</code>
 *  (raise an exception), and <code>return</code> (return from a Ruby
 *  method). Tracing is disabled within the context of _proc_.
 *
 *      class Test
 *      def test
 *        a = 1
 *        b = 2
 *      end
 *      end
 *
 *      set_trace_func proc { |event, file, line, id, binding, classname|
 *         printf "%8s %s:%-2d %10s %8s\n", event, file, line, id, classname
 *      }
 *      t = Test.new
 *      t.test
 *
 *        line prog.rb:11               false
 *      c-call prog.rb:11        new    Class
 *      c-call prog.rb:11 initialize   Object
 *    c-return prog.rb:11 initialize   Object
 *    c-return prog.rb:11        new    Class
 *        line prog.rb:12               false
 *        call prog.rb:2        test     Test
 *        line prog.rb:3        test     Test
 *        line prog.rb:4        test     Test
 *      return prog.rb:4        test     Test
 */

static VALUE
set_trace_func(VALUE obj, VALUE trace)
{
    rb_event_hook_t *hook;

    rb_secure(4);
    if (NIL_P(trace)) {
        trace_func = 0;
        rb_remove_event_hook(call_trace_func);
        return Qnil;
    }
    if (!rb_obj_is_proc(trace)) {
        rb_raise(rb_eTypeError, "trace_func needs to be Proc");
    }
    trace_func = trace;
    for (hook = event_hooks; hook; hook = hook->next) {
        if (hook->func == call_trace_func)
            return trace;
    }
    rb_add_event_hook(call_trace_func, RUBY_EVENT_ALL);
    return trace;
}

static char *
get_event_name(rb_event_t event)
{
    switch (event) {
    case RUBY_EVENT_LINE:
        return "line";
    case RUBY_EVENT_CLASS:
        return "class";
    case RUBY_EVENT_END:
        return "end";
    case RUBY_EVENT_CALL:
        return "call";
    case RUBY_EVENT_RETURN:
        return "return";
    case RUBY_EVENT_C_CALL:
        return "c-call";
    case RUBY_EVENT_C_RETURN:
        return "c-return";
    case RUBY_EVENT_RAISE:
        return "raise";
    default:
        return "unknown";
    }
}

static void
call_trace_func(rb_event_t event, NODE *node, VALUE self, ID id, VALUE klass /* OK */)
{
    int state, raised;
    struct FRAME *prev;
    NODE *node_save;
    VALUE srcfile;
    char *event_name;

    if (!trace_func) return;
    if (tracing) return;
    if (id == ID_ALLOCATOR) return;
    if (!node && ruby_sourceline == 0) return;

    if (!(node_save = ruby_current_node)) {
        node_save = NEW_BEGIN(0);
    }
    tracing = 1;
    prev = ruby_frame;
    PUSH_FRAME();
    *ruby_frame = *prev;
    ruby_frame->prev = prev;
    ruby_frame->iter = 0;       /* blocks not available anyway */

    if (node) {
        ruby_current_node = node;
        ruby_frame->node = node;
        ruby_sourcefile = node->nd_file;
        ruby_sourceline = nd_line(node);
    }
    if (klass) {
        if (TYPE(klass) == T_ICLASS) {
            klass = RBASIC(klass)->klass;
        }
        else if (FL_TEST(klass, FL_SINGLETON)) {
            klass = rb_iv_get(klass, "__attached__");
        }
    }
    PUSH_TAG(PROT_NONE);
    raised = thread_reset_raised();
    if ((state = EXEC_TAG()) == 0) {
        srcfile = rb_str_new2(ruby_sourcefile?ruby_sourcefile:"(ruby)");
        event_name = get_event_name(event);
        proc_invoke(trace_func, rb_ary_new3(6, rb_str_new2(event_name),
                                            srcfile,
                                            INT2FIX(ruby_sourceline),
                                            id?ID2SYM(id):Qnil,
                                            self ? rb_f_binding(self) : Qnil,
                                            klass?klass:Qnil),
                    Qundef, 0);
    }
    if (raised) thread_set_raised();
    POP_TAG();
    POP_FRAME();

    tracing = 0;
    ruby_current_node = node_save;
    SET_CURRENT_SOURCE();
    if (state) JUMP_TAG(state);
}

static VALUE
avalue_to_svalue(VALUE v)
{
    VALUE tmp, top;

    tmp = rb_check_array_type(v);
    if (NIL_P(tmp)) {
        return v;
    }
    if (RARRAY(tmp)->len == 0) {
        return Qundef;
    }
    if (RARRAY(tmp)->len == 1) {
        top = rb_check_array_type(RARRAY(tmp)->ptr[0]);
        if (NIL_P(top)) {
            return RARRAY(tmp)->ptr[0];
        }
        if (RARRAY(top)->len > 1) {
            return v;
        }
        return top;
    }
    return tmp;
}

static VALUE
svalue_to_avalue(VALUE v)
{
    VALUE tmp, top;

    if (v == Qundef) return rb_ary_new2(0);
    tmp = rb_check_array_type(v);
    if (NIL_P(tmp)) {
        return rb_ary_new3(1, v);
    }
    if (RARRAY(tmp)->len == 1) {
        top = rb_check_array_type(RARRAY(tmp)->ptr[0]);
        if (!NIL_P(top) && RARRAY(top)->len > 1) {
            return tmp;
        }
        return rb_ary_new3(1, v);
    }
    return tmp;
}

static VALUE
svalue_to_mrhs(VALUE v, NODE *lhs)
{
    VALUE tmp;

    if (v == Qundef) return rb_values_new2(0, 0);
    tmp = rb_check_array_type(v);
    if (NIL_P(tmp)) {
        return rb_values_new(1, v);
    }
    /* no lhs means splat lhs only */
    if (!lhs) {
        return rb_values_new(1, v);
    }
    return tmp;
}

static VALUE
avalue_splat(VALUE v)
{
    if (RARRAY(v)->len == 0) {
        return Qundef;
    }
    if (RARRAY(v)->len == 1) {
        return RARRAY(v)->ptr[0];
    }
    return v;
}

static VALUE
splat_value(VALUE v)
{
    return rb_values_from_ary(rb_Array(v));
}

static VALUE
class_prefix(VALUE self, NODE *cpath)
{
    if (!cpath) {
        rb_bug("class path missing");
    }
    if (cpath->nd_head) {
        VALUE c = rb_eval(self, cpath->nd_head);
        switch (TYPE(c)) {
          case T_CLASS:
          case T_MODULE:
            break;
          default:
            rb_raise(rb_eTypeError, "%s is not a class/module",
                     RSTRING(rb_obj_as_string(c))->ptr);
        }
        return c;
    }
    else if (nd_type(cpath) == NODE_COLON2) {
        return ruby_cbase;
    }
    else if (ruby_wrapper) {
        return ruby_wrapper;
    }
    else {
        return rb_cObject;
    }
}

#define return_value(v) do {\
  if ((prot_tag->retval = (v)) == Qundef) {\
    prot_tag->retval = Qnil;\
  }\
} while (0)

NORETURN(static void return_jump(VALUE));
NORETURN(static void break_jump(VALUE));
NORETURN(static void unknown_node(NODE * volatile));

static void
unknown_node(NODE *volatile node)
{
    ruby_current_node = 0;
    if (node->flags == 0) {
        rb_bug("terminated node (%p)", node);
    }
    else if (BUILTIN_TYPE(node) != T_NODE) {
        rb_bug("not a node 0x%02lx (%p)", BUILTIN_TYPE(node), node);
    }
    else {
        rb_bug("unknown node type %d (%p)", nd_type(node), node);
    }
}

static VALUE
rb_eval(VALUE self, NODE *n)
{
    NODE * volatile contnode = 0;
    NODE * volatile node = n;
    int state;
    volatile VALUE result = Qnil;

#define RETURN(v) do { \
    result = (v); \
    goto finish; \
} while (0)

  again:
    if (!node) RETURN(Qnil);

    ruby_current_node = node;
    if (node->flags & NODE_NEWLINE) {
        EXEC_EVENT_HOOK(RUBY_EVENT_LINE, node, self,
                        ruby_frame->this_func,
                        ruby_frame->this_class);
    }
    switch (nd_type(node)) {
      case NODE_BLOCK:
        if (contnode) {
            result = rb_eval(self, node);
            break;
        }
        contnode = node->nd_next;
        node = node->nd_head;
        goto again;

      case NODE_POSTEXE:
        rb_f_END();
        nd_set_type(node, NODE_NIL); /* exec just once */
        result = Qnil;
        break;

        /* begin .. end without clauses */
      case NODE_BEGIN:
        node = node->nd_body;
        goto again;

        /* nodes for speed-up(default match) */
      case NODE_MATCH:
        result = rb_reg_match2(node->nd_lit);
        break;

        /* nodes for speed-up(literal match) */
      case NODE_MATCH2:
        {
            VALUE l = rb_eval(self,node->nd_recv);
            VALUE r = rb_eval(self,node->nd_value);
            result = rb_reg_match(l, r);
        }
        break;

        /* nodes for speed-up(literal match) */
      case NODE_MATCH3:
        {
            VALUE r = rb_eval(self,node->nd_recv);
            VALUE l = rb_eval(self,node->nd_value);
            if (TYPE(l) == T_STRING) {
                result = rb_reg_match(r, l);
            }
            else {
                result = rb_funcall(l, match, 1, r);
            }
        }
        break;

        /* node for speed-up(top-level loop for -n/-p) */
      case NODE_OPT_N:
        PUSH_TAG(PROT_LOOP);
        switch (state = EXEC_TAG()) {
          case 0:
          opt_n_next:
            while (!NIL_P(rb_gets())) {
              opt_n_redo:
                rb_eval(self, node->nd_body);
            }
            break;

          case TAG_REDO:
            state = 0;
            goto opt_n_redo;
          case TAG_NEXT:
            state = 0;
            goto opt_n_next;
          case TAG_BREAK:
            state = 0;
          default:
            break;
        }
        POP_TAG();
        if (state) JUMP_TAG(state);
        RETURN(Qnil);

      case NODE_SELF:
        RETURN(self);

      case NODE_NIL:
        RETURN(Qnil);

      case NODE_TRUE:
        RETURN(Qtrue);

      case NODE_FALSE:
        RETURN(Qfalse);

      case NODE_ERRINFO:
        RETURN(ruby_errinfo);

      case NODE_IF:
        EXEC_EVENT_HOOK(RUBY_EVENT_LINE, node, self,
                        ruby_frame->this_func,
                        ruby_frame->this_class);
        if (RTEST(rb_eval(self, node->nd_cond))) {
            node = node->nd_body;
        }
        else {
            node = node->nd_else;
        }
        goto again;

      case NODE_WHEN:
        while (node) {
            NODE *tag;

            if (nd_type(node) != NODE_WHEN) goto again;
            tag = node->nd_head;
            while (tag) {
                EXEC_EVENT_HOOK(RUBY_EVENT_LINE, tag, self,
                                ruby_frame->this_func,
                                ruby_frame->this_class);
                if (tag->nd_head && nd_type(tag->nd_head) == NODE_WHEN) {
                    VALUE v = rb_eval(self, tag->nd_head->nd_head);
                    long i;

                    if (TYPE(v) != T_ARRAY) v = rb_ary_to_ary(v);
                    for (i=0; i<RARRAY(v)->len; i++) {
                        if (RTEST(RARRAY(v)->ptr[i])) {
                            node = node->nd_body;
                            goto again;
                        }
                    }
                    tag = tag->nd_next;
                    continue;
                }
                if (RTEST(rb_eval(self, tag->nd_head))) {
                    node = node->nd_body;
                    goto again;
                }
                tag = tag->nd_next;
            }
            node = node->nd_next;
        }
        RETURN(Qnil);

      case NODE_CASE:
        {
            VALUE val;

            val = rb_eval(self, node->nd_head);
            node = node->nd_body;
            while (node) {
                NODE *tag;

                if (nd_type(node) != NODE_WHEN) {
                    goto again;
                }
                tag = node->nd_head;
                while (tag) {
                    EXEC_EVENT_HOOK(RUBY_EVENT_LINE, tag, self,
                                    ruby_frame->this_func,
                                    ruby_frame->this_class);
                    if (tag->nd_head && nd_type(tag->nd_head) == NODE_WHEN) {
                        VALUE v = rb_eval(self, tag->nd_head->nd_head);
                        long i;

                        if (TYPE(v) != T_ARRAY) v = rb_ary_to_ary(v);
                        for (i=0; i<RARRAY(v)->len; i++) {
                            if (RTEST(rb_funcall2(RARRAY(v)->ptr[i], eqq, 1, &val))){
                                node = node->nd_body;
                                goto again;
                            }
                        }
                        tag = tag->nd_next;
                        continue;
                    }
                    if (RTEST(rb_funcall2(rb_eval(self, tag->nd_head), eqq, 1, &val))) {
                        node = node->nd_body;
                        goto again;
                    }
                    tag = tag->nd_next;
                }
                node = node->nd_next;
            }
        }
        RETURN(Qnil);

      case NODE_WHILE:
        PUSH_TAG(PROT_LOOP);
        result = Qnil;
        switch (state = EXEC_TAG()) {
          case 0:
            if (node->nd_state && !RTEST(rb_eval(self, node->nd_cond)))
                goto while_out;
            do {
              while_redo:
                rb_eval(self, node->nd_body);
              while_next:
                ;
            } while (RTEST(rb_eval(self, node->nd_cond)));
            break;

          case TAG_REDO:
            state = 0;
            goto while_redo;
          case TAG_NEXT:
            state = 0;
            goto while_next;
          case TAG_BREAK:
            if (TAG_DST()) {
                state = 0;
                result = prot_tag->retval;
            }
            /* fall through */
          default:
            break;
        }
      while_out:
        POP_TAG();
        if (state) JUMP_TAG(state);
        RETURN(result);

      case NODE_UNTIL:
        PUSH_TAG(PROT_LOOP);
        result = Qnil;
        switch (state = EXEC_TAG()) {
          case 0:
            if (node->nd_state && RTEST(rb_eval(self, node->nd_cond)))
                goto until_out;
            do {
              until_redo:
                rb_eval(self, node->nd_body);
              until_next:
                ;
            } while (!RTEST(rb_eval(self, node->nd_cond)));
            break;

          case TAG_REDO:
            state = 0;
            goto until_redo;
          case TAG_NEXT:
            state = 0;
            goto until_next;
          case TAG_BREAK:
            if (TAG_DST()) {
                state = 0;
                result = prot_tag->retval;
            }
            /* fall through */
          default:
            break;
        }
      until_out:
        POP_TAG();
        if (state) JUMP_TAG(state);
        RETURN(result);

      case NODE_BLOCK_PASS:
        result = block_pass(self, node);
        break;

      case NODE_LAMBDA:
        PUSH_TAG(PROT_LOOP);
        PUSH_BLOCK(node->nd_var, node->nd_body);

        state = EXEC_TAG();
        PUSH_ITER(ITER_PRE);
        ruby_iter->iter = ruby_frame->iter = ITER_CUR;
        result = proc_lambda();
        POP_ITER();
        POP_BLOCK();
        POP_TAG();
        break;

      case NODE_ITER:
      case NODE_FOR:
        {
            PUSH_TAG(PROT_LOOP);
            PUSH_BLOCK(node->nd_var, node->nd_body);

            state = EXEC_TAG();
            if (state == 0) {
              iter_retry:
                PUSH_ITER(ITER_PRE);
                if (nd_type(node) == NODE_ITER) {
                    result = rb_eval(self, node->nd_iter);
                }
                else if (nd_type(node) == NODE_LAMBDA) {
                    ruby_iter->iter = ruby_frame->iter = ITER_CUR;
                    result = rb_block_proc();
                }
                else {
                    VALUE recv;

                    _block.flags &= ~BLOCK_D_SCOPE;
                    BEGIN_CALLARGS;
                    recv = rb_eval(self, node->nd_iter);
                    END_CALLARGS;
                    ruby_current_node = node;
                    SET_CURRENT_SOURCE();
                    result = rb_call(CLASS_OF(recv),recv,each,0,0,CALLING_NORMAL);
                }
                POP_ITER();
            }
            else if (state == TAG_BREAK && TAG_DST()) {
                result = prot_tag->retval;
                state = 0;
            }
            else if (state == TAG_RETRY && ruby_block == &_block) {
                state = 0;
                goto iter_retry;
            }
            POP_BLOCK();
            POP_TAG();
            switch (state) {
              case 0:
                break;
              default:
                JUMP_TAG(state);
            }
        }
        break;

      case NODE_BREAK:
        break_jump(rb_eval(self, node->nd_stts));
        break;

      case NODE_NEXT:
        CHECK_INTS;
        return_value(rb_eval(self, node->nd_stts));
        JUMP_TAG(TAG_NEXT);
        break;

      case NODE_REDO:
        CHECK_INTS;
        JUMP_TAG(TAG_REDO);
        break;

      case NODE_RETRY:
        CHECK_INTS;
        JUMP_TAG(TAG_RETRY);
        break;

      case NODE_SPLAT:
        result = splat_value(rb_eval(self, node->nd_head));
        break;

      case NODE_TO_ARY:
        result = rb_ary_to_ary(rb_eval(self, node->nd_head));
        break;

      case NODE_SVALUE:
        result = avalue_splat(rb_eval(self, node->nd_head));
        if (result == Qundef) result = Qnil;
        break;

      case NODE_YIELD:
        if (node->nd_head) {
            result = rb_eval(self, node->nd_head);
            ruby_current_node = node;
        }
        else {
            result = Qundef;    /* no arg */
        }
        SET_CURRENT_SOURCE();
        result = rb_yield_0(result, 0, 0, 0, node->nd_state);
        break;

      case NODE_RESCUE:
        {
            volatile VALUE e_info = ruby_errinfo;
            volatile int rescuing = 0;

            PUSH_TAG(PROT_NONE);
            if ((state = EXEC_TAG()) == 0) {
              retry_entry:
                result = rb_eval(self, node->nd_head);
            }
            else if (rescuing) {
                if (rescuing < 0) {
                    /* in rescue argument, just reraise */
                }
                else if (state == TAG_RETRY) {
                    rescuing = state = 0;
                    ruby_errinfo = e_info;
                    goto retry_entry;
                }
                else if (state != TAG_RAISE) {
                    result = prot_tag->retval;
                }
            }
            else if (state == TAG_RAISE) {
                NODE *resq = node->nd_resq;

                rescuing = -1;
                while (resq) {
                    ruby_current_node = resq;
                    if (handle_rescue(self, resq)) {
                        state = 0;
                        rescuing = 1;
                        result = rb_eval(self, resq->nd_body);
                        break;
                    }
                    resq = resq->nd_head; /* next rescue */
                }
            }
            else {
                result = prot_tag->retval;
            }
            POP_TAG();
            if (state != TAG_RAISE) ruby_errinfo = e_info;
            if (state) {
                if (state == TAG_NEXT) prot_tag->retval = result;
                JUMP_TAG(state);
            }
            /* no exception raised */
            if (!rescuing && (node = node->nd_else)) { /* else clause given */
                goto again;
            }
        }
        break;

      case NODE_ENSURE:
        PUSH_TAG(PROT_NONE);
        if ((state = EXEC_TAG()) == 0) {
            result = rb_eval(self, node->nd_head);
        }
        POP_TAG();
        if (node->nd_ensr) {
            VALUE retval = prot_tag->retval; /* save retval */
            VALUE errinfo = ruby_errinfo;

            rb_eval(self, node->nd_ensr);
            return_value(retval);
            ruby_errinfo = errinfo;
        }
        if (state) JUMP_TAG(state);
        break;

      case NODE_AND:
        result = rb_eval(self, node->nd_1st);
        if (!RTEST(result)) break;
        node = node->nd_2nd;
        goto again;

      case NODE_OR:
        result = rb_eval(self, node->nd_1st);
        if (RTEST(result)) break;
        node = node->nd_2nd;
        goto again;

      case NODE_NOT:
        if (RTEST(rb_eval(self, node->nd_body))) result = Qfalse;
        else result = Qtrue;
        break;

      case NODE_DOT2:
      case NODE_DOT3:
        {
            VALUE beg = rb_eval(self, node->nd_beg);
            VALUE end = rb_eval(self, node->nd_end);
            result = rb_range_new(beg, end, nd_type(node) == NODE_DOT3);
        }
        break;

      case NODE_FLIP2:          /* like AWK */
        {
            VALUE *flip = rb_svar(node->nd_cnt);
            if (!flip) rb_bug("unexpected local variable");
            if (!RTEST(*flip)) {
                if (RTEST(rb_eval(self, node->nd_beg))) {
                    *flip = RTEST(rb_eval(self, node->nd_end))?Qfalse:Qtrue;
                    result = Qtrue;
                }
                else {
                    result = Qfalse;
                }
            }
            else {
                if (RTEST(rb_eval(self, node->nd_end))) {
                    *flip = Qfalse;
                }
                result = Qtrue;
            }
        }
        break;

      case NODE_FLIP3:          /* like SED */
        {
            VALUE *flip = rb_svar(node->nd_cnt);
            if (!flip) rb_bug("unexpected local variable");
            if (!RTEST(*flip)) {
                result = RTEST(rb_eval(self, node->nd_beg)) ? Qtrue : Qfalse;
                *flip = result;
            }
            else {
                if (RTEST(rb_eval(self, node->nd_end))) {
                    *flip = Qfalse;
                }
                result = Qtrue;
            }
        }
        break;

      case NODE_RETURN:
        return_jump(rb_eval(self, node->nd_stts));
        break;

      case NODE_ARGSCAT:
        {
            VALUE args = rb_eval(self, node->nd_head);
            result = rb_ary_concat(args, splat_value(rb_eval(self, node->nd_body)));
        }
        break;

      case NODE_ARGSPUSH:
        {
            VALUE args = rb_ary_dup(rb_eval(self, node->nd_head));
            result = rb_ary_push(args, rb_eval(self, node->nd_body));
        }
        break;

      case NODE_ATTRASGN:
        {
            VALUE recv;
            int argc; VALUE *argv; /* used in SETUP_ARGS */
            calling_scope_t scope;
            TMP_PROTECT;

            BEGIN_CALLARGS;
            if (node->nd_recv == (NODE *)1) {
                recv = self;
                scope = CALLING_FCALL;
            }
            else {
                recv = rb_eval(self, node->nd_recv);
                scope = CALLING_NORMAL;
            }
            SETUP_ARGS(node->nd_args);
            END_CALLARGS;

            ruby_current_node = node;
            SET_CURRENT_SOURCE();
            rb_call(CLASS_OF(recv),recv,node->nd_mid,argc,argv,scope);
            result = argv[argc-1];
        }
        break;

      case NODE_CALL:
        {
            VALUE recv;
            int argc; VALUE *argv; /* used in SETUP_ARGS */
            TMP_PROTECT;

            BEGIN_CALLARGS;
            recv = rb_eval(self, node->nd_recv);
            SETUP_ARGS(node->nd_args);
            END_CALLARGS;

            ruby_current_node = node;
            SET_CURRENT_SOURCE();
            result = rb_call(CLASS_OF(recv),recv,node->nd_mid,argc,argv,CALLING_NORMAL);
        }
        break;

      case NODE_FCALL:
        {
            int argc; VALUE *argv; /* used in SETUP_ARGS */
            TMP_PROTECT;

            BEGIN_CALLARGS;
            SETUP_ARGS(node->nd_args);
            END_CALLARGS;

            ruby_current_node = node;
            SET_CURRENT_SOURCE();
            result = rb_call(CLASS_OF(self),self,node->nd_mid,argc,argv,CALLING_FCALL);
        }
        break;

      case NODE_VCALL:
        SET_CURRENT_SOURCE();
        result = rb_call(CLASS_OF(self),self,node->nd_mid,0,0,CALLING_VCALL);
        break;

      case NODE_SUPER:
      case NODE_ZSUPER:
        {
            int argc; VALUE *argv; /* used in SETUP_ARGS */
            TMP_PROTECT;

            if (ruby_frame->this_class == 0) {
                if (ruby_frame->this_func) {
                    rb_name_error(ruby_frame->callee,
                                  "superclass method `%s' disabled",
                                  rb_id2name(ruby_frame->this_func));
                }
                else {
                    rb_raise(rb_eNoMethodError, "super called outside of method");
                }
            }
            if (nd_type(node) == NODE_ZSUPER) {
                argc = ruby_frame->argc;
                if (argc && ruby_frame->prev &&
                    (ruby_frame->prev->flags & FRAME_DMETH)) {
                    if (TYPE(RBASIC(ruby_scope)->klass) != T_ARRAY ||
                        RARRAY(RBASIC(ruby_scope)->klass)->len != argc) {
                        rb_raise(rb_eRuntimeError,
                                 "super: specify arguments explicitly");
                    }
                    argv = RARRAY(RBASIC(ruby_scope)->klass)->ptr;
                }
                else {
                    argv = ruby_scope->local_vars + 2;
                }
            }
            else {
                BEGIN_CALLARGS;
                SETUP_ARGS(node->nd_args);
                END_CALLARGS;
                ruby_current_node = node;
            }

            SET_CURRENT_SOURCE();
            result = rb_call_super(argc, argv);
        }
        break;

      case NODE_SCOPE:
        {
            struct FRAME frame;
            NODE *saved_cref = 0;

            frame = *ruby_frame;
            frame.tmp = ruby_frame;
            ruby_frame = &frame;

            PUSH_SCOPE();
            PUSH_TAG(PROT_NONE);
            if (node->nd_rval) {
                saved_cref = ruby_cref;
                ruby_cref = (NODE*)node->nd_rval;
            }
            if (node->nd_tbl) {
                VALUE *vars = ALLOCA_N(VALUE, node->nd_tbl[0]+1);
                *vars++ = (VALUE)node;
                ruby_scope->local_vars = vars;
                rb_mem_clear(ruby_scope->local_vars, node->nd_tbl[0]);
                ruby_scope->local_tbl = node->nd_tbl;
            }
            else {
                ruby_scope->local_vars = 0;
                ruby_scope->local_tbl  = 0;
            }
            if ((state = EXEC_TAG()) == 0) {
                result = rb_eval(self, node->nd_next);
            }
            POP_TAG();
            POP_SCOPE();
            ruby_frame = frame.tmp;
            if (saved_cref)
                ruby_cref = saved_cref;
            if (state) JUMP_TAG(state);
        }
        break;

      case NODE_OP_ASGN1:
        {
            int argc; VALUE *argv; /* used in SETUP_ARGS */
            VALUE recv, val;
            NODE *rval;
            TMP_PROTECT;

            recv = rb_eval(self, node->nd_recv);
            rval = node->nd_args->nd_head;
            SETUP_ARGS0(node->nd_args->nd_next, node->nd_args->nd_alen - 1);
            val = rb_funcall2(recv, aref, argc-1, argv);
            switch (node->nd_mid) {
            case 0: /* OR */
                if (RTEST(val)) RETURN(val);
                val = rb_eval(self, rval);
                break;
            case 1: /* AND */
                if (!RTEST(val)) RETURN(val);
                val = rb_eval(self, rval);
                break;
            default:
                val = rb_funcall(val, node->nd_mid, 1, rb_eval(self, rval));
            }
            argv[argc-1] = val;
            rb_funcall2(recv, aset, argc, argv);
            result = val;
        }
        break;

      case NODE_OP_ASGN2:
        {
            ID id = node->nd_next->nd_vid;
            VALUE recv, val;

            recv = rb_eval(self, node->nd_recv);
            val = rb_funcall(recv, id, 0);
            switch (node->nd_next->nd_mid) {
            case 0: /* OR */
                if (RTEST(val)) RETURN(val);
                val = rb_eval(self, node->nd_value);
                break;
            case 1: /* AND */
                if (!RTEST(val)) RETURN(val);
                val = rb_eval(self, node->nd_value);
                break;
            default:
                val = rb_funcall(val, node->nd_next->nd_mid, 1,
                                 rb_eval(self, node->nd_value));
            }

            rb_funcall2(recv, node->nd_next->nd_aid, 1, &val);
            result = val;
        }
        break;

      case NODE_OP_ASGN_AND:
        result = rb_eval(self, node->nd_head);
        if (!RTEST(result)) break;
        node = node->nd_value;
        goto again;

      case NODE_OP_ASGN_OR:
        if ((node->nd_aid && !is_defined(self, node->nd_head, 0, 0)) ||
            !RTEST(result = rb_eval(self, node->nd_head))) {
            node = node->nd_value;
            goto again;
        }
        break;

      case NODE_MASGN:
        result = massign(self, node, rb_eval(self, node->nd_value), 0);
        break;

      case NODE_LASGN:
        if (ruby_scope->local_vars == 0)
            rb_bug("unexpected local variable assignment");
        result = rb_eval(self, node->nd_value);
        ruby_scope->local_vars[node->nd_cnt] = result;
        break;

      case NODE_DASGN:
        result = rb_eval(self, node->nd_value);
        dvar_asgn(node->nd_vid, result);
        break;

      case NODE_DASGN_CURR:
        result = rb_eval(self, node->nd_value);
        dvar_asgn_curr(node->nd_vid, result);
        break;

      case NODE_GASGN:
        result = rb_eval(self, node->nd_value);
        rb_gvar_set(node->nd_entry, result);
        break;

      case NODE_IASGN:
        result = rb_eval(self, node->nd_value);
        rb_ivar_set(self, node->nd_vid, result);
        break;

      case NODE_CDECL:
        result = rb_eval(self, node->nd_value);
        if (node->nd_vid == 0) {
            rb_const_set(class_prefix(self, node->nd_else), node->nd_else->nd_mid, result);
        }
        else {
            if (NIL_P(ruby_cbase)) {
                rb_raise(rb_eTypeError, "no class/module to define constant");
            }
            rb_const_set(ruby_cbase, node->nd_vid, result);
        }
        break;

      case NODE_CVDECL:
        if (NIL_P(ruby_cbase)) {
            rb_raise(rb_eTypeError, "no class/module to define class variable");
        }
        result = rb_eval(self, node->nd_value);
        rb_cvar_set(cvar_cbase(), node->nd_vid, result, Qtrue);
        break;

      case NODE_CVASGN:
        result = rb_eval(self, node->nd_value);
        rb_cvar_set(cvar_cbase(), node->nd_vid, result, Qfalse);
        break;

      case NODE_LVAR:
        if (ruby_scope->local_vars == 0) {
            rb_bug("unexpected local variable");
        }
        result = ruby_scope->local_vars[node->nd_cnt];
        break;

      case NODE_DVAR:
        result = rb_dvar_ref(node->nd_vid);
        break;

      case NODE_GVAR:
        result = rb_gvar_get(node->nd_entry);
        break;

      case NODE_IVAR:
        result = rb_ivar_get(self, node->nd_vid);
        break;

      case NODE_CONST:
        result = ev_const_get(ruby_cref, node->nd_vid, self);
        break;

      case NODE_CVAR:
        result = rb_cvar_get(cvar_cbase(), node->nd_vid);
        break;

      case NODE_BLOCK_ARG:
        if (ruby_scope->local_vars == 0)
            rb_bug("unexpected block argument");
        if (rb_block_given_p()) {
            result = rb_block_proc();
            ruby_scope->local_vars[node->nd_cnt] = result;
        }
        else {
            result = Qnil;
        }
        break;

      case NODE_COLON2:
        {
            VALUE klass;

            klass = rb_eval(self, node->nd_head);
            if (rb_is_const_id(node->nd_mid)) {
                switch (TYPE(klass)) {
                  case T_CLASS:
                  case T_MODULE:
                    result = rb_const_get_from(klass, node->nd_mid);
                    break;
                  default:
                    rb_raise(rb_eTypeError, "%s is not a class/module",
                             RSTRING(rb_obj_as_string(klass))->ptr);
                    break;
                }
            }
            else {
                result = rb_funcall(klass, node->nd_mid, 0, 0);
            }
        }
        break;

      case NODE_COLON3:
        result = rb_const_get_from(rb_cObject, node->nd_mid);
        break;

      case NODE_NTH_REF:
        result = rb_reg_nth_match(node->nd_nth, MATCH_DATA);
        break;

      case NODE_BACK_REF:
        switch (node->nd_nth) {
          case '&':
            result = rb_reg_last_match(MATCH_DATA);
            break;
          case '`':
            result = rb_reg_match_pre(MATCH_DATA);
            break;
          case '\'':
            result = rb_reg_match_post(MATCH_DATA);
            break;
          case '+':
            result = rb_reg_match_last(MATCH_DATA);
            break;
          default:
            rb_bug("unexpected back-ref");
        }
        break;

      case NODE_HASH:
        {
            NODE *list;
            VALUE hash = rb_hash_new();
            VALUE key, val;

            list = node->nd_head;
            while (list) {
                key = rb_eval(self, list->nd_head);
                list = list->nd_next;
                if (list == 0)
                    rb_bug("odd number list for Hash");
                val = rb_eval(self, list->nd_head);
                list = list->nd_next;
                rb_hash_aset(hash, key, val);
            }
            result = hash;
        }
        break;

      case NODE_ZARRAY:         /* zero length list */
        result = rb_ary_new();
        break;

      case NODE_ARRAY:
        {
            VALUE ary;
            long i;

            i = node->nd_alen;
            ary = rb_ary_new2(i);
            for (i=0;node;node=node->nd_next) {
                RARRAY(ary)->ptr[i++] = rb_eval(self, node->nd_head);
                RARRAY(ary)->len = i;
            }

            result = ary;
        }
        break;

      case NODE_VALUES:
        {
            VALUE val;
            long i;

            i = node->nd_alen;
            val = rb_values_new2(i, 0);
            for (i=0;node;node=node->nd_next) {
                RARRAY(val)->ptr[i++] = rb_eval(self, node->nd_head);
                RARRAY(val)->len = i;
            }

            result = val;
        }
        break;

      case NODE_STR:
        result = rb_str_new3(node->nd_lit);
        break;

      case NODE_EVSTR:
        result = rb_obj_as_string(rb_eval(self, node->nd_body));
        break;

      case NODE_DSTR:
      case NODE_DXSTR:
      case NODE_DREGX:
      case NODE_DREGX_ONCE:
      case NODE_DSYM:
        {
            VALUE str, str2;
            NODE *list = node->nd_next;

            str = rb_str_new3(node->nd_lit);
            while (list) {
                if (list->nd_head) {
                    switch (nd_type(list->nd_head)) {
                      case NODE_STR:
                        str2 = list->nd_head->nd_lit;
                        break;
                      default:
                        str2 = rb_eval(self, list->nd_head);
                        break;
                    }
                    rb_str_append(str, str2);
                    OBJ_INFECT(str, str2);
                }
                list = list->nd_next;
            }
            switch (nd_type(node)) {
              case NODE_DREGX:
                result = rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len,
                                    node->nd_cflag);
                break;
              case NODE_DREGX_ONCE:     /* regexp expand once */
                result = rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len,
                                    node->nd_cflag);
                nd_set_type(node, NODE_LIT);
                node->nd_lit = result;
                break;
              case NODE_LIT:
                /* other thread may replace NODE_DREGX_ONCE to NODE_LIT */
                goto again;
              case NODE_DXSTR:
                result = rb_funcall(self, '`', 1, str);
                break;
              case NODE_DSYM:
                result = rb_str_intern(str);
                break;
              default:
                result = str;
                break;
            }
        }
        break;

      case NODE_XSTR:
        result = rb_funcall(self, '`', 1, rb_str_new3(node->nd_lit));
        break;

      case NODE_LIT:
        result = node->nd_lit;
        break;

      case NODE_DEFN:
        if (node->nd_defn) {
            NODE *body,  *defn;
            VALUE origin;
            int noex;

            if (NIL_P(ruby_class)) {
                rb_raise(rb_eTypeError, "no class/module to add method");
            }
            if (ruby_class == rb_cObject && node->nd_mid == init) {
                rb_warn("redefining Object#initialize may cause infinite loop");
            }
            if (node->nd_mid == __id__ || node->nd_mid == __send__) {
                rb_warn("redefining `%s' may cause serious problem",
                        rb_id2name(node->nd_mid));
            }
            rb_frozen_class_p(ruby_class);
            body = search_method(ruby_class, node->nd_mid, &origin);
            if (body){
                if (RTEST(ruby_verbose) && ruby_class == origin && body->nd_cnt == 0 && body->nd_body) {
                    rb_warning("method redefined; discarding old %s", rb_id2name(node->nd_mid));
                }
            }

            if (SCOPE_TEST(SCOPE_PRIVATE) || node->nd_mid == init) {
                noex = NOEX_PRIVATE;
            }
            else if (SCOPE_TEST(SCOPE_PROTECTED)) {
                noex = NOEX_PROTECTED;
            }
            else {
                noex = NOEX_PUBLIC;
            }
            if (body && origin == ruby_class && body->nd_body == 0) {
                noex |= NOEX_NOSUPER;
            }

            defn = copy_node_scope(node->nd_defn, ruby_cref);
            rb_add_method(ruby_class, node->nd_mid, defn, noex);
            if (scope_vmode == SCOPE_MODFUNC) {
                rb_add_method(rb_singleton_class(ruby_class),
                              node->nd_mid, defn, NOEX_PUBLIC);
            }
            result = Qnil;
        }
        break;

      case NODE_DEFS:
        if (node->nd_defn) {
            VALUE recv = rb_eval(self, node->nd_recv);
            VALUE klass;
            NODE *body = 0, *defn;

            if (ruby_safe_level >= 4 && !OBJ_TAINTED(recv)) {
                rb_raise(rb_eSecurityError, "Insecure: can't define singleton method");
            }
            if (FIXNUM_P(recv) || SYMBOL_P(recv)) {
                rb_raise(rb_eTypeError,
                         "can't define singleton method \"%s\" for %s",
                         rb_id2name(node->nd_mid),
                         rb_obj_classname(recv));
            }

            if (OBJ_FROZEN(recv)) rb_error_frozen("object");
            klass = rb_singleton_class(recv);
            if (st_lookup(RCLASS(klass)->m_tbl, node->nd_mid, (st_data_t *)&body)) {
                if (ruby_safe_level >= 4) {
                    rb_raise(rb_eSecurityError, "redefining method prohibited");
                }
                if (RTEST(ruby_verbose)) {
                    rb_warning("redefine %s", rb_id2name(node->nd_mid));
                }
            }
            defn = copy_node_scope(node->nd_defn, ruby_cref);
            rb_add_method(klass, node->nd_mid, defn,
                          NOEX_PUBLIC|(body?body->nd_noex&NOEX_UNDEF:0));
            result = Qnil;
        }
        break;

      case NODE_UNDEF:
        if (NIL_P(ruby_class)) {
            rb_raise(rb_eTypeError, "no class to undef method");
        }
        rb_undef(ruby_class, rb_to_id(rb_eval(self, node->u2.node)));
        result = Qnil;
        break;

      case NODE_ALIAS:
        if (NIL_P(ruby_class)) {
            rb_raise(rb_eTypeError, "no class to make alias");
        }
        rb_alias(ruby_class, rb_to_id(rb_eval(self, node->u1.node)),
                             rb_to_id(rb_eval(self, node->u2.node)));
        result = Qnil;
        break;

      case NODE_VALIAS:
        rb_alias_variable(node->u1.id, node->u2.id);
        result = Qnil;
        break;

      case NODE_CLASS:
        {
            VALUE super, klass, tmp, cbase;
            ID cname;
            int gen = Qfalse;

            cbase = class_prefix(self, node->nd_cpath);
            cname = node->nd_cpath->nd_mid;

            if (NIL_P(ruby_cbase)) {
                rb_raise(rb_eTypeError, "no outer class/module");
            }
            if (node->nd_super) {
               super = rb_eval(self, node->nd_super);
               rb_check_inheritable(super);
            }
            else {
                super = 0;
            }

            if (rb_const_defined_at(cbase, cname)) {
                klass = rb_const_get_at(cbase, cname);
                if (TYPE(klass) != T_CLASS) {
                    rb_raise(rb_eTypeError, "%s is not a class",
                             rb_id2name(cname));
                }
                if (super) {
                    tmp = rb_class_real(RCLASS(klass)->super);
                    if (tmp != super) {
                        rb_raise(rb_eTypeError, "superclass mismatch for class %s",
                                 rb_id2name(cname));
                    }
                    super = 0;
                }
                if (ruby_safe_level >= 4) {
                    rb_raise(rb_eSecurityError, "extending class prohibited");
                }
            }
            else {
                if (!super) super = rb_cObject;
                klass = rb_define_class_id(cname, super);
                rb_set_class_path(klass, cbase, rb_id2name(cname));
                rb_const_set(cbase, cname, klass);
                gen = Qtrue;
            }
            if (ruby_wrapper) {
                rb_extend_object(klass, ruby_wrapper);
                rb_include_module(klass, ruby_wrapper);
            }
            if (super && gen) {
                rb_class_inherited(super, klass);
            }
            result = module_setup(klass, node);
        }
        break;

      case NODE_MODULE:
        {
            VALUE module, cbase;
            ID cname;

            if (NIL_P(ruby_cbase)) {
                rb_raise(rb_eTypeError, "no outer class/module");
            }
            cbase = class_prefix(self, node->nd_cpath);
            cname = node->nd_cpath->nd_mid;
            if (rb_const_defined_at(cbase, cname)) {
                module = rb_const_get_at(cbase, cname);
                if (TYPE(module) != T_MODULE) {
                    rb_raise(rb_eTypeError, "%s is not a module",
                             rb_id2name(cname));
                }
                if (ruby_safe_level >= 4) {
                    rb_raise(rb_eSecurityError, "extending module prohibited");
                }
            }
            else {
                module = rb_define_module_id(cname);
                rb_set_class_path(module, cbase, rb_id2name(cname));
                rb_const_set(cbase, cname, module);
            }
            if (ruby_wrapper) {
                rb_extend_object(module, ruby_wrapper);
                rb_include_module(module, ruby_wrapper);
            }

            result = module_setup(module, node);
        }
        break;

      case NODE_SCLASS:
        {
            VALUE klass;

            result = rb_eval(self, node->nd_recv);
            if (FIXNUM_P(result) || SYMBOL_P(result)) {
                rb_raise(rb_eTypeError, "no singleton class for %s",
                         rb_obj_classname(result));
            }
            if (ruby_safe_level >= 4 && !OBJ_TAINTED(result))
                rb_raise(rb_eSecurityError, "Insecure: can't extend object");
            klass = rb_singleton_class(result);

            if (ruby_wrapper) {
                rb_extend_object(klass, ruby_wrapper);
                rb_include_module(klass, ruby_wrapper);
            }

            result = module_setup(klass, node);
        }
        break;

      case NODE_DEFINED:
        {
            char buf[20];
            const char *desc = is_defined(self, node->nd_head, buf, 0);

            if (desc) result = rb_str_new2(desc);
            else result = Qnil;
        }
        break;

      default:
        unknown_node(node);
    }
  finish:
    CHECK_INTS;
    if (contnode) {
        node = contnode;
        contnode = 0;
        goto again;
    }
    return result;
}

static VALUE
module_setup(VALUE module, NODE *n)
{
    NODE * volatile node = n->nd_body;
    int state;
    struct FRAME frame;
    VALUE result = Qnil;        /* OK */
    TMP_PROTECT;

    frame = *ruby_frame;
    frame.tmp = ruby_frame;
    ruby_frame = &frame;

    PUSH_CLASS(module);
    PUSH_SCOPE();
    PUSH_VARS();

    if (node->nd_tbl) {
        VALUE *vars = TMP_ALLOC(node->nd_tbl[0]+1);
        *vars++ = (VALUE)node;
        ruby_scope->local_vars = vars;
        rb_mem_clear(ruby_scope->local_vars, node->nd_tbl[0]);
        ruby_scope->local_tbl = node->nd_tbl;
    }
    else {
        ruby_scope->local_vars = 0;
        ruby_scope->local_tbl  = 0;
    }

    PUSH_CREF(module);
    PUSH_TAG(PROT_NONE);
    if ((state = EXEC_TAG()) == 0) {
        EXEC_EVENT_HOOK(RUBY_EVENT_CLASS, n, ruby_cbase,
                        ruby_frame->this_func, ruby_frame->this_class);
        result = rb_eval(ruby_cbase, node->nd_next);
    }
    POP_TAG();
    POP_CREF();
    POP_VARS();
    POP_SCOPE();
    POP_CLASS();

    ruby_frame = frame.tmp;
    EXEC_EVENT_HOOK(RUBY_EVENT_END, n, 0, ruby_frame->this_func,
                    ruby_frame->this_class);
    if (state) JUMP_TAG(state);

    return result;
}

static NODE *basic_respond_to = 0;

int
rb_obj_respond_to(VALUE obj, ID id, int priv)
{
    VALUE klass = CLASS_OF(obj);

    if (rb_method_node(klass, respond_to) == basic_respond_to) {
        return rb_method_boundp(klass, id, !priv);
    }
    else {
        VALUE args[2];
        int n = 0;
        args[n++] = ID2SYM(id);
        if (priv) args[n++] = Qtrue;
        return rb_funcall2(obj, respond_to, n, args);
    }
}

int
rb_respond_to(VALUE obj, ID id)
{
    return rb_obj_respond_to(obj, id, Qfalse);
}

/*
 *  call-seq:
 *     obj.respond_to?(symbol, include_private=false) => true or false
 *
 *  Returns +true+> if _obj_ responds to the given
 *  method. Private methods are included in the search only if the
 *  optional second parameter evaluates to +true+.
 */

static VALUE
obj_respond_to(int argc, VALUE *argv, VALUE obj)
{
    VALUE mid, priv;
    ID id;

    rb_scan_args(argc, argv, "11", &mid, &priv);
    id = rb_to_id(mid);
    if (rb_method_boundp(CLASS_OF(obj), id, !RTEST(priv))) {
        return Qtrue;
    }
    return Qfalse;
}

/*
 *  call-seq:
 *     mod.method_defined?(symbol)    => true or false
 *
 *  Returns +true+ if the named method is defined by
 *  _mod_ (or its included modules and, if _mod_ is a class,
 *  its ancestors). Public and protected methods are matched.
 *
 *     module A
 *       def method1()  end
 *     end
 *     class B
 *       def method2()  end
 *     end
 *     class C < B
 *       include A
 *       def method3()  end
 *     end
 *
 *     A.method_defined? :method1    #=> true
 *     C.method_defined? "method1"   #=> true
 *     C.method_defined? "method2"   #=> true
 *     C.method_defined? "method3"   #=> true
 *     C.method_defined? "method4"   #=> false
 */

static VALUE
rb_mod_method_defined(VALUE mod, VALUE mid)
{
    return rb_method_boundp(mod, rb_to_id(mid), 1);
}

#define VISI_CHECK(x,f) (((x)&NOEX_MASK) == (f))

/*
 *  call-seq:
 *     mod.public_method_defined?(symbol)   => true or false
 *
 *  Returns +true+ if the named public method is defined by
 *  _mod_ (or its included modules and, if _mod_ is a class,
 *  its ancestors).
 *
 *     module A
 *       def method1()  end
 *     end
 *     class B
 *       protected
 *       def method2()  end
 *     end
 *     class C < B
 *       include A
 *       def method3()  end
 *     end
 *
 *     A.method_defined? :method1           #=> true
 *     C.public_method_defined? "method1"   #=> true
 *     C.public_method_defined? "method2"   #=> false
 *     C.method_defined? "method2"          #=> true
 */

static VALUE
rb_mod_public_method_defined(VALUE mod, VALUE mid)
{
    ID id = rb_to_id(mid);
    int noex;

    if (rb_get_method_body(&mod, &id, &noex)) {
        if (VISI_CHECK(noex, NOEX_PUBLIC))
            return Qtrue;
    }
    return Qfalse;
}

/*
 *  call-seq:
 *     mod.private_method_defined?(symbol)    => true or false
 *
 *  Returns +true+ if the named private method is defined by
 *  _ mod_ (or its included modules and, if _mod_ is a class,
 *  its ancestors).
 *
 *     module A
 *       def method1()  end
 *     end
 *     class B
 *       private
 *       def method2()  end
 *     end
 *     class C < B
 *       include A
 *       def method3()  end
 *     end
 *
 *     A.method_defined? :method1            #=> true
 *     C.private_method_defined? "method1"   #=> false
 *     C.private_method_defined? "method2"   #=> true
 *     C.method_defined? "method2"           #=> false
 */

static VALUE
rb_mod_private_method_defined(VALUE mod, VALUE mid)
{
    ID id = rb_to_id(mid);
    int noex;

    if (rb_get_method_body(&mod, &id, &noex)) {
        if (VISI_CHECK(noex, NOEX_PRIVATE))
            return Qtrue;
    }
    return Qfalse;
}

/*
 *  call-seq:
 *     mod.protected_method_defined?(symbol)   => true or false
 *
 *  Returns +true+ if the named protected method is defined
 *  by _mod_ (or its included modules and, if _mod_ is a
 *  class, its ancestors).
 *
 *     module A
 *       def method1()  end
 *     end
 *     class B
 *       protected
 *       def method2()  end
 *     end
 *     class C < B
 *       include A
 *       def method3()  end
 *     end
 *
 *     A.method_defined? :method1              #=> true
 *     C.protected_method_defined? "method1"   #=> false
 *     C.protected_method_defined? "method2"   #=> true
 *     C.method_defined? "method2"             #=> true
 */

static VALUE
rb_mod_protected_method_defined(VALUE mod, VALUE mid)
{
    ID id = rb_to_id(mid);
    int noex;

    if (rb_get_method_body(&mod, &id, &noex)) {
        if (VISI_CHECK(noex, NOEX_PROTECTED))
            return Qtrue;
    }
    return Qfalse;
}

NORETURN(static VALUE terminate_process(int, VALUE));
static VALUE
terminate_process(int status, VALUE mesg)
{
    VALUE args[2];
    args[0] = INT2NUM(status);
    args[1] = mesg;

    rb_exc_raise(rb_class_new_instance(2, args, rb_eSystemExit));
}

void
rb_exit(int status)
{
    if (prot_tag) {
        terminate_process(status, rb_str_new("exit", 4));
    }
    ruby_finalize();
    exit(status);
}

/*
 *  call-seq:
 *     exit(integer=0)
 *     Kernel::exit(integer=0)
 *     Process::exit(integer=0)
 *
 *  Initiates the termination of the Ruby script by raising the
 *  <code>SystemExit</code> exception. This exception may be caught. The
 *  optional parameter is used to return a status code to the invoking
 *  environment.
 *
 *     begin
 *       exit
 *       puts "never get here"
 *     rescue SystemExit
 *       puts "rescued a SystemExit exception"
 *     end
 *     puts "after begin block"
 *
 *  <em>produces:</em>
 *
 *     rescued a SystemExit exception
 *     after begin block
 *
 *  Just prior to termination, Ruby executes any <code>at_exit</code> functions
 *  (see Kernel::at_exit) and runs any object finalizers (see
 *  ObjectSpace::define_finalizer).
 *
 *     at_exit { puts "at_exit function" }
 *     ObjectSpace.define_finalizer("string",  proc { puts "in finalizer" })
 *     exit
 *
 *  <em>produces:</em>
 *
 *     at_exit function
 *     in finalizer
 */

VALUE
rb_f_exit(int argc, VALUE *argv)
{
    VALUE status;
    int istatus;

    rb_secure(4);
    if (rb_scan_args(argc, argv, "01", &status) == 1) {
        switch (status) {
          case Qtrue:
            istatus = EXIT_SUCCESS;
            break;
          case Qfalse:
            istatus = EXIT_FAILURE;
            break;
          default:
            istatus = NUM2INT(status);
#if EXIT_SUCCESS != 0
            if (istatus == 0) istatus = EXIT_SUCCESS;
#endif
            break;
        }
    }
    else {
        istatus = EXIT_SUCCESS;
    }
    rb_exit(istatus);
    return Qnil;                /* not reached */
}

/*
 *  call-seq:
 *     abort
 *     Kernel::abort
 *     Process::abort
 *
 *  Terminate execution immediately, effectively by calling
 *  <code>Kernel.exit(1)</code>. If _msg_ is given, it is written
 *  to STDERR prior to terminating.
 */

VALUE
rb_f_abort(int argc, VALUE *argv)
{
    rb_secure(4);
    if (argc == 0) {
        if (!NIL_P(ruby_errinfo)) {
            error_print();
        }
        rb_exit(EXIT_FAILURE);
    }
    else {
        VALUE mesg;

        rb_scan_args(argc, argv, "1", &mesg);
        StringValue(mesg);
        rb_io_puts(1, &mesg, rb_stderr);
        terminate_process(EXIT_FAILURE, mesg);
    }
    return Qnil;                /* not reached */
}

void
rb_iter_break(void)
{
    break_jump(Qnil);
}

NORETURN(static void rb_longjmp(int, VALUE));
static VALUE make_backtrace(void);

static void
rb_longjmp(int tag, VALUE mesg)
{
    VALUE at;

    if (thread_set_raised()) {
        ruby_errinfo = exception_error;
        JUMP_TAG(TAG_FATAL);
    }
    if (NIL_P(mesg)) mesg = ruby_errinfo;
    if (NIL_P(mesg)) {
        mesg = rb_exc_new(rb_eRuntimeError, 0, 0);
    }

    ruby_set_current_source();
    if (ruby_sourcefile && !NIL_P(mesg)) {
        at = get_backtrace(mesg);
        if (NIL_P(at)) {
            at = make_backtrace();
            set_backtrace(mesg, at);
        }
    }
    if (!NIL_P(mesg)) {
        ruby_errinfo = mesg;
    }

    if (RTEST(ruby_debug) && !NIL_P(ruby_errinfo)
        && !rb_obj_is_kind_of(ruby_errinfo, rb_eSystemExit)) {
        VALUE e = ruby_errinfo;
        int status;

        PUSH_TAG(PROT_NONE);
        if ((status = EXEC_TAG()) == 0) {
            e = rb_obj_as_string(e);
            warn_printf("Exception `%s' at %s:%d - %s\n",
                        rb_obj_classname(ruby_errinfo),
                        ruby_sourcefile, ruby_sourceline,
                        RSTRING(e)->ptr);
        }
        POP_TAG();
        if (status == TAG_FATAL && ruby_errinfo == exception_error) {
            ruby_errinfo = mesg;
        }
        else if (status) {
            thread_reset_raised();
            JUMP_TAG(status);
        }
    }

    rb_trap_restore_mask();
    if (tag != TAG_FATAL) {
        EXEC_EVENT_HOOK(RUBY_EVENT_RAISE, ruby_current_node,
                        ruby_frame->self,
                        ruby_frame->this_func,
                        ruby_frame->this_class);
    }
    if (!prot_tag) {
        error_print();
    }
    thread_reset_raised();
    JUMP_TAG(tag);
}

void
rb_exc_raise(VALUE mesg)
{
    rb_longjmp(TAG_RAISE, mesg);
}

void
rb_exc_fatal(VALUE mesg)
{
    rb_longjmp(TAG_FATAL, mesg);
}

void
rb_interrupt(void)
{
    rb_raise(rb_eInterrupt, "");
}

/*
 *  call-seq:
 *     raise
 *     raise(string)
 *     raise(exception [, string [, array]])
 *     fail
 *     fail(string)
 *     fail(exception [, string [, array]])
 *
 *  With no arguments, raises the exception in <code>$!</code> or raises
 *  a <code>RuntimeError</code> if <code>$!</code> is +nil+.
 *  With a single +String+ argument, raises a
 *  +RuntimeError+ with the string as a message. Otherwise,
 *  the first parameter should be the name of an +Exception+
 *  class (or an object that returns an +Exception+ object when sent
 *  an +exception+ message). The optional second parameter sets the
 *  message associated with the exception, and the third parameter is an
 *  array of callback information. Exceptions are caught by the
 *  +rescue+ clause of <code>begin...end</code> blocks.
 *
 *     raise "Failed to create socket"
 *     raise ArgumentError, "No parameters", caller
 */

static VALUE
rb_f_raise(int argc, VALUE *argv)
{
    rb_raise_jump(rb_make_exception(argc, argv));
    return Qnil;                /* not reached */
}

static VALUE
rb_make_exception(int argc, VALUE *argv)
{
    VALUE mesg;
    ID exception;
    int n;

    mesg = Qnil;
    switch (argc) {
      case 0:
        mesg = Qnil;
        break;
      case 1:
        if (NIL_P(argv[0])) break;
        if (TYPE(argv[0]) == T_STRING) {
            mesg = rb_exc_new3(rb_eRuntimeError, argv[0]);
            break;
        }
        n = 0;
        goto exception_call;

      case 2:
      case 3:
        n = 1;
      exception_call:
        exception = rb_intern("exception");
        if (!rb_respond_to(argv[0], exception)) {
            rb_raise(rb_eTypeError, "exception class/object expected");
        }
        mesg = rb_funcall(argv[0], exception, n, argv[1]);
        break;
      default:
        rb_raise(rb_eArgError, "wrong number of arguments");
        break;
    }
    if (argc > 0) {
        if (!rb_obj_is_kind_of(mesg, rb_eException))
            rb_raise(rb_eTypeError, "exception object expected");
        if (argc>2)
            set_backtrace(mesg, argv[2]);
    }

    return mesg;
}

static void
rb_raise_jump(VALUE mesg)
{
    if (ruby_frame != top_frame) {
        PUSH_FRAME();           /* fake frame */
        *ruby_frame = *_frame.prev->prev;
        rb_longjmp(TAG_RAISE, mesg);
        POP_FRAME();
    }
    rb_longjmp(TAG_RAISE, mesg);
}

void
rb_jump_tag(int tag)
{
    JUMP_TAG(tag);
}

int
rb_block_given_p(void)
{
    if (ruby_frame->iter == ITER_CUR && ruby_block)
        return Qtrue;
    return Qfalse;
}

int
rb_iterator_p(void)
{
    return rb_block_given_p();
}

/*
 *  call-seq:
 *     block_given?   => true or false
 *     iterator?      => true or false
 *
 *  Returns <code>true</code> if <code>yield</code> would execute a
 *  block in the current context. The <code>iterator?</code> form
 *  is mildly deprecated.
 *
 *     def try
 *       if block_given?
 *         yield
 *       else
 *         "no block"
 *       end
 *     end
 *     try                  #=> "no block"
 *     try { "hello" }      #=> "hello"
 *     try do "hello" end   #=> "hello"
 */

static VALUE
rb_f_block_given_p(void)
{
    if (ruby_frame->prev && ruby_frame->prev->iter == ITER_CUR && ruby_block)
        return Qtrue;
    return Qfalse;
}

static VALUE rb_eThreadError;

NORETURN(static void proc_jump_error(int, VALUE));
static void
proc_jump_error(int state, VALUE result)
{
    char mesg[32];
    char *statement;

    switch (state) {
      case TAG_BREAK:
        statement = "break"; break;
      case TAG_RETURN:
        statement = "return"; break;
      case TAG_RETRY:
        statement = "retry"; break;
      default:
        statement = "local-jump"; break; /* should not happen */
    }
    snprintf(mesg, sizeof mesg, "%s from proc-closure", statement);
    localjump_error(mesg, result, state);
}

NORETURN(static void return_jump(VALUE));
static void
return_jump(VALUE retval)
{
    struct tag *tt = prot_tag;
    int yield = Qfalse;

    if (retval == Qundef) retval = Qnil;
    while (tt) {
        if (tt->tag == PROT_YIELD) {
            yield = Qtrue;
            tt = tt->prev;
        }
        if ((tt->tag == PROT_FUNC && tt->frame->uniq == ruby_frame->uniq) ||
            (tt->tag == PROT_LAMBDA && !yield))
        {
            tt->dst = (VALUE)tt->frame->uniq;
            tt->retval = retval;
            JUMP_TAG(TAG_RETURN);
        }
        if (tt->tag == PROT_THREAD && tt->prev) {
            rb_raise(rb_eThreadError, "return can't jump across threads");
        }
        tt = tt->prev;
    }
    localjump_error("unexpected return", retval, TAG_RETURN);
}

static void
break_jump(VALUE retval)
{
    struct tag *tt = prot_tag;

    if (retval == Qundef) retval = Qnil;
    while (tt) {
        switch (tt->tag) {
          case PROT_THREAD:
          case PROT_YIELD:
          case PROT_LOOP:
          case PROT_LAMBDA:
            tt->dst = (VALUE)tt->frame->uniq;
            tt->retval = retval;
            JUMP_TAG(TAG_BREAK);
            break;
          case PROT_FUNC:
            tt = 0;
            continue;
          default:
            break;
        }
        tt = tt->prev;
    }
    localjump_error("unexpected break", retval, TAG_BREAK);
}

static VALUE bmcall(VALUE, VALUE);
static int method_arity(VALUE);

void
rb_need_block(void)
{
    if (!rb_block_given_p()) {
        localjump_error("no block given", Qnil, 0);
    }
}

static VALUE
rb_yield_0(VALUE val, VALUE self, VALUE klass /* OK */, int flags, int avalue)
{
    NODE *node, *var;
    volatile VALUE result = Qnil;
    volatile VALUE old_cref;
    volatile VALUE old_wrapper;
    struct BLOCK * volatile block;
    struct SCOPE * volatile old_scope;
    int old_vmode;
    struct FRAME frame;
    NODE *cnode = ruby_current_node;
    int lambda = flags & YIELD_LAMBDA_CALL;
    int state;

    rb_need_block();

    PUSH_VARS();
    block = ruby_block;
    frame = block->frame;
    frame.prev = ruby_frame;
    frame.node = cnode;
    ruby_frame = &(frame);
    old_cref = (VALUE)ruby_cref;
    ruby_cref = block->cref;
    old_wrapper = ruby_wrapper;
    ruby_wrapper = block->wrapper;
    old_scope = ruby_scope;
    ruby_scope = block->scope;
    old_vmode = scope_vmode;
    scope_vmode = (flags & YIELD_PUBLIC_DEF) ? SCOPE_PUBLIC : block->vmode;
    ruby_block = block->prev;
    if (block->flags & BLOCK_D_SCOPE) {
        /* put place holder for dynamic (in-block) local variables */
        ruby_dyna_vars = new_dvar(0, 0, block->dyna_vars);
    }
    else {
        /* FOR does not introduce new scope */
        ruby_dyna_vars = block->dyna_vars;
    }
    PUSH_CLASS(klass ? klass : block->klass);
    if (!klass) {
        self = block->self;
    }
    node = block->body;
    var = block->var;

    if (var) {
        PUSH_TAG(PROT_NONE);
        if ((state = EXEC_TAG()) == 0) {
            NODE *bvar = NULL;
          block_var:
            if (var == (NODE*)1) { /* no parameter || */
                if (lambda && RARRAY(val)->len != 0) {
                    rb_raise(rb_eArgError, "wrong number of arguments (%ld for 0)",
                             RARRAY(val)->len);
                }
            }
            else if (var == (NODE*)2) {
                if (TYPE(val) == T_ARRAY && RARRAY(val)->len != 0) {
                    rb_raise(rb_eArgError, "wrong number of arguments (%ld for 0)",
                             RARRAY(val)->len);
                }
            }
            else if (!bvar && nd_type(var) == NODE_BLOCK_PASS) {
                bvar = var->nd_body;
                var = var->nd_args;
                goto block_var;
            }
            else if (nd_type(var) == NODE_MASGN) {
                if (!avalue) {
                    val = svalue_to_mrhs(val, var->nd_head);
                }
                massign(self, var, val, lambda);
            }
            else if (nd_type(var) == NODE_ARGS) {
                if (!avalue) {
                    val = svalue_to_mrhs(val, var->nd_head);
                }
                formal_assign(self, var, RARRAY(val)->len, RARRAY(val)->ptr, 0);
            }
            else if (nd_type(var) == NODE_BLOCK) {
                if (var->nd_next) {
                    bvar = var->nd_next->nd_head;
                }
                var = var->nd_head;
                goto block_var;
            }
            else {
                int len = 0;
                if (avalue) {
                    len = RARRAY(val)->len;
                    if (len == 0) {
                        goto zero_arg;
                    }
                    if (len == 1) {
                        val = RARRAY(val)->ptr[0];
                    }
                    else {
                        goto multi_values;
                    }
                }
                else if (val == Qundef) {
                  zero_arg:
                    val = Qnil;
                  multi_values:
                    {
                        ruby_current_node = var;
                        rb_warn("multiple values for a block parameter (%d for 1)\n\tfrom %s:%d",
                                len, cnode->nd_file, nd_line(cnode));
                        ruby_current_node = cnode;
                    }
                }
                assign(self, var, val, lambda);
            }
            if (bvar) {
                VALUE blk;
                if (flags & YIELD_PROC_CALL)
                    blk = block->block_obj;
                else
                    blk = rb_block_proc();
                assign(self, bvar, blk, 0);
            }
        }
        POP_TAG();
        if (state) goto pop_state;
    }
    else if (lambda && RARRAY(val)->len != 0 &&
             (!node || nd_type(node) != NODE_IFUNC ||
              node->nd_cfnc != bmcall)) {
        rb_raise(rb_eArgError, "wrong number of arguments (%ld for 0)",
                 RARRAY(val)->len);
    }
    if (!node) {
        state = 0;
        goto pop_state;
    }
    ruby_current_node = node;

    PUSH_ITER(block->iter);
    PUSH_TAG(lambda ? PROT_NONE : PROT_YIELD);
    if ((state = EXEC_TAG()) == 0) {
      redo:
        if (nd_type(node) == NODE_CFUNC || nd_type(node) == NODE_IFUNC) {
            if (node->nd_state == YIELD_FUNC_AVALUE) {
                if (!avalue) {
                    val = svalue_to_avalue(val);
                }
            }
            else {
                if (avalue) {
                    val = avalue_to_svalue(val);
                }
                if (val == Qundef && node->nd_state != YIELD_FUNC_SVALUE)
                    val = Qnil;
            }
            if ((block->flags&BLOCK_FROM_METHOD) && RTEST(block->block_obj)) {
                struct BLOCK *data, _block;
                Data_Get_Struct(block->block_obj, struct BLOCK, data);
                _block = *data;
                _block.outer = ruby_block;
                _block.uniq = block_unique++;
                ruby_block = &_block;
                PUSH_ITER(ITER_PRE);
                ruby_frame->iter = ITER_CUR;
                result = (*node->nd_cfnc)(val, node->nd_tval, self);
                POP_ITER();
            }
            else {
                result = (*node->nd_cfnc)(val, node->nd_tval, self);
            }
        }
        else {
            result = rb_eval(self, node);
        }
    }
    else {
        switch (state) {
          case TAG_REDO:
            state = 0;
            CHECK_INTS;
            goto redo;
          case TAG_NEXT:
            state = 0;
            result = prot_tag->retval;
            break;
          case TAG_BREAK:
            if (TAG_DST()) {
                result = prot_tag->retval;
            }
            else {
                lambda = Qtrue; /* just pass TAG_BREAK */
            }
            break;
          default:
            break;
        }
    }
    POP_TAG();
    POP_ITER();
  pop_state:
    POP_CLASS();
    if (ruby_dyna_vars && (block->flags & BLOCK_D_SCOPE) &&
        !FL_TEST(ruby_dyna_vars, DVAR_DONT_RECYCLE)) {
        struct RVarmap *vars = ruby_dyna_vars;

        if (ruby_dyna_vars->id == 0) {
            vars = ruby_dyna_vars->next;
            rb_gc_force_recycle((VALUE)ruby_dyna_vars);
            while (vars && vars->id != 0 && vars != block->dyna_vars) {
                struct RVarmap *tmp = vars->next;
                rb_gc_force_recycle((VALUE)vars);
                vars = tmp;
            }
        }
    }
    POP_VARS();
    ruby_block = block;
    ruby_frame = ruby_frame->prev;
    ruby_cref = (NODE*)old_cref;
    ruby_wrapper = old_wrapper;
    if (ruby_scope->flags & SCOPE_DONT_RECYCLE)
        scope_dup(old_scope);
    ruby_scope = old_scope;
    scope_vmode = old_vmode;
    switch (state) {
      case 0:
        break;
      case TAG_BREAK:
        if (!lambda) {
            struct tag *tt = prot_tag;

            while (tt) {
                if (tt->tag == PROT_LOOP && tt->blkid == ruby_block->uniq) {
                    tt->dst = (VALUE)tt->frame->uniq;
                    tt->retval = result;
                    JUMP_TAG(TAG_BREAK);
                }
                tt = tt->prev;
            }
            proc_jump_error(TAG_BREAK, result);
        }
        /* fall through */
      default:
        JUMP_TAG(state);
        break;
    }
    ruby_current_node = cnode;
    return result;
}

VALUE
rb_yield(VALUE val)
{
    return rb_yield_0(val, 0, 0, 0, Qfalse);
}

VALUE
rb_yield_values(int n, ...)
{
    int i;
    va_list args;
    VALUE val;

    if (n == 0) {
        return rb_yield_0(Qundef, 0, 0, 0, Qfalse);
    }
    val = rb_values_new2(n, 0);
    va_start(args, n);
    for (i=0; i<n; i++) {
        RARRAY(val)->ptr[i] = va_arg(args, VALUE);
    }
    RARRAY(val)->len = n;
    va_end(args);
    return rb_yield_0(val, 0, 0, 0, Qtrue);
}

VALUE
rb_yield_splat(VALUE values)
{
    int avalue = Qfalse;

    if (TYPE(values) == T_ARRAY) {
        if (RARRAY(values)->len == 0) {
            values = Qundef;
        }
        else {
            avalue = Qtrue;
        }
    }
    return rb_yield_0(values, 0, 0, 0, avalue);
}

/*
 *  call-seq:
 *     loop {|| block }
 *
 *  Repeatedly executes the block.
 *
 *     loop do
 *       print "Input: "
 *       line = gets
 *       break if !line or line =~ /^qQ/
 *       # ...
 *     end
 */

static VALUE
rb_f_loop(void)
{
    for (;;) {
        rb_yield_0(Qundef, 0, 0, 0, Qfalse);
        CHECK_INTS;
    }
    return Qnil;                /* dummy */
}

static VALUE
massign(VALUE self, NODE *node, VALUE val, int pcall)
{
    NODE *list;
    long i = 0, len;

    len = RARRAY(val)->len;
    list = node->nd_head;
    for (; list && i<len; i++) {
        assign(self, list->nd_head, RARRAY(val)->ptr[i], pcall);
        list = list->nd_next;
    }
    if (pcall && list) goto arg_error;
    if (node->nd_args) {
        if ((long)(node->nd_args) == -1) {
            /* no check for mere `*' */
        }
        else if (!list && i<len) {
            assign(self, node->nd_args, rb_ary_new4(len-i, RARRAY(val)->ptr+i), pcall);
        }
        else {
            assign(self, node->nd_args, rb_ary_new2(0), pcall);
        }
    }
    else if (pcall && i < len) {
        goto arg_error;
    }

    while (list) {
        i++;
        assign(self, list->nd_head, Qnil, pcall);
        list = list->nd_next;
    }
    return val;

  arg_error:
    while (list) {
        i++;
        list = list->nd_next;
    }
    rb_raise(rb_eArgError, "wrong number of arguments (%ld for %ld)", len, i);
}

static void
assign(VALUE self, NODE *lhs, VALUE val, int pcall)
{
    ruby_current_node = lhs;
    if (val == Qundef) {
        rb_warning("assigning void value");
        val = Qnil;
    }
    switch (nd_type(lhs)) {
      case NODE_GASGN:
        rb_gvar_set(lhs->nd_entry, val);
        break;

      case NODE_IASGN:
        rb_ivar_set(self, lhs->nd_vid, val);
        break;

      case NODE_LASGN:
        if (ruby_scope->local_vars == 0)
            rb_bug("unexpected local variable assignment");
        ruby_scope->local_vars[lhs->nd_cnt] = val;
        break;

      case NODE_DASGN:
        dvar_asgn(lhs->nd_vid, val);
        break;

      case NODE_DASGN_CURR:
        dvar_asgn_curr(lhs->nd_vid, val);
        break;

      case NODE_CDECL:
        if (lhs->nd_vid == 0) {
            rb_const_set(class_prefix(self, lhs->nd_else), lhs->nd_else->nd_mid, val);
        }
        else {
            rb_const_set(ruby_cbase, lhs->nd_vid, val);
        }
        break;

      case NODE_CVDECL:
        if (RTEST(ruby_verbose) && FL_TEST(ruby_cbase, FL_SINGLETON)) {
            rb_warn("declaring singleton class variable");
        }
        rb_cvar_set(cvar_cbase(), lhs->nd_vid, val, Qtrue);
        break;

      case NODE_CVASGN:
        rb_cvar_set(cvar_cbase(), lhs->nd_vid, val, Qfalse);
        break;

      case NODE_MASGN:
        massign(self, lhs, svalue_to_mrhs(val, lhs->nd_head), pcall);
        break;

      case NODE_CALL:
      case NODE_ATTRASGN:
        {
            VALUE recv;
            calling_scope_t scope;
            if (lhs->nd_recv == (NODE *)1) {
                recv = self;
                scope = CALLING_FCALL;
            }
            else {
                recv = rb_eval(self, lhs->nd_recv);
                scope = CALLING_NORMAL;
            }
            if (!lhs->nd_args) {
                /* attr set */
                ruby_current_node = lhs;
                SET_CURRENT_SOURCE();
                rb_call(CLASS_OF(recv), recv, lhs->nd_mid, 1, &val, scope);
            }
            else {
                /* array set */
                VALUE args;

                args = rb_eval(self, lhs->nd_args);
                rb_ary_push(args, val);
                ruby_current_node = lhs;
                SET_CURRENT_SOURCE();
                rb_call(CLASS_OF(recv), recv, lhs->nd_mid,
                        RARRAY(args)->len, RARRAY(args)->ptr, scope);
            }
        }
        break;

      default:
        rb_bug("bug in variable assignment");
        break;
    }
}

VALUE
rb_iterate(VALUE (*it_proc)(VALUE), VALUE data1, VALUE (*bl_proc)(ANYARGS), VALUE data2)
{
    int state;
    volatile VALUE retval = Qnil;
    NODE *node = NEW_IFUNC(bl_proc, data2);
    VALUE self = ruby_top_self;

    PUSH_ITER(ITER_PRE);
    PUSH_TAG(PROT_LOOP);
    PUSH_BLOCK(0, node);
    state = EXEC_TAG();
    if (state == 0) {
  iter_retry:
        retval = (*it_proc)(data1);
    }
    else if (state == TAG_BREAK && TAG_DST()) {
        retval = prot_tag->retval;
        state = 0;
    }
    else if (state == TAG_RETRY) {
        state = 0;
        goto iter_retry;
    }
    POP_BLOCK();
    POP_TAG();
    POP_ITER();

    switch (state) {
      case 0:
        break;
      default:
        JUMP_TAG(state);
    }
    return retval;
}

static int
handle_rescue(VALUE self, NODE *node)
{
    int argc; VALUE *argv; /* used in SETUP_ARGS */
    TMP_PROTECT;

    if (!node->nd_args) {
        return rb_obj_is_kind_of(ruby_errinfo, rb_eStandardError);
    }

    BEGIN_CALLARGS;
    SETUP_ARGS(node->nd_args);
    END_CALLARGS;

    while (argc--) {
        if (!rb_obj_is_kind_of(argv[0], rb_cModule)) {
            rb_raise(rb_eTypeError, "class or module required for rescue clause");
        }
        if (RTEST(rb_funcall(*argv, eqq, 1, ruby_errinfo))) return 1;
        argv++;
    }
    return 0;
}

VALUE
rb_rescue2(VALUE (*b_proc)(ANYARGS), VALUE data1, VALUE (*r_proc)(ANYARGS), VALUE data2, ...)
{
    int state;
    volatile VALUE result;
    volatile VALUE e_info = ruby_errinfo;
    volatile int handle = Qfalse;
    VALUE eclass;
    va_list args;

    PUSH_TAG(PROT_NONE);
    switch (state = EXEC_TAG()) {
      case TAG_RETRY:
        if (!handle) break;
        handle = Qfalse;
        state = 0;
        ruby_errinfo = Qnil;
      case 0:
        result = (*b_proc)(data1);
        break;
      case TAG_RAISE:
        if (handle) break;
        handle = Qfalse;
        va_start(args, data2);
        while (eclass = va_arg(args, VALUE)) {
            if (rb_obj_is_kind_of(ruby_errinfo, eclass)) {
                handle = Qtrue;
                break;
            }
        }
        va_end(args);

        if (handle) {
            state = 0;
            if (r_proc) {
                result = (*r_proc)(data2, ruby_errinfo);
            }
            else {
                result = Qnil;
            }
            ruby_errinfo = e_info;
        }
    }
    POP_TAG();
    if (state) JUMP_TAG(state);

    return result;
}

VALUE
rb_rescue(VALUE (*b_proc)(ANYARGS), VALUE data1, VALUE (*r_proc)(ANYARGS), VALUE data2)
{
    return rb_rescue2(b_proc, data1, r_proc, data2, rb_eStandardError, (VALUE)0);
}

static VALUE cont_protect;

VALUE
rb_protect(VALUE (*proc) (VALUE), VALUE data, int *state)
{
    VALUE result = Qnil;        /* OK */
    int status;

    PUSH_THREAD_TAG();
    cont_protect = (VALUE)rb_node_newnode(NODE_MEMO, cont_protect, 0, 0);
    if ((status = EXEC_TAG()) == 0) {
        result = (*proc)(data);
    }
    else if (status == TAG_THREAD) {
        rb_thread_start_1();
    }
    cont_protect = ((NODE *)cont_protect)->u1.value;
    POP_THREAD_TAG();
    if (state) {
        *state = status;
    }
    if (status != 0) {
        return Qnil;
    }

    return result;
}

VALUE
rb_ensure(VALUE (*b_proc)(ANYARGS), VALUE data1, VALUE (*e_proc)(ANYARGS), VALUE data2)
{
    int state;
    volatile VALUE result = Qnil;
    VALUE retval;

    PUSH_TAG(PROT_NONE);
    if ((state = EXEC_TAG()) == 0) {
        result = (*b_proc)(data1);
    }
    POP_TAG();
    retval = prot_tag ? prot_tag->retval : Qnil;        /* save retval */
    (*e_proc)(data2);
    if (prot_tag) return_value(retval);
    if (state) JUMP_TAG(state);
    return result;
}

VALUE
rb_with_disable_interrupt(VALUE (*proc)(ANYARGS), VALUE data)
{
    VALUE result = Qnil;        /* OK */
    int status;

    DEFER_INTS;
    {
        int thr_critical = rb_thread_critical;

        rb_thread_critical = Qtrue;
        PUSH_TAG(PROT_NONE);
        if ((status = EXEC_TAG()) == 0) {
            result = (*proc)(data);
        }
        POP_TAG();
        rb_thread_critical = thr_critical;
    }
    ENABLE_INTS;
    if (status) JUMP_TAG(status);

    return result;
}

static inline void
stack_check(void)
{
    static int overflowing = 0;

    if (!overflowing && ruby_stack_check()) {
        int state;
        overflowing = 1;
        PUSH_TAG(PROT_NONE);
        if ((state = EXEC_TAG()) == 0) {
            rb_exc_raise(sysstack_error);
        }
        POP_TAG();
        overflowing = 0;
        JUMP_TAG(state);
    }
}

static int last_call_status;

#define CSTAT_PRIV  1
#define CSTAT_PROT  2
#define CSTAT_VCALL 4
#define CSTAT_SUPER 8

/*
 *  call-seq:
 *     obj.method_missing(symbol [, *args] )   => result
 *
 *  Invoked by Ruby when <i>obj</i> is sent a message it cannot handle.
 *  <i>symbol</i> is the symbol for the method called, and <i>args</i>
 *  are any arguments that were passed to it. By default, the interpreter
 *  raises an error when this method is called. However, it is possible
 *  to override the method to provide more dynamic behavior.
 *  The example below creates
 *  a class <code>Roman</code>, which responds to methods with names
 *  consisting of roman numerals, returning the corresponding integer
 *  values.
 *
 *     class Roman
 *       def romanToInt(str)
 *         # ...
 *       end
 *       def method_missing(methId)
 *         str = methId.id2name
 *         romanToInt(str)
 *       end
 *     end
 *
 *     r = Roman.new
 *     r.iv      #=> 4
 *     r.xxiii   #=> 23
 *     r.mm      #=> 2000
 */

static VALUE
rb_method_missing(int argc, const VALUE *argv, VALUE obj)
{
    ID id;
    VALUE exc = rb_eNoMethodError;
    char *format = 0;
    NODE *cnode = ruby_current_node;

    if (argc == 0 || !SYMBOL_P(argv[0])) {
        rb_raise(rb_eArgError, "no id given");
    }

    stack_check();

    id = SYM2ID(argv[0]);

    if (last_call_status & CSTAT_PRIV) {
        format = "private method `%s' called for %s";
    }
    else if (last_call_status & CSTAT_PROT) {
        format = "protected method `%s' called for %s";
    }
    else if (last_call_status & CSTAT_VCALL) {
        format = "undefined local variable or method `%s' for %s";
        exc = rb_eNameError;
    }
    else if (last_call_status & CSTAT_SUPER) {
        format = "super: no superclass method `%s'";
    }
    if (!format) {
        format = "undefined method `%s' for %s";
    }

    ruby_current_node = cnode;
    {
        int n = 0;
        VALUE args[3];

        args[n++] = rb_funcall(rb_const_get(exc, rb_intern("message")), '!',
                               3, rb_str_new2(format), obj, argv[0]);
        args[n++] = argv[0];
        if (exc == rb_eNoMethodError) {
            args[n++] = rb_ary_new4(argc-1, argv+1);
        }
        exc = rb_class_new_instance(n, args, exc);
        ruby_frame = ruby_frame->prev; /* pop frame for "method_missing" */
        rb_exc_raise(exc);
    }

    return Qnil;                /* not reached */
}

static VALUE
method_missing(VALUE obj, ID id, int argc, const VALUE *argv, int call_status)
{
    VALUE *nargv;

    last_call_status = call_status;

    if (id == missing) {
        PUSH_FRAME();
        rb_method_missing(argc, argv, obj);
        POP_FRAME();
    }
    else if (id == ID_ALLOCATOR) {
        rb_raise(rb_eTypeError, "allocator undefined for %s", rb_class2name(obj));
    }

    nargv = ALLOCA_N(VALUE, argc+1);
    nargv[0] = ID2SYM(id);
    MEMCPY(nargv+1, argv, VALUE, argc);

    return rb_funcall2(obj, missing, argc+1, nargv);
}

static inline VALUE
call_cfunc(VALUE (*func)(ANYARGS), VALUE recv, int len, int argc, const VALUE *argv)
{
    if (len >= 0 && argc != len) {
        rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)",
                 argc, len);
    }

    switch (len) {
      case -2:
        return (*func)(recv, rb_ary_new4(argc, argv));
        break;
      case -1:
        return (*func)(argc, argv, recv);
        break;
      case 0:
        return (*func)(recv);
        break;
      case 1:
        return (*func)(recv, argv[0]);
        break;
      case 2:
        return (*func)(recv, argv[0], argv[1]);
        break;
      case 3:
        return (*func)(recv, argv[0], argv[1], argv[2]);
        break;
      case 4:
        return (*func)(recv, argv[0], argv[1], argv[2], argv[3]);
        break;
      case 5:
        return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4]);
        break;
      case 6:
        return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
                       argv[5]);
        break;
      case 7:
        return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
                       argv[5], argv[6]);
        break;
      case 8:
        return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
                       argv[5], argv[6], argv[7]);
        break;
      case 9:
        return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
                       argv[5], argv[6], argv[7], argv[8]);
        break;
      case 10:
        return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
                       argv[5], argv[6], argv[7], argv[8], argv[9]);
        break;
      case 11:
        return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
                       argv[5], argv[6], argv[7], argv[8], argv[9], argv[10]);
        break;
      case 12:
        return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
                       argv[5], argv[6], argv[7], argv[8], argv[9],
                       argv[10], argv[11]);
        break;
      case 13:
        return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
                       argv[5], argv[6], argv[7], argv[8], argv[9], argv[10],
                       argv[11], argv[12]);
        break;
      case 14:
        return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
                       argv[5], argv[6], argv[7], argv[8], argv[9], argv[10],
                       argv[11], argv[12], argv[13]);
        break;
      case 15:
        return (*func)(recv, argv[0], argv[1], argv[2], argv[3], argv[4],
                       argv[5], argv[6], argv[7], argv[8], argv[9], argv[10],
                       argv[11], argv[12], argv[13], argv[14]);
        break;
      default:
        rb_raise(rb_eArgError, "too many arguments (%d)", len);
        break;
    }
    return Qnil;                /* not reached */
}

static int
formal_assign(VALUE recv, NODE *node, int argc, const VALUE *argv, VALUE *local_vars)
{
    int i;
    int nopt = 0;

    if (nd_type(node) != NODE_ARGS) {
        rb_bug("no argument-node");
    }

    i = node->nd_frml ? RARRAY(node->nd_frml)->len : 0;
    if (i > argc) {
        rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", argc, i);
    }
    if (!node->nd_rest) {
        NODE *optnode = node->nd_opt;

        nopt = i;
        while (optnode) {
            nopt++;
            optnode = optnode->nd_next;
        }
        if (nopt < argc) {
            rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", argc, nopt);
        }
    }
    if (local_vars) {
        if (i > 0) {
            /* +2 for $_ and $~ */
            MEMCPY(local_vars+2, argv, VALUE, i);
        }
    }
    else {
        int j;
        VALUE a = node->nd_frml;

        for (j=0; j<i; j++) {
            dvar_asgn_curr(SYM2ID(RARRAY(a)->ptr[j]), argv[j]);
        }
    }
    argv += i; argc -= i;
    if (node->nd_opt) {
        NODE *opt = node->nd_opt;

        while (opt && argc) {
            assign(recv, opt->nd_head, *argv, 1);
            argv++; argc--;
            ++i;
            opt = opt->nd_next;
        }
        if (opt) {
            rb_eval(recv, opt);
        }
    }
    if (!node->nd_rest) {
        i = nopt;
    }
    else {
        VALUE v;

        if (argc > 0) {
            v = rb_ary_new4(argc,argv);
            i = -i - 1;
        }
        else {
            v = rb_ary_new2(0);
        }
        assign(recv, node->nd_rest, v, 1);
    }
    return i;
}

static VALUE
rb_call0(VALUE klass, VALUE recv, ID id, ID oid,
    int argc /* OK */, const VALUE *argv /* OK */, NODE *volatile body, int flags)
{
    NODE *b2;           /* OK */
    volatile VALUE result = Qnil;
    int itr;
    static int tick;
    volatile VALUE args;
    volatile int safe = -1;
    TMP_PROTECT;

    switch (ruby_iter->iter) {
      case ITER_PRE:
      case ITER_PAS:
        itr = ITER_CUR;
        break;
      case ITER_CUR:
      default:
        itr = ITER_NOT;
        break;
    }

    if ((++tick & 0xff) == 0) {
        CHECK_INTS;             /* better than nothing */
        stack_check();
        rb_gc_finalize_deferred();
    }
    if (argc < 0) {
        argc = -argc-1;
        args = rb_ary_concat(rb_ary_new4(argc, argv), splat_value(argv[argc]));
        argc = RARRAY(args)->len;
        argv = RARRAY(args)->ptr;
    }
    PUSH_ITER(itr);
    PUSH_FRAME();
    ruby_frame->callee = id;
    ruby_frame->this_func = oid;
    ruby_frame->this_class = (flags & NOEX_NOSUPER)?0:klass;
    ruby_frame->self = recv;
    ruby_frame->argc = argc;
    ruby_frame->flags = (flags & NOEX_RECV) ? FRAME_FUNC : 0;

    switch (nd_type(body)) {
      case NODE_CFUNC:
        {
            int len = body->nd_argc;

            if (len < -2) {
                rb_bug("bad argc (%d) specified for `%s(%s)'",
                       len, rb_class2name(klass), rb_id2name(id));
            }
            if (event_hooks) {
                int state;

                EXEC_EVENT_HOOK(RUBY_EVENT_C_CALL, ruby_current_node,
                                recv, id, klass);
                PUSH_TAG(PROT_FUNC);
                if ((state = EXEC_TAG()) == 0) {
                    result = call_cfunc(body->nd_cfnc, recv, len, argc, argv);
                }
                POP_TAG();
                ruby_current_node = ruby_frame->node;
                EXEC_EVENT_HOOK(RUBY_EVENT_C_RETURN, ruby_current_node,
                                recv, id, klass);
                if (state) JUMP_TAG(state);
            }
            else {
                result = call_cfunc(body->nd_cfnc, recv, len, argc, argv);
            }
        }
        break;

        /* for attr get/set */
      case NODE_IVAR:
        if (argc != 0) {
            rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc);
        }
        result = rb_attr_get(recv, body->nd_vid);
        break;

      case NODE_ATTRSET:
        if (argc != 1)
            rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc);
        result = rb_ivar_set(recv, body->nd_vid, argv[0]);
        break;

      case NODE_ZSUPER:         /* visibility override */
        result = rb_call_super(argc, argv);
        break;

      case NODE_BMETHOD:
        ruby_frame->flags |= FRAME_DMETH;
        result = proc_invoke(body->nd_cval, rb_ary_new4(argc, argv), recv, klass);
        break;

      case NODE_SCOPE:
        {
            int state;
            VALUE *local_vars;  /* OK */
            NODE *saved_cref = 0;

            PUSH_SCOPE();
            if (body->nd_rval) {
                saved_cref = ruby_cref;
                ruby_cref = (NODE*)body->nd_rval;
            }
            PUSH_CLASS(ruby_cbase);
            if (body->nd_tbl) {
                local_vars = TMP_ALLOC(body->nd_tbl[0]+1);
                *local_vars++ = (VALUE)body;
                rb_mem_clear(local_vars, body->nd_tbl[0]);
                ruby_scope->local_tbl = body->nd_tbl;
                ruby_scope->local_vars = local_vars;
            }
            else {
                local_vars = ruby_scope->local_vars = 0;
                ruby_scope->local_tbl  = 0;
            }
            b2 = body = body->nd_next;

            if (NOEX_SAFE(flags) > ruby_safe_level) {
                if (ruby_safe_level == 0 && NOEX_SAFE(flags) > 2) {
                    rb_raise(rb_eSecurityError, "calling insecure method: %s",
                             rb_id2name(id));
                }
                safe = ruby_safe_level;
                ruby_safe_level = NOEX_SAFE(flags);
            }
            PUSH_VARS();
            PUSH_TAG(PROT_FUNC);
            if ((state = EXEC_TAG()) == 0) {
                NODE *node = 0;

                if (nd_type(body) == NODE_ARGS) {
                    node = body;
                    body = 0;
                }
                else if (nd_type(body) == NODE_BLOCK) {
                    node = body->nd_head;
                    body = body->nd_next;
                }
                if (node) {
                    ruby_frame->argc = formal_assign(recv, node, argc, argv, local_vars);
                }

                if (event_hooks) {
                    EXEC_EVENT_HOOK(RUBY_EVENT_CALL, b2, recv, id, klass);
                }
                result = rb_eval(recv, body);
            }
            else if (state == TAG_RETURN && TAG_DST()) {
                result = prot_tag->retval;
                state = 0;
            }
            POP_TAG();
            POP_VARS();
            POP_CLASS();
            POP_SCOPE();
            ruby_cref = saved_cref;
            if (safe >= 0) ruby_safe_level = safe;
            if (event_hooks) {
                EXEC_EVENT_HOOK(RUBY_EVENT_RETURN, body, recv, id, klass);
            }
            switch (state) {
              case 0:
                break;

              case TAG_BREAK:
              case TAG_RETURN:
                JUMP_TAG(state);
                break;

              case TAG_RETRY:
                if (rb_block_given_p()) JUMP_TAG(state);
                /* fall through */
              default:
                jump_tag_but_local_jump(state, result);
                break;
            }
        }
        break;

      default:
        unknown_node(body);
        break;
    }
    POP_FRAME();
    POP_ITER();
    return result;
}

static VALUE
rb_call(VALUE klass, VALUE recv, ID mid,
    int argc /* OK */, const VALUE *argv /* OK */, calling_scope_t scope)
{
    NODE  *body;                /* OK */
    int    noex;
    ID     id = mid;
    struct cache_entry *ent;

    if (!klass) {
        rb_raise(rb_eNotImpError, "method `%s' called on terminated object (%p)",
                 rb_id2name(mid), recv);
    }
    /* is it in the method cache? */
    ent = cache + EXPR1(klass, mid);
    if (ent->mid == mid && ent->klass == klass) {
        if (!ent->method)
            return method_missing(recv, mid, argc, argv, scope==CALLING_VCALL?CSTAT_VCALL:0);
        klass = ent->origin;
        id    = ent->mid0;
        noex  = ent->noex;
        body  = ent->method;
    }
    else if ((body = rb_get_method_body(&klass, &id, &noex)) == 0) {
        if (scope == CALLING_SUPER) {
            return method_missing(recv, mid, argc, argv, CSTAT_SUPER);
        }
        return method_missing(recv, mid, argc, argv, scope==CALLING_VCALL?CSTAT_VCALL:0);
    }

    if (mid != missing && scope == CALLING_NORMAL) {
        /* receiver specified form for private method */
        if (noex & NOEX_PRIVATE)
            return method_missing(recv, mid, argc, argv, CSTAT_PRIV);

        /* self must be kind of a specified form for protected method */
        if (noex & NOEX_PROTECTED) {
            VALUE defined_class = klass;

            if (TYPE(defined_class) == T_ICLASS) {
                defined_class = RBASIC(defined_class)->klass;
            }
            if (!rb_obj_is_kind_of(ruby_frame->self, rb_class_real(defined_class)))
                return method_missing(recv, mid, argc, argv, CSTAT_PROT);
        }
    }
    if (scope > CALLING_NORMAL) { /* pass receiver info */
        noex |= NOEX_RECV;
    }
    return rb_call0(klass, recv, mid, id, argc, argv, body, noex);
}

VALUE
rb_apply(VALUE recv, ID mid, VALUE args)
{
    int argc;
    VALUE *argv;

    argc = RARRAY(args)->len; /* Assigns LONG, but argc is INT */
    argv = ALLOCA_N(VALUE, argc);
    MEMCPY(argv, RARRAY(args)->ptr, VALUE, argc);
    return rb_call(CLASS_OF(recv), recv, mid, argc, argv, CALLING_FCALL);
}

static VALUE
send_funcall(int argc, VALUE *argv, VALUE recv, calling_scope_t scope)
{
    VALUE vid;

    if (argc == 0) rb_raise(rb_eArgError, "no method name given");

    vid = *argv++; argc--;
    PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
    vid = rb_call(CLASS_OF(recv), recv, rb_to_id(vid), argc, argv, scope);
    POP_ITER();

    return vid;
}

/*
 *  call-seq:
 *     obj.send(symbol [, args...])        => obj
 *     obj.__send__(symbol [, args...])    => obj
 *
 *  Invokes the method identified by _symbol_, passing it any
 *  arguments specified. You can use <code>\_\_send__</code> if the name
 *  +send+ clashes with an existing method in _obj_.  Raises an
 *  NoMethodError exception for private methods except when it is
 *  called in function call style.
 *
 *     class Klass
 *       def hello(*args)
 *         "Hello " + args.join(' ')
 *       end
 *     end
 *     k = Klass.new
 *     k.send :hello, "gentle", "readers"   #=> "Hello gentle readers"
 *
 *     1.send(:puts, "foo")  # NoMethodError exception
 *     send(:puts, "foo")    # prints "foo"
 */

static VALUE
rb_f_send(int argc, VALUE *argv, VALUE recv)
{
    calling_scope_t scope = (ruby_frame->flags & FRAME_FUNC) ? CALLING_FCALL : CALLING_NORMAL;

    return send_funcall(argc, argv, recv, scope);
}

/*
 *  call-seq:
 *     obj.funcall(symbol [, args...])        => obj
 *
 *  Invokes the method identified by _symbol_, passing it any
 *  arguments specified. Unlike send, which calls private methods only
 *  when it is invoked in function call style, funcall always aware of
 *  private methods.
 *
 *     1.funcall(:puts, "hello")  # prints "foo"
 */

static VALUE
rb_f_funcall(int argc, VALUE *argv, VALUE recv)
{
    return send_funcall(argc, argv, recv, CALLING_FCALL);
}

VALUE
rb_funcall(VALUE recv, ID mid, int n, ...)
{
    VALUE *argv;
    va_list ar;
    va_start(ar, n);

    if (n > 0) {
        long i;

        argv = ALLOCA_N(VALUE, n);

        for (i=0;i<n;i++) {
            argv[i] = va_arg(ar, VALUE);
        }
        va_end(ar);
    }
    else {
        argv = 0;
    }

    return rb_call(CLASS_OF(recv), recv, mid, n, argv, CALLING_FCALL);
}

VALUE
rb_funcall2(VALUE recv, ID mid, int argc, const VALUE *argv)
{
    return rb_call(CLASS_OF(recv), recv, mid, argc, argv, CALLING_FCALL);
}

VALUE
rb_funcall3(VALUE recv, ID mid, int argc, const VALUE *argv)
{
    return rb_call(CLASS_OF(recv), recv, mid, argc, argv, CALLING_NORMAL);
}

VALUE
rb_call_super(int argc, const VALUE *argv)
{
    VALUE result, self, klass;

    if (ruby_frame->this_class == 0) {
        rb_name_error(ruby_frame->callee, "calling `super' from `%s' is prohibited",
                      rb_id2name(ruby_frame->this_func));
    }

    self = ruby_frame->self;
    klass = ruby_frame->this_class;
    if (RCLASS(klass)->super == 0) {
        return method_missing(self, ruby_frame->this_func, argc, argv, CSTAT_SUPER);
    }

    PUSH_ITER(ruby_iter->iter ? ITER_PRE : ITER_NOT);
    result = rb_call(RCLASS(klass)->super, self, ruby_frame->this_func, argc, argv, CALLING_SUPER);
    POP_ITER();

    return result;
}

static VALUE
backtrace(int lev)
{
    struct FRAME *frame = ruby_frame;
    VALUE str;
    volatile VALUE ary;
    NODE *n;

    ary = rb_ary_new();
    if (frame->this_func == ID_ALLOCATOR) {
        frame = frame->prev;
    }
    if (lev < 0) {
        ruby_set_current_source();
        if (frame->this_func) {
            str = rb_sprintf("%s:%d:in `%s'", ruby_sourcefile, ruby_sourceline,
                             rb_id2name(frame->this_func));
        }
        else if (ruby_sourceline == 0) {
            str = rb_str_new2(ruby_sourcefile);
        }
        else {
            str = rb_sprintf("%s:%d", ruby_sourcefile, ruby_sourceline);
        }
        rb_ary_push(ary, str);
        if (lev < -1) return ary;
    }
    else {
        while (lev-- > 0) {
            frame = frame->prev;
            if (!frame) {
                ary = Qnil;
                break;
            }
        }
    }
    for (; frame && (n = frame->node); frame = frame->prev) {
        if (frame->prev && frame->prev->this_func) {
            if (frame->prev->node == n) continue;
            str = rb_sprintf("%s:%d:in `%s'", n->nd_file, nd_line(n),
                             rb_id2name(frame->prev->this_func));
        }
        else {
            str = rb_sprintf("%s:%d", n->nd_file, nd_line(n));
        }
        rb_ary_push(ary, str);
    }

    return ary;
}

/*
 *  call-seq:
 *     caller(start=1)    => array
 *
 *  Returns the current execution stack---an array containing strings in
 *  the form ``<em>file:line</em>'' or ``<em>file:line: in
 *  `method'</em>''. The optional _start_ parameter
 *  determines the number of initial stack entries to omit from the
 *  result.
 *
 *     def a(skip)
 *       caller(skip)
 *     end
 *     def b(skip)
 *       a(skip)
 *     end
 *     def c(skip)
 *       b(skip)
 *     end
 *     c(0)   #=> ["prog:2:in `a'", "prog:5:in `b'", "prog:8:in `c'", "prog:10"]
 *     c(1)   #=> ["prog:5:in `b'", "prog:8:in `c'", "prog:11"]
 *     c(2)   #=> ["prog:8:in `c'", "prog:12"]
 *     c(3)   #=> ["prog:13"]
 */

static VALUE
rb_f_caller(int argc, VALUE *argv)
{
    VALUE level;
    int lev;

    rb_scan_args(argc, argv, "01", &level);

    if (NIL_P(level)) lev = 1;
    else lev = NUM2INT(level);
    if (lev < 0) rb_raise(rb_eArgError, "negative level (%d)", lev);

    return backtrace(lev);
}

void
rb_backtrace(void)
{
    long i;
    VALUE ary;

    ary = backtrace(-1);
    for (i=0; i<RARRAY(ary)->len; i++) {
        printf("\tfrom %s\n", RSTRING(RARRAY(ary)->ptr[i])->ptr);
    }
}

static VALUE
make_backtrace(void)
{
    return backtrace(-1);
}

ID
rb_frame_this_func(void)
{
    return ruby_frame->this_func;
}

static NODE*
compile(VALUE src, const char *file, int line)
{
    NODE *node;
    int critical;

    ruby_nerrs = 0;
    StringValue(src);
    critical = rb_thread_critical;
    rb_thread_critical = Qtrue;
    node = rb_compile_string(file, src, line);
    rb_thread_critical = critical;

    if (ruby_nerrs == 0) return node;
    return 0;
}

static VALUE
eval(VALUE self, VALUE src, VALUE scope, const char *file, int line)
{
    struct BLOCK *data = NULL;
    volatile VALUE result = Qnil;
    struct SCOPE * volatile old_scope;
    struct BLOCK * volatile old_block;
    struct RVarmap * volatile old_dyna_vars;
    VALUE volatile old_cref;
    int volatile old_vmode;
    volatile VALUE old_wrapper;
    struct FRAME frame;
    NODE *nodesave = ruby_current_node;
    volatile int iter = ruby_frame->iter;
    volatile int safe = ruby_safe_level;
    int state;

    if (!NIL_P(scope)) {
        if (!rb_obj_is_proc(scope)) {
            rb_raise(rb_eTypeError, "wrong argument type %s (expected Proc/Binding)",
                     rb_obj_classname(scope));
        }

        Data_Get_Struct(scope, struct BLOCK, data);
        /* PUSH BLOCK from data */
        frame = data->frame;
        frame.tmp = ruby_frame; /* gc protection */
        ruby_frame = &(frame);
        old_scope = ruby_scope;
        ruby_scope = data->scope;
        old_block = ruby_block;
        ruby_block = data->prev;
        old_dyna_vars = ruby_dyna_vars;
        ruby_dyna_vars = data->dyna_vars;
        old_vmode = scope_vmode;
        scope_vmode = data->vmode;
        old_cref = (VALUE)ruby_cref;
        ruby_cref = data->cref;
        old_wrapper = ruby_wrapper;
        ruby_wrapper = data->wrapper;
        if ((file == 0 || (line == 1 && strcmp(file, "(eval)") == 0)) && data->frame.node) {
            file = data->frame.node->nd_file;
            if (!file) file = "__builtin__";
            line = nd_line(data->frame.node);
        }

        self = data->self;
        ruby_frame->iter = data->iter;
    }
    else {
        if (ruby_frame->prev) {
            ruby_frame->iter = ruby_frame->prev->iter;
        }
    }
    if (file == 0) {
        ruby_set_current_source();
        file = ruby_sourcefile;
        line = ruby_sourceline;
    }
    PUSH_CLASS(ruby_cbase);
    ruby_in_eval++;
    if (TYPE(ruby_class) == T_ICLASS) {
        ruby_class = RBASIC(ruby_class)->klass;
    }
    PUSH_TAG(PROT_NONE);
    if ((state = EXEC_TAG()) == 0) {
        NODE *node;

        ruby_safe_level = 0;
        result = ruby_errinfo;
        ruby_errinfo = Qnil;
        node = compile(src, file, line);
        ruby_safe_level = safe;
        if (ruby_nerrs > 0) {
            compile_error(0);
        }
        if (!NIL_P(result)) ruby_errinfo = result;
        result = eval_node(self, node);
    }
    POP_TAG();
    POP_CLASS();
    ruby_in_eval--;
    ruby_safe_level = safe;
    if (!NIL_P(scope)) {
        int dont_recycle = ruby_scope->flags & SCOPE_DONT_RECYCLE;

        ruby_wrapper = old_wrapper;
        ruby_cref  = (NODE*)old_cref;
        ruby_frame = frame.tmp;
        ruby_scope = old_scope;
        ruby_block = old_block;
        ruby_dyna_vars = old_dyna_vars;
        data->vmode = scope_vmode; /* write back visibility mode */
        scope_vmode = old_vmode;
        if (dont_recycle) {
            struct tag *tag;
            struct RVarmap *vars;

            scope_dup(ruby_scope);
            for (tag=prot_tag; tag; tag=tag->prev) {
                scope_dup(tag->scope);
            }
            for (vars = ruby_dyna_vars; vars; vars = vars->next) {
                FL_SET(vars, DVAR_DONT_RECYCLE);
            }
        }
    }
    else {
        ruby_frame->iter = iter;
    }
    ruby_current_node = nodesave;
    ruby_set_current_source();
    if (state) {
        if (state == TAG_RAISE) {
            if (strcmp(file, "(eval)") == 0) {
                VALUE mesg, errat;

                errat = get_backtrace(ruby_errinfo);
                mesg  = rb_attr_get(ruby_errinfo, rb_intern("mesg"));
                if (!NIL_P(errat) && TYPE(errat) == T_ARRAY) {
                    if (!NIL_P(mesg) && TYPE(mesg) == T_STRING) {
                        rb_str_update(mesg, 0, 0, rb_str_new2(": "));
                        rb_str_update(mesg, 0, 0, RARRAY(errat)->ptr[0]);
                    }
                    RARRAY(errat)->ptr[0] = RARRAY(backtrace(-2))->ptr[0];
                }
            }
            rb_exc_raise(ruby_errinfo);
        }
        JUMP_TAG(state);
    }

    return result;
}

/*
 *  call-seq:
 *     eval(string [, binding [, filename [,lineno]]])  => obj
 *
 *  Evaluates the Ruby expression(s) in <em>string</em>. If
 *  <em>binding</em> is given, the evaluation is performed in its
 *  context. The binding may be a <code>Binding</code> object or a
 *  <code>Proc</code> object. If the optional <em>filename</em> and
 *  <em>lineno</em> parameters are present, they will be used when
 *  reporting syntax errors.
 *
 *     def getBinding(str)
 *       return binding
 *     end
 *     str = "hello"
 *     eval "str + ' Fred'"                      #=> "hello Fred"
 *     eval "str + ' Fred'", getBinding("bye")   #=> "bye Fred"
 */

static VALUE
rb_f_eval(int argc, VALUE *argv, VALUE self)
{
    VALUE src, scope, vfile, vline;
    char *file = "(eval)";
    int line = 1;

    rb_scan_args(argc, argv, "13", &src, &scope, &vfile, &vline);
    if (ruby_safe_level >= 4) {
        StringValue(src);
        if (!NIL_P(scope) && !OBJ_TAINTED(scope)) {
            rb_raise(rb_eSecurityError, "Insecure: can't modify trusted binding");
        }
    }
    else {
        SafeStringValue(src);
    }
    if (argc >= 3) {
        StringValue(vfile);
    }
    if (argc >= 4) {
        line = NUM2INT(vline);
    }

    if (!NIL_P(vfile)) file = RSTRING(vfile)->ptr;
    if (NIL_P(scope) && ruby_frame->prev) {
        struct FRAME *prev;
        VALUE val;

        prev = ruby_frame;
        PUSH_FRAME();
        *ruby_frame = *prev->prev;
        ruby_frame->prev = prev;
        val = eval(self, src, scope, file, line);
        POP_FRAME();

        return val;
    }
    return eval(self, src, scope, file, line);
}

/* function to call func under the specified class/module context */
static VALUE
exec_under(VALUE (*func) (VALUE), VALUE under, VALUE cbase, VALUE args)
{
    VALUE val = Qnil;           /* OK */
    int state;
    int mode;
    struct FRAME *f = ruby_frame;

    PUSH_CLASS(under);
    PUSH_FRAME();
    ruby_frame->self = f->self;
    ruby_frame->callee = f->callee;
    ruby_frame->this_func = f->this_func;
    ruby_frame->this_class = f->this_class;
    ruby_frame->argc = f->argc;
    if (cbase) {
        PUSH_CREF(cbase);
    }

    mode = scope_vmode;
    SCOPE_SET(SCOPE_PUBLIC);
    PUSH_TAG(PROT_NONE);
    if ((state = EXEC_TAG()) == 0) {
        val = (*func)(args);
    }
    POP_TAG();
    if (cbase) POP_CREF();
    SCOPE_SET(mode);
    POP_FRAME();
    POP_CLASS();
    if (state) JUMP_TAG(state);

    return val;
}

static VALUE
eval_under_i(VALUE arg)
{
    VALUE *args = (VALUE *)arg;
    struct FRAME *f = ruby_frame;

    if (f && (f = f->prev) && (f = f->prev)) {
        ruby_frame = f;
    }
    return eval(args[0], args[1], Qnil, (char*)args[2], (int)args[3]);
}

/* string eval under the class/module context */
static VALUE
eval_under(VALUE under, VALUE self, VALUE src, const char *file, int line)
{
    VALUE args[4];

    if (ruby_safe_level >= 4) {
        StringValue(src);
    }
    else {
        SafeStringValue(src);
    }
    args[0] = self;
    args[1] = src;
    args[2] = (VALUE)file;
    args[3] = (VALUE)line;
    return exec_under(eval_under_i, under, under, (VALUE)args);
}

static VALUE
yield_under_i(VALUE arg)
{
    VALUE *args = (VALUE *)arg;
    VALUE avalue = Qtrue;
    if (args[0] == Qundef) {
        avalue = Qfalse;
        args[0] = args[1];
    }
    return rb_yield_0(args[0], args[1], ruby_class, YIELD_PUBLIC_DEF, avalue);
}

/* block eval under the class/module context */
static VALUE
yield_under(VALUE under, VALUE self, VALUE values)
{
    VALUE args[4];
    args[0] = values;
    args[1] = self;
    return exec_under(yield_under_i, under, 0, (VALUE)args);
}

static VALUE
specific_eval(int argc, VALUE *argv, VALUE klass, VALUE self)
{
    if (rb_block_given_p()) {
        if (argc > 0) {
            rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc);
        }
        return yield_under(klass, self, Qundef);
    }
    else {
        char *file = "(eval)";
        int   line = 1;

        if (argc == 0) {
            rb_raise(rb_eArgError, "block not supplied");
        }
        else {
            if (ruby_safe_level >= 4) {
                StringValue(argv[0]);
            }
            else {
                SafeStringValue(argv[0]);
            }
            if (argc > 3) {
                rb_raise(rb_eArgError, "wrong number of arguments: %s(src) or %s{..}",
                         rb_id2name(ruby_frame->callee),
                         rb_id2name(ruby_frame->callee));
            }
            if (argc > 2) line = NUM2INT(argv[2]);
            if (argc > 1) {
                file = StringValuePtr(argv[1]);
            }
        }
        return eval_under(klass, self, argv[0], file, line);
    }
}

/*
 *  call-seq:
 *     obj.instance_eval(string [, filename [, lineno]] )   => obj
 *     obj.instance_eval {| | block }                       => obj
 *
 *  Evaluates a string containing Ruby source code, or the given block,
 *  within the context of the receiver (_obj_). In order to set the
 *  context, the variable +self+ is set to _obj_ while
 *  the code is executing, giving the code access to _obj_'s
 *  instance variables. In the version of <code>instance_eval</code>
 *  that takes a +String+, the optional second and third
 *  parameters supply a filename and starting line number that are used
 *  when reporting compilation errors.
 *
 *     class Klass
 *       def initialize
 *         @secret = 99
 *       end
 *     end
 *     k = Klass.new
 *     k.instance_eval { @secret }   #=> 99
 */

VALUE
rb_obj_instance_eval(int argc, VALUE *argv, VALUE self)
{
    VALUE klass;

    if (FIXNUM_P(self) || SYMBOL_P(self)) {
        klass = Qnil;
    }
    else {
        klass = rb_singleton_class(self);
    }
    return specific_eval(argc, argv, klass, self);
}

/*
 *  call-seq:
 *     obj.instance_exec(arg...) {|var...| block }                       => obj
 *
 *  Executes the given block within the context of the receiver
 *  (_obj_). In order to set the context, the variable +self+ is set
 *  to _obj_ while the code is executing, giving the code access to
 *  _obj_'s instance variables.  Arguments are passed as block parameters.
 *
 *     class Klass
 *       def initialize
 *         @secret = 99
 *       end
 *     end
 *     k = Klass.new
 *     k.instance_eval(5) {|x| @secret+x }   #=> 104
 */

VALUE
rb_obj_instance_exec(int argc, VALUE *argv, VALUE self)
{
    VALUE klass;

    if (FIXNUM_P(self) || SYMBOL_P(self)) {
        klass = Qnil;
    }
    else {
        klass = rb_singleton_class(self);
    }
    return yield_under(klass, self, rb_values_new2(argc, argv));
}

/*
 *  call-seq:
 *     mod.class_eval(string [, filename [, lineno]])  => obj
 *     mod.module_eval {|| block }                     => obj
 *
 *  Evaluates the string or block in the context of _mod_. This can
 *  be used to add methods to a class. <code>module_eval</code> returns
 *  the result of evaluating its argument. The optional _filename_
 *  and _lineno_ parameters set the text for error messages.
 *
 *     class Thing
 *     end
 *     a = %q{def hello() "Hello there!" end}
 *     Thing.module_eval(a)
 *     puts Thing.new.hello()
 *     Thing.module_eval("invalid code", "dummy", 123)
 *
 *  <em>produces:</em>
 *
 *     Hello there!
 *     dummy:123:in `module_eval': undefined local variable
 *         or method `code' for Thing:Class
 */

VALUE
rb_mod_module_eval(int argc, VALUE *argv, VALUE mod)
{
    return specific_eval(argc, argv, mod, mod);
}

/*
 *  call-seq:
 *     mod.module_exec(arg...) {|var...| block }       => obj
 *     mod.class_exec(arg...) {|var...| block }        => obj
 *
 *  Evaluates the given block in the context of the class/module.
 *  The method defined in the block will belong to the receiver.
 *
 *     class Thing
 *     end
 *     Thing.class_exec{
 *       def hello() "Hello there!" end
 *     }
 *     puts Thing.new.hello()
 *
 *  <em>produces:</em>
 *
 *     Hello there!
 */

VALUE
rb_mod_module_exec(int argc, VALUE *argv, VALUE mod)
{
    return yield_under(mod, mod, rb_values_new2(argc, argv));
}

VALUE rb_load_path;

NORETURN(static void load_failed(VALUE));

void
rb_load(VALUE fname, int wrap)
{
    VALUE tmp;
    int state;
    volatile int prohibit_int = rb_prohibit_interrupt;
    volatile ID callee, this_func;
    volatile VALUE wrapper = ruby_wrapper;
    volatile VALUE self = ruby_top_self;
    NODE * volatile last_node;
    NODE *saved_cref = ruby_cref;
    TMP_PROTECT;

    if (!wrap) rb_secure(4);
    FilePathValue(fname);
    fname = rb_str_new4(fname);
    tmp = rb_find_file(fname);
    if (!tmp) {
        load_failed(fname);
    }
    fname = tmp;

    ruby_errinfo = Qnil;        /* ensure */
    PUSH_VARS();
    PUSH_CLASS(ruby_wrapper);
    ruby_cref = top_cref;
    if (!wrap) {
        rb_secure(4);           /* should alter global state */
        ruby_class = rb_cObject;
        ruby_wrapper = 0;
    }
    else {
        /* load in anonymous module as toplevel */
        ruby_class = ruby_wrapper = rb_module_new();
        self = rb_obj_clone(ruby_top_self);
        rb_extend_object(self, ruby_wrapper);
        PUSH_CREF(ruby_wrapper);
    }
    PUSH_ITER(ITER_NOT);
    PUSH_FRAME();
    ruby_frame->callee = 0;
    ruby_frame->this_func = 0;
    ruby_frame->this_class = 0;
    ruby_frame->self = self;
    PUSH_SCOPE();
    /* default visibility is private at loading toplevel */
    SCOPE_SET(SCOPE_PRIVATE);
    PUSH_TAG(PROT_NONE);
    state = EXEC_TAG();
    callee = ruby_frame->callee;
    this_func = ruby_frame->this_func;
    last_node = ruby_current_node;
    if (!ruby_current_node && ruby_sourcefile) {
        last_node = NEW_BEGIN(0);
    }
    ruby_current_node = 0;
    if (state == 0) {
        NODE * volatile node;
        volatile int critical;

        DEFER_INTS;
        ruby_in_eval++;
        critical = rb_thread_critical;
        rb_thread_critical = Qtrue;
        rb_load_file(RSTRING(fname)->ptr);
        ruby_in_eval--;
        node = ruby_eval_tree;
        rb_thread_critical = critical;
        ALLOW_INTS;
        if (ruby_nerrs == 0) {
            eval_node(self, node);
        }
    }
    ruby_frame->callee = callee;
    ruby_frame->this_func = this_func;
    ruby_current_node = last_node;
    ruby_sourcefile = 0;
    ruby_set_current_source();
    if (ruby_scope->flags == SCOPE_ALLOCA && ruby_class == rb_cObject) {
        if (ruby_scope->local_tbl) /* toplevel was empty */
            free(ruby_scope->local_tbl);
    }
    POP_TAG();
    rb_prohibit_interrupt = prohibit_int;
    ruby_cref = saved_cref;
    POP_SCOPE();
    POP_FRAME();
    POP_ITER();
    POP_CLASS();
    POP_VARS();
    ruby_wrapper = wrapper;
    if (ruby_nerrs > 0) {
        ruby_nerrs = 0;
        rb_exc_raise(ruby_errinfo);
    }
    if (state) jump_tag_but_local_jump(state, Qundef);
    if (!NIL_P(ruby_errinfo))   /* exception during load */
        rb_exc_raise(ruby_errinfo);
}

void
rb_load_protect(VALUE fname, int wrap, int *state)
{
    int status;

    PUSH_THREAD_TAG();
    if ((status = EXEC_TAG()) == 0) {
        rb_load(fname, wrap);
    }
    else if (status == TAG_THREAD) {
        rb_thread_start_1();
    }
    POP_THREAD_TAG();
    if (state) *state = status;
}

/*
 *  call-seq:
 *     load(filename, wrap=false)   => true
 *
 *  Loads and executes the Ruby
 *  program in the file _filename_. If the filename does not
 *  resolve to an absolute path, the file is searched for in the library
 *  directories listed in <code>$:</code>. If the optional _wrap_
 *  parameter is +true+, the loaded script will be executed
 *  under an anonymous module, protecting the calling program's global
 *  namespace. In no circumstance will any local variables in the loaded
 *  file be propagated to the loading environment.
 */

static VALUE
rb_f_load(int argc, VALUE *argv)
{
    VALUE fname, wrap;

    rb_scan_args(argc, argv, "11", &fname, &wrap);
    rb_load(fname, RTEST(wrap));
    return Qtrue;
}

VALUE ruby_dln_librefs;
static VALUE rb_features;
static st_table *loading_tbl;

#define IS_SOEXT(e) (strcmp(e, ".so") == 0 || strcmp(e, ".o") == 0)
#ifdef DLEXT2
#define IS_DLEXT(e) (strcmp(e, DLEXT) == 0 || strcmp(e, DLEXT2) == 0)
#else
#define IS_DLEXT(e) (strcmp(e, DLEXT) == 0)
#endif

static int
rb_feature_p(const char *feature, const char *ext, int rb)
{
    VALUE v;
    char *f, *e;
    long i, len, elen;

    if (ext) {
        len = ext - feature;
        elen = strlen(ext);
    }
    else {
        len = strlen(feature);
        elen = 0;
    }
    for (i = 0; i < RARRAY(rb_features)->len; ++i) {
        v = RARRAY(rb_features)->ptr[i];
        f = StringValuePtr(v);
        if (strncmp(f, feature, len) != 0) continue;
        if (!*(e = f + len)) {
            if (ext) continue;
            return 'u';
        }
        if (*e != '.') continue;
        if ((!rb || !ext) && (IS_SOEXT(e) || IS_DLEXT(e))) {
            return 's';
        }
        if ((rb || !ext) && (strcmp(e, ".rb") == 0)) {
            return 'r';
        }
    }
    return 0;
}

static const char *const loadable_ext[] = {
    ".rb", DLEXT,
#ifdef DLEXT2
    DLEXT2,
#endif
    0
};

static int search_required(VALUE, VALUE *);

int
rb_provided(const char *feature)
{
    int i;
    char *buf;
    VALUE fname;

    if (rb_feature_p(feature, 0, Qfalse))
        return Qtrue;
    if (loading_tbl) {
        if (st_lookup(loading_tbl, (st_data_t)feature, 0)) return Qtrue;
        buf = ALLOCA_N(char, strlen(feature)+8);
        strcpy(buf, feature);
        for (i=0; loadable_ext[i]; i++) {
            strcpy(buf+strlen(feature), loadable_ext[i]);
            if (st_lookup(loading_tbl, (st_data_t)buf, 0)) return Qtrue;
        }
    }
    if (search_required(rb_str_new2(feature), &fname)) {
        feature = RSTRING(fname)->ptr;
        if (rb_feature_p(feature, 0, Qfalse))
            return Qtrue;
        if (loading_tbl && st_lookup(loading_tbl, (st_data_t)feature, 0))
            return Qtrue;
    }
    return Qfalse;
}

static void
rb_provide_feature(VALUE feature)
{
    rb_ary_push(rb_features, feature);
}

void
rb_provide(const char *feature)
{
    rb_provide_feature(rb_str_new2(feature));
}

static int
load_wait(char *ftptr)
{
    st_data_t th;

    if (!loading_tbl) return Qfalse;
    if (!st_lookup(loading_tbl, (st_data_t)ftptr, &th)) return Qfalse;
    do {
        if ((rb_thread_t)th == curr_thread) return Qtrue;
        CHECK_INTS;
    } while (st_lookup(loading_tbl, (st_data_t)ftptr, &th));
    return Qtrue;
}

/*
 *  call-seq:
 *     require(string)    => true or false
 *
 *  Ruby tries to load the library named _string_, returning
 *  +true+ if successful. If the filename does not resolve to
 *  an absolute path, it will be searched for in the directories listed
 *  in <code>$:</code>. If the file has the extension ``.rb'', it is
 *  loaded as a source file; if the extension is ``.so'', ``.o'', or
 *  ``.dll'', or whatever the default shared library extension is on
 *  the current platform, Ruby loads the shared library as a Ruby
 *  extension. Otherwise, Ruby tries adding ``.rb'', ``.so'', and so on
 *  to the name. The name of the loaded feature is added to the array in
 *  <code>$"</code>. A feature will not be loaded if it's name already
 *  appears in <code>$"</code>. However, the file name is not converted
 *  to an absolute path, so that ``<code>require 'a';require
 *  './a'</code>'' will load <code>a.rb</code> twice.
 *
 *     require "my-library.rb"
 *     require "db-driver"
 */

VALUE
rb_f_require(VALUE obj, VALUE fname)
{
    return rb_require_safe(fname, ruby_safe_level);
}

static int
search_required(VALUE fname, VALUE *path)
{
    VALUE tmp;
    char *ext, *ftptr;
    int type, ft = 0;

    *path = 0;
    ext = strrchr(ftptr = RSTRING(fname)->ptr, '.');
    if (ext && !strchr(ext, '/')) {
        if (strcmp(".rb", ext) == 0) {
            if (rb_feature_p(ftptr, ext, Qtrue)) return 'r';
            if (tmp = rb_find_file(fname)) {
                tmp = rb_file_expand_path(tmp, Qnil);
                ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
                if (!rb_feature_p(ftptr, ext, Qtrue))
                    *path = tmp;
                return 'r';
            }
            return 0;
        }
        else if (IS_SOEXT(ext)) {
            if (rb_feature_p(ftptr, ext, Qfalse)) return 's';
            tmp = rb_str_new(RSTRING(fname)->ptr, ext-RSTRING(fname)->ptr);
#ifdef DLEXT2
            OBJ_FREEZE(tmp);
            if (rb_find_file_ext(&tmp, loadable_ext+1)) {
                tmp = rb_file_expand_path(tmp, Qnil);
                ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
                if (!rb_feature_p(ftptr, ext, Qfalse))
                    *path = tmp;
                return 's';
            }
#else
            rb_str_cat2(tmp, DLEXT);
            OBJ_FREEZE(tmp);
            if (tmp = rb_find_file(tmp)) {
                tmp = rb_file_expand_path(tmp, Qnil);
                ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
                if (!rb_feature_p(ftptr, ext, Qfalse))
                    *path = tmp;
                return 's';
            }
#endif
        }
        else if (IS_DLEXT(ext)) {
            if (rb_feature_p(ftptr, ext, Qfalse)) return 's';
            if (tmp = rb_find_file(fname)) {
                tmp = rb_file_expand_path(tmp, Qnil);
                ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
                if (!rb_feature_p(ftptr, ext, Qfalse))
                    *path = tmp;
                return 's';
            }
        }
    }
    else if ((ft = rb_feature_p(ftptr, 0, Qfalse)) == 'r') {
        return 'r';
    }
    tmp = fname;
    type = rb_find_file_ext(&tmp, loadable_ext);
    tmp = rb_file_expand_path(tmp, Qnil);
    switch (type) {
      case 0:
        ftptr = RSTRING(tmp)->ptr;
        if (ft) break;
        return rb_feature_p(ftptr, 0, Qfalse);

      default:
        if (ft) break;
      case 1:
        ext = strrchr(ftptr = RSTRING(tmp)->ptr, '.');
        if (rb_feature_p(ftptr, ext, !--type)) break;
        *path = tmp;
    }
    return type ? 's' : 'r';
}

static void
load_failed(VALUE fname)
{
    rb_raise(rb_eLoadError, "no such file to load -- %s", RSTRING(fname)->ptr);
}

VALUE
rb_require_safe(VALUE fname, int safe)
{
    VALUE result = Qnil;
    volatile VALUE errinfo = ruby_errinfo;
    int state;
    struct {
        NODE *node;
        ID this_func, callee;
        int vmode, safe;
    } volatile saved;
    char *volatile ftptr = 0;

    saved.vmode = scope_vmode;
    saved.node = ruby_current_node;
    saved.callee = ruby_frame->callee;
    saved.this_func = ruby_frame->this_func;
    saved.safe = ruby_safe_level;
    PUSH_TAG(PROT_NONE);
    if ((state = EXEC_TAG()) == 0) {
        VALUE path;
        long handle;
        int found;

        ruby_safe_level = safe;
        FilePathValue(fname);
        *(volatile VALUE *)&fname = rb_str_new4(fname);
        found = search_required(fname, &path);
        if (found) {
            if (!path || load_wait(RSTRING(path)->ptr)) {
                result = Qfalse;
            }
            else {
                ruby_safe_level = 0;
                switch (found) {
                  case 'r':
                    /* loading ruby library should be serialized. */
                    if (!loading_tbl) {
                        loading_tbl = st_init_strtable();
                    }
                    /* partial state */
                    ftptr = ruby_strdup(RSTRING(path)->ptr);
                    st_insert(loading_tbl, (st_data_t)ftptr, (st_data_t)curr_thread);
                    rb_load(path, 0);
                    break;

                  case 's':
                    ruby_current_node = 0;
                    ruby_sourcefile = rb_source_filename(RSTRING(path)->ptr);
                    ruby_sourceline = 0;
                    ruby_frame->callee = 0;
                    ruby_frame->this_func = 0;
                    SCOPE_SET(SCOPE_PUBLIC);
                    handle = (long)dln_load(RSTRING(path)->ptr);
                    rb_ary_push(ruby_dln_librefs, LONG2NUM(handle));
                    break;
                }
                rb_provide_feature(path);
                result = Qtrue;
            }
        }
    }
    POP_TAG();
    ruby_current_node = saved.node;
    ruby_set_current_source();
    ruby_frame->this_func = saved.this_func;
    ruby_frame->callee = saved.callee;
    SCOPE_SET(saved.vmode);
    ruby_safe_level = saved.safe;
    if (ftptr) {
        if (st_delete(loading_tbl, (st_data_t *)&ftptr, 0)) { /* loading done */
            free(ftptr);
        }
    }
    if (state) JUMP_TAG(state);
    if (NIL_P(result)) {
        load_failed(fname);
    }
    ruby_errinfo = errinfo;

    return result;
}

VALUE
rb_require(const char *fname)
{
    VALUE fn = rb_str_new2(fname);
    OBJ_FREEZE(fn);
    return rb_require_safe(fn, ruby_safe_level);
}

static void
secure_visibility(VALUE self)
{
    if (ruby_safe_level >= 4 && !OBJ_TAINTED(self)) {
        rb_raise(rb_eSecurityError, "Insecure: can't change method visibility");
    }
}

static void
set_method_visibility(VALUE self, int argc, VALUE *argv, ID ex)
{
    int i;

    secure_visibility(self);
    for (i=0; i<argc; i++) {
        rb_export_method(self, rb_to_id(argv[i]), ex);
    }
    rb_clear_cache_by_class(self);
}

/*
 *  call-seq:
 *     public                 => self
 *     public(symbol, ...)    => self
 *
 *  With no arguments, sets the default visibility for subsequently
 *  defined methods to public. With arguments, sets the named methods to
 *  have public visibility.
 */

static VALUE
rb_mod_public(int argc, VALUE *argv, VALUE module)
{
    secure_visibility(module);
    if (argc == 0) {
        SCOPE_SET(SCOPE_PUBLIC);
    }
    else {
        set_method_visibility(module, argc, argv, NOEX_PUBLIC);
    }
    return module;
}

/*
 *  call-seq:
 *     protected                => self
 *     protected(symbol, ...)   => self
 *
 *  With no arguments, sets the default visibility for subsequently
 *  defined methods to protected. With arguments, sets the named methods
 *  to have protected visibility.
 */

static VALUE
rb_mod_protected(int argc, VALUE *argv, VALUE module)
{
    secure_visibility(module);
    if (argc == 0) {
        SCOPE_SET(SCOPE_PROTECTED);
    }
    else {
        set_method_visibility(module, argc, argv, NOEX_PROTECTED);
    }
    return module;
}

/*
 *  call-seq:
 *     private                 => self
 *     private(symbol, ...)    => self
 *
 *  With no arguments, sets the default visibility for subsequently
 *  defined methods to private. With arguments, sets the named methods
 *  to have private visibility.
 *
 *     module Mod
 *       def a()  end
 *       def b()  end
 *       private
 *       def c()  end
 *       private :a
 *     end
 *     Mod.private_instance_methods   #=> ["a", "c"]
 */

static VALUE
rb_mod_private(int argc, VALUE *argv, VALUE module)
{
    secure_visibility(module);
    if (argc == 0) {
        SCOPE_SET(SCOPE_PRIVATE);
    }
    else {
        set_method_visibility(module, argc, argv, NOEX_PRIVATE);
    }
    return module;
}

/*
 *  call-seq:
 *     mod.public_class_method(symbol, ...)    => mod
 *
 *  Makes a list of existing class methods public.
 */

static VALUE
rb_mod_public_method(int argc, VALUE *argv, VALUE obj)
{
    set_method_visibility(CLASS_OF(obj), argc, argv, NOEX_PUBLIC);
    return obj;
}

/*
 *  call-seq:
 *     mod.private_class_method(symbol, ...)   => mod
 *
 *  Makes existing class methods private. Often used to hide the default
 *  constructor <code>new</code>.
 *
 *     class SimpleSingleton  # Not thread safe
 *       private_class_method :new
 *       def SimpleSingleton.create(*args, &block)
 *         @me = new(*args, &block) if ! @me
 *         @me
 *       end
 *     end
 */

static VALUE
rb_mod_private_method(int argc, VALUE *argv, VALUE obj)
{
    set_method_visibility(CLASS_OF(obj), argc, argv, NOEX_PRIVATE);
    return obj;
}

/*
 *  call-seq:
 *     public
 *     public(symbol, ...)
 *
 *  With no arguments, sets the default visibility for subsequently
 *  defined methods to public. With arguments, sets the named methods to
 *  have public visibility.
 */

static VALUE
top_public(int argc, VALUE *argv)
{
    return rb_mod_public(argc, argv, rb_cObject);
}

static VALUE
top_private(int argc, VALUE *argv)
{
    return rb_mod_private(argc, argv, rb_cObject);
}

/*
 *  call-seq:
 *     module_function(symbol, ...)    => self
 *
 *  Creates module functions for the named methods. These functions may
 *  be called with the module as a receiver, and also become available
 *  as instance methods to classes that mix in the module. Module
 *  functions are copies of the original, and so may be changed
 *  independently. The instance-method versions are made private. If
 *  used with no arguments, subsequently defined methods become module
 *  functions.
 *
 *     module Mod
 *       def one
 *         "This is one"
 *       end
 *       module_function :one
 *     end
 *     class Cls
 *       include Mod
 *       def callOne
 *         one
 *       end
 *     end
 *     Mod.one     #=> "This is one"
 *     c = Cls.new
 *     c.callOne   #=> "This is one"
 *     module Mod
 *       def one
 *         "This is the new one"
 *       end
 *     end
 *     Mod.one     #=> "This is one"
 *     c.callOne   #=> "This is the new one"
 */

static VALUE
rb_mod_modfunc(int argc, VALUE *argv, VALUE module)
{
    int i;
    ID id;
    NODE *body;

    if (TYPE(module) != T_MODULE) {
        rb_raise(rb_eTypeError, "module_function must be called for modules");
    }

    secure_visibility(module);
    if (argc == 0) {
        SCOPE_SET(SCOPE_MODFUNC);
        return module;
    }

    set_method_visibility(module, argc, argv, NOEX_PRIVATE);
    for (i=0; i<argc; i++) {
        VALUE m = module;

        id = rb_to_id(argv[i]);
        for (;;) {
            body = search_method(m, id, &m);
            if (body == 0) {
                body = search_method(rb_cObject, id, &m);
            }
            if (body == 0 || body->nd_body == 0) {
                rb_bug("undefined method `%s'; can't happen", rb_id2name(id));
            }
            if (nd_type(body->nd_body) != NODE_ZSUPER) {
                break;          /* normal case: need not to follow 'super' link */
            }
            m = RCLASS(m)->super;
            if (!m) break;
        }
        rb_add_method(rb_singleton_class(module), id, body->nd_body, NOEX_PUBLIC);
    }
    return module;
}

/*
 *  call-seq:
 *     append_features(mod)   => mod
 *
 *  When this module is included in another, Ruby calls
 *  <code>append_features</code> in this module, passing it the
 *  receiving module in _mod_. Ruby's default implementation is
 *  to add the constants, methods, and module variables of this module
 *  to _mod_ if this module has not already been added to
 *  _mod_ or one of its ancestors. See also <code>Module#include</code>.
 */

static VALUE
rb_mod_append_features(VALUE module, VALUE dest)
{
    switch (TYPE(dest)) {
      case T_CLASS:
      case T_MODULE:
        break;
      default:
        Check_Type(dest, T_CLASS);
        break;
    }
    rb_include_module(dest, module);

    return module;
}

/*
 *  call-seq:
 *     include(module, ...)    => self
 *
 *  Invokes <code>Module.append_features</code> on each parameter in turn.
 */

static VALUE
rb_mod_include(int argc, VALUE *argv, VALUE module)
{
    int i;

    for (i=0; i<argc; i++) Check_Type(argv[i], T_MODULE);
    while (argc--) {
        rb_funcall(argv[argc], rb_intern("append_features"), 1, module);
        rb_funcall(argv[argc], rb_intern("included"), 1, module);
    }
    return module;
}

void
rb_obj_call_init(VALUE obj, int argc, VALUE *argv)
{
    PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
    rb_funcall2(obj, init, argc, argv);
    POP_ITER();
}

void
rb_extend_object(VALUE obj, VALUE module)
{
    rb_include_module(rb_singleton_class(obj), module);
}

/*
 *  call-seq:
 *     extend_object(obj)    => obj
 *
 *  Extends the specified object by adding this module's constants and
 *  methods (which are added as singleton methods). This is the callback
 *  method used by <code>Object#extend</code>.
 *
 *     module Picky
 *       def Picky.extend_object(o)
 *         if String === o
 *           puts "Can't add Picky to a String"
 *         else
 *           puts "Picky added to #{o.class}"
 *           super
 *         end
 *       end
 *     end
 *     (s = Array.new).extend Picky  # Call Object.extend
 *     (s = "quick brown fox").extend Picky
 *
 *  <em>produces:</em>
 *
 *     Picky added to Array
 *     Can't add Picky to a String
 */

static VALUE
rb_mod_extend_object(VALUE mod, VALUE obj)
{
    rb_extend_object(obj, mod);
    return obj;
}

/*
 *  call-seq:
 *     obj.extend(module, ...)    => obj
 *
 *  Adds to _obj_ the instance methods from each module given as a
 *  parameter.
 *
 *     module Mod
 *       def hello
 *         "Hello from Mod.\n"
 *       end
 *     end
 *
 *     class Klass
 *       def hello
 *         "Hello from Klass.\n"
 *       end
 *     end
 *
 *     k = Klass.new
 *     k.hello         #=> "Hello from Klass.\n"
 *     k.extend(Mod)   #=> #<Klass:0x401b3bc8>
 *     k.hello         #=> "Hello from Mod.\n"
 */

static VALUE
rb_obj_extend(int argc, VALUE *argv, VALUE obj)
{
    int i;

    if (argc == 0) {
        rb_raise(rb_eArgError, "wrong number of arguments (0 for 1)");
    }
    for (i=0; i<argc; i++) Check_Type(argv[i], T_MODULE);
    while (argc--) {
        rb_funcall(argv[argc], rb_intern("extend_object"), 1, obj);
        rb_funcall(argv[argc], rb_intern("extended"), 1, obj);
    }
    return obj;
}

/*
 *  call-seq:
 *     include(module, ...)   => self
 *
 *  Invokes <code>Module.append_features</code>
 *  on each parameter in turn. Effectively adds the methods and constants
 *  in each module to the receiver.
 */

static VALUE
top_include(int argc, VALUE *argv, VALUE self)
{
    rb_secure(4);
    if (ruby_wrapper) {
        rb_warning("main#include in the wrapped load is effective only in wrapper module");
        return rb_mod_include(argc, argv, ruby_wrapper);
    }
    return rb_mod_include(argc, argv, rb_cObject);
}

VALUE rb_f_trace_var(int, VALUE *);
VALUE rb_f_untrace_var(int, VALUE *);

static void
errinfo_setter(VALUE val, ID id, VALUE *var)
{
    if (!NIL_P(val) && !rb_obj_is_kind_of(val, rb_eException)) {
        rb_raise(rb_eTypeError, "assigning non-exception to $!");
    }
    *var = val;
}

static VALUE
errat_getter(ID id)
{
    return get_backtrace(ruby_errinfo);
}

static void
errat_setter(VALUE val, ID id, VALUE *var)
{
    if (NIL_P(ruby_errinfo)) {
        rb_raise(rb_eArgError, "$! not set");
    }
    set_backtrace(ruby_errinfo, val);
}

/*
 *  call-seq:
 *     local_variables    => array
 *
 *  Returns the names of the current local variables.
 *
 *     fred = 1
 *     for i in 1..10
 *        # ...
 *     end
 *     local_variables   #=> ["fred", "i"]
 */

static VALUE
rb_f_local_variables(void)
{
    ID *tbl;
    int n, i;
    VALUE ary = rb_ary_new();
    struct RVarmap *vars;

    tbl = ruby_scope->local_tbl;
    if (tbl) {
        n = *tbl++;
        for (i=2; i<n; i++) {   /* skip first 2 ($_ and $~) */
            if (!rb_is_local_id(tbl[i])) continue; /* skip flip states */
            rb_ary_push(ary, rb_str_new2(rb_id2name(tbl[i])));
        }
    }

    vars = ruby_dyna_vars;
    while (vars) {
        if (vars->id && rb_is_local_id(vars->id)) { /* skip $_, $~ and flip states */
            rb_ary_push(ary, rb_str_new2(rb_id2name(vars->id)));
        }
        vars = vars->next;
    }

    return ary;
}

static VALUE rb_f_catch(VALUE,VALUE);
NORETURN(static VALUE rb_f_throw(int,VALUE*));

struct end_proc_data {
    void (*func)();
    VALUE data;
    int safe;
    struct end_proc_data *next;
};

static struct end_proc_data *end_procs, *ephemeral_end_procs, *tmp_end_procs;

void
rb_set_end_proc(void (*func) (VALUE), VALUE data)
{
    struct end_proc_data *link = ALLOC(struct end_proc_data);
    struct end_proc_data **list;

    if (ruby_wrapper) list = &ephemeral_end_procs;
    else              list = &end_procs;
    link->next = *list;
    link->func = func;
    link->data = data;
    link->safe = ruby_safe_level;
    *list = link;
}

void
rb_mark_end_proc(void)
{
    struct end_proc_data *link;

    link = end_procs;
    while (link) {
        rb_gc_mark(link->data);
        link = link->next;
    }
    link = ephemeral_end_procs;
    while (link) {
        rb_gc_mark(link->data);
        link = link->next;
    }
    link = tmp_end_procs;
    while (link) {
        rb_gc_mark(link->data);
        link = link->next;
    }
}

static void
call_end_proc(VALUE data)
{
    PUSH_ITER(ITER_NOT);
    PUSH_FRAME();
    ruby_frame->self = ruby_frame->prev->self;
    ruby_frame->node = 0;
    ruby_frame->callee = 0;
    ruby_frame->this_func = 0;
    ruby_frame->this_class = 0;
    proc_invoke(data, rb_ary_new2(0), Qundef, 0);
    POP_FRAME();
    POP_ITER();
}

static void
rb_f_END(void)
{
    PUSH_FRAME();
    ruby_frame->argc = 0;
    ruby_frame->iter = ITER_CUR;
    rb_set_end_proc(call_end_proc, rb_block_proc());
    POP_FRAME();
}

/*
 *  call-seq:
 *     at_exit { block } -> proc
 *
 *  Converts _block_ to a +Proc+ object (and therefore
 *  binds it at the point of call) and registers it for execution when
 *  the program exits. If multiple handlers are registered, they are
 *  executed in reverse order of registration.
 *
 *     def do_at_exit(str1)
 *       at_exit { print str1 }
 *     end
 *     at_exit { puts "cruel world" }
 *     do_at_exit("goodbye ")
 *     exit
 *
 *  <em>produces:</em>
 *
 *     goodbye cruel world
 */

static VALUE
rb_f_at_exit(void)
{
    VALUE proc;

    if (!rb_block_given_p()) {
        rb_raise(rb_eArgError, "called without a block");
    }
    proc = rb_block_proc();
    rb_set_end_proc(call_end_proc, proc);
    return proc;
}

void
rb_exec_end_proc(void)
{
    struct end_proc_data *link, *tmp;
    int status;
    volatile int safe = ruby_safe_level;

    while (ephemeral_end_procs) {
        tmp_end_procs = link = ephemeral_end_procs;
        ephemeral_end_procs = 0;
        while (link) {
            PUSH_TAG(PROT_NONE);
            if ((status = EXEC_TAG()) == 0) {
                ruby_safe_level = link->safe;
                (*link->func)(link->data);
            }
            POP_TAG();
            if (status) {
                error_handle(status);
            }
            tmp = link;
            tmp_end_procs = link = link->next;
            free(tmp);
        }
    }
    while (end_procs) {
        tmp_end_procs = link = end_procs;
        end_procs = 0;
        while (link) {
            PUSH_TAG(PROT_NONE);
            if ((status = EXEC_TAG()) == 0) {
                ruby_safe_level = link->safe;
                (*link->func)(link->data);
            }
            POP_TAG();
            if (status) {
                error_handle(status);
            }
            tmp = link;
            tmp_end_procs = link = link->next;
            free(tmp);
        }
    }
    ruby_safe_level = safe;
}

void
Init_eval(void)
{
    init = rb_intern("initialize");
    eqq = rb_intern("===");
    each = rb_intern("each");

    aref = rb_intern("[]");
    aset = rb_intern("[]=");
    match = rb_intern("=~");
    missing = rb_intern("method_missing");
    added = rb_intern("method_added");
    singleton_added = rb_intern("singleton_method_added");
    removed = rb_intern("method_removed");
    singleton_removed = rb_intern("singleton_method_removed");
    undefined = rb_intern("method_undefined");
    singleton_undefined = rb_intern("singleton_method_undefined");

    __id__ = rb_intern("__id__");
    __send__ = rb_intern("__send__");

    rb_global_variable((VALUE*)&top_scope);
    rb_global_variable((VALUE*)&ruby_eval_tree);
    rb_global_variable((VALUE*)&ruby_dyna_vars);

    rb_define_virtual_variable("$@", errat_getter, errat_setter);
    rb_define_hooked_variable("$!", &ruby_errinfo, 0, errinfo_setter);

    rb_define_global_function("eval", rb_f_eval, -1);
    rb_define_global_function("iterator?", rb_f_block_given_p, 0);
    rb_define_global_function("block_given?", rb_f_block_given_p, 0);
    rb_define_global_function("method_missing", rb_method_missing, -1);
    rb_define_global_function("loop", rb_f_loop, 0);

    rb_define_method(rb_mKernel, "respond_to?", obj_respond_to, -1);
    respond_to   = rb_intern("respond_to?");
    rb_global_variable((VALUE*)&basic_respond_to);
    basic_respond_to = rb_method_node(rb_cObject, respond_to);

    rb_define_global_function("raise", rb_f_raise, -1);
    rb_define_global_function("fail", rb_f_raise, -1);

    rb_define_global_function("caller", rb_f_caller, -1);

    rb_define_global_function("exit", rb_f_exit, -1);
    rb_define_global_function("abort", rb_f_abort, -1);

    rb_define_global_function("at_exit", rb_f_at_exit, 0);

    rb_define_global_function("catch", rb_f_catch, 1);
    rb_define_global_function("throw", rb_f_throw, -1);
    rb_define_global_function("global_variables", rb_f_global_variables, 0); /* in variable.c */
    rb_define_global_function("local_variables", rb_f_local_variables, 0);

    rb_define_method(rb_mKernel, "send", rb_f_send, -1);
    rb_define_method(rb_mKernel, "__send__", rb_f_send, -1);
    rb_define_method(rb_mKernel, "funcall", rb_f_funcall, -1);
    rb_define_method(rb_mKernel, "instance_eval", rb_obj_instance_eval, -1);
    rb_define_method(rb_mKernel, "instance_exec", rb_obj_instance_exec, -1);

    rb_define_private_method(rb_cModule, "append_features", rb_mod_append_features, 1);
    rb_define_private_method(rb_cModule, "extend_object", rb_mod_extend_object, 1);
    rb_define_private_method(rb_cModule, "include", rb_mod_include, -1);
    rb_define_private_method(rb_cModule, "public", rb_mod_public, -1);
    rb_define_private_method(rb_cModule, "protected", rb_mod_protected, -1);
    rb_define_private_method(rb_cModule, "private", rb_mod_private, -1);
    rb_define_private_method(rb_cModule, "module_function", rb_mod_modfunc, -1);
    rb_define_method(rb_cModule, "method_defined?", rb_mod_method_defined, 1);
    rb_define_method(rb_cModule, "public_method_defined?", rb_mod_public_method_defined, 1);
    rb_define_method(rb_cModule, "private_method_defined?", rb_mod_private_method_defined, 1);
    rb_define_method(rb_cModule, "protected_method_defined?", rb_mod_protected_method_defined, 1);
    rb_define_method(rb_cModule, "public_class_method", rb_mod_public_method, -1);
    rb_define_method(rb_cModule, "private_class_method", rb_mod_private_method, -1);
    rb_define_method(rb_cModule, "module_eval", rb_mod_module_eval, -1);
    rb_define_method(rb_cModule, "class_eval", rb_mod_module_eval, -1);
    rb_define_method(rb_cModule, "module_exec", rb_mod_module_exec, -1);
    rb_define_method(rb_cModule, "class_exec", rb_mod_module_exec, -1);

    rb_undef_method(rb_cClass, "module_function");

    rb_define_private_method(rb_cModule, "remove_method", rb_mod_remove_method, -1);
    rb_define_private_method(rb_cModule, "undef_method", rb_mod_undef_method, -1);
    rb_define_private_method(rb_cModule, "alias_method", rb_mod_alias_method, 2);
    rb_define_private_method(rb_cModule, "define_method", rb_mod_define_method, -1);

    rb_define_singleton_method(rb_cModule, "nesting", rb_mod_nesting, 0);
    rb_define_singleton_method(rb_cModule, "constants", rb_mod_s_constants, 0);

    rb_define_singleton_method(ruby_top_self, "include", top_include, -1);
    rb_define_singleton_method(ruby_top_self, "public", top_public, -1);
    rb_define_singleton_method(ruby_top_self, "private", top_private, -1);

    rb_define_method(rb_mKernel, "extend", rb_obj_extend, -1);

    rb_define_global_function("trace_var", rb_f_trace_var, -1); /* in variable.c */
    rb_define_global_function("untrace_var", rb_f_untrace_var, -1); /* in variable.c */

    rb_define_global_function("set_trace_func", set_trace_func, 1);
    rb_global_variable(&trace_func);

    rb_define_virtual_variable("$SAFE", safe_getter, safe_setter);
}

/*
 *  call-seq:
 *     mod.autoload(name, filename)   => nil
 *
 *  Registers _filename_ to be loaded (using <code>Kernel::require</code>)
 *  the first time that _name_ (which may be a <code>String</code> or
 *  a symbol) is accessed in the namespace of _mod_.
 *
 *     module A
 *     end
 *     A.autoload(:B, "b")
 *     A::B.doit            # autoloads "b"
 */

static VALUE
rb_mod_autoload(VALUE mod, VALUE sym, VALUE file)
{
    ID id = rb_to_id(sym);

    Check_SafeStr(file);
    rb_autoload(mod, id, RSTRING(file)->ptr);
    return Qnil;
}

/*
 *  call-seq:
 *     mod.autoload?(name)   => String or nil
 *
 *  Returns _filename_ to be loaded if _name_ is registered as
 *  +autoload+ in the namespace of _mod_.
 *
 *     module A
 *     end
 *     A.autoload(:B, "b")
 *     A.autoload?(:B)            # => "b"
 */

static VALUE
rb_mod_autoload_p(VALUE mod, VALUE sym)
{
    return rb_autoload_p(mod, rb_to_id(sym));
}

/*
 *  call-seq:
 *     autoload(module, filename)   => nil
 *
 *  Registers _filename_ to be loaded (using <code>Kernel::require</code>)
 *  the first time that _module_ (which may be a <code>String</code> or
 *  a symbol) is accessed.
 *
 *     autoload(:MyModule, "/usr/local/lib/modules/my_module.rb")
 */

static VALUE
rb_f_autoload(VALUE obj, VALUE sym, VALUE file)
{
    return rb_mod_autoload(ruby_cbase, sym, file);
}

/*
 *  call-seq:
 *     autoload(module)   => filename or nil
 *
 *  Returns _filename_ to be loaded if _module_ is registered as
 *  +autoload+.
 *
 *     autoload(:MyModule, "/usr/local/lib/modules/my_module.rb")
 *     autoload?(:MyModule)  # => "/usr/local/lib/modules/my_module.rb"
 */

static VALUE
rb_f_autoload_p(VALUE obj, VALUE sym)
{
    /* use ruby_cbase as same as rb_f_autoload. */
    return rb_mod_autoload_p(ruby_cbase, sym);
}

void
Init_load(void)
{
    rb_define_readonly_variable("$:", &rb_load_path);
    rb_define_readonly_variable("$-I", &rb_load_path);
    rb_define_readonly_variable("$LOAD_PATH", &rb_load_path);
    rb_load_path = rb_ary_new();

    rb_define_readonly_variable("$\"", &rb_features);
    rb_define_readonly_variable("$LOADED_FEATURES", &rb_features);
    rb_features = rb_ary_new();

    rb_define_global_function("load", rb_f_load, -1);
    rb_define_global_function("require", rb_f_require, 1);
    rb_define_method(rb_cModule, "autoload",  rb_mod_autoload,   2);
    rb_define_method(rb_cModule, "autoload?", rb_mod_autoload_p, 1);
    rb_define_global_function("autoload",  rb_f_autoload,   2);
    rb_define_global_function("autoload?", rb_f_autoload_p, 1);
    rb_global_variable(&ruby_wrapper);

    rb_global_variable(&ruby_dln_librefs);
    ruby_dln_librefs = rb_ary_new();
}

static void
scope_dup(struct SCOPE *scope)
{
    volatile ID *tbl;
    VALUE *vars;

    scope->flags |= SCOPE_DONT_RECYCLE;
    if (scope->flags & SCOPE_MALLOC) return;

    if (scope->local_tbl) {
        tbl = scope->local_tbl;
        vars = ALLOC_N(VALUE, tbl[0]+1);
        *vars++ = scope->local_vars[-1];
        MEMCPY(vars, scope->local_vars, VALUE, tbl[0]);
        scope->local_vars = vars;
        scope->flags |= SCOPE_MALLOC;
    }
}

static void
blk_mark(struct BLOCK *data)
{
    while (data) {
        rb_gc_mark_frame(&data->frame);
        rb_gc_mark((VALUE)data->scope);
        rb_gc_mark((VALUE)data->var);
        rb_gc_mark((VALUE)data->body);
        rb_gc_mark((VALUE)data->self);
        rb_gc_mark((VALUE)data->dyna_vars);
        rb_gc_mark((VALUE)data->cref);
        rb_gc_mark(data->wrapper);
        rb_gc_mark(data->block_obj);
        data = data->prev;
    }
}

static void
frame_free(struct FRAME *frame)
{
    struct FRAME *tmp;

    frame = frame->prev;
    while (frame) {
        tmp = frame;
        frame = frame->prev;
        free(tmp);
    }
}

static void
blk_free(struct BLOCK *data)
{
    void *tmp;

    while (data) {
        frame_free(&data->frame);
        tmp = data;
        data = data->prev;
        free(tmp);
    }
}

static void
frame_dup(struct FRAME *frame)
{
    struct FRAME *tmp;

    for (;;) {
        frame->tmp = 0;         /* should not preserve tmp */
        if (!frame->prev) break;
        tmp = ALLOC(struct FRAME);
        *tmp = *frame->prev;
        frame->prev = tmp;
        frame = tmp;
    }
}

static void
blk_copy_prev(struct BLOCK *block)
{
    struct BLOCK *tmp;
    struct RVarmap* vars;

    while (block->prev) {
        tmp = ALLOC_N(struct BLOCK, 1);
        MEMCPY(tmp, block->prev, struct BLOCK, 1);
        scope_dup(tmp->scope);
        frame_dup(&tmp->frame);

        for (vars = tmp->dyna_vars; vars; vars = vars->next) {
            if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
            FL_SET(vars, DVAR_DONT_RECYCLE);
        }

        block->prev = tmp;
        block = tmp;
    }
}

static void
blk_dup(struct BLOCK *dup, struct BLOCK *orig)
{
    MEMCPY(dup, orig, struct BLOCK, 1);
    frame_dup(&dup->frame);

    if (dup->iter) {
        blk_copy_prev(dup);
    }
    else {
        dup->prev = 0;
    }
}

/*
 * MISSING: documentation
 */

static VALUE
proc_clone(VALUE self)
{
    struct BLOCK *orig, *data;
    VALUE bind;

    Data_Get_Struct(self, struct BLOCK, orig);
    bind = Data_Make_Struct(rb_obj_class(self),struct BLOCK,blk_mark,blk_free,data);
    CLONESETUP(bind, self);
    blk_dup(data, orig);

    return bind;
}

/*
 * MISSING: documentation
 */

static VALUE
proc_dup(VALUE self)
{
    struct BLOCK *orig, *data;
    VALUE bind;

    Data_Get_Struct(self, struct BLOCK, orig);
    bind = Data_Make_Struct(rb_obj_class(self),struct BLOCK,blk_mark,blk_free,data);
    blk_dup(data, orig);

    return bind;
}

/*
 *  call-seq:
 *     binding -> a_binding
 *
 *  Returns a +Binding+ object, describing the variable and
 *  method bindings at the point of call. This object can be used when
 *  calling +eval+ to execute the evaluated command in this
 *  environment. Also see the description of class +Binding+.
 *
 *     def getBinding(param)
 *       return binding
 *     end
 *     b = getBinding("hello")
 *     eval("param", b)   #=> "hello"
 */

static VALUE
rb_f_binding(VALUE self)
{
    struct BLOCK *data, *p;
    struct RVarmap *vars;
    VALUE bind;

    PUSH_BLOCK(0,0);
    bind = Data_Make_Struct(rb_cBinding,struct BLOCK,blk_mark,blk_free,data);
    *data = *ruby_block;

    data->orig_thread = rb_thread_current();
    data->wrapper = ruby_wrapper;
    data->iter = rb_f_block_given_p();
    frame_dup(&data->frame);
    if (ruby_frame->prev) {
        data->frame.callee = ruby_frame->prev->callee;
        data->frame.this_func = ruby_frame->prev->this_func;
        data->frame.this_class = ruby_frame->prev->this_class;
    }

    if (data->iter) {
        blk_copy_prev(data);
    }
    else {
        data->prev = 0;
    }

    for (p = data; p; p = p->prev) {
        for (vars = p->dyna_vars; vars; vars = vars->next) {
            if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
            FL_SET(vars, DVAR_DONT_RECYCLE);
        }
    }
    scope_dup(data->scope);
    POP_BLOCK();

    return bind;
}

/*
 *  call-seq:
 *     binding.eval(string [, filename [,lineno]])  => obj
 *
 *  Evaluates the Ruby expression(s) in <em>string</em>, in the
 *  <em>binding</em>'s context.  If the optional <em>filename</em> and
 *  <em>lineno</em> parameters are present, they will be used when
 *  reporting syntax errors.
 *
 *     def getBinding(param)
 *       return binding
 *     end
 *     b = getBinding("hello")
 *     b.eval("param")   #=> "hello"
 */

static VALUE
bind_eval(int argc, VALUE *argv, VALUE bind)
{
    struct BLOCK *data;
    VALUE args[4];

    rb_scan_args(argc, argv, "12", &args[0], &args[2], &args[3]);
    args[1] = bind;
    Data_Get_Struct(bind, struct BLOCK, data);

    return rb_f_eval(argc+1, args, data->self);
}

#define PROC_TSHIFT (FL_USHIFT+1)
#define PROC_TMASK  (FL_USER1|FL_USER2|FL_USER3)
#define PROC_TMAX   (PROC_TMASK >> PROC_TSHIFT)
#define PROC_SAFE_SAVED FL_USER4

#define SAFE_LEVEL_MAX PROC_TMASK

#define proc_safe_level_p(data) (RBASIC(data)->flags & PROC_SAFE_SAVED)

static void
proc_save_safe_level(VALUE data)
{
    int safe = ruby_safe_level;
    if (safe > PROC_TMAX) safe = PROC_TMAX;
    FL_SET(data, (safe << PROC_TSHIFT) & PROC_TMASK);
    FL_SET(data, PROC_SAFE_SAVED);
}

static int
proc_get_safe_level(VALUE data)
{
    return (RBASIC(data)->flags & PROC_TMASK) >> PROC_TSHIFT;
}

static void
proc_set_safe_level(VALUE data)
{
    if (!proc_safe_level_p(data)) return;
    ruby_safe_level = proc_get_safe_level(data);
}

static VALUE
proc_alloc(VALUE klass, int proc)
{
    volatile VALUE block;
    struct BLOCK *data, *p;
    struct RVarmap *vars;

    if (!rb_block_given_p() && !rb_f_block_given_p()) {
        rb_raise(rb_eArgError, "tried to create Proc object without a block");
    }
    if (proc && !rb_block_given_p()) {
        rb_warn("tried to create Proc object without a block");
    }

    if (!proc && ruby_block->block_obj) {
        VALUE obj = ruby_block->block_obj;
        if (CLASS_OF(obj) != klass) {
            obj = proc_clone(obj);
            RBASIC(obj)->klass = klass;
        }
        return obj;
    }
    block = Data_Make_Struct(klass, struct BLOCK, blk_mark, blk_free, data);
    *data = *ruby_block;

    data->orig_thread = rb_thread_current();
    data->wrapper = ruby_wrapper;
    data->iter = data->prev?Qtrue:Qfalse;
    data->block_obj = block;
    frame_dup(&data->frame);
    if (data->iter) {
        blk_copy_prev(data);
    }
    else {
        data->prev = 0;
    }

    for (p = data; p; p = p->prev) {
        for (vars = p->dyna_vars; vars; vars = vars->next) {
            if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
            FL_SET(vars, DVAR_DONT_RECYCLE);
        }
    }
    scope_dup(data->scope);
    proc_save_safe_level(block);
    if (proc) {
        data->flags |= BLOCK_LAMBDA;
    }
    else {
        ruby_block->block_obj = block;
    }

    return block;
}

/*
 *  call-seq:
 *     Proc.new {|...| block } => a_proc
 *     Proc.new                => a_proc
 *
 *  Creates a new <code>Proc</code> object, bound to the current
 *  context. <code>Proc::new</code> may be called without a block only
 *  within a method with an attached block, in which case that block is
 *  converted to the <code>Proc</code> object.
 *
 *     def proc_from
 *       Proc.new
 *     end
 *     proc = proc_from { "hello" }
 *     proc.call   #=> "hello"
 */

static VALUE
proc_s_new(int argc, VALUE *argv, VALUE klass)
{
    VALUE block = proc_alloc(klass, Qfalse);

    rb_obj_call_init(block, argc, argv);
    return block;
}

/*
 * call-seq:
 *   proc   { |...| block }  => a_proc
 *
 * Equivalent to <code>Proc.new</code>.
 */

VALUE
rb_block_proc(void)
{
    return proc_alloc(rb_cProc, Qfalse);
}

VALUE
rb_f_lambda(void)
{
    rb_warn("rb_f_lambda() is deprecated; use rb_block_proc() instead");
    return proc_alloc(rb_cProc, Qtrue);
}

/*
 * call-seq:
 *   lambda { |...| block }  => a_proc
 *
 * Equivalent to <code>Proc.new</code>, except the resulting Proc objects
 * check the number of parameters passed when called.
 */

static VALUE
proc_lambda(void)
{
    return proc_alloc(rb_cProc, Qtrue);
}

static int
block_orphan(struct BLOCK *data)
{
    if (data->scope->flags & SCOPE_NOSTACK) {
        return 1;
    }
    if (data->orig_thread != rb_thread_current()) {
        return 1;
    }
    return 0;
}

static VALUE
proc_invoke(VALUE proc, VALUE args /* OK */, VALUE self, VALUE klass)
{
    struct BLOCK * volatile old_block;
    struct BLOCK _block;
    struct BLOCK *data;
    volatile VALUE result = Qundef;
    int state;
    volatile int safe = ruby_safe_level;
    volatile VALUE old_wrapper = ruby_wrapper;
    volatile int pcall, avalue = Qtrue;
    VALUE bvar = Qnil, tmp = args;

    Data_Get_Struct(proc, struct BLOCK, data);
    pcall = (data->flags & BLOCK_LAMBDA) ? YIELD_LAMBDA_CALL : 0;
    if (!pcall && RARRAY(args)->len == 1) {
        avalue = Qfalse;
        args = RARRAY(args)->ptr[0];
    }
    if (rb_block_given_p() && ruby_frame->callee) {
        if (klass != ruby_frame->this_class)
            klass = rb_obj_class(proc);
        bvar = rb_block_proc();
    }

    PUSH_VARS();
    ruby_wrapper = data->wrapper;
    ruby_dyna_vars = data->dyna_vars;
    /* PUSH BLOCK from data */
    old_block = ruby_block;
    _block = *data;
    _block.block_obj = bvar;
    if (self != Qundef) _block.frame.self = self;
    if (klass) _block.frame.this_class = klass;
    _block.frame.argc = RARRAY(tmp)->len;
    if (_block.frame.argc && (ruby_frame->flags & FRAME_DMETH)) {
        NEWOBJ(scope, struct SCOPE);
        OBJSETUP(scope, tmp, T_SCOPE);
        scope->local_tbl = _block.scope->local_tbl;
        scope->local_vars = _block.scope->local_vars;
        _block.scope = scope;
    }
    ruby_block = &_block;

    PUSH_ITER(ITER_CUR);
    ruby_frame->iter = ITER_CUR;
    PUSH_TAG((pcall&YIELD_LAMBDA_CALL) ? PROT_LAMBDA : PROT_NONE);
    state = EXEC_TAG();
    if (state == 0) {
        proc_set_safe_level(proc);
        result = rb_yield_0(args, self, (self!=Qundef)?CLASS_OF(self):0,
                            pcall | YIELD_PROC_CALL, avalue);
    }
    else if (TAG_DST()) {
        result = prot_tag->retval;
    }
    POP_TAG();
    POP_ITER();
    ruby_block = old_block;
    ruby_wrapper = old_wrapper;
    POP_VARS();
    ruby_safe_level = safe;

    switch (state) {
      case 0:
        break;
      case TAG_RETRY:
        proc_jump_error(TAG_RETRY, Qnil); /* xxx */
        JUMP_TAG(state);
        break;
      case TAG_BREAK:
        if (!pcall && result != Qundef) {
            proc_jump_error(state, result);
        }
      case TAG_RETURN:
        if (result != Qundef) {
            if (pcall) break;
            return_jump(result);
        }
      default:
        JUMP_TAG(state);
    }
    return result;
}

/* CHECKME: are the argument checking semantics correct? */

/*
 *  call-seq:
 *     prc.call(params,...)   => obj
 *     prc[params,...]        => obj
 *
 *  Invokes the block, setting the block's parameters to the values in
 *  <i>params</i> using something close to method calling semantics.
 *  Generates a warning if multiple values are passed to a proc that
 *  expects just one (previously this silently converted the parameters
 *  to an array).
 *
 *  For procs created using <code>Kernel.proc</code>, generates an
 *  error if the wrong number of parameters
 *  are passed to a proc with multiple parameters. For procs created using
 *  <code>Proc.new</code>, extra parameters are silently discarded.
 *
 *  Returns the value of the last expression evaluated in the block. See
 *  also <code>Proc#yield</code>.
 *
 *     a_proc = Proc.new {|a, *b| b.collect {|i| i*a }}
 *     a_proc.call(9, 1, 2, 3)   #=> [9, 18, 27]
 *     a_proc[9, 1, 2, 3]        #=> [9, 18, 27]
 *     a_proc = Proc.new {|a,b| a}
 *     a_proc.call(1,2,3)
 *
 *  <em>produces:</em>
 *
 *     prog.rb:5: wrong number of arguments (3 for 2) (ArgumentError)
 *      from prog.rb:4:in `call'
 *      from prog.rb:5
 */

VALUE
rb_proc_call(VALUE proc, VALUE args /* OK */)
{
    return proc_invoke(proc, args, Qundef, 0);
}

int
rb_proc_arity(VALUE proc)
{
    struct BLOCK *data;
    NODE *var, *list;
    int n;

    Data_Get_Struct(proc, struct BLOCK, data);
    var = data->var;
    if (var == 0) {
        if (data->body && nd_type(data->body) == NODE_IFUNC &&
            data->body->nd_cfnc == bmcall) {
            return method_arity(data->body->nd_tval);
        }
        return 0;
    }
    if (var == (NODE*)1) return 0;
    if (var == (NODE*)2) return 0;
    if (nd_type(var) == NODE_BLOCK_ARG) {
        var = var->nd_args;
        if (var == (NODE*)1) return 0;
        if (var == (NODE*)2) return 0;
    }
    switch (nd_type(var)) {
      default:
        return 1;
      case NODE_MASGN:
        list = var->nd_head;
        n = 0;
        while (list) {
            n++;
            list = list->nd_next;
        }
        if (var->nd_args) return -n-1;
        return n;
    }
}

/*
 *  call-seq:
 *     prc.arity -> fixnum
 *
 *  Returns the number of arguments that would not be ignored. If the block
 *  is declared to take no arguments, returns 0. If the block is known
 *  to take exactly n arguments, returns n. If the block has optional
 *  arguments, return -n-1, where n is the number of mandatory
 *  arguments. A <code>proc</code> with no argument declarations
 *  is the same a block declaring <code>||</code> as its arguments.
 *
 *     Proc.new {}.arity          #=>  0
 *     Proc.new {||}.arity        #=>  0
 *     Proc.new {|a|}.arity       #=>  1
 *     Proc.new {|a,b|}.arity     #=>  2
 *     Proc.new {|a,b,c|}.arity   #=>  3
 *     Proc.new {|*a|}.arity      #=> -1
 *     Proc.new {|a,*b|}.arity    #=> -2
 */

static VALUE
proc_arity(VALUE proc)
{
    int arity = rb_proc_arity(proc);
    return INT2FIX(arity);
}

/*
 * call-seq:
 *   prc == other_proc   =>  true or false
 *
 * Return <code>true</code> if <i>prc</i> is the same object as
 * <i>other_proc</i>, or if they are both procs with the same body.
 */

static VALUE
proc_eq(VALUE self, VALUE other)
{
    struct BLOCK *data, *data2;

    if (self == other) return Qtrue;
    if (TYPE(other) != T_DATA) return Qfalse;
    if (RDATA(other)->dmark != (RUBY_DATA_FUNC)blk_mark) return Qfalse;
    if (CLASS_OF(self) != CLASS_OF(other)) return Qfalse;
    Data_Get_Struct(self, struct BLOCK, data);
    Data_Get_Struct(other, struct BLOCK, data2);
    if (data->body != data2->body) return Qfalse;
    if (data->var != data2->var) return Qfalse;
    if (data->scope != data2->scope) return Qfalse;
    if (data->dyna_vars != data2->dyna_vars) return Qfalse;
    if (data->flags != data2->flags) return Qfalse;

    return Qtrue;
}

/*
 * call-seq:
 *   prc.hash   =>  integer
 *
 * Return hash value corresponding to proc body.
 */

static VALUE
proc_hash(VALUE self)
{
    struct BLOCK *data;
    long hash;

    Data_Get_Struct(self, struct BLOCK, data);
    hash = (long)data->body;
    hash ^= (long)data->var;
    hash ^= data->frame.uniq << 16;
    hash ^= data->flags;

    return INT2FIX(hash);
}

/*
 * call-seq:
 *   prc.to_s   => string
 *
 * Shows the unique identifier for this proc, along with
 * an indication of where the proc was defined.
 */

static VALUE
proc_to_s(VALUE self)
{
    struct BLOCK *data;
    NODE *node;
    char *cname = rb_obj_classname(self);
    VALUE str;

    Data_Get_Struct(self, struct BLOCK, data);
    if ((node = data->frame.node) || (node = data->body)) {
        str = rb_sprintf("#<%s:%p@%s:%d>", cname, data->body,
                         node->nd_file, nd_line(node));
    }
    else {
        str = rb_sprintf("#<%s:%p>", cname, data->body);
    }
    if (OBJ_TAINTED(self)) OBJ_TAINT(str);

    return str;
}

/*
 *  call-seq:
 *     prc.to_proc -> prc
 *
 *  Part of the protocol for converting objects to <code>Proc</code>
 *  objects. Instances of class <code>Proc</code> simply return
 *  themselves.
 */

static VALUE
proc_to_self(VALUE self)
{
    return self;
}

/*
 *  call-seq:
 *     prc.binding    => binding
 *
 *  Returns the binding associated with <i>prc</i>. Note that
 *  <code>Kernel#eval</code> accepts either a <code>Proc</code> or a
 *  <code>Binding</code> object as its second parameter.
 *
 *     def fred(param)
 *       proc {}
 *     end
 *
 *     b = fred(99)
 *     eval("param", b.binding)   #=> 99
 *     eval("param", b)           #=> 99
 */

static VALUE
proc_binding(VALUE proc)
{
    struct BLOCK *orig, *data;
    VALUE bind;

    Data_Get_Struct(proc, struct BLOCK, orig);
    bind = Data_Make_Struct(rb_cBinding,struct BLOCK,blk_mark,blk_free,data);
    MEMCPY(data, orig, struct BLOCK, 1);
    frame_dup(&data->frame);

    if (data->iter) {
        blk_copy_prev(data);
    }
    else {
        data->prev = 0;
    }

    return bind;
}

static VALUE
rb_block_pass(VALUE (*func) (VALUE), VALUE arg, VALUE proc)
{
    VALUE b;
    struct BLOCK _block;
    struct BLOCK *data;
    volatile VALUE result = Qnil;
    int state;
    volatile int orphan;
    volatile int safe = ruby_safe_level;

    if (NIL_P(proc)) {
        PUSH_ITER(ITER_NOT);
        result = (*func)(arg);
        POP_ITER();
        return result;
    }
    if (!rb_obj_is_proc(proc)) {
        b = rb_check_convert_type(proc, T_DATA, "Proc", "to_proc");
        if (!rb_obj_is_proc(b)) {
            rb_raise(rb_eTypeError, "wrong argument type %s (expected Proc)",
                     rb_obj_classname(proc));
        }
        proc = b;
    }

    if (ruby_safe_level >= 1 && OBJ_TAINTED(proc) &&
        ruby_safe_level > proc_get_safe_level(proc)) {
        rb_raise(rb_eSecurityError, "Insecure: tainted block value");
    }

    if (ruby_block && ruby_block->block_obj == proc) {
        PUSH_ITER(ITER_PAS);
        result = (*func)(arg);
        POP_ITER();
        return result;
    }

    Data_Get_Struct(proc, struct BLOCK, data);
    orphan = block_orphan(data);

    /* PUSH BLOCK from data */
    _block = *data;
    _block.outer = ruby_block;
    if (orphan) _block.uniq = block_unique++;
    ruby_block = &_block;
    PUSH_ITER(ITER_PRE);
    if (ruby_frame->iter == ITER_NOT)
        ruby_frame->iter = ITER_PRE;

    PUSH_TAG(PROT_LOOP);
    state = EXEC_TAG();
    if (state == 0) {
      retry:
        proc_set_safe_level(proc);
        if (safe > ruby_safe_level)
            ruby_safe_level = safe;
        result = (*func)(arg);
    }
    else if (state == TAG_BREAK && TAG_DST()) {
        result = prot_tag->retval;
        state = 0;
    }
    else if (state == TAG_RETRY) {
        state = 0;
        goto retry;
    }
    POP_TAG();
    POP_ITER();
    ruby_block = _block.outer;
    if (proc_safe_level_p(proc)) ruby_safe_level = safe;

    switch (state) {/* escape from orphan block */
      case 0:
        break;
      case TAG_RETURN:
        if (orphan) {
            proc_jump_error(state, prot_tag->retval);
        }
      default:
        JUMP_TAG(state);
    }

    return result;
}

struct block_arg {
    VALUE self;
    NODE *iter;
};

static VALUE
call_block(struct block_arg *arg)
{
    return rb_eval(arg->self, arg->iter);
}

static VALUE
block_pass(VALUE self, NODE *node)
{
    struct block_arg arg;
    arg.self = self;
    arg.iter = node->nd_iter;
    return rb_block_pass((VALUE (*)(VALUE))call_block,
                         (VALUE)&arg, rb_eval(self, node->nd_body));
}

static void
bm_mark(struct METHOD *data)
{
    rb_gc_mark(data->rklass);
    rb_gc_mark(data->klass);
    rb_gc_mark(data->recv);
    rb_gc_mark((VALUE)data->body);
}

static VALUE
mnew(VALUE klass, VALUE obj, ID id, VALUE mklass)
{
    VALUE method;
    NODE *body;
    int noex;
    struct METHOD *data;
    VALUE rklass = klass;
    ID oid = id;

  again:
    if ((body = rb_get_method_body(&klass, &id, &noex)) == 0) {
        print_undef(rklass, oid);
    }

    if (nd_type(body) == NODE_ZSUPER) {
        klass = RCLASS(klass)->super;
        goto again;
    }

    while (rklass != klass &&
           (FL_TEST(rklass, FL_SINGLETON) || TYPE(rklass) == T_ICLASS)) {
        rklass = RCLASS(rklass)->super;
    }
    if (TYPE(klass) == T_ICLASS) klass = RBASIC(klass)->klass;
    method = Data_Make_Struct(mklass, struct METHOD, bm_mark, -1, data);
    data->klass = klass;
    data->recv = obj;
    data->id = id;
    data->body = body;
    data->rklass = rklass;
    data->oid = oid;
    data->safe_level = NOEX_WITH_SAFE(0);
    OBJ_INFECT(method, klass);

    return method;
}

/**********************************************************************
 *
 * Document-class : Method
 *
 *  Method objects are created by <code>Object#method</code>, and are
 *  associated with a particular object (not just with a class). They
 *  may be used to invoke the method within the object, and as a block
 *  associated with an iterator. They may also be unbound from one
 *  object (creating an <code>UnboundMethod</code>) and bound to
 *  another.
 *
 *     class Thing
 *       def square(n)
 *         n*n
 *       end
 *     end
 *     thing = Thing.new
 *     meth  = thing.method(:square)
 *
 *     meth.call(9)                 #=> 81
 *     [ 1, 2, 3 ].collect(&meth)   #=> [1, 4, 9]
 *
 */

/*
 * call-seq:
 *   meth == other_meth  => true or false
 *
 * Two method objects are equal if that are bound to the same
 * object and contain the same body.
 */

static VALUE
method_eq(VALUE method, VALUE other)
{
    struct METHOD *m1, *m2;

    if (TYPE(other) != T_DATA || RDATA(other)->dmark != (RUBY_DATA_FUNC)bm_mark)
        return Qfalse;
    if (CLASS_OF(method) != CLASS_OF(other))
        return Qfalse;

    Data_Get_Struct(method, struct METHOD, m1);
    Data_Get_Struct(other, struct METHOD, m2);

    if (m1->klass != m2->klass || m1->rklass != m2->rklass ||
        m1->recv != m2->recv || m1->body != m2->body)
        return Qfalse;

    return Qtrue;
}

/*
 * call-seq:
 *    meth.hash   => integer
 *
 * Return a hash value corresponding to the method object.
 */

static VALUE
method_hash(VALUE method)
{
    struct METHOD *m;
    long hash;

    Data_Get_Struct(method, struct METHOD, m);
    hash = (long)m->klass;
    hash ^= (long)m->rklass;
    hash ^= (long)m->recv;
    hash ^= (long)m->body;

    return INT2FIX(hash);
}

/*
 *  call-seq:
 *     meth.unbind    => unbound_method
 *
 *  Dissociates <i>meth</i> from it's current receiver. The resulting
 *  <code>UnboundMethod</code> can subsequently be bound to a new object
 *  of the same class (see <code>UnboundMethod</code>).
 */

static VALUE
method_unbind(VALUE obj)
{
    VALUE method;
    struct METHOD *orig, *data;

    Data_Get_Struct(obj, struct METHOD, orig);
    method = Data_Make_Struct(rb_cUnboundMethod, struct METHOD, bm_mark, free, data);
    data->klass = orig->klass;
    data->recv = Qundef;
    data->id = orig->id;
    data->body = orig->body;
    data->rklass = orig->rklass;
    data->oid = orig->oid;
    OBJ_INFECT(method, obj);

    return method;
}

/*
 *  call-seq:
 *     obj.method(sym)    => method
 *
 *  Looks up the named method as a receiver in <i>obj</i>, returning a
 *  <code>Method</code> object (or raising <code>NameError</code>). The
 *  <code>Method</code> object acts as a closure in <i>obj</i>'s object
 *  instance, so instance variables and the value of <code>self</code>
 *  remain available.
 *
 *     class Demo
 *       def initialize(n)
 *         @iv = n
 *       end
 *       def hello()
 *         "Hello, @iv = #{@iv}"
 *       end
 *     end
 *
 *     k = Demo.new(99)
 *     m = k.method(:hello)
 *     m.call   #=> "Hello, @iv = 99"
 *
 *     l = Demo.new('Fred')
 *     m = l.method("hello")
 *     m.call   #=> "Hello, @iv = Fred"
 */

VALUE
rb_obj_method(VALUE obj, VALUE vid)
{
    return mnew(CLASS_OF(obj), obj, rb_to_id(vid), rb_cMethod);
}

/*
 *  call-seq:
 *     mod.instance_method(symbol)   => unbound_method
 *
 *  Returns an +UnboundMethod+ representing the given
 *  instance method in _mod_.
 *
 *     class Interpreter
 *       def do_a() print "there, "; end
 *       def do_d() print "Hello ";  end
 *       def do_e() print "!\n";     end
 *       def do_v() print "Dave";    end
 *       Dispatcher = {
 *        ?a => instance_method(:do_a),
 *        ?d => instance_method(:do_d),
 *        ?e => instance_method(:do_e),
 *        ?v => instance_method(:do_v)
 *       }
 *       def interpret(string)
 *         string.each_byte {|b| Dispatcher[b].bind(self).call }
 *       end
 *     end
 *
 *
 *     interpreter = Interpreter.new
 *     interpreter.interpret('dave')
 *
 *  <em>produces:</em>
 *
 *     Hello there, Dave!
 */

static VALUE
rb_mod_method(VALUE mod, VALUE vid)
{
    return mnew(mod, Qundef, rb_to_id(vid), rb_cUnboundMethod);
}

/*
 * MISSING: documentation
 */

static VALUE
method_clone(VALUE self)
{
    VALUE clone;
    struct METHOD *orig, *data;

    Data_Get_Struct(self, struct METHOD, orig);
    clone = Data_Make_Struct(CLASS_OF(self),struct METHOD, bm_mark, free, data);
    CLONESETUP(clone, self);
    *data = *orig;

    return clone;
}

/*
 *  call-seq:
 *     meth.call(args, ...)    => obj
 *     meth[args, ...]         => obj
 *
 *  Invokes the <i>meth</i> with the specified arguments, returning the
 *  method's return value.
 *
 *     m = 12.method("+")
 *     m.call(3)    #=> 15
 *     m.call(20)   #=> 32
 */

VALUE
rb_method_call(int argc, VALUE *argv, VALUE method)
{
    VALUE result = Qnil;        /* OK */
    struct METHOD *data;
    int safe;

    Data_Get_Struct(method, struct METHOD, data);
    if (data->recv == Qundef) {
        rb_raise(rb_eTypeError, "can't call unbound method; bind first");
    }
    if (OBJ_TAINTED(method)) {
        safe = NOEX_WITH(data->safe_level, 4);
    }
    else {
        safe = data->safe_level;
    }
    PUSH_ITER(rb_block_given_p()?ITER_PRE:ITER_NOT);
    result = rb_call0(data->klass,data->recv,data->id,data->oid,argc,argv,data->body,safe);
    POP_ITER();
    return result;
}

/**********************************************************************
 *
 * Document-class: UnboundMethod
 *
 *  Ruby supports two forms of objectified methods. Class
 *  <code>Method</code> is used to represent methods that are associated
 *  with a particular object: these method objects are bound to that
 *  object. Bound method objects for an object can be created using
 *  <code>Object#method</code>.
 *
 *  Ruby also supports unbound methods; methods objects that are not
 *  associated with a particular object. These can be created either by
 *  calling <code>Module#instance_method</code> or by calling
 *  <code>unbind</code> on a bound method object. The result of both of
 *  these is an <code>UnboundMethod</code> object.
 *
 *  Unbound methods can only be called after they are bound to an
 *  object. That object must be be a kind_of? the method's original
 *  class.
 *
 *     class Square
 *       def area
 *         @side * @side
 *       end
 *       def initialize(side)
 *         @side = side
 *       end
 *     end
 *
 *     area_un = Square.instance_method(:area)
 *
 *     s = Square.new(12)
 *     area = area_un.bind(s)
 *     area.call   #=> 144
 *
 *  Unbound methods are a reference to the method at the time it was
 *  objectified: subsequent changes to the underlying class will not
 *  affect the unbound method.
 *
 *     class Test
 *       def test
 *         :original
 *       end
 *     end
 *     um = Test.instance_method(:test)
 *     class Test
 *       def test
 *         :modified
 *       end
 *     end
 *     t = Test.new
 *     t.test            #=> :modified
 *     um.bind(t).call   #=> :original
 *
 */

/*
 *  call-seq:
 *     umeth.bind(obj) -> method
 *
 *  Bind <i>umeth</i> to <i>obj</i>. If <code>Klass</code> was the class
 *  from which <i>umeth</i> was obtained,
 *  <code>obj.kind_of?(Klass)</code> must be true.
 *
 *     class A
 *       def test
 *         puts "In test, class = #{self.class}"
 *       end
 *     end
 *     class B < A
 *     end
 *     class C < B
 *     end
 *
 *
 *     um = B.instance_method(:test)
 *     bm = um.bind(C.new)
 *     bm.call
 *     bm = um.bind(B.new)
 *     bm.call
 *     bm = um.bind(A.new)
 *     bm.call
 *
 *  <em>produces:</em>
 *
 *     In test, class = C
 *     In test, class = B
 *     prog.rb:16:in `bind': bind argument must be an instance of B (TypeError)
 *      from prog.rb:16
 */

static VALUE
umethod_bind(VALUE method, VALUE recv)
{
    struct METHOD *data, *bound;
    VALUE rklass = CLASS_OF(recv), klass = rklass;

    Data_Get_Struct(method, struct METHOD, data);
    if (data->rklass != rklass) {
        if (FL_TEST(data->rklass, FL_SINGLETON)) {
            rb_raise(rb_eTypeError, "singleton method called for a different object");
        }
        if (TYPE(data->rklass) == T_MODULE) {
            st_table *m_tbl = RCLASS(data->rklass)->m_tbl;
            while (RCLASS(rklass)->m_tbl != m_tbl) {
                rklass = RCLASS(rklass)->super;
                if (!rklass) goto not_instace;
            }
        }
        else if (!rb_obj_is_kind_of(recv, data->rklass)) {
          not_instace:
            rb_raise(rb_eTypeError, "bind argument must be an instance of %s",
                     rb_class2name(data->rklass));
        }
    }

    method = Data_Make_Struct(rb_cMethod,struct METHOD,bm_mark,free,bound);
    *bound = *data;
    bound->recv = recv;
    bound->klass = klass;
    bound->rklass = rklass;

    return method;
}

int
rb_node_arity(NODE *body)
{
    int n;

    switch (nd_type(body)) {
      case NODE_CFUNC:
        if (body->nd_argc < 0) return -1;
        return body->nd_argc;
      case NODE_ZSUPER:
        return -1;
      case NODE_ATTRSET:
        return 1;
      case NODE_IVAR:
        return 0;
      case NODE_BMETHOD:
        return rb_proc_arity(body->nd_cval);
      case NODE_SCOPE:
        body = body->nd_next;   /* skip NODE_SCOPE */
        if (nd_type(body) == NODE_BLOCK)
            body = body->nd_head;
        if (!body) return 0;
        n = body->nd_frml ? RARRAY(body->nd_frml)->len : 0;
        if (body->nd_opt || body->nd_rest)
            n = -n-1;
        return n;
      default:
        rb_raise(rb_eArgError, "invalid node 0x%x", nd_type(body));
    }
}

/*
 *  call-seq:
 *     meth.arity    => fixnum
 *
 *  Returns an indication of the number of arguments accepted by a
 *  method. Returns a nonnegative integer for methods that take a fixed
 *  number of arguments. For Ruby methods that take a variable number of
 *  arguments, returns -n-1, where n is the number of required
 *  arguments. For methods written in C, returns -1 if the call takes a
 *  variable number of arguments.
 *
 *     class C
 *       def one;    end
 *       def two(a); end
 *       def three(*a);  end
 *       def four(a, b); end
 *       def five(a, b, *c);    end
 *       def six(a, b, *c, &d); end
 *     end
 *     c = C.new
 *     c.method(:one).arity     #=> 0
 *     c.method(:two).arity     #=> 1
 *     c.method(:three).arity   #=> -1
 *     c.method(:four).arity    #=> 2
 *     c.method(:five).arity    #=> -3
 *     c.method(:six).arity     #=> -3
 *
 *     "cat".method(:size).arity      #=> 0
 *     "cat".method(:replace).arity   #=> 1
 *     "cat".method(:squeeze).arity   #=> -1
 *     "cat".method(:count).arity     #=> -1
 */

static VALUE
method_arity_m(VALUE method)
{
    int n = method_arity(method);
    return INT2FIX(n);
}

static int
method_arity(VALUE method)
{
    struct METHOD *data;

    Data_Get_Struct(method, struct METHOD, data);
    return rb_node_arity(data->body);
}

int
rb_mod_method_arity(VALUE mod, ID id)
{
    NODE *node = rb_method_node(mod, id);
    return rb_node_arity(node);
}

int
rb_obj_method_arity(VALUE obj, ID id)
{
    return rb_mod_method_arity(CLASS_OF(obj), id);
}

/*
 *  call-seq:
 *   meth.to_s      =>  string
 *   meth.inspect   =>  string
 *
 *  Show the name of the underlying method.
 *
 *    "cat".method(:count).inspect   #=> "#<Method: String#count>"
 */

static VALUE
method_inspect(VALUE method)
{
    struct METHOD *data;
    VALUE str;
    const char *s;
    char *sharp = "#";

    Data_Get_Struct(method, struct METHOD, data);
    str = rb_str_buf_new2("#<");
    s = rb_obj_classname(method);
    rb_str_buf_cat2(str, s);
    rb_str_buf_cat2(str, ": ");

    if (FL_TEST(data->klass, FL_SINGLETON)) {
        VALUE v = rb_iv_get(data->klass, "__attached__");

        if (data->recv == Qundef) {
            rb_str_buf_append(str, rb_inspect(data->klass));
        }
        else if (data->recv == v) {
            rb_str_buf_append(str, rb_inspect(v));
            sharp = ".";
        }
        else {
            rb_str_buf_append(str, rb_inspect(data->recv));
            rb_str_buf_cat2(str, "(");
            rb_str_buf_append(str, rb_inspect(v));
            rb_str_buf_cat2(str, ")");
            sharp = ".";
        }
    }
    else {
        rb_str_buf_cat2(str, rb_class2name(data->rklass));
        if (data->rklass != data->klass) {
            rb_str_buf_cat2(str, "(");
            rb_str_buf_cat2(str, rb_class2name(data->klass));
            rb_str_buf_cat2(str, ")");
        }
    }
    rb_str_buf_cat2(str, sharp);
    rb_str_buf_cat2(str, rb_id2name(data->oid));
    rb_str_buf_cat2(str, ">");

    return str;
}

static VALUE
mproc(VALUE method)
{
    VALUE proc;

    /* emulate ruby's method call */
    PUSH_ITER(ITER_CUR);
    PUSH_FRAME();
    proc = rb_block_proc();
    POP_FRAME();
    POP_ITER();

    return proc;
}

static VALUE
bmcall(VALUE args, VALUE method)
{
    volatile VALUE a;
    VALUE ret;

    a = svalue_to_avalue(args);
    ret = rb_method_call(RARRAY(a)->len, RARRAY(a)->ptr, method);
    a = Qnil; /* prevent tail call */
    return ret;
}

VALUE
rb_proc_new(
    VALUE (*func)(ANYARGS), /* VALUE yieldarg[, VALUE procarg] */
    VALUE val)
{
    struct BLOCK *data;
    VALUE proc = rb_iterate((VALUE(*)(VALUE))mproc, 0, func, val);

    Data_Get_Struct(proc, struct BLOCK, data);
    data->body->nd_state = YIELD_FUNC_AVALUE;
    return proc;
}

/*
 *  call-seq:
 *     meth.to_proc    => prc
 *
 *  Returns a <code>Proc</code> object corresponding to this method.
 */

static VALUE
method_proc(VALUE method)
{
    VALUE proc;
    struct METHOD *mdata;
    struct BLOCK *bdata;

    Data_Get_Struct(method, struct METHOD, mdata);
    if (nd_type(mdata->body) == NODE_BMETHOD) {
        return mdata->body->nd_cval;
    }
    proc = rb_iterate((VALUE(*)(VALUE))mproc, 0, bmcall, method);
    Data_Get_Struct(proc, struct BLOCK, bdata);
    bdata->body->nd_file = mdata->body->nd_file;
    nd_set_line(bdata->body, nd_line(mdata->body));
    bdata->body->nd_state = YIELD_FUNC_SVALUE;
    bdata->flags |= BLOCK_FROM_METHOD;

    return proc;
}

static VALUE
rb_obj_is_method(VALUE m)
{
    if (TYPE(m) == T_DATA && RDATA(m)->dmark == (RUBY_DATA_FUNC)bm_mark) {
        return Qtrue;
    }
    return Qfalse;
}

/*
 *  call-seq:
 *     define_method(symbol, method)     => new_method
 *     define_method(symbol) { block }   => proc
 *
 *  Defines an instance method in the receiver. The _method_
 *  parameter can be a +Proc+ or +Method+ object.
 *  If a block is specified, it is used as the method body. This block
 *  is evaluated using <code>instance_eval</code>, a point that is
 *  tricky to demonstrate because <code>define_method</code> is private.
 *  (This is why we resort to the +send+ hack in this example.)
 *
 *     class A
 *       def fred
 *         puts "In Fred"
 *       end
 *       def create_method(name, &block)
 *         self.class.send(:define_method, name, &block)
 *       end
 *       define_method(:wilma) { puts "Charge it!" }
 *     end
 *     class B < A
 *       define_method(:barney, instance_method(:fred))
 *     end
 *     a = B.new
 *     a.barney
 *     a.wilma
 *     a.create_method(:betty) { p self }
 *     a.betty
 *
 *  <em>produces:</em>
 *
 *     In Fred
 *     Charge it!
 *     #<B:0x401b39e8>
 */

static VALUE
rb_mod_define_method(int argc, VALUE *argv, VALUE mod)
{
    ID id;
    VALUE body;
    NODE *node;
    int noex;

    if (argc == 1) {
        id = rb_to_id(argv[0]);
        body = proc_lambda();
    }
    else if (argc == 2) {
        id = rb_to_id(argv[0]);
        body = argv[1];
        if (!rb_obj_is_method(body) && !rb_obj_is_proc(body)) {
            rb_raise(rb_eTypeError, "wrong argument type %s (expected Proc/Method)",
                     rb_obj_classname(body));
        }
    }
    else {
        rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc);
    }
    if (RDATA(body)->dmark == (RUBY_DATA_FUNC)bm_mark) {
        struct METHOD *method = (struct METHOD *)DATA_PTR(body);
        VALUE rklass = method->rklass;
        if (rklass != mod) {
            if (FL_TEST(rklass, FL_SINGLETON)) {
                rb_raise(rb_eTypeError, "can't bind singleton method to a different class");
            }
            if (!RTEST(rb_class_inherited_p(mod, rklass))) {
                rb_raise(rb_eTypeError, "bind argument must be a subclass of %s",
                         rb_class2name(rklass));
            }
        }
        node = method->body;
    }
    else if (RDATA(body)->dmark == (RUBY_DATA_FUNC)blk_mark) {
        struct BLOCK *block;

        body = proc_clone(body);
        proc_save_safe_level(body);
        Data_Get_Struct(body, struct BLOCK, block);
        block->frame.callee = id;
        block->frame.this_func = id;
        block->frame.this_class = mod;
        node = NEW_BMETHOD(body);
    }
    else {
        /* type error */
        rb_raise(rb_eTypeError, "wrong argument type (expected Proc/Method)");
    }

    if (SCOPE_TEST(SCOPE_PRIVATE)) {
        noex = NOEX_PRIVATE;
    }
    else if (SCOPE_TEST(SCOPE_PROTECTED)) {
        noex = NOEX_PROTECTED;
    }
    else {
        noex = NOEX_PUBLIC;
    }
    rb_add_method(mod, id, node, noex);
    return body;
}

/*
 *  <code>Proc</code> objects are blocks of code that have been bound to
 *  a set of local variables. Once bound, the code may be called in
 *  different contexts and still access those variables.
 *
 *     def gen_times(factor)
 *       return Proc.new {|n| n*factor }
 *     end
 *
 *     times3 = gen_times(3)
 *     times5 = gen_times(5)
 *
 *     times3.call(12)               #=> 36
 *     times5.call(5)                #=> 25
 *     times3.call(times5.call(4))   #=> 60
 *
 */

void
Init_Proc(void)
{
    rb_eLocalJumpError = rb_define_class("LocalJumpError", rb_eStandardError);
    rb_define_method(rb_eLocalJumpError, "exit_value", localjump_xvalue, 0);
    rb_define_method(rb_eLocalJumpError, "reason", localjump_reason, 0);

    rb_global_variable(&exception_error);
    exception_error = rb_exc_new2(rb_eFatal, "exception reentered");

    rb_eSysStackError = rb_define_class("SystemStackError", rb_eException);
    rb_global_variable(&sysstack_error);
    sysstack_error = rb_exc_new2(rb_eSysStackError, "stack level too deep");
    OBJ_TAINT(sysstack_error);

    rb_cProc = rb_define_class("Proc", rb_cObject);
    rb_undef_alloc_func(rb_cProc);
    rb_define_singleton_method(rb_cProc, "new", proc_s_new, -1);

    rb_define_method(rb_cProc, "clone", proc_clone, 0);
    rb_define_method(rb_cProc, "dup", proc_dup, 0);
    rb_define_method(rb_cProc, "call", rb_proc_call, -2);
    rb_define_method(rb_cProc, "arity", proc_arity, 0);
    rb_define_method(rb_cProc, "[]", rb_proc_call, -2);
    rb_define_method(rb_cProc, "==", proc_eq, 1);
    rb_define_method(rb_cProc, "eql?", proc_eq, 1);
    rb_define_method(rb_cProc, "hash", proc_hash, 0);
    rb_define_method(rb_cProc, "to_s", proc_to_s, 0);
    rb_define_method(rb_cProc, "to_proc", proc_to_self, 0);
    rb_define_method(rb_cProc, "binding", proc_binding, 0);

    rb_define_global_function("proc", rb_block_proc, 0);
    rb_define_global_function("lambda", proc_lambda, 0);

    rb_cMethod = rb_define_class("Method", rb_cObject);
    rb_undef_alloc_func(rb_cMethod);
    rb_undef_method(CLASS_OF(rb_cMethod), "new");
    rb_define_method(rb_cMethod, "==", method_eq, 1);
    rb_define_method(rb_cMethod, "eql?", method_eq, 1);
    rb_define_method(rb_cMethod, "hash", method_hash, 0);
    rb_define_method(rb_cMethod, "clone", method_clone, 0);
    rb_define_method(rb_cMethod, "call", rb_method_call, -1);
    rb_define_method(rb_cMethod, "[]", rb_method_call, -1);
    rb_define_method(rb_cMethod, "arity", method_arity_m, 0);
    rb_define_method(rb_cMethod, "inspect", method_inspect, 0);
    rb_define_method(rb_cMethod, "to_s", method_inspect, 0);
    rb_define_method(rb_cMethod, "to_proc", method_proc, 0);
    rb_define_method(rb_cMethod, "unbind", method_unbind, 0);
    rb_define_method(rb_mKernel, "method", rb_obj_method, 1);

    rb_cUnboundMethod = rb_define_class("UnboundMethod", rb_cObject);
    rb_undef_alloc_func(rb_cUnboundMethod);
    rb_undef_method(CLASS_OF(rb_cUnboundMethod), "new");
    rb_define_method(rb_cUnboundMethod, "==", method_eq, 1);
    rb_define_method(rb_cUnboundMethod, "eql?", method_eq, 1);
    rb_define_method(rb_cUnboundMethod, "hash", method_hash, 0);
    rb_define_method(rb_cUnboundMethod, "clone", method_clone, 0);
    rb_define_method(rb_cUnboundMethod, "arity", method_arity_m, 0);
    rb_define_method(rb_cUnboundMethod, "inspect", method_inspect, 0);
    rb_define_method(rb_cUnboundMethod, "to_s", method_inspect, 0);
    rb_define_method(rb_cUnboundMethod, "bind", umethod_bind, 1);
    rb_define_method(rb_cModule, "instance_method", rb_mod_method, 1);
}

/*
 *  Objects of class <code>Binding</code> encapsulate the execution
 *  context at some particular place in the code and retain this context
 *  for future use. The variables, methods, value of <code>self</code>,
 *  and possibly an iterator block that can be accessed in this context
 *  are all retained. Binding objects can be created using
 *  <code>Kernel#binding</code>, and are made available to the callback
 *  of <code>Kernel#set_trace_func</code>.
 *
 *  These binding objects can be passed as the second argument of the
 *  <code>Kernel#eval</code> method, establishing an environment for the
 *  evaluation.
 *
 *     class Demo
 *       def initialize(n)
 *         @secret = n
 *       end
 *       def getBinding
 *         return binding()
 *       end
 *     end
 *
 *     k1 = Demo.new(99)
 *     b1 = k1.getBinding
 *     k2 = Demo.new(-3)
 *     b2 = k2.getBinding
 *
 *     eval("@secret", b1)   #=> 99
 *     eval("@secret", b2)   #=> -3
 *     eval("@secret")       #=> nil
 *
 *  Binding objects have no class-specific methods.
 *
 */

void
Init_Binding(void)
{
    rb_cBinding = rb_define_class("Binding", rb_cObject);
    rb_undef_alloc_func(rb_cBinding);
    rb_undef_method(CLASS_OF(rb_cBinding), "new");
    rb_define_method(rb_cBinding, "clone", proc_clone, 0);
    rb_define_method(rb_cBinding, "dup", proc_dup, 0);
    rb_define_method(rb_cBinding, "eval", bind_eval, -1);
    rb_define_global_function("binding", rb_f_binding, 0);
}

/* Windows SEH refers data on the stack. */
#undef SAVE_WIN32_EXCEPTION_LIST
#if defined _WIN32 || defined __CYGWIN__
#if defined __CYGWIN__
typedef unsigned long DWORD;
#endif

static inline DWORD
win32_get_exception_list(void)
{
    DWORD p;
# if defined _MSC_VER
#   ifdef _M_IX86
#   define SAVE_WIN32_EXCEPTION_LIST
#   if _MSC_VER >= 1310
      /* warning: unsafe assignment to fs:0 ... this is ok */
#     pragma warning(disable: 4733)
#   endif
    __asm mov eax, fs:[0];
    __asm mov p, eax;
#   endif
# elif defined __GNUC__
#   ifdef __i386__
#   define SAVE_WIN32_EXCEPTION_LIST
    __asm__("movl %%fs:0,%0" : "=r"(p));
#   endif
# elif defined __BORLANDC__
#   define SAVE_WIN32_EXCEPTION_LIST
    __emit__(0x64, 0xA1, 0, 0, 0, 0); /* mov eax, fs:[0] */
    p = _EAX;
# endif
    return p;
}

static inline void
win32_set_exception_list(DWORD p)
{
# if defined _MSC_VER
#   ifdef _M_IX86
    __asm mov eax, p;
    __asm mov fs:[0], eax;
#   endif
# elif defined __GNUC__
#   ifdef __i386__
    __asm__("movl %0,%%fs:0" :: "r"(p));
#   endif
# elif defined __BORLANDC__
    _EAX = p;
    __emit__(0x64, 0xA3, 0, 0, 0, 0); /* mov fs:[0], eax */
# endif
}

#if !defined SAVE_WIN32_EXCEPTION_LIST && !defined _WIN32_WCE
# error unsupported platform
#endif
#endif

int rb_thread_pending = 0;

VALUE rb_cThread;

extern VALUE rb_last_status;

enum thread_status {
    THREAD_TO_KILL,
    THREAD_RUNNABLE,
    THREAD_STOPPED,
    THREAD_KILLED,
};

#define WAIT_FD         (1<<0)
#define WAIT_SELECT     (1<<1)
#define WAIT_TIME       (1<<2)
#define WAIT_JOIN       (1<<3)
#define WAIT_PID        (1<<4)

/* +infty, for this purpose */
#define DELAY_INFTY 1E30

#if !defined HAVE_PAUSE
# if defined _WIN32 && !defined __CYGWIN__
#  define pause() Sleep(INFINITE)
# else
#  define pause() sleep(0x7fffffff)
# endif
#endif

#if defined(NFDBITS) && defined(HAVE_RB_FD_INIT)
void
rb_fd_init(fds)
    volatile rb_fdset_t *fds;
{
    fds->maxfd = 0;
    fds->fdset = ALLOC(fd_set);
    FD_ZERO(fds->fdset);
}

void
rb_fd_term(fds)
    rb_fdset_t *fds;
{
    if (fds->fdset) free(fds->fdset);
    fds->maxfd = 0;
    fds->fdset = 0;
}

void
rb_fd_zero(fds)
    rb_fdset_t *fds;
{
    if (fds->fdset) {
        MEMZERO(fds->fdset, fd_mask, howmany(fds->maxfd, NFDBITS));
        FD_ZERO(fds->fdset);
    }
}

static void
rb_fd_resize(n, fds)
    int n;
    rb_fdset_t *fds;
{
    int m = howmany(n + 1, NFDBITS) * sizeof(fd_mask);
    int o = howmany(fds->maxfd, NFDBITS) * sizeof(fd_mask);

    if (m < sizeof(fd_set)) m = sizeof(fd_set);
    if (o < sizeof(fd_set)) o = sizeof(fd_set);

    if (m > o) {
        fds->fdset = realloc(fds->fdset, m);
        memset((char *)fds->fdset + o, 0, m - o);
    }
    if (n >= fds->maxfd) fds->maxfd = n + 1;
}

void
rb_fd_set(n, fds)
    int n;
    rb_fdset_t *fds;
{
    rb_fd_resize(n, fds);
    FD_SET(n, fds->fdset);
}

void
rb_fd_clr(n, fds)
    int n;
    rb_fdset_t *fds;
{
    if (n >= fds->maxfd) return;
    FD_CLR(n, fds->fdset);
}

int
rb_fd_isset(n, fds)
    int n;
    const rb_fdset_t *fds;
{
    if (n >= fds->maxfd) return 0;
    return FD_ISSET(n, fds->fdset) != 0; /* "!= 0" avoids BSD bug */
}

void
rb_fd_copy(dst, src, max)
    rb_fdset_t *dst;
    const fd_set *src;
    int max;
{
    int size = howmany(max, NFDBITS) * sizeof(fd_mask);

    if (size < sizeof(fd_set)) size = sizeof(fd_set);
    dst->maxfd = max;
    dst->fdset = realloc(dst->fdset, size);
    memcpy(dst->fdset, src, size);
}

int
rb_fd_select(n, readfds, writefds, exceptfds, timeout)
    int n;
    rb_fdset_t *readfds, *writefds, *exceptfds;
    struct timeval *timeout;
{
    rb_fd_resize(n - 1, readfds);
    rb_fd_resize(n - 1, writefds);
    rb_fd_resize(n - 1, exceptfds);
    return select(n, rb_fd_ptr(readfds), rb_fd_ptr(writefds), rb_fd_ptr(exceptfds), timeout);
}

#undef FD_ZERO
#undef FD_SET
#undef FD_CLR
#undef FD_ISSET

#define FD_ZERO(f)      rb_fd_zero(f)
#define FD_SET(i, f)    rb_fd_set(i, f)
#define FD_CLR(i, f)    rb_fd_clr(i, f)
#define FD_ISSET(i, f)  rb_fd_isset(i, f)

#endif

/* typedef struct thread * rb_thread_t; */

struct thread {
    struct thread *next, *prev;
    rb_jmpbuf_t context;
#ifdef SAVE_WIN32_EXCEPTION_LIST
    DWORD win32_exception_list;
#endif

    VALUE result;

    long   stk_len;
    long   stk_max;
    VALUE *stk_ptr;
    VALUE *stk_pos;
#ifdef IA64
    long   bstr_len;
    long   bstr_max;
    VALUE *bstr_ptr;
    VALUE *bstr_pos;
#endif

    struct FRAME *frame;
    struct SCOPE *scope;
    struct RVarmap *dyna_vars;
    struct BLOCK *block;
    struct iter *iter;
    struct tag *tag;
    VALUE klass;
    VALUE wrapper;
    NODE *cref;
    struct ruby_env *anchor;

    int flags;          /* misc. states (vmode/rb_trap_immediate/raised) */

    NODE *node;

    int tracing;
    VALUE errinfo;
    VALUE last_status;
    VALUE last_line;
    VALUE last_match;

    int safe;

    enum thread_status status;
    int wait_for;
    int fd;
    rb_fdset_t readfds;
    rb_fdset_t writefds;
    rb_fdset_t exceptfds;
    int select_value;
    double delay;
    rb_thread_t join;

    int abort;
    int priority;
    VALUE thgroup;

    st_table *locals;

    VALUE thread;
};

#define THREAD_RAISED 0x200      /* temporary flag */
#define THREAD_TERMINATING 0x400 /* persistent flag */
#define THREAD_FLAGS_MASK  0x400 /* mask for persistent flags */

#define FOREACH_THREAD_FROM(f,x) x = f; do { x = x->next;
#define END_FOREACH_FROM(f,x) } while (x != f)

#define FOREACH_THREAD(x) FOREACH_THREAD_FROM(curr_thread,x)
#define END_FOREACH(x)    END_FOREACH_FROM(curr_thread,x)

struct thread_status_t {
    NODE *node;

    int tracing;
    VALUE errinfo;
    VALUE last_status;
    VALUE last_line;
    VALUE last_match;

    int safe;

    enum thread_status status;
    int wait_for;
    int fd;
    rb_fdset_t readfds;
    rb_fdset_t writefds;
    rb_fdset_t exceptfds;
    int select_value;
    double delay;
    rb_thread_t join;
};

#define THREAD_COPY_STATUS(src, dst) (void)(    \
    (dst)->node = (src)->node,                  \
                                                \
    (dst)->tracing = (src)->tracing,            \
    (dst)->errinfo = (src)->errinfo,            \
    (dst)->last_status = (src)->last_status,    \
    (dst)->last_line = (src)->last_line,        \
    (dst)->last_match = (src)->last_match,      \
                                                \
    (dst)->safe = (src)->safe,                  \
                                                \
    (dst)->status = (src)->status,              \
    (dst)->wait_for = (src)->wait_for,          \
    (dst)->fd = (src)->fd,                      \
    (dst)->readfds = (src)->readfds,            \
    (dst)->writefds = (src)->writefds,          \
    (dst)->exceptfds = (src)->exceptfds,        \
    rb_fd_init(&(src)->readfds),                \
    rb_fd_init(&(src)->writefds),               \
    rb_fd_init(&(src)->exceptfds),              \
    (dst)->select_value = (src)->select_value,  \
    (dst)->delay = (src)->delay,                \
    (dst)->join = (src)->join,                  \
    0)

static int
thread_set_raised(void)
{
    if (curr_thread->flags & THREAD_RAISED) return 1;
    curr_thread->flags |= THREAD_RAISED;
    return 0;
}

static int
thread_reset_raised(void)
{
    if (!(curr_thread->flags & THREAD_RAISED)) return 0;
    curr_thread->flags &= ~THREAD_RAISED;
    return 1;
}

static void rb_thread_ready(rb_thread_t);

static VALUE
run_trap_eval(VALUE arg)
{
    VALUE *p = (VALUE *)arg;
    return rb_eval_cmd(p[0], p[1], (int)p[2]);
}

static VALUE
rb_trap_eval(VALUE cmd, int sig, int safe)
{
    int state;
    VALUE val = Qnil;           /* OK */
    volatile struct thread_status_t save;
    VALUE arg[3];

    arg[0] = cmd;
    arg[1] = rb_ary_new3(1, INT2FIX(sig));
    arg[2] = (VALUE)safe;
    THREAD_COPY_STATUS(curr_thread, &save);
    rb_thread_ready(curr_thread);
    PUSH_ITER(ITER_NOT);
    val = rb_protect(run_trap_eval, (VALUE)&arg, &state);
    POP_ITER();
    THREAD_COPY_STATUS(&save, curr_thread);

    if (state) {
        rb_trap_immediate = 0;
        JUMP_TAG(state);
    }

    if (curr_thread->status == THREAD_STOPPED) {
        rb_thread_schedule();
    }
    errno = EINTR;

    return val;
}

static const char *
thread_status_name(enum thread_status status)
{
    switch (status) {
      case THREAD_RUNNABLE:
        return "run";
      case THREAD_STOPPED:
        return "sleep";
      case THREAD_TO_KILL:
        return "aborting";
      case THREAD_KILLED:
        return "dead";
      default:
        return "unknown";
    }
}

/* $SAFE accessor */
void
rb_set_safe_level(int level)
{
    if (level > ruby_safe_level) {
        if (level > SAFE_LEVEL_MAX) level = SAFE_LEVEL_MAX;
        ruby_safe_level = level;
        curr_thread->safe = level;
    }
}

static VALUE
safe_getter(void)
{
    return INT2NUM(ruby_safe_level);
}

static void
safe_setter(VALUE val)
{
    int level = NUM2INT(val);

    if (level < ruby_safe_level) {
        rb_raise(rb_eSecurityError, "tried to downgrade safe level from %d to %d",
                 ruby_safe_level, level);
    }
    if (level > SAFE_LEVEL_MAX) level = SAFE_LEVEL_MAX;
    ruby_safe_level = level;
    curr_thread->safe = level;
}

/* Return the current time as a floating-point number */
static double
timeofday(void)
{
    struct timeval tv;
    gettimeofday(&tv, NULL);
    return (double)tv.tv_sec + (double)tv.tv_usec * 1e-6;
}

#define STACK(addr) (th->stk_pos<(VALUE*)(addr) && (VALUE*)(addr)<th->stk_pos+th->stk_len)
#define ADJ(addr) (void*)(STACK(addr)?(((VALUE*)(addr)-th->stk_pos)+th->stk_ptr):(VALUE*)(addr))

static void
thread_mark(rb_thread_t th)
{
    struct FRAME *frame;
    struct BLOCK *block;

    rb_gc_mark(th->result);
    rb_gc_mark(th->thread);
    if (th->join) rb_gc_mark(th->join->thread);

    rb_gc_mark(th->klass);
    rb_gc_mark(th->wrapper);
    rb_gc_mark((VALUE)th->cref);

    rb_gc_mark((VALUE)th->scope);
    rb_gc_mark((VALUE)th->dyna_vars);
    rb_gc_mark(th->errinfo);
    rb_gc_mark(th->last_status);
    rb_gc_mark(th->last_line);
    rb_gc_mark(th->last_match);
    rb_mark_tbl(th->locals);
    rb_gc_mark(th->thgroup);

    /* mark data in copied stack */
    if (th == curr_thread) return;
    if (th->status == THREAD_KILLED) return;
    if (th->stk_len == 0) return;  /* stack not active, no need to mark. */
    if (th->stk_ptr) {
        rb_gc_mark_locations(th->stk_ptr, th->stk_ptr+th->stk_len);
#if defined(THINK_C) || defined(__human68k__)
        rb_gc_mark_locations(th->stk_ptr+2, th->stk_ptr+th->stk_len+2);
#endif
#ifdef IA64
        if (th->bstr_ptr) {
            rb_gc_mark_locations(th->bstr_ptr, th->bstr_ptr+th->bstr_len);
        }
#endif
    }
    frame = th->frame;
    while (frame && frame != top_frame) {
        frame = ADJ(frame);
        rb_gc_mark_frame(frame);
        if (frame->tmp) {
            struct FRAME *tmp = frame->tmp;

            while (tmp && tmp != top_frame) {
                tmp = ADJ(tmp);
                rb_gc_mark_frame(tmp);
                tmp = tmp->prev;
            }
        }
        frame = frame->prev;
    }
    block = th->block;
    while (block) {
        block = ADJ(block);
        rb_gc_mark_frame(&block->frame);
        block = block->prev;
    }
}

static struct {
    rb_thread_t thread;
    VALUE proc, arg;
} new_thread;

static int
mark_loading_thread(ID key, VALUE value, int lev)
{
    rb_gc_mark(((rb_thread_t)value)->thread);
    return ST_CONTINUE;
}

void
rb_gc_mark_threads(void)
{
    rb_thread_t th;

    /* static global mark */
    rb_gc_mark((VALUE)ruby_cref);

    if (!curr_thread) return;
    rb_gc_mark(main_thread->thread);
    rb_gc_mark(curr_thread->thread);
    FOREACH_THREAD_FROM(main_thread, th) {
        switch (th->status) {
          case THREAD_TO_KILL:
          case THREAD_RUNNABLE:
            break;
          case THREAD_STOPPED:
            if (th->wait_for) break;
          default:
            continue;
        }
        rb_gc_mark(th->thread);
    } END_FOREACH_FROM(main_thread, th);
    if (new_thread.thread) {
        rb_gc_mark(new_thread.thread->thread);
        rb_gc_mark(new_thread.proc);
        rb_gc_mark(new_thread.arg);
    }
    if (loading_tbl) st_foreach(loading_tbl, mark_loading_thread, 0);
}

void
rb_gc_abort_threads(void)
{
    rb_thread_t th;

    if (!main_thread)
        return;

    FOREACH_THREAD_FROM(main_thread, th) {
        if (FL_TEST(th->thread, FL_MARK)) continue;
        if (th->status == THREAD_STOPPED) {
            th->status = THREAD_TO_KILL;
            rb_gc_mark(th->thread);
        }
    } END_FOREACH_FROM(main_thread, th);
}

static void
thread_free(rb_thread_t th)
{
    if (th->stk_ptr) free(th->stk_ptr);
    th->stk_ptr = 0;
#ifdef IA64
    if (th->bstr_ptr) free(th->bstr_ptr);
    th->bstr_ptr = 0;
#endif
    if (th->locals) st_free_table(th->locals);
    if (th->status != THREAD_KILLED) {
        if (th->prev) th->prev->next = th->next;
        if (th->next) th->next->prev = th->prev;
    }
    rb_fd_term(&th->readfds);
    rb_fd_term(&th->writefds);
    rb_fd_term(&th->exceptfds);
    if (th != main_thread) free(th);
}

static rb_thread_t
rb_thread_check(VALUE data)
{
    if (TYPE(data) != T_DATA || RDATA(data)->dmark != (RUBY_DATA_FUNC)thread_mark) {
        rb_raise(rb_eTypeError, "wrong argument type %s (expected Thread)",
                 rb_obj_classname(data));
    }
    return (rb_thread_t)RDATA(data)->data;
}

static VALUE rb_thread_raise(int, VALUE*, rb_thread_t);

static VALUE th_raise_exception;
static NODE *th_raise_node;
static VALUE th_cmd;
static int   th_sig, th_safe;
static const char   *th_signm;

#define RESTORE_NORMAL          1
#define RESTORE_FATAL           2
#define RESTORE_INTERRUPT       3
#define RESTORE_TRAP            4
#define RESTORE_RAISE           5
#define RESTORE_SIGNAL          6
#define RESTORE_EXIT            7

extern VALUE *rb_gc_stack_start;
#ifdef IA64
extern VALUE *rb_gc_register_stack_start;
#endif

static void
rb_thread_save_context(rb_thread_t th)
{
    VALUE *pos;
    int len;
    static VALUE tval;

    len = ruby_stack_length(&pos);
    th->stk_len = 0;
    th->stk_pos = pos;
    if (len > th->stk_max) {
        VALUE *ptr = realloc(th->stk_ptr, sizeof(VALUE) * len);
        if (!ptr) rb_memerror();
        th->stk_ptr = ptr;
        th->stk_max = len;
    }
    th->stk_len = len;
    FLUSH_REGISTER_WINDOWS;
    MEMCPY(th->stk_ptr, th->stk_pos, VALUE, th->stk_len);
#ifdef IA64
    th->bstr_pos = rb_gc_register_stack_start;
    len = (VALUE*)rb_ia64_bsp() - th->bstr_pos;
    th->bstr_len = 0;
    if (len > th->bstr_max) {
        VALUE *ptr = realloc(th->bstr_ptr, sizeof(VALUE) * len);
        if (!ptr) rb_memerror();
        th->bstr_ptr = ptr;
        th->bstr_max = len;
    }
    th->bstr_len = len;
    rb_ia64_flushrs();
    MEMCPY(th->bstr_ptr, th->bstr_pos, VALUE, th->bstr_len);
#endif
#ifdef SAVE_WIN32_EXCEPTION_LIST
    th->win32_exception_list = win32_get_exception_list();
#endif

    th->frame = ruby_frame;
    th->scope = ruby_scope;
    ruby_scope->flags |= SCOPE_DONT_RECYCLE;
    th->klass = ruby_class;
    th->wrapper = ruby_wrapper;
    th->cref = ruby_cref;
    th->dyna_vars = ruby_dyna_vars;
    th->block = ruby_block;
    th->flags &= THREAD_FLAGS_MASK;
    th->flags |= (rb_trap_immediate<<8) | scope_vmode;
    th->iter = ruby_iter;
    th->tag = prot_tag;
    th->tracing = tracing;
    th->errinfo = ruby_errinfo;
    th->last_status = rb_last_status;
    tval = rb_lastline_get();
    rb_lastline_set(th->last_line);
    th->last_line = tval;
    tval = rb_backref_get();
    rb_backref_set(th->last_match);
    th->last_match = tval;
    th->safe = ruby_safe_level;

    th->node = ruby_current_node;
}

static int
rb_thread_switch(int n)
{
    rb_trap_immediate = (curr_thread->flags&(1<<8))?1:0;
    switch (n) {
      case 0:
        return 0;
      case RESTORE_FATAL:
        JUMP_TAG(TAG_FATAL);
        break;
      case RESTORE_INTERRUPT:
        rb_interrupt();
        break;
      case RESTORE_TRAP:
        rb_trap_eval(th_cmd, th_sig, th_safe);
        break;
      case RESTORE_RAISE:
        ruby_frame->callee = 0;
        ruby_frame->this_func = 0;
        ruby_current_node = th_raise_node;
        rb_raise_jump(th_raise_exception);
        break;
      case RESTORE_SIGNAL:
        rb_raise(rb_eSignal, "SIG%s", th_signm);
        break;
      case RESTORE_EXIT:
        ruby_errinfo = th_raise_exception;
        ruby_current_node = th_raise_node;
        if (!rb_obj_is_kind_of(ruby_errinfo, rb_eSystemExit)) {
            terminate_process(EXIT_FAILURE, ruby_errinfo);
        }
        rb_exc_raise(th_raise_exception);
        break;
      case RESTORE_NORMAL:
      default:
        break;
    }
    return 1;
}

#define THREAD_SAVE_CONTEXT(th) \
    (rb_thread_switch((FLUSH_REGISTER_WINDOWS, ruby_setjmp(rb_thread_save_context(th), (th)->context))))

NORETURN(static void rb_thread_restore_context(rb_thread_t,int));
NORETURN(NOINLINE(static void rb_thread_restore_context_0(rb_thread_t,int,void*)));
NORETURN(NOINLINE(static void stack_extend(rb_thread_t, int, VALUE *)));

static void
rb_thread_restore_context_0(rb_thread_t th, int exit, void *vp)
{
    /* vp prevents tail call */
    static rb_thread_t tmp;
    static int ex;
    static VALUE tval;

    rb_trap_immediate = 0;      /* inhibit interrupts from here */
    ruby_frame = th->frame;
    ruby_scope = th->scope;
    ruby_class = th->klass;
    ruby_wrapper = th->wrapper;
    ruby_cref = th->cref;
    ruby_dyna_vars = th->dyna_vars;
    ruby_block = th->block;
    scope_vmode = th->flags&SCOPE_MASK;
    ruby_iter = th->iter;
    prot_tag = th->tag;
    tracing = th->tracing;
    ruby_errinfo = th->errinfo;
    rb_last_status = th->last_status;
    ruby_safe_level = th->safe;

    ruby_current_node = th->node;

#ifdef SAVE_WIN32_EXCEPTION_LIST
    win32_set_exception_list(th->win32_exception_list);
#endif
    tmp = th;
    ex = exit;
    FLUSH_REGISTER_WINDOWS;
    MEMCPY(tmp->stk_pos, tmp->stk_ptr, VALUE, tmp->stk_len);
#ifdef IA64
    MEMCPY(tmp->bstr_pos, tmp->bstr_ptr, VALUE, tmp->bstr_len);
#endif

    tval = rb_lastline_get();
    rb_lastline_set(tmp->last_line);
    tmp->last_line = tval;
    tval = rb_backref_get();
    rb_backref_set(tmp->last_match);
    tmp->last_match = tval;

    ruby_longjmp(tmp->context, ex);
}

#ifdef IA64
#define C(a) rse_##a##0, rse_##a##1, rse_##a##2, rse_##a##3, rse_##a##4
#define E(a) rse_##a##0= rse_##a##1= rse_##a##2= rse_##a##3= rse_##a##4
static volatile int C(a), C(b), C(c), C(d), C(e);
static volatile int C(f), C(g), C(h), C(i), C(j);
static volatile int C(k), C(l), C(m), C(n), C(o);
static volatile int C(p), C(q), C(r), C(s), C(t);
int rb_dummy_false = 0;
NORETURN(NOINLINE(static void register_stack_extend(rb_thread_t, int, void *, VALUE *)));
static void
register_stack_extend(rb_thread_t th, int exit, void *vp, VALUE *curr_bsp)
{
    if (rb_dummy_false) {
        /* use registers as much as possible */
        E(a) = E(b) = E(c) = E(d) = E(e) =
        E(f) = E(g) = E(h) = E(i) = E(j) =
        E(k) = E(l) = E(m) = E(n) = E(o) =
        E(p) = E(q) = E(r) = E(s) = E(t) = 0;
        E(a) = E(b) = E(c) = E(d) = E(e) =
        E(f) = E(g) = E(h) = E(i) = E(j) =
        E(k) = E(l) = E(m) = E(n) = E(o) =
        E(p) = E(q) = E(r) = E(s) = E(t) = 0;
    }
    if (curr_bsp < th->bstr_pos+th->bstr_len) {
        register_stack_extend(th, exit, &exit, (VALUE*)rb_ia64_bsp());
    }
    rb_thread_restore_context_0(th, exit, &exit);
}
#undef C
#undef E
#endif

static void
stack_extend(rb_thread_t th, int exit, VALUE *addr_in_prev_frame)
{
#define STACK_PAD_SIZE 1024
    VALUE space[STACK_PAD_SIZE];

#if STACK_GROW_DIRECTION < 0
    if (addr_in_prev_frame > th->stk_pos) stack_extend(th, exit, &space[0]);
#elif STACK_GROW_DIRECTION > 0
    if (addr_in_prev_frame < th->stk_pos + th->stk_len) stack_extend(th, exit, &space[STACK_PAD_SIZE-1]);
#else
    if (addr_in_prev_frame < rb_gc_stack_start) {
        /* Stack grows downward */
        if (addr_in_prev_frame > th->stk_pos) stack_extend(th, exit, &space[0]);
    }
    else {
        /* Stack grows upward */
        if (addr_in_prev_frame < th->stk_pos + th->stk_len) stack_extend(th, exit, &space[STACK_PAD_SIZE-1]);
    }
#endif
#ifdef IA64
    register_stack_extend(th, exit, space, (VALUE*)rb_ia64_bsp());
#else
    rb_thread_restore_context_0(th, exit, space);
#endif
}

static void
rb_thread_restore_context(rb_thread_t th, int exit)
{
    VALUE v;
    if (!th->stk_ptr) rb_bug("unsaved context");
    stack_extend(th, exit, &v);
}

static void
rb_thread_ready(rb_thread_t th)
{
    th->wait_for = 0;
    if (th->status != THREAD_TO_KILL) {
        th->status = THREAD_RUNNABLE;
    }
}

static void
rb_thread_die(rb_thread_t th)
{
    th->thgroup = 0;
    th->status = THREAD_KILLED;
    if (th->stk_ptr) free(th->stk_ptr);
    th->stk_ptr = 0;
}

static void
rb_thread_remove(rb_thread_t th)
{
    if (th->status == THREAD_KILLED) return;

    rb_thread_ready(th);
    rb_thread_die(th);
    th->prev->next = th->next;
    th->next->prev = th->prev;
}

static int
rb_thread_dead(rb_thread_t th)
{
    return th->status == THREAD_KILLED;
}

void
rb_thread_fd_close(int fd)
{
    rb_thread_t th;

    FOREACH_THREAD(th) {
        if (((th->wait_for & WAIT_FD) && fd == th->fd) ||
            ((th->wait_for & WAIT_SELECT) && (fd < th->fd) &&
             (FD_ISSET(fd, &th->readfds) ||
              FD_ISSET(fd, &th->writefds) ||
              FD_ISSET(fd, &th->exceptfds)))) {
            VALUE exc = rb_exc_new2(rb_eIOError, "stream closed");
            rb_thread_raise(1, &exc, th);
        }
    }
    END_FOREACH(th);
}

NORETURN(static void rb_thread_main_jump(VALUE, int));
static void
rb_thread_main_jump(VALUE err, int tag)
{
    curr_thread = main_thread;
    th_raise_exception = err;
    th_raise_node = ruby_current_node;
    rb_thread_restore_context(main_thread, tag);
}

NORETURN(static void rb_thread_deadlock(void));
static void
rb_thread_deadlock(void)
{
    char msg[21+SIZEOF_LONG*2];
    VALUE e;

    sprintf(msg, "Thread(%p): deadlock", curr_thread->thread);
    e = rb_exc_new2(rb_eFatal, msg);
    if (curr_thread == main_thread) {
        rb_exc_raise(e);
    }
    rb_thread_main_jump(e, RESTORE_RAISE);
}

static void
copy_fds(rb_fdset_t *dst, rb_fdset_t *src, int max)
{
    int n = 0;
    int i;

    if (max >= rb_fd_max(src)) max = rb_fd_max(src) - 1;
    for (i=0; i<=max; i++) {
        if (FD_ISSET(i, src)) {
            n = i;
            FD_SET(i, dst);
        }
    }
}

static int
match_fds(rb_fdset_t *dst, rb_fdset_t *src, int max)
{
    int i;

    if (max >= rb_fd_max(src)) max = rb_fd_max(src) - 1;
    if (max >= rb_fd_max(dst)) max = rb_fd_max(dst) - 1;
    for (i=0; i<=max; i++) {
        if (FD_ISSET(i, src) && FD_ISSET(i, dst)) {
            return Qtrue;
        }
    }
    return Qfalse;
}

static int
intersect_fds(rb_fdset_t *src, rb_fdset_t *dst, int max)
{
    int i, n = 0;

    if (max >= rb_fd_max(dst)) max = rb_fd_max(dst) - 1;
    for (i=0; i<=max; i++) {
        if (FD_ISSET(i, dst)) {
            if (FD_ISSET(i, src)) {
                /* Wake up only one thread per fd. */
                FD_CLR(i, src);
                n++;
            }
            else {
                FD_CLR(i, dst);
            }
        }
    }
    return n;
}

static int
find_bad_fds(rb_fdset_t *dst, rb_fdset_t *src, int max)
{
    int i, test = Qfalse;

    if (max >= rb_fd_max(src)) max = rb_fd_max(src) - 1;
    for (i=0; i<=max; i++) {
        if (FD_ISSET(i, src) && !FD_ISSET(i, dst)) {
            FD_CLR(i, src);
            test = Qtrue;
        }
    }
    return test;
}

void
rb_thread_schedule(void)
{
    rb_thread_t next;           /* OK */
    rb_thread_t th;
    rb_thread_t curr;
    int found = 0;

    rb_fdset_t readfds;
    rb_fdset_t writefds;
    rb_fdset_t exceptfds;
    struct timeval delay_tv, *delay_ptr;
    double delay, now;  /* OK */
    int n, max;
    int need_select = 0;
    int select_timeout = 0;

#ifdef HAVE_NATIVETHREAD
    if (!is_ruby_native_thread()) {
        rb_bug("cross-thread violation on rb_thread_schedule()");
    }
#endif
    rb_thread_pending = rb_thread_critical = 0;
    if (curr_thread == curr_thread->next
        && curr_thread->status == THREAD_RUNNABLE)
        return;

    next = 0;
    curr = curr_thread;         /* starting thread */

    while (curr->status == THREAD_KILLED) {
        curr = curr->prev;
    }

    rb_fd_init(&readfds);
    rb_fd_init(&writefds);
    rb_fd_init(&exceptfds);

  again:
    max = -1;
    FD_ZERO(&readfds);
    FD_ZERO(&writefds);
    FD_ZERO(&exceptfds);
    delay = DELAY_INFTY;
    now = -1.0;

    FOREACH_THREAD_FROM(curr, th) {
        if (!found && th->status <= THREAD_RUNNABLE) {
            found = 1;
        }
        if (th->status != THREAD_STOPPED) continue;
        if (th->wait_for & WAIT_JOIN) {
            if (rb_thread_dead(th->join)) {
                th->status = THREAD_RUNNABLE;
                found = 1;
            }
        }
        if (th->wait_for & WAIT_FD) {
            FD_SET(th->fd, &readfds);
            if (max < th->fd) max = th->fd;
            need_select = 1;
        }
        if (th->wait_for & WAIT_SELECT) {
            copy_fds(&readfds, &th->readfds, th->fd);
            copy_fds(&writefds, &th->writefds, th->fd);
            copy_fds(&exceptfds, &th->exceptfds, th->fd);
            if (max < th->fd) max = th->fd;
            need_select = 1;
            if (th->wait_for & WAIT_TIME) {
                select_timeout = 1;
            }
            th->select_value = 0;
        }
        if (th->wait_for & WAIT_TIME) {
            double th_delay;

            if (now < 0.0) now = timeofday();
            th_delay = th->delay - now;
            if (th_delay <= 0.0) {
                th->status = THREAD_RUNNABLE;
                found = 1;
            }
            else if (th_delay < delay) {
                delay = th_delay;
                need_select = 1;
            }
            else if (th->delay == DELAY_INFTY) {
                need_select = 1;
            }
        }
    }
    END_FOREACH_FROM(curr, th);

    /* Do the select if needed */
    if (need_select) {
        /* Convert delay to a timeval */
        /* If a thread is runnable, just poll */
        if (found) {
            delay_tv.tv_sec = 0;
            delay_tv.tv_usec = 0;
            delay_ptr = &delay_tv;
        }
        else if (delay == DELAY_INFTY) {
            delay_ptr = 0;
        }
        else {
            delay_tv.tv_sec = delay;
            delay_tv.tv_usec = (delay - (double)delay_tv.tv_sec)*1e6;
            delay_ptr = &delay_tv;
        }

        n = rb_fd_select(max+1, &readfds, &writefds, &exceptfds, delay_ptr);
        if (n < 0) {
            int e = errno;

            if (rb_trap_pending) {
                int status;
                rb_protect((VALUE (*)(VALUE))rb_trap_exec, Qnil, &status);
                if (status) {
                    rb_fd_term(&readfds);
                    rb_fd_term(&writefds);
                    rb_fd_term(&exceptfds);
                    rb_jump_tag(status);
                }
            }
            if (e == EINTR) goto again;
#ifdef ERESTART
            if (e == ERESTART) goto again;
#endif
            FOREACH_THREAD_FROM(curr, th) {
                if (th->wait_for & WAIT_SELECT) {
                    int v = 0;

                    v |= find_bad_fds(&readfds, &th->readfds, th->fd);
                    v |= find_bad_fds(&writefds, &th->writefds, th->fd);
                    v |= find_bad_fds(&exceptfds, &th->exceptfds, th->fd);
                    if (v) {
                        th->select_value = n;
                        n = max;
                    }
                }
            }
            END_FOREACH_FROM(curr, th);
        }
        if (select_timeout && n == 0) {
            if (now < 0.0) now = timeofday();
            FOREACH_THREAD_FROM(curr, th) {
                if (((th->wait_for&(WAIT_SELECT|WAIT_TIME)) == (WAIT_SELECT|WAIT_TIME)) &&
                    th->delay <= now) {
                    th->status = THREAD_RUNNABLE;
                    th->wait_for = 0;
                    th->select_value = 0;
                    found = 1;
                    intersect_fds(&readfds, &th->readfds, max);
                    intersect_fds(&writefds, &th->writefds, max);
                    intersect_fds(&exceptfds, &th->exceptfds, max);
                }
            }
            END_FOREACH_FROM(curr, th);
        }
        if (n > 0) {
            now = -1.0;
            /* Some descriptors are ready.
               Make the corresponding threads runnable. */
            FOREACH_THREAD_FROM(curr, th) {
                if ((th->wait_for&WAIT_FD) && FD_ISSET(th->fd, &readfds)) {
                    /* Wake up only one thread per fd. */
                    FD_CLR(th->fd, &readfds);
                    th->status = THREAD_RUNNABLE;
                    th->fd = 0;
                    th->wait_for = 0;
                    found = 1;
                }
                if ((th->wait_for&WAIT_SELECT) &&
                    (match_fds(&readfds, &th->readfds, max) ||
                     match_fds(&writefds, &th->writefds, max) ||
                     match_fds(&exceptfds, &th->exceptfds, max))) {
                    /* Wake up only one thread per fd. */
                    th->status = THREAD_RUNNABLE;
                    th->wait_for = 0;
                    n = intersect_fds(&readfds, &th->readfds, max) +
                        intersect_fds(&writefds, &th->writefds, max) +
                        intersect_fds(&exceptfds, &th->exceptfds, max);
                    th->select_value = n;
                    found = 1;
                }
            }
            END_FOREACH_FROM(curr, th);
        }
        /* The delays for some of the threads should have expired.
           Go through the loop once more, to check the delays. */
        if (!found && delay != DELAY_INFTY)
            goto again;
    }

    rb_fd_term(&readfds);
    rb_fd_term(&writefds);
    rb_fd_term(&exceptfds);

    FOREACH_THREAD_FROM(curr, th) {
        if (th->status == THREAD_TO_KILL) {
            next = th;
            break;
        }
        if (th->status == THREAD_RUNNABLE && th->stk_ptr) {
            if (!next || next->priority < th->priority)
               next = th;
        }
    }
    END_FOREACH_FROM(curr, th);

    if (!next) {
        /* raise fatal error to main thread */
        curr_thread->node = ruby_current_node;
        if (curr->next == curr) {
            TRAP_BEG;
            pause();
            TRAP_END;
        }
        FOREACH_THREAD_FROM(curr, th) {
            warn_printf("deadlock %p: %s:",
                        th->thread, thread_status_name(th->status));
            if (th->wait_for & WAIT_FD) warn_printf("F(%d)", th->fd);
            if (th->wait_for & WAIT_SELECT) warn_printf("S");
            if (th->wait_for & WAIT_TIME) warn_printf("T(%f)", th->delay);
            if (th->wait_for & WAIT_JOIN)
                warn_printf("J(%p)", th->join ? th->join->thread : 0);
            if (th->wait_for & WAIT_PID) warn_printf("P");
            if (!th->wait_for) warn_printf("-");
            warn_printf(" %s - %s:%d\n",
                        th==main_thread ? "(main)" : "",
                        th->node->nd_file, nd_line(th->node));
        }
        END_FOREACH_FROM(curr, th);
        next = main_thread;
        rb_thread_ready(next);
        next->status = THREAD_TO_KILL;
        if (!rb_thread_dead(curr_thread)) {
            rb_thread_save_context(curr_thread);
        }
        rb_thread_deadlock();
    }
    next->wait_for = 0;
    if (next->status == THREAD_RUNNABLE && next == curr_thread) {
        return;
    }

    /* context switch */
    if (curr == curr_thread) {
        if (THREAD_SAVE_CONTEXT(curr)) {
            return;
        }
    }

    curr_thread = next;
    if (next->status == THREAD_TO_KILL) {
        if (!(next->flags & THREAD_TERMINATING)) {
            next->flags |= THREAD_TERMINATING;
            /* terminate; execute ensure-clause if any */
            rb_thread_restore_context(next, RESTORE_FATAL);
        }
    }
    rb_thread_restore_context(next, RESTORE_NORMAL);
}

void
rb_thread_wait_fd(int fd)
{
    if (rb_thread_critical) return;
    if (curr_thread == curr_thread->next) return;
    if (curr_thread->status == THREAD_TO_KILL) return;

    curr_thread->status = THREAD_STOPPED;
    curr_thread->fd = fd;
    curr_thread->wait_for = WAIT_FD;
    rb_thread_schedule();
}

int
rb_thread_fd_writable(int fd)
{
    if (rb_thread_critical) return Qtrue;
    if (curr_thread == curr_thread->next) return Qtrue;
    if (curr_thread->status == THREAD_TO_KILL) return Qtrue;

    curr_thread->status = THREAD_STOPPED;
    FD_ZERO(&curr_thread->readfds);
    FD_ZERO(&curr_thread->writefds);
    FD_SET(fd, &curr_thread->writefds);
    FD_ZERO(&curr_thread->exceptfds);
    curr_thread->fd = fd+1;
    curr_thread->wait_for = WAIT_SELECT;
    rb_thread_schedule();
    return Qfalse;
}

void
rb_thread_wait_for(struct timeval time)
{
    double date;

    if (rb_thread_critical ||
        curr_thread == curr_thread->next ||
        curr_thread->status == THREAD_TO_KILL) {
        int n;
        int thr_critical = rb_thread_critical;
#ifndef linux
        double d, limit;
        limit = timeofday()+(double)time.tv_sec+(double)time.tv_usec*1e-6;
#endif
        for (;;) {
            rb_thread_critical = Qtrue;
            TRAP_BEG;
            n = select(0, 0, 0, 0, &time);
            rb_thread_critical = thr_critical;
            TRAP_END;
            if (n == 0) return;
            if (n < 0) {
                switch (errno) {
                  case EINTR:
#ifdef ERESTART
                  case ERESTART:
#endif
                    return;
                  default:
                    rb_sys_fail("sleep");
                }
            }
#ifndef linux
            d = limit - timeofday();

            time.tv_sec = (int)d;
            time.tv_usec = (int)((d - (int)d)*1e6);
            if (time.tv_usec < 0) {
                time.tv_usec += (long)1e6;
                time.tv_sec -= 1;
            }
            if (time.tv_sec < 0) return;
#endif
        }
    }

    date = timeofday() + (double)time.tv_sec + (double)time.tv_usec*1e-6;
    curr_thread->status = THREAD_STOPPED;
    curr_thread->delay = date;
    curr_thread->wait_for = WAIT_TIME;
    rb_thread_schedule();
}

void rb_thread_sleep_forever(void);

int
rb_thread_alone(void)
{
    return curr_thread == curr_thread->next;
}

int
rb_thread_select(int max, fd_set *read, fd_set *write, fd_set *except, struct timeval *timeout)
{
#ifndef linux
    double limit;
#endif
    int n;

    if (!read && !write && !except) {
        if (!timeout) {
            rb_thread_sleep_forever();
            return 0;
        }
        rb_thread_wait_for(*timeout);
        return 0;
    }

#ifndef linux
    if (timeout) {
        limit = timeofday()+
            (double)timeout->tv_sec+(double)timeout->tv_usec*1e-6;
    }
#endif

    if (rb_thread_critical ||
        curr_thread == curr_thread->next ||
        curr_thread->status == THREAD_TO_KILL) {
#ifndef linux
        struct timeval tv, *tvp = timeout;

        if (timeout) {
            tv = *timeout;
            tvp = &tv;
        }
#else
        struct timeval *const tvp = timeout;
#endif
        for (;;) {
            TRAP_BEG;
            n = select(max, read, write, except, tvp);
            TRAP_END;
            if (n < 0) {
                switch (errno) {
                  case EINTR:
#ifdef ERESTART
                  case ERESTART:
#endif
#ifndef linux
                    if (timeout) {
                        double d = limit - timeofday();

                        tv.tv_sec = (unsigned int)d;
                        tv.tv_usec = (long)((d-(double)tv.tv_sec)*1e6);
                        if (tv.tv_sec < 0)  tv.tv_sec = 0;
                        if (tv.tv_usec < 0) tv.tv_usec = 0;
                    }
#endif
                    continue;
                  default:
                    break;
                }
            }
            return n;
        }
    }

    curr_thread->status = THREAD_STOPPED;
    if (read) rb_fd_copy(&curr_thread->readfds, read, max);
    else FD_ZERO(&curr_thread->readfds);
    if (write) rb_fd_copy(&curr_thread->writefds, write, max);
    else FD_ZERO(&curr_thread->writefds);
    if (except) rb_fd_copy(&curr_thread->exceptfds, except, max);
    else FD_ZERO(&curr_thread->exceptfds);
    curr_thread->fd = max;
    curr_thread->wait_for = WAIT_SELECT;
    if (timeout) {
        curr_thread->delay = timeofday() +
            (double)timeout->tv_sec + (double)timeout->tv_usec*1e-6;
        curr_thread->wait_for |= WAIT_TIME;
    }
    rb_thread_schedule();
    if (read) *read = *rb_fd_ptr(&curr_thread->readfds);
    if (write) *write = *rb_fd_ptr(&curr_thread->writefds);
    if (except) *except = *rb_fd_ptr(&curr_thread->exceptfds);
    return curr_thread->select_value;
}

static int
rb_thread_join(rb_thread_t th, double limit)
{
    enum thread_status last_status = THREAD_RUNNABLE;

    if (rb_thread_critical) rb_thread_deadlock();
    if (!rb_thread_dead(th)) {
        if (th == curr_thread)
            rb_raise(rb_eThreadError, "thread %p tried to join itself",
                     th->thread);
        if ((th->wait_for & WAIT_JOIN) && th->join == curr_thread)
            rb_raise(rb_eThreadError, "Thread#join: deadlock %p - mutual join(%p)",
                     curr_thread->thread, th->thread);
        if (curr_thread->status == THREAD_TO_KILL)
            last_status = THREAD_TO_KILL;
        if (limit == 0) return Qfalse;
        curr_thread->status = THREAD_STOPPED;
        curr_thread->join = th;
        curr_thread->wait_for = WAIT_JOIN;
        curr_thread->delay = timeofday() + limit;
        if (limit < DELAY_INFTY) curr_thread->wait_for |= WAIT_TIME;
        rb_thread_schedule();
        curr_thread->status = last_status;
        if (!rb_thread_dead(th)) return Qfalse;
    }

    if (!NIL_P(th->errinfo) && (th->flags & THREAD_RAISED)) {
        VALUE oldbt = get_backtrace(th->errinfo);
        VALUE errat = make_backtrace();
        VALUE errinfo = rb_obj_dup(th->errinfo);

        if (TYPE(oldbt) == T_ARRAY && RARRAY(oldbt)->len > 0) {
            rb_ary_unshift(errat, rb_ary_entry(oldbt, 0));
        }
        set_backtrace(errinfo, errat);
        rb_exc_raise(errinfo);
    }

    return Qtrue;
}

/*
 *  call-seq:
 *     thr.join          => thr
 *     thr.join(limit)   => thr
 *
 *  The calling thread will suspend execution and run <i>thr</i>. Does not
 *  return until <i>thr</i> exits or until <i>limit</i> seconds have passed. If
 *  the time limit expires, <code>nil</code> will be returned, otherwise
 *  <i>thr</i> is returned.
 *
 *  Any threads not joined will be killed when the main program exits.  If
 *  <i>thr</i> had previously raised an exception and the
 *  <code>abort_on_exception</code> and <code>$DEBUG</code> flags are not set
 *  (so the exception has not yet been processed) it will be processed at this
 *  time.
 *
 *     a = Thread.new { print "a"; sleep(10); print "b"; print "c" }
 *     x = Thread.new { print "x"; Thread.pass; print "y"; print "z" }
 *     x.join # Let x thread finish, a will be killed on exit.
 *
 *  <em>produces:</em>
 *
 *     axyz
 *
 *  The following example illustrates the <i>limit</i> parameter.
 *
 *     y = Thread.new { 4.times { sleep 0.1; puts 'tick... ' }}
 *     puts "Waiting" until y.join(0.15)
 *
 *  <em>produces:</em>
 *
 *     tick...
 *     Waiting
 *     tick...
 *     Waitingtick...
 *
 *
 *     tick...
 */

static VALUE
rb_thread_join_m(int argc, VALUE *argv, VALUE thread)
{
    VALUE limit;
    double delay = DELAY_INFTY;
    rb_thread_t th = rb_thread_check(thread);

    rb_scan_args(argc, argv, "01", &limit);
    if (!NIL_P(limit)) delay = rb_num2dbl(limit);
    if (!rb_thread_join(th, delay))
        return Qnil;
    return thread;
}

/*
 *  call-seq:
 *     Thread.current   => thread
 *
 *  Returns the currently executing thread.
 *
 *     Thread.current   #=> #<Thread:0x401bdf4c run>
 */

VALUE
rb_thread_current(void)
{
    return curr_thread->thread;
}

/*
 *  call-seq:
 *     Thread.main   => thread
 *
 *  Returns the main thread for the process.
 *
 *     Thread.main   #=> #<Thread:0x401bdf4c run>
 */

VALUE
rb_thread_main(void)
{
    return main_thread->thread;
}

/*
 *  call-seq:
 *     Thread.list   => array
 *
 *  Returns an array of <code>Thread</code> objects for all threads that are
 *  either runnable or stopped.
 *
 *     Thread.new { sleep(200) }
 *     Thread.new { 1000000.times {|i| i*i } }
 *     Thread.new { Thread.stop }
 *     Thread.list.each {|t| p t}
 *
 *  <em>produces:</em>
 *
 *     #<Thread:0x401b3e84 sleep>
 *     #<Thread:0x401b3f38 run>
 *     #<Thread:0x401b3fb0 sleep>
 *     #<Thread:0x401bdf4c run>
 */

VALUE
rb_thread_list(void)
{
    rb_thread_t th;
    VALUE ary = rb_ary_new();

    FOREACH_THREAD(th) {
        switch (th->status) {
          case THREAD_RUNNABLE:
          case THREAD_STOPPED:
          case THREAD_TO_KILL:
            rb_ary_push(ary, th->thread);
          default:
            break;
        }
    }
    END_FOREACH(th);

    return ary;
}

/*
 *  call-seq:
 *     thr.wakeup   => thr
 *
 *  Marks <i>thr</i> as eligible for scheduling (it may still remain blocked on
 *  I/O, however). Does not invoke the scheduler (see <code>Thread#run</code>).
 *
 *     c = Thread.new { Thread.stop; puts "hey!" }
 *     c.wakeup
 *
 *  <em>produces:</em>
 *
 *     hey!
 */

VALUE
rb_thread_wakeup(VALUE thread)
{
    rb_thread_t th = rb_thread_check(thread);

    if (th->status == THREAD_KILLED)
        rb_raise(rb_eThreadError, "killed thread");
    rb_thread_ready(th);

    return thread;
}

/*
 *  call-seq:
 *     thr.run   => thr
 *
 *  Wakes up <i>thr</i>, making it eligible for scheduling. If not in a critical
 *  section, then invokes the scheduler.
 *
 *     a = Thread.new { puts "a"; Thread.stop; puts "c" }
 *     Thread.pass
 *     puts "Got here"
 *     a.run
 *     a.join
 *
 *  <em>produces:</em>
 *
 *     a
 *     Got here
 *     c
 */

VALUE
rb_thread_run(VALUE thread)
{
    rb_thread_wakeup(thread);
    if (!rb_thread_critical) rb_thread_schedule();

    return thread;
}

/*
 *  call-seq:
 *     thr.exit        => thr or nil
 *     thr.kill        => thr or nil
 *     thr.terminate   => thr or nil
 *
 *  Terminates <i>thr</i> and schedules another thread to be run. If this thread
 *  is already marked to be killed, <code>exit</code> returns the
 *  <code>Thread</code>. If this is the main thread, or the last thread, exits
 *  the process.
 */

VALUE
rb_thread_kill(VALUE thread)
{
    rb_thread_t th = rb_thread_check(thread);

    if (th != curr_thread && th->safe < 4) {
        rb_secure(4);
    }
    if (th->status == THREAD_TO_KILL || th->status == THREAD_KILLED)
        return thread;
    if (th == th->next || th == main_thread) rb_exit(EXIT_SUCCESS);

    rb_thread_ready(th);
    th->status = THREAD_TO_KILL;
    if (!rb_thread_critical) rb_thread_schedule();
    return thread;
}

/*
 *  call-seq:
 *     Thread.kill(thread)   => thread
 *
 *  Causes the given <em>thread</em> to exit (see <code>Thread::exit</code>).
 *
 *     count = 0
 *     a = Thread.new { loop { count += 1 } }
 *     sleep(0.1)       #=> 0
 *     Thread.kill(a)   #=> #<Thread:0x401b3d30 dead>
 *     count            #=> 93947
 *     a.alive?         #=> false
 */

static VALUE
rb_thread_s_kill(VALUE obj, VALUE th)
{
    return rb_thread_kill(th);
}

/*
 *  call-seq:
 *     Thread.exit   => thread
 *
 *  Terminates the currently running thread and schedules another thread to be
 *  run. If this thread is already marked to be killed, <code>exit</code>
 *  returns the <code>Thread</code>. If this is the main thread, or the last
 *  thread, exit the process.
 */

static VALUE
rb_thread_exit(void)
{
    return rb_thread_kill(curr_thread->thread);
}

/*
 *  call-seq:
 *     Thread.pass   => nil
 *
 *  Invokes the thread scheduler to pass execution to another thread.
 *
 *     a = Thread.new { print "a"; Thread.pass;
 *                      print "b"; Thread.pass;
 *                      print "c" }
 *     b = Thread.new { print "x"; Thread.pass;
 *                      print "y"; Thread.pass;
 *                      print "z" }
 *     a.join
 *     b.join
 *
 *  <em>produces:</em>
 *
 *     axbycz
 */

static VALUE
rb_thread_pass(void)
{
    rb_thread_schedule();
    return Qnil;
}

/*
 *  call-seq:
 *     Thread.stop   => nil
 *
 *  Stops execution of the current thread, putting it into a ``sleep'' state,
 *  and schedules execution of another thread. Resets the ``critical'' condition
 *  to <code>false</code>.
 *
 *     a = Thread.new { print "a"; Thread.stop; print "c" }
 *     Thread.pass
 *     print "b"
 *     a.run
 *     a.join
 *
 *  <em>produces:</em>
 *
 *     abc
 */

VALUE
rb_thread_stop(void)
{
    enum thread_status last_status = THREAD_RUNNABLE;

    rb_thread_critical = 0;
    if (curr_thread == curr_thread->next) {
        rb_raise(rb_eThreadError, "stopping only thread\n\tnote: use sleep to stop forever");
    }
    if (curr_thread->status == THREAD_TO_KILL)
        last_status = THREAD_TO_KILL;
    curr_thread->status = THREAD_STOPPED;
    rb_thread_schedule();
    curr_thread->status = last_status;

    return Qnil;
}

struct timeval rb_time_timeval(VALUE time);

void
rb_thread_polling(void)
{
    if (curr_thread != curr_thread->next) {
        curr_thread->status = THREAD_STOPPED;
        curr_thread->delay = timeofday() + (double)0.06;
        curr_thread->wait_for = WAIT_TIME;
        rb_thread_schedule();
    }
}

void
rb_thread_sleep(int sec)
{
    if (curr_thread == curr_thread->next) {
        TRAP_BEG;
        sleep(sec);
        TRAP_END;
        return;
    }
    rb_thread_wait_for(rb_time_timeval(INT2FIX(sec)));
}

void
rb_thread_sleep_forever(void)
{
    int thr_critical = rb_thread_critical;
    if (curr_thread == curr_thread->next ||
        curr_thread->status == THREAD_TO_KILL) {
        rb_thread_critical = Qtrue;
        TRAP_BEG;
        pause();
        rb_thread_critical = thr_critical;
        TRAP_END;
        return;
    }

    curr_thread->delay = DELAY_INFTY;
    curr_thread->wait_for = WAIT_TIME;
    curr_thread->status = THREAD_STOPPED;
    rb_thread_schedule();
}

/*
 *  call-seq:
 *     thr.priority   => integer
 *
 *  Returns the priority of <i>thr</i>. Default is zero; higher-priority threads
 *  will run before lower-priority threads.
 *
 *     Thread.current.priority   #=> 0
 */

static VALUE
rb_thread_priority(VALUE thread)
{
    return INT2NUM(rb_thread_check(thread)->priority);
}

/*
 *  call-seq:
 *     thr.priority= integer   => thr
 *
 *  Sets the priority of <i>thr</i> to <i>integer</i>. Higher-priority threads
 *  will run before lower-priority threads.
 *
 *     count1 = count2 = 0
 *     a = Thread.new do
 *           loop { count1 += 1 }
 *         end
 *     a.priority = -1
 *
 *     b = Thread.new do
 *           loop { count2 += 1 }
 *         end
 *     b.priority = -2
 *     sleep 1   #=> 1
 *     Thread.critical = 1
 *     count1    #=> 622504
 *     count2    #=> 5832
 */

static VALUE
rb_thread_priority_set(VALUE thread, VALUE prio)
{
    rb_thread_t th;

    rb_secure(4);
    th = rb_thread_check(thread);

    th->priority = NUM2INT(prio);
    rb_thread_schedule();
    return prio;
}

/*
 *  call-seq:
 *     thr.safe_level   => integer
 *
 *  Returns the safe level in effect for <i>thr</i>. Setting thread-local safe
 *  levels can help when implementing sandboxes which run insecure code.
 *
 *     thr = Thread.new { $SAFE = 3; sleep }
 *     Thread.current.safe_level   #=> 0
 *     thr.safe_level              #=> 3
 */

static VALUE
rb_thread_safe_level(VALUE thread)
{
    rb_thread_t th;

    th = rb_thread_check(thread);
    if (th == curr_thread) {
        return INT2NUM(ruby_safe_level);
    }
    return INT2NUM(th->safe);
}

static int ruby_thread_abort;
static VALUE thgroup_default;

/*
 *  call-seq:
 *     Thread.abort_on_exception   => true or false
 *
 *  Returns the status of the global ``abort on exception'' condition.  The
 *  default is <code>false</code>. When set to <code>true</code>, or if the
 *  global <code>$DEBUG</code> flag is <code>true</code> (perhaps because the
 *  command line option <code>-d</code> was specified) all threads will abort
 *  (the process will <code>exit(0)</code>) if an exception is raised in any
 *  thread. See also <code>Thread::abort_on_exception=</code>.
 */

static VALUE
rb_thread_s_abort_exc(void)
{
    return ruby_thread_abort?Qtrue:Qfalse;
}

/*
 *  call-seq:
 *     Thread.abort_on_exception= boolean   => true or false
 *
 *  When set to <code>true</code>, all threads will abort if an exception is
 *  raised. Returns the new state.
 *
 *     Thread.abort_on_exception = true
 *     t1 = Thread.new do
 *       puts  "In new thread"
 *       raise "Exception from thread"
 *     end
 *     sleep(1)
 *     puts "not reached"
 *
 *  <em>produces:</em>
 *
 *     In new thread
 *     prog.rb:4: Exception from thread (RuntimeError)
 *      from prog.rb:2:in `initialize'
 *      from prog.rb:2:in `new'
 *      from prog.rb:2
 */

static VALUE
rb_thread_s_abort_exc_set(VALUE self, VALUE val)
{
    rb_secure(4);
    ruby_thread_abort = RTEST(val);
    return val;
}

/*
 *  call-seq:
 *     thr.abort_on_exception   => true or false
 *
 *  Returns the status of the thread-local ``abort on exception'' condition for
 *  <i>thr</i>. The default is <code>false</code>. See also
 *  <code>Thread::abort_on_exception=</code>.
 */

static VALUE
rb_thread_abort_exc(VALUE thread)
{
    return rb_thread_check(thread)->abort?Qtrue:Qfalse;
}

/*
 *  call-seq:
 *     thr.abort_on_exception= boolean   => true or false
 *
 *  When set to <code>true</code>, causes all threads (including the main
 *  program) to abort if an exception is raised in <i>thr</i>. The process will
 *  effectively <code>exit(0)</code>.
 */

static VALUE
rb_thread_abort_exc_set(VALUE thread, VALUE val)
{
    rb_secure(4);
    rb_thread_check(thread)->abort = RTEST(val);
    return val;
}

/*
 *  call-seq:
 *     thr.group   => thgrp or nil
 *
 *  Returns the <code>ThreadGroup</code> which contains <i>thr</i>, or nil if
 *  the thread is not a member of any group.
 *
 *     Thread.main.group   #=> #<ThreadGroup:0x4029d914>
 */

VALUE
rb_thread_group(VALUE thread)
{
    VALUE group = rb_thread_check(thread)->thgroup;
    if (!group) {
        group = Qnil;
    }
    return group;
}

#ifdef IA64
# define IA64_INIT(x) x
#else
# define IA64_INIT(x)
#endif

#define THREAD_ALLOC(th) do {\
    th = ALLOC(struct thread);\
\
    th->next = 0;\
    th->prev = 0;\
\
    th->status = THREAD_RUNNABLE;\
    th->result = 0;\
    th->flags = 0;\
\
    th->stk_ptr = 0;\
    th->stk_len = 0;\
    th->stk_max = 0;\
    th->wait_for = 0;\
    IA64_INIT(th->bstr_ptr = 0);\
    IA64_INIT(th->bstr_len = 0);\
    IA64_INIT(th->bstr_max = 0);\
    rb_fd_init(&th->readfds);\
    rb_fd_init(&th->writefds);\
    rb_fd_init(&th->exceptfds);\
    th->delay = 0.0;\
    th->join = 0;\
\
    th->frame = 0;\
    th->scope = 0;\
    th->klass = 0;\
    th->wrapper = 0;\
    th->cref = ruby_cref;\
    th->dyna_vars = ruby_dyna_vars;\
    th->block = 0;\
    th->iter = 0;\
    th->tag = 0;\
    th->tracing = 0;\
    th->errinfo = Qnil;\
    th->last_status = 0;\
    th->last_line = 0;\
    th->last_match = Qnil;\
    th->abort = 0;\
    th->priority = 0;\
    th->thgroup = thgroup_default;\
    th->locals = 0;\
    th->thread = 0;\
    th->anchor = 0;\
} while (0)

static rb_thread_t
rb_thread_alloc(VALUE klass)
{
    rb_thread_t th;
    struct RVarmap *vars;

    THREAD_ALLOC(th);
    th->thread = Data_Wrap_Struct(klass, thread_mark, thread_free, th);

    for (vars = th->dyna_vars; vars; vars = vars->next) {
        if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
        FL_SET(vars, DVAR_DONT_RECYCLE);
    }
    return th;
}

static int thread_init = 0;

#if defined(_THREAD_SAFE)
static void
catch_timer(sig)
    int sig;
{
#if !defined(POSIX_SIGNAL) && !defined(BSD_SIGNAL)
    signal(sig, catch_timer);
#endif
    /* cause EINTR */
}

static pthread_t time_thread;

static void*
thread_timer(dummy)
    void *dummy;
{
    for (;;) {
#ifdef HAVE_NANOSLEEP
        struct timespec req, rem;

        req.tv_sec = 0;
        req.tv_nsec = 10000000;
        nanosleep(&req, &rem);
#else
        struct timeval tv;
        tv.tv_sec = 0;
        tv.tv_usec = 10000;
        select(0, NULL, NULL, NULL, &tv);
#endif
        if (!rb_thread_critical) {
            rb_thread_pending = 1;
            if (rb_trap_immediate) {
                pthread_kill(ruby_thid, SIGVTALRM);
            }
        }
    }
}

void
rb_thread_start_timer()
{
}

void
rb_thread_stop_timer()
{
}
#elif defined(HAVE_SETITIMER)
static void
catch_timer(sig)
    int sig;
{
#if !defined(POSIX_SIGNAL) && !defined(BSD_SIGNAL)
    signal(sig, catch_timer);
#endif
    if (!rb_thread_critical) {
        rb_thread_pending = 1;
    }
    /* cause EINTR */
}

void
rb_thread_start_timer()
{
    struct itimerval tval;

    if (!thread_init) return;
    tval.it_interval.tv_sec = 0;
    tval.it_interval.tv_usec = 10000;
    tval.it_value = tval.it_interval;
    setitimer(ITIMER_VIRTUAL, &tval, NULL);
}

void
rb_thread_stop_timer()
{
    struct itimerval tval;

    if (!thread_init) return;
    tval.it_interval.tv_sec = 0;
    tval.it_interval.tv_usec = 0;
    tval.it_value = tval.it_interval;
    setitimer(ITIMER_VIRTUAL, &tval, NULL);
}
#else  /* !(_THREAD_SAFE || HAVE_SETITIMER) */
int rb_thread_tick = THREAD_TICK;
#endif

NORETURN(static void rb_thread_terminated(rb_thread_t, int, enum thread_status));
static VALUE rb_thread_yield(VALUE, rb_thread_t);

static void
push_thread_anchor(struct ruby_env *ip)
{
    ip->tag = prot_tag;
    ip->frame = ruby_frame;
    ip->block = ruby_block;
    ip->scope = ruby_scope;
    ip->iter = ruby_iter;
    ip->cref = ruby_cref;
    ip->prev = curr_thread->anchor;
    curr_thread->anchor = ip;
}

static void
pop_thread_anchor(struct ruby_env *ip)
{
    curr_thread->anchor = ip->prev;
}

static void
thread_insert(rb_thread_t th)
{
    if (!th->next) {
        /* merge in thread list */
        th->prev = curr_thread;
        curr_thread->next->prev = th;
        th->next = curr_thread->next;
        curr_thread->next = th;
        th->priority = curr_thread->priority;
        th->thgroup = curr_thread->thgroup;
    }
}

static VALUE
rb_thread_start_0(VALUE (*fn)(ANYARGS), VALUE arg, rb_thread_t th)
{
    volatile rb_thread_t th_save = th;
    volatile VALUE thread = th->thread;
    struct BLOCK *volatile saved_block = 0;
    enum thread_status status;
    int state;

    if (OBJ_FROZEN(curr_thread->thgroup)) {
        rb_raise(rb_eThreadError,
                 "can't start a new thread (frozen ThreadGroup)");
    }

    if (!thread_init) {
        thread_init = 1;
#if defined(HAVE_SETITIMER) || defined(_THREAD_SAFE)
#if defined(POSIX_SIGNAL)
        posix_signal(SIGVTALRM, catch_timer);
#else
        signal(SIGVTALRM, catch_timer);
#endif

#ifdef _THREAD_SAFE
        pthread_create(&time_thread, 0, thread_timer, 0);
#else
        rb_thread_start_timer();
#endif
#endif
    }

    if (THREAD_SAVE_CONTEXT(curr_thread)) {
        return thread;
    }

    if (fn == rb_thread_yield && curr_thread->anchor) {
        struct ruby_env *ip = curr_thread->anchor;
        new_thread.thread = th;
        new_thread.proc = rb_block_proc();
        new_thread.arg = (VALUE)arg;
        th->anchor = ip;
        thread_insert(th);
        curr_thread = th;
        ruby_longjmp((prot_tag = ip->tag)->buf, TAG_THREAD);
    }

    if (ruby_block) {           /* should nail down higher blocks */
        struct BLOCK dummy;

        dummy.prev = ruby_block;
        blk_copy_prev(&dummy);
        saved_block = ruby_block = dummy.prev;
    }
    scope_dup(ruby_scope);

    thread_insert(th);

    PUSH_TAG(PROT_NONE);
    if ((state = EXEC_TAG()) == 0) {
        if (THREAD_SAVE_CONTEXT(th) == 0) {
            curr_thread = th;
            th->result = (*fn)(arg, th);
        }
        th = th_save;
    }
    else if (TAG_DST()) {
        th = th_save;
        th->result = prot_tag->retval;
    }
    POP_TAG();
    status = th->status;

    if (th == main_thread) ruby_stop(state);
    rb_thread_remove(th);

    if (saved_block) {
        blk_free(saved_block);
    }

    rb_thread_terminated(th, state, status);
    return 0;                   /* not reached */
}

static void
rb_thread_terminated(rb_thread_t th, int state, enum thread_status status)
{
    if (state && status != THREAD_TO_KILL && !NIL_P(ruby_errinfo)) {
        th->flags |= THREAD_RAISED;
        if (state == TAG_FATAL) {
            /* fatal error within this thread, need to stop whole script */
            main_thread->errinfo = ruby_errinfo;
            rb_thread_cleanup();
        }
        else if (rb_obj_is_kind_of(ruby_errinfo, rb_eSystemExit)) {
            if (th->safe >= 4) {
                char buf[32];

                sprintf(buf, "Insecure exit at level %d", th->safe);
                th->errinfo = rb_exc_new2(rb_eSecurityError, buf);
            }
            else {
                /* delegate exception to main_thread */
                rb_thread_main_jump(ruby_errinfo, RESTORE_RAISE);
            }
        }
        else if (th->safe < 4 && (ruby_thread_abort || th->abort || RTEST(ruby_debug))) {
            /* exit on main_thread */
            error_print();
            rb_thread_main_jump(ruby_errinfo, RESTORE_EXIT);
        }
        else {
            th->errinfo = ruby_errinfo;
        }
    }
    rb_thread_schedule();
    ruby_stop(0);               /* last thread termination */
}

static VALUE
rb_thread_yield_0(VALUE arg)
{
    return rb_thread_yield(arg, curr_thread);
}

static void
rb_thread_start_1(void)
{
    rb_thread_t th = new_thread.thread;
    volatile rb_thread_t th_save = th;
    VALUE proc = new_thread.proc;
    VALUE arg = new_thread.arg;
    struct ruby_env *ip = th->anchor;
    enum thread_status status;
    int state;

    ruby_frame = ip->frame;
    ruby_block = ip->block;
    ruby_scope = ip->scope;
    ruby_iter = ip->iter;
    ruby_cref = ip->cref;
    ruby_dyna_vars = ((struct BLOCK *)DATA_PTR(proc))->dyna_vars;
    PUSH_FRAME();
    *ruby_frame = *ip->frame;
    ruby_frame->prev = ip->frame;
    ruby_frame->iter = ITER_CUR;
    PUSH_TAG(PROT_NONE);
    if ((state = EXEC_TAG()) == 0) {
        if (THREAD_SAVE_CONTEXT(th) == 0) {
            new_thread.thread = 0;
            th->result = rb_block_pass(rb_thread_yield_0, arg, proc);
        }
        th = th_save;
    }
    else if (TAG_DST()) {
        th = th_save;
        th->result = prot_tag->retval;
    }
    POP_TAG();
    POP_FRAME();
    status = th->status;

    if (th == main_thread) ruby_stop(state);
    rb_thread_remove(th);
    rb_thread_terminated(th, state, status);
}

VALUE
rb_thread_create(VALUE (*fn)(ANYARGS), void *arg)
{
    Init_stack((VALUE*)&arg);
    return rb_thread_start_0(fn, (VALUE)arg, rb_thread_alloc(rb_cThread));
}

static VALUE
rb_thread_yield(VALUE arg, rb_thread_t th)
{
    const ID *tbl;

    scope_dup(ruby_block->scope);

    tbl = ruby_scope->local_tbl;
    if (tbl) {
        int n = *tbl++;
        for (tbl += 2, n -= 2; n > 0; --n) { /* skip first 2 ($_ and $~) */
            ID id = *tbl++;
            if (id != 0 && !rb_is_local_id(id))  /* push flip states */
                rb_dvar_push(id, Qfalse);
        }
    }
    rb_dvar_push('_', Qnil);
    rb_dvar_push('~', Qnil);
    ruby_block->dyna_vars = ruby_dyna_vars;

    return rb_yield_0(arg, 0, 0, YIELD_LAMBDA_CALL, Qtrue);
}

/*
 *  call-seq:
 *     Thread.new([arg]*) {|args| block }   => thread
 *
 *  Creates and runs a new thread to execute the instructions given in
 *  <i>block</i>. Any arguments passed to <code>Thread::new</code> are passed
 *  into the block.
 *
 *     x = Thread.new { sleep 0.1; print "x"; print "y"; print "z" }
 *     a = Thread.new { print "a"; print "b"; sleep 0.2; print "c" }
 *     x.join # Let the threads finish before
 *     a.join # main thread exits...
 *
 *  <em>produces:</em>
 *
 *     abxyzc
 */

static VALUE
rb_thread_s_new(int argc, VALUE *argv, VALUE klass)
{
    rb_thread_t th = rb_thread_alloc(klass);
    volatile VALUE *pos;

    pos = th->stk_pos;
    rb_obj_call_init(th->thread, argc, argv);
    if (th->stk_pos == 0) {
        rb_raise(rb_eThreadError, "uninitialized thread - check `%s#initialize'",
                 rb_class2name(klass));
    }

    return th->thread;
}

/*
 *  call-seq:
 *     Thread.new([arg]*) {|args| block }   => thread
 *
 *  Creates and runs a new thread to execute the instructions given in
 *  <i>block</i>. Any arguments passed to <code>Thread::new</code> are passed
 *  into the block.
 *
 *     x = Thread.new { sleep 0.1; print "x"; print "y"; print "z" }
 *     a = Thread.new { print "a"; print "b"; sleep 0.2; print "c" }
 *     x.join # Let the threads finish before
 *     a.join # main thread exits...
 *
 *  <em>produces:</em>
 *
 *     abxyzc
 */

static VALUE
rb_thread_initialize(VALUE thread, VALUE args)
{
    rb_thread_t th;

    if (!rb_block_given_p()) {
        rb_raise(rb_eThreadError, "must be called with a block");
    }
    th = rb_thread_check(thread);
    if (th->stk_max) {
        NODE *node = th->node;
        if (!node) {
            rb_raise(rb_eThreadError, "already initialized thread");
        }
        rb_raise(rb_eThreadError, "already initialized thread - %s:%d",
                 node->nd_file, nd_line(node));
    }
    return rb_thread_start_0(rb_thread_yield, args, th);
}

/*
 *  call-seq:
 *     Thread.start([args]*) {|args| block }   => thread
 *     Thread.fork([args]*) {|args| block }    => thread
 *
 *  Basically the same as <code>Thread::new</code>. However, if class
 *  <code>Thread</code> is subclassed, then calling <code>start</code> in that
 *  subclass will not invoke the subclass's <code>initialize</code> method.
 */

static VALUE
rb_thread_start(VALUE klass, VALUE args)
{
    if (!rb_block_given_p()) {
        rb_raise(rb_eThreadError, "must be called with a block");
    }
    return rb_thread_start_0(rb_thread_yield, args, rb_thread_alloc(klass));
}

/*
 *  call-seq:
 *     thr.value   => obj
 *
 *  Waits for <i>thr</i> to complete (via <code>Thread#join</code>) and returns
 *  its value.
 *
 *     a = Thread.new { 2 + 2 }
 *     a.value   #=> 4
 */

static VALUE
rb_thread_value(VALUE thread)
{
    rb_thread_t th = rb_thread_check(thread);

    while (!rb_thread_join(th, DELAY_INFTY));

    return th->result;
}

/*
 *  call-seq:
 *     thr.status   => string, false or nil
 *
 *  Returns the status of <i>thr</i>: ``<code>sleep</code>'' if <i>thr</i> is
 *  sleeping or waiting on I/O, ``<code>run</code>'' if <i>thr</i> is executing,
 *  ``<code>aborting</code>'' if <i>thr</i> is aborting, <code>false</code> if
 *  <i>thr</i> terminated normally, and <code>nil</code> if <i>thr</i>
 *  terminated with an exception.
 *
 *     a = Thread.new { raise("die now") }
 *     b = Thread.new { Thread.stop }
 *     c = Thread.new { Thread.exit }
 *     d = Thread.new { sleep }
 *     Thread.critical = true
 *     d.kill                  #=> #<Thread:0x401b3678 aborting>
 *     a.status                #=> nil
 *     b.status                #=> "sleep"
 *     c.status                #=> false
 *     d.status                #=> "aborting"
 *     Thread.current.status   #=> "run"
 */

static VALUE
rb_thread_status(VALUE thread)
{
    rb_thread_t th = rb_thread_check(thread);

    if (rb_thread_dead(th)) {
        if (!NIL_P(th->errinfo) && (th->flags & THREAD_RAISED))
            return Qnil;
        return Qfalse;
    }

    return rb_str_new2(thread_status_name(th->status));
}

/*
 *  call-seq:
 *     thr.alive?   => true or false
 *
 *  Returns <code>true</code> if <i>thr</i> is running or sleeping.
 *
 *     thr = Thread.new { }
 *     thr.join                #=> #<Thread:0x401b3fb0 dead>
 *     Thread.current.alive?   #=> true
 *     thr.alive?              #=> false
 */

static VALUE
rb_thread_alive_p(VALUE thread)
{
    rb_thread_t th = rb_thread_check(thread);

    if (rb_thread_dead(th)) return Qfalse;
    return Qtrue;
}

/*
 *  call-seq:
 *     thr.stop?   => true or false
 *
 *  Returns <code>true</code> if <i>thr</i> is dead or sleeping.
 *
 *     a = Thread.new { Thread.stop }
 *     b = Thread.current
 *     a.stop?   #=> true
 *     b.stop?   #=> false
 */

static VALUE
rb_thread_stop_p(VALUE thread)
{
    rb_thread_t th = rb_thread_check(thread);

    if (rb_thread_dead(th)) return Qtrue;
    if (th->status == THREAD_STOPPED) return Qtrue;
    return Qfalse;
}

static void
rb_thread_wait_other_threads(void)
{
    rb_thread_t th;
    int found;

    /* wait other threads to terminate */
    while (curr_thread != curr_thread->next) {
        found = 0;
        FOREACH_THREAD(th) {
            if (th != curr_thread && th->status != THREAD_STOPPED) {
                found = 1;
                break;
            }
        }
        END_FOREACH(th);
        if (!found) return;
        rb_thread_schedule();
    }
}

static void
rb_thread_cleanup(void)
{
    rb_thread_t curr, th;

    curr = curr_thread;
    while (curr->status == THREAD_KILLED) {
        curr = curr->prev;
    }

    FOREACH_THREAD_FROM(curr, th) {
        if (th->status != THREAD_KILLED) {
            rb_thread_ready(th);
            if (th != main_thread) {
                th->thgroup = 0;
                th->priority = 0;
                th->status = THREAD_TO_KILL;
                RDATA(th->thread)->dfree = NULL;
            }
        }
    }
    END_FOREACH_FROM(curr, th);
}

int rb_thread_critical;

/*
 *  call-seq:
 *     Thread.critical   => true or false
 *
 *  Returns the status of the global ``thread critical'' condition.
 */

static VALUE
rb_thread_critical_get(void)
{
    return rb_thread_critical?Qtrue:Qfalse;
}

/*
 *  call-seq:
 *     Thread.critical= boolean   => true or false
 *
 *  Sets the status of the global ``thread critical'' condition and returns
 *  it. When set to <code>true</code>, prohibits scheduling of any existing
 *  thread. Does not block new threads from being created and run. Certain
 *  thread operations (such as stopping or killing a thread, sleeping in the
 *  current thread, and raising an exception) may cause a thread to be scheduled
 *  even when in a critical section.  <code>Thread::critical</code> is not
 *  intended for daily use: it is primarily there to support folks writing
 *  threading libraries.
 */

static VALUE
rb_thread_critical_set(VALUE obj, VALUE val)
{
    rb_thread_critical = RTEST(val);
    return val;
}

void
rb_thread_interrupt(void)
{
    rb_thread_critical = 0;
    rb_thread_ready(main_thread);
    if (curr_thread == main_thread) {
        rb_interrupt();
    }
    if (!rb_thread_dead(curr_thread)) {
        if (THREAD_SAVE_CONTEXT(curr_thread)) {
            return;
        }
    }
    curr_thread = main_thread;
    rb_thread_restore_context(curr_thread, RESTORE_INTERRUPT);
}

void
rb_thread_signal_raise(const char *sig)
{
    if (sig == 0) return;       /* should not happen */
    rb_thread_critical = 0;
    if (curr_thread == main_thread) {
        rb_thread_ready(curr_thread);
        rb_raise(rb_eSignal, "SIG%s", sig);
    }
    rb_thread_ready(main_thread);
    if (!rb_thread_dead(curr_thread)) {
        if (THREAD_SAVE_CONTEXT(curr_thread)) {
            return;
        }
    }
    th_signm = sig;     /* should be literal */
    curr_thread = main_thread;
    rb_thread_restore_context(curr_thread, RESTORE_SIGNAL);
}

void
rb_thread_trap_eval(VALUE cmd, int sig, int safe)
{
    rb_thread_critical = 0;
    if (curr_thread == main_thread) {
        rb_trap_eval(cmd, sig, safe);
        return;
    }
    if (!rb_thread_dead(curr_thread)) {
        if (THREAD_SAVE_CONTEXT(curr_thread)) {
            return;
        }
    }
    th_cmd = cmd;
    th_sig = sig;
    th_safe = safe;
    curr_thread = main_thread;
    rb_thread_restore_context(curr_thread, RESTORE_TRAP);
}

void
rb_thread_signal_exit(void)
{
    VALUE args[2];

    rb_thread_critical = 0;
    if (curr_thread == main_thread) {
        rb_thread_ready(curr_thread);
        rb_exit(EXIT_SUCCESS);
    }
    args[0] = INT2NUM(EXIT_SUCCESS);
    args[1] = rb_str_new2("exit");
    rb_thread_ready(main_thread);
    if (!rb_thread_dead(curr_thread)) {
        if (THREAD_SAVE_CONTEXT(curr_thread)) {
            return;
        }
    }
    rb_thread_main_jump(rb_class_new_instance(2, args, rb_eSystemExit),
                        RESTORE_EXIT);
}

static VALUE
rb_thread_raise(int argc, VALUE *argv, rb_thread_t th)
{
    volatile rb_thread_t th_save = th;
    VALUE exc;

    if (!th->next) {
        rb_raise(rb_eArgError, "unstarted thread");
    }
    if (rb_thread_dead(th)) return Qnil;
    exc = rb_make_exception(argc, argv);
    if (curr_thread == th) {
        rb_raise_jump(exc);
    }

    if (!rb_thread_dead(curr_thread)) {
        if (THREAD_SAVE_CONTEXT(curr_thread)) {
            return th_save->thread;
        }
    }

    rb_thread_ready(th);
    curr_thread = th;

    th_raise_exception = exc;
    th_raise_node = ruby_current_node;
    rb_thread_restore_context(curr_thread, RESTORE_RAISE);
    return Qnil;                /* not reached */
}

/*
 *  call-seq:
 *     thr.raise(exception)
 *
 *  Raises an exception (see <code>Kernel::raise</code>) from <i>thr</i>. The
 *  caller does not have to be <i>thr</i>.
 *
 *     Thread.abort_on_exception = true
 *     a = Thread.new { sleep(200) }
 *     a.raise("Gotcha")
 *
 *  <em>produces:</em>
 *
 *     prog.rb:3: Gotcha (RuntimeError)
 *      from prog.rb:2:in `initialize'
 *      from prog.rb:2:in `new'
 *      from prog.rb:2
 */

static VALUE
rb_thread_raise_m(int argc, VALUE *argv, VALUE thread)
{
    rb_thread_t th = rb_thread_check(thread);

    if (ruby_safe_level > th->safe) {
        rb_secure(4);
    }
    rb_thread_raise(argc, argv, th);
    return Qnil;                /* not reached */
}

VALUE
rb_thread_local_aref(VALUE thread, ID id)
{
    rb_thread_t th;
    VALUE val;

    th = rb_thread_check(thread);
    if (ruby_safe_level >= 4 && th != curr_thread) {
        rb_raise(rb_eSecurityError, "Insecure: thread locals");
    }
    if (!th->locals) return Qnil;
    if (st_lookup(th->locals, id, &val)) {
        return val;
    }
    return Qnil;
}

/*
 *  call-seq:
 *      thr[sym]   => obj or nil
 *
 *  Attribute Reference---Returns the value of a thread-local variable, using
 *  either a symbol or a string name. If the specified variable does not exist,
 *  returns <code>nil</code>.
 *
 *     a = Thread.new { Thread.current["name"] = "A"; Thread.stop }
 *     b = Thread.new { Thread.current[:name]  = "B"; Thread.stop }
 *     c = Thread.new { Thread.current["name"] = "C"; Thread.stop }
 *     Thread.list.each {|x| puts "#{x.inspect}: #{x[:name]}" }
 *
 *  <em>produces:</em>
 *
 *     #<Thread:0x401b3b3c sleep>: C
 *     #<Thread:0x401b3bc8 sleep>: B
 *     #<Thread:0x401b3c68 sleep>: A
 *     #<Thread:0x401bdf4c run>:
 */

static VALUE
rb_thread_aref(VALUE thread, VALUE id)
{
    return rb_thread_local_aref(thread, rb_to_id(id));
}

VALUE
rb_thread_local_aset(VALUE thread, ID id, VALUE val)
{
    rb_thread_t th = rb_thread_check(thread);

    if (ruby_safe_level >= 4 && th != curr_thread) {
        rb_raise(rb_eSecurityError, "Insecure: can't modify thread locals");
    }
    if (OBJ_FROZEN(thread)) rb_error_frozen("thread locals");

    if (!th->locals) {
        th->locals = st_init_numtable();
    }
    if (NIL_P(val)) {
        st_delete(th->locals, (st_data_t*)&id, 0);
        return Qnil;
    }
    st_insert(th->locals, id, val);

    return val;
}

/*
 *  call-seq:
 *      thr[sym] = obj   => obj
 *
 *  Attribute Assignment---Sets or creates the value of a thread-local variable,
 *  using either a symbol or a string. See also <code>Thread#[]</code>.
 */

static VALUE
rb_thread_aset(VALUE thread, VALUE id, VALUE val)
{
    return rb_thread_local_aset(thread, rb_to_id(id), val);
}

/*
 *  call-seq:
 *     thr.key?(sym)   => true or false
 *
 *  Returns <code>true</code> if the given string (or symbol) exists as a
 *  thread-local variable.
 *
 *     me = Thread.current
 *     me[:oliver] = "a"
 *     me.key?(:oliver)    #=> true
 *     me.key?(:stanley)   #=> false
 */

static VALUE
rb_thread_key_p(VALUE thread, VALUE id)
{
    rb_thread_t th = rb_thread_check(thread);

    if (!th->locals) return Qfalse;
    if (st_lookup(th->locals, rb_to_id(id), 0))
        return Qtrue;
    return Qfalse;
}

static int
thread_keys_i(ID key, VALUE value, VALUE ary)
{
    rb_ary_push(ary, ID2SYM(key));
    return ST_CONTINUE;
}

/*
 *  call-seq:
 *     thr.keys   => array
 *
 *  Returns an an array of the names of the thread-local variables (as Symbols).
 *
 *     thr = Thread.new do
 *       Thread.current[:cat] = 'meow'
 *       Thread.current["dog"] = 'woof'
 *     end
 *     thr.join   #=> #<Thread:0x401b3f10 dead>
 *     thr.keys   #=> [:dog, :cat]
 */

static VALUE
rb_thread_keys(VALUE thread)
{
    rb_thread_t th = rb_thread_check(thread);
    VALUE ary = rb_ary_new();

    if (th->locals) {
        st_foreach(th->locals, thread_keys_i, ary);
    }
    return ary;
}

/*
 * call-seq:
 *   thr.inspect   => string
 *
 * Dump the name, id, and status of _thr_ to a string.
 */

static VALUE
rb_thread_inspect(VALUE thread)
{
    char *cname = rb_obj_classname(thread);
    rb_thread_t th = rb_thread_check(thread);
    const char *status = thread_status_name(th->status);
    VALUE str;

    str = rb_sprintf("#<%s:%p %s>", cname, thread, status);
    OBJ_INFECT(str, thread);

    return str;
}

void
rb_thread_atfork(void)
{
    rb_thread_t th;

    if (rb_thread_alone()) return;
    FOREACH_THREAD(th) {
        if (th != curr_thread) {
            rb_thread_die(th);
        }
    }
    END_FOREACH(th);
    main_thread = curr_thread;
    curr_thread->next = curr_thread;
    curr_thread->prev = curr_thread;
}

/*
 *  Document-class: Continuation
 *
 *  Continuation objects are generated by
 *  <code>Kernel#callcc</code>. They hold a return address and execution
 *  context, allowing a nonlocal return to the end of the
 *  <code>callcc</code> block from anywhere within a program.
 *  Continuations are somewhat analogous to a structured version of C's
 *  <code>setjmp/longjmp</code> (although they contain more state, so
 *  you might consider them closer to threads).
 *
 *  For instance:
 *
 *     arr = [ "Freddie", "Herbie", "Ron", "Max", "Ringo" ]
 *     callcc{|$cc|}
 *     puts(message = arr.shift)
 *     $cc.call unless message =~ /Max/
 *
 *  <em>produces:</em>
 *
 *     Freddie
 *     Herbie
 *     Ron
 *     Max
 *
 *  This (somewhat contrived) example allows the inner loop to abandon
 *  processing early:
 *
 *     callcc {|cont|
 *       for i in 0..4
 *         print "\n#{i}: "
 *         for j in i*5...(i+1)*5
 *           cont.call() if j == 17
 *           printf "%3d", j
 *         end
 *       end
 *     }
 *     print "\n"
 *
 *  <em>produces:</em>
 *
 *     0:   0  1  2  3  4
 *     1:   5  6  7  8  9
 *     2:  10 11 12 13 14
 *     3:  15 16
 */

static VALUE rb_cCont;

/*
 *  call-seq:
 *     callcc {|cont| block }   =>  obj
 *
 *  Generates a <code>Continuation</code> object, which it passes to the
 *  associated block. Performing a <em>cont</em><code>.call</code> will
 *  cause the <code>callcc</code> to return (as will falling through the
 *  end of the block). The value returned by the <code>callcc</code> is
 *  the value of the block, or the value passed to
 *  <em>cont</em><code>.call</code>. See class <code>Continuation</code>
 *  for more details. Also see <code>Kernel::throw</code> for
 *  an alternative mechanism for unwinding a call stack.
 */

static VALUE
rb_callcc(VALUE self)
{
    volatile VALUE cont;
    rb_thread_t th;
    volatile rb_thread_t th_save;
    struct tag *tag;
    struct RVarmap *vars;

    THREAD_ALLOC(th);
    cont = Data_Wrap_Struct(rb_cCont, thread_mark, thread_free, th);

    scope_dup(ruby_scope);
    for (tag=prot_tag; tag; tag=tag->prev) {
        scope_dup(tag->scope);
    }
    th->thread = curr_thread->thread;
    th->thgroup = cont_protect;

    for (vars = ruby_dyna_vars; vars; vars = vars->next) {
        if (FL_TEST(vars, DVAR_DONT_RECYCLE)) break;
        FL_SET(vars, DVAR_DONT_RECYCLE);
    }
    th_save = th;
    if (THREAD_SAVE_CONTEXT(th)) {
        return th_save->result;
    }
    else {
        return rb_yield(cont);
    }
}

/*
 *  call-seq:
 *     cont.call(args, ...)
 *     cont[args, ...]
 *
 *  Invokes the continuation. The program continues from the end of the
 *  <code>callcc</code> block. If no arguments are given, the original
 *  <code>callcc</code> returns <code>nil</code>. If one argument is
 *  given, <code>callcc</code> returns it. Otherwise, an array
 *  containing <i>args</i> is returned.
 *
 *     callcc {|cont|  cont.call }           #=> nil
 *     callcc {|cont|  cont.call 1 }         #=> 1
 *     callcc {|cont|  cont.call 1, 2, 3 }   #=> [1, 2, 3]
 */

static VALUE
rb_cont_call(int argc, VALUE *argv, VALUE cont)
{
    rb_thread_t th = rb_thread_check(cont);

    if (th->thread != curr_thread->thread) {
        rb_raise(rb_eRuntimeError, "continuation called across threads");
    }
    if (th->thgroup != cont_protect) {
        rb_raise(rb_eRuntimeError, "continuation called across trap");
    }
    switch (argc) {
      case 0:
        th->result = Qnil;
        break;
      case 1:
        th->result = argv[0];
        break;
      default:
        th->result = rb_ary_new4(argc, argv);
        break;
    }

    rb_thread_restore_context(th, RESTORE_NORMAL);
    return Qnil;
}

struct thgroup {
    int enclosed;
    VALUE group;
};

/*
 * Document-class: ThreadGroup
 *
 *  <code>ThreadGroup</code> provides a means of keeping track of a number of
 *  threads as a group. A <code>Thread</code> can belong to only one
 *  <code>ThreadGroup</code> at a time; adding a thread to a new group will
 *  remove it from any previous group.
 *
 *  Newly created threads belong to the same group as the thread from which they
 *  were created.
 */

static VALUE
thgroup_s_alloc(VALUE klass)
{
    VALUE group;
    struct thgroup *data;

    group = Data_Make_Struct(klass, struct thgroup, 0, free, data);
    data->enclosed = 0;
    data->group = group;

    return group;
}

/*
 *  call-seq:
 *     thgrp.list   => array
 *
 *  Returns an array of all existing <code>Thread</code> objects that belong to
 *  this group.
 *
 *     ThreadGroup::Default.list   #=> [#<Thread:0x401bdf4c run>]
 */

static VALUE
thgroup_list(VALUE group)
{
    struct thgroup *data;
    rb_thread_t th;
    VALUE ary;

    Data_Get_Struct(group, struct thgroup, data);
    ary = rb_ary_new();

    FOREACH_THREAD(th) {
        if (th->thgroup == data->group) {
            rb_ary_push(ary, th->thread);
        }
    }
    END_FOREACH(th);

    return ary;
}

/*
 *  call-seq:
 *     thgrp.enclose   => thgrp
 *
 *  Prevents threads from being added to or removed from the receiving
 *  <code>ThreadGroup</code>. New threads can still be started in an enclosed
 *  <code>ThreadGroup</code>.
 *
 *     ThreadGroup::Default.enclose        #=> #<ThreadGroup:0x4029d914>
 *     thr = Thread::new { Thread.stop }   #=> #<Thread:0x402a7210 sleep>
 *     tg = ThreadGroup::new               #=> #<ThreadGroup:0x402752d4>
 *     tg.add thr
 *
 *  <em>produces:</em>
 *
 *     ThreadError: can't move from the enclosed thread group
 */

static VALUE
thgroup_enclose(VALUE group)
{
    struct thgroup *data;

    Data_Get_Struct(group, struct thgroup, data);
    data->enclosed = 1;

    return group;
}

/*
 *  call-seq:
 *     thgrp.enclosed?   => true or false
 *
 *  Returns <code>true</code> if <em>thgrp</em> is enclosed. See also
 *  ThreadGroup#enclose.
 */

static VALUE
thgroup_enclosed_p(VALUE group)
{
    struct thgroup *data;

    Data_Get_Struct(group, struct thgroup, data);
    if (data->enclosed) return Qtrue;
    return Qfalse;
}

/*
 *  call-seq:
 *     thgrp.add(thread)   => thgrp
 *
 *  Adds the given <em>thread</em> to this group, removing it from any other
 *  group to which it may have previously belonged.
 *
 *     puts "Initial group is #{ThreadGroup::Default.list}"
 *     tg = ThreadGroup.new
 *     t1 = Thread.new { sleep }
 *     t2 = Thread.new { sleep }
 *     puts "t1 is #{t1}"
 *     puts "t2 is #{t2}"
 *     tg.add(t1)
 *     puts "Initial group now #{ThreadGroup::Default.list}"
 *     puts "tg group now #{tg.list}"
 *
 *  <em>produces:</em>
 *
 *     Initial group is #<Thread:0x401bdf4c>
 *     t1 is #<Thread:0x401b3c90>
 *     t2 is #<Thread:0x401b3c18>
 *     Initial group now #<Thread:0x401b3c18>#<Thread:0x401bdf4c>
 *     tg group now #<Thread:0x401b3c90>
 */

static VALUE
thgroup_add(VALUE group, VALUE thread)
{
    rb_thread_t th;
    struct thgroup *data;

    rb_secure(4);
    th = rb_thread_check(thread);
    if (!th->next || !th->prev) {
        rb_raise(rb_eTypeError, "wrong argument type %s (expected Thread)",
                 rb_obj_classname(thread));
    }

    if (OBJ_FROZEN(group)) {
      rb_raise(rb_eThreadError, "can't move to the frozen thread group");
    }
    Data_Get_Struct(group, struct thgroup, data);
    if (data->enclosed) {
        rb_raise(rb_eThreadError, "can't move to the enclosed thread group");
    }

    if (!th->thgroup) {
        return Qnil;
    }
    if (OBJ_FROZEN(th->thgroup)) {
        rb_raise(rb_eThreadError, "can't move from the frozen thread group");
    }
    Data_Get_Struct(th->thgroup, struct thgroup, data);
    if (data->enclosed) {
        rb_raise(rb_eThreadError, "can't move from the enclosed thread group");
    }

    th->thgroup = group;
    return group;
}

/* variables for recursive traversals */
static ID recursive_key;

/*
 *  +Thread+ encapsulates the behavior of a thread of
 *  execution, including the main thread of the Ruby script.
 *
 *  In the descriptions of the methods in this class, the parameter _sym_
 *  refers to a symbol, which is either a quoted string or a
 *  +Symbol+ (such as <code>:name</code>).
 */

void
Init_Thread(void)
{
    VALUE cThGroup;

    rb_eThreadError = rb_define_class("ThreadError", rb_eStandardError);
    rb_cThread = rb_define_class("Thread", rb_cObject);
    rb_undef_alloc_func(rb_cThread);

    rb_define_singleton_method(rb_cThread, "new", rb_thread_s_new, -1);
    rb_define_method(rb_cThread, "initialize", rb_thread_initialize, -2);
    rb_define_singleton_method(rb_cThread, "start", rb_thread_start, -2);
    rb_define_singleton_method(rb_cThread, "fork", rb_thread_start, -2);

    rb_define_singleton_method(rb_cThread, "stop", rb_thread_stop, 0);
    rb_define_singleton_method(rb_cThread, "kill", rb_thread_s_kill, 1);
    rb_define_singleton_method(rb_cThread, "exit", rb_thread_exit, 0);
    rb_define_singleton_method(rb_cThread, "pass", rb_thread_pass, 0);
    rb_define_singleton_method(rb_cThread, "current", rb_thread_current, 0);
    rb_define_singleton_method(rb_cThread, "main", rb_thread_main, 0);
    rb_define_singleton_method(rb_cThread, "list", rb_thread_list, 0);

    rb_define_singleton_method(rb_cThread, "critical", rb_thread_critical_get, 0);
    rb_define_singleton_method(rb_cThread, "critical=", rb_thread_critical_set, 1);

    rb_define_singleton_method(rb_cThread, "abort_on_exception", rb_thread_s_abort_exc, 0);
    rb_define_singleton_method(rb_cThread, "abort_on_exception=", rb_thread_s_abort_exc_set, 1);

    rb_define_method(rb_cThread, "run", rb_thread_run, 0);
    rb_define_method(rb_cThread, "wakeup", rb_thread_wakeup, 0);
    rb_define_method(rb_cThread, "kill", rb_thread_kill, 0);
    rb_define_method(rb_cThread, "terminate", rb_thread_kill, 0);
    rb_define_method(rb_cThread, "exit", rb_thread_kill, 0);
    rb_define_method(rb_cThread, "value", rb_thread_value, 0);
    rb_define_method(rb_cThread, "status", rb_thread_status, 0);
    rb_define_method(rb_cThread, "join", rb_thread_join_m, -1);
    rb_define_method(rb_cThread, "alive?", rb_thread_alive_p, 0);
    rb_define_method(rb_cThread, "stop?", rb_thread_stop_p, 0);
    rb_define_method(rb_cThread, "raise", rb_thread_raise_m, -1);

    rb_define_method(rb_cThread, "abort_on_exception", rb_thread_abort_exc, 0);
    rb_define_method(rb_cThread, "abort_on_exception=", rb_thread_abort_exc_set, 1);

    rb_define_method(rb_cThread, "priority", rb_thread_priority, 0);
    rb_define_method(rb_cThread, "priority=", rb_thread_priority_set, 1);
    rb_define_method(rb_cThread, "safe_level", rb_thread_safe_level, 0);
    rb_define_method(rb_cThread, "group", rb_thread_group, 0);

    rb_define_method(rb_cThread, "[]", rb_thread_aref, 1);
    rb_define_method(rb_cThread, "[]=", rb_thread_aset, 2);
    rb_define_method(rb_cThread, "key?", rb_thread_key_p, 1);
    rb_define_method(rb_cThread, "keys", rb_thread_keys, 0);

    rb_define_method(rb_cThread, "inspect", rb_thread_inspect, 0);

    rb_cCont = rb_define_class("Continuation", rb_cObject);
    rb_undef_alloc_func(rb_cCont);
    rb_undef_method(CLASS_OF(rb_cCont), "new");
    rb_define_method(rb_cCont, "call", rb_cont_call, -1);
    rb_define_method(rb_cCont, "[]", rb_cont_call, -1);
    rb_define_global_function("callcc", rb_callcc, 0);
    rb_global_variable(&cont_protect);

    cThGroup = rb_define_class("ThreadGroup", rb_cObject);
    rb_define_alloc_func(cThGroup, thgroup_s_alloc);
    rb_define_method(cThGroup, "list", thgroup_list, 0);
    rb_define_method(cThGroup, "enclose", thgroup_enclose, 0);
    rb_define_method(cThGroup, "enclosed?", thgroup_enclosed_p, 0);
    rb_define_method(cThGroup, "add", thgroup_add, 1);
    rb_global_variable(&thgroup_default);
    thgroup_default = rb_obj_alloc(cThGroup);
    rb_define_const(cThGroup, "Default", thgroup_default);

    /* allocate main thread */
    main_thread = rb_thread_alloc(rb_cThread);
    curr_thread = main_thread->prev = main_thread->next = main_thread;
    recursive_key = rb_intern("__recursive_key__");
}

/*
 *  call-seq:
 *     catch(symbol) {| | block }  > obj
 *
 *  +catch+ executes its block. If a +throw+ is
 *  executed, Ruby searches up its stack for a +catch+ block
 *  with a tag corresponding to the +throw+'s
 *  _symbol_. If found, that block is terminated, and
 *  +catch+ returns the value given to +throw+. If
 *  +throw+ is not called, the block terminates normally, and
 *  the value of +catch+ is the value of the last expression
 *  evaluated. +catch+ expressions may be nested, and the
 *  +throw+ call need not be in lexical scope.
 *
 *     def routine(n)
 *       puts n
 *       throw :done if n <= 0
 *       routine(n-1)
 *     end
 *
 *
 *     catch(:done) { routine(3) }
 *
 *  <em>produces:</em>
 *
 *     3
 *     2
 *     1
 *     0
 */

static VALUE
rb_f_catch(VALUE dmy, VALUE tag)
{
    int state;
    VALUE val = Qnil;           /* OK */

    tag = ID2SYM(rb_to_id(tag));
    PUSH_TAG(tag);
    if ((state = EXEC_TAG()) == 0) {
        val = rb_yield_0(tag, 0, 0, 0, Qfalse);
    }
    else if (state == TAG_THROW && tag == prot_tag->dst) {
        val = prot_tag->retval;
        state = 0;
    }
    POP_TAG();
    if (state) JUMP_TAG(state);

    return val;
}

static VALUE
catch_i(VALUE tag)
{
    return rb_funcall(Qnil, rb_intern("catch"), 1, tag);
}

VALUE
rb_catch(const char *tag, VALUE (*func)(ANYARGS), VALUE data)
{
    return rb_iterate((VALUE(*)(VALUE))catch_i, ID2SYM(rb_intern(tag)), func, data);
}

/*
 *  call-seq:
 *     throw(symbol [, obj])
 *
 *  Transfers control to the end of the active +catch+ block
 *  waiting for _symbol_. Raises +NameError+ if there
 *  is no +catch+ block for the symbol. The optional second
 *  parameter supplies a return value for the +catch+ block,
 *  which otherwise defaults to +nil+. For examples, see
 *  <code>Kernel::catch</code>.
 */

static VALUE
rb_f_throw(int argc, VALUE *argv)
{
    VALUE tag, value;
    struct tag *tt = prot_tag;

    rb_scan_args(argc, argv, "11", &tag, &value);
    tag = ID2SYM(rb_to_id(tag));

    while (tt) {
        if (tt->tag == tag) {
            tt->dst = tag;
            tt->retval = value;
            break;
        }
        if (tt->tag == PROT_THREAD) {
            rb_raise(rb_eThreadError, "uncaught throw `%s' in thread %p",
                     rb_id2name(SYM2ID(tag)),
                     curr_thread);
        }
        tt = tt->prev;
    }
    if (!tt) {
        rb_name_error(SYM2ID(tag), "uncaught throw `%s'", rb_id2name(SYM2ID(tag)));
    }
    rb_trap_restore_mask();
    JUMP_TAG(TAG_THROW);
#ifndef __GNUC__
    return Qnil;                /* not reached */
#endif
}

void
rb_throw(const char *tag, VALUE val)
{
    VALUE argv[2];

    argv[0] = ID2SYM(rb_intern(tag));
    argv[1] = val;
    rb_f_throw(2, argv);
}

static VALUE
recursive_check(VALUE obj)
{
    VALUE hash = rb_thread_local_aref(rb_thread_current(), recursive_key);

    if (NIL_P(hash) || TYPE(hash) != T_HASH) {
        return Qfalse;
    }
    else {
        VALUE list = rb_hash_aref(hash, ID2SYM(ruby_frame->this_func));

        if (NIL_P(list) || TYPE(list) != T_ARRAY) return Qfalse;
        return rb_ary_includes(list, rb_obj_id(obj));
    }
}

static void
recursive_push(VALUE obj)
{
    VALUE hash = rb_thread_local_aref(rb_thread_current(), recursive_key);
    VALUE list, sym;

    sym = ID2SYM(ruby_frame->this_func);
    if (NIL_P(hash) || TYPE(hash) != T_HASH) {
        hash = rb_hash_new();
        rb_thread_local_aset(rb_thread_current(), recursive_key, hash);
        list = Qnil;
    }
    else {
        list = rb_hash_aref(hash, sym);
    }
    if (NIL_P(list) || TYPE(list) != T_ARRAY) {
        list = rb_ary_new();
        rb_hash_aset(hash, sym, list);
    }
    rb_ary_push(list, rb_obj_id(obj));
}

static void
recursive_pop(void)
{
    VALUE hash = rb_thread_local_aref(rb_thread_current(), recursive_key);
    VALUE list, sym;

    sym = ID2SYM(ruby_frame->this_func);
    if (NIL_P(hash) || TYPE(hash) != T_HASH) {
        VALUE symname = rb_inspect(sym);
        VALUE thrname = rb_inspect(rb_thread_current());
        rb_raise(rb_eTypeError, "invalid inspect_tbl hash for %s in %s",
                 StringValuePtr(symname), StringValuePtr(thrname));
    }
    list = rb_hash_aref(hash, sym);
    if (NIL_P(list) || TYPE(list) != T_ARRAY) {
        VALUE symname = rb_inspect(sym);
        VALUE thrname = rb_inspect(rb_thread_current());
        rb_raise(rb_eTypeError, "invalid inspect_tbl list for %s in %s",
                 StringValuePtr(symname), StringValuePtr(thrname));
    }
    rb_ary_pop(list);
}

VALUE
rb_exec_recursive(VALUE (*func)(VALUE, VALUE, int), VALUE obj, VALUE arg)
{
    if (recursive_check(obj)) {
        return (*func)(obj, arg, Qtrue);
    }
    else {
        VALUE result;
        int state;

        recursive_push(obj);
        PUSH_TAG(PROT_NONE);
        if ((state = EXEC_TAG()) == 0) {
            result = (*func)(obj, arg, Qfalse);
        }
        POP_TAG();
        recursive_pop();
        if (state) JUMP_TAG(state);
        return result;
    }
}
/* [<][>][^] [v] [top][bottom][index] [help] */


file.c

root/file.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. be_chown
  2. be_fchown
  3. rb_get_path
  4. apply2files
  5. rb_file_path
  6. stat_new_0
  7. stat_new
  8. get_stat
  9. rb_stat_cmp
  10. rb_stat_dev
  11. rb_stat_dev_major
  12. rb_stat_dev_minor
  13. rb_stat_ino
  14. rb_stat_mode
  15. rb_stat_nlink
  16. rb_stat_uid
  17. rb_stat_gid
  18. rb_stat_rdev
  19. rb_stat_rdev_major
  20. rb_stat_rdev_minor
  21. rb_stat_size
  22. rb_stat_blksize
  23. rb_stat_blocks
  24. rb_stat_atime
  25. rb_stat_mtime
  26. rb_stat_ctime
  27. rb_stat_inspect
  28. rb_stat
  29. w32_io_info
  30. rb_file_s_stat
  31. rb_io_stat
  32. rb_file_s_lstat
  33. rb_file_lstat
  34. group_member
  35. eaccess
  36. test_d
  37. test_p
  38. test_l
  39. test_S
  40. test_b
  41. test_c
  42. test_e
  43. test_r
  44. test_R
  45. test_wr
  46. test_w
  47. test_W
  48. test_ww
  49. test_x
  50. test_X
  51. test_f
  52. test_z
  53. test_s
  54. test_owned
  55. test_rowned
  56. test_grpowned
  57. check3rdbyte
  58. test_suid
  59. test_sgid
  60. test_sticky
  61. test_identical
  62. rb_file_s_size
  63. rb_file_ftype
  64. rb_file_s_ftype
  65. rb_file_s_atime
  66. rb_file_atime
  67. rb_file_s_mtime
  68. rb_file_mtime
  69. rb_file_s_ctime
  70. rb_file_ctime
  71. chmod_internal
  72. rb_file_s_chmod
  73. rb_file_chmod
  74. lchmod_internal
  75. rb_file_s_lchmod
  76. rb_file_s_lchmod
  77. chown_internal
  78. rb_file_s_chown
  79. rb_file_chown
  80. lchown_internal
  81. rb_file_s_lchown
  82. rb_file_s_lchown
  83. utime_internal
  84. rb_file_s_utime
  85. utime_internal
  86. rb_file_s_utime
  87. sys_fail2
  88. rb_file_s_link
  89. rb_file_s_symlink
  90. rb_file_s_readlink
  91. unlink_internal
  92. rb_file_s_unlink
  93. rb_file_s_rename
  94. rb_file_s_umask
  95. has_drive_letter
  96. getcwdofdrv
  97. skiproot
  98. rb_path_next
  99. rb_path_skip_prefix
  100. rb_path_last_separator
  101. rb_path_end
  102. file_expand_path
  103. rb_file_expand_path
  104. rb_file_s_expand_path
  105. rmext
  106. rb_file_s_basename
  107. rb_file_s_dirname
  108. rb_file_s_extname
  109. rb_file_s_path
  110. rb_file_s_split
  111. file_inspect_join
  112. rb_file_join
  113. rb_file_s_join
  114. rb_file_s_truncate
  115. rb_file_truncate
  116. rb_thread_flock
  117. rb_file_flock
  118. test_check
  119. rb_f_test
  120. rb_stat_s_alloc
  121. rb_stat_init
  122. rb_stat_init_copy
  123. rb_stat_ftype
  124. rb_stat_d
  125. rb_stat_p
  126. rb_stat_l
  127. rb_stat_S
  128. rb_stat_b
  129. rb_stat_c
  130. rb_stat_owned
  131. rb_stat_rowned
  132. rb_stat_grpowned
  133. rb_stat_r
  134. rb_stat_R
  135. rb_stat_wr
  136. rb_stat_w
  137. rb_stat_W
  138. rb_stat_ww
  139. rb_stat_x
  140. rb_stat_X
  141. rb_stat_f
  142. rb_stat_z
  143. rb_stat_s
  144. rb_stat_suid
  145. rb_stat_sgid
  146. rb_stat_sticky
  147. rb_file_const
  148. is_absolute_path
  149. path_check_0
  150. fpath_check
  151. rb_path_check
  152. is_macos_native_path
  153. file_load_ok
  154. rb_find_file_ext
  155. rb_find_file
  156. define_filetest_function
  157. Init_File
/**********************************************************************

  file.c -

  $Author: akr $
  $Date: 2005/12/21 09:20:00 $
  created at: Mon Nov 15 12:24:34 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto
  Copyright (C) 2000  Network Applied Communication Laboratory, Inc.
  Copyright (C) 2000  Information-technology Promotion Agency, Japan

**********************************************************************/

#ifdef _WIN32
#include "missing/file.h"
#endif

#include "ruby.h"
#include "rubyio.h"
#include "rubysig.h"
#include "util.h"
#include "dln.h"

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#ifdef HAVE_SYS_FILE_H
# include <sys/file.h>
#else
int flock(int, int);
#endif

#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
#ifndef MAXPATHLEN
# define MAXPATHLEN 1024
#endif

#include <time.h>

VALUE rb_time_new(time_t, time_t);

#ifdef HAVE_UTIME_H
#include <utime.h>
#elif defined HAVE_SYS_UTIME_H
#include <sys/utime.h>
#endif

#ifdef HAVE_PWD_H
#include <pwd.h>
#endif

#include <sys/types.h>
#include <sys/stat.h>

#ifdef HAVE_SYS_MKDEV_H
#include <sys/mkdev.h>
#endif

#if !defined HAVE_LSTAT && !defined lstat
#define lstat stat
#endif

#ifdef __BEOS__ /* should not change ID if -1 */
static int
be_chown(const char *path, uid_t owner, gid_t group)
{
    if (owner == -1 || group == -1) {
        struct stat st;
        if (stat(path, &st) < 0) return -1;
        if (owner == -1) owner = st.st_uid;
        if (group == -1) group = st.st_gid;
    }
    return chown(path, owner, group);
}
#define chown be_chown
static int
be_fchown(int fd, uid_t owner, gid_t group)
{
    if (owner == -1 || group == -1) {
        struct stat st;
        if (fstat(fd, &st) < 0) return -1;
        if (owner == -1) owner = st.st_uid;
        if (group == -1) group = st.st_gid;
    }
    return fchown(fd, owner, group);
}
#define fchown be_fchown
#endif /* __BEOS__ */

VALUE rb_cFile;
VALUE rb_mFileTest;
static VALUE rb_cStat;

VALUE
rb_get_path(VALUE obj)
{
    VALUE tmp;
    static ID to_path;

    rb_check_safe_obj(obj);
    tmp = rb_check_string_type(obj);
    if (!NIL_P(tmp)) goto exit;

    if (!to_path) {
        to_path = rb_intern("to_path");
    }
    if (rb_respond_to(obj, to_path)) {
        obj = rb_funcall(obj, to_path, 0, 0);
    }
    tmp = obj;
    StringValueCStr(tmp);
  exit:
    if (obj != tmp) {
        rb_check_safe_obj(tmp);
    }
    return tmp;
}

static long
apply2files(void (*func)(const char *, void *), VALUE vargs, void *arg)
{
    long i;
    VALUE path;
    struct RArray *args = RARRAY(vargs);

    rb_secure(4);
    for (i=0; i<args->len; i++) {
        path = rb_get_path(args->ptr[i]);
        (*func)(StringValueCStr(path), arg);
    }

    return args->len;
}

/*
 *  call-seq:
 *     file.path -> filename
 *
 *  Returns the pathname used to create <i>file</i> as a string. Does
 *  not normalize the name.
 *
 *     File.new("testfile").path               #=> "testfile"
 *     File.new("/tmp/../tmp/xxx", "w").path   #=> "/tmp/../tmp/xxx"
 *
 */

static VALUE
rb_file_path(VALUE obj)
{
    OpenFile *fptr;

    fptr = RFILE(rb_io_taint_check(obj))->fptr;
    rb_io_check_initialized(fptr);
    if (!fptr->path) return Qnil;
    return rb_tainted_str_new2(fptr->path);
}

static VALUE
stat_new_0(VALUE klass, struct stat *st)
{
    struct stat *nst = 0;

    if (st) {
        nst = ALLOC(struct stat);
        *nst = *st;
    }
    return Data_Wrap_Struct(klass, NULL, free, nst);
}

static VALUE
stat_new(struct stat *st)
{
    return stat_new_0(rb_cStat, st);
}

static struct stat*
get_stat(VALUE self)
{
    struct stat* st;
    Data_Get_Struct(self, struct stat, st);
    if (!st) rb_raise(rb_eTypeError, "uninitialized File::Stat");
    return st;
}

/*
 *  call-seq:
 *     stat <=> other_stat    => -1, 0, 1
 *
 *  Compares <code>File::Stat</code> objects by comparing their
 *  respective modification times.
 *
 *     f1 = File.new("f1", "w")
 *     sleep 1
 *     f2 = File.new("f2", "w")
 *     f1.stat <=> f2.stat   #=> -1
 */

static VALUE
rb_stat_cmp(VALUE self, VALUE other)
{
    if (rb_obj_is_kind_of(other, rb_obj_class(self))) {
        time_t t1 = get_stat(self)->st_mtime;
        time_t t2 = get_stat(other)->st_mtime;
        if (t1 == t2)
            return INT2FIX(0);
        else if (t1 < t2)
            return INT2FIX(-1);
        else
            return INT2FIX(1);
    }
    return Qnil;
}

/*
 *  call-seq:
 *     stat.dev    => fixnum
 *
 *  Returns an integer representing the device on which <i>stat</i>
 *  resides.
 *
 *     File.stat("testfile").dev   #=> 774
 */

static VALUE
rb_stat_dev(VALUE self)
{
    return INT2NUM(get_stat(self)->st_dev);
}

/*
 *  call-seq:
 *     stat.dev_major   => fixnum
 *
 *  Returns the major part of <code>File_Stat#dev</code> or
 *  <code>nil</code>.
 *
 *     File.stat("/dev/fd1").dev_major   #=> 2
 *     File.stat("/dev/tty").dev_major   #=> 5
 */

static VALUE
rb_stat_dev_major(VALUE self)
{
#if defined(major)
    long dev = get_stat(self)->st_dev;
    return ULONG2NUM(major(dev));
#else
    return Qnil;
#endif
}

/*
 *  call-seq:
 *     stat.dev_minor   => fixnum
 *
 *  Returns the minor part of <code>File_Stat#dev</code> or
 *  <code>nil</code>.
 *
 *     File.stat("/dev/fd1").dev_minor   #=> 1
 *     File.stat("/dev/tty").dev_minor   #=> 0
 */

static VALUE
rb_stat_dev_minor(VALUE self)
{
#if defined(minor)
    long dev = get_stat(self)->st_dev;
    return ULONG2NUM(minor(dev));
#else
    return Qnil;
#endif
}

/*
 *  call-seq:
 *     stat.ino   => fixnum
 *
 *  Returns the inode number for <i>stat</i>.
 *
 *     File.stat("testfile").ino   #=> 1083669
 *
 */

static VALUE
rb_stat_ino(VALUE self)
{
#ifdef HUGE_ST_INO
    return ULL2NUM(get_stat(self)->st_ino);
#else
    return ULONG2NUM(get_stat(self)->st_ino);
#endif
}

/*
 *  call-seq:
 *     stat.mode   => fixnum
 *
 *  Returns an integer representing the permission bits of
 *  <i>stat</i>. The meaning of the bits is platform dependent; on
 *  Unix systems, see <code>stat(2)</code>.
 *
 *     File.chmod(0644, "testfile")   #=> 1
 *     s = File.stat("testfile")
 *     sprintf("%o", s.mode)          #=> "100644"
 */

static VALUE
rb_stat_mode(VALUE self)
{
#ifdef __BORLANDC__
    return UINT2NUM((unsigned short)(get_stat(self)->st_mode));
#else
    return UINT2NUM(get_stat(self)->st_mode);
#endif
}

/*
 *  call-seq:
 *     stat.nlink   => fixnum
 *
 *  Returns the number of hard links to <i>stat</i>.
 *
 *     File.stat("testfile").nlink             #=> 1
 *     File.link("testfile", "testfile.bak")   #=> 0
 *     File.stat("testfile").nlink             #=> 2
 *
 */

static VALUE
rb_stat_nlink(VALUE self)
{
    return UINT2NUM(get_stat(self)->st_nlink);
}

/*
 *  call-seq:
 *     stat.uid    => fixnum
 *
 *  Returns the numeric user id of the owner of <i>stat</i>.
 *
 *     File.stat("testfile").uid   #=> 501
 *
 */

static VALUE
rb_stat_uid(VALUE self)
{
    return UINT2NUM(get_stat(self)->st_uid);
}

/*
 *  call-seq:
 *     stat.gid   => fixnum
 *
 *  Returns the numeric group id of the owner of <i>stat</i>.
 *
 *     File.stat("testfile").gid   #=> 500
 *
 */

static VALUE
rb_stat_gid(VALUE self)
{
    return UINT2NUM(get_stat(self)->st_gid);
}

/*
 *  call-seq:
 *     stat.rdev   =>  fixnum or nil
 *
 *  Returns an integer representing the device type on which
 *  <i>stat</i> resides. Returns <code>nil</code> if the operating
 *  system doesn't support this feature.
 *
 *     File.stat("/dev/fd1").rdev   #=> 513
 *     File.stat("/dev/tty").rdev   #=> 1280
 */

static VALUE
rb_stat_rdev(VALUE self)
{
#ifdef HAVE_ST_RDEV
    return ULONG2NUM(get_stat(self)->st_rdev);
#else
    return Qnil;
#endif
}

/*
 *  call-seq:
 *     stat.rdev_major   => fixnum
 *
 *  Returns the major part of <code>File_Stat#rdev</code> or
 *  <code>nil</code>.
 *
 *     File.stat("/dev/fd1").rdev_major   #=> 2
 *     File.stat("/dev/tty").rdev_major   #=> 5
 */

static VALUE
rb_stat_rdev_major(VALUE self)
{
#if defined(HAVE_ST_RDEV) && defined(major)
    long rdev = get_stat(self)->st_rdev;
    return ULONG2NUM(major(rdev));
#else
    return Qnil;
#endif
}

/*
 *  call-seq:
 *     stat.rdev_minor   => fixnum
 *
 *  Returns the minor part of <code>File_Stat#rdev</code> or
 *  <code>nil</code>.
 *
 *     File.stat("/dev/fd1").rdev_minor   #=> 1
 *     File.stat("/dev/tty").rdev_minor   #=> 0
 */

static VALUE
rb_stat_rdev_minor(VALUE self)
{
#if defined(HAVE_ST_RDEV) && defined(minor)
    long rdev = get_stat(self)->st_rdev;
    return ULONG2NUM(minor(rdev));
#else
    return Qnil;
#endif
}

/*
 *  call-seq:
 *     stat.size    => fixnum
 *
 *  Returns the size of <i>stat</i> in bytes.
 *
 *     File.stat("testfile").size   #=> 66
 */

static VALUE
rb_stat_size(VALUE self)
{
    return OFFT2NUM(get_stat(self)->st_size);
}

/*
 *  call-seq:
 *     stat.blksize   => integer or nil
 *
 *  Returns the native file system's block size. Will return <code>nil</code>
 *  on platforms that don't support this information.
 *
 *     File.stat("testfile").blksize   #=> 4096
 *
 */

static VALUE
rb_stat_blksize(VALUE self)
{
#ifdef HAVE_ST_BLKSIZE
    return ULONG2NUM(get_stat(self)->st_blksize);
#else
    return Qnil;
#endif
}

/*
 *  call-seq:
 *     stat.blocks    => integer or nil
 *
 *  Returns the number of native file system blocks allocated for this
 *  file, or <code>nil</code> if the operating system doesn't
 *  support this feature.
 *
 *     File.stat("testfile").blocks   #=> 2
 */

static VALUE
rb_stat_blocks(VALUE self)
{
#ifdef HAVE_ST_BLOCKS
    return ULONG2NUM(get_stat(self)->st_blocks);
#else
    return Qnil;
#endif
}

/*
 *  call-seq:
 *     stat.atime   => time
 *
 *  Returns the last access time for this file as an object of class
 *  <code>Time</code>.
 *
 *     File.stat("testfile").atime   #=> Wed Dec 31 18:00:00 CST 1969
 *
 */

static VALUE
rb_stat_atime(VALUE self)
{
    return rb_time_new(get_stat(self)->st_atime, 0);
}

/*
 *  call-seq:
 *     stat.mtime -> aTime
 *
 *  Returns the modification time of <i>stat</i>.
 *
 *     File.stat("testfile").mtime   #=> Wed Apr 09 08:53:14 CDT 2003
 *
 */

static VALUE
rb_stat_mtime(VALUE self)
{
    return rb_time_new(get_stat(self)->st_mtime, 0);
}

/*
 *  call-seq:
 *     stat.ctime -> aTime
 *
 *  Returns the change time for <i>stat</i> (that is, the time
 *  directory information about the file was changed, not the file
 *  itself).
 *
 *     File.stat("testfile").ctime   #=> Wed Apr 09 08:53:14 CDT 2003
 *
 */

static VALUE
rb_stat_ctime(VALUE self)
{
    return rb_time_new(get_stat(self)->st_ctime, 0);
}

/*
 * call-seq:
 *   stat.inspect  =>  string
 *
 * Produce a nicely formatted description of <i>stat</i>.
 *
 *   File.stat("/etc/passwd").inspect
 *      #=> "#<File::Stat dev=0xe000005, ino=1078078, mode=0100644,
 *           nlink=1, uid=0, gid=0, rdev=0x0, size=1374, blksize=4096,
 *           blocks=8, atime=Wed Dec 10 10:16:12 CST 2003,
 *           mtime=Fri Sep 12 15:41:41 CDT 2003,
 *           ctime=Mon Oct 27 11:20:27 CST 2003>"
 */

static VALUE
rb_stat_inspect(VALUE self)
{
    VALUE str;
    int i;
    static const struct {
        const char *name;
        VALUE (*func)(VALUE);
    } member[] = {
        {"dev",     rb_stat_dev},
        {"ino",     rb_stat_ino},
        {"mode",    rb_stat_mode},
        {"nlink",   rb_stat_nlink},
        {"uid",     rb_stat_uid},
        {"gid",     rb_stat_gid},
        {"rdev",    rb_stat_rdev},
        {"size",    rb_stat_size},
        {"blksize", rb_stat_blksize},
        {"blocks",  rb_stat_blocks},
        {"atime",   rb_stat_atime},
        {"mtime",   rb_stat_mtime},
        {"ctime",   rb_stat_ctime},
    };

    str = rb_str_buf_new2("#<");
    rb_str_buf_cat2(str, rb_obj_classname(self));
    rb_str_buf_cat2(str, " ");

    for (i = 0; i < sizeof(member)/sizeof(member[0]); i++) {
        VALUE v;

        if (i > 0) {
            rb_str_buf_cat2(str, ", ");
        }
        rb_str_buf_cat2(str, member[i].name);
        rb_str_buf_cat2(str, "=");
        v = (*member[i].func)(self);
        if (i == 2) {           /* mode */
            char buf[32];

            sprintf(buf, "0%lo", NUM2ULONG(v));
            rb_str_buf_cat2(str, buf);
        }
        else if (i == 0 || i == 6) { /* dev/rdev */
            char buf[32];

            sprintf(buf, "0x%lx", NUM2ULONG(v));
            rb_str_buf_cat2(str, buf);
        }
        else {
            rb_str_append(str, rb_inspect(v));
        }
    }
    rb_str_buf_cat2(str, ">");
    OBJ_INFECT(str, self);

    return str;
}

static int
rb_stat(VALUE file, struct stat *st)
{
    VALUE tmp;

    rb_secure(2);
    tmp = rb_check_convert_type(file, T_FILE, "IO", "to_io");
    if (!NIL_P(tmp)) {
        OpenFile *fptr;

        GetOpenFile(tmp, fptr);
        return fstat(fptr->fd, st);
    }
    FilePathValue(file);
    return stat(StringValueCStr(file), st);
}

#ifdef _WIN32
static HANDLE
w32_io_info(VALUE *file, BY_HANDLE_FILE_INFORMATION *st)
{
    VALUE tmp;
    HANDLE f, ret = 0;

    tmp = rb_check_convert_type(*file, T_FILE, "IO", "to_io");
    if (!NIL_P(tmp)) {
        OpenFile *fptr;

        GetOpenFile(tmp, fptr);
        f = (HANDLE)rb_w32_get_osfhandle(fptr->fd);
        if (f == (HANDLE)-1) return INVALID_HANDLE_VALUE;
    }
    else {
        FilePathValue(*file);
        f = CreateFile(StringValueCStr(*file), 0,
                       FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING,
                       rb_w32_iswin95() ? 0 : FILE_FLAG_BACKUP_SEMANTICS, NULL);
        if (f == INVALID_HANDLE_VALUE) return f;
        ret = f;
    }
    if (GetFileType(f) == FILE_TYPE_DISK) {
        ZeroMemory(st, sizeof(*st));
        if (GetFileInformationByHandle(f, st)) return ret;
    }
    if (ret) CloseHandle(ret);
    return INVALID_HANDLE_VALUE;
}
#endif

/*
 *  call-seq:
 *     File.stat(file_name)   =>  stat
 *
 *  Returns a <code>File::Stat</code> object for the named file (see
 *  <code>File::Stat</code>).
 *
 *     File.stat("testfile").mtime   #=> Tue Apr 08 12:58:04 CDT 2003
 *
 */

static VALUE
rb_file_s_stat(VALUE klass, VALUE fname)
{
    struct stat st;

    rb_secure(4);
    FilePathValue(fname);
    if (rb_stat(fname, &st) < 0) {
        rb_sys_fail(StringValueCStr(fname));
    }
    return stat_new(&st);
}

/*
 *  call-seq:
 *     ios.stat    => stat
 *
 *  Returns status information for <em>ios</em> as an object of type
 *  <code>File::Stat</code>.
 *
 *     f = File.new("testfile")
 *     s = f.stat
 *     "%o" % s.mode   #=> "100644"
 *     s.blksize       #=> 4096
 *     s.atime         #=> Wed Apr 09 08:53:54 CDT 2003
 *
 */

static VALUE
rb_io_stat(VALUE obj)
{
    OpenFile *fptr;
    struct stat st;

    GetOpenFile(obj, fptr);
    if (fstat(fptr->fd, &st) == -1) {
        rb_sys_fail(fptr->path);
    }
    return stat_new(&st);
}

/*
 *  call-seq:
 *     File.lstat(file_name)   => stat
 *
 *  Same as <code>File::stat</code>, but does not follow the last symbolic
 *  link. Instead, reports on the link itself.
 *
 *     File.symlink("testfile", "link2test")   #=> 0
 *     File.stat("testfile").size              #=> 66
 *     File.lstat("link2test").size            #=> 8
 *     File.stat("link2test").size             #=> 66
 *
 */

static VALUE
rb_file_s_lstat(VALUE klass, VALUE fname)
{
#ifdef HAVE_LSTAT
    struct stat st;

    rb_secure(2);
    FilePathValue(fname);
    if (lstat(StringValueCStr(fname), &st) == -1) {
        rb_sys_fail(RSTRING(fname)->ptr);
    }
    return stat_new(&st);
#else
    return rb_file_s_stat(klass, fname);
#endif
}

/*
 *  call-seq:
 *     file.lstat   =>  stat
 *
 *  Same as <code>IO#stat</code>, but does not follow the last symbolic
 *  link. Instead, reports on the link itself.
 *
 *     File.symlink("testfile", "link2test")   #=> 0
 *     File.stat("testfile").size              #=> 66
 *     f = File.new("link2test")
 *     f.lstat.size                            #=> 8
 *     f.stat.size                             #=> 66
 */

static VALUE
rb_file_lstat(VALUE obj)
{
#ifdef HAVE_LSTAT
    OpenFile *fptr;
    struct stat st;

    rb_secure(2);
    GetOpenFile(obj, fptr);
    if (!fptr->path) return Qnil;
    if (lstat(fptr->path, &st) == -1) {
        rb_sys_fail(fptr->path);
    }
    return stat_new(&st);
#else
    return rb_io_stat(obj);
#endif
}

static int
group_member(GETGROUPS_T gid)
{
#ifndef _WIN32
    if (getgid() ==  gid)
        return Qtrue;

# ifdef HAVE_GETGROUPS
#  ifndef NGROUPS
#   ifdef NGROUPS_MAX
#    define NGROUPS NGROUPS_MAX
#   else
#    define NGROUPS 32
#   endif
#  endif
    {
        GETGROUPS_T gary[NGROUPS];
        int anum;

        anum = getgroups(NGROUPS, gary);
        while (--anum >= 0)
            if (gary[anum] == gid)
                return Qtrue;
    }
# endif
#endif
    return Qfalse;
}

#ifndef S_IXUGO
#  define S_IXUGO               (S_IXUSR | S_IXGRP | S_IXOTH)
#endif

int
eaccess(const char *path, int mode)
{
#if defined(S_IXGRP) && !defined(_WIN32) && !defined(__CYGWIN__)
    struct stat st;
    int euid;

    if (stat(path, &st) < 0) return -1;

    euid = geteuid();

    if (euid == 0) {
        /* Root can read or write any file. */
        if (!(mode & X_OK))
            return 0;

        /* Root can execute any file that has any one of the execute
           bits set. */
        if (st.st_mode & S_IXUGO)
            return 0;

        return -1;
    }

    if (st.st_uid == euid)        /* owner */
        mode <<= 6;
    else if (getegid() == st.st_gid || group_member(st.st_gid))
        mode <<= 3;

    if ((st.st_mode & mode) == mode) return 0;

    return -1;
#else
# if _MSC_VER >= 1400
    mode &= 6;
# endif
    return access(path, mode);
#endif
}

/*
 * Document-class: FileTest
 *
 *  <code>FileTest</code> implements file test operations similar to
 *  those used in <code>File::Stat</code>. It exists as a standalone
 *  module, and its methods are also insinuated into the <code>File</code>
 *  class. (Note that this is not done by inclusion: the interpreter cheats).
 *
 */

/*
 * call-seq:
 *   File.directory?(file_name)   =>  true or false
 *
 * Returns <code>true</code> if the named file is a directory,
 * <code>false</code> otherwise.
 *
 *    File.directory?(".")
 */

static VALUE
test_d(VALUE obj, VALUE fname)
{
#ifndef S_ISDIR
#   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
#endif

    struct stat st;

    if (rb_stat(fname, &st) < 0) return Qfalse;
    if (S_ISDIR(st.st_mode)) return Qtrue;
    return Qfalse;
}

/*
 * call-seq:
 *   File.pipe?(file_name)   =>  true or false
 *
 * Returns <code>true</code> if the named file is a pipe.
 */

static VALUE
test_p(VALUE obj, VALUE fname)
{
#ifdef S_IFIFO
#  ifndef S_ISFIFO
#    define S_ISFIFO(m) ((m & S_IFMT) == S_IFIFO)
#  endif

    struct stat st;

    if (rb_stat(fname, &st) < 0) return Qfalse;
    if (S_ISFIFO(st.st_mode)) return Qtrue;

#endif
    return Qfalse;
}

/*
 * call-seq:
 *   File.symlink?(file_name)   =>  true or false
 *
 * Returns <code>true</code> if the named file is a symbolic link.
 */

static VALUE
test_l(VALUE obj, VALUE fname)
{
#ifndef S_ISLNK
#  ifdef _S_ISLNK
#    define S_ISLNK(m) _S_ISLNK(m)
#  else
#    ifdef _S_IFLNK
#      define S_ISLNK(m) ((m & S_IFMT) == _S_IFLNK)
#    else
#      ifdef S_IFLNK
#        define S_ISLNK(m) ((m & S_IFMT) == S_IFLNK)
#      endif
#    endif
#  endif
#endif

#ifdef S_ISLNK
    struct stat st;

    rb_secure(2);
    FilePathValue(fname);
    if (lstat(StringValueCStr(fname), &st) < 0) return Qfalse;
    if (S_ISLNK(st.st_mode)) return Qtrue;
#endif

    return Qfalse;
}

/*
 * call-seq:
 *   File.socket?(file_name)   =>  true or false
 *
 * Returns <code>true</code> if the named file is a socket.
 */

static VALUE
test_S(VALUE obj, VALUE fname)
{
#ifndef S_ISSOCK
#  ifdef _S_ISSOCK
#    define S_ISSOCK(m) _S_ISSOCK(m)
#  else
#    ifdef _S_IFSOCK
#      define S_ISSOCK(m) ((m & S_IFMT) == _S_IFSOCK)
#    else
#      ifdef S_IFSOCK
#        define S_ISSOCK(m) ((m & S_IFMT) == S_IFSOCK)
#      endif
#    endif
#  endif
#endif

#ifdef S_ISSOCK
    struct stat st;

    if (rb_stat(fname, &st) < 0) return Qfalse;
    if (S_ISSOCK(st.st_mode)) return Qtrue;

#endif
    return Qfalse;
}

/*
 * call-seq:
 *   File.blockdev?(file_name)   =>  true or false
 *
 * Returns <code>true</code> if the named file is a block device.
 */

static VALUE
test_b(VALUE obj, VALUE fname)
{
#ifndef S_ISBLK
#   ifdef S_IFBLK
#       define S_ISBLK(m) ((m & S_IFMT) == S_IFBLK)
#   else
#       define S_ISBLK(m) (0)  /* anytime false */
#   endif
#endif

#ifdef S_ISBLK
    struct stat st;

    if (rb_stat(fname, &st) < 0) return Qfalse;
    if (S_ISBLK(st.st_mode)) return Qtrue;

#endif
    return Qfalse;
}

/*
 * call-seq:
 *   File.chardev?(file_name)   =>  true or false
 *
 * Returns <code>true</code> if the named file is a character device.
 */
static VALUE
test_c(VALUE obj, VALUE fname)
{
#ifndef S_ISCHR
#   define S_ISCHR(m) ((m & S_IFMT) == S_IFCHR)
#endif

    struct stat st;

    if (rb_stat(fname, &st) < 0) return Qfalse;
    if (S_ISCHR(st.st_mode)) return Qtrue;

    return Qfalse;
}

/*
 * call-seq:
 *    File.exist?(file_name)    =>  true or false
 *    File.exists?(file_name)   =>  true or false    (obsolete)
 *
 * Return <code>true</code> if the named file exists.
 */

static VALUE
test_e(VALUE obj, VALUE fname)
{
    struct stat st;

    if (rb_stat(fname, &st) < 0) return Qfalse;
    return Qtrue;
}

/*
 * call-seq:
 *    File.readable?(file_name)   => true or false
 *
 * Returns <code>true</code> if the named file is readable by the effective
 * user id of this process.
 */

static VALUE
test_r(VALUE obj, VALUE fname)
{
    rb_secure(2);
    FilePathValue(fname);
    if (eaccess(StringValueCStr(fname), R_OK) < 0) return Qfalse;
    return Qtrue;
}

/*
 * call-seq:
 *    File.readable_real?(file_name)   => true or false
 *
 * Returns <code>true</code> if the named file is readable by the real
 * user id of this process.
 */

static VALUE
test_R(VALUE obj, VALUE fname)
{
    rb_secure(2);
    FilePathValue(fname);
    if (access(StringValueCStr(fname), R_OK) < 0) return Qfalse;
    return Qtrue;
}

#ifndef S_IRUGO
#  define S_IRUGO               (S_IRUSR | S_IRGRP | S_IROTH)
#endif

#ifndef S_IWUGO
#  define S_IWUGO               (S_IWUSR | S_IWGRP | S_IWOTH)
#endif

/*
 * call-seq:
 *    File.world_readable?(file_name)   => fixnum or nil
 *
 * If <i>file_name</i> is readable by others, returns an integer
 * representing the file permission bits of <i>file_name</i>. Returns
 * <code>nil</code> otherwise. The meaning of the bits is platform
 * dependent; on Unix systems, see <code>stat(2)</code>.
 *
 *    File.world_readable?("/etc/passwd")           # => 420
 *    m = File.world_readable?("/etc/passwd")
 *    sprintf("%o", m)                              # => "644"
 */

static VALUE
test_wr(VALUE obj, VALUE fname)
{
#ifdef S_IROTH
    struct stat st;

    if (rb_stat(fname, &st) < 0) return Qnil;
    if ((st.st_mode & (S_IROTH)) == S_IROTH) {
        return UINT2NUM(st.st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
    }
#endif
    return Qnil;
}

/*
 * call-seq:
 *    File.writable?(file_name)   => true or false
 *
 * Returns <code>true</code> if the named file is writable by the effective
 * user id of this process.
 */

static VALUE
test_w(VALUE obj, VALUE fname)
{
    rb_secure(2);
    FilePathValue(fname);
    if (eaccess(StringValueCStr(fname), W_OK) < 0) return Qfalse;
    return Qtrue;
}

/*
 * call-seq:
 *    File.writable_real?(file_name)   => true or false
 *
 * Returns <code>true</code> if the named file is writable by the real
 * user id of this process.
 */

static VALUE
test_W(VALUE obj, VALUE fname)
{
    rb_secure(2);
    FilePathValue(fname);
    if (access(StringValueCStr(fname), W_OK) < 0) return Qfalse;
    return Qtrue;
}

/*
 * call-seq:
 *    File.world_writable?(file_name)   => fixnum or nil
 *
 * If <i>file_name</i> is writable by others, returns an integer
 * representing the file permission bits of <i>file_name</i>. Returns
 * <code>nil</code> otherwise. The meaning of the bits is platform
 * dependent; on Unix systems, see <code>stat(2)</code>.
 *
 *    File.world_writable?("/tmp")                  #=> 511
 *    m = File.world_writable?("/tmp")
 *    sprintf("%o", m)                              #=> "777"
 */

static VALUE
test_ww(VALUE obj, VALUE fname)
{
#ifdef S_IWOTH
    struct stat st;

    if (rb_stat(fname, &st) < 0) return Qfalse;
    if ((st.st_mode & (S_IWOTH)) == S_IWOTH) {
        return UINT2NUM(st.st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
    }
#endif
    return Qnil;
}

/*
 * call-seq:
 *    File.executable?(file_name)   => true or false
 *
 * Returns <code>true</code> if the named file is executable by the effective
 * user id of this process.
 */

static VALUE
test_x(VALUE obj, VALUE fname)
{
    rb_secure(2);
    FilePathValue(fname);
    if (eaccess(StringValueCStr(fname), X_OK) < 0) return Qfalse;
    return Qtrue;
}

/*
 * call-seq:
 *    File.executable_real?(file_name)   => true or false
 *
 * Returns <code>true</code> if the named file is executable by the real
 * user id of this process.
 */

static VALUE
test_X(VALUE obj, VALUE fname)
{
    rb_secure(2);
    FilePathValue(fname);
    if (access(StringValueCStr(fname), X_OK) < 0) return Qfalse;
    return Qtrue;
}

#ifndef S_ISREG
#   define S_ISREG(m) ((m & S_IFMT) == S_IFREG)
#endif

/*
 * call-seq:
 *    File.file?(file_name)   => true or false
 *
 * Returns <code>true</code> if the named file exists and is a
 * regular file.
 */

static VALUE
test_f(VALUE obj, VALUE fname)
{
    struct stat st;

    if (rb_stat(fname, &st) < 0) return Qfalse;
    if (S_ISREG(st.st_mode)) return Qtrue;
    return Qfalse;
}

/*
 * call-seq:
 *    File.zero?(file_name)   => true or false
 *
 * Returns <code>true</code> if the named file exists and has
 * a zero size.
 */

static VALUE
test_z(VALUE obj, VALUE fname)
{
    struct stat st;

    if (rb_stat(fname, &st) < 0) return Qfalse;
    if (st.st_size == 0) return Qtrue;
    return Qfalse;
}

/*
 * call-seq:
 *    File.file?(file_name)   => integer  or  nil
 *
 * Returns <code>nil</code> if <code>file_name</code> doesn't
 * exist or has zero size, the size of the file otherwise.
 */

static VALUE
test_s(VALUE obj, VALUE fname)
{
    struct stat st;

    if (rb_stat(fname, &st) < 0) return Qnil;
    if (st.st_size == 0) return Qnil;
    return OFFT2NUM(st.st_size);
}

/*
 * call-seq:
 *    File.owned?(file_name)   => true or false
 *
 * Returns <code>true</code> if the named file exists and the
 * effective used id of the calling process is the owner of
 * the file.
 */

static VALUE
test_owned(VALUE obj, VALUE fname)
{
    struct stat st;

    if (rb_stat(fname, &st) < 0) return Qfalse;
    if (st.st_uid == geteuid()) return Qtrue;
    return Qfalse;
}

static VALUE
test_rowned(VALUE obj, VALUE fname)
{
    struct stat st;

    if (rb_stat(fname, &st) < 0) return Qfalse;
    if (st.st_uid == getuid()) return Qtrue;
    return Qfalse;
}

/*
 * call-seq:
 *    File.grpowned?(file_name)   => true or false
 *
 * Returns <code>true</code> if the named file exists and the
 * effective group id of the calling process is the owner of
 * the file. Returns <code>false</code> on Windows.
 */

static VALUE
test_grpowned(VALUE obj, VALUE fname)
{
#ifndef _WIN32
    struct stat st;

    if (rb_stat(fname, &st) < 0) return Qfalse;
    if (st.st_gid == getegid()) return Qtrue;
#endif
    return Qfalse;
}

#if defined(S_ISUID) || defined(S_ISGID) || defined(S_ISVTX)
static VALUE
check3rdbyte(VALUE fname, int mode)
{
    struct stat st;

    rb_secure(2);
    FilePathValue(fname);
    if (stat(StringValueCStr(fname), &st) < 0) return Qfalse;
    if (st.st_mode & mode) return Qtrue;
    return Qfalse;
}
#endif

/*
 * call-seq:
 *   File.setuid?(file_name)   =>  true or false
 *
 * Returns <code>true</code> if the named file has the setuid bit set.
 */

static VALUE
test_suid(VALUE obj, VALUE fname)
{
#ifdef S_ISUID
    return check3rdbyte(fname, S_ISUID);
#else
    return Qfalse;
#endif
}

/*
 * call-seq:
 *   File.setgid?(file_name)   =>  true or false
 *
 * Returns <code>true</code> if the named file has the setgid bit set.
 */

static VALUE
test_sgid(VALUE obj, VALUE fname)
{
#ifdef S_ISGID
    return check3rdbyte(fname, S_ISGID);
#else
    return Qfalse;
#endif
}

/*
 * call-seq:
 *   File.sticky?(file_name)   =>  true or false
 *
 * Returns <code>true</code> if the named file has the sticky bit set.
 */

static VALUE
test_sticky(VALUE obj, VALUE fname)
{
#ifdef S_ISVTX
    return check3rdbyte(fname, S_ISVTX);
#else
    return Qnil;
#endif
}

/*
 * call-seq:
 *   File.identical?(file_1, file_2)   =>  true or false
 *
 * Returns <code>true</code> if the named files are identical.
 *
 *     open("a", "w") {}
 *     p File.identical?("a", "a")      #=> true
 *     p File.identical?("a", "./a")    #=> true
 *     File.link("a", "b")
 *     p File.identical?("a", "b")      #=> true
 *     File.symlink("a", "c")
 *     p File.identical?("a", "c")      #=> true
 *     open("d", "w") {}
 *     p File.identical?("a", "d")      #=> false
 */

static VALUE
test_identical(VALUE obj, VALUE fname1, VALUE fname2)
{
#ifndef DOSISH
    struct stat st1, st2;

    if (rb_stat(fname1, &st1) < 0) return Qfalse;
    if (rb_stat(fname2, &st2) < 0) return Qfalse;
    if (st1.st_dev != st2.st_dev) return Qfalse;
    if (st1.st_ino != st2.st_ino) return Qfalse;
#else
#ifdef _WIN32
    BY_HANDLE_FILE_INFORMATION st1, st2;
    HANDLE f1 = 0, f2 = 0;
#endif

    rb_secure(2);
#ifdef _WIN32
    f1 = w32_io_info(&fname1, &st1);
    if (f1 == INVALID_HANDLE_VALUE) return Qfalse;
    f2 = w32_io_info(&fname2, &st2);
    if (f1) CloseHandle(f1);
    if (f2 == INVALID_HANDLE_VALUE) return Qfalse;
    if (f2) CloseHandle(f2);

    if (st1.dwVolumeSerialNumber == st2.dwVolumeSerialNumber &&
        st1.nFileIndexHigh == st2.nFileIndexHigh &&
        st1.nFileIndexLow == st2.nFileIndexLow)
        return Qtrue;
    if (!f1 || !f2) return Qfalse;
    if (rb_w32_iswin95()) return Qfalse;
#else
    FilePathValue(fname1);
    fname1 = rb_str_new4(fname1);
    FilePathValue(fname2);
    if (access(RSTRING(fname1)->ptr, 0)) return Qfalse;
    if (access(RSTRING(fname2)->ptr, 0)) return Qfalse;
#endif
    fname1 = rb_file_expand_path(fname1, Qnil);
    fname2 = rb_file_expand_path(fname2, Qnil);
    if (RSTRING(fname1)->len != RSTRING(fname2)->len) return Qfalse;
    if (rb_memcicmp(RSTRING(fname1)->ptr, RSTRING(fname2)->ptr, RSTRING(fname1)->len))
        return Qfalse;
#endif
    return Qtrue;
}

/*
 * call-seq:
 *    File.size(file_name)   => integer
 *
 * Returns the size of <code>file_name</code>.
 */

static VALUE
rb_file_s_size(VALUE klass, VALUE fname)
{
    struct stat st;

    if (rb_stat(fname, &st) < 0)
        rb_sys_fail(StringValueCStr(fname));
    return OFFT2NUM(st.st_size);
}

static VALUE
rb_file_ftype(const struct stat *st)
{
    char *t;

    if (S_ISREG(st->st_mode)) {
        t = "file";
    }
    else if (S_ISDIR(st->st_mode)) {
        t = "directory";
    }
    else if (S_ISCHR(st->st_mode)) {
        t = "characterSpecial";
    }
#ifdef S_ISBLK
    else if (S_ISBLK(st->st_mode)) {
        t = "blockSpecial";
    }
#endif
#ifdef S_ISFIFO
    else if (S_ISFIFO(st->st_mode)) {
        t = "fifo";
    }
#endif
#ifdef S_ISLNK
    else if (S_ISLNK(st->st_mode)) {
        t = "link";
    }
#endif
#ifdef S_ISSOCK
    else if (S_ISSOCK(st->st_mode)) {
        t = "socket";
    }
#endif
    else {
        t = "unknown";
    }

    return rb_str_new2(t);
}

/*
 *  call-seq:
 *     File.ftype(file_name)   => string
 *
 *  Identifies the type of the named file; the return string is one of
 *  ``<code>file</code>'', ``<code>directory</code>'',
 *  ``<code>characterSpecial</code>'', ``<code>blockSpecial</code>'',
 *  ``<code>fifo</code>'', ``<code>link</code>'',
 *  ``<code>socket</code>'', or ``<code>unknown</code>''.
 *
 *     File.ftype("testfile")            #=> "file"
 *     File.ftype("/dev/tty")            #=> "characterSpecial"
 *     File.ftype("/tmp/.X11-unix/X0")   #=> "socket"
 */

static VALUE
rb_file_s_ftype(VALUE klass, VALUE fname)
{
    struct stat st;

    rb_secure(2);
    FilePathValue(fname);
    if (lstat(StringValueCStr(fname), &st) == -1) {
        rb_sys_fail(RSTRING(fname)->ptr);
    }

    return rb_file_ftype(&st);
}

/*
 *  call-seq:
 *     File.atime(file_name)  =>  time
 *
 *  Returns the last access time for the named file as a Time object).
 *
 *     File.atime("testfile")   #=> Wed Apr 09 08:51:48 CDT 2003
 *
 */

static VALUE
rb_file_s_atime(VALUE klass, VALUE fname)
{
    struct stat st;

    if (rb_stat(fname, &st) < 0)
        rb_sys_fail(StringValueCStr(fname));
    return rb_time_new(st.st_atime, 0);
}

/*
 *  call-seq:
 *     file.atime    => time
 *
 *  Returns the last access time (a <code>Time</code> object)
 *   for <i>file</i>, or epoch if <i>file</i> has not been accessed.
 *
 *     File.new("testfile").atime   #=> Wed Dec 31 18:00:00 CST 1969
 *
 */

static VALUE
rb_file_atime(VALUE obj)
{
    OpenFile *fptr;
    struct stat st;

    GetOpenFile(obj, fptr);
    if (fstat(fptr->fd, &st) == -1) {
        rb_sys_fail(fptr->path);
    }
    return rb_time_new(st.st_atime, 0);
}

/*
 *  call-seq:
 *     File.mtime(file_name)  =>  time
 *
 *  Returns the modification time for the named file as a Time object.
 *
 *     File.mtime("testfile")   #=> Tue Apr 08 12:58:04 CDT 2003
 *
 */

static VALUE
rb_file_s_mtime(VALUE klass, VALUE fname)
{
    struct stat st;

    if (rb_stat(fname, &st) < 0)
        rb_sys_fail(RSTRING(fname)->ptr);
    return rb_time_new(st.st_mtime, 0);
}

/*
 *  call-seq:
 *     file.mtime -> time
 *
 *  Returns the modification time for <i>file</i>.
 *
 *     File.new("testfile").mtime   #=> Wed Apr 09 08:53:14 CDT 2003
 *
 */

static VALUE
rb_file_mtime(VALUE obj)
{
    OpenFile *fptr;
    struct stat st;

    GetOpenFile(obj, fptr);
    if (fstat(fptr->fd, &st) == -1) {
        rb_sys_fail(fptr->path);
    }
    return rb_time_new(st.st_mtime, 0);
}

/*
 *  call-seq:
 *     File.ctime(file_name)  => time
 *
 *  Returns the change time for the named file (the time at which
 *  directory information about the file was changed, not the file
 *  itself).
 *
 *     File.ctime("testfile")   #=> Wed Apr 09 08:53:13 CDT 2003
 *
 */

static VALUE
rb_file_s_ctime(VALUE klass, VALUE fname)
{
    struct stat st;

    if (rb_stat(fname, &st) < 0)
        rb_sys_fail(RSTRING(fname)->ptr);
    return rb_time_new(st.st_ctime, 0);
}

/*
 *  call-seq:
 *     file.ctime -> time
 *
 *  Returns the change time for <i>file</i> (that is, the time directory
 *  information about the file was changed, not the file itself).
 *
 *     File.new("testfile").ctime   #=> Wed Apr 09 08:53:14 CDT 2003
 *
 */

static VALUE
rb_file_ctime(VALUE obj)
{
    OpenFile *fptr;
    struct stat st;

    GetOpenFile(obj, fptr);
    if (fstat(fptr->fd, &st) == -1) {
        rb_sys_fail(fptr->path);
    }
    return rb_time_new(st.st_ctime, 0);
}

static void
chmod_internal(const char *path, void *mode)
{
    if (chmod(path, (int)mode) < 0)
        rb_sys_fail(path);
}

/*
 *  call-seq:
 *     File.chmod(mode_int, file_name, ... ) -> integer
 *
 *  Changes permission bits on the named file(s) to the bit pattern
 *  represented by <i>mode_int</i>. Actual effects are operating system
 *  dependent (see the beginning of this section). On Unix systems, see
 *  <code>chmod(2)</code> for details. Returns the number of files
 *  processed.
 *
 *     File.chmod(0644, "testfile", "out")   #=> 2
 */

static VALUE
rb_file_s_chmod(int argc, VALUE *argv)
{
    VALUE vmode;
    VALUE rest;
    int mode;
    long n;

    rb_secure(2);
    rb_scan_args(argc, argv, "1*", &vmode, &rest);
    mode = NUM2INT(vmode);

    n = apply2files(chmod_internal, rest, (void *)(long)mode);
    return LONG2FIX(n);
}

/*
 *  call-seq:
 *     file.chmod(mode_int)   => 0
 *
 *  Changes permission bits on <i>file</i> to the bit pattern
 *  represented by <i>mode_int</i>. Actual effects are platform
 *  dependent; on Unix systems, see <code>chmod(2)</code> for details.
 *  Follows symbolic links. Also see <code>File#lchmod</code>.
 *
 *     f = File.new("out", "w");
 *     f.chmod(0644)   #=> 0
 */

static VALUE
rb_file_chmod(VALUE obj, VALUE vmode)
{
    OpenFile *fptr;
    int mode;

    rb_secure(2);
    mode = NUM2INT(vmode);

    GetOpenFile(obj, fptr);
#ifdef HAVE_FCHMOD
    if (fchmod(fptr->fd, mode) == -1)
        rb_sys_fail(fptr->path);
#else
    if (!fptr->path) return Qnil;
    if (chmod(fptr->path, mode) == -1)
        rb_sys_fail(fptr->path);
#endif

    return INT2FIX(0);
}

#if defined(HAVE_LCHMOD)
static void
lchmod_internal(const char *path, void *mode)
{
    if (lchmod(path, (int)mode) < 0)
        rb_sys_fail(path);
}

/*
 *  call-seq:
 *     File.lchmod(mode_int, file_name, ...)  => integer
 *
 *  Equivalent to <code>File::chmod</code>, but does not follow symbolic
 *  links (so it will change the permissions associated with the link,
 *  not the file referenced by the link). Often not available.
 *
 */

static VALUE
rb_file_s_lchmod(int argc, VALUE *argv)
{
    VALUE vmode;
    VALUE rest;
    long mode, n;

    rb_secure(2);
    rb_scan_args(argc, argv, "1*", &vmode, &rest);
    mode = NUM2INT(vmode);

    n = apply2files(lchmod_internal, rest, (void *)(long)mode);
    return LONG2FIX(n);
}
#else
static VALUE
rb_file_s_lchmod(int argc, VALUE *argv)
{
    rb_notimplement();
    return Qnil;                /* not reached */
}
#endif

struct chown_args {
    int owner, group;
};

static void
chown_internal(const char *path, void *arg)
{
    struct chown_args *args = arg;
    if (chown(path, args->owner, args->group) < 0)
        rb_sys_fail(path);
}

/*
 *  call-seq:
 *     File.chown(owner_int, group_int, file_name,... ) -> integer
 *
 *  Changes the owner and group of the named file(s) to the given
 *  numeric owner and group id's. Only a process with superuser
 *  privileges may change the owner of a file. The current owner of a
 *  file may change the file's group to any group to which the owner
 *  belongs. A <code>nil</code> or -1 owner or group id is ignored.
 *  Returns the number of files processed.
 *
 *     File.chown(nil, 100, "testfile")
 *
 */

static VALUE
rb_file_s_chown(int argc, VALUE *argv)
{
    VALUE o, g, rest;
    struct chown_args arg;
    long n;

    rb_secure(2);
    rb_scan_args(argc, argv, "2*", &o, &g, &rest);
    if (NIL_P(o)) {
        arg.owner = -1;
    }
    else {
        arg.owner = NUM2INT(o);
    }
    if (NIL_P(g)) {
        arg.group = -1;
    }
    else {
        arg.group = NUM2INT(g);
    }

    n = apply2files(chown_internal, rest, &arg);
    return LONG2FIX(n);
}

/*
 *  call-seq:
 *     file.chown(owner_int, group_int )   => 0
 *
 *  Changes the owner and group of <i>file</i> to the given numeric
 *  owner and group id's. Only a process with superuser privileges may
 *  change the owner of a file. The current owner of a file may change
 *  the file's group to any group to which the owner belongs. A
 *  <code>nil</code> or -1 owner or group id is ignored. Follows
 *  symbolic links. See also <code>File#lchown</code>.
 *
 *     File.new("testfile").chown(502, 1000)
 *
 */

static VALUE
rb_file_chown(VALUE obj, VALUE owner, VALUE group)
{
    OpenFile *fptr;
    int o, g;

    rb_secure(2);
    o = NIL_P(owner) ? -1 : NUM2INT(owner);
    g = NIL_P(group) ? -1 : NUM2INT(group);
    GetOpenFile(obj, fptr);
#if defined(DJGPP) || defined(__CYGWIN32__) || defined(_WIN32) || defined(__EMX__)
    if (!fptr->path) return Qnil;
    if (chown(fptr->path, o, g) == -1)
        rb_sys_fail(fptr->path);
#else
    if (fchown(fptr->fd, o, g) == -1)
        rb_sys_fail(fptr->path);
#endif

    return INT2FIX(0);
}

#if defined(HAVE_LCHOWN) && !defined(__CHECKER__)
static void
lchown_internal(const char *path, void *arg)
{
    struct chown_args *args = arg;
    if (lchown(path, args->owner, args->group) < 0)
        rb_sys_fail(path);
}

/*
 *  call-seq:
 *     file.lchown(owner_int, group_int, file_name,..) => integer
 *
 *  Equivalent to <code>File::chown</code>, but does not follow symbolic
 *  links (so it will change the owner associated with the link, not the
 *  file referenced by the link). Often not available. Returns number
 *  of files in the argument list.
 *
 */

static VALUE
rb_file_s_lchown(int argc, VALUE *argv)
{
    VALUE o, g, rest;
    struct chown_args arg;
    long n;

    rb_secure(2);
    rb_scan_args(argc, argv, "2*", &o, &g, &rest);
    if (NIL_P(o)) {
        arg.owner = -1;
    }
    else {
        arg.owner = NUM2INT(o);
    }
    if (NIL_P(g)) {
        arg.group = -1;
    }
    else {
        arg.group = NUM2INT(g);
    }

    n = apply2files(lchown_internal, rest, &arg);
    return LONG2FIX(n);
}
#else
static VALUE
rb_file_s_lchown(int argc, VALUE *argv)
{
    rb_notimplement();
}
#endif

struct timeval rb_time_timeval(VALUE time);

#if defined(HAVE_UTIMES) && !defined(__CHECKER__)

static void
utime_internal(const char *path, void *arg)
{
    struct timeval *tvp = arg;
    if (utimes(path, tvp) < 0)
        rb_sys_fail(path);
}

/*
 * call-seq:
 *  File.utime(atime, mtime, file_name,...)   =>  integer
 *
 * Sets the access and modification times of each
 * named file to the first two arguments. Returns
 * the number of file names in the argument list.
 */

static VALUE
rb_file_s_utime(int argc, VALUE *argv)
{
    VALUE atime, mtime, rest;
    struct timeval tvp[2];
    long n;

    rb_scan_args(argc, argv, "2*", &atime, &mtime, &rest);

    tvp[0] = rb_time_timeval(atime);
    tvp[1] = rb_time_timeval(mtime);

    n = apply2files(utime_internal, rest, tvp);
    return LONG2FIX(n);
}

#else

#if !defined HAVE_UTIME_H && !defined HAVE_SYS_UTIME_H
struct utimbuf {
    long actime;
    long modtime;
};
#endif

static void
utime_internal(const char *path, void *arg)
{
    struct utimbuf *utp = arg;
    if (utime(path, utp) < 0)
        rb_sys_fail(path);
}

static VALUE
rb_file_s_utime(int argc, VALUE *argv)
{
    VALUE atime, mtime, rest;
    long n;
    struct timeval tv;
    struct utimbuf utbuf;

    rb_scan_args(argc, argv, "2*", &atime, &mtime, &rest);

    tv = rb_time_timeval(atime);
    utbuf.actime = tv.tv_sec;
    tv = rb_time_timeval(mtime);
    utbuf.modtime = tv.tv_sec;

    n = apply2files(utime_internal, rest, &utbuf);
    return LONG2FIX(n);
}

#endif

NORETURN(static void sys_fail2(VALUE,VALUE));
static void
sys_fail2(VALUE s1, VALUE s2)
{
    char *buf;
    int len;

    len = RSTRING(s1)->len + RSTRING(s2)->len + 5;
    buf = ALLOCA_N(char, len);
    snprintf(buf, len, "(%s, %s)", RSTRING(s1)->ptr, RSTRING(s2)->ptr);
    rb_sys_fail(buf);
}

/*
 *  call-seq:
 *     File.link(old_name, new_name)    => 0
 *
 *  Creates a new name for an existing file using a hard link. Will not
 *  overwrite <i>new_name</i> if it already exists (raising a subclass
 *  of <code>SystemCallError</code>). Not available on all platforms.
 *
 *     File.link("testfile", ".testfile")   #=> 0
 *     IO.readlines(".testfile")[0]         #=> "This is line one\n"
 */

static VALUE
rb_file_s_link(VALUE klass, VALUE from, VALUE to)
{
#ifdef HAVE_LINK
    rb_secure(2);
    FilePathValue(from);
    FilePathValue(to);

    if (link(StringValueCStr(from), StringValueCStr(to)) < 0) {
        sys_fail2(from, to);
    }
    return INT2FIX(0);
#else
    rb_notimplement();
    return Qnil;                /* not reached */
#endif
}

/*
 *  call-seq:
 *     File.symlink(old_name, new_name)   => 0
 *
 *  Creates a symbolic link called <i>new_name</i> for the existing file
 *  <i>old_name</i>. Raises a <code>NotImplemented</code> exception on
 *  platforms that do not support symbolic links.
 *
 *     File.symlink("testfile", "link2test")   #=> 0
 *
 */

static VALUE
rb_file_s_symlink(VALUE klass, VALUE from, VALUE to)
{
#ifdef HAVE_SYMLINK
    rb_secure(2);
    FilePathValue(from);
    FilePathValue(to);

    if (symlink(StringValueCStr(from), StringValueCStr(to)) < 0) {
        sys_fail2(from, to);
    }
    return INT2FIX(0);
#else
    rb_notimplement();
    return Qnil;                /* not reached */
#endif
}

/*
 *  call-seq:
 *     File.readlink(link_name) -> file_name
 *
 *  Returns the name of the file referenced by the given link.
 *  Not available on all platforms.
 *
 *     File.symlink("testfile", "link2test")   #=> 0
 *     File.readlink("link2test")              #=> "testfile"
 */

static VALUE
rb_file_s_readlink(VALUE klass, VALUE path)
{
#ifdef HAVE_READLINK
    char *buf;
    int size = 100;
    int rv;
    VALUE v;

    rb_secure(2);
    FilePathValue(path);
    buf = xmalloc(size);
    while ((rv = readlink(RSTRING(path)->ptr, buf, size)) == size
#ifdef _AIX
            || (rv < 0 && errno == ERANGE) /* quirky behavior of GPFS */
#endif
        ) {
        size *= 2;
        buf = xrealloc(buf, size);
    }
    if (rv < 0) {
        free(buf);
        rb_sys_fail(RSTRING(path)->ptr);
    }
    v = rb_tainted_str_new(buf, rv);
    free(buf);

    return v;
#else
    rb_notimplement();
    return Qnil;                /* not reached */
#endif
}

static void
unlink_internal(const char *path, void *arg)
{
    if (unlink(path) < 0)
        rb_sys_fail(path);
}

/*
 *  call-seq:
 *     File.delete(file_name, ...)  => integer
 *     File.unlink(file_name, ...)  => integer
 *
 *  Deletes the named files, returning the number of names
 *  passed as arguments. Raises an exception on any error.
 *  See also <code>Dir::rmdir</code>.
 */

static VALUE
rb_file_s_unlink(VALUE klass, VALUE args)
{
    long n;

    rb_secure(2);
    n = apply2files(unlink_internal, args, 0);
    return LONG2FIX(n);
}

/*
 *  call-seq:
 *     File.rename(old_name, new_name)   => 0
 *
 *  Renames the given file to the new name. Raises a
 *  <code>SystemCallError</code> if the file cannot be renamed.
 *
 *     File.rename("afile", "afile.bak")   #=> 0
 */

static VALUE
rb_file_s_rename(VALUE klass, VALUE from, VALUE to)
{
    const char *src, *dst;

    rb_secure(2);
    FilePathValue(from);
    FilePathValue(to);
    src = StringValueCStr(from);
    dst = StringValueCStr(to);
    if (rename(src, dst) < 0) {
#if defined __CYGWIN__
        extern unsigned long __attribute__((stdcall)) GetLastError();
        errno = GetLastError(); /* This is a Cygwin bug */
#elif defined DOSISH && !defined _WIN32
        if (errno == EEXIST
#if defined (__EMX__)
            || errno == EACCES
#endif
            ) {
            if (chmod(dst, 0666) == 0 &&
                unlink(dst) == 0 &&
                rename(src, dst) == 0)
                return INT2FIX(0);
        }
#endif
        sys_fail2(from, to);
    }

    return INT2FIX(0);
}

/*
 *  call-seq:
 *     File.umask()          => integer
 *     File.umask(integer)   => integer
 *
 *  Returns the current umask value for this process. If the optional
 *  argument is given, set the umask to that value and return the
 *  previous value. Umask values are <em>subtracted</em> from the
 *  default permissions, so a umask of <code>0222</code> would make a
 *  file read-only for everyone.
 *
 *     File.umask(0006)   #=> 18
 *     File.umask         #=> 6
 */

static VALUE
rb_file_s_umask(int argc, VALUE *argv)
{
    int omask = 0;

    rb_secure(2);
    if (argc == 0) {
        omask = umask(0);
        umask(omask);
    }
    else if (argc == 1) {
        omask = umask(NUM2INT(argv[0]));
    }
    else {
        rb_raise(rb_eArgError, "wrong number of arguments");
    }
    return INT2FIX(omask);
}

#if defined DOSISH
#define DOSISH_UNC
#define isdirsep(x) ((x) == '/' || (x) == '\\')
#else
#define isdirsep(x) ((x) == '/')
#endif
#ifndef CharNext                /* defined as CharNext[AW] on Windows. */
# if defined(DJGPP)
#   define CharNext(p) ((p) + mblen(p, RUBY_MBCHAR_MAXSIZE))
# else
#   define CharNext(p) ((p) + 1)
# endif
#endif

#ifdef __CYGWIN__
#undef DOSISH
#define DOSISH_UNC
#define DOSISH_DRIVE_LETTER
#endif

#ifdef DOSISH_DRIVE_LETTER
static inline int
has_drive_letter(const char *buf)
{
    if (ISALPHA(buf[0]) && buf[1] == ':') {
        return 1;
    }
    else {
        return 0;
    }
}

static char*
getcwdofdrv(int drv)
{
    char drive[4];
    char *drvcwd, *oldcwd;

    drive[0] = drv;
    drive[1] = ':';
    drive[2] = '\0';

    /* the only way that I know to get the current directory
       of a particular drive is to change chdir() to that drive,
       so save the old cwd before chdir()
    */
    oldcwd = my_getcwd();
    if (chdir(drive) == 0) {
        drvcwd = my_getcwd();
        chdir(oldcwd);
        free(oldcwd);
    }
    else {
        /* perhaps the drive is not exist. we return only drive letter */
        drvcwd = strdup(drive);
    }
    return drvcwd;
}
#endif

static inline char *
skiproot(const char *path)
{
#ifdef DOSISH_DRIVE_LETTER
    if (has_drive_letter(path)) path += 2;
#endif
    while (isdirsep(*path)) path++;
    return (char *)path;
}

#define nextdirsep rb_path_next
char *
rb_path_next(const char *s)
{
    while (*s && !isdirsep(*s)) {
        s = CharNext(s);
    }
    return (char *)s;
}

#if defined(DOSISH_UNC) || defined(DOSISH_DRIVE_LETTER)
#define skipprefix rb_path_skip_prefix
#else
#define skipprefix(path) (path)
#endif
char *
rb_path_skip_prefix(const char *path)
{
#if defined(DOSISH_UNC) || defined(DOSISH_DRIVE_LETTER)
#ifdef DOSISH_UNC
    if (isdirsep(path[0]) && isdirsep(path[1])) {
        path += 2;
        while (isdirsep(*path)) path++;
        if (*(path = nextdirsep(path)) && path[1] && !isdirsep(path[1]))
            path = nextdirsep(path + 1);
        return (char *)path;
    }
#endif
#ifdef DOSISH_DRIVE_LETTER
    if (has_drive_letter(path))
        return (char *)(path + 2);
#endif
#endif
    return (char *)path;
}

#define strrdirsep rb_path_last_separator
char *
rb_path_last_separator(const char *path)
{
    char *last = NULL;
    while (*path) {
        if (isdirsep(*path)) {
            const char *tmp = path++;
            while (isdirsep(*path)) path++;
            if (!*path) break;
            last = (char *)tmp;
        }
        else {
            path = CharNext(path);
        }
    }
    return last;
}

#define chompdirsep rb_path_end
char *
rb_path_end(const char *path)
{
    while (*path) {
        if (isdirsep(*path)) {
            const char *last = path++;
            while (isdirsep(*path)) path++;
            if (!*path) return (char *)last;
        }
        else {
            path = CharNext(path);
        }
    }
    return (char *)path;
}

#define BUFCHECK(cond) do {\
    long bdiff = p - buf;\
    while (cond) {\
        buflen *= 2;\
    }\
    rb_str_resize(result, buflen);\
    buf = RSTRING(result)->ptr;\
    p = buf + bdiff;\
    pend = buf + buflen;\
} while (0)

#define BUFINIT() (\
    p = buf = RSTRING(result)->ptr,\
    buflen = RSTRING(result)->len,\
    pend = p + buflen)

#if !defined(TOLOWER)
#define TOLOWER(c) (ISUPPER(c) ? tolower(c) : (c))
#endif

static int is_absolute_path(const char*);

static VALUE
file_expand_path(VALUE fname, VALUE dname, VALUE result)
{
    char *s, *buf, *b, *p, *pend, *root;
    long buflen, dirlen;
    int tainted;

    FilePathValue(fname);
    s = StringValuePtr(fname);
    BUFINIT();
    tainted = OBJ_TAINTED(fname);

    if (s[0] == '~') {
        if (isdirsep(s[1]) || s[1] == '\0') {
            char *dir = getenv("HOME");

            if (!dir) {
                rb_raise(rb_eArgError, "couldn't find HOME environment -- expanding `%s'", s);
            }
            dirlen = strlen(dir);
            BUFCHECK(dirlen > buflen);
            strcpy(buf, dir);
#if defined DOSISH || defined __CYGWIN__
            for (p = buf; *p; p = CharNext(p)) {
                if (*p == '\\') {
                    *p = '/';
                }
            }
#else
            p = buf + strlen(dir);
#endif
            s++;
            tainted = 1;
        }
        else {
#ifdef HAVE_PWD_H
            struct passwd *pwPtr;
            s++;
#endif
            s = nextdirsep(b = s);
            BUFCHECK(bdiff + (s-b) >= buflen);
            memcpy(p, b, s-b);
            p += s-b;
            *p = '\0';
#ifdef HAVE_PWD_H
            pwPtr = getpwnam(buf);
            if (!pwPtr) {
                endpwent();
                rb_raise(rb_eArgError, "user %s doesn't exist", buf);
            }
            dirlen = strlen(pwPtr->pw_dir);
            BUFCHECK(dirlen > buflen);
            strcpy(buf, pwPtr->pw_dir);
            p = buf + strlen(pwPtr->pw_dir);
            endpwent();
#endif
        }
    }
#ifdef DOSISH_DRIVE_LETTER
    /* skip drive letter */
    else if (has_drive_letter(s)) {
        if (isdirsep(s[2])) {
            /* specified drive letter, and full path */
            /* skip drive letter */
            BUFCHECK(bdiff + 2 >= buflen);
            memcpy(p, s, 2);
            p += 2;
            s += 2;
        }
        else {
            /* specified drive, but not full path */
            int same = 0;
            if (!NIL_P(dname)) {
                file_expand_path(dname, Qnil, result);
                BUFINIT();
                if (has_drive_letter(p) && TOLOWER(p[0]) == TOLOWER(s[0])) {
                    /* ok, same drive */
                    same = 1;
                }
            }
            if (!same) {
                char *dir = getcwdofdrv(*s);

                tainted = 1;
                dirlen = strlen(dir);
                BUFCHECK(dirlen > buflen);
                strcpy(buf, dir);
                free(dir);
            }
            p = chompdirsep(skiproot(buf));
            s += 2;
        }
    }
#endif
    else if (!is_absolute_path(s)) {
        if (!NIL_P(dname)) {
            file_expand_path(dname, Qnil, result);
            BUFINIT();
        }
        else {
            char *dir = my_getcwd();

            tainted = 1;
            dirlen = strlen(dir);
            BUFCHECK(dirlen > buflen);
            strcpy(buf, dir);
            free(dir);
        }
#if defined DOSISH || defined __CYGWIN__
        if (isdirsep(*s)) {
            /* specified full path, but not drive letter nor UNC */
            /* we need to get the drive letter or UNC share name */
            p = skipprefix(buf);
        }
        else
#endif
            p = chompdirsep(skiproot(buf));
    }
    else {
        b = s;
        do s++; while (isdirsep(*s));
        p = buf + (s - b);
        BUFCHECK(bdiff >= buflen);
        memset(buf, '/', p - buf);
    }
    if (p > buf && p[-1] == '/')
        --p;
    else
        *p = '/';

    p[1] = 0;
    root = skipprefix(buf);

    b = s;
    while (*s) {
        switch (*s) {
          case '.':
            if (b == s++) {     /* beginning of path element */
                switch (*s) {
                  case '\0':
                    b = s;
                    break;
                  case '.':
                    if (*(s+1) == '\0' || isdirsep(*(s+1))) {
                        /* We must go back to the parent */
                        *p = '\0';
                        if (!(b = strrdirsep(root))) {
                            *p = '/';
                        }
                        else {
                            p = b;
                        }
                        b = ++s;
                    }
                    break;
                  case '/':
#if defined DOSISH || defined __CYGWIN__
                  case '\\':
#endif
                    b = ++s;
                    break;
                  default:
                    /* ordinary path element, beginning don't move */
                    break;
                }
            }
            break;
          case '/':
#if defined DOSISH || defined __CYGWIN__
          case '\\':
#endif
            if (s > b) {
                long rootdiff = root - buf;
                BUFCHECK(bdiff + (s-b+1) >= buflen);
                root = buf + rootdiff;
                memcpy(++p, b, s-b);
                p += s-b;
                *p = '/';
            }
            b = ++s;
            break;
          default:
            s = CharNext(s);
            break;
        }
    }

    if (s > b) {
        BUFCHECK(bdiff + (s-b) >= buflen);
        memcpy(++p, b, s-b);
        p += s-b;
    }
    if (p == skiproot(buf) - 1) p++;

    if (tainted) OBJ_TAINT(result);
    RSTRING(result)->len = p - buf;
    *p = '\0';
    return result;
}

VALUE
rb_file_expand_path(VALUE fname, VALUE dname)
{
    return file_expand_path(fname, dname, rb_str_new(0, MAXPATHLEN + 2));
}

/*
 *  call-seq:
 *     File.expand_path(file_name [, dir_string] ) -> abs_file_name
 *
 *  Converts a pathname to an absolute pathname. Relative paths are
 *  referenced from the current working directory of the process unless
 *  <i>dir_string</i> is given, in which case it will be used as the
 *  starting point. The given pathname may start with a
 *  ``<code>~</code>'', which expands to the process owner's home
 *  directory (the environment variable <code>HOME</code> must be set
 *  correctly). ``<code>~</code><i>user</i>'' expands to the named
 *  user's home directory.
 *
 *     File.expand_path("~oracle/bin")           #=> "/home/oracle/bin"
 *     File.expand_path("../../bin", "/tmp/x")   #=> "/bin"
 */

VALUE
rb_file_s_expand_path(int argc, VALUE *argv)
{
    VALUE fname, dname;

    if (argc == 1) {
        return rb_file_expand_path(argv[0], Qnil);
    }
    rb_scan_args(argc, argv, "11", &fname, &dname);

    return rb_file_expand_path(fname, dname);
}

static int
rmext(const char *p, const char *e)
{
    int l1, l2;

    if (!e) return 0;

    l1 = chompdirsep(p) - p;
    l2 = strlen(e);
    if (l2 == 2 && e[1] == '*') {
        e = strrchr(p, *e);
        if (!e) return 0;
        return e - p;
    }
    if (l1 < l2) return l1;

    if (strncmp(p+l1-l2, e, l2) == 0) {
        return l1-l2;
    }
    return 0;
}

/*
 *  call-seq:
 *     File.basename(file_name [, suffix] ) -> base_name
 *
 *  Returns the last component of the filename given in <i>file_name</i>,
 *  which must be formed using forward slashes (``<code>/</code>'')
 *  regardless of the separator used on the local file system. If
 *  <i>suffix</i> is given and present at the end of <i>file_name</i>,
 *  it is removed.
 *
 *     File.basename("/home/gumby/work/ruby.rb")          #=> "ruby.rb"
 *     File.basename("/home/gumby/work/ruby.rb", ".rb")   #=> "ruby"
 */

static VALUE
rb_file_s_basename(int argc, VALUE *argv)
{
    VALUE fname, fext, basename;
    char *name, *p;
#if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC
    char *root;
#endif
    int f;

    if (rb_scan_args(argc, argv, "11", &fname, &fext) == 2) {
        StringValue(fext);
    }
    StringValue(fname);
    if (RSTRING(fname)->len == 0 || !*(name = RSTRING(fname)->ptr))
        return fname;
    name = skipprefix(name);
#if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC
    root = name;
#endif
    while (isdirsep(*name))
        name++;
    if (!*name) {
        p = name - 1;
        f = 1;
#if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC
        if (name != root) {
            /* has slashes */
        }
#ifdef DOSISH_DRIVE_LETTER
        else if (*p == ':') {
            p++;
            f = 0;
        }
#endif
#ifdef DOSISH_UNC
        else {
            p = "/";
        }
#endif
#endif
    }
    else if (!(p = strrdirsep(name))) {
        if (NIL_P(fext) || !(f = rmext(name, StringValueCStr(fext)))) {
            f = chompdirsep(name) - name;
            if (f == RSTRING(fname)->len) return fname;
        }
        p = name;
    }
    else {
        while (isdirsep(*p)) p++; /* skip last / */
        if (NIL_P(fext) || !(f = rmext(p, StringValueCStr(fext)))) {
            f = chompdirsep(p) - p;
        }
    }
    basename = rb_str_new(p, f);
    OBJ_INFECT(basename, fname);
    return basename;
}

/*
 *  call-seq:
 *     File.dirname(file_name ) -> dir_name
 *
 *  Returns all components of the filename given in <i>file_name</i>
 *  except the last one. The filename must be formed using forward
 *  slashes (``<code>/</code>'') regardless of the separator used on the
 *  local file system.
 *
 *     File.dirname("/home/gumby/work/ruby.rb")   #=> "/home/gumby/work"
 */

static VALUE
rb_file_s_dirname(VALUE klass, VALUE fname)
{
    char *name, *root, *p;
    VALUE dirname;

    name = StringValueCStr(fname);
    root = skiproot(name);
#ifdef DOSISH_UNC
    if (root > name + 1 && isdirsep(*name))
        root = skipprefix(name = root - 2);
#else
    if (root > name + 1)
        name = root - 1;
#endif
    p = strrdirsep(root);
    if (!p) {
        p = root;
    }
    if (p == name)
        return rb_str_new2(".");
#ifdef DOSISH_DRIVE_LETTER
    if (has_drive_letter(name) && isdirsep(*(name + 2))) {
        dirname = rb_str_new(name, 3);
        rb_str_cat(dirname, skiproot(name + 2), p - skiproot(name + 2));
    }
    else
#endif
    dirname = rb_str_new(name, p - name);
#ifdef DOSISH_DRIVE_LETTER
    if (has_drive_letter(name) && root == name + 2 && p - name == 2)
        rb_str_cat(dirname, ".", 1);
#endif
    OBJ_INFECT(dirname, fname);
    return dirname;
}

/*
 *  call-seq:
 *     File.extname(path) -> string
 *
 *  Returns the extension (the portion of file name in <i>path</i>
 *  after the period).
 *
 *     File.extname("test.rb")         #=> ".rb"
 *     File.extname("a/b/d/test.rb")   #=> ".rb"
 *     File.extname("test")            #=> ""
 *     File.extname(".profile")        #=> ""
 *
 */

static VALUE
rb_file_s_extname(VALUE klass, VALUE fname)
{
    char *name, *p, *e;
    VALUE extname;

    name = StringValueCStr(fname);
    p = strrdirsep(name);       /* get the last path component */
    if (!p)
        p = name;
    else
        p++;

    e = strrchr(p, '.');        /* get the last dot of the last component */
    if (!e || e == p || !e[1])  /* no dot, or the only dot is first or end? */
        return rb_str_new2("");
    extname = rb_str_new(e, chompdirsep(e) - e);        /* keep the dot, too! */
    OBJ_INFECT(extname, fname);
    return extname;
}

/*
 *  call-seq:
 *     File.path(path) -> string
 *
 *  Returns the string representation of the path
 *
 *     File.path("/dev/null")          #=> "/dev/null"
 *     File.path(Pathname.new("/tmp")) #=> "/tmp"
 *
 */

static VALUE
rb_file_s_path(VALUE klass, VALUE fname)
{
    return rb_get_path(fname);
}

/*
 *  call-seq:
 *     File.split(file_name)   => array
 *
 *  Splits the given string into a directory and a file component and
 *  returns them in a two-element array. See also
 *  <code>File::dirname</code> and <code>File::basename</code>.
 *
 *     File.split("/home/gumby/.profile")   #=> ["/home/gumby", ".profile"]
 */

static VALUE
rb_file_s_split(VALUE klass, VALUE path)
{
    StringValue(path);          /* get rid of converting twice */
    return rb_assoc_new(rb_file_s_dirname(Qnil, path), rb_file_s_basename(1,&path));
}

static VALUE separator;

static VALUE rb_file_join(VALUE ary, VALUE sep);

static VALUE
file_inspect_join(VALUE ary, VALUE argp, int recur)
{
    VALUE *arg = (VALUE *)argp;
    if (recur) return rb_str_new2("[...]");
    return rb_file_join(arg[0], arg[1]);
}

static VALUE
rb_file_join(VALUE ary, VALUE sep)
{
    long len, i;
    VALUE result, tmp;
    char *name, *tail;

    if (RARRAY(ary)->len == 0) return rb_str_new(0, 0);

    len = 1;
    for (i=0; i<RARRAY(ary)->len; i++) {
        if (TYPE(RARRAY(ary)->ptr[i]) == T_STRING) {
            len += RSTRING(RARRAY(ary)->ptr[i])->len;
        }
        else {
            len += 10;
        }
    }
    if (!NIL_P(sep) && TYPE(sep) == T_STRING) {
        len += RSTRING(sep)->len * RARRAY(ary)->len - 1;
    }
    result = rb_str_buf_new(len);
    OBJ_INFECT(result, ary);
    for (i=0; i<RARRAY(ary)->len; i++) {
        tmp = RARRAY(ary)->ptr[i];
        switch (TYPE(tmp)) {
          case T_STRING:
            break;
          case T_ARRAY:
            {
                VALUE args[2];

                args[0] = tmp;
                args[1] = sep;
                tmp = rb_exec_recursive(file_inspect_join, ary, (VALUE)args);
            }
            break;
          default:
            FilePathValue(tmp);
        }
        name = StringValueCStr(result);
        if (i > 0 && !NIL_P(sep)) {
            tail = chompdirsep(name);
            if (RSTRING(tmp)->ptr && isdirsep(RSTRING(tmp)->ptr[0])) {
                RSTRING(result)->len = tail - name;
            }
            else if (!*tail) {
                rb_str_buf_append(result, sep);
            }
        }
        rb_str_buf_append(result, tmp);
    }

    return result;
}

/*
 *  call-seq:
 *     File.join(string, ...) -> path
 *
 *  Returns a new string formed by joining the strings using
 *  <code>File::SEPARATOR</code>.
 *
 *     File.join("usr", "mail", "gumby")   #=> "usr/mail/gumby"
 *
 */

static VALUE
rb_file_s_join(VALUE klass, VALUE args)
{
    return rb_file_join(args, separator);
}

/*
 *  call-seq:
 *     File.truncate(file_name, integer)  => 0
 *
 *  Truncates the file <i>file_name</i> to be at most <i>integer</i>
 *  bytes long. Not available on all platforms.
 *
 *     f = File.new("out", "w")
 *     f.write("1234567890")     #=> 10
 *     f.close                   #=> nil
 *     File.truncate("out", 5)   #=> 0
 *     File.size("out")          #=> 5
 *
 */

static VALUE
rb_file_s_truncate(VALUE klass, VALUE path, VALUE len)
{
    off_t pos;

    rb_secure(2);
    pos = NUM2OFFT(len);
    FilePathValue(path);
#ifdef HAVE_TRUNCATE
    if (truncate(StringValueCStr(path), pos) < 0)
        rb_sys_fail(RSTRING(path)->ptr);
#else
# ifdef HAVE_CHSIZE
    {
        int tmpfd;

#  ifdef _WIN32
        if ((tmpfd = open(StringValueCStr(path), O_RDWR)) < 0) {
            rb_sys_fail(RSTRING(path)->ptr);
        }
#  else
        if ((tmpfd = open(StringValueCStr(path), 0)) < 0) {
            rb_sys_fail(RSTRING(path)->ptr);
        }
#  endif
        if (chsize(tmpfd, pos) < 0) {
            close(tmpfd);
            rb_sys_fail(RSTRING(path)->ptr);
        }
        close(tmpfd);
    }
# else
    rb_notimplement();
# endif
#endif
    return INT2FIX(0);
}

/*
 *  call-seq:
 *     file.truncate(integer)    => 0
 *
 *  Truncates <i>file</i> to at most <i>integer</i> bytes. The file
 *  must be opened for writing. Not available on all platforms.
 *
 *     f = File.new("out", "w")
 *     f.syswrite("1234567890")   #=> 10
 *     f.truncate(5)              #=> 0
 *     f.close()                  #=> nil
 *     File.size("out")           #=> 5
 */

static VALUE
rb_file_truncate(VALUE obj, VALUE len)
{
    OpenFile *fptr;
    off_t pos;

    rb_secure(2);
    pos = NUM2OFFT(len);
    GetOpenFile(obj, fptr);
    if (!(fptr->mode & FMODE_WRITABLE)) {
        rb_raise(rb_eIOError, "not opened for writing");
    }
    rb_io_flush(obj);
#ifdef HAVE_TRUNCATE
    if (ftruncate(fptr->fd, pos) < 0)
        rb_sys_fail(fptr->path);
#else
# ifdef HAVE_CHSIZE
    if (chsize(fptr->fd, pos) < 0)
        rb_sys_fail(fptr->path);
# else
    rb_notimplement();
# endif
#endif
    return INT2FIX(0);
}

# ifndef LOCK_SH
#  define LOCK_SH 1
# endif
# ifndef LOCK_EX
#  define LOCK_EX 2
# endif
# ifndef LOCK_NB
#  define LOCK_NB 4
# endif
# ifndef LOCK_UN
#  define LOCK_UN 8
# endif

#if 1
static int
rb_thread_flock(int fd, int op, OpenFile *fptr)
{
    if (rb_thread_alone() || (op & LOCK_NB)) {
        int ret;
        TRAP_BEG;
        ret = flock(fd, op);
        TRAP_END;
        return ret;
    }
    op |= LOCK_NB;
    while (flock(fd, op) < 0) {
        switch (errno) {
          case EAGAIN:
          case EACCES:
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
          case EWOULDBLOCK:
#endif
            rb_thread_polling();        /* busy wait */
            rb_io_check_closed(fptr);
            continue;
          default:
            return -1;
        }
    }
    return 0;
}
#define flock(fd, op) rb_thread_flock(fd, op, fptr)
#endif

/*
 *  call-seq:
 *     file.flock (locking_constant ) =>  0 or false
 *
 *  Locks or unlocks a file according to <i>locking_constant</i> (a
 *  logical <em>or</em> of the values in the table below).
 *  Returns <code>false</code> if <code>File::LOCK_NB</code> is
 *  specified and the operation would otherwise have blocked. Not
 *  available on all platforms.
 *
 *  Locking constants (in class File):
 *
 *     LOCK_EX   | Exclusive lock. Only one process may hold an
 *               | exclusive lock for a given file at a time.
 *     ----------+------------------------------------------------
 *     LOCK_NB   | Don't block when locking. May be combined
 *               | with other lock options using logical or.
 *     ----------+------------------------------------------------
 *     LOCK_SH   | Shared lock. Multiple processes may each hold a
 *               | shared lock for a given file at the same time.
 *     ----------+------------------------------------------------
 *     LOCK_UN   | Unlock.
 *
 *  Example:
 *
 *     File.new("testfile").flock(File::LOCK_UN)   #=> 0
 *
 */

static VALUE
rb_file_flock(VALUE obj, VALUE operation)
{
#ifndef __CHECKER__
    OpenFile *fptr;
    int op;

    rb_secure(2);
    op = NUM2INT(operation);
    GetOpenFile(obj, fptr);

    if (fptr->mode & FMODE_WRITABLE) {
        rb_io_flush(obj);
    }
  retry:
    if (flock(fptr->fd, op) < 0) {
        switch (errno) {
          case EAGAIN:
          case EACCES:
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
          case EWOULDBLOCK:
#endif
              return Qfalse;
          case EINTR:
#if defined(ERESTART)
          case ERESTART:
#endif
            goto retry;
        }
        rb_sys_fail(fptr->path);
    }
#endif
    return INT2FIX(0);
}
#undef flock

static void
test_check(int n, int argc, VALUE *argv)
{
    int i;

    rb_secure(2);
    n+=1;
    if (n != argc) rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", argc, n);
    for (i=1; i<n; i++) {
        switch (TYPE(argv[i])) {
          case T_STRING:
          default:
            FilePathValue(argv[i]);
            break;
          case T_FILE:
            break;
        }
    }
}

#define CHECK(n) test_check((n), argc, argv)

/*
 *  call-seq:
 *     test(int_cmd, file1 [, file2] ) => obj
 *
 *  Uses the integer <i>aCmd</i> to perform various tests on
 *  <i>file1</i> (first table below) or on <i>file1</i> and
 *  <i>file2</i> (second table).
 *
 *  File tests on a single file:
 *
 *    Test   Returns   Meaning
 *     ?A  | Time    | Last access time for file1
 *     ?b  | boolean | True if file1 is a block device
 *     ?c  | boolean | True if file1 is a character device
 *     ?C  | Time    | Last change time for file1
 *     ?d  | boolean | True if file1 exists and is a directory
 *     ?e  | boolean | True if file1 exists
 *     ?f  | boolean | True if file1 exists and is a regular file
 *     ?g  | boolean | True if file1 has the \CF{setgid} bit
 *         |         | set (false under NT)
 *     ?G  | boolean | True if file1 exists and has a group
 *         |         | ownership equal to the caller's group
 *     ?k  | boolean | True if file1 exists and has the sticky bit set
 *     ?l  | boolean | True if file1 exists and is a symbolic link
 *     ?M  | Time    | Last modification time for file1
 *     ?o  | boolean | True if file1 exists and is owned by
 *         |         | the caller's effective uid
 *     ?O  | boolean | True if file1 exists and is owned by
 *         |         | the caller's real uid
 *     ?p  | boolean | True if file1 exists and is a fifo
 *     ?r  | boolean | True if file1 is readable by the effective
 *         |         | uid/gid of the caller
 *     ?R  | boolean | True if file is readable by the real
 *         |         | uid/gid of the caller
 *     ?s  | int/nil | If file1 has nonzero size, return the size,
 *         |         | otherwise return nil
 *     ?S  | boolean | True if file1 exists and is a socket
 *     ?u  | boolean | True if file1 has the setuid bit set
 *     ?w  | boolean | True if file1 exists and is writable by
 *         |         | the effective uid/gid
 *     ?W  | boolean | True if file1 exists and is writable by
 *         |         | the real uid/gid
 *     ?x  | boolean | True if file1 exists and is executable by
 *         |         | the effective uid/gid
 *     ?X  | boolean | True if file1 exists and is executable by
 *         |         | the real uid/gid
 *     ?z  | boolean | True if file1 exists and has a zero length
 *
 * Tests that take two files:
 *
 *     ?-  | boolean | True if file1 and file2 are identical
 *     ?=  | boolean | True if the modification times of file1
 *         |         | and file2 are equal
 *     ?<  | boolean | True if the modification time of file1
 *         |         | is prior to that of file2
 *     ?>  | boolean | True if the modification time of file1
 *         |         | is after that of file2
 */

static VALUE
rb_f_test(int argc, VALUE *argv)
{
    int cmd;

    if (argc == 0) rb_raise(rb_eArgError, "wrong number of arguments");
#if 0 /* 1.7 behavior? */
    if (argc == 1) {
        return RTEST(argv[0]) ? Qtrue : Qfalse;
    }
#endif
    cmd = NUM2CHR(argv[0]);
    if (cmd == 0) return Qfalse;
    if (strchr("bcdefgGkloOprRsSuwWxXz", cmd)) {
        CHECK(1);
        switch (cmd) {
          case 'b':
            return test_b(0, argv[1]);

          case 'c':
            return test_c(0, argv[1]);

          case 'd':
            return test_d(0, argv[1]);

          case 'a':
          case 'e':
            return test_e(0, argv[1]);

          case 'f':
            return test_f(0, argv[1]);

          case 'g':
            return test_sgid(0, argv[1]);

          case 'G':
            return test_grpowned(0, argv[1]);

          case 'k':
            return test_sticky(0, argv[1]);

          case 'l':
            return test_l(0, argv[1]);

          case 'o':
            return test_owned(0, argv[1]);

          case 'O':
            return test_rowned(0, argv[1]);

          case 'p':
            return test_p(0, argv[1]);

          case 'r':
            return test_r(0, argv[1]);

          case 'R':
            return test_R(0, argv[1]);

          case 's':
            return test_s(0, argv[1]);

          case 'S':
            return test_S(0, argv[1]);

          case 'u':
            return test_suid(0, argv[1]);

          case 'w':
            return test_w(0, argv[1]);

          case 'W':
            return test_W(0, argv[1]);

          case 'x':
            return test_x(0, argv[1]);

          case 'X':
            return test_X(0, argv[1]);

          case 'z':
            return test_z(0, argv[1]);
        }
    }

    if (strchr("MAC", cmd)) {
        struct stat st;

        CHECK(1);
        if (rb_stat(argv[1], &st) == -1) {
            rb_sys_fail(RSTRING(argv[1])->ptr);
        }

        switch (cmd) {
          case 'A':
            return rb_time_new(st.st_atime, 0);
          case 'M':
            return rb_time_new(st.st_mtime, 0);
          case 'C':
            return rb_time_new(st.st_ctime, 0);
        }
    }

    if (cmd == '-') {
        CHECK(2);
        return test_identical(0, argv[1], argv[2]);
    }

    if (strchr("=<>", cmd)) {
        struct stat st1, st2;

        CHECK(2);
        if (rb_stat(argv[1], &st1) < 0) return Qfalse;
        if (rb_stat(argv[2], &st2) < 0) return Qfalse;

        switch (cmd) {
          case '=':
            if (st1.st_mtime == st2.st_mtime) return Qtrue;
            return Qfalse;

          case '>':
            if (st1.st_mtime > st2.st_mtime) return Qtrue;
            return Qfalse;

          case '<':
            if (st1.st_mtime < st2.st_mtime) return Qtrue;
            return Qfalse;
        }
    }
    /* unknown command */
    rb_raise(rb_eArgError, "unknown command ?%c", cmd);
    return Qnil;                /* not reached */
}

/*
 *  Document-class: File::Stat
 *
 *  Objects of class <code>File::Stat</code> encapsulate common status
 *  information for <code>File</code> objects. The information is
 *  recorded at the moment the <code>File::Stat</code> object is
 *  created; changes made to the file after that point will not be
 *  reflected. <code>File::Stat</code> objects are returned by
 *  <code>IO#stat</code>, <code>File::stat</code>,
 *  <code>File#lstat</code>, and <code>File::lstat</code>. Many of these
 *  methods return platform-specific values, and not all values are
 *  meaningful on all systems. See also <code>Kernel#test</code>.
 */

static VALUE
rb_stat_s_alloc(VALUE klass)
{
    return stat_new_0(klass, 0);
}

/*
 * call-seq:
 *
 *   File::Stat.new(file_name)  => stat
 *
 * Create a File::Stat object for the given file name (raising an
 * exception if the file doesn't exist).
 */

static VALUE
rb_stat_init(VALUE obj, VALUE fname)
{
    struct stat st, *nst;

    rb_secure(2);
    FilePathValue(fname);
    if (stat(StringValueCStr(fname), &st) == -1) {
        rb_sys_fail(RSTRING(fname)->ptr);
    }
    if (DATA_PTR(obj)) {
        free(DATA_PTR(obj));
        DATA_PTR(obj) = NULL;
    }
    nst = ALLOC(struct stat);
    *nst = st;
    DATA_PTR(obj) = nst;

    return Qnil;
}

/* :nodoc: */
static VALUE
rb_stat_init_copy(VALUE copy, VALUE orig)
{
    struct stat *nst;

    if (copy == orig) return orig;
    rb_check_frozen(copy);
    /* need better argument type check */
    if (!rb_obj_is_instance_of(orig, rb_obj_class(copy))) {
        rb_raise(rb_eTypeError, "wrong argument class");
    }
    if (DATA_PTR(copy)) {
        free(DATA_PTR(copy));
        DATA_PTR(copy) = 0;
    }
    if (DATA_PTR(orig)) {
        nst = ALLOC(struct stat);
        *nst = *(struct stat*)DATA_PTR(orig);
        DATA_PTR(copy) = nst;
    }

    return copy;
}

/*
 *  call-seq:
 *     stat.ftype   => string
 *
 *  Identifies the type of <i>stat</i>. The return string is one of:
 *  ``<code>file</code>'', ``<code>directory</code>'',
 *  ``<code>characterSpecial</code>'', ``<code>blockSpecial</code>'',
 *  ``<code>fifo</code>'', ``<code>link</code>'',
 *  ``<code>socket</code>'', or ``<code>unknown</code>''.
 *
 *     File.stat("/dev/tty").ftype   #=> "characterSpecial"
 *
 */

static VALUE
rb_stat_ftype(VALUE obj)
{
    return rb_file_ftype(get_stat(obj));
}

/*
 *  call-seq:
 *     stat.directory?   => true or false
 *
 *  Returns <code>true</code> if <i>stat</i> is a directory,
 *  <code>false</code> otherwise.
 *
 *     File.stat("testfile").directory?   #=> false
 *     File.stat(".").directory?          #=> true
 */

static VALUE
rb_stat_d(VALUE obj)
{
    if (S_ISDIR(get_stat(obj)->st_mode)) return Qtrue;
    return Qfalse;
}

/*
 *  call-seq:
 *     stat.pipe?    => true or false
 *
 *  Returns <code>true</code> if the operating system supports pipes and
 *  <i>stat</i> is a pipe; <code>false</code> otherwise.
 */

static VALUE
rb_stat_p(VALUE obj)
{
#ifdef S_IFIFO
    if (S_ISFIFO(get_stat(obj)->st_mode)) return Qtrue;

#endif
    return Qfalse;
}

/*
 *  call-seq:
 *     stat.symlink?    => true or false
 *
 *  Returns <code>true</code> if <i>stat</i> is a symbolic link,
 *  <code>false</code> if it isn't or if the operating system doesn't
 *  support this feature. As <code>File::stat</code> automatically
 *  follows symbolic links, <code>symlink?</code> will always be
 *  <code>false</code> for an object returned by
 *  <code>File::stat</code>.
 *
 *     File.symlink("testfile", "alink")   #=> 0
 *     File.stat("alink").symlink?         #=> false
 *     File.lstat("alink").symlink?        #=> true
 *
 */

static VALUE
rb_stat_l(VALUE obj)
{
#ifdef S_ISLNK
    if (S_ISLNK(get_stat(obj)->st_mode)) return Qtrue;
#endif
    return Qfalse;
}

/*
 *  call-seq:
 *     stat.socket?    => true or false
 *
 *  Returns <code>true</code> if <i>stat</i> is a socket,
 *  <code>false</code> if it isn't or if the operating system doesn't
 *  support this feature.
 *
 *     File.stat("testfile").socket?   #=> false
 *
 */

static VALUE
rb_stat_S(VALUE obj)
{
#ifdef S_ISSOCK
    if (S_ISSOCK(get_stat(obj)->st_mode)) return Qtrue;

#endif
    return Qfalse;
}

/*
 *  call-seq:
 *     stat.blockdev?   => true or false
 *
 *  Returns <code>true</code> if the file is a block device,
 *  <code>false</code> if it isn't or if the operating system doesn't
 *  support this feature.
 *
 *     File.stat("testfile").blockdev?    #=> false
 *     File.stat("/dev/hda1").blockdev?   #=> true
 *
 */

static VALUE
rb_stat_b(VALUE obj)
{
#ifdef S_ISBLK
    if (S_ISBLK(get_stat(obj)->st_mode)) return Qtrue;

#endif
    return Qfalse;
}

/*
 *  call-seq:
 *     stat.chardev?    => true or false
 *
 *  Returns <code>true</code> if the file is a character device,
 *  <code>false</code> if it isn't or if the operating system doesn't
 *  support this feature.
 *
 *     File.stat("/dev/tty").chardev?   #=> true
 *
 */

static VALUE
rb_stat_c(VALUE obj)
{
    if (S_ISCHR(get_stat(obj)->st_mode)) return Qtrue;

    return Qfalse;
}

/*
 *  call-seq:
 *     stat.owned?    => true or false
 *
 *  Returns <code>true</code> if the effective user id of the process is
 *  the same as the owner of <i>stat</i>.
 *
 *     File.stat("testfile").owned?      #=> true
 *     File.stat("/etc/passwd").owned?   #=> false
 *
 */

static VALUE
rb_stat_owned(VALUE obj)
{
    if (get_stat(obj)->st_uid == geteuid()) return Qtrue;
    return Qfalse;
}

static VALUE
rb_stat_rowned(VALUE obj)
{
    if (get_stat(obj)->st_uid == getuid()) return Qtrue;
    return Qfalse;
}

/*
 *  call-seq:
 *     stat.grpowned?   => true or false
 *
 *  Returns true if the effective group id of the process is the same as
 *  the group id of <i>stat</i>. On Windows NT, returns <code>false</code>.
 *
 *     File.stat("testfile").grpowned?      #=> true
 *     File.stat("/etc/passwd").grpowned?   #=> false
 *
 */

static VALUE
rb_stat_grpowned(VALUE obj)
{
#ifndef _WIN32
    if (get_stat(obj)->st_gid == getegid()) return Qtrue;
#endif
    return Qfalse;
}

/*
 *  call-seq:
 *     stat.readable?    => true or false
 *
 *  Returns <code>true</code> if <i>stat</i> is readable by the
 *  effective user id of this process.
 *
 *     File.stat("testfile").readable?   #=> true
 *
 */

static VALUE
rb_stat_r(VALUE obj)
{
    struct stat *st = get_stat(obj);

#ifdef S_IRUSR
    if (rb_stat_owned(obj))
        return st->st_mode & S_IRUSR ? Qtrue : Qfalse;
#endif
#ifdef S_IRGRP
    if (rb_stat_grpowned(obj))
        return st->st_mode & S_IRGRP ? Qtrue : Qfalse;
#endif
#ifdef S_IROTH
    if (!(st->st_mode & S_IROTH)) return Qfalse;
#endif
    return Qtrue;
}

/*
 *  call-seq:
 *     stat.readable_real? -> true or false
 *
 *  Returns <code>true</code> if <i>stat</i> is readable by the real
 *  user id of this process.
 *
 *     File.stat("testfile").readable_real?   #=> true
 *
 */

static VALUE
rb_stat_R(VALUE obj)
{
    struct stat *st = get_stat(obj);

#ifdef S_IRUSR
    if (rb_stat_rowned(obj))
        return st->st_mode & S_IRUSR ? Qtrue : Qfalse;
#endif
#ifdef S_IRGRP
    if (group_member(get_stat(obj)->st_gid))
        return st->st_mode & S_IRGRP ? Qtrue : Qfalse;
#endif
#ifdef S_IROTH
    if (!(st->st_mode & S_IROTH)) return Qfalse;
#endif
    return Qtrue;
}

/*
 * call-seq:
 *    stat.world_readable? => fixnum or nil
 *
 * If <i>stat</i> is readable by others, returns an integer
 * representing the file permission bits of <i>stat</i>. Returns
 * <code>nil</code> otherwise. The meaning of the bits is platform
 * dependent; on Unix systems, see <code>stat(2)</code>.
 *
 *    m = File.stat("/etc/passwd").world_readable?  # => 420
 *    sprintf("%o", m)                              # => "644"
 */

static VALUE
rb_stat_wr(VALUE obj)
{
#ifdef S_IROTH
    if ((get_stat(obj)->st_mode & (S_IROTH)) == S_IROTH) {
      return UINT2NUM(get_stat(obj)->st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
    }
    else {
      return Qnil;
    }
#endif
}

/*
 *  call-seq:
 *     stat.writable? -> true or false
 *
 *  Returns <code>true</code> if <i>stat</i> is writable by the
 *  effective user id of this process.
 *
 *     File.stat("testfile").writable?   #=> true
 *
 */

static VALUE
rb_stat_w(VALUE obj)
{
    struct stat *st = get_stat(obj);

#ifdef S_IWUSR
    if (rb_stat_owned(obj))
        return st->st_mode & S_IWUSR ? Qtrue : Qfalse;
#endif
#ifdef S_IWGRP
    if (rb_stat_grpowned(obj))
        return st->st_mode & S_IWGRP ? Qtrue : Qfalse;
#endif
#ifdef S_IWOTH
    if (!(st->st_mode & S_IWOTH)) return Qfalse;
#endif
    return Qtrue;
}

/*
 *  call-seq:
 *     stat.writable_real? -> true or false
 *
 *  Returns <code>true</code> if <i>stat</i> is writable by the real
 *  user id of this process.
 *
 *     File.stat("testfile").writable_real?   #=> true
 *
 */

static VALUE
rb_stat_W(VALUE obj)
{
    struct stat *st = get_stat(obj);

#ifdef S_IWUSR
    if (rb_stat_rowned(obj))
        return st->st_mode & S_IWUSR ? Qtrue : Qfalse;
#endif
#ifdef S_IWGRP
    if (group_member(get_stat(obj)->st_gid))
        return st->st_mode & S_IWGRP ? Qtrue : Qfalse;
#endif
#ifdef S_IWOTH
    if (!(st->st_mode & S_IWOTH)) return Qfalse;
#endif
    return Qtrue;
}

/*
 * call-seq:
 *    stat.world_writable? => fixnum or nil
 *
 * If <i>stat</i> is writable by others, returns an integer
 * representing the file permission bits of <i>stat</i>. Returns
 * <code>nil</code> otherwise. The meaning of the bits is platform
 * dependent; on Unix systems, see <code>stat(2)</code>.
 *
 *    m = File.stat("/tmp").world_writable?         # => 511
 *    sprintf("%o", m)                              # => "777"
 */

static VALUE
rb_stat_ww(VALUE obj)
{
#ifdef S_IROTH
    if ((get_stat(obj)->st_mode & (S_IWOTH)) == S_IWOTH) {
      return UINT2NUM(get_stat(obj)->st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
    }
    else {
      return Qnil;
    }
#endif
}

/*
 *  call-seq:
 *     stat.executable?    => true or false
 *
 *  Returns <code>true</code> if <i>stat</i> is executable or if the
 *  operating system doesn't distinguish executable files from
 *  nonexecutable files. The tests are made using the effective owner of
 *  the process.
 *
 *     File.stat("testfile").executable?   #=> false
 *
 */

static VALUE
rb_stat_x(VALUE obj)
{
    struct stat *st = get_stat(obj);

#ifdef S_IXUSR
    if (rb_stat_owned(obj))
        return st->st_mode & S_IXUSR ? Qtrue : Qfalse;
#endif
#ifdef S_IXGRP
    if (rb_stat_grpowned(obj))
        return st->st_mode & S_IXGRP ? Qtrue : Qfalse;
#endif
#ifdef S_IXOTH
    if (!(st->st_mode & S_IXOTH)) return Qfalse;
#endif
    return Qtrue;
}

/*
 *  call-seq:
 *     stat.executable_real?    => true or false
 *
 *  Same as <code>executable?</code>, but tests using the real owner of
 *  the process.
 */

static VALUE
rb_stat_X(VALUE obj)
{
    struct stat *st = get_stat(obj);

#ifdef S_IXUSR
    if (rb_stat_rowned(obj))
        return st->st_mode & S_IXUSR ? Qtrue : Qfalse;
#endif
#ifdef S_IXGRP
    if (group_member(get_stat(obj)->st_gid))
        return st->st_mode & S_IXGRP ? Qtrue : Qfalse;
#endif
#ifdef S_IXOTH
    if (!(st->st_mode & S_IXOTH)) return Qfalse;
#endif
    return Qtrue;
}

/*
 *  call-seq:
 *     stat.file?    => true or false
 *
 *  Returns <code>true</code> if <i>stat</i> is a regular file (not
 *  a device file, pipe, socket, etc.).
 *
 *     File.stat("testfile").file?   #=> true
 *
 */

static VALUE
rb_stat_f(VALUE obj)
{
    if (S_ISREG(get_stat(obj)->st_mode)) return Qtrue;
    return Qfalse;
}

/*
 *  call-seq:
 *     stat.zero?    => true or false
 *
 *  Returns <code>true</code> if <i>stat</i> is a zero-length file;
 *  <code>false</code> otherwise.
 *
 *     File.stat("testfile").zero?   #=> false
 *
 */

static VALUE
rb_stat_z(VALUE obj)
{
    if (get_stat(obj)->st_size == 0) return Qtrue;
    return Qfalse;
}

/*
 *  call-seq:
 *     state.size    => integer
 *
 *  Returns the size of <i>stat</i> in bytes.
 *
 *     File.stat("testfile").size   #=> 66
 *
 */

static VALUE
rb_stat_s(VALUE obj)
{
    off_t size = get_stat(obj)->st_size;

    if (size == 0) return Qnil;
    return OFFT2NUM(size);
}

/*
 *  call-seq:
 *     stat.setuid?    => true or false
 *
 *  Returns <code>true</code> if <i>stat</i> has the set-user-id
 *  permission bit set, <code>false</code> if it doesn't or if the
 *  operating system doesn't support this feature.
 *
 *     File.stat("/bin/su").setuid?   #=> true
 */

static VALUE
rb_stat_suid(VALUE obj)
{
#ifdef S_ISUID
    if (get_stat(obj)->st_mode & S_ISUID) return Qtrue;
#endif
    return Qfalse;
}

/*
 *  call-seq:
 *     stat.setgid?   => true or false
 *
 *  Returns <code>true</code> if <i>stat</i> has the set-group-id
 *  permission bit set, <code>false</code> if it doesn't or if the
 *  operating system doesn't support this feature.
 *
 *     File.stat("/usr/sbin/lpc").setgid?   #=> true
 *
 */

static VALUE
rb_stat_sgid(VALUE obj)
{
#ifdef S_ISGID
    if (get_stat(obj)->st_mode & S_ISGID) return Qtrue;
#endif
    return Qfalse;
}

/*
 *  call-seq:
 *     stat.sticky?    => true or false
 *
 *  Returns <code>true</code> if <i>stat</i> has its sticky bit set,
 *  <code>false</code> if it doesn't or if the operating system doesn't
 *  support this feature.
 *
 *     File.stat("testfile").sticky?   #=> false
 *
 */

static VALUE
rb_stat_sticky(VALUE obj)
{
#ifdef S_ISVTX
    if (get_stat(obj)->st_mode & S_ISVTX) return Qtrue;
#endif
    return Qfalse;
}

static VALUE rb_mFConst;

void
rb_file_const(const char *name, VALUE value)
{
    rb_define_const(rb_mFConst, name, value);
}

static int
is_absolute_path(const char *path)
{
#ifdef DOSISH_DRIVE_LETTER
    if (has_drive_letter(path) && isdirsep(path[2])) return 1;
#endif
#ifdef DOSISH_UNC
    if (isdirsep(path[0]) && isdirsep(path[1])) return 1;
#endif
#ifndef DOSISH
    if (path[0] == '/') return 1;
#endif
    return 0;
}

#ifndef DOSISH
static int
path_check_0(VALUE path, int loadpath)
{
    struct stat st;
    char *p0 = StringValueCStr(path);
    char *p = 0, *s;

    if (!is_absolute_path(p0)) {
        char *buf = my_getcwd();
        VALUE newpath;

        newpath = rb_str_new2(buf);
        free(buf);

        rb_str_cat2(newpath, "/");
        rb_str_cat2(newpath, p0);
        return path_check_0(newpath, loadpath);
    }
    for (;;) {
#ifndef S_IWOTH
# define S_IWOTH 002
#endif
        if (stat(p0, &st) == 0 && S_ISDIR(st.st_mode) && (st.st_mode & S_IWOTH)
#ifdef S_ISVTX
            && (loadpath || !(st.st_mode & S_ISVTX))
#endif
            && !access(p0, W_OK)) {
            rb_warn("Insecure world writable dir %s, mode 0%o", p0, st.st_mode);
            if (p) *p = '/';
            return 0;
        }
        s = strrdirsep(p0);
        if (p) *p = '/';
        if (!s || s == p0) return 1;
        p = s;
        *p = '\0';
    }
}
#endif

static int
fpath_check(const char *path)
{
#ifndef DOSISH
    return path_check_0(rb_str_new2(path), Qfalse);
#else
    return 1;
#endif
}

int
rb_path_check(const char *path)
{
#ifndef DOSISH
    const char *p0, *p, *pend;
    const char sep = PATH_SEP_CHAR;

    if (!path) return 1;

    pend = path + strlen(path);
    p0 = path;
    p = strchr(path, sep);
    if (!p) p = pend;

    for (;;) {
        if (!path_check_0(rb_str_new(p0, p - p0), Qtrue)) {
            return 0;           /* not safe */
        }
        p0 = p + 1;
        if (p0 > pend) break;
        p = strchr(p0, sep);
        if (!p) p = pend;
    }
#endif
    return 1;
}

#if defined(__MACOS__) || defined(riscos)
static int
is_macos_native_path(const char *path)
{
    if (strchr(path, ':')) return 1;
    return 0;
}
#endif

static int
file_load_ok(const char *path)
{
    return eaccess(path, R_OK) == 0;
}

extern VALUE rb_load_path;

int
rb_find_file_ext(VALUE *filep, const char *const *ext)
{
    char *path, *found;
    char *f = RSTRING(*filep)->ptr;
    VALUE fname;
    long i, j;

    if (f[0] == '~') {
        fname = rb_file_expand_path(*filep, Qnil);
        if (rb_safe_level() >= 2 && OBJ_TAINTED(fname)) {
            rb_raise(rb_eSecurityError, "loading from unsafe file %s", f);
        }
        OBJ_FREEZE(fname);
        f = StringValueCStr(fname);
        *filep = fname;
    }

    if (is_absolute_path(f)) {
        for (i=0; ext[i]; i++) {
            fname = rb_str_dup(*filep);
            rb_str_cat2(fname, ext[i]);
            OBJ_FREEZE(fname);
            if (file_load_ok(StringValueCStr(fname))) {
                *filep = fname;
                return i+1;
            }
        }
        return 0;
    }

    if (!rb_load_path) return 0;

    Check_Type(rb_load_path, T_ARRAY);
    for (i=0;i<RARRAY(rb_load_path)->len;i++) {
        VALUE str = RARRAY(rb_load_path)->ptr[i];

        FilePathValue(str);
        if (RSTRING(str)->len == 0) continue;
        path = RSTRING(str)->ptr;
        for (j=0; ext[j]; j++) {
            fname = rb_str_dup(*filep);
            rb_str_cat2(fname, ext[j]);
            OBJ_FREEZE(fname);
            found = dln_find_file(StringValueCStr(fname), path);
            if (found && file_load_ok(found)) {
                *filep = rb_str_new2(found);
                return j+1;
            }
        }
    }
    return 0;
}

VALUE
rb_find_file(VALUE path)
{
    VALUE tmp;
    char *f = StringValueCStr(path);
    char *lpath;

    if (f[0] == '~') {
        path = rb_file_expand_path(path, Qnil);
        if (rb_safe_level() >= 1 && OBJ_TAINTED(path)) {
            rb_raise(rb_eSecurityError, "loading from unsafe path %s", f);
        }
        OBJ_FREEZE(path);
        f = StringValueCStr(path);
    }

#if defined(__MACOS__) || defined(riscos)
    if (is_macos_native_path(f)) {
        if (rb_safe_level() >= 1 && !fpath_check(f)) {
            rb_raise(rb_eSecurityError, "loading from unsafe file %s", f);
        }
        if (file_load_ok(f)) return path;
    }
#endif

    if (is_absolute_path(f)) {
        if (rb_safe_level() >= 1 && !fpath_check(f)) {
            rb_raise(rb_eSecurityError, "loading from unsafe file %s", f);
        }
        if (file_load_ok(f)) return path;
    }

    if (rb_safe_level() >= 4) {
        rb_raise(rb_eSecurityError, "loading from non-absolute path %s", f);
    }

    if (rb_load_path) {
        long i;

        Check_Type(rb_load_path, T_ARRAY);
        tmp = rb_ary_new();
        for (i=0;i<RARRAY(rb_load_path)->len;i++) {
            VALUE str = RARRAY(rb_load_path)->ptr[i];
            FilePathValue(str);
            if (RSTRING(str)->len > 0) {
                rb_ary_push(tmp, str);
            }
        }
        tmp = rb_ary_join(tmp, rb_str_new2(PATH_SEP));
        if (RSTRING(tmp)->len == 0) {
            lpath = 0;
        }
        else {
            lpath = RSTRING(tmp)->ptr;
            if (rb_safe_level() >= 1 && !rb_path_check(lpath)) {
                rb_raise(rb_eSecurityError, "loading from unsafe path %s", lpath);
            }
        }
    }
    else {
        lpath = 0;
    }

    if (!lpath) {
        return 0;               /* no path, no load */
    }
    f = dln_find_file(f, lpath);
    if (rb_safe_level() >= 1 && !fpath_check(f)) {
        rb_raise(rb_eSecurityError, "loading from unsafe file %s", f);
    }
    if (file_load_ok(f)) {
        tmp = rb_str_new2(f);
        OBJ_FREEZE(tmp);
        return tmp;
    }
    return 0;
}

static void
define_filetest_function(const char *name, VALUE (*func)(ANYARGS), int argc)
{
    rb_define_module_function(rb_mFileTest, name, func, argc);
    rb_define_singleton_method(rb_cFile, name, func, argc);
}

/*
 *  A <code>File</code> is an abstraction of any file object accessible
 *  by the program and is closely associated with class <code>IO</code>
 *  <code>File</code> includes the methods of module
 *  <code>FileTest</code> as class methods, allowing you to write (for
 *  example) <code>File.exist?("foo")</code>.
 *
 *  In the description of File methods,
 *  <em>permission bits</em> are a platform-specific
 *  set of bits that indicate permissions of a file. On Unix-based
 *  systems, permissions are viewed as a set of three octets, for the
 *  owner, the group, and the rest of the world. For each of these
 *  entities, permissions may be set to read, write, or execute the
 *  file:
 *
 *  The permission bits <code>0644</code> (in octal) would thus be
 *  interpreted as read/write for owner, and read-only for group and
 *  other. Higher-order bits may also be used to indicate the type of
 *  file (plain, directory, pipe, socket, and so on) and various other
 *  special features. If the permissions are for a directory, the
 *  meaning of the execute bit changes; when set the directory can be
 *  searched.
 *
 *  On non-Posix operating systems, there may be only the ability to
 *  make a file read-only or read-write. In this case, the remaining
 *  permission bits will be synthesized to resemble typical values. For
 *  instance, on Windows NT the default permission bits are
 *  <code>0644</code>, which means read/write for owner, read-only for
 *  all others. The only change that can be made is to make the file
 *  read-only, which is reported as <code>0444</code>.
 */

void
Init_File(void)
{
    rb_mFileTest = rb_define_module("FileTest");
    rb_cFile = rb_define_class("File", rb_cIO);

    define_filetest_function("directory?", test_d, 1);
    define_filetest_function("exist?", test_e, 1);
    define_filetest_function("exists?", test_e, 1); /* temporary */
    define_filetest_function("readable?", test_r, 1);
    define_filetest_function("readable_real?", test_R, 1);
    define_filetest_function("world_readable?", test_wr, 1);
    define_filetest_function("writable?", test_w, 1);
    define_filetest_function("writable_real?", test_W, 1);
    define_filetest_function("world_writable?", test_ww, 1);
    define_filetest_function("executable?", test_x, 1);
    define_filetest_function("executable_real?", test_X, 1);
    define_filetest_function("file?", test_f, 1);
    define_filetest_function("zero?", test_z, 1);
    define_filetest_function("size?", test_s, 1);
    define_filetest_function("size", rb_file_s_size, 1);
    define_filetest_function("owned?", test_owned, 1);
    define_filetest_function("grpowned?", test_grpowned, 1);

    define_filetest_function("pipe?", test_p, 1);
    define_filetest_function("symlink?", test_l, 1);
    define_filetest_function("socket?", test_S, 1);

    define_filetest_function("blockdev?", test_b, 1);
    define_filetest_function("chardev?", test_c, 1);

    define_filetest_function("setuid?", test_suid, 1);
    define_filetest_function("setgid?", test_sgid, 1);
    define_filetest_function("sticky?", test_sticky, 1);

    define_filetest_function("identical?", test_identical, 2);

    rb_define_singleton_method(rb_cFile, "stat",  rb_file_s_stat, 1);
    rb_define_singleton_method(rb_cFile, "lstat", rb_file_s_lstat, 1);
    rb_define_singleton_method(rb_cFile, "ftype", rb_file_s_ftype, 1);

    rb_define_singleton_method(rb_cFile, "atime", rb_file_s_atime, 1);
    rb_define_singleton_method(rb_cFile, "mtime", rb_file_s_mtime, 1);
    rb_define_singleton_method(rb_cFile, "ctime", rb_file_s_ctime, 1);

    rb_define_singleton_method(rb_cFile, "utime", rb_file_s_utime, -1);
    rb_define_singleton_method(rb_cFile, "chmod", rb_file_s_chmod, -1);
    rb_define_singleton_method(rb_cFile, "chown", rb_file_s_chown, -1);
    rb_define_singleton_method(rb_cFile, "lchmod", rb_file_s_lchmod, -1);
    rb_define_singleton_method(rb_cFile, "lchown", rb_file_s_lchown, -1);

    rb_define_singleton_method(rb_cFile, "link", rb_file_s_link, 2);
    rb_define_singleton_method(rb_cFile, "symlink", rb_file_s_symlink, 2);
    rb_define_singleton_method(rb_cFile, "readlink", rb_file_s_readlink, 1);

    rb_define_singleton_method(rb_cFile, "unlink", rb_file_s_unlink, -2);
    rb_define_singleton_method(rb_cFile, "delete", rb_file_s_unlink, -2);
    rb_define_singleton_method(rb_cFile, "rename", rb_file_s_rename, 2);
    rb_define_singleton_method(rb_cFile, "umask", rb_file_s_umask, -1);
    rb_define_singleton_method(rb_cFile, "truncate", rb_file_s_truncate, 2);
    rb_define_singleton_method(rb_cFile, "expand_path", rb_file_s_expand_path, -1);
    rb_define_singleton_method(rb_cFile, "basename", rb_file_s_basename, -1);
    rb_define_singleton_method(rb_cFile, "dirname", rb_file_s_dirname, 1);
    rb_define_singleton_method(rb_cFile, "extname", rb_file_s_extname, 1);
    rb_define_singleton_method(rb_cFile, "path", rb_file_s_path, 1);

    separator = rb_obj_freeze(rb_str_new2("/"));
    rb_define_const(rb_cFile, "Separator", separator);
    rb_define_const(rb_cFile, "SEPARATOR", separator);
    rb_define_singleton_method(rb_cFile, "split",  rb_file_s_split, 1);
    rb_define_singleton_method(rb_cFile, "join",   rb_file_s_join, -2);

#ifdef DOSISH
    rb_define_const(rb_cFile, "ALT_SEPARATOR", rb_obj_freeze(rb_str_new2("\\")));
#else
    rb_define_const(rb_cFile, "ALT_SEPARATOR", Qnil);
#endif
    rb_define_const(rb_cFile, "PATH_SEPARATOR", rb_obj_freeze(rb_str_new2(PATH_SEP)));

    rb_define_method(rb_cIO, "stat",  rb_io_stat, 0); /* this is IO's method */
    rb_define_method(rb_cFile, "lstat",  rb_file_lstat, 0);

    rb_define_method(rb_cFile, "atime", rb_file_atime, 0);
    rb_define_method(rb_cFile, "mtime", rb_file_mtime, 0);
    rb_define_method(rb_cFile, "ctime", rb_file_ctime, 0);

    rb_define_method(rb_cFile, "chmod", rb_file_chmod, 1);
    rb_define_method(rb_cFile, "chown", rb_file_chown, 2);
    rb_define_method(rb_cFile, "truncate", rb_file_truncate, 1);

    rb_define_method(rb_cFile, "flock", rb_file_flock, 1);

    rb_mFConst = rb_define_module_under(rb_cFile, "Constants");
    rb_include_module(rb_cIO, rb_mFConst);
    rb_file_const("LOCK_SH", INT2FIX(LOCK_SH));
    rb_file_const("LOCK_EX", INT2FIX(LOCK_EX));
    rb_file_const("LOCK_UN", INT2FIX(LOCK_UN));
    rb_file_const("LOCK_NB", INT2FIX(LOCK_NB));

    rb_define_method(rb_cFile, "path",  rb_file_path, 0);
    rb_define_global_function("test", rb_f_test, -1);

    rb_cStat = rb_define_class_under(rb_cFile, "Stat", rb_cObject);
    rb_define_alloc_func(rb_cStat,  rb_stat_s_alloc);
    rb_define_method(rb_cStat, "initialize", rb_stat_init, 1);
    rb_define_method(rb_cStat, "initialize_copy", rb_stat_init_copy, 1);

    rb_include_module(rb_cStat, rb_mComparable);

    rb_define_method(rb_cStat, "<=>", rb_stat_cmp, 1);

    rb_define_method(rb_cStat, "dev", rb_stat_dev, 0);
    rb_define_method(rb_cStat, "dev_major", rb_stat_dev_major, 0);
    rb_define_method(rb_cStat, "dev_minor", rb_stat_dev_minor, 0);
    rb_define_method(rb_cStat, "ino", rb_stat_ino, 0);
    rb_define_method(rb_cStat, "mode", rb_stat_mode, 0);
    rb_define_method(rb_cStat, "nlink", rb_stat_nlink, 0);
    rb_define_method(rb_cStat, "uid", rb_stat_uid, 0);
    rb_define_method(rb_cStat, "gid", rb_stat_gid, 0);
    rb_define_method(rb_cStat, "rdev", rb_stat_rdev, 0);
    rb_define_method(rb_cStat, "rdev_major", rb_stat_rdev_major, 0);
    rb_define_method(rb_cStat, "rdev_minor", rb_stat_rdev_minor, 0);
    rb_define_method(rb_cStat, "size", rb_stat_size, 0);
    rb_define_method(rb_cStat, "blksize", rb_stat_blksize, 0);
    rb_define_method(rb_cStat, "blocks", rb_stat_blocks, 0);
    rb_define_method(rb_cStat, "atime", rb_stat_atime, 0);
    rb_define_method(rb_cStat, "mtime", rb_stat_mtime, 0);
    rb_define_method(rb_cStat, "ctime", rb_stat_ctime, 0);

    rb_define_method(rb_cStat, "inspect", rb_stat_inspect, 0);

    rb_define_method(rb_cStat, "ftype", rb_stat_ftype, 0);

    rb_define_method(rb_cStat, "directory?",  rb_stat_d, 0);
    rb_define_method(rb_cStat, "readable?",  rb_stat_r, 0);
    rb_define_method(rb_cStat, "readable_real?",  rb_stat_R, 0);
    rb_define_method(rb_cStat, "world_readable?", rb_stat_wr, 0);
    rb_define_method(rb_cStat, "writable?",  rb_stat_w, 0);
    rb_define_method(rb_cStat, "writable_real?",  rb_stat_W, 0);
    rb_define_method(rb_cStat, "world_writable?", rb_stat_ww, 0);
    rb_define_method(rb_cStat, "executable?",  rb_stat_x, 0);
    rb_define_method(rb_cStat, "executable_real?",  rb_stat_X, 0);
    rb_define_method(rb_cStat, "file?",  rb_stat_f, 0);
    rb_define_method(rb_cStat, "zero?",  rb_stat_z, 0);
    rb_define_method(rb_cStat, "size?",  rb_stat_s, 0);
    rb_define_method(rb_cStat, "owned?",  rb_stat_owned, 0);
    rb_define_method(rb_cStat, "grpowned?",  rb_stat_grpowned, 0);

    rb_define_method(rb_cStat, "pipe?",  rb_stat_p, 0);
    rb_define_method(rb_cStat, "symlink?",  rb_stat_l, 0);
    rb_define_method(rb_cStat, "socket?",  rb_stat_S, 0);

    rb_define_method(rb_cStat, "blockdev?",  rb_stat_b, 0);
    rb_define_method(rb_cStat, "chardev?",  rb_stat_c, 0);

    rb_define_method(rb_cStat, "setuid?",  rb_stat_suid, 0);
    rb_define_method(rb_cStat, "setgid?",  rb_stat_sgid, 0);
    rb_define_method(rb_cStat, "sticky?",  rb_stat_sticky, 0);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


gc.c

root/gc.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. rb_memerror
  2. ruby_xmalloc
  3. ruby_xmalloc2
  4. ruby_xcalloc
  5. ruby_xrealloc
  6. ruby_xrealloc2
  7. ruby_xfree
  8. rb_gc_enable
  9. rb_gc_disable
  10. rb_gc_register_address
  11. rb_gc_unregister_address
  12. rb_global_variable
  13. RVALUE
  14. add_heap
  15. rb_newobj
  16. rb_data_object_alloc
  17. set_stack_end
  18. stack_grow_direction
  19. ruby_stack_length
  20. ruby_stack_check
  21. init_mark_stack
  22. rb_source_filename
  23. mark_source_filename
  24. sweep_source_filename
  25. gc_mark_all
  26. gc_mark_rest
  27. is_pointer_to_heap
  28. mark_locations_array
  29. rb_gc_mark_locations
  30. mark_entry
  31. mark_tbl
  32. rb_mark_tbl
  33. mark_keyvalue
  34. mark_hash
  35. rb_mark_hash
  36. rb_gc_mark_maybe
  37. gc_mark
  38. rb_gc_mark
  39. gc_mark_children
  40. finalize_list
  41. free_unused_heaps
  42. gc_sweep
  43. rb_gc_force_recycle
  44. obj_free
  45. rb_gc_mark_frame
  46. garbage_collect
  47. rb_gc
  48. rb_gc_start
  49. ruby_set_stack_size
  50. Init_stack
  51. ruby_init_stack
  52. Init_heap
  53. os_live_obj
  54. os_obj_of
  55. os_each_obj
  56. add_final
  57. rm_final
  58. finals
  59. call_final
  60. undefine_final
  61. define_final
  62. rb_gc_copy_finalizer
  63. run_single_final
  64. run_final
  65. rb_gc_finalize_deferred
  66. rb_gc_call_finalizer_at_exit
  67. id2ref
  68. Init_GC
/**********************************************************************

  gc.c -

  $Author: nobu $
  $Date: 2005/12/30 09:15:14 $
  created at: Tue Oct  5 09:44:46 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto
  Copyright (C) 2000  Network Applied Communication Laboratory, Inc.
  Copyright (C) 2000  Information-technology Promotion Agency, Japan

**********************************************************************/

#include "ruby.h"
#include "rubysig.h"
#include "st.h"
#include "node.h"
#include "env.h"
#include "re.h"
#include <stdio.h>
#include <setjmp.h>
#include <sys/types.h>

#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif

#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif

#if defined _WIN32 || defined __CYGWIN__
#include <windows.h>
#endif

int rb_io_fptr_finalize(struct OpenFile*);

#if !defined(setjmp) && defined(HAVE__SETJMP)
#define setjmp(env) _setjmp(env)
#endif

/* Make alloca work the best possible way.  */
#ifdef __GNUC__
# ifndef atarist
#  ifndef alloca
#   define alloca __builtin_alloca
#  endif
# endif /* atarist */
#else
# ifdef HAVE_ALLOCA_H
#  include <alloca.h>
# else
#  ifdef _AIX
 #pragma alloca
#  else
#   ifndef alloca /* predefined by HP cc +Olibcalls */
void *alloca ();
#   endif
#  endif /* AIX */
# endif /* HAVE_ALLOCA_H */
#endif /* __GNUC__ */

#ifndef GC_MALLOC_LIMIT
#if defined(MSDOS) || defined(__human68k__)
#define GC_MALLOC_LIMIT 200000
#else
#define GC_MALLOC_LIMIT 8000000
#endif
#endif

static unsigned long malloc_increase = 0;
static unsigned long malloc_limit = GC_MALLOC_LIMIT;
static void run_final(VALUE obj);
static VALUE nomem_error;
static int garbage_collect(void);

void
rb_memerror(void)
{
    static int recurse = 0;

    if (!nomem_error || (recurse > 0 && rb_safe_level() < 4)) {
        fprintf(stderr, "[FATAL] failed to allocate memory\n");
        exit(1);
    }
    recurse++;
    rb_exc_raise(nomem_error);
}

#ifdef RUBY_GC_DEBUG
int always_gc = 0;
#else
# define always_gc 0
#endif

void *
ruby_xmalloc(size_t size)
{
    void *mem;

    if (size < 0) {
        rb_raise(rb_eNoMemError, "negative allocation size (or too big)");
    }
    if (size == 0) size = 1;
    malloc_increase += size;

    if (always_gc || malloc_increase > malloc_limit) {
        garbage_collect();
    }
    RUBY_CRITICAL(mem = malloc(size));
    if (!mem) {
        if (garbage_collect()) {
            RUBY_CRITICAL(mem = malloc(size));
        }
        if (!mem) {
            rb_memerror();
        }
    }

    return mem;
}

void *
ruby_xmalloc2(size_t n, size_t size)
{
    long len = size * n;
    if (n != 0 && size != len / n) {
        rb_raise(rb_eArgError, "malloc: possible integer overflow");
    }
    return ruby_xmalloc(len);
}

void *
ruby_xcalloc(size_t n, size_t size)
{
    void *mem;

    mem = ruby_xmalloc2(n, size);
    memset(mem, 0, n * size);

    return mem;
}

void *
ruby_xrealloc(void *ptr, size_t size)
{
    void *mem;

    if (size < 0) {
        rb_raise(rb_eArgError, "negative re-allocation size");
    }
    if (!ptr) return ruby_xmalloc(size);
    if (size == 0) size = 1;
    malloc_increase += size;
    if (always_gc) garbage_collect();
    RUBY_CRITICAL(mem = realloc(ptr, size));
    if (!mem) {
        if (garbage_collect()) {
            RUBY_CRITICAL(mem = realloc(ptr, size));
        }
        if (!mem) {
            rb_memerror();
        }
    }

    return mem;
}

void *
ruby_xrealloc2(void *ptr, size_t n, size_t size)
{
    size_t len = size * n;
    if (n != 0 && size != len / n) {
        rb_raise(rb_eArgError, "realloc: possible integer overflow");
    }
    return ruby_xrealloc(ptr, len);
}

void
ruby_xfree(void *x)
{
    if (x)
        RUBY_CRITICAL(free(x));
}

static int dont_gc;
static int during_gc;
static int need_call_final = 0;
static st_table *finalizer_table = 0;

/*
 *  call-seq:
 *     GC.enable    => true or false
 *
 *  Enables garbage collection, returning <code>true</code> if garbage
 *  collection was previously disabled.
 *
 *     GC.disable   #=> false
 *     GC.enable    #=> true
 *     GC.enable    #=> false
 *
 */

VALUE
rb_gc_enable(void)
{
    int old = dont_gc;

    dont_gc = Qfalse;
    return old;
}

/*
 *  call-seq:
 *     GC.disable    => true or false
 *
 *  Disables garbage collection, returning <code>true</code> if garbage
 *  collection was already disabled.
 *
 *     GC.disable   #=> false
 *     GC.disable   #=> true
 *
 */

VALUE
rb_gc_disable(void)
{
    int old = dont_gc;

    dont_gc = Qtrue;
    return old;
}

VALUE rb_mGC;

static struct gc_list {
    VALUE *varptr;
    struct gc_list *next;
} *global_List = 0;

void
rb_gc_register_address(VALUE *addr)
{
    struct gc_list *tmp;

    tmp = ALLOC(struct gc_list);
    tmp->next = global_List;
    tmp->varptr = addr;
    global_List = tmp;
}

void
rb_gc_unregister_address(VALUE *addr)
{
    struct gc_list *tmp = global_List;

    if (tmp->varptr == addr) {
        global_List = tmp->next;
        RUBY_CRITICAL(free(tmp));
        return;
    }
    while (tmp->next) {
        if (tmp->next->varptr == addr) {
            struct gc_list *t = tmp->next;

            tmp->next = tmp->next->next;
            RUBY_CRITICAL(free(t));
            break;
        }
        tmp = tmp->next;
    }
}

#undef GC_DEBUG

void
rb_global_variable(VALUE *var)
{
    rb_gc_register_address(var);
}

typedef struct RVALUE {
    union {
        struct {
            unsigned long flags;        /* always 0 for freed obj */
            struct RVALUE *next;
        } free;
        struct RBasic  basic;
        struct RObject object;
        struct RClass  klass;
        struct RFloat  flonum;
        struct RString string;
        struct RArray  array;
        struct RRegexp regexp;
        struct RHash   hash;
        struct RData   data;
        struct RStruct rstruct;
        struct RBignum bignum;
        struct RFile   file;
        struct RNode   node;
        struct RMatch  match;
        struct RVarmap varmap;
        struct SCOPE   scope;
    } as;
#ifdef GC_DEBUG
    char *file;
    int   line;
#endif
} RVALUE;

static RVALUE *freelist = 0;
static RVALUE *deferred_final_list = 0;

#define HEAPS_INCREMENT 10
static struct heaps_slot {
    RVALUE *slot;
    int limit;
} *heaps;
static int heaps_length = 0;
static int heaps_used   = 0;

#define HEAP_MIN_SLOTS 10000
static int heap_slots = HEAP_MIN_SLOTS;

#define FREE_MIN  4096

static RVALUE *himem, *lomem;

static void
add_heap(void)
{
    RVALUE *p, *pend;

    if (heaps_used == heaps_length) {
        /* Realloc heaps */
        struct heaps_slot *p;
        int length;

        heaps_length += HEAPS_INCREMENT;
        length = heaps_length*sizeof(struct heaps_slot);
        RUBY_CRITICAL(
            if (heaps_used > 0) {
                p = (struct heaps_slot *)realloc(heaps, length);
                if (p) heaps = p;
            }
            else {
                p = heaps = (struct heaps_slot *)malloc(length);
            });
        if (p == 0) rb_memerror();
    }

    for (;;) {
        RUBY_CRITICAL(p = heaps[heaps_used].slot = (RVALUE*)malloc(sizeof(RVALUE)*heap_slots));
        heaps[heaps_used].limit = heap_slots;
        if (p == 0) {
            if (heap_slots == HEAP_MIN_SLOTS) {
                rb_memerror();
            }
            heap_slots = HEAP_MIN_SLOTS;
            continue;
        }
        break;
    }
    pend = p + heap_slots;
    if (lomem == 0 || lomem > p) lomem = p;
    if (himem < pend) himem = pend;
    heaps_used++;
    heap_slots *= 1.8;

    while (p < pend) {
        p->as.free.flags = 0;
        p->as.free.next = freelist;
        freelist = p;
        p++;
    }
}
#define RANY(o) ((RVALUE*)(o))

VALUE
rb_newobj(void)
{
    VALUE obj;

    if ((always_gc || !freelist) && !garbage_collect())
        rb_memerror();

    obj = (VALUE)freelist;
    freelist = freelist->as.free.next;
    MEMZERO((void*)obj, RVALUE, 1);
#ifdef GC_DEBUG
    RANY(obj)->file = ruby_sourcefile;
    RANY(obj)->line = ruby_sourceline;
#endif
    return obj;
}

VALUE
rb_data_object_alloc(VALUE klass, void *datap, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
{
    NEWOBJ(data, struct RData);
    if (klass) Check_Type(klass, T_CLASS);
    OBJSETUP(data, klass, T_DATA);
    data->data = datap;
    data->dfree = dfree;
    data->dmark = dmark;

    return (VALUE)data;
}

extern st_table *rb_class_tbl;
VALUE *rb_gc_stack_start = 0;
#ifdef IA64
VALUE *rb_gc_register_stack_start = 0;
#endif

#ifdef DJGPP
/* set stack size (http://www.delorie.com/djgpp/v2faq/faq15_9.html) */
unsigned int _stklen = 0x180000; /* 1.5 kB */
#endif

#if defined(DJGPP) || defined(_WIN32_WCE)
static unsigned int STACK_LEVEL_MAX = 65535;
#elif defined(__human68k__)
unsigned int _stacksize = 262144;
# define STACK_LEVEL_MAX (_stacksize - 4096)
# undef HAVE_GETRLIMIT
#elif defined(HAVE_GETRLIMIT)
static unsigned int STACK_LEVEL_MAX = 655300;
#else
# define STACK_LEVEL_MAX 655300
#endif

NOINLINE(static void set_stack_end(VALUE **stack_end_p));

static void
set_stack_end(VALUE **stack_end_p)
{
    VALUE stack_end;
    *stack_end_p = &stack_end;
}
#define SET_STACK_END    VALUE *stack_end; set_stack_end(&stack_end)
#define STACK_END        (stack_end)

#if defined(sparc) || defined(__sparc__)
# define STACK_LENGTH  (rb_gc_stack_start - STACK_END + 0x80)
#elif STACK_GROW_DIRECTION < 0
# define STACK_LENGTH  (rb_gc_stack_start - STACK_END)
#elif STACK_GROW_DIRECTION > 0
# define STACK_LENGTH  (STACK_END - rb_gc_stack_start + 1)
#else
# define STACK_LENGTH  ((STACK_END < rb_gc_stack_start) ? rb_gc_stack_start - STACK_END\
                                           : STACK_END - rb_gc_stack_start + 1)
#endif
#if STACK_GROW_DIRECTION > 0
# define STACK_UPPER(x, a, b) a
#elif STACK_GROW_DIRECTION < 0
# define STACK_UPPER(x, a, b) b
#else
static int grow_direction;
static int
stack_grow_direction(addr)
    VALUE *addr;
{
    SET_STACK_END;

    if (STACK_END > addr) return grow_direction = 1;
    return grow_direction = -1;
}
# define stack_growup_p(x) ((grow_direction ? grow_direction : stack_grow_direction(x)) > 0)
# define STACK_UPPER(x, a, b) (stack_growup_p(x) ? a : b)
#endif

#define GC_WATER_MARK 512

#define CHECK_STACK(ret) do {\
    SET_STACK_END;\
    (ret) = (STACK_LENGTH > STACK_LEVEL_MAX + GC_WATER_MARK);\
} while (0)

int
ruby_stack_length(VALUE **p)
{
    SET_STACK_END;
    if (p) *p = STACK_UPPER(STACK_END, rb_gc_stack_start, STACK_END);
    return STACK_LENGTH;
}

int
ruby_stack_check(void)
{
    int ret;

    CHECK_STACK(ret);
    return ret;
}

#define MARK_STACK_MAX 1024
static VALUE mark_stack[MARK_STACK_MAX];
static VALUE *mark_stack_ptr;
static int mark_stack_overflow;

static void
init_mark_stack(void)
{
    mark_stack_overflow = 0;
    mark_stack_ptr = mark_stack;
}

#define MARK_STACK_EMPTY (mark_stack_ptr == mark_stack)

static st_table *source_filenames;

char *
rb_source_filename(const char *f)
{
    char *name;

    if (!st_lookup(source_filenames, (st_data_t)f, (st_data_t *)&name)) {
        long len = strlen(f) + 1;
        char *ptr = name = ALLOC_N(char, len + 1);
        *ptr++ = 0;
        MEMCPY(ptr, f, char, len);
        st_add_direct(source_filenames, (st_data_t)ptr, (st_data_t)name);
        return ptr;
    }
    return name + 1;
}

static void
mark_source_filename(char *f)
{
    if (f) {
        f[-1] = 1;
    }
}

static int
sweep_source_filename(char *key, char *value)
{
    if (*value) {
        *value = 0;
        return ST_CONTINUE;
    }
    else {
        free(value);
        return ST_DELETE;
    }
}

static void gc_mark(VALUE ptr, int lev);
static void gc_mark_children(VALUE ptr, int lev);

static void
gc_mark_all(void)
{
    RVALUE *p, *pend;
    int i;

    init_mark_stack();
    for (i = 0; i < heaps_used; i++) {
        p = heaps[i].slot; pend = p + heaps[i].limit;
        while (p < pend) {
            if ((p->as.basic.flags & FL_MARK) &&
                (p->as.basic.flags != FL_MARK)) {
                gc_mark_children((VALUE)p, 0);
            }
            p++;
        }
    }
}

static void
gc_mark_rest(void)
{
    VALUE tmp_arry[MARK_STACK_MAX];
    VALUE *p;

    p = (mark_stack_ptr - mark_stack) + tmp_arry;
    MEMCPY(tmp_arry, mark_stack, VALUE, MARK_STACK_MAX);

    init_mark_stack();
    while (p != tmp_arry){
        p--;
        gc_mark_children(*p, 0);
    }
}

static inline int
is_pointer_to_heap(void *ptr)
{
    register RVALUE *p = RANY(ptr);
    register RVALUE *heap_org;
    register long i;

    if (p < lomem || p > himem) return Qfalse;

    /* check if p looks like a pointer */
    for (i=0; i < heaps_used; i++) {
        heap_org = heaps[i].slot;
        if (heap_org <= p && p < heap_org + heaps[i].limit &&
            ((((char*)p)-((char*)heap_org))%sizeof(RVALUE)) == 0)
            return Qtrue;
    }
    return Qfalse;
}

static void
mark_locations_array(register VALUE *x, register long n)
{
    VALUE v;
    while (n--) {
        v = *x;
        if (is_pointer_to_heap((void *)v)) {
            gc_mark(v, 0);
        }
        x++;
    }
}

void
rb_gc_mark_locations(VALUE *start, VALUE *end)
{
    long n;

    n = end - start;
    mark_locations_array(start,n);
}

static int
mark_entry(ID key, VALUE value, int lev)
{
    gc_mark(value, lev);
    return ST_CONTINUE;
}

static void
mark_tbl(st_table *tbl, int lev)
{
    if (!tbl) return;
    st_foreach(tbl, mark_entry, lev);
}

void
rb_mark_tbl(st_table *tbl)
{
    mark_tbl(tbl, 0);
}

static int
mark_keyvalue(VALUE key, VALUE value, int lev)
{
    gc_mark(key, lev);
    gc_mark(value, lev);
    return ST_CONTINUE;
}

static void
mark_hash(st_table *tbl, int lev)
{
    if (!tbl) return;
    st_foreach(tbl, mark_keyvalue, lev);
}

void
rb_mark_hash(st_table *tbl)
{
    mark_hash(tbl, 0);
}

void
rb_gc_mark_maybe(VALUE obj)
{
    if (is_pointer_to_heap((void *)obj)) {
        gc_mark(obj, 0);
    }
}

#define GC_LEVEL_MAX 250

static void
gc_mark(VALUE ptr, int lev)
{
    register RVALUE *obj;

    obj = RANY(ptr);
    if (rb_special_const_p(ptr)) return; /* special const not marked */
    if (obj->as.basic.flags == 0) return;       /* free cell */
    if (obj->as.basic.flags & FL_MARK) return;  /* already marked */
    obj->as.basic.flags |= FL_MARK;

    if (lev > GC_LEVEL_MAX || (lev == 0 && ruby_stack_check())) {
        if (!mark_stack_overflow) {
            if (mark_stack_ptr - mark_stack < MARK_STACK_MAX) {
                *mark_stack_ptr = ptr;
                mark_stack_ptr++;
            }
            else {
                mark_stack_overflow = 1;
            }
        }
        return;
    }
    gc_mark_children(ptr, lev+1);
}

void
rb_gc_mark(VALUE ptr)
{
    gc_mark(ptr, 0);
}

static void
gc_mark_children(VALUE ptr, int lev)
{
    register RVALUE *obj = RANY(ptr);

    goto marking;               /* skip */

  again:
    obj = RANY(ptr);
    if (rb_special_const_p(ptr)) return; /* special const not marked */
    if (obj->as.basic.flags == 0) return;       /* free cell */
    if (obj->as.basic.flags & FL_MARK) return;  /* already marked */
    obj->as.basic.flags |= FL_MARK;

  marking:
    if (FL_TEST(obj, FL_EXIVAR)) {
        rb_mark_generic_ivar(ptr);
    }

    switch (obj->as.basic.flags & T_MASK) {
      case T_NIL:
      case T_FIXNUM:
        rb_bug("rb_gc_mark() called for broken object");
        break;

      case T_NODE:
        mark_source_filename(obj->as.node.nd_file);
        switch (nd_type(obj)) {
          case NODE_IF:         /* 1,2,3 */
          case NODE_FOR:
          case NODE_ITER:
          case NODE_CREF:
          case NODE_WHEN:
          case NODE_MASGN:
          case NODE_RESCUE:
          case NODE_RESBODY:
          case NODE_CLASS:
          case NODE_ARGS:
            gc_mark((VALUE)obj->as.node.u2.node, lev);
            /* fall through */
          case NODE_BLOCK:      /* 1,3 */
          case NODE_ARRAY:
          case NODE_DSTR:
          case NODE_DXSTR:
          case NODE_DREGX:
          case NODE_DREGX_ONCE:
          case NODE_FBODY:
          case NODE_ENSURE:
          case NODE_CALL:
          case NODE_DEFS:
          case NODE_OP_ASGN1:
            gc_mark((VALUE)obj->as.node.u1.node, lev);
            /* fall through */
          case NODE_SUPER:      /* 3 */
          case NODE_FCALL:
          case NODE_DEFN:
            ptr = (VALUE)obj->as.node.u3.node;
            goto again;

          case NODE_WHILE:      /* 1,2 */
          case NODE_UNTIL:
          case NODE_AND:
          case NODE_OR:
          case NODE_CASE:
          case NODE_SCLASS:
          case NODE_DOT2:
          case NODE_DOT3:
          case NODE_FLIP2:
          case NODE_FLIP3:
          case NODE_MATCH2:
          case NODE_MATCH3:
          case NODE_OP_ASGN_OR:
          case NODE_OP_ASGN_AND:
          case NODE_MODULE:
          case NODE_ALIAS:
          case NODE_VALIAS:
            gc_mark((VALUE)obj->as.node.u1.node, lev);
            /* fall through */
          case NODE_METHOD:     /* 2 */
          case NODE_NOT:
          case NODE_GASGN:
          case NODE_LASGN:
          case NODE_DASGN:
          case NODE_DASGN_CURR:
          case NODE_IASGN:
          case NODE_CVDECL:
          case NODE_CVASGN:
          case NODE_COLON3:
          case NODE_OPT_N:
          case NODE_EVSTR:
          case NODE_UNDEF:
            ptr = (VALUE)obj->as.node.u2.node;
            goto again;

          case NODE_HASH:       /* 1 */
          case NODE_LIT:
          case NODE_STR:
          case NODE_XSTR:
          case NODE_DEFINED:
          case NODE_MATCH:
          case NODE_RETURN:
          case NODE_BREAK:
          case NODE_NEXT:
          case NODE_YIELD:
          case NODE_COLON2:
          case NODE_SPLAT:
          case NODE_TO_ARY:
          case NODE_SVALUE:
            ptr = (VALUE)obj->as.node.u1.node;
            goto again;

          case NODE_SCOPE:      /* 2,3 */
          case NODE_BLOCK_PASS:
          case NODE_CDECL:
            gc_mark((VALUE)obj->as.node.u3.node, lev);
            ptr = (VALUE)obj->as.node.u2.node;
            goto again;

          case NODE_ZARRAY:     /* - */
          case NODE_ZSUPER:
          case NODE_CFUNC:
          case NODE_VCALL:
          case NODE_GVAR:
          case NODE_LVAR:
          case NODE_DVAR:
          case NODE_IVAR:
          case NODE_CVAR:
          case NODE_NTH_REF:
          case NODE_BACK_REF:
          case NODE_REDO:
          case NODE_RETRY:
          case NODE_SELF:
          case NODE_NIL:
          case NODE_TRUE:
          case NODE_FALSE:
          case NODE_ERRINFO:
          case NODE_ATTRSET:
          case NODE_BLOCK_ARG:
          case NODE_POSTEXE:
            break;
          case NODE_ALLOCA:
            mark_locations_array((VALUE*)obj->as.node.u1.value,
                                 obj->as.node.u3.cnt);
            ptr = (VALUE)obj->as.node.u2.node;
            goto again;

          default:              /* unlisted NODE */
            if (is_pointer_to_heap(obj->as.node.u1.node)) {
                gc_mark((VALUE)obj->as.node.u1.node, lev);
            }
            if (is_pointer_to_heap(obj->as.node.u2.node)) {
                gc_mark((VALUE)obj->as.node.u2.node, lev);
            }
            if (is_pointer_to_heap(obj->as.node.u3.node)) {
                gc_mark((VALUE)obj->as.node.u3.node, lev);
            }
        }
        return;                 /* no need to mark class. */
    }

    gc_mark(obj->as.basic.klass, lev);
    switch (obj->as.basic.flags & T_MASK) {
      case T_ICLASS:
      case T_CLASS:
      case T_MODULE:
        mark_tbl(obj->as.klass.m_tbl, lev);
        mark_tbl(obj->as.klass.iv_tbl, lev);
        ptr = obj->as.klass.super;
        goto again;

      case T_ARRAY:
        if (FL_TEST(obj, ELTS_SHARED)) {
            ptr = obj->as.array.aux.shared;
            goto again;
        }
        else {
            long i, len = obj->as.array.len;
            VALUE *ptr = obj->as.array.ptr;

            for (i=0; i < len; i++) {
                gc_mark(*ptr++, lev);
            }
        }
        break;

      case T_HASH:
        mark_hash(obj->as.hash.tbl, lev);
        ptr = obj->as.hash.ifnone;
        goto again;

      case T_STRING:
#define STR_ASSOC FL_USER3   /* copied from string.c */
        if (FL_TEST(obj, ELTS_SHARED|STR_ASSOC)) {
            ptr = obj->as.string.aux.shared;
            goto again;
        }
        break;

      case T_DATA:
        if (obj->as.data.dmark) (*obj->as.data.dmark)(DATA_PTR(obj));
        break;

      case T_OBJECT:
        mark_tbl(obj->as.object.iv_tbl, lev);
        break;

      case T_FILE:
      case T_REGEXP:
      case T_FLOAT:
      case T_BIGNUM:
      case T_BLOCK:
        break;

      case T_MATCH:
        if (obj->as.match.str) {
            ptr = obj->as.match.str;
            goto again;
        }
        break;

      case T_VARMAP:
        gc_mark(obj->as.varmap.val, lev);
        ptr = (VALUE)obj->as.varmap.next;
        goto again;

      case T_SCOPE:
        if (obj->as.scope.local_vars && (obj->as.scope.flags & SCOPE_MALLOC)) {
            int n = obj->as.scope.local_tbl[0]+1;
            VALUE *vars = &obj->as.scope.local_vars[-1];

            while (n--) {
                gc_mark(*vars++, lev);
            }
        }
        break;

      case T_STRUCT:
        {
            long len = obj->as.rstruct.len;
            VALUE *ptr = obj->as.rstruct.ptr;

            while (len--) {
                gc_mark(*ptr++, lev);
            }
        }
        break;

      default:
        rb_bug("rb_gc_mark(): unknown data type 0x%lx(%p) %s",
               obj->as.basic.flags & T_MASK, obj,
               is_pointer_to_heap(obj) ? "corrupted object" : "non object");
    }
}

static void obj_free(VALUE);

static void
finalize_list(RVALUE *p)
{
    while (p) {
        RVALUE *tmp = p->as.free.next;
        run_final((VALUE)p);
        if (!FL_TEST(p, FL_SINGLETON)) { /* not freeing page */
            p->as.free.flags = 0;
            p->as.free.next = freelist;
            freelist = p;
        }
        p = tmp;
    }
}

static void
free_unused_heaps(void)
{
    int i, j;

    for (i = j = 1; j < heaps_used; i++) {
        if (heaps[i].limit == 0) {
            free(heaps[i].slot);
            heaps_used--;
        }
        else {
            if (i != j) {
                heaps[j] = heaps[i];
            }
            j++;
        }
    }
}

void rb_gc_abort_threads(void);

static void
gc_sweep(void)
{
    RVALUE *p, *pend, *final_list;
    int freed = 0;
    int i;
    unsigned long live = 0;

    mark_source_filename(ruby_sourcefile);
    if (source_filenames) {
        st_foreach(source_filenames, sweep_source_filename, 0);
    }

    freelist = 0;
    final_list = deferred_final_list;
    deferred_final_list = 0;
    for (i = 0; i < heaps_used; i++) {
        int n = 0;
        RVALUE *free = freelist;
        RVALUE *final = final_list;

        p = heaps[i].slot; pend = p + heaps[i].limit;
        while (p < pend) {
            if (!(p->as.basic.flags & FL_MARK)) {
                if (p->as.basic.flags) {
                    obj_free((VALUE)p);
                }
                if (need_call_final && FL_TEST(p, FL_FINALIZE)) {
                    p->as.free.flags = FL_MARK; /* remain marked */
                    p->as.free.next = final_list;
                    final_list = p;
                }
                else {
                    p->as.free.flags = 0;
                    p->as.free.next = freelist;
                    freelist = p;
                }
                n++;
            }
            else if (RBASIC(p)->flags == FL_MARK) {
                /* objects to be finalized */
                /* do notning remain marked */
            }
            else {
                RBASIC(p)->flags &= ~FL_MARK;
                live++;
            }
            p++;
        }
        if (n == heaps[i].limit && freed > FREE_MIN) {
            RVALUE *pp;

            heaps[i].limit = 0;
            for (pp = final_list; pp != final; pp = pp->as.free.next) {
                p->as.free.flags |= FL_SINGLETON; /* freeing page mark */
            }
            freelist = free;    /* cancel this page from freelist */
        }
        else {
            freed += n;
        }
    }
    if (malloc_increase > malloc_limit) {
        malloc_limit += (malloc_increase - malloc_limit) * (double)live / (live + freed);
        if (malloc_limit < GC_MALLOC_LIMIT) malloc_limit = GC_MALLOC_LIMIT;
    }
    malloc_increase = 0;
    if (freed < FREE_MIN) {
        add_heap();
    }
    during_gc = 0;

    /* clear finalization list */
    if (final_list) {
        deferred_final_list = final_list;
        return;
    }
    free_unused_heaps();
}

void
rb_gc_force_recycle(VALUE p)
{
    RANY(p)->as.free.flags = 0;
    RANY(p)->as.free.next = freelist;
    freelist = RANY(p);
}

static void
obj_free(VALUE obj)
{
    switch (RANY(obj)->as.basic.flags & T_MASK) {
      case T_NIL:
      case T_FIXNUM:
      case T_TRUE:
      case T_FALSE:
        rb_bug("obj_free() called for broken object");
        break;
    }

    if (FL_TEST(obj, FL_EXIVAR)) {
        rb_free_generic_ivar((VALUE)obj);
    }

    switch (RANY(obj)->as.basic.flags & T_MASK) {
      case T_OBJECT:
        if (RANY(obj)->as.object.iv_tbl) {
            st_free_table(RANY(obj)->as.object.iv_tbl);
        }
        break;
      case T_MODULE:
      case T_CLASS:
        rb_clear_cache_by_class((VALUE)obj);
        st_free_table(RANY(obj)->as.klass.m_tbl);
        if (RANY(obj)->as.object.iv_tbl) {
            st_free_table(RANY(obj)->as.object.iv_tbl);
        }
        break;
      case T_STRING:
        if (RANY(obj)->as.string.ptr && !FL_TEST(obj, ELTS_SHARED)) {
            RUBY_CRITICAL(free(RANY(obj)->as.string.ptr));
        }
        break;
      case T_ARRAY:
        if (RANY(obj)->as.array.ptr && !FL_TEST(obj, ELTS_SHARED)) {
            RUBY_CRITICAL(free(RANY(obj)->as.array.ptr));
        }
        break;
      case T_HASH:
        if (RANY(obj)->as.hash.tbl) {
            st_free_table(RANY(obj)->as.hash.tbl);
        }
        break;
      case T_REGEXP:
        if (RANY(obj)->as.regexp.ptr) {
            onig_free(RANY(obj)->as.regexp.ptr);
        }
        if (RANY(obj)->as.regexp.str) {
            RUBY_CRITICAL(free(RANY(obj)->as.regexp.str));
        }
        break;
      case T_DATA:
        if (DATA_PTR(obj)) {
            if ((long)RANY(obj)->as.data.dfree == -1) {
                RUBY_CRITICAL(free(DATA_PTR(obj)));
            }
            else if (RANY(obj)->as.data.dfree) {
                (*RANY(obj)->as.data.dfree)(DATA_PTR(obj));
            }
        }
        break;
      case T_MATCH:
        if (RANY(obj)->as.match.regs) {
            onig_region_free(RANY(obj)->as.match.regs, 0);
            RUBY_CRITICAL(free(RANY(obj)->as.match.regs));
        }
        break;
      case T_FILE:
        if (RANY(obj)->as.file.fptr) {
            rb_io_fptr_finalize(RANY(obj)->as.file.fptr);
        }
        break;
      case T_ICLASS:
        /* iClass shares table with the module */
        break;

      case T_FLOAT:
      case T_VARMAP:
      case T_BLOCK:
        break;

      case T_BIGNUM:
        if (RANY(obj)->as.bignum.digits) {
            RUBY_CRITICAL(free(RANY(obj)->as.bignum.digits));
        }
        break;
      case T_NODE:
        switch (nd_type(obj)) {
          case NODE_SCOPE:
            if (RANY(obj)->as.node.u1.tbl) {
                RUBY_CRITICAL(free(RANY(obj)->as.node.u1.tbl));
            }
            break;
          case NODE_ALLOCA:
            RUBY_CRITICAL(free(RANY(obj)->as.node.u1.node));
            break;
        }
        return;                 /* no need to free iv_tbl */

      case T_SCOPE:
        if (RANY(obj)->as.scope.local_vars &&
            RANY(obj)->as.scope.flags != SCOPE_ALLOCA) {
            VALUE *vars = RANY(obj)->as.scope.local_vars-1;
            if (vars[0] == 0)
                RUBY_CRITICAL(free(RANY(obj)->as.scope.local_tbl));
            if (RANY(obj)->as.scope.flags & SCOPE_MALLOC)
                RUBY_CRITICAL(free(vars));
        }
        break;

      case T_STRUCT:
        if (RANY(obj)->as.rstruct.ptr) {
            RUBY_CRITICAL(free(RANY(obj)->as.rstruct.ptr));
        }
        break;

      default:
        rb_bug("gc_sweep(): unknown data type 0x%lx(%p)",
               RANY(obj)->as.basic.flags & T_MASK, obj);
    }
}

void
rb_gc_mark_frame(struct FRAME *frame)
{
    gc_mark((VALUE)frame->node, 0);
}

#ifdef __GNUC__
#if defined(__human68k__) || defined(DJGPP)
#if defined(__human68k__)
typedef unsigned long rb_jmp_buf[8];
__asm__ (".even\n\
_rb_setjmp:\n\
        move.l  4(sp),a0\n\
        movem.l d3-d7/a3-a5,(a0)\n\
        moveq.l #0,d0\n\
        rts");
#ifdef setjmp
#undef setjmp
#endif
#else
#if defined(DJGPP)
typedef unsigned long rb_jmp_buf[6];
__asm__ (".align 4\n\
_rb_setjmp:\n\
        pushl   %ebp\n\
        movl    %esp,%ebp\n\
        movl    8(%ebp),%ebp\n\
        movl    %eax,(%ebp)\n\
        movl    %ebx,4(%ebp)\n\
        movl    %ecx,8(%ebp)\n\
        movl    %edx,12(%ebp)\n\
        movl    %esi,16(%ebp)\n\
        movl    %edi,20(%ebp)\n\
        popl    %ebp\n\
        xorl    %eax,%eax\n\
        ret");
#endif
#endif
int rb_setjmp (rb_jmp_buf);
#define jmp_buf rb_jmp_buf
#define setjmp rb_setjmp
#endif /* __human68k__ or DJGPP */
#endif /* __GNUC__ */

static int
garbage_collect(void)
{
    struct gc_list *list;
    struct FRAME * volatile frame; /* gcc 2.7.2.3 -O2 bug??  */
    jmp_buf save_regs_gc_mark;
    SET_STACK_END;

    if (!heaps) return Qfalse;
#ifdef HAVE_NATIVETHREAD
    if (!is_ruby_native_thread()) {
        rb_bug("cross-thread violation on rb_gc()");
    }
#endif
    if (dont_gc || during_gc) {
        if (!freelist) {
            add_heap();
        }
        return Qtrue;
    }
    during_gc++;

    init_mark_stack();

    /* mark frame stack */
    for (frame = ruby_frame; frame; frame = frame->prev) {
        rb_gc_mark_frame(frame);
        if (frame->tmp) {
            struct FRAME *tmp = frame->tmp;
            while (tmp) {
                rb_gc_mark_frame(tmp);
                tmp = tmp->prev;
            }
        }
    }
    gc_mark((VALUE)ruby_scope, 0);
    gc_mark((VALUE)ruby_dyna_vars, 0);
    if (finalizer_table) {
        mark_tbl(finalizer_table, 0);
    }

    FLUSH_REGISTER_WINDOWS;
    /* This assumes that all registers are saved into the jmp_buf (and stack) */
    setjmp(save_regs_gc_mark);
    mark_locations_array((VALUE*)save_regs_gc_mark, sizeof(save_regs_gc_mark) / sizeof(VALUE *));
#if STACK_GROW_DIRECTION < 0
    rb_gc_mark_locations((VALUE*)STACK_END, rb_gc_stack_start);
#elif STACK_GROW_DIRECTION > 0
    rb_gc_mark_locations(rb_gc_stack_start, (VALUE*)STACK_END + 1);
#else
    if ((VALUE*)STACK_END < rb_gc_stack_start)
        rb_gc_mark_locations((VALUE*)STACK_END, rb_gc_stack_start);
    else
        rb_gc_mark_locations(rb_gc_stack_start, (VALUE*)STACK_END + 1);
#endif
#ifdef IA64
    /* mark backing store (flushed register stack) */
    /* the basic idea from guile GC code                         */
    rb_gc_mark_locations(rb_gc_register_stack_start, (VALUE*)rb_ia64_bsp());
#endif
#if defined(__human68k__) || defined(__mc68000__)
    rb_gc_mark_locations((VALUE*)((char*)STACK_END + 2),
                         (VALUE*)((char*)rb_gc_stack_start + 2));
#endif
    rb_gc_mark_threads();

    /* mark protected global variables */
    for (list = global_List; list; list = list->next) {
        rb_gc_mark_maybe(*list->varptr);
    }
    rb_mark_end_proc();
    rb_gc_mark_global_tbl();

    rb_mark_tbl(rb_class_tbl);
    rb_gc_mark_trap_list();

    /* mark generic instance variables for special constants */
    rb_mark_generic_ivar_tbl();

    rb_gc_mark_parser();

    /* gc_mark objects whose marking are not completed*/
    do {
        while (!MARK_STACK_EMPTY) {
            if (mark_stack_overflow){
                gc_mark_all();
            }
            else {
                gc_mark_rest();
            }
        }
        rb_gc_abort_threads();
    } while (!MARK_STACK_EMPTY);

    gc_sweep();

    return Qtrue;
}

void
rb_gc(void)
{
    garbage_collect();
    rb_gc_finalize_deferred();
}

/*
 *  call-seq:
 *     GC.start                     => nil
 *     gc.garbage_collect           => nil
 *     ObjectSpace.garbage_collect  => nil
 *
 *  Initiates garbage collection, unless manually disabled.
 *
 */

VALUE
rb_gc_start(void)
{
    rb_gc();
    return Qnil;
}

void
ruby_set_stack_size(size_t size)
{
#ifndef STACK_LEVEL_MAX
    STACK_LEVEL_MAX = size/sizeof(VALUE);
#endif
}

void
Init_stack(VALUE *addr)
{
#ifdef IA64
    if (rb_gc_register_stack_start == 0) {
# if defined(__FreeBSD__)
        /*
         * FreeBSD/ia64 currently does not have a way for a process to get the
         * base address for the RSE backing store, so hardcode it.
         */
        rb_gc_register_stack_start = (4ULL<<61);
# elif defined(HAVE___LIBC_IA64_REGISTER_BACKING_STORE_BASE)
#  pragma weak __libc_ia64_register_backing_store_base
        extern unsigned long __libc_ia64_register_backing_store_base;
        rb_gc_register_stack_start = (VALUE*)__libc_ia64_register_backing_store_base;
# endif
    }
    {
        VALUE *bsp = (VALUE*)rb_ia64_bsp();
        if (rb_gc_register_stack_start == 0 ||
            bsp < rb_gc_register_stack_start) {
            rb_gc_register_stack_start = bsp;
        }
    }
#endif
#if defined(_WIN32) || defined(__CYGWIN__)
    MEMORY_BASIC_INFORMATION m;
    memset(&m, 0, sizeof(m));
    VirtualQuery(&m, &m, sizeof(m));
    rb_gc_stack_start =
        STACK_UPPER((VALUE *)&m, (VALUE *)m.BaseAddress,
                    (VALUE *)((char *)m.BaseAddress + m.RegionSize) - 1);
#elif defined(STACK_END_ADDRESS)
    {
        extern void *STACK_END_ADDRESS;
        rb_gc_stack_start = STACK_END_ADDRESS;
    }
#else
    if (!addr) addr = (VALUE *)&addr;
    STACK_UPPER(&addr, addr, ++addr);
    if (rb_gc_stack_start) {
        if (STACK_UPPER(&addr,
                        rb_gc_stack_start > addr,
                        rb_gc_stack_start < addr))
            rb_gc_stack_start = addr;
        return;
    }
    rb_gc_stack_start = addr;
#endif
#ifdef HAVE_GETRLIMIT
    {
        struct rlimit rlim;

        if (getrlimit(RLIMIT_STACK, &rlim) == 0) {
            unsigned int space = rlim.rlim_cur/5;

            if (space > 1024*1024) space = 1024*1024;
            STACK_LEVEL_MAX = (rlim.rlim_cur - space) / sizeof(VALUE);
        }
    }
#endif
}

void ruby_init_stack(VALUE *addr
#ifdef IA64
    , void *bsp
#endif
    )
{
    if (!rb_gc_stack_start ||
        STACK_UPPER(&addr,
                    rb_gc_stack_start > addr,
                    rb_gc_stack_start < addr)) {
        rb_gc_stack_start = addr;
    }
#ifdef IA64
    if (!rb_gc_register_stack_start ||
        (VALUE*)bsp < rb_gc_register_stack_start) {
        rb_gc_register_stack_start = (VALUE*)bsp;
    }
#endif
#ifdef HAVE_GETRLIMIT
    {
        struct rlimit rlim;

        if (getrlimit(RLIMIT_STACK, &rlim) == 0) {
            unsigned int space = rlim.rlim_cur/5;

            if (space > 1024*1024) space = 1024*1024;
            STACK_LEVEL_MAX = (rlim.rlim_cur - space) / sizeof(VALUE);
        }
    }
#endif
}

/*
 * Document-class: ObjectSpace
 *
 *  The <code>ObjectSpace</code> module contains a number of routines
 *  that interact with the garbage collection facility and allow you to
 *  traverse all living objects with an iterator.
 *
 *  <code>ObjectSpace</code> also provides support for object
 *  finalizers, procs that will be called when a specific object is
 *  about to be destroyed by garbage collection.
 *
 *     include ObjectSpace
 *
 *
 *     a = "A"
 *     b = "B"
 *     c = "C"
 *
 *
 *     define_finalizer(a, proc {|id| puts "Finalizer one on #{id}" })
 *     define_finalizer(a, proc {|id| puts "Finalizer two on #{id}" })
 *     define_finalizer(b, proc {|id| puts "Finalizer three on #{id}" })
 *
 *  <em>produces:</em>
 *
 *     Finalizer three on 537763470
 *     Finalizer one on 537763480
 *     Finalizer two on 537763480
 *
 */

void
Init_heap(void)
{
    if (!rb_gc_stack_start) {
        Init_stack(0);
    }
    add_heap();
}

static VALUE
os_live_obj(void)
{
    int i;
    int n = 0;

    for (i = 0; i < heaps_used; i++) {
        RVALUE *p, *pend;

        p = heaps[i].slot; pend = p + heaps[i].limit;
        for (;p < pend; p++) {
            if (p->as.basic.flags) {
                switch (TYPE(p)) {
                  case T_ICLASS:
                  case T_VARMAP:
                  case T_SCOPE:
                  case T_NODE:
                    continue;
                  case T_CLASS:
                    if (FL_TEST(p, FL_SINGLETON)) continue;
                  default:
                    if (!p->as.basic.klass) continue;
                    rb_yield((VALUE)p);
                    n++;
                }
            }
        }
    }

    return INT2FIX(n);
}

static VALUE
os_obj_of(VALUE of)
{
    int i;
    int n = 0;

    for (i = 0; i < heaps_used; i++) {
        RVALUE *p, *pend;

        p = heaps[i].slot; pend = p + heaps[i].limit;
        for (;p < pend; p++) {
            if (p->as.basic.flags) {
                switch (TYPE(p)) {
                  case T_ICLASS:
                  case T_VARMAP:
                  case T_SCOPE:
                  case T_NODE:
                    continue;
                  case T_CLASS:
                    if (FL_TEST(p, FL_SINGLETON)) continue;
                  default:
                    if (!p->as.basic.klass) continue;
                    if (rb_obj_is_kind_of((VALUE)p, of)) {
                        rb_yield((VALUE)p);
                        n++;
                    }
                }
            }
        }
    }

    return INT2FIX(n);
}

/*
 *  call-seq:
 *     ObjectSpace.each_object([module]) {|obj| ... } => fixnum
 *
 *  Calls the block once for each living, nonimmediate object in this
 *  Ruby process. If <i>module</i> is specified, calls the block
 *  for only those classes or modules that match (or are a subclass of)
 *  <i>module</i>. Returns the number of objects found. Immediate
 *  objects (<code>Fixnum</code>s, <code>Symbol</code>s
 *  <code>true</code>, <code>false</code>, and <code>nil</code>) are
 *  never returned. In the example below, <code>each_object</code>
 *  returns both the numbers we defined and several constants defined in
 *  the <code>Math</code> module.
 *
 *     a = 102.7
 *     b = 95       # Won't be returned
 *     c = 12345678987654321
 *     count = ObjectSpace.each_object(Numeric) {|x| p x }
 *     puts "Total count: #{count}"
 *
 *  <em>produces:</em>
 *
 *     12345678987654321
 *     102.7
 *     2.71828182845905
 *     3.14159265358979
 *     2.22044604925031e-16
 *     1.7976931348623157e+308
 *     2.2250738585072e-308
 *     Total count: 7
 *
 */

static VALUE
os_each_obj(int argc, VALUE *argv)
{
    VALUE of;

    rb_secure(4);
    if (rb_scan_args(argc, argv, "01", &of) == 0) {
        return os_live_obj();
    }
    else {
        return os_obj_of(of);
    }
}

static VALUE finalizers;

/* deprecated
 */

static VALUE
add_final(VALUE os, VALUE block)
{
    rb_warn("ObjectSpace::add_finalizer is deprecated; use define_finalizer");
    if (!rb_respond_to(block, rb_intern("call"))) {
        rb_raise(rb_eArgError, "wrong type argument %s (should be callable)",
                 rb_obj_classname(block));
    }
    rb_ary_push(finalizers, block);
    return block;
}

/*
 * deprecated
 */
static VALUE
rm_final(VALUE os, VALUE block)
{
    rb_warn("ObjectSpace::remove_finalizer is deprecated; use undefine_finalizer");
    rb_ary_delete(finalizers, block);
    return block;
}

/*
 * deprecated
 */
static VALUE
finals(void)
{
    rb_warn("ObjectSpace::finalizers is deprecated");
    return finalizers;
}

/*
 * deprecated
 */

static VALUE
call_final(VALUE os, VALUE obj)
{
    rb_warn("ObjectSpace::call_finalizer is deprecated; use define_finalizer");
    need_call_final = 1;
    FL_SET(obj, FL_FINALIZE);
    return obj;
}

/*
 *  call-seq:
 *     ObjectSpace.undefine_finalizer(obj)
 *
 *  Removes all finalizers for <i>obj</i>.
 *
 */

static VALUE
undefine_final(VALUE os, VALUE obj)
{
    if (finalizer_table) {
        st_delete(finalizer_table, (st_data_t*)&obj, 0);
    }
    return obj;
}

/*
 *  call-seq:
 *     ObjectSpace.define_finalizer(obj, aProc=proc())
 *
 *  Adds <i>aProc</i> as a finalizer, to be called after <i>obj</i>
 *  was destroyed.
 *
 */

static VALUE
define_final(int argc, VALUE *argv, VALUE os)
{
    VALUE obj, block, table;

    rb_scan_args(argc, argv, "11", &obj, &block);
    if (argc == 1) {
        block = rb_block_proc();
    }
    else if (!rb_respond_to(block, rb_intern("call"))) {
        rb_raise(rb_eArgError, "wrong type argument %s (should be callable)",
                 rb_obj_classname(block));
    }
    need_call_final = 1;
    FL_SET(obj, FL_FINALIZE);

    block = rb_ary_new3(2, INT2FIX(ruby_safe_level), block);

    if (!finalizer_table) {
        finalizer_table = st_init_numtable();
    }
    if (st_lookup(finalizer_table, obj, &table)) {
        rb_ary_push(table, block);
    }
    else {
        st_add_direct(finalizer_table, obj, rb_ary_new3(1, block));
    }
    return block;
}

void
rb_gc_copy_finalizer(VALUE dest, VALUE obj)
{
    VALUE table;

    if (!finalizer_table) return;
    if (!FL_TEST(obj, FL_FINALIZE)) return;
    if (st_lookup(finalizer_table, obj, &table)) {
        st_insert(finalizer_table, dest, table);
    }
    FL_SET(dest, FL_FINALIZE);
}

static VALUE
run_single_final(VALUE *args)
{
    rb_eval_cmd(args[0], args[1], (int)args[2]);
    return Qnil;
}

static void
run_final(VALUE obj)
{
    long i;
    int status, critical_save = rb_thread_critical;
    VALUE args[3], table, objid;

    objid = rb_obj_id(obj);     /* make obj into id */
    rb_thread_critical = Qtrue;
    args[1] = 0;
    args[2] = (VALUE)ruby_safe_level;
    for (i=0; i<RARRAY(finalizers)->len; i++) {
        args[0] = RARRAY(finalizers)->ptr[i];
        if (!args[1]) args[1] = rb_ary_new3(1, objid);
        rb_protect((VALUE(*)(VALUE))run_single_final, (VALUE)args, &status);
    }
    if (finalizer_table && st_delete(finalizer_table, (st_data_t*)&obj, &table)) {
        for (i=0; i<RARRAY(table)->len; i++) {
            VALUE final = RARRAY(table)->ptr[i];
            args[0] = RARRAY(final)->ptr[1];
            if (!args[1]) args[1] = rb_ary_new3(1, objid);
            args[2] = FIX2INT(RARRAY(final)->ptr[0]);
            rb_protect((VALUE(*)(VALUE))run_single_final, (VALUE)args, &status);
        }
    }
    rb_thread_critical = critical_save;
}

void
rb_gc_finalize_deferred(void)
{
    RVALUE *p = deferred_final_list;

    deferred_final_list = 0;
    if (p) {
        finalize_list(p);
    }
    free_unused_heaps();
}

void
rb_gc_call_finalizer_at_exit(void)
{
    RVALUE *p, *pend;
    int i;

    /* run finalizers */
    if (need_call_final) {
        p = deferred_final_list;
        deferred_final_list = 0;
        finalize_list(p);
        for (i = 0; i < heaps_used; i++) {
            p = heaps[i].slot; pend = p + heaps[i].limit;
            while (p < pend) {
                if (FL_TEST(p, FL_FINALIZE)) {
                    FL_UNSET(p, FL_FINALIZE);
                    p->as.basic.klass = 0;
                    run_final((VALUE)p);
                }
                p++;
            }
        }
    }
    /* run data object's finalizers */
    for (i = 0; i < heaps_used; i++) {
        p = heaps[i].slot; pend = p + heaps[i].limit;
        while (p < pend) {
            if (BUILTIN_TYPE(p) == T_DATA &&
                DATA_PTR(p) && RANY(p)->as.data.dfree &&
                RANY(p)->as.basic.klass != rb_cThread) {
                p->as.free.flags = 0;
                if ((long)RANY(p)->as.data.dfree == -1) {
                    RUBY_CRITICAL(free(DATA_PTR(p)));
                }
                else if (RANY(p)->as.data.dfree) {
                    (*RANY(p)->as.data.dfree)(DATA_PTR(p));
                }
            }
            else if (BUILTIN_TYPE(p) == T_FILE) {
                if (rb_io_fptr_finalize(RANY(p)->as.file.fptr)) {
                    p->as.free.flags = 0;
                }
            }
            p++;
        }
    }
}

/*
 *  call-seq:
 *     ObjectSpace._id2ref(object_id) -> an_object
 *
 *  Converts an object id to a reference to the object. May not be
 *  called on an object id passed as a parameter to a finalizer.
 *
 *     s = "I am a string"                    #=> "I am a string"
 *     r = ObjectSpace._id2ref(s.object_id)   #=> "I am a string"
 *     r == s                                 #=> true
 *
 */

static VALUE
id2ref(VALUE obj, VALUE id)
{
#if SIZEOF_LONG == SIZEOF_VOIDP
#define NUM2PTR(x) NUM2ULONG(x)
#elif SIZEOF_LONG_LONG == SIZEOF_VOIDP
#define NUM2PTR(x) NUM2ULL(x)
#endif
    VALUE ptr;
    void *p0;

    rb_secure(4);
    ptr = NUM2PTR(id);
    p0 = (void *)ptr;

    if (ptr == Qtrue) return Qtrue;
    if (ptr == Qfalse) return Qfalse;
    if (ptr == Qnil) return Qnil;
    if (FIXNUM_P(ptr)) return (VALUE)ptr;
    if (SYMBOL_P(ptr) && rb_id2name(SYM2ID((VALUE)ptr)) != 0) {
        return (VALUE)ptr;
    }

    ptr = id ^ FIXNUM_FLAG;     /* unset FIXNUM_FLAG */
    if (!is_pointer_to_heap((void *)ptr)|| BUILTIN_TYPE(ptr) >= T_BLOCK) {
        rb_raise(rb_eRangeError, "%p is not id value", p0);
    }
    if (BUILTIN_TYPE(ptr) == 0 || RBASIC(ptr)->klass == 0) {
        rb_raise(rb_eRangeError, "%p is recycled object", p0);
    }
    return (VALUE)ptr;
}

/*
 *  The <code>GC</code> module provides an interface to Ruby's mark and
 *  sweep garbage collection mechanism. Some of the underlying methods
 *  are also available via the <code>ObjectSpace</code> module.
 */

void
Init_GC(void)
{
    VALUE rb_mObSpace;

    rb_mGC = rb_define_module("GC");
    rb_define_singleton_method(rb_mGC, "start", rb_gc_start, 0);
    rb_define_singleton_method(rb_mGC, "enable", rb_gc_enable, 0);
    rb_define_singleton_method(rb_mGC, "disable", rb_gc_disable, 0);
    rb_define_method(rb_mGC, "garbage_collect", rb_gc_start, 0);

    rb_mObSpace = rb_define_module("ObjectSpace");
    rb_define_module_function(rb_mObSpace, "each_object", os_each_obj, -1);
    rb_define_module_function(rb_mObSpace, "garbage_collect", rb_gc_start, 0);
    rb_define_module_function(rb_mObSpace, "add_finalizer", add_final, 1);
    rb_define_module_function(rb_mObSpace, "remove_finalizer", rm_final, 1);
    rb_define_module_function(rb_mObSpace, "finalizers", finals, 0);
    rb_define_module_function(rb_mObSpace, "call_finalizer", call_final, 1);

    rb_define_module_function(rb_mObSpace, "define_finalizer", define_final, -1);
    rb_define_module_function(rb_mObSpace, "undefine_finalizer", undefine_final, 1);

    rb_define_module_function(rb_mObSpace, "_id2ref", id2ref, 1);

    rb_gc_register_address(&rb_mObSpace);
    rb_global_variable(&finalizers);
    rb_gc_unregister_address(&rb_mObSpace);
    finalizers = rb_ary_new();

    source_filenames = st_init_strtable();

    rb_global_variable(&nomem_error);
    nomem_error = rb_exc_new2(rb_eNoMemError, "failed to allocate memory");
}
/* [<][>][^] [v] [top][bottom][index] [help] */


hash.c

root/hash.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. rb_hash_freeze
  2. eql
  3. rb_any_cmp
  4. rb_hash
  5. rb_any_hash
  6. foreach_safe_i
  7. st_foreach_safe
  8. hash_foreach_iter
  9. hash_foreach_ensure
  10. hash_foreach_call
  11. rb_hash_foreach
  12. hash_alloc
  13. rb_hash_new
  14. rb_hash_modify
  15. rb_hash_initialize
  16. rb_hash_s_create
  17. to_hash
  18. rb_hash_rehash_i
  19. rb_hash_rehash
  20. rb_hash_aref
  21. rb_hash_fetch
  22. rb_hash_default
  23. rb_hash_set_default
  24. rb_hash_default_proc
  25. key_i
  26. rb_hash_key
  27. rb_hash_index
  28. rb_hash_delete
  29. shift_i
  30. rb_hash_shift
  31. delete_if_i
  32. rb_hash_delete_if
  33. rb_hash_reject_bang
  34. rb_hash_reject
  35. select_i
  36. rb_hash_values_at
  37. rb_hash_select
  38. clear_i
  39. rb_hash_clear
  40. rb_hash_aset
  41. replace_i
  42. rb_hash_replace
  43. rb_hash_size
  44. rb_hash_empty_p
  45. each_value_i
  46. rb_hash_each_value
  47. each_key_i
  48. rb_hash_each_key
  49. each_pair_i
  50. rb_hash_each_pair
  51. each_i
  52. rb_hash_each
  53. to_a_i
  54. rb_hash_to_a
  55. rb_hash_sort
  56. inspect_i
  57. inspect_hash
  58. rb_hash_inspect
  59. to_s_hash
  60. rb_hash_to_s
  61. rb_hash_to_hash
  62. keys_i
  63. rb_hash_keys
  64. values_i
  65. rb_hash_values
  66. rb_hash_has_key
  67. rb_hash_search_value
  68. rb_hash_has_value
  69. equal_i
  70. hash_equal
  71. rb_hash_equal
  72. rb_hash_invert_i
  73. rb_hash_invert
  74. rb_hash_update_i
  75. rb_hash_update_block_i
  76. rb_hash_update
  77. rb_hash_merge
  78. env_str_new
  79. env_str_new2
  80. env_delete
  81. env_delete_m
  82. rb_f_getenv
  83. env_fetch
  84. path_tainted_p
  85. rb_env_path_tainted
  86. envix
  87. ruby_setenv
  88. ruby_unsetenv
  89. env_aset
  90. env_keys
  91. env_each_key
  92. env_values
  93. env_each_value
  94. env_each_i
  95. env_each
  96. env_each_pair
  97. env_reject_bang
  98. env_delete_if
  99. env_values_at
  100. env_select
  101. env_clear
  102. env_to_s
  103. env_inspect
  104. env_to_a
  105. env_none
  106. env_size
  107. env_empty_p
  108. env_has_key
  109. env_has_value
  110. env_key
  111. env_index
  112. env_to_hash
  113. env_reject
  114. env_shift
  115. env_invert
  116. env_replace_i
  117. env_replace
  118. env_update_i
  119. env_update
  120. Init_Hash
/**********************************************************************

  hash.c -

  $Author: ocean $
  $Date: 2005/10/20 02:56:22 $
  created at: Mon Nov 22 18:51:18 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto
  Copyright (C) 2000  Network Applied Communication Laboratory, Inc.
  Copyright (C) 2000  Information-technology Promotion Agency, Japan

**********************************************************************/

#include "ruby.h"
#include "st.h"
#include "util.h"
#include "rubysig.h"

#ifdef __APPLE__
#include <crt_externs.h>
#endif

#define HASH_DELETED  FL_USER1
#define HASH_PROC_DEFAULT FL_USER2

VALUE
rb_hash_freeze(VALUE hash)
{
    return rb_obj_freeze(hash);
}

VALUE rb_cHash;

static VALUE envtbl;
static ID id_hash, id_call, id_default;

static VALUE
eql(VALUE *args)
{
    return (VALUE)rb_eql(args[0], args[1]);
}

static int
rb_any_cmp(VALUE a, VALUE b)
{
    VALUE args[2];

    if (a == b) return 0;
    if (FIXNUM_P(a) && FIXNUM_P(b)) {
        return a != b;
    }
    if (TYPE(a) == T_STRING && RBASIC(a)->klass == rb_cString &&
        TYPE(b) == T_STRING && RBASIC(b)->klass == rb_cString) {
        return rb_str_cmp(a, b);
    }
    if (a == Qundef || b == Qundef) return -1;
    if (SYMBOL_P(a) && SYMBOL_P(b)) {
        return a != b;
    }

    args[0] = a;
    args[1] = b;
    return !rb_with_disable_interrupt(eql, (VALUE)args);
}

VALUE
rb_hash(VALUE obj)
{
    return rb_funcall(obj, id_hash, 0);
}

static int
rb_any_hash(VALUE a)
{
    VALUE hval;

    switch (TYPE(a)) {
      case T_FIXNUM:
      case T_SYMBOL:
        return (int)a;
        break;

      case T_STRING:
        return rb_str_hash(a);
        break;

      default:
        hval = rb_funcall(a, id_hash, 0);
        if (!FIXNUM_P(hval)) {
            hval = rb_funcall(hval, '%', 1, INT2FIX(536870923));
        }
        return (int)FIX2LONG(hval);
    }
}

static struct st_hash_type objhash = {
    rb_any_cmp,
    rb_any_hash,
};

struct foreach_safe_arg {
    st_table *tbl;
    int (*func)();
    st_data_t arg;
};

static int
foreach_safe_i(st_data_t key, st_data_t value, struct foreach_safe_arg *arg)
{
    int status;

    if (key == Qundef) return ST_CONTINUE;
    status = (*arg->func)(key, value, arg->arg);
    if (status == ST_CONTINUE) {
        return ST_CHECK;
    }
    return status;
}

void
st_foreach_safe(st_table *table, int (*func)(ANYARGS), st_data_t a)
{
    struct foreach_safe_arg arg;

    arg.tbl = table;
    arg.func = func;
    arg.arg = a;
    if (st_foreach(table, foreach_safe_i, (st_data_t)&arg)) {
        rb_raise(rb_eRuntimeError, "hash modified during iteration");
    }
}

struct hash_foreach_arg {
    VALUE hash;
    int (*func)();
    VALUE arg;
};

static int
hash_foreach_iter(VALUE key, VALUE value, struct hash_foreach_arg *arg)
{
    int status;
    st_table *tbl;

    tbl = RHASH(arg->hash)->tbl;
    if (key == Qundef) return ST_CONTINUE;
    status = (*arg->func)(key, value, arg->arg);
    if (RHASH(arg->hash)->tbl != tbl) {
        rb_raise(rb_eRuntimeError, "rehash occurred during iteration");
    }
    switch (status) {
      case ST_DELETE:
        st_delete_safe(tbl, (st_data_t*)&key, 0, Qundef);
        FL_SET(arg->hash, HASH_DELETED);
      case ST_CONTINUE:
        break;
      case ST_STOP:
        return ST_STOP;
    }
    return ST_CHECK;
}

static VALUE
hash_foreach_ensure(VALUE hash)
{
    RHASH(hash)->iter_lev--;

    if (RHASH(hash)->iter_lev == 0) {
        if (FL_TEST(hash, HASH_DELETED)) {
            st_cleanup_safe(RHASH(hash)->tbl, Qundef);
            FL_UNSET(hash, HASH_DELETED);
        }
    }
    return 0;
}

static VALUE
hash_foreach_call(struct hash_foreach_arg *arg)
{
    if (st_foreach(RHASH(arg->hash)->tbl, hash_foreach_iter, (st_data_t)arg)) {
        rb_raise(rb_eRuntimeError, "hash modified during iteration");
    }
    return Qnil;
}

void
rb_hash_foreach(VALUE hash, int (*func)(ANYARGS), VALUE farg)
{
    struct hash_foreach_arg arg;

    RHASH(hash)->iter_lev++;
    arg.hash = hash;
    arg.func = func;
    arg.arg  = farg;
    rb_ensure(hash_foreach_call, (VALUE)&arg, hash_foreach_ensure, hash);
}

static VALUE hash_alloc(VALUE);

static VALUE
hash_alloc(VALUE klass)
{
    NEWOBJ(hash, struct RHash);
    OBJSETUP(hash, klass, T_HASH);

    hash->ifnone = Qnil;
    hash->tbl = st_init_table(&objhash);

    return (VALUE)hash;
}

VALUE
rb_hash_new(void)
{
    return hash_alloc(rb_cHash);
}

static void
rb_hash_modify(VALUE hash)
{
    if (!RHASH(hash)->tbl) rb_raise(rb_eTypeError, "uninitialized Hash");
    if (OBJ_FROZEN(hash)) rb_error_frozen("hash");
    if (!OBJ_TAINTED(hash) && rb_safe_level() >= 4)
        rb_raise(rb_eSecurityError, "Insecure: can't modify hash");
}

/*
 *  call-seq:
 *     Hash.new                          => hash
 *     Hash.new(obj)                     => aHash
 *     Hash.new {|hash, key| block }     => aHash
 *
 *  Returns a new, empty hash. If this hash is subsequently accessed by
 *  a key that doesn't correspond to a hash entry, the value returned
 *  depends on the style of <code>new</code> used to create the hash. In
 *  the first form, the access returns <code>nil</code>. If
 *  <i>obj</i> is specified, this single object will be used for
 *  all <em>default values</em>. If a block is specified, it will be
 *  called with the hash object and the key, and should return the
 *  default value. It is the block's responsibility to store the value
 *  in the hash if required.
 *
 *     h = Hash.new("Go Fish")
 *     h["a"] = 100
 *     h["b"] = 200
 *     h["a"]           #=> 100
 *     h["c"]           #=> "Go Fish"
 *     # The following alters the single default object
 *     h["c"].upcase!   #=> "GO FISH"
 *     h["d"]           #=> "GO FISH"
 *     h.keys           #=> ["a", "b"]
 *
 *     # While this creates a new default object each time
 *     h = Hash.new { |hash, key| hash[key] = "Go Fish: #{key}" }
 *     h["c"]           #=> "Go Fish: c"
 *     h["c"].upcase!   #=> "GO FISH: C"
 *     h["d"]           #=> "Go Fish: d"
 *     h.keys           #=> ["c", "d"]
 *
 */

static VALUE
rb_hash_initialize(int argc, VALUE *argv, VALUE hash)
{
    VALUE ifnone;

    rb_hash_modify(hash);
    if (rb_block_given_p()) {
        if (argc > 0) {
            rb_raise(rb_eArgError, "wrong number of arguments");
        }
        RHASH(hash)->ifnone = rb_block_proc();
        FL_SET(hash, HASH_PROC_DEFAULT);
    }
    else {
        rb_scan_args(argc, argv, "01", &ifnone);
        RHASH(hash)->ifnone = ifnone;
    }

    return hash;
}

/*
 *  call-seq:
 *     Hash[ [key =>|, value]* ]   => hash
 *
 *  Creates a new hash populated with the given objects. Equivalent to
 *  the literal <code>{ <i>key</i>, <i>value</i>, ... }</code>. Keys and
 *  values occur in pairs, so there must be an even number of arguments.
 *
 *     Hash["a", 100, "b", 200]       #=> {"a"=>100, "b"=>200}
 *     Hash["a" => 100, "b" => 200]   #=> {"a"=>100, "b"=>200}
 *     { "a" => 100, "b" => 200 }     #=> {"a"=>100, "b"=>200}
 */

static VALUE
rb_hash_s_create(int argc, VALUE *argv, VALUE klass)
{
    VALUE hash;
    int i;

    if (argc == 1 && TYPE(argv[0]) == T_HASH) {
        hash = hash_alloc(klass);

        RHASH(hash)->ifnone = Qnil;
        RHASH(hash)->tbl = st_copy(RHASH(argv[0])->tbl);

        return hash;
    }

    if (argc % 2 != 0) {
        rb_raise(rb_eArgError, "odd number of arguments for Hash");
    }

    hash = hash_alloc(klass);
    for (i=0; i<argc; i+=2) {
        rb_hash_aset(hash, argv[i], argv[i + 1]);
    }

    return hash;
}

static VALUE
to_hash(VALUE hash)
{
    return rb_convert_type(hash, T_HASH, "Hash", "to_hash");
}

static int
rb_hash_rehash_i(VALUE key, VALUE value, st_table *tbl)
{
    if (key != Qundef) st_insert(tbl, key, value);
    return ST_CONTINUE;
}

/*
 *  call-seq:
 *     hsh.rehash -> hsh
 *
 *  Rebuilds the hash based on the current hash values for each key. If
 *  values of key objects have changed since they were inserted, this
 *  method will reindex <i>hsh</i>. If <code>Hash#rehash</code> is
 *  called while an iterator is traversing the hash, an
 *  <code>RuntimeError</code> will be raised in the iterator.
 *
 *     a = [ "a", "b" ]
 *     c = [ "c", "d" ]
 *     h = { a => 100, c => 300 }
 *     h[a]       #=> 100
 *     a[0] = "z"
 *     h[a]       #=> nil
 *     h.rehash   #=> {["z", "b"]=>100, ["c", "d"]=>300}
 *     h[a]       #=> 100
 */

static VALUE
rb_hash_rehash(VALUE hash)
{
    st_table *tbl;

    if (RHASH(hash)->iter_lev > 0) {
        rb_raise(rb_eRuntimeError, "rehash during iteration");
    }
    rb_hash_modify(hash);
    tbl = st_init_table_with_size(&objhash, RHASH(hash)->tbl->num_entries);
    rb_hash_foreach(hash, rb_hash_rehash_i, (st_data_t)tbl);
    st_free_table(RHASH(hash)->tbl);
    RHASH(hash)->tbl = tbl;

    return hash;
}

/*
 *  call-seq:
 *     hsh[key]    =>  value
 *
 *  Element Reference---Retrieves the <i>value</i> object corresponding
 *  to the <i>key</i> object. If not found, returns the a default value (see
 *  <code>Hash::new</code> for details).
 *
 *     h = { "a" => 100, "b" => 200 }
 *     h["a"]   #=> 100
 *     h["c"]   #=> nil
 *
 */

VALUE
rb_hash_aref(VALUE hash, VALUE key)
{
    VALUE val;

    if (!st_lookup(RHASH(hash)->tbl, key, &val)) {
        return rb_funcall(hash, id_default, 1, key);
    }
    return val;
}

/*
 *  call-seq:
 *     hsh.fetch(key [, default] )       => obj
 *     hsh.fetch(key) {| key | block }   => obj
 *
 *  Returns a value from the hash for the given key. If the key can't be
 *  found, there are several options: With no other arguments, it will
 *  raise an <code>KeyError</code> exception; if <i>default</i> is
 *  given, then that will be returned; if the optional code block is
 *  specified, then that will be run and its result returned.
 *
 *     h = { "a" => 100, "b" => 200 }
 *     h.fetch("a")                            #=> 100
 *     h.fetch("z", "go fish")                 #=> "go fish"
 *     h.fetch("z") { |el| "go fish, #{el}"}   #=> "go fish, z"
 *
 *  The following example shows that an exception is raised if the key
 *  is not found and a default value is not supplied.
 *
 *     h = { "a" => 100, "b" => 200 }
 *     h.fetch("z")
 *
 *  <em>produces:</em>
 *
 *     prog.rb:2:in `fetch': key not found (KeyError)
 *      from prog.rb:2
 *
 */

static VALUE
rb_hash_fetch(int argc, VALUE *argv, VALUE hash)
{
    VALUE key, if_none;
    VALUE val;
    long block_given;

    rb_scan_args(argc, argv, "11", &key, &if_none);

    block_given = rb_block_given_p();
    if (block_given && argc == 2) {
        rb_warn("block supersedes default value argument");
    }
    if (!st_lookup(RHASH(hash)->tbl, key, &val)) {
        if (block_given) return rb_yield(key);
        if (argc == 1) {
            rb_raise(rb_eKeyError, "key not found");
        }
        return if_none;
    }
    return val;
}

/*
 *  call-seq:
 *     hsh.default(key=nil)   => obj
 *
 *  Returns the default value, the value that would be returned by
 *  <i>hsh</i>[<i>key</i>] if <i>key</i> did not exist in <i>hsh</i>.
 *  See also <code>Hash::new</code> and <code>Hash#default=</code>.
 *
 *     h = Hash.new                            #=> {}
 *     h.default                               #=> nil
 *     h.default(2)                            #=> nil
 *
 *     h = Hash.new("cat")                     #=> {}
 *     h.default                               #=> "cat"
 *     h.default(2)                            #=> "cat"
 *
 *     h = Hash.new {|h,k| h[k] = k.to_i*10}   #=> {}
 *     h.default                               #=> 0
 *     h.default(2)                            #=> 20
 */

static VALUE
rb_hash_default(int argc, VALUE *argv, VALUE hash)
{
    VALUE key;

    rb_scan_args(argc, argv, "01", &key);
    if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
        return rb_funcall(RHASH(hash)->ifnone, id_call, 2, hash, key);
    }
    return RHASH(hash)->ifnone;
}

/*
 *  call-seq:
 *     hsh.default = obj     => hsh
 *
 *  Sets the default value, the value returned for a key that does not
 *  exist in the hash. It is not possible to set the a default to a
 *  <code>Proc</code> that will be executed on each key lookup.
 *
 *     h = { "a" => 100, "b" => 200 }
 *     h.default = "Go fish"
 *     h["a"]     #=> 100
 *     h["z"]     #=> "Go fish"
 *     # This doesn't do what you might hope...
 *     h.default = proc do |hash, key|
 *       hash[key] = key + key
 *     end
 *     h[2]       #=> #<Proc:0x401b3948@-:6>
 *     h["cat"]   #=> #<Proc:0x401b3948@-:6>
 */

static VALUE
rb_hash_set_default(VALUE hash, VALUE ifnone)
{
    rb_hash_modify(hash);
    RHASH(hash)->ifnone = ifnone;
    FL_UNSET(hash, HASH_PROC_DEFAULT);
    return ifnone;
}

/*
 *  call-seq:
 *     hsh.default_proc -> anObject
 *
 *  If <code>Hash::new</code> was invoked with a block, return that
 *  block, otherwise return <code>nil</code>.
 *
 *     h = Hash.new {|h,k| h[k] = k*k }   #=> {}
 *     p = h.default_proc                 #=> #<Proc:0x401b3d08@-:1>
 *     a = []                             #=> []
 *     p.call(a, 2)
 *     a                                  #=> [nil, nil, 4]
 */

static VALUE
rb_hash_default_proc(VALUE hash)
{
    if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
        return RHASH(hash)->ifnone;
    }
    return Qnil;
}

static int
key_i(VALUE key, VALUE value, VALUE *args)
{
    if (rb_equal(value, args[0])) {
        args[1] = key;
        return ST_STOP;
    }
    return ST_CONTINUE;
}

/*
 *  call-seq:
 *     hsh.key(value)    => key
 *
 *  Returns the key for a given value. If not found, returns <code>nil</code>.
 *
 *     h = { "a" => 100, "b" => 200 }
 *     h.key(200)   #=> "b"
 *     h.key(999)   #=> nil
 *
 */

static VALUE
rb_hash_key(VALUE hash, VALUE value)
{
    VALUE args[2];

    args[0] = value;
    args[1] = Qnil;

    rb_hash_foreach(hash, key_i, (st_data_t)args);

    return args[1];
}

/* :nodoc: */
static VALUE
rb_hash_index(VALUE hash, VALUE value)
{
    rb_warn("Hash#index is deprecated; use Hash#key");
    return rb_hash_key(hash, value);
}

/*
 *  call-seq:
 *     hsh.delete(key)                   => value
 *     hsh.delete(key) {| key | block }  => value
 *
 *  Deletes and returns a key-value pair from <i>hsh</i> whose key is
 *  equal to <i>key</i>. If the key is not found, returns the
 *  <em>default value</em>. If the optional code block is given and the
 *  key is not found, pass in the key and return the result of
 *  <i>block</i>.
 *
 *     h = { "a" => 100, "b" => 200 }
 *     h.delete("a")                              #=> 100
 *     h.delete("z")                              #=> nil
 *     h.delete("z") { |el| "#{el} not found" }   #=> "z not found"
 *
 */

VALUE
rb_hash_delete(VALUE hash, VALUE key)
{
    VALUE val;

    rb_hash_modify(hash);
    if (RHASH(hash)->iter_lev > 0) {
        if (st_delete_safe(RHASH(hash)->tbl, (st_data_t*)&key, &val, Qundef)) {
            FL_SET(hash, HASH_DELETED);
            return val;
        }
    }
    else if (st_delete(RHASH(hash)->tbl, (st_data_t*)&key, &val))
        return val;
    if (rb_block_given_p()) {
        return rb_yield(key);
    }
    return Qnil;
}

struct shift_var {
    int stop;
    VALUE key;
    VALUE val;
};

static int
shift_i(VALUE key, VALUE value, struct shift_var *var)
{
    if (key == Qundef) return ST_CONTINUE;
    if (var->stop) return ST_STOP;
    var->stop = 1;
    var->key = key;
    var->val = value;
    return ST_DELETE;
}

/*
 *  call-seq:
 *     hsh.shift -> anArray or obj
 *
 *  Removes a key-value pair from <i>hsh</i> and returns it as the
 *  two-item array <code>[</code> <i>key, value</i> <code>]</code>, or
 *  the hash's default value if the hash is empty.
 *
 *     h = { 1 => "a", 2 => "b", 3 => "c" }
 *     h.shift   #=> [1, "a"]
 *     h         #=> {2=>"b", 3=>"c"}
 */

static VALUE
rb_hash_shift(VALUE hash)
{
    struct shift_var var;

    rb_hash_modify(hash);
    var.stop = 0;
    rb_hash_foreach(hash, shift_i, (st_data_t)&var);

    if (var.stop) {
        return rb_assoc_new(var.key, var.val);
    }
    else if (FL_TEST(hash, HASH_PROC_DEFAULT)) {
        return rb_funcall(RHASH(hash)->ifnone, id_call, 2, hash, Qnil);
    }
    else {
        return RHASH(hash)->ifnone;
    }
}

static int
delete_if_i(VALUE key, VALUE value, VALUE hash)
{
    if (key == Qundef) return ST_CONTINUE;
    if (RTEST(rb_yield_values(2, key, value))) {
        rb_hash_delete(hash, key);
    }
    return ST_CONTINUE;
}

/*
 *  call-seq:
 *     hsh.delete_if {| key, value | block }  -> hsh
 *
 *  Deletes every key-value pair from <i>hsh</i> for which <i>block</i>
 *  evaluates to <code>true</code>.
 *
 *     h = { "a" => 100, "b" => 200, "c" => 300 }
 *     h.delete_if {|key, value| key >= "b" }   #=> {"a"=>100}
 *
 */

VALUE
rb_hash_delete_if(VALUE hash)
{
    rb_hash_modify(hash);
    rb_hash_foreach(hash, delete_if_i, hash);
    return hash;
}

/*
 *  call-seq:
 *     hsh.reject! {| key, value | block }  -> hsh or nil
 *
 *  Equivalent to <code>Hash#delete_if</code>, but returns
 *  <code>nil</code> if no changes were made.
 */

VALUE
rb_hash_reject_bang(VALUE hash)
{
    int n = RHASH(hash)->tbl->num_entries;
    rb_hash_delete_if(hash);
    if (n == RHASH(hash)->tbl->num_entries) return Qnil;
    return hash;
}

/*
 *  call-seq:
 *     hsh.reject {| key, value | block }  -> a_hash
 *
 *  Same as <code>Hash#delete_if</code>, but works on (and returns) a
 *  copy of the <i>hsh</i>. Equivalent to
 *  <code><i>hsh</i>.dup.delete_if</code>.
 *
 */

static VALUE
rb_hash_reject(VALUE hash)
{
    return rb_hash_delete_if(rb_obj_dup(hash));
}

static int
select_i(VALUE key, VALUE value, VALUE result)
{
    if (key == Qundef) return ST_CONTINUE;
    if (RTEST(rb_yield_values(2, key, value)))
        rb_ary_push(result, rb_assoc_new(key, value));
    return ST_CONTINUE;
}

/*
 * call-seq:
 *   hsh.values_at(key, ...)   => array
 *
 * Return an array containing the values associated with the given keys.
 * Also see <code>Hash.select</code>.
 *
 *   h = { "cat" => "feline", "dog" => "canine", "cow" => "bovine" }
 *   h.values_at("cow", "cat")  #=> ["bovine", "feline"]
*/

VALUE
rb_hash_values_at(int argc, VALUE *argv, VALUE hash)
{
    VALUE result = rb_ary_new2(argc);
    long i;

    for (i=0; i<argc; i++) {
        rb_ary_push(result, rb_hash_aref(hash, argv[i]));
    }
    return result;
}

/*
 *  call-seq:
 *     hsh.select {|key, value| block}   => array
 *
 *  Returns a new array consisting of <code>[key,value]</code>
 *  pairs for which the block returns true.
 *  Also see <code>Hash.values_at</code>.
 *
 *     h = { "a" => 100, "b" => 200, "c" => 300 }
 *     h.select {|k,v| k > "a"}  #=> [["b", 200], ["c", 300]]
 *     h.select {|k,v| v < 200}  #=> [["a", 100]]
 */

VALUE
rb_hash_select(VALUE hash)
{
    VALUE result;

    RETURN_ENUMERATOR(hash, 0, 0);
    result = rb_ary_new();
    rb_hash_foreach(hash, select_i, result);
    return result;
}

static int
clear_i(VALUE key, VALUE value, VALUE dummy)
{
    return ST_DELETE;
}

/*
 *  call-seq:
 *     hsh.clear -> hsh
 *
 *  Removes all key-value pairs from <i>hsh</i>.
 *
 *     h = { "a" => 100, "b" => 200 }   #=> {"a"=>100, "b"=>200}
 *     h.clear                          #=> {}
 *
 */

static VALUE
rb_hash_clear(VALUE hash)
{
    rb_hash_modify(hash);
    if (RHASH(hash)->tbl->num_entries > 0) {
        rb_hash_foreach(hash, clear_i, 0);
    }

    return hash;
}

/*
 *  call-seq:
 *     hsh[key] = value        => value
 *     hsh.store(key, value)   => value
 *
 *  Element Assignment---Associates the value given by
 *  <i>value</i> with the key given by <i>key</i>.
 *  <i>key</i> should not have its value changed while it is in
 *  use as a key (a <code>String</code> passed as a key will be
 *  duplicated and frozen).
 *
 *     h = { "a" => 100, "b" => 200 }
 *     h["a"] = 9
 *     h["c"] = 4
 *     h   #=> {"a"=>9, "b"=>200, "c"=>4}
 *
 */

VALUE
rb_hash_aset(VALUE hash, VALUE key, VALUE val)
{
    rb_hash_modify(hash);
    if (TYPE(key) != T_STRING || st_lookup(RHASH(hash)->tbl, key, 0)) {
        st_insert(RHASH(hash)->tbl, key, val);
    }
    else {
        st_add_direct(RHASH(hash)->tbl, rb_str_new4(key), val);
    }
    return val;
}

static int
replace_i(VALUE key, VALUE val, VALUE hash)
{
    if (key != Qundef) {
        rb_hash_aset(hash, key, val);
    }

    return ST_CONTINUE;
}

/*
 *  call-seq:
 *     hsh.replace(other_hash) -> hsh
 *
 *  Replaces the contents of <i>hsh</i> with the contents of
 *  <i>other_hash</i>.
 *
 *     h = { "a" => 100, "b" => 200 }
 *     h.replace({ "c" => 300, "d" => 400 })   #=> {"c"=>300, "d"=>400}
 *
 */

static VALUE
rb_hash_replace(VALUE hash, VALUE hash2)
{
    hash2 = to_hash(hash2);
    if (hash == hash2) return hash;
    rb_hash_clear(hash);
    rb_hash_foreach(hash2, replace_i, hash);
    RHASH(hash)->ifnone = RHASH(hash2)->ifnone;
    if (FL_TEST(hash2, HASH_PROC_DEFAULT)) {
        FL_SET(hash, HASH_PROC_DEFAULT);
    }
    else {
        FL_UNSET(hash, HASH_PROC_DEFAULT);
    }

    return hash;
}

/*
 *  call-seq:
 *     hsh.length    =>  fixnum
 *     hsh.size      =>  fixnum
 *
 *  Returns the number of key-value pairs in the hash.
 *
 *     h = { "d" => 100, "a" => 200, "v" => 300, "e" => 400 }
 *     h.length        #=> 4
 *     h.delete("a")   #=> 200
 *     h.length        #=> 3
 */

static VALUE
rb_hash_size(VALUE hash)
{
    return INT2FIX(RHASH(hash)->tbl->num_entries);
}

/*
 *  call-seq:
 *     hsh.empty?    => true or false
 *
 *  Returns <code>true</code> if <i>hsh</i> contains no key-value pairs.
 *
 *     {}.empty?   #=> true
 *
 */

static VALUE
rb_hash_empty_p(VALUE hash)
{
    if (RHASH(hash)->tbl->num_entries == 0)
        return Qtrue;
    return Qfalse;
}

static int
each_value_i(VALUE key, VALUE value)
{
    if (key == Qundef) return ST_CONTINUE;
    rb_yield(value);
    return ST_CONTINUE;
}

/*
 *  call-seq:
 *     hsh.each_value {| value | block } -> hsh
 *
 *  Calls <i>block</i> once for each key in <i>hsh</i>, passing the
 *  value as a parameter.
 *
 *     h = { "a" => 100, "b" => 200 }
 *     h.each_value {|value| puts value }
 *
 *  <em>produces:</em>
 *
 *     100
 *     200
 */

static VALUE
rb_hash_each_value(VALUE hash)
{
    RETURN_ENUMERATOR(hash, 0, 0);
    rb_hash_foreach(hash, each_value_i, 0);
    return hash;
}

static int
each_key_i(VALUE key, VALUE value)
{
    if (key == Qundef) return ST_CONTINUE;
    rb_yield(key);
    return ST_CONTINUE;
}

/*
 *  call-seq:
 *     hsh.each_key {| key | block } -> hsh
 *
 *  Calls <i>block</i> once for each key in <i>hsh</i>, passing the key
 *  as a parameter.
 *
 *     h = { "a" => 100, "b" => 200 }
 *     h.each_key {|key| puts key }
 *
 *  <em>produces:</em>
 *
 *     a
 *     b
 */
static VALUE
rb_hash_each_key(VALUE hash)
{
    RETURN_ENUMERATOR(hash, 0, 0);
    rb_hash_foreach(hash, each_key_i, 0);
    return hash;
}

static int
each_pair_i(VALUE key, VALUE value)
{
    if (key == Qundef) return ST_CONTINUE;
    rb_yield_values(2, key, value);
    return ST_CONTINUE;
}

/*
 *  call-seq:
 *     hsh.each_pair {| key_value_array | block } -> hsh
 *
 *  Calls <i>block</i> once for each key in <i>hsh</i>, passing the key
 *  and value as parameters.
 *
 *     h = { "a" => 100, "b" => 200 }
 *     h.each_pair {|key, value| puts "#{key} is #{value}" }
 *
 *  <em>produces:</em>
 *
 *     a is 100
 *     b is 200
 *
 */

static VALUE
rb_hash_each_pair(VALUE hash)
{
    RETURN_ENUMERATOR(hash, 0, 0);
    rb_hash_foreach(hash, each_pair_i, 0);
    return hash;
}

static int
each_i(VALUE key, VALUE value)
{
    if (key == Qundef) return ST_CONTINUE;
    rb_yield(rb_assoc_new(key, value));
    return ST_CONTINUE;
}

/*
 *  call-seq:
 *     hsh.each {| key, value | block } -> hsh
 *
 *  Calls <i>block</i> once for each key in <i>hsh</i>, passing the key
 *  and value to the block as a two-element array. Because of the assignment
 *  semantics of block parameters, these elements will be split out if the
 *  block has two formal parameters. Also see <code>Hash.each_pair</code>, which
 *  will be marginally more efficient for blocks with two parameters.
 *
 *     h = { "a" => 100, "b" => 200 }
 *     h.each {|key, value| puts "#{key} is #{value}" }
 *
 *  <em>produces:</em>
 *
 *     a is 100
 *     b is 200
 *
 */

static VALUE
rb_hash_each(VALUE hash)
{
    RETURN_ENUMERATOR(hash, 0, 0);
    rb_hash_foreach(hash, each_i, 0);
    return hash;
}

static int
to_a_i(VALUE key, VALUE value, VALUE ary)
{
    if (key == Qundef) return ST_CONTINUE;
    rb_ary_push(ary, rb_assoc_new(key, value));
    return ST_CONTINUE;
}

/*
 *  call-seq:
 *     hsh.to_a -> array
 *
 *  Converts <i>hsh</i> to a nested array of <code>[</code> <i>key,
 *  value</i> <code>]</code> arrays.
 *
 *     h = { "c" => 300, "a" => 100, "d" => 400, "c" => 300  }
 *     h.to_a   #=> [["a", 100], ["c", 300], ["d", 400]]
 */

static VALUE
rb_hash_to_a(VALUE hash)
{
    VALUE ary;

    ary = rb_ary_new();
    rb_hash_foreach(hash, to_a_i, ary);
    if (OBJ_TAINTED(hash)) OBJ_TAINT(ary);

    return ary;
}

/*
 *  call-seq:
 *     hsh.sort                    => array
 *     hsh.sort {| a, b | block }  => array
 *
 *  Converts <i>hsh</i> to a nested array of <code>[</code> <i>key,
 *  value</i> <code>]</code> arrays and sorts it, using
 *  <code>Array#sort</code>.
 *
 *     h = { "a" => 20, "b" => 30, "c" => 10  }
 *     h.sort                       #=> [["a", 20], ["b", 30], ["c", 10]]
 *     h.sort {|a,b| a[1]<=>b[1]}   #=> [["c", 10], ["a", 20], ["b", 30]]
 *
 */

static VALUE
rb_hash_sort(VALUE hash)
{
    VALUE entries = rb_hash_to_a(hash);
    rb_ary_sort_bang(entries);
    return entries;
}

static int
inspect_i(VALUE key, VALUE value, VALUE str)
{
    VALUE str2;

    if (key == Qundef) return ST_CONTINUE;
    if (RSTRING(str)->len > 1) {
        rb_str_cat2(str, ", ");
    }
    str2 = rb_inspect(key);
    rb_str_buf_append(str, str2);
    OBJ_INFECT(str, str2);
    rb_str_buf_cat2(str, "=>");
    str2 = rb_inspect(value);
    rb_str_buf_append(str, str2);
    OBJ_INFECT(str, str2);

    return ST_CONTINUE;
}

static VALUE
inspect_hash(VALUE hash, VALUE dummy, int recur)
{
    VALUE str;

    if (recur) return rb_str_new2("{...}");
    str = rb_str_buf_new2("{");
    rb_hash_foreach(hash, inspect_i, str);
    rb_str_buf_cat2(str, "}");
    OBJ_INFECT(str, hash);

    return str;
}

/*
 * call-seq:
 *   hsh.inspect  => string
 *
 * Return the contents of this hash as a string.
 */

static VALUE
rb_hash_inspect(VALUE hash)
{
    if (RHASH(hash)->tbl == 0 || RHASH(hash)->tbl->num_entries == 0)
        return rb_str_new2("{}");
    return rb_exec_recursive(inspect_hash, hash, 0);
}

static VALUE
to_s_hash(VALUE hash, VALUE dummy, int recur)
{
    if (recur) return rb_str_new2("{...}");
    return rb_ary_to_s(rb_hash_to_a(hash));
}

/*
 *  call-seq:
 *     hsh.to_s   => string
 *
 *  Converts <i>hsh</i> to a string by converting the hash to an array
 *  of <code>[</code> <i>key, value</i> <code>]</code> pairs and then
 *  converting that array to a string using <code>Array#join</code> with
 *  the default separator.
 *
 *     h = { "c" => 300, "a" => 100, "d" => 400, "c" => 300  }
 *     h.to_s   #=> "a100c300d400"
 */

static VALUE
rb_hash_to_s(VALUE hash)
{
    return rb_exec_recursive(to_s_hash, hash, 0);
}

/*
 * call-seq:
 *    hsh.to_hash   => hsh
 *
 * Returns <i>self</i>.
 */

static VALUE
rb_hash_to_hash(VALUE hash)
{
    return hash;
}

static int
keys_i(VALUE key, VALUE value, VALUE ary)
{
    if (key == Qundef) return ST_CONTINUE;
    rb_ary_push(ary, key);
    return ST_CONTINUE;
}

/*
 *  call-seq:
 *     hsh.keys    => array
 *
 *  Returns a new array populated with the keys from this hash. See also
 *  <code>Hash#values</code>.
 *
 *     h = { "a" => 100, "b" => 200, "c" => 300, "d" => 400 }
 *     h.keys   #=> ["a", "b", "c", "d"]
 *
 */

static VALUE
rb_hash_keys(VALUE hash)
{
    VALUE ary;

    ary = rb_ary_new();
    rb_hash_foreach(hash, keys_i, ary);

    return ary;
}

static int
values_i(VALUE key, VALUE value, VALUE ary)
{
    if (key == Qundef) return ST_CONTINUE;
    rb_ary_push(ary, value);
    return ST_CONTINUE;
}

/*
 *  call-seq:
 *     hsh.values    => array
 *
 *  Returns a new array populated with the values from <i>hsh</i>. See
 *  also <code>Hash#keys</code>.
 *
 *     h = { "a" => 100, "b" => 200, "c" => 300 }
 *     h.values   #=> [100, 200, 300]
 *
 */

static VALUE
rb_hash_values(VALUE hash)
{
    VALUE ary;

    ary = rb_ary_new();
    rb_hash_foreach(hash, values_i, ary);

    return ary;
}

/*
 *  call-seq:
 *     hsh.has_key?(key)    => true or false
 *     hsh.include?(key)    => true or false
 *     hsh.key?(key)        => true or false
 *     hsh.member?(key)     => true or false
 *
 *  Returns <code>true</code> if the given key is present in <i>hsh</i>.
 *
 *     h = { "a" => 100, "b" => 200 }
 *     h.has_key?("a")   #=> true
 *     h.has_key?("z")   #=> false
 *
 */

static VALUE
rb_hash_has_key(VALUE hash, VALUE key)
{
    if (st_lookup(RHASH(hash)->tbl, key, 0)) {
        return Qtrue;
    }
    return Qfalse;
}

static int
rb_hash_search_value(VALUE key, VALUE value, VALUE *data)
{
    if (key == Qundef) return ST_CONTINUE;
    if (rb_equal(value, data[1])) {
        data[0] = Qtrue;
        return ST_STOP;
    }
    return ST_CONTINUE;
}

/*
 *  call-seq:
 *     hsh.has_value?(value)    => true or false
 *     hsh.value?(value)        => true or false
 *
 *  Returns <code>true</code> if the given value is present for some key
 *  in <i>hsh</i>.
 *
 *     h = { "a" => 100, "b" => 200 }
 *     h.has_value?(100)   #=> true
 *     h.has_value?(999)   #=> false
 */

static VALUE
rb_hash_has_value(VALUE hash, VALUE val)
{
    VALUE data[2];

    data[0] = Qfalse;
    data[1] = val;
    rb_hash_foreach(hash, rb_hash_search_value, (st_data_t)data);
    return data[0];
}

struct equal_data {
    int result;
    st_table *tbl;
};

static int
equal_i(VALUE key, VALUE val1, struct equal_data *data)
{
    VALUE val2;

    if (key == Qundef) return ST_CONTINUE;
    if (!st_lookup(data->tbl, key, &val2)) {
        data->result = Qfalse;
        return ST_STOP;
    }
    if (!rb_equal(val1, val2)) {
        data->result = Qfalse;
        return ST_STOP;
    }
    return ST_CONTINUE;
}

static VALUE
hash_equal(VALUE hash1, VALUE hash2, int eql /* compare default value if true */)
{
    struct equal_data data;

    if (hash1 == hash2) return Qtrue;
    if (TYPE(hash2) != T_HASH) {
        if (!rb_respond_to(hash2, rb_intern("to_hash"))) {
            return Qfalse;
        }
        return rb_equal(hash2, hash1);
    }
    if (RHASH(hash1)->tbl->num_entries != RHASH(hash2)->tbl->num_entries)
        return Qfalse;
    if (eql) {
        if (!(rb_equal(RHASH(hash1)->ifnone, RHASH(hash2)->ifnone) &&
              FL_TEST(hash1, HASH_PROC_DEFAULT) == FL_TEST(hash2, HASH_PROC_DEFAULT)))
            return Qfalse;
    }

    data.tbl = RHASH(hash2)->tbl;
    data.result = Qtrue;
    rb_hash_foreach(hash1, equal_i, (st_data_t)&data);

    return data.result;
}

/*
 *  call-seq:
 *     hsh == other_hash    => true or false
 *
 *  Equality---Two hashes are equal if they each contain the same number
 *  of keys and if each key-value pair is equal to (according to
 *  <code>Object#==</code>) the corresponding elements in the other
 *  hash.
 *
 *     h1 = { "a" => 1, "c" => 2 }
 *     h2 = { 7 => 35, "c" => 2, "a" => 1 }
 *     h3 = { "a" => 1, "c" => 2, 7 => 35 }
 *     h4 = { "a" => 1, "d" => 2, "f" => 35 }
 *     h1 == h2   #=> false
 *     h2 == h3   #=> true
 *     h3 == h4   #=> false
 *
 */

static VALUE
rb_hash_equal(VALUE hash1, VALUE hash2)
{
    return hash_equal(hash1, hash2, Qfalse);
}

static int
rb_hash_invert_i(VALUE key, VALUE value, VALUE hash)
{
    if (key == Qundef) return ST_CONTINUE;
    rb_hash_aset(hash, value, key);
    return ST_CONTINUE;
}

/*
 *  call-seq:
 *     hsh.invert -> aHash
 *
 *  Returns a new hash created by using <i>hsh</i>'s values as keys, and
 *  the keys as values.
 *
 *     h = { "n" => 100, "m" => 100, "y" => 300, "d" => 200, "a" => 0 }
 *     h.invert   #=> {0=>"a", 100=>"n", 200=>"d", 300=>"y"}
 *
 */

static VALUE
rb_hash_invert(VALUE hash)
{
    VALUE h = rb_hash_new();

    rb_hash_foreach(hash, rb_hash_invert_i, h);
    return h;
}

static int
rb_hash_update_i(VALUE key, VALUE value, VALUE hash)
{
    if (key == Qundef) return ST_CONTINUE;
    rb_hash_aset(hash, key, value);
    return ST_CONTINUE;
}

static int
rb_hash_update_block_i(VALUE key, VALUE value, VALUE hash)
{
    if (key == Qundef) return ST_CONTINUE;
    if (rb_hash_has_key(hash, key)) {
        value = rb_yield_values(3, key, rb_hash_aref(hash, key), value);
    }
    rb_hash_aset(hash, key, value);
    return ST_CONTINUE;
}

/*
 *  call-seq:
 *     hsh.merge!(other_hash)                                 => hsh
 *     hsh.update(other_hash)                                 => hsh
 *     hsh.merge!(other_hash){|key, oldval, newval| block}    => hsh
 *     hsh.update(other_hash){|key, oldval, newval| block}    => hsh
 *
 *  Adds the contents of <i>other_hash</i> to <i>hsh</i>.  If no
 *  block is specified entries with duplicate keys are overwritten
 *  with the values from <i>other_hash</i>, otherwise the value
 *  of each duplicate key is detemined by calling the block with
 *  the key, its value in <i>hsh</i> and its value in <i>other_hash</i>.
 *
 *     h1 = { "a" => 100, "b" => 200 }
 *     h2 = { "b" => 254, "c" => 300 }
 *     h1.merge!(h2)   #=> {"a"=>100, "b"=>254, "c"=>300}
 *     h1.merge!(h2) { |key, v1, v2| v1 }
 *                     #=> {"a"=>100, "b"=>200, "c"=>300}
 */

static VALUE
rb_hash_update(VALUE hash1, VALUE hash2)
{
    hash2 = to_hash(hash2);
    if (rb_block_given_p()) {
        rb_hash_foreach(hash2, rb_hash_update_block_i, hash1);
    }
    else {
        rb_hash_foreach(hash2, rb_hash_update_i, hash1);
    }
    return hash1;
}

/*
 *  call-seq:
 *     hsh.merge(other_hash)                              -> a_hash
 *     hsh.merge(other_hash){|key, oldval, newval| block} -> a_hash
 *
 *  Returns a new hash containing the contents of <i>other_hash</i> and
 *  the contents of <i>hsh</i>, overwriting entries in <i>hsh</i> with
 *  duplicate keys with those from <i>other_hash</i>.
 *
 *     h1 = { "a" => 100, "b" => 200 }
 *     h2 = { "b" => 254, "c" => 300 }
 *     h1.merge(h2)   #=> {"a"=>100, "b"=>254, "c"=>300}
 *     h1             #=> {"a"=>100, "b"=>200}
 *
 */

static VALUE
rb_hash_merge(VALUE hash1, VALUE hash2)
{
    return rb_hash_update(rb_obj_dup(hash1), hash2);
}

static int path_tainted = -1;

static char **origenviron;
#ifdef _WIN32
#define GET_ENVIRON(e) (e = rb_w32_get_environ())
#define FREE_ENVIRON(e) rb_w32_free_environ(e)
static char **my_environ;
#undef environ
#define environ my_environ
#elif defined(__APPLE__)
#undef environ
#define environ (*_NSGetEnviron())
#define GET_ENVIRON(e) (e)
#define FREE_ENVIRON(e)
#else
extern char **environ;
#define GET_ENVIRON(e) (e)
#define FREE_ENVIRON(e)
#endif

static VALUE
env_str_new(const char *ptr, long len)
{
    VALUE str = rb_tainted_str_new(ptr, len);

    rb_obj_freeze(str);
    return str;
}

static VALUE
env_str_new2(const char *ptr)
{
    if (!ptr) return Qnil;
    return env_str_new(ptr, strlen(ptr));
}

static VALUE
env_delete(VALUE obj, VALUE name)
{
    char *nam, *val;

    rb_secure(4);
    SafeStringValue(name);
    nam = RSTRING(name)->ptr;
    if (strlen(nam) != RSTRING(name)->len) {
        rb_raise(rb_eArgError, "bad environment variable name");
    }
    val = getenv(nam);
    if (val) {
        VALUE value = env_str_new2(val);

        ruby_setenv(nam, 0);
#ifdef ENV_IGNORECASE
        if (strcasecmp(nam, PATH_ENV) == 0)
#else
        if (strcmp(nam, PATH_ENV) == 0)
#endif
        {
            path_tainted = 0;
        }
        return value;
    }
    return Qnil;
}

static VALUE
env_delete_m(VALUE obj, VALUE name)
{
    VALUE val;

    val = env_delete(obj, name);
    if (NIL_P(val) && rb_block_given_p()) rb_yield(name);
    return val;
}

static VALUE
rb_f_getenv(VALUE obj, VALUE name)
{
    char *nam, *env;

    rb_secure(4);
    SafeStringValue(name);
    nam = RSTRING(name)->ptr;
    if (strlen(nam) != RSTRING(name)->len) {
        rb_raise(rb_eArgError, "bad environment variable name");
    }
    env = getenv(nam);
    if (env) {
#ifdef ENV_IGNORECASE
        if (strcasecmp(nam, PATH_ENV) == 0 && !rb_env_path_tainted())
#else
        if (strcmp(nam, PATH_ENV) == 0 && !rb_env_path_tainted())
#endif
        {
            VALUE str = rb_str_new2(env);

            rb_obj_freeze(str);
            return str;
        }
        return env_str_new2(env);
    }
    return Qnil;
}

static VALUE
env_fetch(int argc, VALUE *argv)
{
    VALUE key, if_none;
    long block_given;
    char *nam, *env;

    rb_secure(4);
    rb_scan_args(argc, argv, "11", &key, &if_none);
    block_given = rb_block_given_p();
    if (block_given && argc == 2) {
        rb_warn("block supersedes default value argument");
    }
    SafeStringValue(key);
    nam = RSTRING(key)->ptr;
    if (strlen(nam) != RSTRING(key)->len) {
        rb_raise(rb_eArgError, "bad environment variable name");
    }
    env = getenv(nam);
    if (!env) {
        if (block_given) return rb_yield(key);
        if (argc == 1) {
            rb_raise(rb_eKeyError, "key not found");
        }
        return if_none;
    }
#ifdef ENV_IGNORECASE
    if (strcasecmp(nam, PATH_ENV) == 0 && !rb_env_path_tainted())
#else
    if (strcmp(nam, PATH_ENV) == 0 && !rb_env_path_tainted())
#endif
        return rb_str_new2(env);
    return env_str_new2(env);
}

static void
path_tainted_p(char *path)
{
    path_tainted = rb_path_check(path)?0:1;
}

int
rb_env_path_tainted(void)
{
    if (path_tainted < 0) {
        path_tainted_p(getenv(PATH_ENV));
    }
    return path_tainted;
}

static int
envix(const char *nam)
{
    register int i, len = strlen(nam);
    char **env;

    env = GET_ENVIRON(environ);
    for (i = 0; env[i]; i++) {
        if (
#ifdef ENV_IGNORECASE
            strncasecmp(env[i],nam,len) == 0
#else
            memcmp(env[i],nam,len) == 0
#endif
            && env[i][len] == '=')
            break;                      /* memcmp must come first to avoid */
    }                                   /* potential SEGV's */
    FREE_ENVIRON(environ);
    return i;
}

void
ruby_setenv(const char *name, const char *value)
{
#if defined(_WIN32)
    /* The sane way to deal with the environment.
     * Has these advantages over putenv() & co.:
     *  * enables us to store a truly empty value in the
     *    environment (like in UNIX).
     *  * we don't have to deal with RTL globals, bugs and leaks.
     *  * Much faster.
     * Why you may want to enable USE_WIN32_RTL_ENV:
     *  * environ[] and RTL functions will not reflect changes,
     *    which might be an issue if extensions want to access
     *    the env. via RTL.  This cuts both ways, since RTL will
     *    not see changes made by extensions that call the Win32
     *    functions directly, either.
     * GSAR 97-06-07
     *
     * REMARK: USE_WIN32_RTL_ENV is already obsoleted since we don't use
     *         RTL's environ global variable directly yet.
     */
    SetEnvironmentVariable(name,value);
#elif defined __CYGWIN__
#undef setenv
#undef unsetenv
    if (value)
        setenv(name,value,1);
    else
        unsetenv(name);
#else  /* WIN32 */
    size_t len;
    int i=envix(name);                  /* where does it go? */

    if (environ == origenviron) {       /* need we copy environment? */
        int j;
        int max;
        char **tmpenv;

        for (max = i; environ[max]; max++) ;
        tmpenv = ALLOC_N(char*, max+2);
        for (j=0; j<max; j++)           /* copy environment */
            tmpenv[j] = strdup(environ[j]);
        tmpenv[max] = 0;
        environ = tmpenv;               /* tell exec where it is now */
    }
    if (environ[i]) {
        char **envp = origenviron;
        while (*envp && *envp != environ[i]) envp++;
        if (!*envp)
            free(environ[i]);
        if (!value) {
            while (environ[i]) {
                environ[i] = environ[i+1];
                i++;
            }
            return;
        }
    }
    else {                      /* does not exist yet */
        if (!value) return;
        REALLOC_N(environ, char*, i+2); /* just expand it a bit */
        environ[i+1] = 0;       /* make sure it's null terminated */
    }
    len = strlen(name) + strlen(value) + 2;
    environ[i] = ALLOC_N(char, len);
#ifndef MSDOS
    snprintf(environ[i],len,"%s=%s",name,value); /* all that work just for this */
#else
    /* MS-DOS requires environment variable names to be in uppercase */
    /* [Tom Dinger, 27 August 1990: Well, it doesn't _require_ it, but
     * some utilities and applications may break because they only look
     * for upper case strings. (Fixed strupr() bug here.)]
     */
    strcpy(environ[i],name); strupr(environ[i]);
    sprintf(environ[i] + strlen(name),"=%s", value);
#endif /* MSDOS */

#endif /* WIN32 */
}

void
ruby_unsetenv(const char *name)
{
    ruby_setenv(name, 0);
}

static VALUE
env_aset(VALUE obj, VALUE nm, VALUE val)
{
    char *name, *value;

    if (rb_safe_level() >= 4) {
        rb_raise(rb_eSecurityError, "can't change environment variable");
    }

    StringValue(nm);
    StringValue(val);
    name = RSTRING(nm)->ptr;
    value = RSTRING(val)->ptr;
    if (strlen(name) != RSTRING(nm)->len)
        rb_raise(rb_eArgError, "bad environment variable name");
    if (strlen(value) != RSTRING(val)->len)
        rb_raise(rb_eArgError, "bad environment variable value");

    ruby_setenv(name, value);
#ifdef ENV_IGNORECASE
    if (strcasecmp(name, PATH_ENV) == 0) {
#else
    if (strcmp(name, PATH_ENV) == 0) {
#endif
        if (OBJ_TAINTED(val)) {
            /* already tainted, no check */
            path_tainted = 1;
            return val;
        }
        else {
            path_tainted_p(value);
        }
    }
    return val;
}

static VALUE
env_keys(void)
{
    char **env;
    VALUE ary;

    rb_secure(4);
    ary = rb_ary_new();
    env = GET_ENVIRON(environ);
    while (*env) {
        char *s = strchr(*env, '=');
        if (s) {
            rb_ary_push(ary, env_str_new(*env, s-*env));
        }
        env++;
    }
    FREE_ENVIRON(environ);
    return ary;
}

static VALUE
env_each_key(VALUE ehash)
{
    VALUE keys;
    long i;

    RETURN_ENUMERATOR(ehash, 0, 0);
    rb_secure(4);
    keys = env_keys();
    for (i=0; i<RARRAY(keys)->len; i++) {
        rb_yield(RARRAY(keys)->ptr[i]);
    }
    return ehash;
}

static VALUE
env_values(void)
{
    VALUE ary;
    char **env;

    rb_secure(4);
    ary = rb_ary_new();
    env = GET_ENVIRON(environ);
    while (*env) {
        char *s = strchr(*env, '=');
        if (s) {
            rb_ary_push(ary, env_str_new2(s+1));
        }
        env++;
    }
    FREE_ENVIRON(environ);
    return ary;
}

static VALUE
env_each_value(VALUE ehash)
{
    VALUE values = env_values();
    long i;

    RETURN_ENUMERATOR(ehash, 0, 0);
    rb_secure(4);
    values = env_values();
    for (i=0; i<RARRAY(values)->len; i++) {
        rb_yield(RARRAY(values)->ptr[i]);
    }
    return ehash;
}

static VALUE
env_each_i(VALUE ehash, int values)
{
    char **env;
    VALUE ary;
    long i;

    rb_secure(4);
    ary = rb_ary_new();
    env = GET_ENVIRON(environ);
    while (*env) {
        char *s = strchr(*env, '=');
        if (s) {
            rb_ary_push(ary, env_str_new(*env, s-*env));
            rb_ary_push(ary, env_str_new2(s+1));
        }
        env++;
    }
    FREE_ENVIRON(environ);

    for (i=0; i<RARRAY(ary)->len; i+=2) {
        if (values) {
            rb_yield_values(2, RARRAY(ary)->ptr[i], RARRAY(ary)->ptr[i+1]);
        }
        else {
            rb_yield(rb_assoc_new(RARRAY(ary)->ptr[i], RARRAY(ary)->ptr[i+1]));
        }
    }
    return ehash;
}

static VALUE
env_each(VALUE ehash)
{
    RETURN_ENUMERATOR(ehash, 0, 0);
    return env_each_i(ehash, Qfalse);
}

static VALUE
env_each_pair(VALUE ehash)
{
    RETURN_ENUMERATOR(ehash, 0, 0);
    return env_each_i(ehash, Qtrue);
}

static VALUE
env_reject_bang(void)
{
    volatile VALUE keys;
    long i;
    int del = 0;

    rb_secure(4);
    keys = env_keys();
    for (i=0; i<RARRAY(keys)->len; i++) {
        VALUE val = rb_f_getenv(Qnil, RARRAY(keys)->ptr[i]);
        if (!NIL_P(val)) {
            if (RTEST(rb_yield_values(2, RARRAY(keys)->ptr[i], val))) {
                FL_UNSET(RARRAY(keys)->ptr[i], FL_TAINT);
                env_delete(Qnil, RARRAY(keys)->ptr[i]);
                del++;
            }
        }
    }
    if (del == 0) return Qnil;
    return envtbl;
}

static VALUE
env_delete_if(void)
{
    env_reject_bang();
    return envtbl;
}

static VALUE
env_values_at(int argc, VALUE *argv)
{
    VALUE result;
    long i;

    rb_secure(4);
    result = rb_ary_new();
    for (i=0; i<argc; i++) {
        rb_ary_push(result, rb_f_getenv(Qnil, argv[i]));
    }
    return result;
}

static VALUE
env_select(VALUE ehash)
{
    VALUE result;
    char **env;

    RETURN_ENUMERATOR(ehash, 0, 0);
    rb_secure(4);
    result = rb_ary_new();
    env = GET_ENVIRON(environ);
    while (*env) {
        char *s = strchr(*env, '=');
        if (s) {
            VALUE k = env_str_new(*env, s-*env);
            VALUE v = env_str_new2(s+1);
            if (RTEST(rb_yield_values(2, k, v))) {
                rb_ary_push(result, rb_assoc_new(k, v));
            }
        }
        env++;
    }
    FREE_ENVIRON(environ);

    return result;
}

static VALUE
env_clear(void)
{
    volatile VALUE keys;
    long i;

    rb_secure(4);
    keys = env_keys();
    for (i=0; i<RARRAY(keys)->len; i++) {
        VALUE val = rb_f_getenv(Qnil, RARRAY(keys)->ptr[i]);
        if (!NIL_P(val)) {
            env_delete(Qnil, RARRAY(keys)->ptr[i]);
        }
    }
    return envtbl;
}

static VALUE
env_to_s(void)
{
    return rb_str_new2("ENV");
}

static VALUE
env_inspect(void)
{
    char **env;
    VALUE str, i;

    rb_secure(4);
    str = rb_str_buf_new2("{");
    env = GET_ENVIRON(environ);
    while (*env) {
        char *s = strchr(*env, '=');

        if (env != environ) {
            rb_str_buf_cat2(str, ", ");
        }
        if (s) {
            rb_str_buf_cat2(str, "\"");
            rb_str_buf_cat(str, *env, s-*env);
            rb_str_buf_cat2(str, "\"=>");
            i = rb_inspect(rb_str_new2(s+1));
            rb_str_buf_append(str, i);
        }
        env++;
    }
    FREE_ENVIRON(environ);
    rb_str_buf_cat2(str, "}");
    OBJ_TAINT(str);

    return str;
}

static VALUE
env_to_a(void)
{
    char **env;
    VALUE ary;

    rb_secure(4);
    ary = rb_ary_new();
    env = GET_ENVIRON(environ);
    while (*env) {
        char *s = strchr(*env, '=');
        if (s) {
            rb_ary_push(ary, rb_assoc_new(env_str_new(*env, s-*env),
                                          env_str_new2(s+1)));
        }
        env++;
    }
    FREE_ENVIRON(environ);
    return ary;
}

static VALUE
env_none(void)
{
    return Qnil;
}

static VALUE
env_size(void)
{
    int i;
    char **env;

    rb_secure(4);
    env = GET_ENVIRON(environ);
    for(i=0; env[i]; i++)
        ;
    FREE_ENVIRON(environ);
    return INT2FIX(i);
}

static VALUE
env_empty_p(void)
{
    char **env;

    rb_secure(4);
    env = GET_ENVIRON(environ);
    if (env[0] == 0) {
        FREE_ENVIRON(environ);
        return Qtrue;
    }
    FREE_ENVIRON(environ);
    return Qfalse;
}

static VALUE
env_has_key(VALUE env, VALUE key)
{
    char *s;

    rb_secure(4);
    s = StringValuePtr(key);
    if (strlen(s) != RSTRING(key)->len)
        rb_raise(rb_eArgError, "bad environment variable name");
    if (getenv(s)) return Qtrue;
    return Qfalse;
}

static VALUE
env_has_value(VALUE dmy, VALUE value)
{
    char **env;

    rb_secure(4);
    if (TYPE(value) != T_STRING) return Qfalse;
    env = GET_ENVIRON(environ);
    while (*env) {
        char *s = strchr(*env, '=');
        if (s++) {
            long len = strlen(s);
            if (RSTRING(value)->len == len && strncmp(s, RSTRING(value)->ptr, len) == 0) {
                FREE_ENVIRON(environ);
                return Qtrue;
            }
        }
        env++;
    }
    FREE_ENVIRON(environ);
    return Qfalse;
}

static VALUE
env_key(VALUE dmy, VALUE value)
{
    char **env;
    VALUE str;

    rb_secure(4);
    StringValue(value);
    env = GET_ENVIRON(environ);
    while (*env) {
        char *s = strchr(*env, '=');
        if (s++) {
            long len = strlen(s);
            if (RSTRING(value)->len == len && strncmp(s, RSTRING(value)->ptr, len) == 0) {
                str = env_str_new(*env, s-*env-1);
                FREE_ENVIRON(environ);
                return str;
            }
        }
        env++;
    }
    FREE_ENVIRON(environ);
    return Qnil;
}

static VALUE
env_index(VALUE dmy, VALUE value)
{
    rb_warn("ENV.index is deprecated; use ENV.key");
    return env_key(dmy, value);
}

static VALUE
env_to_hash(void)
{
    char **env;
    VALUE hash;

    rb_secure(4);
    hash = rb_hash_new();
    env = GET_ENVIRON(environ);
    while (*env) {
        char *s = strchr(*env, '=');
        if (s) {
            rb_hash_aset(hash, env_str_new(*env, s-*env),
                               env_str_new2(s+1));
        }
        env++;
    }
    FREE_ENVIRON(environ);
    return hash;
}

static VALUE
env_reject(void)
{
    return rb_hash_delete_if(env_to_hash());
}

static VALUE
env_shift(void)
{
    char **env;

    rb_secure(4);
    env = GET_ENVIRON(environ);
    if (*env) {
        char *s = strchr(*env, '=');
        if (s) {
            VALUE key = env_str_new(*env, s-*env);
            VALUE val = env_str_new2(getenv(RSTRING(key)->ptr));
            env_delete(Qnil, key);
            return rb_assoc_new(key, val);
        }
    }
    FREE_ENVIRON(environ);
    return Qnil;
}

static VALUE
env_invert(void)
{
    return rb_hash_invert(env_to_hash());
}

static int
env_replace_i(VALUE key, VALUE val, VALUE keys)
{
    if (key != Qundef) {
        env_aset(Qnil, key, val);
        if (rb_ary_includes(keys, key)) {
            rb_ary_delete(keys, key);
        }
    }
    return ST_CONTINUE;
}

static VALUE
env_replace(VALUE env, VALUE hash)
{
    volatile VALUE keys;
    long i;

    rb_secure(4);
    keys = env_keys();
    if (env == hash) return env;
    hash = to_hash(hash);
    rb_hash_foreach(hash, env_replace_i, keys);

    for (i=0; i<RARRAY(keys)->len; i++) {
        env_delete(env, RARRAY(keys)->ptr[i]);
    }
    return env;
}

static int
env_update_i(VALUE key, VALUE val)
{
    if (key != Qundef) {
        if (rb_block_given_p()) {
            val = rb_yield_values(3, key, rb_f_getenv(Qnil, key), val);
        }
        env_aset(Qnil, key, val);
    }
    return ST_CONTINUE;
}

static VALUE
env_update(VALUE env, VALUE hash)
{
    rb_secure(4);
    if (env == hash) return env;
    hash = to_hash(hash);
    rb_hash_foreach(hash, env_update_i, 0);
    return env;
}

/*
 *  A <code>Hash</code> is a collection of key-value pairs. It is
 *  similar to an <code>Array</code>, except that indexing is done via
 *  arbitrary keys of any object type, not an integer index. The order
 *  in which you traverse a hash by either key or value may seem
 *  arbitrary, and will generally not be in the insertion order.
 *
 *  Hashes have a <em>default value</em> that is returned when accessing
 *  keys that do not exist in the hash. By default, that value is
 *  <code>nil</code>.
 *
 */

void
Init_Hash(void)
{
    id_hash = rb_intern("hash");
    id_call = rb_intern("call");
    id_default = rb_intern("default");

    rb_cHash = rb_define_class("Hash", rb_cObject);

    rb_include_module(rb_cHash, rb_mEnumerable);

    rb_define_alloc_func(rb_cHash, hash_alloc);
    rb_define_singleton_method(rb_cHash, "[]", rb_hash_s_create, -1);
    rb_define_method(rb_cHash,"initialize", rb_hash_initialize, -1);
    rb_define_method(rb_cHash,"initialize_copy", rb_hash_replace, 1);
    rb_define_method(rb_cHash,"rehash", rb_hash_rehash, 0);

    rb_define_method(rb_cHash,"to_hash", rb_hash_to_hash, 0);
    rb_define_method(rb_cHash,"to_a", rb_hash_to_a, 0);
    rb_define_method(rb_cHash,"to_s", rb_hash_to_s, 0);
    rb_define_method(rb_cHash,"inspect", rb_hash_inspect, 0);

    rb_define_method(rb_cHash,"==", rb_hash_equal, 1);
    rb_define_method(rb_cHash,"[]", rb_hash_aref, 1);
    rb_define_method(rb_cHash,"fetch", rb_hash_fetch, -1);
    rb_define_method(rb_cHash,"[]=", rb_hash_aset, 2);
    rb_define_method(rb_cHash,"store", rb_hash_aset, 2);
    rb_define_method(rb_cHash,"default", rb_hash_default, -1);
    rb_define_method(rb_cHash,"default=", rb_hash_set_default, 1);
    rb_define_method(rb_cHash,"default_proc", rb_hash_default_proc, 0);
    rb_define_method(rb_cHash,"key", rb_hash_key, 1);
    rb_define_method(rb_cHash,"index", rb_hash_index, 1);
    rb_define_method(rb_cHash,"size", rb_hash_size, 0);
    rb_define_method(rb_cHash,"length", rb_hash_size, 0);
    rb_define_method(rb_cHash,"empty?", rb_hash_empty_p, 0);

    rb_define_method(rb_cHash,"each", rb_hash_each, 0);
    rb_define_method(rb_cHash,"each_value", rb_hash_each_value, 0);
    rb_define_method(rb_cHash,"each_key", rb_hash_each_key, 0);
    rb_define_method(rb_cHash,"each_pair", rb_hash_each_pair, 0);
    rb_define_method(rb_cHash,"sort", rb_hash_sort, 0);

    rb_define_method(rb_cHash,"keys", rb_hash_keys, 0);
    rb_define_method(rb_cHash,"values", rb_hash_values, 0);
    rb_define_method(rb_cHash,"values_at", rb_hash_values_at, -1);

    rb_define_method(rb_cHash,"shift", rb_hash_shift, 0);
    rb_define_method(rb_cHash,"delete", rb_hash_delete, 1);
    rb_define_method(rb_cHash,"delete_if", rb_hash_delete_if, 0);
    rb_define_method(rb_cHash,"select", rb_hash_select, 0);
    rb_define_method(rb_cHash,"reject", rb_hash_reject, 0);
    rb_define_method(rb_cHash,"reject!", rb_hash_reject_bang, 0);
    rb_define_method(rb_cHash,"clear", rb_hash_clear, 0);
    rb_define_method(rb_cHash,"invert", rb_hash_invert, 0);
    rb_define_method(rb_cHash,"update", rb_hash_update, 1);
    rb_define_method(rb_cHash,"replace", rb_hash_replace, 1);
    rb_define_method(rb_cHash,"merge!", rb_hash_update, 1);
    rb_define_method(rb_cHash,"merge", rb_hash_merge, 1);

    rb_define_method(rb_cHash,"include?", rb_hash_has_key, 1);
    rb_define_method(rb_cHash,"member?", rb_hash_has_key, 1);
    rb_define_method(rb_cHash,"has_key?", rb_hash_has_key, 1);
    rb_define_method(rb_cHash,"has_value?", rb_hash_has_value, 1);
    rb_define_method(rb_cHash,"key?", rb_hash_has_key, 1);
    rb_define_method(rb_cHash,"value?", rb_hash_has_value, 1);

#ifndef __MACOS__ /* environment variables nothing on MacOS. */
    origenviron = environ;
    envtbl = rb_obj_alloc(rb_cObject);
    rb_extend_object(envtbl, rb_mEnumerable);

    rb_define_singleton_method(envtbl,"[]", rb_f_getenv, 1);
    rb_define_singleton_method(envtbl,"fetch", env_fetch, -1);
    rb_define_singleton_method(envtbl,"[]=", env_aset, 2);
    rb_define_singleton_method(envtbl,"store", env_aset, 2);
    rb_define_singleton_method(envtbl,"each", env_each, 0);
    rb_define_singleton_method(envtbl,"each_pair", env_each_pair, 0);
    rb_define_singleton_method(envtbl,"each_key", env_each_key, 0);
    rb_define_singleton_method(envtbl,"each_value", env_each_value, 0);
    rb_define_singleton_method(envtbl,"delete", env_delete_m, 1);
    rb_define_singleton_method(envtbl,"delete_if", env_delete_if, 0);
    rb_define_singleton_method(envtbl,"clear", env_clear, 0);
    rb_define_singleton_method(envtbl,"reject", env_reject, 0);
    rb_define_singleton_method(envtbl,"reject!", env_reject_bang, 0);
    rb_define_singleton_method(envtbl,"select", env_select, 0);
    rb_define_singleton_method(envtbl,"shift", env_shift, 0);
    rb_define_singleton_method(envtbl,"invert", env_invert, 0);
    rb_define_singleton_method(envtbl,"replace", env_replace, 1);
    rb_define_singleton_method(envtbl,"update", env_update, 1);
    rb_define_singleton_method(envtbl,"inspect", env_inspect, 0);
    rb_define_singleton_method(envtbl,"rehash", env_none, 0);
    rb_define_singleton_method(envtbl,"to_a", env_to_a, 0);
    rb_define_singleton_method(envtbl,"to_s", env_to_s, 0);
    rb_define_singleton_method(envtbl,"key", env_key, 1);
    rb_define_singleton_method(envtbl,"index", env_index, 1);
    rb_define_singleton_method(envtbl,"size", env_size, 0);
    rb_define_singleton_method(envtbl,"length", env_size, 0);
    rb_define_singleton_method(envtbl,"empty?", env_empty_p, 0);
    rb_define_singleton_method(envtbl,"keys", env_keys, 0);
    rb_define_singleton_method(envtbl,"values", env_values, 0);
    rb_define_singleton_method(envtbl,"values_at", env_values_at, -1);
    rb_define_singleton_method(envtbl,"include?", env_has_key, 1);
    rb_define_singleton_method(envtbl,"member?", env_has_key, 1);
    rb_define_singleton_method(envtbl,"has_key?", env_has_key, 1);
    rb_define_singleton_method(envtbl,"has_value?", env_has_value, 1);
    rb_define_singleton_method(envtbl,"key?", env_has_key, 1);
    rb_define_singleton_method(envtbl,"value?", env_has_value, 1);
    rb_define_singleton_method(envtbl,"to_hash", env_to_hash, 0);

    rb_define_global_const("ENV", envtbl);
#else /* __MACOS__ */
        envtbl = rb_hash_s_new(0, NULL, rb_cHash);
    rb_define_global_const("ENV", envtbl);
#endif  /* ifndef __MACOS__  environment variables nothing on MacOS. */
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ia64.s

root/ia64.s

/* [<][>][^][v][top][bottom] [index] [help] */
// rb_ia64_flushrs and rb_ia64_bsp is written in IA64 assembly language
// because Intel Compiler for IA64 doesn't support inline assembly.
//
// This file is based on following C program compiled by gcc.
//
//   void rb_ia64_flushrs(void) { __builtin_ia64_flushrs(); }
//   void *rb_ia64_bsp(void) { return __builtin_ia64_bsp(); }
//
        .file   "ia64.c"
        .text
        .align 16
        .global rb_ia64_flushrs#
        .proc rb_ia64_flushrs#
rb_ia64_flushrs:
        .prologue
        .body
        flushrs
        ;;
        nop.i 0
        br.ret.sptk.many b0
        .endp rb_ia64_flushrs#
        .align 16
        .global rb_ia64_bsp#
        .proc rb_ia64_bsp#
rb_ia64_bsp:
        .prologue
        .body
        nop.m 0
        ;;
        mov r8 = ar.bsp
        br.ret.sptk.many b0
        .endp rb_ia64_bsp#
        .ident  "GCC: (GNU) 3.3.5 (Debian 1:3.3.5-13)"
/* [<][>][^][v][top][bottom][index] [help] */


inits.c

root/inits.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. rb_call_inits
/**********************************************************************

  inits.c -

  $Author: ocean $
  $Date: 2005/09/14 06:32:31 $
  created at: Tue Dec 28 16:01:58 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#include "ruby.h"

void Init_Array(void);
void Init_Bignum(void);
void Init_Binding(void);
void Init_Comparable(void);
void Init_Dir(void);
void Init_Enumerable(void);
void Init_Enumerator(void);
void Init_Exception(void);
void Init_syserr(void);
void Init_eval(void);
void Init_load(void);
void Init_Proc(void);
void Init_Thread(void);
void Init_File(void);
void Init_GC(void);
void Init_Hash(void);
void Init_IO(void);
void Init_Math(void);
void Init_marshal(void);
void Init_Numeric(void);
void Init_Object(void);
void Init_pack(void);
void Init_Precision(void);
void Init_sym(void);
void Init_process(void);
void Init_Random(void);
void Init_Range(void);
void Init_Regexp(void);
void Init_signal(void);
void Init_String(void);
void Init_Struct(void);
void Init_Time(void);
void Init_var_tables(void);
void Init_version(void);

void
rb_call_inits(void)
{
    Init_sym();
    Init_var_tables();
    Init_Object();
    Init_Comparable();
    Init_Enumerable();
    Init_Precision();
    Init_eval();
    Init_String();
    Init_Exception();
    Init_Thread();
    Init_Numeric();
    Init_Bignum();
    Init_syserr();
    Init_Array();
    Init_Hash();
    Init_Struct();
    Init_Regexp();
    Init_pack();
    Init_Range();
    Init_IO();
    Init_Dir();
    Init_Time();
    Init_Random();
    Init_signal();
    Init_process();
    Init_load();
    Init_Proc();
    Init_Binding();
    Init_Math();
    Init_GC();
    Init_marshal();
    Init_Enumerator();
    Init_version();
}
/* [<][>][^][v] [top][bottom][index] [help] */


intern.h

root/intern.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

DEFINITIONS

This source file includes following definitions.
  1. rb_fdset_t
/**********************************************************************

  intern.h -

  $Author: nobu $
  $Date: 2005/11/11 17:11:05 $
  created at: Thu Jun 10 14:22:17 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto
  Copyright (C) 2000  Network Applied Communication Laboratory, Inc.
  Copyright (C) 2000  Information-technology Promotion Agency, Japan

**********************************************************************/

#ifndef RUBY_INTERN_H
#define RUBY_INTERN_H 1

#ifdef HAVE_STDARG_PROTOTYPES
# include <stdarg.h>
#else
# include <varargs.h>
#endif

/*
 * Functions and variables that are used by more than one source file of
 * the kernel.
 */

#define ID_ALLOCATOR 1

/* array.c */
void rb_mem_clear(register VALUE*, register long);
VALUE rb_assoc_new(VALUE, VALUE);
VALUE rb_check_array_type(VALUE);
VALUE rb_ary_new(void);
VALUE rb_ary_new2(long);
VALUE rb_ary_new3(long,...);
VALUE rb_ary_new4(long, const VALUE *);
VALUE rb_values_new(long,...);
VALUE rb_values_new2(long, const VALUE *);
VALUE rb_values_from_ary(VALUE);
VALUE rb_ary_from_values(VALUE);
VALUE rb_ary_freeze(VALUE);
VALUE rb_ary_aref(int, VALUE*, VALUE);
void rb_ary_store(VALUE, long, VALUE);
VALUE rb_ary_dup(VALUE);
VALUE rb_ary_to_ary(VALUE);
VALUE rb_ary_to_s(VALUE);
VALUE rb_ary_push(VALUE, VALUE);
VALUE rb_ary_pop(VALUE);
VALUE rb_ary_shift(VALUE);
VALUE rb_ary_unshift(VALUE, VALUE);
VALUE rb_ary_entry(VALUE, long);
VALUE rb_ary_each(VALUE);
VALUE rb_ary_join(VALUE, VALUE);
VALUE rb_ary_print_on(VALUE, VALUE);
VALUE rb_ary_reverse(VALUE);
VALUE rb_ary_sort(VALUE);
VALUE rb_ary_sort_bang(VALUE);
VALUE rb_ary_delete(VALUE, VALUE);
VALUE rb_ary_delete_at(VALUE, long);
VALUE rb_ary_clear(VALUE);
VALUE rb_ary_plus(VALUE, VALUE);
VALUE rb_ary_concat(VALUE, VALUE);
VALUE rb_ary_assoc(VALUE, VALUE);
VALUE rb_ary_rassoc(VALUE, VALUE);
VALUE rb_ary_includes(VALUE, VALUE);
VALUE rb_ary_cmp(VALUE, VALUE);
VALUE rb_check_array_value(VALUE);
VALUE rb_get_values_at(VALUE, long, int, VALUE*, VALUE(*)(VALUE,long));
/* bignum.c */
VALUE rb_big_clone(VALUE);
void rb_big_2comp(VALUE);
VALUE rb_big_norm(VALUE);
VALUE rb_uint2big(unsigned long);
VALUE rb_int2big(long);
VALUE rb_uint2inum(unsigned long);
VALUE rb_int2inum(long);
VALUE rb_cstr_to_inum(const char*, int, int);
VALUE rb_str_to_inum(VALUE, int, int);
VALUE rb_cstr2inum(const char*, int);
VALUE rb_str2inum(VALUE, int);
VALUE rb_big2str(VALUE, int);
long rb_big2long(VALUE);
#define rb_big2int(x) rb_big2long(x)
unsigned long rb_big2ulong(VALUE);
#define rb_big2uint(x) rb_big2ulong(x)
#if HAVE_LONG_LONG
VALUE rb_ll2inum(LONG_LONG);
VALUE rb_ull2inum(unsigned LONG_LONG);
LONG_LONG rb_big2ll(VALUE);
unsigned LONG_LONG rb_big2ull(VALUE);
#endif  /* HAVE_LONG_LONG */
void rb_quad_pack(char*,VALUE);
VALUE rb_quad_unpack(const char*,int);
VALUE rb_dbl2big(double);
double rb_big2dbl(VALUE);
VALUE rb_big_cmp(VALUE, VALUE);
VALUE rb_big_eq(VALUE, VALUE);
VALUE rb_big_plus(VALUE, VALUE);
VALUE rb_big_minus(VALUE, VALUE);
VALUE rb_big_mul(VALUE, VALUE);
VALUE rb_big_div(VALUE, VALUE);
VALUE rb_big_modulo(VALUE, VALUE);
VALUE rb_big_divmod(VALUE, VALUE);
VALUE rb_big_pow(VALUE, VALUE);
VALUE rb_big_and(VALUE, VALUE);
VALUE rb_big_or(VALUE, VALUE);
VALUE rb_big_xor(VALUE, VALUE);
VALUE rb_big_lshift(VALUE, VALUE);
/* class.c */
VALUE rb_class_boot(VALUE);
VALUE rb_class_new(VALUE);
VALUE rb_mod_init_copy(VALUE, VALUE);
VALUE rb_class_init_copy(VALUE, VALUE);
VALUE rb_singleton_class_clone(VALUE);
void rb_singleton_class_attached(VALUE,VALUE);
VALUE rb_make_metaclass(VALUE, VALUE);
void rb_check_inheritable(VALUE);
VALUE rb_class_inherited(VALUE, VALUE);
VALUE rb_define_class_id(ID, VALUE);
VALUE rb_module_new(void);
VALUE rb_define_module_id(ID);
VALUE rb_mod_included_modules(VALUE);
VALUE rb_mod_include_p(VALUE, VALUE);
VALUE rb_mod_ancestors(VALUE);
VALUE rb_class_instance_methods(int, VALUE*, VALUE);
VALUE rb_class_public_instance_methods(int, VALUE*, VALUE);
VALUE rb_class_protected_instance_methods(int, VALUE*, VALUE);
VALUE rb_class_private_instance_methods(int, VALUE*, VALUE);
VALUE rb_obj_singleton_methods(int, VALUE*, VALUE);
void rb_define_method_id(VALUE, ID, VALUE (*)(ANYARGS), int);
void rb_frozen_class_p(VALUE);
void rb_undef(VALUE, ID);
void rb_define_protected_method(VALUE, const char*, VALUE (*)(ANYARGS), int);
void rb_define_private_method(VALUE, const char*, VALUE (*)(ANYARGS), int);
void rb_define_singleton_method(VALUE, const char*, VALUE(*)(ANYARGS), int);
VALUE rb_singleton_class(VALUE);
/* compar.c */
int rb_cmpint(VALUE, VALUE, VALUE);
NORETURN(void rb_cmperr(VALUE, VALUE));
/* enum.c */
/* enumerator.c */
VALUE rb_enumeratorize(VALUE, VALUE, int, VALUE *);
#define RETURN_ENUMERATOR(obj, argc, argv) do {                         \
        if (!rb_block_given_p())                                        \
            return rb_enumeratorize(obj, ID2SYM(rb_frame_this_func()),  \
                                    argc, argv);                        \
    } while (0)
/* error.c */
RUBY_EXTERN int ruby_nerrs;
VALUE rb_exc_new(VALUE, const char*, long);
VALUE rb_exc_new2(VALUE, const char*);
VALUE rb_exc_new3(VALUE, VALUE);
PRINTF_ARGS(NORETURN(void rb_loaderror(const char*, ...)), 1, 2);
PRINTF_ARGS(NORETURN(void rb_name_error(ID, const char*, ...)), 2, 3);
NORETURN(void rb_invalid_str(const char*, const char*));
PRINTF_ARGS(void rb_compile_error(const char*, ...), 1, 2);
PRINTF_ARGS(void rb_compile_error_append(const char*, ...), 1, 2);
NORETURN(void rb_load_fail(const char*));
NORETURN(void rb_error_frozen(const char*));
void rb_check_frozen(VALUE);
/* eval.c */
#if defined(NFDBITS) && defined(HAVE_RB_FD_INIT)
typedef struct {
    int maxfd;
    fd_set *fdset;
} rb_fdset_t;

void rb_fd_init(volatile rb_fdset_t *);
void rb_fd_term(rb_fdset_t *);
void rb_fd_zero(rb_fdset_t *);
void rb_fd_set(int, rb_fdset_t *);
void rb_fd_clr(int, rb_fdset_t *);
int rb_fd_isset(int, const rb_fdset_t *);
void rb_fd_copy(rb_fdset_t *, const fd_set *, int);
int rb_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);

#define rb_fd_ptr(f)    ((f)->fdset)
#define rb_fd_max(f)    ((f)->maxfd)

#else

typedef fd_set rb_fdset_t;
#define rb_fd_zero(f)   FD_ZERO(f)
#define rb_fd_set(n, f) FD_SET(n, f)
#define rb_fd_clr(n, f) FD_CLR(n, f)
#define rb_fd_isset(n, f) FD_ISSET(n, f)
#define rb_fd_copy(d, s, n) (*(d) = *(s))
#define rb_fd_ptr(f)    (f)
#define rb_fd_init(f)   FD_ZERO(f)
#define rb_fd_term(f)   (f)
#define rb_fd_max(f)    FD_SETSIZE
#define rb_fd_select(n, rfds, wfds, efds, timeout)      select(n, rfds, wfds, efds, timeout)

#endif

RUBY_EXTERN struct RNode *ruby_current_node;
void ruby_set_current_source(void);
NORETURN(void rb_exc_raise(VALUE));
NORETURN(void rb_exc_fatal(VALUE));
VALUE rb_f_exit(int,VALUE*);
VALUE rb_f_abort(int,VALUE*);
void rb_remove_method(VALUE, const char*);
#define rb_disable_super(klass, name) ((void)0)
#define rb_enable_super(klass, name) ((void)0)
#define HAVE_RB_DEFINE_ALLOC_FUNC 1
void rb_define_alloc_func(VALUE, VALUE (*)(VALUE));
void rb_undef_alloc_func(VALUE);
void rb_clear_cache(void);
void rb_clear_cache_by_class(VALUE);
void rb_alias(VALUE, ID, ID);
void rb_attr(VALUE,ID,int,int,int);
int rb_method_boundp(VALUE, ID, int);
VALUE rb_dvar_defined(ID);
VALUE rb_dvar_curr(ID);
VALUE rb_dvar_ref(ID);
void rb_dvar_asgn(ID, VALUE);
void rb_dvar_push(ID, VALUE);
VALUE *rb_svar(int);
VALUE rb_eval_cmd(VALUE, VALUE, int);
int rb_obj_respond_to(VALUE, ID, int);
int rb_respond_to(VALUE, ID);
void rb_interrupt(void);
VALUE rb_apply(VALUE, ID, VALUE);
void rb_backtrace(void);
ID rb_frame_this_func(void);
VALUE rb_obj_instance_eval(int, VALUE*, VALUE);
VALUE rb_mod_module_eval(int, VALUE*, VALUE);
void rb_load(VALUE, int);
void rb_load_protect(VALUE, int, int*);
NORETURN(void rb_jump_tag(int));
int rb_provided(const char*);
void rb_provide(const char*);
VALUE rb_f_require(VALUE, VALUE);
VALUE rb_require_safe(VALUE, int);
void rb_obj_call_init(VALUE, int, VALUE*);
VALUE rb_class_new_instance(int, VALUE*, VALUE);
VALUE rb_block_proc(void);
VALUE rb_f_lambda(void);
VALUE rb_proc_new(VALUE (*)(ANYARGS/* VALUE yieldarg[, VALUE procarg] */), VALUE);
VALUE rb_proc_call(VALUE, VALUE);
int rb_proc_arity(VALUE);
VALUE rb_obj_method(VALUE, VALUE);
VALUE rb_method_call(int, VALUE*, VALUE);
int rb_mod_method_arity(VALUE, ID);
int rb_obj_method_arity(VALUE, ID);
VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*);
void rb_set_end_proc(void (*)(VALUE), VALUE);
void rb_mark_end_proc(void);
void rb_exec_end_proc(void);
void ruby_finalize(void);
NORETURN(void ruby_stop(int));
int ruby_cleanup(int);
int ruby_exec(void);
void rb_gc_mark_threads(void);
void rb_thread_start_timer(void);
void rb_thread_stop_timer(void);
void rb_thread_schedule(void);
void rb_thread_wait_fd(int);
int rb_thread_fd_writable(int);
void rb_thread_fd_close(int);
int rb_thread_alone(void);
void rb_thread_polling(void);
void rb_thread_sleep(int);
void rb_thread_sleep_forever(void);
VALUE rb_thread_stop(void);
VALUE rb_thread_wakeup(VALUE);
VALUE rb_thread_run(VALUE);
VALUE rb_thread_kill(VALUE);
VALUE rb_thread_create(VALUE (*)(ANYARGS), void*);
void rb_thread_interrupt(void);
void rb_thread_trap_eval(VALUE, int, int);
void rb_thread_signal_raise(const char*); /* should pass literal */
void rb_thread_signal_exit(void);
int rb_thread_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
void rb_thread_wait_for(struct timeval);
VALUE rb_thread_current(void);
VALUE rb_thread_main(void);
VALUE rb_thread_local_aref(VALUE, ID);
VALUE rb_thread_local_aset(VALUE, ID, VALUE);
void rb_thread_atfork(void);
VALUE rb_exec_recursive(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE);
/* file.c */
int eaccess(const char*, int);
VALUE rb_file_s_expand_path(int, VALUE *);
VALUE rb_file_expand_path(VALUE, VALUE);
void rb_file_const(const char*, VALUE);
int rb_find_file_ext(VALUE*, const char* const*);
VALUE rb_find_file(VALUE);
char *rb_path_next(const char *);
char *rb_path_skip_prefix(const char *);
char *rb_path_last_separator(const char *);
char *rb_path_end(const char *);
/* gc.c */
void ruby_set_stack_size(size_t);
NORETURN(void rb_memerror(void));
int ruby_stack_check(void);
int ruby_stack_length(VALUE**);
char *rb_source_filename(const char*);
void rb_gc_mark_locations(VALUE*, VALUE*);
void rb_mark_tbl(struct st_table*);
void rb_mark_hash(struct st_table*);
void rb_gc_mark_maybe(VALUE);
void rb_gc_mark(VALUE);
void rb_gc_force_recycle(VALUE);
void rb_gc(void);
void rb_gc_copy_finalizer(VALUE,VALUE);
void rb_gc_finalize_deferred(void);
void rb_gc_call_finalizer_at_exit(void);
VALUE rb_gc_enable(void);
VALUE rb_gc_disable(void);
VALUE rb_gc_start(void);
/* hash.c */
void st_foreach_safe(struct st_table *, int (*)(ANYARGS), unsigned long);
void rb_hash_foreach(VALUE, int (*)(ANYARGS), VALUE);
VALUE rb_hash(VALUE);
VALUE rb_hash_new(void);
VALUE rb_hash_freeze(VALUE);
VALUE rb_hash_aref(VALUE, VALUE);
VALUE rb_hash_aset(VALUE, VALUE, VALUE);
VALUE rb_hash_delete_if(VALUE);
VALUE rb_hash_delete(VALUE,VALUE);
int rb_path_check(const char*);
int rb_env_path_tainted(void);
/* io.c */
#define rb_defout rb_stdout
RUBY_EXTERN VALUE rb_fs;
RUBY_EXTERN VALUE rb_output_fs;
RUBY_EXTERN VALUE rb_rs;
RUBY_EXTERN VALUE rb_default_rs;
RUBY_EXTERN VALUE rb_output_rs;
VALUE rb_io_write(VALUE, VALUE);
VALUE rb_io_gets(VALUE);
VALUE rb_io_getc(VALUE);
VALUE rb_io_ungetc(VALUE, VALUE);
VALUE rb_io_close(VALUE);
VALUE rb_io_flush(VALUE);
VALUE rb_io_eof(VALUE);
VALUE rb_io_binmode(VALUE);
VALUE rb_io_addstr(VALUE, VALUE);
VALUE rb_io_printf(int, VALUE*, VALUE);
VALUE rb_io_print(int, VALUE*, VALUE);
VALUE rb_io_puts(int, VALUE*, VALUE);
VALUE rb_file_open(const char*, const char*);
VALUE rb_gets(void);
void rb_write_error(const char*);
void rb_write_error2(const char*, long);
/* marshal.c */
VALUE rb_marshal_dump(VALUE, VALUE);
VALUE rb_marshal_load(VALUE);
/* numeric.c */
void rb_num_zerodiv(void);
VALUE rb_num_coerce_bin(VALUE, VALUE);
VALUE rb_num_coerce_cmp(VALUE, VALUE);
VALUE rb_num_coerce_relop(VALUE, VALUE);
VALUE rb_float_new(double);
VALUE rb_num2fix(VALUE);
VALUE rb_fix2str(VALUE, int);
VALUE rb_dbl_cmp(double, double);
/* object.c */
int rb_eql(VALUE, VALUE);
VALUE rb_any_to_s(VALUE);
VALUE rb_inspect(VALUE);
VALUE rb_obj_is_instance_of(VALUE, VALUE);
VALUE rb_obj_is_kind_of(VALUE, VALUE);
VALUE rb_obj_alloc(VALUE);
VALUE rb_obj_clone(VALUE);
VALUE rb_obj_dup(VALUE);
VALUE rb_obj_init_copy(VALUE,VALUE);
VALUE rb_obj_taint(VALUE);
VALUE rb_obj_tainted(VALUE);
VALUE rb_obj_untaint(VALUE);
VALUE rb_obj_freeze(VALUE);
VALUE rb_obj_id(VALUE);
VALUE rb_obj_class(VALUE);
VALUE rb_class_real(VALUE);
VALUE rb_class_inherited_p(VALUE, VALUE);
VALUE rb_convert_type(VALUE,int,const char*,const char*);
VALUE rb_check_convert_type(VALUE,int,const char*,const char*);
VALUE rb_check_to_integer(VALUE, const char *);
VALUE rb_to_int(VALUE);
VALUE rb_Integer(VALUE);
VALUE rb_Float(VALUE);
VALUE rb_String(VALUE);
VALUE rb_Array(VALUE);
double rb_cstr_to_dbl(const char*, int);
double rb_str_to_dbl(VALUE, int);
/* parse.y */
RUBY_EXTERN int   ruby_sourceline;
RUBY_EXTERN char *ruby_sourcefile;
ID rb_id_attrset(ID);
void rb_gc_mark_parser(void);
int rb_is_const_id(ID);
int rb_is_instance_id(ID);
int rb_is_class_id(ID);
int rb_is_local_id(ID);
int rb_is_junk_id(ID);
int rb_symname_p(const char*);
VALUE rb_backref_get(void);
void rb_backref_set(VALUE);
VALUE rb_lastline_get(void);
void rb_lastline_set(VALUE);
VALUE rb_sym_all_symbols(void);
/* process.c */
struct rb_exec_arg {
    int argc;
    VALUE *argv;
    const char *prog;
};
int rb_proc_exec_n(int, VALUE*, const char*);
int rb_proc_exec(const char*);
VALUE rb_check_argv(int, VALUE*);
int rb_exec(const struct rb_exec_arg*);
int rb_fork(int*, int (*)(void*), void*);
VALUE rb_f_exec(int,VALUE*);
int rb_waitpid(int,int*,int);
void rb_syswait(int);
int rb_spawn(int, VALUE*);
VALUE rb_proc_times(VALUE);
VALUE rb_detach_process(int);
/* range.c */
VALUE rb_range_new(VALUE, VALUE, int);
VALUE rb_range_beg_len(VALUE, long*, long*, long, int);
VALUE rb_length_by_each(VALUE);
/* re.c */
int rb_memcmp(char*,char*,long);
int rb_memcicmp(char*,char*,long);
long rb_memsearch(char*,long,char*,long);
VALUE rb_reg_nth_defined(int, VALUE);
VALUE rb_reg_nth_match(int, VALUE);
VALUE rb_reg_last_match(VALUE);
VALUE rb_reg_match_pre(VALUE);
VALUE rb_reg_match_post(VALUE);
VALUE rb_reg_match_last(VALUE);
VALUE rb_reg_new(const char*, long, int);
VALUE rb_reg_compile(const char*, long, int);
VALUE rb_reg_match(VALUE, VALUE);
VALUE rb_reg_match2(VALUE);
int rb_reg_options(VALUE);
void rb_set_kcode(const char*);
const char* rb_get_kcode(void);
/* ruby.c */
RUBY_EXTERN VALUE rb_argv;
RUBY_EXTERN VALUE rb_argv0;
void rb_load_file(const char*);
void ruby_script(const char*);
void ruby_prog_init(void);
void ruby_set_argv(int, char**);
void ruby_process_options(int, char**);
void ruby_load_script(void);
void ruby_init_loadpath(void);
void ruby_incpush(const char*);
/* signal.c */
VALUE rb_f_kill(int, VALUE*);
void rb_gc_mark_trap_list(void);
#ifdef POSIX_SIGNAL
#define posix_signal ruby_posix_signal
void posix_signal(int, RETSIGTYPE (*)(int));
#ifdef HAVE_NATIVETHREAD
#define posix_nativethread_signal ruby_posix_nativethread_signal
void posix_nativethread_signal(int, RETSIGTYPE (*)(int));
#endif
#endif
void rb_trap_exit(void);
void rb_trap_exec(void);
const char *ruby_signal_name(int);
/* sprintf.c */
VALUE rb_f_sprintf(int, const VALUE*);
PRINTF_ARGS(VALUE rb_sprintf(const char*, ...), 1, 2);
VALUE rb_vsprintf(const char*, va_list);
VALUE rb_str_format(int, const VALUE *, VALUE);
/* string.c */
VALUE rb_str_new(const char*, long);
VALUE rb_str_new2(const char*);
VALUE rb_str_new3(VALUE);
VALUE rb_str_new4(VALUE);
VALUE rb_str_new5(VALUE, const char*, long);
VALUE rb_tainted_str_new(const char*, long);
VALUE rb_tainted_str_new2(const char*);
VALUE rb_str_buf_new(long);
VALUE rb_str_buf_new2(const char*);
VALUE rb_str_buf_append(VALUE, VALUE);
VALUE rb_str_buf_cat(VALUE, const char*, long);
VALUE rb_str_buf_cat2(VALUE, const char*);
VALUE rb_obj_as_string(VALUE);
VALUE rb_check_string_type(VALUE);
VALUE rb_str_dup(VALUE);
VALUE rb_str_locktmp(VALUE);
VALUE rb_str_unlocktmp(VALUE);
VALUE rb_str_dup_frozen(VALUE);
VALUE rb_str_plus(VALUE, VALUE);
VALUE rb_str_times(VALUE, VALUE);
VALUE rb_str_substr(VALUE, long, long);
void rb_str_modify(VALUE);
VALUE rb_str_freeze(VALUE);
VALUE rb_str_resize(VALUE, long);
VALUE rb_str_cat(VALUE, const char*, long);
VALUE rb_str_cat2(VALUE, const char*);
VALUE rb_str_append(VALUE, VALUE);
VALUE rb_str_concat(VALUE, VALUE);
int rb_str_hash(VALUE);
int rb_str_cmp(VALUE, VALUE);
VALUE rb_str_upto(VALUE, VALUE, int);
void rb_str_update(VALUE, long, long, VALUE);
VALUE rb_str_inspect(VALUE);
VALUE rb_str_dump(VALUE);
VALUE rb_str_split(VALUE, const char*);
void rb_str_associate(VALUE, VALUE);
VALUE rb_str_associated(VALUE);
void rb_str_setter(VALUE, ID, VALUE*);
VALUE rb_str_intern(VALUE);
/* struct.c */
VALUE rb_struct_new(VALUE, ...);
VALUE rb_struct_define(const char*, ...);
VALUE rb_struct_alloc(VALUE, VALUE);
VALUE rb_struct_aref(VALUE, VALUE);
VALUE rb_struct_aset(VALUE, VALUE, VALUE);
VALUE rb_struct_getmember(VALUE, ID);
VALUE rb_struct_iv_get(VALUE, const char*);
VALUE rb_struct_s_members(VALUE);
VALUE rb_struct_members(VALUE);
/* time.c */
VALUE rb_time_new(time_t, time_t);
/* variable.c */
VALUE rb_mod_name(VALUE);
VALUE rb_class_path(VALUE);
void rb_set_class_path(VALUE, VALUE, const char*);
VALUE rb_path2class(const char*);
void rb_name_class(VALUE, ID);
VALUE rb_class_name(VALUE);
void rb_autoload(VALUE, ID, const char*);
VALUE rb_autoload_load(VALUE, ID);
VALUE rb_autoload_p(VALUE, ID);
void rb_gc_mark_global_tbl(void);
VALUE rb_f_trace_var(int, VALUE*);
VALUE rb_f_untrace_var(int, VALUE*);
VALUE rb_f_global_variables(void);
void rb_alias_variable(ID, ID);
struct st_table* rb_generic_ivar_table(VALUE);
void rb_copy_generic_ivar(VALUE,VALUE);
void rb_mark_generic_ivar(VALUE);
void rb_mark_generic_ivar_tbl(void);
void rb_free_generic_ivar(VALUE);
VALUE rb_ivar_get(VALUE, ID);
VALUE rb_ivar_set(VALUE, ID, VALUE);
VALUE rb_ivar_defined(VALUE, ID);
VALUE rb_iv_set(VALUE, const char*, VALUE);
VALUE rb_iv_get(VALUE, const char*);
VALUE rb_attr_get(VALUE, ID);
VALUE rb_obj_instance_variables(VALUE);
VALUE rb_obj_remove_instance_variable(VALUE, VALUE);
void *rb_mod_const_at(VALUE, void*);
void *rb_mod_const_of(VALUE, void*);
VALUE rb_const_list(void*);
VALUE rb_mod_constants(VALUE);
VALUE rb_mod_remove_const(VALUE, VALUE);
int rb_const_defined(VALUE, ID);
int rb_const_defined_at(VALUE, ID);
int rb_const_defined_from(VALUE, ID);
VALUE rb_const_get(VALUE, ID);
VALUE rb_const_get_at(VALUE, ID);
VALUE rb_const_get_from(VALUE, ID);
void rb_const_set(VALUE, ID, VALUE);
VALUE rb_mod_constants(VALUE);
VALUE rb_mod_const_missing(VALUE,VALUE);
VALUE rb_cvar_defined(VALUE, ID);
#define RB_CVAR_SET_4ARGS 1
void rb_cvar_set(VALUE, ID, VALUE, int);
VALUE rb_cvar_get(VALUE, ID);
void rb_cv_set(VALUE, const char*, VALUE);
VALUE rb_cv_get(VALUE, const char*);
void rb_define_class_variable(VALUE, const char*, VALUE);
VALUE rb_mod_class_variables(VALUE);
VALUE rb_mod_remove_cvar(VALUE, VALUE);
/* version.c */
void ruby_show_version(void);
void ruby_show_copyright(void);

#endif /* RUBY_INTERN_H */
/* [<][>][^][v] [top][bottom][index] [help] */


io.c

root/io.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. is_socket
  2. rb_eof_error
  3. rb_io_taint_check
  4. rb_io_check_initialized
  5. rb_io_check_closed
  6. rb_io_get_io
  7. rb_io_check_io
  8. io_unread
  9. io_ungetc
  10. flush_before_seek
  11. rb_io_check_readable
  12. rb_io_check_writable
  13. rb_read_pending
  14. rb_io_read_pending
  15. rb_read_check
  16. rb_io_read_check
  17. ruby_dup
  18. io_alloc
  19. wsplit_p
  20. io_fflush
  21. wait_readable
  22. rb_io_wait_readable
  23. wait_writable
  24. rb_io_wait_writable
  25. io_fwrite
  26. rb_io_fwrite
  27. io_write
  28. rb_io_write
  29. rb_io_addstr
  30. rb_io_flush
  31. rb_io_tell
  32. rb_io_seek
  33. rb_io_seek_m
  34. rb_io_set_pos
  35. rb_io_rewind
  36. io_getc
  37. rb_io_eof
  38. rb_io_sync
  39. rb_io_set_sync
  40. rb_io_fsync
  41. rb_io_fileno
  42. rb_io_pid
  43. rb_io_inspect
  44. rb_io_to_io
  45. read_buffered_data
  46. io_fread
  47. rb_io_fread
  48. remain_size
  49. read_all
  50. io_getpartial
  51. io_readpartial
  52. io_read
  53. appendline
  54. swallow
  55. rb_io_getline_fast
  56. rscheck
  57. rb_io_getline
  58. rb_io_gets
  59. rb_io_gets_m
  60. rb_io_lineno
  61. rb_io_set_lineno
  62. lineno_setter
  63. argf_set_lineno
  64. argf_lineno
  65. rb_io_readline
  66. rb_io_readlines
  67. rb_io_each_line
  68. rb_io_each_byte
  69. rb_io_getc
  70. rb_getc
  71. rb_io_readchar
  72. rb_io_ungetc
  73. rb_io_isatty
  74. fptr_finalize
  75. rb_io_fptr_cleanup
  76. rb_io_fptr_finalize
  77. rb_io_close
  78. rb_io_close_m
  79. io_close
  80. rb_io_closed
  81. rb_io_close_read
  82. rb_io_close_write
  83. rb_io_sysseek
  84. rb_io_syswrite
  85. rb_io_sysread
  86. rb_io_binmode
  87. rb_io_flags_mode
  88. rb_io_mode_flags
  89. rb_io_modenum_flags
  90. rb_io_mode_modenum
  91. rb_io_modenum_mode
  92. rb_sysopen
  93. rb_fopen
  94. rb_fdopen
  95. io_check_tty
  96. rb_file_open_internal
  97. rb_file_open
  98. rb_file_sysopen_internal
  99. rb_file_sysopen
  100. pipe_add_fptr
  101. pipe_del_fptr
  102. pipe_atexit
  103. pipe_finalize
  104. rb_io_synchronized
  105. rb_io_unbuffered
  106. popen_redirect
  107. popen_exec
  108. pipe_open
  109. rb_io_s_popen
  110. rb_open_file
  111. rb_io_s_open
  112. rb_io_s_sysopen
  113. rb_f_open
  114. rb_io_open
  115. io_reopen
  116. rb_io_reopen
  117. rb_io_init_copy
  118. rb_io_printf
  119. rb_f_printf
  120. rb_io_print
  121. rb_f_print
  122. rb_io_putc
  123. rb_f_putc
  124. io_puts_ary
  125. rb_io_puts
  126. rb_f_puts
  127. rb_p
  128. rb_f_p
  129. rb_obj_display
  130. rb_write_error2
  131. rb_write_error
  132. must_respond_to
  133. stdout_setter
  134. defout_setter
  135. deferr_setter
  136. prep_io
  137. prep_stdio
  138. rb_io_stdio_file
  139. rb_io_initialize
  140. rb_file_initialize
  141. rb_io_s_new
  142. rb_io_s_for_fd
  143. argf_forward
  144. argf_close
  145. next_argv
  146. argf_getline
  147. rb_f_gets
  148. rb_gets
  149. rb_f_readline
  150. rb_f_getc
  151. rb_f_readlines
  152. rb_f_backquote
  153. select_internal
  154. select_call
  155. select_end
  156. rb_f_select
  157. io_cntl
  158. rb_io_ctl
  159. rb_io_ioctl
  160. rb_io_fcntl
  161. rb_f_syscall
  162. io_new_instance
  163. rb_io_s_pipe
  164. io_s_foreach
  165. rb_io_s_foreach
  166. io_s_readlines
  167. rb_io_s_readlines
  168. io_s_read
  169. rb_io_s_read
  170. argf_tell
  171. argf_seek_m
  172. argf_set_pos
  173. argf_rewind
  174. argf_fileno
  175. argf_to_io
  176. argf_eof
  177. argf_read
  178. argf_readpartial_rescue
  179. argf_readpartial
  180. argf_getc
  181. argf_readchar
  182. argf_each_line
  183. argf_each_byte
  184. argf_filename
  185. argf_file
  186. argf_binmode
  187. argf_skip
  188. argf_close_m
  189. argf_closed
  190. argf_to_s
  191. opt_i_get
  192. opt_i_set
  193. Init_IO
/**********************************************************************

  io.c -

  $Author: akr $
  $Date: 2005/12/19 17:10:33 $
  created at: Fri Oct 15 18:08:59 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto
  Copyright (C) 2000  Network Applied Communication Laboratory, Inc.
  Copyright (C) 2000  Information-technology Promotion Agency, Japan

**********************************************************************/

#include "ruby.h"
#include "rubyio.h"
#include "rubysig.h"
#include <ctype.h>
#include <errno.h>

#include <sys/types.h>
#if !defined(_WIN32) && !defined(__DJGPP__)
# if defined(__BEOS__)
#  include <net/socket.h>
# else
#  include <sys/socket.h>
# endif
#endif

#if defined(MSDOS) || defined(__BOW__) || defined(__CYGWIN__) || defined(_WIN32) || defined(__human68k__) || defined(__EMX__) || defined(__BEOS__)
# define NO_SAFE_RENAME
#endif

#if defined(MSDOS) || defined(__CYGWIN__) || defined(_WIN32)
# define NO_LONG_FNAME
#endif

#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(sun) || defined(_nec_ews)
# define USE_SETVBUF
#endif

#ifdef __QNXNTO__
#include "unix.h"
#endif

#include <sys/types.h>
#if defined(HAVE_SYS_IOCTL_H) && !defined(DJGPP) && !defined(_WIN32) && !defined(__human68k__)
#include <sys/ioctl.h>
#endif
#if defined(HAVE_FCNTL_H) || defined(_WIN32)
#include <fcntl.h>
#elif defined(HAVE_SYS_FCNTL_H)
#include <sys/fcntl.h>
#endif

#if !HAVE_OFF_T && !defined(off_t)
# define off_t  long
#endif

#include <sys/stat.h>

/* EMX has sys/param.h, but.. */
#if defined(HAVE_SYS_PARAM_H) && !(defined(__EMX__) || defined(__HIUX_MPP__))
# include <sys/param.h>
#endif

#if !defined NOFILE
# define NOFILE 64
#endif

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#ifdef HAVE_SYSCALL_H
#include <syscall.h>
#elif defined HAVE_SYS_SYSCALL_H
#include <sys/syscall.h>
#endif

extern void Init_File(void);

#ifdef __BEOS__
# ifndef NOFILE
#  define NOFILE (OPEN_MAX)
# endif
#include <net/socket.h>
#endif

#include "util.h"

#ifndef O_ACCMODE
#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
#endif

#if SIZEOF_OFF_T > SIZEOF_LONG && !defined(HAVE_LONG_LONG)
# error off_t is bigger than long, but you have no long long...
#endif

#ifndef PIPE_BUF
# ifdef _POSIX_PIPE_BUF
#  define PIPE_BUF _POSIX_PIPE_BUF
# else
#  define PIPE_BUF 512 /* is this ok? */
# endif
#endif

VALUE rb_cIO;
VALUE rb_eEOFError;
VALUE rb_eIOError;

VALUE rb_stdin, rb_stdout, rb_stderr;
VALUE rb_deferr;                /* rescue VIM plugin */
static VALUE orig_stdout, orig_stderr;

VALUE rb_output_fs;
VALUE rb_rs;
VALUE rb_output_rs;
VALUE rb_default_rs;

static VALUE argf;

static ID id_write, id_read, id_getc, id_flush;

extern char *ruby_inplace_mode;

struct timeval rb_time_interval(VALUE);

static VALUE filename, current_file;
static int gets_lineno;
static int init_p = 0, next_p = 0;
static VALUE lineno = INT2FIX(0);

#ifdef _STDIO_USES_IOSTREAM  /* GNU libc */
#  ifdef _IO_fpos_t
#    define STDIO_READ_DATA_PENDING(fp) ((fp)->_IO_read_ptr != (fp)->_IO_read_end)
#  else
#    define STDIO_READ_DATA_PENDING(fp) ((fp)->_gptr < (fp)->_egptr)
#  endif
#elif defined(FILE_COUNT)
#  define STDIO_READ_DATA_PENDING(fp) ((fp)->FILE_COUNT > 0)
#elif defined(FILE_READEND)
#  define STDIO_READ_DATA_PENDING(fp) ((fp)->FILE_READPTR < (fp)->FILE_READEND)
#elif defined(__BEOS__)
#  define STDIO_READ_DATA_PENDING(fp) (fp->_state._eof == 0)
#elif defined(__VMS)
#  define STDIO_READ_DATA_PENDING(fp) (((unsigned int)(*(fp))->_cnt) > 0)
#else
#  define STDIO_READ_DATA_PENDING(fp) (!feof(fp))
#endif

#if defined(__VMS)
#define fopen(file_spec, mode)  fopen(file_spec, mode, "rfm=stmlf")
#define open(file_spec, flags, mode)  open(file_spec, flags, mode, "rfm=stmlf")
#endif

#define READ_DATA_PENDING(fptr) ((fptr)->rbuf_len)
#define READ_DATA_PENDING_COUNT(fptr) ((fptr)->rbuf_len)
#define READ_DATA_PENDING_PTR(fptr) ((fptr)->rbuf+(fptr)->rbuf_off)
#define READ_DATA_BUFFERED(fptr) READ_DATA_PENDING(fptr)

#define READ_CHECK(fptr) do {\
    if (!READ_DATA_PENDING(fptr)) {\
        rb_thread_wait_fd((fptr)->fd);\
        rb_io_check_closed(fptr);\
     }\
} while(0)

#ifndef S_ISSOCK
#  ifdef _S_ISSOCK
#    define S_ISSOCK(m) _S_ISSOCK(m)
#  else
#    ifdef _S_IFSOCK
#      define S_ISSOCK(m) ((m & S_IFMT) == _S_IFSOCK)
#    else
#      ifdef S_IFSOCK
#        define S_ISSOCK(m) ((m & S_IFMT) == S_IFSOCK)
#      endif
#    endif
#  endif
#endif

#if defined(_WIN32)
#define is_socket(fd, path)     rb_w32_is_socket(fd)
#elif !defined(S_ISSOCK)
#define is_socket(fd, path)     0
#define shutdown(a,b)   0
#else
static int
is_socket(int fd, const char *path)
{
    struct stat sbuf;
    if (fstat(fd, &sbuf) < 0)
        rb_sys_fail(path);
    return S_ISSOCK(sbuf.st_mode);
}
#endif

void
rb_eof_error(void)
{
    rb_raise(rb_eEOFError, "end of file reached");
}

VALUE
rb_io_taint_check(VALUE io)
{
    if (!OBJ_TAINTED(io) && rb_safe_level() >= 4)
        rb_raise(rb_eSecurityError, "Insecure: operation on untainted IO");
    rb_check_frozen(io);
    return io;
}

void
rb_io_check_initialized(OpenFile *fptr)
{
    if (!fptr) {
        rb_raise(rb_eIOError, "uninitialized stream");
    }
}

void
rb_io_check_closed(OpenFile *fptr)
{
    rb_io_check_initialized(fptr);
    if (fptr->fd < 0) {
        rb_raise(rb_eIOError, "closed stream");
    }
}

static int io_fflush(OpenFile *);

static VALUE
rb_io_get_io(VALUE io)
{
    return rb_convert_type(io, T_FILE, "IO", "to_io");
}

static VALUE
rb_io_check_io(VALUE io)
{
    return rb_check_convert_type(io, T_FILE, "IO", "to_io");
}

static void
io_unread(OpenFile *fptr)
{
    off_t r;
    rb_io_check_closed(fptr);
    if (fptr->rbuf_len == 0 || fptr->mode & FMODE_DUPLEX)
        return;
    /* xxx: target position may be negative if buffer is filled by ungetc */
    r = lseek(fptr->fd, -fptr->rbuf_len, SEEK_CUR);
    if (r < 0) {
        if (errno == ESPIPE)
            fptr->mode |= FMODE_DUPLEX;
        return;
    }
    fptr->rbuf_off = 0;
    fptr->rbuf_len = 0;
    return;
}

static int
io_ungetc(int c, OpenFile *fptr)
{
    if (fptr->rbuf == NULL) {
        fptr->rbuf_off = 0;
        fptr->rbuf_len = 0;
        fptr->rbuf_capa = 8192;
        fptr->rbuf = ALLOC_N(char, fptr->rbuf_capa);
    }
    if (c < 0 || fptr->rbuf_len == fptr->rbuf_capa) {
        return -1;
    }
    if (fptr->rbuf_off == 0) {
        if (fptr->rbuf_len)
            MEMMOVE(fptr->rbuf+1, fptr->rbuf, char, fptr->rbuf_len);
        fptr->rbuf_off = 1;
    }
    fptr->rbuf_off--;
    fptr->rbuf_len++;
    fptr->rbuf[fptr->rbuf_off] = c;
    return c;
}

static OpenFile *
flush_before_seek(OpenFile *fptr)
{
    io_fflush(fptr);
    io_unread(fptr);
    return fptr;
}

#define io_seek(fptr, ofs, whence) lseek(flush_before_seek(fptr)->fd, ofs, whence)
#define io_tell(fptr) lseek(flush_before_seek(fptr)->fd, 0, SEEK_CUR)

#ifndef SEEK_CUR
# define SEEK_SET 0
# define SEEK_CUR 1
# define SEEK_END 2
#endif

#define FMODE_SYNCWRITE (FMODE_SYNC|FMODE_WRITABLE)

void
rb_io_check_readable(OpenFile *fptr)
{
    rb_io_check_closed(fptr);
    if (!(fptr->mode & FMODE_READABLE)) {
        rb_raise(rb_eIOError, "not opened for reading");
    }
    if (fptr->wbuf_len) {
        io_fflush(fptr);
    }
}

void
rb_io_check_writable(OpenFile *fptr)
{
    rb_io_check_closed(fptr);
    if (!(fptr->mode & FMODE_WRITABLE)) {
        rb_raise(rb_eIOError, "not opened for writing");
    }
    if (fptr->rbuf_len) {
        io_unread(fptr);
    }
}

int
rb_read_pending(FILE *fp)
{
    return STDIO_READ_DATA_PENDING(fp);
}

int
rb_io_read_pending(OpenFile *fptr)
{
    return READ_DATA_PENDING(fptr);
}

void
rb_read_check(FILE *fp)
{
    if (!STDIO_READ_DATA_PENDING(fp)) {
        rb_thread_wait_fd(fileno(fp));
    }
}

void
rb_io_read_check(OpenFile *fptr)
{
    if (!READ_DATA_PENDING(fptr)) {
        rb_thread_wait_fd(fptr->fd);
    }
    return;
}

static int
ruby_dup(int orig)
{
    int fd;

    fd = dup(orig);
    if (fd < 0) {
        if (errno == EMFILE || errno == ENFILE) {
            rb_gc();
            fd = dup(orig);
        }
        if (fd < 0) {
            rb_sys_fail(0);
        }
    }
    return fd;
}

static VALUE
io_alloc(VALUE klass)
{
    NEWOBJ(io, struct RFile);
    OBJSETUP(io, klass, T_FILE);

    io->fptr = 0;

    return (VALUE)io;
}

#ifndef S_ISREG
#   define S_ISREG(m) ((m & S_IFMT) == S_IFREG)
#endif

static int
wsplit_p(OpenFile *fptr)
{
    int r;
    if (!(fptr->mode & FMODE_WSPLIT_INITIALIZED)) {
        struct stat buf;
        if (fstat(fptr->fd, &buf) == 0 &&
            !S_ISREG(buf.st_mode)
#if defined(HAVE_FCNTL) && defined(F_GETFL) && defined(O_NONBLOCK)
            && (r = fcntl(fptr->fd, F_GETFL)) != -1 &&
            !(r & O_NONBLOCK)
#endif
            ) {
            fptr->mode |= FMODE_WSPLIT;
        }
        fptr->mode |= FMODE_WSPLIT_INITIALIZED;
    }
    return fptr->mode & FMODE_WSPLIT;
}

static int
io_fflush(OpenFile *fptr)
{
    int r, l;
    int wbuf_off, wbuf_len;

    rb_io_check_closed(fptr);
    if (fptr->wbuf_len == 0)
        return 0;
    if (!rb_thread_fd_writable(fptr->fd)) {
        rb_io_check_closed(fptr);
    }
  retry:
    if (fptr->wbuf_len == 0)
        return 0;
    wbuf_off = fptr->wbuf_off;
    wbuf_len = fptr->wbuf_len;
    l = fptr->wbuf_len;
    if (PIPE_BUF < l &&
        !rb_thread_critical &&
        !rb_thread_alone() &&
        wsplit_p(fptr)) {
        l = PIPE_BUF;
    }
    TRAP_BEG;
    r = write(fptr->fd, fptr->wbuf+fptr->wbuf_off, l);
    TRAP_END; /* xxx: signal handler may modify wbuf */
    if (r == fptr->wbuf_len) {
        fptr->wbuf_off = 0;
        fptr->wbuf_len = 0;
        return 0;
    }
    if (0 <= r) {
        fptr->wbuf_off = (wbuf_off += r);
        fptr->wbuf_len = (wbuf_len -= r);
        errno = EAGAIN;
    }
    if (rb_io_wait_writable(fptr->fd)) {
        rb_io_check_closed(fptr);
        goto retry;
    }
    return -1;
}

#ifdef HAVE_RB_FD_INIT
static VALUE
wait_readable(p)
    VALUE p;
{
    rb_fdset_t *rfds = (rb_fdset_t *)p;

    return rb_thread_select(rb_fd_max(rfds), rb_fd_ptr(rfds), NULL, NULL, NULL);
}
#endif

int
rb_io_wait_readable(int f)
{
    rb_fdset_t rfds;

    switch (errno) {
      case EINTR:
#if defined(ERESTART)
      case ERESTART:
#endif
        rb_thread_wait_fd(f);
        return Qtrue;

      case EAGAIN:
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
      case EWOULDBLOCK:
#endif
        rb_fd_init(&rfds);
        rb_fd_set(f, &rfds);
#ifdef HAVE_RB_FD_INIT
        rb_ensure(wait_readable, (VALUE)&rfds,
                  (VALUE (*)(VALUE))rb_fd_term, (VALUE)&rfds);
#else
        rb_thread_select(f + 1, &rfds, NULL, NULL, NULL);
#endif
        return Qtrue;

      default:
        return Qfalse;
    }
}

#ifdef HAVE_RB_FD_INIT
static VALUE
wait_writable(p)
    VALUE p;
{
    rb_fdset_t *wfds = (rb_fdset_t *)p;

    return rb_thread_select(rb_fd_max(wfds), NULL, rb_fd_ptr(wfds), NULL, NULL);
}
#endif

int
rb_io_wait_writable(int f)
{
    rb_fdset_t wfds;

    switch (errno) {
      case EINTR:
#if defined(ERESTART)
      case ERESTART:
#endif
        rb_thread_fd_writable(f);
        return Qtrue;

      case EAGAIN:
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
      case EWOULDBLOCK:
#endif
        rb_fd_init(&wfds);
        rb_fd_set(f, &wfds);
#ifdef HAVE_RB_FD_INIT
        rb_ensure(wait_writable, (VALUE)&wfds,
                  (VALUE (*)(VALUE))rb_fd_term, (VALUE)&wfds);
#else
        rb_thread_select(f + 1, NULL, &wfds, NULL, NULL);
#endif
        return Qtrue;

      default:
        return Qfalse;
    }
}

/* writing functions */
static long
io_fwrite(VALUE str, OpenFile *fptr)
{
    long len, n, r, l, offset = 0;

    len = RSTRING(str)->len;
    if ((n = len) <= 0) return n;
    if (fptr->wbuf == NULL && !(fptr->mode & FMODE_SYNC)) {
        fptr->wbuf_off = 0;
        fptr->wbuf_len = 0;
        fptr->wbuf_capa = 8192;
        fptr->wbuf = ALLOC_N(char, fptr->wbuf_capa);
    }
    if ((fptr->mode & FMODE_SYNC) ||
        (fptr->wbuf && fptr->wbuf_capa <= fptr->wbuf_len + len) ||
        ((fptr->mode & FMODE_TTY) && memchr(RSTRING(str)->ptr+offset, '\n', len))) {
        /* xxx: use writev to avoid double write if available */
        if (fptr->wbuf_len && fptr->wbuf_len+len <= fptr->wbuf_capa) {
            if (fptr->wbuf_capa < fptr->wbuf_off+fptr->wbuf_len+len) {
                MEMMOVE(fptr->wbuf, fptr->wbuf+fptr->wbuf_off, char, fptr->wbuf_len);
                fptr->wbuf_off = 0;
            }
            MEMMOVE(fptr->wbuf+fptr->wbuf_off+fptr->wbuf_len, RSTRING(str)->ptr+offset, char, len);
            fptr->wbuf_len += len;
            n = 0;
        }
        if (io_fflush(fptr) < 0)
            return -1L;
        if (n == 0)
            return len;
        /* avoid context switch between "a" and "\n" in STDERR.puts "a".
           [ruby-dev:25080] */
        if (fptr->stdio_file != stderr && !rb_thread_fd_writable(fptr->fd)) {
            rb_io_check_closed(fptr);
        }
      retry:
        l = n;
        if (PIPE_BUF < l &&
            !rb_thread_critical &&
            !rb_thread_alone() &&
            wsplit_p(fptr)) {
            l = PIPE_BUF;
        }
        TRAP_BEG;
        r = write(fptr->fd, RSTRING(str)->ptr+offset, l);
        TRAP_END; /* xxx: signal handler may modify given string. */
        if (r == n) return len;
        if (0 <= r) {
            offset += r;
            n -= r;
            errno = EAGAIN;
        }
        if (rb_io_wait_writable(fptr->fd)) {
            rb_io_check_closed(fptr);
            if (offset < RSTRING(str)->len)
                goto retry;
        }
        return -1L;
    }

    if (fptr->wbuf_off) {
        if (fptr->wbuf_len)
            MEMMOVE(fptr->wbuf, fptr->wbuf+fptr->wbuf_off, char, fptr->wbuf_len);
        fptr->wbuf_off = 0;
    }
    MEMMOVE(fptr->wbuf+fptr->wbuf_off+fptr->wbuf_len, RSTRING(str)->ptr+offset, char, len);
    fptr->wbuf_len += len;
    return len;
}

long
rb_io_fwrite(const char *ptr, long len, FILE *f)
{
    OpenFile of;

    of.fd = fileno(f);
    of.stdio_file = f;
    of.mode = FMODE_WRITABLE;
    of.path = NULL;
    return io_fwrite(rb_str_new(ptr, len), &of);
}

/*
 *  call-seq:
 *     ios.write(string)    => integer
 *
 *  Writes the given string to <em>ios</em>. The stream must be opened
 *  for writing. If the argument is not a string, it will be converted
 *  to a string using <code>to_s</code>. Returns the number of bytes
 *  written.
 *
 *     count = $stdout.write( "This is a test\n" )
 *     puts "That was #{count} bytes of data"
 *
 *  <em>produces:</em>
 *
 *     This is a test
 *     That was 15 bytes of data
 */

static VALUE
io_write(VALUE io, VALUE str)
{
    OpenFile *fptr;
    long n;
    VALUE tmp;

    rb_secure(4);
    str = rb_obj_as_string(str);
    tmp = rb_io_check_io(io);
    if (NIL_P(tmp)) {
        /* port is not IO, call write method for it. */
        return rb_funcall(io, id_write, 1, str);
    }
    io = tmp;
    if (RSTRING(str)->len == 0) return INT2FIX(0);

    GetOpenFile(io, fptr);
    rb_io_check_writable(fptr);

    n = io_fwrite(str, fptr);
    if (n == -1L) rb_sys_fail(fptr->path);

    return LONG2FIX(n);
}

VALUE
rb_io_write(VALUE io, VALUE str)
{
    return rb_funcall(io, id_write, 1, str);
}

/*
 *  call-seq:
 *     ios << obj     => ios
 *
 *  String Output---Writes <i>obj</i> to <em>ios</em>.
 *  <i>obj</i> will be converted to a string using
 *  <code>to_s</code>.
 *
 *     $stdout << "Hello " << "world!\n"
 *
 *  <em>produces:</em>
 *
 *     Hello world!
 */

VALUE
rb_io_addstr(VALUE io, VALUE str)
{
    rb_io_write(io, str);
    return io;
}

/*
 *  call-seq:
 *     ios.flush    => ios
 *
 *  Flushes any buffered data within <em>ios</em> to the underlying
 *  operating system (note that this is Ruby internal buffering only;
 *  the OS may buffer the data as well).
 *
 *     $stdout.print "no newline"
 *     $stdout.flush
 *
 *  <em>produces:</em>
 *
 *     no newline
 */

VALUE
rb_io_flush(VALUE io)
{
    OpenFile *fptr;

    if (TYPE(io) != T_FILE) {
        return rb_funcall(io, id_flush, 0);
    }

    GetOpenFile(io, fptr);

    if (fptr->mode & FMODE_WRITABLE) {
        io_fflush(fptr);
    }
    if (fptr->mode & FMODE_READABLE) {
        io_unread(fptr);
    }

    return io;
}

/*
 *  call-seq:
 *     ios.pos     => integer
 *     ios.tell    => integer
 *
 *  Returns the current offset (in bytes) of <em>ios</em>.
 *
 *     f = File.new("testfile")
 *     f.pos    #=> 0
 *     f.gets   #=> "This is line one\n"
 *     f.pos    #=> 17
 */

static VALUE
rb_io_tell(VALUE io)
{
    OpenFile *fptr;
    off_t pos;

    GetOpenFile(io, fptr);
    pos = io_tell(fptr);
    if (pos < 0) rb_sys_fail(fptr->path);
    return OFFT2NUM(pos);
}

static VALUE
rb_io_seek(VALUE io, VALUE offset, int whence)
{
    OpenFile *fptr;
    off_t pos;

    pos = NUM2OFFT(offset);
    GetOpenFile(io, fptr);
    pos = io_seek(fptr, pos, whence);
    if (pos < 0) rb_sys_fail(fptr->path);

    return INT2FIX(0);
}

/*
 *  call-seq:
 *     ios.seek(amount, whence=SEEK_SET) -> 0
 *
 *  Seeks to a given offset <i>anInteger</i> in the stream according to
 *  the value of <i>whence</i>:
 *
 *    IO::SEEK_CUR  | Seeks to _amount_ plus current position
 *    --------------+----------------------------------------------------
 *    IO::SEEK_END  | Seeks to _amount_ plus end of stream (you probably
 *                  | want a negative value for _amount_)
 *    --------------+----------------------------------------------------
 *    IO::SEEK_SET  | Seeks to the absolute location given by _amount_
 *
 *  Example:
 *
 *     f = File.new("testfile")
 *     f.seek(-13, IO::SEEK_END)   #=> 0
 *     f.readline                  #=> "And so on...\n"
 */

static VALUE
rb_io_seek_m(int argc, VALUE *argv, VALUE io)
{
    VALUE offset, ptrname;
    int whence = SEEK_SET;

    if (rb_scan_args(argc, argv, "11", &offset, &ptrname) == 2) {
        whence = NUM2INT(ptrname);
    }

    return rb_io_seek(io, offset, whence);
}

/*
 *  call-seq:
 *     ios.pos = integer    => integer
 *
 *  Seeks to the given position (in bytes) in <em>ios</em>.
 *
 *     f = File.new("testfile")
 *     f.pos = 17
 *     f.gets   #=> "This is line two\n"
 */

static VALUE
rb_io_set_pos(VALUE io, VALUE offset)
{
    OpenFile *fptr;
    off_t pos;

    pos = NUM2OFFT(offset);
    GetOpenFile(io, fptr);
    pos = io_seek(fptr, pos, SEEK_SET);
    if (pos < 0) rb_sys_fail(fptr->path);

    return OFFT2NUM(pos);
}

/*
 *  call-seq:
 *     ios.rewind    => 0
 *
 *  Positions <em>ios</em> to the beginning of input, resetting
 *  <code>lineno</code> to zero.
 *
 *     f = File.new("testfile")
 *     f.readline   #=> "This is line one\n"
 *     f.rewind     #=> 0
 *     f.lineno     #=> 0
 *     f.readline   #=> "This is line one\n"
 */

static VALUE
rb_io_rewind(VALUE io)
{
    OpenFile *fptr;

    GetOpenFile(io, fptr);
    if (io_seek(fptr, 0L, 0) < 0) rb_sys_fail(fptr->path);
    if (io == current_file) {
        gets_lineno -= fptr->lineno;
    }
    fptr->lineno = 0;

    return INT2FIX(0);
}

static int
io_getc(OpenFile *fptr)
{
    int r;
    if (fptr->fd == 0 && (fptr->mode & FMODE_TTY) && TYPE(rb_stdout) == T_FILE) {
        OpenFile *ofp;
        GetOpenFile(rb_stdout, ofp);
        if (ofp->mode & FMODE_TTY) {
            rb_io_flush(rb_stdout);
        }
    }
    if (fptr->rbuf == NULL) {
        fptr->rbuf_off = 0;
        fptr->rbuf_len = 0;
        fptr->rbuf_capa = 8192;
        fptr->rbuf = ALLOC_N(char, fptr->rbuf_capa);
    }
    if (fptr->rbuf_len == 0) {
      retry:
        TRAP_BEG;
        r = read(fptr->fd, fptr->rbuf, fptr->rbuf_capa);
        TRAP_END; /* xxx: signal handler may modify rbuf */
        if (r < 0) {
            if (rb_io_wait_readable(fptr->fd))
                goto retry;
            rb_sys_fail(fptr->path);
        }
        fptr->rbuf_off = 0;
        fptr->rbuf_len = r;
        if (r == 0)
            return -1; /* EOF */
    }
    fptr->rbuf_off++;
    fptr->rbuf_len--;
    return (unsigned char)fptr->rbuf[fptr->rbuf_off-1];
}

/*
 *  call-seq:
 *     ios.eof     => true or false
 *     ios.eof?    => true or false
 *
 *  Returns true if <em>ios</em> is at end of file that means
 *  there are no more data to read.
 *  The stream must be opened for reading or an <code>IOError</code> will be
 *  raised.
 *
 *     f = File.new("testfile")
 *     dummy = f.readlines
 *     f.eof   #=> true
 *
 *  If <em>ios</em> is a stream such as pipe or socket, <code>IO#eof?</code>
 *  blocks until the other end sends some data or closes it.
 *
 *     r, w = IO.pipe
 *     Thread.new { sleep 1; w.close }
 *     r.eof?  #=> true after 1 second blocking
 *
 *     r, w = IO.pipe
 *     Thread.new { sleep 1; w.puts "a" }
 *     r.eof?  #=> false after 1 second blocking
 *
 *     r, w = IO.pipe
 *     r.eof?  # blocks forever
 *
 *  Note that <code>IO#eof?</code> reads data to a input buffer.
 *  So <code>IO#sysread</code> doesn't work with <code>IO#eof?</code>.
 */

VALUE
rb_io_eof(VALUE io)
{
    OpenFile *fptr;
    int ch;

    GetOpenFile(io, fptr);
    rb_io_check_readable(fptr);

    if (READ_DATA_PENDING(fptr)) return Qfalse;
    READ_CHECK(fptr);
    ch = io_getc(fptr);

    if (ch != EOF) {
        io_ungetc(ch, fptr);
        return Qfalse;
    }
    return Qtrue;
}

/*
 *  call-seq:
 *     ios.sync    => true or false
 *
 *  Returns the current ``sync mode'' of <em>ios</em>. When sync mode is
 *  true, all output is immediately flushed to the underlying operating
 *  system and is not buffered by Ruby internally. See also
 *  <code>IO#fsync</code>.
 *
 *     f = File.new("testfile")
 *     f.sync   #=> false
 */

static VALUE
rb_io_sync(VALUE io)
{
    OpenFile *fptr;

    GetOpenFile(io, fptr);
    return (fptr->mode & FMODE_SYNC) ? Qtrue : Qfalse;
}

/*
 *  call-seq:
 *     ios.sync = boolean   => boolean
 *
 *  Sets the ``sync mode'' to <code>true</code> or <code>false</code>.
 *  When sync mode is true, all output is immediately flushed to the
 *  underlying operating system and is not buffered internally. Returns
 *  the new state. See also <code>IO#fsync</code>.
 *
 *     f = File.new("testfile")
 *     f.sync = true
 *
 *  <em>(produces no output)</em>
 */

static VALUE
rb_io_set_sync(VALUE io, VALUE mode)
{
    OpenFile *fptr;

    GetOpenFile(io, fptr);
    if (RTEST(mode)) {
        fptr->mode |= FMODE_SYNC;
    }
    else {
        fptr->mode &= ~FMODE_SYNC;
    }
    return mode;
}

/*
 *  call-seq:
 *     ios.fsync   => 0 or nil
 *
 *  Immediately writes all buffered data in <em>ios</em> to disk.
 *  Returns <code>nil</code> if the underlying operating system does not
 *  support <em>fsync(2)</em>. Note that <code>fsync</code> differs from
 *  using <code>IO#sync=</code>. The latter ensures that data is flushed
 *  from Ruby's buffers, but doesn't not guarantee that the underlying
 *  operating system actually writes it to disk.
 */

static VALUE
rb_io_fsync(VALUE io)
{
#ifdef HAVE_FSYNC
    OpenFile *fptr;

    GetOpenFile(io, fptr);

    io_fflush(fptr);
    if (fsync(fptr->fd) < 0)
        rb_sys_fail(fptr->path);
    return INT2FIX(0);
#else
    rb_notimplement();
    return Qnil;                /* not reached */
#endif
}

/*
 *  call-seq:
 *     ios.fileno    => fixnum
 *     ios.to_i      => fixnum
 *
 *  Returns an integer representing the numeric file descriptor for
 *  <em>ios</em>.
 *
 *     $stdin.fileno    #=> 0
 *     $stdout.fileno   #=> 1
 */

static VALUE
rb_io_fileno(VALUE io)
{
    OpenFile *fptr;
    int fd;

    GetOpenFile(io, fptr);
    fd = fptr->fd;
    return INT2FIX(fd);
}

/*
 *  call-seq:
 *     ios.pid    => fixnum
 *
 *  Returns the process ID of a child process associated with
 *  <em>ios</em>. This will be set by <code>IO::popen</code>.
 *
 *     pipe = IO.popen("-")
 *     if pipe
 *       $stderr.puts "In parent, child pid is #{pipe.pid}"
 *     else
 *       $stderr.puts "In child, pid is #{$$}"
 *     end
 *
 *  <em>produces:</em>
 *
 *     In child, pid is 26209
 *     In parent, child pid is 26209
 */

static VALUE
rb_io_pid(VALUE io)
{
    OpenFile *fptr;

    GetOpenFile(io, fptr);
    if (!fptr->pid)
        return Qnil;
    return INT2FIX(fptr->pid);
}

/*
 * call-seq:
 *   ios.inspect   => string
 *
 * Return a string describing this IO object.
 */

static VALUE
rb_io_inspect(VALUE obj)
{
    OpenFile *fptr;
    char *cname, *st = "";

    fptr = RFILE(rb_io_taint_check(obj))->fptr;
    if (!fptr || !fptr->path) return rb_any_to_s(obj);
    cname = rb_obj_classname(obj);
    if (fptr->fd < 0) {
        st = " (closed)";
    }
    return rb_sprintf("#<%s:%s%s>", cname, fptr->path, st);
}

/*
 *  call-seq:
 *     ios.to_io -> ios
 *
 *  Returns <em>ios</em>.
 */

static VALUE
rb_io_to_io(VALUE io)
{
    return io;
}

/* reading functions */
static long
read_buffered_data(char *ptr, long len, OpenFile *fptr)
{
    long n;

    n = READ_DATA_PENDING_COUNT(fptr);
    if (n <= 0) return 0;
    if (n > len) n = len;
    MEMMOVE(ptr, fptr->rbuf+fptr->rbuf_off, char, n);
    fptr->rbuf_off += n;
    fptr->rbuf_len -= n;
    return n;
}

static long
io_fread(VALUE str, long offset, OpenFile *fptr)
{
    long len = RSTRING(str)->len - offset;
    long n = len;
    int c;

    while (n > 0) {
        c = read_buffered_data(RSTRING(str)->ptr+offset, n, fptr);
        if (c > 0) {
            offset += c;
            if ((n -= c) <= 0) break;
        }
        rb_thread_wait_fd(fptr->fd);
        rb_io_check_closed(fptr);
        c = io_getc(fptr);
        if (c < 0) {
            break;
        }
        RSTRING(str)->ptr[offset++] = c;
        if (offset > RSTRING(str)->len) break;
        n--;
    }
    return len - n;
}

long
rb_io_fread(char *ptr, long len, FILE *f)
{
    OpenFile of;
    VALUE str;
    long n;

    of.fd = fileno(f);
    of.stdio_file = f;
    of.mode = FMODE_READABLE;
    str = rb_str_new(ptr, len);
    n = io_fread(str, 0, &of);
    MEMCPY(ptr, RSTRING(str)->ptr, char, n);
    return n;
}

#define SMALLBUF 100

static long
remain_size(OpenFile *fptr)
{
    struct stat st;
    off_t siz = READ_DATA_PENDING_COUNT(fptr);
    off_t pos;

    if (fstat(fptr->fd, &st) == 0  && S_ISREG(st.st_mode)
#ifdef __BEOS__
        && (st.st_dev > 3)
#endif
        )
    {
        io_fflush(fptr);
        pos = lseek(fptr->fd, 0, SEEK_CUR);
        if (st.st_size >= pos && pos >= 0) {
            siz += st.st_size - pos + 1;
            if (siz > LONG_MAX) {
                rb_raise(rb_eIOError, "file too big for single read");
            }
        }
    }
    else {
        siz += BUFSIZ;
    }
    return (long)siz;
}

static VALUE
read_all(OpenFile *fptr, long siz, VALUE str)
{
    long bytes = 0;
    long n;

    if (siz == 0) siz = BUFSIZ;
    if (NIL_P(str)) {
        str = rb_str_new(0, siz);
    }
    else {
        rb_str_resize(str, siz);
    }
    for (;;) {
        READ_CHECK(fptr);
        n = io_fread(str, bytes, fptr);
        if (n == 0 && bytes == 0) {
            break;
        }
        bytes += n;
        if (bytes < siz) break;
        siz += BUFSIZ;
        rb_str_resize(str, siz);
    }
    if (bytes != siz) rb_str_resize(str, bytes);
    OBJ_TAINT(str);

    return str;
}

static VALUE
io_getpartial(int argc, VALUE *argv, VALUE io)
{
    OpenFile *fptr;
    VALUE length, str;
    long n, len;

    rb_scan_args(argc, argv, "11", &length, &str);

    if ((len = NUM2LONG(length)) < 0) {
        rb_raise(rb_eArgError, "negative length %ld given", len);
    }

    if (NIL_P(str)) {
        str = rb_str_new(0, len);
    }
    else {
        StringValue(str);
        rb_str_modify(str);
        rb_str_resize(str, len);
    }
    OBJ_TAINT(str);

    GetOpenFile(io, fptr);
    rb_io_check_readable(fptr);

    if (len == 0)
        return str;

    READ_CHECK(fptr);
    if (RSTRING(str)->len != len) {
      modified:
        rb_raise(rb_eRuntimeError, "buffer string modified");
    }
    n = read_buffered_data(RSTRING(str)->ptr, len, fptr);
    if (n <= 0) {
      again:
        if (RSTRING(str)->len != len) goto modified;
        TRAP_BEG;
        n = read(fptr->fd, RSTRING(str)->ptr, len);
        TRAP_END;
        if (n < 0) {
            if (rb_io_wait_readable(fptr->fd))
                goto again;
            rb_sys_fail(fptr->path);
        }
    }
    rb_str_resize(str, n);

    if (n == 0)
        return Qnil;
    else
        return str;
}

/*
 *  call-seq:
 *     ios.readpartial(maxlen[, outbuf])    => string, outbuf
 *
 *  Reads at most <i>maxlen</i> bytes from the I/O stream but
 *  it blocks only if <em>ios</em> has no data immediately available.
 *  If the optional <i>outbuf</i> argument is present,
 *  it must reference a String, which will receive the data.
 *  It raises <code>EOFError</code> on end of file.
 *
 *  readpartial is designed for streams such as pipe, socket, tty, etc.
 *  It blocks only when no data immediately available.
 *  This means that it blocks only when following all conditions hold.
 *  * the buffer in the IO object is empty.
 *  * the content of the stream is empty.
 *  * the stream is not reached to EOF.
 *
 *  When readpartial blocks, it waits data or EOF on the stream.
 *  If some data is reached, readpartial returns with the data.
 *  If EOF is reached, readpartial raises EOFError.
 *
 *  When readpartial doesn't blocks, it returns or raises immediately.
 *  If the buffer is not empty, it returns the data in the buffer.
 *  Otherwise if the stream has some content,
 *  it returns the data in the stream.
 *  Otherwise if the stream is reached to EOF, it raises EOFError.
 *
 *     r, w = IO.pipe           #               buffer          pipe content
 *     w << "abc"               #               ""              "abc".
 *     r.readpartial(4096)      #=> "abc"       ""              ""
 *     r.readpartial(4096)      # blocks because buffer and pipe is empty.
 *
 *     r, w = IO.pipe           #               buffer          pipe content
 *     w << "abc"               #               ""              "abc"
 *     w.close                  #               ""              "abc" EOF
 *     r.readpartial(4096)      #=> "abc"       ""              EOF
 *     r.readpartial(4096)      # raises EOFError
 *
 *     r, w = IO.pipe           #               buffer          pipe content
 *     w << "abc\ndef\n"        #               ""              "abc\ndef\n"
 *     r.gets                   #=> "abc\n"     "def\n"         ""
 *     w << "ghi\n"             #               "def\n"         "ghi\n"
 *     r.readpartial(4096)      #=> "def\n"     ""              "ghi\n"
 *     r.readpartial(4096)      #=> "ghi\n"     ""              ""
 *
 *  Note that readpartial is nonblocking-flag insensitive.
 *  It blocks even if the nonblocking-flag is set.
 *
 *  Also note that readpartial behaves similar to sysread in blocking mode.
 *  The behavior is identical when the buffer is empty.
 *
 */

static VALUE
io_readpartial(int argc, VALUE *argv, VALUE io)
{
    VALUE ret;

    ret = io_getpartial(argc, argv, io);
    if (NIL_P(ret))
        rb_eof_error();
    else
        return ret;
}

/*
 *  call-seq:
 *     ios.read([length [, buffer]])    => string, buffer, or nil
 *
 *  Reads at most <i>length</i> bytes from the I/O stream, or to the
 *  end of file if <i>length</i> is omitted or is <code>nil</code>.
 *  <i>length</i> must be a non-negative integer or nil.
 *  If the optional <i>buffer</i> argument is present, it must reference
 *  a String, which will receive the data.
 *
 *  At end of file, it returns <code>nil</code> or <code>""</code>
 *  depend on <i>length</i>.
 *  <code><i>ios</i>.read()</code> and
 *  <code><i>ios</i>.read(nil)</code> returns <code>""</code>.
 *  <code><i>ios</i>.read(<i>positive-integer</i>)</code> returns nil.
 *
 *  <code><i>ios</i>.read(0)</code> returns <code>""</code>.
 *
 *     f = File.new("testfile")
 *     f.read(16)   #=> "This is line one"
 */

static VALUE
io_read(int argc, VALUE *argv, VALUE io)
{
    OpenFile *fptr;
    long n, len;
    VALUE length, str;

    rb_scan_args(argc, argv, "02", &length, &str);

    if (NIL_P(length)) {
        if (!NIL_P(str)) StringValue(str);
        GetOpenFile(io, fptr);
        rb_io_check_readable(fptr);
        return read_all(fptr, remain_size(fptr), str);
    }
    len = NUM2LONG(length);
    if (len < 0) {
        rb_raise(rb_eArgError, "negative length %ld given", len);
    }

    if (NIL_P(str)) {
        str = rb_tainted_str_new(0, len);
    }
    else {
        StringValue(str);
        rb_str_modify(str);
        rb_str_resize(str,len);
    }

    GetOpenFile(io, fptr);
    rb_io_check_readable(fptr);
    if (len == 0) return str;

    READ_CHECK(fptr);
    if (RSTRING(str)->len != len) {
        rb_raise(rb_eRuntimeError, "buffer string modified");
    }
    n = io_fread(str, 0, fptr);
    if (n == 0) {
        if (fptr->fd < 0) return Qnil;
        rb_str_resize(str, 0);
        return Qnil;
    }
    rb_str_resize(str, n);
    RSTRING(str)->len = n;
    RSTRING(str)->ptr[n] = '\0';
    OBJ_TAINT(str);

    return str;
}

static int
appendline(OpenFile *fptr, int delim, VALUE *strp)
{
    VALUE str = *strp;
    int c = EOF;

    do {
        long pending = READ_DATA_PENDING_COUNT(fptr);
        if (pending > 0) {
            const char *p = READ_DATA_PENDING_PTR(fptr);
            const char *e = memchr(p, delim, pending);
            long last = 0, len = (c != EOF);
            if (e) pending = e - p + 1;
            len += pending;
            if (!NIL_P(str)) {
                last = RSTRING(str)->len;
                rb_str_resize(str, last + len);
            }
            else {
                *strp = str = rb_str_buf_new(len);
                RSTRING(str)->len = len;
                RSTRING(str)->ptr[len] = '\0';
            }
            if (c != EOF) {
                RSTRING(str)->ptr[last++] = c;
            }
            read_buffered_data(RSTRING(str)->ptr + last, pending, fptr); /* must not fail */
            if (e) return delim;
        }
        else if (c != EOF) {
            if (!NIL_P(str)) {
                char ch = c;
                rb_str_buf_cat(str, &ch, 1);
            }
            else {
                *strp = str = rb_str_buf_new(1);
                RSTRING(str)->ptr[RSTRING(str)->len++] = c;
            }
        }
        rb_thread_wait_fd(fptr->fd);
        rb_io_check_closed(fptr);
        c = io_getc(fptr);
        if (c < 0) {
            return c;
        }
    } while (c != delim);

    {
        char ch = c;
        if (!NIL_P(str)) {
            rb_str_cat(str, &ch, 1);
        }
        else {
            *strp = str = rb_str_new(&ch, 1);
        }
    }

    return c;
}

static inline int
swallow(OpenFile *fptr, int term)
{
    int c;

    do {
        long cnt;
        while ((cnt = READ_DATA_PENDING_COUNT(fptr)) > 0) {
            char buf[1024];
            const char *p = READ_DATA_PENDING_PTR(fptr);
            int i;
            if (cnt > sizeof buf) cnt = sizeof buf;
            if (*p != term) return Qtrue;
            i = cnt;
            while (--i && *++p == term);
            if (!read_buffered_data(buf, cnt - i, fptr)) /* must not fail */
                rb_sys_fail(fptr->path);
        }
        rb_thread_wait_fd(fptr->fd);
        rb_io_check_closed(fptr);
        c = io_getc(fptr);
        if (c != term) {
            io_ungetc(c, fptr);
            return Qtrue;
        }
    } while (c != EOF);
    return Qfalse;
}

static VALUE
rb_io_getline_fast(OpenFile *fptr, unsigned char delim)
{
    VALUE str = Qnil;
    int c;

    while ((c = appendline(fptr, delim, &str)) != EOF && c != delim);

    if (!NIL_P(str)) {
        fptr->lineno++;
        lineno = INT2FIX(fptr->lineno);
        OBJ_TAINT(str);
    }

    return str;
}

static int
rscheck(char *rsptr, long rslen, VALUE rs)
{
    if (RSTRING(rs)->ptr != rsptr && RSTRING(rs)->len != rslen)
        rb_raise(rb_eRuntimeError, "rs modified");
    return 0;
}

static VALUE
rb_io_getline(VALUE rs, VALUE io)
{
    VALUE str = Qnil;
    OpenFile *fptr;

    GetOpenFile(io, fptr);
    rb_io_check_readable(fptr);
    if (NIL_P(rs)) {
        str = read_all(fptr, 0, Qnil);
        if (RSTRING(str)->len == 0) return Qnil;
    }
    else if (rs == rb_default_rs) {
        return rb_io_getline_fast(fptr, '\n');
    }
    else {
        int c, newline;
        char *rsptr;
        long rslen;
        int rspara = 0;

        rslen = RSTRING(rs)->len;
        if (rslen == 0) {
            rsptr = "\n\n";
            rslen = 2;
            rspara = 1;
            swallow(fptr, '\n');
        }
        else if (rslen == 1) {
            return rb_io_getline_fast(fptr, (unsigned char)RSTRING(rs)->ptr[0]);
        }
        else {
            rsptr = RSTRING(rs)->ptr;
        }
        newline = rsptr[rslen - 1];

        while ((c = appendline(fptr, newline, &str)) != EOF) {
            if (c == newline) {
                if (RSTRING(str)->len < rslen) continue;
                if (!rspara) rscheck(rsptr, rslen, rs);
                if (memcmp(RSTRING(str)->ptr + RSTRING(str)->len - rslen,
                           rsptr, rslen) == 0) break;
            }
        }

        if (rspara) {
            if (c != EOF) {
                swallow(fptr, '\n');
            }
        }
    }

    if (!NIL_P(str)) {
        fptr->lineno++;
        lineno = INT2FIX(fptr->lineno);
        OBJ_TAINT(str);
    }

    return str;
}

VALUE
rb_io_gets(VALUE io)
{
    OpenFile *fptr;

    GetOpenFile(io, fptr);
    rb_io_check_readable(fptr);
    return rb_io_getline_fast(fptr, '\n');
}

/*
 *  call-seq:
 *     ios.gets(sep_string=$/)   => string or nil
 *
 *  Reads the next ``line'' from the I/O stream; lines are separated by
 *  <i>sep_string</i>. A separator of <code>nil</code> reads the entire
 *  contents, and a zero-length separator reads the input a paragraph at
 *  a time (two successive newlines in the input separate paragraphs).
 *  The stream must be opened for reading or an <code>IOError</code>
 *  will be raised. The line read in will be returned and also assigned
 *  to <code>$_</code>. Returns <code>nil</code> if called at end of
 *  file.
 *
 *     File.new("testfile").gets   #=> "This is line one\n"
 *     $_                          #=> "This is line one\n"
 */

static VALUE
rb_io_gets_m(int argc, VALUE *argv, VALUE io)
{
    VALUE rs, str;

    if (argc == 0) {
        rs = rb_rs;
    }
    else {
        rb_scan_args(argc, argv, "1", &rs);
        if (!NIL_P(rs)) StringValue(rs);
    }
    str = rb_io_getline(rs, io);
    rb_lastline_set(str);

    return str;
}

/*
 *  call-seq:
 *     ios.lineno    => integer
 *
 *  Returns the current line number in <em>ios</em>. The stream must be
 *  opened for reading. <code>lineno</code> counts the number of times
 *  <code>gets</code> is called, rather than the number of newlines
 *  encountered. The two values will differ if <code>gets</code> is
 *  called with a separator other than newline. See also the
 *  <code>$.</code> variable.
 *
 *     f = File.new("testfile")
 *     f.lineno   #=> 0
 *     f.gets     #=> "This is line one\n"
 *     f.lineno   #=> 1
 *     f.gets     #=> "This is line two\n"
 *     f.lineno   #=> 2
 */

static VALUE
rb_io_lineno(VALUE io)
{
    OpenFile *fptr;

    GetOpenFile(io, fptr);
    rb_io_check_readable(fptr);
    return INT2NUM(fptr->lineno);
}

/*
 *  call-seq:
 *     ios.lineno = integer    => integer
 *
 *  Manually sets the current line number to the given value.
 *  <code>$.</code> is updated only on the next read.
 *
 *     f = File.new("testfile")
 *     f.gets                     #=> "This is line one\n"
 *     $.                         #=> 1
 *     f.lineno = 1000
 *     f.lineno                   #=> 1000
 *     $. # lineno of last read   #=> 1
 *     f.gets                     #=> "This is line two\n"
 *     $. # lineno of last read   #=> 1001
 */

static VALUE
rb_io_set_lineno(VALUE io, VALUE lineno)
{
    OpenFile *fptr;

    GetOpenFile(io, fptr);
    rb_io_check_readable(fptr);
    fptr->lineno = NUM2INT(lineno);
    return lineno;
}

static void
lineno_setter(VALUE val, ID id, VALUE *var)
{
    gets_lineno = NUM2INT(val);
    *var = INT2FIX(gets_lineno);
}

static VALUE
argf_set_lineno(VALUE argf, VALUE val)
{
    gets_lineno = NUM2INT(val);
    lineno = INT2FIX(gets_lineno);
    return Qnil;
}

static VALUE
argf_lineno(void)
{
    return lineno;
}

/*
 *  call-seq:
 *     ios.readline(sep_string=$/)   => string
 *
 *  Reads a line as with <code>IO#gets</code>, but raises an
 *  <code>EOFError</code> on end of file.
 */

static VALUE
rb_io_readline(int argc, VALUE *argv, VALUE io)
{
    VALUE line = rb_io_gets_m(argc, argv, io);

    if (NIL_P(line)) {
        rb_eof_error();
    }
    return line;
}

/*
 *  call-seq:
 *     ios.readlines(sep_string=$/)  =>   array
 *
 *  Reads all of the lines in <em>ios</em>, and returns them in
 *  <i>anArray</i>. Lines are separated by the optional
 *  <i>sep_string</i>. If <i>sep_string</i> is <code>nil</code>, the
 *  rest of the stream is returned as a single record.
 *  The stream must be opened for reading or an
 *  <code>IOError</code> will be raised.
 *
 *     f = File.new("testfile")
 *     f.readlines[0]   #=> "This is line one\n"
 */

static VALUE
rb_io_readlines(int argc, VALUE *argv, VALUE io)
{
    VALUE line, ary;
    VALUE rs;

    if (argc == 0) {
        rs = rb_rs;
    }
    else {
        rb_scan_args(argc, argv, "1", &rs);
        if (!NIL_P(rs)) StringValue(rs);
    }
    ary = rb_ary_new();
    while (!NIL_P(line = rb_io_getline(rs, io))) {
        rb_ary_push(ary, line);
    }
    return ary;
}

/*
 *  call-seq:
 *     ios.each(sep_string=$/)      {|line| block }  => ios
 *     ios.each_line(sep_string=$/) {|line| block }  => ios
 *
 *  Executes the block for every line in <em>ios</em>, where lines are
 *  separated by <i>sep_string</i>. <em>ios</em> must be opened for
 *  reading or an <code>IOError</code> will be raised.
 *
 *     f = File.new("testfile")
 *     f.each {|line| puts "#{f.lineno}: #{line}" }
 *
 *  <em>produces:</em>
 *
 *     1: This is line one
 *     2: This is line two
 *     3: This is line three
 *     4: And so on...
 */

static VALUE
rb_io_each_line(int argc, VALUE *argv, VALUE io)
{
    VALUE str;
    VALUE rs;

    RETURN_ENUMERATOR(io, argc, argv);
    if (argc == 0) {
        rs = rb_rs;
    }
    else {
        rb_scan_args(argc, argv, "1", &rs);
        if (!NIL_P(rs)) StringValue(rs);
    }
    while (!NIL_P(str = rb_io_getline(rs, io))) {
        rb_yield(str);
    }
    return io;
}

/*
 *  call-seq:
 *     ios.each_byte {|byte| block }  => ios
 *
 *  Calls the given block once for each byte (0..255) in <em>ios</em>,
 *  passing the byte as an argument. The stream must be opened for
 *  reading or an <code>IOError</code> will be raised.
 *
 *     f = File.new("testfile")
 *     checksum = 0
 *     f.each_byte {|x| checksum ^= x }   #=> #<File:testfile>
 *     checksum                           #=> 12
 */

static VALUE
rb_io_each_byte(VALUE io)
{
    OpenFile *fptr;
    int c;

    RETURN_ENUMERATOR(io, 0, 0);
    GetOpenFile(io, fptr);

    for (;;) {
        rb_io_check_readable(fptr);
        READ_CHECK(fptr);
        c = io_getc(fptr);
        if (c < 0) {
            break;
        }
        rb_yield(INT2FIX(c & 0xff));
    }
    return io;
}

/*
 *  call-seq:
 *     ios.getc   => fixnum or nil
 *
 *  Gets the next 8-bit byte (0..255) from <em>ios</em>. Returns
 *  <code>nil</code> if called at end of file.
 *
 *     f = File.new("testfile")
 *     f.getc   #=> 84
 *     f.getc   #=> 104
 */

VALUE
rb_io_getc(VALUE io)
{
    OpenFile *fptr;
    int c;

    GetOpenFile(io, fptr);
    rb_io_check_readable(fptr);

    READ_CHECK(fptr);
    c = io_getc(fptr);

    if (c < 0) {
        return Qnil;
    }
    return INT2FIX(c & 0xff);
}

int
rb_getc(FILE *f)
{
    int c;

    if (!STDIO_READ_DATA_PENDING(f)) {
        rb_thread_wait_fd(fileno(f));
    }
    TRAP_BEG;
    c = getc(f);
    TRAP_END;

    return c;
}

/*
 *  call-seq:
 *     ios.readchar   => fixnum
 *
 *  Reads a character as with <code>IO#getc</code>, but raises an
 *  <code>EOFError</code> on end of file.
 */

static VALUE
rb_io_readchar(VALUE io)
{
    VALUE c = rb_io_getc(io);

    if (NIL_P(c)) {
        rb_eof_error();
    }
    return c;
}

/*
 *  call-seq:
 *     ios.ungetc(integer)   => nil
 *
 *  Pushes back one character (passed as a parameter) onto <em>ios</em>,
 *  such that a subsequent buffered read will return it. Only one character
 *  may be pushed back before a subsequent read operation (that is,
 *  you will be able to read only the last of several characters that have been pushed
 *  back). Has no effect with unbuffered reads (such as <code>IO#sysread</code>).
 *
 *     f = File.new("testfile")   #=> #<File:testfile>
 *     c = f.getc                 #=> 84
 *     f.ungetc(c)                #=> nil
 *     f.getc                     #=> 84
 */

VALUE
rb_io_ungetc(VALUE io, VALUE c)
{
    OpenFile *fptr;
    int cc = NUM2INT(c);

    GetOpenFile(io, fptr);
    rb_io_check_readable(fptr);

    if (io_ungetc(cc, fptr) == EOF && cc != EOF) {
        rb_raise(rb_eIOError, "ungetc failed");
    }
    return Qnil;
}

/*
 *  call-seq:
 *     ios.isatty   => true or false
 *     ios.tty?     => true or false
 *
 *  Returns <code>true</code> if <em>ios</em> is associated with a
 *  terminal device (tty), <code>false</code> otherwise.
 *
 *     File.new("testfile").isatty   #=> false
 *     File.new("/dev/tty").isatty   #=> true
 */

static VALUE
rb_io_isatty(VALUE io)
{
    OpenFile *fptr;

    GetOpenFile(io, fptr);
    if (isatty(fptr->fd) == 0)
        return Qfalse;
    return Qtrue;
}

#define FMODE_PREP (1<<16)
#define IS_PREP_STDIO(f) ((f)->mode & FMODE_PREP)
#define PREP_STDIO_NAME(f) ((f)->path)

static void
fptr_finalize(OpenFile *fptr, int noraise)
{
    if (fptr->wbuf_len) {
        io_fflush(fptr);
    }
    if (IS_PREP_STDIO(fptr) ||
        fptr->fd <= 2) {
        return;
    }
    if (fptr->stdio_file) {
        if (fclose(fptr->stdio_file) < 0 && !noraise) {
            /* fptr->stdio_file is deallocated anyway */
            fptr->stdio_file = 0;
            fptr->fd = -1;
            rb_sys_fail(fptr->path);
        }
    }
    else if (0 <= fptr->fd) {
        if (close(fptr->fd) < 0 && !noraise) {
            /* fptr->fd is still not closed */
            rb_sys_fail(fptr->path);
        }
    }
    fptr->fd = -1;
    fptr->stdio_file = 0;
    fptr->mode &= ~(FMODE_READABLE|FMODE_WRITABLE);
}

static void
rb_io_fptr_cleanup(OpenFile *fptr, int noraise)
{
    if (fptr->finalize) {
        (*fptr->finalize)(fptr, noraise);
    }
    else {
        fptr_finalize(fptr, noraise);
    }
}

int
rb_io_fptr_finalize(OpenFile *fptr)
{
    if (!fptr) return 0;
    if (fptr->refcnt <= 0 || --fptr->refcnt) return 0;
    if (fptr->path) {
        free(fptr->path);
        fptr->path = 0;
    }
    if (0 <= fptr->fd)
        rb_io_fptr_cleanup(fptr, Qtrue);
    if (fptr->rbuf) {
        free(fptr->rbuf);
        fptr->rbuf = 0;
    }
    if (fptr->wbuf) {
        free(fptr->wbuf);
        fptr->wbuf = 0;
    }
    free(fptr);
    return 1;
}

VALUE
rb_io_close(VALUE io)
{
    OpenFile *fptr;
    int fd;

    fptr = RFILE(io)->fptr;
    if (!fptr) return Qnil;
    if (fptr->fd < 0) return Qnil;

    fd = fptr->fd;
    rb_io_fptr_cleanup(fptr, Qfalse);
    rb_thread_fd_close(fd);

    if (fptr->pid) {
        rb_syswait(fptr->pid);
        fptr->pid = 0;
    }

    return Qnil;
}

/*
 *  call-seq:
 *     ios.close   => nil
 *
 *  Closes <em>ios</em> and flushes any pending writes to the operating
 *  system. The stream is unavailable for any further data operations;
 *  an <code>IOError</code> is raised if such an attempt is made. I/O
 *  streams are automatically closed when they are claimed by the
 *  garbage collector.
 */

static VALUE
rb_io_close_m(VALUE io)
{
    if (rb_safe_level() >= 4 && !OBJ_TAINTED(io)) {
        rb_raise(rb_eSecurityError, "Insecure: can't close");
    }
    rb_io_check_closed(RFILE(io)->fptr);
    rb_io_close(io);
    return Qnil;
}

static VALUE
io_close(VALUE io)
{
    if (TYPE(io) == T_FILE) {
        rb_io_close(io);
        return Qnil;
    }
    return rb_funcall(io, rb_intern("close"), 0, 0);
}

/*
 *  call-seq:
 *     ios.closed?    => true or false
 *
 *  Returns <code>true</code> if <em>ios</em> is completely closed (for
 *  duplex streams, both reader and writer), <code>false</code>
 *  otherwise.
 *
 *     f = File.new("testfile")
 *     f.close         #=> nil
 *     f.closed?       #=> true
 *     f = IO.popen("/bin/sh","r+")
 *     f.close_write   #=> nil
 *     f.closed?       #=> false
 *     f.close_read    #=> nil
 *     f.closed?       #=> true
 */

static VALUE
rb_io_closed(VALUE io)
{
    OpenFile *fptr;

    fptr = RFILE(io)->fptr;
    rb_io_check_initialized(fptr);
    return 0 <= fptr->fd ? Qfalse : Qtrue;
}

/*
 *  call-seq:
 *     ios.close_read    => nil
 *
 *  Closes the read end of a duplex I/O stream (i.e., one that contains
 *  both a read and a write stream, such as a pipe). Will raise an
 *  <code>IOError</code> if the stream is not duplexed.
 *
 *     f = IO.popen("/bin/sh","r+")
 *     f.close_read
 *     f.readlines
 *
 *  <em>produces:</em>
 *
 *     prog.rb:3:in `readlines': not opened for reading (IOError)
 *      from prog.rb:3
 */

static VALUE
rb_io_close_read(VALUE io)
{
    OpenFile *fptr;

    if (rb_safe_level() >= 4 && !OBJ_TAINTED(io)) {
        rb_raise(rb_eSecurityError, "Insecure: can't close");
    }
    GetOpenFile(io, fptr);
    if (is_socket(fptr->fd, fptr->path)) {
#ifndef SHUT_RD
# define SHUT_RD 0
#endif
        if (shutdown(fptr->fd, SHUT_RD) < 0)
            rb_sys_fail(fptr->path);
        fptr->mode &= ~FMODE_READABLE;
        if (!(fptr->mode & FMODE_WRITABLE))
            return rb_io_close(io);
        return Qnil;
    }
    if (fptr->mode & FMODE_WRITABLE) {
        rb_raise(rb_eIOError, "closing non-duplex IO for reading");
    }
    return rb_io_close(io);
}

/*
 *  call-seq:
 *     ios.close_write   => nil
 *
 *  Closes the write end of a duplex I/O stream (i.e., one that contains
 *  both a read and a write stream, such as a pipe). Will raise an
 *  <code>IOError</code> if the stream is not duplexed.
 *
 *     f = IO.popen("/bin/sh","r+")
 *     f.close_write
 *     f.print "nowhere"
 *
 *  <em>produces:</em>
 *
 *     prog.rb:3:in `write': not opened for writing (IOError)
 *      from prog.rb:3:in `print'
 *      from prog.rb:3
 */

static VALUE
rb_io_close_write(VALUE io)
{
    OpenFile *fptr;

    if (rb_safe_level() >= 4 && !OBJ_TAINTED(io)) {
        rb_raise(rb_eSecurityError, "Insecure: can't close");
    }
    GetOpenFile(io, fptr);
    if (is_socket(fptr->fd, fptr->path)) {
#ifndef SHUT_WR
# define SHUT_WR 1
#endif
        if (shutdown(fptr->fd, SHUT_WR) < 0)
            rb_sys_fail(fptr->path);
        fptr->mode &= ~FMODE_WRITABLE;
        if (!(fptr->mode & FMODE_READABLE))
            return rb_io_close(io);
        return Qnil;
    }

    if (fptr->mode & FMODE_READABLE) {
        rb_raise(rb_eIOError, "closing non-duplex IO for writing");
    }
    return rb_io_close(io);
}

/*
 *  call-seq:
 *     ios.sysseek(offset, whence=SEEK_SET)   => integer
 *
 *  Seeks to a given <i>offset</i> in the stream according to the value
 *  of <i>whence</i> (see <code>IO#seek</code> for values of
 *  <i>whence</i>). Returns the new offset into the file.
 *
 *     f = File.new("testfile")
 *     f.sysseek(-13, IO::SEEK_END)   #=> 53
 *     f.sysread(10)                  #=> "And so on."
 */

static VALUE
rb_io_sysseek(int argc, VALUE *argv, VALUE io)
{
    VALUE offset, ptrname;
    int whence = SEEK_SET;
    OpenFile *fptr;
    off_t pos;

    if (rb_scan_args(argc, argv, "11", &offset, &ptrname) == 2) {
        whence = NUM2INT(ptrname);
    }
    pos = NUM2OFFT(offset);
    GetOpenFile(io, fptr);
    if ((fptr->mode & FMODE_READABLE) && READ_DATA_BUFFERED(fptr)) {
        rb_raise(rb_eIOError, "sysseek for buffered IO");
    }
    if ((fptr->mode & FMODE_WRITABLE) && fptr->wbuf_len) {
        rb_warn("sysseek for buffered IO");
    }
    pos = lseek(fptr->fd, pos, whence);
    if (pos == -1) rb_sys_fail(fptr->path);

    return OFFT2NUM(pos);
}

/*
 *  call-seq:
 *     ios.syswrite(string)   => integer
 *
 *  Writes the given string to <em>ios</em> using a low-level write.
 *  Returns the number of bytes written. Do not mix with other methods
 *  that write to <em>ios</em> or you may get unpredictable results.
 *  Raises <code>SystemCallError</code> on error.
 *
 *     f = File.new("out", "w")
 *     f.syswrite("ABCDEF")   #=> 6
 */

static VALUE
rb_io_syswrite(VALUE io, VALUE str)
{
    OpenFile *fptr;
    long n;

    rb_secure(4);
    if (TYPE(str) != T_STRING)
        str = rb_obj_as_string(str);

    GetOpenFile(io, fptr);
    rb_io_check_writable(fptr);

    if (fptr->wbuf_len) {
        rb_warn("syswrite for buffered IO");
    }
    if (!rb_thread_fd_writable(fptr->fd)) {
        rb_io_check_closed(fptr);
    }
    TRAP_BEG;
    n = write(fptr->fd, RSTRING(str)->ptr, RSTRING(str)->len);
    TRAP_END;

    if (n == -1) rb_sys_fail(fptr->path);

    return LONG2FIX(n);
}

/*
 *  call-seq:
 *     ios.sysread(integer[, outbuf])    => string
 *
 *  Reads <i>integer</i> bytes from <em>ios</em> using a low-level
 *  read and returns them as a string. Do not mix with other methods
 *  that read from <em>ios</em> or you may get unpredictable results.
 *  If the optional <i>outbuf</i> argument is present, it must reference
 *  a String, which will receive the data.
 *  Raises <code>SystemCallError</code> on error and
 *  <code>EOFError</code> at end of file.
 *
 *     f = File.new("testfile")
 *     f.sysread(16)   #=> "This is line one"
 */

static VALUE
rb_io_sysread(int argc, VALUE *argv, VALUE io)
{
    VALUE len, str;
    OpenFile *fptr;
    long n, ilen;

    rb_scan_args(argc, argv, "11", &len, &str);
    ilen = NUM2LONG(len);

    if (NIL_P(str)) {
        str = rb_str_new(0, ilen);
    }
    else {
        StringValue(str);
        rb_str_modify(str);
        rb_str_resize(str, ilen);
    }
    if (ilen == 0) return str;

    GetOpenFile(io, fptr);
    rb_io_check_readable(fptr);

    if (READ_DATA_BUFFERED(fptr)) {
        rb_raise(rb_eIOError, "sysread for buffered IO");
    }

    n = fptr->fd;
    rb_thread_wait_fd(fptr->fd);
    rb_io_check_closed(fptr);
    if (RSTRING(str)->len != ilen) {
        rb_raise(rb_eRuntimeError, "buffer string modified");
    }
    TRAP_BEG;
    n = read(fptr->fd, RSTRING(str)->ptr, ilen);
    TRAP_END;

    if (n == -1) {
        rb_sys_fail(fptr->path);
    }
    rb_str_resize(str, n);
    if (n == 0 && ilen > 0) {
        rb_eof_error();
    }
    RSTRING(str)->len = n;
    RSTRING(str)->ptr[n] = '\0';
    OBJ_TAINT(str);

    return str;
}

/*
 *  call-seq:
 *     ios.binmode    => ios
 *
 *  Puts <em>ios</em> into binary mode. This is useful only in
 *  MS-DOS/Windows environments. Once a stream is in binary mode, it
 *  cannot be reset to nonbinary mode.
 */

VALUE
rb_io_binmode(VALUE io)
{
#if defined(_WIN32) || defined(DJGPP) || defined(__CYGWIN__) || defined(__human68k__) || defined(__EMX__)
    OpenFile *fptr;

    GetOpenFile(io, fptr);
    if (!(fptr->mode & FMODE_BINMODE) && READ_DATA_BUFFERED(fptr)) {
        rb_raise(rb_eIOError, "buffer already filled with text-mode content");
    }
    if (0 <= fptr->fd && setmode(fptr->fd, O_BINARY) == -1)
        rb_sys_fail(fptr->path);

    fptr->mode |= FMODE_BINMODE;
#endif
    return io;
}

static char*
rb_io_flags_mode(int flags)
{
#ifdef O_BINARY
# define MODE_BINMODE(a,b) ((flags & FMODE_BINMODE) ? (b) : (a))
#else
# define MODE_BINMODE(a,b) (a)
#endif
    if (flags & FMODE_APPEND) {
        if ((flags & FMODE_READWRITE) == FMODE_READWRITE) {
            return MODE_BINMODE("a+", "ab+");
        }
        return MODE_BINMODE("a", "ab");
    }
    switch (flags & FMODE_READWRITE) {
      case FMODE_READABLE:
        return MODE_BINMODE("r", "rb");
      case FMODE_WRITABLE:
        return MODE_BINMODE("w", "wb");
      case FMODE_READWRITE:
        if (flags & FMODE_CREATE) {
            return MODE_BINMODE("w+", "wb+");
        }
        return MODE_BINMODE("r+", "rb+");
    }
    rb_raise(rb_eArgError, "illegal access modenum %o", flags);
    return NULL;                /* not reached */
}

int
rb_io_mode_flags(const char *mode)
{
    int flags = 0;
    const char *m = mode;

    switch (*m++) {
      case 'r':
        flags |= FMODE_READABLE;
        break;
      case 'w':
        flags |= FMODE_WRITABLE | FMODE_CREATE;
        break;
      case 'a':
        flags |= FMODE_WRITABLE | FMODE_APPEND | FMODE_CREATE;
        break;
      default:
      error:
        rb_raise(rb_eArgError, "illegal access mode %s", mode);
    }

    while (*m) {
        switch (*m++) {
        case 'b':
            flags |= FMODE_BINMODE;
            break;
        case '+':
            flags |= FMODE_READWRITE;
            break;
        default:
            goto error;
        }
    }

    return flags;
}

int
rb_io_modenum_flags(int mode)
{
    int flags = 0;

    switch (mode & (O_RDONLY|O_WRONLY|O_RDWR)) {
      case O_RDONLY:
        flags = FMODE_READABLE;
        break;
      case O_WRONLY:
        flags = FMODE_WRITABLE;
        break;
      case O_RDWR:
        flags = FMODE_READWRITE;
        break;
    }

    if (mode & O_APPEND) {
        flags |= FMODE_APPEND;
    }
    if (mode & O_CREAT) {
        flags |= FMODE_CREATE;
    }
#ifdef O_BINARY
    if (mode & O_BINARY) {
        flags |= FMODE_BINMODE;
    }
#endif

    return flags;
}

static int
rb_io_mode_modenum(const char *mode)
{
    int flags = 0;
    const char *m = mode;

    switch (*m++) {
      case 'r':
        flags |= O_RDONLY;
        break;
      case 'w':
        flags |= O_WRONLY | O_CREAT | O_TRUNC;
        break;
      case 'a':
        flags |= O_WRONLY | O_CREAT | O_APPEND;
        break;
      default:
      error:
        rb_raise(rb_eArgError, "illegal access mode %s", mode);
    }

    while (*m) {
        switch (*m++) {
        case 'b':
#ifdef O_BINARY
            flags |= O_BINARY;
#endif
            break;
        case '+':
            flags = (flags & ~O_ACCMODE) | O_RDWR;
            break;
        default:
            goto error;
        }
    }

    return flags;
}

#define MODENUM_MAX 4

static char*
rb_io_modenum_mode(int flags)
{
#ifdef O_BINARY
# define MODE_BINARY(a,b) ((flags & O_BINARY) ? (b) : (a))
#else
# define MODE_BINARY(a,b) (a)
#endif
    if (flags & O_APPEND) {
        if ((flags & O_RDWR) == O_RDWR) {
            return MODE_BINARY("a+", "ab+");
        }
        return MODE_BINARY("a", "ab");
    }
    switch (flags & (O_RDONLY|O_WRONLY|O_RDWR)) {
      case O_RDONLY:
        return MODE_BINARY("r", "rb");
      case O_WRONLY:
        return MODE_BINARY("w", "wb");
      case O_RDWR:
        return MODE_BINARY("r+", "rb+");
    }
    rb_raise(rb_eArgError, "illegal access modenum %o", flags);
    return NULL;                /* not reached */
}

static int
rb_sysopen(char *fname, int flags, unsigned int mode)
{
    int fd;

    fd = open(fname, flags, mode);
    if (fd < 0) {
        if (errno == EMFILE || errno == ENFILE) {
            rb_gc();
            fd = open(fname, flags, mode);
        }
        if (fd < 0) {
            rb_sys_fail(fname);
        }
    }
    return fd;
}

FILE *
rb_fopen(const char *fname, const char *mode)
{
    FILE *file;

    file = fopen(fname, mode);
    if (!file) {
        if (errno == EMFILE || errno == ENFILE) {
            rb_gc();
            file = fopen(fname, mode);
        }
        if (!file) {
            rb_sys_fail(fname);
        }
    }
#ifdef USE_SETVBUF
    if (setvbuf(file, NULL, _IOFBF, 0) != 0)
        rb_warn("setvbuf() can't be honoured for %s", fname);
#endif
#ifdef __human68k__
    setmode(fileno(file), O_TEXT);
#endif
    return file;
}

FILE *
rb_fdopen(int fd, const char *mode)
{
    FILE *file;

#if defined(sun)
    errno = 0;
#endif
    file = fdopen(fd, mode);
    if (!file) {
        if (
#if defined(sun)
            errno == 0 ||
#endif
            errno == EMFILE || errno == ENFILE) {
            rb_gc();
#if defined(sun)
            errno = 0;
#endif
            file = fdopen(fd, mode);
        }
        if (!file) {
#ifdef _WIN32
            if (errno == 0) errno = EINVAL;
#elif defined(sun)
            if (errno == 0) errno = EMFILE;
#endif
            rb_sys_fail(0);
        }
    }

    /* xxx: should be _IONBF?  A buffer in FILE may have trouble. */
#ifdef USE_SETVBUF
    if (setvbuf(file, NULL, _IOFBF, 0) != 0)
        rb_warn("setvbuf() can't be honoured (fd=%d)", fd);
#endif
    return file;
}

static void
io_check_tty(OpenFile *fptr)
{
    if (isatty(fptr->fd))
        fptr->mode |= FMODE_TTY|FMODE_DUPLEX;
}

static VALUE
rb_file_open_internal(VALUE io, const char *fname, const char *mode)
{
    OpenFile *fptr;

    MakeOpenFile(io, fptr);
    fptr->mode = rb_io_mode_flags(mode);
    fptr->path = strdup(fname);
    fptr->fd = rb_sysopen(fptr->path, rb_io_mode_modenum(rb_io_flags_mode(fptr->mode)), 0666);
    io_check_tty(fptr);

    return io;
}

VALUE
rb_file_open(const char *fname, const char *mode)
{
    return rb_file_open_internal(io_alloc(rb_cFile), fname, mode);
}

static VALUE
rb_file_sysopen_internal(VALUE io, const char *fname, int flags, int mode)
{
    OpenFile *fptr;

    MakeOpenFile(io, fptr);

    fptr->path = strdup(fname);
    fptr->mode = rb_io_modenum_flags(flags);
    fptr->fd = rb_sysopen(fptr->path, flags, mode);
    io_check_tty(fptr);

    return io;
}

VALUE
rb_file_sysopen(const char *fname, int flags, int mode)
{
    return rb_file_sysopen_internal(io_alloc(rb_cFile), fname, flags, mode);
}

#if defined(__CYGWIN__) || !defined(HAVE_FORK)
static struct pipe_list {
    OpenFile *fptr;
    struct pipe_list *next;
} *pipe_list;

static void
pipe_add_fptr(OpenFile *fptr)
{
    struct pipe_list *list;

    list = ALLOC(struct pipe_list);
    list->fptr = fptr;
    list->next = pipe_list;
    pipe_list = list;
}

static void
pipe_del_fptr(OpenFile *fptr)
{
    struct pipe_list *list = pipe_list;
    struct pipe_list *tmp;

    if (list->fptr == fptr) {
        pipe_list = list->next;
        free(list);
        return;
    }

    while (list->next) {
        if (list->next->fptr == fptr) {
            tmp = list->next;
            list->next = list->next->next;
            free(tmp);
            return;
        }
        list = list->next;
    }
}

static void
pipe_atexit(void)
{
    struct pipe_list *list = pipe_list;
    struct pipe_list *tmp;

    while (list) {
        tmp = list->next;
        rb_io_fptr_finalize(list->fptr);
        list = tmp;
    }
}

static void
pipe_finalize(OpenFile *fptr, int noraise)
{
#if !defined(HAVE_FORK) && !defined(_WIN32)
    extern VALUE rb_last_status;
    int status;
    if (fptr->stdio_file) {
        status = pclose(fptr->stdio_file);
    }
    fptr->fd = -1;
    fptr->stdio_file = 0;
#if defined DJGPP
    status <<= 8;
#endif
    rb_last_status = INT2FIX(status);
#else
    fptr_finalize(fptr, noraise);
#endif
    pipe_del_fptr(fptr);
}
#endif

void
rb_io_synchronized(OpenFile *fptr)
{
    fptr->mode |= FMODE_SYNC;
}

void
rb_io_unbuffered(OpenFile *fptr)
{
    rb_io_synchronized(fptr);
}

struct popen_arg {
    struct rb_exec_arg exec;
    int modef;
    int pair[2];
};

static void
popen_redirect(struct popen_arg *p)
{
    if ((p->modef & FMODE_READABLE) && (p->modef & FMODE_WRITABLE)) {
        close(p->pair[0]);
        dup2(p->pair[1], 0);
        dup2(p->pair[1], 1);
        if (2 <= p->pair[1])
            close(p->pair[1]);
    }
    else if (p->modef & FMODE_READABLE) {
        close(p->pair[0]);
        if (p->pair[1] != 1) {
            dup2(p->pair[1], 1);
            close(p->pair[1]);
        }
    }
    else {
        close(p->pair[1]);
        if (p->pair[0] != 0) {
            dup2(p->pair[0], 0);
            close(p->pair[0]);
        }
    }
}

#ifdef HAVE_FORK
static int
popen_exec(p)
    struct popen_arg *p;
{
    int fd;

    popen_redirect(p);
    for (fd = 3; fd < NOFILE; fd++) {
#ifdef FD_CLOEXEC
        fcntl(fd, F_SETFL, FD_CLOEXEC);
#else
        close(fd);
#endif
    }
    return rb_exec(&p->exec);
}
#endif

static VALUE
pipe_open(int argc, VALUE *argv, char *mode)
{
    int modef = rb_io_mode_flags(mode);
    int pid = 0;
    OpenFile *fptr;
    VALUE port, prog;
#if defined(HAVE_FORK) && defined(HAVE_SOCKETPAIR)
    int status;
    struct popen_arg arg;
    volatile int doexec;
#elif defined(_WIN32)
    int openmode = rb_io_mode_modenum(mode);
    char *exename = NULL;
#endif
    char *cmd;
    FILE *fp = 0;
    int fd = -1;

    prog = rb_check_argv(argc, argv);
    if (!prog) {
        if (argc == 1) argc = 0;
        prog = argv[0];
    }

#if defined(HAVE_FORK) && defined(HAVE_SOCKETPAIR)
    cmd = StringValueCStr(prog);
    doexec = (strcmp("-", cmd) != 0);
    if (!doexec) {
        fflush(stdin);          /* is it really needed? */
        rb_io_flush(rb_stdout);
        rb_io_flush(rb_stderr);
    }
    arg.modef = modef;
    arg.pair[0] = arg.pair[1] = -1;
    if ((modef & FMODE_READABLE) && (modef & FMODE_WRITABLE)) {
        if (socketpair(AF_UNIX, SOCK_STREAM, 0, arg.pair) < 0)
            rb_sys_fail(cmd);
    }
    else if (modef & FMODE_READABLE) {
        if (pipe(arg.pair) < 0)
            rb_sys_fail(cmd);
    }
    else if (modef & FMODE_WRITABLE) {
        if (pipe(arg.pair) < 0)
            rb_sys_fail(cmd);
    }
    else {
        rb_sys_fail(cmd);
    }
    if (doexec) {
        arg.exec.argc = argc;
        arg.exec.argv = argv;
        arg.exec.prog = cmd;
        pid = rb_fork(&status, popen_exec, &arg);
    }
    else {
        pid = rb_fork(&status, 0, 0);
        if (pid == 0) {         /* child */
            popen_redirect(&arg);
            rb_io_synchronized(RFILE(orig_stdout)->fptr);
            rb_io_synchronized(RFILE(orig_stderr)->fptr);
            return Qnil;
        }
    }

    /* parent */
    if (pid == -1) {
        int e = errno;
        close(arg.pair[0]);
        close(arg.pair[1]);
        errno = e;
        rb_sys_fail(cmd);
    }
    if ((modef & FMODE_READABLE) && (modef & FMODE_WRITABLE)) {
        close(arg.pair[1]);
        fd = arg.pair[0];
    }
    else if (modef & FMODE_READABLE) {
        close(arg.pair[1]);
        fd = arg.pair[0];
    }
    else {
        close(arg.pair[0]);
        fd = arg.pair[1];
    }
#elif defined(_WIN32)
    if (argc) {
        char **args = ALLOCA_N(char *, argc+1);
        int i;

        for (i = 0; i < argc; ++i) {
            args[i] = RSTRING(argv[i])->ptr;
        }
        args[i] = NULL;
        cmd = ALLOCA_N(char, rb_w32_argv_size(args));
        rb_w32_join_argv(cmd, args);
        exename = RSTRING(prog)->ptr;
    }
    else {
        cmd = StringValueCStr(prog);
    }
    while ((pid = rb_w32_pipe_exec(cmd, exename, openmode, &fd)) == -1) {
        /* exec failed */
        switch (errno) {
          case EAGAIN:
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
          case EWOULDBLOCK:
#endif
            rb_thread_sleep(1);
            break;
          default:
            rb_sys_fail(RSTRING(prog)->ptr);
            break;
        }
    }
#else
    if (argc)
        prog = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" "));
    fp = popen(StringValueCStr(prog), mode);
    if (!fp) rb_sys_fail(RSTRING(prog)->ptr);
    fd = fileno(fp);
#endif

    port = io_alloc(rb_cIO);
    MakeOpenFile(port, fptr);
    fptr->fd = fd;
    fptr->stdio_file = fp;
    fptr->mode = modef | FMODE_SYNC|FMODE_DUPLEX;
    fptr->pid = pid;

#if defined (__CYGWIN__) || !defined(HAVE_FORK)
    fptr->finalize = pipe_finalize;
    pipe_add_fptr(fptr);
#endif
    return port;
}

/*
 *  call-seq:
 *     IO.popen(cmd, mode="r")               => io
 *     IO.popen(cmd, mode="r") {|io| block } => obj
 *
 *  Runs the specified command as a subprocess; the subprocess's
 *  standard input and output will be connected to the returned
 *  <code>IO</code> object.  If _cmd_ is a +String+
 *  ``<code>-</code>'', then a new instance of Ruby is started as the
 *  subprocess.  If <i>cmd</i> is an +Array+ of +String+, then it will
 *  be used as the subprocess's +argv+ bypassing a shell.  The default
 *  mode for the new file object is ``r'', but <i>mode</i> may be set
 *  to any of the modes listed in the description for class IO.
 *
 *  Raises exceptions which <code>IO::pipe</code> and
 *  <code>Kernel::system</code> raise.
 *
 *  If a block is given, Ruby will run the command as a child connected
 *  to Ruby with a pipe. Ruby's end of the pipe will be passed as a
 *  parameter to the block. In this case <code>IO::popen</code> returns
 *  the value of the block.
 *
 *  If a block is given with a _cmd_ of ``<code>-</code>'',
 *  the block will be run in two separate processes: once in the parent,
 *  and once in a child. The parent process will be passed the pipe
 *  object as a parameter to the block, the child version of the block
 *  will be passed <code>nil</code>, and the child's standard in and
 *  standard out will be connected to the parent through the pipe. Not
 *  available on all platforms.
 *
 *     f = IO.popen("uname")
 *     p f.readlines
 *     puts "Parent is #{Process.pid}"
 *     IO.popen("date") { |f| puts f.gets }
 *     IO.popen("-") {|f| $stderr.puts "#{Process.pid} is here, f is #{f}"}
 *     IO.popen(%w"sed -e s|^|<foo>| -e s&$&;zot;&", "r+") {|f|
 *       f.puts "bar"; f.close_write; puts f.gets
 *     }
 *
 *  <em>produces:</em>
 *
 *     ["Linux\n"]
 *     Parent is 26166
 *     Wed Apr  9 08:53:52 CDT 2003
 *     26169 is here, f is
 *     26166 is here, f is #<IO:0x401b3d44>
 *     <foo>bar;zot;
 */

static VALUE
rb_io_s_popen(int argc, VALUE *argv, VALUE klass)
{
    char *mode;
    VALUE pname, pmode, port, tmp;

    if (rb_scan_args(argc, argv, "11", &pname, &pmode) == 1) {
        mode = "r";
    }
    else if (FIXNUM_P(pmode)) {
        mode = rb_io_modenum_mode(FIX2INT(pmode));
    }
    else {
        mode = rb_io_flags_mode(rb_io_mode_flags(StringValuePtr(pmode)));
    }
    tmp = rb_check_array_type(pname);
    if (!NIL_P(tmp)) {
        VALUE *argv = ALLOCA_N(VALUE, RARRAY(tmp)->len);

        MEMCPY(argv, RARRAY(tmp)->ptr, VALUE, RARRAY(tmp)->len);
        port = pipe_open(RARRAY(tmp)->len, argv, mode);
        pname = tmp;
    }
    else {
        SafeStringValue(pname);
        port = pipe_open(1, &pname, mode);
    }
    if (NIL_P(port)) {
        /* child */
        if (rb_block_given_p()) {
            rb_yield(Qnil);
            rb_io_flush(rb_stdout);
            rb_io_flush(rb_stderr);
            _exit(0);
        }
        return Qnil;
    }
    RBASIC(port)->klass = klass;
    if (rb_block_given_p()) {
        return rb_ensure(rb_yield, port, io_close, port);
    }
    return port;
}

static VALUE
rb_open_file(int argc, VALUE *argv, VALUE io)
{
    VALUE fname, vmode, perm;
    char *mode;
    int flags, fmode;

    rb_scan_args(argc, argv, "12", &fname, &vmode, &perm);
    FilePathValue(fname);

    if (FIXNUM_P(vmode) || !NIL_P(perm)) {
        if (FIXNUM_P(vmode)) {
            flags = FIX2INT(vmode);
        }
        else {
            SafeStringValue(vmode);
            flags = rb_io_mode_modenum(RSTRING(vmode)->ptr);
        }
        fmode = NIL_P(perm) ? 0666 :  NUM2INT(perm);

        rb_file_sysopen_internal(io, RSTRING(fname)->ptr, flags, fmode);
    }
    else {
        mode = NIL_P(vmode) ? "r" : StringValuePtr(vmode);
        rb_file_open_internal(io, RSTRING(fname)->ptr, mode);
    }
    return io;
}

/*
 *  call-seq:
 *     IO.open(fd, mode_string="r" )               => io
 *     IO.open(fd, mode_string="r" ) {|io| block } => obj
 *
 *  With no associated block, <code>open</code> is a synonym for
 *  <code>IO::new</code>. If the optional code block is given, it will
 *  be passed <i>io</i> as an argument, and the IO object will
 *  automatically be closed when the block terminates. In this instance,
 *  <code>IO::open</code> returns the value of the block.
 *
 */

static VALUE
rb_io_s_open(int argc, VALUE *argv, VALUE klass)
{
    VALUE io = rb_class_new_instance(argc, argv, klass);

    if (rb_block_given_p()) {
        return rb_ensure(rb_yield, io, io_close, io);
    }

    return io;
}

/*
 *  call-seq:
 *     IO.sysopen(path, [mode, [perm]])  => fixnum
 *
 *  Opens the given path, returning the underlying file descriptor as a
 *  <code>Fixnum</code>.
 *
 *     IO.sysopen("testfile")   #=> 3
 *
 */

static VALUE
rb_io_s_sysopen(int argc, VALUE *argv)
{
    VALUE fname, vmode, perm;
    int flags, fmode, fd;
    char *path;

    rb_scan_args(argc, argv, "12", &fname, &vmode, &perm);
    FilePathValue(fname);

    if (NIL_P(vmode)) flags = O_RDONLY;
    else if (FIXNUM_P(vmode)) flags = FIX2INT(vmode);
    else {
        SafeStringValue(vmode);
        flags = rb_io_mode_modenum(RSTRING(vmode)->ptr);
    }
    if (NIL_P(perm)) fmode = 0666;
    else             fmode = NUM2INT(perm);

    path = ALLOCA_N(char, strlen(RSTRING(fname)->ptr)+1);
    strcpy(path, RSTRING(fname)->ptr);
    fd = rb_sysopen(path, flags, fmode);
    return INT2NUM(fd);
}

/*
 *  call-seq:
 *     open(path [, mode [, perm]] )                => io or nil
 *     open(path [, mode [, perm]] ) {|io| block }  => obj
 *
 *  Creates an <code>IO</code> object connected to the given stream,
 *  file, or subprocess.
 *
 *  If <i>path</i> does not start with a pipe character
 *  (``<code>|</code>''), treat it as the name of a file to open using
 *  the specified mode (defaulting to ``<code>r</code>''). (See the table
 *  of valid modes on page 331.) If a file is being created, its initial
 *  permissions may be set using the integer third parameter.
 *
 *  If a block is specified, it will be invoked with the
 *  <code>File</code> object as a parameter, and the file will be
 *  automatically closed when the block terminates. The call
 *  returns the value of the block.
 *
 *  If <i>path</i> starts with a pipe character, a subprocess is
 *  created, connected to the caller by a pair of pipes. The returned
 *  <code>IO</code> object may be used to write to the standard input
 *  and read from the standard output of this subprocess. If the command
 *  following the ``<code>|</code>'' is a single minus sign, Ruby forks,
 *  and this subprocess is connected to the parent. In the subprocess,
 *  the <code>open</code> call returns <code>nil</code>. If the command
 *  is not ``<code>-</code>'', the subprocess runs the command. If a
 *  block is associated with an <code>open("|-")</code> call, that block
 *  will be run twice---once in the parent and once in the child. The
 *  block parameter will be an <code>IO</code> object in the parent and
 *  <code>nil</code> in the child. The parent's <code>IO</code> object
 *  will be connected to the child's <code>$stdin</code> and
 *  <code>$stdout</code>. The subprocess will be terminated at the end
 *  of the block.
 *
 *     open("testfile") do |f|
 *       print f.gets
 *     end
 *
 *  <em>produces:</em>
 *
 *     This is line one
 *
 *  Open a subprocess and read its output:
 *
 *     cmd = open("|date")
 *     print cmd.gets
 *     cmd.close
 *
 *  <em>produces:</em>
 *
 *     Wed Apr  9 08:56:31 CDT 2003
 *
 *  Open a subprocess running the same Ruby program:
 *
 *     f = open("|-", "w+")
 *     if f == nil
 *       puts "in Child"
 *       exit
 *     else
 *       puts "Got: #{f.gets}"
 *     end
 *
 *  <em>produces:</em>
 *
 *     Got: in Child
 *
 *  Open a subprocess using a block to receive the I/O object:
 *
 *     open("|-") do |f|
 *       if f == nil
 *         puts "in Child"
 *       else
 *         puts "Got: #{f.gets}"
 *       end
 *     end
 *
 *  <em>produces:</em>
 *
 *     Got: in Child
 */

static VALUE
rb_f_open(int argc, VALUE *argv)
{
    if (argc >= 1) {
        ID to_open = rb_intern("to_open");

        if (rb_respond_to(argv[0], to_open)) {
            VALUE io = rb_funcall2(argv[0], to_open, argc-1, argv+1);

            if (rb_block_given_p()) {
                return rb_ensure(rb_yield, io, io_close, io);
            }
            return io;
        }
        else {
            VALUE tmp = rb_check_string_type(argv[0]);
            if (!NIL_P(tmp)) {
                char *str = StringValuePtr(tmp);
                if (str && str[0] == '|') {
                    argv[0] = rb_str_new(str+1, RSTRING(tmp)->len-1);
                    OBJ_INFECT(argv[0], tmp);
                    return rb_io_s_popen(argc, argv, rb_cIO);
                }
            }
        }
    }
    return rb_io_s_open(argc, argv, rb_cFile);
}

static VALUE
rb_io_open(char *fname, char *mode)
{
    if (fname[0] == '|') {
        VALUE cmd = rb_str_new2(fname+1);
        return pipe_open(1, &cmd, mode);
    }
    else {
        return rb_file_open(fname, mode);
    }
}

static VALUE
io_reopen(VALUE io, VALUE nfile)
{
    OpenFile *fptr, *orig;
    int fd, fd2;
    off_t pos = 0;

    nfile = rb_io_get_io(nfile);
    if (rb_safe_level() >= 4 && (!OBJ_TAINTED(io) || !OBJ_TAINTED(nfile))) {
        rb_raise(rb_eSecurityError, "Insecure: can't reopen");
    }
    GetOpenFile(io, fptr);
    GetOpenFile(nfile, orig);

    if (fptr == orig) return io;
#if !defined __CYGWIN__
    if (IS_PREP_STDIO(fptr)) {
        if ((fptr->mode & FMODE_READWRITE) != (orig->mode & FMODE_READWRITE)) {
            rb_raise(rb_eArgError,
                     "%s can't change access mode from \"%s\" to \"%s\"",
                     PREP_STDIO_NAME(fptr), rb_io_flags_mode(fptr->mode),
                     rb_io_flags_mode(orig->mode));
        }
    }
#endif
    if (orig->mode & FMODE_READABLE) {
        pos = io_tell(orig);
    }
    if (orig->mode & FMODE_WRITABLE) {
        io_fflush(orig);
    }
    if (fptr->mode & FMODE_WRITABLE) {
        io_fflush(fptr);
    }

    /* copy OpenFile structure */
    fptr->mode = orig->mode;
    fptr->pid = orig->pid;
    fptr->lineno = orig->lineno;
    if (fptr->path) free(fptr->path);
    if (orig->path) fptr->path = strdup(orig->path);
    else fptr->path = 0;
    fptr->finalize = orig->finalize;

    fd = fptr->fd;
    fd2 = orig->fd;
    if (fd != fd2) {
#if !defined __CYGWIN__
        if (IS_PREP_STDIO(fptr)) {
            /* need to keep stdio objects */
            if (dup2(fd2, fd) < 0)
                rb_sys_fail(orig->path);
        }
        else {
#endif
            if (fptr->stdio_file)
                fclose(fptr->stdio_file);
            else
                close(fptr->fd);
            fptr->stdio_file = 0;
            fptr->fd = -1;
            if (dup2(fd2, fd) < 0)
                rb_sys_fail(orig->path);
            fptr->fd = fd;
#if !defined __CYGWIN__
        }
#endif
        rb_thread_fd_close(fd);
        if ((orig->mode & FMODE_READABLE) && pos >= 0) {
            if (io_seek(fptr, pos, SEEK_SET) < 0) {
                rb_sys_fail(fptr->path);
            }
            if (io_seek(orig, pos, SEEK_SET) < 0) {
                rb_sys_fail(orig->path);
            }
        }
    }

    if (fptr->mode & FMODE_BINMODE) {
        rb_io_binmode(io);
    }

    RBASIC(io)->klass = RBASIC(nfile)->klass;
    return io;
}

/*
 *  call-seq:
 *     ios.reopen(other_IO)         => ios
 *     ios.reopen(path, mode_str)   => ios
 *
 *  Reassociates <em>ios</em> with the I/O stream given in
 *  <i>other_IO</i> or to a new stream opened on <i>path</i>. This may
 *  dynamically change the actual class of this stream.
 *
 *     f1 = File.new("testfile")
 *     f2 = File.new("testfile")
 *     f2.readlines[0]   #=> "This is line one\n"
 *     f2.reopen(f1)     #=> #<File:testfile>
 *     f2.readlines[0]   #=> "This is line one\n"
 */

static VALUE
rb_io_reopen(int argc, VALUE *argv, VALUE file)
{
    VALUE fname, nmode;
    char *mode;
    OpenFile *fptr;

    rb_secure(4);
    if (rb_scan_args(argc, argv, "11", &fname, &nmode) == 1) {
        VALUE tmp = rb_io_check_io(fname);
        if (!NIL_P(tmp)) {
            return io_reopen(file, tmp);
        }
    }

    FilePathValue(fname);
    rb_io_taint_check(file);
    fptr = RFILE(file)->fptr;
    if (!fptr) {
        fptr = RFILE(file)->fptr = ALLOC(OpenFile);
        MEMZERO(fptr, OpenFile, 1);
    }

    if (!NIL_P(nmode)) {
        int flags = rb_io_mode_flags(StringValuePtr(nmode));
        if (IS_PREP_STDIO(fptr) &&
            (fptr->mode & FMODE_READWRITE) != (flags & FMODE_READWRITE)) {
            rb_raise(rb_eArgError,
                     "%s can't change access mode from \"%s\" to \"%s\"",
                     PREP_STDIO_NAME(fptr), rb_io_flags_mode(fptr->mode),
                     rb_io_flags_mode(flags));
        }
        fptr->mode = flags;
    }

    if (fptr->path) {
        free(fptr->path);
        fptr->path = 0;
    }

    fptr->path = strdup(RSTRING(fname)->ptr);
    mode = rb_io_flags_mode(fptr->mode);
    if (fptr->fd < 0) {
        fptr->fd = rb_sysopen(fptr->path, rb_io_mode_modenum(mode), 0666);
        fptr->stdio_file = 0;
        return file;
    }

    if (fptr->stdio_file) {
        if (freopen(RSTRING(fname)->ptr, mode, fptr->stdio_file) == 0) {
            rb_sys_fail(fptr->path);
        }
        fptr->fd = fileno(fptr->stdio_file);
#ifdef USE_SETVBUF
        if (setvbuf(fptr->stdio_file, NULL, _IOFBF, 0) != 0)
            rb_warn("setvbuf() can't be honoured for %s", RSTRING(fname)->ptr);
#endif
    }
    else {
        if (close(fptr->fd) < 0)
            rb_sys_fail(fptr->path);
        fptr->fd = -1;
        fptr->fd = rb_sysopen(fptr->path, rb_io_mode_modenum(mode), 0666);
    }

    return file;
}

/* :nodoc: */
static VALUE
rb_io_init_copy(VALUE dest, VALUE io)
{
    OpenFile *fptr, *orig;
    int fd;

    io = rb_io_get_io(io);
    if (dest == io) return dest;
    GetOpenFile(io, orig);
    MakeOpenFile(dest, fptr);

    rb_io_flush(io);

    /* copy OpenFile structure */
    fptr->mode = orig->mode & ~FMODE_PREP;
    fptr->pid = orig->pid;
    fptr->lineno = orig->lineno;
    if (orig->path) fptr->path = strdup(orig->path);
    fptr->finalize = orig->finalize;

    fd = ruby_dup(orig->fd);
    fptr->fd = fd;
    io_seek(fptr, io_tell(orig), SEEK_SET);
    if (fptr->mode & FMODE_BINMODE) {
        rb_io_binmode(dest);
    }

    return dest;
}

/*
 *  call-seq:
 *     ios.printf(format_string [, obj, ...] )   => nil
 *
 *  Formats and writes to <em>ios</em>, converting parameters under
 *  control of the format string. See <code>Kernel#sprintf</code>
 *  for details.
 */

VALUE
rb_io_printf(int argc, VALUE *argv, VALUE out)
{
    rb_io_write(out, rb_f_sprintf(argc, argv));
    return Qnil;
}

/*
 *  call-seq:
 *     printf(io, string [, obj ... ] )    => nil
 *     printf(string [, obj ... ] )        => nil
 *
 *  Equivalent to:
 *     io.write(sprintf(string, obj, ...)
 *  or
 *     $stdout.write(sprintf(string, obj, ...)
 */

static VALUE
rb_f_printf(int argc, VALUE *argv)
{
    VALUE out;

    if (argc == 0) return Qnil;
    if (TYPE(argv[0]) == T_STRING) {
        out = rb_stdout;
    }
    else {
        out = argv[0];
        argv++;
        argc--;
    }
    rb_io_write(out, rb_f_sprintf(argc, argv));

    return Qnil;
}

/*
 *  call-seq:
 *     ios.print()             => nil
 *     ios.print(obj, ...)     => nil
 *
 *  Writes the given object(s) to <em>ios</em>. The stream must be
 *  opened for writing. If the output record separator (<code>$\\</code>)
 *  is not <code>nil</code>, it will be appended to the output. If no
 *  arguments are given, prints <code>$_</code>. Objects that aren't
 *  strings will be converted by calling their <code>to_s</code> method.
 *  With no argument, prints the contents of the variable <code>$_</code>.
 *  Returns <code>nil</code>.
 *
 *     $stdout.print("This is ", 100, " percent.\n")
 *
 *  <em>produces:</em>
 *
 *     This is 100 percent.
 */

VALUE
rb_io_print(int argc, VALUE *argv, VALUE out)
{
    int i;
    VALUE line;

    /* if no argument given, print `$_' */
    if (argc == 0) {
        argc = 1;
        line = rb_lastline_get();
        argv = &line;
    }
    for (i=0; i<argc; i++) {
        if (!NIL_P(rb_output_fs) && i>0) {
            rb_io_write(out, rb_output_fs);
        }
        switch (TYPE(argv[i])) {
          case T_NIL:
            rb_io_write(out, rb_str_new2("nil"));
            break;
          default:
            rb_io_write(out, argv[i]);
            break;
        }
    }
    if (!NIL_P(rb_output_rs)) {
        rb_io_write(out, rb_output_rs);
    }

    return Qnil;
}

/*
 *  call-seq:
 *     print(obj, ...)    => nil
 *
 *  Prints each object in turn to <code>$stdout</code>. If the output
 *  field separator (<code>$,</code>) is not +nil+, its
 *  contents will appear between each field. If the output record
 *  separator (<code>$\\</code>) is not +nil+, it will be
 *  appended to the output. If no arguments are given, prints
 *  <code>$_</code>. Objects that aren't strings will be converted by
 *  calling their <code>to_s</code> method.
 *
 *     print "cat", [1,2,3], 99, "\n"
 *     $, = ", "
 *     $\ = "\n"
 *     print "cat", [1,2,3], 99
 *
 *  <em>produces:</em>
 *
 *     cat12399
 *     cat, 1, 2, 3, 99
 */

static VALUE
rb_f_print(int argc, VALUE *argv)
{
    rb_io_print(argc, argv, rb_stdout);
    return Qnil;
}

/*
 *  call-seq:
 *     ios.putc(obj)    => obj
 *
 *  If <i>obj</i> is <code>Numeric</code>, write the character whose
 *  code is <i>obj</i>, otherwise write the first character of the
 *  string representation of  <i>obj</i> to <em>ios</em>.
 *
 *     $stdout.putc "A"
 *     $stdout.putc 65
 *
 *  <em>produces:</em>
 *
 *     AA
 */

static VALUE
rb_io_putc(VALUE io, VALUE ch)
{
    char c = NUM2CHR(ch);

    rb_io_write(io, rb_str_new(&c, 1));
    return ch;
}

/*
 *  call-seq:
 *     putc(int)   => int
 *
 *  Equivalent to:
 *
 *    $stdout.putc(int)
 */

static VALUE
rb_f_putc(VALUE recv, VALUE ch)
{
    return rb_io_putc(rb_stdout, ch);
}

static VALUE
io_puts_ary(VALUE ary, VALUE out, int recur)
{
    VALUE tmp;
    long i;

    for (i=0; i<RARRAY(ary)->len; i++) {
        tmp = RARRAY(ary)->ptr[i];
        if (recur) {
            tmp = rb_str_new2("[...]");
        }
        rb_io_puts(1, &tmp, out);
    }
    return Qnil;
}

/*
 *  call-seq:
 *     ios.puts(obj, ...)    => nil
 *
 *  Writes the given objects to <em>ios</em> as with
 *  <code>IO#print</code>. Writes a record separator (typically a
 *  newline) after any that do not already end with a newline sequence.
 *  If called with an array argument, writes each element on a new line.
 *  If called without arguments, outputs a single record separator.
 *
 *     $stdout.puts("this", "is", "a", "test")
 *
 *  <em>produces:</em>
 *
 *     this
 *     is
 *     a
 *     test
 */

VALUE
rb_io_puts(int argc, VALUE *argv, VALUE out)
{
    int i;
    VALUE line;

    /* if no argument given, print newline. */
    if (argc == 0) {
        rb_io_write(out, rb_default_rs);
        return Qnil;
    }
    for (i=0; i<argc; i++) {
        if (NIL_P(argv[i])) {
            line = rb_str_new2("nil");
        }
        else {
            line = rb_check_array_type(argv[i]);
            if (!NIL_P(line)) {
                rb_exec_recursive(io_puts_ary, line, out);
                continue;
            }
            line = rb_obj_as_string(argv[i]);
        }
        rb_io_write(out, line);
        if (RSTRING(line)->len == 0 ||
            RSTRING(line)->ptr[RSTRING(line)->len-1] != '\n') {
            rb_io_write(out, rb_default_rs);
        }
    }

    return Qnil;
}

/*
 *  call-seq:
 *     puts(obj, ...)    => nil
 *
 *  Equivalent to
 *
 *      $stdout.puts(obj, ...)
 */

static VALUE
rb_f_puts(int argc, VALUE *argv)
{
    rb_io_puts(argc, argv, rb_stdout);
    return Qnil;
}

void
rb_p(VALUE obj)                 /* for debug print within C code */
{
    rb_io_write(rb_stdout, rb_obj_as_string(rb_inspect(obj)));
    rb_io_write(rb_stdout, rb_default_rs);
}

/*
 *  call-seq:
 *     p(obj, ...)    => nil
 *
 *  For each object, directly writes
 *  _obj_.+inspect+ followed by the current output
 *  record separator to the program's standard output.
 *
 *     S = Struct.new(:name, :state)
 *     s = S['dave', 'TX']
 *     p s
 *
 *  <em>produces:</em>
 *
 *     #<S name="dave", state="TX">
 */

static VALUE
rb_f_p(int argc, VALUE *argv)
{
    int i;

    for (i=0; i<argc; i++) {
        rb_p(argv[i]);
    }
    if (TYPE(rb_stdout) == T_FILE) {
        rb_io_flush(rb_stdout);
    }
    return Qnil;
}

/*
 *  call-seq:
 *     obj.display(port=$>)    => nil
 *
 *  Prints <i>obj</i> on the given port (default <code>$></code>).
 *  Equivalent to:
 *
 *     def display(port=$>)
 *       port.write self
 *     end
 *
 *  For example:
 *
 *     1.display
 *     "cat".display
 *     [ 4, 5, 6 ].display
 *     puts
 *
 *  <em>produces:</em>
 *
 *     1cat456
 */

static VALUE
rb_obj_display(int argc, VALUE *argv, VALUE self)
{
    VALUE out;

    if (rb_scan_args(argc, argv, "01", &out) == 0) {
        out = rb_stdout;
    }

    rb_io_write(out, self);

    return Qnil;
}

void
rb_write_error2(const char *mesg, long len)
{
    rb_io_write(rb_stderr, rb_str_new(mesg, len));
}

void
rb_write_error(const char *mesg)
{
    rb_write_error2(mesg, strlen(mesg));
}

static void
must_respond_to(ID mid, VALUE val, ID id)
{
    if (!rb_respond_to(val, mid)) {
        rb_raise(rb_eTypeError, "%s must have %s method, %s given",
                 rb_id2name(id), rb_id2name(mid),
                 rb_obj_classname(val));
    }
}

static void
stdout_setter(VALUE val, ID id, VALUE *variable)
{
    must_respond_to(id_write, val, id);
    *variable = val;
}

static void
defout_setter(VALUE val, ID id, VALUE *variable)
{
    stdout_setter(val, id, variable);
    rb_warn("$defout is obsolete; use $stdout instead");
}

static void
deferr_setter(VALUE val, ID id, VALUE *variable)
{
    stdout_setter(val, id, variable);
    rb_warn("$deferr is obsolete; use $stderr instead");
}

static VALUE
prep_io(int fd, int mode, VALUE klass, const char *path)
{
    OpenFile *fp;
    VALUE io = io_alloc(klass);

    MakeOpenFile(io, fp);
    fp->fd = fd;
#ifdef __CYGWIN__
    if (!isatty(fd)) {
        mode |= O_BINARY;
        setmode(fd, O_BINARY);
    }
#endif
    fp->mode = mode;
    io_check_tty(fp);
    if (path) fp->path = strdup(path);

    return io;
}

static VALUE
prep_stdio(FILE *f, int mode, VALUE klass, const char *path)
{
    OpenFile *fptr;
    VALUE io = prep_io(fileno(f), mode|FMODE_PREP, klass, path);

    GetOpenFile(io, fptr);
    fptr->stdio_file = f;

    return io;
}

FILE *rb_io_stdio_file(OpenFile *fptr)
{
    if (!fptr->stdio_file) {
        fptr->stdio_file = rb_fdopen(fptr->fd, rb_io_flags_mode(fptr->mode));
    }
    return fptr->stdio_file;
}

/*
 *  call-seq:
 *     IO.new(fd, mode)   => io
 *
 *  Returns a new <code>IO</code> object (a stream) for the given
 *  <code>IO</code> object or integer file descriptor and mode
 *  string. See also <code>IO#fileno</code> and
 *  <code>IO::for_fd</code>.
 *
 *     puts IO.new($stdout).fileno # => 1
 *
 *     a = IO.new(2,"w")      # '2' is standard error
 *     $stderr.puts "Hello"
 *     a.puts "World"
 *
 *  <em>produces:</em>
 *
 *     Hello
 *     World
 */

static VALUE
rb_io_initialize(int argc, VALUE *argv, VALUE io)
{
    VALUE fnum, mode, orig;
    OpenFile *fp, *ofp = NULL;
    int fd, flags, fmode;

    rb_secure(4);
    rb_scan_args(argc, argv, "11", &fnum, &mode);
    if (argc == 2) {
        if (FIXNUM_P(mode)) {
            flags = FIX2LONG(mode);
        }
        else {
            SafeStringValue(mode);
            flags = rb_io_mode_modenum(RSTRING(mode)->ptr);
        }
    }
    orig = rb_io_check_io(fnum);
    if (NIL_P(orig)) {
        fd = NUM2INT(fnum);
        if (argc != 2) {
#if defined(HAVE_FCNTL) && defined(F_GETFL)
            flags = fcntl(fd, F_GETFL);
            if (flags == -1) rb_sys_fail(0);
#else
            flags = O_RDONLY;
#endif
        }
        MakeOpenFile(io, fp);
        fp->fd = fd;
        fp->mode = rb_io_modenum_flags(flags);
        io_check_tty(fp);
    }
    else if (RFILE(io)->fptr) {
        rb_raise(rb_eRuntimeError, "reinitializing IO");
    }
    else {
        GetOpenFile(orig, ofp);
        if (ofp->refcnt == LONG_MAX) {
            VALUE s = rb_inspect(orig);
            rb_raise(rb_eIOError, "too many shared IO for %s", StringValuePtr(s));
        }
        if (argc == 2) {
            fmode = rb_io_modenum_flags(flags);
            if ((ofp->mode ^ fmode) & (FMODE_READWRITE|FMODE_BINMODE)) {
                if (FIXNUM_P(mode)) {
                    rb_raise(rb_eArgError, "incompatible mode 0%o", flags);
                }
                else {
                    rb_raise(rb_eArgError, "incompatible mode \"%s\"", RSTRING(mode)->ptr);
                }
            }
        }
        ofp->refcnt++;
        RFILE(io)->fptr = ofp;
    }

    return io;
}

/*
 *  call-seq:
 *     File.new(filename, mode="r")            => file
 *     File.new(filename [, mode [, perm]])    => file
 *

 *  Opens the file named by _filename_ according to
 *  _mode_ (default is ``r'') and returns a new
 *  <code>File</code> object. See the description of class +IO+ for
 *  a description of _mode_. The file mode may optionally be
 *  specified as a +Fixnum+ by _or_-ing together the
 *  flags (O_RDONLY etc, again described under +IO+). Optional
 *  permission bits may be given in _perm_. These mode and permission
 *  bits are platform dependent; on Unix systems, see
 *  <code>open(2)</code> for details.
 *
 *     f = File.new("testfile", "r")
 *     f = File.new("newfile",  "w+")
 *     f = File.new("newfile", File::CREAT|File::TRUNC|File::RDWR, 0644)
 */

static VALUE
rb_file_initialize(int argc, VALUE *argv, VALUE io)
{
    if (RFILE(io)->fptr) {
        rb_raise(rb_eRuntimeError, "reinitializing File");
    }
    if (0 < argc && argc < 3) {
        VALUE fd = rb_check_convert_type(argv[0], T_FIXNUM, "Fixnum", "to_int");

        if (!NIL_P(fd)) {
            argv[0] = fd;
            return rb_io_initialize(argc, argv, io);
        }
    }
    rb_open_file(argc, argv, io);

    return io;
}

/*
 *  call-seq:
 *     IO.new(fd, mode_string)   => io
 *
 *  Returns a new <code>IO</code> object (a stream) for the given
 *  integer file descriptor and mode string. See also
 *  <code>IO#fileno</code> and <code>IO::for_fd</code>.
 *
 *     a = IO.new(2,"w")      # '2' is standard error
 *     $stderr.puts "Hello"
 *     a.puts "World"
 *
 *  <em>produces:</em>
 *
 *     Hello
 *     World
 */

static VALUE
rb_io_s_new(int argc, VALUE *argv, VALUE klass)
{
    if (rb_block_given_p()) {
        char *cname = rb_class2name(klass);

        rb_warn("%s::new() does not take block; use %s::open() instead",
                cname, cname);
    }
    return rb_class_new_instance(argc, argv, klass);
}

/*
 *  call-seq:
 *     IO.for_fd(fd, mode)    => io
 *
 *  Synonym for <code>IO::new</code>.
 *
 */

static VALUE
rb_io_s_for_fd(int argc, VALUE *argv, VALUE klass)
{
    VALUE io = rb_obj_alloc(klass);
    rb_io_initialize(argc, argv, io);
    return io;
}

static int binmode = 0;

static VALUE
argf_forward(int argc, VALUE *argv)
{
    return rb_funcall3(current_file, rb_frame_this_func(), argc, argv);
}

#define ARGF_FORWARD(argc, argv) do {\
  if (TYPE(current_file) != T_FILE)\
     return argf_forward(argc, argv);\
} while (0)
#define NEXT_ARGF_FORWARD(argc, argv) do {\
     if (!next_argv()) return Qnil;\
     ARGF_FORWARD(argc, argv);\
} while (0)

static void
argf_close(VALUE file)
{
    if (TYPE(file) == T_FILE)
        rb_io_close(file);
    else
        rb_funcall3(file, rb_intern("close"), 0, 0);
}

static int
next_argv(void)
{
    extern VALUE rb_argv;
    char *fn;
    OpenFile *fptr;
    int stdout_binmode = 0;

    if (TYPE(rb_stdout) == T_FILE) {
        GetOpenFile(rb_stdout, fptr);
        if (fptr->mode & FMODE_BINMODE)
            stdout_binmode = 1;
    }

    if (init_p == 0) {
        if (RARRAY(rb_argv)->len > 0) {
            next_p = 1;
        }
        else {
            next_p = -1;
        }
        init_p = 1;
        gets_lineno = 0;
    }

    if (next_p == 1) {
        next_p = 0;
      retry:
        if (RARRAY(rb_argv)->len > 0) {
            filename = rb_ary_shift(rb_argv);
            fn = StringValuePtr(filename);
            if (strlen(fn) == 1 && fn[0] == '-') {
                current_file = rb_stdin;
                if (ruby_inplace_mode) {
                    rb_warn("Can't do inplace edit for stdio; skipping");
                    goto retry;
                }
            }
            else {
                int fr = rb_sysopen(fn, O_RDONLY, 0);

                if (ruby_inplace_mode) {
                    struct stat st, st2;
                    VALUE str;
                    int fw;

                    if (TYPE(rb_stdout) == T_FILE && rb_stdout != orig_stdout) {
                        rb_io_close(rb_stdout);
                    }
                    fstat(fr, &st);
                    if (*ruby_inplace_mode) {
                        str = rb_str_new2(fn);
#ifdef NO_LONG_FNAME
                        ruby_add_suffix(str, ruby_inplace_mode);
#else
                        rb_str_cat2(str, ruby_inplace_mode);
#endif
#ifdef NO_SAFE_RENAME
                        (void)close(fr);
                        (void)unlink(RSTRING(str)->ptr);
                        (void)rename(fn, RSTRING(str)->ptr);
                        fr = rb_sysopen(RSTRING(str)->ptr, O_RDONLY, 0);
#else
                        if (rename(fn, RSTRING(str)->ptr) < 0) {
                            rb_warn("Can't rename %s to %s: %s, skipping file",
                                    fn, RSTRING(str)->ptr, strerror(errno));
                            close(fr);
                            goto retry;
                        }
#endif
                    }
                    else {
#ifdef NO_SAFE_RENAME
                        rb_fatal("Can't do inplace edit without backup");
#else
                        if (unlink(fn) < 0) {
                            rb_warn("Can't remove %s: %s, skipping file",
                                    fn, strerror(errno));
                            close(fr);
                            goto retry;
                        }
#endif
                    }
                    fw = rb_sysopen(fn, O_WRONLY|O_CREAT|O_TRUNC, 0666);
#ifndef NO_SAFE_RENAME
                    fstat(fw, &st2);
#ifdef HAVE_FCHMOD
                    fchmod(fw, st.st_mode);
#else
                    chmod(fn, st.st_mode);
#endif
                    if (st.st_uid!=st2.st_uid || st.st_gid!=st2.st_gid) {
                        fchown(fw, st.st_uid, st.st_gid);
                    }
#endif
                    rb_stdout = prep_io(fw, FMODE_WRITABLE, rb_cFile, fn);
                    if (stdout_binmode) rb_io_binmode(rb_stdout);
                }
                current_file = prep_io(fr, FMODE_READABLE, rb_cFile, fn);
            }
            if (binmode) rb_io_binmode(current_file);
        }
        else {
            next_p = 1;
            return Qfalse;
        }
    }
    else if (next_p == -1) {
        current_file = rb_stdin;
        filename = rb_str_new2("-");
        if (ruby_inplace_mode) {
            rb_warn("Can't do inplace edit for stdio");
            rb_stdout = orig_stdout;
        }
    }
    return Qtrue;
}

static VALUE
argf_getline(int argc, VALUE *argv)
{
    VALUE line;

  retry:
    if (!next_argv()) return Qnil;
    if (argc == 0 && rb_rs == rb_default_rs) {
        line = rb_io_gets(current_file);
    }
    else {
        VALUE rs;

        if (argc == 0) {
            rs = rb_rs;
        }
        else {
            rb_scan_args(argc, argv, "1", &rs);
            if (!NIL_P(rs)) StringValue(rs);
        }
        line = rb_io_getline(rs, current_file);
    }
    if (NIL_P(line) && next_p != -1) {
        argf_close(current_file);
        next_p = 1;
        goto retry;
    }
    if (!NIL_P(line)) {
        gets_lineno++;
        lineno = INT2FIX(gets_lineno);
    }
    return line;
}

/*
 *  call-seq:
 *     gets(separator=$/)    => string or nil
 *
 *  Returns (and assigns to <code>$_</code>) the next line from the list
 *  of files in +ARGV+ (or <code>$*</code>), or from standard
 *  input if no files are present on the command line. Returns
 *  +nil+ at end of file. The optional argument specifies the
 *  record separator. The separator is included with the contents of
 *  each record. A separator of +nil+ reads the entire
 *  contents, and a zero-length separator reads the input one paragraph
 *  at a time, where paragraphs are divided by two consecutive newlines.
 *  If multiple filenames are present in +ARGV+,
 *  +gets(nil)+ will read the contents one file at a time.
 *
 *     ARGV << "testfile"
 *     print while gets
 *
 *  <em>produces:</em>
 *
 *     This is line one
 *     This is line two
 *     This is line three
 *     And so on...
 *
 *  The style of programming using <code>$_</code> as an implicit
 *  parameter is gradually losing favor in the Ruby community.
 */

static VALUE
rb_f_gets(int argc, VALUE *argv)
{
    VALUE line;

    if (!next_argv()) return Qnil;
    if (TYPE(current_file) != T_FILE) {
        line = rb_funcall3(current_file, rb_intern("gets"), argc, argv);
    }
    else {
        line = argf_getline(argc, argv);
    }
    rb_lastline_set(line);
    return line;
}

VALUE
rb_gets(void)
{
    VALUE line;

    if (rb_rs != rb_default_rs) {
        return rb_f_gets(0, 0);
    }

  retry:
    if (!next_argv()) return Qnil;
    line = rb_io_gets(current_file);
    if (NIL_P(line) && next_p != -1) {
        argf_close(current_file);
        next_p = 1;
        goto retry;
    }
    rb_lastline_set(line);
    if (!NIL_P(line)) {
        gets_lineno++;
        lineno = INT2FIX(gets_lineno);
    }

    return line;
}

/*
 *  call-seq:
 *     readline(separator=$/)   => string
 *
 *  Equivalent to <code>Kernel::gets</code>, except
 *  +readline+ raises +EOFError+ at end of file.
 */

static VALUE
rb_f_readline(int argc, VALUE *argv)
{
    VALUE line;

    if (!next_argv()) rb_eof_error();
    ARGF_FORWARD(argc, argv);
    line = rb_f_gets(argc, argv);
    if (NIL_P(line)) {
        rb_eof_error();
    }

    return line;
}

/*
 * obsolete
 */
static VALUE
rb_f_getc(void)
{
    rb_warn("getc is obsolete; use STDIN.getc instead");
    if (TYPE(rb_stdin) != T_FILE) {
        return rb_funcall3(rb_stdin, rb_intern("getc"), 0, 0);
    }
    return rb_io_getc(rb_stdin);
}

/*
 *  call-seq:
 *     readlines(separator=$/)    => array
 *
 *  Returns an array containing the lines returned by calling
 *  <code>Kernel.gets(<i>separator</i>)</code> until the end of file.
 */

static VALUE
rb_f_readlines(int argc, VALUE *argv)
{
    VALUE line, ary;

    NEXT_ARGF_FORWARD(argc, argv);
    ary = rb_ary_new();
    while (!NIL_P(line = argf_getline(argc, argv))) {
        rb_ary_push(ary, line);
    }

    return ary;
}

/*
 *  call-seq:
 *     `cmd`    => string
 *
 *  Returns the standard output of running _cmd_ in a subshell.
 *  The built-in syntax <code>%x{...}</code> uses
 *  this method. Sets <code>$?</code> to the process status.
 *
 *     `date`                   #=> "Wed Apr  9 08:56:30 CDT 2003\n"
 *     `ls testdir`.split[1]    #=> "main.rb"
 *     `echo oops && exit 99`   #=> "oops\n"
 *     $?.exitstatus            #=> 99
 */

static VALUE
rb_f_backquote(VALUE obj, VALUE str)
{
    volatile VALUE port;
    VALUE result;
    OpenFile *fptr;

    SafeStringValue(str);
    port = pipe_open(1, &str, "r");
    if (NIL_P(port)) return rb_str_new(0,0);

    GetOpenFile(port, fptr);
    result = read_all(fptr, remain_size(fptr), Qnil);
    rb_io_close(port);

    return result;
}

#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif

static VALUE
select_internal(VALUE read, VALUE write, VALUE except, struct timeval *tp, rb_fdset_t *fds)
{
    VALUE res, list;
    fd_set *rp, *wp, *ep;
    OpenFile *fptr;
    long i;
    int max = 0, n;
    int interrupt_flag = 0;
    int pending = 0;
    struct timeval timerec;

    if (!NIL_P(read)) {
        Check_Type(read, T_ARRAY);
        for (i=0; i<RARRAY(read)->len; i++) {
            GetOpenFile(rb_io_get_io(RARRAY(read)->ptr[i]), fptr);
            rb_fd_set(fptr->fd, &fds[0]);
            if (READ_DATA_PENDING(fptr)) { /* check for buffered data */
                pending++;
                rb_fd_set(fptr->fd, &fds[3]);
            }
            if (max < fptr->fd) max = fptr->fd;
        }
        if (pending) {          /* no blocking if there's buffered data */
            timerec.tv_sec = timerec.tv_usec = 0;
            tp = &timerec;
        }
        rp = rb_fd_ptr(&fds[0]);
    }
    else
        rp = 0;

    if (!NIL_P(write)) {
        Check_Type(write, T_ARRAY);
        for (i=0; i<RARRAY(write)->len; i++) {
            GetOpenFile(rb_io_get_io(RARRAY(write)->ptr[i]), fptr);
            rb_fd_set(fptr->fd, &fds[1]);
            if (max < fptr->fd) max = fptr->fd;
        }
        wp = rb_fd_ptr(&fds[1]);
    }
    else
        wp = 0;

    if (!NIL_P(except)) {
        Check_Type(except, T_ARRAY);
        for (i=0; i<RARRAY(except)->len; i++) {
            GetOpenFile(rb_io_get_io(RARRAY(except)->ptr[i]), fptr);
            rb_fd_set(fptr->fd, &fds[2]);
            if (max < fptr->fd) max = fptr->fd;
        }
        ep = rb_fd_ptr(&fds[2]);
    }
    else {
        ep = 0;
    }

    max++;

    n = rb_thread_select(max, rp, wp, ep, tp);
    if (n < 0) {
        rb_sys_fail(0);
    }
    if (!pending && n == 0) return Qnil; /* returns nil on timeout */

    res = rb_ary_new2(3);
    rb_ary_push(res, rp?rb_ary_new():rb_ary_new2(0));
    rb_ary_push(res, wp?rb_ary_new():rb_ary_new2(0));
    rb_ary_push(res, ep?rb_ary_new():rb_ary_new2(0));

    if (interrupt_flag == 0) {
        if (rp) {
            list = RARRAY(res)->ptr[0];
            for (i=0; i< RARRAY(read)->len; i++) {
                GetOpenFile(rb_io_get_io(RARRAY(read)->ptr[i]), fptr);
                if (rb_fd_isset(fptr->fd, &fds[0]) ||
                    rb_fd_isset(fptr->fd, &fds[3])) {
                    rb_ary_push(list, rb_ary_entry(read, i));
                }
            }
        }

        if (wp) {
            list = RARRAY(res)->ptr[1];
            for (i=0; i< RARRAY(write)->len; i++) {
                GetOpenFile(rb_io_get_io(RARRAY(write)->ptr[i]), fptr);
                if (rb_fd_isset(fptr->fd, &fds[1])) {
                    rb_ary_push(list, rb_ary_entry(write, i));
                }
            }
        }

        if (ep) {
            list = RARRAY(res)->ptr[2];
            for (i=0; i< RARRAY(except)->len; i++) {
                GetOpenFile(rb_io_get_io(RARRAY(except)->ptr[i]), fptr);
                if (rb_fd_isset(fptr->fd, &fds[2])) {
                    rb_ary_push(list, rb_ary_entry(except, i));
                }
            }
        }
    }

    return res;                 /* returns an empty array on interrupt */
}

struct select_args {
    VALUE read, write, except;
    struct timeval *timeout;
    rb_fdset_t fdsets[4];
};

#ifdef HAVE_RB_FD_INIT
static VALUE
select_call(arg)
    VALUE arg;
{
    struct select_args *p = (struct select_args *)arg;

    return select_internal(p->read, p->write, p->except, p->timeout, p->fdsets);
}

static VALUE
select_end(arg)
    VALUE arg;
{
    struct select_args *p = (struct select_args *)arg;
    int i;

    for (i = 0; i < sizeof(p->fdsets) / sizeof(p->fdsets[0]); ++i)
        rb_fd_term(&p->fdsets[i]);
    return Qnil;
}
#endif

/*
 *  call-seq:
 *     IO.select(read_array
 *               [, write_array
 *               [, error_array
 *               [, timeout]]] ) =>  array  or  nil
 *
 *  See <code>Kernel#select</code>.
 */

static VALUE
rb_f_select(int argc, VALUE *argv, VALUE obj)
{
    VALUE timeout;
    struct select_args args;
    struct timeval timerec;
    int i;

    rb_scan_args(argc, argv, "13", &args.read, &args.write, &args.except, &timeout);
    if (NIL_P(timeout)) {
        args.timeout = 0;
    }
    else {
        timerec = rb_time_interval(timeout);
        args.timeout = &timerec;
    }

    for (i = 0; i < sizeof(args.fdsets) / sizeof(args.fdsets[0]); ++i)
        rb_fd_init(&args.fdsets[i]);

#ifdef HAVE_RB_FD_INIT
    return rb_ensure(select_call, (VALUE)&args, select_end, (VALUE)&args);
#else
    return select_internal(args.read, args.write, args.except,
                           args.timeout, args.fdsets);
#endif

}

#if !defined(MSDOS) && !defined(__human68k__)
static int
io_cntl(int fd, int cmd, long narg, int io_p)
{
    int retval;

#ifdef HAVE_FCNTL
    TRAP_BEG;
# if defined(__CYGWIN__)
    retval = io_p?ioctl(fd, cmd, (void*)narg):fcntl(fd, cmd, narg);
# else
    retval = io_p?ioctl(fd, cmd, narg):fcntl(fd, cmd, narg);
# endif
    TRAP_END;
#else
    if (!io_p) {
        rb_notimplement();
    }
    TRAP_BEG;
    retval = ioctl(fd, cmd, narg);
    TRAP_END;
#endif
    return retval;
}
#endif

static VALUE
rb_io_ctl(VALUE io, VALUE req, VALUE arg, int io_p)
{
#if !defined(MSDOS) && !defined(__human68k__)
    int cmd = NUM2ULONG(req);
    OpenFile *fptr;
    long len = 0;
    long narg = 0;
    int retval;

    rb_secure(2);

    if (NIL_P(arg) || arg == Qfalse) {
        narg = 0;
    }
    else if (FIXNUM_P(arg)) {
        narg = FIX2LONG(arg);
    }
    else if (arg == Qtrue) {
        narg = 1;
    }
    else {
        VALUE tmp = rb_check_string_type(arg);

        if (NIL_P(tmp)) {
            narg = NUM2LONG(arg);
        }
        else {
            arg = tmp;
#ifdef IOCPARM_MASK
#ifndef IOCPARM_LEN
#define IOCPARM_LEN(x)  (((x) >> 16) & IOCPARM_MASK)
#endif
#endif
#ifdef IOCPARM_LEN
            len = IOCPARM_LEN(cmd);     /* on BSDish systems we're safe */
#else
            len = 256;          /* otherwise guess at what's safe */
#endif
            rb_str_modify(arg);

            if (len <= RSTRING(arg)->len) {
                len = RSTRING(arg)->len;
            }
            if (RSTRING(arg)->len < len) {
                rb_str_resize(arg, len+1);
            }
            RSTRING(arg)->ptr[len] = 17;        /* a little sanity check here */
            narg = (long)RSTRING(arg)->ptr;
        }
    }
    GetOpenFile(io, fptr);
    retval = io_cntl(fptr->fd, cmd, narg, io_p);
    if (retval < 0) rb_sys_fail(fptr->path);
    if (TYPE(arg) == T_STRING && RSTRING(arg)->ptr[len] != 17) {
        rb_raise(rb_eArgError, "return value overflowed string");
    }

    if (!io_p && cmd == F_SETFL) {
      if (narg & O_NONBLOCK) {
        fptr->mode |= FMODE_WSPLIT_INITIALIZED;
        fptr->mode &= ~FMODE_WSPLIT;
      }
      else {
        fptr->mode &= ~(FMODE_WSPLIT_INITIALIZED|FMODE_WSPLIT);
      }
    }

    return INT2NUM(retval);
#else
    rb_notimplement();
    return Qnil;                /* not reached */
#endif
}

/*
 *  call-seq:
 *     ios.ioctl(integer_cmd, arg)    => integer
 *
 *  Provides a mechanism for issuing low-level commands to control or
 *  query I/O devices. Arguments and results are platform dependent. If
 *  <i>arg</i> is a number, its value is passed directly. If it is a
 *  string, it is interpreted as a binary sequence of bytes. On Unix
 *  platforms, see <code>ioctl(2)</code> for details. Not implemented on
 *  all platforms.
 */

static VALUE
rb_io_ioctl(int argc, VALUE *argv, VALUE io)
{
    VALUE req, arg;

    rb_scan_args(argc, argv, "11", &req, &arg);
    return rb_io_ctl(io, req, arg, 1);
}

/*
 *  call-seq:
 *     ios.fcntl(integer_cmd, arg)    => integer
 *
 *  Provides a mechanism for issuing low-level commands to control or
 *  query file-oriented I/O streams. Arguments and results are platform
 *  dependent. If <i>arg</i> is a number, its value is passed
 *  directly. If it is a string, it is interpreted as a binary sequence
 *  of bytes (<code>Array#pack</code> might be a useful way to build this
 *  string). On Unix platforms, see <code>fcntl(2)</code> for details.
 *  Not implemented on all platforms.
 */

static VALUE
rb_io_fcntl(int argc, VALUE *argv, VALUE io)
{
#ifdef HAVE_FCNTL
    VALUE req, arg;

    rb_scan_args(argc, argv, "11", &req, &arg);
    return rb_io_ctl(io, req, arg, 0);
#else
    rb_notimplement();
    return Qnil;                /* not reached */
#endif
}

/*
 *  call-seq:
 *     syscall(fixnum [, args...])   => integer
 *
 *  Calls the operating system function identified by _fixnum_,
 *  passing in the arguments, which must be either +String+
 *  objects, or +Integer+ objects that ultimately fit within
 *  a native +long+. Up to nine parameters may be passed (14
 *  on the Atari-ST). The function identified by _fixnum_ is system
 *  dependent. On some Unix systems, the numbers may be obtained from a
 *  header file called <code>syscall.h</code>.
 *
 *     syscall 4, 1, "hello\n", 6   # '4' is write(2) on our box
 *
 *  <em>produces:</em>
 *
 *     hello
 */

static VALUE
rb_f_syscall(int argc, VALUE *argv)
{
#if defined(HAVE_SYSCALL) && !defined(__CHECKER__)
#ifdef atarist
    unsigned long arg[14]; /* yes, we really need that many ! */
#else
    unsigned long arg[8];
#endif
    int retval = -1;
    int i = 1;
    int items = argc - 1;

    /* This probably won't work on machines where sizeof(long) != sizeof(int)
     * or where sizeof(long) != sizeof(char*).  But such machines will
     * not likely have syscall implemented either, so who cares?
     */

    rb_secure(2);
    if (argc == 0)
        rb_raise(rb_eArgError, "too few arguments for syscall");
    arg[0] = NUM2LONG(argv[0]); argv++;
    while (items--) {
        VALUE v = rb_check_string_type(*argv);

        if (!NIL_P(v)) {
            StringValue(v);
            rb_str_modify(v);
            arg[i] = (unsigned long)RSTRING(v)->ptr;
        }
        else {
            arg[i] = (unsigned long)NUM2LONG(*argv);
        }
        argv++;
        i++;
    }
    TRAP_BEG;
    switch (argc) {
      case 1:
        retval = syscall(arg[0]);
        break;
      case 2:
        retval = syscall(arg[0],arg[1]);
        break;
      case 3:
        retval = syscall(arg[0],arg[1],arg[2]);
        break;
      case 4:
        retval = syscall(arg[0],arg[1],arg[2],arg[3]);
        break;
      case 5:
        retval = syscall(arg[0],arg[1],arg[2],arg[3],arg[4]);
        break;
      case 6:
        retval = syscall(arg[0],arg[1],arg[2],arg[3],arg[4],arg[5]);
        break;
      case 7:
        retval = syscall(arg[0],arg[1],arg[2],arg[3],arg[4],arg[5],arg[6]);
        break;
      case 8:
        retval = syscall(arg[0],arg[1],arg[2],arg[3],arg[4],arg[5],arg[6],
          arg[7]);
        break;
#ifdef atarist
      case 9:
        retval = syscall(arg[0],arg[1],arg[2],arg[3],arg[4],arg[5],arg[6],
          arg[7], arg[8]);
        break;
      case 10:
        retval = syscall(arg[0],arg[1],arg[2],arg[3],arg[4],arg[5],arg[6],
          arg[7], arg[8], arg[9]);
        break;
      case 11:
        retval = syscall(arg[0],arg[1],arg[2],arg[3],arg[4],arg[5],arg[6],
          arg[7], arg[8], arg[9], arg[10]);
        break;
      case 12:
        retval = syscall(arg[0],arg[1],arg[2],arg[3],arg[4],arg[5],arg[6],
          arg[7], arg[8], arg[9], arg[10], arg[11]);
        break;
      case 13:
        retval = syscall(arg[0],arg[1],arg[2],arg[3],arg[4],arg[5],arg[6],
          arg[7], arg[8], arg[9], arg[10], arg[11], arg[12]);
        break;
      case 14:
        retval = syscall(arg[0],arg[1],arg[2],arg[3],arg[4],arg[5],arg[6],
          arg[7], arg[8], arg[9], arg[10], arg[11], arg[12], arg[13]);
        break;
#endif /* atarist */
    }
    TRAP_END;
    if (retval < 0) rb_sys_fail(0);
    return INT2NUM(retval);
#else
    rb_notimplement();
    return Qnil;                /* not reached */
#endif
}

static VALUE
io_new_instance(VALUE args)
{
    return rb_class_new_instance(2, (VALUE*)args+1, *(VALUE*)args);
}

/*
 *  call-seq:
 *     IO.pipe -> array
 *
 *  Creates a pair of pipe endpoints (connected to each other) and
 *  returns them as a two-element array of <code>IO</code> objects:
 *  <code>[</code> <i>read_file</i>, <i>write_file</i> <code>]</code>. Not
 *  available on all platforms.
 *
 *  In the example below, the two processes close the ends of the pipe
 *  that they are not using. This is not just a cosmetic nicety. The
 *  read end of a pipe will not generate an end of file condition if
 *  there are any writers with the pipe still open. In the case of the
 *  parent process, the <code>rd.read</code> will never return if it
 *  does not first issue a <code>wr.close</code>.
 *
 *     rd, wr = IO.pipe
 *
 *     if fork
 *       wr.close
 *       puts "Parent got: <#{rd.read}>"
 *       rd.close
 *       Process.wait
 *     else
 *       rd.close
 *       puts "Sending message to parent"
 *       wr.write "Hi Dad"
 *       wr.close
 *     end
 *
 *  <em>produces:</em>
 *
 *     Sending message to parent
 *     Parent got: <Hi Dad>
 */

static VALUE
rb_io_s_pipe(VALUE klass)
{
#ifndef __human68k__
    int pipes[2], state;
    VALUE r, w, args[3];

    if (pipe(pipes) == -1)
        rb_sys_fail(0);

    args[0] = klass;
    args[1] = INT2NUM(pipes[0]);
    args[2] = INT2FIX(O_RDONLY);
    r = rb_protect(io_new_instance, (VALUE)args, &state);
    if (state) {
        close(pipes[0]);
        close(pipes[1]);
        rb_jump_tag(state);
    }
    args[1] = INT2NUM(pipes[1]);
    args[2] = INT2FIX(O_WRONLY);
    w = rb_protect(io_new_instance, (VALUE)args, &state);
    if (state) {
        close(pipes[1]);
        if (!NIL_P(r)) rb_io_close(r);
        rb_jump_tag(state);
    }
    rb_io_synchronized(RFILE(w)->fptr);

    return rb_assoc_new(r, w);
#else
    rb_notimplement();
    return Qnil;                /* not reached */
#endif
}

struct foreach_arg {
    int argc;
    VALUE sep;
    VALUE io;
};

static VALUE
io_s_foreach(struct foreach_arg *arg)
{
    VALUE str;

    while (!NIL_P(str = rb_io_getline(arg->sep, arg->io))) {
        rb_yield(str);
    }
    return Qnil;
}

/*
 *  call-seq:
 *     IO.foreach(name, sep_string=$/) {|line| block }   => nil
 *
 *  Executes the block for every line in the named I/O port, where lines
 *  are separated by <em>sep_string</em>.
 *
 *     IO.foreach("testfile") {|x| print "GOT ", x }
 *
 *  <em>produces:</em>
 *
 *     GOT This is line one
 *     GOT This is line two
 *     GOT This is line three
 *     GOT And so on...
 */

static VALUE
rb_io_s_foreach(int argc, VALUE *argv, VALUE self)
{
    VALUE fname;
    struct foreach_arg arg;

    RETURN_ENUMERATOR(self, argc, argv);
    rb_scan_args(argc, argv, "11", &fname, &arg.sep);
    FilePathValue(fname);
    if (argc == 1) {
        arg.sep = rb_default_rs;
    }
    else if (!NIL_P(arg.sep)) {
        StringValue(arg.sep);
    }
    arg.io = rb_io_open(RSTRING(fname)->ptr, "r");
    if (NIL_P(arg.io)) return Qnil;

    return rb_ensure(io_s_foreach, (VALUE)&arg, rb_io_close, arg.io);
}

static VALUE
io_s_readlines(struct foreach_arg *arg)
{
    return rb_io_readlines(arg->argc, &arg->sep, arg->io);
}

/*
 *  call-seq:
 *     IO.readlines(name, sep_string=$/)   => array
 *
 *  Reads the entire file specified by <i>name</i> as individual
 *  lines, and returns those lines in an array. Lines are separated by
 *  <i>sep_string</i>.
 *
 *     a = IO.readlines("testfile")
 *     a[0]   #=> "This is line one\n"
 *
 */

static VALUE
rb_io_s_readlines(int argc, VALUE *argv, VALUE io)
{
    VALUE fname;
    struct foreach_arg arg;

    rb_scan_args(argc, argv, "11", &fname, &arg.sep);
    FilePathValue(fname);
    arg.argc = argc - 1;
    arg.io = rb_io_open(RSTRING(fname)->ptr, "r");
    if (NIL_P(arg.io)) return Qnil;
    return rb_ensure(io_s_readlines, (VALUE)&arg, rb_io_close, arg.io);
}

static VALUE
io_s_read(struct foreach_arg *arg)
{
    return io_read(arg->argc, &arg->sep, arg->io);
}

/*
 *  call-seq:
 *     IO.read(name, [length [, offset]] )   => string
 *
 *  Opens the file, optionally seeks to the given offset, then returns
 *  <i>length</i> bytes (defaulting to the rest of the file).
 *  <code>read</code> ensures the file is closed before returning.
 *
 *     IO.read("testfile")           #=> "This is line one\nThis is line two\nThis is line three\nAnd so on...\n"
 *     IO.read("testfile", 20)       #=> "This is line one\nThi"
 *     IO.read("testfile", 20, 10)   #=> "ne one\nThis is line "
 */

static VALUE
rb_io_s_read(int argc, VALUE *argv, VALUE io)
{
    VALUE fname, offset;
    struct foreach_arg arg;

    rb_scan_args(argc, argv, "12", &fname, &arg.sep, &offset);
    FilePathValue(fname);
    arg.argc = argc ? 1 : 0;
    arg.io = rb_io_open(RSTRING(fname)->ptr, "r");
    if (NIL_P(arg.io)) return Qnil;
    if (!NIL_P(offset)) {
        rb_io_seek(arg.io, offset, SEEK_SET);
    }
    return rb_ensure(io_s_read, (VALUE)&arg, rb_io_close, arg.io);
}

static VALUE
argf_tell(void)
{
    if (!next_argv()) {
        rb_raise(rb_eArgError, "no stream to tell");
    }
    ARGF_FORWARD(0, 0);
    return rb_io_tell(current_file);
}

static VALUE
argf_seek_m(int argc, VALUE *argv, VALUE self)
{
    if (!next_argv()) {
        rb_raise(rb_eArgError, "no stream to seek");
    }
    ARGF_FORWARD(argc, argv);
    return rb_io_seek_m(argc, argv, current_file);
}

static VALUE
argf_set_pos(VALUE self, VALUE offset)
{
    if (!next_argv()) {
        rb_raise(rb_eArgError, "no stream to set position");
    }
    ARGF_FORWARD(1, &offset);
    return rb_io_set_pos(current_file, offset);
}

static VALUE
argf_rewind(void)
{
    if (!next_argv()) {
        rb_raise(rb_eArgError, "no stream to rewind");
    }
    ARGF_FORWARD(0, 0);
    return rb_io_rewind(current_file);
}

static VALUE
argf_fileno(void)
{
    if (!next_argv()) {
        rb_raise(rb_eArgError, "no stream");
    }
    ARGF_FORWARD(0, 0);
    return rb_io_fileno(current_file);
}

static VALUE
argf_to_io(void)
{
    next_argv();
    ARGF_FORWARD(0, 0);
    return current_file;
}

static VALUE
argf_eof(void)
{
    if (current_file) {
        if (init_p == 0) return Qtrue;
        ARGF_FORWARD(0, 0);
        if (rb_io_eof(current_file)) {
            return Qtrue;
        }
    }
    return Qfalse;
}

static VALUE
argf_read(int argc, VALUE *argv)
{
    VALUE tmp, str, length;
    long len = 0;

    rb_scan_args(argc, argv, "02", &length, &str);
    if (!NIL_P(length)) {
        len = NUM2LONG(argv[0]);
    }
    if (!NIL_P(str)) {
        StringValue(str);
        rb_str_resize(str,0);
        argv[1] = Qnil;
    }

  retry:
    if (!next_argv()) {
        return str;
    }
    if (TYPE(current_file) != T_FILE) {
        tmp = argf_forward(argc, argv);
    }
    else {
        tmp = io_read(argc, argv, current_file);
    }
    if (NIL_P(str)) str = tmp;
    else if (!NIL_P(tmp)) rb_str_append(str, tmp);
    if (NIL_P(tmp) || NIL_P(length)) {
        if (next_p != -1) {
            argf_close(current_file);
            next_p = 1;
            goto retry;
        }
    }
    else if (argc >= 1) {
        if (RSTRING(str)->len < len) {
            len -= RSTRING(str)->len;
            argv[0] = INT2NUM(len);
            goto retry;
        }
    }
    return str;
}

static VALUE
argf_readpartial_rescue(VALUE dummy)
{
    return Qnil;
}

static VALUE
argf_readpartial(int argc, VALUE *argv)
{
    VALUE tmp, str, length;

    rb_scan_args(argc, argv, "11", &length, &str);
    if (!NIL_P(str)) {
        StringValue(str);
        argv[1] = str;
    }

    if (!next_argv()) {
        rb_str_resize(str, 0);
        rb_eof_error();
    }
    if (TYPE(current_file) != T_FILE) {
        tmp = rb_rescue2(argf_forward, (VALUE)argv,
                         argf_readpartial_rescue, (VALUE)Qnil,
                         rb_eEOFError, (VALUE)0);
    }
    else {
        tmp = io_getpartial(argc, argv, current_file);
    }
    if (NIL_P(tmp)) {
        if (next_p == -1) {
            rb_eof_error();
        }
        argf_close(current_file);
        next_p = 1;
        if (RARRAY(rb_argv)->len == 0)
            rb_eof_error();
        if (NIL_P(str))
            str = rb_str_new(NULL, 0);
        return str;
    }
    return tmp;
}

static VALUE
argf_getc(void)
{
    VALUE byte;

  retry:
    if (!next_argv()) return Qnil;
    if (TYPE(current_file) != T_FILE) {
        byte = rb_funcall3(current_file, rb_intern("getc"), 0, 0);
    }
    else {
        byte = rb_io_getc(current_file);
    }
    if (NIL_P(byte) && next_p != -1) {
        argf_close(current_file);
        next_p = 1;
        goto retry;
    }

    return byte;
}

static VALUE
argf_readchar(void)
{
    VALUE c;

    NEXT_ARGF_FORWARD(0, 0);
    c = argf_getc();
    if (NIL_P(c)) {
        rb_eof_error();
    }
    return c;
}

static VALUE
argf_each_line(int argc, VALUE *argv, VALUE self)
{
    VALUE str;

    RETURN_ENUMERATOR(self, argc, argv);
    if (!next_argv()) return Qnil;
    if (TYPE(current_file) != T_FILE) {
        for (;;) {
            if (!next_argv()) return argf;
            rb_iterate(rb_each, current_file, rb_yield, 0);
            next_p = 1;
        }
    }
    while (!NIL_P(str = argf_getline(argc, argv))) {
        rb_yield(str);
    }
    return argf;
}

static VALUE
argf_each_byte(VALUE self)
{
    VALUE byte;

    RETURN_ENUMERATOR(self, 0, 0);
    while (!NIL_P(byte = argf_getc())) {
        rb_yield(byte);
    }
    return argf;
}

static VALUE
argf_filename(void)
{
    next_argv();
    return filename;
}

static VALUE
argf_file(void)
{
    next_argv();
    return current_file;
}

static VALUE
argf_binmode(void)
{
    binmode = 1;
    next_argv();
    ARGF_FORWARD(0, 0);
    rb_io_binmode(current_file);
    return argf;
}

static VALUE
argf_skip(void)
{
    if (next_p != -1) {
        argf_close(current_file);
        next_p = 1;
    }
    return argf;
}

static VALUE
argf_close_m(void)
{
    next_argv();
    argf_close(current_file);
    if (next_p != -1) {
        next_p = 1;
    }
    gets_lineno = 0;
    return argf;
}

static VALUE
argf_closed(void)
{
    next_argv();
    ARGF_FORWARD(0, 0);
    return rb_io_closed(current_file);
}

static VALUE
argf_to_s(void)
{
    return rb_str_new2("ARGF");
}

static VALUE
opt_i_get(void)
{
    if (!ruby_inplace_mode) return Qnil;
    return rb_str_new2(ruby_inplace_mode);
}

static void
opt_i_set(VALUE val)
{
    if (!RTEST(val)) {
        if (ruby_inplace_mode) free(ruby_inplace_mode);
        ruby_inplace_mode = 0;
        return;
    }
    StringValue(val);
    if (ruby_inplace_mode) free(ruby_inplace_mode);
    ruby_inplace_mode = 0;
    ruby_inplace_mode = strdup(RSTRING(val)->ptr);
}

/*
 *  Class <code>IO</code> is the basis for all input and output in Ruby.
 *  An I/O stream may be <em>duplexed</em> (that is, bidirectional), and
 *  so may use more than one native operating system stream.
 *
 *  Many of the examples in this section use class <code>File</code>,
 *  the only standard subclass of <code>IO</code>. The two classes are
 *  closely associated.
 *
 *  As used in this section, <em>portname</em> may take any of the
 *  following forms.
 *
 *  * A plain string represents a filename suitable for the underlying
 *    operating system.
 *
 *  * A string starting with ``<code>|</code>'' indicates a subprocess.
 *    The remainder of the string following the ``<code>|</code>'' is
 *    invoked as a process with appropriate input/output channels
 *    connected to it.
 *
 *  * A string equal to ``<code>|-</code>'' will create another Ruby
 *    instance as a subprocess.
 *
 *  Ruby will convert pathnames between different operating system
 *  conventions if possible. For instance, on a Windows system the
 *  filename ``<code>/gumby/ruby/test.rb</code>'' will be opened as
 *  ``<code>\gumby\ruby\test.rb</code>''. When specifying a
 *  Windows-style filename in a Ruby string, remember to escape the
 *  backslashes:
 *
 *     "c:\\gumby\\ruby\\test.rb"
 *
 *  Our examples here will use the Unix-style forward slashes;
 *  <code>File::SEPARATOR</code> can be used to get the
 *  platform-specific separator character.
 *
 *  I/O ports may be opened in any one of several different modes, which
 *  are shown in this section as <em>mode</em>. The mode may
 *  either be a Fixnum or a String. If numeric, it should be
 *  one of the operating system specific constants (O_RDONLY,
 *  O_WRONLY, O_RDWR, O_APPEND and so on). See man open(2) for
 *  more information.
 *
 *  If the mode is given as a String, it must be one of the
 *  values listed in the following table.
 *
 *    Mode |  Meaning
 *    -----+--------------------------------------------------------
 *    "r"  |  Read-only, starts at beginning of file  (default mode).
 *    -----+--------------------------------------------------------
 *    "r+" |  Read-write, starts at beginning of file.
 *    -----+--------------------------------------------------------
 *    "w"  |  Write-only, truncates existing file
 *         |  to zero length or creates a new file for writing.
 *    -----+--------------------------------------------------------
 *    "w+" |  Read-write, truncates existing file to zero length
 *         |  or creates a new file for reading and writing.
 *    -----+--------------------------------------------------------
 *    "a"  |  Write-only, starts at end of file if file exists,
 *         |  otherwise creates a new file for writing.
 *    -----+--------------------------------------------------------
 *    "a+" |  Read-write, starts at end of file if file exists,
 *         |  otherwise creates a new file for reading and
 *         |  writing.
 *    -----+--------------------------------------------------------
 *     "b" |  (DOS/Windows only) Binary file mode (may appear with
 *         |  any of the key letters listed above).
 *
 *
 *  The global constant ARGF (also accessible as $<) provides an
 *  IO-like stream which allows access to all files mentioned on the
 *  command line (or STDIN if no files are mentioned). ARGF provides
 *  the methods <code>#path</code> and <code>#filename</code> to access
 *  the name of the file currently being read.
 */

void
Init_IO(void)
{
#ifdef __CYGWIN__
#include <sys/cygwin.h>
    static struct __cygwin_perfile pf[] =
    {
        {"", O_RDONLY | O_BINARY},
        {"", O_WRONLY | O_BINARY},
        {"", O_RDWR | O_BINARY},
        {"", O_APPEND | O_BINARY},
        {NULL, 0}
    };
    cygwin_internal(CW_PERFILE, pf);
#endif

    rb_eIOError = rb_define_class("IOError", rb_eStandardError);
    rb_eEOFError = rb_define_class("EOFError", rb_eIOError);

    id_write = rb_intern("write");
    id_read = rb_intern("read");
    id_getc = rb_intern("getc");
    id_flush = rb_intern("flush");

    rb_define_global_function("syscall", rb_f_syscall, -1);

    rb_define_global_function("open", rb_f_open, -1);
    rb_define_global_function("printf", rb_f_printf, -1);
    rb_define_global_function("print", rb_f_print, -1);
    rb_define_global_function("putc", rb_f_putc, 1);
    rb_define_global_function("puts", rb_f_puts, -1);
    rb_define_global_function("gets", rb_f_gets, -1);
    rb_define_global_function("readline", rb_f_readline, -1);
    rb_define_global_function("getc", rb_f_getc, 0);
    rb_define_global_function("select", rb_f_select, -1);

    rb_define_global_function("readlines", rb_f_readlines, -1);

    rb_define_global_function("`", rb_f_backquote, 1);

    rb_define_global_function("p", rb_f_p, -1);
    rb_define_method(rb_mKernel, "display", rb_obj_display, -1);

    rb_cIO = rb_define_class("IO", rb_cObject);
    rb_include_module(rb_cIO, rb_mEnumerable);

    rb_define_alloc_func(rb_cIO, io_alloc);
    rb_define_singleton_method(rb_cIO, "new", rb_io_s_new, -1);
    rb_define_singleton_method(rb_cIO, "open",  rb_io_s_open, -1);
    rb_define_singleton_method(rb_cIO, "sysopen",  rb_io_s_sysopen, -1);
    rb_define_singleton_method(rb_cIO, "for_fd", rb_io_s_for_fd, -1);
    rb_define_singleton_method(rb_cIO, "popen", rb_io_s_popen, -1);
    rb_define_singleton_method(rb_cIO, "foreach", rb_io_s_foreach, -1);
    rb_define_singleton_method(rb_cIO, "readlines", rb_io_s_readlines, -1);
    rb_define_singleton_method(rb_cIO, "read", rb_io_s_read, -1);
    rb_define_singleton_method(rb_cIO, "select", rb_f_select, -1);
    rb_define_singleton_method(rb_cIO, "pipe", rb_io_s_pipe, 0);

    rb_define_method(rb_cIO, "initialize", rb_io_initialize, -1);

    rb_output_fs = Qnil;
    rb_define_hooked_variable("$,", &rb_output_fs, 0, rb_str_setter);

    rb_global_variable(&rb_default_rs);
    rb_rs = rb_default_rs = rb_str_new2("\n");
    rb_output_rs = Qnil;
    OBJ_FREEZE(rb_default_rs);  /* avoid modifying RS_default */
    rb_define_hooked_variable("$/", &rb_rs, 0, rb_str_setter);
    rb_define_hooked_variable("$-0", &rb_rs, 0, rb_str_setter);
    rb_define_hooked_variable("$\\", &rb_output_rs, 0, rb_str_setter);

    rb_define_hooked_variable("$.", &lineno, 0, lineno_setter);
    rb_define_virtual_variable("$_", rb_lastline_get, rb_lastline_set);

    rb_define_method(rb_cIO, "initialize_copy", rb_io_init_copy, 1);
    rb_define_method(rb_cIO, "reopen", rb_io_reopen, -1);

    rb_define_method(rb_cIO, "print", rb_io_print, -1);
    rb_define_method(rb_cIO, "putc", rb_io_putc, 1);
    rb_define_method(rb_cIO, "puts", rb_io_puts, -1);
    rb_define_method(rb_cIO, "printf", rb_io_printf, -1);

    rb_define_method(rb_cIO, "each",  rb_io_each_line, -1);
    rb_define_method(rb_cIO, "each_line",  rb_io_each_line, -1);
    rb_define_method(rb_cIO, "each_byte",  rb_io_each_byte, 0);

    rb_define_method(rb_cIO, "syswrite", rb_io_syswrite, 1);
    rb_define_method(rb_cIO, "sysread",  rb_io_sysread, -1);

    rb_define_method(rb_cIO, "fileno", rb_io_fileno, 0);
    rb_define_alias(rb_cIO, "to_i", "fileno");
    rb_define_method(rb_cIO, "to_io", rb_io_to_io, 0);

    rb_define_method(rb_cIO, "fsync",   rb_io_fsync, 0);
    rb_define_method(rb_cIO, "sync",   rb_io_sync, 0);
    rb_define_method(rb_cIO, "sync=",  rb_io_set_sync, 1);

    rb_define_method(rb_cIO, "lineno",   rb_io_lineno, 0);
    rb_define_method(rb_cIO, "lineno=",  rb_io_set_lineno, 1);

    rb_define_method(rb_cIO, "readlines",  rb_io_readlines, -1);

    rb_define_method(rb_cIO, "readpartial",  io_readpartial, -1);
    rb_define_method(rb_cIO, "read",  io_read, -1);
    rb_define_method(rb_cIO, "write", io_write, 1);
    rb_define_method(rb_cIO, "gets",  rb_io_gets_m, -1);
    rb_define_method(rb_cIO, "readline",  rb_io_readline, -1);
    rb_define_method(rb_cIO, "getc",  rb_io_getc, 0);
    rb_define_method(rb_cIO, "readchar",  rb_io_readchar, 0);
    rb_define_method(rb_cIO, "ungetc",rb_io_ungetc, 1);
    rb_define_method(rb_cIO, "<<",    rb_io_addstr, 1);
    rb_define_method(rb_cIO, "flush", rb_io_flush, 0);
    rb_define_method(rb_cIO, "tell", rb_io_tell, 0);
    rb_define_method(rb_cIO, "seek", rb_io_seek_m, -1);
    rb_define_const(rb_cIO, "SEEK_SET", INT2FIX(SEEK_SET));
    rb_define_const(rb_cIO, "SEEK_CUR", INT2FIX(SEEK_CUR));
    rb_define_const(rb_cIO, "SEEK_END", INT2FIX(SEEK_END));
    rb_define_method(rb_cIO, "rewind", rb_io_rewind, 0);
    rb_define_method(rb_cIO, "pos", rb_io_tell, 0);
    rb_define_method(rb_cIO, "pos=", rb_io_set_pos, 1);
    rb_define_method(rb_cIO, "eof", rb_io_eof, 0);
    rb_define_method(rb_cIO, "eof?", rb_io_eof, 0);

    rb_define_method(rb_cIO, "close", rb_io_close_m, 0);
    rb_define_method(rb_cIO, "closed?", rb_io_closed, 0);
    rb_define_method(rb_cIO, "close_read", rb_io_close_read, 0);
    rb_define_method(rb_cIO, "close_write", rb_io_close_write, 0);

    rb_define_method(rb_cIO, "isatty", rb_io_isatty, 0);
    rb_define_method(rb_cIO, "tty?", rb_io_isatty, 0);
    rb_define_method(rb_cIO, "binmode",  rb_io_binmode, 0);
    rb_define_method(rb_cIO, "sysseek", rb_io_sysseek, -1);

    rb_define_method(rb_cIO, "ioctl", rb_io_ioctl, -1);
    rb_define_method(rb_cIO, "fcntl", rb_io_fcntl, -1);
    rb_define_method(rb_cIO, "pid", rb_io_pid, 0);
    rb_define_method(rb_cIO, "inspect",  rb_io_inspect, 0);

    rb_define_variable("$stdin", &rb_stdin);
    rb_stdin = prep_stdio(stdin, FMODE_READABLE, rb_cIO, "<STDIN>");
    rb_define_hooked_variable("$stdout", &rb_stdout, 0, stdout_setter);
    rb_stdout = prep_stdio(stdout, FMODE_WRITABLE, rb_cIO, "<STDOUT>");
    rb_define_hooked_variable("$stderr", &rb_stderr, 0, stdout_setter);
    rb_stderr = prep_stdio(stderr, FMODE_WRITABLE|FMODE_SYNC, rb_cIO, "<STDERR>");
    rb_define_hooked_variable("$>", &rb_stdout, 0, stdout_setter);
    orig_stdout = rb_stdout;
    rb_deferr = orig_stderr = rb_stderr;

    /* variables to be removed in 1.8.1 */
    rb_define_hooked_variable("$defout", &rb_stdout, 0, defout_setter);
    rb_define_hooked_variable("$deferr", &rb_stderr, 0, deferr_setter);

    /* constants to hold original stdin/stdout/stderr */
    rb_define_global_const("STDIN", rb_stdin);
    rb_define_global_const("STDOUT", rb_stdout);
    rb_define_global_const("STDERR", rb_stderr);

    rb_define_readonly_variable("$<", &argf);
    argf = rb_obj_alloc(rb_cObject);
    rb_extend_object(argf, rb_mEnumerable);
    rb_define_global_const("ARGF", argf);

    rb_define_singleton_method(argf, "to_s", argf_to_s, 0);

    rb_define_singleton_method(argf, "fileno", argf_fileno, 0);
    rb_define_singleton_method(argf, "to_i", argf_fileno, 0);
    rb_define_singleton_method(argf, "to_io", argf_to_io, 0);
    rb_define_singleton_method(argf, "each",  argf_each_line, -1);
    rb_define_singleton_method(argf, "each_line",  argf_each_line, -1);
    rb_define_singleton_method(argf, "each_byte",  argf_each_byte, 0);

    rb_define_singleton_method(argf, "read",  argf_read, -1);
    rb_define_singleton_method(argf, "readpartial",  argf_readpartial, -1);
    rb_define_singleton_method(argf, "readlines", rb_f_readlines, -1);
    rb_define_singleton_method(argf, "to_a", rb_f_readlines, -1);
    rb_define_singleton_method(argf, "gets", rb_f_gets, -1);
    rb_define_singleton_method(argf, "readline", rb_f_readline, -1);
    rb_define_singleton_method(argf, "getc", argf_getc, 0);
    rb_define_singleton_method(argf, "readchar", argf_readchar, 0);
    rb_define_singleton_method(argf, "tell", argf_tell, 0);
    rb_define_singleton_method(argf, "seek", argf_seek_m, -1);
    rb_define_singleton_method(argf, "rewind", argf_rewind, 0);
    rb_define_singleton_method(argf, "pos", argf_tell, 0);
    rb_define_singleton_method(argf, "pos=", argf_set_pos, 1);
    rb_define_singleton_method(argf, "eof", argf_eof, 0);
    rb_define_singleton_method(argf, "eof?", argf_eof, 0);
    rb_define_singleton_method(argf, "binmode", argf_binmode, 0);

    rb_define_singleton_method(argf, "filename", argf_filename, 0);
    rb_define_singleton_method(argf, "path", argf_filename, 0);
    rb_define_singleton_method(argf, "file", argf_file, 0);
    rb_define_singleton_method(argf, "skip", argf_skip, 0);
    rb_define_singleton_method(argf, "close", argf_close_m, 0);
    rb_define_singleton_method(argf, "closed?", argf_closed, 0);

    rb_define_singleton_method(argf, "lineno",   argf_lineno, 0);
    rb_define_singleton_method(argf, "lineno=",  argf_set_lineno, 1);

    rb_global_variable(&current_file);
    rb_define_readonly_variable("$FILENAME", &filename);
    filename = rb_str_new2("-");

    rb_define_virtual_variable("$-i", opt_i_get, opt_i_set);

#if defined (_WIN32) || defined(DJGPP) || defined(__CYGWIN__) || defined(__human68k__)
    atexit(pipe_atexit);
#endif

    Init_File();

    rb_define_method(rb_cFile, "initialize",  rb_file_initialize, -1);

    rb_file_const("RDONLY", INT2FIX(O_RDONLY));
    rb_file_const("WRONLY", INT2FIX(O_WRONLY));
    rb_file_const("RDWR", INT2FIX(O_RDWR));
    rb_file_const("APPEND", INT2FIX(O_APPEND));
    rb_file_const("CREAT", INT2FIX(O_CREAT));
    rb_file_const("EXCL", INT2FIX(O_EXCL));
#if defined(O_NDELAY) || defined(O_NONBLOCK)
#   ifdef O_NONBLOCK
    rb_file_const("NONBLOCK", INT2FIX(O_NONBLOCK));
#   else
    rb_file_const("NONBLOCK", INT2FIX(O_NDELAY));
#   endif
#endif
    rb_file_const("TRUNC", INT2FIX(O_TRUNC));
#ifdef O_NOCTTY
    rb_file_const("NOCTTY", INT2FIX(O_NOCTTY));
#endif
#ifdef O_BINARY
    rb_file_const("BINARY", INT2FIX(O_BINARY));
#endif
#ifdef O_SYNC
    rb_file_const("SYNC", INT2FIX(O_SYNC));
#endif
}
/* [<][>][^] [v] [top][bottom][index] [help] */


lex.c

root/lex.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. hash
  2. rb_reserved_word
/* C code produced by gperf version 2.7.2 */
/* Command-line: gperf -C -p -j1 -i 1 -g -o -t -N rb_reserved_word -k'1,3,$' keywords  */
struct kwtable {char *name; int id[2]; enum lex_state_e state;};
const struct kwtable *rb_reserved_word(const char *, unsigned int);
#ifndef RIPPER
;

#define TOTAL_KEYWORDS 40
#define MIN_WORD_LENGTH 2
#define MAX_WORD_LENGTH 8
#define MIN_HASH_VALUE 6
#define MAX_HASH_VALUE 55
/* maximum key range = 50, duplicates = 0 */

#ifdef __GNUC__
__inline
#else
#ifdef __cplusplus
inline
#endif
#endif
static unsigned int
hash (str, len)
     register const char *str;
     register unsigned int len;
{
  static const unsigned char asso_values[] =
    {
      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
      56, 56, 56, 11, 56, 56, 36, 56,  1, 37,
      31,  1, 56, 56, 56, 56, 29, 56,  1, 56,
      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
      56, 56, 56, 56, 56,  1, 56, 32,  1,  2,
       1,  1,  4, 23, 56, 17, 56, 20,  9,  2,
       9, 26, 14, 56,  5,  1,  1, 16, 56, 21,
      20,  9, 56, 56, 56, 56, 56, 56, 56, 56,
      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
      56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
      56, 56, 56, 56, 56, 56
    };
  register int hval = len;

  switch (hval)
    {
      default:
      case 3:
        hval += asso_values[(unsigned char)str[2]];
      case 2:
      case 1:
        hval += asso_values[(unsigned char)str[0]];
        break;
    }
  return hval + asso_values[(unsigned char)str[len - 1]];
}

#ifdef __GNUC__
__inline
#endif
const struct kwtable *
rb_reserved_word (str, len)
     register const char *str;
     register unsigned int len;
{
  static const struct kwtable wordlist[] =
    {
      {""}, {""}, {""}, {""}, {""}, {""},
      {"end", {kEND, kEND}, EXPR_END},
      {"else", {kELSE, kELSE}, EXPR_BEG},
      {"case", {kCASE, kCASE}, EXPR_VALUE},
      {"ensure", {kENSURE, kENSURE}, EXPR_BEG},
      {"module", {kMODULE, kMODULE}, EXPR_VALUE},
      {"elsif", {kELSIF, kELSIF}, EXPR_VALUE},
      {"def", {kDEF, kDEF}, EXPR_FNAME},
      {"rescue", {kRESCUE, kRESCUE_MOD}, EXPR_MID},
      {"not", {kNOT, kNOT}, EXPR_VALUE},
      {"then", {kTHEN, kTHEN}, EXPR_BEG},
      {"yield", {kYIELD, kYIELD}, EXPR_ARG},
      {"for", {kFOR, kFOR}, EXPR_VALUE},
      {"self", {kSELF, kSELF}, EXPR_END},
      {"false", {kFALSE, kFALSE}, EXPR_END},
      {"retry", {kRETRY, kRETRY}, EXPR_END},
      {"return", {kRETURN, kRETURN}, EXPR_MID},
      {"true", {kTRUE, kTRUE}, EXPR_END},
      {"if", {kIF, kIF_MOD}, EXPR_VALUE},
      {"defined?", {kDEFINED, kDEFINED}, EXPR_ARG},
      {"super", {kSUPER, kSUPER}, EXPR_ARG},
      {"undef", {kUNDEF, kUNDEF}, EXPR_FNAME},
      {"break", {kBREAK, kBREAK}, EXPR_MID},
      {"in", {kIN, kIN}, EXPR_VALUE},
      {"do", {kDO, kDO}, EXPR_BEG},
      {"nil", {kNIL, kNIL}, EXPR_END},
      {"until", {kUNTIL, kUNTIL_MOD}, EXPR_VALUE},
      {"unless", {kUNLESS, kUNLESS_MOD}, EXPR_VALUE},
      {"or", {kOR, kOR}, EXPR_VALUE},
      {"next", {kNEXT, kNEXT}, EXPR_MID},
      {"when", {kWHEN, kWHEN}, EXPR_VALUE},
      {"redo", {kREDO, kREDO}, EXPR_END},
      {"and", {kAND, kAND}, EXPR_VALUE},
      {"begin", {kBEGIN, kBEGIN}, EXPR_BEG},
      {"__LINE__", {k__LINE__, k__LINE__}, EXPR_END},
      {"class", {kCLASS, kCLASS}, EXPR_CLASS},
      {"__FILE__", {k__FILE__, k__FILE__}, EXPR_END},
      {"END", {klEND, klEND}, EXPR_END},
      {"BEGIN", {klBEGIN, klBEGIN}, EXPR_END},
      {"while", {kWHILE, kWHILE_MOD}, EXPR_VALUE},
      {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
      {""},
      {"alias", {kALIAS, kALIAS}, EXPR_FNAME}
    };

  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
    {
      register int key = hash (str, len);

      if (key <= MAX_HASH_VALUE && key >= 0)
        {
          register const char *s = wordlist[key].name;

          if (*str == *s && !strcmp (str + 1, s + 1))
            return &wordlist[key];
        }
    }
  return 0;
}
#endif
/* [<][>][^] [v] [top][bottom][index] [help] */


main.c

root/main.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. objcdummyfunction
  2. main
/**********************************************************************

  main.c -

  $Author: akr $
  $Date: 2005/12/27 05:40:04 $
  created at: Fri Aug 19 13:19:58 JST 1994

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#undef RUBY_EXPORT
#include "ruby.h"

#if defined(__MACOS__) && defined(__MWERKS__)
#include <console.h>
#endif

/* to link startup code with ObjC support */
#if (defined(__APPLE__) || defined(__NeXT__)) && defined(__MACH__)
static void objcdummyfunction( void ) { objc_msgSend(); }
#endif

int
main(int argc, char **argv, char **envp)
{
#ifdef RUBY_GC_DEBUG
    RUBY_EXTERN int always_gc;
    always_gc = getenv("RUBY_ALWAYS_GC") != NULL;
#endif
#ifdef _WIN32
    NtInitialize(&argc, &argv);
#endif
#if defined(__MACOS__) && defined(__MWERKS__)
    argc = ccommand(&argv);
#endif

    {
        RUBY_INIT_STACK
        ruby_init();
        ruby_options(argc, argv);
        ruby_run();
    }
    return 0;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


marshal.c

root/marshal.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. shortlen
  2. class2path
  3. w_nbyte
  4. w_byte
  5. w_bytes
  6. w_short
  7. w_long
  8. save_mantissa
  9. load_mantissa
  10. w_float
  11. w_symbol
  12. w_unique
  13. hash_each
  14. w_extended
  15. w_class
  16. w_uclass
  17. w_obj_each
  18. w_ivar
  19. w_object
  20. dump
  21. dump_ensure
  22. marshal_dump
  23. r_byte
  24. long_toobig
  25. r_long
  26. r_bytes0
  27. r_symlink
  28. r_symreal
  29. r_symbol
  30. r_unique
  31. r_string
  32. r_entry
  33. r_ivar
  34. path2class
  35. path2module
  36. r_object0
  37. r_object
  38. load
  39. load_ensure
  40. marshal_load
  41. Init_marshal
  42. rb_marshal_dump
  43. rb_marshal_load
/**********************************************************************

  marshal.c -

  $Author: akr $
  $Date: 2005/12/14 03:03:51 $
  created at: Thu Apr 27 16:30:01 JST 1995

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#include "ruby.h"
#include "rubyio.h"
#include "st.h"
#include "util.h"

#include <math.h>
#ifdef HAVE_FLOAT_H
#include <float.h>
#endif
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif

#define BITSPERSHORT (2*CHAR_BIT)
#define SHORTMASK ((1<<BITSPERSHORT)-1)
#define SHORTDN(x) RSHIFT(x,BITSPERSHORT)

#if SIZEOF_SHORT == SIZEOF_BDIGITS
#define SHORTLEN(x) (x)
#else
static int
shortlen(long len, BDIGIT *ds)
{
    BDIGIT num;
    int offset = 0;

    num = ds[len-1];
    while (num) {
        num = SHORTDN(num);
        offset++;
    }
    return (len - 1)*sizeof(BDIGIT)/2 + offset;
}
#define SHORTLEN(x) shortlen((x),d)
#endif

#define MARSHAL_MAJOR   4
#define MARSHAL_MINOR   8

#define TYPE_NIL        '0'
#define TYPE_TRUE       'T'
#define TYPE_FALSE      'F'
#define TYPE_FIXNUM     'i'

#define TYPE_EXTENDED   'e'
#define TYPE_UCLASS     'C'
#define TYPE_OBJECT     'o'
#define TYPE_DATA       'd'
#define TYPE_USERDEF    'u'
#define TYPE_USRMARSHAL 'U'
#define TYPE_FLOAT      'f'
#define TYPE_BIGNUM     'l'
#define TYPE_STRING     '"'
#define TYPE_REGEXP     '/'
#define TYPE_ARRAY      '['
#define TYPE_HASH       '{'
#define TYPE_HASH_DEF   '}'
#define TYPE_STRUCT     'S'
#define TYPE_MODULE_OLD 'M'
#define TYPE_CLASS      'c'
#define TYPE_MODULE     'm'

#define TYPE_SYMBOL     ':'
#define TYPE_SYMLINK    ';'

#define TYPE_IVAR       'I'
#define TYPE_LINK       '@'

static ID s_dump, s_load, s_mdump, s_mload;
static ID s_dump_data, s_load_data, s_alloc;
static ID s_getc, s_read, s_write, s_binmode;

struct dump_arg {
    VALUE obj;
    VALUE str, dest;
    st_table *symbols;
    st_table *data;
    int taint;
};

struct dump_call_arg {
    VALUE obj;
    struct dump_arg *arg;
    int limit;
};

static VALUE
class2path(VALUE klass)
{
    VALUE path = rb_class_path(klass);
    char *n = RSTRING(path)->ptr;

    if (n[0] == '#') {
        rb_raise(rb_eTypeError, "can't dump anonymous %s %s",
                 (TYPE(klass) == T_CLASS ? "class" : "module"),
                 n);
    }
    if (rb_path2class(n) != rb_class_real(klass)) {
        rb_raise(rb_eTypeError, "%s can't be referred", n);
    }
    return path;
}

static void w_long(long, struct dump_arg*);

static void
w_nbyte(const char *s, int n, struct dump_arg *arg)
{
    VALUE buf = arg->str;
    rb_str_buf_cat(buf, s, n);
    if (arg->dest && RSTRING(buf)->len >= BUFSIZ) {
        if (arg->taint) OBJ_TAINT(buf);
        rb_io_write(arg->dest, buf);
        rb_str_resize(buf, 0);
    }
}

static void
w_byte(char c, struct dump_arg *arg)
{
    w_nbyte(&c, 1, arg);
}

static void
w_bytes(const char *s, int n, struct dump_arg *arg)
{
    w_long(n, arg);
    w_nbyte(s, n, arg);
}

static void
w_short(int x, struct dump_arg *arg)
{
    w_byte((x >> 0) & 0xff, arg);
    w_byte((x >> 8) & 0xff, arg);
}

static void
w_long(long x, struct dump_arg *arg)
{
    char buf[sizeof(long)+1];
    int i, len = 0;

#if SIZEOF_LONG > 4
    if (!(RSHIFT(x, 31) == 0 || RSHIFT(x, 31) == -1)) {
        /* big long does not fit in 4 bytes */
        rb_raise(rb_eTypeError, "long too big to dump");
    }
#endif

    if (x == 0) {
        w_byte(0, arg);
        return;
    }
    if (0 < x && x < 123) {
        w_byte(x + 5, arg);
        return;
    }
    if (-124 < x && x < 0) {
        w_byte((x - 5)&0xff, arg);
        return;
    }
    for (i=1;i<sizeof(long)+1;i++) {
        buf[i] = x & 0xff;
        x = RSHIFT(x,8);
        if (x == 0) {
            buf[0] = i;
            break;
        }
        if (x == -1) {
            buf[0] = -i;
            break;
        }
    }
    len = i;
    for (i=0;i<=len;i++) {
        w_byte(buf[i], arg);
    }
}

#ifdef DBL_MANT_DIG
#define DECIMAL_MANT (53-16)    /* from IEEE754 double precision */

#if DBL_MANT_DIG > 32
#define MANT_BITS 32
#elif DBL_MANT_DIG > 24
#define MANT_BITS 24
#elif DBL_MANT_DIG > 16
#define MANT_BITS 16
#else
#define MANT_BITS 8
#endif

static int
save_mantissa(double d, char *buf)
{
    int e, i = 0;
    unsigned long m;
    double n;

    d = modf(ldexp(frexp(fabs(d), &e), DECIMAL_MANT), &d);
    if (d > 0) {
        buf[i++] = 0;
        do {
            d = modf(ldexp(d, MANT_BITS), &n);
            m = (unsigned long)n;
#if MANT_BITS > 24
            buf[i++] = m >> 24;
#endif
#if MANT_BITS > 16
            buf[i++] = m >> 16;
#endif
#if MANT_BITS > 8
            buf[i++] = m >> 8;
#endif
            buf[i++] = m;
        } while (d > 0);
        while (!buf[i - 1]) --i;
    }
    return i;
}

static double
load_mantissa(double d, const char *buf, int len)
{
    if (--len > 0 && !*buf++) { /* binary mantissa mark */
        int e, s = d < 0, dig = 0;
        unsigned long m;

        modf(ldexp(frexp(fabs(d), &e), DECIMAL_MANT), &d);
        do {
            m = 0;
            switch (len) {
              default: m = *buf++ & 0xff;
#if MANT_BITS > 24
              case 3: m = (m << 8) | (*buf++ & 0xff);
#endif
#if MANT_BITS > 16
              case 2: m = (m << 8) | (*buf++ & 0xff);
#endif
#if MANT_BITS > 8
              case 1: m = (m << 8) | (*buf++ & 0xff);
#endif
            }
            dig -= len < MANT_BITS / 8 ? 8 * (unsigned)len : MANT_BITS;
            d += ldexp((double)m, dig);
        } while ((len -= MANT_BITS / 8) > 0);
        d = ldexp(d, e - DECIMAL_MANT);
        if (s) d = -d;
    }
    return d;
}
#else
#define load_mantissa(d, buf, len) (d)
#define save_mantissa(d, buf) 0
#endif

#ifdef DBL_DIG
#define FLOAT_DIG (DBL_DIG+2)
#else
#define FLOAT_DIG 17
#endif

static void
w_float(double d, struct dump_arg *arg)
{
    char buf[100];

    if (isinf(d)) {
        if (d < 0) strcpy(buf, "-inf");
        else       strcpy(buf, "inf");
    }
    else if (isnan(d)) {
        strcpy(buf, "nan");
    }
    else if (d == 0.0) {
        if (1.0/d < 0) strcpy(buf, "-0");
        else           strcpy(buf, "0");
    }
    else {
        int len;

        /* xxx: should not use system's sprintf(3) */
        sprintf(buf, "%.*g", FLOAT_DIG, d);
        len = strlen(buf);
        w_bytes(buf, len + save_mantissa(d, buf + len), arg);
        return;
    }
    w_bytes(buf, strlen(buf), arg);
}

static void
w_symbol(ID id, struct dump_arg *arg)
{
    char *sym = rb_id2name(id);
    st_data_t num;

    if (st_lookup(arg->symbols, id, &num)) {
        w_byte(TYPE_SYMLINK, arg);
        w_long((long)num, arg);
    }
    else {
        w_byte(TYPE_SYMBOL, arg);
        w_bytes(sym, strlen(sym), arg);
        st_add_direct(arg->symbols, id, arg->symbols->num_entries);
    }
}

static void
w_unique(const char *s, struct dump_arg *arg)
{
    if (s[0] == '#') {
        rb_raise(rb_eTypeError, "can't dump anonymous class %s", s);
    }
    w_symbol(rb_intern(s), arg);
}

static void w_object(VALUE,struct dump_arg*,int);

static int
hash_each(VALUE key, VALUE value, struct dump_call_arg *arg)
{
    w_object(key, arg->arg, arg->limit);
    w_object(value, arg->arg, arg->limit);
    return ST_CONTINUE;
}

static void
w_extended(VALUE klass, struct dump_arg *arg, int check)
{
    char *path;

    if (FL_TEST(klass, FL_SINGLETON)) {
        if (check && RCLASS(klass)->m_tbl->num_entries ||
            (RCLASS(klass)->iv_tbl && RCLASS(klass)->iv_tbl->num_entries > 1)) {
            rb_raise(rb_eTypeError, "singleton can't be dumped");
        }
        klass = RCLASS(klass)->super;
    }
    while (BUILTIN_TYPE(klass) == T_ICLASS) {
        path = rb_class2name(RBASIC(klass)->klass);
        w_byte(TYPE_EXTENDED, arg);
        w_unique(path, arg);
        klass = RCLASS(klass)->super;
    }
}

static void
w_class(char type, VALUE obj, struct dump_arg *arg, int check)
{
    char *path;

    VALUE klass = CLASS_OF(obj);
    w_extended(klass, arg, check);
    w_byte(type, arg);
    path = RSTRING(class2path(rb_class_real(klass)))->ptr;
    w_unique(path, arg);
}

static void
w_uclass(VALUE obj, VALUE base_klass, struct dump_arg *arg)
{
    VALUE klass = CLASS_OF(obj);

    w_extended(klass, arg, Qtrue);
    klass = rb_class_real(klass);
    if (klass != base_klass) {
        w_byte(TYPE_UCLASS, arg);
        w_unique(RSTRING(class2path(klass))->ptr, arg);
    }
}

static int
w_obj_each(ID id, VALUE value, struct dump_call_arg *arg)
{
    w_symbol(id, arg->arg);
    w_object(value, arg->arg, arg->limit);
    return ST_CONTINUE;
}

static void
w_ivar(st_table *tbl, struct dump_call_arg *arg)
{
    if (tbl) {
        w_long(tbl->num_entries, arg->arg);
        st_foreach_safe(tbl, w_obj_each, (st_data_t)arg);
    }
    else {
        w_long(0, arg->arg);
    }
}

static void
w_object(VALUE obj, struct dump_arg *arg, int limit)
{
    struct dump_call_arg c_arg;
    st_table *ivtbl = 0;
    st_data_t num;

    if (limit == 0) {
        rb_raise(rb_eArgError, "exceed depth limit");
    }

    limit--;
    c_arg.limit = limit;
    c_arg.arg = arg;

    if (st_lookup(arg->data, obj, &num)) {
        w_byte(TYPE_LINK, arg);
        w_long((long)num, arg);
        return;
    }

    if (ivtbl = rb_generic_ivar_table(obj)) {
        w_byte(TYPE_IVAR, arg);
    }
    if (obj == Qnil) {
        w_byte(TYPE_NIL, arg);
    }
    else if (obj == Qtrue) {
        w_byte(TYPE_TRUE, arg);
    }
    else if (obj == Qfalse) {
        w_byte(TYPE_FALSE, arg);
    }
    else if (FIXNUM_P(obj)) {
#if SIZEOF_LONG <= 4
        w_byte(TYPE_FIXNUM, arg);
        w_long(FIX2INT(obj), arg);
#else
        if (RSHIFT((long)obj, 31) == 0 || RSHIFT((long)obj, 31) == -1) {
            w_byte(TYPE_FIXNUM, arg);
            w_long(FIX2LONG(obj), arg);
        }
        else {
            w_object(rb_int2big(FIX2LONG(obj)), arg, limit);
        }
#endif
    }
    else if (SYMBOL_P(obj)) {
        w_symbol(SYM2ID(obj), arg);
    }
    else {
        if (OBJ_TAINTED(obj)) arg->taint = Qtrue;

        st_add_direct(arg->data, obj, arg->data->num_entries);
        if (rb_respond_to(obj, s_mdump)) {
            VALUE v;

            v = rb_funcall(obj, s_mdump, 0, 0);
            w_class(TYPE_USRMARSHAL, obj, arg, Qfalse);
            w_object(v, arg, limit);
            if (ivtbl) w_ivar(0, &c_arg);
            return;
        }
        if (rb_respond_to(obj, s_dump)) {
            VALUE v;

            v = rb_funcall(obj, s_dump, 1, INT2NUM(limit));
            if (TYPE(v) != T_STRING) {
                rb_raise(rb_eTypeError, "_dump() must return string");
            }
            if (!ivtbl && (ivtbl = rb_generic_ivar_table(v))) {
                w_byte(TYPE_IVAR, arg);
            }
            w_class(TYPE_USERDEF, obj, arg, Qfalse);
            w_bytes(RSTRING(v)->ptr, RSTRING(v)->len, arg);
            if (ivtbl) {
                w_ivar(ivtbl, &c_arg);
            }
            return;
        }

        switch (BUILTIN_TYPE(obj)) {
          case T_CLASS:
            if (FL_TEST(obj, FL_SINGLETON)) {
                rb_raise(rb_eTypeError, "singleton class can't be dumped");
            }
            w_byte(TYPE_CLASS, arg);
            {
                VALUE path = class2path(obj);
                w_bytes(RSTRING(path)->ptr, RSTRING(path)->len, arg);
            }
            break;

          case T_MODULE:
            w_byte(TYPE_MODULE, arg);
            {
                VALUE path = class2path(obj);
                w_bytes(RSTRING(path)->ptr, RSTRING(path)->len, arg);
            }
            break;

          case T_FLOAT:
            w_byte(TYPE_FLOAT, arg);
            w_float(RFLOAT(obj)->value, arg);
            break;

          case T_BIGNUM:
            w_byte(TYPE_BIGNUM, arg);
            {
                char sign = RBIGNUM(obj)->sign ? '+' : '-';
                long len = RBIGNUM(obj)->len;
                BDIGIT *d = RBIGNUM(obj)->digits;

                w_byte(sign, arg);
                w_long(SHORTLEN(len), arg); /* w_short? */
                while (len--) {
#if SIZEOF_BDIGITS > SIZEOF_SHORT
                    BDIGIT num = *d;
                    int i;

                    for (i=0; i<SIZEOF_BDIGITS; i+=SIZEOF_SHORT) {
                        w_short(num & SHORTMASK, arg);
                        num = SHORTDN(num);
                        if (len == 0 && num == 0) break;
                    }
#else
                    w_short(*d, arg);
#endif
                    d++;
                }
            }
            break;

          case T_STRING:
            w_uclass(obj, rb_cString, arg);
            w_byte(TYPE_STRING, arg);
            w_bytes(RSTRING(obj)->ptr, RSTRING(obj)->len, arg);
            break;

          case T_REGEXP:
            w_uclass(obj, rb_cRegexp, arg);
            w_byte(TYPE_REGEXP, arg);
            w_bytes(RREGEXP(obj)->str, RREGEXP(obj)->len, arg);
            w_byte(rb_reg_options(obj), arg);
            break;

          case T_ARRAY:
            w_uclass(obj, rb_cArray, arg);
            w_byte(TYPE_ARRAY, arg);
            {
                long len = RARRAY(obj)->len;
                VALUE *ptr = RARRAY(obj)->ptr;

                w_long(len, arg);
                while (len--) {
                    w_object(*ptr, arg, limit);
                    ptr++;
                }
            }
            break;

          case T_HASH:
            w_uclass(obj, rb_cHash, arg);
            if (NIL_P(RHASH(obj)->ifnone)) {
                w_byte(TYPE_HASH, arg);
            }
            else if (FL_TEST(obj, FL_USER2)) {
                /* FL_USER2 means HASH_PROC_DEFAULT (see hash.c) */
                rb_raise(rb_eTypeError, "can't dump hash with default proc");
            }
            else {
                w_byte(TYPE_HASH_DEF, arg);
            }
            w_long(RHASH(obj)->tbl->num_entries, arg);
            rb_hash_foreach(obj, hash_each, (st_data_t)&c_arg);
            if (!NIL_P(RHASH(obj)->ifnone)) {
                w_object(RHASH(obj)->ifnone, arg, limit);
            }
            break;

          case T_STRUCT:
            w_class(TYPE_STRUCT, obj, arg, Qtrue);
            {
                long len = RSTRUCT(obj)->len;
                VALUE mem;
                long i;

                w_long(len, arg);
                mem = rb_struct_members(obj);
                for (i=0; i<len; i++) {
                    w_symbol(SYM2ID(RARRAY(mem)->ptr[i]), arg);
                    w_object(RSTRUCT(obj)->ptr[i], arg, limit);
                }
            }
            break;

          case T_OBJECT:
            w_class(TYPE_OBJECT, obj, arg, Qtrue);
            w_ivar(ROBJECT(obj)->iv_tbl, &c_arg);
            break;

          case T_DATA:
            {
                VALUE v;

                w_class(TYPE_DATA, obj, arg, Qtrue);
                if (!rb_respond_to(obj, s_dump_data)) {
                    rb_raise(rb_eTypeError,
                             "no marshal_dump is defined for class %s",
                             rb_obj_classname(obj));
                }
                v = rb_funcall(obj, s_dump_data, 0);
                w_object(v, arg, limit);
            }
            break;

          default:
            rb_raise(rb_eTypeError, "can't dump %s",
                     rb_obj_classname(obj));
            break;
        }
    }
    if (ivtbl) {
        w_ivar(ivtbl, &c_arg);
    }
}

static VALUE
dump(struct dump_call_arg *arg)
{
    w_object(arg->obj, arg->arg, arg->limit);
    if (arg->arg->dest) {
        rb_io_write(arg->arg->dest, arg->arg->str);
        rb_str_resize(arg->arg->str, 0);
    }
    return 0;
}

static VALUE
dump_ensure(struct dump_arg *arg)
{
    st_free_table(arg->symbols);
    st_free_table(arg->data);
    if (arg->taint) {
        OBJ_TAINT(arg->str);
    }
    return 0;
}

/*
 * call-seq:
 *      dump( obj [, anIO] , limit=--1 ) => anIO
 *
 * Serializes obj and all descendent objects. If anIO is
 * specified, the serialized data will be written to it, otherwise the
 * data will be returned as a String. If limit is specified, the
 * traversal of subobjects will be limited to that depth. If limit is
 * negative, no checking of depth will be performed.
 *
 *     class Klass
 *       def initialize(str)
 *         @str = str
 *       end
 *       def sayHello
 *         @str
 *       end
 *     end
 *
 * (produces no output)
 *
 *     o = Klass.new("hello\n")
 *     data = Marshal.dump(o)
 *     obj = Marshal.load(data)
 *     obj.sayHello   #=> "hello\n"
 */
static VALUE
marshal_dump(int argc, VALUE *argv)
{
    VALUE obj, port, a1, a2;
    int limit = -1;
    struct dump_arg arg;
    struct dump_call_arg c_arg;

    port = Qnil;
    rb_scan_args(argc, argv, "12", &obj, &a1, &a2);
    if (argc == 3) {
        if (!NIL_P(a2)) limit = NUM2INT(a2);
        if (NIL_P(a1)) goto type_error;
        port = a1;
    }
    else if (argc == 2) {
        if (FIXNUM_P(a1)) limit = FIX2INT(a1);
        else if (NIL_P(a1)) goto type_error;
        else port = a1;
    }
    arg.dest = 0;
    if (!NIL_P(port)) {
        if (!rb_respond_to(port, s_write)) {
          type_error:
            rb_raise(rb_eTypeError, "instance of IO needed");
        }
        arg.str = rb_str_buf_new(0);
        arg.dest = port;
        if (rb_respond_to(port, s_binmode)) {
            rb_funcall2(port, s_binmode, 0, 0);
        }
    }
    else {
        port = rb_str_buf_new(0);
        arg.str = port;
    }

    arg.symbols = st_init_numtable();
    arg.data    = st_init_numtable();
    arg.taint   = Qfalse;
    c_arg.obj   = obj;
    c_arg.arg   = &arg;
    c_arg.limit = limit;

    w_byte(MARSHAL_MAJOR, &arg);
    w_byte(MARSHAL_MINOR, &arg);

    rb_ensure(dump, (VALUE)&c_arg, dump_ensure, (VALUE)&arg);

    return port;
}

struct load_arg {
    VALUE src;
    long offset;
    st_table *symbols;
    VALUE data;
    VALUE proc;
    int taint;
};

static VALUE r_object(struct load_arg *arg);

static int
r_byte(struct load_arg *arg)
{
    int c;

    if (TYPE(arg->src) == T_STRING) {
        if (RSTRING(arg->src)->len > arg->offset) {
            c = (unsigned char)RSTRING(arg->src)->ptr[arg->offset++];
        }
        else {
            rb_raise(rb_eArgError, "marshal data too short");
        }
    }
    else {
        VALUE src = arg->src;
        VALUE v = rb_funcall2(src, s_getc, 0, 0);
        if (NIL_P(v)) rb_eof_error();
        c = (unsigned char)FIX2INT(v);
    }
    return c;
}

static void
long_toobig(int size)
{
    rb_raise(rb_eTypeError, "long too big for this architecture (size %d, given %d)",
             sizeof(long), size);
}

#undef SIGN_EXTEND_CHAR
#if __STDC__
# define SIGN_EXTEND_CHAR(c) ((signed char)(c))
#else  /* not __STDC__ */
/* As in Harbison and Steele.  */
# define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128)
#endif

static long
r_long(struct load_arg *arg)
{
    register long x;
    int c = SIGN_EXTEND_CHAR(r_byte(arg));
    long i;

    if (c == 0) return 0;
    if (c > 0) {
        if (4 < c && c < 128) {
            return c - 5;
        }
        if (c > sizeof(long)) long_toobig(c);
        x = 0;
        for (i=0;i<c;i++) {
            x |= (long)r_byte(arg) << (8*i);
        }
    }
    else {
        if (-129 < c && c < -4) {
            return c + 5;
        }
        c = -c;
        if (c > sizeof(long)) long_toobig(c);
        x = -1;
        for (i=0;i<c;i++) {
            x &= ~((long)0xff << (8*i));
            x |= (long)r_byte(arg) << (8*i);
        }
    }
    return x;
}

#define r_bytes(arg) r_bytes0(r_long(arg), (arg))

static VALUE
r_bytes0(long len, struct load_arg *arg)
{
    VALUE str;

    if (len == 0) return rb_str_new(0, 0);
    if (TYPE(arg->src) == T_STRING) {
        if (RSTRING(arg->src)->len > arg->offset) {
            str = rb_str_new(RSTRING(arg->src)->ptr+arg->offset, len);
            arg->offset += len;
        }
        else {
          too_short:
            rb_raise(rb_eArgError, "marshal data too short");
        }
    }
    else {
        VALUE src = arg->src;
        VALUE n = LONG2NUM(len);
        str = rb_funcall2(src, s_read, 1, &n);
        if (NIL_P(str)) goto too_short;
        StringValue(str);
        if (RSTRING(str)->len != len) goto too_short;
        if (OBJ_TAINTED(str)) arg->taint = Qtrue;
    }
    return str;
}

static ID
r_symlink(struct load_arg *arg)
{
    ID id;
    long num = r_long(arg);

    if (st_lookup(arg->symbols, num, &id)) {
        return id;
    }
    rb_raise(rb_eArgError, "bad symbol");
}

static ID
r_symreal(struct load_arg *arg)
{
    ID id;

    id = rb_intern(RSTRING(r_bytes(arg))->ptr);
    st_insert(arg->symbols, arg->symbols->num_entries, id);

    return id;
}

static ID
r_symbol(struct load_arg *arg)
{
    if (r_byte(arg) == TYPE_SYMLINK) {
        return r_symlink(arg);
    }
    return r_symreal(arg);
}

static char*
r_unique(struct load_arg *arg)
{
    return rb_id2name(r_symbol(arg));
}

static VALUE
r_string(struct load_arg *arg)
{
    return r_bytes(arg);
}

static VALUE
r_entry(VALUE v, struct load_arg *arg)
{
    rb_hash_aset(arg->data, INT2FIX(RHASH(arg->data)->tbl->num_entries), v);
    if (arg->taint) OBJ_TAINT(v);
    return v;
}

static void
r_ivar(VALUE obj, struct load_arg *arg)
{
    long len;

    len = r_long(arg);
    if (len > 0) {
        while (len--) {
            ID id = r_symbol(arg);
            VALUE val = r_object(arg);
            rb_ivar_set(obj, id, val);
        }
    }
}

static VALUE
path2class(const char *path)
{
    VALUE v = rb_path2class(path);

    if (TYPE(v) != T_CLASS) {
        rb_raise(rb_eArgError, "%s does not refer class", path);
    }
    return v;
}

static VALUE
path2module(const char *path)
{
    VALUE v = rb_path2class(path);

    if (TYPE(v) != T_MODULE) {
        rb_raise(rb_eArgError, "%s does not refer module", path);
    }
    return v;
}

static VALUE
r_object0(struct load_arg *arg, VALUE proc, int *ivp, VALUE extmod)
{
    VALUE v = Qnil;
    int type = r_byte(arg);
    long id;

    switch (type) {
      case TYPE_LINK:
        id = r_long(arg);
        v = rb_hash_aref(arg->data, LONG2FIX(id));
        if (NIL_P(v)) {
            rb_raise(rb_eArgError, "dump format error (unlinked)");
        }
        return v;

      case TYPE_IVAR:
        {
            int ivar = Qtrue;

            v = r_object0(arg, 0, &ivar, extmod);
            if (ivar) r_ivar(v, arg);
        }
        break;

      case TYPE_EXTENDED:
        {
            VALUE m = path2module(r_unique(arg));

            if (NIL_P(extmod)) extmod = rb_ary_new2(0);
            rb_ary_push(extmod, m);

            v = r_object0(arg, 0, 0, extmod);
            while (RARRAY(extmod)->len > 0) {
                m = rb_ary_pop(extmod);
                rb_extend_object(v, m);
            }
        }
        break;

      case TYPE_UCLASS:
        {
            VALUE c = path2class(r_unique(arg));

            if (FL_TEST(c, FL_SINGLETON)) {
                rb_raise(rb_eTypeError, "singleton can't be loaded");
            }
            v = r_object0(arg, 0, 0, extmod);
            if (rb_special_const_p(v) || TYPE(v) == T_OBJECT || TYPE(v) == T_CLASS) {
              format_error:
                rb_raise(rb_eArgError, "dump format error (user class)");
            }
            if (TYPE(v) == T_MODULE || !RTEST(rb_class_inherited_p(c, RBASIC(v)->klass))) {
                VALUE tmp = rb_obj_alloc(c);

                if (TYPE(v) != TYPE(tmp)) goto format_error;
            }
            RBASIC(v)->klass = c;
        }
        break;

      case TYPE_NIL:
        v = Qnil;
        break;

      case TYPE_TRUE:
        v = Qtrue;
        break;

      case TYPE_FALSE:
        v = Qfalse;
        break;

      case TYPE_FIXNUM:
        {
            long i = r_long(arg);
            v = LONG2FIX(i);
        }
        break;

      case TYPE_FLOAT:
        {
            double d, t = 0.0;
            VALUE str = r_bytes(arg);
            const char *ptr = RSTRING(str)->ptr;

            if (strcmp(ptr, "nan") == 0) {
                d = t / t;
            }
            else if (strcmp(ptr, "inf") == 0) {
                d = 1.0 / t;
            }
            else if (strcmp(ptr, "-inf") == 0) {
                d = -1.0 / t;
            }
            else {
                char *e;
                d = strtod(ptr, &e);
                d = load_mantissa(d, e, RSTRING(str)->len - (e - ptr));
            }
            v = rb_float_new(d);
            r_entry(v, arg);
        }
        break;

      case TYPE_BIGNUM:
        {
            long len;
            BDIGIT *digits;
            volatile VALUE data;

            NEWOBJ(big, struct RBignum);
            OBJSETUP(big, rb_cBignum, T_BIGNUM);
            big->sign = (r_byte(arg) == '+');
            len = r_long(arg);
            data = r_bytes0(len * 2, arg);
#if SIZEOF_BDIGITS == SIZEOF_SHORT
            big->len = len;
#else
            big->len = (len + 1) * 2 / sizeof(BDIGIT);
#endif
            big->digits = digits = ALLOC_N(BDIGIT, big->len);
            MEMCPY(digits, RSTRING(data)->ptr, char, len * 2);
#if SIZEOF_BDIGITS > SIZEOF_SHORT
            MEMZERO((char *)digits + len * 2, char,
                    big->len * sizeof(BDIGIT) - len * 2);
#endif
            len = big->len;
            while (len > 0) {
                unsigned char *p = (unsigned char *)digits;
                BDIGIT num = 0;
#if SIZEOF_BDIGITS > SIZEOF_SHORT
                int shift = 0;
                int i;

                for (i=0; i<SIZEOF_BDIGITS; i++) {
                    num |= (int)p[i] << shift;
                    shift += 8;
                }
#else
                num = p[0] | (p[1] << 8);
#endif
                *digits++ = num;
                len--;
            }
            v = rb_big_norm((VALUE)big);
            r_entry(v, arg);
        }
        break;

      case TYPE_STRING:
        v = r_entry(r_string(arg), arg);
        break;

      case TYPE_REGEXP:
        {
            volatile VALUE str = r_bytes(arg);
            int options = r_byte(arg);
            v = r_entry(rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len, options), arg);
        }
        break;

      case TYPE_ARRAY:
        {
            volatile long len = r_long(arg); /* gcc 2.7.2.3 -O2 bug?? */

            v = rb_ary_new2(len);
            r_entry(v, arg);
            while (len--) {
                rb_ary_push(v, r_object(arg));
            }
        }
        break;

      case TYPE_HASH:
      case TYPE_HASH_DEF:
        {
            long len = r_long(arg);

            v = rb_hash_new();
            r_entry(v, arg);
            while (len--) {
                VALUE key = r_object(arg);
                VALUE value = r_object(arg);
                rb_hash_aset(v, key, value);
            }
            if (type == TYPE_HASH_DEF) {
                RHASH(v)->ifnone = r_object(arg);
            }
        }
        break;

      case TYPE_STRUCT:
        {
            VALUE klass, mem, values;
            volatile long i;    /* gcc 2.7.2.3 -O2 bug?? */
            long len;
            ID slot;

            klass = path2class(r_unique(arg));
            mem = rb_struct_s_members(klass);
            if (mem == Qnil) {
                rb_raise(rb_eTypeError, "uninitialized struct");
            }
            len = r_long(arg);

            values = rb_ary_new2(len);
            for (i=0; i<len; i++) {
                rb_ary_push(values, Qnil);
            }
            v = rb_struct_alloc(klass, values);
            r_entry(v, arg);
            for (i=0; i<len; i++) {
                slot = r_symbol(arg);

                if (RARRAY(mem)->ptr[i] != ID2SYM(slot)) {
                    rb_raise(rb_eTypeError, "struct %s not compatible (:%s for :%s)",
                             rb_class2name(klass),
                             rb_id2name(slot),
                             rb_id2name(SYM2ID(RARRAY(mem)->ptr[i])));
                }
                rb_struct_aset(v, LONG2FIX(i), r_object(arg));
            }
        }
        break;

      case TYPE_USERDEF:
        {
            VALUE klass = path2class(r_unique(arg));
            VALUE data;

            if (!rb_respond_to(klass, s_load)) {
                rb_raise(rb_eTypeError, "class %s needs to have method `_load'",
                         rb_class2name(klass));
            }
            data = r_string(arg);
            if (ivp) {
                r_ivar(data, arg);
                *ivp = Qfalse;
            }
            v = rb_funcall(klass, s_load, 1, data);
            r_entry(v, arg);
        }
        break;

      case TYPE_USRMARSHAL:
        {
            VALUE klass = path2class(r_unique(arg));
            VALUE data;

            v = rb_obj_alloc(klass);
            if (! NIL_P(extmod)) {
                while (RARRAY(extmod)->len > 0) {
                    VALUE m = rb_ary_pop(extmod);
                    rb_extend_object(v, m);
                }
            }
            if (!rb_respond_to(v, s_mload)) {
                rb_raise(rb_eTypeError, "instance of %s needs to have method `marshal_load'",
                         rb_class2name(klass));
            }
            r_entry(v, arg);
            data = r_object(arg);
            rb_funcall(v, s_mload, 1, data);
        }
        break;

      case TYPE_OBJECT:
        {
            VALUE klass = path2class(r_unique(arg));

            v = rb_obj_alloc(klass);
            if (TYPE(v) != T_OBJECT) {
                rb_raise(rb_eArgError, "dump format error");
            }
            r_entry(v, arg);
            r_ivar(v, arg);
        }
        break;

      case TYPE_DATA:
       {
           VALUE klass = path2class(r_unique(arg));
           if (rb_respond_to(klass, s_alloc)) {
               static int warn = Qtrue;
               if (warn) {
                   rb_warn("define `allocate' instead of `_alloc'");
                   warn = Qfalse;
               }
               v = rb_funcall(klass, s_alloc, 0);
           }
           else {
               v = rb_obj_alloc(klass);
           }
           if (TYPE(v) != T_DATA) {
               rb_raise(rb_eArgError, "dump format error");
           }
           r_entry(v, arg);
           if (!rb_respond_to(v, s_load_data)) {
               rb_raise(rb_eTypeError,
                        "class %s needs to have instance method `_load_data'",
                        rb_class2name(klass));
           }
           rb_funcall(v, s_load_data, 1, r_object0(arg, 0, 0, extmod));
       }
       break;

      case TYPE_MODULE_OLD:
        {
            volatile VALUE str = r_bytes(arg);

            v = rb_path2class(RSTRING(str)->ptr);
            r_entry(v, arg);
        }
        break;

      case TYPE_CLASS:
        {
            volatile VALUE str = r_bytes(arg);

            v = path2class(RSTRING(str)->ptr);
            r_entry(v, arg);
        }
        break;

      case TYPE_MODULE:
        {
            volatile VALUE str = r_bytes(arg);

            v = path2module(RSTRING(str)->ptr);
            r_entry(v, arg);
        }
        break;

      case TYPE_SYMBOL:
        v = ID2SYM(r_symreal(arg));
        break;

      case TYPE_SYMLINK:
        return ID2SYM(r_symlink(arg));

      default:
        rb_raise(rb_eArgError, "dump format error(0x%x)", type);
        break;
    }
    if (proc) {
        rb_funcall(proc, rb_intern("call"), 1, v);
    }
    return v;
}

static VALUE
r_object(struct load_arg *arg)
{
    return r_object0(arg, arg->proc, 0, Qnil);
}

static VALUE
load(struct load_arg *arg)
{
    return r_object(arg);
}

static VALUE
load_ensure(struct load_arg *arg)
{
    st_free_table(arg->symbols);
    return 0;
}

/*
 * call-seq:
 *     load( source [, proc] ) => obj
 *     restore( source [, proc] ) => obj
 *
 * Returns the result of converting the serialized data in source into a
 * Ruby object (possibly with associated subordinate objects). source
 * may be either an instance of IO or an object that responds to
 * to_str. If proc is specified, it will be passed each object as it
 * is deserialized.
 */
static VALUE
marshal_load(int argc, VALUE *argv)
{
    VALUE port, proc;
    int major, minor;
    VALUE v;
    struct load_arg arg;

    rb_scan_args(argc, argv, "11", &port, &proc);
    if (rb_respond_to(port, rb_intern("to_str"))) {
        arg.taint = OBJ_TAINTED(port); /* original taintedness */
        StringValue(port);             /* possible conversion */
    }
    else if (rb_respond_to(port, s_getc) && rb_respond_to(port, s_read)) {
        if (rb_respond_to(port, s_binmode)) {
            rb_funcall2(port, s_binmode, 0, 0);
        }
        arg.taint = Qtrue;
    }
    else {
        rb_raise(rb_eTypeError, "instance of IO needed");
    }
    arg.src = port;
    arg.offset = 0;

    major = r_byte(&arg);
    minor = r_byte(&arg);
    if (major != MARSHAL_MAJOR || minor > MARSHAL_MINOR) {
        rb_raise(rb_eTypeError, "incompatible marshal file format (can't be read)\n\
\tformat version %d.%d required; %d.%d given",
                 MARSHAL_MAJOR, MARSHAL_MINOR, major, minor);
    }
    if (RTEST(ruby_verbose) && minor != MARSHAL_MINOR) {
        rb_warn("incompatible marshal file format (can be read)\n\
\tformat version %d.%d required; %d.%d given",
                MARSHAL_MAJOR, MARSHAL_MINOR, major, minor);
    }

    arg.symbols = st_init_numtable();
    arg.data   = rb_hash_new();
    if (NIL_P(proc)) arg.proc = 0;
    else             arg.proc = proc;
    v = rb_ensure(load, (VALUE)&arg, load_ensure, (VALUE)&arg);

    return v;
}

/*
 * The marshaling library converts collections of Ruby objects into a
 * byte stream, allowing them to be stored outside the currently
 * active script. This data may subsequently be read and the original
 * objects reconstituted.
 * Marshaled data has major and minor version numbers stored along
 * with the object information. In normal use, marshaling can only
 * load data written with the same major version number and an equal
 * or lower minor version number. If Ruby's ``verbose'' flag is set
 * (normally using -d, -v, -w, or --verbose) the major and minor
 * numbers must match exactly. Marshal versioning is independent of
 * Ruby's version numbers. You can extract the version by reading the
 * first two bytes of marshaled data.
 *
 *     str = Marshal.dump("thing")
 *     RUBY_VERSION   #=> "1.8.0"
 *     str[0]         #=> 4
 *     str[1]         #=> 8
 *
 * Some objects cannot be dumped: if the objects to be dumped include
 * bindings, procedure or method objects, instances of class IO, or
 * singleton objects, a TypeError will be raised.
 * If your class has special serialization needs (for example, if you
 * want to serialize in some specific format), or if it contains
 * objects that would otherwise not be serializable, you can implement
 * your own serialization strategy by defining two methods, _dump and
 * _load:
 * The instance method _dump should return a String object containing
 * all the information necessary to reconstitute objects of this class
 * and all referenced objects up to a maximum depth given as an integer
 * parameter (a value of -1 implies that you should disable depth checking).
 * The class method _load should take a String and return an object of this class.
 */
void
Init_marshal(void)
{
    VALUE rb_mMarshal = rb_define_module("Marshal");

    s_dump = rb_intern("_dump");
    s_load = rb_intern("_load");
    s_mdump = rb_intern("marshal_dump");
    s_mload = rb_intern("marshal_load");
    s_dump_data = rb_intern("_dump_data");
    s_load_data = rb_intern("_load_data");
    s_alloc = rb_intern("_alloc");
    s_getc = rb_intern("getc");
    s_read = rb_intern("read");
    s_write = rb_intern("write");
    s_binmode = rb_intern("binmode");

    rb_define_module_function(rb_mMarshal, "dump", marshal_dump, -1);
    rb_define_module_function(rb_mMarshal, "load", marshal_load, -1);
    rb_define_module_function(rb_mMarshal, "restore", marshal_load, -1);

    rb_define_const(rb_mMarshal, "MAJOR_VERSION", INT2FIX(MARSHAL_MAJOR));
    rb_define_const(rb_mMarshal, "MINOR_VERSION", INT2FIX(MARSHAL_MINOR));
}

VALUE
rb_marshal_dump(VALUE obj, VALUE port)
{
    int argc = 1;
    VALUE argv[2];

    argv[0] = obj;
    argv[1] = port;
    if (!NIL_P(port)) argc = 2;
    return marshal_dump(argc, argv);
}

VALUE
rb_marshal_load(VALUE port)
{
    return marshal_load(1, &port);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


math.c

root/math.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. math_atan2
  2. math_cos
  3. math_sin
  4. math_tan
  5. math_acos
  6. math_asin
  7. math_atan
  8. cosh
  9. math_cosh
  10. sinh
  11. math_sinh
  12. tanh
  13. math_tanh
  14. math_acosh
  15. math_asinh
  16. math_atanh
  17. math_exp
  18. math_log
  19. math_log10
  20. math_sqrt
  21. math_frexp
  22. math_ldexp
  23. math_hypot
  24. math_erf
  25. math_erfc
  26. Init_Math
/**********************************************************************

  math.c -

  $Author: ocean $
  $Date: 2005/09/12 10:44:20 $
  created at: Tue Jan 25 14:12:56 JST 1994

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#include "ruby.h"
#include <math.h>
#include <errno.h>

VALUE rb_mMath;

#define Need_Float(x) (x) = rb_Float(x)
#define Need_Float2(x,y) do {\
    Need_Float(x);\
    Need_Float(y);\
} while (0)

/*
 *  call-seq:
 *     Math.atan2(y, x)  => float
 *
 *  Computes the arc tangent given <i>y</i> and <i>x</i>. Returns
 *  -PI..PI.
 *
 */

static VALUE
math_atan2(VALUE obj, VALUE y, VALUE x)
{
    Need_Float2(y, x);
    return rb_float_new(atan2(RFLOAT(y)->value, RFLOAT(x)->value));
}

/*
 *  call-seq:
 *     Math.cos(x)    => float
 *
 *  Computes the cosine of <i>x</i> (expressed in radians). Returns
 *  -1..1.
 */

static VALUE
math_cos(VALUE obj, VALUE x)
{
    Need_Float(x);
    return rb_float_new(cos(RFLOAT(x)->value));
}

/*
 *  call-seq:
 *     Math.sin(x)    => float
 *
 *  Computes the sine of <i>x</i> (expressed in radians). Returns
 *  -1..1.
 */

static VALUE
math_sin(VALUE obj, VALUE x)
{
    Need_Float(x);

    return rb_float_new(sin(RFLOAT(x)->value));
}

/*
 *  call-seq:
 *     Math.tan(x)    => float
 *
 *  Returns the tangent of <i>x</i> (expressed in radians).
 */

static VALUE
math_tan(VALUE obj, VALUE x)
{
    Need_Float(x);

    return rb_float_new(tan(RFLOAT(x)->value));
}

/*
 *  call-seq:
 *     Math.acos(x)    => float
 *
 *  Computes the arc cosine of <i>x</i>. Returns 0..PI.
 */

static VALUE
math_acos(VALUE obj, VALUE x)
{
    double d;

    Need_Float(x);
    errno = 0;
    d = acos(RFLOAT(x)->value);
    if (errno) {
        rb_sys_fail("acos");
    }
    return rb_float_new(d);
}

/*
 *  call-seq:
 *     Math.asin(x)    => float
 *
 *  Computes the arc sine of <i>x</i>. Returns 0..PI.
 */

static VALUE
math_asin(VALUE obj, VALUE x)
{
    double d;

    Need_Float(x);
    errno = 0;
    d = asin(RFLOAT(x)->value);
    if (errno) {
        rb_sys_fail("asin");
    }
    return rb_float_new(d);
}

/*
 *  call-seq:
 *     Math.atan(x)    => float
 *
 *  Computes the arc tangent of <i>x</i>. Returns -{PI/2} .. {PI/2}.
 */

static VALUE
math_atan(VALUE obj, VALUE x)
{
    Need_Float(x);
    return rb_float_new(atan(RFLOAT(x)->value));
}

#ifndef HAVE_COSH
double
cosh(x)
    double x;
{
    return (exp(x) + exp(-x)) / 2;
}
#endif

/*
 *  call-seq:
 *     Math.cosh(x)    => float
 *
 *  Computes the hyperbolic cosine of <i>x</i> (expressed in radians).
 */

static VALUE
math_cosh(VALUE obj, VALUE x)
{
    Need_Float(x);

    return rb_float_new(cosh(RFLOAT(x)->value));
}

#ifndef HAVE_SINH
double
sinh(x)
    double x;
{
    return (exp(x) - exp(-x)) / 2;
}
#endif

/*
 *  call-seq:
 *     Math.sinh(x)    => float
 *
 *  Computes the hyperbolic sine of <i>x</i> (expressed in
 *  radians).
 */

static VALUE
math_sinh(VALUE obj, VALUE x)
{
    Need_Float(x);
    return rb_float_new(sinh(RFLOAT(x)->value));
}

#ifndef HAVE_TANH
double
tanh(x)
    double x;
{
    return sinh(x) / cosh(x);
}
#endif

/*
 *  call-seq:
 *     Math.tanh()    => float
 *
 *  Computes the hyperbolic tangent of <i>x</i> (expressed in
 *  radians).
 */

static VALUE
math_tanh(VALUE obj, VALUE x)
{
    Need_Float(x);
    return rb_float_new(tanh(RFLOAT(x)->value));
}

/*
 *  call-seq:
 *     Math.acosh(x)    => float
 *
 *  Computes the inverse hyperbolic cosine of <i>x</i>.
 */

static VALUE
math_acosh(VALUE obj, VALUE x)
{
    double d;

    Need_Float(x);
    errno = 0;
    d = acosh(RFLOAT(x)->value);
    if (errno) {
        rb_sys_fail("acosh");
    }
    return rb_float_new(d);
}

/*
 *  call-seq:
 *     Math.asinh(x)    => float
 *
 *  Computes the inverse hyperbolic sine of <i>x</i>.
 */

static VALUE
math_asinh(VALUE obj, VALUE x)
{
    Need_Float(x);
    return rb_float_new(asinh(RFLOAT(x)->value));
}

/*
 *  call-seq:
 *     Math.atanh(x)    => float
 *
 *  Computes the inverse hyperbolic tangent of <i>x</i>.
 */

static VALUE
math_atanh(VALUE obj, VALUE x)
{
    double d;

    Need_Float(x);
    errno = 0;
    d = atanh(RFLOAT(x)->value);
    if (errno) {
        rb_sys_fail("atanh");
    }
    return rb_float_new(d);
}

/*
 *  call-seq:
 *     Math.exp(x)    => float
 *
 *  Returns e**x.
 */

static VALUE
math_exp(VALUE obj, VALUE x)
{
    Need_Float(x);
    return rb_float_new(exp(RFLOAT(x)->value));
}

#if defined __CYGWIN__
# include <cygwin/version.h>
# if CYGWIN_VERSION_DLL_MAJOR < 1005
#  define nan(x) nan()
# endif
# define log(x) ((x) < 0.0 ? nan("") : log(x))
# define log10(x) ((x) < 0.0 ? nan("") : log10(x))
#endif

/*
 *  call-seq:
 *     Math.log(numeric)    => float
 *
 *  Returns the natural logarithm of <i>numeric</i>.
 */

static VALUE
math_log(VALUE obj, VALUE x)
{
    double d;

    Need_Float(x);
    errno = 0;
    d = log(RFLOAT(x)->value);
    if (errno) {
        rb_sys_fail("log");
    }
    return rb_float_new(d);
}

/*
 *  call-seq:
 *     Math.log10(numeric)    => float
 *
 *  Returns the base 10 logarithm of <i>numeric</i>.
 */

static VALUE
math_log10(VALUE obj, VALUE x)
{
    double d;

    Need_Float(x);
    errno = 0;
    d = log10(RFLOAT(x)->value);
    if (errno) {
        rb_sys_fail("log10");
    }
    return rb_float_new(d);
}

/*
 *  call-seq:
 *     Math.sqrt(numeric)    => float
 *
 *  Returns the non-negative square root of <i>numeric</i>. Raises
 *  <code>ArgError</code> if <i>numeric</i> is less than zero.
 */

static VALUE
math_sqrt(VALUE obj, VALUE x)
{
    double d;

    Need_Float(x);
    errno = 0;
    d = sqrt(RFLOAT(x)->value);
    if (errno) {
        rb_sys_fail("sqrt");
    }
    return rb_float_new(d);
}

/*
 *  call-seq:
 *     Math.frexp(numeric)    => [ fraction, exponent ]
 *
 *  Returns a two-element array containing the normalized fraction (a
 *  <code>Float</code>) and exponent (a <code>Fixnum</code>) of
 *  <i>numeric</i>.
 *
 *     fraction, exponent = Math.frexp(1234)   #=> [0.6025390625, 11]
 *     fraction * 2**exponent                  #=> 1234.0
 */

static VALUE
math_frexp(VALUE obj, VALUE x)
{
    double d;
    int exp;

    Need_Float(x);

    d = frexp(RFLOAT(x)->value, &exp);
    return rb_assoc_new(rb_float_new(d), INT2NUM(exp));
}

/*
 *  call-seq:
 *     Math.ldexp(flt, int) -> float
 *
 *  Returns the value of <i>flt</i>*(2**<i>int</i>).
 *
 *     fraction, exponent = Math.frexp(1234)
 *     Math.ldexp(fraction, exponent)   #=> 1234.0
 */

static VALUE
math_ldexp(VALUE obj, VALUE x, VALUE n)
{
    Need_Float(x);
    return rb_float_new(ldexp(RFLOAT(x)->value, NUM2INT(n)));
}

/*
 *  call-seq:
 *     Math.hypot(x, y)    => float
 *
 *  Returns sqrt(x**2 + y**2), the hypotenuse of a right-angled triangle
 *  with sides <i>x</i> and <i>y</i>.
 *
 *     Math.hypot(3, 4)   #=> 5.0
 */

static VALUE
math_hypot(VALUE obj, VALUE x, VALUE y)
{
    Need_Float2(x, y);
    return rb_float_new(hypot(RFLOAT(x)->value, RFLOAT(y)->value));
}

/*
 * call-seq:
 *    Math.erf(x)  => float
 *
 *  Calculates the error function of x.
 */

static VALUE
math_erf(VALUE obj, VALUE x)
{
    Need_Float(x);
    return rb_float_new(erf(RFLOAT(x)->value));
}

/*
 * call-seq:
 *    Math.erfc(x)  => float
 *
 *  Calculates the complementary error function of x.
 */

static VALUE
math_erfc(VALUE obj, VALUE x)
{
    Need_Float(x);
    return rb_float_new(erfc(RFLOAT(x)->value));
}

/*
 *  The <code>Math</code> module contains module functions for basic
 *  trigonometric and transcendental functions. See class
 *  <code>Float</code> for a list of constants that
 *  define Ruby's floating point accuracy.
 */

void
Init_Math(void)
{
    rb_mMath = rb_define_module("Math");

#ifdef M_PI
    rb_define_const(rb_mMath, "PI", rb_float_new(M_PI));
#else
    rb_define_const(rb_mMath, "PI", rb_float_new(atan(1.0)*4.0));
#endif

#ifdef M_E
    rb_define_const(rb_mMath, "E", rb_float_new(M_E));
#else
    rb_define_const(rb_mMath, "E", rb_float_new(exp(1.0)));
#endif

    rb_define_module_function(rb_mMath, "atan2", math_atan2, 2);
    rb_define_module_function(rb_mMath, "cos", math_cos, 1);
    rb_define_module_function(rb_mMath, "sin", math_sin, 1);
    rb_define_module_function(rb_mMath, "tan", math_tan, 1);

    rb_define_module_function(rb_mMath, "acos", math_acos, 1);
    rb_define_module_function(rb_mMath, "asin", math_asin, 1);
    rb_define_module_function(rb_mMath, "atan", math_atan, 1);

    rb_define_module_function(rb_mMath, "cosh", math_cosh, 1);
    rb_define_module_function(rb_mMath, "sinh", math_sinh, 1);
    rb_define_module_function(rb_mMath, "tanh", math_tanh, 1);

    rb_define_module_function(rb_mMath, "acosh", math_acosh, 1);
    rb_define_module_function(rb_mMath, "asinh", math_asinh, 1);
    rb_define_module_function(rb_mMath, "atanh", math_atanh, 1);

    rb_define_module_function(rb_mMath, "exp", math_exp, 1);
    rb_define_module_function(rb_mMath, "log", math_log, 1);
    rb_define_module_function(rb_mMath, "log10", math_log10, 1);
    rb_define_module_function(rb_mMath, "sqrt", math_sqrt, 1);

    rb_define_module_function(rb_mMath, "frexp", math_frexp, 1);
    rb_define_module_function(rb_mMath, "ldexp", math_ldexp, 2);

    rb_define_module_function(rb_mMath, "hypot", math_hypot, 2);

    rb_define_module_function(rb_mMath, "erf",  math_erf,  1);
    rb_define_module_function(rb_mMath, "erfc", math_erfc, 1);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


missing.h

root/missing.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/************************************************

  missing.h - prototype for *.c in ./missing, and
              for missing timeval struct

  $Author: akr $
  $Date: 2006/01/01 06:34:48 $
  created at: Sat May 11 23:46:03 JST 2002

************************************************/

#ifndef MISSING_H
#define MISSING_H

#if defined(HAVE_SYS_TIME_H)
#  include <sys/time.h>
#elif !defined(_WIN32)
#  define time_t long
struct timeval {
    time_t tv_sec;      /* seconds */
    time_t tv_usec;     /* microseconds */
};
#endif
#if defined(HAVE_SYS_TYPES_H)
#  include <sys/types.h>
#endif

#ifndef HAVE_ACOSH
extern double acosh(double);
extern double asinh(double);
extern double atanh(double);
#endif

#ifndef HAVE_CRYPT
extern char *crypt(const char *, const char *);
#endif

#ifndef HAVE_DUP2
extern int dup2(int, int);
#endif

#ifndef HAVE_FINITE
extern int finite(double);
#endif

#ifndef HAVE_FLOCK
extern int flock(int, int);
#endif

/*
#ifndef HAVE_FREXP
extern double frexp(double, int *);
#endif
*/

#ifndef HAVE_HYPOT
extern double hypot(double, double);
#endif

#ifndef HAVE_ERF
extern double erf(double);
extern double erfc(double);
#endif

#ifndef isinf
# ifndef HAVE_ISINF
#  if defined(HAVE_FINITE) && defined(HAVE_ISNAN)
#  define isinf(x) (!finite(x) && !isnan(x))
#  else
extern int isinf(double);
#  endif
# endif
#endif

#ifndef HAVE_ISNAN
extern int isnan(double);
#endif

/*
#ifndef HAVE_MEMCMP
extern int memcmp(const void *, const void *, size_t);
#endif
*/

#ifndef HAVE_MEMMOVE
extern void *memmove(void *, const void *, size_t);
#endif

/*
#ifndef HAVE_MODF
extern double modf(double, double *);
#endif
*/

#ifndef HAVE_STRCASECMP
extern int strcasecmp(const char *, const char *);
#endif

#ifndef HAVE_STRNCASECMP
extern int strncasecmp(const char *, const char *, size_t);
#endif

#ifndef HAVE_STRCHR
extern char *strchr(const char *, int);
extern char *strrchr(const char *, int);
#endif

#ifndef HAVE_STRERROR
extern char *strerror(int);
#endif

#ifndef HAVE_STRFTIME
extern size_t strftime(char *, size_t, const char *, const struct tm *);
#endif

#ifndef HAVE_STRSTR
extern char *strstr(const char *, const char *);
#endif

/*
#ifndef HAVE_STRTOL
extern long strtol(const char *, char **, int);
#endif
*/

#ifndef HAVE_STRTOUL
extern unsigned long strtoul(const char *, char **, int);
#endif

#ifndef HAVE_VSNPRINTF
# include <stdarg.h>
extern int snprintf(char *, size_t n, char const *, ...);
extern int vsnprintf(char *, size_t n, char const *, va_list);
#endif

#endif /* MISSING_H */
/* [<][>][^][v][top][bottom][index] [help] */


node.h

root/node.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

DEFINITIONS

This source file includes following definitions.
  1. NODE
/**********************************************************************

  node.h -

  $Author: nobu $
  $Date: 2005/11/29 14:57:18 $
  created at: Fri May 28 15:14:02 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#ifndef NODE_H
#define NODE_H

#if defined(__cplusplus)
extern "C" {
#endif

enum node_type {
    NODE_METHOD,
    NODE_FBODY,
    NODE_CFUNC,
    NODE_SCOPE,
    NODE_BLOCK,
    NODE_IF,
    NODE_CASE,
    NODE_WHEN,
    NODE_OPT_N,
    NODE_WHILE,
    NODE_UNTIL,
    NODE_ITER,
    NODE_FOR,
    NODE_BREAK,
    NODE_NEXT,
    NODE_REDO,
    NODE_RETRY,
    NODE_BEGIN,
    NODE_RESCUE,
    NODE_RESBODY,
    NODE_ENSURE,
    NODE_AND,
    NODE_OR,
    NODE_NOT,
    NODE_MASGN,
    NODE_LASGN,
    NODE_DASGN,
    NODE_DASGN_CURR,
    NODE_GASGN,
    NODE_IASGN,
    NODE_CDECL,
    NODE_CVASGN,
    NODE_CVDECL,
    NODE_OP_ASGN1,
    NODE_OP_ASGN2,
    NODE_OP_ASGN_AND,
    NODE_OP_ASGN_OR,
    NODE_CALL,
    NODE_FCALL,
    NODE_VCALL,
    NODE_SUPER,
    NODE_ZSUPER,
    NODE_ARRAY,
    NODE_ZARRAY,
    NODE_VALUES,
    NODE_HASH,
    NODE_RETURN,
    NODE_YIELD,
    NODE_LVAR,
    NODE_DVAR,
    NODE_GVAR,
    NODE_IVAR,
    NODE_CONST,
    NODE_CVAR,
    NODE_NTH_REF,
    NODE_BACK_REF,
    NODE_MATCH,
    NODE_MATCH2,
    NODE_MATCH3,
    NODE_LIT,
    NODE_STR,
    NODE_DSTR,
    NODE_XSTR,
    NODE_DXSTR,
    NODE_EVSTR,
    NODE_DREGX,
    NODE_DREGX_ONCE,
    NODE_ARGS,
    NODE_ARGSCAT,
    NODE_ARGSPUSH,
    NODE_SPLAT,
    NODE_TO_ARY,
    NODE_SVALUE,
    NODE_BLOCK_ARG,
    NODE_BLOCK_PASS,
    NODE_DEFN,
    NODE_DEFS,
    NODE_ALIAS,
    NODE_VALIAS,
    NODE_UNDEF,
    NODE_CLASS,
    NODE_MODULE,
    NODE_SCLASS,
    NODE_COLON2,
    NODE_COLON3,
    NODE_CREF,
    NODE_DOT2,
    NODE_DOT3,
    NODE_FLIP2,
    NODE_FLIP3,
    NODE_ATTRSET,
    NODE_SELF,
    NODE_NIL,
    NODE_TRUE,
    NODE_FALSE,
    NODE_ERRINFO,
    NODE_DEFINED,
    NODE_POSTEXE,
    NODE_ALLOCA,
    NODE_BMETHOD,
    NODE_MEMO,
    NODE_IFUNC,
    NODE_DSYM,
    NODE_ATTRASGN,
    NODE_PRELUDE,
    NODE_LAMBDA,
    NODE_LAST
};

typedef struct RNode {
    unsigned long flags;
    char *nd_file;
    union {
        struct RNode *node;
        ID id;
        VALUE value;
        VALUE (*cfunc)(ANYARGS);
        ID *tbl;
    } u1;
    union {
        struct RNode *node;
        ID id;
        long argc;
        VALUE value;
    } u2;
    union {
        struct RNode *node;
        ID id;
        long state;
        struct global_entry *entry;
        long cnt;
        VALUE value;
    } u3;
} NODE;

#define RNODE(obj)  (R_CAST(RNode)(obj))

/* 0..4:T_TYPES, 5:FL_MARK, 6:reserved, 7:NODE_NEWLINE */
#define NODE_NEWLINE (1<<7)

#define NODE_TYPESHIFT 8
#define NODE_TYPEMASK  (0x7f<<NODE_TYPESHIFT)

#define nd_type(n) ((int) (((RNODE(n))->flags & NODE_TYPEMASK)>>NODE_TYPESHIFT))
#define nd_set_type(n,t) \
    RNODE(n)->flags=((RNODE(n)->flags&~NODE_TYPEMASK)|(((t)<<NODE_TYPESHIFT)&NODE_TYPEMASK))

#define NODE_LSHIFT (NODE_TYPESHIFT+7)
#define NODE_LMASK  (((long)1<<(sizeof(NODE*)*CHAR_BIT-NODE_LSHIFT))-1)
#define nd_line(n) ((unsigned int)(((RNODE(n))->flags>>NODE_LSHIFT)&NODE_LMASK))
#define nd_set_line(n,l) \
    RNODE(n)->flags=((RNODE(n)->flags&~(-1<<NODE_LSHIFT))|(((l)&NODE_LMASK)<<NODE_LSHIFT))

#define nd_head  u1.node
#define nd_alen  u2.argc
#define nd_next  u3.node

#define nd_cond  u1.node
#define nd_body  u2.node
#define nd_else  u3.node

#define nd_orig  u3.value

#define nd_resq  u2.node
#define nd_ensr  u3.node

#define nd_1st   u1.node
#define nd_2nd   u2.node

#define nd_stts  u1.node

#define nd_entry u3.entry
#define nd_vid   u1.id
#define nd_cflag u2.id
#define nd_cval  u3.value

#define nd_cnt   u3.cnt
#define nd_tbl   u1.tbl

#define nd_var   u1.node
#define nd_ibdy  u2.node
#define nd_iter  u3.node

#define nd_value u2.node
#define nd_aid   u3.id

#define nd_lit   u1.value

#define nd_frml  u3.value
#define nd_rest  u2.node
#define nd_opt   u1.node

#define nd_recv  u1.node
#define nd_mid   u2.id
#define nd_args  u3.node

#define nd_noex  u1.id
#define nd_defn  u3.node

#define nd_cfnc  u1.cfunc
#define nd_argc  u2.argc

#define nd_cpath u1.node
#define nd_super u3.node

#define nd_modl  u1.id
#define nd_clss  u1.value

#define nd_beg   u1.node
#define nd_end   u2.node
#define nd_state u3.state
#define nd_rval  u2.value

#define nd_nth   u2.argc

#define nd_tag   u1.id
#define nd_tval  u2.value

#define NEW_NODE(t,a0,a1,a2) rb_node_newnode((t),(VALUE)(a0),(VALUE)(a1),(VALUE)(a2))

#define NEW_METHOD(n,x) NEW_NODE(NODE_METHOD,x,n,0)
#define NEW_FBODY(n,i,o) NEW_NODE(NODE_FBODY,n,i,o)
#define NEW_DEFN(i,a,d,p) NEW_NODE(NODE_DEFN,p,i,NEW_RFUNC(a,d))
#define NEW_DEFS(r,i,a,d) NEW_NODE(NODE_DEFS,r,i,NEW_RFUNC(a,d))
#define NEW_CFUNC(f,c) NEW_NODE(NODE_CFUNC,f,c,0)
#define NEW_IFUNC(f,c) NEW_NODE(NODE_IFUNC,f,c,0)
#define NEW_RFUNC(b1,b2) NEW_SCOPE(block_append(b1,b2))
#define NEW_SCOPE(b) NEW_NODE(NODE_SCOPE,local_tbl(),0,(b))
#define NEW_BLOCK(a) NEW_NODE(NODE_BLOCK,a,0,0)
#define NEW_IF(c,t,e) NEW_NODE(NODE_IF,c,t,e)
#define NEW_UNLESS(c,t,e) NEW_IF(c,e,t)
#define NEW_CASE(h,b) NEW_NODE(NODE_CASE,h,b,0)
#define NEW_WHEN(c,t,e) NEW_NODE(NODE_WHEN,c,t,e)
#define NEW_OPT_N(b) NEW_NODE(NODE_OPT_N,0,b,0)
#define NEW_WHILE(c,b,n) NEW_NODE(NODE_WHILE,c,b,n)
#define NEW_UNTIL(c,b,n) NEW_NODE(NODE_UNTIL,c,b,n)
#define NEW_FOR(v,i,b) NEW_NODE(NODE_FOR,v,b,i)
#define NEW_ITER(v,i,b) NEW_NODE(NODE_ITER,v,b,i)
#define NEW_LAMBDA(a,b) NEW_NODE(NODE_LAMBDA,a,b,0)
#define NEW_BREAK(s) NEW_NODE(NODE_BREAK,s,0,0)
#define NEW_NEXT(s) NEW_NODE(NODE_NEXT,s,0,0)
#define NEW_REDO() NEW_NODE(NODE_REDO,0,0,0)
#define NEW_RETRY() NEW_NODE(NODE_RETRY,0,0,0)
#define NEW_BEGIN(b) NEW_NODE(NODE_BEGIN,0,b,0)
#define NEW_RESCUE(b,res,e) NEW_NODE(NODE_RESCUE,b,res,e)
#define NEW_RESBODY(a,ex,n) NEW_NODE(NODE_RESBODY,n,ex,a)
#define NEW_ENSURE(b,en) NEW_NODE(NODE_ENSURE,b,0,en)
#define NEW_RETURN(s) NEW_NODE(NODE_RETURN,s,0,0)
#define NEW_YIELD(a,s) NEW_NODE(NODE_YIELD,a,0,s)
#define NEW_LIST(a)  NEW_ARRAY(a)
#define NEW_ARRAY(a) NEW_NODE(NODE_ARRAY,a,1,0)
#define NEW_ZARRAY() NEW_NODE(NODE_ZARRAY,0,0,0)
#define NEW_HASH(a)  NEW_NODE(NODE_HASH,a,0,0)
#define NEW_NOT(a)   NEW_NODE(NODE_NOT,0,a,0)
#define NEW_MASGN(l,r)   NEW_NODE(NODE_MASGN,l,0,r)
#define NEW_GASGN(v,val) NEW_NODE(NODE_GASGN,v,val,rb_global_entry(v))
#define NEW_LASGN(v,val) NEW_NODE(NODE_LASGN,v,val,local_cnt(v))
#define NEW_DASGN(v,val) NEW_NODE(NODE_DASGN,v,val,0)
#define NEW_DASGN_CURR(v,val) NEW_NODE(NODE_DASGN_CURR,v,val,0)
#define NEW_IASGN(v,val) NEW_NODE(NODE_IASGN,v,val,0)
#define NEW_CDECL(v,val,path) NEW_NODE(NODE_CDECL,v,val,path)
#define NEW_CVASGN(v,val) NEW_NODE(NODE_CVASGN,v,val,0)
#define NEW_CVDECL(v,val) NEW_NODE(NODE_CVDECL,v,val,0)
#define NEW_OP_ASGN1(p,id,a) NEW_NODE(NODE_OP_ASGN1,p,id,a)
#define NEW_OP_ASGN2(r,i,o,val) NEW_NODE(NODE_OP_ASGN2,r,val,NEW_OP_ASGN22(i,o))
#define NEW_OP_ASGN22(i,o) NEW_NODE(NODE_OP_ASGN2,i,o,rb_id_attrset(i))
#define NEW_OP_ASGN_OR(i,val) NEW_NODE(NODE_OP_ASGN_OR,i,val,0)
#define NEW_OP_ASGN_AND(i,val) NEW_NODE(NODE_OP_ASGN_AND,i,val,0)
#define NEW_GVAR(v) NEW_NODE(NODE_GVAR,v,0,rb_global_entry(v))
#define NEW_LVAR(v) NEW_NODE(NODE_LVAR,v,0,local_cnt(v))
#define NEW_DVAR(v) NEW_NODE(NODE_DVAR,v,0,0)
#define NEW_IVAR(v) NEW_NODE(NODE_IVAR,v,0,0)
#define NEW_CONST(v) NEW_NODE(NODE_CONST,v,0,0)
#define NEW_CVAR(v) NEW_NODE(NODE_CVAR,v,0,0)
#define NEW_NTH_REF(n)  NEW_NODE(NODE_NTH_REF,0,n,local_cnt('~'))
#define NEW_BACK_REF(n) NEW_NODE(NODE_BACK_REF,0,n,local_cnt('~'))
#define NEW_MATCH(c) NEW_NODE(NODE_MATCH,c,0,0)
#define NEW_MATCH2(n1,n2) NEW_NODE(NODE_MATCH2,n1,n2,0)
#define NEW_MATCH3(r,n2) NEW_NODE(NODE_MATCH3,r,n2,0)
#define NEW_LIT(l) NEW_NODE(NODE_LIT,l,0,0)
#define NEW_STR(s) NEW_NODE(NODE_STR,s,0,0)
#define NEW_DSTR(s) NEW_NODE(NODE_DSTR,s,1,0)
#define NEW_XSTR(s) NEW_NODE(NODE_XSTR,s,0,0)
#define NEW_DXSTR(s) NEW_NODE(NODE_DXSTR,s,0,0)
#define NEW_DSYM(s) NEW_NODE(NODE_DSYM,s,0,0)
#define NEW_EVSTR(n) NEW_NODE(NODE_EVSTR,0,(n),0)
#define NEW_CALL(r,m,a) NEW_NODE(NODE_CALL,r,m,a)
#define NEW_FCALL(m,a) NEW_NODE(NODE_FCALL,0,m,a)
#define NEW_VCALL(m) NEW_NODE(NODE_VCALL,0,m,0)
#define NEW_SUPER(a) NEW_NODE(NODE_SUPER,0,0,a)
#define NEW_ZSUPER() NEW_NODE(NODE_ZSUPER,0,0,0)
#define NEW_ARGS(f,o,r) NEW_NODE(NODE_ARGS,o,r,f)
#define NEW_ARGSCAT(a,b) NEW_NODE(NODE_ARGSCAT,a,b,0)
#define NEW_ARGSPUSH(a,b) NEW_NODE(NODE_ARGSPUSH,a,b,0)
#define NEW_SPLAT(a) NEW_NODE(NODE_SPLAT,a,0,0)
#define NEW_TO_ARY(a) NEW_NODE(NODE_TO_ARY,a,0,0)
#define NEW_SVALUE(a) NEW_NODE(NODE_SVALUE,a,0,0)
#define NEW_BLOCK_ARG(v) NEW_NODE(NODE_BLOCK_ARG,v,0,local_cnt(v))
#define NEW_BLOCK_PASS(b) NEW_NODE(NODE_BLOCK_PASS,0,b,0)
#define NEW_ALIAS(n,o) NEW_NODE(NODE_ALIAS,n,o,0)
#define NEW_VALIAS(n,o) NEW_NODE(NODE_VALIAS,n,o,0)
#define NEW_UNDEF(i) NEW_NODE(NODE_UNDEF,0,i,0)
#define NEW_CLASS(n,b,s) NEW_NODE(NODE_CLASS,n,NEW_SCOPE(b),(s))
#define NEW_SCLASS(r,b) NEW_NODE(NODE_SCLASS,r,NEW_SCOPE(b),0)
#define NEW_MODULE(n,b) NEW_NODE(NODE_MODULE,n,NEW_SCOPE(b),0)
#define NEW_COLON2(c,i) NEW_NODE(NODE_COLON2,c,i,0)
#define NEW_COLON3(i) NEW_NODE(NODE_COLON3,0,i,0)
#define NEW_CREF(c) (NEW_NODE(NODE_CREF,0,0,c))
#define NEW_DOT2(b,e) NEW_NODE(NODE_DOT2,b,e,0)
#define NEW_DOT3(b,e) NEW_NODE(NODE_DOT3,b,e,0)
#define NEW_ATTRSET(a) NEW_NODE(NODE_ATTRSET,a,0,0)
#define NEW_SELF() NEW_NODE(NODE_SELF,0,0,0)
#define NEW_NIL() NEW_NODE(NODE_NIL,0,0,0)
#define NEW_TRUE() NEW_NODE(NODE_TRUE,0,0,0)
#define NEW_FALSE() NEW_NODE(NODE_FALSE,0,0,0)
#define NEW_ERRINFO() NEW_NODE(NODE_ERRINFO,0,0,0)
#define NEW_DEFINED(e) NEW_NODE(NODE_DEFINED,e,0,0)
#define NEW_PREEXE(b) NEW_SCOPE(b)
#define NEW_POSTEXE() NEW_NODE(NODE_POSTEXE,0,0,0)
#define NEW_BMETHOD(b) NEW_NODE(NODE_BMETHOD,0,0,b)
#define NEW_ATTRASGN(r,m,a) NEW_NODE(NODE_ATTRASGN,r,m,a)
#define NEW_PRELUDE(p,b) NEW_NODE(NODE_PRELUDE,p,b,0)

#define NOEX_PUBLIC    0
#define NOEX_NOSUPER   1
#define NOEX_PRIVATE   2
#define NOEX_PROTECTED 4
#define NOEX_MASK      6

#define NOEX_UNDEF     NOEX_NOSUPER
#define NOEX_RECV      8

VALUE rb_parser_new(void);
VALUE rb_parser_end_seen_p(VALUE);

NODE *rb_parser_compile_cstr(VALUE, const char*, const char*, int, int);
NODE *rb_parser_compile_string(VALUE, const char*, VALUE, int);
NODE *rb_parser_compile_file(VALUE, const char*, VALUE, int);

NODE *rb_compile_cstr(const char*, const char*, int, int);
NODE *rb_compile_string(const char*, VALUE, int);
NODE *rb_compile_file(const char*, VALUE, int);

void rb_add_method(VALUE, ID, NODE *, int);
NODE *rb_node_newnode(enum node_type,VALUE,VALUE,VALUE);

NODE* rb_method_node(VALUE klass, ID id);
int rb_node_arity(NODE* node);

struct global_entry *rb_global_entry(ID);
VALUE rb_gvar_get(struct global_entry *);
VALUE rb_gvar_set(struct global_entry *, VALUE);
VALUE rb_gvar_defined(struct global_entry *);

typedef unsigned int rb_event_t;

#define RUBY_EVENT_NONE     0x00
#define RUBY_EVENT_LINE     0x01
#define RUBY_EVENT_CLASS    0x02
#define RUBY_EVENT_END      0x04
#define RUBY_EVENT_CALL     0x08
#define RUBY_EVENT_RETURN   0x10
#define RUBY_EVENT_C_CALL   0x20
#define RUBY_EVENT_C_RETURN 0x40
#define RUBY_EVENT_RAISE    0x80
#define RUBY_EVENT_ALL      0xff

typedef void (*rb_event_hook_func_t)(rb_event_t,NODE*,VALUE,ID,VALUE);
void rb_add_event_hook(rb_event_hook_func_t,rb_event_t);
int rb_remove_event_hook(rb_event_hook_func_t);

#if defined(__cplusplus)
}  /* extern "C" { */
#endif

#endif
/* [<][>][^][v] [top][bottom][index] [help] */


numeric.c

root/numeric.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. rb_num_zerodiv
  2. num_coerce
  3. coerce_body
  4. coerce_rescue
  5. do_coerce
  6. rb_num_coerce_bin
  7. rb_num_coerce_cmp
  8. rb_num_coerce_relop
  9. num_sadded
  10. num_init_copy
  11. num_uplus
  12. num_uminus
  13. num_quo
  14. num_div
  15. num_divmod
  16. num_modulo
  17. num_remainder
  18. num_scalar_p
  19. num_int_p
  20. num_abs
  21. num_zero_p
  22. num_nonzero_p
  23. num_to_int
  24. rb_float_new
  25. flo_to_s
  26. flo_coerce
  27. flo_uminus
  28. flo_plus
  29. flo_minus
  30. flo_mul
  31. flo_div
  32. flodivmod
  33. flo_mod
  34. flo_divmod
  35. flo_pow
  36. num_eql
  37. num_cmp
  38. num_equal
  39. flo_eq
  40. flo_hash
  41. rb_dbl_cmp
  42. flo_cmp
  43. flo_gt
  44. flo_ge
  45. flo_lt
  46. flo_le
  47. flo_eql
  48. flo_to_f
  49. flo_abs
  50. flo_zero_p
  51. flo_is_nan_p
  52. flo_is_infinite_p
  53. flo_is_finite_p
  54. flo_floor
  55. flo_ceil
  56. flo_round
  57. flo_truncate
  58. num_floor
  59. num_ceil
  60. num_round
  61. num_truncate
  62. num_step
  63. rb_num2long
  64. rb_num2ulong
  65. check_int
  66. check_uint
  67. rb_num2int
  68. rb_fix2int
  69. rb_num2uint
  70. rb_fix2uint
  71. rb_num2int
  72. rb_fix2int
  73. rb_num2fix
  74. rb_num2ll
  75. rb_num2ull
  76. int_to_i
  77. int_int_p
  78. int_succ
  79. int_chr
  80. rb_fix_induced_from
  81. rb_int_induced_from
  82. rb_flo_induced_from
  83. fix_uminus
  84. rb_fix2str
  85. fix_to_s
  86. fix_plus
  87. fix_minus
  88. fix_mul
  89. fixdivmod
  90. fix_quo
  91. fix_divide
  92. fix_div
  93. fix_idiv
  94. fix_mod
  95. fix_divmod
  96. fix_pow
  97. fix_equal
  98. fix_cmp
  99. fix_gt
  100. fix_ge
  101. fix_lt
  102. fix_le
  103. fix_rev
  104. fix_and
  105. fix_or
  106. fix_xor
  107. fix_lshift
  108. fix_rshift
  109. fix_aref
  110. fix_to_f
  111. fix_abs
  112. fix_id2name
  113. fix_to_sym
  114. fix_size
  115. int_upto
  116. int_downto
  117. int_dotimes
  118. fix_zero_p
  119. Init_Numeric
/**********************************************************************

  numeric.c -

  $Author: akr $
  $Date: 2005/12/27 05:40:04 $
  created at: Fri Aug 13 18:33:09 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#include "ruby.h"
#include "env.h"
#include <ctype.h>
#include <math.h>
#include <stdio.h>

#if defined(__FreeBSD__) && __FreeBSD__ < 4
#include <floatingpoint.h>
#endif

#ifdef HAVE_FLOAT_H
#include <float.h>
#endif

#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif

/* use IEEE 64bit values if not defined */
#ifndef FLT_RADIX
#define FLT_RADIX 2
#endif
#ifndef FLT_ROUNDS
#define FLT_ROUNDS 1
#endif
#ifndef DBL_MIN
#define DBL_MIN 2.2250738585072014e-308
#endif
#ifndef DBL_MAX
#define DBL_MAX 1.7976931348623157e+308
#endif
#ifndef DBL_MIN_EXP
#define DBL_MIN_EXP (-1021)
#endif
#ifndef DBL_MAX_EXP
#define DBL_MAX_EXP 1024
#endif
#ifndef DBL_MIN_10_EXP
#define DBL_MIN_10_EXP (-307)
#endif
#ifndef DBL_MAX_10_EXP
#define DBL_MAX_10_EXP 308
#endif
#ifndef DBL_DIG
#define DBL_DIG 15
#endif
#ifndef DBL_MANT_DIG
#define DBL_MANT_DIG 53
#endif
#ifndef DBL_EPSILON
#define DBL_EPSILON 2.2204460492503131e-16
#endif

static ID id_coerce, id_to_i, id_eq;

VALUE rb_cNumeric;
VALUE rb_cFloat;
VALUE rb_cInteger;
VALUE rb_cFixnum;

VALUE rb_eZeroDivError;
VALUE rb_eFloatDomainError;

void
rb_num_zerodiv(void)
{
    rb_raise(rb_eZeroDivError, "divided by 0");
}

/*
 *  call-seq:
 *     num.coerce(numeric)   => array
 *
 *  If <i>aNumeric</i> is the same type as <i>num</i>, returns an array
 *  containing <i>aNumeric</i> and <i>num</i>. Otherwise, returns an
 *  array with both <i>aNumeric</i> and <i>num</i> represented as
 *  <code>Float</code> objects. This coercion mechanism is used by
 *  Ruby to handle mixed-type numeric operations: it is intended to
 *  find a compatible common type between the two operands of the operator.
 *
 *     1.coerce(2.5)   #=> [2.5, 1.0]
 *     1.2.coerce(3)   #=> [3.0, 1.2]
 *     1.coerce(2)     #=> [2, 1]
 */

static VALUE
num_coerce(VALUE x, VALUE y)
{
    if (CLASS_OF(x) == CLASS_OF(y))
        return rb_assoc_new(y, x);
    return rb_assoc_new(rb_Float(y), rb_Float(x));
}

static VALUE
coerce_body(VALUE *x)
{
    return rb_funcall(x[1], id_coerce, 1, x[0]);
}

static VALUE
coerce_rescue(VALUE *x)
{
    volatile VALUE v = rb_inspect(x[1]);

    rb_raise(rb_eTypeError, "%s can't be coerced into %s",
             rb_special_const_p(x[1])?
             RSTRING(v)->ptr:
             rb_obj_classname(x[1]),
             rb_obj_classname(x[0]));
    return Qnil;                /* dummy */
}

static int
do_coerce(VALUE *x, VALUE *y, int err)
{
    VALUE ary;
    VALUE a[2];

    a[0] = *x; a[1] = *y;

    ary = rb_rescue(coerce_body, (VALUE)a, err?coerce_rescue:0, (VALUE)a);
    if (TYPE(ary) != T_ARRAY || RARRAY(ary)->len != 2) {
        if (err) {
            rb_raise(rb_eTypeError, "coerce must return [x, y]");
        }
        return Qfalse;
    }

    *x = RARRAY(ary)->ptr[0];
    *y = RARRAY(ary)->ptr[1];
    return Qtrue;
}

VALUE
rb_num_coerce_bin(VALUE x, VALUE y)
{
    do_coerce(&x, &y, Qtrue);
    return rb_funcall(x, rb_frame_this_func(), 1, y);
}

VALUE
rb_num_coerce_cmp(VALUE x, VALUE y)
{
    if (do_coerce(&x, &y, Qfalse))
        return rb_funcall(x, rb_frame_this_func(), 1, y);
    return Qnil;
}

VALUE
rb_num_coerce_relop(VALUE x, VALUE y)
{
    VALUE c, x0 = x, y0 = y;

    if (!do_coerce(&x, &y, Qfalse) ||
        NIL_P(c = rb_funcall(x, rb_frame_this_func(), 1, y))) {
        rb_cmperr(x0, y0);
        return Qnil;            /* not reached */
    }
    return c;
}

/*
 * Trap attempts to add methods to <code>Numeric</code> objects. Always
 * raises a <code>TypeError</code>
 */

static VALUE
num_sadded(VALUE x, VALUE name)
{
    ruby_frame = ruby_frame->prev; /* pop frame for "singleton_method_added" */
    /* Numerics should be values; singleton_methods should not be added to them */
    rb_raise(rb_eTypeError,
             "can't define singleton method \"%s\" for %s",
             rb_id2name(rb_to_id(name)),
             rb_obj_classname(x));
    return Qnil;                /* not reached */
}

/* :nodoc: */
static VALUE
num_init_copy(VALUE x, VALUE y)
{
    /* Numerics are immutable values, which should not be copied */
    rb_raise(rb_eTypeError, "can't copy %s", rb_obj_classname(x));
    return Qnil;                /* not reached */
}

/*
 *  call-seq:
 *     +num    => num
 *
 *  Unary Plus---Returns the receiver's value.
 */

static VALUE
num_uplus(VALUE num)
{
    return num;
}

/*
 *  call-seq:
 *     -num    => numeric
 *
 *  Unary Minus---Returns the receiver's value, negated.
 */

static VALUE
num_uminus(VALUE num)
{
    VALUE zero;

    zero = INT2FIX(0);
    do_coerce(&zero, &num, Qtrue);

    return rb_funcall(zero, '-', 1, num);
}

/*
 *  call-seq:
 *     num.quo(numeric)    =>   result
 *
 *  Equivalent to <code>Numeric#/</code>, but overridden in subclasses.
 */

static VALUE
num_quo(VALUE x, VALUE y)
{
    return rb_funcall(x, '/', 1, y);
}

static VALUE num_floor(VALUE num);

/*
 *  call-seq:
 *     num.div(numeric)    => integer
 *
 *  Uses <code>/</code> to perform division, then converts the result to
 *  an integer. <code>Numeric</code> does not define the <code>/</code>
 *  operator; this is left to subclasses.
 */

static VALUE
num_div(VALUE x, VALUE y)
{
    return num_floor(rb_funcall(x, '/', 1, y));
}

/*
 *  call-seq:
 *     num.divmod( aNumeric ) -> anArray
 *
 *  Returns an array containing the quotient and modulus obtained by
 *  dividing <i>num</i> by <i>aNumeric</i>. If <code>q, r =
 *  x.divmod(y)</code>, then
 *
 *      q = floor(float(x)/float(y))
 *      x = q*y + r
 *
 *  The quotient is rounded toward -infinity, as shown in the following table:
 *
 *     a    |  b  |  a.divmod(b)  |   a/b   | a.modulo(b) | a.remainder(b)
 *    ------+-----+---------------+---------+-------------+---------------
 *     13   |  4  |   3,    1     |   3     |    1        |     1
 *    ------+-----+---------------+---------+-------------+---------------
 *     13   | -4  |  -4,   -3     |  -3     |   -3        |     1
 *    ------+-----+---------------+---------+-------------+---------------
 *    -13   |  4  |  -4,    3     |  -4     |    3        |    -1
 *    ------+-----+---------------+---------+-------------+---------------
 *    -13   | -4  |   3,   -1     |   3     |   -1        |    -1
 *    ------+-----+---------------+---------+-------------+---------------
 *     11.5 |  4  |   2.0,  3.5   |   2.875 |    3.5      |     3.5
 *    ------+-----+---------------+---------+-------------+---------------
 *     11.5 | -4  |  -3.0, -0.5   |  -2.875 |   -0.5      |     3.5
 *    ------+-----+---------------+---------+-------------+---------------
 *    -11.5 |  4  |  -3.0   0.5   |  -2.875 |    0.5      |    -3.5
 *    ------+-----+---------------+---------+-------------+---------------
 *    -11.5 | -4  |   2.0  -3.5   |   2.875 |   -3.5      |    -3.5
 *
 *
 *  Examples
 *     11.divmod(3)         #=> [3, 2]
 *     11.divmod(-3)        #=> [-4, -1]
 *     11.divmod(3.5)       #=> [3.0, 0.5]
 *     (-11).divmod(3.5)    #=> [-4.0, 3.0]
 *     (11.5).divmod(3.5)   #=> [3.0, 1.0]
 */

static VALUE
num_divmod(VALUE x, VALUE y)
{
    return rb_assoc_new(num_div(x, y), rb_funcall(x, '%', 1, y));
}

/*
 *  call-seq:
 *     num.modulo(numeric)    => result
 *
 *  Equivalent to
 *  <i>num</i>.<code>divmod(</code><i>aNumeric</i><code>)[1]</code>.
 */

static VALUE
num_modulo(VALUE x, VALUE y)
{
    return rb_funcall(x, '%', 1, y);
}

/*
 *  call-seq:
 *     num.remainder(numeric)    => result
 *
 *  If <i>num</i> and <i>numeric</i> have different signs, returns
 *  <em>mod</em>-<i>numeric</i>; otherwise, returns <em>mod</em>. In
 *  both cases <em>mod</em> is the value
 *  <i>num</i>.<code>modulo(</code><i>numeric</i><code>)</code>. The
 *  differences between <code>remainder</code> and modulo
 *  (<code>%</code>) are shown in the table under <code>Numeric#divmod</code>.
 */

static VALUE
num_remainder(VALUE x, VALUE y)
{
    VALUE z = rb_funcall(x, '%', 1, y);

    if ((!rb_equal(z, INT2FIX(0))) &&
        ((RTEST(rb_funcall(x, '<', 1, INT2FIX(0))) &&
          RTEST(rb_funcall(y, '>', 1, INT2FIX(0)))) ||
         (RTEST(rb_funcall(x, '>', 1, INT2FIX(0))) &&
          RTEST(rb_funcall(y, '<', 1, INT2FIX(0)))))) {
        return rb_funcall(z, '-', 1, y);
    }
    return z;
}

/*
 *  call-seq:
 *     num.scalar? -> true or false
 *
 *  Returns <code>true</code> if <i>num</i> is an <code>Scalar</code>
 *  (i.e. non <code>Complex</code>).
 */

static VALUE
num_scalar_p(VALUE num)
{
    return Qtrue;
}

/*
 *  call-seq:
 *     num.integer? -> true or false
 *
 *  Returns <code>true</code> if <i>num</i> is an <code>Integer</code>
 *  (including <code>Fixnum</code> and <code>Bignum</code>).
 */

static VALUE
num_int_p(VALUE num)
{
    return Qfalse;
}

/*
 *  call-seq:
 *     num.abs   => num or numeric
 *
 *  Returns the absolute value of <i>num</i>.
 *
 *     12.abs         #=> 12
 *     (-34.56).abs   #=> 34.56
 *     -34.56.abs     #=> 34.56
 */

static VALUE
num_abs(VALUE num)
{
    if (RTEST(rb_funcall(num, '<', 1, INT2FIX(0)))) {
        return rb_funcall(num, rb_intern("-@"), 0);
    }
    return num;
}

/*
 *  call-seq:
 *     num.zero?    => true or false
 *
 *  Returns <code>true</code> if <i>num</i> has a zero value.
 */

static VALUE
num_zero_p(VALUE num)
{
    if (rb_equal(num, INT2FIX(0))) {
        return Qtrue;
    }
    return Qfalse;
}

/*
 *  call-seq:
 *     num.nonzero?    => num or nil
 *
 *  Returns <i>num</i> if <i>num</i> is not zero, <code>nil</code>
 *  otherwise. This behavior is useful when chaining comparisons:
 *
 *     a = %w( z Bb bB bb BB a aA Aa AA A )
 *     b = a.sort {|a,b| (a.downcase <=> b.downcase).nonzero? || a <=> b }
 *     b   #=> ["A", "a", "AA", "Aa", "aA", "BB", "Bb", "bB", "bb", "z"]
 */

static VALUE
num_nonzero_p(VALUE num)
{
    if (RTEST(rb_funcall(num, rb_intern("zero?"), 0, 0))) {
        return Qnil;
    }
    return num;
}

/*
 *  call-seq:
 *     num.to_int    => integer
 *
 *  Invokes the child class's <code>to_i</code> method to convert
 *  <i>num</i> to an integer.
 */

static VALUE
num_to_int(VALUE num)
{
    return rb_funcall(num, id_to_i, 0, 0);
}

/********************************************************************
 *
 * Document-class: Float
 *
 *  <code>Float</code> objects represent real numbers using the native
 *  architecture's double-precision floating point representation.
 */

VALUE
rb_float_new(double d)
{
    NEWOBJ(flt, struct RFloat);
    OBJSETUP(flt, rb_cFloat, T_FLOAT);

    flt->value = d;
    return (VALUE)flt;
}

/*
 *  call-seq:
 *     flt.to_s    => string
 *
 *  Returns a string containing a representation of self. As well as a
 *  fixed or exponential form of the number, the call may return
 *  ``<code>NaN</code>'', ``<code>Infinity</code>'', and
 *  ``<code>-Infinity</code>''.
 */

static VALUE
flo_to_s(VALUE flt)
{
    char buf[32];
    double value = RFLOAT(flt)->value;
    char *p, *e;

    if (isinf(value))
        return rb_str_new2(value < 0 ? "-Infinity" : "Infinity");
    else if(isnan(value))
        return rb_str_new2("NaN");

    sprintf(buf, "%#.15g", value); /* ensure to print decimal point */
    if (!(e = strchr(buf, 'e'))) {
        e = buf + strlen(buf);
    }
    if (!ISDIGIT(e[-1])) { /* reformat if ended with decimal point (ex 111111111111111.) */
        sprintf(buf, "%#.14e", value);
        if (!(e = strchr(buf, 'e'))) {
            e = buf + strlen(buf);
        }
    }
    p = e;
    while (p[-1]=='0' && ISDIGIT(p[-2]))
        p--;
    memmove(p, e, strlen(e)+1);
    return rb_str_new2(buf);
}

/*
 * MISSING: documentation
 */

static VALUE
flo_coerce(VALUE x, VALUE y)
{
    return rb_assoc_new(rb_Float(y), x);
}

/*
 * call-seq:
 *    -float   => float
 *
 * Returns float, negated.
 */

static VALUE
flo_uminus(VALUE flt)
{
    return rb_float_new(-RFLOAT(flt)->value);
}

/*
 * call-seq:
 *   float + other   => float
 *
 * Returns a new float which is the sum of <code>float</code>
 * and <code>other</code>.
 */

static VALUE
flo_plus(VALUE x, VALUE y)
{
    switch (TYPE(y)) {
      case T_FIXNUM:
        return rb_float_new(RFLOAT(x)->value + (double)FIX2LONG(y));
      case T_BIGNUM:
        return rb_float_new(RFLOAT(x)->value + rb_big2dbl(y));
      case T_FLOAT:
        return rb_float_new(RFLOAT(x)->value + RFLOAT(y)->value);
      default:
        return rb_num_coerce_bin(x, y);
    }
}

/*
 * call-seq:
 *   float + other   => float
 *
 * Returns a new float which is the difference of <code>float</code>
 * and <code>other</code>.
 */

static VALUE
flo_minus(VALUE x, VALUE y)
{
    switch (TYPE(y)) {
      case T_FIXNUM:
        return rb_float_new(RFLOAT(x)->value - (double)FIX2LONG(y));
      case T_BIGNUM:
        return rb_float_new(RFLOAT(x)->value - rb_big2dbl(y));
      case T_FLOAT:
        return rb_float_new(RFLOAT(x)->value - RFLOAT(y)->value);
      default:
        return rb_num_coerce_bin(x, y);
    }
}

/*
 * call-seq:
 *   float * other   => float
 *
 * Returns a new float which is the product of <code>float</code>
 * and <code>other</code>.
 */

static VALUE
flo_mul(VALUE x, VALUE y)
{
    switch (TYPE(y)) {
      case T_FIXNUM:
        return rb_float_new(RFLOAT(x)->value * (double)FIX2LONG(y));
      case T_BIGNUM:
        return rb_float_new(RFLOAT(x)->value * rb_big2dbl(y));
      case T_FLOAT:
        return rb_float_new(RFLOAT(x)->value * RFLOAT(y)->value);
      default:
        return rb_num_coerce_bin(x, y);
    }
}

/*
 * call-seq:
 *   float / other   => float
 *
 * Returns a new float which is the result of dividing
 * <code>float</code> by <code>other</code>.
 */

static VALUE
flo_div(VALUE x, VALUE y)
{
    long f_y;
    double d;

    switch (TYPE(y)) {
      case T_FIXNUM:
        f_y = FIX2LONG(y);
        return rb_float_new(RFLOAT(x)->value / (double)f_y);
      case T_BIGNUM:
        d = rb_big2dbl(y);
        return rb_float_new(RFLOAT(x)->value / d);
      case T_FLOAT:
        return rb_float_new(RFLOAT(x)->value / RFLOAT(y)->value);
      default:
        return rb_num_coerce_bin(x, y);
    }
}

static void
flodivmod(double x, double y, double *divp, double *modp)
{
    double div, mod;

#ifdef HAVE_FMOD
    mod = fmod(x, y);
#else
    {
        double z;

        modf(x/y, &z);
        mod = x - z * y;
    }
#endif
    div = (x - mod) / y;
    if (y*mod < 0) {
        mod += y;
        div -= 1.0;
    }
    if (modp) *modp = mod;
    if (divp) *divp = div;
}

/*
 *  call-seq:
 *     flt % other         => float
 *     flt.modulo(other)   => float
 *
 *  Return the modulo after division of <code>flt</code> by <code>other</code>.
 *
 *     6543.21.modulo(137)      #=> 104.21
 *     6543.21.modulo(137.24)   #=> 92.9299999999996
 */

static VALUE
flo_mod(VALUE x, VALUE y)
{
    double fy, mod;

    switch (TYPE(y)) {
      case T_FIXNUM:
        fy = (double)FIX2LONG(y);
        break;
      case T_BIGNUM:
        fy = rb_big2dbl(y);
        break;
      case T_FLOAT:
        fy = RFLOAT(y)->value;
        break;
      default:
        return rb_num_coerce_bin(x, y);
    }
    flodivmod(RFLOAT(x)->value, fy, 0, &mod);
    return rb_float_new(mod);
}

/*
 *  call-seq:
 *     flt.divmod(numeric)    => array
 *
 *  See <code>Numeric#divmod</code>.
 */

static VALUE
flo_divmod(VALUE x, VALUE y)
{
    double fy, div, mod;
    volatile VALUE a, b;

    switch (TYPE(y)) {
      case T_FIXNUM:
        fy = (double)FIX2LONG(y);
        break;
      case T_BIGNUM:
        fy = rb_big2dbl(y);
        break;
      case T_FLOAT:
        fy = RFLOAT(y)->value;
        break;
      default:
        return rb_num_coerce_bin(x, y);
    }
    flodivmod(RFLOAT(x)->value, fy, &div, &mod);
    a = rb_float_new(div);
    b = rb_float_new(mod);
    return rb_assoc_new(a, b);
}

/*
 * call-seq:
 *
 *  flt ** other   => float
 *
 * Raises <code>float</code> the <code>other</code> power.
 */

static VALUE
flo_pow(VALUE x, VALUE y)
{
    switch (TYPE(y)) {
      case T_FIXNUM:
        return rb_float_new(pow(RFLOAT(x)->value, (double)FIX2LONG(y)));
      case T_BIGNUM:
        return rb_float_new(pow(RFLOAT(x)->value, rb_big2dbl(y)));
      case T_FLOAT:
        return rb_float_new(pow(RFLOAT(x)->value, RFLOAT(y)->value));
      default:
        return rb_num_coerce_bin(x, y);
    }
}

/*
 *  call-seq:
 *     num.eql?(numeric)    => true or false
 *
 *  Returns <code>true</code> if <i>num</i> and <i>numeric</i> are the
 *  same type and have equal values.
 *
 *     1 == 1.0          #=> true
 *     1.eql?(1.0)       #=> false
 *     (1.0).eql?(1.0)   #=> true
 */

static VALUE
num_eql(VALUE x, VALUE y)
{
    if (TYPE(x) != TYPE(y)) return Qfalse;

    return rb_equal(x, y);
}

/*
 *  call-seq:
 *     num <=> other -> 0 or nil
 *
 *  Returns zero if <i>num</i> equals <i>other</i>, <code>nil</code>
 *  otherwise.
 */

static VALUE
num_cmp(VALUE x, VALUE y)
{
    if (x == y) return INT2FIX(0);
    return Qnil;
}

static VALUE
num_equal(VALUE x, VALUE y)
{
    if (x == y) return Qtrue;
    return rb_funcall(y, id_eq, 1, x);
}

/*
 *  call-seq:
 *     flt == obj   => true or false
 *
 *  Returns <code>true</code> only if <i>obj</i> has the same value
 *  as <i>flt</i>. Contrast this with <code>Float#eql?</code>, which
 *  requires <i>obj</i> to be a <code>Float</code>.
 *
 *     1.0 == 1   #=> true
 *
 */

static VALUE
flo_eq(VALUE x, VALUE y)
{
    volatile double a, b;

    switch (TYPE(y)) {
      case T_FIXNUM:
        b = FIX2LONG(y);
        break;
      case T_BIGNUM:
        b = rb_big2dbl(y);
        break;
      case T_FLOAT:
        b = RFLOAT(y)->value;
        if (isnan(b)) return Qfalse;
        break;
      default:
        return num_equal(x, y);
    }
    a = RFLOAT(x)->value;
    if (isnan(a)) return Qfalse;
    return (a == b)?Qtrue:Qfalse;
}

/*
 * call-seq:
 *   flt.hash   => integer
 *
 * Returns a hash code for this float.
 */

static VALUE
flo_hash(VALUE num)
{
    double d;
    char *c;
    int i, hash;

    d = RFLOAT(num)->value;
    if (d == 0) d = fabs(d);
    c = (char*)&d;
    for (hash=0, i=0; i<sizeof(double);i++) {
        hash += c[i] * 971;
    }
    if (hash < 0) hash = -hash;
    return INT2FIX(hash);
}

VALUE
rb_dbl_cmp(double a, double b)
{
    if (isnan(a) || isnan(b)) return Qnil;
    if (a == b) return INT2FIX(0);
    if (a > b) return INT2FIX(1);
    if (a < b) return INT2FIX(-1);
    return Qnil;
}

/*
 *  call-seq:
 *     flt <=> numeric   => -1, 0, +1
 *
 *  Returns -1, 0, or +1 depending on whether <i>flt</i> is less than,
 *  equal to, or greater than <i>numeric</i>. This is the basis for the
 *  tests in <code>Comparable</code>.
 */

static VALUE
flo_cmp(VALUE x, VALUE y)
{
    double a, b;

    a = RFLOAT(x)->value;
    switch (TYPE(y)) {
      case T_FIXNUM:
        b = (double)FIX2LONG(y);
        break;

      case T_BIGNUM:
        b = rb_big2dbl(y);
        break;

      case T_FLOAT:
        b = RFLOAT(y)->value;
        break;

      default:
        return rb_num_coerce_cmp(x, y);
    }
    return rb_dbl_cmp(a, b);
}

/*
 * call-seq:
 *   flt > other    =>  true or false
 *
 * <code>true</code> if <code>flt</code> is greater than <code>other</code>.
 */

static VALUE
flo_gt(VALUE x, VALUE y)
{
    double a, b;

    a = RFLOAT(x)->value;
    switch (TYPE(y)) {
      case T_FIXNUM:
        b = (double)FIX2LONG(y);
        break;

      case T_BIGNUM:
        b = rb_big2dbl(y);
        break;

      case T_FLOAT:
        b = RFLOAT(y)->value;
        if (isnan(b)) return Qfalse;
        break;

      default:
        return rb_num_coerce_relop(x, y);
    }
    if (isnan(a)) return Qfalse;
    return (a > b)?Qtrue:Qfalse;
}

/*
 * call-seq:
 *   flt >= other    =>  true or false
 *
 * <code>true</code> if <code>flt</code> is greater than
 * or equal to <code>other</code>.
 */

static VALUE
flo_ge(VALUE x, VALUE y)
{
    double a, b;

    a = RFLOAT(x)->value;
    switch (TYPE(y)) {
      case T_FIXNUM:
        b = (double)FIX2LONG(y);
        break;

      case T_BIGNUM:
        b = rb_big2dbl(y);
        break;

      case T_FLOAT:
        b = RFLOAT(y)->value;
        if (isnan(b)) return Qfalse;
        break;

      default:
        return rb_num_coerce_relop(x, y);
    }
    if (isnan(a)) return Qfalse;
    return (a >= b)?Qtrue:Qfalse;
}

/*
 * call-seq:
 *   flt < other    =>  true or false
 *
 * <code>true</code> if <code>flt</code> is less than <code>other</code>.
 */

static VALUE
flo_lt(VALUE x, VALUE y)
{
    double a, b;

    a = RFLOAT(x)->value;
    switch (TYPE(y)) {
      case T_FIXNUM:
        b = (double)FIX2LONG(y);
        break;

      case T_BIGNUM:
        b = rb_big2dbl(y);
        break;

      case T_FLOAT:
        b = RFLOAT(y)->value;
        if (isnan(b)) return Qfalse;
        break;

      default:
        return rb_num_coerce_relop(x, y);
    }
    if (isnan(a)) return Qfalse;
    return (a < b)?Qtrue:Qfalse;
}

/*
 * call-seq:
 *   flt <= other    =>  true or false
 *
 * <code>true</code> if <code>flt</code> is less than
 * or equal to <code>other</code>.
 */

static VALUE
flo_le(VALUE x, VALUE y)
{
    double a, b;

    a = RFLOAT(x)->value;
    switch (TYPE(y)) {
      case T_FIXNUM:
        b = (double)FIX2LONG(y);
        break;

      case T_BIGNUM:
        b = rb_big2dbl(y);
        break;

      case T_FLOAT:
        b = RFLOAT(y)->value;
        if (isnan(b)) return Qfalse;
        break;

      default:
        return rb_num_coerce_relop(x, y);
    }
    if (isnan(a)) return Qfalse;
    return (a <= b)?Qtrue:Qfalse;
}

/*
 *  call-seq:
 *     flt.eql?(obj)   => true or false
 *
 *  Returns <code>true</code> only if <i>obj</i> is a
 *  <code>Float</code> with the same value as <i>flt</i>. Contrast this
 *  with <code>Float#==</code>, which performs type conversions.
 *
 *     1.0.eql?(1)   #=> false
 */

static VALUE
flo_eql(VALUE x, VALUE y)
{
    if (TYPE(y) == T_FLOAT) {
        double a = RFLOAT(x)->value;
        double b = RFLOAT(y)->value;

        if (isnan(a) || isnan(b)) return Qfalse;
        if (a == b) return Qtrue;
    }
    return Qfalse;
}

/*
 * call-seq:
 *   flt.to_f   => flt
 *
 * As <code>flt</code> is already a float, returns <i>self</i>.
 */

static VALUE
flo_to_f(VALUE num)
{
    return num;
}

/*
 *  call-seq:
 *     flt.abs    => float
 *
 *  Returns the absolute value of <i>flt</i>.
 *
 *     (-34.56).abs   #=> 34.56
 *     -34.56.abs     #=> 34.56
 *
 */

static VALUE
flo_abs(VALUE flt)
{
    double val = fabs(RFLOAT(flt)->value);
    return rb_float_new(val);
}

/*
 *  call-seq:
 *     flt.zero? -> true or false
 *
 *  Returns <code>true</code> if <i>flt</i> is 0.0.
 *
 */

static VALUE
flo_zero_p(VALUE num)
{
    if (RFLOAT(num)->value == 0.0) {
        return Qtrue;
    }
    return Qfalse;
}

/*
 *  call-seq:
 *     flt.nan? -> true or false
 *
 *  Returns <code>true</code> if <i>flt</i> is an invalid IEEE floating
 *  point number.
 *
 *     a = -1.0      #=> -1.0
 *     a.nan?        #=> false
 *     a = 0.0/0.0   #=> NaN
 *     a.nan?        #=> true
 */

static VALUE
flo_is_nan_p(VALUE num)
{
    double value = RFLOAT(num)->value;

    return isnan(value) ? Qtrue : Qfalse;
}

/*
 *  call-seq:
 *     flt.infinite? -> nil, -1, +1
 *
 *  Returns <code>nil</code>, -1, or +1 depending on whether <i>flt</i>
 *  is finite, -infinity, or +infinity.
 *
 *     (0.0).infinite?        #=> nil
 *     (-1.0/0.0).infinite?   #=> -1
 *     (+1.0/0.0).infinite?   #=> 1
 */

static VALUE
flo_is_infinite_p(VALUE num)
{
    double value = RFLOAT(num)->value;

    if (isinf(value)) {
        return INT2FIX( value < 0 ? -1 : 1 );
    }

    return Qnil;
}

/*
 *  call-seq:
 *     flt.finite? -> true or false
 *
 *  Returns <code>true</code> if <i>flt</i> is a valid IEEE floating
 *  point number (it is not infinite, and <code>nan?</code> is
 *  <code>false</code>).
 *
 */

static VALUE
flo_is_finite_p(VALUE num)
{
    double value = RFLOAT(num)->value;

#if HAVE_FINITE
    if (!finite(value))
        return Qfalse;
#else
    if (isinf(value) || isnan(value))
        return Qfalse;
#endif

    return Qtrue;
}

/*
 *  call-seq:
 *     flt.floor   => integer
 *
 *  Returns the largest integer less than or equal to <i>flt</i>.
 *
 *     1.2.floor      #=> 1
 *     2.0.floor      #=> 2
 *     (-1.2).floor   #=> -2
 *     (-2.0).floor   #=> -2
 */

static VALUE
flo_floor(VALUE num)
{
    double f = floor(RFLOAT(num)->value);
    long val;

    if (!FIXABLE(f)) {
        return rb_dbl2big(f);
    }
    val = f;
    return LONG2FIX(val);
}

/*
 *  call-seq:
 *     flt.ceil    => integer
 *
 *  Returns the smallest <code>Integer</code> greater than or equal to
 *  <i>flt</i>.
 *
 *     1.2.ceil      #=> 2
 *     2.0.ceil      #=> 2
 *     (-1.2).ceil   #=> -1
 *     (-2.0).ceil   #=> -2
 */

static VALUE
flo_ceil(VALUE num)
{
    double f = ceil(RFLOAT(num)->value);
    long val;

    if (!FIXABLE(f)) {
        return rb_dbl2big(f);
    }
    val = f;
    return LONG2FIX(val);
}

/*
 *  call-seq:
 *     flt.round   => integer
 *
 *  Rounds <i>flt</i> to the nearest integer. Equivalent to:
 *
 *     def round
 *       return floor(self+0.5) if self > 0.0
 *       return ceil(self-0.5)  if self < 0.0
 *       return 0.0
 *     end
 *
 *     1.5.round      #=> 2
 *     (-1.5).round   #=> -2
 *
 */

static VALUE
flo_round(VALUE num)
{
    double f = RFLOAT(num)->value;
    long val;

    if (f > 0.0) f = floor(f+0.5);
    if (f < 0.0) f = ceil(f-0.5);

    if (!FIXABLE(f)) {
        return rb_dbl2big(f);
    }
    val = f;
    return LONG2FIX(val);
}

/*
 *  call-seq:
 *     flt.to_i       => integer
 *     flt.to_int     => integer
 *     flt.truncate   => integer
 *
 *  Returns <i>flt</i> truncated to an <code>Integer</code>.
 */

static VALUE
flo_truncate(VALUE num)
{
    double f = RFLOAT(num)->value;
    long val;

    if (f > 0.0) f = floor(f);
    if (f < 0.0) f = ceil(f);

    if (!FIXABLE(f)) {
        return rb_dbl2big(f);
    }
    val = f;
    return LONG2FIX(val);
}

/*
 *  call-seq:
 *     num.floor    => integer
 *
 *  Returns the largest integer less than or equal to <i>num</i>.
 *  <code>Numeric</code> implements this by converting <i>anInteger</i>
 *  to a <code>Float</code> and invoking <code>Float#floor</code>.
 *
 *     1.floor      #=> 1
 *     (-1).floor   #=> -1
 */

static VALUE
num_floor(VALUE num)
{
    return flo_floor(rb_Float(num));
}

/*
 *  call-seq:
 *     num.ceil    => integer
 *
 *  Returns the smallest <code>Integer</code> greater than or equal to
 *  <i>num</i>. Class <code>Numeric</code> achieves this by converting
 *  itself to a <code>Float</code> then invoking
 *  <code>Float#ceil</code>.
 *
 *     1.ceil        #=> 1
 *     1.2.ceil      #=> 2
 *     (-1.2).ceil   #=> -1
 *     (-1.0).ceil   #=> -1
 */

static VALUE
num_ceil(VALUE num)
{
    return flo_ceil(rb_Float(num));
}

/*
 *  call-seq:
 *     num.round    => integer
 *
 *  Rounds <i>num</i> to the nearest integer. <code>Numeric</code>
 *  implements this by converting itself to a
 *  <code>Float</code> and invoking <code>Float#round</code>.
 */

static VALUE
num_round(VALUE num)
{
    return flo_round(rb_Float(num));
}

/*
 *  call-seq:
 *     num.truncate    => integer
 *
 *  Returns <i>num</i> truncated to an integer. <code>Numeric</code>
 *  implements this by converting its value to a float and invoking
 *  <code>Float#truncate</code>.
 */

static VALUE
num_truncate(VALUE num)
{
    return flo_truncate(rb_Float(num));
}

/*
 *  call-seq:
 *     num.step(limit, step ) {|i| block }     => num
 *
 *  Invokes <em>block</em> with the sequence of numbers starting at
 *  <i>num</i>, incremented by <i>step</i> on each call. The loop
 *  finishes when the value to be passed to the block is greater than
 *  <i>limit</i> (if <i>step</i> is positive) or less than
 *  <i>limit</i> (if <i>step</i> is negative). If all the arguments are
 *  integers, the loop operates using an integer counter. If any of the
 *  arguments are floating point numbers, all are converted to floats,
 *  and the loop is executed <i>floor(n + n*epsilon)+ 1</i> times,
 *  where <i>n = (limit - num)/step</i>. Otherwise, the loop
 *  starts at <i>num</i>, uses either the <code><</code> or
 *  <code>></code> operator to compare the counter against
 *  <i>limit</i>, and increments itself using the <code>+</code>
 *  operator.
 *
 *     1.step(10, 2) { |i| print i, " " }
 *     Math::E.step(Math::PI, 0.2) { |f| print f, " " }
 *
 *  <em>produces:</em>
 *
 *     1 3 5 7 9
 *     2.71828182845905 2.91828182845905 3.11828182845905
 */

static VALUE
num_step(int argc, VALUE *argv, VALUE from)
{
    VALUE to, step;

    if (argc == 1) {
        to = argv[0];
        step = INT2FIX(1);
    }
    else {
        if (argc == 2) {
            to = argv[0];
            step = argv[1];
        }
        else {
            rb_raise(rb_eArgError, "wrong number of arguments");
        }
        if (rb_equal(step, INT2FIX(0))) {
            rb_raise(rb_eArgError, "step can't be 0");
        }
    }

    if (FIXNUM_P(from) && FIXNUM_P(to) && FIXNUM_P(step)) {
        long i, end, diff;

        i = FIX2LONG(from);
        end = FIX2LONG(to);
        diff = FIX2LONG(step);

        if (diff > 0) {
            while (i <= end) {
                rb_yield(LONG2FIX(i));
                i += diff;
            }
        }
        else {
            while (i >= end) {
                rb_yield(LONG2FIX(i));
                i += diff;
            }
        }
    }
    else if (TYPE(from) == T_FLOAT || TYPE(to) == T_FLOAT || TYPE(step) == T_FLOAT) {
        const double epsilon = DBL_EPSILON;
        double beg = NUM2DBL(from);
        double end = NUM2DBL(to);
        double unit = NUM2DBL(step);
        double n = (end - beg)/unit;
        double err = (fabs(beg) + fabs(end) + fabs(end-beg)) / fabs(unit) * epsilon;
        long i;

        if (err>0.5) err=0.5;
        n = floor(n + err) + 1;
        for (i=0; i<n; i++) {
            rb_yield(rb_float_new(i*unit+beg));
        }
    }
    else {
        VALUE i = from;
        ID cmp;

        if (RTEST(rb_funcall(step, '>', 1, INT2FIX(0)))) {
            cmp = '>';
        }
        else {
            cmp = '<';
        }
        for (;;) {
            if (RTEST(rb_funcall(i, cmp, 1, to))) break;
            rb_yield(i);
            i = rb_funcall(i, '+', 1, step);
        }
    }
    return from;
}

long
rb_num2long(VALUE val)
{
    if (NIL_P(val)) {
        rb_raise(rb_eTypeError, "no implicit conversion from nil to integer");
    }

    if (FIXNUM_P(val)) return FIX2LONG(val);

    switch (TYPE(val)) {
      case T_FLOAT:
        if (RFLOAT(val)->value <= (double)LONG_MAX
            && RFLOAT(val)->value >= (double)LONG_MIN) {
            return (long)(RFLOAT(val)->value);
        }
        else {
            char buf[24];
            char *s;

            sprintf(buf, "%-.10g", RFLOAT(val)->value);
            if (s = strchr(buf, ' ')) *s = '\0';
            rb_raise(rb_eRangeError, "float %s out of range of integer", buf);
        }

      case T_BIGNUM:
        return rb_big2long(val);

      default:
        val = rb_to_int(val);
        return NUM2LONG(val);
    }
}

unsigned long
rb_num2ulong(VALUE val)
{
    if (TYPE(val) == T_BIGNUM) {
        return rb_big2ulong(val);
    }
    return (unsigned long)rb_num2long(val);
}

#if SIZEOF_INT < SIZEOF_LONG
static void
check_int(num)
    long num;
{
    const char *s;

    if (num < INT_MIN) {
        s = "small";
    }
    else if (num > INT_MAX) {
        s = "big";
    }
    else {
        return;
    }
    rb_raise(rb_eRangeError, "integer %ld too %s to convert to `int'", num, s);
}

static void
check_uint(num)
    unsigned long num;
{
    if (num > UINT_MAX) {
        rb_raise(rb_eRangeError, "integer %lu too big to convert to `unsigned int'", num);
    }
}

long
rb_num2int(val)
    VALUE val;
{
    long num = rb_num2long(val);

    check_int(num);
    return num;
}

long
rb_fix2int(val)
    VALUE val;
{
    long num = FIXNUM_P(val)?FIX2LONG(val):rb_num2long(val);

    check_int(num);
    return num;
}

unsigned long
rb_num2uint(val)
    VALUE val;
{
    unsigned long num = rb_num2ulong(val);

    if (RTEST(rb_funcall(INT2FIX(0), '<', 1, val))) {
        check_uint(num);
    }
    return num;
}

unsigned long
rb_fix2uint(val)
    VALUE val;
{
    unsigned long num;

    if (!FIXNUM_P(val)) {
        return rb_num2uint(val);
    }
    num = FIX2ULONG(val);
    if (FIX2LONG(val) > 0) {
        check_uint(num);
    }
    return num;
}
#else
long
rb_num2int(VALUE val)
{
    return rb_num2long(val);
}

long
rb_fix2int(VALUE val)
{
    return FIX2INT(val);
}
#endif

VALUE
rb_num2fix(VALUE val)
{
    long v;

    if (FIXNUM_P(val)) return val;

    v = rb_num2long(val);
    if (!FIXABLE(v))
        rb_raise(rb_eRangeError, "integer %ld out of range of fixnum", v);
    return LONG2FIX(v);
}

#if HAVE_LONG_LONG

LONG_LONG
rb_num2ll(VALUE val)
{
    if (NIL_P(val)) {
        rb_raise(rb_eTypeError, "no implicit conversion from nil");
    }

    if (FIXNUM_P(val)) return (LONG_LONG)FIX2LONG(val);

    switch (TYPE(val)) {
    case T_FLOAT:
        if (RFLOAT(val)->value <= (double)LLONG_MAX
            && RFLOAT(val)->value >= (double)LLONG_MIN) {
            return (LONG_LONG)(RFLOAT(val)->value);
        }
        else {
            char buf[24];
            char *s;

            sprintf(buf, "%-.10g", RFLOAT(val)->value);
            if (s = strchr(buf, ' ')) *s = '\0';
            rb_raise(rb_eRangeError, "float %s out of range of long long", buf);
        }

    case T_BIGNUM:
        return rb_big2ll(val);

    case T_STRING:
        rb_raise(rb_eTypeError, "no implicit conversion from string");
        return Qnil;            /* not reached */

    case T_TRUE:
    case T_FALSE:
        rb_raise(rb_eTypeError, "no implicit conversion from boolean");
        return Qnil;            /* not reached */

      default:
          val = rb_to_int(val);
          return NUM2LL(val);
    }
}

unsigned LONG_LONG
rb_num2ull(VALUE val)
{
    if (TYPE(val) == T_BIGNUM) {
        return rb_big2ull(val);
    }
    return (unsigned LONG_LONG)rb_num2ll(val);
}

#endif  /* HAVE_LONG_LONG */

/*
 * Document-class: Integer
 *
 *  <code>Integer</code> is the basis for the two concrete classes that
 *  hold whole numbers, <code>Bignum</code> and <code>Fixnum</code>.
 *
 */

/*
 *  call-seq:
 *     int.to_i      => int
 *     int.to_int    => int
 *     int.floor     => int
 *     int.ceil      => int
 *     int.round     => int
 *     int.truncate  => int
 *
 *  As <i>int</i> is already an <code>Integer</code>, all these
 *  methods simply return the receiver.
 */

static VALUE
int_to_i(VALUE num)
{
    return num;
}

/*
 *  call-seq:
 *     int.integer? -> true
 *
 *  Always returns <code>true</code>.
 */

static VALUE
int_int_p(VALUE num)
{
    return Qtrue;
}

/*
 *  call-seq:
 *     int.next    => integer
 *     int.succ    => integer
 *
 *  Returns the <code>Integer</code> equal to <i>int</i> + 1.
 *
 *     1.next      #=> 2
 *     (-1).next   #=> 0
 */

static VALUE
int_succ(VALUE num)
{
    if (FIXNUM_P(num)) {
        long i = FIX2LONG(num) + 1;
        return LONG2NUM(i);
    }
    return rb_funcall(num, '+', 1, INT2FIX(1));
}

/*
 *  call-seq:
 *     int.chr    => string
 *
 *  Returns a string containing the ASCII character represented by the
 *  receiver's value.
 *
 *     65.chr    #=> "A"
 *     ?a.chr    #=> "a"
 *     230.chr   #=> "\346"
 */

static VALUE
int_chr(VALUE num)
{
    char c;
    long i = NUM2LONG(num);

    if (i < 0 || 0xff < i)
        rb_raise(rb_eRangeError, "%ld out of char range", i);
    c = i;
    return rb_str_new(&c, 1);
}

/********************************************************************
 *
 * Document-class: Fixnum
 *
 *  A <code>Fixnum</code> holds <code>Integer</code> values that can be
 *  represented in a native machine word (minus 1 bit). If any operation
 *  on a <code>Fixnum</code> exceeds this range, the value is
 *  automatically converted to a <code>Bignum</code>.
 *
 *  <code>Fixnum</code> objects have immediate value. This means that
 *  when they are assigned or passed as parameters, the actual object is
 *  passed, rather than a reference to that object. Assignment does not
 *  alias <code>Fixnum</code> objects. There is effectively only one
 *  <code>Fixnum</code> object instance for any given integer value, so,
 *  for example, you cannot add a singleton method to a
 *  <code>Fixnum</code>.
 */

/*
 * call-seq:
 *   Fixnum.induced_from(obj)    =>  fixnum
 *
 * Convert <code>obj</code> to a Fixnum. Works with numeric parameters.
 * Also works with Symbols, but this is deprecated.
 */

static VALUE
rb_fix_induced_from(VALUE klass, VALUE x)
{
    return rb_num2fix(x);
}

/*
 * call-seq:
 *   Integer.induced_from(obj)    =>  fixnum, bignum
 *
 * Convert <code>obj</code> to an Integer.
 */

static VALUE
rb_int_induced_from(VALUE klass, VALUE x)
{
    switch (TYPE(x)) {
    case T_FIXNUM:
    case T_BIGNUM:
       return x;
    case T_FLOAT:
       return rb_funcall(x, id_to_i, 0);
    default:
       rb_raise(rb_eTypeError, "failed to convert %s into Integer",
                rb_obj_classname(x));
    }
}

/*
 * call-seq:
 *   Float.induced_from(obj)    =>  float
 *
 * Convert <code>obj</code> to a float.
 */

static VALUE
rb_flo_induced_from(VALUE klass, VALUE x)
{
    switch (TYPE(x)) {
    case T_FIXNUM:
    case T_BIGNUM:
       return rb_funcall(x, rb_intern("to_f"), 0);
    case T_FLOAT:
       return x;
    default:
       rb_raise(rb_eTypeError, "failed to convert %s into Float",
                rb_obj_classname(x));
    }
}

/*
 * call-seq:
 *   -fix   =>  integer
 *
 * Negates <code>fix</code> (which might return a Bignum).
 */

static VALUE
fix_uminus(VALUE num)
{
    return LONG2NUM(-FIX2LONG(num));
}

VALUE
rb_fix2str(VALUE x, int base)
{
    extern const char ruby_digitmap[];
    char buf[SIZEOF_LONG*CHAR_BIT + 2], *b = buf + sizeof buf;
    long val = FIX2LONG(x);
    int neg = 0;

    if (base < 2 || 36 < base) {
        rb_raise(rb_eArgError, "illegal radix %d", base);
    }
    if (val == 0) {
        return rb_str_new2("0");
    }
    if (val < 0) {
        val = -val;
        neg = 1;
    }
    *--b = '\0';
    do {
        *--b = ruby_digitmap[(int)(val % base)];
    } while (val /= base);
    if (neg) {
        *--b = '-';
    }

    return rb_str_new2(b);
}

/*
 *  call-seq:
 *     fix.to_s( base=10 ) -> aString
 *
 *  Returns a string containing the representation of <i>fix</i> radix
 *  <i>base</i> (between 2 and 36).
 *
 *     12345.to_s       #=> "12345"
 *     12345.to_s(2)    #=> "11000000111001"
 *     12345.to_s(8)    #=> "30071"
 *     12345.to_s(10)   #=> "12345"
 *     12345.to_s(16)   #=> "3039"
 *     12345.to_s(36)   #=> "9ix"
 *
 */
static VALUE
fix_to_s(int argc, VALUE *argv, VALUE x)
{
    VALUE b;
    int base;

    rb_scan_args(argc, argv, "01", &b);
    if (argc == 0) base = 10;
    else base = NUM2INT(b);

    if (base == 2) {
        /* rb_fix2str() does not handle binary */
        return rb_big2str(rb_int2big(FIX2INT(x)), 2);
    }
    return rb_fix2str(x, base);
}

/*
 * call-seq:
 *   fix + numeric   =>  numeric_result
 *
 * Performs addition: the class of the resulting object depends on
 * the class of <code>numeric</code> and on the magnitude of the
 * result.
 */

static VALUE
fix_plus(VALUE x, VALUE y)
{
    if (FIXNUM_P(y)) {
        long a, b, c;
        VALUE r;

        a = FIX2LONG(x);
        b = FIX2LONG(y);
        c = a + b;
        r = LONG2FIX(c);

        if (FIX2LONG(r) != c) {
            r = rb_big_plus(rb_int2big(a), rb_int2big(b));
        }
        return r;
    }
    switch (TYPE(y)) {
      case T_BIGNUM:
        return rb_big_plus(y, x);
      case T_FLOAT:
        return rb_float_new((double)FIX2LONG(x) + RFLOAT(y)->value);
      default:
        return rb_num_coerce_bin(x, y);
    }
}

/*
 * call-seq:
 *   fix - numeric   =>  numeric_result
 *
 * Performs subtraction: the class of the resulting object depends on
 * the class of <code>numeric</code> and on the magnitude of the
 * result.
 */

static VALUE
fix_minus(VALUE x, VALUE y)
{
    if (FIXNUM_P(y)) {
        long a, b, c;
        VALUE r;

        a = FIX2LONG(x);
        b = FIX2LONG(y);
        c = a - b;
        r = LONG2FIX(c);

        if (FIX2LONG(r) != c) {
            r = rb_big_minus(rb_int2big(a), rb_int2big(b));
        }
        return r;
    }
    switch (TYPE(y)) {
      case T_BIGNUM:
        x = rb_int2big(FIX2LONG(x));
        return rb_big_minus(x, y);
      case T_FLOAT:
        return rb_float_new((double)FIX2LONG(x) - RFLOAT(y)->value);
      default:
        return rb_num_coerce_bin(x, y);
    }
}

/*
 * call-seq:
 *   fix * numeric   =>  numeric_result
 *
 * Performs multiplication: the class of the resulting object depends on
 * the class of <code>numeric</code> and on the magnitude of the
 * result.
 */

static VALUE
fix_mul(VALUE x, VALUE y)
{
    if (FIXNUM_P(y)) {
#ifdef __HP_cc
/* avoids an optimization bug of HP aC++/ANSI C B3910B A.06.05 [Jul 25 2005] */
        volatile
#endif
        long a, b, c;
        VALUE r;

        a = FIX2LONG(x);
        if (a == 0) return x;

        b = FIX2LONG(y);
        c = a * b;
        r = LONG2FIX(c);

        if (FIX2LONG(r) != c || c/a != b) {
            r = rb_big_mul(rb_int2big(a), rb_int2big(b));
        }
        return r;
    }
    switch (TYPE(y)) {
      case T_BIGNUM:
        return rb_big_mul(y, x);
      case T_FLOAT:
        return rb_float_new((double)FIX2LONG(x) * RFLOAT(y)->value);
      default:
        return rb_num_coerce_bin(x, y);
    }
}

static void
fixdivmod(long x, long y, long *divp, long *modp)
{
    long div, mod;

    if (y == 0) rb_num_zerodiv();
    if (y < 0) {
        if (x < 0)
            div = -x / -y;
        else
            div = - (x / -y);
    }
    else {
        if (x < 0)
            div = - (-x / y);
        else
            div = x / y;
    }
    mod = x - div*y;
    if ((mod < 0 && y > 0) || (mod > 0 && y < 0)) {
        mod += y;
        div -= 1;
    }
    if (divp) *divp = div;
    if (modp) *modp = mod;
}

/*
 *  call-seq:
 *     fix.quo(numeric)    => float
 *
 *  Returns the floating point result of dividing <i>fix</i> by
 *  <i>numeric</i>.
 *
 *     654321.quo(13731)      #=> 47.6528293642124
 *     654321.quo(13731.24)   #=> 47.6519964693647
 *
 */

static VALUE
fix_quo(VALUE x, VALUE y)
{
    if (FIXNUM_P(y)) {
        return rb_float_new((double)FIX2LONG(x) / (double)FIX2LONG(y));
    }
    switch (TYPE(y)) {
      case T_BIGNUM:
        return rb_float_new((double)FIX2LONG(y) / rb_big2dbl(y));
      case T_FLOAT:
        return rb_float_new((double)FIX2LONG(x) / RFLOAT(y)->value);
      default:
        return rb_num_coerce_bin(x, y);
    }
}

static VALUE
fix_divide(VALUE x, VALUE y, int flo)
{
    if (FIXNUM_P(y)) {
        long div;

        fixdivmod(FIX2LONG(x), FIX2LONG(y), &div, 0);
        return LONG2NUM(div);
    }
    switch (TYPE(y)) {
      case T_BIGNUM:
        x = rb_int2big(FIX2LONG(x));
        return rb_big_div(x, y);
      case T_FLOAT:
        if (flo) {
            return rb_float_new((double)FIX2LONG(x) / RFLOAT(y)->value);
        }
        else {
            long div = (double)FIX2LONG(x) / RFLOAT(y)->value;
            return LONG2NUM(div);
        }
      default:
        return rb_num_coerce_bin(x, y);
    }
}

/*
 * call-seq:
 *   fix / numeric      =>  numeric_result
 *
 * Performs division: the class of the resulting object depends on
 * the class of <code>numeric</code> and on the magnitude of the
 * result.
 */

static VALUE
fix_div(VALUE x, VALUE y)
{
    return fix_divide(x, y, Qtrue);
}

/*
 * call-seq:
 *   fix.div(numeric)   =>  numeric_result
 *
 * Performs integer division: returns integer value.
 */

static VALUE
fix_idiv(VALUE x, VALUE y)
{
    return fix_divide(x, y, Qfalse);
}

/*
 *  call-seq:
 *    fix % other         => Numeric
 *    fix.modulo(other)   => Numeric
 *
 *  Returns <code>fix</code> modulo <code>other</code>.
 *  See <code>Numeric.divmod</code> for more information.
 */

static VALUE
fix_mod(VALUE x, VALUE y)
{
    if (FIXNUM_P(y)) {
        long mod;

        fixdivmod(FIX2LONG(x), FIX2LONG(y), 0, &mod);
        return LONG2NUM(mod);
    }
    switch (TYPE(y)) {
      case T_BIGNUM:
        x = rb_int2big(FIX2LONG(x));
        return rb_big_modulo(x, y);
      case T_FLOAT:
        {
            double mod;

            flodivmod((double)FIX2LONG(x), RFLOAT(y)->value, 0, &mod);
            return rb_float_new(mod);
        }
      default:
        return rb_num_coerce_bin(x, y);
    }
}

/*
 *  call-seq:
 *     fix.divmod(numeric)    => array
 *
 *  See <code>Numeric#divmod</code>.
 */
static VALUE
fix_divmod(VALUE x, VALUE y)
{
    if (FIXNUM_P(y)) {
        long div, mod;

        fixdivmod(FIX2LONG(x), FIX2LONG(y), &div, &mod);

        return rb_assoc_new(LONG2NUM(div), LONG2NUM(mod));
    }
    switch (TYPE(y)) {
      case T_BIGNUM:
        x = rb_int2big(FIX2LONG(x));
        return rb_big_divmod(x, y);
      case T_FLOAT:
        {
            double div, mod;
            volatile VALUE a, b;

            flodivmod((double)FIX2LONG(x), RFLOAT(y)->value, &div, &mod);
            a = rb_float_new(div);
            b = rb_float_new(mod);
            return rb_assoc_new(a, b);
        }
      default:
        return rb_num_coerce_bin(x, y);
    }
}

/*
 *  call-seq:
 *    fix ** other         => Numeric
 *
 *  Raises <code>fix</code> to the <code>other</code> power, which may
 *  be negative or fractional.
 *
 *    2 ** 3      #=> 8
 *    2 ** -1     #=> 0.5
 *    2 ** 0.5    #=> 1.4142135623731
 */

static VALUE
fix_pow(VALUE x, VALUE y)
{
    if (FIXNUM_P(y)) {
        long a, b;

        b = FIX2LONG(y);
        if (b == 0) return INT2FIX(1);
        if (b == 1) return x;
        a = FIX2LONG(x);
        if (b > 0) {
            return rb_big_pow(rb_int2big(a), y);
        }
        return rb_float_new(pow((double)a, (double)b));
    }
    switch (TYPE(y)) {
      case T_BIGNUM:
        x = rb_int2big(FIX2LONG(x));
        return rb_big_pow(x, y);
      case T_FLOAT:
        return rb_float_new(pow((double)FIX2LONG(x), RFLOAT(y)->value));
      default:
        return rb_num_coerce_bin(x, y);
    }
}

/*
 * call-seq:
 *   fix == other
 *
 * Return <code>true</code> if <code>fix</code> equals <code>other</code>
 * numerically.
 *
 *   1 == 2      #=> false
 *   1 == 1.0    #=> true
 */

static VALUE
fix_equal(VALUE x, VALUE y)
{
    if (FIXNUM_P(y)) {
        return (FIX2LONG(x) == FIX2LONG(y))?Qtrue:Qfalse;
    }
    switch (TYPE(y)) {
      case T_BIGNUM:
        return rb_big_eq(y, x);
      case T_FLOAT:
        return (double)FIX2LONG(x) == RFLOAT(y)->value ? Qtrue : Qfalse;
      default:
        return num_equal(x, y);
    }
}

/*
 *  call-seq:
 *     fix <=> numeric    => -1, 0, +1
 *
 *  Comparison---Returns -1, 0, or +1 depending on whether <i>fix</i> is
 *  less than, equal to, or greater than <i>numeric</i>. This is the
 *  basis for the tests in <code>Comparable</code>.
 */

static VALUE
fix_cmp(VALUE x, VALUE y)
{
    if (FIXNUM_P(y)) {
        long a = FIX2LONG(x), b = FIX2LONG(y);

        if (a == b) return INT2FIX(0);
        if (a > b) return INT2FIX(1);
        return INT2FIX(-1);
    }
    switch (TYPE(y)) {
      case T_BIGNUM:
        return rb_big_cmp(rb_int2big(FIX2LONG(x)), y);
      case T_FLOAT:
        return rb_dbl_cmp((double)FIX2LONG(x), RFLOAT(y)->value);
      default:
        return rb_num_coerce_cmp(x, y);
    }
}

/*
 * call-seq:
 *   fix > other     => true or false
 *
 * Returns <code>true</code> if the value of <code>fix</code> is
 * greater than that of <code>other</code>.
 */

static VALUE
fix_gt(VALUE x, VALUE y)
{
    if (FIXNUM_P(y)) {
        long a = FIX2LONG(x), b = FIX2LONG(y);

        if (a > b) return Qtrue;
        return Qfalse;
    }
    switch (TYPE(y)) {
      case T_BIGNUM:
        return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) > 0 ? Qtrue : Qfalse;
      case T_FLOAT:
        return (double)FIX2LONG(x) > RFLOAT(y)->value ? Qtrue : Qfalse;
      default:
        return rb_num_coerce_relop(x, y);
    }
}

/*
 * call-seq:
 *   fix >= other     => true or false
 *
 * Returns <code>true</code> if the value of <code>fix</code> is
 * greater than or equal to that of <code>other</code>.
 */

static VALUE
fix_ge(VALUE x, VALUE y)
{
    if (FIXNUM_P(y)) {
        long a = FIX2LONG(x), b = FIX2LONG(y);

        if (a >= b) return Qtrue;
        return Qfalse;
    }
    switch (TYPE(y)) {
      case T_BIGNUM:
        return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) >= 0 ? Qtrue : Qfalse;
      case T_FLOAT:
        return (double)FIX2LONG(x) >= RFLOAT(y)->value ? Qtrue : Qfalse;
      default:
        return rb_num_coerce_relop(x, y);
    }
}

/*
 * call-seq:
 *   fix < other     => true or false
 *
 * Returns <code>true</code> if the value of <code>fix</code> is
 * less than that of <code>other</code>.
 */

static VALUE
fix_lt(VALUE x, VALUE y)
{
    if (FIXNUM_P(y)) {
        long a = FIX2LONG(x), b = FIX2LONG(y);

        if (a < b) return Qtrue;
        return Qfalse;
    }
    switch (TYPE(y)) {
      case T_BIGNUM:
        return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) < 0 ? Qtrue : Qfalse;
      case T_FLOAT:
        return (double)FIX2LONG(x) < RFLOAT(y)->value ? Qtrue : Qfalse;
      default:
        return rb_num_coerce_relop(x, y);
    }
}

/*
 * call-seq:
 *   fix <= other     => true or false
 *
 * Returns <code>true</code> if the value of <code>fix</code> is
 * less thanor equal to that of <code>other</code>.
 */

static VALUE
fix_le(VALUE x, VALUE y)
{
    if (FIXNUM_P(y)) {
        long a = FIX2LONG(x), b = FIX2LONG(y);

        if (a <= b) return Qtrue;
        return Qfalse;
    }
    switch (TYPE(y)) {
      case T_BIGNUM:
        return FIX2INT(rb_big_cmp(rb_int2big(FIX2LONG(x)), y)) <= 0 ? Qtrue : Qfalse;
      case T_FLOAT:
        return (double)FIX2LONG(x) <= RFLOAT(y)->value ? Qtrue : Qfalse;
      default:
        return rb_num_coerce_relop(x, y);
    }
}

/*
 * call-seq:
 *   ~fix     => integer
 *
 * One's complement: returns a number where each bit is flipped.
 */

static VALUE
fix_rev(VALUE num)
{
    long val = FIX2LONG(num);

    val = ~val;
    return LONG2NUM(val);
}

/*
 * call-seq:
 *   fix & other     => integer
 *
 * Bitwise AND.
 */

static VALUE
fix_and(VALUE x, VALUE y)
{
    long val;

    if (TYPE(y) == T_BIGNUM) {
        return rb_big_and(y, x);
    }
    val = FIX2LONG(x) & NUM2LONG(y);
    return LONG2NUM(val);
}

/*
 * call-seq:
 *   fix | other     => integer
 *
 * Bitwise OR.
 */

static VALUE
fix_or(VALUE x, VALUE y)
{
    long val;

    if (TYPE(y) == T_BIGNUM) {
        return rb_big_or(y, x);
    }
    val = FIX2LONG(x) | NUM2LONG(y);
    return LONG2NUM(val);
}

/*
 * call-seq:
 *   fix ^ other     => integer
 *
 * Bitwise EXCLUSIVE OR.
 */

static VALUE
fix_xor(VALUE x, VALUE y)
{
    long val;

    if (TYPE(y) == T_BIGNUM) {
        return rb_big_xor(y, x);
    }
    val = FIX2LONG(x) ^ NUM2LONG(y);
    return LONG2NUM(val);
}

static VALUE fix_rshift(VALUE, VALUE);

/*
 * call-seq:
 *   fix << count     => integer
 *
 * Shifts _fix_ left _count_ positions (right if _count_ is negative).
 */

static VALUE
fix_lshift(VALUE x, VALUE y)
{
    long val, width;

    val = NUM2LONG(x);
    width = NUM2LONG(y);
    if (width < 0)
        return fix_rshift(x, LONG2FIX(-width));
    if (width > (sizeof(VALUE)*CHAR_BIT-1)
        || ((unsigned long)val)>>(sizeof(VALUE)*CHAR_BIT-1-width) > 0) {
        return rb_big_lshift(rb_int2big(val), y);
    }
    val = val << width;
    return LONG2NUM(val);
}

/*
 * call-seq:
 *   fix >> count     => integer
 *
 * Shifts _fix_ right _count_ positions (left if _count_ is negative).
 */

static VALUE
fix_rshift(VALUE x, VALUE y)
{
    long i, val;

    i = NUM2LONG(y);
    if (i < 0)
        return fix_lshift(x, LONG2FIX(-i));
    if (i == 0) return x;
    val = FIX2LONG(x);
    if (i >= sizeof(long)*CHAR_BIT-1) {
        if (val < 0) return INT2FIX(-1);
        return INT2FIX(0);
    }
    val = RSHIFT(val, i);
    return LONG2FIX(val);
}

/*
 *  call-seq:
 *     fix[n]     => 0, 1
 *
 *  Bit Reference---Returns the <em>n</em>th bit in the binary
 *  representation of <i>fix</i>, where <i>fix</i>[0] is the least
 *  significant bit.
 *
 *     a = 0b11001100101010
 *     30.downto(0) do |n| print a[n] end
 *
 *  <em>produces:</em>
 *
 *     0000000000000000011001100101010
 */

static VALUE
fix_aref(VALUE fix, VALUE idx)
{
    long val = FIX2LONG(fix);
    long i;

    if (TYPE(idx) == T_BIGNUM) {
        idx = rb_big_norm(idx);
        if (!FIXNUM_P(idx)) {
            if (!RBIGNUM(idx)->sign || val >= 0)
                return INT2FIX(0);
            return INT2FIX(1);
        }
    }
    i = NUM2LONG(idx);

    if (i < 0) return INT2FIX(0);
    if (sizeof(VALUE)*CHAR_BIT-1 < i) {
        if (val < 0) return INT2FIX(1);
        return INT2FIX(0);
    }
    if (val & (1L<<i))
        return INT2FIX(1);
    return INT2FIX(0);
}

/*
 *  call-seq:
 *     fix.to_f -> float
 *
 *  Converts <i>fix</i> to a <code>Float</code>.
 *
 */

static VALUE
fix_to_f(VALUE num)
{
    double val;

    val = (double)FIX2LONG(num);

    return rb_float_new(val);
}

/*
 *  call-seq:
 *     fix.abs -> aFixnum
 *
 *  Returns the absolute value of <i>fix</i>.
 *
 *     -12345.abs   #=> 12345
 *     12345.abs    #=> 12345
 *
 */

static VALUE
fix_abs(VALUE fix)
{
    long i = FIX2LONG(fix);

    if (i < 0) i = -i;

    return LONG2NUM(i);
}

/*
 *  call-seq:
 *     fix.id2name -> string or nil
 *
 *  Returns the name of the object whose symbol id is <i>fix</i>. If
 *  there is no symbol in the symbol table with this value, returns
 *  <code>nil</code>. <code>id2name</code> has nothing to do with the
 *  <code>Object.id</code> method. See also <code>Fixnum#to_sym</code>,
 *  <code>String#intern</code>, and class <code>Symbol</code>.
 *
 *     symbol = :@inst_var    #=> :@inst_var
 *     id     = symbol.to_i   #=> 9818
 *     id.id2name             #=> "@inst_var"
 */

static VALUE
fix_id2name(VALUE fix)
{
    char *name = rb_id2name(FIX2UINT(fix));
    if (name) return rb_str_new2(name);
    return Qnil;
}

/*
 *  call-seq:
 *     fix.to_sym -> aSymbol
 *
 *  Returns the symbol whose integer value is <i>fix</i>. See also
 *  <code>Fixnum#id2name</code>.
 *
 *     fred = :fred.to_i
 *     fred.id2name   #=> "fred"
 *     fred.to_sym    #=> :fred
 */

static VALUE
fix_to_sym(VALUE fix)
{
    ID id = FIX2UINT(fix);

    if (rb_id2name(id)) {
        return ID2SYM(id);
    }
    return Qnil;
}

/*
 *  call-seq:
 *     fix.size -> fixnum
 *
 *  Returns the number of <em>bytes</em> in the machine representation
 *  of a <code>Fixnum</code>.
 *
 *     1.size            #=> 4
 *     -1.size           #=> 4
 *     2147483647.size   #=> 4
 */

static VALUE
fix_size(VALUE fix)
{
    return INT2FIX(sizeof(long));
}

/*
 *  call-seq:
 *     int.upto(limit) {|i| block }     => int
 *
 *  Iterates <em>block</em>, passing in integer values from <i>int</i>
 *  up to and including <i>limit</i>.
 *
 *     5.upto(10) { |i| print i, " " }
 *
 *  <em>produces:</em>
 *
 *     5 6 7 8 9 10
 */

static VALUE
int_upto(VALUE from, VALUE to)
{
    if (FIXNUM_P(from) && FIXNUM_P(to)) {
        long i, end;

        end = FIX2LONG(to);
        for (i = FIX2LONG(from); i <= end; i++) {
            rb_yield(LONG2FIX(i));
        }
    }
    else {
        VALUE i = from, c;

        while (!(c = rb_funcall(i, '>', 1, to))) {
            rb_yield(i);
            i = rb_funcall(i, '+', 1, INT2FIX(1));
        }
        if (NIL_P(c)) rb_cmperr(i, to);
    }
    return from;
}

/*
 *  call-seq:
 *     int.downto(limit) {|i| block }     => int
 *
 *  Iterates <em>block</em>, passing decreasing values from <i>int</i>
 *  down to and including <i>limit</i>.
 *
 *     5.downto(1) { |n| print n, ".. " }
 *     print "  Liftoff!\n"
 *
 *  <em>produces:</em>
 *
 *     5.. 4.. 3.. 2.. 1..   Liftoff!
 */

static VALUE
int_downto(VALUE from, VALUE to)
{
    if (FIXNUM_P(from) && FIXNUM_P(to)) {
        long i, end;

        end = FIX2LONG(to);
        for (i=FIX2LONG(from); i >= end; i--) {
            rb_yield(LONG2FIX(i));
        }
    }
    else {
        VALUE i = from, c;

        while (!(c = rb_funcall(i, '<', 1, to))) {
            rb_yield(i);
            i = rb_funcall(i, '-', 1, INT2FIX(1));
        }
        if (NIL_P(c)) rb_cmperr(i, to);
    }
    return from;
}

/*
 *  call-seq:
 *     int.times {|i| block }     => int
 *
 *  Iterates block <i>int</i> times, passing in values from zero to
 *  <i>int</i> - 1.
 *
 *     5.times do |i|
 *       print i, " "
 *     end
 *
 *  <em>produces:</em>
 *
 *     0 1 2 3 4
 */

static VALUE
int_dotimes(VALUE num)
{
    if (FIXNUM_P(num)) {
        long i, end;

        end = FIX2LONG(num);
        for (i=0; i<end; i++) {
            rb_yield(LONG2FIX(i));
        }
    }
    else {
        VALUE i = INT2FIX(0);

        for (;;) {
            if (!RTEST(rb_funcall(i, '<', 1, num))) break;
            rb_yield(i);
            i = rb_funcall(i, '+', 1, INT2FIX(1));
        }
    }
    return num;
}

/*
 *  call-seq:
 *     fix.zero?    => true or false
 *
 *  Returns <code>true</code> if <i>fix</i> is zero.
 *
 */

static VALUE
fix_zero_p(VALUE num)
{
    if (FIX2LONG(num) == 0) {
        return Qtrue;
    }
    return Qfalse;
}

void
Init_Numeric(void)
{
#if defined(__FreeBSD__) && __FreeBSD__ < 4
    /* allow divide by zero -- Inf */
    fpsetmask(fpgetmask() & ~(FP_X_DZ|FP_X_INV|FP_X_OFL));
#elif defined(_UNICOSMP)
    /* Turn off floating point exceptions for divide by zero, etc. */
    _set_Creg(0, 0);
#elif defined(__BORLANDC__)
    /* Turn off floating point exceptions for overflow, etc. */
    _control87(MCW_EM, MCW_EM);
#endif
    id_coerce = rb_intern("coerce");
    id_to_i = rb_intern("to_i");
    id_eq = rb_intern("==");

    rb_eZeroDivError = rb_define_class("ZeroDivisionError", rb_eStandardError);
    rb_eFloatDomainError = rb_define_class("FloatDomainError", rb_eRangeError);
    rb_cNumeric = rb_define_class("Numeric", rb_cObject);

    rb_define_method(rb_cNumeric, "singleton_method_added", num_sadded, 1);
    rb_include_module(rb_cNumeric, rb_mComparable);
    rb_define_method(rb_cNumeric, "initialize_copy", num_init_copy, 1);
    rb_define_method(rb_cNumeric, "coerce", num_coerce, 1);

    rb_define_method(rb_cNumeric, "+@", num_uplus, 0);
    rb_define_method(rb_cNumeric, "-@", num_uminus, 0);
    rb_define_method(rb_cNumeric, "<=>", num_cmp, 1);
    rb_define_method(rb_cNumeric, "eql?", num_eql, 1);
    rb_define_method(rb_cNumeric, "quo", num_quo, 1);
    rb_define_method(rb_cNumeric, "div", num_div, 1);
    rb_define_method(rb_cNumeric, "divmod", num_divmod, 1);
    rb_define_method(rb_cNumeric, "modulo", num_modulo, 1);
    rb_define_method(rb_cNumeric, "remainder", num_remainder, 1);
    rb_define_method(rb_cNumeric, "abs", num_abs, 0);
    rb_define_method(rb_cNumeric, "to_int", num_to_int, 0);

    rb_define_method(rb_cNumeric, "scalar?", num_scalar_p, 0);
    rb_define_method(rb_cNumeric, "integer?", num_int_p, 0);
    rb_define_method(rb_cNumeric, "zero?", num_zero_p, 0);
    rb_define_method(rb_cNumeric, "nonzero?", num_nonzero_p, 0);

    rb_define_method(rb_cNumeric, "floor", num_floor, 0);
    rb_define_method(rb_cNumeric, "ceil", num_ceil, 0);
    rb_define_method(rb_cNumeric, "round", num_round, 0);
    rb_define_method(rb_cNumeric, "truncate", num_truncate, 0);
    rb_define_method(rb_cNumeric, "step", num_step, -1);

    rb_cInteger = rb_define_class("Integer", rb_cNumeric);
    rb_undef_alloc_func(rb_cInteger);
    rb_undef_method(CLASS_OF(rb_cInteger), "new");

    rb_define_method(rb_cInteger, "integer?", int_int_p, 0);
    rb_define_method(rb_cInteger, "upto", int_upto, 1);
    rb_define_method(rb_cInteger, "downto", int_downto, 1);
    rb_define_method(rb_cInteger, "times", int_dotimes, 0);
    rb_include_module(rb_cInteger, rb_mPrecision);
    rb_define_method(rb_cInteger, "succ", int_succ, 0);
    rb_define_method(rb_cInteger, "next", int_succ, 0);
    rb_define_method(rb_cInteger, "chr", int_chr, 0);
    rb_define_method(rb_cInteger, "to_i", int_to_i, 0);
    rb_define_method(rb_cInteger, "to_int", int_to_i, 0);
    rb_define_method(rb_cInteger, "floor", int_to_i, 0);
    rb_define_method(rb_cInteger, "ceil", int_to_i, 0);
    rb_define_method(rb_cInteger, "round", int_to_i, 0);
    rb_define_method(rb_cInteger, "truncate", int_to_i, 0);

    rb_cFixnum = rb_define_class("Fixnum", rb_cInteger);
    rb_include_module(rb_cFixnum, rb_mPrecision);
    rb_define_singleton_method(rb_cFixnum, "induced_from", rb_fix_induced_from, 1);
    rb_define_singleton_method(rb_cInteger, "induced_from", rb_int_induced_from, 1);

    rb_define_method(rb_cFixnum, "to_s", fix_to_s, -1);

    rb_define_method(rb_cFixnum, "id2name", fix_id2name, 0);
    rb_define_method(rb_cFixnum, "to_sym", fix_to_sym, 0);

    rb_define_method(rb_cFixnum, "-@", fix_uminus, 0);
    rb_define_method(rb_cFixnum, "+", fix_plus, 1);
    rb_define_method(rb_cFixnum, "-", fix_minus, 1);
    rb_define_method(rb_cFixnum, "*", fix_mul, 1);
    rb_define_method(rb_cFixnum, "/", fix_div, 1);
    rb_define_method(rb_cFixnum, "div", fix_idiv, 1);
    rb_define_method(rb_cFixnum, "%", fix_mod, 1);
    rb_define_method(rb_cFixnum, "modulo", fix_mod, 1);
    rb_define_method(rb_cFixnum, "divmod", fix_divmod, 1);
    rb_define_method(rb_cFixnum, "quo", fix_quo, 1);
    rb_define_method(rb_cFixnum, "**", fix_pow, 1);

    rb_define_method(rb_cFixnum, "abs", fix_abs, 0);

    rb_define_method(rb_cFixnum, "==", fix_equal, 1);
    rb_define_method(rb_cFixnum, "<=>", fix_cmp, 1);
    rb_define_method(rb_cFixnum, ">",  fix_gt, 1);
    rb_define_method(rb_cFixnum, ">=", fix_ge, 1);
    rb_define_method(rb_cFixnum, "<",  fix_lt, 1);
    rb_define_method(rb_cFixnum, "<=", fix_le, 1);

    rb_define_method(rb_cFixnum, "~", fix_rev, 0);
    rb_define_method(rb_cFixnum, "&", fix_and, 1);
    rb_define_method(rb_cFixnum, "|", fix_or,  1);
    rb_define_method(rb_cFixnum, "^", fix_xor, 1);
    rb_define_method(rb_cFixnum, "[]", fix_aref, 1);

    rb_define_method(rb_cFixnum, "<<", fix_lshift, 1);
    rb_define_method(rb_cFixnum, ">>", fix_rshift, 1);

    rb_define_method(rb_cFixnum, "to_f", fix_to_f, 0);
    rb_define_method(rb_cFixnum, "size", fix_size, 0);
    rb_define_method(rb_cFixnum, "zero?", fix_zero_p, 0);

    rb_cFloat  = rb_define_class("Float", rb_cNumeric);

    rb_undef_alloc_func(rb_cFloat);
    rb_undef_method(CLASS_OF(rb_cFloat), "new");

    rb_define_singleton_method(rb_cFloat, "induced_from", rb_flo_induced_from, 1);
    rb_include_module(rb_cFloat, rb_mPrecision);

    rb_define_const(rb_cFloat, "ROUNDS", INT2FIX(FLT_ROUNDS));
    rb_define_const(rb_cFloat, "RADIX", INT2FIX(FLT_RADIX));
    rb_define_const(rb_cFloat, "MANT_DIG", INT2FIX(DBL_MANT_DIG));
    rb_define_const(rb_cFloat, "DIG", INT2FIX(DBL_DIG));
    rb_define_const(rb_cFloat, "MIN_EXP", INT2FIX(DBL_MIN_EXP));
    rb_define_const(rb_cFloat, "MAX_EXP", INT2FIX(DBL_MAX_EXP));
    rb_define_const(rb_cFloat, "MIN_10_EXP", INT2FIX(DBL_MIN_10_EXP));
    rb_define_const(rb_cFloat, "MAX_10_EXP", INT2FIX(DBL_MAX_10_EXP));
    rb_define_const(rb_cFloat, "MIN", rb_float_new(DBL_MIN));
    rb_define_const(rb_cFloat, "MAX", rb_float_new(DBL_MAX));
    rb_define_const(rb_cFloat, "EPSILON", rb_float_new(DBL_EPSILON));

    rb_define_method(rb_cFloat, "to_s", flo_to_s, 0);
    rb_define_method(rb_cFloat, "coerce", flo_coerce, 1);
    rb_define_method(rb_cFloat, "-@", flo_uminus, 0);
    rb_define_method(rb_cFloat, "+", flo_plus, 1);
    rb_define_method(rb_cFloat, "-", flo_minus, 1);
    rb_define_method(rb_cFloat, "*", flo_mul, 1);
    rb_define_method(rb_cFloat, "/", flo_div, 1);
    rb_define_method(rb_cFloat, "%", flo_mod, 1);
    rb_define_method(rb_cFloat, "modulo", flo_mod, 1);
    rb_define_method(rb_cFloat, "divmod", flo_divmod, 1);
    rb_define_method(rb_cFloat, "**", flo_pow, 1);
    rb_define_method(rb_cFloat, "==", flo_eq, 1);
    rb_define_method(rb_cFloat, "<=>", flo_cmp, 1);
    rb_define_method(rb_cFloat, ">",  flo_gt, 1);
    rb_define_method(rb_cFloat, ">=", flo_ge, 1);
    rb_define_method(rb_cFloat, "<",  flo_lt, 1);
    rb_define_method(rb_cFloat, "<=", flo_le, 1);
    rb_define_method(rb_cFloat, "eql?", flo_eql, 1);
    rb_define_method(rb_cFloat, "hash", flo_hash, 0);
    rb_define_method(rb_cFloat, "to_f", flo_to_f, 0);
    rb_define_method(rb_cFloat, "abs", flo_abs, 0);
    rb_define_method(rb_cFloat, "zero?", flo_zero_p, 0);

    rb_define_method(rb_cFloat, "to_i", flo_truncate, 0);
    rb_define_method(rb_cFloat, "to_int", flo_truncate, 0);
    rb_define_method(rb_cFloat, "floor", flo_floor, 0);
    rb_define_method(rb_cFloat, "ceil", flo_ceil, 0);
    rb_define_method(rb_cFloat, "round", flo_round, 0);
    rb_define_method(rb_cFloat, "truncate", flo_truncate, 0);

    rb_define_method(rb_cFloat, "nan?",      flo_is_nan_p, 0);
    rb_define_method(rb_cFloat, "infinite?", flo_is_infinite_p, 0);
    rb_define_method(rb_cFloat, "finite?",   flo_is_finite_p, 0);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


object.c

root/object.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. rb_equal
  2. rb_eql
  3. rb_obj_equal
  4. rb_obj_id
  5. rb_class_real
  6. rb_obj_class
  7. init_copy
  8. rb_obj_clone
  9. rb_obj_dup
  10. rb_obj_init_copy
  11. rb_any_to_s
  12. rb_inspect
  13. inspect_i
  14. inspect_obj
  15. rb_obj_inspect
  16. rb_obj_is_instance_of
  17. rb_obj_is_kind_of
  18. rb_obj_dummy
  19. rb_obj_tainted
  20. rb_obj_taint
  21. rb_obj_untaint
  22. rb_obj_infect
  23. rb_obj_freeze
  24. rb_obj_frozen_p
  25. nil_to_i
  26. nil_to_f
  27. nil_to_s
  28. nil_to_a
  29. nil_inspect
  30. nil_plus
  31. main_to_s
  32. true_to_s
  33. true_and
  34. true_or
  35. true_xor
  36. false_to_s
  37. false_and
  38. false_or
  39. false_xor
  40. rb_true
  41. rb_false
  42. rb_obj_pattern_match
  43. sym_to_i
  44. sym_inspect
  45. sym_to_s
  46. sym_to_sym
  47. rb_mod_to_s
  48. rb_mod_freeze
  49. rb_mod_eqq
  50. rb_class_inherited_p
  51. rb_mod_lt
  52. rb_mod_ge
  53. rb_mod_gt
  54. rb_mod_cmp
  55. rb_module_s_alloc
  56. rb_class_s_alloc
  57. rb_mod_initialize
  58. rb_class_initialize
  59. rb_obj_alloc
  60. rb_class_allocate_instance
  61. rb_class_new_instance
  62. rb_class_superclass
  63. str_to_id
  64. rb_to_id
  65. rb_mod_attr
  66. rb_mod_attr_reader
  67. rb_mod_attr_writer
  68. rb_mod_attr_accessor
  69. rb_mod_const_get
  70. rb_mod_const_set
  71. rb_mod_const_defined
  72. rb_obj_methods
  73. rb_obj_protected_methods
  74. rb_obj_private_methods
  75. rb_obj_public_methods
  76. rb_obj_ivar_get
  77. rb_obj_ivar_set
  78. rb_mod_cvar_get
  79. rb_mod_cvar_set
  80. convert_type
  81. rb_convert_type
  82. rb_check_convert_type
  83. rb_to_integer
  84. rb_check_to_integer
  85. rb_to_int
  86. rb_Integer
  87. rb_f_integer
  88. rb_cstr_to_dbl
  89. rb_str_to_dbl
  90. rb_Float
  91. rb_f_float
  92. rb_num2dbl
  93. rb_str2cstr
  94. rb_String
  95. rb_f_string
  96. rb_Array
  97. rb_f_array
  98. boot_defclass
  99. Init_Object
/**********************************************************************

  object.c -

  $Author: akr $
  $Date: 2005/12/12 03:04:53 $
  created at: Thu Jul 15 12:01:24 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto
  Copyright (C) 2000  Network Applied Communication Laboratory, Inc.
  Copyright (C) 2000  Information-technology Promotion Agency, Japan

**********************************************************************/

#include "ruby.h"
#include "st.h"
#include "util.h"
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
#include <math.h>

VALUE rb_mKernel;
VALUE rb_cObject;
VALUE rb_cModule;
VALUE rb_cClass;
VALUE rb_cData;

VALUE rb_cNilClass;
VALUE rb_cTrueClass;
VALUE rb_cFalseClass;
VALUE rb_cSymbol;

static ID id_eq, id_eql, id_inspect, id_init_copy;

/*
 *  call-seq:
 *     obj === other   => true or false
 *
 *  Case Equality---For class <code>Object</code>, effectively the same
 *  as calling  <code>#==</code>, but typically overridden by descendents
 *  to provide meaningful semantics in <code>case</code> statements.
 */

VALUE
rb_equal(VALUE obj1, VALUE obj2)
{
    VALUE result;

    if (obj1 == obj2) return Qtrue;
    result = rb_funcall(obj1, id_eq, 1, obj2);
    if (RTEST(result)) return Qtrue;
    return Qfalse;
}

int
rb_eql(VALUE obj1, VALUE obj2)
{
    return RTEST(rb_funcall(obj1, id_eql, 1, obj2));
}

/*
 *  call-seq:
 *     obj == other        => true or false
 *     obj.equal?(other)   => true or false
 *     obj.eql?(other)     => true or false
 *
 *  Equality---At the <code>Object</code> level, <code>==</code> returns
 *  <code>true</code> only if <i>obj</i> and <i>other</i> are the
 *  same object. Typically, this method is overridden in descendent
 *  classes to provide class-specific meaning.
 *
 *  Unlike <code>==</code>, the <code>equal?</code> method should never be
 *  overridden by subclasses: it is used to determine object identity
 *  (that is, <code>a.equal?(b)</code> iff <code>a</code> is the same
 *  object as <code>b</code>).
 *
 *  The <code>eql?</code> method returns <code>true</code> if
    <i>obj</i> and <i>anObject</i> have the
 *  same value. Used by <code>Hash</code> to test members for equality.
 *  For objects of class <code>Object</code>, <code>eql?</code> is
 *  synonymous with <code>==</code>. Subclasses normally continue this
 *  tradition, but there are exceptions. <code>Numeric</code> types, for
 *  example, perform type conversion across <code>==</code>, but not
 *  across <code>eql?</code>, so:
 *
 *     1 == 1.0     #=> true
 *     1.eql? 1.0   #=> false
 */

static VALUE
rb_obj_equal(VALUE obj1, VALUE obj2)
{
    if (obj1 == obj2) return Qtrue;
    return Qfalse;
}

/*
 *  Document-method: __id__
 *  Document-method: object_id
 *
 *  call-seq:
 *     obj.__id__       => fixnum
 *     obj.object_id    => fixnum
 *
 *  Returns an integer identifier for <i>obj</i>. The same number will
 *  be returned on all calls to <code>id</code> for a given object, and
 *  no two active objects will share an id.
 *  <code>Object#object_id</code> is a different concept from the
 *  <code>:name</code> notation, which returns the symbol id of
 *  <code>name</code>. Replaces the deprecated <code>Object#id</code>.
 */

/*
 *  call-seq:
 *     obj.hash    => fixnum
 *
 *  Generates a <code>Fixnum</code> hash value for this object. This
 *  function must have the property that <code>a.eql?(b)</code> implies
 *  <code>a.hash == b.hash</code>. The hash value is used by class
 *  <code>Hash</code>. Any hash value that exceeds the capacity of a
 *  <code>Fixnum</code> will be truncated before being used.
 */

VALUE
rb_obj_id(VALUE obj)
{
    if (SPECIAL_CONST_P(obj)) {
        return LONG2NUM((long)obj);
    }
    return (VALUE)((long)obj|FIXNUM_FLAG);
}

VALUE
rb_class_real(VALUE cl)
{
    while (FL_TEST(cl, FL_SINGLETON) || TYPE(cl) == T_ICLASS) {
        cl = RCLASS(cl)->super;
    }
    return cl;
}

/*
 *  call-seq:
 *     obj.class    => class
 *
 *  Returns the class of <i>obj</i>, now preferred over
 *  <code>Object#type</code>, as an object's type in Ruby is only
 *  loosely tied to that object's class. This method must always be
 *  called with an explicit receiver, as <code>class</code> is also a
 *  reserved word in Ruby.
 *
 *     1.class      #=> Fixnum
 *     self.class   #=> Object
 */

VALUE
rb_obj_class(VALUE obj)
{
    return rb_class_real(CLASS_OF(obj));
}

static void
init_copy(VALUE dest, VALUE obj)
{
    if (OBJ_FROZEN(dest)) {
        rb_raise(rb_eTypeError, "[bug] frozen object (%s) allocated", rb_obj_classname(dest));
    }
    RBASIC(dest)->flags &= ~(T_MASK|FL_EXIVAR);
    RBASIC(dest)->flags |= RBASIC(obj)->flags & (T_MASK|FL_EXIVAR|FL_TAINT);
    rb_copy_generic_ivar(dest, obj);
    rb_gc_copy_finalizer(dest, obj);
    switch (TYPE(obj)) {
      case T_OBJECT:
      case T_CLASS:
      case T_MODULE:
        if (ROBJECT(dest)->iv_tbl) {
            st_free_table(ROBJECT(dest)->iv_tbl);
            ROBJECT(dest)->iv_tbl = 0;
        }
        if (ROBJECT(obj)->iv_tbl) {
            ROBJECT(dest)->iv_tbl = st_copy(ROBJECT(obj)->iv_tbl);
        }
    }
    rb_funcall(dest, id_init_copy, 1, obj);
}

/*
 *  call-seq:
 *     obj.clone -> an_object
 *
 *  Produces a shallow copy of <i>obj</i>---the instance variables of
 *  <i>obj</i> are copied, but not the objects they reference. Copies
 *  the frozen and tainted state of <i>obj</i>. See also the discussion
 *  under <code>Object#dup</code>.
 *
 *     class Klass
 *        attr_accessor :str
 *     end
 *     s1 = Klass.new      #=> #<Klass:0x401b3a38>
 *     s1.str = "Hello"    #=> "Hello"
 *     s2 = s1.clone       #=> #<Klass:0x401b3998 @str="Hello">
 *     s2.str[1,4] = "i"   #=> "i"
 *     s1.inspect          #=> "#<Klass:0x401b3a38 @str=\"Hi\">"
 *     s2.inspect          #=> "#<Klass:0x401b3998 @str=\"Hi\">"
 *
 *  This method may have class-specific behavior.  If so, that
 *  behavior will be documented under the #+initialize_copy+ method of
 *  the class.
 */

VALUE
rb_obj_clone(VALUE obj)
{
    VALUE clone;

    if (rb_special_const_p(obj)) {
        rb_raise(rb_eTypeError, "can't clone %s", rb_obj_classname(obj));
    }
    clone = rb_obj_alloc(rb_obj_class(obj));
    RBASIC(clone)->klass = rb_singleton_class_clone(obj);
    RBASIC(clone)->flags = (RBASIC(obj)->flags | FL_TEST(clone, FL_TAINT)) & ~(FL_FREEZE|FL_FINALIZE);
    init_copy(clone, obj);
    RBASIC(clone)->flags |= RBASIC(obj)->flags & FL_FREEZE;

    return clone;
}

/*
 *  call-seq:
 *     obj.dup -> an_object
 *
 *  Produces a shallow copy of <i>obj</i>---the instance variables of
 *  <i>obj</i> are copied, but not the objects they reference.
 *  <code>dup</code> copies the tainted state of <i>obj</i>. See also
 *  the discussion under <code>Object#clone</code>. In general,
 *  <code>clone</code> and <code>dup</code> may have different semantics
 *  in descendent classes. While <code>clone</code> is used to duplicate
 *  an object, including its internal state, <code>dup</code> typically
 *  uses the class of the descendent object to create the new instance.
 *
 *  This method may have class-specific behavior.  If so, that
 *  behavior will be documented under the #+initialize_copy+ method of
 *  the class.
 */

VALUE
rb_obj_dup(VALUE obj)
{
    VALUE dup;

    if (rb_special_const_p(obj)) {
        rb_raise(rb_eTypeError, "can't dup %s", rb_obj_classname(obj));
    }
    dup = rb_obj_alloc(rb_obj_class(obj));
    init_copy(dup, obj);

    return dup;
}

/* :nodoc: */
VALUE
rb_obj_init_copy(VALUE obj, VALUE orig)
{
    if (obj == orig) return obj;
    rb_check_frozen(obj);
    if (TYPE(obj) != TYPE(orig) || rb_obj_class(obj) != rb_obj_class(orig)) {
        rb_raise(rb_eTypeError, "initialize_copy should take same class object");
    }
    return obj;
}

/*
 *  call-seq:
 *     obj.to_s    => string
 *
 *  Returns a string representing <i>obj</i>. The default
 *  <code>to_s</code> prints the object's class and an encoding of the
 *  object id. As a special case, the top-level object that is the
 *  initial execution context of Ruby programs returns ``main.''
 */

VALUE
rb_any_to_s(VALUE obj)
{
    char *cname = rb_obj_classname(obj);
    VALUE str;

    str = rb_sprintf("#<%s:%p>", cname, obj);
    if (OBJ_TAINTED(obj)) OBJ_TAINT(str);

    return str;
}

VALUE
rb_inspect(VALUE obj)
{
    return rb_obj_as_string(rb_funcall(obj, id_inspect, 0, 0));
}

static int
inspect_i(ID id, VALUE value, VALUE str)
{
    VALUE str2;
    char *ivname;

    /* need not to show internal data */
    if (CLASS_OF(value) == 0) return ST_CONTINUE;
    if (!rb_is_instance_id(id)) return ST_CONTINUE;
    if (RSTRING(str)->ptr[0] == '-') { /* first element */
        RSTRING(str)->ptr[0] = '#';
        rb_str_cat2(str, " ");
    }
    else {
        rb_str_cat2(str, ", ");
    }
    ivname = rb_id2name(id);
    rb_str_cat2(str, ivname);
    rb_str_cat2(str, "=");
    str2 = rb_inspect(value);
    rb_str_append(str, str2);
    OBJ_INFECT(str, str2);

    return ST_CONTINUE;
}

static VALUE
inspect_obj(VALUE obj, VALUE str, int recur)
{
    if (recur) {
        rb_str_cat2(str, " ...");
    }
    else {
        st_foreach_safe(ROBJECT(obj)->iv_tbl, inspect_i, str);
    }
    rb_str_cat2(str, ">");
    RSTRING(str)->ptr[0] = '#';
    OBJ_INFECT(str, obj);

    return str;
}

/*
 *  call-seq:
 *     obj.inspect   => string
 *
 *  Returns a string containing a human-readable representation of
 *  <i>obj</i>. If not overridden, uses the <code>to_s</code> method to
 *  generate the string.
 *
 *     [ 1, 2, 3..4, 'five' ].inspect   #=> "[1, 2, 3..4, \"five\"]"
 *     Time.new.inspect                 #=> "Wed Apr 09 08:54:39 CDT 2003"
 */

static VALUE
rb_obj_inspect(VALUE obj)
{
    if (TYPE(obj) == T_OBJECT
        && ROBJECT(obj)->iv_tbl
        && ROBJECT(obj)->iv_tbl->num_entries > 0) {
        VALUE str;
        char *c;

        c = rb_obj_classname(obj);
        str = rb_sprintf("-<%s:%p", c, obj);
        return rb_exec_recursive(inspect_obj, obj, str);
    }
    return rb_funcall(obj, rb_intern("to_s"), 0, 0);
}

/*
 *  call-seq:
 *     obj.instance_of?(class)    => true or false
 *
 *  Returns <code>true</code> if <i>obj</i> is an instance of the given
 *  class. See also <code>Object#kind_of?</code>.
 */

VALUE
rb_obj_is_instance_of(VALUE obj, VALUE c)
{
    switch (TYPE(c)) {
      case T_MODULE:
      case T_CLASS:
      case T_ICLASS:
        break;
      default:
        rb_raise(rb_eTypeError, "class or module required");
    }

    if (rb_obj_class(obj) == c) return Qtrue;
    return Qfalse;
}

/*
 *  call-seq:
 *     obj.is_a?(class)       => true or false
 *     obj.kind_of?(class)    => true or false
 *
 *  Returns <code>true</code> if <i>class</i> is the class of
 *  <i>obj</i>, or if <i>class</i> is one of the superclasses of
 *  <i>obj</i> or modules included in <i>obj</i>.
 *
 *     module M;    end
 *     class A
 *       include M
 *     end
 *     class B < A; end
 *     class C < B; end
 *     b = B.new
 *     b.instance_of? A   #=> false
 *     b.instance_of? B   #=> true
 *     b.instance_of? C   #=> false
 *     b.instance_of? M   #=> false
 *     b.kind_of? A       #=> true
 *     b.kind_of? B       #=> true
 *     b.kind_of? C       #=> false
 *     b.kind_of? M       #=> true
 */

VALUE
rb_obj_is_kind_of(VALUE obj, VALUE c)
{
    VALUE cl = CLASS_OF(obj);

    switch (TYPE(c)) {
      case T_MODULE:
      case T_CLASS:
      case T_ICLASS:
        break;

      default:
        rb_raise(rb_eTypeError, "class or module required");
    }

    while (cl) {
        if (cl == c || RCLASS(cl)->m_tbl == RCLASS(c)->m_tbl)
            return Qtrue;
        cl = RCLASS(cl)->super;
    }
    return Qfalse;
}

/*
 * Document-method: singleton_method_added
 *
 *  call-seq:
 *     singleton_method_added(symbol)
 *
 *  Invoked as a callback whenever a singleton method is added to the
 *  receiver.
 *
 *     module Chatty
 *       def Chatty.singleton_method_added(id)
 *         puts "Adding #{id.id2name}"
 *       end
 *       def self.one()     end
 *       def two()          end
 *       def Chatty.three() end
 *     end
 *
 *  <em>produces:</em>
 *
 *     Adding singleton_method_added
 *     Adding one
 *     Adding three
 *
 */

/*
 * Document-method: singleton_method_removed
 *
 *  call-seq:
 *     singleton_method_removed(symbol)
 *
 *  Invoked as a callback whenever a singleton method is removed from
 *  the receiver.
 *
 *     module Chatty
 *       def Chatty.singleton_method_removed(id)
 *         puts "Removing #{id.id2name}"
 *       end
 *       def self.one()     end
 *       def two()          end
 *       def Chatty.three() end
 *       class <<self
 *         remove_method :three
 *         remove_method :one
 *       end
 *     end
 *
 *  <em>produces:</em>
 *
 *     Removing three
 *     Removing one
 */

/*
 * Document-method: singleton_method_undefined
 *
 *  call-seq:
 *     singleton_method_undefined(symbol)
 *
 *  Invoked as a callback whenever a singleton method is undefined in
 *  the receiver.
 *
 *     module Chatty
 *       def Chatty.singleton_method_undefined(id)
 *         puts "Undefining #{id.id2name}"
 *       end
 *       def Chatty.one()   end
 *       class << self
 *          undef_method(:one)
 *       end
 *     end
 *
 *  <em>produces:</em>
 *
 *     Undefining one
 */

/*
 * Document-method: included
 *
 * call-seq:
 *    included( othermod )
 *
 * Callback invoked whenever the receiver is included in another
 * module or class. This should be used in preference to
 * <tt>Module.append_features</tt> if your code wants to perform some
 * action when a module is included in another.
 *
 *        module A
 *          def A.included(mod)
 *            puts "#{self} included in #{mod}"
 *          end
 *        end
 *        module Enumerable
 *          include A
 *        end
 */

/*
 * Not documented
 */

static VALUE
rb_obj_dummy(void)
{
    return Qnil;
}

/*
 *  call-seq:
 *     obj.tainted?    => true or false
 *
 *  Returns <code>true</code> if the object is tainted.
 */

VALUE
rb_obj_tainted(VALUE obj)
{
    if (OBJ_TAINTED(obj))
        return Qtrue;
    return Qfalse;
}

/*
 *  call-seq:
 *     obj.taint -> obj
 *
 *  Marks <i>obj</i> as tainted---if the <code>$SAFE</code> level is
 *  set appropriately, many method calls which might alter the running
 *  programs environment will refuse to accept tainted strings.
 */

VALUE
rb_obj_taint(VALUE obj)
{
    rb_secure(4);
    if (!OBJ_TAINTED(obj)) {
        if (OBJ_FROZEN(obj)) {
            rb_error_frozen("object");
        }
        OBJ_TAINT(obj);
    }
    return obj;
}

/*
 *  call-seq:
 *     obj.untaint    => obj
 *
 *  Removes the taint from <i>obj</i>.
 */

VALUE
rb_obj_untaint(VALUE obj)
{
    rb_secure(3);
    if (OBJ_TAINTED(obj)) {
        if (OBJ_FROZEN(obj)) {
            rb_error_frozen("object");
        }
        FL_UNSET(obj, FL_TAINT);
    }
    return obj;
}

void
rb_obj_infect(VALUE obj1, VALUE obj2)
{
    OBJ_INFECT(obj1, obj2);
}

/*
 *  call-seq:
 *     obj.freeze    => obj
 *
 *  Prevents further modifications to <i>obj</i>. A
 *  <code>TypeError</code> will be raised if modification is attempted.
 *  There is no way to unfreeze a frozen object. See also
 *  <code>Object#frozen?</code>.
 *
 *     a = [ "a", "b", "c" ]
 *     a.freeze
 *     a << "z"
 *
 *  <em>produces:</em>
 *
 *     prog.rb:3:in `<<': can't modify frozen array (TypeError)
 *      from prog.rb:3
 */

VALUE
rb_obj_freeze(VALUE obj)
{
    if (!OBJ_FROZEN(obj)) {
        if (rb_safe_level() >= 4 && !OBJ_TAINTED(obj)) {
            rb_raise(rb_eSecurityError, "Insecure: can't freeze object");
        }
        OBJ_FREEZE(obj);
    }
    return obj;
}

/*
 *  call-seq:
 *     obj.frozen?    => true or false
 *
 *  Returns the freeze status of <i>obj</i>.
 *
 *     a = [ "a", "b", "c" ]
 *     a.freeze    #=> ["a", "b", "c"]
 *     a.frozen?   #=> true
 */

static VALUE
rb_obj_frozen_p(VALUE obj)
{
    if (OBJ_FROZEN(obj)) return Qtrue;
    return Qfalse;
}

/*
 * Document-class: NilClass
 *
 *  The class of the singleton object <code>nil</code>.
 */

/*
 *  call-seq:
 *     nil.to_i => 0
 *
 *  Always returns zero.
 *
 *     nil.to_i   #=> 0
 */

static VALUE
nil_to_i(VALUE obj)
{
    return INT2FIX(0);
}

/*
 *  call-seq:
 *     nil.to_f    => 0.0
 *
 *  Always returns zero.
 *
 *     nil.to_f   #=> 0.0
 */

static VALUE
nil_to_f(VALUE obj)
{
    return rb_float_new(0.0);
}

/*
 *  call-seq:
 *     nil.to_s    => ""
 *
 *  Always returns the empty string.
 *
 *     nil.to_s   #=> ""
 */

static VALUE
nil_to_s(VALUE obj)
{
    return rb_str_new2("");
}

/*
 *  call-seq:
 *     nil.to_a    => []
 *
 *  Always returns an empty array.
 *
 *     nil.to_a   #=> []
 */

static VALUE
nil_to_a(obj)
    VALUE obj;
{
    return rb_ary_new2(0);
}

/*
 *  call-seq:
 *    nil.inspect  => "nil"
 *
 *  Always returns the string "nil".
 */

static VALUE
nil_inspect(VALUE obj)
{
    return rb_str_new2("nil");
}

#ifdef NIL_PLUS
static VALUE
nil_plus(x, y)
    VALUE x, y;
{
    switch (TYPE(y)) {
      case T_NIL:
      case T_FIXNUM:
      case T_FLOAT:
      case T_BIGNUM:
      case T_STRING:
      case T_ARRAY:
        return y;
      default:
        rb_raise(rb_eTypeError, "tried to add %s(%s) to nil",
                 RSTRING(rb_inspect(y))->ptr,
                 rb_obj_classname(y));
    }
    /* not reached */
}
#endif

static VALUE
main_to_s(VALUE obj)
{
    return rb_str_new2("main");
}

/***********************************************************************
 *  Document-class: TrueClass
 *
 *  The global value <code>true</code> is the only instance of class
 *  <code>TrueClass</code> and represents a logically true value in
 *  boolean expressions. The class provides operators allowing
 *  <code>true</code> to be used in logical expressions.
 */

/*
 * call-seq:
 *   true.to_s   =>  "true"
 *
 * The string representation of <code>true</code> is "true".
 */

static VALUE
true_to_s(VALUE obj)
{
    return rb_str_new2("true");
}

/*
 *  call-seq:
 *     true & obj    => true or false
 *
 *  And---Returns <code>false</code> if <i>obj</i> is
 *  <code>nil</code> or <code>false</code>, <code>true</code> otherwise.
 */

static VALUE
true_and(VALUE obj, VALUE obj2)
{
    return RTEST(obj2)?Qtrue:Qfalse;
}

/*
 *  call-seq:
 *     true | obj   => true
 *
 *  Or---Returns <code>true</code>. As <i>anObject</i> is an argument to
 *  a method call, it is always evaluated; there is no short-circuit
 *  evaluation in this case.
 *
 *     true |  puts("or")
 *     true || puts("logical or")
 *
 *  <em>produces:</em>
 *
 *     or
 */

static VALUE
true_or(VALUE obj, VALUE obj2)
{
    return Qtrue;
}

/*
 *  call-seq:
 *     true ^ obj   => !obj
 *
 *  Exclusive Or---Returns <code>true</code> if <i>obj</i> is
 *  <code>nil</code> or <code>false</code>, <code>false</code>
 *  otherwise.
 */

static VALUE
true_xor(VALUE obj, VALUE obj2)
{
    return RTEST(obj2)?Qfalse:Qtrue;
}

/*
 *  Document-class: FalseClass
 *
 *  The global value <code>false</code> is the only instance of class
 *  <code>FalseClass</code> and represents a logically false value in
 *  boolean expressions. The class provides operators allowing
 *  <code>false</code> to participate correctly in logical expressions.
 *
 */

/*
 * call-seq:
 *   false.to_s   =>  "false"
 *
 * 'nuf said...
 */

static VALUE
false_to_s(VALUE obj)
{
    return rb_str_new2("false");
}

/*
 *  call-seq:
 *     false & obj   => false
 *     nil & obj     => false
 *
 *  And---Returns <code>false</code>. <i>obj</i> is always
 *  evaluated as it is the argument to a method call---there is no
 *  short-circuit evaluation in this case.
 */

static VALUE
false_and(VALUE obj, VALUE obj2)
{
    return Qfalse;
}

/*
 *  call-seq:
 *     false | obj   =>   true or false
 *     nil   | obj   =>   true or false
 *
 *  Or---Returns <code>false</code> if <i>obj</i> is
 *  <code>nil</code> or <code>false</code>; <code>true</code> otherwise.
 */

static VALUE
false_or(VALUE obj, VALUE obj2)
{
    return RTEST(obj2)?Qtrue:Qfalse;
}

/*
 *  call-seq:
 *     false ^ obj    => true or false
 *     nil   ^ obj    => true or false
 *
 *  Exclusive Or---If <i>obj</i> is <code>nil</code> or
 *  <code>false</code>, returns <code>false</code>; otherwise, returns
 *  <code>true</code>.
 *
 */

static VALUE
false_xor(VALUE obj, VALUE obj2)
{
    return RTEST(obj2)?Qtrue:Qfalse;
}

/*
 * call_seq:
 *   nil.nil?               => true
 *
 * Only the object <i>nil</i> responds <code>true</code> to <code>nil?</code>.
 */

static VALUE
rb_true(VALUE obj)
{
    return Qtrue;
}

/*
 * call_seq:
 *   nil.nil?               => true
 *   <anything_else>.nil?   => false
 *
 * Only the object <i>nil</i> responds <code>true</code> to <code>nil?</code>.
 */

static VALUE
rb_false(VALUE obj)
{
    return Qfalse;
}

/*
 *  call-seq:
 *     obj =~ other  => nil
 *
 *  Pattern Match---Overridden by descendents (notably
 *  <code>Regexp</code> and <code>String</code>) to provide meaningful
 *  pattern-match semantics.
 */

static VALUE
rb_obj_pattern_match(VALUE obj1, VALUE obj2)
{
    return Qnil;
}

/**********************************************************************
 * Document-class: Symbol
 *
 *  <code>Symbol</code> objects represent names and some strings
 *  inside the Ruby
 *  interpreter. They are generated using the <code>:name</code> and
 *  <code>:"string"</code> literals
 *  syntax, and by the various <code>to_sym</code> methods. The same
 *  <code>Symbol</code> object will be created for a given name or string
 *  for the duration of a program's execution, regardless of the context
 *  or meaning of that name. Thus if <code>Fred</code> is a constant in
 *  one context, a method in another, and a class in a third, the
 *  <code>Symbol</code> <code>:Fred</code> will be the same object in
 *  all three contexts.
 *
 *     module One
 *       class Fred
 *       end
 *       $f1 = :Fred
 *     end
 *     module Two
 *       Fred = 1
 *       $f2 = :Fred
 *     end
 *     def Fred()
 *     end
 *     $f3 = :Fred
 *     $f1.id   #=> 2514190
 *     $f2.id   #=> 2514190
 *     $f3.id   #=> 2514190
 *
 */

/*
 *  call-seq:
 *     sym.to_i      => fixnum
 *
 *  Returns an integer that is unique for each symbol within a
 *  particular execution of a program.
 *
 *     :fred.to_i           #=> 9809
 *     "fred".to_sym.to_i   #=> 9809
 */

static VALUE
sym_to_i(VALUE sym)
{
    ID id = SYM2ID(sym);

    return LONG2FIX(id);
}

/*
 *  call-seq:
 *     sym.inspect    => string
 *
 *  Returns the representation of <i>sym</i> as a symbol literal.
 *
 *     :fred.inspect   #=> ":fred"
 */

static VALUE
sym_inspect(VALUE sym)
{
    VALUE str;
    char *name;
    ID id = SYM2ID(sym);

    name = rb_id2name(id);
    str = rb_str_new(0, strlen(name)+1);
    RSTRING(str)->ptr[0] = ':';
    strcpy(RSTRING(str)->ptr+1, name);
    if (!rb_symname_p(name)) {
        str = rb_str_dump(str);
        strncpy(RSTRING(str)->ptr, ":\"", 2);
    }
    return str;
}

/*
 *  call-seq:
 *     sym.id2name   => string
 *     sym.to_s      => string
 *
 *  Returns the name or string corresponding to <i>sym</i>.
 *
 *     :fred.id2name   #=> "fred"
 */

static VALUE
sym_to_s(VALUE sym)
{
    return rb_str_new2(rb_id2name(SYM2ID(sym)));
}

/*
 * call-seq:
 *   sym.to_sym   => sym
 *
 * In general, <code>to_sym</code> returns the <code>Symbol</code> corresponding
 * to an object. As <i>sym</i> is already a symbol, <code>self</code> is returned
 * in this case.
 */

static VALUE
sym_to_sym(VALUE sym)
{
    return sym;
}

/***********************************************************************
 *
 * Document-class: Module
 *
 *  A <code>Module</code> is a collection of methods and constants. The
 *  methods in a module may be instance methods or module methods.
 *  Instance methods appear as methods in a class when the module is
 *  included, module methods do not. Conversely, module methods may be
 *  called without creating an encapsulating object, while instance
 *  methods may not. (See <code>Module#module_function</code>)
 *
 *  In the descriptions that follow, the parameter <i>syml</i> refers
 *  to a symbol, which is either a quoted string or a
 *  <code>Symbol</code> (such as <code>:name</code>).
 *
 *     module Mod
 *       include Math
 *       CONST = 1
 *       def meth
 *         #  ...
 *       end
 *     end
 *     Mod.class              #=> Module
 *     Mod.constants          #=> ["E", "PI", "CONST"]
 *     Mod.instance_methods   #=> ["meth"]
 *
 */

/*
 * call-seq:
 *   mod.to_s   => string
 *
 * Return a string representing this module or class. For basic
 * classes and modules, this is the name. For singletons, we
 * show information on the thing we're attached to as well.
 */

static VALUE
rb_mod_to_s(VALUE klass)
{
    if (FL_TEST(klass, FL_SINGLETON)) {
        VALUE s = rb_str_new2("#<");
        VALUE v = rb_iv_get(klass, "__attached__");

        rb_str_cat2(s, "Class:");
        switch (TYPE(v)) {
          case T_CLASS: case T_MODULE:
            rb_str_append(s, rb_inspect(v));
            break;
          default:
            rb_str_append(s, rb_any_to_s(v));
            break;
        }
        rb_str_cat2(s, ">");

        return s;
    }
    return rb_str_dup(rb_class_name(klass));
}

/*
 *  call-seq:
 *     mod.freeze
 *
 *  Prevents further modifications to <i>mod</i>.
 */

static VALUE
rb_mod_freeze(VALUE mod)
{
    rb_mod_to_s(mod);
    return rb_obj_freeze(mod);
}

/*
 *  call-seq:
 *     mod === obj    => true or false
 *
 *  Case Equality---Returns <code>true</code> if <i>anObject</i> is an
 *  instance of <i>mod</i> or one of <i>mod</i>'s descendents. Of
 *  limited use for modules, but can be used in <code>case</code>
 *  statements to classify objects by class.
 */

static VALUE
rb_mod_eqq(VALUE mod, VALUE arg)
{
    return rb_obj_is_kind_of(arg, mod);
}

/*
 * call-seq:
 *   mod <= other   =>  true, false, or nil
 *
 * Returns true if <i>mod</i> is a subclass of <i>other</i> or
 * is the same as <i>other</i>. Returns
 * <code>nil</code> if there's no relationship between the two.
 * (Think of the relationship in terms of the class definition:
 * "class A<B" implies "A<B").
 *
 */

VALUE
rb_class_inherited_p(VALUE mod, VALUE arg)
{
    VALUE start = mod;

    if (mod == arg) return Qtrue;
    switch (TYPE(arg)) {
      case T_MODULE:
      case T_CLASS:
        break;
      default:
        rb_raise(rb_eTypeError, "compared with non class/module");
    }
    while (mod) {
        if (RCLASS(mod)->m_tbl == RCLASS(arg)->m_tbl)
            return Qtrue;
        mod = RCLASS(mod)->super;
    }
    /* not mod < arg; check if mod > arg */
    while (arg) {
        if (RCLASS(arg)->m_tbl == RCLASS(start)->m_tbl)
            return Qfalse;
        arg = RCLASS(arg)->super;
    }
    return Qnil;
}

/*
 * call-seq:
 *   mod < other   =>  true, false, or nil
 *
 * Returns true if <i>mod</i> is a subclass of <i>other</i>. Returns
 * <code>nil</code> if there's no relationship between the two.
 * (Think of the relationship in terms of the class definition:
 * "class A<B" implies "A<B").
 *
 */

static VALUE
rb_mod_lt(VALUE mod, VALUE arg)
{
    if (mod == arg) return Qfalse;
    return rb_class_inherited_p(mod, arg);
}

/*
 * call-seq:
 *   mod >= other   =>  true, false, or nil
 *
 * Returns true if <i>mod</i> is an ancestor of <i>other</i>, or the
 * two modules are the same. Returns
 * <code>nil</code> if there's no relationship between the two.
 * (Think of the relationship in terms of the class definition:
 * "class A<B" implies "B>A").
 *
 */

static VALUE
rb_mod_ge(VALUE mod, VALUE arg)
{
    switch (TYPE(arg)) {
      case T_MODULE:
      case T_CLASS:
        break;
      default:
        rb_raise(rb_eTypeError, "compared with non class/module");
    }

    return rb_class_inherited_p(arg, mod);
}

/*
 * call-seq:
 *   mod > other   =>  true, false, or nil
 *
 * Returns true if <i>mod</i> is an ancestor of <i>other</i>. Returns
 * <code>nil</code> if there's no relationship between the two.
 * (Think of the relationship in terms of the class definition:
 * "class A<B" implies "B>A").
 *
 */

static VALUE
rb_mod_gt(VALUE mod, VALUE arg)
{
    if (mod == arg) return Qfalse;
    return rb_mod_ge(mod, arg);
}

/*
 *  call-seq:
 *     mod <=> other_mod   => -1, 0, +1, or nil
 *
 *  Comparison---Returns -1 if <i>mod</i> includes <i>other_mod</i>, 0 if
 *  <i>mod</i> is the same as <i>other_mod</i>, and +1 if <i>mod</i> is
 *  included by <i>other_mod</i> or if <i>mod</i> has no relationship with
 *  <i>other_mod</i>. Returns <code>nil</code> if <i>other_mod</i> is
 *  not a module.
 */

static VALUE
rb_mod_cmp(VALUE mod, VALUE arg)
{
    VALUE cmp;

    if (mod == arg) return INT2FIX(0);
    switch (TYPE(arg)) {
      case T_MODULE:
      case T_CLASS:
        break;
      default:
        return Qnil;
    }

    cmp = rb_class_inherited_p(mod, arg);
    if (NIL_P(cmp)) return Qnil;
    if (cmp) {
        return INT2FIX(-1);
    }
    return INT2FIX(1);
}

static VALUE
rb_module_s_alloc(VALUE klass)
{
    VALUE mod = rb_module_new();

    RBASIC(mod)->klass = klass;
    return mod;
}

static VALUE
rb_class_s_alloc(VALUE klass)
{
    return rb_class_boot(0);
}

/*
 *  call-seq:
 *    Module.new                  => mod
 *    Module.new {|mod| block }   => mod
 *
 *  Creates a new anonymous module. If a block is given, it is passed
 *  the module object, and the block is evaluated in the context of this
 *  module using <code>module_eval</code>.
 *
 *     Fred = Module.new do
 *       def meth1
 *         "hello"
 *       end
 *       def meth2
 *         "bye"
 *       end
 *     end
 *     a = "my string"
 *     a.extend(Fred)   #=> "my string"
 *     a.meth1          #=> "hello"
 *     a.meth2          #=> "bye"
 */

static VALUE
rb_mod_initialize(VALUE module)
{
    if (rb_block_given_p()) {
        rb_mod_module_eval(0, 0, module);
    }
    return Qnil;
}

/*
 *  call-seq:
 *     Class.new(super_class=Object)   =>    a_class
 *
 *  Creates a new anonymous (unnamed) class with the given superclass
 *  (or <code>Object</code> if no parameter is given). You can give a
 *  class a name by assigning the class object to a constant.
 *
 */

static VALUE
rb_class_initialize(int argc, VALUE *argv, VALUE klass)
{
    VALUE super;

    if (RCLASS(klass)->super != 0) {
        rb_raise(rb_eTypeError, "already initialized class");
    }
    if (rb_scan_args(argc, argv, "01", &super) == 0) {
        super = rb_cObject;
    }
    else {
        rb_check_inheritable(super);
    }
    RCLASS(klass)->super = super;
    rb_make_metaclass(klass, RBASIC(super)->klass);
    rb_class_inherited(super, klass);
    rb_mod_initialize(klass);

    return klass;
}

/*
 *  call-seq:
 *     class.allocate()   =>   obj
 *
 *  Allocates space for a new object of <i>class</i>'s class. The
 *  returned object must be an instance of <i>class</i>.
 *
 */

VALUE
rb_obj_alloc(VALUE klass)
{
    VALUE obj;

    if (RCLASS(klass)->super == 0) {
        rb_raise(rb_eTypeError, "can't instantiate uninitialized class");
    }
    if (FL_TEST(klass, FL_SINGLETON)) {
        rb_raise(rb_eTypeError, "can't create instance of singleton class");
    }
    obj = rb_funcall(klass, ID_ALLOCATOR, 0, 0);
    if (rb_obj_class(obj) != rb_class_real(klass)) {
        rb_raise(rb_eTypeError, "wrong instance allocation");
    }
    return obj;
}

static VALUE
rb_class_allocate_instance(VALUE klass)
{
    NEWOBJ(obj, struct RObject);
    OBJSETUP(obj, klass, T_OBJECT);
    return (VALUE)obj;
}

/*
 *  call-seq:
 *     class.new(args, ...)    =>  obj
 *
 *  Calls <code>allocate</code> to create a new object of
 *  <i>class</i>'s class, then invokes that object's
 *  <code>initialize</code> method, passing it <i>args</i>.
 *  This is the method that ends up getting called whenever
 *  an object is constructed using .new.
 *
 */

VALUE
rb_class_new_instance(int argc, VALUE *argv, VALUE klass)
{
    VALUE obj;

    obj = rb_obj_alloc(klass);
    rb_obj_call_init(obj, argc, argv);

    return obj;
}

/*
 *  call-seq:
 *     class.superclass -> a_super_class or nil
 *
 *  Returns the superclass of <i>class</i>, or <code>nil</code>.
 *
 *     File.superclass     #=> IO
 *     IO.superclass       #=> Object
 *     Object.superclass   #=> nil
 *
 */

static VALUE
rb_class_superclass(VALUE klass)
{
    VALUE super = RCLASS(klass)->super;

    if (!super) {
        rb_raise(rb_eTypeError, "uninitialized class");
    }
    while (TYPE(super) == T_ICLASS) {
        super = RCLASS(super)->super;
    }
    if (!super) {
        return Qnil;
    }
    return super;
}

static ID
str_to_id(VALUE str)
{
    if (!RSTRING(str)->ptr || RSTRING(str)->len == 0) {
        rb_raise(rb_eArgError, "empty symbol string");
    }
    if (RSTRING(str)->len != strlen(RSTRING(str)->ptr)) {
        rb_raise(rb_eArgError, "Symbols should not contain NUL (\\0)");
    }
    return rb_intern(RSTRING(str)->ptr);
}

ID
rb_to_id(VALUE name)
{
    VALUE tmp;
    ID id;

    switch (TYPE(name)) {
      case T_STRING:
        return str_to_id(name);
      case T_FIXNUM:
        rb_warn("do not use Fixnums as Symbols");
        id = FIX2LONG(name);
        if (!rb_id2name(id)) {
            rb_raise(rb_eArgError, "%ld is not a symbol", id);
        }
        break;
      case T_SYMBOL:
        id = SYM2ID(name);
        break;
      default:
        tmp = rb_check_string_type(name);
        if (!NIL_P(tmp)) {
            return str_to_id(tmp);
        }
        rb_raise(rb_eTypeError, "%s is not a symbol", RSTRING(rb_inspect(name))->ptr);
    }
    return id;
}

/*
 *  call-seq:
 *     attr(symbol, writable=false)    => nil
 *
 *  Defines a named attribute for this module, where the name is
 *  <i>symbol.</i><code>id2name</code>, creating an instance variable
 *  (<code>@name</code>) and a corresponding access method to read it.
 *  If the optional <i>writable</i> argument is <code>true</code>, also
 *  creates a method called <code>name=</code> to set the attribute.
 *
 *     module Mod
 *       attr  :size, true
 *     end
 *
 *  <em>is equivalent to:</em>
 *
 *     module Mod
 *       def size
 *         @size
 *       end
 *       def size=(val)
 *         @size = val
 *       end
 *     end
 */

static VALUE
rb_mod_attr(int argc, VALUE *argv, VALUE klass)
{
    VALUE name, pub;

    rb_scan_args(argc, argv, "11", &name, &pub);
    rb_attr(klass, rb_to_id(name), 1, RTEST(pub), Qtrue);
    return Qnil;
}

/*
 *  call-seq:
 *     attr_reader(symbol, ...)    => nil
 *
 *  Creates instance variables and corresponding methods that return the
 *  value of each instance variable. Equivalent to calling
 *  ``<code>attr</code><i>:name</i>'' on each name in turn.
 */

static VALUE
rb_mod_attr_reader(int argc, VALUE *argv, VALUE klass)
{
    int i;

    for (i=0; i<argc; i++) {
        rb_attr(klass, rb_to_id(argv[i]), 1, 0, Qtrue);
    }
    return Qnil;
}

/*
 *  call-seq:
 *      attr_writer(symbol, ...)    => nil
 *
 *  Creates an accessor method to allow assignment to the attribute
 *  <i>aSymbol</i><code>.id2name</code>.
 */

static VALUE
rb_mod_attr_writer(int argc, VALUE *argv, VALUE klass)
{
    int i;

    for (i=0; i<argc; i++) {
        rb_attr(klass, rb_to_id(argv[i]), 0, 1, Qtrue);
    }
    return Qnil;
}

/*
 *  call-seq:
 *     attr_accessor(symbol, ...)    => nil
 *
 *  Equivalent to calling ``<code>attr</code><i>symbol</i><code>,
 *  true</code>'' on each <i>symbol</i> in turn.
 *
 *     module Mod
 *       attr_accessor(:one, :two)
 *     end
 *     Mod.instance_methods.sort   #=> ["one", "one=", "two", "two="]
 */

static VALUE
rb_mod_attr_accessor(int argc, VALUE *argv, VALUE klass)
{
    int i;

    for (i=0; i<argc; i++) {
        rb_attr(klass, rb_to_id(argv[i]), 1, 1, Qtrue);
    }
    return Qnil;
}

/*
 *  call-seq:
 *     mod.const_get(sym)    => obj
 *
 *  Returns the value of the named constant in <i>mod</i>.
 *
 *     Math.const_get(:PI)   #=> 3.14159265358979
 */

static VALUE
rb_mod_const_get(VALUE mod, VALUE name)
{
    ID id = rb_to_id(name);

    if (!rb_is_const_id(id)) {
        rb_name_error(id, "wrong constant name %s", rb_id2name(id));
    }
    return rb_const_get(mod, id);
}

/*
 *  call-seq:
 *     mod.const_set(sym, obj)    => obj
 *
 *  Sets the named constant to the given object, returning that object.
 *  Creates a new constant if no constant with the given name previously
 *  existed.
 *
 *     Math.const_set("HIGH_SCHOOL_PI", 22.0/7.0)   #=> 3.14285714285714
 *     Math::HIGH_SCHOOL_PI - Math::PI              #=> 0.00126448926734968
 */

static VALUE
rb_mod_const_set(VALUE mod, VALUE name, VALUE value)
{
    ID id = rb_to_id(name);

    if (!rb_is_const_id(id)) {
        rb_name_error(id, "wrong constant name %s", rb_id2name(id));
    }
    rb_const_set(mod, id, value);
    return value;
}

/*
 *  call-seq:
 *     mod.const_defined?(sym)   => true or false
 *
 *  Returns <code>true</code> if a constant with the given name is
 *  defined by <i>mod</i>.
 *
 *     Math.const_defined? "PI"   #=> true
 */

static VALUE
rb_mod_const_defined(VALUE mod, VALUE name)
{
    ID id = rb_to_id(name);

    if (!rb_is_const_id(id)) {
        rb_name_error(id, "wrong constant name %s", rb_id2name(id));
    }
    return rb_const_defined_at(mod, id);
}

/*
 *  call-seq:
 *     obj.methods    => array
 *
 *  Returns a list of the names of methods publicly accessible in
 *  <i>obj</i>. This will include all the methods accessible in
 *  <i>obj</i>'s ancestors.
 *
 *     class Klass
 *       def kMethod()
 *       end
 *     end
 *     k = Klass.new
 *     k.methods[0..9]    #=> ["kMethod", "freeze", "nil?", "is_a?",
 *                             "class", "instance_variable_set",
 *                              "methods", "extend", "__send__", "instance_eval"]
 *     k.methods.length   #=> 42
 */

static VALUE
rb_obj_methods(int argc, VALUE *argv, VALUE obj)
{
  retry:
    if (argc == 0) {
        VALUE args[1];

        args[0] = Qtrue;
        return rb_class_instance_methods(1, args, CLASS_OF(obj));
    }
    else {
        VALUE recur;

        rb_scan_args(argc, argv, "1", &recur);
        if (RTEST(recur)) {
            argc = 0;
            goto retry;
        }
        return rb_obj_singleton_methods(argc, argv, obj);
    }
}

/*
 *  call-seq:
 *     obj.protected_methods(all=true)   => array
 *
 *  Returns the list of protected methods accessible to <i>obj</i>. If
 *  the <i>all</i> parameter is set to <code>false</code>, only those methods
 *  in the receiver will be listed.
 */

static VALUE
rb_obj_protected_methods(int argc, VALUE *argv, VALUE obj)
{
    if (argc == 0) {            /* hack to stop warning */
        VALUE args[1];

        args[0] = Qtrue;
        return rb_class_protected_instance_methods(1, args, CLASS_OF(obj));
    }
    return rb_class_protected_instance_methods(argc, argv, CLASS_OF(obj));
}

/*
 *  call-seq:
 *     obj.private_methods(all=true)   => array
 *
 *  Returns the list of private methods accessible to <i>obj</i>. If
 *  the <i>all</i> parameter is set to <code>false</code>, only those methods
 *  in the receiver will be listed.
 */

static VALUE
rb_obj_private_methods(int argc, VALUE *argv, VALUE obj)
{
    if (argc == 0) {            /* hack to stop warning */
        VALUE args[1];

        args[0] = Qtrue;
        return rb_class_private_instance_methods(1, args, CLASS_OF(obj));
    }
    return rb_class_private_instance_methods(argc, argv, CLASS_OF(obj));
}

/*
 *  call-seq:
 *     obj.public_methods(all=true)   => array
 *
 *  Returns the list of public methods accessible to <i>obj</i>. If
 *  the <i>all</i> parameter is set to <code>false</code>, only those methods
 *  in the receiver will be listed.
 */

static VALUE
rb_obj_public_methods(int argc, VALUE *argv, VALUE obj)
{
    if (argc == 0) {            /* hack to stop warning */
        VALUE args[1];

        args[0] = Qtrue;
        return rb_class_public_instance_methods(1, args, CLASS_OF(obj));
    }
    return rb_class_public_instance_methods(argc, argv, CLASS_OF(obj));
}

/*
 *  call-seq:
 *     obj.instance_variable_get(symbol)    => obj
 *
 *  Returns the value of the given instance variable (or throws a
 *  <code>NameError</code> exception). The <code>@</code> part of the
 *  variable name should be included for regular instance variables
 *
 *     class Fred
 *       def initialize(p1, p2)
 *         @a, @b = p1, p2
 *       end
 *     end
 *     fred = Fred.new('cat', 99)
 *     fred.instance_variable_get(:@a)    #=> "cat"
 *     fred.instance_variable_get("@b")   #=> 99
 */

static VALUE
rb_obj_ivar_get(VALUE obj, VALUE iv)
{
    ID id = rb_to_id(iv);

    if (!rb_is_instance_id(id)) {
        rb_name_error(id, "`%s' is not allowed as an instance variable name", rb_id2name(id));
    }
    return rb_ivar_get(obj, id);
}

/*
 *  call-seq:
 *     obj.instance_variable_set(symbol, obj)    => obj
 *
 *  Sets the instance variable names by <i>symbol</i> to
 *  <i>object</i>, thereby frustrating the efforts of the class's
 *  author to attempt to provide proper encapsulation. The variable
 *  did not have to exist prior to this call.
 *
 *     class Fred
 *       def initialize(p1, p2)
 *         @a, @b = p1, p2
 *       end
 *     end
 *     fred = Fred.new('cat', 99)
 *     fred.instance_variable_set(:@a, 'dog')   #=> "dog"
 *     fred.instance_variable_set(:@c, 'cat')   #=> "cat"
 *     fred.inspect                             #=> "#<Fred:0x401b3da8 @a=\"dog\", @b=99, @c=\"cat\">"
 */

static VALUE
rb_obj_ivar_set(VALUE obj, VALUE iv, VALUE val)
{
    ID id = rb_to_id(iv);

    if (!rb_is_instance_id(id)) {
        rb_name_error(id, "`%s' is not allowed as an instance variable name", rb_id2name(id));
    }
    return rb_ivar_set(obj, id, val);
}

/*
 *  call-seq:
 *     mod.class_variable_get(symbol)    => obj
 *
 *  Returns the value of the given class variable (or throws a
 *  <code>NameError</code> exception). The <code>@@</code> part of the
 *  variable name should be included for regular class variables
 *
 *     class Fred
 *       @@foo = 99
 *     end
 *     Fred.class_variable_get(:@foo)     #=> 99
 */

static VALUE
rb_mod_cvar_get(VALUE obj, VALUE iv)
{
    ID id = rb_to_id(iv);

    if (!rb_is_class_id(id)) {
        rb_name_error(id, "`%s' is not allowed as an class variable name", rb_id2name(id));
    }
    return rb_cvar_get(obj, id);
}

/*
 *  call-seq:
 *     obj.class_variable_set(symbol, obj)    => obj
 *
 *  Sets the class variable names by <i>symbol</i> to
 *  <i>object</i>.
 *
 *     class Fred
 *       @@foo = 99
 *       def foo
 *         @@foo
 *       end
 *     end
 *     Fred.class_variable_set(:@foo, 101)      #=> 101
 *     Fred.new.foo                             #=> 101
 */

static VALUE
rb_mod_cvar_set(VALUE obj, VALUE iv, VALUE val)
{
    ID id = rb_to_id(iv);

    if (!rb_is_class_id(id)) {
        rb_name_error(id, "`%s' is not allowed as an class variable name", rb_id2name(id));
    }
    rb_cvar_set(obj, id, val, Qfalse);
    return val;
}

static VALUE
convert_type(VALUE val, const char *tname, const char *method, int raise)
{
    ID m;

    m = rb_intern(method);
    if (!rb_respond_to(val, m)) {
        if (raise) {
            rb_raise(rb_eTypeError, "can't convert %s into %s",
                     NIL_P(val) ? "nil" :
                     val == Qtrue ? "true" :
                     val == Qfalse ? "false" :
                     rb_obj_classname(val),
                     tname);
        }
        else {
            return Qnil;
        }
    }
    return rb_funcall(val, m, 0);
}

VALUE
rb_convert_type(VALUE val, int type, const char *tname, const char *method)
{
    VALUE v;

    if (TYPE(val) == type) return val;
    v = convert_type(val, tname, method, Qtrue);
    if (TYPE(v) != type) {
        char *cname = rb_obj_classname(val);
        rb_raise(rb_eTypeError, "can't convert %s to %s (%s#%s gives %s)",
                 cname, tname, cname, method, rb_obj_classname(v));
    }
    return v;
}

VALUE
rb_check_convert_type(VALUE val, int type, const char *tname, const char *method)
{
    VALUE v;

    /* always convert T_DATA */
    if (TYPE(val) == type && type != T_DATA) return val;
    v = convert_type(val, tname, method, Qfalse);
    if (NIL_P(v)) return Qnil;
    if (TYPE(v) != type) {
        char *cname = rb_obj_classname(val);
        rb_raise(rb_eTypeError, "can't convert %s to %s (%s#%s gives %s)",
                 cname, tname, cname, method, rb_obj_classname(v));
    }
    return v;
}

static VALUE
rb_to_integer(VALUE val, const char *method)
{
    VALUE v = convert_type(val, "Integer", method, Qtrue);
    if (!rb_obj_is_kind_of(v, rb_cInteger)) {
        char *cname = rb_obj_classname(val);
        rb_raise(rb_eTypeError, "can't convert %s to Integer (%s#%s gives %s)",
                 cname, cname, method, rb_obj_classname(v));
    }
    return v;
}

VALUE
rb_check_to_integer(VALUE val, const char *method)
{
    VALUE v = convert_type(val, "Integer", method, Qfalse);
    if (!rb_obj_is_kind_of(v, rb_cInteger)) {
        return Qnil;
    }
    return v;
}

VALUE
rb_to_int(VALUE val)
{
    return rb_to_integer(val, "to_int");
}

VALUE
rb_Integer(VALUE val)
{
    VALUE tmp;

    switch (TYPE(val)) {
      case T_FLOAT:
        if (RFLOAT(val)->value <= (double)FIXNUM_MAX
            && RFLOAT(val)->value >= (double)FIXNUM_MIN) {
            break;
        }
        return rb_dbl2big(RFLOAT(val)->value);

      case T_FIXNUM:
      case T_BIGNUM:
        return val;

      case T_STRING:
        return rb_str_to_inum(val, 0, Qtrue);

      default:
        break;
    }
    tmp = convert_type(val, "Integer", "to_int", Qfalse);
    if (NIL_P(tmp)) {
        return rb_to_integer(val, "to_i");
    }
    return tmp;
}

/*
 *  call-seq:
 *     Integer(arg)    => integer
 *
 *  Converts <i>arg</i> to a <code>Fixnum</code> or <code>Bignum</code>.
 *  Numeric types are converted directly (with floating point numbers
 *  being truncated). If <i>arg</i> is a <code>String</code>, leading
 *  radix indicators (<code>0</code>, <code>0b</code>, and
 *  <code>0x</code>) are honored. Others are converted using
 *  <code>to_int</code> and <code>to_i</code>. This behavior is
 *  different from that of <code>String#to_i</code>.
 *
 *     Integer(123.999)    #=> 123
 *     Integer("0x1a")     #=> 26
 *     Integer(Time.new)   #=> 1049896590
 */

static VALUE
rb_f_integer(VALUE obj, VALUE arg)
{
    return rb_Integer(arg);
}

double
rb_cstr_to_dbl(const char *p, int badcheck)
{
    const char *q;
    char *end;
    double d;

    if (!p) return 0.0;
    q = p;
    if (badcheck) {
        while (ISSPACE(*p)) p++;
    }
    else {
        while (ISSPACE(*p) || *p == '_') p++;
    }
    d = strtod(p, &end);
    if (errno == ERANGE) {
        rb_warn("Float %*s out of range", end-p, p);
        errno = 0;
    }
    if (p == end) {
        if (badcheck) {
          bad:
            rb_invalid_str(q, "Float()");
        }
        return d;
    }
    if (*end) {
        char *buf = ALLOCA_N(char, strlen(p)+1);
        char *n = buf;

        while (p < end) *n++ = *p++;
        while (*p) {
            if (*p == '_') {
                /* remove underscores between digits */
                if (badcheck) {
                    if (n == buf || !ISDIGIT(n[-1])) goto bad;
                    ++p;
                    if (!ISDIGIT(*p)) goto bad;
                }
                else {
                    while (*++p == '_');
                    continue;
                }
            }
            *n++ = *p++;
        }
        *n = '\0';
        p = buf;
        d = strtod(p, &end);
        if (errno == ERANGE) {
            rb_warn("Float %*s out of range", end-p, p);
            errno = 0;
        }
        if (badcheck) {
            if (p == end) goto bad;
            while (*end && ISSPACE(*end)) end++;
            if (*end) goto bad;
        }
    }
    if (errno == ERANGE) {
        errno = 0;
        rb_raise(rb_eArgError, "Float %s out of range", q);
    }
    return d;
}

double
rb_str_to_dbl(VALUE str, int badcheck)
{
    char *s;
    long len;

    StringValue(str);
    s = RSTRING(str)->ptr;
    len = RSTRING(str)->len;
    if (s) {
        if (s[len]) {           /* no sentinel somehow */
            char *p = ALLOCA_N(char, len+1);

            MEMCPY(p, s, char, len);
            p[len] = '\0';
            s = p;
        }
        if (badcheck && len != strlen(s)) {
            rb_raise(rb_eArgError, "string for Float contains null byte");
        }
    }
    return rb_cstr_to_dbl(s, badcheck);
}

VALUE
rb_Float(VALUE val)
{
    switch (TYPE(val)) {
      case T_FIXNUM:
        return rb_float_new((double)FIX2LONG(val));

      case T_FLOAT:
        return val;

      case T_BIGNUM:
        return rb_float_new(rb_big2dbl(val));

      case T_STRING:
        return rb_float_new(rb_str_to_dbl(val, Qtrue));

      case T_NIL:
        rb_raise(rb_eTypeError, "can't convert nil into Float");
        break;

      default:
      {
          VALUE f = rb_convert_type(val, T_FLOAT, "Float", "to_f");
          if (isnan(RFLOAT(f)->value)) {
              rb_raise(rb_eArgError, "invalid value for Float()");
          }
          return f;
      }
    }
}

/*
 *  call-seq:
 *     Float(arg)    => float
 *
 *  Returns <i>arg</i> converted to a float. Numeric types are converted
 *  directly, the rest are converted using <i>arg</i>.to_f. As of Ruby
 *  1.8, converting <code>nil</code> generates a <code>TypeError</code>.
 *
 *     Float(1)           #=> 1.0
 *     Float("123.456")   #=> 123.456
 */

static VALUE
rb_f_float(VALUE obj, VALUE arg)
{
    return rb_Float(arg);
}

double
rb_num2dbl(VALUE val)
{
    switch (TYPE(val)) {
      case T_FLOAT:
        return RFLOAT(val)->value;

      case T_STRING:
        rb_raise(rb_eTypeError, "no implicit conversion to float from string");
        break;

      case T_NIL:
        rb_raise(rb_eTypeError, "no implicit conversion to float from nil");
        break;

      default:
        break;
    }

    return RFLOAT(rb_Float(val))->value;
}

char*
rb_str2cstr(VALUE str, long *len)
{
    StringValue(str);
    if (len) *len = RSTRING(str)->len;
    else if (RTEST(ruby_verbose) && RSTRING(str)->len != strlen(RSTRING(str)->ptr)) {
        rb_warn("string contains \\0 character");
    }
    return RSTRING(str)->ptr;
}

VALUE
rb_String(VALUE val)
{
    return rb_convert_type(val, T_STRING, "String", "to_s");
}

/*
 *  call-seq:
 *     String(arg)   => string
 *
 *  Converts <i>arg</i> to a <code>String</code> by calling its
 *  <code>to_s</code> method.
 *
 *     String(self)        #=> "main"
 *     String(self.class   #=> "Object"
 *     String(123456)      #=> "123456"
 */

static VALUE
rb_f_string(VALUE obj, VALUE arg)
{
    return rb_String(arg);
}

VALUE
rb_Array(VALUE val)
{
    VALUE tmp = rb_check_array_type(val);

    if (NIL_P(tmp)) {
        return rb_convert_type(val, T_ARRAY, "Array", "to_a");
    }
    return tmp;
}

/*
 *  call-seq:
 *     Array(arg)    => array
 *
 *  Returns <i>arg</i> as an <code>Array</code>. First tries to call
 *  <i>arg</i><code>.to_ary</code>, then <i>arg</i><code>.to_a</code>.
 *
 *     Array(1..5)   #=> [1, 2, 3, 4, 5]
 */

static VALUE
rb_f_array(VALUE obj, VALUE arg)
{
    return rb_Array(arg);
}

static VALUE
boot_defclass(char *name, VALUE super)
{
    extern st_table *rb_class_tbl;
    VALUE obj = rb_class_boot(super);
    ID id = rb_intern(name);

    rb_name_class(obj, id);
    st_add_direct(rb_class_tbl, id, obj);
    rb_const_set((rb_cObject ? rb_cObject : obj), id, obj);
    return obj;
}

VALUE ruby_top_self;

/*
 *  Document-class: Class
 *
 *  Classes in Ruby are first-class objects---each is an instance of
 *  class <code>Class</code>.
 *
 *  When a new class is created (typically using <code>class Name ...
 *  end</code>), an object of type <code>Class</code> is created and
 *  assigned to a global constant (<code>Name</code> in this case). When
 *  <code>Name.new</code> is called to create a new object, the
 *  <code>new</code> method in <code>Class</code> is run by default.
 *  This can be demonstrated by overriding <code>new</code> in
 *  <code>Class</code>:
 *
 *     class Class
 *        alias oldNew  new
 *        def new(*args)
 *          print "Creating a new ", self.name, "\n"
 *          oldNew(*args)
 *        end
 *      end
 *
 *
 *      class Name
 *      end
 *
 *
 *      n = Name.new
 *
 *  <em>produces:</em>
 *
 *     Creating a new Name
 *
 *  Classes, modules, and objects are interrelated. In the diagram
 *  that follows, the vertical arrows represent inheritance, and the
 *  parentheses meta-classes. All metaclasses are instances
 *  of the class `Class'.
 *
 *                            +------------------+
 *                            |                  |
 *              Object---->(Object)              |
 *               ^  ^        ^  ^                |
 *               |  |        |  |                |
 *               |  |  +-----+  +---------+      |
 *               |  |  |                  |      |
 *               |  +-----------+         |      |
 *               |     |        |         |      |
 *        +------+     |     Module--->(Module)  |
 *        |            |        ^         ^      |
 *   OtherClass-->(OtherClass)  |         |      |
 *                              |         |      |
 *                            Class---->(Class)  |
 *                              ^                |
 *                              |                |
 *                              +----------------+
 */

/*
 *  <code>Object</code> is the parent class of all classes in Ruby. Its
 *  methods are therefore available to all objects unless explicitly
 *  overridden.
 *
 *  <code>Object</code> mixes in the <code>Kernel</code> module, making
 *  the built-in kernel functions globally accessible. Although the
 *  instance methods of <code>Object</code> are defined by the
 *  <code>Kernel</code> module, we have chosen to document them here for
 *  clarity.
 *
 *  In the descriptions of Object's methods, the parameter <i>symbol</i> refers
 *  to a symbol, which is either a quoted string or a
 *  <code>Symbol</code> (such as <code>:name</code>).
 */

void
Init_Object(void)
{
    VALUE metaclass;

    rb_cObject = boot_defclass("Object", 0);
    rb_cModule = boot_defclass("Module", rb_cObject);
    rb_cClass =  boot_defclass("Class",  rb_cModule);

    metaclass = rb_make_metaclass(rb_cObject, rb_cClass);
    metaclass = rb_make_metaclass(rb_cModule, metaclass);
    metaclass = rb_make_metaclass(rb_cClass, metaclass);

    rb_mKernel = rb_define_module("Kernel");
    rb_include_module(rb_cObject, rb_mKernel);
    rb_define_alloc_func(rb_cObject, rb_class_allocate_instance);
    rb_define_private_method(rb_cObject, "initialize", rb_obj_dummy, 0);
    rb_define_private_method(rb_cClass, "inherited", rb_obj_dummy, 1);
    rb_define_private_method(rb_cModule, "included", rb_obj_dummy, 1);
    rb_define_private_method(rb_cModule, "extended", rb_obj_dummy, 1);
    rb_define_private_method(rb_cModule, "method_added", rb_obj_dummy, 1);
    rb_define_private_method(rb_cModule, "method_removed", rb_obj_dummy, 1);
    rb_define_private_method(rb_cModule, "method_undefined", rb_obj_dummy, 1);

    rb_define_method(rb_mKernel, "nil?", rb_false, 0);
    rb_define_method(rb_mKernel, "==", rb_obj_equal, 1);
    rb_define_method(rb_mKernel, "equal?", rb_obj_equal, 1);
    rb_define_method(rb_mKernel, "===", rb_equal, 1);
    rb_define_method(rb_mKernel, "=~", rb_obj_pattern_match, 1);

    rb_define_method(rb_mKernel, "eql?", rb_obj_equal, 1);

    rb_define_method(rb_mKernel, "hash", rb_obj_id, 0);
    rb_define_method(rb_mKernel, "__id__", rb_obj_id, 0);
    rb_define_method(rb_mKernel, "object_id", rb_obj_id, 0);
    rb_define_method(rb_mKernel, "class", rb_obj_class, 0);

    rb_define_method(rb_mKernel, "clone", rb_obj_clone, 0);
    rb_define_method(rb_mKernel, "dup", rb_obj_dup, 0);
    rb_define_method(rb_mKernel, "initialize_copy", rb_obj_init_copy, 1);

    rb_define_method(rb_mKernel, "taint", rb_obj_taint, 0);
    rb_define_method(rb_mKernel, "tainted?", rb_obj_tainted, 0);
    rb_define_method(rb_mKernel, "untaint", rb_obj_untaint, 0);
    rb_define_method(rb_mKernel, "freeze", rb_obj_freeze, 0);
    rb_define_method(rb_mKernel, "frozen?", rb_obj_frozen_p, 0);

    rb_define_method(rb_mKernel, "to_s", rb_any_to_s, 0);
    rb_define_method(rb_mKernel, "inspect", rb_obj_inspect, 0);
    rb_define_method(rb_mKernel, "methods", rb_obj_methods, -1);
    rb_define_method(rb_mKernel, "singleton_methods", rb_obj_singleton_methods, -1); /* in class.c */
    rb_define_method(rb_mKernel, "protected_methods", rb_obj_protected_methods, -1);
    rb_define_method(rb_mKernel, "private_methods", rb_obj_private_methods, -1);
    rb_define_method(rb_mKernel, "public_methods", rb_obj_public_methods, -1);
    rb_define_method(rb_mKernel, "instance_variables", rb_obj_instance_variables, 0); /* in variable.c */
    rb_define_method(rb_mKernel, "instance_variable_get", rb_obj_ivar_get, 1);
    rb_define_method(rb_mKernel, "instance_variable_set", rb_obj_ivar_set, 2);
    rb_define_private_method(rb_mKernel, "remove_instance_variable",
                             rb_obj_remove_instance_variable, 1); /* in variable.c */

    rb_define_method(rb_mKernel, "instance_of?", rb_obj_is_instance_of, 1);
    rb_define_method(rb_mKernel, "kind_of?", rb_obj_is_kind_of, 1);
    rb_define_method(rb_mKernel, "is_a?", rb_obj_is_kind_of, 1);

    rb_define_private_method(rb_mKernel, "singleton_method_added", rb_obj_dummy, 1);
    rb_define_private_method(rb_mKernel, "singleton_method_removed", rb_obj_dummy, 1);
    rb_define_private_method(rb_mKernel, "singleton_method_undefined", rb_obj_dummy, 1);

    rb_define_global_function("sprintf", rb_f_sprintf, -1); /* in sprintf.c */
    rb_define_global_function("format", rb_f_sprintf, -1);  /* in sprintf.c */

    rb_define_global_function("Integer", rb_f_integer, 1);
    rb_define_global_function("Float", rb_f_float, 1);

    rb_define_global_function("String", rb_f_string, 1);
    rb_define_global_function("Array", rb_f_array, 1);

    rb_cNilClass = rb_define_class("NilClass", rb_cObject);
    rb_define_method(rb_cNilClass, "to_i", nil_to_i, 0);
    rb_define_method(rb_cNilClass, "to_f", nil_to_f, 0);
    rb_define_method(rb_cNilClass, "to_s", nil_to_s, 0);
    rb_define_method(rb_cNilClass, "to_a", nil_to_a, 0);
    rb_define_method(rb_cNilClass, "inspect", nil_inspect, 0);
    rb_define_method(rb_cNilClass, "&", false_and, 1);
    rb_define_method(rb_cNilClass, "|", false_or, 1);
    rb_define_method(rb_cNilClass, "^", false_xor, 1);

    rb_define_method(rb_cNilClass, "nil?", rb_true, 0);
    rb_undef_alloc_func(rb_cNilClass);
    rb_undef_method(CLASS_OF(rb_cNilClass), "new");
    rb_define_global_const("NIL", Qnil);

    rb_cSymbol = rb_define_class("Symbol", rb_cObject);
    rb_define_singleton_method(rb_cSymbol, "all_symbols", rb_sym_all_symbols, 0); /* in parse.y */
    rb_undef_alloc_func(rb_cSymbol);
    rb_undef_method(CLASS_OF(rb_cSymbol), "new");

    rb_define_method(rb_cSymbol, "to_i", sym_to_i, 0);
    rb_define_method(rb_cSymbol, "inspect", sym_inspect, 0);
    rb_define_method(rb_cSymbol, "to_s", sym_to_s, 0);
    rb_define_method(rb_cSymbol, "id2name", sym_to_s, 0);
    rb_define_method(rb_cSymbol, "to_sym", sym_to_sym, 0);
    rb_define_method(rb_cSymbol, "===", rb_obj_equal, 1);

    rb_define_method(rb_cModule, "freeze", rb_mod_freeze, 0);
    rb_define_method(rb_cModule, "===", rb_mod_eqq, 1);
    rb_define_method(rb_cModule, "==", rb_obj_equal, 1);
    rb_define_method(rb_cModule, "<=>",  rb_mod_cmp, 1);
    rb_define_method(rb_cModule, "<",  rb_mod_lt, 1);
    rb_define_method(rb_cModule, "<=", rb_class_inherited_p, 1);
    rb_define_method(rb_cModule, ">",  rb_mod_gt, 1);
    rb_define_method(rb_cModule, ">=", rb_mod_ge, 1);
    rb_define_method(rb_cModule, "initialize_copy", rb_mod_init_copy, 1); /* in class.c */
    rb_define_method(rb_cModule, "to_s", rb_mod_to_s, 0);
    rb_define_method(rb_cModule, "included_modules", rb_mod_included_modules, 0); /* in class.c */
    rb_define_method(rb_cModule, "include?", rb_mod_include_p, 1); /* in class.c */
    rb_define_method(rb_cModule, "name", rb_mod_name, 0);  /* in variable.c */
    rb_define_method(rb_cModule, "ancestors", rb_mod_ancestors, 0); /* in class.c */

    rb_define_private_method(rb_cModule, "attr", rb_mod_attr, -1);
    rb_define_private_method(rb_cModule, "attr_reader", rb_mod_attr_reader, -1);
    rb_define_private_method(rb_cModule, "attr_writer", rb_mod_attr_writer, -1);
    rb_define_private_method(rb_cModule, "attr_accessor", rb_mod_attr_accessor, -1);

    rb_define_alloc_func(rb_cModule, rb_module_s_alloc);
    rb_define_method(rb_cModule, "initialize", rb_mod_initialize, 0);
    rb_define_method(rb_cModule, "instance_methods", rb_class_instance_methods, -1); /* in class.c */
    rb_define_method(rb_cModule, "public_instance_methods",
                     rb_class_public_instance_methods, -1);    /* in class.c */
    rb_define_method(rb_cModule, "protected_instance_methods",
                     rb_class_protected_instance_methods, -1); /* in class.c */
    rb_define_method(rb_cModule, "private_instance_methods",
                     rb_class_private_instance_methods, -1);   /* in class.c */

    rb_define_method(rb_cModule, "constants", rb_mod_constants, 0); /* in variable.c */
    rb_define_method(rb_cModule, "const_get", rb_mod_const_get, 1);
    rb_define_method(rb_cModule, "const_set", rb_mod_const_set, 2);
    rb_define_method(rb_cModule, "const_defined?", rb_mod_const_defined, 1);
    rb_define_private_method(rb_cModule, "remove_const",
                             rb_mod_remove_const, 1); /* in variable.c */
    rb_define_method(rb_cModule, "const_missing",
                     rb_mod_const_missing, 1); /* in variable.c */
    rb_define_method(rb_cModule, "class_variables",
                     rb_mod_class_variables, 0); /* in variable.c */
    rb_define_method(rb_cModule, "remove_class_variable",
                     rb_mod_remove_cvar, 1); /* in variable.c */
    rb_define_method(rb_cModule, "class_variable_get", rb_mod_cvar_get, 1);
    rb_define_method(rb_cModule, "class_variable_set", rb_mod_cvar_set, 2);

    rb_define_method(rb_cClass, "allocate", rb_obj_alloc, 0);
    rb_define_method(rb_cClass, "new", rb_class_new_instance, -1);
    rb_define_method(rb_cClass, "initialize", rb_class_initialize, -1);
    rb_define_method(rb_cClass, "initialize_copy", rb_class_init_copy, 1); /* in class.c */
    rb_define_method(rb_cClass, "superclass", rb_class_superclass, 0);
    rb_define_alloc_func(rb_cClass, rb_class_s_alloc);
    rb_undef_method(rb_cClass, "extend_object");
    rb_undef_method(rb_cClass, "append_features");

    rb_cData = rb_define_class("Data", rb_cObject);
    rb_undef_alloc_func(rb_cData);

    rb_global_variable(&ruby_top_self);
    ruby_top_self = rb_obj_alloc(rb_cObject);
    rb_define_singleton_method(ruby_top_self, "to_s", main_to_s, 0);

    rb_cTrueClass = rb_define_class("TrueClass", rb_cObject);
    rb_define_method(rb_cTrueClass, "to_s", true_to_s, 0);
    rb_define_method(rb_cTrueClass, "&", true_and, 1);
    rb_define_method(rb_cTrueClass, "|", true_or, 1);
    rb_define_method(rb_cTrueClass, "^", true_xor, 1);
    rb_undef_alloc_func(rb_cTrueClass);
    rb_undef_method(CLASS_OF(rb_cTrueClass), "new");
    rb_define_global_const("TRUE", Qtrue);

    rb_cFalseClass = rb_define_class("FalseClass", rb_cObject);
    rb_define_method(rb_cFalseClass, "to_s", false_to_s, 0);
    rb_define_method(rb_cFalseClass, "&", false_and, 1);
    rb_define_method(rb_cFalseClass, "|", false_or, 1);
    rb_define_method(rb_cFalseClass, "^", false_xor, 1);
    rb_undef_alloc_func(rb_cFalseClass);
    rb_undef_method(CLASS_OF(rb_cFalseClass), "new");
    rb_define_global_const("FALSE", Qfalse);

    id_eq = rb_intern("==");
    id_eql = rb_intern("eql?");
    id_inspect = rb_intern("inspect");
    id_init_copy = rb_intern("initialize_copy");
}
/* [<][>][^] [v] [top][bottom][index] [help] */


oniguruma.h

root/oniguruma.h

/* [<][>][^] [v][top][bottom] [index] [help] */

INCLUDED FROM

DEFINITIONS

This source file includes following definitions.
  1. OnigCompAmbigCodeItem
  2. OnigCompAmbigCodes
  3. OnigPairAmbigCodes
  4. OnigMetaCharTableType
  5. OnigEncodingType
  6. OnigSyntaxType
  7. OnigCaptureTreeNode
  8. OnigErrorInfo
  9. OnigRepeatRange
  10. regex_t
  11. OnigCompileInfo
#ifndef ONIGURUMA_H
#define ONIGURUMA_H
/**********************************************************************
  oniguruma.h - Oniguruma (regular expression library)
**********************************************************************/
/*-
 * Copyright (c) 2002-2005  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#ifdef __cplusplus
extern "C" {
#endif

#define ONIGURUMA
#define ONIGURUMA_VERSION_MAJOR   3
#define ONIGURUMA_VERSION_MINOR   7
#define ONIGURUMA_VERSION_TEENY   0

#ifdef __cplusplus
# ifndef  HAVE_PROTOTYPES
#  define HAVE_PROTOTYPES 1
# endif
# ifndef  HAVE_STDARG_PROTOTYPES
#  define HAVE_STDARG_PROTOTYPES 1
# endif
#endif

#ifndef P_
#if defined(__STDC__) || defined(_WIN32)
# define P_(args) args
#else
# define P_(args) ()
#endif
#endif

#ifndef PV_
#ifdef HAVE_STDARG_PROTOTYPES
# define PV_(args) args
#else
# define PV_(args) ()
#endif
#endif

#ifndef ONIG_EXTERN
#if defined(_WIN32) && !defined(__GNUC__)
#if defined(EXPORT) || defined(RUBY_EXPORT)
#define ONIG_EXTERN   extern __declspec(dllexport)
#else
#define ONIG_EXTERN   extern __declspec(dllimport)
#endif
#endif
#endif

#ifndef ONIG_EXTERN
#define ONIG_EXTERN   extern
#endif

/* PART: character encoding */

typedef unsigned char  UChar;
typedef unsigned long  OnigCodePoint;
typedef unsigned int   OnigDistance;

#define ONIG_INFINITE_DISTANCE  ~((OnigDistance )0)

/* ambiguous match flag */
typedef unsigned int OnigAmbigType;

ONIG_EXTERN OnigAmbigType OnigDefaultAmbigFlag;

#define ONIGENC_AMBIGUOUS_MATCH_NONE                   0
#define ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE            (1<<0)
#define ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE         (1<<1)
/* #define ONIGENC_AMBIGUOUS_MATCH_ACCENT             (1<<2) */
/* #define ONIGENC_AMBIGUOUS_MATCH_HIRAGANA_KATAKANA  (1<<3) */
/* #define ONIGENC_AMBIGUOUS_MATCH_KATAKANA_WIDTH     (1<<4) */

#define ONIGENC_AMBIGUOUS_MATCH_LIMIT                 (1<<1)
#define ONIGENC_AMBIGUOUS_MATCH_COMPOUND              (1<<30)

#define ONIGENC_AMBIGUOUS_MATCH_FULL \
  ( ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE | \
    ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE | \
    ONIGENC_AMBIGUOUS_MATCH_COMPOUND )
#define ONIGENC_AMBIGUOUS_MATCH_DEFAULT  OnigDefaultAmbigFlag

#define ONIGENC_MAX_COMP_AMBIG_CODE_LEN       3
#define ONIGENC_MAX_COMP_AMBIG_CODE_ITEM_NUM  4

/* code range */
#define ONIGENC_CODE_RANGE_NUM(range)     ((int )range[0])
#define ONIGENC_CODE_RANGE_FROM(range,i)  range[((i)*2) + 1]
#define ONIGENC_CODE_RANGE_TO(range,i)    range[((i)*2) + 2]

typedef struct {
  int len;
  OnigCodePoint code[ONIGENC_MAX_COMP_AMBIG_CODE_LEN];
} OnigCompAmbigCodeItem;

typedef struct {
  int n;
  OnigCodePoint code;
  OnigCompAmbigCodeItem items[ONIGENC_MAX_COMP_AMBIG_CODE_ITEM_NUM];
} OnigCompAmbigCodes;

typedef struct {
  OnigCodePoint from;
  OnigCodePoint to;
} OnigPairAmbigCodes;

typedef struct {
  OnigCodePoint esc;
  OnigCodePoint anychar;
  OnigCodePoint anytime;
  OnigCodePoint zero_or_one_time;
  OnigCodePoint one_or_more_time;
  OnigCodePoint anychar_anytime;
} OnigMetaCharTableType;

#if defined(RUBY_PLATFORM) && defined(M17N_H)

#define ONIG_RUBY_M17N
typedef m17n_encoding*        OnigEncoding;

#else

typedef struct {
  int    (*mbc_enc_len)(const UChar* p);
  const char*   name;
  int           max_enc_len;
  int           min_enc_len;
  OnigAmbigType support_ambig_flag;
  OnigMetaCharTableType meta_char_table;
  int    (*is_mbc_newline)(const UChar* p, const UChar* end);
  OnigCodePoint (*mbc_to_code)(const UChar* p, const UChar* end);
  int    (*code_to_mbclen)(OnigCodePoint code);
  int    (*code_to_mbc)(OnigCodePoint code, UChar *buf);
  int    (*mbc_to_normalize)(OnigAmbigType flag, const UChar** pp, const UChar* end, UChar* to);
  int    (*is_mbc_ambiguous)(OnigAmbigType flag, const UChar** pp, const UChar* end);
  int    (*get_all_pair_ambig_codes)(OnigAmbigType flag, OnigPairAmbigCodes** acs);
  int    (*get_all_comp_ambig_codes)(OnigAmbigType flag, OnigCompAmbigCodes** acs);
  int    (*is_code_ctype)(OnigCodePoint code, unsigned int ctype);
  int    (*get_ctype_code_range)(int ctype, OnigCodePoint* sb_range[], OnigCodePoint* mb_range[]);
  UChar* (*left_adjust_char_head)(const UChar* start, const UChar* p);
  int    (*is_allowed_reverse_match)(const UChar* p, const UChar* end);
} OnigEncodingType;

typedef OnigEncodingType* OnigEncoding;

ONIG_EXTERN OnigEncodingType OnigEncodingASCII;
ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_1;
ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_2;
ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_3;
ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_4;
ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_5;
ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_6;
ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_7;
ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_8;
ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_9;
ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_10;
ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_11;
ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_13;
ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_14;
ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_15;
ONIG_EXTERN OnigEncodingType OnigEncodingISO_8859_16;
ONIG_EXTERN OnigEncodingType OnigEncodingUTF8;
ONIG_EXTERN OnigEncodingType OnigEncodingUTF16_BE;
ONIG_EXTERN OnigEncodingType OnigEncodingUTF16_LE;
ONIG_EXTERN OnigEncodingType OnigEncodingUTF32_BE;
ONIG_EXTERN OnigEncodingType OnigEncodingUTF32_LE;
ONIG_EXTERN OnigEncodingType OnigEncodingEUC_JP;
ONIG_EXTERN OnigEncodingType OnigEncodingEUC_TW;
ONIG_EXTERN OnigEncodingType OnigEncodingEUC_KR;
ONIG_EXTERN OnigEncodingType OnigEncodingEUC_CN;
ONIG_EXTERN OnigEncodingType OnigEncodingSJIS;
ONIG_EXTERN OnigEncodingType OnigEncodingKOI8;
ONIG_EXTERN OnigEncodingType OnigEncodingKOI8_R;
ONIG_EXTERN OnigEncodingType OnigEncodingBIG5;

#define ONIG_ENCODING_ASCII        (&OnigEncodingASCII)
#define ONIG_ENCODING_ISO_8859_1   (&OnigEncodingISO_8859_1)
#define ONIG_ENCODING_ISO_8859_2   (&OnigEncodingISO_8859_2)
#define ONIG_ENCODING_ISO_8859_3   (&OnigEncodingISO_8859_3)
#define ONIG_ENCODING_ISO_8859_4   (&OnigEncodingISO_8859_4)
#define ONIG_ENCODING_ISO_8859_5   (&OnigEncodingISO_8859_5)
#define ONIG_ENCODING_ISO_8859_6   (&OnigEncodingISO_8859_6)
#define ONIG_ENCODING_ISO_8859_7   (&OnigEncodingISO_8859_7)
#define ONIG_ENCODING_ISO_8859_8   (&OnigEncodingISO_8859_8)
#define ONIG_ENCODING_ISO_8859_9   (&OnigEncodingISO_8859_9)
#define ONIG_ENCODING_ISO_8859_10  (&OnigEncodingISO_8859_10)
#define ONIG_ENCODING_ISO_8859_11  (&OnigEncodingISO_8859_11)
#define ONIG_ENCODING_ISO_8859_13  (&OnigEncodingISO_8859_13)
#define ONIG_ENCODING_ISO_8859_14  (&OnigEncodingISO_8859_14)
#define ONIG_ENCODING_ISO_8859_15  (&OnigEncodingISO_8859_15)
#define ONIG_ENCODING_ISO_8859_16  (&OnigEncodingISO_8859_16)
#define ONIG_ENCODING_UTF8         (&OnigEncodingUTF8)
#define ONIG_ENCODING_UTF16_BE     (&OnigEncodingUTF16_BE)
#define ONIG_ENCODING_UTF16_LE     (&OnigEncodingUTF16_LE)
#define ONIG_ENCODING_UTF32_BE     (&OnigEncodingUTF32_BE)
#define ONIG_ENCODING_UTF32_LE     (&OnigEncodingUTF32_LE)
#define ONIG_ENCODING_EUC_JP       (&OnigEncodingEUC_JP)
#define ONIG_ENCODING_EUC_TW       (&OnigEncodingEUC_TW)
#define ONIG_ENCODING_EUC_KR       (&OnigEncodingEUC_KR)
#define ONIG_ENCODING_EUC_CN       (&OnigEncodingEUC_CN)
#define ONIG_ENCODING_SJIS         (&OnigEncodingSJIS)
#define ONIG_ENCODING_KOI8         (&OnigEncodingKOI8)
#define ONIG_ENCODING_KOI8_R       (&OnigEncodingKOI8_R)
#define ONIG_ENCODING_BIG5         (&OnigEncodingBIG5)

#endif /* else RUBY && M17N */

#define ONIG_ENCODING_UNDEF    ((OnigEncoding )0)

/* work size */
#define ONIGENC_CODE_TO_MBC_MAXLEN      7
#define ONIGENC_MBC_NORMALIZE_MAXLEN    ONIGENC_CODE_TO_MBC_MAXLEN

/* character types */
#define ONIGENC_CTYPE_NEWLINE  (1<< 0)
#define ONIGENC_CTYPE_ALPHA    (1<< 1)
#define ONIGENC_CTYPE_BLANK    (1<< 2)
#define ONIGENC_CTYPE_CNTRL    (1<< 3)
#define ONIGENC_CTYPE_DIGIT    (1<< 4)
#define ONIGENC_CTYPE_GRAPH    (1<< 5)
#define ONIGENC_CTYPE_LOWER    (1<< 6)
#define ONIGENC_CTYPE_PRINT    (1<< 7)
#define ONIGENC_CTYPE_PUNCT    (1<< 8)
#define ONIGENC_CTYPE_SPACE    (1<< 9)
#define ONIGENC_CTYPE_UPPER    (1<<10)
#define ONIGENC_CTYPE_XDIGIT   (1<<11)
#define ONIGENC_CTYPE_WORD     (1<<12)
#define ONIGENC_CTYPE_ASCII    (1<<13)
#define ONIGENC_CTYPE_ALNUM    (ONIGENC_CTYPE_ALPHA | ONIGENC_CTYPE_DIGIT)

#define enc_len(enc,p)                ONIGENC_MBC_ENC_LEN(enc, p)

#define ONIGENC_IS_UNDEF(enc)          ((enc) == ONIG_ENCODING_UNDEF)
#define ONIGENC_IS_SINGLEBYTE(enc)     (ONIGENC_MBC_MAXLEN(enc) == 1)
#define ONIGENC_IS_MBC_HEAD(enc,p)     (ONIGENC_MBC_ENC_LEN(enc,p) != 1)
#define ONIGENC_IS_MBC_ASCII(p)           (*(p)   < 128)
#define ONIGENC_IS_CODE_ASCII(code)       ((code) < 128)
#define ONIGENC_IS_CODE_SB_WORD(enc,code) \
  (ONIGENC_IS_CODE_ASCII(code) && ONIGENC_IS_CODE_WORD(enc,code))
#define ONIGENC_IS_MBC_WORD(enc,s,end) \
   ONIGENC_IS_CODE_WORD(enc,ONIGENC_MBC_TO_CODE(enc,s,end))

#ifdef ONIG_RUBY_M17N

#include <ctype.h> /* for isblank(), isgraph() */

#define ONIGENC_MBC_TO_NORMALIZE(enc,flag,pp,end,buf) \
        onigenc_mbc_to_normalize(enc,flag,pp,end,buf)
#define ONIGENC_IS_MBC_AMBIGUOUS(enc,flag,pp,end) \
        onigenc_is_mbc_ambiguous(enc,flag,pp,end)

#define ONIGENC_SUPPORT_AMBIG_FLAG(enc)     ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE
#define ONIGENC_IS_ALLOWED_REVERSE_MATCH(enc,s,end) \
        onigenc_is_allowed_reverse_match(enc, s, end)
#define ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc,start,s) \
        onigenc_get_left_adjust_char_head(enc, start, s)
#define ONIGENC_GET_ALL_PAIR_AMBIG_CODES(enc, ambig_flag, acs)    0
#define ONIGENC_GET_ALL_COMP_AMBIG_CODES(enc, ambig_flag, acs)    0
#define ONIGENC_GET_CTYPE_CODE_RANGE(enc,ctype,sbr,mbr) \
        ONIG_NO_SUPPORT_CONFIG
#define ONIGENC_MBC_ENC_LEN(enc,p)            m17n_mbclen(enc,(int )(*p))
#define ONIGENC_MBC_MAXLEN(enc)               m17n_mbmaxlen(enc)
#define ONIGENC_MBC_MAXLEN_DIST(enc) \
    (ONIGENC_MBC_MAXLEN(enc) > 0 ? ONIGENC_MBC_MAXLEN(enc) \
                                 : ONIG_INFINITE_DISTANCE)
#define ONIGENC_MBC_MINLEN(enc)            1
#define ONIGENC_MBC_TO_CODE(enc,p,e)       m17n_codepoint((enc),(p),(e))
#define ONIGENC_CODE_TO_MBCLEN(enc,code)   m17n_codelen((enc),(code))
#define ONIGENC_CODE_TO_MBC(enc,code,buf)  onigenc_code_to_mbc(enc, code, buf)

#if 0     /* !! not supported !! */
#define ONIGENC_IS_MBC_NEWLINE(enc,p,end)
#define ONIGENC_STEP_BACK(enc,start,s,n)
#endif

#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype) \
        onigenc_is_code_ctype(enc,code,ctype)

#ifdef isblank
# define ONIGENC_IS_CODE_BLANK(enc,code) isblank((int )code)
#else
# define ONIGENC_IS_CODE_BLANK(enc,code) ((code) == ' ' || (code) == '\t')
#endif
#ifdef isgraph
# define ONIGENC_IS_CODE_GRAPH(enc,code) isgraph((int )code)
#else
# define ONIGENC_IS_CODE_GRAPH(enc,code) \
  (isprint((int )code) && !isspace((int )code))
#endif

#define ONIGENC_IS_CODE_PRINT(enc,code)     m17n_isprint(enc,code)
#define ONIGENC_IS_CODE_ALNUM(enc,code)     m17n_isalnum(enc,code)
#define ONIGENC_IS_CODE_ALPHA(enc,code)     m17n_isalpha(enc,code)
#define ONIGENC_IS_CODE_LOWER(enc,code)     m17n_islower(enc,code)
#define ONIGENC_IS_CODE_UPPER(enc,code)     m17n_isupper(enc,code)
#define ONIGENC_IS_CODE_CNTRL(enc,code)     m17n_iscntrl(enc,code)
#define ONIGENC_IS_CODE_PUNCT(enc,code)     m17n_ispunct(enc,code)
#define ONIGENC_IS_CODE_SPACE(enc,code)     m17n_isspace(enc,code)
#define ONIGENC_IS_CODE_DIGIT(enc,code)     m17n_isdigit(enc,code)
#define ONIGENC_IS_CODE_XDIGIT(enc,code)    m17n_isxdigit(enc,code)
#define ONIGENC_IS_CODE_WORD(enc,code)      m17n_iswchar(enc,code)

ONIG_EXTERN
int onigenc_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, int ctype));
ONIG_EXTERN
int onigenc_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf));
ONIG_EXTERN
int onigenc_mbc_to_normalize P_((OnigEncoding enc, OnigAmbigType flag, const UChar** pp, const UChar* end, UChar* buf));
ONIG_EXTERN
int onigenc_is_mbc_ambiguous P_((OnigEncoding enc, OnigAmbigType flag, const UChar** pp, const UChar* end));
ONIG_EXTERN
int onigenc_is_allowed_reverse_match P_((OnigEncoding enc, const UChar* s, const UChar* end));

#else  /* ONIG_RUBY_M17N */

#define ONIGENC_NAME(enc)                      ((enc)->name)

#define ONIGENC_MBC_TO_NORMALIZE(enc,flag,pp,end,buf) \
  (enc)->mbc_to_normalize(flag,(const UChar** )pp,end,buf)
#define ONIGENC_IS_MBC_AMBIGUOUS(enc,flag,pp,end) \
  (enc)->is_mbc_ambiguous(flag,(const UChar** )pp,end)
#define ONIGENC_SUPPORT_AMBIG_FLAG(enc)        ((enc)->support_ambig_flag)
#define ONIGENC_IS_ALLOWED_REVERSE_MATCH(enc,s,end) \
        (enc)->is_allowed_reverse_match(s,end)
#define ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc,start,s) \
        (enc)->left_adjust_char_head(start, s)
#define ONIGENC_GET_ALL_PAIR_AMBIG_CODES(enc,ambig_flag,acs) \
        (enc)->get_all_pair_ambig_codes(ambig_flag,acs)
#define ONIGENC_GET_ALL_COMP_AMBIG_CODES(enc,ambig_flag,acs) \
        (enc)->get_all_comp_ambig_codes(ambig_flag,acs)
#define ONIGENC_STEP_BACK(enc,start,s,n) \
        onigenc_step_back((enc),(start),(s),(n))

#define ONIGENC_MBC_ENC_LEN(enc,p)             (enc)->mbc_enc_len(p)
#define ONIGENC_MBC_MAXLEN(enc)               ((enc)->max_enc_len)
#define ONIGENC_MBC_MAXLEN_DIST(enc)           ONIGENC_MBC_MAXLEN(enc)
#define ONIGENC_MBC_MINLEN(enc)               ((enc)->min_enc_len)
#define ONIGENC_IS_MBC_NEWLINE(enc,p,end)      (enc)->is_mbc_newline((p),(end))
#define ONIGENC_MBC_TO_CODE(enc,p,end)         (enc)->mbc_to_code((p),(end))
#define ONIGENC_CODE_TO_MBCLEN(enc,code)       (enc)->code_to_mbclen(code)
#define ONIGENC_CODE_TO_MBC(enc,code,buf)      (enc)->code_to_mbc(code,buf)

#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype)  (enc)->is_code_ctype(code,ctype)

#define ONIGENC_IS_CODE_NEWLINE(enc,code) \
        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_NEWLINE)
#define ONIGENC_IS_CODE_GRAPH(enc,code) \
        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_GRAPH)
#define ONIGENC_IS_CODE_PRINT(enc,code) \
        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_PRINT)
#define ONIGENC_IS_CODE_ALNUM(enc,code) \
        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_ALNUM)
#define ONIGENC_IS_CODE_ALPHA(enc,code) \
        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_ALPHA)
#define ONIGENC_IS_CODE_LOWER(enc,code) \
        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_LOWER)
#define ONIGENC_IS_CODE_UPPER(enc,code) \
        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_UPPER)
#define ONIGENC_IS_CODE_CNTRL(enc,code) \
        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_CNTRL)
#define ONIGENC_IS_CODE_PUNCT(enc,code) \
        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_PUNCT)
#define ONIGENC_IS_CODE_SPACE(enc,code) \
        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_SPACE)
#define ONIGENC_IS_CODE_BLANK(enc,code) \
        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_BLANK)
#define ONIGENC_IS_CODE_DIGIT(enc,code) \
        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_DIGIT)
#define ONIGENC_IS_CODE_XDIGIT(enc,code) \
        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_XDIGIT)
#define ONIGENC_IS_CODE_WORD(enc,code) \
        ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_WORD)

#define ONIGENC_GET_CTYPE_CODE_RANGE(enc,ctype,sbr,mbr) \
        (enc)->get_ctype_code_range(ctype,sbr,mbr)

ONIG_EXTERN
UChar* onigenc_step_back P_((OnigEncoding enc, const UChar* start, const UChar* s, int n));

#endif /* is not ONIG_RUBY_M17N */

/* encoding API */
ONIG_EXTERN
int onigenc_init P_(());
ONIG_EXTERN
int onigenc_set_default_encoding P_((OnigEncoding enc));
ONIG_EXTERN
OnigEncoding onigenc_get_default_encoding P_(());
ONIG_EXTERN
void  onigenc_set_default_caseconv_table P_((const UChar* table));
ONIG_EXTERN
UChar* onigenc_get_right_adjust_char_head_with_prev P_((OnigEncoding enc, const UChar* start, const UChar* s, const UChar** prev));
ONIG_EXTERN
UChar* onigenc_get_prev_char_head P_((OnigEncoding enc, const UChar* start, const UChar* s));
ONIG_EXTERN
UChar* onigenc_get_left_adjust_char_head P_((OnigEncoding enc, const UChar* start, const UChar* s));
ONIG_EXTERN
UChar* onigenc_get_right_adjust_char_head P_((OnigEncoding enc, const UChar* start, const UChar* s));
ONIG_EXTERN
int onigenc_strlen P_((OnigEncoding enc, const UChar* p, const UChar* end));
ONIG_EXTERN
int onigenc_strlen_null P_((OnigEncoding enc, const UChar* p));
ONIG_EXTERN
int onigenc_str_bytelen_null P_((OnigEncoding enc, const UChar* p));

/* PART: regular expression */

/* config parameters */
#define ONIG_NREGION                          10
#define ONIG_MAX_BACKREF_NUM                1000
#define ONIG_MAX_REPEAT_NUM               100000
#define ONIG_MAX_MULTI_BYTE_RANGES_NUM      1000
/* constants */
#define ONIG_MAX_ERROR_MESSAGE_LEN            90

typedef unsigned int        OnigOptionType;

#define ONIG_OPTION_DEFAULT            ONIG_OPTION_NONE

/* options */
#define ONIG_OPTION_NONE                 0
#define ONIG_OPTION_IGNORECASE           1L
#define ONIG_OPTION_EXTEND               (ONIG_OPTION_IGNORECASE         << 1)
#define ONIG_OPTION_MULTILINE            (ONIG_OPTION_EXTEND             << 1)
#define ONIG_OPTION_SINGLELINE           (ONIG_OPTION_MULTILINE          << 1)
#define ONIG_OPTION_FIND_LONGEST         (ONIG_OPTION_SINGLELINE         << 1)
#define ONIG_OPTION_FIND_NOT_EMPTY       (ONIG_OPTION_FIND_LONGEST       << 1)
#define ONIG_OPTION_NEGATE_SINGLELINE    (ONIG_OPTION_FIND_NOT_EMPTY     << 1)
#define ONIG_OPTION_DONT_CAPTURE_GROUP   (ONIG_OPTION_NEGATE_SINGLELINE  << 1)
#define ONIG_OPTION_CAPTURE_GROUP        (ONIG_OPTION_DONT_CAPTURE_GROUP << 1)
/* options (search time) */
#define ONIG_OPTION_NOTBOL               (ONIG_OPTION_CAPTURE_GROUP << 1)
#define ONIG_OPTION_NOTEOL               (ONIG_OPTION_NOTBOL << 1)
#define ONIG_OPTION_POSIX_REGION         (ONIG_OPTION_NOTEOL << 1)

#define ONIG_OPTION_ON(options,regopt)      ((options) |= (regopt))
#define ONIG_OPTION_OFF(options,regopt)     ((options) &= ~(regopt))
#define ONIG_IS_OPTION_ON(options,option)   ((options) & (option))

/* syntax */
typedef struct {
  unsigned int  op;
  unsigned int  op2;
  unsigned int  behavior;
  OnigOptionType options;    /* default option */
} OnigSyntaxType;

ONIG_EXTERN OnigSyntaxType OnigSyntaxPosixBasic;
ONIG_EXTERN OnigSyntaxType OnigSyntaxPosixExtended;
ONIG_EXTERN OnigSyntaxType OnigSyntaxEmacs;
ONIG_EXTERN OnigSyntaxType OnigSyntaxGrep;
ONIG_EXTERN OnigSyntaxType OnigSyntaxGnuRegex;
ONIG_EXTERN OnigSyntaxType OnigSyntaxJava;
ONIG_EXTERN OnigSyntaxType OnigSyntaxPerl;
ONIG_EXTERN OnigSyntaxType OnigSyntaxRuby;

/* predefined syntaxes (see regsyntax.c) */
#define ONIG_SYNTAX_POSIX_BASIC        (&OnigSyntaxPosixBasic)
#define ONIG_SYNTAX_POSIX_EXTENDED     (&OnigSyntaxPosixExtended)
#define ONIG_SYNTAX_EMACS              (&OnigSyntaxEmacs)
#define ONIG_SYNTAX_GREP               (&OnigSyntaxGrep)
#define ONIG_SYNTAX_GNU_REGEX          (&OnigSyntaxGnuRegex)
#define ONIG_SYNTAX_JAVA               (&OnigSyntaxJava)
#define ONIG_SYNTAX_PERL               (&OnigSyntaxPerl)
#define ONIG_SYNTAX_RUBY               (&OnigSyntaxRuby)

/* default syntax */
ONIG_EXTERN OnigSyntaxType*   OnigDefaultSyntax;
#define ONIG_SYNTAX_DEFAULT   OnigDefaultSyntax

/* syntax (operators) */
#define ONIG_SYN_OP_VARIABLE_META_CHARACTERS    (1<<0)
#define ONIG_SYN_OP_DOT_ANYCHAR                 (1<<1)   /* . */
#define ONIG_SYN_OP_ASTERISK_ZERO_INF           (1<<2)   /* * */
#define ONIG_SYN_OP_ESC_ASTERISK_ZERO_INF       (1<<3)
#define ONIG_SYN_OP_PLUS_ONE_INF                (1<<4)   /* + */
#define ONIG_SYN_OP_ESC_PLUS_ONE_INF            (1<<5)
#define ONIG_SYN_OP_QMARK_ZERO_ONE              (1<<6)   /* ? */
#define ONIG_SYN_OP_ESC_QMARK_ZERO_ONE          (1<<7)
#define ONIG_SYN_OP_BRACE_INTERVAL              (1<<8)   /* {lower,upper} */
#define ONIG_SYN_OP_ESC_BRACE_INTERVAL          (1<<9)   /* \{lower,upper\} */
#define ONIG_SYN_OP_VBAR_ALT                    (1<<10)   /* | */
#define ONIG_SYN_OP_ESC_VBAR_ALT                (1<<11)  /* \| */
#define ONIG_SYN_OP_LPAREN_SUBEXP               (1<<12)  /* (...)   */
#define ONIG_SYN_OP_ESC_LPAREN_SUBEXP           (1<<13)  /* \(...\) */
#define ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR           (1<<14)  /* \A, \Z, \z */
#define ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR  (1<<15)  /* \G     */
#define ONIG_SYN_OP_DECIMAL_BACKREF             (1<<16)  /* \num   */
#define ONIG_SYN_OP_BRACKET_CC                  (1<<17)  /* [...]  */
#define ONIG_SYN_OP_ESC_W_WORD                  (1<<18)  /* \w, \W */
#define ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END     (1<<19)  /* \<. \> */
#define ONIG_SYN_OP_ESC_B_WORD_BOUND            (1<<20)  /* \b, \B */
#define ONIG_SYN_OP_ESC_S_WHITE_SPACE           (1<<21)  /* \s, \S */
#define ONIG_SYN_OP_ESC_D_DIGIT                 (1<<22)  /* \d, \D */
#define ONIG_SYN_OP_LINE_ANCHOR                 (1<<23)  /* ^, $   */
#define ONIG_SYN_OP_POSIX_BRACKET               (1<<24)  /* [:xxxx:] */
#define ONIG_SYN_OP_QMARK_NON_GREEDY            (1<<25)  /* ??,*?,+?,{n,m}? */
#define ONIG_SYN_OP_ESC_CONTROL_CHARS           (1<<26)  /* \n,\r,\t,\a ... */
#define ONIG_SYN_OP_ESC_C_CONTROL               (1<<27)  /* \cx  */
#define ONIG_SYN_OP_ESC_OCTAL3                  (1<<28)  /* \OOO */
#define ONIG_SYN_OP_ESC_X_HEX2                  (1<<29)  /* \xHH */
#define ONIG_SYN_OP_ESC_X_BRACE_HEX8            (1<<30)  /* \x{7HHHHHHH} */

#define ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE        (1<<0)   /* \Q...\E */
#define ONIG_SYN_OP2_QMARK_GROUP_EFFECT         (1<<1)   /* (?...) */
#define ONIG_SYN_OP2_OPTION_PERL                (1<<2)   /* (?imsx),(?-imsx) */
#define ONIG_SYN_OP2_OPTION_RUBY                (1<<3)   /* (?imx), (?-imx)  */
#define ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT     (1<<4)   /* ?+,*+,++ */
#define ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL   (1<<5)   /* {n,m}+   */
#define ONIG_SYN_OP2_CCLASS_SET_OP              (1<<6)   /* [...&&..[..]..] */
#define ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP       (1<<7)   /* (?<name>...) */
#define ONIG_SYN_OP2_ESC_K_NAMED_BACKREF        (1<<8)   /* \k<name> */
#define ONIG_SYN_OP2_ESC_G_SUBEXP_CALL          (1<<9)   /* \g<name>, \g<n> */
#define ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY     (1<<10)  /* (?@..),(?@<x>..) */
#define ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL  (1<<11)  /* \C-x */
#define ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META     (1<<12)  /* \M-x */
#define ONIG_SYN_OP2_ESC_V_VTAB                 (1<<13)  /* \v as VTAB */
#define ONIG_SYN_OP2_ESC_U_HEX4                 (1<<14)  /* \uHHHH */
#define ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR         (1<<15)  /* \`, \' */
#define ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY  (1<<16)  /* \p{...}, \P{...} */
#define ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT (1<<17)  /* \p{^..}, \P{^..} */
#define ONIG_SYN_OP2_CHAR_PROPERTY_PREFIX_IS    (1<<18)  /* \p{IsXDigit} */
#define ONIG_SYN_OP2_ESC_H_XDIGIT               (1<<19)  /* \h, \H */

/* syntax (behavior) */
#define ONIG_SYN_CONTEXT_INDEP_ANCHORS           (1<<31) /* not implemented */
#define ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS        (1<<0)  /* ?, *, +, {n,m} */
#define ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS      (1<<1)  /* error or ignore */
#define ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP    (1<<2)  /* ...)... */
#define ONIG_SYN_ALLOW_INVALID_INTERVAL          (1<<3)  /* {??? */
#define ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV       (1<<4)  /* {,n} => {0,n} */
#define ONIG_SYN_STRICT_CHECK_BACKREF            (1<<5)  /* /(\1)/,/\1()/ ..*/
#define ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND   (1<<6)  /* (?<=a|bc) */
#define ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP        (1<<7)  /* see doc/RE */
#define ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME (1<<8)  /* (?<x>)(?<x>) */
#define ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY   (1<<9)  /* a{n}?=(?:a{n})? */

/* syntax (behavior) in char class [...] */
#define ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC      (1<<20) /* [^...] */
#define ONIG_SYN_BACKSLASH_ESCAPE_IN_CC          (1<<21) /* [..\w..] etc.. */
#define ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC         (1<<22)
#define ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC     (1<<23) /* [0-9-a]=[0-9\-a] */
/* syntax (behavior) warning */
#define ONIG_SYN_WARN_CC_OP_NOT_ESCAPED          (1<<24) /* [,-,] */
#define ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT    (1<<25) /* (?:a*)+ */

/* meta character specifiers (onig_set_meta_char()) */
#define ONIG_META_CHAR_ESCAPE               0
#define ONIG_META_CHAR_ANYCHAR              1
#define ONIG_META_CHAR_ANYTIME              2
#define ONIG_META_CHAR_ZERO_OR_ONE_TIME     3
#define ONIG_META_CHAR_ONE_OR_MORE_TIME     4
#define ONIG_META_CHAR_ANYCHAR_ANYTIME      5

#define ONIG_INEFFECTIVE_META_CHAR          0

/* error codes */
#define ONIG_IS_PATTERN_ERROR(ecode)   ((ecode) <= -100 && (ecode) > -1000)
/* normal return */
#define ONIG_NORMAL                                            0
#define ONIG_MISMATCH                                         -1
#define ONIG_NO_SUPPORT_CONFIG                                -2

/* internal error */
#define ONIGERR_MEMORY                                         -5
#define ONIGERR_TYPE_BUG                                       -6
#define ONIGERR_PARSER_BUG                                    -11
#define ONIGERR_STACK_BUG                                     -12
#define ONIGERR_UNDEFINED_BYTECODE                            -13
#define ONIGERR_UNEXPECTED_BYTECODE                           -14
#define ONIGERR_MATCH_STACK_LIMIT_OVER                        -15
#define ONIGERR_DEFAULT_ENCODING_IS_NOT_SETTED                -21
#define ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR  -22
/* general error */
#define ONIGERR_INVALID_ARGUMENT                              -30
/* syntax error */
#define ONIGERR_END_PATTERN_AT_LEFT_BRACE                    -100
#define ONIGERR_END_PATTERN_AT_LEFT_BRACKET                  -101
#define ONIGERR_EMPTY_CHAR_CLASS                             -102
#define ONIGERR_PREMATURE_END_OF_CHAR_CLASS                  -103
#define ONIGERR_END_PATTERN_AT_ESCAPE                        -104
#define ONIGERR_END_PATTERN_AT_META                          -105
#define ONIGERR_END_PATTERN_AT_CONTROL                       -106
#define ONIGERR_META_CODE_SYNTAX                             -108
#define ONIGERR_CONTROL_CODE_SYNTAX                          -109
#define ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE             -110
#define ONIGERR_CHAR_CLASS_VALUE_AT_START_OF_RANGE           -111
#define ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS      -112
#define ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED      -113
#define ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID            -114
#define ONIGERR_NESTED_REPEAT_OPERATOR                       -115
#define ONIGERR_UNMATCHED_CLOSE_PARENTHESIS                  -116
#define ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS       -117
#define ONIGERR_END_PATTERN_IN_GROUP                         -118
#define ONIGERR_UNDEFINED_GROUP_OPTION                       -119
#define ONIGERR_INVALID_POSIX_BRACKET_TYPE                   -121
#define ONIGERR_INVALID_LOOK_BEHIND_PATTERN                  -122
#define ONIGERR_INVALID_REPEAT_RANGE_PATTERN                 -123
/* values error (syntax error) */
#define ONIGERR_TOO_BIG_NUMBER                               -200
#define ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE              -201
#define ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE     -202
#define ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS                    -203
#define ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE          -204
#define ONIGERR_TOO_MANY_MULTI_BYTE_RANGES                   -205
#define ONIGERR_TOO_SHORT_MULTI_BYTE_STRING                  -206
#define ONIGERR_TOO_BIG_BACKREF_NUMBER                       -207
#define ONIGERR_INVALID_BACKREF                              -208
#define ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED         -209
#define ONIGERR_TOO_LONG_WIDE_CHAR_VALUE                     -212
#define ONIGERR_EMPTY_GROUP_NAME                             -214
#define ONIGERR_INVALID_GROUP_NAME                           -215
#define ONIGERR_INVALID_CHAR_IN_GROUP_NAME                   -216
#define ONIGERR_UNDEFINED_NAME_REFERENCE                     -217
#define ONIGERR_UNDEFINED_GROUP_REFERENCE                    -218
#define ONIGERR_MULTIPLEX_DEFINED_NAME                       -219
#define ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL               -220
#define ONIGERR_NEVER_ENDING_RECURSION                       -221
#define ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY        -222
#define ONIGERR_INVALID_CHAR_PROPERTY_NAME                   -223
#define ONIGERR_INVALID_WIDE_CHAR_VALUE                      -400
#define ONIGERR_TOO_BIG_WIDE_CHAR_VALUE                      -401
#define ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION           -402

/* errors related to thread */
#define ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT                -1001

/* must be smaller than BIT_STATUS_BITS_NUM (unsigned int * 8) */
#define ONIG_MAX_CAPTURE_HISTORY_GROUP   31
#define ONIG_IS_CAPTURE_HISTORY_GROUP(r, i) \
  ((i) <= ONIG_MAX_CAPTURE_HISTORY_GROUP && (r)->list && (r)->list[i])

typedef struct OnigCaptureTreeNodeStruct {
  int group;   /* group number */
  int beg;
  int end;
  int allocated;
  int num_childs;
  struct OnigCaptureTreeNodeStruct** childs;
} OnigCaptureTreeNode;

/* match result region type */
struct re_registers {
  int  allocated;
  int  num_regs;
  int* beg;
  int* end;
  /* extended */
  OnigCaptureTreeNode* history_root;  /* capture history tree root */
};

/* capture tree traverse */
#define ONIG_TRAVERSE_CALLBACK_AT_FIRST   1
#define ONIG_TRAVERSE_CALLBACK_AT_LAST    2
#define ONIG_TRAVERSE_CALLBACK_AT_BOTH \
  ( ONIG_TRAVERSE_CALLBACK_AT_FIRST | ONIG_TRAVERSE_CALLBACK_AT_LAST )

#define ONIG_REGION_NOTPOS            -1

typedef struct re_registers   OnigRegion;

typedef struct {
  UChar* par;
  UChar* par_end;
} OnigErrorInfo;

typedef struct {
  int lower;
  int upper;
} OnigRepeatRange;

typedef void (*OnigWarnFunc) P_((const char* s, ...));
extern void onig_null_warn P_((const char* s, ...));
#define ONIG_NULL_WARN       onig_null_warn

#define ONIG_CHAR_TABLE_SIZE   256

/* regex_t state */
#define ONIG_STATE_NORMAL              0
#define ONIG_STATE_SEARCHING           1
#define ONIG_STATE_COMPILING          -1
#define ONIG_STATE_MODIFY             -2

#define ONIG_STATE(reg) \
  ((reg)->state > 0 ? ONIG_STATE_SEARCHING : (reg)->state)

typedef struct re_pattern_buffer {
  /* common members of BBuf(bytes-buffer) */
  unsigned char* p;         /* compiled pattern */
  unsigned int used;        /* used space for p */
  unsigned int alloc;       /* allocated space for p */

  int state;                     /* normal, searching, compiling */
  int num_mem;                   /* used memory(...) num counted from 1 */
  int num_repeat;                /* OP_REPEAT/OP_REPEAT_NG id-counter */
  int num_null_check;            /* OP_NULL_CHECK_START/END id counter */
  int num_call;                  /* number of subexp call */
  unsigned int capture_history;  /* (?@...) flag (1-31) */
  unsigned int bt_mem_start;     /* need backtrack flag */
  unsigned int bt_mem_end;       /* need backtrack flag */
  int stack_pop_level;
  int repeat_range_alloc;
  OnigRepeatRange* repeat_range;

  OnigEncoding  enc;
  OnigOptionType    options;
  OnigSyntaxType*   syntax;
  OnigAmbigType     ambig_flag;
  void*             name_table;

  /* optimization info (string search, char-map and anchors) */
  int            optimize;          /* optimize flag */
  int            threshold_len;     /* search str-length for apply optimize */
  int            anchor;            /* BEGIN_BUF, BEGIN_POS, (SEMI_)END_BUF */
  OnigDistance   anchor_dmin;       /* (SEMI_)END_BUF anchor distance */
  OnigDistance   anchor_dmax;       /* (SEMI_)END_BUF anchor distance */
  int            sub_anchor;        /* start-anchor for exact or map */
  unsigned char *exact;
  unsigned char *exact_end;
  unsigned char  map[ONIG_CHAR_TABLE_SIZE]; /* used as BM skip or char-map */
  int           *int_map;                   /* BM skip for exact_len > 255 */
  int           *int_map_backward;          /* BM skip for backward search */
  OnigDistance   dmin;                      /* min-distance of exact or map */
  OnigDistance   dmax;                      /* max-distance of exact or map */

  /* regex_t link chain */
  struct re_pattern_buffer* chain;  /* escape compile-conflict */
} regex_t;

typedef struct {
  int             num_of_elements;
  OnigEncoding    pattern_enc;
  OnigEncoding    target_enc;
  OnigSyntaxType* syntax;
  OnigOptionType  option;
  OnigAmbigType   ambig_flag;
} OnigCompileInfo;

/* Oniguruma Native API */
ONIG_EXTERN
int onig_init P_((void));
ONIG_EXTERN
int onig_error_code_to_str PV_((UChar* s, int err_code, ...));
ONIG_EXTERN
void onig_set_warn_func P_((OnigWarnFunc f));
ONIG_EXTERN
void onig_set_verb_warn_func P_((OnigWarnFunc f));
ONIG_EXTERN
int onig_new P_((regex_t**, const UChar* pattern, const UChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo));
ONIG_EXTERN
int onig_new_deluxe P_((regex_t** reg, const UChar* pattern, const UChar* pattern_end, OnigCompileInfo* ci, OnigErrorInfo* einfo));
ONIG_EXTERN
void onig_free P_((regex_t*));
ONIG_EXTERN
int onig_recompile P_((regex_t*, const UChar* pattern, const UChar* pattern_end, OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax, OnigErrorInfo* einfo));
ONIG_EXTERN
int onig_recompile_deluxe P_((regex_t* reg, const UChar* pattern, const UChar* pattern_end, OnigCompileInfo* ci, OnigErrorInfo* einfo));
ONIG_EXTERN
int onig_search P_((regex_t*, const UChar* str, const UChar* end, const UChar* start, const UChar* range, OnigRegion* region, OnigOptionType option));
ONIG_EXTERN
int onig_match P_((regex_t*, const UChar* str, const UChar* end, const UChar* at, OnigRegion* region, OnigOptionType option));
ONIG_EXTERN
OnigRegion* onig_region_new P_((void));
ONIG_EXTERN
void onig_region_init P_((OnigRegion* region));
ONIG_EXTERN
void onig_region_free P_((OnigRegion* region, int free_self));
ONIG_EXTERN
void onig_region_copy P_((OnigRegion* to, OnigRegion* from));
ONIG_EXTERN
void onig_region_clear P_((OnigRegion* region));
ONIG_EXTERN
int onig_region_resize P_((OnigRegion* region, int n));
ONIG_EXTERN
int onig_region_set P_((OnigRegion* region, int at, int beg, int end));
ONIG_EXTERN
int onig_name_to_group_numbers P_((regex_t* reg, const UChar* name, const UChar* name_end, int** nums));
ONIG_EXTERN
int onig_name_to_backref_number P_((regex_t* reg, const UChar* name, const UChar* name_end, OnigRegion *region));
ONIG_EXTERN
int onig_foreach_name P_((regex_t* reg, int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*), void* arg));
ONIG_EXTERN
int onig_number_of_names P_((regex_t* reg));
ONIG_EXTERN
int onig_number_of_captures P_((regex_t* reg));
ONIG_EXTERN
int onig_number_of_capture_histories P_((regex_t* reg));
ONIG_EXTERN
OnigCaptureTreeNode* onig_get_capture_tree P_((OnigRegion* region));
ONIG_EXTERN
int onig_capture_tree_traverse P_((OnigRegion* region, int at, int(*callback_func)(int,int,int,int,int,void*), void* arg));
ONIG_EXTERN
OnigEncoding onig_get_encoding P_((regex_t* reg));
ONIG_EXTERN
OnigOptionType onig_get_options P_((regex_t* reg));
ONIG_EXTERN
OnigAmbigType onig_get_ambig_flag P_((regex_t* reg));
ONIG_EXTERN
OnigSyntaxType* onig_get_syntax P_((regex_t* reg));
ONIG_EXTERN
int onig_set_default_syntax P_((OnigSyntaxType* syntax));
ONIG_EXTERN
void onig_copy_syntax P_((OnigSyntaxType* to, OnigSyntaxType* from));
ONIG_EXTERN
unsigned int onig_get_syntax_op P_((OnigSyntaxType* syntax));
ONIG_EXTERN
unsigned int onig_get_syntax_op2 P_((OnigSyntaxType* syntax));
ONIG_EXTERN
unsigned int onig_get_syntax_behavior P_((OnigSyntaxType* syntax));
ONIG_EXTERN
OnigOptionType onig_get_syntax_options P_((OnigSyntaxType* syntax));
ONIG_EXTERN
void onig_set_syntax_op P_((OnigSyntaxType* syntax, unsigned int op));
ONIG_EXTERN
void onig_set_syntax_op2 P_((OnigSyntaxType* syntax, unsigned int op2));
ONIG_EXTERN
void onig_set_syntax_behavior P_((OnigSyntaxType* syntax, unsigned int behavior));
ONIG_EXTERN
void onig_set_syntax_options P_((OnigSyntaxType* syntax, OnigOptionType options));
ONIG_EXTERN
int onig_set_meta_char P_((OnigEncoding enc, unsigned int what, OnigCodePoint code));
ONIG_EXTERN
void onig_copy_encoding P_((OnigEncoding to, OnigEncoding from));
ONIG_EXTERN
OnigAmbigType onig_get_default_ambig_flag P_(());
ONIG_EXTERN
int onig_set_default_ambig_flag P_((OnigAmbigType ambig_flag));
ONIG_EXTERN
unsigned int onig_get_match_stack_limit_size P_((void));
ONIG_EXTERN
int onig_set_match_stack_limit_size P_((unsigned int size));
ONIG_EXTERN
int onig_end P_((void));
ONIG_EXTERN
const char* onig_version P_((void));
ONIG_EXTERN
const char* onig_copyright P_((void));

#ifdef __cplusplus
}
#endif

#endif /* ONIGURUMA_H */
/* [<][>][^] [v] [top][bottom][index] [help] */


pack.c

root/pack.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. define_swapx
  2. swapd
  3. define_swapx
  4. num2i32
  5. pack_pack
  6. encodes
  7. qpencode
  8. hex2num
  9. infected_str_new
  10. pack_unpack
  11. uv_to_utf8
  12. utf8_to_uv
  13. Init_pack
/**********************************************************************

  pack.c -

  $Author: nobu $
  $Date: 2005/10/13 14:30:35 $
  created at: Thu Feb 10 15:17:05 JST 1994

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#include "ruby.h"
#include <sys/types.h>
#include <ctype.h>

#define SIZE16 2
#define SIZE32 4

#if SIZEOF_SHORT != 2 || SIZEOF_LONG != 4
# define NATINT_PACK
#endif

#ifdef NATINT_PACK
# define OFF16B(p) ((char*)(p) + (natint?0:(sizeof(short) - SIZE16)))
# define OFF32B(p) ((char*)(p) + (natint?0:(sizeof(long) - SIZE32)))
# define NATINT_LEN(type,len) (natint?sizeof(type):(len))
# ifdef WORDS_BIGENDIAN
#   define OFF16(p) OFF16B(p)
#   define OFF32(p) OFF32B(p)
# endif
# define NATINT_HTOVS(x) (natint?htovs(x):htov16(x))
# define NATINT_HTOVL(x) (natint?htovl(x):htov32(x))
# define NATINT_HTONS(x) (natint?htons(x):hton16(x))
# define NATINT_HTONL(x) (natint?htonl(x):hton32(x))
#else
# define NATINT_LEN(type,len) sizeof(type)
# define NATINT_HTOVS(x) htovs(x)
# define NATINT_HTOVL(x) htovl(x)
# define NATINT_HTONS(x) htons(x)
# define NATINT_HTONL(x) htonl(x)
#endif

#ifndef OFF16
# define OFF16(p) (char*)(p)
# define OFF32(p) (char*)(p)
#endif
#ifndef OFF16B
# define OFF16B(p) (char*)(p)
# define OFF32B(p) (char*)(p)
#endif

#define define_swapx(x, xtype)          \
static xtype                            \
TOKEN_PASTE(swap,x)(z)                  \
    xtype z;                            \
{                                       \
    xtype r;                            \
    xtype *zp;                          \
    unsigned char *s, *t;               \
    int i;                              \
                                        \
    zp = malloc(sizeof(xtype));         \
    *zp = z;                            \
    s = (unsigned char*)zp;             \
    t = malloc(sizeof(xtype));          \
    for (i=0; i<sizeof(xtype); i++) {   \
        t[sizeof(xtype)-i-1] = s[i];    \
    }                                   \
    r = *(xtype *)t;                    \
    free(t);                            \
    free(zp);                           \
    return r;                           \
}

#ifndef swap16
#define swap16(x)       ((((x)&0xFF)<<8) | (((x)>>8)&0xFF))
#endif
#if SIZEOF_SHORT == 2
#define swaps(x)        swap16(x)
#else
#if SIZEOF_SHORT == 4
#define swaps(x)        ((((x)&0xFF)<<24)       \
                        |(((x)>>24)&0xFF)       \
                        |(((x)&0x0000FF00)<<8)  \
                        |(((x)&0x00FF0000)>>8)  )
#else
define_swapx(s,short)
#endif
#endif

#ifndef swap32
#define swap32(x)       ((((x)&0xFF)<<24)       \
                        |(((x)>>24)&0xFF)       \
                        |(((x)&0x0000FF00)<<8)  \
                        |(((x)&0x00FF0000)>>8)  )
#endif
#if SIZEOF_LONG == 4
#define swapl(x)        swap32(x)
#else
#if SIZEOF_LONG == 8
#define swapl(x)        ((((x)&0x00000000000000FF)<<56) \
                        |(((x)&0xFF00000000000000)>>56) \
                        |(((x)&0x000000000000FF00)<<40) \
                        |(((x)&0x00FF000000000000)>>40) \
                        |(((x)&0x0000000000FF0000)<<24) \
                        |(((x)&0x0000FF0000000000)>>24) \
                        |(((x)&0x00000000FF000000)<<8)  \
                        |(((x)&0x000000FF00000000)>>8))
#else
define_swapx(l,long)
#endif
#endif

#if SIZEOF_FLOAT == 4
#if SIZEOF_LONG == 4    /* SIZEOF_FLOAT == 4 == SIZEOF_LONG */
#define swapf(x)        swapl(x)
#define FLOAT_SWAPPER   unsigned long
#else
#if SIZEOF_SHORT == 4   /* SIZEOF_FLOAT == 4 == SIZEOF_SHORT */
#define swapf(x)        swaps(x)
#define FLOAT_SWAPPER   unsigned short
#else   /* SIZEOF_FLOAT == 4 but undivide by known size of int */
define_swapx(f,float)
#endif  /* #if SIZEOF_SHORT == 4 */
#endif  /* #if SIZEOF_LONG == 4 */
#else   /* SIZEOF_FLOAT != 4 */
define_swapx(f,float)
#endif  /* #if SIZEOF_FLOAT == 4 */

#if SIZEOF_DOUBLE == 8
#if SIZEOF_LONG == 8    /* SIZEOF_DOUBLE == 8 == SIZEOF_LONG */
#define swapd(x)        swapl(x)
#define DOUBLE_SWAPPER  unsigned long
#else
#if SIZEOF_LONG == 4    /* SIZEOF_DOUBLE == 8 && 4 == SIZEOF_LONG */
static double
swapd(const double d)
{
    double dtmp = d;
    unsigned long utmp[2];
    unsigned long utmp0;

    utmp[0] = 0; utmp[1] = 0;
    memcpy(utmp,&dtmp,sizeof(double));
    utmp0 = utmp[0];
    utmp[0] = swapl(utmp[1]);
    utmp[1] = swapl(utmp0);
    memcpy(&dtmp,utmp,sizeof(double));
    return dtmp;
}
#else
#if SIZEOF_SHORT == 4   /* SIZEOF_DOUBLE == 8 && 4 == SIZEOF_SHORT */
static double
swapd(d)
    const double d;
{
    double dtmp = d;
    unsigned short utmp[2];
    unsigned short utmp0;

    utmp[0] = 0; utmp[1] = 0;
    memcpy(utmp,&dtmp,sizeof(double));
    utmp0 = utmp[0];
    utmp[0] = swaps(utmp[1]);
    utmp[1] = swaps(utmp0);
    memcpy(&dtmp,utmp,sizeof(double));
    return dtmp;
}
#else   /* SIZEOF_DOUBLE == 8 but undivied by known size of int */
define_swapx(d, double)
#endif  /* #if SIZEOF_SHORT == 4 */
#endif  /* #if SIZEOF_LONG == 4 */
#endif  /* #if SIZEOF_LONG == 8 */
#else   /* SIZEOF_DOUBLE != 8 */
define_swapx(d, double)
#endif  /* #if SIZEOF_DOUBLE == 8 */

#undef define_swapx

#ifdef DYNAMIC_ENDIAN
#ifdef ntohs
#undef ntohs
#undef ntohl
#undef htons
#undef htonl
#endif
static int
endian()
{
    static int init = 0;
    static int endian_value;
    char *p;

    if (init) return endian_value;
    init = 1;
    p = (char*)&init;
    return endian_value = p[0]?0:1;
}

#define ntohs(x) (endian()?(x):swaps(x))
#define ntohl(x) (endian()?(x):swapl(x))
#define ntohf(x) (endian()?(x):swapf(x))
#define ntohd(x) (endian()?(x):swapd(x))
#define htons(x) (endian()?(x):swaps(x))
#define htonl(x) (endian()?(x):swapl(x))
#define htonf(x) (endian()?(x):swapf(x))
#define htond(x) (endian()?(x):swapd(x))
#define htovs(x) (endian()?swaps(x):(x))
#define htovl(x) (endian()?swapl(x):(x))
#define htovf(x) (endian()?swapf(x):(x))
#define htovd(x) (endian()?swapd(x):(x))
#define vtohs(x) (endian()?swaps(x):(x))
#define vtohl(x) (endian()?swapl(x):(x))
#define vtohf(x) (endian()?swapf(x):(x))
#define vtohd(x) (endian()?swapd(x):(x))
# ifdef NATINT_PACK
#define htov16(x) (endian()?swap16(x):(x))
#define htov32(x) (endian()?swap32(x):(x))
#define hton16(x) (endian()?(x):swap16(x))
#define hton32(x) (endian()?(x):swap32(x))
# endif
#else
#ifdef WORDS_BIGENDIAN
#ifndef ntohs
#define ntohs(x) (x)
#define ntohl(x) (x)
#define htons(x) (x)
#define htonl(x) (x)
#endif
#define ntohf(x) (x)
#define ntohd(x) (x)
#define htonf(x) (x)
#define htond(x) (x)
#define htovs(x) swaps(x)
#define htovl(x) swapl(x)
#define htovf(x) swapf(x)
#define htovd(x) swapd(x)
#define vtohs(x) swaps(x)
#define vtohl(x) swapl(x)
#define vtohf(x) swapf(x)
#define vtohd(x) swapd(x)
# ifdef NATINT_PACK
#define htov16(x) swap16(x)
#define htov32(x) swap32(x)
#define hton16(x) (x)
#define hton32(x) (x)
# endif
#else /* LITTLE ENDIAN */
#ifdef ntohs
#undef ntohs
#undef ntohl
#undef htons
#undef htonl
#endif
#define ntohs(x) swaps(x)
#define ntohl(x) swapl(x)
#define htons(x) swaps(x)
#define htonl(x) swapl(x)
#define ntohf(x) swapf(x)
#define ntohd(x) swapd(x)
#define htonf(x) swapf(x)
#define htond(x) swapd(x)
#define htovs(x) (x)
#define htovl(x) (x)
#define htovf(x) (x)
#define htovd(x) (x)
#define vtohs(x) (x)
#define vtohl(x) (x)
#define vtohf(x) (x)
#define vtohd(x) (x)
# ifdef NATINT_PACK
#define htov16(x) (x)
#define htov32(x) (x)
#define hton16(x) swap16(x)
#define hton32(x) swap32(x)
# endif
#endif
#endif

#ifdef FLOAT_SWAPPER
#define FLOAT_CONVWITH(y)       FLOAT_SWAPPER y;
#define HTONF(x,y)      (memcpy(&y,&x,sizeof(float)),   \
                         y = htonf((FLOAT_SWAPPER)y),   \
                         memcpy(&x,&y,sizeof(float)),   \
                         x)
#define HTOVF(x,y)      (memcpy(&y,&x,sizeof(float)),   \
                         y = htovf((FLOAT_SWAPPER)y),   \
                         memcpy(&x,&y,sizeof(float)),   \
                         x)
#define NTOHF(x,y)      (memcpy(&y,&x,sizeof(float)),   \
                         y = ntohf((FLOAT_SWAPPER)y),   \
                         memcpy(&x,&y,sizeof(float)),   \
                         x)
#define VTOHF(x,y)      (memcpy(&y,&x,sizeof(float)),   \
                         y = vtohf((FLOAT_SWAPPER)y),   \
                         memcpy(&x,&y,sizeof(float)),   \
                         x)
#else
#define FLOAT_CONVWITH(y)
#define HTONF(x,y)      htonf(x)
#define HTOVF(x,y)      htovf(x)
#define NTOHF(x,y)      ntohf(x)
#define VTOHF(x,y)      vtohf(x)
#endif

#ifdef DOUBLE_SWAPPER
#define DOUBLE_CONVWITH(y)      DOUBLE_SWAPPER y;
#define HTOND(x,y)      (memcpy(&y,&x,sizeof(double)),  \
                         y = htond((DOUBLE_SWAPPER)y),  \
                         memcpy(&x,&y,sizeof(double)),  \
                         x)
#define HTOVD(x,y)      (memcpy(&y,&x,sizeof(double)),  \
                         y = htovd((DOUBLE_SWAPPER)y),  \
                         memcpy(&x,&y,sizeof(double)),  \
                         x)
#define NTOHD(x,y)      (memcpy(&y,&x,sizeof(double)),  \
                         y = ntohd((DOUBLE_SWAPPER)y),  \
                         memcpy(&x,&y,sizeof(double)),  \
                         x)
#define VTOHD(x,y)      (memcpy(&y,&x,sizeof(double)),  \
                         y = vtohd((DOUBLE_SWAPPER)y),  \
                         memcpy(&x,&y,sizeof(double)),  \
                         x)
#else
#define DOUBLE_CONVWITH(y)
#define HTOND(x,y)      htond(x)
#define HTOVD(x,y)      htovd(x)
#define NTOHD(x,y)      ntohd(x)
#define VTOHD(x,y)      vtohd(x)
#endif

unsigned long rb_big2ulong_pack(VALUE x);

static unsigned long
num2i32(VALUE x)
{
    x = rb_to_int(x); /* is nil OK? (should not) */

    if (FIXNUM_P(x)) return FIX2LONG(x);
    if (TYPE(x) == T_BIGNUM) {
        return rb_big2ulong_pack(x);
    }
    rb_raise(rb_eTypeError, "can't convert %s to `integer'", rb_obj_classname(x));
    return 0;                   /* not reached */
}

#if SIZEOF_LONG == SIZE32 || SIZEOF_INT == SIZE32
# define EXTEND32(x)
#else
/* invariant in modulo 1<<31 */
# define EXTEND32(x) do {if (!natint) {(x) = (I32)(((1<<31)-1-(x))^~(~0<<31));}} while(0)
#endif
#if SIZEOF_SHORT == SIZE16
# define EXTEND16(x)
#else
# define EXTEND16(x) do { if (!natint) {(x) = (short)(((1<<15)-1-(x))^~(~0<<15));}} while(0)
#endif

#ifdef HAVE_LONG_LONG
# define QUAD_SIZE sizeof(LONG_LONG)
#else
# define QUAD_SIZE 8
#endif
static char *toofew = "too few arguments";

static void encodes(VALUE,char*,long,int);
static void qpencode(VALUE,VALUE,long);

static int uv_to_utf8(char*,unsigned long);
static unsigned long utf8_to_uv(char*,long*);

/*
 *  call-seq:
 *     arr.pack ( aTemplateString ) -> aBinaryString
 *
 *  Packs the contents of <i>arr</i> into a binary sequence according to
 *  the directives in <i>aTemplateString</i> (see the table below)
 *  Directives ``A,'' ``a,'' and ``Z'' may be followed by a count,
 *  which gives the width of the resulting field. The remaining
 *  directives also may take a count, indicating the number of array
 *  elements to convert. If the count is an asterisk
 *  (``<code>*</code>''), all remaining array elements will be
 *  converted. Any of the directives ``<code>sSiIlL</code>'' may be
 *  followed by an underscore (``<code>_</code>'') to use the underlying
 *  platform's native size for the specified type; otherwise, they use a
 *  platform-independent size. Spaces are ignored in the template
 *  string. See also <code>String#unpack</code>.
 *
 *     a = [ "a", "b", "c" ]
 *     n = [ 65, 66, 67 ]
 *     a.pack("A3A3A3")   #=> "a  b  c  "
 *     a.pack("a3a3a3")   #=> "a\000\000b\000\000c\000\000"
 *     n.pack("ccc")      #=> "ABC"
 *
 *  Directives for +pack+.
 *
 *   Directive    Meaning
 *   ---------------------------------------------------------------
 *       @     |  Moves to absolute position
 *       A     |  ASCII string (space padded, count is width)
 *       a     |  ASCII string (null padded, count is width)
 *       B     |  Bit string (descending bit order)
 *       b     |  Bit string (ascending bit order)
 *       C     |  Unsigned char
 *       c     |  Char
 *       D, d  |  Double-precision float, native format
 *       E     |  Double-precision float, little-endian byte order
 *       e     |  Single-precision float, little-endian byte order
 *       F, f  |  Single-precision float, native format
 *       G     |  Double-precision float, network (big-endian) byte order
 *       g     |  Single-precision float, network (big-endian) byte order
 *       H     |  Hex string (high nibble first)
 *       h     |  Hex string (low nibble first)
 *       I     |  Unsigned integer
 *       i     |  Integer
 *       L     |  Unsigned long
 *       l     |  Long
 *       M     |  Quoted printable, MIME encoding (see RFC2045)
 *       m     |  Base64 encoded string
 *       N     |  Long, network (big-endian) byte order
 *       n     |  Short, network (big-endian) byte-order
 *       P     |  Pointer to a structure (fixed-length string)
 *       p     |  Pointer to a null-terminated string
 *       Q, q  |  64-bit number
 *       S     |  Unsigned short
 *       s     |  Short
 *       U     |  UTF-8
 *       u     |  UU-encoded string
 *       V     |  Long, little-endian byte order
 *       v     |  Short, little-endian byte order
 *       w     |  BER-compressed integer\fnm
 *       X     |  Back up a byte
 *       x     |  Null byte
 *       Z     |  Same as ``a'', except that null is added with *
 */

static VALUE
pack_pack(VALUE ary, VALUE fmt)
{
    static char *nul10 = "\0\0\0\0\0\0\0\0\0\0";
    static char *spc10 = "          ";
    char *p, *pend;
    VALUE res, from, associates = 0;
    char type;
    long items, len, idx, plen;
    char *ptr;
#ifdef NATINT_PACK
    int natint;         /* native integer */
#endif

    StringValue(fmt);
    p = RSTRING(fmt)->ptr;
    pend = p + RSTRING(fmt)->len;
    res = rb_str_buf_new(0);

    items = RARRAY(ary)->len;
    idx = 0;

#define THISFROM RARRAY(ary)->ptr[idx]
#define NEXTFROM (items-- > 0 ? RARRAY(ary)->ptr[idx++] : (rb_raise(rb_eArgError, toofew),0))

    while (p < pend) {
        if (RSTRING(fmt)->ptr + RSTRING(fmt)->len != pend) {
            rb_raise(rb_eRuntimeError, "format string modified");
        }
        type = *p++;            /* get data type */
#ifdef NATINT_PACK
        natint = 0;
#endif

        if (ISSPACE(type)) continue;
        if (type == '#') {
            while ((p < pend) && (*p != '\n')) {
                p++;
            }
            continue;
        }
        if (*p == '_' || *p == '!') {
            const char *natstr = "sSiIlL";

            if (strchr(natstr, type)) {
#ifdef NATINT_PACK
                natint = 1;
#endif
                p++;
            }
            else {
                rb_raise(rb_eArgError, "'%c' allowed only after types %s", *p, natstr);
            }
        }
        if (*p == '*') {        /* set data length */
            len = strchr("@Xxu", type) ? 0 : items;
            p++;
        }
        else if (ISDIGIT(*p)) {
            len = strtoul(p, (char**)&p, 10);
        }
        else {
            len = 1;
        }

        switch (type) {
          case 'A': case 'a': case 'Z':
          case 'B': case 'b':
          case 'H': case 'h':
            from = NEXTFROM;
            if (NIL_P(from)) {
                ptr = "";
                plen = 0;
            }
            else {
                StringValue(from);
                ptr = RSTRING(from)->ptr;
                plen = RSTRING(from)->len;
                OBJ_INFECT(res, from);
            }

            if (p[-1] == '*')
                len = plen;

            switch (type) {
              case 'a':         /* arbitrary binary string (null padded)  */
              case 'A':         /* ASCII string (space padded) */
              case 'Z':         /* null terminated ASCII string  */
                if (plen >= len) {
                    rb_str_buf_cat(res, ptr, len);
                    if (p[-1] == '*' && type == 'Z')
                        rb_str_buf_cat(res, nul10, 1);
                }
                else {
                    rb_str_buf_cat(res, ptr, plen);
                    len -= plen;
                    while (len >= 10) {
                        rb_str_buf_cat(res, (type == 'A')?spc10:nul10, 10);
                        len -= 10;
                    }
                    rb_str_buf_cat(res, (type == 'A')?spc10:nul10, len);
                }
                break;

              case 'b':         /* bit string (ascending) */
                {
                    int byte = 0;
                    long i, j = 0;

                    if (len > plen) {
                        j = (len - plen + 1)/2;
                        len = plen;
                    }
                    for (i=0; i++ < len; ptr++) {
                        if (*ptr & 1)
                            byte |= 128;
                        if (i & 7)
                            byte >>= 1;
                        else {
                            char c = byte & 0xff;
                            rb_str_buf_cat(res, &c, 1);
                            byte = 0;
                        }
                    }
                    if (len & 7) {
                        char c;
                        byte >>= 7 - (len & 7);
                        c = byte & 0xff;
                        rb_str_buf_cat(res, &c, 1);
                    }
                    len = j;
                    goto grow;
                }
                break;

              case 'B':         /* bit string (descending) */
                {
                    int byte = 0;
                    long i, j = 0;

                    if (len > plen) {
                        j = (len - plen + 1)/2;
                        len = plen;
                    }
                    for (i=0; i++ < len; ptr++) {
                        byte |= *ptr & 1;
                        if (i & 7)
                            byte <<= 1;
                        else {
                            char c = byte & 0xff;
                            rb_str_buf_cat(res, &c, 1);
                            byte = 0;
                        }
                    }
                    if (len & 7) {
                        char c;
                        byte <<= 7 - (len & 7);
                        c = byte & 0xff;
                        rb_str_buf_cat(res, &c, 1);
                    }
                    len = j;
                    goto grow;
                }
                break;

              case 'h':         /* hex string (low nibble first) */
                {
                    int byte = 0;
                    long i, j = 0;

                    if (len > plen) {
                        j = (len - plen + 1)/2;
                        len = plen;
                    }
                    for (i=0; i++ < len; ptr++) {
                        if (ISALPHA(*ptr))
                            byte |= (((*ptr & 15) + 9) & 15) << 4;
                        else
                            byte |= (*ptr & 15) << 4;
                        if (i & 1)
                            byte >>= 4;
                        else {
                            char c = byte & 0xff;
                            rb_str_buf_cat(res, &c, 1);
                            byte = 0;
                        }
                    }
                    if (len & 1) {
                        char c = byte & 0xff;
                        rb_str_buf_cat(res, &c, 1);
                    }
                    len = j;
                    goto grow;
                }
                break;

              case 'H':         /* hex string (high nibble first) */
                {
                    int byte = 0;
                    long i, j = 0;

                    if (len > plen) {
                        j = (len - plen + 1)/2;
                        len = plen;
                    }
                    for (i=0; i++ < len; ptr++) {
                        if (ISALPHA(*ptr))
                            byte |= ((*ptr & 15) + 9) & 15;
                        else
                            byte |= *ptr & 15;
                        if (i & 1)
                            byte <<= 4;
                        else {
                            char c = byte & 0xff;
                            rb_str_buf_cat(res, &c, 1);
                            byte = 0;
                        }
                    }
                    if (len & 1) {
                        char c = byte & 0xff;
                        rb_str_buf_cat(res, &c, 1);
                    }
                    len = j;
                    goto grow;
                }
                break;
            }
            break;

          case 'c':             /* signed char */
          case 'C':             /* unsigned char */
            while (len-- > 0) {
                char c;

                from = NEXTFROM;
                c = num2i32(from);
                rb_str_buf_cat(res, &c, sizeof(char));
            }
            break;

          case 's':             /* signed short */
          case 'S':             /* unsigned short */
            while (len-- > 0) {
                short s;

                from = NEXTFROM;
                s = num2i32(from);
                rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2));
            }
            break;

          case 'i':             /* signed int */
          case 'I':             /* unsigned int */
            while (len-- > 0) {
                long i;

                from = NEXTFROM;
                i = num2i32(from);
                rb_str_buf_cat(res, OFF32(&i), NATINT_LEN(int,4));
            }
            break;

          case 'l':             /* signed long */
          case 'L':             /* unsigned long */
            while (len-- > 0) {
                long l;

                from = NEXTFROM;
                l = num2i32(from);
                rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4));
            }
            break;

          case 'q':             /* signed quad (64bit) int */
          case 'Q':             /* unsigned quad (64bit) int */
            while (len-- > 0) {
                char tmp[QUAD_SIZE];

                from = NEXTFROM;
                rb_quad_pack(tmp, from);
                rb_str_buf_cat(res, (char*)&tmp, QUAD_SIZE);
            }
            break;

          case 'n':             /* unsigned short (network byte-order)  */
            while (len-- > 0) {
                unsigned short s;

                from = NEXTFROM;
                s = num2i32(from);
                s = NATINT_HTONS(s);
                rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2));
            }
            break;

          case 'N':             /* unsigned long (network byte-order) */
            while (len-- > 0) {
                unsigned long l;

                from = NEXTFROM;
                l = num2i32(from);
                l = NATINT_HTONL(l);
                rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4));
            }
            break;

          case 'v':             /* unsigned short (VAX byte-order) */
            while (len-- > 0) {
                unsigned short s;

                from = NEXTFROM;
                s = num2i32(from);
                s = NATINT_HTOVS(s);
                rb_str_buf_cat(res, OFF16(&s), NATINT_LEN(short,2));
            }
            break;

          case 'V':             /* unsigned long (VAX byte-order) */
            while (len-- > 0) {
                unsigned long l;

                from = NEXTFROM;
                l = num2i32(from);
                l = NATINT_HTOVL(l);
                rb_str_buf_cat(res, OFF32(&l), NATINT_LEN(long,4));
            }
            break;

          case 'f':             /* single precision float in native format */
          case 'F':             /* ditto */
            while (len-- > 0) {
                float f;

                from = NEXTFROM;
                f = RFLOAT(rb_Float(from))->value;
                rb_str_buf_cat(res, (char*)&f, sizeof(float));
            }
            break;

          case 'e':             /* single precision float in VAX byte-order */
            while (len-- > 0) {
                float f;
                FLOAT_CONVWITH(ftmp);

                from = NEXTFROM;
                f = RFLOAT(rb_Float(from))->value;
                f = HTOVF(f,ftmp);
                rb_str_buf_cat(res, (char*)&f, sizeof(float));
            }
            break;

          case 'E':             /* double precision float in VAX byte-order */
            while (len-- > 0) {
                double d;
                DOUBLE_CONVWITH(dtmp);

                from = NEXTFROM;
                d = RFLOAT(rb_Float(from))->value;
                d = HTOVD(d,dtmp);
                rb_str_buf_cat(res, (char*)&d, sizeof(double));
            }
            break;

          case 'd':             /* double precision float in native format */
          case 'D':             /* ditto */
            while (len-- > 0) {
                double d;

                from = NEXTFROM;
                d = RFLOAT(rb_Float(from))->value;
                rb_str_buf_cat(res, (char*)&d, sizeof(double));
            }
            break;

          case 'g':             /* single precision float in network byte-order */
            while (len-- > 0) {
                float f;
                FLOAT_CONVWITH(ftmp);

                from = NEXTFROM;
                f = RFLOAT(rb_Float(from))->value;
                f = HTONF(f,ftmp);
                rb_str_buf_cat(res, (char*)&f, sizeof(float));
            }
            break;

          case 'G':             /* double precision float in network byte-order */
            while (len-- > 0) {
                double d;
                DOUBLE_CONVWITH(dtmp);

                from = NEXTFROM;
                d = RFLOAT(rb_Float(from))->value;
                d = HTOND(d,dtmp);
                rb_str_buf_cat(res, (char*)&d, sizeof(double));
            }
            break;

          case 'x':             /* null byte */
          grow:
            while (len >= 10) {
                rb_str_buf_cat(res, nul10, 10);
                len -= 10;
            }
            rb_str_buf_cat(res, nul10, len);
            break;

          case 'X':             /* back up byte */
          shrink:
            plen = RSTRING(res)->len;
            if (plen < len)
                rb_raise(rb_eArgError, "X outside of string");
            RSTRING(res)->len = plen - len;
            RSTRING(res)->ptr[plen - len] = '\0';
            break;

          case '@':             /* null fill to absolute position */
            len -= RSTRING(res)->len;
            if (len > 0) goto grow;
            len = -len;
            if (len > 0) goto shrink;
            break;

          case '%':
            rb_raise(rb_eArgError, "%% is not supported");
            break;

          case 'U':             /* Unicode character */
            while (len-- > 0) {
                long l;
                char buf[8];
                int le;

                from = NEXTFROM;
                from = rb_to_int(from);
                l = NUM2INT(from);
                if (l < 0) {
                    rb_raise(rb_eRangeError, "pack(U): value out of range");
                }
                le = uv_to_utf8(buf, l);
                rb_str_buf_cat(res, (char*)buf, le);
            }
            break;

          case 'u':             /* uuencoded string */
          case 'm':             /* base64 encoded string */
            from = NEXTFROM;
            StringValue(from);
            ptr = RSTRING(from)->ptr;
            plen = RSTRING(from)->len;

            if (len <= 2)
                len = 45;
            else
                len = len / 3 * 3;
            while (plen > 0) {
                long todo;

                if (plen > len)
                    todo = len;
                else
                    todo = plen;
                encodes(res, ptr, todo, type);
                plen -= todo;
                ptr += todo;
            }
            break;

          case 'M':             /* quoted-printable encoded string */
            from = rb_obj_as_string(NEXTFROM);
            if (len <= 1)
                len = 72;
            qpencode(res, from, len);
            break;

          case 'P':             /* pointer to packed byte string */
            from = THISFROM;
            if (!NIL_P(from)) {
                StringValue(from);
                if (RSTRING(from)->len < len) {
                    rb_raise(rb_eArgError, "too short buffer for P(%ld for %ld)",
                             RSTRING(from)->len, len);
                }
            }
            len = 1;
            /* FALL THROUGH */
          case 'p':             /* pointer to string */
            while (len-- > 0) {
                char *t;
                from = NEXTFROM;
                if (NIL_P(from)) {
                    t = 0;
                }
                else {
                    t = StringValuePtr(from);
                }
                if (!associates) {
                    associates = rb_ary_new();
                }
                rb_ary_push(associates, from);
                rb_str_buf_cat(res, (char*)&t, sizeof(char*));
            }
            break;

          case 'w':             /* BER compressed integer  */
            while (len-- > 0) {
                unsigned long ul;
                VALUE buf = rb_str_new(0, 0);
                char c, *bufs, *bufe;

                from = NEXTFROM;
                if (TYPE(from) == T_BIGNUM) {
                    VALUE big128 = rb_uint2big(128);
                    while (TYPE(from) == T_BIGNUM) {
                        from = rb_big_divmod(from, big128);
                        c = NUM2INT(RARRAY(from)->ptr[1]) | 0x80; /* mod */
                        rb_str_buf_cat(buf, &c, sizeof(char));
                        from = RARRAY(from)->ptr[0]; /* div */
                    }
                }

                {
                    long l = NUM2LONG(from);
                    if (l < 0) {
                        rb_raise(rb_eArgError, "can't compress negative numbers");
                    }
                    ul = l;
                }

                while (ul) {
                    c = ((ul & 0x7f) | 0x80);
                    rb_str_buf_cat(buf, &c, sizeof(char));
                    ul >>=  7;
                }

                if (RSTRING(buf)->len) {
                    bufs = RSTRING(buf)->ptr;
                    bufe = bufs + RSTRING(buf)->len - 1;
                    *bufs &= 0x7f; /* clear continue bit */
                    while (bufs < bufe) { /* reverse */
                        c = *bufs;
                        *bufs++ = *bufe;
                        *bufe-- = c;
                    }
                    rb_str_buf_cat(res, RSTRING(buf)->ptr, RSTRING(buf)->len);
                }
                else {
                    c = 0;
                    rb_str_buf_cat(res, &c, sizeof(char));
                }
            }
            break;

          default:
            break;
        }
    }

    if (associates) {
        rb_str_associate(res, associates);
    }
    return res;
}

static char uu_table[] =
"`!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_";
static char b64_table[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

static void
encodes(VALUE str, char *s, long len, int type)
{
    char *buff = ALLOCA_N(char, len * 4 / 3 + 6);
    long i = 0;
    char *trans = type == 'u' ? uu_table : b64_table;
    int padding;

    if (type == 'u') {
        buff[i++] = len + ' ';
        padding = '`';
    }
    else {
        padding = '=';
    }
    while (len >= 3) {
        buff[i++] = trans[077 & (*s >> 2)];
        buff[i++] = trans[077 & (((*s << 4) & 060) | ((s[1] >> 4) & 017))];
        buff[i++] = trans[077 & (((s[1] << 2) & 074) | ((s[2] >> 6) & 03))];
        buff[i++] = trans[077 & s[2]];
        s += 3;
        len -= 3;
    }
    if (len == 2) {
        buff[i++] = trans[077 & (*s >> 2)];
        buff[i++] = trans[077 & (((*s << 4) & 060) | ((s[1] >> 4) & 017))];
        buff[i++] = trans[077 & (((s[1] << 2) & 074) | (('\0' >> 6) & 03))];
        buff[i++] = padding;
    }
    else if (len == 1) {
        buff[i++] = trans[077 & (*s >> 2)];
        buff[i++] = trans[077 & (((*s << 4) & 060) | (('\0' >> 4) & 017))];
        buff[i++] = padding;
        buff[i++] = padding;
    }
    buff[i++] = '\n';
    rb_str_buf_cat(str, buff, i);
}

static char hex_table[] = "0123456789ABCDEF";

static void
qpencode(VALUE str, VALUE from, long len)
{
    char buff[1024];
    long i = 0, n = 0, prev = EOF;
    unsigned char *s = (unsigned char*)RSTRING(from)->ptr;
    unsigned char *send = s + RSTRING(from)->len;

    while (s < send) {
        if ((*s > 126) ||
            (*s < 32 && *s != '\n' && *s != '\t') ||
            (*s == '=')) {
            buff[i++] = '=';
            buff[i++] = hex_table[*s >> 4];
            buff[i++] = hex_table[*s & 0x0f];
            n += 3;
            prev = EOF;
        }
        else if (*s == '\n') {
            if (prev == ' ' || prev == '\t') {
                buff[i++] = '=';
                buff[i++] = *s;
            }
            buff[i++] = *s;
            n = 0;
            prev = *s;
        }
        else {
            buff[i++] = *s;
            n++;
            prev = *s;
        }
        if (n > len) {
            buff[i++] = '=';
            buff[i++] = '\n';
            n = 0;
            prev = '\n';
        }
        if (i > 1024 - 5) {
            rb_str_buf_cat(str, buff, i);
            i = 0;
        }
        s++;
    }
    if (n > 0) {
        buff[i++] = '=';
        buff[i++] = '\n';
    }
    if (i > 0) {
        rb_str_buf_cat(str, buff, i);
    }
}

static inline int
hex2num(char c)
{
    switch (c) {
    case '0': case '1': case '2': case '3': case '4':
    case '5': case '6': case '7': case '8': case '9':
        return c - '0';
    case 'a': case 'b': case 'c':
    case 'd': case 'e': case 'f':
        return c - 'a' + 10;
    case 'A': case 'B': case 'C':
    case 'D': case 'E': case 'F':
        return c - 'A' + 10;
    default:
        return -1;
    }
}

#define PACK_LENGTH_ADJUST_SIZE(sz) do {        \
    tmp = 0;                                    \
    if (len > (send-s)/sz) {                    \
        if (!star) {                            \
            tmp = len-(send-s)/sz;              \
        }                                       \
        len = (send-s)/sz;                      \
    }                                           \
} while (0)

#ifdef NATINT_PACK
#define PACK_LENGTH_ADJUST(type,sz) do {        \
    int t__len = NATINT_LEN(type,(sz));         \
    PACK_LENGTH_ADJUST_SIZE(t__len);            \
} while (0)
#else
#define PACK_LENGTH_ADJUST(type,sz)             \
    PACK_LENGTH_ADJUST_SIZE(sizeof(type))
#endif

#define PACK_ITEM_ADJUST() while (tmp--) rb_ary_push(ary, Qnil)

static VALUE
infected_str_new(const char *ptr, long len, VALUE str)
{
    VALUE s = rb_str_new(ptr, len);

    OBJ_INFECT(s, str);
    return s;
}

/*
 *  call-seq:
 *     str.unpack(format)   => anArray
 *
 *  Decodes <i>str</i> (which may contain binary data) according to the
 *  format string, returning an array of each value extracted. The
 *  format string consists of a sequence of single-character directives,
 *  summarized in the table at the end of this entry.
 *  Each directive may be followed
 *  by a number, indicating the number of times to repeat with this
 *  directive. An asterisk (``<code>*</code>'') will use up all
 *  remaining elements. The directives <code>sSiIlL</code> may each be
 *  followed by an underscore (``<code>_</code>'') to use the underlying
 *  platform's native size for the specified type; otherwise, it uses a
 *  platform-independent consistent size. Spaces are ignored in the
 *  format string. See also <code>Array#pack</code>.
 *
 *     "abc \0\0abc \0\0".unpack('A6Z6')   #=> ["abc", "abc "]
 *     "abc \0\0".unpack('a3a3')           #=> ["abc", " \000\000"]
 *     "abc \0abc \0".unpack('Z*Z*')       #=> ["abc ", "abc "]
 *     "aa".unpack('b8B8')                 #=> ["10000110", "01100001"]
 *     "aaa".unpack('h2H2c')               #=> ["16", "61", 97]
 *     "\xfe\xff\xfe\xff".unpack('sS')     #=> [-2, 65534]
 *     "now=20is".unpack('M*')             #=> ["now is"]
 *     "whole".unpack('xax2aX2aX1aX2a')    #=> ["h", "e", "l", "l", "o"]
 *
 *  This table summarizes the various formats and the Ruby classes
 *  returned by each.
 *
 *     Format | Returns | Function
 *     -------+---------+-----------------------------------------
 *       A    | String  | with trailing nulls and spaces removed
 *     -------+---------+-----------------------------------------
 *       a    | String  | string
 *     -------+---------+-----------------------------------------
 *       B    | String  | extract bits from each character (msb first)
 *     -------+---------+-----------------------------------------
 *       b    | String  | extract bits from each character (lsb first)
 *     -------+---------+-----------------------------------------
 *       C    | Fixnum  | extract a character as an unsigned integer
 *     -------+---------+-----------------------------------------
 *       c    | Fixnum  | extract a character as an integer
 *     -------+---------+-----------------------------------------
 *       d,D  | Float   | treat sizeof(double) characters as
 *            |         | a native double
 *     -------+---------+-----------------------------------------
 *       E    | Float   | treat sizeof(double) characters as
 *            |         | a double in little-endian byte order
 *     -------+---------+-----------------------------------------
 *       e    | Float   | treat sizeof(float) characters as
 *            |         | a float in little-endian byte order
 *     -------+---------+-----------------------------------------
 *       f,F  | Float   | treat sizeof(float) characters as
 *            |         | a native float
 *     -------+---------+-----------------------------------------
 *       G    | Float   | treat sizeof(double) characters as
 *            |         | a double in network byte order
 *     -------+---------+-----------------------------------------
 *       g    | Float   | treat sizeof(float) characters as a
 *            |         | float in network byte order
 *     -------+---------+-----------------------------------------
 *       H    | String  | extract hex nibbles from each character
 *            |         | (most significant first)
 *     -------+---------+-----------------------------------------
 *       h    | String  | extract hex nibbles from each character
 *            |         | (least significant first)
 *     -------+---------+-----------------------------------------
 *       I    | Integer | treat sizeof(int) (modified by _)
 *            |         | successive characters as an unsigned
 *            |         | native integer
 *     -------+---------+-----------------------------------------
 *       i    | Integer | treat sizeof(int) (modified by _)
 *            |         | successive characters as a signed
 *            |         | native integer
 *     -------+---------+-----------------------------------------
 *       L    | Integer | treat four (modified by _) successive
 *            |         | characters as an unsigned native
 *            |         | long integer
 *     -------+---------+-----------------------------------------
 *       l    | Integer | treat four (modified by _) successive
 *            |         | characters as a signed native
 *            |         | long integer
 *     -------+---------+-----------------------------------------
 *       M    | String  | quoted-printable
 *     -------+---------+-----------------------------------------
 *       m    | String  | base64-encoded
 *     -------+---------+-----------------------------------------
 *       N    | Integer | treat four characters as an unsigned
 *            |         | long in network byte order
 *     -------+---------+-----------------------------------------
 *       n    | Fixnum  | treat two characters as an unsigned
 *            |         | short in network byte order
 *     -------+---------+-----------------------------------------
 *       P    | String  | treat sizeof(char *) characters as a
 *            |         | pointer, and  return \emph{len} characters
 *            |         | from the referenced location
 *     -------+---------+-----------------------------------------
 *       p    | String  | treat sizeof(char *) characters as a
 *            |         | pointer to a  null-terminated string
 *     -------+---------+-----------------------------------------
 *       Q    | Integer | treat 8 characters as an unsigned
 *            |         | quad word (64 bits)
 *     -------+---------+-----------------------------------------
 *       q    | Integer | treat 8 characters as a signed
 *            |         | quad word (64 bits)
 *     -------+---------+-----------------------------------------
 *       S    | Fixnum  | treat two (different if _ used)
 *            |         | successive characters as an unsigned
 *            |         | short in native byte order
 *     -------+---------+-----------------------------------------
 *       s    | Fixnum  | Treat two (different if _ used)
 *            |         | successive characters as a signed short
 *            |         | in native byte order
 *     -------+---------+-----------------------------------------
 *       U    | Integer | UTF-8 characters as unsigned integers
 *     -------+---------+-----------------------------------------
 *       u    | String  | UU-encoded
 *     -------+---------+-----------------------------------------
 *       V    | Fixnum  | treat four characters as an unsigned
 *            |         | long in little-endian byte order
 *     -------+---------+-----------------------------------------
 *       v    | Fixnum  | treat two characters as an unsigned
 *            |         | short in little-endian byte order
 *     -------+---------+-----------------------------------------
 *       w    | Integer | BER-compressed integer (see Array.pack)
 *     -------+---------+-----------------------------------------
 *       X    | ---     | skip backward one character
 *     -------+---------+-----------------------------------------
 *       x    | ---     | skip forward one character
 *     -------+---------+-----------------------------------------
 *       Z    | String  | with trailing nulls removed
 *            |         | upto first null with *
 *     -------+---------+-----------------------------------------
 *       @    | ---     | skip to the offset given by the
 *            |         | length argument
 *     -------+---------+-----------------------------------------
 */

static VALUE
pack_unpack(VALUE str, VALUE fmt)
{
    static char *hexdigits = "0123456789abcdef0123456789ABCDEFx";
    char *s, *send;
    char *p, *pend;
    VALUE ary;
    char type;
    long len;
    int tmp, star;
#ifdef NATINT_PACK
    int natint;                 /* native integer */
#endif

    StringValue(str);
    StringValue(fmt);
    s = RSTRING(str)->ptr;
    send = s + RSTRING(str)->len;
    p = RSTRING(fmt)->ptr;
    pend = p + RSTRING(fmt)->len;

    ary = rb_ary_new();
    while (p < pend) {
        type = *p++;
#ifdef NATINT_PACK
        natint = 0;
#endif

        if (ISSPACE(type)) continue;
        if (type == '#') {
            while ((p < pend) && (*p != '\n')) {
                p++;
            }
            continue;
        }
        star = 0;
        if (*p == '_' || *p == '!') {
            char *natstr = "sSiIlL";

            if (strchr(natstr, type)) {
#ifdef NATINT_PACK
                natint = 1;
#endif
                p++;
            }
            else {
                rb_raise(rb_eArgError, "'%c' allowed only after types %s", *p, natstr);
            }
        }
        if (p >= pend)
            len = 1;
        else if (*p == '*') {
            star = 1;
            len = send - s;
            p++;
        }
        else if (ISDIGIT(*p)) {
            len = strtoul(p, (char**)&p, 10);
        }
        else {
            len = (type != '@');
        }

        switch (type) {
          case '%':
            rb_raise(rb_eArgError, "%% is not supported");
            break;

          case 'A':
            if (len > send - s) len = send - s;
            {
                long end = len;
                char *t = s + len - 1;

                while (t >= s) {
                    if (*t != ' ' && *t != '\0') break;
                    t--; len--;
                }
                rb_ary_push(ary, infected_str_new(s, len, str));
                s += end;
            }
            break;

          case 'Z':
            {
                char *t = s;

                if (len > send-s) len = send-s;
                while (t < s+len && *t) t++;
                rb_ary_push(ary, infected_str_new(s, t-s, str));
                if (t < send) t++;
                s = star ? t : s+len;
            }
            break;

          case 'a':
            if (len > send - s) len = send - s;
            rb_ary_push(ary, infected_str_new(s, len, str));
            s += len;
            break;

          case 'b':
            {
                VALUE bitstr;
                char *t;
                int bits;
                long i;

                if (p[-1] == '*' || len > (send - s) * 8)
                    len = (send - s) * 8;
                bits = 0;
                rb_ary_push(ary, bitstr = rb_str_new(0, len));
                t = RSTRING(bitstr)->ptr;
                for (i=0; i<len; i++) {
                    if (i & 7) bits >>= 1;
                    else bits = *s++;
                    *t++ = (bits & 1) ? '1' : '0';
                }
            }
            break;

          case 'B':
            {
                VALUE bitstr;
                char *t;
                int bits;
                long i;

                if (p[-1] == '*' || len > (send - s) * 8)
                    len = (send - s) * 8;
                bits = 0;
                rb_ary_push(ary, bitstr = rb_str_new(0, len));
                t = RSTRING(bitstr)->ptr;
                for (i=0; i<len; i++) {
                    if (i & 7) bits <<= 1;
                    else bits = *s++;
                    *t++ = (bits & 128) ? '1' : '0';
                }
            }
            break;

          case 'h':
            {
                VALUE bitstr;
                char *t;
                int bits;
                long i;

                if (p[-1] == '*' || len > (send - s) * 2)
                    len = (send - s) * 2;
                bits = 0;
                rb_ary_push(ary, bitstr = rb_str_new(0, len));
                t = RSTRING(bitstr)->ptr;
                for (i=0; i<len; i++) {
                    if (i & 1)
                        bits >>= 4;
                    else
                        bits = *s++;
                    *t++ = hexdigits[bits & 15];
                }
            }
            break;

          case 'H':
            {
                VALUE bitstr;
                char *t;
                int bits;
                long i;

                if (p[-1] == '*' || len > (send - s) * 2)
                    len = (send - s) * 2;
                bits = 0;
                rb_ary_push(ary, bitstr = rb_str_new(0, len));
                t = RSTRING(bitstr)->ptr;
                for (i=0; i<len; i++) {
                    if (i & 1)
                        bits <<= 4;
                    else
                        bits = *s++;
                    *t++ = hexdigits[(bits >> 4) & 15];
                }
            }
            break;

          case 'c':
            PACK_LENGTH_ADJUST(char,sizeof(char));
            while (len-- > 0) {
                int c = *s++;
                if (c > (char)127) c-=256;
                rb_ary_push(ary, INT2FIX(c));
            }
            PACK_ITEM_ADJUST();
            break;

          case 'C':
            PACK_LENGTH_ADJUST(unsigned char,sizeof(unsigned char));
            while (len-- > 0) {
                unsigned char c = *s++;
                rb_ary_push(ary, INT2FIX(c));
            }
            PACK_ITEM_ADJUST();
            break;

          case 's':
            PACK_LENGTH_ADJUST(short,2);
            while (len-- > 0) {
                short tmp = 0;
                memcpy(OFF16(&tmp), s, NATINT_LEN(short,2));
                EXTEND16(tmp);
                s += NATINT_LEN(short,2);
                rb_ary_push(ary, INT2FIX(tmp));
            }
            PACK_ITEM_ADJUST();
            break;

          case 'S':
            PACK_LENGTH_ADJUST(unsigned short,2);
            while (len-- > 0) {
                unsigned short tmp = 0;
                memcpy(OFF16(&tmp), s, NATINT_LEN(unsigned short,2));
                s += NATINT_LEN(unsigned short,2);
                rb_ary_push(ary, INT2FIX(tmp));
            }
            PACK_ITEM_ADJUST();
            break;

          case 'i':
            PACK_LENGTH_ADJUST(int,sizeof(int));
            while (len-- > 0) {
                int tmp;
                memcpy(&tmp, s, sizeof(int));
                s += sizeof(int);
                rb_ary_push(ary, INT2NUM(tmp));
            }
            PACK_ITEM_ADJUST();
            break;

          case 'I':
            PACK_LENGTH_ADJUST(unsigned int,sizeof(unsigned int));
            while (len-- > 0) {
                unsigned int tmp;
                memcpy(&tmp, s, sizeof(unsigned int));
                s += sizeof(unsigned int);
                rb_ary_push(ary, UINT2NUM(tmp));
            }
            PACK_ITEM_ADJUST();
            break;

          case 'l':
            PACK_LENGTH_ADJUST(long,4);
            while (len-- > 0) {
                long tmp = 0;
                memcpy(OFF32(&tmp), s, NATINT_LEN(long,4));
                EXTEND32(tmp);
                s += NATINT_LEN(long,4);
                rb_ary_push(ary, LONG2NUM(tmp));
            }
            PACK_ITEM_ADJUST();
            break;
          case 'L':
            PACK_LENGTH_ADJUST(unsigned long,4);
            while (len-- > 0) {
                unsigned long tmp = 0;
                memcpy(OFF32(&tmp), s, NATINT_LEN(unsigned long,4));
                s += NATINT_LEN(unsigned long,4);
                rb_ary_push(ary, ULONG2NUM(tmp));
            }
            PACK_ITEM_ADJUST();
            break;

          case 'q':
            PACK_LENGTH_ADJUST_SIZE(QUAD_SIZE);
            while (len-- > 0) {
                char *tmp = (char*)s;
                s += QUAD_SIZE;
                rb_ary_push(ary, rb_quad_unpack(tmp, 1));
            }
            PACK_ITEM_ADJUST();
            break;
        case 'Q':
            PACK_LENGTH_ADJUST_SIZE(QUAD_SIZE);
            while (len-- > 0) {
                char *tmp = (char*)s;
                s += QUAD_SIZE;
                rb_ary_push(ary, rb_quad_unpack(tmp, 0));
            }
            break;

          case 'n':
            PACK_LENGTH_ADJUST(unsigned short,2);
            while (len-- > 0) {
                unsigned short tmp = 0;
                memcpy(OFF16B(&tmp), s, NATINT_LEN(unsigned short,2));
                s += NATINT_LEN(unsigned short,2);
                rb_ary_push(ary, UINT2NUM(ntohs(tmp)));
            }
            PACK_ITEM_ADJUST();
            break;

          case 'N':
            PACK_LENGTH_ADJUST(unsigned long,4);
            while (len-- > 0) {
                unsigned long tmp = 0;
                memcpy(OFF32B(&tmp), s, NATINT_LEN(unsigned long,4));
                s += NATINT_LEN(unsigned long,4);
                rb_ary_push(ary, ULONG2NUM(ntohl(tmp)));
            }
            PACK_ITEM_ADJUST();
            break;

          case 'v':
            PACK_LENGTH_ADJUST(unsigned short,2);
            while (len-- > 0) {
                unsigned short tmp = 0;
                memcpy(OFF16(&tmp), s, NATINT_LEN(unsigned short,2));
                s += NATINT_LEN(unsigned short,2);
                rb_ary_push(ary, UINT2NUM(vtohs(tmp)));
            }
            PACK_ITEM_ADJUST();
            break;

          case 'V':
            PACK_LENGTH_ADJUST(unsigned long,4);
            while (len-- > 0) {
                unsigned long tmp = 0;
                memcpy(OFF32(&tmp), s, NATINT_LEN(long,4));
                s += NATINT_LEN(long,4);
                rb_ary_push(ary, ULONG2NUM(vtohl(tmp)));
            }
            PACK_ITEM_ADJUST();
            break;

          case 'f':
          case 'F':
            PACK_LENGTH_ADJUST(float,sizeof(float));
            while (len-- > 0) {
                float tmp;
                memcpy(&tmp, s, sizeof(float));
                s += sizeof(float);
                rb_ary_push(ary, rb_float_new((double)tmp));
            }
            PACK_ITEM_ADJUST();
            break;

          case 'e':
            PACK_LENGTH_ADJUST(float,sizeof(float));
            while (len-- > 0) {
                float tmp;
                FLOAT_CONVWITH(ftmp);

                memcpy(&tmp, s, sizeof(float));
                s += sizeof(float);
                tmp = VTOHF(tmp,ftmp);
                rb_ary_push(ary, rb_float_new((double)tmp));
            }
            PACK_ITEM_ADJUST();
            break;

          case 'E':
            PACK_LENGTH_ADJUST(double,sizeof(double));
            while (len-- > 0) {
                double tmp;
                DOUBLE_CONVWITH(dtmp);

                memcpy(&tmp, s, sizeof(double));
                s += sizeof(double);
                tmp = VTOHD(tmp,dtmp);
                rb_ary_push(ary, rb_float_new(tmp));
            }
            PACK_ITEM_ADJUST();
            break;

          case 'D':
          case 'd':
            PACK_LENGTH_ADJUST(double,sizeof(double));
            while (len-- > 0) {
                double tmp;
                memcpy(&tmp, s, sizeof(double));
                s += sizeof(double);
                rb_ary_push(ary, rb_float_new(tmp));
            }
            PACK_ITEM_ADJUST();
            break;

          case 'g':
            PACK_LENGTH_ADJUST(float,sizeof(float));
            while (len-- > 0) {
                float tmp;
                FLOAT_CONVWITH(ftmp;)

                memcpy(&tmp, s, sizeof(float));
                s += sizeof(float);
                tmp = NTOHF(tmp,ftmp);
                rb_ary_push(ary, rb_float_new((double)tmp));
            }
            PACK_ITEM_ADJUST();
            break;

          case 'G':
            PACK_LENGTH_ADJUST(double,sizeof(double));
            while (len-- > 0) {
                double tmp;
                DOUBLE_CONVWITH(dtmp);

                memcpy(&tmp, s, sizeof(double));
                s += sizeof(double);
                tmp = NTOHD(tmp,dtmp);
                rb_ary_push(ary, rb_float_new(tmp));
            }
            PACK_ITEM_ADJUST();
            break;

          case 'U':
            if (len > send - s) len = send - s;
            while (len > 0 && s < send) {
                long alen = send - s;
                unsigned long l;

                l = utf8_to_uv(s, &alen);
                s += alen; len--;
                rb_ary_push(ary, ULONG2NUM(l));
            }
            break;

          case 'u':
            {
                VALUE buf = infected_str_new(0, (send - s)*3/4, str);
                char *ptr = RSTRING(buf)->ptr;
                long total = 0;

                while (s < send && *s > ' ' && *s < 'a') {
                    long a,b,c,d;
                    char hunk[4];

                    hunk[3] = '\0';
                    len = (*s++ - ' ') & 077;
                    total += len;
                    if (total > RSTRING(buf)->len) {
                        len -= total - RSTRING(buf)->len;
                        total = RSTRING(buf)->len;
                    }

                    while (len > 0) {
                        long mlen = len > 3 ? 3 : len;

                        if (s < send && *s >= ' ')
                            a = (*s++ - ' ') & 077;
                        else
                            a = 0;
                        if (s < send && *s >= ' ')
                            b = (*s++ - ' ') & 077;
                        else
                            b = 0;
                        if (s < send && *s >= ' ')
                            c = (*s++ - ' ') & 077;
                        else
                            c = 0;
                        if (s < send && *s >= ' ')
                            d = (*s++ - ' ') & 077;
                        else
                            d = 0;
                        hunk[0] = a << 2 | b >> 4;
                        hunk[1] = b << 4 | c >> 2;
                        hunk[2] = c << 6 | d;
                        memcpy(ptr, hunk, mlen);
                        ptr += mlen;
                        len -= mlen;
                    }
                    if (*s == '\r') s++;
                    if (*s == '\n') s++;
                    else if (s < send && (s+1 == send || s[1] == '\n'))
                        s += 2; /* possible checksum byte */
                }

                RSTRING(buf)->ptr[total] = '\0';
                RSTRING(buf)->len = total;
                rb_ary_push(ary, buf);
            }
            break;

          case 'm':
            {
                VALUE buf = infected_str_new(0, (send - s)*3/4, str);
                char *ptr = RSTRING(buf)->ptr;
                int a = -1,b = -1,c = 0,d;
                static int first = 1;
                static int b64_xtable[256];

                if (first) {
                    int i;
                    first = 0;

                    for (i = 0; i < 256; i++) {
                        b64_xtable[i] = -1;
                    }
                    for (i = 0; i < 64; i++) {
                        b64_xtable[(int)b64_table[i]] = i;
                    }
                }
                while (s < send) {
                    while (s[0] == '\r' || s[0] == '\n') { s++; }
                    if ((a = b64_xtable[(int)s[0]]) == -1) break;
                    if ((b = b64_xtable[(int)s[1]]) == -1) break;
                    if ((c = b64_xtable[(int)s[2]]) == -1) break;
                    if ((d = b64_xtable[(int)s[3]]) == -1) break;
                    *ptr++ = a << 2 | b >> 4;
                    *ptr++ = b << 4 | c >> 2;
                    *ptr++ = c << 6 | d;
                    s += 4;
                }
                if (a != -1 && b != -1) {
                    if (s + 2 < send && s[2] == '=')
                        *ptr++ = a << 2 | b >> 4;
                    if (c != -1 && s + 3 < send && s[3] == '=') {
                        *ptr++ = a << 2 | b >> 4;
                        *ptr++ = b << 4 | c >> 2;
                    }
                }
                *ptr = '\0';
                RSTRING(buf)->len = ptr - RSTRING(buf)->ptr;
                rb_ary_push(ary, buf);
            }
            break;

          case 'M':
            {
                VALUE buf = infected_str_new(0, send - s, str);
                char *ptr = RSTRING(buf)->ptr;
                int c1, c2;

                while (s < send) {
                    if (*s == '=') {
                        if (++s == send) break;
                        if (*s != '\n') {
                            if ((c1 = hex2num(*s)) == -1) break;
                            if (++s == send) break;
                            if ((c2 = hex2num(*s)) == -1) break;
                            *ptr++ = c1 << 4 | c2;
                        }
                    }
                    else {
                        *ptr++ = *s;
                    }
                    s++;
                }
                *ptr = '\0';
                RSTRING(buf)->len = ptr - RSTRING(buf)->ptr;
                rb_ary_push(ary, buf);
            }
            break;

          case '@':
            if (len > RSTRING(str)->len)
                rb_raise(rb_eArgError, "@ outside of string");
            s = RSTRING(str)->ptr + len;
            break;

          case 'X':
            if (len > s - RSTRING(str)->ptr)
                rb_raise(rb_eArgError, "X outside of string");
            s -= len;
            break;

          case 'x':
            if (len > send - s)
                rb_raise(rb_eArgError, "x outside of string");
            s += len;
            break;

          case 'P':
            if (sizeof(char *) <= send - s) {
                char *t;
                VALUE tmp;

                memcpy(&t, s, sizeof(char *));
                s += sizeof(char *);

                if (t) {
                    VALUE a, *p, *pend;

                    if (!(a = rb_str_associated(str))) {
                        rb_raise(rb_eArgError, "no associated pointer");
                    }
                    p = RARRAY(a)->ptr;
                    pend = p + RARRAY(a)->len;
                    while (p < pend) {
                        if (TYPE(*p) == T_STRING && RSTRING(*p)->ptr == t) {
                            if (len > RSTRING(*p)->len) {
                                len = RSTRING(*p)->len;
                            }
                            break;
                        }
                        p++;
                    }
                    if (p == pend) {
                        rb_raise(rb_eArgError, "non associated pointer");
                    }
                    tmp = rb_tainted_str_new(t, len);
                }
                else {
                    tmp = Qnil;
                }
                rb_ary_push(ary, tmp);
            }
            break;

          case 'p':
            if (len > (send - s) / sizeof(char *))
                len = (send - s) / sizeof(char *);
            while (len-- > 0) {
                if (send - s < sizeof(char *))
                    break;
                else {
                    VALUE tmp;
                    char *t;

                    memcpy(&t, s, sizeof(char *));
                    s += sizeof(char *);

                    if (t) {
                        VALUE a, *p, *pend;

                        if (!(a = rb_str_associated(str))) {
                            rb_raise(rb_eArgError, "no associated pointer");
                        }
                        p = RARRAY(a)->ptr;
                        pend = p + RARRAY(a)->len;
                        while (p < pend) {
                            if (TYPE(*p) == T_STRING && RSTRING(*p)->ptr == t) {
                                break;
                            }
                            p++;
                        }
                        if (p == pend) {
                            rb_raise(rb_eArgError, "non associated pointer");
                        }
                        tmp = rb_str_new2(t);
                        OBJ_INFECT(tmp, str);
                    }
                    else {
                        tmp = Qnil;
                    }
                    rb_ary_push(ary, tmp);
                }
            }
            break;

          case 'w':
            {
                unsigned long ul = 0;
                unsigned long ulmask = 0xfeL << ((sizeof(unsigned long) - 1) * 8);

                while (len > 0 && s < send) {
                    ul <<= 7;
                    ul |= (*s & 0x7f);
                    if (!(*s++ & 0x80)) {
                        rb_ary_push(ary, ULONG2NUM(ul));
                        len--;
                        ul = 0;
                    }
                    else if (ul & ulmask) {
                        VALUE big = rb_uint2big(ul);
                        VALUE big128 = rb_uint2big(128);
                        while (s < send) {
                            big = rb_big_mul(big, big128);
                            big = rb_big_plus(big, rb_uint2big(*s & 0x7f));
                            if (!(*s++ & 0x80)) {
                                rb_ary_push(ary, big);
                                len--;
                                ul = 0;
                                break;
                            }
                        }
                    }
                }
            }
            break;

          default:
            break;
        }
    }

    return ary;
}

#define BYTEWIDTH 8

static int
uv_to_utf8(char *buf, unsigned long uv)
{
    if (uv <= 0x7f) {
        buf[0] = (char)uv;
        return 1;
    }
    if (uv <= 0x7ff) {
        buf[0] = ((uv>>6)&0xff)|0xc0;
        buf[1] = (uv&0x3f)|0x80;
        return 2;
    }
    if (uv <= 0xffff) {
        buf[0] = ((uv>>12)&0xff)|0xe0;
        buf[1] = ((uv>>6)&0x3f)|0x80;
        buf[2] = (uv&0x3f)|0x80;
        return 3;
    }
    if (uv <= 0x1fffff) {
        buf[0] = ((uv>>18)&0xff)|0xf0;
        buf[1] = ((uv>>12)&0x3f)|0x80;
        buf[2] = ((uv>>6)&0x3f)|0x80;
        buf[3] = (uv&0x3f)|0x80;
        return 4;
    }
    if (uv <= 0x3ffffff) {
        buf[0] = ((uv>>24)&0xff)|0xf8;
        buf[1] = ((uv>>18)&0x3f)|0x80;
        buf[2] = ((uv>>12)&0x3f)|0x80;
        buf[3] = ((uv>>6)&0x3f)|0x80;
        buf[4] = (uv&0x3f)|0x80;
        return 5;
    }
    if (uv <= 0x7fffffff) {
        buf[0] = ((uv>>30)&0xff)|0xfc;
        buf[1] = ((uv>>24)&0x3f)|0x80;
        buf[2] = ((uv>>18)&0x3f)|0x80;
        buf[3] = ((uv>>12)&0x3f)|0x80;
        buf[4] = ((uv>>6)&0x3f)|0x80;
        buf[5] = (uv&0x3f)|0x80;
        return 6;
    }
    rb_raise(rb_eRangeError, "pack(U): value out of range");
}

static const unsigned long utf8_limits[] = {
    0x0,                        /* 1 */
    0x80,                       /* 2 */
    0x800,                      /* 3 */
    0x10000,                    /* 4 */
    0x200000,                   /* 5 */
    0x4000000,                  /* 6 */
    0x80000000,                 /* 7 */
};

static unsigned long
utf8_to_uv(char *p, long *lenp)
{
    int c = *p++ & 0xff;
    unsigned long uv = c;
    long n;

    if (!(uv & 0x80)) {
        *lenp = 1;
        return uv;
    }
    if (!(uv & 0x40)) {
        *lenp = 1;
        rb_raise(rb_eArgError, "malformed UTF-8 character");
    }

    if      (!(uv & 0x20)) { n = 2; uv &= 0x1f; }
    else if (!(uv & 0x10)) { n = 3; uv &= 0x0f; }
    else if (!(uv & 0x08)) { n = 4; uv &= 0x07; }
    else if (!(uv & 0x04)) { n = 5; uv &= 0x03; }
    else if (!(uv & 0x02)) { n = 6; uv &= 0x01; }
    else {
        *lenp = 1;
        rb_raise(rb_eArgError, "malformed UTF-8 character");
    }
    if (n > *lenp) {
        rb_raise(rb_eArgError, "malformed UTF-8 character (expected %ld bytes, given %ld bytes)",
                 n, *lenp);
    }
    *lenp = n--;
    if (n != 0) {
        while (n--) {
            c = *p++ & 0xff;
            if ((c & 0xc0) != 0x80) {
                *lenp -= n + 1;
                rb_raise(rb_eArgError, "malformed UTF-8 character");
            }
            else {
                c &= 0x3f;
                uv = uv << 6 | c;
            }
        }
    }
    n = *lenp - 1;
    if (uv < utf8_limits[n]) {
        rb_raise(rb_eArgError, "redundant UTF-8 sequence");
    }
    return uv;
}

void
Init_pack(void)
{
    rb_define_method(rb_cArray, "pack", pack_pack, 1);
    rb_define_method(rb_cString, "unpack", pack_unpack, 1);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


parse.y

root/parse.y

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. YYSTYPE
  2. yyparse
  3. ripper_dispatch_scan_event
  4. ripper_dispatch_delayed_token
  5. parser_yyerror
  6. yycompile
  7. lex_get_str
  8. lex_getline
  9. rb_compile_string
  10. rb_parser_compile_string
  11. rb_compile_cstr
  12. rb_parser_compile_cstr
  13. lex_io_gets
  14. rb_compile_file
  15. rb_parser_compile_file
  16. parser_nextc
  17. parser_pushback
  18. parser_newtok
  19. parser_tokadd
  20. parser_read_escape
  21. parser_tokadd_escape
  22. parser_regx_options
  23. dispose_string
  24. parser_tokadd_string
  25. ripper_new_strterm
  26. parser_parse_string
  27. parser_heredoc_identifier
  28. parser_heredoc_restore
  29. parser_whole_match_p
  30. parser_here_document
  31. arg_ambiguous
  32. ripper_arg_ambiguous
  33. lvar_defined_gen
  34. pragma_encoding
  35. pragma_marker
  36. parser_pragma
  37. parser_prepare
  38. parser_yylex
  39. yylex
  40. rb_node_newnode
  41. nodetype
  42. nodeline
  43. newline_node
  44. fixpos
  45. parser_warning
  46. parser_warn
  47. block_append
  48. list_append
  49. list_concat
  50. literal_concat
  51. evstr2dstr
  52. new_evstr
  53. call_op_gen
  54. match_op_gen
  55. gettable_gen
  56. assignable_gen
  57. shadowing_lvar_gen
  58. new_bv_gen
  59. aryset_gen
  60. block_dup_check
  61. rb_id_attrset
  62. attrset_gen
  63. rb_backref_error
  64. arg_concat
  65. arg_add
  66. node_assign_gen
  67. value_expr_gen
  68. void_expr_gen
  69. void_stmts_gen
  70. remove_begin
  71. reduce_nodes
  72. assign_in_cond
  73. e_option_supplied
  74. warn_unless_e_option
  75. warning_unless_e_option
  76. range_op
  77. literal_node
  78. cond0
  79. cond_gen
  80. logop_gen
  81. cond_negative
  82. no_blockarg
  83. ret_args
  84. new_yield
  85. negate_lit
  86. arg_blk_pass
  87. arg_prepend
  88. arg_dup_check
  89. new_args_gen
  90. new_call
  91. new_fcall_gen
  92. new_super
  93. local_push_gen
  94. local_pop_gen
  95. local_tbl_gen
  96. local_append_gen
  97. local_cnt_gen
  98. local_id_gen
  99. top_local_init_gen
  100. top_local_setup_gen
  101. dyna_var_gen
  102. dyna_check_gen
  103. dyna_push_gen
  104. dyna_pop_gen
  105. dyna_in_block_gen
  106. dyna_init_gen
  107. rb_gc_mark_parser
  108. rb_parser_append_print
  109. rb_parser_while_loop
  110. Init_sym
  111. internal_id
  112. is_special_global_name
  113. rb_symname_p
  114. rb_intern
  115. rb_id2name
  116. symbols_i
  117. rb_sym_all_symbols
  118. rb_is_const_id
  119. rb_is_class_id
  120. rb_is_instance_id
  121. rb_is_local_id
  122. rb_is_junk_id
  123. special_local_set
  124. rb_backref_get
  125. rb_backref_set
  126. rb_lastline_get
  127. rb_lastline_set
  128. parser_initialize
  129. parser_mark
  130. parser_free
  131. parser_new
  132. rb_parser_new
  133. rb_parser_end_seen_p
  134. rb_parser_malloc
  135. rb_parser_calloc
  136. rb_parser_realloc
  137. rb_parser_free
  138. ripper_validate_object
  139. ripper_dispatch0
  140. ripper_dispatch1
  141. ripper_dispatch2
  142. ripper_dispatch3
  143. ripper_dispatch4
  144. ripper_dispatch5
  145. keyword_id_to_str
  146. ripper_id2sym
  147. ripper_intern
  148. ripper_compile_error
  149. ripper_warn0
  150. ripper_warnI
  151. ripper_warnS
  152. ripper_warning0
  153. ripper_warningS
  154. ripper_lex_get_generic
  155. ripper_s_allocate
  156. ripper_initialize
  157. ripper_s_get_yydebug
  158. ripper_s_set_yydebug
  159. ripper_parse0
  160. ripper_ensure
  161. ripper_parse
  162. ripper_column
  163. ripper_lineno
  164. ripper_assert_Qundef
  165. ripper_value
  166. Init_ripper
/**********************************************************************

  parse.y -

  $Author: nobu $
  $Date: 2005/12/19 14:32:53 $
  created at: Fri May 28 18:02:42 JST 1993

  Copyright (C) 1993-2004 Yukihiro Matsumoto

**********************************************************************/

%{

#define YYDEBUG 1
#define YYERROR_VERBOSE 1
#define YYSTACK_USE_ALLOCA 0

#include "ruby.h"
#include "env.h"
#include "intern.h"
#include "node.h"
#include "st.h"
#include <stdio.h>
#include <errno.h>
#include <ctype.h>

#define YYMALLOC(size)          rb_parser_malloc(parser, size)
#define YYREALLOC(ptr, size)    rb_parser_realloc(parser, ptr, size)
#define YYCALLOC(nelem, size)   rb_parser_calloc(parser, nelem, size)
#define YYFREE(ptr)             rb_parser_free(parser, ptr)
#define malloc  YYMALLOC
#define realloc YYREALLOC
#define calloc  YYCALLOC
#define free    YYFREE

#define ID_SCOPE_SHIFT 3
#define ID_SCOPE_MASK 0x07
#define ID_LOCAL    0x01
#define ID_INSTANCE 0x02
#define ID_GLOBAL   0x03
#define ID_ATTRSET  0x04
#define ID_CONST    0x05
#define ID_CLASS    0x06
#define ID_JUNK     0x07
#define ID_INTERNAL ID_JUNK

#define is_notop_id(id) ((id)>tLAST_TOKEN)
#define is_local_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_LOCAL)
#define is_global_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_GLOBAL)
#define is_instance_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_INSTANCE)
#define is_attrset_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_ATTRSET)
#define is_const_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CONST)
#define is_class_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_CLASS)
#define is_junk_id(id) (is_notop_id(id)&&((id)&ID_SCOPE_MASK)==ID_JUNK)

#define is_asgn_or_id(id) ((is_notop_id(id)) && \
        (((id)&ID_SCOPE_MASK) == ID_GLOBAL || \
         ((id)&ID_SCOPE_MASK) == ID_INSTANCE || \
         ((id)&ID_SCOPE_MASK) == ID_CLASS))

#ifndef RIPPER
char *ruby_sourcefile;          /* current source file */
int   ruby_sourceline;          /* current line no. */
#endif

enum lex_state_e {
    EXPR_BEG,                   /* ignore newline, +/- is a sign. */
    EXPR_END,                   /* newline significant, +/- is a operator. */
    EXPR_END2,                  /* newline significant, +/- is a operator. */
    EXPR_ARG,                   /* newline significant, +/- is a operator. */
    EXPR_CMDARG,                /* newline significant, +/- is a operator. */
    EXPR_ENDARG,                /* newline significant, +/- is a operator. */
    EXPR_MID,                   /* newline significant, +/- is a operator. */
    EXPR_FNAME,                 /* ignore newline, no reserved words. */
    EXPR_DOT,                   /* right after `.' or `::', no reserved words. */
    EXPR_CLASS,                 /* immediate after `class', no here document. */
    EXPR_VALUE,                 /* alike EXPR_BEG but label is disallowed. */
};

# ifdef HAVE_LONG_LONG
typedef unsigned LONG_LONG stack_type;
# else
typedef unsigned long stack_type;
# endif

# define BITSTACK_PUSH(stack, n)        (stack = (stack<<1)|((n)&1))
# define BITSTACK_POP(stack)    (stack = stack >> 1)
# define BITSTACK_LEXPOP(stack) (stack = (stack >> 1) | (stack & 1))
# define BITSTACK_SET_P(stack)  (stack&1)

#define COND_PUSH(n)    BITSTACK_PUSH(cond_stack, n)
#define COND_POP()      BITSTACK_POP(cond_stack)
#define COND_LEXPOP()   BITSTACK_LEXPOP(cond_stack)
#define COND_P()        BITSTACK_SET_P(cond_stack)

#define CMDARG_PUSH(n)  BITSTACK_PUSH(cmdarg_stack, n)
#define CMDARG_POP()    BITSTACK_POP(cmdarg_stack)
#define CMDARG_LEXPOP() BITSTACK_LEXPOP(cmdarg_stack)
#define CMDARG_P()      BITSTACK_SET_P(cmdarg_stack)

/* must sync with real YYSTYPE */
union tmpyystype {
    VALUE val;
    NODE *node;
    unsigned long id;
    int num;
    struct RVarmap *vars;
};

struct local_vars {
    ID *tbl;
    int nofree;
    int cnt;
    int dlev;
    int dname_size;
    ID *dnames;
    struct RVarmap* dyna_vars;
    struct local_vars *prev;
};

/*
    Structure of Lexer Buffer:

 lex_pbeg      tokp         lex_p        lex_pend
    |           |              |            |
    |-----------+--------------+------------|
                |<------------>|
                     token
*/
struct parser_params {
    NODE *heap;

    union tmpyystype *parser_yylval;   /* YYSTYPE not defined yet */
    VALUE eofp;

    NODE *parser_lex_strterm;
    enum lex_state_e parser_lex_state;
    stack_type parser_cond_stack;
    stack_type parser_cmdarg_stack;
    int parser_class_nest;
    int parser_paren_nest;
    int parser_lpar_beg;
    int parser_in_single;
    int parser_in_def;
    int parser_compile_for_eval;
    VALUE parser_cur_mid;
    int parser_in_defined;
    char *parser_tokenbuf;
    int parser_tokidx;
    int parser_toksiz;
    VALUE parser_lex_input;
    VALUE parser_lex_lastline;
    const char *parser_lex_pbeg;
    const char *parser_lex_p;
    const char *parser_lex_pend;
    int parser_heredoc_end;
    int parser_command_start;
    int parser_lex_gets_ptr;
    VALUE (*parser_lex_gets)(struct parser_params*,VALUE);
    struct local_vars *parser_lvtbl;
    int parser_ruby__end__seen;
    int line_count;
    int has_shebang;

#ifndef RIPPER
    /* Ruby core only */
    NODE *parser_eval_tree_begin;
    NODE *parser_eval_tree;
    VALUE debug_lines;
#else
    /* Ripper only */
    int parser_ruby_sourceline;
    VALUE parser_ruby_sourcefile;
    const char *tokp;
    VALUE delayed;
    int delayed_line;
    int delayed_col;

    VALUE value;
    VALUE result;
    VALUE parsing_thread;
    int toplevel_p;
#endif
};

#ifdef YYMALLOC
void *rb_parser_malloc(struct parser_params *, size_t);
void *rb_parser_realloc(struct parser_params *, void *, size_t);
void *rb_parser_calloc(struct parser_params *, size_t, size_t);
void rb_parser_free(struct parser_params *, void *);
#endif

static int parser_yyerror(struct parser_params*, const char*);
#define yyerror(msg) parser_yyerror(parser, msg)

#define YYPARSE_PARAM parser_v
#define YYLEX_PARAM parser_v
#define parser ((struct parser_params*)parser_v)

#define ruby_eval_tree          (parser->parser_eval_tree)
#define ruby_eval_tree_begin    (parser->parser_eval_tree_begin)
#define lex_strterm             (parser->parser_lex_strterm)
#define lex_state               (parser->parser_lex_state)
#define cond_stack              (parser->parser_cond_stack)
#define cmdarg_stack            (parser->parser_cmdarg_stack)
#define class_nest              (parser->parser_class_nest)
#define paren_nest              (parser->parser_paren_nest)
#define lpar_beg                (parser->parser_lpar_beg)
#define in_single               (parser->parser_in_single)
#define in_def                  (parser->parser_in_def)
#define compile_for_eval        (parser->parser_compile_for_eval)
#define cur_mid                 (parser->parser_cur_mid)
#define in_defined              (parser->parser_in_defined)
#define tokenbuf                (parser->parser_tokenbuf)
#define tokidx                  (parser->parser_tokidx)
#define toksiz                  (parser->parser_toksiz)
#define lex_input               (parser->parser_lex_input)
#define lex_lastline            (parser->parser_lex_lastline)
#define lex_pbeg                (parser->parser_lex_pbeg)
#define lex_p                   (parser->parser_lex_p)
#define lex_pend                (parser->parser_lex_pend)
#define heredoc_end             (parser->parser_heredoc_end)
#define command_start           (parser->parser_command_start)
#define lex_gets_ptr            (parser->parser_lex_gets_ptr)
#define lex_gets                (parser->parser_lex_gets)
#define lvtbl                   (parser->parser_lvtbl)
#define ruby__end__seen         (parser->parser_ruby__end__seen)
#ifdef RIPPER
#define ruby_sourceline         (parser->parser_ruby_sourceline)
#define ruby_sourcefile         (parser->parser_ruby_sourcefile)
#else
#define ruby_debug_lines        (parser->debug_lines)
#endif

static int yylex(void*, void*);

#ifndef RIPPER
#define yyparse ruby_yyparse
#define yydebug ruby_yydebug

static NODE *cond_gen(struct parser_params*,NODE*);
#define cond(node) cond_gen(parser, node)
static NODE *logop_gen(struct parser_params*,enum node_type,NODE*,NODE*);
#define logop(type,node1,node2) logop_gen(parser, type, node1, node2)

static int cond_negative(NODE**);

static NODE *newline_node(NODE*);
static void fixpos(NODE*,NODE*);

static int value_expr_gen(struct parser_params*,NODE*);
static void void_expr_gen(struct parser_params*,NODE*);
static NODE *remove_begin(NODE*);
#define value_expr(node) value_expr_gen(parser, (node) = remove_begin(node))
#define void_expr(node) void_expr_gen(parser, (node) = remove_begin(node))
static void void_stmts_gen(struct parser_params*,NODE*);
#define void_stmts(node) void_stmts_gen(parser, node)
static void reduce_nodes(NODE**);
static void block_dup_check(NODE*);

static NODE *block_append(NODE*,NODE*);
static NODE *list_append(NODE*,NODE*);
static NODE *list_concat(NODE*,NODE*);
static NODE *arg_concat(NODE*,NODE*);
static NODE *literal_concat(NODE*,NODE*);
static NODE *new_evstr(NODE*);
static NODE *evstr2dstr(NODE*);

static NODE *call_op_gen(struct parser_params*,NODE*,ID,int,NODE*);
#define call_op(recv,id,narg,arg1) call_op_gen(parser, recv,id,narg,arg1)

static NODE *new_args_gen(struct parser_params*,VALUE,NODE*,NODE*,NODE*);
#define new_args(f,o,r,b) new_args_gen(parser, f,o,r,b)
static void shadowing_lvar_gen(struct parser_params*,ID);
#define shadowing_lvar(name) shadowing_lvar_gen(parser, name)

static NODE *negate_lit(NODE*);
static NODE *ret_args(NODE*);
static NODE *arg_blk_pass(NODE*,NODE*);
static NODE *new_call(NODE*,ID,NODE*);
static NODE *new_fcall_gen(struct parser_params*,ID,NODE*);
#define new_fcall(id,args) new_fcall_gen(parser, id, args)
static NODE *new_super(NODE*);
static NODE *new_yield(NODE*);

static NODE *gettable_gen(struct parser_params*,ID);
#define gettable(id) gettable_gen(parser,id)
static NODE *assignable_gen(struct parser_params*,ID,NODE*);
#define assignable(id,node) assignable_gen(parser, id, node)
static NODE *new_bv_gen(struct parser_params*,ID,NODE*);
#define new_bv(id,node) new_bv_gen(parser, id, node)
static NODE *aryset_gen(struct parser_params*,NODE*,NODE*);
#define aryset(node1,node2) aryset_gen(parser, node1, node2)
static NODE *attrset_gen(struct parser_params*,NODE*,ID);
#define attrset(node,id) attrset_gen(parser, node, id)

static void rb_backref_error(NODE*);
static NODE *node_assign_gen(struct parser_params*,NODE*,NODE*);
#define node_assign(node1, node2) node_assign_gen(parser, node1, node2)

static NODE *match_op_gen(struct parser_params*,NODE*,NODE*);
#define match_op(node1,node2) match_op_gen(parser, node1, node2)

static void local_push_gen(struct parser_params*,int);
#define local_push(top) local_push_gen(parser,top)
static void local_pop_gen(struct parser_params*);
#define local_pop() local_pop_gen(parser)
static int  local_append_gen(struct parser_params*, ID);
#define local_append(id) local_append_gen(parser, id)
static int  local_cnt_gen(struct parser_params*, ID);
#define local_cnt(id) local_cnt_gen(parser, id)
static int  local_id_gen(struct parser_params*, ID);
#define local_id(id) local_id_gen(parser, id)
static ID  *local_tbl_gen(struct parser_params*);
#define local_tbl() local_tbl_gen(parser)
static ID   internal_id(void);

static struct RVarmap *dyna_push_gen(struct parser_params*);
#define dyna_push() dyna_push_gen(parser)
static void dyna_pop_gen(struct parser_params*, struct RVarmap*);
#define dyna_pop(vars) dyna_pop_gen(parser, vars)
static int dyna_in_block_gen(struct parser_params*);
#define dyna_in_block() dyna_in_block_gen(parser)
static NODE *dyna_init_gen(struct parser_params*, NODE*, struct RVarmap *);
#define dyna_init(node, pre) dyna_init_gen(parser, node, pre)
static void dyna_var_gen(struct parser_params*,ID);
#define dyna_var(id) dyna_var_gen(parser, id)
static void dyna_check_gen(struct parser_params*,ID);
#define dyna_check(id) dyna_check_gen(parser, id)

static void top_local_init_gen(struct parser_params*);
#define top_local_init() top_local_init_gen(parser)
static void top_local_setup_gen(struct parser_params*);
#define top_local_setup() top_local_setup_gen(parser)
#else
#define remove_begin(node) (node)
#endif /* !RIPPER */
static int lvar_defined_gen(struct parser_params*, ID);
#define lvar_defined(id) lvar_defined_gen(parser, id)

#define RE_OPTION_ONCE (1<<16)

#define NODE_STRTERM NODE_ZARRAY        /* nothing to gc */
#define NODE_HEREDOC NODE_ARRAY         /* 1, 3 to gc */
#define SIGN_EXTEND(x,n) (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1))
#define nd_func u1.id
#if SIZEOF_SHORT == 2
#define nd_term(node) ((signed short)(node)->u2.id)
#else
#define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2)
#endif
#define nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2)
#define nd_nest u3.cnt

/****** Ripper *******/

#ifdef RIPPER
#define RIPPER_VERSION "0.1.0"

#include "eventids1.c"
#include "eventids2.c"
static ID ripper_id_gets;

static VALUE ripper_dispatch0(struct parser_params*,ID);
static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);

#define dispatch0(n)            ripper_dispatch0(parser, TOKEN_PASTE(ripper_id_, n))
#define dispatch1(n,a)          ripper_dispatch1(parser, TOKEN_PASTE(ripper_id_, n), a)
#define dispatch2(n,a,b)        ripper_dispatch2(parser, TOKEN_PASTE(ripper_id_, n), a, b)
#define dispatch3(n,a,b,c)      ripper_dispatch3(parser, TOKEN_PASTE(ripper_id_, n), a, b, c)
#define dispatch4(n,a,b,c,d)    ripper_dispatch4(parser, TOKEN_PASTE(ripper_id_, n), a, b, c, d)
#define dispatch5(n,a,b,c,d,e)  ripper_dispatch5(parser, TOKEN_PASTE(ripper_id_, n), a, b, c, d, e)

#define yyparse ripper_yyparse
#define yydebug ripper_yydebug

static VALUE ripper_intern(const char*);
static VALUE ripper_id2sym(ID);

#define arg_new() dispatch0(arglist_new)
#define arg_add(l,a) dispatch2(arglist_add, l, a)
#define arg_prepend(l,a) dispatch2(arglist_prepend, l, a)
#define arg_add_star(l,a) dispatch2(arglist_add_star, l, a)
#define arg_add_block(l,b) dispatch2(arglist_add_block, l, b)
#define arg_add_optblock(l,b) ((b)==Qundef? l : dispatch2(arglist_add_block, l, b))
#define bare_assoc(v) dispatch1(bare_assoc_hash, v)
#define arg_add_assocs(l,b) arg_add(l, bare_assoc(b))

#define args2mrhs(a) dispatch1(mrhs_new_from_arglist, a)
#define mrhs_new() dispatch0(mrhs_new)
#define mrhs_add(l,a) dispatch2(mrhs_add, l, a)
#define mrhs_add_star(l,a) dispatch2(mrhs_add_star, l, a)

#define mlhs_new() dispatch0(mlhs_new)
#define mlhs_add(l,a) dispatch2(mlhs_add, l, a)
#define mlhs_add_star(l,a) dispatch2(mlhs_add_star, l, a)

#define blockvar_new(p) dispatch1(blockvar_new, p)
#define blockvar_add_star(l,a) dispatch2(blockvar_add_star, l, a)
#define blockvar_add_block(l,a) dispatch2(blockvar_add_block, l, a)

#define method_optarg(m,a) ((a)==Qundef ? m : dispatch2(method_add_arg,m,a))
#define method_arg(m,a) dispatch2(method_add_arg,m,a)
#define escape_Qundef(x) ((x)==Qundef ? Qnil : (x))

#define FIXME 0

#endif /* RIPPER */

#ifndef RIPPER
# define ifndef_ripper(x) x
#else
# define ifndef_ripper(x)
#endif

#ifndef RIPPER
# define rb_warn0(fmt)    rb_warn(fmt)
# define rb_warnI(fmt,a)  rb_warn(fmt,a)
# define rb_warnS(fmt,a)  rb_warn(fmt,a)
# define rb_warning0(fmt) rb_warning(fmt)
# define rb_warningS(fmt,a) rb_warning(fmt,a)
#else
# define rb_warn0(fmt)    ripper_warn0(parser, fmt)
# define rb_warnI(fmt,a)  ripper_warnI(parser, fmt, a)
# define rb_warnS(fmt,a)  ripper_warnS(parser, fmt, a)
# define rb_warning0(fmt) ripper_warning0(parser, fmt)
# define rb_warningS(fmt,a) ripper_warningS(parser, fmt, a)
static void ripper_warn0(struct parser_params*, const char*);
static void ripper_warnI(struct parser_params*, const char*, int);
static void ripper_warnS(struct parser_params*, const char*, const char*);
static void ripper_warning0(struct parser_params*, const char*);
static void ripper_warningS(struct parser_params*, const char*, const char*);
#endif

#ifdef RIPPER
static void ripper_compile_error(struct parser_params*, const char *fmt, ...);
# define rb_compile_error ripper_compile_error
# define compile_error ripper_compile_error
# define PARSER_ARG parser,
#else
# define compile_error rb_compile_error
# define PARSER_ARG
#endif

#define NEW_BLOCK_PARAM(b, v) NEW_NODE(NODE_BLOCK_PASS, 0, b, v)

/* Older versions of Yacc set YYMAXDEPTH to a very low value by default (150,
   for instance).  This is too low for Ruby to parse some files, such as
   date/format.rb, therefore bump the value up to at least Bison's default. */
#ifdef OLD_YACC
#ifndef YYMAXDEPTH
#define YYMAXDEPTH 10000
#endif
#endif

%}

%pure_parser

%union {
    VALUE val;
    NODE *node;
    ID id;
    int num;
    struct RVarmap *vars;
}

/*%%%*/
%token
/*%
%token <val>
%*/
        kCLASS
        kMODULE
        kDEF
        kUNDEF
        kBEGIN
        kRESCUE
        kENSURE
        kEND
        kIF
        kUNLESS
        kTHEN
        kELSIF
        kELSE
        kCASE
        kWHEN
        kWHILE
        kUNTIL
        kFOR
        kBREAK
        kNEXT
        kREDO
        kRETRY
        kIN
        kDO
        kDO_COND
        kDO_BLOCK
        kDO_LAMBDA
        kRETURN
        kYIELD
        kSUPER
        kSELF
        kNIL
        kTRUE
        kFALSE
        kAND
        kOR
        kNOT
        kIF_MOD
        kUNLESS_MOD
        kWHILE_MOD
        kUNTIL_MOD
        kRESCUE_MOD
        kALIAS
        kDEFINED
        klBEGIN
        klEND
        k__LINE__
        k__FILE__

%token <id>   tIDENTIFIER tFID tGVAR tIVAR tCONSTANT tCVAR tLABEL
%token <node> tINTEGER tFLOAT tSTRING_CONTENT
%token <node> tNTH_REF tBACK_REF
%token <num>  tREGEXP_END

%type <node> singleton strings string string1 xstring regexp
%type <node> string_contents xstring_contents string_content
%type <node> words qwords word_list qword_list word
%type <node> literal numeric dsym cpath
%type <node> bodystmt compstmt stmts stmt expr arg primary command command_call method_call
%type <node> expr_value arg_value primary_value
%type <node> if_tail opt_else case_body cases opt_rescue exc_list exc_var opt_ensure
%type <node> args when_args call_args call_args2 open_args paren_args opt_paren_args
%type <node> command_args aref_args opt_block_arg block_arg var_ref var_lhs
%type <node> mrhs superclass block_call block_command
%type <node> f_arglist f_args f_rest_arg f_optarg f_opt f_block_arg opt_f_block_arg
%type <node> assoc_list assocs assoc undef_list backref string_dvar
%type <node> for_var block_param opt_block_param block_param_def block_param0
%type <node> opt_bv_decl bv_decls bv_decl lambda f_larglist lambda_body
%type <node> brace_block cmd_brace_block do_block lhs none fitem
%type <node> mlhs mlhs_head mlhs_basic mlhs_entry mlhs_item mlhs_node
%type <id>   fsym variable sym symbol operation operation2 operation3
%type <id>   cname fname op f_norm_arg
%type <val>  f_arg
/*%%%*/
/*%
%type <val> program reswords then do dot_or_colon
%*/
%token tUPLUS           /* unary+ */
%token tUMINUS          /* unary- */
%token tPOW             /* ** */
%token tCMP             /* <=> */
%token tEQ              /* == */
%token tEQQ             /* === */
%token tNEQ             /* != */
%token tGEQ             /* >= */
%token tLEQ             /* <= */
%token tANDOP tOROP     /* && and || */
%token tMATCH tNMATCH   /* =~ and !~ */
%token tDOT2 tDOT3      /* .. and ... */
%token tAREF tASET      /* [] and []= */
%token tLSHFT tRSHFT    /* << and >> */
%token tCOLON2          /* :: */
%token tCOLON3          /* :: at EXPR_BEG */
%token <id> tOP_ASGN    /* +=, -=  etc. */
%token tASSOC           /* => */
%token tLPAREN          /* ( */
%token tLPAREN_ARG      /* ( */
%token tRPAREN          /* ) */
%token tLBRACK          /* [ */
%token tLBRACE          /* { */
%token tLBRACE_ARG      /* { */
%token tSTAR            /* * */
%token tAMPER           /* & */
%token tLAMBDA          /* -> */
%token tLAMBDA_ARG      /* -> */
%token tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG tWORDS_BEG tQWORDS_BEG
%token tSTRING_DBEG tSTRING_DVAR tSTRING_END tLAMBEG

/*
 *      precedence table
 */

%nonassoc tLOWEST
%nonassoc tLBRACE_ARG

%nonassoc  kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD
%left  kOR kAND
%right kNOT
%nonassoc kDEFINED
%right '=' tOP_ASGN
%left kRESCUE_MOD
%right '?' ':'
%nonassoc tDOT2 tDOT3
%left  tOROP
%left  tANDOP
%nonassoc  tCMP tEQ tEQQ tNEQ tMATCH tNMATCH
%left  '>' tGEQ '<' tLEQ
%left  '|' '^'
%left  '&'
%left  tLSHFT tRSHFT
%left  '+' '-'
%left  '*' '/' '%'
%right tUMINUS_NUM tUMINUS
%right tPOW
%right '!' '~' tUPLUS

%token tLAST_TOKEN

%%
program         :  {
                    /*%%%*/
                        lex_state = EXPR_BEG;
                        top_local_init();
                        if (ruby_class == rb_cObject) class_nest = 0;
                        else class_nest = 1;
                    /*%
                        lex_state = EXPR_BEG;
                        class_nest = !parser->toplevel_p;
                        $$ = Qnil;
                    %*/
                    }
                  compstmt
                    {
                    /*%%%*/
                        if ($2 && !compile_for_eval) {
                            /* last expression should not be void */
                            if (nd_type($2) != NODE_BLOCK) void_expr($2);
                            else {
                                NODE *node = $2;
                                while (node->nd_next) {
                                    node = node->nd_next;
                                }
                                void_expr(node->nd_head);
                            }
                        }
                        ruby_eval_tree = block_append(ruby_eval_tree, $2);
                        top_local_setup();
                        class_nest = 0;
                    /*%
                        class_nest = 0;
                        $$ = $2;
                        parser->result = dispatch1(program, $$);
                    %*/
                    }
                ;

bodystmt        : compstmt
                  opt_rescue
                  opt_else
                  opt_ensure
                    {
                    /*%%%*/
                        $$ = $1;
                        if ($2) {
                            $$ = NEW_RESCUE($1, $2, $3);
                        }
                        else if ($3) {
                            rb_warn("else without rescue is useless");
                            $$ = block_append($$, $3);
                        }
                        if ($4) {
                            if ($$) {
                                $$ = NEW_ENSURE($$, $4);
                            }
                            else {
                                $$ = block_append($4, NEW_NIL());
                            }
                        }
                        fixpos($$, $1);
                    /*%
                        $$ = dispatch4(bodystmt,
                                       escape_Qundef($1),
                                       escape_Qundef($2),
                                       escape_Qundef($3),
                                       escape_Qundef($4));
                    %*/
                    }
                ;

compstmt        : stmts opt_terms
                    {
                    /*%%%*/
                        void_stmts($1);
                        $$ = $1;
                    /*%
                        $$ = $1;
                    %*/
                    }
                ;

stmts           : none
                    /*%c%*/
                    /*%c
                    {
                        $$ = dispatch2(stmts_add, dispatch0(stmts_new),
                                                  dispatch0(void_stmt));
                    }
                    %*/
                | stmt
                    {
                    /*%%%*/
                        $$ = newline_node(remove_begin($1));
                    /*%
                        $$ = dispatch2(stmts_add, dispatch0(stmts_new), $1);
                    %*/
                    }
                | stmts terms stmt
                    {
                    /*%%%*/
                        $$ = block_append($1, newline_node(remove_begin($3)));
                    /*%
                        $$ = dispatch2(stmts_add, $1, $3);
                    %*/
                    }
                | error stmt
                    {
                        $$ = remove_begin($2);
                    }
                ;

stmt            : kALIAS fitem {lex_state = EXPR_FNAME;} fitem
                    {
                    /*%%%*/
                        $$ = NEW_ALIAS($2, $4);
                    /*%
                        $$ = dispatch2(alias, $2, $4);
                    %*/
                    }
                | kALIAS tGVAR tGVAR
                    {
                    /*%%%*/
                        $$ = NEW_VALIAS($2, $3);
                    /*%
                        $$ = dispatch2(var_alias, $2, $3);
                    %*/
                    }
                | kALIAS tGVAR tBACK_REF
                    {
                    /*%%%*/
                        char buf[3];

                        sprintf(buf, "$%c", (char)$3->nd_nth);
                        $$ = NEW_VALIAS($2, rb_intern(buf));
                    /*%
                        $$ = dispatch2(var_alias, $2, $3);
                    %*/
                    }
                | kALIAS tGVAR tNTH_REF
                    {
                    /*%%%*/
                        yyerror("can't make alias for the number variables");
                        $$ = 0;
                    /*%
                        $$ = dispatch2(var_alias, $2, $3);
                        $$ = dispatch1(alias_error, $$);
                    %*/
                    }
                | kUNDEF undef_list
                    {
                    /*%%%*/
                        $$ = $2;
                    /*%
                        $$ = dispatch1(undef, $2);
                    %*/
                    }
                | stmt kIF_MOD expr_value
                    {
                    /*%%%*/
                        $$ = NEW_IF(cond($3), $1, 0);
                        fixpos($$, $3);
                        if (cond_negative(&$$->nd_cond)) {
                            $$->nd_else = $$->nd_body;
                            $$->nd_body = 0;
                        }
                    /*%
                        $$ = dispatch2(if_mod, $3, $1);
                    %*/
                    }
                | stmt kUNLESS_MOD expr_value
                    {
                    /*%%%*/
                        $$ = NEW_UNLESS(cond($3), $1, 0);
                        fixpos($$, $3);
                        if (cond_negative(&$$->nd_cond)) {
                            $$->nd_body = $$->nd_else;
                            $$->nd_else = 0;
                        }
                    /*%
                        $$ = dispatch2(unless_mod, $3, $1);
                    %*/
                    }
                | stmt kWHILE_MOD expr_value
                    {
                    /*%%%*/
                        if ($1 && nd_type($1) == NODE_BEGIN) {
                            $$ = NEW_WHILE(cond($3), $1->nd_body, 0);
                        }
                        else {
                            $$ = NEW_WHILE(cond($3), $1, 1);
                        }
                        if (cond_negative(&$$->nd_cond)) {
                            nd_set_type($$, NODE_UNTIL);
                        }
                    /*%
                        $$ = dispatch2(while_mod, $3, $1);
                    %*/
                    }
                | stmt kUNTIL_MOD expr_value
                    {
                    /*%%%*/
                        if ($1 && nd_type($1) == NODE_BEGIN) {
                            $$ = NEW_UNTIL(cond($3), $1->nd_body, 0);
                        }
                        else {
                            $$ = NEW_UNTIL(cond($3), $1, 1);
                        }
                        if (cond_negative(&$$->nd_cond)) {
                            nd_set_type($$, NODE_WHILE);
                        }
                    /*%
                        $$ = dispatch2(until_mod, $3, $1);
                    %*/
                    }
                | stmt kRESCUE_MOD stmt
                    {
                    /*%%%*/
                        $$ = NEW_RESCUE($1, NEW_RESBODY(0,$3,0), 0);
                    /*%
                        $$ = dispatch2(rescue_mod, $3, $1);
                    %*/
                    }
                | klBEGIN
                    {
                    /*%%%*/
                        if (in_def || in_single) {
                            yyerror("BEGIN in method");
                        }
                        local_push(0);
                    /*%
                        if (in_def || in_single) {
                            yyerror("BEGIN in method");
                        }
                    %*/
                    }
                  '{' compstmt '}'
                    {
                    /*%%%*/
                        ruby_eval_tree_begin = block_append(ruby_eval_tree_begin,
                                                            NEW_PREEXE($4));
                        local_pop();
                        $$ = 0;
                    /*%
                        $$ = dispatch1(BEGIN, $4);
                    %*/
                    }
                | klEND '{' compstmt '}'
                    {
                    /*%%%*/
                        if (in_def || in_single) {
                            rb_warn("END in method; use at_exit");
                        }

                        $$ = NEW_ITER(0, NEW_POSTEXE(), $3);
                    /*%
                        if (in_def || in_single) {
                            rb_warn0("END in method; use at_exit");
                        }
                        $$ = dispatch1(END, $3);
                    %*/
                    }
                | lhs '=' command_call
                    {
                    /*%%%*/
                        $$ = node_assign($1, $3);
                    /*%
                        $$ = dispatch2(assign, $1, $3);
                    %*/
                    }
                | mlhs '=' command_call
                    {
                    /*%%%*/
                        value_expr($3);
                        $1->nd_value = ($1->nd_head) ? NEW_TO_ARY($3) : NEW_ARRAY($3);
                        $$ = $1;
                    /*%
                        $$ = dispatch2(massign, $1, $3);
                    %*/
                    }
                | var_lhs tOP_ASGN command_call
                    {
                    /*%%%*/
                        value_expr($3);
                        if ($1) {
                            ID vid = $1->nd_vid;
                            if ($2 == tOROP) {
                                $1->nd_value = $3;
                                $$ = NEW_OP_ASGN_OR(gettable(vid), $1);
                                if (is_asgn_or_id(vid)) {
                                    $$->nd_aid = vid;
                                }
                            }
                            else if ($2 == tANDOP) {
                                $1->nd_value = $3;
                                $$ = NEW_OP_ASGN_AND(gettable(vid), $1);
                            }
                            else {
                                $$ = $1;
                                $$->nd_value = call_op(gettable(vid),$2,1,$3);
                            }
                        }
                        else {
                            $$ = 0;
                        }
                    /*%
                        $$ = dispatch3(opassign, $1, $2, $3);
                    %*/
                    }
                | primary_value '[' aref_args ']' tOP_ASGN command_call
                    {
                    /*%%%*/
                        NODE *args;

                        value_expr($6);
                        args = NEW_LIST($6);
                        if ($3 && nd_type($3) != NODE_ARRAY)
                            $3 = NEW_LIST($3);
                        $3 = list_append($3, NEW_NIL());
                        list_concat(args, $3);
                        if ($5 == tOROP) {
                            $5 = 0;
                        }
                        else if ($5 == tANDOP) {
                            $5 = 1;
                        }
                        $$ = NEW_OP_ASGN1($1, $5, args);
                        fixpos($$, $1);
                    /*%
                        $$ = dispatch2(aref_field, $1, escape_Qundef($3));
                        $$ = dispatch3(opassign, $$, $5, $6);
                    %*/
                    }
                | primary_value '.' tIDENTIFIER tOP_ASGN command_call
                    {
                    /*%%%*/
                        value_expr($5);
                        if ($4 == tOROP) {
                            $4 = 0;
                        }
                        else if ($4 == tANDOP) {
                            $4 = 1;
                        }
                        $$ = NEW_OP_ASGN2($1, $3, $4, $5);
                        fixpos($$, $1);
                    /*%
                        $$ = dispatch3(field, $1, ripper_id2sym('.'), $3);
                        $$ = dispatch3(opassign, $$, $4, $5);
                    %*/
                    }
                | primary_value '.' tCONSTANT tOP_ASGN command_call
                    {
                    /*%%%*/
                        value_expr($5);
                        if ($4 == tOROP) {
                            $4 = 0;
                        }
                        else if ($4 == tANDOP) {
                            $4 = 1;
                        }
                        $$ = NEW_OP_ASGN2($1, $3, $4, $5);
                        fixpos($$, $1);
                    /*%
                        $$ = dispatch3(field, $1, ripper_id2sym('.'), $3);
                        $$ = dispatch3(opassign, $$, $4, $5);
                    %*/
                    }
                | primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call
                    {
                    /*%%%*/
                        value_expr($5);
                        if ($4 == tOROP) {
                            $4 = 0;
                        }
                        else if ($4 == tANDOP) {
                            $4 = 1;
                        }
                        $$ = NEW_OP_ASGN2($1, $3, $4, $5);
                        fixpos($$, $1);
                    /*%
                        $$ = dispatch3(field, $1, ripper_intern("::"), $3);
                        $$ = dispatch3(opassign, $$, $4, $5);
                    %*/
                    }
                | backref tOP_ASGN command_call
                    {
                    /*%%%*/
                        rb_backref_error($1);
                        $$ = 0;
                    /*%
                        $$ = dispatch2(assign, dispatch1(var_field, $1), $3);
                        $$ = dispatch1(assign_error, $$);
                    %*/
                    }
                | lhs '=' mrhs
                    {
                    /*%%%*/
                        $$ = node_assign($1, NEW_SVALUE($3));
                    /*%
                        $$ = dispatch2(assign, $1, $3);
                    %*/
                    }
                | mlhs '=' arg_value
                    {
                    /*%%%*/
                        $1->nd_value = ($1->nd_head) ? NEW_TO_ARY($3) : NEW_ARRAY($3);
                        $$ = $1;
                    /*%
                        dispatch2(massign, $1, $3);
                    %*/
                    }
                | mlhs '=' mrhs
                    {
                    /*%%%*/
                        $1->nd_value = $3;
                        $$ = $1;
                    /*%
                        $$ = dispatch2(massign, $1, $3);
                    %*/
                    }
                | expr
                ;

expr            : command_call
                | expr kAND expr
                    {
                    /*%%%*/
                        $$ = logop(NODE_AND, $1, $3);
                    /*%
                        $$ = dispatch3(binary, $1, ripper_intern("and"), $3);
                    %*/
                    }
                | expr kOR expr
                    {
                    /*%%%*/
                        $$ = logop(NODE_OR, $1, $3);
                    /*%
                        $$ = dispatch3(binary, $1, ripper_intern("or"), $3);
                    %*/
                    }
                | kNOT expr
                    {
                    /*%%%*/
                        $$ = NEW_NOT(cond($2));
                    /*%
                        $$ = dispatch2(unary, ripper_intern("not"), $2);
                    %*/
                    }
                | '!' command_call
                    {
                    /*%%%*/
                        $$ = NEW_NOT(cond($2));
                    /*%
                        $$ = dispatch2(unary, ID2SYM('!'), $2);
                    %*/
                    }
                | arg
                ;

expr_value      : expr
                    {
                    /*%%%*/
                        value_expr($$);
                        $$ = $1;
                    /*%
                        $$ = $1;
                    %*/
                    }
                ;

command_call    : command
                | block_command
                | kRETURN call_args
                    {
                    /*%%%*/
                        $$ = NEW_RETURN(ret_args($2));
                    /*%
                        $$ = dispatch1(return, $2);
                    %*/
                    }
                | kBREAK call_args
                    {
                    /*%%%*/
                        $$ = NEW_BREAK(ret_args($2));
                    /*%
                        $$ = dispatch1(break, $2);
                    %*/
                    }
                | kNEXT call_args
                    {
                    /*%%%*/
                        $$ = NEW_NEXT(ret_args($2));
                    /*%
                        $$ = dispatch1(next, $2);
                    %*/
                    }
                ;

block_command   : block_call
                | block_call '.' operation2 command_args
                    {
                    /*%%%*/
                        $$ = new_call($1, $3, $4);
                    /*%
                        $$ = dispatch3(call, $1, ripper_id2sym('.'), $3);
                        $$ = method_arg($$, $4);
                    %*/
                    }
                | block_call tCOLON2 operation2 command_args
                    {
                    /*%%%*/
                        $$ = new_call($1, $3, $4);
                    /*%
                        $$ = dispatch3(call, $1, ripper_intern("::"), $3);
                        $$ = method_arg($$, $4);
                    %*/
                    }
                ;

cmd_brace_block : tLBRACE_ARG
                    {
                    /*%%%*/
                        $<vars>$ = dyna_push();
                        $<num>1 = ruby_sourceline;
                    /*%
                    %*/
                    }
                  opt_block_param {$<vars>$ = ruby_dyna_vars;}
                  compstmt
                  '}'
                    {
                    /*%%%*/
                        $3->nd_body = block_append($3->nd_body,
                                                   dyna_init($5, $<vars>4));
                        $$ = $3;
                        nd_set_line($$, $<num>1);
                        dyna_pop($<vars>2);
                    /*%
                        $$ = dispatch2(brace_block, escape_Qundef($3), $5);
                    %*/
                    }
                ;

command         : operation command_args       %prec tLOWEST
                    {
                    /*%%%*/
                        $$ = new_fcall($1, $2);
                        fixpos($$, $2);
                    /*%
                        $$ = dispatch2(command, $1, $2);
                    %*/
                    }
                | operation command_args cmd_brace_block
                    {
                    /*%%%*/
                        $$ = new_fcall($1, $2);
                        if ($3) {
                            block_dup_check($$);
                            $3->nd_iter = $$;
                            $$ = $3;
                        }
                        fixpos($$, $2);
                    /*%
                        $$ = dispatch2(command, $1, $2);
                        $$ = dispatch2(iter_block, $$, $3);
                    %*/
                    }
                | primary_value '.' operation2 command_args     %prec tLOWEST
                    {
                    /*%%%*/
                        $$ = new_call($1, $3, $4);
                        fixpos($$, $1);
                    /*%
                        $$ = dispatch4(command_call, $1, ripper_id2sym('.'), $3, $4);
                    %*/
                    }
                | primary_value '.' operation2 command_args cmd_brace_block
                    {
                    /*%%%*/
                        $$ = new_call($1, $3, $4);
                        if ($5) {
                            block_dup_check($$);
                            $5->nd_iter = $$;
                            $$ = $5;
                        }
                        fixpos($$, $1);
                    /*%
                        $$ = dispatch4(command_call, $1, ripper_id2sym('.'), $3, $4);
                        $$ = dispatch2(iter_block, $$, $5);
                    %*/
                   }
                | primary_value tCOLON2 operation2 command_args %prec tLOWEST
                    {
                    /*%%%*/
                        $$ = new_call($1, $3, $4);
                        fixpos($$, $1);
                    /*%
                        $$ = dispatch4(command_call, $1, ripper_intern("::"), $3, $4);
                    %*/
                    }
                | primary_value tCOLON2 operation2 command_args cmd_brace_block
                    {
                    /*%%%*/
                        $$ = new_call($1, $3, $4);
                        if ($5) {
                            block_dup_check($$);
                            $5->nd_iter = $$;
                            $$ = $5;
                        }
                        fixpos($$, $1);
                    /*%
                        $$ = dispatch4(command_call, $1, ripper_intern("::"), $3, $4);
                        $$ = dispatch2(iter_block, $$, $5);
                    %*/
                   }
                | kSUPER command_args
                    {
                    /*%%%*/
                        $$ = new_super($2);
                        fixpos($$, $2);
                    /*%
                        $$ = dispatch1(super, $2);
                    %*/
                    }
                | kYIELD command_args
                    {
                    /*%%%*/
                        $$ = new_yield($2);
                        fixpos($$, $2);
                    /*%
                        $$ = dispatch1(yield, $2);
                    %*/
                    }
                ;

mlhs            : mlhs_basic
                | tLPAREN mlhs_entry rparen
                    {
                    /*%%%*/
                        $$ = $2;
                    /*%
                        $$ = dispatch1(mlhs_paren, $2);
                    %*/
                    }
                ;

mlhs_entry      : mlhs_basic
                | tLPAREN mlhs_entry rparen
                    {
                    /*%%%*/
                        $$ = NEW_MASGN(NEW_LIST($2), 0);
                    /*%
                        $$ = dispatch1(mlhs_paren, $2);
                    %*/
                    }
                ;

mlhs_basic      : mlhs_head
                    {
                    /*%%%*/
                        $$ = NEW_MASGN($1, 0);
                    /*%
                        $$ = $1;
                    %*/
                    }
                | mlhs_head mlhs_item
                    {
                    /*%%%*/
                        $$ = NEW_MASGN(list_append($1,$2), 0);
                    /*%
                        $$ = mlhs_add($1, $2);
                    %*/
                    }
                | mlhs_head tSTAR mlhs_node
                    {
                    /*%%%*/
                        $$ = NEW_MASGN($1, $3);
                    /*%
                        $$ = mlhs_add_star($1, $3);
                    %*/
                    }
                | mlhs_head tSTAR
                    {
                    /*%%%*/
                        $$ = NEW_MASGN($1, -1);
                    /*%
                        $$ = mlhs_add_star($1, Qnil);
                    %*/
                    }
                | tSTAR mlhs_node
                    {
                    /*%%%*/
                        $$ = NEW_MASGN(0, $2);
                    /*%
                        $$ = mlhs_add_star(mlhs_new(), $2);
                    %*/
                    }
                | tSTAR
                    {
                    /*%%%*/
                        $$ = NEW_MASGN(0, -1);
                    /*%
                        $$ = mlhs_add_star(mlhs_new(), Qnil);
                    %*/
                    }
                ;

mlhs_item       : mlhs_node
                | tLPAREN mlhs_entry rparen
                    {
                    /*%%%*/
                        $$ = $2;
                    /*%
                        $$ = dispatch1(mlhs_paren, $2);
                    %*/
                    }
                ;

mlhs_head       : mlhs_item ','
                    {
                    /*%%%*/
                        $$ = NEW_LIST($1);
                    /*%
                        $$ = mlhs_add(mlhs_new(), $1);
                    %*/
                    }
                | mlhs_head mlhs_item ','
                    {
                    /*%%%*/
                        $$ = list_append($1, $2);
                    /*%
                        $$ = mlhs_add($1, $2);
                    %*/
                    }
                ;

mlhs_node       : variable
                    {
                    /*%%%*/
                        $$ = assignable($1, 0);
                    /*%
                        $$ = $1;
                    %*/
                    }
                | primary_value '[' aref_args ']'
                    {
                    /*%%%*/
                        $$ = aryset($1, $3);
                    /*%
                        $$ = dispatch2(aref_field, $1, escape_Qundef($3));
                    %*/
                    }
                | primary_value '.' tIDENTIFIER
                    {
                    /*%%%*/
                        $$ = attrset($1, $3);
                    /*%
                        $$ = dispatch3(field, $1, ripper_id2sym('.'), $3);
                    %*/
                    }
                | primary_value tCOLON2 tIDENTIFIER
                    {
                    /*%%%*/
                        $$ = attrset($1, $3);
                    /*%
                        $$ = dispatch2(constpath_field, $1, $3);
                    %*/
                    }
                | primary_value '.' tCONSTANT
                    {
                    /*%%%*/
                        $$ = attrset($1, $3);
                    /*%
                        $$ = dispatch3(field, $1, ripper_id2sym('.'), $3);
                    %*/
                    }
                | primary_value tCOLON2 tCONSTANT
                    {
                    /*%%%*/
                        if (in_def || in_single)
                            yyerror("dynamic constant assignment");
                        $$ = NEW_CDECL(0, 0, NEW_COLON2($1, $3));
                    /*%
                        if (in_def || in_single)
                            yyerror("dynamic constant assignment");
                        $$ = dispatch2(constpath_field, $1, $3);
                    %*/
                    }
                | tCOLON3 tCONSTANT
                    {
                    /*%%%*/
                        if (in_def || in_single)
                            yyerror("dynamic constant assignment");
                        $$ = NEW_CDECL(0, 0, NEW_COLON3($2));
                    /*%
                        $$ = dispatch1(topconst_field, $2);
                    %*/
                    }
                | backref
                    {
                    /*%%%*/
                        rb_backref_error($1);
                        $$ = 0;
                    /*%
                        $$ = dispatch1(var_field, $1);
                        $$ = dispatch1(assign_error, $$);
                    %*/
                    }
                ;

lhs             : variable
                    {
                    /*%%%*/
                        $$ = assignable($1, 0);
                    /*%
                        $$ = dispatch1(var_field, $1);
                    %*/
                    }
                | primary_value '[' aref_args ']'
                    {
                    /*%%%*/
                        $$ = aryset($1, $3);
                    /*%
                        $$ = dispatch2(aref_field, $1, escape_Qundef($3));
                    %*/
                    }
                | primary_value '.' tIDENTIFIER
                    {
                    /*%%%*/
                        $$ = attrset($1, $3);
                    /*%
                        $$ = dispatch3(field, $1, ripper_id2sym('.'), $3);
                    %*/
                    }
                | primary_value tCOLON2 tIDENTIFIER
                    {
                    /*%%%*/
                        $$ = attrset($1, $3);
                    /*%
                        $$ = dispatch3(field, $1, ripper_intern("::"), $3);
                    %*/
                    }
                | primary_value '.' tCONSTANT
                    {
                    /*%%%*/
                        $$ = attrset($1, $3);
                    /*%
                        $$ = dispatch3(field, $1, ripper_id2sym('.'), $3);
                    %*/
                    }
                | primary_value tCOLON2 tCONSTANT
                    {
                    /*%%%*/
                        if (in_def || in_single)
                            yyerror("dynamic constant assignment");
                        $$ = NEW_CDECL(0, 0, NEW_COLON2($1, $3));
                    /*%
                        $$ = dispatch2(constpath_field, $1, $3);
                        if (in_def || in_single) {
                            $$ = dispatch1(assign_error, $$);
                        }
                    %*/
                    }
                | tCOLON3 tCONSTANT
                    {
                    /*%%%*/
                        if (in_def || in_single)
                            yyerror("dynamic constant assignment");
                        $$ = NEW_CDECL(0, 0, NEW_COLON3($2));
                    /*%
                        $$ = dispatch1(topconst_field, $2);
                        if (in_def || in_single) {
                            $$ = dispatch1(assign_error, $$);
                        }
                    %*/
                    }
                | backref
                    {
                    /*%%%*/
                        rb_backref_error($1);
                        $$ = 0;
                    /*%
                        $$ = dispatch1(assign_error, $1);
                    %*/
                    }
                ;

cname           : tIDENTIFIER
                    {
                    /*%%%*/
                        yyerror("class/module name must be CONSTANT");
                    /*%
                        $$ = dispatch1(class_name_error, $1);
                    %*/
                    }
                | tCONSTANT
                ;

cpath           : tCOLON3 cname
                    {
                    /*%%%*/
                        $$ = NEW_COLON3($2);
                    /*%
                        $$ = dispatch1(topconst_ref, $2);
                    %*/
                    }
                | cname
                    {
                    /*%%%*/
                        $$ = NEW_COLON2(0, $$);
                    /*%
                        $$ = dispatch1(const_ref, $1);
                    %*/
                    }
                | primary_value tCOLON2 cname
                    {
                    /*%%%*/
                        $$ = NEW_COLON2($1, $3);
                    /*%
                        $$ = dispatch2(constpath_ref, $1, $3);
                    %*/
                    }
                ;

fname           : tIDENTIFIER
                | tCONSTANT
                | tFID
                | op
                    {
                    /*%%%*/
                        lex_state = EXPR_END;
                        $$ = $1;
                    /*%
                        lex_state = EXPR_END;
                        $$ = $1;
                    %*/
                    }
                | reswords
                    {
                    /*%%%*/
                        lex_state = EXPR_END;
                        $$ = $<id>1;
                    /*%
                        lex_state = EXPR_END;
                        $$ = $1;
                    %*/
                    }
                ;

fsym            : fname
                | symbol
                ;

fitem           : fsym
                    {
                    /*%%%*/
                        $$ = NEW_LIT(ID2SYM($1));
                    /*%
                        $$ = dispatch1(symbol_literal, $1);
                    %*/
                    }
                | dsym
                ;

undef_list      : fitem
                    {
                    /*%%%*/
                        $$ = NEW_UNDEF($1);
                    /*%
                        $$ = rb_ary_new3(1, $1);
                    %*/
                    }
                | undef_list ',' {lex_state = EXPR_FNAME;} fitem
                    {
                    /*%%%*/
                        $$ = block_append($1, NEW_UNDEF($4));
                    /*%
                        rb_ary_push($1, $4);
                    %*/
                    }
                ;

op              : '|'           { ifndef_ripper($$ = '|'); }
                | '^'           { ifndef_ripper($$ = '^'); }
                | '&'           { ifndef_ripper($$ = '&'); }
                | tCMP          { ifndef_ripper($$ = tCMP); }
                | tEQ           { ifndef_ripper($$ = tEQ); }
                | tEQQ          { ifndef_ripper($$ = tEQQ); }
                | tMATCH        { ifndef_ripper($$ = tMATCH); }
                | '>'           { ifndef_ripper($$ = '>'); }
                | tGEQ          { ifndef_ripper($$ = tGEQ); }
                | '<'           { ifndef_ripper($$ = '<'); }
                | tLEQ          { ifndef_ripper($$ = tLEQ); }
                | tLSHFT        { ifndef_ripper($$ = tLSHFT); }
                | tRSHFT        { ifndef_ripper($$ = tRSHFT); }
                | '+'           { ifndef_ripper($$ = '+'); }
                | '-'           { ifndef_ripper($$ = '-'); }
                | '*'           { ifndef_ripper($$ = '*'); }
                | tSTAR         { ifndef_ripper($$ = '*'); }
                | '/'           { ifndef_ripper($$ = '/'); }
                | '%'           { ifndef_ripper($$ = '%'); }
                | tPOW          { ifndef_ripper($$ = tPOW); }
                | '~'           { ifndef_ripper($$ = '~'); }
                | tUPLUS        { ifndef_ripper($$ = tUPLUS); }
                | tUMINUS       { ifndef_ripper($$ = tUMINUS); }
                | tAREF         { ifndef_ripper($$ = tAREF); }
                | tASET         { ifndef_ripper($$ = tASET); }
                | '`'           { ifndef_ripper($$ = '`'); }
                ;

reswords        : k__LINE__ | k__FILE__ | klBEGIN | klEND
                | kALIAS | kAND | kBEGIN | kBREAK | kCASE | kCLASS | kDEF
                | kDEFINED | kDO | kELSE | kELSIF | kEND | kENSURE | kFALSE
                | kFOR | kIN | kMODULE | kNEXT | kNIL | kNOT
                | kOR | kREDO | kRESCUE | kRETRY | kRETURN | kSELF | kSUPER
                | kTHEN | kTRUE | kUNDEF | kWHEN | kYIELD
                | kIF_MOD | kUNLESS_MOD | kWHILE_MOD | kUNTIL_MOD | kRESCUE_MOD
                ;

arg             : lhs '=' arg
                    {
                    /*%%%*/
                        $$ = node_assign($1, $3);
                    /*%
                        $$ = dispatch2(assign, $1, $3);
                    %*/
                    }
                | lhs '=' arg kRESCUE_MOD arg
                    {
                    /*%%%*/
                        $$ = node_assign($1, NEW_RESCUE($3, NEW_RESBODY(0,$5,0), 0));
                    /*%
                        $$ = dispatch2(assign, $1, dispatch2(rescue_mod,$3,$5));
                    %*/
                    }
                | var_lhs tOP_ASGN arg
                    {
                    /*%%%*/
                        value_expr($3);
                        if ($1) {
                            ID vid = $1->nd_vid;
                            if ($2 == tOROP) {
                                $1->nd_value = $3;
                                $$ = NEW_OP_ASGN_OR(gettable(vid), $1);
                                if (is_asgn_or_id(vid)) {
                                    $$->nd_aid = vid;
                                }
                            }
                            else if ($2 == tANDOP) {
                                $1->nd_value = $3;
                                $$ = NEW_OP_ASGN_AND(gettable(vid), $1);
                            }
                            else {
                                $$ = $1;
                                $$->nd_value = call_op(gettable(vid),$2,1,$3);
                            }
                        }
                        else {
                            $$ = 0;
                        }
                    /*%
                        $$ = dispatch3(opassign, $1, $2, $3);
                    %*/
                    }
                | primary_value '[' aref_args ']' tOP_ASGN arg
                    {
                    /*%%%*/
                        NODE *args;

                        value_expr($6);
                        args = NEW_LIST($6);
                        if ($3 && nd_type($3) != NODE_ARRAY)
                            $3 = NEW_LIST($3);
                        $3 = list_append($3, NEW_NIL());
                        list_concat(args, $3);
                        if ($5 == tOROP) {
                            $5 = 0;
                        }
                        else if ($5 == tANDOP) {
                            $5 = 1;
                        }
                        $$ = NEW_OP_ASGN1($1, $5, args);
                        fixpos($$, $1);
                    /*%
                        $1 = dispatch2(aref_field, $1, escape_Qundef($3));
                        $$ = dispatch3(opassign, $1, $5, $6);
                    %*/
                    }
                | primary_value '.' tIDENTIFIER tOP_ASGN arg
                    {
                    /*%%%*/
                        value_expr($5);
                        if ($4 == tOROP) {
                            $4 = 0;
                        }
                        else if ($4 == tANDOP) {
                            $4 = 1;
                        }
                        $$ = NEW_OP_ASGN2($1, $3, $4, $5);
                        fixpos($$, $1);
                    /*%
                        $1 = dispatch3(field, $1, ripper_id2sym('.'), $3);
                        $$ = dispatch3(opassign, $1, $4, $5);
                    %*/
                    }
                | primary_value '.' tCONSTANT tOP_ASGN arg
                    {
                    /*%%%*/
                        value_expr($5);
                        if ($4 == tOROP) {
                            $4 = 0;
                        }
                        else if ($4 == tANDOP) {
                            $4 = 1;
                        }
                        $$ = NEW_OP_ASGN2($1, $3, $4, $5);
                        fixpos($$, $1);
                    /*%
                        $1 = dispatch3(field, $1, ripper_id2sym('.'), $3);
                        $$ = dispatch3(opassign, $1, $4, $5);
                    %*/
                    }
                | primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg
                    {
                    /*%%%*/
                        value_expr($5);
                        if ($4 == tOROP) {
                            $4 = 0;
                        }
                        else if ($4 == tANDOP) {
                            $4 = 1;
                        }
                        $$ = NEW_OP_ASGN2($1, $3, $4, $5);
                        fixpos($$, $1);
                    /*%
                        $1 = dispatch3(field, $1, ripper_intern("::"), $3);
                        $$ = dispatch3(opassign, $1, $4, $5);
                    %*/
                    }
                | primary_value tCOLON2 tCONSTANT tOP_ASGN arg
                    {
                    /*%%%*/
                        yyerror("constant re-assignment");
                        $$ = 0;
                    /*%
                        $$ = dispatch2(constpath_field, $1, $3);
                        $$ = dispatch3(opassign, $$, $4, $5);
                        $$ = dispatch1(assign_error, $$);
                    %*/
                    }
                | tCOLON3 tCONSTANT tOP_ASGN arg
                    {
                    /*%%%*/
                        yyerror("constant re-assignment");
                        $$ = 0;
                    /*%
                        $$ = dispatch1(topconst_field, $2);
                        $$ = dispatch3(opassign, $$, $3, $4);
                        $$ = dispatch1(assign_error, $$);
                    %*/
                    }
                | backref tOP_ASGN arg
                    {
                    /*%%%*/
                        rb_backref_error($1);
                        $$ = 0;
                    /*%
                        $$ = dispatch1(var_field, $1);
                        $$ = dispatch3(opassign, $$, $2, $3);
                        $$ = dispatch1(assign_error, $$);
                    %*/
                    }
                | arg tDOT2 arg
                    {
                    /*%%%*/
                        value_expr($1);
                        value_expr($3);
                        if (nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) &&
                            nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) {
                            $1->nd_lit = rb_range_new($1->nd_lit, $3->nd_lit, Qfalse);
                            $$ = $1;
                        }
                        else {
                            $$ = NEW_DOT2($1, $3);
                        }
                    /*%
                        $$ = dispatch2(dot2, $1, $3);
                    %*/
                    }
                | arg tDOT3 arg
                    {
                    /*%%%*/
                        value_expr($1);
                        value_expr($3);
                        if (nd_type($1) == NODE_LIT && FIXNUM_P($1->nd_lit) &&
                            nd_type($3) == NODE_LIT && FIXNUM_P($3->nd_lit)) {
                            $1->nd_lit = rb_range_new($1->nd_lit, $3->nd_lit, Qtrue);
                            $$ = $1;
                        }
                        else {
                            $$ = NEW_DOT3($1, $3);
                        }
                    /*%
                        $$ = dispatch2(dot3, $1, $3);
                    %*/
                    }
                | arg '+' arg
                    {
                    /*%%%*/
                        $$ = call_op($1, '+', 1, $3);
                    /*%
                        $$ = dispatch3(binary, $1, ID2SYM('+'), $3);
                    %*/
                    }
                | arg '-' arg
                    {
                    /*%%%*/
                        $$ = call_op($1, '-', 1, $3);
                    /*%
                        $$ = dispatch3(binary, $1, ID2SYM('-'), $3);
                    %*/
                    }
                | arg '*' arg
                    {
                    /*%%%*/
                        $$ = call_op($1, '*', 1, $3);
                    /*%
                        $$ = dispatch3(binary, $1, ID2SYM('*'), $3);
                    %*/
                    }
                | arg '/' arg
                    {
                    /*%%%*/
                        $$ = call_op($1, '/', 1, $3);
                    /*%
                        $$ = dispatch3(binary, $1, ID2SYM('/'), $3);
                    %*/
                    }
                | arg '%' arg
                    {
                    /*%%%*/
                        $$ = call_op($1, '%', 1, $3);
                    /*%
                        $$ = dispatch3(binary, $1, ID2SYM('%'), $3);
                    %*/
                    }
                | arg tPOW arg
                    {
                    /*%%%*/
                        $$ = call_op($1, tPOW, 1, $3);
                    /*%
                        $$ = dispatch3(binary, $1, ripper_intern("**"), $3);
                    %*/
                    }
                | tUMINUS_NUM tINTEGER tPOW arg
                    {
                    /*%%%*/
                        $$ = call_op(call_op($2, tPOW, 1, $4), tUMINUS, 0, 0);
                    /*%
                        $$ = dispatch3(binary, $2, ripper_intern("**"), $4);
                        $$ = dispatch2(unary, ripper_intern("-@"), $$);
                    %*/
                    }
                | tUMINUS_NUM tFLOAT tPOW arg
                    {
                    /*%%%*/
                        $$ = call_op(call_op($2, tPOW, 1, $4), tUMINUS, 0, 0);
                    /*%
                        $$ = dispatch3(binary, $2, ripper_intern("**"), $4);
                        $$ = dispatch2(unary, ripper_intern("-@"), $$);
                    %*/
                    }
                | tUPLUS arg
                    {
                    /*%%%*/
                        if ($2 && nd_type($2) == NODE_LIT) {
                            $$ = $2;
                        }
                        else {
                            $$ = call_op($2, tUPLUS, 0, 0);
                        }
                    /*%
                        $$ = dispatch2(unary, ripper_intern("+@"), $2);
                    %*/
                    }
                | tUMINUS arg
                    {
                    /*%%%*/
                        $$ = call_op($2, tUMINUS, 0, 0);
                    /*%
                        $$ = dispatch2(unary, ripper_intern("-@"), $2);
                    %*/
                    }
                | arg '|' arg
                    {
                    /*%%%*/
                        $$ = call_op($1, '|', 1, $3);
                    /*%
                        $$ = dispatch3(binary, $1, ID2SYM('!'), $3);
                    %*/
                    }
                | arg '^' arg
                    {
                    /*%%%*/
                        $$ = call_op($1, '^', 1, $3);
                    /*%
                        $$ = dispatch3(binary, $1, ID2SYM('^'), $3);
                    %*/
                    }
                | arg '&' arg
                    {
                    /*%%%*/
                        $$ = call_op($1, '&', 1, $3);
                    /*%
                        $$ = dispatch3(binary, $1, ID2SYM('&'), $3);
                    %*/
                    }
                | arg tCMP arg
                    {
                    /*%%%*/
                        $$ = call_op($1, tCMP, 1, $3);
                    /*%
                        $$ = dispatch3(binary, $1, ripper_intern("<=>"), $3);
                    %*/
                    }
                | arg '>' arg
                    {
                    /*%%%*/
                        $$ = call_op($1, '>', 1, $3);
                    /*%
                        $$ = dispatch3(binary, $1, ID2SYM('>'), $3);
                    %*/
                    }
                | arg tGEQ arg
                    {
                    /*%%%*/
                        $$ = call_op($1, tGEQ, 1, $3);
                    /*%
                        $$ = dispatch3(binary, $1, ripper_intern(">="), $3);
                    %*/
                    }
                | arg '<' arg
                    {
                    /*%%%*/
                        $$ = call_op($1, '<', 1, $3);
                    /*%
                        $$ = dispatch3(binary, $1, ID2SYM('<'), $3);
                    %*/
                    }
                | arg tLEQ arg
                    {
                    /*%%%*/
                        $$ = call_op($1, tLEQ, 1, $3);
                    /*%
                        $$ = dispatch3(binary, $1, ripper_intern("<="), $3);
                    %*/
                    }
                | arg tEQ arg
                    {
                    /*%%%*/
                        $$ = call_op($1, tEQ, 1, $3);
                    /*%
                        $$ = dispatch3(binary, $1, ripper_intern("=="), $3);
                    %*/
                    }
                | arg tEQQ arg
                    {
                    /*%%%*/
                        $$ = call_op($1, tEQQ, 1, $3);
                    /*%
                        $$ = dispatch3(binary, $1, ripper_intern("==="), $3);
                    %*/
                    }
                | arg tNEQ arg
                    {
                    /*%%%*/
                        $$ = NEW_NOT(call_op($1, tEQ, 1, $3));
                    /*%
                        $$ = dispatch3(binary, $1, ripper_intern("!="), $3);
                    %*/
                    }
                | arg tMATCH arg
                    {
                    /*%%%*/
                        $$ = match_op($1, $3);
                    /*%
                        $$ = dispatch3(binary, $1, ripper_intern("=~"), $3);
                    %*/
                    }
                | arg tNMATCH arg
                    {
                    /*%%%*/
                        $$ = NEW_NOT(match_op($1, $3));
                    /*%
                        $$ = dispatch3(binary, $1, ripper_intern("!~"), $3);
                    %*/
                    }
                | '!' arg
                    {
                    /*%%%*/
                        $$ = NEW_NOT(cond($2));
                    /*%
                        $$ = dispatch2(unary, ID2SYM('!'), $2);
                    %*/
                    }
                | '~' arg
                    {
                    /*%%%*/
                        $$ = call_op($2, '~', 0, 0);
                    /*%
                        $$ = dispatch2(unary, ID2SYM('~'), $2);
                    %*/
                    }
                | arg tLSHFT arg
                    {
                    /*%%%*/
                        $$ = call_op($1, tLSHFT, 1, $3);
                    /*%
                        $$ = dispatch3(binary, $1, ripper_intern("<<"), $3);
                    %*/
                    }
                | arg tRSHFT arg
                    {
                    /*%%%*/
                        $$ = call_op($1, tRSHFT, 1, $3);
                    /*%
                        $$ = dispatch3(binary, $1, ripper_intern(">>"), $3);
                    %*/
                    }
                | arg tANDOP arg
                    {
                    /*%%%*/
                        $$ = logop(NODE_AND, $1, $3);
                    /*%
                        $$ = dispatch3(binary, $1, ripper_intern("&&"), $3);
                    %*/
                    }
                | arg tOROP arg
                    {
                    /*%%%*/
                        $$ = logop(NODE_OR, $1, $3);
                    /*%
                        $$ = dispatch3(binary, $1, ripper_intern("||"), $3);
                    %*/
                    }
                | kDEFINED opt_nl {in_defined = 1;} arg
                    {
                    /*%%%*/
                        in_defined = 0;
                        $$ = NEW_DEFINED($4);
                    /*%
                        in_defined = 0;
                        $$ = dispatch1(defined, $4);
                    %*/
                    }
                | arg '?' arg ':' arg
                    {
                    /*%%%*/
                        $$ = NEW_IF(cond($1), $3, $5);
                        fixpos($$, $1);
                    /*%
                        $$ = dispatch3(ifop, $1, $3, $5);
                    %*/
                    }
                | primary
                    {
                        $$ = $1;
                    }
                ;

arg_value       : arg
                    {
                    /*%%%*/
                        value_expr($1);
                        $$ = $1;
                    /*%
                        $$ = $1;
                    %*/
                    }
                ;

aref_args       : none
                | command opt_nl
                    {
                    /*%%%*/
                        rb_warn("parenthesize argument(s) for future version");
                        $$ = NEW_LIST($1);
                    /*%
                        rb_warn0("parenthesize argument(s) for future version");
                        $$ = arg_add(arg_new(), $1);
                    %*/
                    }
                | args trailer
                    {
                        $$ = $1;
                    }
                | args ',' tSTAR arg opt_nl
                    {
                    /*%%%*/
                        value_expr($4);
                        $$ = arg_concat($1, $4);
                    /*%
                        $$ = arg_add_star($1, $4);
                    %*/
                    }
                | assocs trailer
                    {
                    /*%%%*/
                        $$ = NEW_LIST(NEW_HASH($1));
                    /*%
                        $$ = arg_add_assocs(arg_new(), $1);
                    %*/
                    }
                | tSTAR arg opt_nl
                    {
                    /*%%%*/
                        value_expr($2);
                        $$ = newline_node(NEW_SPLAT($2));
                    /*%
                        $$ = arg_add_star(arg_new(), $2);
                    %*/
                    }
                ;

paren_args      : '(' none ')'
                    {
                    /*%%%*/
                        $$ = $2;
                    /*%
                        $$ = dispatch1(arg_paren, arg_new());
                    %*/
                    }
                | '(' call_args rparen
                    {
                    /*%%%*/
                        $$ = $2;
                    /*%
                        $$ = dispatch1(arg_paren, $2);
                    %*/
                    }
                | '(' block_call rparen
                    {
                    /*%%%*/
                        rb_warn("parenthesize argument for future version");
                        $$ = NEW_LIST($2);
                    /*%
                        rb_warn0("parenthesize argument for future version");
                        $$ = dispatch1(arg_paren, arg_add(arg_new(), $2));
                    %*/
                    }
                | '(' args ',' block_call rparen
                    {
                    /*%%%*/
                        rb_warn("parenthesize argument for future version");
                        $$ = list_append($2, $4);
                    /*%
                        rb_warn0("parenthesize argument for future version");
                        $$ = dispatch1(arg_paren, arg_add($2, $4));
                    %*/
                    }
                ;

opt_paren_args  : none
                | paren_args
                ;

call_args       : command
                    {
                    /*%%%*/
                        rb_warn("parenthesize argument(s) for future version");
                        $$ = NEW_LIST($1);
                    /*%
                        rb_warn0("parenthesize argument(s) for future version");
                        $$ = arg_add(arg_new(), $1);
                    %*/
                    }
                | args opt_block_arg
                    {
                    /*%%%*/
                        $$ = arg_blk_pass($1, $2);
                    /*%
                        $$ = arg_add_optblock($1, $2);
                    %*/
                    }
                | args ',' tSTAR arg_value opt_block_arg
                    {
                    /*%%%*/
                        $$ = arg_concat($1, $4);
                        $$ = arg_blk_pass($$, $5);
                    /*%
                        arg_add_optblock(arg_add_star($1, $4), $5);
                    %*/
                    }
                | assocs opt_block_arg
                    {
                    /*%%%*/
                        $$ = NEW_LIST(NEW_HASH($1));
                        $$ = arg_blk_pass($$, $2);
                    /*%
                        $$ = arg_add_assocs(arg_new(), $1);
                        $$ = arg_add_optblock($$, $2);
                    %*/
                    }
                | assocs ',' tSTAR arg_value opt_block_arg
                    {
                    /*%%%*/
                        $$ = arg_concat(NEW_LIST(NEW_HASH($1)), $4);
                        $$ = arg_blk_pass($$, $5);
                    /*%
                        $$ = arg_add_star(arg_add_assocs(arg_new(), $1), $4);
                        $$ = arg_add_optblock($$, $5);
                    %*/
                    }
                | args ',' assocs opt_block_arg
                    {
                    /*%%%*/
                        $$ = list_append($1, NEW_HASH($3));
                        $$ = arg_blk_pass($$, $4);
                    /*%
                        $$ = arg_add_optblock(arg_add_assocs($1, $3), $4);
                    %*/
                    }
                | args ',' assocs ',' tSTAR arg opt_block_arg
                    {
                    /*%%%*/
                        value_expr($6);
                        $$ = arg_concat(list_append($1, NEW_HASH($3)), $6);
                        $$ = arg_blk_pass($$, $7);
                    /*%
                        $$ = arg_add_star(arg_add_assocs($1, $3), $6);
                        $$ = arg_add_optblock($$, $7);
                    %*/
                    }
                | tSTAR arg_value opt_block_arg
                    {
                    /*%%%*/
                        $$ = arg_blk_pass(NEW_SPLAT($2), $3);
                    /*%
                        $$ = arg_add_optblock(arg_add_star(arg_new(), $2), $3);
                    %*/
                    }
                | block_arg
                    /*%c%*/
                    /*%c
                    {
                        $$ = arg_add_block(arg_new(), $1);
                    }
                    %*/
                ;

call_args2      : arg_value ',' args opt_block_arg
                    {
                    /*%%%*/
                        $$ = arg_blk_pass(list_concat(NEW_LIST($1),$3), $4);
                    /*%
                        $$ = arg_add_optblock(arg_prepend($3, $1), $4);
                    %*/
                    }
                | arg_value ',' block_arg
                    {
                    /*%%%*/
                        $$ = arg_blk_pass($1, $3);
                    /*%
                        $$ = arg_add_block(arg_add(arg_new(), $1), $3);
                    %*/
                    }
                | arg_value ',' tSTAR arg_value opt_block_arg
                    {
                    /*%%%*/
                        $$ = arg_concat(NEW_LIST($1), $4);
                        $$ = arg_blk_pass($$, $5);
                    /*%
                        $$ = arg_add_star(arg_add(arg_new(), $1), $4);
                        $$ = arg_add_optblock($$, $5);
                    %*/
                    }
                | arg_value ',' args ',' tSTAR arg_value opt_block_arg
                    {
                    /*%%%*/
                        $$ = arg_concat(list_concat(NEW_LIST($1),$3), $6);
                        $$ = arg_blk_pass($$, $7);
                    /*%
                        $$ = arg_add_star(arg_prepend($3, $1), $6);
                        $$ = arg_add_optblock($$, $7);
                    %*/
                    }
                | assocs opt_block_arg
                    {
                    /*%%%*/
                        $$ = NEW_LIST(NEW_HASH($1));
                        $$ = arg_blk_pass($$, $2);
                    /*%
                        $$ = arg_add_optblock(arg_add_assocs(arg_new(), $1), $2);
                    %*/
                    }
                | assocs ',' tSTAR arg_value opt_block_arg
                    {
                    /*%%%*/
                        $$ = arg_concat(NEW_LIST(NEW_HASH($1)), $4);
                        $$ = arg_blk_pass($$, $5);
                    /*%
                        $$ = arg_add_star(arg_add_assocs(arg_new(), $1), $4);
                        $$ = arg_add_optblock($$, $4);
                    %*/
                    }
                | arg_value ',' assocs opt_block_arg
                    {
                    /*%%%*/
                        $$ = list_append(NEW_LIST($1), NEW_HASH($3));
                        $$ = arg_blk_pass($$, $4);
                    /*%
                        $$ = arg_add_assocs(arg_add(arg_new(), $1), $3);
                        $$ = arg_add_optblock($$, $4);
                    %*/
                    }
                | arg_value ',' args ',' assocs opt_block_arg
                    {
                    /*%%%*/
                        $$ = list_append(list_concat(NEW_LIST($1),$3), NEW_HASH($5));
                        $$ = arg_blk_pass($$, $6);
                    /*%
                        $$ = arg_add_assocs(arg_prepend($3, $1), $5);
                        $$ = arg_add_optblock($$, $6);
                    %*/
                    }
                | arg_value ',' assocs ',' tSTAR arg_value opt_block_arg
                    {
                    /*%%%*/
                        $$ = arg_concat(list_append(NEW_LIST($1), NEW_HASH($3)), $6);
                        $$ = arg_blk_pass($$, $7);
                    /*%
                        $$ = arg_add_assocs(arg_add(arg_new(), $1), $3);
                        $$ = arg_add_star($$, $6);
                        $$ = arg_add_optblock($$, $7);
                    %*/
                    }
                | arg_value ',' args ',' assocs ',' tSTAR arg_value opt_block_arg
                    {
                    /*%%%*/
                        $$ = arg_concat(list_append(list_concat(NEW_LIST($1), $3), NEW_HASH($5)), $8);
                        $$ = arg_blk_pass($$, $9);
                    /*%
                        $$ = arg_add_assocs(arg_prepend($3, $1), $5);
                        $$ = arg_add_star($$, $8);
                        $$ = arg_add_optblock($$, $9);
                    %*/
                    }
                | tSTAR arg_value opt_block_arg
                    {
                    /*%%%*/
                        $$ = arg_blk_pass(NEW_SPLAT($2), $3);
                    /*%
                        $$ = arg_add_optblock(arg_add_star(arg_new(), $2), $3);
                    %*/
                    }
                | block_arg
                ;

command_args    :  {
                        $<num>$ = cmdarg_stack;
                        CMDARG_PUSH(1);
                    }
                  open_args
                    {
                        /* CMDARG_POP() */
                        cmdarg_stack = $<num>1;
                        $$ = $2;
                    }
                ;

open_args       : call_args
                | tLPAREN_ARG  {lex_state = EXPR_ENDARG;} rparen
                    {
                    /*%%%*/
                        rb_warning("don't put space before argument parentheses");
                        $$ = 0;
                    /*%
                        $$ = dispatch1(space, dispatch1(arg_paren, arg_new()));
                    %*/
                    }
                | tLPAREN_ARG call_args2 {lex_state = EXPR_ENDARG;} rparen
                    {
                    /*%%%*/
                        rb_warning("don't put space before argument parentheses");
                        $$ = $2;
                    /*%
                        $$ = dispatch1(space, dispatch1(arg_paren, $2));
                    %*/
                    }
                ;

block_arg       : tAMPER arg_value
                    {
                    /*%%%*/
                        $$ = NEW_BLOCK_PASS($2);
                    /*%
                        $$ = $2;
                    %*/
                    }
                ;

opt_block_arg   : ',' block_arg
                    {
                        $$ = $2;
                    }
                | none
                ;

args            : arg_value
                    {
                    /*%%%*/
                        $$ = NEW_LIST($1);
                    /*%
                        $$ = arg_add(arg_new(), $1);
                    %*/
                    }
                | args ',' arg_value
                    {
                    /*%%%*/
                        $$ = list_append($1, $3);
                    /*%
                        $$ = arg_add($1, $3);
                    %*/
                    }
                ;

mrhs            : args ',' arg_value
                    {
                    /*%%%*/
                        $$ = list_append($1, $3);
                    /*%
                        $$ = mrhs_add(args2mrhs($1), $3);
                    %*/
                    }
                | args ',' tSTAR arg_value
                    {
                    /*%%%*/
                        $$ = arg_concat($1, $4);
                    /*%
                        $$ = mrhs_add_star(args2mrhs($1), $4);
                    %*/
                    }
                | tSTAR arg_value
                    {
                    /*%%%*/
                        $$ = NEW_SPLAT($2);
                    /*%
                        $$ = mrhs_add_star(mrhs_new(), $2);
                    %*/
                    }
                ;

primary         : literal
                | strings
                | xstring
                | regexp
                | words
                | qwords
                | var_ref
                | backref
                | tFID
                    {
                    /*%%%*/
                        $$ = NEW_FCALL($1, 0);
                    /*%
                        $$ = method_arg(dispatch1(fcall, $1), arg_new());
                    %*/
                    }
                | kBEGIN
                    {
                    /*%%%*/
                        $<num>1 = ruby_sourceline;
                    /*%
                    %*/
                    }
                  bodystmt
                  kEND
                    {
                    /*%%%*/
                        if ($3 == NULL) {
                            $$ = NEW_NIL();
                        }
                        else {
                            if (nd_type($3) == NODE_RESCUE ||
                                nd_type($3) == NODE_ENSURE)
                                nd_set_line($3, $<num>1);
                            $$ = NEW_BEGIN($3);
                        }
                        nd_set_line($$, $<num>1);
                    /*%
                        $$ = dispatch1(begin, $3);
                    %*/
                    }
                | tLPAREN_ARG expr {lex_state = EXPR_ENDARG;} rparen
                    {
                        rb_warning0("(...) interpreted as grouped expression");
                    /*%%%*/
                        $$ = $2;
                    /*%
                        $$ = dispatch1(paren, $2);
                    %*/
                    }
                | tLPAREN compstmt ')'
                    {
                    /*%%%*/
                        if (!$2) $$ = NEW_NIL();
                        else $$ = $2;
                    /*%
                        $$ = dispatch1(paren, $2);
                    %*/
                    }
                | primary_value tCOLON2 tCONSTANT
                    {
                    /*%%%*/
                        $$ = NEW_COLON2($1, $3);
                    /*%
                        $$ = dispatch2(constpath_ref, $1, $3);
                    %*/
                    }
                | tCOLON3 tCONSTANT
                    {
                    /*%%%*/
                        $$ = NEW_COLON3($2);
                    /*%
                        $$ = dispatch1(topconst_ref, $2);
                    %*/
                    }
                | tLBRACK aref_args ']'
                    {
                    /*%%%*/
                        if ($2 == 0) {
                            $$ = NEW_ZARRAY(); /* zero length array*/
                        }
                        else {
                            $$ = $2;
                        }
                    /*%
                        $$ = dispatch1(array, escape_Qundef($2));
                    %*/
                    }
                | tLBRACE assoc_list '}'
                    {
                    /*%%%*/
                        $$ = NEW_HASH($2);
                    /*%
                        $$ = dispatch1(hash, escape_Qundef($2));
                    %*/
                    }
                | kRETURN
                    {
                    /*%%%*/
                        $$ = NEW_RETURN(0);
                    /*%
                        $$ = dispatch0(return0);
                    %*/
                    }
                | kYIELD '(' call_args rparen
                    {
                    /*%%%*/
                        $$ = new_yield($3);
                    /*%
                        $$ = dispatch1(yield, dispatch1(paren, $3));
                    %*/
                    }
                | kYIELD '(' rparen
                    {
                    /*%%%*/
                        $$ = NEW_YIELD(0, Qfalse);
                    /*%
                        $$ = dispatch1(yield, dispatch1(paren, arg_new()));
                    %*/
                    }
                | kYIELD
                    {
                    /*%%%*/
                        $$ = NEW_YIELD(0, Qfalse);
                    /*%
                        $$ = dispatch0(yield0);
                    %*/
                    }
                | kDEFINED opt_nl '(' {in_defined = 1;} expr rparen
                    {
                    /*%%%*/
                        in_defined = 0;
                        $$ = NEW_DEFINED($5);
                    /*%
                        in_defined = 0;
                        $$ = dispatch1(defined, $5);
                    %*/
                    }
                | operation brace_block
                    {
                    /*%%%*/
                        $2->nd_iter = NEW_FCALL($1, 0);
                        $$ = $2;
                        fixpos($2->nd_iter, $2);
                    /*%
                        $$ = method_arg(dispatch1(fcall, $1), arg_new());
                        $$ = dispatch2(iter_block, $$, $2);
                    %*/
                    }
                | method_call
                | method_call brace_block
                    {
                    /*%%%*/
                        block_dup_check($$);
                        $2->nd_iter = $1;
                        $$ = $2;
                        fixpos($$, $1);
                    /*%
                        $$ = dispatch2(iter_block, $1, $2);
                    %*/
                    }
                | tLAMBDA lambda
                    {
                        $$ = $2;
                    }
                | kIF expr_value then
                  compstmt
                  if_tail
                  kEND
                    {
                    /*%%%*/
                        $$ = NEW_IF(cond($2), $4, $5);
                        fixpos($$, $2);
                        if (cond_negative(&$$->nd_cond)) {
                            NODE *tmp = $$->nd_body;
                            $$->nd_body = $$->nd_else;
                            $$->nd_else = tmp;
                        }
                    /*%
                        $$ = dispatch3(if, $2, $4, escape_Qundef($5));
                    %*/
                    }
                | kUNLESS expr_value then
                  compstmt
                  opt_else
                  kEND
                    {
                    /*%%%*/
                        $$ = NEW_UNLESS(cond($2), $4, $5);
                        fixpos($$, $2);
                        if (cond_negative(&$$->nd_cond)) {
                            NODE *tmp = $$->nd_body;
                            $$->nd_body = $$->nd_else;
                            $$->nd_else = tmp;
                        }
                    /*%
                        $$ = dispatch3(unless, $2, $4, escape_Qundef($5));
                    %*/
                    }
                | kWHILE {COND_PUSH(1);} expr_value do {COND_POP();}
                  compstmt
                  kEND
                    {
                    /*%%%*/
                        $$ = NEW_WHILE(cond($3), $6, 1);
                        fixpos($$, $3);
                        if (cond_negative(&$$->nd_cond)) {
                            nd_set_type($$, NODE_UNTIL);
                        }
                    /*%
                        $$ = dispatch2(while, $3, $6);
                    %*/
                    }
                | kUNTIL {COND_PUSH(1);} expr_value do {COND_POP();}
                  compstmt
                  kEND
                    {
                    /*%%%*/
                        $$ = NEW_UNTIL(cond($3), $6, 1);
                        fixpos($$, $3);
                        if (cond_negative(&$$->nd_cond)) {
                            nd_set_type($$, NODE_WHILE);
                        }
                    /*%
                        $$ = dispatch2(until, $3, $6);
                    %*/
                    }
                | kCASE expr_value opt_terms
                  case_body
                  kEND
                    {
                    /*%%%*/
                        $$ = NEW_CASE($2, $4);
                        fixpos($$, $2);
                    /*%
                        $$ = dispatch2(case, $2, $4);
                    %*/
                    }
                | kCASE expr_value opt_terms kELSE compstmt kEND
                    {
                    /*%%%*/
                        $$ = block_append($2, $5);
                    /*%
                        $$ = dispatch2(case, $2, dispatch1(else, $5));
                    %*/
                    }
                | kCASE opt_terms case_body kEND
                    {
                    /*%%%*/
                        $$ = $3;
                    /*%
                        $$ = dispatch2(case, Qnil, $3);
                    %*/
                    }
                | kCASE opt_terms kELSE compstmt kEND
                    {
                    /*%%%*/
                        $$ = $4;
                    /*%
                        $$ = dispatch2(case, Qnil, dispatch1(else, $4));
                    %*/
                    }
                | kFOR for_var kIN {COND_PUSH(1);} expr_value do {COND_POP();}
                  compstmt
                  kEND
                    {
                    /*%%%*/
                        $$ = NEW_FOR($2, $5, $8);
                        fixpos($$, $2);
                    /*%
                        $$ = dispatch3(for, $2, $5, $8);
                    %*/
                    }
                | kCLASS cpath superclass
                    {
                    /*%%%*/
                        if (in_def || in_single)
                            yyerror("class definition in method body");
                        class_nest++;
                        local_push(0);
                        $<num>$ = ruby_sourceline;
                    /*%
                        if (in_def || in_single)
                            yyerror("class definition in method body");
                        class_nest++;
                    %*/
                    }
                  bodystmt
                  kEND
                    {
                    /*%%%*/
                        $$ = NEW_CLASS($2, $5, $3);
                        nd_set_line($$, $<num>4);
                        local_pop();
                        class_nest--;
                    /*%
                        $$ = dispatch3(class, $2, $3, $5);
                        class_nest--;
                    %*/
                    }
                | kCLASS tLSHFT expr
                    {
                    /*%%%*/
                        $<num>$ = in_def;
                        in_def = 0;
                    /*%
                        in_def = 0;
                    %*/
                    }
                  term
                    {
                    /*%%%*/
                        $<num>$ = in_single;
                        in_single = 0;
                        class_nest++;
                        local_push(0);
                    /*%
                        $$ = in_single;
                        in_single = 0;
                        class_nest++;
                    %*/
                    }
                  bodystmt
                  kEND
                    {
                    /*%%%*/
                        $$ = NEW_SCLASS($3, $7);
                        fixpos($$, $3);
                        local_pop();
                        class_nest--;
                        in_def = $<num>4;
                        in_single = $<num>6;
                    /*%
                        $$ = dispatch2(sclass, $3, $7);
                        class_nest--;
                        in_def = $<val>4;
                        in_single = $<val>6;
                    %*/
                    }
                | kMODULE cpath
                    {
                    /*%%%*/
                        if (in_def || in_single)
                            yyerror("module definition in method body");
                        class_nest++;
                        local_push(0);
                        $<num>$ = ruby_sourceline;
                    /*%
                        if (in_def || in_single)
                            yyerror("module definition in method body");
                        class_nest++;
                    %*/
                    }
                  bodystmt
                  kEND
                    {
                    /*%%%*/
                        $$ = NEW_MODULE($2, $4);
                        nd_set_line($$, $<num>3);
                        local_pop();
                        class_nest--;
                    /*%
                        $$ = dispatch2(module, $2, $4);
                        class_nest--;
                    %*/
                    }
                | kDEF fname
                    {
                    /*%%%*/
                        $<id>$ = cur_mid;
                        cur_mid = $2;
                        in_def++;
                        local_push(0);
                    /*%
                        $<id>$ = cur_mid;
                        cur_mid = $2;
                        in_def++;
                    %*/
                    }
                  f_arglist
                  bodystmt
                  kEND
                    {
                    /*%%%*/
                        NODE *body = remove_begin($5);
                        reduce_nodes(&body);
                        $$ = NEW_DEFN($2, $4, body, NOEX_PRIVATE);
                        fixpos($$, $4);
                        local_pop();
                        in_def--;
                        cur_mid = $<id>3;
                    /*%
                        $$ = dispatch3(def, $2, $4, $5);
                        in_def--;
                        cur_mid = $<id>3;
                    %*/
                    }
                | kDEF singleton dot_or_colon {lex_state = EXPR_FNAME;} fname
                    {
                    /*%%%*/
                        in_single++;
                        local_push(0);
                        lex_state = EXPR_END; /* force for args */
                    /*%
                        in_single++;
                        lex_state = EXPR_END;
                    %*/
                    }
                  f_arglist
                  bodystmt
                  kEND
                    {
                    /*%%%*/
                        NODE *body = remove_begin($8);
                        reduce_nodes(&body);
                        $$ = NEW_DEFS($2, $5, $7, body);
                        fixpos($$, $2);
                        local_pop();
                        in_single--;
                    /*%
                        $$ = dispatch5(defs, $2, $3, $5, $7, $8);
                        in_single--;
                    %*/
                    }
                | kBREAK
                    {
                    /*%%%*/
                        $$ = NEW_BREAK(0);
                    /*%
                        $$ = dispatch1(break, arg_new());
                    %*/
                    }
                | kNEXT
                    {
                    /*%%%*/
                        $$ = NEW_NEXT(0);
                    /*%
                        $$ = dispatch1(next, arg_new());
                    %*/
                    }
                | kREDO
                    {
                    /*%%%*/
                        $$ = NEW_REDO();
                    /*%
                        $$ = dispatch0(redo);
                    %*/
                    }
                | kRETRY
                    {
                    /*%%%*/
                        $$ = NEW_RETRY();
                    /*%
                        $$ = dispatch0(retry);
                    %*/
                    }
                ;

primary_value   : primary
                    {
                    /*%%%*/
                        value_expr($1);
                        $$ = $1;
                    /*%
                        $$ = $1;
                    %*/
                    }
                ;

then            : term
                    /*%c%*/
                    /*%c
                    { $$ = Qnil; }
                    %*/
                | ':'
                    /*%c%*/
                    /*%c
                    { $$ = Qnil; }
                    %*/
                | kTHEN
                | term kTHEN
                    /*%c%*/
                    /*%c
                    { $$ = $2; }
                    %*/
                ;

do              : term
                    /*%c%*/
                    /*%c
                    { $$ = Qnil; }
                    %*/
                | ':'
                    /*%c%*/
                    /*%c
                    { $$ = Qnil; }
                    %*/
                | kDO_COND
                ;

if_tail         : opt_else
                | kELSIF expr_value then
                  compstmt
                  if_tail
                    {
                    /*%%%*/
                        $$ = NEW_IF(cond($2), $4, $5);
                        fixpos($$, $2);
                    /*%
                        $$ = dispatch3(elsif, $2, $4, escape_Qundef($5));
                    %*/
                    }
                ;

opt_else        : none
                | kELSE compstmt
                    {
                    /*%%%*/
                        $$ = $2;
                    /*%
                        $$ = dispatch1(else, $2);
                    %*/
                    }
                ;

for_var         : lhs
                | mlhs
                ;

block_param0    : mlhs_item
                    {
                    /*%%%*/
                        $$ = NEW_LIST($1);
                    /*%
                        $$ = mlhs_add(mlhs_new(), $1);
                    %*/
                    }
                | block_param0 ',' mlhs_item
                    {
                    /*%%%*/
                        $$ = list_append($1, $3);
                    /*%
                        $$ = mlhs_add($1, $3);
                    %*/
                    }
                ;

block_param     : block_param0
                    {
                    /*%%%*/
                        if ($1->nd_alen == 1) {
                            $$ = $1->nd_head;
                            rb_gc_force_recycle((VALUE)$1);
                        }
                        else {
                            $$ = NEW_MASGN($1, 0);
                        }
                    /*%
                        $$ = blockvar_new($1);
                    %*/
                    }
                | block_param0 ','
                    {
                    /*%%%*/
                        $$ = NEW_MASGN($1, 0);
                    /*%
                        $$ = blockvar_new($1);
                    %*/
                    }
                | block_param0 ',' tAMPER lhs
                    {
                    /*%%%*/
                        $$ = NEW_BLOCK_PARAM($4, NEW_MASGN($1, 0));
                    /*%
                        $$ = blockvar_add_block(blockvar_new($1), $4);
                    %*/
                    }
                | block_param0 ',' tSTAR lhs ',' tAMPER lhs
                    {
                    /*%%%*/
                        $$ = NEW_BLOCK_PARAM($7, NEW_MASGN($1, $4));
                    /*%
                        $$ = blockvar_add_star(blockvar_new($1), $4);
                        $$ = blockvar_add_block($$, $7);
                    %*/
                    }
                | block_param0 ',' tSTAR ',' tAMPER lhs
                    {
                    /*%%%*/
                        $$ = NEW_BLOCK_PARAM($6, NEW_MASGN($1, -1));
                    /*%
                        $$ = blockvar_add_star(blockvar_new($1), Qnil);
                        $$ = blockvar_add_block($$, $6);
                    %*/
                    }
                | block_param0 ',' tSTAR lhs
                    {
                    /*%%%*/
                        $$ = NEW_MASGN($1, $4);
                    /*%
                        $$ = blockvar_add_star(blockvar_new($1), $4);
                    %*/
                    }
                | block_param0 ',' tSTAR
                    {
                    /*%%%*/
                        $$ = NEW_MASGN($1, -1);
                    /*%
                        $$ = blockvar_add_star(blockvar_new($1), Qnil);
                    %*/
                    }
                | tSTAR lhs ',' tAMPER lhs
                    {
                    /*%%%*/
                        $$ = NEW_BLOCK_PARAM($5, NEW_MASGN(0, $2));
                    /*%
                        $$ = blockvar_add_star(blockvar_new(Qnil), $2);
                        $$ = blockvar_add_block($$, $5);
                    %*/
                    }
                | tSTAR ',' tAMPER lhs
                    {
                    /*%%%*/
                        $$ = NEW_BLOCK_PARAM($4, NEW_MASGN(0, -1));
                    /*%
                        $$ = blockvar_add_star(blockvar_new(Qnil), Qnil);
                        $$ = blockvar_add_block($$, $4);
                    %*/
                    }
                | tSTAR lhs
                    {
                    /*%%%*/
                        $$ = NEW_MASGN(0, $2);
                    /*%
                        $$ = blockvar_add_star(blockvar_new(Qnil), $2);
                    %*/
                    }
                | tSTAR
                    {
                    /*%%%*/
                        $$ = NEW_MASGN(0, -1);
                    /*%
                        $$ = blockvar_add_star(blockvar_new(Qnil), Qnil);
                    %*/
                    }
                | tAMPER lhs
                    {
                    /*%%%*/
                        $$ = NEW_BLOCK_PARAM($2, (NODE*)1);
                    /*%
                        $$ = blockvar_add_block(blockvar_new(Qnil), $2);
                    %*/
                    }
                ;

opt_block_param : none
                    {
                    /*%%%*/
                        $$ = NEW_ITER(0, 0, 0);
                    /*%
                    %*/
                    }
                | block_param_def
                ;

block_param_def : '|' opt_bv_decl '|'
                    {
                    /*%%%*/
                        $$ = NEW_ITER((NODE*)1, 0, $2);
                    /*%
                        $$ = blockvar_new(mlhs_new());
                    %*/
                    }
                | tOROP
                    {
                    /*%%%*/
                        $$ = NEW_ITER((NODE*)1, 0, 0);
                    /*%
                        $$ = blockvar_new(mlhs_new());
                    %*/
                    }
                | '|' block_param opt_bv_decl '|'
                    {
                    /*%%%*/
                        $$ = NEW_ITER($2, 0, $3);
                    /*%
                        $$ = blockvar_new($2);
                    %*/
                    }
                ;

opt_bv_decl     : none
                | ';' bv_decls
                    {
                    /*%%%*/
                        $$ = $2;
                    /*%
                        $$ = FIXME;
                    %*/
                    }
                ;

bv_decls        : bv_decl
                    {
                    /*%%%*/
                        $$ = $1;
                    /*%
                        $$ = FIXME;
                    %*/
                    }
                | bv_decls ',' bv_decl
                    {
                    /*%%%*/
                        $$ = block_append($1, $3);
                    /*%
                        $$ = FIXME;
                    %*/
                    }
                ;

bv_decl         :  tIDENTIFIER
                    {
                    /*%%%*/
                        $$ = new_bv($1, NEW_NIL());
                    /*%
                        $$ = FIXME;
                    %*/
                    }
                ;

lambda          : {
                    /*%%%*/
                        $<vars>$ = dyna_push();
                    /*%
                    %*/
                  }
                  {
                        $<num>$ = lpar_beg;
                        lpar_beg = ++paren_nest;
                  }
                  f_larglist
                    {
                        $<vars>$ = ruby_dyna_vars;
                    }
                  lambda_body
                    {
                    /*%%%*/
                        $$ = $3;
                        $$->nd_body = block_append($$->nd_body, $5);
                        dyna_pop($<vars>1);
                        lpar_beg = $<num>2;
                    /*%
                        $$ = dispatch2(lambda, $3, $5);
                    %*/
                    }
                ;

f_larglist      : '(' f_args opt_bv_decl rparen
                    {
                    /*%%%*/
                        $$ = NEW_LAMBDA($2, $3);
                    /*%
                        $$ = dispatch1(paren, $2);
                    %*/
                    }
                | f_args opt_bv_decl
                    {
                    /*%%%*/
                        $$ = NEW_LAMBDA($1, $2);
                    /*%
                        $$ = $1;
                    %*/
                    }
                ;

lambda_body     : tLAMBEG compstmt '}'
                    {
                        $$ = $2;
                    }
                | kDO_LAMBDA compstmt kEND
                    {
                        $$ = $2;
                    }
                ;

do_block        : kDO_BLOCK
                    {
                    /*%%%*/
                        $<vars>$ = dyna_push();
                        $<num>1 = ruby_sourceline;
                    /*% %*/
                    }
                  opt_block_param
                    {
                    /*%%%*/
                        $<vars>$ = ruby_dyna_vars;
                    /*% %*/
                    }
                  compstmt
                  kEND
                    {
                    /*%%%*/
                        $3->nd_body = block_append($3->nd_body,
                                                   dyna_init($5, $<vars>4));
                        $$ = $3;
                        nd_set_line($$, $<num>1);
                        dyna_pop($<vars>2);
                    /*%
                        $$ = dispatch2(do_block, escape_Qundef($3), $5);
                    %*/
                    }
                ;

block_call      : command do_block
                    {
                    /*%%%*/
                        block_dup_check($1);
                        $2->nd_iter = $1;
                        $$ = $2;
                        fixpos($$, $1);
                    /*%
                        $$ = dispatch2(iter_block, $1, $2);
                    %*/
                    }
                | block_call '.' operation2 opt_paren_args
                    {
                    /*%%%*/
                        $$ = new_call($1, $3, $4);
                    /*%
                        $$ = dispatch3(call, $1, ripper_id2sym('.'), $3);
                        $$ = method_optarg($$, $4);
                    %*/
                    }
                | block_call tCOLON2 operation2 opt_paren_args
                    {
                    /*%%%*/
                        $$ = new_call($1, $3, $4);
                    /*%
                        $$ = dispatch3(call, $1, ripper_intern("::"), $3);
                        $$ = method_optarg($$, $4);
                    %*/
                    }
                ;

method_call     : operation paren_args
                    {
                    /*%%%*/
                        $$ = new_fcall($1, $2);
                        fixpos($$, $2);
                    /*%
                        $$ = method_arg(dispatch1(fcall, $1), $2);
                    %*/
                    }
                | primary_value '.' operation2 opt_paren_args
                    {
                    /*%%%*/
                        $$ = new_call($1, $3, $4);
                        fixpos($$, $1);
                    /*%
                        $$ = dispatch3(call, $1, ripper_id2sym('.'), $3);
                        $$ = method_optarg($$, $4);
                    %*/
                    }
                | primary_value tCOLON2 operation2 paren_args
                    {
                    /*%%%*/
                        $$ = new_call($1, $3, $4);
                        fixpos($$, $1);
                    /*%
                        $$ = dispatch3(call, $1, ripper_id2sym('.'), $3);
                        $$ = method_optarg($$, $4);
                    %*/
                    }
                | primary_value tCOLON2 operation3
                    {
                    /*%%%*/
                        $$ = new_call($1, $3, 0);
                    /*%
                        $$ = dispatch3(call, $1, ripper_intern("::"), $3);
                    %*/
                    }
                | kSUPER paren_args
                    {
                    /*%%%*/
                        $$ = new_super($2);
                    /*%
                        $$ = dispatch1(super, $2);
                    %*/
                    }
                | kSUPER
                    {
                    /*%%%*/
                        $$ = NEW_ZSUPER();
                    /*%
                        $$ = dispatch0(zsuper);
                    %*/
                    }
                | tLPAREN compstmt ')' paren_args
                    {
                    /*%%%*/
                        if (!$2) $2 = NEW_NIL();
                        $$ = new_call($2, rb_intern("call"), $4);
                        fixpos($$, $2);
                    /*%
                        $$ = dispatch3(call, dispatch1(paren, $2),
                                       ripper_id2sym('.'), rb_intern("call"));
                        $$ = method_optarg($$, $4);
                    %*/
                    }
                | primary_value '[' aref_args ']'
                    {
                    /*%%%*/
                        if ($1 && nd_type($1) == NODE_SELF)
                            $$ = NEW_FCALL(tAREF, $3);
                        else
                            $$ = NEW_CALL($1, tAREF, $3);
                        fixpos($$, $1);
                    /*%
                        $$ = dispatch2(aref, $1, escape_Qundef($3));
                    %*/
                    }
                ;

brace_block     : '{'
                    {
                    /*%%%*/
                        $<vars>$ = dyna_push();
                        $<num>1 = ruby_sourceline;
                    /*% %*/
                    }
                  opt_block_param
                    {
                    /*%%%*/
                        $<vars>$ = ruby_dyna_vars;
                    /*%
                    %*/
                    }
                  compstmt '}'
                    {
                    /*%%%*/
                        $3->nd_body = block_append($3->nd_body,
                                                   dyna_init($5, $<vars>4));
                        $$ = $3;
                        nd_set_line($$, $<num>1);
                        dyna_pop($<vars>2);
                    /*%
                        $$ = dispatch2(brace_block, escape_Qundef($3), $5);
                    %*/
                    }
                | kDO
                    {
                    /*%%%*/
                        $<vars>$ = dyna_push();
                        $<num>1 = ruby_sourceline;
                    /*% %*/
                    }
                  opt_block_param
                    {
                    /*%%%*/
                        $<vars>$ = ruby_dyna_vars;
                    /*%
                    %*/
                    }
                  compstmt kEND
                    {
                    /*%%%*/
                        $3->nd_body = block_append($3->nd_body,
                                                   dyna_init($5, $<vars>4));
                        $$ = $3;
                        nd_set_line($$, $<num>1);
                        dyna_pop($<vars>2);
                    /*%
                        $$ = dispatch2(do_block, escape_Qundef($3), $5);
                    %*/
                    }
                | tLAMBDA_ARG
                  lambda
                    {
                    /*%%%*/
                        $$ = $2;
                        nd_set_type($$, NODE_ITER);
                    /*%
                        $$ = dispatch2(do_block, Qnil, $2);
                    %*/
                    }
                ;

case_body       : kWHEN when_args then
                  compstmt
                  cases
                    {
                    /*%%%*/
                        $$ = NEW_WHEN($2, $4, $5);
                    /*%
                        $$ = dispatch3(when, $2, $4, escape_Qundef($5));
                    %*/
                    }
                ;
when_args       : args
                | args ',' tSTAR arg_value
                    {
                    /*%%%*/
                        $$ = list_append($1, NEW_WHEN($4, 0, 0));
                    /*%
                        $$ = arg_add_star($1, $4);
                    %*/
                    }
                | tSTAR arg_value
                    {
                    /*%%%*/
                        $$ = NEW_LIST(NEW_WHEN($2, 0, 0));
                    /*%
                        $$ = arg_add_star(arg_new(), $2);
                    %*/
                    }
                ;

cases           : opt_else
                | case_body
                ;

opt_rescue      : kRESCUE exc_list exc_var then
                  compstmt
                  opt_rescue
                    {
                    /*%%%*/
                        if ($3) {
                            $3 = node_assign($3, NEW_ERRINFO());
                            $5 = block_append($3, $5);
                        }
                        $$ = NEW_RESBODY($2, $5, $6);
                        fixpos($$, $2?$2:$5);
                    /*%
                        $$ = dispatch4(rescue,
                                       escape_Qundef($2),
                                       escape_Qundef($3),
                                       escape_Qundef($5),
                                       escape_Qundef($6));
                    %*/
                    }
                | none
                ;

exc_list        : arg_value
                    {
                    /*%%%*/
                        $$ = NEW_LIST($1);
                    /*%
                        $$ = rb_ary_new3(1, $1);
                    %*/
                    }
                | mrhs
                | none
                ;

exc_var         : tASSOC lhs
                    {
                        $$ = $2;
                    }
                | none
                ;

opt_ensure      : kENSURE compstmt
                    {
                    /*%%%*/
                        $$ = $2;
                    /*%
                        $$ = dispatch1(ensure, $2);
                    %*/
                    }
                | none
                ;

literal         : numeric
                | symbol
                    {
                    /*%%%*/
                        $$ = NEW_LIT(ID2SYM($1));
                    /*%
                        $$ = dispatch1(symbol_literal, $1);
                    %*/
                    }
                | dsym
                ;

strings         : string
                    {
                    /*%%%*/
                        NODE *node = $1;
                        if (!node) {
                            node = NEW_STR(rb_str_new(0, 0));
                        }
                        else {
                            node = evstr2dstr(node);
                        }
                        $$ = node;
                    /*%
                        $$ = $1;
                    %*/
                    }
                ;

string          : string1
                | string string1
                    {
                    /*%%%*/
                        $$ = literal_concat($1, $2);
                    /*%
                        $$ = dispatch2(string_concat, $1, $2);
                    %*/
                    }
                ;

string1         : tSTRING_BEG string_contents tSTRING_END
                    {
                    /*%%%*/
                        $$ = $2;
                    /*%
                        $$ = dispatch1(string_literal, $2);
                    %*/
                    }
                ;

xstring         : tXSTRING_BEG xstring_contents tSTRING_END
                    {
                    /*%%%*/
                        NODE *node = $2;
                        if (!node) {
                            node = NEW_XSTR(rb_str_new(0, 0));
                        }
                        else {
                            switch (nd_type(node)) {
                              case NODE_STR:
                                nd_set_type(node, NODE_XSTR);
                                break;
                              case NODE_DSTR:
                                nd_set_type(node, NODE_DXSTR);
                                break;
                              default:
                                node = NEW_NODE(NODE_DXSTR, rb_str_new(0, 0), 1, NEW_LIST(node));
                                break;
                            }
                        }
                        $$ = node;
                    /*%
                        $$ = dispatch1(xstring_literal, $2);
                    %*/
                    }
                ;

regexp          : tREGEXP_BEG xstring_contents tREGEXP_END
                    {
                    /*%%%*/
                        int options = $3;
                        NODE *node = $2;
                        if (!node) {
                            node = NEW_LIT(rb_reg_compile("", 0, options & ~RE_OPTION_ONCE));
                        }
                        else switch (nd_type(node)) {
                          case NODE_STR:
                            {
                                VALUE src = node->nd_lit;
                                nd_set_type(node, NODE_LIT);
                                node->nd_lit = rb_reg_compile(RSTRING(src)->ptr,
                                                              RSTRING(src)->len,
                                                              options & ~RE_OPTION_ONCE);
                            }
                            break;
                          default:
                            node = NEW_NODE(NODE_DSTR, rb_str_new(0, 0), 1, NEW_LIST(node));
                          case NODE_DSTR:
                            if (options & RE_OPTION_ONCE) {
                                nd_set_type(node, NODE_DREGX_ONCE);
                            }
                            else {
                                nd_set_type(node, NODE_DREGX);
                            }
                            node->nd_cflag = options & ~RE_OPTION_ONCE;
                            break;
                        }
                        $$ = node;
                    /*%
                        $$ = dispatch2(regexp_literal, $2, $3);
                    %*/
                    }
                ;

words           : tWORDS_BEG ' ' tSTRING_END
                    {
                    /*%%%*/
                        $$ = NEW_ZARRAY();
                    /*%
                        $$ = dispatch0(words_new);
                    %*/
                    }
                | tWORDS_BEG word_list tSTRING_END
                    {
                        $$ = $2;
                    }
                ;

word_list       : /* none */
                    {
                    /*%%%*/
                        $$ = 0;
                    /*%
                        $$ = dispatch0(words_new);
                    %*/
                    }
                | word_list word ' '
                    {
                    /*%%%*/
                        $$ = list_append($1, evstr2dstr($2));
                    /*%
                        $$ = dispatch2(words_add, $1, $2);
                    %*/
                    }
                ;

word            : string_content
                    /*%c%*/
                    /*%c
                    {
                        $$ = dispatch0(word_new);
                        $$ = dispatch2(word_add, $$, $1);
                    }
                    %*/
                | word string_content
                    {
                    /*%%%*/
                        $$ = literal_concat($1, $2);
                    /*%
                        $$ = dispatch2(word_add, $1, $2);
                    %*/
                    }
                ;

qwords          : tQWORDS_BEG ' ' tSTRING_END
                    {
                    /*%%%*/
                        $$ = NEW_ZARRAY();
                    /*%
                        $$ = dispatch0(qwords_new);
                    %*/
                    }
                | tQWORDS_BEG qword_list tSTRING_END
                    {
                        $$ = $2;
                    }
                ;

qword_list      : /* none */
                    {
                    /*%%%*/
                        $$ = 0;
                    /*%
                        $$ = dispatch0(qwords_new);
                    %*/
                    }
                | qword_list tSTRING_CONTENT ' '
                    {
                    /*%%%*/
                        $$ = list_append($1, $2);
                    /*%
                        $$ = dispatch2(qwords_add, $1, $2);
                    %*/
                    }
                ;

string_contents : /* none */
                    {
                    /*%%%*/
                        $$ = 0;
                    /*%
                        $$ = dispatch0(string_content);
                    %*/
                    }
                | string_contents string_content
                    {
                    /*%%%*/
                        $$ = literal_concat($1, $2);
                    /*%
                        $$ = dispatch2(string_add, $1, $2);
                    %*/
                    }
                ;

xstring_contents: /* none */
                    {
                    /*%%%*/
                        $$ = 0;
                    /*%
                        $$ = dispatch0(xstring_new);
                    %*/
                    }
                | xstring_contents string_content
                    {
                    /*%%%*/
                        $$ = literal_concat($1, $2);
                    /*%
                        $$ = dispatch2(xstring_add, $1, $2);
                    %*/
                    }
                ;

string_content  : tSTRING_CONTENT
                | tSTRING_DVAR
                    {
                        $<node>$ = lex_strterm;
                        lex_strterm = 0;
                        lex_state = EXPR_BEG;
                    }
                  string_dvar
                    {
                    /*%%%*/
                        lex_strterm = $<node>2;
                        $$ = NEW_EVSTR($3);
                    /*%
                        lex_strterm = $<node>2;
                        $$ = dispatch1(string_dvar, $3);
                    %*/
                    }
                | tSTRING_DBEG
                    {
                        $<node>$ = lex_strterm;
                        lex_strterm = 0;
                        lex_state = EXPR_BEG;
                        COND_PUSH(0);
                        CMDARG_PUSH(0);
                    }
                  compstmt '}'
                    {
                        lex_strterm = $<node>2;
                        COND_LEXPOP();
                        CMDARG_LEXPOP();
                    /*%%%*/
                        if ($3) $3->flags &= ~NODE_NEWLINE;
                        $$ = new_evstr($3);
                    /*%
                        $$ = dispatch1(string_embexpr, $3);
                    %*/
                    }
                ;

string_dvar     : tGVAR
                    {
                    /*%%%*/
                        $$ = NEW_GVAR($1);
                    /*%
                        $$ = dispatch1(var_ref, $1);
                    %*/
                    }
                | tIVAR
                    {
                    /*%%%*/
                        $$ = NEW_IVAR($1);
                    /*%
                        $$ = dispatch1(var_ref, $1);
                    %*/
                    }
                | tCVAR
                    {
                    /*%%%*/
                        $$ = NEW_CVAR($1);
                    /*%
                        $$ = dispatch1(var_ref, $1);
                    %*/
                    }
                | backref
                ;

symbol          : tSYMBEG sym
                    {
                    /*%%%*/
                        lex_state = EXPR_END;
                        $$ = $2;
                    /*%
                        lex_state = EXPR_END;
                        $$ = dispatch1(symbol, $2);
                    %*/
                    }
                ;

sym             : fname
                | tIVAR
                | tGVAR
                | tCVAR
                ;

dsym            : tSYMBEG xstring_contents tSTRING_END
                    {
                    /*%%%*/
                        lex_state = EXPR_END;
                        if (!($$ = $2)) {
                            yyerror("empty symbol literal");
                        }
                        else {
                            VALUE lit;

                            switch (nd_type($$)) {
                              case NODE_DSTR:
                                nd_set_type($$, NODE_DSYM);
                                break;
                              case NODE_STR:
                                lit = $$->nd_lit;
                                if (RSTRING(lit)->len == 0) {
                                    yyerror("empty symbol literal");
                                    break;
                                }
                                if (strlen(RSTRING(lit)->ptr) == RSTRING(lit)->len) {
                                    $$->nd_lit = ID2SYM(rb_intern(RSTRING($$->nd_lit)->ptr));
                                    nd_set_type($$, NODE_LIT);
                                    break;
                                }
                                /* fall through */
                              default:
                                $$ = NEW_NODE(NODE_DSYM, rb_str_new(0, 0), 1, NEW_LIST($$));
                                break;
                            }
                        }
                    /*%
                        lex_state = EXPR_END;
                        $$ = dispatch1(dyna_symbol, $2);
                    %*/
                    }
                ;

numeric         : tINTEGER
                | tFLOAT
                | tUMINUS_NUM tINTEGER         %prec tLOWEST
                    {
                    /*%%%*/
                        $$ = negate_lit($2);
                    /*%
                        $$ = dispatch2(unary, ripper_intern("-@"), $2);
                    %*/
                    }
                | tUMINUS_NUM tFLOAT           %prec tLOWEST
                    {
                    /*%%%*/
                        $$ = negate_lit($2);
                    /*%
                        $$ = dispatch2(unary, ripper_intern("-@"), $2);
                    %*/
                    }
                ;

variable        : tIDENTIFIER
                | tIVAR
                | tGVAR
                | tCONSTANT
                | tCVAR
                | kNIL {ifndef_ripper($$ = kNIL);}
                | kSELF {ifndef_ripper($$ = kSELF);}
                | kTRUE {ifndef_ripper($$ = kTRUE);}
                | kFALSE {ifndef_ripper($$ = kFALSE);}
                | k__FILE__ {ifndef_ripper($$ = k__FILE__);}
                | k__LINE__ {ifndef_ripper($$ = k__LINE__);}
                ;

var_ref         : variable
                    {
                    /*%%%*/
                        $$ = gettable($1);
                    /*%
                        $$ = dispatch1(var_ref, $1);
                    %*/
                    }
                ;

var_lhs         : variable
                    {
                    /*%%%*/
                        $$ = assignable($1, 0);
                    /*%
                        $$ = dispatch1(var_field, $1);
                    %*/
                    }
                ;

backref         : tNTH_REF
                | tBACK_REF
                ;

superclass      : term
                    {
                    /*%%%*/
                        $$ = 0;
                    /*%
                        $$ = Qnil;
                    %*/
                    }
                | '<'
                    {
                        lex_state = EXPR_BEG;
                    }
                  expr_value term
                    {
                        $$ = $3;
                    }
                | error term
                    {
                    /*%%%*/
                        yyerrok;
                        $$ = 0;
                    /*%
                        yyerrok;
                        $$ = Qnil;
                    %*/
                    }
                ;

f_arglist       : '(' f_args rparen
                    {
                    /*%%%*/
                        $$ = $2;
                        lex_state = EXPR_BEG;
                    /*%
                        $$ = dispatch1(paren, $2);
                        lex_state = EXPR_BEG;
                    %*/
                    }
                | f_args term
                    {
                        $$ = $1;
                    }
                ;

f_args          : f_arg ',' f_optarg ',' f_rest_arg opt_f_block_arg
                    {
                    /*%%%*/
                        $$ = new_args($1, $3, $5, $6);
                    /*%
                        $$ = dispatch4(params, $1, $3, $5, escape_Qundef($6));
                    %*/
                    }
                | f_arg ',' f_optarg opt_f_block_arg
                    {
                    /*%%%*/
                        $$ = new_args($1, $3, 0, $4);
                    /*%
                        $$ = dispatch4(params, $1, $3, Qnil, escape_Qundef($4));
                    %*/
                    }
                | f_arg ',' f_rest_arg opt_f_block_arg
                    {
                    /*%%%*/
                        $$ = new_args($1, 0, $3, $4);
                    /*%
                        $$ = dispatch4(params, $1, Qnil, $3, escape_Qundef($4));
                    %*/
                    }
                | f_arg opt_f_block_arg
                    {
                    /*%%%*/
                        $$ = new_args($1, 0, 0, $2);
                    /*%
                        $$ = dispatch4(params, $1, Qnil, Qnil, escape_Qundef($2));
                    %*/
                    }
                | f_optarg ',' f_rest_arg opt_f_block_arg
                    {
                    /*%%%*/
                        $$ = new_args(0, $1, $3, $4);
                    /*%
                        $$ = dispatch4(params, Qnil, $1, $3, escape_Qundef($4));
                    %*/
                    }
                | f_optarg opt_f_block_arg
                    {
                    /*%%%*/
                        $$ = new_args(0, $1, 0, $2);
                    /*%
                        $$ = dispatch4(params, Qnil, $1, Qnil, escape_Qundef($2));
                    %*/
                    }
                | f_rest_arg opt_f_block_arg
                    {
                    /*%%%*/
                        $$ = new_args(0, 0, $1, $2);
                    /*%
                        $$ = dispatch4(params, Qnil, Qnil, $1, escape_Qundef($2));
                    %*/
                    }
                | f_block_arg
                    {
                    /*%%%*/
                        $$ = new_args(0, 0, 0, $1);
                    /*%
                        $$ = dispatch4(params, Qnil, Qnil, Qnil, $1);
                    %*/
                    }
                | /* none */
                    {
                    /*%%%*/
                        $$ = new_args(0, 0, 0, 0);
                    /*%
                        $$ = dispatch4(params, Qnil, Qnil, Qnil, Qnil);
                    %*/
                    }
                ;

f_norm_arg      : tCONSTANT
                    {
                    /*%%%*/
                        yyerror("formal argument cannot be a constant");
                    /*%
                        $$ = dispatch1(param_error, $1);
                    %*/
                    }
                | tIVAR
                    {
                    /*%%%*/
                        yyerror("formal argument cannot be an instance variable");
                    /*%
                        $$ = dispatch1(param_error, $1);
                    %*/
                    }
                | tGVAR
                    {
                    /*%%%*/
                        yyerror("formal argument cannot be a global variable");
                    /*%
                        $$ = dispatch1(param_error, $1);
                    %*/
                    }
                | tCVAR
                    {
                    /*%%%*/
                        yyerror("formal argument cannot be a class variable");
                    /*%
                        $$ = dispatch1(param_error, $1);
                    %*/
                    }
                | tIDENTIFIER
                    {
                    /*%%%*/
                        if (!is_local_id($1))
                            yyerror("formal argument must be local variable");
                        if (dyna_in_block()) {
                            shadowing_lvar($1);
                            dyna_var($1);
                        }
                        else {
                            local_cnt($1);
                        }
                        $$ = $1;
                    /*%
                        $$ = $1;
                    %*/
                    }
                ;

f_arg           : f_norm_arg
                    {
                    /*%%%*/
                        VALUE arg = ID2SYM($1);
                    /*%
                        VALUE arg = $1;
                    %*/
                        $$ = rb_ary_new3(1, arg);
                    }
                | f_arg ',' f_norm_arg
                    {
                    /*%%%*/
                        VALUE arg = ID2SYM($3);
                        $$ = $1;
                        if (rb_ary_includes($$, arg)) {
                            yyerror("duplicated argument arg");
                        }
                        rb_ary_push($$, arg);
                    /*%
                        rb_ary_push($$, $3);
                    %*/
                    }
                ;

f_opt           : tIDENTIFIER '=' arg_value
                    {
                    /*%%%*/
                        if (!is_local_id($1))
                            yyerror("formal argument must be local variable");
                        if (dyna_in_block()) {
                            shadowing_lvar($1);
                            dyna_var($1);
                        }
                        $$ = assignable($1, $3);
                    /*%
                        $$ = rb_assoc_new($1, $3);
                    %*/
                    }
                ;

f_optarg        : f_opt
                    {
                    /*%%%*/
                        $$ = NEW_BLOCK($1);
                        $$->nd_end = $$;
                    /*%
                        $$ = rb_ary_new3(1, $1);
                    %*/
                    }
                | f_optarg ',' f_opt
                    {
                    /*%%%*/
                        $$ = block_append($1, $3);
                    /*%
                        $$ = rb_ary_push($1, $3);
                    %*/
                    }
                ;

restarg_mark    : '*'
                | tSTAR
                ;

f_rest_arg      : restarg_mark tIDENTIFIER
                    {
                    /*%%%*/
                        if (!is_local_id($2))
                            yyerror("rest argument must be local variable");
                        if (dyna_in_block()) {
                            shadowing_lvar($2);
                            dyna_var($2);
                        }
                        $$ = assignable($2, 0);
                    /*%
                        $$ = dispatch1(restparam, $2);
                    %*/
                    }
                | restarg_mark
                    {
                    /*%%%*/
                        if (dyna_in_block()) {
                            $$ = NEW_DASGN_CURR(internal_id(), 0);
                        }
                        else {
                            $$ = NEW_NODE(NODE_LASGN,0,0,local_append(0));
                        }
                    /*%
                        $$ = dispatch1(restparam, Qnil);
                    %*/
                    }
                ;

blkarg_mark     : '&'
                | tAMPER
                ;

f_block_arg     : blkarg_mark tIDENTIFIER
                    {
                    /*%%%*/
                        if (!is_local_id($2))
                            yyerror("block argument must be local variable");
                        else if (!dyna_in_block() && local_id($2))
                            yyerror("duplicated block argument name");
                        if (dyna_in_block()) {
                            shadowing_lvar($2);
                            dyna_var($2);
                            $$ = assignable($2, 0);
                        }
                        else {
                            $$ = NEW_BLOCK_ARG($2);
                        }
                    /*%
                        $$ = $2;
                    %*/
                    }
                ;

opt_f_block_arg : ',' f_block_arg
                    {
                        $$ = $2;
                    }
                | none
                ;

singleton       : var_ref
                    {
                    /*%%%*/
                        if (nd_type($1) == NODE_SELF) {
                            $$ = NEW_SELF();
                        }
                        else {
                            $$ = $1;
                            value_expr($$);
                        }
                    /*%
                        $$ = $1;
                    %*/
                    }
                | '(' {lex_state = EXPR_BEG;} expr rparen
                    {
                    /*%%%*/
                        if ($3 == 0) {
                            yyerror("can't define singleton method for ().");
                        }
                        else {
                            switch (nd_type($3)) {
                              case NODE_STR:
                              case NODE_DSTR:
                              case NODE_XSTR:
                              case NODE_DXSTR:
                              case NODE_DREGX:
                              case NODE_LIT:
                              case NODE_ARRAY:
                              case NODE_ZARRAY:
                                yyerror("can't define singleton method for literals");
                              default:
                                value_expr($3);
                                break;
                            }
                        }
                        $$ = $3;
                    /*%
                        $$ = dispatch1(paren, $3);
                    %*/
                    }
                ;

assoc_list      : none
                | assocs trailer
                    {
                        $$ = $1;
                    }
                | args trailer
                    {
                    /*%%%*/
                        if ($1->nd_alen%2 != 0) {
                            yyerror("odd number list for Hash");
                        }
                        $$ = $1;
                    /*%
                        $$ = dispatch1(assoclist_from_args, $1);
                    %*/
                    }
                ;

assocs          : assoc
                    /*%c%*/
                    /*%c
                    {
                        $$ = rb_ary_new3(1, $1);
                    }
                    %*/
                | assocs ',' assoc
                    {
                    /*%%%*/
                        $$ = list_concat($1, $3);
                    /*%
                        rb_ary_push($$, $3);
                    %*/
                    }
                ;

assoc           : arg_value tASSOC arg_value
                    {
                    /*%%%*/
                        $$ = list_append(NEW_LIST($1), $3);
                    /*%
                        $$ = dispatch2(assoc_new, $1, $3);
                    %*/
                    }
                | tLABEL arg_value
                    {
                    /*%%%*/
                        $$ = list_append(NEW_LIST(NEW_LIT(ID2SYM($1))), $2);
                    /*%
                        $$ = dispatch2(assoc_new, $1, $2);
                    %*/
                    }
                ;

operation       : tIDENTIFIER
                | tCONSTANT
                | tFID
                ;

operation2      : tIDENTIFIER
                | tCONSTANT
                | tFID
                | op
                ;

operation3      : tIDENTIFIER
                | tFID
                | op
                ;

dot_or_colon    : '.'
                    /*%c%*/
                    /*%c
                    { $$ = $<val>1; }
                    %*/
                | tCOLON2
                    /*%c%*/
                    /*%c
                    { $$ = $<val>1; }
                    %*/
                ;

opt_terms       : /* none */
                | terms
                ;

opt_nl          : /* none */
                | '\n'
                ;

rparen          : opt_nl ')'
                ;

trailer         : /* none */
                | '\n'
                | ','
                ;

term            : ';' {yyerrok;}
                | '\n'
                ;

terms           : term
                | terms ';' {yyerrok;}
                ;

none            : /* none */
                    {
                    /*%%%*/
                        $$ = 0;
                    /*%
                        $$ = Qundef;
                    %*/
                    }
                ;
%%
# undef parser
# undef yylex
# undef yylval
# define yylval  (*((YYSTYPE*)(parser->parser_yylval)))

static int parser_regx_options(struct parser_params*);
static int parser_tokadd_string(struct parser_params*,int,int,int,long*);
static int parser_parse_string(struct parser_params*,NODE*);
static int parser_here_document(struct parser_params*,NODE*);

# define nextc()                   parser_nextc(parser)
# define pushback(c)               parser_pushback(parser, c)
# define newtok()                  parser_newtok(parser)
# define tokadd(c)                 parser_tokadd(parser, c)
# define read_escape()             parser_read_escape(parser)
# define tokadd_escape(t)          parser_tokadd_escape(parser, t)
# define regx_options()            parser_regx_options(parser)
# define tokadd_string(f,t,p,n)    parser_tokadd_string(parser,f,t,p,n)
# define parse_string(n)           parser_parse_string(parser,n)
# define here_document(n)          parser_here_document(parser,n)
# define heredoc_identifier()      parser_heredoc_identifier(parser)
# define heredoc_restore(n)        parser_heredoc_restore(parser,n)
# define whole_match_p(e,l,i)      parser_whole_match_p(parser,e,l,i)

#ifdef RIPPER
/* FIXME */
# define local_cnt(x)      3
# define local_id(x)       1
# define dyna_in_block()   1
#endif /* RIPPER */

#ifndef RIPPER
# define set_yylval_str(x) yylval.node = NEW_STR(x)
# define set_yylval_num(x) yylval.num = x
# define set_yylval_id(x)  yylval.id = x
# define set_yylval_literal(x) yylval.node = NEW_LIT(x)
# define set_yylval_node(x) yylval.node = x
# define yylval_id() yylval.id
#else
# define set_yylval_str(x) (void)(x)
# define set_yylval_num(x) (void)(x)
# define set_yylval_id(x) (void)(x)
# define set_yylval_literal(x) (void)(x)
# define set_yylval_node(x) (void)(x)
# define yylval_id() SYM2ID(yylval.val)
#endif

#ifdef RIPPER
#define ripper_flush(p) (p->tokp = p->parser_lex_p)

static void
ripper_dispatch_scan_event(struct parser_params *parser, int t)
{
    VALUE str;

    if (lex_p < parser->tokp) rb_raise(rb_eRuntimeError, "lex_p < tokp");
    if (lex_p == parser->tokp) return;
    str = rb_str_new(parser->tokp, lex_p - parser->tokp);
    yylval.val = ripper_dispatch1(parser, ripper_token2eventid(t), str);
    ripper_flush(parser);
}

static void
ripper_dispatch_delayed_token(struct parser_params *parser, int t)
{
    int saved_line = ruby_sourceline;
    const char *saved_tokp = parser->tokp;

    ruby_sourceline = parser->delayed_line;
    parser->tokp = lex_pbeg + parser->delayed_col;
    yylval.val = ripper_dispatch1(parser, ripper_token2eventid(t), parser->delayed);
    parser->delayed = Qnil;
    ruby_sourceline = saved_line;
    parser->tokp = saved_tokp;
}
#endif /* RIPPER */

#include "regex.h"
#include "util.h"

/* We remove any previous definition of `SIGN_EXTEND_CHAR',
   since ours (we hope) works properly with all combinations of
   machines, compilers, `char' and `unsigned char' argument types.
   (Per Bothner suggested the basic approach.)  */
#undef SIGN_EXTEND_CHAR
#if __STDC__
# define SIGN_EXTEND_CHAR(c) ((signed char)(c))
#else  /* not __STDC__ */
/* As in Harbison and Steele.  */
# define SIGN_EXTEND_CHAR(c) ((((unsigned char)(c)) ^ 128) - 128)
#endif
#define is_identchar(c) (SIGN_EXTEND_CHAR(c)!=-1&&(ISALNUM(c) || (c) == '_' || ismbchar(c)))

static int
parser_yyerror(struct parser_params *parser, const char *msg)
{
#ifndef RIPPER
    const char *p, *pe;
    char *buf;
    int len, i;

    rb_compile_error("%s", msg);
    p = lex_p;
    while (lex_pbeg <= p) {
        if (*p == '\n') break;
        p--;
    }
    p++;

    pe = lex_p;
    while (pe < lex_pend) {
        if (*pe == '\n') break;
        pe++;
    }

    len = pe - p;
    if (len > 4) {
        char *p2;
        buf = ALLOCA_N(char, len+2);
        MEMCPY(buf, p, char, len);
        buf[len] = '\0';
        rb_compile_error_append("%s", buf);

        i = lex_p - p;
        p2 = buf; pe = buf + len;

        while (p2 < pe) {
            if (*p2 != '\t') *p2 = ' ';
            p2++;
        }
        buf[i] = '^';
        buf[i+1] = '\0';
        rb_compile_error_append("%s", buf);
    }
#else
    dispatch1(parse_error, rb_str_new2(msg));
#endif /* !RIPPER */
    return 0;
}

static void parser_prepare(struct parser_params *parser);

#ifndef RIPPER
static NODE*
yycompile(VALUE vparser, const char *f, int line)
{
    int n;
    struct RVarmap *vp, *vars = ruby_dyna_vars;
    const char *kcode_save;
    volatile VALUE parser_save;
    struct parser_params *parser;

    *(&parser_save) = vparser;
    Data_Get_Struct(vparser, struct parser_params, parser);
    if (!compile_for_eval && rb_safe_level() == 0 &&
        rb_const_defined(rb_cObject, rb_intern("SCRIPT_LINES__"))) {
        VALUE hash, fname;

        hash = rb_const_get(rb_cObject, rb_intern("SCRIPT_LINES__"));
        if (TYPE(hash) == T_HASH) {
            fname = rb_str_new2(f);
            ruby_debug_lines = rb_hash_aref(hash, fname);
            if (NIL_P(ruby_debug_lines)) {
                ruby_debug_lines = rb_ary_new();
                rb_hash_aset(hash, fname, ruby_debug_lines);
            }
        }
        if (line > 1) {
            VALUE str = rb_str_new(0,0);
            n = line - 1;
            do {
                rb_ary_push(ruby_debug_lines, str);
            } while (--n);
        }
    }

    kcode_save = rb_get_kcode();
    ruby_current_node = 0;
    ruby_sourcefile = rb_source_filename(f);
    ruby_sourceline = line - 1;
    parser_prepare(parser);
    n = yyparse((void*)parser);
    ruby_debug_lines = 0;
    compile_for_eval = 0;
    rb_set_kcode(kcode_save);

    vp = ruby_dyna_vars;
    ruby_dyna_vars = vars;
    lex_strterm = 0;
    while (vp && vp != vars) {
        struct RVarmap *tmp = vp;
        vp = vp->next;
        rb_gc_force_recycle((VALUE)tmp);
    }
    if (ruby_eval_tree_begin) {
        return NEW_PRELUDE(ruby_eval_tree_begin, ruby_eval_tree);
    }
    else {
        return ruby_eval_tree;
    }
}
#endif /* !RIPPER */

static VALUE
lex_get_str(struct parser_params *parser, VALUE s)
{
    char *beg, *end, *pend;

    beg = RSTRING(s)->ptr;
    if (lex_gets_ptr) {
        if (RSTRING(s)->len == lex_gets_ptr) return Qnil;
        beg += lex_gets_ptr;
    }
    pend = RSTRING(s)->ptr + RSTRING(s)->len;
    end = beg;
    while (end < pend) {
        if (*end++ == '\n') break;
    }
    lex_gets_ptr = end - RSTRING(s)->ptr;
    return rb_str_new(beg, end - beg);
}

static VALUE
lex_getline(struct parser_params *parser)
{
    VALUE line = (*parser->parser_lex_gets)(parser, parser->parser_lex_input);
#ifndef RIPPER
    if (ruby_debug_lines && !NIL_P(line)) {
        rb_ary_push(ruby_debug_lines, line);
    }
#endif
    return line;
}

#ifndef RIPPER
NODE*
rb_compile_string(const char *f, VALUE s, int line)
{
    VALUE volatile vparser = rb_parser_new();

    return rb_parser_compile_string(vparser, f, s, line);
}

NODE*
rb_parser_compile_string(VALUE vparser, const char *f, VALUE s, int line)
{
    struct parser_params *parser;

    Data_Get_Struct(vparser, struct parser_params, parser);
    lex_gets = lex_get_str;
    lex_gets_ptr = 0;
    lex_input = s;
    lex_pbeg = lex_p = lex_pend = 0;
    compile_for_eval = ruby_in_eval;

    return yycompile(vparser, f, line);
}

NODE*
rb_compile_cstr(const char *f, const char *s, int len, int line)
{
    return rb_compile_string(f, rb_str_new(s, len), line);
}

NODE*
rb_parser_compile_cstr(VALUE vparser, const char *f, const char *s, int len, int line)
{
    return rb_parser_compile_string(vparser, f, rb_str_new(s, len), line);
}

static VALUE
lex_io_gets(struct parser_params *parser, VALUE io)
{
    return rb_io_gets(io);
}

NODE*
rb_compile_file(const char *f, VALUE file, int start)
{
    VALUE volatile vparser = rb_parser_new();

    return rb_parser_compile_file(vparser, f, file, start);
}

NODE*
rb_parser_compile_file(VALUE vparser, const char *f, VALUE file, int start)
{
    struct parser_params *parser;

    Data_Get_Struct(vparser, struct parser_params, parser);
    lex_gets = lex_io_gets;
    lex_input = file;
    lex_pbeg = lex_p = lex_pend = 0;

    return yycompile(vparser, f, start);
}
#endif  /* !RIPPER */

static inline int
parser_nextc(struct parser_params *parser)
{
    int c;

    if (lex_p == lex_pend) {
        if (parser->eofp)
            return -1;
        if (lex_input) {
            VALUE v = lex_getline(parser);

            if (NIL_P(v)) {
                parser->eofp = Qtrue;
                return -1;
            }
#ifdef RIPPER
            if (parser->tokp < lex_pend) {
                if (NIL_P(parser->delayed)) {
                    parser->delayed = rb_str_buf_new(1024);
                    rb_str_buf_cat(parser->delayed,
                                   parser->tokp, lex_pend - parser->tokp);
                    parser->delayed_line = ruby_sourceline;
                    parser->delayed_col = parser->tokp - lex_pbeg;
                }
                else {
                    rb_str_buf_cat(parser->delayed,
                                   parser->tokp, lex_pend - parser->tokp);
                }
            }
#endif
            if (heredoc_end > 0) {
                ruby_sourceline = heredoc_end;
                heredoc_end = 0;
            }
            ruby_sourceline++;
            parser->line_count++;
            lex_pbeg = lex_p = RSTRING(v)->ptr;
            lex_pend = lex_p + RSTRING(v)->len;
#ifdef RIPPER
            ripper_flush(parser);
#endif
            lex_lastline = v;
        }
        else {
            lex_lastline = 0;
            return -1;
        }
    }
    c = (unsigned char)*lex_p++;
    if (c == '\r' && lex_p < lex_pend && *lex_p == '\n') {
        lex_p++;
        c = '\n';
    }

    return c;
}

static void
parser_pushback(struct parser_params *parser, int c)
{
    if (c == -1) return;
    lex_p--;
    if (lex_p > lex_pbeg && lex_p[0] == '\n' && lex_p[-1] == '\r') {
        lex_p--;
    }
}

#define lex_goto_eol(parser) (parser->parser_lex_p = parser->parser_lex_pend)
#define was_bol() (lex_p == lex_pbeg + 1)
#define peek(c) (lex_p != lex_pend && (c) == *lex_p)

#define tokfix() (tokenbuf[tokidx]='\0')
#define tok() tokenbuf
#define toklen() tokidx
#define toklast() (tokidx>0?tokenbuf[tokidx-1]:0)

static char*
parser_newtok(struct parser_params *parser)
{
    tokidx = 0;
    if (!tokenbuf) {
        toksiz = 60;
        tokenbuf = ALLOC_N(char, 60);
    }
    if (toksiz > 4096) {
        toksiz = 60;
        REALLOC_N(tokenbuf, char, 60);
    }
    return tokenbuf;
}

static void
parser_tokadd(struct parser_params *parser, char c)
{
    tokenbuf[tokidx++] = c;
    if (tokidx >= toksiz) {
        toksiz *= 2;
        REALLOC_N(tokenbuf, char, toksiz);
    }
}

static int
parser_read_escape(struct parser_params *parser)
{
    int c;

    switch (c = nextc()) {
      case '\\':        /* Backslash */
        return c;

      case 'n': /* newline */
        return '\n';

      case 't': /* horizontal tab */
        return '\t';

      case 'r': /* carriage-return */
        return '\r';

      case 'f': /* form-feed */
        return '\f';

      case 'v': /* vertical tab */
        return '\13';

      case 'a': /* alarm(bell) */
        return '\007';

      case 'e': /* escape */
        return 033;

      case '0': case '1': case '2': case '3': /* octal constant */
      case '4': case '5': case '6': case '7':
        {
            int numlen;

            pushback(c);
            c = scan_oct(lex_p, 3, &numlen);
            lex_p += numlen;
        }
        return c;

      case 'x': /* hex constant */
        {
            int numlen;

            c = scan_hex(lex_p, 2, &numlen);
            if (numlen == 0) {
                yyerror("Invalid escape character syntax");
                return 0;
            }
            lex_p += numlen;
        }
        return c;

      case 'b': /* backspace */
        return '\010';

      case 's': /* space */
        return ' ';

      case 'M':
        if ((c = nextc()) != '-') {
            yyerror("Invalid escape character syntax");
            pushback(c);
            return '\0';
        }
        if ((c = nextc()) == '\\') {
            return read_escape() | 0x80;
        }
        else if (c == -1) goto eof;
        else {
            return ((c & 0xff) | 0x80);
        }

      case 'C':
        if ((c = nextc()) != '-') {
            yyerror("Invalid escape character syntax");
            pushback(c);
            return '\0';
        }
      case 'c':
        if ((c = nextc())== '\\') {
            c = read_escape();
        }
        else if (c == '?')
            return 0177;
        else if (c == -1) goto eof;
        return c & 0x9f;

      eof:
      case -1:
        yyerror("Invalid escape character syntax");
        return '\0';

      default:
        return c;
    }
}

static int
parser_tokadd_escape(struct parser_params *parser, int term)
{
    int c;

    switch (c = nextc()) {
      case '\n':
        return 0;               /* just ignore */

      case '0': case '1': case '2': case '3': /* octal constant */
      case '4': case '5': case '6': case '7':
        {
            int i;

            tokadd('\\');
            tokadd(c);
            for (i=0; i<2; i++) {
                c = nextc();
                if (c == -1) goto eof;
                if (c < '0' || '7' < c) {
                    pushback(c);
                    break;
                }
                tokadd(c);
            }
        }
        return 0;

      case 'x': /* hex constant */
        {
            int numlen;

            tokadd('\\');
            tokadd(c);
            scan_hex(lex_p, 2, &numlen);
            if (numlen == 0) {
                yyerror("Invalid escape character syntax");
                return -1;
            }
            while (numlen--)
                tokadd(nextc());
        }
        return 0;

      case 'M':
        if ((c = nextc()) != '-') {
            yyerror("Invalid escape character syntax");
            pushback(c);
            return 0;
        }
        tokadd('\\'); tokadd('M'); tokadd('-');
        goto escaped;

      case 'C':
        if ((c = nextc()) != '-') {
            yyerror("Invalid escape character syntax");
            pushback(c);
            return 0;
        }
        tokadd('\\'); tokadd('C'); tokadd('-');
        goto escaped;

      case 'c':
        tokadd('\\'); tokadd('c');
      escaped:
        if ((c = nextc()) == '\\') {
            return tokadd_escape(term);
        }
        else if (c == -1) goto eof;
        tokadd(c);
        return 0;

      eof:
      case -1:
        yyerror("Invalid escape character syntax");
        return -1;

      default:
        if (c != '\\' || c != term)
            tokadd('\\');
        tokadd(c);
    }
    return 0;
}

static int
parser_regx_options(struct parser_params *parser)
{
    char kcode = 0;
    int options = 0;
    int c;

    newtok();
    while (c = nextc(), ISALPHA(c)) {
        switch (c) {
          case 'i':
            options |= ONIG_OPTION_IGNORECASE;
            break;
          case 'x':
            options |= ONIG_OPTION_EXTEND;
            break;
          case 'm':
            options |= ONIG_OPTION_MULTILINE;
            break;
          case 'o':
            options |= RE_OPTION_ONCE;
            break;
          case 'n':
            kcode = 16;
            break;
          case 'e':
            kcode = 32;
            break;
          case 's':
            kcode = 48;
            break;
          case 'u':
            kcode = 64;
            break;
          default:
            tokadd(c);
            break;
        }
    }
    pushback(c);
    if (toklen()) {
        tokfix();
        compile_error(PARSER_ARG "unknown regexp option%s - %s",
                  toklen() > 1 ? "s" : "", tok());
    }
    return options | kcode;
}

#define STR_FUNC_ESCAPE 0x01
#define STR_FUNC_EXPAND 0x02
#define STR_FUNC_REGEXP 0x04
#define STR_FUNC_QWORDS 0x08
#define STR_FUNC_SYMBOL 0x10
#define STR_FUNC_INDENT 0x20

enum string_type {
    str_squote = (0),
    str_dquote = (STR_FUNC_EXPAND),
    str_xquote = (STR_FUNC_EXPAND),
    str_regexp = (STR_FUNC_REGEXP|STR_FUNC_ESCAPE|STR_FUNC_EXPAND),
    str_sword  = (STR_FUNC_QWORDS),
    str_dword  = (STR_FUNC_QWORDS|STR_FUNC_EXPAND),
    str_ssym   = (STR_FUNC_SYMBOL),
    str_dsym   = (STR_FUNC_SYMBOL|STR_FUNC_EXPAND),
};

static void
dispose_string(VALUE str)
{
    xfree(RSTRING(str)->ptr);
    rb_gc_force_recycle(str);
}

static int
parser_tokadd_string(struct parser_params *parser,
    int func, int term, int paren, long *nest)
{
    int c;
    unsigned char uc;

    while ((c = nextc()) != -1) {
        uc = (unsigned char)c;
        if (paren && c == paren) {
            ++*nest;
        }
        else if (c == term) {
            if (!nest || !*nest) {
                pushback(c);
                break;
            }
            --*nest;
        }
        else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) {
            int c2 = *lex_p;
            if (c2 == '$' || c2 == '@' || c2 == '{') {
                pushback(c);
                break;
            }
        }
        else if (c == '\\') {
            c = nextc();
            switch (c) {
              case '\n':
                if (func & STR_FUNC_QWORDS) break;
                if (func & STR_FUNC_EXPAND) continue;
                tokadd('\\');
                break;

              case '\\':
                if (func & STR_FUNC_ESCAPE) tokadd(c);
                break;

              default:
                if (func & STR_FUNC_REGEXP) {
                    pushback(c);
                    if (tokadd_escape(term) < 0)
                        return -1;
                    continue;
                }
                else if (func & STR_FUNC_EXPAND) {
                    pushback(c);
                    if (func & STR_FUNC_ESCAPE) tokadd('\\');
                    c = read_escape();
                }
                else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
                    /* ignore backslashed spaces in %w */
                }
                else if (c != term && !(paren && c == paren)) {
                    tokadd('\\');
                }
            }
        }
        else if (ismbchar(uc)) {
            int i, len = mbclen(uc)-1;

            for (i = 0; i < len; i++) {
                tokadd(c);
                c = nextc();
            }
        }
        else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
            pushback(c);
            break;
        }
        if (!c && (func & STR_FUNC_SYMBOL)) {
            func &= ~STR_FUNC_SYMBOL;
            rb_compile_error(PARSER_ARG  "symbol cannot contain '\\0'");
            continue;
        }
        tokadd(c);
    }
    return c;
}

#define NEW_STRTERM0(func, term, paren) \
        rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0)
#ifndef RIPPER
# define NEW_STRTERM(func, term, paren) NEW_STRTERM0(func, term, paren)
#else
# define NEW_STRTERM(func, term, paren) ripper_new_strterm(parser, func, term, paren)
static NODE *
ripper_new_strterm(struct parser_params *parser, VALUE func, VALUE term, VALUE paren)
{
    NODE *node = NEW_STRTERM0(func, term, paren);
    nd_set_line(node, ruby_sourceline);
    return node;
}
#endif

static int
parser_parse_string(struct parser_params *parser, NODE *quote)
{
    int func = quote->nd_func;
    int term = nd_term(quote);
    int paren = nd_paren(quote);
    int c, space = 0;

    if (func == -1) return tSTRING_END;
    c = nextc();
    if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
        do {c = nextc();} while (ISSPACE(c));
        space = 1;
    }
    if (c == term && !quote->nd_nest) {
        if (func & STR_FUNC_QWORDS) {
            quote->nd_func = -1;
            return ' ';
        }
        if (!(func & STR_FUNC_REGEXP)) return tSTRING_END;
        set_yylval_num(regx_options());
        return tREGEXP_END;
    }
    if (space) {
        pushback(c);
        return ' ';
    }
    newtok();
    if ((func & STR_FUNC_EXPAND) && c == '#') {
        switch (c = nextc()) {
          case '$':
          case '@':
            pushback(c);
            return tSTRING_DVAR;
          case '{':
            return tSTRING_DBEG;
        }
        tokadd('#');
    }
    pushback(c);
    if (tokadd_string(func, term, paren, &quote->nd_nest) == -1) {
        ruby_sourceline = nd_line(quote);
        rb_compile_error(PARSER_ARG  "unterminated string meets end of file");
        return tSTRING_END;
    }

    tokfix();
    set_yylval_str(rb_str_new(tok(), toklen()));
    return tSTRING_CONTENT;
}

static int
parser_heredoc_identifier(struct parser_params *parser)
{
    int c = nextc(), term, func = 0, len;
    unsigned int uc;

    if (c == '-') {
        c = nextc();
        func = STR_FUNC_INDENT;
    }
    switch (c) {
      case '\'':
        func |= str_squote; goto quoted;
      case '"':
        func |= str_dquote; goto quoted;
      case '`':
        func |= str_xquote;
      quoted:
        newtok();
        tokadd(func);
        term = c;
        while ((c = nextc()) != -1 && c != term) {
            uc = (unsigned int)c;
            len = mbclen(uc);
            do {tokadd(c);} while (--len > 0 && (c = nextc()) != -1);
        }
        if (c == -1) {
            rb_compile_error(PARSER_ARG  "unterminated here document identifier");
            return 0;
        }
        break;

      default:
        uc = (unsigned int)c;
        if (!is_identchar(uc)) {
            pushback(c);
            if (func & STR_FUNC_INDENT) {
                pushback('-');
            }
            return 0;
        }
        newtok();
        term = '"';
        tokadd(func |= str_dquote);
        do {
            uc = (unsigned int)c;
            len = mbclen(uc);
            do {tokadd(c);} while (--len > 0 && (c = nextc()) != -1);
        } while ((c = nextc()) != -1 &&
                 (uc = (unsigned char)c, is_identchar(uc)));
        pushback(c);
        break;
    }

    tokfix();
#ifdef RIPPER
    ripper_dispatch_scan_event(parser, tHEREDOC_BEG);
#endif
    len = lex_p - lex_pbeg;
    lex_goto_eol(parser);
    lex_strterm = rb_node_newnode(NODE_HEREDOC,
                                  rb_str_new(tok(), toklen()),  /* nd_lit */
                                  len,                          /* nd_nth */
                                  lex_lastline);                /* nd_orig */
    nd_set_line(lex_strterm, ruby_sourceline);
#ifdef RIPPER
    ripper_flush(parser);
#endif
    return term == '`' ? tXSTRING_BEG : tSTRING_BEG;
}

static void
parser_heredoc_restore(struct parser_params *parser, NODE *here)
{
    VALUE line;

#ifdef RIPPER
    if (!NIL_P(parser->delayed))
        ripper_dispatch_delayed_token(parser, tSTRING_CONTENT);
    lex_goto_eol(parser);
    ripper_dispatch_scan_event(parser, tHEREDOC_END);
#endif
    line = here->nd_orig;
    lex_lastline = line;
    lex_pbeg = RSTRING(line)->ptr;
    lex_pend = lex_pbeg + RSTRING(line)->len;
    lex_p = lex_pbeg + here->nd_nth;
    heredoc_end = ruby_sourceline;
    ruby_sourceline = nd_line(here);
    dispose_string(here->nd_lit);
    rb_gc_force_recycle((VALUE)here);
#ifdef RIPPER
    ripper_flush(parser);
#endif
}

static int
parser_whole_match_p(struct parser_params *parser,
    const char *eos, int len, int indent)
{
    const char *p = lex_pbeg;
    int n;

    if (indent) {
        while (*p && ISSPACE(*p)) p++;
    }
    n= lex_pend - (p + len);
    if (n < 0 || (n > 0 && p[len] != '\n' && p[len] != '\r')) return Qfalse;
    if (strncmp(eos, p, len) == 0) return Qtrue;
    return Qfalse;
}

static int
parser_here_document(struct parser_params *parser, NODE *here)
{
    int c, func, indent = 0;
    const char *eos, *p, *pend;
    long len;
    VALUE str = 0;

    eos = RSTRING(here->nd_lit)->ptr;
    len = RSTRING(here->nd_lit)->len - 1;
    indent = (func = *eos++) & STR_FUNC_INDENT;

    if ((c = nextc()) == -1) {
      error:
        rb_compile_error(PARSER_ARG  "can't find string \"%s\" anywhere before EOF", eos);
        heredoc_restore(lex_strterm);
        lex_strterm = 0;
        return 0;
    }
    if (was_bol() && whole_match_p(eos, len, indent)) {
        heredoc_restore(lex_strterm);
        return tSTRING_END;
    }

    if (!(func & STR_FUNC_EXPAND)) {
        do {
            p = RSTRING(lex_lastline)->ptr;
            pend = lex_pend;
            if (pend > p) {
                switch (pend[-1]) {
                  case '\n':
                    if (--pend == p || pend[-1] != '\r') {
                        pend++;
                        break;
                    }
                  case '\r':
                    --pend;
                }
            }
            if (str)
                rb_str_cat(str, p, pend - p);
            else
                str = rb_str_new(p, pend - p);
            if (pend < lex_pend) rb_str_cat(str, "\n", 1);
            lex_goto_eol(parser);
            if (nextc() == -1) {
                if (str) dispose_string(str);
                goto error;
            }
        } while (!whole_match_p(eos, len, indent));
    }
    else {
        newtok();
        if (c == '#') {
            switch (c = nextc()) {
              case '$':
              case '@':
                pushback(c);
                return tSTRING_DVAR;
              case '{':
                return tSTRING_DBEG;
            }
            tokadd('#');
        }
        do {
            pushback(c);
            if ((c = tokadd_string(func, '\n', 0, NULL)) == -1) goto error;
            if (c != '\n') {
                set_yylval_str(rb_str_new(tok(), toklen()));
                return tSTRING_CONTENT;
            }
            tokadd(nextc());
            if ((c = nextc()) == -1) goto error;
        } while (!whole_match_p(eos, len, indent));
        str = rb_str_new(tok(), toklen());
    }
    heredoc_restore(lex_strterm);
    lex_strterm = NEW_STRTERM(-1, 0, 0);
    set_yylval_str(str);
    return tSTRING_CONTENT;
}

#include "lex.c"

#ifndef RIPPER
static void
arg_ambiguous(void)
{
    rb_warning("ambiguous first argument; put parentheses or even spaces");
}
#else
static void
ripper_arg_ambiguous(struct parser_params *parser)
{
    dispatch0(arg_ambiguous);
}
#define arg_ambiguous() ripper_arg_ambiguous(parser)
#endif

static int
lvar_defined_gen(struct parser_params *parser, ID id)
{
#ifndef RIPPER
    return (dyna_in_block() && rb_dvar_defined(id)) || local_id(id);
#else
    return 0;
#endif
}

/* emacsen -*- hack */
#ifndef RIPPER
typedef void (*rb_pragma_setter_t)(struct parser_params *parser, const char *name, const char *val);

static void
pragma_encoding(struct parser_params *parser, const char *name, const char *val)
{
    if (parser && parser->line_count != (parser->has_shebang ? 2 : 1))
        return;
    rb_set_kcode(val);
}

struct pragma {
    const char *name;
    rb_pragma_setter_t func;
};

static const struct pragma pragmas[] = {
    {"coding", pragma_encoding},
};
#endif

static const char *
pragma_marker(const char *str, int len)
{
    int i = 2;

    while (i < len) {
        switch (str[i]) {
          case '-':
            if (str[i-1] == '*' && str[i-2] == '-') {
                return str + i + 1;
            }
            i += 2;
            break;
          case '*':
            if (i + 1 >= len) return 0;
            if (str[i+1] != '-') {
                i += 4;
            }
            else if (str[i-1] != '-') {
                i += 2;
            }
            else {
                return str + i + 2;
            }
            break;
          default:
            i += 3;
            break;
        }
    }
    return 0;
}

static int
parser_pragma(struct parser_params *parser, const char *str, int len)
{
    VALUE name = 0, val = 0;
    const char *beg, *end, *vbeg, *vend;
#define str_copy(_s, _p, _n) ((_s) \
        ? (rb_str_resize((_s), (_n)), \
           MEMCPY(RSTRING(_s)->ptr, (_p), char, (_n)), (_s)) \
        : ((_s) = rb_str_new((_p), (_n))))

    if (len <= 7) return Qfalse;
    if (!(beg = pragma_marker(str, len))) return Qfalse;
    if (!(end = pragma_marker(beg, str + len - beg))) return Qfalse;
    str = beg;
    len = end - beg - 3;

    /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
    while (len > 0) {
#ifndef RIPPER
        const struct pragma *p = pragmas;
#endif
        int n = 0;

        for (; len > 0 && *str; str++, --len) {
            switch (*str) {
              case '\'': case '"': case ':': case ';':
                continue;
            }
            if (!ISSPACE(*str)) break;
        }
        for (beg = str; len > 0; str++, --len) {
            switch (*str) {
              case '\'': case '"': case ':': case ';':
                break;
              default:
                if (ISSPACE(*str)) break;
                continue;
            }
            break;
        }
        for (end = str; len > 0 && ISSPACE(*str); str++, --len);
        if (!len) break;
        if (*str != ':') continue;

        do str++; while (--len > 0 && ISSPACE(*str));
        if (!len) break;
        if (*str == '"') {
            for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
                if (*str == '\\') {
                    --len;
                    ++str;
                }
            }
            vend = str;
            if (len) {
                --len;
                ++str;
            }
        }
        else {
            for (vbeg = str; len > 0 && *str != '"' && !ISSPACE(*str); --len, str++);
            vend = str;
        }
        while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;

        n = end - beg;
        str_copy(name, beg, n);
        rb_funcall(name, rb_intern("downcase!"), 0);
#ifndef RIPPER
        do {
            if (strncmp(p->name, RSTRING(name)->ptr, n) == 0) {
                str_copy(val, vbeg, vend - vbeg);
                (*p->func)(parser, RSTRING(name)->ptr, RSTRING(val)->ptr);
                break;
            }
        } while (++p < pragmas + sizeof(pragmas) / sizeof(*p));
#else
        dispatch2(pragma, name, val);
#endif
    }

    return Qtrue;
}

static void
parser_prepare(struct parser_params *parser)
{
    int c = nextc();
    switch (c) {
      case '#':
        if (peek('!')) parser->has_shebang = 1;
        break;
      case 0xef:                /* UTF-8 BOM marker */
        if (lex_pend - lex_p >= 2 &&
            (unsigned char)lex_p[0] == 0xbb &&
            (unsigned char)lex_p[1] == 0xbf) {
            rb_set_kcode("UTF-8");
            lex_p += 2;
            return;
        }
        break;
      case EOF:
        return;
    }
    pushback(c);
}

#define IS_ARG() (lex_state == EXPR_ARG || lex_state == EXPR_CMDARG)
#define IS_BEG() (lex_state == EXPR_BEG || lex_state == EXPR_MID || lex_state == EXPR_VALUE || lex_state == EXPR_CLASS)

static int
parser_yylex(struct parser_params *parser)
{
    register int c;
    int space_seen = 0;
    int cmd_state;
    unsigned char uc;
    enum lex_state_e last_state;
#ifdef RIPPER
    int fallthru = Qfalse;
#endif

    if (lex_strterm) {
        int token;
        if (nd_type(lex_strterm) == NODE_HEREDOC) {
            token = here_document(lex_strterm);
            if (token == tSTRING_END) {
                lex_strterm = 0;
                lex_state = EXPR_END;
            }
        }
        else {
            token = parse_string(lex_strterm);
            if (token == tSTRING_END || token == tREGEXP_END) {
                rb_gc_force_recycle((VALUE)lex_strterm);
                lex_strterm = 0;
                lex_state = EXPR_END;
            }
        }
        return token;
    }
    cmd_state = command_start;
    command_start = Qfalse;
  retry:
#ifdef RIPPER
    while ((c = nextc())) {
        switch (c) {
          case ' ': case '\t': case '\f': case '\r':
          case '\13': /* '\v' */
            space_seen++;
            break;
          default:
            goto outofloop;
        }
    }
  outofloop:
    pushback(c);
    ripper_dispatch_scan_event(parser, tSP);
#endif
    switch (c = nextc()) {
      case '\0':                /* NUL */
      case '\004':              /* ^D */
      case '\032':              /* ^Z */
      case -1:                  /* end of script. */
        return 0;

        /* white spaces */
      case ' ': case '\t': case '\f': case '\r':
      case '\13': /* '\v' */
        space_seen++;
        goto retry;

      case '#':         /* it's a comment */
        if (!parser->has_shebang || parser->line_count != 1) {
            /* no pragma in shebang line */
            parser_pragma(parser, lex_p, lex_pend - lex_p);
        }
        lex_p = lex_pend;
#ifdef RIPPER
        ripper_dispatch_scan_event(parser, tCOMMENT);
        fallthru = Qtrue;
#endif
        /* fall through */
      case '\n':
        switch (lex_state) {
          case EXPR_BEG:
          case EXPR_FNAME:
          case EXPR_DOT:
          case EXPR_CLASS:
          case EXPR_VALUE:
#ifdef RIPPER
            if (!fallthru) {
                ripper_dispatch_scan_event(parser, tIGNORED_NL);
            }
            fallthru = Qfalse;
#endif
            goto retry;
          default:
            break;
        }
        command_start = Qtrue;
        lex_state = EXPR_BEG;
        return '\n';

      case '*':
        if ((c = nextc()) == '*') {
            if ((c = nextc()) == '=') {
                set_yylval_id(tPOW);
                lex_state = EXPR_BEG;
                return tOP_ASGN;
            }
            pushback(c);
            c = tPOW;
        }
        else {
            if (c == '=') {
                set_yylval_id('*');
                lex_state = EXPR_BEG;
                return tOP_ASGN;
            }
            pushback(c);
            if (IS_ARG() && space_seen && !ISSPACE(c)){
                rb_warning0("`*' interpreted as argument prefix");
                c = tSTAR;
            }
            else if (IS_BEG()) {
                c = tSTAR;
            }
            else {
                c = '*';
            }
        }
        switch (lex_state) {
          case EXPR_FNAME: case EXPR_DOT:
            lex_state = EXPR_ARG; break;
          default:
            lex_state = EXPR_BEG; break;
        }
        return c;

      case '!':
        lex_state = EXPR_BEG;
        if ((c = nextc()) == '=') {
            return tNEQ;
        }
        if (c == '~') {
            return tNMATCH;
        }
        pushback(c);
        return '!';

      case '=':
        if (was_bol()) {
            /* skip embedded rd document */
            if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) {
#ifdef RIPPER
                int first_p = Qtrue;

                lex_goto_eol(parser);
                ripper_dispatch_scan_event(parser, tEMBDOC_BEG);
#endif
                for (;;) {
                    lex_goto_eol(parser);
#ifdef RIPPER
                    if (!first_p) {
                        ripper_dispatch_scan_event(parser, tEMBDOC);
                    }
                    first_p = Qfalse;
#endif
                    c = nextc();
                    if (c == -1) {
                        rb_compile_error(PARSER_ARG  "embedded document meets end of file");
                        return 0;
                    }
                    if (c != '=') continue;
                    if (strncmp(lex_p, "end", 3) == 0 &&
                        (lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) {
                        break;
                    }
                }
                lex_goto_eol(parser);
#ifdef RIPPER
                ripper_dispatch_scan_event(parser, tEMBDOC_END);
#endif
                goto retry;
            }
        }

        switch (lex_state) {
          case EXPR_FNAME: case EXPR_DOT:
            lex_state = EXPR_ARG; break;
          default:
            lex_state = EXPR_BEG; break;
        }
        if ((c = nextc()) == '=') {
            if ((c = nextc()) == '=') {
                return tEQQ;
            }
            pushback(c);
            return tEQ;
        }
        if (c == '~') {
            return tMATCH;
        }
        else if (c == '>') {
            return tASSOC;
        }
        pushback(c);
        return '=';

      case '<':
        c = nextc();
        if (c == '<' &&
            lex_state != EXPR_END &&
            lex_state != EXPR_END2 &&
            lex_state != EXPR_DOT &&
            lex_state != EXPR_ENDARG &&
            lex_state != EXPR_CLASS &&
            (!IS_ARG() || space_seen)) {
            int token = heredoc_identifier();
            if (token) return token;
        }
        switch (lex_state) {
          case EXPR_FNAME: case EXPR_DOT:
            lex_state = EXPR_ARG; break;
          default:
            lex_state = EXPR_BEG; break;
        }
        if (c == '=') {
            if ((c = nextc()) == '>') {
                return tCMP;
            }
            pushback(c);
            return tLEQ;
        }
        if (c == '<') {
            if ((c = nextc()) == '=') {
                set_yylval_id(tLSHFT);
                lex_state = EXPR_BEG;
                return tOP_ASGN;
            }
            pushback(c);
            return tLSHFT;
        }
        pushback(c);
        return '<';

      case '>':
        switch (lex_state) {
          case EXPR_FNAME: case EXPR_DOT:
            lex_state = EXPR_ARG; break;
          default:
            lex_state = EXPR_BEG; break;
        }
        if ((c = nextc()) == '=') {
            return tGEQ;
        }
        if (c == '>') {
            if ((c = nextc()) == '=') {
                set_yylval_id(tRSHFT);
                lex_state = EXPR_BEG;
                return tOP_ASGN;
            }
            pushback(c);
            return tRSHFT;
        }
        pushback(c);
        return '>';

      case '"':
        lex_strterm = NEW_STRTERM(str_dquote, '"', 0);
        return tSTRING_BEG;

      case '`':
        if (lex_state == EXPR_FNAME) {
            lex_state = EXPR_END;
            return c;
        }
        if (lex_state == EXPR_DOT) {
            if (cmd_state)
                lex_state = EXPR_CMDARG;
            else
                lex_state = EXPR_ARG;
            return c;
        }
        lex_strterm = NEW_STRTERM(str_xquote, '`', 0);
        return tXSTRING_BEG;

      case '\'':
        lex_strterm = NEW_STRTERM(str_squote, '\'', 0);
        return tSTRING_BEG;

      case '?':
        if (lex_state == EXPR_END ||
            lex_state == EXPR_END2 ||
            lex_state == EXPR_ENDARG) {
            lex_state = EXPR_VALUE;
            return '?';
        }
        c = nextc();
        if (c == -1) {
            rb_compile_error(PARSER_ARG  "incomplete character syntax");
            return 0;
        }
        uc = (unsigned char)c;
        if (ISSPACE(c)){
            if (!IS_ARG()){
                int c2 = 0;
                switch (c) {
                  case ' ':
                    c2 = 's';
                    break;
                  case '\n':
                    c2 = 'n';
                    break;
                  case '\t':
                    c2 = 't';
                    break;
                  case '\v':
                    c2 = 'v';
                    break;
                  case '\r':
                    c2 = 'r';
                    break;
                  case '\f':
                    c2 = 'f';
                    break;
                }
                if (c2) {
                    rb_warnI("invalid character syntax; use ?\\%c", c2);
                }
            }
          ternary:
            pushback(c);
            lex_state = EXPR_VALUE;
            return '?';
        }
        else if (ismbchar(uc)) {
            rb_warnI("multibyte character literal not supported yet; use ?\\%.3o", c);
            goto ternary;
        }
        else if ((ISALNUM(c) || c == '_') && lex_p < lex_pend && is_identchar(*lex_p)) {
            goto ternary;
        }
        else if (c == '\\') {
            c = read_escape();
        }
        c &= 0xff;
        lex_state = EXPR_END;
        set_yylval_literal(INT2FIX(c));
        return tINTEGER;

      case '&':
        if ((c = nextc()) == '&') {
            lex_state = EXPR_BEG;
            if ((c = nextc()) == '=') {
                set_yylval_id(tANDOP);
                lex_state = EXPR_BEG;
                return tOP_ASGN;
            }
            pushback(c);
            return tANDOP;
        }
        else if (c == '=') {
            set_yylval_id('&');
            lex_state = EXPR_BEG;
            return tOP_ASGN;
        }
        pushback(c);
        if (IS_ARG() && space_seen && !ISSPACE(c)){
            rb_warning0("`&' interpreted as argument prefix");
            c = tAMPER;
        }
        else if (IS_BEG()) {
            c = tAMPER;
        }
        else {
            c = '&';
        }
        switch (lex_state) {
          case EXPR_FNAME: case EXPR_DOT:
            lex_state = EXPR_ARG; break;
          default:
            lex_state = EXPR_BEG;
        }
        return c;

      case '|':
        if ((c = nextc()) == '|') {
            lex_state = EXPR_BEG;
            if ((c = nextc()) == '=') {
                set_yylval_id(tOROP);
                lex_state = EXPR_BEG;
                return tOP_ASGN;
            }
            pushback(c);
            return tOROP;
        }
        if (c == '=') {
            set_yylval_id('|');
            lex_state = EXPR_BEG;
            return tOP_ASGN;
        }
        if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
            lex_state = EXPR_ARG;
        }
        else {
            lex_state = EXPR_BEG;
        }
        pushback(c);
        return '|';

      case '+':
        c = nextc();
        if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
            lex_state = EXPR_ARG;
            if (c == '@') {
                return tUPLUS;
            }
            pushback(c);
            return '+';
        }
        if (c == '=') {
            set_yylval_id('+');
            lex_state = EXPR_BEG;
            return tOP_ASGN;
        }
        if (IS_BEG() ||
            (IS_ARG() && space_seen && !ISSPACE(c))) {
            if (IS_ARG()) arg_ambiguous();
            lex_state = EXPR_BEG;
            pushback(c);
            if (ISDIGIT(c)) {
                c = '+';
                goto start_num;
            }
            return tUPLUS;
        }
        lex_state = EXPR_BEG;
        pushback(c);
        return '+';

      case '-':
        c = nextc();
        if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
            lex_state = EXPR_ARG;
            if (c == '@') {
                return tUMINUS;
            }
            pushback(c);
            return '-';
        }
        if (c == '=') {
            set_yylval_id('-');
            lex_state = EXPR_BEG;
            return tOP_ASGN;
        }
        if (c == '>') {
            enum lex_state_e state = lex_state;
            lex_state = EXPR_ARG;
            switch (state) {
              case EXPR_CMDARG:
              case EXPR_ENDARG:
              case EXPR_ARG:
              case EXPR_END:
                return tLAMBDA_ARG;
              default:
                return tLAMBDA;
            }
        }
        if (IS_BEG() ||
            (IS_ARG() && space_seen && !ISSPACE(c))) {
            if (IS_ARG()) arg_ambiguous();
            lex_state = EXPR_BEG;
            pushback(c);
            if (ISDIGIT(c)) {
                return tUMINUS_NUM;
            }
            return tUMINUS;
        }
        lex_state = EXPR_BEG;
        pushback(c);
        return '-';

      case '.':
        lex_state = EXPR_BEG;
        if ((c = nextc()) == '.') {
            if ((c = nextc()) == '.') {
                return tDOT3;
            }
            pushback(c);
            return tDOT2;
        }
        pushback(c);
        if (ISDIGIT(c)) {
            yyerror("no .<digit> floating literal anymore; put 0 before dot");
        }
        lex_state = EXPR_DOT;
        return '.';

      start_num:
      case '0': case '1': case '2': case '3': case '4':
      case '5': case '6': case '7': case '8': case '9':
        {
            int is_float, seen_point, seen_e, nondigit;

            is_float = seen_point = seen_e = nondigit = 0;
            lex_state = EXPR_END;
            newtok();
            if (c == '-' || c == '+') {
                tokadd(c);
                c = nextc();
            }
            if (c == '0') {
                int start = toklen();
                c = nextc();
                if (c == 'x' || c == 'X') {
                    /* hexadecimal */
                    c = nextc();
                    if (ISXDIGIT(c)) {
                        do {
                            if (c == '_') {
                                if (nondigit) break;
                                nondigit = c;
                                continue;
                            }
                            if (!ISXDIGIT(c)) break;
                            nondigit = 0;
                            tokadd(c);
                        } while ((c = nextc()) != -1);
                    }
                    pushback(c);
                    tokfix();
                    if (toklen() == start) {
                        yyerror("numeric literal without digits");
                    }
                    else if (nondigit) goto trailing_uc;
                    set_yylval_literal(rb_cstr_to_inum(tok(), 16, Qfalse));
                    return tINTEGER;
                }
                if (c == 'b' || c == 'B') {
                    /* binary */
                    c = nextc();
                    if (c == '0' || c == '1') {
                        do {
                            if (c == '_') {
                                if (nondigit) break;
                                nondigit = c;
                                continue;
                            }
                            if (c != '0' && c != '1') break;
                            nondigit = 0;
                            tokadd(c);
                        } while ((c = nextc()) != -1);
                    }
                    pushback(c);
                    tokfix();
                    if (toklen() == start) {
                        yyerror("numeric literal without digits");
                    }
                    else if (nondigit) goto trailing_uc;
                    set_yylval_literal(rb_cstr_to_inum(tok(), 2, Qfalse));
                    return tINTEGER;
                }
                if (c == 'd' || c == 'D') {
                    /* decimal */
                    c = nextc();
                    if (ISDIGIT(c)) {
                        do {
                            if (c == '_') {
                                if (nondigit) break;
                                nondigit = c;
                                continue;
                            }
                            if (!ISDIGIT(c)) break;
                            nondigit = 0;
                            tokadd(c);
                        } while ((c = nextc()) != -1);
                    }
                    pushback(c);
                    tokfix();
                    if (toklen() == start) {
                        yyerror("numeric literal without digits");
                    }
                    else if (nondigit) goto trailing_uc;
                    set_yylval_literal(rb_cstr_to_inum(tok(), 10, Qfalse));
                    return tINTEGER;
                }
                if (c == '_') {
                    /* 0_0 */
                    goto octal_number;
                }
                if (c == 'o' || c == 'O') {
                    /* prefixed octal */
                    c = nextc();
                    if (c == '_') {
                        yyerror("numeric literal without digits");
                    }
                }
                if (c >= '0' && c <= '7') {
                    /* octal */
                  octal_number:
                    do {
                        if (c == '_') {
                            if (nondigit) break;
                            nondigit = c;
                            continue;
                        }
                        if (c < '0' || c > '7') break;
                        nondigit = 0;
                        tokadd(c);
                    } while ((c = nextc()) != -1);
                    if (toklen() > start) {
                        pushback(c);
                        tokfix();
                        if (nondigit) goto trailing_uc;
                        set_yylval_literal(rb_cstr_to_inum(tok(), 8, Qfalse));
                        return tINTEGER;
                    }
                    if (nondigit) {
                        pushback(c);
                        goto trailing_uc;
                    }
                }
                if (c > '7' && c <= '9') {
                    yyerror("Illegal octal digit");
                }
                else if (c == '.' || c == 'e' || c == 'E') {
                    tokadd('0');
                }
                else {
                    pushback(c);
                    set_yylval_literal(INT2FIX(0));
                    return tINTEGER;
                }
            }

            for (;;) {
                switch (c) {
                  case '0': case '1': case '2': case '3': case '4':
                  case '5': case '6': case '7': case '8': case '9':
                    nondigit = 0;
                    tokadd(c);
                    break;

                  case '.':
                    if (nondigit) goto trailing_uc;
                    if (seen_point || seen_e) {
                        goto decode_num;
                    }
                    else {
                        int c0 = nextc();
                        if (!ISDIGIT(c0)) {
                            pushback(c0);
                            goto decode_num;
                        }
                        c = c0;
                    }
                    tokadd('.');
                    tokadd(c);
                    is_float++;
                    seen_point++;
                    nondigit = 0;
                    break;

                  case 'e':
                  case 'E':
                    if (nondigit) {
                        pushback(c);
                        c = nondigit;
                        goto decode_num;
                    }
                    if (seen_e) {
                        goto decode_num;
                    }
                    tokadd(c);
                    seen_e++;
                    is_float++;
                    nondigit = c;
                    c = nextc();
                    if (c != '-' && c != '+') continue;
                    tokadd(c);
                    nondigit = c;
                    break;

                  case '_':     /* `_' in number just ignored */
                    if (nondigit) goto decode_num;
                    nondigit = c;
                    break;

                  default:
                    goto decode_num;
                }
                c = nextc();
            }

          decode_num:
            pushback(c);
            tokfix();
            if (nondigit) {
                char tmp[30];
              trailing_uc:
                sprintf(tmp, "trailing `%c' in number", nondigit);
                yyerror(tmp);
            }
            if (is_float) {
                double d = strtod(tok(), 0);
                if (errno == ERANGE) {
                    rb_warnS("Float %s out of range", tok());
                    errno = 0;
                }
                set_yylval_literal(rb_float_new(d));
                return tFLOAT;
            }
            set_yylval_literal(rb_cstr_to_inum(tok(), 10, Qfalse));
            return tINTEGER;
        }

      case ')':
      case ']':
        paren_nest--;
      case '}':
        COND_LEXPOP();
        CMDARG_LEXPOP();
        lex_state = EXPR_END;
        return c;

      case ':':
        c = nextc();
        if (c == ':') {
            if (IS_BEG() ||
                lex_state == EXPR_CLASS || (IS_ARG() && space_seen)) {
                lex_state = EXPR_BEG;
                return tCOLON3;
            }
            lex_state = EXPR_DOT;
            return tCOLON2;
        }
        if (lex_state == EXPR_END || lex_state == EXPR_END2 ||
            lex_state == EXPR_ENDARG || ISSPACE(c)) {
            pushback(c);
            lex_state = EXPR_BEG;
            return ':';
        }
        switch (c) {
          case '\'':
            lex_strterm = NEW_STRTERM(str_ssym, c, 0);
            break;
          case '"':
            lex_strterm = NEW_STRTERM(str_dsym, c, 0);
            break;
          default:
            pushback(c);
            break;
        }
        lex_state = EXPR_FNAME;
        return tSYMBEG;

      case '/':
        if (IS_BEG()) {
            lex_strterm = NEW_STRTERM(str_regexp, '/', 0);
            return tREGEXP_BEG;
        }
        if ((c = nextc()) == '=') {
            set_yylval_id('/');
            lex_state = EXPR_BEG;
            return tOP_ASGN;
        }
        pushback(c);
        if (IS_ARG() && space_seen) {
            if (!ISSPACE(c)) {
                arg_ambiguous();
                lex_strterm = NEW_STRTERM(str_regexp, '/', 0);
                return tREGEXP_BEG;
            }
        }
        switch (lex_state) {
          case EXPR_FNAME: case EXPR_DOT:
            lex_state = EXPR_ARG; break;
          default:
            lex_state = EXPR_BEG; break;
        }
        return '/';

      case '^':
        if ((c = nextc()) == '=') {
            set_yylval_id('^');
            lex_state = EXPR_BEG;
            return tOP_ASGN;
        }
        switch (lex_state) {
          case EXPR_FNAME: case EXPR_DOT:
            lex_state = EXPR_ARG; break;
          default:
            lex_state = EXPR_BEG; break;
        }
        pushback(c);
        return '^';

      case ';':
        if (lex_state != EXPR_END2 && peek(';')) {
            lex_state = EXPR_END2;
            return kEND;
        }
        lex_state = EXPR_BEG;
        command_start = Qtrue;
        return ';';

      case ',':
        lex_state = EXPR_BEG;
        return ',';

      case '~':
        if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
            if ((c = nextc()) != '@') {
                pushback(c);
            }
        }
        switch (lex_state) {
          case EXPR_FNAME: case EXPR_DOT:
            lex_state = EXPR_ARG; break;
          default:
            lex_state = EXPR_BEG; break;
        }
        return '~';

      case '(':
        if (IS_BEG()) {
            c = tLPAREN;
        }
        else if (space_seen) {
            if (lex_state == EXPR_CMDARG) {
                c = tLPAREN_ARG;
            }
            else if (lex_state == EXPR_ARG) {
                rb_warning0("don't put space before argument parentheses");
                c = '(';
            }
        }
        paren_nest++;
        COND_PUSH(0);
        CMDARG_PUSH(0);
        lex_state = EXPR_BEG;
        return c;

      case '[':
        paren_nest++;
        if (lex_state == EXPR_FNAME || lex_state == EXPR_DOT) {
            lex_state = EXPR_ARG;
            if ((c = nextc()) == ']') {
                if ((c = nextc()) == '=') {
                    return tASET;
                }
                pushback(c);
                return tAREF;
            }
            pushback(c);
            return '[';
        }
        else if (IS_BEG()) {
            c = tLBRACK;
        }
        else if (IS_ARG() && space_seen) {
            c = tLBRACK;
        }
        lex_state = EXPR_BEG;
        COND_PUSH(0);
        CMDARG_PUSH(0);
        return c;

      case '{':
        if (lpar_beg && lpar_beg == paren_nest) {
            lex_state = EXPR_BEG;
            lpar_beg = 0;
            --paren_nest;
            return tLAMBEG;
        }
        if (IS_ARG() || lex_state == EXPR_END || lex_state == EXPR_END2)
            c = '{';          /* block (primary) */
        else if (lex_state == EXPR_ENDARG)
            c = tLBRACE_ARG;  /* block (expr) */
        else
            c = tLBRACE;      /* hash */
        COND_PUSH(0);
        CMDARG_PUSH(0);
        lex_state = EXPR_BEG;
        return c;

      case '\\':
        c = nextc();
        if (c == '\n') {
            space_seen = 1;
#ifdef RIPPER
            ripper_dispatch_scan_event(parser, tSP);
#endif
            goto retry; /* skip \\n */
        }
        pushback(c);
        return '\\';

      case '%':
        if (IS_BEG()) {
            int term;
            int paren;

            c = nextc();
          quotation:
            if (!ISALNUM(c)) {
                term = c;
                c = 'Q';
            }
            else {
                term = nextc();
                uc = (unsigned char)c;
                if (ISALNUM(term) || ismbchar(uc)) {
                    yyerror("unknown type of %string");
                    return 0;
                }
            }
            if (c == -1 || term == -1) {
                rb_compile_error(PARSER_ARG  "unterminated quoted string meets end of file");
                return 0;
            }
            paren = term;
            if (term == '(') term = ')';
            else if (term == '[') term = ']';
            else if (term == '{') term = '}';
            else if (term == '<') term = '>';
            else paren = 0;

            switch (c) {
              case 'Q':
                lex_strterm = NEW_STRTERM(str_dquote, term, paren);
                return tSTRING_BEG;

              case 'q':
                lex_strterm = NEW_STRTERM(str_squote, term, paren);
                return tSTRING_BEG;

              case 'W':
                lex_strterm = NEW_STRTERM(str_dquote | STR_FUNC_QWORDS, term, paren);
                do {c = nextc();} while (ISSPACE(c));
                pushback(c);
                return tWORDS_BEG;

              case 'w':
                lex_strterm = NEW_STRTERM(str_squote | STR_FUNC_QWORDS, term, paren);
                do {c = nextc();} while (ISSPACE(c));
                pushback(c);
                return tQWORDS_BEG;

              case 'x':
                lex_strterm = NEW_STRTERM(str_xquote, term, paren);
                return tXSTRING_BEG;

              case 'r':
                lex_strterm = NEW_STRTERM(str_regexp, term, paren);
                return tREGEXP_BEG;

              case 's':
                lex_strterm = NEW_STRTERM(str_ssym, term, paren);
                lex_state = EXPR_FNAME;
                return tSYMBEG;

              default:
                yyerror("unknown type of %string");
                return 0;
            }
        }
        if ((c = nextc()) == '=') {
            set_yylval_id('%');
            lex_state = EXPR_BEG;
            return tOP_ASGN;
        }
        if (IS_ARG() && space_seen && !ISSPACE(c)) {
            goto quotation;
        }
        switch (lex_state) {
          case EXPR_FNAME: case EXPR_DOT:
            lex_state = EXPR_ARG; break;
          default:
            lex_state = EXPR_BEG; break;
        }
        pushback(c);
        return '%';

      case '$':
        last_state = lex_state;
        lex_state = EXPR_END;
        newtok();
        c = nextc();
        switch (c) {
          case '_':             /* $_: last read line string */
            c = nextc();
            uc = (unsigned char)c;
            if (is_identchar(uc)) {
                tokadd('$');
                tokadd('_');
                break;
            }
            pushback(c);
            c = '_';
            /* fall through */
          case '~':             /* $~: match-data */
            (void)local_cnt(c);
            /* fall through */
          case '*':             /* $*: argv */
          case '$':             /* $$: pid */
          case '?':             /* $?: last status */
          case '!':             /* $!: error string */
          case '@':             /* $@: error position */
          case '/':             /* $/: input record separator */
          case '\\':            /* $\: output record separator */
          case ';':             /* $;: field separator */
          case ',':             /* $,: output field separator */
          case '.':             /* $.: last read line number */
          case '=':             /* $=: ignorecase */
          case ':':             /* $:: load path */
          case '<':             /* $<: reading filename */
          case '>':             /* $>: default output handle */
          case '\"':            /* $": already loaded files */
            tokadd('$');
            tokadd(c);
            tokfix();
            set_yylval_id(rb_intern(tok()));
            return tGVAR;

          case '-':
            tokadd('$');
            tokadd(c);
            c = nextc();
            uc = (unsigned char)c;
            if (is_identchar(uc)) {
                tokadd(c);
            }
            else {
                pushback(c);
            }
          gvar:
            tokfix();
            set_yylval_id(rb_intern(tok()));
            if (!is_global_id(yylval_id())) {
                rb_compile_error(PARSER_ARG  "invalid global variable `%s'", rb_id2name(yylval.id));
                return 0;
            }
            return tGVAR;

          case '&':             /* $&: last match */
          case '`':             /* $`: string before last match */
          case '\'':            /* $': string after last match */
          case '+':             /* $+: string matches last paren. */
            if (last_state == EXPR_FNAME) {
                tokadd('$');
                tokadd(c);
                goto gvar;
            }
            set_yylval_node(NEW_BACK_REF(c));
            return tBACK_REF;

          case '1': case '2': case '3':
          case '4': case '5': case '6':
          case '7': case '8': case '9':
            tokadd('$');
            do {
                tokadd(c);
                c = nextc();
            } while (ISDIGIT(c));
            pushback(c);
            if (last_state == EXPR_FNAME) goto gvar;
            tokfix();
            set_yylval_node(NEW_NTH_REF(atoi(tok()+1)));
            return tNTH_REF;

          default:
            uc = (unsigned char)c;
            if (!is_identchar(uc)) {
                pushback(c);
                return '$';
            }
          case '0':
            tokadd('$');
        }
        break;

      case '@':
        c = nextc();
        newtok();
        tokadd('@');
        if (c == '@') {
            tokadd('@');
            c = nextc();
        }
        if (ISDIGIT(c)) {
            if (tokidx == 1) {
                rb_compile_error(PARSER_ARG  "`@%c' is not allowed as an instance variable name", c);
            }
            else {
                rb_compile_error(PARSER_ARG  "`@@%c' is not allowed as a class variable name", c);
            }
        }
        uc = (unsigned char)c;
        if (!is_identchar(uc)) {
            pushback(c);
            return '@';
        }
        break;

      case '_':
        if (was_bol() && whole_match_p("__END__", 7, 0)) {
            ruby__end__seen = 1;
            lex_lastline = 0;
#ifndef RIPPER
            return -1;
#else
            lex_goto_eol(parser);
            ripper_dispatch_scan_event(parser, k__END__);
            return 0;
#endif
        }
        newtok();
        break;

      default:
        uc = (unsigned char)c;
        if (!is_identchar(uc)) {
            rb_compile_error(PARSER_ARG  "Invalid char `\\%03o' in expression", c);
            goto retry;
        }

        newtok();
        break;
    }

    uc = (unsigned char)c;
    do {
        tokadd(c);
        if (ismbchar(uc)) {
            int i, len = mbclen(uc)-1;

            for (i = 0; i < len; i++) {
                c = nextc();
                tokadd(c);
            }
        }
        c = nextc();
        uc = (unsigned char)c;
    } while (is_identchar(uc));
    if ((c == '!' || c == '?') && is_identchar(tok()[0]) && !peek('=')) {
        tokadd(c);
    }
    else {
        pushback(c);
    }
    tokfix();

    {
        int result = 0;

        last_state = lex_state;
        switch (tok()[0]) {
          case '$':
            lex_state = EXPR_END;
            result = tGVAR;
            break;
          case '@':
            lex_state = EXPR_END;
            if (tok()[1] == '@')
                result = tCVAR;
            else
                result = tIVAR;
            break;

          default:
            if (toklast() == '!' || toklast() == '?') {
                result = tFID;
            }
            else {
                if (lex_state == EXPR_FNAME) {
                    if ((c = nextc()) == '=' && !peek('~') && !peek('>') &&
                        (!peek('=') || (lex_p + 1 < lex_pend && lex_p[1] == '>'))) {
                        result = tIDENTIFIER;
                        tokadd(c);
                        tokfix();
                    }
                    else {
                        pushback(c);
                    }
                }
                if (result == 0 && ISUPPER(tok()[0])) {
                    result = tCONSTANT;
                }
                else {
                    result = tIDENTIFIER;
                }
            }

            if (lex_state != EXPR_DOT) {
                const struct kwtable *kw;

                /* See if it is a reserved word.  */
                kw = rb_reserved_word(tok(), toklen());
                if (kw) {
                    enum lex_state_e state = lex_state;
                    lex_state = kw->state;
                    if (state == EXPR_FNAME) {
                        set_yylval_id(rb_intern(kw->name));
                    }
                    if (kw->id[0] == kDO) {
                        if (lpar_beg && lpar_beg == paren_nest) {
                            lpar_beg = 0;
                            --paren_nest;
                            return kDO_LAMBDA;
                        }
                        if (COND_P()) return kDO_COND;
                        if (CMDARG_P() && state != EXPR_CMDARG)
                            return kDO_BLOCK;
                        if (state == EXPR_ENDARG || state == EXPR_BEG)
                            return kDO_BLOCK;
                        return kDO;
                    }
                    if (state == EXPR_BEG || state == EXPR_VALUE)
                        return kw->id[0];
                    else {
                        if (kw->id[0] != kw->id[1])
                            lex_state = EXPR_BEG;
                        return kw->id[1];
                    }
                }
            }

            if ((lex_state == EXPR_BEG && !cmd_state) ||
                lex_state == EXPR_ARG ||
                lex_state == EXPR_CMDARG) {
                if (peek(':') && !(lex_p + 1 < lex_pend && lex_p[1] == ':')) {
                    lex_state = EXPR_BEG;
                    nextc();
                    set_yylval_id(rb_intern(tok()));
                    return tLABEL;
                }
            }
            if (IS_BEG() ||
                lex_state == EXPR_DOT ||
                IS_ARG()) {
                if (cmd_state) {
                    lex_state = EXPR_CMDARG;
                }
                else {
                    lex_state = EXPR_ARG;
                }
            }
            else {
                lex_state = EXPR_END;
            }
        }
        {
            ID ident = rb_intern(tok());

            set_yylval_id(ident);
            if (last_state != EXPR_DOT && is_local_id(ident) && lvar_defined(ident)) {
                lex_state = EXPR_END;
            }
        }
        return result;
    }
}

#if YYPURE
static int
yylex(void *lval, void *p)
#else
yylex(void *p)
#endif
{
    struct parser_params *parser = (struct parser_params*)p;
    int t;

#if YYPURE
    parser->parser_yylval = (union tmpyystype*)lval;
    parser->parser_yylval->val = Qundef;
#endif
    t = parser_yylex(parser);
#ifdef RIPPER
    if (!NIL_P(parser->delayed)) {
        ripper_dispatch_delayed_token(parser, t);
        return t;
    }
    if (t != 0)
        ripper_dispatch_scan_event(parser, t);
#endif

    return t;
}

#ifndef RIPPER
NODE*
rb_node_newnode(enum node_type type, VALUE a0, VALUE a1, VALUE a2)
{
    NODE *n = (NODE*)rb_newobj();

    n->flags |= T_NODE;
    nd_set_type(n, type);
    nd_set_line(n, ruby_sourceline);
    n->nd_file = ruby_sourcefile;

    n->u1.value = a0;
    n->u2.value = a1;
    n->u3.value = a2;

    return n;
}

static enum node_type
nodetype(NODE *node)                    /* for debug */
{
    return (enum node_type)nd_type(node);
}

static int
nodeline(NODE *node)
{
    return nd_line(node);
}

static NODE*
newline_node(NODE *node)
{
    if (node) {
        node->flags |= NODE_NEWLINE;
    }
    return node;
}

static void
fixpos(NODE *node, NODE *orig)
{
    if (!node) return;
    if (!orig) return;
    if (orig == (NODE*)1) return;
    node->nd_file = orig->nd_file;
    nd_set_line(node, nd_line(orig));
}

static void
parser_warning(NODE *node, const char *mesg)
{
    int line = ruby_sourceline;
    ruby_sourceline = nd_line(node);
    rb_warning(mesg);
    ruby_sourceline = line;
}

static void
parser_warn(NODE *node, const char *mesg)
{
    int line = ruby_sourceline;
    ruby_sourceline = nd_line(node);
    rb_warn(mesg);
    ruby_sourceline = line;
}

static NODE*
block_append(NODE *head, NODE *tail)
{
    NODE *end, *h = head, *nd;

    if (tail == 0) return head;

    if (h == 0) return tail;
    switch (nd_type(h)) {
      case NODE_LIT:
      case NODE_STR:
      case NODE_SELF:
      case NODE_TRUE:
      case NODE_FALSE:
      case NODE_NIL:
        parser_warning(h, "unused literal ignored");
        return tail;
      default:
        h = end = NEW_BLOCK(head);
        end->nd_end = end;
        fixpos(end, head);
        head = end;
        break;
      case NODE_BLOCK:
        end = h->nd_end;
        break;
    }

    nd = end->nd_head;
    switch (nd_type(nd)) {
      case NODE_RETURN:
      case NODE_BREAK:
      case NODE_NEXT:
      case NODE_REDO:
      case NODE_RETRY:
        if (RTEST(ruby_verbose)) {
            parser_warning(nd, "statement not reached");
        }
        break;

      default:
        break;
    }

    if (nd_type(tail) != NODE_BLOCK) {
        tail = NEW_BLOCK(tail);
        tail->nd_end = tail;
    }
    end->nd_next = tail;
    h->nd_end = tail->nd_end;
    return head;
}

/* append item to the list */
static NODE*
list_append(NODE *list, NODE *item)
{
    NODE *last;

    if (list == 0) return NEW_LIST(item);
    if (list->nd_next) {
        last = list->nd_next->nd_end;
    }
    else {
        last = list;
    }

    list->nd_alen += 1;
    last->nd_next = NEW_LIST(item);
    list->nd_next->nd_end = last->nd_next;
    return list;
}

/* concat two lists */
static NODE*
list_concat(NODE *head, NODE *tail)
{
    NODE *last;

    if (head->nd_next) {
        last = head->nd_next->nd_end;
    }
    else {
        last = head;
    }

    head->nd_alen += tail->nd_alen;
    last->nd_next = tail;
    if (tail->nd_next) {
        head->nd_next->nd_end = tail->nd_next->nd_end;
    }
    else {
        head->nd_next->nd_end = tail;
    }

    return head;
}

/* concat two string literals */
static NODE *
literal_concat(NODE *head, NODE *tail)
{
    enum node_type htype;

    if (!head) return tail;
    if (!tail) return head;

    htype = nd_type(head);
    if (htype == NODE_EVSTR) {
        NODE *node = NEW_DSTR(rb_str_new(0, 0));
        head = list_append(node, head);
    }
    switch (nd_type(tail)) {
      case NODE_STR:
        if (htype == NODE_STR) {
            rb_str_concat(head->nd_lit, tail->nd_lit);
            rb_gc_force_recycle((VALUE)tail);
        }
        else {
            list_append(head, tail);
        }
        break;

      case NODE_DSTR:
        if (htype == NODE_STR) {
            rb_str_concat(head->nd_lit, tail->nd_lit);
            tail->nd_lit = head->nd_lit;
            rb_gc_force_recycle((VALUE)head);
            head = tail;
        }
        else {
            nd_set_type(tail, NODE_ARRAY);
            tail->nd_head = NEW_STR(tail->nd_lit);
            list_concat(head, tail);
        }
        break;

      case NODE_EVSTR:
        if (htype == NODE_STR) {
            nd_set_type(head, NODE_DSTR);
            head->nd_alen = 1;
        }
        list_append(head, tail);
        break;
    }
    return head;
}

static NODE *
evstr2dstr(NODE *node)
{
    if (nd_type(node) == NODE_EVSTR) {
        node = list_append(NEW_DSTR(rb_str_new(0, 0)), node);
    }
    return node;
}

static NODE *
new_evstr(NODE *node)
{
    NODE *head = node;

    if (node) {
        switch (nd_type(node)) {
          case NODE_STR: case NODE_DSTR: case NODE_EVSTR:
            return node;
        }
    }
    return NEW_EVSTR(head);
}

static NODE *
call_op_gen(struct parser_params *parser, NODE *recv, ID id, int narg, NODE *arg1)
{
    value_expr(arg1);
    if (narg == 1) {
        value_expr(arg1);
        arg1 = NEW_LIST(arg1);
    }
    else {
        arg1 = 0;
    }
    return NEW_CALL(recv, id, arg1);
}

static NODE*
match_op_gen(struct parser_params *parser, NODE *node1, NODE *node2)
{
    local_cnt('~');

    value_expr(node1);
    value_expr(node2);
    if (node1) {
        switch (nd_type(node1)) {
          case NODE_DREGX:
          case NODE_DREGX_ONCE:
            return NEW_MATCH2(node1, node2);

          case NODE_LIT:
            if (TYPE(node1->nd_lit) == T_REGEXP) {
                return NEW_MATCH2(node1, node2);
            }
        }
    }

    if (node2) {
        switch (nd_type(node2)) {
          case NODE_DREGX:
          case NODE_DREGX_ONCE:
            return NEW_MATCH3(node2, node1);

          case NODE_LIT:
            if (TYPE(node2->nd_lit) == T_REGEXP) {
                return NEW_MATCH3(node2, node1);
            }
        }
    }

    return NEW_CALL(node1, tMATCH, NEW_LIST(node2));
}

static NODE*
gettable_gen(struct parser_params *parser, ID id)
{
    if (id == kSELF) {
        return NEW_SELF();
    }
    else if (id == kNIL) {
        return NEW_NIL();
    }
    else if (id == kTRUE) {
        return NEW_TRUE();
    }
    else if (id == kFALSE) {
        return NEW_FALSE();
    }
    else if (id == k__FILE__) {
        return NEW_STR(rb_str_new2(ruby_sourcefile));
    }
    else if (id == k__LINE__) {
        return NEW_LIT(INT2FIX(ruby_sourceline));
    }
    else if (is_local_id(id)) {
        if (dyna_in_block() && rb_dvar_defined(id)) return NEW_DVAR(id);
        if (local_id(id)) return NEW_LVAR(id);
        /* method call without arguments */
        dyna_check(id);
        return NEW_VCALL(id);
    }
    else if (is_global_id(id)) {
        return NEW_GVAR(id);
    }
    else if (is_instance_id(id)) {
        return NEW_IVAR(id);
    }
    else if (is_const_id(id)) {
        return NEW_CONST(id);
    }
    else if (is_class_id(id)) {
        return NEW_CVAR(id);
    }
    rb_compile_error("identifier %s is not valid", rb_id2name(id));
    return 0;
}

static NODE*
assignable_gen(struct parser_params *parser, ID id, NODE *val)
{
    value_expr(val);
    if (id == kSELF) {
        yyerror("Can't change the value of self");
    }
    else if (id == kNIL) {
        yyerror("Can't assign to nil");
    }
    else if (id == kTRUE) {
        yyerror("Can't assign to true");
    }
    else if (id == kFALSE) {
        yyerror("Can't assign to false");
    }
    else if (id == k__FILE__) {
        yyerror("Can't assign to __FILE__");
    }
    else if (id == k__LINE__) {
        yyerror("Can't assign to __LINE__");
    }
    else if (is_local_id(id)) {
        if (rb_dvar_curr(id)) {
            return NEW_DASGN_CURR(id, val);
        }
        else if (rb_dvar_defined(id)) {
            return NEW_DASGN(id, val);
        }
        else if (local_id(id) || !dyna_in_block()) {
            return NEW_LASGN(id, val);
        }
        else{
            dyna_var(id);
            return NEW_DASGN_CURR(id, val);
        }
    }
    else if (is_global_id(id)) {
        return NEW_GASGN(id, val);
    }
    else if (is_instance_id(id)) {
        return NEW_IASGN(id, val);
    }
    else if (is_const_id(id)) {
        if (in_def || in_single)
            yyerror("dynamic constant assignment");
        return NEW_CDECL(id, val, 0);
    }
    else if (is_class_id(id)) {
        if (in_def || in_single) return NEW_CVASGN(id, val);
        return NEW_CVDECL(id, val);
    }
    else {
        rb_compile_error("identifier %s is not valid", rb_id2name(id));
    }
    return 0;
}

static void
shadowing_lvar_gen(struct parser_params *parser, ID name)
{
    if (rb_dvar_defined(name) || local_id(name)) {
        rb_warningS("shadowing outer local variable - %s", rb_id2name(name));
    }
}

static NODE*
new_bv_gen(struct parser_params *parser, ID name, NODE *val)
{
    if (!is_local_id(name)) {
        compile_error(PARSER_ARG "invalid local variable - %s",
                      rb_id2name(name));
        return 0;
    }
    shadowing_lvar(name);
    dyna_var(name);
    return NEW_DASGN_CURR(name, val);
}

static NODE *
aryset_gen(struct parser_params *parser, NODE *recv, NODE *idx)
{
    if (recv && nd_type(recv) == NODE_SELF)
        recv = (NODE *)1;
    else
        value_expr(recv);
    return NEW_ATTRASGN(recv, tASET, idx);
}

static void
block_dup_check(NODE *node)
{
    if (node && nd_type(node) == NODE_BLOCK_PASS) {
        compile_error(PARSER_ARG "both block arg and actual block given");
    }
}

ID
rb_id_attrset(ID id)
{
    id &= ~ID_SCOPE_MASK;
    id |= ID_ATTRSET;
    return id;
}

static NODE *
attrset_gen(struct parser_params *parser, NODE *recv, ID id)
{
    if (recv && nd_type(recv) == NODE_SELF)
        recv = (NODE *)1;
    else
        value_expr(recv);
    return NEW_ATTRASGN(recv, rb_id_attrset(id), 0);
}

static void
rb_backref_error(NODE *node)
{
    switch (nd_type(node)) {
      case NODE_NTH_REF:
        rb_compile_error("Can't set variable $%ld", node->nd_nth);
        break;
      case NODE_BACK_REF:
        rb_compile_error("Can't set variable $%c", (int)node->nd_nth);
        break;
    }
}

static NODE *
arg_concat(NODE *node1, NODE *node2)
{
    if (!node2) return node1;
    return NEW_ARGSCAT(node1, node2);
}

static NODE *
arg_add(NODE *node1, NODE *node2)
{
    if (!node1) return NEW_LIST(node2);
    if (nd_type(node1) == NODE_ARRAY) {
        return list_append(node1, node2);
    }
    else {
        return NEW_ARGSPUSH(node1, node2);
    }
}

static NODE*
node_assign_gen(struct parser_params *parser, NODE *lhs, NODE *rhs)
{
    if (!lhs) return 0;

    value_expr(rhs);
    switch (nd_type(lhs)) {
      case NODE_GASGN:
      case NODE_IASGN:
      case NODE_LASGN:
      case NODE_DASGN:
      case NODE_DASGN_CURR:
      case NODE_MASGN:
      case NODE_CDECL:
      case NODE_CVDECL:
      case NODE_CVASGN:
        lhs->nd_value = rhs;
        break;

      case NODE_ATTRASGN:
      case NODE_CALL:
        lhs->nd_args = arg_add(lhs->nd_args, rhs);
        break;

      default:
        /* should not happen */
        break;
    }

    return lhs;
}

static int
value_expr_gen(struct parser_params *parser, NODE *node)
{
    int cond = 0;

    while (node) {
        switch (nd_type(node)) {
          case NODE_DEFN:
          case NODE_DEFS:
            parser_warning(node, "void value expression");
            return Qfalse;

          case NODE_RETURN:
          case NODE_BREAK:
          case NODE_NEXT:
          case NODE_REDO:
          case NODE_RETRY:
            if (!cond) yyerror("void value expression");
            /* or "control never reach"? */
            return Qfalse;

          case NODE_BLOCK:
            while (node->nd_next) {
                node = node->nd_next;
            }
            node = node->nd_head;
            break;

          case NODE_BEGIN:
            node = node->nd_body;
            break;

          case NODE_IF:
            if (!value_expr(node->nd_body)) return Qfalse;
            node = node->nd_else;
            break;

          case NODE_AND:
          case NODE_OR:
            cond = 1;
            node = node->nd_2nd;
            break;

          default:
            return Qtrue;
        }
    }

    return Qtrue;
}

static void
void_expr_gen(struct parser_params *parser, NODE *node)
{
    char *useless = 0;

    if (!RTEST(ruby_verbose)) return;

    if (!node) return;
    switch (nd_type(node)) {
      case NODE_CALL:
        switch (node->nd_mid) {
          case '+':
          case '-':
          case '*':
          case '/':
          case '%':
          case tPOW:
          case tUPLUS:
          case tUMINUS:
          case '|':
          case '^':
          case '&':
          case tCMP:
          case '>':
          case tGEQ:
          case '<':
          case tLEQ:
          case tEQ:
          case tNEQ:
            useless = rb_id2name(node->nd_mid);
            break;
        }
        break;

      case NODE_LVAR:
      case NODE_DVAR:
      case NODE_GVAR:
      case NODE_IVAR:
      case NODE_CVAR:
      case NODE_NTH_REF:
      case NODE_BACK_REF:
        useless = "a variable";
        break;
      case NODE_CONST:
      case NODE_CREF:
        useless = "a constant";
        break;
      case NODE_LIT:
      case NODE_STR:
      case NODE_DSTR:
      case NODE_DREGX:
      case NODE_DREGX_ONCE:
        useless = "a literal";
        break;
      case NODE_COLON2:
      case NODE_COLON3:
        useless = "::";
        break;
      case NODE_DOT2:
        useless = "..";
        break;
      case NODE_DOT3:
        useless = "...";
        break;
      case NODE_SELF:
        useless = "self";
        break;
      case NODE_NIL:
        useless = "nil";
        break;
      case NODE_TRUE:
        useless = "true";
        break;
      case NODE_FALSE:
        useless = "false";
        break;
      case NODE_DEFINED:
        useless = "defined?";
        break;
    }

    if (useless) {
        int line = ruby_sourceline;

        ruby_sourceline = nd_line(node);
        rb_warn("useless use of %s in void context", useless);
        ruby_sourceline = line;
    }
}

static void
void_stmts_gen(struct parser_params *parser, NODE *node)
{
    if (!RTEST(ruby_verbose)) return;
    if (!node) return;
    if (nd_type(node) != NODE_BLOCK) return;

    for (;;) {
        if (!node->nd_next) return;
        void_expr(node->nd_head);
        node = node->nd_next;
    }
}

static NODE *
remove_begin(NODE *node)
{
    NODE **n = &node;
    while (*n) {
        if (nd_type(*n) != NODE_BEGIN) {
            return node;
        }
        *n = (*n)->nd_body;
    }
    return node;
}

static void
reduce_nodes(NODE **body)
{
    NODE *node = *body;

    if (!node) {
        *body = NEW_NIL();
        return;
    }
#define subnodes(n1, n2) \
    ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \
     (!node->n2) ? (body = &node->n1, 1) : \
     (reduce_nodes(&node->n1), body = &node->n2, 1))

    while (node) {
        switch (nd_type(node)) {
          end:
          case NODE_NIL:
            *body = 0;
            return;
          case NODE_RETURN:
            *body = node = node->nd_stts;
            continue;
          case NODE_BEGIN:
            *body = node = node->nd_body;
            continue;
          case NODE_BLOCK:
            body = &node->nd_end->nd_head;
            break;
          case NODE_IF:
            if (subnodes(nd_body, nd_else)) break;
            return;
          case NODE_CASE:
            body = &node->nd_body;
            break;
          case NODE_WHEN:
            if (!subnodes(nd_body, nd_next)) goto end;
            break;
          case NODE_ENSURE:
            if (!subnodes(nd_head, nd_resq)) goto end;
            break;
          case NODE_RESCUE:
            if (!subnodes(nd_head, nd_resq)) goto end;
            break;
          default:
            return;
        }
        node = *body;
    }

#undef subnodes
}

static int
assign_in_cond(struct parser_params *parser, NODE *node)
{
    switch (nd_type(node)) {
      case NODE_MASGN:
        yyerror("multiple assignment in conditional");
        return 1;

      case NODE_LASGN:
      case NODE_DASGN:
      case NODE_GASGN:
      case NODE_IASGN:
        break;

      default:
        return 0;
    }

    switch (nd_type(node->nd_value)) {
      case NODE_LIT:
      case NODE_STR:
      case NODE_NIL:
      case NODE_TRUE:
      case NODE_FALSE:
        /* reports always */
        parser_warn(node->nd_value, "found = in conditional, should be ==");
        return 1;

      case NODE_DSTR:
      case NODE_XSTR:
      case NODE_DXSTR:
      case NODE_EVSTR:
      case NODE_DREGX:
      default:
        break;
    }
    return 1;
}

static int
e_option_supplied(void)
{
    if (strcmp(ruby_sourcefile, "-e") == 0)
        return Qtrue;
    return Qfalse;
}

static void
warn_unless_e_option(NODE *node, const char *str)
{
    if (!e_option_supplied()) parser_warn(node, str);
}

static void
warning_unless_e_option(NODE *node, const char *str)
{
    if (!e_option_supplied()) parser_warning(node, str);
}

static NODE *cond0(struct parser_params*,NODE*);

static NODE*
range_op(struct parser_params *parser, NODE *node)
{
    enum node_type type;

    if (!e_option_supplied()) return node;
    if (node == 0) return 0;

    value_expr(node);
    node = cond0(parser, node);
    type = nd_type(node);
    if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) {
        warn_unless_e_option(node, "integer literal in conditional range");
        return call_op(node,tEQ,1,NEW_GVAR(rb_intern("$.")));
    }
    return node;
}

static int
literal_node(NODE *node)
{
    if (!node) return 1;        /* same as NODE_NIL */
    switch (nd_type(node)) {
      case NODE_LIT:
      case NODE_STR:
      case NODE_DSTR:
      case NODE_EVSTR:
      case NODE_DREGX:
      case NODE_DREGX_ONCE:
      case NODE_DSYM:
        return 2;
      case NODE_TRUE:
      case NODE_FALSE:
      case NODE_NIL:
        return 1;
    }
    return 0;
}

static NODE*
cond0(struct parser_params *parser, NODE *node)
{
    if (node == 0) return 0;
    assign_in_cond(parser, node);

    switch (nd_type(node)) {
      case NODE_DSTR:
      case NODE_EVSTR:
      case NODE_STR:
        rb_warn("string literal in condition");
        break;

      case NODE_DREGX:
      case NODE_DREGX_ONCE:
        warning_unless_e_option(node, "regex literal in condition");
        local_cnt('_');
        local_cnt('~');
        return NEW_MATCH2(node, NEW_GVAR(rb_intern("$_")));

      case NODE_AND:
      case NODE_OR:
        node->nd_1st = cond0(parser, node->nd_1st);
        node->nd_2nd = cond0(parser, node->nd_2nd);
        break;

      case NODE_DOT2:
      case NODE_DOT3:
        node->nd_beg = range_op(parser, node->nd_beg);
        node->nd_end = range_op(parser, node->nd_end);
        if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2);
        else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3);
        node->nd_cnt = local_append(internal_id());
        if (!e_option_supplied()) {
            int b = literal_node(node->nd_beg);
            int e = literal_node(node->nd_end);
            if ((b == 1 && e == 1) || (b + e >= 2 && RTEST(ruby_verbose))) {
                parser_warn(node, "range literal in condition");
            }
        }
        break;

      case NODE_DSYM:
        parser_warning(node, "literal in condition");
        break;

      case NODE_LIT:
        if (TYPE(node->nd_lit) == T_REGEXP) {
            warn_unless_e_option(node, "regex literal in condition");
            nd_set_type(node, NODE_MATCH);
            local_cnt('_');
            local_cnt('~');
        }
        else {
            parser_warning(node, "literal in condition");
        }
      default:
        break;
    }
    return node;
}

static NODE*
cond_gen(struct parser_params *parser, NODE *node)
{
    if (node == 0) return 0;
    value_expr(node);
    return cond0(parser, node);
}

static NODE*
logop_gen(struct parser_params *parser, enum node_type type, NODE *left, NODE *right)
{
    value_expr(left);
    if (left && nd_type(left) == type) {
        NODE *node = left, *second;
        while ((second = node->nd_2nd) != 0 && nd_type(second) == type) {
            node = second;
        }
        node->nd_2nd = NEW_NODE(type, second, right, 0);
        return left;
    }
    return NEW_NODE(type, left, right, 0);
}

static int
cond_negative(NODE **nodep)
{
    NODE *c = *nodep;

    if (!c) return 0;
    switch (nd_type(c)) {
      case NODE_NOT:
        *nodep = c->nd_body;
        return 1;
    }
    return 0;
}

static void
no_blockarg(NODE *node)
{
    if (node && nd_type(node) == NODE_BLOCK_PASS) {
        rb_compile_error("block argument should not be given");
    }
}

static NODE *
ret_args(NODE *node)
{
    if (node) {
        no_blockarg(node);
        if (nd_type(node) == NODE_ARRAY) {
            if (node->nd_next == 0) {
                node = node->nd_head;
            }
            else {
                nd_set_type(node, NODE_VALUES);
            }
        }
        else if (nd_type(node) == NODE_SPLAT) {
            node = NEW_SVALUE(node);
        }
    }
    return node;
}

static NODE *
new_yield(NODE *node)
{
    long state = Qtrue;

    if (node) {
        no_blockarg(node);
        if (nd_type(node) == NODE_ARRAY && node->nd_next == 0) {
            node = node->nd_head;
            state = Qfalse;
        }
        else if (node && nd_type(node) == NODE_SPLAT) {
            state = Qtrue;
        }
    }
    else {
        state = Qfalse;
    }
    return NEW_YIELD(node, state);
}

static NODE*
negate_lit(NODE *node)
{
    switch (TYPE(node->nd_lit)) {
      case T_FIXNUM:
        node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit));
        break;
      case T_BIGNUM:
        node->nd_lit = rb_funcall(node->nd_lit,tUMINUS,0,0);
        break;
      case T_FLOAT:
        RFLOAT(node->nd_lit)->value = -RFLOAT(node->nd_lit)->value;
        break;
      default:
        break;
    }
    return node;
}

static NODE *
arg_blk_pass(NODE *node1, NODE *node2)
{
    if (node2) {
        node2->nd_head = node1;
        return node2;
    }
    return node1;
}

static NODE*
arg_prepend(NODE *node1, NODE *node2)
{
    switch (nd_type(node2)) {
      case NODE_ARRAY:
        return list_concat(NEW_LIST(node1), node2);

      case NODE_SPLAT:
        return arg_concat(node1, node2->nd_head);

      case NODE_BLOCK_PASS:
        node2->nd_body = arg_prepend(node1, node2->nd_body);
        return node2;

      default:
        rb_bug("unknown nodetype(%d) for arg_prepend", nd_type(node2));
    }
    return 0;                   /* not reached */
}

static int
arg_dup_check(ID vid, VALUE m, VALUE list, NODE *node)
{
    VALUE sym = ID2SYM(vid);
    if ((m && rb_ary_includes(m, sym)) || rb_ary_includes(list, sym)) {
        ruby_sourceline = nd_line(node);
        return 1;
    }
    rb_ary_push(list, sym);
    return 0;
}

static NODE*
new_args_gen(struct parser_params *parser, VALUE m, NODE *o, NODE *r, NODE *b)
{
    int saved_line = ruby_sourceline;
    NODE *tmp;
    VALUE list;

    list = rb_ary_new();
    tmp = o;
    while (tmp) {
        if (!tmp->nd_head) break;
        if (arg_dup_check(tmp->nd_head->nd_vid, m, list, tmp)) {
            yyerror("duplicated optional argument name");
            return 0;
        }
        tmp = tmp->nd_next;
    }
    if (RTEST(r)) {
        if (arg_dup_check(r->nd_vid, m, list, r)) {
            yyerror("duplicated rest argument name");
            return 0;
        }
    }
    if (b) {
        if (arg_dup_check(b->nd_vid, m, list, b)) {
            yyerror("duplicated block argument name");
            return 0;
        }
    }
    ruby_sourceline = saved_line;
    return block_append(NEW_ARGS(m, o, r), b);
}

static NODE*
new_call(NODE *r, ID m, NODE *a)
{
    if (a && nd_type(a) == NODE_BLOCK_PASS) {
        a->nd_iter = NEW_CALL(r,m,a->nd_head);
        return a;
    }
    return NEW_CALL(r,m,a);
}

static NODE*
new_fcall_gen(struct parser_params *parser, ID m, NODE *a)
{
    if (a && nd_type(a) == NODE_BLOCK_PASS) {
        a->nd_iter = NEW_FCALL(m,a->nd_head);
        return a;
    }
    return NEW_FCALL(m, a);
}

static NODE*
new_super(NODE *a)
{
    if (a && nd_type(a) == NODE_BLOCK_PASS) {
        a->nd_iter = NEW_SUPER(a->nd_head);
        return a;
    }
    return NEW_SUPER(a);
}

static void
local_push_gen(struct parser_params *parser, int top)
{
    struct local_vars *local;

    local = ALLOC(struct local_vars);
    local->prev = lvtbl;
    local->nofree = 0;
    local->cnt = 0;
    local->tbl = 0;
    local->dlev = 0;
    local->dname_size = 0;
    local->dnames = 0;
    local->dyna_vars = ruby_dyna_vars;
    lvtbl = local;
    if (!top) {
        /* preserve reference for GC, but link should be cut. */
        rb_dvar_push(0, (VALUE)ruby_dyna_vars);
        ruby_dyna_vars->next = 0;
    }
}

static void
local_pop_gen(struct parser_params *parser)
{
    struct local_vars *local = lvtbl->prev;

    if (lvtbl->tbl) {
        if (!lvtbl->nofree) xfree(lvtbl->tbl);
        else lvtbl->tbl[0] = lvtbl->cnt;
    }
    if (lvtbl->dnames) {
        xfree(lvtbl->dnames);
    }
    ruby_dyna_vars = lvtbl->dyna_vars;
    xfree(lvtbl);
    lvtbl = local;
}

static ID*
local_tbl_gen(struct parser_params *parser)
{
    lvtbl->nofree = 1;
    return lvtbl->tbl;
}

static int
local_append_gen(struct parser_params *parser, ID id)
{
    if (lvtbl->tbl == 0) {
        lvtbl->tbl = ALLOC_N(ID, 4);
        lvtbl->tbl[0] = 0;
        lvtbl->tbl[1] = '_';
        lvtbl->tbl[2] = '~';
        lvtbl->cnt = 2;
        if (id == '_') return 0;
        if (id == '~') return 1;
    }
    else {
        REALLOC_N(lvtbl->tbl, ID, lvtbl->cnt+2);
    }

    lvtbl->tbl[lvtbl->cnt+1] = id;
    return lvtbl->cnt++;
}

static int
local_cnt_gen(struct parser_params *parser, ID id)
{
    int cnt, max;

    if (id == 0) return lvtbl->cnt;

    for (cnt=1, max=lvtbl->cnt+1; cnt<max;cnt++) {
        if (lvtbl->tbl[cnt] == id) return cnt-1;
    }
    return local_append(id);
}

static int
local_id_gen(struct parser_params *parser, ID id)
{
    int i, max;

    if (lvtbl == 0) return Qfalse;
    for (i=3, max=lvtbl->cnt+1; i<max; i++) {
        if (lvtbl->tbl[i] == id) return Qtrue;
    }
    return Qfalse;
}

static void
top_local_init_gen(struct parser_params *parser)
{
    local_push(1);
    lvtbl->cnt = ruby_scope->local_tbl?ruby_scope->local_tbl[0]:0;
    if (lvtbl->cnt > 0) {
        lvtbl->tbl = ALLOC_N(ID, lvtbl->cnt+3);
        MEMCPY(lvtbl->tbl, ruby_scope->local_tbl, ID, lvtbl->cnt+1);
    }
    else {
        lvtbl->tbl = 0;
    }
    if (ruby_dyna_vars)
        lvtbl->dlev = 1;
    else
        lvtbl->dlev = 0;
}

static void
top_local_setup_gen(struct parser_params *parser)
{
    int len = lvtbl->cnt;
    int i;

    if (len > 0) {
        i = ruby_scope->local_tbl?ruby_scope->local_tbl[0]:0;

        if (i < len) {
            if (i == 0 || (ruby_scope->flags & SCOPE_MALLOC) == 0) {
                VALUE *vars = ALLOC_N(VALUE, len+1);
                if (ruby_scope->local_vars) {
                    *vars++ = ruby_scope->local_vars[-1];
                    MEMCPY(vars, ruby_scope->local_vars, VALUE, i);
                    rb_mem_clear(vars+i, len-i);
                }
                else {
                    *vars++ = 0;
                    rb_mem_clear(vars, len);
                }
                ruby_scope->local_vars = vars;
                ruby_scope->flags |= SCOPE_MALLOC;
            }
            else {
                VALUE *vars = ruby_scope->local_vars-1;
                REALLOC_N(vars, VALUE, len+1);
                ruby_scope->local_vars = vars+1;
                rb_mem_clear(ruby_scope->local_vars+i, len-i);
            }
            if (ruby_scope->local_tbl && ruby_scope->local_vars[-1] == 0) {
                xfree(ruby_scope->local_tbl);
            }
            ruby_scope->local_vars[-1] = 0;
            ruby_scope->local_tbl = local_tbl();
        }
    }
    local_pop();
}

static void
dyna_var_gen(struct parser_params *parser, ID id)
{
    int i;

    rb_dvar_push(id, Qnil);
    for (i=0; i<lvtbl->dname_size; i++) {
        if (lvtbl->dnames[i] == id) return;
    }
    if (lvtbl->dname_size == 0) {
        lvtbl->dnames = ALLOC_N(ID, 1);
    }
    else {
        REALLOC_N(lvtbl->dnames, ID, lvtbl->dname_size+1);
    }
    lvtbl->dnames[lvtbl->dname_size++] = id;
}

static void
dyna_check_gen(struct parser_params *parser, ID id)
{
    int i;

    if (in_defined) return;     /* no check needed */
    for (i=0; i<lvtbl->dname_size; i++) {
        if (lvtbl->dnames[i] == id) {
            rb_warnS("out-of-scope variable - %s", rb_id2name(id));
            return;
        }
    }
}

static struct RVarmap*
dyna_push_gen(struct parser_params *parser)
{
    struct RVarmap* vars = ruby_dyna_vars;

    rb_dvar_push(0, 0);
    lvtbl->dlev++;
    return vars;
}

static void
dyna_pop_gen(struct parser_params *parser, struct RVarmap* vars)
{
    lvtbl->dlev--;
    ruby_dyna_vars = vars;
}

static int
dyna_in_block_gen(struct parser_params *parser)
{
    return (lvtbl->dlev > 0);
}

static NODE *
dyna_init_gen(struct parser_params *parser, NODE *node, struct RVarmap *pre)
{
    struct RVarmap *post = ruby_dyna_vars;
    NODE *var;

    if (!node || !post || pre == post) return node;
    for (var = 0; post != pre && post->id; post = post->next) {
        var = NEW_DASGN_CURR(post->id, var);
    }
    return block_append(var, node);
}

void
rb_gc_mark_parser(void)
{
}

NODE*
rb_parser_append_print(NODE *node)
{
    NODE *prelude = 0;

    if (node && (nd_type(node) == NODE_PRELUDE)) {
        prelude = node;
        node = node->nd_body;
    }
    node = block_append(node,
                        NEW_FCALL(rb_intern("print"),
                                  NEW_ARRAY(NEW_GVAR(rb_intern("$_")))));
    if (prelude) {
        prelude->nd_body = node;
        return prelude;
    }
    return node;
}

NODE *
rb_parser_while_loop(NODE *node, int chop, int split)
{
    NODE *prelude = 0;

    if (node && (nd_type(node) == NODE_PRELUDE)) {
        prelude = node;
        node = node->nd_body;
    }
    if (split) {
        node = block_append(NEW_GASGN(rb_intern("$F"),
                                      NEW_CALL(NEW_GVAR(rb_intern("$_")),
                                               rb_intern("split"), 0)),
                            node);
    }
    if (chop) {
        node = block_append(NEW_CALL(NEW_GVAR(rb_intern("$_")),
                                     rb_intern("chop!"), 0), node);
    }
    node = NEW_OPT_N(node);
    if (prelude) {
        prelude->nd_body = node;
        return prelude;
    }
    return node;
}

static const struct {
    ID token;
    char *name;
} op_tbl[] = {
    {tDOT2,     ".."},
    {tDOT3,     "..."},
    {'+',       "+"},
    {'-',       "-"},
    {'+',       "+(binary)"},
    {'-',       "-(binary)"},
    {'*',       "*"},
    {'/',       "/"},
    {'%',       "%"},
    {tPOW,      "**"},
    {tUPLUS,    "+@"},
    {tUMINUS,   "-@"},
    {tUPLUS,    "+(unary)"},
    {tUMINUS,   "-(unary)"},
    {'|',       "|"},
    {'^',       "^"},
    {'&',       "&"},
    {tCMP,      "<=>"},
    {'>',       ">"},
    {tGEQ,      ">="},
    {'<',       "<"},
    {tLEQ,      "<="},
    {tEQ,       "=="},
    {tEQQ,      "==="},
    {tNEQ,      "!="},
    {tMATCH,    "=~"},
    {tNMATCH,   "!~"},
    {'!',       "!"},
    {'~',       "~"},
    {'!',       "!(unary)"},
    {'~',       "~(unary)"},
    {'!',       "!@"},
    {'~',       "~@"},
    {tAREF,     "[]"},
    {tASET,     "[]="},
    {tLSHFT,    "<<"},
    {tRSHFT,    ">>"},
    {tCOLON2,   "::"},
    {'`',       "`"},
    {0, 0}
};

static struct symbols {
    ID last_id;
    st_table *tbl;
    st_table *rev;
} global_symbols = {tLAST_TOKEN};

void
Init_sym(void)
{
    global_symbols.tbl = st_init_strtable_with_size(200);
    global_symbols.rev = st_init_numtable_with_size(200);
}

static ID
internal_id(void)
{
    return ID_INTERNAL | (++global_symbols.last_id << ID_SCOPE_SHIFT);
}

static int
is_special_global_name(const char *m)
{
    switch (*m) {
      case '~': case '*': case '$': case '?': case '!': case '@':
      case '/': case '\\': case ';': case ',': case '.': case '=':
      case ':': case '<': case '>': case '\"':
      case '&': case '`': case '\'': case '+':
      case '0':
        ++m;
        break;
      case '-':
        ++m;
        if (is_identchar(*m)) m += mbclen(*m);
        break;
      default:
        if (!ISDIGIT(*m)) return 0;
        do ++m; while (ISDIGIT(*m));
    }
    return !*m;
}

int
rb_symname_p(const char *name)
{
    const char *m = name;
    int localid = Qfalse;

    if (!m) return Qfalse;
    switch (*m) {
      case '\0':
        return Qfalse;

      case '$':
        if (is_special_global_name(++m)) return Qtrue;
        goto id;

      case '@':
        if (*++m == '@') ++m;
        goto id;

      case '<':
        switch (*++m) {
          case '<': ++m; break;
          case '=': if (*++m == '>') ++m; break;
          default: break;
        }
        break;

      case '>':
        switch (*++m) {
          case '>': case '=': ++m; break;
        }
        break;

      case '=':
        switch (*++m) {
          case '~': ++m; break;
          case '=': if (*++m == '=') ++m; break;
          default: return Qfalse;
        }
        break;

      case '*':
        if (*++m == '*') ++m;
        break;

      case '+': case '-':
        if (*++m == '@') ++m;
        break;

      case '|': case '^': case '&': case '/': case '%': case '~': case '`':
        ++m;
        break;

      case '[':
        if (*++m != ']') return Qfalse;
        if (*++m == '=') ++m;
        break;

      default:
        localid = !ISUPPER(*m);
      id:
        if (*m != '_' && !ISALPHA(*m) && !ismbchar(*m)) return Qfalse;
        while (is_identchar(*m)) m += mbclen(*m);
        if (localid) {
            switch (*m) {
              case '!': case '?': case '=': ++m;
            }
        }
        break;
    }
    return *m ? Qfalse : Qtrue;
}

ID
rb_intern(const char *name)
{
    const char *m = name;
    ID id;
    int last;

    if (st_lookup(global_symbols.tbl, (st_data_t)name, (st_data_t *)&id))
        return id;

    last = strlen(name)-1;
    id = 0;
    switch (*name) {
      case '$':
        id |= ID_GLOBAL;
        if (is_special_global_name(++m)) goto new_id;
        break;
      case '@':
        if (name[1] == '@') {
            m++;
            id |= ID_CLASS;
        }
        else {
            id |= ID_INSTANCE;
        }
        m++;
        break;
      default:
        if (name[0] != '_' && ISASCII(name[0]) && !ISALNUM(name[0])) {
            /* operators */
            int i;

            for (i=0; op_tbl[i].token; i++) {
                if (*op_tbl[i].name == *name &&
                    strcmp(op_tbl[i].name, name) == 0) {
                    id = op_tbl[i].token;
                    goto id_regist;
                }
            }
        }

        if (name[last] == '=') {
            /* attribute assignment */
            char *buf = ALLOCA_N(char,last+1);

            strncpy(buf, name, last);
            buf[last] = '\0';
            id = rb_intern(buf);
            if (id > tLAST_TOKEN && !is_attrset_id(id)) {
                id = rb_id_attrset(id);
                goto id_regist;
            }
            id = ID_ATTRSET;
        }
        else if (ISUPPER(name[0])) {
            id = ID_CONST;
        }
        else {
            id = ID_LOCAL;
        }
        break;
    }
    if (!ISDIGIT(*m)) {
        while (m <= name + last && is_identchar(*m)) {
            m += mbclen(*m);
        }
    }
    if (*m) id = ID_JUNK;
  new_id:
    id |= ++global_symbols.last_id << ID_SCOPE_SHIFT;
  id_regist:
    name = strdup(name);
    st_add_direct(global_symbols.tbl, (st_data_t)name, id);
    st_add_direct(global_symbols.rev, id, (st_data_t)name);
    return id;
}

char *
rb_id2name(ID id)
{
    char *name;
    st_data_t data;

    if (id < tLAST_TOKEN) {
        int i = 0;

        for (i=0; op_tbl[i].token; i++) {
            if (op_tbl[i].token == id)
                return op_tbl[i].name;
        }
    }

    if (st_lookup(global_symbols.rev, id, &data))
        return (char *)data;

    if (is_attrset_id(id)) {
        ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL;

      again:
        name = rb_id2name(id2);
        if (name) {
            char *buf = ALLOCA_N(char, strlen(name)+2);

            strcpy(buf, name);
            strcat(buf, "=");
            rb_intern(buf);
            return rb_id2name(id);
        }
        if (is_local_id(id2)) {
            id2 = (id & ~ID_SCOPE_MASK) | ID_CONST;
            goto again;
        }
    }
    return 0;
}

static int
symbols_i(char *key, ID value, VALUE ary)
{
    rb_ary_push(ary, ID2SYM(value));
    return ST_CONTINUE;
}

/*
 *  call-seq:
 *     Symbol.all_symbols    => array
 *
 *  Returns an array of all the symbols currently in Ruby's symbol
 *  table.
 *
 *     Symbol.all_symbols.size    #=> 903
 *     Symbol.all_symbols[1,20]   #=> [:floor, :ARGV, :Binding, :symlink,
 *                                     :chown, :EOFError, :$;, :String,
 *                                     :LOCK_SH, :"setuid?", :$<,
 *                                     :default_proc, :compact, :extend,
 *                                     :Tms, :getwd, :$=, :ThreadGroup,
 *                                     :wait2, :$>]
 */

VALUE
rb_sym_all_symbols(void)
{
    VALUE ary = rb_ary_new2(global_symbols.tbl->num_entries);

    st_foreach(global_symbols.tbl, symbols_i, ary);
    return ary;
}

int
rb_is_const_id(ID id)
{
    if (is_const_id(id)) return Qtrue;
    return Qfalse;
}

int
rb_is_class_id(ID id)
{
    if (is_class_id(id)) return Qtrue;
    return Qfalse;
}

int
rb_is_instance_id(ID id)
{
    if (is_instance_id(id)) return Qtrue;
    return Qfalse;
}

int
rb_is_local_id(ID id)
{
    if (is_local_id(id)) return Qtrue;
    return Qfalse;
}

int
rb_is_junk_id(ID id)
{
    if (is_junk_id(id)) return Qtrue;
    return Qfalse;
}

static void
special_local_set(char c, VALUE val)
{
    VALUE volatile vparser = rb_parser_new();
    struct parser_params *parser;
    int cnt;

    Data_Get_Struct(vparser, struct parser_params, parser);
    top_local_init();
    cnt = local_cnt(c);
    top_local_setup();
    ruby_scope->local_vars[cnt] = val;
}

VALUE
rb_backref_get(void)
{
    VALUE *var = rb_svar(1);
    if (var) {
        return *var;
    }
    return Qnil;
}

void
rb_backref_set(VALUE val)
{
    VALUE *var = rb_svar(1);
    if (var) {
        *var = val;
    }
    else {
        special_local_set('~', val);
    }
}

VALUE
rb_lastline_get(void)
{
    VALUE *var = rb_svar(0);
    if (var) {
        return *var;
    }
    return Qnil;
}

void
rb_lastline_set(VALUE val)
{
    VALUE *var = rb_svar(0);
    if (var) {
        *var = val;
    }
    else {
        special_local_set('_', val);
    }
}
#endif /* !RIPPER */

static void
parser_initialize(struct parser_params *parser)
{
    parser->eofp = Qfalse;

    parser->parser_lex_strterm = 0;
    parser->parser_cond_stack = 0;
    parser->parser_cmdarg_stack = 0;
    parser->parser_class_nest = 0;
    parser->parser_paren_nest = 0;
    parser->parser_lpar_beg = 0;
    parser->parser_in_single = 0;
    parser->parser_in_def = 0;
    parser->parser_in_defined = 0;
    parser->parser_compile_for_eval = 0;
    parser->parser_cur_mid = 0;
    parser->parser_tokenbuf = NULL;
    parser->parser_tokidx = 0;
    parser->parser_toksiz = 0;
    parser->parser_heredoc_end = 0;
    parser->parser_command_start = Qtrue;
    parser->parser_lex_pbeg = 0;
    parser->parser_lex_p = 0;
    parser->parser_lex_pend = 0;
    parser->parser_lvtbl = 0;
    parser->parser_ruby__end__seen = 0;
#ifndef RIPPER
    parser->parser_eval_tree_begin = 0;
    parser->parser_eval_tree = 0;
#else
    parser->parser_ruby_sourcefile = Qnil;
    parser->delayed = Qnil;

    parser->result = Qnil;
    parser->parsing_thread = Qnil;
    parser->toplevel_p = Qtrue;
#endif
#ifdef YYMALLOC
    parser->heap = NULL;
#endif
}

static void
parser_mark(void *ptr)
{
    struct parser_params *p = (struct parser_params*)ptr;

    rb_gc_mark((VALUE)p->parser_lex_strterm);
    rb_gc_mark(p->parser_lex_input);
    rb_gc_mark(p->parser_lex_lastline);
#ifndef RIPPER
    rb_gc_mark((VALUE)p->parser_eval_tree_begin) ;
    rb_gc_mark((VALUE)p->parser_eval_tree) ;
    rb_gc_mark(p->debug_lines);
#else
    rb_gc_mark(p->parser_ruby_sourcefile);
    rb_gc_mark(p->delayed);
    rb_gc_mark(p->value);
    rb_gc_mark(p->result);
    rb_gc_mark(p->parsing_thread);
#endif
#ifdef YYMALLOC
    rb_gc_mark((VALUE)p->heap);
#endif
}

static void
parser_free(void *ptr)
{
    struct parser_params *p = (struct parser_params*)ptr;
    struct local_vars *local, *prev;

    if (p->parser_tokenbuf) {
        xfree(p->parser_tokenbuf);
    }
    for (local = p->parser_lvtbl; local; local = prev) {
        if (local->tbl && !local->nofree)
            xfree(local->tbl);
        prev = local->prev;
        xfree(local);
    }
    xfree(p);
}

#ifndef RIPPER
static struct parser_params *
parser_new(void)
{
    struct parser_params *p;

    p = ALLOC_N(struct parser_params, 1);
    MEMZERO(p, struct parser_params, 1);
    parser_initialize(p);
    return p;
}

VALUE
rb_parser_new(void)
{
    struct parser_params *p = parser_new();

    return Data_Wrap_Struct(0, parser_mark, parser_free, p);
}

/*
 *  call-seq:
 *    ripper#end_seen?   -> Boolean
 *
 *  Return if parsed source ended by +\_\_END\_\_+.
 *  This number starts from 1.
 */
VALUE
rb_parser_end_seen_p(VALUE vparser)
{
    struct parser_params *parser;

    Data_Get_Struct(vparser, struct parser_params, parser);
    return ruby__end__seen ? Qtrue : Qfalse;
}

#ifdef YYMALLOC
#define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE))
#define NEWHEAP() rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parserp->heap, 0)
#define ADD2HEAP(n, c, p) ((parserp->heap = (n))->u1.node = (p), \
                           (n)->u3.cnt = (c), (p))

void *
rb_parser_malloc(struct parser_params *parserp, size_t size)
{
    size_t cnt = HEAPCNT(1, size);
    NODE *n = NEWHEAP();
    void *ptr = xmalloc(size);

    return ADD2HEAP(n, cnt, ptr);
}

void *
rb_parser_calloc(struct parser_params *parserp, size_t nelem, size_t size)
{
    size_t cnt = HEAPCNT(nelem, size);
    NODE *n = NEWHEAP();
    void *ptr = xcalloc(nelem, size);

    return ADD2HEAP(n, cnt, ptr);
}

void *
rb_parser_realloc(struct parser_params *parserp, void *ptr, size_t size)
{
    NODE *n;
    size_t cnt = HEAPCNT(1, size);

    if (ptr && (n = parserp->heap) != NULL) {
        do {
            if (n->u1.node == ptr) {
                n->u1.node = ptr = xrealloc(ptr, size);
                if (n->u3.cnt) n->u3.cnt = cnt;
                return ptr;
            }
        } while ((n = n->u2.node) != NULL);
    }
    n = NEWHEAP();
    ptr = xrealloc(ptr, size);
    return ADD2HEAP(n, cnt, ptr);
}

void
rb_parser_free(struct parser_params *parserp, void *ptr)
{
    NODE **prev = &parserp->heap, *n;

    while ((n = *prev) != NULL) {
        if (n->u1.node == ptr) {
            *prev = n->u2.node;
            rb_gc_force_recycle((VALUE)n);
            break;
        }
        prev = &n->u2.node;
    }
    xfree(ptr);
}
#endif
#endif

#ifdef RIPPER
#ifdef RIPPER_DEBUG
extern int rb_is_pointer_to_heap(VALUE);

/* :nodoc: */
static VALUE
ripper_validate_object(VALUE self, VALUE x)
{
    if (x == Qfalse) return x;
    if (x == Qtrue) return x;
    if (x == Qnil) return x;
    if (x == Qundef)
        rb_raise(rb_eArgError, "Qundef given");
    if (FIXNUM_P(x)) return x;
    if (SYMBOL_P(x)) return x;
    if (!rb_is_pointer_to_heap(x))
        rb_raise(rb_eArgError, "invalid pointer: %p", x);
    switch (TYPE(x)) {
      case T_STRING:
      case T_OBJECT:
      case T_ARRAY:
      case T_BIGNUM:
      case T_FLOAT:
        return x;
      case T_NODE:
        rb_raise(rb_eArgError, "NODE given: %p", x);
      default:
        rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)",
                 x, rb_obj_classname(x));
    }
    return x;
}
#endif

#define validate(x)

static VALUE
ripper_dispatch0(struct parser_params *parser, ID mid)
{
    return rb_funcall(parser->value, mid, 0);
}

static VALUE
ripper_dispatch1(struct parser_params *parser, ID mid, VALUE a)
{
    validate(a);
    return rb_funcall(parser->value, mid, 1, a);
}

static VALUE
ripper_dispatch2(struct parser_params *parser, ID mid, VALUE a, VALUE b)
{
    validate(a);
    validate(b);
    return rb_funcall(parser->value, mid, 2, a, b);
}

static VALUE
ripper_dispatch3(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c)
{
    validate(a);
    validate(b);
    validate(c);
    return rb_funcall(parser->value, mid, 3, a, b, c);
}

static VALUE
ripper_dispatch4(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
{
    validate(a);
    validate(b);
    validate(c);
    validate(d);
    return rb_funcall(parser->value, mid, 4, a, b, c, d);
}

static VALUE
ripper_dispatch5(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
{
    validate(a);
    validate(b);
    validate(c);
    validate(d);
    validate(e);
    return rb_funcall(parser->value, mid, 5, a, b, c, d, e);
}

static struct kw_assoc {
    ID id;
    const char *name;
} keyword_to_name[] = {
    {kCLASS,    "class"},
    {kMODULE,   "module"},
    {kDEF,      "def"},
    {kUNDEF,    "undef"},
    {kBEGIN,    "begin"},
    {kRESCUE,   "rescue"},
    {kENSURE,   "ensure"},
    {kEND,      "end"},
    {kIF,       "if"},
    {kUNLESS,   "unless"},
    {kTHEN,     "then"},
    {kELSIF,    "elsif"},
    {kELSE,     "else"},
    {kCASE,     "case"},
    {kWHEN,     "when"},
    {kWHILE,    "while"},
    {kUNTIL,    "until"},
    {kFOR,      "for"},
    {kBREAK,    "break"},
    {kNEXT,     "next"},
    {kREDO,     "redo"},
    {kRETRY,    "retry"},
    {kIN,       "in"},
    {kDO,       "do"},
    {kDO_COND,  "do"},
    {kDO_BLOCK, "do"},
    {kRETURN,   "return"},
    {kYIELD,    "yield"},
    {kSUPER,    "super"},
    {kSELF,     "self"},
    {kNIL,      "nil"},
    {kTRUE,     "true"},
    {kFALSE,    "false"},
    {kAND,      "and"},
    {kOR,       "or"},
    {kNOT,      "not"},
    {kIF_MOD,   "if"},
    {kUNLESS_MOD,       "unless"},
    {kWHILE_MOD,        "while"},
    {kUNTIL_MOD,        "until"},
    {kRESCUE_MOD,       "rescue"},
    {kALIAS,    "alias"},
    {kDEFINED,  "defined"},
    {klBEGIN,   "BEGIN"},
    {klEND,     "END"},
    {k__LINE__, "__LINE__"},
    {k__FILE__, "__FILE__"},
    {0, NULL}
};

static const char*
keyword_id_to_str(ID id)
{
    struct kw_assoc *a;

    for (a = keyword_to_name; a->id; a++) {
        if (a->id == id)
            return a->name;
    }
    return NULL;
}

static VALUE
ripper_id2sym(ID id)
{
    const char *name;
    char buf[8];

    if (id <= 256) {
        buf[0] = id;
        buf[1] = '\0';
        return ID2SYM(rb_intern(buf));
    }
    if ((name = keyword_id_to_str(id))) {
        return ID2SYM(rb_intern(name));
    }
    switch (id) {
    case tOROP:
        name = "||";
        break;
    case tANDOP:
        name = "&&";
        break;
    default:
        name = rb_id2name(id);
        if (!name) {
            rb_bug("cannot convert ID to string: %ld", (unsigned long)id);
        }
        break;
    }
    return ID2SYM(rb_intern(name));
}

static VALUE
ripper_intern(const char *s)
{
    return ID2SYM(rb_intern(s));
}

static void
ripper_compile_error(struct parser_params *parser, const char *fmt, ...)
{
    VALUE str;
    va_list args;

    va_start(args, fmt);
    str = rb_vsprintf(fmt, args);
    va_end(args);
    rb_funcall(parser->value, rb_intern("compile_error"), 1, str);
}

static void
ripper_warn0(struct parser_params *parser, const char *fmt)
{
    rb_funcall(parser->value, rb_intern("warn"), 1, rb_str_new2(fmt));
}

static void
ripper_warnI(struct parser_params *parser, const char *fmt, int a)
{
    rb_funcall(parser->value, rb_intern("warn"), 2,
               rb_str_new2(fmt), INT2NUM(a));
}

static void
ripper_warnS(struct parser_params *parser, const char *fmt, const char *str)
{
    rb_funcall(parser->value, rb_intern("warn"), 2,
               rb_str_new2(fmt), rb_str_new2(str));
}

static void
ripper_warning0(struct parser_params *parser, const char *fmt)
{
    rb_funcall(parser->value, rb_intern("warning"), 1, rb_str_new2(fmt));
}

static void
ripper_warningS(struct parser_params *parser, const char *fmt, const char *str)
{
    rb_funcall(parser->value, rb_intern("warning"), 2,
               rb_str_new2(fmt), rb_str_new2(str));
}

static VALUE
ripper_lex_get_generic(struct parser_params *parser, VALUE src)
{
    return rb_funcall(src, ripper_id_gets, 0);
}

static VALUE
ripper_s_allocate(VALUE klass)
{
    struct parser_params *p;
    VALUE self;

    p = ALLOC_N(struct parser_params, 1);
    MEMZERO(p, struct parser_params, 1);
    self = Data_Wrap_Struct(klass, parser_mark, parser_free, p);
    p->value = self;
    return self;
}

#define ripper_initialized_p(r) ((r)->parser_lex_input != 0)

/*
 *  call-seq:
 *    Ripper.new(src, filename="(ripper)", lineno=1) -> ripper
 *
 *  Create a new Ripper object.
 *  _src_ must be a String, a IO, or an Object which has #gets method.
 *
 *  This method does not starts parsing.
 *  See also Ripper#parse and Ripper.parse.
 */
static VALUE
ripper_initialize(int argc, VALUE *argv, VALUE self)
{
    struct parser_params *parser;
    VALUE src, fname, lineno;

    Data_Get_Struct(self, struct parser_params, parser);
    rb_scan_args(argc, argv, "12", &src, &fname, &lineno);
    if (rb_obj_respond_to(src, ripper_id_gets, 0)) {
        parser->parser_lex_gets = ripper_lex_get_generic;
    }
    else {
        StringValue(src);
        parser->parser_lex_gets = lex_get_str;
    }
    parser->parser_lex_input = src;
    parser->eofp = Qfalse;
    if (NIL_P(fname)) {
        fname = rb_str_new2("(ripper)");
    }
    else {
        StringValue(fname);
    }
    parser_initialize(parser);
    parser->parser_ruby_sourcefile = fname;
    parser->parser_ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1;

    return Qnil;
}

/*
 *  call-seq:
 *    Ripper.yydebug   -> true or false
 *
 *  Get yydebug.
 */
static VALUE
ripper_s_get_yydebug(VALUE self)
{
    return ripper_yydebug ? Qtrue : Qfalse;
}

/*
 *  call-seq:
 *    Ripper.yydebug = flag
 *
 *  Set yydebug.
 */
static VALUE
ripper_s_set_yydebug(VALUE self, VALUE flag)
{
    ripper_yydebug = RTEST(flag);
    return flag;
}

extern VALUE rb_thread_pass(void);

struct ripper_args {
    struct parser_params *parser;
    int argc;
    VALUE *argv;
};

static VALUE
ripper_parse0(VALUE parser_v)
{
    struct parser_params *parser;

    Data_Get_Struct(parser_v, struct parser_params, parser);
    parser_prepare(parser);
    ripper_yyparse((void*)parser);
    return parser->result;
}

static VALUE
ripper_ensure(VALUE parser_v)
{
    struct parser_params *parser;

    Data_Get_Struct(parser_v, struct parser_params, parser);
    parser->parsing_thread = Qnil;
    return Qnil;
}

/*
 *  call-seq:
 *    ripper#parse
 *
 *  Start parsing and returns the value of the root action.
 */
static VALUE
ripper_parse(VALUE self)
{
    struct parser_params *parser;

    Data_Get_Struct(self, struct parser_params, parser);
    if (!ripper_initialized_p(parser)) {
        rb_raise(rb_eArgError, "method called for uninitialized object");
    }
    if (!NIL_P(parser->parsing_thread)) {
        if (parser->parsing_thread == rb_thread_current())
            rb_raise(rb_eArgError, "Ripper#parse is not reentrant");
        else
            rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe");
    }
    parser->parsing_thread = rb_thread_current();
    rb_ensure(ripper_parse0, self, ripper_ensure, self);

    return parser->result;
}

/*
 *  call-seq:
 *    ripper#column   -> Integer
 *
 *  Return column number of current parsing line.
 *  This number starts from 0.
 */
static VALUE
ripper_column(VALUE self)
{
    struct parser_params *parser;
    long col;

    Data_Get_Struct(self, struct parser_params, parser);
    if (!ripper_initialized_p(parser)) {
        rb_raise(rb_eArgError, "method called for uninitialized object");
    }
    if (NIL_P(parser->parsing_thread)) return Qnil;
    col = parser->tokp - parser->parser_lex_pbeg;
    return LONG2NUM(col);
}

/*
 *  call-seq:
 *    ripper#lineno   -> Integer
 *
 *  Return line number of current parsing line.
 *  This number starts from 1.
 */
static VALUE
ripper_lineno(VALUE self)
{
    struct parser_params *parser;

    Data_Get_Struct(self, struct parser_params, parser);
    if (!ripper_initialized_p(parser)) {
        rb_raise(rb_eArgError, "method called for uninitialized object");
    }
    if (NIL_P(parser->parsing_thread)) return Qnil;
    return INT2NUM(parser->parser_ruby_sourceline);
}

#ifdef RIPPER_DEBUG
/* :nodoc: */
static VALUE
ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg)
{
    StringValue(msg);
    if (obj == Qundef) {
        rb_raise(rb_eArgError, RSTRING(msg)->ptr);
    }
    return Qnil;
}

/* :nodoc: */
static VALUE
ripper_value(VALUE self, VALUE obj)
{
    return ULONG2NUM(obj);
}
#endif

void
Init_ripper(void)
{
    VALUE Ripper;

    Ripper = rb_define_class("Ripper", rb_cObject);
    rb_define_const(Ripper, "Version", rb_str_new2(RIPPER_VERSION));
    rb_define_singleton_method(Ripper, "yydebug", ripper_s_get_yydebug, 0);
    rb_define_singleton_method(Ripper, "yydebug=", ripper_s_set_yydebug, 1);
    rb_define_alloc_func(Ripper, ripper_s_allocate);
    rb_define_method(Ripper, "initialize", ripper_initialize, -1);
    rb_define_method(Ripper, "parse", ripper_parse, 0);
    rb_define_method(Ripper, "column", ripper_column, 0);
    rb_define_method(Ripper, "lineno", ripper_lineno, 0);
    rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0);
#ifdef RIPPER_DEBUG
    rb_define_method(rb_mKernel, "assert_Qundef", ripper_assert_Qundef, 2);
    rb_define_method(rb_mKernel, "rawVALUE", ripper_value, 1);
    rb_define_method(rb_mKernel, "validate_object", ripper_validate_object, 1);
#endif

    ripper_id_gets = rb_intern("gets");
    ripper_init_eventids1(Ripper);
    ripper_init_eventids2(Ripper);
    /* ensure existing in symbol table */
    rb_intern("||");
    rb_intern("&&");
}
#endif /* RIPPER */
/* [<][>][^] [v] [top][bottom][index] [help] */


prec.c

root/prec.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. prec_prec
  2. prec_prec_i
  3. prec_prec_f
  4. prec_induced_from
  5. prec_included
  6. Init_Precision
/**********************************************************************

  prec.c -

  $Author: ocean $
  $Date: 2005/09/12 10:44:20 $
  created at: Tue Jan 26 02:40:41 2000

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#include "ruby.h"

VALUE rb_mPrecision;

static ID prc_pr, prc_if;

/*
 *  call-seq:
 *   num.prec(klass)   => a_klass
 *
 *  Converts _self_ into an instance of _klass_. By default,
 *  +prec+ invokes
 *
 *     klass.induced_from(num)
 *
 *  and returns its value. So, if <code>klass.induced_from</code>
 *  doesn't return an instance of _klass_, it will be necessary
 *  to reimplement +prec+.
 */

static VALUE
prec_prec(VALUE x, VALUE klass)
{
    return rb_funcall(klass, prc_if, 1, x);
}

/*
 *  call-seq:
 *    num.prec_i  =>  Integer
 *
 *  Returns an +Integer+ converted from _num_. It is equivalent
 *  to <code>prec(Integer)</code>.
 */

static VALUE
prec_prec_i(VALUE x)
{
    VALUE klass = rb_cInteger;

    return rb_funcall(x, prc_pr, 1, klass);
}

/*
 *  call-seq:
 *    num.prec_f  =>  Integer
 *
 *  Returns an +Float+ converted from _num_. It is equivalent
 *  to <code>prec(Float)</code>.
 */

static VALUE
prec_prec_f(VALUE x)
{
    VALUE klass = rb_cFloat;

    return rb_funcall(x, prc_pr, 1, klass);
}

/*
 * call-seq:
 *   Mod.induced_from(number)  =>  a_mod
 *
 * Creates an instance of mod from. This method is overridden
 * by concrete +Numeric+ classes, so that (for example)
 *
 *   Fixnum.induced_from(9.9)   #=>  9
 *
 * Note that a use of +prec+ in a redefinition may cause
 * an infinite loop.
 */

static VALUE
prec_induced_from(VALUE module, VALUE x)
{
    rb_raise(rb_eTypeError, "undefined conversion from %s into %s",
            rb_obj_classname(x), rb_class2name(module));
    return Qnil;                /* not reached */
}

/*
 * call_seq:
 *   included
 *
 * When the +Precision+ module is mixed-in to a class, this +included+
 * method is used to add our default +induced_from+ implementation
 * to the host class.
 */

static VALUE
prec_included(VALUE module, VALUE include)
{
    switch (TYPE(include)) {
      case T_CLASS:
      case T_MODULE:
       break;
      default:
       Check_Type(include, T_CLASS);
       break;
    }
    rb_define_singleton_method(include, "induced_from", prec_induced_from, 1);
    return module;
}

/*
 * Precision is a mixin for concrete numeric classes with
 * precision.  Here, `precision' means the fineness of approximation
 * of a real number, so, this module should not be included into
 * anything which is not a subset of Real (so it should not be
 * included in classes such as +Complex+ or +Matrix+).
*/

void
Init_Precision(void)
{
    rb_mPrecision = rb_define_module("Precision");
    rb_define_singleton_method(rb_mPrecision, "included", prec_included, 1);
    rb_define_method(rb_mPrecision, "prec", prec_prec, 1);
    rb_define_method(rb_mPrecision, "prec_i", prec_prec_i, 0);
    rb_define_method(rb_mPrecision, "prec_f", prec_prec_f, 0);

    prc_pr = rb_intern("prec");
    prc_if = rb_intern("induced_from");
}
/* [<][>][^] [v] [top][bottom][index] [help] */


process.c

root/process.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. get_pid
  2. get_ppid
  3. last_status_set
  4. pst_to_i
  5. pst_to_s
  6. pst_pid
  7. pst_inspect
  8. pst_equal
  9. pst_bitand
  10. pst_rshift
  11. pst_wifstopped
  12. pst_wstopsig
  13. pst_wifsignaled
  14. pst_wtermsig
  15. pst_wifexited
  16. pst_wexitstatus
  17. pst_success_p
  18. pst_wcoredump
  19. rb_waitpid
  20. wait_each
  21. waitall_each
  22. proc_wait
  23. proc_wait2
  24. proc_waitall
  25. detach_process_watcher
  26. rb_detach_process
  27. proc_detach
  28. security
  29. proc_exec_v
  30. rb_proc_exec_n
  31. rb_proc_exec
  32. proc_spawn_v
  33. proc_spawn_n
  34. proc_spawn
  35. rb_check_argv
  36. rb_f_exec
  37. rb_exec
  38. proc_syswait
  39. rb_fork
  40. rb_f_fork
  41. rb_f_exit_bang
  42. rb_syswait
  43. rb_spawn
  44. rb_f_system
  45. rb_f_spawn
  46. rb_f_sleep
  47. proc_getpgrp
  48. proc_setpgrp
  49. proc_getpgid
  50. proc_setpgid
  51. proc_setsid
  52. proc_getpriority
  53. proc_setpriority
  54. proc_getrlimit
  55. proc_setrlimit
  56. check_uid_switch
  57. check_gid_switch
  58. p_sys_setuid
  59. p_sys_setruid
  60. p_sys_seteuid
  61. p_sys_setreuid
  62. p_sys_setresuid
  63. proc_getuid
  64. proc_setuid
  65. p_uid_change_privilege
  66. p_sys_setgid
  67. p_sys_setrgid
  68. p_sys_setegid
  69. p_sys_setregid
  70. p_sys_setresgid
  71. p_sys_issetugid
  72. proc_getgid
  73. proc_setgid
  74. proc_getgroups
  75. proc_setgroups
  76. proc_initgroups
  77. proc_getmaxgroups
  78. proc_setmaxgroups
  79. proc_daemon
  80. p_gid_change_privilege
  81. proc_geteuid
  82. proc_seteuid
  83. rb_seteuid_core
  84. p_uid_grant_privilege
  85. proc_getegid
  86. proc_setegid
  87. rb_setegid_core
  88. p_gid_grant_privilege
  89. p_uid_exchangeable
  90. p_uid_exchange
  91. p_gid_exchangeable
  92. p_gid_exchange
  93. p_uid_have_saved_id
  94. p_uid_sw_ensure
  95. p_uid_switch
  96. p_uid_sw_ensure
  97. p_uid_switch
  98. p_gid_have_saved_id
  99. p_gid_sw_ensure
  100. p_gid_switch
  101. p_gid_sw_ensure
  102. p_gid_switch
  103. rb_proc_times
  104. Init_process
/**********************************************************************

  process.c -

  $Author: aamine $
  $Date: 2005/12/27 05:10:38 $
  created at: Tue Aug 10 14:30:50 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto
  Copyright (C) 2000  Network Applied Communication Laboratory, Inc.
  Copyright (C) 2000  Information-technology Promotion Agency, Japan

**********************************************************************/

#include "ruby.h"
#include "rubysig.h"
#include <stdio.h>
#include <errno.h>
#include <signal.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#ifdef __DJGPP__
#include <process.h>
#endif

#include <time.h>
#include <ctype.h>

#ifndef EXIT_SUCCESS
#define EXIT_SUCCESS 0
#endif
#ifndef EXIT_FAILURE
#define EXIT_FAILURE 1
#endif

struct timeval rb_time_interval(VALUE);

#ifdef HAVE_SYS_WAIT_H
# include <sys/wait.h>
#endif
#ifdef HAVE_SYS_RESOURCE_H
# include <sys/resource.h>
#endif
#include "st.h"

#ifdef __EMX__
#undef HAVE_GETPGRP
#endif

#ifdef HAVE_SYS_TIMES_H
#include <sys/times.h>
#endif

#ifdef HAVE_GRP_H
#include <grp.h>
#endif

#if defined(HAVE_TIMES) || defined(_WIN32)
static VALUE S_Tms;
#endif

#ifndef WIFEXITED
#define WIFEXITED(w)    (((w) & 0xff) == 0)
#endif
#ifndef WIFSIGNALED
#define WIFSIGNALED(w)  (((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f))
#endif
#ifndef WIFSTOPPED
#define WIFSTOPPED(w)   (((w) & 0xff) == 0x7f)
#endif
#ifndef WEXITSTATUS
#define WEXITSTATUS(w)  (((w) >> 8) & 0xff)
#endif
#ifndef WTERMSIG
#define WTERMSIG(w)     ((w) & 0x7f)
#endif
#ifndef WSTOPSIG
#define WSTOPSIG        WEXITSTATUS
#endif

#if defined(__APPLE__) && ( defined(__MACH__) || defined(__DARWIN__) ) && !defined(__MacOS_X__)
#define __MacOS_X__ 1
#endif

#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__)
#define HAVE_44BSD_SETUID 1
#define HAVE_44BSD_SETGID 1
#endif

#ifdef __NetBSD__
#undef HAVE_SETRUID
#undef HAVE_SETRGID
#endif

#if defined(__MacOS_X__) || defined(__bsdi__)
#define BROKEN_SETREUID 1
#define BROKEN_SETREGID 1
#endif

#if defined(HAVE_44BSD_SETUID) || defined(__MacOS_X__)
#if !defined(USE_SETREUID) && !defined(BROKEN_SETREUID)
#define OBSOLETE_SETREUID 1
#endif
#if !defined(USE_SETREGID) && !defined(BROKEN_SETREGID)
#define OBSOLETE_SETREGID 1
#endif
#endif

#define preserving_errno(stmts) \
        do {int saved_errno = errno; stmts; errno = saved_errno;} while (0)

/*
 *  call-seq:
 *     Process.pid   => fixnum
 *
 *  Returns the process id of this process. Not available on all
 *  platforms.
 *
 *     Process.pid   #=> 27415
 */

static VALUE
get_pid(void)
{
    rb_secure(2);
    return INT2FIX(getpid());
}

/*
 *  call-seq:
 *     Process.ppid   => fixnum
 *
 *  Returns the process id of the parent of this process. Always
 *  returns 0 on NT. Not available on all platforms.
 *
 *     puts "I am #{Process.pid}"
 *     Process.fork { puts "Dad is #{Process.ppid}" }
 *
 *  <em>produces:</em>
 *
 *     I am 27417
 *     Dad is 27417
 */

static VALUE
get_ppid(void)
{
  rb_secure(2);
#ifdef _WIN32
    return INT2FIX(0);
#else
    return INT2FIX(getppid());
#endif
}

/*********************************************************************
 *
 * Document-class: Process::Status
 *
 *  <code>Process::Status</code> encapsulates the information on the
 *  status of a running or terminated system process. The built-in
 *  variable <code>$?</code> is either +nil+ or a
 *  <code>Process::Status</code> object.
 *
 *     fork { exit 99 }   #=> 26557
 *     Process.wait       #=> 26557
 *     $?.class           #=> Process::Status
 *     $?.to_i            #=> 25344
 *     $? >> 8            #=> 99
 *     $?.stopped?        #=> false
 *     $?.exited?         #=> true
 *     $?.exitstatus      #=> 99
 *
 *  Posix systems record information on processes using a 16-bit
 *  integer.  The lower bits record the process status (stopped,
 *  exited, signaled) and the upper bits possibly contain additional
 *  information (for example the program's return code in the case of
 *  exited processes). Pre Ruby 1.8, these bits were exposed directly
 *  to the Ruby program. Ruby now encapsulates these in a
 *  <code>Process::Status</code> object. To maximize compatibility,
 *  however, these objects retain a bit-oriented interface. In the
 *  descriptions that follow, when we talk about the integer value of
 *  _stat_, we're referring to this 16 bit value.
 */

static VALUE rb_cProcStatus;
VALUE rb_last_status = Qnil;

static void
last_status_set(int status, int pid)
{
    rb_last_status = rb_obj_alloc(rb_cProcStatus);
    rb_iv_set(rb_last_status, "status", INT2FIX(status));
    rb_iv_set(rb_last_status, "pid", INT2FIX(pid));
}

/*
 *  call-seq:
 *     stat.to_i     => fixnum
 *     stat.to_int   => fixnum
 *
 *  Returns the bits in _stat_ as a <code>Fixnum</code>. Poking
 *  around in these bits is platform dependent.
 *
 *     fork { exit 0xab }         #=> 26566
 *     Process.wait               #=> 26566
 *     sprintf('%04x', $?.to_i)   #=> "ab00"
 */

static VALUE
pst_to_i(VALUE st)
{
    return rb_iv_get(st, "status");
}

/*
 *  call-seq:
 *     stat.to_s   => string
 *
 *  Equivalent to _stat_<code>.to_i.to_s</code>.
 */

static VALUE
pst_to_s(VALUE st)
{
    return rb_fix2str(pst_to_i(st), 10);
}

/*
 *  call-seq:
 *     stat.pid   => fixnum
 *
 *  Returns the process ID that this status object represents.
 *
 *     fork { exit }   #=> 26569
 *     Process.wait    #=> 26569
 *     $?.pid          #=> 26569
 */

static VALUE
pst_pid(VALUE st)
{
    return rb_iv_get(st, "pid");
}

/*
 *  call-seq:
 *     stat.inspect   => string
 *
 *  Override the inspection method.
 */

static VALUE
pst_inspect(VALUE st)
{
    VALUE pid;
    int status;
    VALUE str;
    char buf[256];

    pid = pst_pid(st);
    status = NUM2INT(st);

    str = rb_sprintf("#<%s: pid=%ld", rb_class2name(CLASS_OF(st)), NUM2LONG(pid));
    if (WIFSTOPPED(status)) {
        int stopsig = WSTOPSIG(status);
        const char *signame = ruby_signal_name(stopsig);
        if (signame) {
            snprintf(buf, sizeof(buf), ",stopped(SIG%s=%d)", signame, stopsig);
        }
        else {
            snprintf(buf, sizeof(buf), ",stopped(%d)", stopsig);
        }
        rb_str_cat2(str, buf);
    }
    if (WIFSIGNALED(status)) {
        int termsig = WTERMSIG(status);
        const char *signame = ruby_signal_name(termsig);
        if (signame) {
            snprintf(buf, sizeof(buf), ",signaled(SIG%s=%d)", signame, termsig);
        }
        else {
            snprintf(buf, sizeof(buf), ",signaled(%d)", termsig);
        }
        rb_str_cat2(str, buf);
    }
    if (WIFEXITED(status)) {
        snprintf(buf, sizeof(buf), ",exited(%d)", WEXITSTATUS(status));
        rb_str_cat2(str, buf);
    }
#ifdef WCOREDUMP
    if (WCOREDUMP(status)) {
        rb_str_cat2(str, ",coredumped");
    }
#endif
    rb_str_cat2(str, ">");
    return str;
}

/*
 *  call-seq:
 *     stat == other   => true or false
 *
 *  Returns +true+ if the integer value of _stat_
 *  equals <em>other</em>.
 */

static VALUE
pst_equal(VALUE st1, VALUE st2)
{
    if (st1 == st2) return Qtrue;
    return rb_equal(pst_to_i(st1), st2);
}

/*
 *  call-seq:
 *     stat & num   => fixnum
 *
 *  Logical AND of the bits in _stat_ with <em>num</em>.
 *
 *     fork { exit 0x37 }
 *     Process.wait
 *     sprintf('%04x', $?.to_i)       #=> "3700"
 *     sprintf('%04x', $? & 0x1e00)   #=> "1600"
 */

static VALUE
pst_bitand(VALUE st1, VALUE st2)
{
    int status = NUM2INT(st1) & NUM2INT(st2);

    return INT2NUM(status);
}

/*
 *  call-seq:
 *     stat >> num   => fixnum
 *
 *  Shift the bits in _stat_ right <em>num</em> places.
 *
 *     fork { exit 99 }   #=> 26563
 *     Process.wait       #=> 26563
 *     $?.to_i            #=> 25344
 *     $? >> 8            #=> 99
 */

static VALUE
pst_rshift(VALUE st1, VALUE st2)
{
    int status = NUM2INT(st1) >> NUM2INT(st2);

    return INT2NUM(status);
}

/*
 *  call-seq:
 *     stat.stopped?   => true or false
 *
 *  Returns +true+ if this process is stopped. This is only
 *  returned if the corresponding <code>wait</code> call had the
 *  <code>WUNTRACED</code> flag set.
 */

static VALUE
pst_wifstopped(VALUE st)
{
    int status = NUM2INT(st);

    if (WIFSTOPPED(status))
        return Qtrue;
    else
        return Qfalse;
}

/*
 *  call-seq:
 *     stat.stopsig   => fixnum or nil
 *
 *  Returns the number of the signal that caused _stat_ to stop
 *  (or +nil+ if self is not stopped).
 */

static VALUE
pst_wstopsig(VALUE st)
{
    int status = NUM2INT(st);

    if (WIFSTOPPED(status))
        return INT2NUM(WSTOPSIG(status));
    return Qnil;
}

/*
 *  call-seq:
 *     stat.signaled?   => true or false
 *
 *  Returns +true+ if _stat_ terminated because of
 *  an uncaught signal.
 */

static VALUE
pst_wifsignaled(VALUE st)
{
    int status = NUM2INT(st);

    if (WIFSIGNALED(status))
        return Qtrue;
    else
        return Qfalse;
}

/*
 *  call-seq:
 *     stat.termsig   => fixnum or nil
 *
 *  Returns the number of the signal that caused _stat_ to
 *  terminate (or +nil+ if self was not terminated by an
 *  uncaught signal).
 */

static VALUE
pst_wtermsig(VALUE st)
{
    int status = NUM2INT(st);

    if (WIFSIGNALED(status))
        return INT2NUM(WTERMSIG(status));
    return Qnil;
}

/*
 *  call-seq:
 *     stat.exited?   => true or false
 *
 *  Returns +true+ if _stat_ exited normally (for
 *  example using an <code>exit()</code> call or finishing the
 *  program).
 */

static VALUE
pst_wifexited(VALUE st)
{
    int status = NUM2INT(st);

    if (WIFEXITED(status))
        return Qtrue;
    else
        return Qfalse;
}

/*
 *  call-seq:
 *     stat.exitstatus   => fixnum or nil
 *
 *  Returns the least significant eight bits of the return code of
 *  _stat_. Only available if <code>exited?</code> is
 *  +true+.
 *
 *     fork { }           #=> 26572
 *     Process.wait       #=> 26572
 *     $?.exited?         #=> true
 *     $?.exitstatus      #=> 0
 *
 *     fork { exit 99 }   #=> 26573
 *     Process.wait       #=> 26573
 *     $?.exited?         #=> true
 *     $?.exitstatus      #=> 99
 */

static VALUE
pst_wexitstatus(VALUE st)
{
    int status = NUM2INT(st);

    if (WIFEXITED(status))
        return INT2NUM(WEXITSTATUS(status));
    return Qnil;
}

/*
 *  call-seq:
 *     stat.success?   => true, false or nil
 *
 *  Returns +true+ if _stat_ is successful, +false+ if not.
 *  Returns +nil+ if <code>exited?</code> is not +true+.
 */

static VALUE
pst_success_p(VALUE st)
{
    int status = NUM2INT(st);

    if (!WIFEXITED(status))
        return Qnil;
    return WEXITSTATUS(status) == EXIT_SUCCESS ? Qtrue : Qfalse;
}

/*
 *  call-seq:
 *     stat.coredump?   => true or false
 *
 *  Returns +true+ if _stat_ generated a coredump
 *  when it terminated. Not available on all platforms.
 */

static VALUE
pst_wcoredump(VALUE st)
{
#ifdef WCOREDUMP
    int status = NUM2INT(st);

    if (WCOREDUMP(status))
        return Qtrue;
    else
        return Qfalse;
#else
    return Qfalse;
#endif
}

#if !defined(HAVE_WAITPID) && !defined(HAVE_WAIT4)
#define NO_WAITPID
static st_table *pid_tbl;
#endif

int
rb_waitpid(int pid, int *st, int flags)
{
    int result;
#ifndef NO_WAITPID
    int oflags = flags;
    if (!rb_thread_alone()) {   /* there're other threads to run */
        flags |= WNOHANG;
    }

  retry:
    TRAP_BEG;
#ifdef HAVE_WAITPID
    result = waitpid(pid, st, flags);
#else  /* HAVE_WAIT4 */
    result = wait4(pid, st, flags, NULL);
#endif
    TRAP_END;
    if (result < 0) {
        if (errno == EINTR) {
            rb_thread_polling();
            goto retry;
        }
        return -1;
    }
    if (result == 0) {
        if (oflags & WNOHANG) return 0;
        rb_thread_polling();
        if (rb_thread_alone()) flags = oflags;
        goto retry;
    }
#else  /* NO_WAITPID */
    if (pid_tbl && st_lookup(pid_tbl, pid, (st_data_t *)st)) {
        last_status_set(*st, pid);
        st_delete(pid_tbl, (st_data_t*)&pid, NULL);
        return pid;
    }

    if (flags) {
        rb_raise(rb_eArgError, "can't do waitpid with flags");
    }

    for (;;) {
        TRAP_BEG;
        result = wait(st);
        TRAP_END;
        if (result < 0) {
            if (errno == EINTR) {
                rb_thread_schedule();
                continue;
            }
            return -1;
        }
        if (result == pid) {
            break;
        }
        if (!pid_tbl)
            pid_tbl = st_init_numtable();
        st_insert(pid_tbl, pid, (st_data_t)st);
        if (!rb_thread_alone()) rb_thread_schedule();
    }
#endif
    if (result > 0) {
        last_status_set(*st, result);
    }
    return result;
}

#ifdef NO_WAITPID
struct wait_data {
    int pid;
    int status;
};

static int
wait_each(pid, status, data)
    int pid, status;
    struct wait_data *data;
{
    if (data->status != -1) return ST_STOP;

    data->pid = pid;
    data->status = status;
    return ST_DELETE;
}

static int
waitall_each(pid, status, ary)
    int pid, status;
    VALUE ary;
{
    last_status_set(status, pid);
    rb_ary_push(ary, rb_assoc_new(INT2NUM(pid), rb_last_status));
    return ST_DELETE;
}
#endif

/* [MG]:FIXME: I wasn't sure how this should be done, since ::wait()
   has historically been documented as if it didn't take any arguments
   despite the fact that it's just an alias for ::waitpid(). The way I
   have it below is more truthful, but a little confusing.

   I also took the liberty of putting in the pid values, as they're
   pretty useful, and it looked as if the original 'ri' output was
   supposed to contain them after "[...]depending on the value of
   aPid:".

   The 'ansi' and 'bs' formats of the ri output don't display the
   definition list for some reason, but the plain text one does.
 */

/*
 *  call-seq:
 *     Process.wait()                     => fixnum
 *     Process.wait(pid=-1, flags=0)      => fixnum
 *     Process.waitpid(pid=-1, flags=0)   => fixnum
 *
 *  Waits for a child process to exit, returns its process id, and
 *  sets <code>$?</code> to a <code>Process::Status</code> object
 *  containing information on that process. Which child it waits on
 *  depends on the value of _pid_:
 *
 *  > 0::   Waits for the child whose process ID equals _pid_.
 *
 *  0::     Waits for any child whose process group ID equals that of the
 *          calling process.
 *
 *  -1::    Waits for any child process (the default if no _pid_ is
 *          given).
 *
 *  < -1::  Waits for any child whose process group ID equals the absolute
 *          value of _pid_.
 *
 *  The _flags_ argument may be a logical or of the flag values
 *  <code>Process::WNOHANG</code> (do not block if no child available)
 *  or <code>Process::WUNTRACED</code> (return stopped children that
 *  haven't been reported). Not all flags are available on all
 *  platforms, but a flag value of zero will work on all platforms.
 *
 *  Calling this method raises a <code>SystemError</code> if there are
 *  no child processes. Not available on all platforms.
 *
 *     include Process
 *     fork { exit 99 }                 #=> 27429
 *     wait                             #=> 27429
 *     $?.exitstatus                    #=> 99
 *
 *     pid = fork { sleep 3 }           #=> 27440
 *     Time.now                         #=> Wed Apr 09 08:57:09 CDT 2003
 *     waitpid(pid, Process::WNOHANG)   #=> nil
 *     Time.now                         #=> Wed Apr 09 08:57:09 CDT 2003
 *     waitpid(pid, 0)                  #=> 27440
 *     Time.now                         #=> Wed Apr 09 08:57:12 CDT 2003
 */

static VALUE
proc_wait(int argc, VALUE *argv)
{
    VALUE vpid, vflags;
    int pid, flags, status;

    rb_secure(2);
    flags = 0;
    rb_scan_args(argc, argv, "02", &vpid, &vflags);
    if (argc == 0) {
        pid = -1;
    }
    else {
        pid = NUM2INT(vpid);
        if (argc == 2 && !NIL_P(vflags)) {
            flags = NUM2UINT(vflags);
        }
    }
    if ((pid = rb_waitpid(pid, &status, flags)) < 0)
        rb_sys_fail(0);
    if (pid == 0) {
        return rb_last_status = Qnil;
    }
    return INT2FIX(pid);
}

/*
 *  call-seq:
 *     Process.wait2(pid=-1, flags=0)      => [pid, status]
 *     Process.waitpid2(pid=-1, flags=0)   => [pid, status]
 *
 *  Waits for a child process to exit (see Process::waitpid for exact
 *  semantics) and returns an array containing the process id and the
 *  exit status (a <code>Process::Status</code> object) of that
 *  child. Raises a <code>SystemError</code> if there are no child
 *  processes.
 *
 *     Process.fork { exit 99 }   #=> 27437
 *     pid, status = Process.wait2
 *     pid                        #=> 27437
 *     status.exitstatus          #=> 99
 */

static VALUE
proc_wait2(int argc, VALUE *argv)
{
    VALUE pid = proc_wait(argc, argv);
    if (NIL_P(pid)) return Qnil;
    return rb_assoc_new(pid, rb_last_status);
}

/*
 *  call-seq:
 *     Process.waitall   => [ [pid1,status1], ...]
 *
 *  Waits for all children, returning an array of
 *  _pid_/_status_ pairs (where _status_ is a
 *  <code>Process::Status</code> object).
 *
 *     fork { sleep 0.2; exit 2 }   #=> 27432
 *     fork { sleep 0.1; exit 1 }   #=> 27433
 *     fork {            exit 0 }   #=> 27434
 *     p Process.waitall
 *
 *  <em>produces</em>:
 *
 *     [[27434, #<Process::Status: pid=27434,exited(0)>],
 *      [27433, #<Process::Status: pid=27433,exited(1)>],
 *      [27432, #<Process::Status: pid=27432,exited(2)>]]
 */

static VALUE
proc_waitall(void)
{
    VALUE result;
    int pid, status;

    rb_secure(2);
    result = rb_ary_new();
#ifdef NO_WAITPID
    if (pid_tbl) {
        st_foreach(pid_tbl, waitall_each, result);
    }

    for (pid = -1;;) {
        pid = wait(&status);
        if (pid == -1) {
            if (errno == ECHILD)
                break;
            if (errno == EINTR) {
                rb_thread_schedule();
                continue;
            }
            rb_sys_fail(0);
        }
        last_status_set(status, pid);
        rb_ary_push(result, rb_assoc_new(INT2NUM(pid), rb_last_status));
    }
#else
    rb_last_status = Qnil;
    for (pid = -1;;) {
        pid = rb_waitpid(-1, &status, 0);
        if (pid == -1) {
            if (errno == ECHILD)
                break;
            rb_sys_fail(0);
        }
        rb_ary_push(result, rb_assoc_new(INT2NUM(pid), rb_last_status));
    }
#endif
    return result;
}

static VALUE
detach_process_watcher(int *pid_p)
{
    int cpid, status;

    for (;;) {
        cpid = rb_waitpid(*pid_p, &status, WNOHANG);
        if (cpid != 0) return rb_last_status;
        rb_thread_sleep(1);
    }
}

VALUE
rb_detach_process(int pid)
{
    return rb_thread_create(detach_process_watcher, (void*)&pid);
}

/*
 *  call-seq:
 *     Process.detach(pid)   => thread
 *
 *  Some operating systems retain the status of terminated child
 *  processes until the parent collects that status (normally using
 *  some variant of <code>wait()</code>. If the parent never collects
 *  this status, the child stays around as a <em>zombie</em> process.
 *  <code>Process::detach</code> prevents this by setting up a
 *  separate Ruby thread whose sole job is to reap the status of the
 *  process _pid_ when it terminates. Use <code>detach</code>
 *  only when you do not intent to explicitly wait for the child to
 *  terminate.  <code>detach</code> only checks the status
 *  periodically (currently once each second).
 *
 *  The waiting thread returns the exit status of the detached process
 *  when it terminates, so you can use <code>Thread#join</code> to
 *  know the result.  If specified _pid_ is not a valid child process
 *  ID, the thread returns +nil+ immediately.
 *
 *  In this first example, we don't reap the first child process, so
 *  it appears as a zombie in the process status display.
 *
 *     p1 = fork { sleep 0.1 }
 *     p2 = fork { sleep 0.2 }
 *     Process.waitpid(p2)
 *     sleep 2
 *     system("ps -ho pid,state -p #{p1}")
 *
 *  <em>produces:</em>
 *
 *     27389 Z
 *
 *  In the next example, <code>Process::detach</code> is used to reap
 *  the child automatically.
 *
 *     p1 = fork { sleep 0.1 }
 *     p2 = fork { sleep 0.2 }
 *     Process.detach(p1)
 *     Process.waitpid(p2)
 *     sleep 2
 *     system("ps -ho pid,state -p #{p1}")
 *
 *  <em>(produces no output)</em>
 */

static VALUE
proc_detach(VALUE obj, VALUE pid)
{
    rb_secure(2);
    return rb_detach_process(NUM2INT(pid));
}

#ifndef HAVE_STRING_H
char *strtok();
#endif

#ifdef HAVE_SETITIMER
#define before_exec() rb_thread_stop_timer()
#define after_exec() rb_thread_start_timer()
#else
#define before_exec()
#define after_exec()
#endif

extern char *dln_find_exe(const char *fname, const char *path);

static void
security(const char *str)
{
    if (rb_env_path_tainted()) {
        if (rb_safe_level() > 0) {
            rb_raise(rb_eSecurityError, "Insecure PATH - %s", str);
        }
    }
}

static int
proc_exec_v(char **argv, const char *prog)
{
    if (!prog)
        prog = argv[0];
    security(prog);
    prog = dln_find_exe(prog, 0);
    if (!prog) {
        errno = ENOENT;
        return -1;
    }

#if (defined(MSDOS) && !defined(DJGPP)) || defined(__human68k__) || defined(__EMX__) || defined(OS2)
    {
#if defined(__human68k__)
#define COMMAND "command.x"
#endif
#if defined(__EMX__) || defined(OS2) /* OS/2 emx */
#define COMMAND "cmd.exe"
#endif
#if (defined(MSDOS) && !defined(DJGPP))
#define COMMAND "command.com"
#endif
        char *extension;

        if ((extension = strrchr(prog, '.')) != NULL && strcasecmp(extension, ".bat") == 0) {
            char **new_argv;
            char *p;
            int n;

            for (n = 0; argv[n]; n++)
                /* no-op */;
            new_argv = ALLOCA_N(char*, n + 2);
            for (; n > 0; n--)
                new_argv[n + 1] = argv[n];
            new_argv[1] = strcpy(ALLOCA_N(char, strlen(argv[0]) + 1), argv[0]);
            for (p = new_argv[1]; *p != '\0'; p++)
                if (*p == '/')
                    *p = '\\';
            new_argv[0] = COMMAND;
            argv = new_argv;
            prog = dln_find_exe(argv[0], 0);
            if (!prog) {
                errno = ENOENT;
                return -1;
            }
        }
    }
#endif /* MSDOS or __human68k__ or __EMX__ */
    before_exec();
    execv(prog, argv);
    preserving_errno(after_exec());
    return -1;
}

int
rb_proc_exec_n(int argc, VALUE *argv, const char *prog)
{
    char **args;
    int i;

    args = ALLOCA_N(char*, argc+1);
    for (i=0; i<argc; i++) {
        args[i] = RSTRING(argv[i])->ptr;
    }
    args[i] = 0;
    if (args[0]) {
        return proc_exec_v(args, prog);
    }
    return -1;
}

int
rb_proc_exec(const char *str)
{
    const char *s = str;
    char *ss, *t;
    char **argv, **a;

    while (*str && ISSPACE(*str))
        str++;

#ifdef _WIN32
    before_exec();
    rb_w32_spawn(P_OVERLAY, (char *)str, 0);
    after_exec();
#else
    for (s=str; *s; s++) {
        if (ISSPACE(*s)) {
            const char *p, *nl = NULL;
            for (p = s; ISSPACE(*p); p++) {
                if (*p == '\n') nl = p;
            }
            if (!*p) break;
            if (nl) s = nl;
        }
        if (*s != ' ' && !ISALPHA(*s) && strchr("*?{}[]<>()~&|\\$;'`\"\n",*s)) {
#if defined(MSDOS)
            int status;
            before_exec();
            status = system(str);
            after_exec();
            if (status != -1)
                exit(status);
#elif defined(__human68k__) || defined(__CYGWIN32__) || defined(__EMX__)
            char *shell = dln_find_exe("sh", 0);
            int status = -1;
            before_exec();
            if (shell)
                execl(shell, "sh", "-c", str, (char *) NULL);
            else
                status = system(str);
            after_exec();
            if (status != -1)
                exit(status);
#else
            before_exec();
            execl("/bin/sh", "sh", "-c", str, (char *)NULL);
            preserving_errno(after_exec());
#endif
            return -1;
        }
    }
    a = argv = ALLOCA_N(char*, (s-str)/2+2);
    ss = ALLOCA_N(char, s-str+1);
    memcpy(ss, str, s-str);
    ss[s-str] = '\0';
    if (*a++ = strtok(ss, " \t")) {
        while (t = strtok(NULL, " \t")) {
            *a++ = t;
        }
        *a = NULL;
    }
    if (argv[0]) {
        return proc_exec_v(argv, 0);
    }
    errno = ENOENT;
#endif  /* _WIN32 */
    return -1;
}

#if defined(_WIN32)
#define HAVE_SPAWNV 1
#endif

#if !defined(HAVE_FORK) && defined(HAVE_SPAWNV)
#if defined(_WIN32)
#define proc_spawn_v(argv, prog) rb_w32_aspawn(P_NOWAIT, prog, argv)
#else
static int
proc_spawn_v(argv, prog)
    char **argv;
    char *prog;
{
    char *extension;
    int status;

    if (!prog)
        prog = argv[0];
    security(prog);
    prog = dln_find_exe(prog, 0);
    if (!prog)
        return -1;

#if defined(__human68k__)
    if ((extension = strrchr(prog, '.')) != NULL && strcasecmp(extension, ".bat") == 0) {
        char **new_argv;
        char *p;
        int n;

        for (n = 0; argv[n]; n++)
            /* no-op */;
        new_argv = ALLOCA_N(char*, n + 2);
        for (; n > 0; n--)
            new_argv[n + 1] = argv[n];
        new_argv[1] = strcpy(ALLOCA_N(char, strlen(argv[0]) + 1), argv[0]);
        for (p = new_argv[1]; *p != '\0'; p++)
            if (*p == '/')
                *p = '\\';
        new_argv[0] = COMMAND;
        argv = new_argv;
        prog = dln_find_exe(argv[0], 0);
        if (!prog) {
            errno = ENOENT;
            return -1;
        }
    }
#endif
    before_exec();
    status = spawnv(P_WAIT, prog, argv);
    last_status_set(status == -1 ? 127 : status, 0);
    after_exec();
    return status;
}
#endif

static int
proc_spawn_n(int argc, VALUE *argv, VALUE prog)
{
    char **args;
    int i;

    args = ALLOCA_N(char*, argc + 1);
    for (i = 0; i < argc; i++) {
        args[i] = RSTRING(argv[i])->ptr;
    }
    args[i] = (char*) 0;
    if (args[0])
        return proc_spawn_v(args, prog ? RSTRING(prog)->ptr : 0);
    return -1;
}

#if defined(_WIN32)
#define proc_spawn(str) rb_w32_spawn(P_NOWAIT, str, 0)
#else
static int
proc_spawn(str)
    char *str;
{
    char *s, *t;
    char **argv, **a;
    int status;

    for (s = str; *s; s++) {
        if (*s != ' ' && !ISALPHA(*s) && strchr("*?{}[]<>()~&|\\$;'`\"\n",*s)) {
            char *shell = dln_find_exe("sh", 0);
            before_exec();
            status = shell?spawnl(P_WAIT,shell,"sh","-c",str,(char*)NULL):system(str);
            last_status_set(status == -1 ? 127 : status, 0);
            after_exec();
            return status;
        }
    }
    a = argv = ALLOCA_N(char*, (s - str) / 2 + 2);
    s = ALLOCA_N(char, s - str + 1);
    strcpy(s, str);
    if (*a++ = strtok(s, " \t")) {
        while (t = strtok(NULL, " \t"))
            *a++ = t;
        *a = NULL;
    }
    return argv[0] ? proc_spawn_v(argv, 0) : -1;
}
#endif
#endif

VALUE
rb_check_argv(int argc, VALUE *argv)
{
    VALUE tmp, prog;
    int i;

    if (argc == 0) {
        rb_raise(rb_eArgError, "wrong number of arguments");
    }

    prog = 0;
    tmp = rb_check_array_type(argv[0]);
    if (!NIL_P(tmp)) {
        if (RARRAY(tmp)->len != 2) {
            rb_raise(rb_eArgError, "wrong first argument");
        }
        prog = RARRAY(tmp)->ptr[0];
        argv[0] = RARRAY(tmp)->ptr[1];
        SafeStringValue(prog);
    }
    for (i = 0; i < argc; i++) {
        SafeStringValue(argv[i]);
    }
    security(RSTRING(prog ? prog : argv[0])->ptr);
    return prog;
}

/*
 *  call-seq:
 *     exec(command [, arg, ...])
 *
 *  Replaces the current process by running the given external _command_.
 *  If +exec+ is given a single argument, that argument is
 *  taken as a line that is subject to shell expansion before being
 *  executed. If multiple arguments are given, the second and subsequent
 *  arguments are passed as parameters to _command_ with no shell
 *  expansion. If the first argument is a two-element array, the first
 *  element is the command to be executed, and the second argument is
 *  used as the <code>argv[0]</code> value, which may show up in process
 *  listings. In MSDOS environments, the command is executed in a
 *  subshell; otherwise, one of the <code>exec(2)</code> system calls is
 *  used, so the running command may inherit some of the environment of
 *  the original program (including open file descriptors).
 *
 *  Raises SystemCallError if the _command_ couldn't execute (typically
 *  <code>Errno::ENOENT</code> when it was not found).
 *
 *     exec "echo *"       # echoes list of files in current directory
 *     # never get here
 *
 *
 *     exec "echo", "*"    # echoes an asterisk
 *     # never get here
 */

VALUE
rb_f_exec(int argc, VALUE *argv)
{
    struct rb_exec_arg e;
    VALUE prog;

    prog = rb_check_argv(argc, argv);
    if (!prog && argc == 1) {
        e.argc = 0;
        e.argv = 0;
        e.prog = RSTRING(argv[0])->ptr;
    }
    else {
        e.argc = argc;
        e.argv = argv;
        e.prog = prog ? RSTRING(prog)->ptr : 0;
    }
    rb_exec(&e);
    rb_sys_fail(e.prog);
    return Qnil;                /* dummy */
}

int
rb_exec(const struct rb_exec_arg *e)
{
    int argc = e->argc;
    VALUE *argv = e->argv;
    const char *prog = e->prog;

    if (argc == 0) {
        rb_proc_exec(prog);
    }
    else {
        rb_proc_exec_n(argc, argv, prog);
    }
#ifndef FD_CLOEXEC
    preserving_errno({
        fprintf(stderr, "%s:%d: command not found: %s\n",
                ruby_sourcefile, ruby_sourceline, prog);
    });
#endif
    return -1;
}

#ifdef HAVE_FORK
#ifdef FD_CLOEXEC
#if SIZEOF_INT == SIZEOF_LONG
#define proc_syswait (VALUE (*)(VALUE))rb_syswait
#else
static VALUE
proc_syswait(pid)
    VALUE pid;
{
    rb_syswait((int)pid);
    return Qnil;
}
#endif
#endif

/*
 * Forks child process, and returns the process ID in the parent
 * process.
 *
 * If +status+ is given, protects from any exceptions and sets the
 * jump status to it.
 *
 * In the child process, just returns 0 if +chfunc+ is +NULL+.
 * Otherwise +chfunc+ will be called with +charg+, and then the child
 * process exits with +EXIT_SUCCESS+ when it returned zero.
 *
 * In the case of the function is called and returns non-zero value,
 * the child process exits with non-+EXIT_SUCCESS+ value (normaly
 * 127).  And, on the platforms where +FD_CLOEXEC+ is available,
 * +errno+ is propagated to the parent process, and this function
 * returns -1 in the parent process.  On the other platforms, just
 * returns pid.
 *
 * +chfunc+ must not raise any exceptions.
 */
int
rb_fork(status, chfunc, charg)
    int *status;
    int (*chfunc)(void *);
    void *charg;
{
    int pid, err, state = 0;
#ifdef FD_CLOEXEC
    int ep[2];
#endif

#ifndef __VMS
    rb_io_flush(rb_stdout);
    rb_io_flush(rb_stderr);
#endif

#ifdef FD_CLOEXEC
    if (chfunc) {
        if (pipe(ep)) return -1;
        if (fcntl(ep[1], F_SETFD, FD_CLOEXEC)) {
            preserving_errno((close(ep[0]), close(ep[1])));
            return -1;
        }
    }
#endif
    while ((pid = fork()) < 0) {
        switch (errno) {
          case EAGAIN:
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
          case EWOULDBLOCK:
#endif
            if (!status && !chfunc) {
                rb_thread_sleep(1);
                continue;
            }
            else {
                rb_protect((VALUE (*)())rb_thread_sleep, 1, &state);
                if (status) *status = state;
                if (!state) continue;
            }
          default:
#ifdef FD_CLOEXEC
            if (chfunc) {
                preserving_errno((close(ep[0]), close(ep[1])));
            }
#endif
            if (state && !status) rb_jump_tag(state);
            return -1;
        }
    }
    if (!pid) {
        if (chfunc) {
#ifdef FD_CLOEXEC
            close(ep[0]);
#endif
            if (!(*chfunc)(charg)) _exit(EXIT_SUCCESS);
#ifdef FD_CLOEXEC
            err = errno;
            write(ep[1], &err, sizeof(err));
#endif
#if EXIT_SUCCESS == 127
            _exit(EXIT_FAILURE);
#else
            _exit(127);
#endif
        }
    }
#ifdef FD_CLOEXEC
    else if (chfunc) {
        close(ep[1]);
        if ((state = read(ep[0], &err, sizeof(err))) < 0) {
            err = errno;
        }
        close(ep[0]);
        if (state) {
            if (status) {
                rb_protect(proc_syswait, (VALUE)pid, status);
            }
            else {
                rb_syswait(pid);
            }
            errno = err;
            return -1;
        }
    }
#endif
    return pid;
}
#endif

/*
 *  call-seq:
 *     Kernel.fork  [{ block }]   => fixnum or nil
 *     Process.fork [{ block }]   => fixnum or nil
 *
 *  Creates a subprocess. If a block is specified, that block is run
 *  in the subprocess, and the subprocess terminates with a status of
 *  zero. Otherwise, the +fork+ call returns twice, once in
 *  the parent, returning the process ID of the child, and once in
 *  the child, returning _nil_. The child process can exit using
 *  <code>Kernel.exit!</code> to avoid running any
 *  <code>at_exit</code> functions. The parent process should
 *  use <code>Process.wait</code> to collect the termination statuses
 *  of its children or use <code>Process.detach</code> to register
 *  disinterest in their status; otherwise, the operating system
 *  may accumulate zombie processes.
 *
 *  The thread calling fork is the only thread in the created child process.
 *  fork doesn't copy other threads.
 */

static VALUE
rb_f_fork(VALUE obj)
{
#ifdef HAVE_FORK
    int pid;

    rb_secure(2);

    switch (pid = rb_fork(0, 0, 0)) {
      case 0:
#ifdef linux
        after_exec();
#endif
        rb_thread_atfork();
        if (rb_block_given_p()) {
            int status;

            rb_protect(rb_yield, Qundef, &status);
            ruby_stop(status);
        }
        return Qnil;

      case -1:
        rb_sys_fail("fork(2)");
        return Qnil;

      default:
        return INT2FIX(pid);
    }
#else
    rb_notimplement();
#endif
}

/*
 *  call-seq:
 *     Process.exit!(fixnum=-1)
 *
 *  Exits the process immediately. No exit handlers are
 *  run. <em>fixnum</em> is returned to the underlying system as the
 *  exit status.
 *
 *     Process.exit!(0)
 */

static VALUE
rb_f_exit_bang(int argc, VALUE *argv, VALUE obj)
{
    VALUE status;
    int istatus;

    rb_secure(4);
    if (rb_scan_args(argc, argv, "01", &status) == 1) {
        switch (status) {
          case Qtrue:
            istatus = EXIT_SUCCESS;
            break;
          case Qfalse:
            istatus = EXIT_FAILURE;
            break;
          default:
            istatus = NUM2INT(status);
            break;
        }
    }
    else {
        istatus = EXIT_FAILURE;
    }
    _exit(istatus);

    return Qnil;                /* not reached */
}

#if defined(sun)
#define signal(a,b) sigset(a,b)
#endif

void
rb_syswait(int pid)
{
    static int overriding;
#ifdef SIGHUP
    RETSIGTYPE (*hfunc)(int);
#endif
#ifdef SIGQUIT
    RETSIGTYPE (*qfunc)(int);
#endif
    RETSIGTYPE (*ifunc)(int);
    int status;
    int i, hooked = Qfalse;

    if (!overriding) {
#ifdef SIGHUP
        hfunc = signal(SIGHUP, SIG_IGN);
#endif
#ifdef SIGQUIT
        qfunc = signal(SIGQUIT, SIG_IGN);
#endif
        ifunc = signal(SIGINT, SIG_IGN);
        overriding = Qtrue;
        hooked = Qtrue;
    }

    do {
        i = rb_waitpid(pid, &status, 0);
    } while (i == -1 && errno == EINTR);

    if (hooked) {
#ifdef SIGHUP
        signal(SIGHUP, hfunc);
#endif
#ifdef SIGQUIT
        signal(SIGQUIT, qfunc);
#endif
        signal(SIGINT, ifunc);
        overriding = Qfalse;
    }
}

int
rb_spawn(int argc, VALUE *argv)
{
    int status;
    VALUE prog;
#if defined HAVE_FORK
    struct rb_exec_arg earg;
#endif

    prog = rb_check_argv(argc, argv);

    if (!prog && argc == 1) {
        --argc;
        prog = *argv++;
    }
#if defined HAVE_FORK
    earg.argc = argc;
    earg.argv = argv;
    earg.prog = prog ? RSTRING(prog)->ptr : 0;
    status = rb_fork(&status, (int (*)(void*))rb_exec, &earg);
    if (prog && argc) argv[0] = prog;
#elif defined HAVE_SPAWNV
    if (!argc) {
        status = proc_spawn(RSTRING(prog)->ptr);
    }
    else {
        status = proc_spawn_n(argc, argv, prog);
    }
    if (prog && argc) argv[0] = prog;
#else
    if (prog && argc) argv[0] = prog;
    if (argc) prog = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" "));
    status = system(StringValuePtr(prog));
# if defined(__human68k__) || defined(__DJGPP__)
    last_status_set(status == -1 ? 127 : status, 0);
# else
    last_status_set((status & 0xff) << 8, 0);
# endif
#endif
    return status;
}

/*
 *  call-seq:
 *     system(cmd [, arg, ...])    => true or false
 *
 *  Executes _cmd_ in a subshell, returning +true+ if the command ran
 *  successfully, +false+ otherwise. An error status is available in
 *  <code>$?</code>. The arguments are processed in the same way as
 *  for <code>Kernel::exec</code>, and raises same exceptions as it.
 *
 *     system("echo *")
 *     system("echo", "*")
 *
 *  <em>produces:</em>
 *
 *     config.h main.rb
 *     *
 */

static VALUE
rb_f_system(int argc, VALUE *argv)
{
    int status;

    status = rb_spawn(argc, argv);
    if (status == -1) rb_sys_fail(RSTRING(argv[0])->ptr);
#if defined(HAVE_FORK) || defined(HAVE_SPAWNV)
    rb_syswait(status);
    status = NUM2INT(rb_last_status);
#endif
    if (status == EXIT_SUCCESS) return Qtrue;
    return Qfalse;
}

/*
 *  call-seq:
 *     spawn(cmd [, arg, ...])     => pid
 *
 *  Similar to <code>Kernel::system</code> except for not waiting for
 *  end of _cmd_, but returns its <i>pid</i>.
 */

static VALUE
rb_f_spawn(int argc, VALUE *argv)
{
    int pid;

    pid = rb_spawn(argc, argv);
    if (pid == -1) rb_sys_fail(RSTRING(argv[0])->ptr);
#if defined(HAVE_FORK) || defined(HAVE_SPAWNV)
    return INT2NUM(pid);
#else
    return Qnil;
#endif
}

/*
 *  call-seq:
 *     sleep([duration])    => fixnum
 *
 *  Suspends the current thread for _duration_ seconds (which may be
 *  any number, including a +Float+ with fractional seconds). Returns the actual
 *  number of seconds slept (rounded), which may be less than that asked
 *  for if the thread was interrupted by a +SIGALRM+, or if
 *  another thread calls <code>Thread#run</code>. Zero arguments
 *  causes +sleep+ to sleep forever.
 *
 *     Time.new    #=> Wed Apr 09 08:56:32 CDT 2003
 *     sleep 1.2   #=> 1
 *     Time.new    #=> Wed Apr 09 08:56:33 CDT 2003
 *     sleep 1.9   #=> 2
 *     Time.new    #=> Wed Apr 09 08:56:35 CDT 2003
 */

static VALUE
rb_f_sleep(int argc, VALUE *argv)
{
    int beg, end;

    beg = time(0);
    if (argc == 0) {
        rb_thread_sleep_forever();
    }
    else if (argc == 1) {
        rb_thread_wait_for(rb_time_interval(argv[0]));
    }
    else {
        rb_raise(rb_eArgError, "wrong number of arguments");
    }

    end = time(0) - beg;

    return INT2FIX(end);
}

/*
 *  call-seq:
 *     Process.getpgrp   => integer
 *
 *  Returns the process group ID for this process. Not available on
 *  all platforms.
 *
 *     Process.getpgid(0)   #=> 25527
 *     Process.getpgrp      #=> 25527
 */

static VALUE
proc_getpgrp(void)
{
    int pgrp;

    rb_secure(2);
#if defined(HAVE_GETPGRP) && defined(GETPGRP_VOID)
    pgrp = getpgrp();
    if (pgrp < 0) rb_sys_fail(0);
    return INT2FIX(pgrp);
#else
# ifdef HAVE_GETPGID
    pgrp = getpgid(0);
    if (pgrp < 0) rb_sys_fail(0);
    return INT2FIX(pgrp);
# else
    rb_notimplement();
# endif
#endif
}

/*
 *  call-seq:
 *     Process.setpgrp   => 0
 *
 *  Equivalent to <code>setpgid(0,0)</code>. Not available on all
 *  platforms.
 */

static VALUE
proc_setpgrp(void)
{
    rb_secure(2);
  /* check for posix setpgid() first; this matches the posix */
  /* getpgrp() above.  It appears that configure will set SETPGRP_VOID */
  /* even though setpgrp(0,0) would be prefered. The posix call avoids */
  /* this confusion. */
#ifdef HAVE_SETPGID
    if (setpgid(0,0) < 0) rb_sys_fail(0);
#elif defined(HAVE_SETPGRP) && defined(SETPGRP_VOID)
    if (setpgrp() < 0) rb_sys_fail(0);
#else
    rb_notimplement();
#endif
    return INT2FIX(0);
}

/*
 *  call-seq:
 *     Process.getpgid(pid)   => integer
 *
 *  Returns the process group ID for the given process id. Not
 *  available on all platforms.
 *
 *     Process.getpgid(Process.ppid())   #=> 25527
 */

static VALUE
proc_getpgid(VALUE obj, VALUE pid)
{
#if defined(HAVE_GETPGID) && !defined(__CHECKER__)
    int i;

    rb_secure(2);
    i = getpgid(NUM2INT(pid));
    if (i < 0) rb_sys_fail(0);
    return INT2NUM(i);
#else
    rb_notimplement();
#endif
}

/*
 *  call-seq:
 *     Process.setpgid(pid, integer)   => 0
 *
 *  Sets the process group ID of _pid_ (0 indicates this
 *  process) to <em>integer</em>. Not available on all platforms.
 */

static VALUE
proc_setpgid(VALUE obj, VALUE pid, VALUE pgrp)
{
#ifdef HAVE_SETPGID
    int ipid, ipgrp;

    rb_secure(2);
    ipid = NUM2INT(pid);
    ipgrp = NUM2INT(pgrp);

    if (setpgid(ipid, ipgrp) < 0) rb_sys_fail(0);
    return INT2FIX(0);
#else
    rb_notimplement();
#endif
}

/*
 *  call-seq:
 *     Process.setsid   => fixnum
 *
 *  Establishes this process as a new session and process group
 *  leader, with no controlling tty. Returns the session id. Not
 *  available on all platforms.
 *
 *     Process.setsid   #=> 27422
 */

static VALUE
proc_setsid(void)
{
#if defined(HAVE_SETSID)
    int pid;

    rb_secure(2);
    pid = setsid();
    if (pid < 0) rb_sys_fail(0);
    return INT2FIX(pid);
#elif defined(HAVE_SETPGRP) && defined(TIOCNOTTY)
  rb_pid_t pid;
  int ret;

  rb_secure(2);
  pid = getpid();
#if defined(SETPGRP_VOID)
  ret = setpgrp();
  /* If `pid_t setpgrp(void)' is equivalent to setsid(),
     `ret' will be the same value as `pid', and following open() will fail.
     In Linux, `int setpgrp(void)' is equivalent to setpgid(0, 0). */
#else
  ret = setpgrp(0, pid);
#endif
  if (ret == -1) rb_sys_fail(0);

  if ((fd = open("/dev/tty", O_RDWR)) >= 0) {
    ioctl(fd, TIOCNOTTY, NULL);
    close(fd);
  }
  return INT2FIX(pid);
#else
    rb_notimplement();
#endif
}

/*
 *  call-seq:
 *     Process.getpriority(kind, integer)   => fixnum
 *
 *  Gets the scheduling priority for specified process, process group,
 *  or user. <em>kind</em> indicates the kind of entity to find: one
 *  of <code>Process::PRIO_PGRP</code>,
 *  <code>Process::PRIO_USER</code>, or
 *  <code>Process::PRIO_PROCESS</code>. _integer_ is an id
 *  indicating the particular process, process group, or user (an id
 *  of 0 means _current_). Lower priorities are more favorable
 *  for scheduling. Not available on all platforms.
 *
 *     Process.getpriority(Process::PRIO_USER, 0)      #=> 19
 *     Process.getpriority(Process::PRIO_PROCESS, 0)   #=> 19
 */

static VALUE
proc_getpriority(VALUE obj, VALUE which, VALUE who)
{
#ifdef HAVE_GETPRIORITY
    int prio, iwhich, iwho;

    rb_secure(2);
    iwhich = NUM2INT(which);
    iwho   = NUM2INT(who);

    errno = 0;
    prio = getpriority(iwhich, iwho);
    if (errno) rb_sys_fail(0);
    return INT2FIX(prio);
#else
    rb_notimplement();
#endif
}

/*
 *  call-seq:
 *     Process.setpriority(kind, integer, priority)   => 0
 *
 *  See <code>Process#getpriority</code>.
 *
 *     Process.setpriority(Process::PRIO_USER, 0, 19)      #=> 0
 *     Process.setpriority(Process::PRIO_PROCESS, 0, 19)   #=> 0
 *     Process.getpriority(Process::PRIO_USER, 0)          #=> 19
 *     Process.getpriority(Process::PRIO_PROCESS, 0)       #=> 19
 */

static VALUE
proc_setpriority(VALUE obj, VALUE which, VALUE who, VALUE prio)
{
#ifdef HAVE_GETPRIORITY
    int iwhich, iwho, iprio;

    rb_secure(2);
    iwhich = NUM2INT(which);
    iwho   = NUM2INT(who);
    iprio  = NUM2INT(prio);

    if (setpriority(iwhich, iwho, iprio) < 0)
        rb_sys_fail(0);
    return INT2FIX(0);
#else
    rb_notimplement();
#endif
}

#if SIZEOF_RLIM_T == SIZEOF_INT
# define RLIM2NUM(v) UINT2NUM(v)
# define NUM2RLIM(v) NUM2UINT(v)
#elif SIZEOF_RLIM_T == SIZEOF_LONG
# define RLIM2NUM(v) ULONG2NUM(v)
# define NUM2RLIM(v) NUM2ULONG(v)
#elif SIZEOF_RLIM_T == SIZEOF_LONG_LONG
# define RLIM2NUM(v) ULL2NUM(v)
# define NUM2RLIM(v) NUM2ULL(v)
#endif

/*
 *  call-seq:
 *     Process.getrlimit(resource)   => [cur_limit, max_limit]
 *
 *  Gets the resource limit of the process.
 *  _cur_limit_ means current (soft) limit and
 *  _max_limit_ means maximum (hard) limit.
 *
 *  _resource_ indicates the kind of resource to limit:
 *  such as <code>Process::RLIMIT_CORE</code>,
 *  <code>Process::RLIMIT_CPU</code>, etc.
 *  See Process.setrlimit for details.
 *
 *  _cur_limit_ and _max_limit_ may be <code>Process::RLIM_INFINITY</code>,
 *  <code>Process::RLIM_SAVED_MAX</code> or
 *  <code>Process::RLIM_SAVED_CUR</code>.
 *  See Process.setrlimit and the system getrlimit(2) manual for details.
 */

static VALUE
proc_getrlimit(VALUE obj, VALUE resource)
{
#if defined(HAVE_GETRLIMIT) && defined(RLIM2NUM)
    struct rlimit rlim;

    rb_secure(2);

    if (getrlimit(NUM2INT(resource), &rlim) < 0) {
        rb_sys_fail("getrlimit");
    }
    return rb_assoc_new(RLIM2NUM(rlim.rlim_cur), RLIM2NUM(rlim.rlim_max));
#else
    rb_notimplement();
#endif
}

/*
 *  call-seq:
 *     Process.setrlimit(resource, cur_limit, max_limit)        => nil
 *     Process.setrlimit(resource, cur_limit)                   => nil
 *
 *  Sets the resource limit of the process.
 *  _cur_limit_ means current (soft) limit and
 *  _max_limit_ means maximum (hard) limit.
 *
 *  If _max_limit_ is not given, _cur_limit_ is used.
 *
 *  _resource_ indicates the kind of resource to limit.
 *  The list of resources are OS dependent.
 *  Ruby may support following resources.
 *
 *  [Process::RLIMIT_CORE] core size (bytes) (SUSv3)
 *  [Process::RLIMIT_CPU] CPU time (seconds) (SUSv3)
 *  [Process::RLIMIT_DATA] data segment (bytes) (SUSv3)
 *  [Process::RLIMIT_FSIZE] file size (bytes) (SUSv3)
 *  [Process::RLIMIT_NOFILE] file descriptors (number) (SUSv3)
 *  [Process::RLIMIT_STACK] stack size (bytes) (SUSv3)
 *  [Process::RLIMIT_AS] total available memory (bytes) (SUSv3, NetBSD, FreeBSD, OpenBSD but 4.4BSD-Lite)
 *  [Process::RLIMIT_MEMLOCK] total size for mlock(2) (bytes) (4.4BSD, GNU/Linux)
 *  [Process::RLIMIT_NPROC] number of processes for the user (number) (4.4BSD, GNU/Linux)
 *  [Process::RLIMIT_RSS] resident memory size (bytes) (4.2BSD, GNU/Linux)
 *  [Process::RLIMIT_SBSIZE] all socket buffers (bytes) (NetBSD, FreeBSD)
 *
 *  Other <code>Process::RLIMIT_???</code> constants may be defined.
 *
 *  _cur_limit_ and _max_limit_ may be <code>Process::RLIM_INFINITY</code>,
 *  which means that the resource is not limited.
 *  They may be <code>Process::RLIM_SAVED_MAX</code> or
 *  <code>Process::RLIM_SAVED_CUR</code> too.
 *  See system setrlimit(2) manual for details.
 *
 */

static VALUE
proc_setrlimit(int argc, VALUE *argv, VALUE obj)
{
#if defined(HAVE_SETRLIMIT) && defined(NUM2RLIM)
    VALUE resource, rlim_cur, rlim_max;
    struct rlimit rlim;

    rb_secure(2);

    rb_scan_args(argc, argv, "21", &resource, &rlim_cur, &rlim_max);
    if (rlim_max == Qnil)
        rlim_max = rlim_cur;

    rlim.rlim_cur = NUM2RLIM(rlim_cur);
    rlim.rlim_max = NUM2RLIM(rlim_max);

    if (setrlimit(NUM2INT(resource), &rlim) < 0) {
        rb_sys_fail("setrlimit");
    }
    return Qnil;
#else
    rb_notimplement();
#endif
}

static int under_uid_switch = 0;
static void
check_uid_switch(void)
{
    rb_secure(2);
    if (under_uid_switch) {
        rb_raise(rb_eRuntimeError, "can't handle UID while evaluating block given to Process::UID.switch method");
    }
}

static int under_gid_switch = 0;
static void
check_gid_switch(void)
{
    rb_secure(2);
    if (under_gid_switch) {
        rb_raise(rb_eRuntimeError, "can't handle GID while evaluating block given to Process::UID.switch method");
    }
}

/*********************************************************************
 * Document-class: Process::Sys
 *
 *  The <code>Process::Sys</code> module contains UID and GID
 *  functions which provide direct bindings to the system calls of the
 *  same names instead of the more-portable versions of the same
 *  functionality found in the <code>Process</code>,
 *  <code>Process::UID</code>, and <code>Process::GID</code> modules.
 */

/*
 *  call-seq:
 *     Process::Sys.setuid(integer)   => nil
 *
 *  Set the user ID of the current process to _integer_. Not
 *  available on all platforms.
 *
 */

static VALUE
p_sys_setuid(VALUE obj, VALUE id)
{
#if defined HAVE_SETUID
    check_uid_switch();
    if (setuid(NUM2INT(id)) != 0) rb_sys_fail(0);
#else
    rb_notimplement();
#endif
    return Qnil;
}

/*
 *  call-seq:
 *     Process::Sys.setruid(integer)   => nil
 *
 *  Set the real user ID of the calling process to _integer_.
 *  Not available on all platforms.
 *
 */

static VALUE
p_sys_setruid(VALUE obj, VALUE id)
{
#if defined HAVE_SETRUID
    check_uid_switch();
    if (setruid(NUM2INT(id)) != 0) rb_sys_fail(0);
#else
    rb_notimplement();
#endif
    return Qnil;
}

/*
 *  call-seq:
 *     Process::Sys.seteuid(integer)   => nil
 *
 *  Set the effective user ID of the calling process to
 *  _integer_.  Not available on all platforms.
 *
 */

static VALUE
p_sys_seteuid(VALUE obj, VALUE id)
{
#if defined HAVE_SETEUID
    check_uid_switch();
    if (seteuid(NUM2INT(id)) != 0) rb_sys_fail(0);
#else
    rb_notimplement();
#endif
    return Qnil;
}

/*
 *  call-seq:
 *     Process::Sys.setreuid(rid, eid)   => nil
 *
 *  Sets the (integer) real and/or effective user IDs of the current
 *  process to _rid_ and _eid_, respectively. A value of
 *  <code>-1</code> for either means to leave that ID unchanged. Not
 *  available on all platforms.
 *
 */

static VALUE
p_sys_setreuid(VALUE obj, VALUE rid, VALUE eid)
{
#if defined HAVE_SETREUID
    check_uid_switch();
    if (setreuid(NUM2INT(rid),NUM2INT(eid)) != 0) rb_sys_fail(0);
#else
    rb_notimplement();
#endif
    return Qnil;
}

/*
 *  call-seq:
 *     Process::Sys.setresuid(rid, eid, sid)   => nil
 *
 *  Sets the (integer) real, effective, and saved user IDs of the
 *  current process to _rid_, _eid_, and _sid_ respectively. A
 *  value of <code>-1</code> for any value means to
 *  leave that ID unchanged. Not available on all platforms.
 *
 */

static VALUE
p_sys_setresuid(VALUE obj, VALUE rid, VALUE eid, VALUE sid)
{
#if defined HAVE_SETRESUID
    check_uid_switch();
    if (setresuid(NUM2INT(rid),NUM2INT(eid),NUM2INT(sid)) != 0) rb_sys_fail(0);
#else
    rb_notimplement();
#endif
    return Qnil;
}

/*
 *  call-seq:
 *     Process.uid           => fixnum
 *     Process::UID.rid      => fixnum
 *     Process::Sys.getuid   => fixnum
 *
 *  Returns the (real) user ID of this process.
 *
 *     Process.uid   #=> 501
 */

static VALUE
proc_getuid(VALUE obj)
{
    int uid = getuid();
    return INT2FIX(uid);
}

/*
 *  call-seq:
 *     Process.uid= integer   => numeric
 *
 *  Sets the (integer) user ID for this process. Not available on all
 *  platforms.
 */

static VALUE
proc_setuid(VALUE obj, VALUE id)
{
    int uid = NUM2INT(id);

    check_uid_switch();
#if defined(HAVE_SETRESUID) &&  !defined(__CHECKER__)
    if (setresuid(uid, -1, -1) < 0) rb_sys_fail(0);
#elif defined HAVE_SETREUID
    if (setreuid(uid, -1) < 0) rb_sys_fail(0);
#elif defined HAVE_SETRUID
    if (setruid(uid) < 0) rb_sys_fail(0);
#elif defined HAVE_SETUID
    {
        if (geteuid() == uid) {
            if (setuid(uid) < 0) rb_sys_fail(0);
        }
        else {
            rb_notimplement();
        }
    }
#else
    rb_notimplement();
#endif
    return INT2FIX(uid);
}

/********************************************************************
 *
 * Document-class: Process::UID
 *
 *  The <code>Process::UID</code> module contains a collection of
 *  module functions which can be used to portably get, set, and
 *  switch the current process's real, effective, and saved user IDs.
 *
 */

static int SAVED_USER_ID;

/*
 *  call-seq:
 *     Process::UID.change_privilege(integer)   => fixnum
 *
 *  Change the current process's real and effective user ID to that
 *  specified by _integer_. Returns the new user ID. Not
 *  available on all platforms.
 *
 *     [Process.uid, Process.euid]          #=> [0, 0]
 *     Process::UID.change_privilege(31)    #=> 31
 *     [Process.uid, Process.euid]          #=> [31, 31]
 */

static VALUE
p_uid_change_privilege(VALUE obj, VALUE id)
{
    int uid;

    check_uid_switch();

    uid = NUM2INT(id);

    if (geteuid() == 0) { /* root-user */
#if defined(HAVE_SETRESUID)
        if (setresuid(uid, uid, uid) < 0) rb_sys_fail(0);
        SAVED_USER_ID = uid;
#elif defined(HAVE_SETUID)
        if (setuid(uid) < 0) rb_sys_fail(0);
        SAVED_USER_ID = uid;
#elif defined(HAVE_SETREUID) && !defined(OBSOLETE_SETREUID)
        if (getuid() == uid) {
            if (SAVED_USER_ID == uid) {
                if (setreuid(-1, uid) < 0) rb_sys_fail(0);
            } else {
                if (uid == 0) { /* (r,e,s) == (root, root, x) */
                    if (setreuid(-1, SAVED_USER_ID) < 0) rb_sys_fail(0);
                    if (setreuid(SAVED_USER_ID, 0) < 0) rb_sys_fail(0);
                    SAVED_USER_ID = 0; /* (r,e,s) == (x, root, root) */
                    if (setreuid(uid, uid) < 0) rb_sys_fail(0);
                    SAVED_USER_ID = uid;
                } else {
                    if (setreuid(0, -1) < 0) rb_sys_fail(0);
                    SAVED_USER_ID = 0;
                    if (setreuid(uid, uid) < 0) rb_sys_fail(0);
                    SAVED_USER_ID = uid;
                }
            }
        } else {
            if (setreuid(uid, uid) < 0) rb_sys_fail(0);
            SAVED_USER_ID = uid;
        }
#elif defined(HAVE_SETRUID) && defined(HAVE_SETEUID)
        if (getuid() == uid) {
            if (SAVED_USER_ID == uid) {
                if (seteuid(uid) < 0) rb_sys_fail(0);
            } else {
                if (uid == 0) {
                    if (setruid(SAVED_USER_ID) < 0) rb_sys_fail(0);
                    SAVED_USER_ID = 0;
                    if (setruid(0) < 0) rb_sys_fail(0);
                } else {
                    if (setruid(0) < 0) rb_sys_fail(0);
                    SAVED_USER_ID = 0;
                    if (seteuid(uid) < 0) rb_sys_fail(0);
                    if (setruid(uid) < 0) rb_sys_fail(0);
                    SAVED_USER_ID = uid;
                }
            }
        } else {
            if (seteuid(uid) < 0) rb_sys_fail(0);
            if (setruid(uid) < 0) rb_sys_fail(0);
            SAVED_USER_ID = uid;
        }
#else
        rb_notimplement();
#endif
    } else { /* unprivileged user */
#if defined(HAVE_SETRESUID)
        if (setresuid((getuid() == uid)? -1: uid,
                      (geteuid() == uid)? -1: uid,
                      (SAVED_USER_ID == uid)? -1: uid) < 0) rb_sys_fail(0);
        SAVED_USER_ID = uid;
#elif defined(HAVE_SETREUID) && !defined(OBSOLETE_SETREUID)
        if (SAVED_USER_ID == uid) {
            if (setreuid((getuid() == uid)? -1: uid,
                         (geteuid() == uid)? -1: uid) < 0) rb_sys_fail(0);
        } else if (getuid() != uid) {
            if (setreuid(uid, (geteuid() == uid)? -1: uid) < 0) rb_sys_fail(0);
            SAVED_USER_ID = uid;
        } else if (/* getuid() == uid && */ geteuid() != uid) {
            if (setreuid(geteuid(), uid) < 0) rb_sys_fail(0);
            SAVED_USER_ID = uid;
            if (setreuid(uid, -1) < 0) rb_sys_fail(0);
        } else { /* getuid() == uid && geteuid() == uid */
            if (setreuid(-1, SAVED_USER_ID) < 0) rb_sys_fail(0);
            if (setreuid(SAVED_USER_ID, uid) < 0) rb_sys_fail(0);
            SAVED_USER_ID = uid;
            if (setreuid(uid, -1) < 0) rb_sys_fail(0);
        }
#elif defined(HAVE_SETRUID) && defined(HAVE_SETEUID)
        if (SAVED_USER_ID == uid) {
            if (geteuid() != uid && seteuid(uid) < 0) rb_sys_fail(0);
            if (getuid() != uid && setruid(uid) < 0) rb_sys_fail(0);
        } else if (/* SAVED_USER_ID != uid && */ geteuid() == uid) {
            if (getuid() != uid) {
                if (setruid(uid) < 0) rb_sys_fail(0);
                SAVED_USER_ID = uid;
            } else {
                if (setruid(SAVED_USER_ID) < 0) rb_sys_fail(0);
                SAVED_USER_ID = uid;
                if (setruid(uid) < 0) rb_sys_fail(0);
            }
        } else if (/* geteuid() != uid && */ getuid() == uid) {
            if (seteuid(uid) < 0) rb_sys_fail(0);
            if (setruid(SAVED_USER_ID) < 0) rb_sys_fail(0);
            SAVED_USER_ID = uid;
            if (setruid(uid) < 0) rb_sys_fail(0);
        } else {
            errno = EPERM;
            rb_sys_fail(0);
        }
#elif defined HAVE_44BSD_SETUID
        if (getuid() == uid) {
            /* (r,e,s)==(uid,?,?) ==> (uid,uid,uid) */
            if (setuid(uid) < 0) rb_sys_fail(0);
            SAVED_USER_ID = uid;
        } else {
            errno = EPERM;
            rb_sys_fail(0);
        }
#elif defined HAVE_SETEUID
        if (getuid() == uid && SAVED_USER_ID == uid) {
            if (seteuid(uid) < 0) rb_sys_fail(0);
        } else {
            errno = EPERM;
            rb_sys_fail(0);
        }
#elif defined HAVE_SETUID
        if (getuid() == uid && SAVED_USER_ID == uid) {
            if (setuid(uid) < 0) rb_sys_fail(0);
        } else {
            errno = EPERM;
            rb_sys_fail(0);
        }
#else
        rb_notimplement();
#endif
    }
    return INT2FIX(uid);
}

/*
 *  call-seq:
 *     Process::Sys.setgid(integer)   => nil
 *
 *  Set the group ID of the current process to _integer_. Not
 *  available on all platforms.
 *
 */

static VALUE
p_sys_setgid(VALUE obj, VALUE id)
{
#if defined HAVE_SETGID
    check_gid_switch();
    if (setgid(NUM2INT(id)) != 0) rb_sys_fail(0);
#else
    rb_notimplement();
#endif
    return Qnil;
}

/*
 *  call-seq:
 *     Process::Sys.setrgid(integer)   => nil
 *
 *  Set the real group ID of the calling process to _integer_.
 *  Not available on all platforms.
 *
 */

static VALUE
p_sys_setrgid(VALUE obj, VALUE id)
{
#if defined HAVE_SETRGID
    check_gid_switch();
    if (setrgid(NUM2INT(id)) != 0) rb_sys_fail(0);
#else
    rb_notimplement();
#endif
    return Qnil;
}

/*
 *  call-seq:
 *     Process::Sys.setegid(integer)   => nil
 *
 *  Set the effective group ID of the calling process to
 *  _integer_.  Not available on all platforms.
 *
 */

static VALUE
p_sys_setegid(VALUE obj, VALUE id)
{
#if defined HAVE_SETEGID
    check_gid_switch();
    if (setegid(NUM2INT(id)) != 0) rb_sys_fail(0);
#else
    rb_notimplement();
#endif
    return Qnil;
}

/*
 *  call-seq:
 *     Process::Sys.setregid(rid, eid)   => nil
 *
 *  Sets the (integer) real and/or effective group IDs of the current
 *  process to <em>rid</em> and <em>eid</em>, respectively. A value of
 *  <code>-1</code> for either means to leave that ID unchanged. Not
 *  available on all platforms.
 *
 */

static VALUE
p_sys_setregid(VALUE obj, VALUE rid, VALUE eid)
{
#if defined HAVE_SETREGID
    check_gid_switch();
    if (setregid(NUM2INT(rid),NUM2INT(eid)) != 0) rb_sys_fail(0);
#else
    rb_notimplement();
#endif
    return Qnil;
}

/*
 *  call-seq:
 *     Process::Sys.setresgid(rid, eid, sid)   => nil
 *
 *  Sets the (integer) real, effective, and saved user IDs of the
 *  current process to <em>rid</em>, <em>eid</em>, and <em>sid</em>
 *  respectively. A value of <code>-1</code> for any value means to
 *  leave that ID unchanged. Not available on all platforms.
 *
 */

static VALUE
p_sys_setresgid(VALUE obj, VALUE rid, VALUE eid, VALUE sid)
{
#if defined HAVE_SETRESGID
    check_gid_switch();
    if (setresgid(NUM2INT(rid),NUM2INT(eid),NUM2INT(sid)) != 0) rb_sys_fail(0);
#else
    rb_notimplement();
#endif
    return Qnil;
}

/*
 *  call-seq:
 *     Process::Sys.issetugid   => true or false
 *
 *  Returns +true+ if the process was created as a result
 *  of an execve(2) system call which had either of the setuid or
 *  setgid bits set (and extra privileges were given as a result) or
 *  if it has changed any of its real, effective or saved user or
 *  group IDs since it began execution.
 *
 */

static VALUE
p_sys_issetugid(VALUE obj)
{
#if defined HAVE_ISSETUGID
    rb_secure(2);
    if (issetugid()) {
        return Qtrue;
    } else {
        return Qfalse;
    }
#else
    rb_notimplement();
    return Qnil;                /* not reached */
#endif
}

/*
 *  call-seq:
 *     Process.gid           => fixnum
 *     Process::GID.rid      => fixnum
 *     Process::Sys.getgid   => fixnum
 *
 *  Returns the (real) group ID for this process.
 *
 *     Process.gid   #=> 500
 */

static VALUE
proc_getgid(VALUE obj)
{
    int gid = getgid();
    return INT2FIX(gid);
}

/*
 *  call-seq:
 *     Process.gid= fixnum   => fixnum
 *
 *  Sets the group ID for this process.
 */

static VALUE
proc_setgid(VALUE obj, VALUE id)
{
    int gid = NUM2INT(id);

    check_gid_switch();
#if defined(HAVE_SETRESGID) && !defined(__CHECKER__)
    if (setresgid(gid, -1, -1) < 0) rb_sys_fail(0);
#elif defined HAVE_SETREGID
    if (setregid(gid, -1) < 0) rb_sys_fail(0);
#elif defined HAVE_SETRGID
    if (setrgid((GIDTYPE)gid) < 0) rb_sys_fail(0);
#elif defined HAVE_SETGID
    {
        if (getegid() == gid) {
            if (setgid(gid) < 0) rb_sys_fail(0);
        }
        else {
            rb_notimplement();
        }
    }
#else
    rb_notimplement();
#endif
    return INT2FIX(gid);
}

static size_t maxgroups = 32;

/*
 *  call-seq:
 *     Process.groups   => array
 *
 *  Get an <code>Array</code> of the gids of groups in the
 *  supplemental group access list for this process.
 *
 *     Process.groups   #=> [27, 6, 10, 11]
 *
 */

static VALUE
proc_getgroups(VALUE obj)
{
#ifdef HAVE_GETGROUPS
    VALUE ary;
    size_t ngroups;
    rb_gid_t *groups;
    int i;

    groups = ALLOCA_N(rb_gid_t, maxgroups);

    ngroups = getgroups(maxgroups, groups);
    if (ngroups == -1)
        rb_sys_fail(0);

    ary = rb_ary_new();
    for (i = 0; i < ngroups; i++)
        rb_ary_push(ary, INT2NUM(groups[i]));

    return ary;
#else
    rb_notimplement();
    return Qnil;
#endif
}

/*
 *  call-seq:
 *     Process.groups= array   => array
 *
 *  Set the supplemental group access list to the given
 *  <code>Array</code> of group IDs.
 *
 *     Process.groups   #=> [0, 1, 2, 3, 4, 6, 10, 11, 20, 26, 27]
 *     Process.groups = [27, 6, 10, 11]   #=> [27, 6, 10, 11]
 *     Process.groups   #=> [27, 6, 10, 11]
 *
 */

static VALUE
proc_setgroups(VALUE obj, VALUE ary)
{
#ifdef HAVE_SETGROUPS
    size_t ngroups;
    rb_gid_t *groups;
    int i;
    struct group *gr;

    Check_Type(ary, T_ARRAY);

    ngroups = RARRAY(ary)->len;
    if (ngroups > maxgroups)
        rb_raise(rb_eArgError, "too many groups, %lu max", (unsigned long)maxgroups);

    groups = ALLOCA_N(rb_gid_t, ngroups);

    for (i = 0; i < ngroups && i < RARRAY(ary)->len; i++) {
        VALUE g = RARRAY(ary)->ptr[i];

        if (FIXNUM_P(g)) {
            groups[i] = FIX2INT(g);
        }
        else {
            VALUE tmp = rb_check_string_type(g);

            if (NIL_P(tmp)) {
                groups[i] = NUM2INT(g);
            }
            else {
                gr = getgrnam(RSTRING(tmp)->ptr);
                if (gr == NULL)
                    rb_raise(rb_eArgError,
                             "can't find group for %s", RSTRING(tmp)->ptr);
                groups[i] = gr->gr_gid;
            }
        }
    }

    i = setgroups(ngroups, groups);
    if (i == -1)
        rb_sys_fail(0);

    return proc_getgroups(obj);
#else
    rb_notimplement();
    return Qnil;
#endif
}

/*
 *  call-seq:
 *     Process.initgroups(username, gid)   => array
 *
 *  Initializes the supplemental group access list by reading the
 *  system group database and using all groups of which the given user
 *  is a member. The group with the specified <em>gid</em> is also
 *  added to the list. Returns the resulting <code>Array</code> of the
 *  gids of all the groups in the supplementary group access list. Not
 *  available on all platforms.
 *
 *     Process.groups   #=> [0, 1, 2, 3, 4, 6, 10, 11, 20, 26, 27]
 *     Process.initgroups( "mgranger", 30 )   #=> [30, 6, 10, 11]
 *     Process.groups   #=> [30, 6, 10, 11]
 *
 */

static VALUE
proc_initgroups(VALUE obj, VALUE uname, VALUE base_grp)
{
#ifdef HAVE_INITGROUPS
    if (initgroups(StringValuePtr(uname), (rb_gid_t)NUM2INT(base_grp)) != 0) {
        rb_sys_fail(0);
    }
    return proc_getgroups(obj);
#else
    rb_notimplement();
    return Qnil;
#endif
}

/*
 *  call-seq:
 *     Process.maxgroups   => fixnum
 *
 *  Returns the maximum number of gids allowed in the supplemental
 *  group access list.
 *
 *     Process.maxgroups   #=> 32
 */

static VALUE
proc_getmaxgroups(VALUE obj)
{
    return INT2FIX(maxgroups);
}

/*
 *  call-seq:
 *     Process.maxgroups= fixnum   => fixnum
 *
 *  Sets the maximum number of gids allowed in the supplemental group
 *  access list.
 */

static VALUE
proc_setmaxgroups(VALUE obj, VALUE val)
{
    size_t  ngroups = FIX2INT(val);

    if (ngroups > 4096)
        ngroups = 4096;

    maxgroups = ngroups;

    return INT2FIX(maxgroups);
}

/*
 *  call-seq:
 *     Process.daemon()                        => fixnum
 *     Process.daemon(nochdir=nil,noclose=nil) => fixnum
 *
 *  Detach the process from controlling terminal and run in
 *  the background as system daemon.  Unless the argument
 *  nochdir is true (i.e. non false), it changes the current
 *  working directory to the root ("/"). Unless the argument
 *  noclose is true, daemon() will redirect standard input,
 *  standard output and standard error to /dev/null.
 */

static VALUE
proc_daemon(int argc, VALUE *argv)
{
    VALUE nochdir, noclose;
    int n;

    rb_secure(2);
    rb_scan_args(argc, argv, "02", &nochdir, &noclose);

#if defined(HAVE_DAEMON)
    n = daemon(RTEST(nochdir), RTEST(noclose));
    if (n < 0) rb_sys_fail("daemon");
    return INT2FIX(n);
#elif defined(HAVE_FORK)
    switch (rb_fork(0, 0, 0)) {
      case -1:
        return (-1);
      case 0:
        break;
      default:
        _exit(0);
    }

    proc_setsid();

    if (!RTEST(nochdir))
        (void)chdir("/");

    if (!RTEST(noclose) && (n = open("/dev/null", O_RDWR, 0)) != -1) {
        (void)dup2(n, 0);
        (void)dup2(n, 1);
        (void)dup2(n, 2);
        if (n > 2)
            (void)close (n);
    }
    return INT2FIX(0);
#else
    rb_notimplement();
#endif
}

/********************************************************************
 *
 * Document-class: Process::GID
 *
 *  The <code>Process::GID</code> module contains a collection of
 *  module functions which can be used to portably get, set, and
 *  switch the current process's real, effective, and saved group IDs.
 *
 */

static int SAVED_GROUP_ID;

/*
 *  call-seq:
 *     Process::GID.change_privilege(integer)   => fixnum
 *
 *  Change the current process's real and effective group ID to that
 *  specified by _integer_. Returns the new group ID. Not
 *  available on all platforms.
 *
 *     [Process.gid, Process.egid]          #=> [0, 0]
 *     Process::GID.change_privilege(33)    #=> 33
 *     [Process.gid, Process.egid]          #=> [33, 33]
 */

static VALUE
p_gid_change_privilege(VALUE obj, VALUE id)
{
    int gid;

    check_gid_switch();

    gid = NUM2INT(id);

    if (geteuid() == 0) { /* root-user */
#if defined(HAVE_SETRESGID)
        if (setresgid(gid, gid, gid) < 0) rb_sys_fail(0);
        SAVED_GROUP_ID = gid;
#elif defined HAVE_SETGID
        if (setgid(gid) < 0) rb_sys_fail(0);
        SAVED_GROUP_ID = gid;
#elif defined(HAVE_SETREGID) && !defined(OBSOLETE_SETREGID)
        if (getgid() == gid) {
            if (SAVED_GROUP_ID == gid) {
                if (setregid(-1, gid) < 0) rb_sys_fail(0);
            } else {
                if (gid == 0) { /* (r,e,s) == (root, y, x) */
                    if (setregid(-1, SAVED_GROUP_ID) < 0) rb_sys_fail(0);
                    if (setregid(SAVED_GROUP_ID, 0) < 0) rb_sys_fail(0);
                    SAVED_GROUP_ID = 0; /* (r,e,s) == (x, root, root) */
                    if (setregid(gid, gid) < 0) rb_sys_fail(0);
                    SAVED_GROUP_ID = gid;
                } else { /* (r,e,s) == (z, y, x) */
                    if (setregid(0, 0) < 0) rb_sys_fail(0);
                    SAVED_GROUP_ID = 0;
                    if (setregid(gid, gid) < 0) rb_sys_fail(0);
                    SAVED_GROUP_ID = gid;
                }
            }
        } else {
            if (setregid(gid, gid) < 0) rb_sys_fail(0);
            SAVED_GROUP_ID = gid;
        }
#elif defined(HAVE_SETRGID) && defined (HAVE_SETEGID)
        if (getgid() == gid) {
            if (SAVED_GROUP_ID == gid) {
                if (setegid(gid) < 0) rb_sys_fail(0);
            } else {
                if (gid == 0) {
                    if (setegid(gid) < 0) rb_sys_fail(0);
                    if (setrgid(SAVED_GROUP_ID) < 0) rb_sys_fail(0);
                    SAVED_GROUP_ID = 0;
                    if (setrgid(0) < 0) rb_sys_fail(0);
                } else {
                    if (setrgid(0) < 0) rb_sys_fail(0);
                    SAVED_GROUP_ID = 0;
                    if (setegid(gid) < 0) rb_sys_fail(0);
                    if (setrgid(gid) < 0) rb_sys_fail(0);
                    SAVED_GROUP_ID = gid;
                }
            }
        } else {
            if (setegid(gid) < 0) rb_sys_fail(0);
            if (setrgid(gid) < 0) rb_sys_fail(0);
            SAVED_GROUP_ID = gid;
        }
#else
        rb_notimplement();
#endif
    } else { /* unprivileged user */
#if defined(HAVE_SETRESGID)
        if (setresgid((getgid() == gid)? -1: gid,
                      (getegid() == gid)? -1: gid,
                      (SAVED_GROUP_ID == gid)? -1: gid) < 0) rb_sys_fail(0);
        SAVED_GROUP_ID = gid;
#elif defined(HAVE_SETREGID) && !defined(OBSOLETE_SETREGID)
        if (SAVED_GROUP_ID == gid) {
            if (setregid((getgid() == gid)? -1: gid,
                         (getegid() == gid)? -1: gid) < 0) rb_sys_fail(0);
        } else if (getgid() != gid) {
            if (setregid(gid, (getegid() == gid)? -1: gid) < 0) rb_sys_fail(0);
            SAVED_GROUP_ID = gid;
        } else if (/* getgid() == gid && */ getegid() != gid) {
            if (setregid(getegid(), gid) < 0) rb_sys_fail(0);
            SAVED_GROUP_ID = gid;
            if (setregid(gid, -1) < 0) rb_sys_fail(0);
        } else { /* getgid() == gid && getegid() == gid */
            if (setregid(-1, SAVED_GROUP_ID) < 0) rb_sys_fail(0);
            if (setregid(SAVED_GROUP_ID, gid) < 0) rb_sys_fail(0);
            SAVED_GROUP_ID = gid;
            if (setregid(gid, -1) < 0) rb_sys_fail(0);
        }
#elif defined(HAVE_SETRGID) && defined(HAVE_SETEGID)
        if (SAVED_GROUP_ID == gid) {
            if (getegid() != gid && setegid(gid) < 0) rb_sys_fail(0);
            if (getgid() != gid && setrgid(gid) < 0) rb_sys_fail(0);
        } else if (/* SAVED_GROUP_ID != gid && */ getegid() == gid) {
            if (getgid() != gid) {
                if (setrgid(gid) < 0) rb_sys_fail(0);
                SAVED_GROUP_ID = gid;
            } else {
                if (setrgid(SAVED_GROUP_ID) < 0) rb_sys_fail(0);
                SAVED_GROUP_ID = gid;
                if (setrgid(gid) < 0) rb_sys_fail(0);
            }
        } else if (/* getegid() != gid && */ getgid() == gid) {
            if (setegid(gid) < 0) rb_sys_fail(0);
            if (setrgid(SAVED_GROUP_ID) < 0) rb_sys_fail(0);
            SAVED_GROUP_ID = gid;
            if (setrgid(gid) < 0) rb_sys_fail(0);
        } else {
            errno = EPERM;
            rb_sys_fail(0);
        }
#elif defined HAVE_44BSD_SETGID
        if (getgid() == gid) {
            /* (r,e,s)==(gid,?,?) ==> (gid,gid,gid) */
            if (setgid(gid) < 0) rb_sys_fail(0);
            SAVED_GROUP_ID = gid;
        } else {
            errno = EPERM;
            rb_sys_fail(0);
        }
#elif defined HAVE_SETEGID
        if (getgid() == gid && SAVED_GROUP_ID == gid) {
            if (setegid(gid) < 0) rb_sys_fail(0);
        } else {
            errno = EPERM;
            rb_sys_fail(0);
        }
#elif defined HAVE_SETGID
        if (getgid() == gid && SAVED_GROUP_ID == gid) {
            if (setgid(gid) < 0) rb_sys_fail(0);
        } else {
            errno = EPERM;
            rb_sys_fail(0);
        }
#else
        rb_notimplement();
#endif
    }
    return INT2FIX(gid);
}

/*
 *  call-seq:
 *     Process.euid           => fixnum
 *     Process::UID.eid       => fixnum
 *     Process::Sys.geteuid   => fixnum
 *
 *  Returns the effective user ID for this process.
 *
 *     Process.euid   #=> 501
 */

static VALUE
proc_geteuid(VALUE obj)
{
    int euid = geteuid();
    return INT2FIX(euid);
}

/*
 *  call-seq:
 *     Process.euid= integer
 *
 *  Sets the effective user ID for this process. Not available on all
 *  platforms.
 */

static VALUE
proc_seteuid(VALUE obj, VALUE euid)
{
    check_uid_switch();
#if defined(HAVE_SETRESUID) && !defined(__CHECKER__)
    if (setresuid(-1, NUM2INT(euid), -1) < 0) rb_sys_fail(0);
#elif defined HAVE_SETREUID
    if (setreuid(-1, NUM2INT(euid)) < 0) rb_sys_fail(0);
#elif defined HAVE_SETEUID
    if (seteuid(NUM2INT(euid)) < 0) rb_sys_fail(0);
#elif defined HAVE_SETUID
    euid = NUM2INT(euid);
    if (euid == getuid()) {
        if (setuid(euid) < 0) rb_sys_fail(0);
    }
    else {
        rb_notimplement();
    }
#else
    rb_notimplement();
#endif
    return euid;
}

static VALUE
rb_seteuid_core(int euid)
{
    int uid;

    check_uid_switch();

    uid = getuid();

#if defined(HAVE_SETRESUID) && !defined(__CHECKER__)
    if (uid != euid) {
        if (setresuid(-1,euid,euid) < 0) rb_sys_fail(0);
        SAVED_USER_ID = euid;
    } else {
        if (setresuid(-1,euid,-1) < 0) rb_sys_fail(0);
    }
#elif defined(HAVE_SETREUID) && !defined(OBSOLETE_SETREUID)
    if (setreuid(-1, euid) < 0) rb_sys_fail(0);
    if (uid != euid) {
        if (setreuid(euid,uid) < 0) rb_sys_fail(0);
        if (setreuid(uid,euid) < 0) rb_sys_fail(0);
        SAVED_USER_ID = euid;
    }
#elif defined HAVE_SETEUID
    if (seteuid(euid) < 0) rb_sys_fail(0);
#elif defined HAVE_SETUID
    if (geteuid() == 0) rb_sys_fail(0);
    if (setuid(euid) < 0) rb_sys_fail(0);
#else
    rb_notimplement();
#endif
    return INT2FIX(euid);
}

/*
 *  call-seq:
 *     Process::UID.grant_privilege(integer)   => fixnum
 *     Process::UID.eid= integer               => fixnum
 *
 *  Set the effective user ID, and if possible, the saved user ID of
 *  the process to the given _integer_. Returns the new
 *  effective user ID. Not available on all platforms.
 *
 *     [Process.uid, Process.euid]          #=> [0, 0]
 *     Process::UID.grant_privilege(31)     #=> 31
 *     [Process.uid, Process.euid]          #=> [0, 31]
 */

static VALUE
p_uid_grant_privilege(VALUE obj, VALUE id)
{
    return rb_seteuid_core(NUM2INT(id));
}

/*
 *  call-seq:
 *     Process.egid          => fixnum
 *     Process::GID.eid      => fixnum
 *     Process::Sys.geteid   => fixnum
 *
 *  Returns the effective group ID for this process. Not available on
 *  all platforms.
 *
 *     Process.egid   #=> 500
 */

static VALUE
proc_getegid(VALUE obj)
{
    int egid = getegid();

    return INT2FIX(egid);
}

/*
 *  call-seq:
 *     Process.egid = fixnum   => fixnum
 *
 *  Sets the effective group ID for this process. Not available on all
 *  platforms.
 */

static VALUE
proc_setegid(VALUE obj, VALUE egid)
{
    check_gid_switch();

#if defined(HAVE_SETRESGID) && !defined(__CHECKER__)
    if (setresgid(-1, NUM2INT(egid), -1) < 0) rb_sys_fail(0);
#elif defined HAVE_SETREGID
    if (setregid(-1, NUM2INT(egid)) < 0) rb_sys_fail(0);
#elif defined HAVE_SETEGID
    if (setegid(NUM2INT(egid)) < 0) rb_sys_fail(0);
#elif defined HAVE_SETGID
    egid = NUM2INT(egid);
    if (egid == getgid()) {
        if (setgid(egid) < 0) rb_sys_fail(0);
    }
    else {
        rb_notimplement();
    }
#else
    rb_notimplement();
#endif
    return egid;
}

static VALUE
rb_setegid_core(int egid)
{
    int gid;

    check_gid_switch();

    gid = getgid();

#if defined(HAVE_SETRESGID) && !defined(__CHECKER__)
    if (gid != egid) {
        if (setresgid(-1,egid,egid) < 0) rb_sys_fail(0);
        SAVED_GROUP_ID = egid;
    } else {
        if (setresgid(-1,egid,-1) < 0) rb_sys_fail(0);
    }
#elif defined(HAVE_SETREGID) && !defined(OBSOLETE_SETREGID)
    if (setregid(-1, egid) < 0) rb_sys_fail(0);
    if (gid != egid) {
        if (setregid(egid,gid) < 0) rb_sys_fail(0);
        if (setregid(gid,egid) < 0) rb_sys_fail(0);
        SAVED_GROUP_ID = egid;
    }
#elif defined HAVE_SETEGID
    if (setegid(egid) < 0) rb_sys_fail(0);
#elif defined HAVE_SETGID
    if (geteuid() == 0 /* root user */) rb_sys_fail(0);
    if (setgid(egid) < 0) rb_sys_fail(0);
#else
    rb_notimplement();
#endif
    return INT2FIX(egid);
}

/*
 *  call-seq:
 *     Process::GID.grant_privilege(integer)    => fixnum
 *     Process::GID.eid = integer               => fixnum
 *
 *  Set the effective group ID, and if possible, the saved group ID of
 *  the process to the given _integer_. Returns the new
 *  effective group ID. Not available on all platforms.
 *
 *     [Process.gid, Process.egid]          #=> [0, 0]
 *     Process::GID.grant_privilege(31)     #=> 33
 *     [Process.gid, Process.egid]          #=> [0, 33]
 */

static VALUE
p_gid_grant_privilege(VALUE obj, VALUE id)
{
    return rb_setegid_core(NUM2INT(id));
}

/*
 *  call-seq:
 *     Process::UID.re_exchangeable?   => true or false
 *
 *  Returns +true+ if the real and effective user IDs of a
 *  process may be exchanged on the current platform.
 *
 */

static VALUE
p_uid_exchangeable(void)
{
#if defined(HAVE_SETRESUID) &&  !defined(__CHECKER__)
    return Qtrue;
#elif defined(HAVE_SETREUID) && !defined(OBSOLETE_SETREUID)
    return Qtrue;
#else
    return Qfalse;
#endif
}

/*
 *  call-seq:
 *     Process::UID.re_exchange   => fixnum
 *
 *  Exchange real and effective user IDs and return the new effective
 *  user ID. Not available on all platforms.
 *
 *     [Process.uid, Process.euid]   #=> [0, 31]
 *     Process::UID.re_exchange      #=> 0
 *     [Process.uid, Process.euid]   #=> [31, 0]
 */

static VALUE
p_uid_exchange(VALUE obj)
{
    int uid, euid;

    check_uid_switch();

    uid = getuid();
    euid = geteuid();

#if defined(HAVE_SETRESUID) &&  !defined(__CHECKER__)
    if (setresuid(euid, uid, uid) < 0) rb_sys_fail(0);
    SAVED_USER_ID = uid;
#elif defined(HAVE_SETREUID) && !defined(OBSOLETE_SETREUID)
    if (setreuid(euid,uid) < 0) rb_sys_fail(0);
    SAVED_USER_ID = uid;
#else
    rb_notimplement();
#endif
    return INT2FIX(uid);
}

/*
 *  call-seq:
 *     Process::GID.re_exchangeable?   => true or false
 *
 *  Returns +true+ if the real and effective group IDs of a
 *  process may be exchanged on the current platform.
 *
 */

static VALUE
p_gid_exchangeable(void)
{
#if defined(HAVE_SETRESGID) &&  !defined(__CHECKER__)
    return Qtrue;
#elif defined(HAVE_SETREGID) && !defined(OBSOLETE_SETREGID)
    return Qtrue;
#else
    return Qfalse;
#endif
}

/*
 *  call-seq:
 *     Process::GID.re_exchange   => fixnum
 *
 *  Exchange real and effective group IDs and return the new effective
 *  group ID. Not available on all platforms.
 *
 *     [Process.gid, Process.egid]   #=> [0, 33]
 *     Process::GID.re_exchange      #=> 0
 *     [Process.gid, Process.egid]   #=> [33, 0]
 */

static VALUE
p_gid_exchange(VALUE obj)
{
    int gid, egid;

    check_gid_switch();

    gid = getgid();
    egid = getegid();

#if defined(HAVE_SETRESGID) &&  !defined(__CHECKER__)
    if (setresgid(egid, gid, gid) < 0) rb_sys_fail(0);
    SAVED_GROUP_ID = gid;
#elif defined(HAVE_SETREGID) && !defined(OBSOLETE_SETREGID)
    if (setregid(egid,gid) < 0) rb_sys_fail(0);
    SAVED_GROUP_ID = gid;
#else
    rb_notimplement();
#endif
    return INT2FIX(gid);
}

/* [MG] :FIXME: Is this correct? I'm not sure how to phrase this. */

/*
 *  call-seq:
 *     Process::UID.sid_available?   => true or false
 *
 *  Returns +true+ if the current platform has saved user
 *  ID functionality.
 *
 */

static VALUE
p_uid_have_saved_id(void)
{
#if defined(HAVE_SETRESUID) || defined(HAVE_SETEUID) || defined(_POSIX_SAVED_IDS)
    return Qtrue;
#else
    return Qfalse;
#endif
}

#if defined(HAVE_SETRESUID) || defined(HAVE_SETEUID) || defined(_POSIX_SAVED_IDS)
static VALUE
p_uid_sw_ensure(id)
    int id;
{
    under_uid_switch = 0;
    return rb_seteuid_core(id);
}

/*
 *  call-seq:
 *     Process::UID.switch              => fixnum
 *     Process::UID.switch {|| block}   => object
 *
 *  Switch the effective and real user IDs of the current process. If
 *  a <em>block</em> is given, the user IDs will be switched back
 *  after the block is executed. Returns the new effective user ID if
 *  called without a block, and the return value of the block if one
 *  is given.
 *
 */

static VALUE
p_uid_switch(obj)
    VALUE obj;
{
    int uid, euid;

    check_uid_switch();

    uid = getuid();
    euid = geteuid();

    if (uid != euid) {
        proc_seteuid(obj, INT2FIX(uid));
        if (rb_block_given_p()) {
            under_uid_switch = 1;
            return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, SAVED_USER_ID);
        } else {
            return INT2FIX(euid);
        }
    } else if (euid != SAVED_USER_ID) {
        proc_seteuid(obj, INT2FIX(SAVED_USER_ID));
        if (rb_block_given_p()) {
            under_uid_switch = 1;
            return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, euid);
        } else {
            return INT2FIX(uid);
        }
    } else {
        errno = EPERM;
        rb_sys_fail(0);
    }

#else
static VALUE
p_uid_sw_ensure(VALUE obj)
{
    under_uid_switch = 0;
    return p_uid_exchange(obj);
}

static VALUE
p_uid_switch(VALUE obj)
{
    int uid, euid;

    check_uid_switch();

    uid = getuid();
    euid = geteuid();

    if (uid == euid) {
        errno = EPERM;
        rb_sys_fail(0);
    }
    p_uid_exchange(obj);
    if (rb_block_given_p()) {
        under_uid_switch = 1;
        return rb_ensure(rb_yield, Qnil, p_uid_sw_ensure, obj);
    } else {
        return INT2FIX(euid);
    }
#endif
}

/* [MG] :FIXME: Is this correct? I'm not sure how to phrase this. */

/*
 *  call-seq:
 *     Process::GID.sid_available?   => true or false
 *
 *  Returns +true+ if the current platform has saved group
 *  ID functionality.
 *
 */

static VALUE
p_gid_have_saved_id(void)
{
#if defined(HAVE_SETRESGID) || defined(HAVE_SETEGID) || defined(_POSIX_SAVED_IDS)
    return Qtrue;
#else
    return Qfalse;
#endif
}

#if defined(HAVE_SETRESGID) || defined(HAVE_SETEGID) || defined(_POSIX_SAVED_IDS)
static VALUE
p_gid_sw_ensure(id)
    int id;
{
    under_gid_switch = 0;
    return rb_setegid_core(id);
}

/*
 *  call-seq:
 *     Process::GID.switch              => fixnum
 *     Process::GID.switch {|| block}   => object
 *
 *  Switch the effective and real group IDs of the current process. If
 *  a <em>block</em> is given, the group IDs will be switched back
 *  after the block is executed. Returns the new effective group ID if
 *  called without a block, and the return value of the block if one
 *  is given.
 *
 */

static VALUE
p_gid_switch(obj)
    VALUE obj;
{
    int gid, egid;

    check_gid_switch();

    gid = getgid();
    egid = getegid();

    if (gid != egid) {
        proc_setegid(obj, INT2FIX(gid));
        if (rb_block_given_p()) {
            under_gid_switch = 1;
            return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, SAVED_GROUP_ID);
        } else {
            return INT2FIX(egid);
        }
    } else if (egid != SAVED_GROUP_ID) {
        proc_setegid(obj, INT2FIX(SAVED_GROUP_ID));
        if (rb_block_given_p()) {
            under_gid_switch = 1;
            return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, egid);
        } else {
            return INT2FIX(gid);
        }
    } else {
        errno = EPERM;
        rb_sys_fail(0);
    }
#else
static VALUE
p_gid_sw_ensure(VALUE obj)
{
    under_gid_switch = 0;
    return p_gid_exchange(obj);
}

static VALUE
p_gid_switch(VALUE obj)
{
    int gid, egid;

    check_gid_switch();

    gid = getgid();
    egid = getegid();

    if (gid == egid) {
        errno = EPERM;
        rb_sys_fail(0);
    }
    p_gid_exchange(obj);
    if (rb_block_given_p()) {
        under_gid_switch = 1;
        return rb_ensure(rb_yield, Qnil, p_gid_sw_ensure, obj);
    } else {
        return INT2FIX(egid);
    }
#endif
}

/*
 *  call-seq:
 *     Process.times   => aStructTms
 *
 *  Returns a <code>Tms</code> structure (see <code>Struct::Tms</code>
 *  on page 388) that contains user and system CPU times for this
 *  process.
 *
 *     t = Process.times
 *     [ t.utime, t.stime ]   #=> [0.0, 0.02]
 */

VALUE
rb_proc_times(VALUE obj)
{
#if defined(HAVE_TIMES) && !defined(__CHECKER__)
#ifndef HZ
# ifdef CLK_TCK
#   define HZ CLK_TCK
# else
#   define HZ 60
# endif
#endif /* HZ */
    struct tms buf;
    volatile VALUE utime, stime, cutime, sctime;

    times(&buf);
    return rb_struct_new(S_Tms,
                         utime = rb_float_new((double)buf.tms_utime / HZ),
                         stime = rb_float_new((double)buf.tms_stime / HZ),
                         cutime = rb_float_new((double)buf.tms_cutime / HZ),
                         sctime = rb_float_new((double)buf.tms_cstime / HZ));
#else
    rb_notimplement();
#endif
}

VALUE rb_mProcess;
VALUE rb_mProcUID;
VALUE rb_mProcGID;
VALUE rb_mProcID_Syscall;

/*
 *  The <code>Process</code> module is a collection of methods used to
 *  manipulate processes.
 */

void
Init_process(void)
{
    rb_define_virtual_variable("$$", get_pid, 0);
    rb_define_readonly_variable("$?", &rb_last_status);
    rb_define_global_function("exec", rb_f_exec, -1);
    rb_define_global_function("fork", rb_f_fork, 0);
    rb_define_global_function("exit!", rb_f_exit_bang, -1);
    rb_define_global_function("system", rb_f_system, -1);
    rb_define_global_function("spawn", rb_f_spawn, -1);
    rb_define_global_function("sleep", rb_f_sleep, -1);

    rb_mProcess = rb_define_module("Process");

#if !defined(_WIN32) && !defined(DJGPP)
#ifdef WNOHANG
    rb_define_const(rb_mProcess, "WNOHANG", INT2FIX(WNOHANG));
#else
    rb_define_const(rb_mProcess, "WNOHANG", INT2FIX(0));
#endif
#ifdef WUNTRACED
    rb_define_const(rb_mProcess, "WUNTRACED", INT2FIX(WUNTRACED));
#else
    rb_define_const(rb_mProcess, "WUNTRACED", INT2FIX(0));
#endif
#endif

    rb_define_singleton_method(rb_mProcess, "exec", rb_f_exec, -1);
    rb_define_singleton_method(rb_mProcess, "fork", rb_f_fork, 0);
    rb_define_singleton_method(rb_mProcess, "spawn", rb_f_spawn, -1);
    rb_define_singleton_method(rb_mProcess, "exit!", rb_f_exit_bang, -1);
    rb_define_singleton_method(rb_mProcess, "exit", rb_f_exit, -1);   /* in eval.c */
    rb_define_singleton_method(rb_mProcess, "abort", rb_f_abort, -1); /* in eval.c */

    rb_define_module_function(rb_mProcess, "kill", rb_f_kill, -1); /* in signal.c */
    rb_define_module_function(rb_mProcess, "wait", proc_wait, -1);
    rb_define_module_function(rb_mProcess, "wait2", proc_wait2, -1);
    rb_define_module_function(rb_mProcess, "waitpid", proc_wait, -1);
    rb_define_module_function(rb_mProcess, "waitpid2", proc_wait2, -1);
    rb_define_module_function(rb_mProcess, "waitall", proc_waitall, 0);
    rb_define_module_function(rb_mProcess, "detach", proc_detach, 1);

    rb_cProcStatus = rb_define_class_under(rb_mProcess, "Status", rb_cObject);
    rb_undef_method(CLASS_OF(rb_cProcStatus), "new");

    rb_define_method(rb_cProcStatus, "==", pst_equal, 1);
    rb_define_method(rb_cProcStatus, "&", pst_bitand, 1);
    rb_define_method(rb_cProcStatus, ">>", pst_rshift, 1);
    rb_define_method(rb_cProcStatus, "to_i", pst_to_i, 0);
    rb_define_method(rb_cProcStatus, "to_int", pst_to_i, 0);
    rb_define_method(rb_cProcStatus, "to_s", pst_to_s, 0);
    rb_define_method(rb_cProcStatus, "inspect", pst_inspect, 0);

    rb_define_method(rb_cProcStatus, "pid", pst_pid, 0);

    rb_define_method(rb_cProcStatus, "stopped?", pst_wifstopped, 0);
    rb_define_method(rb_cProcStatus, "stopsig", pst_wstopsig, 0);
    rb_define_method(rb_cProcStatus, "signaled?", pst_wifsignaled, 0);
    rb_define_method(rb_cProcStatus, "termsig", pst_wtermsig, 0);
    rb_define_method(rb_cProcStatus, "exited?", pst_wifexited, 0);
    rb_define_method(rb_cProcStatus, "exitstatus", pst_wexitstatus, 0);
    rb_define_method(rb_cProcStatus, "success?", pst_success_p, 0);
    rb_define_method(rb_cProcStatus, "coredump?", pst_wcoredump, 0);

    rb_define_module_function(rb_mProcess, "pid", get_pid, 0);
    rb_define_module_function(rb_mProcess, "ppid", get_ppid, 0);

    rb_define_module_function(rb_mProcess, "getpgrp", proc_getpgrp, 0);
    rb_define_module_function(rb_mProcess, "setpgrp", proc_setpgrp, 0);
    rb_define_module_function(rb_mProcess, "getpgid", proc_getpgid, 1);
    rb_define_module_function(rb_mProcess, "setpgid", proc_setpgid, 2);

    rb_define_module_function(rb_mProcess, "setsid", proc_setsid, 0);

    rb_define_module_function(rb_mProcess, "getpriority", proc_getpriority, 2);
    rb_define_module_function(rb_mProcess, "setpriority", proc_setpriority, 3);

#ifdef HAVE_GETPRIORITY
    rb_define_const(rb_mProcess, "PRIO_PROCESS", INT2FIX(PRIO_PROCESS));
    rb_define_const(rb_mProcess, "PRIO_PGRP", INT2FIX(PRIO_PGRP));
    rb_define_const(rb_mProcess, "PRIO_USER", INT2FIX(PRIO_USER));
#endif

#ifdef HAVE_GETRLIMIT
    rb_define_module_function(rb_mProcess, "getrlimit", proc_getrlimit, 1);
#endif
#ifdef HAVE_SETRLIMIT
    rb_define_module_function(rb_mProcess, "setrlimit", proc_setrlimit, -1);
#endif
#ifdef RLIM2NUM
#ifdef RLIM_INFINITY
    rb_define_const(rb_mProcess, "RLIM_INFINITY", RLIM2NUM(RLIM_INFINITY));
#endif
#ifdef RLIM_SAVED_MAX
    rb_define_const(rb_mProcess, "RLIM_SAVED_MAX", RLIM2NUM(RLIM_SAVED_MAX));
#endif
#ifdef RLIM_SAVED_CUR
    rb_define_const(rb_mProcess, "RLIM_SAVED_CUR", RLIM2NUM(RLIM_SAVED_CUR));
#endif
#ifdef RLIMIT_CORE
    rb_define_const(rb_mProcess, "RLIMIT_CORE", INT2FIX(RLIMIT_CORE));
#endif
#ifdef RLIMIT_CPU
    rb_define_const(rb_mProcess, "RLIMIT_CPU", INT2FIX(RLIMIT_CPU));
#endif
#ifdef RLIMIT_DATA
    rb_define_const(rb_mProcess, "RLIMIT_DATA", INT2FIX(RLIMIT_DATA));
#endif
#ifdef RLIMIT_FSIZE
    rb_define_const(rb_mProcess, "RLIMIT_FSIZE", INT2FIX(RLIMIT_FSIZE));
#endif
#ifdef RLIMIT_NOFILE
    rb_define_const(rb_mProcess, "RLIMIT_NOFILE", INT2FIX(RLIMIT_NOFILE));
#endif
#ifdef RLIMIT_STACK
    rb_define_const(rb_mProcess, "RLIMIT_STACK", INT2FIX(RLIMIT_STACK));
#endif
#ifdef RLIMIT_AS
    rb_define_const(rb_mProcess, "RLIMIT_AS", INT2FIX(RLIMIT_AS));
#endif
#ifdef RLIMIT_MEMLOCK
    rb_define_const(rb_mProcess, "RLIMIT_MEMLOCK", INT2FIX(RLIMIT_MEMLOCK));
#endif
#ifdef RLIMIT_NPROC
    rb_define_const(rb_mProcess, "RLIMIT_NPROC", INT2FIX(RLIMIT_NPROC));
#endif
#ifdef RLIMIT_RSS
    rb_define_const(rb_mProcess, "RLIMIT_RSS", INT2FIX(RLIMIT_RSS));
#endif
#ifdef RLIMIT_SBSIZE
    rb_define_const(rb_mProcess, "RLIMIT_SBSIZE", INT2FIX(RLIMIT_SBSIZE));
#endif
#endif

    rb_define_module_function(rb_mProcess, "uid", proc_getuid, 0);
    rb_define_module_function(rb_mProcess, "uid=", proc_setuid, 1);
    rb_define_module_function(rb_mProcess, "gid", proc_getgid, 0);
    rb_define_module_function(rb_mProcess, "gid=", proc_setgid, 1);
    rb_define_module_function(rb_mProcess, "euid", proc_geteuid, 0);
    rb_define_module_function(rb_mProcess, "euid=", proc_seteuid, 1);
    rb_define_module_function(rb_mProcess, "egid", proc_getegid, 0);
    rb_define_module_function(rb_mProcess, "egid=", proc_setegid, 1);
    rb_define_module_function(rb_mProcess, "initgroups", proc_initgroups, 2);
    rb_define_module_function(rb_mProcess, "groups", proc_getgroups, 0);
    rb_define_module_function(rb_mProcess, "groups=", proc_setgroups, 1);
    rb_define_module_function(rb_mProcess, "maxgroups", proc_getmaxgroups, 0);
    rb_define_module_function(rb_mProcess, "maxgroups=", proc_setmaxgroups, 1);

    rb_define_module_function(rb_mProcess, "daemon", proc_daemon, -1);

    rb_define_module_function(rb_mProcess, "times", rb_proc_times, 0);

#if defined(HAVE_TIMES) || defined(_WIN32)
    S_Tms = rb_struct_define("Tms", "utime", "stime", "cutime", "cstime", NULL);
#endif

    SAVED_USER_ID = geteuid();
    SAVED_GROUP_ID = getegid();

    rb_mProcUID = rb_define_module_under(rb_mProcess, "UID");
    rb_mProcGID = rb_define_module_under(rb_mProcess, "GID");

    rb_define_module_function(rb_mProcUID, "rid", proc_getuid, 0);
    rb_define_module_function(rb_mProcGID, "rid", proc_getgid, 0);
    rb_define_module_function(rb_mProcUID, "eid", proc_geteuid, 0);
    rb_define_module_function(rb_mProcGID, "eid", proc_getegid, 0);
    rb_define_module_function(rb_mProcUID, "change_privilege", p_uid_change_privilege, 1);
    rb_define_module_function(rb_mProcGID, "change_privilege", p_gid_change_privilege, 1);
    rb_define_module_function(rb_mProcUID, "grant_privilege", p_uid_grant_privilege, 1);
    rb_define_module_function(rb_mProcGID, "grant_privilege", p_gid_grant_privilege, 1);
    rb_define_alias(rb_mProcUID, "eid=", "grant_privilege");
    rb_define_alias(rb_mProcGID, "eid=", "grant_privilege");
    rb_define_module_function(rb_mProcUID, "re_exchange", p_uid_exchange, 0);
    rb_define_module_function(rb_mProcGID, "re_exchange", p_gid_exchange, 0);
    rb_define_module_function(rb_mProcUID, "re_exchangeable?", p_uid_exchangeable, 0);
    rb_define_module_function(rb_mProcGID, "re_exchangeable?", p_gid_exchangeable, 0);
    rb_define_module_function(rb_mProcUID, "sid_available?", p_uid_have_saved_id, 0);
    rb_define_module_function(rb_mProcGID, "sid_available?", p_gid_have_saved_id, 0);
    rb_define_module_function(rb_mProcUID, "switch", p_uid_switch, 0);
    rb_define_module_function(rb_mProcGID, "switch", p_gid_switch, 0);

    rb_mProcID_Syscall = rb_define_module_under(rb_mProcess, "Sys");

    rb_define_module_function(rb_mProcID_Syscall, "getuid", proc_getuid, 0);
    rb_define_module_function(rb_mProcID_Syscall, "geteuid", proc_geteuid, 0);
    rb_define_module_function(rb_mProcID_Syscall, "getgid", proc_getgid, 0);
    rb_define_module_function(rb_mProcID_Syscall, "getegid", proc_getegid, 0);

    rb_define_module_function(rb_mProcID_Syscall, "setuid", p_sys_setuid, 1);
    rb_define_module_function(rb_mProcID_Syscall, "setgid", p_sys_setgid, 1);

    rb_define_module_function(rb_mProcID_Syscall, "setruid", p_sys_setruid, 1);
    rb_define_module_function(rb_mProcID_Syscall, "setrgid", p_sys_setrgid, 1);

    rb_define_module_function(rb_mProcID_Syscall, "seteuid", p_sys_seteuid, 1);
    rb_define_module_function(rb_mProcID_Syscall, "setegid", p_sys_setegid, 1);

    rb_define_module_function(rb_mProcID_Syscall, "setreuid", p_sys_setreuid, 2);
    rb_define_module_function(rb_mProcID_Syscall, "setregid", p_sys_setregid, 2);

    rb_define_module_function(rb_mProcID_Syscall, "setresuid", p_sys_setresuid, 3);
    rb_define_module_function(rb_mProcID_Syscall, "setresgid", p_sys_setresgid, 3);
    rb_define_module_function(rb_mProcID_Syscall, "issetugid", p_sys_issetugid, 0);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


random.c

root/random.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. init_genrand
  2. init_by_array
  3. next_state
  4. genrand_int32
  5. genrand_real
  6. rand_init
  7. random_seed
  8. rb_f_srand
  9. make_mask
  10. limited_rand
  11. limited_big_rand
  12. rb_f_rand
  13. Init_Random
/**********************************************************************

  random.c -

  $Author: ocean $
  $Date: 2005/09/12 10:44:20 $
  created at: Fri Dec 24 16:39:21 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

/*
This is based on trimmed version of MT19937.  To get the original version,
contact <http://www.math.keio.ac.jp/~matumoto/emt.html>.

The original copyright notice follows.

   A C-program for MT19937, with initialization improved 2002/2/10.
   Coded by Takuji Nishimura and Makoto Matsumoto.
   This is a faster version by taking Shawn Cokus's optimization,
   Matthe Bellew's simplification, Isaku Wada's real version.

   Before using, initialize the state by using init_genrand(seed)
   or init_by_array(init_key, key_length).

   Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
   All rights reserved.

   Redistribution and use in source and binary forms, with or without
   modification, are permitted provided that the following conditions
   are met:

     1. Redistributions of source code must retain the above copyright
        notice, this list of conditions and the following disclaimer.

     2. Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the
        documentation and/or other materials provided with the distribution.

     3. The names of its contributors may not be used to endorse or promote
        products derived from this software without specific prior written
        permission.

   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
   A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

   Any feedback is very welcome.
   http://www.math.keio.ac.jp/matumoto/emt.html
   email: matumoto@math.keio.ac.jp
*/

/* Period parameters */
#define N 624
#define M 397
#define MATRIX_A 0x9908b0dfUL   /* constant vector a */
#define UMASK 0x80000000UL /* most significant w-r bits */
#define LMASK 0x7fffffffUL /* least significant r bits */
#define MIXBITS(u,v) ( ((u) & UMASK) | ((v) & LMASK) )
#define TWIST(u,v) ((MIXBITS(u,v) >> 1) ^ ((v)&1UL ? MATRIX_A : 0UL))

static unsigned long state[N]; /* the array for the state vector  */
static int left = 1;
static int initf = 0;
static unsigned long *next;

/* initializes state[N] with a seed */
static void
init_genrand(unsigned long s)
{
    int j;
    state[0]= s & 0xffffffffUL;
    for (j=1; j<N; j++) {
        state[j] = (1812433253UL * (state[j-1] ^ (state[j-1] >> 30)) + j);
        /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */
        /* In the previous versions, MSBs of the seed affect   */
        /* only MSBs of the array state[].                        */
        /* 2002/01/09 modified by Makoto Matsumoto             */
        state[j] &= 0xffffffffUL;  /* for >32 bit machines */
    }
    left = 1; initf = 1;
}

/* initialize by an array with array-length */
/* init_key is the array for initializing keys */
/* key_length is its length */
/* slight change for C++, 2004/2/26 */
static void
init_by_array(unsigned long init_key[], int key_length)
{
    int i, j, k;
    init_genrand(19650218UL);
    i=1; j=0;
    k = (N>key_length ? N : key_length);
    for (; k; k--) {
        state[i] = (state[i] ^ ((state[i-1] ^ (state[i-1] >> 30)) * 1664525UL))
          + init_key[j] + j; /* non linear */
        state[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */
        i++; j++;
        if (i>=N) { state[0] = state[N-1]; i=1; }
        if (j>=key_length) j=0;
    }
    for (k=N-1; k; k--) {
        state[i] = (state[i] ^ ((state[i-1] ^ (state[i-1] >> 30)) * 1566083941UL))
          - i; /* non linear */
        state[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */
        i++;
        if (i>=N) { state[0] = state[N-1]; i=1; }
    }

    state[0] = 0x80000000UL; /* MSB is 1; assuring non-zero initial array */
    left = 1; initf = 1;
}

static void
next_state(void)
{
    unsigned long *p=state;
    int j;

    /* if init_genrand() has not been called, */
    /* a default initial seed is used         */
    if (initf==0) init_genrand(5489UL);

    left = N;
    next = state;

    for (j=N-M+1; --j; p++)
        *p = p[M] ^ TWIST(p[0], p[1]);

    for (j=M; --j; p++)
        *p = p[M-N] ^ TWIST(p[0], p[1]);

    *p = p[M-N] ^ TWIST(p[0], state[0]);
}

/* generates a random number on [0,0xffffffff]-interval */
static unsigned long
genrand_int32(void)
{
    unsigned long y;

    if (--left == 0) next_state();
    y = *next++;

    /* Tempering */
    y ^= (y >> 11);
    y ^= (y << 7) & 0x9d2c5680UL;
    y ^= (y << 15) & 0xefc60000UL;
    y ^= (y >> 18);

    return y;
}

/* generates a random number on [0,1) with 53-bit resolution*/
static double
genrand_real(void)
{
    unsigned long a=genrand_int32()>>5, b=genrand_int32()>>6;
    return(a*67108864.0+b)*(1.0/9007199254740992.0);
}
/* These real versions are due to Isaku Wada, 2002/01/09 added */

#undef N
#undef M

/* These real versions are due to Isaku Wada, 2002/01/09 added */

#include "ruby.h"

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif

static int first = 1;
static VALUE saved_seed = INT2FIX(0);

static VALUE
rand_init(VALUE vseed)
{
    volatile VALUE seed;
    VALUE old;
    long len;
    unsigned long *buf;

    seed = rb_to_int(vseed);
    switch (TYPE(seed)) {
      case T_FIXNUM:
          len = sizeof(VALUE);
          break;
      case T_BIGNUM:
          len = RBIGNUM(seed)->len * SIZEOF_BDIGITS;
          if (len == 0)
              len = 4;
          break;
      default:
          rb_raise(rb_eTypeError, "failed to convert %s into Integer",
                   rb_obj_classname(vseed));
    }
    len = (len + 3) / 4; /* number of 32bit words */
    buf = ALLOC_N(unsigned long, len); /* allocate longs for init_by_array */
    memset(buf, 0, len * sizeof(long));
    if (FIXNUM_P(seed)) {
        buf[0] = FIX2ULONG(seed) & 0xffffffff;
#if SIZEOF_LONG > 4
        buf[1] = FIX2ULONG(seed) >> 32;
#endif
    }
    else {
        int i, j;
        for (i = RBIGNUM(seed)->len-1; 0 <= i; i--) {
            j = i * SIZEOF_BDIGITS / 4;
#if SIZEOF_BDIGITS < 4
            buf[j] <<= SIZEOF_BDIGITS * 8;
#endif
            buf[j] |= ((BDIGIT *)RBIGNUM(seed)->digits)[i];
        }
    }
    while (1 < len && buf[len-1] == 0) {
        len--;
    }
    if (len <= 1) {
        init_genrand(buf[0]);
    }
    else {
        if (buf[len-1] == 1) /* remove leading-zero-guard */
            len--;
        init_by_array(buf, len);
    }
    first = 0;
    old = saved_seed;
    saved_seed = seed;
    free(buf);
    return old;
}

static VALUE
random_seed(void)
{
    static int n = 0;
    struct timeval tv;
    int fd;
    struct stat statbuf;

    int seed_len;
    BDIGIT *digits;
    unsigned long *seed;
    NEWOBJ(big, struct RBignum);
    OBJSETUP(big, rb_cBignum, T_BIGNUM);

    seed_len = 4 * sizeof(long);
    big->sign = 1;
    big->len = seed_len / SIZEOF_BDIGITS + 1;
    digits = big->digits = ALLOC_N(BDIGIT, big->len);
    seed = (unsigned long *)big->digits;

    memset(digits, 0, big->len * SIZEOF_BDIGITS);

#ifdef S_ISCHR
    if ((fd = open("/dev/urandom", O_RDONLY
#ifdef O_NONBLOCK
            |O_NONBLOCK
#endif
#ifdef O_NOCTTY
            |O_NOCTTY
#endif
#ifdef O_NOFOLLOW
            |O_NOFOLLOW
#endif
            )) >= 0) {
        if (fstat(fd, &statbuf) == 0 && S_ISCHR(statbuf.st_mode)) {
            read(fd, seed, seed_len);
        }
        close(fd);
    }
#endif

    gettimeofday(&tv, 0);
    seed[0] ^= tv.tv_usec;
    seed[1] ^= tv.tv_sec;
    seed[2] ^= getpid() ^ (n++ << 16);
    seed[3] ^= (unsigned long)&seed;

    /* set leading-zero-guard if need. */
    digits[big->len-1] = digits[big->len-2] <= 1 ? 1 : 0;

    return rb_big_norm((VALUE)big);
}

/*
 *  call-seq:
 *     srand(number=0)    => old_seed
 *
 *  Seeds the pseudorandom number generator to the value of
 *  <i>number</i>.<code>to_i.abs</code>. If <i>number</i> is omitted
 *  or zero, seeds the generator using a combination of the time, the
 *  process id, and a sequence number. (This is also the behavior if
 *  <code>Kernel::rand</code> is called without previously calling
 *  <code>srand</code>, but without the sequence.) By setting the seed
 *  to a known value, scripts can be made deterministic during testing.
 *  The previous seed value is returned. Also see <code>Kernel::rand</code>.
 */

static VALUE
rb_f_srand(int argc, VALUE *argv, VALUE obj)
{
    VALUE seed, old;

    rb_secure(4);
    if (rb_scan_args(argc, argv, "01", &seed) == 0) {
        seed = random_seed();
    }
    old = rand_init(seed);

    return old;
}

static unsigned long
make_mask(unsigned long x)
{
    x = x | x >> 1;
    x = x | x >> 2;
    x = x | x >> 4;
    x = x | x >> 8;
    x = x | x >> 16;
#if 4 < SIZEOF_LONG
    x = x | x >> 32;
#endif
    return x;
}

static unsigned long
limited_rand(unsigned long limit)
{
    unsigned long mask = make_mask(limit);
    int i;
    unsigned long val;

  retry:
    val = 0;
    for (i = SIZEOF_LONG/4-1; 0 <= i; i--) {
        if (mask >> (i * 32)) {
            val |= genrand_int32() << (i * 32);
            val &= mask;
            if (limit < val)
                goto retry;
        }
    }
    return val;
}

static VALUE
limited_big_rand(struct RBignum *limit)
{
    unsigned long mask, lim, rnd;
    struct RBignum *val;
    int i, len, boundary;

    len = (limit->len * SIZEOF_BDIGITS + 3) / 4;
    val = (struct RBignum *)rb_big_clone((VALUE)limit);
    val->sign = 1;
#if SIZEOF_BDIGITS == 2
# define BIG_GET32(big,i) (((BDIGIT *)(big)->digits)[(i)*2] | \
                           ((i)*2+1 < (big)->len ? (((BDIGIT *)(big)->digits)[(i)*2+1] << 16) \
                                                 : 0))
# define BIG_SET32(big,i,d) ((((BDIGIT *)(big)->digits)[(i)*2] = (d) & 0xffff), \
                             ((i)*2+1 < (big)->len ? (((BDIGIT *)(big)->digits)[(i)*2+1] = (d) >> 16) \
                                                   : 0))
#else
    /* SIZEOF_BDIGITS == 4 */
# define BIG_GET32(big,i) (((BDIGIT *)(big)->digits)[i])
# define BIG_SET32(big,i,d) (((BDIGIT *)(big)->digits)[i] = (d))
#endif
  retry:
    mask = 0;
    boundary = 1;
    for (i = len-1; 0 <= i; i--) {
        lim = BIG_GET32(limit, i);
        mask = mask ? 0xffffffff : make_mask(lim);
        if (mask) {
            rnd = genrand_int32() & mask;
            if (boundary) {
                if (lim < rnd)
                    goto retry;
                if (rnd < lim)
                    boundary = 0;
            }
        }
        else {
            rnd = 0;
        }
        BIG_SET32(val, i, rnd);
    }
    return rb_big_norm((VALUE)val);
}

/*
 *  call-seq:
 *     rand(max=0)    => number
 *
 *  Converts <i>max</i> to an integer using max1 =
 *  max<code>.to_i.abs</code>. If the result is zero, returns a
 *  pseudorandom floating point number greater than or equal to 0.0 and
 *  less than 1.0. Otherwise, returns a pseudorandom integer greater
 *  than or equal to zero and less than max1. <code>Kernel::srand</code>
 *  may be used to ensure repeatable sequences of random numbers between
 *  different runs of the program. Ruby currently uses a modified
 *  Mersenne Twister with a period of 219937-1.
 *
 *     srand 1234                 #=> 0
 *     [ rand,  rand ]            #=> [0.191519450163469, 0.49766366626136]
 *     [ rand(10), rand(1000) ]   #=> [6, 817]
 *     srand 1234                 #=> 1234
 *     [ rand,  rand ]            #=> [0.191519450163469, 0.49766366626136]
 */

static VALUE
rb_f_rand(int argc, VALUE *argv, VALUE obj)
{
    VALUE vmax;
    long val, max;

    rb_scan_args(argc, argv, "01", &vmax);
    if (first) {
        rand_init(random_seed());
    }
    switch (TYPE(vmax)) {
      case T_FLOAT:
        if (RFLOAT(vmax)->value <= LONG_MAX && RFLOAT(vmax)->value >= LONG_MIN) {
            max = (long)RFLOAT(vmax)->value;
            break;
        }
        if (RFLOAT(vmax)->value < 0)
            vmax = rb_dbl2big(-RFLOAT(vmax)->value);
        else
            vmax = rb_dbl2big(RFLOAT(vmax)->value);
        /* fall through */
      case T_BIGNUM:
      bignum:
        {
            struct RBignum *limit = (struct RBignum *)vmax;
            if (!limit->sign) {
                limit = (struct RBignum *)rb_big_clone(vmax);
                limit->sign = 1;
            }
            limit = (struct RBignum *)rb_big_minus((VALUE)limit, INT2FIX(1));
            if (FIXNUM_P((VALUE)limit)) {
                if (FIX2LONG((VALUE)limit) == -1)
                    return rb_float_new(genrand_real());
                return LONG2NUM(limited_rand(FIX2LONG((VALUE)limit)));
            }
            return limited_big_rand(limit);
        }
      case T_NIL:
        max = 0;
        break;
      default:
        vmax = rb_Integer(vmax);
        if (TYPE(vmax) == T_BIGNUM) goto bignum;
      case T_FIXNUM:
        max = FIX2LONG(vmax);
        break;
    }

    if (max == 0) {
        return rb_float_new(genrand_real());
    }
    if (max < 0) max = -max;
    val = limited_rand(max-1);
    return LONG2NUM(val);
}

void
Init_Random(void)
{
    rb_define_global_function("srand", rb_f_srand, -1);
    rb_define_global_function("rand", rb_f_rand, -1);
    rb_global_variable(&saved_seed);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


range.c

root/range.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. range_failed
  2. range_check
  3. range_init
  4. rb_range_new
  5. range_initialize
  6. range_exclude_end_p
  7. range_eq
  8. r_lt
  9. r_le
  10. range_eql
  11. range_hash
  12. str_step
  13. range_each_func
  14. step_i
  15. range_step
  16. each_i
  17. range_each
  18. range_first
  19. range_last
  20. range_min
  21. range_max
  22. rb_range_beg_len
  23. range_to_s
  24. range_inspect
  25. range_include
  26. range_cover
  27. Init_Range
/**********************************************************************

  range.c -

  $Author: matz $
  $Date: 2005/12/12 01:01:29 $
  created at: Thu Aug 19 17:46:47 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#include "ruby.h"

VALUE rb_cRange;
static ID id_cmp, id_succ, id_beg, id_end, id_excl;

#define EXCL(r) RTEST(rb_ivar_get((r), id_excl))
#define SET_EXCL(r,v) rb_ivar_set((r), id_excl, (v) ? Qtrue : Qfalse)

static VALUE
range_failed(void)
{
    rb_raise(rb_eArgError, "bad value for range");
    return Qnil;                /* dummy */
}

static VALUE
range_check(VALUE *args)
{
    return rb_funcall(args[0], id_cmp, 1, args[1]);
}

static void
range_init(VALUE range, VALUE beg, VALUE end, int exclude_end)
{
    VALUE args[2];

    args[0] = beg;
    args[1] = end;

    if (!FIXNUM_P(beg) || !FIXNUM_P(end)) {
        VALUE v;

        v = rb_rescue(range_check, (VALUE)args, range_failed, 0);
        if (NIL_P(v)) range_failed();
    }

    SET_EXCL(range, exclude_end);
    rb_ivar_set(range, id_beg, beg);
    rb_ivar_set(range, id_end, end);
}

VALUE
rb_range_new(VALUE beg, VALUE end, int exclude_end)
{
    VALUE range = rb_obj_alloc(rb_cRange);

    range_init(range, beg, end, exclude_end);
    return range;
}

/*
 *  call-seq:
 *     Range.new(start, end, exclusive=false)    => range
 *
 *  Constructs a range using the given <i>start</i> and <i>end</i>. If the third
 *  parameter is omitted or is <code>false</code>, the <i>range</i> will include
 *  the end object; otherwise, it will be excluded.
 */

static VALUE
range_initialize(int argc, VALUE *argv, VALUE range)
{
    VALUE beg, end, flags;

    rb_scan_args(argc, argv, "21", &beg, &end, &flags);
    /* Ranges are immutable, so that they should be initialized only once. */
    if (rb_ivar_defined(range, id_beg)) {
        rb_name_error(rb_intern("initialize"), "`initialize' called twice");
    }
    range_init(range, beg, end, RTEST(flags));
    return Qnil;
}

/*
 *  call-seq:
 *     rng.exclude_end?    => true or false
 *
 *  Returns <code>true</code> if <i>rng</i> excludes its end value.
 */

static VALUE
range_exclude_end_p(VALUE range)
{
    return EXCL(range) ? Qtrue : Qfalse;
}

/*
 *  call-seq:
 *     rng == obj    => true or false
 *
 *  Returns <code>true</code> only if <i>obj</i> is a Range, has equivalent
 *  beginning and end items (by comparing them with <code>==</code>), and has
 *  the same #exclude_end? setting as <i>rng</t>.
 *
 *    (0..2) == (0..2)            #=> true
 *    (0..2) == Range.new(0,2)    #=> true
 *    (0..2) == (0...2)           #=> false
 *
 */

static VALUE
range_eq(VALUE range, VALUE obj)
{
    if (range == obj) return Qtrue;
    if (!rb_obj_is_instance_of(obj, rb_obj_class(range)))
        return Qfalse;

    if (!rb_equal(rb_ivar_get(range, id_beg), rb_ivar_get(obj, id_beg)))
        return Qfalse;
    if (!rb_equal(rb_ivar_get(range, id_end), rb_ivar_get(obj, id_end)))
        return Qfalse;

    if (EXCL(range) != EXCL(obj)) return Qfalse;

    return Qtrue;
}

static int
r_lt(VALUE a, VALUE b)
{
    VALUE r = rb_funcall(a, id_cmp, 1, b);

    if (NIL_P(r)) return Qfalse;
    if (rb_cmpint(r, a, b) < 0) return Qtrue;
    return Qfalse;
}

static int
r_le(VALUE a, VALUE b)
{
    int c;
    VALUE r = rb_funcall(a, id_cmp, 1, b);

    if (NIL_P(r)) return Qfalse;
    c = rb_cmpint(r, a, b);
    if (c == 0) return INT2FIX(0);
    if (c < 0) return Qtrue;
    return Qfalse;
}

/*
 *  call-seq:
 *     rng.eql?(obj)    => true or false
 *
 *  Returns <code>true</code> only if <i>obj</i> is a Range, has equivalent
 *  beginning and end items (by comparing them with #eql?), and has the same
 *  #exclude_end? setting as <i>rng</i>.
 *
 *    (0..2) == (0..2)            #=> true
 *    (0..2) == Range.new(0,2)    #=> true
 *    (0..2) == (0...2)           #=> false
 *
 */

static VALUE
range_eql(VALUE range, VALUE obj)
{
    if (range == obj) return Qtrue;
    if (!rb_obj_is_instance_of(obj, rb_obj_class(range)))
        return Qfalse;

    if (!rb_eql(rb_ivar_get(range, id_beg), rb_ivar_get(obj, id_beg)))
        return Qfalse;
    if (!rb_eql(rb_ivar_get(range, id_end), rb_ivar_get(obj, id_end)))
        return Qfalse;

    if (EXCL(range) != EXCL(obj)) return Qfalse;

    return Qtrue;
}

/*
 * call-seq:
 *   rng.hash    => fixnum
 *
 * Generate a hash value such that two ranges with the same start and
 * end points, and the same value for the "exclude end" flag, generate
 * the same hash value.
 */

static VALUE
range_hash(VALUE range)
{
    long hash = EXCL(range);
    VALUE v;

    v = rb_hash(rb_ivar_get(range, id_beg));
    hash ^= v << 1;
    v = rb_hash(rb_ivar_get(range, id_end));
    hash ^= v << 9;
    hash ^= EXCL(range) << 24;

    return LONG2FIX(hash);
}

static VALUE
str_step(VALUE arg)
{
    VALUE *args = (VALUE *)arg;

    return rb_str_upto(args[0], args[1], EXCL(args[2]));
}

static void
range_each_func(VALUE range, VALUE (*func) (VALUE, void *), VALUE v, VALUE e, void *arg)
{
    int c;

    if (EXCL(range)) {
        while (r_lt(v, e)) {
            (*func)(v, arg);
            v = rb_funcall(v, id_succ, 0, 0);
        }
    }
    else {
        while (RTEST(c = r_le(v, e))) {
            (*func)(v, arg);
            if (c == INT2FIX(0)) break;
            v = rb_funcall(v, id_succ, 0, 0);
        }
    }
}

static VALUE
step_i(VALUE i, void *arg)
{
    long *iter = (long *)arg;

    iter[0]--;
    if (iter[0] == 0) {
        rb_yield(i);
        iter[0] = iter[1];
    }
    return Qnil;
}

/*
 *  call-seq:
 *     rng.step(n=1) {| obj | block }    => rng
 *
 *  Iterates over <i>rng</i>, passing each <i>n</i>th element to the block. If
 *  the range contains numbers or strings, natural ordering is used.  Otherwise
 *  <code>step</code> invokes <code>succ</code> to iterate through range
 *  elements. The following code uses class <code>Xs</code>, which is defined
 *  in the class-level documentation.
 *
 *     range = Xs.new(1)..Xs.new(10)
 *     range.step(2) {|x| puts x}
 *     range.step(3) {|x| puts x}
 *
 *  <em>produces:</em>
 *
 *      1 x
 *      3 xxx
 *      5 xxxxx
 *      7 xxxxxxx
 *      9 xxxxxxxxx
 *      1 x
 *      4 xxxx
 *      7 xxxxxxx
 *     10 xxxxxxxxxx
 */

static VALUE
range_step(int argc, VALUE *argv, VALUE range)
{
    VALUE b, e, step;
    long unit;

    RETURN_ENUMERATOR(range, argc, argv);

    b = rb_ivar_get(range, id_beg);
    e = rb_ivar_get(range, id_end);
    if (rb_scan_args(argc, argv, "01", &step) == 0) {
        step = INT2FIX(1);
    }

    unit = NUM2LONG(step);
    if (unit < 0) {
        rb_raise(rb_eArgError, "step can't be negative");
    }
    if (unit == 0) rb_raise(rb_eArgError, "step can't be 0");
    if (FIXNUM_P(b) && FIXNUM_P(e)) { /* fixnums are special */
        long end = FIX2LONG(e);
        long i;

        if (!EXCL(range)) end += 1;
        for (i=FIX2LONG(b); i<end; i+=unit) {
            rb_yield(LONG2NUM(i));
        }
    }
    else {
        VALUE tmp = rb_check_string_type(b);

        if (!NIL_P(tmp)) {
            VALUE args[5];
            long iter[2];

            b = tmp;
            args[0] = b; args[1] = e; args[2] = range;
            iter[0] = 1; iter[1] = unit;
            rb_iterate(str_step, (VALUE)args, step_i, (VALUE)iter);
        }
        else if (rb_obj_is_kind_of(b, rb_cNumeric)) {
            ID c = rb_intern(EXCL(range) ? "<" : "<=");

            if (rb_equal(step, INT2FIX(0))) rb_raise(rb_eArgError, "step can't be 0");
            while (RTEST(rb_funcall(b, c, 1, e))) {
                rb_yield(b);
                b = rb_funcall(b, '+', 1, step);
            }
        }
        else {
            long args[2];

            if (!rb_respond_to(b, id_succ)) {
                rb_raise(rb_eTypeError, "can't iterate from %s",
                         rb_obj_classname(b));
            }
            args[0] = 1;
            args[1] = unit;
            range_each_func(range, step_i, b, e, args);
        }
    }
    return range;
}

static VALUE
each_i(VALUE v, void *arg)
{
    rb_yield(v);
    return Qnil;
}

/*
 *  call-seq:
 *     rng.each {| i | block } => rng
 *
 *  Iterates over the elements <i>rng</i>, passing each in turn to the
 *  block. You can only iterate if the start object of the range
 *  supports the +succ+ method (which means that you can't iterate over
 *  ranges of +Float+ objects).
 *
 *     (10..15).each do |n|
 *        print n, ' '
 *     end
 *
 *  <em>produces:</em>
 *
 *     10 11 12 13 14 15
 */

static VALUE
range_each(VALUE range)
{
    VALUE beg, end;

    RETURN_ENUMERATOR(range, 0, 0);

    beg = rb_ivar_get(range, id_beg);
    end = rb_ivar_get(range, id_end);

    if (!rb_respond_to(beg, id_succ)) {
        rb_raise(rb_eTypeError, "can't iterate from %s",
                 rb_obj_classname(beg));
    }
    if (FIXNUM_P(beg) && FIXNUM_P(end)) { /* fixnums are special */
        long lim = FIX2LONG(end);
        long i;

        if (!EXCL(range)) lim += 1;
        for (i=FIX2LONG(beg); i<lim; i++) {
            rb_yield(LONG2NUM(i));
        }
    }
    else if (TYPE(beg) == T_STRING) {
        VALUE args[5];
        long iter[2];

        args[0] = beg; args[1] = end; args[2] = range;
        iter[0] = 1; iter[1] = 1;
        rb_iterate(str_step, (VALUE)args, step_i, (VALUE)iter);
    }
    else {
        range_each_func(range, each_i, beg, end, NULL);
    }
    return range;
}

/*
 *  call-seq:
 *     rng.first    => obj
 *     rng.begin    => obj
 *
 *  Returns the first object in <i>rng</i>.
 */

static VALUE
range_first(VALUE range)
{
    return rb_ivar_get(range, id_beg);
}

/*
 *  call-seq:
 *     rng.end    => obj
 *     rng.last   => obj
 *
 *  Returns the object that defines the end of <i>rng</i>.
 *
 *     (1..10).end    #=> 10
 *     (1...10).end   #=> 10
 */

static VALUE
range_last(VALUE range)
{
    return rb_ivar_get(range, id_end);
}

/*
 *  call-seq:
 *     rng.min                    => obj
 *     rng.min {| a,b | block }   => obj
 *
 *  Returns the minimum value in <i>rng</i>. The second uses
 *  the block to compare values.  Returns nil if the first
 *  value in range is larger than the last value.
 *
 */

static VALUE
range_min(VALUE range)
{
    if (rb_block_given_p()) {
        return rb_call_super(0, 0);
    }
    else {
        VALUE b = rb_ivar_get(range, id_beg);
        VALUE e = rb_ivar_get(range, id_end);
        int c = rb_cmpint(rb_funcall(b, id_cmp, 1, e), b, e);

        if (c > 0) return Qnil;
        return b;
    }
}

/*
 *  call-seq:
 *     rng.max                    => obj
 *     rng.max {| a,b | block }   => obj
 *
 *  Returns the maximum value in <i>rng</i>. The second uses
 *  the block to compare values.  Returns nil if the first
 *  value in range is larger than the last value.
 *
 */

static VALUE
range_max(VALUE range)
{
    VALUE e = rb_ivar_get(range, id_end);
    int ip = FIXNUM_P(e) || rb_obj_is_kind_of(e, rb_cInteger);

    if (rb_block_given_p() || (EXCL(range) && !ip)) {
        return rb_call_super(0, 0);
    }
    else {
        VALUE b = rb_ivar_get(range, id_beg);
        int c = rb_cmpint(rb_funcall(b, id_cmp, 1, e), b, e);

        if (c > 0) return Qnil;
        if (EXCL(range)) {
            if (FIXNUM_P(e)) {
                return INT2NUM(FIX2INT(e)-1);
            }
            return rb_funcall(e, '-', 1, INT2FIX(1));
        }
        return e;
    }
}

VALUE
rb_range_beg_len(VALUE range, long *begp, long *lenp, long len, int err)
{
    VALUE b, e;
    long beg, end, excl;

    if (rb_obj_is_kind_of(range, rb_cRange)) {
        b = rb_ivar_get(range, id_beg);
        e = rb_ivar_get(range, id_end);
        excl = EXCL(range);
    }
    else {
        b = rb_check_to_integer(range, "begin");
        if (NIL_P(b)) return Qfalse;
        e = rb_check_to_integer(range, "end");
        if (NIL_P(e)) return Qfalse;
        excl = RTEST(rb_funcall(range, rb_intern("exclude_end?"), 0));
    }
    beg = NUM2LONG(b);
    end = NUM2LONG(e);

    if (beg < 0) {
        beg += len;
        if (beg < 0) goto out_of_range;
    }
    if (err == 0 || err == 2) {
        if (beg > len) goto out_of_range;
        if (end > len) end = len;
    }
    if (end < 0) end += len;
    if (!excl) end++;           /* include end point */
    len = end - beg;
    if (len < 0) len = 0;

    *begp = beg;
    *lenp = len;
    return Qtrue;

  out_of_range:
    if (err) {
        rb_raise(rb_eRangeError, "%ld..%s%ld out of range",
                 b, excl ? "." : "", e);
    }
    return Qnil;
}

/*
 * call-seq:
 *   rng.to_s   => string
 *
 * Convert this range object to a printable form.
 */

static VALUE
range_to_s(VALUE range)
{
    VALUE str, str2;

    str = rb_obj_as_string(rb_ivar_get(range, id_beg));
    str2 = rb_obj_as_string(rb_ivar_get(range, id_end));
    str = rb_str_dup(str);
    rb_str_cat(str, "...", EXCL(range)?3:2);
    rb_str_append(str, str2);
    OBJ_INFECT(str, str2);

    return str;
}

/*
 * call-seq:
 *   rng.inspect  => string
 *
 * Convert this range object to a printable form (using
 * <code>inspect</code> to convert the start and end
 * objects).
 */

static VALUE
range_inspect(VALUE range)
{
    VALUE str, str2;

    str = rb_inspect(rb_ivar_get(range, id_beg));
    str2 = rb_inspect(rb_ivar_get(range, id_end));
    str = rb_str_dup(str);
    rb_str_cat(str, "...", EXCL(range)?3:2);
    rb_str_append(str, str2);
    OBJ_INFECT(str, str2);

    return str;
}

/*
 *  call-seq:
 *     rng === obj       =>  true or false
 *     rng.member?(val)  =>  true or false
 *     rng.include?(val) =>  true or false
 *
 *  Returns <code>true</code> if <i>obj</i> is an element of
 *  <i>rng</i>, <code>false</code> otherwise. Conveniently,
 *  <code>===</code> is the comparison operator used by
 *  <code>case</code> statements.
 *
 *     case 79
 *     when 1..50   then   print "low\n"
 *     when 51..75  then   print "medium\n"
 *     when 76..100 then   print "high\n"
 *     end
 *
 *  <em>produces:</em>
 *
 *     high
 */

static VALUE
range_include(VALUE range, VALUE val)
{
    VALUE beg = rb_ivar_get(range, id_beg);
    VALUE end = rb_ivar_get(range, id_end);
    int nv = FIXNUM_P(beg) || FIXNUM_P(end) ||
             rb_obj_is_kind_of(beg, rb_cNumeric) ||
             rb_obj_is_kind_of(end, rb_cNumeric);

    if (nv ||
        !NIL_P(rb_check_to_integer(beg, "to_int")) ||
        !NIL_P(rb_check_to_integer(end, "to_int"))) {
        if (r_le(beg, val)) {
            if (EXCL(range)) {
                if (r_lt(val, end)) return Qtrue;
            }
            else {
                if (r_le(val, end)) return Qtrue;
            }
        }
        return Qfalse;
    }
    return rb_call_super(1, &val);
}

/*
 *  call-seq:
 *     rng.cover?(val)  =>  true or false
 *
 *  Returns <code>true</code> if <i>obj</i> is between beg and end,
 *  i.e <code>beg <= obj <= end</code> (or <i>end</i> exclusive when
 *  <code>exclude_end?</code> is true).
 *
 *     ("a".."z").cover?("c")    #=> true
 *     ("a".."z").cover?("5")    #=> false
 */

static VALUE
range_cover(range, val)
    VALUE range, val;
{
    VALUE beg, end;

    beg = rb_ivar_get(range, id_beg);
    end = rb_ivar_get(range, id_end);
    if (r_le(beg, val)) {
        if (EXCL(range)) {
            if (r_lt(val, end)) return Qtrue;
        }
        else {
            if (r_le(val, end)) return Qtrue;
        }
    }
    return Qfalse;
}

/*  A <code>Range</code> represents an interval---a set of values with a
 *  start and an end. Ranges may be constructed using the
 *  <em>s</em><code>..</code><em>e</em> and
 *  <em>s</em><code>...</code><em>e</em> literals, or with
 *  <code>Range::new</code>. Ranges constructed using <code>..</code>
 *  run from the start to the end inclusively. Those created using
 *  <code>...</code> exclude the end value. When used as an iterator,
 *  ranges return each value in the sequence.
 *
 *     (-1..-5).to_a      #=> []
 *     (-5..-1).to_a      #=> [-5, -4, -3, -2, -1]
 *     ('a'..'e').to_a    #=> ["a", "b", "c", "d", "e"]
 *     ('a'...'e').to_a   #=> ["a", "b", "c", "d"]
 *
 *  Ranges can be constructed using objects of any type, as long as the
 *  objects can be compared using their <code><=></code> operator and
 *  they support the <code>succ</code> method to return the next object
 *  in sequence.
 *
 *     class Xs                # represent a string of 'x's
 *       include Comparable
 *       attr :length
 *       def initialize(n)
 *         @length = n
 *       end
 *       def succ
 *         Xs.new(@length + 1)
 *       end
 *       def <=>(other)
 *         @length <=> other.length
 *       end
 *       def to_s
 *         sprintf "%2d #{inspect}", @length
 *       end
 *       def inspect
 *         'x' * @length
 *       end
 *     end
 *
 *     r = Xs.new(3)..Xs.new(6)   #=> xxx..xxxxxx
 *     r.to_a                     #=> [xxx, xxxx, xxxxx, xxxxxx]
 *     r.member?(Xs.new(5))       #=> true
 *
 *  In the previous code example, class <code>Xs</code> includes the
 *  <code>Comparable</code> module. This is because
 *  <code>Enumerable#member?</code> checks for equality using
 *  <code>==</code>. Including <code>Comparable</code> ensures that the
 *  <code>==</code> method is defined in terms of the <code><=></code>
 *  method implemented in <code>Xs</code>.
 *
 */

void
Init_Range(void)
{
    rb_cRange = rb_define_class("Range", rb_cObject);
    rb_include_module(rb_cRange, rb_mEnumerable);
    rb_define_method(rb_cRange, "initialize", range_initialize, -1);
    rb_define_method(rb_cRange, "==", range_eq, 1);
    rb_define_method(rb_cRange, "===", range_include, 1);
    rb_define_method(rb_cRange, "eql?", range_eql, 1);
    rb_define_method(rb_cRange, "hash", range_hash, 0);
    rb_define_method(rb_cRange, "each", range_each, 0);
    rb_define_method(rb_cRange, "step", range_step, -1);
    rb_define_method(rb_cRange, "first", range_first, 0);
    rb_define_method(rb_cRange, "last", range_last, 0);
    rb_define_method(rb_cRange, "begin", range_first, 0);
    rb_define_method(rb_cRange, "end", range_last, 0);
    rb_define_method(rb_cRange, "min", range_min, 0);
    rb_define_method(rb_cRange, "max", range_max, 0);
    rb_define_method(rb_cRange, "to_s", range_to_s, 0);
    rb_define_method(rb_cRange, "inspect", range_inspect, 0);

    rb_define_method(rb_cRange, "exclude_end?", range_exclude_end_p, 0);

    rb_define_method(rb_cRange, "member?", range_include, 1);
    rb_define_method(rb_cRange, "include?", range_include, 1);
    rb_define_method(rb_cRange, "cover?", range_cover, 1);

    id_cmp = rb_intern("<=>");
    id_succ = rb_intern("succ");
    id_beg = rb_intern("begin");
    id_end = rb_intern("end");
    id_excl = rb_intern("excl");
}
/* [<][>][^] [v] [top][bottom][index] [help] */


re.c

root/re.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. rb_memcicmp
  2. rb_memcmp
  3. rb_memsearch
  4. kcode_euc
  5. kcode_sjis
  6. kcode_utf8
  7. kcode_none
  8. kcode_set_option
  9. kcode_reset_option
  10. rb_reg_mbclen2
  11. rb_reg_check
  12. rb_reg_expr_str
  13. rb_reg_desc
  14. rb_reg_source
  15. rb_reg_inspect
  16. rb_reg_to_s
  17. rb_reg_raise
  18. rb_reg_casefold_p
  19. rb_reg_options_m
  20. rb_reg_kcode_m
  21. make_regexp
  22. match_alloc
  23. match_init_copy
  24. match_size
  25. match_offset
  26. match_begin
  27. match_end
  28. rb_match_busy
  29. rb_reg_prepare_re
  30. rb_reg_adjust_startpos
  31. rb_reg_search
  32. rb_reg_nth_defined
  33. rb_reg_nth_match
  34. rb_reg_last_match
  35. rb_reg_match_pre
  36. rb_reg_match_post
  37. rb_reg_match_last
  38. last_match_getter
  39. prematch_getter
  40. postmatch_getter
  41. last_paren_match_getter
  42. match_array
  43. match_to_a
  44. match_captures
  45. match_aref
  46. match_entry
  47. match_values_at
  48. match_select
  49. match_to_s
  50. match_string
  51. rb_reg_initialize
  52. rb_reg_s_alloc
  53. rb_reg_new
  54. rb_reg_compile
  55. rb_reg_regcomp
  56. rb_reg_cur_kcode
  57. rb_reg_hash
  58. rb_reg_equal
  59. rb_reg_match_pos
  60. rb_reg_match
  61. rb_reg_eqq
  62. rb_reg_match2
  63. rb_reg_match_m
  64. rb_reg_initialize_m
  65. rb_reg_quote
  66. rb_reg_s_quote
  67. rb_kcode
  68. rb_reg_get_kcode
  69. rb_reg_options
  70. rb_reg_s_union
  71. rb_reg_init_copy
  72. rb_reg_regsub
  73. rb_get_kcode
  74. kcode_getter
  75. rb_set_kcode
  76. kcode_setter
  77. ignorecase_getter
  78. ignorecase_setter
  79. match_getter
  80. match_setter
  81. rb_reg_s_last_match
  82. Init_Regexp
/**********************************************************************

  re.c -

  $Author: akr $
  created at: Mon Aug  9 18:24:49 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#include "ruby.h"
#include "re.h"
#include "regint.h"
#include <ctype.h>

#define MBCTYPE_ASCII         0
#define MBCTYPE_EUC           1
#define MBCTYPE_SJIS          2
#define MBCTYPE_UTF8          3

static VALUE rb_eRegexpError;

#define BEG(no) regs->beg[no]
#define END(no) regs->end[no]

#if 'a' == 97   /* it's ascii */
static const char casetable[] = {
        '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
        '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
        '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
        '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
        /* ' '     '!'     '"'     '#'     '$'     '%'     '&'     ''' */
        '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
        /* '('     ')'     '*'     '+'     ','     '-'     '.'     '/' */
        '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
        /* '0'     '1'     '2'     '3'     '4'     '5'     '6'     '7' */
        '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
        /* '8'     '9'     ':'     ';'     '<'     '='     '>'     '?' */
        '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
        /* '@'     'A'     'B'     'C'     'D'     'E'     'F'     'G' */
        '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
        /* 'H'     'I'     'J'     'K'     'L'     'M'     'N'     'O' */
        '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
        /* 'P'     'Q'     'R'     'S'     'T'     'U'     'V'     'W' */
        '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
        /* 'X'     'Y'     'Z'     '['     '\'     ']'     '^'     '_' */
        '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
        /* '`'     'a'     'b'     'c'     'd'     'e'     'f'     'g' */
        '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
        /* 'h'     'i'     'j'     'k'     'l'     'm'     'n'     'o' */
        '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
        /* 'p'     'q'     'r'     's'     't'     'u'     'v'     'w' */
        '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
        /* 'x'     'y'     'z'     '{'     '|'     '}'     '~' */
        '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
        '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
        '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
        '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
        '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
        '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
        '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
        '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
        '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
        '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307',
        '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317',
        '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327',
        '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337',
        '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
        '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
        '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
        '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
};
#else
# error >>> "You lose. You will need a translation table for your character set." <<<
#endif

int
rb_memcicmp(char *p1, char *p2, long len)
{
    int tmp;

    while (len--) {
        if (tmp = casetable[(unsigned)*p1++] - casetable[(unsigned)*p2++])
            return tmp;
    }
    return 0;
}

int
rb_memcmp(char *p1, char *p2, long len)
{
    if (!ruby_ignorecase) {
        return memcmp(p1, p2, len);
    }
    return rb_memcicmp(p1, p2, len);
}

long
rb_memsearch(char *x0, long m, char *y0, long n)
{
    unsigned char *x = (unsigned char *)x0, *y = (unsigned char *)y0;
    unsigned char *s, *e;
    long i;
    int d;
    unsigned long hx, hy;

#define KR_REHASH(a, b, h) (((h) << 1) - (((unsigned long)(a))<<d) + (b))

    if (m > n) return -1;
    s = y; e = s + n - m;

    /* Preprocessing */
    /* computes d = 2^(m-1) with
       the left-shift operator */
    d = sizeof(hx) * CHAR_BIT - 1;
    if (d > m) d = m;

    if (ruby_ignorecase) {
        if (n == m) {
            return rb_memcicmp(x, s, m) == 0 ? 0 : -1;
        }
        /* Prepare hash value */
        for (hy = hx = i = 0; i < d; ++i) {
            hx = KR_REHASH(0, casetable[x[i]], hx);
            hy = KR_REHASH(0, casetable[s[i]], hy);
        }
        /* Searching */
        while (hx != hy || rb_memcicmp(x, s, m)) {
            if (s >= e) return -1;
            hy = KR_REHASH(casetable[*s], casetable[*(s+d)], hy);
            s++;
        }
    }
    else {
        if (n == m) {
            return memcmp(x, s, m) == 0 ? 0 : -1;
        }
        /* Prepare hash value */
        for (hy = hx = i = 0; i < d; ++i) {
            hx = KR_REHASH(0, x[i], hx);
            hy = KR_REHASH(0, s[i], hy);
        }
        /* Searching */
        while (hx != hy || memcmp(x, s, m)) {
            if (s >= e) return -1;
            hy = KR_REHASH(*s, *(s+d), hy);
            s++;
        }
    }
    return s-y;
}

#define REG_CASESTATE  FL_USER0
#define KCODE_NONE  0
#define KCODE_EUC   FL_USER1
#define KCODE_SJIS  FL_USER2
#define KCODE_UTF8  FL_USER3
#define KCODE_FIXED FL_USER4
#define KCODE_MASK (KCODE_EUC|KCODE_SJIS|KCODE_UTF8)

static int reg_kcode = DEFAULT_KCODE;

static void
kcode_euc(struct RRegexp *re)
{
    FL_UNSET(re, KCODE_MASK);
    FL_SET(re, KCODE_EUC);
    FL_SET(re, KCODE_FIXED);
}

static void
kcode_sjis(struct RRegexp *re)
{
    FL_UNSET(re, KCODE_MASK);
    FL_SET(re, KCODE_SJIS);
    FL_SET(re, KCODE_FIXED);
}

static void
kcode_utf8(struct RRegexp *re)
{
    FL_UNSET(re, KCODE_MASK);
    FL_SET(re, KCODE_UTF8);
    FL_SET(re, KCODE_FIXED);
}

static void
kcode_none(struct RRegexp *re)
{
    FL_UNSET(re, KCODE_MASK);
    FL_SET(re, KCODE_FIXED);
}

static int curr_kcode;

static void
kcode_set_option(VALUE re)
{
    if (!FL_TEST(re, KCODE_FIXED)) return;

    curr_kcode = RBASIC(re)->flags & KCODE_MASK;
    if (reg_kcode == curr_kcode) return;
    switch (curr_kcode) {
      case KCODE_NONE:
        onigenc_set_default_encoding(ONIG_ENCODING_ASCII);
        break;
      case KCODE_EUC:
        onigenc_set_default_encoding(ONIG_ENCODING_EUC_JP);
        break;
      case KCODE_SJIS:
        onigenc_set_default_encoding(ONIG_ENCODING_SJIS);
        break;
      case KCODE_UTF8:
        onigenc_set_default_encoding(ONIG_ENCODING_UTF8);
        break;
    }
}

static void
kcode_reset_option(void)
{
    if (reg_kcode == curr_kcode) return;
    switch (reg_kcode) {
      case KCODE_NONE:
        onigenc_set_default_encoding(ONIG_ENCODING_ASCII);
        break;
      case KCODE_EUC:
        onigenc_set_default_encoding(ONIG_ENCODING_EUC_JP);
        break;
      case KCODE_SJIS:
        onigenc_set_default_encoding(ONIG_ENCODING_SJIS);
        break;
      case KCODE_UTF8:
        onigenc_set_default_encoding(ONIG_ENCODING_UTF8);
        break;
    }
}

int
rb_reg_mbclen2(unsigned int c, VALUE re)
{
    int len;
    unsigned char uc = (unsigned char)c;

    if (!FL_TEST(re, KCODE_FIXED))
        return mbclen(uc);
    kcode_set_option(re);
    len = mbclen(uc);
    kcode_reset_option();
    return len;
}

static void
rb_reg_check(VALUE re)
{
    if (!RREGEXP(re)->ptr || !RREGEXP(re)->str) {
        rb_raise(rb_eTypeError, "uninitialized Regexp");
    }
}

static void
rb_reg_expr_str(VALUE str, const char *s, long len)
{
    const char *p, *pend;
    int need_escape = 0;

    p = s; pend = p + len;
    while (p<pend) {
        if (*p == '/' || (!ISPRINT(*p) && !ismbchar(*p))) {
            need_escape = 1;
            break;
        }
        p += mbclen(*p);
    }
    if (!need_escape) {
        rb_str_buf_cat(str, s, len);
    }
    else {
        p = s;
        while (p<pend) {
            if (*p == '\\') {
                int n = mbclen(p[1]) + 1;
                rb_str_buf_cat(str, p, n);
                p += n;
                continue;
            }
            else if (*p == '/') {
                char c = '\\';
                rb_str_buf_cat(str, &c, 1);
                rb_str_buf_cat(str, p, 1);
            }
            else if (ismbchar(*p)) {
                rb_str_buf_cat(str, p, mbclen(*p));
                p += mbclen(*p);
                continue;
            }
            else if (ISPRINT(*p)) {
                rb_str_buf_cat(str, p, 1);
            }
            else if (!ISSPACE(*p)) {
                char b[8];

                sprintf(b, "\\%03o", *p & 0377);
                rb_str_buf_cat(str, b, 4);
            }
            else {
                rb_str_buf_cat(str, p, 1);
            }
            p++;
        }
    }
}

static VALUE
rb_reg_desc(const char *s, long len, VALUE re)
{
    VALUE str = rb_str_buf_new2("/");

    rb_reg_expr_str(str, s, len);
    rb_str_buf_cat2(str, "/");
    if (re) {
        rb_reg_check(re);
        if (RREGEXP(re)->ptr->options & ONIG_OPTION_MULTILINE)
            rb_str_buf_cat2(str, "m");
        if (RREGEXP(re)->ptr->options & ONIG_OPTION_IGNORECASE)
            rb_str_buf_cat2(str, "i");
        if (RREGEXP(re)->ptr->options & ONIG_OPTION_EXTEND)
            rb_str_buf_cat2(str, "x");

        if (FL_TEST(re, KCODE_FIXED)) {
            switch ((RBASIC(re)->flags & KCODE_MASK)) {
              case KCODE_NONE:
                rb_str_buf_cat2(str, "n");
                break;
              case KCODE_EUC:
                rb_str_buf_cat2(str, "e");
                break;
              case KCODE_SJIS:
                rb_str_buf_cat2(str, "s");
                break;
              case KCODE_UTF8:
                rb_str_buf_cat2(str, "u");
                break;
            }
        }
    }
    OBJ_INFECT(str, re);
    return str;
}

/*
 *  call-seq:
 *     rxp.source   => str
 *
 *  Returns the original string of the pattern.
 *
 *     /ab+c/ix.source   #=> "ab+c"
 */

static VALUE
rb_reg_source(VALUE re)
{
    VALUE str;

    rb_reg_check(re);
    str = rb_str_new(RREGEXP(re)->str,RREGEXP(re)->len);
    if (OBJ_TAINTED(re)) OBJ_TAINT(str);
    return str;
}

/*
 * call-seq:
 *    rxp.inspect   => string
 *
 * Produce a nicely formatted string-version of _rxp_. Perhaps surprisingly,
 * <code>#inspect</code> actually produces the more natural version of
 * the string than <code>#to_s</code>.
 *
 *     /ab+c/ix.to_s         #=> /ab+c/ix
*/

static VALUE
rb_reg_inspect(VALUE re)
{
    rb_reg_check(re);
    return rb_reg_desc(RREGEXP(re)->str, RREGEXP(re)->len, re);
}

/*
 *  call-seq:
 *     rxp.to_s   => str
 *
 *  Returns a string containing the regular expression and its options (using the
 *  <code>(?xxx:yyy)</code> notation. This string can be fed back in to
 *  <code>Regexp::new</code> to a regular expression with the same semantics as
 *  the original. (However, <code>Regexp#==</code> may not return true when
 *  comparing the two, as the source of the regular expression itself may
 *  differ, as the example shows).  <code>Regexp#inspect</code> produces a
 *  generally more readable version of <i>rxp</i>.
 *
 *     r1 = /ab+c/ix         #=> /ab+c/ix
 *     s1 = r1.to_s          #=> "(?ix-m:ab+c)"
 *     r2 = Regexp.new(s1)   #=> /(?ix-m:ab+c)/
 *     r1 == r2              #=> false
 *     r1.source             #=> "ab+c"
 *     r2.source             #=> "(?ix-m:ab+c)"
 */

static VALUE
rb_reg_to_s(VALUE re)
{
    int options;
    const int embeddable = ONIG_OPTION_MULTILINE|ONIG_OPTION_IGNORECASE|ONIG_OPTION_EXTEND;
    long len;
    const char* ptr;
    VALUE str = rb_str_buf_new2("(?");

    rb_reg_check(re);

    options = RREGEXP(re)->ptr->options;
    ptr = RREGEXP(re)->str;
    len = RREGEXP(re)->len;
  again:
    if (len >= 4 && ptr[0] == '(' && ptr[1] == '?') {
        int err = 1;
        ptr += 2;
        if ((len -= 2) > 0) {
            do {
                if (*ptr == 'm') {
                    options |= ONIG_OPTION_MULTILINE;
                }
                else if (*ptr == 'i') {
                    options |= ONIG_OPTION_IGNORECASE;
                }
                else if (*ptr == 'x') {
                    options |= ONIG_OPTION_EXTEND;
                }
                else break;
                ++ptr;
            } while (--len > 0);
        }
        if (len > 1 && *ptr == '-') {
            ++ptr;
            --len;
            do {
                if (*ptr == 'm') {
                    options &= ~ONIG_OPTION_MULTILINE;
                }
                else if (*ptr == 'i') {
                    options &= ~ONIG_OPTION_IGNORECASE;
                }
                else if (*ptr == 'x') {
                    options &= ~ONIG_OPTION_EXTEND;
                }
                else break;
                ++ptr;
            } while (--len > 0);
        }
        if (*ptr == ')') {
            --len;
            ++ptr;
            goto again;
        }
        if (*ptr == ':' && ptr[len-1] == ')') {
            int r;
            Regexp *rp;
            kcode_set_option(re);
            r = onig_alloc_init(&rp, ONIG_OPTION_DEFAULT,
                                ONIGENC_AMBIGUOUS_MATCH_DEFAULT,
                                onigenc_get_default_encoding(),
                                OnigDefaultSyntax);
            if (r == 0) {
                 ++ptr;
                 len -= 2;
                 err = (onig_compile(rp, ptr, ptr + len, NULL) != 0);
            }
            kcode_reset_option();
            onig_free(rp);
        }
        if (err) {
            options = RREGEXP(re)->ptr->options;
            ptr = RREGEXP(re)->str;
            len = RREGEXP(re)->len;
        }
    }

    if (options & ONIG_OPTION_MULTILINE) rb_str_buf_cat2(str, "m");
    if (options & ONIG_OPTION_IGNORECASE) rb_str_buf_cat2(str, "i");
    if (options & ONIG_OPTION_EXTEND) rb_str_buf_cat2(str, "x");

    if ((options & embeddable) != embeddable) {
        rb_str_buf_cat2(str, "-");
        if (!(options & ONIG_OPTION_MULTILINE)) rb_str_buf_cat2(str, "m");
        if (!(options & ONIG_OPTION_IGNORECASE)) rb_str_buf_cat2(str, "i");
        if (!(options & ONIG_OPTION_EXTEND)) rb_str_buf_cat2(str, "x");
    }

    rb_str_buf_cat2(str, ":");
    rb_reg_expr_str(str, ptr, len);
    rb_str_buf_cat2(str, ")");

    OBJ_INFECT(str, re);
    return str;
}

static void
rb_reg_raise(const char *s, long len, const char *err, VALUE re, int ce)
{
    VALUE desc = rb_reg_desc(s, len, re);

    if (ce)
        rb_compile_error("%s: %s", err, RSTRING(desc)->ptr);
    else
        rb_raise(rb_eRegexpError, "%s: %s", err, RSTRING(desc)->ptr);
}

/*
 *  call-seq:
 *     rxp.casefold?   => true or false
 *
 *  Returns the value of the case-insensitive flag.
 */

static VALUE
rb_reg_casefold_p(VALUE re)
{
    rb_reg_check(re);
    if (RREGEXP(re)->ptr->options & ONIG_OPTION_IGNORECASE) return Qtrue;
    return Qfalse;
}

/*
 *  call-seq:
 *     rxp.options   => fixnum
 *
 *  Returns the set of bits corresponding to the options used when creating this
 *  Regexp (see <code>Regexp::new</code> for details. Note that additional bits
 *  may be set in the returned options: these are used internally by the regular
 *  expression code. These extra bits are ignored if the options are passed to
 *  <code>Regexp::new</code>.
 *
 *     Regexp::IGNORECASE                  #=> 1
 *     Regexp::EXTENDED                    #=> 2
 *     Regexp::MULTILINE                   #=> 4
 *
 *     /cat/.options                       #=> 128
 *     /cat/ix.options                     #=> 131
 *     Regexp.new('cat', true).options     #=> 129
 *     Regexp.new('cat', 0, 's').options   #=> 384
 *
 *     r = /cat/ix
 *     Regexp.new(r.source, r.options)     #=> /cat/ix
 */

static VALUE
rb_reg_options_m(VALUE re)
{
    int options = rb_reg_options(re);
    return INT2NUM(options);
}

/*
 *  call-seq:
 *     rxp.kcode   => str
 *
 *  Returns the character set code for the regexp.
 */

static VALUE
rb_reg_kcode_m(VALUE re)
{
    char *kcode;

    if (FL_TEST(re, KCODE_FIXED)) {
        switch (RBASIC(re)->flags & KCODE_MASK) {
          case KCODE_NONE:
            kcode = "none"; break;
          case KCODE_EUC:
            kcode = "euc"; break;
          case KCODE_SJIS:
            kcode = "sjis"; break;
          case KCODE_UTF8:
            kcode = "utf8"; break;
          default:
            rb_bug("unknown kcode - should not happen");
            break;
        }
        return rb_str_new2(kcode);
    }
    return Qnil;
}

static Regexp*
make_regexp(const char *s, long len, int flags, int ce)
{
    Regexp *rp;
    char err[ONIG_MAX_ERROR_MESSAGE_LEN];
    int r;
    OnigErrorInfo einfo;

    /* Handle escaped characters first. */

    /* Build a copy of the string (in dest) with the
       escaped characters translated,  and generate the regex
       from that.
    */

    r = onig_alloc_init(&rp, flags,
                        ONIGENC_AMBIGUOUS_MATCH_DEFAULT,
                        onigenc_get_default_encoding(),
                        OnigDefaultSyntax);
    if (r) {
        onig_error_code_to_str((UChar*)err, r);
        rb_reg_raise(s, len, err, 0, ce);
    }

    r = onig_compile(rp, (UChar*)s, (UChar*)(s + len), &einfo);

    if (r != 0) {
        onig_free(rp);
        (void )onig_error_code_to_str((UChar*)err, r, &einfo);
        rb_reg_raise(s, len, err, 0, ce);
        return 0;
    }
    return rp;
}

/*
 *  Document-class: MatchData
 *
 *  <code>MatchData</code> is the type of the special variable <code>$~</code>,
 *  and is the type of the object returned by <code>Regexp#match</code> and
 *  <code>Regexp#last_match</code>. It encapsulates all the results of a pattern
 *  match, results normally accessed through the special variables
 *  <code>$&</code>, <code>$'</code>, <code>$`</code>, <code>$1</code>,
 *  <code>$2</code>, and so on. <code>Matchdata</code> is also known as
 *  <code>MatchingData</code>.
 *
 */

static VALUE rb_cMatch;

static VALUE
match_alloc(VALUE klass)
{
    NEWOBJ(match, struct RMatch);
    OBJSETUP(match, klass, T_MATCH);

    match->str = 0;
    match->regs = 0;
    match->regs = ALLOC(struct re_registers);
    MEMZERO(match->regs, struct re_registers, 1);

    return (VALUE)match;
}

/* :nodoc: */
static VALUE
match_init_copy(VALUE obj, VALUE orig)
{
    if (obj == orig) return obj;

    if (!rb_obj_is_instance_of(orig, rb_obj_class(obj))) {
        rb_raise(rb_eTypeError, "wrong argument class");
    }
    RMATCH(obj)->str = RMATCH(orig)->str;
    onig_region_free(RMATCH(obj)->regs, 0);
    RMATCH(obj)->regs->allocated = 0;
    onig_region_copy(RMATCH(obj)->regs, RMATCH(orig)->regs);

    return obj;
}

/*
 *  call-seq:
 *     mtch.length   => integer
 *     mtch.size     => integer
 *
 *  Returns the number of elements in the match array.
 *
 *     m = /(.)(.)(\d+)(\d)/.match("THX1138.")
 *     m.length   #=> 5
 *     m.size     #=> 5
 */

static VALUE
match_size(VALUE match)
{
    return INT2FIX(RMATCH(match)->regs->num_regs);
}

/*
 *  call-seq:
 *     mtch.offset(n)   => array
 *
 *  Returns a two-element array containing the beginning and ending offsets of
 *  the <em>n</em>th match.
 *
 *     m = /(.)(.)(\d+)(\d)/.match("THX1138.")
 *     m.offset(0)   #=> [1, 7]
 *     m.offset(4)   #=> [6, 7]
 */

static VALUE
match_offset(VALUE match, VALUE n)
{
    int i = NUM2INT(n);

    if (i < 0 || RMATCH(match)->regs->num_regs <= i)
        rb_raise(rb_eIndexError, "index %d out of matches", i);

    if (RMATCH(match)->regs->beg[i] < 0)
        return rb_assoc_new(Qnil, Qnil);

    return rb_assoc_new(INT2FIX(RMATCH(match)->regs->beg[i]),
                        INT2FIX(RMATCH(match)->regs->end[i]));
}

/*
 *  call-seq:
 *     mtch.begin(n)   => integer
 *
 *  Returns the offset of the start of the <em>n</em>th element of the match
 *  array in the string.
 *
 *     m = /(.)(.)(\d+)(\d)/.match("THX1138.")
 *     m.begin(0)   #=> 1
 *     m.begin(2)   #=> 2
 */

static VALUE
match_begin(VALUE match, VALUE n)
{
    int i = NUM2INT(n);

    if (i < 0 || RMATCH(match)->regs->num_regs <= i)
        rb_raise(rb_eIndexError, "index %d out of matches", i);

    if (RMATCH(match)->regs->beg[i] < 0)
        return Qnil;

    return INT2FIX(RMATCH(match)->regs->beg[i]);
}

/*
 *  call-seq:
 *     mtch.end(n)   => integer
 *
 *  Returns the offset of the character immediately following the end of the
 *  <em>n</em>th element of the match array in the string.
 *
 *     m = /(.)(.)(\d+)(\d)/.match("THX1138.")
 *     m.end(0)   #=> 7
 *     m.end(2)   #=> 3
 */

static VALUE
match_end(VALUE match, VALUE n)
{
    int i = NUM2INT(n);

    if (i < 0 || RMATCH(match)->regs->num_regs <= i)
        rb_raise(rb_eIndexError, "index %d out of matches", i);

    if (RMATCH(match)->regs->beg[i] < 0)
        return Qnil;

    return INT2FIX(RMATCH(match)->regs->end[i]);
}

#define MATCH_BUSY FL_USER2

void
rb_match_busy(VALUE match)
{
    FL_SET(match, MATCH_BUSY);
}

int ruby_ignorecase;
static int may_need_recompile;

static void
rb_reg_prepare_re(VALUE re)
{
    int need_recompile = 0;
    int state;

    rb_reg_check(re);
    state = FL_TEST(re, REG_CASESTATE);
    /* ignorecase status */
    if (ruby_ignorecase && !state) {
        FL_SET(re, REG_CASESTATE);
        RREGEXP(re)->ptr->options |= ONIG_OPTION_IGNORECASE;
        need_recompile = 1;
    }
    if (!ruby_ignorecase && state) {
        FL_UNSET(re, REG_CASESTATE);
        RREGEXP(re)->ptr->options &= ~ONIG_OPTION_IGNORECASE;
        need_recompile = 1;
    }

    if (!FL_TEST(re, KCODE_FIXED) &&
        (RBASIC(re)->flags & KCODE_MASK) != reg_kcode) {
        need_recompile = 1;
        RBASIC(re)->flags &= ~KCODE_MASK;
        RBASIC(re)->flags |= reg_kcode;
    }

    if (need_recompile) {
        char err[ONIG_MAX_ERROR_MESSAGE_LEN];
        int r;
        OnigErrorInfo einfo;
        regex_t *reg;
        UChar *pattern;

        if (FL_TEST(re, KCODE_FIXED))
            kcode_set_option(re);
        rb_reg_check(re);
        reg = RREGEXP(re)->ptr;
        pattern = ((UChar*)RREGEXP(re)->str);
        r = onig_recompile(reg, pattern, pattern + RREGEXP(re)->len,
                           reg->options, onigenc_get_default_encoding(),
                           OnigDefaultSyntax, &einfo);

        if (r != 0) {
             (void )onig_error_code_to_str((UChar*)err, r, &einfo);
             rb_reg_raise(pattern, RREGEXP(re)->len, err, re, Qfalse);
        }
    }
}

long
rb_reg_adjust_startpos(VALUE re, VALUE str, long pos, long reverse)
{
    long range;
    OnigEncoding enc;
    UChar *p, *string;

    rb_reg_check(re);
    if (may_need_recompile) rb_reg_prepare_re(re);

    if (FL_TEST(re, KCODE_FIXED))
        kcode_set_option(re);
    else if (reg_kcode != curr_kcode)
        kcode_reset_option();

    if (reverse) {
        range = -pos;
    }
    else {
        range = RSTRING(str)->len - pos;
    }

    enc = (RREGEXP(re)->ptr)->enc;

    if (pos > 0 && ONIGENC_MBC_MAXLEN(enc) != 1 && pos < RSTRING(str)->len) {
         string = (UChar*)RSTRING(str)->ptr;

         if (range > 0) {
              p = onigenc_get_right_adjust_char_head(enc, string, string + pos);
         }
         else {
              p = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, string, string + pos);
         }
         return p - string;
    }

    return pos;
}

long
rb_reg_search(VALUE re, VALUE str, long pos, long reverse)
{
    long result;
    VALUE match;
    static struct re_registers regs;
    long range;

    if (pos > RSTRING(str)->len || pos < 0) {
        rb_backref_set(Qnil);
        return -1;
    }

    rb_reg_check(re);
    if (may_need_recompile) rb_reg_prepare_re(re);

    if (FL_TEST(re, KCODE_FIXED))
        kcode_set_option(re);
    else if (reg_kcode != curr_kcode)
        kcode_reset_option();

    if (reverse) {
        range = -pos;
    }
    else {
        range = RSTRING(str)->len - pos;
    }

    result = onig_search(RREGEXP(re)->ptr,
                         (UChar*)(RSTRING(str)->ptr),
                         ((UChar*)(RSTRING(str)->ptr) + RSTRING(str)->len),
                         ((UChar*)(RSTRING(str)->ptr) + pos),
                         ((UChar*)(RSTRING(str)->ptr) + pos + range),
                         &regs, ONIG_OPTION_NONE);

    if (FL_TEST(re, KCODE_FIXED))
        kcode_reset_option();

    if (result < 0) {
        if (result == ONIG_MISMATCH) {
            rb_backref_set(Qnil);
            return result;
        }
        else {
            char err[ONIG_MAX_ERROR_MESSAGE_LEN];
            onig_error_code_to_str((UChar*)err, result);
            rb_reg_raise(RREGEXP(re)->str, RREGEXP(re)->len, err, 0, Qfalse);
        }
    }

    match = rb_backref_get();
    if (NIL_P(match) || FL_TEST(match, MATCH_BUSY)) {
        match = match_alloc(rb_cMatch);
    }
    else {
        if (rb_safe_level() >= 3)
            OBJ_TAINT(match);
        else
            FL_UNSET(match, FL_TAINT);
    }

    onig_region_copy(RMATCH(match)->regs, &regs);
    RMATCH(match)->str = rb_str_new4(str);
    rb_backref_set(match);

    OBJ_INFECT(match, re);
    OBJ_INFECT(match, str);
    return result;
}

VALUE
rb_reg_nth_defined(int nth, VALUE match)
{
    if (NIL_P(match)) return Qnil;
    if (nth >= RMATCH(match)->regs->num_regs) {
        return Qnil;
    }
    if (nth < 0) {
        nth += RMATCH(match)->regs->num_regs;
        if (nth <= 0) return Qnil;
    }
    if (RMATCH(match)->BEG(nth) == -1) return Qfalse;
    return Qtrue;
}

VALUE
rb_reg_nth_match(int nth, VALUE match)
{
    VALUE str;
    long start, end, len;

    if (NIL_P(match)) return Qnil;
    if (nth >= RMATCH(match)->regs->num_regs) {
        return Qnil;
    }
    if (nth < 0) {
        nth += RMATCH(match)->regs->num_regs;
        if (nth <= 0) return Qnil;
    }
    start = RMATCH(match)->BEG(nth);
    if (start == -1) return Qnil;
    end = RMATCH(match)->END(nth);
    len = end - start;
    str = rb_str_substr(RMATCH(match)->str, start, len);
    OBJ_INFECT(str, match);
    return str;
}

VALUE
rb_reg_last_match(VALUE match)
{
    return rb_reg_nth_match(0, match);
}

/*
 *  call-seq:
 *     mtch.pre_match   => str
 *
 *  Returns the portion of the original string before the current match.
 *  Equivalent to the special variable <code>$`</code>.
 *
 *     m = /(.)(.)(\d+)(\d)/.match("THX1138.")
 *     m.pre_match   #=> "T"
 */

VALUE
rb_reg_match_pre(VALUE match)
{
    VALUE str;

    if (NIL_P(match)) return Qnil;
    if (RMATCH(match)->BEG(0) == -1) return Qnil;
    str = rb_str_substr(RMATCH(match)->str, 0, RMATCH(match)->BEG(0));
    if (OBJ_TAINTED(match)) OBJ_TAINT(str);
    return str;
}

/*
 *  call-seq:
 *     mtch.post_match   => str
 *
 *  Returns the portion of the original string after the current match.
 *  Equivalent to the special variable <code>$'</code>.
 *
 *     m = /(.)(.)(\d+)(\d)/.match("THX1138: The Movie")
 *     m.post_match   #=> ": The Movie"
 */

VALUE
rb_reg_match_post(VALUE match)
{
    VALUE str;
    long pos;

    if (NIL_P(match)) return Qnil;
    if (RMATCH(match)->BEG(0) == -1) return Qnil;
    str = RMATCH(match)->str;
    pos = RMATCH(match)->END(0);
    str = rb_str_substr(str, pos, RSTRING(str)->len - pos);
    if (OBJ_TAINTED(match)) OBJ_TAINT(str);
    return str;
}

VALUE
rb_reg_match_last(VALUE match)
{
    int i;

    if (NIL_P(match)) return Qnil;
    if (RMATCH(match)->BEG(0) == -1) return Qnil;

    for (i=RMATCH(match)->regs->num_regs-1; RMATCH(match)->BEG(i) == -1 && i > 0; i--)
        ;
    if (i == 0) return Qnil;
    return rb_reg_nth_match(i, match);
}

static VALUE
last_match_getter(void)
{
    return rb_reg_last_match(rb_backref_get());
}

static VALUE
prematch_getter(void)
{
    return rb_reg_match_pre(rb_backref_get());
}

static VALUE
postmatch_getter(void)
{
    return rb_reg_match_post(rb_backref_get());
}

static VALUE
last_paren_match_getter(void)
{
    return rb_reg_match_last(rb_backref_get());
}

static VALUE
match_array(VALUE match, int start)
{
    struct re_registers *regs = RMATCH(match)->regs;
    VALUE ary = rb_ary_new2(regs->num_regs);
    VALUE target = RMATCH(match)->str;
    int i;
    int taint = OBJ_TAINTED(match);

    for (i=start; i<regs->num_regs; i++) {
        if (regs->beg[i] == -1) {
            rb_ary_push(ary, Qnil);
        }
        else {
            VALUE str = rb_str_substr(target, regs->beg[i], regs->end[i]-regs->beg[i]);
            if (taint) OBJ_TAINT(str);
            rb_ary_push(ary, str);
        }
    }
    return ary;
}

/* [MG]:FIXME: I put parens around the /.../.match() in the first line of the
   second example to prevent the '*' followed by a '/' from ending the
   comment. */

/*
 *  call-seq:
 *     mtch.to_a   => anArray
 *
 *  Returns the array of matches.
 *
 *     m = /(.)(.)(\d+)(\d)/.match("THX1138.")
 *     m.to_a   #=> ["HX1138", "H", "X", "113", "8"]
 *
 *  Because <code>to_a</code> is called when expanding
 *  <code>*</code><em>variable</em>, there's a useful assignment
 *  shortcut for extracting matched fields. This is slightly slower than
 *  accessing the fields directly (as an intermediate array is
 *  generated).
 *
 *     all,f1,f2,f3 = *(/(.)(.)(\d+)(\d)/.match("THX1138."))
 *     all   #=> "HX1138"
 *     f1    #=> "H"
 *     f2    #=> "X"
 *     f3    #=> "113"
 */

static VALUE
match_to_a(VALUE match)
{
    return match_array(match, 0);
}

/*
 *  call-seq:
 *     mtch.captures   => array
 *
 *  Returns the array of captures; equivalent to <code>mtch.to_a[1..-1]</code>.
 *
 *     f1,f2,f3,f4 = /(.)(.)(\d+)(\d)/.match("THX1138.").captures
 *     f1    #=> "H"
 *     f2    #=> "X"
 *     f3    #=> "113"
 *     f4    #=> "8"
 */
static VALUE
match_captures(VALUE match)
{
    return match_array(match, 1);
}

/*
 *  call-seq:
 *     mtch[i]               => obj
 *     mtch[start, length]   => array
 *     mtch[range]           => array
 *
 *  Match Reference---<code>MatchData</code> acts as an array, and may be
 *  accessed using the normal array indexing techniques.  <i>mtch</i>[0] is
 *  equivalent to the special variable <code>$&</code>, and returns the entire
 *  matched string.  <i>mtch</i>[1], <i>mtch</i>[2], and so on return the values
 *  of the matched backreferences (portions of the pattern between parentheses).
 *
 *     m = /(.)(.)(\d+)(\d)/.match("THX1138.")
 *     m[0]       #=> "HX1138"
 *     m[1, 2]    #=> ["H", "X"]
 *     m[1..3]    #=> ["H", "X", "113"]
 *     m[-3, 2]   #=> ["X", "113"]
 */

static VALUE
match_aref(int argc, VALUE *argv, VALUE match)
{
    VALUE idx, rest;

    rb_scan_args(argc, argv, "11", &idx, &rest);

    if (!NIL_P(rest) || !FIXNUM_P(idx) || FIX2INT(idx) < 0) {
        return rb_ary_aref(argc, argv, match_to_a(match));
    }
    return rb_reg_nth_match(FIX2INT(idx), match);
}

static VALUE
match_entry(VALUE match, long n)
{
    return rb_reg_nth_match(n, match);
}

/*
 *  call-seq:
 *     mtch.select([index]*)   => array
 *
 *  Uses each <i>index</i> to access the matching values, returning an array of
 *  the corresponding matches.
 *
 *     m = /(.)(.)(\d+)(\d)/.match("THX1138: The Movie")
 *     m.to_a               #=> ["HX1138", "H", "X", "113", "8"]
 *     m.select(0, 2, -2)   #=> ["HX1138", "X", "113"]
 */

static VALUE
match_values_at(int argc, VALUE *argv, VALUE match)
{
    return rb_get_values_at(match, RMATCH(match)->regs->num_regs, argc, argv, match_entry);
}

/*
 *  call-seq:
 *     mtch.select([index]*)   => array
 *
 *  Uses each <i>index</i> to access the matching values, returning an
 *  array of the corresponding matches.
 *
 *     m = /(.)(.)(\d+)(\d)/.match("THX1138: The Movie")
 *     m.to_a               #=> ["HX1138", "H", "X", "113", "8"]
 *     m.select(0, 2, -2)   #=> ["HX1138", "X", "113"]
 */

static VALUE
match_select(int argc, VALUE *argv, VALUE match)
{
    if (argc > 0) {
        rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc);
    }
    else {
        struct re_registers *regs = RMATCH(match)->regs;
        VALUE target = RMATCH(match)->str;
        VALUE result = rb_ary_new();
        int i;
        int taint = OBJ_TAINTED(match);

        for (i=0; i<regs->num_regs; i++) {
            VALUE str = rb_str_substr(target, regs->beg[i], regs->end[i]-regs->beg[i]);
            if (taint) OBJ_TAINT(str);
            if (RTEST(rb_yield(str))) {
                rb_ary_push(result, str);
            }
        }
        return result;
    }
}

/*
 *  call-seq:
 *     mtch.to_s   => str
 *
 *  Returns the entire matched string.
 *
 *     m = /(.)(.)(\d+)(\d)/.match("THX1138.")
 *     m.to_s   #=> "HX1138"
 */

static VALUE
match_to_s(VALUE match)
{
    VALUE str = rb_reg_last_match(match);

    if (NIL_P(str)) str = rb_str_new(0,0);
    if (OBJ_TAINTED(match)) OBJ_TAINT(str);
    if (OBJ_TAINTED(RMATCH(match)->str)) OBJ_TAINT(str);
    return str;
}

/*
 *  call-seq:
 *     mtch.string   => str
 *
 *  Returns a frozen copy of the string passed in to <code>match</code>.
 *
 *     m = /(.)(.)(\d+)(\d)/.match("THX1138.")
 *     m.string   #=> "THX1138."
 */

static VALUE
match_string(VALUE match)
{
    return RMATCH(match)->str;  /* str is frozen */
}

VALUE rb_cRegexp;

static void
rb_reg_initialize(VALUE obj, const char *s, long len,
    int options,                /* CASEFOLD  = 1 */
                                /* EXTENDED  = 2 */
                                /* MULTILINE = 4 */
                                /* CODE_NONE = 16 */
                                /* CODE_EUC  = 32 */
                                /* CODE_SJIS = 48 */
                                /* CODE_UTF8 = 64 */
    int ce)                     /* call rb_compile_error() */
{
    struct RRegexp *re = RREGEXP(obj);

    if (re->ptr) onig_free(re->ptr);
    if (re->str) free(re->str);
    re->ptr = 0;
    re->str = 0;

    switch (options & ~0xf) {
      case 0:
      default:
        FL_SET(re, reg_kcode);
        break;
      case 16:
        kcode_none(re);
        break;
      case 32:
        kcode_euc(re);
        break;
      case 48:
        kcode_sjis(re);
        break;
      case 64:
        kcode_utf8(re);
        break;
    }

    if (options & ~0xf) {
        kcode_set_option((VALUE)re);
    }
    if (ruby_ignorecase) {
        options |= ONIG_OPTION_IGNORECASE;
        FL_SET(re, REG_CASESTATE);
    }
    re->ptr = make_regexp(s, len, options & 0xf, ce);
    re->str = ALLOC_N(char, len+1);
    memcpy(re->str, s, len);
    re->str[len] = '\0';
    re->len = len;
    if (options & ~0xf) {
        kcode_reset_option();
    }
}

static VALUE
rb_reg_s_alloc(VALUE klass)
{
    NEWOBJ(re, struct RRegexp);
    OBJSETUP(re, klass, T_REGEXP);

    re->ptr = 0;
    re->len = 0;
    re->str = 0;

    return (VALUE)re;
}

VALUE
rb_reg_new(const char *s, long len, int options)
{
    VALUE re = rb_reg_s_alloc(rb_cRegexp);

    rb_reg_initialize(re, s, len, options, Qfalse);
    return (VALUE)re;
}

VALUE
rb_reg_compile(const char *s, long len, int options)
{
    VALUE re = rb_reg_s_alloc(rb_cRegexp);

    rb_reg_initialize(re, s, len, options, Qtrue);
    return (VALUE)re;
}

static int case_cache;
static int kcode_cache;
static VALUE reg_cache;

VALUE
rb_reg_regcomp(VALUE str)
{
    volatile VALUE save_str = str;
    if (reg_cache && RREGEXP(reg_cache)->len == RSTRING(str)->len
        && case_cache == ruby_ignorecase
        && kcode_cache == reg_kcode
        && memcmp(RREGEXP(reg_cache)->str, RSTRING(str)->ptr, RSTRING(str)->len) == 0)
        return reg_cache;

    case_cache = ruby_ignorecase;
    kcode_cache = reg_kcode;
    return reg_cache = rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len,
                                  ruby_ignorecase);
}

static int
rb_reg_cur_kcode(VALUE re)
{
    if (FL_TEST(re, KCODE_FIXED)) {
        return RBASIC(re)->flags & KCODE_MASK;
    }
    return 0;
}

/*
 * call-seq:
 *   rxp.hash   => fixnum
 *
 * Produce a hash based on the text and options of this regular expression.
 */

static VALUE
rb_reg_hash(VALUE re)
{
    int hashval, len;
    char *p;

    rb_reg_check(re);
    hashval = RREGEXP(re)->ptr->options;
    len = RREGEXP(re)->len;
    p  = RREGEXP(re)->str;
    while (len--) {
        hashval = hashval * 33 + *p++;
    }
    hashval = hashval + (hashval>>5);

    return INT2FIX(hashval);
}

/*
 *  call-seq:
 *     rxp == other_rxp      => true or false
 *     rxp.eql?(other_rxp)   => true or false
 *
 *  Equality---Two regexps are equal if their patterns are identical, they have
 *  the same character set code, and their <code>casefold?</code> values are the
 *  same.
 *
 *     /abc/  == /abc/x   #=> false
 *     /abc/  == /abc/i   #=> false
 *     /abc/u == /abc/n   #=> false
 */

static VALUE
rb_reg_equal(VALUE re1, VALUE re2)
{
    if (re1 == re2) return Qtrue;
    if (TYPE(re2) != T_REGEXP) return Qfalse;
    rb_reg_check(re1); rb_reg_check(re2);
    if (RREGEXP(re1)->len != RREGEXP(re2)->len) return Qfalse;
    if (memcmp(RREGEXP(re1)->str, RREGEXP(re2)->str, RREGEXP(re1)->len) == 0 &&
        rb_reg_cur_kcode(re1) == rb_reg_cur_kcode(re2) &&
        RREGEXP(re1)->ptr->options == RREGEXP(re2)->ptr->options) {
        return Qtrue;
    }
    return Qfalse;
}

static VALUE
rb_reg_match_pos(VALUE re, VALUE str, long pos)
{
    if (NIL_P(str)) {
        rb_backref_set(Qnil);
        return Qnil;
    }
    StringValue(str);
    if (pos != 0) {
        if (pos < 0) {
            pos += RSTRING(str)->len;
            if (pos < 0) {
                return Qnil;
            }
        }
        pos = rb_reg_adjust_startpos(re, str, pos, 0);
    }
    pos = rb_reg_search(re, str, pos, 0);
    if (pos < 0) {
        return Qnil;
    }
    return LONG2FIX(pos);
}

/*
 *  call-seq:
 *     rxp =~ str    => integer or nil
 *
 *  Match---Matches <i>rxp</i> against <i>str</i>.
 *
 *     /at/ =~ "input data"   #=> 7
 */

VALUE
rb_reg_match(VALUE re, VALUE str)
{
    return rb_reg_match_pos(re, str, 0);
}

/*
 *  call-seq:
 *     rxp === str   => true or false
 *
 *  Case Equality---Synonym for <code>Regexp#=~</code> used in case statements.
 *
 *     a = "HELLO"
 *     case a
 *     when /^[a-z]*$/; print "Lower case\n"
 *     when /^[A-Z]*$/; print "Upper case\n"
 *     else;            print "Mixed case\n"
 *     end
 *
 *  <em>produces:</em>
 *
 *     Upper case
 */

VALUE
rb_reg_eqq(VALUE re, VALUE str)
{
    long start;

    if (TYPE(str) != T_STRING) {
        str = rb_check_string_type(str);
        if (NIL_P(str)) {
            rb_backref_set(Qnil);
            return Qfalse;
        }
    }
    StringValue(str);
    start = rb_reg_search(re, str, 0, 0);
    if (start < 0) {
        return Qfalse;
    }
    return Qtrue;
}

/*
 *  call-seq:
 *     ~ rxp   => integer or nil
 *
 *  Match---Matches <i>rxp</i> against the contents of <code>$_</code>.
 *  Equivalent to <code><i>rxp</i> =~ $_</code>.
 *
 *     $_ = "input data"
 *     ~ /at/   #=> 7
 */

VALUE
rb_reg_match2(VALUE re)
{
    long start;
    VALUE line = rb_lastline_get();

    if (TYPE(line) != T_STRING) {
        rb_backref_set(Qnil);
        return Qnil;
    }

    start = rb_reg_search(re, line, 0, 0);
    if (start < 0) {
        return Qnil;
    }
    return LONG2FIX(start);
}

/*
 *  call-seq:
 *     rxp.match(str)       => matchdata or nil
 *     rxp.match(str,pos)   => matchdata or nil
 *
 *  Returns a <code>MatchData</code> object describing the match, or
 *  <code>nil</code> if there was no match. This is equivalent to retrieving the
 *  value of the special variable <code>$~</code> following a normal match.
 *  If the second parameter is present, it specifies the position in the string
 *  to begin the search.
 *
 *     /(.)(.)(.)/.match("abc")[2]   #=> "b"
 *     /(.)(.)/.match("abc", 1)[2]   #=> "c"
 */

static VALUE
rb_reg_match_m(int argc, VALUE *argv, VALUE re)
{
    VALUE result, str, initpos;
    long pos;

    if (rb_scan_args(argc, argv, "11", &str, &initpos) == 2) {
        pos = NUM2LONG(initpos);
    }
    else {
        pos = 0;
    }

    result = rb_reg_match_pos(re, str, pos);
    if (NIL_P(result)) {
        rb_backref_set(Qnil);
        return Qnil;
    }
    result = rb_backref_get();
    rb_match_busy(result);
    return result;
}

/*
 * Document-method: compile
 *
 * Synonym for <code>Regexp.new</code>
 */

/*
 *  call-seq:
 *     Regexp.new(string [, options [, lang]])       => regexp
 *     Regexp.new(regexp)                            => regexp
 *     Regexp.compile(string [, options [, lang]])   => regexp
 *     Regexp.compile(regexp)                        => regexp
 *
 *  Constructs a new regular expression from <i>pattern</i>, which can be either
 *  a <code>String</code> or a <code>Regexp</code> (in which case that regexp's
 *  options are propagated, and new options may not be specified (a change as of
 *  Ruby 1.8). If <i>options</i> is a <code>Fixnum</code>, it should be one or
 *  more of the constants <code>Regexp::EXTENDED</code>,
 *  <code>Regexp::IGNORECASE</code>, and <code>Regexp::MULTILINE</code>,
 *  <em>or</em>-ed together. Otherwise, if <i>options</i> is not
 *  <code>nil</code>, the regexp will be case insensitive. The <i>lang</i>
 *  parameter enables multibyte support for the regexp: `n', `N' = none, `e',
 *  `E' = EUC, `s', `S' = SJIS, `u', `U' = UTF-8.
 *
 *     r1 = Regexp.new('^a-z+:\\s+\w+')           #=> /^a-z+:\s+\w+/
 *     r2 = Regexp.new('cat', true)               #=> /cat/i
 *     r3 = Regexp.new('dog', Regexp::EXTENDED)   #=> /dog/x
 *     r4 = Regexp.new(r2)                        #=> /cat/i
 */

static VALUE
rb_reg_initialize_m(int argc, VALUE *argv, VALUE self)
{
    const char *s;
    long len;
    int flags = 0;

    rb_check_frozen(self);
    if (argc == 0 || argc > 3) {
        rb_raise(rb_eArgError, "wrong number of arguments");
    }
    if (TYPE(argv[0]) == T_REGEXP) {
        if (argc > 1) {
            rb_warn("flags%s ignored", (argc == 3) ? " and encoding": "");
        }
        rb_reg_check(argv[0]);
        flags = RREGEXP(argv[0])->ptr->options & 0xf;
        if (FL_TEST(argv[0], KCODE_FIXED)) {
            switch (RBASIC(argv[0])->flags & KCODE_MASK) {
              case KCODE_NONE:
                flags |= 16;
                break;
              case KCODE_EUC:
                flags |= 32;
                break;
              case KCODE_SJIS:
                flags |= 48;
                break;
              case KCODE_UTF8:
                flags |= 64;
                break;
              default:
                break;
            }
        }
        s = RREGEXP(argv[0])->str;
        len = RREGEXP(argv[0])->len;
    }
    else {
        if (argc >= 2) {
            if (FIXNUM_P(argv[1])) flags = FIX2INT(argv[1]);
            else if (RTEST(argv[1])) flags = ONIG_OPTION_IGNORECASE;
        }
        if (argc == 3 && !NIL_P(argv[2])) {
            char *kcode = StringValuePtr(argv[2]);

            flags &= ~0x70;
            switch (kcode[0]) {
              case 'n': case 'N':
                flags |= 16;
                break;
              case 'e': case 'E':
                flags |= 32;
                break;
              case 's': case 'S':
                flags |= 48;
                break;
              case 'u': case 'U':
                flags |= 64;
                break;
              default:
                break;
            }
        }
        s = StringValuePtr(argv[0]);
        len = RSTRING(argv[0])->len;
    }
    rb_reg_initialize(self, s, len, flags, Qfalse);
    return self;
}

VALUE
rb_reg_quote(VALUE str)
{
    char *s, *send, *t;
    VALUE tmp;
    int c;

    s = RSTRING(str)->ptr;
    send = s + RSTRING(str)->len;
    for (; s < send; s++) {
        c = *s;
        if (ismbchar(*s)) {
            int n = mbclen(*s);

            while (n-- && s < send)
                s++;
            s--;
            continue;
        }
        switch (c) {
          case '[': case ']': case '{': case '}':
          case '(': case ')': case '|': case '-':
          case '*': case '.': case '\\':
          case '?': case '+': case '^': case '$':
          case ' ': case '#':
          case '\t': case '\f': case '\n': case '\r':
            goto meta_found;
        }
    }
    return str;

  meta_found:
    tmp = rb_str_new(0, RSTRING(str)->len*2);
    t = RSTRING(tmp)->ptr;
    /* copy upto metacharacter */
    memcpy(t, RSTRING(str)->ptr, s - RSTRING(str)->ptr);
    t += s - RSTRING(str)->ptr;

    for (; s < send; s++) {
        c = *s;
        if (ismbchar(*s)) {
            int n = mbclen(*s);

            while (n-- && s < send)
                *t++ = *s++;
            s--;
            continue;
        }
        switch (c) {
          case '[': case ']': case '{': case '}':
          case '(': case ')': case '|': case '-':
          case '*': case '.': case '\\':
          case '?': case '+': case '^': case '$':
          case '#':
            *t++ = '\\';
            break;
          case ' ':
            *t++ = '\\';
            *t++ = ' ';
            continue;
          case '\t':
            *t++ = '\\';
            *t++ = 't';
            continue;
          case '\n':
            *t++ = '\\';
            *t++ = 'n';
            continue;
          case '\r':
            *t++ = '\\';
            *t++ = 'r';
            continue;
          case '\f':
            *t++ = '\\';
            *t++ = 'f';
            continue;
        }
        *t++ = c;
    }
    rb_str_resize(tmp, t - RSTRING(tmp)->ptr);
    OBJ_INFECT(tmp, str);
    return tmp;
}

/*
 *  call-seq:
 *     Regexp.escape(str)   => a_str
 *     Regexp.quote(str)    => a_str
 *
 *  Escapes any characters that would have special meaning in a regular
 *  expression. Returns a new escaped string, or self if no characters are
 *  escaped.  For any string,
 *  <code>Regexp.escape(<i>str</i>)=~<i>str</i></code> will be true.
 *
 *     Regexp.escape('\\*?{}.')   #=> \\\\\*\?\{\}\.
 */

static VALUE
rb_reg_s_quote(int argc, VALUE *argv)
{
    VALUE str, kcode;
    int kcode_saved = reg_kcode;

    rb_scan_args(argc, argv, "11", &str, &kcode);
    if (!NIL_P(kcode)) {
        rb_set_kcode(StringValuePtr(kcode));
        curr_kcode = reg_kcode;
        reg_kcode = kcode_saved;
    }
    StringValue(str);
    str = rb_reg_quote(str);
    kcode_reset_option();
    return str;
}

int
rb_kcode(void)
{
    switch (reg_kcode) {
      case KCODE_EUC:
        return MBCTYPE_EUC;
      case KCODE_SJIS:
        return MBCTYPE_SJIS;
      case KCODE_UTF8:
        return MBCTYPE_UTF8;
      case KCODE_NONE:
        return MBCTYPE_ASCII;
    }
    rb_bug("wrong reg_kcode value (0x%x)", reg_kcode);
}

static int
rb_reg_get_kcode(VALUE re)
{
    switch (RBASIC(re)->flags & KCODE_MASK) {
      case KCODE_NONE:
        return 16;
      case KCODE_EUC:
        return 32;
      case KCODE_SJIS:
        return 48;
      case KCODE_UTF8:
        return 64;
      default:
        return 0;
    }
}

int
rb_reg_options(VALUE re)
{
    int options;

    rb_reg_check(re);
    options = RREGEXP(re)->ptr->options &
        (ONIG_OPTION_IGNORECASE|ONIG_OPTION_MULTILINE|ONIG_OPTION_EXTEND);
    if (FL_TEST(re, KCODE_FIXED)) {
        options |= rb_reg_get_kcode(re);
    }
    return options;
}

/*
 *  call-seq:
 *     Regexp.union([pattern]*)   => new_str
 *
 *  Return a <code>Regexp</code> object that is the union of the given
 *  <em>pattern</em>s, i.e., will match any of its parts. The <em>pattern</em>s
 *  can be Regexp objects, in which case their options will be preserved, or
 *  Strings. If no arguments are given, returns <code>/(?!)/</code>.
 *
 *     Regexp.union                         #=> /(?!)/
 *     Regexp.union("penzance")             #=> /penzance/
 *     Regexp.union("skiing", "sledding")   #=> /skiing|sledding/
 *     Regexp.union(/dogs/, /cats/i)        #=> /(?-mix:dogs)|(?i-mx:cats)/
 */
static VALUE
rb_reg_s_union(int argc, VALUE *argv)
{
    if (argc == 0) {
        VALUE args[1];
        args[0] = rb_str_new2("(?!)");
        return rb_class_new_instance(1, args, rb_cRegexp);
    }
    else if (argc == 1) {
        VALUE v;
        v = rb_check_convert_type(argv[0], T_REGEXP, "Regexp", "to_regexp");
        if (!NIL_P(v))
            return v;
        else {
            VALUE args[1];
            args[0] = rb_reg_s_quote(argc, argv);
            return rb_class_new_instance(1, args, rb_cRegexp);
        }
    }
    else {
        int i, kcode = -1;
        VALUE kcode_re = Qnil;
        VALUE source = rb_str_buf_new(0);
        VALUE args[3];
        for (i = 0; i < argc; i++) {
            volatile VALUE v;
            if (0 < i)
                rb_str_buf_cat2(source, "|");
            v = rb_check_convert_type(argv[i], T_REGEXP, "Regexp", "to_regexp");
            if (!NIL_P(v)) {
                if (FL_TEST(v, KCODE_FIXED)) {
                    if (kcode == -1) {
                        kcode_re = v;
                        kcode = RBASIC(v)->flags & KCODE_MASK;
                    }
                    else if ((RBASIC(v)->flags & KCODE_MASK) != kcode) {
                        volatile VALUE str1, str2;
                        str1 = rb_inspect(kcode_re);
                        str2 = rb_inspect(v);
                        rb_raise(rb_eArgError, "mixed kcode: %s and %s",
                            RSTRING(str1)->ptr, RSTRING(str2)->ptr);
                    }
                }
                v = rb_reg_to_s(v);
            }
            else {
                args[0] = argv[i];
                v = rb_reg_s_quote(1, args);
            }
            rb_str_buf_append(source, v);
        }
        args[0] = source;
        args[1] = Qnil;
        switch (kcode) {
          case -1:
            args[2] = Qnil;
            break;
          case KCODE_NONE:
            args[2] = rb_str_new2("n");
            break;
          case KCODE_EUC:
            args[2] = rb_str_new2("e");
            break;
          case KCODE_SJIS:
            args[2] = rb_str_new2("s");
            break;
          case KCODE_UTF8:
            args[2] = rb_str_new2("u");
            break;
        }
        return rb_class_new_instance(3, args, rb_cRegexp);
    }
}

/* :nodoc: */
static VALUE
rb_reg_init_copy(VALUE copy, VALUE re)
{
    if (copy == re) return copy;
    rb_check_frozen(copy);
    /* need better argument type check */
    if (!rb_obj_is_instance_of(re, rb_obj_class(copy))) {
        rb_raise(rb_eTypeError, "wrong argument type");
    }
    rb_reg_check(re);
    rb_reg_initialize(copy, RREGEXP(re)->str, RREGEXP(re)->len,
                      rb_reg_options(re), Qfalse);
    return copy;
}

VALUE
rb_reg_regsub(VALUE str, VALUE src, struct re_registers *regs)
{
    VALUE val = 0;
    char *p, *s, *e;
    unsigned char uc;
    int no;

    p = s = RSTRING(str)->ptr;
    e = s + RSTRING(str)->len;

    while (s < e) {
        char *ss = s;

        uc = (unsigned char)*s++;
        if (ismbchar(uc)) {
            s += mbclen(uc) - 1;
            continue;
        }
        if (uc != '\\' || s == e) continue;

        if (!val) {
            val = rb_str_buf_new(ss-p);
            rb_str_buf_cat(val, p, ss-p);
        }
        else {
            rb_str_buf_cat(val, p, ss-p);
        }

        uc = (unsigned char)*s++;
        p = s;
        switch (uc) {
          case '0': case '1': case '2': case '3': case '4':
          case '5': case '6': case '7': case '8': case '9':
            no = uc - '0';
            break;
          case '&':
            no = 0;
            break;

          case '`':
            rb_str_buf_cat(val, RSTRING(src)->ptr, BEG(0));
            continue;

          case '\'':
            rb_str_buf_cat(val, RSTRING(src)->ptr+END(0), RSTRING(src)->len-END(0));
            continue;

          case '+':
            no = regs->num_regs-1;
            while (BEG(no) == -1 && no > 0) no--;
            if (no == 0) continue;
            break;

          case '\\':
            rb_str_buf_cat(val, s-1, 1);
            continue;

          default:
            rb_str_buf_cat(val, s-2, 2);
            continue;
        }

        if (no >= 0) {
            if (no >= regs->num_regs) continue;
            if (BEG(no) == -1) continue;
            rb_str_buf_cat(val, RSTRING(src)->ptr+BEG(no), END(no)-BEG(no));
        }
    }

    if (p < e) {
        if (!val) {
            val = rb_str_buf_new(e-p);
            rb_str_buf_cat(val, p, e-p);
        }
        else {
            rb_str_buf_cat(val, p, e-p);
        }
    }
    if (!val) return str;

    return val;
}

const char*
rb_get_kcode(void)
{
    switch (reg_kcode) {
      case KCODE_SJIS:
        return "SJIS";
      case KCODE_EUC:
        return "EUC";
      case KCODE_UTF8:
        return "UTF8";
      default:
        return "NONE";
    }
}

static VALUE
kcode_getter(void)
{
    return rb_str_new2(rb_get_kcode());
}

void
rb_set_kcode(const char *code)
{
    if (code == 0) goto set_no_conversion;

    switch (code[0]) {
      case 'E':
      case 'e':
        reg_kcode = KCODE_EUC;
        onigenc_set_default_encoding(ONIG_ENCODING_EUC_JP);
        break;
      case 'S':
      case 's':
        reg_kcode = KCODE_SJIS;
        onigenc_set_default_encoding(ONIG_ENCODING_SJIS);
        break;
      case 'U':
      case 'u':
        reg_kcode = KCODE_UTF8;
        onigenc_set_default_encoding(ONIG_ENCODING_UTF8);
        break;
      default:
      case 'N':
      case 'n':
      case 'A':
      case 'a':
      set_no_conversion:
        reg_kcode = KCODE_NONE;
        onigenc_set_default_encoding(ONIG_ENCODING_ASCII);
        break;
    }
}

static void
kcode_setter(VALUE val)
{
    may_need_recompile = 1;
    rb_set_kcode(StringValuePtr(val));
}

static VALUE
ignorecase_getter(void)
{
    return ruby_ignorecase?Qtrue:Qfalse;
}

static void
ignorecase_setter(VALUE val, ID id)
{
    rb_warn("modifying %s is deprecated", rb_id2name(id));
    may_need_recompile = 1;
    ruby_ignorecase = RTEST(val);
}

static VALUE
match_getter(void)
{
    VALUE match = rb_backref_get();

    if (NIL_P(match)) return Qnil;
    rb_match_busy(match);
    return match;
}

static void
match_setter(VALUE val)
{
    if (!NIL_P(val)) {
        Check_Type(val, T_MATCH);
    }
    rb_backref_set(val);
}

/*
 *  call-seq:
 *     Regexp.last_match           => matchdata
 *     Regexp.last_match(fixnum)   => str
 *
 *  The first form returns the <code>MatchData</code> object generated by the
 *  last successful pattern match. Equivalent to reading the global variable
 *  <code>$~</code>. The second form returns the nth field in this
 *  <code>MatchData</code> object.
 *
 *     /c(.)t/ =~ 'cat'       #=> 0
 *     Regexp.last_match      #=> #<MatchData:0x401b3d30>
 *     Regexp.last_match(0)   #=> "cat"
 *     Regexp.last_match(1)   #=> "a"
 *     Regexp.last_match(2)   #=> nil
 */

static VALUE
rb_reg_s_last_match(int argc, VALUE *argv)
{
    VALUE nth;

    if (rb_scan_args(argc, argv, "01", &nth) == 1) {
        return rb_reg_nth_match(NUM2INT(nth), rb_backref_get());
    }
    return match_getter();
}

/*
 *  Document-class: Regexp
 *
 *  A <code>Regexp</code> holds a regular expression, used to match a pattern
 *  against strings. Regexps are created using the <code>/.../</code> and
 *  <code>%r{...}</code> literals, and by the <code>Regexp::new</code>
 *  constructor.
 *
 */

void
Init_Regexp(void)
{
    rb_eRegexpError = rb_define_class("RegexpError", rb_eStandardError);

    onigenc_set_default_caseconv_table((UChar*)casetable);
#if DEFAULT_KCODE == KCODE_EUC
    onigenc_set_default_encoding(ONIG_ENCODING_EUC_JP);
#else
#if DEFAULT_KCODE == KCODE_SJIS
    onigenc_set_default_encoding(ONIG_ENCODING_SJIS);
#else
#if DEFAULT_KCODE == KCODE_UTF8
    onigenc_set_default_encoding(ONIG_ENCODING_UTF8);
#else
    onigenc_set_default_encoding(ONIG_ENCODING_ASCII);
#endif
#endif
#endif

    rb_define_virtual_variable("$~", match_getter, match_setter);
    rb_define_virtual_variable("$&", last_match_getter, 0);
    rb_define_virtual_variable("$`", prematch_getter, 0);
    rb_define_virtual_variable("$'", postmatch_getter, 0);
    rb_define_virtual_variable("$+", last_paren_match_getter, 0);

    rb_define_virtual_variable("$=", ignorecase_getter, ignorecase_setter);
    rb_define_virtual_variable("$KCODE", kcode_getter, kcode_setter);
    rb_define_virtual_variable("$-K", kcode_getter, kcode_setter);

    rb_cRegexp = rb_define_class("Regexp", rb_cObject);
    rb_define_alloc_func(rb_cRegexp, rb_reg_s_alloc);
    rb_define_singleton_method(rb_cRegexp, "compile", rb_class_new_instance, -1);
    rb_define_singleton_method(rb_cRegexp, "quote", rb_reg_s_quote, -1);
    rb_define_singleton_method(rb_cRegexp, "escape", rb_reg_s_quote, -1);
    rb_define_singleton_method(rb_cRegexp, "union", rb_reg_s_union, -1);
    rb_define_singleton_method(rb_cRegexp, "last_match", rb_reg_s_last_match, -1);

    rb_define_method(rb_cRegexp, "initialize", rb_reg_initialize_m, -1);
    rb_define_method(rb_cRegexp, "initialize_copy", rb_reg_init_copy, 1);
    rb_define_method(rb_cRegexp, "hash", rb_reg_hash, 0);
    rb_define_method(rb_cRegexp, "eql?", rb_reg_equal, 1);
    rb_define_method(rb_cRegexp, "==", rb_reg_equal, 1);
    rb_define_method(rb_cRegexp, "=~", rb_reg_match, 1);
    rb_define_method(rb_cRegexp, "===", rb_reg_eqq, 1);
    rb_define_method(rb_cRegexp, "~", rb_reg_match2, 0);
    rb_define_method(rb_cRegexp, "match", rb_reg_match_m, -1);
    rb_define_method(rb_cRegexp, "to_s", rb_reg_to_s, 0);
    rb_define_method(rb_cRegexp, "inspect", rb_reg_inspect, 0);
    rb_define_method(rb_cRegexp, "source", rb_reg_source, 0);
    rb_define_method(rb_cRegexp, "casefold?", rb_reg_casefold_p, 0);
    rb_define_method(rb_cRegexp, "options", rb_reg_options_m, 0);
    rb_define_method(rb_cRegexp, "kcode", rb_reg_kcode_m, 0);

    rb_define_const(rb_cRegexp, "IGNORECASE", INT2FIX(ONIG_OPTION_IGNORECASE));
    rb_define_const(rb_cRegexp, "EXTENDED", INT2FIX(ONIG_OPTION_EXTEND));
    rb_define_const(rb_cRegexp, "MULTILINE", INT2FIX(ONIG_OPTION_MULTILINE));

    rb_global_variable(&reg_cache);

    rb_cMatch  = rb_define_class("MatchData", rb_cObject);
    rb_define_global_const("MatchingData", rb_cMatch);
    rb_define_alloc_func(rb_cMatch, match_alloc);
    rb_undef_method(CLASS_OF(rb_cMatch), "new");

    rb_define_method(rb_cMatch, "initialize_copy", match_init_copy, 1);
    rb_define_method(rb_cMatch, "size", match_size, 0);
    rb_define_method(rb_cMatch, "length", match_size, 0);
    rb_define_method(rb_cMatch, "offset", match_offset, 1);
    rb_define_method(rb_cMatch, "begin", match_begin, 1);
    rb_define_method(rb_cMatch, "end", match_end, 1);
    rb_define_method(rb_cMatch, "to_a", match_to_a, 0);
    rb_define_method(rb_cMatch, "[]", match_aref, -1);
    rb_define_method(rb_cMatch, "captures", match_captures, 0);
    rb_define_method(rb_cMatch, "select", match_select, -1);
    rb_define_method(rb_cMatch, "values_at", match_values_at, -1);
    rb_define_method(rb_cMatch, "pre_match", rb_reg_match_pre, 0);
    rb_define_method(rb_cMatch, "post_match", rb_reg_match_post, 0);
    rb_define_method(rb_cMatch, "to_s", match_to_s, 0);
    rb_define_method(rb_cMatch, "inspect", rb_any_to_s, 0); /* in object.c */
    rb_define_method(rb_cMatch, "string", match_string, 0);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


re.h

root/re.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/**********************************************************************

  re.h -

  $Author: ocean $
  $Date: 2005/09/14 06:32:32 $
  created at: Thu Sep 30 14:18:32 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#ifndef RE_H
#define RE_H

#include <sys/types.h>
#include <stdio.h>

#include "regex.h"

typedef struct re_pattern_buffer Regexp;

struct RMatch {
    struct RBasic basic;
    VALUE str;
    struct re_registers *regs;
};

#define RMATCH(obj)  (R_CAST(RMatch)(obj))

VALUE rb_reg_regcomp(VALUE);
long rb_reg_search(VALUE, VALUE, long, long);
VALUE rb_reg_regsub(VALUE, VALUE, struct re_registers *);
long rb_reg_adjust_startpos(VALUE, VALUE, long, long);
void rb_match_busy(VALUE);
VALUE rb_reg_quote(VALUE);

RUBY_EXTERN int ruby_ignorecase;

int rb_reg_mbclen2(unsigned int, VALUE);
#define mbclen2(c,re) rb_reg_mbclen2((c),(re))
#endif
/* [<][>][^][v][top][bottom][index] [help] */


regcomp.c

root/regcomp.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. onig_get_default_ambig_flag
  2. onig_set_default_ambig_flag
  3. k_strdup
  4. swap_node
  5. distance_add
  6. distance_multiply
  7. bitset_is_empty
  8. bitset_on_num
  9. onig_bbuf_init
  10. unset_addr_list_init
  11. unset_addr_list_end
  12. unset_addr_list_add
  13. add_opcode
  14. add_rel_addr
  15. add_abs_addr
  16. add_length
  17. add_mem_num
  18. add_pointer
  19. add_option
  20. add_opcode_rel_addr
  21. add_bytes
  22. add_bitset
  23. add_opcode_option
  24. select_str_opcode
  25. compile_tree_empty_check
  26. compile_call
  27. compile_tree_n_times
  28. add_compile_string_length
  29. add_compile_string
  30. compile_length_string_node
  31. compile_length_string_raw_node
  32. compile_string_node
  33. compile_string_raw_node
  34. add_multi_byte_cclass
  35. compile_length_cclass_node
  36. compile_cclass_node
  37. entry_repeat_range
  38. compile_range_repeat_node
  39. compile_length_qualifier_node
  40. is_anychar_star_qualifier
  41. compile_qualifier_node
  42. compile_length_option_node
  43. compile_option_node
  44. compile_length_effect_node
  45. compile_effect_node
  46. compile_length_anchor_node
  47. compile_anchor_node
  48. compile_length_tree
  49. compile_tree
  50. noname_disable_map
  51. renumber_node_backref
  52. renumber_by_map
  53. numbered_ref_check
  54. disable_noname_group_capture
  55. unset_addr_list_fix
  56. qualifiers_memory_node_info
  57. get_min_match_length
  58. get_max_match_length
  59. get_char_length_tree1
  60. get_char_length_tree
  61. onig_is_code_in_cc
  62. is_not_included
  63. get_head_value_node
  64. check_type_tree
  65. subexp_inf_recursive_check
  66. subexp_inf_recursive_check_trav
  67. subexp_recursive_check
  68. subexp_recursive_check_trav
  69. setup_subexp_call
  70. divide_look_behind_alternatives
  71. setup_look_behind
  72. next_setup
  73. divide_ambig_string_node
  74. setup_tree
  75. set_bm_skip
  76. MinMaxLen
  77. OptEnv
  78. OptAncInfo
  79. OptExactInfo
  80. OptMapInfo
  81. NodeOptInfo
  82. map_position_value
  83. distance_value
  84. comp_distance_value
  85. is_equal_mml
  86. set_mml
  87. clear_mml
  88. copy_mml
  89. add_mml
  90. add_len_mml
  91. alt_merge_mml
  92. copy_opt_env
  93. clear_opt_anc_info
  94. copy_opt_anc_info
  95. concat_opt_anc_info
  96. is_left_anchor
  97. is_set_opt_anc_info
  98. add_opt_anc_info
  99. remove_opt_anc_info
  100. alt_merge_opt_anc_info
  101. is_full_opt_exact_info
  102. clear_opt_exact_info
  103. copy_opt_exact_info
  104. concat_opt_exact_info
  105. concat_opt_exact_info_str
  106. alt_merge_opt_exact_info
  107. select_opt_exact_info
  108. clear_opt_map_info
  109. copy_opt_map_info
  110. add_char_opt_map_info
  111. add_char_amb_opt_map_info
  112. select_opt_map_info
  113. comp_opt_exact_or_map_info
  114. alt_merge_opt_map_info
  115. set_bound_node_opt_info
  116. clear_node_opt_info
  117. copy_node_opt_info
  118. concat_left_node_opt_info
  119. alt_merge_node_opt_info
  120. optimize_node_left
  121. set_optimize_exact_info
  122. set_optimize_map_info
  123. set_sub_anchor
  124. set_optimize_info_from_tree
  125. clear_optimize_info
  126. print_distance_range
  127. print_anchor
  128. print_optimize_info
  129. onig_free_body
  130. onig_free
  131. onig_transfer
  132. onig_chain_link_add
  133. onig_chain_reduce
  134. onig_clone
  135. onig_compile
  136. onig_recompile
  137. onig_alloc_init
  138. onig_new
  139. onig_init
  140. onig_end
  141. op2name
  142. op2arg_type
  143. Indent
  144. p_string
  145. p_len_string
  146. onig_print_compiled_byte_code
  147. print_compiled_byte_code_list
  148. print_indent_tree
  149. print_tree
/**********************************************************************
  regcomp.c -  Oniguruma (regular expression library)
**********************************************************************/
/*-
 * Copyright (c) 2002-2005  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#include "regparse.h"

OnigAmbigType OnigDefaultAmbigFlag =
  (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE |
   ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE);

extern OnigAmbigType
onig_get_default_ambig_flag(void)
{
  return OnigDefaultAmbigFlag;
}

extern int
onig_set_default_ambig_flag(OnigAmbigType ambig_flag)
{
  OnigDefaultAmbigFlag = ambig_flag;
  return 0;
}

#ifndef PLATFORM_UNALIGNED_WORD_ACCESS
static unsigned char PadBuf[WORD_ALIGNMENT_SIZE];
#endif

static UChar*
k_strdup(UChar* s, UChar* end)
{
  int len = end - s;

  if (len > 0) {
    UChar* r = (UChar* )xmalloc(len + 1);
    CHECK_NULL_RETURN(r);
    xmemcpy(r, s, len);
    r[len] = (UChar )0;
    return r;
  }
  else return NULL;
}

/*
  Caution: node should not be a string node.
           (s and end member address break)
*/
static void
swap_node(Node* a, Node* b)
{
  Node c;
  c = *a; *a = *b; *b = c;
}

static OnigDistance
distance_add(OnigDistance d1, OnigDistance d2)
{
  if (d1 == ONIG_INFINITE_DISTANCE || d2 == ONIG_INFINITE_DISTANCE)
    return ONIG_INFINITE_DISTANCE;
  else {
    if (d1 <= ONIG_INFINITE_DISTANCE - d2) return d1 + d2;
    else return ONIG_INFINITE_DISTANCE;
  }
}

static OnigDistance
distance_multiply(OnigDistance d, int m)
{
  if (m == 0) return 0;

  if (d < ONIG_INFINITE_DISTANCE / m)
    return d * m;
  else
    return ONIG_INFINITE_DISTANCE;
}

static int
bitset_is_empty(BitSetRef bs)
{
  int i;
  for (i = 0; i < BITSET_SIZE; i++) {
    if (bs[i] != 0) return 0;
  }
  return 1;
}

#ifdef ONIG_DEBUG
static int
bitset_on_num(BitSetRef bs)
{
  int i, n;

  n = 0;
  for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
    if (BITSET_AT(bs, i)) n++;
  }
  return n;
}
#endif

extern int
onig_bbuf_init(BBuf* buf, int size)
{
  buf->p = (UChar* )xmalloc(size);
  if (IS_NULL(buf->p)) return(ONIGERR_MEMORY);

  buf->alloc = size;
  buf->used  = 0;
  return 0;
}

#ifdef USE_SUBEXP_CALL

static int
unset_addr_list_init(UnsetAddrList* uslist, int size)
{
  UnsetAddr* p;

  p = (UnsetAddr* )xmalloc(sizeof(UnsetAddr)* size);
  CHECK_NULL_RETURN_VAL(p, ONIGERR_MEMORY);
  uslist->num   = 0;
  uslist->alloc = size;
  uslist->us    = p;
  return 0;
}

static void
unset_addr_list_end(UnsetAddrList* uslist)
{
  if (IS_NOT_NULL(uslist->us))
    xfree(uslist->us);
}

static int
unset_addr_list_add(UnsetAddrList* uslist, int offset, struct _Node* node)
{
  UnsetAddr* p;
  int size;

  if (uslist->num >= uslist->alloc) {
    size = uslist->alloc * 2;
    p = (UnsetAddr* )xrealloc(uslist->us, sizeof(UnsetAddr) * size);
    CHECK_NULL_RETURN_VAL(p, ONIGERR_MEMORY);
    uslist->alloc = size;
    uslist->us    = p;
  }

  uslist->us[uslist->num].offset = offset;
  uslist->us[uslist->num].target = node;
  uslist->num++;
  return 0;
}
#endif /* USE_SUBEXP_CALL */

static int
add_opcode(regex_t* reg, int opcode)
{
  BBUF_ADD1(reg, opcode);
  return 0;
}

static int
add_rel_addr(regex_t* reg, int addr)
{
  RelAddrType ra = (RelAddrType )addr;

  BBUF_ADD(reg, &ra, SIZE_RELADDR);
  return 0;
}

static int
add_abs_addr(regex_t* reg, int addr)
{
  AbsAddrType ra = (AbsAddrType )addr;

  BBUF_ADD(reg, &ra, SIZE_ABSADDR);
  return 0;
}

static int
add_length(regex_t* reg, int len)
{
  LengthType l = (LengthType )len;

  BBUF_ADD(reg, &l, SIZE_LENGTH);
  return 0;
}

static int
add_mem_num(regex_t* reg, int num)
{
  MemNumType n = (MemNumType )num;

  BBUF_ADD(reg, &n, SIZE_MEMNUM);
  return 0;
}

static int
add_pointer(regex_t* reg, void* addr)
{
  PointerType ptr = (PointerType )addr;

  BBUF_ADD(reg, &ptr, SIZE_POINTER);
  return 0;
}

static int
add_option(regex_t* reg, OnigOptionType option)
{
  BBUF_ADD(reg, &option, SIZE_OPTION);
  return 0;
}

static int
add_opcode_rel_addr(regex_t* reg, int opcode, int addr)
{
  int r;

  r = add_opcode(reg, opcode);
  if (r) return r;
  r = add_rel_addr(reg, addr);
  return r;
}

static int
add_bytes(regex_t* reg, UChar* bytes, int len)
{
  BBUF_ADD(reg, bytes, len);
  return 0;
}

static int
add_bitset(regex_t* reg, BitSetRef bs)
{
  BBUF_ADD(reg, bs, SIZE_BITSET);
  return 0;
}

static int
add_opcode_option(regex_t* reg, int opcode, OnigOptionType option)
{
  int r;

  r = add_opcode(reg, opcode);
  if (r) return r;
  r = add_option(reg, option);
  return r;
}

static int compile_length_tree(Node* node, regex_t* reg);
static int compile_tree(Node* node, regex_t* reg);

#define IS_NEED_STR_LEN_OP_EXACT(op) \
   ((op) == OP_EXACTN    || (op) == OP_EXACTMB2N ||\
    (op) == OP_EXACTMB3N || (op) == OP_EXACTMBN  || (op) == OP_EXACTN_IC)

static int
select_str_opcode(int mb_len, int str_len, int ignore_case)
{
  int op;

  if (ignore_case) {
    switch (str_len) {
    case 1:  op = OP_EXACT1_IC; break;
    default: op = OP_EXACTN_IC; break;
    }
  }
  else {
    switch (mb_len) {
    case 1:
      switch (str_len) {
      case 1:  op = OP_EXACT1; break;
      case 2:  op = OP_EXACT2; break;
      case 3:  op = OP_EXACT3; break;
      case 4:  op = OP_EXACT4; break;
      case 5:  op = OP_EXACT5; break;
      default: op = OP_EXACTN; break;
      }
      break;

    case 2:
      switch (str_len) {
      case 1:  op = OP_EXACTMB2N1; break;
      case 2:  op = OP_EXACTMB2N2; break;
      case 3:  op = OP_EXACTMB2N3; break;
      default: op = OP_EXACTMB2N;  break;
      }
      break;

    case 3:
      op = OP_EXACTMB3N;
      break;

    default:
      op = OP_EXACTMBN;
      break;
    }
  }
  return op;
}

static int
compile_tree_empty_check(Node* node, regex_t* reg, int empty_info)
{
  int r;
  int saved_num_null_check = reg->num_null_check;

  if (empty_info != 0) {
    r = add_opcode(reg, OP_NULL_CHECK_START);
    if (r) return r;
    r = add_mem_num(reg, reg->num_null_check); /* NULL CHECK ID */
    if (r) return r;
    reg->num_null_check++;
  }

  r = compile_tree(node, reg);
  if (r) return r;

  if (empty_info != 0) {
    if (empty_info == NQ_TARGET_IS_EMPTY)
      r = add_opcode(reg, OP_NULL_CHECK_END);
    else if (empty_info == NQ_TARGET_IS_EMPTY_MEM)
      r = add_opcode(reg, OP_NULL_CHECK_END_MEMST);
    else if (empty_info == NQ_TARGET_IS_EMPTY_REC)
      r = add_opcode(reg, OP_NULL_CHECK_END_MEMST_PUSH);

    if (r) return r;
    r = add_mem_num(reg, saved_num_null_check); /* NULL CHECK ID */
  }
  return r;
}

#ifdef USE_SUBEXP_CALL
static int
compile_call(CallNode* node, regex_t* reg)
{
  int r;

  r = add_opcode(reg, OP_CALL);
  if (r) return r;
  r = unset_addr_list_add(node->unset_addr_list, BBUF_GET_OFFSET_POS(reg),
                          node->target);
  if (r) return r;
  r = add_abs_addr(reg, 0 /*dummy addr.*/);
  return r;
}
#endif

static int
compile_tree_n_times(Node* node, int n, regex_t* reg)
{
  int i, r;

  for (i = 0; i < n; i++) {
    r = compile_tree(node, reg);
    if (r) return r;
  }
  return 0;
}

static int
add_compile_string_length(UChar* s, int mb_len, int str_len,
                          regex_t* reg, int ignore_case)
{
  int len;
  int op = select_str_opcode(mb_len, str_len, ignore_case);

  len = SIZE_OPCODE;

  if (op == OP_EXACTMBN)  len += SIZE_LENGTH;
  if (IS_NEED_STR_LEN_OP_EXACT(op))
    len += SIZE_LENGTH;

  len += mb_len * str_len;
  return len;
}

static int
add_compile_string(UChar* s, int mb_len, int str_len,
                   regex_t* reg, int ignore_case)
{
  int op = select_str_opcode(mb_len, str_len, ignore_case);
  add_opcode(reg, op);

  if (op == OP_EXACTMBN)
    add_length(reg, mb_len);

  if (IS_NEED_STR_LEN_OP_EXACT(op)) {
    if (op == OP_EXACTN_IC)
      add_length(reg, mb_len * str_len);
    else
      add_length(reg, str_len);
  }

  add_bytes(reg, s, mb_len * str_len);
  return 0;
}

static int
compile_length_string_node(Node* node, regex_t* reg)
{
  int rlen, r, len, prev_len, slen, ambig;
  OnigEncoding enc = reg->enc;
  UChar *p, *prev;
  StrNode* sn;

  sn = &(NSTRING(node));
  if (sn->end <= sn->s)
    return 0;

  ambig = NSTRING_IS_AMBIG(node);

  p = prev = sn->s;
  prev_len = enc_len(enc, p);
  p += prev_len;
  slen = 1;
  rlen = 0;

  for (; p < sn->end; ) {
    len = enc_len(enc, p);
    if (len == prev_len) {
      slen++;
    }
    else {
      r = add_compile_string_length(prev, prev_len, slen, reg, ambig);
      rlen += r;
      prev = p;
      slen = 1;
      prev_len = len;
    }
    p += len;
  }
  r = add_compile_string_length(prev, prev_len, slen, reg, ambig);
  rlen += r;
  return rlen;
}

static int
compile_length_string_raw_node(StrNode* sn, regex_t* reg)
{
  if (sn->end <= sn->s)
    return 0;

  return add_compile_string_length(sn->s, 1 /* sb */, sn->end - sn->s, reg, 0);
}

static int
compile_string_node(Node* node, regex_t* reg)
{
  int r, len, prev_len, slen, ambig;
  OnigEncoding enc = reg->enc;
  UChar *p, *prev, *end;
  StrNode* sn;

  sn = &(NSTRING(node));
  if (sn->end <= sn->s)
    return 0;

  end = sn->end;
  ambig = NSTRING_IS_AMBIG(node);

  p = prev = sn->s;
  prev_len = enc_len(enc, p);
  p += prev_len;
  slen = 1;

  for (; p < end; ) {
    len = enc_len(enc, p);
    if (len == prev_len) {
      slen++;
    }
    else {
      r = add_compile_string(prev, prev_len, slen, reg, ambig);
      if (r) return r;

      prev  = p;
      slen  = 1;
      prev_len = len;
    }

    p += len;
  }
  return add_compile_string(prev, prev_len, slen, reg, ambig);
}

static int
compile_string_raw_node(StrNode* sn, regex_t* reg)
{
  if (sn->end <= sn->s)
    return 0;

  return add_compile_string(sn->s, 1 /* sb */, sn->end - sn->s, reg, 0);
}

static int
add_multi_byte_cclass(BBuf* mbuf, regex_t* reg)
{
#ifdef PLATFORM_UNALIGNED_WORD_ACCESS
  add_length(reg, mbuf->used);
  return add_bytes(reg, mbuf->p, mbuf->used);
#else
  int r, pad_size;
  UChar* p = BBUF_GET_ADD_ADDRESS(reg) + SIZE_LENGTH;

  GET_ALIGNMENT_PAD_SIZE(p, pad_size);
  add_length(reg, mbuf->used + (WORD_ALIGNMENT_SIZE - 1));
  if (pad_size != 0) add_bytes(reg, PadBuf, pad_size);

  r = add_bytes(reg, mbuf->p, mbuf->used);

  /* padding for return value from compile_length_cclass_node() to be fix. */
  pad_size = (WORD_ALIGNMENT_SIZE - 1) - pad_size;
  if (pad_size != 0) add_bytes(reg, PadBuf, pad_size);
  return r;
#endif
}

static int
compile_length_cclass_node(CClassNode* cc, regex_t* reg)
{
  int len;

  if (IS_CCLASS_SHARE(cc)) {
    len = SIZE_OPCODE + SIZE_POINTER;
    return len;
  }

  if (IS_NULL(cc->mbuf)) {
    len = SIZE_OPCODE + SIZE_BITSET;
  }
  else {
    if (ONIGENC_MBC_MINLEN(reg->enc) > 1 || bitset_is_empty(cc->bs)) {
      len = SIZE_OPCODE;
    }
    else {
      len = SIZE_OPCODE + SIZE_BITSET;
    }
#ifdef PLATFORM_UNALIGNED_WORD_ACCESS
    len += SIZE_LENGTH + cc->mbuf->used;
#else
    len += SIZE_LENGTH + cc->mbuf->used + (WORD_ALIGNMENT_SIZE - 1);
#endif
  }

  return len;
}

static int
compile_cclass_node(CClassNode* cc, regex_t* reg)
{
  int r;

  if (IS_CCLASS_SHARE(cc)) {
    add_opcode(reg, OP_CCLASS_NODE);
    r = add_pointer(reg, cc);
    return r;
  }

  if (IS_NULL(cc->mbuf)) {
    if (IS_CCLASS_NOT(cc))
      add_opcode(reg, OP_CCLASS_NOT);
    else
      add_opcode(reg, OP_CCLASS);

    r = add_bitset(reg, cc->bs);
  }
  else {
    if (ONIGENC_MBC_MINLEN(reg->enc) > 1 || bitset_is_empty(cc->bs)) {
      if (IS_CCLASS_NOT(cc))
        add_opcode(reg, OP_CCLASS_MB_NOT);
      else
        add_opcode(reg, OP_CCLASS_MB);

      r = add_multi_byte_cclass(cc->mbuf, reg);
    }
    else {
      if (IS_CCLASS_NOT(cc))
        add_opcode(reg, OP_CCLASS_MIX_NOT);
      else
        add_opcode(reg, OP_CCLASS_MIX);

      r = add_bitset(reg, cc->bs);
      if (r) return r;
      r = add_multi_byte_cclass(cc->mbuf, reg);
    }
  }

  return r;
}

static int
entry_repeat_range(regex_t* reg, int id, int lower, int upper)
{
#define REPEAT_RANGE_ALLOC  4

  OnigRepeatRange* p;

  if (reg->repeat_range_alloc == 0) {
    p = (OnigRepeatRange* )xmalloc(sizeof(OnigRepeatRange) * REPEAT_RANGE_ALLOC);
    CHECK_NULL_RETURN_VAL(p, ONIGERR_MEMORY);
    reg->repeat_range = p;
    reg->repeat_range_alloc = REPEAT_RANGE_ALLOC;
  }
  else if (reg->repeat_range_alloc <= id) {
    int n;
    n = reg->repeat_range_alloc + REPEAT_RANGE_ALLOC;
    p = (OnigRepeatRange* )xrealloc(reg->repeat_range,
                                    sizeof(OnigRepeatRange) * n);
    CHECK_NULL_RETURN_VAL(p, ONIGERR_MEMORY);
    reg->repeat_range = p;
    reg->repeat_range_alloc = n;
  }
  else {
    p = reg->repeat_range;
  }

  p[id].lower = lower;
  p[id].upper = upper;
  return 0;
}

static int
compile_range_repeat_node(QualifierNode* qn, int target_len, int empty_info,
                          regex_t* reg)
{
  int r;
  int num_repeat = reg->num_repeat;

  r = add_opcode(reg, qn->greedy ? OP_REPEAT : OP_REPEAT_NG);
  if (r) return r;
  r = add_mem_num(reg, num_repeat); /* OP_REPEAT ID */
  reg->num_repeat++;
  if (r) return r;
  r = add_rel_addr(reg, target_len + SIZE_OP_REPEAT_INC);
  if (r) return r;

  r = entry_repeat_range(reg, num_repeat, qn->lower, qn->upper);
  if (r) return r;

  r = compile_tree_empty_check(qn->target, reg, empty_info);
  if (r) return r;

  if (
#ifdef USE_SUBEXP_CALL
      reg->num_call > 0 ||
#endif
      IS_QUALIFIER_IN_REPEAT(qn)) {
    r = add_opcode(reg, qn->greedy ? OP_REPEAT_INC_SG : OP_REPEAT_INC_NG_SG);
  }
  else {
    r = add_opcode(reg, qn->greedy ? OP_REPEAT_INC : OP_REPEAT_INC_NG);
  }
  if (r) return r;
  r = add_mem_num(reg, num_repeat); /* OP_REPEAT ID */
  return r;
}

#define QUALIFIER_EXPAND_LIMIT_SIZE   50

static int
compile_length_qualifier_node(QualifierNode* qn, regex_t* reg)
{
  int len, mod_tlen;
  int infinite = IS_REPEAT_INFINITE(qn->upper);
  int empty_info = qn->target_empty_info;
  int tlen = compile_length_tree(qn->target, reg);

  if (tlen < 0) return tlen;

  /* anychar repeat */
  if (NTYPE(qn->target) == N_ANYCHAR) {
    if (qn->greedy && infinite) {
      if (IS_NOT_NULL(qn->next_head_exact))
        return SIZE_OP_ANYCHAR_STAR_PEEK_NEXT + tlen * qn->lower;
      else
        return SIZE_OP_ANYCHAR_STAR + tlen * qn->lower;
    }
  }

  if (empty_info != 0)
    mod_tlen = tlen + (SIZE_OP_NULL_CHECK_START + SIZE_OP_NULL_CHECK_END);
  else
    mod_tlen = tlen;

  if (infinite &&
      (qn->lower <= 1 || tlen * qn->lower <= QUALIFIER_EXPAND_LIMIT_SIZE)) {
    if (qn->lower == 1 && tlen > QUALIFIER_EXPAND_LIMIT_SIZE) {
      len = SIZE_OP_JUMP;
    }
    else {
      len = tlen * qn->lower;
    }

    if (qn->greedy) {
      if (IS_NOT_NULL(qn->head_exact))
        len += SIZE_OP_PUSH_OR_JUMP_EXACT1 + mod_tlen + SIZE_OP_JUMP;
      else if (IS_NOT_NULL(qn->next_head_exact))
        len += SIZE_OP_PUSH_IF_PEEK_NEXT + mod_tlen + SIZE_OP_JUMP;
      else
        len += SIZE_OP_PUSH + mod_tlen + SIZE_OP_JUMP;
    }
    else
      len += SIZE_OP_JUMP + mod_tlen + SIZE_OP_PUSH;
  }
  else if (qn->upper == 0 && qn->is_refered != 0) { /* /(?<n>..){0}/ */
    len = SIZE_OP_JUMP + tlen;
  }
  else if (!infinite && qn->greedy &&
           (qn->upper == 1 || (tlen + SIZE_OP_PUSH) * qn->upper
                                      <= QUALIFIER_EXPAND_LIMIT_SIZE)) {
    len = tlen * qn->lower;
    len += (SIZE_OP_PUSH + tlen) * (qn->upper - qn->lower);
  }
  else if (!qn->greedy && qn->upper == 1 && qn->lower == 0) { /* '??' */
    len = SIZE_OP_PUSH + SIZE_OP_JUMP + tlen;
  }
  else {
    len = SIZE_OP_REPEAT_INC
        + mod_tlen + SIZE_OPCODE + SIZE_RELADDR + SIZE_MEMNUM;
  }

  return len;
}

static int
is_anychar_star_qualifier(QualifierNode* qn)
{
  if (qn->greedy && IS_REPEAT_INFINITE(qn->upper) &&
      NTYPE(qn->target) == N_ANYCHAR)
    return 1;
  else
    return 0;
}

static int
compile_qualifier_node(QualifierNode* qn, regex_t* reg)
{
  int i, r, mod_tlen;
  int infinite = IS_REPEAT_INFINITE(qn->upper);
  int empty_info = qn->target_empty_info;
  int tlen = compile_length_tree(qn->target, reg);

  if (tlen < 0) return tlen;

  if (is_anychar_star_qualifier(qn)) {
    r = compile_tree_n_times(qn->target, qn->lower, reg);
    if (r) return r;
    if (IS_NOT_NULL(qn->next_head_exact)) {
      if (IS_MULTILINE(reg->options))
        r = add_opcode(reg, OP_ANYCHAR_ML_STAR_PEEK_NEXT);
      else
        r = add_opcode(reg, OP_ANYCHAR_STAR_PEEK_NEXT);
      if (r) return r;
      return add_bytes(reg, NSTRING(qn->next_head_exact).s, 1);
    }
    else {
      if (IS_MULTILINE(reg->options))
        return add_opcode(reg, OP_ANYCHAR_ML_STAR);
      else
        return add_opcode(reg, OP_ANYCHAR_STAR);
    }
  }

  if (empty_info != 0)
    mod_tlen = tlen + (SIZE_OP_NULL_CHECK_START + SIZE_OP_NULL_CHECK_END);
  else
    mod_tlen = tlen;

  if (infinite &&
      (qn->lower <= 1 || tlen * qn->lower <= QUALIFIER_EXPAND_LIMIT_SIZE)) {
    if (qn->lower == 1 && tlen > QUALIFIER_EXPAND_LIMIT_SIZE) {
      if (qn->greedy) {
        if (IS_NOT_NULL(qn->head_exact))
          r = add_opcode_rel_addr(reg, OP_JUMP, SIZE_OP_PUSH_OR_JUMP_EXACT1);
        else if (IS_NOT_NULL(qn->next_head_exact))
          r = add_opcode_rel_addr(reg, OP_JUMP, SIZE_OP_PUSH_IF_PEEK_NEXT);
        else
          r = add_opcode_rel_addr(reg, OP_JUMP, SIZE_OP_PUSH);
      }
      else {
        r = add_opcode_rel_addr(reg, OP_JUMP, SIZE_OP_JUMP);
      }
      if (r) return r;
    }
    else {
      r = compile_tree_n_times(qn->target, qn->lower, reg);
      if (r) return r;
    }

    if (qn->greedy) {
      if (IS_NOT_NULL(qn->head_exact)) {
        r = add_opcode_rel_addr(reg, OP_PUSH_OR_JUMP_EXACT1,
                             mod_tlen + SIZE_OP_JUMP);
        if (r) return r;
        add_bytes(reg, NSTRING(qn->head_exact).s, 1);
        r = compile_tree_empty_check(qn->target, reg, empty_info);
        if (r) return r;
        r = add_opcode_rel_addr(reg, OP_JUMP,
        -(mod_tlen + (int )SIZE_OP_JUMP + (int )SIZE_OP_PUSH_OR_JUMP_EXACT1));
      }
      else if (IS_NOT_NULL(qn->next_head_exact)) {
        r = add_opcode_rel_addr(reg, OP_PUSH_IF_PEEK_NEXT,
                                mod_tlen + SIZE_OP_JUMP);
        if (r) return r;
        add_bytes(reg, NSTRING(qn->next_head_exact).s, 1);
        r = compile_tree_empty_check(qn->target, reg, empty_info);
        if (r) return r;
        r = add_opcode_rel_addr(reg, OP_JUMP,
          -(mod_tlen + (int )SIZE_OP_JUMP + (int )SIZE_OP_PUSH_IF_PEEK_NEXT));
      }
      else {
        r = add_opcode_rel_addr(reg, OP_PUSH, mod_tlen + SIZE_OP_JUMP);
        if (r) return r;
        r = compile_tree_empty_check(qn->target, reg, empty_info);
        if (r) return r;
        r = add_opcode_rel_addr(reg, OP_JUMP,
                     -(mod_tlen + (int )SIZE_OP_JUMP + (int )SIZE_OP_PUSH));
      }
    }
    else {
      r = add_opcode_rel_addr(reg, OP_JUMP, mod_tlen);
      if (r) return r;
      r = compile_tree_empty_check(qn->target, reg, empty_info);
      if (r) return r;
      r = add_opcode_rel_addr(reg, OP_PUSH, -(mod_tlen + (int )SIZE_OP_PUSH));
    }
  }
  else if (qn->upper == 0 && qn->is_refered != 0) { /* /(?<n>..){0}/ */
    r = add_opcode_rel_addr(reg, OP_JUMP, tlen);
    if (r) return r;
    r = compile_tree(qn->target, reg);
  }
  else if (!infinite && qn->greedy &&
           (qn->upper == 1 || (tlen + SIZE_OP_PUSH) * qn->upper
                                  <= QUALIFIER_EXPAND_LIMIT_SIZE)) {
    int n = qn->upper - qn->lower;

    r = compile_tree_n_times(qn->target, qn->lower, reg);
    if (r) return r;

    for (i = 0; i < n; i++) {
      r = add_opcode_rel_addr(reg, OP_PUSH,
                           (n - i) * tlen + (n - i - 1) * SIZE_OP_PUSH);
      if (r) return r;
      r = compile_tree(qn->target, reg);
      if (r) return r;
    }
  }
  else if (!qn->greedy && qn->upper == 1 && qn->lower == 0) { /* '??' */
    r = add_opcode_rel_addr(reg, OP_PUSH, SIZE_OP_JUMP);
    if (r) return r;
    r = add_opcode_rel_addr(reg, OP_JUMP, tlen);
    if (r) return r;
    r = compile_tree(qn->target, reg);
  }
  else {
    r = compile_range_repeat_node(qn, mod_tlen, empty_info, reg);
  }
  return r;
}

static int
compile_length_option_node(EffectNode* node, regex_t* reg)
{
  int tlen;
  OnigOptionType prev = reg->options;

  reg->options = node->option;
  tlen = compile_length_tree(node->target, reg);
  reg->options = prev;

  if (tlen < 0) return tlen;

  if (IS_DYNAMIC_OPTION(prev ^ node->option)) {
    return SIZE_OP_SET_OPTION_PUSH + SIZE_OP_SET_OPTION + SIZE_OP_FAIL
           + tlen + SIZE_OP_SET_OPTION;
  }
  else
    return tlen;
}

static int
compile_option_node(EffectNode* node, regex_t* reg)
{
  int r;
  OnigOptionType prev = reg->options;

  if (IS_DYNAMIC_OPTION(prev ^ node->option)) {
    r = add_opcode_option(reg, OP_SET_OPTION_PUSH, node->option);
    if (r) return r;
    r = add_opcode_option(reg, OP_SET_OPTION, prev);
    if (r) return r;
    r = add_opcode(reg, OP_FAIL);
    if (r) return r;
  }

  reg->options = node->option;
  r = compile_tree(node->target, reg);
  reg->options = prev;

  if (IS_DYNAMIC_OPTION(prev ^ node->option)) {
    if (r) return r;
    r = add_opcode_option(reg, OP_SET_OPTION, prev);
  }
  return r;
}

static int
compile_length_effect_node(EffectNode* node, regex_t* reg)
{
  int len;
  int tlen;

  if (node->type == EFFECT_OPTION)
    return compile_length_option_node(node, reg);

  if (node->target) {
    tlen = compile_length_tree(node->target, reg);
    if (tlen < 0) return tlen;
  }
  else
    tlen = 0;

  switch (node->type) {
  case EFFECT_MEMORY:
#ifdef USE_SUBEXP_CALL
    if (IS_EFFECT_CALLED(node)) {
      len = SIZE_OP_MEMORY_START_PUSH + tlen
          + SIZE_OP_CALL + SIZE_OP_JUMP + SIZE_OP_RETURN;
      if (BIT_STATUS_AT(reg->bt_mem_end, node->regnum))
        len += (IS_EFFECT_RECURSION(node)
                ? SIZE_OP_MEMORY_END_PUSH_REC : SIZE_OP_MEMORY_END_PUSH);
      else
        len += (IS_EFFECT_RECURSION(node)
                ? SIZE_OP_MEMORY_END_REC : SIZE_OP_MEMORY_END);
    }
    else
#endif
    {
      if (BIT_STATUS_AT(reg->bt_mem_start, node->regnum))
        len = SIZE_OP_MEMORY_START_PUSH;
      else
        len = SIZE_OP_MEMORY_START;

      len += tlen + (BIT_STATUS_AT(reg->bt_mem_end, node->regnum)
                     ? SIZE_OP_MEMORY_END_PUSH : SIZE_OP_MEMORY_END);
    }
    break;

  case EFFECT_STOP_BACKTRACK:
    if (IS_EFFECT_STOP_BT_SIMPLE_REPEAT(node)) {
      QualifierNode* qn = &NQUALIFIER(node->target);
      tlen = compile_length_tree(qn->target, reg);
      if (tlen < 0) return tlen;

      len = tlen * qn->lower
          + SIZE_OP_PUSH + tlen + SIZE_OP_POP + SIZE_OP_JUMP;
    }
    else {
      len = SIZE_OP_PUSH_STOP_BT + tlen + SIZE_OP_POP_STOP_BT;
    }
    break;

  default:
    return ONIGERR_TYPE_BUG;
    break;
  }

  return len;
}

static int get_char_length_tree(Node* node, regex_t* reg, int* len);

static int
compile_effect_node(EffectNode* node, regex_t* reg)
{
  int r, len;

  if (node->type == EFFECT_OPTION)
    return compile_option_node(node, reg);

  switch (node->type) {
  case EFFECT_MEMORY:
#ifdef USE_SUBEXP_CALL
    if (IS_EFFECT_CALLED(node)) {
      r = add_opcode(reg, OP_CALL);
      if (r) return r;
      node->call_addr = BBUF_GET_OFFSET_POS(reg) + SIZE_ABSADDR + SIZE_OP_JUMP;
      node->state |= NST_ADDR_FIXED;
      r = add_abs_addr(reg, (int )node->call_addr);
      if (r) return r;
      len = compile_length_tree(node->target, reg);
      len += (SIZE_OP_MEMORY_START_PUSH + SIZE_OP_RETURN);
      if (BIT_STATUS_AT(reg->bt_mem_end, node->regnum))
        len += (IS_EFFECT_RECURSION(node)
                ? SIZE_OP_MEMORY_END_PUSH_REC : SIZE_OP_MEMORY_END_PUSH);
      else
        len += (IS_EFFECT_RECURSION(node)
                ? SIZE_OP_MEMORY_END_REC : SIZE_OP_MEMORY_END);

      r = add_opcode_rel_addr(reg, OP_JUMP, len);
      if (r) return r;
    }
#endif
    if (BIT_STATUS_AT(reg->bt_mem_start, node->regnum))
      r = add_opcode(reg, OP_MEMORY_START_PUSH);
    else
      r = add_opcode(reg, OP_MEMORY_START);
    if (r) return r;
    r = add_mem_num(reg, node->regnum);
    if (r) return r;
    r = compile_tree(node->target, reg);
    if (r) return r;
#ifdef USE_SUBEXP_CALL
    if (IS_EFFECT_CALLED(node)) {
      if (BIT_STATUS_AT(reg->bt_mem_end, node->regnum))
        r = add_opcode(reg, (IS_EFFECT_RECURSION(node)
                             ? OP_MEMORY_END_PUSH_REC : OP_MEMORY_END_PUSH));
      else
        r = add_opcode(reg, (IS_EFFECT_RECURSION(node)
                             ? OP_MEMORY_END_REC : OP_MEMORY_END));

      if (r) return r;
      r = add_mem_num(reg, node->regnum);
      if (r) return r;
      r = add_opcode(reg, OP_RETURN);
    }
    else
#endif
    {
      if (BIT_STATUS_AT(reg->bt_mem_end, node->regnum))
        r = add_opcode(reg, OP_MEMORY_END_PUSH);
      else
        r = add_opcode(reg, OP_MEMORY_END);
      if (r) return r;
      r = add_mem_num(reg, node->regnum);
    }
    break;

  case EFFECT_STOP_BACKTRACK:
    if (IS_EFFECT_STOP_BT_SIMPLE_REPEAT(node)) {
      QualifierNode* qn = &NQUALIFIER(node->target);
      r = compile_tree_n_times(qn->target, qn->lower, reg);
      if (r) return r;

      len = compile_length_tree(qn->target, reg);
      if (len < 0) return len;

      r = add_opcode_rel_addr(reg, OP_PUSH, len + SIZE_OP_POP + SIZE_OP_JUMP);
      if (r) return r;
      r = compile_tree(qn->target, reg);
      if (r) return r;
      r = add_opcode(reg, OP_POP);
      if (r) return r;
      r = add_opcode_rel_addr(reg, OP_JUMP,
         -((int )SIZE_OP_PUSH + len + (int )SIZE_OP_POP + (int )SIZE_OP_JUMP));
    }
    else {
      r = add_opcode(reg, OP_PUSH_STOP_BT);
      if (r) return r;
      r = compile_tree(node->target, reg);
      if (r) return r;
      r = add_opcode(reg, OP_POP_STOP_BT);
    }
    break;

  default:
    return ONIGERR_TYPE_BUG;
    break;
  }

  return r;
}

static int
compile_length_anchor_node(AnchorNode* node, regex_t* reg)
{
  int len;
  int tlen = 0;

  if (node->target) {
    tlen = compile_length_tree(node->target, reg);
    if (tlen < 0) return tlen;
  }

  switch (node->type) {
  case ANCHOR_PREC_READ:
    len = SIZE_OP_PUSH_POS + tlen + SIZE_OP_POP_POS;
    break;
  case ANCHOR_PREC_READ_NOT:
    len = SIZE_OP_PUSH_POS_NOT + tlen + SIZE_OP_FAIL_POS;
    break;
  case ANCHOR_LOOK_BEHIND:
    len = SIZE_OP_LOOK_BEHIND + tlen;
    break;
  case ANCHOR_LOOK_BEHIND_NOT:
    len = SIZE_OP_PUSH_LOOK_BEHIND_NOT + tlen + SIZE_OP_FAIL_LOOK_BEHIND_NOT;
    break;

  default:
    len = SIZE_OPCODE;
    break;
  }

  return len;
}

static int
compile_anchor_node(AnchorNode* node, regex_t* reg)
{
  int r, len;

  switch (node->type) {
  case ANCHOR_BEGIN_BUF:      r = add_opcode(reg, OP_BEGIN_BUF);      break;
  case ANCHOR_END_BUF:        r = add_opcode(reg, OP_END_BUF);        break;
  case ANCHOR_BEGIN_LINE:     r = add_opcode(reg, OP_BEGIN_LINE);     break;
  case ANCHOR_END_LINE:       r = add_opcode(reg, OP_END_LINE);       break;
  case ANCHOR_SEMI_END_BUF:   r = add_opcode(reg, OP_SEMI_END_BUF);   break;
  case ANCHOR_BEGIN_POSITION: r = add_opcode(reg, OP_BEGIN_POSITION); break;

  case ANCHOR_WORD_BOUND:     r = add_opcode(reg, OP_WORD_BOUND);     break;
  case ANCHOR_NOT_WORD_BOUND: r = add_opcode(reg, OP_NOT_WORD_BOUND); break;
#ifdef USE_WORD_BEGIN_END
  case ANCHOR_WORD_BEGIN:     r = add_opcode(reg, OP_WORD_BEGIN);     break;
  case ANCHOR_WORD_END:       r = add_opcode(reg, OP_WORD_END);       break;
#endif

  case ANCHOR_PREC_READ:
    r = add_opcode(reg, OP_PUSH_POS);
    if (r) return r;
    r = compile_tree(node->target, reg);
    if (r) return r;
    r = add_opcode(reg, OP_POP_POS);
    break;

  case ANCHOR_PREC_READ_NOT:
    len = compile_length_tree(node->target, reg);
    if (len < 0) return len;
    r = add_opcode_rel_addr(reg, OP_PUSH_POS_NOT, len + SIZE_OP_FAIL_POS);
    if (r) return r;
    r = compile_tree(node->target, reg);
    if (r) return r;
    r = add_opcode(reg, OP_FAIL_POS);
    break;

  case ANCHOR_LOOK_BEHIND:
    {
      int n;
      r = add_opcode(reg, OP_LOOK_BEHIND);
      if (r) return r;
      if (node->char_len < 0) {
        r = get_char_length_tree(node->target, reg, &n);
        if (r) return ONIGERR_INVALID_LOOK_BEHIND_PATTERN;
      }
      else
        n = node->char_len;
      r = add_length(reg, n);
      if (r) return r;
      r = compile_tree(node->target, reg);
    }
    break;

  case ANCHOR_LOOK_BEHIND_NOT:
    {
      int n;
      len = compile_length_tree(node->target, reg);
      r = add_opcode_rel_addr(reg, OP_PUSH_LOOK_BEHIND_NOT,
                           len + SIZE_OP_FAIL_LOOK_BEHIND_NOT);
      if (r) return r;
      if (node->char_len < 0) {
        r = get_char_length_tree(node->target, reg, &n);
        if (r) return ONIGERR_INVALID_LOOK_BEHIND_PATTERN;
      }
      else
        n = node->char_len;
      r = add_length(reg, n);
      if (r) return r;
      r = compile_tree(node->target, reg);
      if (r) return r;
      r = add_opcode(reg, OP_FAIL_LOOK_BEHIND_NOT);
    }
    break;

  default:
    return ONIGERR_TYPE_BUG;
    break;
  }

  return r;
}

static int
compile_length_tree(Node* node, regex_t* reg)
{
  int len, type, r;

  type = NTYPE(node);
  switch (type) {
  case N_LIST:
    len = 0;
    do {
      r = compile_length_tree(NCONS(node).left, reg);
      if (r < 0) return r;
      len += r;
    } while (IS_NOT_NULL(node = NCONS(node).right));
    r = len;
    break;

  case N_ALT:
    {
      int n;

      n = r = 0;
      do {
        r += compile_length_tree(NCONS(node).left, reg);
        n++;
      } while (IS_NOT_NULL(node = NCONS(node).right));
      r += (SIZE_OP_PUSH + SIZE_OP_JUMP) * (n - 1);
    }
    break;

  case N_STRING:
    if (NSTRING_IS_RAW(node))
      r = compile_length_string_raw_node(&(NSTRING(node)), reg);
    else
      r = compile_length_string_node(node, reg);
    break;

  case N_CCLASS:
    r = compile_length_cclass_node(&(NCCLASS(node)), reg);
    break;

  case N_CTYPE:
  case N_ANYCHAR:
    r = SIZE_OPCODE;
    break;

  case N_BACKREF:
    {
      BackrefNode* br = &(NBACKREF(node));

      if (br->back_num == 1) {
        r = ((!IS_IGNORECASE(reg->options) && br->back_static[0] <= 3)
             ? SIZE_OPCODE : (SIZE_OPCODE + SIZE_MEMNUM));
      }
      else {
        r = SIZE_OPCODE + SIZE_LENGTH + (SIZE_MEMNUM * br->back_num);
      }
    }
    break;

#ifdef USE_SUBEXP_CALL
  case N_CALL:
    r = SIZE_OP_CALL;
    break;
#endif

  case N_QUALIFIER:
    r = compile_length_qualifier_node(&(NQUALIFIER(node)), reg);
    break;

  case N_EFFECT:
    r = compile_length_effect_node(&NEFFECT(node), reg);
    break;

  case N_ANCHOR:
    r = compile_length_anchor_node(&(NANCHOR(node)), reg);
    break;

  default:
    return ONIGERR_TYPE_BUG;
    break;
  }

  return r;
}

static int
compile_tree(Node* node, regex_t* reg)
{
  int n, type, len, pos, r = 0;

  type = NTYPE(node);
  switch (type) {
  case N_LIST:
    do {
      r = compile_tree(NCONS(node).left, reg);
    } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
    break;

  case N_ALT:
    {
      Node* x = node;
      len = 0;
      do {
        len += compile_length_tree(NCONS(x).left, reg);
        if (NCONS(x).right != NULL) {
          len += SIZE_OP_PUSH + SIZE_OP_JUMP;
        }
      } while (IS_NOT_NULL(x = NCONS(x).right));
      pos = reg->used + len;  /* goal position */

      do {
        len = compile_length_tree(NCONS(node).left, reg);
        if (IS_NOT_NULL(NCONS(node).right)) {
          r = add_opcode_rel_addr(reg, OP_PUSH, len + SIZE_OP_JUMP);
          if (r) break;
        }
        r = compile_tree(NCONS(node).left, reg);
        if (r) break;
        if (IS_NOT_NULL(NCONS(node).right)) {
          len = pos - (reg->used + SIZE_OP_JUMP);
          r = add_opcode_rel_addr(reg, OP_JUMP, len);
          if (r) break;
        }
      } while (IS_NOT_NULL(node = NCONS(node).right));
    }
    break;

  case N_STRING:
    if (NSTRING_IS_RAW(node))
      r = compile_string_raw_node(&(NSTRING(node)), reg);
    else
      r = compile_string_node(node, reg);
    break;

  case N_CCLASS:
    r = compile_cclass_node(&(NCCLASS(node)), reg);
    break;

  case N_CTYPE:
    {
      int op;

      switch (NCTYPE(node).type) {
      case CTYPE_WORD:            op = OP_WORD;           break;
      case CTYPE_NOT_WORD:        op = OP_NOT_WORD;       break;
      default:
        return ONIGERR_TYPE_BUG;
        break;
      }
      r = add_opcode(reg, op);
    }
    break;

  case N_ANYCHAR:
    if (IS_MULTILINE(reg->options))
      r = add_opcode(reg, OP_ANYCHAR_ML);
    else
      r = add_opcode(reg, OP_ANYCHAR);
    break;

  case N_BACKREF:
    {
      int i;
      BackrefNode* br = &(NBACKREF(node));

      if (br->back_num == 1) {
        n = br->back_static[0];
        if (IS_IGNORECASE(reg->options)) {
          r = add_opcode(reg, OP_BACKREFN_IC);
          if (r) return r;
          r = add_mem_num(reg, n);
        }
        else {
          switch (n) {
          case 1:  r = add_opcode(reg, OP_BACKREF1); break;
          case 2:  r = add_opcode(reg, OP_BACKREF2); break;
          case 3:  r = add_opcode(reg, OP_BACKREF3); break;
          default:
            r = add_opcode(reg, OP_BACKREFN);
            if (r) return r;
            r = add_mem_num(reg, n);
            break;
          }
        }
      }
      else {
        int* p;

        if (IS_IGNORECASE(reg->options)) {
          add_opcode(reg, OP_BACKREF_MULTI_IC);
        }
        else {
          add_opcode(reg, OP_BACKREF_MULTI);
        }

        if (r) return r;
        add_length(reg, br->back_num);
        if (r) return r;
        p = BACKREFS_P(br);
        for (i = br->back_num - 1; i >= 0; i--) {
          r = add_mem_num(reg, p[i]);
          if (r) return r;
        }
      }
    }
    break;

#ifdef USE_SUBEXP_CALL
  case N_CALL:
    r = compile_call(&(NCALL(node)), reg);
    break;
#endif

  case N_QUALIFIER:
    r = compile_qualifier_node(&(NQUALIFIER(node)), reg);
    break;

  case N_EFFECT:
    r = compile_effect_node(&NEFFECT(node), reg);
    break;

  case N_ANCHOR:
    r = compile_anchor_node(&(NANCHOR(node)), reg);
    break;

  default:
#ifdef ONIG_DEBUG
    fprintf(stderr, "compile_tree: undefined node type %d\n", NTYPE(node));
#endif
    break;
  }

  return r;
}

#ifdef USE_NAMED_GROUP

static int
noname_disable_map(Node** plink, GroupNumRemap* map, int* counter)
{
  int r = 0;
  Node* node = *plink;

  switch (NTYPE(node)) {
  case N_LIST:
  case N_ALT:
    do {
      r = noname_disable_map(&(NCONS(node).left), map, counter);
    } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
    break;

  case N_QUALIFIER:
    {
      Node** ptarget = &(NQUALIFIER(node).target);
      Node*  old = *ptarget;
      r = noname_disable_map(ptarget, map, counter);
      if (*ptarget != old && NTYPE(*ptarget) == N_QUALIFIER) {
        onig_reduce_nested_qualifier(node, *ptarget);
      }
    }
    break;

  case N_EFFECT:
    {
      EffectNode* en = &(NEFFECT(node));
      if (en->type == EFFECT_MEMORY) {
        if (IS_EFFECT_NAMED_GROUP(en)) {
          (*counter)++;
          map[en->regnum].new_val = *counter;
          en->regnum = *counter;
          r = noname_disable_map(&(en->target), map, counter);
        }
        else {
          *plink = en->target;
          en->target = NULL_NODE;
          onig_node_free(node);
          r = noname_disable_map(plink, map, counter);
        }
      }
      else
        r = noname_disable_map(&(en->target), map, counter);
    }
    break;

  default:
    break;
  }

  return r;
}

static int
renumber_node_backref(Node* node, GroupNumRemap* map)
{
  int i, pos, n, old_num;
  int *backs;
  BackrefNode* bn = &(NBACKREF(node));

  if (! IS_BACKREF_NAME_REF(bn))
    return ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED;

  old_num = bn->back_num;
  if (IS_NULL(bn->back_dynamic))
    backs = bn->back_static;
  else
    backs = bn->back_dynamic;

  for (i = 0, pos = 0; i < old_num; i++) {
    n = map[backs[i]].new_val;
    if (n > 0) {
      backs[pos] = n;
      pos++;
    }
  }

  bn->back_num = pos;
  return 0;
}

static int
renumber_by_map(Node* node, GroupNumRemap* map)
{
  int r = 0;

  switch (NTYPE(node)) {
  case N_LIST:
  case N_ALT:
    do {
      r = renumber_by_map(NCONS(node).left, map);
    } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
    break;
  case N_QUALIFIER:
    r = renumber_by_map(NQUALIFIER(node).target, map);
    break;
  case N_EFFECT:
    r = renumber_by_map(NEFFECT(node).target, map);
    break;

  case N_BACKREF:
    r = renumber_node_backref(node, map);
    break;

  default:
    break;
  }

  return r;
}

static int
numbered_ref_check(Node* node)
{
  int r = 0;

  switch (NTYPE(node)) {
  case N_LIST:
  case N_ALT:
    do {
      r = numbered_ref_check(NCONS(node).left);
    } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
    break;
  case N_QUALIFIER:
    r = numbered_ref_check(NQUALIFIER(node).target);
    break;
  case N_EFFECT:
    r = numbered_ref_check(NEFFECT(node).target);
    break;

  case N_BACKREF:
    if (! IS_BACKREF_NAME_REF(&(NBACKREF(node))))
      return ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED;
    break;

  default:
    break;
  }

  return r;
}

static int
disable_noname_group_capture(Node** root, regex_t* reg, ScanEnv* env)
{
  int r, i, pos, counter;
  BitStatusType loc;
  GroupNumRemap* map;

  map = (GroupNumRemap* )xalloca(sizeof(GroupNumRemap) * (env->num_mem + 1));
  CHECK_NULL_RETURN_VAL(map, ONIGERR_MEMORY);
  for (i = 1; i <= env->num_mem; i++) {
    map[i].new_val = 0;
  }
  counter = 0;
  r = noname_disable_map(root, map, &counter);
  if (r != 0) return r;

  r = renumber_by_map(*root, map);
  if (r != 0) return r;

  for (i = 1, pos = 1; i <= env->num_mem; i++) {
    if (map[i].new_val > 0) {
      SCANENV_MEM_NODES(env)[pos] = SCANENV_MEM_NODES(env)[i];
      pos++;
    }
  }

  loc = env->capture_history;
  BIT_STATUS_CLEAR(env->capture_history);
  for (i = 1; i <= ONIG_MAX_CAPTURE_HISTORY_GROUP; i++) {
    if (BIT_STATUS_AT(loc, i)) {
      BIT_STATUS_ON_AT_SIMPLE(env->capture_history, map[i].new_val);
    }
  }

  env->num_mem = env->num_named;
  reg->num_mem = env->num_named;

  return onig_renumber_name_table(reg, map);
}
#endif /* USE_NAMED_GROUP */

#ifdef USE_SUBEXP_CALL
static int
unset_addr_list_fix(UnsetAddrList* uslist, regex_t* reg)
{
  int i, offset;
  EffectNode* en;
  AbsAddrType addr;

  for (i = 0; i < uslist->num; i++) {
    en = &(NEFFECT(uslist->us[i].target));
    if (! IS_EFFECT_ADDR_FIXED(en)) return ONIGERR_PARSER_BUG;
    addr = en->call_addr;
    offset = uslist->us[i].offset;

    BBUF_WRITE(reg, offset, &addr, SIZE_ABSADDR);
  }
  return 0;
}
#endif

#ifdef USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK
static int
qualifiers_memory_node_info(Node* node)
{
  int r = 0;

  switch (NTYPE(node)) {
  case N_LIST:
  case N_ALT:
    {
      int v;
      do {
        v = qualifiers_memory_node_info(NCONS(node).left);
        if (v > r) r = v;
      } while (v >= 0 && IS_NOT_NULL(node = NCONS(node).right));
    }
    break;

#ifdef USE_SUBEXP_CALL
  case N_CALL:
    if (IS_CALL_RECURSION(&NCALL(node))) {
      return NQ_TARGET_IS_EMPTY_REC; /* tiny version */
    }
    else
      r = qualifiers_memory_node_info(NCALL(node).target);
    break;
#endif

  case N_QUALIFIER:
    {
      QualifierNode* qn = &(NQUALIFIER(node));
      if (qn->upper != 0) {
        r = qualifiers_memory_node_info(qn->target);
      }
    }
    break;

  case N_EFFECT:
    {
      EffectNode* en = &(NEFFECT(node));
      switch (en->type) {
      case EFFECT_MEMORY:
        return NQ_TARGET_IS_EMPTY_MEM;
        break;

      case EFFECT_OPTION:
      case EFFECT_STOP_BACKTRACK:
        r = qualifiers_memory_node_info(en->target);
        break;
      default:
        break;
      }
    }
    break;

  case N_BACKREF:
  case N_STRING:
  case N_CTYPE:
  case N_CCLASS:
  case N_ANYCHAR:
  case N_ANCHOR:
  default:
    break;
  }

  return r;
}
#endif /* USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK */

static int
get_min_match_length(Node* node, OnigDistance *min, ScanEnv* env)
{
  OnigDistance tmin;
  int r = 0;

  *min = 0;
  switch (NTYPE(node)) {
  case N_BACKREF:
    {
      int i;
      int* backs;
      Node** nodes = SCANENV_MEM_NODES(env);
      BackrefNode* br = &(NBACKREF(node));
      if (br->state & NST_RECURSION) break;

      backs = BACKREFS_P(br);
      if (backs[0] > env->num_mem)  return ONIGERR_INVALID_BACKREF;
      r = get_min_match_length(nodes[backs[0]], min, env);
      if (r != 0) break;
      for (i = 1; i < br->back_num; i++) {
        if (backs[i] > env->num_mem)  return ONIGERR_INVALID_BACKREF;
        r = get_min_match_length(nodes[backs[i]], &tmin, env);
        if (r != 0) break;
        if (*min > tmin) *min = tmin;
      }
    }
    break;

#ifdef USE_SUBEXP_CALL
  case N_CALL:
    if (IS_CALL_RECURSION(&NCALL(node))) {
      EffectNode* en = &(NEFFECT(NCALL(node).target));
      if (IS_EFFECT_MIN_FIXED(en))
        *min = en->min_len;
    }
    else
      r = get_min_match_length(NCALL(node).target, min, env);
    break;
#endif

  case N_LIST:
    do {
      r = get_min_match_length(NCONS(node).left, &tmin, env);
      if (r == 0) *min += tmin;
    } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
    break;

  case N_ALT:
    {
      Node *x, *y;
      y = node;
      do {
        x = NCONS(y).left;
        r = get_min_match_length(x, &tmin, env);
        if (r != 0) break;
        if (y == node) *min = tmin;
        else if (*min > tmin) *min = tmin;
      } while (r == 0 && IS_NOT_NULL(y = NCONS(y).right));
    }
    break;

  case N_STRING:
    {
      StrNode* sn = &(NSTRING(node));
      *min = sn->end - sn->s;
    }
    break;

  case N_CTYPE:
    switch (NCTYPE(node).type) {
    case CTYPE_WORD:     *min = 1; break;
    case CTYPE_NOT_WORD: *min = 1; break;
    default:
      break;
    }
    break;

  case N_CCLASS:
  case N_ANYCHAR:
    *min = 1;
    break;

  case N_QUALIFIER:
    {
      QualifierNode* qn = &(NQUALIFIER(node));

      if (qn->lower > 0) {
        r = get_min_match_length(qn->target, min, env);
        if (r == 0)
          *min = distance_multiply(*min, qn->lower);
      }
    }
    break;

  case N_EFFECT:
    {
      EffectNode* en = &(NEFFECT(node));
      switch (en->type) {
      case EFFECT_MEMORY:
#ifdef USE_SUBEXP_CALL
        if (IS_EFFECT_MIN_FIXED(en))
          *min = en->min_len;
        else {
          r = get_min_match_length(en->target, min, env);
          if (r == 0) {
            en->min_len = *min;
            SET_EFFECT_STATUS(node, NST_MIN_FIXED);
          }
        }
        break;
#endif
      case EFFECT_OPTION:
      case EFFECT_STOP_BACKTRACK:
        r = get_min_match_length(en->target, min, env);
        break;
      }
    }
    break;

  case N_ANCHOR:
  default:
    break;
  }

  return r;
}

static int
get_max_match_length(Node* node, OnigDistance *max, ScanEnv* env)
{
  OnigDistance tmax;
  int r = 0;

  *max = 0;
  switch (NTYPE(node)) {
  case N_LIST:
    do {
      r = get_max_match_length(NCONS(node).left, &tmax, env);
      if (r == 0)
        *max = distance_add(*max, tmax);
    } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
    break;

  case N_ALT:
    do {
      r = get_max_match_length(NCONS(node).left, &tmax, env);
      if (r == 0 && *max < tmax) *max = tmax;
    } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
    break;

  case N_STRING:
    {
      StrNode* sn = &(NSTRING(node));
      *max = sn->end - sn->s;
    }
    break;

  case N_CTYPE:
    switch (NCTYPE(node).type) {
    case CTYPE_WORD:
    case CTYPE_NOT_WORD:
      *max = ONIGENC_MBC_MAXLEN_DIST(env->enc);
      break;

    default:
      break;
    }
    break;

  case N_CCLASS:
  case N_ANYCHAR:
    *max = ONIGENC_MBC_MAXLEN_DIST(env->enc);
    break;

  case N_BACKREF:
    {
      int i;
      int* backs;
      Node** nodes = SCANENV_MEM_NODES(env);
      BackrefNode* br = &(NBACKREF(node));
      if (br->state & NST_RECURSION) {
        *max = ONIG_INFINITE_DISTANCE;
        break;
      }
      backs = BACKREFS_P(br);
      for (i = 0; i < br->back_num; i++) {
        if (backs[i] > env->num_mem)  return ONIGERR_INVALID_BACKREF;
        r = get_max_match_length(nodes[backs[i]], &tmax, env);
        if (r != 0) break;
        if (*max < tmax) *max = tmax;
      }
    }
    break;

#ifdef USE_SUBEXP_CALL
  case N_CALL:
    if (! IS_CALL_RECURSION(&(NCALL(node))))
      r = get_max_match_length(NCALL(node).target, max, env);
    else
      *max = ONIG_INFINITE_DISTANCE;
    break;
#endif

  case N_QUALIFIER:
    {
      QualifierNode* qn = &(NQUALIFIER(node));

      if (qn->upper != 0) {
        r = get_max_match_length(qn->target, max, env);
        if (r == 0 && *max != 0) {
          if (! IS_REPEAT_INFINITE(qn->upper))
            *max = distance_multiply(*max, qn->upper);
          else
            *max = ONIG_INFINITE_DISTANCE;
        }
      }
    }
    break;

  case N_EFFECT:
    {
      EffectNode* en = &(NEFFECT(node));
      switch (en->type) {
      case EFFECT_MEMORY:
#ifdef USE_SUBEXP_CALL
        if (IS_EFFECT_MAX_FIXED(en))
          *max = en->max_len;
        else {
          r = get_max_match_length(en->target, max, env);
          if (r == 0) {
            en->max_len = *max;
            SET_EFFECT_STATUS(node, NST_MAX_FIXED);
          }
        }
        break;
#endif
      case EFFECT_OPTION:
      case EFFECT_STOP_BACKTRACK:
        r = get_max_match_length(en->target, max, env);
        break;
      }
    }
    break;

  case N_ANCHOR:
  default:
    break;
  }

  return r;
}

#define GET_CHAR_LEN_VARLEN           -1
#define GET_CHAR_LEN_TOP_ALT_VARLEN   -2

/* fixed size pattern node only */
static int
get_char_length_tree1(Node* node, regex_t* reg, int* len, int level)
{
  int tlen;
  int r = 0;

  level++;
  *len = 0;
  switch (NTYPE(node)) {
  case N_LIST:
    do {
      r = get_char_length_tree1(NCONS(node).left, reg, &tlen, level);
      if (r == 0)
        *len = distance_add(*len, tlen);
    } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
    break;

  case N_ALT:
    {
      int tlen2;
      int varlen = 0;

      r = get_char_length_tree1(NCONS(node).left, reg, &tlen, level);
      while (r == 0 && IS_NOT_NULL(node = NCONS(node).right)) {
        r = get_char_length_tree1(NCONS(node).left, reg, &tlen2, level);
        if (r == 0) {
          if (tlen != tlen2)
            varlen = 1;
        }
      }
      if (r == 0) {
        if (varlen != 0) {
          if (level == 1)
            r = GET_CHAR_LEN_TOP_ALT_VARLEN;
          else
            r = GET_CHAR_LEN_VARLEN;
        }
        else
          *len = tlen;
      }
    }
    break;

  case N_STRING:
    {
      StrNode* sn = &(NSTRING(node));
      UChar *s = sn->s;
      while (s < sn->end) {
        s += enc_len(reg->enc, s);
        (*len)++;
      }
    }
    break;

  case N_QUALIFIER:
    {
      QualifierNode* qn = &(NQUALIFIER(node));
      if (qn->lower == qn->upper) {
        r = get_char_length_tree1(qn->target, reg, &tlen, level);
        if (r == 0)
          *len = distance_multiply(tlen, qn->lower);
      }
      else
        r = GET_CHAR_LEN_VARLEN;
    }
    break;

#ifdef USE_SUBEXP_CALL
  case N_CALL:
    if (! IS_CALL_RECURSION(&(NCALL(node))))
      r = get_char_length_tree1(NCALL(node).target, reg, len, level);
    else
      r = GET_CHAR_LEN_VARLEN;
    break;
#endif

  case N_CTYPE:
    switch (NCTYPE(node).type) {
    case CTYPE_WORD:
    case CTYPE_NOT_WORD:
      *len = 1;
      break;
    }
    break;

  case N_CCLASS:
  case N_ANYCHAR:
    *len = 1;
    break;

  case N_EFFECT:
    {
      EffectNode* en = &(NEFFECT(node));
      switch (en->type) {
      case EFFECT_MEMORY:
#ifdef USE_SUBEXP_CALL
        if (IS_EFFECT_CLEN_FIXED(en))
          *len = en->char_len;
        else {
          r = get_char_length_tree1(en->target, reg, len, level);
          if (r == 0) {
            en->char_len = *len;
            SET_EFFECT_STATUS(node, NST_CLEN_FIXED);
          }
        }
        break;
#endif
      case EFFECT_OPTION:
      case EFFECT_STOP_BACKTRACK:
        r = get_char_length_tree1(en->target, reg, len, level);
        break;
      default:
        break;
      }
    }
    break;

  case N_ANCHOR:
    break;

  default:
    r = GET_CHAR_LEN_VARLEN;
    break;
  }

  return r;
}

static int
get_char_length_tree(Node* node, regex_t* reg, int* len)
{
  return get_char_length_tree1(node, reg, len, 0);
}

extern int
onig_is_code_in_cc(OnigEncoding enc, OnigCodePoint code, CClassNode* cc)
{
  int found;

  if (ONIGENC_MBC_MINLEN(enc) > 1 || (code >= SINGLE_BYTE_SIZE)) {
    if (IS_NULL(cc->mbuf)) {
      found = 0;
    }
    else {
      found = (onig_is_in_code_range(cc->mbuf->p, code) != 0 ? 1 : 0);
    }
  }
  else {
    found = (BITSET_AT(cc->bs, code) == 0 ? 0 : 1);
  }

  if (IS_CCLASS_NOT(cc))
    return !found;
  else
    return found;
}

/* x is not included y ==>  1 : 0 */
static int
is_not_included(Node* x, Node* y, regex_t* reg)
{
  int i, len;
  OnigCodePoint code;
  UChar *p, c;
  int ytype;

 retry:
  ytype = NTYPE(y);
  switch (NTYPE(x)) {
  case N_CTYPE:
    {
      switch (ytype) {
      case N_CTYPE:
        switch (NCTYPE(x).type) {
        case CTYPE_WORD:
          if (NCTYPE(y).type == CTYPE_NOT_WORD)
            return 1;
          else
            return 0;
          break;
        case CTYPE_NOT_WORD:
          if (NCTYPE(y).type == CTYPE_WORD)
            return 1;
          else
            return 0;
          break;
        default:
          break;
        }
        break;

      case N_CCLASS:
      swap:
        {
          Node* tmp;
          tmp = x; x = y; y = tmp;
          goto retry;
        }
        break;

      case N_STRING:
        goto swap;
        break;

      default:
        break;
      }
    }
    break;

  case N_CCLASS:
    {
      CClassNode* xc = &(NCCLASS(x));
      switch (ytype) {
      case N_CTYPE:
        switch (NCTYPE(y).type) {
        case CTYPE_WORD:
          if (IS_NULL(xc->mbuf) && !IS_CCLASS_NOT(xc)) {
            for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
              if (BITSET_AT(xc->bs, i)) {
                if (ONIGENC_IS_CODE_SB_WORD(reg->enc, i)) return 0;
              }
            }
            return 1;
          }
          return 0;
          break;
        case CTYPE_NOT_WORD:
          for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
            if (! ONIGENC_IS_CODE_SB_WORD(reg->enc, i)) {
              if (!IS_CCLASS_NOT(xc)) {
                if (BITSET_AT(xc->bs, i))
                  return 0;
              }
              else {
                if (! BITSET_AT(xc->bs, i))
                  return 0;
              }
            }
          }
          return 1;
          break;

        default:
          break;
        }
        break;

      case N_CCLASS:
        {
          int v;
          CClassNode* yc = &(NCCLASS(y));

          for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
            v = BITSET_AT(xc->bs, i);
            if ((v != 0 && !IS_CCLASS_NOT(xc)) ||
                (v == 0 && IS_CCLASS_NOT(xc))) {
              v = BITSET_AT(yc->bs, i);
              if ((v != 0 && !IS_CCLASS_NOT(yc)) ||
                  (v == 0 && IS_CCLASS_NOT(yc)))
                return 0;
            }
          }
          if ((IS_NULL(xc->mbuf) && !IS_CCLASS_NOT(xc)) ||
              (IS_NULL(yc->mbuf) && !IS_CCLASS_NOT(yc)))
            return 1;
          return 0;
        }
        break;

      case N_STRING:
        goto swap;
        break;

      default:
        break;
      }
    }
    break;

  case N_STRING:
    {
      StrNode* xs = &(NSTRING(x));
      if (NSTRING_LEN(x) == 0)
        break;

      c = *(xs->s);
      switch (ytype) {
      case N_CTYPE:
        switch (NCTYPE(y).type) {
        case CTYPE_WORD:
          return (ONIGENC_IS_MBC_WORD(reg->enc, xs->s, xs->end) ? 0 : 1);
          break;
        case CTYPE_NOT_WORD:
          return (ONIGENC_IS_MBC_WORD(reg->enc, xs->s, xs->end) ? 1 : 0);
          break;
        default:
          break;
        }
        break;

      case N_CCLASS:
        {
          CClassNode* cc = &(NCCLASS(y));

          code = ONIGENC_MBC_TO_CODE(reg->enc, xs->s,
                                     xs->s + ONIGENC_MBC_MAXLEN(reg->enc));
          return (onig_is_code_in_cc(reg->enc, code, cc) != 0 ? 0 : 1);
        }
        break;

      case N_STRING:
        {
          UChar *q;
          StrNode* ys = &(NSTRING(y));
          len = NSTRING_LEN(x);
          if (len > NSTRING_LEN(y)) len = NSTRING_LEN(y);
          if (NSTRING_IS_AMBIG(x) || NSTRING_IS_AMBIG(y)) {
            /* tiny version */
            return 0;
          }
          else {
            for (i = 0, p = ys->s, q = xs->s; i < len; i++, p++, q++) {
              if (*p != *q) return 1;
            }
          }
        }
        break;

      default:
        break;
      }
    }
    break;

  default:
    break;
  }

  return 0;
}

static Node*
get_head_value_node(Node* node, int exact, regex_t* reg)
{
  Node* n = NULL_NODE;

  switch (NTYPE(node)) {
  case N_BACKREF:
  case N_ALT:
  case N_ANYCHAR:
#ifdef USE_SUBEXP_CALL
  case N_CALL:
#endif
    break;

  case N_CTYPE:
  case N_CCLASS:
    if (exact == 0) {
      n = node;
    }
    break;

  case N_LIST:
    n = get_head_value_node(NCONS(node).left, exact, reg);
    break;

  case N_STRING:
    {
      StrNode* sn = &(NSTRING(node));

      if (sn->end <= sn->s)
        break;

      if (exact != 0 &&
          !NSTRING_IS_RAW(node) && IS_IGNORECASE(reg->options)) {
#if 0
        UChar* tmp = sn->s;
        if (! ONIGENC_IS_MBC_AMBIGUOUS(reg->enc, reg->ambig_flag,
                                       &tmp, sn->end))
          n = node;
#endif
      }
      else {
        n = node;
      }
    }
    break;

  case N_QUALIFIER:
    {
      QualifierNode* qn = &(NQUALIFIER(node));
      if (qn->lower > 0) {
        if (IS_NOT_NULL(qn->head_exact))
          n = qn->head_exact;
        else
          n = get_head_value_node(qn->target, exact, reg);
      }
    }
    break;

  case N_EFFECT:
    {
      EffectNode* en = &(NEFFECT(node));
      switch (en->type) {
      case EFFECT_OPTION:
        {
          OnigOptionType options = reg->options;

          reg->options = NEFFECT(node).option;
          n = get_head_value_node(NEFFECT(node).target, exact, reg);
          reg->options = options;
        }
        break;

      case EFFECT_MEMORY:
      case EFFECT_STOP_BACKTRACK:
        n = get_head_value_node(en->target, exact, reg);
        break;
      }
    }
    break;

  case N_ANCHOR:
    if (NANCHOR(node).type == ANCHOR_PREC_READ)
      n = get_head_value_node(NANCHOR(node).target, exact, reg);
    break;

  default:
    break;
  }

  return n;
}

static int
check_type_tree(Node* node, int type_mask, int effect_mask, int anchor_mask)
{
  int type, r = 0;

  type = NTYPE(node);
  if ((type & type_mask) == 0)
    return 1;

  switch (type) {
  case N_LIST:
  case N_ALT:
    do {
      r = check_type_tree(NCONS(node).left, type_mask, effect_mask, anchor_mask);
    } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
    break;

  case N_QUALIFIER:
    r = check_type_tree(NQUALIFIER(node).target, type_mask, effect_mask,
                        anchor_mask);
    break;

  case N_EFFECT:
    {
      EffectNode* en = &(NEFFECT(node));
      if ((en->type & effect_mask) == 0)
        return 1;

      r = check_type_tree(en->target, type_mask, effect_mask, anchor_mask);
    }
    break;

  case N_ANCHOR:
    type = NANCHOR(node).type;
    if ((type & anchor_mask) == 0)
      return 1;

    if (NANCHOR(node).target)
      r = check_type_tree(NANCHOR(node).target,
                          type_mask, effect_mask, anchor_mask);
    break;

  default:
    break;
  }
  return r;
}

#ifdef USE_SUBEXP_CALL

#define RECURSION_EXIST       1
#define RECURSION_INFINITE    2

static int
subexp_inf_recursive_check(Node* node, ScanEnv* env, int head)
{
  int type;
  int r = 0;

  type = NTYPE(node);
  switch (type) {
  case N_LIST:
    {
      Node *x;
      OnigDistance min;
      int ret;

      x = node;
      do {
        ret = subexp_inf_recursive_check(NCONS(x).left, env, head);
        if (ret < 0 || ret == RECURSION_INFINITE) return ret;
        r |= ret;
        if (head) {
          ret = get_min_match_length(NCONS(x).left, &min, env);
          if (ret != 0) return ret;
          if (min != 0) head = 0;
        }
      } while (IS_NOT_NULL(x = NCONS(x).right));
    }
    break;

  case N_ALT:
    {
      int ret;
      r = RECURSION_EXIST;
      do {
        ret = subexp_inf_recursive_check(NCONS(node).left, env, head);
        if (ret < 0 || ret == RECURSION_INFINITE) return ret;
        r &= ret;
      } while (IS_NOT_NULL(node = NCONS(node).right));
    }
    break;

  case N_QUALIFIER:
    r = subexp_inf_recursive_check(NQUALIFIER(node).target, env, head);
    break;

  case N_ANCHOR:
    {
      AnchorNode* an = &(NANCHOR(node));
      switch (an->type) {
      case ANCHOR_PREC_READ:
      case ANCHOR_PREC_READ_NOT:
      case ANCHOR_LOOK_BEHIND:
      case ANCHOR_LOOK_BEHIND_NOT:
        r = subexp_inf_recursive_check(an->target, env, head);
        break;
      }
    }
    break;

  case N_CALL:
    r = subexp_inf_recursive_check(NCALL(node).target, env, head);
    break;

  case N_EFFECT:
    if (IS_EFFECT_MARK2(&(NEFFECT(node))))
      return 0;
    else if (IS_EFFECT_MARK1(&(NEFFECT(node))))
      return (head == 0 ? RECURSION_EXIST : RECURSION_INFINITE);
    else {
      SET_EFFECT_STATUS(node, NST_MARK2);
      r = subexp_inf_recursive_check(NEFFECT(node).target, env, head);
      CLEAR_EFFECT_STATUS(node, NST_MARK2);
    }
    break;

  default:
    break;
  }

  return r;
}

static int
subexp_inf_recursive_check_trav(Node* node, ScanEnv* env)
{
  int type;
  int r = 0;

  type = NTYPE(node);
  switch (type) {
  case N_LIST:
  case N_ALT:
    do {
      r = subexp_inf_recursive_check_trav(NCONS(node).left, env);
    } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
    break;

  case N_QUALIFIER:
    r = subexp_inf_recursive_check_trav(NQUALIFIER(node).target, env);
    break;

  case N_ANCHOR:
    {
      AnchorNode* an = &(NANCHOR(node));
      switch (an->type) {
      case ANCHOR_PREC_READ:
      case ANCHOR_PREC_READ_NOT:
      case ANCHOR_LOOK_BEHIND:
      case ANCHOR_LOOK_BEHIND_NOT:
        r = subexp_inf_recursive_check_trav(an->target, env);
        break;
      }
    }
    break;

  case N_EFFECT:
    {
      EffectNode* en = &(NEFFECT(node));

      if (IS_EFFECT_RECURSION(en)) {
        SET_EFFECT_STATUS(node, NST_MARK1);
        r = subexp_inf_recursive_check(en->target, env, 1);
        if (r > 0) return ONIGERR_NEVER_ENDING_RECURSION;
        CLEAR_EFFECT_STATUS(node, NST_MARK1);
      }
      r = subexp_inf_recursive_check_trav(en->target, env);
    }

    break;

  default:
    break;
  }

  return r;
}

static int
subexp_recursive_check(Node* node)
{
  int type;
  int r = 0;

  type = NTYPE(node);
  switch (type) {
  case N_LIST:
  case N_ALT:
    do {
      r |= subexp_recursive_check(NCONS(node).left);
    } while (IS_NOT_NULL(node = NCONS(node).right));
    break;

  case N_QUALIFIER:
    r = subexp_recursive_check(NQUALIFIER(node).target);
    break;

  case N_ANCHOR:
    {
      AnchorNode* an = &(NANCHOR(node));
      switch (an->type) {
      case ANCHOR_PREC_READ:
      case ANCHOR_PREC_READ_NOT:
      case ANCHOR_LOOK_BEHIND:
      case ANCHOR_LOOK_BEHIND_NOT:
        r = subexp_recursive_check(an->target);
        break;
      }
    }
    break;

  case N_CALL:
    r = subexp_recursive_check(NCALL(node).target);
    if (r != 0) SET_CALL_RECURSION(node);
    break;

  case N_EFFECT:
    if (IS_EFFECT_MARK2(&(NEFFECT(node))))
      return 0;
    else if (IS_EFFECT_MARK1(&(NEFFECT(node))))
      return 1; /* recursion */
    else {
      SET_EFFECT_STATUS(node, NST_MARK2);
      r = subexp_recursive_check(NEFFECT(node).target);
      CLEAR_EFFECT_STATUS(node, NST_MARK2);
    }
    break;

  default:
    break;
  }

  return r;
}

static int
subexp_recursive_check_trav(Node* node, ScanEnv* env)
{
#define FOUND_CALLED_NODE    1

  int type;
  int r = 0;

  type = NTYPE(node);
  switch (type) {
  case N_LIST:
  case N_ALT:
    {
      int ret;
      do {
        ret = subexp_recursive_check_trav(NCONS(node).left, env);
        if (ret == FOUND_CALLED_NODE) r = FOUND_CALLED_NODE;
        else if (ret < 0) return ret;
      } while (IS_NOT_NULL(node = NCONS(node).right));
    }
    break;

  case N_QUALIFIER:
    r = subexp_recursive_check_trav(NQUALIFIER(node).target, env);
    if (NQUALIFIER(node).upper == 0) {
      if (r == FOUND_CALLED_NODE)
        NQUALIFIER(node).is_refered = 1;
    }
    break;

  case N_ANCHOR:
    {
      AnchorNode* an = &(NANCHOR(node));
      switch (an->type) {
      case ANCHOR_PREC_READ:
      case ANCHOR_PREC_READ_NOT:
      case ANCHOR_LOOK_BEHIND:
      case ANCHOR_LOOK_BEHIND_NOT:
        r = subexp_recursive_check_trav(an->target, env);
        break;
      }
    }
    break;

  case N_EFFECT:
    {
      EffectNode* en = &(NEFFECT(node));

      if (! IS_EFFECT_RECURSION(en)) {
        if (IS_EFFECT_CALLED(en)) {
          SET_EFFECT_STATUS(node, NST_MARK1);
          r = subexp_recursive_check(en->target);
          if (r != 0) SET_EFFECT_STATUS(node, NST_RECURSION);
          CLEAR_EFFECT_STATUS(node, NST_MARK1);
        }
      }
      r = subexp_recursive_check_trav(en->target, env);
      if (IS_EFFECT_CALLED(en))
        r |= FOUND_CALLED_NODE;
    }
    break;

  default:
    break;
  }

  return r;
}

static int
setup_subexp_call(Node* node, ScanEnv* env)
{
  int type;
  int r = 0;

  type = NTYPE(node);
  switch (type) {
  case N_LIST:
    do {
      r = setup_subexp_call(NCONS(node).left, env);
    } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
    break;

  case N_ALT:
    do {
      r = setup_subexp_call(NCONS(node).left, env);
    } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
    break;

  case N_QUALIFIER:
    r = setup_subexp_call(NQUALIFIER(node).target, env);
    break;
  case N_EFFECT:
    r = setup_subexp_call(NEFFECT(node).target, env);
    break;

  case N_CALL:
    {
      int n, num, *refs;
      UChar *p;
      CallNode* cn = &(NCALL(node));
      Node** nodes = SCANENV_MEM_NODES(env);

#ifdef USE_NAMED_GROUP
      n = onig_name_to_group_numbers(env->reg, cn->name, cn->name_end, &refs);
#else
      n = -1;
#endif
      if (n <= 0) {
        /* name not found, check group number. (?*ddd) */
        p = cn->name;
        num = onig_scan_unsigned_number(&p, cn->name_end, env->enc);
        if (num <= 0 || p != cn->name_end) {
          onig_scan_env_set_error_string(env,
                  ONIGERR_UNDEFINED_NAME_REFERENCE, cn->name, cn->name_end);
          return ONIGERR_UNDEFINED_NAME_REFERENCE;
        }
#ifdef USE_NAMED_GROUP
        if (env->num_named > 0 &&
            IS_SYNTAX_BV(env->syntax, ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP) &&
            !ONIG_IS_OPTION_ON(env->option, ONIG_OPTION_CAPTURE_GROUP)) {
          return ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED;
        }
#endif
        if (num > env->num_mem) {
          onig_scan_env_set_error_string(env,
                 ONIGERR_UNDEFINED_GROUP_REFERENCE, cn->name, cn->name_end);
          return ONIGERR_UNDEFINED_GROUP_REFERENCE;
        }
        cn->ref_num = num;
        goto set_call_attr;
      }
      else if (n > 1) {
        onig_scan_env_set_error_string(env,
               ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL, cn->name, cn->name_end);
        return ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL;
      }
      else {
        cn->ref_num = refs[0];
      set_call_attr:
        cn->target = nodes[cn->ref_num];
        if (IS_NULL(cn->target)) {
          onig_scan_env_set_error_string(env,
                  ONIGERR_UNDEFINED_NAME_REFERENCE, cn->name, cn->name_end);
          return ONIGERR_UNDEFINED_NAME_REFERENCE;
        }
        SET_EFFECT_STATUS(cn->target, NST_CALLED);
        BIT_STATUS_ON_AT(env->bt_mem_start, cn->ref_num);
        cn->unset_addr_list = env->unset_addr_list;
      }
    }
    break;

  case N_ANCHOR:
    {
      AnchorNode* an = &(NANCHOR(node));

      switch (an->type) {
      case ANCHOR_PREC_READ:
      case ANCHOR_PREC_READ_NOT:
      case ANCHOR_LOOK_BEHIND:
      case ANCHOR_LOOK_BEHIND_NOT:
        r = setup_subexp_call(an->target, env);
        break;
      }
    }
    break;

  default:
    break;
  }

  return r;
}
#endif

/* divide different length alternatives in look-behind.
  (?<=A|B) ==> (?<=A)|(?<=B)
  (?<!A|B) ==> (?<!A)(?<!B)
*/
static int
divide_look_behind_alternatives(Node* node)
{
  Node tmp_node;
  Node *head, *np, *insert_node;
  AnchorNode* an = &(NANCHOR(node));
  int anc_type = an->type;

  head = an->target;
  np = NCONS(head).left;
  tmp_node = *node; *node = *head; *head = tmp_node;
  NCONS(node).left = head;
  NANCHOR(head).target = np;

  np = node;
  while ((np = NCONS(np).right) != NULL_NODE) {
    insert_node = onig_node_new_anchor(anc_type);
    CHECK_NULL_RETURN_VAL(insert_node, ONIGERR_MEMORY);
    NANCHOR(insert_node).target = NCONS(np).left;
    NCONS(np).left = insert_node;
  }

  if (anc_type == ANCHOR_LOOK_BEHIND_NOT) {
    np = node;
    do {
      np->type = N_LIST;  /* alt -> list */
    } while ((np = NCONS(np).right) != NULL_NODE);
  }
  return 0;
}

static int
setup_look_behind(Node* node, regex_t* reg, ScanEnv* env)
{
  int r, len;
  AnchorNode* an = &(NANCHOR(node));

  r = get_char_length_tree(an->target, reg, &len);
  if (r == 0)
    an->char_len = len;
  else if (r == GET_CHAR_LEN_VARLEN)
    r = ONIGERR_INVALID_LOOK_BEHIND_PATTERN;
  else if (r == GET_CHAR_LEN_TOP_ALT_VARLEN) {
    if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND))
      r = divide_look_behind_alternatives(node);
    else
      r = ONIGERR_INVALID_LOOK_BEHIND_PATTERN;
  }

  return r;
}

static int
next_setup(Node* node, Node* next_node, regex_t* reg)
{
  int type;

 retry:
  type = NTYPE(node);
  if (type == N_QUALIFIER) {
    QualifierNode* qn = &(NQUALIFIER(node));
    if (qn->greedy && IS_REPEAT_INFINITE(qn->upper)) {
#ifdef USE_QUALIFIER_PEEK_NEXT
      qn->next_head_exact = get_head_value_node(next_node, 1, reg);
#endif
      /* automatic posseivation a*b ==> (?>a*)b */
      if (qn->lower <= 1) {
        int ttype = NTYPE(qn->target);
        if (IS_NODE_TYPE_SIMPLE(ttype)) {
          Node *x, *y;
          x = get_head_value_node(qn->target, 0, reg);
          if (IS_NOT_NULL(x)) {
            y = get_head_value_node(next_node,  0, reg);
            if (IS_NOT_NULL(y) && is_not_included(x, y, reg)) {
              Node* en = onig_node_new_effect(EFFECT_STOP_BACKTRACK);
              CHECK_NULL_RETURN_VAL(en, ONIGERR_MEMORY);
              SET_EFFECT_STATUS(en, NST_STOP_BT_SIMPLE_REPEAT);
              swap_node(node, en);
              NEFFECT(node).target = en;
            }
          }
        }
      }
    }
  }
  else if (type == N_EFFECT) {
    EffectNode* en = &(NEFFECT(node));
    if (en->type == EFFECT_MEMORY) {
      node = en->target;
      goto retry;
    }
  }
  return 0;
}

static int
divide_ambig_string_node(Node* node, regex_t* reg)
{
  StrNode* sn = &NSTRING(node);
  int ambig, prev_ambig;
  UChar *prev, *p, *end, *prev_start, *start, *tmp, *wp;
  Node *snode;
  Node *root = NULL_NODE;
  Node **tailp = (Node** )0;

  start = prev_start = p = sn->s;
  end  = sn->end;
  if (p >= end) return 0;

  prev_ambig = ONIGENC_IS_MBC_AMBIGUOUS(reg->enc, reg->ambig_flag, &p, end);

  while (p < end) {
    prev = p;
    if (prev_ambig != (ambig = ONIGENC_IS_MBC_AMBIGUOUS(reg->enc,
                                              reg->ambig_flag, &p, end))) {

      if (prev_ambig != 0) {
        tmp = prev_start;
        wp  = prev_start;
        while (tmp < prev) {
          wp += ONIGENC_MBC_TO_NORMALIZE(reg->enc, reg->ambig_flag,
                                         &tmp, end, wp);
        }
        snode = onig_node_new_str(prev_start, wp);
        CHECK_NULL_RETURN_VAL(snode, ONIGERR_MEMORY);
        NSTRING_SET_AMBIG(snode);
        if (wp != prev) NSTRING_SET_AMBIG_REDUCE(snode);
      }
      else {
        snode = onig_node_new_str(prev_start, prev);
        CHECK_NULL_RETURN_VAL(snode, ONIGERR_MEMORY);
      }

      if (tailp == (Node** )0) {
        root = onig_node_new_list(snode, NULL);
        CHECK_NULL_RETURN_VAL(root, ONIGERR_MEMORY);
        tailp = &(NCONS(root).right);
      }
      else {
        *tailp = onig_node_new_list(snode, NULL);
        CHECK_NULL_RETURN_VAL(*tailp, ONIGERR_MEMORY);
        tailp = &(NCONS(*tailp).right);
      }

      prev_ambig = ambig;
      prev_start = prev;
    }
  }

  if (prev_start == start) {
    if (prev_ambig != 0) {
      NSTRING_SET_AMBIG(node);
      tmp = start;
      wp  = start;
      while (tmp < end) {
        wp += ONIGENC_MBC_TO_NORMALIZE(reg->enc, reg->ambig_flag,
                                       &tmp, end, wp);
      }
      if (wp != sn->end) NSTRING_SET_AMBIG_REDUCE(node);
      sn->end = wp;
    }
  }
  else {
    if (prev_ambig != 0) {
      tmp = prev_start;
      wp  = prev_start;
      while (tmp < end) {
        wp += ONIGENC_MBC_TO_NORMALIZE(reg->enc, reg->ambig_flag,
                                       &tmp, end, wp);
      }
      snode = onig_node_new_str(prev_start, wp);
      CHECK_NULL_RETURN_VAL(snode, ONIGERR_MEMORY);
      NSTRING_SET_AMBIG(snode);
      if (wp != end) NSTRING_SET_AMBIG_REDUCE(snode);
    }
    else {
      snode = onig_node_new_str(prev_start, end);
      CHECK_NULL_RETURN_VAL(snode, ONIGERR_MEMORY);
    }

    if (tailp == (Node** )0) {
      root = onig_node_new_list(snode, NULL);
      CHECK_NULL_RETURN_VAL(root, ONIGERR_MEMORY);
      tailp = &(NCONS(node).right);
    }
    else {
      *tailp = onig_node_new_list(snode, NULL);
      CHECK_NULL_RETURN_VAL(*tailp, ONIGERR_MEMORY);
      tailp = &(NCONS(*tailp).right);
    }

    swap_node(node, root);
    onig_node_str_clear(root); /* should be after swap! */
    onig_node_free(root);      /* free original string node */
  }

  return 0;
}

#define IN_ALT        (1<<0)
#define IN_NOT        (1<<1)
#define IN_REPEAT     (1<<2)
#define IN_VAR_REPEAT (1<<3)

/* setup_tree does the following work.
 1. check empty loop. (set qn->target_empty_info)
 2. expand ignore-case in char class.
 3. set memory status bit flags. (reg->mem_stats)
 4. set qn->head_exact for [push, exact] -> [push_or_jump_exact1, exact].
 5. find invalid patterns in look-behind.
 6. expand repeated string.
 */
static int
setup_tree(Node* node, regex_t* reg, int state, ScanEnv* env)
{
  int type;
  int r = 0;

  type = NTYPE(node);
  switch (type) {
  case N_LIST:
    {
      Node* prev = NULL_NODE;
      do {
        r = setup_tree(NCONS(node).left, reg, state, env);
        if (IS_NOT_NULL(prev) && r == 0) {
          r = next_setup(prev, NCONS(node).left, reg);
        }
        prev = NCONS(node).left;
      } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
    }
    break;

  case N_ALT:
    do {
      r = setup_tree(NCONS(node).left, reg, (state | IN_ALT), env);
    } while (r == 0 && IS_NOT_NULL(node = NCONS(node).right));
    break;

  case N_CCLASS:
    break;

  case N_STRING:
    if (IS_IGNORECASE(reg->options) && !NSTRING_IS_RAW(node)) {
      r = divide_ambig_string_node(node, reg);
    }
    break;

  case N_CTYPE:
  case N_ANYCHAR:
    break;

#ifdef USE_SUBEXP_CALL
  case N_CALL:
    break;
#endif

  case N_BACKREF:
    {
      int i;
      int* p;
      Node** nodes = SCANENV_MEM_NODES(env);
      BackrefNode* br = &(NBACKREF(node));
      p = BACKREFS_P(br);
      for (i = 0; i < br->back_num; i++) {
        if (p[i] > env->num_mem)  return ONIGERR_INVALID_BACKREF;
        BIT_STATUS_ON_AT(env->backrefed_mem, p[i]);
        BIT_STATUS_ON_AT(env->bt_mem_start, p[i]);
        SET_EFFECT_STATUS(nodes[p[i]], NST_MEM_BACKREFED);
      }
    }
    break;

  case N_QUALIFIER:
    {
      OnigDistance d;
      QualifierNode* qn = &(NQUALIFIER(node));
      Node* target = qn->target;

      if ((state & IN_REPEAT) != 0) {
        qn->state |= NST_IN_REPEAT;
      }

      if (IS_REPEAT_INFINITE(qn->upper) || qn->upper >= 1) {
        r = get_min_match_length(target, &d, env);
        if (r) break;
        if (d == 0) {
          qn->target_empty_info = NQ_TARGET_IS_EMPTY;
#ifdef USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK
          r = qualifiers_memory_node_info(target);
          if (r < 0) break;
          if (r > 0) {
            qn->target_empty_info = r;
          }
#endif
#if 0
          r = get_max_match_length(target, &d, env);
          if (r == 0 && d == 0) {
            /*  ()* ==> ()?, ()+ ==> ()  */
            qn->upper = 1;
            if (qn->lower > 1) qn->lower = 1;
            if (NTYPE(target) == N_STRING) {
              qn->upper = qn->lower = 0;  /* /(?:)+/ ==> // */
            }
          }
#endif
        }
      }

      state |= IN_REPEAT;
      if (qn->lower != qn->upper)
        state |= IN_VAR_REPEAT;
      r = setup_tree(target, reg, state, env);
      if (r) break;

      /* expand string */
#define EXPAND_STRING_MAX_LENGTH  100
      if (NTYPE(target) == N_STRING) {
        if (!IS_REPEAT_INFINITE(qn->lower) && qn->lower == qn->upper &&
            qn->lower > 1 && qn->lower <= EXPAND_STRING_MAX_LENGTH) {
          int len = NSTRING_LEN(target);
          StrNode* sn = &(NSTRING(target));

          if (len * qn->lower <= EXPAND_STRING_MAX_LENGTH) {
            int i, n = qn->lower;
            onig_node_conv_to_str_node(node, NSTRING(target).flag);
            for (i = 0; i < n; i++) {
              r = onig_node_str_cat(node, sn->s, sn->end);
              if (r) break;
            }
            onig_node_free(target);
            break; /* break case N_QUALIFIER: */
          }
        }
      }

#ifdef USE_OP_PUSH_OR_JUMP_EXACT
      if (qn->greedy && (qn->target_empty_info != 0)) {
        if (NTYPE(target) == N_QUALIFIER) {
          QualifierNode* tqn = &(NQUALIFIER(target));
          if (IS_NOT_NULL(tqn->head_exact)) {
            qn->head_exact  = tqn->head_exact;
            tqn->head_exact = NULL;
          }
        }
        else {
          qn->head_exact = get_head_value_node(qn->target, 1, reg);
        }
      }
#endif
    }
    break;

  case N_EFFECT:
    {
      EffectNode* en = &(NEFFECT(node));

      switch (en->type) {
      case EFFECT_OPTION:
        {
          OnigOptionType options = reg->options;
          reg->options = NEFFECT(node).option;
          r = setup_tree(NEFFECT(node).target, reg, state, env);
          reg->options = options;
        }
        break;

      case EFFECT_MEMORY:
        if ((state & (IN_ALT | IN_NOT | IN_VAR_REPEAT)) != 0) {
          BIT_STATUS_ON_AT(env->bt_mem_start, en->regnum);
          /* SET_EFFECT_STATUS(node, NST_MEM_IN_ALT_NOT); */
        }
        r = setup_tree(en->target, reg, state, env);
        break;

      case EFFECT_STOP_BACKTRACK:
        {
          Node* target = en->target;
          r = setup_tree(target, reg, state, env);
          if (NTYPE(target) == N_QUALIFIER) {
            QualifierNode* tqn = &(NQUALIFIER(target));
            if (IS_REPEAT_INFINITE(tqn->upper) && tqn->lower <= 1 &&
                tqn->greedy != 0) {  /* (?>a*), a*+ etc... */
              int qtype = NTYPE(tqn->target);
              if (IS_NODE_TYPE_SIMPLE(qtype))
                SET_EFFECT_STATUS(node, NST_STOP_BT_SIMPLE_REPEAT);
            }
          }
        }
        break;
      }
    }
    break;

  case N_ANCHOR:
    {
      AnchorNode* an = &(NANCHOR(node));

      switch (an->type) {
      case ANCHOR_PREC_READ:
        r = setup_tree(an->target, reg, state, env);
        break;
      case ANCHOR_PREC_READ_NOT:
        r = setup_tree(an->target, reg, (state | IN_NOT), env);
        break;

/* allowed node types in look-behind */
#define ALLOWED_TYPE_IN_LB  \
  ( N_LIST | N_ALT | N_STRING | N_CCLASS | N_CTYPE | \
    N_ANYCHAR | N_ANCHOR | N_EFFECT | N_QUALIFIER | N_CALL )

#define ALLOWED_EFFECT_IN_LB       ( EFFECT_MEMORY )
#define ALLOWED_EFFECT_IN_LB_NOT   0

#define ALLOWED_ANCHOR_IN_LB \
( ANCHOR_LOOK_BEHIND | ANCHOR_BEGIN_LINE | ANCHOR_END_LINE | ANCHOR_BEGIN_BUF )
#define ALLOWED_ANCHOR_IN_LB_NOT \
( ANCHOR_LOOK_BEHIND_NOT | ANCHOR_BEGIN_LINE | ANCHOR_END_LINE | ANCHOR_BEGIN_BUF )
        /* can't allow all anchors, because \G in look-behind through Search().
           ex. /(?<=\G)zz/.match("azz") => success. */

      case ANCHOR_LOOK_BEHIND:
        {
          r = check_type_tree(an->target, ALLOWED_TYPE_IN_LB,
                              ALLOWED_EFFECT_IN_LB, ALLOWED_ANCHOR_IN_LB);
          if (r < 0) return r;
          if (r > 0) return ONIGERR_INVALID_LOOK_BEHIND_PATTERN;
          r = setup_look_behind(node, reg, env);
          if (r != 0) return r;
          r = setup_tree(an->target, reg, state, env);
        }
        break;

      case ANCHOR_LOOK_BEHIND_NOT:
        {
          r = check_type_tree(an->target, ALLOWED_TYPE_IN_LB,
                      ALLOWED_EFFECT_IN_LB_NOT, ALLOWED_ANCHOR_IN_LB_NOT);
          if (r < 0) return r;
          if (r > 0) return ONIGERR_INVALID_LOOK_BEHIND_PATTERN;
          r = setup_look_behind(node, reg, env);
          if (r != 0) return r;
          r = setup_tree(an->target, reg, (state | IN_NOT), env);
        }
        break;
      }
    }
    break;

  default:
    break;
  }

  return r;
}

/* set skip map for Boyer-Moor search */
static int
set_bm_skip(UChar* s, UChar* end, OnigEncoding enc,
            UChar skip[], int** int_skip)
{
  int i, len;

  len = end - s;
  if (len < ONIG_CHAR_TABLE_SIZE) {
    for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++) skip[i] = len;

    for (i = 0; i < len - 1; i++)
      skip[s[i]] = len - 1 - i;
  }
  else {
    if (IS_NULL(*int_skip)) {
      *int_skip = (int* )xmalloc(sizeof(int) * ONIG_CHAR_TABLE_SIZE);
      if (IS_NULL(*int_skip)) return ONIGERR_MEMORY;
    }
    for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++) (*int_skip)[i] = len;

    for (i = 0; i < len - 1; i++)
      (*int_skip)[s[i]] = len - 1 - i;
  }
  return 0;
}

#define OPT_EXACT_MAXLEN   24

typedef struct {
  OnigDistance min;  /* min byte length */
  OnigDistance max;  /* max byte length */
} MinMaxLen;

typedef struct {
  MinMaxLen       mmd;
  OnigEncoding    enc;
  OnigOptionType  options;
  OnigAmbigType   ambig_flag;
  ScanEnv*        scan_env;
} OptEnv;

typedef struct {
  int left_anchor;
  int right_anchor;
} OptAncInfo;

typedef struct {
  MinMaxLen  mmd; /* info position */
  OptAncInfo anc;

  int   reach_end;
  int   ignore_case;
  int   len;
  UChar s[OPT_EXACT_MAXLEN];
} OptExactInfo;

typedef struct {
  MinMaxLen mmd; /* info position */
  OptAncInfo anc;

  int   value;      /* weighted value */
  UChar map[ONIG_CHAR_TABLE_SIZE];
} OptMapInfo;

typedef struct {
  MinMaxLen    len;

  OptAncInfo   anc;
  OptExactInfo exb;    /* boundary */
  OptExactInfo exm;    /* middle */
  OptExactInfo expr;   /* prec read (?=...) */

  OptMapInfo   map;   /* boundary */
} NodeOptInfo;

static int
map_position_value(OnigEncoding enc, int i)
{
  static short int ByteValTable[] = {
     5,  1,  1,  1,  1,  1,  1,  1,  1, 10, 10,  1,  1, 10,  1,  1,
     1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,
    12,  4,  7,  4,  4,  4,  4,  4,  4,  5,  5,  5,  5,  5,  5,  5,
     6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  5,  5,  5,  5,  5,  5,
     5,  6,  6,  6,  6,  7,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,
     6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  5,  6,  5,  5,  5,
     5,  6,  6,  6,  6,  7,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,
     6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  6,  5,  5,  5,  5,  1
  };

  if (i < sizeof(ByteValTable)/sizeof(ByteValTable[0])) {
    if (i == 0 && ONIGENC_MBC_MINLEN(enc) > 1)
      return 20;
    else
      return (int )ByteValTable[i];
  }
  else
    return 4;   /* Take it easy. */
}

static int
distance_value(MinMaxLen* mm)
{
  /* 1000 / (min-max-dist + 1) */
  static short int dist_vals[] = {
    1000,  500,  333,  250,  200,  167,  143,  125,  111,  100,
      91,   83,   77,   71,   67,   63,   59,   56,   53,   50,
      48,   45,   43,   42,   40,   38,   37,   36,   34,   33,
      32,   31,   30,   29,   29,   28,   27,   26,   26,   25,
      24,   24,   23,   23,   22,   22,   21,   21,   20,   20,
      20,   19,   19,   19,   18,   18,   18,   17,   17,   17,
      16,   16,   16,   16,   15,   15,   15,   15,   14,   14,
      14,   14,   14,   14,   13,   13,   13,   13,   13,   13,
      12,   12,   12,   12,   12,   12,   11,   11,   11,   11,
      11,   11,   11,   11,   11,   10,   10,   10,   10,   10
  };

  int d;

  if (mm->max == ONIG_INFINITE_DISTANCE) return 0;

  d = mm->max - mm->min;
  if (d < sizeof(dist_vals)/sizeof(dist_vals[0]))
    /* return dist_vals[d] * 16 / (mm->min + 12); */
    return (int )dist_vals[d];
  else
    return 1;
}

static int
comp_distance_value(MinMaxLen* d1, MinMaxLen* d2, int v1, int v2)
{
  if (v2 <= 0) return -1;
  if (v1 <= 0) return  1;

  v1 *= distance_value(d1);
  v2 *= distance_value(d2);

  if (v2 > v1) return  1;
  if (v2 < v1) return -1;

  if (d2->min < d1->min) return  1;
  if (d2->min > d1->min) return -1;
  return 0;
}

static int
is_equal_mml(MinMaxLen* a, MinMaxLen* b)
{
  return (a->min == b->min && a->max == b->max) ? 1 : 0;
}

static void
set_mml(MinMaxLen* mml, OnigDistance min, OnigDistance max)
{
  mml->min = min;
  mml->max = max;
}

static void
clear_mml(MinMaxLen* mml)
{
  mml->min = mml->max = 0;
}

static void
copy_mml(MinMaxLen* to, MinMaxLen* from)
{
  to->min = from->min;
  to->max = from->max;
}

static void
add_mml(MinMaxLen* to, MinMaxLen* from)
{
  to->min = distance_add(to->min, from->min);
  to->max = distance_add(to->max, from->max);
}

#if 0
static void
add_len_mml(MinMaxLen* to, OnigDistance len)
{
  to->min = distance_add(to->min, len);
  to->max = distance_add(to->max, len);
}
#endif

static void
alt_merge_mml(MinMaxLen* to, MinMaxLen* from)
{
  if (to->min > from->min) to->min = from->min;
  if (to->max < from->max) to->max = from->max;
}

static void
copy_opt_env(OptEnv* to, OptEnv* from)
{
  *to = *from;
}

static void
clear_opt_anc_info(OptAncInfo* anc)
{
  anc->left_anchor  = 0;
  anc->right_anchor = 0;
}

static void
copy_opt_anc_info(OptAncInfo* to, OptAncInfo* from)
{
  *to = *from;
}

static void
concat_opt_anc_info(OptAncInfo* to, OptAncInfo* left, OptAncInfo* right,
                    OnigDistance left_len, OnigDistance right_len)
{
  clear_opt_anc_info(to);

  to->left_anchor = left->left_anchor;
  if (left_len == 0) {
    to->left_anchor |= right->left_anchor;
  }

  to->right_anchor = right->right_anchor;
  if (right_len == 0) {
    to->right_anchor |= left->right_anchor;
  }
}

static int
is_left_anchor(int anc)
{
  if (anc == ANCHOR_END_BUF || anc == ANCHOR_SEMI_END_BUF ||
      anc == ANCHOR_END_LINE || anc == ANCHOR_PREC_READ ||
      anc == ANCHOR_PREC_READ_NOT)
    return 0;

  return 1;
}

static int
is_set_opt_anc_info(OptAncInfo* to, int anc)
{
  if ((to->left_anchor & anc) != 0) return 1;

  return ((to->right_anchor & anc) != 0 ? 1 : 0);
}

static void
add_opt_anc_info(OptAncInfo* to, int anc)
{
  if (is_left_anchor(anc))
    to->left_anchor |= anc;
  else
    to->right_anchor |= anc;
}

static void
remove_opt_anc_info(OptAncInfo* to, int anc)
{
  if (is_left_anchor(anc))
    to->left_anchor &= ~anc;
  else
    to->right_anchor &= ~anc;
}

static void
alt_merge_opt_anc_info(OptAncInfo* to, OptAncInfo* add)
{
  to->left_anchor  &= add->left_anchor;
  to->right_anchor &= add->right_anchor;
}

static int
is_full_opt_exact_info(OptExactInfo* ex)
{
  return (ex->len >= OPT_EXACT_MAXLEN ? 1 : 0);
}

static void
clear_opt_exact_info(OptExactInfo* ex)
{
  clear_mml(&ex->mmd);
  clear_opt_anc_info(&ex->anc);
  ex->reach_end   = 0;
  ex->ignore_case = 0;
  ex->len         = 0;
  ex->s[0]        = '\0';
}

static void
copy_opt_exact_info(OptExactInfo* to, OptExactInfo* from)
{
  *to = *from;
}

static void
concat_opt_exact_info(OptExactInfo* to, OptExactInfo* add)
{
  int i, n;
  OptAncInfo tanc;

  if (! to->ignore_case && add->ignore_case) {
    if (to->len >= add->len) return ;  /* avoid */

    to->ignore_case = 1;
  }

  for (i = to->len, n = 0; n < add->len && i < OPT_EXACT_MAXLEN; i++, n++)
    to->s[i] = add->s[n];

  to->len = i;
  to->reach_end = (n == add->len ? add->reach_end : 0);

  concat_opt_anc_info(&tanc, &to->anc, &add->anc, 1, 1);
  if (! to->reach_end) tanc.right_anchor = 0;
  copy_opt_anc_info(&to->anc, &tanc);
}

static void
concat_opt_exact_info_str(OptExactInfo* to,
                          UChar* s, UChar* end, int raw, OnigEncoding enc)
{
  int i, j, len;
  UChar *p;

  for (i = to->len, p = s; p < end && i < OPT_EXACT_MAXLEN; ) {
    if (raw) {
      to->s[i++] = *p++;
    }
    else {
      len = enc_len(enc, p);
      if (i + len > OPT_EXACT_MAXLEN) break;
      for (j = 0; j < len; j++)
        to->s[i++] = *p++;
    }
  }

  to->len = i;
}

static void
alt_merge_opt_exact_info(OptExactInfo* to, OptExactInfo* add, OptEnv* env)
{
  int i, j, len;

  if (add->len == 0 || to->len == 0) {
    clear_opt_exact_info(to);
    return ;
  }

  if (! is_equal_mml(&to->mmd, &add->mmd)) {
    clear_opt_exact_info(to);
    return ;
  }

  for (i = 0; i < to->len && i < add->len; ) {
    if (to->s[i] != add->s[i]) break;
    len = enc_len(env->enc, to->s + i);

    for (j = 1; j < len; j++) {
      if (to->s[i+j] != add->s[i+j]) break;
    }
    if (j < len) break;
    i += len;
  }

  if (! add->reach_end || i < add->len || i < to->len) {
    to->reach_end = 0;
  }
  to->len = i;
  to->ignore_case |= add->ignore_case;

  alt_merge_opt_anc_info(&to->anc, &add->anc);
  if (! to->reach_end) to->anc.right_anchor = 0;
}

static void
select_opt_exact_info(OnigEncoding enc, OptExactInfo* now, OptExactInfo* alt)
{
  int v1, v2;

  v1 = now->len;
  v2 = alt->len;

  if (v1 <= 2 && v2 <= 2) {
    /* ByteValTable[x] is big value --> low price */
    v2 = map_position_value(enc, now->s[0]);
    v1 = map_position_value(enc, alt->s[0]);

    if (now->len > 1) v1 += 5;
    if (alt->len > 1) v2 += 5;
  }

  if (now->ignore_case == 0) v1 *= 2;
  if (alt->ignore_case == 0) v2 *= 2;

  if (comp_distance_value(&now->mmd, &alt->mmd, v1, v2) > 0)
    copy_opt_exact_info(now, alt);
}

static void
clear_opt_map_info(OptMapInfo* map)
{
  static OptMapInfo clean_info = {
    {0, 0}, {0, 0}, 0,
    {
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
    }
  };

  xmemcpy(map, &clean_info, sizeof(OptMapInfo));
}

static void
copy_opt_map_info(OptMapInfo* to, OptMapInfo* from)
{
  *to = *from;
}

static void
add_char_opt_map_info(OptMapInfo* map, UChar c, OnigEncoding enc)
{
  if (map->map[c] == 0) {
    map->map[c] = 1;
    map->value += map_position_value(enc, c);
  }
}

static int
add_char_amb_opt_map_info(OptMapInfo* map, UChar* p, UChar* end,
                          OnigEncoding enc, OnigAmbigType ambig_flag)
{
  int i, j, n, len;
  UChar buf[ONIGENC_MBC_NORMALIZE_MAXLEN];
  OnigCodePoint code, ccode;
  OnigCompAmbigCodes* ccs;
  OnigPairAmbigCodes* pccs;
  OnigAmbigType amb;

  add_char_opt_map_info(map, p[0], enc);
  code = ONIGENC_MBC_TO_CODE(enc, p, end);

  for (amb = 0x01; amb <= ONIGENC_AMBIGUOUS_MATCH_LIMIT; amb <<= 1) {
    if ((amb & ambig_flag) == 0)  continue;

    n = ONIGENC_GET_ALL_PAIR_AMBIG_CODES(enc, amb, &pccs);
    for (i = 0; i < n; i++) {
      if (pccs[i].from == code) {
        len = ONIGENC_CODE_TO_MBC(enc, pccs[i].to, buf);
        if (len < 0) return len;
        add_char_opt_map_info(map, buf[0], enc);
      }
    }

    if ((ambig_flag & ONIGENC_AMBIGUOUS_MATCH_COMPOUND) != 0) {
      n = ONIGENC_GET_ALL_COMP_AMBIG_CODES(enc, amb, &ccs);
      for (i = 0; i < n; i++) {
        if (ccs[i].code == code) {
          for (j = 0; j < ccs[i].n; j++) {
            ccode = ccs[i].items[j].code[0];
            len = ONIGENC_CODE_TO_MBC(enc, ccode, buf);
            if (len < 0) return len;
            add_char_opt_map_info(map, buf[0], enc);
          }
          break;
        }
      }
    }
  }
  return 0;
}

static void
select_opt_map_info(OptMapInfo* now, OptMapInfo* alt)
{
  static int z = 1<<15; /* 32768: something big value */

  int v1, v2;

  if (alt->value == 0) return ;
  if (now->value == 0) {
    copy_opt_map_info(now, alt);
    return ;
  }

  v1 = z / now->value;
  v2 = z / alt->value;
  if (comp_distance_value(&now->mmd, &alt->mmd, v1, v2) > 0)
    copy_opt_map_info(now, alt);
}

static int
comp_opt_exact_or_map_info(OptExactInfo* e, OptMapInfo* m)
{
#define COMP_EM_BASE  20
  int ve, vm;

  if (m->value <= 0) return -1;

  ve = COMP_EM_BASE * e->len * (e->ignore_case ? 1 : 2);
  vm = COMP_EM_BASE * 5 * 2 / m->value;
  return comp_distance_value(&e->mmd, &m->mmd, ve, vm);
}

static void
alt_merge_opt_map_info(OnigEncoding enc, OptMapInfo* to, OptMapInfo* add)
{
  int i, val;

  /* if (! is_equal_mml(&to->mmd, &add->mmd)) return ; */
  if (to->value == 0) return ;
  if (add->value == 0 || to->mmd.max < add->mmd.min) {
    clear_opt_map_info(to);
    return ;
  }

  alt_merge_mml(&to->mmd, &add->mmd);

  val = 0;
  for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++) {
    if (add->map[i])
      to->map[i] = 1;

    if (to->map[i])
      val += map_position_value(enc, i);
  }
  to->value = val;

  alt_merge_opt_anc_info(&to->anc, &add->anc);
}

static void
set_bound_node_opt_info(NodeOptInfo* opt, MinMaxLen* mmd)
{
  copy_mml(&(opt->exb.mmd),  mmd);
  copy_mml(&(opt->expr.mmd), mmd);
  copy_mml(&(opt->map.mmd),  mmd);
}

static void
clear_node_opt_info(NodeOptInfo* opt)
{
  clear_mml(&opt->len);
  clear_opt_anc_info(&opt->anc);
  clear_opt_exact_info(&opt->exb);
  clear_opt_exact_info(&opt->exm);
  clear_opt_exact_info(&opt->expr);
  clear_opt_map_info(&opt->map);
}

static void
copy_node_opt_info(NodeOptInfo* to, NodeOptInfo* from)
{
  *to = *from;
}

static void
concat_left_node_opt_info(OnigEncoding enc, NodeOptInfo* to, NodeOptInfo* add)
{
  int exb_reach, exm_reach;
  OptAncInfo tanc;

  concat_opt_anc_info(&tanc, &to->anc, &add->anc, to->len.max, add->len.max);
  copy_opt_anc_info(&to->anc, &tanc);

  if (add->exb.len > 0 && to->len.max == 0) {
    concat_opt_anc_info(&tanc, &to->anc, &add->exb.anc,
                        to->len.max, add->len.max);
    copy_opt_anc_info(&add->exb.anc, &tanc);
  }

  if (add->map.value > 0 && to->len.max == 0) {
    if (add->map.mmd.max == 0)
      add->map.anc.left_anchor |= to->anc.left_anchor;
  }

  exb_reach = to->exb.reach_end;
  exm_reach = to->exm.reach_end;

  if (add->len.max != 0)
    to->exb.reach_end = to->exm.reach_end = 0;

  if (add->exb.len > 0) {
    if (exb_reach) {
      concat_opt_exact_info(&to->exb, &add->exb);
      clear_opt_exact_info(&add->exb);
    }
    else if (exm_reach) {
      concat_opt_exact_info(&to->exm, &add->exb);
      clear_opt_exact_info(&add->exb);
    }
  }
  select_opt_exact_info(enc, &to->exm, &add->exb);
  select_opt_exact_info(enc, &to->exm, &add->exm);

  if (to->expr.len > 0) {
    if (add->len.max > 0) {
      if (to->expr.len > (int )add->len.max)
        to->expr.len = add->len.max;

      if (to->expr.mmd.max == 0)
        select_opt_exact_info(enc, &to->exb, &to->expr);
      else
        select_opt_exact_info(enc, &to->exm, &to->expr);
    }
  }
  else if (add->expr.len > 0) {
    copy_opt_exact_info(&to->expr, &add->expr);
  }

  select_opt_map_info(&to->map, &add->map);

  add_mml(&to->len, &add->len);
}

static void
alt_merge_node_opt_info(NodeOptInfo* to, NodeOptInfo* add, OptEnv* env)
{
  alt_merge_opt_anc_info  (&to->anc,  &add->anc);
  alt_merge_opt_exact_info(&to->exb,  &add->exb, env);
  alt_merge_opt_exact_info(&to->exm,  &add->exm, env);
  alt_merge_opt_exact_info(&to->expr, &add->expr, env);
  alt_merge_opt_map_info(env->enc, &to->map,  &add->map);

  alt_merge_mml(&to->len, &add->len);
}

#define MAX_NODE_OPT_INFO_REF_COUNT    5

static int
optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
{
  int type;
  int r = 0;

  clear_node_opt_info(opt);
  set_bound_node_opt_info(opt, &env->mmd);

  type = NTYPE(node);
  switch (type) {
  case N_LIST:
    {
      OptEnv nenv;
      NodeOptInfo nopt;
      Node* nd = node;

      copy_opt_env(&nenv, env);
      do {
        r = optimize_node_left(NCONS(nd).left, &nopt, &nenv);
        if (r == 0) {
          add_mml(&nenv.mmd, &nopt.len);
          concat_left_node_opt_info(env->enc, opt, &nopt);
        }
      } while (r == 0 && IS_NOT_NULL(nd = NCONS(nd).right));
    }
    break;

  case N_ALT:
    {
      NodeOptInfo nopt;
      Node* nd = node;

      do {
        r = optimize_node_left(NCONS(nd).left, &nopt, env);
        if (r == 0) {
          if (nd == node) copy_node_opt_info(opt, &nopt);
          else            alt_merge_node_opt_info(opt, &nopt, env);
        }
      } while ((r == 0) && IS_NOT_NULL(nd = NCONS(nd).right));
    }
    break;

  case N_STRING:
    {
      StrNode* sn = &(NSTRING(node));
      int slen = sn->end - sn->s;
      int is_raw = NSTRING_IS_RAW(node);

      if (! NSTRING_IS_AMBIG(node)) {
        concat_opt_exact_info_str(&opt->exb, sn->s, sn->end,
                                  NSTRING_IS_RAW(node), env->enc);
        if (slen > 0) {
          add_char_opt_map_info(&opt->map, *(sn->s), env->enc);
        }
        set_mml(&opt->len, slen, slen);
      }
      else {
        int n, max;

        concat_opt_exact_info_str(&opt->exb, sn->s, sn->end,
                                  is_raw, env->enc);
        opt->exb.ignore_case = 1;

        if (slen > 0) {
          r = add_char_amb_opt_map_info(&opt->map, sn->s, sn->end,
                                        env->enc, env->ambig_flag);
          if (r != 0) break;
        }

        if (NSTRING_IS_AMBIG_REDUCE(node)) {
          n = onigenc_strlen(env->enc, sn->s, sn->end);
          max = ONIGENC_MBC_MAXLEN_DIST(env->enc) * n;
        }
        else {
          max = slen;
        }
        set_mml(&opt->len, slen, max);
      }

      if (opt->exb.len == slen)
        opt->exb.reach_end = 1;
    }
    break;

  case N_CCLASS:
    {
      int i, z;
      CClassNode* cc = &(NCCLASS(node));

      /* no need to check ignore case. (setted in setup_tree()) */

      if (IS_NOT_NULL(cc->mbuf) || IS_CCLASS_NOT(cc)) {
        OnigDistance min = ONIGENC_MBC_MINLEN(env->enc);
        OnigDistance max = ONIGENC_MBC_MAXLEN_DIST(env->enc);

        set_mml(&opt->len, min, max);
      }
      else {
        for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
          z = BITSET_AT(cc->bs, i);
          if ((z && !IS_CCLASS_NOT(cc)) || (!z && IS_CCLASS_NOT(cc))) {
            add_char_opt_map_info(&opt->map, (UChar )i, env->enc);
          }
        }
        set_mml(&opt->len, 1, 1);
      }
    }
    break;

  case N_CTYPE:
    {
      int i, min, max;

      max = ONIGENC_MBC_MAXLEN_DIST(env->enc);

      if (max == 1) {
        min = 1;

        switch (NCTYPE(node).type) {
        case CTYPE_NOT_WORD:
          for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
            if (! ONIGENC_IS_CODE_WORD(env->enc, i)) {
              add_char_opt_map_info(&opt->map, (UChar )i, env->enc);
            }
          }
          break;

        case CTYPE_WORD:
          for (i = 0; i < SINGLE_BYTE_SIZE; i++) {
            if (ONIGENC_IS_CODE_WORD(env->enc, i)) {
              add_char_opt_map_info(&opt->map, (UChar )i, env->enc);
            }
          }
          break;
        }
      }
      else {
        min = ONIGENC_MBC_MINLEN(env->enc);
      }
      set_mml(&opt->len, min, max);
    }
    break;

  case N_ANYCHAR:
    {
      OnigDistance min = ONIGENC_MBC_MINLEN(env->enc);
      OnigDistance max = ONIGENC_MBC_MAXLEN_DIST(env->enc);
      set_mml(&opt->len, min, max);
    }
    break;

  case N_ANCHOR:
    switch (NANCHOR(node).type) {
    case ANCHOR_BEGIN_BUF:
    case ANCHOR_BEGIN_POSITION:
    case ANCHOR_BEGIN_LINE:
    case ANCHOR_END_BUF:
    case ANCHOR_SEMI_END_BUF:
    case ANCHOR_END_LINE:
      add_opt_anc_info(&opt->anc, NANCHOR(node).type);
      break;

    case ANCHOR_PREC_READ:
      {
        NodeOptInfo nopt;

        r = optimize_node_left(NANCHOR(node).target, &nopt, env);
        if (r == 0) {
          if (nopt.exb.len > 0)
            copy_opt_exact_info(&opt->expr, &nopt.exb);
          else if (nopt.exm.len > 0)
            copy_opt_exact_info(&opt->expr, &nopt.exm);

          opt->expr.reach_end = 0;

          if (nopt.map.value > 0)
            copy_opt_map_info(&opt->map, &nopt.map);
        }
      }
      break;

    case ANCHOR_PREC_READ_NOT:
    case ANCHOR_LOOK_BEHIND: /* Sorry, I can't make use of it. */
    case ANCHOR_LOOK_BEHIND_NOT:
      break;
    }
    break;

  case N_BACKREF:
    {
      int i;
      int* backs;
      OnigDistance min, max, tmin, tmax;
      Node** nodes = SCANENV_MEM_NODES(env->scan_env);
      BackrefNode* br = &(NBACKREF(node));

      if (br->state & NST_RECURSION) {
        set_mml(&opt->len, 0, ONIG_INFINITE_DISTANCE);
        break;
      }
      backs = BACKREFS_P(br);
      r = get_min_match_length(nodes[backs[0]], &min, env->scan_env);
      if (r != 0) break;
      r = get_max_match_length(nodes[backs[0]], &max, env->scan_env);
      if (r != 0) break;
      for (i = 1; i < br->back_num; i++) {
        r = get_min_match_length(nodes[backs[i]], &tmin, env->scan_env);
        if (r != 0) break;
        r = get_max_match_length(nodes[backs[i]], &tmax, env->scan_env);
        if (r != 0) break;
        if (min > tmin) min = tmin;
        if (max < tmax) max = tmax;
      }
      if (r == 0) set_mml(&opt->len, min, max);
    }
    break;

#ifdef USE_SUBEXP_CALL
  case N_CALL:
    if (IS_CALL_RECURSION(&(NCALL(node))))
      set_mml(&opt->len, 0, ONIG_INFINITE_DISTANCE);
    else {
      OnigOptionType save = env->options;
      env->options = NEFFECT(NCALL(node).target).option;
      r = optimize_node_left(NCALL(node).target, opt, env);
      env->options = save;
    }
    break;
#endif

  case N_QUALIFIER:
    {
      int i;
      OnigDistance min, max;
      NodeOptInfo nopt;
      QualifierNode* qn = &(NQUALIFIER(node));

      r = optimize_node_left(qn->target, &nopt, env);
      if (r) break;

      if (qn->lower == 0 && IS_REPEAT_INFINITE(qn->upper)) {
        if (env->mmd.max == 0 &&
            NTYPE(qn->target) == N_ANYCHAR && qn->greedy) {
          if (IS_POSIXLINE(env->options))
            add_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR_PL);
          else
            add_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR);
        }
      }
      else {
        if (qn->lower > 0) {
          copy_node_opt_info(opt, &nopt);
          if (nopt.exb.len > 0) {
            if (nopt.exb.reach_end) {
              for (i = 2; i < qn->lower &&
                          ! is_full_opt_exact_info(&opt->exb); i++) {
                concat_opt_exact_info(&opt->exb, &nopt.exb);
              }
              if (i < qn->lower) {
                opt->exb.reach_end = 0;
              }
            }
          }

          if (qn->lower != qn->upper) {
            opt->exb.reach_end = 0;
            opt->exm.reach_end = 0;
          }
          if (qn->lower > 1)
            opt->exm.reach_end = 0;
        }
      }

      min = distance_multiply(nopt.len.min, qn->lower);
      if (IS_REPEAT_INFINITE(qn->upper))
        max = (nopt.len.max > 0 ? ONIG_INFINITE_DISTANCE : 0);
      else
        max = distance_multiply(nopt.len.max, qn->upper);

      set_mml(&opt->len, min, max);
    }
    break;

  case N_EFFECT:
    {
      EffectNode* en = &(NEFFECT(node));

      switch (en->type) {
      case EFFECT_OPTION:
        {
          OnigOptionType save = env->options;

          env->options = en->option;
          r = optimize_node_left(en->target, opt, env);
          env->options = save;
        }
        break;

      case EFFECT_MEMORY:
#ifdef USE_SUBEXP_CALL
        en->opt_count++;
        if (en->opt_count > MAX_NODE_OPT_INFO_REF_COUNT) {
          OnigDistance min, max;

          min = 0;
          max = ONIG_INFINITE_DISTANCE;
          if (IS_EFFECT_MIN_FIXED(en)) min = en->min_len;
          if (IS_EFFECT_MAX_FIXED(en)) max = en->max_len;
          set_mml(&opt->len, min, max);
        }
        else
#endif
        {
          r = optimize_node_left(en->target, opt, env);

          if (is_set_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR_MASK)) {
            if (BIT_STATUS_AT(env->scan_env->backrefed_mem, en->regnum))
              remove_opt_anc_info(&opt->anc, ANCHOR_ANYCHAR_STAR_MASK);
          }
        }
        break;

      case EFFECT_STOP_BACKTRACK:
        r = optimize_node_left(en->target, opt, env);
        break;
      }
    }
    break;

  default:
#ifdef ONIG_DEBUG
    fprintf(stderr, "optimize_node_left: undefined node type %d\n",
            NTYPE(node));
#endif
    r = ONIGERR_TYPE_BUG;
    break;
  }

  return r;
}

static int
set_optimize_exact_info(regex_t* reg, OptExactInfo* e)
{
  int r;

  if (e->len == 0) return 0;

  if (e->ignore_case) {
    reg->exact = (UChar* )xmalloc(e->len);
    CHECK_NULL_RETURN_VAL(reg->exact, ONIGERR_MEMORY);
    xmemcpy(reg->exact, e->s, e->len);
    reg->exact_end = reg->exact + e->len;
    reg->optimize = ONIG_OPTIMIZE_EXACT_IC;
  }
  else {
    int allow_reverse;

    reg->exact = k_strdup(e->s, e->s + e->len);
    CHECK_NULL_RETURN_VAL(reg->exact, ONIGERR_MEMORY);
    reg->exact_end = reg->exact + e->len;

    if (e->anc.left_anchor & ANCHOR_BEGIN_LINE)
      allow_reverse = 1;
    else
      allow_reverse =
        ONIGENC_IS_ALLOWED_REVERSE_MATCH(reg->enc, reg->exact, reg->exact_end);

    if (e->len >= 3 || (e->len >= 2 && allow_reverse)) {
      r = set_bm_skip(reg->exact, reg->exact_end, reg->enc,
                      reg->map, &(reg->int_map));
      if (r) return r;

      reg->optimize = (allow_reverse != 0
                       ? ONIG_OPTIMIZE_EXACT_BM : ONIG_OPTIMIZE_EXACT_BM_NOT_REV);
    }
    else {
      reg->optimize = ONIG_OPTIMIZE_EXACT;
    }
  }

  reg->dmin = e->mmd.min;
  reg->dmax = e->mmd.max;

  if (reg->dmin != ONIG_INFINITE_DISTANCE) {
    reg->threshold_len = reg->dmin + (reg->exact_end - reg->exact);
  }

  return 0;
}

static void
set_optimize_map_info(regex_t* reg, OptMapInfo* m)
{
  int i;

  for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++)
    reg->map[i] = m->map[i];

  reg->optimize   = ONIG_OPTIMIZE_MAP;
  reg->dmin       = m->mmd.min;
  reg->dmax       = m->mmd.max;

  if (reg->dmin != ONIG_INFINITE_DISTANCE) {
    reg->threshold_len = reg->dmin + 1;
  }
}

static void
set_sub_anchor(regex_t* reg, OptAncInfo* anc)
{
  reg->sub_anchor |= anc->left_anchor  & ANCHOR_BEGIN_LINE;
  reg->sub_anchor |= anc->right_anchor & ANCHOR_END_LINE;
}

#ifdef ONIG_DEBUG
static void print_optimize_info(FILE* f, regex_t* reg);
#endif

static int
set_optimize_info_from_tree(Node* node, regex_t* reg, ScanEnv* scan_env)
{

  int r;
  NodeOptInfo opt;
  OptEnv env;

  env.enc        = reg->enc;
  env.options    = reg->options;
  env.ambig_flag = reg->ambig_flag;
  env.scan_env   = scan_env;
  clear_mml(&env.mmd);

  r = optimize_node_left(node, &opt, &env);
  if (r) return r;

  reg->anchor = opt.anc.left_anchor & (ANCHOR_BEGIN_BUF |
        ANCHOR_BEGIN_POSITION | ANCHOR_ANYCHAR_STAR | ANCHOR_ANYCHAR_STAR_PL);

  reg->anchor |= opt.anc.right_anchor & (ANCHOR_END_BUF | ANCHOR_SEMI_END_BUF);

  if (reg->anchor & (ANCHOR_END_BUF | ANCHOR_SEMI_END_BUF)) {
    reg->anchor_dmin = opt.len.min;
    reg->anchor_dmax = opt.len.max;
  }

  if (opt.exb.len > 0 || opt.exm.len > 0) {
    select_opt_exact_info(reg->enc, &opt.exb, &opt.exm);
    if (opt.map.value > 0 &&
        comp_opt_exact_or_map_info(&opt.exb, &opt.map) > 0) {
      goto set_map;
    }
    else {
      r = set_optimize_exact_info(reg, &opt.exb);
      set_sub_anchor(reg, &opt.exb.anc);
    }
  }
  else if (opt.map.value > 0) {
  set_map:
    set_optimize_map_info(reg, &opt.map);
    set_sub_anchor(reg, &opt.map.anc);
  }
  else {
    reg->sub_anchor |= opt.anc.left_anchor & ANCHOR_BEGIN_LINE;
    if (opt.len.max == 0)
      reg->sub_anchor |= opt.anc.right_anchor & ANCHOR_END_LINE;
  }

#if defined(ONIG_DEBUG_COMPILE) || defined(ONIG_DEBUG_MATCH)
  print_optimize_info(stderr, reg);
#endif
  return r;
}

static void
clear_optimize_info(regex_t* reg)
{
  reg->optimize      = ONIG_OPTIMIZE_NONE;
  reg->anchor        = 0;
  reg->anchor_dmin   = 0;
  reg->anchor_dmax   = 0;
  reg->sub_anchor    = 0;
  reg->exact_end     = (UChar* )NULL;
  reg->threshold_len = 0;
  if (IS_NOT_NULL(reg->exact)) {
    xfree(reg->exact);
    reg->exact = (UChar* )NULL;
  }
}

#ifdef ONIG_DEBUG

static void
print_distance_range(FILE* f, OnigDistance a, OnigDistance b)
{
  if (a == ONIG_INFINITE_DISTANCE)
    fputs("inf", f);
  else
    fprintf(f, "(%u)", a);

  fputs("-", f);

  if (b == ONIG_INFINITE_DISTANCE)
    fputs("inf", f);
  else
    fprintf(f, "(%u)", b);
}

static void
print_anchor(FILE* f, int anchor)
{
  int q = 0;

  fprintf(f, "[");

  if (anchor & ANCHOR_BEGIN_BUF) {
    fprintf(f, "begin-buf");
    q = 1;
  }
  if (anchor & ANCHOR_BEGIN_LINE) {
    if (q) fprintf(f, ", ");
    q = 1;
    fprintf(f, "begin-line");
  }
  if (anchor & ANCHOR_BEGIN_POSITION) {
    if (q) fprintf(f, ", ");
    q = 1;
    fprintf(f, "begin-pos");
  }
  if (anchor & ANCHOR_END_BUF) {
    if (q) fprintf(f, ", ");
    q = 1;
    fprintf(f, "end-buf");
  }
  if (anchor & ANCHOR_SEMI_END_BUF) {
    if (q) fprintf(f, ", ");
    q = 1;
    fprintf(f, "semi-end-buf");
  }
  if (anchor & ANCHOR_END_LINE) {
    if (q) fprintf(f, ", ");
    q = 1;
    fprintf(f, "end-line");
  }
  if (anchor & ANCHOR_ANYCHAR_STAR) {
    if (q) fprintf(f, ", ");
    q = 1;
    fprintf(f, "anychar-star");
  }
  if (anchor & ANCHOR_ANYCHAR_STAR_PL) {
    if (q) fprintf(f, ", ");
    fprintf(f, "anychar-star-pl");
  }

  fprintf(f, "]");
}

static void
print_optimize_info(FILE* f, regex_t* reg)
{
  static char* on[] = { "NONE", "EXACT", "EXACT_BM", "EXACT_BM_NOT_REV",
                        "EXACT_IC", "MAP" };

  fprintf(f, "optimize: %s\n", on[reg->optimize]);
  fprintf(f, "  anchor: "); print_anchor(f, reg->anchor);
  if ((reg->anchor & ANCHOR_END_BUF_MASK) != 0)
    print_distance_range(f, reg->anchor_dmin, reg->anchor_dmax);
  fprintf(f, "\n");

  if (reg->optimize) {
    fprintf(f, "  sub anchor: "); print_anchor(f, reg->sub_anchor);
    fprintf(f, "\n");
  }
  fprintf(f, "\n");

  if (reg->exact) {
    UChar *p;
    fprintf(f, "exact: [");
    for (p = reg->exact; p < reg->exact_end; p++) {
      fputc(*p, f);
    }
    fprintf(f, "]: length: %d\n", (reg->exact_end - reg->exact));
  }
  else if (reg->optimize & ONIG_OPTIMIZE_MAP) {
    int c, i, n = 0;

    for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++)
      if (reg->map[i]) n++;

    fprintf(f, "map: n=%d\n", n);
    if (n > 0) {
      c = 0;
      fputc('[', f);
      for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++) {
        if (reg->map[i] != 0) {
          if (c > 0)  fputs(", ", f);
          c++;
          if (ONIGENC_MBC_MAXLEN(reg->enc) == 1 &&
              ONIGENC_IS_CODE_PRINT(reg->enc, (OnigCodePoint )i))
            fputc(i, f);
          else
            fprintf(f, "%d", i);
        }
      }
      fprintf(f, "]\n");
    }
  }
}
#endif /* ONIG_DEBUG */

static void
onig_free_body(regex_t* reg)
{
  if (IS_NOT_NULL(reg->p))                xfree(reg->p);
  if (IS_NOT_NULL(reg->exact))            xfree(reg->exact);
  if (IS_NOT_NULL(reg->int_map))          xfree(reg->int_map);
  if (IS_NOT_NULL(reg->int_map_backward)) xfree(reg->int_map_backward);
  if (IS_NOT_NULL(reg->repeat_range))     xfree(reg->repeat_range);
  if (IS_NOT_NULL(reg->chain))            onig_free(reg->chain);

#ifdef USE_NAMED_GROUP
  onig_names_free(reg);
#endif
}

extern void
onig_free(regex_t* reg)
{
  if (IS_NOT_NULL(reg)) {
    onig_free_body(reg);
    xfree(reg);
  }
}

#define REGEX_TRANSFER(to,from) do {\
  (to)->state = ONIG_STATE_MODIFY;\
  onig_free_body(to);\
  xmemcpy(to, from, sizeof(regex_t));\
  xfree(from);\
} while (0)

extern void
onig_transfer(regex_t* to, regex_t* from)
{
  THREAD_ATOMIC_START;
  REGEX_TRANSFER(to, from);
  THREAD_ATOMIC_END;
}

#define REGEX_CHAIN_HEAD(reg) do {\
  while (IS_NOT_NULL((reg)->chain)) {\
    (reg) = (reg)->chain;\
  }\
} while (0)

extern void
onig_chain_link_add(regex_t* to, regex_t* add)
{
  THREAD_ATOMIC_START;
  REGEX_CHAIN_HEAD(to);
  to->chain = add;
  THREAD_ATOMIC_END;
}

extern void
onig_chain_reduce(regex_t* reg)
{
  regex_t *head, *prev;

  THREAD_ATOMIC_START;
  prev = reg;
  head = prev->chain;
  if (IS_NOT_NULL(head)) {
    reg->state = ONIG_STATE_MODIFY;
    while (IS_NOT_NULL(head->chain)) {
      prev = head;
      head = head->chain;
    }
    prev->chain = (regex_t* )NULL;
    REGEX_TRANSFER(reg, head);
  }
  THREAD_ATOMIC_END;
}

#if 0
extern int
onig_clone(regex_t** to, regex_t* from)
{
  int r, size;
  regex_t* reg;

#ifdef USE_MULTI_THREAD_SYSTEM
  if (ONIG_STATE(from) >= ONIG_STATE_NORMAL) {
    ONIG_STATE_INC(from);
    if (IS_NOT_NULL(from->chain) && ONIG_STATE(reg) == ONIG_STATE_NORMAL) {
      onig_chain_reduce(from);
      ONIG_STATE_INC(from);
    }
  }
  else {
    int n = 0;
    while (ONIG_STATE(from) < ONIG_STATE_NORMAL) {
      if (++n > THREAD_PASS_LIMIT_COUNT)
        return ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT;
      THREAD_PASS;
    }
    ONIG_STATE_INC(from);
  }
#endif /* USE_MULTI_THREAD_SYSTEM */

  r = onig_alloc_init(&reg, ONIG_OPTION_NONE, ONIGENC_AMBIGUOUS_MATCH_DEFAULT,
                      from->enc, ONIG_SYNTAX_DEFAULT);
  if (r != 0) {
    ONIG_STATE_DEC(from);
    return r;
  }

  xmemcpy(reg, from, sizeof(onig_t));
  reg->chain = (regex_t* )NULL;
  reg->state = ONIG_STATE_NORMAL;

  if (from->p) {
    reg->p = (UChar* )xmalloc(reg->alloc);
    if (IS_NULL(reg->p)) goto mem_error;
    xmemcpy(reg->p, from->p, reg->alloc);
  }

  if (from->exact) {
    reg->exact = (UChar* )xmalloc(from->exact_end - from->exact);
    if (IS_NULL(reg->exact)) goto mem_error;
    reg->exact_end = reg->exact + (from->exact_end - from->exact);
    xmemcpy(reg->exact, from->exact, reg->exact_end - reg->exact);
  }

  if (from->int_map) {
    size = sizeof(int) * ONIG_CHAR_TABLE_SIZE;
    reg->int_map = (int* )xmalloc(size);
    if (IS_NULL(reg->int_map)) goto mem_error;
    xmemcpy(reg->int_map, from->int_map, size);
  }

  if (from->int_map_backward) {
    size = sizeof(int) * ONIG_CHAR_TABLE_SIZE;
    reg->int_map_backward = (int* )xmalloc(size);
    if (IS_NULL(reg->int_map_backward)) goto mem_error;
    xmemcpy(reg->int_map_backward, from->int_map_backward, size);
  }

#ifdef USE_NAMED_GROUP
  reg->name_table = names_clone(from); /* names_clone is not implemented */
#endif

  ONIG_STATE_DEC(from);
  *to = reg;
  return 0;

 mem_error:
  ONIG_STATE_DEC(from);
  return ONIGERR_MEMORY;
}
#endif

#ifdef ONIG_DEBUG
static void print_compiled_byte_code_list P_((FILE* f, regex_t* reg));
#endif
#ifdef ONIG_DEBUG_PARSE_TREE
static void print_tree P_((FILE* f, Node* node));
#endif

extern int
onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end,
              OnigErrorInfo* einfo)
{
#define COMPILE_INIT_SIZE  20

  int r, init_size;
  Node*  root;
  ScanEnv  scan_env;
#ifdef USE_SUBEXP_CALL
  UnsetAddrList  uslist;
#endif

  reg->state = ONIG_STATE_COMPILING;

  if (reg->alloc == 0) {
    init_size = (pattern_end - pattern) * 2;
    if (init_size <= 0) init_size = COMPILE_INIT_SIZE;
    r = BBUF_INIT(reg, init_size);
    if (r != 0) goto end;
  }
  else
    reg->used = 0;

  reg->num_mem            = 0;
  reg->num_repeat         = 0;
  reg->num_null_check     = 0;
  reg->repeat_range_alloc = 0;
  reg->repeat_range       = (OnigRepeatRange* )NULL;

  r = onig_parse_make_tree(&root, pattern, pattern_end, reg, &scan_env);
  if (r != 0) goto err;

#ifdef USE_NAMED_GROUP
  /* mixed use named group and no-named group */
  if (scan_env.num_named > 0 &&
      IS_SYNTAX_BV(scan_env.syntax, ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP) &&
      !ONIG_IS_OPTION_ON(reg->options, ONIG_OPTION_CAPTURE_GROUP)) {
    if (scan_env.num_named != scan_env.num_mem)
      r = disable_noname_group_capture(&root, reg, &scan_env);
    else
      r = numbered_ref_check(root);

    if (r != 0) goto err;
  }
#endif

#ifdef ONIG_DEBUG_PARSE_TREE
  print_tree(stderr, root);
#endif

#ifdef USE_SUBEXP_CALL
  if (scan_env.num_call > 0) {
    r = unset_addr_list_init(&uslist, scan_env.num_call);
    if (r != 0) goto err;
    scan_env.unset_addr_list = &uslist;
    r = setup_subexp_call(root, &scan_env);
    if (r != 0) goto err_unset;
    r = subexp_recursive_check_trav(root, &scan_env);
    if (r  < 0) goto err_unset;
    r = subexp_inf_recursive_check_trav(root, &scan_env);
    if (r != 0) goto err_unset;

    reg->num_call = scan_env.num_call;
  }
  else
    reg->num_call = 0;
#endif

  r = setup_tree(root, reg, 0, &scan_env);
  if (r != 0) goto err_unset;

  reg->capture_history  = scan_env.capture_history;
  reg->bt_mem_start     = scan_env.bt_mem_start;
  reg->bt_mem_start    |= reg->capture_history;
  if (IS_FIND_CONDITION(reg->options))
    BIT_STATUS_ON_ALL(reg->bt_mem_end);
  else {
    reg->bt_mem_end  = scan_env.bt_mem_end;
    reg->bt_mem_end |= reg->capture_history;
  }

  clear_optimize_info(reg);
#ifndef ONIG_DONT_OPTIMIZE
  r = set_optimize_info_from_tree(root, reg, &scan_env);
  if (r != 0) goto err_unset;
#endif

  if (IS_NOT_NULL(scan_env.mem_nodes_dynamic)) {
    xfree(scan_env.mem_nodes_dynamic);
    scan_env.mem_nodes_dynamic = (Node** )NULL;
  }

  r = compile_tree(root, reg);
  if (r == 0) {
    r = add_opcode(reg, OP_END);
#ifdef USE_SUBEXP_CALL
    if (scan_env.num_call > 0) {
      r = unset_addr_list_fix(&uslist, reg);
      unset_addr_list_end(&uslist);
      if (r) goto err;
    }
#endif

    if ((reg->num_repeat != 0) || (reg->bt_mem_end != 0))
      reg->stack_pop_level = STACK_POP_LEVEL_ALL;
    else {
      if (reg->bt_mem_start != 0)
        reg->stack_pop_level = STACK_POP_LEVEL_MEM_START;
      else
        reg->stack_pop_level = STACK_POP_LEVEL_FREE;
    }
  }
#ifdef USE_SUBEXP_CALL
  else if (scan_env.num_call > 0) {
    unset_addr_list_end(&uslist);
  }
#endif
  onig_node_free(root);

#ifdef ONIG_DEBUG_COMPILE
#ifdef USE_NAMED_GROUP
  onig_print_names(stderr, reg);
#endif
  print_compiled_byte_code_list(stderr, reg);
#endif

 end:
  reg->state = ONIG_STATE_NORMAL;
  return r;

 err_unset:
#ifdef USE_SUBEXP_CALL
  if (scan_env.num_call > 0) {
    unset_addr_list_end(&uslist);
  }
#endif
 err:
  if (IS_NOT_NULL(scan_env.error)) {
    if (IS_NOT_NULL(einfo)) {
      einfo->par     = scan_env.error;
      einfo->par_end = scan_env.error_end;
    }
  }

  if (IS_NOT_NULL(root)) onig_node_free(root);
  if (IS_NOT_NULL(scan_env.mem_nodes_dynamic))
      xfree(scan_env.mem_nodes_dynamic);
  return r;
}

extern int
onig_recompile(regex_t* reg, const UChar* pattern, const UChar* pattern_end,
            OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax,
            OnigErrorInfo* einfo)
{
  int r;
  regex_t *new_reg;

  r = onig_new(&new_reg, pattern, pattern_end, option, enc, syntax, einfo);
  if (r) return r;
  if (ONIG_STATE(reg) == ONIG_STATE_NORMAL) {
    onig_transfer(reg, new_reg);
  }
  else {
    onig_chain_link_add(reg, new_reg);
  }
  return 0;
}

static int onig_inited = 0;

extern int
onig_alloc_init(regex_t** reg, OnigOptionType option, OnigAmbigType ambig_flag,
                OnigEncoding enc, OnigSyntaxType* syntax)
{
  if (! onig_inited)
    onig_init();

  if (ONIGENC_IS_UNDEF(enc))
    return ONIGERR_DEFAULT_ENCODING_IS_NOT_SETTED;

  *reg = (regex_t* )xmalloc(sizeof(regex_t));
  if (IS_NULL(*reg)) return ONIGERR_MEMORY;
  (*reg)->state = ONIG_STATE_MODIFY;

  if ((option & ONIG_OPTION_NEGATE_SINGLELINE) != 0) {
    option |= syntax->options;
    option &= ~ONIG_OPTION_SINGLELINE;
  }
  else
    option |= syntax->options;

  (*reg)->enc              = enc;
  (*reg)->options          = option;
  (*reg)->syntax           = syntax;
  (*reg)->optimize         = 0;
  (*reg)->exact            = (UChar* )NULL;
  (*reg)->int_map          = (int* )NULL;
  (*reg)->int_map_backward = (int* )NULL;
  (*reg)->chain            = (regex_t* )NULL;

  (*reg)->p                = (UChar* )NULL;
  (*reg)->alloc            = 0;
  (*reg)->used             = 0;
  (*reg)->name_table       = (void* )NULL;

  (*reg)->ambig_flag       = ambig_flag;
  (*reg)->ambig_flag      &= ONIGENC_SUPPORT_AMBIG_FLAG(enc);

  return 0;
}

extern int
onig_new(regex_t** reg, const UChar* pattern, const UChar* pattern_end,
          OnigOptionType option, OnigEncoding enc, OnigSyntaxType* syntax,
          OnigErrorInfo* einfo)
{
  int r;

  if (IS_NOT_NULL(einfo)) einfo->par = (UChar* )NULL;

  r = onig_alloc_init(reg, option, ONIGENC_AMBIGUOUS_MATCH_DEFAULT,
                      enc, syntax);
  if (r) return r;

  r = onig_compile(*reg, pattern, pattern_end, einfo);
  if (r) {
    onig_free(*reg);
    *reg = NULL;
  }
  return r;
}

extern int
onig_init(void)
{
  if (onig_inited != 0)
    return 0;

  onig_inited = 1;

  THREAD_ATOMIC_START;

  onigenc_init();
  onigenc_set_default_caseconv_table((UChar* )0);

#ifdef ONIG_DEBUG_STATISTICS
  onig_statistics_init();
#endif

  THREAD_ATOMIC_END;
  return 0;
}

extern int
onig_end(void)
{
  extern int onig_free_shared_cclass_table(void);

  THREAD_ATOMIC_START;

#ifdef ONIG_DEBUG_STATISTICS
  onig_print_statistics(stderr);
#endif

#ifdef USE_RECYCLE_NODE
  onig_free_node_list();
#endif

#ifdef USE_SHARED_CCLASS_TABLE
  onig_free_shared_cclass_table();
#endif

  onig_inited = 0;

  THREAD_ATOMIC_END;
  return 0;
}

#ifdef ONIG_DEBUG

OnigOpInfoType OnigOpInfo[] = {
  { OP_FINISH,            "finish",          ARG_NON },
  { OP_END,               "end",             ARG_NON },
  { OP_EXACT1,            "exact1",          ARG_SPECIAL },
  { OP_EXACT2,            "exact2",          ARG_SPECIAL },
  { OP_EXACT3,            "exact3",          ARG_SPECIAL },
  { OP_EXACT4,            "exact4",          ARG_SPECIAL },
  { OP_EXACT5,            "exact5",          ARG_SPECIAL },
  { OP_EXACTN,            "exactn",          ARG_SPECIAL },
  { OP_EXACTMB2N1,        "exactmb2-n1",     ARG_SPECIAL },
  { OP_EXACTMB2N2,        "exactmb2-n2",     ARG_SPECIAL },
  { OP_EXACTMB2N3,        "exactmb2-n3",     ARG_SPECIAL },
  { OP_EXACTMB2N,         "exactmb2-n",      ARG_SPECIAL },
  { OP_EXACTMB3N,         "exactmb3n"  ,     ARG_SPECIAL },
  { OP_EXACTMBN,          "exactmbn",        ARG_SPECIAL },
  { OP_EXACT1_IC,         "exact1-ic",       ARG_SPECIAL },
  { OP_EXACTN_IC,         "exactn-ic",       ARG_SPECIAL },
  { OP_CCLASS,            "cclass",          ARG_SPECIAL },
  { OP_CCLASS_MB,         "cclass-mb",       ARG_SPECIAL },
  { OP_CCLASS_MIX,        "cclass-mix",      ARG_SPECIAL },
  { OP_CCLASS_NOT,        "cclass-not",      ARG_SPECIAL },
  { OP_CCLASS_MB_NOT,     "cclass-mb-not",   ARG_SPECIAL },
  { OP_CCLASS_MIX_NOT,    "cclass-mix-not",  ARG_SPECIAL },
  { OP_CCLASS_NODE,       "cclass-node",     ARG_SPECIAL },
  { OP_ANYCHAR,           "anychar",         ARG_NON },
  { OP_ANYCHAR_ML,        "anychar-ml",      ARG_NON },
  { OP_ANYCHAR_STAR,      "anychar*",        ARG_NON },
  { OP_ANYCHAR_ML_STAR,   "anychar-ml*",     ARG_NON },
  { OP_ANYCHAR_STAR_PEEK_NEXT, "anychar*-peek-next", ARG_SPECIAL },
  { OP_ANYCHAR_ML_STAR_PEEK_NEXT, "anychar-ml*-peek-next", ARG_SPECIAL },
  { OP_WORD,              "word",            ARG_NON },
  { OP_NOT_WORD,          "not-word",        ARG_NON },
  { OP_WORD_SB,           "word-sb",         ARG_NON },
  { OP_WORD_MB,           "word-mb",         ARG_NON },
  { OP_WORD_BOUND,        "word-bound",      ARG_NON },
  { OP_NOT_WORD_BOUND,    "not-word-bound",  ARG_NON },
  { OP_WORD_BEGIN,        "word-begin",      ARG_NON },
  { OP_WORD_END,          "word-end",        ARG_NON },
  { OP_BEGIN_BUF,         "begin-buf",       ARG_NON },
  { OP_END_BUF,           "end-buf",         ARG_NON },
  { OP_BEGIN_LINE,        "begin-line",      ARG_NON },
  { OP_END_LINE,          "end-line",        ARG_NON },
  { OP_SEMI_END_BUF,      "semi-end-buf",    ARG_NON },
  { OP_BEGIN_POSITION,    "begin-position",  ARG_NON },
  { OP_BACKREF1,          "backref1",        ARG_NON },
  { OP_BACKREF2,          "backref2",        ARG_NON },
  { OP_BACKREF3,          "backref3",        ARG_NON },
  { OP_BACKREFN,          "backrefn",        ARG_MEMNUM  },
  { OP_BACKREFN_IC,       "backrefn-ic",     ARG_SPECIAL },
  { OP_BACKREF_MULTI,     "backref_multi",   ARG_SPECIAL },
  { OP_BACKREF_MULTI_IC,  "backref_multi-ic",ARG_SPECIAL },
  { OP_MEMORY_START_PUSH, "mem-start-push",  ARG_MEMNUM  },
  { OP_MEMORY_START,      "mem-start",       ARG_MEMNUM  },
  { OP_MEMORY_END_PUSH,     "mem-end-push",     ARG_MEMNUM  },
  { OP_MEMORY_END_PUSH_REC, "mem-end-push-rec", ARG_MEMNUM  },
  { OP_MEMORY_END,          "mem-end",          ARG_MEMNUM  },
  { OP_MEMORY_END_REC,      "mem-end-rec",      ARG_MEMNUM  },
  { OP_SET_OPTION_PUSH,   "set-option-push", ARG_OPTION  },
  { OP_SET_OPTION,        "set-option",      ARG_OPTION  },
  { OP_FAIL,              "fail",            ARG_NON },
  { OP_JUMP,              "jump",            ARG_RELADDR },
  { OP_PUSH,              "push",            ARG_RELADDR },
  { OP_POP,               "pop",             ARG_NON },
  { OP_PUSH_OR_JUMP_EXACT1, "push-or-jump-e1", ARG_SPECIAL },
  { OP_PUSH_IF_PEEK_NEXT, "push-if-peek-next", ARG_SPECIAL },
  { OP_REPEAT,            "repeat",          ARG_SPECIAL },
  { OP_REPEAT_NG,         "repeat-ng",       ARG_SPECIAL },
  { OP_REPEAT_INC,        "repeat-inc",      ARG_MEMNUM  },
  { OP_REPEAT_INC_NG,     "repeat-inc-ng",   ARG_MEMNUM  },
  { OP_REPEAT_INC_SG,     "repeat-inc-sg",    ARG_MEMNUM  },
  { OP_REPEAT_INC_NG_SG,  "repeat-inc-ng-sg", ARG_MEMNUM  },
  { OP_NULL_CHECK_START,  "null-check-start",ARG_MEMNUM  },
  { OP_NULL_CHECK_END,    "null-check-end",  ARG_MEMNUM  },
  { OP_NULL_CHECK_END_MEMST,"null-check-end-memst",  ARG_MEMNUM  },
  { OP_NULL_CHECK_END_MEMST_PUSH,"null-check-end-memst-push",  ARG_MEMNUM  },
  { OP_PUSH_POS,          "push-pos",        ARG_NON },
  { OP_POP_POS,           "pop-pos",         ARG_NON },
  { OP_PUSH_POS_NOT,      "push-pos-not",    ARG_RELADDR },
  { OP_FAIL_POS,          "fail-pos",        ARG_NON },
  { OP_PUSH_STOP_BT,      "push-stop-bt",    ARG_NON },
  { OP_POP_STOP_BT,       "pop-stop-bt",     ARG_NON },
  { OP_LOOK_BEHIND,       "look-behind",     ARG_SPECIAL },
  { OP_PUSH_LOOK_BEHIND_NOT, "push-look-behind-not", ARG_SPECIAL },
  { OP_FAIL_LOOK_BEHIND_NOT, "fail-look-behind-not", ARG_NON },
  { OP_CALL,                 "call",            ARG_ABSADDR },
  { OP_RETURN,               "return",          ARG_NON },
  { -1, "", ARG_NON }
};

static char*
op2name(int opcode)
{
  int i;

  for (i = 0; OnigOpInfo[i].opcode >= 0; i++) {
    if (opcode == OnigOpInfo[i].opcode)
      return OnigOpInfo[i].name;
  }
  return "";
}

static int
op2arg_type(int opcode)
{
  int i;

  for (i = 0; OnigOpInfo[i].opcode >= 0; i++) {
    if (opcode == OnigOpInfo[i].opcode)
      return OnigOpInfo[i].arg_type;
  }
  return ARG_SPECIAL;
}

static void
Indent(FILE* f, int indent)
{
  int i;
  for (i = 0; i < indent; i++) putc(' ', f);
}

static void
p_string(FILE* f, int len, UChar* s)
{
  fputs(":", f);
  while (len-- > 0) { fputc(*s++, f); }
}

static void
p_len_string(FILE* f, LengthType len, int mb_len, UChar* s)
{
  int x = len * mb_len;

  fprintf(f, ":%d:", len);
  while (x-- > 0) { fputc(*s++, f); }
}

extern void
onig_print_compiled_byte_code(FILE* f, UChar* bp, UChar** nextp,
                              OnigEncoding enc)
{
  int i, n, arg_type;
  RelAddrType addr;
  LengthType len;
  MemNumType mem;
  OnigCodePoint code;
  UChar *q;

  fprintf(f, "[%s", op2name(*bp));
  arg_type = op2arg_type(*bp);
  if (arg_type != ARG_SPECIAL) {
    bp++;
    switch (arg_type) {
    case ARG_NON:
      break;
    case ARG_RELADDR:
      GET_RELADDR_INC(addr, bp);
      fprintf(f, ":(%d)", addr);
      break;
    case ARG_ABSADDR:
      GET_ABSADDR_INC(addr, bp);
      fprintf(f, ":(%d)", addr);
      break;
    case ARG_LENGTH:
      GET_LENGTH_INC(len, bp);
      fprintf(f, ":%d", len);
      break;
    case ARG_MEMNUM:
      mem = *((MemNumType* )bp);
      bp += SIZE_MEMNUM;
      fprintf(f, ":%d", mem);
      break;
    case ARG_OPTION:
      {
        OnigOptionType option = *((OnigOptionType* )bp);
        bp += SIZE_OPTION;
        fprintf(f, ":%d", option);
      }
      break;
    }
  }
  else {
    switch (*bp++) {
    case OP_EXACT1:
    case OP_ANYCHAR_STAR_PEEK_NEXT:
    case OP_ANYCHAR_ML_STAR_PEEK_NEXT:
      p_string(f, 1, bp++); break;
    case OP_EXACT2:
      p_string(f, 2, bp); bp += 2; break;
    case OP_EXACT3:
      p_string(f, 3, bp); bp += 3; break;
    case OP_EXACT4:
      p_string(f, 4, bp); bp += 4; break;
    case OP_EXACT5:
      p_string(f, 5, bp); bp += 5; break;
    case OP_EXACTN:
      GET_LENGTH_INC(len, bp);
      p_len_string(f, len, 1, bp);
      bp += len;
      break;

    case OP_EXACTMB2N1:
      p_string(f, 2, bp); bp += 2; break;
    case OP_EXACTMB2N2:
      p_string(f, 4, bp); bp += 4; break;
    case OP_EXACTMB2N3:
      p_string(f, 6, bp); bp += 6; break;
    case OP_EXACTMB2N:
      GET_LENGTH_INC(len, bp);
      p_len_string(f, len, 2, bp);
      bp += len * 2;
      break;
    case OP_EXACTMB3N:
      GET_LENGTH_INC(len, bp);
      p_len_string(f, len, 3, bp);
      bp += len * 3;
      break;
    case OP_EXACTMBN:
      {
        int mb_len;

        GET_LENGTH_INC(mb_len, bp);
        GET_LENGTH_INC(len, bp);
        fprintf(f, ":%d:%d:", mb_len, len);
        n = len * mb_len;
        while (n-- > 0) { fputc(*bp++, f); }
      }
      break;

    case OP_EXACT1_IC:
      len = enc_len(enc, bp);
      p_string(f, len, bp);
      bp += len;
      break;
    case OP_EXACTN_IC:
      GET_LENGTH_INC(len, bp);
      p_len_string(f, len, 1, bp);
      bp += len;
      break;

    case OP_CCLASS:
      n = bitset_on_num((BitSetRef )bp);
      bp += SIZE_BITSET;
      fprintf(f, ":%d", n);
      break;

    case OP_CCLASS_NOT:
      n = bitset_on_num((BitSetRef )bp);
      bp += SIZE_BITSET;
      fprintf(f, ":%d", n);
      break;

    case OP_CCLASS_MB:
    case OP_CCLASS_MB_NOT:
      GET_LENGTH_INC(len, bp);
      q = bp;
#ifndef PLATFORM_UNALIGNED_WORD_ACCESS
      ALIGNMENT_RIGHT(q);
#endif
      GET_CODE_POINT(code, q);
      bp += len;
      fprintf(f, ":%d:%d", (int )code, len);
      break;

    case OP_CCLASS_MIX:
    case OP_CCLASS_MIX_NOT:
      n = bitset_on_num((BitSetRef )bp);
      bp += SIZE_BITSET;
      GET_LENGTH_INC(len, bp);
      q = bp;
#ifndef PLATFORM_UNALIGNED_WORD_ACCESS
      ALIGNMENT_RIGHT(q);
#endif
      GET_CODE_POINT(code, q);
      bp += len;
      fprintf(f, ":%d:%d:%d", n, (int )code, len);
      break;

    case OP_CCLASS_NODE:
      {
        CClassNode *cc;

        GET_POINTER_INC(cc, bp);
        n = bitset_on_num(cc->bs);
        fprintf(f, ":%u:%d", (unsigned int )cc, n);
      }
      break;

    case OP_BACKREFN_IC:
      mem = *((MemNumType* )bp);
      bp += SIZE_MEMNUM;
      fprintf(f, ":%d", mem);
      break;

    case OP_BACKREF_MULTI_IC:
    case OP_BACKREF_MULTI:
      fputs(" ", f);
      GET_LENGTH_INC(len, bp);
      for (i = 0; i < len; i++) {
        GET_MEMNUM_INC(mem, bp);
        if (i > 0) fputs(", ", f);
        fprintf(f, "%d", mem);
      }
      break;

    case OP_REPEAT:
    case OP_REPEAT_NG:
      {
        mem = *((MemNumType* )bp);
        bp += SIZE_MEMNUM;
        addr = *((RelAddrType* )bp);
        bp += SIZE_RELADDR;
        fprintf(f, ":%d:%d", mem, addr);
      }
      break;

    case OP_PUSH_OR_JUMP_EXACT1:
    case OP_PUSH_IF_PEEK_NEXT:
      addr = *((RelAddrType* )bp);
      bp += SIZE_RELADDR;
      fprintf(f, ":(%d)", addr);
      p_string(f, 1, bp);
      bp += 1;
      break;

    case OP_LOOK_BEHIND:
      GET_LENGTH_INC(len, bp);
      fprintf(f, ":%d", len);
      break;

    case OP_PUSH_LOOK_BEHIND_NOT:
      GET_RELADDR_INC(addr, bp);
      GET_LENGTH_INC(len, bp);
      fprintf(f, ":%d:(%d)", len, addr);
      break;

    default:
      fprintf(stderr, "onig_print_compiled_byte_code: undefined code %d\n",
              *--bp);
    }
  }
  fputs("]", f);
  if (nextp) *nextp = bp;
}

static void
print_compiled_byte_code_list(FILE* f, regex_t* reg)
{
  int ncode;
  UChar* bp = reg->p;
  UChar* end = reg->p + reg->used;

  fprintf(f, "code length: %d\n", reg->used);

  ncode = 0;
  while (bp < end) {
    ncode++;
    if (bp > reg->p) {
      if (ncode % 5 == 0)
        fprintf(f, "\n");
      else
        fputs(" ", f);
    }
    onig_print_compiled_byte_code(f, bp, &bp, reg->enc);
  }

  fprintf(f, "\n");
}

static void
print_indent_tree(FILE* f, Node* node, int indent)
{
  int i, type;
  int add = 3;
  UChar* p;

  Indent(f, indent);
  if (IS_NULL(node)) {
    fprintf(f, "ERROR: null node!!!\n");
    exit (0);
  }

  type = NTYPE(node);
  switch (type) {
  case N_LIST:
  case N_ALT:
    if (NTYPE(node) == N_LIST)
      fprintf(f, "<list:%x>\n", (int )node);
    else
      fprintf(f, "<alt:%x>\n", (int )node);

    print_indent_tree(f, NCONS(node).left, indent + add);
    while (IS_NOT_NULL(node = NCONS(node).right)) {
      if (NTYPE(node) != type) {
        fprintf(f, "ERROR: list/alt right is not a cons. %d\n", NTYPE(node));
        exit(0);
      }
      print_indent_tree(f, NCONS(node).left, indent + add);
    }
    break;

  case N_STRING:
    fprintf(f, "<string%s:%x>",
            (NSTRING_IS_RAW(node) ? "-raw" : ""), (int )node);
    for (p = NSTRING(node).s; p < NSTRING(node).end; p++) {
      if (*p >= 0x20 && *p < 0x7f)
        fputc(*p, f);
      else {
        fprintf(f, " 0x%02x", *p);
      }
    }
    break;

  case N_CCLASS:
    fprintf(f, "<cclass:%x>", (int )node);
    if (IS_CCLASS_NOT(&NCCLASS(node))) fputs(" not", f);
    if (NCCLASS(node).mbuf) {
      BBuf* bbuf = NCCLASS(node).mbuf;
      for (i = 0; i < bbuf->used; i++) {
        if (i > 0) fprintf(f, ",");
        fprintf(f, "%0x", bbuf->p[i]);
      }
    }
    break;

  case N_CTYPE:
    fprintf(f, "<ctype:%x> ", (int )node);
    switch (NCTYPE(node).type) {
    case CTYPE_WORD:            fputs("word",           f); break;
    case CTYPE_NOT_WORD:        fputs("not word",       f); break;
    default:
      fprintf(f, "ERROR: undefined ctype.\n");
      exit(0);
    }
    break;

  case N_ANYCHAR:
    fprintf(f, "<anychar:%x>", (int )node);
    break;

  case N_ANCHOR:
    fprintf(f, "<anchor:%x> ", (int )node);
    switch (NANCHOR(node).type) {
    case ANCHOR_BEGIN_BUF:      fputs("begin buf",      f); break;
    case ANCHOR_END_BUF:        fputs("end buf",        f); break;
    case ANCHOR_BEGIN_LINE:     fputs("begin line",     f); break;
    case ANCHOR_END_LINE:       fputs("end line",       f); break;
    case ANCHOR_SEMI_END_BUF:   fputs("semi end buf",   f); break;
    case ANCHOR_BEGIN_POSITION: fputs("begin position", f); break;

    case ANCHOR_WORD_BOUND:      fputs("word bound",     f); break;
    case ANCHOR_NOT_WORD_BOUND:  fputs("not word bound", f); break;
#ifdef USE_WORD_BEGIN_END
    case ANCHOR_WORD_BEGIN:      fputs("word begin", f);     break;
    case ANCHOR_WORD_END:        fputs("word end", f);       break;
#endif
    case ANCHOR_PREC_READ:       fputs("prec read",      f); break;
    case ANCHOR_PREC_READ_NOT:   fputs("prec read not",  f); break;
    case ANCHOR_LOOK_BEHIND:     fputs("look_behind",    f); break;
    case ANCHOR_LOOK_BEHIND_NOT: fputs("look_behind_not",f); break;

    default:
      fprintf(f, "ERROR: undefined anchor type.\n");
      break;
    }
    break;

  case N_BACKREF:
    {
      int* p;
      BackrefNode* br = &(NBACKREF(node));
      p = BACKREFS_P(br);
      fprintf(f, "<backref:%x>", (int )node);
      for (i = 0; i < br->back_num; i++) {
        if (i > 0) fputs(", ", f);
        fprintf(f, "%d", p[i]);
      }
    }
    break;

#ifdef USE_SUBEXP_CALL
  case N_CALL:
    {
      CallNode* cn = &(NCALL(node));
      fprintf(f, "<call:%x>", (int )node);
      p_string(f, cn->name_end - cn->name, cn->name);
    }
    break;
#endif

  case N_QUALIFIER:
    fprintf(f, "<qualifier:%x>{%d,%d}%s\n", (int )node,
            NQUALIFIER(node).lower, NQUALIFIER(node).upper,
            (NQUALIFIER(node).greedy ? "" : "?"));
    print_indent_tree(f, NQUALIFIER(node).target, indent + add);
    break;

  case N_EFFECT:
    fprintf(f, "<effect:%x> ", (int )node);
    switch (NEFFECT(node).type) {
    case EFFECT_OPTION:
      fprintf(f, "option:%d\n", NEFFECT(node).option);
      print_indent_tree(f, NEFFECT(node).target, indent + add);
      break;
    case EFFECT_MEMORY:
      fprintf(f, "memory:%d", NEFFECT(node).regnum);
      break;
    case EFFECT_STOP_BACKTRACK:
      fprintf(f, "stop-bt");
      break;

    default:
      break;
    }
    fprintf(f, "\n");
    print_indent_tree(f, NEFFECT(node).target, indent + add);
    break;

  default:
    fprintf(f, "print_indent_tree: undefined node type %d\n", NTYPE(node));
    break;
  }

  if (type != N_LIST && type != N_ALT && type != N_QUALIFIER &&
      type != N_EFFECT)
    fprintf(f, "\n");
  fflush(f);
}
#endif /* ONIG_DEBUG */

#ifdef ONIG_DEBUG_PARSE_TREE
static void
print_tree(FILE* f, Node* node)
{
  print_indent_tree(f, node, 0);
}
#endif
/* [<][>][^] [v] [top][bottom][index] [help] */


regenc.c

root/regenc.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. onigenc_init
  2. onigenc_get_default_encoding
  3. onigenc_set_default_encoding
  4. onigenc_get_right_adjust_char_head
  5. onigenc_get_right_adjust_char_head_with_prev
  6. onigenc_get_prev_char_head
  7. onigenc_step_back
  8. onigenc_step
  9. onigenc_strlen
  10. onigenc_strlen_null
  11. onigenc_str_bytelen_null
  12. onigenc_set_default_caseconv_table
  13. onigenc_get_left_adjust_char_head
  14. onigenc_ascii_get_all_pair_ambig_codes
  15. onigenc_nothing_get_all_comp_ambig_codes
  16. onigenc_iso_8859_1_get_all_pair_ambig_codes
  17. onigenc_ess_tsett_get_all_comp_ambig_codes
  18. onigenc_not_support_get_ctype_code_range
  19. onigenc_is_mbc_newline_0x0a
  20. onigenc_ascii_mbc_to_normalize
  21. onigenc_ascii_is_mbc_ambiguous
  22. onigenc_single_byte_mbc_enc_len
  23. onigenc_single_byte_mbc_to_code
  24. onigenc_single_byte_code_to_mbclen
  25. onigenc_single_byte_code_to_mbc_first
  26. onigenc_single_byte_code_to_mbc
  27. onigenc_single_byte_left_adjust_char_head
  28. onigenc_always_true_is_allowed_reverse_match
  29. onigenc_always_false_is_allowed_reverse_match
  30. onigenc_mbn_mbc_to_code
  31. onigenc_mbn_mbc_to_normalize
  32. onigenc_mbn_is_mbc_ambiguous
  33. onigenc_mb2_code_to_mbclen
  34. onigenc_mb4_code_to_mbclen
  35. onigenc_mb2_code_to_mbc_first
  36. onigenc_mb4_code_to_mbc_first
  37. onigenc_mb2_code_to_mbc
  38. onigenc_mb4_code_to_mbc
  39. onigenc_mb2_is_code_ctype
  40. onigenc_mb4_is_code_ctype
  41. onigenc_with_ascii_strncmp
  42. onigenc_is_code_ctype
  43. onigenc_code_to_mbc
  44. onigenc_mbc_to_lower
  45. onigenc_is_mbc_ambiguous
  46. onigenc_get_left_adjust_char_head
  47. onigenc_is_allowed_reverse_match
  48. onigenc_set_default_caseconv_table
/**********************************************************************
  regenc.c -  Oniguruma (regular expression library)
**********************************************************************/
/*-
 * Copyright (c) 2002-2005  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#include "regint.h"

OnigEncoding OnigEncDefaultCharEncoding = ONIG_ENCODING_INIT_DEFAULT;

extern int
onigenc_init(void)
{
  return 0;
}

extern OnigEncoding
onigenc_get_default_encoding(void)
{
  return OnigEncDefaultCharEncoding;
}

extern int
onigenc_set_default_encoding(OnigEncoding enc)
{
  OnigEncDefaultCharEncoding = enc;
  return 0;
}

extern UChar*
onigenc_get_right_adjust_char_head(OnigEncoding enc, const UChar* start, const UChar* s)
{
  UChar* p = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s);
  if (p < s) {
    p += enc_len(enc, p);
  }
  return p;
}

extern UChar*
onigenc_get_right_adjust_char_head_with_prev(OnigEncoding enc,
                                   const UChar* start, const UChar* s, const UChar** prev)
{
  UChar* p = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s);

  if (p < s) {
    if (prev) *prev = (const UChar* )p;
    p += enc_len(enc, p);
  }
  else {
    if (prev) *prev = (const UChar* )NULL; /* Sorry */
  }
  return p;
}

extern UChar*
onigenc_get_prev_char_head(OnigEncoding enc, const UChar* start, const UChar* s)
{
  if (s <= start)
    return (UChar* )NULL;

  return ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s - 1);
}

extern UChar*
onigenc_step_back(OnigEncoding enc, const UChar* start, const UChar* s, int n)
{
  while (ONIG_IS_NOT_NULL(s) && n-- > 0) {
    if (s <= start)
      return (UChar* )NULL;

    s = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s - 1);
  }
  return (UChar* )s;
}

extern UChar*
onigenc_step(OnigEncoding enc, const UChar* p, const UChar* end, int n)
{
  UChar* q = (UChar* )p;
  while (n-- > 0) {
    q += ONIGENC_MBC_ENC_LEN(enc, q);
  }
  return (q <= end ? q : NULL);
}

extern int
onigenc_strlen(OnigEncoding enc, const UChar* p, const UChar* end)
{
  int n = 0;
  UChar* q = (UChar* )p;

  while (q < end) {
    q += ONIGENC_MBC_ENC_LEN(enc, q);
    n++;
  }
  return n;
}

extern int
onigenc_strlen_null(OnigEncoding enc, const UChar* s)
{
  int n = 0;
  UChar* p = (UChar* )s;

  while (1) {
    if (*p == '\0') {
      UChar* q;
      int len = ONIGENC_MBC_MINLEN(enc);

      if (len == 1) return n;
      q = p + 1;
      while (len > 1) {
        if (*q != '\0') break;
        q++;
        len--;
      }
      if (len == 1) return n;
    }
    p += ONIGENC_MBC_ENC_LEN(enc, p);
    n++;
  }
}

extern int
onigenc_str_bytelen_null(OnigEncoding enc, const UChar* s)
{
  UChar* start = (UChar* )s;
  UChar* p = (UChar* )s;

  while (1) {
    if (*p == '\0') {
      UChar* q;
      int len = ONIGENC_MBC_MINLEN(enc);

      if (len == 1) return (int )(p - start);
      q = p + 1;
      while (len > 1) {
        if (*q != '\0') break;
        q++;
        len--;
      }
      if (len == 1) return (int )(p - start);
    }
    p += ONIGENC_MBC_ENC_LEN(enc, p);
  }
}

#ifndef ONIG_RUBY_M17N

#ifndef NOT_RUBY

#define USE_APPLICATION_TO_LOWER_CASE_TABLE

unsigned short OnigEnc_Unicode_ISO_8859_1_CtypeTable[256] = {
  0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
  0x2008, 0x228c, 0x2289, 0x2288, 0x2288, 0x2288, 0x2008, 0x2008,
  0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
  0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
  0x2284, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
  0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
  0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0,
  0x38b0, 0x38b0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
  0x21a0, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x34a2,
  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
  0x34a2, 0x34a2, 0x34a2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x31a0,
  0x21a0, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x30e2,
  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
  0x30e2, 0x30e2, 0x30e2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x2008,
  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0288, 0x0008, 0x0008,
  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
  0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
  0x0284, 0x01a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0,
  0x00a0, 0x00a0, 0x10e2, 0x01a0, 0x00a0, 0x00a8, 0x00a0, 0x00a0,
  0x00a0, 0x00a0, 0x10a0, 0x10a0, 0x00a0, 0x10e2, 0x00a0, 0x01a0,
  0x00a0, 0x10a0, 0x10e2, 0x01a0, 0x10a0, 0x10a0, 0x10a0, 0x01a0,
  0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
  0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2,
  0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x00a0,
  0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x14a2, 0x10e2,
  0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
  0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2,
  0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x00a0,
  0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2, 0x10e2
};
#endif

const UChar* OnigEncAsciiToLowerCaseTable = (const UChar* )0;

#ifndef USE_APPLICATION_TO_LOWER_CASE_TABLE
static const UChar BuiltInAsciiToLowerCaseTable[] = {
  '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
  '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
  '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
  '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
  '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
  '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
  '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
  '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
  '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
  '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
  '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
  '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
  '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
  '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
  '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
  '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
  '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
  '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
  '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
  '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
  '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307',
  '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317',
  '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327',
  '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337',
  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
  '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
  '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
};
#endif /* not USE_APPLICATION_TO_LOWER_CASE_TABLE */

#ifdef USE_UPPER_CASE_TABLE
UChar OnigEncAsciiToUpperCaseTable[256] = {
  '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
  '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
  '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
  '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
  '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
  '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
  '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
  '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
  '\100', '\101', '\102', '\103', '\104', '\105', '\106', '\107',
  '\110', '\111', '\112', '\113', '\114', '\115', '\116', '\117',
  '\120', '\121', '\122', '\123', '\124', '\125', '\126', '\127',
  '\130', '\131', '\132', '\133', '\134', '\135', '\136', '\137',
  '\140', '\101', '\102', '\103', '\104', '\105', '\106', '\107',
  '\110', '\111', '\112', '\113', '\114', '\115', '\116', '\117',
  '\120', '\121', '\122', '\123', '\124', '\125', '\126', '\127',
  '\130', '\131', '\132', '\173', '\174', '\175', '\176', '\177',
  '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
  '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
  '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
  '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
  '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
  '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
  '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
  '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
  '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307',
  '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317',
  '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327',
  '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337',
  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
  '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
  '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
};
#endif

unsigned short OnigEncAsciiCtypeTable[256] = {
  0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
  0x2008, 0x220c, 0x2209, 0x2208, 0x2208, 0x2208, 0x2008, 0x2008,
  0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
  0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008, 0x2008,
  0x2284, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
  0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
  0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0, 0x38b0,
  0x38b0, 0x38b0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x21a0,
  0x21a0, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x3ca2, 0x34a2,
  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
  0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
  0x34a2, 0x34a2, 0x34a2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x31a0,
  0x21a0, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x38e2, 0x30e2,
  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
  0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
  0x30e2, 0x30e2, 0x30e2, 0x21a0, 0x21a0, 0x21a0, 0x21a0, 0x2008,

  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
  0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
};

UChar OnigEncISO_8859_1_ToLowerCaseTable[256] = {
  '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
  '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
  '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
  '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
  '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
  '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
  '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
  '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
  '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
  '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
  '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
  '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
  '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
  '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
  '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
  '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
  '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
  '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
  '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
  '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
  '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
  '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
  '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\327',
  '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\337',
  '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
  '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
  '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
  '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377'
};

#ifdef USE_UPPER_CASE_TABLE
UChar OnigEncISO_8859_1_ToUpperCaseTable[256] = {
  '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
  '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
  '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
  '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
  '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
  '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
  '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
  '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
  '\100', '\101', '\102', '\103', '\104', '\105', '\106', '\107',
  '\110', '\111', '\112', '\113', '\114', '\115', '\116', '\117',
  '\120', '\121', '\122', '\123', '\124', '\125', '\126', '\127',
  '\130', '\131', '\132', '\133', '\134', '\135', '\136', '\137',
  '\140', '\101', '\102', '\103', '\104', '\105', '\106', '\107',
  '\110', '\111', '\112', '\113', '\114', '\115', '\116', '\117',
  '\120', '\121', '\122', '\123', '\124', '\125', '\126', '\127',
  '\130', '\131', '\132', '\173', '\174', '\175', '\176', '\177',
  '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
  '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
  '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
  '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
  '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
  '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
  '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
  '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
  '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307',
  '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317',
  '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327',
  '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337',
  '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307',
  '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317',
  '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\367',
  '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\377',
};
#endif

extern void
onigenc_set_default_caseconv_table(const UChar* table)
{
  if (table == (const UChar* )0) {
#ifndef USE_APPLICATION_TO_LOWER_CASE_TABLE
    table = BuiltInAsciiToLowerCaseTable;
#else
    return ;
#endif
  }

  if (table != OnigEncAsciiToLowerCaseTable) {
    OnigEncAsciiToLowerCaseTable = table;
  }
}

extern UChar*
onigenc_get_left_adjust_char_head(OnigEncoding enc, const UChar* start, const UChar* s)
{
  return ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, start, s);
}

OnigPairAmbigCodes OnigAsciiPairAmbigCodes[] = {
  { 0x41, 0x61 },
  { 0x42, 0x62 },
  { 0x43, 0x63 },
  { 0x44, 0x64 },
  { 0x45, 0x65 },
  { 0x46, 0x66 },
  { 0x47, 0x67 },
  { 0x48, 0x68 },
  { 0x49, 0x69 },
  { 0x4a, 0x6a },
  { 0x4b, 0x6b },
  { 0x4c, 0x6c },
  { 0x4d, 0x6d },
  { 0x4e, 0x6e },
  { 0x4f, 0x6f },
  { 0x50, 0x70 },
  { 0x51, 0x71 },
  { 0x52, 0x72 },
  { 0x53, 0x73 },
  { 0x54, 0x74 },
  { 0x55, 0x75 },
  { 0x56, 0x76 },
  { 0x57, 0x77 },
  { 0x58, 0x78 },
  { 0x59, 0x79 },
  { 0x5a, 0x7a },

  { 0x61, 0x41 },
  { 0x62, 0x42 },
  { 0x63, 0x43 },
  { 0x64, 0x44 },
  { 0x65, 0x45 },
  { 0x66, 0x46 },
  { 0x67, 0x47 },
  { 0x68, 0x48 },
  { 0x69, 0x49 },
  { 0x6a, 0x4a },
  { 0x6b, 0x4b },
  { 0x6c, 0x4c },
  { 0x6d, 0x4d },
  { 0x6e, 0x4e },
  { 0x6f, 0x4f },
  { 0x70, 0x50 },
  { 0x71, 0x51 },
  { 0x72, 0x52 },
  { 0x73, 0x53 },
  { 0x74, 0x54 },
  { 0x75, 0x55 },
  { 0x76, 0x56 },
  { 0x77, 0x57 },
  { 0x78, 0x58 },
  { 0x79, 0x59 },
  { 0x7a, 0x5a }
};

extern int
onigenc_ascii_get_all_pair_ambig_codes(OnigAmbigType flag,
                                       OnigPairAmbigCodes** ccs)
{
  if (flag == ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) {
    *ccs = OnigAsciiPairAmbigCodes;
    return (sizeof(OnigAsciiPairAmbigCodes) / sizeof(OnigPairAmbigCodes));
  }
  else {
    return 0;
  }
}

extern int
onigenc_nothing_get_all_comp_ambig_codes(OnigAmbigType flag,
                                         OnigCompAmbigCodes** ccs)
{
  return 0;
}

extern int
onigenc_iso_8859_1_get_all_pair_ambig_codes(OnigAmbigType flag,
                                            OnigPairAmbigCodes** ccs)
{
  static OnigPairAmbigCodes cc[] = {
    { 0xc0, 0xe0 },
    { 0xc1, 0xe1 },
    { 0xc2, 0xe2 },
    { 0xc3, 0xe3 },
    { 0xc4, 0xe4 },
    { 0xc5, 0xe5 },
    { 0xc6, 0xe6 },
    { 0xc7, 0xe7 },
    { 0xc8, 0xe8 },
    { 0xc9, 0xe9 },
    { 0xca, 0xea },
    { 0xcb, 0xeb },
    { 0xcc, 0xec },
    { 0xcd, 0xed },
    { 0xce, 0xee },
    { 0xcf, 0xef },

    { 0xd0, 0xf0 },
    { 0xd1, 0xf1 },
    { 0xd2, 0xf2 },
    { 0xd3, 0xf3 },
    { 0xd4, 0xf4 },
    { 0xd5, 0xf5 },
    { 0xd6, 0xf6 },
    { 0xd8, 0xf8 },
    { 0xd9, 0xf9 },
    { 0xda, 0xfa },
    { 0xdb, 0xfb },
    { 0xdc, 0xfc },
    { 0xdd, 0xfd },
    { 0xde, 0xfe },

    { 0xe0, 0xc0 },
    { 0xe1, 0xc1 },
    { 0xe2, 0xc2 },
    { 0xe3, 0xc3 },
    { 0xe4, 0xc4 },
    { 0xe5, 0xc5 },
    { 0xe6, 0xc6 },
    { 0xe7, 0xc7 },
    { 0xe8, 0xc8 },
    { 0xe9, 0xc9 },
    { 0xea, 0xca },
    { 0xeb, 0xcb },
    { 0xec, 0xcc },
    { 0xed, 0xcd },
    { 0xee, 0xce },
    { 0xef, 0xcf },

    { 0xf0, 0xd0 },
    { 0xf1, 0xd1 },
    { 0xf2, 0xd2 },
    { 0xf3, 0xd3 },
    { 0xf4, 0xd4 },
    { 0xf5, 0xd5 },
    { 0xf6, 0xd6 },
    { 0xf8, 0xd8 },
    { 0xf9, 0xd9 },
    { 0xfa, 0xda },
    { 0xfb, 0xdb },
    { 0xfc, 0xdc },
    { 0xfd, 0xdd },
    { 0xfe, 0xde }
  };

  if (flag == ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) {
    *ccs = OnigAsciiPairAmbigCodes;
    return (sizeof(OnigAsciiPairAmbigCodes) / sizeof(OnigPairAmbigCodes));
  }
  else if (flag == ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) {
    *ccs = cc;
    return sizeof(cc) / sizeof(OnigPairAmbigCodes);
  }
  else
    return 0;
}

extern int
onigenc_ess_tsett_get_all_comp_ambig_codes(OnigAmbigType flag,
                                           OnigCompAmbigCodes** ccs)
{
  static OnigCompAmbigCodes folds[] = {
    { 2, 0xdf, {{ 2, { 0x53, 0x53 } }, { 2, { 0x73, 0x73} } } }
  };

  if (flag == ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) {
    *ccs = folds;
    return sizeof(folds) / sizeof(OnigCompAmbigCodes);
  }
  else
    return 0;
}

extern int
onigenc_not_support_get_ctype_code_range(int ctype,
                             OnigCodePoint* sbr[], OnigCodePoint* mbr[])
{
  return ONIG_NO_SUPPORT_CONFIG;
}

extern int
onigenc_is_mbc_newline_0x0a(const UChar* p, const UChar* end)
{
  if (p < end) {
    if (*p == 0x0a) return 1;
  }
  return 0;
}

/* for single byte encodings */
extern int
onigenc_ascii_mbc_to_normalize(OnigAmbigType flag, const UChar** p, const UChar*end,
                               UChar* lower)
{
  if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
    *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(**p);
  }
  else {
    *lower = **p;
  }

  (*p)++;
  return 1; /* return byte length of converted char to lower */
}

extern int
onigenc_ascii_is_mbc_ambiguous(OnigAmbigType flag,
                               const UChar** pp, const UChar* end)
{
  const UChar* p = *pp;

  (*pp)++;
  if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
    return ONIGENC_IS_ASCII_CODE_CASE_AMBIG(*p);
  }
  else {
    return FALSE;
  }
}

extern int
onigenc_single_byte_mbc_enc_len(const UChar* p)
{
  return 1;
}

extern OnigCodePoint
onigenc_single_byte_mbc_to_code(const UChar* p, const UChar* end)
{
  return (OnigCodePoint )(*p);
}

extern int
onigenc_single_byte_code_to_mbclen(OnigCodePoint code)
{
  return 1;
}

extern int
onigenc_single_byte_code_to_mbc_first(OnigCodePoint code)
{
  return (code & 0xff);
}

extern int
onigenc_single_byte_code_to_mbc(OnigCodePoint code, UChar *buf)
{
  *buf = (UChar )(code & 0xff);
  return 1;
}

extern UChar*
onigenc_single_byte_left_adjust_char_head(const UChar* start, const UChar* s)
{
  return (UChar* )s;
}

extern int
onigenc_always_true_is_allowed_reverse_match(const UChar* s, const UChar* end)
{
  return TRUE;
}

extern int
onigenc_always_false_is_allowed_reverse_match(const UChar* s, const UChar* end)
{
  return FALSE;
}

extern OnigCodePoint
onigenc_mbn_mbc_to_code(OnigEncoding enc, const UChar* p, const UChar* end)
{
  int c, i, len;
  OnigCodePoint n;

  len = enc_len(enc, p);
  n = (OnigCodePoint )(*p++);
  if (len == 1) return n;

  for (i = 1; i < len; i++) {
    if (p >= end) break;
    c = *p++;
    n <<= 8;  n += c;
  }
  return n;
}

extern int
onigenc_mbn_mbc_to_normalize(OnigEncoding enc, OnigAmbigType flag,
                             const UChar** pp, const UChar* end, UChar* lower)
{
  int len;
  const UChar *p = *pp;

  if (ONIGENC_IS_MBC_ASCII(p)) {
    if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
      *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
    }
    else {
      *lower = *p;
    }
    (*pp)++;
    return 1;
  }
  else {
    len = enc_len(enc, p);
    if (lower != p) {
      int i;
      for (i = 0; i < len; i++) {
        *lower++ = *p++;
      }
    }
    (*pp) += len;
    return len; /* return byte length of converted to lower char */
  }
}

extern int
onigenc_mbn_is_mbc_ambiguous(OnigEncoding enc, OnigAmbigType flag,
                             const UChar** pp, const UChar* end)
{
  const UChar* p = *pp;

  if (ONIGENC_IS_MBC_ASCII(p)) {
    (*pp)++;
    if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
      return ONIGENC_IS_ASCII_CODE_CASE_AMBIG(*p);
    }
    else {
      return FALSE;
    }
  }

  (*pp) += enc_len(enc, p);
  return FALSE;
}

extern int
onigenc_mb2_code_to_mbclen(OnigCodePoint code)
{
  if ((code & 0xff00) != 0) return 2;
  else return 1;
}

extern int
onigenc_mb4_code_to_mbclen(OnigCodePoint code)
{
       if ((code & 0xff000000) != 0) return 4;
  else if ((code & 0xff0000) != 0) return 3;
  else if ((code & 0xff00) != 0) return 2;
  else return 1;
}

extern int
onigenc_mb2_code_to_mbc_first(OnigCodePoint code)
{
  int first;

  if ((code & 0xff00) != 0) {
    first = (code >> 8) & 0xff;
  }
  else {
    return (int )code;
  }
  return first;
}

extern int
onigenc_mb4_code_to_mbc_first(OnigCodePoint code)
{
  int first;

  if ((code & 0xff000000) != 0) {
    first = (code >> 24) & 0xff;
  }
  else if ((code & 0xff0000) != 0) {
    first = (code >> 16) & 0xff;
  }
  else if ((code & 0xff00) != 0) {
    first = (code >>  8) & 0xff;
  }
  else {
    return (int )code;
  }
  return first;
}

extern int
onigenc_mb2_code_to_mbc(OnigEncoding enc, OnigCodePoint code, UChar *buf)
{
  UChar *p = buf;

  if ((code & 0xff00) != 0) {
    *p++ = (UChar )((code >>  8) & 0xff);
  }
  *p++ = (UChar )(code & 0xff);

#if 1
  if (enc_len(enc, buf) != (p - buf))
    return ONIGENCERR_INVALID_WIDE_CHAR_VALUE;
#endif
  return p - buf;
}

extern int
onigenc_mb4_code_to_mbc(OnigEncoding enc, OnigCodePoint code, UChar *buf)
{
  UChar *p = buf;

  if ((code & 0xff000000) != 0) {
    *p++ = (UChar )((code >> 24) & 0xff);
  }
  if ((code & 0xff0000) != 0) {
    *p++ = (UChar )((code >> 16) & 0xff);
  }
  if ((code & 0xff00) != 0) {
    *p++ = (UChar )((code >> 8) & 0xff);
  }
  *p++ = (UChar )(code & 0xff);

#if 1
  if (enc_len(enc, buf) != (p - buf))
    return ONIGENCERR_INVALID_WIDE_CHAR_VALUE;
#endif
  return p - buf;
}

extern int
onigenc_mb2_is_code_ctype(OnigEncoding enc, OnigCodePoint code,
                          unsigned int ctype)
{
  if ((ctype & ONIGENC_CTYPE_WORD) != 0) {
    if (code < 128)
      return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
    else
      return (ONIGENC_CODE_TO_MBCLEN(enc, code) > 1 ? TRUE : FALSE);

    ctype &= ~ONIGENC_CTYPE_WORD;
    if (ctype == 0) return FALSE;
  }

  if (code < 128)
    return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
  else
    return FALSE;
}

extern int
onigenc_mb4_is_code_ctype(OnigEncoding enc, OnigCodePoint code,
                          unsigned int ctype)
{
  if ((ctype & ONIGENC_CTYPE_WORD) != 0) {
    if (code < 128)
      return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
    else
      return (ONIGENC_CODE_TO_MBCLEN(enc, code) > 1 ? TRUE : FALSE);

    ctype &= ~ONIGENC_CTYPE_WORD;
    if (ctype == 0) return FALSE;
  }

  if (code < 128)
    return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
  else
    return FALSE;
}

extern int
onigenc_with_ascii_strncmp(OnigEncoding enc, const UChar* p, const UChar* end,
                           const UChar* sascii /* ascii */, int n)
{
  int x, c;

  while (n-- > 0) {
    if (p >= end) return (int )(*sascii);

    c = (int )ONIGENC_MBC_TO_CODE(enc, p, end);
    x = *sascii - c;
    if (x) return x;

    sascii++;
    p += enc_len(enc, p);
  }
  return 0;
}

#else /* ONIG_RUBY_M17N */

extern int
onigenc_is_code_ctype(OnigEncoding enc, OnigCodePoint code, int ctype)
{
  switch (ctype) {
  case ONIGENC_CTYPE_NEWLINE:
    if (code == 0x0a) return 1;
    break;

  case ONIGENC_CTYPE_ALPHA:
    return m17n_isalpha(enc, code);
    break;
  case ONIGENC_CTYPE_BLANK:
    return ONIGENC_IS_CODE_BLANK(enc, (int )(code));
    break;
  case ONIGENC_CTYPE_CNTRL:
    return m17n_iscntrl(enc, code);
    break;
  case ONIGENC_CTYPE_DIGIT:
    return m17n_isdigit(enc, code);
    break;
  case ONIGENC_CTYPE_GRAPH:
    return ONIGENC_IS_CODE_GRAPH(enc, (int )(code));
    break;
  case ONIGENC_CTYPE_LOWER:
    return m17n_islower(enc, code);
    break;
  case ONIGENC_CTYPE_PRINT:
    return m17n_isprint(enc, code);
    break;
  case ONIGENC_CTYPE_PUNCT:
    return m17n_ispunct(enc, code);
    break;
  case ONIGENC_CTYPE_SPACE:
    return m17n_isspace(enc, code);
    break;
  case ONIGENC_CTYPE_UPPER:
    return m17n_isupper(enc, code);
    break;
  case ONIGENC_CTYPE_XDIGIT:
    return m17n_isxdigit(enc, code);
    break;
  case ONIGENC_CTYPE_WORD:
    return m17n_iswchar(enc, code);
    break;
  case ONIGENC_CTYPE_ASCII:
    return (code < 128 ? TRUE : FALSE);
    break;
  case ONIGENC_CTYPE_ALNUM:
    return m17n_isalnum(enc, code);
    break;
  default:
    break;
  }

  return 0;
}

extern int
onigenc_code_to_mbc(OnigEncoding enc, OnigCodePoint code, UChar *buf)
{
  int c, len;

  m17n_mbcput(enc, code, buf);
  c = m17n_firstbyte(enc, code);
  len = enc_len(enc, c);
  return len;
}

extern int
onigenc_mbc_to_lower(OnigEncoding enc, UChar* p, UChar* buf)
{
  unsigned int c, low;

  c   = m17n_codepoint(enc, p, p + enc_len(enc, *p));
  low = m17n_tolower(enc, c);
  m17n_mbcput(enc, low, buf);

  return m17n_codelen(enc, low);
}

extern int
onigenc_is_mbc_ambiguous(OnigEncoding enc, OnigAmbigType flag,
                         UChar** pp, UChar* end)
{
  int len;
  unsigned int c;
  UChar* p = *pp;

  len = enc_len(enc, *p);
  (*pp) += len;
  c = m17n_codepoint(enc, p, p + len);

  if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
    if (m17n_isupper(enc, c) || m17n_islower(enc, c))
      return TRUE;
  }

  return FALSE;
}

extern UChar*
onigenc_get_left_adjust_char_head(OnigEncoding enc, UChar* start, UChar* s)
{
  UChar *p;
  int len;

  if (s <= start) return s;
  p = s;

  while (!m17n_islead(enc, *p) && p > start) p--;
  while (p + (len = enc_len(enc, *p)) < s) {
    p += len;
  }
  if (p + len == s) return s;
  return p;
}

extern int
onigenc_is_allowed_reverse_match(OnigEncoding enc,
                                 const UChar* s, const UChar* end)
{
  return ONIGENC_IS_SINGLEBYTE(enc);
}

extern void
onigenc_set_default_caseconv_table(UChar* table) { }

#endif /* ONIG_RUBY_M17N */
/* [<][>][^] [v] [top][bottom][index] [help] */


regenc.h

root/regenc.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

#ifndef REGENC_H
#define REGENC_H
/**********************************************************************
  regenc.h -  Oniguruma (regular expression library)
**********************************************************************/
/*-
 * Copyright (c) 2002-2005  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#ifndef RUBY_PLATFORM
#include "config.h"
#endif
#include "oniguruma.h"

#ifndef NULL
#define NULL   ((void* )0)
#endif

#ifndef TRUE
#define TRUE    1
#endif

#ifndef FALSE
#define FALSE   0
#endif

/* error codes */
#define ONIGENCERR_MEMORY                                         -5
#define ONIGENCERR_TYPE_BUG                                       -6
#define ONIGENCERR_INVALID_WIDE_CHAR_VALUE                      -400
#define ONIGENCERR_TOO_BIG_WIDE_CHAR_VALUE                      -401

#define ONIG_IS_NULL(p)                    (((void*)(p)) == (void*)0)
#define ONIG_IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
#define ONIG_CHECK_NULL_RETURN(p)          if (ONIG_IS_NULL(p)) return NULL
#define ONIG_CHECK_NULL_RETURN_VAL(p,val)  if (ONIG_IS_NULL(p)) return (val)

#ifdef ONIG_RUBY_M17N

#define ONIG_ENCODING_INIT_DEFAULT            ONIG_ENCODING_UNDEF

#else  /* ONIG_RUBY_M17N */

#define USE_UNICODE_FULL_RANGE_CTYPE

#define ONIG_ENCODING_INIT_DEFAULT           ONIG_ENCODING_ASCII

/* for encoding system implementation (internal) */
ONIG_EXTERN int onigenc_ascii_get_all_pair_ambig_codes P_((OnigAmbigType flag, OnigPairAmbigCodes** acs));
ONIG_EXTERN int onigenc_nothing_get_all_comp_ambig_codes P_((OnigAmbigType flag, OnigCompAmbigCodes** acs));
ONIG_EXTERN int onigenc_iso_8859_1_get_all_pair_ambig_codes P_((OnigAmbigType flag, OnigPairAmbigCodes** acs));
ONIG_EXTERN int onigenc_ess_tsett_get_all_comp_ambig_codes P_((OnigAmbigType flag, OnigCompAmbigCodes** acs));
ONIG_EXTERN int onigenc_not_support_get_ctype_code_range P_((int ctype, OnigCodePoint* sbr[], OnigCodePoint* mbr[]));
ONIG_EXTERN int onigenc_is_mbc_newline_0x0a P_((const UChar* p, const UChar* end));

/* methods for single byte encoding */
ONIG_EXTERN int onigenc_ascii_mbc_to_normalize P_((OnigAmbigType flag, const UChar** p, const UChar* end, UChar* lower));
ONIG_EXTERN int onigenc_ascii_is_mbc_ambiguous P_((OnigAmbigType flag, const UChar** p, const UChar* end));
ONIG_EXTERN int onigenc_single_byte_mbc_enc_len P_((const UChar* p));
ONIG_EXTERN OnigCodePoint onigenc_single_byte_mbc_to_code P_((const UChar* p, const UChar* end));
ONIG_EXTERN int onigenc_single_byte_code_to_mbclen P_((OnigCodePoint code));
ONIG_EXTERN int onigenc_single_byte_code_to_mbc_first P_((OnigCodePoint code));
ONIG_EXTERN int onigenc_single_byte_code_to_mbc P_((OnigCodePoint code, UChar *buf));
ONIG_EXTERN UChar* onigenc_single_byte_left_adjust_char_head P_((const UChar* start, const UChar* s));
ONIG_EXTERN int onigenc_always_true_is_allowed_reverse_match P_((const UChar* s, const UChar* end));
ONIG_EXTERN int onigenc_always_false_is_allowed_reverse_match P_((const UChar* s, const UChar* end));

/* methods for multi byte encoding */
ONIG_EXTERN OnigCodePoint onigenc_mbn_mbc_to_code P_((OnigEncoding enc, const UChar* p, const UChar* end));
ONIG_EXTERN int onigenc_mbn_mbc_to_normalize P_((OnigEncoding enc, OnigAmbigType flag, const UChar** p, const UChar* end, UChar* lower));
ONIG_EXTERN int onigenc_mbn_is_mbc_ambiguous P_((OnigEncoding enc, OnigAmbigType flag, const UChar** p, const UChar* end));
ONIG_EXTERN int onigenc_mb2_code_to_mbclen P_((OnigCodePoint code));
ONIG_EXTERN int onigenc_mb2_code_to_mbc_first P_((OnigCodePoint code));
ONIG_EXTERN int onigenc_mb2_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf));
ONIG_EXTERN int onigenc_mb2_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, unsigned int ctype));
ONIG_EXTERN int onigenc_mb4_code_to_mbclen P_((OnigCodePoint code));
ONIG_EXTERN int onigenc_mb4_code_to_mbc_first P_((OnigCodePoint code));
ONIG_EXTERN int onigenc_mb4_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf));
ONIG_EXTERN int onigenc_mb4_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, unsigned int ctype));

ONIG_EXTERN int onigenc_get_all_fold_match_code_ss_0xdf P_((OnigCodePoint** codes));

/* in enc/unicode.c */
ONIG_EXTERN int onigenc_unicode_is_code_ctype P_((OnigCodePoint code, unsigned int ctype));
ONIG_EXTERN int onigenc_unicode_get_ctype_code_range P_((int ctype, OnigCodePoint* sbr[], OnigCodePoint* mbr[]));

#define ONIGENC_ISO_8859_1_TO_LOWER_CASE(c) \
  OnigEncISO_8859_1_ToLowerCaseTable[c]
#define ONIGENC_ISO_8859_1_TO_UPPER_CASE(c) \
  OnigEncISO_8859_1_ToUpperCaseTable[c]
#define ONIGENC_IS_UNICODE_ISO_8859_1_CTYPE(code,ctype) \
  ((OnigEnc_Unicode_ISO_8859_1_CtypeTable[code] & ctype) != 0)

ONIG_EXTERN UChar OnigEncISO_8859_1_ToLowerCaseTable[];
ONIG_EXTERN UChar OnigEncISO_8859_1_ToUpperCaseTable[];
ONIG_EXTERN unsigned short OnigEnc_Unicode_ISO_8859_1_CtypeTable[];
ONIG_EXTERN OnigPairAmbigCodes OnigAsciiPairAmbigCodes[];

#endif /* is not ONIG_RUBY_M17N */

ONIG_EXTERN int
onigenc_with_ascii_strncmp P_((OnigEncoding enc, const UChar* p, const UChar* end, const UChar* sascii /* ascii */, int n));
ONIG_EXTERN UChar*
onigenc_step P_((OnigEncoding enc, const UChar* p, const UChar* end, int n));

/* defined in regexec.c, but used in enc/xxx.c */
extern int  onig_is_in_code_range P_((const UChar* p, OnigCodePoint code));

ONIG_EXTERN OnigEncoding  OnigEncDefaultCharEncoding;
ONIG_EXTERN const UChar* OnigEncAsciiToLowerCaseTable;
ONIG_EXTERN const UChar  OnigEncAsciiToUpperCaseTable[];
ONIG_EXTERN unsigned short OnigEncAsciiCtypeTable[];

#define ONIGENC_ASCII_CODE_TO_LOWER_CASE(c) OnigEncAsciiToLowerCaseTable[c]
#define ONIGENC_ASCII_CODE_TO_UPPER_CASE(c) OnigEncAsciiToUpperCaseTable[c]
#define ONIGENC_IS_ASCII_CODE_CTYPE(code,ctype) \
  ((OnigEncAsciiCtypeTable[code] & ctype) != 0)
#define ONIGENC_IS_ASCII_CODE_CASE_AMBIG(code) \
    ONIGENC_IS_ASCII_CODE_CTYPE(code, (ONIGENC_CTYPE_UPPER | ONIGENC_CTYPE_LOWER))

#endif /* REGENC_H */
/* [<][>][^][v][top][bottom][index] [help] */


regerror.c

root/regerror.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. onig_error_code_to_format
  2. onig_error_code_to_str
  3. onig_snprintf_with_pattern
/**********************************************************************
  regerror.c -  Oniguruma (regular expression library)
**********************************************************************/
/*-
 * Copyright (c) 2002-2005  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#include "regint.h"
#include <stdio.h> /* for vsnprintf() */

#include <stdarg.h>

extern char*
onig_error_code_to_format(int code)
{
  char *p;

  if (code >= 0) return (char* )0;

  switch (code) {
  case ONIG_MISMATCH:
    p = "mismatch"; break;
  case ONIG_NO_SUPPORT_CONFIG:
    p = "no support in this configuration"; break;
  case ONIGERR_MEMORY:
    p = "fail to memory allocation"; break;
  case ONIGERR_MATCH_STACK_LIMIT_OVER:
    p = "match-stack limit over"; break;
  case ONIGERR_TYPE_BUG:
    p = "undefined type (bug)"; break;
  case ONIGERR_PARSER_BUG:
    p = "internal parser error (bug)"; break;
  case ONIGERR_STACK_BUG:
    p = "stack error (bug)"; break;
  case ONIGERR_UNDEFINED_BYTECODE:
    p = "undefined bytecode (bug)"; break;
  case ONIGERR_UNEXPECTED_BYTECODE:
    p = "unexpected bytecode (bug)"; break;
  case ONIGERR_DEFAULT_ENCODING_IS_NOT_SETTED:
    p = "default multibyte-encoding is not setted"; break;
  case ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR:
    p = "can't convert to wide-char on specified multibyte-encoding"; break;
  case ONIGERR_INVALID_ARGUMENT:
    p = "invalid argument"; break;
  case ONIGERR_END_PATTERN_AT_LEFT_BRACE:
    p = "end pattern at left brace"; break;
  case ONIGERR_END_PATTERN_AT_LEFT_BRACKET:
    p = "end pattern at left bracket"; break;
  case ONIGERR_EMPTY_CHAR_CLASS:
    p = "empty char-class"; break;
  case ONIGERR_PREMATURE_END_OF_CHAR_CLASS:
    p = "premature end of char-class"; break;
  case ONIGERR_END_PATTERN_AT_ESCAPE:
    p = "end pattern at escape"; break;
  case ONIGERR_END_PATTERN_AT_META:
    p = "end pattern at meta"; break;
  case ONIGERR_END_PATTERN_AT_CONTROL:
    p = "end pattern at control"; break;
  case ONIGERR_META_CODE_SYNTAX:
    p = "illegal meta-code syntax"; break;
  case ONIGERR_CONTROL_CODE_SYNTAX:
    p = "illegal control-code syntax"; break;
  case ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE:
    p = "char-class value at end of range"; break;
  case ONIGERR_CHAR_CLASS_VALUE_AT_START_OF_RANGE:
    p = "char-class value at start of range"; break;
  case ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS:
    p = "unmatched range specifier in char-class"; break;
  case ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED:
    p = "target of repeat operator is not specified"; break;
  case ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID:
    p = "target of repeat operator is invalid"; break;
  case ONIGERR_NESTED_REPEAT_OPERATOR:
    p = "nested repeat operator"; break;
  case ONIGERR_UNMATCHED_CLOSE_PARENTHESIS:
    p = "unmatched close parenthesis"; break;
  case ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS:
    p = "end pattern with unmatched parenthesis"; break;
  case ONIGERR_END_PATTERN_IN_GROUP:
    p = "end pattern in group"; break;
  case ONIGERR_UNDEFINED_GROUP_OPTION:
    p = "undefined group option"; break;
  case ONIGERR_INVALID_POSIX_BRACKET_TYPE:
    p = "invalid POSIX bracket type"; break;
  case ONIGERR_INVALID_LOOK_BEHIND_PATTERN:
    p = "invalid pattern in look-behind"; break;
  case ONIGERR_INVALID_REPEAT_RANGE_PATTERN:
    p = "invalid repeat range {lower,upper}"; break;
  case ONIGERR_TOO_BIG_NUMBER:
    p = "too big number"; break;
  case ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE:
    p = "too big number for repeat range"; break;
  case ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE:
    p = "upper is smaller than lower in repeat range"; break;
  case ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS:
    p = "empty range in char class"; break;
  case ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE:
    p = "mismatch multibyte code length in char-class range"; break;
  case ONIGERR_TOO_MANY_MULTI_BYTE_RANGES:
    p = "too many multibyte code ranges are specified"; break;
  case ONIGERR_TOO_SHORT_MULTI_BYTE_STRING:
    p = "too short multibyte code string"; break;
  case ONIGERR_TOO_BIG_BACKREF_NUMBER:
    p = "too big backref number"; break;
  case ONIGERR_INVALID_BACKREF:
#ifdef USE_NAMED_GROUP
    p = "invalid backref number/name"; break;
#else
    p = "invalid backref number"; break;
#endif
  case ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED:
    p = "numbered backref/call is not allowed. (use name)"; break;
  case ONIGERR_TOO_BIG_WIDE_CHAR_VALUE:
    p = "too big wide-char value"; break;
  case ONIGERR_TOO_LONG_WIDE_CHAR_VALUE:
    p = "too long wide-char value"; break;
  case ONIGERR_INVALID_WIDE_CHAR_VALUE:
    p = "invalid wide-char value"; break;
  case ONIGERR_EMPTY_GROUP_NAME:
    p = "group name is empty"; break;
  case ONIGERR_INVALID_GROUP_NAME:
    p = "invalid group name <%n>"; break;
  case ONIGERR_INVALID_CHAR_IN_GROUP_NAME:
#ifdef USE_NAMED_GROUP
    p = "invalid char in group name <%n>"; break;
#else
    p = "invalid char in group number <%n>"; break;
#endif
  case ONIGERR_UNDEFINED_NAME_REFERENCE:
    p = "undefined name <%n> reference"; break;
  case ONIGERR_UNDEFINED_GROUP_REFERENCE:
    p = "undefined group <%n> reference"; break;
  case ONIGERR_MULTIPLEX_DEFINED_NAME:
    p = "multiplex defined name <%n>"; break;
  case ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL:
    p = "multiplex definition name <%n> call"; break;
  case ONIGERR_NEVER_ENDING_RECURSION:
    p = "never ending recursion"; break;
  case ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY:
    p = "group number is too big for capture history"; break;
  case ONIGERR_INVALID_CHAR_PROPERTY_NAME:
    p = "invalid character property name {%n}"; break;
  case ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION:
    p = "not supported encoding combination"; break;
  case ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT:
    p = "over thread pass limit count"; break;

  default:
    p = "undefined error code"; break;
  }

  return p;
}

/* for ONIG_MAX_ERROR_MESSAGE_LEN */
#define MAX_ERROR_PAR_LEN   30

extern int
onig_error_code_to_str(UChar* s, int code, ...)
{
  UChar *p, *q;
  OnigErrorInfo* einfo;
  int len;
  va_list vargs;

  va_start(vargs, code);

  switch (code) {
  case ONIGERR_UNDEFINED_NAME_REFERENCE:
  case ONIGERR_UNDEFINED_GROUP_REFERENCE:
  case ONIGERR_MULTIPLEX_DEFINED_NAME:
  case ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL:
  case ONIGERR_INVALID_GROUP_NAME:
  case ONIGERR_INVALID_CHAR_IN_GROUP_NAME:
  case ONIGERR_INVALID_CHAR_PROPERTY_NAME:
    einfo = va_arg(vargs, OnigErrorInfo*);
    len = einfo->par_end - einfo->par;
    q = onig_error_code_to_format(code);
    p = s;
    while (*q != '\0') {
      if (*q == '%') {
        q++;
        if (*q == 'n') { /* '%n': name */
          if (len > MAX_ERROR_PAR_LEN) {
            xmemcpy(p, einfo->par, MAX_ERROR_PAR_LEN - 3);
            p += (MAX_ERROR_PAR_LEN - 3);
            xmemcpy(p, "...", 3);
            p += 3;
          }
          else {
            xmemcpy(p, einfo->par, len);
            p += len;
          }
          q++;
        }
        else
          goto normal_char;
      }
      else {
      normal_char:
        *p++ = *q++;
      }
    }
    *p = '\0';
    len = p - s;
    break;

  default:
    q = onig_error_code_to_format(code);
    len = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, q);
    xmemcpy(s, q, len);
    s[len] = '\0';
    break;
  }

  va_end(vargs);
  return len;
}

void
onig_snprintf_with_pattern(char buf[], int bufsize, OnigEncoding enc,
                            char* pat, char* pat_end, char *fmt, ...)
{
  int n, need, len;
  UChar *p, *s, *bp;
  char bs[6];
  va_list args;

  va_start(args, fmt);
  n = vsnprintf(buf, bufsize, fmt, args);
  va_end(args);

  need = (pat_end - pat) * 4 + 4;

  if (n + need < bufsize) {
    strcat(buf, ": /");
    s = buf + onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, buf);

    p = pat;
    while (p < (UChar* )pat_end) {
      if (*p == MC_ESC(enc)) {
        *s++ = *p++;
        len = enc_len(enc, p);
        while (len-- > 0) *s++ = *p++;
      }
      else if (*p == '/') {
        *s++ = (unsigned char )MC_ESC(enc);
        *s++ = *p++;
      }
      else if (ONIGENC_IS_MBC_HEAD(enc, p)) {
        len = enc_len(enc, p);
        if (ONIGENC_MBC_MINLEN(enc) == 1) {
          while (len-- > 0) *s++ = *p++;
        }
        else { /* for UTF16 */
          int blen;

          while (len-- > 0) {
            sprintf(bs, "\\%03o", *p++ & 0377);
            blen = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, bs);
            bp = bs;
            while (blen-- > 0) *s++ = *bp++;
          }
        }
      }
      else if (!ONIGENC_IS_CODE_PRINT(enc, *p) &&
               !ONIGENC_IS_CODE_SPACE(enc, *p)) {
        sprintf(bs, "\\%03o", *p++ & 0377);
        len = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, bs);
        bp = bs;
        while (len-- > 0) *s++ = *bp++;
      }
      else {
        *s++ = *p++;
      }
    }

    *s++ = '/';
    *s   = '\0';
  }
}
/* [<][>][^] [v] [top][bottom][index] [help] */


regex.h

root/regex.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/**********************************************************************

  regex.h -

  $Author: kosako $
  $Date: 2005/02/26 08:05:04 $

  Copyright (C) 1993-2005 Yukihiro Matsumoto

**********************************************************************/

#ifndef REGEX_H
#define REGEX_H

#include "oniguruma.h"

#ifndef ONIG_RUBY_M17N

ONIG_EXTERN OnigEncoding    OnigEncDefaultCharEncoding;

#undef ismbchar
#define ismbchar(c) (mbclen((c)) != 1)
#define mbclen(c)  \
  ONIGENC_MBC_ENC_LEN(OnigEncDefaultCharEncoding, (UChar* )(&c))

#endif /* ifndef ONIG_RUBY_M17N */

#endif /* !REGEX_H */
/* [<][>][^][v][top][bottom][index] [help] */


regexec.c

root/regexec.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. history_tree_clear
  2. history_tree_free
  3. history_root_free
  4. history_node_new
  5. history_tree_add_child
  6. history_tree_clone
  7. onig_get_capture_tree
  8. onig_region_clear
  9. onig_region_resize
  10. onig_region_resize_clear
  11. onig_region_set
  12. onig_region_init
  13. onig_region_new
  14. onig_region_free
  15. onig_region_copy
  16. StackType
  17. MatchArg
  18. onig_get_match_stack_limit_size
  19. onig_set_match_stack_limit_size
  20. stack_double
  21. string_cmp_ic
  22. make_capture_history_tree
  23. TrapEnsureArg
  24. trap_ensure
  25. trap_exec
  26. onig_exec_trap
  27. onig_stat_print
  28. onig_statistics_init
  29. onig_print_statistics
  30. onig_is_in_code_range
  31. code_is_in_cclass_node
  32. posix_regmatch_t
  33. match_at
  34. slow_search
  35. str_lower_case_match
  36. slow_search_ic
  37. slow_search_backward
  38. slow_search_backward_ic
  39. bm_search_notrev
  40. bm_search
  41. set_bm_backward_skip
  42. bm_search_backward
  43. map_search
  44. map_search_backward
  45. onig_match
  46. forward_search_range
  47. backward_search_range
  48. onig_search
  49. onig_get_encoding
  50. onig_get_options
  51. onig_get_ambig_flag
  52. onig_get_syntax
  53. onig_number_of_captures
  54. onig_number_of_capture_histories
  55. onig_copy_encoding
/**********************************************************************
  regexec.c -  Oniguruma (regular expression library)
**********************************************************************/
/*-
 * Copyright (c) 2002-2005  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#include "regint.h"

#ifdef USE_CAPTURE_HISTORY
static void history_tree_free(OnigCaptureTreeNode* node);

static void
history_tree_clear(OnigCaptureTreeNode* node)
{
  int i;

  if (IS_NOT_NULL(node)) {
    for (i = 0; i < node->num_childs; i++) {
      if (IS_NOT_NULL(node->childs[i])) {
        history_tree_free(node->childs[i]);
      }
    }
    for (i = 0; i < node->allocated; i++) {
      node->childs[i] = (OnigCaptureTreeNode* )0;
    }
    node->num_childs = 0;
    node->beg = ONIG_REGION_NOTPOS;
    node->end = ONIG_REGION_NOTPOS;
    node->group = -1;
  }
}

static void
history_tree_free(OnigCaptureTreeNode* node)
{
  history_tree_clear(node);
  xfree(node);
}

static void
history_root_free(OnigRegion* r)
{
  if (IS_NOT_NULL(r->history_root)) {
    history_tree_free(r->history_root);
    r->history_root = (OnigCaptureTreeNode* )0;
  }
}

static OnigCaptureTreeNode*
history_node_new()
{
  OnigCaptureTreeNode* node;

  node = (OnigCaptureTreeNode* )xmalloc(sizeof(OnigCaptureTreeNode));
  CHECK_NULL_RETURN(node);
  node->childs     = (OnigCaptureTreeNode** )0;
  node->allocated  = 0;
  node->num_childs = 0;
  node->group      = -1;
  node->beg        = ONIG_REGION_NOTPOS;
  node->end        = ONIG_REGION_NOTPOS;

  return node;
}

static int
history_tree_add_child(OnigCaptureTreeNode* parent, OnigCaptureTreeNode* child)
{
#define HISTORY_TREE_INIT_ALLOC_SIZE  8

  if (parent->num_childs >= parent->allocated) {
    int n, i;

    if (IS_NULL(parent->childs)) {
      n = HISTORY_TREE_INIT_ALLOC_SIZE;
      parent->childs =
        (OnigCaptureTreeNode** )xmalloc(sizeof(OnigCaptureTreeNode*) * n);
    }
    else {
      n = parent->allocated * 2;
      parent->childs =
        (OnigCaptureTreeNode** )xrealloc(parent->childs,
                                         sizeof(OnigCaptureTreeNode*) * n);
    }
    CHECK_NULL_RETURN_VAL(parent->childs, ONIGERR_MEMORY);
    for (i = parent->allocated; i < n; i++) {
      parent->childs[i] = (OnigCaptureTreeNode* )0;
    }
    parent->allocated = n;
  }

  parent->childs[parent->num_childs] = child;
  parent->num_childs++;
  return 0;
}

static OnigCaptureTreeNode*
history_tree_clone(OnigCaptureTreeNode* node)
{
  int i;
  OnigCaptureTreeNode *clone, *child;

  clone = history_node_new();
  CHECK_NULL_RETURN(clone);

  clone->beg = node->beg;
  clone->end = node->end;
  for (i = 0; i < node->num_childs; i++) {
    child = history_tree_clone(node->childs[i]);
    if (IS_NULL(child)) {
      history_tree_free(clone);
      return (OnigCaptureTreeNode* )0;
    }
    history_tree_add_child(clone, child);
  }

  return clone;
}

extern  OnigCaptureTreeNode*
onig_get_capture_tree(OnigRegion* region)
{
  return region->history_root;
}
#endif /* USE_CAPTURE_HISTORY */

extern void
onig_region_clear(OnigRegion* region)
{
  int i;

  for (i = 0; i < region->num_regs; i++) {
    region->beg[i] = region->end[i] = ONIG_REGION_NOTPOS;
  }
#ifdef USE_CAPTURE_HISTORY
  history_root_free(region);
#endif
}

extern int
onig_region_resize(OnigRegion* region, int n)
{
  region->num_regs = n;

  if (n < ONIG_NREGION)
    n = ONIG_NREGION;

  if (region->allocated == 0) {
    region->beg = (int* )xmalloc(n * sizeof(int));
    region->end = (int* )xmalloc(n * sizeof(int));

    if (region->beg == 0 || region->end == 0)
      return ONIGERR_MEMORY;

    region->allocated = n;
  }
  else if (region->allocated < n) {
    region->beg = (int* )xrealloc(region->beg, n * sizeof(int));
    region->end = (int* )xrealloc(region->end, n * sizeof(int));

    if (region->beg == 0 || region->end == 0)
      return ONIGERR_MEMORY;

    region->allocated = n;
  }

  return 0;
}

extern int
onig_region_resize_clear(OnigRegion* region, int n)
{
  int r;

  r = onig_region_resize(region, n);
  if (r != 0) return r;
  onig_region_clear(region);
  return 0;
}

extern int
onig_region_set(OnigRegion* region, int at, int beg, int end)
{
  if (at < 0) return ONIGERR_INVALID_ARGUMENT;

  if (at >= region->allocated) {
    int r = onig_region_resize(region, at + 1);
    if (r < 0) return r;
  }

  region->beg[at] = beg;
  region->end[at] = end;
  return 0;
}

extern void
onig_region_init(OnigRegion* region)
{
  region->num_regs     = 0;
  region->allocated    = 0;
  region->beg          = (int* )0;
  region->end          = (int* )0;
  region->history_root = (OnigCaptureTreeNode* )0;
}

extern OnigRegion*
onig_region_new(void)
{
  OnigRegion* r;

  r = (OnigRegion* )xmalloc(sizeof(OnigRegion));
  onig_region_init(r);
  return r;
}

extern void
onig_region_free(OnigRegion* r, int free_self)
{
  if (r) {
    if (r->allocated > 0) {
      if (r->beg) xfree(r->beg);
      if (r->end) xfree(r->end);
      r->allocated = 0;
    }
#ifdef USE_CAPTURE_HISTORY
    history_root_free(r);
#endif
    if (free_self) xfree(r);
  }
}

extern void
onig_region_copy(OnigRegion* to, OnigRegion* from)
{
#define RREGC_SIZE   (sizeof(int) * from->num_regs)
  int i;

  if (to == from) return;

  if (to->allocated == 0) {
    if (from->num_regs > 0) {
      to->beg = (int* )xmalloc(RREGC_SIZE);
      to->end = (int* )xmalloc(RREGC_SIZE);
      to->allocated = from->num_regs;
    }
  }
  else if (to->allocated < from->num_regs) {
    to->beg = (int* )xrealloc(to->beg, RREGC_SIZE);
    to->end = (int* )xrealloc(to->end, RREGC_SIZE);
    to->allocated = from->num_regs;
  }

  for (i = 0; i < from->num_regs; i++) {
    to->beg[i] = from->beg[i];
    to->end[i] = from->end[i];
  }
  to->num_regs = from->num_regs;

#ifdef USE_CAPTURE_HISTORY
  history_root_free(to);

  if (IS_NOT_NULL(from->history_root)) {
    to->history_root = history_tree_clone(from->history_root);
  }
#endif
}

/** stack **/
#define INVALID_STACK_INDEX   -1
typedef long StackIndex;

typedef struct _StackType {
  unsigned int type;
  union {
    struct {
      UChar *pcode;      /* byte code position */
      UChar *pstr;       /* string position */
      UChar *pstr_prev;  /* previous char position of pstr */
    } state;
    struct {
      int   count;       /* for OP_REPEAT_INC, OP_REPEAT_INC_NG */
      UChar *pcode;      /* byte code position (head of repeated target) */
      int   num;         /* repeat id */
    } repeat;
    struct {
      StackIndex si;     /* index of stack */
    } repeat_inc;
    struct {
      int num;           /* memory num */
      UChar *pstr;       /* start/end position */
      /* Following information is setted, if this stack type is MEM-START */
      StackIndex start;  /* prev. info (for backtrack  "(...)*" ) */
      StackIndex end;    /* prev. info (for backtrack  "(...)*" ) */
    } mem;
    struct {
      int num;           /* null check id */
      UChar *pstr;       /* start position */
    } null_check;
#ifdef USE_SUBEXP_CALL
    struct {
      UChar *ret_addr;   /* byte code position */
      int    num;        /* null check id */
      UChar *pstr;       /* string position */
    } call_frame;
#endif
  } u;
} StackType;

/* stack type */
/* used by normal-POP */
#define STK_ALT                    0x0001
#define STK_LOOK_BEHIND_NOT        0x0003
#define STK_POS_NOT                0x0005
/* avoided by normal-POP, but value should be small */
#define STK_NULL_CHECK_START       0x0100
/* handled by normal-POP */
#define STK_MEM_START              0x0200
#define STK_MEM_END                0x0300
#define STK_REPEAT_INC             0x0400
/* avoided by normal-POP */
#define STK_POS                    0x0500  /* used when POP-POS */
#define STK_STOP_BT                0x0600  /* mark for "(?>...)" */
#define STK_REPEAT                 0x0700
#define STK_CALL_FRAME             0x0800
#define STK_RETURN                 0x0900
#define STK_MEM_END_MARK           0x0a00
#define STK_VOID                   0x0b00  /* for fill a blank */
#define STK_NULL_CHECK_END         0x0c00  /* for recursive call */

/* stack type check mask */
#define STK_MASK_POP_USED     0x00ff
#define IS_TO_VOID_TARGET(stk) \
     (((stk)->type & STK_MASK_POP_USED) || (stk)->type == STK_NULL_CHECK_START)

typedef struct {
  void* stack_p;
  int   stack_n;
  OnigOptionType options;
  OnigRegion*    region;
  const UChar* start;   /* search start position (for \G: BEGIN_POSITION) */
} MatchArg;

#define MATCH_ARG_INIT(msa, arg_option, arg_region, arg_start) do {\
  (msa).stack_p = (void* )0;\
  (msa).options = (arg_option);\
  (msa).region  = (arg_region);\
  (msa).start   = (arg_start);\
} while (0)

#define MATCH_ARG_FREE(msa)   if ((msa).stack_p) xfree((msa).stack_p)

#define STACK_INIT(alloc_addr, ptr_num, stack_num)  do {\
  if (msa->stack_p) {\
    alloc_addr = (char* )xalloca(sizeof(char*) * (ptr_num));\
    stk_alloc  = (StackType* )(msa->stack_p);\
    stk_base   = stk_alloc;\
    stk        = stk_base;\
    stk_end    = stk_base + msa->stack_n;\
  }\
  else {\
    alloc_addr = (char* )xalloca(sizeof(char*) * (ptr_num)\
                       + sizeof(StackType) * (stack_num));\
    stk_alloc  = (StackType* )(alloc_addr + sizeof(char*) * (ptr_num));\
    stk_base   = stk_alloc;\
    stk        = stk_base;\
    stk_end    = stk_base + (stack_num);\
  }\
} while(0)

#define STACK_SAVE do{\
  if (stk_base != stk_alloc) {\
    msa->stack_p = stk_base;\
    msa->stack_n = stk_end - stk_base;\
  };\
} while(0)

static unsigned int MatchStackLimitSize = DEFAULT_MATCH_STACK_LIMIT_SIZE;

extern unsigned int
onig_get_match_stack_limit_size(void)
{
  return MatchStackLimitSize;
}

extern int
onig_set_match_stack_limit_size(unsigned int size)
{
  MatchStackLimitSize = size;
  return 0;
}

static int
stack_double(StackType** arg_stk_base, StackType** arg_stk_end,
             StackType** arg_stk, StackType* stk_alloc, MatchArg* msa)
{
  unsigned int n;
  StackType *x, *stk_base, *stk_end, *stk;

  stk_base = *arg_stk_base;
  stk_end  = *arg_stk_end;
  stk      = *arg_stk;

  n = stk_end - stk_base;
  if (stk_base == stk_alloc && IS_NULL(msa->stack_p)) {
    x = (StackType* )xmalloc(sizeof(StackType) * n * 2);
    if (IS_NULL(x)) {
      STACK_SAVE;
      return ONIGERR_MEMORY;
    }
    xmemcpy(x, stk_base, n * sizeof(StackType));
    n *= 2;
  }
  else {
    n *= 2;
    if (MatchStackLimitSize != 0 && n > MatchStackLimitSize) {
      if ((unsigned int )(stk_end - stk_base) == MatchStackLimitSize)
        return ONIGERR_MATCH_STACK_LIMIT_OVER;
      else
        n = MatchStackLimitSize;
    }
    x = (StackType* )xrealloc(stk_base, sizeof(StackType) * n);
    if (IS_NULL(x)) {
      STACK_SAVE;
      return ONIGERR_MEMORY;
    }
  }
  *arg_stk      = x + (stk - stk_base);
  *arg_stk_base = x;
  *arg_stk_end  = x + n;
  return 0;
}

#define STACK_ENSURE(n) do {\
  if (stk_end - stk < (n)) {\
    int r = stack_double(&stk_base, &stk_end, &stk, stk_alloc, msa);\
    if (r != 0) { STACK_SAVE; return r; } \
  }\
} while(0)

#define STACK_AT(index)        (stk_base + (index))
#define GET_STACK_INDEX(stk)   ((stk) - stk_base)

#define STACK_PUSH(stack_type,pat,s,sprev) do {\
  STACK_ENSURE(1);\
  stk->type = (stack_type);\
  stk->u.state.pcode     = (pat);\
  stk->u.state.pstr      = (s);\
  stk->u.state.pstr_prev = (sprev);\
  STACK_INC;\
} while(0)

#define STACK_PUSH_ENSURED(stack_type,pat) do {\
  stk->type = (stack_type);\
  stk->u.state.pcode = (pat);\
  STACK_INC;\
} while(0)

#define STACK_PUSH_TYPE(stack_type) do {\
  STACK_ENSURE(1);\
  stk->type = (stack_type);\
  STACK_INC;\
} while(0)

#define STACK_PUSH_ALT(pat,s,sprev)     STACK_PUSH(STK_ALT,pat,s,sprev)
#define STACK_PUSH_POS(s,sprev)         STACK_PUSH(STK_POS,NULL_UCHARP,s,sprev)
#define STACK_PUSH_POS_NOT(pat,s,sprev) STACK_PUSH(STK_POS_NOT,pat,s,sprev)
#define STACK_PUSH_STOP_BT              STACK_PUSH_TYPE(STK_STOP_BT)
#define STACK_PUSH_LOOK_BEHIND_NOT(pat,s,sprev) \
        STACK_PUSH(STK_LOOK_BEHIND_NOT,pat,s,sprev)

#define STACK_PUSH_REPEAT(id, pat) do {\
  STACK_ENSURE(1);\
  stk->type = STK_REPEAT;\
  stk->u.repeat.num    = (id);\
  stk->u.repeat.pcode  = (pat);\
  stk->u.repeat.count  = 0;\
  STACK_INC;\
} while(0)

#define STACK_PUSH_REPEAT_INC(sindex) do {\
  STACK_ENSURE(1);\
  stk->type = STK_REPEAT_INC;\
  stk->u.repeat_inc.si  = (sindex);\
  STACK_INC;\
} while(0)

#define STACK_PUSH_MEM_START(mnum, s) do {\
  STACK_ENSURE(1);\
  stk->type = STK_MEM_START;\
  stk->u.mem.num      = (mnum);\
  stk->u.mem.pstr     = (s);\
  stk->u.mem.start    = mem_start_stk[mnum];\
  stk->u.mem.end      = mem_end_stk[mnum];\
  mem_start_stk[mnum] = GET_STACK_INDEX(stk);\
  mem_end_stk[mnum]   = INVALID_STACK_INDEX;\
  STACK_INC;\
} while(0)

#define STACK_PUSH_MEM_END(mnum, s) do {\
  STACK_ENSURE(1);\
  stk->type = STK_MEM_END;\
  stk->u.mem.num    = (mnum);\
  stk->u.mem.pstr   = (s);\
  stk->u.mem.start  = mem_start_stk[mnum];\
  stk->u.mem.end    = mem_end_stk[mnum];\
  mem_end_stk[mnum] = GET_STACK_INDEX(stk);\
  STACK_INC;\
} while(0)

#define STACK_PUSH_MEM_END_MARK(mnum) do {\
  STACK_ENSURE(1);\
  stk->type = STK_MEM_END_MARK;\
  stk->u.mem.num = (mnum);\
  STACK_INC;\
} while(0)

#define STACK_GET_MEM_START(mnum, k) do {\
  int level = 0;\
  k = stk;\
  while (k > stk_base) {\
    k--;\
    if ((k->type == STK_MEM_END_MARK || k->type == STK_MEM_END) \
      && k->u.mem.num == (mnum)) {\
      level++;\
    }\
    else if (k->type == STK_MEM_START && k->u.mem.num == (mnum)) {\
      if (level == 0) break;\
      level--;\
    }\
  }\
} while (0)

#define STACK_GET_MEM_RANGE(k, mnum, start, end) do {\
  int level = 0;\
  while (k < stk) {\
    if (k->type == STK_MEM_START && k->u.mem.num == (mnum)) {\
      if (level == 0) (start) = k->u.mem.pstr;\
      level++;\
    }\
    else if (k->type == STK_MEM_END && k->u.mem.num == (mnum)) {\
      level--;\
      if (level == 0) {\
        (end) = k->u.mem.pstr;\
        break;\
      }\
    }\
    k++;\
  }\
} while (0)

#define STACK_PUSH_NULL_CHECK_START(cnum, s) do {\
  STACK_ENSURE(1);\
  stk->type = STK_NULL_CHECK_START;\
  stk->u.null_check.num  = (cnum);\
  stk->u.null_check.pstr = (s);\
  STACK_INC;\
} while(0)

#define STACK_PUSH_NULL_CHECK_END(cnum) do {\
  STACK_ENSURE(1);\
  stk->type = STK_NULL_CHECK_END;\
  stk->u.null_check.num  = (cnum);\
  STACK_INC;\
} while(0)

#define STACK_PUSH_CALL_FRAME(pat) do {\
  STACK_ENSURE(1);\
  stk->type = STK_CALL_FRAME;\
  stk->u.call_frame.ret_addr = (pat);\
  STACK_INC;\
} while(0)

#define STACK_PUSH_RETURN do {\
  STACK_ENSURE(1);\
  stk->type = STK_RETURN;\
  STACK_INC;\
} while(0)

#ifdef ONIG_DEBUG
#define STACK_BASE_CHECK(p) \
  if ((p) < stk_base)  goto stack_error;
#else
#define STACK_BASE_CHECK(p)
#endif

#define STACK_POP_ONE do {\
  stk--;\
  STACK_BASE_CHECK(stk); \
} while(0)

#define STACK_POP  do {\
  switch (pop_level) {\
  case STACK_POP_LEVEL_FREE:\
    while (1) {\
      stk--;\
      STACK_BASE_CHECK(stk); \
      if ((stk->type & STK_MASK_POP_USED) != 0)  break;\
    }\
    break;\
  case STACK_POP_LEVEL_MEM_START:\
    while (1) {\
      stk--;\
      STACK_BASE_CHECK(stk); \
      if ((stk->type & STK_MASK_POP_USED) != 0)  break;\
      else if (stk->type == STK_MEM_START) {\
        mem_start_stk[stk->u.mem.num] = stk->u.mem.start;\
        mem_end_stk[stk->u.mem.num]   = stk->u.mem.end;\
      }\
    }\
    break;\
  default:\
    while (1) {\
      stk--;\
      STACK_BASE_CHECK(stk); \
      if ((stk->type & STK_MASK_POP_USED) != 0)  break;\
      else if (stk->type == STK_MEM_START) {\
        mem_start_stk[stk->u.mem.num] = stk->u.mem.start;\
        mem_end_stk[stk->u.mem.num]   = stk->u.mem.end;\
      }\
      else if (stk->type == STK_REPEAT_INC) {\
        STACK_AT(stk->u.repeat_inc.si)->u.repeat.count--;\
      }\
      else if (stk->type == STK_MEM_END) {\
        mem_start_stk[stk->u.mem.num] = stk->u.mem.start;\
        mem_end_stk[stk->u.mem.num]   = stk->u.mem.end;\
      }\
    }\
    break;\
  }\
} while(0)

#define STACK_POP_TIL_POS_NOT  do {\
  while (1) {\
    stk--;\
    STACK_BASE_CHECK(stk); \
    if (stk->type == STK_POS_NOT) break;\
    else if (stk->type == STK_MEM_START) {\
      mem_start_stk[stk->u.mem.num] = stk->u.mem.start;\
      mem_end_stk[stk->u.mem.num]   = stk->u.mem.end;\
    }\
    else if (stk->type == STK_REPEAT_INC) {\
      STACK_AT(stk->u.repeat_inc.si)->u.repeat.count--;\
    }\
    else if (stk->type == STK_MEM_END) {\
      mem_start_stk[stk->u.mem.num] = stk->u.mem.start;\
      mem_end_stk[stk->u.mem.num]   = stk->u.mem.end;\
    }\
  }\
} while(0)

#define STACK_POP_TIL_LOOK_BEHIND_NOT  do {\
  while (1) {\
    stk--;\
    STACK_BASE_CHECK(stk); \
    if (stk->type == STK_LOOK_BEHIND_NOT) break;\
    else if (stk->type == STK_MEM_START) {\
      mem_start_stk[stk->u.mem.num] = stk->u.mem.start;\
      mem_end_stk[stk->u.mem.num]   = stk->u.mem.end;\
    }\
    else if (stk->type == STK_REPEAT_INC) {\
      STACK_AT(stk->u.repeat_inc.si)->u.repeat.count--;\
    }\
    else if (stk->type == STK_MEM_END) {\
      mem_start_stk[stk->u.mem.num] = stk->u.mem.start;\
      mem_end_stk[stk->u.mem.num]   = stk->u.mem.end;\
    }\
  }\
} while(0)

#define STACK_POS_END(k) do {\
  k = stk;\
  while (1) {\
    k--;\
    STACK_BASE_CHECK(k); \
    if (IS_TO_VOID_TARGET(k)) {\
      k->type = STK_VOID;\
    }\
    else if (k->type == STK_POS) {\
      k->type = STK_VOID;\
      break;\
    }\
  }\
} while(0)

#define STACK_STOP_BT_END do {\
  StackType *k = stk;\
  while (1) {\
    k--;\
    STACK_BASE_CHECK(k); \
    if (IS_TO_VOID_TARGET(k)) {\
      k->type = STK_VOID;\
    }\
    else if (k->type == STK_STOP_BT) {\
      k->type = STK_VOID;\
      break;\
    }\
  }\
} while(0)

#define STACK_NULL_CHECK(isnull,id,s) do {\
  StackType* k = stk;\
  while (1) {\
    k--;\
    STACK_BASE_CHECK(k); \
    if (k->type == STK_NULL_CHECK_START) {\
      if (k->u.null_check.num == (id)) {\
        (isnull) = (k->u.null_check.pstr == (s));\
        break;\
      }\
    }\
  }\
} while(0)

#define STACK_NULL_CHECK_REC(isnull,id,s) do {\
  int level = 0;\
  StackType* k = stk;\
  while (1) {\
    k--;\
    STACK_BASE_CHECK(k); \
    if (k->type == STK_NULL_CHECK_START) {\
      if (k->u.null_check.num == (id)) {\
        if (level == 0) {\
          (isnull) = (k->u.null_check.pstr == (s));\
          break;\
        }\
        else level--;\
      }\
    }\
    else if (k->type == STK_NULL_CHECK_END) {\
      level++;\
    }\
  }\
} while(0)

#define STACK_NULL_CHECK_MEMST(isnull,id,s,reg) do {\
  StackType* k = stk;\
  while (1) {\
    k--;\
    STACK_BASE_CHECK(k); \
    if (k->type == STK_NULL_CHECK_START) {\
      if (k->u.null_check.num == (id)) {\
        if (k->u.null_check.pstr != (s)) {\
          (isnull) = 0;\
          break;\
        }\
        else {\
          UChar* endp;\
          (isnull) = 1;\
          while (k < stk) {\
            if (k->type == STK_MEM_START) {\
              if (k->u.mem.end == INVALID_STACK_INDEX) {\
                (isnull) = 0; break;\
              }\
              if (BIT_STATUS_AT(reg->bt_mem_end, k->u.mem.num))\
                endp = STACK_AT(k->u.mem.end)->u.mem.pstr;\
              else\
                endp = (UChar* )k->u.mem.end;\
              if (STACK_AT(k->u.mem.start)->u.mem.pstr != endp) {\
                (isnull) = 0; break;\
              }\
              else if (endp != s) {\
                (isnull) = -1; /* empty, but position changed */ \
              }\
            }\
            k++;\
          }\
          break;\
        }\
      }\
    }\
  }\
} while(0)

#define STACK_NULL_CHECK_MEMST_REC(isnull,id,s,reg) do {\
  int level = 0;\
  StackType* k = stk;\
  while (1) {\
    k--;\
    STACK_BASE_CHECK(k); \
    if (k->type == STK_NULL_CHECK_START) {\
      if (k->u.null_check.num == (id)) {\
        if (level == 0) {\
          if (k->u.null_check.pstr != (s)) {\
            (isnull) = 0;\
            break;\
          }\
          else {\
            UChar* endp;\
            (isnull) = 1;\
            while (k < stk) {\
              if (k->type == STK_MEM_START) {\
                if (k->u.mem.end == INVALID_STACK_INDEX) {\
                  (isnull) = 0; break;\
                }\
                if (BIT_STATUS_AT(reg->bt_mem_end, k->u.mem.num))\
                  endp = STACK_AT(k->u.mem.end)->u.mem.pstr;\
                else\
                  endp = (UChar* )k->u.mem.end;\
                if (STACK_AT(k->u.mem.start)->u.mem.pstr != endp) {\
                  (isnull) = 0; break;\
                }\
                else if (endp != s) {\
                  (isnull) = -1; /* empty, but position changed */ \
                }\
              }\
              k++;\
            }\
            break;\
          }\
        }\
        else {\
          level--;\
        }\
      }\
    }\
    else if (k->type == STK_NULL_CHECK_END) {\
      if (k->u.null_check.num == (id)) level++;\
    }\
  }\
} while(0)

#define STACK_GET_REPEAT(id, k) do {\
  int level = 0;\
  k = stk;\
  while (1) {\
    k--;\
    STACK_BASE_CHECK(k); \
    if (k->type == STK_REPEAT) {\
      if (level == 0) {\
        if (k->u.repeat.num == (id)) {\
          break;\
        }\
      }\
    }\
    else if (k->type == STK_CALL_FRAME) level--;\
    else if (k->type == STK_RETURN)     level++;\
  }\
} while (0)

#define STACK_RETURN(addr)  do {\
  int level = 0;\
  StackType* k = stk;\
  while (1) {\
    k--;\
    STACK_BASE_CHECK(k); \
    if (k->type == STK_CALL_FRAME) {\
      if (level == 0) {\
        (addr) = k->u.call_frame.ret_addr;\
        break;\
      }\
      else level--;\
    }\
    else if (k->type == STK_RETURN)\
      level++;\
  }\
} while(0)

#define STRING_CMP(s1,s2,len) do {\
  while (len-- > 0) {\
    if (*s1++ != *s2++) goto fail;\
  }\
} while(0)

#define STRING_CMP_IC(ambig_flag,s1,ps2,len) do {\
  if (string_cmp_ic(encode, ambig_flag, s1, ps2, len) == 0) \
    goto fail; \
} while(0)

static int string_cmp_ic(OnigEncoding enc, int ambig_flag,
                         UChar* s1, UChar** ps2, int mblen)
{
  UChar buf1[ONIGENC_MBC_NORMALIZE_MAXLEN];
  UChar buf2[ONIGENC_MBC_NORMALIZE_MAXLEN];
  UChar *p1, *p2, *end, *s2, *end2;
  int len1, len2;

  s2   = *ps2;
  end  = s1 + mblen;
  end2 = s2 + mblen;
  while (s1 < end) {
    len1 = ONIGENC_MBC_TO_NORMALIZE(enc, ambig_flag, &s1, end, buf1);
    len2 = ONIGENC_MBC_TO_NORMALIZE(enc, ambig_flag, &s2, end2, buf2);
    if (len1 != len2) return 0;
    p1 = buf1;
    p2 = buf2;
    while (len1-- > 0) {
      if (*p1 != *p2) return 0;
      p1++;
      p2++;
    }
  }

  *ps2 = s2;
  return 1;
}

#define STRING_CMP_VALUE(s1,s2,len,is_fail) do {\
  is_fail = 0;\
  while (len-- > 0) {\
    if (*s1++ != *s2++) {\
      is_fail = 1; break;\
    }\
  }\
} while(0)

#define STRING_CMP_VALUE_IC(ambig_flag,s1,ps2,len,is_fail) do {\
  if (string_cmp_ic(encode, ambig_flag, s1, ps2, len) == 0) \
    is_fail = 1; \
  else \
    is_fail = 0; \
} while(0)

#define ON_STR_BEGIN(s)  ((s) == str)
#define ON_STR_END(s)    ((s) == end)
#define IS_EMPTY_STR     (str == end)

#define DATA_ENSURE(n) \
  if (s + (n) > end) goto fail

#define DATA_ENSURE_CHECK(n)   (s + (n) <= end)

#ifdef USE_CAPTURE_HISTORY
static int
make_capture_history_tree(OnigCaptureTreeNode* node, StackType** kp,
                          StackType* stk_top, UChar* str, regex_t* reg)
{
  int n, r;
  OnigCaptureTreeNode* child;
  StackType* k = *kp;

  while (k < stk_top) {
    if (k->type == STK_MEM_START) {
      n = k->u.mem.num;
      if (n <= ONIG_MAX_CAPTURE_HISTORY_GROUP &&
          BIT_STATUS_AT(reg->capture_history, n) != 0) {
        child = history_node_new();
        CHECK_NULL_RETURN_VAL(child, ONIGERR_MEMORY);
        child->group = n;
        child->beg = (int )(k->u.mem.pstr - str);
        r = history_tree_add_child(node, child);
        if (r != 0) return r;
        *kp = (k + 1);
        r = make_capture_history_tree(child, kp, stk_top, str, reg);
        if (r != 0) return r;

        k = *kp;
        child->end = (int )(k->u.mem.pstr - str);
      }
    }
    else if (k->type == STK_MEM_END) {
      if (k->u.mem.num == node->group) {
        node->end = (int )(k->u.mem.pstr - str);
        *kp = k;
        return 0;
      }
    }
    k++;
  }

  return 1; /* 1: root node ending. */
}
#endif

#ifdef RUBY_PLATFORM

typedef struct {
  int state;
  regex_t*  reg;
  MatchArg* msa;
  StackType* stk_base;
} TrapEnsureArg;

static VALUE
trap_ensure(VALUE arg)
{
  TrapEnsureArg* ta = (TrapEnsureArg* )arg;

  if (ta->state == 0) { /* trap_exec() is not normal return */
    ONIG_STATE_DEC(ta->reg);
    if (! IS_NULL(ta->msa->stack_p) && ta->stk_base != ta->msa->stack_p)
      xfree(ta->stk_base);

    MATCH_ARG_FREE(*(ta->msa));
  }

  return Qnil;
}

static VALUE
trap_exec(VALUE arg)
{
  TrapEnsureArg* ta;

  rb_trap_exec();

  ta = (TrapEnsureArg* )arg;
  ta->state = 1; /* normal return */
  return Qnil;
}

extern void
onig_exec_trap(regex_t* reg, MatchArg* msa, StackType* stk_base)
{
  VALUE arg;
  TrapEnsureArg ta;

  ta.state    = 0;
  ta.reg      = reg;
  ta.msa      = msa;
  ta.stk_base = stk_base;
  arg = (VALUE )(&ta);
  rb_ensure(trap_exec, arg, trap_ensure, arg);
}

#define CHECK_INTERRUPT_IN_MATCH_AT do {\
  if (rb_trap_pending) {\
    if (! rb_prohibit_interrupt) {\
      onig_exec_trap(reg, msa, stk_base);\
    }\
  }\
} while (0)
#else
#define CHECK_INTERRUPT_IN_MATCH_AT
#endif /* RUBY_PLATFORM */

#ifdef ONIG_DEBUG_STATISTICS

#define USE_TIMEOFDAY

#ifdef USE_TIMEOFDAY
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
static struct timeval ts, te;
#define GETTIME(t)        gettimeofday(&(t), (struct timezone* )0)
#define TIMEDIFF(te,ts)   (((te).tv_usec - (ts).tv_usec) + \
                           (((te).tv_sec - (ts).tv_sec)*1000000))
#else
#ifdef HAVE_SYS_TIMES_H
#include <sys/times.h>
#endif
static struct tms ts, te;
#define GETTIME(t)         times(&(t))
#define TIMEDIFF(te,ts)   ((te).tms_utime - (ts).tms_utime)
#endif

static int OpCounter[256];
static int OpPrevCounter[256];
static unsigned long OpTime[256];
static int OpCurr = OP_FINISH;
static int OpPrevTarget = OP_FAIL;
static int MaxStackDepth = 0;

#define STAT_OP_IN(opcode) do {\
  if (opcode == OpPrevTarget) OpPrevCounter[OpCurr]++;\
  OpCurr = opcode;\
  OpCounter[opcode]++;\
  GETTIME(ts);\
} while (0)

#define STAT_OP_OUT do {\
  GETTIME(te);\
  OpTime[OpCurr] += TIMEDIFF(te, ts);\
} while (0)

#ifdef RUBY_PLATFORM

/*
 * :nodoc:
 */
static VALUE onig_stat_print()
{
  onig_print_statistics(stderr);
  return Qnil;
}
#endif

extern void onig_statistics_init()
{
  int i;
  for (i = 0; i < 256; i++) {
    OpCounter[i] = OpPrevCounter[i] = 0; OpTime[i] = 0;
  }
  MaxStackDepth = 0;

#ifdef RUBY_PLATFORM
  rb_define_global_function("onig_stat_print", onig_stat_print, 0);
#endif
}

extern void
onig_print_statistics(FILE* f)
{
  int i;
  fprintf(f, "   count      prev        time\n");
  for (i = 0; OnigOpInfo[i].opcode >= 0; i++) {
    fprintf(f, "%8d: %8d: %10ld: %s\n",
            OpCounter[i], OpPrevCounter[i], OpTime[i], OnigOpInfo[i].name);
  }
  fprintf(f, "\nmax stack depth: %d\n", MaxStackDepth);
}

#define STACK_INC do {\
  stk++;\
  if (stk - stk_base > MaxStackDepth) \
    MaxStackDepth = stk - stk_base;\
} while (0)

#else
#define STACK_INC     stk++

#define STAT_OP_IN(opcode)
#define STAT_OP_OUT
#endif

extern int
onig_is_in_code_range(const UChar* p, OnigCodePoint code)
{
  OnigCodePoint n, *data;
  OnigCodePoint low, high, x;

  GET_CODE_POINT(n, p);
  data = (OnigCodePoint* )p;
  data++;

  for (low = 0, high = n; low < high; ) {
    x = (low + high) >> 1;
    if (code > data[x * 2 + 1])
      low = x + 1;
    else
      high = x;
  }

  return ((low < n && code >= data[low * 2]) ? 1 : 0);
}

static int
code_is_in_cclass_node(void* node, OnigCodePoint code, int enclen)
{
  unsigned int in_cc;
  CClassNode* cc = (CClassNode* )node;

  if (enclen == 1 && code < SINGLE_BYTE_SIZE) {
    in_cc = BITSET_AT(cc->bs, code);
  }
  else {
    UChar* p = ((BBuf* )(cc->mbuf))->p;
    in_cc = onig_is_in_code_range(p, code);
  }

  if (IS_CCLASS_NOT(cc)) {
    return (in_cc ? 0 : 1);
  }
  else {
    return (in_cc ? 1 : 0);
  }
}

/* matching region of POSIX API */
typedef int regoff_t;

typedef struct {
  regoff_t  rm_so;
  regoff_t  rm_eo;
} posix_regmatch_t;

/* match data(str - end) from position (sstart). */
/* if sstart == str then set sprev to NULL. */
static int
match_at(regex_t* reg, const UChar* str, const UChar* end, const UChar* sstart,
         UChar* sprev, MatchArg* msa)
{
  static UChar FinishCode[] = { OP_FINISH };

  int i, n, num_mem, best_len, pop_level;
  LengthType tlen, tlen2;
  MemNumType mem;
  RelAddrType addr;
  OnigOptionType option = reg->options;
  OnigEncoding encode = reg->enc;
  OnigAmbigType ambig_flag = reg->ambig_flag;
  UChar *s, *q, *sbegin;
  UChar *p = reg->p;
  char *alloca_base;
  StackType *stk_alloc, *stk_base, *stk, *stk_end;
  StackType *stkp; /* used as any purpose. */
  StackIndex si;
  StackIndex *repeat_stk;
  StackIndex *mem_start_stk, *mem_end_stk;
  n = reg->num_repeat + reg->num_mem * 2;

  STACK_INIT(alloca_base, n, INIT_MATCH_STACK_SIZE);
  pop_level = reg->stack_pop_level;
  num_mem = reg->num_mem;
  repeat_stk = (StackIndex* )alloca_base;

  mem_start_stk = (StackIndex* )(repeat_stk + reg->num_repeat);
  mem_end_stk   = mem_start_stk + num_mem;
  mem_start_stk--; /* for index start from 1,
                      mem_start_stk[1]..mem_start_stk[num_mem] */
  mem_end_stk--;   /* for index start from 1,
                      mem_end_stk[1]..mem_end_stk[num_mem] */
  for (i = 1; i <= num_mem; i++) {
    mem_start_stk[i] = mem_end_stk[i] = INVALID_STACK_INDEX;
  }

#ifdef ONIG_DEBUG_MATCH
  fprintf(stderr, "match_at: str: %d, end: %d, start: %d, sprev: %d\n",
          (int )str, (int )end, (int )sstart, (int )sprev);
  fprintf(stderr, "size: %d, start offset: %d\n",
          (int )(end - str), (int )(sstart - str));
#endif

  STACK_PUSH_ENSURED(STK_ALT, FinishCode);  /* bottom stack */
  best_len = ONIG_MISMATCH;
  s = (UChar* )sstart;
  while (1) {
#ifdef ONIG_DEBUG_MATCH
    {
      UChar *q, *bp, buf[50];
      int len;
      fprintf(stderr, "%4d> \"", (int )(s - str));
      bp = buf;
      for (i = 0, q = s; i < 7 && q < end; i++) {
        len = enc_len(encode, q);
        while (len-- > 0) *bp++ = *q++;
      }
      if (q < end) { xmemcpy(bp, "...\"", 4); bp += 4; }
      else         { xmemcpy(bp, "\"",    1); bp += 1; }
      *bp = 0;
      fputs(buf, stderr);
      for (i = 0; i < 20 - (bp - buf); i++) fputc(' ', stderr);
      onig_print_compiled_byte_code(stderr, p, NULL, encode);
      fprintf(stderr, "\n");
    }
#endif

    sbegin = s;
    switch (*p++) {
    case OP_END:  STAT_OP_IN(OP_END);
      n = s - sstart;
      if (n > best_len) {
        OnigRegion* region = msa->region;
        best_len = n;
        if (region) {
#ifdef USE_POSIX_REGION_OPTION
          if (IS_POSIX_REGION(msa->options)) {
            posix_regmatch_t* rmt = (posix_regmatch_t* )region;

            rmt[0].rm_so = sstart - str;
            rmt[0].rm_eo = s      - str;
            for (i = 1; i <= num_mem; i++) {
              if (mem_end_stk[i] != INVALID_STACK_INDEX) {
                if (BIT_STATUS_AT(reg->bt_mem_start, i))
                  rmt[i].rm_so = STACK_AT(mem_start_stk[i])->u.mem.pstr - str;
                else
                  rmt[i].rm_so = (UChar* )((void* )(mem_start_stk[i])) - str;

                rmt[i].rm_eo = (BIT_STATUS_AT(reg->bt_mem_end, i)
                                ? STACK_AT(mem_end_stk[i])->u.mem.pstr
                                : (UChar* )((void* )mem_end_stk[i])) - str;
              }
              else {
                rmt[i].rm_so = rmt[i].rm_eo = ONIG_REGION_NOTPOS;
              }
            }
          }
          else {
#endif /* USE_POSIX_REGION_OPTION */
            region->beg[0] = sstart - str;
            region->end[0] = s      - str;
            for (i = 1; i <= num_mem; i++) {
              if (mem_end_stk[i] != INVALID_STACK_INDEX) {
                if (BIT_STATUS_AT(reg->bt_mem_start, i))
                  region->beg[i] = STACK_AT(mem_start_stk[i])->u.mem.pstr - str;
                else
                  region->beg[i] = (UChar* )((void* )mem_start_stk[i]) - str;

                region->end[i] = (BIT_STATUS_AT(reg->bt_mem_end, i)
                                  ? STACK_AT(mem_end_stk[i])->u.mem.pstr
                                  : (UChar* )((void* )mem_end_stk[i])) - str;
              }
              else {
                region->beg[i] = region->end[i] = ONIG_REGION_NOTPOS;
              }
            }

#ifdef USE_CAPTURE_HISTORY
            if (reg->capture_history != 0) {
              int r;
              OnigCaptureTreeNode* node;

              if (IS_NULL(region->history_root)) {
                region->history_root = node = history_node_new();
                CHECK_NULL_RETURN_VAL(node, ONIGERR_MEMORY);
              }
              else {
                node = region->history_root;
                history_tree_clear(node);
              }

              node->group = 0;
              node->beg   = sstart - str;
              node->end   = s      - str;

              stkp = stk_base;
              r = make_capture_history_tree(region->history_root, &stkp,
                                            stk, (UChar* )str, reg);
              if (r < 0) {
                best_len = r; /* error code */
                goto finish;
              }
            }
#endif /* USE_CAPTURE_HISTORY */
#ifdef USE_POSIX_REGION_OPTION
          } /* else IS_POSIX_REGION() */
#endif
        } /* if (region) */
      } /* n > best_len */
      STAT_OP_OUT;

      if (IS_FIND_CONDITION(option)) {
        if (IS_FIND_NOT_EMPTY(option) && s == sstart) {
          best_len = ONIG_MISMATCH;
          goto fail; /* for retry */
        }
        if (IS_FIND_LONGEST(option) && s < end) {
          goto fail; /* for retry */
        }
      }

      /* default behavior: return first-matching result. */
      goto finish;
      break;

    case OP_EXACT1:  STAT_OP_IN(OP_EXACT1);
#if 0
      DATA_ENSURE(1);
      if (*p != *s) goto fail;
      p++; s++;
#endif
      if (*p != *s++) goto fail;
      DATA_ENSURE(0);
      p++;
      STAT_OP_OUT;
      break;

    case OP_EXACT1_IC:  STAT_OP_IN(OP_EXACT1_IC);
      {
        int len;
        UChar *q, *ss, *sp, lowbuf[ONIGENC_MBC_NORMALIZE_MAXLEN];

        DATA_ENSURE(1);
        ss = s;
        sp = p;

      exact1_ic_retry:
        len = ONIGENC_MBC_TO_NORMALIZE(encode, ambig_flag, &s, end, lowbuf);
        DATA_ENSURE(0);
        q = lowbuf;
        while (len-- > 0) {
          if (*p != *q) {
#if 1
            if ((ambig_flag & ONIGENC_AMBIGUOUS_MATCH_COMPOUND) != 0) {
              ambig_flag &= ~ONIGENC_AMBIGUOUS_MATCH_COMPOUND;
              s = ss;
              p = sp;
              goto exact1_ic_retry;
            }
            else
              goto fail;
#else
            goto fail;
#endif
          }
          p++; q++;
        }
      }
      STAT_OP_OUT;
      break;

    case OP_EXACT2:  STAT_OP_IN(OP_EXACT2);
      DATA_ENSURE(2);
      if (*p != *s) goto fail;
      p++; s++;
      if (*p != *s) goto fail;
      sprev = s;
      p++; s++;
      STAT_OP_OUT;
      continue;
      break;

    case OP_EXACT3:  STAT_OP_IN(OP_EXACT3);
      DATA_ENSURE(3);
      if (*p != *s) goto fail;
      p++; s++;
      if (*p != *s) goto fail;
      p++; s++;
      if (*p != *s) goto fail;
      sprev = s;
      p++; s++;
      STAT_OP_OUT;
      continue;
      break;

    case OP_EXACT4:  STAT_OP_IN(OP_EXACT4);
      DATA_ENSURE(4);
      if (*p != *s) goto fail;
      p++; s++;
      if (*p != *s) goto fail;
      p++; s++;
      if (*p != *s) goto fail;
      p++; s++;
      if (*p != *s) goto fail;
      sprev = s;
      p++; s++;
      STAT_OP_OUT;
      continue;
      break;

    case OP_EXACT5:  STAT_OP_IN(OP_EXACT5);
      DATA_ENSURE(5);
      if (*p != *s) goto fail;
      p++; s++;
      if (*p != *s) goto fail;
      p++; s++;
      if (*p != *s) goto fail;
      p++; s++;
      if (*p != *s) goto fail;
      p++; s++;
      if (*p != *s) goto fail;
      sprev = s;
      p++; s++;
      STAT_OP_OUT;
      continue;
      break;

    case OP_EXACTN:  STAT_OP_IN(OP_EXACTN);
      GET_LENGTH_INC(tlen, p);
      DATA_ENSURE(tlen);
      while (tlen-- > 0) {
        if (*p++ != *s++) goto fail;
      }
      sprev = s - 1;
      STAT_OP_OUT;
      continue;
      break;

    case OP_EXACTN_IC:  STAT_OP_IN(OP_EXACTN_IC);
      {
        int len;
        UChar *ss, *sp, *q, *endp, lowbuf[ONIGENC_MBC_NORMALIZE_MAXLEN];

        GET_LENGTH_INC(tlen, p);
        endp = p + tlen;

        while (p < endp) {
          sprev = s;
          DATA_ENSURE(1);
          ss = s;
          sp = p;

        exactn_ic_retry:
          len = ONIGENC_MBC_TO_NORMALIZE(encode, ambig_flag, &s, end, lowbuf);
          DATA_ENSURE(0);
          q = lowbuf;
          while (len-- > 0) {
            if (*p != *q) {
#if 1
              if ((ambig_flag & ONIGENC_AMBIGUOUS_MATCH_COMPOUND) != 0) {
                ambig_flag &= ~ONIGENC_AMBIGUOUS_MATCH_COMPOUND;
                s = ss;
                p = sp;
                goto exactn_ic_retry;
              }
              else
                goto fail;
#else
              goto fail;
#endif
            }
            p++; q++;
          }
        }
      }

      STAT_OP_OUT;
      continue;
      break;

    case OP_EXACTMB2N1:  STAT_OP_IN(OP_EXACTMB2N1);
      DATA_ENSURE(2);
      if (*p != *s) goto fail;
      p++; s++;
      if (*p != *s) goto fail;
      p++; s++;
      STAT_OP_OUT;
      break;

    case OP_EXACTMB2N2:  STAT_OP_IN(OP_EXACTMB2N2);
      DATA_ENSURE(4);
      if (*p != *s) goto fail;
      p++; s++;
      if (*p != *s) goto fail;
      p++; s++;
      sprev = s;
      if (*p != *s) goto fail;
      p++; s++;
      if (*p != *s) goto fail;
      p++; s++;
      STAT_OP_OUT;
      continue;
      break;

    case OP_EXACTMB2N3:  STAT_OP_IN(OP_EXACTMB2N3);
      DATA_ENSURE(6);
      if (*p != *s) goto fail;
      p++; s++;
      if (*p != *s) goto fail;
      p++; s++;
      if (*p != *s) goto fail;
      p++; s++;
      if (*p != *s) goto fail;
      p++; s++;
      sprev = s;
      if (*p != *s) goto fail;
      p++; s++;
      if (*p != *s) goto fail;
      p++; s++;
      STAT_OP_OUT;
      continue;
      break;

    case OP_EXACTMB2N:  STAT_OP_IN(OP_EXACTMB2N);
      GET_LENGTH_INC(tlen, p);
      DATA_ENSURE(tlen * 2);
      while (tlen-- > 0) {
        if (*p != *s) goto fail;
        p++; s++;
        if (*p != *s) goto fail;
        p++; s++;
      }
      sprev = s - 2;
      STAT_OP_OUT;
      continue;
      break;

    case OP_EXACTMB3N:  STAT_OP_IN(OP_EXACTMB3N);
      GET_LENGTH_INC(tlen, p);
      DATA_ENSURE(tlen * 3);
      while (tlen-- > 0) {
        if (*p != *s) goto fail;
        p++; s++;
        if (*p != *s) goto fail;
        p++; s++;
        if (*p != *s) goto fail;
        p++; s++;
      }
      sprev = s - 3;
      STAT_OP_OUT;
      continue;
      break;

    case OP_EXACTMBN:  STAT_OP_IN(OP_EXACTMBN);
      GET_LENGTH_INC(tlen,  p);  /* mb-len */
      GET_LENGTH_INC(tlen2, p);  /* string len */
      tlen2 *= tlen;
      DATA_ENSURE(tlen2);
      while (tlen2-- > 0) {
        if (*p != *s) goto fail;
        p++; s++;
      }
      sprev = s - tlen;
      STAT_OP_OUT;
      continue;
      break;

    case OP_CCLASS:  STAT_OP_IN(OP_CCLASS);
      DATA_ENSURE(1);
      if (BITSET_AT(((BitSetRef )p), *s) == 0) goto fail;
      p += SIZE_BITSET;
      s += enc_len(encode, s);   /* OP_CCLASS can match mb-code. \D, \S */
      STAT_OP_OUT;
      break;

    case OP_CCLASS_MB:  STAT_OP_IN(OP_CCLASS_MB);
      if (! ONIGENC_IS_MBC_HEAD(encode, s)) goto fail;

    cclass_mb:
      GET_LENGTH_INC(tlen, p);
      {
        OnigCodePoint code;
        UChar *ss;
        int mb_len;

        DATA_ENSURE(1);
        mb_len = enc_len(encode, s);
        DATA_ENSURE(mb_len);
        ss = s;
        s += mb_len;
        code = ONIGENC_MBC_TO_CODE(encode, ss, s);

#ifdef PLATFORM_UNALIGNED_WORD_ACCESS
        if (! onig_is_in_code_range(p, code)) goto fail;
#else
        q = p;
        ALIGNMENT_RIGHT(q);
        if (! onig_is_in_code_range(q, code)) goto fail;
#endif
      }
      p += tlen;
      STAT_OP_OUT;
      break;

    case OP_CCLASS_MIX:  STAT_OP_IN(OP_CCLASS_MIX);
      DATA_ENSURE(1);
      if (ONIGENC_IS_MBC_HEAD(encode, s)) {
        p += SIZE_BITSET;
        goto cclass_mb;
      }
      else {
        if (BITSET_AT(((BitSetRef )p), *s) == 0)
          goto fail;

        p += SIZE_BITSET;
        GET_LENGTH_INC(tlen, p);
        p += tlen;
        s++;
      }
      STAT_OP_OUT;
      break;

    case OP_CCLASS_NOT:  STAT_OP_IN(OP_CCLASS_NOT);
      DATA_ENSURE(1);
      if (BITSET_AT(((BitSetRef )p), *s) != 0) goto fail;
      p += SIZE_BITSET;
      s += enc_len(encode, s);
      STAT_OP_OUT;
      break;

    case OP_CCLASS_MB_NOT:  STAT_OP_IN(OP_CCLASS_MB_NOT);
      DATA_ENSURE(1);
      if (! ONIGENC_IS_MBC_HEAD(encode, s)) {
        s++;
        GET_LENGTH_INC(tlen, p);
        p += tlen;
        goto cc_mb_not_success;
      }

    cclass_mb_not:
      GET_LENGTH_INC(tlen, p);
      {
        OnigCodePoint code;
        UChar *ss;
        int mb_len = enc_len(encode, s);

        if (s + mb_len > end) {
          DATA_ENSURE(1);
          s = (UChar* )end;
          p += tlen;
          goto cc_mb_not_success;
        }

        ss = s;
        s += mb_len;
        code = ONIGENC_MBC_TO_CODE(encode, ss, s);

#ifdef PLATFORM_UNALIGNED_WORD_ACCESS
        if (onig_is_in_code_range(p, code)) goto fail;
#else
        q = p;
        ALIGNMENT_RIGHT(q);
        if (onig_is_in_code_range(q, code)) goto fail;
#endif
      }
      p += tlen;

    cc_mb_not_success:
      STAT_OP_OUT;
      break;

    case OP_CCLASS_MIX_NOT:  STAT_OP_IN(OP_CCLASS_MIX_NOT);
      DATA_ENSURE(1);
      if (ONIGENC_IS_MBC_HEAD(encode, s)) {
        p += SIZE_BITSET;
        goto cclass_mb_not;
      }
      else {
        if (BITSET_AT(((BitSetRef )p), *s) != 0)
          goto fail;

        p += SIZE_BITSET;
        GET_LENGTH_INC(tlen, p);
        p += tlen;
        s++;
      }
      STAT_OP_OUT;
      break;

    case OP_CCLASS_NODE:  STAT_OP_IN(OP_CCLASS_NODE);
      {
        OnigCodePoint code;
        void *node;
        int mb_len;
        UChar *ss;

        DATA_ENSURE(1);
        GET_POINTER_INC(node, p);
        mb_len = enc_len(encode, s);
        ss = s;
        s += mb_len;
        code = ONIGENC_MBC_TO_CODE(encode, ss, s);
        if (code_is_in_cclass_node(node, code, mb_len) == 0) goto fail;
      }
      STAT_OP_OUT;
      break;

    case OP_ANYCHAR:  STAT_OP_IN(OP_ANYCHAR);
      DATA_ENSURE(1);
      n = enc_len(encode, s);
      DATA_ENSURE(n);
      if (ONIGENC_IS_MBC_NEWLINE(encode, s, end)) goto fail;
      s += n;
      STAT_OP_OUT;
      break;

    case OP_ANYCHAR_ML:  STAT_OP_IN(OP_ANYCHAR_ML);
      DATA_ENSURE(1);
      n = enc_len(encode, s);
      DATA_ENSURE(n);
      s += n;
      STAT_OP_OUT;
      break;

    case OP_ANYCHAR_STAR:  STAT_OP_IN(OP_ANYCHAR_STAR);
      while (s < end) {
        STACK_PUSH_ALT(p, s, sprev);
        n = enc_len(encode, s);
        DATA_ENSURE(n);
        if (ONIGENC_IS_MBC_NEWLINE(encode, s, end))  goto fail;
        sprev = s;
        s += n;
      }
      STAT_OP_OUT;
      break;

    case OP_ANYCHAR_ML_STAR:  STAT_OP_IN(OP_ANYCHAR_ML_STAR);
      while (s < end) {
        STACK_PUSH_ALT(p, s, sprev);
        n = enc_len(encode, s);
        if (n > 1) {
          DATA_ENSURE(n);
          sprev = s;
          s += n;
        }
        else {
          sprev = s;
          s++;
        }
      }
      STAT_OP_OUT;
      break;

    case OP_ANYCHAR_STAR_PEEK_NEXT:  STAT_OP_IN(OP_ANYCHAR_STAR_PEEK_NEXT);
      while (s < end) {
        if (*p == *s) {
          STACK_PUSH_ALT(p + 1, s, sprev);
        }
        n = enc_len(encode, s);
        DATA_ENSURE(n);
        if (ONIGENC_IS_MBC_NEWLINE(encode, s, end))  goto fail;
        sprev = s;
        s += n;
      }
      p++;
      STAT_OP_OUT;
      break;

    case OP_ANYCHAR_ML_STAR_PEEK_NEXT:STAT_OP_IN(OP_ANYCHAR_ML_STAR_PEEK_NEXT);
      while (s < end) {
        if (*p == *s) {
          STACK_PUSH_ALT(p + 1, s, sprev);
        }
        n = enc_len(encode, s);
        if (n >1) {
          DATA_ENSURE(n);
          sprev = s;
          s += n;
        }
        else {
          sprev = s;
          s++;
        }
      }
      p++;
      STAT_OP_OUT;
      break;

    case OP_WORD:  STAT_OP_IN(OP_WORD);
      DATA_ENSURE(1);
      if (! ONIGENC_IS_MBC_WORD(encode, s, end))
        goto fail;

      s += enc_len(encode, s);
      STAT_OP_OUT;
      break;

    case OP_NOT_WORD:  STAT_OP_IN(OP_NOT_WORD);
      DATA_ENSURE(1);
      if (ONIGENC_IS_MBC_WORD(encode, s, end))
        goto fail;

      s += enc_len(encode, s);
      STAT_OP_OUT;
      break;

    case OP_WORD_BOUND:  STAT_OP_IN(OP_WORD_BOUND);
      if (ON_STR_BEGIN(s)) {
        DATA_ENSURE(1);
        if (! ONIGENC_IS_MBC_WORD(encode, s, end))
          goto fail;
      }
      else if (ON_STR_END(s)) {
        if (! ONIGENC_IS_MBC_WORD(encode, sprev, end))
          goto fail;
      }
      else {
        if (ONIGENC_IS_MBC_WORD(encode, s, end)
            == ONIGENC_IS_MBC_WORD(encode, sprev, end))
          goto fail;
      }
      STAT_OP_OUT;
      continue;
      break;

    case OP_NOT_WORD_BOUND:  STAT_OP_IN(OP_NOT_WORD_BOUND);
      if (ON_STR_BEGIN(s)) {
        if (DATA_ENSURE_CHECK(1) && ONIGENC_IS_MBC_WORD(encode, s, end))
          goto fail;
      }
      else if (ON_STR_END(s)) {
        if (ONIGENC_IS_MBC_WORD(encode, sprev, end))
          goto fail;
      }
      else {
        if (ONIGENC_IS_MBC_WORD(encode, s, end)
            != ONIGENC_IS_MBC_WORD(encode, sprev, end))
          goto fail;
      }
      STAT_OP_OUT;
      continue;
      break;

#ifdef USE_WORD_BEGIN_END
    case OP_WORD_BEGIN:  STAT_OP_IN(OP_WORD_BEGIN);
      if (DATA_ENSURE_CHECK(1) && ONIGENC_IS_MBC_WORD(encode, s, end)) {
        if (ON_STR_BEGIN(s) || !ONIGENC_IS_MBC_WORD(encode, sprev, end)) {
          STAT_OP_OUT;
          continue;
        }
      }
      goto fail;
      break;

    case OP_WORD_END:  STAT_OP_IN(OP_WORD_END);
      if (!ON_STR_BEGIN(s) && ONIGENC_IS_MBC_WORD(encode, sprev, end)) {
        if (ON_STR_END(s) || !ONIGENC_IS_MBC_WORD(encode, s, end)) {
          STAT_OP_OUT;
          continue;
        }
      }
      goto fail;
      break;
#endif

    case OP_BEGIN_BUF:  STAT_OP_IN(OP_BEGIN_BUF);
      if (! ON_STR_BEGIN(s)) goto fail;

      STAT_OP_OUT;
      continue;
      break;

    case OP_END_BUF:  STAT_OP_IN(OP_END_BUF);
      if (! ON_STR_END(s)) goto fail;

      STAT_OP_OUT;
      continue;
      break;

    case OP_BEGIN_LINE:  STAT_OP_IN(OP_BEGIN_LINE);
      if (ON_STR_BEGIN(s)) {
        if (IS_NOTBOL(msa->options)) goto fail;
        STAT_OP_OUT;
        continue;
      }
      else if (ONIGENC_IS_MBC_NEWLINE(encode, sprev, end) && !ON_STR_END(s)) {
        STAT_OP_OUT;
        continue;
      }
      goto fail;
      break;

    case OP_END_LINE:  STAT_OP_IN(OP_END_LINE);
      if (ON_STR_END(s)) {
#ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE
        if (IS_EMPTY_STR || !ONIGENC_IS_MBC_NEWLINE(encode, sprev, end)) {
#endif
          if (IS_NOTEOL(msa->options)) goto fail;
          STAT_OP_OUT;
          continue;
#ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE
        }
#endif
      }
      else if (ONIGENC_IS_MBC_NEWLINE(encode, s, end)) {
        STAT_OP_OUT;
        continue;
      }
      goto fail;
      break;

    case OP_SEMI_END_BUF:  STAT_OP_IN(OP_SEMI_END_BUF);
      if (ON_STR_END(s)) {
#ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE
        if (IS_EMPTY_STR || !ONIGENC_IS_MBC_NEWLINE(encode, sprev, end)) {
#endif
          if (IS_NOTEOL(msa->options)) goto fail;   /* Is it needed? */
          STAT_OP_OUT;
          continue;
#ifndef USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE
        }
#endif
      }
      else if (ONIGENC_IS_MBC_NEWLINE(encode, s, end) &&
               ON_STR_END(s + enc_len(encode, s))) {
        STAT_OP_OUT;
        continue;
      }
      goto fail;
      break;

    case OP_BEGIN_POSITION:  STAT_OP_IN(OP_BEGIN_POSITION);
      if (s != msa->start)
        goto fail;

      STAT_OP_OUT;
      continue;
      break;

    case OP_MEMORY_START_PUSH:  STAT_OP_IN(OP_MEMORY_START_PUSH);
      GET_MEMNUM_INC(mem, p);
      STACK_PUSH_MEM_START(mem, s);
      STAT_OP_OUT;
      continue;
      break;

    case OP_MEMORY_START:  STAT_OP_IN(OP_MEMORY_START);
      GET_MEMNUM_INC(mem, p);
      mem_start_stk[mem] = (StackIndex )((void* )s);
      STAT_OP_OUT;
      continue;
      break;

    case OP_MEMORY_END_PUSH:  STAT_OP_IN(OP_MEMORY_END_PUSH);
      GET_MEMNUM_INC(mem, p);
      STACK_PUSH_MEM_END(mem, s);
      STAT_OP_OUT;
      continue;
      break;

    case OP_MEMORY_END:  STAT_OP_IN(OP_MEMORY_END);
      GET_MEMNUM_INC(mem, p);
      mem_end_stk[mem] = (StackIndex )((void* )s);
      STAT_OP_OUT;
      continue;
      break;

#ifdef USE_SUBEXP_CALL
    case OP_MEMORY_END_PUSH_REC:  STAT_OP_IN(OP_MEMORY_END_PUSH_REC);
      GET_MEMNUM_INC(mem, p);
      STACK_GET_MEM_START(mem, stkp); /* should be before push mem-end. */
      STACK_PUSH_MEM_END(mem, s);
      mem_start_stk[mem] = GET_STACK_INDEX(stkp);
      STAT_OP_OUT;
      continue;
      break;

    case OP_MEMORY_END_REC:  STAT_OP_IN(OP_MEMORY_END_REC);
      GET_MEMNUM_INC(mem, p);
      mem_end_stk[mem] = (StackIndex )((void* )s);
      STACK_GET_MEM_START(mem, stkp);

      if (BIT_STATUS_AT(reg->bt_mem_start, mem))
        mem_start_stk[mem] = GET_STACK_INDEX(stkp);
      else
        mem_start_stk[mem] = (StackIndex )((void* )stkp->u.mem.pstr);

      STACK_PUSH_MEM_END_MARK(mem);
      STAT_OP_OUT;
      continue;
      break;
#endif

    case OP_BACKREF1:  STAT_OP_IN(OP_BACKREF1);
      mem = 1;
      goto backref;
      break;

    case OP_BACKREF2:  STAT_OP_IN(OP_BACKREF2);
      mem = 2;
      goto backref;
      break;

    case OP_BACKREF3:  STAT_OP_IN(OP_BACKREF3);
      mem = 3;
      goto backref;
      break;

    case OP_BACKREFN:  STAT_OP_IN(OP_BACKREFN);
      GET_MEMNUM_INC(mem, p);
    backref:
      {
        int len;
        UChar *pstart, *pend;

        /* if you want to remove following line,
           you should check in parse and compile time. */
        if (mem > num_mem) goto fail;
        if (mem_end_stk[mem]   == INVALID_STACK_INDEX) goto fail;
        if (mem_start_stk[mem] == INVALID_STACK_INDEX) goto fail;

        if (BIT_STATUS_AT(reg->bt_mem_start, mem))
          pstart = STACK_AT(mem_start_stk[mem])->u.mem.pstr;
        else
          pstart = (UChar* )((void* )mem_start_stk[mem]);

        pend = (BIT_STATUS_AT(reg->bt_mem_end, mem)
                ? STACK_AT(mem_end_stk[mem])->u.mem.pstr
                : (UChar* )((void* )mem_end_stk[mem]));
        n = pend - pstart;
        DATA_ENSURE(n);
        sprev = s;
        STRING_CMP(pstart, s, n);
        while (sprev + (len = enc_len(encode, sprev)) < s)
          sprev += len;

        STAT_OP_OUT;
        continue;
      }
      break;

    case OP_BACKREFN_IC:  STAT_OP_IN(OP_BACKREFN_IC);
      GET_MEMNUM_INC(mem, p);
      {
        int len;
        UChar *pstart, *pend;

        /* if you want to remove following line,
           you should check in parse and compile time. */
        if (mem > num_mem) goto fail;
        if (mem_end_stk[mem]   == INVALID_STACK_INDEX) goto fail;
        if (mem_start_stk[mem] == INVALID_STACK_INDEX) goto fail;

        if (BIT_STATUS_AT(reg->bt_mem_start, mem))
          pstart = STACK_AT(mem_start_stk[mem])->u.mem.pstr;
        else
          pstart = (UChar* )((void* )mem_start_stk[mem]);

        pend = (BIT_STATUS_AT(reg->bt_mem_end, mem)
                ? STACK_AT(mem_end_stk[mem])->u.mem.pstr
                : (UChar* )((void* )mem_end_stk[mem]));
        n = pend - pstart;
        DATA_ENSURE(n);
        sprev = s;
        STRING_CMP_IC(ambig_flag, pstart, &s, n);
        while (sprev + (len = enc_len(encode, sprev)) < s)
          sprev += len;

        STAT_OP_OUT;
        continue;
      }
      break;

    case OP_BACKREF_MULTI:  STAT_OP_IN(OP_BACKREF_MULTI);
      {
        int len, is_fail;
        UChar *pstart, *pend, *swork;

        GET_LENGTH_INC(tlen, p);
        for (i = 0; i < tlen; i++) {
          GET_MEMNUM_INC(mem, p);

          if (mem_end_stk[mem]   == INVALID_STACK_INDEX) continue;
          if (mem_start_stk[mem] == INVALID_STACK_INDEX) continue;

          if (BIT_STATUS_AT(reg->bt_mem_start, mem))
            pstart = STACK_AT(mem_start_stk[mem])->u.mem.pstr;
          else
            pstart = (UChar* )((void* )mem_start_stk[mem]);

          pend = (BIT_STATUS_AT(reg->bt_mem_end, mem)
                  ? STACK_AT(mem_end_stk[mem])->u.mem.pstr
                  : (UChar* )((void* )mem_end_stk[mem]));
          n = pend - pstart;
          DATA_ENSURE(n);
          sprev = s;
          swork = s;
          STRING_CMP_VALUE(pstart, swork, n, is_fail);
          if (is_fail) continue;
          s = swork;
          while (sprev + (len = enc_len(encode, sprev)) < s)
            sprev += len;

          p += (SIZE_MEMNUM * (tlen - i - 1));
          break; /* success */
        }
        if (i == tlen) goto fail;
        STAT_OP_OUT;
        continue;
      }
      break;

    case OP_BACKREF_MULTI_IC:  STAT_OP_IN(OP_BACKREF_MULTI_IC);
      {
        int len, is_fail;
        UChar *pstart, *pend, *swork;

        GET_LENGTH_INC(tlen, p);
        for (i = 0; i < tlen; i++) {
          GET_MEMNUM_INC(mem, p);

          if (mem_end_stk[mem]   == INVALID_STACK_INDEX) continue;
          if (mem_start_stk[mem] == INVALID_STACK_INDEX) continue;

          if (BIT_STATUS_AT(reg->bt_mem_start, mem))
            pstart = STACK_AT(mem_start_stk[mem])->u.mem.pstr;
          else
            pstart = (UChar* )((void* )mem_start_stk[mem]);

          pend = (BIT_STATUS_AT(reg->bt_mem_end, mem)
                  ? STACK_AT(mem_end_stk[mem])->u.mem.pstr
                  : (UChar* )((void* )mem_end_stk[mem]));
          n = pend - pstart;
          DATA_ENSURE(n);
          sprev = s;
          swork = s;
          STRING_CMP_VALUE_IC(ambig_flag, pstart, &swork, n, is_fail);
          if (is_fail) continue;
          s = swork;
          while (sprev + (len = enc_len(encode, sprev)) < s)
            sprev += len;

          p += (SIZE_MEMNUM * (tlen - i - 1));
          break; /* success */
        }
        if (i == tlen) goto fail;
        STAT_OP_OUT;
        continue;
      }
      break;

    case OP_SET_OPTION_PUSH:  STAT_OP_IN(OP_SET_OPTION_PUSH);
      GET_OPTION_INC(option, p);
      STACK_PUSH_ALT(p, s, sprev);
      p += SIZE_OP_SET_OPTION + SIZE_OP_FAIL;
      STAT_OP_OUT;
      continue;
      break;

    case OP_SET_OPTION:  STAT_OP_IN(OP_SET_OPTION);
      GET_OPTION_INC(option, p);
      STAT_OP_OUT;
      continue;
      break;

    case OP_NULL_CHECK_START:  STAT_OP_IN(OP_NULL_CHECK_START);
      GET_MEMNUM_INC(mem, p);    /* mem: null check id */
      STACK_PUSH_NULL_CHECK_START(mem, s);
      STAT_OP_OUT;
      continue;
      break;

    case OP_NULL_CHECK_END:  STAT_OP_IN(OP_NULL_CHECK_END);
      {
        int isnull;

        GET_MEMNUM_INC(mem, p); /* mem: null check id */
        STACK_NULL_CHECK(isnull, mem, s);
        if (isnull) {
#ifdef ONIG_DEBUG_MATCH
          fprintf(stderr, "NULL_CHECK_END: skip  id:%d, s:%d\n",
                  (int )mem, (int )s);
#endif
        null_check_found:
          /* empty loop founded, skip next instruction */
          switch (*p++) {
          case OP_JUMP:
          case OP_PUSH:
            p += SIZE_RELADDR;
            break;
          case OP_REPEAT_INC:
          case OP_REPEAT_INC_NG:
          case OP_REPEAT_INC_SG:
          case OP_REPEAT_INC_NG_SG:
            p += SIZE_MEMNUM;
            break;
          default:
            goto unexpected_bytecode_error;
            break;
          }
        }
      }
      STAT_OP_OUT;
      continue;
      break;

#ifdef USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK
    case OP_NULL_CHECK_END_MEMST:  STAT_OP_IN(OP_NULL_CHECK_END_MEMST);
      {
        int isnull;

        GET_MEMNUM_INC(mem, p); /* mem: null check id */
        STACK_NULL_CHECK_MEMST(isnull, mem, s, reg);
        if (isnull) {
#ifdef ONIG_DEBUG_MATCH
          fprintf(stderr, "NULL_CHECK_END_MEMST: skip  id:%d, s:%d\n",
                  (int )mem, (int )s);
#endif
          if (isnull == -1) goto fail;
          goto  null_check_found;
        }
      }
      STAT_OP_OUT;
      continue;
      break;
#endif

#ifdef USE_SUBEXP_CALL
    case OP_NULL_CHECK_END_MEMST_PUSH:
      STAT_OP_IN(OP_NULL_CHECK_END_MEMST_PUSH);
      {
        int isnull;

        GET_MEMNUM_INC(mem, p); /* mem: null check id */
#ifdef USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK
        STACK_NULL_CHECK_MEMST_REC(isnull, mem, s, reg);
#else
        STACK_NULL_CHECK_REC(isnull, mem, s);
#endif
        if (isnull) {
#ifdef ONIG_DEBUG_MATCH
          fprintf(stderr, "NULL_CHECK_END_MEMST_PUSH: skip  id:%d, s:%d\n",
                  (int )mem, (int )s);
#endif
          if (isnull == -1) goto fail;
          goto  null_check_found;
        }
        else {
          STACK_PUSH_NULL_CHECK_END(mem);
        }
      }
      STAT_OP_OUT;
      continue;
      break;
#endif

    case OP_JUMP:  STAT_OP_IN(OP_JUMP);
      GET_RELADDR_INC(addr, p);
      p += addr;
      STAT_OP_OUT;
      CHECK_INTERRUPT_IN_MATCH_AT;
      continue;
      break;

    case OP_PUSH:  STAT_OP_IN(OP_PUSH);
      GET_RELADDR_INC(addr, p);
      STACK_PUSH_ALT(p + addr, s, sprev);
      STAT_OP_OUT;
      continue;
      break;

    case OP_POP:  STAT_OP_IN(OP_POP);
      STACK_POP_ONE;
      STAT_OP_OUT;
      continue;
      break;

    case OP_PUSH_OR_JUMP_EXACT1:  STAT_OP_IN(OP_PUSH_OR_JUMP_EXACT1);
      GET_RELADDR_INC(addr, p);
      if (*p == *s && DATA_ENSURE_CHECK(1)) {
        p++;
        STACK_PUSH_ALT(p + addr, s, sprev);
        STAT_OP_OUT;
        continue;
      }
      p += (addr + 1);
      STAT_OP_OUT;
      continue;
      break;

    case OP_PUSH_IF_PEEK_NEXT:  STAT_OP_IN(OP_PUSH_IF_PEEK_NEXT);
      GET_RELADDR_INC(addr, p);
      if (*p == *s) {
        p++;
        STACK_PUSH_ALT(p + addr, s, sprev);
        STAT_OP_OUT;
        continue;
      }
      p++;
      STAT_OP_OUT;
      continue;
      break;

    case OP_REPEAT:  STAT_OP_IN(OP_REPEAT);
      {
        GET_MEMNUM_INC(mem, p);    /* mem: OP_REPEAT ID */
        GET_RELADDR_INC(addr, p);

        STACK_ENSURE(1);
        repeat_stk[mem] = GET_STACK_INDEX(stk);
        STACK_PUSH_REPEAT(mem, p);

        if (reg->repeat_range[mem].lower == 0) {
          STACK_PUSH_ALT(p + addr, s, sprev);
        }
      }
      STAT_OP_OUT;
      continue;
      break;

    case OP_REPEAT_NG:  STAT_OP_IN(OP_REPEAT_NG);
      {
        GET_MEMNUM_INC(mem, p);    /* mem: OP_REPEAT ID */
        GET_RELADDR_INC(addr, p);

        STACK_ENSURE(1);
        repeat_stk[mem] = GET_STACK_INDEX(stk);
        STACK_PUSH_REPEAT(mem, p);

        if (reg->repeat_range[mem].lower == 0) {
          STACK_PUSH_ALT(p, s, sprev);
          p += addr;
        }
      }
      STAT_OP_OUT;
      continue;
      break;

    case OP_REPEAT_INC:  STAT_OP_IN(OP_REPEAT_INC);
      GET_MEMNUM_INC(mem, p); /* mem: OP_REPEAT ID */
      si = repeat_stk[mem];
      stkp = STACK_AT(si);

    repeat_inc:
      stkp->u.repeat.count++;
      if (stkp->u.repeat.count == reg->repeat_range[mem].upper) {
        /* end of repeat. Nothing to do. */
      }
      else if (stkp->u.repeat.count >= reg->repeat_range[mem].lower) {
        STACK_PUSH_ALT(p, s, sprev);
        p = STACK_AT(si)->u.repeat.pcode; /* Don't use stkp after PUSH. */
      }
      else {
        p = stkp->u.repeat.pcode;
      }
      STACK_PUSH_REPEAT_INC(si);
      STAT_OP_OUT;
      CHECK_INTERRUPT_IN_MATCH_AT;
      continue;
      break;

    case OP_REPEAT_INC_SG:  STAT_OP_IN(OP_REPEAT_INC_SG);
      GET_MEMNUM_INC(mem, p); /* mem: OP_REPEAT ID */
      STACK_GET_REPEAT(mem, stkp);
      si = GET_STACK_INDEX(stkp);
      goto repeat_inc;
      break;

    case OP_REPEAT_INC_NG:  STAT_OP_IN(OP_REPEAT_INC_NG);
      GET_MEMNUM_INC(mem, p); /* mem: OP_REPEAT ID */
      si = repeat_stk[mem];
      stkp = STACK_AT(si);

    repeat_inc_ng:
      stkp->u.repeat.count++;
      if (stkp->u.repeat.count < reg->repeat_range[mem].upper ||
          IS_REPEAT_INFINITE(reg->repeat_range[mem].upper)) {
        if (stkp->u.repeat.count >= reg->repeat_range[mem].lower) {
          UChar* pcode = stkp->u.repeat.pcode;

          STACK_PUSH_REPEAT_INC(si);
          STACK_PUSH_ALT(pcode, s, sprev);
        }
        else {
          p = stkp->u.repeat.pcode;
          STACK_PUSH_REPEAT_INC(si);
        }
      }
      else if (stkp->u.repeat.count == reg->repeat_range[mem].upper) {
        STACK_PUSH_REPEAT_INC(si);
      }
      STAT_OP_OUT;
      CHECK_INTERRUPT_IN_MATCH_AT;
      continue;
      break;

    case OP_REPEAT_INC_NG_SG:  STAT_OP_IN(OP_REPEAT_INC_NG_SG);
      GET_MEMNUM_INC(mem, p); /* mem: OP_REPEAT ID */
      STACK_GET_REPEAT(mem, stkp);
      si = GET_STACK_INDEX(stkp);
      goto repeat_inc_ng;
      break;

    case OP_PUSH_POS:  STAT_OP_IN(OP_PUSH_POS);
      STACK_PUSH_POS(s, sprev);
      STAT_OP_OUT;
      continue;
      break;

    case OP_POP_POS:  STAT_OP_IN(OP_POP_POS);
      {
        STACK_POS_END(stkp);
        s     = stkp->u.state.pstr;
        sprev = stkp->u.state.pstr_prev;
      }
      STAT_OP_OUT;
      continue;
      break;

    case OP_PUSH_POS_NOT:  STAT_OP_IN(OP_PUSH_POS_NOT);
      GET_RELADDR_INC(addr, p);
      STACK_PUSH_POS_NOT(p + addr, s, sprev);
      STAT_OP_OUT;
      continue;
      break;

    case OP_FAIL_POS:  STAT_OP_IN(OP_FAIL_POS);
      STACK_POP_TIL_POS_NOT;
      goto fail;
      break;

    case OP_PUSH_STOP_BT:  STAT_OP_IN(OP_PUSH_STOP_BT);
      STACK_PUSH_STOP_BT;
      STAT_OP_OUT;
      continue;
      break;

    case OP_POP_STOP_BT:  STAT_OP_IN(OP_POP_STOP_BT);
      STACK_STOP_BT_END;
      STAT_OP_OUT;
      continue;
      break;

    case OP_LOOK_BEHIND:  STAT_OP_IN(OP_LOOK_BEHIND);
      GET_LENGTH_INC(tlen, p);
      s = (UChar* )ONIGENC_STEP_BACK(encode, str, s, (int )tlen);
      if (IS_NULL(s)) goto fail;
      sprev = (UChar* )onigenc_get_prev_char_head(encode, str, s);
      STAT_OP_OUT;
      continue;
      break;

    case OP_PUSH_LOOK_BEHIND_NOT:  STAT_OP_IN(OP_PUSH_LOOK_BEHIND_NOT);
      GET_RELADDR_INC(addr, p);
      GET_LENGTH_INC(tlen, p);
      q = (UChar* )ONIGENC_STEP_BACK(encode, str, s, (int )tlen);
      if (IS_NULL(q)) {
        /* too short case -> success. ex. /(?<!XXX)a/.match("a")
           If you want to change to fail, replace following line. */
        p += addr;
        /* goto fail; */
      }
      else {
        STACK_PUSH_LOOK_BEHIND_NOT(p + addr, s, sprev);
        s = q;
        sprev = (UChar* )onigenc_get_prev_char_head(encode, str, s);
      }
      STAT_OP_OUT;
      continue;
      break;

    case OP_FAIL_LOOK_BEHIND_NOT:  STAT_OP_IN(OP_FAIL_LOOK_BEHIND_NOT);
      STACK_POP_TIL_LOOK_BEHIND_NOT;
      goto fail;
      break;

#ifdef USE_SUBEXP_CALL
    case OP_CALL:  STAT_OP_IN(OP_CALL);
      GET_ABSADDR_INC(addr, p);
      STACK_PUSH_CALL_FRAME(p);
      p = reg->p + addr;
      STAT_OP_OUT;
      continue;
      break;

    case OP_RETURN:  STAT_OP_IN(OP_RETURN);
      STACK_RETURN(p);
      STACK_PUSH_RETURN;
      STAT_OP_OUT;
      continue;
      break;
#endif

    case OP_FINISH:
      goto finish;
      break;

    fail:
      STAT_OP_OUT;
      /* fall */
    case OP_FAIL:  STAT_OP_IN(OP_FAIL);
      STACK_POP;
      p     = stk->u.state.pcode;
      s     = stk->u.state.pstr;
      sprev = stk->u.state.pstr_prev;
      STAT_OP_OUT;
      continue;
      break;

    default:
      goto bytecode_error;

    } /* end of switch */
    sprev = sbegin;
  } /* end of while(1) */

 finish:
  STACK_SAVE;
  return best_len;

#ifdef ONIG_DEBUG
 stack_error:
  STACK_SAVE;
  return ONIGERR_STACK_BUG;
#endif

 bytecode_error:
  STACK_SAVE;
  return ONIGERR_UNDEFINED_BYTECODE;

 unexpected_bytecode_error:
  STACK_SAVE;
  return ONIGERR_UNEXPECTED_BYTECODE;
}

static UChar*
slow_search(OnigEncoding enc, UChar* target, UChar* target_end,
            const UChar* text, const UChar* text_end, UChar* text_range)
{
  UChar *t, *p, *s, *end;

  end = (UChar* )text_end;
  end -= target_end - target - 1;
  if (end > text_range)
    end = text_range;

  s = (UChar* )text;

  while (s < end) {
    if (*s == *target) {
      p = s + 1;
      t = target + 1;
      while (t < target_end) {
        if (*t != *p++)
          break;
        t++;
      }
      if (t == target_end)
        return s;
    }
    s += enc_len(enc, s);
  }

  return (UChar* )NULL;
}

static int
str_lower_case_match(OnigEncoding enc, int ambig_flag,
                     const UChar* t, const UChar* tend,
                     const UChar* p, const UChar* end)
{
  int lowlen;
  UChar *q, lowbuf[ONIGENC_MBC_NORMALIZE_MAXLEN];
  const UChar* tsave;
  const UChar* psave;

  tsave = t;
  psave = p;

 retry:
  while (t < tend) {
    lowlen = ONIGENC_MBC_TO_NORMALIZE(enc, ambig_flag, &p, end, lowbuf);
    q = lowbuf;
    while (lowlen > 0) {
      if (*t++ != *q++) {
        if ((ambig_flag & ONIGENC_AMBIGUOUS_MATCH_COMPOUND) != 0) {
          ambig_flag &= ~ONIGENC_AMBIGUOUS_MATCH_COMPOUND;
          t = tsave;
          p = psave;
          goto retry;
        }
        else
          return 0;
      }
      lowlen--;
    }
  }

  return 1;
}

static UChar*
slow_search_ic(OnigEncoding enc, int ambig_flag,
               UChar* target, UChar* target_end,
               const UChar* text, const UChar* text_end, UChar* text_range)
{
  UChar *s, *end;

  end = (UChar* )text_end;
  end -= target_end - target - 1;
  if (end > text_range)
    end = text_range;

  s = (UChar* )text;

  while (s < end) {
    if (str_lower_case_match(enc, ambig_flag, target, target_end, s, text_end))
      return s;

    s += enc_len(enc, s);
  }

  return (UChar* )NULL;
}

static UChar*
slow_search_backward(OnigEncoding enc, UChar* target, UChar* target_end,
                     const UChar* text, const UChar* adjust_text,
                     const UChar* text_end, const UChar* text_start)
{
  UChar *t, *p, *s;

  s = (UChar* )text_end;
  s -= (target_end - target);
  if (s > text_start)
    s = (UChar* )text_start;
  else
    s = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, adjust_text, s);

  while (s >= text) {
    if (*s == *target) {
      p = s + 1;
      t = target + 1;
      while (t < target_end) {
        if (*t != *p++)
          break;
        t++;
      }
      if (t == target_end)
        return s;
    }
    s = (UChar* )onigenc_get_prev_char_head(enc, adjust_text, s);
  }

  return (UChar* )NULL;
}

static UChar*
slow_search_backward_ic(OnigEncoding enc, int ambig_flag,
                        UChar* target, UChar* target_end,
                        const UChar* text, const UChar* adjust_text,
                        const UChar* text_end, const UChar* text_start)
{
  UChar *s;

  s = (UChar* )text_end;
  s -= (target_end - target);
  if (s > text_start)
    s = (UChar* )text_start;
  else
    s = ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc, adjust_text, s);

  while (s >= text) {
    if (str_lower_case_match(enc, ambig_flag,
                             target, target_end, s, text_end))
      return s;

    s = (UChar* )onigenc_get_prev_char_head(enc, adjust_text, s);
  }

  return (UChar* )NULL;
}

static UChar*
bm_search_notrev(regex_t* reg, const UChar* target, const UChar* target_end,
                 const UChar* text, const UChar* text_end,
                 const UChar* text_range)
{
  const UChar *s, *t, *p, *end;
  const UChar *tail;
  int skip;

#ifdef ONIG_DEBUG_SEARCH
  fprintf(stderr, "bm_search_notrev: text: %d, text_end: %d, text_range: %d\n",
          (int )text, (int )text_end, (int )text_range);
#endif

  end = text_range + (target_end - target) - 1;
  if (end > text_end)
    end = text_end;

  tail = target_end - 1;
  s = text;
  while ((s - text) < target_end - target) {
    s += enc_len(reg->enc, s);
  }
  s--; /* set to text check tail position. */

  if (IS_NULL(reg->int_map)) {
    while (s < end) {
      p = s;
      t = tail;
      while (t >= target && *p == *t) {
        p--; t--;
      }
      if (t < target) return (UChar* )(p + 1);

      skip = reg->map[*s];
      p = s + 1;
      if (p >= text_end) return (UChar* )NULL;
      t = p;
      do {
        p += enc_len(reg->enc, p);
      } while ((p - t) < skip && p < text_end);

      s += (p - t);
    }
  }
  else {
    while (s < end) {
      p = s;
      t = tail;
      while (t >= target && *p == *t) {
        p--; t--;
      }
      if (t < target) return (UChar* )(p + 1);

      skip = reg->int_map[*s];
      p = s + 1;
      if (p >= text_end) return (UChar* )NULL;
      t = p;
      do {
        p += enc_len(reg->enc, p);
      } while ((p - t) < skip && p < text_end);

      s += (p - t);
    }
  }
  return (UChar* )NULL;
}

static UChar*
bm_search(regex_t* reg, const UChar* target, const UChar* target_end,
          const UChar* text, const UChar* text_end, const UChar* text_range)
{
  const UChar *s, *t, *p, *end;
  const UChar *tail;

  end = text_range + (target_end - target) - 1;
  if (end > text_end)
    end = text_end;

  tail = target_end - 1;
  s = text + (target_end - target) - 1;
  if (IS_NULL(reg->int_map)) {
    while (s < end) {
      p = s;
      t = tail;
      while (t >= target && *p == *t) {
        p--; t--;
      }
      if (t < target) return (UChar* )(p + 1);
      s += reg->map[*s];
    }
  }
  else { /* see int_map[] */
    while (s < end) {
      p = s;
      t = tail;
      while (t >= target && *p == *t) {
        p--; t--;
      }
      if (t < target) return (UChar* )(p + 1);
      s += reg->int_map[*s];
    }
  }
  return (UChar* )NULL;
}

static int
set_bm_backward_skip(UChar* s, UChar* end, OnigEncoding enc, int** skip)

{
  int i, len;

  if (IS_NULL(*skip)) {
    *skip = (int* )xmalloc(sizeof(int) * ONIG_CHAR_TABLE_SIZE);
    if (IS_NULL(*skip)) return ONIGERR_MEMORY;
  }

  len = end - s;
  for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++)
    (*skip)[i] = len;

  for (i = len - 1; i > 0; i--)
    (*skip)[s[i]] = i;

  return 0;
}

static UChar*
bm_search_backward(regex_t* reg, const UChar* target, const UChar* target_end,
                   const UChar* text, const UChar* adjust_text,
                   const UChar* text_end, const UChar* text_start)
{
  const UChar *s, *t, *p;

  s = text_end - (target_end - target);
  if (text_start < s)
    s = text_start;
  else
    s = ONIGENC_LEFT_ADJUST_CHAR_HEAD(reg->enc, adjust_text, s);

  while (s >= text) {
    p = s;
    t = target;
    while (t < target_end && *p == *t) {
      p++; t++;
    }
    if (t == target_end)
      return (UChar* )s;

    s -= reg->int_map_backward[*s];
    s = ONIGENC_LEFT_ADJUST_CHAR_HEAD(reg->enc, adjust_text, s);
  }

  return (UChar* )NULL;
}

static UChar*
map_search(OnigEncoding enc, UChar map[],
           const UChar* text, const UChar* text_range)
{
  const UChar *s = text;

  while (s < text_range) {
    if (map[*s]) return (UChar* )s;

    s += enc_len(enc, s);
  }
  return (UChar* )NULL;
}

static UChar*
map_search_backward(OnigEncoding enc, UChar map[],
                    const UChar* text, const UChar* adjust_text,
                    const UChar* text_start)
{
  const UChar *s = text_start;

  while (s >= text) {
    if (map[*s]) return (UChar* )s;

    s = onigenc_get_prev_char_head(enc, adjust_text, s);
  }
  return (UChar* )NULL;
}

extern int
onig_match(regex_t* reg, const UChar* str, const UChar* end, const UChar* at, OnigRegion* region,
            OnigOptionType option)
{
  int r;
  UChar *prev;
  MatchArg msa;

#ifdef USE_MULTI_THREAD_SYSTEM
  if (ONIG_STATE(reg) >= ONIG_STATE_NORMAL) {
    ONIG_STATE_INC(reg);
    if (IS_NOT_NULL(reg->chain) && ONIG_STATE(reg) == ONIG_STATE_NORMAL) {
      onig_chain_reduce(reg);
      ONIG_STATE_INC(reg);
    }
  }
  else {
    int n = 0;
    while (ONIG_STATE(reg) < ONIG_STATE_NORMAL) {
      if (++n > THREAD_PASS_LIMIT_COUNT)
        return ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT;
      THREAD_PASS;
    }
    ONIG_STATE_INC(reg);
  }
#endif /* USE_MULTI_THREAD_SYSTEM */

  MATCH_ARG_INIT(msa, option, region, at);

  if (region
#ifdef USE_POSIX_REGION_OPTION
      && !IS_POSIX_REGION(option)
#endif
      ) {
    r = onig_region_resize_clear(region, reg->num_mem + 1);
  }
  else
    r = 0;

  if (r == 0) {
    prev = (UChar* )onigenc_get_prev_char_head(reg->enc, str, at);
    r = match_at(reg, str, end, at, prev, &msa);
  }

  MATCH_ARG_FREE(msa);
  ONIG_STATE_DEC(reg);
  return r;
}

static int
forward_search_range(regex_t* reg, const UChar* str, const UChar* end, UChar* s,
                     UChar* range, UChar** low, UChar** high, UChar** low_prev)
{
  UChar *p, *pprev = (UChar* )NULL;

#ifdef ONIG_DEBUG_SEARCH
  fprintf(stderr, "forward_search_range: str: %d, end: %d, s: %d, range: %d\n",
          (int )str, (int )end, (int )s, (int )range);
#endif

  p = s;
  if (reg->dmin > 0) {
    if (ONIGENC_IS_SINGLEBYTE(reg->enc)) {
      p += reg->dmin;
    }
    else {
      UChar *q = p + reg->dmin;
      while (p < q) p += enc_len(reg->enc, p);
    }
  }

 retry:
  switch (reg->optimize) {
  case ONIG_OPTIMIZE_EXACT:
    p = slow_search(reg->enc, reg->exact, reg->exact_end, p, end, range);
    break;
  case ONIG_OPTIMIZE_EXACT_IC:
    p = slow_search_ic(reg->enc, reg->ambig_flag,
                       reg->exact, reg->exact_end, p, end, range);
    break;

  case ONIG_OPTIMIZE_EXACT_BM:
    p = bm_search(reg, reg->exact, reg->exact_end, p, end, range);
    break;

  case ONIG_OPTIMIZE_EXACT_BM_NOT_REV:
    p = bm_search_notrev(reg, reg->exact, reg->exact_end, p, end, range);
    break;

  case ONIG_OPTIMIZE_MAP:
    p = map_search(reg->enc, reg->map, p, range);
    break;
  }

  if (p && p < range) {
    if (p - reg->dmin < s) {
    retry_gate:
      pprev = p;
      p += enc_len(reg->enc, p);
      goto retry;
    }

    if (reg->sub_anchor) {
      UChar* prev;

      switch (reg->sub_anchor) {
      case ANCHOR_BEGIN_LINE:
        if (!ON_STR_BEGIN(p)) {
          prev = onigenc_get_prev_char_head(reg->enc,
                                            (pprev ? pprev : str), p);
          if (!ONIGENC_IS_MBC_NEWLINE(reg->enc, prev, end))
            goto retry_gate;
        }
        break;

      case ANCHOR_END_LINE:
        if (ON_STR_END(p)) {
          prev = (UChar* )onigenc_get_prev_char_head(reg->enc,
                                            (pprev ? pprev : str), p);
          if (prev && ONIGENC_IS_MBC_NEWLINE(reg->enc, prev, end))
            goto retry_gate;
        }
        else if (!ONIGENC_IS_MBC_NEWLINE(reg->enc, p, end))
          goto retry_gate;
        break;
      }
    }

    if (reg->dmax == 0) {
      *low = p;
      if (low_prev) {
        if (*low > s)
          *low_prev = onigenc_get_prev_char_head(reg->enc, s, p);
        else
          *low_prev = onigenc_get_prev_char_head(reg->enc,
                                                 (pprev ? pprev : str), p);
      }
    }
    else {
      if (reg->dmax != ONIG_INFINITE_DISTANCE) {
        *low = p - reg->dmax;
        if (*low > s) {
          *low = onigenc_get_right_adjust_char_head_with_prev(reg->enc, s,
                                                              *low, (const UChar** )low_prev);
          if (low_prev && IS_NULL(*low_prev))
            *low_prev = onigenc_get_prev_char_head(reg->enc,
                                                   (pprev ? pprev : s), *low);
        }
        else {
          if (low_prev)
            *low_prev = onigenc_get_prev_char_head(reg->enc,
                                               (pprev ? pprev : str), *low);
        }
      }
    }
    /* no needs to adjust *high, *high is used as range check only */
    *high = p - reg->dmin;

#ifdef ONIG_DEBUG_SEARCH
    fprintf(stderr,
    "forward_search_range success: low: %d, high: %d, dmin: %d, dmax: %d\n",
            (int )(*low - str), (int )(*high - str), reg->dmin, reg->dmax);
#endif
    return 1; /* success */
  }

  return 0; /* fail */
}

static int set_bm_backward_skip P_((UChar* s, UChar* end, OnigEncoding enc,
                                    int** skip));

#define BM_BACKWARD_SEARCH_LENGTH_THRESHOLD   100

static int
backward_search_range(regex_t* reg, const UChar* str, const UChar* end,
                      UChar* s, const UChar* range, UChar* adjrange,
                      UChar** low, UChar** high)
{
  int r;
  UChar *p;

  range += reg->dmin;
  p = s;

 retry:
  switch (reg->optimize) {
  case ONIG_OPTIMIZE_EXACT:
  exact_method:
    p = slow_search_backward(reg->enc, reg->exact, reg->exact_end,
                             range, adjrange, end, p);
    break;

  case ONIG_OPTIMIZE_EXACT_IC:
    p = slow_search_backward_ic(reg->enc, reg->ambig_flag,
                                reg->exact, reg->exact_end,
                                range, adjrange, end, p);
    break;

  case ONIG_OPTIMIZE_EXACT_BM:
  case ONIG_OPTIMIZE_EXACT_BM_NOT_REV:
    if (IS_NULL(reg->int_map_backward)) {
      if (s - range < BM_BACKWARD_SEARCH_LENGTH_THRESHOLD)
        goto exact_method;

      r = set_bm_backward_skip(reg->exact, reg->exact_end, reg->enc,
                               &(reg->int_map_backward));
      if (r) return r;
    }
    p = bm_search_backward(reg, reg->exact, reg->exact_end, range, adjrange,
                           end, p);
    break;

  case ONIG_OPTIMIZE_MAP:
    p = map_search_backward(reg->enc, reg->map, range, adjrange, p);
    break;
  }

  if (p) {
    if (reg->sub_anchor) {
      UChar* prev;

      switch (reg->sub_anchor) {
      case ANCHOR_BEGIN_LINE:
        if (!ON_STR_BEGIN(p)) {
          prev = onigenc_get_prev_char_head(reg->enc, adjrange, p);
          if (!ONIGENC_IS_MBC_NEWLINE(reg->enc, prev, end)) {
            p = prev;
            goto retry;
          }
        }
        break;

      case ANCHOR_END_LINE:
        if (ON_STR_END(p)) {
          prev = onigenc_get_prev_char_head(reg->enc, adjrange, p);
          if (IS_NULL(prev)) goto fail;
          if (ONIGENC_IS_MBC_NEWLINE(reg->enc, prev, end)) {
            p = prev;
            goto retry;
          }
        }
        else if (!ONIGENC_IS_MBC_NEWLINE(reg->enc, p, end)) {
          p = onigenc_get_prev_char_head(reg->enc, adjrange, p);
          if (IS_NULL(p)) goto fail;
          goto retry;
        }
        break;
      }
    }

    /* no needs to adjust *high, *high is used as range check only */
    if (reg->dmax != ONIG_INFINITE_DISTANCE) {
      *low  = p - reg->dmax;
      *high = p - reg->dmin;
      *high = onigenc_get_right_adjust_char_head(reg->enc, adjrange, *high);
    }

#ifdef ONIG_DEBUG_SEARCH
    fprintf(stderr, "backward_search_range: low: %d, high: %d\n",
            (int )(*low - str), (int )(*high - str));
#endif
    return 1; /* success */
  }

 fail:
#ifdef ONIG_DEBUG_SEARCH
  fprintf(stderr, "backward_search_range: fail.\n");
#endif
  return 0; /* fail */
}

extern int
onig_search(regex_t* reg, const UChar* str, const UChar* end,
            const UChar* start, const UChar* range, OnigRegion* region, OnigOptionType option)
{
  int r;
  UChar *s, *prev;
  MatchArg msa;

#ifdef USE_MULTI_THREAD_SYSTEM
  if (ONIG_STATE(reg) >= ONIG_STATE_NORMAL) {
    ONIG_STATE_INC(reg);
    if (IS_NOT_NULL(reg->chain) && ONIG_STATE(reg) == ONIG_STATE_NORMAL) {
      onig_chain_reduce(reg);
      ONIG_STATE_INC(reg);
    }
  }
  else {
    int n = 0;
    while (ONIG_STATE(reg) < ONIG_STATE_NORMAL) {
      if (++n > THREAD_PASS_LIMIT_COUNT)
        return ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT;
      THREAD_PASS;
    }
    ONIG_STATE_INC(reg);
  }
#endif /* USE_MULTI_THREAD_SYSTEM */

#ifdef ONIG_DEBUG_SEARCH
  fprintf(stderr,
     "onig_search (entry point): str: %d, end: %d, start: %d, range: %d\n",
     (int )str, (int )(end - str), (int )(start - str), (int )(range - str));
#endif

  if (region
#ifdef USE_POSIX_REGION_OPTION
      && !IS_POSIX_REGION(option)
#endif
      ) {
    r = onig_region_resize_clear(region, reg->num_mem + 1);
    if (r) goto finish_no_msa;
  }

  if (start > end || start < str) goto mismatch_no_msa;

#define MATCH_AND_RETURN_CHECK \
  r = match_at(reg, str, end, s, prev, &msa);\
  if (r != ONIG_MISMATCH) {\
    if (r >= 0) goto match;\
    goto finish; /* error */ \
  }

  /* anchor optimize: resume search range */
  if (reg->anchor != 0 && str < end) {
    UChar* semi_end;

    if (reg->anchor & ANCHOR_BEGIN_POSITION) {
      /* search start-position only */
    begin_position:
      if (range > start)
        range = start + 1;
      else
        range = start;
    }
    else if (reg->anchor & ANCHOR_BEGIN_BUF) {
      /* search str-position only */
      if (range > start) {
        if (start != str) goto mismatch_no_msa;
        range = str + 1;
      }
      else {
        if (range <= str) {
          start = str;
          range = str;
        }
        else
          goto mismatch_no_msa;
      }
    }
    else if (reg->anchor & ANCHOR_END_BUF) {
      semi_end = (UChar* )end;

    end_buf:
      if ((OnigDistance )(semi_end - str) < reg->anchor_dmin)
        goto mismatch_no_msa;

      if (range > start) {
        if ((OnigDistance )(semi_end - start) > reg->anchor_dmax) {
          start = semi_end - reg->anchor_dmax;
          if (start < end)
            start = onigenc_get_right_adjust_char_head(reg->enc, str, start);
          else { /* match with empty at end */
            start = onigenc_get_prev_char_head(reg->enc, str, end);
          }
        }
        if ((OnigDistance )(semi_end - (range - 1)) < reg->anchor_dmin) {
          range = semi_end - reg->anchor_dmin + 1;
        }

        if (start >= range) goto mismatch_no_msa;
      }
      else {
        if ((OnigDistance )(semi_end - range) > reg->anchor_dmax) {
          range = semi_end - reg->anchor_dmax;
        }
        if ((OnigDistance )(semi_end - start) < reg->anchor_dmin) {
          start = semi_end - reg->anchor_dmin;
          start = ONIGENC_LEFT_ADJUST_CHAR_HEAD(reg->enc, str, start);
          if (range > start) goto mismatch_no_msa;
        }
      }
    }
    else if (reg->anchor & ANCHOR_SEMI_END_BUF) {
      UChar* pre_end = ONIGENC_STEP_BACK(reg->enc, str, end, 1);

      if (ONIGENC_IS_MBC_NEWLINE(reg->enc, pre_end, end)) {
        semi_end = pre_end;
        if (semi_end > str && start <= semi_end) {
          goto end_buf;
        }
      }
      else {
        semi_end = (UChar* )end;
        goto end_buf;
      }
    }
    else if ((reg->anchor & ANCHOR_ANYCHAR_STAR_PL)) {
      goto begin_position;
    }
  }
  else if (str == end) { /* empty string */
    static const UChar* address_for_empty_string = "";

#ifdef ONIG_DEBUG_SEARCH
    fprintf(stderr, "onig_search: empty string.\n");
#endif

    if (reg->threshold_len == 0) {
      start = end = str = address_for_empty_string;
      s = (UChar* )start;
      prev = (UChar* )NULL;

      MATCH_ARG_INIT(msa, option, region, start);
      MATCH_AND_RETURN_CHECK;
      goto mismatch;
    }
    goto mismatch_no_msa;
  }

#ifdef ONIG_DEBUG_SEARCH
  fprintf(stderr, "onig_search(apply anchor): end: %d, start: %d, range: %d\n",
          (int )(end - str), (int )(start - str), (int )(range - str));
#endif

  MATCH_ARG_INIT(msa, option, region, start);

  s = (UChar* )start;
  if (range > start) {   /* forward search */
    if (s > str)
      prev = onigenc_get_prev_char_head(reg->enc, str, s);
    else
      prev = (UChar* )NULL;

    if (reg->optimize != ONIG_OPTIMIZE_NONE) {
      UChar *sch_range, *low, *high, *low_prev;

      sch_range = (UChar* )range;
      if (reg->dmax != 0) {
        if (reg->dmax == ONIG_INFINITE_DISTANCE)
          sch_range = (UChar* )end;
        else {
          sch_range += reg->dmax;
          if (sch_range > end) sch_range = (UChar* )end;
        }
      }
      if (reg->dmax != ONIG_INFINITE_DISTANCE &&
          (end - start) >= reg->threshold_len) {
        do {
          if (! forward_search_range(reg, str, end, s, sch_range,
                                     &low, &high, &low_prev)) goto mismatch;
          if (s < low) {
            s    = low;
            prev = low_prev;
          }
          while (s <= high) {
            MATCH_AND_RETURN_CHECK;
            prev = s;
            s += enc_len(reg->enc, s);
          }
          if ((reg->anchor & ANCHOR_ANYCHAR_STAR) != 0) {
            if (IS_NOT_NULL(prev)) {
              while (!ONIGENC_IS_MBC_NEWLINE(reg->enc, prev, end) &&
                     s < range) {
                prev = s;
                s += enc_len(reg->enc, s);
              }
            }
          }
        } while (s < range);
        goto mismatch;
      }
      else { /* check only. */
        if ((end - start) < reg->threshold_len ||
            ! forward_search_range(reg, str, end, s, sch_range,
                                   &low, &high, (UChar** )NULL)) goto mismatch;
      }
    }

    do {
      MATCH_AND_RETURN_CHECK;
      prev = s;
      s += enc_len(reg->enc, s);
    } while (s <= range);   /* exec s == range, because empty match with /$/. */
  }
  else {  /* backward search */
    if (reg->optimize != ONIG_OPTIMIZE_NONE) {
      UChar *low, *high, *adjrange, *sch_start;

      if (range < end)
        adjrange = ONIGENC_LEFT_ADJUST_CHAR_HEAD(reg->enc, str, range);
      else
        adjrange = (UChar* )end;

      if (reg->dmax != ONIG_INFINITE_DISTANCE &&
          (end - range) >= reg->threshold_len) {
        do {
          sch_start = s + reg->dmax;
          if (sch_start > end) sch_start = (UChar* )end;
          if (backward_search_range(reg, str, end, sch_start, range, adjrange,
                                    &low, &high) <= 0)
            goto mismatch;

          if (s > high)
            s = high;

          while (s >= low) {
            prev = onigenc_get_prev_char_head(reg->enc, str, s);
            MATCH_AND_RETURN_CHECK;
            s = prev;
          }
        } while (s >= range);
        goto mismatch;
      }
      else { /* check only. */
        if ((end - range) < reg->threshold_len) goto mismatch;

        sch_start = s;
        if (reg->dmax != 0) {
          if (reg->dmax == ONIG_INFINITE_DISTANCE)
            sch_start = (UChar* )end;
          else {
            sch_start += reg->dmax;
            if (sch_start > end) sch_start = (UChar* )end;
            else
              sch_start = ONIGENC_LEFT_ADJUST_CHAR_HEAD(reg->enc,
                                                    start, sch_start);
          }
        }
        if (backward_search_range(reg, str, end, sch_start, range, adjrange,
                                  &low, &high) <= 0) goto mismatch;
      }
    }

    do {
      prev = onigenc_get_prev_char_head(reg->enc, str, s);
      MATCH_AND_RETURN_CHECK;
      s = prev;
    } while (s >= range);
  }

 mismatch:
  r = ONIG_MISMATCH;

 finish:
  MATCH_ARG_FREE(msa);
  ONIG_STATE_DEC(reg);

  /* If result is mismatch and no FIND_NOT_EMPTY option,
     then the region is not setted in match_at(). */
  if (IS_FIND_NOT_EMPTY(reg->options) && region
#ifdef USE_POSIX_REGION_OPTION
      && !IS_POSIX_REGION(option)
#endif
      ) {
    onig_region_clear(region);
  }

#ifdef ONIG_DEBUG
  if (r != ONIG_MISMATCH)
    fprintf(stderr, "onig_search: error %d\n", r);
#endif
  return r;

 mismatch_no_msa:
  r = ONIG_MISMATCH;
 finish_no_msa:
  ONIG_STATE_DEC(reg);
#ifdef ONIG_DEBUG
  if (r != ONIG_MISMATCH)
    fprintf(stderr, "onig_search: error %d\n", r);
#endif
  return r;

 match:
  ONIG_STATE_DEC(reg);
  MATCH_ARG_FREE(msa);
  return s - str;
}

extern OnigEncoding
onig_get_encoding(regex_t* reg)
{
  return reg->enc;
}

extern OnigOptionType
onig_get_options(regex_t* reg)
{
  return reg->options;
}

extern  OnigAmbigType
onig_get_ambig_flag(regex_t* reg)
{
  return reg->ambig_flag;
}

extern OnigSyntaxType*
onig_get_syntax(regex_t* reg)
{
  return reg->syntax;
}

extern int
onig_number_of_captures(regex_t* reg)
{
  return reg->num_mem;
}

extern int
onig_number_of_capture_histories(regex_t* reg)
{
#ifdef USE_CAPTURE_HISTORY
  int i, n;

  n = 0;
  for (i = 0; i <= ONIG_MAX_CAPTURE_HISTORY_GROUP; i++) {
    if (BIT_STATUS_AT(reg->capture_history, i) != 0)
      n++;
  }
  return n;
#else
  return 0;
#endif
}

extern void
onig_copy_encoding(OnigEncoding to, OnigEncoding from)
{
  *to = *from;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


regint.h

root/regint.h

/* [<][>][^] [v][top][bottom] [index] [help] */

INCLUDED FROM

DEFINITIONS

This source file includes following definitions.
  1. BBuf
  2. CClassNode
  3. OnigOpInfoType
#ifndef REGINT_H
#define REGINT_H
/**********************************************************************
  regint.h -  Oniguruma (regular expression library)
**********************************************************************/
/*-
 * Copyright (c) 2002-2005  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

/* for debug */
/* #define ONIG_DEBUG_PARSE_TREE */
/* #define ONIG_DEBUG_COMPILE */
/* #define ONIG_DEBUG_SEARCH */
/* #define ONIG_DEBUG_MATCH */
/* #define ONIG_DONT_OPTIMIZE */

/* for byte-code statistical data. */
/* #define ONIG_DEBUG_STATISTICS */

#if defined(ONIG_DEBUG_PARSE_TREE) || defined(ONIG_DEBUG_MATCH) || \
    defined(ONIG_DEBUG_SEARCH) || defined(ONIG_DEBUG_COMPILE) || \
    defined(ONIG_DEBUG_STATISTICS)
#ifndef ONIG_DEBUG
#define ONIG_DEBUG
#endif
#endif

#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \
    (defined(__ppc__) && defined(__APPLE__)) || \
    defined(__x86_64) || defined(__x86_64__) || \
    defined(__mc68020__)
#define PLATFORM_UNALIGNED_WORD_ACCESS
#endif

/* config */
/* spec. config */
/* #define USE_UNICODE_FULL_RANGE_CTYPE */ /* --> move to regenc.h */
#define USE_NAMED_GROUP
#define USE_SUBEXP_CALL
#define USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK /* /(?:()|())*\2/ */
#define USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE     /* /\n$/ =~ "\n" */
#define USE_WARNING_REDUNDANT_NESTED_REPEAT_OPERATOR
/* internal config */
#define USE_RECYCLE_NODE
#define USE_OP_PUSH_OR_JUMP_EXACT
#define USE_QUALIFIER_PEEK_NEXT
#define USE_ST_HASH_TABLE
#define USE_SHARED_CCLASS_TABLE

#define INIT_MATCH_STACK_SIZE                     160
#define DEFAULT_MATCH_STACK_LIMIT_SIZE              0 /* unlimited */

/* interface to external system */
#ifdef NOT_RUBY      /* given from Makefile */
#include "config.h"
#define USE_CAPTURE_HISTORY
#define USE_VARIABLE_META_CHARS
#define USE_WORD_BEGIN_END          /* "\<": word-begin, "\>": word-end */
#define USE_POSIX_REGION_OPTION     /* needed for POSIX API support */
/* #define USE_MULTI_THREAD_SYSTEM */
#define THREAD_ATOMIC_START         /* depend on thread system */
#define THREAD_ATOMIC_END           /* depend on thread system */
#define THREAD_PASS                 /* depend on thread system */
#define CHECK_INTERRUPT             /* depend on application */
#define xmalloc     malloc
#define xrealloc    realloc
#define xcalloc     calloc
#define xfree       free
#else
#include "ruby.h"
#include "version.h"
#include "rubysig.h"      /* for DEFER_INTS, ENABLE_INTS */

#define USE_MULTI_THREAD_SYSTEM
#define THREAD_ATOMIC_START          DEFER_INTS
#define THREAD_ATOMIC_END            ENABLE_INTS
#define THREAD_PASS                  rb_thread_schedule()
#define CHECK_INTERRUPT do {\
  if (rb_trap_pending) {\
    if (! rb_prohibit_interrupt) {\
      rb_trap_exec();\
    }\
  }\
} while (0)

#define DEFAULT_WARN_FUNCTION        rb_warn
#define DEFAULT_VERB_WARN_FUNCTION   rb_warning

#endif /* else NOT_RUBY */

#define THREAD_PASS_LIMIT_COUNT     8
#define xmemset     memset
#define xmemcpy     memcpy
#define xmemmove    memmove
#if defined(_WIN32) && !defined(__GNUC__)
#define xalloca     _alloca
#ifdef NOT_RUBY
#define vsnprintf   _vsnprintf
#endif
#else
#define xalloca     alloca
#endif

#ifdef USE_MULTI_THREAD_SYSTEM
#define ONIG_STATE_INC(reg)    (reg)->state++
#define ONIG_STATE_DEC(reg)    (reg)->state--
#else
#define ONIG_STATE_INC(reg)    /* Nothing */
#define ONIG_STATE_DEC(reg)    /* Nothing */
#endif /* USE_MULTI_THREAD_SYSTEM */

#define onig_st_is_member              st_is_member

#ifdef NOT_RUBY

#define st_init_table                  onig_st_init_table
#define st_init_table_with_size        onig_st_init_table_with_size
#define st_init_numtable               onig_st_init_numtable
#define st_init_numtable_with_size     onig_st_init_numtable_with_size
#define st_init_strtable               onig_st_init_strtable
#define st_init_strtable_with_size     onig_st_init_strtable_with_size
#define st_init_strend_table_with_size onig_st_init_strend_table_with_size
#define st_delete                      onig_st_delete
#define st_delete_safe                 onig_st_delete_safe
#define st_insert                      onig_st_insert
#define st_insert_strend               onig_st_insert_strend
#define st_lookup                      onig_st_lookup
#define st_lookup_strend               onig_st_lookup_strend
#define st_foreach                     onig_st_foreach
#define st_add_direct                  onig_st_add_direct
#define st_add_direct_strend           onig_st_add_direct_strend
#define st_free_table                  onig_st_free_table
#define st_cleanup_safe                onig_st_cleanup_safe
#define st_copy                        onig_st_copy
#define st_nothing_key_clone           onig_st_nothing_key_clone
#define st_nothing_key_free            onig_st_nothing_key_free

#else /* NOT_RUBY */

#define onig_st_init_table                  st_init_table
#define onig_st_init_table_with_size        st_init_table_with_size
#define onig_st_init_numtable               st_init_numtable
#define onig_st_init_numtable_with_size     st_init_numtable_with_size
#define onig_st_init_strtable               st_init_strtable
#define onig_st_init_strtable_with_size     st_init_strtable_with_size
#define onig_st_init_strend_table_with_size st_init_strend_table_with_size
#define onig_st_delete                      st_delete
#define onig_st_delete_safe                 st_delete_safe
#define onig_st_insert                      st_insert
#define onig_st_insert_strend               st_insert_strend
#define onig_st_lookup                      st_lookup
#define onig_st_lookup_strend               st_lookup_strend
#define onig_st_foreach                     st_foreach
#define onig_st_add_direct                  st_add_direct
#define onig_st_add_direct_strend           st_add_direct_strend
#define onig_st_free_table                  st_free_table
#define onig_st_cleanup_safe                st_cleanup_safe
#define onig_st_copy                        st_copy
#define onig_st_nothing_key_clone           st_nothing_key_clone
#define onig_st_nothing_key_free            st_nothing_key_free

#endif /* NOT_RUBY */

#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif

#if defined(HAVE_ALLOCA_H) && !defined(__GNUC__)
#include <alloca.h>
#endif

#ifdef HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
#endif

#include <ctype.h>
#ifdef HAVE_SYS_TYPES_H
#ifndef __BORLANDC__
#include <sys/types.h>
#endif
#endif

#ifdef ONIG_DEBUG
# include <stdio.h>
#endif

#include "regenc.h"
#include "oniguruma.h"

#ifdef MIN
#undef MIN
#endif
#ifdef MAX
#undef MAX
#endif
#define MIN(a,b) (((a)>(b))?(b):(a))
#define MAX(a,b) (((a)<(b))?(b):(a))

#define IS_NULL(p)                    (((void*)(p)) == (void*)0)
#define IS_NOT_NULL(p)                (((void*)(p)) != (void*)0)
#define CHECK_NULL_RETURN(p)          if (IS_NULL(p)) return NULL
#define CHECK_NULL_RETURN_VAL(p,val)  if (IS_NULL(p)) return (val)
#define NULL_UCHARP                   ((UChar* )0)

#ifndef PLATFORM_UNALIGNED_WORD_ACCESS
#define WORD_ALIGNMENT_SIZE       SIZEOF_INT

#define GET_ALIGNMENT_PAD_SIZE(addr,pad_size) do {\
  (pad_size) = WORD_ALIGNMENT_SIZE \
               - ((unsigned int )(addr) % WORD_ALIGNMENT_SIZE);\
  if ((pad_size) == WORD_ALIGNMENT_SIZE) (pad_size) = 0;\
} while (0)

#define ALIGNMENT_RIGHT(addr) do {\
  (addr) += (WORD_ALIGNMENT_SIZE - 1);\
  (addr) -= ((unsigned int )(addr) % WORD_ALIGNMENT_SIZE);\
} while (0)

#define B_SHIFT  8
#define B_MASK   0xff

#define SERIALIZE_2BYTE_INT(i,p) do {\
  *(p)     = ((i) >> B_SHIFT) & B_MASK;\
  *((p)+1) = (i) & B_MASK;\
} while (0)

#define SERIALIZE_4BYTE_INT(i,p) do {\
  *(p)     = ((i) >> B_SHIFT*3) & B_MASK;\
  *((p)+1) = ((i) >> B_SHIFT*2) & B_MASK;\
  *((p)+2) = ((i) >> B_SHIFT  ) & B_MASK;\
  *((p)+3) = (i) & B_MASK;\
} while (0)

#define SERIALIZE_8BYTE_INT(i,p) do {\
  *(p)     = ((i) >> B_SHIFT*7) & B_MASK;\
  *((p)+1) = ((i) >> B_SHIFT*6) & B_MASK;\
  *((p)+2) = ((i) >> B_SHIFT*5) & B_MASK;\
  *((p)+3) = ((i) >> B_SHIFT*4) & B_MASK;\
  *((p)+4) = ((i) >> B_SHIFT*3) & B_MASK;\
  *((p)+5) = ((i) >> B_SHIFT*2) & B_MASK;\
  *((p)+6) = ((i) >> B_SHIFT  ) & B_MASK;\
  *((p)+7) = (i) & B_MASK;\
} while (0)

#define GET_2BYTE_INT_INC(type,i,p) do {\
  (i) = (type )(((unsigned int )(*(p)) << B_SHIFT) | (unsigned int )((p)[1]));\
  (p) += 2;\
} while (0)

#define GET_4BYTE_INT_INC(type,i,p) do {\
  (i) = (type )(((unsigned int )((p)[0]) << B_SHIFT*3) | \
                ((unsigned int )((p)[1]) << B_SHIFT*2) | \
                ((unsigned int )((p)[2]) << B_SHIFT  ) | \
                ((unsigned int )((p)[3])             )); \
  (p) += 4;\
} while (0)

#define GET_8BYTE_INT_INC(type,i,p) do {\
  (i) = (type )(((unsigned long )((p)[0]) << B_SHIFT*7) | \
                ((unsigned long )((p)[1]) << B_SHIFT*6) | \
                ((unsigned long )((p)[2]) << B_SHIFT*5) | \
                ((unsigned long )((p)[3]) << B_SHIFT*4) | \
                ((unsigned long )((p)[4]) << B_SHIFT*3) | \
                ((unsigned long )((p)[5]) << B_SHIFT*2) | \
                ((unsigned long )((p)[6]) << B_SHIFT  ) | \
                ((unsigned long )((p)[7])             )); \
  (p) += 8;\
} while (0)

#if SIZEOF_SHORT == 2
#define GET_SHORT_INC(i,p)     GET_2BYTE_INT_INC(short,i,p)
#define SERIALIZE_SHORT(i,p)   SERIALIZE_2BYTE_INT(i,p)
#elif SIZEOF_SHORT == 4
#define GET_SHORT_INC(i,p)     GET_4BYTE_INT_INC(short,i,p)
#define SERIALIZE_SHORT(i,p)   SERIALIZE_4BYTE_INT(i,p)
#elif SIZEOF_SHORT == 8
#define GET_SHORT_INC(i,p)     GET_8BYTE_INT_INC(short,i,p)
#define SERIALIZE_SHORT(i,p)   SERIALIZE_8BYTE_INT(i,p)
#endif

#if SIZEOF_INT == 2
#define GET_INT_INC(i,p)       GET_2BYTE_INT_INC(int,i,p)
#define GET_UINT_INC(i,p)      GET_2BYTE_INT_INC(unsigned,i,p)
#define SERIALIZE_INT(i,p)     SERIALIZE_2BYTE_INT(i,p)
#define SERIALIZE_UINT(i,p)    SERIALIZE_2BYTE_INT(i,p)
#elif SIZEOF_INT == 4
#define GET_INT_INC(i,p)       GET_4BYTE_INT_INC(int,i,p)
#define GET_UINT_INC(i,p)      GET_4BYTE_INT_INC(unsigned,i,p)
#define SERIALIZE_INT(i,p)     SERIALIZE_4BYTE_INT(i,p)
#define SERIALIZE_UINT(i,p)    SERIALIZE_4BYTE_INT(i,p)
#elif SIZEOF_INT == 8
#define GET_INT_INC(i,p)       GET_8BYTE_INT_INC(int,i,p)
#define GET_UINT_INC(i,p)      GET_8BYTE_INT_INC(unsigned,i,p)
#define SERIALIZE_INT(i,p)     SERIALIZE_8BYTE_INT(i,p)
#define SERIALIZE_UINT(i,p)    SERIALIZE_8BYTE_INT(i,p)
#endif

#endif /* PLATFORM_UNALIGNED_WORD_ACCESS */

/* stack pop level */
#define STACK_POP_LEVEL_FREE        0
#define STACK_POP_LEVEL_MEM_START   1
#define STACK_POP_LEVEL_ALL         2

/* optimize flags */
#define ONIG_OPTIMIZE_NONE              0
#define ONIG_OPTIMIZE_EXACT             1   /* Slow Search */
#define ONIG_OPTIMIZE_EXACT_BM          2   /* Boyer Moore Search */
#define ONIG_OPTIMIZE_EXACT_BM_NOT_REV  3   /* BM   (but not simple match) */
#define ONIG_OPTIMIZE_EXACT_IC          4   /* Slow Search (ignore case) */
#define ONIG_OPTIMIZE_MAP               5   /* char map */

/* bit status */
typedef unsigned int  BitStatusType;

#define BIT_STATUS_BITS_NUM          (sizeof(BitStatusType) * 8)
#define BIT_STATUS_CLEAR(stats)      (stats) = 0
#define BIT_STATUS_ON_ALL(stats)     (stats) = ~((BitStatusType )0)
#define BIT_STATUS_AT(stats,n) \
  ((n) < BIT_STATUS_BITS_NUM  ?  ((stats) & (1 << n)) : ((stats) & 1))

#define BIT_STATUS_ON_AT(stats,n) do {\
  if ((n) < BIT_STATUS_BITS_NUM)\
    (stats) |= (1 << (n));\
  else\
    (stats) |= 1;\
} while (0)

#define BIT_STATUS_ON_AT_SIMPLE(stats,n) do {\
  if ((n) < BIT_STATUS_BITS_NUM)\
    (stats) |= (1 << (n));\
} while (0)

#define INT_MAX_LIMIT           ((1UL << (SIZEOF_INT * 8 - 1)) - 1)

#define DIGITVAL(code)    ((code) - '0')
#define ODIGITVAL(code)   DIGITVAL(code)
#define XDIGITVAL(enc,code) \
  (ONIGENC_IS_CODE_DIGIT(enc,code) ? DIGITVAL(code) \
   : (ONIGENC_IS_CODE_UPPER(enc,code) ? (code) - 'A' + 10 : (code) - 'a' + 10))

#define IS_SINGLELINE(option)     ((option) & ONIG_OPTION_SINGLELINE)
#define IS_MULTILINE(option)      ((option) & ONIG_OPTION_MULTILINE)
#define IS_IGNORECASE(option)     ((option) & ONIG_OPTION_IGNORECASE)
#define IS_EXTEND(option)         ((option) & ONIG_OPTION_EXTEND)
#define IS_FIND_LONGEST(option)   ((option) & ONIG_OPTION_FIND_LONGEST)
#define IS_FIND_NOT_EMPTY(option) ((option) & ONIG_OPTION_FIND_NOT_EMPTY)
#define IS_POSIXLINE(option)      (IS_SINGLELINE(option) && IS_MULTILINE(option))
#define IS_FIND_CONDITION(option) ((option) & \
          (ONIG_OPTION_FIND_LONGEST | ONIG_OPTION_FIND_NOT_EMPTY))
#define IS_NOTBOL(option)         ((option) & ONIG_OPTION_NOTBOL)
#define IS_NOTEOL(option)         ((option) & ONIG_OPTION_NOTEOL)
#define IS_POSIX_REGION(option)   ((option) & ONIG_OPTION_POSIX_REGION)

/* OP_SET_OPTION is required for these options.
#define IS_DYNAMIC_OPTION(option) \
  (((option) & (ONIG_OPTION_MULTILINE | ONIG_OPTION_IGNORECASE)) != 0)
*/
/* ignore-case and multibyte status are included in compiled code. */
#define IS_DYNAMIC_OPTION(option)  0

#define REPEAT_INFINITE         -1
#define IS_REPEAT_INFINITE(n)   ((n) == REPEAT_INFINITE)

/* bitset */
#define BITS_PER_BYTE      8
#define SINGLE_BYTE_SIZE   (1 << BITS_PER_BYTE)
#define BITS_IN_ROOM       (sizeof(Bits) * BITS_PER_BYTE)
#define BITSET_SIZE        (SINGLE_BYTE_SIZE / BITS_IN_ROOM)

#ifdef PLATFORM_UNALIGNED_WORD_ACCESS
typedef unsigned int   Bits;
#else
typedef unsigned char  Bits;
#endif
typedef Bits           BitSet[BITSET_SIZE];
typedef Bits*          BitSetRef;

#define SIZE_BITSET        sizeof(BitSet)

#define BITSET_CLEAR(bs) do {\
  int i;\
  for (i = 0; i < BITSET_SIZE; i++) { (bs)[i] = 0; }\
} while (0)

#define BS_ROOM(bs,pos)            (bs)[pos / BITS_IN_ROOM]
#define BS_BIT(pos)                (1 << (pos % BITS_IN_ROOM))

#define BITSET_AT(bs, pos)         (BS_ROOM(bs,pos) & BS_BIT(pos))
#define BITSET_SET_BIT(bs, pos)     BS_ROOM(bs,pos) |= BS_BIT(pos)
#define BITSET_CLEAR_BIT(bs, pos)   BS_ROOM(bs,pos) &= ~(BS_BIT(pos))
#define BITSET_INVERT_BIT(bs, pos)  BS_ROOM(bs,pos) ^= BS_BIT(pos)

/* bytes buffer */
typedef struct _BBuf {
  UChar* p;
  unsigned int used;
  unsigned int alloc;
} BBuf;

#define BBUF_INIT(buf,size)    onig_bbuf_init((BBuf* )(buf), (size))

#define BBUF_SIZE_INC(buf,inc) do{\
  (buf)->alloc += (inc);\
  (buf)->p = (UChar* )xrealloc((buf)->p, (buf)->alloc);\
  if (IS_NULL((buf)->p)) return(ONIGERR_MEMORY);\
} while (0)

#define BBUF_EXPAND(buf,low) do{\
  do { (buf)->alloc *= 2; } while ((buf)->alloc < (unsigned int )low);\
  (buf)->p = (UChar* )xrealloc((buf)->p, (buf)->alloc);\
  if (IS_NULL((buf)->p)) return(ONIGERR_MEMORY);\
} while (0)

#define BBUF_ENSURE_SIZE(buf,size) do{\
  unsigned int new_alloc = (buf)->alloc;\
  while (new_alloc < (unsigned int )(size)) { new_alloc *= 2; }\
  if ((buf)->alloc != new_alloc) {\
    (buf)->p = (UChar* )xrealloc((buf)->p, new_alloc);\
    if (IS_NULL((buf)->p)) return(ONIGERR_MEMORY);\
    (buf)->alloc = new_alloc;\
  }\
} while (0)

#define BBUF_WRITE(buf,pos,bytes,n) do{\
  int used = (pos) + (n);\
  if ((buf)->alloc < (unsigned int )used) BBUF_EXPAND((buf),used);\
  xmemcpy((buf)->p + (pos), (bytes), (n));\
  if ((buf)->used < (unsigned int )used) (buf)->used = used;\
} while (0)

#define BBUF_WRITE1(buf,pos,byte) do{\
  int used = (pos) + 1;\
  if ((buf)->alloc < (unsigned int )used) BBUF_EXPAND((buf),used);\
  (buf)->p[(pos)] = (byte);\
  if ((buf)->used < (unsigned int )used) (buf)->used = used;\
} while (0)

#define BBUF_ADD(buf,bytes,n)       BBUF_WRITE((buf),(buf)->used,(bytes),(n))
#define BBUF_ADD1(buf,byte)         BBUF_WRITE1((buf),(buf)->used,(byte))
#define BBUF_GET_ADD_ADDRESS(buf)   ((buf)->p + (buf)->used)
#define BBUF_GET_OFFSET_POS(buf)    ((buf)->used)

/* from < to */
#define BBUF_MOVE_RIGHT(buf,from,to,n) do {\
  if ((unsigned int )((to)+(n)) > (buf)->alloc) BBUF_EXPAND((buf),(to) + (n));\
  xmemmove((buf)->p + (to), (buf)->p + (from), (n));\
  if ((unsigned int )((to)+(n)) > (buf)->used) (buf)->used = (to) + (n);\
} while (0)

/* from > to */
#define BBUF_MOVE_LEFT(buf,from,to,n) do {\
  xmemmove((buf)->p + (to), (buf)->p + (from), (n));\
} while (0)

/* from > to */
#define BBUF_MOVE_LEFT_REDUCE(buf,from,to) do {\
  xmemmove((buf)->p + (to), (buf)->p + (from), (buf)->used - (from));\
  (buf)->used -= (from - to);\
} while (0)

#define BBUF_INSERT(buf,pos,bytes,n) do {\
  if (pos >= (buf)->used) {\
    BBUF_WRITE(buf,pos,bytes,n);\
  }\
  else {\
    BBUF_MOVE_RIGHT((buf),(pos),(pos) + (n),((buf)->used - (pos)));\
    xmemcpy((buf)->p + (pos), (bytes), (n));\
  }\
} while (0)

#define BBUF_GET_BYTE(buf, pos) (buf)->p[(pos)]

#define ANCHOR_BEGIN_BUF        (1<<0)
#define ANCHOR_BEGIN_LINE       (1<<1)
#define ANCHOR_BEGIN_POSITION   (1<<2)
#define ANCHOR_END_BUF          (1<<3)
#define ANCHOR_SEMI_END_BUF     (1<<4)
#define ANCHOR_END_LINE         (1<<5)

#define ANCHOR_WORD_BOUND       (1<<6)
#define ANCHOR_NOT_WORD_BOUND   (1<<7)
#define ANCHOR_WORD_BEGIN       (1<<8)
#define ANCHOR_WORD_END         (1<<9)
#define ANCHOR_PREC_READ        (1<<10)
#define ANCHOR_PREC_READ_NOT    (1<<11)
#define ANCHOR_LOOK_BEHIND      (1<<12)
#define ANCHOR_LOOK_BEHIND_NOT  (1<<13)

#define ANCHOR_ANYCHAR_STAR     (1<<14)   /* ".*" optimize info */
#define ANCHOR_ANYCHAR_STAR_PL  (1<<15)   /* ".*" optimize info (posix-line) */

/* operation code */
enum OpCode {
  OP_FINISH = 0,        /* matching process terminator (no more alternative) */
  OP_END    = 1,        /* pattern code terminator (success end) */

  OP_EXACT1 = 2,        /* single byte, N = 1 */
  OP_EXACT2,            /* single byte, N = 2 */
  OP_EXACT3,            /* single byte, N = 3 */
  OP_EXACT4,            /* single byte, N = 4 */
  OP_EXACT5,            /* single byte, N = 5 */
  OP_EXACTN,            /* single byte */
  OP_EXACTMB2N1,        /* mb-length = 2 N = 1 */
  OP_EXACTMB2N2,        /* mb-length = 2 N = 2 */
  OP_EXACTMB2N3,        /* mb-length = 2 N = 3 */
  OP_EXACTMB2N,         /* mb-length = 2 */
  OP_EXACTMB3N,         /* mb-length = 3 */
  OP_EXACTMBN,          /* other length */

  OP_EXACT1_IC,         /* single byte, N = 1, ignore case */
  OP_EXACTN_IC,         /* single byte,        ignore case */

  OP_CCLASS,
  OP_CCLASS_MB,
  OP_CCLASS_MIX,
  OP_CCLASS_NOT,
  OP_CCLASS_MB_NOT,
  OP_CCLASS_MIX_NOT,
  OP_CCLASS_NODE,       /* pointer to CClassNode node */

  OP_ANYCHAR,                 /* "."  */
  OP_ANYCHAR_ML,              /* "."  multi-line */
  OP_ANYCHAR_STAR,            /* ".*" */
  OP_ANYCHAR_ML_STAR,         /* ".*" multi-line */
  OP_ANYCHAR_STAR_PEEK_NEXT,
  OP_ANYCHAR_ML_STAR_PEEK_NEXT,

  OP_WORD,
  OP_NOT_WORD,
  OP_WORD_SB,
  OP_WORD_MB,
  OP_WORD_BOUND,
  OP_NOT_WORD_BOUND,
  OP_WORD_BEGIN,
  OP_WORD_END,

  OP_BEGIN_BUF,
  OP_END_BUF,
  OP_BEGIN_LINE,
  OP_END_LINE,
  OP_SEMI_END_BUF,
  OP_BEGIN_POSITION,

  OP_BACKREF1,
  OP_BACKREF2,
  OP_BACKREF3,
  OP_BACKREFN,
  OP_BACKREFN_IC,
  OP_BACKREF_MULTI,
  OP_BACKREF_MULTI_IC,

  OP_MEMORY_START,
  OP_MEMORY_START_PUSH,   /* push back-tracker to stack */
  OP_MEMORY_END_PUSH,     /* push back-tracker to stack */
  OP_MEMORY_END_PUSH_REC, /* push back-tracker to stack */
  OP_MEMORY_END,
  OP_MEMORY_END_REC,      /* push marker to stack */

  OP_SET_OPTION_PUSH,    /* set option and push recover option */
  OP_SET_OPTION,         /* set option */

  OP_FAIL,               /* pop stack and move */
  OP_JUMP,
  OP_PUSH,
  OP_POP,
  OP_PUSH_OR_JUMP_EXACT1,  /* if match exact then push, else jump. */
  OP_PUSH_IF_PEEK_NEXT,    /* if match exact then push, else none. */
  OP_REPEAT,               /* {n,m} */
  OP_REPEAT_NG,            /* {n,m}? (non greedy) */
  OP_REPEAT_INC,
  OP_REPEAT_INC_NG,        /* non greedy */
  OP_REPEAT_INC_SG,        /* search and get in stack */
  OP_REPEAT_INC_NG_SG,     /* search and get in stack (non greedy) */
  OP_NULL_CHECK_START,     /* null loop checker start */
  OP_NULL_CHECK_END,       /* null loop checker end   */
  OP_NULL_CHECK_END_MEMST, /* null loop checker end (with capture status) */
  OP_NULL_CHECK_END_MEMST_PUSH, /* with capture status and push check-end */

  OP_PUSH_POS,             /* (?=...)  start */
  OP_POP_POS,              /* (?=...)  end   */
  OP_PUSH_POS_NOT,         /* (?!...)  start */
  OP_FAIL_POS,             /* (?!...)  end   */
  OP_PUSH_STOP_BT,         /* (?>...)  start */
  OP_POP_STOP_BT,          /* (?>...)  end   */
  OP_LOOK_BEHIND,          /* (?<=...) start (no needs end opcode) */
  OP_PUSH_LOOK_BEHIND_NOT, /* (?<!...) start */
  OP_FAIL_LOOK_BEHIND_NOT, /* (?<!...) end   */

  OP_CALL,                 /* \g<name> */
  OP_RETURN
};

/* arguments type */
#define ARG_SPECIAL     -1
#define ARG_NON          0
#define ARG_RELADDR      1
#define ARG_ABSADDR      2
#define ARG_LENGTH       3
#define ARG_MEMNUM       4
#define ARG_OPTION       5

typedef int RelAddrType;
typedef int AbsAddrType;
typedef int LengthType;
typedef int RepeatNumType;
typedef short int MemNumType;
typedef void* PointerType;

#define SIZE_OPCODE        1
#define SIZE_RELADDR       sizeof(RelAddrType)
#define SIZE_ABSADDR       sizeof(AbsAddrType)
#define SIZE_LENGTH        sizeof(LengthType)
#define SIZE_MEMNUM        sizeof(MemNumType)
#define SIZE_REPEATNUM     sizeof(RepeatNumType)
#define SIZE_OPTION        sizeof(OnigOptionType)
#define SIZE_CODE_POINT    sizeof(OnigCodePoint)
#define SIZE_POINTER       sizeof(PointerType)

#ifdef PLATFORM_UNALIGNED_WORD_ACCESS

#define PLATFORM_GET_INC(val,p,type) do{\
  val  = *(type* )p;\
  (p) += sizeof(type);\
} while(0)

#else

#define PLATFORM_GET_INC(val,p,type) do{\
  xmemcpy(&val, (p), sizeof(type));\
  (p) += sizeof(type);\
} while(0)

#endif  /* PLATFORM_UNALIGNED_WORD_ACCESS */

#define GET_RELADDR_INC(addr,p)    PLATFORM_GET_INC(addr,   p, RelAddrType)
#define GET_ABSADDR_INC(addr,p)    PLATFORM_GET_INC(addr,   p, AbsAddrType)
#define GET_LENGTH_INC(len,p)      PLATFORM_GET_INC(len,    p, LengthType)
#define GET_MEMNUM_INC(num,p)      PLATFORM_GET_INC(num,    p, MemNumType)
#define GET_REPEATNUM_INC(num,p)   PLATFORM_GET_INC(num,    p, RepeatNumType)
#define GET_OPTION_INC(option,p)   PLATFORM_GET_INC(option, p, OnigOptionType)
#define GET_POINTER_INC(ptr,p)     PLATFORM_GET_INC(ptr,    p, PointerType)

/* code point's address must be aligned address. */
#define GET_CODE_POINT(code,p)   code = *((OnigCodePoint* )(p))
#define GET_BYTE_INC(byte,p) do{\
  byte = *(p);\
  (p)++;\
} while(0)

/* op-code + arg size */
#define SIZE_OP_ANYCHAR_STAR            SIZE_OPCODE
#define SIZE_OP_ANYCHAR_STAR_PEEK_NEXT (SIZE_OPCODE + 1)
#define SIZE_OP_JUMP                   (SIZE_OPCODE + SIZE_RELADDR)
#define SIZE_OP_PUSH                   (SIZE_OPCODE + SIZE_RELADDR)
#define SIZE_OP_POP                     SIZE_OPCODE
#define SIZE_OP_PUSH_OR_JUMP_EXACT1    (SIZE_OPCODE + SIZE_RELADDR + 1)
#define SIZE_OP_PUSH_IF_PEEK_NEXT      (SIZE_OPCODE + SIZE_RELADDR + 1)
#define SIZE_OP_REPEAT_INC             (SIZE_OPCODE + SIZE_MEMNUM)
#define SIZE_OP_REPEAT_INC_NG          (SIZE_OPCODE + SIZE_MEMNUM)
#define SIZE_OP_PUSH_POS                SIZE_OPCODE
#define SIZE_OP_PUSH_POS_NOT           (SIZE_OPCODE + SIZE_RELADDR)
#define SIZE_OP_POP_POS                 SIZE_OPCODE
#define SIZE_OP_FAIL_POS                SIZE_OPCODE
#define SIZE_OP_SET_OPTION             (SIZE_OPCODE + SIZE_OPTION)
#define SIZE_OP_SET_OPTION_PUSH        (SIZE_OPCODE + SIZE_OPTION)
#define SIZE_OP_FAIL                    SIZE_OPCODE
#define SIZE_OP_MEMORY_START           (SIZE_OPCODE + SIZE_MEMNUM)
#define SIZE_OP_MEMORY_START_PUSH      (SIZE_OPCODE + SIZE_MEMNUM)
#define SIZE_OP_MEMORY_END_PUSH        (SIZE_OPCODE + SIZE_MEMNUM)
#define SIZE_OP_MEMORY_END_PUSH_REC    (SIZE_OPCODE + SIZE_MEMNUM)
#define SIZE_OP_MEMORY_END             (SIZE_OPCODE + SIZE_MEMNUM)
#define SIZE_OP_MEMORY_END_REC         (SIZE_OPCODE + SIZE_MEMNUM)
#define SIZE_OP_PUSH_STOP_BT            SIZE_OPCODE
#define SIZE_OP_POP_STOP_BT             SIZE_OPCODE
#define SIZE_OP_NULL_CHECK_START       (SIZE_OPCODE + SIZE_MEMNUM)
#define SIZE_OP_NULL_CHECK_END         (SIZE_OPCODE + SIZE_MEMNUM)
#define SIZE_OP_LOOK_BEHIND            (SIZE_OPCODE + SIZE_LENGTH)
#define SIZE_OP_PUSH_LOOK_BEHIND_NOT   (SIZE_OPCODE + SIZE_RELADDR + SIZE_LENGTH)
#define SIZE_OP_FAIL_LOOK_BEHIND_NOT    SIZE_OPCODE
#define SIZE_OP_CALL                   (SIZE_OPCODE + SIZE_ABSADDR)
#define SIZE_OP_RETURN                  SIZE_OPCODE

#define MC_ESC(enc)               (enc)->meta_char_table.esc
#define MC_ANYCHAR(enc)           (enc)->meta_char_table.anychar
#define MC_ANYTIME(enc)           (enc)->meta_char_table.anytime
#define MC_ZERO_OR_ONE_TIME(enc)  (enc)->meta_char_table.zero_or_one_time
#define MC_ONE_OR_MORE_TIME(enc)  (enc)->meta_char_table.one_or_more_time
#define MC_ANYCHAR_ANYTIME(enc)   (enc)->meta_char_table.anychar_anytime

#define SYN_POSIX_COMMON_OP \
 ( ONIG_SYN_OP_DOT_ANYCHAR | ONIG_SYN_OP_POSIX_BRACKET | \
   ONIG_SYN_OP_DECIMAL_BACKREF | \
   ONIG_SYN_OP_BRACKET_CC | ONIG_SYN_OP_ASTERISK_ZERO_INF | \
   ONIG_SYN_OP_LINE_ANCHOR | \
   ONIG_SYN_OP_ESC_CONTROL_CHARS )

#define SYN_GNU_REGEX_OP \
  ( ONIG_SYN_OP_DOT_ANYCHAR | ONIG_SYN_OP_BRACKET_CC | \
    ONIG_SYN_OP_POSIX_BRACKET | ONIG_SYN_OP_DECIMAL_BACKREF | \
    ONIG_SYN_OP_BRACE_INTERVAL | ONIG_SYN_OP_LPAREN_SUBEXP | \
    ONIG_SYN_OP_VBAR_ALT | \
    ONIG_SYN_OP_ASTERISK_ZERO_INF | ONIG_SYN_OP_PLUS_ONE_INF | \
    ONIG_SYN_OP_QMARK_ZERO_ONE | \
    ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR | ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR | \
    ONIG_SYN_OP_ESC_W_WORD | \
    ONIG_SYN_OP_ESC_B_WORD_BOUND | ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END | \
    ONIG_SYN_OP_ESC_S_WHITE_SPACE | ONIG_SYN_OP_ESC_D_DIGIT | \
    ONIG_SYN_OP_LINE_ANCHOR )

#define SYN_GNU_REGEX_BV \
  ( ONIG_SYN_CONTEXT_INDEP_ANCHORS | ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS | \
    ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS | ONIG_SYN_ALLOW_INVALID_INTERVAL | \
    ONIG_SYN_BACKSLASH_ESCAPE_IN_CC | ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC )

/* cclass node */
#define FLAG_CCLASS_NOT            1
#define FLAG_CCLASS_SHARE         (1<<1)

#define CCLASS_SET_NOT(cc)      (cc)->flags |= FLAG_CCLASS_NOT
#define CCLASS_CLEAR_NOT(cc)    (cc)->flags &= ~FLAG_CCLASS_NOT
#define CCLASS_SET_SHARE(cc)    (cc)->flags |= FLAG_CCLASS_SHARE
#define IS_CCLASS_NOT(cc)     (((cc)->flags & FLAG_CCLASS_NOT) != 0)
#define IS_CCLASS_SHARE(cc)   (((cc)->flags & FLAG_CCLASS_SHARE) != 0)

typedef struct {
  int    flags;
  BitSet bs;
  BBuf*  mbuf;     /* multi-byte info or NULL */
} CClassNode;

#ifdef ONIG_DEBUG

typedef struct {
  short int opcode;
  char*     name;
  short int arg_type;
} OnigOpInfoType;

extern OnigOpInfoType OnigOpInfo[];

extern void onig_print_compiled_byte_code P_((FILE* f, UChar* bp, UChar** nextp, OnigEncoding enc));

#ifdef ONIG_DEBUG_STATISTICS
extern void onig_statistics_init P_((void));
extern void onig_print_statistics P_((FILE* f));
#endif
#endif

extern char* onig_error_code_to_format P_((int code));
extern void  onig_snprintf_with_pattern PV_((char buf[], int bufsize, OnigEncoding enc, char* pat, char* pat_end, char *fmt, ...));
extern int  onig_bbuf_init P_((BBuf* buf, int size));
extern int  onig_alloc_init P_((regex_t** reg, OnigOptionType option, OnigAmbigType ambig_flag, OnigEncoding enc, OnigSyntaxType* syntax));
extern int  onig_compile P_((regex_t* reg, const UChar* pattern, const UChar* pattern_end, OnigErrorInfo* einfo));
extern void onig_chain_reduce P_((regex_t* reg));
extern void onig_chain_link_add P_((regex_t* to, regex_t* add));
extern void onig_transfer P_((regex_t* to, regex_t* from));

#endif /* REGINT_H */
/* [<][>][^] [v] [top][bottom][index] [help] */


regparse.c

root/regparse.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. onig_null_warn
  2. onig_set_warn_func
  3. onig_set_verb_warn_func
  4. bbuf_free
  5. bbuf_clone
  6. bitset_set_range
  7. bitset_set_all
  8. bitset_invert
  9. bitset_invert_to
  10. bitset_and
  11. bitset_or
  12. bitset_copy
  13. onig_strncmp
  14. k_strcpy
  15. strdup_with_null
  16. k_strcat_capa
  17. strcat_capa_from_static
  18. NameEntry
  19. st_strend_key
  20. onig_st_init_strend_table_with_size
  21. onig_st_lookup_strend
  22. onig_st_insert_strend
  23. strend_cmp
  24. strend_hash
  25. i_print_name_entry
  26. onig_print_names
  27. i_free_name_entry
  28. names_clear
  29. onig_names_free
  30. name_find
  31. INamesArg
  32. i_names
  33. onig_foreach_name
  34. i_renumber_name
  35. onig_renumber_name_table
  36. onig_number_of_names
  37. NameTable
  38. onig_print_names
  39. names_clear
  40. onig_names_free
  41. name_find
  42. onig_foreach_name
  43. onig_number_of_names
  44. name_add
  45. onig_name_to_group_numbers
  46. onig_name_to_backref_number
  47. onig_name_to_group_numbers
  48. onig_name_to_backref_number
  49. onig_foreach_name
  50. onig_number_of_names
  51. scan_env_clear
  52. scan_env_add_mem_entry
  53. scan_env_set_mem_node
  54. FreeNode
  55. onig_node_free
  56. onig_free_node_list
  57. node_new
  58. initialize_cclass
  59. node_new_cclass
  60. node_new_cclass_by_codepoint_range
  61. node_new_ctype
  62. node_new_anychar
  63. node_new_list
  64. onig_node_new_list
  65. node_new_alt
  66. onig_node_new_anchor
  67. node_new_backref
  68. node_new_call
  69. node_new_qualifier
  70. node_new_effect
  71. onig_node_new_effect
  72. node_new_effect_memory
  73. node_new_option
  74. onig_node_str_cat
  75. node_str_cat_char
  76. onig_node_conv_to_str_node
  77. onig_node_str_clear
  78. node_new_str
  79. onig_node_new_str
  80. node_new_str_raw
  81. node_new_empty
  82. node_new_str_raw_char
  83. str_node_split_last_char
  84. str_node_can_be_split
  85. onig_scan_unsigned_number
  86. scan_unsigned_hexadecimal_number
  87. scan_unsigned_octal_number
  88. new_code_range
  89. add_code_range_to_buf
  90. add_code_range
  91. not_code_range_buf
  92. or_code_range_buf
  93. and_code_range1
  94. and_code_range_buf
  95. clear_not_flag_cclass
  96. and_cclass
  97. or_cclass
  98. conv_backslash_value
  99. is_invalid_qualifier_target
  100. popular_qualifier_num
  101. onig_reduce_nested_qualifier
  102. OnigToken
  103. fetch_range_qualifier
  104. fetch_escaped_value
  105. fetch_name
  106. fetch_name
  107. CC_ESC_WARN
  108. CCEND_ESC_WARN
  109. find_str_position
  110. str_exist_check_with_esc
  111. fetch_token_in_cc
  112. fetch_token
  113. add_ctype_to_cc_by_range
  114. add_ctype_to_cc
  115. parse_ctype_to_enc_ctype
  116. PosixBracketEntryType
  117. parse_posix_bracket
  118. property_name_to_ctype
  119. fetch_char_property_to_ctype
  120. parse_char_property
  121. next_state_class
  122. next_state_val
  123. code_exist_check
  124. parse_char_class
  125. parse_effect
  126. set_qualifier
  127. make_compound_alt_node_from_cc
  128. type_cclass_key
  129. type_cclass_cmp
  130. type_cclass_hash
  131. i_free_shared_class
  132. onig_free_shared_cclass_table
  133. parse_exp
  134. parse_branch
  135. parse_subexp
  136. parse_regexp
  137. onig_parse_make_tree
  138. onig_scan_env_set_error_string
/**********************************************************************
  regparse.c -  Oniguruma (regular expression library)
**********************************************************************/
/*-
 * Copyright (c) 2002-2005  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#include "regparse.h"

#define WARN_BUFSIZE    256

OnigSyntaxType OnigSyntaxRuby = {
  (( SYN_GNU_REGEX_OP | ONIG_SYN_OP_QMARK_NON_GREEDY |
     ONIG_SYN_OP_ESC_OCTAL3 | ONIG_SYN_OP_ESC_X_HEX2 |
     ONIG_SYN_OP_ESC_X_BRACE_HEX8 | ONIG_SYN_OP_ESC_CONTROL_CHARS |
     ONIG_SYN_OP_ESC_C_CONTROL )
   & ~ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END )
  , ( ONIG_SYN_OP2_QMARK_GROUP_EFFECT |
      ONIG_SYN_OP2_OPTION_RUBY |
      ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP | ONIG_SYN_OP2_ESC_K_NAMED_BACKREF |
      ONIG_SYN_OP2_ESC_G_SUBEXP_CALL |
      ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT |
      ONIG_SYN_OP2_CCLASS_SET_OP | ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL |
      ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META | ONIG_SYN_OP2_ESC_V_VTAB |
      ONIG_SYN_OP2_ESC_H_XDIGIT )
  , ( SYN_GNU_REGEX_BV |
      ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV |
      ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND |
      ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP |
      ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME |
      ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY |
      ONIG_SYN_WARN_CC_OP_NOT_ESCAPED |
      ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT )
  , ONIG_OPTION_NONE
};

OnigSyntaxType*  OnigDefaultSyntax = ONIG_SYNTAX_RUBY;

extern void onig_null_warn(const char* s, ...) { }

#ifdef DEFAULT_WARN_FUNCTION
static OnigWarnFunc onig_warn = (OnigWarnFunc )DEFAULT_WARN_FUNCTION;
#else
static OnigWarnFunc onig_warn = onig_null_warn;
#endif

#ifdef DEFAULT_VERB_WARN_FUNCTION
static OnigWarnFunc onig_verb_warn = (OnigWarnFunc )DEFAULT_VERB_WARN_FUNCTION;
#else
static OnigWarnFunc onig_verb_warn = onig_null_warn;
#endif

extern void onig_set_warn_func(OnigWarnFunc f)
{
  onig_warn = f;
}

extern void onig_set_verb_warn_func(OnigWarnFunc f)
{
  onig_verb_warn = f;
}

static void
bbuf_free(BBuf* bbuf)
{
  if (IS_NOT_NULL(bbuf)) {
    if (IS_NOT_NULL(bbuf->p)) xfree(bbuf->p);
    xfree(bbuf);
  }
}

static int
bbuf_clone(BBuf** rto, BBuf* from)
{
  int r;
  BBuf *to;

  *rto = to = (BBuf* )xmalloc(sizeof(BBuf));
  CHECK_NULL_RETURN_VAL(to, ONIGERR_MEMORY);
  r = BBUF_INIT(to, from->alloc);
  if (r != 0) return r;
  to->used = from->used;
  xmemcpy(to->p, from->p, from->used);
  return 0;
}

#define ONOFF(v,f,negative)    (negative) ? ((v) &= ~(f)) : ((v) |= (f))

#define MBCODE_START_POS(enc) \
  (OnigCodePoint )(ONIGENC_MBC_MINLEN(enc) > 1 ? 0 : 0x80)

#define SET_ALL_MULTI_BYTE_RANGE(enc, pbuf) \
  add_code_range_to_buf(pbuf, MBCODE_START_POS(enc), ~((OnigCodePoint )0))

#define ADD_ALL_MULTI_BYTE_RANGE(enc, mbuf) do {\
  if (! ONIGENC_IS_SINGLEBYTE(enc)) {\
    r = SET_ALL_MULTI_BYTE_RANGE(enc, &(mbuf));\
    if (r) return r;\
  }\
} while (0)

#define BITSET_IS_EMPTY(bs,empty) do {\
  int i;\
  empty = 1;\
  for (i = 0; i < BITSET_SIZE; i++) {\
    if ((bs)[i] != 0) {\
      empty = 0; break;\
    }\
  }\
} while (0)

static void
bitset_set_range(BitSetRef bs, int from, int to)
{
  int i;
  for (i = from; i <= to && i < SINGLE_BYTE_SIZE; i++) {
    BITSET_SET_BIT(bs, i);
  }
}

#if 0
static void
bitset_set_all(BitSetRef bs)
{
  int i;
  for (i = 0; i < BITSET_SIZE; i++) {
    bs[i] = ~((Bits )0);
  }
}
#endif

static void
bitset_invert(BitSetRef bs)
{
  int i;
  for (i = 0; i < BITSET_SIZE; i++) {
    bs[i] = ~(bs[i]);
  }
}

static void
bitset_invert_to(BitSetRef from, BitSetRef to)
{
  int i;
  for (i = 0; i < BITSET_SIZE; i++) {
    to[i] = ~(from[i]);
  }
}

static void
bitset_and(BitSetRef dest, BitSetRef bs)
{
  int i;
  for (i = 0; i < BITSET_SIZE; i++) {
    dest[i] &= bs[i];
  }
}

static void
bitset_or(BitSetRef dest, BitSetRef bs)
{
  int i;
  for (i = 0; i < BITSET_SIZE; i++) {
    dest[i] |= bs[i];
  }
}

static void
bitset_copy(BitSetRef dest, BitSetRef bs)
{
  int i;
  for (i = 0; i < BITSET_SIZE; i++) {
    dest[i] = bs[i];
  }
}

extern int
onig_strncmp(const UChar* s1, const UChar* s2, int n)
{
  int x;

  while (n-- > 0) {
    x = *s2++ - *s1++;
    if (x) return x;
  }
  return 0;
}

static void
k_strcpy(UChar* dest, const UChar* src, const UChar* end)
{
  int len = end - src;
  if (len > 0) {
    xmemcpy(dest, src, len);
    dest[len] = (UChar )0;
  }
}

static UChar*
strdup_with_null(OnigEncoding enc, UChar* s, UChar* end)
{
  int slen, term_len, i;
  UChar *r;

  slen = end - s;
  term_len = ONIGENC_MBC_MINLEN(enc);

  r = (UChar* )xmalloc(slen + term_len);
  CHECK_NULL_RETURN(r);
  xmemcpy(r, s, slen);

  for (i = 0; i < term_len; i++)
    r[slen + i] = (UChar )0;

  return r;
}

/* scan pattern methods */
#define PEND_VALUE   0

#define PFETCH_READY  UChar* pfetch_prev
#define PEND         (p < end ?  0 : 1)
#define PUNFETCH     p = pfetch_prev
#define PINC       do { \
  pfetch_prev = p; \
  p += ONIGENC_MBC_ENC_LEN(enc, p); \
} while (0)
#define PFETCH(c)  do { \
  c = ONIGENC_MBC_TO_CODE(enc, p, end); \
  pfetch_prev = p; \
  p += ONIGENC_MBC_ENC_LEN(enc, p); \
} while (0)

#define PPEEK        (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
#define PPEEK_IS(c)  (PPEEK == (OnigCodePoint )c)

static UChar*
k_strcat_capa(UChar* dest, UChar* dest_end, const UChar* src, const UChar* src_end,
              int capa)
{
  UChar* r;

  if (dest)
    r = (UChar* )xrealloc(dest, capa + 1);
  else
    r = (UChar* )xmalloc(capa + 1);

  CHECK_NULL_RETURN(r);
  k_strcpy(r + (dest_end - dest), src, src_end);
  return r;
}

/* dest on static area */
static UChar*
strcat_capa_from_static(UChar* dest, UChar* dest_end,
                        const UChar* src, const UChar* src_end, int capa)
{
  UChar* r;

  r = (UChar* )xmalloc(capa + 1);
  CHECK_NULL_RETURN(r);
  k_strcpy(r, dest, dest_end);
  k_strcpy(r + (dest_end - dest), src, src_end);
  return r;
}

#ifdef USE_NAMED_GROUP

#define INIT_NAME_BACKREFS_ALLOC_NUM   8

typedef struct {
  UChar* name;
  int    name_len;   /* byte length */
  int    back_num;   /* number of backrefs */
  int    back_alloc;
  int    back_ref1;
  int*   back_refs;
} NameEntry;

#ifdef USE_ST_HASH_TABLE

#include "st.h"

typedef struct {
  unsigned char* s;
  unsigned char* end;
} st_strend_key;

static int strend_cmp(st_strend_key*, st_strend_key*);
static int strend_hash(st_strend_key*);

static struct st_hash_type type_strend_hash = {
  strend_cmp,
  strend_hash,
};

static st_table*
onig_st_init_strend_table_with_size(int size)
{
    return onig_st_init_table_with_size(&type_strend_hash, size);
}

static int
onig_st_lookup_strend(st_table *table, const UChar* str_key, const UChar* end_key, st_data_t *value)
{
    st_strend_key key;

    key.s   = (unsigned char* )str_key;
    key.end = (unsigned char* )end_key;

    return onig_st_lookup(table, (st_data_t )(&key), value);
}

static int
onig_st_insert_strend(st_table *table, const UChar* str_key, const UChar* end_key, st_data_t value)
{
  st_strend_key* key;
  int result;

  key = (st_strend_key* )xmalloc(sizeof(st_strend_key));
  key->s   = (unsigned char* )str_key;
  key->end = (unsigned char* )end_key;
  result = onig_st_insert(table, (st_data_t )key, value);
  if (result) {
    xfree(key);
  }
  return result;
}

static int
strend_cmp(st_strend_key* x, st_strend_key* y)
{
  unsigned char *p, *q;
  int c;

  if ((x->end - x->s) != (y->end - y->s))
    return 1;

  p = x->s;
  q = y->s;
  while (p < x->end) {
    c = (int )*p - (int )*q;
    if (c != 0) return c;

    p++; q++;
  }

  return 0;
}

static int
strend_hash(st_strend_key* x)
{
  int val;
  unsigned char *p;

  val = 0;
  p = x->s;
  while (p < x->end) {
    val = val * 997 + (int )*p++;
  }

  return val + (val >> 5);
}

typedef st_table  NameTable;
typedef st_data_t HashDataType;   /* 1.6 st.h doesn't define st_data_t type */

#define NAMEBUF_SIZE    24
#define NAMEBUF_SIZE_1  25

#ifdef ONIG_DEBUG
static int
i_print_name_entry(UChar* key, NameEntry* e, void* arg)
{
  int i;
  FILE* fp = (FILE* )arg;

  fprintf(fp, "%s: ", e->name);
  if (e->back_num == 0)
    fputs("-", fp);
  else if (e->back_num == 1)
    fprintf(fp, "%d", e->back_ref1);
  else {
    for (i = 0; i < e->back_num; i++) {
      if (i > 0) fprintf(fp, ", ");
      fprintf(fp, "%d", e->back_refs[i]);
    }
  }
  fputs("\n", fp);
  return ST_CONTINUE;
}

extern int
onig_print_names(FILE* fp, regex_t* reg)
{
  NameTable* t = (NameTable* )reg->name_table;

  if (IS_NOT_NULL(t)) {
    fprintf(fp, "name table\n");
    onig_st_foreach(t, i_print_name_entry, (HashDataType )fp);
    fputs("\n", fp);
  }
  return 0;
}
#endif

static int
i_free_name_entry(UChar* key, NameEntry* e, void* arg)
{
  xfree(e->name);
  if (IS_NOT_NULL(e->back_refs)) xfree(e->back_refs);
  xfree(key);
  xfree(e);
  return ST_DELETE;
}

static int
names_clear(regex_t* reg)
{
  NameTable* t = (NameTable* )reg->name_table;

  if (IS_NOT_NULL(t)) {
    onig_st_foreach(t, i_free_name_entry, 0);
  }
  return 0;
}

extern int
onig_names_free(regex_t* reg)
{
  int r;
  NameTable* t;

  r = names_clear(reg);
  if (r) return r;

  t = (NameTable* )reg->name_table;
  if (IS_NOT_NULL(t)) onig_st_free_table(t);
  reg->name_table = (void* )NULL;
  return 0;
}

static NameEntry*
name_find(regex_t* reg, const UChar* name, const UChar* name_end)
{
  NameEntry* e;
  NameTable* t = (NameTable* )reg->name_table;

  e = (NameEntry* )NULL;
  if (IS_NOT_NULL(t)) {
    onig_st_lookup_strend(t, name, name_end, (HashDataType* )((void* )(&e)));
  }
  return e;
}

typedef struct {
  int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*);
  regex_t* reg;
  void* arg;
  int ret;
  OnigEncoding enc;
} INamesArg;

static int
i_names(UChar* key, NameEntry* e, INamesArg* arg)
{
  int r = (*(arg->func))(e->name,
                   /*e->name + onigenc_str_bytelen_null(arg->enc, e->name), */
                         e->name + e->name_len,
                         e->back_num,
                         (e->back_num > 1 ? e->back_refs : &(e->back_ref1)),
                         arg->reg, arg->arg);
  if (r != 0) {
    arg->ret = r;
    return ST_STOP;
  }
  return ST_CONTINUE;
}

extern int
onig_foreach_name(regex_t* reg,
           int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*),
           void* arg)
{
  INamesArg narg;
  NameTable* t = (NameTable* )reg->name_table;

  narg.ret = 0;
  if (IS_NOT_NULL(t)) {
    narg.func = func;
    narg.reg  = reg;
    narg.arg  = arg;
    narg.enc  = reg->enc; /* should be pattern encoding. */
    onig_st_foreach(t, i_names, (HashDataType )&narg);
  }
  return narg.ret;
}

static int
i_renumber_name(UChar* key, NameEntry* e, GroupNumRemap* map)
{
  int i;

  if (e->back_num > 1) {
    for (i = 0; i < e->back_num; i++) {
      e->back_refs[i] = map[e->back_refs[i]].new_val;
    }
  }
  else if (e->back_num == 1) {
    e->back_ref1 = map[e->back_ref1].new_val;
  }

  return ST_CONTINUE;
}

extern int
onig_renumber_name_table(regex_t* reg, GroupNumRemap* map)
{
  NameTable* t = (NameTable* )reg->name_table;

  if (IS_NOT_NULL(t)) {
    onig_st_foreach(t, i_renumber_name, (HashDataType )map);
  }
  return 0;
}

extern int
onig_number_of_names(regex_t* reg)
{
  NameTable* t = (NameTable* )reg->name_table;

  if (IS_NOT_NULL(t))
    return t->num_entries;
  else
    return 0;
}

#else  /* USE_ST_HASH_TABLE */

#define INIT_NAMES_ALLOC_NUM    8

typedef struct {
  NameEntry* e;
  int        num;
  int        alloc;
} NameTable;

#ifdef ONIG_DEBUG
extern int
onig_print_names(FILE* fp, regex_t* reg)
{
  int i, j;
  NameEntry* e;
  NameTable* t = (NameTable* )reg->name_table;

  if (IS_NOT_NULL(t) && t->num > 0) {
    fprintf(fp, "name table\n");
    for (i = 0; i < t->num; i++) {
      e = &(t->e[i]);
      fprintf(fp, "%s: ", e->name);
      if (e->back_num == 0) {
        fputs("-", fp);
      }
      else if (e->back_num == 1) {
        fprintf(fp, "%d", e->back_ref1);
      }
      else {
        for (j = 0; j < e->back_num; j++) {
          if (j > 0) fprintf(fp, ", ");
          fprintf(fp, "%d", e->back_refs[j]);
        }
      }
      fputs("\n", fp);
    }
    fputs("\n", fp);
  }
  return 0;
}
#endif

static int
names_clear(regex_t* reg)
{
  int i;
  NameEntry* e;
  NameTable* t = (NameTable* )reg->name_table;

  if (IS_NOT_NULL(t)) {
    for (i = 0; i < t->num; i++) {
      e = &(t->e[i]);
      if (IS_NOT_NULL(e->name)) {
        xfree(e->name);
        e->name       = NULL;
        e->name_len   = 0;
        e->back_num   = 0;
        e->back_alloc = 0;
        if (IS_NOT_NULL(e->back_refs)) xfree(e->back_refs);
        e->back_refs = (int* )NULL;
      }
    }
    if (IS_NOT_NULL(t->e)) {
      xfree(t->e);
      t->e = NULL;
    }
    t->num = 0;
  }
  return 0;
}

extern int
onig_names_free(regex_t* reg)
{
  int r;
  NameTable* t;

  r = names_clear(reg);
  if (r) return r;

  t = (NameTable* )reg->name_table;
  if (IS_NOT_NULL(t)) xfree(t);
  reg->name_table = NULL;
  return 0;
}

static NameEntry*
name_find(regex_t* reg, UChar* name, UChar* name_end)
{
  int i, len;
  NameEntry* e;
  NameTable* t = (NameTable* )reg->name_table;

  if (IS_NOT_NULL(t)) {
    len = name_end - name;
    for (i = 0; i < t->num; i++) {
      e = &(t->e[i]);
      if (len == e->name_len && onig_strncmp(name, e->name, len) == 0)
        return e;
    }
  }
  return (NameEntry* )NULL;
}

extern int
onig_foreach_name(regex_t* reg,
           int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*),
           void* arg)
{
  int i, r;
  NameEntry* e;
  NameTable* t = (NameTable* )reg->name_table;

  if (IS_NOT_NULL(t)) {
    for (i = 0; i < t->num; i++) {
      e = &(t->e[i]);
      r = (*func)(e->name, e->name + e->name_len, e->back_num,
                  (e->back_num > 1 ? e->back_refs : &(e->back_ref1)),
                  reg, arg);
      if (r != 0) return r;
    }
  }
  return 0;
}

extern int
onig_number_of_names(regex_t* reg)
{
  NameTable* t = (NameTable* )reg->name_table;

  if (IS_NOT_NULL(t))
    return t->num;
  else
    return 0;
}

#endif /* else USE_ST_HASH_TABLE */

static int
name_add(regex_t* reg, UChar* name, UChar* name_end, int backref, ScanEnv* env)
{
  int alloc;
  NameEntry* e;
  NameTable* t = (NameTable* )reg->name_table;

  if (name_end - name <= 0)
    return ONIGERR_EMPTY_GROUP_NAME;

  e = name_find(reg, name, name_end);
  if (IS_NULL(e)) {
#ifdef USE_ST_HASH_TABLE
    if (IS_NULL(t)) {
      t = onig_st_init_strend_table_with_size(5);
      reg->name_table = (void* )t;
    }
    e = (NameEntry* )xmalloc(sizeof(NameEntry));
    CHECK_NULL_RETURN_VAL(e, ONIGERR_MEMORY);

    e->name = strdup_with_null(reg->enc, name, name_end);
    if (IS_NULL(e->name)) return ONIGERR_MEMORY;
    onig_st_insert_strend(t, e->name, (e->name + (name_end - name)),
                          (HashDataType )e);

    e->name_len   = name_end - name;
    e->back_num   = 0;
    e->back_alloc = 0;
    e->back_refs  = (int* )NULL;

#else

    if (IS_NULL(t)) {
      alloc = INIT_NAMES_ALLOC_NUM;
      t = (NameTable* )xmalloc(sizeof(NameTable));
      CHECK_NULL_RETURN_VAL(t, ONIGERR_MEMORY);
      t->e     = NULL;
      t->alloc = 0;
      t->num   = 0;

      t->e = (NameEntry* )xmalloc(sizeof(NameEntry) * alloc);
      if (IS_NULL(t->e)) {
        xfree(t);
        return ONIGERR_MEMORY;
      }
      t->alloc = alloc;
      reg->name_table = t;
      goto clear;
    }
    else if (t->num == t->alloc) {
      int i;

      alloc = t->alloc * 2;
      t->e = (NameEntry* )xrealloc(t->e, sizeof(NameEntry) * alloc);
      CHECK_NULL_RETURN_VAL(t->e, ONIGERR_MEMORY);
      t->alloc = alloc;

    clear:
      for (i = t->num; i < t->alloc; i++) {
        t->e[i].name       = NULL;
        t->e[i].name_len   = 0;
        t->e[i].back_num   = 0;
        t->e[i].back_alloc = 0;
        t->e[i].back_refs  = (int* )NULL;
      }
    }
    e = &(t->e[t->num]);
    t->num++;
    e->name = strdup_with_null(reg->enc, name, name_end);
    e->name_len = name_end - name;
#endif
  }

  if (e->back_num >= 1 &&
      ! IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME)) {
    onig_scan_env_set_error_string(env, ONIGERR_MULTIPLEX_DEFINED_NAME,
                                    name, name_end);
    return ONIGERR_MULTIPLEX_DEFINED_NAME;
  }

  e->back_num++;
  if (e->back_num == 1) {
    e->back_ref1 = backref;
  }
  else {
    if (e->back_num == 2) {
      alloc = INIT_NAME_BACKREFS_ALLOC_NUM;
      e->back_refs = (int* )xmalloc(sizeof(int) * alloc);
      CHECK_NULL_RETURN_VAL(e->back_refs, ONIGERR_MEMORY);
      e->back_alloc = alloc;
      e->back_refs[0] = e->back_ref1;
      e->back_refs[1] = backref;
    }
    else {
      if (e->back_num > e->back_alloc) {
        alloc = e->back_alloc * 2;
        e->back_refs = (int* )xrealloc(e->back_refs, sizeof(int) * alloc);
        CHECK_NULL_RETURN_VAL(e->back_refs, ONIGERR_MEMORY);
        e->back_alloc = alloc;
      }
      e->back_refs[e->back_num - 1] = backref;
    }
  }

  return 0;
}

extern int
onig_name_to_group_numbers(regex_t* reg, const UChar* name,
                           const UChar* name_end, int** nums)
{
  NameEntry* e;

  e = name_find(reg, name, name_end);
  if (IS_NULL(e)) return ONIGERR_UNDEFINED_NAME_REFERENCE;

  switch (e->back_num) {
  case 0:
    break;
  case 1:
    *nums = &(e->back_ref1);
    break;
  default:
    *nums = e->back_refs;
    break;
  }
  return e->back_num;
}

extern int
onig_name_to_backref_number(regex_t* reg, const UChar* name,
                            const UChar* name_end, OnigRegion *region)
{
  int i, n, *nums;

  n = onig_name_to_group_numbers(reg, name, name_end, &nums);
  if (n < 0)
    return n;
  else if (n == 0)
    return ONIGERR_PARSER_BUG;
  else if (n == 1)
    return nums[0];
  else {
    if (IS_NOT_NULL(region)) {
      for (i = n - 1; i >= 0; i--) {
        if (region->beg[nums[i]] != ONIG_REGION_NOTPOS)
          return nums[i];
      }
    }
    return nums[n - 1];
  }
}

#else /* USE_NAMED_GROUP */

extern int
onig_name_to_group_numbers(regex_t* reg, const UChar* name,
                           const UChar* name_end, int** nums)
{
  return ONIG_NO_SUPPORT_CONFIG;
}

extern int
onig_name_to_backref_number(regex_t* reg, const UChar* name,
                            const UChar* name_end, OnigRegion* region)
{
  return ONIG_NO_SUPPORT_CONFIG;
}

extern int
onig_foreach_name(regex_t* reg,
           int (*func)(const UChar*, const UChar*,int,int*,regex_t*,void*),
           void* arg)
{
  return ONIG_NO_SUPPORT_CONFIG;
}

extern int
onig_number_of_names(regex_t* reg)
{
  return 0;
}
#endif /* else USE_NAMED_GROUP */

#define INIT_SCANENV_MEMNODES_ALLOC_SIZE   16

static void
scan_env_clear(ScanEnv* env)
{
  int i;

  BIT_STATUS_CLEAR(env->capture_history);
  BIT_STATUS_CLEAR(env->bt_mem_start);
  BIT_STATUS_CLEAR(env->bt_mem_end);
  BIT_STATUS_CLEAR(env->backrefed_mem);
  env->error             = (UChar* )NULL;
  env->error_end         = (UChar* )NULL;
  env->num_call          = 0;
  env->num_mem           = 0;
#ifdef USE_NAMED_GROUP
  env->num_named         = 0;
#endif
  env->mem_alloc         = 0;
  env->mem_nodes_dynamic = (Node** )NULL;

  for (i = 0; i < SCANENV_MEMNODES_SIZE; i++)
    env->mem_nodes_static[i] = NULL_NODE;
}

static int
scan_env_add_mem_entry(ScanEnv* env)
{
  int i, need, alloc;
  Node** p;

  need = env->num_mem + 1;
  if (need >= SCANENV_MEMNODES_SIZE) {
    if (env->mem_alloc <= need) {
      if (IS_NULL(env->mem_nodes_dynamic)) {
        alloc = INIT_SCANENV_MEMNODES_ALLOC_SIZE;
        p = (Node** )xmalloc(sizeof(Node*) * alloc);
        xmemcpy(p, env->mem_nodes_static,
                sizeof(Node*) * SCANENV_MEMNODES_SIZE);
      }
      else {
        alloc = env->mem_alloc * 2;
        p = (Node** )xrealloc(env->mem_nodes_dynamic, sizeof(Node*) * alloc);
      }
      CHECK_NULL_RETURN_VAL(p, ONIGERR_MEMORY);

      for (i = env->num_mem + 1; i < alloc; i++)
        p[i] = NULL_NODE;

      env->mem_nodes_dynamic = p;
      env->mem_alloc = alloc;
    }
  }

  env->num_mem++;
  return env->num_mem;
}

static int
scan_env_set_mem_node(ScanEnv* env, int num, Node* node)
{
  if (env->num_mem >= num)
    SCANENV_MEM_NODES(env)[num] = node;
  else
    return ONIGERR_PARSER_BUG;
  return 0;
}

#ifdef USE_RECYCLE_NODE
typedef struct _FreeNode {
  struct _FreeNode* next;
} FreeNode;

static FreeNode* FreeNodeList = (FreeNode* )NULL;
#endif

extern void
onig_node_free(Node* node)
{
 start:
  if (IS_NULL(node)) return ;

  switch (NTYPE(node)) {
  case N_STRING:
    if (IS_NOT_NULL(NSTRING(node).s) && NSTRING(node).s != NSTRING(node).buf) {
      xfree(NSTRING(node).s);
    }
    break;

  case N_LIST:
  case N_ALT:
    onig_node_free(NCONS(node).left);
    /* onig_node_free(NCONS(node).right); */
    {
      Node* next_node = NCONS(node).right;

#ifdef USE_RECYCLE_NODE
      {
        FreeNode* n = (FreeNode* )node;

        THREAD_ATOMIC_START;
        n->next = FreeNodeList;
        FreeNodeList = n;
        THREAD_ATOMIC_END;
      }
#else
      xfree(node);
#endif

      node = next_node;
      goto start;
    }
    break;

  case N_CCLASS:
    {
      CClassNode* cc = &(NCCLASS(node));

      if (IS_CCLASS_SHARE(cc))
        return ;

      if (cc->mbuf)
        bbuf_free(cc->mbuf);
    }
    break;

  case N_QUALIFIER:
    if (NQUALIFIER(node).target)
      onig_node_free(NQUALIFIER(node).target);
    break;

  case N_EFFECT:
    if (NEFFECT(node).target)
      onig_node_free(NEFFECT(node).target);
    break;

  case N_BACKREF:
    if (IS_NOT_NULL(NBACKREF(node).back_dynamic))
      xfree(NBACKREF(node).back_dynamic);
    break;

  case N_ANCHOR:
    if (NANCHOR(node).target)
      onig_node_free(NANCHOR(node).target);
    break;
  }

#ifdef USE_RECYCLE_NODE
  {
    FreeNode* n = (FreeNode* )node;

    THREAD_ATOMIC_START;
    n->next = FreeNodeList;
    FreeNodeList = n;
    THREAD_ATOMIC_END;
  }
#else
  xfree(node);
#endif
}

#ifdef USE_RECYCLE_NODE
extern int
onig_free_node_list(void)
{
  FreeNode* n;

  THREAD_ATOMIC_START;
  while (FreeNodeList) {
    n = FreeNodeList;
    FreeNodeList = FreeNodeList->next;
    xfree(n);
  }
  THREAD_ATOMIC_END;
  return 0;
}
#endif

static Node*
node_new(void)
{
  Node* node;

#ifdef USE_RECYCLE_NODE
  if (IS_NOT_NULL(FreeNodeList)) {
    THREAD_ATOMIC_START;
    node = (Node* )FreeNodeList;
    FreeNodeList = FreeNodeList->next;
    THREAD_ATOMIC_END;
    return node;
  }
#endif

  node = (Node* )xmalloc(sizeof(Node));
  return node;
}

static void
initialize_cclass(CClassNode* cc)
{
  BITSET_CLEAR(cc->bs);
  cc->flags = 0;
  cc->mbuf  = NULL;
}

static Node*
node_new_cclass(void)
{
  Node* node = node_new();
  CHECK_NULL_RETURN(node);
  node->type = N_CCLASS;

  initialize_cclass(&(NCCLASS(node)));
  return node;
}

static Node*
node_new_cclass_by_codepoint_range(int not,
                   OnigCodePoint sbr[], OnigCodePoint mbr[])
{
  CClassNode* cc;
  int n, i, j;

  Node* node = node_new();
  CHECK_NULL_RETURN(node);
  node->type = N_CCLASS;

  cc = &(NCCLASS(node));
  cc->flags = 0;
  if (not != 0) CCLASS_SET_NOT(cc);

  BITSET_CLEAR(cc->bs);
  if (IS_NOT_NULL(sbr)) {
    n = ONIGENC_CODE_RANGE_NUM(sbr);
    for (i = 0; i < n; i++) {
      for (j  = ONIGENC_CODE_RANGE_FROM(sbr, i);
           j <= (int )ONIGENC_CODE_RANGE_TO(sbr, i); j++) {
        BITSET_SET_BIT(cc->bs, j);
      }
    }
  }

  if (IS_NULL(mbr)) {
  is_null:
    cc->mbuf = NULL;
  }
  else {
    BBuf* bbuf;

    n = ONIGENC_CODE_RANGE_NUM(mbr);
    if (n == 0) goto is_null;

    bbuf = (BBuf* )xmalloc(sizeof(BBuf));
    CHECK_NULL_RETURN_VAL(bbuf, NULL);
    bbuf->alloc = n + 1;
    bbuf->used  = n + 1;
    bbuf->p     = (UChar* )((void* )mbr);

    cc->mbuf = bbuf;
  }

  return node;
}

static Node*
node_new_ctype(int type)
{
  Node* node = node_new();
  CHECK_NULL_RETURN(node);
  node->type = N_CTYPE;
  NCTYPE(node).type = type;
  return node;
}

static Node*
node_new_anychar(void)
{
  Node* node = node_new();
  CHECK_NULL_RETURN(node);
  node->type = N_ANYCHAR;
  return node;
}

static Node*
node_new_list(Node* left, Node* right)
{
  Node* node = node_new();
  CHECK_NULL_RETURN(node);
  node->type = N_LIST;
  NCONS(node).left  = left;
  NCONS(node).right = right;
  return node;
}

extern Node*
onig_node_new_list(Node* left, Node* right)
{
  return node_new_list(left, right);
}

static Node*
node_new_alt(Node* left, Node* right)
{
  Node* node = node_new();
  CHECK_NULL_RETURN(node);
  node->type = N_ALT;
  NCONS(node).left  = left;
  NCONS(node).right = right;
  return node;
}

extern Node*
onig_node_new_anchor(int type)
{
  Node* node = node_new();
  CHECK_NULL_RETURN(node);
  node->type = N_ANCHOR;
  NANCHOR(node).type     = type;
  NANCHOR(node).target   = NULL;
  NANCHOR(node).char_len = -1;
  return node;
}

static Node*
node_new_backref(int back_num, int* backrefs, int by_name, ScanEnv* env)
{
  int i;
  Node* node = node_new();

  CHECK_NULL_RETURN(node);
  node->type = N_BACKREF;
  NBACKREF(node).state    = 0;
  NBACKREF(node).back_num = back_num;
  NBACKREF(node).back_dynamic = (int* )NULL;
  if (by_name != 0)
    NBACKREF(node).state |= NST_NAME_REF;

  for (i = 0; i < back_num; i++) {
    if (backrefs[i] <= env->num_mem &&
        IS_NULL(SCANENV_MEM_NODES(env)[backrefs[i]])) {
      NBACKREF(node).state |= NST_RECURSION;   /* /...(\1).../ */
      break;
    }
  }

  if (back_num <= NODE_BACKREFS_SIZE) {
    for (i = 0; i < back_num; i++)
      NBACKREF(node).back_static[i] = backrefs[i];
  }
  else {
    int* p = (int* )xmalloc(sizeof(int) * back_num);
    if (IS_NULL(p)) {
      onig_node_free(node);
      return NULL;
    }
    NBACKREF(node).back_dynamic = p;
    for (i = 0; i < back_num; i++)
      p[i] = backrefs[i];
  }
  return node;
}

#ifdef USE_SUBEXP_CALL
static Node*
node_new_call(UChar* name, UChar* name_end)
{
  Node* node = node_new();
  CHECK_NULL_RETURN(node);

  node->type = N_CALL;
  NCALL(node).state    = 0;
  NCALL(node).ref_num  = CALLNODE_REFNUM_UNDEF;
  NCALL(node).target   = NULL_NODE;
  NCALL(node).name     = name;
  NCALL(node).name_end = name_end;
  return node;
}
#endif

static Node*
node_new_qualifier(int lower, int upper, int by_number)
{
  Node* node = node_new();
  CHECK_NULL_RETURN(node);
  node->type = N_QUALIFIER;
  NQUALIFIER(node).state  = 0;
  NQUALIFIER(node).target = NULL;
  NQUALIFIER(node).lower  = lower;
  NQUALIFIER(node).upper  = upper;
  NQUALIFIER(node).greedy = 1;
  NQUALIFIER(node).by_number         = by_number;
  NQUALIFIER(node).target_empty_info = NQ_TARGET_ISNOT_EMPTY;
  NQUALIFIER(node).head_exact        = NULL_NODE;
  NQUALIFIER(node).next_head_exact   = NULL_NODE;
  NQUALIFIER(node).is_refered        = 0;
  return node;
}

static Node*
node_new_effect(int type)
{
  Node* node = node_new();
  CHECK_NULL_RETURN(node);
  node->type = N_EFFECT;
  NEFFECT(node).type      = type;
  NEFFECT(node).state     =  0;
  NEFFECT(node).regnum    =  0;
  NEFFECT(node).option    =  0;
  NEFFECT(node).target    = NULL;
  NEFFECT(node).call_addr = -1;
  NEFFECT(node).opt_count =  0;
  return node;
}

extern Node*
onig_node_new_effect(int type)
{
  return node_new_effect(type);
}

static Node*
node_new_effect_memory(OnigOptionType option, int is_named)
{
  Node* node = node_new_effect(EFFECT_MEMORY);
  CHECK_NULL_RETURN(node);
  if (is_named != 0)
    SET_EFFECT_STATUS(node, NST_NAMED_GROUP);

#ifdef USE_SUBEXP_CALL
  NEFFECT(node).option = option;
#endif
  return node;
}

static Node*
node_new_option(OnigOptionType option)
{
  Node* node = node_new_effect(EFFECT_OPTION);
  CHECK_NULL_RETURN(node);
  NEFFECT(node).option = option;
  return node;
}

extern int
onig_node_str_cat(Node* node, const UChar* s, const UChar* end)
{
  int addlen = end - s;

  if (addlen > 0) {
    int len  = NSTRING(node).end - NSTRING(node).s;

    if (NSTRING(node).capa > 0 || (len + addlen > NODE_STR_BUF_SIZE - 1)) {
      UChar* p;
      int capa = len + addlen + NODE_STR_MARGIN;

      if (capa <= NSTRING(node).capa) {
        k_strcpy(NSTRING(node).s + len, s, end);
      }
      else {
        if (NSTRING(node).s == NSTRING(node).buf)
          p = strcat_capa_from_static(NSTRING(node).s, NSTRING(node).end,
                                      s, end, capa);
        else
          p = k_strcat_capa(NSTRING(node).s, NSTRING(node).end, s, end, capa);

        CHECK_NULL_RETURN_VAL(p, ONIGERR_MEMORY);
        NSTRING(node).s    = p;
        NSTRING(node).capa = capa;
      }
    }
    else {
      k_strcpy(NSTRING(node).s + len, s, end);
    }
    NSTRING(node).end = NSTRING(node).s + len + addlen;
  }

  return 0;
}

static int
node_str_cat_char(Node* node, UChar c)
{
  UChar s[1];

  s[0] = c;
  return onig_node_str_cat(node, s, s + 1);
}

extern void
onig_node_conv_to_str_node(Node* node, int flag)
{
  node->type = N_STRING;

  NSTRING(node).flag = flag;
  NSTRING(node).capa = 0;
  NSTRING(node).s    = NSTRING(node).buf;
  NSTRING(node).end  = NSTRING(node).buf;
}

extern void
onig_node_str_clear(Node* node)
{
  if (NSTRING(node).capa != 0 &&
      IS_NOT_NULL(NSTRING(node).s) && NSTRING(node).s != NSTRING(node).buf) {
    xfree(NSTRING(node).s);
  }

  NSTRING(node).capa = 0;
  NSTRING(node).flag = 0;
  NSTRING(node).s    = NSTRING(node).buf;
  NSTRING(node).end  = NSTRING(node).buf;
}

static Node*
node_new_str(const UChar* s, const UChar* end)
{
  Node* node = node_new();
  CHECK_NULL_RETURN(node);

  node->type = N_STRING;
  NSTRING(node).capa = 0;
  NSTRING(node).flag = 0;
  NSTRING(node).s    = NSTRING(node).buf;
  NSTRING(node).end  = NSTRING(node).buf;
  if (onig_node_str_cat(node, s, end)) {
    onig_node_free(node);
    return NULL;
  }
  return node;
}

extern Node*
onig_node_new_str(const UChar* s, const UChar* end)
{
  return node_new_str(s, end);
}

static Node*
node_new_str_raw(UChar* s, UChar* end)
{
  Node* node = node_new_str(s, end);
  NSTRING_SET_RAW(node);
  return node;
}

static Node*
node_new_empty(void)
{
  return node_new_str(NULL, NULL);
}

static Node*
node_new_str_raw_char(UChar c)
{
  UChar p[1];

  p[0] = c;
  return node_new_str_raw(p, p + 1);
}

static Node*
str_node_split_last_char(StrNode* sn, OnigEncoding enc)
{
  const UChar *p;
  Node* n = NULL_NODE;

  if (sn->end > sn->s) {
    p = onigenc_get_prev_char_head(enc, sn->s, sn->end);
    if (p && p > sn->s) { /* can be splitted. */
      n = node_new_str(p, sn->end);
      if ((sn->flag & NSTR_RAW) != 0)
        NSTRING_SET_RAW(n);
      sn->end = (UChar* )p;
    }
  }
  return n;
}

static int
str_node_can_be_split(StrNode* sn, OnigEncoding enc)
{
  if (sn->end > sn->s) {
    return ((enc_len(enc, sn->s) < sn->end - sn->s)  ?  1 : 0);
  }
  return 0;
}

extern int
onig_scan_unsigned_number(UChar** src, const UChar* end, OnigEncoding enc)
{
  unsigned int num, val;
  OnigCodePoint c;
  UChar* p = *src;
  PFETCH_READY;

  num = 0;
  while (!PEND) {
    PFETCH(c);
    if (ONIGENC_IS_CODE_DIGIT(enc, c)) {
      val = (unsigned int )DIGITVAL(c);
      if ((INT_MAX_LIMIT - val) / 10UL < num)
        return -1;  /* overflow */

      num = num * 10 + val;
    }
    else {
      PUNFETCH;
      break;
    }
  }
  *src = p;
  return num;
}

static int
scan_unsigned_hexadecimal_number(UChar** src, UChar* end, int maxlen,
                                 OnigEncoding enc)
{
  OnigCodePoint c;
  unsigned int num, val;
  UChar* p = *src;
  PFETCH_READY;

  num = 0;
  while (!PEND && maxlen-- != 0) {
    PFETCH(c);
    if (ONIGENC_IS_CODE_XDIGIT(enc, c)) {
      val = (unsigned int )XDIGITVAL(enc,c);
      if ((INT_MAX_LIMIT - val) / 16UL < num)
        return -1;  /* overflow */

      num = (num << 4) + XDIGITVAL(enc,c);
    }
    else {
      PUNFETCH;
      break;
    }
  }
  *src = p;
  return num;
}

static int
scan_unsigned_octal_number(UChar** src, UChar* end, int maxlen,
                           OnigEncoding enc)
{
  OnigCodePoint c;
  unsigned int num, val;
  UChar* p = *src;
  PFETCH_READY;

  num = 0;
  while (!PEND && maxlen-- != 0) {
    PFETCH(c);
    if (ONIGENC_IS_CODE_DIGIT(enc, c) && c < '8') {
      val = ODIGITVAL(c);
      if ((INT_MAX_LIMIT - val) / 8UL < num)
        return -1;  /* overflow */

      num = (num << 3) + val;
    }
    else {
      PUNFETCH;
      break;
    }
  }
  *src = p;
  return num;
}

#define BBUF_WRITE_CODE_POINT(bbuf,pos,code) \
    BBUF_WRITE(bbuf, pos, &(code), SIZE_CODE_POINT)

/* data format:
     [n][from-1][to-1][from-2][to-2] ... [from-n][to-n]
     (all data size is OnigCodePoint)
 */
static int
new_code_range(BBuf** pbuf)
{
#define INIT_MULTI_BYTE_RANGE_SIZE  (SIZE_CODE_POINT * 5)
  int r;
  OnigCodePoint n;
  BBuf* bbuf;

  bbuf = *pbuf = (BBuf* )xmalloc(sizeof(BBuf));
  CHECK_NULL_RETURN_VAL(*pbuf, ONIGERR_MEMORY);
  r = BBUF_INIT(*pbuf, INIT_MULTI_BYTE_RANGE_SIZE);
  if (r) return r;

  n = 0;
  BBUF_WRITE_CODE_POINT(bbuf, 0, n);
  return 0;
}

static int
add_code_range_to_buf(BBuf** pbuf, OnigCodePoint from, OnigCodePoint to)
{
  int r, inc_n, pos;
  int low, high, bound, x;
  OnigCodePoint n, *data;
  BBuf* bbuf;

  if (from > to) {
    n = from; from = to; to = n;
  }

  if (IS_NULL(*pbuf)) {
    r = new_code_range(pbuf);
    if (r) return r;
    bbuf = *pbuf;
    n = 0;
  }
  else {
    bbuf = *pbuf;
    GET_CODE_POINT(n, bbuf->p);
  }
  data = (OnigCodePoint* )(bbuf->p);
  data++;

  for (low = 0, bound = n; low < bound; ) {
    x = (low + bound) >> 1;
    if (from > data[x*2 + 1])
      low = x + 1;
    else
      bound = x;
  }

  for (high = low, bound = n; high < bound; ) {
    x = (high + bound) >> 1;
    if (to >= data[x*2] - 1)
      high = x + 1;
    else
      bound = x;
  }

  inc_n = low + 1 - high;
  if (n + inc_n > ONIG_MAX_MULTI_BYTE_RANGES_NUM)
    return ONIGERR_TOO_MANY_MULTI_BYTE_RANGES;

  if (inc_n != 1) {
    if (from > data[low*2])
      from = data[low*2];
    if (to < data[(high - 1)*2 + 1])
      to = data[(high - 1)*2 + 1];
  }

  if (inc_n != 0 && (OnigCodePoint )high < n) {
    int from_pos = SIZE_CODE_POINT * (1 + high * 2);
    int to_pos   = SIZE_CODE_POINT * (1 + (low + 1) * 2);
    int size = (n - high) * 2 * SIZE_CODE_POINT;

    if (inc_n > 0) {
      BBUF_MOVE_RIGHT(bbuf, from_pos, to_pos, size);
    }
    else {
      BBUF_MOVE_LEFT_REDUCE(bbuf, from_pos, to_pos);
    }
  }

  pos = SIZE_CODE_POINT * (1 + low * 2);
  BBUF_ENSURE_SIZE(bbuf, pos + SIZE_CODE_POINT * 2);
  BBUF_WRITE_CODE_POINT(bbuf, pos, from);
  BBUF_WRITE_CODE_POINT(bbuf, pos + SIZE_CODE_POINT, to);
  n += inc_n;
  BBUF_WRITE_CODE_POINT(bbuf, 0, n);

  return 0;
}

static int
add_code_range(BBuf** pbuf, ScanEnv* env, OnigCodePoint from, OnigCodePoint to)
{
  if (from > to) {
    if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC))
      return 0;
    else
      return ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS;
  }

  return add_code_range_to_buf(pbuf, from, to);
}

static int
not_code_range_buf(OnigEncoding enc, BBuf* bbuf, BBuf** pbuf)
{
  int r, i, n;
  OnigCodePoint pre, from, *data, to = 0;

  *pbuf = (BBuf* )NULL;
  if (IS_NULL(bbuf)) {
  set_all:
    return SET_ALL_MULTI_BYTE_RANGE(enc, pbuf);
  }

  data = (OnigCodePoint* )(bbuf->p);
  GET_CODE_POINT(n, data);
  data++;
  if (n <= 0) goto set_all;

  r = 0;
  pre = MBCODE_START_POS(enc);
  for (i = 0; i < n; i++) {
    from = data[i*2];
    to   = data[i*2+1];
    if (pre <= from - 1) {
      r = add_code_range_to_buf(pbuf, pre, from - 1);
      if (r != 0) return r;
    }
    if (to == ~((OnigCodePoint )0)) break;
    pre = to + 1;
  }
  if (to < ~((OnigCodePoint )0)) {
    r = add_code_range_to_buf(pbuf, to + 1, ~((OnigCodePoint )0));
  }
  return r;
}

#define SWAP_BBUF_NOT(bbuf1, not1, bbuf2, not2) do {\
  BBuf *tbuf; \
  int  tnot; \
  tnot = not1;  not1  = not2;  not2  = tnot; \
  tbuf = bbuf1; bbuf1 = bbuf2; bbuf2 = tbuf; \
} while (0)

static int
or_code_range_buf(OnigEncoding enc, BBuf* bbuf1, int not1,
                  BBuf* bbuf2, int not2, BBuf** pbuf)
{
  int r;
  OnigCodePoint i, n1, *data1;
  OnigCodePoint from, to;

  *pbuf = (BBuf* )NULL;
  if (IS_NULL(bbuf1) && IS_NULL(bbuf2)) {
    if (not1 != 0 || not2 != 0)
      return SET_ALL_MULTI_BYTE_RANGE(enc, pbuf);
    return 0;
  }

  r = 0;
  if (IS_NULL(bbuf2))
    SWAP_BBUF_NOT(bbuf1, not1, bbuf2, not2);

  if (IS_NULL(bbuf1)) {
    if (not1 != 0) {
      return SET_ALL_MULTI_BYTE_RANGE(enc, pbuf);
    }
    else {
      if (not2 == 0) {
        return bbuf_clone(pbuf, bbuf2);
      }
      else {
        return not_code_range_buf(enc, bbuf2, pbuf);
      }
    }
  }

  if (not1 != 0)
    SWAP_BBUF_NOT(bbuf1, not1, bbuf2, not2);

  data1 = (OnigCodePoint* )(bbuf1->p);
  GET_CODE_POINT(n1, data1);
  data1++;

  if (not2 == 0 && not1 == 0) { /* 1 OR 2 */
    r = bbuf_clone(pbuf, bbuf2);
  }
  else if (not1 == 0) { /* 1 OR (not 2) */
    r = not_code_range_buf(enc, bbuf2, pbuf);
  }
  if (r != 0) return r;

  for (i = 0; i < n1; i++) {
    from = data1[i*2];
    to   = data1[i*2+1];
    r = add_code_range_to_buf(pbuf, from, to);
    if (r != 0) return r;
  }
  return 0;
}

static int
and_code_range1(BBuf** pbuf, OnigCodePoint from1, OnigCodePoint to1,
                OnigCodePoint* data, int n)
{
  int i, r;
  OnigCodePoint from2, to2;

  for (i = 0; i < n; i++) {
    from2 = data[i*2];
    to2   = data[i*2+1];
    if (from2 < from1) {
      if (to2 < from1) continue;
      else {
        from1 = to2 + 1;
      }
    }
    else if (from2 <= to1) {
      if (to2 < to1) {
        if (from1 <= from2 - 1) {
          r = add_code_range_to_buf(pbuf, from1, from2-1);
          if (r != 0) return r;
        }
        from1 = to2 + 1;
      }
      else {
        to1 = from2 - 1;
      }
    }
    else {
      from1 = from2;
    }
    if (from1 > to1) break;
  }
  if (from1 <= to1) {
    r = add_code_range_to_buf(pbuf, from1, to1);
    if (r != 0) return r;
  }
  return 0;
}

static int
and_code_range_buf(BBuf* bbuf1, int not1, BBuf* bbuf2, int not2, BBuf** pbuf)
{
  int r;
  OnigCodePoint i, j, n1, n2, *data1, *data2;
  OnigCodePoint from, to, from1, to1, from2, to2;

  *pbuf = (BBuf* )NULL;
  if (IS_NULL(bbuf1)) {
    if (not1 != 0 && IS_NOT_NULL(bbuf2)) /* not1 != 0 -> not2 == 0 */
      return bbuf_clone(pbuf, bbuf2);
    return 0;
  }
  else if (IS_NULL(bbuf2)) {
    if (not2 != 0)
      return bbuf_clone(pbuf, bbuf1);
    return 0;
  }

  if (not1 != 0)
    SWAP_BBUF_NOT(bbuf1, not1, bbuf2, not2);

  data1 = (OnigCodePoint* )(bbuf1->p);
  data2 = (OnigCodePoint* )(bbuf2->p);
  GET_CODE_POINT(n1, data1);
  GET_CODE_POINT(n2, data2);
  data1++;
  data2++;

  if (not2 == 0 && not1 == 0) { /* 1 AND 2 */
    for (i = 0; i < n1; i++) {
      from1 = data1[i*2];
      to1   = data1[i*2+1];
      for (j = 0; j < n2; j++) {
        from2 = data2[j*2];
        to2   = data2[j*2+1];
        if (from2 > to1) break;
        if (to2 < from1) continue;
        from = MAX(from1, from2);
        to   = MIN(to1, to2);
        r = add_code_range_to_buf(pbuf, from, to);
        if (r != 0) return r;
      }
    }
  }
  else if (not1 == 0) { /* 1 AND (not 2) */
    for (i = 0; i < n1; i++) {
      from1 = data1[i*2];
      to1   = data1[i*2+1];
      r = and_code_range1(pbuf, from1, to1, data2, n2);
      if (r != 0) return r;
    }
  }

  return 0;
}

static int
clear_not_flag_cclass(CClassNode* cc, OnigEncoding enc)
{
  BBuf *tbuf;
  int r;

  if (IS_CCLASS_NOT(cc)) {
    bitset_invert(cc->bs);

    if (! ONIGENC_IS_SINGLEBYTE(enc)) {
      r = not_code_range_buf(enc, cc->mbuf, &tbuf);
      if (r != 0) return r;

      bbuf_free(cc->mbuf);
      cc->mbuf = tbuf;
    }

    CCLASS_CLEAR_NOT(cc);
  }

  return 0;
}

static int
and_cclass(CClassNode* dest, CClassNode* cc, OnigEncoding enc)
{
  int r, not1, not2;
  BBuf *buf1, *buf2, *pbuf;
  BitSetRef bsr1, bsr2;
  BitSet bs1, bs2;

  not1 = IS_CCLASS_NOT(dest);
  bsr1 = dest->bs;
  buf1 = dest->mbuf;
  not2 = IS_CCLASS_NOT(cc);
  bsr2 = cc->bs;
  buf2 = cc->mbuf;

  if (not1 != 0) {
    bitset_invert_to(bsr1, bs1);
    bsr1 = bs1;
  }
  if (not2 != 0) {
    bitset_invert_to(bsr2, bs2);
    bsr2 = bs2;
  }
  bitset_and(bsr1, bsr2);
  if (bsr1 != dest->bs) {
    bitset_copy(dest->bs, bsr1);
    bsr1 = dest->bs;
  }
  if (not1 != 0) {
    bitset_invert(dest->bs);
  }

  if (! ONIGENC_IS_SINGLEBYTE(enc)) {
    if (not1 != 0 && not2 != 0) {
      r = or_code_range_buf(enc, buf1, 0, buf2, 0, &pbuf);
    }
    else {
      r = and_code_range_buf(buf1, not1, buf2, not2, &pbuf);
      if (r == 0 && not1 != 0) {
        BBuf *tbuf;
        r = not_code_range_buf(enc, pbuf, &tbuf);
        if (r != 0) {
          bbuf_free(pbuf);
          return r;
        }
        bbuf_free(pbuf);
        pbuf = tbuf;
      }
    }
    if (r != 0) return r;

    dest->mbuf = pbuf;
    bbuf_free(buf1);
    return r;
  }
  return 0;
}

static int
or_cclass(CClassNode* dest, CClassNode* cc, OnigEncoding enc)
{
  int r, not1, not2;
  BBuf *buf1, *buf2, *pbuf;
  BitSetRef bsr1, bsr2;
  BitSet bs1, bs2;

  not1 = IS_CCLASS_NOT(dest);
  bsr1 = dest->bs;
  buf1 = dest->mbuf;
  not2 = IS_CCLASS_NOT(cc);
  bsr2 = cc->bs;
  buf2 = cc->mbuf;

  if (not1 != 0) {
    bitset_invert_to(bsr1, bs1);
    bsr1 = bs1;
  }
  if (not2 != 0) {
    bitset_invert_to(bsr2, bs2);
    bsr2 = bs2;
  }
  bitset_or(bsr1, bsr2);
  if (bsr1 != dest->bs) {
    bitset_copy(dest->bs, bsr1);
    bsr1 = dest->bs;
  }
  if (not1 != 0) {
    bitset_invert(dest->bs);
  }

  if (! ONIGENC_IS_SINGLEBYTE(enc)) {
    if (not1 != 0 && not2 != 0) {
      r = and_code_range_buf(buf1, 0, buf2, 0, &pbuf);
    }
    else {
      r = or_code_range_buf(enc, buf1, not1, buf2, not2, &pbuf);
      if (r == 0 && not1 != 0) {
        BBuf *tbuf;
        r = not_code_range_buf(enc, pbuf, &tbuf);
        if (r != 0) {
          bbuf_free(pbuf);
          return r;
        }
        bbuf_free(pbuf);
        pbuf = tbuf;
      }
    }
    if (r != 0) return r;

    dest->mbuf = pbuf;
    bbuf_free(buf1);
    return r;
  }
  else
    return 0;
}

static int
conv_backslash_value(int c, ScanEnv* env)
{
  if (IS_SYNTAX_OP(env->syntax, ONIG_SYN_OP_ESC_CONTROL_CHARS)) {
    switch (c) {
    case 'n':  return '\n';
    case 't':  return '\t';
    case 'r':  return '\r';
    case 'f':  return '\f';
    case 'a':  return '\007';
    case 'b':  return '\010';
    case 'e':  return '\033';
    case 'v':
      if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ESC_V_VTAB))
        return '\v';
      break;

    default:
      break;
    }
  }
  return c;
}

static int
is_invalid_qualifier_target(Node* node)
{
  switch (NTYPE(node)) {
  case N_ANCHOR:
    return 1;
    break;

  case N_EFFECT:
    if (NEFFECT(node).type == EFFECT_OPTION)
      return is_invalid_qualifier_target(NEFFECT(node).target);
    break;

  case N_LIST: /* ex. (?:\G\A)* */
    do {
      if (! is_invalid_qualifier_target(NCONS(node).left)) return 0;
    } while (IS_NOT_NULL(node = NCONS(node).right));
    return 0;
    break;

  case N_ALT:  /* ex. (?:abc|\A)* */
    do {
      if (is_invalid_qualifier_target(NCONS(node).left)) return 1;
    } while (IS_NOT_NULL(node = NCONS(node).right));
    break;

  default:
    break;
  }
  return 0;
}

/* ?:0, *:1, +:2, ??:3, *?:4, +?:5 */
static int
popular_qualifier_num(QualifierNode* qf)
{
  if (qf->greedy) {
    if (qf->lower == 0) {
      if (qf->upper == 1) return 0;
      else if (IS_REPEAT_INFINITE(qf->upper)) return 1;
    }
    else if (qf->lower == 1) {
      if (IS_REPEAT_INFINITE(qf->upper)) return 2;
    }
  }
  else {
    if (qf->lower == 0) {
      if (qf->upper == 1) return 3;
      else if (IS_REPEAT_INFINITE(qf->upper)) return 4;
    }
    else if (qf->lower == 1) {
      if (IS_REPEAT_INFINITE(qf->upper)) return 5;
    }
  }
  return -1;
}

enum ReduceType {
  RQ_ASIS = 0, /* as is */
  RQ_DEL  = 1, /* delete parent */
  RQ_A,        /* to '*'    */
  RQ_AQ,       /* to '*?'   */
  RQ_QQ,       /* to '??'   */
  RQ_P_QQ,     /* to '+)??' */
  RQ_PQ_Q,     /* to '+?)?' */
};

static enum ReduceType ReduceTypeTable[6][6] = {
  {RQ_DEL,  RQ_A,    RQ_A,   RQ_QQ,   RQ_AQ,   RQ_ASIS}, /* '?'  */
  {RQ_DEL,  RQ_DEL,  RQ_DEL, RQ_P_QQ, RQ_P_QQ, RQ_DEL},  /* '*'  */
  {RQ_A,    RQ_A,    RQ_DEL, RQ_ASIS, RQ_P_QQ, RQ_DEL},  /* '+'  */
  {RQ_DEL,  RQ_AQ,   RQ_AQ,  RQ_DEL,  RQ_AQ,   RQ_AQ},   /* '??' */
  {RQ_DEL,  RQ_DEL,  RQ_DEL, RQ_DEL,  RQ_DEL,  RQ_DEL},  /* '*?' */
  {RQ_ASIS, RQ_PQ_Q, RQ_DEL, RQ_AQ,   RQ_AQ,   RQ_DEL}   /* '+?' */
};

extern void
onig_reduce_nested_qualifier(Node* pnode, Node* cnode)
{
  int pnum, cnum;
  QualifierNode *p, *c;

  p = &(NQUALIFIER(pnode));
  c = &(NQUALIFIER(cnode));
  pnum = popular_qualifier_num(p);
  cnum = popular_qualifier_num(c);

  switch(ReduceTypeTable[cnum][pnum]) {
  case RQ_DEL:
    *p = *c;
    break;
  case RQ_A:
    p->target = c->target;
    p->lower  = 0;  p->upper = REPEAT_INFINITE;  p->greedy = 1;
    break;
  case RQ_AQ:
    p->target = c->target;
    p->lower  = 0;  p->upper = REPEAT_INFINITE;  p->greedy = 0;
    break;
  case RQ_QQ:
    p->target = c->target;
    p->lower  = 0;  p->upper = 1;  p->greedy = 0;
    break;
  case RQ_P_QQ:
    p->target = cnode;
    p->lower  = 0;  p->upper = 1;  p->greedy = 0;
    c->lower  = 1;  c->upper = REPEAT_INFINITE;  c->greedy = 1;
    return ;
    break;
  case RQ_PQ_Q:
    p->target = cnode;
    p->lower  = 0;  p->upper = 1;  p->greedy = 1;
    c->lower  = 1;  c->upper = REPEAT_INFINITE;  c->greedy = 0;
    return ;
    break;
  case RQ_ASIS:
    p->target = cnode;
    return ;
    break;
  }

  c->target = NULL_NODE;
  onig_node_free(cnode);
}

enum TokenSyms {
  TK_EOT      = 0,   /* end of token */
  TK_RAW_BYTE = 1,
  TK_CHAR,
  TK_STRING,
  TK_CODE_POINT,
  TK_ANYCHAR,
  TK_CHAR_TYPE,
  TK_BACKREF,
  TK_CALL,
  TK_ANCHOR,
  TK_OP_REPEAT,
  TK_INTERVAL,
  TK_ANYCHAR_ANYTIME,  /* SQL '%' == .* */
  TK_ALT,
  TK_SUBEXP_OPEN,
  TK_SUBEXP_CLOSE,
  TK_CC_OPEN,
  TK_QUOTE_OPEN,
  TK_CHAR_PROPERTY,    /* \p{...}, \P{...} */
  /* in cc */
  TK_CC_CLOSE,
  TK_CC_RANGE,
  TK_POSIX_BRACKET_OPEN,
  TK_CC_AND,             /* && */
  TK_CC_CC_OPEN          /* [ */
};

typedef struct {
  enum TokenSyms type;
  int escaped;
  int base;   /* is number: 8, 16 (used in [....]) */
  UChar* backp;
  union {
    UChar* s;
    int   c;
    OnigCodePoint code;
    int   anchor;
    int   subtype;
    struct {
      int lower;
      int upper;
      int greedy;
      int possessive;
    } repeat;
    struct {
      int  num;
      int  ref1;
      int* refs;
      int  by_name;
    } backref;
    struct {
      UChar* name;
      UChar* name_end;
    } call;
    struct {
      int not;
    } prop;
  } u;
} OnigToken;

static int
fetch_range_qualifier(UChar** src, UChar* end, OnigToken* tok, ScanEnv* env)
{
  int low, up, syn_allow, non_low = 0;
  int r = 0;
  OnigCodePoint c;
  OnigEncoding enc = env->enc;
  UChar* p = *src;
  PFETCH_READY;

  syn_allow = IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_INVALID_INTERVAL);

  if (PEND) {
    if (syn_allow)
      return 1;  /* "....{" : OK! */
    else
      return ONIGERR_END_PATTERN_AT_LEFT_BRACE;  /* "....{" syntax error */
  }

  if (! syn_allow) {
    c = PPEEK;
    if (c == ')' || c == '(' || c == '|') {
      return ONIGERR_END_PATTERN_AT_LEFT_BRACE;
    }
  }

  low = onig_scan_unsigned_number(&p, end, env->enc);
  if (low < 0) return ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE;
  if (low > ONIG_MAX_REPEAT_NUM)
    return ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE;

  if (p == *src) { /* can't read low */
    if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV)) {
      /* allow {,n} as {0,n} */
      low = 0;
      non_low = 1;
    }
    else
      goto invalid;
  }

  if (PEND) goto invalid;
  PFETCH(c);
  if (c == ',') {
    UChar* prev = p;
    up = onig_scan_unsigned_number(&p, end, env->enc);
    if (up < 0) return ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE;
    if (up > ONIG_MAX_REPEAT_NUM)
      return ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE;

    if (p == prev) {
      if (non_low != 0)
        goto invalid;
      up = REPEAT_INFINITE;  /* {n,} : {n,infinite} */
    }
  }
  else {
    if (non_low != 0)
      goto invalid;

    PUNFETCH;
    up = low;  /* {n} : exact n times */
    r = 2;     /* fixed */
  }

  if (PEND) goto invalid;
  PFETCH(c);
  if (IS_SYNTAX_OP(env->syntax, ONIG_SYN_OP_ESC_BRACE_INTERVAL)) {
    if (c != MC_ESC(enc)) goto invalid;
    PFETCH(c);
  }
  if (c != '}') goto invalid;

  if (!IS_REPEAT_INFINITE(up) && low > up) {
    return ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE;
  }

  tok->type = TK_INTERVAL;
  tok->u.repeat.lower = low;
  tok->u.repeat.upper = up;
  *src = p;
  return r; /* 0: normal {n,m}, 2: fixed {n} */

 invalid:
  if (syn_allow)
    return 1;  /* OK */
  else
    return ONIGERR_INVALID_REPEAT_RANGE_PATTERN;
}

/* \M-, \C-, \c, or \... */
static int
fetch_escaped_value(UChar** src, UChar* end, ScanEnv* env)
{
  int v;
  OnigCodePoint c;
  OnigEncoding enc = env->enc;
  UChar* p = *src;
  PFETCH_READY;

  if (PEND) return ONIGERR_END_PATTERN_AT_ESCAPE;

  PFETCH(c);
  switch (c) {
  case 'M':
    if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META)) {
      if (PEND) return ONIGERR_END_PATTERN_AT_META;
      PFETCH(c);
      if (c != '-') return ONIGERR_META_CODE_SYNTAX;
      if (PEND) return ONIGERR_END_PATTERN_AT_META;
      PFETCH(c);
      if (c == MC_ESC(enc)) {
        v = fetch_escaped_value(&p, end, env);
        if (v < 0) return v;
        c = (OnigCodePoint )v;
      }
      c = ((c & 0xff) | 0x80);
    }
    else
      goto backslash;
    break;

  case 'C':
    if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL)) {
      if (PEND) return ONIGERR_END_PATTERN_AT_CONTROL;
      PFETCH(c);
      if (c != '-') return ONIGERR_CONTROL_CODE_SYNTAX;
      goto control;
    }
    else
      goto backslash;

  case 'c':
    if (IS_SYNTAX_OP(env->syntax, ONIG_SYN_OP_ESC_C_CONTROL)) {
    control:
      if (PEND) return ONIGERR_END_PATTERN_AT_CONTROL;
      PFETCH(c);
      if (c == MC_ESC(enc)) {
        v = fetch_escaped_value(&p, end, env);
        if (v < 0) return v;
        c = (OnigCodePoint )(v & 0x9f);
      }
      else if (c == '?')
        c = 0177;
      else
        c &= 0x9f;
      break;
    }
    /* fall through */

  default:
    {
    backslash:
      c = conv_backslash_value(c, env);
    }
    break;
  }

  *src = p;
  return c;
}

static int fetch_token(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env);

#ifdef USE_NAMED_GROUP
/*
  def: 0 -> define name    (don't allow number name)
       1 -> reference name (allow number name)
*/
static int
fetch_name(UChar** src, UChar* end, UChar** rname_end, ScanEnv* env, int ref)
{
  int r, is_num;
  OnigCodePoint c = 0;
  OnigCodePoint first_code;
  OnigEncoding enc = env->enc;
  UChar *name_end;
  UChar *p = *src;
  PFETCH_READY;

  name_end = end;
  r = 0;
  is_num = 0;
  if (PEND) {
    return ONIGERR_EMPTY_GROUP_NAME;
  }
  else {
    PFETCH(c);
    first_code = c;
    if (c == '>')
      return ONIGERR_EMPTY_GROUP_NAME;

    if (ONIGENC_IS_CODE_DIGIT(enc, c)) {
      if (ref == 1)
        is_num = 1;
      else {
        r = ONIGERR_INVALID_GROUP_NAME;
      }
    }
    else if (!ONIGENC_IS_CODE_WORD(enc, c)) {
      r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME;
    }
  }

  while (!PEND) {
    name_end = p;
    PFETCH(c);
    if (c == '>' || c == ')') break;

    if (is_num == 1) {
      if (! ONIGENC_IS_CODE_DIGIT(enc, c)) {
        if (!ONIGENC_IS_CODE_WORD(enc, c))
          r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME;
        else
          r = ONIGERR_INVALID_GROUP_NAME;
      }
    }
    else {
      if (!ONIGENC_IS_CODE_WORD(enc, c)) {
        r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME;
      }
    }
  }

  if (c != '>') {
    r = ONIGERR_INVALID_GROUP_NAME;
    name_end = end;
  }
  else {
    if (ONIGENC_IS_CODE_ASCII(first_code) &&
        ONIGENC_IS_CODE_UPPER(enc, first_code))
      r = ONIGERR_INVALID_GROUP_NAME;
  }

  if (r == 0) {
    *rname_end = name_end;
    *src = p;
    return 0;
  }
  else {
    onig_scan_env_set_error_string(env, r, *src, name_end);
    return r;
  }
}
#else
static int
fetch_name(UChar** src, UChar* end, UChar** rname_end, ScanEnv* env, int ref)
{
  int r, len;
  OnigCodePoint c = 0;
  UChar *name_end;
  OnigEncoding enc = env->enc;
  UChar *p = *src;
  PFETCH_READY;

  r = 0;
  while (!PEND) {
    name_end = p;
    if (enc_len(enc, p) > 1)
      r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME;

    PFETCH(c);
    if (c == '>' || c == ')') break;
    if (! ONIGENC_IS_CODE_DIGIT(enc, c))
      r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME;
  }
  if (c != '>') {
    r = ONIGERR_INVALID_GROUP_NAME;
    name_end = end;
  }

  if (r == 0) {
    *rname_end = name_end;
    *src = p;
    return 0;
  }
  else {
  err:
    onig_scan_env_set_error_string(env, r, *src, name_end);
    return r;
  }
}
#endif

static void
CC_ESC_WARN(ScanEnv* env, UChar *c)
{
  if (onig_warn == onig_null_warn) return ;

  if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_WARN_CC_OP_NOT_ESCAPED) &&
      IS_SYNTAX_BV(env->syntax, ONIG_SYN_BACKSLASH_ESCAPE_IN_CC)) {
    char buf[WARN_BUFSIZE];
    onig_snprintf_with_pattern(buf, WARN_BUFSIZE, env->enc,
                env->pattern, env->pattern_end,
                "character class has '%s' without escape", c);
    (*onig_warn)(buf);
  }
}

static void
CCEND_ESC_WARN(ScanEnv* env, UChar* c)
{
  if (onig_warn == onig_null_warn) return ;

  if (IS_SYNTAX_BV((env)->syntax, ONIG_SYN_WARN_CC_OP_NOT_ESCAPED)) {
    char buf[WARN_BUFSIZE];
    onig_snprintf_with_pattern(buf, WARN_BUFSIZE, (env)->enc,
                (env)->pattern, (env)->pattern_end,
                "regular expression has '%s' without escape", c);
    (*onig_warn)(buf);
  }
}

static UChar*
find_str_position(OnigCodePoint s[], int n, UChar* from, UChar* to,
                  UChar **next, OnigEncoding enc)
{
  int i;
  OnigCodePoint x;
  UChar *q;
  UChar *p = from;

  while (p < to) {
    x = ONIGENC_MBC_TO_CODE(enc, p, to);
    q = p + enc_len(enc, p);
    if (x == s[0]) {
      for (i = 1; i < n && q < to; i++) {
        x = ONIGENC_MBC_TO_CODE(enc, q, to);
        if (x != s[i]) break;
        q += enc_len(enc, q);
      }
      if (i >= n) {
        if (IS_NOT_NULL(next))
          *next = q;
        return p;
      }
    }
    p = q;
  }
  return NULL_UCHARP;
}

static int
str_exist_check_with_esc(OnigCodePoint s[], int n, UChar* from, UChar* to,
                         OnigCodePoint bad, OnigEncoding enc)
{
  int i, in_esc;
  OnigCodePoint x;
  UChar *q;
  UChar *p = from;

  in_esc = 0;
  while (p < to) {
    if (in_esc) {
      in_esc = 0;
      p += enc_len(enc, p);
    }
    else {
      x = ONIGENC_MBC_TO_CODE(enc, p, to);
      q = p + enc_len(enc, p);
      if (x == s[0]) {
        for (i = 1; i < n && q < to; i++) {
          x = ONIGENC_MBC_TO_CODE(enc, q, to);
          if (x != s[i]) break;
          q += enc_len(enc, q);
        }
        if (i >= n) return 1;
        p += enc_len(enc, p);
      }
      else {
        x = ONIGENC_MBC_TO_CODE(enc, p, to);
        if (x == bad) return 0;
        else if (x == MC_ESC(enc)) in_esc = 1;
        p = q;
      }
    }
  }
  return 0;
}

static int
fetch_token_in_cc(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
{
  int num;
  OnigCodePoint c, c2;
  OnigSyntaxType* syn = env->syntax;
  OnigEncoding enc = env->enc;
  UChar* prev;
  UChar* p = *src;
  PFETCH_READY;

  if (PEND) {
    tok->type = TK_EOT;
    return tok->type;
  }

  PFETCH(c);
  tok->type = TK_CHAR;
  tok->base = 0;
  tok->u.c  = c;
  tok->escaped = 0;

  if (c == ']') {
    tok->type = TK_CC_CLOSE;
  }
  else if (c == '-') {
    tok->type = TK_CC_RANGE;
  }
  else if (c == MC_ESC(enc)) {
    if (! IS_SYNTAX_BV(syn, ONIG_SYN_BACKSLASH_ESCAPE_IN_CC))
      goto end;

    if (PEND) return ONIGERR_END_PATTERN_AT_ESCAPE;

    PFETCH(c);
    tok->escaped = 1;
    tok->u.c = c;
    switch (c) {
    case 'w':
      tok->type = TK_CHAR_TYPE;
      tok->u.subtype = CTYPE_WORD;
      break;
    case 'W':
      tok->type = TK_CHAR_TYPE;
      tok->u.subtype = CTYPE_NOT_WORD;
      break;
    case 'd':
      tok->type = TK_CHAR_TYPE;
      tok->u.subtype = CTYPE_DIGIT;
      break;
    case 'D':
      tok->type = TK_CHAR_TYPE;
      tok->u.subtype = CTYPE_NOT_DIGIT;
      break;
    case 's':
      tok->type = TK_CHAR_TYPE;
      tok->u.subtype = CTYPE_WHITE_SPACE;
      break;
    case 'S':
      tok->type = TK_CHAR_TYPE;
      tok->u.subtype = CTYPE_NOT_WHITE_SPACE;
      break;
    case 'h':
      if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break;
      tok->type = TK_CHAR_TYPE;
      tok->u.subtype = CTYPE_XDIGIT;
      break;
    case 'H':
      if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break;
      tok->type = TK_CHAR_TYPE;
      tok->u.subtype = CTYPE_NOT_XDIGIT;
      break;

    case 'p':
    case 'P':
      c2 = PPEEK;
      if (c2 == '{' &&
          IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY)) {
        PINC;
        tok->type = TK_CHAR_PROPERTY;
        tok->u.prop.not = (c == 'P' ? 1 : 0);

        if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT)) {
          PFETCH(c2);
          if (c2 == '^') {
            tok->u.prop.not = (tok->u.prop.not == 0 ? 1 : 0);
          }
          else
            PUNFETCH;
        }
      }
      break;

    case 'x':
      if (PEND) break;

      prev = p;
      if (PPEEK_IS('{') && IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_BRACE_HEX8)) {
        PINC;
        num = scan_unsigned_hexadecimal_number(&p, end, 8, enc);
        if (num < 0) return ONIGERR_TOO_BIG_WIDE_CHAR_VALUE;
        if (!PEND) {
          c2 = PPEEK;
          if (ONIGENC_IS_CODE_XDIGIT(enc, c2))
            return ONIGERR_TOO_LONG_WIDE_CHAR_VALUE;
        }

        if (p > prev + enc_len(enc, prev) && !PEND && (PPEEK_IS('}'))) {
          PINC;
          tok->type   = TK_CODE_POINT;
          tok->base   = 16;
          tok->u.code = (OnigCodePoint )num;
        }
        else {
          /* can't read nothing or invalid format */
          p = prev;
        }
      }
      else if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_HEX2)) {
        num = scan_unsigned_hexadecimal_number(&p, end, 2, enc);
        if (num < 0) return ONIGERR_TOO_BIG_NUMBER;
        if (p == prev) {  /* can't read nothing. */
          num = 0; /* but, it's not error */
        }
        tok->type = TK_RAW_BYTE;
        tok->base = 16;
        tok->u.c  = num;
      }
      break;

    case 'u':
      if (PEND) break;

      prev = p;
      if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_U_HEX4)) {
        num = scan_unsigned_hexadecimal_number(&p, end, 4, enc);
        if (num < 0) return ONIGERR_TOO_BIG_NUMBER;
        if (p == prev) {  /* can't read nothing. */
          num = 0; /* but, it's not error */
        }
        tok->type   = TK_CODE_POINT;
        tok->base   = 16;
        tok->u.code = (OnigCodePoint )num;
      }
      break;

    case '0':
    case '1': case '2': case '3': case '4': case '5': case '6': case '7':
      if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_OCTAL3)) {
        PUNFETCH;
        prev = p;
        num = scan_unsigned_octal_number(&p, end, 3, enc);
        if (num < 0) return ONIGERR_TOO_BIG_NUMBER;
        if (p == prev) {  /* can't read nothing. */
          num = 0; /* but, it's not error */
        }
        tok->type = TK_RAW_BYTE;
        tok->base = 8;
        tok->u.c  = num;
      }
      break;

    default:
      PUNFETCH;
      num = fetch_escaped_value(&p, end, env);
      if (num < 0) return num;
      if (tok->u.c != num) {
        tok->u.code = (OnigCodePoint )num;
        tok->type   = TK_CODE_POINT;
      }
      break;
    }
  }
  else if (c == '[') {
    if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_POSIX_BRACKET) && (PPEEK_IS(':'))) {
      OnigCodePoint send[] = { (OnigCodePoint )':', (OnigCodePoint )']' };
      tok->backp = p; /* point at '[' is readed */
      PINC;
      if (str_exist_check_with_esc(send, 2, p, end,
                                   (OnigCodePoint )']', enc)) {
        tok->type = TK_POSIX_BRACKET_OPEN;
      }
      else {
        PUNFETCH;
        goto cc_in_cc;
      }
    }
    else {
    cc_in_cc:
      if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_CCLASS_SET_OP)) {
        tok->type = TK_CC_CC_OPEN;
      }
      else {
        CC_ESC_WARN(env, "[");
      }
    }
  }
  else if (c == '&') {
    if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_CCLASS_SET_OP) &&
        !PEND && (PPEEK_IS('&'))) {
      PINC;
      tok->type = TK_CC_AND;
    }
  }

 end:
  *src = p;
  return tok->type;
}

static int
fetch_token(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
{
  int r, num;
  OnigCodePoint c;
  OnigEncoding enc = env->enc;
  OnigSyntaxType* syn = env->syntax;
  UChar* prev;
  UChar* p = *src;
  PFETCH_READY;

 start:
  if (PEND) {
    tok->type = TK_EOT;
    return tok->type;
  }

  tok->type  = TK_STRING;
  tok->base  = 0;
  tok->backp = p;

  PFETCH(c);
  if (c == MC_ESC(enc)) {
    if (PEND) return ONIGERR_END_PATTERN_AT_ESCAPE;

    tok->backp = p;
    PFETCH(c);

    tok->u.c = c;
    tok->escaped = 1;
    switch (c) {
    case '*':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_ASTERISK_ZERO_INF)) break;
      tok->type = TK_OP_REPEAT;
      tok->u.repeat.lower = 0;
      tok->u.repeat.upper = REPEAT_INFINITE;
      goto greedy_check;
      break;

    case '+':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_PLUS_ONE_INF)) break;
      tok->type = TK_OP_REPEAT;
      tok->u.repeat.lower = 1;
      tok->u.repeat.upper = REPEAT_INFINITE;
      goto greedy_check;
      break;

    case '?':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_QMARK_ZERO_ONE)) break;
      tok->type = TK_OP_REPEAT;
      tok->u.repeat.lower = 0;
      tok->u.repeat.upper = 1;
    greedy_check:
      if (!PEND && PPEEK_IS('?') &&
          IS_SYNTAX_OP(syn, ONIG_SYN_OP_QMARK_NON_GREEDY)) {
        PFETCH(c);
        tok->u.repeat.greedy     = 0;
        tok->u.repeat.possessive = 0;
      }
      else {
      possessive_check:
        if (!PEND && PPEEK_IS('+') &&
            ((IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT) &&
              tok->type != TK_INTERVAL)  ||
             (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL) &&
              tok->type == TK_INTERVAL))) {
          PFETCH(c);
          tok->u.repeat.greedy     = 1;
          tok->u.repeat.possessive = 1;
        }
        else {
          tok->u.repeat.greedy     = 1;
          tok->u.repeat.possessive = 0;
        }
      }
      break;

    case '{':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_BRACE_INTERVAL)) break;
      r = fetch_range_qualifier(&p, end, tok, env);
      if (r < 0) return r;  /* error */
      if (r == 0) goto greedy_check;
      else if (r == 2) { /* {n} */
        if (IS_SYNTAX_BV(syn, ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY))
          goto possessive_check;

        goto greedy_check;
      }
      /* r == 1 : normal char */
      break;

    case '|':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_VBAR_ALT)) break;
      tok->type = TK_ALT;
      break;

    case '(':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_LPAREN_SUBEXP)) break;
      tok->type = TK_SUBEXP_OPEN;
      break;

    case ')':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_LPAREN_SUBEXP)) break;
      tok->type = TK_SUBEXP_CLOSE;
      break;

    case 'w':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_W_WORD)) break;
      tok->type = TK_CHAR_TYPE;
      tok->u.subtype = CTYPE_WORD;
      break;

    case 'W':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_W_WORD)) break;
      tok->type = TK_CHAR_TYPE;
      tok->u.subtype = CTYPE_NOT_WORD;
      break;

    case 'b':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_B_WORD_BOUND)) break;
      tok->type = TK_ANCHOR;
      tok->u.anchor = ANCHOR_WORD_BOUND;
      break;

    case 'B':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_B_WORD_BOUND)) break;
      tok->type = TK_ANCHOR;
      tok->u.anchor = ANCHOR_NOT_WORD_BOUND;
      break;

#ifdef USE_WORD_BEGIN_END
    case '<':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END)) break;
      tok->type = TK_ANCHOR;
      tok->u.anchor = ANCHOR_WORD_BEGIN;
      break;

    case '>':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END)) break;
      tok->type = TK_ANCHOR;
      tok->u.anchor = ANCHOR_WORD_END;
      break;
#endif

    case 's':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_S_WHITE_SPACE)) break;
      tok->type = TK_CHAR_TYPE;
      tok->u.subtype = CTYPE_WHITE_SPACE;
      break;

    case 'S':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_S_WHITE_SPACE)) break;
      tok->type = TK_CHAR_TYPE;
      tok->u.subtype = CTYPE_NOT_WHITE_SPACE;
      break;

    case 'd':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_D_DIGIT)) break;
      tok->type = TK_CHAR_TYPE;
      tok->u.subtype = CTYPE_DIGIT;
      break;

    case 'D':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_D_DIGIT)) break;
      tok->type = TK_CHAR_TYPE;
      tok->u.subtype = CTYPE_NOT_DIGIT;
      break;

    case 'h':
      if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break;
      tok->type = TK_CHAR_TYPE;
      tok->u.subtype = CTYPE_XDIGIT;
      break;

    case 'H':
      if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_H_XDIGIT)) break;
      tok->type = TK_CHAR_TYPE;
      tok->u.subtype = CTYPE_NOT_XDIGIT;
      break;

    case 'A':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR)) break;
    begin_buf:
      tok->type = TK_ANCHOR;
      tok->u.subtype = ANCHOR_BEGIN_BUF;
      break;

    case 'Z':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR)) break;
      tok->type = TK_ANCHOR;
      tok->u.subtype = ANCHOR_SEMI_END_BUF;
      break;

    case 'z':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR)) break;
    end_buf:
      tok->type = TK_ANCHOR;
      tok->u.subtype = ANCHOR_END_BUF;
      break;

    case 'G':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR)) break;
      tok->type = TK_ANCHOR;
      tok->u.subtype = ANCHOR_BEGIN_POSITION;
      break;

    case '`':
      if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR)) break;
      goto begin_buf;
      break;

    case '\'':
      if (! IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR)) break;
      goto end_buf;
      break;

    case 'x':
      if (PEND) break;

      prev = p;
      if (PPEEK_IS('{') && IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_BRACE_HEX8)) {
        PINC;
        num = scan_unsigned_hexadecimal_number(&p, end, 8, enc);
        if (num < 0) return ONIGERR_TOO_BIG_WIDE_CHAR_VALUE;
        if (!PEND) {
          if (ONIGENC_IS_CODE_XDIGIT(enc, PPEEK))
            return ONIGERR_TOO_LONG_WIDE_CHAR_VALUE;
        }

        if ((p > prev + enc_len(enc, prev)) && !PEND && PPEEK_IS('}')) {
          PINC;
          tok->type   = TK_CODE_POINT;
          tok->u.code = (OnigCodePoint )num;
        }
        else {
          /* can't read nothing or invalid format */
          p = prev;
        }
      }
      else if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_X_HEX2)) {
        num = scan_unsigned_hexadecimal_number(&p, end, 2, enc);
        if (num < 0) return ONIGERR_TOO_BIG_NUMBER;
        if (p == prev) {  /* can't read nothing. */
          num = 0; /* but, it's not error */
        }
        tok->type = TK_RAW_BYTE;
        tok->base = 16;
        tok->u.c  = num;
      }
      break;

    case 'u':
      if (PEND) break;

      prev = p;
      if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_U_HEX4)) {
        num = scan_unsigned_hexadecimal_number(&p, end, 4, enc);
        if (num < 0) return ONIGERR_TOO_BIG_NUMBER;
        if (p == prev) {  /* can't read nothing. */
          num = 0; /* but, it's not error */
        }
        tok->type   = TK_CODE_POINT;
        tok->base   = 16;
        tok->u.code = (OnigCodePoint )num;
      }
      break;

    case '1': case '2': case '3': case '4':
    case '5': case '6': case '7': case '8': case '9':
      PUNFETCH;
      prev = p;
      num = onig_scan_unsigned_number(&p, end, enc);
      if (num < 0 || num > ONIG_MAX_BACKREF_NUM) {
        goto skip_backref;
      }

      if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_DECIMAL_BACKREF) &&
          (num <= env->num_mem || num <= 9)) { /* This spec. from GNU regex */
        if (IS_SYNTAX_BV(syn, ONIG_SYN_STRICT_CHECK_BACKREF)) {
          if (num > env->num_mem || IS_NULL(SCANENV_MEM_NODES(env)[num]))
            return ONIGERR_INVALID_BACKREF;
        }

        tok->type = TK_BACKREF;
        tok->u.backref.num     = 1;
        tok->u.backref.ref1    = num;
        tok->u.backref.by_name = 0;
        break;
      }

    skip_backref:
      if (c == '8' || c == '9') {
        /* normal char */
        p = prev; PINC;
        break;
      }

      p = prev;
      /* fall through */
    case '0':
      if (IS_SYNTAX_OP(syn, ONIG_SYN_OP_ESC_OCTAL3)) {
        prev = p;
        num = scan_unsigned_octal_number(&p, end, (c == '0' ? 2:3), enc);
        if (num < 0) return ONIGERR_TOO_BIG_NUMBER;
        if (p == prev) {  /* can't read nothing. */
          num = 0; /* but, it's not error */
        }
        tok->type = TK_RAW_BYTE;
        tok->base = 8;
        tok->u.c  = num;
      }
      else if (c != '0') {
        PINC;
      }
      break;

#ifdef USE_NAMED_GROUP
    case 'k':
      if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_K_NAMED_BACKREF)) {
        PFETCH(c);
        if (c == '<') {
          UChar* name_end;
          int* backs;

          prev = p;
          r = fetch_name(&p, end, &name_end, env, 1);
          if (r < 0) return r;
          num = onig_name_to_group_numbers(env->reg, prev, name_end, &backs);
          if (num <= 0) {
            onig_scan_env_set_error_string(env,
                            ONIGERR_UNDEFINED_NAME_REFERENCE, prev, name_end);
            return ONIGERR_UNDEFINED_NAME_REFERENCE;
          }
          if (IS_SYNTAX_BV(syn, ONIG_SYN_STRICT_CHECK_BACKREF)) {
            int i;
            for (i = 0; i < num; i++) {
              if (backs[i] > env->num_mem ||
                  IS_NULL(SCANENV_MEM_NODES(env)[backs[i]]))
                return ONIGERR_INVALID_BACKREF;
            }
          }

          tok->type = TK_BACKREF;
          tok->u.backref.by_name = 1;
          if (num == 1) {
            tok->u.backref.num  = 1;
            tok->u.backref.ref1 = backs[0];
          }
          else {
            tok->u.backref.num  = num;
            tok->u.backref.refs = backs;
          }
        }
        else
          PUNFETCH;
      }
      break;
#endif

#ifdef USE_SUBEXP_CALL
    case 'g':
      if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_G_SUBEXP_CALL)) {
        PFETCH(c);
        if (c == '<') {
          UChar* name_end;

          prev = p;
          r = fetch_name(&p, end, &name_end, env, 1);
          if (r < 0) return r;

          tok->type = TK_CALL;
          tok->u.call.name     = prev;
          tok->u.call.name_end = name_end;
        }
        else
          PUNFETCH;
      }
      break;
#endif

    case 'Q':
      if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE)) {
        tok->type = TK_QUOTE_OPEN;
      }
      break;

    case 'p':
    case 'P':
      if (PPEEK_IS('{') &&
          IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY)) {
        PINC;
        tok->type = TK_CHAR_PROPERTY;
        tok->u.prop.not = (c == 'P' ? 1 : 0);

        if (IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT)) {
          PFETCH(c);
          if (c == '^') {
            tok->u.prop.not = (tok->u.prop.not == 0 ? 1 : 0);
          }
          else
            PUNFETCH;
        }
      }
      break;

    default:
      PUNFETCH;
      num = fetch_escaped_value(&p, end, env);
      if (num < 0) return num;
      /* set_raw: */
      if (tok->u.c != num) {
        tok->type = TK_CODE_POINT;
        tok->u.code = (OnigCodePoint )num;
      }
      else { /* string */
        p = tok->backp + enc_len(enc, tok->backp);
      }
      break;
    }
  }
  else {
    tok->u.c = c;
    tok->escaped = 0;

#ifdef USE_VARIABLE_META_CHARS
    if ((c != ONIG_INEFFECTIVE_META_CHAR) &&
        IS_SYNTAX_OP(syn, ONIG_SYN_OP_VARIABLE_META_CHARACTERS)) {
      if (c == MC_ANYCHAR(enc))
        goto any_char;
      else if (c == MC_ANYTIME(enc))
        goto anytime;
      else if (c == MC_ZERO_OR_ONE_TIME(enc))
        goto zero_or_one_time;
      else if (c == MC_ONE_OR_MORE_TIME(enc))
        goto one_or_more_time;
      else if (c == MC_ANYCHAR_ANYTIME(enc)) {
        tok->type = TK_ANYCHAR_ANYTIME;
        goto out;
      }
    }
#endif

    switch (c) {
    case '.':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_DOT_ANYCHAR)) break;
#ifdef USE_VARIABLE_META_CHARS
    any_char:
#endif
      tok->type = TK_ANYCHAR;
      break;

    case '*':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_ASTERISK_ZERO_INF)) break;
#ifdef USE_VARIABLE_META_CHARS
    anytime:
#endif
      tok->type = TK_OP_REPEAT;
      tok->u.repeat.lower = 0;
      tok->u.repeat.upper = REPEAT_INFINITE;
      goto greedy_check;
      break;

    case '+':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_PLUS_ONE_INF)) break;
#ifdef USE_VARIABLE_META_CHARS
    one_or_more_time:
#endif
      tok->type = TK_OP_REPEAT;
      tok->u.repeat.lower = 1;
      tok->u.repeat.upper = REPEAT_INFINITE;
      goto greedy_check;
      break;

    case '?':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_QMARK_ZERO_ONE)) break;
#ifdef USE_VARIABLE_META_CHARS
    zero_or_one_time:
#endif
      tok->type = TK_OP_REPEAT;
      tok->u.repeat.lower = 0;
      tok->u.repeat.upper = 1;
      goto greedy_check;
      break;

    case '{':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_BRACE_INTERVAL)) break;
      r = fetch_range_qualifier(&p, end, tok, env);
      if (r < 0) return r;  /* error */
      if (r == 0) goto greedy_check;
      else if (r == 2) { /* {n} */
        if (IS_SYNTAX_BV(syn, ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY))
          goto possessive_check;

        goto greedy_check;
      }
      /* r == 1 : normal char */
      break;

    case '|':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_VBAR_ALT)) break;
      tok->type = TK_ALT;
      break;

    case '(':
      if (PPEEK_IS('?') &&
          IS_SYNTAX_OP2(syn, ONIG_SYN_OP2_QMARK_GROUP_EFFECT)) {
        PINC;
        if (PPEEK_IS('#')) {
          PFETCH(c);
          while (1) {
            if (PEND) return ONIGERR_END_PATTERN_IN_GROUP;
            PFETCH(c);
            if (c == MC_ESC(enc)) {
              if (!PEND) PFETCH(c);
            }
            else {
              if (c == ')') break;
            }
          }
          goto start;
        }
        PUNFETCH;
      }

      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_LPAREN_SUBEXP)) break;
      tok->type = TK_SUBEXP_OPEN;
      break;

    case ')':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_LPAREN_SUBEXP)) break;
      tok->type = TK_SUBEXP_CLOSE;
      break;

    case '^':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_LINE_ANCHOR)) break;
      tok->type = TK_ANCHOR;
      tok->u.subtype = (IS_SINGLELINE(env->option)
                        ? ANCHOR_BEGIN_BUF : ANCHOR_BEGIN_LINE);
      break;

    case '$':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_LINE_ANCHOR)) break;
      tok->type = TK_ANCHOR;
      tok->u.subtype = (IS_SINGLELINE(env->option)
                        ? ANCHOR_END_BUF : ANCHOR_END_LINE);
      break;

    case '[':
      if (! IS_SYNTAX_OP(syn, ONIG_SYN_OP_BRACKET_CC)) break;
      tok->type = TK_CC_OPEN;
      break;

    case ']':
      if (*src > env->pattern)   /* /].../ is allowed. */
        CCEND_ESC_WARN(env, "]");
      break;

    case '#':
      if (IS_EXTEND(env->option)) {
        while (!PEND) {
          PFETCH(c);
          if (ONIGENC_IS_CODE_NEWLINE(enc, c))
            break;
        }
        goto start;
        break;
      }
      break;

    case ' ': case '\t': case '\n': case '\r': case '\f':
      if (IS_EXTEND(env->option))
        goto start;
      break;

    default:
      /* string */
      break;
    }
  }

#ifdef USE_VARIABLE_META_CHARS
 out:
#endif
  *src = p;
  return tok->type;
}

static int
add_ctype_to_cc_by_range(CClassNode* cc, int ctype, int not, OnigEncoding enc,
                         OnigCodePoint sbr[], OnigCodePoint mbr[])
{
  int i, r;
  OnigCodePoint j;

  int nsb = ONIGENC_CODE_RANGE_NUM(sbr);
  int nmb = ONIGENC_CODE_RANGE_NUM(mbr);

  if (not == 0) {
    for (i = 0; i < nsb; i++) {
      for (j  = ONIGENC_CODE_RANGE_FROM(sbr, i);
           j <= ONIGENC_CODE_RANGE_TO(sbr, i); j++) {
        BITSET_SET_BIT(cc->bs, j);
      }
    }

    for (i = 0; i < nmb; i++) {
      r = add_code_range_to_buf(&(cc->mbuf),
                                ONIGENC_CODE_RANGE_FROM(mbr, i),
                                ONIGENC_CODE_RANGE_TO(mbr, i));
      if (r != 0) return r;
    }
  }
  else {
    OnigCodePoint prev = 0;

    if (ONIGENC_MBC_MINLEN(enc) == 1) {
      for (i = 0; i < nsb; i++) {
        for (j = prev;
             j < ONIGENC_CODE_RANGE_FROM(sbr, i); j++) {
          BITSET_SET_BIT(cc->bs, j);
        }
        prev = ONIGENC_CODE_RANGE_TO(sbr, i) + 1;
      }
      if (prev < 0x7f) {
        for (j = prev; j < 0x7f; j++) {
          BITSET_SET_BIT(cc->bs, j);
        }
      }

      prev = 0x80;
    }

    for (i = 0; i < nmb; i++) {
      if (prev < ONIGENC_CODE_RANGE_FROM(mbr, i)) {
        r = add_code_range_to_buf(&(cc->mbuf), prev,
                                  ONIGENC_CODE_RANGE_FROM(mbr, i) - 1);
        if (r != 0) return r;
      }
      prev = ONIGENC_CODE_RANGE_TO(mbr, i) + 1;
    }
    if (prev < 0x7fffffff) {
      r = add_code_range_to_buf(&(cc->mbuf), prev, 0x7fffffff);
      if (r != 0) return r;
    }
  }

  return 0;
}

static int
add_ctype_to_cc(CClassNode* cc, int ctype, int not, ScanEnv* env)
{
  int c, r;
  OnigCodePoint *sbr, *mbr;
  OnigEncoding enc = env->enc;

  r = ONIGENC_GET_CTYPE_CODE_RANGE(enc, ctype, &sbr, &mbr);
  if (r == 0) {
    return add_ctype_to_cc_by_range(cc, ctype, not, env->enc, sbr, mbr);
  }
  else if (r != ONIG_NO_SUPPORT_CONFIG) {
    return r;
  }

  r = 0;
  switch (ctype) {
  case ONIGENC_CTYPE_ALPHA:
  case ONIGENC_CTYPE_BLANK:
  case ONIGENC_CTYPE_CNTRL:
  case ONIGENC_CTYPE_DIGIT:
  case ONIGENC_CTYPE_LOWER:
  case ONIGENC_CTYPE_PUNCT:
  case ONIGENC_CTYPE_SPACE:
  case ONIGENC_CTYPE_UPPER:
  case ONIGENC_CTYPE_XDIGIT:
  case ONIGENC_CTYPE_ASCII:
  case ONIGENC_CTYPE_ALNUM:
    if (not != 0) {
      for (c = 0; c < SINGLE_BYTE_SIZE; c++) {
        if (! ONIGENC_IS_CODE_CTYPE(enc, (OnigCodePoint )c, ctype))
          BITSET_SET_BIT(cc->bs, c);
      }
      ADD_ALL_MULTI_BYTE_RANGE(enc, cc->mbuf);
    }
    else {
      for (c = 0; c < SINGLE_BYTE_SIZE; c++) {
        if (ONIGENC_IS_CODE_CTYPE(enc, (OnigCodePoint )c, ctype))
          BITSET_SET_BIT(cc->bs, c);
      }
    }
    break;

  case ONIGENC_CTYPE_GRAPH:
  case ONIGENC_CTYPE_PRINT:
    if (not != 0) {
      for (c = 0; c < SINGLE_BYTE_SIZE; c++) {
        if (! ONIGENC_IS_CODE_CTYPE(enc, (OnigCodePoint )c, ctype))
          BITSET_SET_BIT(cc->bs, c);
      }
    }
    else {
      for (c = 0; c < SINGLE_BYTE_SIZE; c++) {
        if (ONIGENC_IS_CODE_CTYPE(enc, (OnigCodePoint )c, ctype))
          BITSET_SET_BIT(cc->bs, c);
      }
      ADD_ALL_MULTI_BYTE_RANGE(enc, cc->mbuf);
    }
    break;

  case ONIGENC_CTYPE_WORD:
    if (not == 0) {
      for (c = 0; c < SINGLE_BYTE_SIZE; c++) {
        if (ONIGENC_IS_CODE_SB_WORD(enc, c)) BITSET_SET_BIT(cc->bs, c);
      }
      ADD_ALL_MULTI_BYTE_RANGE(enc, cc->mbuf);
    }
    else {
      for (c = 0; c < SINGLE_BYTE_SIZE; c++) {
        if ((ONIGENC_CODE_TO_MBCLEN(enc, c) > 0)  /* 0: invalid code point */
            && ! ONIGENC_IS_CODE_WORD(enc, c))
          BITSET_SET_BIT(cc->bs, c);
      }
    }
    break;

  default:
    return ONIGERR_PARSER_BUG;
    break;
  }

  return r;
}

static int
parse_ctype_to_enc_ctype(int pctype, int* not)
{
  int ctype;

  switch (pctype) {
  case CTYPE_WORD:
    ctype = ONIGENC_CTYPE_WORD;
    *not = 0;
    break;
  case CTYPE_NOT_WORD:
    ctype = ONIGENC_CTYPE_WORD;
    *not = 1;
    break;
  case CTYPE_WHITE_SPACE:
    ctype = ONIGENC_CTYPE_SPACE;
    *not = 0;
    break;
  case CTYPE_NOT_WHITE_SPACE:
    ctype = ONIGENC_CTYPE_SPACE;
    *not = 1;
    break;
  case CTYPE_DIGIT:
    ctype = ONIGENC_CTYPE_DIGIT;
    *not = 0;
    break;
  case CTYPE_NOT_DIGIT:
    ctype = ONIGENC_CTYPE_DIGIT;
    *not = 1;
    break;
  case CTYPE_XDIGIT:
    ctype = ONIGENC_CTYPE_XDIGIT;
    *not = 0;
    break;
  case CTYPE_NOT_XDIGIT:
    ctype = ONIGENC_CTYPE_XDIGIT;
    *not = 1;
    break;
  default:
    return ONIGERR_PARSER_BUG;
    break;
  }
  return ctype;
}

typedef struct {
  UChar    *name;
  int       ctype;
  short int len;
} PosixBracketEntryType;

static int
parse_posix_bracket(CClassNode* cc, UChar** src, UChar* end, ScanEnv* env)
{
#define POSIX_BRACKET_CHECK_LIMIT_LENGTH  20
#define POSIX_BRACKET_NAME_MAX_LEN         6

  static PosixBracketEntryType PBS[] = {
    { "alnum",  ONIGENC_CTYPE_ALNUM,  5 },
    { "alpha",  ONIGENC_CTYPE_ALPHA,  5 },
    { "blank",  ONIGENC_CTYPE_BLANK,  5 },
    { "cntrl",  ONIGENC_CTYPE_CNTRL,  5 },
    { "digit",  ONIGENC_CTYPE_DIGIT,  5 },
    { "graph",  ONIGENC_CTYPE_GRAPH,  5 },
    { "lower",  ONIGENC_CTYPE_LOWER,  5 },
    { "print",  ONIGENC_CTYPE_PRINT,  5 },
    { "punct",  ONIGENC_CTYPE_PUNCT,  5 },
    { "space",  ONIGENC_CTYPE_SPACE,  5 },
    { "upper",  ONIGENC_CTYPE_UPPER,  5 },
    { "xdigit", ONIGENC_CTYPE_XDIGIT, 6 },
    { "ascii",  ONIGENC_CTYPE_ASCII,  5 }, /* I don't know origin. Perl? */
    { (UChar* )NULL, -1, 0 }
  };

  PosixBracketEntryType *pb;
  int not, i, r;
  OnigCodePoint c;
  OnigEncoding enc = env->enc;
  UChar *p = *src;
  PFETCH_READY;

  if (PPEEK_IS('^')) {
    PINC;
    not = 1;
  }
  else
    not = 0;

  if (onigenc_strlen(enc, p, end) < POSIX_BRACKET_NAME_MAX_LEN + 2)
    goto not_posix_bracket;

  for (pb = PBS; IS_NOT_NULL(pb->name); pb++) {
    if (onigenc_with_ascii_strncmp(enc, p, end, pb->name, pb->len) == 0) {
      p = (UChar* )onigenc_step(enc, p, end, pb->len);
      if (onigenc_with_ascii_strncmp(enc, p, end, ":]", 2) != 0)
        return ONIGERR_INVALID_POSIX_BRACKET_TYPE;

      r = add_ctype_to_cc(cc, pb->ctype, not, env);
      if (r != 0) return r;

      PINC; PINC;
      *src = p;
      return 0;
    }
  }

 not_posix_bracket:
  c = 0;
  i = 0;
  while (!PEND && ((c = PPEEK) != ':') && c != ']') {
    PINC;
    if (++i > POSIX_BRACKET_CHECK_LIMIT_LENGTH) break;
  }
  if (c == ':' && ! PEND) {
    PINC;
    if (! PEND) {
      PFETCH(c);
      if (c == ']')
        return ONIGERR_INVALID_POSIX_BRACKET_TYPE;
    }
  }

  return 1;   /* 1: is not POSIX bracket, but no error. */
}

static int
property_name_to_ctype(UChar* p, UChar* end, OnigEncoding enc)
{
  static PosixBracketEntryType PBS[] = {
    { "Alnum",  ONIGENC_CTYPE_ALNUM,  5 },
    { "Alpha",  ONIGENC_CTYPE_ALPHA,  5 },
    { "Blank",  ONIGENC_CTYPE_BLANK,  5 },
    { "Cntrl",  ONIGENC_CTYPE_CNTRL,  5 },
    { "Digit",  ONIGENC_CTYPE_DIGIT,  5 },
    { "Graph",  ONIGENC_CTYPE_GRAPH,  5 },
    { "Lower",  ONIGENC_CTYPE_LOWER,  5 },
    { "Print",  ONIGENC_CTYPE_PRINT,  5 },
    { "Punct",  ONIGENC_CTYPE_PUNCT,  5 },
    { "Space",  ONIGENC_CTYPE_SPACE,  5 },
    { "Upper",  ONIGENC_CTYPE_UPPER,  5 },
    { "XDigit", ONIGENC_CTYPE_XDIGIT, 6 },
    { "ASCII",  ONIGENC_CTYPE_ASCII,  5 },
    { (UChar* )NULL, -1, 0 }
  };

  PosixBracketEntryType *pb;
  int len;

  len = onigenc_strlen(enc, p, end);
  for (pb = PBS; IS_NOT_NULL(pb->name); pb++) {
    if (len == pb->len &&
        onigenc_with_ascii_strncmp(enc, p, end, pb->name, pb->len) == 0)
      return pb->ctype;
  }

  return -1;
}

static int
fetch_char_property_to_ctype(UChar** src, UChar* end, ScanEnv* env)
{
  int ctype;
  OnigCodePoint c;
  OnigEncoding enc = env->enc;
  UChar *prev, *start, *p = *src;
  PFETCH_READY;

  /* 'IsXXXX' => 'XXXX' */
  if (!PEND &&
      IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_CHAR_PROPERTY_PREFIX_IS)) {
    c = PPEEK;
    if (c == 'I') {
      PINC;
      if (! PEND) {
        c = PPEEK;
        if (c == 's')
          PINC;
        else
          PUNFETCH;
      }
    }
  }

  start = prev = p;

  while (!PEND) {
    prev = p;
    PFETCH(c);
    if (c == '}') {
      ctype = property_name_to_ctype(start, prev, enc);
      if (ctype < 0) break;

      *src = p;
      return ctype;
    }
    else if (c == '(' || c == ')' || c == '{' || c == '|')
      break;
  }

  onig_scan_env_set_error_string(env, ONIGERR_INVALID_CHAR_PROPERTY_NAME,
                                 *src, prev);
  return ONIGERR_INVALID_CHAR_PROPERTY_NAME;
}

static int
parse_char_property(Node** np, OnigToken* tok, UChar** src, UChar* end,
                    ScanEnv* env)
{
  int r, ctype;
  CClassNode* cc;

  ctype = fetch_char_property_to_ctype(src, end, env);
  if (ctype < 0) return ctype;

  *np = node_new_cclass();
  CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
  cc = &(NCCLASS(*np));
  r = add_ctype_to_cc(cc, ctype, 0, env);
  if (r != 0) return r;
  if (tok->u.prop.not != 0) CCLASS_SET_NOT(cc);

  return 0;
}

enum CCSTATE {
  CCS_VALUE,
  CCS_RANGE,
  CCS_COMPLETE,
  CCS_START
};

enum CCVALTYPE {
  CCV_SB,
  CCV_CODE_POINT,
  CCV_CLASS
};

static int
next_state_class(CClassNode* cc, OnigCodePoint* vs, enum CCVALTYPE* type,
                 enum CCSTATE* state, ScanEnv* env)
{
  int r;

  if (*state == CCS_RANGE)
    return ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE;

  if (*state == CCS_VALUE && *type != CCV_CLASS) {
    if (*type == CCV_SB)
      BITSET_SET_BIT(cc->bs, (int )(*vs));
    else if (*type == CCV_CODE_POINT) {
      r = add_code_range(&(cc->mbuf), env, *vs, *vs);
      if (r < 0) return r;
    }
  }

  *state = CCS_VALUE;
  *type  = CCV_CLASS;
  return 0;
}

static int
next_state_val(CClassNode* cc, OnigCodePoint *vs, OnigCodePoint v,
               int* vs_israw, int v_israw,
               enum CCVALTYPE intype, enum CCVALTYPE* type,
               enum CCSTATE* state, ScanEnv* env)
{
  int r;

  switch (*state) {
  case CCS_VALUE:
    if (*type == CCV_SB)
      BITSET_SET_BIT(cc->bs, (int )(*vs));
    else if (*type == CCV_CODE_POINT) {
      r = add_code_range(&(cc->mbuf), env, *vs, *vs);
      if (r < 0) return r;
    }
    break;

  case CCS_RANGE:
    if (intype == *type) {
      if (intype == CCV_SB) {
        if (*vs > 0xff || v > 0xff)
          return ONIGERR_INVALID_WIDE_CHAR_VALUE;

        if (*vs > v) {
          if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC))
            goto ccs_range_end;
          else
            return ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS;
        }
        bitset_set_range(cc->bs, (int )*vs, (int )v);
      }
      else {
        r = add_code_range(&(cc->mbuf), env, *vs, v);
        if (r < 0) return r;
      }
    }
    else {
#if 0
      if (intype == CCV_CODE_POINT && *type == CCV_SB) {
#endif
        if (*vs > v) {
          if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC))
            goto ccs_range_end;
          else
            return ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS;
        }
        bitset_set_range(cc->bs, (int )*vs, (int )(v < 0xff ? v : 0xff));
        r = add_code_range(&(cc->mbuf), env, (OnigCodePoint )*vs, v);
        if (r < 0) return r;
#if 0
      }
      else
        return ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE;
#endif
    }
  ccs_range_end:
    *state = CCS_COMPLETE;
    break;

  case CCS_COMPLETE:
  case CCS_START:
    *state = CCS_VALUE;
    break;

  default:
    break;
  }

  *vs_israw = v_israw;
  *vs       = v;
  *type     = intype;
  return 0;
}

static int
code_exist_check(OnigCodePoint c, UChar* from, UChar* end, int ignore_escaped,
                 OnigEncoding enc)
{
  int in_esc;
  OnigCodePoint code;
  UChar* p = from;
  PFETCH_READY;

  in_esc = 0;
  while (! PEND) {
    if (ignore_escaped && in_esc) {
      in_esc = 0;
    }
    else {
      PFETCH(code);
      if (code == c) return 1;
      if (code == MC_ESC(enc)) in_esc = 1;
    }
  }
  return 0;
}

static int
parse_char_class(Node** np, OnigToken* tok, UChar** src, UChar* end,
                 ScanEnv* env)
{
  int r, neg, len, fetched, and_start;
  OnigCodePoint v, vs;
  UChar *p;
  Node* node;
  CClassNode *cc, *prev_cc;
  CClassNode work_cc;

  enum CCSTATE state;
  enum CCVALTYPE val_type, in_type;
  int val_israw, in_israw;

  prev_cc = (CClassNode* )NULL;
  *np = NULL_NODE;
  r = fetch_token_in_cc(tok, src, end, env);
  if (r == TK_CHAR && tok->u.c == '^' && tok->escaped == 0) {
    neg = 1;
    r = fetch_token_in_cc(tok, src, end, env);
  }
  else {
    neg = 0;
  }

  if (r < 0) return r;
  if (r == TK_CC_CLOSE) {
    if (! code_exist_check((OnigCodePoint )']',
                           *src, env->pattern_end, 1, env->enc))
      return ONIGERR_EMPTY_CHAR_CLASS;

    CC_ESC_WARN(env, "]");
    r = tok->type = TK_CHAR;  /* allow []...] */
  }

  *np = node = node_new_cclass();
  CHECK_NULL_RETURN_VAL(node, ONIGERR_MEMORY);
  cc = &(NCCLASS(node));

  and_start = 0;
  state = CCS_START;
  p = *src;
  while (r != TK_CC_CLOSE) {
    fetched = 0;
    switch (r) {
    case TK_CHAR:
      len = ONIGENC_CODE_TO_MBCLEN(env->enc, tok->u.c);
      if (len > 1) {
        in_type = CCV_CODE_POINT;
      }
      else {
      sb_char:
        in_type = CCV_SB;
      }
      v = (OnigCodePoint )tok->u.c;
      in_israw = 0;
      goto val_entry2;
      break;

    case TK_RAW_BYTE:
      /* tok->base != 0 : octal or hexadec. */
      if (! ONIGENC_IS_SINGLEBYTE(env->enc) && tok->base != 0) {
        UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN];
        UChar* bufe = buf + ONIGENC_CODE_TO_MBC_MAXLEN;
        UChar* psave = p;
        int i, base = tok->base;

        buf[0] = tok->u.c;
        for (i = 1; i < ONIGENC_MBC_MAXLEN(env->enc); i++) {
          r = fetch_token_in_cc(tok, &p, end, env);
          if (r < 0) goto err;
          if (r != TK_RAW_BYTE || tok->base != base) {
            fetched = 1;
            break;
          }
          buf[i] = tok->u.c;
        }

        if (i < ONIGENC_MBC_MINLEN(env->enc)) {
          r = ONIGERR_TOO_SHORT_MULTI_BYTE_STRING;
          goto err;
        }

        len = enc_len(env->enc, buf);
        if (i < len) {
          r = ONIGERR_TOO_SHORT_MULTI_BYTE_STRING;
          goto err;
        }
        else if (i > len) { /* fetch back */
          p = psave;
          for (i = 1; i < len; i++) {
            r = fetch_token_in_cc(tok, &p, end, env);
          }
          fetched = 0;
        }

        if (i == 1) {
          v = (OnigCodePoint )buf[0];
          goto raw_single;
        }
        else {
          v = ONIGENC_MBC_TO_CODE(env->enc, buf, bufe);
          in_type = CCV_CODE_POINT;
        }
      }
      else {
        v = (OnigCodePoint )tok->u.c;
      raw_single:
        in_type = CCV_SB;
      }
      in_israw = 1;
      goto val_entry2;
      break;

    case TK_CODE_POINT:
      v = tok->u.code;
      in_israw = 1;
    val_entry:
      len = ONIGENC_CODE_TO_MBCLEN(env->enc, v);
      if (len < 0) {
        r = len;
        goto err;
      }
      in_type = (len == 1 ? CCV_SB : CCV_CODE_POINT);
    val_entry2:
      r = next_state_val(cc, &vs, v, &val_israw, in_israw, in_type, &val_type,
                         &state, env);
      if (r != 0) goto err;
      break;

    case TK_POSIX_BRACKET_OPEN:
      r = parse_posix_bracket(cc, &p, end, env);
      if (r < 0) goto err;
      if (r == 1) {  /* is not POSIX bracket */
        CC_ESC_WARN(env, "[");
        p = tok->backp;
        v = (OnigCodePoint )tok->u.c;
        in_israw = 0;
        goto val_entry;
      }
      goto next_class;
      break;

    case TK_CHAR_TYPE:
      {
        int ctype, not;
        ctype = parse_ctype_to_enc_ctype(tok->u.subtype, &not);
        r = add_ctype_to_cc(cc, ctype, not, env);
        if (r != 0) return r;
      }

    next_class:
      r = next_state_class(cc, &vs, &val_type, &state, env);
      if (r != 0) goto err;
      break;

    case TK_CHAR_PROPERTY:
      {
        int ctype;

        ctype = fetch_char_property_to_ctype(&p, end, env);
        if (ctype < 0) return ctype;
        r = add_ctype_to_cc(cc, ctype, tok->u.prop.not, env);
        if (r != 0) return r;
        goto next_class;
      }
      break;

    case TK_CC_RANGE:
      if (state == CCS_VALUE) {
        r = fetch_token_in_cc(tok, &p, end, env);
        if (r < 0) goto err;
        fetched = 1;
        if (r == TK_CC_CLOSE) { /* allow [x-] */
        range_end_val:
          v = (OnigCodePoint )'-';
          in_israw = 0;
          goto val_entry;
        }
        else if (r == TK_CC_AND) {
          CC_ESC_WARN(env, "-");
          goto range_end_val;
        }
        state = CCS_RANGE;
      }
      else if (state == CCS_START) {
        /* [-xa] is allowed */
        v = (OnigCodePoint )tok->u.c;
        in_israw = 0;

        r = fetch_token_in_cc(tok, &p, end, env);
        if (r < 0) goto err;
        fetched = 1;
        /* [--x] or [a&&-x] is warned. */
        if (r == TK_CC_RANGE || and_start != 0)
          CC_ESC_WARN(env, "-");

        goto val_entry;
      }
      else if (state == CCS_RANGE) {
        CC_ESC_WARN(env, "-");
        goto sb_char;  /* [!--x] is allowed */
      }
      else { /* CCS_COMPLETE */
        r = fetch_token_in_cc(tok, &p, end, env);
        if (r < 0) goto err;
        fetched = 1;
        if (r == TK_CC_CLOSE) goto range_end_val; /* allow [a-b-] */
        else if (r == TK_CC_AND) {
          CC_ESC_WARN(env, "-");
          goto range_end_val;
        }

        if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC)) {
          CC_ESC_WARN(env, "-");
          goto sb_char;   /* [0-9-a] is allowed as [0-9\-a] */
        }
        r = ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS;
        goto err;
      }
      break;

    case TK_CC_CC_OPEN: /* [ */
      {
        Node *anode;
        CClassNode* acc;

        r = parse_char_class(&anode, tok, &p, end, env);
        if (r != 0) goto cc_open_err;
        acc = &(NCCLASS(anode));
        r = or_cclass(cc, acc, env->enc);

        onig_node_free(anode);
      cc_open_err:
        if (r != 0) goto err;
      }
      break;

    case TK_CC_AND: /* && */
      {
        if (state == CCS_VALUE) {
          r = next_state_val(cc, &vs, 0, &val_israw, 0, val_type,
                             &val_type, &state, env);
          if (r != 0) goto err;
        }
        /* initialize local variables */
        and_start = 1;
        state = CCS_START;

        if (IS_NOT_NULL(prev_cc)) {
          r = and_cclass(prev_cc, cc, env->enc);
          if (r != 0) goto err;
          bbuf_free(cc->mbuf);
        }
        else {
          prev_cc = cc;
          cc = &work_cc;
        }
        initialize_cclass(cc);
      }
      break;

    case TK_EOT:
      r = ONIGERR_PREMATURE_END_OF_CHAR_CLASS;
      goto err;
      break;
    default:
      r = ONIGERR_PARSER_BUG;
      goto err;
      break;
    }

    if (fetched)
      r = tok->type;
    else {
      r = fetch_token_in_cc(tok, &p, end, env);
      if (r < 0) goto err;
    }
  }

  if (state == CCS_VALUE) {
    r = next_state_val(cc, &vs, 0, &val_israw, 0, val_type,
                       &val_type, &state, env);
    if (r != 0) goto err;
  }

  if (IS_NOT_NULL(prev_cc)) {
    r = and_cclass(prev_cc, cc, env->enc);
    if (r != 0) goto err;
    bbuf_free(cc->mbuf);
    cc = prev_cc;
  }

  if (neg != 0)
    CCLASS_SET_NOT(cc);
  else
    CCLASS_CLEAR_NOT(cc);
  if (IS_CCLASS_NOT(cc) &&
      IS_SYNTAX_BV(env->syntax, ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC)) {
    int is_empty;

    is_empty = (IS_NULL(cc->mbuf) ? 1 : 0);
    if (is_empty != 0)
      BITSET_IS_EMPTY(cc->bs, is_empty);

    if (is_empty == 0) {
#define NEWLINE_CODE    0x0a

      if (ONIGENC_IS_CODE_NEWLINE(env->enc, NEWLINE_CODE)) {
        if (ONIGENC_CODE_TO_MBCLEN(env->enc, NEWLINE_CODE) == 1)
          BITSET_SET_BIT(cc->bs, NEWLINE_CODE);
        else
          add_code_range(&(cc->mbuf), env, NEWLINE_CODE, NEWLINE_CODE);
      }
    }
  }
  *src = p;
  return 0;

 err:
  if (cc != &(NCCLASS(*np)))
    bbuf_free(cc->mbuf);
  onig_node_free(*np);
  return r;
}

static int parse_subexp(Node** top, OnigToken* tok, int term,
                        UChar** src, UChar* end, ScanEnv* env);

static int
parse_effect(Node** np, OnigToken* tok, int term, UChar** src, UChar* end,
             ScanEnv* env)
{
  int r, num;
  int list_capture;
  Node *target;
  OnigOptionType option;
  OnigEncoding enc = env->enc;
  OnigCodePoint c;
  UChar* p = *src;
  PFETCH_READY;

  *np = NULL;
  if (PEND) return ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS;

  option = env->option;
  if (PPEEK_IS('?') &&
      IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_GROUP_EFFECT)) {
    PINC;
    if (PEND) return ONIGERR_END_PATTERN_IN_GROUP;

    PFETCH(c);
    switch (c) {
    case ':':   /* (?:...) grouping only */
    group:
      r = fetch_token(tok, &p, end, env);
      if (r < 0) return r;
      r = parse_subexp(np, tok, term, &p, end, env);
      if (r < 0) return r;
      *src = p;
      return 1; /* group */
      break;

    case '=':
      *np = onig_node_new_anchor(ANCHOR_PREC_READ);
      break;
    case '!':  /*         preceding read */
      *np = onig_node_new_anchor(ANCHOR_PREC_READ_NOT);
      break;
    case '>':            /* (?>...) stop backtrack */
      *np = node_new_effect(EFFECT_STOP_BACKTRACK);
      break;

    case '<':   /* look behind (?<=...), (?<!...) */
      PFETCH(c);
      if (c == '=')
        *np = onig_node_new_anchor(ANCHOR_LOOK_BEHIND);
      else if (c == '!')
        *np = onig_node_new_anchor(ANCHOR_LOOK_BEHIND_NOT);
#ifdef USE_NAMED_GROUP
      else if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP)) {
        UChar *name;
        UChar *name_end;

        PUNFETCH;
        list_capture = 0;

      named_group:
        name = p;
        r = fetch_name(&p, end, &name_end, env, 0);
        if (r < 0) return r;

        num = scan_env_add_mem_entry(env);
        if (num < 0) return num;
        if (list_capture != 0 && num >= BIT_STATUS_BITS_NUM)
          return ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY;

        r = name_add(env->reg, name, name_end, num, env);
        if (r != 0) return r;
        *np = node_new_effect_memory(env->option, 1);
        CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
        NEFFECT(*np).regnum = num;
        if (list_capture != 0)
          BIT_STATUS_ON_AT_SIMPLE(env->capture_history, num);
        env->num_named++;
      }
#endif
      else
        return ONIGERR_UNDEFINED_GROUP_OPTION;
      break;

    case '@':
      if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY)) {
#ifdef USE_NAMED_GROUP
        if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP)) {
          PFETCH(c);
          if (c == '<') {
            list_capture = 1;
            goto named_group; /* (?@<name>...) */
          }
          PUNFETCH;
        }
#endif
        *np = node_new_effect_memory(env->option, 0);
        CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
        num = scan_env_add_mem_entry(env);
        if (num < 0) {
          onig_node_free(*np);
          return num;
        }
        else if (num >= BIT_STATUS_BITS_NUM) {
          onig_node_free(*np);
          return ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY;
        }
        NEFFECT(*np).regnum = num;
        BIT_STATUS_ON_AT_SIMPLE(env->capture_history, num);
      }
      else {
        return ONIGERR_UNDEFINED_GROUP_OPTION;
      }
      break;

#ifdef USE_POSIXLINE_OPTION
    case 'p':
#endif
    case '-': case 'i': case 'm': case 's': case 'x':
      {
        int neg = 0;

        while (1) {
          switch (c) {
          case ':':
          case ')':
          break;

          case '-':  neg = 1; break;
          case 'x':  ONOFF(option, ONIG_OPTION_EXTEND,     neg); break;
          case 'i':  ONOFF(option, ONIG_OPTION_IGNORECASE, neg); break;
          case 's':
            if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_PERL)) {
              ONOFF(option, ONIG_OPTION_MULTILINE,  neg);
            }
            else
              return ONIGERR_UNDEFINED_GROUP_OPTION;
            break;

          case 'm':
            if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_PERL)) {
              ONOFF(option, ONIG_OPTION_SINGLELINE, (neg == 0 ? 1 : 0));
            }
            else if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_OPTION_RUBY)) {
              ONOFF(option, ONIG_OPTION_MULTILINE,  neg);
            }
            else
              return ONIGERR_UNDEFINED_GROUP_OPTION;
            break;
#ifdef USE_POSIXLINE_OPTION
          case 'p':
            ONOFF(option, ONIG_OPTION_MULTILINE|ONIG_OPTION_SINGLELINE, neg);
            break;
#endif
          default:
            return ONIGERR_UNDEFINED_GROUP_OPTION;
          }

          if (c == ')') {
            *np = node_new_option(option);
            CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
            *src = p;
            return 2; /* option only */
          }
          else if (c == ':') {
            OnigOptionType prev = env->option;

            env->option     = option;
            r = fetch_token(tok, &p, end, env);
            if (r < 0) return r;
            r = parse_subexp(&target, tok, term, &p, end, env);
            env->option = prev;
            if (r < 0) return r;
            *np = node_new_option(option);
            CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
            NEFFECT(*np).target = target;
            *src = p;
            return 0;
          }

          if (PEND) return ONIGERR_END_PATTERN_IN_GROUP;
          PFETCH(c);
        }
      }
      break;

    default:
      return ONIGERR_UNDEFINED_GROUP_OPTION;
    }
  }
  else {
#ifdef USE_NAMED_GROUP
    if (ONIG_IS_OPTION_ON(env->option, ONIG_OPTION_DONT_CAPTURE_GROUP))
      goto group;
#endif
    *np = node_new_effect_memory(env->option, 0);
    CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
    num = scan_env_add_mem_entry(env);
    if (num < 0) return num;
    NEFFECT(*np).regnum = num;
  }

  CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
  r = fetch_token(tok, &p, end, env);
  if (r < 0) return r;
  r = parse_subexp(&target, tok, term, &p, end, env);
  if (r < 0) return r;

  if (NTYPE(*np) == N_ANCHOR)
    NANCHOR(*np).target = target;
  else {
    NEFFECT(*np).target = target;
    if (NEFFECT(*np).type == EFFECT_MEMORY) {
      /* Don't move this to previous of parse_subexp() */
      r = scan_env_set_mem_node(env, NEFFECT(*np).regnum, *np);
      if (r != 0) return r;
    }
  }

  *src = p;
  return 0;
}

static char* PopularQStr[] = {
  "?", "*", "+", "??", "*?", "+?"
};

static char* ReduceQStr[] = {
  "", "", "*", "*?", "??", "+ and ??", "+? and ?"
};

static int
set_qualifier(Node* qnode, Node* target, int group, ScanEnv* env)
{
  QualifierNode* qn;

  qn = &(NQUALIFIER(qnode));
  if (qn->lower == 1 && qn->upper == 1) {
    return 1;
  }

  switch (NTYPE(target)) {
  case N_STRING:
    if (! group) {
      StrNode* sn = &(NSTRING(target));
      if (str_node_can_be_split(sn, env->enc)) {
        Node* n = str_node_split_last_char(sn, env->enc);
        if (IS_NOT_NULL(n)) {
          qn->target = n;
          return 2;
        }
      }
    }
    break;

  case N_QUALIFIER:
    { /* check redundant double repeat. */
      /* verbose warn (?:.?)? etc... but not warn (.?)? etc... */
      QualifierNode* qnt = &(NQUALIFIER(target));

#ifdef USE_WARNING_REDUNDANT_NESTED_REPEAT_OPERATOR
      if (qn->by_number == 0 && qnt->by_number == 0 &&
          IS_SYNTAX_BV(env->syntax, ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT)) {
        int nestq_num, targetq_num;
        char buf[WARN_BUFSIZE];

        nestq_num   = popular_qualifier_num(qn);
        targetq_num = popular_qualifier_num(qnt);

        switch(ReduceTypeTable[targetq_num][nestq_num]) {
        case RQ_ASIS:
          break;

        case RQ_DEL:
          if (onig_verb_warn != onig_null_warn) {
            onig_snprintf_with_pattern(buf, WARN_BUFSIZE, env->enc,
                                       env->pattern, env->pattern_end,
                                       "redundant nested repeat operator");
            (*onig_verb_warn)(buf);
          }
          goto warn_exit;
          break;

        default:
          if (onig_verb_warn != onig_null_warn) {
            onig_snprintf_with_pattern(buf, WARN_BUFSIZE, env->enc,
                                       env->pattern, env->pattern_end,
            "nested repeat operator %s and %s was replaced with '%s'",
            PopularQStr[targetq_num], PopularQStr[nestq_num],
            ReduceQStr[ReduceTypeTable[targetq_num][nestq_num]]);
            (*onig_verb_warn)(buf);
          }
          goto warn_exit;
          break;
        }
      }

    warn_exit:
#endif
      if (popular_qualifier_num(qnt) >= 0 && popular_qualifier_num(qn) >= 0) {
        onig_reduce_nested_qualifier(qnode, target);
        goto q_exit;
      }
    }
    break;

  default:
    break;
  }

  qn->target = target;
 q_exit:
  return 0;
}

static int
make_compound_alt_node_from_cc(OnigAmbigType ambig_flag, OnigEncoding enc,
                               CClassNode* cc, Node** root)
{
  int r, i, j, k, clen, len, ncode, n;
  UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN];
  Node **ptail, *snode = NULL_NODE;
  OnigCompAmbigCodes* ccs;
  OnigCompAmbigCodeItem* ci;
  OnigAmbigType amb;

  n = 0;
  *root = NULL_NODE;
  ptail = root;

  for (amb = 0x01; amb <= ONIGENC_AMBIGUOUS_MATCH_LIMIT; amb <<= 1) {
    if ((amb & ambig_flag) == 0)  continue;

    ncode = ONIGENC_GET_ALL_COMP_AMBIG_CODES(enc, amb, &ccs);
    for (i = 0; i < ncode; i++) {
      if (onig_is_code_in_cc(enc, ccs[i].code, cc)) {
        for (j = 0; j < ccs[i].n; j++) {
          ci = &(ccs[i].items[j]);
          if (ci->len > 1) { /* compound only */
            if (IS_CCLASS_NOT(cc)) clear_not_flag_cclass(cc, enc);

            clen = ci->len;
            for (k = 0; k < clen; k++) {
              len = ONIGENC_CODE_TO_MBC(enc, ci->code[k], buf);

              if (k == 0) {
                snode = node_new_str_raw(buf, buf + len);
                CHECK_NULL_RETURN_VAL(snode, ONIGERR_MEMORY);
              }
              else {
                r = onig_node_str_cat(snode, buf, buf + len);
                if (r < 0) return r;
              }
            }

            *ptail = node_new_alt(snode, NULL_NODE);
            CHECK_NULL_RETURN_VAL(*ptail, ONIGERR_MEMORY);
            ptail = &(NCONS(*ptail).right);
            n++;
        }
        }
      }
    }
  }

  return n;
}

#ifdef USE_SHARED_CCLASS_TABLE

#define THRESHOLD_RANGE_NUM_FOR_SHARE_CCLASS     8

/* for ctype node hash table */

typedef struct {
  OnigEncoding enc;
  int not;
  int type;
} type_cclass_key;

static int type_cclass_cmp(type_cclass_key* x, type_cclass_key* y)
{
  if (x->type != y->type) return 1;
  if (x->enc  != y->enc)  return 1;
  if (x->not  != y->not)  return 1;
  return 0;
}

static int type_cclass_hash(type_cclass_key* key)
{
  int i, val;
  unsigned char *p;

  val = 0;

  p = (unsigned char* )&(key->enc);
  for (i = 0; i < sizeof(key->enc); i++) {
    val = val * 997 + (int )*p++;
  }

  p = (unsigned char* )(&key->type);
  for (i = 0; i < sizeof(key->type); i++) {
    val = val * 997 + (int )*p++;
  }

  val += key->not;
  return val + (val >> 5);
}

static struct st_hash_type type_type_cclass_hash = {
    type_cclass_cmp,
    type_cclass_hash,
};

static st_table* OnigTypeCClassTable;

static int
i_free_shared_class(type_cclass_key* key, Node* node, void* arg)
{
  if (IS_NOT_NULL(node)) {
    CClassNode* cc = &(NCCLASS(node));
    if (IS_NOT_NULL(cc->mbuf)) xfree(cc->mbuf);
    xfree(node);
  }
  return ST_DELETE;
}

extern int
onig_free_shared_cclass_table(void)
{
  if (IS_NOT_NULL(OnigTypeCClassTable)) {
    onig_st_foreach(OnigTypeCClassTable, i_free_shared_class, 0);
  }

  return 0;
}

#endif /* USE_SHARED_CCLASS_TABLE */

static int
parse_exp(Node** np, OnigToken* tok, int term,
          UChar** src, UChar* end, ScanEnv* env)
{
  int r, len, group = 0;
  Node* qn;
  Node** targetp;

  *np = NULL;
  if (tok->type == term)
    goto end_of_token;

  switch (tok->type) {
  case TK_ALT:
  case TK_EOT:
  end_of_token:
  *np = node_new_empty();
  return tok->type;
  break;

  case TK_SUBEXP_OPEN:
    r = parse_effect(np, tok, TK_SUBEXP_CLOSE, src, end, env);
    if (r < 0) return r;
    if (r == 1) group = 1;
    else if (r == 2) { /* option only */
      Node* target;
      OnigOptionType prev = env->option;

      env->option = NEFFECT(*np).option;
      r = fetch_token(tok, src, end, env);
      if (r < 0) return r;
      r = parse_subexp(&target, tok, term, src, end, env);
      env->option = prev;
      if (r < 0) return r;
      NEFFECT(*np).target = target;
      return tok->type;
    }
    break;

  case TK_SUBEXP_CLOSE:
    if (! IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP))
      return ONIGERR_UNMATCHED_CLOSE_PARENTHESIS;

    if (tok->escaped) goto tk_raw_byte;
    else goto tk_byte;
    break;

  case TK_STRING:
  tk_byte:
    {
      *np = node_new_str(tok->backp, *src);
      CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);

      while (1) {
        r = fetch_token(tok, src, end, env);
        if (r < 0) return r;
        if (r != TK_STRING) break;

        r = onig_node_str_cat(*np, tok->backp, *src);
        if (r < 0) return r;
      }

    string_end:
      targetp = np;
      goto repeat;
    }
    break;

  case TK_RAW_BYTE:
  tk_raw_byte:
    {
      *np = node_new_str_raw_char((UChar )tok->u.c);
      CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
      len = 1;
      while (1) {
        r = fetch_token(tok, src, end, env);
        if (r < 0) return r;
        if (r != TK_RAW_BYTE) {
#ifndef NUMBERED_CHAR_IS_NOT_CASE_AMBIG
          if (len >= enc_len(env->enc, NSTRING(*np).s)) {
            NSTRING_CLEAR_RAW(*np);
          }
#endif
          goto string_end;
        }

        r = node_str_cat_char(*np, (UChar )tok->u.c);
        if (r < 0) return r;
        len++;
      }
    }
    break;

  case TK_CODE_POINT:
    {
      UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN];
      int num = ONIGENC_CODE_TO_MBC(env->enc, tok->u.code, buf);
      if (num < 0) return num;
#ifdef NUMBERED_CHAR_IS_NOT_CASE_AMBIG
      *np = node_new_str_raw(buf, buf + num);
#else
      *np = node_new_str(buf, buf + num);
#endif
      CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
    }
    break;

  case TK_QUOTE_OPEN:
    {
      OnigCodePoint end_op[2];
      UChar *qstart, *qend, *nextp;

      end_op[0] = (OnigCodePoint )MC_ESC(env->enc);
      end_op[1] = (OnigCodePoint )'E';
      qstart = *src;
      qend = find_str_position(end_op, 2, qstart, end, &nextp, env->enc);
      if (IS_NULL(qend)) {
        nextp = qend = end;
      }
      *np = node_new_str(qstart, qend);
      CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
      *src = nextp;
    }
    break;

  case TK_CHAR_TYPE:
    {
      switch (tok->u.subtype) {
      case CTYPE_WORD:
      case CTYPE_NOT_WORD:
        *np = node_new_ctype(tok->u.subtype);
        CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
        break;

      case CTYPE_WHITE_SPACE:
      case CTYPE_NOT_WHITE_SPACE:
      case CTYPE_DIGIT:
      case CTYPE_NOT_DIGIT:
      case CTYPE_XDIGIT:
      case CTYPE_NOT_XDIGIT:
        {
          CClassNode* cc;
          int ctype, not;

#ifdef USE_SHARED_CCLASS_TABLE
          OnigCodePoint *sbr, *mbr;

          ctype = parse_ctype_to_enc_ctype(tok->u.subtype, &not);
          r = ONIGENC_GET_CTYPE_CODE_RANGE(env->enc, ctype, &sbr, &mbr);
          if (r == 0 &&
              ONIGENC_CODE_RANGE_NUM(mbr)
              >= THRESHOLD_RANGE_NUM_FOR_SHARE_CCLASS) {
            type_cclass_key  key;
            type_cclass_key* new_key;

            key.enc  = env->enc;
            key.not  = not;
            key.type = ctype;

            THREAD_ATOMIC_START;

            if (IS_NULL(OnigTypeCClassTable)) {
              OnigTypeCClassTable
                = onig_st_init_table_with_size(&type_type_cclass_hash, 10);
              if (IS_NULL(OnigTypeCClassTable)) {
                THREAD_ATOMIC_END;
                return ONIGERR_MEMORY;
              }
            }
            else {
              if (onig_st_lookup(OnigTypeCClassTable, (st_data_t )&key,
                                 (st_data_t* )np)) {
                THREAD_ATOMIC_END;
                break;
              }
            }

            *np = node_new_cclass_by_codepoint_range(not, sbr, mbr);
            if (IS_NULL(*np)) {
              THREAD_ATOMIC_END;
              return ONIGERR_MEMORY;
            }

            CCLASS_SET_SHARE(&(NCCLASS(*np)));
            new_key = (type_cclass_key* )xmalloc(sizeof(type_cclass_key));
            onig_st_add_direct(OnigTypeCClassTable, (st_data_t )new_key,
                               (st_data_t )*np);

            THREAD_ATOMIC_END;
          }
          else {
#endif
            ctype = parse_ctype_to_enc_ctype(tok->u.subtype, &not);
            *np = node_new_cclass();
            CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
            cc = &(NCCLASS(*np));
            add_ctype_to_cc(cc, ctype, 0, env);
            if (not != 0) CCLASS_SET_NOT(cc);
#ifdef USE_SHARED_CCLASS_TABLE
          }
#endif
        }
        break;

      default:
        return ONIGERR_PARSER_BUG;
        break;
      }
    }
    break;

  case TK_CHAR_PROPERTY:
    r = parse_char_property(np, tok, src, end, env);
    if (r != 0) return r;
    break;

  case TK_CC_OPEN:
    {
      CClassNode* cc;

      r = parse_char_class(np, tok, src, end, env);
      if (r != 0) return r;

      cc = &(NCCLASS(*np));

      if (IS_IGNORECASE(env->option)) {
        int i, n, in_cc;
        OnigPairAmbigCodes* ccs;
        BitSetRef bs = cc->bs;
        OnigAmbigType amb;

        for (amb = 0x01; amb <= ONIGENC_AMBIGUOUS_MATCH_LIMIT; amb <<= 1) {
          if ((amb & env->ambig_flag) == 0)  continue;

          n = ONIGENC_GET_ALL_PAIR_AMBIG_CODES(env->enc, amb, &ccs);
          for (i = 0; i < n; i++) {
            in_cc = onig_is_code_in_cc(env->enc, ccs[i].from, cc);

            if ((in_cc != 0 && !IS_CCLASS_NOT(cc)) ||
                (in_cc == 0 && IS_CCLASS_NOT(cc))) {
              if (ONIGENC_MBC_MINLEN(env->enc) > 1 ||
                  ccs[i].from >= SINGLE_BYTE_SIZE) {
                /* if (cc->not) clear_not_flag_cclass(cc, env->enc); */
                add_code_range(&(cc->mbuf), env, ccs[i].to, ccs[i].to);
              }
              else {
                if (BITSET_AT(bs, ccs[i].from)) {
                  /* /(?i:[^A-C])/.match("a") ==> fail. */
                  BITSET_SET_BIT(bs, ccs[i].to);
                }
                if (BITSET_AT(bs, ccs[i].to)) {
                  BITSET_SET_BIT(bs, ccs[i].from);
                }
              }
            }
          }
        }
      }

      if (IS_IGNORECASE(env->option) &&
          (env->ambig_flag & ONIGENC_AMBIGUOUS_MATCH_COMPOUND) != 0) {
        int res;
        Node *alt_root, *work;

        res = make_compound_alt_node_from_cc(env->ambig_flag, env->enc,
                                             cc, &alt_root);
        if (res < 0) return res;
        if (res > 0) {
          work = node_new_alt(*np, alt_root);
          if (IS_NULL(work)) {
            onig_node_free(alt_root);
            return ONIGERR_MEMORY;
          }
          *np = work;
        }
      }
    }
    break;

  case TK_ANYCHAR:
    *np = node_new_anychar();
    CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
    break;

  case TK_ANYCHAR_ANYTIME:
    *np = node_new_anychar();
    CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
    qn = node_new_qualifier(0, REPEAT_INFINITE, 0);
    CHECK_NULL_RETURN_VAL(qn, ONIGERR_MEMORY);
    NQUALIFIER(qn).target = *np;
    *np = qn;
    break;

  case TK_BACKREF:
    len = tok->u.backref.num;
    *np = node_new_backref(len,
               (len > 1 ? tok->u.backref.refs : &(tok->u.backref.ref1)),
                tok->u.backref.by_name, env);
    CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
    break;

#ifdef USE_SUBEXP_CALL
  case TK_CALL:
    *np = node_new_call(tok->u.call.name, tok->u.call.name_end);
    CHECK_NULL_RETURN_VAL(*np, ONIGERR_MEMORY);
    env->num_call++;
    break;
#endif

  case TK_ANCHOR:
    *np = onig_node_new_anchor(tok->u.anchor);
    break;

  case TK_OP_REPEAT:
  case TK_INTERVAL:
    if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS)) {
      if (IS_SYNTAX_BV(env->syntax, ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS))
        return ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED;
      else
        *np = node_new_empty();
    }
    else {
      goto tk_byte;
    }
    break;

  default:
    return ONIGERR_PARSER_BUG;
    break;
  }

  {
    targetp = np;

  re_entry:
    r = fetch_token(tok, src, end, env);
    if (r < 0) return r;

  repeat:
    if (r == TK_OP_REPEAT || r == TK_INTERVAL) {
      if (is_invalid_qualifier_target(*targetp))
        return ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID;

      qn = node_new_qualifier(tok->u.repeat.lower, tok->u.repeat.upper,
                              (r == TK_INTERVAL ? 1 : 0));
      CHECK_NULL_RETURN_VAL(qn, ONIGERR_MEMORY);
      NQUALIFIER(qn).greedy = tok->u.repeat.greedy;
      r = set_qualifier(qn, *targetp, group, env);
      if (r < 0) return r;

      if (tok->u.repeat.possessive != 0) {
        Node* en;
        en = node_new_effect(EFFECT_STOP_BACKTRACK);
        CHECK_NULL_RETURN_VAL(en, ONIGERR_MEMORY);
        NEFFECT(en).target = qn;
        qn = en;
      }

      if (r == 0) {
        *targetp = qn;
      }
      else if (r == 2) { /* split case: /abc+/ */
        Node *tmp;

        *targetp = node_new_list(*targetp, NULL);
        CHECK_NULL_RETURN_VAL(*targetp, ONIGERR_MEMORY);
        tmp = NCONS(*targetp).right = node_new_list(qn, NULL);
        CHECK_NULL_RETURN_VAL(tmp, ONIGERR_MEMORY);
        targetp = &(NCONS(tmp).left);
      }
      goto re_entry;
    }
  }

  return r;
}

static int
parse_branch(Node** top, OnigToken* tok, int term,
             UChar** src, UChar* end, ScanEnv* env)
{
  int r;
  Node *node, **headp;

  *top = NULL;
  r = parse_exp(&node, tok, term, src, end, env);
  if (r < 0) return r;

  if (r == TK_EOT || r == term || r == TK_ALT) {
    *top = node;
  }
  else {
    *top  = node_new_list(node, NULL);
    headp = &(NCONS(*top).right);
    while (r != TK_EOT && r != term && r != TK_ALT) {
      r = parse_exp(&node, tok, term, src, end, env);
      if (r < 0) return r;

      if (NTYPE(node) == N_LIST) {
        *headp = node;
        while (IS_NOT_NULL(NCONS(node).right)) node = NCONS(node).right;
        headp = &(NCONS(node).right);
      }
      else {
        *headp = node_new_list(node, NULL);
        headp = &(NCONS(*headp).right);
      }
    }
  }

  return r;
}

/* term_tok: TK_EOT or TK_SUBEXP_CLOSE */
static int
parse_subexp(Node** top, OnigToken* tok, int term,
             UChar** src, UChar* end, ScanEnv* env)
{
  int r;
  Node *node, **headp;

  *top = NULL;
  r = parse_branch(&node, tok, term, src, end, env);
  if (r < 0) {
    onig_node_free(node);
    return r;
  }

  if (r == term) {
    *top = node;
  }
  else if (r == TK_ALT) {
    *top  = node_new_alt(node, NULL);
    headp = &(NCONS(*top).right);
    while (r == TK_ALT) {
      r = fetch_token(tok, src, end, env);
      if (r < 0) return r;
      r = parse_branch(&node, tok, term, src, end, env);
      if (r < 0) return r;

      *headp = node_new_alt(node, NULL);
      headp = &(NCONS(*headp).right);
    }

    if (tok->type != term)
      goto err;
  }
  else {
  err:
    if (term == TK_SUBEXP_CLOSE)
      return ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS;
    else
      return ONIGERR_PARSER_BUG;
  }

  return r;
}

static int
parse_regexp(Node** top, UChar** src, UChar* end, ScanEnv* env)
{
  int r;
  OnigToken tok;

  r = fetch_token(&tok, src, end, env);
  if (r < 0) return r;
  r = parse_subexp(top, &tok, TK_EOT, src, end, env);
  if (r < 0) return r;
  return 0;
}

extern int
onig_parse_make_tree(Node** root, const UChar* pattern, const UChar* end, regex_t* reg,
                      ScanEnv* env)
{
  int r;
  UChar* p;

#ifdef USE_NAMED_GROUP
  names_clear(reg);
#endif

  scan_env_clear(env);
  env->option      = reg->options;
  env->ambig_flag  = reg->ambig_flag;
  env->enc         = reg->enc;
  env->syntax      = reg->syntax;
  env->pattern     = (UChar* )pattern;
  env->pattern_end = (UChar* )end;
  env->reg         = reg;

  *root = NULL;
  p = (UChar* )pattern;
  r = parse_regexp(root, &p, (UChar* )end, env);
  reg->num_mem = env->num_mem;
  return r;
}

extern void
onig_scan_env_set_error_string(ScanEnv* env, int ecode,
                                UChar* arg, UChar* arg_end)
{
  env->error     = arg;
  env->error_end = arg_end;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


regparse.h

root/regparse.h

/* [<][>][^] [v][top][bottom] [index] [help] */

INCLUDED FROM

DEFINITIONS

This source file includes following definitions.
  1. StrNode
  2. CClassNode
  3. QualifierNode
  4. EffectNode
  5. UnsetAddr
  6. UnsetAddrList
  7. CallNode
  8. BackrefNode
  9. AnchorNode
  10. Node
  11. ScanEnv
  12. GroupNumRemap
#ifndef REGPARSE_H
#define REGPARSE_H
/**********************************************************************
  regparse.h -  Oniguruma (regular expression library)
**********************************************************************/
/*-
 * Copyright (c) 2002-2005  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#include "regint.h"

/* node type */
#define N_STRING       (1<< 0)
#define N_CCLASS       (1<< 1)
#define N_CTYPE        (1<< 2)
#define N_ANYCHAR      (1<< 3)
#define N_BACKREF      (1<< 4)
#define N_QUALIFIER    (1<< 5)
#define N_EFFECT       (1<< 6)
#define N_ANCHOR       (1<< 7)
#define N_LIST         (1<< 8)
#define N_ALT          (1<< 9)
#define N_CALL         (1<<10)

#define IS_NODE_TYPE_SIMPLE(type) \
  (((type) & (N_STRING | N_CCLASS | N_CTYPE | N_ANYCHAR | N_BACKREF)) != 0)

#define NTYPE(node)        ((node)->type)
#define NCONS(node)        ((node)->u.cons)
#define NSTRING(node)      ((node)->u.str)
#define NCCLASS(node)      ((node)->u.cclass)
#define NCTYPE(node)       ((node)->u.ctype)
#define NQUALIFIER(node)   ((node)->u.qualifier)
#define NANCHOR(node)      ((node)->u.anchor)
#define NBACKREF(node)     ((node)->u.backref)
#define NEFFECT(node)      ((node)->u.effect)
#define NCALL(node)        ((node)->u.call)

#define CTYPE_WORD              (1<<0)
#define CTYPE_NOT_WORD          (1<<1)
#define CTYPE_WHITE_SPACE       (1<<2)
#define CTYPE_NOT_WHITE_SPACE   (1<<3)
#define CTYPE_DIGIT             (1<<4)
#define CTYPE_NOT_DIGIT         (1<<5)
#define CTYPE_XDIGIT            (1<<6)
#define CTYPE_NOT_XDIGIT        (1<<7)

#define ANCHOR_ANYCHAR_STAR_MASK (ANCHOR_ANYCHAR_STAR | ANCHOR_ANYCHAR_STAR_PL)
#define ANCHOR_END_BUF_MASK      (ANCHOR_END_BUF | ANCHOR_SEMI_END_BUF)

#define EFFECT_MEMORY           (1<<0)
#define EFFECT_OPTION           (1<<1)
#define EFFECT_STOP_BACKTRACK   (1<<2)

#define NODE_STR_MARGIN         16
#define NODE_STR_BUF_SIZE       24  /* sizeof(CClassNode) - sizeof(int)*4 */
#define NODE_BACKREFS_SIZE       7

#define NSTR_RAW                (1<<0) /* by backslashed number */
#define NSTR_AMBIG              (1<<1)
#define NSTR_AMBIG_REDUCE       (1<<2)

#define NSTRING_LEN(node)             ((node)->u.str.end - (node)->u.str.s)
#define NSTRING_SET_RAW(node)          (node)->u.str.flag |= NSTR_RAW
#define NSTRING_CLEAR_RAW(node)        (node)->u.str.flag &= ~NSTR_RAW
#define NSTRING_SET_AMBIG(node)        (node)->u.str.flag |= NSTR_AMBIG
#define NSTRING_SET_AMBIG_REDUCE(node) (node)->u.str.flag |= NSTR_AMBIG_REDUCE
#define NSTRING_IS_RAW(node)          (((node)->u.str.flag & NSTR_RAW)   != 0)
#define NSTRING_IS_AMBIG(node)        (((node)->u.str.flag & NSTR_AMBIG) != 0)
#define NSTRING_IS_AMBIG_REDUCE(node) \
  (((node)->u.str.flag & NSTR_AMBIG_REDUCE) != 0)

#define BACKREFS_P(br) \
  (IS_NOT_NULL((br)->back_dynamic) ? (br)->back_dynamic : (br)->back_static);

#define NQ_TARGET_ISNOT_EMPTY     0
#define NQ_TARGET_IS_EMPTY        1
#define NQ_TARGET_IS_EMPTY_MEM    2
#define NQ_TARGET_IS_EMPTY_REC    3

typedef struct {
  UChar* s;
  UChar* end;
  unsigned int flag;
  int    capa;    /* (allocated size - 1) or 0: use buf[] */
  UChar  buf[NODE_STR_BUF_SIZE];
} StrNode;

/* move to regint.h */
#if 0
typedef struct {
  int    flags;
  BitSet bs;
  BBuf*  mbuf;     /* multi-byte info or NULL */
} CClassNode;
#endif

typedef struct {
  int state;
  struct _Node* target;
  int lower;
  int upper;
  int greedy;
  int by_number;         /* {n,m} */
  int target_empty_info;
  struct _Node* head_exact;
  struct _Node* next_head_exact;
  int is_refered;     /* include called node. don't eliminate even if {0} */
} QualifierNode;

/* status bits */
#define NST_MIN_FIXED             (1<<0)
#define NST_MAX_FIXED             (1<<1)
#define NST_CLEN_FIXED            (1<<2)
#define NST_MARK1                 (1<<3)
#define NST_MARK2                 (1<<4)
#define NST_MEM_BACKREFED         (1<<5)
#define NST_STOP_BT_SIMPLE_REPEAT (1<<6)
#define NST_RECURSION             (1<<7)
#define NST_CALLED                (1<<8)
#define NST_ADDR_FIXED            (1<<9)
#define NST_NAMED_GROUP           (1<<10)
#define NST_NAME_REF              (1<<11)
#define NST_IN_REPEAT             (1<<12) /* STK_REPEAT is nested in stack. */

#define SET_EFFECT_STATUS(node,f)      (node)->u.effect.state |=  (f)
#define CLEAR_EFFECT_STATUS(node,f)    (node)->u.effect.state &= ~(f)

#define IS_EFFECT_CALLED(en)           (((en)->state & NST_CALLED)        != 0)
#define IS_EFFECT_ADDR_FIXED(en)       (((en)->state & NST_ADDR_FIXED)    != 0)
#define IS_EFFECT_RECURSION(en)        (((en)->state & NST_RECURSION)     != 0)
#define IS_EFFECT_MARK1(en)            (((en)->state & NST_MARK1)         != 0)
#define IS_EFFECT_MARK2(en)            (((en)->state & NST_MARK2)         != 0)
#define IS_EFFECT_MIN_FIXED(en)        (((en)->state & NST_MIN_FIXED)     != 0)
#define IS_EFFECT_MAX_FIXED(en)        (((en)->state & NST_MAX_FIXED)     != 0)
#define IS_EFFECT_CLEN_FIXED(en)       (((en)->state & NST_CLEN_FIXED)    != 0)
#define IS_EFFECT_STOP_BT_SIMPLE_REPEAT(en) \
    (((en)->state & NST_STOP_BT_SIMPLE_REPEAT) != 0)
#define IS_EFFECT_NAMED_GROUP(en)      (((en)->state & NST_NAMED_GROUP)   != 0)

#define SET_CALL_RECURSION(node)       (node)->u.call.state |= NST_RECURSION
#define IS_CALL_RECURSION(cn)          (((cn)->state & NST_RECURSION)  != 0)
#define IS_CALL_NAME_REF(cn)           (((cn)->state & NST_NAME_REF)   != 0)
#define IS_BACKREF_NAME_REF(bn)        (((bn)->state & NST_NAME_REF)   != 0)
#define IS_QUALIFIER_IN_REPEAT(qn)     (((qn)->state & NST_IN_REPEAT)  != 0)

typedef struct {
  int state;
  int type;
  int regnum;
  OnigOptionType option;
  struct _Node* target;
  AbsAddrType call_addr;
  /* for multiple call reference */
  OnigDistance min_len; /* min length (byte) */
  OnigDistance max_len; /* max length (byte) */
  int char_len;        /* character length  */
  int opt_count;       /* referenced count in optimize_node_left() */
} EffectNode;

#define CALLNODE_REFNUM_UNDEF  -1

#ifdef USE_SUBEXP_CALL

typedef struct {
  int offset;
  struct _Node* target;
} UnsetAddr;

typedef struct {
  int num;
  int alloc;
  UnsetAddr* us;
} UnsetAddrList;

typedef struct {
  int     state;
  int     ref_num;
  UChar*  name;
  UChar*  name_end;
  struct _Node* target;  /* EffectNode : EFFECT_MEMORY */
  UnsetAddrList* unset_addr_list;
} CallNode;

#endif

typedef struct {
  int     state;
  int     back_num;
  int     back_static[NODE_BACKREFS_SIZE];
  int*    back_dynamic;
} BackrefNode;

typedef struct {
  int type;
  struct _Node* target;
  int char_len;
} AnchorNode;

typedef struct _Node {
  int type;
  union {
    StrNode       str;
    CClassNode    cclass;
    QualifierNode qualifier;
    EffectNode    effect;
#ifdef USE_SUBEXP_CALL
    CallNode      call;
#endif
    BackrefNode   backref;
    AnchorNode    anchor;
    struct {
      struct _Node* left;
      struct _Node* right;
    } cons;
    struct {
      int type;
    } ctype;
  } u;
} Node;

#define NULL_NODE  ((Node* )0)

#define SCANENV_MEMNODES_SIZE               8
#define SCANENV_MEM_NODES(senv)   \
 (IS_NOT_NULL((senv)->mem_nodes_dynamic) ? \
    (senv)->mem_nodes_dynamic : (senv)->mem_nodes_static)

typedef struct {
  OnigOptionType  option;
  OnigAmbigType   ambig_flag;
  OnigEncoding    enc;
  OnigSyntaxType* syntax;
  BitStatusType   capture_history;
  BitStatusType   bt_mem_start;
  BitStatusType   bt_mem_end;
  BitStatusType   backrefed_mem;
  UChar*          pattern;
  UChar*          pattern_end;
  UChar*          error;
  UChar*          error_end;
  regex_t*        reg;       /* for reg->names only */
  int             num_call;
#ifdef USE_SUBEXP_CALL
  UnsetAddrList*  unset_addr_list;
#endif
  int             num_mem;
#ifdef USE_NAMED_GROUP
  int             num_named;
#endif
  int             mem_alloc;
  Node*           mem_nodes_static[SCANENV_MEMNODES_SIZE];
  Node**          mem_nodes_dynamic;
} ScanEnv;

#define IS_SYNTAX_OP(syn, opm)    (((syn)->op  & (opm)) != 0)
#define IS_SYNTAX_OP2(syn, opm)   (((syn)->op2 & (opm)) != 0)
#define IS_SYNTAX_BV(syn, bvm)    (((syn)->behavior & (bvm)) != 0)

#ifdef USE_NAMED_GROUP
typedef struct {
  int new_val;
} GroupNumRemap;

extern int    onig_renumber_name_table P_((regex_t* reg, GroupNumRemap* map));
#endif

extern int    onig_is_code_in_cc P_((OnigEncoding enc, OnigCodePoint code, CClassNode* cc));
extern int    onig_strncmp P_((const UChar* s1, const UChar* s2, int n));
extern void   onig_scan_env_set_error_string P_((ScanEnv* env, int ecode, UChar* arg, UChar* arg_end));
extern int    onig_scan_unsigned_number P_((UChar** src, const UChar* end, OnigEncoding enc));
extern void   onig_reduce_nested_qualifier P_((Node* pnode, Node* cnode));
extern void   onig_node_conv_to_str_node P_((Node* node, int raw));
extern int    onig_node_str_cat P_((Node* node, const UChar* s, const UChar* end));
extern void   onig_node_free P_((Node* node));
extern Node*  onig_node_new_effect P_((int type));
extern Node*  onig_node_new_anchor P_((int type));
extern Node*  onig_node_new_str P_((const UChar* s, const UChar* end));
extern Node*  onig_node_new_list P_((Node* left, Node* right));
extern void   onig_node_str_clear P_((Node* node));
extern int    onig_free_node_list(void);
extern int    onig_names_free P_((regex_t* reg));
extern int    onig_parse_make_tree P_((Node** root, const UChar* pattern, const UChar* end, regex_t* reg, ScanEnv* env));

#ifdef ONIG_DEBUG
#ifdef USE_NAMED_GROUP
extern int onig_print_names(FILE*, regex_t*);
#endif
#endif

#endif /* REGPARSE_H */
/* [<][>][^] [v] [top][bottom][index] [help] */


ruby.c

root/ruby.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. usage
  2. rubylib_mangle
  3. ruby_push_include
  4. identical_path
  5. ruby_incpush
  6. expand_include_path
  7. ruby_incpush_expand
  8. translate_char
  9. ruby_init_loadpath
  10. add_modules
  11. require_libraries
  12. process_sflag
  13. moreswitches
  14. proc_options
  15. load_file
  16. rb_load_file
  17. load_stdin
  18. set_arg0space
  19. set_arg0
  20. ruby_script
  21. init_ids
  22. forbid_setid
  23. verbose_setter
  24. opt_W_getter
  25. ruby_prog_init
  26. ruby_set_argv
  27. ruby_process_options
/**********************************************************************

  ruby.c -

  $Author: matz $
  $Date: 2005/12/12 00:35:08 $
  created at: Tue Aug 10 12:47:31 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto
  Copyright (C) 2000  Network Applied Communication Laboratory, Inc.
  Copyright (C) 2000  Information-technology Promotion Agency, Japan

**********************************************************************/

#ifdef __CYGWIN__
#include <windows.h>
#endif
#ifdef _WIN32_WCE
#include <winsock.h>
#include "wince.h"
#endif
#include "ruby.h"
#include "dln.h"
#include "node.h"
#include <stdio.h>
#include <sys/types.h>
#include <ctype.h>

#ifdef __hpux
#include <sys/pstat.h>
#endif

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
#ifndef MAXPATHLEN
# define MAXPATHLEN 1024
#endif

#include "util.h"

#ifndef HAVE_STDLIB_H
char *getenv();
#endif

VALUE ruby_debug = Qfalse;
VALUE ruby_verbose = Qfalse;
static int sflag = 0;
static int xflag = 0;
extern int ruby_yydebug;

char *ruby_inplace_mode = Qfalse;

static void load_stdin(void);
static void load_file(const char *, int);
static void forbid_setid(const char *);

static VALUE do_loop = Qfalse, do_print = Qfalse;
static VALUE do_check = Qfalse, do_line = Qfalse;
static VALUE do_split = Qfalse;

static char *script;

static int origargc;
static char **origargv;

static void
usage(const char *name)
{
    /* This message really ought to be max 23 lines.
     * Removed -h because the user already knows that option. Others? */

    static char *usage_msg[] = {
"-0[octal]       specify record separator (\\0, if no argument)",
"-a              autosplit mode with -n or -p (splits $_ into $F)",
"-c              check syntax only",
"-Cdirectory     cd to directory, before executing your script",
"-d              set debugging flags (set $DEBUG to true)",
"-e 'command'    one line of script. Several -e's allowed. Omit [programfile]",
"-Fpattern       split() pattern for autosplit (-a)",
"-i[extension]   edit ARGV files in place (make backup if extension supplied)",
"-Idirectory     specify $LOAD_PATH directory (may be used more than once)",
"-Kkcode         specifies KANJI (Japanese) code-set",
"-l              enable line ending processing",
"-n              assume 'while gets(); ... end' loop around your script",
"-p              assume loop like -n but print line also like sed",
"-rlibrary       require the library, before executing your script",
"-s              enable some switch parsing for switches after script name",
"-S              look for the script using PATH environment variable",
"-T[level]       turn on tainting checks",
"-v              print version number, then turn on verbose mode",
"-w              turn warnings on for your script",
"-W[level]       set warning level; 0=silence, 1=medium, 2=verbose (default)",
"-x[directory]   strip off text before #!ruby line and perhaps cd to directory",
"--copyright     print the copyright",
"--version       print the version",
NULL
};
    char **p = usage_msg;

    printf("Usage: %s [switches] [--] [programfile] [arguments]\n", name);
    while (*p)
        printf("  %s\n", *p++);
}

extern VALUE rb_load_path;

#define STATIC_FILE_LENGTH 255

#if defined _WIN32 || defined __CYGWIN__ || defined __DJGPP__
static char *
rubylib_mangle(const char *s, unsigned int l)
{
    static char *newp, *oldp;
    static int newl, oldl, notfound;
    static char newsub[STATIC_FILE_LENGTH+1];

    if (!newp && !notfound) {
        newp = getenv("RUBYLIB_PREFIX");
        if (newp) {
            char *s;

            oldp = newp;
            while (*newp && !ISSPACE(*newp) && *newp != ';') {
                newp++; oldl++;         /* Skip digits. */
            }
            while (*newp && (ISSPACE(*newp) || *newp == ';')) {
                newp++;                 /* Skip whitespace. */
            }
            newl = strlen(newp);
            if (newl == 0 || oldl == 0 || newl > STATIC_FILE_LENGTH) {
                rb_fatal("malformed RUBYLIB_PREFIX");
            }
            strcpy(newsub, newp);
            s = newsub;
            while (*s) {
                if (*s == '\\') *s = '/';
                s++;
            }
        }
        else {
            notfound = 1;
        }
    }
    if (l == 0) {
        l = strlen(s);
    }
    if (!newp || l < oldl || strncasecmp(oldp, s, oldl) != 0) {
        static char ret[STATIC_FILE_LENGTH+1];
        strncpy(ret, s, l);
        ret[l] = 0;
        return ret;
    }
    if (l + newl - oldl > STATIC_FILE_LENGTH || newl > STATIC_FILE_LENGTH) {
        rb_fatal("malformed RUBYLIB_PREFIX");
    }
    strcpy(newsub + newl, s + oldl);
    newsub[l + newl - oldl] = 0;
    return newsub;
}
#define rubylib_mangled_path(s, l) rb_str_new2(rubylib_mangle((s), (l)))
#define rubylib_mangled_path2(s) rb_str_new2(rubylib_mangle((s), 0))
#else
#define rubylib_mangled_path(s, l) rb_str_new((s), (l))
#define rubylib_mangled_path2(s) rb_str_new2(s)
#endif

void
ruby_push_include(const char *path, VALUE (*filter) (VALUE))
{
    const char sep = PATH_SEP_CHAR;

    if (path == 0) return;
#if defined(__CYGWIN__)
    {
        char rubylib[FILENAME_MAX];
        conv_to_posix_path(path, rubylib, FILENAME_MAX);
        path = rubylib;
    }
#endif
    if (strchr(path, sep)) {
        const char *p, *s;
        VALUE ary = rb_ary_new();

        p = path;
        while (*p) {
            while (*p == sep) p++;
            if ((s = strchr(p, sep)) != 0) {
                rb_ary_push(ary, (*filter)(rubylib_mangled_path(p, (int)(s-p))));
                p = s + 1;
            }
            else {
                rb_ary_push(ary, (*filter)(rubylib_mangled_path2(p)));
                break;
            }
        }
        rb_ary_concat(rb_load_path, ary);
    }
    else {
        rb_ary_push(rb_load_path, (*filter)(rubylib_mangled_path2(path)));
    }
}

static VALUE
identical_path(VALUE path)
{
    return path;
}

void
ruby_incpush(const char *path)
{
    ruby_push_include(path, identical_path);
}

static VALUE
expand_include_path(VALUE path)
{
    char *p = RSTRING(path)->ptr;
    if (!p) return path;
    if (*p == '.' && p[1] == '/') return path;
    return rb_file_expand_path(path, Qnil);
}

void
ruby_incpush_expand(const char *path)
{
    ruby_push_include(path, expand_include_path);
}

#if defined DOSISH || defined __CYGWIN__
#define LOAD_RELATIVE 1
#endif

#if defined DOSISH || defined __CYGWIN__
static inline void
translate_char(char *p, int from, int to)
{
    while (*p) {
        if ((unsigned char)*p == from)
            *p = to;
#ifdef CharNext         /* defined as CharNext[AW] on Windows. */
        p = CharNext(p);
#else
        p += mblen(p, RUBY_MBCHAR_MAXSIZE);
#endif
    }
}
#endif

void
ruby_init_loadpath(void)
{
#if defined LOAD_RELATIVE
    char libpath[MAXPATHLEN+1];
    char *p;
    int rest;
#if defined _WIN32 || defined __CYGWIN__
    HMODULE libruby = NULL;
    MEMORY_BASIC_INFORMATION m;

#ifndef _WIN32_WCE
    memset(&m, 0, sizeof(m));
    if (VirtualQuery(ruby_init_loadpath, &m, sizeof(m)) && m.State == MEM_COMMIT)
        libruby = (HMODULE)m.AllocationBase;
#endif
    GetModuleFileName(libruby, libpath, sizeof libpath);
#elif defined(DJGPP)
    extern char *__dos_argv0;
    strncpy(libpath, __dos_argv0, sizeof(libpath) - 1);
#elif defined(__human68k__)
    extern char **_argv;
    strncpy(libpath, _argv[0], sizeof(libpath) - 1);
#elif defined(__EMX__)
    _execname(libpath, sizeof(libpath) - 1);
#endif

    libpath[sizeof(libpath) - 1] = '\0';
#if defined DOSISH || defined __CYGWIN__
    translate_char(libpath, '\\', '/');
#endif
    p = strrchr(libpath, '/');
    if (p) {
        *p = 0;
        if (p-libpath > 3 && !strcasecmp(p-4, "/bin")) {
            p -= 4;
            *p = 0;
        }
    }
    else {
        strcpy(libpath, ".");
        p = libpath + 1;
    }

    rest = sizeof(libpath) - 1 - (p - libpath);

#define RUBY_RELATIVE(path) (strncpy(p, (path), rest), libpath)
#else
#define RUBY_RELATIVE(path) (path)
#endif

    if (rb_safe_level() == 0) {
        ruby_incpush(getenv("RUBYLIB"));
    }

#ifdef RUBY_SEARCH_PATH
    ruby_incpush(RUBY_RELATIVE(RUBY_SEARCH_PATH));
#endif

    ruby_incpush(RUBY_RELATIVE(RUBY_SITE_LIB2));
#ifdef RUBY_SITE_THIN_ARCHLIB
    ruby_incpush(RUBY_RELATIVE(RUBY_SITE_THIN_ARCHLIB));
#endif
    ruby_incpush(RUBY_RELATIVE(RUBY_SITE_ARCHLIB));
    ruby_incpush(RUBY_RELATIVE(RUBY_SITE_LIB));

    ruby_incpush(RUBY_RELATIVE(RUBY_LIB));
#ifdef RUBY_THIN_ARCHLIB
    ruby_incpush(RUBY_RELATIVE(RUBY_THIN_ARCHLIB));
#endif
    ruby_incpush(RUBY_RELATIVE(RUBY_ARCHLIB));

    if (rb_safe_level() == 0) {
        ruby_incpush(".");
    }
}

struct req_list {
    char *name;
    struct req_list *next;
};
static struct req_list req_list_head, *req_list_last = &req_list_head;

static void
add_modules(const char *mod)
{
    struct req_list *list;

    list = ALLOC(struct req_list);
    list->name = ALLOC_N(char, strlen(mod)+1);
    strcpy(list->name, mod);
    list->next = 0;
    req_list_last->next = list;
    req_list_last = list;
}

extern void Init_ext(void);

static void
require_libraries(void)
{
    extern NODE *ruby_eval_tree;
    NODE *save[3];
    struct req_list *list = req_list_head.next;
    struct req_list *tmp;

    save[0] = ruby_eval_tree;
    save[1] = NEW_BEGIN(0);
    ruby_eval_tree = 0;
    ruby_current_node = 0;
    Init_ext();         /* should be called here for some reason :-( */
    ruby_current_node = save[1];
    ruby_set_current_source();
    req_list_last = 0;
    while (list) {
        int state;

        ruby_current_node = 0;
        rb_protect((VALUE (*)(VALUE))rb_require, (VALUE)list->name, &state);
        if (state) rb_jump_tag(state);
        tmp = list->next;
        free(list->name);
        free(list);
        list = tmp;
        ruby_current_node = save[1];
        ruby_set_current_source();
    }
    req_list_head.next = 0;
    ruby_eval_tree = save[0];
    rb_gc_force_recycle((VALUE)save[1]);
    ruby_current_node = 0;
}

static void
process_sflag(void)
{
    if (sflag) {
        long n;
        VALUE *args;

        n = RARRAY(rb_argv)->len;
        args = RARRAY(rb_argv)->ptr;
        while (n > 0) {
            VALUE v = *args++;
            char *s = StringValuePtr(v);
            char *p;
            int hyphen = Qfalse;

            if (s[0] != '-') break;
            n--;
            if (s[1] == '-' && s[2] == '\0') break;

            v = Qtrue;
            /* check if valid name before replacing - with _ */
            for (p = s + 1; *p; p++) {
                if (*p == '=') {
                    *p++ = '\0';
                    v = rb_str_new2(p);
                    break;
                }
                if (*p == '-') {
                    hyphen = Qtrue;
                }
                else if (*p != '_' && !ISALNUM(*p)) {
                    VALUE name_error[2];
                    name_error[0] = rb_str_new2("invalid name for global variable - ");
                    if (!(p = strchr(p, '='))) {
                        rb_str_cat2(name_error[0], s);
                    }
                    else {
                        rb_str_cat(name_error[0], s, p - s);
                    }
                    name_error[1] = args[-1];
                    rb_exc_raise(rb_class_new_instance(2, name_error, rb_eNameError));
                }
            }
            s[0] = '$';
            if (hyphen) {
                for (p = s + 1; *p; ++p) {
                    if (*p == '-') *p = '_';
                }
            }
            rb_gv_set(s, v);
        }
        n = RARRAY(rb_argv)->len - n;
        while (n--) {
            rb_ary_shift(rb_argv);
        }
    }
    sflag = 0;
}

static void proc_options(int argc, char **argv);

static char*
moreswitches(char *s)
{
    int argc; char *argv[3];
    char *p = s;

    argc = 2; argv[0] = argv[2] = 0;
    while (*s && !ISSPACE(*s))
        s++;
    argv[1] = ALLOCA_N(char, s-p+2);
    argv[1][0] = '-';
    strncpy(argv[1]+1, p, s-p);
    argv[1][s-p+1] = '\0';
    proc_options(argc, argv);
    while (*s && ISSPACE(*s))
        s++;
    return s;
}

NODE *ruby_eval_tree;

static void
proc_options(int argc, char **argv)
{
    char *argv0 = argv[0];
    int do_search;
    char *s;
    NODE *volatile script_node = 0;

    int version = 0;
    int copyright = 0;
    int verbose = 0;
    VALUE e_script = Qfalse;

    if (argc == 0) return;

    do_search = Qfalse;

    for (argc--,argv++; argc > 0; argc--,argv++) {
        if (argv[0][0] != '-' || !argv[0][1]) break;

        s = argv[0]+1;
      reswitch:
        switch (*s) {
          case 'a':
            do_split = Qtrue;
            s++;
            goto reswitch;

          case 'p':
            do_print = Qtrue;
            /* through */
          case 'n':
            do_loop = Qtrue;
            s++;
            goto reswitch;

          case 'd':
            ruby_debug = Qtrue;
            ruby_verbose = Qtrue;
            s++;
            goto reswitch;

          case 'y':
            ruby_yydebug = 1;
            s++;
            goto reswitch;

          case 'v':
            if (argv0 == 0 || verbose) {
                s++;
                goto reswitch;
            }
            ruby_show_version();
            verbose = 1;
          case 'w':
            ruby_verbose = Qtrue;
            s++;
            goto reswitch;

          case 'W':
            {
                int numlen;
                int v = 2;      /* -W as -W2 */

                if (*++s) {
                    v = scan_oct(s, 1, &numlen);
                    if (numlen == 0) v = 1;
                    s += numlen;
                }
                switch (v) {
                  case 0:
                    ruby_verbose = Qnil; break;
                  case 1:
                    ruby_verbose = Qfalse; break;
                  default:
                    ruby_verbose = Qtrue; break;
                }
            }
            goto reswitch;

          case 'c':
            do_check = Qtrue;
            s++;
            goto reswitch;

          case 's':
            forbid_setid("-s");
            sflag = 1;
            s++;
            goto reswitch;

          case 'h':
            usage(origargv[0]);
            exit(0);

          case 'l':
            do_line = Qtrue;
            rb_output_rs = rb_rs;
            s++;
            goto reswitch;

          case 'S':
            forbid_setid("-S");
            do_search = Qtrue;
            s++;
            goto reswitch;

          case 'e':
            forbid_setid("-e");
            if (!*++s) {
                s = argv[1];
                argc--,argv++;
            }
            if (!s) {
                fprintf(stderr, "%s: no code specified for -e\n", origargv[0]);
                exit(2);
            }
            if (!e_script) {
                e_script = rb_str_new(0,0);
                if (script == 0) script = "-e";
            }
            rb_str_cat2(e_script, s);
            rb_str_cat2(e_script, "\n");
            break;

          case 'r':
            forbid_setid("-r");
            if (*++s) {
                add_modules(s);
            }
            else if (argv[1]) {
                add_modules(argv[1]);
                argc--,argv++;
            }
            break;

          case 'i':
            forbid_setid("-i");
            if (ruby_inplace_mode) free(ruby_inplace_mode);
            ruby_inplace_mode = strdup(s+1);
            break;

          case 'x':
            xflag = Qtrue;
            s++;
            if (*s && chdir(s) < 0) {
                rb_fatal("Can't chdir to %s", s);
            }
            break;

          case 'C':
          case 'X':
            s++;
            if (!*s) {
                s = argv[1];
                argc--,argv++;
            }
            if (!s || !*s) {
                rb_fatal("Can't chdir");
            }
            if (chdir(s) < 0) {
                rb_fatal("Can't chdir to %s", s);
            }
            break;

          case 'F':
            if (*++s) {
                rb_fs = rb_reg_new(s, strlen(s), 0);
            }
            break;

          case 'K':
            if (*++s) {
                rb_set_kcode(s);
                s++;
            }
            goto reswitch;

          case 'T':
            {
                int numlen;
                int v = 1;

                if (*++s) {
                    v = scan_oct(s, 2, &numlen);
                    if (numlen == 0) v = 1;
                    s += numlen;
                }
                rb_set_safe_level(v);
            }
            goto reswitch;

          case 'I':
            forbid_setid("-I");
            if (*++s)
                ruby_incpush_expand(s);
            else if (argv[1]) {
                ruby_incpush_expand(argv[1]);
                argc--,argv++;
            }
            break;

          case '0':
            {
                int numlen;
                int v;
                char c;

                v = scan_oct(s, 4, &numlen);
                s += numlen;
                if (v > 0377) rb_rs = Qnil;
                else if (v == 0 && numlen >= 2) {
                    rb_rs = rb_str_new2("\n\n");
                }
                else {
                    c = v & 0xff;
                    rb_rs = rb_str_new(&c, 1);
                }
            }
            goto reswitch;

          case '-':
            if (!s[1] || (s[1] == '\r' && !s[2])) {
                argc--,argv++;
                goto switch_end;
            }
            s++;
            if (strcmp("copyright", s) == 0)
                copyright = 1;
            else if (strcmp("debug", s) == 0) {
                ruby_debug = Qtrue;
                ruby_verbose = Qtrue;
            }
            else if (strcmp("version", s) == 0)
                version = 1;
            else if (strcmp("verbose", s) == 0) {
                verbose = 1;
                ruby_verbose = Qtrue;
            }
            else if (strcmp("yydebug", s) == 0)
                ruby_yydebug = 1;
            else if (strcmp("help", s) == 0) {
                usage(origargv[0]);
                exit(0);
            }
            else {
                fprintf(stderr, "%s: invalid option --%s  (-h will show valid options)\n",
                        origargv[0], s);
                exit(2);
            }
            break;

          case '\r':
            if (!s[1]) break;

          default:
            {
                const char *format;
                if (ISPRINT(*s)) {
                    format = "%s: invalid option -%c  (-h will show valid options)\n";
                }
                else {
                    format = "%s: invalid option -\\%03o  (-h will show valid options)\n";
                }
                fprintf(stderr, format, origargv[0], (int)(unsigned char)*s);
            }
            exit(2);

          case 0:
            break;
        }
    }

  switch_end:
    if (argv0 == 0) return;

    if (rb_safe_level() == 0 && (s = getenv("RUBYOPT"))) {
        while (ISSPACE(*s)) s++;
        if (*s == 'T' || (*s == '-' && *(s+1) == 'T')) {
            int numlen;
            int v = 1;

            if (*s != 'T') ++s;
            if (*++s) {
                v = scan_oct(s, 2, &numlen);
                if (numlen == 0) v = 1;
            }
            rb_set_safe_level(v);
        }
        else {
            while (s && *s) {
                if (*s == '-') {
                    s++;
                    if (ISSPACE(*s)) {
                        do {s++;} while (ISSPACE(*s));
                        continue;
                    }
                }
                if (!*s) break;
                if (!strchr("IdvwrK", *s))
                    rb_raise(rb_eRuntimeError, "illegal switch in RUBYOPT: -%c", *s);
                s = moreswitches(s);
            }
        }
    }

    if (version) {
        ruby_show_version();
        exit(0);
    }
    if (copyright) {
        ruby_show_copyright();
    }

    if (rb_safe_level() >= 4) {
        OBJ_TAINT(rb_argv);
        OBJ_TAINT(rb_load_path);
    }

    if (!e_script) {
        if (argc == 0) {        /* no more args */
            if (verbose) exit(0);
            script = "-";
        }
        else {
            script = argv[0];
            if (script[0] == '\0') {
                script = "-";
            }
            else if (do_search) {
                char *path = getenv("RUBYPATH");

                script = 0;
                if (path) {
                    script = dln_find_file(argv[0], path);
                }
                if (!script) {
                    script = dln_find_file(argv[0], getenv(PATH_ENV));
                }
                if (!script) script = argv[0];
                script = ruby_sourcefile = rb_source_filename(script);
                script_node = NEW_BEGIN(0);
            }
#if defined DOSISH || defined __CYGWIN__
            translate_char(script, '\\', '/');
#endif
            argc--; argv++;
        }
    }

    ruby_script(script);
    ruby_set_argv(argc, argv);
    process_sflag();

    ruby_init_loadpath();
    ruby_sourcefile = rb_source_filename(argv0);
    if (e_script) {
        require_libraries();
        ruby_eval_tree = rb_compile_string(script, e_script, 1);
    }
    else if (strlen(script) == 1 && script[0] == '-') {
        load_stdin();
    }
    else {
        load_file(script, 1);
    }

    process_sflag();
    xflag = 0;

    if (rb_safe_level() >= 4) {
        FL_UNSET(rb_argv, FL_TAINT);
        FL_UNSET(rb_load_path, FL_TAINT);
    }
}

static void
load_file(const char *fname, int script)
{
    extern VALUE rb_stdin;
    VALUE parser;
    VALUE f;
    int line_start = 1;

    if (!fname) rb_load_fail(fname);
    if (strcmp(fname, "-") == 0) {
        f = rb_stdin;
    }
    else {
        FILE *fp = fopen(fname, "r");

        if (fp == NULL) {
            rb_load_fail(fname);
        }
        fclose(fp);

        f = rb_file_open(fname, "r");
#if defined DOSISH || defined __CYGWIN__
        {
            char *ext = strrchr(fname, '.');
            if (ext && strcasecmp(ext, ".exe") == 0)
                rb_io_binmode(f);
        }
#endif
    }

    if (script) {
        VALUE c = 1;            /* something not nil */
        VALUE line;
        char *p;

        if (xflag) {
            forbid_setid("-x");
            xflag = Qfalse;
            while (!NIL_P(line = rb_io_gets(f))) {
                line_start++;
                if (RSTRING(line)->len > 2
                    && RSTRING(line)->ptr[0] == '#'
                    && RSTRING(line)->ptr[1] == '!') {
                    if ((p = strstr(RSTRING(line)->ptr, "ruby")) != 0) {
                        goto start_read;
                    }
                }
            }
            rb_raise(rb_eLoadError, "no Ruby script found in input");
        }

        c = rb_io_getc(f);
        if (c == INT2FIX('#')) {
            c = rb_io_getc(f);
            if (c == INT2FIX('!')) {
                line = rb_io_gets(f);
                if (NIL_P(line)) return;

                if ((p = strstr(RSTRING(line)->ptr, "ruby")) == 0) {
                    /* not ruby script, kick the program */
                    char **argv;
                    char *path;
                    char *pend = RSTRING(line)->ptr + RSTRING(line)->len;

                    p = RSTRING(line)->ptr;     /* skip `#!' */
                    if (pend[-1] == '\n') pend--; /* chomp line */
                    if (pend[-1] == '\r') pend--;
                    *pend = '\0';
                    while (p < pend && ISSPACE(*p))
                        p++;
                    path = p;   /* interpreter path */
                    while (p < pend && !ISSPACE(*p))
                        p++;
                    *p++ = '\0';
                    if (p < pend) {
                        argv = ALLOCA_N(char*, origargc+3);
                        argv[1] = p;
                        MEMCPY(argv+2, origargv+1, char*, origargc);
                    }
                    else {
                        argv = origargv;
                    }
                    argv[0] = path;
                    execv(path, argv);

                    ruby_sourcefile = rb_source_filename(fname);
                    ruby_sourceline = 1;
                    rb_fatal("Can't exec %s", path);
                }

              start_read:
                p += 4;
                RSTRING(line)->ptr[RSTRING(line)->len-1] = '\0';
                if (RSTRING(line)->ptr[RSTRING(line)->len-2] == '\r')
                    RSTRING(line)->ptr[RSTRING(line)->len-2] = '\0';
                if ((p = strstr(p, " -")) != 0) {
                    p++;        /* skip space before `-' */
                    while (*p == '-') {
                        p = moreswitches(p+1);
                    }
                }

                /* push back shebang for pragma may exist in next line */
                rb_io_ungetc(f, INT2FIX('\n'));
                rb_io_ungetc(f, INT2FIX('!'));
            }
            else if (!NIL_P(c)) {
                rb_io_ungetc(f, c);
            }
            rb_io_ungetc(f, INT2FIX('#'));
        }
        else if (!NIL_P(c)) {
            rb_io_ungetc(f, c);
        }
        require_libraries();    /* Why here? unnatural */
        if (NIL_P(c)) return;
    }
    parser = rb_parser_new();
    ruby_eval_tree = rb_parser_compile_file(parser, fname, f, line_start);
    if (script && rb_parser_end_seen_p(parser)) {
        rb_define_global_const("DATA", f);
    }
    else if (f != rb_stdin) {
        rb_io_close(f);
    }
}

void
rb_load_file(const char *fname)
{
    load_file(fname, 0);
}

static void
load_stdin(void)
{
    forbid_setid("program input from stdin");
    load_file("-", 1);
}

VALUE rb_progname;
VALUE rb_argv;
VALUE rb_argv0;

#if !defined(PSTAT_SETCMD) && !defined(HAVE_SETPROCTITLE) && !defined(DOSISH)
static struct {
    char *begin, *end;
} envspace;
extern char **environ;

static void
set_arg0space()
{
    char *s;
    int i;

    if (!environ || (s = environ[0]) == NULL) return;
    envspace.begin = s;
    s += strlen(s);
    for (i = 1; environ[i]; i++) {
        if (environ[i] == s + 1) {
            s++;
            s += strlen(s);     /* this one is ok too */
        }
    }
    envspace.end = s;
}
#else
#define set_arg0space() ((void)0)
#endif

static void
set_arg0(VALUE val, ID id)
{
    char *s;
    long i;
#if !defined(PSTAT_SETCMD) && !defined(HAVE_SETPROCTITLE)
    static int len;
#endif

    if (origargv == 0) rb_raise(rb_eRuntimeError, "$0 not initialized");
    StringValue(val);
    s = RSTRING(val)->ptr;
    i = RSTRING(val)->len;
#if defined(PSTAT_SETCMD)
    if (i >= PST_CLEN) {
        union pstun j;
        j.pst_command = s;
        i = PST_CLEN;
        RSTRING(val)->len = i;
        *(s + i) = '\0';
        pstat(PSTAT_SETCMD, j, PST_CLEN, 0, 0);
    }
    else {
        union pstun j;
        j.pst_command = s;
        pstat(PSTAT_SETCMD, j, i, 0, 0);
    }
    rb_progname = rb_tainted_str_new(s, i);
#elif defined(HAVE_SETPROCTITLE)
    setproctitle("%.*s", (int)i, s);
    rb_progname = rb_tainted_str_new(s, i);
#else
    if (len == 0) {
        char *s = origargv[0];
        int i;

        s += strlen(s);
        /* See if all the arguments are contiguous in memory */
        for (i = 1; i < origargc; i++) {
            if (origargv[i] == s + 1) {
                s++;
                s += strlen(s); /* this one is ok too */
            }
            else {
                break;
            }
        }
#ifndef DOSISH
        if (s + 1 == envspace.begin) {
            s = envspace.end;
            ruby_setenv("", NULL); /* duplicate environ vars */
        }
#endif
        len = s - origargv[0];
    }

    if (i >= len) {
        i = len;
        memcpy(origargv[0], s, i);
        origargv[0][i] = '\0';
    }
    else {
        memcpy(origargv[0], s, i);
        s = origargv[0]+i;
        *s++ = '\0';
        while (++i < len)
            *s++ = ' ';
        for (i = 1; i < origargc; i++)
            origargv[i] = 0;
    }
    rb_progname = rb_tainted_str_new2(origargv[0]);
#endif
}

void
ruby_script(const char *name)
{
    if (name) {
        rb_progname = rb_tainted_str_new2(name);
        ruby_sourcefile = rb_source_filename(name);
    }
}

static int uid, euid, gid, egid;

static void
init_ids(void)
{
    uid = (int)getuid();
    euid = (int)geteuid();
    gid = (int)getgid();
    egid = (int)getegid();
#ifdef VMS
    uid |= gid << 16;
    euid |= egid << 16;
#endif
    if (uid && (euid != uid || egid != gid)) {
        rb_set_safe_level(1);
    }
}

static void
forbid_setid(const char *s)
{
    if (euid != uid)
        rb_raise(rb_eSecurityError, "no %s allowed while running setuid", s);
    if (egid != gid)
        rb_raise(rb_eSecurityError, "no %s allowed while running setgid", s);
    if (rb_safe_level() > 0)
        rb_raise(rb_eSecurityError, "no %s allowed in tainted mode", s);
}

static void
verbose_setter(VALUE val, ID id, VALUE *variable)
{
    ruby_verbose = RTEST(val) ? Qtrue : val;
}

static VALUE
opt_W_getter(VALUE val, ID id)
{
    if (ruby_verbose == Qnil) return INT2FIX(0);
    if (ruby_verbose == Qfalse) return INT2FIX(1);
    if (ruby_verbose == Qtrue) return INT2FIX(2);
    return Qnil;                /* not reached */
}

void
ruby_prog_init(void)
{
    init_ids();

    ruby_sourcefile = rb_source_filename("ruby");
    rb_define_hooked_variable("$VERBOSE", &ruby_verbose, 0, verbose_setter);
    rb_define_hooked_variable("$-v", &ruby_verbose, 0, verbose_setter);
    rb_define_hooked_variable("$-w", &ruby_verbose, 0, verbose_setter);
    rb_define_virtual_variable("$-W", opt_W_getter, 0);
    rb_define_variable("$DEBUG", &ruby_debug);
    rb_define_variable("$-d", &ruby_debug);
    rb_define_readonly_variable("$-p", &do_print);
    rb_define_readonly_variable("$-l", &do_line);

    rb_define_hooked_variable("$0", &rb_progname, 0, set_arg0);
    rb_define_hooked_variable("$PROGRAM_NAME", &rb_progname, 0, set_arg0);

    rb_define_readonly_variable("$*", &rb_argv);
    rb_argv = rb_ary_new();
    rb_define_global_const("ARGV", rb_argv);
    rb_define_readonly_variable("$-a", &do_split);
    rb_global_variable(&rb_argv0);

#ifdef MSDOS
    /*
     * There is no way we can refer to them from ruby, so close them to save
     * space.
     */
    (void)fclose(stdaux);
    (void)fclose(stdprn);
#endif
}

void
ruby_set_argv(int argc, char **argv)
{
    int i;

#if defined(USE_DLN_A_OUT)
    if (origargv) dln_argv0 = origargv[0];
    else          dln_argv0 = argv[0];
#endif
    rb_ary_clear(rb_argv);
    for (i=0; i < argc; i++) {
        VALUE arg = rb_tainted_str_new2(argv[i]);

        OBJ_FREEZE(arg);
        rb_ary_push(rb_argv, arg);
    }
}

NODE *rb_parser_append_print(NODE*);
NODE *rb_parser_while_loop(NODE*, int, int);

void
ruby_process_options(int argc, char **argv)
{
    origargc = argc; origargv = argv;

    ruby_script(argv[0]);       /* for the time being */
    rb_argv0 = rb_progname;
#if defined(USE_DLN_A_OUT)
    dln_argv0 = argv[0];
#endif
    set_arg0space();
    proc_options(argc, argv);

    if (do_check && ruby_nerrs == 0) {
        printf("Syntax OK\n");
        exit(0);
    }
    if (do_print) {
        ruby_eval_tree = rb_parser_append_print(ruby_eval_tree);
    }
    if (do_loop) {
        ruby_eval_tree = rb_parser_while_loop(ruby_eval_tree, do_line, do_split);
    }
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ruby.h

root/ruby.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/**********************************************************************

  ruby.h -

  $Author: akr $
  created at: Thu Jun 10 14:26:32 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto
  Copyright (C) 2000  Network Applied Communication Laboratory, Inc.
  Copyright (C) 2000  Information-technology Promotion Agency, Japan

**********************************************************************/

#ifndef RUBY_H
#define RUBY_H

#if defined(__cplusplus)
extern "C" {
#if 0
} /* satisfy cc-mode */
#endif
#endif

#include "config.h"

#define NORETURN_STYLE_NEW 1
#ifndef NORETURN
# define NORETURN(x) x
#endif
#ifndef DEPRECATED
# define DEPRECATED(x) x
#endif
#ifndef NOINLINE
# define NOINLINE(x) x
#endif

#ifdef __GNUC__
#define PRINTF_ARGS(decl, string_index, first_to_check) \
  decl __attribute__((format(printf, string_index, first_to_check)))
#else
#define PRINTF_ARGS(decl, string_index, first_to_check) decl
#endif

#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif

#ifdef HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
#endif

#ifdef HAVE_INTRINSICS_H
# include <intrinsics.h>
#endif

#include <stddef.h>
#include <stdio.h>

#include "defines.h"

/* need to include <ctype.h> to use these macros */
#ifndef ISPRINT
#define ISASCII(c) isascii((int)(unsigned char)(c))
#undef ISPRINT
#define ISPRINT(c) (ISASCII(c) && isprint((int)(unsigned char)(c)))
#define ISSPACE(c) (ISASCII(c) && isspace((int)(unsigned char)(c)))
#define ISUPPER(c) (ISASCII(c) && isupper((int)(unsigned char)(c)))
#define ISLOWER(c) (ISASCII(c) && islower((int)(unsigned char)(c)))
#define ISALNUM(c) (ISASCII(c) && isalnum((int)(unsigned char)(c)))
#define ISALPHA(c) (ISASCII(c) && isalpha((int)(unsigned char)(c)))
#define ISDIGIT(c) (ISASCII(c) && isdigit((int)(unsigned char)(c)))
#define ISXDIGIT(c) (ISASCII(c) && isxdigit((int)(unsigned char)(c)))
#endif

#if defined(HAVE_ALLOCA_H)
#include <alloca.h>
#endif

#ifdef _AIX
#pragma alloca
#endif

#if defined(__VMS)
# pragma builtins
# define alloca __alloca
#endif

#if SIZEOF_LONG == SIZEOF_VOIDP
typedef unsigned long VALUE;
typedef unsigned long ID;
#elif SIZEOF_LONG_LONG == SIZEOF_VOIDP
typedef unsigned LONG_LONG VALUE;
typedef unsigned LONG_LONG ID;
#else
# error ---->> ruby requires sizeof(void*) == sizeof(long) to be compiled. <<----
#endif

#ifdef __STDC__
# include <limits.h>
#else
# ifndef LONG_MAX
#  ifdef HAVE_LIMITS_H
#   include <limits.h>
#  else
    /* assuming 32bit(2's compliment) long */
#   define LONG_MAX 2147483647
#  endif
# endif
# ifndef LONG_MIN
#  define LONG_MIN (-LONG_MAX-1)
# endif
# ifndef CHAR_BIT
#  define CHAR_BIT 8
# endif
#endif

#if HAVE_LONG_LONG
# ifndef LLONG_MAX
#  ifdef LONG_LONG_MAX
#   define LLONG_MAX  LONG_LONG_MAX
#  else
#   ifdef _I64_MAX
#    define LLONG_MAX _I64_MAX
#   else
    /* assuming 64bit(2's complement) long long */
#    define LLONG_MAX 9223372036854775807LL
#   endif
#  endif
# endif
# ifndef LLONG_MIN
#  ifdef LONG_LONG_MIN
#   define LLONG_MIN  LONG_LONG_MIN
#  else
#   ifdef _I64_MIN
#    define LLONG_MIN _I64_MIN
#   else
#    define LLONG_MIN (-LLONG_MAX-1)
#   endif
#  endif
# endif
#endif

#define FIXNUM_MAX (LONG_MAX>>1)
#define FIXNUM_MIN RSHIFT((long)LONG_MIN,1)

#define FIXNUM_FLAG 0x01
#define INT2FIX(i) ((VALUE)(((long)(i))<<1 | FIXNUM_FLAG))
#define LONG2FIX(i) INT2FIX(i)
#define rb_fix_new(v) INT2FIX(v)
VALUE rb_int2inum(long);
#define INT2NUM(v) rb_int2inum(v)
#define LONG2NUM(v) INT2NUM(v)
#define rb_int_new(v) rb_int2inum(v)
VALUE rb_uint2inum(unsigned long);
#define UINT2NUM(v) rb_uint2inum(v)
#define ULONG2NUM(v) UINT2NUM(v)
#define rb_uint_new(v) rb_uint2inum(v)

#if HAVE_LONG_LONG
VALUE rb_ll2inum(LONG_LONG);
#define LL2NUM(v) rb_ll2inum(v)
VALUE rb_ull2inum(unsigned LONG_LONG);
#define ULL2NUM(v) rb_ull2inum(v)
#endif

#if SIZEOF_OFF_T > SIZEOF_LONG && defined(HAVE_LONG_LONG)
# define OFFT2NUM(v) LL2NUM(v)
#else
# define OFFT2NUM(v) INT2NUM(v)
#endif

#define FIX2LONG(x) RSHIFT((long)x,1)
#define FIX2ULONG(x) (((unsigned long)(x))>>1)
#define FIXNUM_P(f) (((long)(f))&FIXNUM_FLAG)
#define POSFIXABLE(f) ((f) <= FIXNUM_MAX)
#define NEGFIXABLE(f) ((f) >= FIXNUM_MIN)
#define FIXABLE(f) (POSFIXABLE(f) && NEGFIXABLE(f))

#define IMMEDIATE_MASK 0x03
#define IMMEDIATE_P(x) ((VALUE)(x) & IMMEDIATE_MASK)

#define SYMBOL_FLAG 0x0e
#define SYMBOL_P(x) (((VALUE)(x)&0xff)==SYMBOL_FLAG)
#define ID2SYM(x) ((VALUE)(((long)(x))<<8|SYMBOL_FLAG))
#define SYM2ID(x) RSHIFT((long)x,8)

/* special contants - i.e. non-zero and non-fixnum constants */
#define Qfalse ((VALUE)0)
#define Qtrue  ((VALUE)2)
#define Qnil   ((VALUE)4)
#define Qundef ((VALUE)6)       /* undefined value for placeholder */

#define RTEST(v) (((VALUE)(v) & ~Qnil) != 0)
#define NIL_P(v) ((VALUE)(v) == Qnil)

#define CLASS_OF(v) rb_class_of((VALUE)(v))

#define T_NONE   0x00

#define T_NIL    0x01
#define T_OBJECT 0x02
#define T_CLASS  0x03
#define T_ICLASS 0x04
#define T_MODULE 0x05
#define T_FLOAT  0x06
#define T_STRING 0x07
#define T_REGEXP 0x08
#define T_ARRAY  0x09
#define T_FIXNUM 0x0a
#define T_HASH   0x0b
#define T_STRUCT 0x0c
#define T_BIGNUM 0x0d
#define T_FILE   0x0e

#define T_TRUE   0x10
#define T_FALSE  0x11
#define T_DATA   0x12
#define T_MATCH  0x13
#define T_SYMBOL 0x14

#define T_BLOCK  0x1b
#define T_UNDEF  0x1c
#define T_VARMAP 0x1d
#define T_SCOPE  0x1e
#define T_NODE   0x1f

#define T_MASK   0x1f

#define BUILTIN_TYPE(x) (((struct RBasic*)(x))->flags & T_MASK)

#define TYPE(x) rb_type((VALUE)(x))

void rb_check_type(VALUE,int);
#define Check_Type(v,t) rb_check_type((VALUE)(v),t)

VALUE rb_str_to_str(VALUE);
VALUE rb_string_value(volatile VALUE*);
char *rb_string_value_ptr(volatile VALUE*);
char *rb_string_value_cstr(volatile VALUE*);

#define StringValue(v) rb_string_value(&(v))
#define StringValuePtr(v) rb_string_value_ptr(&(v))
#define StringValueCStr(v) rb_string_value_cstr(&(v))

void rb_check_safe_obj(VALUE);
void rb_check_safe_str(VALUE);
#define SafeStringValue(v) do {\
    StringValue(v);\
    rb_check_safe_obj(v);\
} while (0)
/* obsolete macro - use SafeStringValue(v) */
#define Check_SafeStr(v) rb_check_safe_str((VALUE)(v))

VALUE rb_get_path(VALUE);
#define FilePathValue(v) ((v) = rb_get_path(v))

void rb_secure(int);
RUBY_EXTERN int ruby_safe_level;
#define rb_safe_level() (ruby_safe_level)
void rb_set_safe_level(int);
void rb_secure_update(VALUE);

long rb_num2long(VALUE);
unsigned long rb_num2ulong(VALUE);
#define NUM2LONG(x) (FIXNUM_P(x)?FIX2LONG(x):rb_num2long((VALUE)x))
#define NUM2ULONG(x) rb_num2ulong((VALUE)x)
#if SIZEOF_INT < SIZEOF_LONG
long rb_num2int(VALUE);
#define NUM2INT(x) (FIXNUM_P(x)?FIX2INT(x):rb_num2int((VALUE)x))
long rb_fix2int(VALUE);
#define FIX2INT(x) rb_fix2int((VALUE)x)
unsigned long rb_num2uint(VALUE);
#define NUM2UINT(x) rb_num2uint(x)
unsigned long rb_fix2uint(VALUE);
#define FIX2UINT(x) rb_fix2uint(x)
#else
#define NUM2INT(x) ((int)NUM2LONG(x))
#define NUM2UINT(x) ((unsigned int)NUM2ULONG(x))
#define FIX2INT(x) ((int)FIX2LONG(x))
#define FIX2UINT(x) ((unsigned int)FIX2ULONG(x))
#endif

#if HAVE_LONG_LONG
LONG_LONG rb_num2ll(VALUE);
unsigned LONG_LONG rb_num2ull(VALUE);
# define NUM2LL(x) (FIXNUM_P(x)?FIX2LONG(x):rb_num2ll((VALUE)x))
# define NUM2ULL(x) rb_num2ull((VALUE)x)
#endif

#if HAVE_LONG_LONG && SIZEOF_OFF_T > SIZEOF_LONG
# define NUM2OFFT(x) ((off_t)NUM2LL(x))
#else
# define NUM2OFFT(x) NUM2LONG(x)
#endif

double rb_num2dbl(VALUE);
#define NUM2DBL(x) rb_num2dbl((VALUE)(x))

/* obsolete API - use StringValue() */
char *rb_str2cstr(VALUE,long*);
/* obsolete API - use StringValuePtr() */
#define STR2CSTR(x) rb_str2cstr((VALUE)(x),0)

#define NUM2CHR(x) (((TYPE(x) == T_STRING)&&(RSTRING(x)->len>=1))?\
                     RSTRING(x)->ptr[0]:(char)(NUM2INT(x)&0xff))
#define CHR2FIX(x) INT2FIX((long)((x)&0xff))

VALUE rb_newobj(void);
#define NEWOBJ(obj,type) type *obj = (type*)rb_newobj()
#define OBJSETUP(obj,c,t) do {\
    RBASIC(obj)->flags = (t);\
    RBASIC(obj)->klass = (c);\
    if (rb_safe_level() >= 3) FL_SET(obj, FL_TAINT);\
} while (0)
#define CLONESETUP(clone,obj) do {\
    OBJSETUP(clone,rb_singleton_class_clone((VALUE)obj),RBASIC(obj)->flags);\
    rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)clone);\
    if (FL_TEST(obj, FL_EXIVAR)) rb_copy_generic_ivar((VALUE)clone,(VALUE)obj);\
} while (0)
#define DUPSETUP(dup,obj) do {\
    OBJSETUP(dup,rb_obj_class(obj),(RBASIC(obj)->flags)&(T_MASK|FL_EXIVAR|FL_TAINT));\
    if (FL_TEST(obj, FL_EXIVAR)) rb_copy_generic_ivar((VALUE)dup,(VALUE)obj);\
} while (0)

struct RBasic {
    unsigned long flags;
    VALUE klass;
};

struct RObject {
    struct RBasic basic;
    struct st_table *iv_tbl;
};

struct RClass {
    struct RBasic basic;
    struct st_table *iv_tbl;
    struct st_table *m_tbl;
    VALUE super;
};

struct RFloat {
    struct RBasic basic;
    double value;
};

#define ELTS_SHARED FL_USER2

struct RString {
    struct RBasic basic;
    long len;
    char *ptr;
    union {
        long capa;
        VALUE shared;
    } aux;
};

struct RArray {
    struct RBasic basic;
    long len;
    union {
        long capa;
        VALUE shared;
    } aux;
    VALUE *ptr;
};

struct RRegexp {
    struct RBasic basic;
    struct re_pattern_buffer *ptr;
    long len;
    char *str;
};

struct RHash {
    struct RBasic basic;
    struct st_table *tbl;
    int iter_lev;
    VALUE ifnone;
};

struct RFile {
    struct RBasic basic;
    struct OpenFile *fptr;
};

struct RData {
    struct RBasic basic;
    void (*dmark)(void*);
    void (*dfree)(void*);
    void *data;
};

#define DATA_PTR(dta) (RDATA(dta)->data)

/*
#define RUBY_DATA_FUNC(func) ((void (*)(void*))func)
*/
typedef void (*RUBY_DATA_FUNC)(void*);

VALUE rb_data_object_alloc(VALUE,void*,RUBY_DATA_FUNC,RUBY_DATA_FUNC);

#define Data_Wrap_Struct(klass,mark,free,sval)\
    rb_data_object_alloc(klass,sval,(RUBY_DATA_FUNC)mark,(RUBY_DATA_FUNC)free)

#define Data_Make_Struct(klass,type,mark,free,sval) (\
    sval = ALLOC(type),\
    memset(sval, 0, sizeof(type)),\
    Data_Wrap_Struct(klass,mark,free,sval)\
)

#define Data_Get_Struct(obj,type,sval) do {\
    Check_Type(obj, T_DATA); \
    sval = (type*)DATA_PTR(obj);\
} while (0)

struct RStruct {
    struct RBasic basic;
    long len;
    VALUE *ptr;
};

struct RBignum {
    struct RBasic basic;
    char sign;
    long len;
    void *digits;
};

#define R_CAST(st)   (struct st*)
#define RBASIC(obj)  (R_CAST(RBasic)(obj))
#define ROBJECT(obj) (R_CAST(RObject)(obj))
#define RCLASS(obj)  (R_CAST(RClass)(obj))
#define RMODULE(obj) RCLASS(obj)
#define RFLOAT(obj)  (R_CAST(RFloat)(obj))
#define RSTRING(obj) (R_CAST(RString)(obj))
#define RREGEXP(obj) (R_CAST(RRegexp)(obj))
#define RARRAY(obj)  (R_CAST(RArray)(obj))
#define RHASH(obj)   (R_CAST(RHash)(obj))
#define RDATA(obj)   (R_CAST(RData)(obj))
#define RSTRUCT(obj) (R_CAST(RStruct)(obj))
#define RBIGNUM(obj) (R_CAST(RBignum)(obj))
#define RFILE(obj)   (R_CAST(RFile)(obj))

#define FL_SINGLETON FL_USER0
#define FL_MARK      (1<<5)
#define FL_RESERVED  (1<<6)     /* will be used in the future GC */
#define FL_FINALIZE  (1<<7)
#define FL_TAINT     (1<<8)
#define FL_EXIVAR    (1<<9)
#define FL_FREEZE    (1<<10)

#define FL_USHIFT    11

#define FL_USER0     (1<<(FL_USHIFT+0))
#define FL_USER1     (1<<(FL_USHIFT+1))
#define FL_USER2     (1<<(FL_USHIFT+2))
#define FL_USER3     (1<<(FL_USHIFT+3))
#define FL_USER4     (1<<(FL_USHIFT+4))
#define FL_USER5     (1<<(FL_USHIFT+5))
#define FL_USER6     (1<<(FL_USHIFT+6))
#define FL_USER7     (1<<(FL_USHIFT+7))

#define SPECIAL_CONST_P(x) (IMMEDIATE_P(x) || !RTEST(x))

#define FL_ABLE(x) (!SPECIAL_CONST_P(x) && BUILTIN_TYPE(x) != T_NODE)
#define FL_TEST(x,f) (FL_ABLE(x)?(RBASIC(x)->flags&(f)):0)
#define FL_SET(x,f) do {if (FL_ABLE(x)) RBASIC(x)->flags |= (f);} while (0)
#define FL_UNSET(x,f) do {if (FL_ABLE(x)) RBASIC(x)->flags &= ~(f);} while (0)
#define FL_REVERSE(x,f) do {if (FL_ABLE(x)) RBASIC(x)->flags ^= (f);} while (0)

#define OBJ_TAINTED(x) FL_TEST((x), FL_TAINT)
#define OBJ_TAINT(x) FL_SET((x), FL_TAINT)
#define OBJ_INFECT(x,s) do {if (FL_ABLE(x) && FL_ABLE(s)) RBASIC(x)->flags |= RBASIC(s)->flags & FL_TAINT;} while (0)

#define OBJ_FROZEN(x) FL_TEST((x), FL_FREEZE)
#define OBJ_FREEZE(x) FL_SET((x), FL_FREEZE)

#define ALLOC_N(type,n) (type*)xmalloc2((n),sizeof(type))
#define ALLOC(type) (type*)xmalloc(sizeof(type))
#define REALLOC_N(var,type,n) (var)=(type*)xrealloc2((char*)(var),(n),sizeof(type))

#define ALLOCA_N(type,n) (type*)alloca(sizeof(type)*(n))

#define MEMZERO(p,type,n) memset((p), 0, sizeof(type)*(n))
#define MEMCPY(p1,p2,type,n) memcpy((p1), (p2), sizeof(type)*(n))
#define MEMMOVE(p1,p2,type,n) memmove((p1), (p2), sizeof(type)*(n))
#define MEMCMP(p1,p2,type,n) memcmp((p1), (p2), sizeof(type)*(n))

void rb_obj_infect(VALUE,VALUE);

typedef int ruby_glob_func(const char*,VALUE);
void rb_glob(const char*,void(*)(const char*,VALUE),VALUE);
int ruby_glob(const char*,int,ruby_glob_func*,VALUE);
int ruby_brace_expand(const char*,int,ruby_glob_func*,VALUE);
int ruby_brace_glob(const char*,int,ruby_glob_func*,VALUE);

VALUE rb_define_class(const char*,VALUE);
VALUE rb_define_module(const char*);
VALUE rb_define_class_under(VALUE, const char*, VALUE);
VALUE rb_define_module_under(VALUE, const char*);

void rb_include_module(VALUE,VALUE);
void rb_extend_object(VALUE,VALUE);

void rb_define_variable(const char*,VALUE*);
void rb_define_virtual_variable(const char*,VALUE(*)(ANYARGS),void(*)(ANYARGS));
void rb_define_hooked_variable(const char*,VALUE*,VALUE(*)(ANYARGS),void(*)(ANYARGS));
void rb_define_readonly_variable(const char*,VALUE*);
void rb_define_const(VALUE,const char*,VALUE);
void rb_define_global_const(const char*,VALUE);

#define RUBY_METHOD_FUNC(func) ((VALUE (*)(ANYARGS))func)
void rb_define_method(VALUE,const char*,VALUE(*)(ANYARGS),int);
void rb_define_module_function(VALUE,const char*,VALUE(*)(ANYARGS),int);
void rb_define_global_function(const char*,VALUE(*)(ANYARGS),int);

void rb_undef_method(VALUE,const char*);
void rb_define_alias(VALUE,const char*,const char*);
void rb_define_attr(VALUE,const char*,int,int);

void rb_global_variable(VALUE*);
void rb_gc_register_address(VALUE*);
void rb_gc_unregister_address(VALUE*);

ID rb_intern(const char*);
char *rb_id2name(ID);
ID rb_to_id(VALUE);

char *rb_class2name(VALUE);
char *rb_obj_classname(VALUE);

void rb_p(VALUE);

VALUE rb_eval_string(const char*);
VALUE rb_eval_string_protect(const char*, int*);
VALUE rb_eval_string_wrap(const char*, int*);
VALUE rb_funcall(VALUE, ID, int, ...);
VALUE rb_funcall2(VALUE, ID, int, const VALUE*);
VALUE rb_funcall3(VALUE, ID, int, const VALUE*);
int rb_scan_args(int, const VALUE*, const char*, ...);
VALUE rb_call_super(int, const VALUE*);

VALUE rb_gv_set(const char*, VALUE);
VALUE rb_gv_get(const char*);
VALUE rb_iv_get(VALUE, const char*);
VALUE rb_iv_set(VALUE, const char*, VALUE);

VALUE rb_equal(VALUE,VALUE);

RUBY_EXTERN VALUE ruby_verbose, ruby_debug;

PRINTF_ARGS(NORETURN(void rb_raise(VALUE, const char*, ...)), 2, 3);
PRINTF_ARGS(NORETURN(void rb_fatal(const char*, ...)), 1, 2);
PRINTF_ARGS(NORETURN(void rb_bug(const char*, ...)), 1, 2);
NORETURN(void rb_sys_fail(const char*));
NORETURN(void rb_iter_break(void));
NORETURN(void rb_exit(int));
NORETURN(void rb_notimplement(void));

/* reports if `-w' specified */
PRINTF_ARGS(void rb_warning(const char*, ...), 1, 2);
/* reports if `-w' specified */
PRINTF_ARGS(void rb_sys_warning(const char*, ...), 1, 2);
/* reports always */
PRINTF_ARGS(void rb_warn(const char*, ...), 1, 2);

VALUE rb_each(VALUE);
VALUE rb_yield(VALUE);
VALUE rb_yield_values(int n, ...);
VALUE rb_yield_splat(VALUE);
int rb_block_given_p(void);
void rb_need_block(void);
VALUE rb_iterate(VALUE(*)(VALUE),VALUE,VALUE(*)(ANYARGS),VALUE);
VALUE rb_rescue(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE);
VALUE rb_rescue2(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE,...);
VALUE rb_ensure(VALUE(*)(ANYARGS),VALUE,VALUE(*)(ANYARGS),VALUE);
VALUE rb_catch(const char*,VALUE(*)(ANYARGS),VALUE);
NORETURN(void rb_throw(const char*,VALUE));

VALUE rb_require(const char*);

#ifdef IA64
void ruby_init_stack(VALUE*, void*);
#define RUBY_INIT_STACK \
    VALUE variable_in_this_stack_frame; \
    ruby_init_stack(&variable_in_this_stack_frame, rb_ia64_bsp());
#else
void ruby_init_stack(VALUE*);
#define RUBY_INIT_STACK \
    VALUE variable_in_this_stack_frame; \
    ruby_init_stack(&variable_in_this_stack_frame);
#endif
void ruby_init(void);
void ruby_options(int, char**);
NORETURN(void ruby_run(void));

RUBY_EXTERN VALUE rb_mKernel;
RUBY_EXTERN VALUE rb_mComparable;
RUBY_EXTERN VALUE rb_mEnumerable;
RUBY_EXTERN VALUE rb_mPrecision;
RUBY_EXTERN VALUE rb_mErrno;
RUBY_EXTERN VALUE rb_mFileTest;
RUBY_EXTERN VALUE rb_mGC;
RUBY_EXTERN VALUE rb_mMath;
RUBY_EXTERN VALUE rb_mProcess;

RUBY_EXTERN VALUE rb_cObject;
RUBY_EXTERN VALUE rb_cArray;
RUBY_EXTERN VALUE rb_cValues;
RUBY_EXTERN VALUE rb_cBignum;
RUBY_EXTERN VALUE rb_cClass;
RUBY_EXTERN VALUE rb_cDir;
RUBY_EXTERN VALUE rb_cData;
RUBY_EXTERN VALUE rb_cFalseClass;
RUBY_EXTERN VALUE rb_cFile;
RUBY_EXTERN VALUE rb_cFixnum;
RUBY_EXTERN VALUE rb_cFloat;
RUBY_EXTERN VALUE rb_cHash;
RUBY_EXTERN VALUE rb_cInteger;
RUBY_EXTERN VALUE rb_cIO;
RUBY_EXTERN VALUE rb_cModule;
RUBY_EXTERN VALUE rb_cNilClass;
RUBY_EXTERN VALUE rb_cNumeric;
RUBY_EXTERN VALUE rb_cProc;
RUBY_EXTERN VALUE rb_cRange;
RUBY_EXTERN VALUE rb_cRegexp;
RUBY_EXTERN VALUE rb_cString;
RUBY_EXTERN VALUE rb_cSymbol;
RUBY_EXTERN VALUE rb_cThread;
RUBY_EXTERN VALUE rb_cTime;
RUBY_EXTERN VALUE rb_cTrueClass;
RUBY_EXTERN VALUE rb_cStruct;

RUBY_EXTERN VALUE rb_eException;
RUBY_EXTERN VALUE rb_eStandardError;
RUBY_EXTERN VALUE rb_eSystemExit;
RUBY_EXTERN VALUE rb_eInterrupt;
RUBY_EXTERN VALUE rb_eSignal;
RUBY_EXTERN VALUE rb_eFatal;
RUBY_EXTERN VALUE rb_eArgError;
RUBY_EXTERN VALUE rb_eEOFError;
RUBY_EXTERN VALUE rb_eIndexError;
RUBY_EXTERN VALUE rb_eKeyError;
RUBY_EXTERN VALUE rb_eRangeError;
RUBY_EXTERN VALUE rb_eIOError;
RUBY_EXTERN VALUE rb_eRuntimeError;
RUBY_EXTERN VALUE rb_eSecurityError;
RUBY_EXTERN VALUE rb_eSystemCallError;
RUBY_EXTERN VALUE rb_eTypeError;
RUBY_EXTERN VALUE rb_eZeroDivError;
RUBY_EXTERN VALUE rb_eNotImpError;
RUBY_EXTERN VALUE rb_eNoMemError;
RUBY_EXTERN VALUE rb_eNoMethodError;
RUBY_EXTERN VALUE rb_eFloatDomainError;

RUBY_EXTERN VALUE rb_eScriptError;
RUBY_EXTERN VALUE rb_eNameError;
RUBY_EXTERN VALUE rb_eSyntaxError;
RUBY_EXTERN VALUE rb_eLoadError;

RUBY_EXTERN VALUE rb_stdin, rb_stdout, rb_stderr;
RUBY_EXTERN VALUE ruby_errinfo;

static inline VALUE
rb_class_of(VALUE obj)
{
    if (IMMEDIATE_P(obj)) {
        if (FIXNUM_P(obj)) return rb_cFixnum;
        if (obj == Qtrue)  return rb_cTrueClass;
        if (SYMBOL_P(obj)) return rb_cSymbol;
    }
    else if (!RTEST(obj)) {
        if (obj == Qnil)   return rb_cNilClass;
        if (obj == Qfalse) return rb_cFalseClass;
    }
    return RBASIC(obj)->klass;
}

static inline int
rb_type(VALUE obj)
{
    if (IMMEDIATE_P(obj)) {
        if (FIXNUM_P(obj)) return T_FIXNUM;
        if (obj == Qtrue) return T_TRUE;
        if (SYMBOL_P(obj)) return T_SYMBOL;
        if (obj == Qundef) return T_UNDEF;
    }
    else if (!RTEST(obj)) {
        if (obj == Qnil) return T_NIL;
        if (obj == Qfalse) return T_FALSE;
    }
    return BUILTIN_TYPE(obj);
}

static inline int
rb_special_const_p(VALUE obj)
{
    if (SPECIAL_CONST_P(obj)) return Qtrue;
    return Qfalse;
}

#include "missing.h"
#include "intern.h"

#if defined(EXTLIB) && defined(USE_DLN_A_OUT)
/* hook for external modules */
static char *dln_libs_to_be_linked[] = { EXTLIB, 0 };
#endif

#if defined(HAVE_LIBPTHREAD)
#ifdef HAVE_PTHREAD_H
#include <pthread.h>
#endif
typedef pthread_t rb_nativethread_t;
# define NATIVETHREAD_CURRENT() pthread_self()
# define NATIVETHREAD_EQUAL(t1,t2) pthread_equal((t1),(t2))
# define HAVE_NATIVETHREAD

# define NATIVETHREAD_KILL(th,sig) pthread_kill((th),(sig))
# define HAVE_NATIVETHREAD_KILL
#elif defined(_WIN32) || defined(_WIN32_WCE)
typedef DWORD rb_nativethread_t;
# define NATIVETHREAD_CURRENT() GetCurrentThreadId()
# define NATIVETHREAD_EQUAL(t1,t2) ((t1) == (t2))
# define HAVE_NATIVETHREAD
#endif
#ifdef HAVE_NATIVETHREAD
int is_ruby_native_thread(void);
#else
#define is_ruby_native_thread() (1)
#endif
#ifdef HAVE_NATIVETHREAD_KILL
void ruby_native_thread_kill(int);
#endif

#if defined(__cplusplus)
#if 0
{ /* satisfy cc-mode */
#endif
}  /* extern "C" { */
#endif

#endif /* ifndef RUBY_H */
/* [<][>][^][v][top][bottom][index] [help] */


rubyio.h

root/rubyio.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

DEFINITIONS

This source file includes following definitions.
  1. OpenFile
/**********************************************************************

  rubyio.h -

  $Author: ocean $
  $Date: 2005/09/14 06:32:32 $
  created at: Fri Nov 12 16:47:09 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#ifndef RUBYIO_H
#define RUBYIO_H

#include <stdio.h>
#include <errno.h>

#if defined(HAVE_STDIO_EXT_H)
#include <stdio_ext.h>
#endif

typedef struct OpenFile {
    int fd;                     /* file descriptor */
    FILE *stdio_file;           /* stdio ptr for read/write if available */
    int mode;                   /* mode flags */
    int pid;                    /* child's pid (for pipes) */
    int lineno;                 /* number of lines read */
    char *path;                 /* pathname for file */
    void (*finalize)(struct OpenFile*,int); /* finalize proc */
    long refcnt;
    char *wbuf;                 /* wbuf_off + wbuf_len <= wbuf_capa */
    int wbuf_off;
    int wbuf_len;
    int wbuf_capa;
    char *rbuf;                 /* rbuf_off + rbuf_len <= rbuf_capa */
    int rbuf_off;
    int rbuf_len;
    int rbuf_capa;
} OpenFile;

#define FMODE_READABLE  1
#define FMODE_WRITABLE  2
#define FMODE_READWRITE 3
#define FMODE_APPEND   64
#define FMODE_CREATE  128
#define FMODE_BINMODE   4
#define FMODE_SYNC      8
#define FMODE_TTY      16
#define FMODE_DUPLEX   32
#define FMODE_WSPLIT  0x200
#define FMODE_WSPLIT_INITIALIZED  0x400

#define GetOpenFile(obj,fp) rb_io_check_closed((fp) = RFILE(rb_io_taint_check(obj))->fptr)

#define MakeOpenFile(obj, fp) do {\
    if (RFILE(obj)->fptr) {\
        rb_io_close(obj);\
        free(RFILE(obj)->fptr);\
        RFILE(obj)->fptr = 0;\
    }\
    fp = 0;\
    fp = RFILE(obj)->fptr = ALLOC(OpenFile);\
    fp->fd = -1;\
    fp->stdio_file = NULL;\
    fp->mode = 0;\
    fp->pid = 0;\
    fp->lineno = 0;\
    fp->path = NULL;\
    fp->finalize = 0;\
    fp->refcnt = 1;\
    fp->wbuf = NULL;\
    fp->wbuf_off = 0;\
    fp->wbuf_len = 0;\
    fp->wbuf_capa = 0;\
    fp->rbuf = NULL;\
    fp->rbuf_off = 0;\
    fp->rbuf_len = 0;\
    fp->rbuf_capa = 0;\
} while (0)

FILE *rb_io_stdio_file(OpenFile *fptr);

FILE *rb_fopen(const char*, const char*);
FILE *rb_fdopen(int, const char*);
int  rb_io_mode_flags(const char*);
int  rb_io_modenum_flags(int);
void rb_io_check_writable(OpenFile*);
void rb_io_check_readable(OpenFile*);
int rb_io_fptr_finalize(OpenFile*);
void rb_io_synchronized(OpenFile*);
void rb_io_check_initialized(OpenFile*);
void rb_io_check_closed(OpenFile*);
int rb_io_wait_readable(int);
int rb_io_wait_writable(int);

VALUE rb_io_taint_check(VALUE);
NORETURN(void rb_eof_error(void));

void rb_io_read_check(OpenFile*);
int rb_io_read_pending(OpenFile*);
void rb_read_check(FILE*);

DEPRECATED(int rb_getc(FILE*));
DEPRECATED(long rb_io_fread(char *, long, FILE *));
DEPRECATED(long rb_io_fwrite(const char *, long, FILE *));
DEPRECATED(int rb_read_pending(FILE*));
#endif
/* [<][>][^][v] [top][bottom][index] [help] */


rubysig.h

root/rubysig.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/**********************************************************************

  rubysig.h -

  $Author: ocean $
  $Date: 2005/10/21 10:20:43 $
  created at: Wed Aug 16 01:15:38 JST 1995

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#ifndef RUBYSIG_H
#define RUBYSIG_H
#include <errno.h>

#ifdef _WIN32
typedef LONG rb_atomic_t;

# define ATOMIC_TEST(var) InterlockedExchange(&(var), 0)
# define ATOMIC_SET(var, val) InterlockedExchange(&(var), (val))
# define ATOMIC_INC(var) InterlockedIncrement(&(var))
# define ATOMIC_DEC(var) InterlockedDecrement(&(var))

/* Windows doesn't allow interrupt while system calls */
# define TRAP_BEG do {\
    int saved_errno = 0;\
    rb_atomic_t trap_immediate = ATOMIC_SET(rb_trap_immediate, 1)
# define TRAP_END\
    ATOMIC_SET(rb_trap_immediate, trap_immediate);\
    saved_errno = errno;\
    CHECK_INTS;\
    errno = saved_errno;\
} while (0)
# define RUBY_CRITICAL(statements) do {\
    rb_w32_enter_critical();\
    statements;\
    rb_w32_leave_critical();\
} while (0)
#else
typedef int rb_atomic_t;

# define ATOMIC_TEST(var) ((var) ? ((var) = 0, 1) : 0)
# define ATOMIC_SET(var, val) ((var) = (val))
# define ATOMIC_INC(var) (++(var))
# define ATOMIC_DEC(var) (--(var))

# define TRAP_BEG do {\
    int saved_errno = 0;\
    int trap_immediate = rb_trap_immediate;\
    rb_trap_immediate = 1
# define TRAP_END rb_trap_immediate = trap_immediate;\
    saved_errno = errno;\
    CHECK_INTS;\
    errno = saved_errno;\
} while (0)

# define RUBY_CRITICAL(statements) do {\
    int trap_immediate = rb_trap_immediate;\
    rb_trap_immediate = 0;\
    statements;\
    rb_trap_immediate = trap_immediate;\
} while (0)
#endif
RUBY_EXTERN rb_atomic_t rb_trap_immediate;

RUBY_EXTERN int rb_prohibit_interrupt;
#define DEFER_INTS (rb_prohibit_interrupt++)
#define ALLOW_INTS do {\
    rb_prohibit_interrupt--;\
    CHECK_INTS;\
} while (0)
#define ENABLE_INTS (rb_prohibit_interrupt--)

VALUE rb_with_disable_interrupt(VALUE(*)(ANYARGS),VALUE);

RUBY_EXTERN rb_atomic_t rb_trap_pending;
void rb_trap_restore_mask(void);

RUBY_EXTERN int rb_thread_critical;
void rb_thread_schedule(void);
#if defined(HAVE_SETITIMER) || defined(_THREAD_SAFE)
RUBY_EXTERN int rb_thread_pending;
# define CHECK_INTS do {\
    if (!(rb_prohibit_interrupt || rb_thread_critical)) {\
        if (rb_thread_pending) rb_thread_schedule();\
        if (rb_trap_pending) rb_trap_exec();\
    }\
} while (0)
#else
/* pseudo preemptive thread switching */
RUBY_EXTERN int rb_thread_tick;
#define THREAD_TICK 500
#define CHECK_INTS do {\
    if (!(rb_prohibit_interrupt || rb_thread_critical)) {\
        if (rb_thread_tick-- <= 0) {\
            rb_thread_tick = THREAD_TICK;\
            rb_thread_schedule();\
        }\
    }\
   if (rb_trap_pending) rb_trap_exec();\
} while (0)
#endif

#endif /* ifndef RUBYSIG_H */
/* [<][>][^][v][top][bottom][index] [help] */


signal.c

root/signal.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. signm2signo
  2. signo2signm
  3. ruby_signal_name
  4. rb_f_kill
  5. rb_gc_mark_trap_list
  6. ruby_signal
  7. posix_signal
  8. ruby_nativethread_signal
  9. posix_nativethread_signal
  10. ruby_nativethread_signal
  11. signal_exec
  12. sigsend_to_ruby_thread
  13. sighandler
  14. sigbus
  15. sigsegv
  16. sigpipe
  17. rb_trap_exit
  18. rb_trap_exec
  19. trap
  20. trap_ensure
  21. rb_trap_restore_mask
  22. sig_trap
  23. sig_list
  24. install_sighandler
  25. install_nativethread_sighandler
  26. init_sigchld
  27. Init_signal
/**********************************************************************

  signal.c -

  $Author: matz $
  $Date: 2005/12/12 00:35:08 $
  created at: Tue Dec 20 10:13:44 JST 1994

  Copyright (C) 1993-2003 Yukihiro Matsumoto
  Copyright (C) 2000  Network Applied Communication Laboratory, Inc.
  Copyright (C) 2000  Information-technology Promotion Agency, Japan

**********************************************************************/

#include "ruby.h"
#include "rubysig.h"
#include <signal.h>
#include <stdio.h>

#ifdef __BEOS__
#undef SIGBUS
#endif

#ifndef NSIG
# ifdef DJGPP
#  define NSIG SIGMAX
# else
#  define NSIG (_SIGMAX + 1)      /* For QNX */
# endif
#endif

static struct signals {
    const char *signm;
    int  signo;
} siglist [] = {
    {"EXIT", 0},
#ifdef SIGHUP
    {"HUP", SIGHUP},
#endif
    {"INT", SIGINT},
#ifdef SIGQUIT
    {"QUIT", SIGQUIT},
#endif
#ifdef SIGILL
    {"ILL", SIGILL},
#endif
#ifdef SIGTRAP
    {"TRAP", SIGTRAP},
#endif
#ifdef SIGIOT
    {"IOT", SIGIOT},
#endif
#ifdef SIGABRT
    {"ABRT", SIGABRT},
#endif
#ifdef SIGEMT
    {"EMT", SIGEMT},
#endif
#ifdef SIGFPE
    {"FPE", SIGFPE},
#endif
#ifdef SIGKILL
    {"KILL", SIGKILL},
#endif
#ifdef SIGBUS
    {"BUS", SIGBUS},
#endif
#ifdef SIGSEGV
    {"SEGV", SIGSEGV},
#endif
#ifdef SIGSYS
    {"SYS", SIGSYS},
#endif
#ifdef SIGPIPE
    {"PIPE", SIGPIPE},
#endif
#ifdef SIGALRM
    {"ALRM", SIGALRM},
#endif
#ifdef SIGTERM
    {"TERM", SIGTERM},
#endif
#ifdef SIGURG
    {"URG", SIGURG},
#endif
#ifdef SIGSTOP
    {"STOP", SIGSTOP},
#endif
#ifdef SIGTSTP
    {"TSTP", SIGTSTP},
#endif
#ifdef SIGCONT
    {"CONT", SIGCONT},
#endif
#ifdef SIGCHLD
    {"CHLD", SIGCHLD},
#endif
#ifdef SIGCLD
    {"CLD", SIGCLD},
#else
# ifdef SIGCHLD
    {"CLD", SIGCHLD},
# endif
#endif
#ifdef SIGTTIN
    {"TTIN", SIGTTIN},
#endif
#ifdef SIGTTOU
    {"TTOU", SIGTTOU},
#endif
#ifdef SIGIO
    {"IO", SIGIO},
#endif
#ifdef SIGXCPU
    {"XCPU", SIGXCPU},
#endif
#ifdef SIGXFSZ
    {"XFSZ", SIGXFSZ},
#endif
#ifdef SIGVTALRM
    {"VTALRM", SIGVTALRM},
#endif
#ifdef SIGPROF
    {"PROF", SIGPROF},
#endif
#ifdef SIGWINCH
    {"WINCH", SIGWINCH},
#endif
#ifdef SIGUSR1
    {"USR1", SIGUSR1},
#endif
#ifdef SIGUSR2
    {"USR2", SIGUSR2},
#endif
#ifdef SIGLOST
    {"LOST", SIGLOST},
#endif
#ifdef SIGMSG
    {"MSG", SIGMSG},
#endif
#ifdef SIGPWR
    {"PWR", SIGPWR},
#endif
#ifdef SIGPOLL
    {"POLL", SIGPOLL},
#endif
#ifdef SIGDANGER
    {"DANGER", SIGDANGER},
#endif
#ifdef SIGMIGRATE
    {"MIGRATE", SIGMIGRATE},
#endif
#ifdef SIGPRE
    {"PRE", SIGPRE},
#endif
#ifdef SIGGRANT
    {"GRANT", SIGGRANT},
#endif
#ifdef SIGRETRACT
    {"RETRACT", SIGRETRACT},
#endif
#ifdef SIGSOUND
    {"SOUND", SIGSOUND},
#endif
#ifdef SIGINFO
    {"INFO", SIGINFO},
#endif
    {NULL, 0}
};

static int
signm2signo(const char *nm)
{
    struct signals *sigs;

    for (sigs = siglist; sigs->signm; sigs++)
        if (strcmp(sigs->signm, nm) == 0)
            return sigs->signo;
    return 0;
}

static const char*
signo2signm(int no)
{
    struct signals *sigs;

    for (sigs = siglist; sigs->signm; sigs++)
        if (sigs->signo == no)
            return sigs->signm;
    return 0;
}

const char *
ruby_signal_name(int no)
{
    return signo2signm(no);
}

/*
 *  call-seq:
 *     Process.kill(signal, pid, ...)    => fixnum
 *
 *  Sends the given signal to the specified process id(s), or to the
 *  current process if _pid_ is zero. _signal_ may be an
 *  integer signal number or a POSIX signal name (either with or without
 *  a +SIG+ prefix). If _signal_ is negative (or starts
 *  with a minus sign), kills process groups instead of
 *  processes. Not all signals are available on all platforms.
 *
 *     pid = fork do
 *        Signal.trap("HUP") { puts "Ouch!"; exit }
 *        # ... do some work ...
 *     end
 *     # ...
 *     Process.kill("HUP", pid)
 *     Process.wait
 *
 *  <em>produces:</em>
 *
 *     Ouch!
 */

VALUE
rb_f_kill(int argc, VALUE *argv)
{
    int negative = 0;
    int sig;
    int i;
    char *s;

    rb_secure(2);
    if (argc < 2)
        rb_raise(rb_eArgError, "wrong number of arguments -- kill(sig, pid...)");
    switch (TYPE(argv[0])) {
      case T_FIXNUM:
        sig = FIX2INT(argv[0]);
        break;

      case T_SYMBOL:
        s = rb_id2name(SYM2ID(argv[0]));
        if (!s) rb_raise(rb_eArgError, "bad signal");
        goto str_signal;

      case T_STRING:
        s = RSTRING(argv[0])->ptr;
        if (s[0] == '-') {
            negative++;
            s++;
        }
      str_signal:
        if (strncmp("SIG", s, 3) == 0)
            s += 3;
        if((sig = signm2signo(s)) == 0)
            rb_raise(rb_eArgError, "unsupported name `SIG%s'", s);

        if (negative)
            sig = -sig;
        break;

      default:
        {
            VALUE str;

            str = rb_check_string_type(argv[0]);
            if (!NIL_P(str)) {
                s = RSTRING(str)->ptr;
                goto str_signal;
            }
            rb_raise(rb_eArgError, "bad signal type %s",
                     rb_obj_classname(argv[0]));
        }
        break;
    }

    if (sig < 0) {
        sig = -sig;
        for (i=1; i<argc; i++) {
            int pid = NUM2INT(argv[i]);
#ifdef HAS_KILLPG
            if (killpg(pid, sig) < 0)
#else
            if (kill(-pid, sig) < 0)
#endif
                rb_sys_fail(0);
        }
    }
    else {
        for (i=1; i<argc; i++) {
            Check_Type(argv[i], T_FIXNUM);
            if (kill(FIX2INT(argv[i]), sig) < 0)
                rb_sys_fail(0);
        }
    }
    return INT2FIX(i-1);
}

static struct {
    VALUE cmd;
    int safe;
} trap_list[NSIG];
static rb_atomic_t trap_pending_list[NSIG];
static char rb_trap_accept_nativethreads[NSIG];
rb_atomic_t rb_trap_pending;
rb_atomic_t rb_trap_immediate;
int rb_prohibit_interrupt = 1;

void
rb_gc_mark_trap_list(void)
{
#ifndef MACOS_UNUSE_SIGNAL
    int i;

    for (i=0; i<NSIG; i++) {
        if (trap_list[i].cmd)
            rb_gc_mark(trap_list[i].cmd);
    }
#endif /* MACOS_UNUSE_SIGNAL */
}

#ifdef __dietlibc__
#define sighandler_t sh_t
#endif

typedef RETSIGTYPE (*sighandler_t)(int);

#ifdef POSIX_SIGNAL
static sighandler_t
ruby_signal(int signum, sighandler_t handler)
{
    struct sigaction sigact, old;

    rb_trap_accept_nativethreads[signum] = 0;

    sigact.sa_handler = handler;
    sigemptyset(&sigact.sa_mask);
    sigact.sa_flags = 0;
#ifdef SA_NOCLDWAIT
    if (signum == SIGCHLD && handler == SIG_IGN)
        sigact.sa_flags |= SA_NOCLDWAIT;
#endif
    sigaction(signum, &sigact, &old);
    return old.sa_handler;
}

void
posix_signal(int signum, sighandler_t handler)
{
    ruby_signal(signum, handler);
}

#ifdef HAVE_NATIVETHREAD
static sighandler_t
ruby_nativethread_signal(int signum, sighandler_t handler)
{
    sighandler_t old;

    old = ruby_signal(signum, handler);
    rb_trap_accept_nativethreads[signum] = 1;
    return old;
}

void
posix_nativethread_signal(int signum, sighandler_t handler)
{
    ruby_nativethread_signal(signum, handler);
}
#endif
#else /* !POSIX_SIGNAL */
#define ruby_signal(sig,handler) (rb_trap_accept_nativethreads[sig] = 0, signal((sig),(handler)))
#ifdef HAVE_NATIVETHREAD
static sighandler_t
ruby_nativethread_signal(int signum, sighandler_t handler)
{
    sighandler_t old;

    old = signal(signum, handler);
    rb_trap_accept_nativethreads[signum] = 1;
    return old;
}
#endif
#endif

static void
signal_exec(int sig)
{
    if (trap_list[sig].cmd == 0) {
        switch (sig) {
          case SIGINT:
            rb_thread_interrupt();
            break;
#ifdef SIGHUP
          case SIGHUP:
#endif
#ifdef SIGQUIT
          case SIGQUIT:
#endif
#ifdef SIGALRM
          case SIGALRM:
#endif
#ifdef SIGUSR1
          case SIGUSR1:
#endif
#ifdef SIGUSR2
          case SIGUSR2:
#endif
            rb_thread_signal_raise(signo2signm(sig));
            break;
        }
    }
    else if (trap_list[sig].cmd == Qundef) {
        rb_thread_signal_exit();
    }
    else {
        rb_thread_trap_eval(trap_list[sig].cmd, sig, trap_list[sig].safe);
    }
}

#if defined(HAVE_NATIVETHREAD) && defined(HAVE_NATIVETHREAD_KILL)
static void
sigsend_to_ruby_thread(int sig)
{
#ifdef HAVE_SIGPROCMASK
    sigset_t mask, old_mask;
#else
    int mask, old_mask;
#endif

#ifdef HAVE_SIGPROCMASK
    sigfillset(&mask);
    sigprocmask(SIG_BLOCK, &mask, &old_mask);
#else
    mask = sigblock(~0);
    sigsetmask(mask);
#endif

    ruby_native_thread_kill(sig);
}
#endif

static RETSIGTYPE
sighandler(int sig)
{
#ifdef _WIN32
#define IN_MAIN_CONTEXT(f, a) (rb_w32_main_context(a, f) ? (void)0 : f(a))
#else
#define IN_MAIN_CONTEXT(f, a) f(a)
#endif
    if (sig >= NSIG) {
        rb_bug("trap_handler: Bad signal %d", sig);
    }

#if defined(HAVE_NATIVETHREAD) && defined(HAVE_NATIVETHREAD_KILL)
    if (!is_ruby_native_thread() && !rb_trap_accept_nativethreads[sig]) {
        sigsend_to_ruby_thread(sig);
        return;
    }
#endif

#if !defined(BSD_SIGNAL) && !defined(POSIX_SIGNAL)
    if (rb_trap_accept_nativethreads[sig]) {
        ruby_nativethread_signal(sig, sighandler);
    } else {
        ruby_signal(sig, sighandler);
    }
#endif

    if (trap_list[sig].cmd == 0 && ATOMIC_TEST(rb_trap_immediate)) {
        IN_MAIN_CONTEXT(signal_exec, sig);
        ATOMIC_SET(rb_trap_immediate, 1);
    }
    else {
        ATOMIC_INC(rb_trap_pending);
        ATOMIC_INC(trap_pending_list[sig]);
    }
}

#ifdef SIGBUS
static RETSIGTYPE
sigbus(int sig)
{
#if defined(HAVE_NATIVETHREAD) && defined(HAVE_NATIVETHREAD_KILL)
    if (!is_ruby_native_thread() && !rb_trap_accept_nativethreads[sig]) {
        sigsend_to_ruby_thread(sig);
        return;
    }
#endif

    rb_bug("Bus Error");
}
#endif

#ifdef SIGSEGV
static RETSIGTYPE
sigsegv(int sig)
{
#if defined(HAVE_NATIVETHREAD) && defined(HAVE_NATIVETHREAD_KILL)
    if (!is_ruby_native_thread() && !rb_trap_accept_nativethreads[sig]) {
        sigsend_to_ruby_thread(sig);
        return;
    }
#endif

    rb_bug("Segmentation fault");
}
#endif

#ifdef SIGPIPE
static RETSIGTYPE
sigpipe(int sig)
{
    /* do nothing */
}
#endif

void
rb_trap_exit(void)
{
#ifndef MACOS_UNUSE_SIGNAL
    if (trap_list[0].cmd) {
        VALUE trap_exit = trap_list[0].cmd;

        trap_list[0].cmd = 0;
        rb_eval_cmd(trap_exit, rb_ary_new3(1, INT2FIX(0)), trap_list[0].safe);
    }
#endif
}

void
rb_trap_exec(void)
{
#ifndef MACOS_UNUSE_SIGNAL
    int i;

    for (i=0; i<NSIG; i++) {
        if (trap_pending_list[i]) {
            trap_pending_list[i] = 0;
            signal_exec(i);
        }
    }
#endif /* MACOS_UNUSE_SIGNAL */
    rb_trap_pending = 0;
}

struct trap_arg {
#ifndef _WIN32
# ifdef HAVE_SIGPROCMASK
    sigset_t mask;
# else
    int mask;
# endif
#endif
    VALUE sig, cmd;
};

# ifdef HAVE_SIGPROCMASK
static sigset_t trap_last_mask;
# else
static int trap_last_mask;
# endif

static VALUE
trap(struct trap_arg *arg)
{
    sighandler_t func, oldfunc;
    VALUE command, oldcmd;
    int sig = -1;
    char *s;

    func = sighandler;
    if (NIL_P(arg->cmd)) {
        func = SIG_IGN;
    }
    else {
        command = rb_check_string_type(arg->cmd);
        if (!NIL_P(command)) {
            SafeStringValue(command);   /* taint check */
            switch (RSTRING(command)->len) {
              case 0:
                func = SIG_IGN;
                break;
              case 7:
                if (strncmp(RSTRING(command)->ptr, "SIG_IGN", 7) == 0) {
                    func = SIG_IGN;
                }
                else if (strncmp(RSTRING(command)->ptr, "SIG_DFL", 7) == 0) {
                    func = SIG_DFL;
                }
                else if (strncmp(RSTRING(command)->ptr, "DEFAULT", 7) == 0) {
                    func = SIG_DFL;
                }
                break;
              case 6:
                if (strncmp(RSTRING(command)->ptr, "IGNORE", 6) == 0) {
                    func = SIG_IGN;
                }
                break;
              case 4:
                if (strncmp(RSTRING(command)->ptr, "EXIT", 4) == 0) {
                    arg->cmd = Qundef;
                }
                break;
            }
        }
    }
    if (func == SIG_IGN || func == SIG_DFL) {
        command = 0;
    }
    else {
        command = arg->cmd;
    }

    switch (TYPE(arg->sig)) {
      case T_FIXNUM:
        sig = FIX2INT(arg->sig);
        break;

      case T_SYMBOL:
        s = rb_id2name(SYM2ID(arg->sig));
        if (!s) rb_raise(rb_eArgError, "bad signal");
        goto str_signal;

      case T_STRING:
        s = RSTRING(arg->sig)->ptr;

      str_signal:
        if (strncmp("SIG", s, 3) == 0)
            s += 3;
        sig = signm2signo(s);
        if (sig == 0 && strcmp(s, "EXIT") != 0)
            rb_raise(rb_eArgError, "unsupported signal SIG%s", s);
    }

    if (sig < 0 || sig > NSIG) {
        rb_raise(rb_eArgError, "invalid signal number (%d)", sig);
    }
#if defined(HAVE_SETITIMER)
    if (sig == SIGVTALRM) {
        rb_raise(rb_eArgError, "SIGVTALRM reserved for Thread; can't set handler");
    }
#endif
    if (func == SIG_DFL) {
        switch (sig) {
          case SIGINT:
#ifdef SIGHUP
          case SIGHUP:
#endif
#ifdef SIGQUIT
          case SIGQUIT:
#endif
#ifdef SIGALRM
          case SIGALRM:
#endif
#ifdef SIGUSR1
          case SIGUSR1:
#endif
#ifdef SIGUSR2
          case SIGUSR2:
#endif
            func = sighandler;
            break;
#ifdef SIGBUS
          case SIGBUS:
            func = sigbus;
            break;
#endif
#ifdef SIGSEGV
          case SIGSEGV:
            func = sigsegv;
            break;
#endif
#ifdef SIGPIPE
          case SIGPIPE:
            func = sigpipe;
            break;
#endif
        }
    }
    oldfunc = ruby_signal(sig, func);
    oldcmd = trap_list[sig].cmd;
    if (!oldcmd) {
        if (oldfunc == SIG_IGN) oldcmd = rb_str_new2("IGNORE");
        else if (oldfunc == sighandler) oldcmd = rb_str_new2("DEFAULT");
        else oldcmd = Qnil;
    }

    trap_list[sig].cmd = command;
    trap_list[sig].safe = ruby_safe_level;
    /* enable at least specified signal. */
#ifndef _WIN32
#ifdef HAVE_SIGPROCMASK
    sigdelset(&arg->mask, sig);
#else
    arg->mask &= ~sigmask(sig);
#endif
#endif
    return oldcmd;
}

#ifndef _WIN32
static VALUE
trap_ensure(struct trap_arg *arg)
{
    /* enable interrupt */
#ifdef HAVE_SIGPROCMASK
    sigprocmask(SIG_SETMASK, &arg->mask, NULL);
#else
    sigsetmask(arg->mask);
#endif
    trap_last_mask = arg->mask;
    return 0;
}
#endif

void
rb_trap_restore_mask(void)
{
#ifndef _WIN32
# ifdef HAVE_SIGPROCMASK
    sigprocmask(SIG_SETMASK, &trap_last_mask, NULL);
# else
    sigsetmask(trap_last_mask);
# endif
#endif
}

/*
 * call-seq:
 *   Signal.trap( signal, proc ) => obj
 *   Signal.trap( signal ) {| | block } => obj
 *
 * Specifies the handling of signals. The first parameter is a signal
 * name (a string such as ``SIGALRM'', ``SIGUSR1'', and so on) or a
 * signal number. The characters ``SIG'' may be omitted from the
 * signal name. The command or block specifies code to be run when the
 * signal is raised. If the command is the string ``IGNORE'' or
 * ``SIG_IGN'', the signal will be ignored. If the command is
 * ``DEFAULT'' or ``SIG_DFL'', the operating system's default handler
 * will be invoked. If the command is ``EXIT'', the script will be
 * terminated by the signal. Otherwise, the given command or block
 * will be run.
 * The special signal name ``EXIT'' or signal number zero will be
 * invoked just prior to program termination.
 * trap returns the previous handler for the given signal.
 *
 *     Signal.trap(0, proc { puts "Terminating: #{$$}" })
 *     Signal.trap("CLD")  { puts "Child died" }
 *     fork && Process.wait
 *
 * produces:
 *     Terminating: 27461
 *     Child died
 *     Terminating: 27460
 */
static VALUE
sig_trap(int argc, VALUE *argv)
{
    struct trap_arg arg;

    rb_secure(2);
    if (argc == 0 || argc > 2) {
        rb_raise(rb_eArgError, "wrong number of arguments -- trap(sig, cmd)/trap(sig){...}");
    }

    arg.sig = argv[0];
    if (argc == 1) {
        arg.cmd = rb_block_proc();
    }
    else if (argc == 2) {
        arg.cmd = argv[1];
    }

    if (OBJ_TAINTED(arg.cmd)) {
        rb_raise(rb_eSecurityError, "Insecure: tainted signal trap");
    }
#ifndef _WIN32
    /* disable interrupt */
# ifdef HAVE_SIGPROCMASK
    sigfillset(&arg.mask);
    sigprocmask(SIG_BLOCK, &arg.mask, &arg.mask);
# else
    arg.mask = sigblock(~0);
# endif

    return rb_ensure(trap, (VALUE)&arg, trap_ensure, (VALUE)&arg);
#else
    return trap(&arg);
#endif
}

/*
 * call-seq:
 *   Signal.list => a_hash
 *
 * Returns a list of signal names mapped to the corresponding
 * underlying signal numbers.
 *
 * Signal.list   #=> {"ABRT"=>6, "ALRM"=>14, "BUS"=>7, "CHLD"=>17, "CLD"=>17, "CONT"=>18, "FPE"=>8, "HUP"=>1, "ILL"=>4, "INT"=>2, "IO"=>29, "IOT"=>6, "KILL"=>9, "PIPE"=>13, "POLL"=>29, "PROF"=>27, "PWR"=>30, "QUIT"=>3, "SEGV"=>11, "STOP"=>19, "SYS"=>31, "TERM"=>15, "TRAP"=>5, "TSTP"=>20, "TTIN"=>21, "TTOU"=>22, "URG"=>23, "USR1"=>10, "USR2"=>12, "VTALRM"=>26, "WINCH"=>28, "XCPU"=>24, "XFSZ"=>25}
 */
static VALUE
sig_list(void)
{
    VALUE h = rb_hash_new();
    struct signals *sigs;

    for (sigs = siglist; sigs->signm; sigs++) {
        rb_hash_aset(h, rb_str_new2(sigs->signm), INT2FIX(sigs->signo));
    }
    return h;
}

static void
install_sighandler(int signum, sighandler_t handler)
{
    sighandler_t old;

    old = ruby_signal(signum, handler);
    if (old != SIG_DFL) {
        ruby_signal(signum, old);
    }
}

#ifdef HAVE_NATIVETHREAD
static void
install_nativethread_sighandler(int signum, sighandler_t handler)
{
    sighandler_t old;
    int old_st;

    old_st = rb_trap_accept_nativethreads[signum];
    old = ruby_nativethread_signal(signum, handler);
    if (old != SIG_DFL) {
        if (old_st) {
            ruby_nativethread_signal(signum, old);
        } else {
            ruby_signal(signum, old);
        }
    }
}
#endif

static void
init_sigchld(int sig)
{
    sighandler_t oldfunc;
#ifndef _WIN32
# ifdef HAVE_SIGPROCMASK
    sigset_t mask;
# else
    int mask;
# endif
#endif

#ifndef _WIN32
    /* disable interrupt */
# ifdef HAVE_SIGPROCMASK
    sigfillset(&mask);
    sigprocmask(SIG_BLOCK, &mask, &mask);
# else
    mask = sigblock(~0);
# endif
#endif

    oldfunc = ruby_signal(sig, SIG_DFL);
    if (oldfunc != SIG_DFL && oldfunc != SIG_IGN) {
        ruby_signal(sig, oldfunc);
    } else {
        trap_list[sig].cmd = 0;
    }

#ifndef _WIN32
#ifdef HAVE_SIGPROCMASK
    sigdelset(&mask, sig);
    sigprocmask(SIG_SETMASK, &mask, NULL);
#else
    mask &= ~sigmask(sig);
    sigsetmask(mask);
#endif
    trap_last_mask = mask;
#endif
}

/*
 * Many operating systems allow signals to be sent to running
 * processes. Some signals have a defined effect on the process, while
 * others may be trapped at the code level and acted upon. For
 * example, your process may trap the USR1 signal and use it to toggle
 * debugging, and may use TERM to initiate a controlled shutdown.
 *
 *     pid = fork do
 *       Signal.trap("USR1") do
 *         $debug = !$debug
 *         puts "Debug now: #$debug"
 *       end
 *       Signal.trap("TERM") do
 *         puts "Terminating..."
 *         shutdown()
 *       end
 *       # . . . do some work . . .
 *     end
 *
 *     Process.detach(pid)
 *
 *     # Controlling program:
 *     Process.kill("USR1", pid)
 *     # ...
 *     Process.kill("USR1", pid)
 *     # ...
 *     Process.kill("TERM", pid)
 *
 * produces:
 *     Debug now: true
 *     Debug now: false
 *    Terminating...
 *
 * The list of available signal names and their interpretation is
 * system dependent. Signal delivery semantics may also vary between
 * systems; in particular signal delivery may not always be reliable.
 */
void
Init_signal(void)
{
#ifndef MACOS_UNUSE_SIGNAL
    VALUE mSignal = rb_define_module("Signal");

    rb_define_global_function("trap", sig_trap, -1);
    rb_define_module_function(mSignal, "trap", sig_trap, -1);
    rb_define_module_function(mSignal, "list", sig_list, 0);

    install_sighandler(SIGINT, sighandler);
#ifdef SIGHUP
    install_sighandler(SIGHUP, sighandler);
#endif
#ifdef SIGQUIT
    install_sighandler(SIGQUIT, sighandler);
#endif
#ifdef SIGALRM
    install_sighandler(SIGALRM, sighandler);
#endif
#ifdef SIGUSR1
    install_sighandler(SIGUSR1, sighandler);
#endif
#ifdef SIGUSR2
    install_sighandler(SIGUSR2, sighandler);
#endif

#ifdef SIGBUS
# ifndef RUBY_GC_DEBUG
    install_sighandler(SIGBUS, sigbus);
# endif
#endif
#ifdef SIGSEGV
# ifndef RUBY_GC_DEBUG
    install_sighandler(SIGSEGV, sigsegv);
# endif
#endif
#ifdef SIGPIPE
    install_sighandler(SIGPIPE, sigpipe);
#endif

#ifdef SIGCLD
    init_sigchld(SIGCLD);
#endif
#ifdef SIGCHLD
    init_sigchld(SIGCHLD);
#endif

#endif /* MACOS_UNUSE_SIGNAL */
}
/* [<][>][^] [v] [top][bottom][index] [help] */


sjis.c

root/sjis.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. sjis_mbc_enc_len
  2. sjis_code_to_mbclen
  3. sjis_mbc_to_code
  4. sjis_code_to_mbc
  5. sjis_mbc_to_normalize
  6. sjis_is_mbc_ambiguous
  7. sjis_is_code_ctype
  8. sjis_left_adjust_char_head
  9. sjis_is_allowed_reverse_match
/**********************************************************************
  sjis.c -  Oniguruma (regular expression library)
**********************************************************************/
/*-
 * Copyright (c) 2002-2005  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#include "regenc.h"

static int EncLen_SJIS[] = {
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1
};

static const char SJIS_CAN_BE_TRAIL_TABLE[256] = {
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0
};

#define SJIS_ISMB_FIRST(byte)  (EncLen_SJIS[byte] > 1)
#define SJIS_ISMB_TRAIL(byte)  SJIS_CAN_BE_TRAIL_TABLE[(byte)]

static int
sjis_mbc_enc_len(const UChar* p)
{
  return EncLen_SJIS[*p];
}

static int
sjis_code_to_mbclen(OnigCodePoint code)
{
  if (code < 256) {
    if (EncLen_SJIS[(int )code] == 1)
      return 1;
    else
      return 0;
  }
  else if (code <= 0xffff) {
    return 2;
  }
  else
    return 0;
}

static OnigCodePoint
sjis_mbc_to_code(const UChar* p, const UChar* end)
{
  int c, i, len;
  OnigCodePoint n;

  len = enc_len(ONIG_ENCODING_SJIS, p);
  c = *p++;
  n = c;
  if (len == 1) return n;

  for (i = 1; i < len; i++) {
    if (p >= end) break;
    c = *p++;
    n <<= 8;  n += c;
  }
  return n;
}

static int
sjis_code_to_mbc(OnigCodePoint code, UChar *buf)
{
  UChar *p = buf;

  if ((code & 0xff00) != 0) *p++ = (UChar )(((code >>  8) & 0xff));
  *p++ = (UChar )(code & 0xff);

#if 0
  if (enc_len(ONIG_ENCODING_SJIS, buf) != (p - buf))
    return REGERR_INVALID_WIDE_CHAR_VALUE;
#endif
  return p - buf;
}

static int
sjis_mbc_to_normalize(OnigAmbigType flag,
                      const UChar** pp, const UChar* end, UChar* lower)
{
  const UChar* p = *pp;

  if (ONIGENC_IS_MBC_ASCII(p)) {
    if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
      *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
    }
    else {
      *lower = *p;
    }

    (*pp)++;
    return 1;
  }
  else {
    int len = enc_len(ONIG_ENCODING_SJIS, p);

    if (lower != p) {
      int i;
      for (i = 0; i < len; i++) {
        *lower++ = *p++;
      }
    }
    (*pp) += len;
    return len; /* return byte length of converted char to lower */
  }
}

static int
sjis_is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end)
{
  return onigenc_mbn_is_mbc_ambiguous(ONIG_ENCODING_SJIS, flag, pp, end);

}

static int
sjis_is_code_ctype(OnigCodePoint code, unsigned int ctype)
{
  if ((ctype & ONIGENC_CTYPE_WORD) != 0) {
    if (code < 128)
      return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
    else {
      return (sjis_code_to_mbclen(code) > 1 ? TRUE : FALSE);
    }

    ctype &= ~ONIGENC_CTYPE_WORD;
    if (ctype == 0) return FALSE;
  }

  if (code < 128)
    return ONIGENC_IS_ASCII_CODE_CTYPE(code, ctype);
  else
    return FALSE;
}

static UChar*
sjis_left_adjust_char_head(const UChar* start, const UChar* s)
{
  const UChar *p;
  int len;

  if (s <= start) return (UChar* )s;
  p = s;

  if (SJIS_ISMB_TRAIL(*p)) {
    while (p > start) {
      if (! SJIS_ISMB_FIRST(*--p)) {
        p++;
        break;
      }
    }
  }
  len = enc_len(ONIG_ENCODING_SJIS, p);
  if (p + len > s) return (UChar* )p;
  p += len;
  return (UChar* )(p + ((s - p) & ~1));
}

static int
sjis_is_allowed_reverse_match(const UChar* s, const UChar* end)
{
  const UChar c = *s;
  return (SJIS_ISMB_TRAIL(c) ? FALSE : TRUE);
}

OnigEncodingType OnigEncodingSJIS = {
  sjis_mbc_enc_len,
  "Shift_JIS",   /* name */
  2,             /* max byte length */
  1,             /* min byte length */
  ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE,
  {
      (OnigCodePoint )'\\'                       /* esc */
    , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.'  */
    , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*'  */
    , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
    , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
    , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
  },
  onigenc_is_mbc_newline_0x0a,
  sjis_mbc_to_code,
  sjis_code_to_mbclen,
  sjis_code_to_mbc,
  sjis_mbc_to_normalize,
  sjis_is_mbc_ambiguous,
  onigenc_ascii_get_all_pair_ambig_codes,
  onigenc_nothing_get_all_comp_ambig_codes,
  sjis_is_code_ctype,
  onigenc_not_support_get_ctype_code_range,
  sjis_left_adjust_char_head,
  sjis_is_allowed_reverse_match
};
/* [<][>][^] [v] [top][bottom][index] [help] */


sprintf.c

root/sprintf.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. remove_sign_bits
  2. sign_bits
  3. rb_f_sprintf
  4. rb_str_format
  5. fmt_setup
  6. ruby__sfvwrite
  7. rb_vsprintf
  8. rb_sprintf
/**********************************************************************

  sprintf.c -

  $Author: akr $
  $Date: 2005/12/12 15:09:31 $
  created at: Fri Oct 15 10:39:26 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto
  Copyright (C) 2000  Network Applied Communication Laboratory, Inc.
  Copyright (C) 2000  Information-technology Promotion Agency, Japan

**********************************************************************/

#include "ruby.h"
#include <ctype.h>
#include <math.h>
#include <stdarg.h>

#define BIT_DIGITS(N)   (((N)*146)/485 + 1)  /* log2(10) =~ 146/485 */

static void fmt_setup(char*,int,int,int,int);

static char*
remove_sign_bits(char *str, int base)
{
    char *s, *t;

    s = t = str;

    if (base == 16) {
        while (*t == 'f') {
            t++;
        }
    }
    else if (base == 8) {
        if (*t == '3') t++;
        while (*t == '7') {
            t++;
        }
    }
    else if (base == 2) {
        while (*t == '1') {
            t++;
        }
    }
    if (t > s) {
        while (*t) *s++ = *t++;
        *s = '\0';
    }

    return str;
}

static char
sign_bits(int base, const char *p)
{
    char c = '.';

    switch (base) {
      case 16:
        if (*p == 'X') c = 'F';
        else c = 'f';
        break;
      case 8:
        c = '7'; break;
      case 2:
        c = '1'; break;
    }
    return c;
}

#define FNONE  0
#define FSHARP 1
#define FMINUS 2
#define FPLUS  4
#define FZERO  8
#define FSPACE 16
#define FWIDTH 32
#define FPREC  64

#define CHECK(l) do {\
    while (blen + (l) >= bsiz) {\
        bsiz*=2;\
    }\
    rb_str_resize(result, bsiz);\
    buf = RSTRING(result)->ptr;\
} while (0)

#define PUSH(s, l) do { \
    CHECK(l);\
    memcpy(&buf[blen], s, l);\
    blen += (l);\
} while (0)

#define FILL(c, l) do { \
    CHECK(l);\
    memset(&buf[blen], c, l);\
    blen += (l);\
} while (0)

#define GETARG() (nextvalue != Qundef ? nextvalue : \
    posarg < 0 ? \
    (rb_raise(rb_eArgError, "unnumbered(%d) mixed with numbered", nextarg), 0) : \
    (posarg = nextarg++, GETNTHARG(posarg)))

#define GETPOSARG(n) (posarg > 0 ? \
    (rb_raise(rb_eArgError, "numbered(%d) after unnumbered(%d)", n, posarg), 0) : \
    ((n < 1) ? (rb_raise(rb_eArgError, "invalid index - %d$", n), 0) : \
               (posarg = -1, GETNTHARG(n))))

#define GETNTHARG(nth) \
    ((nth >= argc) ? (rb_raise(rb_eArgError, "too few arguments"), 0) : argv[nth])

#define GETASTER(val) do { \
    t = p++; \
    n = 0; \
    for (; p < end && ISDIGIT(*p); p++) { \
        int next_n = 10 * n + (*p - '0'); \
        if (next_n / 10 != n) {\
            rb_raise(rb_eArgError, #val " too big"); \
        } \
        n = next_n; \
    } \
    if (p >= end) { \
        rb_raise(rb_eArgError, "malformed format string - %%*[0-9]"); \
    } \
    if (*p == '$') { \
        tmp = GETPOSARG(n); \
    } \
    else { \
        tmp = GETARG(); \
        p = t; \
    } \
    val = NUM2INT(tmp); \
} while (0)

/*
 *  call-seq:
 *     format(format_string [, arguments...] )   => string
 *     sprintf(format_string [, arguments...] )  => string
 *
 *  Returns the string resulting from applying <i>format_string</i> to
 *  any additional arguments. Within the format string, any characters
 *  other than format sequences are copied to the result. A format
 *  sequence consists of a percent sign, followed by optional flags,
 *  width, and precision indicators, then terminated with a field type
 *  character. The field type controls how the corresponding
 *  <code>sprintf</code> argument is to be interpreted, while the flags
 *  modify that interpretation. The field type characters are listed
 *  in the table at the end of this section. The flag characters are:
 *
 *    Flag     | Applies to   | Meaning
 *    ---------+--------------+-----------------------------------------
 *    space    | bdeEfgGiouxX | Leave a space at the start of
 *             |              | positive numbers.
 *    ---------+--------------+-----------------------------------------
 *    (digit)$ | all          | Specifies the absolute argument number
 *             |              | for this field. Absolute and relative
 *             |              | argument numbers cannot be mixed in a
 *             |              | sprintf string.
 *    ---------+--------------+-----------------------------------------
 *     #       | beEfgGoxX    | Use an alternative format. For the
 *             |              | conversions `o', `x', `X', and `b',
 *             |              | prefix the result with ``0'', ``0x'', ``0X'',
 *             |              |  and ``0b'', respectively. For `e',
 *             |              | `E', `f', `g', and 'G', force a decimal
 *             |              | point to be added, even if no digits follow.
 *             |              | For `g' and 'G', do not remove trailing zeros.
 *    ---------+--------------+-----------------------------------------
 *    +        | bdeEfgGiouxX | Add a leading plus sign to positive numbers.
 *    ---------+--------------+-----------------------------------------
 *    -        | all          | Left-justify the result of this conversion.
 *    ---------+--------------+-----------------------------------------
 *    0 (zero) | bdeEfgGiouxX | Pad with zeros, not spaces.
 *    ---------+--------------+-----------------------------------------
 *    *        | all          | Use the next argument as the field width.
 *             |              | If negative, left-justify the result. If the
 *             |              | asterisk is followed by a number and a dollar
 *             |              | sign, use the indicated argument as the width.
 *
 *
 *  The field width is an optional integer, followed optionally by a
 *  period and a precision. The width specifies the minimum number of
 *  characters that will be written to the result for this field. For
 *  numeric fields, the precision controls the number of decimal places
 *  displayed. For string fields, the precision determines the maximum
 *  number of characters to be copied from the string. (Thus, the format
 *  sequence <code>%10.10s</code> will always contribute exactly ten
 *  characters to the result.)
 *
 *  The field types are:
 *
 *      Field |  Conversion
 *      ------+--------------------------------------------------------------
 *        b   | Convert argument as a binary number.
 *        c   | Argument is the numeric code for a single character.
 *        d   | Convert argument as a decimal number.
 *        E   | Equivalent to `e', but uses an uppercase E to indicate
 *            | the exponent.
 *        e   | Convert floating point argument into exponential notation
 *            | with one digit before the decimal point. The precision
 *            | determines the number of fractional digits (defaulting to six).
 *        f   | Convert floating point argument as [-]ddd.ddd,
 *            |  where the precision determines the number of digits after
 *            | the decimal point.
 *        G   | Equivalent to `g', but use an uppercase `E' in exponent form.
 *        g   | Convert a floating point number using exponential form
 *            | if the exponent is less than -4 or greater than or
 *            | equal to the precision, or in d.dddd form otherwise.
 *        i   | Identical to `d'.
 *        o   | Convert argument as an octal number.
 *        p   | The valuing of argument.inspect.
 *        s   | Argument is a string to be substituted. If the format
 *            | sequence contains a precision, at most that many characters
 *            | will be copied.
 *        u   | Treat argument as an unsigned decimal number.
 *        X   | Convert argument as a hexadecimal number using uppercase
 *            | letters. Negative numbers will be displayed with two
 *            | leading periods (representing an infinite string of
 *            | leading 'FF's.
 *        x   | Convert argument as a hexadecimal number.
 *            | Negative numbers will be displayed with two
 *            | leading periods (representing an infinite string of
 *            | leading 'ff's.
 *
 *  Examples:
 *
 *     sprintf("%d %04x", 123, 123)               #=> "123 007b"
 *     sprintf("%08b '%4s'", 123, 123)            #=> "01111011 ' 123'"
 *     sprintf("%1$*2$s %2$d %1$s", "hello", 8)   #=> "   hello 8 hello"
 *     sprintf("%1$*2$s %2$d", "hello", -8)       #=> "hello    -8"
 *     sprintf("%+g:% g:%-g", 1.23, 1.23, 1.23)   #=> "+1.23: 1.23:1.23"
 */

VALUE
rb_f_sprintf(int argc, const VALUE *argv)
{
    return rb_str_format(argc - 1, argv + 1, GETNTHARG(0));
}

VALUE
rb_str_format(int argc, const VALUE *argv, VALUE fmt)
{
    const char *p, *end;
    char *buf;
    int blen, bsiz;
    VALUE result;

    int width, prec, flags = FNONE;
    int nextarg = 1;
    int posarg = 0;
    int tainted = 0;
    VALUE nextvalue;
    VALUE tmp;
    VALUE str;

    ++argc;
    --argv;
    if (OBJ_TAINTED(fmt)) tainted = 1;
    StringValue(fmt);
    fmt = rb_str_new4(fmt);
    p = RSTRING(fmt)->ptr;
    end = p + RSTRING(fmt)->len;
    blen = 0;
    bsiz = 120;
    result = rb_str_buf_new(bsiz);
    buf = RSTRING(result)->ptr;

    for (; p < end; p++) {
        const char *t;
        int n;

        for (t = p; t < end && *t != '%'; t++) ;
        PUSH(p, t - p);
        if (t >= end) {
            /* end of fmt string */
            goto sprint_exit;
        }
        p = t + 1;              /* skip `%' */

        width = prec = -1;
        nextvalue = Qundef;
      retry:
        switch (*p) {
          default:
            if (ISPRINT(*p))
                rb_raise(rb_eArgError, "malformed format string - %%%c", *p);
            else
                rb_raise(rb_eArgError, "malformed format string");
            break;

          case ' ':
            flags |= FSPACE;
            p++;
            goto retry;

          case '#':
            flags |= FSHARP;
            p++;
            goto retry;

          case '+':
            flags |= FPLUS;
            p++;
            goto retry;

          case '-':
            flags |= FMINUS;
            p++;
            goto retry;

          case '0':
            flags |= FZERO;
            p++;
            goto retry;

          case '1': case '2': case '3': case '4':
          case '5': case '6': case '7': case '8': case '9':
            n = 0;
            for (; p < end && ISDIGIT(*p); p++) {
                int next_n = 10 * n + (*p - '0');
                if (next_n / 10 != n) {
                    rb_raise(rb_eArgError, "width too big");
                }
                n = next_n;
            }
            if (p >= end) {
                rb_raise(rb_eArgError, "malformed format string - %%[0-9]");
            }
            if (*p == '$') {
                if (nextvalue != Qundef) {
                    rb_raise(rb_eArgError, "value given twice - %d$", n);
                }
                nextvalue = GETPOSARG(n);
                p++;
                goto retry;
            }
            width = n;
            flags |= FWIDTH;
            goto retry;

          case '*':
            if (flags & FWIDTH) {
                rb_raise(rb_eArgError, "width given twice");
            }
            flags |= FWIDTH;
            GETASTER(width);
            if (width < 0) {
                flags |= FMINUS;
                width = -width;
            }
            p++;
            goto retry;

          case '.':
            if (flags & FPREC) {
                rb_raise(rb_eArgError, "precision given twice");
            }
            flags |= FPREC;

            prec = 0;
            p++;
            if (*p == '*') {
                GETASTER(prec);
                if (prec < 0) { /* ignore negative precision */
                    flags &= ~FPREC;
                }
                p++;
                goto retry;
            }

            for (; p < end && ISDIGIT(*p); p++) {
                prec = 10 * prec + (*p - '0');
            }
            if (p >= end) {
                rb_raise(rb_eArgError, "malformed format string - %%.[0-9]");
            }
            goto retry;

          case '\n':
            p--;
          case '\0':
          case '%':
            if (flags != FNONE) {
                rb_raise(rb_eArgError, "illegal format character - %%");
            }
            PUSH("%", 1);
            break;

          case 'c':
            {
                VALUE val = GETARG();
                char c;

                c = NUM2INT(val) & 0xff;
                if (!(flags & FWIDTH)) {
                    PUSH(&c, 1);
                }
                else {
                    FILL(' ', width);
                    buf[blen - ((flags & FMINUS) ? width : 1)] = c;
                }
            }
            break;

          case 's':
          case 'p':
            {
                VALUE arg = GETARG();
                long len;

                if (*p == 'p') arg = rb_inspect(arg);
                str = rb_obj_as_string(arg);
                if (OBJ_TAINTED(str)) tainted = 1;
                len = RSTRING(str)->len;
                if (flags&FPREC) {
                    if (prec < len) {
                        len = prec;
                    }
                }
                if (flags&FWIDTH) {
                    if (width > len) {
                        CHECK(width);
                        width -= len;
                        if (!(flags&FMINUS)) {
                            while (width--) {
                                buf[blen++] = ' ';
                            }
                        }
                        memcpy(&buf[blen], RSTRING(str)->ptr, len);
                        blen += len;
                        if (flags&FMINUS) {
                            while (width--) {
                                buf[blen++] = ' ';
                            }
                        }
                        break;
                    }
                }
                PUSH(RSTRING(str)->ptr, len);
            }
            break;

          case 'd':
          case 'i':
          case 'o':
          case 'x':
          case 'X':
          case 'b':
          case 'B':
          case 'u':
            {
                volatile VALUE val = GETARG();
                char fbuf[32], nbuf[64], *s, *t;
                char *prefix = 0;
                int sign = 0;
                char sc = 0;
                long v = 0;
                int base, bignum = 0;
                int len, pos;

                switch (*p) {
                  case 'd':
                  case 'i':
                    sign = 1; break;
                  case 'o':
                  case 'x':
                  case 'X':
                  case 'b':
                  case 'B':
                  case 'u':
                  default:
                    if (flags&(FPLUS|FSPACE)) sign = 1;
                    break;
                }
                if (flags & FSHARP) {
                    switch (*p) {
                      case 'o':
                        prefix = "0"; break;
                      case 'x':
                        prefix = "0x"; break;
                      case 'X':
                        prefix = "0X"; break;
                      case 'b':
                        prefix = "0b"; break;
                      case 'B':
                        prefix = "0B"; break;
                    }
                    if (prefix) {
                        width -= strlen(prefix);
                    }
                }

              bin_retry:
                switch (TYPE(val)) {
                  case T_FLOAT:
                    val = rb_dbl2big(RFLOAT(val)->value);
                    if (FIXNUM_P(val)) goto bin_retry;
                    bignum = 1;
                    break;
                  case T_STRING:
                    val = rb_str_to_inum(val, 0, Qtrue);
                    goto bin_retry;
                  case T_BIGNUM:
                    bignum = 1;
                    break;
                  case T_FIXNUM:
                    v = FIX2LONG(val);
                    break;
                  default:
                    val = rb_Integer(val);
                    goto bin_retry;
                }

                switch (*p) {
                  case 'o':
                    base = 8; break;
                  case 'x':
                  case 'X':
                    base = 16; break;
                  case 'b':
                  case 'B':
                    base = 2; break;
                  case 'u':
                  case 'd':
                  case 'i':
                  default:
                    base = 10; break;
                }

                if (!bignum) {
                    if (base == 2) {
                        val = rb_int2big(v);
                        goto bin_retry;
                    }
                    if (sign) {
                        char c = *p;
                        if (c == 'i') c = 'd'; /* %d and %i are identical */
                        if (v < 0) {
                            v = -v;
                            sc = '-';
                            width--;
                        }
                        else if (flags & FPLUS) {
                            sc = '+';
                            width--;
                        }
                        else if (flags & FSPACE) {
                            sc = ' ';
                            width--;
                        }
                        sprintf(fbuf, "%%l%c", c);
                        sprintf(nbuf, fbuf, v);
                    }
                    else {
                        s = nbuf;
                        if (v < 0) {
                            if (base == 10) {
                                rb_warning("negative number for %%u specifier");
                            }
                            else if (!(flags&(FPREC|FZERO))) {
                                strcpy(s, "..");
                                s += 2;
                            }
                        }
                        sprintf(fbuf, "%%l%c", *p == 'X' ? 'x' : *p);
                        sprintf(s, fbuf, v);
                        if (v < 0) {
                            char d = 0;

                            remove_sign_bits(s, base);
                            switch (base) {
                              case 16:
                                d = 'f'; break;
                              case 8:
                                d = '7'; break;
                            }
                            if (d && *s != d) {
                                memmove(s+1, s, strlen(s)+1);
                                *s = d;
                            }
                        }
                    }
                    s = nbuf;
                }
                else {
                    if (sign) {
                        tmp = rb_big2str(val, base);
                        s = RSTRING(tmp)->ptr;
                        if (s[0] == '-') {
                            s++;
                            sc = '-';
                            width--;
                        }
                        else if (flags & FPLUS) {
                            sc = '+';
                            width--;
                        }
                        else if (flags & FSPACE) {
                            sc = ' ';
                            width--;
                        }
                    }
                    else {
                        volatile VALUE tmp1;
                        if (!RBIGNUM(val)->sign) {
                            val = rb_big_clone(val);
                            rb_big_2comp(val);
                        }
                        tmp1 = tmp = rb_big2str(val, base);
                        s = RSTRING(tmp)->ptr;
                        if (*s == '-') {
                            if (base == 10) {
                                rb_warning("negative number for %%u specifier");
                            }
                            else {
                                remove_sign_bits(++s, base);
                                tmp = rb_str_new(0, 3+strlen(s));
                                t = RSTRING(tmp)->ptr;
                                if (!(flags&(FPREC|FZERO))) {
                                    strcpy(t, "..");
                                    t += 2;
                                }
                                switch (base) {
                                  case 16:
                                    if (s[0] != 'f') strcpy(t++, "f"); break;
                                  case 8:
                                    if (s[0] != '7') strcpy(t++, "7"); break;
                                  case 2:
                                    if (s[0] != '1') strcpy(t++, "1"); break;
                                }
                                strcpy(t, s);
                                s  = RSTRING(tmp)->ptr;
                            }
                        }
                    }
                }

                pos = -1;
                len = strlen(s);

                if (*p == 'X') {
                    char *pp = s;
                    while (*pp) {
                        *pp = toupper(*pp);
                        pp++;
                    }
                }
                if ((flags&(FZERO|FPREC)) == FZERO) {
                    prec = width;
                    width = 0;
                }
                else {
                    if (prec < len) prec = len;
                    width -= prec;
                }
                if (!(flags&FMINUS)) {
                    CHECK(width);
                    while (width-- > 0) {
                        buf[blen++] = ' ';
                    }
                }
                if (sc) PUSH(&sc, 1);
                if (prefix) {
                    int plen = strlen(prefix);
                    PUSH(prefix, plen);
                }
                CHECK(prec - len);
                if (!bignum && v < 0) {
                    char c = sign_bits(base, p);
                    while (len < prec--) {
                        buf[blen++] = c;
                    }
                }
                else {
                    char c;

                    if (!sign && bignum && !RBIGNUM(val)->sign)
                        c = sign_bits(base, p);
                    else
                        c = '0';
                    while (len < prec--) {
                        buf[blen++] = c;
                    }
                }
                PUSH(s, len);
                CHECK(width);
                while (width-- > 0) {
                    buf[blen++] = ' ';
                }
            }
            break;

          case 'f':
          case 'g':
          case 'G':
          case 'e':
          case 'E':
            {
                VALUE val = GETARG();
                double fval;
                int i, need = 6;
                char fbuf[32];

                fval = RFLOAT(rb_Float(val))->value;
                if (isnan(fval) || isinf(fval)) {
                    char *expr;

                    if  (isnan(fval)) {
                        expr = "NaN";
                    }
                    else {
                        expr = "Inf";
                    }
                    need = strlen(expr);
                    if ((!isnan(fval) && fval < 0.0) || (flags & FPLUS))
                        need++;
                    if ((flags & FWIDTH) && need < width)
                        need = width;

                    CHECK(need);
                    sprintf(&buf[blen], "%*s", need, "");
                    if (flags & FMINUS) {
                        if (!isnan(fval) && fval < 0.0)
                            buf[blen++] = '-';
                        else if (flags & FPLUS)
                            buf[blen++] = '+';
                        else if (flags & FSPACE)
                            blen++;
                        strncpy(&buf[blen], expr, strlen(expr));
                    }
                    else if (flags & FZERO) {
                        if (!isnan(fval) && fval < 0.0) {
                            buf[blen++] = '-';
                            need--;
                        }
                        else if (flags & FPLUS) {
                            buf[blen++] = '+';
                            need--;
                        }
                        else if (flags & FSPACE) {
                            blen++;
                            need--;
                        }
                        while (need-- - strlen(expr) > 0) {
                            buf[blen++] = '0';
                        }
                        strncpy(&buf[blen], expr, strlen(expr));
                    }
                    else {
                        if (!isnan(fval) && fval < 0.0)
                            buf[blen + need - strlen(expr) - 1] = '-';
                        else if (flags & FPLUS)
                            buf[blen + need - strlen(expr) - 1] = '+';
                        strncpy(&buf[blen + need - strlen(expr)], expr,
                                strlen(expr));
                    }
                    blen += strlen(&buf[blen]);
                    break;
                }

                fmt_setup(fbuf, *p, flags, width, prec);
                need = 0;
                if (*p != 'e' && *p != 'E') {
                    i = INT_MIN;
                    frexp(fval, &i);
                    if (i > 0)
                        need = BIT_DIGITS(i);
                }
                need += (flags&FPREC) ? prec : 6;
                if ((flags&FWIDTH) && need < width)
                    need = width;
                need += 20;

                CHECK(need);
                sprintf(&buf[blen], fbuf, fval);
                blen += strlen(&buf[blen]);
            }
            break;
        }
        flags = FNONE;
    }

  sprint_exit:
    /* XXX - We cannot validiate the number of arguments if (digit)$ style used.
     */
    if (posarg >= 0 && nextarg < argc) {
        const char *mesg = "too many arguments for format string";
        if (RTEST(ruby_debug)) rb_raise(rb_eArgError, mesg);
        if (RTEST(ruby_verbose)) rb_warn(mesg);
    }
    rb_str_resize(result, blen);

    if (tainted) OBJ_TAINT(result);
    return result;
}

static void
fmt_setup(char *buf, int c, int flags, int width, int prec)
{
    *buf++ = '%';
    if (flags & FSHARP) *buf++ = '#';
    if (flags & FPLUS)  *buf++ = '+';
    if (flags & FMINUS) *buf++ = '-';
    if (flags & FZERO)  *buf++ = '0';
    if (flags & FSPACE) *buf++ = ' ';

    if (flags & FWIDTH) {
        sprintf(buf, "%d", width);
        buf += strlen(buf);
    }

    if (flags & FPREC) {
        sprintf(buf, ".%d", prec);
        buf += strlen(buf);
    }

    *buf++ = c;
    *buf = '\0';
}

#undef FILE
#define FILE rb_printf_buffer
#define __sbuf rb_printf_sbuf
#define __sFILE rb_printf_sfile
#undef feof
#undef ferror
#undef clearerr
#undef fileno
#if SIZEOF_LONG < SIZEOF_VOIDP
# if  SIZEOF_LONG_LONG == SIZEOF_VOIDP
#  define _HAVE_SANE_QUAD_
#  define _HAVE_LLP64_
#  define quad_t LONG_LONG
#  define u_quad_t unsigned LONG_LONG
# endif
#endif
#undef vsnprintf
#undef snprintf
#include "missing/vsnprintf.c"

static int
ruby__sfvwrite(register rb_printf_buffer *fp, register struct __suio *uio)
{
    struct __siov *iov;
    VALUE result = (VALUE)fp->_bf._base;
    char *buf = (char*)fp->_p;
    size_t len, n;
    int blen = buf - RSTRING(result)->ptr, bsiz = fp->_w;

    if (RBASIC(result)->klass) {
        rb_raise(rb_eRuntimeError, "rb_vsprintf reentered");
    }
    if ((len = uio->uio_resid) == 0)
        return 0;
    CHECK(len);
    buf += blen;
    fp->_w = bsiz;
    for (iov = uio->uio_iov; len > 0; ++iov) {
        MEMCPY(buf, iov->iov_base, char, n = iov->iov_len);
        buf += n;
        len -= n;
    }
    fp->_p = (unsigned char *)buf;
    return 0;
}

VALUE
rb_vsprintf(const char *fmt, va_list ap)
{
    rb_printf_buffer f;
    VALUE result;

    f._flags = __SWR | __SSTR;
    f._bf._size = 0;
    f._w = 120;
    result = rb_str_buf_new(f._w);
    f._bf._base = (unsigned char *)result;
    f._p = (unsigned char *)RSTRING(result)->ptr;
    RBASIC(result)->klass = 0;
    f.vwrite = ruby__sfvwrite;
    BSD_vfprintf(&f, fmt, ap);
    RBASIC(result)->klass = rb_cString;
    rb_str_resize(result, (char *)f._p - RSTRING(result)->ptr);

    return result;
}

VALUE
rb_sprintf(const char *format, ...)
{
    VALUE result;
    va_list ap;

    va_start(ap, format);
    result = rb_vsprintf(format, ap);
    va_end(ap);

    return result;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


st.c

root/st.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. new_size
  2. stat_col
  3. st_init_table_with_size
  4. st_init_table
  5. st_init_numtable
  6. st_init_numtable_with_size
  7. st_init_strtable
  8. st_init_strtable_with_size
  9. st_free_table
  10. st_lookup
  11. st_insert
  12. st_add_direct
  13. rehash
  14. st_copy
  15. st_delete
  16. st_delete_safe
  17. delete_never
  18. st_cleanup_safe
  19. st_foreach
  20. strhash
  21. numcmp
  22. numhash
/* This is a public domain general purpose hash table package written by Peter Moore @ UCB. */

/* static       char    sccsid[] = "@(#) st.c 5.1 89/12/14 Crucible"; */

#include "config.h"
#include <stdio.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <string.h>

#ifdef NOT_RUBY
#include "regint.h"
#endif

#include "st.h"

typedef struct st_table_entry st_table_entry;

struct st_table_entry {
    unsigned int hash;
    st_data_t key;
    st_data_t record;
    st_table_entry *next;
};

#define ST_DEFAULT_MAX_DENSITY 5
#define ST_DEFAULT_INIT_TABLE_SIZE 11

    /*
     * DEFAULT_MAX_DENSITY is the default for the largest we allow the
     * average number of items per bin before increasing the number of
     * bins
     *
     * DEFAULT_INIT_TABLE_SIZE is the default for the number of bins
     * allocated initially
     *
     */

static int numcmp(long, long);
static int numhash(long);
static struct st_hash_type type_numhash = {
    numcmp,
    numhash,
};

/* extern int strcmp(const char *, const char *); */
static int strhash(const char *);
static struct st_hash_type type_strhash = {
    strcmp,
    strhash,
};

static void rehash(st_table *);

#define alloc(type) (type*)malloc((size_t)sizeof(type))
#define Calloc(n,s) (char*)calloc((n),(s))

#define EQUAL(table,x,y) ((x)==(y) || (*table->type->compare)((x),(y)) == 0)

#define do_hash(key,table) (unsigned int)(*(table)->type->hash)((key))
#define do_hash_bin(key,table) (do_hash(key, table)%(table)->num_bins)

/*
 * MINSIZE is the minimum size of a dictionary.
 */

#define MINSIZE 8

/*
Table of prime numbers 2^n+a, 2<=n<=30.
*/
static long primes[] = {
        8 + 3,
        16 + 3,
        32 + 5,
        64 + 3,
        128 + 3,
        256 + 27,
        512 + 9,
        1024 + 9,
        2048 + 5,
        4096 + 3,
        8192 + 27,
        16384 + 43,
        32768 + 3,
        65536 + 45,
        131072 + 29,
        262144 + 3,
        524288 + 21,
        1048576 + 7,
        2097152 + 17,
        4194304 + 15,
        8388608 + 9,
        16777216 + 43,
        33554432 + 35,
        67108864 + 15,
        134217728 + 29,
        268435456 + 3,
        536870912 + 11,
        1073741824 + 85,
        0
};

static int
new_size(int size)
{
    int i;

#if 0
    for (i=3; i<31; i++) {
        if ((1<<i) > size) return 1<<i;
    }
    return -1;
#else
    int newsize;

    for (i = 0, newsize = MINSIZE;
         i < (int )(sizeof(primes)/sizeof(primes[0]));
         i++, newsize <<= 1)
    {
        if (newsize > size) return primes[i];
    }
    /* Ran out of polynomials */
    return -1;                  /* should raise exception */
#endif
}

#ifdef HASH_LOG
static int collision = 0;
static int init_st = 0;

static void
stat_col()
{
    FILE *f = fopen("/tmp/col", "w");
    fprintf(f, "collision: %d\n", collision);
    fclose(f);
}
#endif

st_table*
st_init_table_with_size(struct st_hash_type *type, int size)
{
    st_table *tbl;

#ifdef HASH_LOG
    if (init_st == 0) {
        init_st = 1;
        atexit(stat_col);
    }
#endif

    size = new_size(size);      /* round up to prime number */

    tbl = alloc(st_table);
    tbl->type = type;
    tbl->num_entries = 0;
    tbl->num_bins = size;
    tbl->bins = (st_table_entry **)Calloc(size, sizeof(st_table_entry*));

    return tbl;
}

st_table*
st_init_table(struct st_hash_type *type)
{
    return st_init_table_with_size(type, 0);
}

st_table*
st_init_numtable(void)
{
    return st_init_table(&type_numhash);
}

st_table*
st_init_numtable_with_size(int size)
{
    return st_init_table_with_size(&type_numhash, size);
}

st_table*
st_init_strtable(void)
{
    return st_init_table(&type_strhash);
}

st_table*
st_init_strtable_with_size(int size)
{
    return st_init_table_with_size(&type_strhash, size);
}

void
st_free_table(st_table *table)
{
    register st_table_entry *ptr, *next;
    int i;

    for(i = 0; i < table->num_bins; i++) {
        ptr = table->bins[i];
        while (ptr != 0) {
            next = ptr->next;
            free(ptr);
            ptr = next;
        }
    }
    free(table->bins);
    free(table);
}

#define PTR_NOT_EQUAL(table, ptr, hash_val, key) \
((ptr) != 0 && (ptr->hash != (hash_val) || !EQUAL((table), (key), (ptr)->key)))

#ifdef HASH_LOG
#define COLLISION collision++
#else
#define COLLISION
#endif

#define FIND_ENTRY(table, ptr, hash_val, bin_pos) do {\
    bin_pos = hash_val%(table)->num_bins;\
    ptr = (table)->bins[bin_pos];\
    if (PTR_NOT_EQUAL(table, ptr, hash_val, key)) {\
        COLLISION;\
        while (PTR_NOT_EQUAL(table, ptr->next, hash_val, key)) {\
            ptr = ptr->next;\
        }\
        ptr = ptr->next;\
    }\
} while (0)

int
st_lookup(st_table *table, register st_data_t key, st_data_t *value)
{
    unsigned int hash_val, bin_pos;
    register st_table_entry *ptr;

    hash_val = do_hash(key, table);
    FIND_ENTRY(table, ptr, hash_val, bin_pos);

    if (ptr == 0) {
        return 0;
    }
    else {
        if (value != 0)  *value = ptr->record;
        return 1;
    }
}

#define ADD_DIRECT(table, key, value, hash_val, bin_pos)\
do {\
    st_table_entry *entry;\
    if (table->num_entries/(table->num_bins) > ST_DEFAULT_MAX_DENSITY) {\
        rehash(table);\
        bin_pos = hash_val % table->num_bins;\
    }\
    \
    entry = alloc(st_table_entry);\
    \
    entry->hash = hash_val;\
    entry->key = key;\
    entry->record = value;\
    entry->next = table->bins[bin_pos];\
    table->bins[bin_pos] = entry;\
    table->num_entries++;\
} while (0)

int
st_insert(register st_table *table, register st_data_t key, st_data_t value)
{
    unsigned int hash_val, bin_pos;
    register st_table_entry *ptr;

    hash_val = do_hash(key, table);
    FIND_ENTRY(table, ptr, hash_val, bin_pos);

    if (ptr == 0) {
        ADD_DIRECT(table, key, value, hash_val, bin_pos);
        return 0;
    }
    else {
        ptr->record = value;
        return 1;
    }
}

void
st_add_direct(st_table *table, st_data_t key, st_data_t value)
{
    unsigned int hash_val, bin_pos;

    hash_val = do_hash(key, table);
    bin_pos = hash_val % table->num_bins;
    ADD_DIRECT(table, key, value, hash_val, bin_pos);
}

static void
rehash(register st_table *table)
{
    register st_table_entry *ptr, *next, **new_bins;
    int i, old_num_bins = table->num_bins, new_num_bins;
    unsigned int hash_val;

    new_num_bins = new_size(old_num_bins+1);
    new_bins = (st_table_entry**)Calloc(new_num_bins, sizeof(st_table_entry*));

    for(i = 0; i < old_num_bins; i++) {
        ptr = table->bins[i];
        while (ptr != 0) {
            next = ptr->next;
            hash_val = ptr->hash % new_num_bins;
            ptr->next = new_bins[hash_val];
            new_bins[hash_val] = ptr;
            ptr = next;
        }
    }
    free(table->bins);
    table->num_bins = new_num_bins;
    table->bins = new_bins;
}

st_table*
st_copy(st_table *old_table)
{
    st_table *new_table;
    st_table_entry *ptr, *entry;
    int i, num_bins = old_table->num_bins;

    new_table = alloc(st_table);
    if (new_table == 0) {
        return 0;
    }

    *new_table = *old_table;
    new_table->bins = (st_table_entry**)
        Calloc((unsigned)num_bins, sizeof(st_table_entry*));

    if (new_table->bins == 0) {
        free(new_table);
        return 0;
    }

    for(i = 0; i < num_bins; i++) {
        new_table->bins[i] = 0;
        ptr = old_table->bins[i];
        while (ptr != 0) {
            entry = alloc(st_table_entry);
            if (entry == 0) {
                free(new_table->bins);
                free(new_table);
                return 0;
            }
            *entry = *ptr;
            entry->next = new_table->bins[i];
            new_table->bins[i] = entry;
            ptr = ptr->next;
        }
    }
    return new_table;
}

int
st_delete(register st_table *table, register st_data_t *key, st_data_t *value)
{
    unsigned int hash_val;
    st_table_entry *tmp;
    register st_table_entry *ptr;

    hash_val = do_hash_bin(*key, table);
    ptr = table->bins[hash_val];

    if (ptr == 0) {
        if (value != 0) *value = 0;
        return 0;
    }

    if (EQUAL(table, *key, ptr->key)) {
        table->bins[hash_val] = ptr->next;
        table->num_entries--;
        if (value != 0) *value = ptr->record;
        *key = ptr->key;
        free(ptr);
        return 1;
    }

    for(; ptr->next != 0; ptr = ptr->next) {
        if (EQUAL(table, ptr->next->key, *key)) {
            tmp = ptr->next;
            ptr->next = ptr->next->next;
            table->num_entries--;
            if (value != 0) *value = tmp->record;
            *key = tmp->key;
            free(tmp);
            return 1;
        }
    }

    return 0;
}

int
st_delete_safe(register st_table *table, register st_data_t *key, st_data_t *value, st_data_t never)
{
    unsigned int hash_val;
    register st_table_entry *ptr;

    hash_val = do_hash_bin(*key, table);
    ptr = table->bins[hash_val];

    if (ptr == 0) {
        if (value != 0) *value = 0;
        return 0;
    }

    for(; ptr != 0; ptr = ptr->next) {
        if ((ptr->key != never) && EQUAL(table, ptr->key, *key)) {
            table->num_entries--;
            *key = ptr->key;
            if (value != 0) *value = ptr->record;
            ptr->key = ptr->record = never;
            return 1;
        }
    }

    return 0;
}

static int
delete_never(st_data_t key, st_data_t value, st_data_t never)
{
    if (value == never) return ST_DELETE;
    return ST_CONTINUE;
}

void
st_cleanup_safe(st_table *table, st_data_t never)
{
    int num_entries = table->num_entries;

    st_foreach(table, delete_never, never);
    table->num_entries = num_entries;
}

int
st_foreach(st_table *table, int (*func)(ANYARGS), st_data_t arg)
{
    st_table_entry *ptr, *last, *tmp;
    enum st_retval retval;
    int i;

    for(i = 0; i < table->num_bins; i++) {
        last = 0;
        for(ptr = table->bins[i]; ptr != 0;) {
            retval = (*func)(ptr->key, ptr->record, arg);
            switch (retval) {
            case ST_CHECK:      /* check if hash is modified during iteration */
                tmp = 0;
                if (i < table->num_bins) {
                    for (tmp = table->bins[i]; tmp; tmp=tmp->next) {
                        if (tmp == ptr) break;
                    }
                }
                if (!tmp) {
                    /* call func with error notice */
                    return 1;
                }
                /* fall through */
            case ST_CONTINUE:
                last = ptr;
                ptr = ptr->next;
                break;
            case ST_STOP:
                return 0;
            case ST_DELETE:
                tmp = ptr;
                if (last == 0) {
                    table->bins[i] = ptr->next;
                }
                else {
                    last->next = ptr->next;
                }
                ptr = ptr->next;
                free(tmp);
                table->num_entries--;
            }
        }
    }
    return 0;
}

static int
strhash(register const char *string)
{
    register int c;

#ifdef HASH_ELFHASH
    register unsigned int h = 0, g;

    while ((c = *string++) != '\0') {
        h = ( h << 4 ) + c;
        if ( g = h & 0xF0000000 )
            h ^= g >> 24;
        h &= ~g;
    }
    return h;
#elif HASH_PERL
    register int val = 0;

    while ((c = *string++) != '\0') {
        val += c;
        val += (val << 10);
        val ^= (val >> 6);
    }
    val += (val << 3);
    val ^= (val >> 11);

    return val + (val << 15);
#else
    register int val = 0;

    while ((c = *string++) != '\0') {
        val = val*997 + c;
    }

    return val + (val>>5);
#endif
}

static int
numcmp(long x, long y)
{
    return x != y;
}

static int
numhash(long n)
{
    return n;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


st.h

root/st.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/* This is a public domain general purpose hash table package written by Peter Moore @ UCB. */

/* @(#) st.h 5.1 89/12/14 */

#ifndef ST_INCLUDED

#define ST_INCLUDED

typedef unsigned long st_data_t;
#define ST_DATA_T_DEFINED

typedef struct st_table st_table;

struct st_hash_type {
    int (*compare)();
    int (*hash)();
};

struct st_table {
    struct st_hash_type *type;
    int num_bins;
    int num_entries;
    struct st_table_entry **bins;
};

#define st_is_member(table,key) st_lookup(table,key,(st_data_t *)0)

enum st_retval {ST_CONTINUE, ST_STOP, ST_DELETE, ST_CHECK};

#ifndef _
# define _(args) args
#endif
#ifndef ANYARGS
# ifdef __cplusplus
#   define ANYARGS ...
# else
#   define ANYARGS
# endif
#endif

st_table *st_init_table(struct st_hash_type *);
st_table *st_init_table_with_size(struct st_hash_type *, int);
st_table *st_init_numtable(void);
st_table *st_init_numtable_with_size(int);
st_table *st_init_strtable(void);
st_table *st_init_strtable_with_size(int);
int st_delete(st_table *, st_data_t *, st_data_t *);
int st_delete_safe(st_table *, st_data_t *, st_data_t *, st_data_t);
int st_insert(st_table *, st_data_t, st_data_t);
int st_lookup(st_table *, st_data_t, st_data_t *);
int st_foreach(st_table *, int (*)(ANYARGS), st_data_t);
void st_add_direct(st_table *, st_data_t, st_data_t);
void st_free_table(st_table *);
void st_cleanup_safe(st_table *, st_data_t);
st_table *st_copy(st_table *);

#define ST_NUMCMP       ((int (*)()) 0)
#define ST_NUMHASH      ((int (*)()) -2)

#define st_numcmp       ST_NUMCMP
#define st_numhash      ST_NUMHASH

#endif /* ST_INCLUDED */
/* [<][>][^][v][top][bottom][index] [help] */


string.c

root/string.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. str_mod_check
  2. str_frozen_check
  3. str_alloc
  4. str_new
  5. rb_str_new
  6. rb_str_new2
  7. rb_tainted_str_new
  8. rb_tainted_str_new2
  9. str_new3
  10. rb_str_new3
  11. str_new4
  12. rb_str_new4
  13. rb_str_new5
  14. rb_str_buf_new
  15. rb_str_buf_new2
  16. rb_str_to_str
  17. rb_str_shared_replace
  18. rb_obj_as_string
  19. rb_str_dup
  20. rb_str_init
  21. rb_str_length
  22. rb_str_empty
  23. rb_str_plus
  24. rb_str_times
  25. rb_str_format_m
  26. str_independent
  27. str_make_independent
  28. rb_str_modify
  29. rb_str_associate
  30. rb_str_associated
  31. rb_string_value
  32. rb_string_value_ptr
  33. rb_string_value_cstr
  34. rb_check_string_type
  35. rb_str_substr
  36. rb_str_freeze
  37. rb_str_dup_frozen
  38. rb_str_locktmp
  39. rb_str_unlocktmp
  40. rb_str_resize
  41. rb_str_buf_cat
  42. rb_str_buf_cat2
  43. rb_str_cat
  44. rb_str_cat2
  45. rb_str_buf_append
  46. rb_str_append
  47. rb_str_concat
  48. rb_str_hash
  49. rb_str_hash_m
  50. rb_str_cmp
  51. rb_str_equal
  52. rb_str_eql
  53. rb_str_cmp_m
  54. rb_str_casecmp
  55. rb_str_index
  56. rb_str_index_m
  57. rb_str_rindex
  58. rb_str_rindex_m
  59. rb_str_match
  60. rb_str_match_m
  61. succ_char
  62. rb_str_succ
  63. rb_str_succ_bang
  64. rb_str_upto
  65. rb_str_upto_m
  66. rb_str_subpat
  67. rb_str_aref
  68. rb_str_aref_m
  69. rb_str_splice
  70. rb_str_update
  71. rb_str_subpat_set
  72. rb_str_aset
  73. rb_str_aset_m
  74. rb_str_insert
  75. rb_str_slice_bang
  76. get_pat
  77. rb_str_sub_bang
  78. rb_str_sub
  79. str_gsub
  80. rb_str_gsub_bang
  81. rb_str_gsub
  82. rb_str_replace
  83. rb_str_clear
  84. rb_str_reverse_bang
  85. rb_str_reverse
  86. rb_str_include
  87. rb_str_to_i
  88. rb_str_to_f
  89. rb_str_to_s
  90. rb_str_inspect
  91. rb_str_dump
  92. rb_str_upcase_bang
  93. rb_str_upcase
  94. rb_str_downcase_bang
  95. rb_str_downcase
  96. rb_str_capitalize_bang
  97. rb_str_capitalize
  98. rb_str_swapcase_bang
  99. rb_str_swapcase
  100. trnext
  101. tr_trans
  102. rb_str_tr_bang
  103. rb_str_tr
  104. tr_setup_table
  105. rb_str_delete_bang
  106. rb_str_delete
  107. rb_str_squeeze_bang
  108. rb_str_squeeze
  109. rb_str_tr_s_bang
  110. rb_str_tr_s
  111. rb_str_count
  112. rb_str_split_m
  113. rb_str_split
  114. rb_str_each_line
  115. rb_str_each_byte
  116. rb_str_chop_bang
  117. rb_str_chop
  118. rb_str_chomp_bang
  119. rb_str_chomp
  120. rb_str_lstrip_bang
  121. rb_str_lstrip
  122. rb_str_rstrip_bang
  123. rb_str_rstrip
  124. rb_str_strip_bang
  125. rb_str_strip
  126. scan_once
  127. rb_str_scan
  128. rb_str_hex
  129. rb_str_oct
  130. rb_str_crypt
  131. rb_str_intern
  132. rb_str_sum
  133. rb_str_justify
  134. rb_str_ljust
  135. rb_str_rjust
  136. rb_str_center
  137. rb_str_setter
  138. Init_String
/**********************************************************************

  string.c -

  $Author: akr $
  $Date: 2005/12/29 17:03:27 $
  created at: Mon Aug  9 17:12:58 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto
  Copyright (C) 2000  Network Applied Communication Laboratory, Inc.
  Copyright (C) 2000  Information-technology Promotion Agency, Japan

**********************************************************************/

#include "ruby.h"
#include "re.h"

#define BEG(no) regs->beg[no]
#define END(no) regs->end[no]

#include <math.h>
#include <ctype.h>

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

VALUE rb_cString;

#define STR_TMPLOCK FL_USER1
#define STR_ASSOC   FL_USER3
#define STR_NOCAPA  (ELTS_SHARED|STR_ASSOC)

#define RESIZE_CAPA(str,capacity) do {\
    REALLOC_N(RSTRING(str)->ptr, char, (capacity)+1);\
    if (!FL_TEST(str, STR_NOCAPA))\
        RSTRING(str)->aux.capa = (capacity);\
} while (0)

VALUE rb_fs;

static inline void
str_mod_check(VALUE s, char *p, long len)
{
    if (RSTRING(s)->ptr != p || RSTRING(s)->len != len){
        rb_raise(rb_eRuntimeError, "string modified");
    }
}

static inline void
str_frozen_check(VALUE s)
{
    if (OBJ_FROZEN(s)) {
        rb_raise(rb_eRuntimeError, "string frozen");
    }
}

static VALUE
str_alloc(VALUE klass)
{
    NEWOBJ(str, struct RString);
    OBJSETUP(str, klass, T_STRING);

    str->ptr = 0;
    str->len = 0;
    str->aux.capa = 0;

    return (VALUE)str;
}

static VALUE
str_new(VALUE klass, const char *ptr, long len)
{
    VALUE str;

    if (len < 0) {
        rb_raise(rb_eArgError, "negative string size (or size too big)");
    }

    str = str_alloc(klass);
    RSTRING(str)->len = len;
    RSTRING(str)->aux.capa = len;
    RSTRING(str)->ptr = ALLOC_N(char,len+1);
    if (ptr) {
        memcpy(RSTRING(str)->ptr, ptr, len);
    }
    RSTRING(str)->ptr[len] = '\0';
    return str;
}

VALUE
rb_str_new(const char *ptr, long len)
{
    return str_new(rb_cString, ptr, len);
}

VALUE
rb_str_new2(const char *ptr)
{
    if (!ptr) {
        rb_raise(rb_eArgError, "NULL pointer given");
    }
    return rb_str_new(ptr, strlen(ptr));
}

VALUE
rb_tainted_str_new(const char *ptr, long len)
{
    VALUE str = rb_str_new(ptr, len);

    OBJ_TAINT(str);
    return str;
}

VALUE
rb_tainted_str_new2(const char *ptr)
{
    VALUE str = rb_str_new2(ptr);

    OBJ_TAINT(str);
    return str;
}

static VALUE
str_new3(VALUE klass, VALUE str)
{
    VALUE str2 = str_alloc(klass);

    RSTRING(str2)->len = RSTRING(str)->len;
    RSTRING(str2)->ptr = RSTRING(str)->ptr;
    RSTRING(str2)->aux.shared = str;
    FL_SET(str2, ELTS_SHARED);
    OBJ_INFECT(str2, str);

    return str2;
}

VALUE
rb_str_new3(VALUE str)
{
    return str_new3(rb_obj_class(str), str);
}

static VALUE
str_new4(VALUE klass, VALUE str)
{
    VALUE str2 = str_alloc(klass);

    RSTRING(str2)->len = RSTRING(str)->len;
    RSTRING(str2)->ptr = RSTRING(str)->ptr;
    if (FL_TEST(str, ELTS_SHARED)) {
        FL_SET(str2, ELTS_SHARED);
        RSTRING(str2)->aux.shared = RSTRING(str)->aux.shared;
    }
    else {
        FL_SET(str, ELTS_SHARED);
        RSTRING(str)->aux.shared = str2;
    }

    return str2;
}

VALUE
rb_str_new4(VALUE orig)
{
    VALUE klass, str;

    if (OBJ_FROZEN(orig)) return orig;
    klass = rb_obj_class(orig);
    if (FL_TEST(orig, ELTS_SHARED) && (str = RSTRING(orig)->aux.shared) && klass == RBASIC(str)->klass) {
        long ofs;
        ofs = RSTRING(str)->len - RSTRING(orig)->len;
        if (ofs > 0) {
            str = str_new3(klass, str);
            RSTRING(str)->ptr += ofs;
            RSTRING(str)->len -= ofs;
        }
    }
    else if (FL_TEST(orig, STR_ASSOC)) {
        str = str_new(klass, RSTRING(orig)->ptr, RSTRING(orig)->len);
    }
    else {
        str = str_new4(klass, orig);
    }
    OBJ_INFECT(str, orig);
    OBJ_FREEZE(str);
    return str;
}

VALUE
rb_str_new5(VALUE obj, const char *ptr, long len)
{
    return str_new(rb_obj_class(obj), ptr, len);
}

#define STR_BUF_MIN_SIZE 128

VALUE
rb_str_buf_new(long capa)
{
    VALUE str = str_alloc(rb_cString);

    if (capa < STR_BUF_MIN_SIZE) {
        capa = STR_BUF_MIN_SIZE;
    }
    RSTRING(str)->ptr = 0;
    RSTRING(str)->len = 0;
    RSTRING(str)->aux.capa = capa;
    RSTRING(str)->ptr = ALLOC_N(char, capa+1);
    RSTRING(str)->ptr[0] = '\0';

    return str;
}

VALUE
rb_str_buf_new2(const char *ptr)
{
    VALUE str;
    long len = strlen(ptr);

    str = rb_str_buf_new(len);
    rb_str_buf_cat(str, ptr, len);

    return str;
}

VALUE
rb_str_to_str(VALUE str)
{
    return rb_convert_type(str, T_STRING, "String", "to_str");
}

static void
rb_str_shared_replace(VALUE str, VALUE str2)
{
    if (str == str2) return;
    rb_str_modify(str);
    if (!FL_TEST(str, ELTS_SHARED)) free(RSTRING(str)->ptr);
    RSTRING(str)->ptr = RSTRING(str2)->ptr;
    RSTRING(str)->len = RSTRING(str2)->len;
    FL_UNSET(str, STR_NOCAPA);
    if (FL_TEST(str2, STR_NOCAPA)) {
        FL_SET(str, RBASIC(str2)->flags & STR_NOCAPA);
        RSTRING(str)->aux.shared = RSTRING(str2)->aux.shared;
    }
    else {
        RSTRING(str)->aux.capa = RSTRING(str2)->aux.capa;
    }
    RSTRING(str2)->ptr = 0;     /* abandon str2 */
    RSTRING(str2)->len = 0;
    RSTRING(str2)->aux.capa = 0;
    FL_UNSET(str2, STR_NOCAPA);
    if (OBJ_TAINTED(str2)) OBJ_TAINT(str);
}

static ID id_to_s;

VALUE
rb_obj_as_string(VALUE obj)
{
    VALUE str;

    if (TYPE(obj) == T_STRING) {
        return obj;
    }
    str = rb_funcall(obj, id_to_s, 0);
    if (TYPE(str) != T_STRING)
        return rb_any_to_s(obj);
    if (OBJ_TAINTED(obj)) OBJ_TAINT(str);
    return str;
}

static VALUE rb_str_replace(VALUE, VALUE);

VALUE
rb_str_dup(VALUE str)
{
    VALUE dup = str_alloc(rb_obj_class(str));
    rb_str_replace(dup, str);
    return dup;
}

/*
 *  call-seq:
 *     String.new(str="")   => new_str
 *
 *  Returns a new string object containing a copy of <i>str</i>.
 */

static VALUE
rb_str_init(int argc, VALUE *argv, VALUE str)
{
    VALUE orig;

    if (rb_scan_args(argc, argv, "01", &orig) == 1)
        rb_str_replace(str, orig);
    return str;
}

/*
 *  call-seq:
 *     str.length   => integer
 *
 *  Returns the length of <i>str</i>.
 */

static VALUE
rb_str_length(VALUE str)
{
    return LONG2NUM(RSTRING(str)->len);
}

/*
 *  call-seq:
 *     str.empty?   => true or false
 *
 *  Returns <code>true</code> if <i>str</i> has a length of zero.
 *
 *     "hello".empty?   #=> false
 *     "".empty?        #=> true
 */

static VALUE
rb_str_empty(VALUE str)
{
    if (RSTRING(str)->len == 0)
        return Qtrue;
    return Qfalse;
}

/*
 *  call-seq:
 *     str + other_str   => new_str
 *
 *  Concatenation---Returns a new <code>String</code> containing
 *  <i>other_str</i> concatenated to <i>str</i>.
 *
 *     "Hello from " + self.to_s   #=> "Hello from main"
 */

VALUE
rb_str_plus(VALUE str1, VALUE str2)
{
    VALUE str3;

    StringValue(str2);
    str3 = rb_str_new(0, RSTRING(str1)->len+RSTRING(str2)->len);
    memcpy(RSTRING(str3)->ptr, RSTRING(str1)->ptr, RSTRING(str1)->len);
    memcpy(RSTRING(str3)->ptr + RSTRING(str1)->len,
           RSTRING(str2)->ptr, RSTRING(str2)->len);
    RSTRING(str3)->ptr[RSTRING(str3)->len] = '\0';

    if (OBJ_TAINTED(str1) || OBJ_TAINTED(str2))
        OBJ_TAINT(str3);
    return str3;
}

/*
 *  call-seq:
 *     str * integer   => new_str
 *
 *  Copy---Returns a new <code>String</code> containing <i>integer</i> copies of
 *  the receiver.
 *
 *     "Ho! " * 3   #=> "Ho! Ho! Ho! "
 */

VALUE
rb_str_times(VALUE str, VALUE times)
{
    VALUE str2;
    long i, len;

    len = NUM2LONG(times);
    if (len < 0) {
        rb_raise(rb_eArgError, "negative argument");
    }
    if (len && LONG_MAX/len <  RSTRING(str)->len) {
        rb_raise(rb_eArgError, "argument too big");
    }

    str2 = rb_str_new5(str,0, len *= RSTRING(str)->len);
    for (i = 0; i < len; i += RSTRING(str)->len) {
        memcpy(RSTRING(str2)->ptr + i,
               RSTRING(str)->ptr, RSTRING(str)->len);
    }
    RSTRING(str2)->ptr[RSTRING(str2)->len] = '\0';

    OBJ_INFECT(str2, str);

    return str2;
}

/*
 *  call-seq:
 *     str % arg   => new_str
 *
 *  Format---Uses <i>str</i> as a format specification, and returns the result
 *  of applying it to <i>arg</i>. If the format specification contains more than
 *  one substitution, then <i>arg</i> must be an <code>Array</code> containing
 *  the values to be substituted. See <code>Kernel::sprintf</code> for details
 *  of the format string.
 *
 *     "%05d" % 123                       #=> "00123"
 *     "%-5s: %08x" % [ "ID", self.id ]   #=> "ID   : 200e14d6"
 */

static VALUE
rb_str_format_m(VALUE str, VALUE arg)
{
    if (TYPE(arg) == T_ARRAY) {
        return rb_str_format(RARRAY(arg)->len, RARRAY(arg)->ptr, str);
    }
    return rb_str_format(1, &arg, str);
}

static int
str_independent(VALUE str)
{
    if (FL_TEST(str, STR_TMPLOCK)) {
        rb_raise(rb_eRuntimeError, "can't modify string; temporarily locked");
    }
    if (OBJ_FROZEN(str)) rb_error_frozen("string");
    if (!OBJ_TAINTED(str) && rb_safe_level() >= 4)
        rb_raise(rb_eSecurityError, "Insecure: can't modify string");
    if (!FL_TEST(str, ELTS_SHARED)) return 1;
    return 0;
}

static void
str_make_independent(VALUE str)
{
    char *ptr;

    ptr = ALLOC_N(char, RSTRING(str)->len+1);
    if (RSTRING(str)->ptr) {
        memcpy(ptr, RSTRING(str)->ptr, RSTRING(str)->len);
    }
    ptr[RSTRING(str)->len] = 0;
    RSTRING(str)->ptr = ptr;
    RSTRING(str)->aux.capa = RSTRING(str)->len;
    FL_UNSET(str, STR_NOCAPA);
}

void
rb_str_modify(VALUE str)
{
    if (!str_independent(str))
        str_make_independent(str);
}

void
rb_str_associate(VALUE str, VALUE add)
{
    if (FL_TEST(str, STR_ASSOC)) {
        /* already associated */
        rb_ary_concat(RSTRING(str)->aux.shared, add);
    }
    else {
        if (FL_TEST(str, ELTS_SHARED)) {
            str_make_independent(str);
        }
        else if (RSTRING(str)->aux.capa != RSTRING(str)->len) {
            RESIZE_CAPA(str, RSTRING(str)->len);
        }
        RSTRING(str)->aux.shared = add;
        FL_SET(str, STR_ASSOC);
    }
}

VALUE
rb_str_associated(VALUE str)
{
    if (FL_TEST(str, STR_ASSOC)) {
        return RSTRING(str)->aux.shared;
    }
    return Qfalse;
}

static char *null_str = "";

VALUE
rb_string_value(volatile VALUE *ptr)
{
    VALUE s = *ptr;
    if (TYPE(s) != T_STRING) {
        s = rb_str_to_str(s);
        *ptr = s;
    }
    if (!RSTRING(s)->ptr) {
        FL_SET(s, ELTS_SHARED);
        RSTRING(s)->ptr = null_str;
    }
    return s;
}

char *
rb_string_value_ptr(volatile VALUE *ptr)
{
    return RSTRING(rb_string_value(ptr))->ptr;
}

char *
rb_string_value_cstr(volatile VALUE *ptr)
{
    VALUE str = rb_string_value(ptr);
    char *s = RSTRING(str)->ptr;

    if (!s || RSTRING(str)->len != strlen(s)) {
        rb_raise(rb_eArgError, "string contains null byte");
    }
    return s;
}

VALUE
rb_check_string_type(VALUE str)
{
    str = rb_check_convert_type(str, T_STRING, "String", "to_str");
    if (!NIL_P(str) && !RSTRING(str)->ptr) {
        FL_SET(str, ELTS_SHARED);
        RSTRING(str)->ptr = null_str;
    }
    return str;
}

VALUE
rb_str_substr(VALUE str, long beg, long len)
{
    VALUE str2;

    if (len < 0) return Qnil;
    if (beg > RSTRING(str)->len) return Qnil;
    if (beg < 0) {
        beg += RSTRING(str)->len;
        if (beg < 0) return Qnil;
    }
    if (beg + len > RSTRING(str)->len) {
        len = RSTRING(str)->len - beg;
    }
    if (len < 0) {
        len = 0;
    }
    if (len == 0) {
        str2 = rb_str_new5(str,0,0);
    }
    else if (len > sizeof(struct RString)/2 &&
        beg + len == RSTRING(str)->len && !FL_TEST(str, STR_ASSOC)) {
        str2 = rb_str_new3(rb_str_new4(str));
        RSTRING(str2)->ptr += RSTRING(str2)->len - len;
        RSTRING(str2)->len = len;
    }
    else {
        str2 = rb_str_new5(str, RSTRING(str)->ptr+beg, len);
    }
    OBJ_INFECT(str2, str);

    return str2;
}

VALUE
rb_str_freeze(VALUE str)
{
    return rb_obj_freeze(str);
}

VALUE
rb_str_dup_frozen(VALUE str)
{
    if (FL_TEST(str, ELTS_SHARED) && RSTRING(str)->aux.shared) {
        VALUE shared = RSTRING(str)->aux.shared;
        if (RSTRING(shared)->len == RSTRING(str)->len) {
            OBJ_FREEZE(shared);
            return shared;
        }
    }
    if (OBJ_FROZEN(str)) return str;
    str = rb_str_dup(str);
    OBJ_FREEZE(str);
    return str;
}

VALUE
rb_str_locktmp(VALUE str)
{
    if (FL_TEST(str, STR_TMPLOCK)) {
        rb_raise(rb_eRuntimeError, "temporal locking already locked string");
    }
    FL_SET(str, STR_TMPLOCK);
    return str;
}

VALUE
rb_str_unlocktmp(VALUE str)
{
    if (!FL_TEST(str, STR_TMPLOCK)) {
        rb_raise(rb_eRuntimeError, "temporal unlocking already unlocked string");
    }
    FL_UNSET(str, STR_TMPLOCK);
    return str;
}

VALUE
rb_str_resize(VALUE str, long len)
{
    if (len < 0) {
        rb_raise(rb_eArgError, "negative string size (or size too big)");
    }

    rb_str_modify(str);
    if (len != RSTRING(str)->len) {
        if (RSTRING(str)->len < len || RSTRING(str)->len - len > 1024) {
            REALLOC_N(RSTRING(str)->ptr, char, len+1);
            if (!FL_TEST(str, STR_NOCAPA)) {
                RSTRING(str)->aux.capa = len;
            }
        }
        RSTRING(str)->len = len;
        RSTRING(str)->ptr[len] = '\0';  /* sentinel */
    }
    return str;
}

VALUE
rb_str_buf_cat(VALUE str, const char *ptr, long len)
{
    long capa, total;

    if (len == 0) return str;
    if (len < 0) {
        rb_raise(rb_eArgError, "negative string size (or size too big)");
    }
    rb_str_modify(str);
    if (FL_TEST(str, STR_ASSOC)) {
        FL_UNSET(str, STR_ASSOC);
        capa = RSTRING(str)->aux.capa = RSTRING(str)->len;
    }
    else {
        capa = RSTRING(str)->aux.capa;
    }
    total = RSTRING(str)->len+len;
    if (capa <= total) {
        while (total > capa) {
            capa = (capa + 1) * 2;
        }
        RESIZE_CAPA(str, capa);
    }
    memcpy(RSTRING(str)->ptr + RSTRING(str)->len, ptr, len);
    RSTRING(str)->len = total;
    RSTRING(str)->ptr[total] = '\0'; /* sentinel */

    return str;
}

VALUE
rb_str_buf_cat2(VALUE str, const char *ptr)
{
    return rb_str_buf_cat(str, ptr, strlen(ptr));
}

VALUE
rb_str_cat(VALUE str, const char *ptr, long len)
{
    if (len < 0) {
        rb_raise(rb_eArgError, "negative string size (or size too big)");
    }
    if (FL_TEST(str, STR_ASSOC)) {
        rb_str_modify(str);
        REALLOC_N(RSTRING(str)->ptr, char, RSTRING(str)->len+len);
        memcpy(RSTRING(str)->ptr + RSTRING(str)->len, ptr, len);
        RSTRING(str)->len += len;
        RSTRING(str)->ptr[RSTRING(str)->len] = '\0'; /* sentinel */
        return str;
    }

    return rb_str_buf_cat(str, ptr, len);
}

VALUE
rb_str_cat2(VALUE str, const char *ptr)
{
    return rb_str_cat(str, ptr, strlen(ptr));
}

VALUE
rb_str_buf_append(VALUE str, VALUE str2)
{
    long capa, len;

    rb_str_modify(str);
    if (FL_TEST(str, STR_ASSOC)) {
        FL_UNSET(str, STR_ASSOC);
        capa = RSTRING(str)->aux.capa = RSTRING(str)->len;
    }
    else {
        capa = RSTRING(str)->aux.capa;
    }
    len = RSTRING(str)->len+RSTRING(str2)->len;
    if (capa <= len) {
        while (len > capa) {
            capa = (capa + 1) * 2;
        }
        RESIZE_CAPA(str, capa);
    }
    memcpy(RSTRING(str)->ptr + RSTRING(str)->len,
           RSTRING(str2)->ptr, RSTRING(str2)->len);
    RSTRING(str)->len += RSTRING(str2)->len;
    RSTRING(str)->ptr[RSTRING(str)->len] = '\0'; /* sentinel */
    OBJ_INFECT(str, str2);

    return str;
}

VALUE
rb_str_append(VALUE str, VALUE str2)
{
    StringValue(str2);
    rb_str_modify(str);
    if (RSTRING(str2)->len > 0) {
        if (FL_TEST(str, STR_ASSOC)) {
            long len = RSTRING(str)->len+RSTRING(str2)->len;
            REALLOC_N(RSTRING(str)->ptr, char, len+1);
            memcpy(RSTRING(str)->ptr + RSTRING(str)->len,
                   RSTRING(str2)->ptr, RSTRING(str2)->len);
            RSTRING(str)->ptr[len] = '\0'; /* sentinel */
            RSTRING(str)->len = len;
        }
        else {
            return rb_str_buf_append(str, str2);
        }
    }
    OBJ_INFECT(str, str2);
    return str;
}

/*
 *  call-seq:
 *     str << fixnum        => str
 *     str.concat(fixnum)   => str
 *     str << obj           => str
 *     str.concat(obj)      => str
 *
 *  Append---Concatenates the given object to <i>str</i>. If the object is a
 *  <code>Fixnum</code> between 0 and 255, it is converted to a character before
 *  concatenation.
 *
 *     a = "hello "
 *     a << "world"   #=> "hello world"
 *     a.concat(33)   #=> "hello world!"
 */

VALUE
rb_str_concat(VALUE str1, VALUE str2)
{
    if (FIXNUM_P(str2)) {
        int i = FIX2INT(str2);
        if (0 <= i && i <= 0xff) { /* byte */
            char c = i;
            return rb_str_cat(str1, &c, 1);
        }
    }
    str1 = rb_str_append(str1, str2);

    return str1;
}

int
rb_str_hash(VALUE str)
{
    register long len = RSTRING(str)->len;
    register char *p = RSTRING(str)->ptr;
    register int key = 0;

#ifdef HASH_ELFHASH
    register unsigned int g;

    while (len--) {
        key = (key << 4) + *p++;
        if (g = key & 0xF0000000)
            key ^= g >> 24;
        key &= ~g;
    }
#elif HASH_PERL
    while (len--) {
        key += *p++;
        key += (key << 10);
        key ^= (key >> 6);
    }
    key += (key << 3);
    key ^= (key >> 11);
    key += (key << 15);
#else
    while (len--) {
        key = key*65599 + *p;
        p++;
    }
    key = key + (key>>5);
#endif
    return key;
}

/*
 * call-seq:
 *    str.hash   => fixnum
 *
 * Return a hash based on the string's length and content.
 */

static VALUE
rb_str_hash_m(VALUE str)
{
    int key = rb_str_hash(str);
    return INT2FIX(key);
}

#define lesser(a,b) (((a)>(b))?(b):(a))

int
rb_str_cmp(VALUE str1, VALUE str2)
{
    long len;
    int retval;

    len = lesser(RSTRING(str1)->len, RSTRING(str2)->len);
    retval = rb_memcmp(RSTRING(str1)->ptr, RSTRING(str2)->ptr, len);
    if (retval == 0) {
        if (RSTRING(str1)->len == RSTRING(str2)->len) return 0;
        if (RSTRING(str1)->len > RSTRING(str2)->len) return 1;
        return -1;
    }
    if (retval > 0) return 1;
    return -1;
}

/*
 *  call-seq:
 *     str == obj   => true or false
 *
 *  Equality---If <i>obj</i> is not a <code>String</code>, returns
 *  <code>false</code>. Otherwise, returns <code>true</code> if <i>str</i>
 *  <code><=></code> <i>obj</i> returns zero.
 */

static VALUE
rb_str_equal(VALUE str1, VALUE str2)
{
    if (str1 == str2) return Qtrue;
    if (TYPE(str2) != T_STRING) {
        if (!rb_respond_to(str2, rb_intern("to_str"))) {
            return Qfalse;
        }
        return rb_equal(str2, str1);
    }
    if (RSTRING(str1)->len == RSTRING(str2)->len &&
        rb_str_cmp(str1, str2) == 0) {
        return Qtrue;
    }
    return Qfalse;
}

/*
 * call-seq:
 *   str.eql?(other)   => true or false
 *
 * Two strings are equal if the have the same length and content.
 */

static VALUE
rb_str_eql(VALUE str1, VALUE str2)
{
    if (TYPE(str2) != T_STRING || RSTRING(str1)->len != RSTRING(str2)->len)
        return Qfalse;

    if (memcmp(RSTRING(str1)->ptr, RSTRING(str2)->ptr,
               lesser(RSTRING(str1)->len, RSTRING(str2)->len)) == 0)
        return Qtrue;

    return Qfalse;
}

/*
 *  call-seq:
 *     str <=> other_str   => -1, 0, +1
 *
 *  Comparison---Returns -1 if <i>other_str</i> is less than, 0 if
 *  <i>other_str</i> is equal to, and +1 if <i>other_str</i> is greater than
 *  <i>str</i>. If the strings are of different lengths, and the strings are
 *  equal when compared up to the shortest length, then the longer string is
 *  considered greater than the shorter one. If the variable <code>$=</code> is
 *  <code>false</code>, the comparison is based on comparing the binary values
 *  of each character in the string. In older versions of Ruby, setting
 *  <code>$=</code> allowed case-insensitive comparisons; this is now deprecated
 *  in favor of using <code>String#casecmp</code>.
 *
 *  <code><=></code> is the basis for the methods <code><</code>,
 *  <code><=</code>, <code>></code>, <code>>=</code>, and <code>between?</code>,
 *  included from module <code>Comparable</code>.  The method
 *  <code>String#==</code> does not use <code>Comparable#==</code>.
 *
 *     "abcdef" <=> "abcde"     #=> 1
 *     "abcdef" <=> "abcdef"    #=> 0
 *     "abcdef" <=> "abcdefg"   #=> -1
 *     "abcdef" <=> "ABCDEF"    #=> 1
 */

static VALUE
rb_str_cmp_m(VALUE str1, VALUE str2)
{
    long result;

    if (TYPE(str2) != T_STRING) {
        if (!rb_respond_to(str2, rb_intern("to_str"))) {
            return Qnil;
        }
        else if (!rb_respond_to(str2, rb_intern("<=>"))) {
            return Qnil;
        }
        else {
            VALUE tmp = rb_funcall(str2, rb_intern("<=>"), 1, str1);

            if (NIL_P(tmp)) return Qnil;
            if (!FIXNUM_P(tmp)) {
                return rb_funcall(LONG2FIX(0), '-', 1, tmp);
            }
            result = -FIX2LONG(tmp);
        }
    }
    else {
        result = rb_str_cmp(str1, str2);
    }
    return LONG2NUM(result);
}

/*
 *  call-seq:
 *     str.casecmp(other_str)   => -1, 0, +1
 *
 *  Case-insensitive version of <code>String#<=></code>.
 *
 *     "abcdef".casecmp("abcde")     #=> 1
 *     "aBcDeF".casecmp("abcdef")    #=> 0
 *     "abcdef".casecmp("abcdefg")   #=> -1
 *     "abcdef".casecmp("ABCDEF")    #=> 0
 */

static VALUE
rb_str_casecmp(VALUE str1, VALUE str2)
{
    long len;
    int retval;

    StringValue(str2);
    len = lesser(RSTRING(str1)->len, RSTRING(str2)->len);
    retval = rb_memcicmp(RSTRING(str1)->ptr, RSTRING(str2)->ptr, len);
    if (retval == 0) {
        if (RSTRING(str1)->len == RSTRING(str2)->len) return INT2FIX(0);
        if (RSTRING(str1)->len > RSTRING(str2)->len) return INT2FIX(1);
        return INT2FIX(-1);
    }
    if (retval == 0) return INT2FIX(0);
    if (retval > 0) return INT2FIX(1);
    return INT2FIX(-1);
}

static long
rb_str_index(VALUE str, VALUE sub, long offset)
{
    long pos;

    if (offset < 0) {
        offset += RSTRING(str)->len;
        if (offset < 0) return -1;
    }
    if (RSTRING(str)->len - offset < RSTRING(sub)->len) return -1;
    if (RSTRING(sub)->len == 0) return offset;
    pos = rb_memsearch(RSTRING(sub)->ptr, RSTRING(sub)->len,
                       RSTRING(str)->ptr+offset, RSTRING(str)->len-offset);
    if (pos < 0) return pos;
    return pos + offset;
}

/*
 *  call-seq:
 *     str.index(substring [, offset])   => fixnum or nil
 *     str.index(fixnum [, offset])      => fixnum or nil
 *     str.index(regexp [, offset])      => fixnum or nil
 *
 *  Returns the index of the first occurrence of the given <i>substring</i>,
 *  character (<i>fixnum</i>), or pattern (<i>regexp</i>) in <i>str</i>. Returns
 *  <code>nil</code> if not found. If the second parameter is present, it
 *  specifies the position in the string to begin the search.
 *
 *     "hello".index('e')             #=> 1
 *     "hello".index('lo')            #=> 3
 *     "hello".index('a')             #=> nil
 *     "hello".index(101)             #=> 1
 *     "hello".index(/[aeiou]/, -3)   #=> 4
 */

static VALUE
rb_str_index_m(int argc, VALUE *argv, VALUE str)
{
    VALUE sub;
    VALUE initpos;
    long pos;

    if (rb_scan_args(argc, argv, "11", &sub, &initpos) == 2) {
        pos = NUM2LONG(initpos);
    }
    else {
        pos = 0;
    }
    if (pos < 0) {
        pos += RSTRING(str)->len;
        if (pos < 0) {
            if (TYPE(sub) == T_REGEXP) {
                rb_backref_set(Qnil);
            }
            return Qnil;
        }
    }

    switch (TYPE(sub)) {
      case T_REGEXP:
        pos = rb_reg_adjust_startpos(sub, str, pos, 0);
        pos = rb_reg_search(sub, str, pos, 0);
        break;

      case T_FIXNUM:
      {
          int c = FIX2INT(sub);
          long len = RSTRING(str)->len;
          char *p = RSTRING(str)->ptr;

          for (;pos<len;pos++) {
              if ((unsigned char)p[pos] == c) return LONG2NUM(pos);
          }
          return Qnil;
      }

      default: {
          VALUE tmp;

          tmp = rb_check_string_type(sub);
          if (NIL_P(tmp)) {
              rb_raise(rb_eTypeError, "type mismatch: %s given",
                       rb_obj_classname(sub));
          }
          sub = tmp;
      }
        /* fall through */
      case T_STRING:
        pos = rb_str_index(str, sub, pos);
        break;
    }

    if (pos == -1) return Qnil;
    return LONG2NUM(pos);
}

static long
rb_str_rindex(VALUE str, VALUE sub, long pos)
{
    long len = RSTRING(sub)->len;
    char *s, *sbeg, *t;

    /* substring longer than string */
    if (RSTRING(str)->len < len) return -1;
    if (RSTRING(str)->len - pos < len) {
        pos = RSTRING(str)->len - len;
    }
    sbeg = RSTRING(str)->ptr;
    s = RSTRING(str)->ptr + pos;
    t = RSTRING(sub)->ptr;
    if (len) {
        while (sbeg <= s) {
            if (rb_memcmp(s, t, len) == 0) {
                return s - RSTRING(str)->ptr;
            }
            s--;
        }
        return -1;
    }
    else {
        return pos;
    }
}

/*
 *  call-seq:
 *     str.rindex(substring [, fixnum])   => fixnum or nil
 *     str.rindex(fixnum [, fixnum])   => fixnum or nil
 *     str.rindex(regexp [, fixnum])   => fixnum or nil
 *
 *  Returns the index of the last occurrence of the given <i>substring</i>,
 *  character (<i>fixnum</i>), or pattern (<i>regexp</i>) in <i>str</i>. Returns
 *  <code>nil</code> if not found. If the second parameter is present, it
 *  specifies the position in the string to end the search---characters beyond
 *  this point will not be considered.
 *
 *     "hello".rindex('e')             #=> 1
 *     "hello".rindex('l')             #=> 3
 *     "hello".rindex('a')             #=> nil
 *     "hello".rindex(101)             #=> 1
 *     "hello".rindex(/[aeiou]/, -2)   #=> 1
 */

static VALUE
rb_str_rindex_m(int argc, VALUE *argv, VALUE str)
{
    VALUE sub;
    VALUE position;
    long pos;

    if (rb_scan_args(argc, argv, "11", &sub, &position) == 2) {
        pos = NUM2LONG(position);
        if (pos < 0) {
            pos += RSTRING(str)->len;
            if (pos < 0) {
                if (TYPE(sub) == T_REGEXP) {
                    rb_backref_set(Qnil);
                }
                return Qnil;
            }
        }
        if (pos > RSTRING(str)->len) pos = RSTRING(str)->len;
    }
    else {
        pos = RSTRING(str)->len;
    }

    switch (TYPE(sub)) {
      case T_REGEXP:
        if (RREGEXP(sub)->len) {
            pos = rb_reg_adjust_startpos(sub, str, pos, 1);
            pos = rb_reg_search(sub, str, pos, 1);
        }
        if (pos >= 0) return LONG2NUM(pos);
        break;

      case T_STRING:
        pos = rb_str_rindex(str, sub, pos);
        if (pos >= 0) return LONG2NUM(pos);
        break;

      case T_FIXNUM:
      {
          int c = FIX2INT(sub);
          char *p = RSTRING(str)->ptr + pos;
          char *pbeg = RSTRING(str)->ptr;

          if (pos == RSTRING(str)->len) {
              if (pos == 0) return Qnil;
              --p;
          }
          while (pbeg <= p) {
              if ((unsigned char)*p == c)
                  return LONG2NUM((char*)p - RSTRING(str)->ptr);
              p--;
          }
          return Qnil;
      }

      default:
        rb_raise(rb_eTypeError, "type mismatch: %s given",
                 rb_obj_classname(sub));
    }
    return Qnil;
}

/*
 *  call-seq:
 *     str =~ obj   => fixnum or nil
 *
 *  Match---If <i>obj</i> is a <code>Regexp</code>, use it as a pattern to match
 *  against <i>str</i>. If <i>obj</i> is a <code>String</code>, look for it in
 *  <i>str</i> (similar to <code>String#index</code>). Returns the position the
 *  match starts, or <code>nil</code> if there is no match. Otherwise, invokes
 *  <i>obj.=~</i>, passing <i>str</i> as an argument. The default
 *  <code>=~</code> in <code>Object</code> returns <code>false</code>.
 *
 *     "cat o' 9 tails" =~ '\d'   #=> nil
 *     "cat o' 9 tails" =~ /\d/   #=> 7
 *     "cat o' 9 tails" =~ 9      #=> false
 */

static VALUE
rb_str_match(VALUE x, VALUE y)
{
    switch (TYPE(y)) {
      case T_STRING:
        rb_raise(rb_eTypeError, "type mismatch: String given");

      case T_REGEXP:
        return rb_reg_match(y, x);

      default:
        return rb_funcall(y, rb_intern("=~"), 1, x);
    }
}

static VALUE get_pat(VALUE, int);

/*
 *  call-seq:
 *     str.match(pattern)   => matchdata or nil
 *
 *  Converts <i>pattern</i> to a <code>Regexp</code> (if it isn't already one),
 *  then invokes its <code>match</code> method on <i>str</i>.  If the second
 *  parameter is present, it specifies the position in the string to begin the
 *  search.
 *
 *     'hello'.match('(.)\1')      #=> #<MatchData:0x401b3d30>
 *     'hello'.match('(.)\1')[0]   #=> "ll"
 *     'hello'.match(/(.)\1/)[0]   #=> "ll"
 *     'hello'.match('xx')         #=> nil
 */

static VALUE
rb_str_match_m(int argc, VALUE *argv, VALUE str)
{
    VALUE re;
    if (argc < 1)
        rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc);
    re = argv[0];
    argv[0] = str;
    return rb_funcall2(get_pat(re, 0), rb_intern("match"), argc, argv);
}

static char
succ_char(char *s)
{
    char c = *s;

    /* numerics */
    if ('0' <= c && c < '9') (*s)++;
    else if (c == '9') {
        *s = '0';
        return '1';
    }
    /* small alphabets */
    else if ('a' <= c && c < 'z') (*s)++;
    else if (c == 'z') {
        return *s = 'a';
    }
    /* capital alphabets */
    else if ('A' <= c && c < 'Z') (*s)++;
    else if (c == 'Z') {
        return *s = 'A';
    }
    return 0;
}

/*
 *  call-seq:
 *     str.succ   => new_str
 *     str.next   => new_str
 *
 *  Returns the successor to <i>str</i>. The successor is calculated by
 *  incrementing characters starting from the rightmost alphanumeric (or
 *  the rightmost character if there are no alphanumerics) in the
 *  string. Incrementing a digit always results in another digit, and
 *  incrementing a letter results in another letter of the same case.
 *  Incrementing nonalphanumerics uses the underlying character set's
 *  collating sequence.
 *
 *  If the increment generates a ``carry,'' the character to the left of
 *  it is incremented. This process repeats until there is no carry,
 *  adding an additional character if necessary.
 *
 *     "abcd".succ        #=> "abce"
 *     "THX1138".succ     #=> "THX1139"
 *     "<<koala>>".succ   #=> "<<koalb>>"
 *     "1999zzz".succ     #=> "2000aaa"
 *     "ZZZ9999".succ     #=> "AAAA0000"
 *     "***".succ         #=> "**+"
 */

static VALUE
rb_str_succ(VALUE orig)
{
    VALUE str;
    char *sbeg, *s;
    int c = -1;
    long n = 0;

    str = rb_str_new5(orig, RSTRING(orig)->ptr, RSTRING(orig)->len);
    OBJ_INFECT(str, orig);
    if (RSTRING(str)->len == 0) return str;

    sbeg = RSTRING(str)->ptr; s = sbeg + RSTRING(str)->len - 1;

    while (sbeg <= s) {
        if (ISALNUM(*s)) {
            if ((c = succ_char(s)) == 0) break;
            n = s - sbeg;
        }
        s--;
    }
    if (c == -1) {              /* str contains no alnum */
        sbeg = RSTRING(str)->ptr; s = sbeg + RSTRING(str)->len - 1;
        c = '\001';
        while (sbeg <= s) {
            if ((*s += 1) != 0) break;
            s--;
        }
    }
    if (s < sbeg) {
        RESIZE_CAPA(str, RSTRING(str)->len + 1);
        s = RSTRING(str)->ptr + n;
        memmove(s+1, s, RSTRING(str)->len - n);
        *s = c;
        RSTRING(str)->len += 1;
        RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
    }

    return str;
}

/*
 *  call-seq:
 *     str.succ!   => str
 *     str.next!   => str
 *
 *  Equivalent to <code>String#succ</code>, but modifies the receiver in
 *  place.
 */

static VALUE
rb_str_succ_bang(VALUE str)
{
    rb_str_shared_replace(str, rb_str_succ(str));

    return str;
}

VALUE
rb_str_upto(VALUE beg, VALUE end, int excl)
{
    VALUE current, after_end;
    ID succ = rb_intern("succ");
    int n;

    StringValue(end);
    n = rb_str_cmp(beg, end);
    if (n > 0 || (excl && n == 0)) return beg;
    after_end = rb_funcall(end, succ, 0, 0);
    current = beg;
    while (!rb_str_equal(current, after_end)) {
        rb_yield(current);
        if (!excl && rb_str_equal(current, end)) break;
        current = rb_funcall(current, succ, 0, 0);
        StringValue(current);
        if (excl && rb_str_equal(current, end)) break;
        StringValue(current);
        if (RSTRING(current)->len > RSTRING(end)->len)
            break;
    }

    return beg;
}

/*
 *  call-seq:
 *     str.upto(other_str) {|s| block }   => str
 *
 *  Iterates through successive values, starting at <i>str</i> and
 *  ending at <i>other_str</i> inclusive, passing each value in turn to
 *  the block. The <code>String#succ</code> method is used to generate
 *  each value.
 *
 *     "a8".upto("b6") {|s| print s, ' ' }
 *     for s in "a8".."b6"
 *       print s, ' '
 *     end
 *
 *  <em>produces:</em>
 *
 *     a8 a9 b0 b1 b2 b3 b4 b5 b6
 *     a8 a9 b0 b1 b2 b3 b4 b5 b6
 */

static VALUE
rb_str_upto_m(VALUE beg, VALUE end)
{
    return rb_str_upto(beg, end, Qfalse);
}

static VALUE
rb_str_subpat(VALUE str, VALUE re, int nth)
{
    if (rb_reg_search(re, str, 0, 0) >= 0) {
        return rb_reg_nth_match(nth, rb_backref_get());
    }
    return Qnil;
}

static VALUE
rb_str_aref(VALUE str, VALUE indx)
{
    long idx;

    switch (TYPE(indx)) {
      case T_FIXNUM:
        idx = FIX2LONG(indx);

      num_index:
        if (idx < 0) {
            idx = RSTRING(str)->len + idx;
        }
        if (idx < 0 || RSTRING(str)->len <= idx) {
            return Qnil;
        }
        return INT2FIX(RSTRING(str)->ptr[idx] & 0xff);

      case T_REGEXP:
        return rb_str_subpat(str, indx, 0);

      case T_STRING:
        if (rb_str_index(str, indx, 0) != -1)
            return rb_str_dup(indx);
        return Qnil;

      default:
        /* check if indx is Range */
        {
            long beg, len;
            VALUE tmp;

            switch (rb_range_beg_len(indx, &beg, &len, RSTRING(str)->len, 0)) {
              case Qfalse:
                break;
              case Qnil:
                return Qnil;
              default:
                tmp = rb_str_substr(str, beg, len);
                OBJ_INFECT(tmp, indx);
                return tmp;
            }
        }
        idx = NUM2LONG(indx);
        goto num_index;
    }
    return Qnil;                /* not reached */
}

/*
 *  call-seq:
 *     str[fixnum]                 => fixnum or nil
 *     str[fixnum, fixnum]         => new_str or nil
 *     str[range]                  => new_str or nil
 *     str[regexp]                 => new_str or nil
 *     str[regexp, fixnum]         => new_str or nil
 *     str[other_str]              => new_str or nil
 *     str.slice(fixnum)           => fixnum or nil
 *     str.slice(fixnum, fixnum)   => new_str or nil
 *     str.slice(range)            => new_str or nil
 *     str.slice(regexp)           => new_str or nil
 *     str.slice(regexp, fixnum)   => new_str or nil
 *     str.slice(other_str)        => new_str or nil
 *
 *  Element Reference---If passed a single <code>Fixnum</code>, returns the code
 *  of the character at that position. If passed two <code>Fixnum</code>
 *  objects, returns a substring starting at the offset given by the first, and
 *  a length given by the second. If given a range, a substring containing
 *  characters at offsets given by the range is returned. In all three cases, if
 *  an offset is negative, it is counted from the end of <i>str</i>. Returns
 *  <code>nil</code> if the initial offset falls outside the string, the length
 *  is negative, or the beginning of the range is greater than the end.
 *
 *  If a <code>Regexp</code> is supplied, the matching portion of <i>str</i> is
 *  returned. If a numeric parameter follows the regular expression, that
 *  component of the <code>MatchData</code> is returned instead. If a
 *  <code>String</code> is given, that string is returned if it occurs in
 *  <i>str</i>. In both cases, <code>nil</code> is returned if there is no
 *  match.
 *
 *     a = "hello there"
 *     a[1]                   #=> 101
 *     a[1,3]                 #=> "ell"
 *     a[1..3]                #=> "ell"
 *     a[-3,2]                #=> "er"
 *     a[-4..-2]              #=> "her"
 *     a[12..-1]              #=> nil
 *     a[-2..-4]              #=> ""
 *     a[/[aeiou](.)\1/]      #=> "ell"
 *     a[/[aeiou](.)\1/, 0]   #=> "ell"
 *     a[/[aeiou](.)\1/, 1]   #=> "l"
 *     a[/[aeiou](.)\1/, 2]   #=> nil
 *     a["lo"]                #=> "lo"
 *     a["bye"]               #=> nil
 */

static VALUE
rb_str_aref_m(int argc, VALUE *argv, VALUE str)
{
    if (argc == 2) {
        if (TYPE(argv[0]) == T_REGEXP) {
            return rb_str_subpat(str, argv[0], NUM2INT(argv[1]));
        }
        return rb_str_substr(str, NUM2LONG(argv[0]), NUM2LONG(argv[1]));
    }
    if (argc != 1) {
        rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc);
    }
    return rb_str_aref(str, argv[0]);
}

static void
rb_str_splice(VALUE str, long beg, long len, VALUE val)
{
    if (len < 0) rb_raise(rb_eIndexError, "negative length %ld", len);

    StringValue(val);
    rb_str_modify(str);

    if (RSTRING(str)->len < beg) {
      out_of_range:
        rb_raise(rb_eIndexError, "index %ld out of string", beg);
    }
    if (beg < 0) {
        if (-beg > RSTRING(str)->len) {
            goto out_of_range;
        }
        beg += RSTRING(str)->len;
    }
    if (RSTRING(str)->len < beg + len) {
        len = RSTRING(str)->len - beg;
    }

    if (len < RSTRING(val)->len) {
        /* expand string */
        RESIZE_CAPA(str, RSTRING(str)->len + RSTRING(val)->len - len + 1);
    }

    if (RSTRING(val)->len != len) {
        memmove(RSTRING(str)->ptr + beg + RSTRING(val)->len,
                RSTRING(str)->ptr + beg + len,
                RSTRING(str)->len - (beg + len));
    }
    if (RSTRING(str)->len < beg && len < 0) {
        MEMZERO(RSTRING(str)->ptr + RSTRING(str)->len, char, -len);
    }
    if (RSTRING(val)->len > 0) {
        memmove(RSTRING(str)->ptr+beg, RSTRING(val)->ptr, RSTRING(val)->len);
    }
    RSTRING(str)->len += RSTRING(val)->len - len;
    if (RSTRING(str)->ptr) {
        RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
    }
    OBJ_INFECT(str, val);
}

void
rb_str_update(VALUE str, long beg, long len, VALUE val)
{
    rb_str_splice(str, beg, len, val);
}

static void
rb_str_subpat_set(VALUE str, VALUE re, int nth, VALUE val)
{
    VALUE match;
    long start, end, len;

    if (rb_reg_search(re, str, 0, 0) < 0) {
        rb_raise(rb_eIndexError, "regexp not matched");
    }
    match = rb_backref_get();
    if (nth >= RMATCH(match)->regs->num_regs) {
      out_of_range:
        rb_raise(rb_eIndexError, "index %d out of regexp", nth);
    }
    if (nth < 0) {
        if (-nth >= RMATCH(match)->regs->num_regs) {
            goto out_of_range;
        }
        nth += RMATCH(match)->regs->num_regs;
    }

    start = RMATCH(match)->BEG(nth);
    if (start == -1) {
        rb_raise(rb_eIndexError, "regexp group %d not matched", nth);
    }
    end = RMATCH(match)->END(nth);
    len = end - start;
    rb_str_splice(str, start, len, val);
}

static VALUE
rb_str_aset(VALUE str, VALUE indx, VALUE val)
{
    long idx, beg;

    switch (TYPE(indx)) {
      case T_FIXNUM:
      num_index:
        idx = FIX2LONG(indx);
        if (RSTRING(str)->len <= idx) {
          out_of_range:
            rb_raise(rb_eIndexError, "index %ld out of string", idx);
        }
        if (idx < 0) {
            if (-idx > RSTRING(str)->len)
                goto out_of_range;
            idx += RSTRING(str)->len;
        }
        if (FIXNUM_P(val)) {
            rb_str_modify(str);
            if (RSTRING(str)->len == idx) {
                RSTRING(str)->len += 1;
                RESIZE_CAPA(str, RSTRING(str)->len);
            }
            RSTRING(str)->ptr[idx] = FIX2INT(val) & 0xff;
        }
        else {
            rb_str_splice(str, idx, 1, val);
        }
        return val;

      case T_REGEXP:
        rb_str_subpat_set(str, indx, 0, val);
        return val;

      case T_STRING:
        beg = rb_str_index(str, indx, 0);
        if (beg < 0) {
            rb_raise(rb_eIndexError, "string not matched");
        }
        rb_str_splice(str, beg, RSTRING(indx)->len, val);
        return val;

      default:
        /* check if indx is Range */
        {
            long beg, len;
            if (rb_range_beg_len(indx, &beg, &len, RSTRING(str)->len, 2)) {
                rb_str_splice(str, beg, len, val);
                return val;
            }
        }
        idx = NUM2LONG(indx);
        goto num_index;
    }
}

/*
 *  call-seq:
 *     str[fixnum] = fixnum
 *     str[fixnum] = new_str
 *     str[fixnum, fixnum] = new_str
 *     str[range] = aString
 *     str[regexp] = new_str
 *     str[regexp, fixnum] = new_str
 *     str[other_str] = new_str
 *
 *  Element Assignment---Replaces some or all of the content of <i>str</i>. The
 *  portion of the string affected is determined using the same criteria as
 *  <code>String#[]</code>. If the replacement string is not the same length as
 *  the text it is replacing, the string will be adjusted accordingly. If the
 *  regular expression or string is used as the index doesn't match a position
 *  in the string, <code>IndexError</code> is raised. If the regular expression
 *  form is used, the optional second <code>Fixnum</code> allows you to specify
 *  which portion of the match to replace (effectively using the
 *  <code>MatchData</code> indexing rules. The forms that take a
 *  <code>Fixnum</code> will raise an <code>IndexError</code> if the value is
 *  out of range; the <code>Range</code> form will raise a
 *  <code>RangeError</code>, and the <code>Regexp</code> and <code>String</code>
 *  forms will silently ignore the assignment.
 */

static VALUE
rb_str_aset_m(int argc, VALUE *argv, VALUE str)
{
    if (argc == 3) {
        if (TYPE(argv[0]) == T_REGEXP) {
            rb_str_subpat_set(str, argv[0], NUM2INT(argv[1]), argv[2]);
        }
        else {
            rb_str_splice(str, NUM2LONG(argv[0]), NUM2LONG(argv[1]), argv[2]);
        }
        return argv[2];
    }
    if (argc != 2) {
        rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)", argc);
    }
    return rb_str_aset(str, argv[0], argv[1]);
}

/*
 *  call-seq:
 *     str.insert(index, other_str)   => str
 *
 *  Inserts <i>other_str</i> before the character at the given
 *  <i>index</i>, modifying <i>str</i>. Negative indices count from the
 *  end of the string, and insert <em>after</em> the given character.
 *  The intent is insert <i>aString</i> so that it starts at the given
 *  <i>index</i>.
 *
 *     "abcd".insert(0, 'X')    #=> "Xabcd"
 *     "abcd".insert(3, 'X')    #=> "abcXd"
 *     "abcd".insert(4, 'X')    #=> "abcdX"
 *     "abcd".insert(-3, 'X')   #=> "abXcd"
 *     "abcd".insert(-1, 'X')   #=> "abcdX"
 */

static VALUE
rb_str_insert(VALUE str, VALUE idx, VALUE str2)
{
    long pos = NUM2LONG(idx);

    if (pos == -1) {
        pos = RSTRING(str)->len;
    }
    else if (pos < 0) {
        pos++;
    }
    rb_str_splice(str, pos, 0, str2);
    return str;
}

/*
 *  call-seq:
 *     str.slice!(fixnum)           => fixnum or nil
 *     str.slice!(fixnum, fixnum)   => new_str or nil
 *     str.slice!(range)            => new_str or nil
 *     str.slice!(regexp)           => new_str or nil
 *     str.slice!(other_str)        => new_str or nil
 *
 *  Deletes the specified portion from <i>str</i>, and returns the portion
 *  deleted. The forms that take a <code>Fixnum</code> will raise an
 *  <code>IndexError</code> if the value is out of range; the <code>Range</code>
 *  form will raise a <code>RangeError</code>, and the <code>Regexp</code> and
 *  <code>String</code> forms will silently ignore the assignment.
 *
 *     string = "this is a string"
 *     string.slice!(2)        #=> 105
 *     string.slice!(3..6)     #=> " is "
 *     string.slice!(/s.*t/)   #=> "sa st"
 *     string.slice!("r")      #=> "r"
 *     string                  #=> "thing"
 */

static VALUE
rb_str_slice_bang(int argc, VALUE *argv, VALUE str)
{
    VALUE result;
    VALUE buf[3];
    int i;

    if (argc < 1 || 2 < argc) {
        rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc);
    }
    for (i=0; i<argc; i++) {
        buf[i] = argv[i];
    }
    buf[i] = rb_str_new(0,0);
    result = rb_str_aref_m(argc, buf, str);
    if (!NIL_P(result)) {
        rb_str_aset_m(argc+1, buf, str);
    }
    return result;
}

static VALUE
get_pat(VALUE pat, int quote)
{
    VALUE val;

    switch (TYPE(pat)) {
      case T_REGEXP:
        return pat;

      case T_STRING:
        break;

      default:
        val = rb_check_string_type(pat);
        if (NIL_P(val)) {
            Check_Type(pat, T_REGEXP);
        }
        pat = val;
    }

    if (quote) {
        pat = rb_reg_quote(pat);
    }

    return rb_reg_regcomp(pat);
}

/*
 *  call-seq:
 *     str.sub!(pattern, replacement)          => str or nil
 *     str.sub!(pattern) {|match| block }      => str or nil
 *
 *  Performs the substitutions of <code>String#sub</code> in place,
 *  returning <i>str</i>, or <code>nil</code> if no substitutions were
 *  performed.
 */

static VALUE
rb_str_sub_bang(int argc, VALUE *argv, VALUE str)
{
    VALUE pat, repl, match;
    struct re_registers *regs;
    int iter = 0;
    int tainted = 0;
    long plen;

    if (argc == 1 && rb_block_given_p()) {
        iter = 1;
    }
    else if (argc == 2) {
        repl = argv[1];
        StringValue(repl);
        if (OBJ_TAINTED(repl)) tainted = 1;
    }
    else {
        rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)", argc);
    }

    pat = get_pat(argv[0], 1);
    if (rb_reg_search(pat, str, 0, 0) >= 0) {
        rb_str_modify(str);
        match = rb_backref_get();
        regs = RMATCH(match)->regs;

        if (iter) {
            char *p = RSTRING(str)->ptr; long len = RSTRING(str)->len;

            rb_match_busy(match);
            repl = rb_obj_as_string(rb_yield(rb_reg_nth_match(0, match)));
            str_mod_check(str, p, len);
            str_frozen_check(str);
            rb_backref_set(match);
        }
        else {
            repl = rb_reg_regsub(repl, str, regs);
        }
        if (OBJ_TAINTED(repl)) tainted = 1;
        plen = END(0) - BEG(0);
        if (RSTRING(repl)->len > plen) {
            RESIZE_CAPA(str, RSTRING(str)->len + RSTRING(repl)->len - plen);
        }
        if (RSTRING(repl)->len != plen) {
            memmove(RSTRING(str)->ptr + BEG(0) + RSTRING(repl)->len,
                    RSTRING(str)->ptr + BEG(0) + plen,
                    RSTRING(str)->len - BEG(0) - plen);
        }
        memcpy(RSTRING(str)->ptr + BEG(0),
               RSTRING(repl)->ptr, RSTRING(repl)->len);
        RSTRING(str)->len += RSTRING(repl)->len - plen;
        RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
        if (tainted) OBJ_TAINT(str);

        return str;
    }
    return Qnil;
}

/*
 *  call-seq:
 *     str.sub(pattern, replacement)         => new_str
 *     str.sub(pattern) {|match| block }     => new_str
 *
 *  Returns a copy of <i>str</i> with the <em>first</em> occurrence of
 *  <i>pattern</i> replaced with either <i>replacement</i> or the value of the
 *  block. The <i>pattern</i> will typically be a <code>Regexp</code>; if it is
 *  a <code>String</code> then no regular expression metacharacters will be
 *  interpreted (that is <code>/\d/</code> will match a digit, but
 *  <code>'\d'</code> will match a backslash followed by a 'd').
 *
 *  If the method call specifies <i>replacement</i>, special variables such as
 *  <code>$&</code> will not be useful, as substitution into the string occurs
 *  before the pattern match starts. However, the sequences <code>\1</code>,
 *  <code>\2</code>, etc., may be used.
 *
 *  In the block form, the current match string is passed in as a parameter, and
 *  variables such as <code>$1</code>, <code>$2</code>, <code>$`</code>,
 *  <code>$&</code>, and <code>$'</code> will be set appropriately. The value
 *  returned by the block will be substituted for the match on each call.
 *
 *  The result inherits any tainting in the original string or any supplied
 *  replacement string.
 *
 *     "hello".sub(/[aeiou]/, '*')               #=> "h*llo"
 *     "hello".sub(/([aeiou])/, '<\1>')          #=> "h<e>llo"
 *     "hello".sub(/./) {|s| s[0].to_s + ' ' }   #=> "104 ello"
 */

static VALUE
rb_str_sub(int argc, VALUE *argv, VALUE str)
{
    str = rb_str_dup(str);
    rb_str_sub_bang(argc, argv, str);
    return str;
}

static VALUE
str_gsub(int argc, VALUE *argv, VALUE str, int bang)
{
    VALUE pat, val, repl, match, dest;
    struct re_registers *regs;
    long beg, n;
    long offset, blen, slen, len;
    int iter = 0;
    char *buf, *bp, *sp, *cp;
    int tainted = 0;

    switch (argc) {
      case 1:
        RETURN_ENUMERATOR(str, argc, argv);
        iter = 1;
        break;
      case 2:
        repl = argv[1];
        StringValue(repl);
        if (OBJ_TAINTED(repl)) tainted = 1;
        break;
      default:
        rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)", argc);
    }

    pat = get_pat(argv[0], 1);
    offset=0; n=0;
    beg = rb_reg_search(pat, str, 0, 0);
    if (beg < 0) {
        if (bang) return Qnil;  /* no match, no substitution */
        return rb_str_dup(str);
    }

    blen = RSTRING(str)->len + 30; /* len + margin */
    dest = str_new(0, 0, blen);
    buf = RSTRING(dest)->ptr;
    bp = buf;
    sp = cp = RSTRING(str)->ptr;
    slen = RSTRING(str)->len;

    rb_str_locktmp(dest);
    while (beg >= 0) {
        n++;
        match = rb_backref_get();
        regs = RMATCH(match)->regs;
        if (iter) {
            rb_match_busy(match);
            val = rb_obj_as_string(rb_yield(rb_reg_nth_match(0, match)));
            str_mod_check(str, sp, slen);
            if (bang) str_frozen_check(str);
            if (val == dest) {  /* paranoid chack [ruby-dev:24827] */
                rb_raise(rb_eRuntimeError, "block should not cheat");
            }
            rb_backref_set(match);
        }
        else {
            val = rb_reg_regsub(repl, str, regs);
        }
        if (OBJ_TAINTED(val)) tainted = 1;
        len = (bp - buf) + (beg - offset) + RSTRING(val)->len + 3;
        if (blen < len) {
            while (blen < len) blen *= 2;
            len = bp - buf;
            RESIZE_CAPA(dest, blen);
            RSTRING(dest)->len = blen;
            buf = RSTRING(dest)->ptr;
            bp = buf + len;
        }
        len = beg - offset;     /* copy pre-match substr */
        memcpy(bp, cp, len);
        bp += len;
        memcpy(bp, RSTRING(val)->ptr, RSTRING(val)->len);
        bp += RSTRING(val)->len;
        offset = END(0);
        if (BEG(0) == END(0)) {
            /*
             * Always consume at least one character of the input string
             * in order to prevent infinite loops.
             */
            if (RSTRING(str)->len <= END(0)) break;
            len = mbclen2(RSTRING(str)->ptr[END(0)], pat);
            memcpy(bp, RSTRING(str)->ptr+END(0), len);
            bp += len;
            offset = END(0) + len;
        }
        cp = RSTRING(str)->ptr + offset;
        if (offset > RSTRING(str)->len) break;
        beg = rb_reg_search(pat, str, offset, 0);
    }
    if (RSTRING(str)->len > offset) {
        len = bp - buf;
        if (blen - len < RSTRING(str)->len - offset) {
            blen = len + RSTRING(str)->len - offset;
            RESIZE_CAPA(dest, blen);
            buf = RSTRING(dest)->ptr;
            bp = buf + len;
        }
        memcpy(bp, cp, RSTRING(str)->len - offset);
        bp += RSTRING(str)->len - offset;
    }
    rb_backref_set(match);
    *bp = '\0';
    rb_str_unlocktmp(dest);
    if (bang) {
        if (str_independent(str)) {
            free(RSTRING(str)->ptr);
        }
        FL_UNSET(str, STR_NOCAPA);
        RSTRING(str)->ptr = buf;
        RSTRING(str)->aux.capa = blen;
        RSTRING(dest)->ptr = 0;
        RSTRING(dest)->len = 0;
    }
    else {
        RBASIC(dest)->klass = rb_obj_class(str);
        OBJ_INFECT(dest, str);
        str = dest;
    }
    RSTRING(str)->len = bp - buf;

    if (tainted) OBJ_TAINT(str);
    return str;
}

/*
 *  call-seq:
 *     str.gsub!(pattern, replacement)        => str or nil
 *     str.gsub!(pattern) {|match| block }    => str or nil
 *
 *  Performs the substitutions of <code>String#gsub</code> in place, returning
 *  <i>str</i>, or <code>nil</code> if no substitutions were performed.
 */

static VALUE
rb_str_gsub_bang(int argc, VALUE *argv, VALUE str)
{
    return str_gsub(argc, argv, str, 1);
}

/*
 *  call-seq:
 *     str.gsub(pattern, replacement)       => new_str
 *     str.gsub(pattern) {|match| block }   => new_str
 *
 *  Returns a copy of <i>str</i> with <em>all</em> occurrences of <i>pattern</i>
 *  replaced with either <i>replacement</i> or the value of the block. The
 *  <i>pattern</i> will typically be a <code>Regexp</code>; if it is a
 *  <code>String</code> then no regular expression metacharacters will be
 *  interpreted (that is <code>/\d/</code> will match a digit, but
 *  <code>'\d'</code> will match a backslash followed by a 'd').
 *
 *  If a string is used as the replacement, special variables from the match
 *  (such as <code>$&</code> and <code>$1</code>) cannot be substituted into it,
 *  as substitution into the string occurs before the pattern match
 *  starts. However, the sequences <code>\1</code>, <code>\2</code>, and so on
 *  may be used to interpolate successive groups in the match.
 *
 *  In the block form, the current match string is passed in as a parameter, and
 *  variables such as <code>$1</code>, <code>$2</code>, <code>$`</code>,
 *  <code>$&</code>, and <code>$'</code> will be set appropriately. The value
 *  returned by the block will be substituted for the match on each call.
 *
 *  The result inherits any tainting in the original string or any supplied
 *  replacement string.
 *
 *     "hello".gsub(/[aeiou]/, '*')              #=> "h*ll*"
 *     "hello".gsub(/([aeiou])/, '<\1>')         #=> "h<e>ll<o>"
 *     "hello".gsub(/./) {|s| s[0].to_s + ' '}   #=> "104 101 108 108 111 "
 */

static VALUE
rb_str_gsub(int argc, VALUE *argv, VALUE str)
{
    return str_gsub(argc, argv, str, 0);
}

/*
 *  call-seq:
 *     str.replace(other_str)   => str
 *
 *  Replaces the contents and taintedness of <i>str</i> with the corresponding
 *  values in <i>other_str</i>.
 *
 *     s = "hello"         #=> "hello"
 *     s.replace "world"   #=> "world"
 */

static VALUE
rb_str_replace(VALUE str, VALUE str2)
{
    if (str == str2) return str;

    StringValue(str2);
    if (FL_TEST(str2, ELTS_SHARED)) {
        if (str_independent(str)) {
            free(RSTRING(str)->ptr);
        }
        RSTRING(str)->len = RSTRING(str2)->len;
        RSTRING(str)->ptr = RSTRING(str2)->ptr;
        FL_SET(str, ELTS_SHARED);
        FL_UNSET(str, STR_ASSOC);
        RSTRING(str)->aux.shared = RSTRING(str2)->aux.shared;
    }
    else {
        rb_str_modify(str);
        rb_str_resize(str, RSTRING(str2)->len);
        memcpy(RSTRING(str)->ptr, RSTRING(str2)->ptr, RSTRING(str2)->len);
        if (FL_TEST(str2, STR_ASSOC)) {
            FL_SET(str, STR_ASSOC);
            RSTRING(str)->aux.shared = RSTRING(str2)->aux.shared;
        }
    }

    OBJ_INFECT(str, str2);
    return str;
}

/*
 *  call-seq:
 *     string.clear    ->  string
 *
 *  Makes string empty.
 *
 *     a = "abcde"
 *     a.clear    #=> ""
 */

static VALUE
rb_str_clear(VALUE str)
{
    /* rb_str_modify() */       /* no need for str_make_independent */
    if (str_independent(str)) {
        free(RSTRING(str)->ptr);
    }
    RSTRING(str)->aux.shared = 0;
    FL_UNSET(str, STR_NOCAPA);
    FL_SET(str, ELTS_SHARED);
    RSTRING(str)->ptr = null_str;
    RARRAY(str)->len = 0;
    return str;
}

/*
 *  call-seq:
 *     str.reverse!   => str
 *
 *  Reverses <i>str</i> in place.
 */

static VALUE
rb_str_reverse_bang(VALUE str)
{
    char *s, *e;
    char c;

    if (RSTRING(str)->len > 1) {
        rb_str_modify(str);
        s = RSTRING(str)->ptr;
        e = s + RSTRING(str)->len - 1;
        while (s < e) {
            c = *s;
            *s++ = *e;
            *e-- = c;
        }
    }
    return str;
}

/*
 *  call-seq:
 *     str.reverse   => new_str
 *
 *  Returns a new string with the characters from <i>str</i> in reverse order.
 *
 *     "stressed".reverse   #=> "desserts"
 */

static VALUE
rb_str_reverse(VALUE str)
{
    VALUE obj;
    char *s, *e, *p;

    if (RSTRING(str)->len <= 1) return rb_str_dup(str);

    obj = rb_str_new5(str, 0, RSTRING(str)->len);
    s = RSTRING(str)->ptr; e = s + RSTRING(str)->len - 1;
    p = RSTRING(obj)->ptr;

    while (e >= s) {
        *p++ = *e--;
    }
    OBJ_INFECT(obj, str);

    return obj;
}

/*
 *  call-seq:
 *     str.include? other_str   => true or false
 *     str.include? fixnum      => true or false
 *
 *  Returns <code>true</code> if <i>str</i> contains the given string or
 *  character.
 *
 *     "hello".include? "lo"   #=> true
 *     "hello".include? "ol"   #=> false
 *     "hello".include? ?h     #=> true
 */

static VALUE
rb_str_include(VALUE str, VALUE arg)
{
    long i;

    if (FIXNUM_P(arg)) {
        if (memchr(RSTRING(str)->ptr, FIX2INT(arg), RSTRING(str)->len))
            return Qtrue;
        return Qfalse;
    }

    StringValue(arg);
    i = rb_str_index(str, arg, 0);

    if (i == -1) return Qfalse;
    return Qtrue;
}

/*
 *  call-seq:
 *     str.to_i(base=10)   => integer
 *
 *  Returns the result of interpreting leading characters in <i>str</i> as an
 *  integer base <i>base</i> (2, 8, 10, or 16). Extraneous characters past the
 *  end of a valid number are ignored. If there is not a valid number at the
 *  start of <i>str</i>, <code>0</code> is returned. This method never raises an
 *  exception.
 *
 *     "12345".to_i             #=> 12345
 *     "99 red balloons".to_i   #=> 99
 *     "0a".to_i                #=> 0
 *     "0a".to_i(16)            #=> 10
 *     "hello".to_i             #=> 0
 *     "1100101".to_i(2)        #=> 101
 *     "1100101".to_i(8)        #=> 294977
 *     "1100101".to_i(10)       #=> 1100101
 *     "1100101".to_i(16)       #=> 17826049
 */

static VALUE
rb_str_to_i(int argc, VALUE *argv, VALUE str)
{
    VALUE b;
    int base;

    rb_scan_args(argc, argv, "01", &b);
    if (argc == 0) base = 10;
    else base = NUM2INT(b);

    if (base < 0) {
        rb_raise(rb_eArgError, "illegal radix %d", base);
    }
    return rb_str_to_inum(str, base, Qfalse);
}

/*
 *  call-seq:
 *     str.to_f   => float
 *
 *  Returns the result of interpreting leading characters in <i>str</i> as a
 *  floating point number. Extraneous characters past the end of a valid number
 *  are ignored. If there is not a valid number at the start of <i>str</i>,
 *  <code>0.0</code> is returned. This method never raises an exception.
 *
 *     "123.45e1".to_f        #=> 1234.5
 *     "45.67 degrees".to_f   #=> 45.67
 *     "thx1138".to_f         #=> 0.0
 */

static VALUE
rb_str_to_f(VALUE str)
{
    return rb_float_new(rb_str_to_dbl(str, Qfalse));
}

/*
 *  call-seq:
 *     str.to_s     => str
 *     str.to_str   => str
 *
 *  Returns the receiver.
 */

static VALUE
rb_str_to_s(VALUE str)
{
    if (rb_obj_class(str) != rb_cString) {
        VALUE dup = str_alloc(rb_cString);
        rb_str_replace(dup, str);
        return dup;
    }
    return str;
}

#define IS_EVSTR(p,e) ((p) < (e) && (*(p) == '$' || *(p) == '@' || *(p) == '{'))

/*
 * call-seq:
 *   str.inspect   => string
 *
 * Returns a printable version of _str_, with special characters
 * escaped.
 *
 *    str = "hello"
 *    str[3] = 8
 *    str.inspect       #=> "hel\010o"
 */

VALUE
rb_str_inspect(VALUE str)
{
    char *p, *pend;
    VALUE result = rb_str_buf_new2("\"");
    char s[5];

    p = RSTRING(str)->ptr; pend = p + RSTRING(str)->len;
    while (p < pend) {
        char c = *p++;
        if (ismbchar(c) && p < pend) {
            int len = mbclen(c);
            rb_str_buf_cat(result, p - 1, len);
            p += len - 1;
        }
        else if (c == '"'|| c == '\\' || (c == '#' && IS_EVSTR(p, pend))) {
            s[0] = '\\'; s[1] = c;
            rb_str_buf_cat(result, s, 2);
        }
        else if (ISPRINT(c)) {
            s[0] = c;
            rb_str_buf_cat(result, s, 1);
        }
        else if (c == '\n') {
            s[0] = '\\'; s[1] = 'n';
            rb_str_buf_cat(result, s, 2);
        }
        else if (c == '\r') {
            s[0] = '\\'; s[1] = 'r';
            rb_str_buf_cat(result, s, 2);
        }
        else if (c == '\t') {
            s[0] = '\\'; s[1] = 't';
            rb_str_buf_cat(result, s, 2);
        }
        else if (c == '\f') {
            s[0] = '\\'; s[1] = 'f';
            rb_str_buf_cat(result, s, 2);
        }
        else if (c == '\013') {
            s[0] = '\\'; s[1] = 'v';
            rb_str_buf_cat(result, s, 2);
        }
        else if (c == '\007') {
            s[0] = '\\'; s[1] = 'a';
            rb_str_buf_cat(result, s, 2);
        }
        else if (c == 033) {
            s[0] = '\\'; s[1] = 'e';
            rb_str_buf_cat(result, s, 2);
        }
        else {
            sprintf(s, "\\%03o", c & 0377);
            rb_str_buf_cat2(result, s);
        }
    }
    rb_str_buf_cat2(result, "\"");

    OBJ_INFECT(result, str);
    return result;
}

/*
 *  call-seq:
 *     str.dump   => new_str
 *
 *  Produces a version of <i>str</i> with all nonprinting characters replaced by
 *  <code>\nnn</code> notation and all special characters escaped.
 */

VALUE
rb_str_dump(VALUE str)
{
    long len;
    char *p, *pend;
    char *q, *qend;
    VALUE result;

    len = 2;                    /* "" */
    p = RSTRING(str)->ptr; pend = p + RSTRING(str)->len;
    while (p < pend) {
        char c = *p++;
        switch (c) {
          case '"':  case '\\':
          case '\n': case '\r':
          case '\t': case '\f':
          case '\013': case '\007': case '\033':
            len += 2;
            break;

          case '#':
            len += IS_EVSTR(p, pend) ? 2 : 1;
            break;

          default:
            if (ISPRINT(c)) {
                len++;
            }
            else {
                len += 4;               /* \nnn */
            }
            break;
        }
    }

    result = rb_str_new5(str, 0, len);
    p = RSTRING(str)->ptr; pend = p + RSTRING(str)->len;
    q = RSTRING(result)->ptr; qend = q + len;

    *q++ = '"';
    while (p < pend) {
        char c = *p++;

        if (c == '"' || c == '\\') {
            *q++ = '\\';
            *q++ = c;
        }
        else if (c == '#') {
            if (IS_EVSTR(p, pend)) *q++ = '\\';
            *q++ = '#';
        }
        else if (ISPRINT(c)) {
            *q++ = c;
        }
        else if (c == '\n') {
            *q++ = '\\';
            *q++ = 'n';
        }
        else if (c == '\r') {
            *q++ = '\\';
            *q++ = 'r';
        }
        else if (c == '\t') {
            *q++ = '\\';
            *q++ = 't';
        }
        else if (c == '\f') {
            *q++ = '\\';
            *q++ = 'f';
        }
        else if (c == '\013') {
            *q++ = '\\';
            *q++ = 'v';
        }
        else if (c == '\007') {
            *q++ = '\\';
            *q++ = 'a';
        }
        else if (c == '\033') {
            *q++ = '\\';
            *q++ = 'e';
        }
        else {
            *q++ = '\\';
            sprintf(q, "%03o", c&0xff);
            q += 3;
        }
    }
    *q++ = '"';

    OBJ_INFECT(result, str);
    return result;
}

/*
 *  call-seq:
 *     str.upcase!   => str or nil
 *
 *  Upcases the contents of <i>str</i>, returning <code>nil</code> if no changes
 *  were made.
 */

static VALUE
rb_str_upcase_bang(VALUE str)
{
    char *s, *send;
    int modify = 0;

    rb_str_modify(str);
    s = RSTRING(str)->ptr; send = s + RSTRING(str)->len;
    while (s < send) {
        if (ismbchar(*s)) {
            s+=mbclen(*s) - 1;
        }
        else if (ISLOWER(*s)) {
            *s = toupper(*s);
            modify = 1;
        }
        s++;
    }

    if (modify) return str;
    return Qnil;
}

/*
 *  call-seq:
 *     str.upcase   => new_str
 *
 *  Returns a copy of <i>str</i> with all lowercase letters replaced with their
 *  uppercase counterparts. The operation is locale insensitive---only
 *  characters ``a'' to ``z'' are affected.
 *
 *     "hEllO".upcase   #=> "HELLO"
 */

static VALUE
rb_str_upcase(VALUE str)
{
    str = rb_str_dup(str);
    rb_str_upcase_bang(str);
    return str;
}

/*
 *  call-seq:
 *     str.downcase!   => str or nil
 *
 *  Downcases the contents of <i>str</i>, returning <code>nil</code> if no
 *  changes were made.
 */

static VALUE
rb_str_downcase_bang(VALUE str)
{
    char *s, *send;
    int modify = 0;

    rb_str_modify(str);
    s = RSTRING(str)->ptr; send = s + RSTRING(str)->len;
    while (s < send) {
        if (ismbchar(*s)) {
            s+=mbclen(*s) - 1;
        }
        else if (ISUPPER(*s)) {
            *s = tolower(*s);
            modify = 1;
        }
        s++;
    }

    if (modify) return str;
    return Qnil;
}

/*
 *  call-seq:
 *     str.downcase   => new_str
 *
 *  Returns a copy of <i>str</i> with all uppercase letters replaced with their
 *  lowercase counterparts. The operation is locale insensitive---only
 *  characters ``A'' to ``Z'' are affected.
 *
 *     "hEllO".downcase   #=> "hello"
 */

static VALUE
rb_str_downcase(VALUE str)
{
    str = rb_str_dup(str);
    rb_str_downcase_bang(str);
    return str;
}

/*
 *  call-seq:
 *     str.capitalize!   => str or nil
 *
 *  Modifies <i>str</i> by converting the first character to uppercase and the
 *  remainder to lowercase. Returns <code>nil</code> if no changes are made.
 *
 *     a = "hello"
 *     a.capitalize!   #=> "Hello"
 *     a               #=> "Hello"
 *     a.capitalize!   #=> nil
 */

static VALUE
rb_str_capitalize_bang(VALUE str)
{
    char *s, *send;
    int modify = 0;

    rb_str_modify(str);
    if (RSTRING(str)->len == 0 || !RSTRING(str)->ptr) return Qnil;
    s = RSTRING(str)->ptr; send = s + RSTRING(str)->len;
    if (ISLOWER(*s)) {
        *s = toupper(*s);
        modify = 1;
    }
    while (++s < send) {
        if (ismbchar(*s)) {
            s+=mbclen(*s) - 1;
        }
        else if (ISUPPER(*s)) {
            *s = tolower(*s);
            modify = 1;
        }
    }
    if (modify) return str;
    return Qnil;
}

/*
 *  call-seq:
 *     str.capitalize   => new_str
 *
 *  Returns a copy of <i>str</i> with the first character converted to uppercase
 *  and the remainder to lowercase.
 *
 *     "hello".capitalize    #=> "Hello"
 *     "HELLO".capitalize    #=> "Hello"
 *     "123ABC".capitalize   #=> "123abc"
 */

static VALUE
rb_str_capitalize(VALUE str)
{
    str = rb_str_dup(str);
    rb_str_capitalize_bang(str);
    return str;
}

/*
 *  call-seq:
 *     str.swapcase!   => str or nil
 *
 *  Equivalent to <code>String#swapcase</code>, but modifies the receiver in
 *  place, returning <i>str</i>, or <code>nil</code> if no changes were made.
 */

static VALUE
rb_str_swapcase_bang(VALUE str)
{
    char *s, *send;
    int modify = 0;

    rb_str_modify(str);
    s = RSTRING(str)->ptr; send = s + RSTRING(str)->len;
    while (s < send) {
        if (ismbchar(*s)) {
            s+=mbclen(*s) - 1;
        }
        else if (ISUPPER(*s)) {
            *s = tolower(*s);
            modify = 1;
        }
        else if (ISLOWER(*s)) {
            *s = toupper(*s);
            modify = 1;
        }
        s++;
    }

    if (modify) return str;
    return Qnil;
}

/*
 *  call-seq:
 *     str.swapcase   => new_str
 *
 *  Returns a copy of <i>str</i> with uppercase alphabetic characters converted
 *  to lowercase and lowercase characters converted to uppercase.
 *
 *     "Hello".swapcase          #=> "hELLO"
 *     "cYbEr_PuNk11".swapcase   #=> "CyBeR_pUnK11"
 */

static VALUE
rb_str_swapcase(VALUE str)
{
    str = rb_str_dup(str);
    rb_str_swapcase_bang(str);
    return str;
}

typedef unsigned char *USTR;

struct tr {
    int gen, now, max;
    char *p, *pend;
};

static int
trnext(struct tr *t)
{
    for (;;) {
        if (!t->gen) {
            if (t->p == t->pend) return -1;
            if (t->p < t->pend - 1 && *t->p == '\\') {
                t->p++;
            }
            t->now = *(USTR)t->p++;
            if (t->p < t->pend - 1 && *t->p == '-') {
                t->p++;
                if (t->p < t->pend) {
                    if (t->now > *(USTR)t->p) {
                        t->p++;
                        continue;
                    }
                    t->gen = 1;
                    t->max = *(USTR)t->p++;
                }
            }
            return t->now;
        }
        else if (++t->now < t->max) {
            return t->now;
        }
        else {
            t->gen = 0;
            return t->max;
        }
    }
}

static VALUE rb_str_delete_bang(int,VALUE*,VALUE);

static VALUE
tr_trans(VALUE str, VALUE src, VALUE repl, int sflag)
{
    struct tr trsrc, trrepl;
    int cflag = 0;
    int trans[256];
    int i, c, modify = 0;
    char *s, *send;

    StringValue(src);
    StringValue(repl);
    if (RSTRING(str)->len == 0 || !RSTRING(str)->ptr) return Qnil;
    trsrc.p = RSTRING(src)->ptr; trsrc.pend = trsrc.p + RSTRING(src)->len;
    if (RSTRING(src)->len >= 2 && RSTRING(src)->ptr[0] == '^') {
        cflag++;
        trsrc.p++;
    }
    if (RSTRING(repl)->len == 0) {
        return rb_str_delete_bang(1, &src, str);
    }
    trrepl.p = RSTRING(repl)->ptr;
    trrepl.pend = trrepl.p + RSTRING(repl)->len;
    trsrc.gen = trrepl.gen = 0;
    trsrc.now = trrepl.now = 0;
    trsrc.max = trrepl.max = 0;

    if (cflag) {
        for (i=0; i<256; i++) {
            trans[i] = 1;
        }
        while ((c = trnext(&trsrc)) >= 0) {
            trans[c & 0xff] = -1;
        }
        while ((c = trnext(&trrepl)) >= 0)
            /* retrieve last replacer */;
        for (i=0; i<256; i++) {
            if (trans[i] >= 0) {
                trans[i] = trrepl.now;
            }
        }
    }
    else {
        int r;

        for (i=0; i<256; i++) {
            trans[i] = -1;
        }
        while ((c = trnext(&trsrc)) >= 0) {
            r = trnext(&trrepl);
            if (r == -1) r = trrepl.now;
            trans[c & 0xff] = r;
        }
    }

    rb_str_modify(str);
    s = RSTRING(str)->ptr; send = s + RSTRING(str)->len;
    if (sflag) {
        char *t = s;
        int c0, last = -1;

        while (s < send) {
            c0 = *s++;
            if ((c = trans[c0 & 0xff]) >= 0) {
                if (last == c) continue;
                last = c;
                *t++ = c & 0xff;
                modify = 1;
            }
            else {
                last = -1;
                *t++ = c0;
            }
        }
        if (RSTRING(str)->len > (t - RSTRING(str)->ptr)) {
            RSTRING(str)->len = (t - RSTRING(str)->ptr);
            modify = 1;
            *t = '\0';
        }
    }
    else {
        while (s < send) {
            if ((c = trans[*s & 0xff]) >= 0) {
                *s = c & 0xff;
                modify = 1;
            }
            s++;
        }
    }

    if (modify) return str;
    return Qnil;
}

/*
 *  call-seq:
 *     str.tr!(from_str, to_str)   => str or nil
 *
 *  Translates <i>str</i> in place, using the same rules as
 *  <code>String#tr</code>. Returns <i>str</i>, or <code>nil</code> if no
 *  changes were made.
 */

static VALUE
rb_str_tr_bang(VALUE str, VALUE src, VALUE repl)
{
    return tr_trans(str, src, repl, 0);
}

/*
 *  call-seq:
 *     str.tr(from_str, to_str)   => new_str
 *
 *  Returns a copy of <i>str</i> with the characters in <i>from_str</i> replaced
 *  by the corresponding characters in <i>to_str</i>. If <i>to_str</i> is
 *  shorter than <i>from_str</i>, it is padded with its last character. Both
 *  strings may use the c1--c2 notation to denote ranges of characters, and
 *  <i>from_str</i> may start with a <code>^</code>, which denotes all
 *  characters except those listed.
 *
 *     "hello".tr('aeiou', '*')    #=> "h*ll*"
 *     "hello".tr('^aeiou', '*')   #=> "*e**o"
 *     "hello".tr('el', 'ip')      #=> "hippo"
 *     "hello".tr('a-y', 'b-z')    #=> "ifmmp"
 */

static VALUE
rb_str_tr(VALUE str, VALUE src, VALUE repl)
{
    str = rb_str_dup(str);
    tr_trans(str, src, repl, 0);
    return str;
}

static void
tr_setup_table(VALUE str, char table[256], int init)
{
    char buf[256];
    struct tr tr;
    int i, c;
    int cflag = 0;

    tr.p = RSTRING(str)->ptr; tr.pend = tr.p + RSTRING(str)->len;
    tr.gen = tr.now = tr.max = 0;
    if (RSTRING(str)->len > 1 && RSTRING(str)->ptr[0] == '^') {
        cflag = 1;
        tr.p++;
    }

    if (init) {
        for (i=0; i<256; i++) {
            table[i] = 1;
        }
    }
    for (i=0; i<256; i++) {
        buf[i] = cflag;
    }
    while ((c = trnext(&tr)) >= 0) {
        buf[c & 0xff] = !cflag;
    }
    for (i=0; i<256; i++) {
        table[i] = table[i] && buf[i];
    }
}

/*
 *  call-seq:
 *     str.delete!([other_str]+>)   => str or nil
 *
 *  Performs a <code>delete</code> operation in place, returning <i>str</i>, or
 *  <code>nil</code> if <i>str</i> was not modified.
 */

static VALUE
rb_str_delete_bang(int argc, VALUE *argv, VALUE str)
{
    char *s, *send, *t;
    char squeez[256];
    int modify = 0;
    int init = 1;
    int i;

    if (argc < 1) {
        rb_raise(rb_eArgError, "wrong number of arguments");
    }
    for (i=0; i<argc; i++) {
        VALUE s = argv[i];

        StringValue(s);
        tr_setup_table(s, squeez, init);
        init = 0;
    }

    rb_str_modify(str);
    s = t = RSTRING(str)->ptr;
    if (!s || RSTRING(str)->len == 0) return Qnil;
    send = s + RSTRING(str)->len;
    while (s < send) {
        if (squeez[*s & 0xff])
            modify = 1;
        else
            *t++ = *s;
        s++;
    }
    *t = '\0';
    RSTRING(str)->len = t - RSTRING(str)->ptr;

    if (modify) return str;
    return Qnil;
}

/*
 *  call-seq:
 *     str.delete([other_str]+)   => new_str
 *
 *  Returns a copy of <i>str</i> with all characters in the intersection of its
 *  arguments deleted. Uses the same rules for building the set of characters as
 *  <code>String#count</code>.
 *
 *     "hello".delete "l","lo"        #=> "heo"
 *     "hello".delete "lo"            #=> "he"
 *     "hello".delete "aeiou", "^e"   #=> "hell"
 *     "hello".delete "ej-m"          #=> "ho"
 */

static VALUE
rb_str_delete(int argc, VALUE *argv, VALUE str)
{
    str = rb_str_dup(str);
    rb_str_delete_bang(argc, argv, str);
    return str;
}

/*
 *  call-seq:
 *     str.squeeze!([other_str]*)   => str or nil
 *
 *  Squeezes <i>str</i> in place, returning either <i>str</i>, or
 *  <code>nil</code> if no changes were made.
 */

static VALUE
rb_str_squeeze_bang(int argc, VALUE *argv, VALUE str)
{
    char squeez[256];
    char *s, *send, *t;
    int c, save, modify = 0;
    int init = 1;
    int i;

    if (argc == 0) {
        for (i=0; i<256; i++) {
            squeez[i] = 1;
        }
    }
    else {
        for (i=0; i<argc; i++) {
            VALUE s = argv[i];

            StringValue(s);
            tr_setup_table(s, squeez, init);
            init = 0;
        }
    }

    rb_str_modify(str);
    s = t = RSTRING(str)->ptr;
    if (!s || RSTRING(str)->len == 0) return Qnil;
    send = s + RSTRING(str)->len;
    save = -1;
    while (s < send) {
        c = *s++ & 0xff;
        if (c != save || !squeez[c]) {
            *t++ = save = c;
        }
    }
    *t = '\0';
    if (t - RSTRING(str)->ptr != RSTRING(str)->len) {
        RSTRING(str)->len = t - RSTRING(str)->ptr;
        modify = 1;
    }

    if (modify) return str;
    return Qnil;
}

/*
 *  call-seq:
 *     str.squeeze([other_str]*)    => new_str
 *
 *  Builds a set of characters from the <i>other_str</i> parameter(s) using the
 *  procedure described for <code>String#count</code>. Returns a new string
 *  where runs of the same character that occur in this set are replaced by a
 *  single character. If no arguments are given, all runs of identical
 *  characters are replaced by a single character.
 *
 *     "yellow moon".squeeze                  #=> "yelow mon"
 *     "  now   is  the".squeeze(" ")         #=> " now is the"
 *     "putters shoot balls".squeeze("m-z")   #=> "puters shot balls"
 */

static VALUE
rb_str_squeeze(int argc, VALUE *argv, VALUE str)
{
    str = rb_str_dup(str);
    rb_str_squeeze_bang(argc, argv, str);
    return str;
}

/*
 *  call-seq:
 *     str.tr_s!(from_str, to_str)   => str or nil
 *
 *  Performs <code>String#tr_s</code> processing on <i>str</i> in place,
 *  returning <i>str</i>, or <code>nil</code> if no changes were made.
 */

static VALUE
rb_str_tr_s_bang(VALUE str, VALUE src, VALUE repl)
{
    return tr_trans(str, src, repl, 1);
}

/*
 *  call-seq:
 *     str.tr_s(from_str, to_str)   => new_str
 *
 *  Processes a copy of <i>str</i> as described under <code>String#tr</code>,
 *  then removes duplicate characters in regions that were affected by the
 *  translation.
 *
 *     "hello".tr_s('l', 'r')     #=> "hero"
 *     "hello".tr_s('el', '*')    #=> "h*o"
 *     "hello".tr_s('el', 'hx')   #=> "hhxo"
 */

static VALUE
rb_str_tr_s(VALUE str, VALUE src, VALUE repl)
{
    str = rb_str_dup(str);
    tr_trans(str, src, repl, 1);
    return str;
}

/*
 *  call-seq:
 *     str.count([other_str]+)   => fixnum
 *
 *  Each <i>other_str</i> parameter defines a set of characters to count.  The
 *  intersection of these sets defines the characters to count in
 *  <i>str</i>. Any <i>other_str</i> that starts with a caret (^) is
 *  negated. The sequence c1--c2 means all characters between c1 and c2.
 *
 *     a = "hello world"
 *     a.count "lo"            #=> 5
 *     a.count "lo", "o"       #=> 2
 *     a.count "hello", "^l"   #=> 4
 *     a.count "ej-m"          #=> 4
 */

static VALUE
rb_str_count(int argc, VALUE *argv, VALUE str)
{
    char table[256];
    char *s, *send;
    int init = 1;
    int i;

    if (argc < 1) {
        rb_raise(rb_eArgError, "wrong number of arguments");
    }
    for (i=0; i<argc; i++) {
        VALUE s = argv[i];

        StringValue(s);
        tr_setup_table(s, table, init);
        init = 0;
    }

    s = RSTRING(str)->ptr;
    if (!s || RSTRING(str)->len == 0) return INT2FIX(0);
    send = s + RSTRING(str)->len;
    i = 0;
    while (s < send) {
        if (table[*s++ & 0xff]) {
            i++;
        }
    }
    return INT2NUM(i);
}

/*
 *  call-seq:
 *     str.split(pattern=$;, [limit])   => anArray
 *
 *  Divides <i>str</i> into substrings based on a delimiter, returning an array
 *  of these substrings.
 *
 *  If <i>pattern</i> is a <code>String</code>, then its contents are used as
 *  the delimiter when splitting <i>str</i>. If <i>pattern</i> is a single
 *  space, <i>str</i> is split on whitespace, with leading whitespace and runs
 *  of contiguous whitespace characters ignored.
 *
 *  If <i>pattern</i> is a <code>Regexp</code>, <i>str</i> is divided where the
 *  pattern matches. Whenever the pattern matches a zero-length string,
 *  <i>str</i> is split into individual characters.
 *
 *  If <i>pattern</i> is omitted, the value of <code>$;</code> is used.  If
 *  <code>$;</code> is <code>nil</code> (which is the default), <i>str</i> is
 *  split on whitespace as if ` ' were specified.
 *
 *  If the <i>limit</i> parameter is omitted, trailing null fields are
 *  suppressed. If <i>limit</i> is a positive number, at most that number of
 *  fields will be returned (if <i>limit</i> is <code>1</code>, the entire
 *  string is returned as the only entry in an array). If negative, there is no
 *  limit to the number of fields returned, and trailing null fields are not
 *  suppressed.
 *
 *     " now's  the time".split        #=> ["now's", "the", "time"]
 *     " now's  the time".split(' ')   #=> ["now's", "the", "time"]
 *     " now's  the time".split(/ /)   #=> ["", "now's", "", "the", "time"]
 *     "1, 2.34,56, 7".split(%r{,\s*}) #=> ["1", "2.34", "56", "7"]
 *     "hello".split(//)               #=> ["h", "e", "l", "l", "o"]
 *     "hello".split(//, 3)            #=> ["h", "e", "llo"]
 *     "hi mom".split(%r{\s*})         #=> ["h", "i", "m", "o", "m"]
 *
 *     "mellow yellow".split("ello")   #=> ["m", "w y", "w"]
 *     "1,2,,3,4,,".split(',')         #=> ["1", "2", "", "3", "4"]
 *     "1,2,,3,4,,".split(',', 4)      #=> ["1", "2", "", "3,4,,"]
 *     "1,2,,3,4,,".split(',', -4)     #=> ["1", "2", "", "3", "4", "", ""]
 */

static VALUE
rb_str_split_m(int argc, VALUE *argv, VALUE str)
{
    VALUE spat;
    VALUE limit;
    int awk_split = Qfalse;
    long beg, end, i = 0;
    int lim = 0;
    VALUE result, tmp;

    if (rb_scan_args(argc, argv, "02", &spat, &limit) == 2) {
        lim = NUM2INT(limit);
        if (lim <= 0) limit = Qnil;
        else if (lim == 1) {
            if (RSTRING(str)->len == 0)
                return rb_ary_new2(0);
            return rb_ary_new3(1, str);
        }
        i = 1;
    }

    if (NIL_P(spat)) {
        if (!NIL_P(rb_fs)) {
            spat = rb_fs;
            goto fs_set;
        }
        awk_split = Qtrue;
    }
    else {
      fs_set:
        if (TYPE(spat) == T_STRING && RSTRING(spat)->len == 1) {
            if (RSTRING(spat)->ptr[0] == ' ') {
                awk_split = Qtrue;
            }
            else {
                spat = rb_reg_regcomp(rb_reg_quote(spat));
            }
        }
        else {
            spat = get_pat(spat, 1);
        }
    }

    result = rb_ary_new();
    beg = 0;
    if (awk_split) {
        char *ptr = RSTRING(str)->ptr;
        long len = RSTRING(str)->len;
        char *eptr = ptr + len;
        int skip = 1;

        for (end = beg = 0; ptr<eptr; ptr++) {
            if (skip) {
                if (ISSPACE(*ptr)) {
                    beg++;
                }
                else {
                    end = beg+1;
                    skip = 0;
                    if (!NIL_P(limit) && lim <= i) break;
                }
            }
            else {
                if (ISSPACE(*ptr)) {
                    rb_ary_push(result, rb_str_substr(str, beg, end-beg));
                    skip = 1;
                    beg = end + 1;
                    if (!NIL_P(limit)) ++i;
                }
                else {
                    end++;
                }
            }
        }
    }
    else {
        long start = beg;
        long idx;
        int last_null = 0;
        struct re_registers *regs;

        while ((end = rb_reg_search(spat, str, start, 0)) >= 0) {
            regs = RMATCH(rb_backref_get())->regs;
            if (start == end && BEG(0) == END(0)) {
                if (!RSTRING(str)->ptr) {
                    rb_ary_push(result, rb_str_new("", 0));
                    break;
                }
                else if (last_null == 1) {
                    rb_ary_push(result, rb_str_substr(str, beg, mbclen2(RSTRING(str)->ptr[beg],spat)));
                    beg = start;
                }
                else {
                    start += mbclen2(RSTRING(str)->ptr[start],spat);
                    last_null = 1;
                    continue;
                }
            }
            else {
                rb_ary_push(result, rb_str_substr(str, beg, end-beg));
                beg = start = END(0);
            }
            last_null = 0;

            for (idx=1; idx < regs->num_regs; idx++) {
                if (BEG(idx) == -1) continue;
                if (BEG(idx) == END(idx))
                    tmp = rb_str_new5(str, 0, 0);
                else
                    tmp = rb_str_substr(str, BEG(idx), END(idx)-BEG(idx));
                rb_ary_push(result, tmp);
            }
            if (!NIL_P(limit) && lim <= ++i) break;
        }
    }
    if (RSTRING(str)->len > 0 && (!NIL_P(limit) || RSTRING(str)->len > beg || lim < 0)) {
        if (RSTRING(str)->len == beg)
            tmp = rb_str_new5(str, 0, 0);
        else
            tmp = rb_str_substr(str, beg, RSTRING(str)->len-beg);
        rb_ary_push(result, tmp);
    }
    if (NIL_P(limit) && lim == 0) {
        while (RARRAY(result)->len > 0 &&
               RSTRING(RARRAY(result)->ptr[RARRAY(result)->len-1])->len == 0)
            rb_ary_pop(result);
    }

    return result;
}

VALUE
rb_str_split(VALUE str, const char *sep0)
{
    VALUE sep;

    StringValue(str);
    sep = rb_str_new2(sep0);
    return rb_str_split_m(1, &sep, str);
}

/*
 *  call-seq:
 *     str.each(separator=$/) {|substr| block }        => str
 *     str.each_line(separator=$/) {|substr| block }   => str
 *
 *  Splits <i>str</i> using the supplied parameter as the record separator
 *  (<code>$/</code> by default), passing each substring in turn to the supplied
 *  block. If a zero-length record separator is supplied, the string is split on
 *  <code>\n</code> characters, except that multiple successive newlines are
 *  appended together.
 *
 *     print "Example one\n"
 *     "hello\nworld".each {|s| p s}
 *     print "Example two\n"
 *     "hello\nworld".each('l') {|s| p s}
 *     print "Example three\n"
 *     "hello\n\n\nworld".each('') {|s| p s}
 *
 *  <em>produces:</em>
 *
 *     Example one
 *     "hello\n"
 *     "world"
 *     Example two
 *     "hel"
 *     "l"
 *     "o\nworl"
 *     "d"
 *     Example three
 *     "hello\n\n\n"
 *     "world"
 */

static VALUE
rb_str_each_line(int argc, VALUE *argv, VALUE str)
{
    VALUE rs;
    int newline;
    char *p = RSTRING(str)->ptr, *pend = p + RSTRING(str)->len, *s;
    char *ptr = p;
    long len = RSTRING(str)->len, rslen;
    VALUE line;

    if (rb_scan_args(argc, argv, "01", &rs) == 0) {
        rs = rb_rs;
    }

    RETURN_ENUMERATOR(str, argc, argv);

    if (NIL_P(rs)) {
        rb_yield(str);
        return str;
    }
    StringValue(rs);
    rslen = RSTRING(rs)->len;
    if (rslen == 0) {
        newline = '\n';
    }
    else {
        newline = RSTRING(rs)->ptr[rslen-1];
    }

    for (s = p, p += rslen; p < pend; p++) {
        if (rslen == 0 && *p == '\n') {
            if (*++p != '\n') continue;
            while (*p == '\n') p++;
        }
        if (RSTRING(str)->ptr < p && p[-1] == newline &&
            (rslen <= 1 ||
             rb_memcmp(RSTRING(rs)->ptr, p-rslen, rslen) == 0)) {
            line = rb_str_new5(str, s, p - s);
            OBJ_INFECT(line, str);
            rb_yield(line);
            str_mod_check(str, ptr, len);
            s = p;
        }
    }

    if (s != pend) {
        if (p > pend) p = pend;
        line = rb_str_new5(str, s, p - s);
        OBJ_INFECT(line, str);
        rb_yield(line);
    }

    return str;
}

/*
 *  call-seq:
 *     str.each_byte {|fixnum| block }    => str
 *
 *  Passes each byte in <i>str</i> to the given block.
 *
 *     "hello".each_byte {|c| print c, ' ' }
 *
 *  <em>produces:</em>
 *
 *     104 101 108 108 111
 */

static VALUE
rb_str_each_byte(VALUE str)
{
    long i;

    RETURN_ENUMERATOR(str, 0, 0);
    for (i=0; i<RSTRING(str)->len; i++) {
        rb_yield(INT2FIX(RSTRING(str)->ptr[i] & 0xff));
    }
    return str;
}

/*
 *  call-seq:
 *     str.chop!   => str or nil
 *
 *  Processes <i>str</i> as for <code>String#chop</code>, returning <i>str</i>,
 *  or <code>nil</code> if <i>str</i> is the empty string.  See also
 *  <code>String#chomp!</code>.
 */

static VALUE
rb_str_chop_bang(VALUE str)
{
    if (RSTRING(str)->len > 0) {
        rb_str_modify(str);
        RSTRING(str)->len--;
        if (RSTRING(str)->ptr[RSTRING(str)->len] == '\n') {
            if (RSTRING(str)->len > 0 &&
                RSTRING(str)->ptr[RSTRING(str)->len-1] == '\r') {
                RSTRING(str)->len--;
            }
        }
        RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
        return str;
    }
    return Qnil;
}

/*
 *  call-seq:
 *     str.chop   => new_str
 *
 *  Returns a new <code>String</code> with the last character removed.  If the
 *  string ends with <code>\r\n</code>, both characters are removed. Applying
 *  <code>chop</code> to an empty string returns an empty
 *  string. <code>String#chomp</code> is often a safer alternative, as it leaves
 *  the string unchanged if it doesn't end in a record separator.
 *
 *     "string\r\n".chop   #=> "string"
 *     "string\n\r".chop   #=> "string\n"
 *     "string\n".chop     #=> "string"
 *     "string".chop       #=> "strin"
 *     "x".chop.chop       #=> ""
 */

static VALUE
rb_str_chop(VALUE str)
{
    str = rb_str_dup(str);
    rb_str_chop_bang(str);
    return str;
}

/*
 *  call-seq:
 *     str.chomp!(separator=$/)   => str or nil
 *
 *  Modifies <i>str</i> in place as described for <code>String#chomp</code>,
 *  returning <i>str</i>, or <code>nil</code> if no modifications were made.
 */

static VALUE
rb_str_chomp_bang(int argc, VALUE *argv, VALUE str)
{
    VALUE rs;
    int newline;
    char *p;
    long len, rslen;

    if (rb_scan_args(argc, argv, "01", &rs) == 0) {
        len = RSTRING(str)->len;
        if (len == 0) return Qnil;
        p = RSTRING(str)->ptr;
        rs = rb_rs;
        if (rs == rb_default_rs) {
          smart_chomp:
            rb_str_modify(str);
            if (RSTRING(str)->ptr[len-1] == '\n') {
                RSTRING(str)->len--;
                if (RSTRING(str)->len > 0 &&
                    RSTRING(str)->ptr[RSTRING(str)->len-1] == '\r') {
                    RSTRING(str)->len--;
                }
            }
            else if (RSTRING(str)->ptr[len-1] == '\r') {
                RSTRING(str)->len--;
            }
            else {
                return Qnil;
            }
            RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
            return str;
        }
    }
    if (NIL_P(rs)) return Qnil;
    StringValue(rs);
    len = RSTRING(str)->len;
    if (len == 0) return Qnil;
    p = RSTRING(str)->ptr;
    rslen = RSTRING(rs)->len;
    if (rslen == 0) {
        while (len>0 && p[len-1] == '\n') {
            len--;
            if (len>0 && p[len-1] == '\r')
                len--;
        }
        if (len < RSTRING(str)->len) {
            rb_str_modify(str);
            RSTRING(str)->len = len;
            RSTRING(str)->ptr[len] = '\0';
            return str;
        }
        return Qnil;
    }
    if (rslen > len) return Qnil;
    newline = RSTRING(rs)->ptr[rslen-1];
    if (rslen == 1 && newline == '\n')
        goto smart_chomp;

    if (p[len-1] == newline &&
        (rslen <= 1 ||
         rb_memcmp(RSTRING(rs)->ptr, p+len-rslen, rslen) == 0)) {
        rb_str_modify(str);
        RSTRING(str)->len -= rslen;
        RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
        return str;
    }
    return Qnil;
}

/*
 *  call-seq:
 *     str.chomp(separator=$/)   => new_str
 *
 *  Returns a new <code>String</code> with the given record separator removed
 *  from the end of <i>str</i> (if present). If <code>$/</code> has not been
 *  changed from the default Ruby record separator, then <code>chomp</code> also
 *  removes carriage return characters (that is it will remove <code>\n</code>,
 *  <code>\r</code>, and <code>\r\n</code>).
 *
 *     "hello".chomp            #=> "hello"
 *     "hello\n".chomp          #=> "hello"
 *     "hello\r\n".chomp        #=> "hello"
 *     "hello\n\r".chomp        #=> "hello\n"
 *     "hello\r".chomp          #=> "hello"
 *     "hello \n there".chomp   #=> "hello \n there"
 *     "hello".chomp("llo")     #=> "he"
 */

static VALUE
rb_str_chomp(int argc, VALUE *argv, VALUE str)
{
    str = rb_str_dup(str);
    rb_str_chomp_bang(argc, argv, str);
    return str;
}

/*
 *  call-seq:
 *     str.lstrip!   => self or nil
 *
 *  Removes leading whitespace from <i>str</i>, returning <code>nil</code> if no
 *  change was made. See also <code>String#rstrip!</code> and
 *  <code>String#strip!</code>.
 *
 *     "  hello  ".lstrip   #=> "hello  "
 *     "hello".lstrip!      #=> nil
 */

static VALUE
rb_str_lstrip_bang(VALUE str)
{
    char *s, *t, *e;

    s = RSTRING(str)->ptr;
    if (!s || RSTRING(str)->len == 0) return Qnil;
    e = t = s + RSTRING(str)->len;
    /* remove spaces at head */
    while (s < t && ISSPACE(*s)) s++;

    if (s > RSTRING(str)->ptr) {
        rb_str_modify(str);
        RSTRING(str)->len = t-s;
        memmove(RSTRING(str)->ptr, s, RSTRING(str)->len);
        RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
        return str;
    }
    return Qnil;
}

/*
 *  call-seq:
 *     str.lstrip   => new_str
 *
 *  Returns a copy of <i>str</i> with leading whitespace removed. See also
 *  <code>String#rstrip</code> and <code>String#strip</code>.
 *
 *     "  hello  ".lstrip   #=> "hello  "
 *     "hello".lstrip       #=> "hello"
 */

static VALUE
rb_str_lstrip(VALUE str)
{
    str = rb_str_dup(str);
    rb_str_lstrip_bang(str);
    return str;
}

/*
 *  call-seq:
 *     str.rstrip!   => self or nil
 *
 *  Removes trailing whitespace from <i>str</i>, returning <code>nil</code> if
 *  no change was made. See also <code>String#lstrip!</code> and
 *  <code>String#strip!</code>.
 *
 *     "  hello  ".rstrip   #=> "  hello"
 *     "hello".rstrip!      #=> nil
 */

static VALUE
rb_str_rstrip_bang(VALUE str)
{
    char *s, *t, *e;

    s = RSTRING(str)->ptr;
    if (!s || RSTRING(str)->len == 0) return Qnil;
    e = t = s + RSTRING(str)->len;

    /* remove trailing '\0's */
    while (s < t && t[-1] == '\0') t--;

    /* remove trailing spaces */
    while (s < t && ISSPACE(*(t-1))) t--;

    if (t < e) {
        rb_str_modify(str);
        RSTRING(str)->len = t-s;
        RSTRING(str)->ptr[RSTRING(str)->len] = '\0';
        return str;
    }
    return Qnil;
}

/*
 *  call-seq:
 *     str.rstrip   => new_str
 *
 *  Returns a copy of <i>str</i> with trailing whitespace removed. See also
 *  <code>String#lstrip</code> and <code>String#strip</code>.
 *
 *     "  hello  ".rstrip   #=> "  hello"
 *     "hello".rstrip       #=> "hello"
 */

static VALUE
rb_str_rstrip(VALUE str)
{
    str = rb_str_dup(str);
    rb_str_rstrip_bang(str);
    return str;
}

/*
 *  call-seq:
 *     str.strip!   => str or nil
 *
 *  Removes leading and trailing whitespace from <i>str</i>. Returns
 *  <code>nil</code> if <i>str</i> was not altered.
 */

static VALUE
rb_str_strip_bang(VALUE str)
{
    VALUE l = rb_str_lstrip_bang(str);
    VALUE r = rb_str_rstrip_bang(str);

    if (NIL_P(l) && NIL_P(r)) return Qnil;
    return str;
}

/*
 *  call-seq:
 *     str.strip   => new_str
 *
 *  Returns a copy of <i>str</i> with leading and trailing whitespace removed.
 *
 *     "    hello    ".strip   #=> "hello"
 *     "\tgoodbye\r\n".strip   #=> "goodbye"
 */

static VALUE
rb_str_strip(VALUE str)
{
    str = rb_str_dup(str);
    rb_str_strip_bang(str);
    return str;
}

static VALUE
scan_once(VALUE str, VALUE pat, long *start)
{
    VALUE result, match;
    struct re_registers *regs;
    long i;

    if (rb_reg_search(pat, str, *start, 0) >= 0) {
        match = rb_backref_get();
        regs = RMATCH(match)->regs;
        if (BEG(0) == END(0)) {
            /*
             * Always consume at least one character of the input string
             */
            if (RSTRING(str)->len > END(0))
                *start = END(0)+mbclen2(RSTRING(str)->ptr[END(0)],pat);
            else
                *start = END(0)+1;
        }
        else {
            *start = END(0);
        }
        if (regs->num_regs == 1) {
            return rb_reg_nth_match(0, match);
        }
        result = rb_ary_new2(regs->num_regs);
        for (i=1; i < regs->num_regs; i++) {
            rb_ary_push(result, rb_reg_nth_match(i, match));
        }

        return result;
    }
    return Qnil;
}

/*
 *  call-seq:
 *     str.scan(pattern)                         => array
 *     str.scan(pattern) {|match, ...| block }   => str
 *
 *  Both forms iterate through <i>str</i>, matching the pattern (which may be a
 *  <code>Regexp</code> or a <code>String</code>). For each match, a result is
 *  generated and either added to the result array or passed to the block. If
 *  the pattern contains no groups, each individual result consists of the
 *  matched string, <code>$&</code>.  If the pattern contains groups, each
 *  individual result is itself an array containing one entry per group.
 *
 *     a = "cruel world"
 *     a.scan(/\w+/)        #=> ["cruel", "world"]
 *     a.scan(/.../)        #=> ["cru", "el ", "wor"]
 *     a.scan(/(...)/)      #=> [["cru"], ["el "], ["wor"]]
 *     a.scan(/(..)(..)/)   #=> [["cr", "ue"], ["l ", "wo"]]
 *
 *  And the block form:
 *
 *     a.scan(/\w+/) {|w| print "<<#{w}>> " }
 *     print "\n"
 *     a.scan(/(.)(.)/) {|a,b| print b, a }
 *     print "\n"
 *
 *  <em>produces:</em>
 *
 *     <<cruel>> <<world>>
 *     rceu lowlr
 */

static VALUE
rb_str_scan(VALUE str, VALUE pat)
{
    VALUE result;
    long start = 0;
    VALUE match = Qnil;

    pat = get_pat(pat, 1);
    if (!rb_block_given_p()) {
        VALUE ary = rb_ary_new();

        while (!NIL_P(result = scan_once(str, pat, &start))) {
            match = rb_backref_get();
            rb_ary_push(ary, result);
        }
        rb_backref_set(match);
        return ary;
    }

    while (!NIL_P(result = scan_once(str, pat, &start))) {
        match = rb_backref_get();
        rb_match_busy(match);
        rb_yield(result);
        rb_backref_set(match);  /* restore $~ value */
    }
    rb_backref_set(match);
    return str;
}

/*
 *  call-seq:
 *     str.hex   => integer
 *
 *  Treats leading characters from <i>str</i> as a string of hexadecimal digits
 *  (with an optional sign and an optional <code>0x</code>) and returns the
 *  corresponding number. Zero is returned on error.
 *
 *     "0x0a".hex     #=> 10
 *     "-1234".hex    #=> -4660
 *     "0".hex        #=> 0
 *     "wombat".hex   #=> 0
 */

static VALUE
rb_str_hex(VALUE str)
{
    return rb_str_to_inum(str, 16, Qfalse);
}

/*
 *  call-seq:
 *     str.oct   => integer
 *
 *  Treats leading characters of <i>str</i> as a string of octal digits (with an
 *  optional sign) and returns the corresponding number.  Returns 0 if the
 *  conversion fails.
 *
 *     "123".oct       #=> 83
 *     "-377".oct      #=> -255
 *     "bad".oct       #=> 0
 *     "0377bad".oct   #=> 255
 */

static VALUE
rb_str_oct(VALUE str)
{
    return rb_str_to_inum(str, -8, Qfalse);
}

/*
 *  call-seq:
 *     str.crypt(other_str)   => new_str
 *
 *  Applies a one-way cryptographic hash to <i>str</i> by invoking the standard
 *  library function <code>crypt</code>. The argument is the salt string, which
 *  should be two characters long, each character drawn from
 *  <code>[a-zA-Z0-9./]</code>.
 */

static VALUE
rb_str_crypt(VALUE str, VALUE salt)
{
    extern char *crypt(const char *, const char *);
    VALUE result;
    char *s;

    StringValue(salt);
    if (RSTRING(salt)->len < 2)
        rb_raise(rb_eArgError, "salt too short (need >=2 bytes)");

    if (RSTRING(str)->ptr) s = RSTRING(str)->ptr;
    else s = "";
    result = rb_str_new2(crypt(s, RSTRING(salt)->ptr));
    OBJ_INFECT(result, str);
    OBJ_INFECT(result, salt);
    return result;
}

/*
 *  call-seq:
 *     str.intern   => symbol
 *     str.to_sym   => symbol
 *
 *  Returns the <code>Symbol</code> corresponding to <i>str</i>, creating the
 *  symbol if it did not previously exist. See <code>Symbol#id2name</code>.
 *
 *     "Koala".intern         #=> :Koala
 *     s = 'cat'.to_sym       #=> :cat
 *     s == :cat              #=> true
 *     s = '@cat'.to_sym      #=> :@cat
 *     s == :@cat             #=> true
 *
 *  This can also be used to create symbols that cannot be represented using the
 *  <code>:xxx</code> notation.
 *
 *     'cat and dog'.to_sym   #=> :"cat and dog"
 */

VALUE
rb_str_intern(VALUE s)
{
    volatile VALUE str = s;
    ID id;

    if (!RSTRING(str)->ptr || RSTRING(str)->len == 0) {
        rb_raise(rb_eArgError, "interning empty string");
    }
    if (strlen(RSTRING(str)->ptr) != RSTRING(str)->len)
        rb_raise(rb_eArgError, "symbol string may not contain `\\0'");
    id = rb_intern(RSTRING(str)->ptr);
    return ID2SYM(id);
}

/*
 *  call-seq:
 *     str.sum(n=16)   => integer
 *
 *  Returns a basic <em>n</em>-bit checksum of the characters in <i>str</i>,
 *  where <em>n</em> is the optional <code>Fixnum</code> parameter, defaulting
 *  to 16. The result is simply the sum of the binary value of each character in
 *  <i>str</i> modulo <code>2n - 1</code>. This is not a particularly good
 *  checksum.
 */

static VALUE
rb_str_sum(int argc, VALUE *argv, VALUE str)
{
    VALUE vbits;
    int bits;
    char *ptr, *p, *pend;
    long len;

    if (rb_scan_args(argc, argv, "01", &vbits) == 0) {
        bits = 16;
    }
    else bits = NUM2INT(vbits);

    ptr = p = RSTRING(str)->ptr;
    len = RSTRING(str)->len;
    pend = p + len;
    if (bits >= sizeof(long)*CHAR_BIT) {
        VALUE sum = INT2FIX(0);

        while (p < pend) {
            str_mod_check(str, ptr, len);
            sum = rb_funcall(sum, '+', 1, INT2FIX((unsigned char)*p));
            p++;
        }
        if (bits != 0) {
            VALUE mod;

            mod = rb_funcall(INT2FIX(1), rb_intern("<<"), 1, INT2FIX(bits));
            mod = rb_funcall(mod, '-', 1, INT2FIX(1));
            sum = rb_funcall(sum, '&', 1, mod);
        }
        return sum;
    }
    else {
       unsigned long sum = 0;

        while (p < pend) {
            str_mod_check(str, ptr, len);
            sum += (unsigned char)*p;
            p++;
        }
        if (bits != 0) {
           sum &= (((unsigned long)1)<<bits)-1;
        }
        return rb_int2inum(sum);
    }
}

static VALUE
rb_str_justify(int argc, VALUE *argv, VALUE str, char jflag)
{
    VALUE w;
    long width, flen = 0;
    VALUE res;
    char *p, *pend, *f = " ";
    long n;
    VALUE pad;

    rb_scan_args(argc, argv, "11", &w, &pad);
    width = NUM2LONG(w);
    if (argc == 2) {
        StringValue(pad);
        f = RSTRING(pad)->ptr;
        flen = RSTRING(pad)->len;
        if (flen == 0) {
            rb_raise(rb_eArgError, "zero width padding");
        }
    }
    if (width < 0 || RSTRING(str)->len >= width) return rb_str_dup(str);
    res = rb_str_new5(str, 0, width);
    p = RSTRING(res)->ptr;
    if (jflag != 'l') {
        n = width - RSTRING(str)->len;
        pend = p + ((jflag == 'r') ? n : n/2);
        if (flen <= 1) {
            while (p < pend) {
                *p++ = *f;
            }
        }
        else {
            char *q = f;
            while (p + flen <= pend) {
                memcpy(p,f,flen);
                p += flen;
            }
            while (p < pend) {
                *p++ = *q++;
            }
        }
    }
    memcpy(p, RSTRING(str)->ptr, RSTRING(str)->len);
    if (jflag != 'r') {
        p += RSTRING(str)->len; pend = RSTRING(res)->ptr + width;
        if (flen <= 1) {
            while (p < pend) {
                *p++ = *f;
            }
        }
        else {
            while (p + flen <= pend) {
                memcpy(p,f,flen);
                p += flen;
            }
            while (p < pend) {
                *p++ = *f++;
            }
        }
    }
    OBJ_INFECT(res, str);
    if (flen > 0) OBJ_INFECT(res, pad);
    return res;
}

/*
 *  call-seq:
 *     str.ljust(integer, padstr=' ')   => new_str
 *
 *  If <i>integer</i> is greater than the length of <i>str</i>, returns a new
 *  <code>String</code> of length <i>integer</i> with <i>str</i> left justified
 *  and padded with <i>padstr</i>; otherwise, returns <i>str</i>.
 *
 *     "hello".ljust(4)            #=> "hello"
 *     "hello".ljust(20)           #=> "hello               "
 *     "hello".ljust(20, '1234')   #=> "hello123412341234123"
 */

static VALUE
rb_str_ljust(int argc, VALUE *argv, VALUE str)
{
    return rb_str_justify(argc, argv, str, 'l');
}

/*
 *  call-seq:
 *     str.rjust(integer, padstr=' ')   => new_str
 *
 *  If <i>integer</i> is greater than the length of <i>str</i>, returns a new
 *  <code>String</code> of length <i>integer</i> with <i>str</i> right justified
 *  and padded with <i>padstr</i>; otherwise, returns <i>str</i>.
 *
 *     "hello".rjust(4)            #=> "hello"
 *     "hello".rjust(20)           #=> "               hello"
 *     "hello".rjust(20, '1234')   #=> "123412341234123hello"
 */

static VALUE
rb_str_rjust(int argc, VALUE *argv, VALUE str)
{
    return rb_str_justify(argc, argv, str, 'r');
}

/*
 *  call-seq:
 *     str.center(integer, padstr)   => new_str
 *
 *  If <i>integer</i> is greater than the length of <i>str</i>, returns a new
 *  <code>String</code> of length <i>integer</i> with <i>str</i> centered and
 *  padded with <i>padstr</i>; otherwise, returns <i>str</i>.
 *
 *     "hello".center(4)         #=> "hello"
 *     "hello".center(20)        #=> "       hello        "
 *     "hello".center(20, '123') #=> "1231231hello12312312"
 */

static VALUE
rb_str_center(int argc, VALUE *argv, VALUE str)
{
    return rb_str_justify(argc, argv, str, 'c');
}

void
rb_str_setter(VALUE val, ID id, VALUE *var)
{
    if (!NIL_P(val) && TYPE(val) != T_STRING) {
        rb_raise(rb_eTypeError, "value of %s must be String", rb_id2name(id));
    }
    *var = val;
}

/*
 *  A <code>String</code> object holds and manipulates an arbitrary sequence of
 *  bytes, typically representing characters. String objects may be created
 *  using <code>String::new</code> or as literals.
 *
 *  Because of aliasing issues, users of strings should be aware of the methods
 *  that modify the contents of a <code>String</code> object.  Typically,
 *  methods with names ending in ``!'' modify their receiver, while those
 *  without a ``!'' return a new <code>String</code>.  However, there are
 *  exceptions, such as <code>String#[]=</code>.
 *
 */

void
Init_String(void)
{
    rb_cString  = rb_define_class("String", rb_cObject);
    rb_include_module(rb_cString, rb_mComparable);
    rb_include_module(rb_cString, rb_mEnumerable);
    rb_define_alloc_func(rb_cString, str_alloc);
    rb_define_method(rb_cString, "initialize", rb_str_init, -1);
    rb_define_method(rb_cString, "initialize_copy", rb_str_replace, 1);
    rb_define_method(rb_cString, "<=>", rb_str_cmp_m, 1);
    rb_define_method(rb_cString, "==", rb_str_equal, 1);
    rb_define_method(rb_cString, "eql?", rb_str_eql, 1);
    rb_define_method(rb_cString, "hash", rb_str_hash_m, 0);
    rb_define_method(rb_cString, "casecmp", rb_str_casecmp, 1);
    rb_define_method(rb_cString, "+", rb_str_plus, 1);
    rb_define_method(rb_cString, "*", rb_str_times, 1);
    rb_define_method(rb_cString, "%", rb_str_format_m, 1);
    rb_define_method(rb_cString, "[]", rb_str_aref_m, -1);
    rb_define_method(rb_cString, "[]=", rb_str_aset_m, -1);
    rb_define_method(rb_cString, "insert", rb_str_insert, 2);
    rb_define_method(rb_cString, "length", rb_str_length, 0);
    rb_define_method(rb_cString, "size", rb_str_length, 0);
    rb_define_method(rb_cString, "empty?", rb_str_empty, 0);
    rb_define_method(rb_cString, "=~", rb_str_match, 1);
    rb_define_method(rb_cString, "match", rb_str_match_m, -1);
    rb_define_method(rb_cString, "succ", rb_str_succ, 0);
    rb_define_method(rb_cString, "succ!", rb_str_succ_bang, 0);
    rb_define_method(rb_cString, "next", rb_str_succ, 0);
    rb_define_method(rb_cString, "next!", rb_str_succ_bang, 0);
    rb_define_method(rb_cString, "upto", rb_str_upto_m, 1);
    rb_define_method(rb_cString, "index", rb_str_index_m, -1);
    rb_define_method(rb_cString, "rindex", rb_str_rindex_m, -1);
    rb_define_method(rb_cString, "replace", rb_str_replace, 1);
    rb_define_method(rb_cString, "clear", rb_str_clear, 0);

    rb_define_method(rb_cString, "to_i", rb_str_to_i, -1);
    rb_define_method(rb_cString, "to_f", rb_str_to_f, 0);
    rb_define_method(rb_cString, "to_s", rb_str_to_s, 0);
    rb_define_method(rb_cString, "to_str", rb_str_to_s, 0);
    rb_define_method(rb_cString, "inspect", rb_str_inspect, 0);
    rb_define_method(rb_cString, "dump", rb_str_dump, 0);

    rb_define_method(rb_cString, "upcase", rb_str_upcase, 0);
    rb_define_method(rb_cString, "downcase", rb_str_downcase, 0);
    rb_define_method(rb_cString, "capitalize", rb_str_capitalize, 0);
    rb_define_method(rb_cString, "swapcase", rb_str_swapcase, 0);

    rb_define_method(rb_cString, "upcase!", rb_str_upcase_bang, 0);
    rb_define_method(rb_cString, "downcase!", rb_str_downcase_bang, 0);
    rb_define_method(rb_cString, "capitalize!", rb_str_capitalize_bang, 0);
    rb_define_method(rb_cString, "swapcase!", rb_str_swapcase_bang, 0);

    rb_define_method(rb_cString, "hex", rb_str_hex, 0);
    rb_define_method(rb_cString, "oct", rb_str_oct, 0);
    rb_define_method(rb_cString, "split", rb_str_split_m, -1);
    rb_define_method(rb_cString, "reverse", rb_str_reverse, 0);
    rb_define_method(rb_cString, "reverse!", rb_str_reverse_bang, 0);
    rb_define_method(rb_cString, "concat", rb_str_concat, 1);
    rb_define_method(rb_cString, "<<", rb_str_concat, 1);
    rb_define_method(rb_cString, "crypt", rb_str_crypt, 1);
    rb_define_method(rb_cString, "intern", rb_str_intern, 0);
    rb_define_method(rb_cString, "to_sym", rb_str_intern, 0);

    rb_define_method(rb_cString, "include?", rb_str_include, 1);

    rb_define_method(rb_cString, "scan", rb_str_scan, 1);

    rb_define_method(rb_cString, "ljust", rb_str_ljust, -1);
    rb_define_method(rb_cString, "rjust", rb_str_rjust, -1);
    rb_define_method(rb_cString, "center", rb_str_center, -1);

    rb_define_method(rb_cString, "sub", rb_str_sub, -1);
    rb_define_method(rb_cString, "gsub", rb_str_gsub, -1);
    rb_define_method(rb_cString, "chop", rb_str_chop, 0);
    rb_define_method(rb_cString, "chomp", rb_str_chomp, -1);
    rb_define_method(rb_cString, "strip", rb_str_strip, 0);
    rb_define_method(rb_cString, "lstrip", rb_str_lstrip, 0);
    rb_define_method(rb_cString, "rstrip", rb_str_rstrip, 0);

    rb_define_method(rb_cString, "sub!", rb_str_sub_bang, -1);
    rb_define_method(rb_cString, "gsub!", rb_str_gsub_bang, -1);
    rb_define_method(rb_cString, "chop!", rb_str_chop_bang, 0);
    rb_define_method(rb_cString, "chomp!", rb_str_chomp_bang, -1);
    rb_define_method(rb_cString, "strip!", rb_str_strip_bang, 0);
    rb_define_method(rb_cString, "lstrip!", rb_str_lstrip_bang, 0);
    rb_define_method(rb_cString, "rstrip!", rb_str_rstrip_bang, 0);

    rb_define_method(rb_cString, "tr", rb_str_tr, 2);
    rb_define_method(rb_cString, "tr_s", rb_str_tr_s, 2);
    rb_define_method(rb_cString, "delete", rb_str_delete, -1);
    rb_define_method(rb_cString, "squeeze", rb_str_squeeze, -1);
    rb_define_method(rb_cString, "count", rb_str_count, -1);

    rb_define_method(rb_cString, "tr!", rb_str_tr_bang, 2);
    rb_define_method(rb_cString, "tr_s!", rb_str_tr_s_bang, 2);
    rb_define_method(rb_cString, "delete!", rb_str_delete_bang, -1);
    rb_define_method(rb_cString, "squeeze!", rb_str_squeeze_bang, -1);

    rb_define_method(rb_cString, "each_line", rb_str_each_line, -1);
    rb_define_method(rb_cString, "each", rb_str_each_line, -1);
    rb_define_method(rb_cString, "each_byte", rb_str_each_byte, 0);

    rb_define_method(rb_cString, "sum", rb_str_sum, -1);

    rb_define_method(rb_cString, "slice", rb_str_aref_m, -1);
    rb_define_method(rb_cString, "slice!", rb_str_slice_bang, -1);

    id_to_s = rb_intern("to_s");

    rb_fs = Qnil;
    rb_define_variable("$;", &rb_fs);
    rb_define_variable("$-F", &rb_fs);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


struct.c

root/struct.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. rb_struct_iv_get
  2. rb_struct_s_members
  3. rb_struct_members
  4. rb_struct_s_members_m
  5. rb_struct_members_m
  6. rb_struct_getmember
  7. rb_struct_ref
  8. rb_struct_ref0
  9. rb_struct_ref1
  10. rb_struct_ref2
  11. rb_struct_ref3
  12. rb_struct_ref4
  13. rb_struct_ref5
  14. rb_struct_ref6
  15. rb_struct_ref7
  16. rb_struct_ref8
  17. rb_struct_ref9
  18. rb_struct_modify
  19. rb_struct_set
  20. make_struct
  21. rb_struct_define
  22. rb_struct_s_def
  23. rb_struct_initialize
  24. struct_alloc
  25. rb_struct_alloc
  26. rb_struct_new
  27. rb_struct_each
  28. rb_struct_each_pair
  29. inspect_struct
  30. rb_struct_inspect
  31. rb_struct_to_a
  32. rb_struct_init_copy
  33. rb_struct_aref_id
  34. rb_struct_aref
  35. rb_struct_aset_id
  36. rb_struct_aset
  37. struct_entry
  38. rb_struct_values_at
  39. rb_struct_select
  40. rb_struct_equal
  41. rb_struct_hash
  42. rb_struct_eql
  43. rb_struct_size
  44. Init_Struct
/**********************************************************************

  struct.c -

  $Author: ocean $
  $Date: 2005/10/21 06:46:39 $
  created at: Tue Mar 22 18:44:30 JST 1995

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#include "ruby.h"

VALUE rb_cStruct;

static VALUE struct_alloc(VALUE);

VALUE
rb_struct_iv_get(VALUE c, const char *name)
{
    ID id;

    id = rb_intern(name);
    for (;;) {
        if (rb_ivar_defined(c, id))
            return rb_ivar_get(c, id);
        c = RCLASS(c)->super;
        if (c == 0 || c == rb_cStruct)
            return Qnil;
    }
}

VALUE
rb_struct_s_members(VALUE klass)
{
    VALUE members = rb_struct_iv_get(klass, "__members__");

    if (NIL_P(members)) {
        rb_bug("non-initialized struct");
    }
    return members;
}

VALUE
rb_struct_members(VALUE s)
{
    VALUE members = rb_struct_s_members(rb_obj_class(s));

    if (RSTRUCT(s)->len != RARRAY(members)->len) {
        rb_raise(rb_eTypeError, "struct size differs (%ld required %ld given)",
                 RARRAY(members)->len, RSTRUCT(s)->len);
    }
    return members;
}

static VALUE
rb_struct_s_members_m(VALUE klass)
{
    VALUE members, ary;
    VALUE *p, *pend;

    members = rb_struct_s_members(klass);
    ary = rb_ary_new2(RARRAY(members)->len);
    p = RARRAY(members)->ptr; pend = p + RARRAY(members)->len;
    while (p < pend) {
        rb_ary_push(ary, rb_str_new2(rb_id2name(SYM2ID(*p))));
        p++;
    }

    return ary;
}

/*
 *  call-seq:
 *     struct.members    => array
 *
 *  Returns an array of strings representing the names of the instance
 *  variables.
 *
 *     Customer = Struct.new(:name, :address, :zip)
 *     joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
 *     joe.members   #=> ["name", "address", "zip"]
 */

static VALUE
rb_struct_members_m(VALUE obj)
{
    return rb_struct_s_members_m(rb_obj_class(obj));
}

VALUE
rb_struct_getmember(VALUE obj, ID id)
{
    VALUE members, slot;
    long i;

    members = rb_struct_members(obj);
    slot = ID2SYM(id);
    for (i=0; i<RARRAY(members)->len; i++) {
        if (RARRAY(members)->ptr[i] == slot) {
            return RSTRUCT(obj)->ptr[i];
        }
    }
    rb_name_error(id, "%s is not struct member", rb_id2name(id));
    return Qnil;                /* not reached */
}

static VALUE
rb_struct_ref(VALUE obj)
{
    return rb_struct_getmember(obj, rb_frame_this_func());
}

static VALUE rb_struct_ref0(VALUE obj) {return RSTRUCT(obj)->ptr[0];}
static VALUE rb_struct_ref1(VALUE obj) {return RSTRUCT(obj)->ptr[1];}
static VALUE rb_struct_ref2(VALUE obj) {return RSTRUCT(obj)->ptr[2];}
static VALUE rb_struct_ref3(VALUE obj) {return RSTRUCT(obj)->ptr[3];}
static VALUE rb_struct_ref4(VALUE obj) {return RSTRUCT(obj)->ptr[4];}
static VALUE rb_struct_ref5(VALUE obj) {return RSTRUCT(obj)->ptr[5];}
static VALUE rb_struct_ref6(VALUE obj) {return RSTRUCT(obj)->ptr[6];}
static VALUE rb_struct_ref7(VALUE obj) {return RSTRUCT(obj)->ptr[7];}
static VALUE rb_struct_ref8(VALUE obj) {return RSTRUCT(obj)->ptr[8];}
static VALUE rb_struct_ref9(VALUE obj) {return RSTRUCT(obj)->ptr[9];}

#define N_REF_FUNC (sizeof(ref_func) / sizeof(ref_func[0]))

static VALUE (*ref_func[])(VALUE) = {
    rb_struct_ref0,
    rb_struct_ref1,
    rb_struct_ref2,
    rb_struct_ref3,
    rb_struct_ref4,
    rb_struct_ref5,
    rb_struct_ref6,
    rb_struct_ref7,
    rb_struct_ref8,
    rb_struct_ref9,
};

static void
rb_struct_modify(VALUE s)
{
    if (OBJ_FROZEN(s)) rb_error_frozen("Struct");
    if (!OBJ_TAINTED(s) && rb_safe_level() >= 4)
       rb_raise(rb_eSecurityError, "Insecure: can't modify Struct");
}

static VALUE
rb_struct_set(VALUE obj, VALUE val)
{
    VALUE members, slot;
    long i;

    members = rb_struct_members(obj);
    rb_struct_modify(obj);
    for (i=0; i<RARRAY(members)->len; i++) {
        slot = RARRAY(members)->ptr[i];
        if (rb_id_attrset(SYM2ID(slot)) == rb_frame_this_func()) {
            return RSTRUCT(obj)->ptr[i] = val;
        }
    }
    rb_name_error(rb_frame_this_func(), "`%s' is not a struct member",
                  rb_id2name(rb_frame_this_func()));
    return Qnil;                /* not reached */
}

static VALUE
make_struct(VALUE name, VALUE members, VALUE klass)
{
    VALUE nstr;
    ID id;
    long i;

    OBJ_FREEZE(members);
    if (NIL_P(name)) {
        nstr = rb_class_new(klass);
        rb_make_metaclass(nstr, RBASIC(klass)->klass);
        rb_class_inherited(klass, nstr);
    }
    else {
        char *cname = StringValuePtr(name);

        id = rb_intern(cname);
        if (!rb_is_const_id(id)) {
            rb_name_error(id, "identifier %s needs to be constant", cname);
        }
        if (rb_const_defined_at(klass, id)) {
            rb_warn("redefining constant Struct::%s", cname);
            rb_mod_remove_const(klass, ID2SYM(id));
        }
        nstr = rb_define_class_under(klass, rb_id2name(id), klass);
    }
    rb_iv_set(nstr, "__size__", LONG2NUM(RARRAY(members)->len));
    rb_iv_set(nstr, "__members__", members);

    rb_define_alloc_func(nstr, struct_alloc);
    rb_define_singleton_method(nstr, "new", rb_class_new_instance, -1);
    rb_define_singleton_method(nstr, "[]", rb_class_new_instance, -1);
    rb_define_singleton_method(nstr, "members", rb_struct_s_members_m, 0);
    for (i=0; i< RARRAY(members)->len; i++) {
        ID id = SYM2ID(RARRAY(members)->ptr[i]);
        if (rb_is_local_id(id) || rb_is_const_id(id)) {
            if (i < N_REF_FUNC) {
                rb_define_method_id(nstr, id, ref_func[i], 0);
            }
            else {
                rb_define_method_id(nstr, id, rb_struct_ref, 0);
            }
            rb_define_method_id(nstr, rb_id_attrset(id), rb_struct_set, 1);
        }
    }

    return nstr;
}

VALUE
rb_struct_define(const char *name, ...)
{
    va_list ar;
    VALUE nm, ary;
    char *mem;

    if (!name) nm = Qnil;
    else nm = rb_str_new2(name);
    ary = rb_ary_new();

    va_start(ar, name);
    while (mem = va_arg(ar, char*)) {
        ID slot = rb_intern(mem);
        rb_ary_push(ary, ID2SYM(slot));
    }
    va_end(ar);

    return make_struct(nm, ary, rb_cStruct);
}

/*
 *  call-seq:
 *     Struct.new( [aString] [, aSym]+> )    => StructClass
 *     StructClass.new(arg, ...)             => obj
 *     StructClass[arg, ...]                 => obj
 *
 *  Creates a new class, named by <i>aString</i>, containing accessor
 *  methods for the given symbols. If the name <i>aString</i> is
 *  omitted, an anonymous structure class will be created. Otherwise,
 *  the name of this struct will appear as a constant in class
 *  <code>Struct</code>, so it must be unique for all
 *  <code>Struct</code>s in the system and should start with a capital
 *  letter. Assigning a structure class to a constant effectively gives
 *  the class the name of the constant.
 *
 *  <code>Struct::new</code> returns a new <code>Class</code> object,
 *  which can then be used to create specific instances of the new
 *  structure. The number of actual parameters must be
 *  less than or equal to the number of attributes defined for this
 *  class; unset parameters default to \nil{}.  Passing too many
 *  parameters will raise an \E{ArgumentError}.
 *
 *  The remaining methods listed in this section (class and instance)
 *  are defined for this generated class.
 *
 *     # Create a structure with a name in Struct
 *     Struct.new("Customer", :name, :address)    #=> Struct::Customer
 *     Struct::Customer.new("Dave", "123 Main")   #=> #<Struct::Customer name="Dave", address="123 Main">
 *
 *     # Create a structure named by its constant
 *     Customer = Struct.new(:name, :address)     #=> Customer
 *     Customer.new("Dave", "123 Main")           #=> #<Customer name="Dave", address="123 Main">
 */

static VALUE
rb_struct_s_def(int argc, VALUE *argv, VALUE klass)
{
    VALUE name, rest;
    long i;
    VALUE st;
    ID id;

    rb_scan_args(argc, argv, "1*", &name, &rest);
    for (i=0; i<RARRAY(rest)->len; i++) {
        id = rb_to_id(RARRAY(rest)->ptr[i]);
        RARRAY(rest)->ptr[i] = ID2SYM(id);
    }
    if (!NIL_P(name)) {
        VALUE tmp = rb_check_string_type(name);

        if (NIL_P(tmp)) {
            id = rb_to_id(name);
            rb_ary_unshift(rest, ID2SYM(id));
            name = Qnil;
        }
    }
    st = make_struct(name, rest, klass);
    if (rb_block_given_p()) {
        rb_mod_module_eval(0, 0, st);
    }

    return st;
}

/*
 */

static VALUE
rb_struct_initialize(VALUE self, VALUE values)
{
    VALUE klass = rb_obj_class(self);
    VALUE size;
    long n;

    rb_struct_modify(self);
    size = rb_struct_iv_get(klass, "__size__");
    n = FIX2LONG(size);
    if (n < RARRAY(values)->len) {
        rb_raise(rb_eArgError, "struct size differs");
    }
    MEMCPY(RSTRUCT(self)->ptr, RARRAY(values)->ptr, VALUE, RARRAY(values)->len);
    if (n > RARRAY(values)->len) {
        rb_mem_clear(RSTRUCT(self)->ptr+RARRAY(values)->len,
                     n-RARRAY(values)->len);
    }
    return Qnil;
}

static VALUE
struct_alloc(VALUE klass)
{
    VALUE size;
    long n;
    NEWOBJ(st, struct RStruct);
    OBJSETUP(st, klass, T_STRUCT);

    size = rb_struct_iv_get(klass, "__size__");
    n = FIX2LONG(size);

    st->ptr = ALLOC_N(VALUE, n);
    rb_mem_clear(st->ptr, n);
    st->len = n;

    return (VALUE)st;
}

VALUE
rb_struct_alloc(VALUE klass, VALUE values)
{
    return rb_class_new_instance(RARRAY(values)->len, RARRAY(values)->ptr, klass);
}

VALUE
rb_struct_new(VALUE klass, ...)
{
    VALUE sz, *mem;
    long size, i;
    va_list args;

    sz = rb_struct_iv_get(klass, "__size__");
    size = FIX2LONG(sz);
    mem = ALLOCA_N(VALUE, size);
    va_start(args, klass);
    for (i=0; i<size; i++) {
        mem[i] = va_arg(args, VALUE);
    }
    va_end(args);

    return rb_class_new_instance(size, mem, klass);
}

/*
 *  call-seq:
 *     struct.each {|obj| block }  => struct
 *
 *  Calls <i>block</i> once for each instance variable, passing the
 *  value as a parameter.
 *
 *     Customer = Struct.new(:name, :address, :zip)
 *     joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
 *     joe.each {|x| puts(x) }
 *
 *  <em>produces:</em>
 *
 *     Joe Smith
 *     123 Maple, Anytown NC
 *     12345
 */

static VALUE
rb_struct_each(VALUE s)
{
    long i;

    RETURN_ENUMERATOR(s, 0, 0);
    for (i=0; i<RSTRUCT(s)->len; i++) {
        rb_yield(RSTRUCT(s)->ptr[i]);
    }
    return s;
}

/*
 *  call-seq:
 *     struct.each_pair {|sym, obj| block }     => struct
 *
 *  Calls <i>block</i> once for each instance variable, passing the name
 *  (as a symbol) and the value as parameters.
 *
 *     Customer = Struct.new(:name, :address, :zip)
 *     joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
 *     joe.each_pair {|name, value| puts("#{name} => #{value}") }
 *
 *  <em>produces:</em>
 *
 *     name => Joe Smith
 *     address => 123 Maple, Anytown NC
 *     zip => 12345
 */

static VALUE
rb_struct_each_pair(VALUE s)
{
    VALUE members;
    long i;

    RETURN_ENUMERATOR(s, 0, 0);
    members = rb_struct_members(s);
    for (i=0; i<RSTRUCT(s)->len; i++) {
        rb_yield_values(2, rb_ary_entry(members, i), RSTRUCT(s)->ptr[i]);
    }
    return s;
}

static VALUE
inspect_struct(VALUE s, VALUE dummy, int recur)
{
    char *cname = rb_class2name(rb_obj_class(s));
    VALUE str, members;
    long i;

    if (recur) {
        return rb_sprintf("#<struct %s:...>", cname);
    }

    members = rb_struct_members(s);
    str = rb_sprintf("#<struct %s ", cname);
    for (i=0; i<RSTRUCT(s)->len; i++) {
        VALUE slot;
        ID id;
        char *p;

        if (i > 0) {
            rb_str_cat2(str, ", ");
        }
        slot = RARRAY(members)->ptr[i];
        id = SYM2ID(slot);
        if (rb_is_local_id(id) || rb_is_const_id(id)) {
            p = rb_id2name(id);
            rb_str_cat2(str, p);
        }
        else {
            rb_str_append(str, rb_inspect(slot));
        }
        rb_str_cat2(str, "=");
        rb_str_append(str, rb_inspect(RSTRUCT(s)->ptr[i]));
    }
    rb_str_cat2(str, ">");
    OBJ_INFECT(str, s);

    return str;
}

/*
 * call-seq:
 *   struct.to_s      => string
 *   struct.inspect   => string
 *
 * Describe the contents of this struct in a string.
 */

static VALUE
rb_struct_inspect(VALUE s)
{
    return rb_exec_recursive(inspect_struct, s, 0);
}

/*
 *  call-seq:
 *     struct.to_a     => array
 *     struct.values   => array
 *
 *  Returns the values for this instance as an array.
 *
 *     Customer = Struct.new(:name, :address, :zip)
 *     joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
 *     joe.to_a[1]   #=> "123 Maple, Anytown NC"
 */

static VALUE
rb_struct_to_a(VALUE s)
{
    return rb_ary_new4(RSTRUCT(s)->len, RSTRUCT(s)->ptr);
}

/* :nodoc: */
static VALUE
rb_struct_init_copy(VALUE copy, VALUE s)
{
    if (copy == s) return copy;
    rb_check_frozen(copy);
    if (!rb_obj_is_instance_of(s, rb_obj_class(copy))) {
        rb_raise(rb_eTypeError, "wrong argument class");
    }
    RSTRUCT(copy)->ptr = ALLOC_N(VALUE, RSTRUCT(s)->len);
    RSTRUCT(copy)->len = RSTRUCT(s)->len;
    MEMCPY(RSTRUCT(copy)->ptr, RSTRUCT(s)->ptr, VALUE, RSTRUCT(copy)->len);

    return copy;
}

static VALUE
rb_struct_aref_id(VALUE s, ID id)
{
    VALUE members;
    long i, len;

    members = rb_struct_members(s);
    len = RARRAY(members)->len;
    for (i=0; i<len; i++) {
        if (SYM2ID(RARRAY(members)->ptr[i]) == id) {
            return RSTRUCT(s)->ptr[i];
        }
    }
    rb_name_error(id, "no member '%s' in struct", rb_id2name(id));
    return Qnil;                /* not reached */
}

/*
 *  call-seq:
 *     struct[symbol]    => anObject
 *     struct[fixnum]    => anObject
 *
 *  Attribute Reference---Returns the value of the instance variable
 *  named by <i>symbol</i>, or indexed (0..length-1) by
 *  <i>fixnum</i>. Will raise <code>NameError</code> if the named
 *  variable does not exist, or <code>IndexError</code> if the index is
 *  out of range.
 *
 *     Customer = Struct.new(:name, :address, :zip)
 *     joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
 *
 *     joe["name"]   #=> "Joe Smith"
 *     joe[:name]    #=> "Joe Smith"
 *     joe[0]        #=> "Joe Smith"
 */

VALUE
rb_struct_aref(VALUE s, VALUE idx)
{
    long i;

    if (TYPE(idx) == T_STRING || TYPE(idx) == T_SYMBOL) {
        return rb_struct_aref_id(s, rb_to_id(idx));
    }

    i = NUM2LONG(idx);
    if (i < 0) i = RSTRUCT(s)->len + i;
    if (i < 0)
        rb_raise(rb_eIndexError, "offset %ld too small for struct(size:%ld)",
                 i, RSTRUCT(s)->len);
    if (RSTRUCT(s)->len <= i)
        rb_raise(rb_eIndexError, "offset %ld too large for struct(size:%ld)",
                 i, RSTRUCT(s)->len);
    return RSTRUCT(s)->ptr[i];
}

static VALUE
rb_struct_aset_id(VALUE s, ID id, VALUE val)
{
    VALUE members;
    long i, len;

    members = rb_struct_members(s);
    rb_struct_modify(s);
    len = RARRAY(members)->len;
    if (RSTRUCT(s)->len != RARRAY(members)->len) {
        rb_raise(rb_eTypeError, "struct size differs (%ld required %ld given)",
                 RARRAY(members)->len, RSTRUCT(s)->len);
    }
    for (i=0; i<len; i++) {
        if (SYM2ID(RARRAY(members)->ptr[i]) == id) {
            RSTRUCT(s)->ptr[i] = val;
            return val;
        }
    }
    rb_name_error(id, "no member '%s' in struct", rb_id2name(id));
}

/*
 *  call-seq:
 *     struct[symbol] = obj    => obj
 *     struct[fixnum] = obj    => obj
 *
 *  Attribute Assignment---Assigns to the instance variable named by
 *  <i>symbol</i> or <i>fixnum</i> the value <i>obj</i> and
 *  returns it. Will raise a <code>NameError</code> if the named
 *  variable does not exist, or an <code>IndexError</code> if the index
 *  is out of range.
 *
 *     Customer = Struct.new(:name, :address, :zip)
 *     joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
 *
 *     joe["name"] = "Luke"
 *     joe[:zip]   = "90210"
 *
 *     joe.name   #=> "Luke"
 *     joe.zip    #=> "90210"
 */

VALUE
rb_struct_aset(VALUE s, VALUE idx, VALUE val)
{
    long i;

    if (TYPE(idx) == T_STRING || TYPE(idx) == T_SYMBOL) {
        return rb_struct_aset_id(s, rb_to_id(idx), val);
    }

    i = NUM2LONG(idx);
    if (i < 0) i = RSTRUCT(s)->len + i;
    if (i < 0) {
        rb_raise(rb_eIndexError, "offset %ld too small for struct(size:%ld)",
                 i, RSTRUCT(s)->len);
    }
    if (RSTRUCT(s)->len <= i) {
        rb_raise(rb_eIndexError, "offset %ld too large for struct(size:%ld)",
                 i, RSTRUCT(s)->len);
    }
    rb_struct_modify(s);
    return RSTRUCT(s)->ptr[i] = val;
}

static VALUE
struct_entry(VALUE s, long n)
{
    return rb_struct_aref(s, LONG2NUM(n));
}

/*
 * call-seq:
 *   struct.values_at(selector,... )  => an_array
 *
 *   Returns an array containing the elements in
 *   _self_ corresponding to the given selector(s). The selectors
 *   may be either integer indices or ranges.
 *   See also </code>.select<code>.
 *
 *      a = %w{ a b c d e f }
 *      a.values_at(1, 3, 5)
 *      a.values_at(1, 3, 5, 7)
 *      a.values_at(-1, -3, -5, -7)
 *      a.values_at(1..3, 2...5)
 */

static VALUE
rb_struct_values_at(int argc, VALUE *argv, VALUE s)
{
    return rb_get_values_at(s, RSTRUCT(s)->len, argc, argv, struct_entry);
}

/*
 *  call-seq:
 *     struct.select(fixnum, ... )   => array
 *     struct.select {|i| block }    => array
 *
 *  The first form returns an array containing the elements in
 *  <i>struct</i> corresponding to the given indices. The second
 *  form invokes the block passing in successive elements from
 *  <i>struct</i>, returning an array containing those elements
 *  for which the block returns a true value (equivalent to
 *  <code>Enumerable#select</code>).
 *
 *     Lots = Struct.new(:a, :b, :c, :d, :e, :f)
 *     l = Lots.new(11, 22, 33, 44, 55, 66)
 *     l.select(1, 3, 5)               #=> [22, 44, 66]
 *     l.select(0, 2, 4)               #=> [11, 33, 55]
 *     l.select(-1, -3, -5)            #=> [66, 44, 22]
 *     l.select {|v| (v % 2).zero? }   #=> [22, 44, 66]
 */

static VALUE
rb_struct_select(int argc, VALUE *argv, VALUE s)
{
    VALUE result;
    long i;

    if (argc > 0) {
        rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc);
    }
    result = rb_ary_new();
    for (i = 0; i < RSTRUCT(s)->len; i++) {
        if (RTEST(rb_yield(RSTRUCT(s)->ptr[i]))) {
            rb_ary_push(result, RSTRUCT(s)->ptr[i]);
        }
    }

    return result;
}

/*
 *  call-seq:
 *     struct == other_struct     => true or false
 *
 *  Equality---Returns <code>true</code> if <i>other_struct</i> is
 *  equal to this one: they must be of the same class as generated by
 *  <code>Struct::new</code>, and the values of all instance variables
 *  must be equal (according to <code>Object#==</code>).
 *
 *     Customer = Struct.new(:name, :address, :zip)
 *     joe   = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
 *     joejr = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
 *     jane  = Customer.new("Jane Doe", "456 Elm, Anytown NC", 12345)
 *     joe == joejr   #=> true
 *     joe == jane    #=> false
 */

static VALUE
rb_struct_equal(VALUE s, VALUE s2)
{
    long i;

    if (s == s2) return Qtrue;
    if (TYPE(s2) != T_STRUCT) return Qfalse;
    if (rb_obj_class(s) != rb_obj_class(s2)) return Qfalse;
    if (RSTRUCT(s)->len != RSTRUCT(s2)->len) {
        rb_bug("inconsistent struct"); /* should never happen */
    }

    for (i=0; i<RSTRUCT(s)->len; i++) {
        if (!rb_equal(RSTRUCT(s)->ptr[i], RSTRUCT(s2)->ptr[i])) return Qfalse;
    }
    return Qtrue;
}

/*
 * call-seq:
 *   struct.hash   => fixnum
 *
 * Return a hash value based on this struct's contents.
 */

static VALUE
rb_struct_hash(VALUE s)
{
    long i, h;
    VALUE n;

    h = rb_hash(rb_obj_class(s));
    for (i = 0; i < RSTRUCT(s)->len; i++) {
        h = (h << 1) | (h<0 ? 1 : 0);
        n = rb_hash(RSTRUCT(s)->ptr[i]);
        h ^= NUM2LONG(n);
    }
    return LONG2FIX(h);
}

/*
 * code-seq:
 *   struct.eql?(other)   => true or false
 *
 * Two structures are equal if they are the same object, or if all their
 * fields are equal (using <code>eql?</code>).
 */

static VALUE
rb_struct_eql(VALUE s, VALUE s2)
{
    long i;

    if (s == s2) return Qtrue;
    if (TYPE(s2) != T_STRUCT) return Qfalse;
    if (rb_obj_class(s) != rb_obj_class(s2)) return Qfalse;
    if (RSTRUCT(s)->len != RSTRUCT(s2)->len) {
        rb_bug("inconsistent struct"); /* should never happen */
    }

    for (i=0; i<RSTRUCT(s)->len; i++) {
        if (!rb_eql(RSTRUCT(s)->ptr[i], RSTRUCT(s2)->ptr[i])) return Qfalse;
    }
    return Qtrue;
}

/*
 *  call-seq:
 *     struct.length    => fixnum
 *     struct.size      => fixnum
 *
 *  Returns the number of instance variables.
 *
 *     Customer = Struct.new(:name, :address, :zip)
 *     joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
 *     joe.length   #=> 3
 */

static VALUE
rb_struct_size(VALUE s)
{
    return LONG2FIX(RSTRUCT(s)->len);
}

/*
 *  A <code>Struct</code> is a convenient way to bundle a number of
 *  attributes together, using accessor methods, without having to write
 *  an explicit class.
 *
 *  The <code>Struct</code> class is a generator of specific classes,
 *  each one of which is defined to hold a set of variables and their
 *  accessors. In these examples, we'll call the generated class
 *  ``<i>Customer</i>Class,'' and we'll show an example instance of that
 *  class as ``<i>Customer</i>Inst.''
 *
 *  In the descriptions that follow, the parameter <i>symbol</i> refers
 *  to a symbol, which is either a quoted string or a
 *  <code>Symbol</code> (such as <code>:name</code>).
 */
void
Init_Struct(void)
{
    rb_cStruct = rb_define_class("Struct", rb_cObject);
    rb_include_module(rb_cStruct, rb_mEnumerable);

    rb_undef_alloc_func(rb_cStruct);
    rb_define_singleton_method(rb_cStruct, "new", rb_struct_s_def, -1);

    rb_define_method(rb_cStruct, "initialize", rb_struct_initialize, -2);
    rb_define_method(rb_cStruct, "initialize_copy", rb_struct_init_copy, 1);

    rb_define_method(rb_cStruct, "==", rb_struct_equal, 1);
    rb_define_method(rb_cStruct, "eql?", rb_struct_eql, 1);
    rb_define_method(rb_cStruct, "hash", rb_struct_hash, 0);

    rb_define_method(rb_cStruct, "to_s", rb_struct_inspect, 0);
    rb_define_method(rb_cStruct, "inspect", rb_struct_inspect, 0);
    rb_define_method(rb_cStruct, "to_a", rb_struct_to_a, 0);
    rb_define_method(rb_cStruct, "values", rb_struct_to_a, 0);
    rb_define_method(rb_cStruct, "size", rb_struct_size, 0);
    rb_define_method(rb_cStruct, "length", rb_struct_size, 0);

    rb_define_method(rb_cStruct, "each", rb_struct_each, 0);
    rb_define_method(rb_cStruct, "each_pair", rb_struct_each_pair, 0);
    rb_define_method(rb_cStruct, "[]", rb_struct_aref, 1);
    rb_define_method(rb_cStruct, "[]=", rb_struct_aset, 2);
    rb_define_method(rb_cStruct, "select", rb_struct_select, -1);
    rb_define_method(rb_cStruct, "values_at", rb_struct_values_at, -1);

    rb_define_method(rb_cStruct, "members", rb_struct_members_m, 0);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


time.c

root/time.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. time_free
  2. time_s_alloc
  3. time_modify
  4. time_init
  5. time_overflow_p
  6. time_new_internal
  7. rb_time_new
  8. time_timeval
  9. rb_time_interval
  10. rb_time_timeval
  11. time_s_at
  12. obj2long
  13. time_arg
  14. leap_year_p
  15. timegm_noleapsecond
  16. tmcmp
  17. search_time_t
  18. make_time_t
  19. time_utc_or_local
  20. time_s_mkutc
  21. time_s_mktime
  22. time_to_i
  23. time_to_f
  24. time_usec
  25. time_cmp
  26. time_eql
  27. time_utc_p
  28. time_hash
  29. time_init_copy
  30. time_dup
  31. time_localtime
  32. time_gmtime
  33. time_getlocaltime
  34. time_getgmtime
  35. time_get_tm
  36. time_asctime
  37. time_to_s
  38. time_add
  39. time_plus
  40. time_minus
  41. time_succ
  42. time_sec
  43. time_min
  44. time_hour
  45. time_mday
  46. time_mon
  47. time_year
  48. time_wday
  49. time_sunday
  50. time_monday
  51. time_tuesday
  52. time_wednesday
  53. time_thursday
  54. time_friday
  55. time_saturday
  56. time_yday
  57. time_isdst
  58. time_zone
  59. time_utc_offset
  60. time_to_a
  61. rb_strftime
  62. time_strftime
  63. time_s_times
  64. time_mdump
  65. time_dump
  66. time_mload
  67. time_load
  68. Init_Time
/**********************************************************************

  time.c -

  $Author: matz $
  $Date: 2005/10/27 08:18:38 $
  created at: Tue Dec 28 14:31:59 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#include "ruby.h"
#include <sys/types.h>
#include <time.h>

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#include <math.h>

VALUE rb_cTime;

struct time_object {
    struct timeval tv;
    struct tm tm;
    int gmt;
    int tm_got;
};

#define GetTimeval(obj, tobj) \
    Data_Get_Struct(obj, struct time_object, tobj)

static void
time_free(void *tobj)
{
    if (tobj) free(tobj);
}

static VALUE
time_s_alloc(VALUE klass)
{
    VALUE obj;
    struct time_object *tobj;

    obj = Data_Make_Struct(klass, struct time_object, 0, time_free, tobj);
    tobj->tm_got=0;
    tobj->tv.tv_sec = 0;
    tobj->tv.tv_usec = 0;

    return obj;
}

static void
time_modify(VALUE time)
{
    rb_check_frozen(time);
    if (!OBJ_TAINTED(time) && rb_safe_level() >= 4)
        rb_raise(rb_eSecurityError, "Insecure: can't modify Time");
}

/*
 *  Document-method: now
 *
 *  Synonym for <code>Time.new</code>. Returns a +Time+ object
 *  initialized tot he current system time.
 */

/*
 *  call-seq:
 *     Time.new -> time
 *
 *  Returns a <code>Time</code> object initialized to the current system
 *  time. <b>Note:</b> The object created will be created using the
 *  resolution available on your system clock, and so may include
 *  fractional seconds.
 *
 *     a = Time.new      #=> Wed Apr 09 08:56:03 CDT 2003
 *     b = Time.new      #=> Wed Apr 09 08:56:03 CDT 2003
 *     a == b            #=> false
 *     "%.6f" % a.to_f   #=> "1049896563.230740"
 *     "%.6f" % b.to_f   #=> "1049896563.231466"
 *
 */

static VALUE
time_init(VALUE time)
{
    struct time_object *tobj;

    time_modify(time);
    GetTimeval(time, tobj);
    tobj->tm_got=0;
    tobj->tv.tv_sec = 0;
    tobj->tv.tv_usec = 0;
    if (gettimeofday(&tobj->tv, 0) < 0) {
        rb_sys_fail("gettimeofday");
    }

    return time;
}

#define NDIV(x,y) (-(-((x)+1)/(y))-1)
#define NMOD(x,y) ((y)-(-((x)+1)%(y))-1)

static void
time_overflow_p(time_t *secp, time_t *usecp)
{
    time_t tmp, sec = *secp, usec = *usecp;

    if (usec >= 1000000) {      /* usec positive overflow */
        tmp = sec + usec / 1000000;
        usec %= 1000000;
        if (sec > 0 && tmp < 0) {
            rb_raise(rb_eRangeError, "out of Time range");
        }
        sec = tmp;
    }
    if (usec < 0) {             /* usec negative overflow */
        tmp = sec + NDIV(usec,1000000); /* negative div */
        usec = NMOD(usec,1000000);      /* negative mod */
        if (sec < 0 && tmp > 0) {
            rb_raise(rb_eRangeError, "out of Time range");
        }
        sec = tmp;
    }
#ifndef NEGATIVE_TIME_T
    if (sec < 0 || (sec == 0 && usec < 0))
        rb_raise(rb_eArgError, "time must be positive");
#endif
    *secp = sec;
    *usecp = usec;
}

static VALUE
time_new_internal(VALUE klass, time_t sec, time_t usec)
{
    VALUE time = time_s_alloc(klass);
    struct time_object *tobj;

    GetTimeval(time, tobj);
    time_overflow_p(&sec, &usec);
    tobj->tv.tv_sec = sec;
    tobj->tv.tv_usec = usec;

    return time;
}

VALUE
rb_time_new(time_t sec, time_t usec)
{
    return time_new_internal(rb_cTime, sec, usec);
}

static struct timeval
time_timeval(VALUE time, int interval)
{
    struct timeval t;
    char *tstr = interval ? "time interval" : "time";

#ifndef NEGATIVE_TIME_T
    interval = 1;
#endif

    switch (TYPE(time)) {
      case T_FIXNUM:
        t.tv_sec = FIX2LONG(time);
        if (interval && t.tv_sec < 0)
            rb_raise(rb_eArgError, "%s must be positive", tstr);
        t.tv_usec = 0;
        break;

      case T_FLOAT:
        if (interval && RFLOAT(time)->value < 0.0)
            rb_raise(rb_eArgError, "%s must be positive", tstr);
        else {
            double f, d;

            d = modf(RFLOAT(time)->value, &f);
            t.tv_sec = (time_t)f;
            if (f != t.tv_sec) {
                rb_raise(rb_eRangeError, "%f out of Time range", RFLOAT(time)->value);
            }
            t.tv_usec = (time_t)(d*1e6);
        }
        break;

      case T_BIGNUM:
        t.tv_sec = NUM2LONG(time);
        if (interval && t.tv_sec < 0)
            rb_raise(rb_eArgError, "%s must be positive", tstr);
        t.tv_usec = 0;
        break;

      default:
        rb_raise(rb_eTypeError, "can't convert %s into %s",
                 rb_obj_classname(time), tstr);
        break;
    }
    return t;
}

struct timeval
rb_time_interval(VALUE time)
{
    return time_timeval(time, Qtrue);
}

struct timeval
rb_time_timeval(VALUE time)
{
    struct time_object *tobj;
    struct timeval t;

    if (TYPE(time) == T_DATA && RDATA(time)->dfree == time_free) {
        GetTimeval(time, tobj);
        t = tobj->tv;
        return t;
    }
    return time_timeval(time, Qfalse);
}

/*
 *  call-seq:
 *     Time.at( aTime ) => time
 *     Time.at( seconds [, microseconds] ) => time
 *
 *  Creates a new time object with the value given by <i>aTime</i>, or
 *  the given number of <i>seconds</i> (and optional
 *  <i>microseconds</i>) from epoch. A non-portable feature allows the
 *  offset to be negative on some systems.
 *
 *     Time.at(0)            #=> Wed Dec 31 18:00:00 CST 1969
 *     Time.at(946702800)    #=> Fri Dec 31 23:00:00 CST 1999
 *     Time.at(-284061600)   #=> Sat Dec 31 00:00:00 CST 1960
 */

static VALUE
time_s_at(int argc, VALUE *argv, VALUE klass)
{
    struct timeval tv;
    VALUE time, t;

    if (rb_scan_args(argc, argv, "11", &time, &t) == 2) {
        tv.tv_sec = NUM2LONG(time);
        tv.tv_usec = NUM2LONG(t);
    }
    else {
        tv = rb_time_timeval(time);
    }
    t = time_new_internal(klass, tv.tv_sec, tv.tv_usec);
    if (TYPE(time) == T_DATA && RDATA(time)->dfree == time_free) {
        struct time_object *tobj, *tobj2;

        GetTimeval(time, tobj);
        GetTimeval(t, tobj2);
        tobj2->gmt = tobj->gmt;
    }
    return t;
}

static char *months [12] = {
    "jan", "feb", "mar", "apr", "may", "jun",
    "jul", "aug", "sep", "oct", "nov", "dec",
};

static long
obj2long(VALUE obj)
{
    if (TYPE(obj) == T_STRING) {
        obj = rb_str_to_inum(obj, 10, Qfalse);
    }

    return NUM2LONG(obj);
}

static void
time_arg(int argc, VALUE *argv, struct tm *tm, time_t *usec)
{
    VALUE v[8];
    int i;
    long year;

    MEMZERO(tm, struct tm, 1);
    *usec = 0;
    if (argc == 10) {
        v[0] = argv[5];
        v[1] = argv[4];
        v[2] = argv[3];
        v[3] = argv[2];
        v[4] = argv[1];
        v[5] = argv[0];
        v[6] = Qnil;
        tm->tm_isdst = RTEST(argv[8]) ? 1 : 0;
    }
    else {
        rb_scan_args(argc, argv, "17", &v[0],&v[1],&v[2],&v[3],&v[4],&v[5],&v[6],&v[7]);
        /* v[6] may be usec or zone (parsedate) */
        /* v[7] is wday (parsedate; ignored) */
        tm->tm_wday = -1;
        tm->tm_isdst = -1;
    }

    year = obj2long(v[0]);

    if (0 <= year && year < 39) {
        year += 100;
        rb_warning("2 digits year is used");
    }
    else if (69 <= year && year < 139) {
        rb_warning("2 or 3 digits year is used");
    }
    else {
        year -= 1900;
    }

    tm->tm_year = year;

    if (NIL_P(v[1])) {
        tm->tm_mon = 0;
    }
    else {
        VALUE s = rb_check_string_type(v[1]);
        if (!NIL_P(s)) {
            tm->tm_mon = -1;
            for (i=0; i<12; i++) {
                if (RSTRING(s)->len == 3 &&
                    strcasecmp(months[i], RSTRING(v[1])->ptr) == 0) {
                    tm->tm_mon = i;
                    break;
                }
            }
            if (tm->tm_mon == -1) {
                char c = RSTRING(s)->ptr[0];

                if ('0' <= c && c <= '9') {
                    tm->tm_mon = obj2long(s)-1;
                }
            }
        }
        else {
            tm->tm_mon = obj2long(v[1])-1;
        }
    }
    if (NIL_P(v[2])) {
        tm->tm_mday = 1;
    }
    else {
        tm->tm_mday = obj2long(v[2]);
    }
    tm->tm_hour = NIL_P(v[3])?0:obj2long(v[3]);
    tm->tm_min  = NIL_P(v[4])?0:obj2long(v[4]);
    tm->tm_sec  = NIL_P(v[5])?0:obj2long(v[5]);
    if (!NIL_P(v[6])) {
        /* when argc == 8, v[6] is timezone, but ignored */
        if (argc == 7) {
            *usec = obj2long(v[6]);
        }
    }

    /* value validation */
    if (
        tm->tm_year != year ||
#ifndef NEGATIVE_TIME_T
        tm->tm_year < 69 ||
#endif
           tm->tm_mon  < 0 || tm->tm_mon  > 11
        || tm->tm_mday < 1 || tm->tm_mday > 31
        || tm->tm_hour < 0 || tm->tm_hour > 23
        || tm->tm_min  < 0 || tm->tm_min  > 59
        || tm->tm_sec  < 0 || tm->tm_sec  > 60)
        rb_raise(rb_eArgError, "argument out of range");
}

static VALUE time_gmtime(VALUE);
static VALUE time_localtime(VALUE);
static VALUE time_get_tm(VALUE, int);

static int
leap_year_p(long y)
{
    return ((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0);
}

#define DIV(n,d) ((n)<0 ? NDIV((n),(d)) : (n)/(d))

static time_t
timegm_noleapsecond(struct tm *tm)
{
    static int common_year_yday_offset[] = {
        -1,
        -1 + 31,
        -1 + 31 + 28,
        -1 + 31 + 28 + 31,
        -1 + 31 + 28 + 31 + 30,
        -1 + 31 + 28 + 31 + 30 + 31,
        -1 + 31 + 28 + 31 + 30 + 31 + 30,
        -1 + 31 + 28 + 31 + 30 + 31 + 30 + 31,
        -1 + 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31,
        -1 + 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30,
        -1 + 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31,
        -1 + 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30
          /* 1    2    3    4    5    6    7    8    9    10   11 */
    };
    static int leap_year_yday_offset[] = {
        -1,
        -1 + 31,
        -1 + 31 + 29,
        -1 + 31 + 29 + 31,
        -1 + 31 + 29 + 31 + 30,
        -1 + 31 + 29 + 31 + 30 + 31,
        -1 + 31 + 29 + 31 + 30 + 31 + 30,
        -1 + 31 + 29 + 31 + 30 + 31 + 30 + 31,
        -1 + 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31,
        -1 + 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30,
        -1 + 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31,
        -1 + 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30
          /* 1    2    3    4    5    6    7    8    9    10   11 */
    };

    long tm_year = tm->tm_year;
    int tm_yday = tm->tm_mday;
    if (leap_year_p(tm_year + 1900))
        tm_yday += leap_year_yday_offset[tm->tm_mon];
    else
        tm_yday += common_year_yday_offset[tm->tm_mon];

    /*
     *  `Seconds Since the Epoch' in SUSv3:
     *  tm_sec + tm_min*60 + tm_hour*3600 + tm_yday*86400 +
     *  (tm_year-70)*31536000 + ((tm_year-69)/4)*86400 -
     *  ((tm_year-1)/100)*86400 + ((tm_year+299)/400)*86400
     */
    return tm->tm_sec + tm->tm_min*60 + tm->tm_hour*3600 +
           (time_t)(tm_yday +
                    (tm_year-70)*365 +
                    DIV(tm_year-69,4) -
                    DIV(tm_year-1,100) +
                    DIV(tm_year+299,400))*86400;
}

static int
tmcmp(struct tm *a, struct tm *b)
{
    if (a->tm_year != b->tm_year)
        return a->tm_year < b->tm_year ? -1 : 1;
    else if (a->tm_mon != b->tm_mon)
        return a->tm_mon < b->tm_mon ? -1 : 1;
    else if (a->tm_mday != b->tm_mday)
        return a->tm_mday < b->tm_mday ? -1 : 1;
    else if (a->tm_hour != b->tm_hour)
        return a->tm_hour < b->tm_hour ? -1 : 1;
    else if (a->tm_min != b->tm_min)
        return a->tm_min < b->tm_min ? -1 : 1;
    else if (a->tm_sec != b->tm_sec)
        return a->tm_sec < b->tm_sec ? -1 : 1;
    else
        return 0;
}

static time_t
search_time_t(struct tm *tptr, int utc_p)
{
    time_t guess, guess_lo, guess_hi;
    struct tm *tm, tm_lo, tm_hi;
    int d, have_guess;
    int find_dst;

    find_dst = 0 < tptr->tm_isdst;

#ifdef NEGATIVE_TIME_T
    guess_lo = 1L << (8 * sizeof(time_t) - 1);
#else
    guess_lo = 0;
#endif
    guess_hi = ((time_t)-1) < ((time_t)0) ?
               (1UL << (8 * sizeof(time_t) - 1)) - 1 :
               ~(time_t)0;

    guess = timegm_noleapsecond(tptr);
    tm = (utc_p ? gmtime : localtime)(&guess);
    if (tm) {
        d = tmcmp(tptr, tm);
        if (d == 0) return guess;
        if (d < 0) {
            guess_hi = guess;
            guess -= 24 * 60 * 60;
        }
        else {
            guess_lo = guess;
            guess += 24 * 60 * 60;
        }
        if (guess_lo < guess && guess < guess_hi &&
            (tm = (utc_p ? gmtime : localtime)(&guess)) != NULL) {
            d = tmcmp(tptr, tm);
            if (d == 0) return guess;
            if (d < 0)
                guess_hi = guess;
            else
                guess_lo = guess;
        }
    }

    tm = (utc_p ? gmtime : localtime)(&guess_lo);
    if (!tm) goto error;
    d = tmcmp(tptr, tm);
    if (d < 0) goto out_of_range;
    if (d == 0) return guess_lo;
    tm_lo = *tm;

    tm = (utc_p ? gmtime : localtime)(&guess_hi);
    if (!tm) goto error;
    d = tmcmp(tptr, tm);
    if (d > 0) goto out_of_range;
    if (d == 0) return guess_hi;
    tm_hi = *tm;

    have_guess = 0;

    while (guess_lo + 1 < guess_hi) {
        /* there is a gap between guess_lo and guess_hi. */
        unsigned long range = 0;
        if (!have_guess) {
            int a, b;
            /*
              Try precious guess by a linear interpolation at first.
              `a' and `b' is a coefficient of guess_lo and guess_hi as:

                guess = (guess_lo * a + guess_hi * b) / (a + b)

              However this causes overflow in most cases, following assignment
              is used instead:

                guess = guess_lo / d * a + (guess_lo % d) * a / d
                        + guess_hi / d * b + (guess_hi % d) * b / d
                where d = a + b

              To avoid overflow in this assignment, `d' is restricted to less than
              sqrt(2**31).  By this restriction and other reasons, the guess is
              not accurate and some error is expected.  `range' approximates
              the maximum error.

              When these parameters are not suitable, i.e. guess is not within
              guess_lo and guess_hi, simple guess by binary search is used.
            */
            range = 366 * 24 * 60 * 60;
            a = (tm_hi.tm_year - tptr->tm_year);
            b = (tptr->tm_year - tm_lo.tm_year);
            /* 46000 is selected as `some big number less than sqrt(2**31)'. */
            if (a + b <= 46000 / 12) {
                range = 31 * 24 * 60 * 60;
                a *= 12;
                b *= 12;
                a += tm_hi.tm_mon - tptr->tm_mon;
                b += tptr->tm_mon - tm_lo.tm_mon;
                if (a + b <= 46000 / 31) {
                    range = 24 * 60 * 60;
                    a *= 31;
                    b *= 31;
                    a += tm_hi.tm_mday - tptr->tm_mday;
                    b += tptr->tm_mday - tm_lo.tm_mday;
                    if (a + b <= 46000 / 24) {
                        range = 60 * 60;
                        a *= 24;
                        b *= 24;
                        a += tm_hi.tm_hour - tptr->tm_hour;
                        b += tptr->tm_hour - tm_lo.tm_hour;
                        if (a + b <= 46000 / 60) {
                            range = 60;
                            a *= 60;
                            b *= 60;
                            a += tm_hi.tm_min - tptr->tm_min;
                            b += tptr->tm_min - tm_lo.tm_min;
                            if (a + b <= 46000 / 60) {
                                range = 1;
                                a *= 60;
                                b *= 60;
                                a += tm_hi.tm_sec - tptr->tm_sec;
                                b += tptr->tm_sec - tm_lo.tm_sec;
                            }
                        }
                    }
                }
            }
            if (a <= 0) a = 1;
            if (b <= 0) b = 1;
            d = a + b;
            /*
              Although `/' and `%' may produce unexpected result with negative
              argument, it doesn't cause serious problem because there is a
              fail safe.
            */
            guess = guess_lo / d * a + (guess_lo % d) * a / d
                    + guess_hi / d * b + (guess_hi % d) * b / d;
            have_guess = 1;
        }

        if (guess <= guess_lo || guess_hi <= guess) {
            /* Precious guess is invalid. try binary search. */
            guess = guess_lo / 2 + guess_hi / 2;
            if (guess <= guess_lo)
                guess = guess_lo + 1;
            else if (guess >= guess_hi)
                guess = guess_hi - 1;
            range = 0;
        }

        tm = (utc_p ? gmtime : localtime)(&guess);
        if (!tm) goto error;
        have_guess = 0;

        d = tmcmp(tptr, tm);
        if (d < 0) {
            guess_hi = guess;
            tm_hi = *tm;
            if (range) {
                guess = guess - range;
                range = 0;
                if (guess_lo < guess && guess < guess_hi)
                    have_guess = 1;
            }
        }
        else if (d > 0) {
            guess_lo = guess;
            tm_lo = *tm;
            if (range) {
                guess = guess + range;
                range = 0;
                if (guess_lo < guess && guess < guess_hi)
                    have_guess = 1;
            }
        }
        else {
            if (!utc_p) {
                /* If localtime is nonmonotonic, another result may exist. */
                time_t guess2;
                if (find_dst) {
                    guess2 = guess - 2 * 60 * 60;
                    tm = localtime(&guess2);
                    if (tm) {
                        if (tptr->tm_hour != (tm->tm_hour + 2) % 24 ||
                            tptr->tm_min != tm->tm_min ||
                            tptr->tm_sec != tm->tm_sec
                        ) {
                            guess2 -= (tm->tm_hour - tptr->tm_hour) * 60 * 60 +
                                      (tm->tm_min - tptr->tm_min) * 60 +
                                      (tm->tm_sec - tptr->tm_sec);
                            if (tptr->tm_mday != tm->tm_mday)
                                guess2 += 24 * 60 * 60;
                            if (guess != guess2) {
                                tm = localtime(&guess2);
                                if (tmcmp(tptr, tm) == 0) {
                                    if (guess < guess2)
                                        return guess;
                                    else
                                        return guess2;
                                }
                            }
                        }
                    }
                }
                else {
                    guess2 = guess + 2 * 60 * 60;
                    tm = localtime(&guess2);
                    if (tm) {
                        if ((tptr->tm_hour + 2) % 24 != tm->tm_hour ||
                            tptr->tm_min != tm->tm_min ||
                            tptr->tm_sec != tm->tm_sec
                        ) {
                            guess2 -= (tm->tm_hour - tptr->tm_hour) * 60 * 60 +
                                      (tm->tm_min - tptr->tm_min) * 60 +
                                      (tm->tm_sec - tptr->tm_sec);
                            if (tptr->tm_mday != tm->tm_mday)
                                guess2 -= 24 * 60 * 60;
                            if (guess != guess2) {
                                tm = localtime(&guess2);
                                if (tmcmp(tptr, tm) == 0) {
                                    if (guess < guess2)
                                        return guess2;
                                    else
                                        return guess;
                                }
                            }
                        }
                    }
                }
            }
            return guess;
        }
    }
    /* Given argument has no corresponding time_t. Let's outerpolation. */
    if (tm_lo.tm_year == tptr->tm_year && tm_lo.tm_mon == tptr->tm_mon) {
        return guess_lo +
               (tptr->tm_mday - tm_lo.tm_mday) * 24 * 60 * 60 +
               (tptr->tm_hour - tm_lo.tm_hour) * 60 * 60 +
               (tptr->tm_min - tm_lo.tm_min) * 60 +
               (tptr->tm_sec - tm_lo.tm_sec);
    }
    else if (tm_hi.tm_year == tptr->tm_year && tm_hi.tm_mon == tptr->tm_mon) {
        return guess_hi +
               (tptr->tm_mday - tm_hi.tm_mday) * 24 * 60 * 60 +
               (tptr->tm_hour - tm_hi.tm_hour) * 60 * 60 +
               (tptr->tm_min - tm_hi.tm_min) * 60 +
               (tptr->tm_sec - tm_hi.tm_sec);
    }

  out_of_range:
    rb_raise(rb_eArgError, "time out of range");

  error:
    rb_raise(rb_eArgError, "gmtime/localtime error");
    return 0;                   /* not reached */
}

static time_t
make_time_t(struct tm *tptr, int utc_p)
{
    time_t t;
    struct tm *tmp, buf;
    buf = *tptr;
    if (utc_p) {
#if defined(HAVE_TIMEGM)
        if ((t = timegm(&buf)) != -1)
            return t;
#ifdef NEGATIVE_TIME_T
        if ((tmp = gmtime(&t)) &&
            tptr->tm_year == tmp->tm_year &&
            tptr->tm_mon == tmp->tm_mon &&
            tptr->tm_mday == tmp->tm_mday &&
            tptr->tm_hour == tmp->tm_hour &&
            tptr->tm_min == tmp->tm_min &&
            tptr->tm_sec == tmp->tm_sec
        )
            return t;
#endif
#endif
        return search_time_t(&buf, utc_p);
    }
    else {
#if defined(HAVE_MKTIME)
        if ((t = mktime(&buf)) != -1)
            return t;
#ifdef NEGATIVE_TIME_T
        if ((tmp = localtime(&t)) &&
            tptr->tm_year == tmp->tm_year &&
            tptr->tm_mon == tmp->tm_mon &&
            tptr->tm_mday == tmp->tm_mday &&
            tptr->tm_hour == tmp->tm_hour &&
            tptr->tm_min == tmp->tm_min &&
            tptr->tm_sec == tmp->tm_sec
        )
            return t;
#endif
#endif
        return search_time_t(&buf, utc_p);
    }
}

static VALUE
time_utc_or_local(int argc, VALUE *argv, int utc_p, VALUE klass)
{
    struct tm tm;
    VALUE time;
    time_t usec;

    time_arg(argc, argv, &tm, &usec);
    time = time_new_internal(klass, make_time_t(&tm, utc_p), usec);
    if (utc_p) return time_gmtime(time);
    return time_localtime(time);
}

/*
 *  call-seq:
 *     Time.utc( year [, month, day, hour, min, sec, usec] ) => time
 *     Time.utc( sec, min, hour, day, month, year, wday, yday, isdst, tz
 *     ) => time
 *     Time.gm( year [, month, day, hour, min, sec, usec] ) => time
 *     Time.gm( sec, min, hour, day, month, year, wday, yday, isdst, tz
 *     ) => time
 *
 *  Creates a time based on given values, interpreted as UTC (GMT). The
 *  year must be specified. Other values default to the minimum value
 *  for that field (and may be <code>nil</code> or omitted). Months may
 *  be specified by numbers from 1 to 12, or by the three-letter English
 *  month names. Hours are specified on a 24-hour clock (0..23). Raises
 *  an <code>ArgumentError</code> if any values are out of range. Will
 *  also accept ten arguments in the order output by
 *  <code>Time#to_a</code>.
 *
 *     Time.utc(2000,"jan",1,20,15,1)  #=> Sat Jan 01 20:15:01 UTC 2000
 *     Time.gm(2000,"jan",1,20,15,1)   #=> Sat Jan 01 20:15:01 UTC 2000
 */
static VALUE
time_s_mkutc(int argc, VALUE *argv, VALUE klass)
{
    return time_utc_or_local(argc, argv, Qtrue, klass);
}

/*
 *  call-seq:
 *     Time.local( year [, month, day, hour, min, sec, usec] ) => time
 *     Time.local( sec, min, hour, day, month, year, wday, yday, isdst,
 *     tz ) => time
 *     Time.mktime( year, month, day, hour, min, sec, usec )   => time
 *
 *  Same as <code>Time::gm</code>, but interprets the values in the
 *  local time zone.
 *
 *     Time.local(2000,"jan",1,20,15,1)   #=> Sat Jan 01 20:15:01 CST 2000
 */

static VALUE
time_s_mktime(int argc, VALUE *argv, VALUE klass)
{
    return time_utc_or_local(argc, argv, Qfalse, klass);
}

/*
 *  call-seq:
 *     time.to_i   => int
 *     time.tv_sec => int
 *
 *  Returns the value of <i>time</i> as an integer number of seconds
 *  since epoch.
 *
 *     t = Time.now
 *     "%10.5f" % t.to_f   #=> "1049896564.17839"
 *     t.to_i              #=> 1049896564
 */

static VALUE
time_to_i(VALUE time)
{
    struct time_object *tobj;

    GetTimeval(time, tobj);
    return LONG2NUM(tobj->tv.tv_sec);
}

/*
 *  call-seq:
 *     time.to_f => float
 *
 *  Returns the value of <i>time</i> as a floating point number of
 *  seconds since epoch.
 *
 *     t = Time.now
 *     "%10.5f" % t.to_f   #=> "1049896564.13654"
 *     t.to_i              #=> 1049896564
 */

static VALUE
time_to_f(VALUE time)
{
    struct time_object *tobj;

    GetTimeval(time, tobj);
    return rb_float_new((double)tobj->tv.tv_sec+(double)tobj->tv.tv_usec/1e6);
}

/*
 *  call-seq:
 *     time.usec    => int
 *     time.tv_usec => int
 *
 *  Returns just the number of microseconds for <i>time</i>.
 *
 *     t = Time.now        #=> Wed Apr 09 08:56:04 CDT 2003
 *     "%10.6f" % t.to_f   #=> "1049896564.259970"
 *     t.usec              #=> 259970
 */

static VALUE
time_usec(VALUE time)
{
    struct time_object *tobj;

    GetTimeval(time, tobj);
    return LONG2NUM(tobj->tv.tv_usec);
}

/*
 *  call-seq:
 *     time <=> other_time => -1, 0, +1
 *     time <=> numeric    => -1, 0, +1
 *
 *  Comparison---Compares <i>time</i> with <i>other_time</i> or with
 *  <i>numeric</i>, which is the number of seconds (possibly
 *  fractional) since epoch.
 *
 *     t = Time.now       #=> Wed Apr 09 08:56:03 CDT 2003
 *     t2 = t + 2592000   #=> Fri May 09 08:56:03 CDT 2003
 *     t <=> t2           #=> -1
 *     t2 <=> t           #=> 1
 *     t <=> t            #=> 0
 */

static VALUE
time_cmp(VALUE time1, VALUE time2)
{
    struct time_object *tobj1, *tobj2;

    GetTimeval(time1, tobj1);
    if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
        GetTimeval(time2, tobj2);
        if (tobj1->tv.tv_sec == tobj2->tv.tv_sec) {
            if (tobj1->tv.tv_usec == tobj2->tv.tv_usec) return INT2FIX(0);
            if (tobj1->tv.tv_usec > tobj2->tv.tv_usec) return INT2FIX(1);
            return INT2FIX(-1);
        }
        if (tobj1->tv.tv_sec > tobj2->tv.tv_sec) return INT2FIX(1);
        return INT2FIX(-1);
    }

    return Qnil;
}

/*
 * call-seq:
 *  time.eql?(other_time)
 *
 * Return <code>true</code> if <i>time</i> and <i>other_time</i> are
 * both <code>Time</code> objects with the same seconds and fractional
 * seconds.
 */

static VALUE
time_eql(VALUE time1, VALUE time2)
{
    struct time_object *tobj1, *tobj2;

    GetTimeval(time1, tobj1);
    if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
        GetTimeval(time2, tobj2);
        if (tobj1->tv.tv_sec == tobj2->tv.tv_sec) {
            if (tobj1->tv.tv_usec == tobj2->tv.tv_usec) return Qtrue;
        }
    }
    return Qfalse;
}

/*
 *  call-seq:
 *     time.utc? => true or false
 *     time.gmt? => true or false
 *
 *  Returns <code>true</code> if <i>time</i> represents a time in UTC
 *  (GMT).
 *
 *     t = Time.now                        #=> Wed Apr 09 08:56:04 CDT 2003
 *     t.utc?                              #=> false
 *     t = Time.gm(2000,"jan",1,20,15,1)   #=> Sat Jan 01 20:15:01 UTC 2000
 *     t.utc?                              #=> true
 *
 *     t = Time.now                        #=> Wed Apr 09 08:56:03 CDT 2003
 *     t.gmt?                              #=> false
 *     t = Time.gm(2000,1,1,20,15,1)       #=> Sat Jan 01 20:15:01 UTC 2000
 *     t.gmt?                              #=> true
 */

static VALUE
time_utc_p(VALUE time)
{
    struct time_object *tobj;

    GetTimeval(time, tobj);
    if (tobj->gmt) return Qtrue;
    return Qfalse;
}

/*
 * call-seq:
 *   time.hash   => fixnum
 *
 * Return a hash code for this time object.
 */

static VALUE
time_hash(VALUE time)
{
    struct time_object *tobj;
    long hash;

    GetTimeval(time, tobj);
    hash = tobj->tv.tv_sec ^ tobj->tv.tv_usec;
    return LONG2FIX(hash);
}

/* :nodoc: */
static VALUE
time_init_copy(VALUE copy, VALUE time)
{
    struct time_object *tobj, *tcopy;

    if (copy == time) return copy;
    time_modify(copy);
    if (TYPE(time) != T_DATA || RDATA(time)->dfree != time_free) {
        rb_raise(rb_eTypeError, "wrong argument type");
    }
    GetTimeval(time, tobj);
    GetTimeval(copy, tcopy);
    MEMCPY(tcopy, tobj, struct time_object, 1);

    return copy;
}

static VALUE
time_dup(VALUE time)
{
    VALUE dup = time_s_alloc(rb_cTime);
    time_init_copy(dup, time);
    return dup;
}

/*
 *  call-seq:
 *     time.localtime => time
 *
 *  Converts <i>time</i> to local time (using the local time zone in
 *  effect for this process) modifying the receiver.
 *
 *     t = Time.gm(2000, "jan", 1, 20, 15, 1)
 *     t.gmt?        #=> true
 *     t.localtime   #=> Sat Jan 01 14:15:01 CST 2000
 *     t.gmt?        #=> false
 */

static VALUE
time_localtime(VALUE time)
{
    struct time_object *tobj;
    struct tm *tm_tmp;
    time_t t;

    GetTimeval(time, tobj);
    if (!tobj->gmt) {
        if (tobj->tm_got)
            return time;
    }
    else {
        time_modify(time);
    }
    t = tobj->tv.tv_sec;
    tm_tmp = localtime(&t);
    if (!tm_tmp)
        rb_raise(rb_eArgError, "localtime error");
    tobj->tm = *tm_tmp;
    tobj->tm_got = 1;
    tobj->gmt = 0;
    return time;
}

/*
 *  call-seq:
 *     time.gmtime    => time
 *     time.utc       => time
 *
 *  Converts <i>time</i> to UTC (GMT), modifying the receiver.
 *
 *     t = Time.now   #=> Wed Apr 09 08:56:03 CDT 2003
 *     t.gmt?         #=> false
 *     t.gmtime       #=> Wed Apr 09 13:56:03 UTC 2003
 *     t.gmt?         #=> true
 *
 *     t = Time.now   #=> Wed Apr 09 08:56:04 CDT 2003
 *     t.utc?         #=> false
 *     t.utc          #=> Wed Apr 09 13:56:04 UTC 2003
 *     t.utc?         #=> true
 */

static VALUE
time_gmtime(VALUE time)
{
    struct time_object *tobj;
    struct tm *tm_tmp;
    time_t t;

    GetTimeval(time, tobj);
    if (tobj->gmt) {
        if (tobj->tm_got)
            return time;
    }
    else {
        time_modify(time);
    }
    t = tobj->tv.tv_sec;
    tm_tmp = gmtime(&t);
    if (!tm_tmp)
        rb_raise(rb_eArgError, "gmtime error");
    tobj->tm = *tm_tmp;
    tobj->tm_got = 1;
    tobj->gmt = 1;
    return time;
}

/*
 *  call-seq:
 *     time.getlocal => new_time
 *
 *  Returns a new <code>new_time</code> object representing <i>time</i> in
 *  local time (using the local time zone in effect for this process).
 *
 *     t = Time.gm(2000,1,1,20,15,1)   #=> Sat Jan 01 20:15:01 UTC 2000
 *     t.gmt?                          #=> true
 *     l = t.getlocal                  #=> Sat Jan 01 14:15:01 CST 2000
 *     l.gmt?                          #=> false
 *     t == l                          #=> true
 */

static VALUE
time_getlocaltime(VALUE time)
{
    return time_localtime(time_dup(time));
}

/*
 *  call-seq:
 *     time.getgm  => new_time
 *     time.getutc => new_time
 *
 *  Returns a new <code>new_time</code> object representing <i>time</i> in
 *  UTC.
 *
 *     t = Time.local(2000,1,1,20,15,1)   #=> Sat Jan 01 20:15:01 CST 2000
 *     t.gmt?                             #=> false
 *     y = t.getgm                        #=> Sun Jan 02 02:15:01 UTC 2000
 *     y.gmt?                             #=> true
 *     t == y                             #=> true
 */

static VALUE
time_getgmtime(VALUE time)
{
    return time_gmtime(time_dup(time));
}

static VALUE
time_get_tm(VALUE time, int gmt)
{
    if (gmt) return time_gmtime(time);
    return time_localtime(time);
}

/*
 *  call-seq:
 *     time.asctime => string
 *     time.ctime   => string
 *
 *  Returns a canonical string representation of <i>time</i>.
 *
 *     Time.now.asctime   #=> "Wed Apr  9 08:56:03 2003"
 */

static VALUE
time_asctime(VALUE time)
{
    struct time_object *tobj;
    char *s;

    GetTimeval(time, tobj);
    if (tobj->tm_got == 0) {
        time_get_tm(time, tobj->gmt);
    }
    s = asctime(&tobj->tm);
    if (s[24] == '\n') s[24] = '\0';

    return rb_str_new2(s);
}

/*
 *  call-seq:
 *     time.inspect => string
 *     time.to_s    => string
 *
 *  Returns a string representing <i>time</i>. Equivalent to calling
 *  <code>Time#strftime</code> with a format string of ``<code>%a</code>
 *  <code>%b</code> <code>%d</code> <code>%H:%M:%S</code>
 *  <code>%Z</code> <code>%Y</code>''.
 *
 *     Time.now.to_s   #=> "Wed Apr 09 08:56:04 CDT 2003"
 */

static VALUE
time_to_s(VALUE time)
{
    struct time_object *tobj;
    char buf[128];
    int len;

    GetTimeval(time, tobj);
    if (tobj->tm_got == 0) {
        time_get_tm(time, tobj->gmt);
    }
    if (tobj->gmt == 1) {
        len = strftime(buf, 128, "%a %b %d %H:%M:%S UTC %Y", &tobj->tm);
    }
    else {
        len = strftime(buf, 128, "%a %b %d %H:%M:%S %Z %Y", &tobj->tm);
    }
    return rb_str_new(buf, len);
}

#if SIZEOF_TIME_T == SIZEOF_LONG
typedef unsigned long unsigned_time_t;
#elif SIZEOF_TIME_T == SIZEOF_INT
typedef unsigned int unsigned_time_t;
#elif SIZEOF_TIME_T == SIZEOF_LONG_LONG
typedef unsigned LONG_LONG unsigned_time_t;
#else
# error cannot find integer type which size is same as time_t.
#endif

static VALUE
time_add(struct time_object *tobj, VALUE offset, int sign)
{
    double v = NUM2DBL(offset);
    double f, d;
    unsigned_time_t sec_off;
    time_t usec_off, sec, usec;
    VALUE result;

    if (v < 0) {
        v = -v;
        sign = -sign;
    }
    d = modf(v, &f);
    sec_off = (unsigned_time_t)f;
    if (f != (double)sec_off)
        rb_raise(rb_eRangeError, "time %s %f out of Time range",
                 sign < 0 ? "-" : "+", v);
    usec_off = (time_t)(d*1e6);

    if (sign < 0) {
        sec = tobj->tv.tv_sec - sec_off;
        usec = tobj->tv.tv_usec - usec_off;
        if (sec > tobj->tv.tv_sec)
            rb_raise(rb_eRangeError, "time - %f out of Time range", v);
    }
    else {
        sec = tobj->tv.tv_sec + sec_off;
        usec = tobj->tv.tv_usec + usec_off;
        if (sec < tobj->tv.tv_sec)
            rb_raise(rb_eRangeError, "time + %f out of Time range", v);
    }
    result = rb_time_new(sec, usec);
    if (tobj->gmt) {
        GetTimeval(result, tobj);
        tobj->gmt = 1;
    }
    return result;
}

/*
 *  call-seq:
 *     time + numeric => time
 *
 *  Addition---Adds some number of seconds (possibly fractional) to
 *  <i>time</i> and returns that value as a new time.
 *
 *     t = Time.now         #=> Wed Apr 09 08:56:03 CDT 2003
 *     t + (60 * 60 * 24)   #=> Thu Apr 10 08:56:03 CDT 2003
 */

static VALUE
time_plus(VALUE time1, VALUE time2)
{
    struct time_object *tobj;
    GetTimeval(time1, tobj);

    if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
        rb_raise(rb_eTypeError, "time + time?");
    }
    return time_add(tobj, time2, 1);
}

/*
 *  call-seq:
 *     time - other_time => float
 *     time - numeric    => time
 *
 *  Difference---Returns a new time that represents the difference
 *  between two times, or subtracts the given number of seconds in
 *  <i>numeric</i> from <i>time</i>.
 *
 *     t = Time.now       #=> Wed Apr 09 08:56:03 CDT 2003
 *     t2 = t + 2592000   #=> Fri May 09 08:56:03 CDT 2003
 *     t2 - t             #=> 2592000.0
 *     t2 - 2592000       #=> Wed Apr 09 08:56:03 CDT 2003
 */

static VALUE
time_minus(VALUE time1, VALUE time2)
{
    struct time_object *tobj;

    GetTimeval(time1, tobj);
    if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
        struct time_object *tobj2;
        double f;

        GetTimeval(time2, tobj2);
        f = (double)tobj->tv.tv_sec - (double)tobj2->tv.tv_sec;
        f += ((double)tobj->tv.tv_usec - (double)tobj2->tv.tv_usec)*1e-6;
        /* XXX: should check float overflow on 64bit time_t platforms */

        return rb_float_new(f);
    }
    return time_add(tobj, time2, -1);
}

/*
 * call-seq:
 *   time.succ   => new_time
 *
 * Return a new time object, one second later than <code>time</code>.
 */

static VALUE
time_succ(VALUE time)
{
    struct time_object *tobj;

    GetTimeval(time, tobj);
    return rb_time_new(tobj->tv.tv_sec + 1, tobj->tv.tv_usec);
}

/*
 *  call-seq:
 *     time.sec => fixnum
 *
 *  Returns the second of the minute (0..60)<em>[Yes, seconds really can
 *  range from zero to 60. This allows the system to inject leap seconds
 *  every now and then to correct for the fact that years are not really
 *  a convenient number of hours long.]</em> for <i>time</i>.
 *
 *     t = Time.now   #=> Wed Apr 09 08:56:04 CDT 2003
 *     t.sec          #=> 4
 */

static VALUE
time_sec(VALUE time)
{
    struct time_object *tobj;

    GetTimeval(time, tobj);
    if (tobj->tm_got == 0) {
        time_get_tm(time, tobj->gmt);
    }
    return INT2FIX(tobj->tm.tm_sec);
}

/*
 *  call-seq:
 *     time.min => fixnum
 *
 *  Returns the minute of the hour (0..59) for <i>time</i>.
 *
 *     t = Time.now   #=> Wed Apr 09 08:56:03 CDT 2003
 *     t.min          #=> 56
 */

static VALUE
time_min(VALUE time)
{
    struct time_object *tobj;

    GetTimeval(time, tobj);
    if (tobj->tm_got == 0) {
        time_get_tm(time, tobj->gmt);
    }
    return INT2FIX(tobj->tm.tm_min);
}

/*
 *  call-seq:
 *     time.hour => fixnum
 *
 *  Returns the hour of the day (0..23) for <i>time</i>.
 *
 *     t = Time.now   #=> Wed Apr 09 08:56:03 CDT 2003
 *     t.hour         #=> 8
 */

static VALUE
time_hour(VALUE time)
{
    struct time_object *tobj;

    GetTimeval(time, tobj);
    if (tobj->tm_got == 0) {
        time_get_tm(time, tobj->gmt);
    }
    return INT2FIX(tobj->tm.tm_hour);
}

/*
 *  call-seq:
 *     time.day  => fixnum
 *     time.mday => fixnum
 *
 *  Returns the day of the month (1..n) for <i>time</i>.
 *
 *     t = Time.now   #=> Wed Apr 09 08:56:03 CDT 2003
 *     t.day          #=> 9
 *     t.mday         #=> 9
 */

static VALUE
time_mday(VALUE time)
{
    struct time_object *tobj;

    GetTimeval(time, tobj);
    if (tobj->tm_got == 0) {
        time_get_tm(time, tobj->gmt);
    }
    return INT2FIX(tobj->tm.tm_mday);
}

/*
 *  call-seq:
 *     time.mon   => fixnum
 *     time.month => fixnum
 *
 *  Returns the month of the year (1..12) for <i>time</i>.
 *
 *     t = Time.now   #=> Wed Apr 09 08:56:03 CDT 2003
 *     t.mon          #=> 4
 *     t.month        #=> 4
 */

static VALUE
time_mon(VALUE time)
{
    struct time_object *tobj;

    GetTimeval(time, tobj);
    if (tobj->tm_got == 0) {
        time_get_tm(time, tobj->gmt);
    }
    return INT2FIX(tobj->tm.tm_mon+1);
}

/*
 *  call-seq:
 *     time.year => fixnum
 *
 *  Returns the year for <i>time</i> (including the century).
 *
 *     t = Time.now   #=> Wed Apr 09 08:56:04 CDT 2003
 *     t.year         #=> 2003
 */

static VALUE
time_year(VALUE time)
{
    struct time_object *tobj;

    GetTimeval(time, tobj);
    if (tobj->tm_got == 0) {
        time_get_tm(time, tobj->gmt);
    }
    return LONG2NUM((long)tobj->tm.tm_year+1900);
}

/*
 *  call-seq:
 *     time.wday => fixnum
 *
 *  Returns an integer representing the day of the week, 0..6, with
 *  Sunday == 0.
 *
 *     t = Time.now   #=> Wed Apr 09 08:56:04 CDT 2003
 *     t.wday         #=> 3
 */

static VALUE
time_wday(VALUE time)
{
    struct time_object *tobj;

    GetTimeval(time, tobj);
    if (tobj->tm_got == 0) {
        time_get_tm(time, tobj->gmt);
    }
    return INT2FIX(tobj->tm.tm_wday);
}

#define wday_p(n) {\
    struct time_object *tobj;\
    GetTimeval(time, tobj);\
    if (tobj->tm_got == 0) {\
        time_get_tm(time, tobj->gmt);\
    }\
    return (tobj->tm.tm_wday == (n)) ? Qtrue : Qfalse;\
}

/*
 *  call-seq:
 *     time.sunday? => true or false
 *
 *  Returns <code>true</code> if <i>time</i> represents Sunday.
 *
 *     t = Time.now   #=> Sun Oct 23 00:14:54 UTC 2005
 *     t.sunday?      #=> true
 */

static VALUE
time_sunday(VALUE time)
{
    wday_p(0);
}

/*
 *  call-seq:
 *     time.monday? => true or false
 *
 *  Returns <code>true</code> if <i>time</i> represents Monday.
 */

static VALUE
time_monday(VALUE time)
{
    wday_p(1);
}

/*
 *  call-seq:
 *     time.tuesday? => true or false
 *
 *  Returns <code>true</code> if <i>time</i> represents Tuesday.
 */

static VALUE
time_tuesday(VALUE time)
{
    wday_p(2);
}

/*
 *  call-seq:
 *     time.wednesday? => true or false
 *
 *  Returns <code>true</code> if <i>time</i> represents Wednesday.
 */

static VALUE
time_wednesday(VALUE time)
{
    wday_p(3);
}

/*
 *  call-seq:
 *     time.thursday? => true or false
 *
 *  Returns <code>true</code> if <i>time</i> represents Thursday.
 */

static VALUE
time_thursday(VALUE time)
{
    wday_p(4);
}

/*
 *  call-seq:
 *     time.friday? => true or false
 *
 *  Returns <code>true</code> if <i>time</i> represents Friday.
 */

static VALUE
time_friday(VALUE time)
{
    wday_p(5);
}

/*
 *  call-seq:
 *     time.saturday? => true or false
 *
 *  Returns <code>true</code> if <i>time</i> represents Saturday.
 */

static VALUE
time_saturday(VALUE time)
{
    wday_p(6);
}

/*
 *  call-seq:
 *     time.yday => fixnum
 *
 *  Returns an integer representing the day of the year, 1..366.
 *
 *     t = Time.now   #=> Wed Apr 09 08:56:04 CDT 2003
 *     t.yday         #=> 99
 */

static VALUE
time_yday(VALUE time)
{
    struct time_object *tobj;

    GetTimeval(time, tobj);
    if (tobj->tm_got == 0) {
        time_get_tm(time, tobj->gmt);
    }
    return INT2FIX(tobj->tm.tm_yday+1);
}

/*
 *  call-seq:
 *     time.isdst => true or false
 *     time.dst?  => true or false
 *
 *  Returns <code>true</code> if <i>time</i> occurs during Daylight
 *  Saving Time in its time zone.
 *
 *     Time.local(2000, 7, 1).isdst   #=> true
 *     Time.local(2000, 1, 1).isdst   #=> false
 *     Time.local(2000, 7, 1).dst?    #=> true
 *     Time.local(2000, 1, 1).dst?    #=> false
 */

static VALUE
time_isdst(VALUE time)
{
    struct time_object *tobj;

    GetTimeval(time, tobj);
    if (tobj->tm_got == 0) {
        time_get_tm(time, tobj->gmt);
    }
    return tobj->tm.tm_isdst?Qtrue:Qfalse;
}

/*
 *  call-seq:
 *     time.zone => string
 *
 *  Returns the name of the time zone used for <i>time</i>. As of Ruby
 *  1.8, returns ``UTC'' rather than ``GMT'' for UTC times.
 *
 *     t = Time.gm(2000, "jan", 1, 20, 15, 1)
 *     t.zone   #=> "UTC"
 *     t = Time.local(2000, "jan", 1, 20, 15, 1)
 *     t.zone   #=> "CST"
 */

static VALUE
time_zone(VALUE time)
{
    struct time_object *tobj;
#if !defined(HAVE_TM_ZONE) && (!defined(HAVE_TZNAME) || !defined(HAVE_DAYLIGHT))
    char buf[64];
    int len;
#endif

    GetTimeval(time, tobj);
    if (tobj->tm_got == 0) {
        time_get_tm(time, tobj->gmt);
    }

    if (tobj->gmt == 1) {
        return rb_str_new2("UTC");
    }
#if defined(HAVE_TM_ZONE)
    return rb_str_new2(tobj->tm.tm_zone);
#elif defined(HAVE_TZNAME) && defined(HAVE_DAYLIGHT)
    return rb_str_new2(tzname[daylight && tobj->tm.tm_isdst]);
#else
    len = strftime(buf, 64, "%Z", &tobj->tm);
    return rb_str_new(buf, len);
#endif
}

/*
 *  call-seq:
 *     time.gmt_offset => fixnum
 *     time.gmtoff     => fixnum
 *     time.utc_offset => fixnum
 *
 *  Returns the offset in seconds between the timezone of <i>time</i>
 *  and UTC.
 *
 *     t = Time.gm(2000,1,1,20,15,1)   #=> Sat Jan 01 20:15:01 UTC 2000
 *     t.gmt_offset                    #=> 0
 *     l = t.getlocal                  #=> Sat Jan 01 14:15:01 CST 2000
 *     l.gmt_offset                    #=> -21600
 */

static VALUE
time_utc_offset(VALUE time)
{
    struct time_object *tobj;

    GetTimeval(time, tobj);
    if (tobj->tm_got == 0) {
        time_get_tm(time, tobj->gmt);
    }

    if (tobj->gmt == 1) {
        return INT2FIX(0);
    }
    else {
#if defined(HAVE_STRUCT_TM_TM_GMTOFF)
        return INT2NUM(tobj->tm.tm_gmtoff);
#else
        struct tm *u, *l;
        time_t t;
        long off;
        l = &tobj->tm;
        t = tobj->tv.tv_sec;
        u = gmtime(&t);
        if (!u)
            rb_raise(rb_eArgError, "gmtime error");
        if (l->tm_year != u->tm_year)
            off = l->tm_year < u->tm_year ? -1 : 1;
        else if (l->tm_mon != u->tm_mon)
            off = l->tm_mon < u->tm_mon ? -1 : 1;
        else if (l->tm_mday != u->tm_mday)
            off = l->tm_mday < u->tm_mday ? -1 : 1;
        else
            off = 0;
        off = off * 24 + l->tm_hour - u->tm_hour;
        off = off * 60 + l->tm_min - u->tm_min;
        off = off * 60 + l->tm_sec - u->tm_sec;
        return LONG2FIX(off);
#endif
    }
}

/*
 *  call-seq:
 *     time.to_a => array
 *
 *  Returns a ten-element <i>array</i> of values for <i>time</i>:
 *  {<code>[ sec, min, hour, day, month, year, wday, yday, isdst, zone
 *  ]</code>}. See the individual methods for an explanation of the
 *  valid ranges of each value. The ten elements can be passed directly
 *  to <code>Time::utc</code> or <code>Time::local</code> to create a
 *  new <code>Time</code>.
 *
 *     now = Time.now   #=> Wed Apr 09 08:56:04 CDT 2003
 *     t = now.to_a     #=> [4, 56, 8, 9, 4, 2003, 3, 99, true, "CDT"]
 */

static VALUE
time_to_a(VALUE time)
{
    struct time_object *tobj;

    GetTimeval(time, tobj);
    if (tobj->tm_got == 0) {
        time_get_tm(time, tobj->gmt);
    }
    return rb_ary_new3(10,
                    INT2FIX(tobj->tm.tm_sec),
                    INT2FIX(tobj->tm.tm_min),
                    INT2FIX(tobj->tm.tm_hour),
                    INT2FIX(tobj->tm.tm_mday),
                    INT2FIX(tobj->tm.tm_mon+1),
                    LONG2NUM((long)tobj->tm.tm_year+1900),
                    INT2FIX(tobj->tm.tm_wday),
                    INT2FIX(tobj->tm.tm_yday+1),
                    tobj->tm.tm_isdst?Qtrue:Qfalse,
                    time_zone(time));
}

#define SMALLBUF 100
static int
rb_strftime(char **buf,
            const char *format,
            struct tm *time)
{
    int size, len, flen;

    (*buf)[0] = '\0';
    flen = strlen(format);
    if (flen == 0) {
        return 0;
    }
    len = strftime(*buf, SMALLBUF, format, time);
    if (len != 0 || **buf == '\0') return len;
    for (size=1024; ; size*=2) {
        *buf = xmalloc(size);
        (*buf)[0] = '\0';
        len = strftime(*buf, size, format, time);
        /*
         * buflen can be zero EITHER because there's not enough
         * room in the string, or because the control command
         * goes to the empty string. Make a reasonable guess that
         * if the buffer is 1024 times bigger than the length of the
         * format string, it's not failing for lack of room.
         */
        if (len > 0 || size >= 1024 * flen) return len;
        free(*buf);
    }
    /* not reached */
}

/*
 *  call-seq:
 *     time.strftime( string ) => string
 *
 *  Formats <i>time</i> according to the directives in the given format
 *  string. Any text not listed as a directive will be passed through
 *  to the output string.
 *
 *  Format meaning:
 *    %a - The abbreviated weekday name (``Sun'')
 *    %A - The  full  weekday  name (``Sunday'')
 *    %b - The abbreviated month name (``Jan'')
 *    %B - The  full  month  name (``January'')
 *    %c - The preferred local date and time representation
 *    %d - Day of the month (01..31)
 *    %H - Hour of the day, 24-hour clock (00..23)
 *    %I - Hour of the day, 12-hour clock (01..12)
 *    %j - Day of the year (001..366)
 *    %m - Month of the year (01..12)
 *    %M - Minute of the hour (00..59)
 *    %p - Meridian indicator (``AM''  or  ``PM'')
 *    %S - Second of the minute (00..60)
 *    %U - Week  number  of the current year,
 *            starting with the first Sunday as the first
 *            day of the first week (00..53)
 *    %W - Week  number  of the current year,
 *            starting with the first Monday as the first
 *            day of the first week (00..53)
 *    %w - Day of the week (Sunday is 0, 0..6)
 *    %x - Preferred representation for the date alone, no time
 *    %X - Preferred representation for the time alone, no date
 *    %y - Year without a century (00..99)
 *    %Y - Year with century
 *    %Z - Time zone name
 *    %% - Literal ``%'' character
 *
 *     t = Time.now
 *     t.strftime("Printed on %m/%d/%Y")   #=> "Printed on 04/09/2003"
 *     t.strftime("at %I:%M%p")            #=> "at 08:56AM"
 */

static VALUE
time_strftime(VALUE time, VALUE format)
{
    struct time_object *tobj;
    char buffer[SMALLBUF], *buf = buffer;
    const char *fmt;
    long len;
    VALUE str;

    GetTimeval(time, tobj);
    if (tobj->tm_got == 0) {
        time_get_tm(time, tobj->gmt);
    }
    StringValue(format);
    format = rb_str_new4(format);
    fmt = RSTRING(format)->ptr;
    len = RSTRING(format)->len;
    if (len == 0) {
        rb_warning("strftime called with empty format string");
    }
    else if (strlen(fmt) < len) {
        /* Ruby string may contain \0's. */
        const char *p = fmt, *pe = fmt + len;

        str = rb_str_new(0, 0);
        while (p < pe) {
            len = rb_strftime(&buf, p, &tobj->tm);
            rb_str_cat(str, buf, len);
            p += strlen(p) + 1;
            if (buf != buffer) {
                free(buf);
                buf = buffer;
            }
            for (fmt = p; p < pe && !*p; ++p);
            if (p > fmt) rb_str_cat(str, fmt, p - fmt);
        }
        return str;
    }
    else {
        len = rb_strftime(&buf, RSTRING(format)->ptr, &tobj->tm);
    }
    str = rb_str_new(buf, len);
    if (buf != buffer) free(buf);
    return str;
}

/*
 *  call-seq:
 *     Time.times => struct_tms
 *
 *  Deprecated in favor of <code>Process::times</code>
 */

static VALUE
time_s_times(VALUE obj)
{
    rb_warn("obsolete method Time::times; use Process::times");
    return rb_proc_times(obj);
}

/*
 * undocumented
 */

static VALUE
time_mdump(VALUE time)
{
    struct time_object *tobj;
    struct tm *tm;
    unsigned long p, s;
    char buf[8];
    time_t t;
    int i;

    GetTimeval(time, tobj);

    t = tobj->tv.tv_sec;
    tm = gmtime(&t);

    if ((tm->tm_year & 0xffff) != tm->tm_year)
        rb_raise(rb_eArgError, "year too big to marshal");

    p = 0x1          << 31 | /*  1 */
        tobj->gmt    << 30 | /*  1 */
        tm->tm_year  << 14 | /* 16 */
        tm->tm_mon   << 10 | /*  4 */
        tm->tm_mday  <<  5 | /*  5 */
        tm->tm_hour;         /*  5 */
    s = tm->tm_min   << 26 | /*  6 */
        tm->tm_sec   << 20 | /*  6 */
        tobj->tv.tv_usec;    /* 20 */

    for (i=0; i<4; i++) {
        buf[i] = p & 0xff;
        p = RSHIFT(p, 8);
    }
    for (i=4; i<8; i++) {
        buf[i] = s & 0xff;
        s = RSHIFT(s, 8);
    }

    return rb_str_new(buf, 8);
}

/*
 * call-seq:
 *   time._dump   => string
 *
 * Dump _time_ for marshaling.
 */

static VALUE
time_dump(int argc, VALUE *argv, VALUE time)
{
    VALUE str;

    rb_scan_args(argc, argv, "01", 0);
    str = time_mdump(time);
    rb_copy_generic_ivar(str, time);

    return str;
}

/*
 * undocumented
 */

static VALUE
time_mload(VALUE time, VALUE str)
{
    struct time_object *tobj;
    unsigned long p, s;
    time_t sec, usec;
    unsigned char *buf;
    struct tm tm;
    int i, gmt;

    time_modify(time);
    StringValue(str);
    buf = (unsigned char *)RSTRING(str)->ptr;
    if (RSTRING(str)->len != 8) {
        rb_raise(rb_eTypeError, "marshaled time format differ");
    }

    p = s = 0;
    for (i=0; i<4; i++) {
        p |= buf[i]<<(8*i);
    }
    for (i=4; i<8; i++) {
        s |= buf[i]<<(8*(i-4));
    }

    if ((p & (1<<31)) == 0) {
        gmt = 0;
        sec = p;
        usec = s;
    }
    else {
        p &= ~(1<<31);
        gmt        = (p >> 30) & 0x1;
        tm.tm_year = (p >> 14) & 0xffff;
        tm.tm_mon  = (p >> 10) & 0xf;
        tm.tm_mday = (p >>  5) & 0x1f;
        tm.tm_hour =  p        & 0x1f;
        tm.tm_min  = (s >> 26) & 0x3f;
        tm.tm_sec  = (s >> 20) & 0x3f;
        tm.tm_isdst = 0;

        sec = make_time_t(&tm, Qtrue);
        usec = (time_t)(s & 0xfffff);
    }
    time_overflow_p(&sec, &usec);

    GetTimeval(time, tobj);
    tobj->tm_got = 0;
    tobj->gmt = gmt;
    tobj->tv.tv_sec = sec;
    tobj->tv.tv_usec = usec;
    return time;
}

/*
 * call-seq:
 *   Time._load(string)   => time
 *
 * Unmarshal a dumped +Time+ object.
 */

static VALUE
time_load(VALUE klass, VALUE str)
{
    VALUE time = time_s_alloc(klass);

    rb_copy_generic_ivar(time, str);
    time_mload(time, str);
    return time;
}

/*
 *  <code>Time</code> is an abstraction of dates and times. Time is
 *  stored internally as the number of seconds and microseconds since
 *  the <em>epoch</em>, January 1, 1970 00:00 UTC. On some operating
 *  systems, this offset is allowed to be negative. Also see the
 *  library modules <code>Date</code> and <code>ParseDate</code>. The
 *  <code>Time</code> class treats GMT (Greenwich Mean Time) and UTC
 *  (Coordinated Universal Time)<em>[Yes, UTC really does stand for
 *  Coordinated Universal Time. There was a committee involved.]</em>
 *  as equivalent.  GMT is the older way of referring to these
 *  baseline times but persists in the names of calls on Posix
 *  systems.
 *
 *  All times are stored with some number of microseconds. Be aware of
 *  this fact when comparing times with each other---times that are
 *  apparently equal when displayed may be different when compared.
 */

void
Init_Time(void)
{
    rb_cTime = rb_define_class("Time", rb_cObject);
    rb_include_module(rb_cTime, rb_mComparable);

    rb_define_alloc_func(rb_cTime, time_s_alloc);
    rb_define_singleton_method(rb_cTime, "now", rb_class_new_instance, -1);
    rb_define_singleton_method(rb_cTime, "at", time_s_at, -1);
    rb_define_singleton_method(rb_cTime, "utc", time_s_mkutc, -1);
    rb_define_singleton_method(rb_cTime, "gm", time_s_mkutc, -1);
    rb_define_singleton_method(rb_cTime, "local", time_s_mktime, -1);
    rb_define_singleton_method(rb_cTime, "mktime", time_s_mktime, -1);

    rb_define_singleton_method(rb_cTime, "times", time_s_times, 0);

    rb_define_method(rb_cTime, "to_i", time_to_i, 0);
    rb_define_method(rb_cTime, "to_f", time_to_f, 0);
    rb_define_method(rb_cTime, "<=>", time_cmp, 1);
    rb_define_method(rb_cTime, "eql?", time_eql, 1);
    rb_define_method(rb_cTime, "hash", time_hash, 0);
    rb_define_method(rb_cTime, "initialize", time_init, 0);
    rb_define_method(rb_cTime, "initialize_copy", time_init_copy, 1);

    rb_define_method(rb_cTime, "localtime", time_localtime, 0);
    rb_define_method(rb_cTime, "gmtime", time_gmtime, 0);
    rb_define_method(rb_cTime, "utc", time_gmtime, 0);
    rb_define_method(rb_cTime, "getlocal", time_getlocaltime, 0);
    rb_define_method(rb_cTime, "getgm", time_getgmtime, 0);
    rb_define_method(rb_cTime, "getutc", time_getgmtime, 0);

    rb_define_method(rb_cTime, "ctime", time_asctime, 0);
    rb_define_method(rb_cTime, "asctime", time_asctime, 0);
    rb_define_method(rb_cTime, "to_s", time_to_s, 0);
    rb_define_method(rb_cTime, "inspect", time_to_s, 0);
    rb_define_method(rb_cTime, "to_a", time_to_a, 0);

    rb_define_method(rb_cTime, "+", time_plus, 1);
    rb_define_method(rb_cTime, "-", time_minus, 1);

    rb_define_method(rb_cTime, "succ", time_succ, 0);
    rb_define_method(rb_cTime, "sec", time_sec, 0);
    rb_define_method(rb_cTime, "min", time_min, 0);
    rb_define_method(rb_cTime, "hour", time_hour, 0);
    rb_define_method(rb_cTime, "mday", time_mday, 0);
    rb_define_method(rb_cTime, "day", time_mday, 0);
    rb_define_method(rb_cTime, "mon", time_mon, 0);
    rb_define_method(rb_cTime, "month", time_mon, 0);
    rb_define_method(rb_cTime, "year", time_year, 0);
    rb_define_method(rb_cTime, "wday", time_wday, 0);
    rb_define_method(rb_cTime, "yday", time_yday, 0);
    rb_define_method(rb_cTime, "isdst", time_isdst, 0);
    rb_define_method(rb_cTime, "dst?", time_isdst, 0);
    rb_define_method(rb_cTime, "zone", time_zone, 0);
    rb_define_method(rb_cTime, "gmtoff", time_utc_offset, 0);
    rb_define_method(rb_cTime, "gmt_offset", time_utc_offset, 0);
    rb_define_method(rb_cTime, "utc_offset", time_utc_offset, 0);

    rb_define_method(rb_cTime, "utc?", time_utc_p, 0);
    rb_define_method(rb_cTime, "gmt?", time_utc_p, 0);

    rb_define_method(rb_cTime, "sunday?", time_sunday, 0);
    rb_define_method(rb_cTime, "monday?", time_monday, 0);
    rb_define_method(rb_cTime, "tuesday?", time_tuesday, 0);
    rb_define_method(rb_cTime, "wednesday?", time_wednesday, 0);
    rb_define_method(rb_cTime, "thursday?", time_thursday, 0);
    rb_define_method(rb_cTime, "friday?", time_friday, 0);
    rb_define_method(rb_cTime, "saturday?", time_saturday, 0);

    rb_define_method(rb_cTime, "tv_sec", time_to_i, 0);
    rb_define_method(rb_cTime, "tv_usec", time_usec, 0);
    rb_define_method(rb_cTime, "usec", time_usec, 0);

    rb_define_method(rb_cTime, "strftime", time_strftime, 1);

    /* methods for marshaling */
    rb_define_method(rb_cTime, "_dump", time_dump, -1);
    rb_define_singleton_method(rb_cTime, "_load", time_load, 1);
#if 0
    /* Time will support marshal_dump and marshal_load in the future (1.9 maybe) */
    rb_define_method(rb_cTime, "marshal_dump", time_mdump, 0);
    rb_define_method(rb_cTime, "marshal_load", time_mload, 1);
#endif
}
/* [<][>][^] [v] [top][bottom][index] [help] */


utf8.c

root/utf8.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. utf8_mbc_enc_len
  2. utf8_mbc_to_code
  3. utf8_code_to_mbclen
  4. utf8_code_to_mbc_first
  5. utf8_code_to_mbc
  6. utf8_mbc_to_normalize
  7. utf8_is_mbc_ambiguous
  8. utf8_get_ctype_code_range
  9. utf8_is_code_ctype
  10. utf8_left_adjust_char_head
/**********************************************************************
  utf8.c -  Oniguruma (regular expression library)
**********************************************************************/
/*-
 * Copyright (c) 2002-2005  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#include "regenc.h"

#define USE_INVALID_CODE_SCHEME

#ifdef USE_INVALID_CODE_SCHEME
/* virtual codepoint values for invalid encoding byte 0xfe and 0xff */
#define INVALID_CODE_FE   0xfffffffe
#define INVALID_CODE_FF   0xffffffff
#define VALID_CODE_LIMIT  0x7fffffff
#endif

#define utf8_islead(c)     ((UChar )((c) & 0xc0) != 0x80)

static int EncLen_UTF8[] = {
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
  4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 1, 1
};

static int
utf8_mbc_enc_len(const UChar* p)
{
  return EncLen_UTF8[*p];
}

static OnigCodePoint
utf8_mbc_to_code(const UChar* p, const UChar* end)
{
  int c, len;
  OnigCodePoint n;

  len = enc_len(ONIG_ENCODING_UTF8, p);
  c = *p++;
  if (len > 1) {
    len--;
    n = c & ((1 << (6 - len)) - 1);
    while (len--) {
      c = *p++;
      n = (n << 6) | (c & ((1 << 6) - 1));
    }
    return n;
  }
  else {
#ifdef USE_INVALID_CODE_SCHEME
    if (c > 0xfd) {
      return ((c == 0xfe) ? INVALID_CODE_FE : INVALID_CODE_FF);
    }
#endif
    return (OnigCodePoint )c;
  }
}

static int
utf8_code_to_mbclen(OnigCodePoint code)
{
  if      ((code & 0xffffff80) == 0) return 1;
  else if ((code & 0xfffff800) == 0) {
    if (code <= 0xff && code >= 0xfe)
      return 1;
    return 2;
  }
  else if ((code & 0xffff0000) == 0) return 3;
  else if ((code & 0xffe00000) == 0) return 4;
  else if ((code & 0xfc000000) == 0) return 5;
  else if ((code & 0x80000000) == 0) return 6;
#ifdef USE_INVALID_CODE_SCHEME
  else if (code == INVALID_CODE_FE) return 1;
  else if (code == INVALID_CODE_FF) return 1;
#endif
  else
    return ONIGENCERR_TOO_BIG_WIDE_CHAR_VALUE;
}

#if 0
static int
utf8_code_to_mbc_first(OnigCodePoint code)
{
  if ((code & 0xffffff80) == 0)
    return code;
  else {
    if ((code & 0xfffff800) == 0)
      return ((code>>6)& 0x1f) | 0xc0;
    else if ((code & 0xffff0000) == 0)
      return ((code>>12) & 0x0f) | 0xe0;
    else if ((code & 0xffe00000) == 0)
      return ((code>>18) & 0x07) | 0xf0;
    else if ((code & 0xfc000000) == 0)
      return ((code>>24) & 0x03) | 0xf8;
    else if ((code & 0x80000000) == 0)
      return ((code>>30) & 0x01) | 0xfc;
    else {
      return ONIGENCERR_TOO_BIG_WIDE_CHAR_VALUE;
    }
  }
}
#endif

static int
utf8_code_to_mbc(OnigCodePoint code, UChar *buf)
{
#define UTF8_TRAILS(code, shift) (UChar )((((code) >> (shift)) & 0x3f) | 0x80)
#define UTF8_TRAIL0(code)        (UChar )(((code) & 0x3f) | 0x80)

  if ((code & 0xffffff80) == 0) {
    *buf = (UChar )code;
    return 1;
  }
  else {
    UChar *p = buf;

    if ((code & 0xfffff800) == 0) {
      *p++ = (UChar )(((code>>6)& 0x1f) | 0xc0);
    }
    else if ((code & 0xffff0000) == 0) {
      *p++ = (UChar )(((code>>12) & 0x0f) | 0xe0);
      *p++ = UTF8_TRAILS(code, 6);
    }
    else if ((code & 0xffe00000) == 0) {
      *p++ = (UChar )(((code>>18) & 0x07) | 0xf0);
      *p++ = UTF8_TRAILS(code, 12);
      *p++ = UTF8_TRAILS(code,  6);
    }
    else if ((code & 0xfc000000) == 0) {
      *p++ = (UChar )(((code>>24) & 0x03) | 0xf8);
      *p++ = UTF8_TRAILS(code, 18);
      *p++ = UTF8_TRAILS(code, 12);
      *p++ = UTF8_TRAILS(code,  6);
    }
    else if ((code & 0x80000000) == 0) {
      *p++ = (UChar )(((code>>30) & 0x01) | 0xfc);
      *p++ = UTF8_TRAILS(code, 24);
      *p++ = UTF8_TRAILS(code, 18);
      *p++ = UTF8_TRAILS(code, 12);
      *p++ = UTF8_TRAILS(code,  6);
    }
#ifdef USE_INVALID_CODE_SCHEME
    else if (code == INVALID_CODE_FE) {
      *p = 0xfe;
      return 1;
    }
    else if (code == INVALID_CODE_FF) {
      *p = 0xff;
      return 1;
    }
#endif
    else {
      return ONIGENCERR_TOO_BIG_WIDE_CHAR_VALUE;
    }

    *p++ = UTF8_TRAIL0(code);
    return p - buf;
  }
}

static int
utf8_mbc_to_normalize(OnigAmbigType flag, const UChar** pp, const UChar* end, UChar* lower)
{
  const UChar* p = *pp;

  if (ONIGENC_IS_MBC_ASCII(p)) {
    if (end > p + 1 &&
        (flag & ONIGENC_AMBIGUOUS_MATCH_COMPOUND) != 0 &&
        ((*p == 's' && *(p+1) == 's') ||
         ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
          (*p == 'S' && *(p+1) == 'S')))) {
      *lower++ = '\303';
      *lower   = '\237';
      (*pp) += 2;
      return 2;
    }

    if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
      *lower = ONIGENC_ASCII_CODE_TO_LOWER_CASE(*p);
    }
    else {
      *lower = *p;
    }
    (*pp)++;
    return 1; /* return byte length of converted char to lower */
  }
  else {
    int len;

    if (*p == 195) { /* 195 == '\303' */
      int c = *(p + 1);
      if (c >= 128) {
        if (c <= (UChar )'\236' &&  /* upper */
            (flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0) {
          if (c != (UChar )'\227') {
            *lower++ = *p;
            *lower   = (UChar )(c + 32);
            (*pp) += 2;
            return 2;
          }
        }
#if 0
        else if (c == (UChar )'\237' &&
                 (flag & ONIGENC_AMBIGUOUS_MATCH_COMPOUND) != 0) {
          *lower++ = '\303';
          *lower   = '\237';
          (*pp) += 2;
          return 2;
        }
#endif
      }
    }

    len = enc_len(ONIG_ENCODING_UTF8, p);
    if (lower != p) {
      int i;
      for (i = 0; i < len; i++) {
        *lower++ = *p++;
      }
    }
    (*pp) += len;
    return len; /* return byte length of converted char to lower */
  }
}

static int
utf8_is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end)
{
  const UChar* p = *pp;

  if (ONIGENC_IS_MBC_ASCII(p)) {
    if (end > p + 1 &&
        (flag & ONIGENC_AMBIGUOUS_MATCH_COMPOUND) != 0 &&
        ((*p == 's' && *(p+1) == 's') ||
         ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0 &&
          (*p == 'S' && *(p+1) == 'S')))) {
      (*pp) += 2;
      return TRUE;
    }

    (*pp)++;
    if ((flag & ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE) != 0) {
      return ONIGENC_IS_ASCII_CODE_CASE_AMBIG(*p);
    }
  }
  else {
    (*pp) += enc_len(ONIG_ENCODING_UTF8, p);

    if (*p == 195) { /* 195 == '\303' */
      int c = *(p + 1);
      if (c >= 128) {
        if ((flag & ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE) != 0) {
          if (c <= (UChar )'\236') { /* upper */
            if (c == (UChar )'\227') return FALSE;
            return TRUE;
          }
          else if (c >= (UChar )'\240' && c <= (UChar )'\276') { /* lower */
            if (c == (UChar )'\267') return FALSE;
            return TRUE;
          }
        }
        else if (c == (UChar )'\237' &&
                 (flag & ONIGENC_AMBIGUOUS_MATCH_COMPOUND) != 0) {
          return TRUE;
        }
      }
    }
  }

  return FALSE;
}

static OnigCodePoint EmptyRange[] = { 0 };

static OnigCodePoint SBAlnum[] = {
  3,
  0x0030, 0x0039,
  0x0041, 0x005a,
  0x0061, 0x007a
};

static OnigCodePoint MBAlnum[] = {
#ifdef USE_UNICODE_FULL_RANGE_CTYPE
  411,
#else
  6,
#endif
  0x00aa, 0x00aa,
  0x00b5, 0x00b5,
  0x00ba, 0x00ba,
  0x00c0, 0x00d6,
  0x00d8, 0x00f6,
  0x00f8, 0x0236
#ifdef USE_UNICODE_FULL_RANGE_CTYPE
  ,
  0x0250, 0x02c1,
  0x02c6, 0x02d1,
  0x02e0, 0x02e4,
  0x02ee, 0x02ee,
  0x0300, 0x0357,
  0x035d, 0x036f,
  0x037a, 0x037a,
  0x0386, 0x0386,
  0x0388, 0x038a,
  0x038c, 0x038c,
  0x038e, 0x03a1,
  0x03a3, 0x03ce,
  0x03d0, 0x03f5,
  0x03f7, 0x03fb,
  0x0400, 0x0481,
  0x0483, 0x0486,
  0x0488, 0x04ce,
  0x04d0, 0x04f5,
  0x04f8, 0x04f9,
  0x0500, 0x050f,
  0x0531, 0x0556,
  0x0559, 0x0559,
  0x0561, 0x0587,
  0x0591, 0x05a1,
  0x05a3, 0x05b9,
  0x05bb, 0x05bd,
  0x05bf, 0x05bf,
  0x05c1, 0x05c2,
  0x05c4, 0x05c4,
  0x05d0, 0x05ea,
  0x05f0, 0x05f2,
  0x0610, 0x0615,
  0x0621, 0x063a,
  0x0640, 0x0658,
  0x0660, 0x0669,
  0x066e, 0x06d3,
  0x06d5, 0x06dc,
  0x06de, 0x06e8,
  0x06ea, 0x06fc,
  0x06ff, 0x06ff,
  0x0710, 0x074a,
  0x074d, 0x074f,
  0x0780, 0x07b1,
  0x0901, 0x0939,
  0x093c, 0x094d,
  0x0950, 0x0954,
  0x0958, 0x0963,
  0x0966, 0x096f,
  0x0981, 0x0983,
  0x0985, 0x098c,
  0x098f, 0x0990,
  0x0993, 0x09a8,
  0x09aa, 0x09b0,
  0x09b2, 0x09b2,
  0x09b6, 0x09b9,
  0x09bc, 0x09c4,
  0x09c7, 0x09c8,
  0x09cb, 0x09cd,
  0x09d7, 0x09d7,
  0x09dc, 0x09dd,
  0x09df, 0x09e3,
  0x09e6, 0x09f1,
  0x0a01, 0x0a03,
  0x0a05, 0x0a0a,
  0x0a0f, 0x0a10,
  0x0a13, 0x0a28,
  0x0a2a, 0x0a30,
  0x0a32, 0x0a33,
  0x0a35, 0x0a36,
  0x0a38, 0x0a39,
  0x0a3c, 0x0a3c,
  0x0a3e, 0x0a42,
  0x0a47, 0x0a48,
  0x0a4b, 0x0a4d,
  0x0a59, 0x0a5c,
  0x0a5e, 0x0a5e,
  0x0a66, 0x0a74,
  0x0a81, 0x0a83,
  0x0a85, 0x0a8d,
  0x0a8f, 0x0a91,
  0x0a93, 0x0aa8,
  0x0aaa, 0x0ab0,
  0x0ab2, 0x0ab3,
  0x0ab5, 0x0ab9,
  0x0abc, 0x0ac5,
  0x0ac7, 0x0ac9,
  0x0acb, 0x0acd,
  0x0ad0, 0x0ad0,
  0x0ae0, 0x0ae3,
  0x0ae6, 0x0aef,
  0x0b01, 0x0b03,
  0x0b05, 0x0b0c,
  0x0b0f, 0x0b10,
  0x0b13, 0x0b28,
  0x0b2a, 0x0b30,
  0x0b32, 0x0b33,
  0x0b35, 0x0b39,
  0x0b3c, 0x0b43,
  0x0b47, 0x0b48,
  0x0b4b, 0x0b4d,
  0x0b56, 0x0b57,
  0x0b5c, 0x0b5d,
  0x0b5f, 0x0b61,
  0x0b66, 0x0b6f,
  0x0b71, 0x0b71,
  0x0b82, 0x0b83,
  0x0b85, 0x0b8a,
  0x0b8e, 0x0b90,
  0x0b92, 0x0b95,
  0x0b99, 0x0b9a,
  0x0b9c, 0x0b9c,
  0x0b9e, 0x0b9f,
  0x0ba3, 0x0ba4,
  0x0ba8, 0x0baa,
  0x0bae, 0x0bb5,
  0x0bb7, 0x0bb9,
  0x0bbe, 0x0bc2,
  0x0bc6, 0x0bc8,
  0x0bca, 0x0bcd,
  0x0bd7, 0x0bd7,
  0x0be7, 0x0bef,
  0x0c01, 0x0c03,
  0x0c05, 0x0c0c,
  0x0c0e, 0x0c10,
  0x0c12, 0x0c28,
  0x0c2a, 0x0c33,
  0x0c35, 0x0c39,
  0x0c3e, 0x0c44,
  0x0c46, 0x0c48,
  0x0c4a, 0x0c4d,
  0x0c55, 0x0c56,
  0x0c60, 0x0c61,
  0x0c66, 0x0c6f,
  0x0c82, 0x0c83,
  0x0c85, 0x0c8c,
  0x0c8e, 0x0c90,
  0x0c92, 0x0ca8,
  0x0caa, 0x0cb3,
  0x0cb5, 0x0cb9,
  0x0cbc, 0x0cc4,
  0x0cc6, 0x0cc8,
  0x0cca, 0x0ccd,
  0x0cd5, 0x0cd6,
  0x0cde, 0x0cde,
  0x0ce0, 0x0ce1,
  0x0ce6, 0x0cef,
  0x0d02, 0x0d03,
  0x0d05, 0x0d0c,
  0x0d0e, 0x0d10,
  0x0d12, 0x0d28,
  0x0d2a, 0x0d39,
  0x0d3e, 0x0d43,
  0x0d46, 0x0d48,
  0x0d4a, 0x0d4d,
  0x0d57, 0x0d57,
  0x0d60, 0x0d61,
  0x0d66, 0x0d6f,
  0x0d82, 0x0d83,
  0x0d85, 0x0d96,
  0x0d9a, 0x0db1,
  0x0db3, 0x0dbb,
  0x0dbd, 0x0dbd,
  0x0dc0, 0x0dc6,
  0x0dca, 0x0dca,
  0x0dcf, 0x0dd4,
  0x0dd6, 0x0dd6,
  0x0dd8, 0x0ddf,
  0x0df2, 0x0df3,
  0x0e01, 0x0e3a,
  0x0e40, 0x0e4e,
  0x0e50, 0x0e59,
  0x0e81, 0x0e82,
  0x0e84, 0x0e84,
  0x0e87, 0x0e88,
  0x0e8a, 0x0e8a,
  0x0e8d, 0x0e8d,
  0x0e94, 0x0e97,
  0x0e99, 0x0e9f,
  0x0ea1, 0x0ea3,
  0x0ea5, 0x0ea5,
  0x0ea7, 0x0ea7,
  0x0eaa, 0x0eab,
  0x0ead, 0x0eb9,
  0x0ebb, 0x0ebd,
  0x0ec0, 0x0ec4,
  0x0ec6, 0x0ec6,
  0x0ec8, 0x0ecd,
  0x0ed0, 0x0ed9,
  0x0edc, 0x0edd,
  0x0f00, 0x0f00,
  0x0f18, 0x0f19,
  0x0f20, 0x0f29,
  0x0f35, 0x0f35,
  0x0f37, 0x0f37,
  0x0f39, 0x0f39,
  0x0f3e, 0x0f47,
  0x0f49, 0x0f6a,
  0x0f71, 0x0f84,
  0x0f86, 0x0f8b,
  0x0f90, 0x0f97,
  0x0f99, 0x0fbc,
  0x0fc6, 0x0fc6,
  0x1000, 0x1021,
  0x1023, 0x1027,
  0x1029, 0x102a,
  0x102c, 0x1032,
  0x1036, 0x1039,
  0x1040, 0x1049,
  0x1050, 0x1059,
  0x10a0, 0x10c5,
  0x10d0, 0x10f8,
  0x1100, 0x1159,
  0x115f, 0x11a2,
  0x11a8, 0x11f9,
  0x1200, 0x1206,
  0x1208, 0x1246,
  0x1248, 0x1248,
  0x124a, 0x124d,
  0x1250, 0x1256,
  0x1258, 0x1258,
  0x125a, 0x125d,
  0x1260, 0x1286,
  0x1288, 0x1288,
  0x128a, 0x128d,
  0x1290, 0x12ae,
  0x12b0, 0x12b0,
  0x12b2, 0x12b5,
  0x12b8, 0x12be,
  0x12c0, 0x12c0,
  0x12c2, 0x12c5,
  0x12c8, 0x12ce,
  0x12d0, 0x12d6,
  0x12d8, 0x12ee,
  0x12f0, 0x130e,
  0x1310, 0x1310,
  0x1312, 0x1315,
  0x1318, 0x131e,
  0x1320, 0x1346,
  0x1348, 0x135a,
  0x1369, 0x1371,
  0x13a0, 0x13f4,
  0x1401, 0x166c,
  0x166f, 0x1676,
  0x1681, 0x169a,
  0x16a0, 0x16ea,
  0x1700, 0x170c,
  0x170e, 0x1714,
  0x1720, 0x1734,
  0x1740, 0x1753,
  0x1760, 0x176c,
  0x176e, 0x1770,
  0x1772, 0x1773,
  0x1780, 0x17b3,
  0x17b6, 0x17d3,
  0x17d7, 0x17d7,
  0x17dc, 0x17dd,
  0x17e0, 0x17e9,
  0x180b, 0x180d,
  0x1810, 0x1819,
  0x1820, 0x1877,
  0x1880, 0x18a9,
  0x1900, 0x191c,
  0x1920, 0x192b,
  0x1930, 0x193b,
  0x1946, 0x196d,
  0x1970, 0x1974,
  0x1d00, 0x1d6b,
  0x1e00, 0x1e9b,
  0x1ea0, 0x1ef9,
  0x1f00, 0x1f15,
  0x1f18, 0x1f1d,
  0x1f20, 0x1f45,
  0x1f48, 0x1f4d,
  0x1f50, 0x1f57,
  0x1f59, 0x1f59,
  0x1f5b, 0x1f5b,
  0x1f5d, 0x1f5d,
  0x1f5f, 0x1f7d,
  0x1f80, 0x1fb4,
  0x1fb6, 0x1fbc,
  0x1fbe, 0x1fbe,
  0x1fc2, 0x1fc4,
  0x1fc6, 0x1fcc,
  0x1fd0, 0x1fd3,
  0x1fd6, 0x1fdb,
  0x1fe0, 0x1fec,
  0x1ff2, 0x1ff4,
  0x1ff6, 0x1ffc,
  0x2071, 0x2071,
  0x207f, 0x207f,
  0x20d0, 0x20ea,
  0x2102, 0x2102,
  0x2107, 0x2107,
  0x210a, 0x2113,
  0x2115, 0x2115,
  0x2119, 0x211d,
  0x2124, 0x2124,
  0x2126, 0x2126,
  0x2128, 0x2128,
  0x212a, 0x212d,
  0x212f, 0x2131,
  0x2133, 0x2139,
  0x213d, 0x213f,
  0x2145, 0x2149,
  0x3005, 0x3006,
  0x302a, 0x302f,
  0x3031, 0x3035,
  0x303b, 0x303c,
  0x3041, 0x3096,
  0x3099, 0x309a,
  0x309d, 0x309f,
  0x30a1, 0x30fa,
  0x30fc, 0x30ff,
  0x3105, 0x312c,
  0x3131, 0x318e,
  0x31a0, 0x31b7,
  0x31f0, 0x31ff,
  0x3400, 0x4db5,
  0x4e00, 0x9fa5,
  0xa000, 0xa48c,
  0xac00, 0xd7a3,
  0xf900, 0xfa2d,
  0xfa30, 0xfa6a,
  0xfb00, 0xfb06,
  0xfb13, 0xfb17,
  0xfb1d, 0xfb28,
  0xfb2a, 0xfb36,
  0xfb38, 0xfb3c,
  0xfb3e, 0xfb3e,
  0xfb40, 0xfb41,
  0xfb43, 0xfb44,
  0xfb46, 0xfbb1,
  0xfbd3, 0xfd3d,
  0xfd50, 0xfd8f,
  0xfd92, 0xfdc7,
  0xfdf0, 0xfdfb,
  0xfe00, 0xfe0f,
  0xfe20, 0xfe23,
  0xfe70, 0xfe74,
  0xfe76, 0xfefc,
  0xff10, 0xff19,
  0xff21, 0xff3a,
  0xff41, 0xff5a,
  0xff66, 0xffbe,
  0xffc2, 0xffc7,
  0xffca, 0xffcf,
  0xffd2, 0xffd7,
  0xffda, 0xffdc,
  0x10000, 0x1000b,
  0x1000d, 0x10026,
  0x10028, 0x1003a,
  0x1003c, 0x1003d,
  0x1003f, 0x1004d,
  0x10050, 0x1005d,
  0x10080, 0x100fa,
  0x10300, 0x1031e,
  0x10330, 0x10349,
  0x10380, 0x1039d,
  0x10400, 0x1049d,
  0x104a0, 0x104a9,
  0x10800, 0x10805,
  0x10808, 0x10808,
  0x1080a, 0x10835,
  0x10837, 0x10838,
  0x1083c, 0x1083c,
  0x1083f, 0x1083f,
  0x1d165, 0x1d169,
  0x1d16d, 0x1d172,
  0x1d17b, 0x1d182,
  0x1d185, 0x1d18b,
  0x1d1aa, 0x1d1ad,
  0x1d400, 0x1d454,
  0x1d456, 0x1d49c,
  0x1d49e, 0x1d49f,
  0x1d4a2, 0x1d4a2,
  0x1d4a5, 0x1d4a6,
  0x1d4a9, 0x1d4ac,
  0x1d4ae, 0x1d4b9,
  0x1d4bb, 0x1d4bb,
  0x1d4bd, 0x1d4c3,
  0x1d4c5, 0x1d505,
  0x1d507, 0x1d50a,
  0x1d50d, 0x1d514,
  0x1d516, 0x1d51c,
  0x1d51e, 0x1d539,
  0x1d53b, 0x1d53e,
  0x1d540, 0x1d544,
  0x1d546, 0x1d546,
  0x1d54a, 0x1d550,
  0x1d552, 0x1d6a3,
  0x1d6a8, 0x1d6c0,
  0x1d6c2, 0x1d6da,
  0x1d6dc, 0x1d6fa,
  0x1d6fc, 0x1d714,
  0x1d716, 0x1d734,
  0x1d736, 0x1d74e,
  0x1d750, 0x1d76e,
  0x1d770, 0x1d788,
  0x1d78a, 0x1d7a8,
  0x1d7aa, 0x1d7c2,
  0x1d7c4, 0x1d7c9,
  0x1d7ce, 0x1d7ff,
  0x20000, 0x2a6d6,
  0x2f800, 0x2fa1d,
  0xe0100, 0xe01ef
#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
}; /* end of MBAlnum */

static OnigCodePoint SBAlpha[] = {
  2,
  0x0041, 0x005a,
  0x0061, 0x007a
};

static OnigCodePoint MBAlpha[] = {
#ifdef USE_UNICODE_FULL_RANGE_CTYPE
  394,
#else
  6,
#endif
  0x00aa, 0x00aa,
  0x00b5, 0x00b5,
  0x00ba, 0x00ba,
  0x00c0, 0x00d6,
  0x00d8, 0x00f6,
  0x00f8, 0x0236
#ifdef USE_UNICODE_FULL_RANGE_CTYPE
  ,
  0x0250, 0x02c1,
  0x02c6, 0x02d1,
  0x02e0, 0x02e4,
  0x02ee, 0x02ee,
  0x0300, 0x0357,
  0x035d, 0x036f,
  0x037a, 0x037a,
  0x0386, 0x0386,
  0x0388, 0x038a,
  0x038c, 0x038c,
  0x038e, 0x03a1,
  0x03a3, 0x03ce,
  0x03d0, 0x03f5,
  0x03f7, 0x03fb,
  0x0400, 0x0481,
  0x0483, 0x0486,
  0x0488, 0x04ce,
  0x04d0, 0x04f5,
  0x04f8, 0x04f9,
  0x0500, 0x050f,
  0x0531, 0x0556,
  0x0559, 0x0559,
  0x0561, 0x0587,
  0x0591, 0x05a1,
  0x05a3, 0x05b9,
  0x05bb, 0x05bd,
  0x05bf, 0x05bf,
  0x05c1, 0x05c2,
  0x05c4, 0x05c4,
  0x05d0, 0x05ea,
  0x05f0, 0x05f2,
  0x0610, 0x0615,
  0x0621, 0x063a,
  0x0640, 0x0658,
  0x066e, 0x06d3,
  0x06d5, 0x06dc,
  0x06de, 0x06e8,
  0x06ea, 0x06ef,
  0x06fa, 0x06fc,
  0x06ff, 0x06ff,
  0x0710, 0x074a,
  0x074d, 0x074f,
  0x0780, 0x07b1,
  0x0901, 0x0939,
  0x093c, 0x094d,
  0x0950, 0x0954,
  0x0958, 0x0963,
  0x0981, 0x0983,
  0x0985, 0x098c,
  0x098f, 0x0990,
  0x0993, 0x09a8,
  0x09aa, 0x09b0,
  0x09b2, 0x09b2,
  0x09b6, 0x09b9,
  0x09bc, 0x09c4,
  0x09c7, 0x09c8,
  0x09cb, 0x09cd,
  0x09d7, 0x09d7,
  0x09dc, 0x09dd,
  0x09df, 0x09e3,
  0x09f0, 0x09f1,
  0x0a01, 0x0a03,
  0x0a05, 0x0a0a,
  0x0a0f, 0x0a10,
  0x0a13, 0x0a28,
  0x0a2a, 0x0a30,
  0x0a32, 0x0a33,
  0x0a35, 0x0a36,
  0x0a38, 0x0a39,
  0x0a3c, 0x0a3c,
  0x0a3e, 0x0a42,
  0x0a47, 0x0a48,
  0x0a4b, 0x0a4d,
  0x0a59, 0x0a5c,
  0x0a5e, 0x0a5e,
  0x0a70, 0x0a74,
  0x0a81, 0x0a83,
  0x0a85, 0x0a8d,
  0x0a8f, 0x0a91,
  0x0a93, 0x0aa8,
  0x0aaa, 0x0ab0,
  0x0ab2, 0x0ab3,
  0x0ab5, 0x0ab9,
  0x0abc, 0x0ac5,
  0x0ac7, 0x0ac9,
  0x0acb, 0x0acd,
  0x0ad0, 0x0ad0,
  0x0ae0, 0x0ae3,
  0x0b01, 0x0b03,
  0x0b05, 0x0b0c,
  0x0b0f, 0x0b10,
  0x0b13, 0x0b28,
  0x0b2a, 0x0b30,
  0x0b32, 0x0b33,
  0x0b35, 0x0b39,
  0x0b3c, 0x0b43,
  0x0b47, 0x0b48,
  0x0b4b, 0x0b4d,
  0x0b56, 0x0b57,
  0x0b5c, 0x0b5d,
  0x0b5f, 0x0b61,
  0x0b71, 0x0b71,
  0x0b82, 0x0b83,
  0x0b85, 0x0b8a,
  0x0b8e, 0x0b90,
  0x0b92, 0x0b95,
  0x0b99, 0x0b9a,
  0x0b9c, 0x0b9c,
  0x0b9e, 0x0b9f,
  0x0ba3, 0x0ba4,
  0x0ba8, 0x0baa,
  0x0bae, 0x0bb5,
  0x0bb7, 0x0bb9,
  0x0bbe, 0x0bc2,
  0x0bc6, 0x0bc8,
  0x0bca, 0x0bcd,
  0x0bd7, 0x0bd7,
  0x0c01, 0x0c03,
  0x0c05, 0x0c0c,
  0x0c0e, 0x0c10,
  0x0c12, 0x0c28,
  0x0c2a, 0x0c33,
  0x0c35, 0x0c39,
  0x0c3e, 0x0c44,
  0x0c46, 0x0c48,
  0x0c4a, 0x0c4d,
  0x0c55, 0x0c56,
  0x0c60, 0x0c61,
  0x0c82, 0x0c83,
  0x0c85, 0x0c8c,
  0x0c8e, 0x0c90,
  0x0c92, 0x0ca8,
  0x0caa, 0x0cb3,
  0x0cb5, 0x0cb9,
  0x0cbc, 0x0cc4,
  0x0cc6, 0x0cc8,
  0x0cca, 0x0ccd,
  0x0cd5, 0x0cd6,
  0x0cde, 0x0cde,
  0x0ce0, 0x0ce1,
  0x0d02, 0x0d03,
  0x0d05, 0x0d0c,
  0x0d0e, 0x0d10,
  0x0d12, 0x0d28,
  0x0d2a, 0x0d39,
  0x0d3e, 0x0d43,
  0x0d46, 0x0d48,
  0x0d4a, 0x0d4d,
  0x0d57, 0x0d57,
  0x0d60, 0x0d61,
  0x0d82, 0x0d83,
  0x0d85, 0x0d96,
  0x0d9a, 0x0db1,
  0x0db3, 0x0dbb,
  0x0dbd, 0x0dbd,
  0x0dc0, 0x0dc6,
  0x0dca, 0x0dca,
  0x0dcf, 0x0dd4,
  0x0dd6, 0x0dd6,
  0x0dd8, 0x0ddf,
  0x0df2, 0x0df3,
  0x0e01, 0x0e3a,
  0x0e40, 0x0e4e,
  0x0e81, 0x0e82,
  0x0e84, 0x0e84,
  0x0e87, 0x0e88,
  0x0e8a, 0x0e8a,
  0x0e8d, 0x0e8d,
  0x0e94, 0x0e97,
  0x0e99, 0x0e9f,
  0x0ea1, 0x0ea3,
  0x0ea5, 0x0ea5,
  0x0ea7, 0x0ea7,
  0x0eaa, 0x0eab,
  0x0ead, 0x0eb9,
  0x0ebb, 0x0ebd,
  0x0ec0, 0x0ec4,
  0x0ec6, 0x0ec6,
  0x0ec8, 0x0ecd,
  0x0edc, 0x0edd,
  0x0f00, 0x0f00,
  0x0f18, 0x0f19,
  0x0f35, 0x0f35,
  0x0f37, 0x0f37,
  0x0f39, 0x0f39,
  0x0f3e, 0x0f47,
  0x0f49, 0x0f6a,
  0x0f71, 0x0f84,
  0x0f86, 0x0f8b,
  0x0f90, 0x0f97,
  0x0f99, 0x0fbc,
  0x0fc6, 0x0fc6,
  0x1000, 0x1021,
  0x1023, 0x1027,
  0x1029, 0x102a,
  0x102c, 0x1032,
  0x1036, 0x1039,
  0x1050, 0x1059,
  0x10a0, 0x10c5,
  0x10d0, 0x10f8,
  0x1100, 0x1159,
  0x115f, 0x11a2,
  0x11a8, 0x11f9,
  0x1200, 0x1206,
  0x1208, 0x1246,
  0x1248, 0x1248,
  0x124a, 0x124d,
  0x1250, 0x1256,
  0x1258, 0x1258,
  0x125a, 0x125d,
  0x1260, 0x1286,
  0x1288, 0x1288,
  0x128a, 0x128d,
  0x1290, 0x12ae,
  0x12b0, 0x12b0,
  0x12b2, 0x12b5,
  0x12b8, 0x12be,
  0x12c0, 0x12c0,
  0x12c2, 0x12c5,
  0x12c8, 0x12ce,
  0x12d0, 0x12d6,
  0x12d8, 0x12ee,
  0x12f0, 0x130e,
  0x1310, 0x1310,
  0x1312, 0x1315,
  0x1318, 0x131e,
  0x1320, 0x1346,
  0x1348, 0x135a,
  0x13a0, 0x13f4,
  0x1401, 0x166c,
  0x166f, 0x1676,
  0x1681, 0x169a,
  0x16a0, 0x16ea,
  0x1700, 0x170c,
  0x170e, 0x1714,
  0x1720, 0x1734,
  0x1740, 0x1753,
  0x1760, 0x176c,
  0x176e, 0x1770,
  0x1772, 0x1773,
  0x1780, 0x17b3,
  0x17b6, 0x17d3,
  0x17d7, 0x17d7,
  0x17dc, 0x17dd,
  0x180b, 0x180d,
  0x1820, 0x1877,
  0x1880, 0x18a9,
  0x1900, 0x191c,
  0x1920, 0x192b,
  0x1930, 0x193b,
  0x1950, 0x196d,
  0x1970, 0x1974,
  0x1d00, 0x1d6b,
  0x1e00, 0x1e9b,
  0x1ea0, 0x1ef9,
  0x1f00, 0x1f15,
  0x1f18, 0x1f1d,
  0x1f20, 0x1f45,
  0x1f48, 0x1f4d,
  0x1f50, 0x1f57,
  0x1f59, 0x1f59,
  0x1f5b, 0x1f5b,
  0x1f5d, 0x1f5d,
  0x1f5f, 0x1f7d,
  0x1f80, 0x1fb4,
  0x1fb6, 0x1fbc,
  0x1fbe, 0x1fbe,
  0x1fc2, 0x1fc4,
  0x1fc6, 0x1fcc,
  0x1fd0, 0x1fd3,
  0x1fd6, 0x1fdb,
  0x1fe0, 0x1fec,
  0x1ff2, 0x1ff4,
  0x1ff6, 0x1ffc,
  0x2071, 0x2071,
  0x207f, 0x207f,
  0x20d0, 0x20ea,
  0x2102, 0x2102,
  0x2107, 0x2107,
  0x210a, 0x2113,
  0x2115, 0x2115,
  0x2119, 0x211d,
  0x2124, 0x2124,
  0x2126, 0x2126,
  0x2128, 0x2128,
  0x212a, 0x212d,
  0x212f, 0x2131,
  0x2133, 0x2139,
  0x213d, 0x213f,
  0x2145, 0x2149,
  0x3005, 0x3006,
  0x302a, 0x302f,
  0x3031, 0x3035,
  0x303b, 0x303c,
  0x3041, 0x3096,
  0x3099, 0x309a,
  0x309d, 0x309f,
  0x30a1, 0x30fa,
  0x30fc, 0x30ff,
  0x3105, 0x312c,
  0x3131, 0x318e,
  0x31a0, 0x31b7,
  0x31f0, 0x31ff,
  0x3400, 0x4db5,
  0x4e00, 0x9fa5,
  0xa000, 0xa48c,
  0xac00, 0xd7a3,
  0xf900, 0xfa2d,
  0xfa30, 0xfa6a,
  0xfb00, 0xfb06,
  0xfb13, 0xfb17,
  0xfb1d, 0xfb28,
  0xfb2a, 0xfb36,
  0xfb38, 0xfb3c,
  0xfb3e, 0xfb3e,
  0xfb40, 0xfb41,
  0xfb43, 0xfb44,
  0xfb46, 0xfbb1,
  0xfbd3, 0xfd3d,
  0xfd50, 0xfd8f,
  0xfd92, 0xfdc7,
  0xfdf0, 0xfdfb,
  0xfe00, 0xfe0f,
  0xfe20, 0xfe23,
  0xfe70, 0xfe74,
  0xfe76, 0xfefc,
  0xff21, 0xff3a,
  0xff41, 0xff5a,
  0xff66, 0xffbe,
  0xffc2, 0xffc7,
  0xffca, 0xffcf,
  0xffd2, 0xffd7,
  0xffda, 0xffdc,
  0x10000, 0x1000b,
  0x1000d, 0x10026,
  0x10028, 0x1003a,
  0x1003c, 0x1003d,
  0x1003f, 0x1004d,
  0x10050, 0x1005d,
  0x10080, 0x100fa,
  0x10300, 0x1031e,
  0x10330, 0x10349,
  0x10380, 0x1039d,
  0x10400, 0x1049d,
  0x10800, 0x10805,
  0x10808, 0x10808,
  0x1080a, 0x10835,
  0x10837, 0x10838,
  0x1083c, 0x1083c,
  0x1083f, 0x1083f,
  0x1d165, 0x1d169,
  0x1d16d, 0x1d172,
  0x1d17b, 0x1d182,
  0x1d185, 0x1d18b,
  0x1d1aa, 0x1d1ad,
  0x1d400, 0x1d454,
  0x1d456, 0x1d49c,
  0x1d49e, 0x1d49f,
  0x1d4a2, 0x1d4a2,
  0x1d4a5, 0x1d4a6,
  0x1d4a9, 0x1d4ac,
  0x1d4ae, 0x1d4b9,
  0x1d4bb, 0x1d4bb,
  0x1d4bd, 0x1d4c3,
  0x1d4c5, 0x1d505,
  0x1d507, 0x1d50a,
  0x1d50d, 0x1d514,
  0x1d516, 0x1d51c,
  0x1d51e, 0x1d539,
  0x1d53b, 0x1d53e,
  0x1d540, 0x1d544,
  0x1d546, 0x1d546,
  0x1d54a, 0x1d550,
  0x1d552, 0x1d6a3,
  0x1d6a8, 0x1d6c0,
  0x1d6c2, 0x1d6da,
  0x1d6dc, 0x1d6fa,
  0x1d6fc, 0x1d714,
  0x1d716, 0x1d734,
  0x1d736, 0x1d74e,
  0x1d750, 0x1d76e,
  0x1d770, 0x1d788,
  0x1d78a, 0x1d7a8,
  0x1d7aa, 0x1d7c2,
  0x1d7c4, 0x1d7c9,
  0x20000, 0x2a6d6,
  0x2f800, 0x2fa1d,
  0xe0100, 0xe01ef
#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
}; /* end of MBAlpha */

static OnigCodePoint SBBlank[] = {
  2,
  0x0009, 0x0009,
  0x0020, 0x0020
};

static OnigCodePoint MBBlank[] = {
#ifdef USE_UNICODE_FULL_RANGE_CTYPE
  7,
#else
  1,
#endif
  0x00a0, 0x00a0
#ifdef USE_UNICODE_FULL_RANGE_CTYPE
  ,
  0x1680, 0x1680,
  0x180e, 0x180e,
  0x2000, 0x200a,
  0x202f, 0x202f,
  0x205f, 0x205f,
  0x3000, 0x3000
#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
}; /* end of MBBlank */

static OnigCodePoint SBCntrl[] = {
  2,
  0x0000, 0x001f,
  0x007f, 0x007f
};

static OnigCodePoint MBCntrl[] = {
#ifdef USE_UNICODE_FULL_RANGE_CTYPE
  18,
#else
  2,
#endif
  0x0080, 0x009f,
  0x00ad, 0x00ad
#ifdef USE_UNICODE_FULL_RANGE_CTYPE
  ,
  0x0600, 0x0603,
  0x06dd, 0x06dd,
  0x070f, 0x070f,
  0x17b4, 0x17b5,
  0x200b, 0x200f,
  0x202a, 0x202e,
  0x2060, 0x2063,
  0x206a, 0x206f,
  0xd800, 0xf8ff,
  0xfeff, 0xfeff,
  0xfff9, 0xfffb,
  0x1d173, 0x1d17a,
  0xe0001, 0xe0001,
  0xe0020, 0xe007f,
  0xf0000, 0xffffd,
  0x100000, 0x10fffd
#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
}; /* end of MBCntrl */

static OnigCodePoint SBDigit[] = {
  1,
  0x0030, 0x0039
};

static OnigCodePoint MBDigit[] = {
#ifdef USE_UNICODE_FULL_RANGE_CTYPE
  22,
#else
  0
#endif
#ifdef USE_UNICODE_FULL_RANGE_CTYPE
  0x0660, 0x0669,
  0x06f0, 0x06f9,
  0x0966, 0x096f,
  0x09e6, 0x09ef,
  0x0a66, 0x0a6f,
  0x0ae6, 0x0aef,
  0x0b66, 0x0b6f,
  0x0be7, 0x0bef,
  0x0c66, 0x0c6f,
  0x0ce6, 0x0cef,
  0x0d66, 0x0d6f,
  0x0e50, 0x0e59,
  0x0ed0, 0x0ed9,
  0x0f20, 0x0f29,
  0x1040, 0x1049,
  0x1369, 0x1371,
  0x17e0, 0x17e9,
  0x1810, 0x1819,
  0x1946, 0x194f,
  0xff10, 0xff19,
  0x104a0, 0x104a9,
  0x1d7ce, 0x1d7ff
#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
}; /* end of MBDigit */

static OnigCodePoint SBGraph[] = {
  1,
  0x0021, 0x007e
};

static OnigCodePoint MBGraph[] = {
#ifdef USE_UNICODE_FULL_RANGE_CTYPE
  404,
#else
  1,
#endif
  0x00a1, 0x0236
#ifdef USE_UNICODE_FULL_RANGE_CTYPE
  ,
  0x0250, 0x0357,
  0x035d, 0x036f,
  0x0374, 0x0375,
  0x037a, 0x037a,
  0x037e, 0x037e,
  0x0384, 0x038a,
  0x038c, 0x038c,
  0x038e, 0x03a1,
  0x03a3, 0x03ce,
  0x03d0, 0x03fb,
  0x0400, 0x0486,
  0x0488, 0x04ce,
  0x04d0, 0x04f5,
  0x04f8, 0x04f9,
  0x0500, 0x050f,
  0x0531, 0x0556,
  0x0559, 0x055f,
  0x0561, 0x0587,
  0x0589, 0x058a,
  0x0591, 0x05a1,
  0x05a3, 0x05b9,
  0x05bb, 0x05c4,
  0x05d0, 0x05ea,
  0x05f0, 0x05f4,
  0x0600, 0x0603,
  0x060c, 0x0615,
  0x061b, 0x061b,
  0x061f, 0x061f,
  0x0621, 0x063a,
  0x0640, 0x0658,
  0x0660, 0x070d,
  0x070f, 0x074a,
  0x074d, 0x074f,
  0x0780, 0x07b1,
  0x0901, 0x0939,
  0x093c, 0x094d,
  0x0950, 0x0954,
  0x0958, 0x0970,
  0x0981, 0x0983,
  0x0985, 0x098c,
  0x098f, 0x0990,
  0x0993, 0x09a8,
  0x09aa, 0x09b0,
  0x09b2, 0x09b2,
  0x09b6, 0x09b9,
  0x09bc, 0x09c4,
  0x09c7, 0x09c8,
  0x09cb, 0x09cd,
  0x09d7, 0x09d7,
  0x09dc, 0x09dd,
  0x09df, 0x09e3,
  0x09e6, 0x09fa,
  0x0a01, 0x0a03,
  0x0a05, 0x0a0a,
  0x0a0f, 0x0a10,
  0x0a13, 0x0a28,
  0x0a2a, 0x0a30,
  0x0a32, 0x0a33,
  0x0a35, 0x0a36,
  0x0a38, 0x0a39,
  0x0a3c, 0x0a3c,
  0x0a3e, 0x0a42,
  0x0a47, 0x0a48,
  0x0a4b, 0x0a4d,
  0x0a59, 0x0a5c,
  0x0a5e, 0x0a5e,
  0x0a66, 0x0a74,
  0x0a81, 0x0a83,
  0x0a85, 0x0a8d,
  0x0a8f, 0x0a91,
  0x0a93, 0x0aa8,
  0x0aaa, 0x0ab0,
  0x0ab2, 0x0ab3,
  0x0ab5, 0x0ab9,
  0x0abc, 0x0ac5,
  0x0ac7, 0x0ac9,
  0x0acb, 0x0acd,
  0x0ad0, 0x0ad0,
  0x0ae0, 0x0ae3,
  0x0ae6, 0x0aef,
  0x0af1, 0x0af1,
  0x0b01, 0x0b03,
  0x0b05, 0x0b0c,
  0x0b0f, 0x0b10,
  0x0b13, 0x0b28,
  0x0b2a, 0x0b30,
  0x0b32, 0x0b33,
  0x0b35, 0x0b39,
  0x0b3c, 0x0b43,
  0x0b47, 0x0b48,
  0x0b4b, 0x0b4d,
  0x0b56, 0x0b57,
  0x0b5c, 0x0b5d,
  0x0b5f, 0x0b61,
  0x0b66, 0x0b71,
  0x0b82, 0x0b83,
  0x0b85, 0x0b8a,
  0x0b8e, 0x0b90,
  0x0b92, 0x0b95,
  0x0b99, 0x0b9a,
  0x0b9c, 0x0b9c,
  0x0b9e, 0x0b9f,
  0x0ba3, 0x0ba4,
  0x0ba8, 0x0baa,
  0x0bae, 0x0bb5,
  0x0bb7, 0x0bb9,
  0x0bbe, 0x0bc2,
  0x0bc6, 0x0bc8,
  0x0bca, 0x0bcd,
  0x0bd7, 0x0bd7,
  0x0be7, 0x0bfa,
  0x0c01, 0x0c03,
  0x0c05, 0x0c0c,
  0x0c0e, 0x0c10,
  0x0c12, 0x0c28,
  0x0c2a, 0x0c33,
  0x0c35, 0x0c39,
  0x0c3e, 0x0c44,
  0x0c46, 0x0c48,
  0x0c4a, 0x0c4d,
  0x0c55, 0x0c56,
  0x0c60, 0x0c61,
  0x0c66, 0x0c6f,
  0x0c82, 0x0c83,
  0x0c85, 0x0c8c,
  0x0c8e, 0x0c90,
  0x0c92, 0x0ca8,
  0x0caa, 0x0cb3,
  0x0cb5, 0x0cb9,
  0x0cbc, 0x0cc4,
  0x0cc6, 0x0cc8,
  0x0cca, 0x0ccd,
  0x0cd5, 0x0cd6,
  0x0cde, 0x0cde,
  0x0ce0, 0x0ce1,
  0x0ce6, 0x0cef,
  0x0d02, 0x0d03,
  0x0d05, 0x0d0c,
  0x0d0e, 0x0d10,
  0x0d12, 0x0d28,
  0x0d2a, 0x0d39,
  0x0d3e, 0x0d43,
  0x0d46, 0x0d48,
  0x0d4a, 0x0d4d,
  0x0d57, 0x0d57,
  0x0d60, 0x0d61,
  0x0d66, 0x0d6f,
  0x0d82, 0x0d83,
  0x0d85, 0x0d96,
  0x0d9a, 0x0db1,
  0x0db3, 0x0dbb,
  0x0dbd, 0x0dbd,
  0x0dc0, 0x0dc6,
  0x0dca, 0x0dca,
  0x0dcf, 0x0dd4,
  0x0dd6, 0x0dd6,
  0x0dd8, 0x0ddf,
  0x0df2, 0x0df4,
  0x0e01, 0x0e3a,
  0x0e3f, 0x0e5b,
  0x0e81, 0x0e82,
  0x0e84, 0x0e84,
  0x0e87, 0x0e88,
  0x0e8a, 0x0e8a,
  0x0e8d, 0x0e8d,
  0x0e94, 0x0e97,
  0x0e99, 0x0e9f,
  0x0ea1, 0x0ea3,
  0x0ea5, 0x0ea5,
  0x0ea7, 0x0ea7,
  0x0eaa, 0x0eab,
  0x0ead, 0x0eb9,
  0x0ebb, 0x0ebd,
  0x0ec0, 0x0ec4,
  0x0ec6, 0x0ec6,
  0x0ec8, 0x0ecd,
  0x0ed0, 0x0ed9,
  0x0edc, 0x0edd,
  0x0f00, 0x0f47,
  0x0f49, 0x0f6a,
  0x0f71, 0x0f8b,
  0x0f90, 0x0f97,
  0x0f99, 0x0fbc,
  0x0fbe, 0x0fcc,
  0x0fcf, 0x0fcf,
  0x1000, 0x1021,
  0x1023, 0x1027,
  0x1029, 0x102a,
  0x102c, 0x1032,
  0x1036, 0x1039,
  0x1040, 0x1059,
  0x10a0, 0x10c5,
  0x10d0, 0x10f8,
  0x10fb, 0x10fb,
  0x1100, 0x1159,
  0x115f, 0x11a2,
  0x11a8, 0x11f9,
  0x1200, 0x1206,
  0x1208, 0x1246,
  0x1248, 0x1248,
  0x124a, 0x124d,
  0x1250, 0x1256,
  0x1258, 0x1258,
  0x125a, 0x125d,
  0x1260, 0x1286,
  0x1288, 0x1288,
  0x128a, 0x128d,
  0x1290, 0x12ae,
  0x12b0, 0x12b0,
  0x12b2, 0x12b5,
  0x12b8, 0x12be,
  0x12c0, 0x12c0,
  0x12c2, 0x12c5,
  0x12c8, 0x12ce,
  0x12d0, 0x12d6,
  0x12d8, 0x12ee,
  0x12f0, 0x130e,
  0x1310, 0x1310,
  0x1312, 0x1315,
  0x1318, 0x131e,
  0x1320, 0x1346,
  0x1348, 0x135a,
  0x1361, 0x137c,
  0x13a0, 0x13f4,
  0x1401, 0x1676,
  0x1681, 0x169c,
  0x16a0, 0x16f0,
  0x1700, 0x170c,
  0x170e, 0x1714,
  0x1720, 0x1736,
  0x1740, 0x1753,
  0x1760, 0x176c,
  0x176e, 0x1770,
  0x1772, 0x1773,
  0x1780, 0x17dd,
  0x17e0, 0x17e9,
  0x17f0, 0x17f9,
  0x1800, 0x180d,
  0x1810, 0x1819,
  0x1820, 0x1877,
  0x1880, 0x18a9,
  0x1900, 0x191c,
  0x1920, 0x192b,
  0x1930, 0x193b,
  0x1940, 0x1940,
  0x1944, 0x196d,
  0x1970, 0x1974,
  0x19e0, 0x19ff,
  0x1d00, 0x1d6b,
  0x1e00, 0x1e9b,
  0x1ea0, 0x1ef9,
  0x1f00, 0x1f15,
  0x1f18, 0x1f1d,
  0x1f20, 0x1f45,
  0x1f48, 0x1f4d,
  0x1f50, 0x1f57,
  0x1f59, 0x1f59,
  0x1f5b, 0x1f5b,
  0x1f5d, 0x1f5d,
  0x1f5f, 0x1f7d,
  0x1f80, 0x1fb4,
  0x1fb6, 0x1fc4,
  0x1fc6, 0x1fd3,
  0x1fd6, 0x1fdb,
  0x1fdd, 0x1fef,
  0x1ff2, 0x1ff4,
  0x1ff6, 0x1ffe,
  0x200b, 0x2027,
  0x202a, 0x202e,
  0x2030, 0x2054,
  0x2057, 0x2057,
  0x2060, 0x2063,
  0x206a, 0x2071,
  0x2074, 0x208e,
  0x20a0, 0x20b1,
  0x20d0, 0x20ea,
  0x2100, 0x213b,
  0x213d, 0x214b,
  0x2153, 0x2183,
  0x2190, 0x23d0,
  0x2400, 0x2426,
  0x2440, 0x244a,
  0x2460, 0x2617,
  0x2619, 0x267d,
  0x2680, 0x2691,
  0x26a0, 0x26a1,
  0x2701, 0x2704,
  0x2706, 0x2709,
  0x270c, 0x2727,
  0x2729, 0x274b,
  0x274d, 0x274d,
  0x274f, 0x2752,
  0x2756, 0x2756,
  0x2758, 0x275e,
  0x2761, 0x2794,
  0x2798, 0x27af,
  0x27b1, 0x27be,
  0x27d0, 0x27eb,
  0x27f0, 0x2b0d,
  0x2e80, 0x2e99,
  0x2e9b, 0x2ef3,
  0x2f00, 0x2fd5,
  0x2ff0, 0x2ffb,
  0x3001, 0x303f,
  0x3041, 0x3096,
  0x3099, 0x30ff,
  0x3105, 0x312c,
  0x3131, 0x318e,
  0x3190, 0x31b7,
  0x31f0, 0x321e,
  0x3220, 0x3243,
  0x3250, 0x327d,
  0x327f, 0x32fe,
  0x3300, 0x4db5,
  0x4dc0, 0x9fa5,
  0xa000, 0xa48c,
  0xa490, 0xa4c6,
  0xac00, 0xd7a3,
  0xe000, 0xfa2d,
  0xfa30, 0xfa6a,
  0xfb00, 0xfb06,
  0xfb13, 0xfb17,
  0xfb1d, 0xfb36,
  0xfb38, 0xfb3c,
  0xfb3e, 0xfb3e,
  0xfb40, 0xfb41,
  0xfb43, 0xfb44,
  0xfb46, 0xfbb1,
  0xfbd3, 0xfd3f,
  0xfd50, 0xfd8f,
  0xfd92, 0xfdc7,
  0xfdf0, 0xfdfd,
  0xfe00, 0xfe0f,
  0xfe20, 0xfe23,
  0xfe30, 0xfe52,
  0xfe54, 0xfe66,
  0xfe68, 0xfe6b,
  0xfe70, 0xfe74,
  0xfe76, 0xfefc,
  0xfeff, 0xfeff,
  0xff01, 0xffbe,
  0xffc2, 0xffc7,
  0xffca, 0xffcf,
  0xffd2, 0xffd7,
  0xffda, 0xffdc,
  0xffe0, 0xffe6,
  0xffe8, 0xffee,
  0xfff9, 0xfffd,
  0x10000, 0x1000b,
  0x1000d, 0x10026,
  0x10028, 0x1003a,
  0x1003c, 0x1003d,
  0x1003f, 0x1004d,
  0x10050, 0x1005d,
  0x10080, 0x100fa,
  0x10100, 0x10102,
  0x10107, 0x10133,
  0x10137, 0x1013f,
  0x10300, 0x1031e,
  0x10320, 0x10323,
  0x10330, 0x1034a,
  0x10380, 0x1039d,
  0x1039f, 0x1039f,
  0x10400, 0x1049d,
  0x104a0, 0x104a9,
  0x10800, 0x10805,
  0x10808, 0x10808,
  0x1080a, 0x10835,
  0x10837, 0x10838,
  0x1083c, 0x1083c,
  0x1083f, 0x1083f,
  0x1d000, 0x1d0f5,
  0x1d100, 0x1d126,
  0x1d12a, 0x1d1dd,
  0x1d300, 0x1d356,
  0x1d400, 0x1d454,
  0x1d456, 0x1d49c,
  0x1d49e, 0x1d49f,
  0x1d4a2, 0x1d4a2,
  0x1d4a5, 0x1d4a6,
  0x1d4a9, 0x1d4ac,
  0x1d4ae, 0x1d4b9,
  0x1d4bb, 0x1d4bb,
  0x1d4bd, 0x1d4c3,
  0x1d4c5, 0x1d505,
  0x1d507, 0x1d50a,
  0x1d50d, 0x1d514,
  0x1d516, 0x1d51c,
  0x1d51e, 0x1d539,
  0x1d53b, 0x1d53e,
  0x1d540, 0x1d544,
  0x1d546, 0x1d546,
  0x1d54a, 0x1d550,
  0x1d552, 0x1d6a3,
  0x1d6a8, 0x1d7c9,
  0x1d7ce, 0x1d7ff,
  0x20000, 0x2a6d6,
  0x2f800, 0x2fa1d,
  0xe0001, 0xe0001,
  0xe0020, 0xe007f,
  0xe0100, 0xe01ef,
  0xf0000, 0xffffd,
  0x100000, 0x10fffd
#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
}; /* end of MBGraph */

static OnigCodePoint SBLower[] = {
  1,
  0x0061, 0x007a
};

static OnigCodePoint MBLower[] = {
#ifdef USE_UNICODE_FULL_RANGE_CTYPE
  423,
#else
  5,
#endif
  0x00aa, 0x00aa,
  0x00b5, 0x00b5,
  0x00ba, 0x00ba,
  0x00df, 0x00f6,
  0x00f8, 0x00ff
#ifdef USE_UNICODE_FULL_RANGE_CTYPE
  ,
  0x0101, 0x0101,
  0x0103, 0x0103,
  0x0105, 0x0105,
  0x0107, 0x0107,
  0x0109, 0x0109,
  0x010b, 0x010b,
  0x010d, 0x010d,
  0x010f, 0x010f,
  0x0111, 0x0111,
  0x0113, 0x0113,
  0x0115, 0x0115,
  0x0117, 0x0117,
  0x0119, 0x0119,
  0x011b, 0x011b,
  0x011d, 0x011d,
  0x011f, 0x011f,
  0x0121, 0x0121,
  0x0123, 0x0123,
  0x0125, 0x0125,
  0x0127, 0x0127,
  0x0129, 0x0129,
  0x012b, 0x012b,
  0x012d, 0x012d,
  0x012f, 0x012f,
  0x0131, 0x0131,
  0x0133, 0x0133,
  0x0135, 0x0135,
  0x0137, 0x0138,
  0x013a, 0x013a,
  0x013c, 0x013c,
  0x013e, 0x013e,
  0x0140, 0x0140,
  0x0142, 0x0142,
  0x0144, 0x0144,
  0x0146, 0x0146,
  0x0148, 0x0149,
  0x014b, 0x014b,
  0x014d, 0x014d,
  0x014f, 0x014f,
  0x0151, 0x0151,
  0x0153, 0x0153,
  0x0155, 0x0155,
  0x0157, 0x0157,
  0x0159, 0x0159,
  0x015b, 0x015b,
  0x015d, 0x015d,
  0x015f, 0x015f,
  0x0161, 0x0161,
  0x0163, 0x0163,
  0x0165, 0x0165,
  0x0167, 0x0167,
  0x0169, 0x0169,
  0x016b, 0x016b,
  0x016d, 0x016d,
  0x016f, 0x016f,
  0x0171, 0x0171,
  0x0173, 0x0173,
  0x0175, 0x0175,
  0x0177, 0x0177,
  0x017a, 0x017a,
  0x017c, 0x017c,
  0x017e, 0x0180,
  0x0183, 0x0183,
  0x0185, 0x0185,
  0x0188, 0x0188,
  0x018c, 0x018d,
  0x0192, 0x0192,
  0x0195, 0x0195,
  0x0199, 0x019b,
  0x019e, 0x019e,
  0x01a1, 0x01a1,
  0x01a3, 0x01a3,
  0x01a5, 0x01a5,
  0x01a8, 0x01a8,
  0x01aa, 0x01ab,
  0x01ad, 0x01ad,
  0x01b0, 0x01b0,
  0x01b4, 0x01b4,
  0x01b6, 0x01b6,
  0x01b9, 0x01ba,
  0x01bd, 0x01bf,
  0x01c6, 0x01c6,
  0x01c9, 0x01c9,
  0x01cc, 0x01cc,
  0x01ce, 0x01ce,
  0x01d0, 0x01d0,
  0x01d2, 0x01d2,
  0x01d4, 0x01d4,
  0x01d6, 0x01d6,
  0x01d8, 0x01d8,
  0x01da, 0x01da,
  0x01dc, 0x01dd,
  0x01df, 0x01df,
  0x01e1, 0x01e1,
  0x01e3, 0x01e3,
  0x01e5, 0x01e5,
  0x01e7, 0x01e7,
  0x01e9, 0x01e9,
  0x01eb, 0x01eb,
  0x01ed, 0x01ed,
  0x01ef, 0x01f0,
  0x01f3, 0x01f3,
  0x01f5, 0x01f5,
  0x01f9, 0x01f9,
  0x01fb, 0x01fb,
  0x01fd, 0x01fd,
  0x01ff, 0x01ff,
  0x0201, 0x0201,
  0x0203, 0x0203,
  0x0205, 0x0205,
  0x0207, 0x0207,
  0x0209, 0x0209,
  0x020b, 0x020b,
  0x020d, 0x020d,
  0x020f, 0x020f,
  0x0211, 0x0211,
  0x0213, 0x0213,
  0x0215, 0x0215,
  0x0217, 0x0217,
  0x0219, 0x0219,
  0x021b, 0x021b,
  0x021d, 0x021d,
  0x021f, 0x021f,
  0x0221, 0x0221,
  0x0223, 0x0223,
  0x0225, 0x0225,
  0x0227, 0x0227,
  0x0229, 0x0229,
  0x022b, 0x022b,
  0x022d, 0x022d,
  0x022f, 0x022f,
  0x0231, 0x0231,
  0x0233, 0x0236,
  0x0250, 0x02af,
  0x0390, 0x0390,
  0x03ac, 0x03ce,
  0x03d0, 0x03d1,
  0x03d5, 0x03d7,
  0x03d9, 0x03d9,
  0x03db, 0x03db,
  0x03dd, 0x03dd,
  0x03df, 0x03df,
  0x03e1, 0x03e1,
  0x03e3, 0x03e3,
  0x03e5, 0x03e5,
  0x03e7, 0x03e7,
  0x03e9, 0x03e9,
  0x03eb, 0x03eb,
  0x03ed, 0x03ed,
  0x03ef, 0x03f3,
  0x03f5, 0x03f5,
  0x03f8, 0x03f8,
  0x03fb, 0x03fb,
  0x0430, 0x045f,
  0x0461, 0x0461,
  0x0463, 0x0463,
  0x0465, 0x0465,
  0x0467, 0x0467,
  0x0469, 0x0469,
  0x046b, 0x046b,
  0x046d, 0x046d,
  0x046f, 0x046f,
  0x0471, 0x0471,
  0x0473, 0x0473,
  0x0475, 0x0475,
  0x0477, 0x0477,
  0x0479, 0x0479,
  0x047b, 0x047b,
  0x047d, 0x047d,
  0x047f, 0x047f,
  0x0481, 0x0481,
  0x048b, 0x048b,
  0x048d, 0x048d,
  0x048f, 0x048f,
  0x0491, 0x0491,
  0x0493, 0x0493,
  0x0495, 0x0495,
  0x0497, 0x0497,
  0x0499, 0x0499,
  0x049b, 0x049b,
  0x049d, 0x049d,
  0x049f, 0x049f,
  0x04a1, 0x04a1,
  0x04a3, 0x04a3,
  0x04a5, 0x04a5,
  0x04a7, 0x04a7,
  0x04a9, 0x04a9,
  0x04ab, 0x04ab,
  0x04ad, 0x04ad,
  0x04af, 0x04af,
  0x04b1, 0x04b1,
  0x04b3, 0x04b3,
  0x04b5, 0x04b5,
  0x04b7, 0x04b7,
  0x04b9, 0x04b9,
  0x04bb, 0x04bb,
  0x04bd, 0x04bd,
  0x04bf, 0x04bf,
  0x04c2, 0x04c2,
  0x04c4, 0x04c4,
  0x04c6, 0x04c6,
  0x04c8, 0x04c8,
  0x04ca, 0x04ca,
  0x04cc, 0x04cc,
  0x04ce, 0x04ce,
  0x04d1, 0x04d1,
  0x04d3, 0x04d3,
  0x04d5, 0x04d5,
  0x04d7, 0x04d7,
  0x04d9, 0x04d9,
  0x04db, 0x04db,
  0x04dd, 0x04dd,
  0x04df, 0x04df,
  0x04e1, 0x04e1,
  0x04e3, 0x04e3,
  0x04e5, 0x04e5,
  0x04e7, 0x04e7,
  0x04e9, 0x04e9,
  0x04eb, 0x04eb,
  0x04ed, 0x04ed,
  0x04ef, 0x04ef,
  0x04f1, 0x04f1,
  0x04f3, 0x04f3,
  0x04f5, 0x04f5,
  0x04f9, 0x04f9,
  0x0501, 0x0501,
  0x0503, 0x0503,
  0x0505, 0x0505,
  0x0507, 0x0507,
  0x0509, 0x0509,
  0x050b, 0x050b,
  0x050d, 0x050d,
  0x050f, 0x050f,
  0x0561, 0x0587,
  0x1d00, 0x1d2b,
  0x1d62, 0x1d6b,
  0x1e01, 0x1e01,
  0x1e03, 0x1e03,
  0x1e05, 0x1e05,
  0x1e07, 0x1e07,
  0x1e09, 0x1e09,
  0x1e0b, 0x1e0b,
  0x1e0d, 0x1e0d,
  0x1e0f, 0x1e0f,
  0x1e11, 0x1e11,
  0x1e13, 0x1e13,
  0x1e15, 0x1e15,
  0x1e17, 0x1e17,
  0x1e19, 0x1e19,
  0x1e1b, 0x1e1b,
  0x1e1d, 0x1e1d,
  0x1e1f, 0x1e1f,
  0x1e21, 0x1e21,
  0x1e23, 0x1e23,
  0x1e25, 0x1e25,
  0x1e27, 0x1e27,
  0x1e29, 0x1e29,
  0x1e2b, 0x1e2b,
  0x1e2d, 0x1e2d,
  0x1e2f, 0x1e2f,
  0x1e31, 0x1e31,
  0x1e33, 0x1e33,
  0x1e35, 0x1e35,
  0x1e37, 0x1e37,
  0x1e39, 0x1e39,
  0x1e3b, 0x1e3b,
  0x1e3d, 0x1e3d,
  0x1e3f, 0x1e3f,
  0x1e41, 0x1e41,
  0x1e43, 0x1e43,
  0x1e45, 0x1e45,
  0x1e47, 0x1e47,
  0x1e49, 0x1e49,
  0x1e4b, 0x1e4b,
  0x1e4d, 0x1e4d,
  0x1e4f, 0x1e4f,
  0x1e51, 0x1e51,
  0x1e53, 0x1e53,
  0x1e55, 0x1e55,
  0x1e57, 0x1e57,
  0x1e59, 0x1e59,
  0x1e5b, 0x1e5b,
  0x1e5d, 0x1e5d,
  0x1e5f, 0x1e5f,
  0x1e61, 0x1e61,
  0x1e63, 0x1e63,
  0x1e65, 0x1e65,
  0x1e67, 0x1e67,
  0x1e69, 0x1e69,
  0x1e6b, 0x1e6b,
  0x1e6d, 0x1e6d,
  0x1e6f, 0x1e6f,
  0x1e71, 0x1e71,
  0x1e73, 0x1e73,
  0x1e75, 0x1e75,
  0x1e77, 0x1e77,
  0x1e79, 0x1e79,
  0x1e7b, 0x1e7b,
  0x1e7d, 0x1e7d,
  0x1e7f, 0x1e7f,
  0x1e81, 0x1e81,
  0x1e83, 0x1e83,
  0x1e85, 0x1e85,
  0x1e87, 0x1e87,
  0x1e89, 0x1e89,
  0x1e8b, 0x1e8b,
  0x1e8d, 0x1e8d,
  0x1e8f, 0x1e8f,
  0x1e91, 0x1e91,
  0x1e93, 0x1e93,
  0x1e95, 0x1e9b,
  0x1ea1, 0x1ea1,
  0x1ea3, 0x1ea3,
  0x1ea5, 0x1ea5,
  0x1ea7, 0x1ea7,
  0x1ea9, 0x1ea9,
  0x1eab, 0x1eab,
  0x1ead, 0x1ead,
  0x1eaf, 0x1eaf,
  0x1eb1, 0x1eb1,
  0x1eb3, 0x1eb3,
  0x1eb5, 0x1eb5,
  0x1eb7, 0x1eb7,
  0x1eb9, 0x1eb9,
  0x1ebb, 0x1ebb,
  0x1ebd, 0x1ebd,
  0x1ebf, 0x1ebf,
  0x1ec1, 0x1ec1,
  0x1ec3, 0x1ec3,
  0x1ec5, 0x1ec5,
  0x1ec7, 0x1ec7,
  0x1ec9, 0x1ec9,
  0x1ecb, 0x1ecb,
  0x1ecd, 0x1ecd,
  0x1ecf, 0x1ecf,
  0x1ed1, 0x1ed1,
  0x1ed3, 0x1ed3,
  0x1ed5, 0x1ed5,
  0x1ed7, 0x1ed7,
  0x1ed9, 0x1ed9,
  0x1edb, 0x1edb,
  0x1edd, 0x1edd,
  0x1edf, 0x1edf,
  0x1ee1, 0x1ee1,
  0x1ee3, 0x1ee3,
  0x1ee5, 0x1ee5,
  0x1ee7, 0x1ee7,
  0x1ee9, 0x1ee9,
  0x1eeb, 0x1eeb,
  0x1eed, 0x1eed,
  0x1eef, 0x1eef,
  0x1ef1, 0x1ef1,
  0x1ef3, 0x1ef3,
  0x1ef5, 0x1ef5,
  0x1ef7, 0x1ef7,
  0x1ef9, 0x1ef9,
  0x1f00, 0x1f07,
  0x1f10, 0x1f15,
  0x1f20, 0x1f27,
  0x1f30, 0x1f37,
  0x1f40, 0x1f45,
  0x1f50, 0x1f57,
  0x1f60, 0x1f67,
  0x1f70, 0x1f7d,
  0x1f80, 0x1f87,
  0x1f90, 0x1f97,
  0x1fa0, 0x1fa7,
  0x1fb0, 0x1fb4,
  0x1fb6, 0x1fb7,
  0x1fbe, 0x1fbe,
  0x1fc2, 0x1fc4,
  0x1fc6, 0x1fc7,
  0x1fd0, 0x1fd3,
  0x1fd6, 0x1fd7,
  0x1fe0, 0x1fe7,
  0x1ff2, 0x1ff4,
  0x1ff6, 0x1ff7,
  0x2071, 0x2071,
  0x207f, 0x207f,
  0x210a, 0x210a,
  0x210e, 0x210f,
  0x2113, 0x2113,
  0x212f, 0x212f,
  0x2134, 0x2134,
  0x2139, 0x2139,
  0x213d, 0x213d,
  0x2146, 0x2149,
  0xfb00, 0xfb06,
  0xfb13, 0xfb17,
  0xff41, 0xff5a,
  0x10428, 0x1044f,
  0x1d41a, 0x1d433,
  0x1d44e, 0x1d454,
  0x1d456, 0x1d467,
  0x1d482, 0x1d49b,
  0x1d4b6, 0x1d4b9,
  0x1d4bb, 0x1d4bb,
  0x1d4bd, 0x1d4c3,
  0x1d4c5, 0x1d4cf,
  0x1d4ea, 0x1d503,
  0x1d51e, 0x1d537,
  0x1d552, 0x1d56b,
  0x1d586, 0x1d59f,
  0x1d5ba, 0x1d5d3,
  0x1d5ee, 0x1d607,
  0x1d622, 0x1d63b,
  0x1d656, 0x1d66f,
  0x1d68a, 0x1d6a3,
  0x1d6c2, 0x1d6da,
  0x1d6dc, 0x1d6e1,
  0x1d6fc, 0x1d714,
  0x1d716, 0x1d71b,
  0x1d736, 0x1d74e,
  0x1d750, 0x1d755,
  0x1d770, 0x1d788,
  0x1d78a, 0x1d78f,
  0x1d7aa, 0x1d7c2,
  0x1d7c4, 0x1d7c9
#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
}; /* end of MBLower */

static OnigCodePoint SBPrint[] = {
  2,
  0x0009, 0x000d,
  0x0020, 0x007e
};

static OnigCodePoint MBPrint[] = {
#ifdef USE_UNICODE_FULL_RANGE_CTYPE
  403,
#else
  2,
#endif
  0x0085, 0x0085,
  0x00a0, 0x0236
#ifdef USE_UNICODE_FULL_RANGE_CTYPE
  ,
  0x0250, 0x0357,
  0x035d, 0x036f,
  0x0374, 0x0375,
  0x037a, 0x037a,
  0x037e, 0x037e,
  0x0384, 0x038a,
  0x038c, 0x038c,
  0x038e, 0x03a1,
  0x03a3, 0x03ce,
  0x03d0, 0x03fb,
  0x0400, 0x0486,
  0x0488, 0x04ce,
  0x04d0, 0x04f5,
  0x04f8, 0x04f9,
  0x0500, 0x050f,
  0x0531, 0x0556,
  0x0559, 0x055f,
  0x0561, 0x0587,
  0x0589, 0x058a,
  0x0591, 0x05a1,
  0x05a3, 0x05b9,
  0x05bb, 0x05c4,
  0x05d0, 0x05ea,
  0x05f0, 0x05f4,
  0x0600, 0x0603,
  0x060c, 0x0615,
  0x061b, 0x061b,
  0x061f, 0x061f,
  0x0621, 0x063a,
  0x0640, 0x0658,
  0x0660, 0x070d,
  0x070f, 0x074a,
  0x074d, 0x074f,
  0x0780, 0x07b1,
  0x0901, 0x0939,
  0x093c, 0x094d,
  0x0950, 0x0954,
  0x0958, 0x0970,
  0x0981, 0x0983,
  0x0985, 0x098c,
  0x098f, 0x0990,
  0x0993, 0x09a8,
  0x09aa, 0x09b0,
  0x09b2, 0x09b2,
  0x09b6, 0x09b9,
  0x09bc, 0x09c4,
  0x09c7, 0x09c8,
  0x09cb, 0x09cd,
  0x09d7, 0x09d7,
  0x09dc, 0x09dd,
  0x09df, 0x09e3,
  0x09e6, 0x09fa,
  0x0a01, 0x0a03,
  0x0a05, 0x0a0a,
  0x0a0f, 0x0a10,
  0x0a13, 0x0a28,
  0x0a2a, 0x0a30,
  0x0a32, 0x0a33,
  0x0a35, 0x0a36,
  0x0a38, 0x0a39,
  0x0a3c, 0x0a3c,
  0x0a3e, 0x0a42,
  0x0a47, 0x0a48,
  0x0a4b, 0x0a4d,
  0x0a59, 0x0a5c,
  0x0a5e, 0x0a5e,
  0x0a66, 0x0a74,
  0x0a81, 0x0a83,
  0x0a85, 0x0a8d,
  0x0a8f, 0x0a91,
  0x0a93, 0x0aa8,
  0x0aaa, 0x0ab0,
  0x0ab2, 0x0ab3,
  0x0ab5, 0x0ab9,
  0x0abc, 0x0ac5,
  0x0ac7, 0x0ac9,
  0x0acb, 0x0acd,
  0x0ad0, 0x0ad0,
  0x0ae0, 0x0ae3,
  0x0ae6, 0x0aef,
  0x0af1, 0x0af1,
  0x0b01, 0x0b03,
  0x0b05, 0x0b0c,
  0x0b0f, 0x0b10,
  0x0b13, 0x0b28,
  0x0b2a, 0x0b30,
  0x0b32, 0x0b33,
  0x0b35, 0x0b39,
  0x0b3c, 0x0b43,
  0x0b47, 0x0b48,
  0x0b4b, 0x0b4d,
  0x0b56, 0x0b57,
  0x0b5c, 0x0b5d,
  0x0b5f, 0x0b61,
  0x0b66, 0x0b71,
  0x0b82, 0x0b83,
  0x0b85, 0x0b8a,
  0x0b8e, 0x0b90,
  0x0b92, 0x0b95,
  0x0b99, 0x0b9a,
  0x0b9c, 0x0b9c,
  0x0b9e, 0x0b9f,
  0x0ba3, 0x0ba4,
  0x0ba8, 0x0baa,
  0x0bae, 0x0bb5,
  0x0bb7, 0x0bb9,
  0x0bbe, 0x0bc2,
  0x0bc6, 0x0bc8,
  0x0bca, 0x0bcd,
  0x0bd7, 0x0bd7,
  0x0be7, 0x0bfa,
  0x0c01, 0x0c03,
  0x0c05, 0x0c0c,
  0x0c0e, 0x0c10,
  0x0c12, 0x0c28,
  0x0c2a, 0x0c33,
  0x0c35, 0x0c39,
  0x0c3e, 0x0c44,
  0x0c46, 0x0c48,
  0x0c4a, 0x0c4d,
  0x0c55, 0x0c56,
  0x0c60, 0x0c61,
  0x0c66, 0x0c6f,
  0x0c82, 0x0c83,
  0x0c85, 0x0c8c,
  0x0c8e, 0x0c90,
  0x0c92, 0x0ca8,
  0x0caa, 0x0cb3,
  0x0cb5, 0x0cb9,
  0x0cbc, 0x0cc4,
  0x0cc6, 0x0cc8,
  0x0cca, 0x0ccd,
  0x0cd5, 0x0cd6,
  0x0cde, 0x0cde,
  0x0ce0, 0x0ce1,
  0x0ce6, 0x0cef,
  0x0d02, 0x0d03,
  0x0d05, 0x0d0c,
  0x0d0e, 0x0d10,
  0x0d12, 0x0d28,
  0x0d2a, 0x0d39,
  0x0d3e, 0x0d43,
  0x0d46, 0x0d48,
  0x0d4a, 0x0d4d,
  0x0d57, 0x0d57,
  0x0d60, 0x0d61,
  0x0d66, 0x0d6f,
  0x0d82, 0x0d83,
  0x0d85, 0x0d96,
  0x0d9a, 0x0db1,
  0x0db3, 0x0dbb,
  0x0dbd, 0x0dbd,
  0x0dc0, 0x0dc6,
  0x0dca, 0x0dca,
  0x0dcf, 0x0dd4,
  0x0dd6, 0x0dd6,
  0x0dd8, 0x0ddf,
  0x0df2, 0x0df4,
  0x0e01, 0x0e3a,
  0x0e3f, 0x0e5b,
  0x0e81, 0x0e82,
  0x0e84, 0x0e84,
  0x0e87, 0x0e88,
  0x0e8a, 0x0e8a,
  0x0e8d, 0x0e8d,
  0x0e94, 0x0e97,
  0x0e99, 0x0e9f,
  0x0ea1, 0x0ea3,
  0x0ea5, 0x0ea5,
  0x0ea7, 0x0ea7,
  0x0eaa, 0x0eab,
  0x0ead, 0x0eb9,
  0x0ebb, 0x0ebd,
  0x0ec0, 0x0ec4,
  0x0ec6, 0x0ec6,
  0x0ec8, 0x0ecd,
  0x0ed0, 0x0ed9,
  0x0edc, 0x0edd,
  0x0f00, 0x0f47,
  0x0f49, 0x0f6a,
  0x0f71, 0x0f8b,
  0x0f90, 0x0f97,
  0x0f99, 0x0fbc,
  0x0fbe, 0x0fcc,
  0x0fcf, 0x0fcf,
  0x1000, 0x1021,
  0x1023, 0x1027,
  0x1029, 0x102a,
  0x102c, 0x1032,
  0x1036, 0x1039,
  0x1040, 0x1059,
  0x10a0, 0x10c5,
  0x10d0, 0x10f8,
  0x10fb, 0x10fb,
  0x1100, 0x1159,
  0x115f, 0x11a2,
  0x11a8, 0x11f9,
  0x1200, 0x1206,
  0x1208, 0x1246,
  0x1248, 0x1248,
  0x124a, 0x124d,
  0x1250, 0x1256,
  0x1258, 0x1258,
  0x125a, 0x125d,
  0x1260, 0x1286,
  0x1288, 0x1288,
  0x128a, 0x128d,
  0x1290, 0x12ae,
  0x12b0, 0x12b0,
  0x12b2, 0x12b5,
  0x12b8, 0x12be,
  0x12c0, 0x12c0,
  0x12c2, 0x12c5,
  0x12c8, 0x12ce,
  0x12d0, 0x12d6,
  0x12d8, 0x12ee,
  0x12f0, 0x130e,
  0x1310, 0x1310,
  0x1312, 0x1315,
  0x1318, 0x131e,
  0x1320, 0x1346,
  0x1348, 0x135a,
  0x1361, 0x137c,
  0x13a0, 0x13f4,
  0x1401, 0x1676,
  0x1680, 0x169c,
  0x16a0, 0x16f0,
  0x1700, 0x170c,
  0x170e, 0x1714,
  0x1720, 0x1736,
  0x1740, 0x1753,
  0x1760, 0x176c,
  0x176e, 0x1770,
  0x1772, 0x1773,
  0x1780, 0x17dd,
  0x17e0, 0x17e9,
  0x17f0, 0x17f9,
  0x1800, 0x180e,
  0x1810, 0x1819,
  0x1820, 0x1877,
  0x1880, 0x18a9,
  0x1900, 0x191c,
  0x1920, 0x192b,
  0x1930, 0x193b,
  0x1940, 0x1940,
  0x1944, 0x196d,
  0x1970, 0x1974,
  0x19e0, 0x19ff,
  0x1d00, 0x1d6b,
  0x1e00, 0x1e9b,
  0x1ea0, 0x1ef9,
  0x1f00, 0x1f15,
  0x1f18, 0x1f1d,
  0x1f20, 0x1f45,
  0x1f48, 0x1f4d,
  0x1f50, 0x1f57,
  0x1f59, 0x1f59,
  0x1f5b, 0x1f5b,
  0x1f5d, 0x1f5d,
  0x1f5f, 0x1f7d,
  0x1f80, 0x1fb4,
  0x1fb6, 0x1fc4,
  0x1fc6, 0x1fd3,
  0x1fd6, 0x1fdb,
  0x1fdd, 0x1fef,
  0x1ff2, 0x1ff4,
  0x1ff6, 0x1ffe,
  0x2000, 0x2054,
  0x2057, 0x2057,
  0x205f, 0x2063,
  0x206a, 0x2071,
  0x2074, 0x208e,
  0x20a0, 0x20b1,
  0x20d0, 0x20ea,
  0x2100, 0x213b,
  0x213d, 0x214b,
  0x2153, 0x2183,
  0x2190, 0x23d0,
  0x2400, 0x2426,
  0x2440, 0x244a,
  0x2460, 0x2617,
  0x2619, 0x267d,
  0x2680, 0x2691,
  0x26a0, 0x26a1,
  0x2701, 0x2704,
  0x2706, 0x2709,
  0x270c, 0x2727,
  0x2729, 0x274b,
  0x274d, 0x274d,
  0x274f, 0x2752,
  0x2756, 0x2756,
  0x2758, 0x275e,
  0x2761, 0x2794,
  0x2798, 0x27af,
  0x27b1, 0x27be,
  0x27d0, 0x27eb,
  0x27f0, 0x2b0d,
  0x2e80, 0x2e99,
  0x2e9b, 0x2ef3,
  0x2f00, 0x2fd5,
  0x2ff0, 0x2ffb,
  0x3000, 0x303f,
  0x3041, 0x3096,
  0x3099, 0x30ff,
  0x3105, 0x312c,
  0x3131, 0x318e,
  0x3190, 0x31b7,
  0x31f0, 0x321e,
  0x3220, 0x3243,
  0x3250, 0x327d,
  0x327f, 0x32fe,
  0x3300, 0x4db5,
  0x4dc0, 0x9fa5,
  0xa000, 0xa48c,
  0xa490, 0xa4c6,
  0xac00, 0xd7a3,
  0xe000, 0xfa2d,
  0xfa30, 0xfa6a,
  0xfb00, 0xfb06,
  0xfb13, 0xfb17,
  0xfb1d, 0xfb36,
  0xfb38, 0xfb3c,
  0xfb3e, 0xfb3e,
  0xfb40, 0xfb41,
  0xfb43, 0xfb44,
  0xfb46, 0xfbb1,
  0xfbd3, 0xfd3f,
  0xfd50, 0xfd8f,
  0xfd92, 0xfdc7,
  0xfdf0, 0xfdfd,
  0xfe00, 0xfe0f,
  0xfe20, 0xfe23,
  0xfe30, 0xfe52,
  0xfe54, 0xfe66,
  0xfe68, 0xfe6b,
  0xfe70, 0xfe74,
  0xfe76, 0xfefc,
  0xfeff, 0xfeff,
  0xff01, 0xffbe,
  0xffc2, 0xffc7,
  0xffca, 0xffcf,
  0xffd2, 0xffd7,
  0xffda, 0xffdc,
  0xffe0, 0xffe6,
  0xffe8, 0xffee,
  0xfff9, 0xfffd,
  0x10000, 0x1000b,
  0x1000d, 0x10026,
  0x10028, 0x1003a,
  0x1003c, 0x1003d,
  0x1003f, 0x1004d,
  0x10050, 0x1005d,
  0x10080, 0x100fa,
  0x10100, 0x10102,
  0x10107, 0x10133,
  0x10137, 0x1013f,
  0x10300, 0x1031e,
  0x10320, 0x10323,
  0x10330, 0x1034a,
  0x10380, 0x1039d,
  0x1039f, 0x1039f,
  0x10400, 0x1049d,
  0x104a0, 0x104a9,
  0x10800, 0x10805,
  0x10808, 0x10808,
  0x1080a, 0x10835,
  0x10837, 0x10838,
  0x1083c, 0x1083c,
  0x1083f, 0x1083f,
  0x1d000, 0x1d0f5,
  0x1d100, 0x1d126,
  0x1d12a, 0x1d1dd,
  0x1d300, 0x1d356,
  0x1d400, 0x1d454,
  0x1d456, 0x1d49c,
  0x1d49e, 0x1d49f,
  0x1d4a2, 0x1d4a2,
  0x1d4a5, 0x1d4a6,
  0x1d4a9, 0x1d4ac,
  0x1d4ae, 0x1d4b9,
  0x1d4bb, 0x1d4bb,
  0x1d4bd, 0x1d4c3,
  0x1d4c5, 0x1d505,
  0x1d507, 0x1d50a,
  0x1d50d, 0x1d514,
  0x1d516, 0x1d51c,
  0x1d51e, 0x1d539,
  0x1d53b, 0x1d53e,
  0x1d540, 0x1d544,
  0x1d546, 0x1d546,
  0x1d54a, 0x1d550,
  0x1d552, 0x1d6a3,
  0x1d6a8, 0x1d7c9,
  0x1d7ce, 0x1d7ff,
  0x20000, 0x2a6d6,
  0x2f800, 0x2fa1d,
  0xe0001, 0xe0001,
  0xe0020, 0xe007f,
  0xe0100, 0xe01ef,
  0xf0000, 0xffffd,
  0x100000, 0x10fffd
#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
}; /* end of MBPrint */

static OnigCodePoint SBPunct[] = {
  9,
  0x0021, 0x0023,
  0x0025, 0x002a,
  0x002c, 0x002f,
  0x003a, 0x003b,
  0x003f, 0x0040,
  0x005b, 0x005d,
  0x005f, 0x005f,
  0x007b, 0x007b,
  0x007d, 0x007d
}; /* end of SBPunct */

static OnigCodePoint MBPunct[] = {
#ifdef USE_UNICODE_FULL_RANGE_CTYPE
  77,
#else
  5,
#endif
  0x00a1, 0x00a1,
  0x00ab, 0x00ab,
  0x00b7, 0x00b7,
  0x00bb, 0x00bb,
  0x00bf, 0x00bf
#ifdef USE_UNICODE_FULL_RANGE_CTYPE
  ,
  0x037e, 0x037e,
  0x0387, 0x0387,
  0x055a, 0x055f,
  0x0589, 0x058a,
  0x05be, 0x05be,
  0x05c0, 0x05c0,
  0x05c3, 0x05c3,
  0x05f3, 0x05f4,
  0x060c, 0x060d,
  0x061b, 0x061b,
  0x061f, 0x061f,
  0x066a, 0x066d,
  0x06d4, 0x06d4,
  0x0700, 0x070d,
  0x0964, 0x0965,
  0x0970, 0x0970,
  0x0df4, 0x0df4,
  0x0e4f, 0x0e4f,
  0x0e5a, 0x0e5b,
  0x0f04, 0x0f12,
  0x0f3a, 0x0f3d,
  0x0f85, 0x0f85,
  0x104a, 0x104f,
  0x10fb, 0x10fb,
  0x1361, 0x1368,
  0x166d, 0x166e,
  0x169b, 0x169c,
  0x16eb, 0x16ed,
  0x1735, 0x1736,
  0x17d4, 0x17d6,
  0x17d8, 0x17da,
  0x1800, 0x180a,
  0x1944, 0x1945,
  0x2010, 0x2027,
  0x2030, 0x2043,
  0x2045, 0x2051,
  0x2053, 0x2054,
  0x2057, 0x2057,
  0x207d, 0x207e,
  0x208d, 0x208e,
  0x2329, 0x232a,
  0x23b4, 0x23b6,
  0x2768, 0x2775,
  0x27e6, 0x27eb,
  0x2983, 0x2998,
  0x29d8, 0x29db,
  0x29fc, 0x29fd,
  0x3001, 0x3003,
  0x3008, 0x3011,
  0x3014, 0x301f,
  0x3030, 0x3030,
  0x303d, 0x303d,
  0x30a0, 0x30a0,
  0x30fb, 0x30fb,
  0xfd3e, 0xfd3f,
  0xfe30, 0xfe52,
  0xfe54, 0xfe61,
  0xfe63, 0xfe63,
  0xfe68, 0xfe68,
  0xfe6a, 0xfe6b,
  0xff01, 0xff03,
  0xff05, 0xff0a,
  0xff0c, 0xff0f,
  0xff1a, 0xff1b,
  0xff1f, 0xff20,
  0xff3b, 0xff3d,
  0xff3f, 0xff3f,
  0xff5b, 0xff5b,
  0xff5d, 0xff5d,
  0xff5f, 0xff65,
  0x10100, 0x10101,
  0x1039f, 0x1039f
#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
}; /* end of MBPunct */

static OnigCodePoint SBSpace[] = {
  2,
  0x0009, 0x000d,
  0x0020, 0x0020
};

static OnigCodePoint MBSpace[] = {
#ifdef USE_UNICODE_FULL_RANGE_CTYPE
  9,
#else
  2,
#endif
  0x0085, 0x0085,
  0x00a0, 0x00a0
#ifdef USE_UNICODE_FULL_RANGE_CTYPE
  ,
  0x1680, 0x1680,
  0x180e, 0x180e,
  0x2000, 0x200a,
  0x2028, 0x2029,
  0x202f, 0x202f,
  0x205f, 0x205f,
  0x3000, 0x3000
#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
}; /* end of MBSpace */

static OnigCodePoint SBUpper[] = {
  1,
  0x0041, 0x005a
};

static OnigCodePoint MBUpper[] = {
#ifdef USE_UNICODE_FULL_RANGE_CTYPE
  420,
#else
  2,
#endif
  0x00c0, 0x00d6,
  0x00d8, 0x00de
#ifdef USE_UNICODE_FULL_RANGE_CTYPE
  ,
  0x0100, 0x0100,
  0x0102, 0x0102,
  0x0104, 0x0104,
  0x0106, 0x0106,
  0x0108, 0x0108,
  0x010a, 0x010a,
  0x010c, 0x010c,
  0x010e, 0x010e,
  0x0110, 0x0110,
  0x0112, 0x0112,
  0x0114, 0x0114,
  0x0116, 0x0116,
  0x0118, 0x0118,
  0x011a, 0x011a,
  0x011c, 0x011c,
  0x011e, 0x011e,
  0x0120, 0x0120,
  0x0122, 0x0122,
  0x0124, 0x0124,
  0x0126, 0x0126,
  0x0128, 0x0128,
  0x012a, 0x012a,
  0x012c, 0x012c,
  0x012e, 0x012e,
  0x0130, 0x0130,
  0x0132, 0x0132,
  0x0134, 0x0134,
  0x0136, 0x0136,
  0x0139, 0x0139,
  0x013b, 0x013b,
  0x013d, 0x013d,
  0x013f, 0x013f,
  0x0141, 0x0141,
  0x0143, 0x0143,
  0x0145, 0x0145,
  0x0147, 0x0147,
  0x014a, 0x014a,
  0x014c, 0x014c,
  0x014e, 0x014e,
  0x0150, 0x0150,
  0x0152, 0x0152,
  0x0154, 0x0154,
  0x0156, 0x0156,
  0x0158, 0x0158,
  0x015a, 0x015a,
  0x015c, 0x015c,
  0x015e, 0x015e,
  0x0160, 0x0160,
  0x0162, 0x0162,
  0x0164, 0x0164,
  0x0166, 0x0166,
  0x0168, 0x0168,
  0x016a, 0x016a,
  0x016c, 0x016c,
  0x016e, 0x016e,
  0x0170, 0x0170,
  0x0172, 0x0172,
  0x0174, 0x0174,
  0x0176, 0x0176,
  0x0178, 0x0179,
  0x017b, 0x017b,
  0x017d, 0x017d,
  0x0181, 0x0182,
  0x0184, 0x0184,
  0x0186, 0x0187,
  0x0189, 0x018b,
  0x018e, 0x0191,
  0x0193, 0x0194,
  0x0196, 0x0198,
  0x019c, 0x019d,
  0x019f, 0x01a0,
  0x01a2, 0x01a2,
  0x01a4, 0x01a4,
  0x01a6, 0x01a7,
  0x01a9, 0x01a9,
  0x01ac, 0x01ac,
  0x01ae, 0x01af,
  0x01b1, 0x01b3,
  0x01b5, 0x01b5,
  0x01b7, 0x01b8,
  0x01bc, 0x01bc,
  0x01c4, 0x01c4,
  0x01c7, 0x01c7,
  0x01ca, 0x01ca,
  0x01cd, 0x01cd,
  0x01cf, 0x01cf,
  0x01d1, 0x01d1,
  0x01d3, 0x01d3,
  0x01d5, 0x01d5,
  0x01d7, 0x01d7,
  0x01d9, 0x01d9,
  0x01db, 0x01db,
  0x01de, 0x01de,
  0x01e0, 0x01e0,
  0x01e2, 0x01e2,
  0x01e4, 0x01e4,
  0x01e6, 0x01e6,
  0x01e8, 0x01e8,
  0x01ea, 0x01ea,
  0x01ec, 0x01ec,
  0x01ee, 0x01ee,
  0x01f1, 0x01f1,
  0x01f4, 0x01f4,
  0x01f6, 0x01f8,
  0x01fa, 0x01fa,
  0x01fc, 0x01fc,
  0x01fe, 0x01fe,
  0x0200, 0x0200,
  0x0202, 0x0202,
  0x0204, 0x0204,
  0x0206, 0x0206,
  0x0208, 0x0208,
  0x020a, 0x020a,
  0x020c, 0x020c,
  0x020e, 0x020e,
  0x0210, 0x0210,
  0x0212, 0x0212,
  0x0214, 0x0214,
  0x0216, 0x0216,
  0x0218, 0x0218,
  0x021a, 0x021a,
  0x021c, 0x021c,
  0x021e, 0x021e,
  0x0220, 0x0220,
  0x0222, 0x0222,
  0x0224, 0x0224,
  0x0226, 0x0226,
  0x0228, 0x0228,
  0x022a, 0x022a,
  0x022c, 0x022c,
  0x022e, 0x022e,
  0x0230, 0x0230,
  0x0232, 0x0232,
  0x0386, 0x0386,
  0x0388, 0x038a,
  0x038c, 0x038c,
  0x038e, 0x038f,
  0x0391, 0x03a1,
  0x03a3, 0x03ab,
  0x03d2, 0x03d4,
  0x03d8, 0x03d8,
  0x03da, 0x03da,
  0x03dc, 0x03dc,
  0x03de, 0x03de,
  0x03e0, 0x03e0,
  0x03e2, 0x03e2,
  0x03e4, 0x03e4,
  0x03e6, 0x03e6,
  0x03e8, 0x03e8,
  0x03ea, 0x03ea,
  0x03ec, 0x03ec,
  0x03ee, 0x03ee,
  0x03f4, 0x03f4,
  0x03f7, 0x03f7,
  0x03f9, 0x03fa,
  0x0400, 0x042f,
  0x0460, 0x0460,
  0x0462, 0x0462,
  0x0464, 0x0464,
  0x0466, 0x0466,
  0x0468, 0x0468,
  0x046a, 0x046a,
  0x046c, 0x046c,
  0x046e, 0x046e,
  0x0470, 0x0470,
  0x0472, 0x0472,
  0x0474, 0x0474,
  0x0476, 0x0476,
  0x0478, 0x0478,
  0x047a, 0x047a,
  0x047c, 0x047c,
  0x047e, 0x047e,
  0x0480, 0x0480,
  0x048a, 0x048a,
  0x048c, 0x048c,
  0x048e, 0x048e,
  0x0490, 0x0490,
  0x0492, 0x0492,
  0x0494, 0x0494,
  0x0496, 0x0496,
  0x0498, 0x0498,
  0x049a, 0x049a,
  0x049c, 0x049c,
  0x049e, 0x049e,
  0x04a0, 0x04a0,
  0x04a2, 0x04a2,
  0x04a4, 0x04a4,
  0x04a6, 0x04a6,
  0x04a8, 0x04a8,
  0x04aa, 0x04aa,
  0x04ac, 0x04ac,
  0x04ae, 0x04ae,
  0x04b0, 0x04b0,
  0x04b2, 0x04b2,
  0x04b4, 0x04b4,
  0x04b6, 0x04b6,
  0x04b8, 0x04b8,
  0x04ba, 0x04ba,
  0x04bc, 0x04bc,
  0x04be, 0x04be,
  0x04c0, 0x04c1,
  0x04c3, 0x04c3,
  0x04c5, 0x04c5,
  0x04c7, 0x04c7,
  0x04c9, 0x04c9,
  0x04cb, 0x04cb,
  0x04cd, 0x04cd,
  0x04d0, 0x04d0,
  0x04d2, 0x04d2,
  0x04d4, 0x04d4,
  0x04d6, 0x04d6,
  0x04d8, 0x04d8,
  0x04da, 0x04da,
  0x04dc, 0x04dc,
  0x04de, 0x04de,
  0x04e0, 0x04e0,
  0x04e2, 0x04e2,
  0x04e4, 0x04e4,
  0x04e6, 0x04e6,
  0x04e8, 0x04e8,
  0x04ea, 0x04ea,
  0x04ec, 0x04ec,
  0x04ee, 0x04ee,
  0x04f0, 0x04f0,
  0x04f2, 0x04f2,
  0x04f4, 0x04f4,
  0x04f8, 0x04f8,
  0x0500, 0x0500,
  0x0502, 0x0502,
  0x0504, 0x0504,
  0x0506, 0x0506,
  0x0508, 0x0508,
  0x050a, 0x050a,
  0x050c, 0x050c,
  0x050e, 0x050e,
  0x0531, 0x0556,
  0x10a0, 0x10c5,
  0x1e00, 0x1e00,
  0x1e02, 0x1e02,
  0x1e04, 0x1e04,
  0x1e06, 0x1e06,
  0x1e08, 0x1e08,
  0x1e0a, 0x1e0a,
  0x1e0c, 0x1e0c,
  0x1e0e, 0x1e0e,
  0x1e10, 0x1e10,
  0x1e12, 0x1e12,
  0x1e14, 0x1e14,
  0x1e16, 0x1e16,
  0x1e18, 0x1e18,
  0x1e1a, 0x1e1a,
  0x1e1c, 0x1e1c,
  0x1e1e, 0x1e1e,
  0x1e20, 0x1e20,
  0x1e22, 0x1e22,
  0x1e24, 0x1e24,
  0x1e26, 0x1e26,
  0x1e28, 0x1e28,
  0x1e2a, 0x1e2a,
  0x1e2c, 0x1e2c,
  0x1e2e, 0x1e2e,
  0x1e30, 0x1e30,
  0x1e32, 0x1e32,
  0x1e34, 0x1e34,
  0x1e36, 0x1e36,
  0x1e38, 0x1e38,
  0x1e3a, 0x1e3a,
  0x1e3c, 0x1e3c,
  0x1e3e, 0x1e3e,
  0x1e40, 0x1e40,
  0x1e42, 0x1e42,
  0x1e44, 0x1e44,
  0x1e46, 0x1e46,
  0x1e48, 0x1e48,
  0x1e4a, 0x1e4a,
  0x1e4c, 0x1e4c,
  0x1e4e, 0x1e4e,
  0x1e50, 0x1e50,
  0x1e52, 0x1e52,
  0x1e54, 0x1e54,
  0x1e56, 0x1e56,
  0x1e58, 0x1e58,
  0x1e5a, 0x1e5a,
  0x1e5c, 0x1e5c,
  0x1e5e, 0x1e5e,
  0x1e60, 0x1e60,
  0x1e62, 0x1e62,
  0x1e64, 0x1e64,
  0x1e66, 0x1e66,
  0x1e68, 0x1e68,
  0x1e6a, 0x1e6a,
  0x1e6c, 0x1e6c,
  0x1e6e, 0x1e6e,
  0x1e70, 0x1e70,
  0x1e72, 0x1e72,
  0x1e74, 0x1e74,
  0x1e76, 0x1e76,
  0x1e78, 0x1e78,
  0x1e7a, 0x1e7a,
  0x1e7c, 0x1e7c,
  0x1e7e, 0x1e7e,
  0x1e80, 0x1e80,
  0x1e82, 0x1e82,
  0x1e84, 0x1e84,
  0x1e86, 0x1e86,
  0x1e88, 0x1e88,
  0x1e8a, 0x1e8a,
  0x1e8c, 0x1e8c,
  0x1e8e, 0x1e8e,
  0x1e90, 0x1e90,
  0x1e92, 0x1e92,
  0x1e94, 0x1e94,
  0x1ea0, 0x1ea0,
  0x1ea2, 0x1ea2,
  0x1ea4, 0x1ea4,
  0x1ea6, 0x1ea6,
  0x1ea8, 0x1ea8,
  0x1eaa, 0x1eaa,
  0x1eac, 0x1eac,
  0x1eae, 0x1eae,
  0x1eb0, 0x1eb0,
  0x1eb2, 0x1eb2,
  0x1eb4, 0x1eb4,
  0x1eb6, 0x1eb6,
  0x1eb8, 0x1eb8,
  0x1eba, 0x1eba,
  0x1ebc, 0x1ebc,
  0x1ebe, 0x1ebe,
  0x1ec0, 0x1ec0,
  0x1ec2, 0x1ec2,
  0x1ec4, 0x1ec4,
  0x1ec6, 0x1ec6,
  0x1ec8, 0x1ec8,
  0x1eca, 0x1eca,
  0x1ecc, 0x1ecc,
  0x1ece, 0x1ece,
  0x1ed0, 0x1ed0,
  0x1ed2, 0x1ed2,
  0x1ed4, 0x1ed4,
  0x1ed6, 0x1ed6,
  0x1ed8, 0x1ed8,
  0x1eda, 0x1eda,
  0x1edc, 0x1edc,
  0x1ede, 0x1ede,
  0x1ee0, 0x1ee0,
  0x1ee2, 0x1ee2,
  0x1ee4, 0x1ee4,
  0x1ee6, 0x1ee6,
  0x1ee8, 0x1ee8,
  0x1eea, 0x1eea,
  0x1eec, 0x1eec,
  0x1eee, 0x1eee,
  0x1ef0, 0x1ef0,
  0x1ef2, 0x1ef2,
  0x1ef4, 0x1ef4,
  0x1ef6, 0x1ef6,
  0x1ef8, 0x1ef8,
  0x1f08, 0x1f0f,
  0x1f18, 0x1f1d,
  0x1f28, 0x1f2f,
  0x1f38, 0x1f3f,
  0x1f48, 0x1f4d,
  0x1f59, 0x1f59,
  0x1f5b, 0x1f5b,
  0x1f5d, 0x1f5d,
  0x1f5f, 0x1f5f,
  0x1f68, 0x1f6f,
  0x1fb8, 0x1fbb,
  0x1fc8, 0x1fcb,
  0x1fd8, 0x1fdb,
  0x1fe8, 0x1fec,
  0x1ff8, 0x1ffb,
  0x2102, 0x2102,
  0x2107, 0x2107,
  0x210b, 0x210d,
  0x2110, 0x2112,
  0x2115, 0x2115,
  0x2119, 0x211d,
  0x2124, 0x2124,
  0x2126, 0x2126,
  0x2128, 0x2128,
  0x212a, 0x212d,
  0x2130, 0x2131,
  0x2133, 0x2133,
  0x213e, 0x213f,
  0x2145, 0x2145,
  0xff21, 0xff3a,
  0x10400, 0x10427,
  0x1d400, 0x1d419,
  0x1d434, 0x1d44d,
  0x1d468, 0x1d481,
  0x1d49c, 0x1d49c,
  0x1d49e, 0x1d49f,
  0x1d4a2, 0x1d4a2,
  0x1d4a5, 0x1d4a6,
  0x1d4a9, 0x1d4ac,
  0x1d4ae, 0x1d4b5,
  0x1d4d0, 0x1d4e9,
  0x1d504, 0x1d505,
  0x1d507, 0x1d50a,
  0x1d50d, 0x1d514,
  0x1d516, 0x1d51c,
  0x1d538, 0x1d539,
  0x1d53b, 0x1d53e,
  0x1d540, 0x1d544,
  0x1d546, 0x1d546,
  0x1d54a, 0x1d550,
  0x1d56c, 0x1d585,
  0x1d5a0, 0x1d5b9,
  0x1d5d4, 0x1d5ed,
  0x1d608, 0x1d621,
  0x1d63c, 0x1d655,
  0x1d670, 0x1d689,
  0x1d6a8, 0x1d6c0,
  0x1d6e2, 0x1d6fa,
  0x1d71c, 0x1d734,
  0x1d756, 0x1d76e,
  0x1d790, 0x1d7a8
#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
}; /* end of MBUpper */

static OnigCodePoint SBXDigit[] = {
  3,
  0x0030, 0x0039,
  0x0041, 0x0046,
  0x0061, 0x0066
};

static OnigCodePoint SBASCII[] = {
  1,
  0x0000, 0x007f
};

static OnigCodePoint SBWord[] = {
  4,
  0x0030, 0x0039,
  0x0041, 0x005a,
  0x005f, 0x005f,
  0x0061, 0x007a
};

static OnigCodePoint MBWord[] = {
#ifdef USE_UNICODE_FULL_RANGE_CTYPE
  432,
#else
  8,
#endif
  0x00aa, 0x00aa,
  0x00b2, 0x00b3,
  0x00b5, 0x00b5,
  0x00b9, 0x00ba,
  0x00bc, 0x00be,
  0x00c0, 0x00d6,
  0x00d8, 0x00f6,
#ifndef USE_UNICODE_FULL_RANGE_CTYPE
  0x00f8, 0x7fffffff
#else /* not USE_UNICODE_FULL_RANGE_CTYPE */
  0x00f8, 0x0236,
  0x0250, 0x02c1,
  0x02c6, 0x02d1,
  0x02e0, 0x02e4,
  0x02ee, 0x02ee,
  0x0300, 0x0357,
  0x035d, 0x036f,
  0x037a, 0x037a,
  0x0386, 0x0386,
  0x0388, 0x038a,
  0x038c, 0x038c,
  0x038e, 0x03a1,
  0x03a3, 0x03ce,
  0x03d0, 0x03f5,
  0x03f7, 0x03fb,
  0x0400, 0x0481,
  0x0483, 0x0486,
  0x0488, 0x04ce,
  0x04d0, 0x04f5,
  0x04f8, 0x04f9,
  0x0500, 0x050f,
  0x0531, 0x0556,
  0x0559, 0x0559,
  0x0561, 0x0587,
  0x0591, 0x05a1,
  0x05a3, 0x05b9,
  0x05bb, 0x05bd,
  0x05bf, 0x05bf,
  0x05c1, 0x05c2,
  0x05c4, 0x05c4,
  0x05d0, 0x05ea,
  0x05f0, 0x05f2,
  0x0610, 0x0615,
  0x0621, 0x063a,
  0x0640, 0x0658,
  0x0660, 0x0669,
  0x066e, 0x06d3,
  0x06d5, 0x06dc,
  0x06de, 0x06e8,
  0x06ea, 0x06fc,
  0x06ff, 0x06ff,
  0x0710, 0x074a,
  0x074d, 0x074f,
  0x0780, 0x07b1,
  0x0901, 0x0939,
  0x093c, 0x094d,
  0x0950, 0x0954,
  0x0958, 0x0963,
  0x0966, 0x096f,
  0x0981, 0x0983,
  0x0985, 0x098c,
  0x098f, 0x0990,
  0x0993, 0x09a8,
  0x09aa, 0x09b0,
  0x09b2, 0x09b2,
  0x09b6, 0x09b9,
  0x09bc, 0x09c4,
  0x09c7, 0x09c8,
  0x09cb, 0x09cd,
  0x09d7, 0x09d7,
  0x09dc, 0x09dd,
  0x09df, 0x09e3,
  0x09e6, 0x09f1,
  0x09f4, 0x09f9,
  0x0a01, 0x0a03,
  0x0a05, 0x0a0a,
  0x0a0f, 0x0a10,
  0x0a13, 0x0a28,
  0x0a2a, 0x0a30,
  0x0a32, 0x0a33,
  0x0a35, 0x0a36,
  0x0a38, 0x0a39,
  0x0a3c, 0x0a3c,
  0x0a3e, 0x0a42,
  0x0a47, 0x0a48,
  0x0a4b, 0x0a4d,
  0x0a59, 0x0a5c,
  0x0a5e, 0x0a5e,
  0x0a66, 0x0a74,
  0x0a81, 0x0a83,
  0x0a85, 0x0a8d,
  0x0a8f, 0x0a91,
  0x0a93, 0x0aa8,
  0x0aaa, 0x0ab0,
  0x0ab2, 0x0ab3,
  0x0ab5, 0x0ab9,
  0x0abc, 0x0ac5,
  0x0ac7, 0x0ac9,
  0x0acb, 0x0acd,
  0x0ad0, 0x0ad0,
  0x0ae0, 0x0ae3,
  0x0ae6, 0x0aef,
  0x0b01, 0x0b03,
  0x0b05, 0x0b0c,
  0x0b0f, 0x0b10,
  0x0b13, 0x0b28,
  0x0b2a, 0x0b30,
  0x0b32, 0x0b33,
  0x0b35, 0x0b39,
  0x0b3c, 0x0b43,
  0x0b47, 0x0b48,
  0x0b4b, 0x0b4d,
  0x0b56, 0x0b57,
  0x0b5c, 0x0b5d,
  0x0b5f, 0x0b61,
  0x0b66, 0x0b6f,
  0x0b71, 0x0b71,
  0x0b82, 0x0b83,
  0x0b85, 0x0b8a,
  0x0b8e, 0x0b90,
  0x0b92, 0x0b95,
  0x0b99, 0x0b9a,
  0x0b9c, 0x0b9c,
  0x0b9e, 0x0b9f,
  0x0ba3, 0x0ba4,
  0x0ba8, 0x0baa,
  0x0bae, 0x0bb5,
  0x0bb7, 0x0bb9,
  0x0bbe, 0x0bc2,
  0x0bc6, 0x0bc8,
  0x0bca, 0x0bcd,
  0x0bd7, 0x0bd7,
  0x0be7, 0x0bf2,
  0x0c01, 0x0c03,
  0x0c05, 0x0c0c,
  0x0c0e, 0x0c10,
  0x0c12, 0x0c28,
  0x0c2a, 0x0c33,
  0x0c35, 0x0c39,
  0x0c3e, 0x0c44,
  0x0c46, 0x0c48,
  0x0c4a, 0x0c4d,
  0x0c55, 0x0c56,
  0x0c60, 0x0c61,
  0x0c66, 0x0c6f,
  0x0c82, 0x0c83,
  0x0c85, 0x0c8c,
  0x0c8e, 0x0c90,
  0x0c92, 0x0ca8,
  0x0caa, 0x0cb3,
  0x0cb5, 0x0cb9,
  0x0cbc, 0x0cc4,
  0x0cc6, 0x0cc8,
  0x0cca, 0x0ccd,
  0x0cd5, 0x0cd6,
  0x0cde, 0x0cde,
  0x0ce0, 0x0ce1,
  0x0ce6, 0x0cef,
  0x0d02, 0x0d03,
  0x0d05, 0x0d0c,
  0x0d0e, 0x0d10,
  0x0d12, 0x0d28,
  0x0d2a, 0x0d39,
  0x0d3e, 0x0d43,
  0x0d46, 0x0d48,
  0x0d4a, 0x0d4d,
  0x0d57, 0x0d57,
  0x0d60, 0x0d61,
  0x0d66, 0x0d6f,
  0x0d82, 0x0d83,
  0x0d85, 0x0d96,
  0x0d9a, 0x0db1,
  0x0db3, 0x0dbb,
  0x0dbd, 0x0dbd,
  0x0dc0, 0x0dc6,
  0x0dca, 0x0dca,
  0x0dcf, 0x0dd4,
  0x0dd6, 0x0dd6,
  0x0dd8, 0x0ddf,
  0x0df2, 0x0df3,
  0x0e01, 0x0e3a,
  0x0e40, 0x0e4e,
  0x0e50, 0x0e59,
  0x0e81, 0x0e82,
  0x0e84, 0x0e84,
  0x0e87, 0x0e88,
  0x0e8a, 0x0e8a,
  0x0e8d, 0x0e8d,
  0x0e94, 0x0e97,
  0x0e99, 0x0e9f,
  0x0ea1, 0x0ea3,
  0x0ea5, 0x0ea5,
  0x0ea7, 0x0ea7,
  0x0eaa, 0x0eab,
  0x0ead, 0x0eb9,
  0x0ebb, 0x0ebd,
  0x0ec0, 0x0ec4,
  0x0ec6, 0x0ec6,
  0x0ec8, 0x0ecd,
  0x0ed0, 0x0ed9,
  0x0edc, 0x0edd,
  0x0f00, 0x0f00,
  0x0f18, 0x0f19,
  0x0f20, 0x0f33,
  0x0f35, 0x0f35,
  0x0f37, 0x0f37,
  0x0f39, 0x0f39,
  0x0f3e, 0x0f47,
  0x0f49, 0x0f6a,
  0x0f71, 0x0f84,
  0x0f86, 0x0f8b,
  0x0f90, 0x0f97,
  0x0f99, 0x0fbc,
  0x0fc6, 0x0fc6,
  0x1000, 0x1021,
  0x1023, 0x1027,
  0x1029, 0x102a,
  0x102c, 0x1032,
  0x1036, 0x1039,
  0x1040, 0x1049,
  0x1050, 0x1059,
  0x10a0, 0x10c5,
  0x10d0, 0x10f8,
  0x1100, 0x1159,
  0x115f, 0x11a2,
  0x11a8, 0x11f9,
  0x1200, 0x1206,
  0x1208, 0x1246,
  0x1248, 0x1248,
  0x124a, 0x124d,
  0x1250, 0x1256,
  0x1258, 0x1258,
  0x125a, 0x125d,
  0x1260, 0x1286,
  0x1288, 0x1288,
  0x128a, 0x128d,
  0x1290, 0x12ae,
  0x12b0, 0x12b0,
  0x12b2, 0x12b5,
  0x12b8, 0x12be,
  0x12c0, 0x12c0,
  0x12c2, 0x12c5,
  0x12c8, 0x12ce,
  0x12d0, 0x12d6,
  0x12d8, 0x12ee,
  0x12f0, 0x130e,
  0x1310, 0x1310,
  0x1312, 0x1315,
  0x1318, 0x131e,
  0x1320, 0x1346,
  0x1348, 0x135a,
  0x1369, 0x137c,
  0x13a0, 0x13f4,
  0x1401, 0x166c,
  0x166f, 0x1676,
  0x1681, 0x169a,
  0x16a0, 0x16ea,
  0x16ee, 0x16f0,
  0x1700, 0x170c,
  0x170e, 0x1714,
  0x1720, 0x1734,
  0x1740, 0x1753,
  0x1760, 0x176c,
  0x176e, 0x1770,
  0x1772, 0x1773,
  0x1780, 0x17b3,
  0x17b6, 0x17d3,
  0x17d7, 0x17d7,
  0x17dc, 0x17dd,
  0x17e0, 0x17e9,
  0x17f0, 0x17f9,
  0x180b, 0x180d,
  0x1810, 0x1819,
  0x1820, 0x1877,
  0x1880, 0x18a9,
  0x1900, 0x191c,
  0x1920, 0x192b,
  0x1930, 0x193b,
  0x1946, 0x196d,
  0x1970, 0x1974,
  0x1d00, 0x1d6b,
  0x1e00, 0x1e9b,
  0x1ea0, 0x1ef9,
  0x1f00, 0x1f15,
  0x1f18, 0x1f1d,
  0x1f20, 0x1f45,
  0x1f48, 0x1f4d,
  0x1f50, 0x1f57,
  0x1f59, 0x1f59,
  0x1f5b, 0x1f5b,
  0x1f5d, 0x1f5d,
  0x1f5f, 0x1f7d,
  0x1f80, 0x1fb4,
  0x1fb6, 0x1fbc,
  0x1fbe, 0x1fbe,
  0x1fc2, 0x1fc4,
  0x1fc6, 0x1fcc,
  0x1fd0, 0x1fd3,
  0x1fd6, 0x1fdb,
  0x1fe0, 0x1fec,
  0x1ff2, 0x1ff4,
  0x1ff6, 0x1ffc,
  0x203f, 0x2040,
  0x2054, 0x2054,
  0x2070, 0x2071,
  0x2074, 0x2079,
  0x207f, 0x2089,
  0x20d0, 0x20ea,
  0x2102, 0x2102,
  0x2107, 0x2107,
  0x210a, 0x2113,
  0x2115, 0x2115,
  0x2119, 0x211d,
  0x2124, 0x2124,
  0x2126, 0x2126,
  0x2128, 0x2128,
  0x212a, 0x212d,
  0x212f, 0x2131,
  0x2133, 0x2139,
  0x213d, 0x213f,
  0x2145, 0x2149,
  0x2153, 0x2183,
  0x2460, 0x249b,
  0x24ea, 0x24ff,
  0x2776, 0x2793,
  0x3005, 0x3007,
  0x3021, 0x302f,
  0x3031, 0x3035,
  0x3038, 0x303c,
  0x3041, 0x3096,
  0x3099, 0x309a,
  0x309d, 0x309f,
  0x30a1, 0x30ff,
  0x3105, 0x312c,
  0x3131, 0x318e,
  0x3192, 0x3195,
  0x31a0, 0x31b7,
  0x31f0, 0x31ff,
  0x3220, 0x3229,
  0x3251, 0x325f,
  0x3280, 0x3289,
  0x32b1, 0x32bf,
  0x3400, 0x4db5,
  0x4e00, 0x9fa5,
  0xa000, 0xa48c,
  0xac00, 0xd7a3,
  0xf900, 0xfa2d,
  0xfa30, 0xfa6a,
  0xfb00, 0xfb06,
  0xfb13, 0xfb17,
  0xfb1d, 0xfb28,
  0xfb2a, 0xfb36,
  0xfb38, 0xfb3c,
  0xfb3e, 0xfb3e,
  0xfb40, 0xfb41,
  0xfb43, 0xfb44,
  0xfb46, 0xfbb1,
  0xfbd3, 0xfd3d,
  0xfd50, 0xfd8f,
  0xfd92, 0xfdc7,
  0xfdf0, 0xfdfb,
  0xfe00, 0xfe0f,
  0xfe20, 0xfe23,
  0xfe33, 0xfe34,
  0xfe4d, 0xfe4f,
  0xfe70, 0xfe74,
  0xfe76, 0xfefc,
  0xff10, 0xff19,
  0xff21, 0xff3a,
  0xff3f, 0xff3f,
  0xff41, 0xff5a,
  0xff65, 0xffbe,
  0xffc2, 0xffc7,
  0xffca, 0xffcf,
  0xffd2, 0xffd7,
  0xffda, 0xffdc,
  0x10000, 0x1000b,
  0x1000d, 0x10026,
  0x10028, 0x1003a,
  0x1003c, 0x1003d,
  0x1003f, 0x1004d,
  0x10050, 0x1005d,
  0x10080, 0x100fa,
  0x10107, 0x10133,
  0x10300, 0x1031e,
  0x10320, 0x10323,
  0x10330, 0x1034a,
  0x10380, 0x1039d,
  0x10400, 0x1049d,
  0x104a0, 0x104a9,
  0x10800, 0x10805,
  0x10808, 0x10808,
  0x1080a, 0x10835,
  0x10837, 0x10838,
  0x1083c, 0x1083c,
  0x1083f, 0x1083f,
  0x1d165, 0x1d169,
  0x1d16d, 0x1d172,
  0x1d17b, 0x1d182,
  0x1d185, 0x1d18b,
  0x1d1aa, 0x1d1ad,
  0x1d400, 0x1d454,
  0x1d456, 0x1d49c,
  0x1d49e, 0x1d49f,
  0x1d4a2, 0x1d4a2,
  0x1d4a5, 0x1d4a6,
  0x1d4a9, 0x1d4ac,
  0x1d4ae, 0x1d4b9,
  0x1d4bb, 0x1d4bb,
  0x1d4bd, 0x1d4c3,
  0x1d4c5, 0x1d505,
  0x1d507, 0x1d50a,
  0x1d50d, 0x1d514,
  0x1d516, 0x1d51c,
  0x1d51e, 0x1d539,
  0x1d53b, 0x1d53e,
  0x1d540, 0x1d544,
  0x1d546, 0x1d546,
  0x1d54a, 0x1d550,
  0x1d552, 0x1d6a3,
  0x1d6a8, 0x1d6c0,
  0x1d6c2, 0x1d6da,
  0x1d6dc, 0x1d6fa,
  0x1d6fc, 0x1d714,
  0x1d716, 0x1d734,
  0x1d736, 0x1d74e,
  0x1d750, 0x1d76e,
  0x1d770, 0x1d788,
  0x1d78a, 0x1d7a8,
  0x1d7aa, 0x1d7c2,
  0x1d7c4, 0x1d7c9,
  0x1d7ce, 0x1d7ff,
  0x20000, 0x2a6d6,
  0x2f800, 0x2fa1d,
  0xe0100, 0xe01ef
#endif /* USE_UNICODE_FULL_RANGE_CTYPE */
}; /* end of MBWord */

static int
utf8_get_ctype_code_range(int ctype,
                          OnigCodePoint* sbr[], OnigCodePoint* mbr[])
{
#define CR_SET(sbl,mbl) do { \
  *sbr = sbl; \
  *mbr = mbl; \
} while (0)

#define CR_SB_SET(sbl) do { \
  *sbr = sbl; \
  *mbr = EmptyRange; \
} while (0)

  switch (ctype) {
  case ONIGENC_CTYPE_ALPHA:
    CR_SET(SBAlpha, MBAlpha);
    break;
  case ONIGENC_CTYPE_BLANK:
    CR_SET(SBBlank, MBBlank);
    break;
  case ONIGENC_CTYPE_CNTRL:
    CR_SET(SBCntrl, MBCntrl);
    break;
  case ONIGENC_CTYPE_DIGIT:
    CR_SET(SBDigit, MBDigit);
    break;
  case ONIGENC_CTYPE_GRAPH:
    CR_SET(SBGraph, MBGraph);
    break;
  case ONIGENC_CTYPE_LOWER:
    CR_SET(SBLower, MBLower);
    break;
  case ONIGENC_CTYPE_PRINT:
    CR_SET(SBPrint, MBPrint);
    break;
  case ONIGENC_CTYPE_PUNCT:
    CR_SET(SBPunct, MBPunct);
    break;
  case ONIGENC_CTYPE_SPACE:
    CR_SET(SBSpace, MBSpace);
    break;
  case ONIGENC_CTYPE_UPPER:
    CR_SET(SBUpper, MBUpper);
    break;
  case ONIGENC_CTYPE_XDIGIT:
    CR_SB_SET(SBXDigit);
    break;
  case ONIGENC_CTYPE_WORD:
    CR_SET(SBWord, MBWord);
    break;
  case ONIGENC_CTYPE_ASCII:
    CR_SB_SET(SBASCII);
    break;
  case ONIGENC_CTYPE_ALNUM:
    CR_SET(SBAlnum, MBAlnum);
    break;

  default:
    return ONIGENCERR_TYPE_BUG;
    break;
  }

  return 0;
}

static int
utf8_is_code_ctype(OnigCodePoint code, unsigned int ctype)
{
#ifdef USE_UNICODE_FULL_RANGE_CTYPE
  OnigCodePoint *range;
#endif

  if (code < 256) {
    return ONIGENC_IS_UNICODE_ISO_8859_1_CTYPE(code, ctype);
  }

#ifdef USE_UNICODE_FULL_RANGE_CTYPE

  switch (ctype) {
  case ONIGENC_CTYPE_ALPHA:
    range = MBAlpha;
    break;
  case ONIGENC_CTYPE_BLANK:
    range = MBBlank;
    break;
  case ONIGENC_CTYPE_CNTRL:
    range = MBCntrl;
    break;
  case ONIGENC_CTYPE_DIGIT:
    range = MBDigit;
    break;
  case ONIGENC_CTYPE_GRAPH:
    range = MBGraph;
    break;
  case ONIGENC_CTYPE_LOWER:
    range = MBLower;
    break;
  case ONIGENC_CTYPE_PRINT:
    range = MBPrint;
    break;
  case ONIGENC_CTYPE_PUNCT:
    range = MBPunct;
    break;
  case ONIGENC_CTYPE_SPACE:
    range = MBSpace;
    break;
  case ONIGENC_CTYPE_UPPER:
    range = MBUpper;
    break;
  case ONIGENC_CTYPE_XDIGIT:
    return FALSE;
    break;
  case ONIGENC_CTYPE_WORD:
    range = MBWord;
    break;
  case ONIGENC_CTYPE_ASCII:
    return FALSE;
    break;
  case ONIGENC_CTYPE_ALNUM:
    range = MBAlnum;
    break;

  default:
    return ONIGENCERR_TYPE_BUG;
    break;
  }

  return onig_is_in_code_range((UChar* )range, code);

#else

  if ((ctype & ONIGENC_CTYPE_WORD) != 0) {
#ifdef USE_INVALID_CODE_SCHEME
    if (code <= VALID_CODE_LIMIT)
#endif
      return TRUE;
  }
#endif /* USE_UNICODE_FULL_RANGE_CTYPE */

  return FALSE;
}

static UChar*
utf8_left_adjust_char_head(const UChar* start, const UChar* s)
{
  const UChar *p;

  if (s <= start) return (UChar* )s;
  p = s;

  while (!utf8_islead(*p) && p > start) p--;
  return (UChar* )p;
}

OnigEncodingType OnigEncodingUTF8 = {
  utf8_mbc_enc_len,
  "UTF-8",     /* name */
  6,           /* max byte length */
  1,           /* min byte length */
  (ONIGENC_AMBIGUOUS_MATCH_ASCII_CASE |
   ONIGENC_AMBIGUOUS_MATCH_NONASCII_CASE |
   ONIGENC_AMBIGUOUS_MATCH_COMPOUND),
  {
      (OnigCodePoint )'\\'                       /* esc */
    , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar '.'  */
    , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anytime '*'  */
    , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* zero or one time '?' */
    , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* one or more time '+' */
    , (OnigCodePoint )ONIG_INEFFECTIVE_META_CHAR /* anychar anytime */
  },
  onigenc_is_mbc_newline_0x0a,
  utf8_mbc_to_code,
  utf8_code_to_mbclen,
  utf8_code_to_mbc,
  utf8_mbc_to_normalize,
  utf8_is_mbc_ambiguous,
  onigenc_iso_8859_1_get_all_pair_ambig_codes,
  onigenc_ess_tsett_get_all_comp_ambig_codes,
  utf8_is_code_ctype,
  utf8_get_ctype_code_range,
  utf8_left_adjust_char_head,
  onigenc_always_true_is_allowed_reverse_match
};
/* [<][>][^] [v] [top][bottom][index] [help] */


util.c

root/util.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. ruby_scan_oct
  2. ruby_scan_hex
  3. ruby_add_suffix
  4. valid_filename
  5. make_dbcs_table
  6. mblen
  7. push_element
  8. __crt0_glob_function
  9. mmswap_
  10. mmrot3_
  11. ruby_qsort
  12. ruby_strdup
  13. ruby_getcwd
  14. ruby_strtod
/**********************************************************************

  util.c -

  $Author: ocean $
  $Date: 2005/10/22 05:26:44 $
  created at: Fri Mar 10 17:22:34 JST 1995

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#include "ruby.h"

#include <ctype.h>
#include <stdio.h>
#include <errno.h>

#ifdef _WIN32
#include "missing/file.h"
#endif

#include "util.h"

unsigned long
ruby_scan_oct(const char *start, int len, int *retlen)
{
    register const char *s = start;
    register unsigned long retval = 0;

    while (len-- && *s >= '0' && *s <= '7') {
        retval <<= 3;
        retval |= *s++ - '0';
    }
    *retlen = s - start;
    return retval;
}

unsigned long
ruby_scan_hex(const char *start, int len, int *retlen)
{
    static char hexdigit[] = "0123456789abcdef0123456789ABCDEF";
    register const char *s = start;
    register unsigned long retval = 0;
    char *tmp;

    while (len-- && *s && (tmp = strchr(hexdigit, *s))) {
        retval <<= 4;
        retval |= (tmp - hexdigit) & 15;
        s++;
    }
    *retlen = s - start;
    return retval;
}

#include <sys/types.h>
#include <sys/stat.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#if defined(HAVE_FCNTL_H)
#include <fcntl.h>
#endif

#ifndef S_ISDIR
#   define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
#endif

#if defined(MSDOS) || defined(__CYGWIN32__) || defined(_WIN32)
/*
 *  Copyright (c) 1993, Intergraph Corporation
 *
 *  You may distribute under the terms of either the GNU General Public
 *  License or the Artistic License, as specified in the perl README file.
 *
 *  Various Unix compatibility functions and NT specific functions.
 *
 *  Some of this code was derived from the MSDOS port(s) and the OS/2 port.
 *
 */

/*
 * Suffix appending for in-place editing under MS-DOS and OS/2 (and now NT!).
 *
 * Here are the rules:
 *
 * Style 0:  Append the suffix exactly as standard perl would do it.
 *           If the filesystem groks it, use it.  (HPFS will always
 *           grok it.  So will NTFS. FAT will rarely accept it.)
 *
 * Style 1:  The suffix begins with a '.'.  The extension is replaced.
 *           If the name matches the original name, use the fallback method.
 *
 * Style 2:  The suffix is a single character, not a '.'.  Try to add the
 *           suffix to the following places, using the first one that works.
 *               [1] Append to extension.
 *               [2] Append to filename,
 *               [3] Replace end of extension,
 *               [4] Replace end of filename.
 *           If the name matches the original name, use the fallback method.
 *
 * Style 3:  Any other case:  Ignore the suffix completely and use the
 *           fallback method.
 *
 * Fallback method:  Change the extension to ".$$$".  If that matches the
 *           original name, then change the extension to ".~~~".
 *
 * If filename is more than 1000 characters long, we die a horrible
 * death.  Sorry.
 *
 * The filename restriction is a cheat so that we can use buf[] to store
 * assorted temporary goo.
 *
 * Examples, assuming style 0 failed.
 *
 * suffix = ".bak" (style 1)
 *                foo.bar => foo.bak
 *                foo.bak => foo.$$$    (fallback)
 *                foo.$$$ => foo.~~~    (fallback)
 *                makefile => makefile.bak
 *
 * suffix = "~" (style 2)
 *                foo.c => foo.c~
 *                foo.c~ => foo.c~~
 *                foo.c~~ => foo~.c~~
 *                foo~.c~~ => foo~~.c~~
 *                foo~~~~~.c~~ => foo~~~~~.$$$ (fallback)
 *
 *                foo.pas => foo~.pas
 *                makefile => makefile.~
 *                longname.fil => longname.fi~
 *                longname.fi~ => longnam~.fi~
 *                longnam~.fi~ => longnam~.$$$
 *
 */

static int valid_filename(const char *s);

static const char suffix1[] = ".$$$";
static const char suffix2[] = ".~~~";

#define ext (&buf[1000])

#define strEQ(s1,s2) (strcmp(s1,s2) == 0)

void
ruby_add_suffix(VALUE str, const char *suffix)
{
    int baselen;
    int extlen = strlen(suffix);
    char *s, *t, *p;
    long slen;
    char buf[1024];

    if (RSTRING(str)->len > 1000)
        rb_fatal("Cannot do inplace edit on long filename (%ld characters)",
                 RSTRING(str)->len);

#if defined(DJGPP) || defined(__CYGWIN32__) || defined(_WIN32)
    /* Style 0 */
    slen = RSTRING(str)->len;
    rb_str_cat(str, suffix, extlen);
#if defined(DJGPP)
    if (_USE_LFN) return;
#else
    if (valid_filename(RSTRING(str)->ptr)) return;
#endif

    /* Fooey, style 0 failed.  Fix str before continuing. */
    RSTRING(str)->ptr[RSTRING(str)->len = slen] = '\0';
#endif

    slen = extlen;
    t = buf; baselen = 0; s = RSTRING(str)->ptr;
    while ((*t = *s) && *s != '.') {
        baselen++;
        if (*s == '\\' || *s == '/') baselen = 0;
        s++; t++;
    }
    p = t;

    t = ext; extlen = 0;
    while (*t++ = *s++) extlen++;
    if (extlen == 0) { ext[0] = '.'; ext[1] = 0; extlen++; }

    if (*suffix == '.') {        /* Style 1 */
        if (strEQ(ext, suffix)) goto fallback;
        strcpy(p, suffix);
    }
    else if (suffix[1] == '\0') {  /* Style 2 */
        if (extlen < 4) {
            ext[extlen] = *suffix;
            ext[++extlen] = '\0';
        }
        else if (baselen < 8) {
            *p++ = *suffix;
        }
        else if (ext[3] != *suffix) {
            ext[3] = *suffix;
        }
        else if (buf[7] != *suffix) {
            buf[7] = *suffix;
        }
        else goto fallback;
        strcpy(p, ext);
    }
    else { /* Style 3:  Panic */
fallback:
        (void)memcpy(p, strEQ(ext, suffix1) ? suffix2 : suffix1, 5);
    }
    rb_str_resize(str, strlen(buf));
    memcpy(RSTRING(str)->ptr, buf, RSTRING(str)->len);
}

#if defined(__CYGWIN32__) || defined(_WIN32)
static int
valid_filename(const char *s)
{
    int fd;

    /*
    // if the file exists, then it's a valid filename!
    */

    if (_access(s, 0) == 0) {
        return 1;
    }

    /*
    // It doesn't exist, so see if we can open it.
    */

    if ((fd = _open(s, O_CREAT, 0666)) >= 0) {
        _close(fd);
        _unlink(s);     /* don't leave it laying around */
        return 1;
    }
    return 0;
}
#endif
#endif

#if defined __DJGPP__

#include <dpmi.h>

static char dbcs_table[256];

int
make_dbcs_table()
{
    __dpmi_regs r;
    struct {
        unsigned char start;
        unsigned char end;
    } vec;
    int offset;

    memset(&r, 0, sizeof(r));
    r.x.ax = 0x6300;
    __dpmi_int(0x21, &r);
    offset = r.x.ds * 16 + r.x.si;

    for (;;) {
        int i;
        dosmemget(offset, sizeof vec, &vec);
        if (!vec.start && !vec.end)
            break;
        for (i = vec.start; i <= vec.end; i++)
            dbcs_table[i] = 1;
        offset += 2;
    }
}

int
mblen(const char *s, size_t n)
{
    static int need_init = 1;
    if (need_init) {
        make_dbcs_table();
        need_init = 0;
    }
    if (s) {
        if (n == 0 || *s == 0)
            return 0;
        else if (!s[1])
            return 1;
        return dbcs_table[(unsigned char)*s] + 1;
    }
    else
        return 1;
}

struct PathList {
    struct PathList *next;
    char *path;
};

struct PathInfo {
    struct PathList *head;
    int count;
};

static void
push_element(const char *path, VALUE vinfo)
{
    struct PathList *p;
    struct PathInfo *info = (struct PathInfo *)vinfo;

    p = ALLOC(struct PathList);
    MEMZERO(p, struct PathList, 1);
    p->path = ruby_strdup(path);
    p->next = info->head;
    info->head = p;
    info->count++;
}

#include <dirent.h>
int __opendir_flags = __OPENDIR_PRESERVE_CASE;

char **
__crt0_glob_function(char *path)
{
    int len = strlen(path);
    int i;
    char **rv;
    char path_buffer[PATH_MAX];
    char *buf = path_buffer;
    char *p;
    struct PathInfo info;
    struct PathList *plist;

    if (PATH_MAX <= len)
        buf = ruby_xmalloc(len + 1);

    strncpy(buf, path, len);
    buf[len] = '\0';

    for (p = buf; *p; p += mblen(p, RUBY_MBCHAR_MAXSIZE))
        if (*p == '\\')
            *p = '/';

    info.count = 0;
    info.head = 0;

    rb_glob(buf, push_element, (VALUE)&info);

    if (buf != path_buffer)
        ruby_xfree(buf);

    if (info.count == 0)
        return 0;

    rv = ruby_xmalloc((info.count + 1) * sizeof (char *));

    plist = info.head;
    i = 0;
    while (plist) {
        struct PathList *cur;
        rv[i] = plist->path;
        cur = plist;
        plist = plist->next;
        ruby_xfree(cur);
        i++;
    }
    rv[i] = 0;
    return rv;
}

#endif

/* mm.c */

#define A ((int*)a)
#define B ((int*)b)
#define C ((int*)c)
#define D ((int*)d)

#define mmprepare(base, size) do {\
 if (((long)base & (0x3)) == 0)\
   if (size >= 16) mmkind = 1;\
   else            mmkind = 0;\
 else              mmkind = -1;\
 high = (size & (~0xf));\
 low  = (size &  0x0c);\
} while (0)\

#define mmarg mmkind, size, high, low

static void mmswap_(a, b, mmarg)
    register char *a, *b;
    int mmarg;
{
 register int s;
 if (a == b) return;
 if (mmkind >= 0) {
   if (mmkind > 0) {
     register char *t = a + high;
     do {
       s = A[0]; A[0] = B[0]; B[0] = s;
       s = A[1]; A[1] = B[1]; B[1] = s;
       s = A[2]; A[2] = B[2]; B[2] = s;
       s = A[3]; A[3] = B[3]; B[3] = s;  a += 16; b += 16;
     } while (a < t);
   }
   if (low != 0) { s = A[0]; A[0] = B[0]; B[0] = s;
     if (low >= 8) { s = A[1]; A[1] = B[1]; B[1] = s;
       if (low == 12) {s = A[2]; A[2] = B[2]; B[2] = s;}}}
 }
 else {
   register char *t = a + size;
   do {s = *a; *a++ = *b; *b++ = s;} while (a < t);
 }
}
#define mmswap(a,b) mmswap_((a),(b),mmarg)

static void mmrot3_(a, b, c, mmarg)
    register char *a, *b, *c;
    int mmarg;
{
 register int s;
 if (mmkind >= 0) {
   if (mmkind > 0) {
     register char *t = a + high;
     do {
       s = A[0]; A[0] = B[0]; B[0] = C[0]; C[0] = s;
       s = A[1]; A[1] = B[1]; B[1] = C[1]; C[1] = s;
       s = A[2]; A[2] = B[2]; B[2] = C[2]; C[2] = s;
       s = A[3]; A[3] = B[3]; B[3] = C[3]; C[3] = s; a += 16; b += 16; c += 16;
     } while (a < t);
   }
   if (low != 0) { s = A[0]; A[0] = B[0]; B[0] = C[0]; C[0] = s;
     if (low >= 8) { s = A[1]; A[1] = B[1]; B[1] = C[1]; C[1] = s;
       if (low == 12) {s = A[2]; A[2] = B[2]; B[2] = C[2]; C[2] = s;}}}
 }
 else {
   register char *t = a + size;
   do {s = *a; *a++ = *b; *b++ = *c; *c++ = s;} while (a < t);
 }
}
#define mmrot3(a,b,c) mmrot3_((a),(b),(c),mmarg)

/* qs6.c */
/*****************************************************/
/*                                                   */
/*          qs6   (Quick sort function)              */
/*                                                   */
/* by  Tomoyuki Kawamura              1995.4.21      */
/* kawamura@tokuyama.ac.jp                           */
/*****************************************************/

typedef struct { char *LL, *RR; } stack_node; /* Stack structure for L,l,R,r */
#define PUSH(ll,rr) do { top->LL = (ll); top->RR = (rr); ++top; } while (0)  /* Push L,l,R,r */
#define POP(ll,rr)  do { --top; ll = top->LL; rr = top->RR; } while (0)      /* Pop L,l,R,r */

#define med3(a,b,c) ((*cmp)(a,b,d)<0 ?                                   \
                       ((*cmp)(b,c,d)<0 ? b : ((*cmp)(a,c,d)<0 ? c : a)) : \
                       ((*cmp)(b,c,d)>0 ? b : ((*cmp)(a,c,d)<0 ? a : c)))

void
ruby_qsort(void* base, const int nel, const int size,
           int (*cmp)(const void*, const void*, void*), void *d)
{
  register char *l, *r, *m;             /* l,r:left,right group   m:median point */
  register int  t, eq_l, eq_r;          /* eq_l: all items in left group are equal to S */
  char *L = base;                       /* left end of curren region */
  char *R = (char*)base + size*(nel-1); /* right end of current region */
  int  chklim = 63;                     /* threshold of ordering element check */
  stack_node stack[32], *top = stack;   /* 32 is enough for 32bit CPU */
  int mmkind, high, low;

  if (nel <= 1) return;        /* need not to sort */
  mmprepare(base, size);
  goto start;

  nxt:
  if (stack == top) return;    /* return if stack is empty */
  POP(L,R);

  for (;;) {
    start:
    if (L + size == R) {       /* 2 elements */
      if ((*cmp)(L,R,d) > 0) mmswap(L,R); goto nxt;
    }

    l = L; r = R;
    t = (r - l + size) / size;  /* number of elements */
    m = l + size * (t >> 1);    /* calculate median value */

    if (t >= 60) {
      register char *m1;
      register char *m3;
      if (t >= 200) {
        t = size*(t>>3); /* number of bytes in splitting 8 */
        {
          register char *p1 = l  + t;
          register char *p2 = p1 + t;
          register char *p3 = p2 + t;
          m1 = med3(p1, p2, p3);
          p1 = m  + t;
          p2 = p1 + t;
          p3 = p2 + t;
          m3 = med3(p1, p2, p3);
        }
      }
      else {
        t = size*(t>>2); /* number of bytes in splitting 4 */
        m1 = l + t;
        m3 = m + t;
      }
      m = med3(m1, m, m3);
    }

    if ((t = (*cmp)(l,m,d)) < 0) {                           /*3-5-?*/
      if ((t = (*cmp)(m,r,d)) < 0) {                         /*3-5-7*/
        if (chklim && nel >= chklim) {   /* check if already ascending order */
          char *p;
          chklim = 0;
          for (p=l; p<r; p+=size) if ((*cmp)(p,p+size,d) > 0) goto fail;
          goto nxt;
        }
        fail: goto loopA;                                    /*3-5-7*/
      }
      if (t > 0) {
        if ((*cmp)(l,r,d) <= 0) {mmswap(m,r); goto loopA;}     /*3-5-4*/
        mmrot3(r,m,l); goto loopA;                           /*3-5-2*/
      }
      goto loopB;                                            /*3-5-5*/
    }

    if (t > 0) {                                             /*7-5-?*/
      if ((t = (*cmp)(m,r,d)) > 0) {                         /*7-5-3*/
        if (chklim && nel >= chklim) {   /* check if already ascending order */
          char *p;
          chklim = 0;
          for (p=l; p<r; p+=size) if ((*cmp)(p,p+size,d) < 0) goto fail2;
          while (l<r) {mmswap(l,r); l+=size; r-=size;}  /* reverse region */
          goto nxt;
        }
        fail2: mmswap(l,r); goto loopA;                      /*7-5-3*/
      }
      if (t < 0) {
        if ((*cmp)(l,r,d) <= 0) {mmswap(l,m); goto loopB;}   /*7-5-8*/
        mmrot3(l,m,r); goto loopA;                           /*7-5-6*/
      }
      mmswap(l,r); goto loopA;                               /*7-5-5*/
    }

    if ((t = (*cmp)(m,r,d)) < 0)  {goto loopA;}              /*5-5-7*/
    if (t > 0) {mmswap(l,r); goto loopB;}                    /*5-5-3*/

    /* determining splitting type in case 5-5-5 */           /*5-5-5*/
    for (;;) {
      if ((l += size) == r)      goto nxt;                   /*5-5-5*/
      if (l == m) continue;
      if ((t = (*cmp)(l,m,d)) > 0) {mmswap(l,r); l = L; goto loopA;}/*575-5*/
      if (t < 0)                 {mmswap(L,l); l = L; goto loopB;}  /*535-5*/
    }

    loopA: eq_l = 1; eq_r = 1;  /* splitting type A */ /* left <= median < right */
    for (;;) {
      for (;;) {
        if ((l += size) == r)
          {l -= size; if (l != m) mmswap(m,l); l -= size; goto fin;}
        if (l == m) continue;
        if ((t = (*cmp)(l,m,d)) > 0) {eq_r = 0; break;}
        if (t < 0) eq_l = 0;
      }
      for (;;) {
        if (l == (r -= size))
          {l -= size; if (l != m) mmswap(m,l); l -= size; goto fin;}
        if (r == m) {m = l; break;}
        if ((t = (*cmp)(r,m,d)) < 0) {eq_l = 0; break;}
        if (t == 0) break;
      }
      mmswap(l,r);    /* swap left and right */
    }

    loopB: eq_l = 1; eq_r = 1;  /* splitting type B */ /* left < median <= right */
    for (;;) {
      for (;;) {
        if (l == (r -= size))
          {r += size; if (r != m) mmswap(r,m); r += size; goto fin;}
        if (r == m) continue;
        if ((t = (*cmp)(r,m,d)) < 0) {eq_l = 0; break;}
        if (t > 0) eq_r = 0;
      }
      for (;;) {
        if ((l += size) == r)
          {r += size; if (r != m) mmswap(r,m); r += size; goto fin;}
        if (l == m) {m = r; break;}
        if ((t = (*cmp)(l,m,d)) > 0) {eq_r = 0; break;}
        if (t == 0) break;
      }
      mmswap(l,r);    /* swap left and right */
    }

    fin:
    if (eq_l == 0)                         /* need to sort left side */
      if (eq_r == 0)                       /* need to sort right side */
        if (l-L < R-r) {PUSH(r,R); R = l;} /* sort left side first */
        else           {PUSH(L,l); L = r;} /* sort right side first */
      else R = l;                          /* need to sort left side only */
    else if (eq_r == 0) L = r;             /* need to sort right side only */
    else goto nxt;                         /* need not to sort both sides */
  }
}

char *
ruby_strdup(const char *str)
{
    char *tmp;
    int len = strlen(str) + 1;

    tmp = xmalloc(len);
    memcpy(tmp, str, len);

    return tmp;
}

char *
ruby_getcwd(void)
{
#ifdef HAVE_GETCWD
    int size = 200;
    char *buf = xmalloc(size);

    while (!getcwd(buf, size)) {
        if (errno != ERANGE) {
            free(buf);
            rb_sys_fail("getcwd");
        }
        size *= 2;
        buf = xrealloc(buf, size);
    }
#else
# ifndef PATH_MAX
#  define PATH_MAX 8192
# endif
    char *buf = xmalloc(PATH_MAX+1);

    if (!getwd(buf)) {
        free(buf);
        rb_sys_fail("getwd");
    }
#endif
    return buf;
}

/* copyright notice for strtod implementation --
 *
 * Copyright (c) 1988-1993 The Regents of the University of California.
 * Copyright (c) 1994 Sun Microsystems, Inc.
 *
 * Permission to use, copy, modify, and distribute this
 * software and its documentation for any purpose and without
 * fee is hereby granted, provided that the above copyright
 * notice appear in all copies.  The University of California
 * makes no representations about the suitability of this
 * software for any purpose.  It is provided "as is" without
 * express or implied warranty.
 *
 */

#define TRUE 1
#define FALSE 0

static  int     MDMINEXPT       = -323;
static  int     MDMAXEXPT       =  309;
static double powersOf10[] = {  /* Table giving binary powers of 10.  Entry */
    10.0,                       /* is 10^2^i.  Used to convert decimal */
    100.0,                      /* exponents into floating-point numbers. */
    1.0e4,
    1.0e8,
    1.0e16,
    1.0e32,
    1.0e64,
    1.0e128,
    1.0e256
};

/*
 *----------------------------------------------------------------------
 *
 * strtod --
 *
 *      This procedure converts a floating-point number from an ASCII
 *      decimal representation to internal double-precision format.
 *
 * Results:
 *      The return value is the double-precision floating-point
 *      representation of the characters in string.  If endPtr isn't
 *      NULL, then *endPtr is filled in with the address of the
 *      next character after the last one that was part of the
 *      floating-point number.
 *
 * Side effects:
 *      None.
 *
 *----------------------------------------------------------------------
 */

double
ruby_strtod(
    const char *string,         /* A decimal ASCII floating-point number,
                                 * optionally preceded by white space.
                                 * Must have form "-I.FE-X", where I is the
                                 * integer part of the mantissa, F is the
                                 * fractional part of the mantissa, and X
                                 * is the exponent.  Either of the signs
                                 * may be "+", "-", or omitted.  Either I
                                 * or F may be omitted, but both cannot be
                                 * ommitted at once. The decimal
                                 * point isn't necessary unless F is present.
                                 * The "E" may actually be an "e".  E and X
                                 * may both be omitted (but not just one).
                                 */
    char **endPtr)              /* If non-NULL, store terminating character's
                                 * address here. */
{
    int sign, expSign = FALSE;
    double fraction, dblExp, *d;
    register const char *p;
    register int c;
    int exp = 0;                /* Exponent read from "EX" field. */
    int fracExp = 0;            /* Exponent that derives from the fractional
                                 * part.  Under normal circumstatnces, it is
                                 * the negative of the number of digits in F.
                                 * However, if I is very long, the last digits
                                 * of I get dropped (otherwise a long I with a
                                 * large negative exponent could cause an
                                 * unnecessary overflow on I alone).  In this
                                 * case, fracExp is incremented one for each
                                 * dropped digit. */
    int mantSize = 0;           /* Number of digits in mantissa. */
    int hasPoint = FALSE;       /* Decimal point exists. */
    int hasDigit = FALSE;       /* I or F exists. */
    const char *pMant;          /* Temporarily holds location of mantissa
                                 * in string. */
    const char *pExp;           /* Temporarily holds location of exponent
                                 * in string. */

    /*
     * Strip off leading blanks and check for a sign.
     */

    errno = 0;
    p = string;
    while (ISSPACE(*p)) {
        p += 1;
    }
    if (*p == '-') {
        sign = TRUE;
        p += 1;
    }
    else {
        if (*p == '+') {
            p += 1;
        }
        sign = FALSE;
    }

    /*
     * Count the number of digits in the mantissa
     * and also locate the decimal point.
     */

    for ( ; c = *p; p += 1) {
        if (!ISDIGIT(c)) {
            if (c != '.' || hasPoint) {
                break;
            }
            hasPoint = TRUE;
        }
        else {
            if (hasPoint) { /* already in fractional part */
                fracExp -= 1;
            }
            if (mantSize) { /* already in mantissa */
                mantSize += 1;
            }
            else if (c != '0') { /* have entered mantissa */
                mantSize += 1;
                pMant = p;
            }
            hasDigit = TRUE;
        }
    }

    /*
     * Now suck up the digits in the mantissa.  Use two integers to
     * collect 9 digits each (this is faster than using floating-point).
     * If the mantissa has more than 18 digits, ignore the extras, since
     * they can't affect the value anyway.
     */

    pExp  = p;
    if (mantSize) {
        p = pMant;
    }
    if (mantSize > 18) {
        fracExp += (mantSize - 18);
        mantSize = 18;
    }
    if (!hasDigit) {
        fraction = 0.0;
        p = string;
    }
    else {
        int frac1, frac2;
        frac1 = 0;
        for ( ; mantSize > 9; mantSize -= 1) {
            c = *p;
            p += 1;
            if (c == '.') {
                c = *p;
                p += 1;
            }
            frac1 = 10*frac1 + (c - '0');
        }
        frac2 = 0;
        for (; mantSize > 0; mantSize -= 1) {
            c = *p;
            p += 1;
            if (c == '.') {
                c = *p;
                p += 1;
            }
            frac2 = 10*frac2 + (c - '0');
        }

        /*
         * Skim off the exponent.
         */

        p = pExp;
        if ((*p == 'E') || (*p == 'e')) {
            p += 1;
            if (*p == '-') {
                expSign = TRUE;
                p += 1;
            }
            else {
                if (*p == '+') {
                    p += 1;
                }
                expSign = FALSE;
            }
            while (ISDIGIT(*p)) {
                exp = exp * 10 + (*p - '0');
                p += 1;
            }
        }
        if (expSign) {
            exp = fracExp - exp;
        }
        else {
            exp = fracExp + exp;
        }

        /*
         * Generate a floating-point number that represents the exponent.
         * Do this by processing the exponent one bit at a time to combine
         * many powers of 2 of 10. Then combine the exponent with the
         * fraction.
         */

        if (exp >= MDMAXEXPT - 18) {
            exp = MDMAXEXPT;
            errno = ERANGE;
        }
        else if (exp < MDMINEXPT + 18) {
            exp = MDMINEXPT;
            errno = ERANGE;
        }
        fracExp = exp;
        exp += 9;
        if (exp < 0) {
            expSign = TRUE;
            exp = -exp;
        }
        else {
            expSign = FALSE;
        }
        dblExp = 1.0;
        for (d = powersOf10; exp != 0; exp >>= 1, d += 1) {
            if (exp & 01) {
                dblExp *= *d;
            }
        }
        if (expSign) {
            fraction = frac1 / dblExp;
        }
        else {
            fraction = frac1 * dblExp;
        }
        exp = fracExp;
        if (exp < 0) {
            expSign = TRUE;
            exp = -exp;
        }
        else {
            expSign = FALSE;
        }
        dblExp = 1.0;
        for (d = powersOf10; exp != 0; exp >>= 1, d += 1) {
            if (exp & 01) {
                dblExp *= *d;
            }
        }
        if (expSign) {
            fraction += frac2 / dblExp;
        }
        else {
            fraction += frac2 * dblExp;
        }
    }

    if (endPtr != NULL) {
        *endPtr = (char *) p;
    }

    if (sign) {
        return -fraction;
    }
    return fraction;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


util.h

root/util.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/**********************************************************************

  util.h -

  $Author: matz $
  $Date: 2005/11/01 13:04:34 $
  created at: Thu Mar  9 11:55:53 JST 1995

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#ifndef UTIL_H
#define UTIL_H

#ifndef _
#ifdef __cplusplus
# ifndef  HAVE_PROTOTYPES
#  define HAVE_PROTOTYPES 1
# endif
# ifndef  HAVE_STDARG_PROTOTYPES
#  define HAVE_STDARG_PROTOTYPES 1
# endif
#endif
#ifdef HAVE_PROTOTYPES
# define _(args) args
#else
# define _(args) ()
#endif
#ifdef HAVE_STDARG_PROTOTYPES
# define __(args) args
#else
# define __(args) ()
#endif
#endif

#define scan_oct ruby_scan_oct
unsigned long ruby_scan_oct(const char*, int, int*);
#define scan_hex ruby_scan_hex
unsigned long ruby_scan_hex(const char*, int, int*);

#if defined(MSDOS) || defined(__CYGWIN32__) || defined(_WIN32)
void ruby_add_suffix(VALUE str, const char *suffix);
#endif

void ruby_qsort(void*, const int, const int, int (*)(const void*,const void*,void*), void*);

void ruby_setenv(const char*, const char*);
void ruby_unsetenv(const char*);
#undef setenv
#undef unsetenv
#define setenv(name,val) ruby_setenv(name,val)
#define unsetenv(name,val) ruby_unsetenv(name);

char *ruby_strdup(const char*);
#undef strdup
#define strdup(s) ruby_strdup(s)

char *ruby_getcwd(void);
#define my_getcwd() ruby_getcwd()

double ruby_strtod(const char*, char **);
#undef strtod
#define strtod(s,e) ruby_strtod(s,e)

#endif /* UTIL_H */
/* [<][>][^][v][top][bottom][index] [help] */


variable.c

root/variable.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. Init_var_tables
  2. fc_path
  3. fc_i
  4. find_class_path
  5. classname
  6. rb_mod_name
  7. rb_class_path
  8. rb_set_class_path
  9. rb_path2class
  10. rb_name_class
  11. rb_class_name
  12. rb_class2name
  13. rb_obj_classname
  14. rb_global_entry
  15. undef_getter
  16. undef_setter
  17. undef_marker
  18. val_getter
  19. val_setter
  20. val_marker
  21. var_getter
  22. var_setter
  23. var_marker
  24. readonly_setter
  25. mark_global_entry
  26. rb_gc_mark_global_tbl
  27. global_id
  28. rb_define_hooked_variable
  29. rb_define_variable
  30. rb_define_readonly_variable
  31. rb_define_virtual_variable
  32. rb_trace_eval
  33. rb_f_trace_var
  34. remove_trace
  35. rb_f_untrace_var
  36. rb_gvar_get
  37. trace_ev
  38. trace_en
  39. rb_gvar_set
  40. rb_gv_set
  41. rb_gv_get
  42. rb_gvar_defined
  43. gvar_i
  44. rb_f_global_variables
  45. rb_alias_variable
  46. rb_generic_ivar_table
  47. generic_ivar_get
  48. generic_ivar_set
  49. generic_ivar_defined
  50. generic_ivar_remove
  51. rb_mark_generic_ivar
  52. givar_mark_i
  53. givar_i
  54. rb_mark_generic_ivar_tbl
  55. rb_free_generic_ivar
  56. rb_copy_generic_ivar
  57. ivar_get
  58. rb_ivar_get
  59. rb_attr_get
  60. rb_ivar_set
  61. rb_ivar_defined
  62. ivar_i
  63. rb_obj_instance_variables
  64. rb_obj_remove_instance_variable
  65. uninitialized_constant
  66. const_missing
  67. rb_mod_const_missing
  68. check_autoload_table
  69. rb_autoload
  70. autoload_delete
  71. rb_autoload_load
  72. autoload_file
  73. rb_autoload_p
  74. rb_const_get_0
  75. rb_const_get_from
  76. rb_const_get
  77. rb_const_get_at
  78. rb_mod_remove_const
  79. sv_i
  80. rb_mod_const_at
  81. rb_mod_const_of
  82. list_i
  83. rb_const_list
  84. rb_mod_constants
  85. rb_const_defined_0
  86. rb_const_defined_from
  87. rb_const_defined
  88. rb_const_defined_at
  89. mod_av_set
  90. rb_const_set
  91. rb_define_const
  92. rb_define_global_const
  93. rb_cvar_set
  94. rb_cvar_get
  95. rb_cvar_defined
  96. rb_cv_set
  97. rb_cv_get
  98. rb_define_class_variable
  99. cv_i
  100. rb_mod_class_variables
  101. rb_mod_remove_cvar
  102. rb_iv_get
  103. rb_iv_set
/**********************************************************************

  variable.c -

  $Author: matz $
  $Date: 2005/12/12 00:35:08 $
  created at: Tue Apr 19 23:55:15 JST 1994

  Copyright (C) 1993-2003 Yukihiro Matsumoto
  Copyright (C) 2000  Network Applied Communication Laboratory, Inc.
  Copyright (C) 2000  Information-technology Promotion Agency, Japan

**********************************************************************/

#include "ruby.h"
#include "env.h"
#include "node.h"
#include "st.h"
#include "util.h"

static st_table *rb_global_tbl;
st_table *rb_class_tbl;
static ID autoload, classpath, tmp_classpath;

void
Init_var_tables(void)
{
    rb_global_tbl = st_init_numtable();
    rb_class_tbl = st_init_numtable();
    autoload = rb_intern("__autoload__");
    classpath = rb_intern("__classpath__");
    tmp_classpath = rb_intern("__tmp_classpath__");
}

struct fc_result {
    ID name;
    VALUE klass;
    VALUE path;
    VALUE track;
    struct fc_result *prev;
};

static VALUE
fc_path(struct fc_result *fc, ID name)
{
    VALUE path, tmp;

    path = rb_str_new2(rb_id2name(name));
    while (fc) {
        if (fc->track == rb_cObject) break;
        if (ROBJECT(fc->track)->iv_tbl &&
            st_lookup(ROBJECT(fc->track)->iv_tbl, classpath, &tmp)) {
            tmp = rb_str_dup(tmp);
            rb_str_cat2(tmp, "::");
            rb_str_append(tmp, path);

            return tmp;
        }
        tmp = rb_str_new2(rb_id2name(fc->name));
        rb_str_cat2(tmp, "::");
        rb_str_append(tmp, path);
        path = tmp;
        fc = fc->prev;
    }
    return path;
}

static int
fc_i(ID key, VALUE value, struct fc_result *res)
{
    if (!rb_is_const_id(key)) return ST_CONTINUE;

    if (value == res->klass) {
        res->path = fc_path(res, key);
        return ST_STOP;
    }
    switch (TYPE(value)) {
      case T_MODULE:
      case T_CLASS:
        if (!RCLASS(value)->iv_tbl) return ST_CONTINUE;
        else {
            struct fc_result arg;
            struct fc_result *list;

            list = res;
            while (list) {
                if (list->track == value) return ST_CONTINUE;
                list = list->prev;
            }

            arg.name = key;
            arg.path = 0;
            arg.klass = res->klass;
            arg.track = value;
            arg.prev = res;
            st_foreach(RCLASS(value)->iv_tbl, fc_i, (st_data_t)&arg);
            if (arg.path) {
                res->path = arg.path;
                return ST_STOP;
            }
        }
        break;

      default:
        break;
    }
    return ST_CONTINUE;
}

static VALUE
find_class_path(VALUE klass)
{
    struct fc_result arg;

    arg.name = 0;
    arg.path = 0;
    arg.klass = klass;
    arg.track = rb_cObject;
    arg.prev = 0;
    if (RCLASS(rb_cObject)->iv_tbl) {
        st_foreach_safe(RCLASS(rb_cObject)->iv_tbl, fc_i, (st_data_t)&arg);
    }
    if (arg.path == 0) {
        st_foreach_safe(rb_class_tbl, fc_i, (st_data_t)&arg);
    }
    if (arg.path) {
        if (!ROBJECT(klass)->iv_tbl) {
            ROBJECT(klass)->iv_tbl = st_init_numtable();
        }
        st_insert(ROBJECT(klass)->iv_tbl, classpath, arg.path);
        st_delete(RCLASS(klass)->iv_tbl, &tmp_classpath, 0);
        return arg.path;
    }
    return Qnil;
}

static VALUE
classname(VALUE klass)
{
    VALUE path = Qnil;

    if (!klass) klass = rb_cObject;
    if (ROBJECT(klass)->iv_tbl) {
        if (!st_lookup(ROBJECT(klass)->iv_tbl, classpath, &path)) {
            ID classid = rb_intern("__classid__");

            if (!st_lookup(ROBJECT(klass)->iv_tbl, classid, &path)) {
                return find_class_path(klass);
            }
            path = rb_str_new2(rb_id2name(SYM2ID(path)));
            st_insert(ROBJECT(klass)->iv_tbl, classpath, path);
            st_delete(RCLASS(klass)->iv_tbl, (st_data_t*)&classid, 0);
        }
        if (TYPE(path) != T_STRING) {
            rb_bug("class path is not set properly");
        }
        return path;
    }
    return find_class_path(klass);
}

/*
 *  call-seq:
 *     mod.name    => string
 *
 *  Returns the name of the module <i>mod</i>.
 */

VALUE
rb_mod_name(VALUE mod)
{
    VALUE path = classname(mod);

    if (!NIL_P(path)) return rb_str_dup(path);
    return rb_str_new(0,0);
}

VALUE
rb_class_path(VALUE klass)
{
    VALUE path = classname(klass);

    if (!NIL_P(path)) return path;
    if (RCLASS(klass)->iv_tbl && st_lookup(RCLASS(klass)->iv_tbl,
                                           tmp_classpath, &path)) {
        return path;
    }
    else {
        char *s = "Class";

        if (TYPE(klass) == T_MODULE) {
            if (rb_obj_class(klass) == rb_cModule) {
                s = "Module";
            }
            else {
                s = rb_class2name(RBASIC(klass)->klass);
            }
        }
        path = rb_sprintf("#<%s:%p>", s, klass);
        rb_ivar_set(klass, tmp_classpath, path);

        return path;
    }
}

void
rb_set_class_path(VALUE klass, VALUE under, const char *name)
{
    VALUE str;

    if (under == rb_cObject) {
        str = rb_str_new2(name);
    }
    else {
        str = rb_str_dup(rb_class_path(under));
        rb_str_cat2(str, "::");
        rb_str_cat2(str, name);
    }
    rb_ivar_set(klass, classpath, str);
}

VALUE
rb_path2class(const char *path)
{
    const char *pbeg, *p;
    ID id;
    VALUE c = rb_cObject;

    if (path[0] == '#') {
        rb_raise(rb_eArgError, "can't retrieve anonymous class %s", path);
    }
    pbeg = p = path;
    while (*p) {
        VALUE str;

        while (*p && *p != ':') p++;
        str = rb_str_new(pbeg, p-pbeg);
        id = rb_intern(RSTRING(str)->ptr);
        if (p[0] == ':') {
            if (p[1] != ':') goto undefined_class;
            p += 2;
            pbeg = p;
        }
        if (!rb_const_defined(c, id)) {
          undefined_class:
            rb_raise(rb_eArgError, "undefined class/module %.*s", p-path, path);
        }
        c = rb_const_get_at(c, id);
        switch (TYPE(c)) {
          case T_MODULE:
          case T_CLASS:
            break;
          default:
            rb_raise(rb_eTypeError, "%s does not refer class/module", path);
        }
    }

    return c;
}

void
rb_name_class(VALUE klass, ID id)
{
    rb_iv_set(klass, "__classid__", ID2SYM(id));
}

VALUE
rb_class_name(VALUE klass)
{
    return rb_class_path(rb_class_real(klass));
}

char *
rb_class2name(VALUE klass)
{
    return RSTRING(rb_class_name(klass))->ptr;
}

char *
rb_obj_classname(VALUE obj)
{
    return rb_class2name(CLASS_OF(obj));
}

struct trace_var {
    int removed;
    void (*func)();
    VALUE data;
    struct trace_var *next;
};

struct global_variable {
    int   counter;
    void *data;
    VALUE (*getter)();
    void  (*setter)();
    void  (*marker)();
    int block_trace;
    struct trace_var *trace;
};

struct global_entry {
    struct global_variable *var;
    ID id;
};

static VALUE undef_getter(ID id);
static void  undef_setter(VALUE val, ID id, void *data, struct global_variable *var);
static void  undef_marker(void);

static VALUE val_getter(ID id, VALUE val);
static void  val_setter(VALUE val, ID id, void *data, struct global_variable *var);
static void  val_marker(VALUE data);

static VALUE var_getter(ID id, VALUE *var);
static void  var_setter(VALUE val, ID id, VALUE *var);
static void  var_marker(VALUE *var);

struct global_entry*
rb_global_entry(ID id)
{
    struct global_entry *entry;

    if (!st_lookup(rb_global_tbl, id, (st_data_t *)&entry)) {
        struct global_variable *var;
        entry = ALLOC(struct global_entry);
        var = ALLOC(struct global_variable);
        entry->id = id;
        entry->var = var;
        var->counter = 1;
        var->data = 0;
        var->getter = undef_getter;
        var->setter = undef_setter;
        var->marker = undef_marker;

        var->block_trace = 0;
        var->trace = 0;
        st_add_direct(rb_global_tbl, id, (st_data_t)entry);
    }
    return entry;
}

static VALUE
undef_getter(ID id)
{
    rb_warning("global variable `%s' not initialized", rb_id2name(id));

    return Qnil;
}

static void
undef_setter(VALUE val, ID id, void *data, struct global_variable *var)
{
    var->getter = val_getter;
    var->setter = val_setter;
    var->marker = val_marker;

    var->data = (void*)val;
}

static void
undef_marker(void)
{
}

static VALUE
val_getter(ID id, VALUE val)
{
    return val;
}

static void
val_setter(VALUE val, ID id, void *data, struct global_variable *var)
{
    var->data = (void*)val;
}

static void
val_marker(VALUE data)
{
    if (data) rb_gc_mark_maybe(data);
}

static VALUE
var_getter(ID id, VALUE *var)
{
    if (!var) return Qnil;
    return *var;
}

static void
var_setter(VALUE val, ID id, VALUE *var)
{
    *var = val;
}

static void
var_marker(VALUE *var)
{
    if (var) rb_gc_mark_maybe(*var);
}

static void
readonly_setter(VALUE val, ID id, void *var)
{
    rb_name_error(id, "%s is a read-only variable", rb_id2name(id));
}

static int
mark_global_entry(ID key, struct global_entry *entry)
{
    struct trace_var *trace;
    struct global_variable *var = entry->var;

    (*var->marker)(var->data);
    trace = var->trace;
    while (trace) {
        if (trace->data) rb_gc_mark_maybe(trace->data);
        trace = trace->next;
    }
    return ST_CONTINUE;
}

void
rb_gc_mark_global_tbl(void)
{
    if (rb_global_tbl) {
        st_foreach(rb_global_tbl, mark_global_entry, 0);
    }
}

static ID
global_id(const char *name)
{
    ID id;

    if (name[0] == '$') id = rb_intern(name);
    else {
        char *buf = ALLOCA_N(char, strlen(name)+2);
        buf[0] = '$';
        strcpy(buf+1, name);
        id = rb_intern(buf);
    }
    return id;
}

void
rb_define_hooked_variable(
    const char *name,
    VALUE *var,
    VALUE (*getter)(ANYARGS),
    void  (*setter)(ANYARGS))
{
    struct global_variable *gvar;
    ID id = global_id(name);

    gvar = rb_global_entry(id)->var;
    gvar->data = (void*)var;
    gvar->getter = getter?getter:var_getter;
    gvar->setter = setter?setter:var_setter;
    gvar->marker = var_marker;
}

void
rb_define_variable(const char *name, VALUE *var)
{
    rb_define_hooked_variable(name, var, 0, 0);
}

void
rb_define_readonly_variable(const char *name, VALUE *var)
{
    rb_define_hooked_variable(name, var, 0, readonly_setter);
}

void
rb_define_virtual_variable(
    const char *name,
    VALUE (*getter)(ANYARGS),
    void  (*setter)(ANYARGS))
{
    if (!getter) getter = val_getter;
    if (!setter) setter = readonly_setter;
    rb_define_hooked_variable(name, 0, getter, setter);
}

static void
rb_trace_eval(VALUE cmd, VALUE val)
{
    rb_eval_cmd(cmd, rb_ary_new3(1, val), 0);
}

/*
 *  call-seq:
 *     trace_var(symbol, cmd )             => nil
 *     trace_var(symbol) {|val| block }    => nil
 *
 *  Controls tracing of assignments to global variables. The parameter
 *  +symbol_ identifies the variable (as either a string name or a
 *  symbol identifier). _cmd_ (which may be a string or a
 *  +Proc+ object) or block is executed whenever the variable
 *  is assigned. The block or +Proc+ object receives the
 *  variable's new value as a parameter. Also see
 *  <code>Kernel::untrace_var</code>.
 *
 *     trace_var :$_, proc {|v| puts "$_ is now '#{v}'" }
 *     $_ = "hello"
 *     $_ = ' there'
 *
 *  <em>produces:</em>
 *
 *     $_ is now 'hello'
 *     $_ is now ' there'
 */

VALUE
rb_f_trace_var(int argc, VALUE *argv)
{
    VALUE var, cmd;
    struct global_entry *entry;
    struct trace_var *trace;

    rb_secure(4);
    if (rb_scan_args(argc, argv, "11", &var, &cmd) == 1) {
        cmd = rb_block_proc();
    }
    if (NIL_P(cmd)) {
        return rb_f_untrace_var(argc, argv);
    }
    entry = rb_global_entry(rb_to_id(var));
    if (OBJ_TAINTED(cmd)) {
        rb_raise(rb_eSecurityError, "Insecure: tainted variable trace");
    }
    trace = ALLOC(struct trace_var);
    trace->next = entry->var->trace;
    trace->func = rb_trace_eval;
    trace->data = cmd;
    trace->removed = 0;
    entry->var->trace = trace;

    return Qnil;
}

static void
remove_trace(struct global_variable *var)
{
    struct trace_var *trace = var->trace;
    struct trace_var t;
    struct trace_var *next;

    t.next = trace;
    trace = &t;
    while (trace->next) {
        next = trace->next;
        if (next->removed) {
            trace->next = next->next;
            free(next);
        }
        else {
            trace = next;
        }
    }
    var->trace = t.next;
}

/*
 *  call-seq:
 *     untrace_var(symbol [, cmd] )   => array or nil
 *
 *  Removes tracing for the specified command on the given global
 *  variable and returns +nil+. If no command is specified,
 *  removes all tracing for that variable and returns an array
 *  containing the commands actually removed.
 */

VALUE
rb_f_untrace_var(int argc, VALUE *argv)
{
    VALUE var, cmd;
    ID id;
    struct global_entry *entry;
    struct trace_var *trace;

    rb_scan_args(argc, argv, "11", &var, &cmd);
    id = rb_to_id(var);
    if (!st_lookup(rb_global_tbl, id, (st_data_t *)&entry)) {
        rb_name_error(id, "undefined global variable %s", rb_id2name(id));
    }

    trace = entry->var->trace;
    if (NIL_P(cmd)) {
        VALUE ary = rb_ary_new();

        while (trace) {
            struct trace_var *next = trace->next;
            rb_ary_push(ary, (VALUE)trace->data);
            trace->removed = 1;
            trace = next;
        }

        if (!entry->var->block_trace) remove_trace(entry->var);
        return ary;
    }
    else {
        while (trace) {
            if (trace->data == cmd) {
                trace->removed = 1;
                if (!entry->var->block_trace) remove_trace(entry->var);
                return rb_ary_new3(1, cmd);
            }
            trace = trace->next;
        }
    }
    return Qnil;
}

VALUE
rb_gvar_get(struct global_entry *entry)
{
    struct global_variable *var = entry->var;
    return (*var->getter)(entry->id, var->data, var);
}

struct trace_data {
    struct trace_var *trace;
    VALUE val;
};

static VALUE
trace_ev(struct trace_data *data)
{
    struct trace_var *trace = data->trace;

    while (trace) {
        (*trace->func)(trace->data, data->val);
        trace = trace->next;
    }
    return Qnil;                /* not reached */
}

static VALUE
trace_en(struct global_variable *var)
{
    var->block_trace = 0;
    remove_trace(var);
    return Qnil;                /* not reached */
}

VALUE
rb_gvar_set(struct global_entry *entry, VALUE val)
{
    struct trace_data trace;
    struct global_variable *var = entry->var;

    if (rb_safe_level() >= 4)
        rb_raise(rb_eSecurityError, "Insecure: can't change global variable value");
    (*var->setter)(val, entry->id, var->data, var);

    if (var->trace && !var->block_trace) {
        var->block_trace = 1;
        trace.trace = var->trace;
        trace.val = val;
        rb_ensure(trace_ev, (VALUE)&trace, trace_en, (VALUE)var);
    }
    return val;
}

VALUE
rb_gv_set(const char *name, VALUE val)
{
    struct global_entry *entry;

    entry = rb_global_entry(global_id(name));
    return rb_gvar_set(entry, val);
}

VALUE
rb_gv_get(const char *name)
{
    struct global_entry *entry;

    entry = rb_global_entry(global_id(name));
    return rb_gvar_get(entry);
}

VALUE
rb_gvar_defined(struct global_entry *entry)
{
    if (entry->var->getter == undef_getter) return Qfalse;
    return Qtrue;
}

static int
gvar_i(ID key, struct global_entry *entry, VALUE ary)
{
    rb_ary_push(ary, rb_str_new2(rb_id2name(key)));
    return ST_CONTINUE;
}

/*
 *  call-seq:
 *     global_variables    => array
 *
 *  Returns an array of the names of global variables.
 *
 *     global_variables.grep /std/   #=> ["$stderr", "$stdout", "$stdin"]
 */

VALUE
rb_f_global_variables(void)
{
    VALUE ary = rb_ary_new();
    char buf[4];
    char *s = "&`'+123456789";

    st_foreach_safe(rb_global_tbl, gvar_i, ary);
    if (!NIL_P(rb_backref_get())) {
        while (*s) {
            sprintf(buf, "$%c", *s++);
            rb_ary_push(ary, rb_str_new2(buf));
        }
    }
    return ary;
}

void
rb_alias_variable(ID name1, ID name2)
{
    struct global_entry *entry1, *entry2;

    if (rb_safe_level() >= 4)
        rb_raise(rb_eSecurityError, "Insecure: can't alias global variable");

    entry2 = rb_global_entry(name2);
    if (!st_lookup(rb_global_tbl, name1, (st_data_t *)&entry1)) {
        entry1 = ALLOC(struct global_entry);
        entry1->id = name1;
        st_add_direct(rb_global_tbl, name1, (st_data_t)entry1);
    }
    else if (entry1->var != entry2->var) {
        struct global_variable *var = entry1->var;
        if (var->block_trace) {
            rb_raise(rb_eRuntimeError, "can't alias in tracer");
        }
        var->counter--;
        if (var->counter == 0) {
            struct trace_var *trace = var->trace;
            while (trace) {
                struct trace_var *next = trace->next;
                free(trace);
                trace = next;
            }
            free(var);
        }
    }
    else {
        return;
    }
    entry2->var->counter++;
    entry1->var = entry2->var;
}

static int special_generic_ivar = 0;
static st_table *generic_iv_tbl;

st_table*
rb_generic_ivar_table(VALUE obj)
{
    st_table *tbl;

    if (!FL_TEST(obj, FL_EXIVAR)) return 0;
    if (!generic_iv_tbl) return 0;
    if (!st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) return 0;
    return tbl;
}

static VALUE
generic_ivar_get(VALUE obj, ID id, int warn)
{
    st_table *tbl;
    VALUE val;

    if (generic_iv_tbl) {
      if (st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) {
        if (st_lookup(tbl, id, &val)) {
          return val;
        }
      }
    }
    if (warn) {
        rb_warning("instance variable %s not initialized", rb_id2name(id));
    }
    return Qnil;
}

static void
generic_ivar_set(VALUE obj, ID id, VALUE val)
{
    st_table *tbl;

    if (rb_special_const_p(obj)) {
        special_generic_ivar = 1;
    }
    if (!generic_iv_tbl) {
        generic_iv_tbl = st_init_numtable();
    }

    if (!st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) {
        FL_SET(obj, FL_EXIVAR);
        tbl = st_init_numtable();
        st_add_direct(generic_iv_tbl, obj, (st_data_t)tbl);
        st_add_direct(tbl, id, val);
        return;
    }
    st_insert(tbl, id, val);
}

static VALUE
generic_ivar_defined(VALUE obj, ID id)
{
    st_table *tbl;
    VALUE val;

    if (!generic_iv_tbl) return Qfalse;
    if (!st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) return Qfalse;
    if (st_lookup(tbl, id, &val)) {
        return Qtrue;
    }
    return Qfalse;
}

static int
generic_ivar_remove(VALUE obj, ID id, VALUE *valp)
{
    st_table *tbl;
    int status;

    if (!generic_iv_tbl) return 0;
    if (!st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) return 0;
    status = st_delete(tbl, &id, valp);
    if (tbl->num_entries == 0) {
        st_delete(generic_iv_tbl, &obj, (st_data_t *)&tbl);
        st_free_table(tbl);
    }
    return status;
}

void
rb_mark_generic_ivar(VALUE obj)
{
    st_table *tbl;

    if (!generic_iv_tbl) return;
    if (st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) {
        rb_mark_tbl(tbl);
    }
}

static int
givar_mark_i(ID key, VALUE value)
{
    rb_gc_mark(value);
    return ST_CONTINUE;
}

static int
givar_i(VALUE obj, st_table *tbl)
{
    if (rb_special_const_p(obj)) {
        st_foreach_safe(tbl, givar_mark_i, 0);
    }
    return ST_CONTINUE;
}

void
rb_mark_generic_ivar_tbl(void)
{
    if (!generic_iv_tbl) return;
    if (special_generic_ivar == 0) return;
    st_foreach_safe(generic_iv_tbl, givar_i, 0);
}

void
rb_free_generic_ivar(VALUE obj)
{
    st_table *tbl;

    if (!generic_iv_tbl) return;
    if (st_delete(generic_iv_tbl, &obj, (st_data_t *)&tbl))
        st_free_table(tbl);
}

void
rb_copy_generic_ivar(VALUE clone, VALUE obj)
{
    st_table *tbl;

    if (!generic_iv_tbl) return;
    if (!FL_TEST(obj, FL_EXIVAR)) return;
    if (st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) {
        st_table *old;

        if (st_lookup(generic_iv_tbl, clone, (st_data_t *)&old)) {
            st_free_table(old);
            st_insert(generic_iv_tbl, clone, (st_data_t)st_copy(tbl));
        }
        else {
            st_add_direct(generic_iv_tbl, clone, (st_data_t)st_copy(tbl));
            FL_SET(clone, FL_EXIVAR);
        }
    }
}

static VALUE
ivar_get(VALUE obj, ID id, int warn)
{
    VALUE val;

    switch (TYPE(obj)) {
      case T_OBJECT:
      case T_CLASS:
      case T_MODULE:
        if (ROBJECT(obj)->iv_tbl && st_lookup(ROBJECT(obj)->iv_tbl, id, &val))
            return val;
        break;
      default:
        if (FL_TEST(obj, FL_EXIVAR) || rb_special_const_p(obj))
            return generic_ivar_get(obj, id, warn);
        break;
    }
    if (warn) {
        rb_warning("instance variable %s not initialized", rb_id2name(id));
    }
    return Qnil;
}

VALUE
rb_ivar_get(VALUE obj, ID id)
{
    return ivar_get(obj, id, Qtrue);
}

VALUE
rb_attr_get(VALUE obj, ID id)
{
    return ivar_get(obj, id, Qfalse);
}

VALUE
rb_ivar_set(VALUE obj, ID id, VALUE val)
{
    if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4)
        rb_raise(rb_eSecurityError, "Insecure: can't modify instance variable");
    if (OBJ_FROZEN(obj)) rb_error_frozen("object");
    switch (TYPE(obj)) {
      case T_OBJECT:
      case T_CLASS:
      case T_MODULE:
        if (!ROBJECT(obj)->iv_tbl) ROBJECT(obj)->iv_tbl = st_init_numtable();
        st_insert(ROBJECT(obj)->iv_tbl, id, val);
        break;
      default:
        generic_ivar_set(obj, id, val);
        break;
    }
    return val;
}

VALUE
rb_ivar_defined(VALUE obj, ID id)
{
    switch (TYPE(obj)) {
      case T_OBJECT:
      case T_CLASS:
      case T_MODULE:
        if (ROBJECT(obj)->iv_tbl && st_lookup(ROBJECT(obj)->iv_tbl, id, 0))
            return Qtrue;
        break;
      default:
        if (FL_TEST(obj, FL_EXIVAR) || rb_special_const_p(obj))
            return generic_ivar_defined(obj, id);
        break;
    }
    return Qfalse;
}

static int
ivar_i(ID key, struct global_entry *entry, VALUE ary)
{
    if (rb_is_instance_id(key)) {
        rb_ary_push(ary, rb_str_new2(rb_id2name(key)));
    }
    return ST_CONTINUE;
}

/*
 *  call-seq:
 *     obj.instance_variables    => array
 *
 *  Returns an array of instance variable names for the receiver. Note
 *  that simply defining an accessor does not create the corresponding
 *  instance variable.
 *
 *     class Fred
 *       attr_accessor :a1
 *       def initialize
 *         @iv = 3
 *       end
 *     end
 *     Fred.new.instance_variables   #=> ["@iv"]
 */

VALUE
rb_obj_instance_variables(VALUE obj)
{
    VALUE ary;

    ary = rb_ary_new();
    switch (TYPE(obj)) {
      case T_OBJECT:
      case T_CLASS:
      case T_MODULE:
        if (ROBJECT(obj)->iv_tbl) {
            st_foreach_safe(ROBJECT(obj)->iv_tbl, ivar_i, ary);
        }
        break;
      default:
        if (!generic_iv_tbl) break;
        if (FL_TEST(obj, FL_EXIVAR) || rb_special_const_p(obj)) {
            st_table *tbl;

            if (st_lookup(generic_iv_tbl, obj, (st_data_t *)&tbl)) {
                st_foreach_safe(tbl, ivar_i, ary);
            }
        }
        break;
    }
    return ary;
}

/*
 *  call-seq:
 *     obj.remove_instance_variable(symbol)    => obj
 *
 *  Removes the named instance variable from <i>obj</i>, returning that
 *  variable's value.
 *
 *     class Dummy
 *       attr_reader :var
 *       def initialize
 *         @var = 99
 *       end
 *       def remove
 *         remove_instance_variable(:@var)
 *       end
 *     end
 *     d = Dummy.new
 *     d.var      #=> 99
 *     d.remove   #=> 99
 *     d.var      #=> nil
 */

VALUE
rb_obj_remove_instance_variable(VALUE obj, VALUE name)
{
    VALUE val = Qnil;
    ID id = rb_to_id(name);

    if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4)
        rb_raise(rb_eSecurityError, "Insecure: can't modify instance variable");
    if (OBJ_FROZEN(obj)) rb_error_frozen("object");
    if (!rb_is_instance_id(id)) {
        rb_name_error(id, "`%s' is not allowed as an instance variable name", rb_id2name(id));
    }

    switch (TYPE(obj)) {
      case T_OBJECT:
      case T_CLASS:
      case T_MODULE:
        if (ROBJECT(obj)->iv_tbl && st_delete(ROBJECT(obj)->iv_tbl, (st_data_t*)&id, &val)) {
            return val;
        }
        break;
      default:
        if (FL_TEST(obj, FL_EXIVAR) || rb_special_const_p(obj)) {
            if (generic_ivar_remove(obj, id, &val)) {
                return val;
            }
        }
        break;
    }
    rb_name_error(id, "instance variable %s not defined", rb_id2name(id));
    return Qnil;                /* not reached */
}

NORETURN(static void uninitialized_constant(VALUE, ID));
static void
uninitialized_constant(VALUE klass, ID id)
{
    if (klass && klass != rb_cObject)
        rb_name_error(id, "uninitialized constant %s::%s",
                      rb_class2name(klass),
                      rb_id2name(id));
    else {
        rb_name_error(id, "uninitialized constant %s", rb_id2name(id));
    }
}

static VALUE
const_missing(VALUE klass, ID id)
{
    return rb_funcall(klass, rb_intern("const_missing"), 1, ID2SYM(id));
}

/*
 * call-seq:
 *    mod.const_missing(sym)    => obj
 *
 *  Invoked when a reference is made to an undefined constant in
 *  <i>mod</i>. It is passed a symbol for the undefined constant, and
 *  returns a value to be used for that constant. The
 *  following code is a (very bad) example: if reference is made to
 *  an undefined constant, it attempts to load a file whose name is
 *  the lowercase version of the constant (thus class <code>Fred</code> is
 *  assumed to be in file <code>fred.rb</code>). If found, it returns the
 *  value of the loaded class. It therefore implements a perverse
 *  kind of autoload facility.
 *
 *    def Object.const_missing(name)
 *      @looked_for ||= {}
 *      str_name = name.to_s
 *      raise "Class not found: #{name}" if @looked_for[str_name]
 *      @looked_for[str_name] = 1
 *      file = str_name.downcase
 *      require file
 *      klass = const_get(name)
 *      return klass if klass
 *      raise "Class not found: #{name}"
 *    end
 *
 */

VALUE
rb_mod_const_missing(VALUE klass, VALUE name)
{
    ruby_frame = ruby_frame->prev; /* pop frame for "const_missing" */
    uninitialized_constant(klass, rb_to_id(name));
    return Qnil;                /* not reached */
}

static struct st_table *
check_autoload_table(VALUE av)
{
    Check_Type(av, T_DATA);
    if (RDATA(av)->dmark != (RUBY_DATA_FUNC)rb_mark_tbl ||
        RDATA(av)->dfree != (RUBY_DATA_FUNC)st_free_table) {
        rb_raise(rb_eTypeError, "wrong autoload table: %s", RSTRING(rb_inspect(av))->ptr);
    }
    return (struct st_table *)DATA_PTR(av);
}

void
rb_autoload(VALUE mod, ID id, const char *file)
{
    VALUE av, fn;
    struct st_table *tbl;

    if (!rb_is_const_id(id)) {
        rb_raise(rb_eNameError, "autoload must be constant name: %s", rb_id2name(id));
    }
    if (!file || !*file) {
        rb_raise(rb_eArgError, "empty file name");
    }

    if ((tbl = RCLASS(mod)->iv_tbl) && st_lookup(tbl, id, &av) && av != Qundef)
        return;

    rb_const_set(mod, id, Qundef);
    tbl = RCLASS(mod)->iv_tbl;
    if (st_lookup(tbl, autoload, &av)) {
        tbl = check_autoload_table(av);
    }
    else {
        av = Data_Wrap_Struct(0, rb_mark_tbl, st_free_table, 0);
        st_add_direct(tbl, autoload, av);
        DATA_PTR(av) = tbl = st_init_numtable();
    }
    fn = rb_str_new2(file);
    FL_UNSET(fn, FL_TAINT);
    OBJ_FREEZE(fn);
    st_insert(tbl, id, (st_data_t)rb_node_newnode(NODE_MEMO, fn, ruby_safe_level, 0));
}

static NODE*
autoload_delete(VALUE mod, ID id)
{
    VALUE val;
    st_data_t load = 0;

    st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, 0);
    if (st_lookup(RCLASS(mod)->iv_tbl, autoload, &val)) {
        struct st_table *tbl = check_autoload_table(val);

        st_delete(tbl, (st_data_t*)&id, &load);

        if (tbl->num_entries == 0) {
            DATA_PTR(val) = 0;
            st_free_table(tbl);
            id = autoload;
            if (st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, &val)) {
                rb_gc_force_recycle(val);
            }
        }
    }

    return (NODE *)load;
}

VALUE
rb_autoload_load(VALUE klass, ID id)
{
    VALUE file;
    NODE *load = autoload_delete(klass, id);

    if (!load || !(file = load->nd_lit) || rb_provided(RSTRING(file)->ptr)) {
        return Qfalse;
    }
    return rb_require_safe(file, load->nd_nth);
}

static VALUE
autoload_file(VALUE mod, ID id)
{
    VALUE val, file;
    struct st_table *tbl;
    st_data_t load;

    if (!st_lookup(RCLASS(mod)->iv_tbl, autoload, &val) ||
        !(tbl = check_autoload_table(val)) || !st_lookup(tbl, id, &load)) {
        return Qnil;
    }
    file = ((NODE *)load)->nd_lit;
    Check_Type(file, T_STRING);
    if (!RSTRING(file)->ptr) {
        rb_raise(rb_eArgError, "empty file name");
    }
    if (!rb_provided(RSTRING(file)->ptr)) {
        return file;
    }

    /* already loaded but not defined */
    st_delete(tbl, (st_data_t*)&id, 0);
    if (!tbl->num_entries) {
        DATA_PTR(val) = 0;
        st_free_table(tbl);
        id = autoload;
        if (st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, &val)) {
            rb_gc_force_recycle(val);
        }
    }
    return Qnil;
}

VALUE
rb_autoload_p(VALUE mod, ID id)
{
    struct st_table *tbl = RCLASS(mod)->iv_tbl;
    VALUE val;

    if (!tbl || !st_lookup(tbl, id, &val) || val != Qundef) {
        return Qnil;
    }
    return autoload_file(mod, id);
}

static VALUE
rb_const_get_0(VALUE klass, ID id, int exclude, int recurse)
{
    VALUE value, tmp;
    int mod_retry = 0;

    tmp = klass;
  retry:
    while (tmp) {
        while (RCLASS(tmp)->iv_tbl && st_lookup(RCLASS(tmp)->iv_tbl,id,&value)) {
            if (value == Qundef) {
                if (!RTEST(rb_autoload_load(tmp, id))) break;
                continue;
            }
            if (exclude && tmp == rb_cObject && klass != rb_cObject) {
                rb_warn("toplevel constant %s referenced by %s::%s",
                        rb_id2name(id), rb_class2name(klass), rb_id2name(id));
            }
            return value;
        }
        if (!recurse && klass != rb_cObject) break;
        tmp = RCLASS(tmp)->super;
    }
    if (!exclude && !mod_retry && BUILTIN_TYPE(klass) == T_MODULE) {
        mod_retry = 1;
        tmp = rb_cObject;
        goto retry;
    }

    return const_missing(klass, id);
}

VALUE
rb_const_get_from(VALUE klass, ID id)
{
    return rb_const_get_0(klass, id, Qtrue, Qtrue);
}

VALUE
rb_const_get(VALUE klass, ID id)
{
    return rb_const_get_0(klass, id, Qfalse, Qtrue);
}

VALUE
rb_const_get_at(VALUE klass, ID id)
{
    return rb_const_get_0(klass, id, Qtrue, Qfalse);
}

/*
 *  call-seq:
 *     remove_const(sym)   => obj
 *
 *  Removes the definition of the given constant, returning that
 *  constant's value. Predefined classes and singleton objects (such as
 *  <i>true</i>) cannot be removed.
 */

VALUE
rb_mod_remove_const(VALUE mod, VALUE name)
{
    ID id = rb_to_id(name);
    VALUE val;

    if (!rb_is_const_id(id)) {
        rb_name_error(id, "`%s' is not allowed as a constant name", rb_id2name(id));
    }
    if (!OBJ_TAINTED(mod) && rb_safe_level() >= 4)
        rb_raise(rb_eSecurityError, "Insecure: can't remove constant");
    if (OBJ_FROZEN(mod)) rb_error_frozen("class/module");

    if (RCLASS(mod)->iv_tbl && st_delete(ROBJECT(mod)->iv_tbl, (st_data_t*)&id, &val)) {
        if (val == Qundef) {
            autoload_delete(mod, id);
            val = Qnil;
        }
        return val;
    }
    if (rb_const_defined_at(mod, id)) {
        rb_name_error(id, "cannot remove %s::%s",
                 rb_class2name(mod), rb_id2name(id));
    }
    rb_name_error(id, "constant %s::%s not defined",
                  rb_class2name(mod), rb_id2name(id));
    return Qnil;                /* not reached */
}

static int
sv_i(ID key, VALUE value, st_table *tbl)
{
    if (rb_is_const_id(key)) {
        if (!st_lookup(tbl, key, 0)) {
            st_insert(tbl, key, key);
        }
    }
    return ST_CONTINUE;
}

void*
rb_mod_const_at(VALUE mod, void *data)
{
    st_table *tbl = data;
    if (!tbl) {
        tbl = st_init_numtable();
    }
    if (RCLASS(mod)->iv_tbl) {
        st_foreach_safe(RCLASS(mod)->iv_tbl, sv_i, (st_data_t)tbl);
    }
    return tbl;
}

void*
rb_mod_const_of(VALUE mod, void *data)
{
    VALUE tmp = mod;
    for (;;) {
        data = rb_mod_const_at(tmp, data);
        tmp = RCLASS(tmp)->super;
        if (!tmp) break;
        if (tmp == rb_cObject && mod != rb_cObject) break;
    }
    return data;
}

static int
list_i(ID key, ID value, VALUE ary)
{
    rb_ary_push(ary, rb_str_new2(rb_id2name(key)));
    return ST_CONTINUE;
}

VALUE
rb_const_list(void *data)
{
    st_table *tbl = data;
    VALUE ary;

    if (!tbl) return rb_ary_new2(0);
    ary = rb_ary_new2(tbl->num_entries);
    st_foreach_safe(tbl, list_i, ary);
    st_free_table(tbl);

    return ary;
}

/*
 *  call-seq:
 *     mod.constants    => array
 *
 *  Returns an array of the names of the constants accessible in
 *  <i>mod</i>. This includes the names of constants in any included
 *  modules (example at start of section).
 */

VALUE
rb_mod_constants(VALUE mod)
{
    return rb_const_list(rb_mod_const_of(mod, 0));
}

static int
rb_const_defined_0(VALUE klass, ID id, int exclude, int recurse)
{
    VALUE value, tmp;
    int mod_retry = 0;

    tmp = klass;
  retry:
    while (tmp) {
        if (RCLASS(tmp)->iv_tbl && st_lookup(RCLASS(tmp)->iv_tbl, id, &value)) {
            if (value == Qundef && NIL_P(autoload_file(klass, id)))
                return Qfalse;
            return Qtrue;
        }
        if (!recurse && klass != rb_cObject) break;
        tmp = RCLASS(tmp)->super;
    }
    if (!exclude && !mod_retry && BUILTIN_TYPE(klass) == T_MODULE) {
        mod_retry = 1;
        tmp = rb_cObject;
        goto retry;
    }
    return Qfalse;
}

int
rb_const_defined_from(VALUE klass, ID id)
{
    return rb_const_defined_0(klass, id, Qtrue, Qtrue);
}

int
rb_const_defined(VALUE klass, ID id)
{
    return rb_const_defined_0(klass, id, Qfalse, Qtrue);
}

int
rb_const_defined_at(VALUE klass, ID id)
{
    return rb_const_defined_0(klass, id, Qtrue, Qfalse);
}

static void
mod_av_set(VALUE klass, ID id, VALUE val, int isconst)
{
    char *dest = isconst ? "constant" : "class variable";

    if (!OBJ_TAINTED(klass) && rb_safe_level() >= 4)
        rb_raise(rb_eSecurityError, "Insecure: can't set %s", dest);
    if (OBJ_FROZEN(klass)) {
        if (BUILTIN_TYPE(klass) == T_MODULE) {
            rb_error_frozen("module");
        }
        else {
            rb_error_frozen("class");
        }
    }
    if (!RCLASS(klass)->iv_tbl) {
        RCLASS(klass)->iv_tbl = st_init_numtable();
    }
    else if (isconst) {
        VALUE value = Qfalse;

        if (st_lookup(RCLASS(klass)->iv_tbl, id, &value)) {
            if (value == Qundef)
                autoload_delete(klass, id);
            else
                rb_warn("already initialized %s %s", dest, rb_id2name(id));
        }
    }

    st_insert(RCLASS(klass)->iv_tbl, id, val);
}

void
rb_const_set(VALUE klass, ID id, VALUE val)
{
    mod_av_set(klass, id, val, Qtrue);
}

void
rb_define_const(VALUE klass, const char *name, VALUE val)
{
    ID id = rb_intern(name);

    if (!rb_is_const_id(id)) {
        rb_warn("rb_define_const: invalide name `%s' for constant", name);
    }
    if (klass == rb_cObject) {
        rb_secure(4);
    }
    rb_const_set(klass, id, val);
}

void
rb_define_global_const(const char *name, VALUE val)
{
    rb_define_const(rb_cObject, name, val);
}

void
rb_cvar_set(VALUE klass, ID id, VALUE val, int warn)
{
    mod_av_set(klass, id, val, Qfalse);
}

VALUE
rb_cvar_get(VALUE klass, ID id)
{
    VALUE value;

    if (RCLASS(klass)->iv_tbl && st_lookup(RCLASS(klass)->iv_tbl,id,&value)) {
        return value;
    }

    rb_name_error(id,"uninitialized class variable %s in %s",
                  rb_id2name(id), rb_class2name(klass));
    return Qnil;                /* not reached */
}

VALUE
rb_cvar_defined(VALUE klass, ID id)
{
    if (RCLASS(klass)->iv_tbl && st_lookup(RCLASS(klass)->iv_tbl,id,0)) {
        return Qtrue;
    }
    return Qfalse;
}

void
rb_cv_set(VALUE klass, const char *name, VALUE val)
{
    ID id = rb_intern(name);
    if (!rb_is_class_id(id)) {
        rb_name_error(id, "wrong class variable name %s", name);
    }
    rb_cvar_set(klass, id, val, Qfalse);
}

VALUE
rb_cv_get(VALUE klass, const char *name)
{
    ID id = rb_intern(name);
    if (!rb_is_class_id(id)) {
        rb_name_error(id, "wrong class variable name %s", name);
    }
    return rb_cvar_get(klass, id);
}

void
rb_define_class_variable(VALUE klass, const char *name, VALUE val)
{
    ID id = rb_intern(name);

    if (!rb_is_class_id(id)) {
        rb_name_error(id, "wrong class variable name %s", name);
    }
    rb_cvar_set(klass, id, val, Qtrue);
}

static int
cv_i(ID key, VALUE value, VALUE ary)
{
    if (rb_is_class_id(key)) {
        VALUE kval = rb_str_new2(rb_id2name(key));
        if (!rb_ary_includes(ary, kval)) {
            rb_ary_push(ary, kval);
        }
    }
    return ST_CONTINUE;
}

/*
 *  call-seq:
 *     mod.class_variables   => array
 *
 *  Returns an array of the names of class variables in <i>mod</i>.
 *
 *     class One
 *       @@var1 = 1
 *     end
 *     class Two < One
 *       @@var2 = 2
 *     end
 *     One.class_variables   #=> ["@@var1"]
 *     Two.class_variables   #=> ["@@var2"]
 */

VALUE
rb_mod_class_variables(VALUE obj)
{
    VALUE ary = rb_ary_new();

    if (RCLASS(obj)->iv_tbl) {
        st_foreach_safe(RCLASS(obj)->iv_tbl, cv_i, ary);
    }
    return ary;
}

/*
 *  call-seq:
 *     remove_class_variable(sym)    => obj
 *
 *  Removes the definition of the <i>sym</i>, returning that
 *  constant's value.
 *
 *     class Dummy
 *       @@var = 99
 *       puts @@var
 *       remove_class_variable(:@@var)
 *       puts(defined? @@var)
 *     end
 *
 *  <em>produces:</em>
 *
 *     99
 *     nil
 */

VALUE
rb_mod_remove_cvar(VALUE mod, VALUE name)
{
    ID id = rb_to_id(name);
    VALUE val;

    if (!rb_is_class_id(id)) {
        rb_name_error(id, "wrong class variable name %s", rb_id2name(id));
    }
    if (!OBJ_TAINTED(mod) && rb_safe_level() >= 4)
        rb_raise(rb_eSecurityError, "Insecure: can't remove class variable");
    if (OBJ_FROZEN(mod)) rb_error_frozen("class/module");

    if (RCLASS(mod)->iv_tbl && st_delete(ROBJECT(mod)->iv_tbl, (st_data_t*)&id, &val)) {
        return val;
    }
    if (rb_cvar_defined(mod, id)) {
        rb_name_error(id, "cannot remove %s for %s",
                 rb_id2name(id), rb_class2name(mod));
    }
    rb_name_error(id, "class variable %s not defined for %s",
                  rb_id2name(id), rb_class2name(mod));
    return Qnil;                /* not reached */
}

VALUE
rb_iv_get(VALUE obj, const char *name)
{
    ID id = rb_intern(name);

    return rb_ivar_get(obj, id);
}

VALUE
rb_iv_set(VALUE obj, const char *name, VALUE val)
{
    ID id = rb_intern(name);

    return rb_ivar_set(obj, id, val);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


version.c

root/version.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. Init_version
  2. ruby_show_version
  3. ruby_show_copyright
/**********************************************************************

  version.c -

  $Author: ocean $
  $Date: 2005/09/12 10:44:21 $
  created at: Thu Sep 30 20:08:01 JST 1993

  Copyright (C) 1993-2003 Yukihiro Matsumoto

**********************************************************************/

#include "ruby.h"
#include "version.h"
#include <stdio.h>

const char ruby_version[] = RUBY_VERSION;
const char ruby_release_date[] = RUBY_RELEASE_DATE;
const char ruby_platform[] = RUBY_PLATFORM;

void
Init_version(void)
{
    VALUE v = rb_obj_freeze(rb_str_new2(ruby_version));
    VALUE d = rb_obj_freeze(rb_str_new2(ruby_release_date));
    VALUE p = rb_obj_freeze(rb_str_new2(ruby_platform));

    rb_define_global_const("RUBY_VERSION", v);
    rb_define_global_const("RUBY_RELEASE_DATE", d);
    rb_define_global_const("RUBY_PLATFORM", p);
}

void
ruby_show_version(void)
{
    printf("ruby %s (%s) [%s]\n", RUBY_VERSION, RUBY_RELEASE_DATE, RUBY_PLATFORM);
    fflush(stdout);
}

void
ruby_show_copyright(void)
{
    printf("ruby - Copyright (C) 1993-%d Yukihiro Matsumoto\n", RUBY_RELEASE_YEAR);
    exit(0);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


version.h

root/version.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

#define RUBY_VERSION "1.9.0"
#define RUBY_RELEASE_DATE "2006-01-06"
#define RUBY_VERSION_CODE 190
#define RUBY_RELEASE_CODE 20060106

#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 0
#define RUBY_RELEASE_YEAR 2006
#define RUBY_RELEASE_MONTH 1
#define RUBY_RELEASE_DAY 6

RUBY_EXTERN const char ruby_version[];
RUBY_EXTERN const char ruby_release_date[];
RUBY_EXTERN const char ruby_platform[];
/* [<][>][^][v][top][bottom][index] [help] */


ext/Win32API/Win32API.c

root/ext/Win32API/Win32API.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. Win32API
  2. Win32API_FreeLibrary
  3. Win32API_initialize
  4. Win32API_Call
  5. Init_Win32API
/*
  Win32API - Ruby Win32 API Import Facility
*/

#if !defined _MSC_VER && !defined _WIN32
#define  WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdio.h>
#endif

#define _T_VOID     0
#define _T_NUMBER   1
#define _T_POINTER  2
#define _T_INTEGER  3

#include "ruby.h"

typedef struct {
    HANDLE dll;
    HANDLE proc;
    VALUE dllname;
    VALUE import;
    VALUE export;
} Win32API;

static void
Win32API_FreeLibrary(hdll)
    HINSTANCE hdll;
{
    FreeLibrary(hdll);
}

static VALUE
Win32API_initialize(self, dllname, proc, import, export)
    VALUE self;
    VALUE dllname;
    VALUE proc;
    VALUE import;
    VALUE export;
{
    HANDLE hproc;
    HINSTANCE hdll;
    VALUE str;
    VALUE a_import;
    VALUE *ptr;
    char *s;
    int i;
    int len;
    int ex = _T_VOID;

    SafeStringValue(dllname);
    SafeStringValue(proc);
    hdll = LoadLibrary(RSTRING(dllname)->ptr);
    if (!hdll)
        rb_raise(rb_eRuntimeError, "LoadLibrary: %s\n", RSTRING(dllname)->ptr);
    rb_iv_set(self, "__hdll__", Data_Wrap_Struct(rb_cData, 0, Win32API_FreeLibrary, (void*)hdll));
    hproc = (HANDLE)GetProcAddress(hdll, RSTRING(proc)->ptr);
    if (!hproc) {
        str = rb_str_new3(proc);
        str = rb_str_cat(str, "A", 1);
        hproc = (HANDLE)GetProcAddress(hdll, RSTRING(str)->ptr);
        if (!hproc)
            rb_raise(rb_eRuntimeError, "GetProcAddress: %s or %s\n",
                RSTRING(proc)->ptr, RSTRING(str)->ptr);
    }
    rb_iv_set(self, "__dll__", UINT2NUM((unsigned long)hdll));
    rb_iv_set(self, "__dllname__", dllname);
    rb_iv_set(self, "__proc__", UINT2NUM((unsigned long)hproc));

    a_import = rb_ary_new();
    switch (TYPE(import)) {
    case T_NIL:
        break;
    case T_ARRAY:
        ptr = RARRAY(import)->ptr;
        for (i = 0, len = RARRAY(import)->len; i < len; i++) {
            SafeStringValue(ptr[i]);
            switch (*(char *)RSTRING(ptr[i])->ptr) {
            case 'N': case 'n': case 'L': case 'l':
                rb_ary_push(a_import, INT2FIX(_T_NUMBER));
                break;
            case 'P': case 'p':
                rb_ary_push(a_import, INT2FIX(_T_POINTER));
                break;
            case 'I': case 'i':
                rb_ary_push(a_import, INT2FIX(_T_INTEGER));
                break;
            }
        }
        break;
    default:
        SafeStringValue(import);
        s = RSTRING(import)->ptr;
        for (i = 0, len = RSTRING(import)->len; i < len; i++) {
            switch (*s++) {
            case 'N': case 'n': case 'L': case 'l':
                rb_ary_push(a_import, INT2FIX(_T_NUMBER));
                break;
            case 'P': case 'p':
                rb_ary_push(a_import, INT2FIX(_T_POINTER));
                break;
            case 'I': case 'i':
                rb_ary_push(a_import, INT2FIX(_T_INTEGER));
                break;
            }
        }
        break;
    }

    if (16 < RARRAY(a_import)->len) {
        rb_raise(rb_eRuntimeError, "too many parameters: %d\n", RARRAY(a_import)->len);
    }

    rb_iv_set(self, "__import__", a_import);

    if (NIL_P(export)) {
        ex = _T_VOID;
    } else {
        SafeStringValue(export);
        switch (*RSTRING(export)->ptr) {
        case 'V': case 'v':
            ex = _T_VOID;
            break;
        case 'N': case 'n': case 'L': case 'l':
            ex = _T_NUMBER;
            break;
        case 'P': case 'p':
            ex = _T_POINTER;
            break;
        case 'I': case 'i':
            ex = _T_INTEGER;
            break;
        }
    }
    rb_iv_set(self, "__export__", INT2FIX(ex));

    return Qnil;
}

#ifdef _MSC_VER
#pragma optimize("g", off)
#endif
static VALUE
Win32API_Call(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    VALUE args;
    unsigned long ret;
    int i;
    struct {
        unsigned long params[16];
    } param;
#define params param.params

    VALUE obj_proc = rb_iv_get(obj, "__proc__");
    VALUE obj_import = rb_iv_get(obj, "__import__");
    VALUE obj_export = rb_iv_get(obj, "__export__");
    FARPROC ApiFunction = (FARPROC)NUM2ULONG(obj_proc);
    int items = rb_scan_args(argc, argv, "0*", &args);
    int nimport = RARRAY(obj_import)->len;

    if (items != nimport)
        rb_raise(rb_eRuntimeError, "wrong number of parameters: expected %d, got %d",
            nimport, items);

    for (i = 0; i < nimport; i++) {
        unsigned long lParam = 0;
        switch (FIX2INT(rb_ary_entry(obj_import, i))) {
            VALUE str;
        case _T_NUMBER:
        case _T_INTEGER:
        default:
            lParam = NUM2ULONG(rb_ary_entry(args, i));
            break;
        case _T_POINTER:
            str = rb_ary_entry(args, i);
            if (NIL_P(str)) {
                lParam = 0;
            } else if (FIXNUM_P(str)) {
                lParam = NUM2ULONG(str);
            } else {
                StringValue(str);
                rb_str_modify(str);
                lParam = (unsigned long)StringValuePtr(str);
            }
            break;
        }
        params[i] = lParam;
    }

    ret = ApiFunction(param);

    switch (FIX2INT(obj_export)) {
    case _T_NUMBER:
    case _T_INTEGER:
        return INT2NUM(ret);
    case _T_POINTER:
        return rb_str_new2((char *)ret);
    case _T_VOID:
    default:
        return INT2NUM(0);
    }
}

void
Init_Win32API()
{
    VALUE cWin32API = rb_define_class("Win32API", rb_cObject);
    rb_define_method(cWin32API, "initialize", Win32API_initialize, 4);
    rb_define_method(cWin32API, "call", Win32API_Call, -1);
    rb_define_alias(cWin32API,  "Call", "call");
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/bigdecimal/bigdecimal.c

root/ext/bigdecimal/bigdecimal.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. BigDecimal_version
  2. BigDecimal_delete
  3. ToValue
  4. GetVpValue
  5. BigDecimal_double_fig
  6. BigDecimal_prec
  7. BigDecimal_hash
  8. BigDecimal_dump
  9. BigDecimal_load
  10. BigDecimal_mode
  11. GetAddSubPrec
  12. GetPositiveInt
  13. VpNewRbClass
  14. VpCreateRbObject
  15. BigDecimal_IsNaN
  16. BigDecimal_IsInfinite
  17. BigDecimal_IsFinite
  18. BigDecimal_to_i
  19. BigDecimal_induced_from
  20. BigDecimal_to_f
  21. BigDecimal_coerce
  22. BigDecimal_uplus
  23. BigDecimal_add
  24. BigDecimal_sub
  25. BigDecimalCmp
  26. BigDecimal_zero
  27. BigDecimal_nonzero
  28. BigDecimal_comp
  29. BigDecimal_eq
  30. BigDecimal_ne
  31. BigDecimal_lt
  32. BigDecimal_le
  33. BigDecimal_gt
  34. BigDecimal_ge
  35. BigDecimal_neg
  36. BigDecimal_mult
  37. BigDecimal_divide
  38. BigDecimal_div
  39. BigDecimal_DoDivmod
  40. BigDecimal_mod
  41. BigDecimal_divremain
  42. BigDecimal_remainder
  43. BigDecimal_divmod
  44. BigDecimal_div2
  45. BigDecimal_add2
  46. BigDecimal_sub2
  47. BigDecimal_mult2
  48. BigDecimal_abs
  49. BigDecimal_sqrt
  50. BigDecimal_fix
  51. BigDecimal_round
  52. BigDecimal_truncate
  53. BigDecimal_frac
  54. BigDecimal_floor
  55. BigDecimal_ceil
  56. BigDecimal_to_s
  57. BigDecimal_split
  58. BigDecimal_exponent
  59. BigDecimal_inspect
  60. BigDecimal_power
  61. BigDecimal_global_new
  62. BigDecimal_new
  63. BigDecimal_limit
  64. BigDecimal_sign
  65. Init_bigdecimal
  66. VpMemAlloc
  67. VpFree
  68. VpGetException
  69. VpSetException
  70. VpGetPrecLimit
  71. VpSetPrecLimit
  72. VpGetRoundMode
  73. VpIsRoundMode
  74. VpSetRoundMode
  75. Zero
  76. One
  77. VpBaseFig
  78. VpDblFig
  79. VpBaseVal
  80. VpGetDoubleNaN
  81. VpGetDoublePosInf
  82. VpGetDoubleNegInf
  83. VpGetDoubleNegZero
  84. VpIsNegDoubleZero
  85. VpException
  86. VpIsDefOP
  87. VpNumOfChars
  88. VpInit
  89. VpOne
  90. AddExponent
  91. VpAlloc
  92. VpAsgn
  93. VpAddSub
  94. VpAddAbs
  95. VpSubAbs
  96. VpSetPTR
  97. VpMult
  98. VpDivd
  99. VpNmlz
  100. VpComp
  101. VPrint
  102. VpFormatSt
  103. VpExponent10
  104. VpSzMantissa
  105. VpToSpecialString
  106. VpToString
  107. VpToFString
  108. VpCtoV
  109. VpVtoD
  110. VpDtoV
  111. VpItoV
  112. VpSqrt
  113. VpMidRound
  114. VpLeftRound
  115. VpActiveRound
  116. VpLimitRound
  117. VpInternalRound
  118. VpRdup
  119. VpFrac
  120. VpPower
  121. VpVarCheck
/*
 *
 * Ruby BigDecimal(Variable decimal precision) extension library.
 *
 * Copyright(C) 2002 by Shigeo Kobayashi(shigeo@tinyforest.gr.jp)
 *
 * You may distribute under the terms of either the GNU General Public
 * License or the Artistic License, as specified in the README file
 * of this BigDecimal distribution.
 *
 *  NOTE: Change log in this source removed to reduce source code size.
 *        See rev. 1.25 if needed.
 *
 */

#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <float.h>
#include <math.h>
#include "ruby.h"
#include "math.h"
#include "version.h"

/* #define ENABLE_NUMERIC_STRING */

VALUE rb_cBigDecimal;

#include "bigdecimal.h"

/* MACRO's to guard objects from GC by keeping them in stack */
#define ENTER(n) volatile VALUE vStack[n];int iStack=0
#define PUSH(x)  vStack[iStack++] = (unsigned long)(x);
#define SAVE(p)  PUSH(p->obj);
#define GUARD_OBJ(p,y) {p=y;SAVE(p);}

/*
 * ================== Ruby Interface part ==========================
 */
#define DoSomeOne(x,y) rb_num_coerce_bin(x,y)

/*
 *  **** BigDecimal version ****
 */
static VALUE
BigDecimal_version(VALUE self)
{
    /*
     * 1.0.0: Ruby 1.8.0
     * 1.0.1: Ruby 1.8.1
    */
    return rb_str_new2("1.0.1");
}

/*
 *   VP routines used in BigDecimal part
 */
static unsigned short VpGetException(void);
static void  VpSetException(unsigned short f);
static void  VpInternalRound(Real *c,int ixDigit,U_LONG vPrev,U_LONG v);
static int   VpLimitRound(Real *c,U_LONG ixDigit);

/*
 *  **** BigDecimal part ****
 */

static void
BigDecimal_delete(Real *pv)
{
    VpFree(pv);
}

static VALUE
ToValue(Real *p)
{
    if(VpIsNaN(p)) {
        VpException(VP_EXCEPTION_NaN,"Computation results to 'NaN'(Not a Number)",0);
    } else if(VpIsPosInf(p)) {
        VpException(VP_EXCEPTION_INFINITY,"Computation results to 'Infinity'",0);
    } else if(VpIsNegInf(p)) {
        VpException(VP_EXCEPTION_INFINITY,"Computation results to '-Infinity'",0);
    }
    return p->obj;
}

static Real *
GetVpValue(VALUE v, int must)
{
    Real *pv;
    VALUE bg;
    char szD[128];

    switch(TYPE(v))
    {
    case T_DATA:
        if(RDATA(v)->dfree ==(void *) BigDecimal_delete) {
            Data_Get_Struct(v, Real, pv);
            return pv;
        } else {
            goto SomeOneMayDoIt;
        }
        break;
    case T_FIXNUM:
        sprintf(szD, "%ld", FIX2LONG(v));
        return VpCreateRbObject(VpBaseFig() * 2 + 1, szD);

#ifdef ENABLE_NUMERIC_STRING
    case T_STRING:
        SafeStringValue(v);
        return VpCreateRbObject(strlen(RSTRING(v)->ptr) + VpBaseFig() + 1,
                                RSTRING(v)->ptr);
#endif /* ENABLE_NUMERIC_STRING */

    case T_BIGNUM:
        bg = rb_big2str(v, 10);
        return VpCreateRbObject(strlen(RSTRING(bg)->ptr) + VpBaseFig() + 1,
                                RSTRING(bg)->ptr);
    default:
        goto SomeOneMayDoIt;
    }

SomeOneMayDoIt:
    if(must) {
        rb_raise(rb_eTypeError, "%s can't be coerced into BigDecimal",
                    rb_special_const_p(v)?
                    RSTRING(rb_inspect(v))->ptr:
                    rb_obj_classname(v)
                );
    }
    return NULL; /* NULL means to coerce */
}

static VALUE
BigDecimal_double_fig(VALUE self)
{
    return INT2FIX(VpDblFig());
}

static VALUE
BigDecimal_prec(VALUE self)
{
    ENTER(1);
    Real *p;
    VALUE obj;

    GUARD_OBJ(p,GetVpValue(self,1));
    obj = rb_assoc_new(INT2NUM(p->Prec*VpBaseFig()),
                       INT2NUM(p->MaxPrec*VpBaseFig()));
    return obj;
}

static VALUE
BigDecimal_hash(VALUE self)
{
    ENTER(1);
    Real *p;
    U_LONG hash,i;

    GUARD_OBJ(p,GetVpValue(self,1));
    hash = (U_LONG)p->sign;
    /* hash!=2: the case for 0(1),NaN(0) or +-Infinity(3) is sign itself */
    if(hash==2) {
        for(i = 0; i < p->Prec;i++) {
            hash = 31 * hash + p->frac[i];
            hash ^= p->frac[i];
        }
        hash += p->exponent;
    }
    return INT2FIX(hash);
}

static VALUE
BigDecimal_dump(int argc, VALUE *argv, VALUE self)
{
    ENTER(5);
    char sz[50];
    Real *vp;
    char *psz;
    VALUE dummy;
    rb_scan_args(argc, argv, "01", &dummy);
    GUARD_OBJ(vp,GetVpValue(self,1));
    sprintf(sz,"%lu:",VpMaxPrec(vp)*VpBaseFig());
    psz = ALLOCA_N(char,(unsigned int)VpNumOfChars(vp,"E")+strlen(sz));
    sprintf(psz,"%s",sz);
    VpToString(vp, psz+strlen(psz), 0, 0);
    return rb_str_new2(psz);
}

static VALUE
BigDecimal_load(VALUE self, VALUE str)
{
    ENTER(2);
    Real *pv;
    unsigned char *pch;
    unsigned char ch;
    unsigned long m=0;

    SafeStringValue(str);
    pch = RSTRING(str)->ptr;
    /* First get max prec */
    while((*pch)!=(unsigned char)'\0' && (ch=*pch++)!=(unsigned char)':') {
        if(!ISDIGIT(ch)) {
            rb_raise(rb_eTypeError, "load failed: invalid character in the marshaled string");
        }
        m = m*10 + (unsigned long)(ch-'0');
    }
    if(m>VpBaseFig()) m -= VpBaseFig();
    GUARD_OBJ(pv,VpNewRbClass(m,pch,self));
    m /= VpBaseFig();
    if(m && pv->MaxPrec>m) pv->MaxPrec = m+1;
    return ToValue(pv);
}

static VALUE
BigDecimal_mode(int argc, VALUE *argv, VALUE self)
{
    VALUE which;
    VALUE val;
    unsigned long f,fo;

    if(rb_scan_args(argc,argv,"11",&which,&val)==1) val = Qnil;

    Check_Type(which, T_FIXNUM);
    f = (unsigned long)FIX2INT(which);

    if(f&VP_EXCEPTION_ALL) {
        /* Exception mode setting */
        fo = VpGetException();
        if(val==Qnil) return INT2FIX(fo);
        if(val!=Qfalse && val!=Qtrue) {
            rb_raise(rb_eTypeError, "second argument must be true or false");
            return Qnil; /* Not reached */
        }
        if(f&VP_EXCEPTION_INFINITY) {
            VpSetException((unsigned short)((val==Qtrue)?(fo|VP_EXCEPTION_INFINITY):
                           (fo&(~VP_EXCEPTION_INFINITY))));
        }
        if(f&VP_EXCEPTION_NaN) {
            VpSetException((unsigned short)((val==Qtrue)?(fo|VP_EXCEPTION_NaN):
                           (fo&(~VP_EXCEPTION_NaN))));
        }
        fo = VpGetException();
        return INT2FIX(fo);
    }
    if(VP_ROUND_MODE==f) {
        /* Rounding mode setting */
        fo = VpGetRoundMode();
        if(val==Qnil) return INT2FIX(fo);
        Check_Type(val, T_FIXNUM);
        if(!VpIsRoundMode(FIX2INT(val))) {
            rb_raise(rb_eTypeError, "invalid rounding mode");
            return Qnil;
        }
        fo = VpSetRoundMode((unsigned long)FIX2INT(val));
        return INT2FIX(fo);
    }
    rb_raise(rb_eTypeError, "first argument for BigDecimal#mode invalid");
    return Qnil;
}

static U_LONG
GetAddSubPrec(Real *a, Real *b)
{
    U_LONG mxs;
    U_LONG mx = a->Prec;
    S_INT d;

    if(!VpIsDef(a) || !VpIsDef(b)) return (-1L);
    if(mx < b->Prec) mx = b->Prec;
    if(a->exponent!=b->exponent) {
        mxs = mx;
        d = a->exponent - b->exponent;
        if(d<0) d = -d;
        mx = mx+(U_LONG)d;
        if(mx<mxs) {
            return VpException(VP_EXCEPTION_INFINITY,"Exponent overflow",0);
        }
    }
    return mx;
}

static S_INT
GetPositiveInt(VALUE v)
{
    S_INT n;
    Check_Type(v, T_FIXNUM);
    n = FIX2INT(v);
    if(n < 0) {
        rb_raise(rb_eArgError, "argument must be positive");
    }
    return n;
}

VP_EXPORT Real *
VpNewRbClass(U_LONG mx, char *str, VALUE klass)
{
    Real *pv = VpAlloc(mx,str);
    pv->obj = (VALUE)Data_Wrap_Struct(klass, 0, BigDecimal_delete, pv);
    return pv;
}

VP_EXPORT Real *
VpCreateRbObject(U_LONG mx, char *str)
{
    Real *pv = VpAlloc(mx,str);
    pv->obj = (VALUE)Data_Wrap_Struct(rb_cBigDecimal, 0, BigDecimal_delete, pv);
    return pv;
}

static VALUE
BigDecimal_IsNaN(VALUE self)
{
    Real *p = GetVpValue(self,1);
    if(VpIsNaN(p))  return Qtrue;
    return Qfalse;
}

static VALUE
BigDecimal_IsInfinite(VALUE self)
{
    Real *p = GetVpValue(self,1);
    if(VpIsPosInf(p)) return INT2FIX(1);
    if(VpIsNegInf(p)) return INT2FIX(-1);
    return Qnil;
}

static VALUE
BigDecimal_IsFinite(VALUE self)
{
    Real *p = GetVpValue(self,1);
    if(VpIsNaN(p)) return Qfalse;
    if(VpIsInf(p)) return Qfalse;
    return Qtrue;
}

static VALUE
BigDecimal_to_i(VALUE self)
{
    ENTER(5);
    int e,n,i,nf;
    U_LONG v,b,j;
    char *psz,*pch;
    Real *p;

    GUARD_OBJ(p,GetVpValue(self,1));

    /* Infinity or NaN not converted. */
    if(VpIsNaN(p)) {
       VpException(VP_EXCEPTION_NaN,"Computation results to 'NaN'(Not a Number)",0);
       return Qnil;
    } else if(VpIsPosInf(p)) {
       VpException(VP_EXCEPTION_INFINITY,"Computation results to 'Infinity'",0);
       return Qnil;
    } else if(VpIsNegInf(p)) {
       VpException(VP_EXCEPTION_INFINITY,"Computation results to '-Infinity'",0);
       return Qnil;
    }

    e = VpExponent10(p);
    if(e<=0) return INT2FIX(0);
    nf = VpBaseFig();
    if(e<=nf) {
        e = VpGetSign(p)*p->frac[0];
        return INT2FIX(e);
    }
    psz = ALLOCA_N(char,(unsigned int)(e+nf+2));

    n = (e+nf-1)/nf;
    pch = psz;
    if(VpGetSign(p)<0) *pch++ = '-';
    for(i=0;i<n;++i) {
        b = VpBaseVal()/10;
        if(i>=(int)p->Prec) {
            while(b) {
                *pch++ = '0';
                b /= 10;
            }
            continue;
        }
        v = p->frac[i];
        while(b) {
            j = v/b;
            *pch++ = (char)(j + '0');
            v -= j*b;
            b /= 10;
        }
    }
    *pch++ = 0;
    return rb_cstr2inum(psz,10);
}

static VALUE
BigDecimal_induced_from(VALUE self, VALUE x)
{
    Real *p = GetVpValue(x,1);
    return p->obj;
}

static VALUE
BigDecimal_to_f(VALUE self)
{
    ENTER(1);
    Real *p;
    double d, d2;
    S_LONG e;

    GUARD_OBJ(p,GetVpValue(self,1));
    if(VpVtoD(&d, &e, p)!=1) return rb_float_new(d);
    errno = 0;
    d2 = pow(10.0,(double)e);
    if((errno == ERANGE && e>0) || (d2>1.0 && (fabs(d) > (DBL_MAX / d2)))) {
       VpException(VP_EXCEPTION_OVERFLOW,"BigDecimal to Float conversion",0);
       if(d>0.0) return rb_float_new(DBL_MAX);
       else      return rb_float_new(-DBL_MAX);
    }
    return rb_float_new(d*d2);
}

static VALUE
BigDecimal_coerce(VALUE self, VALUE other)
{
    ENTER(2);
    VALUE obj;
    Real *b;
    if(TYPE(other) == T_FLOAT) {
       obj = rb_assoc_new(other, BigDecimal_to_f(self));
    } else {
       GUARD_OBJ(b,GetVpValue(other,1));
       obj = rb_assoc_new(b->obj, self);
    }
    return obj;
}

static VALUE
BigDecimal_uplus(VALUE self)
{
    return self;
}

static VALUE
BigDecimal_add(VALUE self, VALUE r)
{
    ENTER(5);
    Real *c, *a, *b;
    U_LONG mx;
    GUARD_OBJ(a,GetVpValue(self,1));
    b = GetVpValue(r,0);
    if(!b) return DoSomeOne(self,r);
    SAVE(b);
    if(VpIsNaN(b)) return b->obj;
    if(VpIsNaN(a)) return a->obj;
    mx = GetAddSubPrec(a,b);
    if(mx==(-1L)) {
        GUARD_OBJ(c,VpCreateRbObject(VpBaseFig() + 1, "0"));
        VpAddSub(c, a, b, 1);
    } else {
        GUARD_OBJ(c,VpCreateRbObject(mx *(VpBaseFig() + 1), "0"));
        if(!mx) {
            VpSetInf(c,VpGetSign(a));
        } else {
            VpAddSub(c, a, b, 1);
        }
    }
    return ToValue(c);
}

static VALUE
BigDecimal_sub(VALUE self, VALUE r)
{
    ENTER(5);
    Real *c, *a, *b;
    U_LONG mx;

    GUARD_OBJ(a,GetVpValue(self,1));
    b = GetVpValue(r,0);
    if(!b) return DoSomeOne(self,r);
    SAVE(b);

    if(VpIsNaN(b)) return b->obj;
    if(VpIsNaN(a)) return a->obj;

    mx = GetAddSubPrec(a,b);
    if(mx==(-1L)) {
        GUARD_OBJ(c,VpCreateRbObject(VpBaseFig() + 1, "0"));
        VpAddSub(c, a, b, -1);
    } else {
        GUARD_OBJ(c,VpCreateRbObject(mx *(VpBaseFig() + 1), "0"));
        if(!mx) {
            VpSetInf(c,VpGetSign(a));
        } else {
            VpAddSub(c, a, b, -1);
        }
    }
    return ToValue(c);
}

static VALUE
BigDecimalCmp(VALUE self, VALUE r,char op)
{
    ENTER(5);
    S_INT e;
    Real *a, *b;
    GUARD_OBJ(a,GetVpValue(self,1));
    b = GetVpValue(r,0);
    if(!b) return rb_num_coerce_cmp(self,r);
    SAVE(b);
    e = VpComp(a, b);
    if(e==999) return Qnil;
    switch(op)
    {
    case '*': return   INT2FIX(e); /* any op */
    case '=': if(e==0) return Qtrue ; return Qfalse;
    case '!': if(e!=0) return Qtrue ; return Qfalse;
    case 'G': if(e>=0) return Qtrue ; return Qfalse;
    case '>': if(e> 0) return Qtrue ; return Qfalse;
    case 'L': if(e<=0) return Qtrue ; return Qfalse;
    case '<': if(e< 0) return Qtrue ; return Qfalse;
    }
    rb_bug("Undefined operation in BigDecimalCmp()");
}

static VALUE
BigDecimal_zero(VALUE self)
{
    Real *a = GetVpValue(self,1);
    return VpIsZero(a) ? Qtrue : Qfalse;
}

static VALUE
BigDecimal_nonzero(VALUE self)
{
    Real *a = GetVpValue(self,1);
    return VpIsZero(a) ? Qnil : self;
}

static VALUE
BigDecimal_comp(VALUE self, VALUE r)
{
    return BigDecimalCmp(self, r, '*');
}

static VALUE
BigDecimal_eq(VALUE self, VALUE r)
{
    return BigDecimalCmp(self, r, '=');
}

static VALUE
BigDecimal_ne(VALUE self, VALUE r)
{
    return BigDecimalCmp(self, r, '!');
}

static VALUE
BigDecimal_lt(VALUE self, VALUE r)
{
    return BigDecimalCmp(self, r, '<');
}

static VALUE
BigDecimal_le(VALUE self, VALUE r)
{
    return BigDecimalCmp(self, r, 'L');
}

static VALUE
BigDecimal_gt(VALUE self, VALUE r)
{
    return BigDecimalCmp(self, r, '>');
}

static VALUE
BigDecimal_ge(VALUE self, VALUE r)
{
    return BigDecimalCmp(self, r, 'G');
}

static VALUE
BigDecimal_neg(VALUE self)
{
    ENTER(5);
    Real *c, *a;
    GUARD_OBJ(a,GetVpValue(self,1));
    GUARD_OBJ(c,VpCreateRbObject(a->Prec *(VpBaseFig() + 1), "0"));
    VpAsgn(c, a, -1);
    return ToValue(c);
}

static VALUE
BigDecimal_mult(VALUE self, VALUE r)
{
    ENTER(5);
    Real *c, *a, *b;
    U_LONG mx;

    GUARD_OBJ(a,GetVpValue(self,1));
    b = GetVpValue(r,0);
    if(!b) return DoSomeOne(self,r);
    SAVE(b);

    mx = a->Prec + b->Prec;
    GUARD_OBJ(c,VpCreateRbObject(mx *(VpBaseFig() + 1), "0"));
    VpMult(c, a, b);
    return ToValue(c);
}

static VALUE
BigDecimal_divide(Real **c, Real **res, Real **div, VALUE self, VALUE r)
/* For c = self.div(r): with round operation */
{
    ENTER(5);
    Real *a, *b;
    U_LONG mx;

    GUARD_OBJ(a,GetVpValue(self,1));
    b = GetVpValue(r,0);
    if(!b) return DoSomeOne(self,r);
    SAVE(b);
    *div = b;
    mx =(a->MaxPrec + b->MaxPrec + 1) * VpBaseFig();
    GUARD_OBJ((*c),VpCreateRbObject(mx, "#0"));
    GUARD_OBJ((*res),VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
    VpDivd(*c, *res, a, b);
    return (VALUE)0;
}

static VALUE
BigDecimal_div(VALUE self, VALUE r)
/* For c = self/r: with round operation */
{
    ENTER(5);
    Real *c=NULL, *res=NULL, *div = NULL;
    r = BigDecimal_divide(&c, &res, &div, self, r);
    if(r!=(VALUE)0) return r; /* coerced by other */
    SAVE(c);SAVE(res);SAVE(div);
    /* a/b = c + r/b */
    /* c xxxxx
       r 00000yyyyy  ==> (y/b)*BASE >= HALF_BASE
     */
    /* Round */
    if(VpHasVal(div)) { /* frac[0] must be zero for NaN,INF,Zero */
       VpInternalRound(c,0,c->frac[c->Prec-1],(VpBaseVal()*res->frac[0])/div->frac[0]);
    }
    return ToValue(c);
}

/*
 * %: mod = a%b = a - (a.to_f/b).floor * b
 * div = (a.to_f/b).floor
 */
static VALUE
BigDecimal_DoDivmod(VALUE self, VALUE r, Real **div, Real **mod)
{
    ENTER(8);
    Real *c=NULL, *d=NULL, *res=NULL;
    Real *a, *b;
    U_LONG mx;

    GUARD_OBJ(a,GetVpValue(self,1));
    b = GetVpValue(r,0);
    if(!b) return DoSomeOne(self,r);
    SAVE(b);

    if(VpIsNaN(a) || VpIsNaN(b)) goto NaN;
    if(VpIsInf(a) || VpIsInf(b)) goto NaN;
    if(VpIsZero(b))              goto NaN;
    if(VpIsZero(a)) {
       GUARD_OBJ(c,VpCreateRbObject(1, "0"));
       GUARD_OBJ(d,VpCreateRbObject(1, "0"));
       *div = d;
       *mod = c;
       return (VALUE)0;
    }

    mx = a->Prec;
    if(mx<b->Prec) mx = b->Prec;
    mx =(mx + 1) * VpBaseFig();
    GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
    GUARD_OBJ(res,VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
    VpDivd(c, res, a, b);
    mx = c->Prec *(VpBaseFig() + 1);
    GUARD_OBJ(d,VpCreateRbObject(mx, "0"));
    VpActiveRound(d,c,VP_ROUND_DOWN,0);
    VpMult(res,d,b);
    VpAddSub(c,a,res,-1);
    if(!VpIsZero(c) && (VpGetSign(a)*VpGetSign(b)<0)) {
        VpAddSub(res,d,VpOne(),-1);
        VpAddSub(d  ,c,b,       1);
        *div = res;
        *mod = d;
    } else {
        *div = d;
        *mod = c;
    }
    return (VALUE)0;

NaN:
    GUARD_OBJ(c,VpCreateRbObject(1, "NaN"));
    GUARD_OBJ(d,VpCreateRbObject(1, "NaN"));
    *div = d;
    *mod = c;
    return (VALUE)0;
}

static VALUE
BigDecimal_mod(VALUE self, VALUE r) /* %: a%b = a - (a.to_f/b).floor * b */
{
    ENTER(3);
    VALUE obj;
    Real *div=NULL, *mod=NULL;

    obj = BigDecimal_DoDivmod(self,r,&div,&mod);
    if(obj!=(VALUE)0) return obj;
    SAVE(div);SAVE(mod);
    return ToValue(mod);
}

static VALUE
BigDecimal_divremain(VALUE self, VALUE r, Real **dv, Real **rv)
{
    ENTER(10);
    U_LONG mx;
    Real *a=NULL, *b=NULL, *c=NULL, *res=NULL, *d=NULL, *rr=NULL, *ff=NULL;
    Real *f=NULL;

    GUARD_OBJ(a,GetVpValue(self,1));
    b = GetVpValue(r,0);
    if(!b) return DoSomeOne(self,r);
    SAVE(b);

    mx  =(a->MaxPrec + b->MaxPrec) *VpBaseFig();
    GUARD_OBJ(c  ,VpCreateRbObject(mx, "0"));
    GUARD_OBJ(res,VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
    GUARD_OBJ(rr ,VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
    GUARD_OBJ(ff ,VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));

    VpDivd(c, res, a, b);

    mx = c->Prec *(VpBaseFig() + 1);

    GUARD_OBJ(d,VpCreateRbObject(mx, "0"));
    GUARD_OBJ(f,VpCreateRbObject(mx, "0"));

    VpActiveRound(d,c,VP_ROUND_DOWN,0); /* 0: round off */

    VpFrac(f, c);
    VpMult(rr,f,b);
    VpAddSub(ff,res,rr,1);

    *dv = d;
    *rv = ff;
    return (VALUE)0;
}

static VALUE
BigDecimal_remainder(VALUE self, VALUE r) /* remainder */
{
    VALUE  f;
    Real  *d,*rv;
    f = BigDecimal_divremain(self,r,&d,&rv);
    if(f!=(VALUE)0) return f;
    return ToValue(rv);
}

static VALUE
BigDecimal_divmod(VALUE self, VALUE r)
{
    ENTER(5);
    VALUE obj;
    Real *div=NULL, *mod=NULL;

    obj = BigDecimal_DoDivmod(self,r,&div,&mod);
    if(obj!=(VALUE)0) return obj;
    SAVE(div);SAVE(mod);
    obj = rb_assoc_new(ToValue(div), ToValue(mod));
    return obj;
}

static VALUE
BigDecimal_div2(int argc, VALUE *argv, VALUE self)
{
    ENTER(5);
    VALUE b,n;
    int na = rb_scan_args(argc,argv,"11",&b,&n);
    if(na==1) { /* div in Float sense */
       VALUE obj;
       Real *div=NULL;
       Real *mod;
       obj = BigDecimal_DoDivmod(self,b,&div,&mod);
       if(obj!=(VALUE)0) return obj;
       return ToValue(div);
    } else {    /* div in BigDecimal sense */
       U_LONG ix = (U_LONG)GetPositiveInt(n);
       if(ix==0) return BigDecimal_div(self,b);
       else {
          Real *res=NULL;
          Real *av=NULL, *bv=NULL, *cv=NULL;
          U_LONG mx = (ix+VpBaseFig()*2);
          U_LONG pl = VpSetPrecLimit(0);

          GUARD_OBJ(cv,VpCreateRbObject(mx,"0"));
          GUARD_OBJ(av,GetVpValue(self,1));
          GUARD_OBJ(bv,GetVpValue(b,1));
          mx = av->Prec + bv->Prec + 2;
          if(mx <= cv->MaxPrec) mx = cv->MaxPrec+1;
          GUARD_OBJ(res,VpCreateRbObject((mx * 2  + 2)*VpBaseFig(), "#0"));
          VpDivd(cv,res,av,bv);
          VpSetPrecLimit(pl);
          VpLeftRound(cv,VpGetRoundMode(),ix);
          return ToValue(cv);
       }
    }
}

static VALUE
BigDecimal_add2(VALUE self, VALUE b, VALUE n)
{
    ENTER(2);
    Real   *cv;
    U_LONG mx = (U_LONG)GetPositiveInt(n);
    if(mx==0) return BigDecimal_add(self,b);
    else {
       U_LONG pl = VpSetPrecLimit(0);
       VALUE   c = BigDecimal_add(self,b);
       VpSetPrecLimit(pl);
       GUARD_OBJ(cv,GetVpValue(c,1));
       VpLeftRound(cv,VpGetRoundMode(),mx);
       return ToValue(cv);
    }
}

static VALUE
BigDecimal_sub2(VALUE self, VALUE b, VALUE n)
{
    ENTER(2);
    Real *cv;
    U_LONG mx = (U_LONG)GetPositiveInt(n);
    if(mx==0) return BigDecimal_sub(self,b);
    else {
       U_LONG pl = VpSetPrecLimit(0);
       VALUE   c = BigDecimal_sub(self,b);
       VpSetPrecLimit(pl);
       GUARD_OBJ(cv,GetVpValue(c,1));
       VpLeftRound(cv,VpGetRoundMode(),mx);
       return ToValue(cv);
    }
}

static VALUE
BigDecimal_mult2(VALUE self, VALUE b, VALUE n)
{
    ENTER(2);
    Real *cv;
    U_LONG mx = (U_LONG)GetPositiveInt(n);
    if(mx==0) return BigDecimal_mult(self,b);
    else {
       U_LONG pl = VpSetPrecLimit(0);
       VALUE   c = BigDecimal_mult(self,b);
       VpSetPrecLimit(pl);
       GUARD_OBJ(cv,GetVpValue(c,1));
       VpLeftRound(cv,VpGetRoundMode(),mx);
       return ToValue(cv);
    }
}

static VALUE
BigDecimal_abs(VALUE self)
{
    ENTER(5);
    Real *c, *a;
    U_LONG mx;

    GUARD_OBJ(a,GetVpValue(self,1));
    mx = a->Prec *(VpBaseFig() + 1);
    GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
    VpAsgn(c, a, 1);
    VpChangeSign(c,(S_INT)1);
    return ToValue(c);
}

static VALUE
BigDecimal_sqrt(VALUE self, VALUE nFig)
{
    ENTER(5);
    Real *c, *a;
    S_INT mx, n;

    GUARD_OBJ(a,GetVpValue(self,1));
    mx = a->Prec *(VpBaseFig() + 1);

    n = GetPositiveInt(nFig) + VpDblFig() + 1;
    if(mx <= n) mx = n;
    GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
    VpSqrt(c, a);
    return ToValue(c);
}

static VALUE
BigDecimal_fix(VALUE self)
{
    ENTER(5);
    Real *c, *a;
    U_LONG mx;

    GUARD_OBJ(a,GetVpValue(self,1));
    mx = a->Prec *(VpBaseFig() + 1);
    GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
    VpActiveRound(c,a,VP_ROUND_DOWN,0); /* 0: round off */
    return ToValue(c);
}

static VALUE
BigDecimal_round(int argc, VALUE *argv, VALUE self)
{
    ENTER(5);
    Real   *c, *a;
    int    iLoc;
    U_LONG mx;
    VALUE  vLoc;
    VALUE  vRound;
    U_LONG pl;

    int    sw = VpGetRoundMode();

    int na = rb_scan_args(argc,argv,"02",&vLoc,&vRound);
    switch(na) {
    case 0:
        iLoc = 0;
        break;
    case 1:
        Check_Type(vLoc, T_FIXNUM);
        iLoc = FIX2INT(vLoc);
        break;
    case 2:
        Check_Type(vLoc, T_FIXNUM);
        iLoc = FIX2INT(vLoc);
        Check_Type(vRound, T_FIXNUM);
        sw   = FIX2INT(vRound);
        if(!VpIsRoundMode(sw)) {
            rb_raise(rb_eTypeError, "invalid rounding mode");
            return Qnil;
        }
        break;
    }

    pl = VpSetPrecLimit(0);
    GUARD_OBJ(a,GetVpValue(self,1));
    mx = a->Prec *(VpBaseFig() + 1);
    GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
    VpSetPrecLimit(pl);
    VpActiveRound(c,a,sw,iLoc);
    return ToValue(c);
}

static VALUE
BigDecimal_truncate(int argc, VALUE *argv, VALUE self)
{
    ENTER(5);
    Real *c, *a;
    int iLoc;
    U_LONG mx;
    VALUE vLoc;
    U_LONG pl = VpSetPrecLimit(0);

    if(rb_scan_args(argc,argv,"01",&vLoc)==0) {
        iLoc = 0;
    } else {
        Check_Type(vLoc, T_FIXNUM);
        iLoc = FIX2INT(vLoc);
    }

    GUARD_OBJ(a,GetVpValue(self,1));
    mx = a->Prec *(VpBaseFig() + 1);
    GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
    VpSetPrecLimit(pl);
    VpActiveRound(c,a,VP_ROUND_DOWN,iLoc); /* 0: truncate */
    return ToValue(c);
}

static VALUE
BigDecimal_frac(VALUE self)
{
    ENTER(5);
    Real *c, *a;
    U_LONG mx;

    GUARD_OBJ(a,GetVpValue(self,1));
    mx = a->Prec *(VpBaseFig() + 1);
    GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
    VpFrac(c, a);
    return ToValue(c);
}

static VALUE
BigDecimal_floor(int argc, VALUE *argv, VALUE self)
{
    ENTER(5);
    Real *c, *a;
    U_LONG mx;
    int iLoc;
    VALUE vLoc;
    U_LONG pl = VpSetPrecLimit(0);

    if(rb_scan_args(argc,argv,"01",&vLoc)==0) {
        iLoc = 0;
    } else {
        Check_Type(vLoc, T_FIXNUM);
        iLoc = FIX2INT(vLoc);
    }

    GUARD_OBJ(a,GetVpValue(self,1));
    mx = a->Prec *(VpBaseFig() + 1);
    GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
    VpSetPrecLimit(pl);
    VpActiveRound(c,a,VP_ROUND_FLOOR,iLoc);
    return ToValue(c);
}

static VALUE
BigDecimal_ceil(int argc, VALUE *argv, VALUE self)
{
    ENTER(5);
    Real *c, *a;
    U_LONG mx;
    int iLoc;
    VALUE vLoc;
    U_LONG pl = VpSetPrecLimit(0);

    if(rb_scan_args(argc,argv,"01",&vLoc)==0) {
        iLoc = 0;
    } else {
        Check_Type(vLoc, T_FIXNUM);
        iLoc = FIX2INT(vLoc);
    }

    GUARD_OBJ(a,GetVpValue(self,1));
    mx = a->Prec *(VpBaseFig() + 1);
    GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
    VpSetPrecLimit(pl);
    VpActiveRound(c,a,VP_ROUND_CEIL,iLoc);
    return ToValue(c);
}

static VALUE
BigDecimal_to_s(int argc, VALUE *argv, VALUE self)
{
    ENTER(5);
    int   fmt=0;   /* 0:E format */
    int   fPlus=0; /* =0:default,=1: set ' ' before digits ,set '+' before digits. */
    Real  *vp;
    char  *psz;
    char   ch;
    U_LONG nc;
    S_INT  mc = 0;
    VALUE  f;

    GUARD_OBJ(vp,GetVpValue(self,1));

    if(rb_scan_args(argc,argv,"01",&f)==1) {
        if(TYPE(f)==T_STRING) {
            SafeStringValue(f);
            psz = RSTRING(f)->ptr;
            if(*psz==' ') {
                fPlus = 1; psz++;
            } else if(*psz=='+') {
                fPlus = 2; psz++;
            }
            while(ch=*psz++) {
                if(ISSPACE(ch)) continue;
                if(!ISDIGIT(ch)) {
                    if(ch=='F' || ch=='f') fmt = 1; /* F format */
                    break;
                }
                mc = mc * 10 + ch - '0';
            }
        } else {
            mc  = GetPositiveInt(f);
        }
    }
    if(fmt) {
        nc = VpNumOfChars(vp,"F");
    } else {
        nc = VpNumOfChars(vp,"E");
    }
    if(mc>0) nc += (nc + mc - 1) / mc + 1;

    psz = ALLOCA_N(char,(unsigned int)nc);

    if(fmt) {
        VpToFString(vp, psz, mc, fPlus);
    } else {
        VpToString (vp, psz, mc, fPlus);
    }
    return rb_str_new2(psz);
}

static VALUE
BigDecimal_split(VALUE self)
{
    ENTER(5);
    Real *vp;
    VALUE obj,obj1;
    S_LONG e;
    S_LONG s;
    char *psz1;

    GUARD_OBJ(vp,GetVpValue(self,1));
    psz1 = ALLOCA_N(char,(unsigned int)VpNumOfChars(vp,"E"));
    VpSzMantissa(vp,psz1);
    s = 1;
    if(psz1[0]=='-') {
        s = -1; ++psz1;
    }
    if(psz1[0]=='N') s=0; /* NaN */
    e = VpExponent10(vp);
    obj1 = rb_str_new2(psz1);
    obj  = rb_ary_new2(4);
    rb_ary_push(obj, INT2FIX(s));
    rb_ary_push(obj, obj1);
    rb_ary_push(obj, INT2FIX(10));
    rb_ary_push(obj, INT2NUM(e));
    return obj;
}

static VALUE
BigDecimal_exponent(VALUE self)
{
    S_LONG e = VpExponent10(GetVpValue(self,1));
    return INT2NUM(e);
}

static VALUE
BigDecimal_inspect(VALUE self)
{
    ENTER(5);
    Real *vp;
    VALUE obj;
    unsigned int nc;
    char *psz1;
    char *pszAll;

    GUARD_OBJ(vp,GetVpValue(self,1));
    nc = VpNumOfChars(vp,"E");
    nc +=(nc + 9) / 10;

    psz1   = ALLOCA_N(char,nc);
    pszAll = ALLOCA_N(char,nc+256);
    VpToString(vp, psz1, 10, 0);
    sprintf(pszAll,"#<BigDecimal:%lx,'%s',%lu(%lu)>",self,psz1,VpPrec(vp)*VpBaseFig(),VpMaxPrec(vp)*VpBaseFig());
    obj = rb_str_new2(pszAll);
    return obj;
}

static VALUE
BigDecimal_power(VALUE self, VALUE p)
{
    ENTER(5);
    Real *x, *y;
    S_LONG mp, ma, n;

    Check_Type(p, T_FIXNUM);
    n = FIX2INT(p);
    ma = n;
    if(ma < 0)  ma = -ma;
    if(ma == 0) ma = 1;

    GUARD_OBJ(x,GetVpValue(self,1));
    if(VpIsDef(x)) {
        mp = x->Prec *(VpBaseFig() + 1);
        GUARD_OBJ(y,VpCreateRbObject(mp *(ma + 1), "0"));
    } else {
        GUARD_OBJ(y,VpCreateRbObject(1, "0"));
    }
    VpPower(y, x, n);
    return ToValue(y);
}

static VALUE
BigDecimal_global_new(int argc, VALUE *argv, VALUE self)
{
    ENTER(5);
    Real *pv;
    S_LONG mf;
    VALUE  nFig;
    VALUE  iniValue;

    if(rb_scan_args(argc,argv,"11",&iniValue,&nFig)==1) {
        mf = 0;
    } else {
        mf = GetPositiveInt(nFig);
    }
    SafeStringValue(iniValue);
    GUARD_OBJ(pv,VpCreateRbObject(mf, RSTRING(iniValue)->ptr));
    return ToValue(pv);
}

static VALUE
BigDecimal_new(int argc, VALUE *argv, VALUE self)
{
    ENTER(5);
    Real *pv;
    S_LONG mf;
    VALUE  nFig;
    VALUE  iniValue;

    if(rb_scan_args(argc,argv,"11",&iniValue,&nFig)==1) {
        mf = 0;
    } else {
        mf = GetPositiveInt(nFig);
    }
    SafeStringValue(iniValue);
    GUARD_OBJ(pv,VpNewRbClass(mf, RSTRING(iniValue)->ptr,self));
    return ToValue(pv);
}

static VALUE
BigDecimal_limit(int argc, VALUE *argv, VALUE self)
{
    VALUE  nFig;
    VALUE  nCur = INT2NUM(VpGetPrecLimit());

    if(rb_scan_args(argc,argv,"01",&nFig)==1) {
        int nf;
        if(nFig==Qnil) return nCur;
        Check_Type(nFig, T_FIXNUM);
        nf = FIX2INT(nFig);
        if(nf<0) {
            rb_raise(rb_eArgError, "argument must be positive");
        }
        VpSetPrecLimit(nf);
    }
    return nCur;
}

static VALUE
BigDecimal_sign(VALUE self)
{ /* sign */
    int s = GetVpValue(self,1)->sign;
    return INT2FIX(s);
}

void
Init_bigdecimal(void)
{
    /* Initialize VP routines */
    VpInit((U_LONG)0);

    /* Class and method registration */
    rb_cBigDecimal = rb_define_class("BigDecimal",rb_cNumeric);

    /* Global function */
    rb_define_global_function("BigDecimal", BigDecimal_global_new, -1);

    /* Class methods */
    rb_define_singleton_method(rb_cBigDecimal, "new", BigDecimal_new, -1);
    rb_define_singleton_method(rb_cBigDecimal, "mode", BigDecimal_mode, -1);
    rb_define_singleton_method(rb_cBigDecimal, "limit", BigDecimal_limit, -1);
    rb_define_singleton_method(rb_cBigDecimal, "double_fig", BigDecimal_double_fig, 0);
    rb_define_singleton_method(rb_cBigDecimal, "induced_from",BigDecimal_induced_from, 1);
    rb_define_singleton_method(rb_cBigDecimal, "_load", BigDecimal_load, 1);
    rb_define_singleton_method(rb_cBigDecimal, "ver", BigDecimal_version, 0);

    /* Constants definition */
    rb_define_const(rb_cBigDecimal, "BASE", INT2FIX((S_INT)VpBaseVal()));

    /* Exceptions */
    rb_define_const(rb_cBigDecimal, "EXCEPTION_ALL",INT2FIX(VP_EXCEPTION_ALL));
    rb_define_const(rb_cBigDecimal, "EXCEPTION_NaN",INT2FIX(VP_EXCEPTION_NaN));
    rb_define_const(rb_cBigDecimal, "EXCEPTION_INFINITY",INT2FIX(VP_EXCEPTION_INFINITY));
    rb_define_const(rb_cBigDecimal, "EXCEPTION_UNDERFLOW",INT2FIX(VP_EXCEPTION_UNDERFLOW));
    rb_define_const(rb_cBigDecimal, "EXCEPTION_OVERFLOW",INT2FIX(VP_EXCEPTION_OVERFLOW));
    rb_define_const(rb_cBigDecimal, "EXCEPTION_ZERODIVIDE",INT2FIX(VP_EXCEPTION_ZERODIVIDE));

    /* Computation mode */
    rb_define_const(rb_cBigDecimal, "ROUND_MODE",INT2FIX(VP_ROUND_MODE));
    rb_define_const(rb_cBigDecimal, "ROUND_UP",INT2FIX(VP_ROUND_UP));
    rb_define_const(rb_cBigDecimal, "ROUND_DOWN",INT2FIX(VP_ROUND_DOWN));
    rb_define_const(rb_cBigDecimal, "ROUND_HALF_UP",INT2FIX(VP_ROUND_HALF_UP));
    rb_define_const(rb_cBigDecimal, "ROUND_HALF_DOWN",INT2FIX(VP_ROUND_HALF_DOWN));
    rb_define_const(rb_cBigDecimal, "ROUND_CEILING",INT2FIX(VP_ROUND_CEIL));
    rb_define_const(rb_cBigDecimal, "ROUND_FLOOR",INT2FIX(VP_ROUND_FLOOR));
    rb_define_const(rb_cBigDecimal, "ROUND_HALF_EVEN",INT2FIX(VP_ROUND_HALF_EVEN));

    /* Constants for sign value */
    rb_define_const(rb_cBigDecimal, "SIGN_NaN",INT2FIX(VP_SIGN_NaN));
    rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_ZERO",INT2FIX(VP_SIGN_POSITIVE_ZERO));
    rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_ZERO",INT2FIX(VP_SIGN_NEGATIVE_ZERO));
    rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_FINITE",INT2FIX(VP_SIGN_POSITIVE_FINITE));
    rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_FINITE",INT2FIX(VP_SIGN_NEGATIVE_FINITE));
    rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_INFINITE",INT2FIX(VP_SIGN_POSITIVE_INFINITE));
    rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_INFINITE",INT2FIX(VP_SIGN_NEGATIVE_INFINITE));

    /* instance methods */
    rb_define_method(rb_cBigDecimal, "precs", BigDecimal_prec, 0);
    rb_define_method(rb_cBigDecimal, "add", BigDecimal_add2, 2);
    rb_define_method(rb_cBigDecimal, "sub", BigDecimal_sub2, 2);
    rb_define_method(rb_cBigDecimal, "mult", BigDecimal_mult2, 2);
    rb_define_method(rb_cBigDecimal, "div",BigDecimal_div2, -1);
    rb_define_method(rb_cBigDecimal, "hash", BigDecimal_hash, 0);
    rb_define_method(rb_cBigDecimal, "to_s", BigDecimal_to_s, -1);
    rb_define_method(rb_cBigDecimal, "to_i", BigDecimal_to_i, 0);
    rb_define_method(rb_cBigDecimal, "to_int", BigDecimal_to_i, 0);
    rb_define_method(rb_cBigDecimal, "split", BigDecimal_split, 0);
    rb_define_method(rb_cBigDecimal, "+", BigDecimal_add, 1);
    rb_define_method(rb_cBigDecimal, "-", BigDecimal_sub, 1);
    rb_define_method(rb_cBigDecimal, "+@", BigDecimal_uplus, 0);
    rb_define_method(rb_cBigDecimal, "-@", BigDecimal_neg, 0);
    rb_define_method(rb_cBigDecimal, "*", BigDecimal_mult, 1);
    rb_define_method(rb_cBigDecimal, "/", BigDecimal_div, 1);
    rb_define_method(rb_cBigDecimal, "quo", BigDecimal_div, 1);
    rb_define_method(rb_cBigDecimal, "%", BigDecimal_mod, 1);
    rb_define_method(rb_cBigDecimal, "modulo", BigDecimal_mod, 1);
    rb_define_method(rb_cBigDecimal, "remainder", BigDecimal_remainder, 1);
    rb_define_method(rb_cBigDecimal, "divmod", BigDecimal_divmod, 1);
    /* rb_define_method(rb_cBigDecimal, "dup", BigDecimal_dup, 0); */
    rb_define_method(rb_cBigDecimal, "to_f", BigDecimal_to_f, 0);
    rb_define_method(rb_cBigDecimal, "abs", BigDecimal_abs, 0);
    rb_define_method(rb_cBigDecimal, "sqrt", BigDecimal_sqrt, 1);
    rb_define_method(rb_cBigDecimal, "fix", BigDecimal_fix, 0);
    rb_define_method(rb_cBigDecimal, "round", BigDecimal_round, -1);
    rb_define_method(rb_cBigDecimal, "frac", BigDecimal_frac, 0);
    rb_define_method(rb_cBigDecimal, "floor", BigDecimal_floor, -1);
    rb_define_method(rb_cBigDecimal, "ceil", BigDecimal_ceil, -1);
    rb_define_method(rb_cBigDecimal, "power", BigDecimal_power, 1);
    rb_define_method(rb_cBigDecimal, "**", BigDecimal_power, 1);
    rb_define_method(rb_cBigDecimal, "<=>", BigDecimal_comp, 1);
    rb_define_method(rb_cBigDecimal, "==", BigDecimal_eq, 1);
    rb_define_method(rb_cBigDecimal, "===", BigDecimal_eq, 1);
    rb_define_method(rb_cBigDecimal, "eql?", BigDecimal_eq, 1);
    rb_define_method(rb_cBigDecimal, "!=", BigDecimal_ne, 1);
    rb_define_method(rb_cBigDecimal, "<", BigDecimal_lt, 1);
    rb_define_method(rb_cBigDecimal, "<=", BigDecimal_le, 1);
    rb_define_method(rb_cBigDecimal, ">", BigDecimal_gt, 1);
    rb_define_method(rb_cBigDecimal, ">=", BigDecimal_ge, 1);
    rb_define_method(rb_cBigDecimal, "zero?", BigDecimal_zero, 0);
    rb_define_method(rb_cBigDecimal, "nonzero?", BigDecimal_nonzero, 0);
    rb_define_method(rb_cBigDecimal, "coerce", BigDecimal_coerce, 1);
    rb_define_method(rb_cBigDecimal, "inspect", BigDecimal_inspect, 0);
    rb_define_method(rb_cBigDecimal, "exponent", BigDecimal_exponent, 0);
    rb_define_method(rb_cBigDecimal, "sign", BigDecimal_sign, 0);
    rb_define_method(rb_cBigDecimal, "nan?",      BigDecimal_IsNaN, 0);
    rb_define_method(rb_cBigDecimal, "infinite?", BigDecimal_IsInfinite, 0);
    rb_define_method(rb_cBigDecimal, "finite?",   BigDecimal_IsFinite, 0);
    rb_define_method(rb_cBigDecimal, "truncate",  BigDecimal_truncate, -1);
    rb_define_method(rb_cBigDecimal, "_dump", BigDecimal_dump, -1);
}

/*
 *
 *  ============================================================================
 *
 *  vp_ routines begin from here.
 *
 *  ============================================================================
 *
 */
#ifdef _DEBUG
/*static int gfDebug = 1;*/         /* Debug switch */
static int gfCheckVal = 1;      /* Value checking flag in VpNmlz()  */
#endif /* _DEBUG */

static U_LONG gnPrecLimit = 0;  /* Global upper limit of the precision newly allocated */
static U_LONG gfRoundMode = VP_ROUND_HALF_UP; /* Mode for general rounding operation   */

static U_LONG BASE_FIG = 4;     /* =log10(BASE)  */
static U_LONG BASE = 10000L;    /* Base value(value must be 10**BASE_FIG) */
                /* The value of BASE**2 + BASE must be represented */
                /* within one U_LONG. */
static U_LONG HALF_BASE = 5000L;/* =BASE/2  */
static S_LONG DBLE_FIG = 8;    /* figure of double */
static U_LONG BASE1 = 1000L;    /* =BASE/10  */

static Real *VpConstOne;    /* constant 1.0 */
static Real *VpPt5;        /* constant 0.5 */
static U_LONG maxnr = 100;    /* Maximum iterations for calcurating sqrt. */
                /* used in VpSqrt() */

/* ETC */
#define MemCmp(x,y,z) memcmp(x,y,z)
#define StrCmp(x,y)   strcmp(x,y)

static int VpIsDefOP(Real *c,Real *a,Real *b,int sw);
static int AddExponent(Real *a,S_INT n);
static U_LONG VpAddAbs(Real *a,Real *b,Real *c);
static U_LONG VpSubAbs(Real *a,Real *b,Real *c);
static U_LONG VpSetPTR(Real *a,Real *b,Real *c,U_LONG *a_pos,U_LONG *b_pos,U_LONG *c_pos,U_LONG *av,U_LONG *bv);
static int VpNmlz(Real *a);
static void VpFormatSt(char *psz,S_INT fFmt);
static int VpRdup(Real *m,U_LONG ind_m);

#ifdef _DEBUG
static int gnAlloc=0; /* Memory allocation counter */
#endif /* _DEBUG */

VP_EXPORT void *
VpMemAlloc(U_LONG mb)
{
    void *p = xmalloc((unsigned int)mb);
    if(!p) {
        VpException(VP_EXCEPTION_MEMORY,"failed to allocate memory",1);
    }
    memset(p,0,mb);
#ifdef _DEBUG
    gnAlloc++; /* Count allocation call */
#endif /* _DEBUG */
    return p;
}

VP_EXPORT void
VpFree(Real *pv)
{
    if(pv != NULL) {
        xfree(pv);
#ifdef _DEBUG
        gnAlloc--; /* Decrement allocation count */
        if(gnAlloc==0) {
            printf(" *************** All memories allocated freed ****************");
            getchar();
        }
        if(gnAlloc<0) {
            printf(" ??????????? Too many memory free calls(%d) ?????????????\n",gnAlloc);
            getchar();
        }
#endif /* _DEBUG */
    }
}

/*
 * EXCEPTION Handling.
 */
static unsigned short gfDoException = 0; /* Exception flag */

static unsigned short
VpGetException (void)
{
    return gfDoException;
}

static void
VpSetException(unsigned short f)
{
    gfDoException = f;
}

/* These 2 functions added at v1.1.7 */
VP_EXPORT U_LONG
VpGetPrecLimit(void)
{
    return gnPrecLimit;
}

VP_EXPORT U_LONG
VpSetPrecLimit(U_LONG n)
{
    U_LONG s = gnPrecLimit;
    gnPrecLimit = n;
    return s;
}

VP_EXPORT unsigned long
VpGetRoundMode(void)
{
    return gfRoundMode;
}

VP_EXPORT int
VpIsRoundMode(unsigned long n)
{
    if(n==VP_ROUND_UP      || n!=VP_ROUND_DOWN      ||
       n==VP_ROUND_HALF_UP || n!=VP_ROUND_HALF_DOWN ||
       n==VP_ROUND_CEIL    || n!=VP_ROUND_FLOOR     ||
       n==VP_ROUND_HALF_EVEN
      ) return 1;
    return 0;
}

VP_EXPORT unsigned long
VpSetRoundMode(unsigned long n)
{
    if(VpIsRoundMode(n)) gfRoundMode = n;
    return gfRoundMode;
}

/*
 *  0.0 & 1.0 generator
 *    These gZero_..... and gOne_..... can be any name
 *    referenced from nowhere except Zero() and One().
 *    gZero_..... and gOne_..... must have global scope
 *    (to let the compiler know they may be changed in outside
 *    (... but not actually..)).
 */
volatile double gZero_ABCED9B1_CE73__00400511F31D = 0.0;
volatile double gOne_ABCED9B4_CE73__00400511F31D  = 1.0;
static double
Zero(void)
{
    return gZero_ABCED9B1_CE73__00400511F31D;
}

static double
One(void)
{
    return gOne_ABCED9B4_CE73__00400511F31D;
}

VP_EXPORT U_LONG
VpBaseFig(void)
{
    return BASE_FIG;
}

VP_EXPORT U_LONG
VpDblFig(void)
{
    return DBLE_FIG;
}

VP_EXPORT U_LONG
VpBaseVal(void)
{
    return BASE;
}

/*
  ----------------------------------------------------------------
  Value of sign in Real structure is reserved for future use.
  short sign;
                    ==0 : NaN
                      1 : Positive zero
                     -1 : Negative zero
                      2 : Positive number
                     -2 : Negative number
                      3 : Positive infinite number
                     -3 : Negative infinite number
  ----------------------------------------------------------------
*/

VP_EXPORT double
VpGetDoubleNaN(void) /* Returns the value of NaN */
{
    static double fNaN = 0.0;
    if(fNaN==0.0) fNaN = Zero()/Zero();
    return fNaN;
}

VP_EXPORT double
VpGetDoublePosInf(void) /* Returns the value of +Infinity */
{
    static double fInf = 0.0;
    if(fInf==0.0) fInf = One()/Zero();
    return fInf;
}

VP_EXPORT double
VpGetDoubleNegInf(void) /* Returns the value of -Infinity */
{
    static double fInf = 0.0;
    if(fInf==0.0) fInf = -(One()/Zero());
    return fInf;
}

VP_EXPORT double
VpGetDoubleNegZero(void) /* Returns the value of -0 */
{
    static double nzero = 1000.0;
    if(nzero!=0.0) nzero = (One()/VpGetDoubleNegInf());
    return nzero;
}

VP_EXPORT int
VpIsNegDoubleZero(double v)
{
    double z = VpGetDoubleNegZero();
    return MemCmp(&v,&z,sizeof(v))==0;
}

VP_EXPORT int
VpException(unsigned short f,char *str,int always)
{
    VALUE exc;
    int   fatal=0;

    if(f==VP_EXCEPTION_OP || f==VP_EXCEPTION_MEMORY) always = 1;

    if(always||(gfDoException&f)) {
        switch(f)
        {
        /*
        case VP_EXCEPTION_ZERODIVIDE:
        case VP_EXCEPTION_OVERFLOW:
        */
        case VP_EXCEPTION_INFINITY:
             exc = rb_eFloatDomainError;
             goto raise;
        case VP_EXCEPTION_NaN:
             exc = rb_eFloatDomainError;
             goto raise;
        case VP_EXCEPTION_UNDERFLOW:
             exc = rb_eFloatDomainError;
             goto raise;
        case VP_EXCEPTION_OP:
             exc = rb_eFloatDomainError;
             goto raise;
        case VP_EXCEPTION_MEMORY:
             fatal = 1;
             goto raise;
        default:
             fatal = 1;
             goto raise;
        }
    }
    return 0; /* 0 Means VpException() raised no exception */

raise:
    if(fatal) rb_fatal(str);
    else   rb_raise(exc,str);
    return 0;
}

/* Throw exception or returns 0,when resulting c is Inf or NaN */
/*  sw=1:+ 2:- 3:* 4:/ */
static int
VpIsDefOP(Real *c,Real *a,Real *b,int sw)
{
    if(VpIsNaN(a) || VpIsNaN(b)) {
        /* at least a or b is NaN */
        VpSetNaN(c);
        goto NaN;
    }

    if(VpIsInf(a)) {
        if(VpIsInf(b)) {
            switch(sw)
            {
            case 1: /* + */
                if(VpGetSign(a)==VpGetSign(b)) {
                    VpSetInf(c,VpGetSign(a));
                    goto Inf;
                } else {
                    VpSetNaN(c);
                    goto NaN;
                }
            case 2: /* - */
                if(VpGetSign(a)!=VpGetSign(b)) {
                    VpSetInf(c,VpGetSign(a));
                    goto Inf;
                } else {
                    VpSetNaN(c);
                    goto NaN;
                }
                break;
            case 3: /* * */
                VpSetInf(c,VpGetSign(a)*VpGetSign(b));
                goto Inf;
                break;
            case 4: /* / */
                VpSetNaN(c);
                goto NaN;
            }
            VpSetNaN(c);
            goto NaN;
        }
        /* Inf op Finite */
        switch(sw)
        {
        case 1: /* + */
        case 2: /* - */
                VpSetInf(c,VpGetSign(a));
                break;
        case 3: /* * */
                if(VpIsZero(b)) {
                    VpSetNaN(c);
                    goto NaN;
                }
                VpSetInf(c,VpGetSign(a)*VpGetSign(b));
                break;
        case 4: /* / */
                VpSetInf(c,VpGetSign(a)*VpGetSign(b));
        }
        goto Inf;
    }

    if(VpIsInf(b)) {
        switch(sw)
        {
        case 1: /* + */
                VpSetInf(c,VpGetSign(b));
                break;
        case 2: /* - */
                VpSetInf(c,-VpGetSign(b));
                break;
        case 3: /* * */
                if(VpIsZero(a)) {
                    VpSetNaN(c);
                    goto NaN;
                }
                VpSetInf(c,VpGetSign(a)*VpGetSign(b));
                break;
        case 4: /* / */
                VpSetZero(c,VpGetSign(a)*VpGetSign(b));
        }
        goto Inf;
    }
    return 1; /* Results OK */

Inf:
    return VpException(VP_EXCEPTION_INFINITY,"Computation results to 'Infinity'",0);
NaN:
    return VpException(VP_EXCEPTION_NaN,"Computation results to 'NaN'",0);
}

/*
  ----------------------------------------------------------------
*/

/*
 *    returns number of chars needed to represent vp in specified format.
 */
VP_EXPORT U_LONG
VpNumOfChars(Real *vp,char *pszFmt)
{
    S_INT  ex;
    U_LONG nc;

    if(vp == NULL)   return BASE_FIG*2+6;
    if(!VpIsDef(vp)) return 32; /* not sure,may be OK */

    switch(*pszFmt)
    {
    case 'F':
         nc = BASE_FIG*(vp->Prec + 1)+2;
         ex = vp->exponent;
         if(ex<0) {
             nc += BASE_FIG*(-ex);
         } else {
             if(ex > (S_INT)vp->Prec) {
                 nc += BASE_FIG*(ex - (S_INT)vp->Prec);
             }
         }
         break;
    case 'E':
    default:
         nc = BASE_FIG*(vp->Prec + 2)+6; /* 3: sign + exponent chars */
    }
    return nc;
}

/*
 * Initializer for Vp routines and constants used.
 * [Input]
 *   BaseVal: Base value(assigned to BASE) for Vp calculation.
 *   It must be the form BaseVal=10**n.(n=1,2,3,...)
 *   If Base <= 0L,then the BASE will be calcurated so
 *   that BASE is as large as possible satisfying the
 *   relation MaxVal <= BASE*(BASE+1). Where the value
 *   MaxVal is the largest value which can be represented
 *   by one U_LONG word(LONG) in the computer used.
 *
 * [Returns]
 * DBLE_FIG   ... OK
 */
VP_EXPORT U_LONG
VpInit(U_LONG BaseVal)
{
    U_LONG w;
    double v;

    /* Setup +/- Inf  NaN -0 */
    VpGetDoubleNaN();
    VpGetDoublePosInf();
    VpGetDoubleNegInf();
    VpGetDoubleNegZero();

    if(BaseVal <= 0) {
        /* Base <= 0, then determine Base by calcuration. */
        BASE = 1;
        while(
               (BASE > 0) &&
               ((w = BASE *(BASE + 1)) > BASE) &&((w / BASE) ==(BASE + 1))
            ) {
            BaseVal = BASE;
            BASE = BaseVal * 10L;
        }
    }
    /* Set Base Values */
    BASE = BaseVal;
    HALF_BASE = BASE / 2;
    BASE1 = BASE / 10;
    BASE_FIG = 0;
    while(BaseVal /= 10) ++BASE_FIG;
    /* Allocates Vp constants. */
    VpConstOne = VpAlloc((U_LONG)1, "1");
    VpPt5 = VpAlloc((U_LONG)1, ".5");

#ifdef _DEBUG
    gnAlloc = 0;
#endif /* _DEBUG */

    /* Determine # of digits available in one 'double'. */

    v = 1.0;
    DBLE_FIG = 0;
    while(v + 1.0 > 1.0) {
        ++DBLE_FIG;
        v /= 10;
    }

#ifdef _DEBUG
    if(gfDebug) {
        printf("VpInit: BaseVal   = %lu\n", BaseVal);
        printf("  BASE   = %lu\n", BASE);
        printf("  HALF_BASE = %lu\n", HALF_BASE);
        printf("  BASE1  = %lu\n", BASE1);
        printf("  BASE_FIG  = %lu\n", BASE_FIG);
        printf("  DBLE_FIG  = %lu\n", DBLE_FIG);
    }
#endif /* _DEBUG */

    return DBLE_FIG;
}

VP_EXPORT Real *
VpOne()
{
    return VpConstOne;
}

/* If exponent overflows,then raise exception or returns 0 */
static int
AddExponent(Real *a,S_INT n)
{
    S_INT e = a->exponent;
    S_INT m = e+n;
    S_INT eb,mb;
    if(e>0) {
        if(n>0) {
            mb = m*BASE_FIG;
            eb = e*BASE_FIG;
            if(mb<eb) goto overflow;
        }
    } else if(n<0) {
        mb = m*BASE_FIG;
        eb = e*BASE_FIG;
        if(mb>eb) goto underflow;
    }
    a->exponent = m;
    return 1;

/* Overflow/Underflow ==> Raise exception or returns 0 */
underflow:
    VpSetZero(a,VpGetSign(a));
    return VpException(VP_EXCEPTION_UNDERFLOW,"Exponent underflow",0);

overflow:
    VpSetInf(a,VpGetSign(a));
    return VpException(VP_EXCEPTION_OVERFLOW,"Exponent overflow",0);
}

/*
 * Allocates variable.
 * [Input]
 *   mx ... allocation unit, if zero then mx is determined by szVal.
 *    The mx is the number of effective digits can to be stored.
 *   szVal ... value assigned(char). If szVal==NULL,then zero is assumed.
 *            If szVal[0]=='#' then Max. Prec. will not be considered(1.1.7),
 *            full precision specified by szVal is allocated.
 *
 * [Returns]
 *   Pointer to the newly allocated variable, or
 *   NULL be returned if memory allocation is failed,or any error.
 */
VP_EXPORT Real *
VpAlloc(U_LONG mx, char *szVal)
{
    U_LONG i, ni, ipn, ipf, nf, ipe, ne, nalloc;
    char v,*psz;
    int  sign=1;
    Real *vp = NULL;
    U_LONG mf = VpGetPrecLimit();

    mx = (mx + BASE_FIG - 1) / BASE_FIG + 1;    /* Determine allocation unit. */
    if(szVal) {
        while(ISSPACE(*szVal)) szVal++;
        if(*szVal!='#') {
             if(mf) {
                mf = (mf + BASE_FIG - 1) / BASE_FIG + 2; /* Needs 1 more for div */
                if(mx>mf) {
                    mx = mf;
                }
            }
        } else {
            ++szVal;
        }
    } else {
       /* necessary to be able to store */
       /* at least mx digits. */
       /* szVal==NULL ==> allocate zero value. */
       vp = (Real *) VpMemAlloc(sizeof(Real) + mx * sizeof(U_LONG));
       /* xmalloc() alway returns(or throw interruption) */
       vp->MaxPrec = mx;    /* set max precision */
       VpSetZero(vp,1);    /* initialize vp to zero. */
       return vp;
    }

    /* Skip all spaces */
    psz = ALLOCA_N(char,strlen(szVal)+1);
    i   = 0;
    ipn = 0;
    while(psz[i]=szVal[ipn]) {
        if(ISSPACE(szVal[ipn])) {ipn++;continue;}
        ++i; ++ipn;
    }
    szVal = psz;

    /* Check on Inf & NaN */
    if(StrCmp(szVal,SZ_PINF)==0 ||
       StrCmp(szVal,SZ_INF)==0 ) {
        vp = (Real *) VpMemAlloc(sizeof(Real) + sizeof(U_LONG));
        vp->MaxPrec = 1;    /* set max precision */
        VpSetPosInf(vp);
        return vp;
    }
    if(StrCmp(szVal,SZ_NINF)==0) {
        vp = (Real *) VpMemAlloc(sizeof(Real) + sizeof(U_LONG));
        vp->MaxPrec = 1;    /* set max precision */
        VpSetNegInf(vp);
        return vp;
    }
    if(StrCmp(szVal,SZ_NaN)==0) {
        vp = (Real *) VpMemAlloc(sizeof(Real) + sizeof(U_LONG));
        vp->MaxPrec = 1;    /* set max precision */
        VpSetNaN(vp);
        return vp;
    }

    /* check on number szVal[] */
    ipn = i = 0;
    if     (szVal[i] == '-') {sign=-1;++i;}
    else if(szVal[i] == '+')          ++i;
    /* Skip digits */
    ni = 0;            /* digits in mantissa */
    while(v = szVal[i]) {
        if(!ISDIGIT(v)) break;
        ++i;
        ++ni;
    }
    nf  = 0;
    ipf = 0;
    ipe = 0;
    ne  = 0;
    if(v) {
        /* other than digit nor \0 */
        if(szVal[i] == '.') {    /* xxx. */
            ++i;
            ipf = i;
            while(v = szVal[i]) {    /* get fraction part. */
                if(!ISDIGIT(v)) break;
                ++i;
                ++nf;
            }
        }
        ipe = 0;        /* Exponent */

        switch(szVal[i]) {
        case '\0': break;
        case 'e':
        case 'E':
        case 'd':
        case 'D':
            ++i;
            ipe = i;
            v = szVal[i];
            if((v == '-') ||(v == '+')) ++i;
            while(v=szVal[i]) {
                if(!ISDIGIT(v)) break;
                ++i;
                ++ne;
            }
            break;
        default:
            break;
        }
    }
    nalloc =(ni + nf + BASE_FIG - 1) / BASE_FIG + 1;    /* set effective allocation  */
    /* units for szVal[]  */
    if(mx <= 0) mx = 1;
    nalloc = Max(nalloc, mx);
    mx = nalloc;
    vp =(Real *) VpMemAlloc(sizeof(Real) + mx * sizeof(U_LONG));
    /* xmalloc() alway returns(or throw interruption) */
    vp->MaxPrec = mx;        /* set max precision */
    VpSetZero(vp,sign);
    VpCtoV(vp, &(szVal[ipn]), ni, &(szVal[ipf]), nf, &(szVal[ipe]), ne);
    return vp;
}

/*
 * Assignment(c=a).
 * [Input]
 *   a   ... RHSV
 *   isw ... switch for assignment.
 *    c = a  when isw > 0
 *    c = -a when isw < 0
 *    if c->MaxPrec < a->Prec,then round operation
 *    will be performed.
 * [Output]
 *  c  ... LHSV
 */
VP_EXPORT int
VpAsgn(Real *c, Real *a, int isw)
{
    U_LONG n;
    if(VpIsNaN(a)) {
        VpSetNaN(c);
        return 0;
    }
    if(VpIsInf(a)) {
        VpSetInf(c,isw*VpGetSign(a));
        return 0;
    }

    /* check if the RHS is zero */
    if(!VpIsZero(a)) {
        c->exponent = a->exponent;    /* store  exponent */
        VpSetSign(c,(isw*VpGetSign(a)));    /* set sign */
        n =(a->Prec < c->MaxPrec) ?(a->Prec) :(c->MaxPrec);
        c->Prec = n;
        memcpy(c->frac, a->frac, n * sizeof(U_LONG));
        /* Needs round ? */
        if(isw!=10) {
            /* Not in ActiveRound */
            if(c->Prec < a->Prec) {
               VpInternalRound(c,n,(n>0)?a->frac[n-1]:0,a->frac[n]);
            } else {
               VpLimitRound(c,0);
            }
        }
    } else {
        /* The value of 'a' is zero.  */
        VpSetZero(c,isw*VpGetSign(a));
        return 1;
    }
    return c->Prec*BASE_FIG;
}

/*
 *   c = a + b  when operation =  1 or 2
 *  = a - b  when operation = -1 or -2.
 *   Returns number of significant digits of c
 */
VP_EXPORT int
VpAddSub(Real *c, Real *a, Real *b, int operation)
{
    S_INT sw, isw;
    Real *a_ptr, *b_ptr;
    U_LONG n, na, nb, i;
    U_LONG mrv;

#ifdef _DEBUG
    if(gfDebug) {
        VPrint(stdout, "VpAddSub(enter) a=% \n", a);
        VPrint(stdout, "     b=% \n", b);
        printf(" operation=%d\n", operation);
    }
#endif /* _DEBUG */

    if(!VpIsDefOP(c,a,b,(operation>0)?1:2)) return 0; /* No significant digits */

    /* check if a or b is zero  */
    if(VpIsZero(a)) {
        /* a is zero,then assign b to c */
        if(!VpIsZero(b)) {
            VpAsgn(c, b, operation);
        } else {
            /* Both a and b are zero. */
            if(VpGetSign(a)<0 && operation*VpGetSign(b)<0) {
                /* -0 -0 */
                VpSetZero(c,-1);
            } else {
                VpSetZero(c,1);
            }
            return 1; /* 0: 1 significant digits */
        }
        return c->Prec*BASE_FIG;
    }
    if(VpIsZero(b)) {
        /* b is zero,then assign a to c. */
        VpAsgn(c, a, 1);
        return c->Prec*BASE_FIG;
    }

    if(operation < 0) sw = -1;
    else              sw =  1;

    /* compare absolute value. As a result,|a_ptr|>=|b_ptr| */
    if(a->exponent > b->exponent) {
        a_ptr = a;
        b_ptr = b;
    }         /* |a|>|b| */
    else if(a->exponent < b->exponent) {
        a_ptr = b;
        b_ptr = a;
    }                /* |a|<|b| */
    else {
        /* Exponent part of a and b is the same,then compare fraction */
        /* part */
        na = a->Prec;
        nb = b->Prec;
        n = Min(na, nb);
        for(i=0;i < n; ++i) {
            if(a->frac[i] > b->frac[i]) {
                a_ptr = a;
                b_ptr = b;
                goto end_if;
            } else if(a->frac[i] < b->frac[i]) {
                a_ptr = b;
                b_ptr = a;
                goto end_if;
            }
        }
        if(na > nb) {
         a_ptr = a;
            b_ptr = b;
            goto end_if;
        } else if(na < nb) {
            a_ptr = b;
            b_ptr = a;
            goto end_if;
        }
        /* |a| == |b| */
        if(VpGetSign(a) + sw *VpGetSign(b) == 0) {
            VpSetZero(c,1);        /* abs(a)=abs(b) and operation = '-'  */
            return c->Prec*BASE_FIG;
        }
        a_ptr = a;
        b_ptr = b;
    }

end_if:
    isw = VpGetSign(a) + sw *VpGetSign(b);
    /*
     *  isw = 0 ...( 1)+(-1),( 1)-( 1),(-1)+(1),(-1)-(-1)
     *      = 2 ...( 1)+( 1),( 1)-(-1)
     *      =-2 ...(-1)+(-1),(-1)-( 1)
     *   If isw==0, then c =(Sign a_ptr)(|a_ptr|-|b_ptr|)
     *              else c =(Sign ofisw)(|a_ptr|+|b_ptr|)
    */
    if(isw) {            /* addition */
        VpSetSign(c,(S_INT)1);
        mrv = VpAddAbs(a_ptr, b_ptr, c);
        VpSetSign(c,isw / 2);
    } else {            /* subtraction */
        VpSetSign(c,(S_INT)1);
        mrv = VpSubAbs(a_ptr, b_ptr, c);
        if(a_ptr == a) {
            VpSetSign(c,VpGetSign(a));
        } else    {
            VpSetSign(c,VpGetSign(a_ptr) * sw);
        }
    }
    VpInternalRound(c,0,(c->Prec>0)?c->frac[c->Prec-1]:0,mrv);

#ifdef _DEBUG
    if(gfDebug) {
        VPrint(stdout, "VpAddSub(result) c=% \n", c);
        VPrint(stdout, "     a=% \n", a);
        VPrint(stdout, "     b=% \n", b);
        printf(" operation=%d\n", operation);
    }
#endif /* _DEBUG */
    return c->Prec*BASE_FIG;
}

/*
 * Addition of two variable precisional variables
 * a and b assuming abs(a)>abs(b).
 *   c = abs(a) + abs(b) ; where |a|>=|b|
 */
static U_LONG
VpAddAbs(Real *a, Real *b, Real *c)
{
    U_LONG word_shift;
    U_LONG carry;
    U_LONG ap;
    U_LONG bp;
    U_LONG cp;
    U_LONG a_pos;
    U_LONG b_pos;
    U_LONG c_pos;
    U_LONG av, bv, mrv;

#ifdef _DEBUG
    if(gfDebug) {
        VPrint(stdout, "VpAddAbs called: a = %\n", a);
        VPrint(stdout, "     b = %\n", b);
    }
#endif /* _DEBUG */

    word_shift = VpSetPTR(a, b, c, &ap, &bp, &cp, &av, &bv);
    a_pos = ap;
    b_pos = bp;
    c_pos = cp;
    if(word_shift==-1L) return 0; /* Overflow */
    if(b_pos == -1L) goto Assign_a;

    mrv = av + bv; /* Most right val. Used for round. */

    /* Just assign the last few digits of b to c because a has no  */
    /* corresponding digits to be added. */
    while(b_pos + word_shift > a_pos) {
        --c_pos;
        if(b_pos > 0) {
            c->frac[c_pos] = b->frac[--b_pos];
        } else {
            --word_shift;
            c->frac[c_pos] = 0;
        }
    }

    /* Just assign the last few digits of a to c because b has no */
    /* corresponding digits to be added. */
    bv = b_pos + word_shift;
    while(a_pos > bv) {
        c->frac[--c_pos] = a->frac[--a_pos];
    }
    carry = 0;    /* set first carry be zero */

    /* Now perform addition until every digits of b will be */
    /* exhausted. */
    while(b_pos > 0) {
        c->frac[--c_pos] = a->frac[--a_pos] + b->frac[--b_pos] + carry;
        if(c->frac[c_pos] >= BASE) {
            c->frac[c_pos] -= BASE;
            carry = 1;
        } else {
            carry = 0;
        }
    }

    /* Just assign the first few digits of a with considering */
    /* the carry obtained so far because b has been exhausted. */
    while(a_pos > 0) {
        c->frac[--c_pos] = a->frac[--a_pos] + carry;
        if(c->frac[c_pos] >= BASE) {
            c->frac[c_pos] -= BASE;
            carry = 1;
        } else {
            carry = 0;
        }
    }
    if(c_pos) c->frac[c_pos - 1] += carry;
    goto Exit;

Assign_a:
    VpAsgn(c, a, 1);
    mrv = 0;

Exit:

#ifdef _DEBUG
    if(gfDebug) {
        VPrint(stdout, "VpAddAbs exit: c=% \n", c);
    }
#endif /* _DEBUG */
    return mrv;
}

/*
 * c = abs(a) - abs(b)
 */
static U_LONG
VpSubAbs(Real *a, Real *b, Real *c)
{
    U_LONG word_shift;
    U_LONG mrv;
    U_LONG borrow;
    U_LONG ap;
    U_LONG bp;
    U_LONG cp;
    U_LONG a_pos;
    U_LONG b_pos;
    U_LONG c_pos;
    U_LONG av, bv;

#ifdef _DEBUG
    if(gfDebug) {
        VPrint(stdout, "VpSubAbs called: a = %\n", a);
        VPrint(stdout, "     b = %\n", b);
    }
#endif /* _DEBUG */

    word_shift = VpSetPTR(a, b, c, &ap, &bp, &cp, &av, &bv);
    a_pos = ap;
    b_pos = bp;
    c_pos = cp;
    if(word_shift==-1L) return 0; /* Overflow */
    if(b_pos == -1L) goto Assign_a;

    if(av >= bv) {
        mrv = av - bv;
        borrow = 0;
    } else {
        mrv    = 0;
        borrow = 1;
    }

    /* Just assign the values which are the BASE subtracted by   */
    /* each of the last few digits of the b because the a has no */
    /* corresponding digits to be subtracted. */
    if(b_pos + word_shift > a_pos) {
        while(b_pos + word_shift > a_pos) {
            --c_pos;
            if(b_pos > 0) {
                c->frac[c_pos] = BASE - b->frac[--b_pos] - borrow;
            } else {
                --word_shift;
                c->frac[c_pos] = BASE - borrow;
            }
            borrow = 1;
        }
    }
    /* Just assign the last few digits of a to c because b has no */
    /* corresponding digits to subtract. */

    bv = b_pos + word_shift;
    while(a_pos > bv) {
        c->frac[--c_pos] = a->frac[--a_pos];
    }

    /* Now perform subtraction until every digits of b will be */
    /* exhausted. */
    while(b_pos > 0) {
        --c_pos;
        if(a->frac[--a_pos] < b->frac[--b_pos] + borrow) {
            c->frac[c_pos] = BASE + a->frac[a_pos] - b->frac[b_pos] - borrow;
            borrow = 1;
        } else {
            c->frac[c_pos] = a->frac[a_pos] - b->frac[b_pos] - borrow;
            borrow = 0;
        }
    }

    /* Just assign the first few digits of a with considering */
    /* the borrow obtained so far because b has been exhausted. */
    while(a_pos > 0) {
        --c_pos;
        if(a->frac[--a_pos] < borrow) {
            c->frac[c_pos] = BASE + a->frac[a_pos] - borrow;
            borrow = 1;
        } else {
            c->frac[c_pos] = a->frac[a_pos] - borrow;
            borrow = 0;
        }
    }
    if(c_pos) c->frac[c_pos - 1] -= borrow;
    goto Exit;

Assign_a:
    VpAsgn(c, a, 1);
    mrv = 0;

Exit:
#ifdef _DEBUG
    if(gfDebug) {
        VPrint(stdout, "VpSubAbs exit: c=% \n", c);
    }
#endif /* _DEBUG */
    return mrv;
}

/*
 * Note: If(av+bv)>= HALF_BASE,then 1 will be added to the least significant
 *    digit of c(In case of addition).
 * ------------------------- figure of output -----------------------------------
 *      a =  xxxxxxxxxxx
 *      b =    xxxxxxxxxx
 *      c =xxxxxxxxxxxxxxx
 *      word_shift =  |   |
 *      right_word =  |    | (Total digits in RHSV)
 *      left_word  = |   |   (Total digits in LHSV)
 *      a_pos      =    |
 *      b_pos      =     |
 *      c_pos      =      |
 */
static U_LONG
VpSetPTR(Real *a, Real *b, Real *c, U_LONG *a_pos, U_LONG *b_pos, U_LONG *c_pos, U_LONG *av, U_LONG *bv)
{
    U_LONG left_word, right_word, word_shift;
    c->frac[0] = 0;
    *av = *bv = 0;
    word_shift =((a->exponent) -(b->exponent));
    left_word = b->Prec + word_shift;
    right_word = Max((a->Prec),left_word);
    left_word =(c->MaxPrec) - 1;    /* -1 ... prepare for round up */
    /*
     * check if 'round' is needed.
     */
    if(right_word > left_word) {    /* round ? */
        /*---------------------------------
         *  Actual size of a = xxxxxxAxx
         *  Actual size of b = xxxBxxxxx
         *  Max. size of   c = xxxxxx
         *  Round off        =   |-----|
         *  c_pos            =   |
         *  right_word       =   |
         *  a_pos            =    |
         */
        *c_pos = right_word = left_word + 1;    /* Set resulting precision */
        /* be equal to that of c */
        if((a->Prec) >=(c->MaxPrec)) {
            /*
             *   a =  xxxxxxAxxx
             *   c =  xxxxxx
             *   a_pos =    |
             */
            *a_pos = left_word;
            *av = a->frac[*a_pos];    /* av is 'A' shown in above. */
        } else {
            /*
             *   a = xxxxxxx
             *   c = xxxxxxxxxx
             *  a_pos =     |
             */
            *a_pos = a->Prec;
        }
        if((b->Prec + word_shift) >= c->MaxPrec) {
            /*
             *   a = xxxxxxxxx
             *   b =  xxxxxxxBxxx
             *   c = xxxxxxxxxxx
             *  b_pos =   |
             */
            if(c->MaxPrec >=(word_shift + 1)) {
                *b_pos = c->MaxPrec - word_shift - 1;
                *bv = b->frac[*b_pos];
            } else {
                *b_pos = -1L;
            }
        } else {
            /*
             *   a = xxxxxxxxxxxxxxxx
             *   b =  xxxxxx
             *   c = xxxxxxxxxxxxx
             *  b_pos =     |
             */
            *b_pos = b->Prec;
        }
    } else {            /* The MaxPrec of c - 1 > The Prec of a + b  */
        /*
         *    a =   xxxxxxx
         *    b =   xxxxxx
         *    c = xxxxxxxxxxx
         *   c_pos =   |
         */
        *b_pos = b->Prec;
        *a_pos = a->Prec;
        *c_pos = right_word + 1;
    }
    c->Prec = *c_pos;
    c->exponent = a->exponent;
    if(!AddExponent(c,(S_LONG)1)) return (-1L);
    return word_shift;
}

/*
 * Return number og significant digits
 *       c = a * b , Where a = a0a1a2 ... an
 *             b = b0b1b2 ... bm
 *             c = c0c1c2 ... cl
 *          a0 a1 ... an   * bm
 *       a0 a1 ... an   * bm-1
 *         .   .    .
 *       .   .   .
 *        a0 a1 .... an    * b0
 *      +_____________________________
 *     c0 c1 c2  ......  cl
 *     nc      <---|
 *     MaxAB |--------------------|
 */
VP_EXPORT int
VpMult(Real *c, Real *a, Real *b)
{
    U_LONG MxIndA, MxIndB, MxIndAB, MxIndC;
    U_LONG ind_c, i, ii, nc;
    U_LONG ind_as, ind_ae, ind_bs, ind_be;
    U_LONG Carry, s;
    Real *w;

#ifdef _DEBUG
    if(gfDebug) {
        VPrint(stdout, "VpMult(Enter): a=% \n", a);
        VPrint(stdout, "      b=% \n", b);
    }
#endif /* _DEBUG */

    if(!VpIsDefOP(c,a,b,3)) return 0; /* No significant digit */

    if(VpIsZero(a) || VpIsZero(b)) {
        /* at least a or b is zero */
        VpSetZero(c,VpGetSign(a)*VpGetSign(b));
        return 1; /* 0: 1 significant digit */
    }

    if(VpIsOne(a)) {
        VpAsgn(c, b, VpGetSign(a));
        goto Exit;
    }
    if(VpIsOne(b)) {
        VpAsgn(c, a, VpGetSign(b));
        goto Exit;
    }
    if((b->Prec) >(a->Prec)) {
        /* Adjust so that digits(a)>digits(b) */
        w = a;
        a = b;
        b = w;
    }
    w = NULL;
    MxIndA = a->Prec - 1;
    MxIndB = b->Prec - 1;
    MxIndC = c->MaxPrec - 1;
    MxIndAB = a->Prec + b->Prec - 1;

    if(MxIndC < MxIndAB) {    /* The Max. prec. of c < Prec(a)+Prec(b) */
        w = c;
        c = VpAlloc((U_LONG)((MxIndAB + 1) * BASE_FIG), "#0");
        MxIndC = MxIndAB;
    }

    /* set LHSV c info */

    c->exponent = a->exponent;    /* set exponent */
    if(!AddExponent(c,b->exponent)) return 0;
    VpSetSign(c,VpGetSign(a)*VpGetSign(b));    /* set sign  */
    Carry = 0;
    nc = ind_c = MxIndAB;
    memset(c->frac, 0, (nc + 1) * sizeof(U_LONG));        /* Initialize c  */
    c->Prec = nc + 1;        /* set precision */
    for(nc = 0; nc < MxIndAB; ++nc, --ind_c) {
        if(nc < MxIndB) {    /* The left triangle of the Fig. */
            ind_as = MxIndA - nc;
            ind_ae = MxIndA;
            ind_bs = MxIndB;
            ind_be = MxIndB - nc;
        } else if(nc <= MxIndA) {    /* The middle rectangular of the Fig. */
            ind_as = MxIndA - nc;
            ind_ae = MxIndA -(nc - MxIndB);
            ind_bs = MxIndB;
            ind_be = 0;
        } else if(nc > MxIndA) {    /*  The right triangle of the Fig. */
            ind_as = 0;
            ind_ae = MxIndAB - nc - 1;
            ind_bs = MxIndB -(nc - MxIndA);
            ind_be = 0;
        }

        for(i = ind_as; i <= ind_ae; ++i) {
            s =((a->frac[i]) *(b->frac[ind_bs--]));
            Carry = s / BASE;
            s = s -(Carry * BASE);
            c->frac[ind_c] += s;
            if(c->frac[ind_c] >= BASE) {
                s = c->frac[ind_c] / BASE;
                Carry += s;
                c->frac[ind_c] -= (s * BASE);
            }
            if(Carry) {
                ii = ind_c;
                while((--ii) >= 0) {
                    c->frac[ii] += Carry;
                    if(c->frac[ii] >= BASE) {
                        Carry = c->frac[ii] / BASE;
                        c->frac[ii] -=(Carry * BASE);
                    } else {
                        break;
                    }
                }
            }
        }
    }
    if(w != NULL) {        /* free work variable */
        VpNmlz(c);
        VpAsgn(w, c, 1);
        VpFree(c);
        c = w;
    } else {
        VpLimitRound(c,0);
    }

Exit:
#ifdef _DEBUG
    if(gfDebug) {
        VPrint(stdout, "VpMult(c=a*b): c=% \n", c);
        VPrint(stdout, "      a=% \n", a);
        VPrint(stdout, "      b=% \n", b);
    }
#endif /*_DEBUG */
    return c->Prec*BASE_FIG;
}

/*
 *   c = a / b,  remainder = r
 */
VP_EXPORT int
VpDivd(Real *c, Real *r, Real *a, Real *b)
{
    U_LONG word_a, word_b, word_c, word_r;
    U_LONG i, n, ind_a, ind_b, ind_c, ind_r;
    U_LONG nLoop;
    U_LONG q, b1, b1p1, b1b2, b1b2p1, r1r2;
    U_LONG borrow, borrow1, borrow2, qb;

#ifdef _DEBUG
    if(gfDebug) {
        VPrint(stdout, " VpDivd(c=a/b)  a=% \n", a);
        VPrint(stdout, "    b=% \n", b);
    }
#endif /*_DEBUG */

    VpSetNaN(r);
    if(!VpIsDefOP(c,a,b,4)) goto Exit;
    if(VpIsZero(a)&&VpIsZero(b)) {
        VpSetNaN(c);
        return VpException(VP_EXCEPTION_NaN,"(VpDivd) 0/0 not defined(NaN)",0);
    }
    if(VpIsZero(b)) {
        VpSetInf(c,VpGetSign(a)*VpGetSign(b));
        return VpException(VP_EXCEPTION_ZERODIVIDE,"(VpDivd) Divide by zero",0);
    }
    if(VpIsZero(a)) {
        /* numerator a is zero  */
        VpSetZero(c,VpGetSign(a)*VpGetSign(b));
        VpSetZero(r,VpGetSign(a)*VpGetSign(b));
        goto Exit;
    }
    if(VpIsOne(b)) {
        /* divide by one  */
        VpAsgn(c, a, VpGetSign(b));
        VpSetZero(r,VpGetSign(a));
        goto Exit;
    }

    word_a = a->Prec;
    word_b = b->Prec;
    word_c = c->MaxPrec;
    word_r = r->MaxPrec;

    ind_c = 0;
    ind_r = 1;

    if(word_a >= word_r) goto space_error;

    r->frac[0] = 0;
    while(ind_r <= word_a) {
        r->frac[ind_r] = a->frac[ind_r - 1];
        ++ind_r;
    }

    while(ind_r < word_r) r->frac[ind_r++] = 0;
    while(ind_c < word_c) c->frac[ind_c++] = 0;

    /* initial procedure */
    b1 = b1p1 = b->frac[0];
    if(b->Prec <= 1) {
        b1b2p1 = b1b2 = b1p1 * BASE;
    } else {
        b1p1 = b1 + 1;
        b1b2p1 = b1b2 = b1 * BASE + b->frac[1];
        if(b->Prec > 2) ++b1b2p1;
    }

    /* */
    /* loop start */
    ind_c = word_r - 1;
    nLoop = Min(word_c,ind_c);
    ind_c = 1;
    while(ind_c < nLoop) {
        if(r->frac[ind_c] == 0) {
            ++ind_c;
            continue;
        }
        r1r2 = r->frac[ind_c] * BASE + r->frac[ind_c + 1];
        if(r1r2 == b1b2) {
            /* The first two word digits is the same */
            ind_b = 2;
            ind_a = ind_c + 2;
            while(ind_b < word_b) {
                if(r->frac[ind_a] < b->frac[ind_b]) goto div_b1p1;
                if(r->frac[ind_a] > b->frac[ind_b]) break;
                ++ind_a;
                ++ind_b;
            }
            /* The first few word digits of r and b is the same and */
            /* the first different word digit of w is greater than that */
            /* of b, so quotinet is 1 and just subtract b from r. */
            borrow = 0;        /* quotient=1, then just r-b */
            ind_b = b->Prec - 1;
            ind_r = ind_c + ind_b;
            if(ind_r >= word_r) goto space_error;
            n = ind_b;
            for(i = 0; i <= n; ++i) {
                if(r->frac[ind_r] < b->frac[ind_b] + borrow) {
                    r->frac[ind_r] +=(BASE -(b->frac[ind_b] + borrow));
                    borrow = 1;
                } else {
                    r->frac[ind_r] = r->frac[ind_r] - b->frac[ind_b] - borrow;
                    borrow = 0;
                }
                --ind_r;
                --ind_b;
            }
            ++(c->frac[ind_c]);
            goto carry;
        }
        /* The first two word digits is not the same, */
        /* then compare magnitude, and divide actually. */
        if(r1r2 >= b1b2p1) {
            q = r1r2 / b1b2p1;
            c->frac[ind_c] += q;
            ind_r = b->Prec + ind_c - 1;
            goto sub_mult;
        }

div_b1p1:
        if(ind_c + 1 >= word_c) goto out_side;
        q = r1r2 / b1p1;
        c->frac[ind_c + 1] += q;
        ind_r = b->Prec + ind_c;

sub_mult:
        borrow1 = borrow2 = 0;
        ind_b = word_b - 1;
        if(ind_r >= word_r) goto space_error;
        n = ind_b;
        for(i = 0; i <= n; ++i) {
            /* now, perform r = r - q * b */
            qb = q *(b->frac[ind_b]);
            if(qb < BASE) borrow1 = 0;
            else {
                borrow1 = qb / BASE;
                qb = qb - borrow1 * BASE;
            }
            if(r->frac[ind_r] < qb) {
                r->frac[ind_r] +=(BASE - qb);
                borrow2 = borrow2 + borrow1 + 1;
            } else {
                r->frac[ind_r] -= qb;
                borrow2 += borrow1;
            }
            if(borrow2) {
                if(r->frac[ind_r - 1] < borrow2) {
                    r->frac[ind_r - 1] +=(BASE - borrow2);
                    borrow2 = 1;
                } else {
                    r->frac[ind_r - 1] -= borrow2;
                    borrow2 = 0;
                }
            }
            --ind_r;
            --ind_b;
        }

        r->frac[ind_r] -= borrow2;
carry:
        ind_r = ind_c;
        while(c->frac[ind_r] >= BASE) {
            c->frac[ind_r] -= BASE;
            --ind_r;
            ++(c->frac[ind_r]);
        }
    }
    /* End of operation, now final arrangement */
out_side:
    c->Prec = word_c;
    c->exponent = a->exponent;
    if(!AddExponent(c,(S_LONG)2))   return 0;
    if(!AddExponent(c,-(b->exponent))) return 0;

    VpSetSign(c,VpGetSign(a)*VpGetSign(b));
    VpNmlz(c);            /* normalize c */
    r->Prec = word_r;
    r->exponent = a->exponent;
    if(!AddExponent(r,(S_LONG)1)) return 0;
    VpSetSign(r,VpGetSign(a));
    VpNmlz(r);            /* normalize r(remainder) */
    goto Exit;

space_error:
#ifdef _DEBUG
    if(gfDebug) {
        printf("   word_a=%lu\n", word_a);
        printf("   word_b=%lu\n", word_b);
        printf("   word_c=%lu\n", word_c);
        printf("   word_r=%lu\n", word_r);
        printf("   ind_r =%lu\n", ind_r);
    }
#endif /* _DEBUG */
    rb_bug("ERROR(VpDivd): space for remainder too small.");

Exit:
#ifdef _DEBUG
    if(gfDebug) {
        VPrint(stdout, " VpDivd(c=a/b), c=% \n", c);
        VPrint(stdout, "    r=% \n", r);
    }
#endif /* _DEBUG */
    return c->Prec*BASE_FIG;
}

/*
 *  Input  a = 00000xxxxxxxx En(5 preceeding zeros)
 *  Output a = xxxxxxxx En-5
 */
static int
VpNmlz(Real *a)
{
    U_LONG ind_a, i;

    if(!VpIsDef(a)) goto NoVal;
    if(VpIsZero(a)) goto NoVal;

    ind_a = a->Prec;
    while(ind_a--) {
        if(a->frac[ind_a]) {
            a->Prec = ind_a + 1;
            i = 0;
            while(a->frac[i] == 0) ++i;        /* skip the first few zeros */
            if(i) {
                a->Prec -= i;
                if(!AddExponent(a,-((S_INT)i))) return 0;
                memmove(&(a->frac[0]),&(a->frac[i]),(a->Prec)*sizeof(U_LONG));
            }
            return 1;
        }
    }
    /* a is zero(no non-zero digit) */
    VpSetZero(a,VpGetSign(a));
    return 0;

NoVal:
    a->frac[0] = 0;
    a->Prec=1;
    return 0;
}

/*
 *  VpComp = 0  ... if a=b,
 *   Pos  ... a>b,
 *   Neg  ... a<b.
 *   999  ... result undefined(NaN)
 */
VP_EXPORT int
VpComp(Real *a, Real *b)
{
    int val;
    U_LONG mx, ind;
    int e;
    val = 0;
    if(VpIsNaN(a)||VpIsNaN(b)) return 999;
    if(!VpIsDef(a)) {
        if(!VpIsDef(b)) e = a->sign - b->sign;
        else             e = a->sign;
        if(e>0)   return  1;
        else if(e<0) return -1;
        else   return  0;
    }
    if(!VpIsDef(b)) {
        e = -b->sign;
        if(e>0) return  1;
        else return -1;
    }
    /* Zero check */
    if(VpIsZero(a)) {
        if(VpIsZero(b))      return 0; /* both zero */
        val = -VpGetSign(b);
        goto Exit;
    }
    if(VpIsZero(b)) {
        val = VpGetSign(a);
        goto Exit;
    }

    /* compare sign */
    if(VpGetSign(a) > VpGetSign(b)) {
        val = 1;        /* a>b */
        goto Exit;
    }
    if(VpGetSign(a) < VpGetSign(b)) {
        val = -1;        /* a<b */
        goto Exit;
    }

    /* a and b have same sign, && signe!=0,then compare exponent */
    if((a->exponent) >(b->exponent)) {
        val = VpGetSign(a);
        goto Exit;
    }
    if((a->exponent) <(b->exponent)) {
        val = -VpGetSign(b);
        goto Exit;
    }

    /* a and b have same exponent, then compare significand. */
    mx =((a->Prec) <(b->Prec)) ?(a->Prec) :(b->Prec);
    ind = 0;
    while(ind < mx) {
        if((a->frac[ind]) >(b->frac[ind])) {
            val = VpGetSign(a);
         goto Exit;
        }
        if((a->frac[ind]) <(b->frac[ind])) {
            val = -VpGetSign(b);
            goto Exit;
        }
        ++ind;
    }
    if((a->Prec) >(b->Prec)) {
        val = VpGetSign(a);
    } else if((a->Prec) <(b->Prec)) {
        val = -VpGetSign(b);
    }

Exit:
    if  (val> 1) val =  1;
    else if(val<-1) val = -1;

#ifdef _DEBUG
    if(gfDebug) {
        VPrint(stdout, " VpComp a=%\n", a);
        VPrint(stdout, "  b=%\n", b);
        printf("  ans=%d\n", val);
    }
#endif /* _DEBUG */
    return (int)val;
}

#ifdef _DEBUG
/*
 *    cntl_chr ... ASCIIZ Character, print control characters
 *     Available control codes:
 *      %  ... VP variable. To print '%', use '%%'.
 *      \n ... new line
 *      \b ... backspace
 *           ... tab
 *     Note: % must must not appear more than once
 *    a  ... VP variable to be printed
 */
VP_EXPORT int
VPrint(FILE *fp, char *cntl_chr, Real *a)
{
    U_LONG i, j, nc, nd, ZeroSup;
    U_LONG n, m, e, nn;

    /* Check if NaN & Inf. */
    if(VpIsNaN(a)) {
        fprintf(fp,SZ_NaN);
        return 8;
    }
    if(VpIsPosInf(a)) {
        fprintf(fp,SZ_INF);
        return 8;
    }
    if(VpIsNegInf(a)) {
        fprintf(fp,SZ_NINF);
        return 9;
    }
    if(VpIsZero(a)) {
        fprintf(fp,"0.0");
        return 3;
    }

    j = 0;
    nd = nc = 0;        /*  nd : number of digits in fraction part(every 10 digits, */
    /*    nd<=10). */
    /*  nc : number of caracters printed  */
    ZeroSup = 1;        /* Flag not to print the leading zeros as 0.00xxxxEnn */
    while(*(cntl_chr + j)) {
        if((*(cntl_chr + j) == '%') &&(*(cntl_chr + j + 1) != '%')) {
         nc = 0;
         if(!VpIsZero(a)) {
                if(VpGetSign(a) < 0) {
                    fprintf(fp, "-");
                    ++nc;
                }
                nc += fprintf(fp, "0.");
                n = a->Prec;
                for(i=0;i < n;++i) {
                 m = BASE1;
                    e = a->frac[i];
                    while(m) {
                        nn = e / m;
                        if((!ZeroSup) || nn) {
                            nc += fprintf(fp, "%lu", nn);    /* The reading zero(s) */
                            /* as 0.00xx will not */
                            /* be printed. */
                            ++nd;
                            ZeroSup = 0;    /* Set to print succeeding zeros */
                        }
                        if(nd >= 10) {    /* print ' ' after every 10 digits */
                            nd = 0;
                            nc += fprintf(fp, " ");
                        }
                        e = e - nn * m;
                        m /= 10;
                    }
                }
                nc += fprintf(fp, "E%ld", VpExponent10(a));
            } else {
                nc += fprintf(fp, "0.0");
            }
        } else {
            ++nc;
            if(*(cntl_chr + j) == '\\') {
                switch(*(cntl_chr + j + 1)) {
                case 'n':
                    fprintf(fp, "\n");
                    ++j;
                    break;
                case 't':
                    fprintf(fp, "\t");
                    ++j;
                 break;
                case 'b':
                    fprintf(fp, "\n");
                    ++j;
                    break;
                default:
                    fprintf(fp, "%c", *(cntl_chr + j));
                    break;
                }
            } else {
                fprintf(fp, "%c", *(cntl_chr + j));
                if(*(cntl_chr + j) == '%') ++j;
            }
        }
        j++;
    }
    return (int)nc;
}
#endif /* _DEBUG */

static void
VpFormatSt(char *psz,S_INT fFmt)
{
    U_LONG ie;
    U_LONG i;
    S_INT nf = 0;
    char ch;

    if(fFmt<=0) return;

    ie = strlen(psz);
    for(i = 0; i < ie; ++i) {
        ch = psz[i];
        if(!ch) break;
        if(ISSPACE(ch) || ch=='-' || ch=='+') continue;
        if(ch == '.')                { nf = 0;continue;}
        if(ch == 'E') break;
        nf++;
        if(nf > fFmt) {
            memmove(psz + i + 1, psz + i, ie - i + 1);
            ++ie;
            nf = 0;
            psz[i] = ' ';
        }
    }
}

VP_EXPORT S_LONG
VpExponent10(Real *a)
{
    S_LONG ex;
    U_LONG n;

    if(!VpHasVal(a)) return 0;

    ex =(a->exponent) * BASE_FIG;
    n = BASE1;
    while((a->frac[0] / n) == 0) {
         --ex;
         n /= 10;
    }
    return ex;
}

VP_EXPORT void
VpSzMantissa(Real *a,char *psz)
{
    U_LONG i, ZeroSup;
    U_LONG n, m, e, nn;

    if(VpIsNaN(a)) {
        sprintf(psz,SZ_NaN);
        return;
    }
    if(VpIsPosInf(a)) {
        sprintf(psz,SZ_INF);
        return;
    }
    if(VpIsNegInf(a)) {
        sprintf(psz,SZ_NINF);
        return;
    }

    ZeroSup = 1;        /* Flag not to print the leading zeros as 0.00xxxxEnn */
    if(!VpIsZero(a)) {
        if(VpGetSign(a) < 0) *psz++ = '-';
        n = a->Prec;
        for(i=0;i < n;++i) {
            m = BASE1;
            e = a->frac[i];
            while(m) {
                nn = e / m;
                if((!ZeroSup) || nn) {
                    sprintf(psz, "%lu", nn);    /* The reading zero(s) */
                    psz += strlen(psz);
                    /* as 0.00xx will be ignored. */
                    ZeroSup = 0;    /* Set to print succeeding zeros */
                }
                e = e - nn * m;
                m /= 10;
            }
        }
        *psz = 0;
        while(psz[-1]=='0') *(--psz) = 0;
    } else {
        if(VpIsPosZero(a)) sprintf(psz, "0");
        else      sprintf(psz, "-0");
    }
}

VP_EXPORT int
VpToSpecialString(Real *a,char *psz,int fPlus)
/* fPlus =0:default, =1: set ' ' before digits , =2: set '+' before digits. */
{
    if(VpIsNaN(a)) {
        sprintf(psz,SZ_NaN);
        return 1;
    }

    if(VpIsPosInf(a)) {
        if(fPlus==1) {
           *psz++ = ' ';
        } else if(fPlus==2) {
           *psz++ = '+';
        }
        sprintf(psz,SZ_INF);
        return 1;
    }
    if(VpIsNegInf(a)) {
        sprintf(psz,SZ_NINF);
        return 1;
    }
    if(VpIsZero(a)) {
        if(VpIsPosZero(a)) {
            if(fPlus==1)      sprintf(psz, " 0.0");
            else if(fPlus==2) sprintf(psz, "+0.0");
            else              sprintf(psz, "0.0");
        } else    sprintf(psz, "-0.0");
        return 1;
    }
    return 0;
}

VP_EXPORT void
VpToString(Real *a,char *psz,int fFmt,int fPlus)
/* fPlus =0:default, =1: set ' ' before digits , =2:set '+' before digits. */
{
    U_LONG i, ZeroSup;
    U_LONG n, m, e, nn;
    char *pszSav = psz;
    S_LONG ex;

    if(VpToSpecialString(a,psz,fPlus)) return;

    ZeroSup = 1;    /* Flag not to print the leading zeros as 0.00xxxxEnn */

    if(VpGetSign(a) < 0) *psz++ = '-';
    else if(fPlus==1)    *psz++ = ' ';
    else if(fPlus==2)    *psz++ = '+';

    *psz++ = '0';
    *psz++ = '.';
    n = a->Prec;
    for(i=0;i < n;++i) {
        m = BASE1;
        e = a->frac[i];
        while(m) {
            nn = e / m;
            if((!ZeroSup) || nn) {
                sprintf(psz, "%lu", nn);    /* The reading zero(s) */
                psz += strlen(psz);
                /* as 0.00xx will be ignored. */
                ZeroSup = 0;    /* Set to print succeeding zeros */
            }
            e = e - nn * m;
            m /= 10;
        }
    }
    ex =(a->exponent) * BASE_FIG;
    n = BASE1;
    while((a->frac[0] / n) == 0) {
        --ex;
        n /= 10;
    }
    while(psz[-1]=='0') *(--psz) = 0;
    sprintf(psz, "E%ld", ex);
    if(fFmt) VpFormatSt(pszSav, fFmt);
}

VP_EXPORT void
VpToFString(Real *a,char *psz,int fFmt,int fPlus)
/* fPlus =0:default,=1: set ' ' before digits ,set '+' before digits. */
{
    U_LONG i;
    U_LONG n, m, e, nn;
    char *pszSav = psz;
    S_LONG ex;

    if(VpToSpecialString(a,psz,fPlus)) return;

    if(VpGetSign(a) < 0) *psz++ = '-';
    else if(fPlus==1)    *psz++ = ' ';
    else if(fPlus==2)    *psz++ = '+';

    n  = a->Prec;
    ex = a->exponent;
    if(ex<=0) {
       *psz++ = '0';*psz++ = '.';
       while(ex<0) {
          for(i=0;i<BASE_FIG;++i) *psz++ = '0';
          ++ex;
       }
       ex = -1;
    }

    for(i=0;i < n;++i) {
       --ex;
       if(i==0 && ex >= 0) {
           sprintf(psz, "%lu", a->frac[i]);
           psz += strlen(psz);
       } else {
           m = BASE1;
           e = a->frac[i];
           while(m) {
               nn = e / m;
               *psz++ = (char)(nn + '0');
               e = e - nn * m;
               m /= 10;
           }
       }
       if(ex == 0) *psz++ = '.';
    }
    while(--ex>=0) {
       m = BASE;
       while(m/=10) *psz++ = '0';
       if(ex == 0) *psz++ = '.';
    }
    *psz = 0;
    while(psz[-1]=='0') *(--psz) = 0;
    if(psz[-1]=='.') sprintf(psz, "0");
    if(fFmt) VpFormatSt(pszSav, fFmt);
}

/*
 *  [Output]
 *   a[]  ... variable to be assigned the value.
 *  [Input]
 *   int_chr[]  ... integer part(may include '+/-').
 *   ni   ... number of characters in int_chr[],not including '+/-'.
 *   frac[]  ... fraction part.
 *   nf   ... number of characters in frac[].
 *   exp_chr[]  ... exponent part(including '+/-').
 *   ne   ... number of characters in exp_chr[],not including '+/-'.
 */
VP_EXPORT int
VpCtoV(Real *a, char *int_chr, U_LONG ni, char *frac, U_LONG nf, char *exp_chr, U_LONG ne)
{
    U_LONG i, j, ind_a, ma, mi, me;
    U_LONG loc;
    S_INT  e,es, eb, ef;
    S_INT  sign, signe;
    /* get exponent part */
    e = 0;
    ma = a->MaxPrec;
    mi = ni;
    me = ne;
    signe = 1;
    memset(a->frac, 0, ma * sizeof(U_LONG));
    if(ne > 0) {
        i = 0;
        if(exp_chr[0] == '-') {
            signe = -1;
            ++i;
            ++me;
        } else if(exp_chr[0] == '+') {
            ++i;
            ++me;
        }
        while(i < me) {
            es = e*((S_INT)BASE_FIG);
            e = e * 10 + exp_chr[i] - '0';
            if(es>e*((S_INT)BASE_FIG)) {
                return VpException(VP_EXCEPTION_INFINITY,"exponent overflow",0);
            }
            ++i;
        }
    }

    /* get integer part */
    i = 0;
    sign = 1;
    if(ni > 0) {
        if(int_chr[0] == '-') {
            sign = -1;
            ++i;
            ++mi;
        } else if(int_chr[0] == '+') {
            ++i;
            ++mi;
        }
    }

    e = signe * e;        /* e: The value of exponent part. */
    e = e + ni;        /* set actual exponent size. */

    if(e > 0)    signe = 1;
    else        signe = -1;

    /* Adjust the exponent so that it is the multiple of BASE_FIG. */
    j = 0;
    ef = 1;
    while(ef) {
        if(e>=0) eb =  e;
        else  eb = -e;
        ef = eb / ((S_INT)BASE_FIG);
        ef = eb - ef * ((S_INT)BASE_FIG);
        if(ef) {
            ++j;        /* Means to add one more preceeding zero */
            ++e;
        }
    }

    eb = e / ((S_INT)BASE_FIG);

    ind_a = 0;
    while(i < mi) {
        a->frac[ind_a] = 0;
        while((j < (U_LONG)BASE_FIG) &&(i < mi)) {
            a->frac[ind_a] = a->frac[ind_a] * 10 + int_chr[i] - '0';
            ++j;
            ++i;
        }
        if(i < mi) {
            ++ind_a;
            if(ind_a >= ma) goto over_flow;
            j = 0;
        }
    }
    loc = 1;

    /* get fraction part */

    i = 0;
    while(i < nf) {
        while((j < (U_LONG)BASE_FIG) &&(i < nf)) {
            a->frac[ind_a] = a->frac[ind_a] * 10 + frac[i] - '0';
            ++j;
            ++i;
        }
        if(i < nf) {
            ++ind_a;
            if(ind_a >= ma) goto over_flow;
            j = 0;
        }
    }
    goto Final;

over_flow:
    rb_warn("Conversion from String to BigDecimal overflow (last few digits discarded).");

Final:
    if(ind_a >= ma) ind_a = ma - 1;
    while(j < (U_LONG)BASE_FIG) {
        a->frac[ind_a] = a->frac[ind_a] * 10;
        ++j;
    }
    a->Prec = ind_a + 1;
    a->exponent = eb;
    VpSetSign(a,sign);
    VpNmlz(a);
    return 1;
}

/*
 * [Input]
 *   *m  ... Real
 * [Output]
 *   *d  ... fraction part of m(d = 0.xxxxxxx). where # of 'x's is fig.
 *   *e  ... U_LONG,exponent of m.
 * DBLE_FIG ... Number of digits in a double variable.
 *
 *  m -> d*10**e, 0<d<BASE
 * [Returns]
 *   0 ... Zero
 *   1 ... Normal
 *   2 ... Infinity
 *  -1 ... NaN
 */
VP_EXPORT int
VpVtoD(double *d, S_LONG *e, Real *m)
{
    U_LONG ind_m, mm, fig;
    double div;
    int    f = 1;

    if(VpIsNaN(m)) {
        *d = VpGetDoubleNaN();
        *e = 0;
        f = -1; /* NaN */
        goto Exit;
    } else
    if(VpIsPosZero(m)) {
        *d = 0.0;
        *e = 0;
        f  = 0;
        goto Exit;
    } else
    if(VpIsNegZero(m)) {
        *d = VpGetDoubleNegZero();
        *e = 0;
        f  = 0;
        goto Exit;
    } else
    if(VpIsPosInf(m)) {
        *d = VpGetDoublePosInf();
        *e = 0;
        f  = 2;
        goto Exit;
    } else
    if(VpIsNegInf(m)) {
        *d = VpGetDoubleNegInf();
        *e = 0;
        f  = 2;
        goto Exit;
    }
    /* Normal number */
    fig =(DBLE_FIG + BASE_FIG - 1) / BASE_FIG;
    ind_m = 0;
    mm = Min(fig,(m->Prec));
    *d = 0.0;
    div = 1.;
    while(ind_m < mm) {
        div /=(double)((S_INT)BASE);
        *d = *d +((double) ((S_INT)m->frac[ind_m++])) * div;
    }
    *e = m->exponent * ((S_INT)BASE_FIG);
    *d *= VpGetSign(m);

Exit:
#ifdef _DEBUG
    if(gfDebug) {
        VPrint(stdout, " VpVtoD: m=%\n", m);
        printf("   d=%e * 10 **%ld\n", *d, *e);
        printf("   DBLE_FIG = %ld\n", DBLE_FIG);
    }
#endif /*_DEBUG */
    return f;
}

/*
 * m <- d
 */
VP_EXPORT void
VpDtoV(Real *m, double d)
{
    U_LONG i, ind_m, mm;
    U_LONG ne;
    double  val, val2;

    if(isnan(d)) {
        VpSetNaN(m);
        goto Exit;
    }
    if(isinf(d)) {
        if(d>0.0) VpSetPosInf(m);
        else   VpSetNegInf(m);
        goto Exit;
    }

    if(d == 0.0) {
        VpSetZero(m,1);
        goto Exit;
    }
    val =(d > 0.) ? d :(-d);
    ne = 0;
    if(val >= 1.0) {
        while(val >= 1.0) {
            val /=(double)((S_INT)BASE);
            ++ne;
        }
    } else {
        val2 = 1.0 /(double)((S_INT)BASE);
        while(val < val2) {
            val *=(double)((S_INT)BASE);
            --ne;
        }
    }
    /* Now val = 0.xxxxx*BASE**ne */

    mm = m->MaxPrec;
    memset(m->frac, 0, mm * sizeof(U_LONG));
    for(ind_m = 0;val > 0.0 && ind_m < mm;ind_m++) {
        val *=(double)((S_INT)BASE);
        i =(U_LONG) val;
        val -=(double)((S_INT)i);
        m->frac[ind_m] = i;
    }
    if(ind_m >= mm) ind_m = mm - 1;
    if(d > 0.0) {
        VpSetSign(m, (S_INT)1);
    } else {
        VpSetSign(m,-(S_INT)1);
    }
    m->Prec = ind_m + 1;
    m->exponent = ne;

    VpInternalRound(m,0,(m->Prec>0)?m->frac[m->Prec-1]:0,
                      (U_LONG)(val*((double)((S_INT)BASE))));

Exit:
#ifdef _DEBUG
    if(gfDebug) {
        printf("VpDtoV d=%30.30e\n", d);
        VPrint(stdout, "  m=%\n", m);
    }
#endif /* _DEBUG */
    return;
}

/*
 *  m <- ival
 */
VP_EXPORT void
VpItoV(Real *m, S_INT ival)
{
    U_LONG mm, ind_m;
    U_LONG val, v1, v2, v;
    int isign;
    S_INT ne;

    if(ival == 0) {
        VpSetZero(m,1);
        goto Exit;
    }
    isign = 1;
    val = ival;
    if(ival < 0) {
        isign = -1;
        val =(U_LONG)(-ival);
    }
    ne = 0;
    ind_m = 0;
    mm = m->MaxPrec;
    while(ind_m < mm) {
        m->frac[ind_m] = 0;
        ++ind_m;
    }
    ind_m = 0;
    while(val > 0) {
        if(val) {
         v1 = val;
         v2 = 1;
            while(v1 >= BASE) {
                v1 /= BASE;
                v2 *= BASE;
            }
            val = val - v2 * v1;
            v = v1;
        } else {
            v = 0;
        }
        m->frac[ind_m] = v;
        ++ind_m;
        ++ne;
    }
    m->Prec = ind_m - 1;
    m->exponent = ne;
    VpSetSign(m,isign);
    VpNmlz(m);

Exit:
#ifdef _DEBUG
    if(gfDebug) {
        printf(" VpItoV i=%d\n", ival);
        VPrint(stdout, "  m=%\n", m);
    }
#endif /* _DEBUG */
    return;
}

/*
 * y = SQRT(x),  y*y - x =>0
 */
VP_EXPORT int
VpSqrt(Real *y, Real *x)
{
    Real *f = NULL;
    Real *r = NULL;
    S_LONG y_prec, f_prec;
    S_LONG n;
    S_LONG e;
    S_LONG prec;
    S_LONG nr;
    double val;

    /* Zero, NaN or Infinity ? */
    if(!VpHasVal(x)) {
        if(VpIsZero(x)||VpGetSign(x)>0) {
            VpAsgn(y,x,1);
            goto Exit;
        }
        VpSetNaN(y);
        return VpException(VP_EXCEPTION_OP,"(VpSqrt) SQRT(NaN or negative value)",0);
        goto Exit;
    }

     /* Negative ? */
    if(VpGetSign(x) < 0) {
        VpSetNaN(y);
        return VpException(VP_EXCEPTION_OP,"(VpSqrt) SQRT(negative value)",0);
    }

    /* One ? */
    if(VpIsOne(x)) {
        VpSetOne(y);
        goto Exit;
    }

    n = (S_LONG)y->MaxPrec;
    if((S_LONG)x->MaxPrec > n) n = (S_LONG)x->MaxPrec;
    /* allocate temporally variables  */
    f = VpAlloc(y->MaxPrec *(BASE_FIG + 2), "#1");
    r = VpAlloc((n + n) *(BASE_FIG + 2), "#1");

    nr = 0;
    y_prec = (S_LONG)y->MaxPrec;
    f_prec = (S_LONG)f->MaxPrec;

    prec = x->exponent;
    if(prec > 0)    ++prec;
    else            --prec;
    prec = prec - (S_LONG)y->MaxPrec;
    VpVtoD(&val, &e, x);    /* val <- x  */
    e /= ((S_LONG)BASE_FIG);
    n = e / 2;
    if(e - n * 2 != 0) {
        val /=(double)((S_INT)BASE);
        n =(e + 1) / 2;
    }
    VpDtoV(y, sqrt(val));    /* y <- sqrt(val) */
    y->exponent += n;
    n = (DBLE_FIG + BASE_FIG - 1) / BASE_FIG;
    y->MaxPrec = (U_LONG)Min(n , y_prec);
    f->MaxPrec = y->MaxPrec + 1;
    n = y_prec*((S_LONG)BASE_FIG);
    if((U_LONG)n<maxnr) n = (U_LONG)maxnr;
    do {
        y->MaxPrec *= 2;
        if(y->MaxPrec > (U_LONG)y_prec) y->MaxPrec = (U_LONG)y_prec;
        f->MaxPrec = y->MaxPrec;
        VpDivd(f, r, x, y);     /* f = x/y    */
        VpAddSub(r, f, y, -1);  /* r = f - y  */
        VpMult(f, VpPt5, r);    /* f = 0.5*r  */
        if(VpIsZero(f))         goto converge;
        VpAddSub(r, f, y, 1);   /* r = y + f  */
        VpAsgn(y, r, 1);        /* y = r      */
        if(f->exponent <= prec) goto converge;
    } while(++nr < n);
    /* */
#ifdef _DEBUG
    if(gfDebug) {
        printf("ERROR(VpSqrt): did not converge within %ld iterations.\n",
            nr);
    }
#endif /* _DEBUG */
    y->MaxPrec = y_prec;

converge:
    VpChangeSign(y,(S_INT)1);
#ifdef _DEBUG
    if(gfDebug) {
        VpMult(r, y, y);
        VpAddSub(f, x, r, -1);
        printf("VpSqrt: iterations = %lu\n", nr);
        VPrint(stdout, "  y =% \n", y);
        VPrint(stdout, "  x =% \n", x);
        VPrint(stdout, "  x-y*y = % \n", f);
    }
#endif /* _DEBUG */
    y->MaxPrec = y_prec;

Exit:
    VpFree(f);
    VpFree(r);
    return 1;
}

/*
 *
 * f = 0: Round off/Truncate, 1: round up, 2:ceil, 3: floor, 4: Banker's rounding
 * nf: digit position for operation.
 *
 */
VP_EXPORT int
VpMidRound(Real *y, int f, int nf)
/*
 * Round reletively from the decimal point.
 *    f: rounding mode
 *   nf: digit location to round from the the decimal point.
 */
{
    /* fracf: any positive digit under rounding position? */
    /* exptoadd: number of digits needed to compensate negative nf */
    int n,i,ix,ioffset,fracf,exptoadd;
    U_LONG v,shifter;
    U_LONG div;

    nf += y->exponent*((int)BASE_FIG);
    exptoadd=0;
    if (nf < 0) {
        exptoadd = -nf;
        nf = 0;
    }
    /* ix: x->fraq[ix] contains round position */
    ix = nf/(int)BASE_FIG;
    if(((U_LONG)ix)>=y->Prec) return 0; /* Unable to round */
    ioffset = nf - ix*((int)BASE_FIG);

    v = y->frac[ix];
    /* drop digits after pointed digit */
    n = BASE_FIG - ioffset - 1;
    for(shifter=1,i=0;i<n;++i) shifter *= 10;
    fracf = (v%(shifter*10) > 0);
    v /= shifter;
    div = v/10;
    v = v - div*10;
    if (fracf == 0) {
        for(i=ix+1;i<y->Prec;i++) {
            if (y->frac[i]%BASE) {
                fracf = 1;
                break;
            }
        }
    }
    memset(y->frac+ix+1, 0, (y->Prec - (ix+1)) * sizeof(U_LONG));
    switch(f) {
    case VP_ROUND_DOWN: /* Truncate */
         break;
    case VP_ROUND_UP:   /* Roundup */
        if(fracf) ++div;
         break;
    case VP_ROUND_HALF_UP:   /* Round half up  */
        if(v>=5) ++div;
        break;
    case VP_ROUND_HALF_DOWN: /* Round half down  */
        if(v>=6) ++div;
        break;
    case VP_ROUND_CEIL: /* ceil */
        if(fracf && (VpGetSign(y)>0)) ++div;
        break;
    case VP_ROUND_FLOOR: /* floor */
        if(fracf && (VpGetSign(y)<0)) ++div;
        break;
    case VP_ROUND_HALF_EVEN: /* Banker's rounding */
        if(v>5) ++div;
        else if(v==5) {
            if((U_LONG)i==(BASE_FIG-1)) {
                if(ix && (y->frac[ix-1]%2)) ++div;
            } else {
                if(div%2) ++div;
            }
        }
        break;
    }
    for(i=0;i<=n;++i) div *= 10;
    if(div>=BASE) {
        if(ix) {
            y->frac[ix] = 0;
            VpRdup(y,ix);
        } else {
            S_INT s = VpGetSign(y);
            int e = y->exponent;
            VpSetOne(y);
            VpSetSign(y,s);
            y->exponent = e+1;
        }
    } else {
        y->frac[ix] = div;
        VpNmlz(y);
    }
    if (exptoadd > 0) {
        y->exponent += exptoadd/BASE_FIG;
        exptoadd %= BASE_FIG;
        for(i=0;i<exptoadd;i++) {
            y->frac[0] *= 10;
            if (y->frac[0] >= BASE) {
                y->frac[0] /= BASE;
                y->exponent++;
            }
        }
    }
    return 1;
}

VP_EXPORT int
VpLeftRound(Real *y, int f, int nf)
/*
 * Round from the left hand side of the digits.
 */
{
    U_LONG v;
    if(!VpHasVal(y)) return 0; /* Unable to round */
    v = y->frac[0];
    nf -= VpExponent(y)*BASE_FIG;
    while(v=v/10) nf--;
    nf += (BASE_FIG-1);
    return VpMidRound(y,f,nf);
}

VP_EXPORT int
VpActiveRound(Real *y, Real *x, int f, int nf)
{
    /* First,assign whole value in truncation mode */
    if(VpAsgn(y, x, 10)<=1) return 0; /* Zero,NaN,or Infinity */
    return VpMidRound(y,f,nf);
}

static int
VpLimitRound(Real *c,U_LONG ixDigit)
{
    U_LONG ix = VpGetPrecLimit();
    if(!VpNmlz(c))    return -1;
    if(!ix)           return 0;
    if(!ixDigit) ixDigit = c->Prec-1;
    if((ix+BASE_FIG-1)/BASE_FIG > ixDigit+1) return 0;
    return VpLeftRound(c,VpGetRoundMode(),ix);
}

static void
VpInternalRound(Real *c,int ixDigit,U_LONG vPrev,U_LONG v)
{
    int f = 0;

    if(VpLimitRound(c,ixDigit)) return;
    if(!v)                      return;

    v /= BASE1;
    switch(gfRoundMode) {
    case VP_ROUND_DOWN:
        break;
    case VP_ROUND_UP:
        if(v)                    f = 1;
        break;
    case VP_ROUND_HALF_UP:
        if(v >= 5)               f = 1;
        break;
    case VP_ROUND_HALF_DOWN:
        if(v >= 6)               f = 1;
        break;
    case VP_ROUND_CEIL:  /* ceil */
        if(v && (VpGetSign(c)>0)) f = 1;
        break;
    case VP_ROUND_FLOOR: /* floor */
        if(v && (VpGetSign(c)<0)) f = 1;
        break;
    case VP_ROUND_HALF_EVEN:  /* Banker's rounding */
        if(v>5) f = 1;
        else if(v==5 && vPrev%2)  f = 1;
        break;
    }
    if(f) {
        VpRdup(c,ixDigit);    /* round up */
        VpNmlz(c);
    }
}

/*
 *  Rounds up m(plus one to final digit of m).
 */
static int
VpRdup(Real *m,U_LONG ind_m)
{
    U_LONG carry;

    if(!ind_m) ind_m = m->Prec;

    carry = 1;
    while(carry > 0 && (ind_m--)) {
        m->frac[ind_m] += carry;
        if(m->frac[ind_m] >= BASE) m->frac[ind_m] -= BASE;
        else                       carry = 0;
    }
    if(carry > 0) {        /* Overflow,count exponent and set fraction part be 1  */
        if(!AddExponent(m,(S_LONG)1)) return 0;
        m->Prec = m->frac[0] = 1;
    } else {
        VpNmlz(m);
    }
    return 1;
}

/*
 *  y = x - fix(x)
 */
VP_EXPORT void
VpFrac(Real *y, Real *x)
{
    U_LONG my, ind_y, ind_x;

    if(!VpHasVal(x)) {
        VpAsgn(y,x,1);
        goto Exit;
    }

    if(x->exponent > 0 && (U_LONG)x->exponent >= x->Prec) {
        VpSetZero(y,VpGetSign(x));
        goto Exit;
    } else if(x->exponent <= 0) {
        VpAsgn(y, x, 1);
        goto Exit;
    }

    y->Prec = x->Prec -(U_LONG) x->exponent;
    y->Prec = Min(y->Prec, y->MaxPrec);
    y->exponent = 0;
    VpSetSign(y,VpGetSign(x));
    ind_y = 0;
    my = y->Prec;
    ind_x = x->exponent;
    while(ind_y < my) {
        y->frac[ind_y] = x->frac[ind_x];
        ++ind_y;
        ++ind_x;
    }
    VpNmlz(y);

Exit:
#ifdef _DEBUG
    if(gfDebug) {
        VPrint(stdout, "VpFrac y=%\n", y);
        VPrint(stdout, "    x=%\n", x);
    }
#endif /* _DEBUG */
    return;
}

/*
 *   y = x ** n
 */
VP_EXPORT int
VpPower(Real *y, Real *x, S_INT n)
{
    U_LONG s, ss;
    S_LONG sign;
    Real *w1 = NULL;
    Real *w2 = NULL;

    if(VpIsZero(x)) {
        if(n==0) {
           VpSetOne(y);
           goto Exit;
        }
        sign = VpGetSign(x);
        if(n<0) {
           n = -n;
           if(sign<0) sign = (n%2)?(-1):(1);
           VpSetInf (y,sign);
        } else {
           if(sign<0) sign = (n%2)?(-1):(1);
           VpSetZero(y,sign);
        }
        goto Exit;
    }
    if(!VpIsDef(x)) {
        VpSetNaN(y); /* Not sure !!! */
        goto Exit;
    }

    if((x->exponent == 1) &&(x->Prec == 1) &&(x->frac[0] == 1)) {
        /* abs(x) = 1 */
        VpSetOne(y);
        if(VpGetSign(x) > 0) goto Exit;
        if((n % 2) == 0) goto Exit;
        VpSetSign(y,-(S_INT)1);
        goto Exit;
    }

    if(n > 0) sign = 1;
    else if(n < 0) {
        sign = -1;
        n = -n;
    } else {
        VpSetOne(y);
        goto Exit;
    }

    /* Allocate working variables  */

    w1 = VpAlloc((y->MaxPrec + 2) * BASE_FIG, "#0");
    w2 = VpAlloc((w1->MaxPrec * 2 + 1) * BASE_FIG, "#0");
    /* calculation start */

    VpAsgn(y, x, 1);
    --n;
    while(n > 0) {
        VpAsgn(w1, x, 1);
        s = 1;
loop1:  ss = s;
        s += s;
        if(s >(U_LONG) n) goto out_loop1;
        VpMult(w2, w1, w1);
        VpAsgn(w1, w2, 1);
        goto loop1;
out_loop1:
        n -= ss;
        VpMult(w2, y, w1);
        VpAsgn(y, w2, 1);
    }
    if(sign < 0) {
        VpDivd(w1, w2, VpConstOne, y);
        VpAsgn(y, w1, 1);
    }

Exit:
#ifdef _DEBUG
    if(gfDebug) {
        VPrint(stdout, "VpPower y=%\n", y);
        VPrint(stdout, "VpPower x=%\n", x);
        printf("  n=%d\n", n);
    }
#endif /* _DEBUG */
    VpFree(w2);
    VpFree(w1);
    return 1;
}

#ifdef _DEBUG
int
VpVarCheck(Real * v)
/*
 * Checks the validity of the Real variable v.
 * [Input]
 *   v ... Real *, variable to be checked.
 * [Returns]
 *   0  ... correct v.
 *   other ... error
 */
{
    U_LONG i;

    if(v->MaxPrec <= 0) {
        printf("ERROR(VpVarCheck): Illegal Max. Precision(=%lu)\n",
            v->MaxPrec);
        return 1;
    }
    if((v->Prec <= 0) ||((v->Prec) >(v->MaxPrec))) {
        printf("ERROR(VpVarCheck): Illegal Precision(=%lu)\n", v->Prec);
        printf("       Max. Prec.=%lu\n", v->MaxPrec);
        return 2;
    }
    for(i = 0; i < v->Prec; ++i) {
        if((v->frac[i] >= BASE)) {
            printf("ERROR(VpVarCheck): Illegal fraction\n");
            printf("       Frac[%ld]=%lu\n", i, v->frac[i]);
            printf("       Prec.   =%lu\n", v->Prec);
            printf("       Exp. =%d\n", v->exponent);
            printf("       BASE =%lu\n", BASE);
            return 3;
        }
    }
    return 0;
}
#endif /* _DEBUG */
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/bigdecimal/bigdecimal.h

root/ext/bigdecimal/bigdecimal.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

DEFINITIONS

This source file includes following definitions.
  1. Real
/*
 *
 * Ruby BigDecimal(Variable decimal precision) extension library.
 *
 * Copyright(C) 2002 by Shigeo Kobayashi(shigeo@tinyforest.gr.jp)
 *
 * You may distribute under the terms of either the GNU General Public
 * License or the Artistic License, as specified in the README file
 * of this BigDecimal distribution.
 *
 * NOTES:
 *   2003-03-28 V1.0 checked in.
 *
 */

#ifndef  ____BIG_DECIMAL__H____
#define  ____BIG_DECIMAL__H____

#if defined(__cplusplus)
extern "C" {
#endif

/*
 *  NaN & Infinity
 */
#define SZ_NaN  "NaN"
#define SZ_INF  "Infinity"
#define SZ_PINF "+Infinity"
#define SZ_NINF "-Infinity"

/*
 *   #define VP_EXPORT other than static to let VP_ routines
 *   be called from outside of this module.
 */
#define VP_EXPORT static

#define U_LONG unsigned long
#define S_LONG long
#define U_INT  unsigned int
#define S_INT  int

/* Exception codes */
#define VP_EXCEPTION_ALL        ((unsigned short)0x00FF)
#define VP_EXCEPTION_INFINITY   ((unsigned short)0x0001)
#define VP_EXCEPTION_NaN        ((unsigned short)0x0002)
#define VP_EXCEPTION_UNDERFLOW  ((unsigned short)0x0004)
#define VP_EXCEPTION_OVERFLOW   ((unsigned short)0x0001) /* 0x0008) */
#define VP_EXCEPTION_ZERODIVIDE ((unsigned short)0x0001) /* 0x0010) */

/* Following 2 exceptions cann't controlled by user */
#define VP_EXCEPTION_OP         ((unsigned short)0x0020)
#define VP_EXCEPTION_MEMORY     ((unsigned short)0x0040)

/* Computation mode */
#define VP_ROUND_MODE            ((unsigned short)0x0100)
#define VP_ROUND_UP         1
#define VP_ROUND_DOWN       2
#define VP_ROUND_HALF_UP    3
#define VP_ROUND_HALF_DOWN  4
#define VP_ROUND_CEIL       5
#define VP_ROUND_FLOOR      6
#define VP_ROUND_HALF_EVEN  7

#define VP_SIGN_NaN                0 /* NaN                      */
#define VP_SIGN_POSITIVE_ZERO      1 /* Positive zero            */
#define VP_SIGN_NEGATIVE_ZERO     -1 /* Negative zero            */
#define VP_SIGN_POSITIVE_FINITE    2 /* Positive finite number   */
#define VP_SIGN_NEGATIVE_FINITE   -2 /* Negative finite number   */
#define VP_SIGN_POSITIVE_INFINITE  3 /* Positive infinite number */
#define VP_SIGN_NEGATIVE_INFINITE -3 /* Negative infinite number */

/*
 * VP representation
 *  r = 0.xxxxxxxxx *BASE**exponent
 */
typedef struct {
    VALUE  obj;     /* Back pointer(VALUE) for Ruby object.     */
    U_LONG MaxPrec; /* Maximum precision size                   */
                    /* This is the actual size of pfrac[]       */
                    /*(frac[0] to frac[MaxPrec] are available). */
    U_LONG Prec;    /* Current precision size.                  */
                    /* This indicates how much the.             */
                    /* the array frac[] is actually used.       */
    S_INT  exponent;/* Exponent part.                           */
    short  sign;    /* Attributes of the value.                 */
                    /*
                     *        ==0 : NaN
                     *          1 : Positive zero
                     *         -1 : Negative zero
                     *          2 : Positive number
                     *         -2 : Negative number
                     *          3 : Positive infinite number
                     *         -3 : Negative infinite number
                     */
    short  flag;    /* Not used in vp_routines,space for user.  */
    U_LONG frac[1]; /* Pointer to array of fraction part.       */
} Real;

/*
 *  ------------------
 *   EXPORTables.
 *  ------------------
 */

VP_EXPORT  Real *
VpNewRbClass(U_LONG mx,char *str,VALUE klass);

VP_EXPORT  Real *VpCreateRbObject(U_LONG mx,char *str);

VP_EXPORT U_LONG VpBaseFig(void);
VP_EXPORT U_LONG VpDblFig(void);
VP_EXPORT U_LONG VpBaseVal(void);

/* Zero,Inf,NaN (isinf(),isnan() used to check) */
VP_EXPORT double VpGetDoubleNaN(void);
VP_EXPORT double VpGetDoublePosInf(void);
VP_EXPORT double VpGetDoubleNegInf(void);
VP_EXPORT double VpGetDoubleNegZero(void);

/* These 2 functions added at v1.1.7 */
VP_EXPORT U_LONG VpGetPrecLimit(void);
VP_EXPORT U_LONG VpSetPrecLimit(U_LONG n);

/* Round mode */
VP_EXPORT int           VpIsRoundMode(unsigned long n);
VP_EXPORT unsigned long VpGetRoundMode(void);
VP_EXPORT unsigned long VpSetRoundMode(unsigned long n);

VP_EXPORT int VpException(unsigned short f,char *str,int always);
VP_EXPORT int VpIsNegDoubleZero(double v);
VP_EXPORT U_LONG VpNumOfChars(Real *vp,char *pszFmt);
VP_EXPORT U_LONG VpInit(U_LONG BaseVal);
VP_EXPORT void *VpMemAlloc(U_LONG mb);
VP_EXPORT void VpFree(Real *pv);
VP_EXPORT Real *VpAlloc(U_LONG mx, char *szVal);
VP_EXPORT int VpAsgn(Real *c,Real *a,int isw);
VP_EXPORT int VpAddSub(Real *c,Real *a,Real *b,int operation);
VP_EXPORT int VpMult(Real *c,Real *a,Real *b);
VP_EXPORT int VpDivd(Real *c,Real *r,Real *a,Real *b);
VP_EXPORT int VpComp(Real *a,Real *b);
VP_EXPORT S_LONG VpExponent10(Real *a);
VP_EXPORT void VpSzMantissa(Real *a,char *psz);
VP_EXPORT int VpToSpecialString(Real *a,char *psz,int fPlus);
VP_EXPORT void VpToString(Real *a,char *psz,int fFmt,int fPlus);
VP_EXPORT void VpToFString(Real *a,char *psz,int fFmt,int fPlus);
VP_EXPORT int VpCtoV(Real *a,char *int_chr,U_LONG ni,char *frac,U_LONG nf,char *exp_chr,U_LONG ne);
VP_EXPORT int VpVtoD(double *d,S_LONG *e,Real *m);
VP_EXPORT void VpDtoV(Real *m,double d);
VP_EXPORT void VpItoV(Real *m,S_INT ival);
VP_EXPORT int VpSqrt(Real *y,Real *x);
VP_EXPORT int VpActiveRound(Real *y,Real *x,int f,int il);
VP_EXPORT int VpMidRound(Real *y, int f, int nf);
VP_EXPORT int VpLeftRound(Real *y, int f, int nf);
VP_EXPORT void VpFrac(Real *y,Real *x);
VP_EXPORT int VpPower(Real *y,Real *x,S_INT n);

/* VP constants */
VP_EXPORT Real *VpOne();

/*
 *  ------------------
 *  MACRO definitions.
 *  ------------------
 */
#define Abs(a)     (((a)>= 0)?(a):(-(a)))
#define Max(a, b)  (((a)>(b))?(a):(b))
#define Min(a, b)  (((a)>(b))?(b):(a))

#define VpMaxPrec(a)   ((a)->MaxPrec)
#define VpPrec(a)      ((a)->Prec)
#define VpGetFlag(a)   ((a)->flag)

/* Sign */

/* VpGetSign(a) returns 1,-1 if a>0,a<0 respectively */
#define VpGetSign(a) (((a)->sign>0)?1:(-1))
/* Change sign of a to a>0,a<0 if s = 1,-1 respectively */
#define VpChangeSign(a,s) {if((s)>0) (a)->sign=(short)Abs((S_LONG)(a)->sign);else (a)->sign=-(short)Abs((S_LONG)(a)->sign);}
/* Sets sign of a to a>0,a<0 if s = 1,-1 respectively */
#define VpSetSign(a,s)    {if((s)>0) (a)->sign=(short)VP_SIGN_POSITIVE_FINITE;else (a)->sign=(short)VP_SIGN_NEGATIVE_FINITE;}

/* 1 */
#define VpSetOne(a)       {(a)->frac[0]=(a)->exponent=(a)->Prec=1;(a)->sign=VP_SIGN_POSITIVE_FINITE;}

/* ZEROs */
#define VpIsPosZero(a)  ((a)->sign==VP_SIGN_POSITIVE_ZERO)
#define VpIsNegZero(a)  ((a)->sign==VP_SIGN_NEGATIVE_ZERO)
#define VpIsZero(a)     (VpIsPosZero(a) || VpIsNegZero(a))
#define VpSetPosZero(a) ((a)->frac[0]=0,(a)->Prec=1,(a)->sign=VP_SIGN_POSITIVE_ZERO)
#define VpSetNegZero(a) ((a)->frac[0]=0,(a)->Prec=1,(a)->sign=VP_SIGN_NEGATIVE_ZERO)
#define VpSetZero(a,s)  ( ((s)>0)?VpSetPosZero(a):VpSetNegZero(a) )

/* NaN */
#define VpIsNaN(a)      ((a)->sign==VP_SIGN_NaN)
#define VpSetNaN(a)     ((a)->frac[0]=0,(a)->Prec=1,(a)->sign=VP_SIGN_NaN)

/* Infinity */
#define VpIsPosInf(a)   ((a)->sign==VP_SIGN_POSITIVE_INFINITE)
#define VpIsNegInf(a)   ((a)->sign==VP_SIGN_NEGATIVE_INFINITE)
#define VpIsInf(a)      (VpIsPosInf(a) || VpIsNegInf(a))
#define VpIsDef(a)      ( !(VpIsNaN(a)||VpIsInf(a)) )
#define VpSetPosInf(a)  ((a)->frac[0]=0,(a)->Prec=1,(a)->sign=VP_SIGN_POSITIVE_INFINITE)
#define VpSetNegInf(a)  ((a)->frac[0]=0,(a)->Prec=1,(a)->sign=VP_SIGN_NEGATIVE_INFINITE)
#define VpSetInf(a,s)   ( ((s)>0)?VpSetPosInf(a):VpSetNegInf(a) )
#define VpHasVal(a)     (a->frac[0])
#define VpIsOne(a)      ((a->Prec==1)&&(a->frac[0]==1)&&(a->exponent==1))
#define VpExponent(a)   (a->exponent)
#ifdef _DEBUG
int VpVarCheck(Real * v);
VP_EXPORT int VPrint(FILE *fp,char *cntl_chr,Real *a);
#endif /* _DEBUG */

#if defined(__cplusplus)
}  /* extern "C" { */
#endif
#endif /* ____BIG_DECIMAL__H____ */
/* [<][>][^][v] [top][bottom][index] [help] */


ext/curses/curses.c

root/ext/curses/curses.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. no_window
  2. free_window
  3. prep_window
  4. curses_init_screen
  5. curses_close_screen
  6. curses_finalize
  7. curses_closed
  8. curses_clear
  9. curses_clrtoeol
  10. curses_refresh
  11. curses_doupdate
  12. curses_echo
  13. curses_noecho
  14. curses_raw
  15. curses_noraw
  16. curses_cbreak
  17. curses_nocbreak
  18. curses_nl
  19. curses_nonl
  20. curses_beep
  21. curses_flash
  22. curses_ungetch
  23. curses_setpos
  24. curses_standout
  25. curses_standend
  26. curses_inch
  27. curses_addch
  28. curses_insch
  29. curses_addstr
  30. curses_getch
  31. curses_getstr
  32. curses_delch
  33. curses_deleteln
  34. curses_insertln
  35. curses_keyname
  36. curses_lines
  37. curses_cols
  38. curses_curs_set
  39. curses_scrl
  40. curses_setscrreg
  41. curses_attroff
  42. curses_attron
  43. curses_attrset
  44. curses_bkgdset
  45. curses_bkgd
  46. curses_resizeterm
  47. curses_start_color
  48. curses_init_pair
  49. curses_init_color
  50. curses_has_colors
  51. curses_can_change_color
  52. curses_color_content
  53. curses_pair_content
  54. curses_color_pair
  55. curses_pair_number
  56. no_mevent
  57. curses_mousedata_free
  58. curses_getmouse
  59. curses_ungetmouse
  60. curses_mouseinterval
  61. curses_mousemask
  62. DEFINE_MOUSE_GET_MEMBER
  63. curses_def_prog_mode
  64. curses_reset_prog_mode
  65. window_s_allocate
  66. window_initialize
  67. window_subwin
  68. window_close
  69. window_clear
  70. window_clrtoeol
  71. window_refresh
  72. window_noutrefresh
  73. window_move
  74. window_setpos
  75. window_cury
  76. window_curx
  77. window_maxy
  78. window_maxx
  79. window_begy
  80. window_begx
  81. window_box
  82. window_standout
  83. window_standend
  84. window_inch
  85. window_addch
  86. window_insch
  87. window_addstr
  88. window_addstr2
  89. window_getch
  90. window_getstr
  91. window_delch
  92. window_deleteln
  93. window_insertln
  94. window_scrollok
  95. window_idlok
  96. window_setscrreg
  97. window_color_set
  98. window_scroll
  99. window_scrl
  100. window_attroff
  101. window_attron
  102. window_attrset
  103. window_bkgdset
  104. window_bkgd
  105. window_getbkgd
  106. window_resize
  107. window_keypad
  108. window_nodelay
  109. window_timeout
  110. Init_curses
/* -*- C -*-
 * $Id: curses.c,v 1.30 2005/08/27 11:19:21 ocean Exp $
 *
 * ext/curses/curses.c
 *
 * by MAEDA Shugo (ender@pic-internet.or.jp)
 * modified by Yukihiro Matsumoto (matz@netlab.co.jp),
 *         Toki Yoshinori,
 *         Hitoshi Takahashi,
 *         and Takaaki Tateishi (ttate@kt.jaist.ac.jp)
 *
 * maintainers:
 * - Takaaki Tateishi (ttate@kt.jaist.ac.jp)
 */

#include "ruby.h"
#include "rubyio.h"

#if defined(HAVE_NCURSES_H)
# include <ncurses.h>
#elif defined(HAVE_NCURSES_CURSES_H)
# include <ncurses/curses.h>
#elif defined(HAVE_CURSES_COLR_CURSES_H)
# ifdef HAVE_STDARG_PROTOTYPES
#  include <stdarg.h>
# else
#  include <varargs.h>
# endif
# include <curses_colr/curses.h>
#else
# include <curses.h>
# if defined(__bsdi__) || defined(__NetBSD__) || defined(__APPLE__)
#  if !defined(_maxx)
#  define _maxx maxx
#  endif
#  if !defined(_maxy)
#  define _maxy maxy
#  endif
#  if !defined(_begx)
#  define _begx begx
#  endif
#  if !defined(_begy)
#  define _begy begy
#  endif
# endif
#endif

#ifdef HAVE_INIT_COLOR
# define USE_COLOR 1
#endif

/* supports only ncurses mouse routines */
#ifdef NCURSES_MOUSE_VERSION
# define USE_MOUSE 1
#endif

#define NUM2CH NUM2LONG
#define CH2FIX LONG2FIX

static VALUE mCurses;
static VALUE mKey;
static VALUE cWindow;
#ifdef USE_MOUSE
static VALUE cMouseEvent;
#endif

static VALUE rb_stdscr;

struct windata {
    WINDOW *window;
};

#define CHECK(c) c

static VALUE window_attroff();
static VALUE window_attron();
static VALUE window_attrset();

static void
no_window()
{
    rb_raise(rb_eRuntimeError, "already closed window");
}

#define GetWINDOW(obj, winp) do {\
    if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4)\
        rb_raise(rb_eSecurityError, "Insecure: operation on untainted window");\
    Data_Get_Struct(obj, struct windata, winp);\
    if (winp->window == 0) no_window();\
} while (0)

static void
free_window(winp)
    struct windata *winp;
{
    if (winp->window && winp->window != stdscr) delwin(winp->window);
    winp->window = 0;
    free(winp);
}

static VALUE
prep_window(class, window)
    VALUE class;
    WINDOW *window;
{
    VALUE obj;
    struct windata *winp;

    if (window == NULL) {
        rb_raise(rb_eRuntimeError, "failed to create window");
    }

    obj = rb_obj_alloc(class);
    Data_Get_Struct(obj, struct windata, winp);
    winp->window = window;

    return obj;
}

/*-------------------------- module Curses --------------------------*/

/* def init_screen */
static VALUE
curses_init_screen()
{
    rb_secure(4);
    if (rb_stdscr) return rb_stdscr;
    initscr();
    if (stdscr == 0) {
        rb_raise(rb_eRuntimeError, "can't initialize curses");
    }
    clear();
    rb_stdscr = prep_window(cWindow, stdscr);
    return rb_stdscr;
}

/* def stdscr */
#define curses_stdscr curses_init_screen

/* def close_screen */
static VALUE
curses_close_screen()
{
#ifdef HAVE_ISENDWIN
    if (!isendwin())
#endif
        endwin();
    rb_stdscr = 0;
    return Qnil;
}

static void
curses_finalize(VALUE dummy)
{
    if (stdscr
#ifdef HAVE_ISENDWIN
        && !isendwin()
#endif
        )
        endwin();
    rb_stdscr = 0;
    rb_gc_unregister_address(&rb_stdscr);
}

/* def closed? */
static VALUE
curses_closed()
{
#ifdef HAVE_ISENDWIN
    if (isendwin()) {
        return Qtrue;
    }
    return Qfalse;
#else
    rb_notimplement();
#endif
}

/* def clear */
static VALUE
curses_clear(obj)
    VALUE obj;
{
    curses_stdscr();
    wclear(stdscr);
    return Qnil;
}

/* def clrtoeol */
static VALUE
curses_clrtoeol()
{
    curses_stdscr();
    clrtoeol();
    return Qnil;
}

/* def refresh */
static VALUE
curses_refresh(obj)
    VALUE obj;
{
    curses_stdscr();
    refresh();
    return Qnil;
}

/* def doupdate */
static VALUE
curses_doupdate(obj)
    VALUE obj;
{
    curses_stdscr();
#ifdef HAVE_DOUPDATE
    doupdate();
#else
    refresh();
#endif
    return Qnil;
}

/* def echo */
static VALUE
curses_echo(obj)
    VALUE obj;
{
    curses_stdscr();
    echo();
    return Qnil;
}

/* def noecho */
static VALUE
curses_noecho(obj)
    VALUE obj;
{
    curses_stdscr();
    noecho();
    return Qnil;
}

/* def raw */
static VALUE
curses_raw(obj)
    VALUE obj;
{
    curses_stdscr();
    raw();
    return Qnil;
}

/* def noraw */
static VALUE
curses_noraw(obj)
    VALUE obj;
{
    curses_stdscr();
    noraw();
    return Qnil;
}

/* def cbreak */
static VALUE
curses_cbreak(obj)
    VALUE obj;
{
    curses_stdscr();
    cbreak();
    return Qnil;
}

/* def nocbreak */
static VALUE
curses_nocbreak(obj)
    VALUE obj;
{
    curses_stdscr();
    nocbreak();
    return Qnil;
}

/* def nl */
static VALUE
curses_nl(obj)
    VALUE obj;
{
    curses_stdscr();
    nl();
    return Qnil;
}

/* def nonl */
static VALUE
curses_nonl(obj)
    VALUE obj;
{
    curses_stdscr();
    nonl();
    return Qnil;
}

/* def beep */
static VALUE
curses_beep(obj)
    VALUE obj;
{
#ifdef HAVE_BEEP
    curses_stdscr();
    beep();
#endif
    return Qnil;
}

/* def flash */
static VALUE
curses_flash(obj)
    VALUE obj;
{
#ifdef HAVE_FLASH
    curses_stdscr();
    flash();
#endif
    return Qnil;
}

/* def ungetch */
static VALUE
curses_ungetch(obj, ch)
    VALUE obj;
    VALUE ch;
{
#ifdef HAVE_UNGETCH
    curses_stdscr();
    ungetch(NUM2INT(ch));
#else
    rb_notimplement();
#endif
    return Qnil;
}

/* def setpos(y, x) */
static VALUE
curses_setpos(obj, y, x)
    VALUE obj;
    VALUE y;
    VALUE x;
{
    curses_stdscr();
    move(NUM2INT(y), NUM2INT(x));
    return Qnil;
}

/* def standout */
static VALUE
curses_standout(obj)
    VALUE obj;
{
    standout();
    return Qnil;
}

/* def standend */
static VALUE
curses_standend(obj)
    VALUE obj;
{
    standend();
    return Qnil;
}

/* def inch */
static VALUE
curses_inch(obj)
    VALUE obj;
{
    curses_stdscr();
    return CH2FIX(inch());
}

/* def addch(ch) */
static VALUE
curses_addch(obj, ch)
    VALUE obj;
    VALUE ch;
{
    curses_stdscr();
    addch(NUM2CH(ch));
    return Qnil;
}

/* def insch(ch) */
static VALUE
curses_insch(obj, ch)
    VALUE obj;
    VALUE ch;
{
    curses_stdscr();
    insch(NUM2CH(ch));
    return Qnil;
}

/* def addstr(str) */
static VALUE
curses_addstr(obj, str)
    VALUE obj;
    VALUE str;
{
    curses_stdscr();
    if (!NIL_P(str)) {
        addstr(STR2CSTR(str));
    }
    return Qnil;
}

/* def getch */
static VALUE
curses_getch(obj)
    VALUE obj;
{
    rb_read_check(stdin);
    curses_stdscr();
    return UINT2NUM(getch());
}

/* def getstr */
static VALUE
curses_getstr(obj)
    VALUE obj;
{
    char rtn[1024]; /* This should be big enough.. I hope */

    rb_read_check(stdin);
#if defined(HAVE_GETNSTR)
    getnstr(rtn,1023);
#else
    getstr(rtn);
#endif
    return rb_tainted_str_new2(rtn);
}

/* def delch */
static VALUE
curses_delch(obj)
    VALUE obj;
{
    delch();
    return Qnil;
}

/* def delelteln */
static VALUE
curses_deleteln(obj)
    VALUE obj;
{
#if defined(HAVE_DELETELN) || defined(deleteln)
    deleteln();
#endif
    return Qnil;
}

/* def insertln */
static VALUE
curses_insertln(obj)
    VALUE obj;
{
#if defined(HAVE_INSERTLN) || defined(insertln)
    insertln();
#endif
    return Qnil;
}

/* def keyname */
static VALUE
curses_keyname(obj, c)
    VALUE obj;
    VALUE c;
{
#ifdef HAVE_KEYNAME
  const char *name;

  name = keyname(NUM2INT(c));
  if (name) {
    return rb_str_new2(name);
  } else {
    return Qnil;
  }
#else
  return Qnil;
#endif
}

static VALUE
curses_lines()
{
    return INT2FIX(LINES);
}

static VALUE
curses_cols()
{
    return INT2FIX(COLS);
}

static VALUE
curses_curs_set(VALUE obj, VALUE visibility)
{
#ifdef HAVE_CURS_SET
  int n;
  return (n = curs_set(NUM2INT(visibility)) != ERR) ? INT2FIX(n) : Qnil;
#else
  return Qnil;
#endif
}

static VALUE
curses_scrl(VALUE obj, VALUE n)
{
  /* may have to raise exception on ERR */
#ifdef HAVE_SCRL
  return (scrl(NUM2INT(n)) == OK) ? Qtrue : Qfalse;
#else
  return Qfalse;
#endif
}

static VALUE
curses_setscrreg(VALUE obj, VALUE top, VALUE bottom)
{
  /* may have to raise exception on ERR */
#ifdef HAVE_SETSCRREG
  return (setscrreg(NUM2INT(top), NUM2INT(bottom)) == OK) ? Qtrue : Qfalse;
#else
  return Qfalse;
#endif
}

static VALUE
curses_attroff(VALUE obj, VALUE attrs)
{
  return window_attroff(rb_stdscr,attrs);
  /* return INT2FIX(attroff(NUM2INT(attrs))); */
}

static VALUE
curses_attron(VALUE obj, VALUE attrs)
{
  return window_attron(rb_stdscr,attrs);
  /* return INT2FIX(attroff(NUM2INT(attrs))); */
}

static VALUE
curses_attrset(VALUE obj, VALUE attrs)
{
  return window_attrset(rb_stdscr,attrs);
  /* return INT2FIX(attroff(NUM2INT(attrs))); */
}

static VALUE
curses_bkgdset(VALUE obj, VALUE ch)
{
#ifdef HAVE_BKGDSET
  bkgdset(NUM2CH(ch));
#endif
  return Qnil;
}

static VALUE
curses_bkgd(VALUE obj, VALUE ch)
{
#ifdef HAVE_BKGD
  return (bkgd(NUM2CH(ch)) == OK) ? Qtrue : Qfalse;
#else
  return Qfalse;
#endif
}

static VALUE
curses_resizeterm(VALUE obj, VALUE lin, VALUE col)
{
#if defined(HAVE_RESIZETERM)
  return (resizeterm(NUM2INT(lin),NUM2INT(col)) == OK) ? Qtrue : Qfalse;
#else
  return Qnil;
#endif
}

#ifdef USE_COLOR
static VALUE
curses_start_color(VALUE obj)
{
  /* may have to raise exception on ERR */
  return (start_color() == OK) ? Qtrue : Qfalse;
}

static VALUE
curses_init_pair(VALUE obj, VALUE pair, VALUE f, VALUE b)
{
  /* may have to raise exception on ERR */
  return (init_pair(NUM2INT(pair),NUM2INT(f),NUM2INT(b)) == OK) ? Qtrue : Qfalse;
}

static VALUE
curses_init_color(VALUE obj, VALUE color, VALUE r, VALUE g, VALUE b)
{
  /* may have to raise exception on ERR */
  return (init_color(NUM2INT(color),NUM2INT(r),
                     NUM2INT(g),NUM2INT(b)) == OK) ? Qtrue : Qfalse;
}

static VALUE
curses_has_colors(VALUE obj)
{
  return has_colors() ? Qtrue : Qfalse;
}

static VALUE
curses_can_change_color(VALUE obj)
{
  return can_change_color() ? Qtrue : Qfalse;
}

static VALUE
curses_color_content(VALUE obj, VALUE color)
{
  short r,g,b;

  color_content(NUM2INT(color),&r,&g,&b);
  return rb_ary_new3(3,INT2FIX(r),INT2FIX(g),INT2FIX(b));
}

static VALUE
curses_pair_content(VALUE obj, VALUE pair)
{
  short f,b;

  pair_content(NUM2INT(pair),&f,&b);
  return rb_ary_new3(2,INT2FIX(f),INT2FIX(b));
}

static VALUE
curses_color_pair(VALUE obj, VALUE attrs)
{
  return INT2FIX(COLOR_PAIR(NUM2INT(attrs)));
}

static VALUE
curses_pair_number(VALUE obj, VALUE attrs)
{
  return INT2FIX(PAIR_NUMBER(NUM2INT(attrs)));
}
#endif /* USE_COLOR */

#ifdef USE_MOUSE
struct mousedata {
  MEVENT *mevent;
};

static void
no_mevent()
{
  rb_raise(rb_eRuntimeError, "no such mouse event");
}

#define GetMOUSE(obj, data) do {\
    if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4)\
        rb_raise(rb_eSecurityError, "Insecure: operation on untainted mouse");\
    Data_Get_Struct(obj, struct mousedata, data);\
    if (data->mevent == 0) no_mevent();\
} while (0)

static void
curses_mousedata_free(struct mousedata *mdata)
{
  if (mdata->mevent)
    free(mdata->mevent);
}

static VALUE
curses_getmouse(VALUE obj)
{
  struct mousedata *mdata;
  VALUE val;

  val = Data_Make_Struct(cMouseEvent,struct mousedata,
                         0,curses_mousedata_free,mdata);
  mdata->mevent = (MEVENT*)malloc(sizeof(MEVENT));
  return (getmouse(mdata->mevent) == OK) ? val : Qnil;
}

static VALUE
curses_ungetmouse(VALUE obj, VALUE mevent)
{
  struct mousedata *mdata;

  GetMOUSE(mevent,mdata);
  return (ungetmouse(mdata->mevent) == OK) ? Qtrue : Qfalse;
}

static VALUE
curses_mouseinterval(VALUE obj, VALUE interval)
{
  return mouseinterval(NUM2INT(interval)) ? Qtrue : Qfalse;
}

static VALUE
curses_mousemask(VALUE obj, VALUE mask)
{
  return INT2NUM(mousemask(NUM2UINT(mask),NULL));
}

#define DEFINE_MOUSE_GET_MEMBER(func_name,mem) \
static VALUE func_name (VALUE mouse) \
{ \
  struct mousedata *mdata; \
  GetMOUSE(mouse, mdata); \
  return (UINT2NUM(mdata->mevent -> mem)); \
}

DEFINE_MOUSE_GET_MEMBER(curs_mouse_id, id)
DEFINE_MOUSE_GET_MEMBER(curs_mouse_x, x)
DEFINE_MOUSE_GET_MEMBER(curs_mouse_y, y)
DEFINE_MOUSE_GET_MEMBER(curs_mouse_z, z)
DEFINE_MOUSE_GET_MEMBER(curs_mouse_bstate, bstate)
#undef define_curs_mouse_member
#endif /* USE_MOUSE */

static VALUE
curses_timeout(VALUE obj, VALUE delay)
{
#ifdef HAVE_TIMEOUT
  timeout(NUM2INT(delay));
  return Qnil;
#else
    rb_notimplement();
#endif
}

static VALUE
curses_def_prog_mode(VALUE obj)
{
#ifdef HAVE_DEF_PROG_MODE
  return def_prog_mode() == OK ? Qtrue : Qfalse;
#else
    rb_notimplement();
#endif
}

static VALUE
curses_reset_prog_mode(VALUE obj)
{
#ifdef HAVE_RESET_PROG_MODE
  return reset_prog_mode() == OK ? Qtrue : Qfalse;
#else
    rb_notimplement();
#endif
}

/*-------------------------- class Window --------------------------*/

/* def self.allocate */
static VALUE
window_s_allocate(VALUE class)
{
    struct windata *winp;

    return Data_Make_Struct(class, struct windata, 0, free_window, winp);
}

/* def initialize(h, w, top, left) */
static VALUE
window_initialize(obj, h, w, top, left)
    VALUE obj;
    VALUE h;
    VALUE w;
    VALUE top;
    VALUE left;
{
    struct windata *winp;
    WINDOW *window;

    rb_secure(4);
    curses_init_screen();
    Data_Get_Struct(obj, struct windata, winp);
    if (winp->window) delwin(winp->window);
    window = newwin(NUM2INT(h), NUM2INT(w), NUM2INT(top), NUM2INT(left));
    wclear(window);
    winp->window = window;

    return obj;
}

/* def subwin(height, width, top, left) */
static VALUE
window_subwin(obj, height, width, top, left)
    VALUE obj;
    VALUE height;
    VALUE width;
    VALUE top;
    VALUE left;
{
    struct windata *winp;
    WINDOW *window;
    VALUE win;
    int h, w, t, l;

    h = NUM2INT(height);
    w = NUM2INT(width);
    t = NUM2INT(top);
    l = NUM2INT(left);
    GetWINDOW(obj, winp);
    window = subwin(winp->window, h, w, t, l);
    win = prep_window(rb_obj_class(obj), window);

    return win;
}

/* def close */
static VALUE
window_close(obj)
    VALUE obj;
{
    struct windata *winp;

    GetWINDOW(obj, winp);
    delwin(winp->window);
    winp->window = 0;

    return Qnil;
}

/* def clear */
static VALUE
window_clear(obj)
    VALUE obj;
{
    struct windata *winp;

    GetWINDOW(obj, winp);
    wclear(winp->window);

    return Qnil;
}

/* def clrtoeol */
static VALUE
window_clrtoeol(obj)
    VALUE obj;
{
    struct windata *winp;

    GetWINDOW(obj, winp);
    wclrtoeol(winp->window);

    return Qnil;
}

/* def refresh */
static VALUE
window_refresh(obj)
    VALUE obj;
{
    struct windata *winp;

    GetWINDOW(obj, winp);
    wrefresh(winp->window);

    return Qnil;
}

/* def noutrefresh */
static VALUE
window_noutrefresh(obj)
    VALUE obj;
{
    struct windata *winp;

    GetWINDOW(obj, winp);
#ifdef HAVE_DOUPDATE
    wnoutrefresh(winp->window);
#else
    wrefresh(winp->window);
#endif

    return Qnil;
}

/* def move(y, x) */
static VALUE
window_move(obj, y, x)
    VALUE obj;
    VALUE y;
    VALUE x;
{
    struct windata *winp;

    GetWINDOW(obj, winp);
    mvwin(winp->window, NUM2INT(y), NUM2INT(x));

    return Qnil;
}

/* def setpos(y, x) */
static VALUE
window_setpos(obj, y, x)
    VALUE obj;
    VALUE y;
    VALUE x;
{
    struct windata *winp;

    GetWINDOW(obj, winp);
    wmove(winp->window, NUM2INT(y), NUM2INT(x));
    return Qnil;
}

/* def cury */
static VALUE
window_cury(obj)
    VALUE obj;
{
    struct windata *winp;
    int x, y;

    GetWINDOW(obj, winp);
    getyx(winp->window, y, x);
    return INT2FIX(y);
}

/* def curx */
static VALUE
window_curx(obj)
    VALUE obj;
{
    struct windata *winp;
    int x, y;

    GetWINDOW(obj, winp);
    getyx(winp->window, y, x);
    return INT2FIX(x);
}

/* def maxy */
static VALUE
window_maxy(obj)
    VALUE obj;
{
    struct windata *winp;

    GetWINDOW(obj, winp);
#if defined(getmaxy)
    return INT2FIX(getmaxy(winp->window));
#elif defined(getmaxyx)
    {
        int x, y;
        getmaxyx(winp->window, y, x);
        return INT2FIX(y);
    }
#else
    return INT2FIX(winp->window->_maxy+1);
#endif
}

/* def maxx */
static VALUE
window_maxx(obj)
    VALUE obj;
{
    struct windata *winp;

    GetWINDOW(obj, winp);
#if defined(getmaxx)
    return INT2FIX(getmaxx(winp->window));
#elif defined(getmaxyx)
    {
        int x, y;
        getmaxyx(winp->window, y, x);
        return INT2FIX(x);
    }
#else
    return INT2FIX(winp->window->_maxx+1);
#endif
}

/* def begy */
static VALUE
window_begy(obj)
    VALUE obj;
{
    struct windata *winp;
    int x, y;

    GetWINDOW(obj, winp);
#ifdef getbegyx
    getbegyx(winp->window, y, x);
    return INT2FIX(y);
#else
    return INT2FIX(winp->window->_begy);
#endif
}

/* def begx */
static VALUE
window_begx(obj)
    VALUE obj;
{
    struct windata *winp;
    int x, y;

    GetWINDOW(obj, winp);
#ifdef getbegyx
    getbegyx(winp->window, y, x);
    return INT2FIX(x);
#else
    return INT2FIX(winp->window->_begx);
#endif
}

/* def box(vert, hor) */
static VALUE
window_box(argc, argv, self)
    int argc;
    VALUE argv[], self;
{
    struct windata *winp;
    VALUE vert, hor, corn;

    rb_scan_args(argc, argv, "21", &vert, &hor, &corn);

    GetWINDOW(self, winp);
    box(winp->window, NUM2CH(vert), NUM2CH(hor));

    if (!NIL_P(corn)) {
      int cur_x, cur_y, x, y;
      chtype c;

      c = NUM2CH(corn);
      getyx(winp->window, cur_y, cur_x);
      x = NUM2INT(window_maxx(self)) - 1;
      y = NUM2INT(window_maxy(self)) - 1;
      wmove(winp->window, 0, 0);
      waddch(winp->window, c);
      wmove(winp->window, y, 0);
      waddch(winp->window, c);
      wmove(winp->window, y, x);
      waddch(winp->window, c);
      wmove(winp->window, 0, x);
      waddch(winp->window, c);
      wmove(winp->window, cur_y, cur_x);
    }

    return Qnil;
}

/* def standout */
static VALUE
window_standout(obj)
    VALUE obj;
{
    struct windata *winp;

    GetWINDOW(obj, winp);
    wstandout(winp->window);
    return Qnil;
}

/* def standend */
static VALUE
window_standend(obj)
    VALUE obj;
{
    struct windata *winp;

    GetWINDOW(obj, winp);
    wstandend(winp->window);
    return Qnil;
}

/* def inch */
static VALUE
window_inch(obj)
    VALUE obj;
{
    struct windata *winp;

    GetWINDOW(obj, winp);
    return CH2FIX(winch(winp->window));
}

/* def addch(ch) */
static VALUE
window_addch(obj, ch)
    VALUE obj;
    VALUE ch;
{
    struct windata *winp;

    GetWINDOW(obj, winp);
    waddch(winp->window, NUM2CH(ch));

    return Qnil;
}

/* def insch(ch) */
static VALUE
window_insch(obj, ch)
    VALUE obj;
    VALUE ch;
{
    struct windata *winp;

    GetWINDOW(obj, winp);
    winsch(winp->window, NUM2CH(ch));

    return Qnil;
}

/* def addstr(str) */
static VALUE
window_addstr(obj, str)
    VALUE obj;
    VALUE str;
{
    if (!NIL_P(str)) {
        struct windata *winp;

        GetWINDOW(obj, winp);
        waddstr(winp->window, STR2CSTR(str));
    }
    return Qnil;
}

/* def <<(str) */
static VALUE
window_addstr2(obj, str)
    VALUE obj;
    VALUE str;
{
    window_addstr(obj, str);
    return obj;
}

/* def getch */
static VALUE
window_getch(obj)
    VALUE obj;
{
    struct windata *winp;

    rb_read_check(stdin);
    GetWINDOW(obj, winp);
    return UINT2NUM(wgetch(winp->window));
}

/* def getstr */
static VALUE
window_getstr(obj)
    VALUE obj;
{
    struct windata *winp;
    char rtn[1024]; /* This should be big enough.. I hope */

    GetWINDOW(obj, winp);
    rb_read_check(stdin);
#if defined(HAVE_WGETNSTR)
    wgetnstr(winp->window, rtn, 1023);
#else
    wgetstr(winp->window, rtn);
#endif
    return rb_tainted_str_new2(rtn);
}

/* def delch */
static VALUE
window_delch(obj)
    VALUE obj;
{
    struct windata *winp;

    GetWINDOW(obj, winp);
    wdelch(winp->window);
    return Qnil;
}

/* def delelteln */
static VALUE
window_deleteln(obj)
    VALUE obj;
{
#if defined(HAVE_WDELETELN) || defined(wdeleteln)
    struct windata *winp;

    GetWINDOW(obj, winp);
    wdeleteln(winp->window);
#endif
    return Qnil;
}

/* def insertln */
static VALUE
window_insertln(obj)
    VALUE obj;
{
#if defined(HAVE_WINSERTLN) || defined(winsertln)
    struct windata *winp;

    GetWINDOW(obj, winp);
    winsertln(winp->window);
#endif
    return Qnil;
}

static VALUE
window_scrollok(VALUE obj, VALUE bf)
{
  struct windata *winp;

  GetWINDOW(obj, winp);
  scrollok(winp->window, RTEST(bf) ? TRUE : FALSE);
  return Qnil;
}

static VALUE
window_idlok(VALUE obj, VALUE bf)
{
  struct windata *winp;

  GetWINDOW(obj, winp);
  idlok(winp->window, RTEST(bf) ? TRUE : FALSE);
  return Qnil;
}

static VALUE
window_setscrreg(VALUE obj, VALUE top, VALUE bottom)
{
#ifdef HAVE_WSETSCRREG
  struct windata *winp;
  int res;

  GetWINDOW(obj, winp);
  res = wsetscrreg(winp->window, NUM2INT(top), NUM2INT(bottom));
  /* may have to raise exception on ERR */
  return (res == OK) ? Qtrue : Qfalse;
#else
  return Qfalse;
#endif
}

#if defined(USE_COLOR) && defined(HAVE_WCOLOR_SET)
static VALUE
window_color_set(VALUE obj, VALUE col)
{
  struct windata *winp;
  int res;

  GetWINDOW(obj, winp);
  res = wcolor_set(winp->window, NUM2INT(col), NULL);
  return (res == OK) ? Qtrue : Qfalse;
  return Qfalse;
}
#endif /* defined(USE_COLOR) && defined(HAVE_WCOLOR_SET) */

static VALUE
window_scroll(VALUE obj)
{
  struct windata *winp;

  GetWINDOW(obj, winp);
  /* may have to raise exception on ERR */
  return (scroll(winp->window) == OK) ? Qtrue : Qfalse;
}

static VALUE
window_scrl(VALUE obj, VALUE n)
{
#ifdef HAVE_WSCRL
  struct windata *winp;

  GetWINDOW(obj, winp);
  /* may have to raise exception on ERR */
  return (wscrl(winp->window,NUM2INT(n)) == OK) ? Qtrue : Qfalse;
#else
  return Qfalse;
#endif
}

static VALUE
window_attroff(VALUE obj, VALUE attrs)
{
#ifdef HAVE_WATTROFF
  struct windata *winp;

  GetWINDOW(obj,winp);
  return INT2FIX(wattroff(winp->window,NUM2INT(attrs)));
#else
  return Qtrue;
#endif
}

static VALUE
window_attron(VALUE obj, VALUE attrs)
{
#ifdef HAVE_WATTRON
  struct windata *winp;
  VALUE val;

  GetWINDOW(obj,winp);
  val = INT2FIX(wattron(winp->window,NUM2INT(attrs)));
  if( rb_block_given_p() ){
    rb_yield(val);
    wattroff(winp->window,NUM2INT(attrs));
    return val;
  }
  else{
    return val;
  }
#else
  return Qtrue;
#endif
}

static VALUE
window_attrset(VALUE obj, VALUE attrs)
{
#ifdef HAVE_WATTRSET
  struct windata *winp;

  GetWINDOW(obj,winp);
  return INT2FIX(wattrset(winp->window,NUM2INT(attrs)));
#else
  return Qtrue;
#endif
}

static VALUE
window_bkgdset(VALUE obj, VALUE ch)
{
#ifdef HAVE_WBKGDSET
  struct windata *winp;

  GetWINDOW(obj,winp);
  wbkgdset(winp->window, NUM2CH(ch));
#endif
  return Qnil;
}

static VALUE
window_bkgd(VALUE obj, VALUE ch)
{
#ifdef HAVE_WBKGD
  struct windata *winp;

  GetWINDOW(obj,winp);
  return (wbkgd(winp->window, NUM2CH(ch)) == OK) ? Qtrue : Qfalse;
#else
  return Qfalse;
#endif
}

static VALUE
window_getbkgd(VALUE obj)
{
#ifdef HAVE_WGETBKGD
  chtype c;
  struct windata *winp;

  GetWINDOW(obj,winp);
  return (c = getbkgd(winp->window) != ERR) ? CH2FIX(c) : Qnil;
#else
  return Qnil;
#endif
}

static VALUE
window_resize(VALUE obj, VALUE lin, VALUE col)
{
#if defined(HAVE_WRESIZE)
  struct windata *winp;

  GetWINDOW(obj,winp);
  return wresize(winp->window, NUM2INT(lin), NUM2INT(col)) == OK ? Qtrue : Qfalse;
#else
  return Qnil;
#endif
}

static VALUE
window_keypad(VALUE obj, VALUE val)
{
#ifdef HAVE_KEYPAD
  struct windata *winp;

  GetWINDOW(obj,winp);
  /* keypad() of NetBSD's libcurses returns no value */
#if defined(__NetBSD__) && !defined(NCURSES_VERSION)
  keypad(winp->window,(RTEST(val) ? TRUE : FALSE));
  return Qnil;
#else
  /* may have to raise exception on ERR */
  return (keypad(winp->window,RTEST(val) ? TRUE : FALSE)) == OK ?
    Qtrue : Qfalse;
#endif
#else
    rb_notimplement();
#endif /* HAVE_KEYPAD */
}

static VALUE
window_nodelay(VALUE obj, VALUE val)
{
#ifdef HAVE_NODELAY
  struct windata *winp;
  GetWINDOW(obj,winp);

  /* nodelay() of NetBSD's libcurses returns no value */
#if defined(__NetBSD__) && !defined(NCURSES_VERSION)
  nodelay(winp->window, RTEST(val) ? TRUE : FALSE);
  return Qnil;
#else
  return nodelay(winp->window,RTEST(val) ? TRUE : FALSE) == OK ? Qtrue : Qfalse;
#endif
#else
    rb_notimplement();
#endif
}

static VALUE
window_timeout(VALUE obj, VALUE delay)
{
#ifdef HAVE_WTIMEOUT
  struct windata *winp;
  GetWINDOW(obj,winp);

  wtimeout(winp->window,NUM2INT(delay));
  return Qnil;
#else
    rb_notimplement();
#endif
}

/*------------------------- Initialization -------------------------*/
void
Init_curses()
{
    mCurses    = rb_define_module("Curses");
    mKey       = rb_define_module_under(mCurses, "Key");

    rb_gc_register_address(&rb_stdscr);

#ifdef USE_MOUSE
    cMouseEvent = rb_define_class_under(mCurses,"MouseEvent",rb_cObject);
    rb_undef_method(CLASS_OF(cMouseEvent),"new");
    rb_define_method(cMouseEvent, "eid", curs_mouse_id, 0);
    rb_define_method(cMouseEvent, "x", curs_mouse_x, 0);
    rb_define_method(cMouseEvent, "y", curs_mouse_y, 0);
    rb_define_method(cMouseEvent, "z", curs_mouse_z, 0);
    rb_define_method(cMouseEvent, "bstate", curs_mouse_bstate, 0);
#endif /* USE_MOUSE */

    rb_define_module_function(mCurses, "init_screen", curses_init_screen, 0);
    rb_define_module_function(mCurses, "close_screen", curses_close_screen, 0);
    rb_define_module_function(mCurses, "closed?", curses_closed, 0);
    rb_define_module_function(mCurses, "stdscr", curses_stdscr, 0);
    rb_define_module_function(mCurses, "refresh", curses_refresh, 0);
    rb_define_module_function(mCurses, "doupdate", curses_doupdate, 0);
    rb_define_module_function(mCurses, "clear", curses_clear, 0);
    rb_define_module_function(mCurses, "clrtoeol", curses_clrtoeol, 0);
    rb_define_module_function(mCurses, "echo", curses_echo, 0);
    rb_define_module_function(mCurses, "noecho", curses_noecho, 0);
    rb_define_module_function(mCurses, "raw", curses_raw, 0);
    rb_define_module_function(mCurses, "noraw", curses_noraw, 0);
    rb_define_module_function(mCurses, "cbreak", curses_cbreak, 0);
    rb_define_module_function(mCurses, "nocbreak", curses_nocbreak, 0);
    rb_define_alias(mCurses, "crmode", "cbreak");
    rb_define_alias(mCurses, "nocrmode", "nocbreak");
    rb_define_module_function(mCurses, "nl", curses_nl, 0);
    rb_define_module_function(mCurses, "nonl", curses_nonl, 0);
    rb_define_module_function(mCurses, "beep", curses_beep, 0);
    rb_define_module_function(mCurses, "flash", curses_flash, 0);
    rb_define_module_function(mCurses, "ungetch", curses_ungetch, 1);
    rb_define_module_function(mCurses, "setpos", curses_setpos, 2);
    rb_define_module_function(mCurses, "standout", curses_standout, 0);
    rb_define_module_function(mCurses, "standend", curses_standend, 0);
    rb_define_module_function(mCurses, "inch", curses_inch, 0);
    rb_define_module_function(mCurses, "addch", curses_addch, 1);
    rb_define_module_function(mCurses, "insch", curses_insch, 1);
    rb_define_module_function(mCurses, "addstr", curses_addstr, 1);
    rb_define_module_function(mCurses, "getch", curses_getch, 0);
    rb_define_module_function(mCurses, "getstr", curses_getstr, 0);
    rb_define_module_function(mCurses, "delch", curses_delch, 0);
    rb_define_module_function(mCurses, "deleteln", curses_deleteln, 0);
    rb_define_module_function(mCurses, "insertln", curses_insertln, 0);
    rb_define_module_function(mCurses, "keyname", curses_keyname, 1);
    rb_define_module_function(mCurses, "lines", curses_lines, 0);
    rb_define_module_function(mCurses, "cols", curses_cols, 0);
    rb_define_module_function(mCurses, "curs_set", curses_curs_set, 1);
    rb_define_module_function(mCurses, "scrl", curses_scrl, 1);
    rb_define_module_function(mCurses, "setscrreg", curses_setscrreg, 2);
    rb_define_module_function(mCurses, "attroff", curses_attroff, 1);
    rb_define_module_function(mCurses, "attron", curses_attron, 1);
    rb_define_module_function(mCurses, "attrset", curses_attrset, 1);
    rb_define_module_function(mCurses, "bkgdset", curses_bkgdset, 1);
    rb_define_module_function(mCurses, "bkgd", curses_bkgd, 1);
    rb_define_module_function(mCurses, "resizeterm", curses_resizeterm, 2);
    rb_define_module_function(mCurses, "resize", curses_resizeterm, 2);
#ifdef USE_COLOR
    rb_define_module_function(mCurses, "start_color", curses_start_color, 0);
    rb_define_module_function(mCurses, "init_pair", curses_init_pair, 3);
    rb_define_module_function(mCurses, "init_color", curses_init_color, 4);
    rb_define_module_function(mCurses, "has_colors?", curses_has_colors, 0);
    rb_define_module_function(mCurses, "can_change_color?",
                              curses_can_change_color, 0);
    rb_define_module_function(mCurses, "color_content", curses_color_content, 1);
    rb_define_module_function(mCurses, "pair_content", curses_pair_content, 1);
    rb_define_module_function(mCurses, "color_pair", curses_color_pair, 1);
    rb_define_module_function(mCurses, "pair_number", curses_pair_number, 1);
#endif /* USE_COLOR */
#ifdef USE_MOUSE
    rb_define_module_function(mCurses, "getmouse", curses_getmouse, 0);
    rb_define_module_function(mCurses, "ungetmouse", curses_ungetmouse, 1);
    rb_define_module_function(mCurses, "mouseinterval", curses_mouseinterval, 1);
    rb_define_module_function(mCurses, "mousemask", curses_mousemask, 1);
#endif /* USE_MOUSE */

    rb_define_module_function(mCurses, "timeout=", curses_timeout, 1);
    rb_define_module_function(mCurses, "def_prog_mode", curses_def_prog_mode, 0);
    rb_define_module_function(mCurses, "reset_prog_mode", curses_reset_prog_mode, 0);

    cWindow = rb_define_class_under(mCurses, "Window", rb_cData);
    rb_define_alloc_func(cWindow, window_s_allocate);
    rb_define_method(cWindow, "initialize", window_initialize, 4);
    rb_define_method(cWindow, "subwin", window_subwin, 4);
    rb_define_method(cWindow, "close", window_close, 0);
    rb_define_method(cWindow, "clear", window_clear, 0);
    rb_define_method(cWindow, "clrtoeol", window_clrtoeol, 0);
    rb_define_method(cWindow, "refresh", window_refresh, 0);
    rb_define_method(cWindow, "noutrefresh", window_noutrefresh, 0);
    rb_define_method(cWindow, "box", window_box, -1);
    rb_define_method(cWindow, "move", window_move, 2);
    rb_define_method(cWindow, "setpos", window_setpos, 2);
#if defined(USE_COLOR) && defined(HAVE_WCOLOR_SET)
    rb_define_method(cWindow, "color_set", window_color_set, 1);
#endif /* USE_COLOR && HAVE_WCOLOR_SET */
    rb_define_method(cWindow, "cury", window_cury, 0);
    rb_define_method(cWindow, "curx", window_curx, 0);
    rb_define_method(cWindow, "maxy", window_maxy, 0);
    rb_define_method(cWindow, "maxx", window_maxx, 0);
    rb_define_method(cWindow, "begy", window_begy, 0);
    rb_define_method(cWindow, "begx", window_begx, 0);
    rb_define_method(cWindow, "standout", window_standout, 0);
    rb_define_method(cWindow, "standend", window_standend, 0);
    rb_define_method(cWindow, "inch", window_inch, 0);
    rb_define_method(cWindow, "addch", window_addch, 1);
    rb_define_method(cWindow, "insch", window_insch, 1);
    rb_define_method(cWindow, "addstr", window_addstr, 1);
    rb_define_method(cWindow, "<<", window_addstr2, 1);
    rb_define_method(cWindow, "getch", window_getch, 0);
    rb_define_method(cWindow, "getstr", window_getstr, 0);
    rb_define_method(cWindow, "delch", window_delch, 0);
    rb_define_method(cWindow, "deleteln", window_deleteln, 0);
    rb_define_method(cWindow, "insertln", window_insertln, 0);
    rb_define_method(cWindow, "scroll", window_scroll, 0);
    rb_define_method(cWindow, "scrollok", window_scrollok, 1);
    rb_define_method(cWindow, "idlok", window_idlok, 1);
    rb_define_method(cWindow, "setscrreg", window_setscrreg, 2);
    rb_define_method(cWindow, "scrl", window_scrl, 1);
    rb_define_method(cWindow, "resize", window_resize, 2);
    rb_define_method(cWindow, "keypad", window_keypad, 1);
    rb_define_method(cWindow, "keypad=", window_keypad, 1);

    rb_define_method(cWindow, "attroff", window_attroff, 1);
    rb_define_method(cWindow, "attron", window_attron, 1);
    rb_define_method(cWindow, "attrset", window_attrset, 1);
    rb_define_method(cWindow, "bkgdset", window_bkgdset, 1);
    rb_define_method(cWindow, "bkgd", window_bkgd, 1);
    rb_define_method(cWindow, "getbkgd", window_getbkgd, 0);

    rb_define_method(cWindow, "nodelay=", window_nodelay, 1);
    rb_define_method(cWindow, "timeout=", window_timeout, 1);

#define rb_curses_define_const(c) rb_define_const(mCurses,#c,UINT2NUM(c))

#ifdef USE_COLOR
    rb_curses_define_const(A_ATTRIBUTES);
#ifdef A_NORMAL
    rb_curses_define_const(A_NORMAL);
#endif
    rb_curses_define_const(A_STANDOUT);
    rb_curses_define_const(A_UNDERLINE);
    rb_curses_define_const(A_REVERSE);
    rb_curses_define_const(A_BLINK);
    rb_curses_define_const(A_DIM);
    rb_curses_define_const(A_BOLD);
    rb_curses_define_const(A_PROTECT);
#ifdef A_INVIS /* for NetBSD */
    rb_curses_define_const(A_INVIS);
#endif
    rb_curses_define_const(A_ALTCHARSET);
    rb_curses_define_const(A_CHARTEXT);
#ifdef A_HORIZONTAL
    rb_curses_define_const(A_HORIZONTAL);
#endif
#ifdef A_LEFT
    rb_curses_define_const(A_LEFT);
#endif
#ifdef A_LOW
    rb_curses_define_const(A_LOW);
#endif
#ifdef A_RIGHT
    rb_curses_define_const(A_RIGHT);
#endif
#ifdef A_TOP
    rb_curses_define_const(A_TOP);
#endif
#ifdef A_VERTICAL
    rb_curses_define_const(A_VERTICAL);
#endif
    rb_curses_define_const(A_COLOR);

#ifdef COLORS
    rb_curses_define_const(COLORS);
#endif
    rb_curses_define_const(COLOR_BLACK);
    rb_curses_define_const(COLOR_RED);
    rb_curses_define_const(COLOR_GREEN);
    rb_curses_define_const(COLOR_YELLOW);
    rb_curses_define_const(COLOR_BLUE);
    rb_curses_define_const(COLOR_MAGENTA);
    rb_curses_define_const(COLOR_CYAN);
    rb_curses_define_const(COLOR_WHITE);
#endif /* USE_COLOR */
#ifdef USE_MOUSE
#ifdef BUTTON1_PRESSED
    rb_curses_define_const(BUTTON1_PRESSED);
#endif
#ifdef BUTTON1_RELEASED
    rb_curses_define_const(BUTTON1_RELEASED);
#endif
#ifdef BUTTON1_CLICKED
    rb_curses_define_const(BUTTON1_CLICKED);
#endif
#ifdef BUTTON1_DOUBLE_CLICKED
    rb_curses_define_const(BUTTON1_DOUBLE_CLICKED);
#endif
#ifdef BUTTON1_TRIPLE_CLICKED
    rb_curses_define_const(BUTTON1_TRIPLE_CLICKED);
#endif
#ifdef BUTTON2_PRESSED
    rb_curses_define_const(BUTTON2_PRESSED);
#endif
#ifdef BUTTON2_RELEASED
    rb_curses_define_const(BUTTON2_RELEASED);
#endif
#ifdef BUTTON2_CLICKED
    rb_curses_define_const(BUTTON2_CLICKED);
#endif
#ifdef BUTTON2_DOUBLE_CLICKED
    rb_curses_define_const(BUTTON2_DOUBLE_CLICKED);
#endif
#ifdef BUTTON2_TRIPLE_CLICKED
    rb_curses_define_const(BUTTON2_TRIPLE_CLICKED);
#endif
#ifdef BUTTON3_PRESSED
    rb_curses_define_const(BUTTON3_PRESSED);
#endif
#ifdef BUTTON3_RELEASED
    rb_curses_define_const(BUTTON3_RELEASED);
#endif
#ifdef BUTTON3_CLICKED
    rb_curses_define_const(BUTTON3_CLICKED);
#endif
#ifdef BUTTON3_DOUBLE_CLICKED
    rb_curses_define_const(BUTTON3_DOUBLE_CLICKED);
#endif
#ifdef BUTTON3_TRIPLE_CLICKED
    rb_curses_define_const(BUTTON3_TRIPLE_CLICKED);
#endif
#ifdef BUTTON4_PRESSED
    rb_curses_define_const(BUTTON4_PRESSED);
#endif
#ifdef BUTTON4_RELEASED
    rb_curses_define_const(BUTTON4_RELEASED);
#endif
#ifdef BUTTON4_CLICKED
    rb_curses_define_const(BUTTON4_CLICKED);
#endif
#ifdef BUTTON4_DOUBLE_CLICKED
    rb_curses_define_const(BUTTON4_DOUBLE_CLICKED);
#endif
#ifdef BUTTON4_TRIPLE_CLICKED
    rb_curses_define_const(BUTTON4_TRIPLE_CLICKED);
#endif
#ifdef BUTTON_SHIFT
    rb_curses_define_const(BUTTON_SHIFT);
#endif
#ifdef BUTTON_CTRL
    rb_curses_define_const(BUTTON_CTRL);
#endif
#ifdef BUTTON_ALT
    rb_curses_define_const(BUTTON_ALT);
#endif
#ifdef ALL_MOUSE_EVENTS
    rb_curses_define_const(ALL_MOUSE_EVENTS);
#endif
#ifdef REPORT_MOUSE_POSITION
    rb_curses_define_const(REPORT_MOUSE_POSITION);
#endif
#endif /* USE_MOUSE */

#if defined(KEY_MOUSE) && defined(USE_MOUSE)
    rb_curses_define_const(KEY_MOUSE);
    rb_define_const(mKey, "MOUSE", INT2NUM(KEY_MOUSE));
#endif
#ifdef KEY_MIN
    rb_curses_define_const(KEY_MIN);
    rb_define_const(mKey, "MIN", INT2NUM(KEY_MIN));
#endif
#ifdef KEY_BREAK
    rb_curses_define_const(KEY_BREAK);
    rb_define_const(mKey, "BREAK", INT2NUM(KEY_BREAK));
#endif
#ifdef KEY_DOWN
    rb_curses_define_const(KEY_DOWN);
    rb_define_const(mKey, "DOWN", INT2NUM(KEY_DOWN));
#endif
#ifdef KEY_UP
    rb_curses_define_const(KEY_UP);
    rb_define_const(mKey, "UP", INT2NUM(KEY_UP));
#endif
#ifdef KEY_LEFT
    rb_curses_define_const(KEY_LEFT);
    rb_define_const(mKey, "LEFT", INT2NUM(KEY_LEFT));
#endif
#ifdef KEY_RIGHT
    rb_curses_define_const(KEY_RIGHT);
    rb_define_const(mKey, "RIGHT", INT2NUM(KEY_RIGHT));
#endif
#ifdef KEY_HOME
    rb_curses_define_const(KEY_HOME);
    rb_define_const(mKey, "HOME", INT2NUM(KEY_HOME));
#endif
#ifdef KEY_BACKSPACE
    rb_curses_define_const(KEY_BACKSPACE);
    rb_define_const(mKey, "BACKSPACE", INT2NUM(KEY_BACKSPACE));
#endif
#ifdef KEY_F
    /* KEY_F(n) : 0 <= n <= 63 */
    {
      int i;
      char c[8];
      for( i=0; i<64; i++ ){
        sprintf(c, "KEY_F%d", i);
        rb_define_const(mCurses, c, INT2NUM(KEY_F(i)));
        sprintf(c, "F%d", i);
        rb_define_const(mKey, c, INT2NUM(KEY_F(i)));
      }
    }
#endif
#ifdef KEY_DL
    rb_curses_define_const(KEY_DL);
    rb_define_const(mKey, "DL", INT2NUM(KEY_DL));
#endif
#ifdef KEY_IL
    rb_curses_define_const(KEY_IL);
    rb_define_const(mKey, "IL", INT2NUM(KEY_IL));
#endif
#ifdef KEY_DC
    rb_curses_define_const(KEY_DC);
    rb_define_const(mKey, "DC", INT2NUM(KEY_DC));
#endif
#ifdef KEY_IC
    rb_curses_define_const(KEY_IC);
    rb_define_const(mKey, "IC", INT2NUM(KEY_IC));
#endif
#ifdef KEY_EIC
    rb_curses_define_const(KEY_EIC);
    rb_define_const(mKey, "EIC", INT2NUM(KEY_EIC));
#endif
#ifdef KEY_CLEAR
    rb_curses_define_const(KEY_CLEAR);
    rb_define_const(mKey, "CLEAR", INT2NUM(KEY_CLEAR));
#endif
#ifdef KEY_EOS
    rb_curses_define_const(KEY_EOS);
    rb_define_const(mKey, "EOS", INT2NUM(KEY_EOS));
#endif
#ifdef KEY_EOL
    rb_curses_define_const(KEY_EOL);
    rb_define_const(mKey, "EOL", INT2NUM(KEY_EOL));
#endif
#ifdef KEY_SF
    rb_curses_define_const(KEY_SF);
    rb_define_const(mKey, "SF", INT2NUM(KEY_SF));
#endif
#ifdef KEY_SR
    rb_curses_define_const(KEY_SR);
    rb_define_const(mKey, "SR", INT2NUM(KEY_SR));
#endif
#ifdef KEY_NPAGE
    rb_curses_define_const(KEY_NPAGE);
    rb_define_const(mKey, "NPAGE", INT2NUM(KEY_NPAGE));
#endif
#ifdef KEY_PPAGE
    rb_curses_define_const(KEY_PPAGE);
    rb_define_const(mKey, "PPAGE", INT2NUM(KEY_PPAGE));
#endif
#ifdef KEY_STAB
    rb_curses_define_const(KEY_STAB);
    rb_define_const(mKey, "STAB", INT2NUM(KEY_STAB));
#endif
#ifdef KEY_CTAB
    rb_curses_define_const(KEY_CTAB);
    rb_define_const(mKey, "CTAB", INT2NUM(KEY_CTAB));
#endif
#ifdef KEY_CATAB
    rb_curses_define_const(KEY_CATAB);
    rb_define_const(mKey, "CATAB", INT2NUM(KEY_CATAB));
#endif
#ifdef KEY_ENTER
    rb_curses_define_const(KEY_ENTER);
    rb_define_const(mKey, "ENTER", INT2NUM(KEY_ENTER));
#endif
#ifdef KEY_SRESET
    rb_curses_define_const(KEY_SRESET);
    rb_define_const(mKey, "SRESET", INT2NUM(KEY_SRESET));
#endif
#ifdef KEY_RESET
    rb_curses_define_const(KEY_RESET);
    rb_define_const(mKey, "RESET", INT2NUM(KEY_RESET));
#endif
#ifdef KEY_PRINT
    rb_curses_define_const(KEY_PRINT);
    rb_define_const(mKey, "PRINT", INT2NUM(KEY_PRINT));
#endif
#ifdef KEY_LL
    rb_curses_define_const(KEY_LL);
    rb_define_const(mKey, "LL", INT2NUM(KEY_LL));
#endif
#ifdef KEY_A1
    rb_curses_define_const(KEY_A1);
    rb_define_const(mKey, "A1", INT2NUM(KEY_A1));
#endif
#ifdef KEY_A3
    rb_curses_define_const(KEY_A3);
    rb_define_const(mKey, "A3", INT2NUM(KEY_A3));
#endif
#ifdef KEY_B2
    rb_curses_define_const(KEY_B2);
    rb_define_const(mKey, "B2", INT2NUM(KEY_B2));
#endif
#ifdef KEY_C1
    rb_curses_define_const(KEY_C1);
    rb_define_const(mKey, "C1", INT2NUM(KEY_C1));
#endif
#ifdef KEY_C3
    rb_curses_define_const(KEY_C3);
    rb_define_const(mKey, "C3", INT2NUM(KEY_C3));
#endif
#ifdef KEY_BTAB
    rb_curses_define_const(KEY_BTAB);
    rb_define_const(mKey, "BTAB", INT2NUM(KEY_BTAB));
#endif
#ifdef KEY_BEG
    rb_curses_define_const(KEY_BEG);
    rb_define_const(mKey, "BEG", INT2NUM(KEY_BEG));
#endif
#ifdef KEY_CANCEL
    rb_curses_define_const(KEY_CANCEL);
    rb_define_const(mKey, "CANCEL", INT2NUM(KEY_CANCEL));
#endif
#ifdef KEY_CLOSE
    rb_curses_define_const(KEY_CLOSE);
    rb_define_const(mKey, "CLOSE", INT2NUM(KEY_CLOSE));
#endif
#ifdef KEY_COMMAND
    rb_curses_define_const(KEY_COMMAND);
    rb_define_const(mKey, "COMMAND", INT2NUM(KEY_COMMAND));
#endif
#ifdef KEY_COPY
    rb_curses_define_const(KEY_COPY);
    rb_define_const(mKey, "COPY", INT2NUM(KEY_COPY));
#endif
#ifdef KEY_CREATE
    rb_curses_define_const(KEY_CREATE);
    rb_define_const(mKey, "CREATE", INT2NUM(KEY_CREATE));
#endif
#ifdef KEY_END
    rb_curses_define_const(KEY_END);
    rb_define_const(mKey, "END", INT2NUM(KEY_END));
#endif
#ifdef KEY_EXIT
    rb_curses_define_const(KEY_EXIT);
    rb_define_const(mKey, "EXIT", INT2NUM(KEY_EXIT));
#endif
#ifdef KEY_FIND
    rb_curses_define_const(KEY_FIND);
    rb_define_const(mKey, "FIND", INT2NUM(KEY_FIND));
#endif
#ifdef KEY_HELP
    rb_curses_define_const(KEY_HELP);
    rb_define_const(mKey, "HELP", INT2NUM(KEY_HELP));
#endif
#ifdef KEY_MARK
    rb_curses_define_const(KEY_MARK);
    rb_define_const(mKey, "MARK", INT2NUM(KEY_MARK));
#endif
#ifdef KEY_MESSAGE
    rb_curses_define_const(KEY_MESSAGE);
    rb_define_const(mKey, "MESSAGE", INT2NUM(KEY_MESSAGE));
#endif
#ifdef KEY_MOVE
    rb_curses_define_const(KEY_MOVE);
    rb_define_const(mKey, "MOVE", INT2NUM(KEY_MOVE));
#endif
#ifdef KEY_NEXT
    rb_curses_define_const(KEY_NEXT);
    rb_define_const(mKey, "NEXT", INT2NUM(KEY_NEXT));
#endif
#ifdef KEY_OPEN
    rb_curses_define_const(KEY_OPEN);
    rb_define_const(mKey, "OPEN", INT2NUM(KEY_OPEN));
#endif
#ifdef KEY_OPTIONS
    rb_curses_define_const(KEY_OPTIONS);
    rb_define_const(mKey, "OPTIONS", INT2NUM(KEY_OPTIONS));
#endif
#ifdef KEY_PREVIOUS
    rb_curses_define_const(KEY_PREVIOUS);
    rb_define_const(mKey, "PREVIOUS", INT2NUM(KEY_PREVIOUS));
#endif
#ifdef KEY_REDO
    rb_curses_define_const(KEY_REDO);
    rb_define_const(mKey, "REDO", INT2NUM(KEY_REDO));
#endif
#ifdef KEY_REFERENCE
    rb_curses_define_const(KEY_REFERENCE);
    rb_define_const(mKey, "REFERENCE", INT2NUM(KEY_REFERENCE));
#endif
#ifdef KEY_REFRESH
    rb_curses_define_const(KEY_REFRESH);
    rb_define_const(mKey, "REFRESH", INT2NUM(KEY_REFRESH));
#endif
#ifdef KEY_REPLACE
    rb_curses_define_const(KEY_REPLACE);
    rb_define_const(mKey, "REPLACE", INT2NUM(KEY_REPLACE));
#endif
#ifdef KEY_RESTART
    rb_curses_define_const(KEY_RESTART);
    rb_define_const(mKey, "RESTART", INT2NUM(KEY_RESTART));
#endif
#ifdef KEY_RESUME
    rb_curses_define_const(KEY_RESUME);
    rb_define_const(mKey, "RESUME", INT2NUM(KEY_RESUME));
#endif
#ifdef KEY_SAVE
    rb_curses_define_const(KEY_SAVE);
    rb_define_const(mKey, "SAVE", INT2NUM(KEY_SAVE));
#endif
#ifdef KEY_SBEG
    rb_curses_define_const(KEY_SBEG);
    rb_define_const(mKey, "SBEG", INT2NUM(KEY_SBEG));
#endif
#ifdef KEY_SCANCEL
    rb_curses_define_const(KEY_SCANCEL);
    rb_define_const(mKey, "SCANCEL", INT2NUM(KEY_SCANCEL));
#endif
#ifdef KEY_SCOMMAND
    rb_curses_define_const(KEY_SCOMMAND);
    rb_define_const(mKey, "SCOMMAND", INT2NUM(KEY_SCOMMAND));
#endif
#ifdef KEY_SCOPY
    rb_curses_define_const(KEY_SCOPY);
    rb_define_const(mKey, "SCOPY", INT2NUM(KEY_SCOPY));
#endif
#ifdef KEY_SCREATE
    rb_curses_define_const(KEY_SCREATE);
    rb_define_const(mKey, "SCREATE", INT2NUM(KEY_SCREATE));
#endif
#ifdef KEY_SDC
    rb_curses_define_const(KEY_SDC);
    rb_define_const(mKey, "SDC", INT2NUM(KEY_SDC));
#endif
#ifdef KEY_SDL
    rb_curses_define_const(KEY_SDL);
    rb_define_const(mKey, "SDL", INT2NUM(KEY_SDL));
#endif
#ifdef KEY_SELECT
    rb_curses_define_const(KEY_SELECT);
    rb_define_const(mKey, "SELECT", INT2NUM(KEY_SELECT));
#endif
#ifdef KEY_SEND
    rb_curses_define_const(KEY_SEND);
    rb_define_const(mKey, "SEND", INT2NUM(KEY_SEND));
#endif
#ifdef KEY_SEOL
    rb_curses_define_const(KEY_SEOL);
    rb_define_const(mKey, "SEOL", INT2NUM(KEY_SEOL));
#endif
#ifdef KEY_SEXIT
    rb_curses_define_const(KEY_SEXIT);
    rb_define_const(mKey, "SEXIT", INT2NUM(KEY_SEXIT));
#endif
#ifdef KEY_SFIND
    rb_curses_define_const(KEY_SFIND);
    rb_define_const(mKey, "SFIND", INT2NUM(KEY_SFIND));
#endif
#ifdef KEY_SHELP
    rb_curses_define_const(KEY_SHELP);
    rb_define_const(mKey, "SHELP", INT2NUM(KEY_SHELP));
#endif
#ifdef KEY_SHOME
    rb_curses_define_const(KEY_SHOME);
    rb_define_const(mKey, "SHOME", INT2NUM(KEY_SHOME));
#endif
#ifdef KEY_SIC
    rb_curses_define_const(KEY_SIC);
    rb_define_const(mKey, "SIC", INT2NUM(KEY_SIC));
#endif
#ifdef KEY_SLEFT
    rb_curses_define_const(KEY_SLEFT);
    rb_define_const(mKey, "SLEFT", INT2NUM(KEY_SLEFT));
#endif
#ifdef KEY_SMESSAGE
    rb_curses_define_const(KEY_SMESSAGE);
    rb_define_const(mKey, "SMESSAGE", INT2NUM(KEY_SMESSAGE));
#endif
#ifdef KEY_SMOVE
    rb_curses_define_const(KEY_SMOVE);
    rb_define_const(mKey, "SMOVE", INT2NUM(KEY_SMOVE));
#endif
#ifdef KEY_SNEXT
    rb_curses_define_const(KEY_SNEXT);
    rb_define_const(mKey, "SNEXT", INT2NUM(KEY_SNEXT));
#endif
#ifdef KEY_SOPTIONS
    rb_curses_define_const(KEY_SOPTIONS);
    rb_define_const(mKey, "SOPTIONS", INT2NUM(KEY_SOPTIONS));
#endif
#ifdef KEY_SPREVIOUS
    rb_curses_define_const(KEY_SPREVIOUS);
    rb_define_const(mKey, "SPREVIOUS", INT2NUM(KEY_SPREVIOUS));
#endif
#ifdef KEY_SPRINT
    rb_curses_define_const(KEY_SPRINT);
    rb_define_const(mKey, "SPRINT", INT2NUM(KEY_SPRINT));
#endif
#ifdef KEY_SREDO
    rb_curses_define_const(KEY_SREDO);
    rb_define_const(mKey, "SREDO", INT2NUM(KEY_SREDO));
#endif
#ifdef KEY_SREPLACE
    rb_curses_define_const(KEY_SREPLACE);
    rb_define_const(mKey, "SREPLACE", INT2NUM(KEY_SREPLACE));
#endif
#ifdef KEY_SRIGHT
    rb_curses_define_const(KEY_SRIGHT);
    rb_define_const(mKey, "SRIGHT", INT2NUM(KEY_SRIGHT));
#endif
#ifdef KEY_SRSUME
    rb_curses_define_const(KEY_SRSUME);
    rb_define_const(mKey, "SRSUME", INT2NUM(KEY_SRSUME));
#endif
#ifdef KEY_SSAVE
    rb_curses_define_const(KEY_SSAVE);
    rb_define_const(mKey, "SSAVE", INT2NUM(KEY_SSAVE));
#endif
#ifdef KEY_SSUSPEND
    rb_curses_define_const(KEY_SSUSPEND);
    rb_define_const(mKey, "SSUSPEND", INT2NUM(KEY_SSUSPEND));
#endif
#ifdef KEY_SUNDO
    rb_curses_define_const(KEY_SUNDO);
    rb_define_const(mKey, "SUNDO", INT2NUM(KEY_SUNDO));
#endif
#ifdef KEY_SUSPEND
    rb_curses_define_const(KEY_SUSPEND);
    rb_define_const(mKey, "SUSPEND", INT2NUM(KEY_SUSPEND));
#endif
#ifdef KEY_UNDO
    rb_curses_define_const(KEY_UNDO);
    rb_define_const(mKey, "UNDO", INT2NUM(KEY_UNDO));
#endif
#ifdef KEY_RESIZE
    rb_curses_define_const(KEY_RESIZE);
    rb_define_const(mKey, "RESIZE", INT2NUM(KEY_RESIZE));
#endif
#ifdef KEY_MAX
    rb_curses_define_const(KEY_MAX);
    rb_define_const(mKey, "MAX", INT2NUM(KEY_MAX));
#endif
    {
      int c;
      char name[] = "KEY_CTRL_x";
      for( c = 'A'; c <= 'Z'; c++ ){
        sprintf(name, "KEY_CTRL_%c", c);
        rb_define_const(mCurses, name, INT2FIX(c - 'A' + 1));
      }
    }
#undef rb_curses_define_const

    rb_set_end_proc(curses_finalize, 0);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/dbm/dbm.c

root/ext/dbm/dbm.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. closed_dbm
  2. free_dbm
  3. fdbm_close
  4. fdbm_closed
  5. fdbm_alloc
  6. fdbm_initialize
  7. fdbm_s_open
  8. fdbm_fetch
  9. fdbm_aref
  10. fdbm_fetch_m
  11. fdbm_index
  12. fdbm_select
  13. fdbm_values_at
  14. fdbm_modify
  15. fdbm_delete
  16. fdbm_shift
  17. fdbm_delete_if
  18. fdbm_clear
  19. fdbm_invert
  20. each_pair
  21. update_i
  22. fdbm_update
  23. fdbm_replace
  24. fdbm_store
  25. fdbm_length
  26. fdbm_empty_p
  27. fdbm_each_value
  28. fdbm_each_key
  29. fdbm_each_pair
  30. fdbm_keys
  31. fdbm_values
  32. fdbm_has_key
  33. fdbm_has_value
  34. fdbm_to_a
  35. fdbm_to_hash
  36. fdbm_reject
  37. Init_dbm
/************************************************

  dbm.c -

  $Author: akr $
  $Date: 2005/09/24 00:17:42 $
  created at: Mon Jan 24 15:59:52 JST 1994

  Copyright (C) 1995-2001 Yukihiro Matsumoto

************************************************/

#include "ruby.h"

#ifdef HAVE_CDEFS_H
# include <cdefs.h>
#endif
#ifdef HAVE_SYS_CDEFS_H
# include <sys/cdefs.h>
#endif
#include DBM_HDR
#include <fcntl.h>
#include <errno.h>

static VALUE rb_cDBM, rb_eDBMError;

#define RUBY_DBM_RW_BIT 0x20000000

struct dbmdata {
    int  di_size;
    DBM *di_dbm;
};

static void
closed_dbm()
{
    rb_raise(rb_eDBMError, "closed DBM file");
}

#define GetDBM(obj, dbmp) {\
    Data_Get_Struct(obj, struct dbmdata, dbmp);\
    if (dbmp == 0) closed_dbm();\
    if (dbmp->di_dbm == 0) closed_dbm();\
}

#define GetDBM2(obj, data, dbm) {\
    GetDBM(obj, data);\
    (dbm) = dbmp->di_dbm;\
}

static void
free_dbm(dbmp)
    struct dbmdata *dbmp;
{
    if (dbmp) {
        if (dbmp->di_dbm) dbm_close(dbmp->di_dbm);
        free(dbmp);
    }
}

static VALUE
fdbm_close(obj)
    VALUE obj;
{
    struct dbmdata *dbmp;

    GetDBM(obj, dbmp);
    dbm_close(dbmp->di_dbm);
    dbmp->di_dbm = 0;

    return Qnil;
}

static VALUE
fdbm_closed(obj)
    VALUE obj;
{
    struct dbmdata *dbmp;

    Data_Get_Struct(obj, struct dbmdata, dbmp);
    if (dbmp == 0)
        return Qtrue;
    if (dbmp->di_dbm == 0)
        return Qtrue;

    return Qfalse;
}

static VALUE fdbm_alloc _((VALUE));
static VALUE
fdbm_alloc(klass)
    VALUE klass;
{
    return Data_Wrap_Struct(klass, 0, free_dbm, 0);
}

static VALUE
fdbm_initialize(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    VALUE file, vmode, vflags;
    DBM *dbm;
    struct dbmdata *dbmp;
    int mode, flags = 0;

    if (rb_scan_args(argc, argv, "12", &file, &vmode, &vflags) == 1) {
        mode = 0666;            /* default value */
    }
    else if (NIL_P(vmode)) {
        mode = -1;              /* return nil if DB not exist */
    }
    else {
        mode = NUM2INT(vmode);
    }

    if (!NIL_P(vflags))
        flags = NUM2INT(vflags);

    SafeStringValue(file);

    if (flags & RUBY_DBM_RW_BIT) {
        flags &= ~RUBY_DBM_RW_BIT;
        dbm = dbm_open(RSTRING(file)->ptr, flags, mode);
    }
    else {
        dbm = 0;
        if (mode >= 0) {
            dbm = dbm_open(RSTRING(file)->ptr, O_RDWR|O_CREAT, mode);
        }
        if (!dbm) {
            dbm = dbm_open(RSTRING(file)->ptr, O_RDWR, 0);
        }
        if (!dbm) {
            dbm = dbm_open(RSTRING(file)->ptr, O_RDONLY, 0);
        }
    }

    if (!dbm) {
        if (mode == -1) return Qnil;
        rb_sys_fail(RSTRING(file)->ptr);
    }

    dbmp = ALLOC(struct dbmdata);
    DATA_PTR(obj) = dbmp;
    dbmp->di_dbm = dbm;
    dbmp->di_size = -1;

    return obj;
}

static VALUE
fdbm_s_open(argc, argv, klass)
    int argc;
    VALUE *argv;
    VALUE klass;
{
    VALUE obj = Data_Wrap_Struct(klass, 0, free_dbm, 0);

    if (NIL_P(fdbm_initialize(argc, argv, obj))) {
        return Qnil;
    }

    if (rb_block_given_p()) {
        return rb_ensure(rb_yield, obj, fdbm_close, obj);
    }

    return obj;
}

static VALUE
fdbm_fetch(obj, keystr, ifnone)
    VALUE obj, keystr, ifnone;
{
    datum key, value;
    struct dbmdata *dbmp;
    DBM *dbm;

    StringValue(keystr);
    key.dptr = RSTRING(keystr)->ptr;
    key.dsize = RSTRING(keystr)->len;

    GetDBM2(obj, dbmp, dbm);
    value = dbm_fetch(dbm, key);
    if (value.dptr == 0) {
        if (ifnone == Qnil && rb_block_given_p())
            return rb_yield(rb_tainted_str_new(key.dptr, key.dsize));
        return ifnone;
    }
    return rb_tainted_str_new(value.dptr, value.dsize);
}

static VALUE
fdbm_aref(obj, keystr)
    VALUE obj, keystr;
{
    return fdbm_fetch(obj, keystr, Qnil);
}

static VALUE
fdbm_fetch_m(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    VALUE keystr, valstr, ifnone;

    rb_scan_args(argc, argv, "11", &keystr, &ifnone);
    valstr = fdbm_fetch(obj, keystr, ifnone);
    if (argc == 1 && !rb_block_given_p() && NIL_P(valstr))
        rb_raise(rb_eIndexError, "key not found");

    return valstr;
}

static VALUE
fdbm_index(obj, valstr)
    VALUE obj, valstr;
{
    datum key, val;
    struct dbmdata *dbmp;
    DBM *dbm;

    StringValue(valstr);
    val.dptr = RSTRING(valstr)->ptr;
    val.dsize = RSTRING(valstr)->len;

    GetDBM2(obj, dbmp, dbm);
    for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
        val = dbm_fetch(dbm, key);
        if (val.dsize == RSTRING(valstr)->len &&
            memcmp(val.dptr, RSTRING(valstr)->ptr, val.dsize) == 0) {
            return rb_tainted_str_new(key.dptr, key.dsize);
        }
    }
    return Qnil;
}

static VALUE
fdbm_select(obj)
    VALUE obj;
{
    VALUE new = rb_ary_new();
    datum key, val;
    DBM *dbm;
    struct dbmdata *dbmp;

    GetDBM2(obj, dbmp, dbm);
    for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
        VALUE assoc, v;
        val = dbm_fetch(dbm, key);
        assoc = rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize),
                             rb_tainted_str_new(val.dptr, val.dsize));
        v = rb_yield(assoc);
        if (RTEST(v)) {
            rb_ary_push(new, assoc);
        }
        GetDBM2(obj, dbmp, dbm);
    }

    return new;
}

static VALUE
fdbm_values_at(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    VALUE new = rb_ary_new2(argc);
    int i;

    for (i=0; i<argc; i++) {
        rb_ary_push(new, fdbm_fetch(obj, argv[i], Qnil));
    }

    return new;
}

static void
fdbm_modify(obj)
    VALUE obj;
{
    rb_secure(4);
    if (OBJ_FROZEN(obj)) rb_error_frozen("DBM");
}

static VALUE
fdbm_delete(obj, keystr)
    VALUE obj, keystr;
{
    datum key, value;
    struct dbmdata *dbmp;
    DBM *dbm;
    VALUE valstr;

    fdbm_modify(obj);
    StringValue(keystr);
    key.dptr = RSTRING(keystr)->ptr;
    key.dsize = RSTRING(keystr)->len;

    GetDBM2(obj, dbmp, dbm);

    value = dbm_fetch(dbm, key);
    if (value.dptr == 0) {
        if (rb_block_given_p()) return rb_yield(keystr);
        return Qnil;
    }

    /* need to save value before dbm_delete() */
    valstr = rb_tainted_str_new(value.dptr, value.dsize);

    if (dbm_delete(dbm, key)) {
        dbmp->di_size = -1;
        rb_raise(rb_eDBMError, "dbm_delete failed");
    }
    else if (dbmp->di_size >= 0) {
        dbmp->di_size--;
    }
    return valstr;
}

static VALUE
fdbm_shift(obj)
    VALUE obj;
{
    datum key, val;
    struct dbmdata *dbmp;
    DBM *dbm;
    VALUE keystr, valstr;

    fdbm_modify(obj);
    GetDBM2(obj, dbmp, dbm);
    dbmp->di_size = -1;

    key = dbm_firstkey(dbm);
    if (!key.dptr) return Qnil;
    val = dbm_fetch(dbm, key);
    keystr = rb_tainted_str_new(key.dptr, key.dsize);
    valstr = rb_tainted_str_new(val.dptr, val.dsize);
    dbm_delete(dbm, key);

    return rb_assoc_new(keystr, valstr);
}

static VALUE
fdbm_delete_if(obj)
    VALUE obj;
{
    datum key, val;
    struct dbmdata *dbmp;
    DBM *dbm;
    VALUE keystr, valstr;
    VALUE ret, ary = rb_ary_new();
    int i, status = 0, n;

    fdbm_modify(obj);
    GetDBM2(obj, dbmp, dbm);
    n = dbmp->di_size;
    dbmp->di_size = -1;

    for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
        val = dbm_fetch(dbm, key);
        keystr = rb_tainted_str_new(key.dptr, key.dsize);
        valstr = rb_tainted_str_new(val.dptr, val.dsize);
        ret = rb_protect(rb_yield, rb_assoc_new(rb_str_dup(keystr), valstr), &status);
        if (status != 0) break;
        if (RTEST(ret)) rb_ary_push(ary, keystr);
        GetDBM2(obj, dbmp, dbm);
    }

    for (i = 0; i < RARRAY(ary)->len; i++) {
        keystr = RARRAY(ary)->ptr[i];
        StringValue(keystr);
        key.dptr = RSTRING(keystr)->ptr;
        key.dsize = RSTRING(keystr)->len;
        if (dbm_delete(dbm, key)) {
            rb_raise(rb_eDBMError, "dbm_delete failed");
        }
    }
    if (status) rb_jump_tag(status);
    if (n > 0) dbmp->di_size = n - RARRAY(ary)->len;

    return obj;
}

static VALUE
fdbm_clear(obj)
    VALUE obj;
{
    datum key;
    struct dbmdata *dbmp;
    DBM *dbm;

    fdbm_modify(obj);
    GetDBM2(obj, dbmp, dbm);
    dbmp->di_size = -1;
    while (key = dbm_firstkey(dbm), key.dptr) {
        if (dbm_delete(dbm, key)) {
            rb_raise(rb_eDBMError, "dbm_delete failed");
        }
    }
    dbmp->di_size = 0;

    return obj;
}

static VALUE
fdbm_invert(obj)
    VALUE obj;
{
    datum key, val;
    struct dbmdata *dbmp;
    DBM *dbm;
    VALUE keystr, valstr;
    VALUE hash = rb_hash_new();

    GetDBM2(obj, dbmp, dbm);
    for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
        val = dbm_fetch(dbm, key);
        keystr = rb_tainted_str_new(key.dptr, key.dsize);
        valstr = rb_tainted_str_new(val.dptr, val.dsize);
        rb_hash_aset(hash, valstr, keystr);
    }
    return hash;
}

static VALUE each_pair _((VALUE));

static VALUE
each_pair(obj)
    VALUE obj;
{
    return rb_funcall(obj, rb_intern("each_pair"), 0, 0);
}

static VALUE fdbm_store _((VALUE,VALUE,VALUE));

static VALUE
update_i(pair, dbm)
    VALUE pair, dbm;
{
    Check_Type(pair, T_ARRAY);
    if (RARRAY(pair)->len < 2) {
        rb_raise(rb_eArgError, "pair must be [key, value]");
    }
    fdbm_store(dbm, RARRAY(pair)->ptr[0], RARRAY(pair)->ptr[1]);
    return Qnil;
}

static VALUE
fdbm_update(obj, other)
    VALUE obj, other;
{
    rb_iterate(each_pair, other, update_i, obj);
    return obj;
}

static VALUE
fdbm_replace(obj, other)
    VALUE obj, other;
{
    fdbm_clear(obj);
    rb_iterate(each_pair, other, update_i, obj);
    return obj;
}

static VALUE
fdbm_store(obj, keystr, valstr)
    VALUE obj, keystr, valstr;
{
    datum key, val;
    struct dbmdata *dbmp;
    DBM *dbm;

    fdbm_modify(obj);
    keystr = rb_obj_as_string(keystr);
    valstr = rb_obj_as_string(valstr);

    key.dptr = RSTRING(keystr)->ptr;
    key.dsize = RSTRING(keystr)->len;

    val.dptr = RSTRING(valstr)->ptr;
    val.dsize = RSTRING(valstr)->len;

    GetDBM2(obj, dbmp, dbm);
    dbmp->di_size = -1;
    if (dbm_store(dbm, key, val, DBM_REPLACE)) {
#ifdef HAVE_DBM_CLEARERR
        dbm_clearerr(dbm);
#endif
        if (errno == EPERM) rb_sys_fail(0);
        rb_raise(rb_eDBMError, "dbm_store failed");
    }

    return valstr;
}

static VALUE
fdbm_length(obj)
    VALUE obj;
{
    datum key;
    struct dbmdata *dbmp;
    DBM *dbm;
    int i = 0;

    GetDBM2(obj, dbmp, dbm);
    if (dbmp->di_size > 0) return INT2FIX(dbmp->di_size);

    for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
        i++;
    }
    dbmp->di_size = i;

    return INT2FIX(i);
}

static VALUE
fdbm_empty_p(obj)
    VALUE obj;
{
    datum key;
    struct dbmdata *dbmp;
    DBM *dbm;
    int i = 0;

    GetDBM2(obj, dbmp, dbm);
    if (dbmp->di_size < 0) {
        dbm = dbmp->di_dbm;

        for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
            i++;
        }
    }
    else {
        i = dbmp->di_size;
    }
    if (i == 0) return Qtrue;
    return Qfalse;
}

static VALUE
fdbm_each_value(obj)
    VALUE obj;
{
    datum key, val;
    struct dbmdata *dbmp;
    DBM *dbm;

    GetDBM2(obj, dbmp, dbm);
    for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
        val = dbm_fetch(dbm, key);
        rb_yield(rb_tainted_str_new(val.dptr, val.dsize));
        GetDBM2(obj, dbmp, dbm);
    }
    return obj;
}

static VALUE
fdbm_each_key(obj)
    VALUE obj;
{
    datum key;
    struct dbmdata *dbmp;
    DBM *dbm;

    GetDBM2(obj, dbmp, dbm);
    for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
        rb_yield(rb_tainted_str_new(key.dptr, key.dsize));
        GetDBM2(obj, dbmp, dbm);
    }
    return obj;
}

static VALUE
fdbm_each_pair(obj)
    VALUE obj;
{
    datum key, val;
    DBM *dbm;
    struct dbmdata *dbmp;
    VALUE keystr, valstr;

    GetDBM2(obj, dbmp, dbm);

    for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
        val = dbm_fetch(dbm, key);
        keystr = rb_tainted_str_new(key.dptr, key.dsize);
        valstr = rb_tainted_str_new(val.dptr, val.dsize);
        rb_yield(rb_assoc_new(keystr, valstr));
        GetDBM2(obj, dbmp, dbm);
    }

    return obj;
}

static VALUE
fdbm_keys(obj)
    VALUE obj;
{
    datum key;
    struct dbmdata *dbmp;
    DBM *dbm;
    VALUE ary;

    GetDBM2(obj, dbmp, dbm);

    ary = rb_ary_new();
    for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
        rb_ary_push(ary, rb_tainted_str_new(key.dptr, key.dsize));
    }

    return ary;
}

static VALUE
fdbm_values(obj)
    VALUE obj;
{
    datum key, val;
    struct dbmdata *dbmp;
    DBM *dbm;
    VALUE ary;

    GetDBM2(obj, dbmp, dbm);
    ary = rb_ary_new();
    for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
        val = dbm_fetch(dbm, key);
        rb_ary_push(ary, rb_tainted_str_new(val.dptr, val.dsize));
    }

    return ary;
}

static VALUE
fdbm_has_key(obj, keystr)
    VALUE obj, keystr;
{
    datum key, val;
    struct dbmdata *dbmp;
    DBM *dbm;

    StringValue(keystr);
    key.dptr = RSTRING(keystr)->ptr;
    key.dsize = RSTRING(keystr)->len;

    GetDBM2(obj, dbmp, dbm);
    val = dbm_fetch(dbm, key);
    if (val.dptr) return Qtrue;
    return Qfalse;
}

static VALUE
fdbm_has_value(obj, valstr)
    VALUE obj, valstr;
{
    datum key, val;
    struct dbmdata *dbmp;
    DBM *dbm;

    StringValue(valstr);
    val.dptr = RSTRING(valstr)->ptr;
    val.dsize = RSTRING(valstr)->len;

    GetDBM2(obj, dbmp, dbm);
    for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
        val = dbm_fetch(dbm, key);
        if (val.dsize == RSTRING(valstr)->len &&
            memcmp(val.dptr, RSTRING(valstr)->ptr, val.dsize) == 0)
            return Qtrue;
    }
    return Qfalse;
}

static VALUE
fdbm_to_a(obj)
    VALUE obj;
{
    datum key, val;
    struct dbmdata *dbmp;
    DBM *dbm;
    VALUE ary;

    GetDBM2(obj, dbmp, dbm);
    ary = rb_ary_new();
    for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
        val = dbm_fetch(dbm, key);
        rb_ary_push(ary, rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize),
                                      rb_tainted_str_new(val.dptr, val.dsize)));
    }

    return ary;
}

static VALUE
fdbm_to_hash(obj)
    VALUE obj;
{
    datum key, val;
    struct dbmdata *dbmp;
    DBM *dbm;
    VALUE hash;

    GetDBM2(obj, dbmp, dbm);
    hash = rb_hash_new();
    for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) {
        val = dbm_fetch(dbm, key);
        rb_hash_aset(hash, rb_tainted_str_new(key.dptr, key.dsize),
                           rb_tainted_str_new(val.dptr, val.dsize));
    }

    return hash;
}

static VALUE
fdbm_reject(obj)
    VALUE obj;
{
    return rb_hash_delete_if(fdbm_to_hash(obj));
}

void
Init_dbm()
{
    rb_cDBM = rb_define_class("DBM", rb_cObject);
    rb_eDBMError = rb_define_class("DBMError", rb_eStandardError);
    rb_include_module(rb_cDBM, rb_mEnumerable);

    rb_define_alloc_func(rb_cDBM, fdbm_alloc);
    rb_define_singleton_method(rb_cDBM, "open", fdbm_s_open, -1);

    rb_define_method(rb_cDBM, "initialize", fdbm_initialize, -1);
    rb_define_method(rb_cDBM, "close", fdbm_close, 0);
    rb_define_method(rb_cDBM, "closed?", fdbm_closed, 0);
    rb_define_method(rb_cDBM, "[]", fdbm_aref, 1);
    rb_define_method(rb_cDBM, "fetch", fdbm_fetch_m, -1);
    rb_define_method(rb_cDBM, "[]=", fdbm_store, 2);
    rb_define_method(rb_cDBM, "store", fdbm_store, 2);
    rb_define_method(rb_cDBM, "index",  fdbm_index, 1);
    rb_define_method(rb_cDBM, "select",  fdbm_select, 0);
    rb_define_method(rb_cDBM, "values_at", fdbm_values_at, -1);
    rb_define_method(rb_cDBM, "length", fdbm_length, 0);
    rb_define_method(rb_cDBM, "size", fdbm_length, 0);
    rb_define_method(rb_cDBM, "empty?", fdbm_empty_p, 0);
    rb_define_method(rb_cDBM, "each", fdbm_each_pair, 0);
    rb_define_method(rb_cDBM, "each_value", fdbm_each_value, 0);
    rb_define_method(rb_cDBM, "each_key", fdbm_each_key, 0);
    rb_define_method(rb_cDBM, "each_pair", fdbm_each_pair, 0);
    rb_define_method(rb_cDBM, "keys", fdbm_keys, 0);
    rb_define_method(rb_cDBM, "values", fdbm_values, 0);
    rb_define_method(rb_cDBM, "shift", fdbm_shift, 0);
    rb_define_method(rb_cDBM, "delete", fdbm_delete, 1);
    rb_define_method(rb_cDBM, "delete_if", fdbm_delete_if, 0);
    rb_define_method(rb_cDBM, "reject!", fdbm_delete_if, 0);
    rb_define_method(rb_cDBM, "reject", fdbm_reject, 0);
    rb_define_method(rb_cDBM, "clear", fdbm_clear, 0);
    rb_define_method(rb_cDBM,"invert", fdbm_invert, 0);
    rb_define_method(rb_cDBM,"update", fdbm_update, 1);
    rb_define_method(rb_cDBM,"replace", fdbm_replace, 1);

    rb_define_method(rb_cDBM, "include?", fdbm_has_key, 1);
    rb_define_method(rb_cDBM, "has_key?", fdbm_has_key, 1);
    rb_define_method(rb_cDBM, "member?", fdbm_has_key, 1);
    rb_define_method(rb_cDBM, "has_value?", fdbm_has_value, 1);
    rb_define_method(rb_cDBM, "key?", fdbm_has_key, 1);
    rb_define_method(rb_cDBM, "value?", fdbm_has_value, 1);

    rb_define_method(rb_cDBM, "to_a", fdbm_to_a, 0);
    rb_define_method(rb_cDBM, "to_hash", fdbm_to_hash, 0);

    /* flags for dbm_open() */
    rb_define_const(rb_cDBM, "READER",  INT2FIX(O_RDONLY|RUBY_DBM_RW_BIT));
    rb_define_const(rb_cDBM, "WRITER",  INT2FIX(O_RDWR|RUBY_DBM_RW_BIT));
    rb_define_const(rb_cDBM, "WRCREAT", INT2FIX(O_RDWR|O_CREAT|RUBY_DBM_RW_BIT));
    rb_define_const(rb_cDBM, "NEWDB",   INT2FIX(O_RDWR|O_CREAT|O_TRUNC|RUBY_DBM_RW_BIT));

#ifdef DB_VERSION_STRING
    rb_define_const(rb_cDBM, "VERSION",  rb_str_new2(DB_VERSION_STRING));
#else
    rb_define_const(rb_cDBM, "VERSION",  rb_str_new2("unknown"));
#endif
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/digest/defs.h

root/ext/digest/defs.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/* -*- C -*-
 * $Id: defs.h,v 1.8 2004/01/19 12:28:14 nobu Exp $
 */

#ifndef DEFS_H
#define DEFS_H

#include "ruby.h"
#include <sys/types.h>

#if defined(HAVE_SYS_CDEFS_H)
# include <sys/cdefs.h>
#endif
#if !defined(__BEGIN_DECLS)
# define __BEGIN_DECLS
# define __END_DECLS
#endif

#if defined(HAVE_INTTYPES_H)
# include <inttypes.h>
#elif !defined __CYGWIN__ || !defined __uint8_t_defined
  typedef unsigned char uint8_t;
  typedef unsigned int  uint32_t;
# if SIZEOF_LONG == 8
  typedef unsigned long uint64_t;
# elif SIZEOF_LONG_LONG == 8
  typedef unsigned LONG_LONG uint64_t;
# else
#  define NO_UINT64_T
# endif
#endif

#endif /* DEFS_H */
/* [<][>][^][v][top][bottom][index] [help] */


ext/digest/digest.c

root/ext/digest/digest.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. get_digest_base_metadata
  2. rb_digest_base_alloc
  3. rb_digest_base_s_digest
  4. rb_digest_base_s_hexdigest
  5. rb_digest_base_copy
  6. rb_digest_base_update
  7. rb_digest_base_init
  8. rb_digest_base_digest
  9. rb_digest_base_hexdigest
  10. rb_digest_base_equal
  11. Init_digest
/************************************************

  digest.c -

  $Author: akr $
  created at: Fri May 25 08:57:27 JST 2001

  Copyright (C) 1995-2001 Yukihiro Matsumoto
  Copyright (C) 2001 Akinori MUSHA

  $RoughId: digest.c,v 1.16 2001/07/13 15:38:27 knu Exp $
  $Id: digest.c,v 1.17 2005/12/12 05:15:33 akr Exp $

************************************************/

/*
 * This module provides an interface to the following hash algorithms:
 *
 *   - the MD5 Message-Digest Algorithm by the RSA Data Security,
 *     Inc., described in RFC 1321
 *
 *   - the SHA-1 Secure Hash Algorithm by NIST (the US' National
 *     Institute of Standards and Technology), described in FIPS PUB
 *     180-1.
 *
 *   - the SHA-256/384/512 Secure Hash Algorithm by NIST (the US'
 *     National Institute of Standards and Technology), described in
 *     FIPS PUB 180-2.
 *
 *   - the RIPEMD-160 cryptographic hash function, designed by Hans
 *     Dobbertin, Antoon Bosselaers, and Bart Preneel.
 */

#include "digest.h"

static VALUE mDigest, cDigest_Base;
static ID id_metadata;

/*
 * Digest::Base
 */

static algo_t *
get_digest_base_metadata(VALUE klass)
{
    VALUE obj;
    algo_t *algo;

    if (rb_cvar_defined(klass, id_metadata) == Qfalse) {
        rb_notimplement();
    }

    obj = rb_cvar_get(klass, id_metadata);

    Data_Get_Struct(obj, algo_t, algo);

    return algo;
}

static VALUE
rb_digest_base_alloc(VALUE klass)
{
    algo_t *algo;
    VALUE obj;
    void *pctx;

    if (klass == cDigest_Base) {
        rb_raise(rb_eNotImpError, "Digest::Base is an abstract class");
    }

    algo = get_digest_base_metadata(klass);

    /* XXX: An uninitialized buffer leads ALGO_Equal() to fail */
    pctx = xcalloc(algo->ctx_size, 1);
    algo->init_func(pctx);

    obj = Data_Wrap_Struct(klass, 0, free, pctx);

    return obj;
}

static VALUE
rb_digest_base_s_digest(VALUE klass, VALUE str)
{
    algo_t *algo;
    void *pctx;
    volatile VALUE obj = rb_digest_base_alloc(klass);

    algo = get_digest_base_metadata(klass);
    Data_Get_Struct(obj, void, pctx);

    StringValue(str);
    algo->update_func(pctx, RSTRING(str)->ptr, RSTRING(str)->len);

    str = rb_str_new(0, algo->digest_len);
    algo->final_func(RSTRING(str)->ptr, pctx);

    return str;
}

static VALUE
rb_digest_base_s_hexdigest(VALUE klass, VALUE str)
{
    algo_t *algo;
    void *pctx;
    volatile VALUE obj = rb_digest_base_alloc(klass);

    algo = get_digest_base_metadata(klass);
    Data_Get_Struct(obj, void, pctx);

    StringValue(str);
    algo->update_func(pctx, RSTRING(str)->ptr, RSTRING(str)->len);

    str = rb_str_new(0, algo->digest_len * 2);
    algo->end_func(pctx, RSTRING(str)->ptr);

    return str;
}

static VALUE
rb_digest_base_copy(VALUE copy, VALUE obj)
{
    algo_t *algo;
    void *pctx1, *pctx2;

    if (copy == obj) return copy;
    rb_check_frozen(copy);
    algo = get_digest_base_metadata(rb_obj_class(copy));
    if (algo != get_digest_base_metadata(rb_obj_class(obj))) {
        rb_raise(rb_eTypeError, "wrong argument class");
    }
    Data_Get_Struct(obj, void, pctx1);
    Data_Get_Struct(copy, void, pctx2);
    memcpy(pctx2, pctx1, algo->ctx_size);

    return copy;
}

static VALUE
rb_digest_base_update(VALUE self, VALUE str)
{
    algo_t *algo;
    void *pctx;

    StringValue(str);
    algo = get_digest_base_metadata(rb_obj_class(self));
    Data_Get_Struct(self, void, pctx);

    algo->update_func(pctx, RSTRING(str)->ptr, RSTRING(str)->len);

    return self;
}

static VALUE
rb_digest_base_init(int argc, VALUE *argv, VALUE self)
{
    VALUE arg;

    rb_scan_args(argc, argv, "01", &arg);

    if (!NIL_P(arg)) rb_digest_base_update(self, arg);

    return self;
}

static VALUE
rb_digest_base_digest(VALUE self)
{
    algo_t *algo;
    void *pctx1, *pctx2;
    size_t len;
    VALUE str;

    algo = get_digest_base_metadata(rb_obj_class(self));
    Data_Get_Struct(self, void, pctx1);

    str = rb_str_new(0, algo->digest_len);

    len = algo->ctx_size;
    pctx2 = xmalloc(len);
    memcpy(pctx2, pctx1, len);

    algo->final_func(RSTRING(str)->ptr, pctx2);
    free(pctx2);

    return str;
}

static VALUE
rb_digest_base_hexdigest(VALUE self)
{
    algo_t *algo;
    void *pctx1, *pctx2;
    size_t len;
    VALUE str;

    algo = get_digest_base_metadata(rb_obj_class(self));
    Data_Get_Struct(self, void, pctx1);

    str = rb_str_new(0, algo->digest_len * 2);

    len = algo->ctx_size;
    pctx2 = xmalloc(len);
    memcpy(pctx2, pctx1, len);

    algo->end_func(pctx2, RSTRING(str)->ptr);
    free(pctx2);

    return str;
}

static VALUE
rb_digest_base_equal(VALUE self, VALUE other)
{
    algo_t *algo;
    VALUE klass;
    VALUE str1, str2;

    klass = rb_obj_class(self);
    algo = get_digest_base_metadata(klass);

    if (rb_obj_class(other) == klass) {
        void *pctx1, *pctx2;

        Data_Get_Struct(self, void, pctx1);
        Data_Get_Struct(other, void, pctx2);

        return algo->equal_func(pctx1, pctx2) ? Qtrue : Qfalse;
    }

    StringValue(other);
    str2 = other;

    if (RSTRING(str2)->len == algo->digest_len)
        str1 = rb_digest_base_digest(self);
    else
        str1 = rb_digest_base_hexdigest(self);

    if (RSTRING(str1)->len == RSTRING(str2)->len
        && rb_str_cmp(str1, str2) == 0)
        return Qtrue;

    return Qfalse;
}

/*
 * Init
 */

void
Init_digest()
{
    mDigest = rb_define_module("Digest");

    cDigest_Base = rb_define_class_under(mDigest, "Base", rb_cObject);

    rb_define_alloc_func(cDigest_Base, rb_digest_base_alloc);
    rb_define_singleton_method(cDigest_Base, "digest", rb_digest_base_s_digest, 1);
    rb_define_singleton_method(cDigest_Base, "hexdigest", rb_digest_base_s_hexdigest, 1);

    rb_define_method(cDigest_Base, "initialize", rb_digest_base_init, -1);
    rb_define_method(cDigest_Base, "initialize_copy",  rb_digest_base_copy, 1);
    rb_define_method(cDigest_Base, "update", rb_digest_base_update, 1);
    rb_define_method(cDigest_Base, "<<", rb_digest_base_update, 1);
    rb_define_method(cDigest_Base, "digest", rb_digest_base_digest, 0);
    rb_define_method(cDigest_Base, "hexdigest", rb_digest_base_hexdigest, 0);
    rb_define_method(cDigest_Base, "to_s", rb_digest_base_hexdigest, 0);
    rb_define_method(cDigest_Base, "==", rb_digest_base_equal, 1);

    id_metadata = rb_intern("metadata");
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/digest/digest.h

root/ext/digest/digest.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

DEFINITIONS

This source file includes following definitions.
  1. algo_t
/************************************************

  digest.c -

  $Author: matz $
  created at: Fri May 25 08:54:56 JST 2001

  Copyright (C) 2001 Akinori MUSHA

  $RoughId: digest.h,v 1.3 2001/07/13 15:38:27 knu Exp $
  $Id: digest.h,v 1.2 2005/12/12 00:35:08 matz Exp $

************************************************/

#include "ruby.h"

typedef void (*hash_init_func_t)(void *);
typedef void (*hash_update_func_t)(void *, unsigned char *, size_t);
typedef void (*hash_end_func_t)(void *, unsigned char *);
typedef void (*hash_final_func_t)(unsigned char *, void *);
typedef int (*hash_equal_func_t)(void *, void *);

typedef struct {
    size_t digest_len;
    size_t ctx_size;
    hash_init_func_t init_func;
    hash_update_func_t update_func;
    hash_end_func_t end_func;
    hash_final_func_t final_func;
    hash_equal_func_t equal_func;
} algo_t;
/* [<][>][^][v] [top][bottom][index] [help] */


ext/digest/md5/md5.c

root/ext/digest/md5/md5.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. main
  2. main
  3. md5_process
  4. MD5_Init
  5. MD5_Update
  6. MD5_Final
  7. MD5_End
  8. MD5_Equal
/*
  Copyright (C) 1999, 2000 Aladdin Enterprises.  All rights reserved.

  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
  arising from the use of this software.

  Permission is granted to anyone to use this software for any purpose,
  including commercial applications, and to alter it and redistribute it
  freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not
     claim that you wrote the original software. If you use this software
     in a product, an acknowledgment in the product documentation would be
     appreciated but is not required.
  2. Altered source versions must be plainly marked as such, and must not be
     misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.

  L. Peter Deutsch
  ghost@aladdin.com

 */

/*
  Independent implementation of MD5 (RFC 1321).

  This code implements the MD5 Algorithm defined in RFC 1321.
  It is derived directly from the text of the RFC and not from the
  reference implementation.

  The original and principal author of md5.c is L. Peter Deutsch
  <ghost@aladdin.com>.  Other authors are noted in the change history
  that follows (in reverse chronological order):

  2000-07-03 lpd Patched to eliminate warnings about "constant is
                unsigned in ANSI C, signed in traditional";
                made test program self-checking.
  1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
  1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5).
  1999-05-03 lpd Original version.
 */

/*$OrigId: md5c.c,v 1.2 2001/03/26 08:57:14 matz Exp $ */
/*$RoughId: md5.c,v 1.2 2001/07/13 19:48:41 knu Exp $ */
/*$Id: md5.c,v 1.1 2001/07/13 20:06:14 knu Exp $ */

#include "md5.h"

#ifdef TEST
/*
 * Compile with -DTEST to create a self-contained executable test program.
 * The test program should print out the same values as given in section
 * A.5 of RFC 1321, reproduced below.
 */
#include <string.h>
main()
{
    static const char *const test[7*2] = {
        "", "d41d8cd98f00b204e9800998ecf8427e",
        "a", "0cc175b9c0f1b6a831c399e269772661",
        "abc", "900150983cd24fb0d6963f7d28e17f72",
        "message digest", "f96b697d7cb7938d525a2f31aaf161d0",
        "abcdefghijklmnopqrstuvwxyz", "c3fcd3d76192e4007dfb496cca67e13b",
        "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
                                "d174ab98d277d9f5a5611c2c9f419d9f",
        "12345678901234567890123456789012345678901234567890123456789012345678901234567890", "57edf4a22be3c955ac49da2e2107b67a"
    };
    int i;

    for (i = 0; i < 7*2; i += 2) {
        MD5_CTX state;
        uint8_t digest[16];
        char hex_output[16*2 + 1];
        int di;

        MD5_Init(&state);
        MD5_Update(&state, (const uint8_t *)test[i], strlen(test[i]));
        MD5_Final(digest, &state);
        printf("MD5 (\"%s\") = ", test[i]);
        for (di = 0; di < 16; ++di)
            sprintf(hex_output + di * 2, "%02x", digest[di]);
        puts(hex_output);
        if (strcmp(hex_output, test[i + 1]))
            printf("**** ERROR, should be: %s\n", test[i + 1]);
    }
    return 0;
}
#endif /* TEST */

/*
 * For reference, here is the program that computed the T values.
 */
#ifdef COMPUTE_T_VALUES
#include <math.h>
main()
{
    int i;
    for (i = 1; i <= 64; ++i) {
        unsigned long v = (unsigned long)(4294967296.0 * fabs(sin((double)i)));

        /*
         * The following nonsense is only to avoid compiler warnings about
         * "integer constant is unsigned in ANSI C, signed with -traditional".
         */
        if (v >> 31) {
            printf("#define T%d /* 0x%08lx */ (T_MASK ^ 0x%08lx)\n", i,
                   v, (unsigned long)(unsigned int)(~v));
        } else {
            printf("#define T%d    0x%08lx\n", i, v);
        }
    }
    return 0;
}
#endif /* COMPUTE_T_VALUES */
/*
 * End of T computation program.
 */
#ifdef T_MASK
#undef T_MASK
#endif
#define T_MASK ((uint32_t)~0)
#define T1 /* 0xd76aa478 */ (T_MASK ^ 0x28955b87)
#define T2 /* 0xe8c7b756 */ (T_MASK ^ 0x173848a9)
#define T3    0x242070db
#define T4 /* 0xc1bdceee */ (T_MASK ^ 0x3e423111)
#define T5 /* 0xf57c0faf */ (T_MASK ^ 0x0a83f050)
#define T6    0x4787c62a
#define T7 /* 0xa8304613 */ (T_MASK ^ 0x57cfb9ec)
#define T8 /* 0xfd469501 */ (T_MASK ^ 0x02b96afe)
#define T9    0x698098d8
#define T10 /* 0x8b44f7af */ (T_MASK ^ 0x74bb0850)
#define T11 /* 0xffff5bb1 */ (T_MASK ^ 0x0000a44e)
#define T12 /* 0x895cd7be */ (T_MASK ^ 0x76a32841)
#define T13    0x6b901122
#define T14 /* 0xfd987193 */ (T_MASK ^ 0x02678e6c)
#define T15 /* 0xa679438e */ (T_MASK ^ 0x5986bc71)
#define T16    0x49b40821
#define T17 /* 0xf61e2562 */ (T_MASK ^ 0x09e1da9d)
#define T18 /* 0xc040b340 */ (T_MASK ^ 0x3fbf4cbf)
#define T19    0x265e5a51
#define T20 /* 0xe9b6c7aa */ (T_MASK ^ 0x16493855)
#define T21 /* 0xd62f105d */ (T_MASK ^ 0x29d0efa2)
#define T22    0x02441453
#define T23 /* 0xd8a1e681 */ (T_MASK ^ 0x275e197e)
#define T24 /* 0xe7d3fbc8 */ (T_MASK ^ 0x182c0437)
#define T25    0x21e1cde6
#define T26 /* 0xc33707d6 */ (T_MASK ^ 0x3cc8f829)
#define T27 /* 0xf4d50d87 */ (T_MASK ^ 0x0b2af278)
#define T28    0x455a14ed
#define T29 /* 0xa9e3e905 */ (T_MASK ^ 0x561c16fa)
#define T30 /* 0xfcefa3f8 */ (T_MASK ^ 0x03105c07)
#define T31    0x676f02d9
#define T32 /* 0x8d2a4c8a */ (T_MASK ^ 0x72d5b375)
#define T33 /* 0xfffa3942 */ (T_MASK ^ 0x0005c6bd)
#define T34 /* 0x8771f681 */ (T_MASK ^ 0x788e097e)
#define T35    0x6d9d6122
#define T36 /* 0xfde5380c */ (T_MASK ^ 0x021ac7f3)
#define T37 /* 0xa4beea44 */ (T_MASK ^ 0x5b4115bb)
#define T38    0x4bdecfa9
#define T39 /* 0xf6bb4b60 */ (T_MASK ^ 0x0944b49f)
#define T40 /* 0xbebfbc70 */ (T_MASK ^ 0x4140438f)
#define T41    0x289b7ec6
#define T42 /* 0xeaa127fa */ (T_MASK ^ 0x155ed805)
#define T43 /* 0xd4ef3085 */ (T_MASK ^ 0x2b10cf7a)
#define T44    0x04881d05
#define T45 /* 0xd9d4d039 */ (T_MASK ^ 0x262b2fc6)
#define T46 /* 0xe6db99e5 */ (T_MASK ^ 0x1924661a)
#define T47    0x1fa27cf8
#define T48 /* 0xc4ac5665 */ (T_MASK ^ 0x3b53a99a)
#define T49 /* 0xf4292244 */ (T_MASK ^ 0x0bd6ddbb)
#define T50    0x432aff97
#define T51 /* 0xab9423a7 */ (T_MASK ^ 0x546bdc58)
#define T52 /* 0xfc93a039 */ (T_MASK ^ 0x036c5fc6)
#define T53    0x655b59c3
#define T54 /* 0x8f0ccc92 */ (T_MASK ^ 0x70f3336d)
#define T55 /* 0xffeff47d */ (T_MASK ^ 0x00100b82)
#define T56 /* 0x85845dd1 */ (T_MASK ^ 0x7a7ba22e)
#define T57    0x6fa87e4f
#define T58 /* 0xfe2ce6e0 */ (T_MASK ^ 0x01d3191f)
#define T59 /* 0xa3014314 */ (T_MASK ^ 0x5cfebceb)
#define T60    0x4e0811a1
#define T61 /* 0xf7537e82 */ (T_MASK ^ 0x08ac817d)
#define T62 /* 0xbd3af235 */ (T_MASK ^ 0x42c50dca)
#define T63    0x2ad7d2bb
#define T64 /* 0xeb86d391 */ (T_MASK ^ 0x14792c6e)

static void
md5_process(MD5_CTX *pms, const uint8_t *data /*[64]*/)
{
    uint32_t
        a = pms->state[0], b = pms->state[1],
        c = pms->state[2], d = pms->state[3];
    uint32_t t;

#ifdef WORDS_BIGENDIAN

    /*
     * On big-endian machines, we must arrange the bytes in the right
     * order.  (This also works on machines of unknown byte order.)
     */
    uint32_t X[16];
    const uint8_t *xp = data;
    int i;

    for (i = 0; i < 16; ++i, xp += 4)
        X[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24);

#else

    /*
     * On little-endian machines, we can process properly aligned data
     * without copying it.
     */
    uint32_t xbuf[16];
    const uint32_t *X;

    if (!((data - (const uint8_t *)0) & 3)) {
        /* data are properly aligned */
        X = (const uint32_t *)data;
    } else {
        /* not aligned */
        memcpy(xbuf, data, 64);
        X = xbuf;
    }
#endif

#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n))))

    /* Round 1. */
    /* Let [abcd k s i] denote the operation
       a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */
#define F(x, y, z) (((x) & (y)) | (~(x) & (z)))
#define SET(a, b, c, d, k, s, Ti)\
  t = a + F(b,c,d) + X[k] + Ti;\
  a = ROTATE_LEFT(t, s) + b
    /* Do the following 16 operations. */
    SET(a, b, c, d,  0,  7,  T1);
    SET(d, a, b, c,  1, 12,  T2);
    SET(c, d, a, b,  2, 17,  T3);
    SET(b, c, d, a,  3, 22,  T4);
    SET(a, b, c, d,  4,  7,  T5);
    SET(d, a, b, c,  5, 12,  T6);
    SET(c, d, a, b,  6, 17,  T7);
    SET(b, c, d, a,  7, 22,  T8);
    SET(a, b, c, d,  8,  7,  T9);
    SET(d, a, b, c,  9, 12, T10);
    SET(c, d, a, b, 10, 17, T11);
    SET(b, c, d, a, 11, 22, T12);
    SET(a, b, c, d, 12,  7, T13);
    SET(d, a, b, c, 13, 12, T14);
    SET(c, d, a, b, 14, 17, T15);
    SET(b, c, d, a, 15, 22, T16);
#undef SET

     /* Round 2. */
     /* Let [abcd k s i] denote the operation
          a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */
#define G(x, y, z) (((x) & (z)) | ((y) & ~(z)))
#define SET(a, b, c, d, k, s, Ti)\
  t = a + G(b,c,d) + X[k] + Ti;\
  a = ROTATE_LEFT(t, s) + b
     /* Do the following 16 operations. */
    SET(a, b, c, d,  1,  5, T17);
    SET(d, a, b, c,  6,  9, T18);
    SET(c, d, a, b, 11, 14, T19);
    SET(b, c, d, a,  0, 20, T20);
    SET(a, b, c, d,  5,  5, T21);
    SET(d, a, b, c, 10,  9, T22);
    SET(c, d, a, b, 15, 14, T23);
    SET(b, c, d, a,  4, 20, T24);
    SET(a, b, c, d,  9,  5, T25);
    SET(d, a, b, c, 14,  9, T26);
    SET(c, d, a, b,  3, 14, T27);
    SET(b, c, d, a,  8, 20, T28);
    SET(a, b, c, d, 13,  5, T29);
    SET(d, a, b, c,  2,  9, T30);
    SET(c, d, a, b,  7, 14, T31);
    SET(b, c, d, a, 12, 20, T32);
#undef SET

     /* Round 3. */
     /* Let [abcd k s t] denote the operation
          a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */
#define H(x, y, z) ((x) ^ (y) ^ (z))
#define SET(a, b, c, d, k, s, Ti)\
  t = a + H(b,c,d) + X[k] + Ti;\
  a = ROTATE_LEFT(t, s) + b
     /* Do the following 16 operations. */
    SET(a, b, c, d,  5,  4, T33);
    SET(d, a, b, c,  8, 11, T34);
    SET(c, d, a, b, 11, 16, T35);
    SET(b, c, d, a, 14, 23, T36);
    SET(a, b, c, d,  1,  4, T37);
    SET(d, a, b, c,  4, 11, T38);
    SET(c, d, a, b,  7, 16, T39);
    SET(b, c, d, a, 10, 23, T40);
    SET(a, b, c, d, 13,  4, T41);
    SET(d, a, b, c,  0, 11, T42);
    SET(c, d, a, b,  3, 16, T43);
    SET(b, c, d, a,  6, 23, T44);
    SET(a, b, c, d,  9,  4, T45);
    SET(d, a, b, c, 12, 11, T46);
    SET(c, d, a, b, 15, 16, T47);
    SET(b, c, d, a,  2, 23, T48);
#undef SET

     /* Round 4. */
     /* Let [abcd k s t] denote the operation
          a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */
#define I(x, y, z) ((y) ^ ((x) | ~(z)))
#define SET(a, b, c, d, k, s, Ti)\
  t = a + I(b,c,d) + X[k] + Ti;\
  a = ROTATE_LEFT(t, s) + b
     /* Do the following 16 operations. */
    SET(a, b, c, d,  0,  6, T49);
    SET(d, a, b, c,  7, 10, T50);
    SET(c, d, a, b, 14, 15, T51);
    SET(b, c, d, a,  5, 21, T52);
    SET(a, b, c, d, 12,  6, T53);
    SET(d, a, b, c,  3, 10, T54);
    SET(c, d, a, b, 10, 15, T55);
    SET(b, c, d, a,  1, 21, T56);
    SET(a, b, c, d,  8,  6, T57);
    SET(d, a, b, c, 15, 10, T58);
    SET(c, d, a, b,  6, 15, T59);
    SET(b, c, d, a, 13, 21, T60);
    SET(a, b, c, d,  4,  6, T61);
    SET(d, a, b, c, 11, 10, T62);
    SET(c, d, a, b,  2, 15, T63);
    SET(b, c, d, a,  9, 21, T64);
#undef SET

     /* Then perform the following additions. (That is increment each
        of the four registers by the value it had before this block
        was started.) */
    pms->state[0] += a;
    pms->state[1] += b;
    pms->state[2] += c;
    pms->state[3] += d;
}

void
MD5_Init(MD5_CTX *pms)
{
    pms->count[0] = pms->count[1] = 0;
    pms->state[0] = 0x67452301;
    pms->state[1] = /*0xefcdab89*/ T_MASK ^ 0x10325476;
    pms->state[2] = /*0x98badcfe*/ T_MASK ^ 0x67452301;
    pms->state[3] = 0x10325476;
}

void
MD5_Update(MD5_CTX *pms, const uint8_t *data, size_t nbytes)
{
    const uint8_t *p = data;
    size_t left = nbytes;
    size_t offset = (pms->count[0] >> 3) & 63;
    uint32_t nbits = (uint32_t)(nbytes << 3);

    if (nbytes <= 0)
        return;

    /* Update the message length. */
    pms->count[1] += nbytes >> 29;
    pms->count[0] += nbits;
    if (pms->count[0] < nbits)
        pms->count[1]++;

    /* Process an initial partial block. */
    if (offset) {
        size_t copy = (offset + nbytes > 64 ? 64 - offset : nbytes);

        memcpy(pms->buffer + offset, p, copy);
        if (offset + copy < 64)
            return;
        p += copy;
        left -= copy;
        md5_process(pms, pms->buffer);
    }

    /* Process full blocks. */
    for (; left >= 64; p += 64, left -= 64)
        md5_process(pms, p);

    /* Process a final partial block. */
    if (left)
        memcpy(pms->buffer, p, left);
}

void
MD5_Final(uint8_t *digest, MD5_CTX *pms)
{
    static const uint8_t pad[64] = {
        0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
    };
    uint8_t data[8];
    size_t i;

    /* Save the length before padding. */
    for (i = 0; i < 8; ++i)
        data[i] = (uint8_t)(pms->count[i >> 2] >> ((i & 3) << 3));
    /* Pad to 56 bytes mod 64. */
    MD5_Update(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1);
    /* Append the length. */
    MD5_Update(pms, data, 8);
    for (i = 0; i < 16; ++i)
        digest[i] = (uint8_t)(pms->state[i >> 2] >> ((i & 3) << 3));
}

void
MD5_End(MD5_CTX *pctx, uint8_t *hexdigest)
{
    unsigned char digest[16];
    size_t i;

    MD5_Final(digest, pctx);

    for (i = 0; i < 16; i++)
        sprintf(hexdigest + i * 2, "%02x", digest[i]);
}

int MD5_Equal(MD5_CTX* pctx1, MD5_CTX* pctx2) {
        return memcmp(pctx1->count, pctx2->count, sizeof(pctx1->count)) == 0
                && memcmp(pctx1->state, pctx2->state, sizeof(pctx1->state)) == 0
                && memcmp(pctx1->buffer, pctx2->buffer, sizeof(pctx1->buffer)) == 0;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/digest/md5/md5.h

root/ext/digest/md5/md5.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

DEFINITIONS

This source file includes following definitions.
  1. MD5_CTX
/*
  Copyright (C) 1999 Aladdin Enterprises.  All rights reserved.

  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
  arising from the use of this software.

  Permission is granted to anyone to use this software for any purpose,
  including commercial applications, and to alter it and redistribute it
  freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not
     claim that you wrote the original software. If you use this software
     in a product, an acknowledgment in the product documentation would be
     appreciated but is not required.
  2. Altered source versions must be plainly marked as such, and must not be
     misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.

  L. Peter Deutsch
  ghost@aladdin.com

 */
/*
  Independent implementation of MD5 (RFC 1321).

  This code implements the MD5 Algorithm defined in RFC 1321.
  It is derived directly from the text of the RFC and not from the
  reference implementation.

  The original and principal author of md5.h is L. Peter Deutsch
  <ghost@aladdin.com>.  Other authors are noted in the change history
  that follows (in reverse chronological order):

  1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
  1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5);
        added conditionalization for C++ compilation from Martin
        Purschke <purschke@bnl.gov>.
  1999-05-03 lpd Original version.
 */

/* $OrigId: md5.h,v 1.2 2001/03/26 08:57:14 matz Exp $ */
/* $RoughId: md5.h,v 1.3 2002/02/24 08:14:31 knu Exp $ */
/* $Id: md5.h,v 1.2 2002/02/24 08:20:22 knu Exp $ */

#ifndef MD5_INCLUDED
#  define MD5_INCLUDED

#include "defs.h"

/*
 * This code has some adaptations for the Ghostscript environment, but it
 * will compile and run correctly in any environment with 8-bit chars and
 * 32-bit ints.  Specifically, it assumes that if the following are
 * defined, they have the same meaning as in Ghostscript: P1, P2, P3.
 */

/* Define the state of the MD5 Algorithm. */
typedef struct md5_state_s {
    uint32_t count[2];  /* message length in bits, lsw first */
    uint32_t state[4];  /* digest buffer */
    uint8_t buffer[64]; /* accumulate block */
} MD5_CTX;

#ifdef RUBY
#define MD5_Init        rb_Digest_MD5_Init
#define MD5_Update      rb_Digest_MD5_Update
#define MD5_Final       rb_Digest_MD5_Final
#define MD5_End         rb_Digest_MD5_End
#define MD5_Equal       rb_Digest_MD5_Equal
#endif

void    MD5_Init _((MD5_CTX *pms));
void    MD5_Update _((MD5_CTX *pms, const uint8_t *data, size_t nbytes));
void    MD5_Final _((uint8_t *digest, MD5_CTX *pms));
void    MD5_End _((MD5_CTX *pctx, uint8_t *hexdigest));
int     MD5_Equal _((MD5_CTX *pctx1, MD5_CTX *pctx2));

#define MD5_BLOCK_LENGTH                64
#define MD5_DIGEST_LENGTH               16
#define MD5_DIGEST_STRING_LENGTH        (MD5_DIGEST_LENGTH * 2 + 1)

#endif /* MD5_INCLUDED */
/* [<][>][^][v] [top][bottom][index] [help] */


ext/digest/md5/md5init.c

root/ext/digest/md5/md5init.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. Init_md5
/* $RoughId: md5init.c,v 1.2 2001/07/13 19:49:10 knu Exp $ */
/* $Id: md5init.c,v 1.5 2002/09/26 16:27:23 knu Exp $ */

#include "digest.h"
#if defined(HAVE_OPENSSL_MD5_H)
#include "md5ossl.h"
#else
#include "md5.h"
#endif

static algo_t md5 = {
    MD5_DIGEST_LENGTH,
    sizeof(MD5_CTX),
    (hash_init_func_t)MD5_Init,
    (hash_update_func_t)MD5_Update,
    (hash_end_func_t)MD5_End,
    (hash_final_func_t)MD5_Final,
    (hash_equal_func_t)MD5_Equal,
};

void
Init_md5()
{
    VALUE mDigest, cDigest_Base, cDigest_MD5;

    rb_require("digest.so");

    mDigest = rb_path2class("Digest");
    cDigest_Base = rb_path2class("Digest::Base");

    cDigest_MD5 = rb_define_class_under(mDigest, "MD5", cDigest_Base);

    rb_cvar_set(cDigest_MD5, rb_intern("metadata"),
                Data_Wrap_Struct(rb_cObject, 0, 0, &md5), Qtrue);
}
/* [<][>][^][v] [top][bottom][index] [help] */


ext/digest/md5/md5ossl.c

root/ext/digest/md5/md5ossl.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. MD5_End
  2. MD5_Equal
/* $Id: md5ossl.c,v 1.2 2003/01/06 11:47:53 knu Exp $ */

#include "md5ossl.h"
#include <sys/types.h>
#include <stdio.h>
#include <string.h>

void
MD5_End(MD5_CTX *pctx, unsigned char *hexdigest)
{
    unsigned char digest[16];
    size_t i;

    MD5_Final(digest, pctx);

    for (i = 0; i < 16; i++)
        sprintf(hexdigest + i * 2, "%02x", digest[i]);
}

int
MD5_Equal(MD5_CTX* pctx1, MD5_CTX* pctx2) {
    return pctx1->num == pctx2->num
      && pctx1->A == pctx2->A
      && pctx1->B == pctx2->B
      && pctx1->C == pctx2->C
      && pctx1->D == pctx2->D
      && pctx1->Nl == pctx2->Nl
      && pctx1->Nh == pctx2->Nh
      && memcmp(pctx1->data, pctx2->data, sizeof(pctx1->data)) == 0;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/digest/md5/md5ossl.h

root/ext/digest/md5/md5ossl.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/* $Id: md5ossl.h,v 1.2 2005/08/30 10:43:14 gotoyuzo Exp $ */

#ifndef MD5OSSL_H_INCLUDED
#define MD5OSSL_H_INCLUDED

#include <stddef.h>
#include <openssl/md5.h>

void MD5_End(MD5_CTX *pctx, unsigned char *hexdigest);
int MD5_Equal(MD5_CTX *pctx1, MD5_CTX *pctx2);

#endif
/* [<][>][^][v][top][bottom][index] [help] */


ext/digest/rmd160/rmd160.c

root/ext/digest/rmd160/rmd160.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. RMD160_Init
  2. RMD160_Transform
  3. RMD160_Update
  4. RMD160_Final
  5. RMD160_Equal
/*      $NetBSD: rmd160.c,v 1.1.1.1 2001/03/06 11:21:05 agc Exp $       */
/*      $RoughId: rmd160.c,v 1.2 2001/07/13 19:49:10 knu Exp $  */
/*      $Id: rmd160.c,v 1.1 2001/07/13 20:06:14 knu Exp $       */

/********************************************************************\
 *
 *      FILE:     rmd160.c
 *
 *      CONTENTS: A sample C-implementation of the RIPEMD-160
 *                hash-function.
 *      TARGET:   any computer with an ANSI C compiler
 *
 *      AUTHOR:   Antoon Bosselaers, ESAT-COSIC
 *                (Arranged for libc by Todd C. Miller)
 *      DATE:     1 March 1996
 *      VERSION:  1.0
 *
 *      Copyright (c) Katholieke Universiteit Leuven
 *      1996, All Rights Reserved
 *
\********************************************************************/

#include "rmd160.h"

#ifndef lint
/* __RCSID("$NetBSD: rmd160.c,v 1.1.1.1 2001/03/06 11:21:05 agc Exp $"); */
#endif  /* not lint */

/* header files */

#ifdef HAVE_SYS_ENDIAN_H_
#include <sys/endian.h>
#endif

#ifdef HAVE_MACHINE_ENDIAN_H_
#include <machine/endian.h>
#endif

/* #include "namespace.h" */

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#ifndef _DIAGASSERT
#define _DIAGASSERT(cond)       assert(cond)
#endif

/********************************************************************/

/* macro definitions */

/* collect four bytes into one word: */
#define BYTES_TO_DWORD(strptr)                  \
    (((uint32_t) *((strptr)+3) << 24) | \
    ((uint32_t) *((strptr)+2) << 16) |          \
    ((uint32_t) *((strptr)+1) <<  8) |          \
    ((uint32_t) *(strptr)))

/* ROL(x, n) cyclically rotates x over n bits to the left */
/* x must be of an unsigned 32 bits type and 0 <= n < 32. */
#define ROL(x, n)       (((x) << (n)) | ((x) >> (32-(n))))

/* the three basic functions F(), G() and H() */
#define F(x, y, z)      ((x) ^ (y) ^ (z))
#define G(x, y, z)      (((x) & (y)) | (~(x) & (z)))
#define H(x, y, z)      (((x) | ~(y)) ^ (z))
#define I(x, y, z)      (((x) & (z)) | ((y) & ~(z)))
#define J(x, y, z)      ((x) ^ ((y) | ~(z)))

/* the eight basic operations FF() through III() */
#define FF(a, b, c, d, e, x, s) {                       \
      (a) += F((b), (c), (d)) + (x);                    \
      (a) = ROL((a), (s)) + (e);                        \
      (c) = ROL((c), 10);                               \
}
#define GG(a, b, c, d, e, x, s) {                       \
      (a) += G((b), (c), (d)) + (x) + 0x5a827999U;      \
      (a) = ROL((a), (s)) + (e);                        \
      (c) = ROL((c), 10);                               \
}
#define HH(a, b, c, d, e, x, s) {                       \
      (a) += H((b), (c), (d)) + (x) + 0x6ed9eba1U;      \
      (a) = ROL((a), (s)) + (e);                        \
      (c) = ROL((c), 10);                               \
}
#define II(a, b, c, d, e, x, s) {                       \
      (a) += I((b), (c), (d)) + (x) + 0x8f1bbcdcU;      \
      (a) = ROL((a), (s)) + (e);                        \
      (c) = ROL((c), 10);                               \
}
#define JJ(a, b, c, d, e, x, s) {                       \
      (a) += J((b), (c), (d)) + (x) + 0xa953fd4eU;      \
      (a) = ROL((a), (s)) + (e);                        \
      (c) = ROL((c), 10);                               \
}
#define FFF(a, b, c, d, e, x, s)        {               \
      (a) += F((b), (c), (d)) + (x);                    \
      (a) = ROL((a), (s)) + (e);                        \
      (c) = ROL((c), 10);                               \
}
#define GGG(a, b, c, d, e, x, s)        {               \
      (a) += G((b), (c), (d)) + (x) + 0x7a6d76e9U;      \
      (a) = ROL((a), (s)) + (e);                        \
      (c) = ROL((c), 10);                               \
}
#define HHH(a, b, c, d, e, x, s)        {               \
      (a) += H((b), (c), (d)) + (x) + 0x6d703ef3U;      \
      (a) = ROL((a), (s)) + (e);                        \
      (c) = ROL((c), 10);                               \
}
#define III(a, b, c, d, e, x, s)        {               \
      (a) += I((b), (c), (d)) + (x) + 0x5c4dd124U;      \
      (a) = ROL((a), (s)) + (e);                        \
      (c) = ROL((c), 10);                               \
}
#define JJJ(a, b, c, d, e, x, s)        {               \
      (a) += J((b), (c), (d)) + (x) + 0x50a28be6U;      \
      (a) = ROL((a), (s)) + (e);                        \
      (c) = ROL((c), 10);                               \
}

/********************************************************************/

void
RMD160_Init(RMD160_CTX *context)
{

        _DIAGASSERT(context != NULL);

        /* ripemd-160 initialization constants */
        context->state[0] = 0x67452301U;
        context->state[1] = 0xefcdab89U;
        context->state[2] = 0x98badcfeU;
        context->state[3] = 0x10325476U;
        context->state[4] = 0xc3d2e1f0U;
        context->length[0] = context->length[1] = 0;
        context->buflen = 0;
}

/********************************************************************/

void
RMD160_Transform(uint32_t state[5], const uint32_t block[16])
{
        uint32_t aa, bb, cc, dd, ee;
        uint32_t aaa, bbb, ccc, ddd, eee;

        _DIAGASSERT(state != NULL);
        _DIAGASSERT(block != NULL);

        aa = aaa = state[0];
        bb = bbb = state[1];
        cc = ccc = state[2];
        dd = ddd = state[3];
        ee = eee = state[4];

        /* round 1 */
        FF(aa, bb, cc, dd, ee, block[ 0], 11);
        FF(ee, aa, bb, cc, dd, block[ 1], 14);
        FF(dd, ee, aa, bb, cc, block[ 2], 15);
        FF(cc, dd, ee, aa, bb, block[ 3], 12);
        FF(bb, cc, dd, ee, aa, block[ 4],  5);
        FF(aa, bb, cc, dd, ee, block[ 5],  8);
        FF(ee, aa, bb, cc, dd, block[ 6],  7);
        FF(dd, ee, aa, bb, cc, block[ 7],  9);
        FF(cc, dd, ee, aa, bb, block[ 8], 11);
        FF(bb, cc, dd, ee, aa, block[ 9], 13);
        FF(aa, bb, cc, dd, ee, block[10], 14);
        FF(ee, aa, bb, cc, dd, block[11], 15);
        FF(dd, ee, aa, bb, cc, block[12],  6);
        FF(cc, dd, ee, aa, bb, block[13],  7);
        FF(bb, cc, dd, ee, aa, block[14],  9);
        FF(aa, bb, cc, dd, ee, block[15],  8);

        /* round 2 */
        GG(ee, aa, bb, cc, dd, block[ 7],  7);
        GG(dd, ee, aa, bb, cc, block[ 4],  6);
        GG(cc, dd, ee, aa, bb, block[13],  8);
        GG(bb, cc, dd, ee, aa, block[ 1], 13);
        GG(aa, bb, cc, dd, ee, block[10], 11);
        GG(ee, aa, bb, cc, dd, block[ 6],  9);
        GG(dd, ee, aa, bb, cc, block[15],  7);
        GG(cc, dd, ee, aa, bb, block[ 3], 15);
        GG(bb, cc, dd, ee, aa, block[12],  7);
        GG(aa, bb, cc, dd, ee, block[ 0], 12);
        GG(ee, aa, bb, cc, dd, block[ 9], 15);
        GG(dd, ee, aa, bb, cc, block[ 5],  9);
        GG(cc, dd, ee, aa, bb, block[ 2], 11);
        GG(bb, cc, dd, ee, aa, block[14],  7);
        GG(aa, bb, cc, dd, ee, block[11], 13);
        GG(ee, aa, bb, cc, dd, block[ 8], 12);

        /* round 3 */
        HH(dd, ee, aa, bb, cc, block[ 3], 11);
        HH(cc, dd, ee, aa, bb, block[10], 13);
        HH(bb, cc, dd, ee, aa, block[14],  6);
        HH(aa, bb, cc, dd, ee, block[ 4],  7);
        HH(ee, aa, bb, cc, dd, block[ 9], 14);
        HH(dd, ee, aa, bb, cc, block[15],  9);
        HH(cc, dd, ee, aa, bb, block[ 8], 13);
        HH(bb, cc, dd, ee, aa, block[ 1], 15);
        HH(aa, bb, cc, dd, ee, block[ 2], 14);
        HH(ee, aa, bb, cc, dd, block[ 7],  8);
        HH(dd, ee, aa, bb, cc, block[ 0], 13);
        HH(cc, dd, ee, aa, bb, block[ 6],  6);
        HH(bb, cc, dd, ee, aa, block[13],  5);
        HH(aa, bb, cc, dd, ee, block[11], 12);
        HH(ee, aa, bb, cc, dd, block[ 5],  7);
        HH(dd, ee, aa, bb, cc, block[12],  5);

        /* round 4 */
        II(cc, dd, ee, aa, bb, block[ 1], 11);
        II(bb, cc, dd, ee, aa, block[ 9], 12);
        II(aa, bb, cc, dd, ee, block[11], 14);
        II(ee, aa, bb, cc, dd, block[10], 15);
        II(dd, ee, aa, bb, cc, block[ 0], 14);
        II(cc, dd, ee, aa, bb, block[ 8], 15);
        II(bb, cc, dd, ee, aa, block[12],  9);
        II(aa, bb, cc, dd, ee, block[ 4],  8);
        II(ee, aa, bb, cc, dd, block[13],  9);
        II(dd, ee, aa, bb, cc, block[ 3], 14);
        II(cc, dd, ee, aa, bb, block[ 7],  5);
        II(bb, cc, dd, ee, aa, block[15],  6);
        II(aa, bb, cc, dd, ee, block[14],  8);
        II(ee, aa, bb, cc, dd, block[ 5],  6);
        II(dd, ee, aa, bb, cc, block[ 6],  5);
        II(cc, dd, ee, aa, bb, block[ 2], 12);

        /* round 5 */
        JJ(bb, cc, dd, ee, aa, block[ 4],  9);
        JJ(aa, bb, cc, dd, ee, block[ 0], 15);
        JJ(ee, aa, bb, cc, dd, block[ 5],  5);
        JJ(dd, ee, aa, bb, cc, block[ 9], 11);
        JJ(cc, dd, ee, aa, bb, block[ 7],  6);
        JJ(bb, cc, dd, ee, aa, block[12],  8);
        JJ(aa, bb, cc, dd, ee, block[ 2], 13);
        JJ(ee, aa, bb, cc, dd, block[10], 12);
        JJ(dd, ee, aa, bb, cc, block[14],  5);
        JJ(cc, dd, ee, aa, bb, block[ 1], 12);
        JJ(bb, cc, dd, ee, aa, block[ 3], 13);
        JJ(aa, bb, cc, dd, ee, block[ 8], 14);
        JJ(ee, aa, bb, cc, dd, block[11], 11);
        JJ(dd, ee, aa, bb, cc, block[ 6],  8);
        JJ(cc, dd, ee, aa, bb, block[15],  5);
        JJ(bb, cc, dd, ee, aa, block[13],  6);

        /* parallel round 1 */
        JJJ(aaa, bbb, ccc, ddd, eee, block[ 5],  8);
        JJJ(eee, aaa, bbb, ccc, ddd, block[14],  9);
        JJJ(ddd, eee, aaa, bbb, ccc, block[ 7],  9);
        JJJ(ccc, ddd, eee, aaa, bbb, block[ 0], 11);
        JJJ(bbb, ccc, ddd, eee, aaa, block[ 9], 13);
        JJJ(aaa, bbb, ccc, ddd, eee, block[ 2], 15);
        JJJ(eee, aaa, bbb, ccc, ddd, block[11], 15);
        JJJ(ddd, eee, aaa, bbb, ccc, block[ 4],  5);
        JJJ(ccc, ddd, eee, aaa, bbb, block[13],  7);
        JJJ(bbb, ccc, ddd, eee, aaa, block[ 6],  7);
        JJJ(aaa, bbb, ccc, ddd, eee, block[15],  8);
        JJJ(eee, aaa, bbb, ccc, ddd, block[ 8], 11);
        JJJ(ddd, eee, aaa, bbb, ccc, block[ 1], 14);
        JJJ(ccc, ddd, eee, aaa, bbb, block[10], 14);
        JJJ(bbb, ccc, ddd, eee, aaa, block[ 3], 12);
        JJJ(aaa, bbb, ccc, ddd, eee, block[12],  6);

        /* parallel round 2 */
        III(eee, aaa, bbb, ccc, ddd, block[ 6],  9);
        III(ddd, eee, aaa, bbb, ccc, block[11], 13);
        III(ccc, ddd, eee, aaa, bbb, block[ 3], 15);
        III(bbb, ccc, ddd, eee, aaa, block[ 7],  7);
        III(aaa, bbb, ccc, ddd, eee, block[ 0], 12);
        III(eee, aaa, bbb, ccc, ddd, block[13],  8);
        III(ddd, eee, aaa, bbb, ccc, block[ 5],  9);
        III(ccc, ddd, eee, aaa, bbb, block[10], 11);
        III(bbb, ccc, ddd, eee, aaa, block[14],  7);
        III(aaa, bbb, ccc, ddd, eee, block[15],  7);
        III(eee, aaa, bbb, ccc, ddd, block[ 8], 12);
        III(ddd, eee, aaa, bbb, ccc, block[12],  7);
        III(ccc, ddd, eee, aaa, bbb, block[ 4],  6);
        III(bbb, ccc, ddd, eee, aaa, block[ 9], 15);
        III(aaa, bbb, ccc, ddd, eee, block[ 1], 13);
        III(eee, aaa, bbb, ccc, ddd, block[ 2], 11);

        /* parallel round 3 */
        HHH(ddd, eee, aaa, bbb, ccc, block[15],  9);
        HHH(ccc, ddd, eee, aaa, bbb, block[ 5],  7);
        HHH(bbb, ccc, ddd, eee, aaa, block[ 1], 15);
        HHH(aaa, bbb, ccc, ddd, eee, block[ 3], 11);
        HHH(eee, aaa, bbb, ccc, ddd, block[ 7],  8);
        HHH(ddd, eee, aaa, bbb, ccc, block[14],  6);
        HHH(ccc, ddd, eee, aaa, bbb, block[ 6],  6);
        HHH(bbb, ccc, ddd, eee, aaa, block[ 9], 14);
        HHH(aaa, bbb, ccc, ddd, eee, block[11], 12);
        HHH(eee, aaa, bbb, ccc, ddd, block[ 8], 13);
        HHH(ddd, eee, aaa, bbb, ccc, block[12],  5);
        HHH(ccc, ddd, eee, aaa, bbb, block[ 2], 14);
        HHH(bbb, ccc, ddd, eee, aaa, block[10], 13);
        HHH(aaa, bbb, ccc, ddd, eee, block[ 0], 13);
        HHH(eee, aaa, bbb, ccc, ddd, block[ 4],  7);
        HHH(ddd, eee, aaa, bbb, ccc, block[13],  5);

        /* parallel round 4 */
        GGG(ccc, ddd, eee, aaa, bbb, block[ 8], 15);
        GGG(bbb, ccc, ddd, eee, aaa, block[ 6],  5);
        GGG(aaa, bbb, ccc, ddd, eee, block[ 4],  8);
        GGG(eee, aaa, bbb, ccc, ddd, block[ 1], 11);
        GGG(ddd, eee, aaa, bbb, ccc, block[ 3], 14);
        GGG(ccc, ddd, eee, aaa, bbb, block[11], 14);
        GGG(bbb, ccc, ddd, eee, aaa, block[15],  6);
        GGG(aaa, bbb, ccc, ddd, eee, block[ 0], 14);
        GGG(eee, aaa, bbb, ccc, ddd, block[ 5],  6);
        GGG(ddd, eee, aaa, bbb, ccc, block[12],  9);
        GGG(ccc, ddd, eee, aaa, bbb, block[ 2], 12);
        GGG(bbb, ccc, ddd, eee, aaa, block[13],  9);
        GGG(aaa, bbb, ccc, ddd, eee, block[ 9], 12);
        GGG(eee, aaa, bbb, ccc, ddd, block[ 7],  5);
        GGG(ddd, eee, aaa, bbb, ccc, block[10], 15);
        GGG(ccc, ddd, eee, aaa, bbb, block[14],  8);

        /* parallel round 5 */
        FFF(bbb, ccc, ddd, eee, aaa, block[12] ,  8);
        FFF(aaa, bbb, ccc, ddd, eee, block[15] ,  5);
        FFF(eee, aaa, bbb, ccc, ddd, block[10] , 12);
        FFF(ddd, eee, aaa, bbb, ccc, block[ 4] ,  9);
        FFF(ccc, ddd, eee, aaa, bbb, block[ 1] , 12);
        FFF(bbb, ccc, ddd, eee, aaa, block[ 5] ,  5);
        FFF(aaa, bbb, ccc, ddd, eee, block[ 8] , 14);
        FFF(eee, aaa, bbb, ccc, ddd, block[ 7] ,  6);
        FFF(ddd, eee, aaa, bbb, ccc, block[ 6] ,  8);
        FFF(ccc, ddd, eee, aaa, bbb, block[ 2] , 13);
        FFF(bbb, ccc, ddd, eee, aaa, block[13] ,  6);
        FFF(aaa, bbb, ccc, ddd, eee, block[14] ,  5);
        FFF(eee, aaa, bbb, ccc, ddd, block[ 0] , 15);
        FFF(ddd, eee, aaa, bbb, ccc, block[ 3] , 13);
        FFF(ccc, ddd, eee, aaa, bbb, block[ 9] , 11);
        FFF(bbb, ccc, ddd, eee, aaa, block[11] , 11);

        /* combine results */
        ddd += cc + state[1];           /* final result for state[0] */
        state[1] = state[2] + dd + eee;
        state[2] = state[3] + ee + aaa;
        state[3] = state[4] + aa + bbb;
        state[4] = state[0] + bb + ccc;
        state[0] = ddd;
}

/********************************************************************/

void
RMD160_Update(RMD160_CTX *context, const uint8_t *data, size_t nbytes)
{
        uint32_t X[16];
        uint32_t ofs = 0;
        uint32_t i;
#ifdef WORDS_BIGENDIAN
        uint32_t j;
#endif

        _DIAGASSERT(context != NULL);
        _DIAGASSERT(data != NULL);

        /* update length[] */
        if (context->length[0] + nbytes < context->length[0])
                context->length[1]++;           /* overflow to msb of length */
        context->length[0] += nbytes;

        (void)memset(X, 0, sizeof(X));

        if ( context->buflen + nbytes < 64 )
        {
                (void)memcpy(context->bbuffer + context->buflen, data, nbytes);
                context->buflen += nbytes;
        }
        else
        {
                /* process first block */
                ofs = 64 - context->buflen;
                (void)memcpy(context->bbuffer + context->buflen, data, ofs);
#ifndef WORDS_BIGENDIAN
                (void)memcpy(X, context->bbuffer, sizeof(X));
#else
                for (j=0; j < 16; j++)
                        X[j] = BYTES_TO_DWORD(context->bbuffer + (4 * j));
#endif
                RMD160_Transform(context->state, X);
                nbytes -= ofs;

                /* process remaining complete blocks */
                for (i = 0; i < (nbytes >> 6); i++) {
#ifndef WORDS_BIGENDIAN
                        (void)memcpy(X, data + (64 * i) + ofs, sizeof(X));
#else
                        for (j=0; j < 16; j++)
                                X[j] = BYTES_TO_DWORD(data + (64 * i) + (4 * j) + ofs);
#endif
                        RMD160_Transform(context->state, X);
                }

                /*
                 * Put last bytes from data into context's buffer
                 */
                context->buflen = nbytes & 63;
                memcpy(context->bbuffer, data + (64 * i) + ofs, context->buflen);
        }
}

/********************************************************************/

void
RMD160_Final(uint8_t digest[20], RMD160_CTX *context)
{
        uint32_t i;
        uint32_t X[16];
#ifdef WORDS_BIGENDIAN
        uint32_t j;
#endif

        _DIAGASSERT(digest != NULL);
        _DIAGASSERT(context != NULL);

        /* append the bit m_n == 1 */
        context->bbuffer[context->buflen] = (uint8_t)'\200';

        (void)memset(context->bbuffer + context->buflen + 1, 0,
                63 - context->buflen);
#ifndef WORDS_BIGENDIAN
        (void)memcpy(X, context->bbuffer, sizeof(X));
#else
        for (j=0; j < 16; j++)
                X[j] = BYTES_TO_DWORD(context->bbuffer + (4 * j));
#endif
        if ((context->buflen) > 55) {
                /* length goes to next block */
                RMD160_Transform(context->state, X);
                (void)memset(X, 0, sizeof(X));
        }

        /* append length in bits */
        X[14] = context->length[0] << 3;
        X[15] = (context->length[0] >> 29) |
            (context->length[1] << 3);
        RMD160_Transform(context->state, X);

        if (digest != NULL) {
                for (i = 0; i < 20; i += 4) {
                        /* extracts the 8 least significant bits. */
                        digest[i]     =  context->state[i>>2];
                        digest[i + 1] = (context->state[i>>2] >>  8);
                        digest[i + 2] = (context->state[i>>2] >> 16);
                        digest[i + 3] = (context->state[i>>2] >> 24);
                }
        }
}

int RMD160_Equal(RMD160_CTX* pctx1, RMD160_CTX* pctx2) {
        return pctx1->buflen == pctx2->buflen
                && memcmp(pctx1->length, pctx2->length, sizeof(pctx1->length)) == 0
                && memcmp(pctx1->state, pctx2->state, sizeof(pctx1->state)) == 0
                && memcmp(pctx1->bbuffer, pctx2->bbuffer, sizeof(pctx1->bbuffer)) == 0;
}

/************************ end of file rmd160.c **********************/
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/digest/rmd160/rmd160.h

root/ext/digest/rmd160/rmd160.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

DEFINITIONS

This source file includes following definitions.
  1. RMD160_CTX
/*      $NetBSD: rmd160.h,v 1.2 2000/07/07 10:47:06 ad Exp $    */
/*      $RoughId: rmd160.h,v 1.3 2002/02/24 08:14:31 knu Exp $  */
/*      $Id: rmd160.h,v 1.2 2002/02/24 08:20:22 knu Exp $       */

/********************************************************************\
 *
 *      FILE:     rmd160.h
 *
 *      CONTENTS: Header file for a sample C-implementation of the
 *                RIPEMD-160 hash-function.
 *      TARGET:   any computer with an ANSI C compiler
 *
 *      AUTHOR:   Antoon Bosselaers, ESAT-COSIC
 *      DATE:     1 March 1996
 *      VERSION:  1.0
 *
 *      Copyright (c) Katholieke Universiteit Leuven
 *      1996, All Rights Reserved
 *
\********************************************************************/

/*
 * from OpenBSD: rmd160.h,v 1.4 1999/08/16 09:59:04 millert Exp
 */

#ifndef _RMD160_H_
#define _RMD160_H_

#include "defs.h"

typedef struct {
        uint32_t        state[5];       /* state (ABCDE) */
        uint32_t        length[2];      /* number of bits */
        uint8_t         bbuffer[64];    /* overflow buffer */
        uint32_t        buflen;         /* number of chars in bbuffer */
} RMD160_CTX;

#ifdef RUBY
#define RMD160_Init     rb_Digest_RMD160_Init
#define RMD160_Transform        rb_Digest_RMD160_Transform
#define RMD160_Update   rb_Digest_RMD160_Update
#define RMD160_Final    rb_Digest_RMD160_Final
#define RMD160_Equal    rb_Digest_RMD160_Equal
#ifndef _KERNEL
#define RMD160_End      rb_Digest_RMD160_End
#define RMD160_File     rb_Digest_RMD160_File
#define RMD160_Data     rb_Digest_RMD160_Data
#endif /* _KERNEL */
#endif

__BEGIN_DECLS
void    RMD160_Init _((RMD160_CTX *));
void    RMD160_Transform _((uint32_t[5], const uint32_t[16]));
void    RMD160_Update _((RMD160_CTX *, const uint8_t *, size_t));
void    RMD160_Final _((uint8_t[20], RMD160_CTX *));
int     RMD160_Equal _((RMD160_CTX *, RMD160_CTX *));
#ifndef _KERNEL
char    *RMD160_End _((RMD160_CTX *, char *));
char    *RMD160_File _((char *, char *));
char    *RMD160_Data _((const uint8_t *, size_t, char *));
#endif /* _KERNEL */
__END_DECLS

#define RMD160_BLOCK_LENGTH             64
#define RMD160_DIGEST_LENGTH            20
#define RMD160_DIGEST_STRING_LENGTH     (RMD160_DIGEST_LENGTH * 2 + 1)

#endif  /* !_RMD160_H_ */
/* [<][>][^][v] [top][bottom][index] [help] */


ext/digest/rmd160/rmd160hl.c

root/ext/digest/rmd160/rmd160hl.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. RMD160_End
  2. RMD160_File
  3. RMD160_Data
/*      $NetBSD: rmd160hl.c,v 1.1.1.1 2001/03/06 11:21:05 agc Exp $     */
/*      $RoughId: rmd160hl.c,v 1.2 2001/07/13 19:49:10 knu Exp $        */
/*      $Id: rmd160hl.c,v 1.1 2001/07/13 20:06:14 knu Exp $     */

/* rmd160hl.c
 * ----------------------------------------------------------------------------
 * "THE BEER-WARE LICENSE" (Revision 42):
 * <phk@login.dkuug.dk> wrote this file.  As long as you retain this notice you
 * can do whatever you want with this stuff. If we meet some day, and you think
 * this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp
 * ----------------------------------------------------------------------------
 *
 * from OpenBSD: rmd160hl.c,v 1.2 1999/08/17 09:13:12 millert Exp $
 */

#include "rmd160.h"

#ifndef lint
/* __RCSID("$NetBSD: rmd160hl.c,v 1.1.1.1 2001/03/06 11:21:05 agc Exp $"); */
#endif  /* not lint */

/* #include "namespace.h" */

#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#if defined(HAVE_UNISTD_H)
# include <unistd.h>
#endif

#ifndef _DIAGASSERT
#define _DIAGASSERT(cond)       assert(cond)
#endif

char *
RMD160_End(RMD160_CTX *ctx, char *buf)
{
    size_t i;
    char *p = buf;
    uint8_t digest[20];
    static const char hex[]="0123456789abcdef";

    _DIAGASSERT(ctx != NULL);
    /* buf may be NULL */

    if (p == NULL && (p = malloc(41)) == NULL)
        return 0;

    RMD160_Final(digest,ctx);
    for (i = 0; i < 20; i++) {
        p[i + i] = hex[(uint32_t)digest[i] >> 4];
        p[i + i + 1] = hex[digest[i] & 0x0f];
    }
    p[i + i] = '\0';
    return(p);
}

char *
RMD160_File(char *filename, char *buf)
{
    uint8_t buffer[BUFSIZ];
    RMD160_CTX ctx;
    int fd, num, oerrno;

    _DIAGASSERT(filename != NULL);
    /* XXX: buf may be NULL ? */

    RMD160_Init(&ctx);

    if ((fd = open(filename, O_RDONLY)) < 0)
        return(0);

    while ((num = read(fd, buffer, sizeof(buffer))) > 0)
        RMD160_Update(&ctx, buffer, (size_t)num);

    oerrno = errno;
    close(fd);
    errno = oerrno;
    return(num < 0 ? 0 : RMD160_End(&ctx, buf));
}

char *
RMD160_Data(const uint8_t *data, size_t len, char *buf)
{
    RMD160_CTX ctx;

    _DIAGASSERT(data != NULL);
    /* XXX: buf may be NULL ? */

    RMD160_Init(&ctx);
    RMD160_Update(&ctx, data, len);
    return(RMD160_End(&ctx, buf));
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/digest/rmd160/rmd160init.c

root/ext/digest/rmd160/rmd160init.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. Init_rmd160
/* $RoughId: rmd160init.c,v 1.3 2001/07/13 20:00:43 knu Exp $ */
/* $Id: rmd160init.c,v 1.3 2002/09/26 17:26:46 knu Exp $ */

#include "digest.h"
#if defined(HAVE_OPENSSL_RIPEMD_H)
#include "rmd160ossl.h"
#else
#include "rmd160.h"
#endif

static algo_t rmd160 = {
    RMD160_DIGEST_LENGTH,
    sizeof(RMD160_CTX),
    (hash_init_func_t)RMD160_Init,
    (hash_update_func_t)RMD160_Update,
    (hash_end_func_t)RMD160_End,
    (hash_final_func_t)RMD160_Final,
    (hash_equal_func_t)RMD160_Equal,
};

void
Init_rmd160()
{
    VALUE mDigest, cDigest_Base, cDigest_RMD160;
    ID id_metadata;

    rb_require("digest.so");

    mDigest = rb_path2class("Digest");
    cDigest_Base = rb_path2class("Digest::Base");

    cDigest_RMD160 = rb_define_class_under(mDigest, "RMD160", cDigest_Base);

    id_metadata = rb_intern("metadata");

    rb_cvar_set(cDigest_RMD160, id_metadata,
                Data_Wrap_Struct(rb_cObject, 0, 0, &rmd160), Qtrue);
}
/* [<][>][^][v] [top][bottom][index] [help] */


ext/digest/rmd160/rmd160ossl.c

root/ext/digest/rmd160/rmd160ossl.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. RMD160_End
  2. RMD160_Equal
/* $Id: rmd160ossl.c,v 1.1 2002/09/26 17:26:46 knu Exp $ */

#include "rmd160ossl.h"
#include "defs.h"
#include <assert.h>
#include <stdlib.h>

#ifndef _DIAGASSERT
#define _DIAGASSERT(cond)       assert(cond)
#endif

char *
RMD160_End(RMD160_CTX *ctx, char *buf)
{
    size_t i;
    char *p = buf;
    uint8_t digest[20];
    static const char hex[]="0123456789abcdef";

    _DIAGASSERT(ctx != NULL);
    /* buf may be NULL */

    if (p == NULL && (p = malloc(41)) == NULL)
        return 0;

    RMD160_Final(digest,ctx);
    for (i = 0; i < 20; i++) {
        p[i + i] = hex[(uint32_t)digest[i] >> 4];
        p[i + i + 1] = hex[digest[i] & 0x0f];
    }
    p[i + i] = '\0';
    return(p);
}

int RMD160_Equal(RMD160_CTX* pctx1, RMD160_CTX* pctx2) {
        return pctx1->num == pctx2->num
          && pctx1->A == pctx2->A
          && pctx1->B == pctx2->B
          && pctx1->C == pctx2->C
          && pctx1->D == pctx2->D
          && pctx1->E == pctx2->E
          && pctx1->Nl == pctx2->Nl
          && pctx1->Nh == pctx2->Nh
          && memcmp(pctx1->data, pctx2->data, sizeof(pctx1->data)) == 0;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/digest/rmd160/rmd160ossl.h

root/ext/digest/rmd160/rmd160ossl.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/* $Id: rmd160ossl.h,v 1.2 2005/08/30 10:43:15 gotoyuzo Exp $ */

#ifndef RMD160OSSL_H_INCLUDED
#define RMD160OSSL_H_INCLUDED

#include <stddef.h>
#include <openssl/ripemd.h>

#define RMD160_CTX      RIPEMD160_CTX

#define RMD160_Init     RIPEMD160_Init
#define RMD160_Update   RIPEMD160_Update
#define RMD160_Final    RIPEMD160_Final

#define RMD160_BLOCK_LENGTH             RIPEMD160_CBLOCK
#define RMD160_DIGEST_LENGTH            RIPEMD160_DIGEST_LENGTH

char *RMD160_End(RMD160_CTX *ctx, char *buf);
int RMD160_Equal(RMD160_CTX *pctx1, RMD160_CTX *pctx2);

#endif
/* [<][>][^][v][top][bottom][index] [help] */


ext/digest/sha1/sha1.c

root/ext/digest/sha1/sha1.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. CHAR64LONG16
  2. do_R01
  3. do_R2
  4. do_R3
  5. do_R4
  6. SHA1_Transform
  7. SHA1_Init
  8. SHA1_Update
  9. SHA1_Final
  10. SHA1_Equal
/*      $NetBSD: sha1.c,v 1.2 2001/03/22 09:51:48 agc Exp $     */
/*      $OpenBSD: sha1.c,v 1.9 1997/07/23 21:12:32 kstailey Exp $       */
/*      $RoughId: sha1.c,v 1.2 2001/07/13 19:49:10 knu Exp $    */
/*      $Id: sha1.c,v 1.1 2001/07/13 20:06:14 knu Exp $ */

/*
 * SHA-1 in C
 * By Steve Reid <steve@edmweb.com>
 * 100% Public Domain
 *
 * Test Vectors (from FIPS PUB 180-1)
 * "abc"
 *   A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D
 * "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
 *   84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1
 * A million repetitions of "a"
 *   34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F
 */

#include "sha1.h"

#define SHA1HANDSOFF            /* Copies data before messing with it. */

#if defined(_KERNEL) || defined(_STANDALONE)
#include <sys/param.h>
#include <sys/systm.h>
#define _DIAGASSERT(x)  (void)0
#else
/* #include "namespace.h" */
#include <assert.h>
#include <string.h>
#endif

#ifndef _DIAGASSERT
#define _DIAGASSERT(cond)       assert(cond)
#endif

/*
 * XXX Kludge until there is resolution regarding mem*() functions
 * XXX in the kernel.
 */
#if defined(_KERNEL) || defined(_STANDALONE)
#define memcpy(s, d, l)         bcopy((d), (s), (l))
#endif

#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))

/*
 * blk0() and blk() perform the initial expand.
 * I got the idea of expanding during the round function from SSLeay
 */
#ifndef WORDS_BIGENDIAN
# define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \
    |(rol(block->l[i],8)&0x00FF00FF))
#else
# define blk0(i) block->l[i]
#endif
#define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \
    ^block->l[(i+2)&15]^block->l[i&15],1))

/*
 * (R0+R1), R2, R3, R4 are the different operations (rounds) used in SHA1
 */
#define R0(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30);
#define R1(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30);
#define R2(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30);
#define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30);
#define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30);

typedef union {
    uint8_t c[64];
    uint32_t l[16];
} CHAR64LONG16;

#ifdef __sparc_v9__
void do_R01(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *);
void do_R2(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *);
void do_R3(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *);
void do_R4(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *);

#define nR0(v,w,x,y,z,i) R0(*v,*w,*x,*y,*z,i)
#define nR1(v,w,x,y,z,i) R1(*v,*w,*x,*y,*z,i)
#define nR2(v,w,x,y,z,i) R2(*v,*w,*x,*y,*z,i)
#define nR3(v,w,x,y,z,i) R3(*v,*w,*x,*y,*z,i)
#define nR4(v,w,x,y,z,i) R4(*v,*w,*x,*y,*z,i)

void
do_R01(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *block)
{
    nR0(a,b,c,d,e, 0); nR0(e,a,b,c,d, 1); nR0(d,e,a,b,c, 2); nR0(c,d,e,a,b, 3);
    nR0(b,c,d,e,a, 4); nR0(a,b,c,d,e, 5); nR0(e,a,b,c,d, 6); nR0(d,e,a,b,c, 7);
    nR0(c,d,e,a,b, 8); nR0(b,c,d,e,a, 9); nR0(a,b,c,d,e,10); nR0(e,a,b,c,d,11);
    nR0(d,e,a,b,c,12); nR0(c,d,e,a,b,13); nR0(b,c,d,e,a,14); nR0(a,b,c,d,e,15);
    nR1(e,a,b,c,d,16); nR1(d,e,a,b,c,17); nR1(c,d,e,a,b,18); nR1(b,c,d,e,a,19);
}

void
do_R2(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *block)
{
    nR2(a,b,c,d,e,20); nR2(e,a,b,c,d,21); nR2(d,e,a,b,c,22); nR2(c,d,e,a,b,23);
    nR2(b,c,d,e,a,24); nR2(a,b,c,d,e,25); nR2(e,a,b,c,d,26); nR2(d,e,a,b,c,27);
    nR2(c,d,e,a,b,28); nR2(b,c,d,e,a,29); nR2(a,b,c,d,e,30); nR2(e,a,b,c,d,31);
    nR2(d,e,a,b,c,32); nR2(c,d,e,a,b,33); nR2(b,c,d,e,a,34); nR2(a,b,c,d,e,35);
    nR2(e,a,b,c,d,36); nR2(d,e,a,b,c,37); nR2(c,d,e,a,b,38); nR2(b,c,d,e,a,39);
}

void
do_R3(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *block)
{
    nR3(a,b,c,d,e,40); nR3(e,a,b,c,d,41); nR3(d,e,a,b,c,42); nR3(c,d,e,a,b,43);
    nR3(b,c,d,e,a,44); nR3(a,b,c,d,e,45); nR3(e,a,b,c,d,46); nR3(d,e,a,b,c,47);
    nR3(c,d,e,a,b,48); nR3(b,c,d,e,a,49); nR3(a,b,c,d,e,50); nR3(e,a,b,c,d,51);
    nR3(d,e,a,b,c,52); nR3(c,d,e,a,b,53); nR3(b,c,d,e,a,54); nR3(a,b,c,d,e,55);
    nR3(e,a,b,c,d,56); nR3(d,e,a,b,c,57); nR3(c,d,e,a,b,58); nR3(b,c,d,e,a,59);
}

void
do_R4(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LONG16 *block)
{
    nR4(a,b,c,d,e,60); nR4(e,a,b,c,d,61); nR4(d,e,a,b,c,62); nR4(c,d,e,a,b,63);
    nR4(b,c,d,e,a,64); nR4(a,b,c,d,e,65); nR4(e,a,b,c,d,66); nR4(d,e,a,b,c,67);
    nR4(c,d,e,a,b,68); nR4(b,c,d,e,a,69); nR4(a,b,c,d,e,70); nR4(e,a,b,c,d,71);
    nR4(d,e,a,b,c,72); nR4(c,d,e,a,b,73); nR4(b,c,d,e,a,74); nR4(a,b,c,d,e,75);
    nR4(e,a,b,c,d,76); nR4(d,e,a,b,c,77); nR4(c,d,e,a,b,78); nR4(b,c,d,e,a,79);
}
#endif

/*
 * Hash a single 512-bit block. This is the core of the algorithm.
 */
void SHA1_Transform(state, buffer)
    uint32_t state[5];
    const uint8_t buffer[64];
{
    uint32_t a, b, c, d, e;
    CHAR64LONG16 *block;

#ifdef SHA1HANDSOFF
    CHAR64LONG16 workspace;
#endif

    _DIAGASSERT(buffer != 0);
    _DIAGASSERT(state != 0);

#ifdef SHA1HANDSOFF
    block = &workspace;
    (void)memcpy(block, buffer, 64);
#else
    block = (CHAR64LONG16 *)(void *)buffer;
#endif

    /* Copy context->state[] to working vars */
    a = state[0];
    b = state[1];
    c = state[2];
    d = state[3];
    e = state[4];

#ifdef __sparc_v9__
    do_R01(&a, &b, &c, &d, &e, block);
    do_R2(&a, &b, &c, &d, &e, block);
    do_R3(&a, &b, &c, &d, &e, block);
    do_R4(&a, &b, &c, &d, &e, block);
#else
    /* 4 rounds of 20 operations each. Loop unrolled. */
    R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3);
    R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7);
    R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11);
    R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15);
    R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19);
    R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23);
    R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27);
    R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31);
    R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35);
    R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39);
    R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43);
    R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47);
    R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51);
    R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55);
    R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59);
    R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63);
    R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67);
    R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71);
    R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75);
    R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79);
#endif

    /* Add the working vars back into context.state[] */
    state[0] += a;
    state[1] += b;
    state[2] += c;
    state[3] += d;
    state[4] += e;

    /* Wipe variables */
    a = b = c = d = e = 0;
}

/*
 * SHA1_Init - Initialize new context
 */
void SHA1_Init(context)
    SHA1_CTX *context;
{

    _DIAGASSERT(context != 0);

    /* SHA1 initialization constants */
    context->state[0] = 0x67452301;
    context->state[1] = 0xEFCDAB89;
    context->state[2] = 0x98BADCFE;
    context->state[3] = 0x10325476;
    context->state[4] = 0xC3D2E1F0;
    context->count[0] = context->count[1] = 0;
}

/*
 * Run your data through this.
 */
void SHA1_Update(context, data, len)
    SHA1_CTX *context;
    const uint8_t *data;
    size_t len;
{
    uint32_t i, j;

    _DIAGASSERT(context != 0);
    _DIAGASSERT(data != 0);

    j = context->count[0];
    if ((context->count[0] += len << 3) < j)
        context->count[1] += (len>>29)+1;
    j = (j >> 3) & 63;
    if ((j + len) > 63) {
        (void)memcpy(&context->buffer[j], data, (i = 64-j));
        SHA1_Transform(context->state, context->buffer);
        for ( ; i + 63 < len; i += 64)
            SHA1_Transform(context->state, &data[i]);
        j = 0;
    } else {
        i = 0;
    }
    (void)memcpy(&context->buffer[j], &data[i], len - i);
}

/*
 * Add padding and return the message digest.
 */
void SHA1_Final(digest, context)
    uint8_t digest[20];
    SHA1_CTX* context;
{
    size_t i;
    uint8_t finalcount[8];

    _DIAGASSERT(digest != 0);
    _DIAGASSERT(context != 0);

    for (i = 0; i < 8; i++) {
        finalcount[i] = (uint8_t)((context->count[(i >= 4 ? 0 : 1)]
         >> ((3-(i & 3)) * 8) ) & 255);  /* Endian independent */
    }
    SHA1_Update(context, (const uint8_t *)"\200", 1);
    while ((context->count[0] & 504) != 448)
        SHA1_Update(context, (const uint8_t *)"\0", 1);
    SHA1_Update(context, finalcount, 8);  /* Should cause a SHA1_Transform() */

    if (digest) {
        for (i = 0; i < 20; i++)
            digest[i] = (uint8_t)
                ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255);
    }
}

int SHA1_Equal(SHA1_CTX* pctx1, SHA1_CTX* pctx2) {
        return memcmp(pctx1->count, pctx2->count, sizeof(pctx1->count)) == 0
                && memcmp(pctx1->state, pctx2->state, sizeof(pctx1->state)) == 0
                && memcmp(pctx1->buffer, pctx2->buffer, sizeof(pctx1->buffer)) == 0;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/digest/sha1/sha1.h

root/ext/digest/sha1/sha1.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

DEFINITIONS

This source file includes following definitions.
  1. SHA1_CTX
/*      $NetBSD: sha1.h,v 1.2 1998/05/29 22:55:44 thorpej Exp $ */
/*      $RoughId: sha1.h,v 1.3 2002/02/24 08:14:32 knu Exp $    */
/*      $Id: sha1.h,v 1.2 2002/02/24 08:20:22 knu Exp $ */

/*
 * SHA-1 in C
 * By Steve Reid <steve@edmweb.com>
 * 100% Public Domain
 */

#ifndef _SYS_SHA1_H_
#define _SYS_SHA1_H_

#include "defs.h"

typedef struct {
        uint32_t state[5];
        uint32_t count[2];
        uint8_t buffer[64];
} SHA1_CTX;

#ifdef RUBY
#define SHA1_Transform  rb_Digest_SHA1_Transform
#define SHA1_Init       rb_Digest_SHA1_Init
#define SHA1_Update     rb_Digest_SHA1_Update
#define SHA1_Final      rb_Digest_SHA1_Final
#define SHA1_Equal      rb_Digest_SHA1_Equal
#ifndef _KERNEL
#define SHA1_End        rb_Digest_SHA1_End
#define SHA1_File       rb_Digest_SHA1_File
#define SHA1_Data       rb_Digest_SHA1_Data
#endif /* _KERNEL */
#endif

void    SHA1_Transform _((uint32_t state[5], const uint8_t buffer[64]));
void    SHA1_Init _((SHA1_CTX *context));
void    SHA1_Update _((SHA1_CTX *context, const uint8_t *data, size_t len));
void    SHA1_Final _((uint8_t digest[20], SHA1_CTX *context));
int     SHA1_Equal _((SHA1_CTX *pctx1, SHA1_CTX *pctx2));
#ifndef _KERNEL
char    *SHA1_End _((SHA1_CTX *, char *));
char    *SHA1_File _((char *, char *));
char    *SHA1_Data _((const uint8_t *, size_t, char *));
#endif /* _KERNEL */

#define SHA1_BLOCK_LENGTH               64
#define SHA1_DIGEST_LENGTH              20
#define SHA1_DIGEST_STRING_LENGTH       (SHA1_DIGEST_LENGTH * 2 + 1)

#endif /* _SYS_SHA1_H_ */
/* [<][>][^][v] [top][bottom][index] [help] */


ext/digest/sha1/sha1hl.c

root/ext/digest/sha1/sha1hl.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. SHA1_End
  2. SHA1_File
  3. SHA1_Data
/*      $NetBSD: sha1hl.c,v 1.2 2001/03/10 15:55:14 tron Exp $  */
/*      $RoughId: sha1hl.c,v 1.2 2001/07/13 19:49:10 knu Exp $  */
/*      $Id: sha1hl.c,v 1.1 2001/07/13 20:06:14 knu Exp $       */

/* sha1hl.c
 * ----------------------------------------------------------------------------
 * "THE BEER-WARE LICENSE" (Revision 42):
 * <phk@login.dkuug.dk> wrote this file.  As long as you retain this notice you
 * can do whatever you want with this stuff. If we meet some day, and you think
 * this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp
 * ----------------------------------------------------------------------------
 */

/* #include "namespace.h" */

#include "sha1.h"
#include <fcntl.h>

#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#if defined(HAVE_UNISTD_H)
# include <unistd.h>
#endif

#if defined(LIBC_SCCS) && !defined(lint)
/* __RCSID("$NetBSD: sha1hl.c,v 1.2 2001/03/10 15:55:14 tron Exp $"); */
#endif /* LIBC_SCCS and not lint */

#ifndef _DIAGASSERT
#define _DIAGASSERT(cond)       assert(cond)
#endif

/* ARGSUSED */
char *
SHA1_End(ctx, buf)
    SHA1_CTX *ctx;
    char *buf;
{
    int i;
    char *p = buf;
    uint8_t digest[20];
    static const char hex[]="0123456789abcdef";

    _DIAGASSERT(ctx != NULL);
    /* buf may be NULL */

    if (p == NULL && (p = malloc(41)) == NULL)
        return 0;

    SHA1_Final(digest,ctx);
    for (i = 0; i < 20; i++) {
        p[i + i] = hex[((uint32_t)digest[i]) >> 4];
        p[i + i + 1] = hex[digest[i] & 0x0f];
    }
    p[i + i] = '\0';
    return(p);
}

char *
SHA1_File (filename, buf)
    char *filename;
    char *buf;
{
    uint8_t buffer[BUFSIZ];
    SHA1_CTX ctx;
    int fd, num, oerrno;

    _DIAGASSERT(filename != NULL);
    /* XXX: buf may be NULL ? */

    SHA1_Init(&ctx);

    if ((fd = open(filename,O_RDONLY)) < 0)
        return(0);

    while ((num = read(fd, buffer, sizeof(buffer))) > 0)
        SHA1_Update(&ctx, buffer, (size_t)num);

    oerrno = errno;
    close(fd);
    errno = oerrno;
    return(num < 0 ? 0 : SHA1_End(&ctx, buf));
}

char *
SHA1_Data (data, len, buf)
    const uint8_t *data;
    size_t len;
    char *buf;
{
    SHA1_CTX ctx;

    _DIAGASSERT(data != NULL);
    /* XXX: buf may be NULL ? */

    SHA1_Init(&ctx);
    SHA1_Update(&ctx, data, len);
    return(SHA1_End(&ctx, buf));
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/digest/sha1/sha1init.c

root/ext/digest/sha1/sha1init.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. Init_sha1
/* $RoughId: sha1init.c,v 1.2 2001/07/13 19:49:10 knu Exp $ */
/* $Id: sha1init.c,v 1.4 2004/09/17 09:24:11 matz Exp $ */

#include "digest.h"
#if defined(HAVE_OPENSSL_SHA_H)
#include "sha1ossl.h"
#else
#include "sha1.h"
#endif

static algo_t sha1 = {
    SHA1_DIGEST_LENGTH,
    sizeof(SHA1_CTX),
    (hash_init_func_t)SHA1_Init,
    (hash_update_func_t)SHA1_Update,
    (hash_end_func_t)SHA1_End,
    (hash_final_func_t)SHA1_Final,
    (hash_equal_func_t)SHA1_Equal,
};

void
Init_sha1()
{
    VALUE mDigest, cDigest_Base, cDigest_SHA1;

    rb_require("digest.so");

    mDigest = rb_path2class("Digest");
    cDigest_Base = rb_path2class("Digest::Base");

    cDigest_SHA1 = rb_define_class_under(mDigest, "SHA1", cDigest_Base);

    rb_cvar_set(cDigest_SHA1, rb_intern("metadata"),
                Data_Wrap_Struct(rb_cObject, 0, 0, &sha1), Qtrue);
}
/* [<][>][^][v] [top][bottom][index] [help] */


ext/digest/sha1/sha1ossl.c

root/ext/digest/sha1/sha1ossl.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. SHA1_End
  2. SHA1_Equal
/* $Id: sha1ossl.c,v 1.1 2002/09/26 17:44:33 knu Exp $ */

#include "sha1ossl.h"
#include "defs.h"
#include <assert.h>
#include <stdlib.h>

#ifndef _DIAGASSERT
#define _DIAGASSERT(cond)       assert(cond)
#endif

char *
SHA1_End(SHA1_CTX *ctx, char *buf)
{
    int i;
    char *p = buf;
    uint8_t digest[20];
    static const char hex[]="0123456789abcdef";

    _DIAGASSERT(ctx != NULL);
    /* buf may be NULL */

    if (p == NULL && (p = malloc(41)) == NULL)
        return 0;

    SHA1_Final(digest,ctx);
    for (i = 0; i < 20; i++) {
        p[i + i] = hex[((uint32_t)digest[i]) >> 4];
        p[i + i + 1] = hex[digest[i] & 0x0f];
    }
    p[i + i] = '\0';
    return(p);
}

int SHA1_Equal(SHA1_CTX* pctx1, SHA1_CTX* pctx2) {
        return pctx1->num == pctx2->num
          && pctx1->h0 == pctx2->h0
          && pctx1->h1 == pctx2->h1
          && pctx1->h2 == pctx2->h2
          && pctx1->h3 == pctx2->h3
          && pctx1->h4 == pctx2->h4
          && pctx1->Nl == pctx2->Nl
          && pctx1->Nh == pctx2->Nh
          && memcmp(pctx1->data, pctx2->data, sizeof(pctx1->data)) == 0;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/digest/sha1/sha1ossl.h

root/ext/digest/sha1/sha1ossl.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/* $Id: sha1ossl.h,v 1.2 2005/08/30 10:43:16 gotoyuzo Exp $ */

#ifndef SHA1OSSL_H_INCLUDED
#define SHA1OSSL_H_INCLUDED

#include <stddef.h>
#include <openssl/sha.h>

#define SHA1_CTX        SHA_CTX

#define SHA1_BLOCK_LENGTH       SHA_BLOCK_LENGTH
#define SHA1_DIGEST_LENGTH      SHA_DIGEST_LENGTH

char *SHA1_End(SHA1_CTX *ctx, char *buf);
int SHA1_Equal(SHA1_CTX *pctx1, SHA1_CTX *pctx2);

#endif
/* [<][>][^][v][top][bottom][index] [help] */


ext/digest/sha2/sha2.c

root/ext/digest/sha2/sha2.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. SHA256_Init
  2. SHA256_Transform
  3. SHA256_Transform
  4. SHA256_Update
  5. SHA256_Final
  6. SHA256_Equal
  7. SHA512_Init
  8. SHA512_Transform
  9. SHA512_Transform
  10. SHA512_Update
  11. SHA512_Last
  12. SHA512_Final
  13. SHA512_Equal
  14. SHA384_Init
  15. SHA384_Update
  16. SHA384_Final
  17. SHA384_Equal
/*
 * sha2.c
 *
 * Version 1.0.0beta1
 *
 * Written by Aaron D. Gifford <me@aarongifford.com>
 *
 * Copyright 2000 Aaron D. Gifford.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. Neither the name of the copyright holder nor the names of contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTOR(S) ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTOR(S) BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 */

/* $RoughId: sha2.c,v 1.3 2002/02/26 22:03:36 knu Exp $ */
/* $Id: sha2.c,v 1.5 2005/12/29 12:05:01 matz Exp $ */

#include "sha2.h"
#include <stdio.h>
#include <string.h>     /* memcpy()/memset() or bcopy()/bzero() */
#include <assert.h>     /* assert() */

/*
 * ASSERT NOTE:
 * Some sanity checking code is included using assert().  On my FreeBSD
 * system, this additional code can be removed by compiling with NDEBUG
 * defined.  Check your own systems manpage on assert() to see how to
 * compile WITHOUT the sanity checking code on your system.
 *
 * UNROLLED TRANSFORM LOOP NOTE:
 * You can define SHA2_UNROLL_TRANSFORM to use the unrolled transform
 * loop version for the hash transform rounds (defined using macros
 * later in this file).  Either define on the command line, for example:
 *
 *   cc -DSHA2_UNROLL_TRANSFORM -o sha2 sha2.c sha2prog.c
 *
 * or define below:
 *
 *   #define SHA2_UNROLL_TRANSFORM
 *
 */

/*** SHA-256/384/512 Machine Architecture Definitions *****************/
typedef uint8_t  sha2_byte;     /* Exactly 1 byte */
typedef uint32_t sha2_word32;   /* Exactly 4 bytes */
typedef uint64_t sha2_word64;   /* Exactly 8 bytes */

#if defined(__GNUC__) || defined(_HPUX_SOURCE) || defined(__IBMC__)
#define ULL(number)     number##ULL
#else
#define ULL(number)     (uint64_t)(number)
#endif

/*** SHA-256/384/512 Various Length Definitions ***********************/
/* NOTE: Most of these are in sha2.h */
#define SHA256_SHORT_BLOCK_LENGTH       (SHA256_BLOCK_LENGTH - 8)
#define SHA384_SHORT_BLOCK_LENGTH       (SHA384_BLOCK_LENGTH - 16)
#define SHA512_SHORT_BLOCK_LENGTH       (SHA512_BLOCK_LENGTH - 16)

/*** ENDIAN REVERSAL MACROS *******************************************/
#ifndef WORDS_BIGENDIAN
#define REVERSE32(w,x)  { \
        sha2_word32 tmp = (w); \
        tmp = (tmp >> 16) | (tmp << 16); \
        (x) = ((tmp & 0xff00ff00UL) >> 8) | ((tmp & 0x00ff00ffUL) << 8); \
}
#define REVERSE64(w,x)  { \
        sha2_word64 tmp = (w); \
        tmp = (tmp >> 32) | (tmp << 32); \
        tmp = ((tmp & ULL(0xff00ff00ff00ff00)) >> 8) | \
              ((tmp & ULL(0x00ff00ff00ff00ff)) << 8); \
        (x) = ((tmp & ULL(0xffff0000ffff0000)) >> 16) | \
              ((tmp & ULL(0x0000ffff0000ffff)) << 16); \
}
#endif

/*
 * Macro for incrementally adding the unsigned 64-bit integer n to the
 * unsigned 128-bit integer (represented using a two-element array of
 * 64-bit words):
 */
#define ADDINC128(w,n)  { \
        (w)[0] += (sha2_word64)(n); \
        if ((w)[0] < (n)) { \
                (w)[1]++; \
        } \
}

/*
 * Macros for copying blocks of memory and for zeroing out ranges
 * of memory.  Using these macros makes it easy to switch from
 * using memset()/memcpy() and using bzero()/bcopy().
 *
 * Please define either SHA2_USE_MEMSET_MEMCPY or define
 * SHA2_USE_BZERO_BCOPY depending on which function set you
 * choose to use:
 */
#if !defined(SHA2_USE_MEMSET_MEMCPY) && !defined(SHA2_USE_BZERO_BCOPY)
/* Default to memset()/memcpy() if no option is specified */
#define SHA2_USE_MEMSET_MEMCPY  1
#endif
#if defined(SHA2_USE_MEMSET_MEMCPY) && defined(SHA2_USE_BZERO_BCOPY)
/* Abort with an error if BOTH options are defined */
#error Define either SHA2_USE_MEMSET_MEMCPY or SHA2_USE_BZERO_BCOPY, not both!
#endif

#ifdef SHA2_USE_MEMSET_MEMCPY
#define MEMSET_BZERO(p,l)       memset((p), 0, (l))
#define MEMCPY_BCOPY(d,s,l)     memcpy((d), (s), (l))
#endif
#ifdef SHA2_USE_BZERO_BCOPY
#define MEMSET_BZERO(p,l)       bzero((p), (l))
#define MEMCPY_BCOPY(d,s,l)     bcopy((s), (d), (l))
#endif

/*** THE SIX LOGICAL FUNCTIONS ****************************************/
/*
 * Bit shifting and rotation (used by the six SHA-XYZ logical functions:
 *
 *   NOTE:  The naming of R and S appears backwards here (R is a SHIFT and
 *   S is a ROTATION) because the SHA-256/384/512 description document
 *   (see http://csrc.nist.gov/cryptval/shs/sha256-384-512.pdf) uses this
 *   same "backwards" definition.
 */
/* Shift-right (used in SHA-256, SHA-384, and SHA-512): */
#define R(b,x)          ((x) >> (b))
/* 32-bit Rotate-right (used in SHA-256): */
#define S32(b,x)        (((x) >> (b)) | ((x) << (32 - (b))))
/* 64-bit Rotate-right (used in SHA-384 and SHA-512): */
#define S64(b,x)        (((x) >> (b)) | ((x) << (64 - (b))))

/* Two of six logical functions used in SHA-256, SHA-384, and SHA-512: */
#define Ch(x,y,z)       (((x) & (y)) ^ ((~(x)) & (z)))
#define Maj(x,y,z)      (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))

/* Four of six logical functions used in SHA-256: */
#define Sigma0_256(x)   (S32(2,  (x)) ^ S32(13, (x)) ^ S32(22, (x)))
#define Sigma1_256(x)   (S32(6,  (x)) ^ S32(11, (x)) ^ S32(25, (x)))
#define sigma0_256(x)   (S32(7,  (x)) ^ S32(18, (x)) ^ R(3 ,   (x)))
#define sigma1_256(x)   (S32(17, (x)) ^ S32(19, (x)) ^ R(10,   (x)))

/* Four of six logical functions used in SHA-384 and SHA-512: */
#define Sigma0_512(x)   (S64(28, (x)) ^ S64(34, (x)) ^ S64(39, (x)))
#define Sigma1_512(x)   (S64(14, (x)) ^ S64(18, (x)) ^ S64(41, (x)))
#define sigma0_512(x)   (S64( 1, (x)) ^ S64( 8, (x)) ^ R( 7,   (x)))
#define sigma1_512(x)   (S64(19, (x)) ^ S64(61, (x)) ^ R( 6,   (x)))

/*** INTERNAL FUNCTION PROTOTYPES *************************************/
/* NOTE: These should not be accessed directly from outside this
 * library -- they are intended for private internal visibility/use
 * only.
 */
void SHA512_Last(SHA512_CTX*);
void SHA256_Transform(SHA256_CTX*, const sha2_word32*);
void SHA512_Transform(SHA512_CTX*, const sha2_word64*);

/*** SHA-XYZ INITIAL HASH VALUES AND CONSTANTS ************************/
/* Hash constant words K for SHA-256: */
const static sha2_word32 K256[64] = {
        0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL,
        0x3956c25bUL, 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL,
        0xd807aa98UL, 0x12835b01UL, 0x243185beUL, 0x550c7dc3UL,
        0x72be5d74UL, 0x80deb1feUL, 0x9bdc06a7UL, 0xc19bf174UL,
        0xe49b69c1UL, 0xefbe4786UL, 0x0fc19dc6UL, 0x240ca1ccUL,
        0x2de92c6fUL, 0x4a7484aaUL, 0x5cb0a9dcUL, 0x76f988daUL,
        0x983e5152UL, 0xa831c66dUL, 0xb00327c8UL, 0xbf597fc7UL,
        0xc6e00bf3UL, 0xd5a79147UL, 0x06ca6351UL, 0x14292967UL,
        0x27b70a85UL, 0x2e1b2138UL, 0x4d2c6dfcUL, 0x53380d13UL,
        0x650a7354UL, 0x766a0abbUL, 0x81c2c92eUL, 0x92722c85UL,
        0xa2bfe8a1UL, 0xa81a664bUL, 0xc24b8b70UL, 0xc76c51a3UL,
        0xd192e819UL, 0xd6990624UL, 0xf40e3585UL, 0x106aa070UL,
        0x19a4c116UL, 0x1e376c08UL, 0x2748774cUL, 0x34b0bcb5UL,
        0x391c0cb3UL, 0x4ed8aa4aUL, 0x5b9cca4fUL, 0x682e6ff3UL,
        0x748f82eeUL, 0x78a5636fUL, 0x84c87814UL, 0x8cc70208UL,
        0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL
};

/* Initial hash value H for SHA-256: */
const static sha2_word32 sha256_initial_hash_value[8] = {
        0x6a09e667UL,
        0xbb67ae85UL,
        0x3c6ef372UL,
        0xa54ff53aUL,
        0x510e527fUL,
        0x9b05688cUL,
        0x1f83d9abUL,
        0x5be0cd19UL
};

/* Hash constant words K for SHA-384 and SHA-512: */
const static sha2_word64 K512[80] = {
        ULL(0x428a2f98d728ae22), ULL(0x7137449123ef65cd),
        ULL(0xb5c0fbcfec4d3b2f), ULL(0xe9b5dba58189dbbc),
        ULL(0x3956c25bf348b538), ULL(0x59f111f1b605d019),
        ULL(0x923f82a4af194f9b), ULL(0xab1c5ed5da6d8118),
        ULL(0xd807aa98a3030242), ULL(0x12835b0145706fbe),
        ULL(0x243185be4ee4b28c), ULL(0x550c7dc3d5ffb4e2),
        ULL(0x72be5d74f27b896f), ULL(0x80deb1fe3b1696b1),
        ULL(0x9bdc06a725c71235), ULL(0xc19bf174cf692694),
        ULL(0xe49b69c19ef14ad2), ULL(0xefbe4786384f25e3),
        ULL(0x0fc19dc68b8cd5b5), ULL(0x240ca1cc77ac9c65),
        ULL(0x2de92c6f592b0275), ULL(0x4a7484aa6ea6e483),
        ULL(0x5cb0a9dcbd41fbd4), ULL(0x76f988da831153b5),
        ULL(0x983e5152ee66dfab), ULL(0xa831c66d2db43210),
        ULL(0xb00327c898fb213f), ULL(0xbf597fc7beef0ee4),
        ULL(0xc6e00bf33da88fc2), ULL(0xd5a79147930aa725),
        ULL(0x06ca6351e003826f), ULL(0x142929670a0e6e70),
        ULL(0x27b70a8546d22ffc), ULL(0x2e1b21385c26c926),
        ULL(0x4d2c6dfc5ac42aed), ULL(0x53380d139d95b3df),
        ULL(0x650a73548baf63de), ULL(0x766a0abb3c77b2a8),
        ULL(0x81c2c92e47edaee6), ULL(0x92722c851482353b),
        ULL(0xa2bfe8a14cf10364), ULL(0xa81a664bbc423001),
        ULL(0xc24b8b70d0f89791), ULL(0xc76c51a30654be30),
        ULL(0xd192e819d6ef5218), ULL(0xd69906245565a910),
        ULL(0xf40e35855771202a), ULL(0x106aa07032bbd1b8),
        ULL(0x19a4c116b8d2d0c8), ULL(0x1e376c085141ab53),
        ULL(0x2748774cdf8eeb99), ULL(0x34b0bcb5e19b48a8),
        ULL(0x391c0cb3c5c95a63), ULL(0x4ed8aa4ae3418acb),
        ULL(0x5b9cca4f7763e373), ULL(0x682e6ff3d6b2b8a3),
        ULL(0x748f82ee5defb2fc), ULL(0x78a5636f43172f60),
        ULL(0x84c87814a1f0ab72), ULL(0x8cc702081a6439ec),
        ULL(0x90befffa23631e28), ULL(0xa4506cebde82bde9),
        ULL(0xbef9a3f7b2c67915), ULL(0xc67178f2e372532b),
        ULL(0xca273eceea26619c), ULL(0xd186b8c721c0c207),
        ULL(0xeada7dd6cde0eb1e), ULL(0xf57d4f7fee6ed178),
        ULL(0x06f067aa72176fba), ULL(0x0a637dc5a2c898a6),
        ULL(0x113f9804bef90dae), ULL(0x1b710b35131c471b),
        ULL(0x28db77f523047d84), ULL(0x32caab7b40c72493),
        ULL(0x3c9ebe0a15c9bebc), ULL(0x431d67c49c100d4c),
        ULL(0x4cc5d4becb3e42b6), ULL(0x597f299cfc657e2a),
        ULL(0x5fcb6fab3ad6faec), ULL(0x6c44198c4a475817)
};

/* Initial hash value H for SHA-384 */
const static sha2_word64 sha384_initial_hash_value[8] = {
        ULL(0xcbbb9d5dc1059ed8),
        ULL(0x629a292a367cd507),
        ULL(0x9159015a3070dd17),
        ULL(0x152fecd8f70e5939),
        ULL(0x67332667ffc00b31),
        ULL(0x8eb44a8768581511),
        ULL(0xdb0c2e0d64f98fa7),
        ULL(0x47b5481dbefa4fa4)
};

/* Initial hash value H for SHA-512 */
const static sha2_word64 sha512_initial_hash_value[8] = {
        ULL(0x6a09e667f3bcc908),
        ULL(0xbb67ae8584caa73b),
        ULL(0x3c6ef372fe94f82b),
        ULL(0xa54ff53a5f1d36f1),
        ULL(0x510e527fade682d1),
        ULL(0x9b05688c2b3e6c1f),
        ULL(0x1f83d9abfb41bd6b),
        ULL(0x5be0cd19137e2179)
};

/*** SHA-256: *********************************************************/
void SHA256_Init(SHA256_CTX* context) {
        if (context == (SHA256_CTX*)0) {
                return;
        }
        MEMCPY_BCOPY(context->state, sha256_initial_hash_value, SHA256_DIGEST_LENGTH);
        MEMSET_BZERO(context->buffer, SHA256_BLOCK_LENGTH);
        context->bitcount = 0;
}

#ifdef SHA2_UNROLL_TRANSFORM

/* Unrolled SHA-256 round macros: */

#ifndef WORDS_BIGENDIAN

#define ROUND256_0_TO_15(a,b,c,d,e,f,g,h)       \
        REVERSE32(*data++, W256[j]); \
        T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + \
             K256[j] + W256[j]; \
        (d) += T1; \
        (h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
        j++

#else

#define ROUND256_0_TO_15(a,b,c,d,e,f,g,h)       \
        T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + \
             K256[j] + (W256[j] = *data++); \
        (d) += T1; \
        (h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
        j++

#endif

#define ROUND256(a,b,c,d,e,f,g,h)       \
        s0 = W256[(j+1)&0x0f]; \
        s0 = sigma0_256(s0); \
        s1 = W256[(j+14)&0x0f]; \
        s1 = sigma1_256(s1); \
        T1 = (h) + Sigma1_256(e) + Ch((e), (f), (g)) + K256[j] + \
             (W256[j&0x0f] += s1 + W256[(j+9)&0x0f] + s0); \
        (d) += T1; \
        (h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
        j++

void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
        sha2_word32     a, b, c, d, e, f, g, h, s0, s1;
        sha2_word32     T1, *W256;
        int             j;

        W256 = (sha2_word32*)context->buffer;

        /* Initialize registers with the prev. intermediate value */
        a = context->state[0];
        b = context->state[1];
        c = context->state[2];
        d = context->state[3];
        e = context->state[4];
        f = context->state[5];
        g = context->state[6];
        h = context->state[7];

        j = 0;
        do {
                /* Rounds 0 to 15 (unrolled): */
                ROUND256_0_TO_15(a,b,c,d,e,f,g,h);
                ROUND256_0_TO_15(h,a,b,c,d,e,f,g);
                ROUND256_0_TO_15(g,h,a,b,c,d,e,f);
                ROUND256_0_TO_15(f,g,h,a,b,c,d,e);
                ROUND256_0_TO_15(e,f,g,h,a,b,c,d);
                ROUND256_0_TO_15(d,e,f,g,h,a,b,c);
                ROUND256_0_TO_15(c,d,e,f,g,h,a,b);
                ROUND256_0_TO_15(b,c,d,e,f,g,h,a);
        } while (j < 16);

        /* Now for the remaining rounds to 64: */
        do {
                ROUND256(a,b,c,d,e,f,g,h);
                ROUND256(h,a,b,c,d,e,f,g);
                ROUND256(g,h,a,b,c,d,e,f);
                ROUND256(f,g,h,a,b,c,d,e);
                ROUND256(e,f,g,h,a,b,c,d);
                ROUND256(d,e,f,g,h,a,b,c);
                ROUND256(c,d,e,f,g,h,a,b);
                ROUND256(b,c,d,e,f,g,h,a);
        } while (j < 64);

        /* Compute the current intermediate hash value */
        context->state[0] += a;
        context->state[1] += b;
        context->state[2] += c;
        context->state[3] += d;
        context->state[4] += e;
        context->state[5] += f;
        context->state[6] += g;
        context->state[7] += h;

        /* Clean up */
        a = b = c = d = e = f = g = h = T1 = 0;
}

#else /* SHA2_UNROLL_TRANSFORM */

void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
        sha2_word32     a, b, c, d, e, f, g, h, s0, s1;
        sha2_word32     T1, T2, *W256;
        int             j;

        W256 = (sha2_word32*)context->buffer;

        /* Initialize registers with the prev. intermediate value */
        a = context->state[0];
        b = context->state[1];
        c = context->state[2];
        d = context->state[3];
        e = context->state[4];
        f = context->state[5];
        g = context->state[6];
        h = context->state[7];

        j = 0;
        do {
#ifndef WORDS_BIGENDIAN
                /* Copy data while converting to host byte order */
                REVERSE32(*data++,W256[j]);
                /* Apply the SHA-256 compression function to update a..h */
                T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + W256[j];
#else
                /* Apply the SHA-256 compression function to update a..h with copy */
                T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + (W256[j] = *data++);
#endif
                T2 = Sigma0_256(a) + Maj(a, b, c);
                h = g;
                g = f;
                f = e;
                e = d + T1;
                d = c;
                c = b;
                b = a;
                a = T1 + T2;

                j++;
        } while (j < 16);

        do {
                /* Part of the message block expansion: */
                s0 = W256[(j+1)&0x0f];
                s0 = sigma0_256(s0);
                s1 = W256[(j+14)&0x0f];
                s1 = sigma1_256(s1);

                /* Apply the SHA-256 compression function to update a..h */
                T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] +
                     (W256[j&0x0f] += s1 + W256[(j+9)&0x0f] + s0);
                T2 = Sigma0_256(a) + Maj(a, b, c);
                h = g;
                g = f;
                f = e;
                e = d + T1;
                d = c;
                c = b;
                b = a;
                a = T1 + T2;

                j++;
        } while (j < 64);

        /* Compute the current intermediate hash value */
        context->state[0] += a;
        context->state[1] += b;
        context->state[2] += c;
        context->state[3] += d;
        context->state[4] += e;
        context->state[5] += f;
        context->state[6] += g;
        context->state[7] += h;

        /* Clean up */
        a = b = c = d = e = f = g = h = T1 = T2 = 0;
}

#endif /* SHA2_UNROLL_TRANSFORM */

void SHA256_Update(SHA256_CTX* context, const sha2_byte *data, size_t len) {
        unsigned int    freespace, usedspace;

        if (len == 0) {
                /* Calling with no data is valid - we do nothing */
                return;
        }

        /* Sanity check: */
        assert(context != NULL && data != NULL);

        usedspace = (context->bitcount >> 3) % SHA256_BLOCK_LENGTH;
        if (usedspace > 0) {
                /* Calculate how much free space is available in the buffer */
                freespace = SHA256_BLOCK_LENGTH - usedspace;

                if (len >= freespace) {
                        /* Fill the buffer completely and process it */
                        MEMCPY_BCOPY(&context->buffer[usedspace], data, freespace);
                        context->bitcount += freespace << 3;
                        len -= freespace;
                        data += freespace;
                        SHA256_Transform(context, (sha2_word32*)context->buffer);
                } else {
                        /* The buffer is not yet full */
                        MEMCPY_BCOPY(&context->buffer[usedspace], data, len);
                        context->bitcount += len << 3;
                        /* Clean up: */
                        usedspace = freespace = 0;
                        return;
                }
        }
        while (len >= SHA256_BLOCK_LENGTH) {
                /* Process as many complete blocks as we can */
                SHA256_Transform(context, (const sha2_word32*)data);
                context->bitcount += SHA256_BLOCK_LENGTH << 3;
                len -= SHA256_BLOCK_LENGTH;
                data += SHA256_BLOCK_LENGTH;
        }
        if (len > 0) {
                /* There's left-overs, so save 'em */
                MEMCPY_BCOPY(context->buffer, data, len);
                context->bitcount += len << 3;
        }
        /* Clean up: */
        usedspace = freespace = 0;
}

void SHA256_Final(sha2_byte digest[], SHA256_CTX* context) {
        sha2_word32     *d = (sha2_word32*)digest;
        unsigned int    usedspace;

        /* Sanity check: */
        assert(context != NULL);

        /* If no digest buffer is passed, we don't bother doing this: */
        if (digest != (sha2_byte*)0) {
                usedspace = (context->bitcount >> 3) % SHA256_BLOCK_LENGTH;
#ifndef WORDS_BIGENDIAN
                /* Convert FROM host byte order */
                REVERSE64(context->bitcount,context->bitcount);
#endif
                if (usedspace > 0) {
                        /* Begin padding with a 1 bit: */
                        context->buffer[usedspace++] = 0x80;

                        if (usedspace <= SHA256_SHORT_BLOCK_LENGTH) {
                                /* Set-up for the last transform: */
                                MEMSET_BZERO(&context->buffer[usedspace], SHA256_SHORT_BLOCK_LENGTH - usedspace);
                        } else {
                                if (usedspace < SHA256_BLOCK_LENGTH) {
                                        MEMSET_BZERO(&context->buffer[usedspace], SHA256_BLOCK_LENGTH - usedspace);
                                }
                                /* Do second-to-last transform: */
                                SHA256_Transform(context, (sha2_word32*)context->buffer);

                                /* And set-up for the last transform: */
                                MEMSET_BZERO(context->buffer, SHA256_SHORT_BLOCK_LENGTH);
                        }
                } else {
                        /* Set-up for the last transform: */
                        MEMSET_BZERO(context->buffer, SHA256_SHORT_BLOCK_LENGTH);

                        /* Begin padding with a 1 bit: */
                        *context->buffer = 0x80;
                }
                /* Set the bit count: */
                *(sha2_word64*)&context->buffer[SHA256_SHORT_BLOCK_LENGTH] = context->bitcount;

                /* Final transform: */
                SHA256_Transform(context, (sha2_word32*)context->buffer);

#ifndef WORDS_BIGENDIAN
                {
                        /* Convert TO host byte order */
                        int     j;
                        for (j = 0; j < 8; j++) {
                                REVERSE32(context->state[j],context->state[j]);
                                *d++ = context->state[j];
                        }
                }
#else
                MEMCPY_BCOPY(d, context->state, SHA256_DIGEST_LENGTH);
#endif
        }

        /* Clean up state data: */
        MEMSET_BZERO(context, sizeof(SHA256_CTX));
        usedspace = 0;
}

int SHA256_Equal(SHA256_CTX* pctx1, SHA256_CTX* pctx2) {
        return pctx1->bitcount == pctx2->bitcount
                && memcmp(pctx1->state, pctx2->state, sizeof(pctx1->state)) == 0
                && memcmp(pctx1->buffer, pctx2->buffer, sizeof(pctx1->buffer)) == 0;
}

/*** SHA-512: *********************************************************/
void SHA512_Init(SHA512_CTX* context) {
        if (context == (SHA512_CTX*)0) {
                return;
        }
        MEMCPY_BCOPY(context->state, sha512_initial_hash_value, SHA512_DIGEST_LENGTH);
        MEMSET_BZERO(context->buffer, SHA512_BLOCK_LENGTH);
        context->bitcount[0] = context->bitcount[1] =  0;
}

#ifdef SHA2_UNROLL_TRANSFORM

/* Unrolled SHA-512 round macros: */
#ifndef WORDS_BIGENDIAN

#define ROUND512_0_TO_15(a,b,c,d,e,f,g,h)       \
        REVERSE64(*data++, W512[j]); \
        T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + \
             K512[j] + W512[j]; \
        (d) += T1, \
        (h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)), \
        j++

#else

#define ROUND512_0_TO_15(a,b,c,d,e,f,g,h)       \
        T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + \
             K512[j] + (W512[j] = *data++); \
        (d) += T1; \
        (h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)); \
        j++

#endif

#define ROUND512(a,b,c,d,e,f,g,h)       \
        s0 = W512[(j+1)&0x0f]; \
        s0 = sigma0_512(s0); \
        s1 = W512[(j+14)&0x0f]; \
        s1 = sigma1_512(s1); \
        T1 = (h) + Sigma1_512(e) + Ch((e), (f), (g)) + K512[j] + \
             (W512[j&0x0f] += s1 + W512[(j+9)&0x0f] + s0); \
        (d) += T1; \
        (h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)); \
        j++

void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
        sha2_word64     a, b, c, d, e, f, g, h, s0, s1;
        sha2_word64     T1, *W512 = (sha2_word64*)context->buffer;
        int             j;

        /* Initialize registers with the prev. intermediate value */
        a = context->state[0];
        b = context->state[1];
        c = context->state[2];
        d = context->state[3];
        e = context->state[4];
        f = context->state[5];
        g = context->state[6];
        h = context->state[7];

        j = 0;
        do {
                ROUND512_0_TO_15(a,b,c,d,e,f,g,h);
                ROUND512_0_TO_15(h,a,b,c,d,e,f,g);
                ROUND512_0_TO_15(g,h,a,b,c,d,e,f);
                ROUND512_0_TO_15(f,g,h,a,b,c,d,e);
                ROUND512_0_TO_15(e,f,g,h,a,b,c,d);
                ROUND512_0_TO_15(d,e,f,g,h,a,b,c);
                ROUND512_0_TO_15(c,d,e,f,g,h,a,b);
                ROUND512_0_TO_15(b,c,d,e,f,g,h,a);
        } while (j < 16);

        /* Now for the remaining rounds up to 79: */
        do {
                ROUND512(a,b,c,d,e,f,g,h);
                ROUND512(h,a,b,c,d,e,f,g);
                ROUND512(g,h,a,b,c,d,e,f);
                ROUND512(f,g,h,a,b,c,d,e);
                ROUND512(e,f,g,h,a,b,c,d);
                ROUND512(d,e,f,g,h,a,b,c);
                ROUND512(c,d,e,f,g,h,a,b);
                ROUND512(b,c,d,e,f,g,h,a);
        } while (j < 80);

        /* Compute the current intermediate hash value */
        context->state[0] += a;
        context->state[1] += b;
        context->state[2] += c;
        context->state[3] += d;
        context->state[4] += e;
        context->state[5] += f;
        context->state[6] += g;
        context->state[7] += h;

        /* Clean up */
        a = b = c = d = e = f = g = h = T1 = 0;
}

#else /* SHA2_UNROLL_TRANSFORM */

void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
        sha2_word64     a, b, c, d, e, f, g, h, s0, s1;
        sha2_word64     T1, T2, *W512 = (sha2_word64*)context->buffer;
        int             j;

        /* Initialize registers with the prev. intermediate value */
        a = context->state[0];
        b = context->state[1];
        c = context->state[2];
        d = context->state[3];
        e = context->state[4];
        f = context->state[5];
        g = context->state[6];
        h = context->state[7];

        j = 0;
        do {
#ifndef WORDS_BIGENDIAN
                /* Convert TO host byte order */
                REVERSE64(*data++, W512[j]);
                /* Apply the SHA-512 compression function to update a..h */
                T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + W512[j];
#else
                /* Apply the SHA-512 compression function to update a..h with copy */
                T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] + (W512[j] = *data++);
#endif
                T2 = Sigma0_512(a) + Maj(a, b, c);
                h = g;
                g = f;
                f = e;
                e = d + T1;
                d = c;
                c = b;
                b = a;
                a = T1 + T2;

                j++;
        } while (j < 16);

        do {
                /* Part of the message block expansion: */
                s0 = W512[(j+1)&0x0f];
                s0 = sigma0_512(s0);
                s1 = W512[(j+14)&0x0f];
                s1 =  sigma1_512(s1);

                /* Apply the SHA-512 compression function to update a..h */
                T1 = h + Sigma1_512(e) + Ch(e, f, g) + K512[j] +
                     (W512[j&0x0f] += s1 + W512[(j+9)&0x0f] + s0);
                T2 = Sigma0_512(a) + Maj(a, b, c);
                h = g;
                g = f;
                f = e;
                e = d + T1;
                d = c;
                c = b;
                b = a;
                a = T1 + T2;

                j++;
        } while (j < 80);

        /* Compute the current intermediate hash value */
        context->state[0] += a;
        context->state[1] += b;
        context->state[2] += c;
        context->state[3] += d;
        context->state[4] += e;
        context->state[5] += f;
        context->state[6] += g;
        context->state[7] += h;

        /* Clean up */
        a = b = c = d = e = f = g = h = T1 = T2 = 0;
}

#endif /* SHA2_UNROLL_TRANSFORM */

void SHA512_Update(SHA512_CTX* context, const sha2_byte *data, size_t len) {
        unsigned int    freespace, usedspace;

        if (len == 0) {
                /* Calling with no data is valid - we do nothing */
                return;
        }

        /* Sanity check: */
        assert(context != NULL && data != NULL);

        usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH;
        if (usedspace > 0) {
                /* Calculate how much free space is available in the buffer */
                freespace = SHA512_BLOCK_LENGTH - usedspace;

                if (len >= freespace) {
                        /* Fill the buffer completely and process it */
                        MEMCPY_BCOPY(&context->buffer[usedspace], data, freespace);
                        ADDINC128(context->bitcount, freespace << 3);
                        len -= freespace;
                        data += freespace;
                        SHA512_Transform(context, (const sha2_word64*)context->buffer);
                } else {
                        /* The buffer is not yet full */
                        MEMCPY_BCOPY(&context->buffer[usedspace], data, len);
                        ADDINC128(context->bitcount, len << 3);
                        /* Clean up: */
                        usedspace = freespace = 0;
                        return;
                }
        }
        while (len >= SHA512_BLOCK_LENGTH) {
                /* Process as many complete blocks as we can */
                SHA512_Transform(context, (const sha2_word64*)data);
                ADDINC128(context->bitcount, SHA512_BLOCK_LENGTH << 3);
                len -= SHA512_BLOCK_LENGTH;
                data += SHA512_BLOCK_LENGTH;
        }
        if (len > 0) {
                /* There's left-overs, so save 'em */
                MEMCPY_BCOPY(context->buffer, data, len);
                ADDINC128(context->bitcount, len << 3);
        }
        /* Clean up: */
        usedspace = freespace = 0;
}

void SHA512_Last(SHA512_CTX* context) {
        unsigned int    usedspace;

        usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH;
#ifndef WORDS_BIGENDIAN
        /* Convert FROM host byte order */
        REVERSE64(context->bitcount[0],context->bitcount[0]);
        REVERSE64(context->bitcount[1],context->bitcount[1]);
#endif
        if (usedspace > 0) {
                /* Begin padding with a 1 bit: */
                context->buffer[usedspace++] = 0x80;

                if (usedspace <= SHA512_SHORT_BLOCK_LENGTH) {
                        /* Set-up for the last transform: */
                        MEMSET_BZERO(&context->buffer[usedspace], SHA512_SHORT_BLOCK_LENGTH - usedspace);
                } else {
                        if (usedspace < SHA512_BLOCK_LENGTH) {
                                MEMSET_BZERO(&context->buffer[usedspace], SHA512_BLOCK_LENGTH - usedspace);
                        }
                        /* Do second-to-last transform: */
                        SHA512_Transform(context, (const sha2_word64*)context->buffer);

                        /* And set-up for the last transform: */
                        MEMSET_BZERO(context->buffer, SHA512_BLOCK_LENGTH - 2);
                }
        } else {
                /* Prepare for final transform: */
                MEMSET_BZERO(context->buffer, SHA512_SHORT_BLOCK_LENGTH);

                /* Begin padding with a 1 bit: */
                *context->buffer = 0x80;
        }
        /* Store the length of input data (in bits): */
        *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH] = context->bitcount[1];
        *(sha2_word64*)&context->buffer[SHA512_SHORT_BLOCK_LENGTH+8] = context->bitcount[0];

        /* Final transform: */
        SHA512_Transform(context, (const sha2_word64*)context->buffer);
}

void SHA512_Final(sha2_byte digest[], SHA512_CTX* context) {
        sha2_word64     *d = (sha2_word64*)digest;

        /* Sanity check: */
        assert(context != NULL);

        /* If no digest buffer is passed, we don't bother doing this: */
        if (digest != (sha2_byte*)0) {
                SHA512_Last(context);

                /* Save the hash data for output: */
#ifndef WORDS_BIGENDIAN
                {
                        /* Convert TO host byte order */
                        int     j;
                        for (j = 0; j < 8; j++) {
                                REVERSE64(context->state[j],context->state[j]);
                                *d++ = context->state[j];
                        }
                }
#else
                MEMCPY_BCOPY(d, context->state, SHA512_DIGEST_LENGTH);
#endif
        }

        /* Zero out state data */
        MEMSET_BZERO(context, sizeof(SHA512_CTX));
}

int SHA512_Equal(SHA512_CTX* pctx1, SHA512_CTX* pctx2) {
        return memcmp(pctx1->bitcount, pctx2->bitcount, sizeof(pctx1->bitcount)) == 0
                && memcmp(pctx1->state, pctx2->state, sizeof(pctx1->state)) == 0
                && memcmp(pctx1->buffer, pctx2->buffer, sizeof(pctx1->buffer)) == 0;
}

/*** SHA-384: *********************************************************/
void SHA384_Init(SHA384_CTX* context) {
        if (context == (SHA384_CTX*)0) {
                return;
        }
        MEMCPY_BCOPY(context->state, sha384_initial_hash_value, SHA512_DIGEST_LENGTH);
        MEMSET_BZERO(context->buffer, SHA384_BLOCK_LENGTH);
        context->bitcount[0] = context->bitcount[1] = 0;
}

void SHA384_Update(SHA384_CTX* context, const sha2_byte* data, size_t len) {
        SHA512_Update((SHA512_CTX*)context, data, len);
}

void SHA384_Final(sha2_byte digest[], SHA384_CTX* context) {
        sha2_word64     *d = (sha2_word64*)digest;

        /* Sanity check: */
        assert(context != NULL);

        /* If no digest buffer is passed, we don't bother doing this: */
        if (digest != (sha2_byte*)0) {
                SHA512_Last((SHA512_CTX*)context);

                /* Save the hash data for output: */
#ifndef WORDS_BIGENDIAN
                {
                        /* Convert TO host byte order */
                        int     j;
                        for (j = 0; j < 6; j++) {
                                REVERSE64(context->state[j],context->state[j]);
                                *d++ = context->state[j];
                        }
                }
#else
                MEMCPY_BCOPY(d, context->state, SHA384_DIGEST_LENGTH);
#endif
        }

        /* Zero out state data */
        MEMSET_BZERO(context, sizeof(SHA384_CTX));
}

int SHA384_Equal(SHA384_CTX* pctx1, SHA384_CTX* pctx2) {
        return memcmp(pctx1->bitcount, pctx2->bitcount, sizeof(pctx1->bitcount)) == 0
                && memcmp(pctx1->state, pctx2->state, sizeof(pctx1->state)) == 0
                && memcmp(pctx1->buffer, pctx2->buffer, sizeof(pctx1->buffer)) == 0;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/digest/sha2/sha2.h

root/ext/digest/sha2/sha2.h

/* [<][>][^] [v][top][bottom] [index] [help] */

INCLUDED FROM

DEFINITIONS

This source file includes following definitions.
  1. SHA256_CTX
  2. SHA512_CTX
/*
 * sha2.h
 *
 * Version 1.0.0beta1
 *
 * Written by Aaron D. Gifford <me@aarongifford.com>
 *
 * Copyright 2000 Aaron D. Gifford.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. Neither the name of the copyright holder nor the names of contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTOR(S) ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTOR(S) BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 */

/* $RoughId: sha2.h,v 1.3 2002/02/24 08:14:32 knu Exp $ */
/* $Id: sha2.h,v 1.2 2002/02/24 08:20:22 knu Exp $ */

#ifndef __SHA2_H__
#define __SHA2_H__

#ifdef __cplusplus
extern "C" {
#endif

#include "defs.h"

/*** SHA-256/384/512 Various Length Definitions ***********************/
#define SHA256_BLOCK_LENGTH             64
#define SHA256_DIGEST_LENGTH            32
#define SHA256_DIGEST_STRING_LENGTH     (SHA256_DIGEST_LENGTH * 2 + 1)
#define SHA384_BLOCK_LENGTH             128
#define SHA384_DIGEST_LENGTH            48
#define SHA384_DIGEST_STRING_LENGTH     (SHA384_DIGEST_LENGTH * 2 + 1)
#define SHA512_BLOCK_LENGTH             128
#define SHA512_DIGEST_LENGTH            64
#define SHA512_DIGEST_STRING_LENGTH     (SHA512_DIGEST_LENGTH * 2 + 1)

/*** SHA-256/384/512 Context Structures *******************************/

typedef struct _SHA256_CTX {
        uint32_t        state[8];
        uint64_t        bitcount;
        uint8_t buffer[SHA256_BLOCK_LENGTH];
} SHA256_CTX;
typedef struct _SHA512_CTX {
        uint64_t        state[8];
        uint64_t        bitcount[2];
        uint8_t buffer[SHA512_BLOCK_LENGTH];
} SHA512_CTX;

typedef SHA512_CTX SHA384_CTX;

#ifdef RUBY
#define SHA256_Init             rb_Digest_SHA256_Init
#define SHA256_Update           rb_Digest_SHA256_Update
#define SHA256_Final            rb_Digest_SHA256_Final
#define SHA256_End              rb_Digest_SHA256_End
#define SHA256_Data             rb_Digest_SHA256_Data
#define SHA256_File             rb_Digest_SHA256_File
#define SHA256_Equal            rb_Digest_SHA256_Equal

#define SHA384_Init             rb_Digest_SHA384_Init
#define SHA384_Update           rb_Digest_SHA384_Update
#define SHA384_Final            rb_Digest_SHA384_Final
#define SHA384_End              rb_Digest_SHA384_End
#define SHA384_Data             rb_Digest_SHA384_Data
#define SHA384_File             rb_Digest_SHA384_File
#define SHA384_Equal            rb_Digest_SHA384_Equal

#define SHA512_Init             rb_Digest_SHA512_Init
#define SHA512_Update           rb_Digest_SHA512_Update
#define SHA512_Final            rb_Digest_SHA512_Final
#define SHA512_End              rb_Digest_SHA512_End
#define SHA512_Data             rb_Digest_SHA512_Data
#define SHA512_File             rb_Digest_SHA512_File
#define SHA512_Equal            rb_Digest_SHA512_Equal
#endif

/*** SHA-256/384/512 Function Prototypes ******************************/
void SHA256_Init _((SHA256_CTX *));
void SHA256_Update _((SHA256_CTX*, const uint8_t*, size_t));
void SHA256_Final _((uint8_t[SHA256_DIGEST_LENGTH], SHA256_CTX*));
char* SHA256_End _((SHA256_CTX*, char[SHA256_DIGEST_STRING_LENGTH]));
char* SHA256_Data _((const uint8_t*, size_t, char[SHA256_DIGEST_STRING_LENGTH]));
char *SHA256_File _((char *, char *));
int SHA256_Equal _((SHA256_CTX*, SHA256_CTX*));

void SHA384_Init _((SHA384_CTX*));
void SHA384_Update _((SHA384_CTX*, const uint8_t*, size_t));
void SHA384_Final _((uint8_t[SHA384_DIGEST_LENGTH], SHA384_CTX*));
char* SHA384_End _((SHA384_CTX*, char[SHA384_DIGEST_STRING_LENGTH]));
char* SHA384_Data _((const uint8_t*, size_t, char[SHA384_DIGEST_STRING_LENGTH]));
char *SHA384_File _((char *, char *));
int SHA384_Equal _((SHA384_CTX*, SHA384_CTX*));

void SHA512_Init _((SHA512_CTX*));
void SHA512_Update _((SHA512_CTX*, const uint8_t*, size_t));
void SHA512_Final _((uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*));
char* SHA512_End _((SHA512_CTX*, char[SHA512_DIGEST_STRING_LENGTH]));
char* SHA512_Data _((const uint8_t*, size_t, char[SHA512_DIGEST_STRING_LENGTH]));
char *SHA512_File _((char *, char *));
int SHA512_Equal _((SHA512_CTX*, SHA512_CTX*));

#ifdef  __cplusplus
}
#endif /* __cplusplus */

#endif /* __SHA2_H__ */
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/digest/sha2/sha2hl.c

root/ext/digest/sha2/sha2hl.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. SHA256_File
  2. SHA256_End
  3. SHA256_Data
  4. SHA384_File
  5. SHA384_End
  6. SHA384_Data
  7. SHA512_File
  8. SHA512_End
  9. SHA512_Data
/* $NetBSD: sha2hl.c,v 1.1 2001/03/12 09:08:40 agc Exp $         */
/* $RoughId: sha2hl.c,v 1.2 2001/07/13 19:49:10 knu Exp $ */
/* $Id: sha2hl.c,v 1.1 2001/07/13 20:06:14 knu Exp $ */

/*
 * sha2hl.c
 * This code includes some functions taken from sha2.c, hence the
 * following licence reproduction.
 *
 * This code is not a verbatim copy, since some routines have been added,
 * and some bugs have been fixed.
 *
 * Version 1.0.0beta1
 *
 * Written by Aaron D. Gifford <me@aarongifford.com>
 *
 * Copyright 2000 Aaron D. Gifford.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. Neither the name of the copyright holder nor the names of contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTOR(S) ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTOR(S) BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 */

#include "sha2.h"

#ifndef lint
/* __RCSID("$NetBSD: sha2hl.c,v 1.1 2001/03/12 09:08:40 agc Exp $"); */
#endif                          /* not lint */

/* #include "namespace.h" */

#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#if defined(HAVE_UNISTD_H)
# include <unistd.h>
#endif

#ifndef _DIAGASSERT
#define _DIAGASSERT(cond)       assert(cond)
#endif

/*
 * Constant used by SHA256/384/512_End() functions for converting the
 * digest to a readable hexadecimal character string:
 */
static const char sha2_hex_digits[] = "0123456789abcdef";

char           *
SHA256_File(char *filename, char *buf)
{
        uint8_t         buffer[BUFSIZ * 20];
        SHA256_CTX      ctx;
        int             fd, num, oerrno;

        _DIAGASSERT(filename != NULL);
        /* XXX: buf may be NULL ? */

        SHA256_Init(&ctx);

        if ((fd = open(filename, O_RDONLY)) < 0)
                return (0);

        while ((num = read(fd, buffer, sizeof(buffer))) > 0)
                SHA256_Update(&ctx, buffer, (size_t) num);

        oerrno = errno;
        close(fd);
        errno = oerrno;
        return (num < 0 ? 0 : SHA256_End(&ctx, buf));
}

char           *
SHA256_End(SHA256_CTX *ctx, char buffer[])
{
        uint8_t         digest[SHA256_DIGEST_LENGTH], *d = digest;
        uint8_t        *ret;
        int             i;

        /* Sanity check: */
        assert(ctx != NULL);

        if ((ret = buffer) != NULL) {
                SHA256_Final(digest, ctx);

                for (i = 0; i < SHA256_DIGEST_LENGTH; i++) {
                        *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
                        *buffer++ = sha2_hex_digits[*d & 0x0f];
                        d++;
                }
                *buffer = (char) 0;
        } else {
                (void) memset(ctx, 0, sizeof(SHA256_CTX));
        }
        (void) memset(digest, 0, SHA256_DIGEST_LENGTH);
        return ret;
}

char           *
SHA256_Data(const uint8_t * data, size_t len, char *digest)
{
        SHA256_CTX      ctx;

        SHA256_Init(&ctx);
        SHA256_Update(&ctx, data, len);
        return SHA256_End(&ctx, digest);
}

char           *
SHA384_File(char *filename, char *buf)
{
        SHA384_CTX      ctx;
        uint8_t         buffer[BUFSIZ * 20];
        int             fd, num, oerrno;

        _DIAGASSERT(filename != NULL);
        /* XXX: buf may be NULL ? */

        SHA384_Init(&ctx);

        if ((fd = open(filename, O_RDONLY)) < 0)
                return (0);

        while ((num = read(fd, buffer, sizeof(buffer))) > 0)
                SHA384_Update(&ctx, buffer, (size_t) num);

        oerrno = errno;
        close(fd);
        errno = oerrno;
        return (num < 0 ? 0 : SHA384_End(&ctx, buf));
}

char           *
SHA384_End(SHA384_CTX * ctx, char buffer[])
{
        uint8_t         digest[SHA384_DIGEST_LENGTH], *d = digest;
        uint8_t        *ret;
        int             i;

        /* Sanity check: */
        assert(ctx != NULL);

        if ((ret = buffer) != NULL) {
                SHA384_Final(digest, ctx);

                for (i = 0; i < SHA384_DIGEST_LENGTH; i++) {
                        *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
                        *buffer++ = sha2_hex_digits[*d & 0x0f];
                        d++;
                }
                *buffer = (char) 0;
        } else {
                (void) memset(ctx, 0, sizeof(SHA384_CTX));
        }
        (void) memset(digest, 0, SHA384_DIGEST_LENGTH);
        return ret;
}

char           *
SHA384_Data(const uint8_t * data, size_t len, char *digest)
{
        SHA384_CTX      ctx;

        SHA384_Init(&ctx);
        SHA384_Update(&ctx, data, len);
        return SHA384_End(&ctx, digest);
}

char           *
SHA512_File(char *filename, char *buf)
{
        SHA512_CTX      ctx;
        uint8_t         buffer[BUFSIZ * 20];
        int             fd, num, oerrno;

        _DIAGASSERT(filename != NULL);
        /* XXX: buf may be NULL ? */

        SHA512_Init(&ctx);

        if ((fd = open(filename, O_RDONLY)) < 0)
                return (0);

        while ((num = read(fd, buffer, sizeof(buffer))) > 0)
                SHA512_Update(&ctx, buffer, (size_t) num);

        oerrno = errno;
        close(fd);
        errno = oerrno;
        return (num < 0 ? 0 : SHA512_End(&ctx, buf));
}

char           *
SHA512_End(SHA512_CTX * ctx, char buffer[])
{
        uint8_t         digest[SHA512_DIGEST_LENGTH], *d = digest;
        uint8_t        *ret;
        int             i;

        /* Sanity check: */
        assert(ctx != NULL);

        if ((ret = buffer) != NULL) {
                SHA512_Final(digest, ctx);

                for (i = 0; i < SHA512_DIGEST_LENGTH; i++) {
                        *buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
                        *buffer++ = sha2_hex_digits[*d & 0x0f];
                        d++;
                }
                *buffer = (char) 0;
        } else {
                (void) memset(ctx, 0, sizeof(SHA512_CTX));
        }
        (void) memset(digest, 0, SHA512_DIGEST_LENGTH);
        return ret;
}

char           *
SHA512_Data(const uint8_t * data, size_t len, char *digest)
{
        SHA512_CTX      ctx;

        SHA512_Init(&ctx);
        SHA512_Update(&ctx, data, len);
        return SHA512_End(&ctx, digest);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/digest/sha2/sha2init.c

root/ext/digest/sha2/sha2init.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. FOREACH_BITLEN
/* $RoughId: sha2init.c,v 1.3 2001/07/13 20:00:43 knu Exp $ */
/* $Id: sha2init.c,v 1.2 2002/02/17 12:43:44 nobu Exp $ */

#include "digest.h"
#include "sha2.h"

#define FOREACH_BITLEN(func)    func(256) func(384) func(512)

#define DEFINE_ALGO_METADATA(bitlen) \
static algo_t sha##bitlen = { \
    SHA##bitlen##_DIGEST_LENGTH, \
    sizeof(SHA##bitlen##_CTX), \
    (hash_init_func_t)SHA##bitlen##_Init, \
    (hash_update_func_t)SHA##bitlen##_Update, \
    (hash_end_func_t)SHA##bitlen##_End, \
    (hash_final_func_t)SHA##bitlen##_Final, \
    (hash_equal_func_t)SHA##bitlen##_Equal, \
};

FOREACH_BITLEN(DEFINE_ALGO_METADATA)

void
Init_sha2()
{
    VALUE mDigest, cDigest_Base;
    ID id_metadata;

#define DECLARE_ALGO_CLASS(bitlen) \
    VALUE cDigest_SHA##bitlen;

    FOREACH_BITLEN(DECLARE_ALGO_CLASS)

    rb_require("digest.so");

    id_metadata = rb_intern("metadata");

    mDigest = rb_path2class("Digest");
    cDigest_Base = rb_path2class("Digest::Base");

#define DEFINE_ALGO_CLASS(bitlen) \
    cDigest_SHA##bitlen = rb_define_class_under(mDigest, "SHA" #bitlen, cDigest_Base); \
\
    rb_cvar_set(cDigest_SHA##bitlen, id_metadata, \
                Data_Wrap_Struct(rb_cObject, 0, 0, &sha##bitlen), Qtrue);

    FOREACH_BITLEN(DEFINE_ALGO_CLASS)
}
/* [<][>][^][v] [top][bottom][index] [help] */


ext/dl/cfunc.c

root/ext/dl/cfunc.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. rb_dl_get_last_error
  2. rb_dl_set_last_error
  3. rb_dl_get_win32_last_error
  4. rb_dl_set_win32_last_error
  5. dlcfunc_free
  6. rb_dlcfunc_new
  7. rb_dlcfunc2ptr
  8. rb_dlcfunc_s_allocate
  9. rb_dlcfunc_initialize
  10. rb_dlcfunc_name
  11. rb_dlcfunc_ctype
  12. rb_dlcfunc_set_ctype
  13. rb_dlcfunc_calltype
  14. rb_dlcfunc_set_calltype
  15. rb_dlcfunc_ptr
  16. rb_dlcfunc_set_ptr
  17. rb_dlcfunc_inspect
  18. rb_dlcfunc_call
  19. rb_dlcfunc_to_i
  20. Init_dlcfunc
/* -*- C -*-
 * $Id: cfunc.c,v 1.4 2005/03/04 06:47:39 matz Exp $
 */

#include <ruby.h>
#include <errno.h>
#include "dl.h"

VALUE rb_cDLCFunc;

static ID id_last_error;

static VALUE
rb_dl_get_last_error(VALUE self)
{
    return rb_thread_local_aref(rb_thread_current(), id_last_error);
}

static VALUE
rb_dl_set_last_error(VALUE self, VALUE val)
{
    rb_thread_local_aset(rb_thread_current(), id_last_error, val);
    return Qnil;
}

#if defined(HAVE_WINDOWS_H)
#include <windows.h>
static ID id_win32_last_error;

static VALUE
rb_dl_get_win32_last_error(VALUE self)
{
    return rb_thread_local_aref(rb_thread_current(), id_win32_last_error);
}

static VALUE
rb_dl_set_win32_last_error(VALUE self, VALUE val)
{
    rb_thread_local_aset(rb_thread_current(), id_win32_last_error, val);
    return Qnil;
}
#endif

void
dlcfunc_free(struct cfunc_data *data)
{
  if( data->name ){
      xfree(data->name);
  }
  xfree(data);
}

VALUE
rb_dlcfunc_new(void (*func)(), int type, const char *name, ID calltype)
{
  VALUE val;
  struct cfunc_data *data;

  rb_secure(4);
  if( func ){
    val = Data_Make_Struct(rb_cDLCFunc, struct cfunc_data, 0, dlcfunc_free, data);
    data->ptr  = func;
    data->name = name ? strdup(name) : NULL;
    data->type = type;
    data->calltype = calltype;
  }
  else{
    val = Qnil;
  }

  return val;
}

void *
rb_dlcfunc2ptr(VALUE val)
{
  struct cfunc_data *data;
  void * func;

  if( rb_obj_is_kind_of(val, rb_cDLCFunc) ){
    Data_Get_Struct(val, struct cfunc_data, data);
    func = data->ptr;
  }
  else if( val == Qnil ){
    func = NULL;
  }
  else{
    rb_raise(rb_eTypeError, "DL::CFunc was expected");
  }

  return func;
}

VALUE
rb_dlcfunc_s_allocate(VALUE klass)
{
  VALUE obj;
  struct cfunc_data *data;

  obj = Data_Make_Struct(klass, struct cfunc_data, 0, dlcfunc_free, data);
  data->ptr  = 0;
  data->name = 0;
  data->type = 0;
  data->calltype = CFUNC_CDECL;

  return obj;
}

VALUE
rb_dlcfunc_initialize(int argc, VALUE argv[], VALUE self)
{
    VALUE addr, name, type, calltype;
    struct cfunc_data *data;
    void *saddr;
    const char *sname;

    rb_scan_args(argc, argv, "13", &addr, &type, &name, &calltype);

    saddr = (void*)(NUM2PTR(rb_Integer(addr)));
    sname = NIL_P(name) ? NULL : StringValuePtr(name);

    Data_Get_Struct(self, struct cfunc_data, data);
    if( data->name ) xfree(data->name);
    data->ptr  = saddr;
    data->name = sname ? strdup(sname) : 0;
    data->type = (type == Qnil) ? DLTYPE_VOID : NUM2INT(type);
    data->calltype = (calltype == Qnil) ? CFUNC_CDECL : SYM2ID(calltype);

    return Qnil;
}

VALUE
rb_dlcfunc_name(VALUE self)
{
    struct cfunc_data *cfunc;

    Data_Get_Struct(self, struct cfunc_data, cfunc);
    return cfunc->name ? rb_tainted_str_new2(cfunc->name) : Qnil;
}

VALUE
rb_dlcfunc_ctype(VALUE self)
{
    struct cfunc_data *cfunc;

    Data_Get_Struct(self, struct cfunc_data, cfunc);
    return INT2NUM(cfunc->type);
}

VALUE
rb_dlcfunc_set_ctype(VALUE self, VALUE ctype)
{
    struct cfunc_data *cfunc;

    Data_Get_Struct(self, struct cfunc_data, cfunc);
    cfunc->type = NUM2INT(ctype);
    return ctype;
}

VALUE
rb_dlcfunc_calltype(VALUE self)
{
    struct cfunc_data *cfunc;

    Data_Get_Struct(self, struct cfunc_data, cfunc);
    return ID2SYM(cfunc->calltype);
}

VALUE
rb_dlcfunc_set_calltype(VALUE self, VALUE sym)
{
    struct cfunc_data *cfunc;

    Data_Get_Struct(self, struct cfunc_data, cfunc);
    cfunc->calltype = SYM2ID(sym);
    return sym;
}

VALUE
rb_dlcfunc_ptr(VALUE self)
{
    struct cfunc_data *cfunc;

    Data_Get_Struct(self, struct cfunc_data, cfunc);
    return PTR2NUM(cfunc->ptr);
}

VALUE
rb_dlcfunc_set_ptr(VALUE self, VALUE addr)
{
    struct cfunc_data *cfunc;

    Data_Get_Struct(self, struct cfunc_data, cfunc);
    cfunc->ptr = NUM2PTR(addr);

    return Qnil;
}

VALUE
rb_dlcfunc_inspect(VALUE self)
{
    VALUE val;
    char  *str;
    int str_size;
    struct cfunc_data *cfunc;

    Data_Get_Struct(self, struct cfunc_data, cfunc);

    str_size = (cfunc->name ? strlen(cfunc->name) : 0) + 100;
    str = ruby_xmalloc(str_size);
    snprintf(str, str_size - 1,
             "#<DL::CFunc:%p ptr=%p type=%d name='%s'>",
             cfunc,
             cfunc->ptr,
             cfunc->type,
             cfunc->name ? cfunc->name : "");
    val = rb_tainted_str_new2(str);
    ruby_xfree(str);

    return val;
}

#if defined(__GNUC__)
# define DECL_FUNC(f,ret,args,calltype)  ret (__attribute__((calltype)) *f)(args)
/* # define DECL_FUNC(f,ret,args,calltype)  ret (*f)(args) */
#elif defined(_MSC_VER) || defined(__BORLANDC__)
# define DECL_FUNC(f,ret,args,calltype)  ret (__##calltype *f)(args)
#else
# error "unsupported compiler."
#endif

#define CALL_CASE switch( RARRAY(ary)->len ){ \
  CASE(0); break; \
  CASE(1); break; CASE(2); break; CASE(3); break; CASE(4); break; CASE(5); break; \
  CASE(6); break; CASE(7); break; CASE(8); break; CASE(9); break; CASE(10);break; \
  CASE(11);break; CASE(12);break; CASE(13);break; CASE(14);break; CASE(15);break; \
  CASE(16);break; CASE(17);break; CASE(18);break; CASE(19);break; CASE(20);break; \
  default: rb_raise(rb_eArgError, "too many arguments"); \
}

VALUE
rb_dlcfunc_call(VALUE self, VALUE ary)
{
    struct cfunc_data *cfunc;
    int i;
    DLSTACK_TYPE stack[DLSTACK_SIZE];
    VALUE result = Qnil;

    rb_secure_update(self);

    memset(stack, 0, sizeof(DLSTACK_TYPE) * DLSTACK_SIZE);
    Check_Type(ary, T_ARRAY);

    Data_Get_Struct(self, struct cfunc_data, cfunc);

    if( cfunc->ptr == 0 ){
        rb_raise(rb_eDLError, "can't call null-function");
        return Qnil;
    }

    for( i = 0; i < RARRAY(ary)->len; i++ ){
        if( i >= DLSTACK_SIZE ){
            rb_raise(rb_eDLError, "too many arguments (stack overflow)");
        }
        stack[i] = NUM2LONG(RARRAY(ary)->ptr[i]);
    }

    /* calltype == CFUNC_CDECL */
    if( cfunc->calltype == CFUNC_CDECL ){
        switch( cfunc->type ){
        case DLTYPE_VOID:
#define CASE(n) case n: { \
            DECL_FUNC(f,void,DLSTACK_PROTO##n,cdecl) = cfunc->ptr; \
            f(DLSTACK_ARGS##n(stack)); \
            result = Qnil; \
}
            CALL_CASE;
#undef CASE
            break;
        case DLTYPE_VOIDP:
#define CASE(n) case n: { \
            DECL_FUNC(f,void*,DLSTACK_PROTO##n,cdecl) = cfunc->ptr; \
            void * ret; \
            ret = f(DLSTACK_ARGS##n(stack)); \
            result = PTR2NUM(ret); \
}
            CALL_CASE;
#undef CASE
            break;
        case DLTYPE_CHAR:
#define CASE(n) case n: { \
            DECL_FUNC(f,char,DLSTACK_PROTO##n,cdecl) = cfunc->ptr; \
            char ret; \
            ret = f(DLSTACK_ARGS##n(stack)); \
            result = CHR2FIX(ret); \
}
            CALL_CASE;
#undef CASE
            break;
        case DLTYPE_SHORT:
#define CASE(n) case n: { \
            DECL_FUNC(f,short,DLSTACK_PROTO##n,cdecl) = cfunc->ptr; \
            short ret; \
            ret = f(DLSTACK_ARGS##n(stack)); \
            result = INT2NUM((int)ret); \
}
            CALL_CASE;
#undef CASE
            break;
        case DLTYPE_INT:
#define CASE(n) case n: { \
            DECL_FUNC(f,int,DLSTACK_PROTO##n,cdecl) = cfunc->ptr; \
            int ret; \
            ret = f(DLSTACK_ARGS##n(stack)); \
            result = INT2NUM(ret); \
}
            CALL_CASE;
#undef CASE
            break;
        case DLTYPE_LONG:
#define CASE(n) case n: { \
            DECL_FUNC(f,long,DLSTACK_PROTO##n,cdecl) = cfunc->ptr; \
            long ret; \
            ret = f(DLSTACK_ARGS##n(stack)); \
            result = LONG2NUM(ret); \
}
            CALL_CASE;
#undef CASE
            break;
#if HAVE_LONG_LONG  /* used in ruby.h */
        case DLTYPE_LONG_LONG:
#define CASE(n) case n: { \
            DECL_FUNC(f,LONG_LONG,DLSTACK_PROTO,cdecl) = cfunc->ptr; \
            LONG_LONG ret; \
            ret = f(DLSTACK_ARGS(stack)); \
            result = LL2NUM(ret); \
}
            CALL_CASE;
#undef CASE
            break;
#endif
        case DLTYPE_FLOAT:
#define CASE(n) case n: { \
            DECL_FUNC(f,float,DLSTACK_PROTO,cdecl) = cfunc->ptr; \
            float ret; \
            ret = f(DLSTACK_ARGS(stack)); \
            result = rb_float_new(ret); \
}
            CALL_CASE;
#undef CASE
            break;
        case DLTYPE_DOUBLE:
#define CASE(n) case n: { \
            DECL_FUNC(f,double,DLSTACK_PROTO,cdecl) = cfunc->ptr; \
            double ret; \
            ret = f(DLSTACK_ARGS(stack)); \
            result = rb_float_new(ret); \
}
            CALL_CASE;
#undef CASE
            break;
        default:
            rb_raise(rb_eDLTypeError, "unknown type %d", cfunc->type);
        }
    }
    else if( cfunc->calltype == CFUNC_STDCALL ){
        /* calltype == CFUNC_STDCALL */
        switch( cfunc->type ){
        case DLTYPE_VOID:
#define CASE(n) case n: { \
            DECL_FUNC(f,void,DLSTACK_PROTO##n,stdcall) = cfunc->ptr; \
            f(DLSTACK_ARGS##n(stack)); \
            result = Qnil; \
}
            CALL_CASE;
#undef CASE
            break;
        case DLTYPE_VOIDP:
#define CASE(n) case n: { \
            DECL_FUNC(f,void*,DLSTACK_PROTO##n,stdcall) = cfunc->ptr; \
            void * ret; \
            ret = f(DLSTACK_ARGS##n(stack)); \
            result = PTR2NUM(ret); \
}
            CALL_CASE;
#undef CASE
            break;
        case DLTYPE_CHAR:
#define CASE(n) case n: { \
            DECL_FUNC(f,char,DLSTACK_PROTO##n,stdcall) = cfunc->ptr; \
            char ret; \
            ret = f(DLSTACK_ARGS##n(stack)); \
            result = CHR2FIX(ret); \
}
            CALL_CASE;
#undef CASE
            break;
        case DLTYPE_SHORT:
#define CASE(n) case n: { \
            DECL_FUNC(f,short,DLSTACK_PROTO##n,stdcall) = cfunc->ptr; \
            short ret; \
            ret = f(DLSTACK_ARGS##n(stack)); \
            result = INT2NUM((int)ret); \
}
            CALL_CASE;
#undef CASE
            break;
        case DLTYPE_INT:
#define CASE(n) case n: { \
            DECL_FUNC(f,int,DLSTACK_PROTO##n,stdcall) = cfunc->ptr; \
            int ret; \
            ret = f(DLSTACK_ARGS##n(stack)); \
            result = INT2NUM(ret); \
}
            CALL_CASE;
#undef CASE
            break;
        case DLTYPE_LONG:
#define CASE(n) case n: { \
            DECL_FUNC(f,long,DLSTACK_PROTO##n,stdcall) = cfunc->ptr; \
            long ret; \
            ret = f(DLSTACK_ARGS##n(stack)); \
            result = LONG2NUM(ret); \
}
            CALL_CASE;
#undef CASE
            break;
#if HAVE_LONG_LONG  /* used in ruby.h */
        case DLTYPE_LONG_LONG:
#define CASE(n) case n: { \
            DECL_FUNC(f,LONG_LONG,DLSTACK_PROTO,stdcall) = cfunc->ptr; \
            LONG_LONG ret; \
            ret = f(DLSTACK_ARGS(stack)); \
            result = LL2NUM(ret); \
}
            CALL_CASE;
#undef CASE
            break;
#endif
        case DLTYPE_FLOAT:
#define CASE(n) case n: { \
            DECL_FUNC(f,float,DLSTACK_PROTO,stdcall) = cfunc->ptr; \
            float ret; \
            ret = f(DLSTACK_ARGS(stack)); \
            result = rb_float_new(ret); \
}
            CALL_CASE;
#undef CASE
            break;
        case DLTYPE_DOUBLE:
#define CASE(n) case n: { \
            DECL_FUNC(f,double,DLSTACK_PROTO,stdcall) = cfunc->ptr; \
            double ret; \
            ret = f(DLSTACK_ARGS(stack)); \
            result = rb_float_new(ret); \
}
            CALL_CASE;
#undef CASE
            break;
        default:
            rb_raise(rb_eDLTypeError, "unknown type %d", cfunc->type);
        }
    }
    else{
        rb_raise(rb_eDLError, "unsupported call type: %x", cfunc->calltype);
    }

    rb_dl_set_last_error(self, INT2NUM(errno));
#if defined(HAVE_WINDOWS_H)
    rb_dl_set_win32_last_error(self, INT2NUM(GetLastError()));
#endif

    return result;
}

VALUE
rb_dlcfunc_to_i(VALUE self)
{
  struct cfunc_data *cfunc;

  Data_Get_Struct(self, struct cfunc_data, cfunc);
  return PTR2NUM(cfunc->ptr);
}

void
Init_dlcfunc()
{
    id_last_error = rb_intern("__DL2_LAST_ERROR__");
#if defined(HAVE_WINDOWS_H)
    id_win32_last_error = rb_intern("__DL2_WIN32_LAST_ERROR__");
#endif
    rb_cDLCFunc = rb_define_class_under(rb_mDL, "CFunc", rb_cObject);
    rb_define_alloc_func(rb_cDLCFunc, rb_dlcfunc_s_allocate);
    rb_define_module_function(rb_cDLCFunc, "last_error", rb_dl_get_last_error, 0);
#if defined(HAVE_WINDOWS_H)
    rb_define_module_function(rb_cDLCFunc, "win32_last_error", rb_dl_get_win32_last_error, 0);
#endif
    rb_define_method(rb_cDLCFunc, "initialize", rb_dlcfunc_initialize, -1);
    rb_define_method(rb_cDLCFunc, "call", rb_dlcfunc_call, 1);
    rb_define_method(rb_cDLCFunc, "[]",   rb_dlcfunc_call, 1);
    rb_define_method(rb_cDLCFunc, "name", rb_dlcfunc_name, 0);
    rb_define_method(rb_cDLCFunc, "ctype", rb_dlcfunc_ctype, 0);
    rb_define_method(rb_cDLCFunc, "ctype=", rb_dlcfunc_set_ctype, 1);
    rb_define_method(rb_cDLCFunc, "calltype", rb_dlcfunc_calltype, 0);
    rb_define_method(rb_cDLCFunc, "calltype=", rb_dlcfunc_set_calltype, 1);
    rb_define_method(rb_cDLCFunc, "ptr",  rb_dlcfunc_ptr, 0);
    rb_define_method(rb_cDLCFunc, "ptr=", rb_dlcfunc_set_ptr, 1);
    rb_define_method(rb_cDLCFunc, "inspect", rb_dlcfunc_inspect, 0);
    rb_define_method(rb_cDLCFunc, "to_s", rb_dlcfunc_inspect, 0);
    rb_define_method(rb_cDLCFunc, "to_i", rb_dlcfunc_to_i, 0);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/dl/cptr.c

root/ext/dl/cptr.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. dlptr_free
  2. dlptr_mark
  3. dlptr_init
  4. rb_dlptr_new2
  5. rb_dlptr_new
  6. rb_dlptr_malloc
  7. rb_dlptr2cptr
  8. rb_dlptr_s_allocate
  9. rb_dlptr_initialize
  10. rb_dlptr_s_malloc
  11. rb_dlptr_to_i
  12. rb_dlptr_to_value
  13. rb_dlptr_ptr
  14. rb_dlptr_ref
  15. rb_dlptr_null_p
  16. rb_dlptr_free_set
  17. rb_dlptr_free_get
  18. rb_dlptr_to_s
  19. rb_dlptr_to_str
  20. rb_dlptr_inspect
  21. rb_dlptr_eql
  22. rb_dlptr_cmp
  23. rb_dlptr_plus
  24. rb_dlptr_minus
  25. rb_dlptr_aref
  26. rb_dlptr_aset
  27. rb_dlptr_size
  28. rb_dlptr_s_to_ptr
  29. Init_dlptr
/* -*- C -*-
 * $Id: cptr.c,v 1.7 2005/09/29 01:28:56 akr Exp $
 */

#include <ruby.h>
#include <rubyio.h>
#include <ctype.h>
#include <version.h> /* for ruby version code */
#include "dl.h"

VALUE rb_cDLCPtr;

static ID id_to_ptr;

static void
dlptr_free(struct ptr_data *data)
{
  if (data->ptr) {
      if (data->free) {
          (*(data->free))(data->ptr);
      }
  }
}

static void
dlptr_mark(struct ptr_data *data)
{
}

void
dlptr_init(VALUE val)
{
  struct ptr_data *data;

  Data_Get_Struct(val, struct ptr_data, data);
  OBJ_TAINT(val);
}

VALUE
rb_dlptr_new2(VALUE klass, void *ptr, long size, freefunc_t func)
{
  struct ptr_data *data;
  VALUE val;

  rb_secure(4);
  val = Data_Make_Struct(klass, struct ptr_data,
                         0, dlptr_free, data);
  data->ptr = ptr;
  data->free = func;
  data->size = size;
  dlptr_init(val);

  return val;
}

VALUE
rb_dlptr_new(void *ptr, long size, freefunc_t func)
{
  return rb_dlptr_new2(rb_cDLCPtr, ptr, size, func);
}

VALUE
rb_dlptr_malloc(long size, freefunc_t func)
{
  void *ptr;

  rb_secure(4);
  ptr = ruby_xmalloc((size_t)size);
  memset(ptr,0,(size_t)size);
  return rb_dlptr_new(ptr, size, func);
}

void *
rb_dlptr2cptr(VALUE val)
{
  struct ptr_data *data;
  void *ptr;

  if (rb_obj_is_kind_of(val, rb_cDLCPtr)) {
    Data_Get_Struct(val, struct ptr_data, data);
    ptr = data->ptr;
  }
  else if (val == Qnil) {
    ptr = NULL;
  }
  else{
    rb_raise(rb_eTypeError, "DL::PtrData was expected");
  }

  return ptr;
}

static VALUE
rb_dlptr_s_allocate(VALUE klass)
{
  VALUE obj;
  struct ptr_data *data;

  rb_secure(4);
  obj = Data_Make_Struct(klass, struct ptr_data, dlptr_mark, dlptr_free, data);
  data->ptr = 0;
  data->size = 0;
  data->free = 0;

  return obj;
}

static VALUE
rb_dlptr_initialize(int argc, VALUE argv[], VALUE self)
{
  VALUE ptr, sym, size;
  struct ptr_data *data;
  void *p = NULL;
  freefunc_t f = NULL;
  long s = 0;

  switch (rb_scan_args(argc, argv, "12", &ptr, &size, &sym)) {
  case 1:
    p = (void*)(NUM2PTR(rb_Integer(ptr)));
    break;
  case 2:
    p = (void*)(NUM2PTR(rb_Integer(ptr)));
    s = NUM2LONG(size);
    break;
  case 3:
    p = (void*)(NUM2PTR(rb_Integer(ptr)));
    s = NUM2LONG(size);
    f = NIL_P(sym) ? NULL : RCFUNC_DATA(sym)->ptr;
    break;
  default:
    rb_bug("rb_dlptr_initialize");
  }

  if (p) {
    Data_Get_Struct(self, struct ptr_data, data);
    if (data->ptr && data->free) {
      /* Free previous memory. Use of inappropriate initialize may cause SEGV. */
      (*(data->free))(data->ptr);
    }
    data->ptr  = p;
    data->size = s;
    data->free = f;
  }

  return Qnil;
}

static VALUE
rb_dlptr_s_malloc(int argc, VALUE argv[], VALUE klass)
{
  VALUE size, sym, obj;
  int   s;
  freefunc_t f;

  switch (rb_scan_args(argc, argv, "11", &size, &sym)) {
  case 1:
    s = NUM2LONG(size);
    f = NULL;
    break;
  case 2:
    s = NUM2LONG(size);
    f = RCFUNC_DATA(sym)->ptr;
    break;
  default:
    rb_bug("rb_dlptr_s_malloc");
  }

  obj = rb_dlptr_malloc(s,f);

  return obj;
}

VALUE
rb_dlptr_to_i(VALUE self)
{
  struct ptr_data *data;

  Data_Get_Struct(self, struct ptr_data, data);
  return PTR2NUM(data->ptr);
}

VALUE
rb_dlptr_to_value(VALUE self)
{
    struct ptr_data *data;
    Data_Get_Struct(self, struct ptr_data, data);
    return (VALUE)(data->ptr);
}

VALUE
rb_dlptr_ptr(VALUE self)
{
  struct ptr_data *data;

  Data_Get_Struct(self, struct ptr_data, data);
  return rb_dlptr_new(*((void**)(data->ptr)),0,0);
}

VALUE
rb_dlptr_ref(VALUE self)
{
  struct ptr_data *data;

  Data_Get_Struct(self, struct ptr_data, data);
  return rb_dlptr_new(&(data->ptr),0,0);
}

VALUE
rb_dlptr_null_p(VALUE self)
{
  struct ptr_data *data;

  Data_Get_Struct(self, struct ptr_data, data);
  return data->ptr ? Qfalse : Qtrue;
}

VALUE
rb_dlptr_free_set(VALUE self, VALUE val)
{
  struct ptr_data *data;
  extern VALUE rb_cDLCFunc;

  Data_Get_Struct(self, struct ptr_data, data);
  if( rb_obj_is_kind_of(val, rb_cDLCFunc) == Qtrue ){
      data->free = RCFUNC_DATA(val)->ptr;
  }
  else{
      data->free = NUM2PTR(rb_Integer(val));
  }

  return Qnil;
}

VALUE
rb_dlptr_free_get(VALUE self)
{
  struct ptr_data *pdata;

  Data_Get_Struct(self, struct ptr_data, pdata);

  return rb_dlcfunc_new(pdata->free, DLTYPE_VOID, "free<anonymous>", CFUNC_CDECL);
}

VALUE
rb_dlptr_to_s(int argc, VALUE argv[], VALUE self)
{
  struct ptr_data *data;
  VALUE arg1, val;
  int len;

  Data_Get_Struct(self, struct ptr_data, data);
  switch (rb_scan_args(argc, argv, "01", &arg1)) {
  case 0:
    val = rb_tainted_str_new2((char*)(data->ptr));
    break;
  case 1:
    len = NUM2INT(arg1);
    val = rb_tainted_str_new((char*)(data->ptr), len);
    break;
  default:
    rb_bug("rb_dlptr_to_s");
  }

  return val;
}

VALUE
rb_dlptr_to_str(int argc, VALUE argv[], VALUE self)
{
  struct ptr_data *data;
  VALUE arg1, val;
  int len;

  Data_Get_Struct(self, struct ptr_data, data);
  switch (rb_scan_args(argc, argv, "01", &arg1)) {
  case 0:
    val = rb_tainted_str_new((char*)(data->ptr),data->size);
    break;
  case 1:
    len = NUM2INT(arg1);
    val = rb_tainted_str_new((char*)(data->ptr), len);
    break;
  default:
    rb_bug("rb_dlptr_to_str");
  }

  return val;
}

VALUE
rb_dlptr_inspect(VALUE self)
{
  struct ptr_data *data;
  char str[1024];

  Data_Get_Struct(self, struct ptr_data, data);
  snprintf(str, 1023, "#<%s:%p ptr=%p size=%ld free=%p>",
           rb_class2name(CLASS_OF(self)), data, data->ptr, data->size, data->free);
  return rb_str_new2(str);
}

VALUE
rb_dlptr_eql(VALUE self, VALUE other)
{
  void *ptr1, *ptr2;
  ptr1 = rb_dlptr2cptr(self);
  ptr2 = rb_dlptr2cptr(other);

  return ptr1 == ptr2 ? Qtrue : Qfalse;
}

VALUE
rb_dlptr_cmp(VALUE self, VALUE other)
{
  void *ptr1, *ptr2;
  ptr1 = rb_dlptr2cptr(self);
  ptr2 = rb_dlptr2cptr(other);
  return PTR2NUM((long)ptr1 - (long)ptr2);
}

VALUE
rb_dlptr_plus(VALUE self, VALUE other)
{
  void *ptr;
  long num, size;

  ptr = rb_dlptr2cptr(self);
  size = RPTR_DATA(self)->size;
  num = NUM2LONG(other);
  return rb_dlptr_new((char *)ptr + num, size - num, 0);
}

VALUE
rb_dlptr_minus(VALUE self, VALUE other)
{
  void *ptr;
  long num, size;

  ptr = rb_dlptr2cptr(self);
  size = RPTR_DATA(self)->size;
  num = NUM2LONG(other);
  return rb_dlptr_new((char *)ptr - num, size + num, 0);
}

VALUE
rb_dlptr_aref(int argc, VALUE argv[], VALUE self)
{
    VALUE arg0, arg1;
    VALUE retval = Qnil;
    size_t offset, len;

    switch( rb_scan_args(argc, argv, "11", &arg0, &arg1) ){
    case 1:
        offset = NUM2ULONG(arg0);
        retval = INT2NUM(*((char*)RPTR_DATA(self)->ptr + offset));
        break;
    case 2:
        offset = NUM2ULONG(arg0);
        len    = NUM2ULONG(arg1);
        retval = rb_tainted_str_new((char *)RPTR_DATA(self)->ptr + offset, len);
        break;
    default:
        rb_bug("rb_dlptr_aref()");
    }
    return retval;
}

VALUE
rb_dlptr_aset(int argc, VALUE argv[], VALUE self)
{
    VALUE arg0, arg1, arg2;
    VALUE retval = Qnil;
    size_t offset, len;
    void *mem;

    switch( rb_scan_args(argc, argv, "21", &arg0, &arg1, &arg2) ){
    case 2:
        offset = NUM2ULONG(arg0);
        ((char*)RPTR_DATA(self)->ptr)[offset] = NUM2UINT(arg1);
        retval = arg1;
        break;
    case 3:
        offset = NUM2ULONG(arg0);
        len    = NUM2ULONG(arg1);
        if( TYPE(arg2) == T_STRING ){
            mem = StringValuePtr(arg2);
        }
        else if( rb_obj_is_kind_of(arg2, rb_cDLCPtr) ){
            mem = rb_dlptr2cptr(arg2);
        }
        else{
            mem    = NUM2PTR(arg2);
        }
        memcpy((char *)RPTR_DATA(self)->ptr + offset, mem, len);
        retval = arg2;
        break;
    default:
        rb_bug("rb_dlptr_aset()");
    }
    return retval;
}

VALUE
rb_dlptr_size(int argc, VALUE argv[], VALUE self)
{
  VALUE size;

  if (rb_scan_args(argc, argv, "01", &size) == 0){
    return LONG2NUM(RPTR_DATA(self)->size);
  }
  else{
    RPTR_DATA(self)->size = NUM2LONG(size);
    return size;
  }
}

VALUE
rb_dlptr_s_to_ptr(VALUE self, VALUE val)
{
    if( rb_obj_is_kind_of(val, rb_cIO) == Qtrue ){
        OpenFile *fptr;
        FILE *fp;
        GetOpenFile(val, fptr);
#if RUBY_VERSION_CODE >= 190
        fp = rb_io_stdio_file(fptr);
#else
        fp = fptr->f;
#endif
        return rb_dlptr_new(fp, 0, NULL);
    }
    else if( rb_obj_is_kind_of(val, rb_cString) == Qtrue ){
        char *ptr = StringValuePtr(val);
        return rb_dlptr_new(ptr, RSTRING(val)->len, NULL);
    }
    else if( rb_respond_to(val, id_to_ptr) ){
        VALUE vptr = rb_funcall(val, id_to_ptr, 0);
        if( rb_obj_is_kind_of(vptr, rb_cDLCPtr) ){
            return vptr;
        }
        else{
            rb_raise(rb_eDLError, "to_ptr should return a CPtr object");
        }
    }
    else{
        return rb_dlptr_new(NUM2PTR(rb_Integer(val)), 0, NULL);
    }
}

void
Init_dlptr()
{
    id_to_ptr = rb_intern("to_ptr");

    rb_cDLCPtr = rb_define_class_under(rb_mDL, "CPtr", rb_cObject);
    rb_define_alloc_func(rb_cDLCPtr, rb_dlptr_s_allocate);
    rb_define_singleton_method(rb_cDLCPtr, "malloc", rb_dlptr_s_malloc, -1);
    rb_define_singleton_method(rb_cDLCPtr, "to_ptr", rb_dlptr_s_to_ptr, 1);
    rb_define_singleton_method(rb_cDLCPtr, "[]", rb_dlptr_s_to_ptr, 1);
    rb_define_method(rb_cDLCPtr, "initialize", rb_dlptr_initialize, -1);
    rb_define_method(rb_cDLCPtr, "free=", rb_dlptr_free_set, 1);
    rb_define_method(rb_cDLCPtr, "free",  rb_dlptr_free_get, 0);
    rb_define_method(rb_cDLCPtr, "to_i",  rb_dlptr_to_i, 0);
    rb_define_method(rb_cDLCPtr, "to_value",  rb_dlptr_to_value, 0);
    rb_define_method(rb_cDLCPtr, "ptr",   rb_dlptr_ptr, 0);
    rb_define_method(rb_cDLCPtr, "+@", rb_dlptr_ptr, 0);
    rb_define_method(rb_cDLCPtr, "ref",   rb_dlptr_ref, 0);
    rb_define_method(rb_cDLCPtr, "-@", rb_dlptr_ref, 0);
    rb_define_method(rb_cDLCPtr, "null?", rb_dlptr_null_p, 0);
    rb_define_method(rb_cDLCPtr, "to_s", rb_dlptr_to_s, -1);
    rb_define_method(rb_cDLCPtr, "to_str", rb_dlptr_to_str, -1);
    rb_define_method(rb_cDLCPtr, "inspect", rb_dlptr_inspect, 0);
    rb_define_method(rb_cDLCPtr, "<=>", rb_dlptr_cmp, 1);
    rb_define_method(rb_cDLCPtr, "==", rb_dlptr_eql, 1);
    rb_define_method(rb_cDLCPtr, "eql?", rb_dlptr_eql, 1);
    rb_define_method(rb_cDLCPtr, "+", rb_dlptr_plus, 1);
    rb_define_method(rb_cDLCPtr, "-", rb_dlptr_minus, 1);
    rb_define_method(rb_cDLCPtr, "[]", rb_dlptr_aref, -1);
    rb_define_method(rb_cDLCPtr, "[]=", rb_dlptr_aset, -1);
    rb_define_method(rb_cDLCPtr, "size", rb_dlptr_size, -1);
    rb_define_method(rb_cDLCPtr, "size=", rb_dlptr_size, -1);

    rb_define_const(rb_mDL, "NULL", rb_dlptr_new(0, 0, 0));
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/dl/dl.c

root/ext/dl/dl.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. rb_dl_dlopen
  2. rb_dl_malloc
  3. rb_dl_realloc
  4. rb_dl_free
  5. rb_dl_ptr2value
  6. rb_dl_value2ptr
  7. Init_dl
#include <ruby.h>
#include <rubyio.h>
#include <version.h>
#include <ctype.h>
#include "dl.h"

VALUE rb_mDL;
VALUE rb_eDLError;
VALUE rb_eDLTypeError;

ID rbdl_id_cdecl;
ID rbdl_id_stdcall;

VALUE
rb_dl_dlopen(int argc, VALUE argv[], VALUE self)
{
    rb_secure(2);
    return rb_class_new_instance(argc, argv, rb_cDLHandle);
}

VALUE
rb_dl_malloc(VALUE self, VALUE size)
{
    void *ptr;

    ptr = (void*)ruby_xmalloc(NUM2INT(size));
    return PTR2NUM(ptr);
}

VALUE
rb_dl_realloc(VALUE self, VALUE addr, VALUE size)
{
    void *ptr = NUM2PTR(addr);

    ptr = (void*)ruby_xrealloc(ptr, NUM2INT(size));
    return PTR2NUM(ptr);
}

VALUE
rb_dl_free(VALUE self, VALUE addr)
{
    void *ptr = NUM2PTR(addr);
    ruby_xfree(ptr);
    return Qnil;
}

VALUE
rb_dl_ptr2value(VALUE self, VALUE addr)
{
    return (VALUE)NUM2PTR(addr);
}

VALUE
rb_dl_value2ptr(VALUE self, VALUE val)
{
    return PTR2NUM((void*)val);
}

#if defined(__GNUC__)
# define PRE_DECL_CDECL     __attribute__((cdecl))
# define PRE_DECL_STDCALL   __attribute__((stdcall))
# define MIDST_DECL_CDECL
# define MIDST_DECL_STDCALL
# define POST_DECL_CDECL
# define POST_DECL_STDCALL
#elif defined(_MSC_VER) || defined(__BORLANDC__)
# define PRE_DECL_CDECL
# define PRE_DECL_STDCALL
# define MIDST_DECL_CDECL     __cdecl
# define MIDST_DECL_STDCALL   __stdcall
# define POST_DECL_CDECL
# define POST_DECL_STDCALL
#else
# error "unsupported compiler"
#endif

#include "callback.h"

void
Init_dl()
{
    void Init_dlhandle();
    void Init_dlcfunc();
    void Init_dlptr();

    rbdl_id_cdecl = rb_intern("cdecl");
    rbdl_id_stdcall = rb_intern("stdcall");

    rb_mDL = rb_define_module("DL");
    rb_eDLError = rb_define_class_under(rb_mDL, "DLError", rb_eStandardError);
    rb_eDLTypeError = rb_define_class_under(rb_mDL, "DLTypeError", rb_eDLError);

    rb_define_const(rb_mDL, "MAX_CALLBACK", INT2NUM(MAX_CALLBACK));
    rb_define_const(rb_mDL, "DLSTACK_SIZE", INT2NUM(DLSTACK_SIZE));

    rb_dl_init_callbacks();

    rb_define_const(rb_mDL, "RTLD_GLOBAL", INT2NUM(RTLD_GLOBAL));
    rb_define_const(rb_mDL, "RTLD_LAZY",   INT2NUM(RTLD_LAZY));
    rb_define_const(rb_mDL, "RTLD_NOW",    INT2NUM(RTLD_NOW));

    rb_define_const(rb_mDL, "TYPE_VOID",  INT2NUM(DLTYPE_VOID));
    rb_define_const(rb_mDL, "TYPE_VOIDP",  INT2NUM(DLTYPE_VOIDP));
    rb_define_const(rb_mDL, "TYPE_CHAR",  INT2NUM(DLTYPE_CHAR));
    rb_define_const(rb_mDL, "TYPE_SHORT",  INT2NUM(DLTYPE_SHORT));
    rb_define_const(rb_mDL, "TYPE_INT",  INT2NUM(DLTYPE_INT));
    rb_define_const(rb_mDL, "TYPE_LONG",  INT2NUM(DLTYPE_LONG));
#if HAVE_LONG_LONG
    rb_define_const(rb_mDL, "TYPE_LONG_LONG",  INT2NUM(DLTYPE_LONG_LONG));
#endif
    rb_define_const(rb_mDL, "TYPE_FLOAT",  INT2NUM(DLTYPE_FLOAT));
    rb_define_const(rb_mDL, "TYPE_DOUBLE",  INT2NUM(DLTYPE_DOUBLE));

    rb_define_const(rb_mDL, "ALIGN_VOIDP", INT2NUM(ALIGN_VOIDP));
    rb_define_const(rb_mDL, "ALIGN_CHAR",  INT2NUM(ALIGN_CHAR));
    rb_define_const(rb_mDL, "ALIGN_SHORT", INT2NUM(ALIGN_SHORT));
    rb_define_const(rb_mDL, "ALIGN_INT",   INT2NUM(ALIGN_INT));
    rb_define_const(rb_mDL, "ALIGN_LONG",  INT2NUM(ALIGN_LONG));
#if HAVE_LONG_LONG
    rb_define_const(rb_mDL, "ALIGN_LONG_LONG",  INT2NUM(ALIGN_LONG_LONG));
#endif
    rb_define_const(rb_mDL, "ALIGN_FLOAT", INT2NUM(ALIGN_FLOAT));
    rb_define_const(rb_mDL, "ALIGN_DOUBLE",INT2NUM(ALIGN_DOUBLE));

    rb_define_const(rb_mDL, "SIZEOF_VOIDP", INT2NUM(sizeof(void*)));
    rb_define_const(rb_mDL, "SIZEOF_CHAR",  INT2NUM(sizeof(char)));
    rb_define_const(rb_mDL, "SIZEOF_SHORT", INT2NUM(sizeof(short)));
    rb_define_const(rb_mDL, "SIZEOF_INT",   INT2NUM(sizeof(int)));
    rb_define_const(rb_mDL, "SIZEOF_LONG",  INT2NUM(sizeof(long)));
#if HAVE_LONG_LONG
    rb_define_const(rb_mDL, "SIZEOF_LONG_LONG",  INT2NUM(sizeof(LONG_LONG)));
#endif
    rb_define_const(rb_mDL, "SIZEOF_FLOAT", INT2NUM(sizeof(float)));
    rb_define_const(rb_mDL, "SIZEOF_DOUBLE",INT2NUM(sizeof(double)));

    rb_define_module_function(rb_mDL, "dlwrap", rb_dl_value2ptr, 1);
    rb_define_module_function(rb_mDL, "dlunwrap", rb_dl_ptr2value, 1);

    rb_define_module_function(rb_mDL, "dlopen", rb_dl_dlopen, -1);
    rb_define_module_function(rb_mDL, "malloc", rb_dl_malloc, 1);
    rb_define_module_function(rb_mDL, "realloc", rb_dl_realloc, 2);
    rb_define_module_function(rb_mDL, "free", rb_dl_free, 1);

    rb_define_const(rb_mDL, "RUBY_FREE", PTR2NUM(ruby_xfree));
    rb_define_const(rb_mDL, "BUILD_RUBY_PLATFORM", rb_str_new2(RUBY_PLATFORM));
    rb_define_const(rb_mDL, "BUILD_RUBY_VERSION",  rb_str_new2(RUBY_VERSION));

    Init_dlhandle();
    Init_dlcfunc();
    Init_dlptr();
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/dl/dl.h

root/ext/dl/dl.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

#ifndef RUBY_DL_H
#define RUBY_DL_H

#include <ruby.h>

#if defined(HAVE_DLFCN_H)
# include <dlfcn.h>
# /* some stranger systems may not define all of these */
#ifndef RTLD_LAZY
#define RTLD_LAZY 0
#endif
#ifndef RTLD_GLOBAL
#define RTLD_GLOBAL 0
#endif
#ifndef RTLD_NOW
#define RTLD_NOW 0
#endif
#else
# if defined(HAVE_WINDOWS_H)
#   include <windows.h>
#   define dlclose(ptr) FreeLibrary((HINSTANCE)ptr)
#   define dlopen(name,flag) ((void*)LoadLibrary(name))
#   define dlerror()    "unknown error"
#   define dlsym(handle,name) ((void*)GetProcAddress(handle,name))
#   define RTLD_LAZY -1
#   define RTLD_NOW  -1
#   define RTLD_GLOBAL -1
# endif
#endif

#define MAX_CALLBACK 5
#define DLSTACK_TYPE long
#define DLSTACK_SIZE (20)
#define DLSTACK_PROTO \
    DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,\
    DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,\
    DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,\
    DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE,DLSTACK_TYPE
#define DLSTACK_ARGS(stack) \
    stack[0],stack[1],stack[2],stack[3],stack[4],\
    stack[5],stack[6],stack[7],stack[8],stack[9],\
    stack[10],stack[11],stack[12],stack[13],stack[14],\
    stack[15],stack[16],stack[17],stack[18],stack[19]

#define DLSTACK_PROTO0
#define DLSTACK_PROTO1 DLSTACK_TYPE
#define DLSTACK_PROTO2 DLSTACK_PROTO1, DLSTACK_TYPE
#define DLSTACK_PROTO3 DLSTACK_PROTO2, DLSTACK_TYPE
#define DLSTACK_PROTO4 DLSTACK_PROTO3, DLSTACK_TYPE
#define DLSTACK_PROTO4 DLSTACK_PROTO3, DLSTACK_TYPE
#define DLSTACK_PROTO5 DLSTACK_PROTO4, DLSTACK_TYPE
#define DLSTACK_PROTO6 DLSTACK_PROTO5, DLSTACK_TYPE
#define DLSTACK_PROTO7 DLSTACK_PROTO6, DLSTACK_TYPE
#define DLSTACK_PROTO8 DLSTACK_PROTO7, DLSTACK_TYPE
#define DLSTACK_PROTO9 DLSTACK_PROTO8, DLSTACK_TYPE
#define DLSTACK_PROTO10 DLSTACK_PROTO9, DLSTACK_TYPE
#define DLSTACK_PROTO11 DLSTACK_PROTO10, DLSTACK_TYPE
#define DLSTACK_PROTO12 DLSTACK_PROTO11, DLSTACK_TYPE
#define DLSTACK_PROTO13 DLSTACK_PROTO12, DLSTACK_TYPE
#define DLSTACK_PROTO14 DLSTACK_PROTO13, DLSTACK_TYPE
#define DLSTACK_PROTO14 DLSTACK_PROTO13, DLSTACK_TYPE
#define DLSTACK_PROTO15 DLSTACK_PROTO14, DLSTACK_TYPE
#define DLSTACK_PROTO16 DLSTACK_PROTO15, DLSTACK_TYPE
#define DLSTACK_PROTO17 DLSTACK_PROTO16, DLSTACK_TYPE
#define DLSTACK_PROTO18 DLSTACK_PROTO17, DLSTACK_TYPE
#define DLSTACK_PROTO19 DLSTACK_PROTO18, DLSTACK_TYPE
#define DLSTACK_PROTO20 DLSTACK_PROTO19, DLSTACK_TYPE

#define DLSTACK_ARGS0(stack)
#define DLSTACK_ARGS1(stack) stack[0]
#define DLSTACK_ARGS2(stack) DLSTACK_ARGS1(stack), stack[1]
#define DLSTACK_ARGS3(stack) DLSTACK_ARGS2(stack), stack[2]
#define DLSTACK_ARGS4(stack) DLSTACK_ARGS3(stack), stack[3]
#define DLSTACK_ARGS5(stack) DLSTACK_ARGS4(stack), stack[4]
#define DLSTACK_ARGS6(stack) DLSTACK_ARGS5(stack), stack[5]
#define DLSTACK_ARGS7(stack) DLSTACK_ARGS6(stack), stack[6]
#define DLSTACK_ARGS8(stack) DLSTACK_ARGS7(stack), stack[7]
#define DLSTACK_ARGS9(stack) DLSTACK_ARGS8(stack), stack[8]
#define DLSTACK_ARGS10(stack) DLSTACK_ARGS9(stack), stack[9]
#define DLSTACK_ARGS11(stack) DLSTACK_ARGS10(stack), stack[10]
#define DLSTACK_ARGS12(stack) DLSTACK_ARGS11(stack), stack[11]
#define DLSTACK_ARGS13(stack) DLSTACK_ARGS12(stack), stack[12]
#define DLSTACK_ARGS14(stack) DLSTACK_ARGS13(stack), stack[13]
#define DLSTACK_ARGS15(stack) DLSTACK_ARGS14(stack), stack[14]
#define DLSTACK_ARGS16(stack) DLSTACK_ARGS15(stack), stack[15]
#define DLSTACK_ARGS17(stack) DLSTACK_ARGS16(stack), stack[16]
#define DLSTACK_ARGS18(stack) DLSTACK_ARGS17(stack), stack[17]
#define DLSTACK_ARGS19(stack) DLSTACK_ARGS18(stack), stack[18]
#define DLSTACK_ARGS20(stack) DLSTACK_ARGS19(stack), stack[19]

extern VALUE rb_mDL;
extern VALUE rb_cDLHandle;
extern VALUE rb_cDLSymbol;
extern VALUE rb_eDLError;
extern VALUE rb_eDLTypeError;

typedef struct { char c; void *x; } s_voidp;
typedef struct { char c; short x; } s_short;
typedef struct { char c; int x; } s_int;
typedef struct { char c; long x; } s_long;
typedef struct { char c; float x; } s_float;
typedef struct { char c; double x; } s_double;
#if HAVE_LONG_LONG
typedef struct { char c; LONG_LONG x; } s_long_long;
#endif

#define ALIGN_VOIDP  (sizeof(s_voidp) - sizeof(void *))
#define ALIGN_SHORT  (sizeof(s_short) - sizeof(short))
#define ALIGN_CHAR   (1)
#define ALIGN_INT    (sizeof(s_int) - sizeof(int))
#define ALIGN_LONG   (sizeof(s_long) - sizeof(long))
#if HAVE_LONG_LONG
#define ALIGN_LONG_LONG (sizeof(s_long_long) - sizeof(LONG_LONG))
#endif
#define ALIGN_FLOAT  (sizeof(s_float) - sizeof(float))
#define ALIGN_DOUBLE (sizeof(s_double) - sizeof(double))

#define DLALIGN(ptr,offset,align) {\
  while( (((unsigned long)((char *)ptr + offset)) % align) != 0 ) offset++;\
}

#define DLTYPE_VOID  0
#define DLTYPE_VOIDP 1
#define DLTYPE_CHAR  2
#define DLTYPE_SHORT 3
#define DLTYPE_INT   4
#define DLTYPE_LONG  5
#if HAVE_LONG_LONG
#define DLTYPE_LONG_LONG 6
#endif
#define DLTYPE_FLOAT 7
#define DLTYPE_DOUBLE 8
#define MAX_DLTYPE 9

#if SIZEOF_VOIDP == SIZEOF_LONG
# define PTR2NUM(x)   (ULONG2NUM((unsigned long)(x)))
# define NUM2PTR(x)   ((void*)(NUM2ULONG(x)))
#else
/* # error --->> Ruby/DL2 requires sizeof(void*) == sizeof(long) to be compiled. <<--- */
# define PTR2NUM(x)   (ULL2NUM((unsigned long long)(x)))
# define NUM2PTR(x)   ((void*)(NUM2ULL(x)))
#endif

#define BOOL2INT(x)  ((x == Qtrue)?1:0)
#define INT2BOOL(x)  (x?Qtrue:Qfalse)

typedef void (*freefunc_t)(void*);

struct dl_handle {
    void *ptr;
    int  open;
    int  enable_close;
};

struct cfunc_data {
    void *ptr;
    char *name;
    int  type;
    ID   calltype;
};
extern ID rbdl_id_cdecl;
extern ID rbdl_id_stdcall;
#define CFUNC_CDECL   (rbdl_id_cdecl)
#define CFUNC_STDCALL (rbdl_id_stdcall)

struct ptr_data {
    void *ptr;
    long size;
    freefunc_t free;
};

#define RDL_HANDLE(obj) ((struct dl_handle *)(DATA_PTR(obj)))
#define RCFUNC_DATA(obj) ((struct cfunc_data *)(DATA_PTR(obj)))
#define RPTR_DATA(obj) ((struct ptr_data *)(DATA_PTR(obj)))

VALUE rb_dlcfunc_new(void (*func)(), int dltype, const char * name, ID calltype);
VALUE rb_dlptr_new(void *ptr, long size, freefunc_t func);
VALUE rb_dlptr_new2(VALUE klass, void *ptr, long size, freefunc_t func);
VALUE rb_dlptr_malloc(long size, freefunc_t func);

#endif
/* [<][>][^][v][top][bottom][index] [help] */


ext/dl/handle.c

root/ext/dl/handle.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. dlhandle_free
  2. rb_dlhandle_close
  3. rb_dlhandle_s_allocate
  4. rb_dlhandle_initialize
  5. rb_dlhandle_enable_close
  6. rb_dlhandle_disable_close
  7. rb_dlhandle_to_i
  8. rb_dlhandle_sym
  9. Init_dlhandle
/* -*- C -*-
 * $Id: handle.c,v 1.19 2005/09/24 00:17:42 akr Exp $
 */

#include <ruby.h>
#include "dl.h"

VALUE rb_cDLHandle;

void
dlhandle_free(struct dl_handle *dlhandle)
{
  if( dlhandle->ptr && dlhandle->open && dlhandle->enable_close ){
    dlclose(dlhandle->ptr);
  }
}

VALUE
rb_dlhandle_close(VALUE self)
{
  struct dl_handle *dlhandle;

  Data_Get_Struct(self, struct dl_handle, dlhandle);
  dlhandle->open = 0;
  return INT2NUM(dlclose(dlhandle->ptr));
}

VALUE
rb_dlhandle_s_allocate(VALUE klass)
{
  VALUE obj;
  struct dl_handle *dlhandle;

  obj = Data_Make_Struct(rb_cDLHandle, struct dl_handle, 0,
                         dlhandle_free, dlhandle);
  dlhandle->ptr  = 0;
  dlhandle->open = 0;
  dlhandle->enable_close = 0;

  return obj;
}

VALUE
rb_dlhandle_initialize(int argc, VALUE argv[], VALUE self)
{
  void *ptr;
  struct dl_handle *dlhandle;
  VALUE lib, flag;
  char  *clib;
  int   cflag;
  const char *err;

  switch( rb_scan_args(argc, argv, "02", &lib, &flag) ){
  case 0:
    clib = NULL;
    cflag = RTLD_LAZY | RTLD_GLOBAL;
    break;
  case 1:
    clib = NIL_P(lib) ? NULL : StringValuePtr(lib);
    cflag = RTLD_LAZY | RTLD_GLOBAL;
    break;
  case 2:
    clib = NIL_P(lib) ? NULL : StringValuePtr(lib);
    cflag = NUM2INT(flag);
    break;
  default:
    rb_bug("rb_dlhandle_new");
  }

  ptr = dlopen(clib, cflag);
#if defined(HAVE_DLERROR)
  if( !ptr && (err = dlerror()) ){
    rb_raise(rb_eDLError, err);
  }
#else
  if( !ptr ){
    err = dlerror();
    rb_raise(rb_eDLError, err);
  }
#endif
  Data_Get_Struct(self, struct dl_handle, dlhandle);
  if( dlhandle->ptr && dlhandle->open && dlhandle->enable_close ){
    dlclose(dlhandle->ptr);
  }
  dlhandle->ptr = ptr;
  dlhandle->open = 1;
  dlhandle->enable_close = 0;

  if( rb_block_given_p() ){
    rb_ensure(rb_yield, self, rb_dlhandle_close, self);
  }

  return Qnil;
}

VALUE
rb_dlhandle_enable_close(VALUE self)
{
  struct dl_handle *dlhandle;

  Data_Get_Struct(self, struct dl_handle, dlhandle);
  dlhandle->enable_close = 1;
  return Qnil;
}

VALUE
rb_dlhandle_disable_close(VALUE self)
{
  struct dl_handle *dlhandle;

  Data_Get_Struct(self, struct dl_handle, dlhandle);
  dlhandle->enable_close = 0;
  return Qnil;
}

VALUE
rb_dlhandle_to_i(VALUE self)
{
  struct dl_handle *dlhandle;

  Data_Get_Struct(self, struct dl_handle, dlhandle);
  return PTR2NUM(dlhandle);
}

VALUE
rb_dlhandle_sym(VALUE self, VALUE sym)
{
    void (*func)();
    struct dl_handle *dlhandle;
    void *handle;
    const char *name;
    const char *err;
    int i;

#if defined(HAVE_DLERROR)
# define CHECK_DLERROR if( err = dlerror() ){ func = 0; }
#else
# define CHECK_DLERROR
#endif

    rb_secure(2);

    if( sym == Qnil ){
#if defined(RTLD_NEXT)
        name = RTLD_NEXT;
#else
        name = NULL;
#endif
    }
    else{
        name = StringValuePtr(sym);
    }

    Data_Get_Struct(self, struct dl_handle, dlhandle);
    if( ! dlhandle->open ){
        rb_raise(rb_eDLError, "closed handle");
    }
    handle = dlhandle->ptr;

    func = dlsym(handle, name);
    CHECK_DLERROR;
    if( !func ){
#if defined(__CYGWIN__) || defined(WIN32) || defined(__MINGW32__)
        {
            int  len = strlen(name);
            char *name_a = (char*)xmalloc(len+2);
            strcpy(name_a, name);
            name_a[len]   = 'A';
            name_a[len+1] = '\0';
            func = dlsym(handle, name_a);
            xfree(name_a);
            CHECK_DLERROR;
            if( !func ){
                for( i = 0; i < 256; i += 4 ){
                    int  len = strlen(name);
                    char *name_n = (char*)xmalloc(len+5);
                    sprintf(name_n, "%s@%d%c", name, i, 0);
                    func = dlsym(handle, name_n);
                    xfree(name_n);
                    CHECK_DLERROR;
                    if( func )
                    {
                        break;
                    }
                }
                CHECK_DLERROR;
                if( !func ){
                    rb_raise(rb_eDLError, "unknown symbol \"%s\"", name);
                }
            }
        }
#else
        for( i = 0; i < 256; i += 4 ){
            int  len = strlen(name);
            char *name_n = (char*)xmalloc(len+4);
            sprintf(name_n, "%s@%d", name, i);
            func = dlsym(handle, name_n);
            xfree(name_n);
            CHECK_DLERROR;
            if( func ){
                break;
            }
        }
        CHECK_DLERROR;
        if( !func ){
            rb_raise(rb_eDLError, "unknown symbol \"%s\"", name);
        }
#endif
    }

    return PTR2NUM(func);
}

void
Init_dlhandle()
{
    rb_cDLHandle = rb_define_class_under(rb_mDL, "Handle", rb_cObject);
    rb_define_alloc_func(rb_cDLHandle, rb_dlhandle_s_allocate);
    rb_define_method(rb_cDLHandle, "initialize", rb_dlhandle_initialize, -1);
    rb_define_method(rb_cDLHandle, "to_i", rb_dlhandle_to_i, 0);
    rb_define_method(rb_cDLHandle, "close", rb_dlhandle_close, 0);
    rb_define_method(rb_cDLHandle, "sym",  rb_dlhandle_sym, 1);
    rb_define_method(rb_cDLHandle, "[]",  rb_dlhandle_sym,  1);
    rb_define_method(rb_cDLHandle, "disable_close", rb_dlhandle_disable_close, 0);
    rb_define_method(rb_cDLHandle, "enable_close", rb_dlhandle_enable_close, 0);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/etc/etc.c

root/ext/etc/etc.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. etc_getlogin
  2. safe_setup_str
  3. setup_passwd
  4. etc_getpwuid
  5. etc_getpwnam
  6. passwd_ensure
  7. passwd_iterate
  8. etc_passwd
  9. etc_setpwent
  10. etc_endpwent
  11. etc_getpwent
  12. setup_group
  13. etc_getgrgid
  14. etc_getgrnam
  15. group_ensure
  16. group_iterate
  17. etc_group
  18. etc_setgrent
  19. etc_endgrent
  20. etc_getgrent
  21. Init_etc
/************************************************

  etc.c -

  $Author: matz $
  $Date: 2005/12/12 00:35:07 $
  created at: Tue Mar 22 18:39:19 JST 1994

************************************************/

#include "ruby.h"

#include <sys/types.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#ifdef HAVE_GETPWENT
#include <pwd.h>
#endif

#ifdef HAVE_GETGRENT
#include <grp.h>
#endif

#ifndef HAVE_TYPE_UID_T
#define uid_t int
#endif

static VALUE sPasswd, sGroup;

#ifndef _WIN32
char *getenv();
#endif
char *getlogin();

/* Returns the short user name of the currently logged in user.
 *
 * e.g.
 *   Etc.getlogin -> 'guest'
 */
static VALUE
etc_getlogin(obj)
    VALUE obj;
{
    char *login;

    rb_secure(4);
#ifdef HAVE_GETLOGIN
    login = getlogin();
    if (!login) login = getenv("USER");
#else
    login = getenv("USER");
#endif

    if (login)
        return rb_tainted_str_new2(login);
    return Qnil;
}

#if defined(HAVE_GETPWENT) || defined(HAVE_GETGRENT)
static VALUE
safe_setup_str(str)
    const char *str;
{
    if (str == 0) str = "";
    return rb_tainted_str_new2(str);
}
#endif

#ifdef HAVE_GETPWENT
static VALUE
setup_passwd(pwd)
    struct passwd *pwd;
{
    if (pwd == 0) rb_sys_fail("/etc/passwd");
    return rb_struct_new(sPasswd,
                         safe_setup_str(pwd->pw_name),
#ifdef HAVE_ST_PW_PASSWD
                         safe_setup_str(pwd->pw_passwd),
#endif
                         INT2FIX(pwd->pw_uid),
                         INT2FIX(pwd->pw_gid),
#ifdef HAVE_ST_PW_GECOS
                         safe_setup_str(pwd->pw_gecos),
#endif
                         safe_setup_str(pwd->pw_dir),
                         safe_setup_str(pwd->pw_shell),
#ifdef HAVE_ST_PW_CHANGE
                         INT2FIX(pwd->pw_change),
#endif
#ifdef HAVE_ST_PW_QUOTA
                         INT2FIX(pwd->pw_quota),
#endif
#ifdef HAVE_ST_PW_AGE
                         PW_AGE2VAL(pwd->pw_age),
#endif
#ifdef HAVE_ST_PW_CLASS
                         safe_setup_str(pwd->pw_class),
#endif
#ifdef HAVE_ST_PW_COMMENT
                         safe_setup_str(pwd->pw_comment),
#endif
#ifdef HAVE_ST_PW_EXPIRE
                         INT2FIX(pwd->pw_expire),
#endif
                         0              /*dummy*/
        );
}
#endif

/* Returns the /etc/passwd information for the user with specified integer
 * user id (uid).
 *
 * The information is returned as a Struct::Passwd; see getpwent above for
 * details.
 *
 * e.g.  * Etc.getpwuid(0) -> #<struct Struct::Passwd name="root",
 * passwd="x", uid=0, gid=0, gecos="root",dir="/root", shell="/bin/bash">
 */
static VALUE
etc_getpwuid(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
#if defined(HAVE_GETPWENT)
    VALUE id;
    int uid;
    struct passwd *pwd;

    rb_secure(4);
    if (rb_scan_args(argc, argv, "01", &id) == 1) {
        uid = NUM2INT(id);
    }
    else {
        uid = getuid();
    }
    pwd = getpwuid(uid);
    if (pwd == 0) rb_raise(rb_eArgError, "can't find user for %d", uid);
    return setup_passwd(pwd);
#else
    return Qnil;
#endif
}

/* Returns the /etc/passwd information for the user with specified login name.
 *
 * The information is returned as a Struct::Passwd; see getpwent above for
 * details.
 *
 * e.g.  * Etc.getpwnam('root') -> #<struct Struct::Passwd name="root",
 * passwd="x", uid=0, gid=0, gecos="root",dir="/root", shell="/bin/bash">
 */
static VALUE
etc_getpwnam(obj, nam)
    VALUE obj, nam;
{
#ifdef HAVE_GETPWENT
    struct passwd *pwd;

    SafeStringValue(nam);
    pwd = getpwnam(RSTRING(nam)->ptr);
    if (pwd == 0) rb_raise(rb_eArgError, "can't find user for %s", RSTRING(nam)->ptr);
    return setup_passwd(pwd);
#else
    return Qnil;
#endif
}

#ifdef HAVE_GETPWENT
static int passwd_blocking = 0;
static VALUE
passwd_ensure()
{
    passwd_blocking = Qfalse;
    return Qnil;
}

static VALUE
passwd_iterate()
{
    struct passwd *pw;

    setpwent();
    while (pw = getpwent()) {
        rb_yield(setup_passwd(pw));
    }
    endpwent();
    return Qnil;
}
#endif

/* Provides a convenient Ruby iterator which executes a block for each entry
 * in the /etc/passwd file.
 *
 * The code block is passed an Etc::Passwd struct; see getpwent above for
 * details.
 *
 * Example:
 *
 *     require 'etc'
 *
 *     Etc.passwd {|u|
 *       puts u.name + " = " + u.gecos
 *     }
 *
 */
static VALUE
etc_passwd(obj)
    VALUE obj;
{
#ifdef HAVE_GETPWENT
    struct passwd *pw;

    rb_secure(4);
    if (rb_block_given_p()) {
        if (passwd_blocking) {
            rb_raise(rb_eRuntimeError, "parallel passwd iteration");
        }
        passwd_blocking = Qtrue;
        rb_ensure(passwd_iterate, 0, passwd_ensure, 0);
    }
    if (pw = getpwent()) {
        return setup_passwd(pw);
    }
#endif
    return Qnil;
}

/* Resets the process of reading the /etc/passwd file, so that the next call
 * to getpwent will return the first entry again.
 */
static VALUE
etc_setpwent(obj)
    VALUE obj;
{
#ifdef HAVE_GETPWENT
    setpwent();
#endif
    return Qnil;
}

/* Ends the process of scanning through the /etc/passwd file begun with
 * getpwent, and closes the file.
 */
static VALUE
etc_endpwent(obj)
    VALUE obj;
{
#ifdef HAVE_GETPWENT
    endpwent();
#endif
    return Qnil;
}

/* Returns an entry from the /etc/passwd file. The first time it is called it
 * opens the file and returns the first entry; each successive call returns
 * the next entry, or nil if the end of the file has been reached.
 *
 * To close the file when processing is complete, call endpwent.
 *
 * Each entry is returned as a Struct::Passwd:
 *
 * - Passwd#name contains the short login name of the user as a String.
 *
 * - Passwd#passwd contains the encrypted password of the user as a String.
 *   an 'x' is returned if shadow passwords are in use. An '*' is returned
 *   if the user cannot log in using a password.
 *
 * - Passwd#uid contains the integer user ID (uid) of the user.
 *
 * - Passwd#gid contains the integer group ID (gid) of the user's primary group.
 *
 * - Passwd#gecos contains a longer String description of the user, such as
 *   a full name. Some Unix systems provide structured information in the
 *   gecos field, but this is system-dependent.
 *
 * - Passwd#dir contains the path to the home directory of the user as a String.
 *
 * - Passwd#shell contains the path to the login shell of the user as a String.
 */
static VALUE
etc_getpwent(obj)
    VALUE obj;
{
#ifdef HAVE_GETPWENT
    struct passwd *pw;

    if (pw = getpwent()) {
        return setup_passwd(pw);
    }
#endif
    return Qnil;
}

#ifdef HAVE_GETGRENT
static VALUE
setup_group(grp)
    struct group *grp;
{
    VALUE mem;
    char **tbl;

    mem = rb_ary_new();
    tbl = grp->gr_mem;
    while (*tbl) {
        rb_ary_push(mem, safe_setup_str(*tbl));
        tbl++;
    }
    return rb_struct_new(sGroup,
                         safe_setup_str(grp->gr_name),
#ifdef HAVE_ST_GR_PASSWD
                         safe_setup_str(grp->gr_passwd),
#endif
                         INT2FIX(grp->gr_gid),
                         mem);
}
#endif

/* Returns information about the group with specified integer group id (gid),
 * as found in /etc/group.
 *
 * The information is returned as a Struct::Group; see getgrent above for
 * details.
 *
 * e.g.  Etc.getgrgid(100) -> #<struct Struct::Group name="users", passwd="x",
 * gid=100, mem=["meta", "root"]>
 *
 */
static VALUE
etc_getgrgid(obj, id)
    VALUE obj, id;
{
#ifdef HAVE_GETGRENT
    int gid;
    struct group *grp;

    rb_secure(4);
    gid = NUM2INT(id);
    grp = getgrgid(gid);
    if (grp == 0) rb_raise(rb_eArgError, "can't find group for %d", gid);
    return setup_group(grp);
#else
    return Qnil;
#endif
}

/* Returns information about the group with specified String name, as found
 * in /etc/group.
 *
 * The information is returned as a Struct::Group; see getgrent above for
 * details.
 *
 * e.g.  Etc.getgrnam('users') -> #<struct Struct::Group name="users",
 * passwd="x", gid=100, mem=["meta", "root"]>
 *
 */
static VALUE
etc_getgrnam(obj, nam)
    VALUE obj, nam;
{
#ifdef HAVE_GETGRENT
    struct group *grp;

    rb_secure(4);
    SafeStringValue(nam);
    grp = getgrnam(RSTRING(nam)->ptr);
    if (grp == 0) rb_raise(rb_eArgError, "can't find group for %s", RSTRING(nam)->ptr);
    return setup_group(grp);
#else
    return Qnil;
#endif
}

#ifdef HAVE_GETGRENT
static int group_blocking = 0;
static VALUE
group_ensure()
{
    group_blocking = Qfalse;
    return Qnil;
}

static VALUE
group_iterate()
{
    struct group *pw;

    setgrent();
    while (pw = getgrent()) {
        rb_yield(setup_group(pw));
    }
    endgrent();
    return Qnil;
}
#endif

/* Provides a convenient Ruby iterator which executes a block for each entry
 * in the /etc/group file.
 *
 * The code block is passed an Etc::Group struct; see getgrent above for
 * details.
 *
 * Example:
 *
 *     require 'etc'
 *
 *     Etc.group {|g|
 *       puts g.name + ": " + g.mem.join(', ')
 *     }
 *
 */
static VALUE
etc_group(obj)
    VALUE obj;
{
#ifdef HAVE_GETGRENT
    struct group *grp;

    rb_secure(4);
    if (rb_block_given_p()) {
        if (group_blocking) {
            rb_raise(rb_eRuntimeError, "parallel group iteration");
        }
        group_blocking = Qtrue;
        rb_ensure(group_iterate, 0, group_ensure, 0);
    }
    if (grp = getgrent()) {
        return setup_group(grp);
    }
#endif
    return Qnil;
}

/* Resets the process of reading the /etc/group file, so that the next call
 * to getgrent will return the first entry again.
 */
static VALUE
etc_setgrent(obj)
    VALUE obj;
{
#ifdef HAVE_GETGRENT
    setgrent();
#endif
    return Qnil;
}

/* Ends the process of scanning through the /etc/group file begun by
 * getgrent, and closes the file.
 */
static VALUE
etc_endgrent(obj)
    VALUE obj;
{
#ifdef HAVE_GETGRENT
    endgrent();
#endif
    return Qnil;
}

/* Returns an entry from the /etc/group file. The first time it is called it
 * opens the file and returns the first entry; each successive call returns
 * the next entry, or nil if the end of the file has been reached.
 *
 * To close the file when processing is complete, call endgrent.
 *
 * Each entry is returned as a Struct::Group:
 *
 * - Group#name contains the name of the group as a String.
 *
 * - Group#passwd contains the encrypted password as a String. An 'x' is
 *   returned if password access to the group is not available; an empty
 *   string is returned if no password is needed to obtain membership of
 *   the group.
 *
 * - Group#gid contains the group's numeric ID as an integer.
 *
 * - Group#mem is an Array of Strings containing the short login names of the
 *   members of the group.
 */
static VALUE
etc_getgrent(obj)
    VALUE obj;
{
#ifdef HAVE_GETGRENT
    struct group *gr;

    if (gr = getgrent()) {
        return setup_group(gr);
    }
#endif
    return Qnil;
}

static VALUE mEtc;

/* The etc module provides access to information from the /etc/passwd and
 * /etc/group files on Linux and Unix systems.
 *
 * Documented by mathew <meta@pobox.com>.
 */
void
Init_etc()
{
    mEtc = rb_define_module("Etc");

    rb_define_module_function(mEtc, "getlogin", etc_getlogin, 0);

    rb_define_module_function(mEtc, "getpwuid", etc_getpwuid, -1);
    rb_define_module_function(mEtc, "getpwnam", etc_getpwnam, 1);
    rb_define_module_function(mEtc, "setpwent", etc_setpwent, 0);
    rb_define_module_function(mEtc, "endpwent", etc_endpwent, 0);
    rb_define_module_function(mEtc, "getpwent", etc_getpwent, 0);
    rb_define_module_function(mEtc, "passwd", etc_passwd, 0);

    rb_define_module_function(mEtc, "getgrgid", etc_getgrgid, 1);
    rb_define_module_function(mEtc, "getgrnam", etc_getgrnam, 1);
    rb_define_module_function(mEtc, "group", etc_group, 0);
    rb_define_module_function(mEtc, "setgrent", etc_setgrent, 0);
    rb_define_module_function(mEtc, "endgrent", etc_endgrent, 0);
    rb_define_module_function(mEtc, "getgrent", etc_getgrent, 0);

    rb_global_variable(&sPasswd);
    sPasswd =  rb_struct_define("Passwd",
                                "name", "passwd", "uid", "gid",
#ifdef HAVE_ST_PW_GECOS
                                "gecos",
#endif
                                "dir", "shell",
#ifdef HAVE_ST_PW_CHANGE
                                "change",
#endif
#ifdef HAVE_ST_PW_QUOTA
                                "quota",
#endif
#ifdef HAVE_ST_PW_AGE
                                "age",
#endif
#ifdef HAVE_ST_PW_CLASS
                                "uclass",
#endif
#ifdef HAVE_ST_PW_COMMENT
                                "comment",
#endif
#ifdef HAVE_ST_PW_EXPIRE
                                "expire",
#endif
                                NULL);

#ifdef HAVE_GETGRENT
    rb_global_variable(&sGroup);
    sGroup = rb_struct_define("Group", "name",
#ifdef HAVE_ST_GR_PASSWD
                              "passwd",
#endif
                              "gid", "mem", NULL);
#endif
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/fcntl/fcntl.c

root/ext/fcntl/fcntl.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. Init_fcntl
/************************************************

  fcntl.c -

  $Author: matz $
  created at: Mon Apr  7 18:53:05 JST 1997

  Copyright (C) 1997-2001 Yukihiro Matsumoto

************************************************/

/************************************************
= NAME

fcntl - load the C fcntl.h defines

= SYNOPSIS

    require "fcntl"
    m = s.fcntl(Fcntl::F_GETFL, 0)
    f.fcntl(Fcntl::F_SETFL, Fcntl::O_NONBLOCK|m)

= DESCRIPTION

This module is just a translation of the C <fnctl.h> file.

= NOTE

Only #define symbols get translated; you must still correctly
pack up your own arguments to pass as args for locking functions, etc.

************************************************/

#include "ruby.h"
#include <fcntl.h>

/* Fcntl loads the constants defined in the system's <fcntl.h> C header
 * file, and used with both the fcntl(2) and open(2) POSIX system calls.
 *
 * Copyright (C) 1997-2001 Yukihiro Matsumoto
 *
 * Documented by mathew <meta@pobox.com>
 *
 * = Usage
 *
 * To perform a fcntl(2) operation, use IO::fcntl in the core classes.
 *
 * To perform an open(2) operation, use IO::sysopen.
 *
 * The set of operations and constants available depends upon specific OS
 * platform. Some values listed below may not be supported on your system.
 *
 * The constants supported by Ruby for use with IO::fcntl are:
 *
 * - F_DUPFD - duplicate a close-on-exec file handle to a non-close-on-exec
 *   file handle.
 *
 * - F_GETFD - read the close-on-exec flag of a file handle.
 *
 * - F_SETFD - set the close-on-exec flag of a file handle.
 *
 * - FD_CLOEXEC - the value of the close-on-exec flag.
 *
 * - F_GETFL - get file descriptor flags.
 *
 * - F_SETFL - set file descriptor flags.
 *
 * - O_APPEND, O_NONBLOCK, etc (see below) - file descriptor flag
 *   values for the above.
 *
 * - F_GETLK - determine whether a given region of a file is locked.
 *
 * - F_SETLK - acquire a lock on a region of a file.
 *
 * - F_SETLKW - acquire a lock on a region of a file, waiting if necessary.
 *
 * - F_RDLCK, F_WRLCK, F_UNLCK - types of lock for the above.
 *
 * The constants supported by Ruby for use with IO::sysopen are:
 *
 * - O_APPEND - open file in append mode.
 *
 * - O_NOCTTY - open tty without it becoming controlling tty.
 *
 * - O_CREAT - create file if it doesn't exist.
 *
 * - O_EXCL - used with O_CREAT, fail if file exists.
 *
 * - O_TRUNC - truncate file on open.
 *
 * - O_NONBLOCK / O_NDELAY - open in non-blocking mode.
 *
 * - O_RDONLY - open read-only.
 *
 * - O_WRONLY - open write-only.
 *
 * - O_RDWR - open read-write.
 *
 * - O_ACCMODE - mask to extract read/write flags.
 *
 * Example:
 *
 *   require 'fcntl'
 *
 *   fd = IO::sysopen('/tmp/tempfile',
 *        Fcntl::O_WRONLY | Fcntl::O_EXCL | Fcntl::O_CREAT)
 *   f = IO.open(fd)
 *   f.syswrite("TEMP DATA")
 *   f.close
 *
 */
void
Init_fcntl()
{
    VALUE mFcntl = rb_define_module("Fcntl");
#ifdef F_DUPFD
    rb_define_const(mFcntl, "F_DUPFD", INT2NUM(F_DUPFD));
#endif
#ifdef F_GETFD
    rb_define_const(mFcntl, "F_GETFD", INT2NUM(F_GETFD));
#endif
#ifdef F_GETLK
    rb_define_const(mFcntl, "F_GETLK", INT2NUM(F_GETLK));
#endif
#ifdef F_SETFD
    rb_define_const(mFcntl, "F_SETFD", INT2NUM(F_SETFD));
#endif
#ifdef F_GETFL
    rb_define_const(mFcntl, "F_GETFL", INT2NUM(F_GETFL));
#endif
#ifdef F_SETFL
    rb_define_const(mFcntl, "F_SETFL", INT2NUM(F_SETFL));
#endif
#ifdef F_SETLK
    rb_define_const(mFcntl, "F_SETLK", INT2NUM(F_SETLK));
#endif
#ifdef F_SETLKW
    rb_define_const(mFcntl, "F_SETLKW", INT2NUM(F_SETLKW));
#endif
#ifdef FD_CLOEXEC
    rb_define_const(mFcntl, "FD_CLOEXEC", INT2NUM(FD_CLOEXEC));
#endif
#ifdef F_RDLCK
    rb_define_const(mFcntl, "F_RDLCK", INT2NUM(F_RDLCK));
#endif
#ifdef F_UNLCK
    rb_define_const(mFcntl, "F_UNLCK", INT2NUM(F_UNLCK));
#endif
#ifdef F_WRLCK
    rb_define_const(mFcntl, "F_WRLCK", INT2NUM(F_WRLCK));
#endif
#ifdef O_CREAT
    rb_define_const(mFcntl, "O_CREAT", INT2NUM(O_CREAT));
#endif
#ifdef O_EXCL
    rb_define_const(mFcntl, "O_EXCL", INT2NUM(O_EXCL));
#endif
#ifdef O_NOCTTY
    rb_define_const(mFcntl, "O_NOCTTY", INT2NUM(O_NOCTTY));
#endif
#ifdef O_TRUNC
    rb_define_const(mFcntl, "O_TRUNC", INT2NUM(O_TRUNC));
#endif
#ifdef O_APPEND
    rb_define_const(mFcntl, "O_APPEND", INT2NUM(O_APPEND));
#endif
#ifdef O_NONBLOCK
    rb_define_const(mFcntl, "O_NONBLOCK", INT2NUM(O_NONBLOCK));
#endif
#ifdef O_NDELAY
    rb_define_const(mFcntl, "O_NDELAY", INT2NUM(O_NDELAY));
#endif
#ifdef O_RDONLY
    rb_define_const(mFcntl, "O_RDONLY", INT2NUM(O_RDONLY));
#endif
#ifdef O_RDWR
    rb_define_const(mFcntl, "O_RDWR", INT2NUM(O_RDWR));
#endif
#ifdef O_WRONLY
    rb_define_const(mFcntl, "O_WRONLY", INT2NUM(O_WRONLY));
#endif
#ifdef O_ACCMODE
    rb_define_const(mFcntl, "O_ACCMODE", INT2FIX(O_ACCMODE));
#else
    rb_define_const(mFcntl, "O_ACCMODE", INT2FIX(O_RDONLY | O_WRONLY | O_RDWR));
#endif
}
/* [<][>][^][v] [top][bottom][index] [help] */


ext/gdbm/gdbm.c

root/ext/gdbm/gdbm.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. rb_gdbm_fatal
  2. closed_dbm
  3. free_dbm
  4. fgdbm_close
  5. fgdbm_closed
  6. fgdbm_s_alloc
  7. fgdbm_initialize
  8. fgdbm_s_open
  9. rb_gdbm_fetch
  10. rb_gdbm_fetch2
  11. rb_gdbm_fetch3
  12. rb_gdbm_firstkey
  13. rb_gdbm_nextkey
  14. fgdbm_fetch
  15. fgdbm_aref
  16. fgdbm_fetch_m
  17. fgdbm_index
  18. fgdbm_select
  19. fgdbm_values_at
  20. rb_gdbm_modify
  21. rb_gdbm_delete
  22. fgdbm_delete
  23. fgdbm_shift
  24. fgdbm_delete_if
  25. fgdbm_clear
  26. fgdbm_invert
  27. each_pair
  28. update_i
  29. fgdbm_update
  30. fgdbm_replace
  31. fgdbm_store
  32. fgdbm_length
  33. fgdbm_empty_p
  34. fgdbm_each_value
  35. fgdbm_each_key
  36. fgdbm_each_pair
  37. fgdbm_keys
  38. fgdbm_values
  39. fgdbm_has_key
  40. fgdbm_has_value
  41. fgdbm_to_a
  42. fgdbm_reorganize
  43. fgdbm_sync
  44. fgdbm_set_cachesize
  45. fgdbm_set_fastmode
  46. fgdbm_set_syncmode
  47. fgdbm_to_hash
  48. fgdbm_reject
  49. Init_gdbm
/************************************************

  gdbm.c -

  $Author: akr $
  $Date: 2005/09/24 00:17:42 $
  modified at: Mon Jan 24 15:59:52 JST 1994

************************************************/

#include "ruby.h"

#include <gdbm.h>
#include <fcntl.h>
#include <errno.h>

static VALUE rb_cGDBM, rb_eGDBMError, rb_eGDBMFatalError;

#define RUBY_GDBM_RW_BIT 0x20000000

#define MY_BLOCK_SIZE (2048)
#define MY_FATAL_FUNC rb_gdbm_fatal
static void
rb_gdbm_fatal(msg)
    char *msg;
{
    rb_raise(rb_eGDBMFatalError, msg);
}

struct dbmdata {
    int  di_size;
    GDBM_FILE di_dbm;
};

static void
closed_dbm()
{
    rb_raise(rb_eRuntimeError, "closed GDBM file");
}

#define GetDBM(obj, dbmp) do {\
    Data_Get_Struct(obj, struct dbmdata, dbmp);\
    if (dbmp == 0) closed_dbm();\
    if (dbmp->di_dbm == 0) closed_dbm();\
} while (0)

#define GetDBM2(obj, data, dbm) {\
    GetDBM(obj, data);\
    (dbm) = dbmp->di_dbm;\
}

static void
free_dbm(dbmp)
    struct dbmdata *dbmp;
{
    if (dbmp) {
        if (dbmp->di_dbm) gdbm_close(dbmp->di_dbm);
        free(dbmp);
    }
}

static VALUE
fgdbm_close(obj)
    VALUE obj;
{
    struct dbmdata *dbmp;

    GetDBM(obj, dbmp);
    gdbm_close(dbmp->di_dbm);
    dbmp->di_dbm = 0;

    return Qnil;
}

static VALUE
fgdbm_closed(obj)
    VALUE obj;
{
    struct dbmdata *dbmp;

    Data_Get_Struct(obj, struct dbmdata, dbmp);
    if (dbmp == 0)
        return Qtrue;
    if (dbmp->di_dbm == 0)
        return Qtrue;

    return Qfalse;
}

static VALUE fgdbm_s_alloc _((VALUE));

static VALUE
fgdbm_s_alloc(klass)
    VALUE klass;
{
    return Data_Wrap_Struct(klass, 0, free_dbm, 0);
}

static VALUE
fgdbm_initialize(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    VALUE file, vmode, vflags;
    GDBM_FILE dbm;
    struct dbmdata *dbmp;
    int mode, flags = 0;

    if (rb_scan_args(argc, argv, "12", &file, &vmode, &vflags) == 1) {
        mode = 0666;            /* default value */
    }
    else if (NIL_P(vmode)) {
        mode = -1;              /* return nil if DB not exist */
    }
    else {
        mode = NUM2INT(vmode);
    }

    if (!NIL_P(vflags))
        flags = NUM2INT(vflags);

    SafeStringValue(file);

    if (flags & RUBY_GDBM_RW_BIT) {
        flags &= ~RUBY_GDBM_RW_BIT;
        dbm = gdbm_open(RSTRING(file)->ptr, MY_BLOCK_SIZE,
                        flags, mode, MY_FATAL_FUNC);
    }
    else {
        dbm = 0;
        if (mode >= 0)
            dbm = gdbm_open(RSTRING(file)->ptr, MY_BLOCK_SIZE,
                            GDBM_WRCREAT|flags, mode, MY_FATAL_FUNC);
        if (!dbm)
            dbm = gdbm_open(RSTRING(file)->ptr, MY_BLOCK_SIZE,
                            GDBM_WRITER|flags, 0, MY_FATAL_FUNC);
        if (!dbm)
            dbm = gdbm_open(RSTRING(file)->ptr, MY_BLOCK_SIZE,
                            GDBM_READER|flags, 0, MY_FATAL_FUNC);
    }

    if (!dbm) {
        if (mode == -1) return Qnil;

        if (gdbm_errno == GDBM_FILE_OPEN_ERROR ||
            gdbm_errno == GDBM_CANT_BE_READER ||
            gdbm_errno == GDBM_CANT_BE_WRITER)
            rb_sys_fail(RSTRING(file)->ptr);
        else
            rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
    }

    dbmp = ALLOC(struct dbmdata);
    free_dbm(DATA_PTR(obj));
    DATA_PTR(obj) = dbmp;
    dbmp->di_dbm = dbm;
    dbmp->di_size = -1;

    return obj;
}

static VALUE
fgdbm_s_open(argc, argv, klass)
    int argc;
    VALUE *argv;
    VALUE klass;
{
    VALUE obj = Data_Wrap_Struct(klass, 0, free_dbm, 0);

    if (NIL_P(fgdbm_initialize(argc, argv, obj))) {
        return Qnil;
    }

    if (rb_block_given_p()) {
        return rb_ensure(rb_yield, obj, fgdbm_close, obj);
    }

    return obj;
}

static VALUE
rb_gdbm_fetch(dbm, key)
    GDBM_FILE dbm;
    datum key;
{
    datum val;
    VALUE str;

    val = gdbm_fetch(dbm, key);
    if (val.dptr == 0)
        return Qnil;

    str = rb_obj_alloc(rb_cString);
    RSTRING(str)->len = val.dsize;
    RSTRING(str)->aux.capa = val.dsize;
    RSTRING(str)->ptr = REALLOC_N(val.dptr,char,val.dsize+1);
    RSTRING(str)->ptr[val.dsize] = '\0';

    OBJ_TAINT(str);
    return (VALUE)str;
}

static VALUE
rb_gdbm_fetch2(dbm, keystr)
    GDBM_FILE dbm;
    VALUE keystr;
{
    datum key;

    StringValue(keystr);
    key.dptr = RSTRING(keystr)->ptr;
    key.dsize = RSTRING(keystr)->len;

    return rb_gdbm_fetch(dbm, key);
}

static VALUE
rb_gdbm_fetch3(obj, keystr)
    VALUE obj, keystr;
{
    struct dbmdata *dbmp;
    GDBM_FILE dbm;

    GetDBM2(obj, dbmp, dbm);
    return rb_gdbm_fetch2(dbm, keystr);
}

static VALUE
rb_gdbm_firstkey(dbm)
    GDBM_FILE dbm;
{
    datum key;
    VALUE str;

    key = gdbm_firstkey(dbm);
    if (key.dptr == 0)
        return Qnil;

    str = rb_obj_alloc(rb_cString);
    RSTRING(str)->len = key.dsize;
    RSTRING(str)->aux.capa = key.dsize;
    RSTRING(str)->ptr = REALLOC_N(key.dptr,char,key.dsize+1);
    RSTRING(str)->ptr[RSTRING(str)->len] = '\0';

    OBJ_TAINT(str);
    return str;
}

static VALUE
rb_gdbm_nextkey(dbm, keystr)
    GDBM_FILE dbm;
    VALUE keystr;
{
    datum key, key2;
    VALUE str;

    key.dptr = RSTRING(keystr)->ptr;
    key.dsize = RSTRING(keystr)->len;
    key2 = gdbm_nextkey(dbm, key);
    if (key2.dptr == 0)
        return Qnil;

    str = rb_obj_alloc(rb_cString);
    RSTRING(str)->len = key2.dsize;
    RSTRING(str)->aux.capa = key2.dsize;
    RSTRING(str)->ptr = REALLOC_N(key2.dptr,char,key2.dsize+1);
    RSTRING(str)->ptr[RSTRING(str)->len] = '\0';

    OBJ_TAINT(str);
    return str;
}

static VALUE
fgdbm_fetch(obj, keystr, ifnone)
    VALUE obj, keystr, ifnone;
{
    VALUE valstr;

    valstr = rb_gdbm_fetch3(obj, keystr);
    if (NIL_P(valstr)) {
        if (ifnone == Qnil && rb_block_given_p())
            return rb_yield(keystr);
        return ifnone;
    }
    return valstr;
}

static VALUE
fgdbm_aref(obj, keystr)
    VALUE obj, keystr;
{
    return rb_gdbm_fetch3(obj, keystr);
}

static VALUE
fgdbm_fetch_m(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    VALUE keystr, valstr, ifnone;

    rb_scan_args(argc, argv, "11", &keystr, &ifnone);
    valstr = fgdbm_fetch(obj, keystr, ifnone);
    if (argc == 1 && !rb_block_given_p() && NIL_P(valstr))
        rb_raise(rb_eIndexError, "key not found");

    return valstr;
}

static VALUE
fgdbm_index(obj, valstr)
    VALUE obj, valstr;
{
    struct dbmdata *dbmp;
    GDBM_FILE dbm;
    VALUE keystr, valstr2;

    StringValue(valstr);
    GetDBM2(obj, dbmp, dbm);
    for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
         keystr = rb_gdbm_nextkey(dbm, keystr)) {

        valstr2 = rb_gdbm_fetch2(dbm, keystr);
        if (!NIL_P(valstr2) &&
            RSTRING(valstr)->len == RSTRING(valstr2)->len &&
            memcmp(RSTRING(valstr)->ptr, RSTRING(valstr2)->ptr,
                   RSTRING(valstr)->len) == 0) {
            return keystr;
        }
    }
    return Qnil;
}

static VALUE
fgdbm_select(obj)
    VALUE obj;
{
    VALUE new = rb_ary_new();
    GDBM_FILE dbm;
    struct dbmdata *dbmp;
    VALUE keystr;

    GetDBM2(obj, dbmp, dbm);
    for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
         keystr = rb_gdbm_nextkey(dbm, keystr)) {
        VALUE assoc = rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr));
        VALUE v = rb_yield(assoc);

        if (RTEST(v)) {
            rb_ary_push(new, assoc);
        }
        GetDBM2(obj, dbmp, dbm);
    }

    return new;
}

static VALUE
fgdbm_values_at(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    VALUE new = rb_ary_new2(argc);
    int i;

    for (i=0; i<argc; i++) {
        rb_ary_push(new, rb_gdbm_fetch3(obj, argv[i]));
    }

    return new;
}

static void
rb_gdbm_modify(obj)
    VALUE obj;
{
    rb_secure(4);
    if (OBJ_FROZEN(obj)) rb_error_frozen("GDBM");
}

static VALUE
rb_gdbm_delete(obj, keystr)
    VALUE obj, keystr;
{
    datum key;
    struct dbmdata *dbmp;
    GDBM_FILE dbm;

    rb_gdbm_modify(obj);
    StringValue(keystr);
    key.dptr = RSTRING(keystr)->ptr;
    key.dsize = RSTRING(keystr)->len;

    GetDBM2(obj, dbmp, dbm);
    if (!gdbm_exists(dbm, key)) {
        return Qnil;
    }

    if (gdbm_delete(dbm, key)) {
        dbmp->di_size = -1;
        rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
    }
    else if (dbmp->di_size >= 0) {
        dbmp->di_size--;
    }
    return obj;
}

static VALUE
fgdbm_delete(obj, keystr)
    VALUE obj, keystr;
{
    VALUE valstr;

    valstr = fgdbm_fetch(obj, keystr, Qnil);
    rb_gdbm_delete(obj, keystr);
    return valstr;
}

static VALUE
fgdbm_shift(obj)
    VALUE obj;
{
    struct dbmdata *dbmp;
    GDBM_FILE dbm;
    VALUE keystr, valstr;

    rb_gdbm_modify(obj);
    GetDBM2(obj, dbmp, dbm);
    keystr = rb_gdbm_firstkey(dbm);
    if (NIL_P(keystr)) return Qnil;
    valstr = rb_gdbm_fetch2(dbm, keystr);
    rb_gdbm_delete(obj, keystr);

    return rb_assoc_new(keystr, valstr);
}

static VALUE
fgdbm_delete_if(obj)
    VALUE obj;
{
    struct dbmdata *dbmp;
    GDBM_FILE dbm;
    VALUE keystr, valstr;
    VALUE ret, ary = rb_ary_new();
    int i, status = 0, n;

    rb_gdbm_modify(obj);
    GetDBM2(obj, dbmp, dbm);
    n = dbmp->di_size;
    dbmp->di_size = -1;

    for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
         keystr = rb_gdbm_nextkey(dbm, keystr)) {

        valstr = rb_gdbm_fetch2(dbm, keystr);
        ret = rb_protect(rb_yield, rb_assoc_new(keystr, valstr), &status);
        if (status != 0) break;
        if (RTEST(ret)) rb_ary_push(ary, keystr);
        GetDBM2(obj, dbmp, dbm);
    }

    for (i = 0; i < RARRAY(ary)->len; i++)
        rb_gdbm_delete(obj, RARRAY(ary)->ptr[i]);
    if (status) rb_jump_tag(status);
    if (n > 0) dbmp->di_size = n - RARRAY(ary)->len;

    return obj;
}

static VALUE
fgdbm_clear(obj)
    VALUE obj;
{
    datum key, nextkey;
    struct dbmdata *dbmp;
    GDBM_FILE dbm;

    rb_gdbm_modify(obj);
    GetDBM2(obj, dbmp, dbm);
    dbmp->di_size = -1;

#if 0
    while (key = gdbm_firstkey(dbm), key.dptr) {
        if (gdbm_delete(dbm, key)) {
            free(key.dptr);
            rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
        }
        free(key.dptr);
    }
#else
    while (key = gdbm_firstkey(dbm), key.dptr) {
        for (; key.dptr; key = nextkey) {
            nextkey = gdbm_nextkey(dbm, key);
            if (gdbm_delete(dbm, key)) {
                free(key.dptr);
                if (nextkey.dptr) free(nextkey.dptr);
                rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
            }
            free(key.dptr);
        }
    }
#endif
    dbmp->di_size = 0;

    return obj;
}

static VALUE
fgdbm_invert(obj)
    VALUE obj;
{
    struct dbmdata *dbmp;
    GDBM_FILE dbm;
    VALUE keystr, valstr;
    VALUE hash = rb_hash_new();

    GetDBM2(obj, dbmp, dbm);
    for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
         keystr = rb_gdbm_nextkey(dbm, keystr)) {
        valstr = rb_gdbm_fetch2(dbm, keystr);

        rb_hash_aset(hash, valstr, keystr);
    }
    return hash;
}

static VALUE each_pair _((VALUE));

static VALUE
each_pair(obj)
    VALUE obj;
{
    return rb_funcall(obj, rb_intern("each_pair"), 0, 0);
}

static VALUE fgdbm_store _((VALUE,VALUE,VALUE));

static VALUE
update_i(pair, dbm)
    VALUE pair, dbm;
{
    Check_Type(pair, T_ARRAY);
    if (RARRAY(pair)->len < 2) {
        rb_raise(rb_eArgError, "pair must be [key, value]");
    }
    fgdbm_store(dbm, RARRAY(pair)->ptr[0], RARRAY(pair)->ptr[1]);
    return Qnil;
}

static VALUE
fgdbm_update(obj, other)
    VALUE obj, other;
{
    rb_iterate(each_pair, other, update_i, obj);
    return obj;
}

static VALUE
fgdbm_replace(obj, other)
    VALUE obj, other;
{
    fgdbm_clear(obj);
    rb_iterate(each_pair, other, update_i, obj);
    return obj;
}

static VALUE
fgdbm_store(obj, keystr, valstr)
    VALUE obj, keystr, valstr;
{
    datum key, val;
    struct dbmdata *dbmp;
    GDBM_FILE dbm;

    rb_gdbm_modify(obj);
    StringValue(keystr);
    StringValue(valstr);

    key.dptr = RSTRING(keystr)->ptr;
    key.dsize = RSTRING(keystr)->len;

    val.dptr = RSTRING(valstr)->ptr;
    val.dsize = RSTRING(valstr)->len;

    GetDBM2(obj, dbmp, dbm);
    dbmp->di_size = -1;
    if (gdbm_store(dbm, key, val, GDBM_REPLACE)) {
        if (errno == EPERM) rb_sys_fail(0);
        rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
    }

    return valstr;
}

static VALUE
fgdbm_length(obj)
    VALUE obj;
{
    datum key, nextkey;
    struct dbmdata *dbmp;
    GDBM_FILE dbm;
    int i = 0;

    GetDBM2(obj, dbmp, dbm);
    if (dbmp->di_size > 0) return INT2FIX(dbmp->di_size);

    for (key = gdbm_firstkey(dbm); key.dptr; key = nextkey) {
        nextkey = gdbm_nextkey(dbm, key);
        free(key.dptr);
        i++;
    }
    dbmp->di_size = i;

    return INT2FIX(i);
}

static VALUE
fgdbm_empty_p(obj)
    VALUE obj;
{
    datum key;
    struct dbmdata *dbmp;
    GDBM_FILE dbm;

    GetDBM(obj, dbmp);
    if (dbmp->di_size < 0) {
        dbm = dbmp->di_dbm;

        key = gdbm_firstkey(dbm);
        if (key.dptr) {
            free(key.dptr);
            return Qfalse;
        }
        return Qtrue;
    }

    if (dbmp->di_size == 0) return Qtrue;
    return Qfalse;
}

static VALUE
fgdbm_each_value(obj)
    VALUE obj;
{
    struct dbmdata *dbmp;
    GDBM_FILE dbm;
    VALUE keystr;

    GetDBM2(obj, dbmp, dbm);
    for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
         keystr = rb_gdbm_nextkey(dbm, keystr)) {

        rb_yield(rb_gdbm_fetch2(dbm, keystr));
        GetDBM2(obj, dbmp, dbm);
    }
    return obj;
}

static VALUE
fgdbm_each_key(obj)
    VALUE obj;
{
    struct dbmdata *dbmp;
    GDBM_FILE dbm;
    VALUE keystr;

    GetDBM2(obj, dbmp, dbm);
    for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
         keystr = rb_gdbm_nextkey(dbm, keystr)) {

        rb_yield(keystr);
        GetDBM2(obj, dbmp, dbm);
    }
    return obj;
}

static VALUE
fgdbm_each_pair(obj)
    VALUE obj;
{
    GDBM_FILE dbm;
    struct dbmdata *dbmp;
    VALUE keystr;

    GetDBM2(obj, dbmp, dbm);
    for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
         keystr = rb_gdbm_nextkey(dbm, keystr)) {

        rb_yield(rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr)));
        GetDBM2(obj, dbmp, dbm);
    }

    return obj;
}

static VALUE
fgdbm_keys(obj)
    VALUE obj;
{
    struct dbmdata *dbmp;
    GDBM_FILE dbm;
    VALUE keystr, ary;

    GetDBM2(obj, dbmp, dbm);
    ary = rb_ary_new();
    for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
         keystr = rb_gdbm_nextkey(dbm, keystr)) {

        rb_ary_push(ary, keystr);
    }

    return ary;
}

static VALUE
fgdbm_values(obj)
    VALUE obj;
{
    datum key, nextkey;
    struct dbmdata *dbmp;
    GDBM_FILE dbm;
    VALUE valstr, ary;

    GetDBM2(obj, dbmp, dbm);
    ary = rb_ary_new();
    for (key = gdbm_firstkey(dbm); key.dptr; key = nextkey) {
        nextkey = gdbm_nextkey(dbm, key);
        valstr = rb_gdbm_fetch(dbm, key);
        free(key.dptr);
        rb_ary_push(ary, valstr);
    }

    return ary;
}

static VALUE
fgdbm_has_key(obj, keystr)
    VALUE obj, keystr;
{
    datum key;
    struct dbmdata *dbmp;
    GDBM_FILE dbm;

    StringValue(keystr);
    key.dptr = RSTRING(keystr)->ptr;
    key.dsize = RSTRING(keystr)->len;

    GetDBM2(obj, dbmp, dbm);
    if (gdbm_exists(dbm, key))
        return Qtrue;
    return Qfalse;
}

static VALUE
fgdbm_has_value(obj, valstr)
    VALUE obj, valstr;
{
    struct dbmdata *dbmp;
    GDBM_FILE dbm;
    VALUE keystr, valstr2;

    StringValue(valstr);
    GetDBM2(obj, dbmp, dbm);
    for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
         keystr = rb_gdbm_nextkey(dbm, keystr)) {

        valstr2 = rb_gdbm_fetch2(dbm, keystr);

        if (!NIL_P(valstr2) &&
            RSTRING(valstr)->len == RSTRING(valstr2)->len &&
            memcmp(RSTRING(valstr)->ptr, RSTRING(valstr2)->ptr,
                   RSTRING(valstr)->len) == 0) {
            return Qtrue;
        }
    }
    return Qfalse;
}

static VALUE
fgdbm_to_a(obj)
    VALUE obj;
{
    struct dbmdata *dbmp;
    GDBM_FILE dbm;
    VALUE keystr, ary;

    GetDBM2(obj, dbmp, dbm);
    ary = rb_ary_new();
    for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
         keystr = rb_gdbm_nextkey(dbm, keystr)) {

        rb_ary_push(ary, rb_assoc_new(keystr, rb_gdbm_fetch2(dbm, keystr)));
    }

    return ary;
}

static VALUE
fgdbm_reorganize(obj)
    VALUE obj;
{
    struct dbmdata *dbmp;
    GDBM_FILE dbm;

    rb_gdbm_modify(obj);
    GetDBM2(obj, dbmp, dbm);
    gdbm_reorganize(dbm);
    return obj;
}

static VALUE
fgdbm_sync(obj)
    VALUE obj;
{
    struct dbmdata *dbmp;
    GDBM_FILE dbm;

    rb_gdbm_modify(obj);
    GetDBM2(obj, dbmp, dbm);
    gdbm_sync(dbm);
    return obj;
}

static VALUE
fgdbm_set_cachesize(obj, val)
    VALUE obj, val;
{
    struct dbmdata *dbmp;
    GDBM_FILE dbm;
    int optval;

    GetDBM2(obj, dbmp, dbm);
    optval = FIX2INT(val);
    if (gdbm_setopt(dbm, GDBM_CACHESIZE, &optval, sizeof(optval)) == -1) {
        rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
    }
    return val;
}

static VALUE
fgdbm_set_fastmode(obj, val)
    VALUE obj, val;
{
    struct dbmdata *dbmp;
    GDBM_FILE dbm;
    int optval;

    GetDBM2(obj, dbmp, dbm);
    optval = 0;
    if (RTEST(val))
        optval = 1;

    if (gdbm_setopt(dbm, GDBM_FASTMODE, &optval, sizeof(optval)) == -1) {
        rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
    }
    return val;
}

static VALUE
fgdbm_set_syncmode(obj, val)
    VALUE obj, val;
{
#if !defined(GDBM_SYNCMODE)
    fgdbm_set_fastmode(obj, RTEST(val) ? Qfalse : Qtrue);
    return val;
#else
    struct dbmdata *dbmp;
    GDBM_FILE dbm;
    int optval;

    GetDBM2(obj, dbmp, dbm);
    optval = 0;
    if (RTEST(val))
        optval = 1;

    if (gdbm_setopt(dbm, GDBM_FASTMODE, &optval, sizeof(optval)) == -1) {
        rb_raise(rb_eGDBMError, "%s", gdbm_strerror(gdbm_errno));
    }
    return val;
#endif
}

static VALUE
fgdbm_to_hash(obj)
    VALUE obj;
{
    struct dbmdata *dbmp;
    GDBM_FILE dbm;
    VALUE keystr, hash;

    GetDBM2(obj, dbmp, dbm);
    hash = rb_hash_new();
    for (keystr = rb_gdbm_firstkey(dbm); RTEST(keystr);
         keystr = rb_gdbm_nextkey(dbm, keystr)) {

        rb_hash_aset(hash, keystr, rb_gdbm_fetch2(dbm, keystr));
    }

    return hash;
}

static VALUE
fgdbm_reject(obj)
    VALUE obj;
{
    return rb_hash_delete_if(fgdbm_to_hash(obj));
}

void
Init_gdbm()
{
    rb_cGDBM = rb_define_class("GDBM", rb_cObject);
    rb_eGDBMError = rb_define_class("GDBMError", rb_eStandardError);
    rb_eGDBMFatalError = rb_define_class("GDBMFatalError", rb_eException);
    rb_include_module(rb_cGDBM, rb_mEnumerable);

    rb_define_alloc_func(rb_cGDBM, fgdbm_s_alloc);
    rb_define_singleton_method(rb_cGDBM, "open", fgdbm_s_open, -1);

    rb_define_method(rb_cGDBM, "initialize", fgdbm_initialize, -1);
    rb_define_method(rb_cGDBM, "close", fgdbm_close, 0);
    rb_define_method(rb_cGDBM, "closed?", fgdbm_closed, 0);
    rb_define_method(rb_cGDBM, "[]", fgdbm_aref, 1);
    rb_define_method(rb_cGDBM, "fetch", fgdbm_fetch_m, -1);
    rb_define_method(rb_cGDBM, "[]=", fgdbm_store, 2);
    rb_define_method(rb_cGDBM, "store", fgdbm_store, 2);
    rb_define_method(rb_cGDBM, "index",  fgdbm_index, 1);
    rb_define_method(rb_cGDBM, "select",  fgdbm_select, 0);
    rb_define_method(rb_cGDBM, "values_at",  fgdbm_values_at, -1);
    rb_define_method(rb_cGDBM, "length", fgdbm_length, 0);
    rb_define_method(rb_cGDBM, "size", fgdbm_length, 0);
    rb_define_method(rb_cGDBM, "empty?", fgdbm_empty_p, 0);
    rb_define_method(rb_cGDBM, "each", fgdbm_each_pair, 0);
    rb_define_method(rb_cGDBM, "each_value", fgdbm_each_value, 0);
    rb_define_method(rb_cGDBM, "each_key", fgdbm_each_key, 0);
    rb_define_method(rb_cGDBM, "each_pair", fgdbm_each_pair, 0);
    rb_define_method(rb_cGDBM, "keys", fgdbm_keys, 0);
    rb_define_method(rb_cGDBM, "values", fgdbm_values, 0);
    rb_define_method(rb_cGDBM, "shift", fgdbm_shift, 0);
    rb_define_method(rb_cGDBM, "delete", fgdbm_delete, 1);
    rb_define_method(rb_cGDBM, "delete_if", fgdbm_delete_if, 0);
    rb_define_method(rb_cGDBM, "reject!", fgdbm_delete_if, 0);
    rb_define_method(rb_cGDBM, "reject", fgdbm_reject, 0);
    rb_define_method(rb_cGDBM, "clear", fgdbm_clear, 0);
    rb_define_method(rb_cGDBM,"invert", fgdbm_invert, 0);
    rb_define_method(rb_cGDBM,"update", fgdbm_update, 1);
    rb_define_method(rb_cGDBM,"replace", fgdbm_replace, 1);
    rb_define_method(rb_cGDBM,"reorganize", fgdbm_reorganize, 0);
    rb_define_method(rb_cGDBM,"sync", fgdbm_sync, 0);
    /* rb_define_method(rb_cGDBM,"setopt", fgdbm_setopt, 2); */
    rb_define_method(rb_cGDBM,"cachesize=", fgdbm_set_cachesize, 1);
    rb_define_method(rb_cGDBM,"fastmode=", fgdbm_set_fastmode, 1);
    rb_define_method(rb_cGDBM,"syncmode=", fgdbm_set_syncmode, 1);

    rb_define_method(rb_cGDBM, "include?", fgdbm_has_key, 1);
    rb_define_method(rb_cGDBM, "has_key?", fgdbm_has_key, 1);
    rb_define_method(rb_cGDBM, "member?", fgdbm_has_key, 1);
    rb_define_method(rb_cGDBM, "has_value?", fgdbm_has_value, 1);
    rb_define_method(rb_cGDBM, "key?", fgdbm_has_key, 1);
    rb_define_method(rb_cGDBM, "value?", fgdbm_has_value, 1);

    rb_define_method(rb_cGDBM, "to_a", fgdbm_to_a, 0);
    rb_define_method(rb_cGDBM, "to_hash", fgdbm_to_hash, 0);

    /* flags for gdbm_open() */
    rb_define_const(rb_cGDBM, "READER",  INT2FIX(GDBM_READER|RUBY_GDBM_RW_BIT));
    rb_define_const(rb_cGDBM, "WRITER",  INT2FIX(GDBM_WRITER|RUBY_GDBM_RW_BIT));
    rb_define_const(rb_cGDBM, "WRCREAT", INT2FIX(GDBM_WRCREAT|RUBY_GDBM_RW_BIT));
    rb_define_const(rb_cGDBM, "NEWDB",   INT2FIX(GDBM_NEWDB|RUBY_GDBM_RW_BIT));

    rb_define_const(rb_cGDBM, "FAST", INT2FIX(GDBM_FAST));
    /* this flag is obsolete in gdbm 1.8.
       On gdbm 1.8, fast mode is default behavior. */

    /* gdbm version 1.8 specific */
#if defined(GDBM_SYNC)
    rb_define_const(rb_cGDBM, "SYNC",    INT2FIX(GDBM_SYNC));
#endif
#if defined(GDBM_NOLOCK)
    rb_define_const(rb_cGDBM, "NOLOCK",  INT2FIX(GDBM_NOLOCK));
#endif
    rb_define_const(rb_cGDBM, "VERSION",  rb_str_new2(gdbm_version));
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/iconv/iconv.c

root/ext/iconv/iconv.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. charset_map_get
  2. map_charset
  3. iconv_create
  4. iconv_dfree
  5. iconv_free
  6. check_iconv
  7. iconv_try
  8. iconv_failure_initialize
  9. iconv_fail
  10. rb_str_derive
  11. iconv_convert
  12. iconv_s_allocate
  13. get_iconv_opt_i
  14. get_iconv_opt
  15. iconv_initialize
  16. iconv_s_open
  17. iconv_s_convert
  18. iconv_s_iconv
  19. iconv_s_conv
  20. list_iconv_i
  21. list_iconv
  22. iconv_s_list
  23. iconv_init_state
  24. iconv_finish
  25. iconv_iconv
  26. iconv_conv
  27. iconv_trivialp
  28. iconv_get_transliterate
  29. iconv_set_transliterate
  30. iconv_get_discard_ilseq
  31. iconv_set_discard_ilseq
  32. iconv_s_ctlmethods
  33. iconv_failure_success
  34. iconv_failure_failed
  35. iconv_failure_inspect
  36. Init_iconv
/* -*- mode:c; c-file-style:"ruby" -*- */
/**********************************************************************

  iconv.c -

  $Author: matz $
  $Date: 2005/12/12 00:35:07 $
  created at: Wed Dec  1 20:28:09 JST 1999

  All the files in this distribution are covered under the Ruby's
  license (see the file COPYING).

  Documentation by Yukihiro Matsumoto and Gavin Sinclair.

**********************************************************************/

#include "ruby.h"
#include <errno.h>
#include <iconv.h>
#include <assert.h>
#include "st.h"
#include "intern.h"

/*
 * Document-class: Iconv
 *
 * == Summary
 *
 * Ruby extension for charset conversion.
 *
 * == Abstract
 *
 * Iconv is a wrapper class for the UNIX 95 <tt>iconv()</tt> function family,
 * which translates string between various encoding systems.
 *
 * See Open Group's on-line documents for more details.
 * * <tt>iconv.h</tt>:       http://www.opengroup.org/onlinepubs/007908799/xsh/iconv.h.html
 * * <tt>iconv_open()</tt>:  http://www.opengroup.org/onlinepubs/007908799/xsh/iconv_open.html
 * * <tt>iconv()</tt>:       http://www.opengroup.org/onlinepubs/007908799/xsh/iconv.html
 * * <tt>iconv_close()</tt>: http://www.opengroup.org/onlinepubs/007908799/xsh/iconv_close.html
 *
 * Which coding systems are available is platform-dependent.
 *
 * == Examples
 *
 * 1. Instantiate a new Iconv and use method Iconv#iconv.
 *
 *      cd = Iconv.new(to, from)
 *      begin
 *        input.each { |s| output << cd.iconv(s) }
 *        output << cd.iconv(nil)                   # Don't forget this!
 *      ensure
 *        cd.close
 *      end
 *
 * 2. Invoke Iconv.open with a block.
 *
 *      Iconv.open(to, from) do |cd|
 *        input.each { |s| output << cd.iconv(s) }
 *        output << cd.iconv(nil)
 *      end
 *
 * 3. Shorthand for (2).
 *
 *      Iconv.iconv(to, from, *input.to_a)
 *
 * 4. Simple conversion between two charsets.
 *
 *      converted_text = Iconv.new('iso-8859-15', 'utf-8').iconv(text)
 */

/* Invalid value for iconv_t is -1 but 0 for VALUE, I hope VALUE is
   big enough to keep iconv_t */
#define VALUE2ICONV(v) ((iconv_t)((VALUE)(v) ^ -1))
#define ICONV2VALUE(c) ((VALUE)(c) ^ -1)

struct iconv_env_t
{
    iconv_t cd;
    int argc;
    VALUE *argv;
    VALUE ret;
    VALUE (*append)_((VALUE, VALUE));
};

struct rb_iconv_opt_t
{
    VALUE transliterate;
    VALUE discard_ilseq;
};

static ID id_transliterate, id_discard_ilseq;

static VALUE rb_eIconvInvalidEncoding;
static VALUE rb_eIconvFailure;
static VALUE rb_eIconvIllegalSeq;
static VALUE rb_eIconvInvalidChar;
static VALUE rb_eIconvOutOfRange;
static VALUE rb_eIconvBrokenLibrary;

static ID rb_success, rb_failed;
static VALUE iconv_fail _((VALUE error, VALUE success, VALUE failed, struct iconv_env_t* env, const char *mesg));
static VALUE iconv_failure_initialize _((VALUE error, VALUE mesg, VALUE success, VALUE failed));
static VALUE iconv_failure_success _((VALUE self));
static VALUE iconv_failure_failed _((VALUE self));

static iconv_t iconv_create _((VALUE to, VALUE from, struct rb_iconv_opt_t *opt));
static void iconv_dfree _((void *cd));
static VALUE iconv_free _((VALUE cd));
static VALUE iconv_try _((iconv_t cd, const char **inptr, size_t *inlen, char **outptr, size_t *outlen));
static VALUE rb_str_derive _((VALUE str, const char* ptr, int len));
static VALUE iconv_convert _((iconv_t cd, VALUE str, int start, int length, struct iconv_env_t* env));
static VALUE iconv_s_allocate _((VALUE klass));
static VALUE iconv_initialize _((int argc, VALUE *argv, VALUE self));
static VALUE iconv_s_open _((int argc, VALUE *argv, VALUE self));
static VALUE iconv_s_convert _((struct iconv_env_t* env));
static VALUE iconv_s_iconv _((int argc, VALUE *argv, VALUE self));
static VALUE iconv_init_state _((VALUE cd));
static VALUE iconv_finish _((VALUE self));
static VALUE iconv_iconv _((int argc, VALUE *argv, VALUE self));
static VALUE iconv_conv _((int argc, VALUE *argv, VALUE self));

static VALUE charset_map;

/*
 * Document-method: charset_map
 * call-seq: Iconv.charset_map
 *
 * Returns the map from canonical name to system dependent name.
 */
static VALUE charset_map_get(void)
{
    return charset_map;
}

static char *
map_charset(VALUE *code)
{
    VALUE val = *code;

    if (RHASH(charset_map)->tbl && RHASH(charset_map)->tbl->num_entries) {
        VALUE key = rb_funcall2(val, rb_intern("downcase"), 0, 0);
        StringValuePtr(key);
        if (st_lookup(RHASH(charset_map)->tbl, key, &val)) {
            *code = val;
        }
    }
    return StringValuePtr(*code);
}

static iconv_t
iconv_create(VALUE to, VALUE from, struct rb_iconv_opt_t *opt)
{
    const char* tocode = map_charset(&to);
    const char* fromcode = map_charset(&from);

    iconv_t cd = iconv_open(tocode, fromcode);

    if (cd == (iconv_t)-1) {
        switch (errno) {
          case EMFILE:
          case ENFILE:
          case ENOMEM:
            rb_gc();
            cd = iconv_open(tocode, fromcode);
        }
        if (cd == (iconv_t)-1) {
            int inval = errno == EINVAL;
            char *s = inval ? "invalid encoding " : "iconv";
            volatile VALUE msg = rb_str_new(0, strlen(s) + RSTRING(to)->len +
                                            RSTRING(from)->len + 8);

            sprintf(RSTRING(msg)->ptr, "%s(\"%s\", \"%s\")",
                    s, RSTRING(to)->ptr, RSTRING(from)->ptr);
            s = RSTRING(msg)->ptr;
            RSTRING(msg)->len = strlen(s);
            if (!inval) rb_sys_fail(s);
            iconv_fail(rb_eIconvInvalidEncoding,
                       Qnil, rb_ary_new3(2, to, from), NULL, s);
        }
    }

    if (opt) {
        int flag;
#ifdef ICONV_SET_TRANSLITERATE
        if (opt->transliterate != Qundef) {
            flag = RTEST(opt->transliterate);
            if (iconvctl(cd, ICONV_SET_TRANSLITERATE, (void *)&flag))
                rb_sys_fail("ICONV_SET_TRANSLITERATE");
        }
#endif
#ifdef ICONV_SET_DISCARD_ILSEQ
        if (opt->discard_ilseq != Qundef) {
            flag = RTEST(opt->discard_ilseq);
            if (iconvctl(cd, ICONV_SET_DISCARD_ILSEQ, (void *)&flag))
                rb_sys_fail("ICONV_SET_DISCARD_ILSEQ");
        }
#endif
    }

    return cd;
}

static void
iconv_dfree(void *cd)
{
    iconv_close(VALUE2ICONV(cd));
}

#define ICONV_FREE iconv_dfree

static VALUE
iconv_free(VALUE cd)
{
    if (cd && iconv_close(VALUE2ICONV(cd)) == -1)
        rb_sys_fail("iconv_close");
    return Qnil;
}

static VALUE
check_iconv(VALUE obj)
{
    Check_Type(obj, T_DATA);
    if (RDATA(obj)->dfree != ICONV_FREE) {
        rb_raise(rb_eArgError, "Iconv expected (%s)", rb_class2name(CLASS_OF(obj)));
    }
    return (VALUE)DATA_PTR(obj);
}

static VALUE
iconv_try(iconv_t cd, const char **inptr, size_t *inlen, char **outptr, size_t *outlen)
{
#ifdef ICONV_INPTR_CONST
#define ICONV_INPTR_CAST
#else
#define ICONV_INPTR_CAST (char **)
#endif
    size_t ret;

    errno = 0;
    ret = iconv(cd, ICONV_INPTR_CAST inptr, inlen, outptr, outlen);
    if (ret == (size_t)-1) {
        if (!*inlen)
            return Qfalse;
        switch (errno) {
          case E2BIG:
            /* try the left in next loop */
            break;
          case EILSEQ:
            return rb_eIconvIllegalSeq;
          case EINVAL:
            return rb_eIconvInvalidChar;
          case 0:
            return rb_eIconvBrokenLibrary;
          default:
            rb_sys_fail("iconv");
        }
    }
    else if (*inlen > 0) {
        /* something goes wrong */
        return rb_eIconvIllegalSeq;
    }
    else if (ret) {
        return Qnil;            /* conversion */
    }
    return Qfalse;
}

#define FAILED_MAXLEN 16

static VALUE iconv_failure_initialize(VALUE error, VALUE mesg, VALUE success, VALUE failed)
{
    rb_call_super(1, &mesg);
    rb_ivar_set(error, rb_success, success);
    rb_ivar_set(error, rb_failed, failed);
    return error;
}

static VALUE
iconv_fail(VALUE error, VALUE success, VALUE failed, struct iconv_env_t* env, const char *mesg)
{
    VALUE args[3];

    if (mesg && *mesg) {
        args[0] = rb_str_new2(mesg);
    }
    else if (TYPE(failed) != T_STRING || RSTRING(failed)->len < FAILED_MAXLEN) {
        args[0] = rb_inspect(failed);
    }
    else {
        args[0] = rb_inspect(rb_str_substr(failed, 0, FAILED_MAXLEN));
        rb_str_cat2(args[0], "...");
    }
    args[1] = success;
    args[2] = failed;
    if (env) {
        args[1] = env->append(rb_obj_dup(env->ret), success);
        if (env->argc > 0) {
            *(env->argv) = failed;
            args[2] = rb_ary_new4(env->argc, env->argv);
        }
    }
    error = rb_class_new_instance(3, args, error);
    if (!rb_block_given_p()) rb_exc_raise(error);
    ruby_errinfo = error;
    return rb_yield(failed);
}

static VALUE
rb_str_derive(VALUE str, const char* ptr, int len)
{
    VALUE ret;

    if (NIL_P(str))
        return rb_str_new(ptr, len);
    if (RSTRING(str)->ptr == ptr && RSTRING(str)->len == len)
        return str;
    if (RSTRING(str)->ptr + RSTRING(str)->len == ptr + len)
        ret = rb_str_substr(str, ptr - RSTRING(str)->ptr, len);
    else
        ret = rb_str_new(ptr, len);
    OBJ_INFECT(ret, str);
    return ret;
}

static VALUE
iconv_convert(iconv_t cd, VALUE str, int start, int length, struct iconv_env_t* env)
{
    VALUE ret = Qfalse;
    VALUE error = Qfalse;
    VALUE rescue;
    const char *inptr, *instart;
    size_t inlen;
    /* I believe ONE CHARACTER never exceed this. */
    char buffer[BUFSIZ];
    char *outptr;
    size_t outlen;

    if (cd == (iconv_t)-1)
        rb_raise(rb_eArgError, "closed iconv");

    if (NIL_P(str)) {
        /* Reset output pointer or something. */
        inptr = "";
        inlen = 0;
        outptr = buffer;
        outlen = sizeof(buffer);
        error = iconv_try(cd, &inptr, &inlen, &outptr, &outlen);
        if (RTEST(error)) {
            unsigned int i;
            rescue = iconv_fail(error, Qnil, Qnil, env, 0);
            if (TYPE(rescue) == T_ARRAY) {
                str = RARRAY(rescue)->len > 0 ? RARRAY(rescue)->ptr[0] : Qnil;
            }
            if (FIXNUM_P(str) && (i = FIX2INT(str)) <= 0xff) {
                char c = i;
                str = rb_str_new(&c, 1);
            }
            else if (!NIL_P(str)) {
                StringValue(str);
            }
        }

        inptr = NULL;
        length = 0;
    }
    else {
        int slen;

        StringValue(str);
        slen = RSTRING(str)->len;
        inptr = RSTRING(str)->ptr;

        if (start < 0 ? (start += slen) < 0 : start >= slen)
            length = 0;
        else if (length < 0 && (length += slen + 1) < 0)
            length = 0;
        else if ((length -= start) < 0)
            length = 0;
        else
            inptr += start;
    }
    instart = inptr;
    inlen = length;

    do {
        char errmsg[50];
        const char *tmpstart = inptr;
        outptr = buffer;
        outlen = sizeof(buffer);

        errmsg[0] = 0;
        error = iconv_try(cd, &inptr, &inlen, &outptr, &outlen);

        if (0 <= outlen && outlen <= sizeof(buffer)) {
            outlen = sizeof(buffer) - outlen;
            if (NIL_P(error) || /* something converted */
                outlen > inptr - tmpstart || /* input can't contain output */
                (outlen < inptr - tmpstart && inlen > 0) || /* something skipped */
                memcmp(buffer, tmpstart, outlen)) /* something differs */
            {
                if (NIL_P(str)) {
                    ret = rb_str_new(buffer, outlen);
                }
                else {
                    if (ret) {
                        ret = rb_str_buf_cat(ret, instart, tmpstart - instart);
                    }
                    else {
                        ret = rb_str_new(instart, tmpstart - instart);
                        OBJ_INFECT(ret, str);
                    }
                    ret = rb_str_buf_cat(ret, buffer, outlen);
                    instart = inptr;
                }
            }
            else if (!inlen) {
                inptr = tmpstart + outlen;
            }
        }
        else {
            /* Some iconv() have a bug, return *outlen out of range */
            sprintf(errmsg, "bug?(output length = %ld)", (long)(sizeof(buffer) - outlen));
            error = rb_eIconvOutOfRange;
        }

        if (RTEST(error)) {
            long len = 0;

            if (!ret)
                ret = rb_str_derive(str, instart, inptr - instart);
            else if (inptr > instart)
                rb_str_cat(ret, instart, inptr - instart);
            str = rb_str_derive(str, inptr, inlen);
            rescue = iconv_fail(error, ret, str, env, errmsg);
            if (TYPE(rescue) == T_ARRAY) {
                if ((len = RARRAY(rescue)->len) > 0)
                    rb_str_concat(ret, RARRAY(rescue)->ptr[0]);
                if (len > 1 && !NIL_P(str = RARRAY(rescue)->ptr[1])) {
                    StringValue(str);
                    inlen = length = RSTRING(str)->len;
                    instart = inptr = RSTRING(str)->ptr;
                    continue;
                }
            }
            else if (!NIL_P(rescue)) {
                rb_str_concat(ret, rescue);
            }
            break;
        }
    } while (inlen > 0);

    if (!ret)
        ret = rb_str_derive(str, instart, inptr - instart);
    else if (inptr > instart)
        rb_str_cat(ret, instart, inptr - instart);
    return ret;
}

static VALUE
iconv_s_allocate(VALUE klass)
{
    return Data_Wrap_Struct(klass, 0, ICONV_FREE, 0);
}

static VALUE
get_iconv_opt_i(VALUE i, VALUE arg)
{
    struct rb_iconv_opt_t *opt = (struct rb_iconv_opt_t *)arg;
    VALUE name, val;
    i = rb_Array(i);
    name = rb_ary_entry(i, 0);
    val = rb_ary_entry(i, 1);
    do {
        if (SYMBOL_P(name)) {
            ID id = SYM2ID(name);
            if (id == id_transliterate) {
#ifdef ICONV_SET_TRANSLITERATE
                opt->transliterate = val;
#else
                rb_notimplement();
#endif
                break;
            }
            if (id == id_discard_ilseq) {
#ifdef ICONV_SET_DISCARD_ILSEQ
                opt->discard_ilseq = val;
#else
                rb_notimplement();
#endif
                break;
            }
        }
        else {
            const char *s = StringValueCStr(name);
            if (strcmp(s, "transliterate") == 0) {
#ifdef ICONV_SET_TRANSLITERATE
                opt->transliterate = val;
#else
                rb_notimplement();
#endif
                break;
            }
            if (strcmp(s, "discard_ilseq") == 0) {
#ifdef ICONV_SET_DISCARD_ILSEQ
                opt->discard_ilseq = val;
#else
                rb_notimplement();
#endif
                break;
            }
        }
        name = rb_inspect(name);
        rb_raise(rb_eArgError, "unknown option - %s", StringValueCStr(name));
    } while (0);
    return Qnil;
}

static void
get_iconv_opt(struct rb_iconv_opt_t *opt, VALUE options)
{
    opt->transliterate = Qundef;
    opt->discard_ilseq = Qundef;
    if (!NIL_P(options)) {
        rb_iterate(rb_each, options, get_iconv_opt_i, (VALUE)opt);
    }
}

#define iconv_ctl(self, func, val) (\
        iconvctl(VALUE2ICONV(check_iconv(self)), func, (void *)&(val)) ? \
        rb_sys_fail(#func) : (void)0)

/*
 * Document-method: new
 * call-seq: Iconv.new(to, from, [options])
 *
 * Creates new code converter from a coding-system designated with +from+
 * to another one designated with +to+.
 *
 * === Parameters
 *
 * +to+::   encoding name for destination
 * +from+:: encoding name for source
 * +options+:: options for converter
 *
 * === Exceptions
 *
 * TypeError::       if +to+ or +from+ aren't String
 * InvalidEncoding:: if designated converter couldn't find out
 * SystemCallError:: if <tt>iconv_open(3)</tt> fails
 */
static VALUE
iconv_initialize(int argc, VALUE *argv, VALUE self)
{
    VALUE to, from, options;
    struct rb_iconv_opt_t opt;

    rb_scan_args(argc, argv, "21", &to, &from, &options);
    get_iconv_opt(&opt, options);
    iconv_free(check_iconv(self));
    DATA_PTR(self) = NULL;
    DATA_PTR(self) = (void *)ICONV2VALUE(iconv_create(to, from, &opt));
    return self;
}

/*
 * Document-method: open
 * call-seq: Iconv.open(to, from) { |iconv| ... }
 *
 * Equivalent to Iconv.new except that when it is called with a block, it
 * yields with the new instance and closes it, and returns the result which
 * returned from the block.
 */
static VALUE
iconv_s_open(int argc, VALUE *argv, VALUE self)
{
    VALUE to, from, options, cd;
    struct rb_iconv_opt_t opt;

    rb_scan_args(argc, argv, "21", &to, &from, &options);
    get_iconv_opt(&opt, options);
    cd = ICONV2VALUE(iconv_create(to, from, &opt));

    self = Data_Wrap_Struct(self, NULL, ICONV_FREE, (void *)cd);
    if (rb_block_given_p()) {
        return rb_ensure(rb_yield, self, (VALUE(*)())iconv_finish, self);
    }
    else {
        return self;
    }
}

static VALUE
iconv_s_convert(struct iconv_env_t* env)
{
    VALUE last = 0;

    for (; env->argc > 0; --env->argc, ++env->argv) {
        VALUE s = iconv_convert(env->cd, last = *(env->argv), 0, -1, env);
        env->append(env->ret, s);
    }

    if (!NIL_P(last)) {
        VALUE s = iconv_convert(env->cd, Qnil, 0, 0, env);
        if (RSTRING(s)->len)
            env->append(env->ret, s);
    }

    return env->ret;
}

/*
 * Document-method: iconv
 * call-seq: Iconv.iconv(to, from, *strs)
 *
 * Shorthand for
 *   Iconv.open(to, from) { |cd|
 *     (strs + [nil]).collect { |s| cd.iconv(s) }
 *   }
 *
 * === Parameters
 *
 * <tt>to, from</tt>:: see Iconv.new
 * <tt>strs</tt>:: strings to be converted
 *
 * === Exceptions
 *
 * Exceptions thrown by Iconv.new, Iconv.open and Iconv#iconv.
 */
static VALUE
iconv_s_iconv(int argc, VALUE *argv, VALUE self)
{
    struct iconv_env_t arg;

    if (argc < 2)               /* needs `to' and `from' arguments at least */
        rb_raise(rb_eArgError, "wrong number of arguments (%d for %d)", argc, 2);

    arg.argc = argc -= 2;
    arg.argv = argv + 2;
    arg.append = rb_ary_push;
    arg.ret = rb_ary_new2(argc);
    arg.cd = iconv_create(argv[0], argv[1], NULL);
    return rb_ensure(iconv_s_convert, (VALUE)&arg, iconv_free, ICONV2VALUE(arg.cd));
}

/*
 * Document-method: Iconv::conv
 * call-seq: Iconv.iconv(to, from, *strs)
 *
 * Shorthand for
 *   Iconv.iconv(to, from, str).join
 * See Iconv.iconv.
 */
static VALUE
iconv_s_conv(VALUE self, VALUE to, VALUE from, VALUE str)
{
    struct iconv_env_t arg;

    arg.argc = 1;
    arg.argv = &str;
    arg.append = rb_str_append;
    arg.ret = rb_str_new(0, 0);
    arg.cd = iconv_create(to, from, NULL);
    return rb_ensure(iconv_s_convert, (VALUE)&arg, iconv_free, ICONV2VALUE(arg.cd));
}

/*
 * Document-method: list
 * call-seq: Iconv.list {|*aliases| ... }
 *
 * Iterates each alias sets.
 */

#ifdef HAVE_ICONVLIST
struct iconv_name_list
{
    unsigned int namescount;
    const char *const *names;
    VALUE array;
};

static VALUE
list_iconv_i(VALUE ptr)
{
    struct iconv_name_list *p = (struct iconv_name_list *)ptr;
    unsigned int i, namescount = p->namescount;
    const char *const *names = p->names;
    VALUE ary = rb_ary_new2(namescount);

    for (i = 0; i < namescount; i++) {
        rb_ary_push(ary, rb_str_new2(names[i]));
    }
    if (p->array) {
        return rb_ary_push(p->array, ary);
    }
    return rb_yield(ary);
}

static int
list_iconv(unsigned int namescount, const char *const *names, void *data)
{
    int *state = data;
    struct iconv_name_list list;

    list.namescount = namescount;
    list.names = names;
    list.array = ((VALUE *)data)[1];
    rb_protect(list_iconv_i, (VALUE)&list, state);
    return *state;
}
#endif

static VALUE
iconv_s_list(void)
{
#ifdef HAVE_ICONVLIST
    int state;
    VALUE args[2];

    args[1] = rb_block_given_p() ? 0 : rb_ary_new();
    iconvlist(list_iconv, args);
    state = *(int *)args;
    if (state) rb_jump_tag(state);
    if (args[1]) return args[1];
#else
    rb_notimplement();
#endif
    return Qnil;
}

/*
 * Document-method: close
 *
 * Finishes conversion.
 *
 * After calling this, calling Iconv#iconv will cause an exception, but
 * multiple calls of #close are guaranteed to end successfully.
 *
 * Returns a string containing the byte sequence to change the output buffer to
 * its initial shift state.
 */
static VALUE
iconv_init_state(VALUE cd)
{
    return iconv_convert(VALUE2ICONV(cd), Qnil, 0, 0, NULL);
}

static VALUE
iconv_finish(VALUE self)
{
    VALUE cd = check_iconv(self);

    if (!cd) return Qnil;
    DATA_PTR(self) = NULL;

    return rb_ensure(iconv_init_state, cd, iconv_free, cd);
}

/*
 * Document-method: iconv
 * call-seq: iconv(str, start=0, length=-1)
 *
 * Converts string and returns the result.
 * * If +str+ is a String, converts <tt>str[start, length]</tt> and returns the converted string.
 * * If +str+ is +nil+, places converter itself into initial shift state and
 *   just returns a string containing the byte sequence to change the output
 *   buffer to its initial shift state.
 * * Otherwise, raises an exception.
 *
 * === Parameters
 *
 * str::    string to be converted, or nil
 * start::  starting offset
 * length:: conversion length; nil or -1 means whole the string from start
 *
 * === Exceptions
 *
 * * IconvIllegalSequence
 * * IconvInvalidCharacter
 * * IconvOutOfRange
 *
 * === Examples
 *
 * See the Iconv documentation.
 */
static VALUE
iconv_iconv(int argc, VALUE *argv, VALUE self)
{
    VALUE str, n1, n2;
    VALUE cd = check_iconv(self);

    n1 = n2 = Qnil;
    rb_scan_args(argc, argv, "12", &str, &n1, &n2);

    return iconv_convert(VALUE2ICONV(cd), str,
                         NIL_P(n1) ? 0 : NUM2INT(n1),
                         NIL_P(n2) ? -1 : NUM2INT(n2),
                         NULL);
}

/*
 * Document-method: conv
 * call-seq: conv(str...)
 *
 * Equivalent to
 *
 *   iconv(nil, str..., nil).join
 */
static VALUE
iconv_conv(int argc, VALUE *argv, VALUE self)
{
    iconv_t cd = VALUE2ICONV(check_iconv(self));
    VALUE str, s;

    str = iconv_convert(cd, Qnil, 0, 0, NULL);
    if (argc > 0) {
        do {
            s = iconv_convert(cd, *argv++, 0, -1, NULL);
            if (RSTRING(s)->len)
                rb_str_buf_append(str, s);
            else
                str = s;
        } while (--argc);
        s = iconv_convert(cd, Qnil, 0, 0, NULL);
        if (RSTRING(s)->len)
            rb_str_buf_append(str, s);
        else
            str = s;
    }

    return str;
}

/*
 * Document-method: trivial?
 * call-seq: trivial?
 *
 * Returns trivial flag.
 */
static VALUE
iconv_trivialp(VALUE self)
{
#ifdef ICONV_TRIVIALP
    int trivial = 0;
    iconv_ctl(self, ICONV_TRIVIALP, trivial);
    if (trivial) return Qtrue;
#else
    rb_notimplement();
#endif
    return Qfalse;
}

/*
 * Document-method: transliterate?
 * call-seq: transliterate?
 *
 * Returns transliterate flag.
 */
static VALUE
iconv_get_transliterate(VALUE self)
{
#ifdef ICONV_GET_TRANSLITERATE
    int trans = 0;
    iconv_ctl(self, ICONV_GET_TRANSLITERATE, trans);
    if (trans) return Qtrue;
#else
    rb_notimplement();
#endif
    return Qfalse;
}

/*
 * Document-method: transliterate=
 * call-seq: cd.transliterate = flag
 *
 * Sets transliterate flag.
 */
static VALUE
iconv_set_transliterate(VALUE self, VALUE transliterate)
{
#ifdef ICONV_SET_TRANSLITERATE
    int trans = RTEST(transliterate);
    iconv_ctl(self, ICONV_SET_TRANSLITERATE, trans);
#else
    rb_notimplement();
#endif
    return self;
}

/*
 * Document-method: discard_ilseq?
 * call-seq: discard_ilseq?
 *
 * Returns discard_ilseq flag.
 */
static VALUE
iconv_get_discard_ilseq(VALUE self)
{
#ifdef ICONV_GET_DISCARD_ILSEQ
    int dis = 0;
    iconv_ctl(self, ICONV_GET_DISCARD_ILSEQ, dis);
    if (dis) return Qtrue;
#else
    rb_notimplement();
#endif
    return Qfalse;
}

/*
 * Document-method: discard_ilseq=
 * call-seq: cd.discard_ilseq = flag
 *
 * Sets discard_ilseq flag.
 */
static VALUE
iconv_set_discard_ilseq(VALUE self, VALUE discard_ilseq)
{
#ifdef ICONV_SET_DISCARD_ILSEQ
    int dis = RTEST(discard_ilseq);
    iconv_ctl(self, ICONV_SET_DISCARD_ILSEQ, dis);
#else
    rb_notimplement();
#endif
    return self;
}

/*
 * Document-method: ctlmethods
 * call-seq: Iconv.ctlmethods => array
 *
 * Returns available iconvctl() method list.
 */
static VALUE
iconv_s_ctlmethods(VALUE klass)
{
    VALUE ary = rb_ary_new();
#ifdef ICONV_TRIVIALP
    rb_ary_push(ary, ID2SYM(rb_intern("trivial?")));
#endif
#ifdef ICONV_GET_TRANSLITERATE
    rb_ary_push(ary, ID2SYM(rb_intern("transliterate?")));
#endif
#ifdef ICONV_SET_TRANSLITERATE
    rb_ary_push(ary, ID2SYM(rb_intern("transliterate=")));
#endif
#ifdef ICONV_GET_DISCARD_ILSEQ
    rb_ary_push(ary, ID2SYM(rb_intern("discard_ilseq?")));
#endif
#ifdef ICONV_SET_DISCARD_ILSEQ
    rb_ary_push(ary, ID2SYM(rb_intern("discard_ilseq=")));
#endif
    return ary;
}

/*
 * Document-class: Iconv::Failure
 *
 * Base attributes for Iconv exceptions.
 */

/*
 * Document-method: success
 * call-seq: success
 *
 * Returns string(s) translated successfully until the exception occurred.
 * * In the case of failure occurred within Iconv.iconv, returned
 *   value is an array of strings translated successfully preceding
 *   failure and the last element is string on the way.
 */
static VALUE
iconv_failure_success(VALUE self)
{
    return rb_attr_get(self, rb_success);
}

/*
 * Document-method: failed
 * call-seq: failed
 *
 * Returns substring of the original string passed to Iconv that starts at the
 * character caused the exception.
 */
static VALUE
iconv_failure_failed(VALUE self)
{
    return rb_attr_get(self, rb_failed);
}

/*
 * Document-method: inspect
 * call-seq: inspect
 *
 * Returns inspected string like as: #<_class_: _success_, _failed_>
 */
static VALUE
iconv_failure_inspect(VALUE self)
{
    char *cname = rb_class2name(CLASS_OF(self));
    VALUE success = rb_attr_get(self, rb_success);
    VALUE failed = rb_attr_get(self, rb_failed);
    VALUE str = rb_str_buf_cat2(rb_str_new2("#<"), cname);
    str = rb_str_buf_cat(str, ": ", 2);
    str = rb_str_buf_append(str, rb_inspect(success));
    str = rb_str_buf_cat(str, ", ", 2);
    str = rb_str_buf_append(str, rb_inspect(failed));
    return rb_str_buf_cat(str, ">", 1);
}

/*
 * Document-class: Iconv::InvalidEncoding
 *
 * Requested coding-system is not available on this system.
 */

/*
 * Document-class: Iconv::IllegalSequence
 *
 * Input conversion stopped due to an input byte that does not belong to
 * the input codeset, or the output codeset does not contain the
 * character.
 */

/*
 * Document-class: Iconv::InvalidCharacter
 *
 * Input conversion stopped due to an incomplete character or shift
 * sequence at the end of the input buffer.
 */

/*
 * Document-class: Iconv::OutOfRange
 *
 * Iconv library internal error.  Must not occur.
 */

/*
 * Document-class: Iconv::BrokenLibrary
 *
 * Detected a bug of underlying iconv(3) libray.
 * * returns an error without setting errno properly
 */

void
Init_iconv(void)
{
    VALUE rb_cIconv = rb_define_class("Iconv", rb_cData);

    rb_define_alloc_func(rb_cIconv, iconv_s_allocate);
    rb_define_singleton_method(rb_cIconv, "open", iconv_s_open, -1);
    rb_define_singleton_method(rb_cIconv, "iconv", iconv_s_iconv, -1);
    rb_define_singleton_method(rb_cIconv, "conv", iconv_s_conv, 3);
    rb_define_singleton_method(rb_cIconv, "list", iconv_s_list, 0);
    rb_define_singleton_method(rb_cIconv, "ctlmethods", iconv_s_ctlmethods, 0);
    rb_define_method(rb_cIconv, "initialize", iconv_initialize, -1);
    rb_define_method(rb_cIconv, "close", iconv_finish, 0);
    rb_define_method(rb_cIconv, "iconv", iconv_iconv, -1);
    rb_define_method(rb_cIconv, "conv", iconv_conv, -1);
    rb_define_method(rb_cIconv, "trivial?", iconv_trivialp, 0);
    rb_define_method(rb_cIconv, "transliterate?", iconv_get_transliterate, 0);
    rb_define_method(rb_cIconv, "transliterate=", iconv_set_transliterate, 1);
    rb_define_method(rb_cIconv, "discard_ilseq?", iconv_get_discard_ilseq, 0);
    rb_define_method(rb_cIconv, "discard_ilseq=", iconv_set_discard_ilseq, 1);

    rb_eIconvFailure = rb_define_module_under(rb_cIconv, "Failure");
    rb_define_method(rb_eIconvFailure, "initialize", iconv_failure_initialize, 3);
    rb_define_method(rb_eIconvFailure, "success", iconv_failure_success, 0);
    rb_define_method(rb_eIconvFailure, "failed", iconv_failure_failed, 0);
    rb_define_method(rb_eIconvFailure, "inspect", iconv_failure_inspect, 0);

    rb_eIconvInvalidEncoding = rb_define_class_under(rb_cIconv, "InvalidEncoding", rb_eArgError);
    rb_eIconvIllegalSeq = rb_define_class_under(rb_cIconv, "IllegalSequence", rb_eArgError);
    rb_eIconvInvalidChar = rb_define_class_under(rb_cIconv, "InvalidCharacter", rb_eArgError);
    rb_eIconvOutOfRange = rb_define_class_under(rb_cIconv, "OutOfRange", rb_eRuntimeError);
    rb_eIconvBrokenLibrary = rb_define_class_under(rb_cIconv, "BrokenLibrary", rb_eRuntimeError);
    rb_include_module(rb_eIconvInvalidEncoding, rb_eIconvFailure);
    rb_include_module(rb_eIconvIllegalSeq, rb_eIconvFailure);
    rb_include_module(rb_eIconvInvalidChar, rb_eIconvFailure);
    rb_include_module(rb_eIconvOutOfRange, rb_eIconvFailure);
    rb_include_module(rb_eIconvBrokenLibrary, rb_eIconvFailure);

    rb_success = rb_intern("success");
    rb_failed = rb_intern("failed");
    id_transliterate = rb_intern("transliterate");
    id_discard_ilseq = rb_intern("discard_ilseq");

    rb_gc_register_address(&charset_map);
    charset_map = rb_hash_new();
    rb_define_singleton_method(rb_cIconv, "charset_map", charset_map_get, 0);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/io/wait/wait.c

root/ext/io/wait/wait.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. io_ready_p
  2. wait_readable
  3. io_wait
  4. Init_wait
/**********************************************************************

  io/wait.c -

  $Author: nobu $
  $Date: 2005/07/18 03:23:47 $
  created at: Tue Aug 28 09:08:06 JST 2001

  All the files in this distribution are covered under the Ruby's
  license (see the file COPYING).

**********************************************************************/

#include "ruby.h"
#include "rubyio.h"

#include <sys/types.h>
#if defined(FIONREAD_HEADER)
#include FIONREAD_HEADER
#endif

#ifdef HAVE_RB_W32_IOCTLSOCKET
#define ioctl ioctlsocket
#define ioctl_arg u_long
#define ioctl_arg2num(i) ULONG2NUM(i)
#else
#define ioctl_arg int
#define ioctl_arg2num(i) INT2NUM(i)
#endif

#ifdef HAVE_RB_W32_IS_SOCKET
#define FIONREAD_POSSIBLE_P(fd) rb_w32_is_socket(fd)
#else
#define FIONREAD_POSSIBLE_P(fd) ((fd),Qtrue)
#endif

static VALUE io_ready_p _((VALUE io));
static VALUE io_wait _((int argc, VALUE *argv, VALUE io));
void Init_wait _((void));

EXTERN struct timeval rb_time_interval _((VALUE time));

/*
=begin
= IO wait methods.
=end
 */

/*
=begin
--- IO#ready?
    returns non-nil if input available without blocking, or nil.
=end
*/
static VALUE
io_ready_p(io)
    VALUE io;
{
    OpenFile *fptr;
    ioctl_arg n;

    GetOpenFile(io, fptr);
    rb_io_check_readable(fptr);
    if (rb_io_read_pending(fptr)) return Qtrue;
    if (!FIONREAD_POSSIBLE_P(fptr->fd)) return Qfalse;
    if (ioctl(fptr->fd, FIONREAD, &n)) rb_sys_fail(0);
    if (n > 0) return ioctl_arg2num(n);
    return Qnil;
}

struct wait_readable_arg {
    rb_fdset_t fds;
    struct timeval *timeout;
};

#ifdef HAVE_RB_FD_INIT
static VALUE
wait_readable(p)
    VALUE p;
{
    struct wait_readable_arg *arg = (struct wait_readable_arg *)p;
    rb_fdset_t *fds = &arg->fds;

    return (VALUE)rb_thread_select(rb_fd_max(fds), rb_fd_ptr(fds), NULL, NULL, arg->timeout);
}
#endif

/*
=begin
--- IO#wait([timeout])
    waits until input available or timed out and returns self, or nil
    when EOF reached.
=end
*/
static VALUE
io_wait(argc, argv, io)
    int argc;
    VALUE *argv;
    VALUE io;
{
    OpenFile *fptr;
    struct wait_readable_arg arg;
    int fd, i;
    ioctl_arg n;
    VALUE timeout;
    struct timeval timerec;

    GetOpenFile(io, fptr);
    rb_io_check_readable(fptr);
    rb_scan_args(argc, argv, "01", &timeout);
    if (NIL_P(timeout)) {
        arg.timeout = 0;
    }
    else {
        timerec = rb_time_interval(timeout);
        arg.timeout = &timerec;
    }

    if (rb_io_read_pending(fptr)) return Qtrue;
    if (!FIONREAD_POSSIBLE_P(fptr->fd)) return Qfalse;
    fd = fptr->fd;
    rb_fd_init(&arg.fds);
    rb_fd_set(fd, &arg.fds);
#ifdef HAVE_RB_FD_INIT
    i = (int)rb_ensure(wait_readable, (VALUE)&arg,
                       (VALUE (*)_((VALUE)))rb_fd_term, (VALUE)&arg.fds);
#else
    i = rb_thread_select(fd + 1, rb_fd_ptr(&arg.fds), NULL, NULL, arg.timeout);
#endif
    if (i < 0)
        rb_sys_fail(0);
    rb_io_check_closed(fptr);
    if (ioctl(fptr->fd, FIONREAD, &n)) rb_sys_fail(0);
    if (n > 0) return io;
    return Qnil;
}

void
Init_wait()
{
    rb_define_method(rb_cIO, "ready?", io_ready_p, 0);
    rb_define_method(rb_cIO, "wait", io_wait, -1);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/nkf/nkf.c

root/ext/nkf/nkf.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. rb_nkf_putchar
  2. rb_nkf_kconv
  3. rb_nkf_guess1
  4. rb_nkf_guess2
  5. Init_nkf
/*
 * NKF Module for Ruby base on nkf 2.x
 *
 * original nkf2.x is maintained at http://sourceforge.jp/projects/nkf/
 *
 * $Id: nkf.c,v 1.12 2004/12/01 21:09:02 naruse Exp $
 *
 */

#define RUBY_NKF_REVISION "$Revision: 1.12 $"
#define RUBY_NKF_VERSION NKF_VERSION " (" NKF_RELEASE_DATE ")"

#include "ruby.h"

/* Encoding Constants */
#define _AUTO           0
#define _JIS            1
#define _EUC            2
#define _SJIS           3
#define _BINARY         4
#define _NOCONV         4
#define _ASCII          5
/* 0b011x is reserved for UTF-8 Family */
#define _UTF8           6
/* 0b10xx is reserved for UTF-16 Family */
#define _UTF16          8
/* 0b11xx is reserved for UTF-32 Family */
#define _UTF32          12
#define _OTHER          16
#define _UNKNOWN        _AUTO

/* Replace nkf's getchar/putchar for variable modification */
/* we never use getc, ungetc */

#undef getc
#undef ungetc
#define getc(f)         (input_ctr>=i_len?-1:input[input_ctr++])
#define ungetc(c,f)     input_ctr--

#define INCSIZE         32
#undef putchar
#undef TRUE
#undef FALSE
#define putchar(c)      rb_nkf_putchar(c)

/* Input/Output pointers */

static unsigned char *output;
static unsigned char *input;
static int input_ctr;
static int i_len;
static int output_ctr;
static int o_len;
static int incsize;

static VALUE result;

static int
rb_nkf_putchar(c)
  unsigned int c;
{
  if (output_ctr >= o_len) {
    o_len += incsize;
    rb_str_resize(result, o_len);
    incsize *= 2;
    output = RSTRING(result)->ptr;
  }
  output[output_ctr++] = c;

  return c;
}

/* Include kanji filter main part */
/* getchar and putchar will be replaced during inclusion */

#define PERL_XS 1
#include "nkf-utf8/config.h"
#include "nkf-utf8/utf8tbl.c"
#include "nkf-utf8/nkf.c"

static VALUE
rb_nkf_kconv(obj, opt, src)
  VALUE obj, opt, src;
{
  char *opt_ptr, *opt_end;
  volatile VALUE v;

  reinit();
  StringValue(opt);
  opt_ptr = RSTRING(opt)->ptr;
  opt_end = opt_ptr + RSTRING(opt)->len;
  options(opt_ptr);

  incsize = INCSIZE;

  input_ctr = 0;
  StringValue(src);
  input = RSTRING(src)->ptr;
  i_len = RSTRING(src)->len;
  result = rb_str_new(0, i_len*3 + 10);
  v = result;

  output_ctr = 0;
  output     = RSTRING(result)->ptr;
  o_len      = RSTRING(result)->len;
  *output    = '\0';

  if(x0201_f == WISH_TRUE)
    x0201_f = ((!iso2022jp_f)? TRUE : NO_X0201);

  kanji_convert(NULL);
  RSTRING(result)->ptr[output_ctr] = '\0';
  RSTRING(result)->len = output_ctr;
  OBJ_INFECT(result, src);

  return result;
}

/*
 * NKF.guess1
 *
 * Character code detection - Algorithm described in:
 * Ken Lunde. `Understanding Japanese Information Processing'
 * Sebastopol, CA: O'Reilly & Associates.
 */

static VALUE
rb_nkf_guess1(obj, src)
  VALUE obj, src;
{
  unsigned char *p;
  unsigned char *pend;
  int sequence_counter = 0;

  StringValue(src);
  p = RSTRING(src)->ptr;
  pend = p + RSTRING(src)->len;
  if (p == pend) return INT2FIX(_UNKNOWN);

#define INCR do {\
      p++;\
      if (p==pend) return INT2FIX(_UNKNOWN);\
      sequence_counter++;\
      if (sequence_counter % 2 == 1 && *p != 0xa4)\
        sequence_counter = 0;\
      if (6 <= sequence_counter) {\
          sequence_counter = 0;\
          return INT2FIX(_EUC);\
      }\
  } while (0)

  if (*p == 0xa4)
    sequence_counter = 1;

  while (p<pend) {
    if (*p == '\033') {
      return INT2FIX(_JIS);
    }
    if (*p < '\006' || *p == 0x7f || *p == 0xff) {
      return INT2FIX(_BINARY);
    }
    if (0x81 <= *p && *p <= 0x8d) {
      return INT2FIX(_SJIS);
    }
    if (0x8f <= *p && *p <= 0x9f) {
      return INT2FIX(_SJIS);
    }
    if (*p == 0x8e) {   /* SS2 */
      INCR;
      if ((0x40 <= *p && *p <= 0x7e) ||
          (0x80 <= *p && *p <= 0xa0) ||
          (0xe0 <= *p && *p <= 0xfc))
        return INT2FIX(_SJIS);
    }
    else if (0xa1 <= *p && *p <= 0xdf) {
      INCR;
      if (0xf0 <= *p && *p <= 0xfe)
        return INT2FIX(_EUC);
      if (0xe0 <= *p && *p <= 0xef) {
        while (p < pend && *p >= 0x40) {
          if (*p >= 0x81) {
            if (*p <= 0x8d || (0x8f <= *p && *p <= 0x9f)) {
              return INT2FIX(_SJIS);
            }
            else if (0xfd <= *p && *p <= 0xfe) {
              return INT2FIX(_EUC);
            }
          }
          INCR;
        }
      }
      else if (*p <= 0x9f) {
        return INT2FIX(_SJIS);
      }
    }
    else if (0xf0 <= *p && *p <= 0xfe) {
      return INT2FIX(_EUC);
    }
    else if (0xe0 <= *p && *p <= 0xef) {
      INCR;
      if ((0x40 <= *p && *p <= 0x7e) ||
          (0x80 <= *p && *p <= 0xa0)) {
        return INT2FIX(_SJIS);
      }
      if (0xfd <= *p && *p <= 0xfe) {
        return INT2FIX(_EUC);
      }
    }
    INCR;
  }
  return INT2FIX(_UNKNOWN);
}

/*
 * NKF.guess2
 *
 * Guess Encoding By NKF2.0 Routine
 */

static VALUE
rb_nkf_guess2(obj, src)
  VALUE obj, src;
{
  int code = _BINARY;

  reinit();

  input_ctr = 0;
  StringValue(src);
  input = RSTRING(src)->ptr;
  i_len = RSTRING(src)->len;

  if(x0201_f == WISH_TRUE)
    x0201_f = ((!iso2022jp_f)? TRUE : NO_X0201);

  guess_f = TRUE;
  kanji_convert( NULL );
  guess_f = FALSE;

  if (!is_inputcode_mixed) {
    if (strcmp(input_codename, "") == 0) {
      code = _ASCII;
    } else if (strcmp(input_codename, "ISO-2022-JP") == 0) {
      code = _JIS;
    } else if (strcmp(input_codename, "EUC-JP") == 0) {
      code = _EUC;
    } else if (strcmp(input_codename, "Shift_JIS") == 0) {
      code = _SJIS;
    } else if (strcmp(input_codename, "UTF-8") == 0) {
      code = _UTF8;
    } else if (strcmp(input_codename, "UTF-16") == 0) {
      code = _UTF16;
    } else if (strlen(input_codename) > 0) {
      code = _UNKNOWN;
    }
  }

  return INT2FIX( code );
}

/* Initialize NKF Module */

void
Init_nkf()
{
  VALUE mKconv = rb_define_module("NKF");

  rb_define_module_function(mKconv, "nkf", rb_nkf_kconv, 2);
  rb_define_module_function(mKconv, "guess", rb_nkf_guess2, 1);
  rb_define_module_function(mKconv, "guess1", rb_nkf_guess1, 1);
  rb_define_module_function(mKconv, "guess2", rb_nkf_guess2, 1);

  rb_define_const(mKconv, "AUTO", INT2FIX(_AUTO));
  rb_define_const(mKconv, "JIS", INT2FIX(_JIS));
  rb_define_const(mKconv, "EUC", INT2FIX(_EUC));
  rb_define_const(mKconv, "SJIS", INT2FIX(_SJIS));
  rb_define_const(mKconv, "BINARY", INT2FIX(_BINARY));
  rb_define_const(mKconv, "NOCONV", INT2FIX(_NOCONV));
  rb_define_const(mKconv, "ASCII", INT2FIX(_ASCII));
  rb_define_const(mKconv, "UTF8", INT2FIX(_UTF8));
  rb_define_const(mKconv, "UTF16", INT2FIX(_UTF16));
  rb_define_const(mKconv, "UTF32", INT2FIX(_UTF32));
  rb_define_const(mKconv, "UNKNOWN", INT2FIX(_UNKNOWN));
  rb_define_const(mKconv, "VERSION", rb_str_new2(RUBY_NKF_VERSION));
  /* for debug */
  rb_define_const(mKconv, "NKF_VERSION", rb_str_new2(NKF_VERSION));
  rb_define_const(mKconv, "NKF_RELEASE_DATE", rb_str_new2(NKF_RELEASE_DATE));
  rb_define_const(mKconv, "REVISION", rb_str_new2(RUBY_NKF_REVISION));
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/nkf/nkf-utf8/config.h

root/ext/nkf/nkf-utf8/config.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

#ifndef _CONFIG_H_
#define _CONFIG_H_

/* UTF8 $BF~=PNO(B */
#define UTF8_INPUT_ENABLE
#define UTF8_OUTPUT_ENABLE

/* Shift_JIS $BHO0O30$NJ8;z$r!"(BCP932 $B$GF1CM$JJ8;z$KFI$_49$($k(B */
#define SHIFTJIS_CP932

/* $B%*%W%7%g%s$GF~NO$r;XDj$7$?;~$K!"J8;z%3!<%I$r8GDj$9$k(B */
#define INPUT_CODE_FIX

/* --overwrite $B%*%W%7%g%s(B */
/* by Satoru Takabayashi <ccsatoru@vega.aichi-u.ac.jp> */
#define OVERWRITE

/* --cap-input, --url-input $B%*%W%7%g%s(B */
#define INPUT_OPTION

/* --numchar-input $B%*%W%7%g%s(B */
#define NUMCHAR_OPTION

/* --debug, --no-output $B%*%W%7%g%s(B */
#define CHECK_OPTION

/* JIS X0212 */
#define X0212_ENABLE

/* --exec-in, --exec-out $B%*%W%7%g%s(B
 * pipe, fork, execvp $B$"$?$j$,L5$$$HF0$-$^$;$s!#(B
 * MS-DOS, MinGW $B$J$I$G$O(B undef $B$K$7$F$/$@$5$$(B
 * child process $B=*N;;~$N=hM}$,$$$$$+$2$s$J$N$G!"(B
 * $B%G%U%)%k%H$GL58z$K$7$F$$$^$9!#(B
 */
/* #define EXEC_IO */

/* SunOS $B$N(B cc $B$r;H$&$H$-$O(B undef $B$K$7$F$/$@$5$$(B */
#define ANSI_C_PROTOTYPE

/* int $B$,(B 32bit $BL$K~$N4D6-$G(B NUMCHAR_OPTION $B$r;H$&$K$O!"(B
 * $B%3%a%s%H$r30$7$F$/$@$5$$!#(B
 */
/* #define INT_IS_SHORT */

/* Unicode Normalization */
#define UNICODE_NORMALIZATION

#ifndef WIN32DLL
/******************************/
/* $B%G%U%)%k%H$N=PNO%3!<%IA*Br(B */
/* Select DEFAULT_CODE */
#define DEFAULT_CODE_JIS
/* #define DEFAULT_CODE_SJIS */
/* #define DEFAULT_CODE_EUC */
/* #define DEFAULT_CODE_UTF8 */
/******************************/
#else
#define DEFAULT_CODE_SJIS
#endif

#if defined(NUMCHAR_OPTION) && !defined(UTF8_INPUT_ENABLE)
#define UTF8_INPUT_ENABLE
#endif

#ifdef UNICODE_NORMALIZATION
#ifndef UTF8_INPUT_ENABLE
#define UTF8_INPUT_ENABLE
#endif
#define NORMALIZATION_TABLE_LENGTH 942
#define NORMALIZATION_TABLE_NFC_LENGTH 3
#define NORMALIZATION_TABLE_NFD_LENGTH 9
struct normalization_pair{
    const int nfc[NORMALIZATION_TABLE_NFC_LENGTH];
    const int nfd[NORMALIZATION_TABLE_NFD_LENGTH];
};
#endif

#endif /* _CONFIG_H_ */
/* [<][>][^][v][top][bottom][index] [help] */


ext/nkf/nkf-utf8/nkf.c

root/ext/nkf/nkf-utf8/nkf.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. main
  2. options
  3. find_inputcode_byfunc
  4. set_iconv
  5. set_code_score
  6. clr_code_score
  7. code_score
  8. status_disable
  9. status_push_ch
  10. status_clear
  11. status_reset
  12. status_reinit
  13. status_check
  14. s_status
  15. e_status
  16. w16_status
  17. w_status
  18. code_status
  19. std_getc
  20. std_ungetc
  21. std_putc
  22. noconvert
  23. module_connection
  24. kanji_convert
  25. h_conv
  26. push_hold_buf
  27. s2e_conv
  28. s_iconv
  29. e_iconv
  30. w2e_conv
  31. w_iconv
  32. w16w_conv
  33. ww16_conv
  34. w16e_conv
  35. w_iconv16
  36. w_iconv_common
  37. e2w_conv
  38. w_oconv
  39. w_oconv16
  40. e_oconv
  41. x0212_shift
  42. x0212_unshift
  43. e2s_conv
  44. s_oconv
  45. j_oconv
  46. base64_conv
  47. broken_getc
  48. broken_ungetc
  49. cr_conv
  50. fold_conv
  51. z_conv
  52. rot_conv
  53. hira_conv
  54. iso2022jp_check_conv
  55. switch_mime_getc
  56. unswitch_mime_getc
  57. mime_begin_strict
  58. mime_getc_buf
  59. mime_ungetc_buf
  60. mime_begin
  61. no_putc
  62. debug
  63. set_input_codename
  64. print_guessed_code
  65. hex2bin
  66. hex_getc
  67. cap_getc
  68. cap_ungetc
  69. url_getc
  70. url_ungetc
  71. numchar_getc
  72. numchar_ungetc
  73. nfc_getc
  74. nfc_ungetc
  75. mime_getc
  76. mime_ungetc
  77. mime_integrity
  78. base64decode
  79. open_mime
  80. close_mime
  81. eof_mime
  82. mimeout_addchar
  83. mime_prechar
  84. mime_putc
  85. reinit
  86. no_connection
  87. no_connection2
  88. usage
  89. version
/** Network Kanji Filter. (PDS Version)
************************************************************************
** Copyright (C) 1987, Fujitsu LTD. (Itaru ICHIKAWA)
** $BO"Mm@h!'(B $B!J3t!KIY;NDL8&5f=j!!%=%U%H#38&!!;T@n!!;j(B
** $B!J(BE-Mail Address: ichikawa@flab.fujitsu.co.jp$B!K(B
** Copyright (C) 1996,1998
** Copyright (C) 2002
** $BO"Mm@h!'(B $BN05eBg3X>pJs9)3X2J(B $B2OLn(B $B??<#(B  mime/X0208 support
** $B!J(BE-Mail Address: kono@ie.u-ryukyu.ac.jp$B!K(B
** $BO"Mm@h!'(B COW for DOS & Win16 & Win32 & OS/2
** $B!J(BE-Mail Address: GHG00637@niftyserve.or.p$B!K(B
**
**    $B$3$N%=!<%9$N$$$+$J$kJ#<L!$2~JQ!$=$@5$b5vBz$7$^$9!#$?$@$7!"(B
**    $B$=$N:]$K$O!"C/$,9W8%$7$?$r<($9$3$NItJ,$r;D$9$3$H!#(B
**    $B:FG[I[$d;(;o$NIUO?$J$I$NLd$$9g$o$;$bI,MW$"$j$^$;$s!#(B
**    $B1DMxMxMQ$b>e5-$KH?$7$J$$HO0O$G5v2D$7$^$9!#(B
**    $B%P%$%J%j$NG[I[$N:]$K$O(Bversion message$B$rJ]B8$9$k$3$H$r>r7o$H$7$^$9!#(B
**    $B$3$N%W%m%0%i%`$K$D$$$F$OFC$K2?$NJ]>Z$b$7$J$$!"0-$7$+$i$:!#(B
**
**    Everyone is permitted to do anything on this program
**    including copying, modifying, improving,
**    as long as you don't try to pretend that you wrote it.
**    i.e., the above copyright notice has to appear in all copies.
**    Binary distribution requires original version messages.
**    You don't have to ask before copying, redistribution or publishing.
**    THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE.
***********************************************************************/

/***********************************************************************
** UTF-8 $B%5%]!<%H$K$D$$$F(B
**    $B=>Mh$N(B nkf $B$HF~$l$+$($F$=$N$^$^;H$($k$h$&$K$J$C$F$$$^$9(B
**    nkf -e $B$J$I$H$7$F5/F0$9$k$H!"<+F0H=JL$G(B UTF-8 $B$HH=Dj$5$l$l$P!"(B
**    $B$=$N$^$^(B euc-jp $B$KJQ49$5$l$^$9(B
**
**    $B$^$@%P%0$,$"$k2DG=@-$,9b$$$G$9!#(B
**    ($BFC$K<+F0H=JL!"%3!<%I:.:_!"%(%i!<=hM}7O(B)
**
**    $B2?$+LdBj$r8+$D$1$?$i!"(B
**        E-Mail: furukawa@tcp-ip.or.jp
**    $B$^$G8fO"Mm$r$*4j$$$7$^$9!#(B
***********************************************************************/
/* $Id: nkf.c,v 1.17 2005/07/21 16:13:07 naruse Exp $ */
#define NKF_VERSION "2.0.5"
#define NKF_RELEASE_DATE "2005-07-22"
#include "config.h"

#define COPY_RIGHT \
    "Copyright (C) 1987, FUJITSU LTD. (I.Ichikawa),2000 S. Kono, COW, 2002-2005 Kono, Furukawa, Naruse"

/*
**
**
**
** USAGE:       nkf [flags] [file]
**
** Flags:
** b    Output is buffered             (DEFAULT)
** u    Output is unbuffered
**
** t    no operation
**
** j    Outout code is JIS 7 bit        (DEFAULT SELECT)
** s    Output code is MS Kanji         (DEFAULT SELECT)
** e    Output code is AT&T JIS         (DEFAULT SELECT)
** w    Output code is AT&T JIS         (DEFAULT SELECT)
** l    Output code is JIS 7bit and ISO8859-1 Latin-1
**
** m    MIME conversion for ISO-2022-JP
** I    Convert non ISO-2022-JP charactor to GETA by Pekoe <pekoe@lair.net>
** i_ Output sequence to designate JIS-kanji (DEFAULT_J)
** o_ Output sequence to designate single-byte roman characters (DEFAULT_R)
** M    MIME output conversion
**
** r  {de/en}crypt ROT13/47
**
** v  display Version
**
** T  Text mode output        (for MS-DOS)
**
** x    Do not convert X0201 kana into X0208
** Z    Convert X0208 alphabet to ASCII
**
** f60  fold option
**
** m    MIME decode
** B    try to fix broken JIS, missing Escape
** B[1-9]  broken level
**
** O   Output to 'nkf.out' file or last file name
** d   Delete \r in line feed
** c   Add \r in line feed
** -- other long option
** -- ignore following option (don't use with -O )
**
**/

#if (defined(__TURBOC__) || defined(_MSC_VER) || defined(LSI_C) || defined(__MINGW32__)) && !defined(MSDOS)
#define MSDOS
#if (defined(__Win32__) || defined(_WIN32)) && !defined(__WIN32__)
#define __WIN32__
#endif
#endif

#ifdef PERL_XS
#undef OVERWRITE
#endif

#ifndef PERL_XS
#include <stdio.h>
#endif

#include <stdlib.h>
#include <string.h>

#if defined(MSDOS) || defined(__OS2__)
#include <fcntl.h>
#include <io.h>
#endif

#ifdef MSDOS
#ifdef LSI_C
#define setbinmode(fp) fsetbin(fp)
#else /* Microsoft C, Turbo C */
#define setbinmode(fp) setmode(fileno(fp), O_BINARY)
#endif
#else /* UNIX,OS/2 */
#define setbinmode(fp)
#endif

#ifdef _IOFBF /* SysV and MSDOS, Windows */
#define       setvbuffer(fp, buf, size)       setvbuf(fp, buf, _IOFBF, size)
#else /* BSD */
#define       setvbuffer(fp, buf, size)       setbuffer(fp, buf, size)
#endif

/*Borland C++ 4.5 EasyWin*/
#if defined(__TURBOC__) && defined(_Windows) && !defined(__WIN32__) /*Easy Win */
#define         EASYWIN
#ifndef __WIN16__
#define __WIN16__
#endif
#include <windows.h>
#endif

#ifdef OVERWRITE
/* added by satoru@isoternet.org */
#include <sys/stat.h>
#ifndef MSDOS /* UNIX, OS/2 */
#include <unistd.h>
#include <utime.h>
#else /* defined(MSDOS) */
#ifdef __WIN32__
#ifdef __BORLANDC__ /* BCC32 */
#include <utime.h>
#else /* !defined(__BORLANDC__) */
#include <sys/utime.h>
#endif /* (__BORLANDC__) */
#else /* !defined(__WIN32__) */
#if defined(_MSC_VER) || defined(__MINGW32__) /* VC++, MinGW */
#include <sys/utime.h>
#elif defined(__TURBOC__) /* BCC */
#include <utime.h>
#elif defined(LSI_C) /* LSI C */
#endif /* (__WIN32__) */
#endif
#endif
#endif

#ifdef INT_IS_SHORT
#define int long
#endif

#define         FALSE   0
#define         TRUE    1

/* state of output_mode and input_mode

   c2           0 means ASCII
                X0201
                ISO8859_1
                X0208
                EOF      all termination
   c1           32bit data

 */

#define         ASCII           0
#define         X0208           1
#define         X0201           2
#define         ISO8859_1       8
#define         NO_X0201        3
#define         X0212           16

/* Input Assumption */

#define         JIS_INPUT       4
#define         SJIS_INPUT      5
#define         LATIN1_INPUT    6
#define         FIXED_MIME      7
#define         STRICT_MIME     8

/* MIME ENCODE */

#define         ISO2022JP       9
#define         JAPANESE_EUC   10
#define         SHIFT_JIS      11

#define         UTF8           12
#define         UTF8_INPUT     13
#define         UTF16BE_INPUT  14
#define         UTF16LE_INPUT  15

#define         WISH_TRUE      15

/* ASCII CODE */

#define         BS      0x08
#define         TAB     0x09
#define         NL      0x0a
#define         CR      0x0d
#define         ESC     0x1b
#define         SPACE   0x20
#define         AT      0x40
#define         SSP     0xa0
#define         DEL     0x7f
#define         SI      0x0f
#define         SO      0x0e
#define         SSO     0x8e
#define         SS3     0x8f

#define         is_alnum(c)  \
            (('a'<=c && c<='z')||('A'<= c && c<='Z')||('0'<=c && c<='9'))

#define         HOLD_SIZE       1024
#define         IOBUF_SIZE      16384

#define         DEFAULT_J       'B'
#define         DEFAULT_R       'B'

#define         SJ0162  0x00e1          /* 01 - 62 ku offset */
#define         SJ6394  0x0161          /* 63 - 94 ku offset */

#define         RANGE_NUM_MAX   18
#define         GETA1   0x22
#define         GETA2   0x2e

#if defined(UTF8_OUTPUT_ENABLE) || defined(UTF8_INPUT_ENABLE)
#define sizeof_euc_utf8 94
#define sizeof_euc_to_utf8_1byte 94
#define sizeof_euc_to_utf8_2bytes 94
#define sizeof_utf8_to_euc_C2 64
#define sizeof_utf8_to_euc_E5B8 64
#define sizeof_utf8_to_euc_2bytes 112
#define sizeof_utf8_to_euc_3bytes 112
#endif

/* MIME preprocessor */

#ifdef EASYWIN /*Easy Win */
extern POINT _BufferSize;
#endif

/*      function prototype  */

#ifdef ANSI_C_PROTOTYPE
#define PROTO(x)  x
#define STATIC static
#define CONST const
#else
#define PROTO(x)  ()
#define STATIC
#define CONST
#endif

struct input_code{
    char *name;
    int stat;
    int score;
    int index;
    int buf[3];
    void (*status_func)PROTO((struct input_code *, int));
    int (*iconv_func)PROTO((int c2, int c1, int c0));
    int _file_stat;
};

STATIC char *input_codename = "";

#ifndef PERL_XS
STATIC const char *CopyRight = COPY_RIGHT;
#endif
#if !defined(PERL_XS) && !defined(WIN32DLL)
STATIC  int     noconvert PROTO((FILE *f));
#endif
STATIC  int     kanji_convert PROTO((FILE *f));
STATIC  int     h_conv PROTO((FILE *f,int c2,int c1));
STATIC  int     push_hold_buf PROTO((int c2));
STATIC  void    set_iconv PROTO((int f, int (*iconv_func)(int c2,int c1,int c0)));
STATIC  int     s_iconv PROTO((int c2,int c1,int c0));
STATIC  int     s2e_conv PROTO((int c2, int c1, int *p2, int *p1));
STATIC  int     e_iconv PROTO((int c2,int c1,int c0));
#ifdef UTF8_INPUT_ENABLE
STATIC  int     w2e_conv PROTO((int c2,int c1,int c0,int *p2,int *p1));
STATIC  int     w_iconv PROTO((int c2,int c1,int c0));
STATIC  int     w_iconv16 PROTO((int c2,int c1,int c0));
STATIC  int     w_iconv_common PROTO((int c1,int c0,const unsigned short *const *pp,int psize,int *p2,int *p1));
STATIC  int     ww16_conv PROTO((int c2, int c1, int c0));
#endif
#ifdef UTF8_OUTPUT_ENABLE
STATIC  int     e2w_conv PROTO((int c2,int c1));
STATIC  void    w_oconv PROTO((int c2,int c1));
STATIC  void    w_oconv16 PROTO((int c2,int c1));
#endif
STATIC  void    e_oconv PROTO((int c2,int c1));
STATIC  int     e2s_conv PROTO((int c2, int c1, int *p2, int *p1));
STATIC  void    s_oconv PROTO((int c2,int c1));
STATIC  void    j_oconv PROTO((int c2,int c1));
STATIC  void    fold_conv PROTO((int c2,int c1));
STATIC  void    cr_conv PROTO((int c2,int c1));
STATIC  void    z_conv PROTO((int c2,int c1));
STATIC  void    rot_conv PROTO((int c2,int c1));
STATIC  void    hira_conv PROTO((int c2,int c1));
STATIC  void    base64_conv PROTO((int c2,int c1));
STATIC  void    iso2022jp_check_conv PROTO((int c2,int c1));
STATIC  void    no_connection PROTO((int c2,int c1));
STATIC  int     no_connection2 PROTO((int c2,int c1,int c0));

STATIC  void    code_score PROTO((struct input_code *ptr));
STATIC  void    code_status PROTO((int c));

STATIC  void    std_putc PROTO((int c));
STATIC  int     std_getc PROTO((FILE *f));
STATIC  int     std_ungetc PROTO((int c,FILE *f));

STATIC  int     broken_getc PROTO((FILE *f));
STATIC  int     broken_ungetc PROTO((int c,FILE *f));

STATIC  int     mime_begin PROTO((FILE *f));
STATIC  int     mime_getc PROTO((FILE *f));
STATIC  int     mime_ungetc PROTO((int c,FILE *f));

STATIC  int     mime_begin_strict PROTO((FILE *f));
STATIC  int     mime_getc_buf PROTO((FILE *f));
STATIC  int     mime_ungetc_buf  PROTO((int c,FILE *f));
STATIC  int     mime_integrity PROTO((FILE *f,const unsigned char *p));

STATIC  int     base64decode PROTO((int c));
STATIC  void    mime_prechar PROTO((int c2, int c1));
STATIC  void    mime_putc PROTO((int c));
STATIC  void    open_mime PROTO((int c));
STATIC  void    close_mime PROTO(());
#ifndef PERL_XS
STATIC  void    usage PROTO(());
STATIC  void    version PROTO(());
#endif
STATIC  void    options PROTO((unsigned char *c));
#if defined(PERL_XS) || defined(WIN32DLL)
STATIC  void    reinit PROTO(());
#endif

/* buffers */

#if !defined(PERL_XS) && !defined(WIN32DLL)
STATIC unsigned char   stdibuf[IOBUF_SIZE];
STATIC unsigned char   stdobuf[IOBUF_SIZE];
#endif
STATIC unsigned char   hold_buf[HOLD_SIZE*2];
STATIC int             hold_count;

/* MIME preprocessor fifo */

#define MIME_BUF_SIZE   (1024)    /* 2^n ring buffer */
#define MIME_BUF_MASK   (MIME_BUF_SIZE-1)
#define Fifo(n)         mime_buf[(n)&MIME_BUF_MASK]
STATIC unsigned char           mime_buf[MIME_BUF_SIZE];
STATIC unsigned int            mime_top = 0;
STATIC unsigned int            mime_last = 0;  /* decoded */
STATIC unsigned int            mime_input = 0; /* undecoded */
STATIC int (*mime_iconv_back)PROTO((int c2,int c1,int c0)) = NULL;

/* flags */
STATIC int             unbuf_f = FALSE;
STATIC int             estab_f = FALSE;
STATIC int             nop_f = FALSE;
STATIC int             binmode_f = TRUE;       /* binary mode */
STATIC int             rot_f = FALSE;          /* rot14/43 mode */
STATIC int             hira_f = FALSE;          /* hira/kata henkan */
STATIC int             input_f = FALSE;        /* non fixed input code  */
STATIC int             alpha_f = FALSE;        /* convert JIx0208 alphbet to ASCII */
STATIC int             mime_f = STRICT_MIME;   /* convert MIME B base64 or Q */
STATIC int             mime_decode_f = FALSE;  /* mime decode is explicitly on */
STATIC int             mimebuf_f = FALSE;      /* MIME buffered input */
STATIC int             broken_f = FALSE;       /* convert ESC-less broken JIS */
STATIC int             iso8859_f = FALSE;      /* ISO8859 through */
STATIC int             mimeout_f = FALSE;       /* base64 mode */
#if defined(MSDOS) || defined(__OS2__)
STATIC int             x0201_f = TRUE;         /* Assume JISX0201 kana */
#else
STATIC int             x0201_f = NO_X0201;     /* Assume NO JISX0201 */
#endif
STATIC int             iso2022jp_f = FALSE;    /* convert ISO-2022-JP */
#if defined(UTF8_OUTPUT_ENABLE) && defined(UTF8_INPUT_ENABLE)
STATIC int             internal_unicode_f = FALSE;   /* Internal Unicode Processing */
#endif
#ifdef UTF8_OUTPUT_ENABLE
STATIC int             unicode_bom_f= 0;   /* Output Unicode BOM */
STATIC int             w_oconv16_LE = 0;   /* utf-16 little endian */
STATIC int             ms_ucs_map_f = FALSE;   /* Microsoft UCS Mapping Compatible */
#endif

#ifdef UNICODE_NORMALIZATION
STATIC int nfc_f = FALSE;
STATIC int (*i_nfc_getc)PROTO((FILE *)) = std_getc; /* input of ugetc */
STATIC int (*i_nfc_ungetc)PROTO((int c ,FILE *f)) = std_ungetc;
STATIC int nfc_getc PROTO((FILE *f));
STATIC int nfc_ungetc PROTO((int c,FILE *f));
#endif

#ifdef INPUT_OPTION
STATIC int cap_f = FALSE;
STATIC int (*i_cgetc)PROTO((FILE *)) = std_getc; /* input of cgetc */
STATIC int (*i_cungetc)PROTO((int c ,FILE *f)) = std_ungetc;
STATIC int cap_getc PROTO((FILE *f));
STATIC int cap_ungetc PROTO((int c,FILE *f));

STATIC int url_f = FALSE;
STATIC int (*i_ugetc)PROTO((FILE *)) = std_getc; /* input of ugetc */
STATIC int (*i_uungetc)PROTO((int c ,FILE *f)) = std_ungetc;
STATIC int url_getc PROTO((FILE *f));
STATIC int url_ungetc PROTO((int c,FILE *f));
#endif

#ifdef NUMCHAR_OPTION
#define CLASS_MASK  0x0f000000
#define CLASS_UTF16 0x01000000
STATIC int numchar_f = FALSE;
STATIC int (*i_ngetc)PROTO((FILE *)) = std_getc; /* input of ugetc */
STATIC int (*i_nungetc)PROTO((int c ,FILE *f)) = std_ungetc;
STATIC int numchar_getc PROTO((FILE *f));
STATIC int numchar_ungetc PROTO((int c,FILE *f));
#endif

#ifdef CHECK_OPTION
STATIC int noout_f = FALSE;
STATIC void no_putc PROTO((int c));
STATIC int debug_f = FALSE;
STATIC void debug PROTO((const char *str));
STATIC int (*iconv_for_check)() = 0;
#endif

STATIC int guess_f = FALSE;
#if !defined PERL_XS
STATIC  void    print_guessed_code PROTO((char *filename));
#endif
STATIC  void    set_input_codename PROTO((char *codename));
STATIC int is_inputcode_mixed = FALSE;
STATIC int is_inputcode_set   = FALSE;

#ifdef EXEC_IO
STATIC int exec_f = 0;
#endif

#ifdef SHIFTJIS_CP932
STATIC int cp932_f = TRUE;
#define CP932_TABLE_BEGIN (0xfa)
#define CP932_TABLE_END   (0xfc)

STATIC int cp932inv_f = TRUE;
#define CP932INV_TABLE_BEGIN (0xed)
#define CP932INV_TABLE_END   (0xee)

/* STATIC int cp932_conv PROTO((int c2, int c1)); */
#endif /* SHIFTJIS_CP932 */

#ifdef X0212_ENABLE
STATIC int x0212_f = FALSE;
STATIC int x0212_shift PROTO((int c));
STATIC int x0212_unshift PROTO((int c));
#endif

STATIC unsigned char prefix_table[256];

STATIC void e_status PROTO((struct input_code *, int));
STATIC void s_status PROTO((struct input_code *, int));

#ifdef UTF8_INPUT_ENABLE
STATIC void w_status PROTO((struct input_code *, int));
STATIC void w16_status PROTO((struct input_code *, int));
STATIC int             utf16_mode = UTF16BE_INPUT;
#endif

struct input_code input_code_list[] = {
    {"EUC-JP",    0, 0, 0, {0, 0, 0}, e_status, e_iconv, 0},
    {"Shift_JIS", 0, 0, 0, {0, 0, 0}, s_status, s_iconv, 0},
#ifdef UTF8_INPUT_ENABLE
    {"UTF-8",     0, 0, 0, {0, 0, 0}, w_status, w_iconv, 0},
    {"UTF-16",    0, 0, 0, {0, 0, 0}, w16_status, w_iconv16, 0},
#endif
    {0}
};

STATIC int              mimeout_mode = 0;
STATIC int              base64_count = 0;

/* X0208 -> ASCII converter */

/* fold parameter */
STATIC int             f_line = 0;    /* chars in line */
STATIC int             f_prev = 0;
STATIC int             fold_preserve_f = FALSE; /* preserve new lines */
STATIC int             fold_f  = FALSE;
STATIC int             fold_len  = 0;

/* options */
STATIC unsigned char   kanji_intro = DEFAULT_J;
STATIC unsigned char   ascii_intro = DEFAULT_R;

/* Folding */

#define FOLD_MARGIN  10
#define DEFAULT_FOLD 60

STATIC int             fold_margin  = FOLD_MARGIN;

/* converters */

#ifdef DEFAULT_CODE_JIS
#   define  DEFAULT_CONV j_oconv
#endif
#ifdef DEFAULT_CODE_SJIS
#   define  DEFAULT_CONV s_oconv
#endif
#ifdef DEFAULT_CODE_EUC
#   define  DEFAULT_CONV e_oconv
#endif
#ifdef DEFAULT_CODE_UTF8
#   define  DEFAULT_CONV w_oconv
#endif

/* process default */
STATIC void (*output_conv)PROTO((int c2,int c1)) = DEFAULT_CONV;

STATIC void (*oconv)PROTO((int c2,int c1)) = no_connection;
/* s_iconv or oconv */
STATIC int (*iconv)PROTO((int c2,int c1,int c0)) = no_connection2;

STATIC void (*o_zconv)PROTO((int c2,int c1)) = no_connection;
STATIC void (*o_fconv)PROTO((int c2,int c1)) = no_connection;
STATIC void (*o_crconv)PROTO((int c2,int c1)) = no_connection;
STATIC void (*o_rot_conv)PROTO((int c2,int c1)) = no_connection;
STATIC void (*o_hira_conv)PROTO((int c2,int c1)) = no_connection;
STATIC void (*o_base64conv)PROTO((int c2,int c1)) = no_connection;
STATIC void (*o_iso2022jp_check_conv)PROTO((int c2,int c1)) = no_connection;

/* STATIC redirections */

STATIC  void   (*o_putc)PROTO((int c)) = std_putc;

STATIC  int    (*i_getc)PROTO((FILE *f)) = std_getc; /* general input */
STATIC  int    (*i_ungetc)PROTO((int c,FILE *f)) =std_ungetc;

STATIC  int    (*i_bgetc)PROTO((FILE *)) = std_getc; /* input of mgetc */
STATIC  int    (*i_bungetc)PROTO((int c ,FILE *f)) = std_ungetc;

STATIC  void   (*o_mputc)PROTO((int c)) = std_putc ; /* output of mputc */

STATIC  int    (*i_mgetc)PROTO((FILE *)) = std_getc; /* input of mgetc */
STATIC  int    (*i_mungetc)PROTO((int c ,FILE *f)) = std_ungetc;

/* for strict mime */
STATIC  int    (*i_mgetc_buf)PROTO((FILE *)) = std_getc; /* input of mgetc_buf */
STATIC  int    (*i_mungetc_buf)PROTO((int c,FILE *f)) = std_ungetc;

/* Global states */
STATIC int output_mode = ASCII,    /* output kanji mode */
           input_mode =  ASCII,    /* input kanji mode */
           shift_mode =  FALSE;    /* TRUE shift out, or X0201  */
STATIC int mime_decode_mode =   FALSE;    /* MIME mode B base64, Q hex */

/* X0201 / X0208 conversion tables */

/* X0201 kana conversion table */
/* 90-9F A0-DF */
STATIC const
unsigned char cv[]= {
    0x21,0x21,0x21,0x23,0x21,0x56,0x21,0x57,
    0x21,0x22,0x21,0x26,0x25,0x72,0x25,0x21,
    0x25,0x23,0x25,0x25,0x25,0x27,0x25,0x29,
    0x25,0x63,0x25,0x65,0x25,0x67,0x25,0x43,
    0x21,0x3c,0x25,0x22,0x25,0x24,0x25,0x26,
    0x25,0x28,0x25,0x2a,0x25,0x2b,0x25,0x2d,
    0x25,0x2f,0x25,0x31,0x25,0x33,0x25,0x35,
    0x25,0x37,0x25,0x39,0x25,0x3b,0x25,0x3d,
    0x25,0x3f,0x25,0x41,0x25,0x44,0x25,0x46,
    0x25,0x48,0x25,0x4a,0x25,0x4b,0x25,0x4c,
    0x25,0x4d,0x25,0x4e,0x25,0x4f,0x25,0x52,
    0x25,0x55,0x25,0x58,0x25,0x5b,0x25,0x5e,
    0x25,0x5f,0x25,0x60,0x25,0x61,0x25,0x62,
    0x25,0x64,0x25,0x66,0x25,0x68,0x25,0x69,
    0x25,0x6a,0x25,0x6b,0x25,0x6c,0x25,0x6d,
    0x25,0x6f,0x25,0x73,0x21,0x2b,0x21,0x2c,
    0x00,0x00};

/* X0201 kana conversion table for daguten */
/* 90-9F A0-DF */
STATIC const
unsigned char dv[]= {
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x74,
    0x00,0x00,0x00,0x00,0x25,0x2c,0x25,0x2e,
    0x25,0x30,0x25,0x32,0x25,0x34,0x25,0x36,
    0x25,0x38,0x25,0x3a,0x25,0x3c,0x25,0x3e,
    0x25,0x40,0x25,0x42,0x25,0x45,0x25,0x47,
    0x25,0x49,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x25,0x50,0x25,0x53,
    0x25,0x56,0x25,0x59,0x25,0x5c,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00};

/* X0201 kana conversion table for han-daguten */
/* 90-9F A0-DF */
STATIC const
unsigned char ev[]= {
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x25,0x51,0x25,0x54,
    0x25,0x57,0x25,0x5a,0x25,0x5d,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00};

/* X0208 kigou conversion table */
/* 0x8140 - 0x819e */
STATIC const
unsigned char fv[] = {

    0x00,0x00,0x00,0x00,0x2c,0x2e,0x00,0x3a,
    0x3b,0x3f,0x21,0x00,0x00,0x27,0x60,0x00,
    0x5e,0x00,0x5f,0x00,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x2d,0x00,0x2f,
    0x5c,0x00,0x00,0x7c,0x00,0x00,0x60,0x27,
    0x22,0x22,0x28,0x29,0x00,0x00,0x5b,0x5d,
    0x7b,0x7d,0x3c,0x3e,0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x2b,0x2d,0x00,0x00,
    0x00,0x3d,0x00,0x3c,0x3e,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x24,0x00,0x00,0x25,0x23,0x26,0x2a,0x40,
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
} ;

#define    CRLF      1

STATIC int             file_out = FALSE;
#ifdef OVERWRITE
STATIC int             overwrite = FALSE;
#endif

STATIC int             crmode_f = 0;   /* CR, NL, CRLF */
#ifdef EASYWIN /*Easy Win */
STATIC int             end_check;
#endif /*Easy Win */

#define STD_GC_BUFSIZE (256)
int std_gc_buf[STD_GC_BUFSIZE];
int std_gc_ndx;

#ifdef WIN32DLL
#include "nkf32dll.c"
#elif defined(PERL_XS)
#else /* WIN32DLL */
int
main(argc, argv)
    int             argc;
    char          **argv;
{
    FILE  *fin;
    unsigned char  *cp;

    char *outfname = NULL;
    char *origfname;

#ifdef EASYWIN /*Easy Win */
    _BufferSize.y = 400;/*Set Scroll Buffer Size*/
#endif

    for (argc--,argv++; (argc > 0) && **argv == '-'; argc--, argv++) {
        cp = (unsigned char *)*argv;
        options(cp);
#ifdef EXEC_IO
        if (exec_f){
            int fds[2], pid;
            if (pipe(fds) < 0 || (pid = fork()) < 0){
                abort();
            }
            if (pid == 0){
                if (exec_f > 0){
                    close(fds[0]);
                    dup2(fds[1], 1);
                }else{
                    close(fds[1]);
                    dup2(fds[0], 0);
                }
                execvp(argv[1], &argv[1]);
            }
            if (exec_f > 0){
                close(fds[1]);
                dup2(fds[0], 0);
            }else{
                close(fds[0]);
                dup2(fds[1], 1);
            }
            argc = 0;
            break;
        }
#endif
    }
    if(x0201_f == WISH_TRUE)
         x0201_f = ((!iso2022jp_f)? TRUE : NO_X0201);

    if (binmode_f == TRUE)
#ifdef __OS2__
    if (freopen("","wb",stdout) == NULL)
        return (-1);
#else
    setbinmode(stdout);
#endif

    if (unbuf_f)
      setbuf(stdout, (char *) NULL);
    else
      setvbuffer(stdout, stdobuf, IOBUF_SIZE);

    if (argc == 0) {
      if (binmode_f == TRUE)
#ifdef __OS2__
      if (freopen("","rb",stdin) == NULL) return (-1);
#else
      setbinmode(stdin);
#endif
      setvbuffer(stdin, stdibuf, IOBUF_SIZE);
      if (nop_f)
          noconvert(stdin);
      else {
          kanji_convert(stdin);
          if (guess_f) print_guessed_code(NULL);
      }
    } else {
      int nfiles = argc;
      while (argc--) {
            is_inputcode_mixed = FALSE;
            is_inputcode_set   = FALSE;
            input_codename = "";
#ifdef CHECK_OPTION
            iconv_for_check = 0;
#endif
          if ((fin = fopen((origfname = *argv++), "r")) == NULL) {
              perror(*--argv);
              return(-1);
          } else {
#ifdef OVERWRITE
              int fd = 0;
              int fd_backup = 0;
#endif

/* reopen file for stdout */
              if (file_out == TRUE) {
#ifdef OVERWRITE
                  if (overwrite){
                      outfname = malloc(strlen(origfname)
                                        + strlen(".nkftmpXXXXXX")
                                        + 1);
                      if (!outfname){
                          perror(origfname);
                          return -1;
                      }
                      strcpy(outfname, origfname);
#ifdef MSDOS
                      {
                          int i;
                          for (i = strlen(outfname); i; --i){
                              if (outfname[i - 1] == '/'
                                  || outfname[i - 1] == '\\'){
                                  break;
                              }
                          }
                          outfname[i] = '\0';
                      }
                      strcat(outfname, "ntXXXXXX");
                      mktemp(outfname);
                      fd = open(outfname, O_WRONLY | O_CREAT | O_TRUNC,
                                S_IREAD | S_IWRITE);
#else
                      strcat(outfname, ".nkftmpXXXXXX");
                      fd = mkstemp(outfname);
#endif
                      if (fd < 0
                          || (fd_backup = dup(fileno(stdout))) < 0
                          || dup2(fd, fileno(stdout)) < 0
                          ){
                          perror(origfname);
                          return -1;
                      }
                  }else
#endif
                  if(argc == 1 ) {
                      outfname = *argv++;
                      argc--;
                  } else {
                      outfname = "nkf.out";
                  }

                  if(freopen(outfname, "w", stdout) == NULL) {
                      perror (outfname);
                      return (-1);
                  }
                  if (binmode_f == TRUE) {
#ifdef __OS2__
                      if (freopen("","wb",stdout) == NULL)
                           return (-1);
#else
                      setbinmode(stdout);
#endif
                  }
              }
              if (binmode_f == TRUE)
#ifdef __OS2__
                 if (freopen("","rb",fin) == NULL)
                    return (-1);
#else
                 setbinmode(fin);
#endif
              setvbuffer(fin, stdibuf, IOBUF_SIZE);
              if (nop_f)
                  noconvert(fin);
              else {
                  char *filename = NULL;
                  kanji_convert(fin);
                  if (nfiles > 1) filename = origfname;
                  if (guess_f) print_guessed_code(filename);
              }
              fclose(fin);
#ifdef OVERWRITE
              if (overwrite) {
                  struct stat     sb;
#if defined(MSDOS) && !defined(__MINGW32__) && !defined(__WIN32__)
                  time_t tb[2];
#else
                  struct utimbuf  tb;
#endif

                  fflush(stdout);
                  close(fd);
                  if (dup2(fd_backup, fileno(stdout)) < 0){
                      perror("dup2");
                  }
                  if (stat(origfname, &sb)) {
                      fprintf(stderr, "Can't stat %s\n", origfname);
                  }
                  /* $B%Q!<%_%C%7%g%s$rI|85(B */
                  if (chmod(outfname, sb.st_mode)) {
                      fprintf(stderr, "Can't set permission %s\n", outfname);
                  }

                  /* $B%?%$%`%9%?%s%W$rI|85(B */
#if defined(MSDOS) && !defined(__MINGW32__) && !defined(__WIN32__)
                  tb[0] = tb[1] = sb.st_mtime;
                  if (utime(outfname, tb)) {
                      fprintf(stderr, "Can't set timestamp %s\n", outfname);
                  }
#else
                  tb.actime  = sb.st_atime;
                  tb.modtime = sb.st_mtime;
                  if (utime(outfname, &tb)) {
                      fprintf(stderr, "Can't set timestamp %s\n", outfname);
                  }
#endif
#ifdef MSDOS
                  if (unlink(origfname)){
                      perror(origfname);
                  }
#endif
                  if (rename(outfname, origfname)) {
                      perror(origfname);
                      fprintf(stderr, "Can't rename %s to %s\n",
                              outfname, origfname);
                  }
                  free(outfname);
              }
#endif
          }
      }
    }
#ifdef EASYWIN /*Easy Win */
    if (file_out == FALSE)
        scanf("%d",&end_check);
    else
        fclose(stdout);
#else /* for Other OS */
    if (file_out == TRUE)
        fclose(stdout);
#endif /*Easy Win */
    return (0);
}
#endif /* WIN32DLL */

STATIC const
struct {
    const char *name;
    const char *alias;
} long_option[] = {
    {"base64","jMB"},
    {"euc","e"},
    {"euc-input","E"},
    {"fj","jm"},
    {"help","v"},
    {"jis","j"},
    {"jis-input","J"},
    {"mac","sLm"},
    {"mime","jM"},
    {"mime-input","m"},
    {"msdos","sLw"},
    {"sjis","s"},
    {"sjis-input","S"},
    {"unix","eLu"},
    {"version","V"},
    {"windows","sLw"},
    {"hiragana","h1"},
    {"katakana","h2"},
    {"katakana-hiragana","h3"},
    {"guess", "g"},
    {"cp932", ""},
    {"no-cp932", ""},
#ifdef X0212_ENABLE
    {"x0212", ""},
#endif
#if defined(UTF8_OUTPUT_ENABLE) && defined(UTF8_INPUT_ENABLE)
    {"internal-unicode", ""},
#endif
#ifdef UTF8_OUTPUT_ENABLE
    {"utf8", "w"},
    {"utf16", "w16"},
    {"ms-ucs-map", ""},
#endif
#ifdef UTF8_INPUT_ENABLE
    {"utf8-input", "W"},
    {"utf16-input", "W16"},
#endif
#ifdef UNICODE_NORMALIZATION
    {"utf8mac-input", ""},
#endif
#ifdef OVERWRITE
    {"overwrite", ""},
#endif
#ifdef INPUT_OPTION
    {"cap-input", ""},
    {"url-input", ""},
#endif
#ifdef NUMCHAR_OPTION
    {"numchar-input", ""},
#endif
#ifdef CHECK_OPTION
    {"no-output", ""},
    {"debug", ""},
#endif
#ifdef SHIFTJIS_CP932
    {"cp932inv", ""},
#endif
#ifdef EXEC_IO
    {"exec-in", ""},
    {"exec-out", ""},
#endif
    {"prefix=", ""},
};

STATIC int option_mode = 0;

void
options(cp)
     unsigned char *cp;
{
    int i;
    unsigned char *p = NULL;

    if (option_mode==1)
        return;
    while(*cp && *cp++!='-');
    while (*cp) {
        p = 0;
        switch (*cp++) {
        case '-':  /* literal options */
            if (!*cp) {        /* ignore the rest of arguments */
                option_mode = 1;
                return;
            }
            for (i=0;i<sizeof(long_option)/sizeof(long_option[0]);i++) {
                int j;
                p = (unsigned char *)long_option[i].name;
                for (j=0;*p && *p != '=' && *p == cp[j];p++, j++);
                if (*p == cp[j] || cp[j] == ' '){
                    p = &cp[j];
                    break;
                }
                p = 0;
            }
            if (p == 0) return;
            cp = (unsigned char *)long_option[i].alias;
            if (!*cp){
                cp = p;
#ifdef OVERWRITE
                if (strcmp(long_option[i].name, "overwrite") == 0){
                    file_out = TRUE;
                    overwrite = TRUE;
                    continue;
                }
#endif
#ifdef INPUT_OPTION
                if (strcmp(long_option[i].name, "cap-input") == 0){
                    cap_f = TRUE;
                    continue;
                }
                if (strcmp(long_option[i].name, "url-input") == 0){
                    url_f = TRUE;
                    continue;
                }
#endif
#ifdef NUMCHAR_OPTION
                if (strcmp(long_option[i].name, "numchar-input") == 0){
                    numchar_f = TRUE;
                    continue;
                }
#endif
#ifdef CHECK_OPTION
                if (strcmp(long_option[i].name, "no-output") == 0){
                    noout_f = TRUE;
                    continue;
                }
                if (strcmp(long_option[i].name, "debug") == 0){
                    debug_f = TRUE;
                    continue;
                }
#endif
                if (strcmp(long_option[i].name, "cp932") == 0){
#ifdef SHIFTJIS_CP932
                    cp932_f = TRUE;
                    cp932inv_f = TRUE;
#endif
#ifdef UTF8_OUTPUT_ENABLE
                    ms_ucs_map_f = TRUE;
#endif
                    continue;
                }
                if (strcmp(long_option[i].name, "no-cp932") == 0){
#ifdef SHIFTJIS_CP932
                    cp932_f = FALSE;
                    cp932inv_f = FALSE;
#endif
#ifdef UTF8_OUTPUT_ENABLE
                    ms_ucs_map_f = FALSE;
#endif
                    continue;
                }
#ifdef SHIFTJIS_CP932
                if (strcmp(long_option[i].name, "cp932inv") == 0){
                    cp932inv_f = TRUE;
                    continue;
                }
#endif

#ifdef X0212_ENABLE
                if (strcmp(long_option[i].name, "x0212") == 0){
                    x0212_f = TRUE;
                    continue;
                }
#endif

#ifdef EXEC_IO
                  if (strcmp(long_option[i].name, "exec-in") == 0){
                      exec_f = 1;
                      return;
                  }
                  if (strcmp(long_option[i].name, "exec-out") == 0){
                      exec_f = -1;
                      return;
                  }
#endif
#if defined(UTF8_OUTPUT_ENABLE) && defined(UTF8_INPUT_ENABLE)
                if (strcmp(long_option[i].name, "internal-unicode") == 0){
                    internal_unicode_f = TRUE;
                    continue;
                }
#endif
#ifdef UTF8_OUTPUT_ENABLE
                if (strcmp(long_option[i].name, "ms-ucs-map") == 0){
                    ms_ucs_map_f = TRUE;
                    continue;
                }
#endif
#ifdef UNICODE_NORMALIZATION
                if (strcmp(long_option[i].name, "utf8mac-input") == 0){
                    input_f = UTF8_INPUT;
                    nfc_f = TRUE;
                    continue;
                }
#endif
                if (strcmp(long_option[i].name, "prefix=") == 0){
                    if (*p == '=' && ' ' < p[1] && p[1] < 128){
                        for (i = 2; ' ' < p[i] && p[i] < 128; i++){
                            prefix_table[p[i]] = p[1];
                        }
                    }
                    continue;
                }
            }
            continue;
        case 'b':           /* buffered mode */
            unbuf_f = FALSE;
            continue;
        case 'u':           /* non bufferd mode */
            unbuf_f = TRUE;
            continue;
        case 't':           /* transparent mode */
            nop_f = TRUE;
            continue;
        case 'j':           /* JIS output */
        case 'n':
            output_conv = j_oconv;
            continue;
        case 'e':           /* AT&T EUC output */
            output_conv = e_oconv;
            continue;
        case 's':           /* SJIS output */
            output_conv = s_oconv;
            continue;
        case 'l':           /* ISO8859 Latin-1 support, no conversion */
            iso8859_f = TRUE;  /* Only compatible with ISO-2022-JP */
            input_f = LATIN1_INPUT;
            continue;
        case 'i':           /* Kanji IN ESC-$-@/B */
            if (*cp=='@'||*cp=='B')
                kanji_intro = *cp++;
            continue;
        case 'o':           /* ASCII IN ESC-(-J/B */
            if (*cp=='J'||*cp=='B'||*cp=='H')
                ascii_intro = *cp++;
            continue;
        case 'h':
            /*
                bit:1   katakana->hiragana
                bit:2   hiragana->katakana
            */
            if ('9'>= *cp && *cp>='0')
                hira_f |= (*cp++ -'0');
            else
                hira_f |= 1;
            continue;
        case 'r':
            rot_f = TRUE;
            continue;
#if defined(MSDOS) || defined(__OS2__)
        case 'T':
            binmode_f = FALSE;
            continue;
#endif
#ifndef PERL_XS
        case 'V':
            version();
            exit(1);
            break;
        case 'v':
            usage();
            exit(1);
            break;
#endif
#ifdef UTF8_OUTPUT_ENABLE
        case 'w':           /* UTF-8 output */
            if ('1'== cp[0] && '6'==cp[1]) {
                output_conv = w_oconv16; cp+=2;
                if (cp[0]=='L') {
                    unicode_bom_f=2; cp++;
                    w_oconv16_LE = 1;
                    if (cp[0] == '0'){
                        unicode_bom_f=1; cp++;
                    }
                } else if (cp[0] == 'B') {
                    unicode_bom_f=2; cp++;
                    if (cp[0] == '0'){
                        unicode_bom_f=1; cp++;
                    }
                }
            } else if (cp[0] == '8') {
                output_conv = w_oconv; cp++;
                unicode_bom_f=2;
                if (cp[0] == '0'){
                    unicode_bom_f=1; cp++;
                }
            } else
                output_conv = w_oconv;
            continue;
#endif
#ifdef UTF8_INPUT_ENABLE
        case 'W':           /* UTF-8 input */
            if ('1'== cp[0] && '6'==cp[1]) {
                input_f = UTF16BE_INPUT;
                utf16_mode = UTF16BE_INPUT;
                cp += 2;
                if (cp[0]=='L') {
                    cp++;
                    input_f = UTF16LE_INPUT;
                    utf16_mode = UTF16LE_INPUT;
                } else if (cp[0] == 'B') {
                    cp++;
                    input_f = UTF16BE_INPUT;
                    utf16_mode = UTF16BE_INPUT;
                }
            } else if (cp[0] == '8') {
                cp++;
                input_f = UTF8_INPUT;
            } else
                input_f = UTF8_INPUT;
            continue;
#endif
        /* Input code assumption */
        case 'J':   /* JIS input */
        case 'E':   /* AT&T EUC input */
            input_f = JIS_INPUT;
            continue;
        case 'S':   /* MS Kanji input */
            input_f = SJIS_INPUT;
            if (x0201_f==NO_X0201) x0201_f=TRUE;
            continue;
        case 'Z':   /* Convert X0208 alphabet to asii */
            /*  bit:0   Convert X0208
                bit:1   Convert Kankaku to one space
                bit:2   Convert Kankaku to two spaces
                bit:3   Convert HTML Entity
            */
            if ('9'>= *cp && *cp>='0')
                alpha_f |= 1<<(*cp++ -'0');
            else
                alpha_f |= TRUE;
            continue;
        case 'x':   /* Convert X0201 kana to X0208 or X0201 Conversion */
            x0201_f = FALSE;    /* No X0201->X0208 conversion */
            /* accept  X0201
                    ESC-(-I     in JIS, EUC, MS Kanji
                    SI/SO       in JIS, EUC, MS Kanji
                    SSO         in EUC, JIS, not in MS Kanji
                    MS Kanji (0xa0-0xdf)
               output  X0201
                    ESC-(-I     in JIS (0x20-0x5f)
                    SSO         in EUC (0xa0-0xdf)
                    0xa0-0xd    in MS Kanji (0xa0-0xdf)
            */
            continue;
        case 'X':   /* Assume X0201 kana */
            /* Default value is NO_X0201 for EUC/MS-Kanji mix */
            x0201_f = TRUE;
            continue;
        case 'F':   /* prserve new lines */
            fold_preserve_f = TRUE;
        case 'f':   /* folding -f60 or -f */
            fold_f = TRUE;
            fold_len = 0;
            while('0'<= *cp && *cp <='9') { /* we don't use atoi here */
                fold_len *= 10;
                fold_len += *cp++ - '0';
            }
            if (!(0<fold_len && fold_len<BUFSIZ))
                fold_len = DEFAULT_FOLD;
            if (*cp=='-') {
                fold_margin = 0;
                cp++;
                while('0'<= *cp && *cp <='9') { /* we don't use atoi here */
                    fold_margin *= 10;
                    fold_margin += *cp++ - '0';
                }
            }
            continue;
        case 'm':   /* MIME support */
            /* mime_decode_f = TRUE; */ /* this has too large side effects... */
            if (*cp=='B'||*cp=='Q') {
                mime_decode_mode = *cp++;
                mimebuf_f = FIXED_MIME;
            } else if (*cp=='N') {
                mime_f = TRUE; cp++;
            } else if (*cp=='S') {
                mime_f = STRICT_MIME; cp++;
            } else if (*cp=='0') {
                mime_decode_f = FALSE;
                mime_f = FALSE; cp++;
            }
            continue;
        case 'M':   /* MIME output */
            if (*cp=='B') {
                mimeout_mode = 'B';
                mimeout_f = FIXED_MIME; cp++;
            } else if (*cp=='Q') {
                mimeout_mode = 'Q';
                mimeout_f = FIXED_MIME; cp++;
            } else {
                mimeout_f = TRUE;
            }
            continue;
        case 'B':   /* Broken JIS support */
            /*  bit:0   no ESC JIS
                bit:1   allow any x on ESC-(-x or ESC-$-x
                bit:2   reset to ascii on NL
            */
            if ('9'>= *cp && *cp>='0')
                broken_f |= 1<<(*cp++ -'0');
            else
                broken_f |= TRUE;
            continue;
#ifndef PERL_XS
        case 'O':/* for Output file */
            file_out = TRUE;
            continue;
#endif
        case 'c':/* add cr code */
            crmode_f = CRLF;
            continue;
        case 'd':/* delete cr code */
            crmode_f = NL;
            continue;
        case 'I':   /* ISO-2022-JP output */
            iso2022jp_f = TRUE;
            continue;
        case 'L':  /* line mode */
            if (*cp=='u') {         /* unix */
                crmode_f = NL; cp++;
            } else if (*cp=='m') { /* mac */
                crmode_f = CR; cp++;
            } else if (*cp=='w') { /* windows */
                crmode_f = CRLF; cp++;
            } else if (*cp=='0') { /* no conversion  */
                crmode_f = 0; cp++;
            }
            continue;
        case 'g':
#ifndef PERL_XS
            guess_f = TRUE;
#endif
            continue;
        case ' ':
        /* module muliple options in a string are allowed for Perl moudle  */
            while(*cp && *cp++!='-');
            continue;
        default:
            /* bogus option but ignored */
            continue;
        }
    }
}

#ifdef ANSI_C_PROTOTYPE
struct input_code * find_inputcode_byfunc(int (*iconv_func)(int c2,int c1,int c0))
#else
struct input_code * find_inputcode_byfunc(iconv_func)
     int (*iconv_func)();
#endif
{
    if (iconv_func){
        struct input_code *p = input_code_list;
        while (p->name){
            if (iconv_func == p->iconv_func){
                return p;
            }
            p++;
        }
    }
    return 0;
}

#ifdef ANSI_C_PROTOTYPE
void set_iconv(int f, int (*iconv_func)(int c2,int c1,int c0))
#else
void set_iconv(f, iconv_func)
     int f;
     int (*iconv_func)();
#endif
{
#ifdef INPUT_CODE_FIX
    if (f || !input_f)
#endif
        if (estab_f != f){
            estab_f = f;
        }

    if (iconv_func
#ifdef INPUT_CODE_FIX
        && (f == -TRUE || !input_f) /* -TRUE means "FORCE" */
#endif
        ){
        iconv = iconv_func;
    }
#ifdef CHECK_OPTION
    if (estab_f && iconv_for_check != iconv){
        struct input_code *p = find_inputcode_byfunc(iconv);
        if (p){
            set_input_codename(p->name);
            debug(input_codename);
        }
        iconv_for_check = iconv;
    }
#endif
}

#define SCORE_L2       (1)                   /* $BBh(B2$B?e=`4A;z(B */
#define SCORE_KANA     (SCORE_L2 << 1)       /* $B$$$o$f$kH>3Q%+%J(B */
#define SCORE_DEPEND   (SCORE_KANA << 1)     /* $B5!<o0MB8J8;z(B */
#ifdef SHIFTJIS_CP932
#define SCORE_CP932    (SCORE_DEPEND << 1)   /* CP932 $B$K$h$kFI$_49$((B */
#define SCORE_NO_EXIST (SCORE_CP932 << 1)    /* $BB8:_$7$J$$J8;z(B */
#else
#define SCORE_NO_EXIST (SCORE_DEPEND << 1)   /* $BB8:_$7$J$$J8;z(B */
#endif
#define SCORE_iMIME    (SCORE_NO_EXIST << 1) /* MIME $B$K$h$k;XDj(B */
#define SCORE_ERROR    (SCORE_iMIME << 1) /* $B%(%i!<(B */

#define SCORE_INIT (SCORE_iMIME)

const int score_table_A0[] = {
    0, 0, 0, 0,
    0, 0, 0, 0,
    0, SCORE_DEPEND, SCORE_DEPEND, SCORE_DEPEND,
    SCORE_DEPEND, SCORE_DEPEND, SCORE_DEPEND, SCORE_NO_EXIST,
};

const int score_table_F0[] = {
    SCORE_L2, SCORE_L2, SCORE_L2, SCORE_L2,
    SCORE_L2, SCORE_DEPEND, SCORE_NO_EXIST, SCORE_NO_EXIST,
    SCORE_DEPEND, SCORE_DEPEND, SCORE_DEPEND, SCORE_DEPEND,
    SCORE_DEPEND, SCORE_NO_EXIST, SCORE_NO_EXIST, SCORE_ERROR,
};

void set_code_score(ptr, score)
     struct input_code *ptr;
     int score;
{
    if (ptr){
        ptr->score |= score;
    }
}

void clr_code_score(ptr, score)
     struct input_code *ptr;
     int score;
{
    if (ptr){
        ptr->score &= ~score;
    }
}

void code_score(ptr)
     struct input_code *ptr;
{
    int c2 = ptr->buf[0];
#ifdef UTF8_OUTPUT_ENABLE
    int c1 = ptr->buf[1];
#endif
    if (c2 < 0){
        set_code_score(ptr, SCORE_ERROR);
    }else if (c2 == SSO){
        set_code_score(ptr, SCORE_KANA);
#ifdef UTF8_OUTPUT_ENABLE
    }else if (!e2w_conv(c2, c1)){
        set_code_score(ptr, SCORE_NO_EXIST);
#endif
    }else if ((c2 & 0x70) == 0x20){
        set_code_score(ptr, score_table_A0[c2 & 0x0f]);
    }else if ((c2 & 0x70) == 0x70){
        set_code_score(ptr, score_table_F0[c2 & 0x0f]);
    }else if ((c2 & 0x70) >= 0x50){
        set_code_score(ptr, SCORE_L2);
    }
}

void status_disable(ptr)
struct input_code *ptr;
{
    ptr->stat = -1;
    ptr->buf[0] = -1;
    code_score(ptr);
    if (iconv == ptr->iconv_func) set_iconv(FALSE, 0);
}

void status_push_ch(ptr, c)
     struct input_code *ptr;
     int c;
{
    ptr->buf[ptr->index++] = c;
}

void status_clear(ptr)
     struct input_code *ptr;
{
    ptr->stat = 0;
    ptr->index = 0;
}

void status_reset(ptr)
     struct input_code *ptr;
{
    status_clear(ptr);
    ptr->score = SCORE_INIT;
}

void status_reinit(ptr)
     struct input_code *ptr;
{
    status_reset(ptr);
    ptr->_file_stat = 0;
}

void status_check(ptr, c)
     struct input_code *ptr;
     int c;
{
    if (c <= DEL && estab_f){
        status_reset(ptr);
    }
}

void s_status(ptr, c)
     struct input_code *ptr;
     int c;
{
    switch(ptr->stat){
      case -1:
          status_check(ptr, c);
          break;
      case 0:
          if (c <= DEL){
              break;
#ifdef NUMCHAR_OPTION
          }else if ((c & CLASS_MASK) == CLASS_UTF16){
              break;
#endif
          }else if (0xa1 <= c && c <= 0xdf){
              status_push_ch(ptr, SSO);
              status_push_ch(ptr, c);
              code_score(ptr);
              status_clear(ptr);
          }else if ((0x81 <= c && c < 0xa0) || (0xe0 <= c && c <= 0xef)){
              ptr->stat = 1;
              status_push_ch(ptr, c);
#ifdef SHIFTJIS_CP932
          }else if (cp932_f
                    && CP932_TABLE_BEGIN <= c && c <= CP932_TABLE_END){
              ptr->stat = 2;
              status_push_ch(ptr, c);
#endif /* SHIFTJIS_CP932 */
#ifdef X0212_ENABLE
          }else if (x0212_f && 0xf0 <= c && c <= 0xfc){
              ptr->stat = 1;
              status_push_ch(ptr, c);
#endif /* X0212_ENABLE */
          }else{
              status_disable(ptr);
          }
          break;
      case 1:
          if ((0x40 <= c && c <= 0x7e) || (0x80 <= c && c <= 0xfc)){
              status_push_ch(ptr, c);
              s2e_conv(ptr->buf[0], ptr->buf[1], &ptr->buf[0], &ptr->buf[1]);
              code_score(ptr);
              status_clear(ptr);
          }else{
              status_disable(ptr);
          }
          break;
      case 2:
#ifdef SHIFTJIS_CP932
          if ((0x40 <= c && c <= 0x7e) || (0x80 <= c && c <= 0xfc)){
              status_push_ch(ptr, c);
              if (s2e_conv(ptr->buf[0], ptr->buf[1], &ptr->buf[0], &ptr->buf[1]) == 0){
                  set_code_score(ptr, SCORE_CP932);
                  status_clear(ptr);
                  break;
              }
          }
#endif /* SHIFTJIS_CP932 */
#ifndef X0212_ENABLE
          status_disable(ptr);
          break;
#endif
    }
}

void e_status(ptr, c)
     struct input_code *ptr;
     int c;
{
    switch (ptr->stat){
      case -1:
          status_check(ptr, c);
          break;
      case 0:
          if (c <= DEL){
              break;
#ifdef NUMCHAR_OPTION
          }else if ((c & CLASS_MASK) == CLASS_UTF16){
              break;
#endif
          }else if (SSO == c || (0xa1 <= c && c <= 0xfe)){
              ptr->stat = 1;
              status_push_ch(ptr, c);
#ifdef X0212_ENABLE
          }else if (0x8f == c){
              ptr->stat = 2;
              status_push_ch(ptr, c);
#endif /* X0212_ENABLE */
          }else{
              status_disable(ptr);
          }
          break;
      case 1:
          if (0xa1 <= c && c <= 0xfe){
              status_push_ch(ptr, c);
              code_score(ptr);
              status_clear(ptr);
          }else{
              status_disable(ptr);
          }
          break;
#ifdef X0212_ENABLE
      case 2:
          if (0xa1 <= c && c <= 0xfe){
              ptr->stat = 1;
              status_push_ch(ptr, c);
          }else{
              status_disable(ptr);
          }
#endif /* X0212_ENABLE */
    }
}

#ifdef UTF8_INPUT_ENABLE
void w16_status(ptr, c)
     struct input_code *ptr;
     int c;
{
    switch (ptr->stat){
      case -1:
          break;
      case 0:
          if (ptr->_file_stat == 0){
              if (c == 0xfe || c == 0xff){
                  ptr->stat = c;
                  status_push_ch(ptr, c);
                  ptr->_file_stat = 1;
              }else{
                  status_disable(ptr);
                  ptr->_file_stat = -1;
              }
          }else if (ptr->_file_stat > 0){
              ptr->stat = 1;
              status_push_ch(ptr, c);
          }else if (ptr->_file_stat < 0){
              status_disable(ptr);
          }
          break;

      case 1:
          if (c == EOF){
              status_disable(ptr);
              ptr->_file_stat = -1;
          }else{
              status_push_ch(ptr, c);
              status_clear(ptr);
          }
          break;

      case 0xfe:
      case 0xff:
          if (ptr->stat != c && (c == 0xfe || c == 0xff)){
              status_push_ch(ptr, c);
              status_clear(ptr);
          }else{
              status_disable(ptr);
              ptr->_file_stat = -1;
          }
          break;
    }
}

void w_status(ptr, c)
     struct input_code *ptr;
     int c;
{
    switch (ptr->stat){
      case -1:
          status_check(ptr, c);
          break;
      case 0:
          if (c <= DEL){
              break;
#ifdef NUMCHAR_OPTION
          }else if ((c & CLASS_MASK) == CLASS_UTF16){
              break;
#endif
          }else if (0xc0 <= c && c <= 0xdf){
              ptr->stat = 1;
              status_push_ch(ptr, c);
          }else if (0xe0 <= c && c <= 0xef){
              ptr->stat = 2;
              status_push_ch(ptr, c);
          }else{
              status_disable(ptr);
          }
          break;
      case 1:
      case 2:
          if (0x80 <= c && c <= 0xbf){
              status_push_ch(ptr, c);
              if (ptr->index > ptr->stat){
                  int bom = (ptr->buf[0] == 0xef && ptr->buf[1] == 0xbb
                             && ptr->buf[2] == 0xbf);
                  w2e_conv(ptr->buf[0], ptr->buf[1], ptr->buf[2],
                           &ptr->buf[0], &ptr->buf[1]);
                  if (!bom){
                      code_score(ptr);
                  }
                  status_clear(ptr);
              }
          }else{
              status_disable(ptr);
          }
          break;
    }
}
#endif

void
code_status(c)
     int c;
{
    int action_flag = 1;
    struct input_code *result = 0;
    struct input_code *p = input_code_list;
    while (p->name){
        (p->status_func)(p, c);
        if (p->stat > 0){
            action_flag = 0;
        }else if(p->stat == 0){
            if (result){
                action_flag = 0;
            }else{
                result = p;
            }
        }
        ++p;
    }

    if (action_flag){
        if (result && !estab_f){
            set_iconv(TRUE, result->iconv_func);
        }else if (c <= DEL){
            struct input_code *ptr = input_code_list;
            while (ptr->name){
                status_reset(ptr);
                ++ptr;
            }
        }
    }
}

#ifndef WIN32DLL
int
std_getc(f)
FILE *f;
{
    if (std_gc_ndx){
        return std_gc_buf[--std_gc_ndx];
    }
    return getc(f);
}
#endif /*WIN32DLL*/

int
std_ungetc(c,f)
int c;
FILE *f;
{
    if (std_gc_ndx == STD_GC_BUFSIZE){
        return EOF;
    }
    std_gc_buf[std_gc_ndx++] = c;
    return c;
}

#ifndef WIN32DLL
void
std_putc(c)
int c;
{
    if(c!=EOF)
      putchar(c);
}
#endif /*WIN32DLL*/

#if !defined(PERL_XS) && !defined(WIN32DLL)
int
noconvert(f)
    FILE  *f;
{
    int    c;

    while ((c = (*i_getc)(f)) != EOF)
      (*o_putc)(c);
    return 1;
}
#endif

void
module_connection()
{
    oconv = output_conv;
    o_putc = std_putc;

    /* replace continucation module, from output side */

    /* output redicrection */
#ifdef CHECK_OPTION
    if (noout_f || guess_f){
        o_putc = no_putc;
    }
#endif
    if (mimeout_f) {
        o_mputc = o_putc;
        o_putc = mime_putc;
        if (mimeout_f == TRUE) {
            o_base64conv = oconv; oconv = base64_conv;
        }
        /* base64_count = 0; */
    }

    if (crmode_f) {
        o_crconv = oconv; oconv = cr_conv;
    }
    if (rot_f) {
        o_rot_conv = oconv; oconv = rot_conv;
    }
    if (iso2022jp_f) {
        o_iso2022jp_check_conv = oconv; oconv = iso2022jp_check_conv;
    }
    if (hira_f) {
        o_hira_conv = oconv; oconv = hira_conv;
    }
    if (fold_f) {
        o_fconv = oconv; oconv = fold_conv;
        f_line = 0;
    }
    if (alpha_f || x0201_f) {
        o_zconv = oconv; oconv = z_conv;
    }

    i_getc = std_getc;
    i_ungetc = std_ungetc;
    /* input redicrection */
#ifdef INPUT_OPTION
    if (cap_f){
        i_cgetc = i_getc; i_getc = cap_getc;
        i_cungetc = i_ungetc; i_ungetc= cap_ungetc;
    }
    if (url_f){
        i_ugetc = i_getc; i_getc = url_getc;
        i_uungetc = i_ungetc; i_ungetc= url_ungetc;
    }
#endif
#ifdef NUMCHAR_OPTION
    if (numchar_f){
        i_ngetc = i_getc; i_getc = numchar_getc;
        i_nungetc = i_ungetc; i_ungetc= numchar_ungetc;
    }
#endif
#ifdef UNICODE_NORMALIZATION
    if (nfc_f && input_f == UTF8_INPUT){
        i_nfc_getc = i_getc; i_getc = nfc_getc;
        i_nfc_ungetc = i_ungetc; i_ungetc= nfc_ungetc;
    }
#endif
    if (mime_f && mimebuf_f==FIXED_MIME) {
        i_mgetc = i_getc; i_getc = mime_getc;
        i_mungetc = i_ungetc; i_ungetc = mime_ungetc;
    }
    if (broken_f & 1) {
        i_bgetc = i_getc; i_getc = broken_getc;
        i_bungetc = i_ungetc; i_ungetc = broken_ungetc;
    }
    if (input_f == JIS_INPUT || input_f == LATIN1_INPUT) {
        set_iconv(-TRUE, e_iconv);
    } else if (input_f == SJIS_INPUT) {
        set_iconv(-TRUE, s_iconv);
#ifdef UTF8_INPUT_ENABLE
    } else if (input_f == UTF8_INPUT) {
        set_iconv(-TRUE, w_iconv);
    } else if (input_f == UTF16BE_INPUT) {
        set_iconv(-TRUE, w_iconv16);
    } else if (input_f == UTF16LE_INPUT) {
        set_iconv(-TRUE, w_iconv16);
#endif
    } else {
        set_iconv(FALSE, e_iconv);
    }

    {
        struct input_code *p = input_code_list;
        while (p->name){
            status_reinit(p++);
        }
    }
}

/*
   Conversion main loop. Code detection only.
 */

int
kanji_convert(f)
    FILE  *f;
{
    int    c1,
                    c2, c3;
    int is_8bit = FALSE;

    module_connection();
    c2 = 0;

    input_mode = ASCII;
    output_mode = ASCII;
    shift_mode = FALSE;

#define NEXT continue      /* no output, get next */
#define SEND ;             /* output c1 and c2, get next */
#define LAST break         /* end of loop, go closing  */

    while ((c1 = (*i_getc)(f)) != EOF) {
        code_status(c1);
        if (c2) {
            /* second byte */
            if (c2 > DEL) {
                /* in case of 8th bit is on */
                if (!estab_f&&!mime_decode_mode) {
                    /* in case of not established yet */
                    /* It is still ambiguious */
                    if (h_conv(f, c2, c1)==EOF)
                        LAST;
                    else
                        c2 = 0;
                    NEXT;
                } else
                    /* in case of already established */
                    if (c1 < AT) {
                        /* ignore bogus code */
                        c2 = 0;
                        NEXT;
                    } else
                        SEND;
            } else
                /* second byte, 7 bit code */
                /* it might be kanji shitfted */
                if ((c1 == DEL) || (c1 <= SPACE)) {
                    /* ignore bogus first code */
                    c2 = 0;
                    NEXT;
                } else
                    SEND;
        } else {
            /* first byte */
            if (
#ifdef UTF8_INPUT_ENABLE
                iconv == w_iconv16
#else
                0
#endif
                ) {
                c2 = c1;
                c1 = (*i_getc)(f);
                SEND;
#ifdef NUMCHAR_OPTION
            } else if ((c1 & CLASS_MASK) == CLASS_UTF16){
                SEND;
#endif
            } else if (c1 > DEL) {
                /* 8 bit code */
                if (!estab_f && !iso8859_f) {
                    /* not established yet */
                    if (!is_8bit) is_8bit = TRUE;
                    c2 = c1;
                    NEXT;
                } else { /* estab_f==TRUE */
                    if (iso8859_f) {
                        c2 = ISO8859_1;
                        c1 &= 0x7f;
                        SEND;
                    } else if (SSP<=c1 && c1<0xe0 && iconv == s_iconv) {
                        /* SJIS X0201 Case... */
                        if(iso2022jp_f && x0201_f==NO_X0201) {
                            (*oconv)(GETA1, GETA2);
                            NEXT;
                        } else {
                            c2 = X0201;
                            c1 &= 0x7f;
                            SEND;
                        }
                    } else if (c1==SSO && iconv != s_iconv) {
                        /* EUC X0201 Case */
                        c1 = (*i_getc)(f);  /* skip SSO */
                        code_status(c1);
                        if (SSP<=c1 && c1<0xe0) {
                            if(iso2022jp_f &&  x0201_f==NO_X0201) {
                                (*oconv)(GETA1, GETA2);
                                NEXT;
                            } else {
                                c2 = X0201;
                                c1 &= 0x7f;
                                SEND;
                            }
                        } else  { /* bogus code, skip SSO and one byte */
                            NEXT;
                        }
                    } else {
                       /* already established */
                       c2 = c1;
                       NEXT;
                    }
                }
            } else if ((c1 > SPACE) && (c1 != DEL)) {
                /* in case of Roman characters */
                if (shift_mode) {
                    /* output 1 shifted byte */
                    if (iso8859_f) {
                        c2 = ISO8859_1;
                        SEND;
                    } else if (SPACE<=c1 && c1<(0xe0&0x7f) ){
                      /* output 1 shifted byte */
                        if(iso2022jp_f && x0201_f==NO_X0201) {
                            (*oconv)(GETA1, GETA2);
                            NEXT;
                        } else {
                            c2 = X0201;
                            SEND;
                        }
                    } else {
                        /* look like bogus code */
                        NEXT;
                    }
                } else if (input_mode == X0208) {
                    /* in case of Kanji shifted */
                    c2 = c1;
                    NEXT;
                } else if (c1 == '=' && mime_f && !mime_decode_mode ) {
                    /* Check MIME code */
                    if ((c1 = (*i_getc)(f)) == EOF) {
                        (*oconv)(0, '=');
                        LAST;
                    } else if (c1 == '?') {
                        /* =? is mime conversion start sequence */
                        if(mime_f == STRICT_MIME) {
                            /* check in real detail */
                            if (mime_begin_strict(f) == EOF)
                                LAST;
                            else
                                NEXT;
                        } else if (mime_begin(f) == EOF)
                            LAST;
                        else
                            NEXT;
                    } else {
                        (*oconv)(0, '=');
                        (*i_ungetc)(c1,f);
                        NEXT;
                    }
                } else {
                    /* normal ASCII code */
                    SEND;
                }
            } else if (c1 == SI) {
                shift_mode = FALSE;
                NEXT;
            } else if (c1 == SO) {
                shift_mode = TRUE;
                NEXT;
            } else if (c1 == ESC ) {
                if ((c1 = (*i_getc)(f)) == EOF) {
                    /*  (*oconv)(0, ESC); don't send bogus code */
                    LAST;
                } else if (c1 == '$') {
                    if ((c1 = (*i_getc)(f)) == EOF) {
                        /*
                        (*oconv)(0, ESC); don't send bogus code
                        (*oconv)(0, '$'); */
                        LAST;
                    } else if (c1 == '@'|| c1 == 'B') {
                        /* This is kanji introduction */
                        input_mode = X0208;
                        shift_mode = FALSE;
                        set_input_codename("ISO-2022-JP");
#ifdef CHECK_OPTION
                        debug(input_codename);
#endif
                        NEXT;
                    } else if (c1 == '(') {
                        if ((c1 = (*i_getc)(f)) == EOF) {
                            /* don't send bogus code
                            (*oconv)(0, ESC);
                            (*oconv)(0, '$');
                            (*oconv)(0, '(');
                                */
                            LAST;
                        } else if (c1 == '@'|| c1 == 'B') {
                            /* This is kanji introduction */
                            input_mode = X0208;
                            shift_mode = FALSE;
                            NEXT;
#ifdef X0212_ENABLE
                        } else if (c1 == 'D'){
                            input_mode = X0212;
                            shift_mode = FALSE;
                            NEXT;
#endif /* X0212_ENABLE */
                        } else {
                            /* could be some special code */
                            (*oconv)(0, ESC);
                            (*oconv)(0, '$');
                            (*oconv)(0, '(');
                            (*oconv)(0, c1);
                            NEXT;
                        }
                    } else if (broken_f&0x2) {
                        /* accept any ESC-(-x as broken code ... */
                        input_mode = X0208;
                        shift_mode = FALSE;
                        NEXT;
                    } else {
                        (*oconv)(0, ESC);
                        (*oconv)(0, '$');
                        (*oconv)(0, c1);
                        NEXT;
                    }
                } else if (c1 == '(') {
                    if ((c1 = (*i_getc)(f)) == EOF) {
                        /* don't send bogus code
                        (*oconv)(0, ESC);
                        (*oconv)(0, '('); */
                        LAST;
                    } else {
                        if (c1 == 'I') {
                            /* This is X0201 kana introduction */
                            input_mode = X0201; shift_mode = X0201;
                            NEXT;
                        } else if (c1 == 'B' || c1 == 'J' || c1 == 'H') {
                            /* This is X0208 kanji introduction */
                            input_mode = ASCII; shift_mode = FALSE;
                            NEXT;
                        } else if (broken_f&0x2) {
                            input_mode = ASCII; shift_mode = FALSE;
                            NEXT;
                        } else {
                            (*oconv)(0, ESC);
                            (*oconv)(0, '(');
                            /* maintain various input_mode here */
                            SEND;
                        }
                    }
               } else if ( c1 == 'N' || c1 == 'n' ){
                   /* SS2 */
                   c3 = (*i_getc)(f);  /* skip SS2 */
                   if ( (SPACE<=c3 && c3 < 0x60) || (0xa0<=c3 && c3 < 0xe0)){
                       c1 = c3;
                       c2 = X0201;
                       SEND;
                   }else{
                       (*i_ungetc)(c3, f);
                       /* lonely ESC  */
                       (*oconv)(0, ESC);
                       SEND;
                   }
                } else {
                    /* lonely ESC  */
                    (*oconv)(0, ESC);
                    SEND;
                }
            } else if ((c1 == NL || c1 == CR) && broken_f&4) {
                input_mode = ASCII; set_iconv(FALSE, 0);
                SEND;
            } else if (c1 == NL && mime_decode_f && !mime_decode_mode ) {
                if ((c1=(*i_getc)(f))!=EOF && c1 == SPACE) {
                    i_ungetc(SPACE,f);
                    continue;
                } else {
                    i_ungetc(c1,f);
                }
                c1 = NL;
                SEND;
            } else if (c1 == CR && mime_decode_f && !mime_decode_mode ) {
                if ((c1=(*i_getc)(f))!=EOF) {
                    if (c1==SPACE) {
                        i_ungetc(SPACE,f);
                        continue;
                    } else if (c1 == NL && (c1=(*i_getc)(f))!=EOF && c1 == SPACE) {
                        i_ungetc(SPACE,f);
                        continue;
                    } else {
                        i_ungetc(c1,f);
                    }
                    i_ungetc(NL,f);
                } else {
                    i_ungetc(c1,f);
                }
                c1 = CR;
                SEND;
            } else
                SEND;
        }
        /* send: */
        if (input_mode == X0208)
            (*oconv)(c2, c1);  /* this is JIS, not SJIS/EUC case */
#ifdef X0212_ENABLE
        else if (input_mode == X0212)
            (*oconv)((0x8f << 8) | c2, c1);
#endif /* X0212_ENABLE */
        else if (input_mode)
            (*oconv)(input_mode, c1);  /* other special case */
        else if ((*iconv)(c2, c1, 0) < 0){  /* can be EUC/SJIS */
            int c0 = (*i_getc)(f);
            if (c0 != EOF){
                code_status(c0);
                (*iconv)(c2, c1, c0);
            }
        }

        c2 = 0;
        continue;
        /* goto next_word */
    }

    /* epilogue */
    (*iconv)(EOF, 0, 0);
    if (!is_inputcode_set)
    {
        if (is_8bit) {
            struct input_code *p = input_code_list;
            struct input_code *result = p;
            while (p->name){
                if (p->score < result->score) result = p;
                ++p;
            }
            set_input_codename(result->name);
        }
    }
    return 1;
}

int
h_conv(f, c2, c1)
    FILE  *f;
    int    c1,
                    c2;
{
    int    wc,c3;

    /** it must NOT be in the kanji shifte sequence      */
    /** it must NOT be written in JIS7                   */
    /** and it must be after 2 byte 8bit code            */

    hold_count = 0;
    push_hold_buf(c2);
    push_hold_buf(c1);
    c2 = 0;

    while ((c1 = (*i_getc)(f)) != EOF) {
        if (c1 == ESC){
            (*i_ungetc)(c1,f);
            break;
        }
        code_status(c1);
        if (push_hold_buf(c1) == EOF || estab_f){
            break;
        }
    }

    if (!estab_f){
        struct input_code *p = input_code_list;
        struct input_code *result = p;
        if (c1 == EOF){
            code_status(c1);
        }
        while (p->name){
            if (p->score < result->score){
                result = p;
            }
            ++p;
        }
        set_iconv(FALSE, result->iconv_func);
    }

    /** now,
     ** 1) EOF is detected, or
     ** 2) Code is established, or
     ** 3) Buffer is FULL (but last word is pushed)
     **
     ** in 1) and 3) cases, we continue to use
     ** Kanji codes by oconv and leave estab_f unchanged.
     **/

    c3=c1;
    wc = 0;
    while (wc < hold_count){
        c2 = hold_buf[wc++];
        if (c2 <= DEL
#ifdef NUMCHAR_OPTION
            || (c2 & CLASS_MASK) == CLASS_UTF16
#endif
            ){
            (*iconv)(0, c2, 0);
            continue;
        }else if (iconv == s_iconv && 0xa1 <= c2 && c2 <= 0xdf){
            (*iconv)(X0201, c2, 0);
            continue;
        }
        if (wc < hold_count){
            c1 = hold_buf[wc++];
        }else{
            c1 = (*i_getc)(f);
            if (c1 == EOF){
                c3 = EOF;
                break;
            }
            code_status(c1);
        }
        if ((*iconv)(c2, c1, 0) < 0){
            int c0;
            if (wc < hold_count){
                c0 = hold_buf[wc++];
            }else{
                c0 = (*i_getc)(f);
                if (c0 == EOF){
                    c3 = EOF;
                    break;
                }
                code_status(c0);
            }
            (*iconv)(c2, c1, c0);
            c1 = c0;
        }
    }
    return c3;
}

int
push_hold_buf(c2)
     int             c2;
{
    if (hold_count >= HOLD_SIZE*2)
        return (EOF);
    hold_buf[hold_count++] = c2;
    return ((hold_count >= HOLD_SIZE*2) ? EOF : hold_count);
}

int s2e_conv(c2, c1, p2, p1)
     int c2, c1;
     int *p2, *p1;
{
#if defined(SHIFTJIS_CP932) || defined(X0212_ENABLE)
    int val;
#endif
#ifdef SHIFTJIS_CP932
    if (cp932_f && CP932_TABLE_BEGIN <= c2 && c2 <= CP932_TABLE_END){
        extern const unsigned short shiftjis_cp932[3][189];
        val = shiftjis_cp932[c2 - CP932_TABLE_BEGIN][c1 - 0x40];
        if (val){
            c2 = val >> 8;
            c1 = val & 0xff;
        }
    }
#endif /* SHIFTJIS_CP932 */
#ifdef X0212_ENABLE
    if (x0212_f && 0xfa <= c2 && c2 <= 0xfc){
        extern const unsigned short shiftjis_x0212[3][189];
        val = shiftjis_x0212[c2 - 0xfa][c1 - 0x40];
        if (val){
            if (val & 0x8000){
                c2 = (0x8f << 8) | (val >> 8);
                c1 = val & 0xff;
            }else{
                c2 = val >> 8;
                c1 = val & 0xff;
            }
            if (p2) *p2 = c2;
            if (p1) *p1 = c1;
            return 0;
        }
    }
#endif
    c2 = c2 + c2 - ((c2 <= 0x9f) ? SJ0162 : SJ6394);
    if (c1 < 0x9f)
        c1 = c1 - ((c1 > DEL) ? SPACE : 0x1f);
    else {
        c1 = c1 - 0x7e;
        c2++;
    }

#ifdef X0212_ENABLE
    if (x0212_f){
        c2 = x0212_unshift(c2);
    }
#endif
    if (p2) *p2 = c2;
    if (p1) *p1 = c1;
    return 0;
}

int
s_iconv(c2, c1, c0)
    int    c2,
                    c1, c0;
{
    if (c2 == X0201) {
        c1 &= 0x7f;
    } else if ((c2 == EOF) || (c2 == 0) || c2 < SPACE) {
        /* NOP */
    } else {
        int ret = s2e_conv(c2, c1, &c2, &c1);
        if (ret) return ret;
    }
    (*oconv)(c2, c1);
    return 0;
}

int
e_iconv(c2, c1, c0)
    int    c2,
                    c1, c0;
{
    if (c2 == X0201) {
        c1 &= 0x7f;
#ifdef X0212_ENABLE
    }else if (c2 == 0x8f){
        if (c0 == 0){
            return -1;
        }
        c2 = (c2 << 8) | (c1 & 0x7f);
        c1 = c0 & 0x7f;
#ifdef SHIFTJIS_CP932
        if (cp932_f){
            int s2, s1;
            if (e2s_conv(c2, c1, &s2, &s1) == 0){
                s2e_conv(s2, s1, &c2, &c1);
                if ((c2 & 0xff00) == 0){
                    c1 &= 0x7f;
                    c2 &= 0x7f;
                }
            }
        }
#endif /* SHIFTJIS_CP932 */
#endif /* X0212_ENABLE */
    } else if (c2 == SSO){
        c2 = X0201;
        c1 &= 0x7f;
    } else if ((c2 == EOF) || (c2 == 0) || c2 < SPACE) {
        /* NOP */
    } else {
        c1 &= 0x7f;
        c2 &= 0x7f;
    }
    (*oconv)(c2, c1);
    return 0;
}

#ifdef UTF8_INPUT_ENABLE
int
w2e_conv(c2, c1, c0, p2, p1)
    int    c2, c1, c0;
    int *p2, *p1;
{
    extern const unsigned short *const utf8_to_euc_2bytes[];
    extern const unsigned short *const *const utf8_to_euc_3bytes[];
    int ret = 0;

    if (0xc0 <= c2 && c2 <= 0xef) {
        const unsigned short *const *pp;

        if (0xe0 <= c2) {
            if (c0 == 0) return -1;
            pp = utf8_to_euc_3bytes[c2 - 0x80];
            ret = w_iconv_common(c1, c0, pp, sizeof_utf8_to_euc_C2, p2, p1);
        } else {
            ret =  w_iconv_common(c2, c1, utf8_to_euc_2bytes, sizeof_utf8_to_euc_2bytes, p2, p1);
        }
#ifdef NUMCHAR_OPTION
        if (ret){
            if (p2) *p2 = 0;
            if (p1) *p1 = CLASS_UTF16 | ww16_conv(c2, c1, c0);
            ret = 0;
        }
#endif
        return ret;
    } else if (c2 == X0201) {
        c1 &= 0x7f;
    }
    if (p2) *p2 = c2;
    if (p1) *p1 = c1;
    return ret;
}

int
w_iconv(c2, c1, c0)
    int    c2,
                    c1, c0;
{
    int ret = 0;

    if (c0 == 0){
        if (c2 == 0) /* 0x00-0x7f */
            ; /* 1byte */
        else if ((c2 & 0xe0) == 0xc0) /* 0xc0-0xdf */
            ; /* 2ytes */
        else if ((c2 & 0xf0) == 0xe0) /* 0xe0-0xef */
            return -1; /* 3bytes */
#ifdef __COMMENT__
        else if (0xf0 <= c2)
            return 0; /* 4,5,6bytes */
        else if ((c2 & 0xc0) == 0x80) /* 0x80-0xbf */
            return 0; /* trail byte */
#endif
        else return 0;
    }
    if (c2 == EOF);
    else if (c2 == 0xef && c1 == 0xbb && c0 == 0xbf) {
        return 0; /* throw BOM */
#if defined(UTF8_OUTPUT_ENABLE) && defined(UTF8_INPUT_ENABLE)
    } else if (internal_unicode_f && (output_conv == w_oconv || output_conv == w_oconv16)){
        unsigned short val = 0;
        if(c2 == 0){
            c2 = c1;
            c1 = 0;
        }
        val = ww16_conv(c2, c1, c0);
        c2 = (val >> 8) & 0xff;
        c1 = val & 0xff;
#endif
    } else {
        ret = w2e_conv(c2, c1, c0, &c2, &c1);
    }
    if (ret == 0){
        (*oconv)(c2, c1);
    }
    return ret;
}

void
w16w_conv(val, p2, p1, p0)
     unsigned short val;
     int *p2, *p1, *p0;
{
    if (val < 0x80){
        *p2 = val;
        *p1 = 0;
        *p0 = 0;
    }else if (val < 0x800){
        *p2 = 0xc0 | (val >> 6);
        *p1 = 0x80 | (val & 0x3f);
        *p0 = 0;
    }else{
        *p2 = 0xe0 | (val >> 12);
        *p1 = 0x80 | ((val >> 6) & 0x3f);
        *p0 = 0x80 | (val        & 0x3f);
    }
}

int
ww16_conv(c2, c1, c0)
     int c2, c1, c0;
{
    unsigned short val;
    if (c2 >= 0xe0){
        val = (c2 & 0x0f) << 12;
        val |= (c1 & 0x3f) << 6;
        val |= (c0 & 0x3f);
    }else if (c2 >= 0xc0){
        val = (c2 & 0x1f) << 6;
        val |= (c1 & 0x3f);
    }else{
        val = c2;
    }
    return val;
}

int
w16e_conv(val, p2, p1)
     unsigned short val;
     int *p2, *p1;
{
    extern const unsigned short *const utf8_to_euc_2bytes[];
    extern const unsigned short *const *const utf8_to_euc_3bytes[];
    int c2, c1, c0;
    const unsigned short *const *pp;
    int psize;
    int ret = 0;

    w16w_conv(val, &c2, &c1, &c0);
    if (c1){
        if (c0){
            pp = utf8_to_euc_3bytes[c2 - 0x80];
            psize = sizeof_utf8_to_euc_C2;
            ret =  w_iconv_common(c1, c0, pp, psize, p2, p1);
        }else{
            pp = utf8_to_euc_2bytes;
            psize = sizeof_utf8_to_euc_2bytes;
            ret =  w_iconv_common(c2, c1, pp, psize, p2, p1);
        }
#ifdef NUMCHAR_OPTION
        if (ret){
            *p2 = 0;
            *p1 = CLASS_UTF16 | val;
            ret = 0;
        }
#endif
    }else{
        *p2 = 0;
        *p1 = c2;
    }
    return ret;
}

int
w_iconv16(c2, c1, c0)
    int    c2, c1,c0;
{
    int ret = 0;

    if (c2==0376 && c1==0377){
        utf16_mode = UTF16BE_INPUT;
        return 0;
    } else if (c2==0377 && c1==0376){
        utf16_mode = UTF16LE_INPUT;
        return 0;
    }
    if (c2 != EOF && utf16_mode == UTF16LE_INPUT) {
        int tmp;
        tmp=c1; c1=c2; c2=tmp;
    }
    if ((c2==0 && c1 < 0x80) || c2==EOF) {
        (*oconv)(c2, c1);
        return 0;
    }
#if defined(UTF8_OUTPUT_ENABLE) && defined(UTF8_INPUT_ENABLE)
    if (internal_unicode_f && (output_conv == w_oconv || output_conv == w_oconv16));
#endif
    else ret = w16e_conv(((c2<<8)&0xff00) + c1, &c2, &c1);
    if (ret) return ret;
    (*oconv)(c2, c1);
    return 0;
}

int
w_iconv_common(c1, c0, pp, psize, p2, p1)
    int    c1,c0;
    const unsigned short *const *pp;
    int psize;
    int *p2, *p1;
{
    int c2;
    const unsigned short *p;
    unsigned short val;

    if (pp == 0) return 1;

    c1 -= 0x80;
    if (c1 < 0 || psize <= c1) return 1;
    p = pp[c1];
    if (p == 0)  return 1;

    c0 -= 0x80;
    if (c0 < 0 || sizeof_utf8_to_euc_E5B8 <= c0) return 1;
    val = p[c0];
    if (val == 0) return 1;

    c2 = val >> 8;
    if (val & 0x8000){
        c2 &= 0x7f;
        c2 |= 0x8f00;
    }
    if (c2 == SO) c2 = X0201;
    c1 = val & 0x7f;
    if (p2) *p2 = c2;
    if (p1) *p1 = c1;
    return 0;
}

#endif

#ifdef UTF8_OUTPUT_ENABLE
int
e2w_conv(c2, c1)
    int    c2, c1;
{
    extern const unsigned short euc_to_utf8_1byte[];
    extern const unsigned short *const euc_to_utf8_2bytes[];
    extern const unsigned short *const euc_to_utf8_2bytes_ms[];
    const unsigned short *p;

    if (c2 == X0201) {
        p = euc_to_utf8_1byte;
#ifdef X0212_ENABLE
    } else if (c2 >> 8 == 0x8f){
        extern const unsigned short *const x0212_to_utf8_2bytes[];
        c2 = (c2&0x7f) - 0x21;
        if (0<=c2 && c2<sizeof_euc_to_utf8_2bytes)
            p = x0212_to_utf8_2bytes[c2];
        else
            return 0;
#endif
    } else {
        c2 &= 0x7f;
        c2 = (c2&0x7f) - 0x21;
        if (0<=c2 && c2<sizeof_euc_to_utf8_2bytes)
            p = ms_ucs_map_f ? euc_to_utf8_2bytes_ms[c2] : euc_to_utf8_2bytes[c2];
        else
            return 0;
    }
    if (!p) return 0;
    c1 = (c1 & 0x7f) - 0x21;
    if (0<=c1 && c1<sizeof_euc_to_utf8_1byte)
        return p[c1];
    return 0;
}

void
w_oconv(c2, c1)
    int    c2,
                    c1;
{
    int c0;
    unsigned short val;
    if (c2 == EOF) {
        (*o_putc)(EOF);
        return;
    }

    if (unicode_bom_f==2) {
        (*o_putc)('\357');
        (*o_putc)('\273');
        (*o_putc)('\277');
        unicode_bom_f=1;
    }

#ifdef NUMCHAR_OPTION
    if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16){
        w16w_conv(c1, &c2, &c1, &c0);
        (*o_putc)(c2);
        if (c1){
            (*o_putc)(c1);
            if (c0) (*o_putc)(c0);
        }
        return;
    }
#endif

    if (c2 == 0) {
        output_mode = ASCII;
        (*o_putc)(c1);
    } else if (c2 == ISO8859_1) {
        output_mode = ISO8859_1;
        (*o_putc)(c1 | 0x080);
    } else {
        output_mode = UTF8;
        if (internal_unicode_f && (iconv == w_iconv || iconv == w_iconv16))
            val = ((c2<<8)&0xff00) + c1;
        else val = e2w_conv(c2, c1);
        if (val){
            w16w_conv(val, &c2, &c1, &c0);
            (*o_putc)(c2);
            if (c1){
                (*o_putc)(c1);
                if (c0) (*o_putc)(c0);
            }
        }
    }
}

void
w_oconv16(c2, c1)
    int    c2,
                    c1;
{
    if (c2 == EOF) {
        (*o_putc)(EOF);
        return;
    }

    if (unicode_bom_f==2) {
        if (w_oconv16_LE){
            (*o_putc)((unsigned char)'\377');
            (*o_putc)('\376');
        }else{
            (*o_putc)('\376');
            (*o_putc)((unsigned char)'\377');
        }
        unicode_bom_f=1;
    }

    if (internal_unicode_f && (iconv == w_iconv || iconv == w_iconv16)){
    } else if (c2 == ISO8859_1) {
        c2 = 0;
        c1 |= 0x80;
#ifdef NUMCHAR_OPTION
    } else if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16) {
        c2 = (c1 >> 8) & 0xff;
        c1 &= 0xff;
#endif
    } else if (c2) {
        unsigned short val = e2w_conv(c2, c1);
        c2 = (val >> 8) & 0xff;
        c1 = val & 0xff;
    }
    if (w_oconv16_LE){
        (*o_putc)(c1);
        (*o_putc)(c2);
    }else{
        (*o_putc)(c2);
        (*o_putc)(c1);
    }
}

#endif

void
e_oconv(c2, c1)
    int    c2,
                    c1;
{
#ifdef NUMCHAR_OPTION
    if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16){
        w16e_conv(c1, &c2, &c1);
        if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16){
            return;
        }
    }
#endif
    if (c2 == EOF) {
        (*o_putc)(EOF);
        return;
    } else if (c2 == 0) {
        output_mode = ASCII;
        (*o_putc)(c1);
    } else if (c2 == X0201) {
        output_mode = JAPANESE_EUC;
        (*o_putc)(SSO); (*o_putc)(c1|0x80);
    } else if (c2 == ISO8859_1) {
        output_mode = ISO8859_1;
        (*o_putc)(c1 | 0x080);
#ifdef X0212_ENABLE
    } else if ((c2 & 0xff00) >> 8 == 0x8f){
        output_mode = JAPANESE_EUC;
#ifdef SHIFTJIS_CP932
        if (cp932_f){
            int s2, s1;
            if (e2s_conv(c2, c1, &s2, &s1) == 0){
                s2e_conv(s2, s1, &c2, &c1);
            }
        }
#endif
        if ((c2 & 0xff00) >> 8 == 0x8f){
            if (x0212_f){
                (*o_putc)(0x8f);
                (*o_putc)((c2 & 0x7f) | 0x080);
                (*o_putc)(c1 | 0x080);
            }
        }else{
            (*o_putc)((c2 & 0x7f) | 0x080);
            (*o_putc)(c1 | 0x080);
        }
#endif
    } else {
        if ((c1<0x21 || 0x7e<c1) ||
           (c2<0x21 || 0x7e<c2)) {
            set_iconv(FALSE, 0);
            return; /* too late to rescue this char */
        }
        output_mode = JAPANESE_EUC;
        (*o_putc)(c2 | 0x080);
        (*o_putc)(c1 | 0x080);
    }
}

#ifdef X0212_ENABLE
int x0212_shift(c)
     int c;
{
    int ret = c;
    c &= 0x7f;
    if ((ret & 0xff00) == 0x8f00){
        if (0x75 <= c && c <= 0x7f){
            ret = c + (0x109 - 0x75);
        }
    }else{
        if (0x75 <= c && c <= 0x7f){
            ret = c + (0x113 - 0x75);
        }
    }
    return ret;
}

int x0212_unshift(c)
     int c;
{
    int ret = c;
    if (0x7f <= c && c <= 0x88){
        ret = c + (0x75 - 0x7f);
    }else if (0x89 <= c && c <= 0x92){
        ret = (0x8f << 8) | 0x80 | (c + (0x75 - 0x89));
    }
    return ret;
}
#endif /* X0212_ENABLE */

int
e2s_conv(c2, c1, p2, p1)
     int c2, c1, *p2, *p1;
{
#ifdef X0212_ENABLE
    int val = 0;
    const unsigned short *ptr;
    int ndx;
    extern const unsigned short *const x0212_shiftjis[];
    if ((c2 & 0xff00) == 0x8f00){
        ndx = c2 & 0x7f;
        if (0x21 <= ndx && ndx <= 0x7e){
            ptr = x0212_shiftjis[ndx - 0x21];
            if (ptr){
                val = ptr[(c1 & 0x7f) - 0x21];
            }
            if (val){
                c2 = val >> 8;
                c1 = val & 0xff;
                if (p2) *p2 = c2;
                if (p1) *p1 = c1;
                return 0;
            }
        }
        c2 = x0212_shift(c2);
    }
#endif /* X0212_ENABLE */
    if ((c2 & 0xff00) == 0x8f00){
        return 1;
    }
    if (p2) *p2 = ((c2 - 1) >> 1) + ((c2 <= 0x5e) ? 0x71 : 0xb1);
    if (p1) *p1 = c1 + ((c2 & 1) ? ((c1 < 0x60) ? 0x1f : 0x20) : 0x7e);
    return 0;
}

void
s_oconv(c2, c1)
    int    c2,
                    c1;
{
#ifdef NUMCHAR_OPTION
    if (c2 == 0 && (c1 & CLASS_MASK) == CLASS_UTF16){
        w16e_conv(c1, &c2, &c1);
    }
#endif
    if (c2 == EOF) {
        (*o_putc)(EOF);
        return;
    } else if (c2 == 0) {
        output_mode = ASCII;
        (*o_putc)(c1);
    } else if (c2 == X0201) {
        output_mode = SHIFT_JIS;
        (*o_putc)(c1|0x80);
    } else if (c2 == ISO8859_1) {
        output_mode = ISO8859_1;
        (*o_putc)(c1 | 0x080);
#ifdef X0212_ENABLE
    } else if ((c2 & 0xff00) >> 8 == 0x8f){
        output_mode = SHIFT_JIS;
        if (e2s_conv(c2, c1, &c2, &c1) == 0){
            (*o_putc)(c2);
            (*o_putc)(c1);
        }
#endif
    } else {
        if ((c1<0x20 || 0x7e<c1) ||
           (c2<0x20 || 0x7e<c2)) {
            set_iconv(FALSE, 0);
            return; /* too late to rescue this char */
        }
        output_mode = SHIFT_JIS;
        e2s_conv(c2, c1, &c2, &c1);

#ifdef SHIFTJIS_CP932
        if (cp932inv_f
            && CP932INV_TABLE_BEGIN <= c2 && c2 <= CP932INV_TABLE_END){
            extern const unsigned short cp932inv[2][189];
            int c = cp932inv[c2 - CP932INV_TABLE_BEGIN][c1 - 0x40];
            if (c){
                c2 = c >> 8;
                c1 = c & 0xff;
            }
        }
#endif /* SHIFTJIS_CP932 */

        (*o_putc)(c2);
        if (prefix_table[(unsigned char)c1]){
            (*o_putc)(prefix_table[(unsigned char)c1]);
        }
        (*o_putc)(c1);
    }
}

void
j_oconv(c2, c1)
    int    c2,
                    c1;
{
#ifdef NUMCHAR_OPTION
    if ((c1 & CLASS_MASK) == CLASS_UTF16){
        w16e_conv(c1, &c2, &c1);
    }
#endif
    if (c2 == EOF) {
        if (output_mode !=ASCII && output_mode!=ISO8859_1) {
            (*o_putc)(ESC);
            (*o_putc)('(');
            (*o_putc)(ascii_intro);
            output_mode = ASCII;
        }
        (*o_putc)(EOF);
#ifdef X0212_ENABLE
    } else if ((c2 & 0xff00) >> 8 == 0x8f){
        if (output_mode!=X0212) {
            output_mode = X0212;
            (*o_putc)(ESC);
            (*o_putc)('$');
            (*o_putc)('(');
            (*o_putc)('D');
        }
        (*o_putc)(c2 & 0x7f);
        (*o_putc)(c1);
#endif
    } else if (c2==X0201) {
        if (output_mode!=X0201) {
            output_mode = X0201;
            (*o_putc)(ESC);
            (*o_putc)('(');
            (*o_putc)('I');
        }
        (*o_putc)(c1);
    } else if (c2==ISO8859_1) {
            /* iso8859 introduction, or 8th bit on */
            /* Can we convert in 7bit form using ESC-'-'-A ?
               Is this popular? */
        output_mode = ISO8859_1;
        (*o_putc)(c1|0x80);
    } else if (c2 == 0) {
        if (output_mode !=ASCII && output_mode!=ISO8859_1) {
            (*o_putc)(ESC);
            (*o_putc)('(');
            (*o_putc)(ascii_intro);
            output_mode = ASCII;
        }
        (*o_putc)(c1);
    } else {
        if (output_mode != X0208) {
            output_mode = X0208;
            (*o_putc)(ESC);
            (*o_putc)('$');
            (*o_putc)(kanji_intro);
        }
        if (c1<0x20 || 0x7e<c1)
            return;
        if (c2<0x20 || 0x7e<c2)
            return;
        (*o_putc)(c2);
        (*o_putc)(c1);
    }
}

void
base64_conv(c2, c1)
    int    c2,
                    c1;
{
    mime_prechar(c2, c1);
    (*o_base64conv)(c2,c1);
}

STATIC int broken_buf[3];
STATIC int broken_counter = 0;
STATIC int broken_last = 0;
int
broken_getc(f)
FILE *f;
{
    int c,c1;

    if (broken_counter>0) {
        return broken_buf[--broken_counter];
    }
    c= (*i_bgetc)(f);
    if (c=='$' && broken_last != ESC
            && (input_mode==ASCII || input_mode==X0201)) {
        c1= (*i_bgetc)(f);
        broken_last = 0;
        if (c1=='@'|| c1=='B') {
            broken_buf[0]=c1; broken_buf[1]=c;
            broken_counter=2;
            return ESC;
        } else {
            (*i_bungetc)(c1,f);
            return c;
        }
    } else if (c=='(' && broken_last != ESC
            && (input_mode==X0208 || input_mode==X0201)) { /* ) */
        c1= (*i_bgetc)(f);
        broken_last = 0;
        if (c1=='J'|| c1=='B') {
            broken_buf[0]=c1; broken_buf[1]=c;
            broken_counter=2;
            return ESC;
        } else {
            (*i_bungetc)(c1,f);
            return c;
        }
    } else {
        broken_last = c;
        return c;
    }
}

int
broken_ungetc(c,f)
int c;
FILE *f;
{
    if (broken_counter<2)
        broken_buf[broken_counter++]=c;
    return c;
}

STATIC int prev_cr = 0;

void
cr_conv(c2,c1)
int c2,c1;
{
    if (prev_cr) {
        prev_cr = 0;
        if (! (c2==0&&c1==NL) ) {
            cr_conv(0,'\n');
        }
    }
    if (c2) {
        (*o_crconv)(c2,c1);
    } else if (c1=='\r') {
        prev_cr = c1;
    } else if (c1=='\n') {
        if (crmode_f==CRLF) {
            (*o_crconv)(0,'\r');
        } else if (crmode_f==CR) {
            (*o_crconv)(0,'\r');
            return;
        }
        (*o_crconv)(0,NL);
    } else if (c1!='\032' || crmode_f!=NL){
        (*o_crconv)(c2,c1);
    }
}

/*
  Return value of fold_conv()

       \n  add newline  and output char
       \r  add newline  and output nothing
       ' ' space
       0   skip
       1   (or else) normal output

  fold state in prev (previous character)

      >0x80 Japanese (X0208/X0201)
      <0x80 ASCII
      \n    new line
      ' '   space

  This fold algorthm does not preserve heading space in a line.
  This is the main difference from fmt.
*/

#define char_size(c2,c1) (c2?2:1)

void
fold_conv(c2,c1)
int c2,c1;
{
    int prev0;
    int fold_state=0;

    if (c1== '\r' && !fold_preserve_f) {
        fold_state=0;  /* ignore cr */
    }else if (c1== '\n'&&f_prev=='\r' && fold_preserve_f) {
        f_prev = '\n';
        fold_state=0;  /* ignore cr */
    } else if (c1== BS) {
        if (f_line>0) f_line--;
        fold_state =  1;
    } else if (c2==EOF && f_line != 0) {    /* close open last line */
            fold_state = '\n';
    } else if ((c1=='\n' && !fold_preserve_f)
               || ((c1=='\r'||(c1=='\n'&&f_prev!='\r'))
                   && fold_preserve_f)) {
        /* new line */
        if (fold_preserve_f) {
            f_prev = c1;
            f_line = 0;
            fold_state =  '\r';
        } else if ((f_prev == c1 && !fold_preserve_f)
                   || (f_prev == '\n' && fold_preserve_f)
                   ) {        /* duplicate newline */
            if (f_line) {
                f_line = 0;
                fold_state =  '\n';    /* output two newline */
            } else {
                f_line = 0;
                fold_state =  1;
            }
        } else  {
            if (f_prev&0x80) {     /* Japanese? */
                f_prev = c1;
                fold_state =  0;       /* ignore given single newline */
            } else if (f_prev==' ') {
                fold_state =  0;
            } else {
                f_prev = c1;
                if (++f_line<=fold_len)
                    fold_state =  ' ';
                else {
                    f_line = 0;
                    fold_state =  '\r';        /* fold and output nothing */
                }
            }
        }
    } else if (c1=='\f') {
        f_prev = '\n';
        if (f_line==0)
            fold_state =  1;
        f_line = 0;
        fold_state =  '\n';            /* output newline and clear */
    } else if ( (c2==0  && c1==' ')||
               (c2==0  && c1=='\t')||
               (c2=='!'&& c1=='!')) {
        /* X0208 kankaku or ascii space */
            if (f_prev == ' ') {
                fold_state = 0;         /* remove duplicate spaces */
            } else {
                f_prev = ' ';
                if (++f_line<=fold_len)
                    fold_state = ' ';         /* output ASCII space only */
                else {
                    f_prev = ' '; f_line = 0;
                    fold_state = '\r';        /* fold and output nothing */
                }
            }
    } else {
        prev0 = f_prev; /* we still need this one... , but almost done */
        f_prev = c1;
        if (c2 || c2==X0201)
            f_prev |= 0x80;  /* this is Japanese */
        f_line += char_size(c2,c1);
        if (f_line<=fold_len) {   /* normal case */
            fold_state = 1;
        } else {
            if (f_line>=fold_len+fold_margin) { /* too many kinsou suspension */
                f_line = char_size(c2,c1);
                fold_state =  '\n';       /* We can't wait, do fold now */
            } else if (c2==X0201) {
            /* simple kinsoku rules  return 1 means no folding  */
                if (c1==(0xde&0x7f)) fold_state = 1; /* $B!+(B*/
                else if (c1==(0xdf&0x7f)) fold_state = 1; /* $B!,(B*/
                else if (c1==(0xa4&0x7f)) fold_state = 1; /* $B!#(B*/
                else if (c1==(0xa3&0x7f)) fold_state = 1; /* $B!$(B*/
                else if (c1==(0xa1&0x7f)) fold_state = 1; /* $B!W(B*/
                else if (c1==(0xb0&0x7f)) fold_state = 1; /* - */
                else if (SPACE<=c1 && c1<=(0xdf&0x7f)) {      /* X0201 */
                    f_line = 1;
                    fold_state = '\n';/* add one new f_line before this character */
                } else {
                    f_line = 1;
                    fold_state = '\n';/* add one new f_line before this character */
                }
            } else if (c2==0) {
                /* kinsoku point in ASCII */
                if (  c1==')'||    /* { [ ( */
                     c1==']'||
                     c1=='}'||
                     c1=='.'||
                     c1==','||
                     c1=='!'||
                     c1=='?'||
                     c1=='/'||
                     c1==':'||
                     c1==';' ) {
                    fold_state = 1;
                /* just after special */
                } else if (!is_alnum(prev0)) {
                    f_line = char_size(c2,c1);
                    fold_state = '\n';
                } else if ((prev0==' ') ||   /* ignored new f_line */
                      (prev0=='\n')||        /* ignored new f_line */
                      (prev0&0x80)) {        /* X0208 - ASCII */
                    f_line = char_size(c2,c1);
                    fold_state = '\n';/* add one new f_line before this character */
                } else {
                    fold_state = 1;  /* default no fold in ASCII */
                }
            } else {
                if (c2=='!') {
                    if (c1=='"')  fold_state = 1; /* $B!"(B */
                    else if (c1=='#')  fold_state = 1; /* $B!#(B */
                    else if (c1=='W')  fold_state = 1; /* $B!W(B */
                    else if (c1=='K')  fold_state = 1; /* $B!K(B */
                    else if (c1=='$')  fold_state = 1; /* $B!$(B */
                    else if (c1=='%')  fold_state = 1; /* $B!%(B */
                    else if (c1=='\'') fold_state = 1; /* $B!\(B */
                    else if (c1=='(')  fold_state = 1; /* $B!((B */
                    else if (c1==')')  fold_state = 1; /* $B!)(B */
                    else if (c1=='*')  fold_state = 1; /* $B!*(B */
                    else if (c1=='+')  fold_state = 1; /* $B!+(B */
                    else if (c1==',')  fold_state = 1; /* $B!,(B */
                         /* default no fold in kinsoku */
                    else {
                        fold_state = '\n';
                        f_line = char_size(c2,c1);
                        /* add one new f_line before this character */
                    }
                } else {
                    f_line = char_size(c2,c1);
                    fold_state = '\n';
                    /* add one new f_line before this character */
                }
            }
        }
    }
    /* terminator process */
    switch(fold_state) {
        case '\n':
            (*o_fconv)(0,'\n');
            (*o_fconv)(c2,c1);
            break;
        case 0:
            return;
        case '\r':
            (*o_fconv)(0,'\n');
            break;
        case '\t':
        case ' ':
            (*o_fconv)(0,' ');
            break;
        default:
            (*o_fconv)(c2,c1);
    }
}

int z_prev2=0,z_prev1=0;

void
z_conv(c2,c1)
int c2,c1;
{

    /* if (c2) c1 &= 0x7f; assertion */

    if (x0201_f && z_prev2==X0201) {  /* X0201 */
        if (c1==(0xde&0x7f)) { /* $BByE@(B */
            z_prev2=0;
            (*o_zconv)(dv[(z_prev1-SPACE)*2],dv[(z_prev1-SPACE)*2+1]);
            return;
        } else if (c1==(0xdf&0x7f)&&ev[(z_prev1-SPACE)*2]) {  /* $BH>ByE@(B */
            z_prev2=0;
            (*o_zconv)(ev[(z_prev1-SPACE)*2],ev[(z_prev1-SPACE)*2+1]);
            return;
        } else {
            z_prev2=0;
            (*o_zconv)(cv[(z_prev1-SPACE)*2],cv[(z_prev1-SPACE)*2+1]);
        }
    }

    if (c2==EOF) {
        (*o_zconv)(c2,c1);
        return;
    }

    if (x0201_f && c2==X0201) {
        if (dv[(c1-SPACE)*2]||ev[(c1-SPACE)*2]) {
            /* wait for $BByE@(B or $BH>ByE@(B */
            z_prev1 = c1; z_prev2 = c2;
            return;
        } else {
            (*o_zconv)(cv[(c1-SPACE)*2],cv[(c1-SPACE)*2+1]);
            return;
        }
    }

    /* JISX0208 Alphabet */
    if (alpha_f && c2 == 0x23 ) {
        c2 = 0;
    } else if (alpha_f && c2 == 0x21 ) {
    /* JISX0208 Kigou */
       if (0x21==c1) {
           if (alpha_f&0x2) {
               c1 = ' ';
               c2 = 0;
           } else if (alpha_f&0x4) {
                (*o_zconv)(0,' ');
                (*o_zconv)(0,' ');
                return;
           }
       } else if (0x20<c1 && c1<0x7f && fv[c1-0x20]) {
           c1 = fv[c1-0x20];
           c2 =  0;
           if (alpha_f&0x8) {
               char *entity = 0;
               switch (c1){
                 case '>': entity = "&gt;"; break;
                 case '<': entity = "&lt;"; break;
                 case '\"': entity = "&quot;"; break;
                 case '&': entity = "&amp;"; break;
               }
               if (entity){
                   while (*entity) (*o_zconv)(0, *entity++);
                   return;
               }
           }
       }
    }
    (*o_zconv)(c2,c1);
}

#define rot13(c)  ( \
      ( c < 'A' ) ? c: \
      (c <= 'M')  ? (c + 13): \
      (c <= 'Z')  ? (c - 13): \
      (c < 'a')   ? (c): \
      (c <= 'm')  ? (c + 13): \
      (c <= 'z')  ? (c - 13): \
      (c) \
)

#define  rot47(c) ( \
      ( c < '!' ) ? c: \
      ( c <= 'O' ) ? (c + 47) : \
      ( c <= '~' ) ?  (c - 47) : \
      c \
)

void
rot_conv(c2,c1)
int c2,c1;
{
    if (c2==0 || c2==X0201 || c2==ISO8859_1) {
        c1 = rot13(c1);
    } else if (c2) {
        c1 = rot47(c1);
        c2 = rot47(c2);
    }
    (*o_rot_conv)(c2,c1);
}

void
hira_conv(c2,c1)
int c2,c1;
{
    if ((hira_f & 1) && c2==0x25 && 0x20<c1 && c1<0x74) {
        c2 = 0x24;
    } else if ((hira_f & 2) && c2==0x24 && 0x20<c1 && c1<0x74) {
        c2 = 0x25;
    }
    (*o_hira_conv)(c2,c1);
}

void
iso2022jp_check_conv(c2,c1)
int    c2, c1;
{
    STATIC const int range[RANGE_NUM_MAX][2] = {
        {0x222f, 0x2239,},
        {0x2242, 0x2249,},
        {0x2251, 0x225b,},
        {0x226b, 0x2271,},
        {0x227a, 0x227d,},
        {0x2321, 0x232f,},
        {0x233a, 0x2340,},
        {0x235b, 0x2360,},
        {0x237b, 0x237e,},
        {0x2474, 0x247e,},
        {0x2577, 0x257e,},
        {0x2639, 0x2640,},
        {0x2659, 0x267e,},
        {0x2742, 0x2750,},
        {0x2772, 0x277e,},
        {0x2841, 0x287e,},
        {0x4f54, 0x4f7e,},
        {0x7425, 0x747e},
    };
    int i;
    int start, end, c;

    if(c2 >= 0x00 && c2 <= 0x20 && c1 >= 0x7f && c1 <= 0xff) {
        c2 = GETA1;
        c1 = GETA2;
    }
    if((c2 >= 0x29 && c2 <= 0x2f) || (c2 >= 0x75 && c2 <= 0x7e)) {
        c2 = GETA1;
        c1 = GETA2;
    }

    for (i = 0; i < RANGE_NUM_MAX; i++) {
        start = range[i][0];
        end   = range[i][1];
        c     = (c2 << 8) + c1;
        if (c >= start && c <= end) {
            c2 = GETA1;
            c1 = GETA2;
        }
    }
    (*o_iso2022jp_check_conv)(c2,c1);
}

/* This converts  =?ISO-2022-JP?B?HOGE HOGE?= */

const unsigned char *mime_pattern[] = {
    (const unsigned char *)"\075?EUC-JP?B?",
    (const unsigned char *)"\075?SHIFT_JIS?B?",
    (const unsigned char *)"\075?ISO-8859-1?Q?",
    (const unsigned char *)"\075?ISO-8859-1?B?",
    (const unsigned char *)"\075?ISO-2022-JP?B?",
    (const unsigned char *)"\075?ISO-2022-JP?Q?",
#if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
    (const unsigned char *)"\075?UTF-8?B?",
    (const unsigned char *)"\075?UTF-8?Q?",
#endif
    (const unsigned char *)"\075?US-ASCII?Q?",
    NULL
};

/* $B3:Ev$9$k%3!<%I$NM%@hEY$r>e$2$k$?$a$NL\0u(B */
int (*mime_priority_func[])PROTO((int c2, int c1, int c0)) = {
    e_iconv, s_iconv, 0, 0, 0, 0,
#if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
    w_iconv, w_iconv,
#endif
    0,
};

const int mime_encode[] = {
    JAPANESE_EUC, SHIFT_JIS,ISO8859_1, ISO8859_1, X0208, X0201,
#if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
    UTF8, UTF8,
#endif
    ASCII,
    0
};

const int mime_encode_method[] = {
    'B', 'B','Q', 'B', 'B', 'Q',
#if defined(UTF8_INPUT_ENABLE) || defined(UTF8_OUTPUT_ENABLE)
    'B', 'Q',
#endif
    'Q',
    0
};

#define MAXRECOVER 20

/* I don't trust portablity of toupper */
#define nkf_toupper(c)  (('a'<=c && c<='z')?(c-('a'-'A')):c)
#define nkf_isdigit(c)  ('0'<=c && c<='9')
#define nkf_isxdigit(c)  (nkf_isdigit(c) || ('a'<=c && c<='f') || ('A'<=c && c <= 'F'))
#define nkf_isblank(c) (c == SPACE || c == TAB)
#define nkf_isspace(c) (nkf_isblank(c) || c == CR || c == NL)
#define nkf_isalpha(c) (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z'))
#define nkf_isalnum(c) (nkf_isdigit(c) || nkf_isalpha(c))

void
switch_mime_getc()
{
    if (i_getc!=mime_getc) {
        i_mgetc = i_getc; i_getc = mime_getc;
        i_mungetc = i_ungetc; i_ungetc = mime_ungetc;
        if(mime_f==STRICT_MIME) {
            i_mgetc_buf = i_mgetc; i_mgetc = mime_getc_buf;
            i_mungetc_buf = i_mungetc; i_mungetc = mime_ungetc_buf;
        }
    }
}

void
unswitch_mime_getc()
{
    if(mime_f==STRICT_MIME) {
        i_mgetc = i_mgetc_buf;
        i_mungetc = i_mungetc_buf;
    }
    i_getc = i_mgetc;
    i_ungetc = i_mungetc;
    if(mime_iconv_back)set_iconv(FALSE, mime_iconv_back);
    mime_iconv_back = NULL;
}

int
mime_begin_strict(f)
FILE *f;
{
    int c1 = 0;
    int i,j,k;
    const unsigned char *p,*q;
    int r[MAXRECOVER];    /* recovery buffer, max mime pattern lenght */

    mime_decode_mode = FALSE;
    /* =? has been checked */
    j = 0;
    p = mime_pattern[j];
    r[0]='='; r[1]='?';

    for(i=2;p[i]>' ';i++) {                   /* start at =? */
        if ( ((r[i] = c1 = (*i_getc)(f))==EOF) || nkf_toupper(c1) != p[i] ) {
            /* pattern fails, try next one */
            q = p;
            while ((p = mime_pattern[++j])) {
                for(k=2;k<i;k++)              /* assume length(p) > i */
                    if (p[k]!=q[k]) break;
                if (k==i && nkf_toupper(c1)==p[k]) break;
            }
            if (p) continue;  /* found next one, continue */
            /* all fails, output from recovery buffer */
            (*i_ungetc)(c1,f);
            for(j=0;j<i;j++) {
                (*oconv)(0,r[j]);
            }
            return c1;
        }
    }
    mime_decode_mode = p[i-2];

    mime_iconv_back = iconv;
    set_iconv(FALSE, mime_priority_func[j]);
    clr_code_score(find_inputcode_byfunc(mime_priority_func[j]), SCORE_iMIME);

    if (mime_decode_mode=='B') {
        mimebuf_f = unbuf_f;
        if (!unbuf_f) {
            /* do MIME integrity check */
            return mime_integrity(f,mime_pattern[j]);
        }
    }
    switch_mime_getc();
    mimebuf_f = TRUE;
    return c1;
}

int
mime_getc_buf(f)
FILE *f;
{
    /* we don't keep eof of Fifo, becase it contains ?= as
       a terminator. It was checked in mime_integrity. */
    return ((mimebuf_f)?
        (*i_mgetc_buf)(f):Fifo(mime_input++));
}

int
mime_ungetc_buf(c,f)
FILE *f;
int c;
{
    if (mimebuf_f)
        (*i_mungetc_buf)(c,f);
    else
        Fifo(--mime_input)=c;
    return c;
}

int
mime_begin(f)
FILE *f;
{
    int c1;
    int i,k;

    /* In NONSTRICT mode, only =? is checked. In case of failure, we  */
    /* re-read and convert again from mime_buffer.  */

    /* =? has been checked */
    k = mime_last;
    Fifo(mime_last++)='='; Fifo(mime_last++)='?';
    for(i=2;i<MAXRECOVER;i++) {                   /* start at =? */
        /* We accept any character type even if it is breaked by new lines */
        c1 = (*i_getc)(f); Fifo(mime_last++)= c1 ;
        if (c1=='\n'||c1==' '||c1=='\r'||
                c1=='-'||c1=='_'||is_alnum(c1) ) continue;
        if (c1=='=') {
            /* Failed. But this could be another MIME preemble */
            (*i_ungetc)(c1,f);
            mime_last--;
            break;
        }
        if (c1!='?') break;
        else {
            /* c1=='?' */
            c1 = (*i_getc)(f); Fifo(mime_last++) = c1;
            if (!(++i<MAXRECOVER) || c1==EOF) break;
            if (c1=='b'||c1=='B') {
                mime_decode_mode = 'B';
            } else if (c1=='q'||c1=='Q') {
                mime_decode_mode = 'Q';
            } else {
                break;
            }
            c1 = (*i_getc)(f); Fifo(mime_last++) = c1;
            if (!(++i<MAXRECOVER) || c1==EOF) break;
            if (c1!='?') {
                mime_decode_mode = FALSE;
            }
            break;
        }
    }
    switch_mime_getc();
    if (!mime_decode_mode) {
        /* false MIME premble, restart from mime_buffer */
        mime_decode_mode = 1;  /* no decode, but read from the mime_buffer */
        /* Since we are in MIME mode until buffer becomes empty,    */
        /* we never go into mime_begin again for a while.           */
        return c1;
    }
    /* discard mime preemble, and goto MIME mode */
    mime_last = k;
    /* do no MIME integrity check */
    return c1;   /* used only for checking EOF */
}

#ifdef CHECK_OPTION
void
no_putc(c)
     int c;
{
    ;
}

void debug(str)
    const char *str;
{
    if (debug_f){
        fprintf(stderr, "%s\n", str);
    }
}
#endif

void
set_input_codename (codename)
    char *codename;
{
    if (guess_f &&
        is_inputcode_set &&
        strcmp(codename, "") != 0 &&
        strcmp(codename, input_codename) != 0)
    {
        is_inputcode_mixed = TRUE;
    }
    input_codename = codename;
    is_inputcode_set = TRUE;
}

#if !defined(PERL_XS) && !defined(WIN32DLL)
void
print_guessed_code (filename)
    char *filename;
{
    char *codename = "BINARY";
    if (!is_inputcode_mixed) {
        if (strcmp(input_codename, "") == 0) {
            codename = "ASCII";
        } else {
            codename = input_codename;
        }
    }
    if (filename != NULL) printf("%s:", filename);
    printf("%s\n", codename);
}
#endif /*WIN32DLL*/

int
hex2bin(x)
     int x;
{
    if (nkf_isdigit(x)) return x - '0';
    return nkf_toupper(x) - 'A' + 10;
}

#ifdef INPUT_OPTION

#ifdef ANSI_C_PROTOTYPE
int hex_getc(int ch, FILE *f, int (*g)(FILE *f), int (*u)(int c, FILE *f))
#else
int
hex_getc(ch, f, g, u)
     int ch;
     FILE *f;
     int (*g)();
     int (*u)();
#endif
{
    int c1, c2, c3;
    c1 = (*g)(f);
    if (c1 != ch){
        return c1;
    }
    c2 = (*g)(f);
    if (!nkf_isxdigit(c2)){
        (*u)(c2, f);
        return c1;
    }
    c3 = (*g)(f);
    if (!nkf_isxdigit(c3)){
        (*u)(c2, f);
        (*u)(c3, f);
        return c1;
    }
    return (hex2bin(c2) << 4) | hex2bin(c3);
}

int
cap_getc(f)
     FILE *f;
{
    return hex_getc(':', f, i_cgetc, i_cungetc);
}

int
cap_ungetc(c, f)
     int c;
     FILE *f;
{
    return (*i_cungetc)(c, f);
}

int
url_getc(f)
     FILE *f;
{
    return hex_getc('%', f, i_ugetc, i_uungetc);
}

int
url_ungetc(c, f)
     int c;
     FILE *f;
{
    return (*i_uungetc)(c, f);
}
#endif

#ifdef NUMCHAR_OPTION
int
numchar_getc(f)
     FILE *f;
{
    int (*g)() = i_ngetc;
    int (*u)() = i_nungetc;
    int i = 0, j;
    int buf[8];
    long c = -1;

    buf[i] = (*g)(f);
    if (buf[i] == '&'){
        buf[++i] = (*g)(f);
        if (buf[i] == '#'){
            c = 0;
            buf[++i] = (*g)(f);
            if (buf[i] == 'x' || buf[i] == 'X'){
                for (j = 0; j < 5; j++){
                    buf[++i] = (*g)(f);
                    if (!nkf_isxdigit(buf[i])){
                        if (buf[i] != ';'){
                            c = -1;
                        }
                        break;
                    }
                    c <<= 4;
                    c |= hex2bin(buf[i]);
                }
            }else{
                for (j = 0; j < 6; j++){
                    if (j){
                        buf[++i] = (*g)(f);
                    }
                    if (!nkf_isdigit(buf[i])){
                        if (buf[i] != ';'){
                            c = -1;
                        }
                        break;
                    }
                    c *= 10;
                    c += hex2bin(buf[i]);
                }
            }
        }
    }
    if (c != -1){
        return CLASS_UTF16 | c;
    }
    while (i > 0){
        (*u)(buf[i], f);
        --i;
    }
    return buf[0];
}

int
numchar_ungetc(c, f)
     int c;
     FILE *f;
{
    return (*i_nungetc)(c, f);
}
#endif

#ifdef UNICODE_NORMALIZATION

/* Normalization Form C */
int
nfc_getc(f)
     FILE *f;
{
    int (*g)() = i_nfc_getc;
    int (*u)() = i_nfc_ungetc;
    int i=0, j, k=1, lower, upper;
    int buf[9];
    const int *array = NULL;
    extern const struct normalization_pair normalization_table[];

    buf[i] = (*g)(f);
    while (k > 0 && ((buf[i] & 0xc0) != 0x80)){
        lower=0, upper=NORMALIZATION_TABLE_LENGTH-1;
        while (upper >= lower) {
            j = (lower+upper) / 2;
            array = normalization_table[j].nfd;
            for (k=0; k < NORMALIZATION_TABLE_NFD_LENGTH && array[k]; k++){
                if (array[k] != buf[k]){
                    array[k] < buf[k] ? (lower = j + 1) : (upper = j - 1);
                    k = 0;
                    break;
                } else if (k >= i)
                    buf[++i] = (*g)(f);
            }
            if (k > 0){
                array = normalization_table[j].nfc;
                for (i=0; i < NORMALIZATION_TABLE_NFC_LENGTH && array[i]; i++)
                    buf[i] = array[i];
                i--;
                break;
            }
        }
        while (i > 0)
            (*u)(buf[i--], f);
    }
    return buf[0];
}

int
nfc_ungetc(c, f)
     int c;
     FILE *f;
{
    return (*i_nfc_ungetc)(c, f);
}
#endif /* UNICODE_NORMALIZATION */

int
mime_getc(f)
FILE *f;
{
    int c1, c2, c3, c4, cc;
    int t1, t2, t3, t4, mode, exit_mode;
    int lwsp_count;
    char *lwsp_buf;
    char *lwsp_buf_new;
    int lwsp_size = 128;

    if (mime_top != mime_last) {  /* Something is in FIFO */
        return  Fifo(mime_top++);
    }
    if (mime_decode_mode==1 ||mime_decode_mode==FALSE) {
        mime_decode_mode=FALSE;
        unswitch_mime_getc();
        return (*i_getc)(f);
    }

    if (mimebuf_f == FIXED_MIME)
        exit_mode = mime_decode_mode;
    else
        exit_mode = FALSE;
    if (mime_decode_mode == 'Q') {
        if ((c1 = (*i_mgetc)(f)) == EOF) return (EOF);
restart_mime_q:
        if (c1=='_') return ' ';
        if (c1<=' ' || DEL<=c1) {
            mime_decode_mode = exit_mode; /* prepare for quit */
            return c1;
        }
        if (c1!='=' && c1!='?') {
            return c1;
        }

        mime_decode_mode = exit_mode; /* prepare for quit */
        if ((c2 = (*i_mgetc)(f)) == EOF) return (EOF);
        if (c1=='?'&&c2=='=' && mimebuf_f != FIXED_MIME) {
            /* end Q encoding */
            input_mode = exit_mode;
            lwsp_count = 0;
            lwsp_buf = malloc((lwsp_size+5)*sizeof(char));
            if (lwsp_buf==NULL) {
                perror("can't malloc");
                return -1;
            }
            while ((c1=(*i_getc)(f))!=EOF) {
                switch (c1) {
                case NL:
                case CR:
                    if (c1==NL) {
                        if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
                            i_ungetc(SPACE,f);
                            continue;
                        } else {
                            i_ungetc(c1,f);
                        }
                        c1 = NL;
                    } else {
                        if ((c1=(*i_getc)(f))!=EOF && c1 == NL) {
                            if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
                                i_ungetc(SPACE,f);
                                continue;
                            } else {
                                i_ungetc(c1,f);
                            }
                            i_ungetc(NL,f);
                        } else {
                            i_ungetc(c1,f);
                        }
                        c1 = CR;
                    }
                    break;
                case SPACE:
                case TAB:
                    lwsp_buf[lwsp_count] = c1;
                    if (lwsp_count++>lwsp_size){
                        lwsp_size *= 2;
                        lwsp_buf_new = realloc(lwsp_buf, (lwsp_size+5)*sizeof(char));
                        if (lwsp_buf_new==NULL) {
                            free(lwsp_buf);
                            lwsp_buf = NULL;
                            perror("can't realloc");
                            return -1;
                        }
                        lwsp_buf = lwsp_buf_new;
                    }
                    continue;
                }
                break;
            }
            if (lwsp_count > 0) {
                if (c1=='=' && (lwsp_buf[lwsp_count-1]==SPACE||lwsp_buf[lwsp_count-1]==TAB)) {
                    lwsp_count = 0;
                } else {
                    i_ungetc(c1,f);
                    for(lwsp_count--;lwsp_count>0;lwsp_count--)
                        i_ungetc(lwsp_buf[lwsp_count],f);
                    c1 = lwsp_buf[0];
                }
            }
            free(lwsp_buf);
            lwsp_buf = NULL;
            return c1;
        }
        if (c1=='='&&c2<' ') { /* this is soft wrap */
            while((c1 =  (*i_mgetc)(f)) <=' ') {
                if ((c1 = (*i_mgetc)(f)) == EOF) return (EOF);
            }
            mime_decode_mode = 'Q'; /* still in MIME */
            goto restart_mime_q;
        }
        if (c1=='?') {
            mime_decode_mode = 'Q'; /* still in MIME */
            (*i_mungetc)(c2,f);
            return c1;
        }
        if ((c3 = (*i_mgetc)(f)) == EOF) return (EOF);
        if (c2<=' ') return c2;
        mime_decode_mode = 'Q'; /* still in MIME */
#define hex(c)   (('0'<=c&&c<='9')?(c-'0'):\
     ('A'<=c&&c<='F')?(c-'A'+10):('a'<=c&&c<='f')?(c-'a'+10):0)
        return ((hex(c2)<<4) + hex(c3));
    }

    if (mime_decode_mode != 'B') {
        mime_decode_mode = FALSE;
        return (*i_mgetc)(f);
    }

    /* Base64 encoding */
    /*
        MIME allows line break in the middle of
        Base64, but we are very pessimistic in decoding
        in unbuf mode because MIME encoded code may broken by
        less or editor's control sequence (such as ESC-[-K in unbuffered
        mode. ignore incomplete MIME.
    */
    mode = mime_decode_mode;
    mime_decode_mode = exit_mode;  /* prepare for quit */

    while ((c1 = (*i_mgetc)(f))<=' ') {
        if (c1==EOF)
            return (EOF);
    }
mime_c2_retry:
    if ((c2 = (*i_mgetc)(f))<=' ') {
        if (c2==EOF)
            return (EOF);
        if (mime_f != STRICT_MIME) goto mime_c2_retry;
        if (mimebuf_f!=FIXED_MIME) input_mode = ASCII;
        return c2;
    }
    if ((c1 == '?') && (c2 == '=')) {
        input_mode = ASCII;
        lwsp_count = 0;
        lwsp_buf = malloc((lwsp_size+5)*sizeof(char));
        if (lwsp_buf==NULL) {
            perror("can't malloc");
            return -1;
        }
        while ((c1=(*i_getc)(f))!=EOF) {
            switch (c1) {
            case NL:
            case CR:
                if (c1==NL) {
                    if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
                        i_ungetc(SPACE,f);
                        continue;
                    } else {
                        i_ungetc(c1,f);
                    }
                    c1 = NL;
                } else {
                    if ((c1=(*i_getc)(f))!=EOF) {
                        if (c1==SPACE) {
                            i_ungetc(SPACE,f);
                            continue;
                        } else if ((c1=(*i_getc)(f))!=EOF && (c1==SPACE||c1==TAB)) {
                            i_ungetc(SPACE,f);
                            continue;
                        } else {
                            i_ungetc(c1,f);
                        }
                        i_ungetc(NL,f);
                    } else {
                        i_ungetc(c1,f);
                    }
                    c1 = CR;
                }
                break;
            case SPACE:
            case TAB:
                lwsp_buf[lwsp_count] = c1;
                if (lwsp_count++>lwsp_size){
                    lwsp_size *= 2;
                    lwsp_buf_new = realloc(lwsp_buf, (lwsp_size+5)*sizeof(char));
                    if (lwsp_buf_new==NULL) {
                        free(lwsp_buf);
                        lwsp_buf = NULL;
                        perror("can't realloc");
                        return -1;
                    }
                    lwsp_buf = lwsp_buf_new;
                }
                continue;
            }
            break;
        }
        if (lwsp_count > 0) {
            if (c1=='=' && (lwsp_buf[lwsp_count-1]==SPACE||lwsp_buf[lwsp_count-1]==TAB)) {
                lwsp_count = 0;
            } else {
                i_ungetc(c1,f);
                for(lwsp_count--;lwsp_count>0;lwsp_count--)
                    i_ungetc(lwsp_buf[lwsp_count],f);
                c1 = lwsp_buf[0];
            }
        }
        free(lwsp_buf);
        lwsp_buf = NULL;
        return c1;
    }
mime_c3_retry:
    if ((c3 = (*i_mgetc)(f))<=' ') {
        if (c3==EOF)
            return (EOF);
        if (mime_f != STRICT_MIME) goto mime_c3_retry;
        if (mimebuf_f!=FIXED_MIME) input_mode = ASCII;
        return c3;
    }
mime_c4_retry:
    if ((c4 = (*i_mgetc)(f))<=' ') {
        if (c4==EOF)
            return (EOF);
        if (mime_f != STRICT_MIME) goto mime_c4_retry;
        if (mimebuf_f!=FIXED_MIME) input_mode = ASCII;
        return c4;
    }

    mime_decode_mode = mode; /* still in MIME sigh... */

    /* BASE 64 decoding */

    t1 = 0x3f & base64decode(c1);
    t2 = 0x3f & base64decode(c2);
    t3 = 0x3f & base64decode(c3);
    t4 = 0x3f & base64decode(c4);
    cc = ((t1 << 2) & 0x0fc) | ((t2 >> 4) & 0x03);
    if (c2 != '=') {
        Fifo(mime_last++) = cc;
        cc = ((t2 << 4) & 0x0f0) | ((t3 >> 2) & 0x0f);
        if (c3 != '=') {
            Fifo(mime_last++) = cc;
            cc = ((t3 << 6) & 0x0c0) | (t4 & 0x3f);
            if (c4 != '=')
                Fifo(mime_last++) = cc;
        }
    } else {
        return c1;
    }
    return  Fifo(mime_top++);
}

int
mime_ungetc(c,f)
int   c;
FILE  *f;
{
    Fifo(--mime_top) = c;
    return c;
}

int
mime_integrity(f,p)
    FILE *f;
    const unsigned char *p;
{
    int c,d;
    unsigned int q;
    /* In buffered mode, read until =? or NL or buffer full
     */
    mime_input = mime_top;
    mime_last = mime_top;

    while(*p) Fifo(mime_input++) = *p++;
    d = 0;
    q = mime_input;
    while((c=(*i_getc)(f))!=EOF) {
        if (((mime_input-mime_top)&MIME_BUF_MASK)==0) {
            break;   /* buffer full */
        }
        if (c=='=' && d=='?') {
            /* checked. skip header, start decode */
            Fifo(mime_input++) = c;
            /* mime_last_input = mime_input; */
            mime_input = q;
            switch_mime_getc();
            return 1;
        }
        if (!( (c=='+'||c=='/'|| c=='=' || c=='?' || is_alnum(c))))
            break;
        /* Should we check length mod 4? */
        Fifo(mime_input++) = c;
        d=c;
    }
    /* In case of Incomplete MIME, no MIME decode  */
    Fifo(mime_input++) = c;
    mime_last = mime_input;     /* point undecoded buffer */
    mime_decode_mode = 1;              /* no decode on Fifo last in mime_getc */
    switch_mime_getc();         /* anyway we need buffered getc */
    return 1;
}

int
base64decode(c)
    int            c;
{
    int             i;
    if (c > '@') {
        if (c < '[') {
            i = c - 'A';                        /* A..Z 0-25 */
        } else {
            i = c - 'G'     /* - 'a' + 26 */ ;  /* a..z 26-51 */
        }
    } else if (c > '/') {
        i = c - '0' + '4'   /* - '0' + 52 */ ;  /* 0..9 52-61 */
    } else if (c == '+') {
        i = '>'             /* 62 */ ;          /* +  62 */
    } else {
        i = '?'             /* 63 */ ;          /* / 63 */
    }
    return (i);
}

STATIC const char basis_64[] =
   "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

STATIC int b64c;
#define MIMEOUT_BUF_LENGTH (60)
char mimeout_buf[MIMEOUT_BUF_LENGTH+1];
int mimeout_buf_count = 0;
int mimeout_preserve_space = 0;
#define itoh4(c)   (c>=10?c+'A'-10:c+'0')

void
open_mime(mode)
int mode;
{
    const unsigned char *p;
    int i;
    int j;
    p  = mime_pattern[0];
    for(i=0;mime_encode[i];i++) {
        if (mode == mime_encode[i]) {
            p = mime_pattern[i];
            break;
        }
    }
    mimeout_mode = mime_encode_method[i];

    i = 0;
    if (base64_count>45) {
        if (mimeout_buf_count>0 && nkf_isblank(mimeout_buf[i])){
            (*o_mputc)(mimeout_buf[i]);
            i++;
        }
        (*o_mputc)(NL);
        (*o_mputc)(SPACE);
        base64_count = 1;
        if (!mimeout_preserve_space && mimeout_buf_count>0
            && (mimeout_buf[i]==SPACE || mimeout_buf[i]==TAB
                || mimeout_buf[i]==CR || mimeout_buf[i]==NL )) {
            i++;
        }
    }
    if (!mimeout_preserve_space) {
        for (;i<mimeout_buf_count;i++) {
            if (mimeout_buf[i]==SPACE || mimeout_buf[i]==TAB
                || mimeout_buf[i]==CR || mimeout_buf[i]==NL ) {
                (*o_mputc)(mimeout_buf[i]);
                base64_count ++;
            } else {
                break;
            }
        }
    }
    mimeout_preserve_space = FALSE;

    while(*p) {
        (*o_mputc)(*p++);
        base64_count ++;
    }
    j = mimeout_buf_count;
    mimeout_buf_count = 0;
    for (;i<j;i++) {
        mime_putc(mimeout_buf[i]);
    }
}

void
close_mime()
{
    (*o_mputc)('?');
    (*o_mputc)('=');
    base64_count += 2;
    mimeout_mode = 0;
}

void
eof_mime()
{
    switch(mimeout_mode) {
    case 'Q':
    case 'B':
        break;
    case 2:
        (*o_mputc)(basis_64[((b64c & 0x3)<< 4)]);
        (*o_mputc)('=');
        (*o_mputc)('=');
        base64_count += 3;
        break;
    case 1:
        (*o_mputc)(basis_64[((b64c & 0xF) << 2)]);
        (*o_mputc)('=');
        base64_count += 2;
        break;
    }
    if (mimeout_mode) {
        if (mimeout_f!=FIXED_MIME) {
            close_mime();
        } else if (mimeout_mode != 'Q')
            mimeout_mode = 'B';
    }
}

void
mimeout_addchar(c)
    int            c;
{
    switch(mimeout_mode) {
    case 'Q':
        if(c==SPACE){
            (*o_mputc)('_');
            base64_count++;
        } else if (c==CR||c==NL) {
            (*o_mputc)(c);
            base64_count = 0;
        } else if(c<SPACE||c=='='||c=='?'||c=='_'||DEL<=c) {
            (*o_mputc)('=');
            (*o_mputc)(itoh4(((c>>4)&0xf)));
            (*o_mputc)(itoh4((c&0xf)));
            base64_count += 3;
        } else {
            (*o_mputc)(c);
            base64_count++;
        }
        break;
    case 'B':
        b64c=c;
        (*o_mputc)(basis_64[c>>2]);
        mimeout_mode=2;
        base64_count ++;
        break;
    case 2:
        (*o_mputc)(basis_64[((b64c & 0x3)<< 4) | ((c & 0xF0) >> 4)]);
        b64c=c;
        mimeout_mode=1;
        base64_count ++;
        break;
    case 1:
        (*o_mputc)(basis_64[((b64c & 0xF) << 2) | ((c & 0xC0) >>6)]);
        (*o_mputc)(basis_64[c & 0x3F]);
        mimeout_mode='B';
        base64_count += 2;
        break;
    default:
        (*o_mputc)(c);
        base64_count++;
        break;
    }
}

int mime_lastchar2, mime_lastchar1;

void mime_prechar(c2, c1)
     int c2, c1;
{
    if (mimeout_mode){
        if (c2){
            if (base64_count + mimeout_buf_count/3*4> 66){
                (*o_base64conv)(EOF,0);
                (*o_base64conv)(0,NL);
                (*o_base64conv)(0,SPACE);
            }
        }/*else if (mime_lastchar2){
            if (c1 <=DEL && !nkf_isspace(c1)){
                (*o_base64conv)(0,SPACE);
            }
        }*/
    }/*else{
        if (c2 && mime_lastchar2 == 0
            && mime_lastchar1 && !nkf_isspace(mime_lastchar1)){
            (*o_base64conv)(0,SPACE);
        }
    }*/
    mime_lastchar2 = c2;
    mime_lastchar1 = c1;
}

void
mime_putc(c)
    int            c;
{
    int i = 0;
    int j = 0;
    int lastchar;

    if (mimeout_f == FIXED_MIME){
        if (mimeout_mode == 'Q'){
            if (base64_count > 71){
                if (c!=CR && c!=NL) {
                    (*o_mputc)('=');
                    (*o_mputc)(NL);
                }
                base64_count = 0;
            }
        }else{
            if (base64_count > 71){
                eof_mime();
                (*o_mputc)(NL);
                base64_count = 0;
            }
            if (c == EOF) { /* c==EOF */
                eof_mime();
            }
        }
        if (c != EOF) { /* c==EOF */
            mimeout_addchar(c);
        }
        return;
    }

    /* mimeout_f != FIXED_MIME */

    if (c == EOF) { /* c==EOF */
        j = mimeout_buf_count;
        mimeout_buf_count = 0;
        i = 0;
        for (;i<j;i++) {
            /*if (nkf_isspace(mimeout_buf[i])){
                break;
            }*/
            mimeout_addchar(mimeout_buf[i]);
        }
        eof_mime();
        for (;i<j;i++) {
            (*o_mputc)(mimeout_buf[i]);
            base64_count++;
        }
        return;
    }

    if (mimeout_mode=='Q') {
        if (c <= DEL && (output_mode==ASCII ||output_mode == ISO8859_1 ) ) {
            if (c <= SPACE) {
                close_mime();
                (*o_mputc)(SPACE);
                base64_count++;
            }
            (*o_mputc)(c);
            base64_count++;
        }
        return;
    }

    if (mimeout_buf_count > 0){
        lastchar = mimeout_buf[mimeout_buf_count - 1];
    }else{
        lastchar = -1;
    }

    if (!mimeout_mode) {
        if (c <= DEL && (output_mode==ASCII ||output_mode == ISO8859_1)) {
            if (nkf_isspace(c)) {
                if (c==CR || c==NL) {
                    base64_count=0;
                }
                for (i=0;i<mimeout_buf_count;i++) {
                    (*o_mputc)(mimeout_buf[i]);
                    if (mimeout_buf[i] == CR || mimeout_buf[i] == NL){
                        base64_count = 0;
                    }else{
                        base64_count++;
                    }
                }
                mimeout_buf[0] = c;
                mimeout_buf_count = 1;
            }else{
                if (base64_count > 1
                    && base64_count + mimeout_buf_count > 76){
                    (*o_mputc)(NL);
                    base64_count = 0;
                    if (!nkf_isspace(mimeout_buf[0])){
                        (*o_mputc)(SPACE);
                        base64_count++;
                    }
                }
                mimeout_buf[mimeout_buf_count++] = c;
                if (mimeout_buf_count>MIMEOUT_BUF_LENGTH) {
                    open_mime(output_mode);
                }
            }
            return;
        }else{
            if (lastchar==CR || lastchar == NL){
                for (i=0;i<mimeout_buf_count;i++) {
                    (*o_mputc)(mimeout_buf[i]);
                }
                base64_count = 0;
                mimeout_buf_count = 0;
            }
            if (lastchar==SPACE) {
                for (i=0;i<mimeout_buf_count-1;i++) {
                    (*o_mputc)(mimeout_buf[i]);
                    base64_count++;
                }
                mimeout_buf[0] = SPACE;
                mimeout_buf_count = 1;
            }
            open_mime(output_mode);
        }
    }else{
        /* mimeout_mode == 'B', 1, 2 */
        if ( c<=DEL && (output_mode==ASCII ||output_mode == ISO8859_1 ) ) {
            if (lastchar == CR || lastchar == NL){
                if (nkf_isblank(c)) {
                    for (i=0;i<mimeout_buf_count;i++) {
                        mimeout_addchar(mimeout_buf[i]);
                    }
                    mimeout_buf_count = 0;
                } else if (SPACE<c && c<DEL) {
                    eof_mime();
                    for (i=0;i<mimeout_buf_count;i++) {
                        (*o_mputc)(mimeout_buf[i]);
                    }
                    base64_count = 0;
                    mimeout_buf_count = 0;
                }
            }
            if (c==SPACE || c==TAB || c==CR || c==NL) {
                for (i=0;i<mimeout_buf_count;i++) {
                    if (SPACE<mimeout_buf[i] && mimeout_buf[i]<DEL) {
                        eof_mime();
                        for (i=0;i<mimeout_buf_count;i++) {
                            (*o_mputc)(mimeout_buf[i]);
                            base64_count++;
                        }
                        mimeout_buf_count = 0;
                    }
                }
                mimeout_buf[mimeout_buf_count++] = c;
                if (mimeout_buf_count>MIMEOUT_BUF_LENGTH) {
                    eof_mime();
                    for (i=0;i<mimeout_buf_count;i++) {
                        (*o_mputc)(mimeout_buf[i]);
                        base64_count++;
                    }
                    mimeout_buf_count = 0;
                }
                return;
            }
            if (mimeout_buf_count>0 && SPACE<c && c!='=') {
                mimeout_buf[mimeout_buf_count++] = c;
                if (mimeout_buf_count>MIMEOUT_BUF_LENGTH) {
                    j = mimeout_buf_count;
                    mimeout_buf_count = 0;
                    for (i=0;i<j;i++) {
                        mimeout_addchar(mimeout_buf[i]);
                    }
                }
                return;
            }
        }
    }
    if (mimeout_buf_count>0) {
        j = mimeout_buf_count;
        mimeout_buf_count = 0;
        for (i=0;i<j;i++) {
            if (mimeout_buf[i]==CR || mimeout_buf[i]==NL)
                break;
            mimeout_addchar(mimeout_buf[i]);
        }
        if (i<j) {
            eof_mime();
            base64_count=0;
            for (;i<j;i++) {
                (*o_mputc)(mimeout_buf[i]);
            }
            open_mime(output_mode);
        }
    }
    mimeout_addchar(c);
}

#if defined(PERL_XS) || defined(WIN32DLL)
void
reinit()
{
    {
        struct input_code *p = input_code_list;
        while (p->name){
            status_reinit(p++);
        }
    }
    unbuf_f = FALSE;
    estab_f = FALSE;
    nop_f = FALSE;
    binmode_f = TRUE;
    rot_f = FALSE;
    hira_f = FALSE;
    input_f = FALSE;
    alpha_f = FALSE;
    mime_f = STRICT_MIME;
    mime_decode_f = FALSE;
    mimebuf_f = FALSE;
    broken_f = FALSE;
    iso8859_f = FALSE;
    mimeout_f = FALSE;
#if defined(MSDOS) || defined(__OS2__)
     x0201_f = TRUE;
#else
     x0201_f = NO_X0201;
#endif
    iso2022jp_f = FALSE;
#if defined(UTF8_OUTPUT_ENABLE) && defined(UTF8_INPUT_ENABLE)
    internal_unicode_f = FALSE;
#endif
#ifdef UTF8_OUTPUT_ENABLE
    unicode_bom_f = 0;
    w_oconv16_LE = 0;
    ms_ucs_map_f = FALSE;
#endif
#ifdef UNICODE_NORMALIZATION
    nfc_f = FALSE;
#endif
#ifdef INPUT_OPTION
    cap_f = FALSE;
    url_f = FALSE;
    numchar_f = FALSE;
#endif
#ifdef CHECK_OPTION
    noout_f = FALSE;
    debug_f = FALSE;
#endif
    guess_f = FALSE;
    is_inputcode_mixed = FALSE;
    is_inputcode_set   = FALSE;
#ifdef EXEC_IO
    exec_f = 0;
#endif
#ifdef SHIFTJIS_CP932
    cp932_f = TRUE;
    cp932inv_f = TRUE;
#endif
    {
        int i;
        for (i = 0; i < 256; i++){
            prefix_table[i] = 0;
        }
    }
#ifdef UTF8_INPUT_ENABLE
    utf16_mode = UTF16BE_INPUT;
#endif
    mimeout_buf_count = 0;
    mimeout_mode = 0;
    base64_count = 0;
    f_line = 0;
    f_prev = 0;
    fold_preserve_f = FALSE;
    fold_f = FALSE;
    fold_len = 0;
    kanji_intro = DEFAULT_J;
    ascii_intro = DEFAULT_R;
    fold_margin  = FOLD_MARGIN;
    output_conv = DEFAULT_CONV;
    oconv = DEFAULT_CONV;
    o_zconv = no_connection;
    o_fconv = no_connection;
    o_crconv = no_connection;
    o_rot_conv = no_connection;
    o_hira_conv = no_connection;
    o_base64conv = no_connection;
    o_iso2022jp_check_conv = no_connection;
    o_putc = std_putc;
    i_getc = std_getc;
    i_ungetc = std_ungetc;
    i_bgetc = std_getc;
    i_bungetc = std_ungetc;
    o_mputc = std_putc;
    i_mgetc = std_getc;
    i_mungetc  = std_ungetc;
    i_mgetc_buf = std_getc;
    i_mungetc_buf = std_ungetc;
    output_mode = ASCII;
    input_mode =  ASCII;
    shift_mode =  FALSE;
    mime_decode_mode = FALSE;
    file_out = FALSE;
    crmode_f = 0;
    option_mode = 0;
    broken_counter = 0;
    broken_last = 0;
    z_prev2=0,z_prev1=0;
#ifdef CHECK_OPTION
    iconv_for_check = 0;
#endif
    input_codename = "";
#ifdef WIN32DLL
    reinitdll();
#endif /*WIN32DLL*/
}
#endif

void
no_connection(c2,c1)
int c2,c1;
{
    no_connection2(c2,c1,0);
}

int
no_connection2(c2,c1,c0)
int c2,c1,c0;
{
    fprintf(stderr,"nkf internal module connection failure.\n");
    exit(1);
    return 0; /* LINT */
}

#ifndef PERL_XS
#ifdef WIN32DLL
#define fprintf dllprintf
#endif
void
usage()
{
    fprintf(stderr,"USAGE:  nkf(nkf32,wnkf,nkf2) -[flags] [in file] .. [out file for -O flag]\n");
    fprintf(stderr,"Flags:\n");
    fprintf(stderr,"b,u      Output is buffered (DEFAULT),Output is unbuffered\n");
#ifdef DEFAULT_CODE_SJIS
    fprintf(stderr,"j,s,e,w  Outout code is JIS 7 bit, Shift JIS (DEFAULT), AT&T JIS (EUC), UTF-8N\n");
#endif
#ifdef DEFAULT_CODE_JIS
    fprintf(stderr,"j,s,e,w  Outout code is JIS 7 bit (DEFAULT), Shift JIS, AT&T JIS (EUC), UTF-8N\n");
#endif
#ifdef DEFAULT_CODE_EUC
    fprintf(stderr,"j,s,e,w  Outout code is JIS 7 bit, Shift JIS, AT&T JIS (EUC) (DEFAULT), UTF-8N\n");
#endif
#ifdef DEFAULT_CODE_UTF8
    fprintf(stderr,"j,s,e,w  Outout code is JIS 7 bit, Shift JIS, AT&T JIS (EUC), UTF-8N (DEFAULT)\n");
#endif
#ifdef UTF8_OUTPUT_ENABLE
    fprintf(stderr,"         After 'w' you can add more options. (80?|16((B|L)0?)?) \n");
#endif
    fprintf(stderr,"J,S,E,W  Input assumption is JIS 7 bit , Shift JIS, AT&T JIS (EUC), UTF-8\n");
#ifdef UTF8_INPUT_ENABLE
    fprintf(stderr,"         After 'W' you can add more options. (8|16(B|L)?) \n");
#endif
    fprintf(stderr,"t        no conversion\n");
    fprintf(stderr,"i_/o_    Output sequence to designate JIS-kanji/ASCII (DEFAULT B)\n");
    fprintf(stderr,"r        {de/en}crypt ROT13/47\n");
    fprintf(stderr,"h        1 katakana->hiragana, 2 hiragana->katakana, 3 both\n");
    fprintf(stderr,"v        Show this usage. V: show version\n");
    fprintf(stderr,"m[BQN0]  MIME decode [B:base64,Q:quoted,N:non-strict,0:no decode]\n");
    fprintf(stderr,"M[BQ]    MIME encode [B:base64 Q:quoted]\n");
    fprintf(stderr,"l        ISO8859-1 (Latin-1) support\n");
    fprintf(stderr,"f/F      Folding: -f60 or -f or -f60-10 (fold margin 10) F preserve nl\n");
    fprintf(stderr,"Z[0-3]   Convert X0208 alphabet to ASCII  1: Kankaku to space,2: 2 spaces,\n");
    fprintf(stderr,"                                          3: Convert HTML Entity\n");
    fprintf(stderr,"X,x      Assume X0201 kana in MS-Kanji, -x preserves X0201\n");
    fprintf(stderr,"B[0-2]   Broken input  0: missing ESC,1: any X on ESC-[($]-X,2: ASCII on NL\n");
#ifdef MSDOS
    fprintf(stderr,"T        Text mode output\n");
#endif
    fprintf(stderr,"O        Output to File (DEFAULT 'nkf.out')\n");
    fprintf(stderr,"d,c      Delete \\r in line feed and \\032, Add \\r in line feed\n");
    fprintf(stderr,"I        Convert non ISO-2022-JP charactor to GETA\n");
    fprintf(stderr,"-L[uwm]  line mode u:LF w:CRLF m:CR (DEFAULT noconversion)\n");
    fprintf(stderr,"long name options\n");
    fprintf(stderr," --fj,--unix,--mac,--windows                        convert for the system\n");
    fprintf(stderr," --jis,--euc,--sjis,--utf8,--utf16,--mime,--base64  convert for the code\n");
    fprintf(stderr," --hiragana, --katakana    Hiragana/Katakana Conversion\n");
    fprintf(stderr," --x0212                   Convert JISX0212\n");
    fprintf(stderr," --cp932, --no-cp932       CP932 compatibility\n");
    fprintf(stderr," --prefix=    Insert escape before troublesome characters of Shift_JIS\n");
#ifdef INPUT_OPTION
    fprintf(stderr," --cap-input, --url-input  Convert hex after ':' or '%%'\n");
#endif
#ifdef NUMCHAR_OPTION
    fprintf(stderr," --numchar-input   Convert Unicode Character Reference\n");
#endif
#ifdef UNICODE_NORMALIZATION
    fprintf(stderr," --utf8mac-input   UTF-8-MAC input\n");
#endif
#ifdef UTF8_OUTPUT_ENABLE
    fprintf(stderr," --ms-ucs-map      Microsoft UCS Mapping Compatible\n");
#endif
#ifdef OVERWRITE
    fprintf(stderr," --overwrite       Overwrite original listed files by filtered result\n");
#endif
    fprintf(stderr," -g, --guess       Guess the input code\n");
    fprintf(stderr," --help,--version\n");
    version();
}

void
version()
{
    fprintf(stderr,"Network Kanji Filter Version %s (%s) "
#if defined(MSDOS) && !defined(__WIN32__) && !defined(__WIN16__)
                  "for DOS"
#endif
#if defined(MSDOS) && defined(__WIN16__)
                  "for Win16"
#endif
#if defined(MSDOS) && defined(__WIN32__)
                  "for Win32"
#endif
#ifdef __OS2__
                  "for OS/2"
#endif
                  ,NKF_VERSION,NKF_RELEASE_DATE);
    fprintf(stderr,"\n%s\n",CopyRight);
}
#endif /*PERL_XS*/

/**
 ** $B%Q%C%A@):n<T(B
 **  void@merope.pleiades.or.jp (Kusakabe Youichi)
 **  NIDE Naoyuki <nide@ics.nara-wu.ac.jp>
 **  ohta@src.ricoh.co.jp (Junn Ohta)
 **  inouet@strl.nhk.or.jp (Tomoyuki Inoue)
 **  kiri@pulser.win.or.jp (Tetsuaki Kiriyama)
 **  Kimihiko Sato <sato@sail.t.u-tokyo.ac.jp>
 **  a_kuroe@kuroe.aoba.yokohama.jp (Akihiko Kuroe)
 **  kono@ie.u-ryukyu.ac.jp (Shinji Kono)
 **  GHG00637@nifty-serve.or.jp (COW)
 **
 **/

/* end */
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/nkf/nkf-utf8/utf8tbl.c

root/ext/nkf/nkf-utf8/utf8tbl.c

/* [<][>][^][v][top][bottom] [index] [help] */
#include "config.h"

#ifdef UTF8_OUTPUT_ENABLE
const unsigned short euc_to_utf8_A1[] = {
         0x3000, 0x3001, 0x3002, 0xFF0C, 0xFF0E, 0x30FB, 0xFF1A,
 0xFF1B, 0xFF1F, 0xFF01, 0x309B, 0x309C, 0x00B4, 0xFF40, 0x00A8,
 0xFF3E, 0xFFE3, 0xFF3F, 0x30FD, 0x30FE, 0x309D, 0x309E, 0x3003,
 0x4EDD, 0x3005, 0x3006, 0x3007, 0x30FC, 0x2015, 0x2010, 0xFF0F,
 0xFF3C, 0x301C, 0x2016, 0xFF5C, 0x2026, 0x2025, 0x2018, 0x2019,
 0x201C, 0x201D, 0xFF08, 0xFF09, 0x3014, 0x3015, 0xFF3B, 0xFF3D,
 0xFF5B, 0xFF5D, 0x3008, 0x3009, 0x300A, 0x300B, 0x300C, 0x300D,
 0x300E, 0x300F, 0x3010, 0x3011, 0xFF0B, 0x2212, 0x00B1, 0x00D7,
 0x00F7, 0xFF1D, 0x2260, 0xFF1C, 0xFF1E, 0x2266, 0x2267, 0x221E,
 0x2234, 0x2642, 0x2640, 0x00B0, 0x2032, 0x2033, 0x2103, 0xFFE5,
 0xFF04, 0x00A2, 0x00A3, 0xFF05, 0xFF03, 0xFF06, 0xFF0A, 0xFF20,
 0x00A7, 0x2606, 0x2605, 0x25CB, 0x25CF, 0x25CE, 0x25C7,
};

/* Microsoft UCS Mapping Compatible */
const unsigned short euc_to_utf8_A1_ms[] = {
         0x3000, 0x3001, 0x3002, 0xFF0C, 0xFF0E, 0x30FB, 0xFF1A,
 0xFF1B, 0xFF1F, 0xFF01, 0x309B, 0x309C, 0x00B4, 0xFF40, 0x00A8,
 0xFF3E, 0xFFE3, 0xFF3F, 0x30FD, 0x30FE, 0x309D, 0x309E, 0x3003,
 0x4EDD, 0x3005, 0x3006, 0x3007, 0x30FC, 0x2015, 0x2010, 0xFF0F,
 0xFF3C, 0xFF5E, 0x2225, 0xFF5C, 0x2026, 0x2025, 0x2018, 0x2019,
 0x201C, 0x201D, 0xFF08, 0xFF09, 0x3014, 0x3015, 0xFF3B, 0xFF3D,
 0xFF5B, 0xFF5D, 0x3008, 0x3009, 0x300A, 0x300B, 0x300C, 0x300D,
 0x300E, 0x300F, 0x3010, 0x3011, 0xFF0B, 0xFF0D, 0x00B1, 0x00D7,
 0x00F7, 0xFF1D, 0x2260, 0xFF1C, 0xFF1E, 0x2266, 0x2267, 0x221E,
 0x2234, 0x2642, 0x2640, 0x00B0, 0x2032, 0x2033, 0x2103, 0xFFE5,
 0xFF04, 0xFFE0, 0xFFE1, 0xFF05, 0xFF03, 0xFF06, 0xFF0A, 0xFF20,
 0x00A7, 0x2606, 0x2605, 0x25CB, 0x25CF, 0x25CE, 0x25C7,
};
const unsigned short euc_to_utf8_A2[] = {
         0x25C6, 0x25A1, 0x25A0, 0x25B3, 0x25B2, 0x25BD, 0x25BC,
 0x203B, 0x3012, 0x2192, 0x2190, 0x2191, 0x2193, 0x3013,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x2208, 0x220B, 0x2286, 0x2287, 0x2282, 0x2283,
 0x222A, 0x2229,      0,      0,      0,      0,      0,      0,
      0,      0, 0x2227, 0x2228, 0x00AC, 0x21D2, 0x21D4, 0x2200,
 0x2203,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x2220, 0x22A5, 0x2312, 0x2202,
 0x2207, 0x2261, 0x2252, 0x226A, 0x226B, 0x221A, 0x223D, 0x221D,
 0x2235, 0x222B, 0x222C,      0,      0,      0,      0,      0,
      0,      0, 0x212B, 0x2030, 0x266F, 0x266D, 0x266A, 0x2020,
 0x2021, 0x00B6,      0,      0,      0,      0, 0x25EF,
};

/* Microsoft UCS Mapping Compatible */
const unsigned short euc_to_utf8_A2_ms[] = {
         0x25C6, 0x25A1, 0x25A0, 0x25B3, 0x25B2, 0x25BD, 0x25BC,
 0x203B, 0x3012, 0x2192, 0x2190, 0x2191, 0x2193, 0x3013,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x2208, 0x220B, 0x2286, 0x2287, 0x2282, 0x2283,
 0x222A, 0x2229,      0,      0,      0,      0,      0,      0,
      0,      0, 0x2227, 0x2228, 0xFFE2, 0x21D2, 0x21D4, 0x2200,
 0x2203,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x2220, 0x22A5, 0x2312, 0x2202,
 0x2207, 0x2261, 0x2252, 0x226A, 0x226B, 0x221A, 0x223D, 0x221D,
 0x2235, 0x222B, 0x222C,      0,      0,      0,      0,      0,
      0,      0, 0x212B, 0x2030, 0x266F, 0x266D, 0x266A, 0x2020,
 0x2021, 0x00B6,      0,      0,      0,      0, 0x25EF,
};
const unsigned short euc_to_utf8_A3[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0xFF10, 0xFF11, 0xFF12, 0xFF13, 0xFF14, 0xFF15, 0xFF16, 0xFF17,
 0xFF18, 0xFF19,      0,      0,      0,      0,      0,      0,
      0, 0xFF21, 0xFF22, 0xFF23, 0xFF24, 0xFF25, 0xFF26, 0xFF27,
 0xFF28, 0xFF29, 0xFF2A, 0xFF2B, 0xFF2C, 0xFF2D, 0xFF2E, 0xFF2F,
 0xFF30, 0xFF31, 0xFF32, 0xFF33, 0xFF34, 0xFF35, 0xFF36, 0xFF37,
 0xFF38, 0xFF39, 0xFF3A,      0,      0,      0,      0,      0,
      0, 0xFF41, 0xFF42, 0xFF43, 0xFF44, 0xFF45, 0xFF46, 0xFF47,
 0xFF48, 0xFF49, 0xFF4A, 0xFF4B, 0xFF4C, 0xFF4D, 0xFF4E, 0xFF4F,
 0xFF50, 0xFF51, 0xFF52, 0xFF53, 0xFF54, 0xFF55, 0xFF56, 0xFF57,
 0xFF58, 0xFF59, 0xFF5A,      0,      0,      0,      0,
};
const unsigned short euc_to_utf8_A4[] = {
         0x3041, 0x3042, 0x3043, 0x3044, 0x3045, 0x3046, 0x3047,
 0x3048, 0x3049, 0x304A, 0x304B, 0x304C, 0x304D, 0x304E, 0x304F,
 0x3050, 0x3051, 0x3052, 0x3053, 0x3054, 0x3055, 0x3056, 0x3057,
 0x3058, 0x3059, 0x305A, 0x305B, 0x305C, 0x305D, 0x305E, 0x305F,
 0x3060, 0x3061, 0x3062, 0x3063, 0x3064, 0x3065, 0x3066, 0x3067,
 0x3068, 0x3069, 0x306A, 0x306B, 0x306C, 0x306D, 0x306E, 0x306F,
 0x3070, 0x3071, 0x3072, 0x3073, 0x3074, 0x3075, 0x3076, 0x3077,
 0x3078, 0x3079, 0x307A, 0x307B, 0x307C, 0x307D, 0x307E, 0x307F,
 0x3080, 0x3081, 0x3082, 0x3083, 0x3084, 0x3085, 0x3086, 0x3087,
 0x3088, 0x3089, 0x308A, 0x308B, 0x308C, 0x308D, 0x308E, 0x308F,
 0x3090, 0x3091, 0x3092, 0x3093,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short euc_to_utf8_A5[] = {
         0x30A1, 0x30A2, 0x30A3, 0x30A4, 0x30A5, 0x30A6, 0x30A7,
 0x30A8, 0x30A9, 0x30AA, 0x30AB, 0x30AC, 0x30AD, 0x30AE, 0x30AF,
 0x30B0, 0x30B1, 0x30B2, 0x30B3, 0x30B4, 0x30B5, 0x30B6, 0x30B7,
 0x30B8, 0x30B9, 0x30BA, 0x30BB, 0x30BC, 0x30BD, 0x30BE, 0x30BF,
 0x30C0, 0x30C1, 0x30C2, 0x30C3, 0x30C4, 0x30C5, 0x30C6, 0x30C7,
 0x30C8, 0x30C9, 0x30CA, 0x30CB, 0x30CC, 0x30CD, 0x30CE, 0x30CF,
 0x30D0, 0x30D1, 0x30D2, 0x30D3, 0x30D4, 0x30D5, 0x30D6, 0x30D7,
 0x30D8, 0x30D9, 0x30DA, 0x30DB, 0x30DC, 0x30DD, 0x30DE, 0x30DF,
 0x30E0, 0x30E1, 0x30E2, 0x30E3, 0x30E4, 0x30E5, 0x30E6, 0x30E7,
 0x30E8, 0x30E9, 0x30EA, 0x30EB, 0x30EC, 0x30ED, 0x30EE, 0x30EF,
 0x30F0, 0x30F1, 0x30F2, 0x30F3, 0x30F4, 0x30F5, 0x30F6,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short euc_to_utf8_A6[] = {
         0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397,
 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F,
 0x03A0, 0x03A1, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8,
 0x03A9,      0,      0,      0,      0,      0,      0,      0,
      0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7,
 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF,
 0x03C0, 0x03C1, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8,
 0x03C9,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short euc_to_utf8_A7[] = {
         0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401,
 0x0416, 0x0417, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D,
 0x041E, 0x041F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425,
 0x0426, 0x0427, 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D,
 0x042E, 0x042F,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0451,
 0x0436, 0x0437, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D,
 0x043E, 0x043F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445,
 0x0446, 0x0447, 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D,
 0x044E, 0x044F,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short euc_to_utf8_A8[] = {
         0x2500, 0x2502, 0x250C, 0x2510, 0x2518, 0x2514, 0x251C,
 0x252C, 0x2524, 0x2534, 0x253C, 0x2501, 0x2503, 0x250F, 0x2513,
 0x251B, 0x2517, 0x2523, 0x2533, 0x252B, 0x253B, 0x254B, 0x2520,
 0x252F, 0x2528, 0x2537, 0x253F, 0x251D, 0x2530, 0x2525, 0x2538,
 0x2542,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short euc_to_utf8_A9[] = {
         0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466,
 0x2467, 0x2468, 0x2469, 0x246A, 0x246B, 0x246C, 0x246D, 0x246E,
 0x246F, 0x2470, 0x2471, 0x2472, 0x2473,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x2474,
 0x2475, 0x2476, 0x2477, 0x2478, 0x2479, 0x247A, 0x247B, 0x247C,
 0x247D, 0x247E, 0x247F, 0x2480, 0x2481, 0x2482, 0x2483, 0x2484,
 0x2485, 0x2486, 0x2487,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0x2776, 0x2777, 0x2778,
 0x2779, 0x277A, 0x277B, 0x277C, 0x277D, 0x277E,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x2488, 0x2489, 0x248A, 0x248B, 0x248C, 0x248D,
 0x248E, 0x248F, 0x2490,      0,      0,      0,      0,
};
const unsigned short euc_to_utf8_AA[] = {
         0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166,
 0x2167, 0x2168, 0x2169, 0x216A, 0x216B,      0,      0,      0,
      0,      0,      0,      0,      0, 0x2170, 0x2171, 0x2172,
 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x217A,
 0x217B,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0x249C, 0x249D, 0x249E,
 0x249F, 0x24A0, 0x24A1, 0x24A2, 0x24A3, 0x24A4, 0x24A5, 0x24A6,
 0x24A7, 0x24A8, 0x24A9, 0x24AA, 0x24AB, 0x24AC, 0x24AD, 0x24AE,
 0x24AF, 0x24B0, 0x24B1, 0x24B2, 0x24B3, 0x24B4, 0x24B5,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short euc_to_utf8_AB[] = {
         0x339C, 0x339F, 0x339D, 0x33A0, 0x33A4,      0, 0x33A1,
 0x33A5, 0x339E, 0x33A2, 0x338E,      0, 0x338F, 0x33C4, 0x3396,
 0x3397, 0x2113, 0x3398, 0x33B3, 0x33B2, 0x33B1, 0x33B0, 0x2109,
 0x33D4, 0x33CB, 0x3390, 0x3385, 0x3386, 0x3387,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x2116, 0x33CD, 0x2121,      0,
};
const unsigned short euc_to_utf8_AC[] = {
         0x2664, 0x2667, 0x2661, 0x2662, 0x2660, 0x2663, 0x2665,
 0x2666,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0x3020, 0x260E, 0x3004,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x261E, 0x261C, 0x261D, 0x261F, 0x21C6, 0x21C4, 0x21C5,
      0, 0x21E8, 0x21E6, 0x21E7, 0x21E9,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short euc_to_utf8_AD[] = {
         0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466,
 0x2467, 0x2468, 0x2469, 0x246A, 0x246B, 0x246C, 0x246D, 0x246E,
 0x246F, 0x2470, 0x2471, 0x2472, 0x2473, 0x2160, 0x2161, 0x2162,
 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169,      0,
 0x3349, 0x3314, 0x3322, 0x334D, 0x3318, 0x3327, 0x3303, 0x3336,
 0x3351, 0x3357, 0x330D, 0x3326, 0x3323, 0x332B, 0x334A, 0x333B,
 0x339C, 0x339D, 0x339E, 0x338E, 0x338F, 0x33C4, 0x33A1,      0,
      0,      0,      0,      0,      0,      0,      0, 0x337B,
 0x301D, 0x301F, 0x2116, 0x33CD, 0x2121, 0x32A4, 0x32A5, 0x32A6,
 0x32A7, 0x32A8, 0x3231, 0x3232, 0x3239, 0x337E, 0x337D, 0x337C,
 0x2252, 0x2261, 0x222B, 0x222E, 0x2211, 0x221A, 0x22A5, 0x2220,
 0x221F, 0x22BF, 0x2235, 0x2229, 0x222A,      0, 0x3299,
};
const unsigned short euc_to_utf8_AE[] = {
         0x3349, 0x3322, 0x334D, 0x3314, 0x3316, 0x3305, 0x3333,
 0x334E, 0x3303, 0x3336, 0x3318, 0x3315, 0x3327, 0x3351, 0x334A,
 0x3339, 0x3357, 0x330D, 0x3342, 0x3323, 0x3326, 0x333B, 0x332B,
      0,      0,      0,      0,      0,      0,      0, 0x3300,
 0x331E, 0x332A, 0x3331, 0x3347,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x337E,
 0x337D, 0x337C, 0x337B,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x337F,      0,      0,
};
const unsigned short euc_to_utf8_AF[] = {
         0x222E, 0x221F, 0x22BF,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0x301D, 0x301F,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x3094,      0, 0x30F7, 0x30F8, 0x30F9, 0x30FA,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short euc_to_utf8_B0[] = {
         0x4E9C, 0x5516, 0x5A03, 0x963F, 0x54C0, 0x611B, 0x6328,
 0x59F6, 0x9022, 0x8475, 0x831C, 0x7A50, 0x60AA, 0x63E1, 0x6E25,
 0x65ED, 0x8466, 0x82A6, 0x9BF5, 0x6893, 0x5727, 0x65A1, 0x6271,
 0x5B9B, 0x59D0, 0x867B, 0x98F4, 0x7D62, 0x7DBE, 0x9B8E, 0x6216,
 0x7C9F, 0x88B7, 0x5B89, 0x5EB5, 0x6309, 0x6697, 0x6848, 0x95C7,
 0x978D, 0x674F, 0x4EE5, 0x4F0A, 0x4F4D, 0x4F9D, 0x5049, 0x56F2,
 0x5937, 0x59D4, 0x5A01, 0x5C09, 0x60DF, 0x610F, 0x6170, 0x6613,
 0x6905, 0x70BA, 0x754F, 0x7570, 0x79FB, 0x7DAD, 0x7DEF, 0x80C3,
 0x840E, 0x8863, 0x8B02, 0x9055, 0x907A, 0x533B, 0x4E95, 0x4EA5,
 0x57DF, 0x80B2, 0x90C1, 0x78EF, 0x4E00, 0x58F1, 0x6EA2, 0x9038,
 0x7A32, 0x8328, 0x828B, 0x9C2F, 0x5141, 0x5370, 0x54BD, 0x54E1,
 0x56E0, 0x59FB, 0x5F15, 0x98F2, 0x6DEB, 0x80E4, 0x852D,
};
const unsigned short euc_to_utf8_B1[] = {
         0x9662, 0x9670, 0x96A0, 0x97FB, 0x540B, 0x53F3, 0x5B87,
 0x70CF, 0x7FBD, 0x8FC2, 0x96E8, 0x536F, 0x9D5C, 0x7ABA, 0x4E11,
 0x7893, 0x81FC, 0x6E26, 0x5618, 0x5504, 0x6B1D, 0x851A, 0x9C3B,
 0x59E5, 0x53A9, 0x6D66, 0x74DC, 0x958F, 0x5642, 0x4E91, 0x904B,
 0x96F2, 0x834F, 0x990C, 0x53E1, 0x55B6, 0x5B30, 0x5F71, 0x6620,
 0x66F3, 0x6804, 0x6C38, 0x6CF3, 0x6D29, 0x745B, 0x76C8, 0x7A4E,
 0x9834, 0x82F1, 0x885B, 0x8A60, 0x92ED, 0x6DB2, 0x75AB, 0x76CA,
 0x99C5, 0x60A6, 0x8B01, 0x8D8A, 0x95B2, 0x698E, 0x53AD, 0x5186,
 0x5712, 0x5830, 0x5944, 0x5BB4, 0x5EF6, 0x6028, 0x63A9, 0x63F4,
 0x6CBF, 0x6F14, 0x708E, 0x7114, 0x7159, 0x71D5, 0x733F, 0x7E01,
 0x8276, 0x82D1, 0x8597, 0x9060, 0x925B, 0x9D1B, 0x5869, 0x65BC,
 0x6C5A, 0x7525, 0x51F9, 0x592E, 0x5965, 0x5F80, 0x5FDC,
};
const unsigned short euc_to_utf8_B2[] = {
         0x62BC, 0x65FA, 0x6A2A, 0x6B27, 0x6BB4, 0x738B, 0x7FC1,
 0x8956, 0x9D2C, 0x9D0E, 0x9EC4, 0x5CA1, 0x6C96, 0x837B, 0x5104,
 0x5C4B, 0x61B6, 0x81C6, 0x6876, 0x7261, 0x4E59, 0x4FFA, 0x5378,
 0x6069, 0x6E29, 0x7A4F, 0x97F3, 0x4E0B, 0x5316, 0x4EEE, 0x4F55,
 0x4F3D, 0x4FA1, 0x4F73, 0x52A0, 0x53EF, 0x5609, 0x590F, 0x5AC1,
 0x5BB6, 0x5BE1, 0x79D1, 0x6687, 0x679C, 0x67B6, 0x6B4C, 0x6CB3,
 0x706B, 0x73C2, 0x798D, 0x79BE, 0x7A3C, 0x7B87, 0x82B1, 0x82DB,
 0x8304, 0x8377, 0x83EF, 0x83D3, 0x8766, 0x8AB2, 0x5629, 0x8CA8,
 0x8FE6, 0x904E, 0x971E, 0x868A, 0x4FC4, 0x5CE8, 0x6211, 0x7259,
 0x753B, 0x81E5, 0x82BD, 0x86FE, 0x8CC0, 0x96C5, 0x9913, 0x99D5,
 0x4ECB, 0x4F1A, 0x89E3, 0x56DE, 0x584A, 0x58CA, 0x5EFB, 0x5FEB,
 0x602A, 0x6094, 0x6062, 0x61D0, 0x6212, 0x62D0, 0x6539,
};
const unsigned short euc_to_utf8_B3[] = {
         0x9B41, 0x6666, 0x68B0, 0x6D77, 0x7070, 0x754C, 0x7686,
 0x7D75, 0x82A5, 0x87F9, 0x958B, 0x968E, 0x8C9D, 0x51F1, 0x52BE,
 0x5916, 0x54B3, 0x5BB3, 0x5D16, 0x6168, 0x6982, 0x6DAF, 0x788D,
 0x84CB, 0x8857, 0x8A72, 0x93A7, 0x9AB8, 0x6D6C, 0x99A8, 0x86D9,
 0x57A3, 0x67FF, 0x86CE, 0x920E, 0x5283, 0x5687, 0x5404, 0x5ED3,
 0x62E1, 0x64B9, 0x683C, 0x6838, 0x6BBB, 0x7372, 0x78BA, 0x7A6B,
 0x899A, 0x89D2, 0x8D6B, 0x8F03, 0x90ED, 0x95A3, 0x9694, 0x9769,
 0x5B66, 0x5CB3, 0x697D, 0x984D, 0x984E, 0x639B, 0x7B20, 0x6A2B,
 0x6A7F, 0x68B6, 0x9C0D, 0x6F5F, 0x5272, 0x559D, 0x6070, 0x62EC,
 0x6D3B, 0x6E07, 0x6ED1, 0x845B, 0x8910, 0x8F44, 0x4E14, 0x9C39,
 0x53F6, 0x691B, 0x6A3A, 0x9784, 0x682A, 0x515C, 0x7AC3, 0x84B2,
 0x91DC, 0x938C, 0x565B, 0x9D28, 0x6822, 0x8305, 0x8431,
};
const unsigned short euc_to_utf8_B4[] = {
         0x7CA5, 0x5208, 0x82C5, 0x74E6, 0x4E7E, 0x4F83, 0x51A0,
 0x5BD2, 0x520A, 0x52D8, 0x52E7, 0x5DFB, 0x559A, 0x582A, 0x59E6,
 0x5B8C, 0x5B98, 0x5BDB, 0x5E72, 0x5E79, 0x60A3, 0x611F, 0x6163,
 0x61BE, 0x63DB, 0x6562, 0x67D1, 0x6853, 0x68FA, 0x6B3E, 0x6B53,
 0x6C57, 0x6F22, 0x6F97, 0x6F45, 0x74B0, 0x7518, 0x76E3, 0x770B,
 0x7AFF, 0x7BA1, 0x7C21, 0x7DE9, 0x7F36, 0x7FF0, 0x809D, 0x8266,
 0x839E, 0x89B3, 0x8ACC, 0x8CAB, 0x9084, 0x9451, 0x9593, 0x9591,
 0x95A2, 0x9665, 0x97D3, 0x9928, 0x8218, 0x4E38, 0x542B, 0x5CB8,
 0x5DCC, 0x73A9, 0x764C, 0x773C, 0x5CA9, 0x7FEB, 0x8D0B, 0x96C1,
 0x9811, 0x9854, 0x9858, 0x4F01, 0x4F0E, 0x5371, 0x559C, 0x5668,
 0x57FA, 0x5947, 0x5B09, 0x5BC4, 0x5C90, 0x5E0C, 0x5E7E, 0x5FCC,
 0x63EE, 0x673A, 0x65D7, 0x65E2, 0x671F, 0x68CB, 0x68C4,
};
const unsigned short euc_to_utf8_B5[] = {
         0x6A5F, 0x5E30, 0x6BC5, 0x6C17, 0x6C7D, 0x757F, 0x7948,
 0x5B63, 0x7A00, 0x7D00, 0x5FBD, 0x898F, 0x8A18, 0x8CB4, 0x8D77,
 0x8ECC, 0x8F1D, 0x98E2, 0x9A0E, 0x9B3C, 0x4E80, 0x507D, 0x5100,
 0x5993, 0x5B9C, 0x622F, 0x6280, 0x64EC, 0x6B3A, 0x72A0, 0x7591,
 0x7947, 0x7FA9, 0x87FB, 0x8ABC, 0x8B70, 0x63AC, 0x83CA, 0x97A0,
 0x5409, 0x5403, 0x55AB, 0x6854, 0x6A58, 0x8A70, 0x7827, 0x6775,
 0x9ECD, 0x5374, 0x5BA2, 0x811A, 0x8650, 0x9006, 0x4E18, 0x4E45,
 0x4EC7, 0x4F11, 0x53CA, 0x5438, 0x5BAE, 0x5F13, 0x6025, 0x6551,
 0x673D, 0x6C42, 0x6C72, 0x6CE3, 0x7078, 0x7403, 0x7A76, 0x7AAE,
 0x7B08, 0x7D1A, 0x7CFE, 0x7D66, 0x65E7, 0x725B, 0x53BB, 0x5C45,
 0x5DE8, 0x62D2, 0x62E0, 0x6319, 0x6E20, 0x865A, 0x8A31, 0x8DDD,
 0x92F8, 0x6F01, 0x79A6, 0x9B5A, 0x4EA8, 0x4EAB, 0x4EAC,
};
const unsigned short euc_to_utf8_B6[] = {
         0x4F9B, 0x4FA0, 0x50D1, 0x5147, 0x7AF6, 0x5171, 0x51F6,
 0x5354, 0x5321, 0x537F, 0x53EB, 0x55AC, 0x5883, 0x5CE1, 0x5F37,
 0x5F4A, 0x602F, 0x6050, 0x606D, 0x631F, 0x6559, 0x6A4B, 0x6CC1,
 0x72C2, 0x72ED, 0x77EF, 0x80F8, 0x8105, 0x8208, 0x854E, 0x90F7,
 0x93E1, 0x97FF, 0x9957, 0x9A5A, 0x4EF0, 0x51DD, 0x5C2D, 0x6681,
 0x696D, 0x5C40, 0x66F2, 0x6975, 0x7389, 0x6850, 0x7C81, 0x50C5,
 0x52E4, 0x5747, 0x5DFE, 0x9326, 0x65A4, 0x6B23, 0x6B3D, 0x7434,
 0x7981, 0x79BD, 0x7B4B, 0x7DCA, 0x82B9, 0x83CC, 0x887F, 0x895F,
 0x8B39, 0x8FD1, 0x91D1, 0x541F, 0x9280, 0x4E5D, 0x5036, 0x53E5,
 0x533A, 0x72D7, 0x7396, 0x77E9, 0x82E6, 0x8EAF, 0x99C6, 0x99C8,
 0x99D2, 0x5177, 0x611A, 0x865E, 0x55B0, 0x7A7A, 0x5076, 0x5BD3,
 0x9047, 0x9685, 0x4E32, 0x6ADB, 0x91E7, 0x5C51, 0x5C48,
};
const unsigned short euc_to_utf8_B7[] = {
         0x6398, 0x7A9F, 0x6C93, 0x9774, 0x8F61, 0x7AAA, 0x718A,
 0x9688, 0x7C82, 0x6817, 0x7E70, 0x6851, 0x936C, 0x52F2, 0x541B,
 0x85AB, 0x8A13, 0x7FA4, 0x8ECD, 0x90E1, 0x5366, 0x8888, 0x7941,
 0x4FC2, 0x50BE, 0x5211, 0x5144, 0x5553, 0x572D, 0x73EA, 0x578B,
 0x5951, 0x5F62, 0x5F84, 0x6075, 0x6176, 0x6167, 0x61A9, 0x63B2,
 0x643A, 0x656C, 0x666F, 0x6842, 0x6E13, 0x7566, 0x7A3D, 0x7CFB,
 0x7D4C, 0x7D99, 0x7E4B, 0x7F6B, 0x830E, 0x834A, 0x86CD, 0x8A08,
 0x8A63, 0x8B66, 0x8EFD, 0x981A, 0x9D8F, 0x82B8, 0x8FCE, 0x9BE8,
 0x5287, 0x621F, 0x6483, 0x6FC0, 0x9699, 0x6841, 0x5091, 0x6B20,
 0x6C7A, 0x6F54, 0x7A74, 0x7D50, 0x8840, 0x8A23, 0x6708, 0x4EF6,
 0x5039, 0x5026, 0x5065, 0x517C, 0x5238, 0x5263, 0x55A7, 0x570F,
 0x5805, 0x5ACC, 0x5EFA, 0x61B2, 0x61F8, 0x62F3, 0x6372,
};
const unsigned short euc_to_utf8_B8[] = {
         0x691C, 0x6A29, 0x727D, 0x72AC, 0x732E, 0x7814, 0x786F,
 0x7D79, 0x770C, 0x80A9, 0x898B, 0x8B19, 0x8CE2, 0x8ED2, 0x9063,
 0x9375, 0x967A, 0x9855, 0x9A13, 0x9E78, 0x5143, 0x539F, 0x53B3,
 0x5E7B, 0x5F26, 0x6E1B, 0x6E90, 0x7384, 0x73FE, 0x7D43, 0x8237,
 0x8A00, 0x8AFA, 0x9650, 0x4E4E, 0x500B, 0x53E4, 0x547C, 0x56FA,
 0x59D1, 0x5B64, 0x5DF1, 0x5EAB, 0x5F27, 0x6238, 0x6545, 0x67AF,
 0x6E56, 0x72D0, 0x7CCA, 0x88B4, 0x80A1, 0x80E1, 0x83F0, 0x864E,
 0x8A87, 0x8DE8, 0x9237, 0x96C7, 0x9867, 0x9F13, 0x4E94, 0x4E92,
 0x4F0D, 0x5348, 0x5449, 0x543E, 0x5A2F, 0x5F8C, 0x5FA1, 0x609F,
 0x68A7, 0x6A8E, 0x745A, 0x7881, 0x8A9E, 0x8AA4, 0x8B77, 0x9190,
 0x4E5E, 0x9BC9, 0x4EA4, 0x4F7C, 0x4FAF, 0x5019, 0x5016, 0x5149,
 0x516C, 0x529F, 0x52B9, 0x52FE, 0x539A, 0x53E3, 0x5411,
};
const unsigned short euc_to_utf8_B9[] = {
         0x540E, 0x5589, 0x5751, 0x57A2, 0x597D, 0x5B54, 0x5B5D,
 0x5B8F, 0x5DE5, 0x5DE7, 0x5DF7, 0x5E78, 0x5E83, 0x5E9A, 0x5EB7,
 0x5F18, 0x6052, 0x614C, 0x6297, 0x62D8, 0x63A7, 0x653B, 0x6602,
 0x6643, 0x66F4, 0x676D, 0x6821, 0x6897, 0x69CB, 0x6C5F, 0x6D2A,
 0x6D69, 0x6E2F, 0x6E9D, 0x7532, 0x7687, 0x786C, 0x7A3F, 0x7CE0,
 0x7D05, 0x7D18, 0x7D5E, 0x7DB1, 0x8015, 0x8003, 0x80AF, 0x80B1,
 0x8154, 0x818F, 0x822A, 0x8352, 0x884C, 0x8861, 0x8B1B, 0x8CA2,
 0x8CFC, 0x90CA, 0x9175, 0x9271, 0x783F, 0x92FC, 0x95A4, 0x964D,
 0x9805, 0x9999, 0x9AD8, 0x9D3B, 0x525B, 0x52AB, 0x53F7, 0x5408,
 0x58D5, 0x62F7, 0x6FE0, 0x8C6A, 0x8F5F, 0x9EB9, 0x514B, 0x523B,
 0x544A, 0x56FD, 0x7A40, 0x9177, 0x9D60, 0x9ED2, 0x7344, 0x6F09,
 0x8170, 0x7511, 0x5FFD, 0x60DA, 0x9AA8, 0x72DB, 0x8FBC,
};
const unsigned short euc_to_utf8_BA[] = {
         0x6B64, 0x9803, 0x4ECA, 0x56F0, 0x5764, 0x58BE, 0x5A5A,
 0x6068, 0x61C7, 0x660F, 0x6606, 0x6839, 0x68B1, 0x6DF7, 0x75D5,
 0x7D3A, 0x826E, 0x9B42, 0x4E9B, 0x4F50, 0x53C9, 0x5506, 0x5D6F,
 0x5DE6, 0x5DEE, 0x67FB, 0x6C99, 0x7473, 0x7802, 0x8A50, 0x9396,
 0x88DF, 0x5750, 0x5EA7, 0x632B, 0x50B5, 0x50AC, 0x518D, 0x6700,
 0x54C9, 0x585E, 0x59BB, 0x5BB0, 0x5F69, 0x624D, 0x63A1, 0x683D,
 0x6B73, 0x6E08, 0x707D, 0x91C7, 0x7280, 0x7815, 0x7826, 0x796D,
 0x658E, 0x7D30, 0x83DC, 0x88C1, 0x8F09, 0x969B, 0x5264, 0x5728,
 0x6750, 0x7F6A, 0x8CA1, 0x51B4, 0x5742, 0x962A, 0x583A, 0x698A,
 0x80B4, 0x54B2, 0x5D0E, 0x57FC, 0x7895, 0x9DFA, 0x4F5C, 0x524A,
 0x548B, 0x643E, 0x6628, 0x6714, 0x67F5, 0x7A84, 0x7B56, 0x7D22,
 0x932F, 0x685C, 0x9BAD, 0x7B39, 0x5319, 0x518A, 0x5237,
};
const unsigned short euc_to_utf8_BB[] = {
         0x5BDF, 0x62F6, 0x64AE, 0x64E6, 0x672D, 0x6BBA, 0x85A9,
 0x96D1, 0x7690, 0x9BD6, 0x634C, 0x9306, 0x9BAB, 0x76BF, 0x6652,
 0x4E09, 0x5098, 0x53C2, 0x5C71, 0x60E8, 0x6492, 0x6563, 0x685F,
 0x71E6, 0x73CA, 0x7523, 0x7B97, 0x7E82, 0x8695, 0x8B83, 0x8CDB,
 0x9178, 0x9910, 0x65AC, 0x66AB, 0x6B8B, 0x4ED5, 0x4ED4, 0x4F3A,
 0x4F7F, 0x523A, 0x53F8, 0x53F2, 0x55E3, 0x56DB, 0x58EB, 0x59CB,
 0x59C9, 0x59FF, 0x5B50, 0x5C4D, 0x5E02, 0x5E2B, 0x5FD7, 0x601D,
 0x6307, 0x652F, 0x5B5C, 0x65AF, 0x65BD, 0x65E8, 0x679D, 0x6B62,
 0x6B7B, 0x6C0F, 0x7345, 0x7949, 0x79C1, 0x7CF8, 0x7D19, 0x7D2B,
 0x80A2, 0x8102, 0x81F3, 0x8996, 0x8A5E, 0x8A69, 0x8A66, 0x8A8C,
 0x8AEE, 0x8CC7, 0x8CDC, 0x96CC, 0x98FC, 0x6B6F, 0x4E8B, 0x4F3C,
 0x4F8D, 0x5150, 0x5B57, 0x5BFA, 0x6148, 0x6301, 0x6642,
};
const unsigned short euc_to_utf8_BC[] = {
         0x6B21, 0x6ECB, 0x6CBB, 0x723E, 0x74BD, 0x75D4, 0x78C1,
 0x793A, 0x800C, 0x8033, 0x81EA, 0x8494, 0x8F9E, 0x6C50, 0x9E7F,
 0x5F0F, 0x8B58, 0x9D2B, 0x7AFA, 0x8EF8, 0x5B8D, 0x96EB, 0x4E03,
 0x53F1, 0x57F7, 0x5931, 0x5AC9, 0x5BA4, 0x6089, 0x6E7F, 0x6F06,
 0x75BE, 0x8CEA, 0x5B9F, 0x8500, 0x7BE0, 0x5072, 0x67F4, 0x829D,
 0x5C61, 0x854A, 0x7E1E, 0x820E, 0x5199, 0x5C04, 0x6368, 0x8D66,
 0x659C, 0x716E, 0x793E, 0x7D17, 0x8005, 0x8B1D, 0x8ECA, 0x906E,
 0x86C7, 0x90AA, 0x501F, 0x52FA, 0x5C3A, 0x6753, 0x707C, 0x7235,
 0x914C, 0x91C8, 0x932B, 0x82E5, 0x5BC2, 0x5F31, 0x60F9, 0x4E3B,
 0x53D6, 0x5B88, 0x624B, 0x6731, 0x6B8A, 0x72E9, 0x73E0, 0x7A2E,
 0x816B, 0x8DA3, 0x9152, 0x9996, 0x5112, 0x53D7, 0x546A, 0x5BFF,
 0x6388, 0x6A39, 0x7DAC, 0x9700, 0x56DA, 0x53CE, 0x5468,
};
const unsigned short euc_to_utf8_BD[] = {
         0x5B97, 0x5C31, 0x5DDE, 0x4FEE, 0x6101, 0x62FE, 0x6D32,
 0x79C0, 0x79CB, 0x7D42, 0x7E4D, 0x7FD2, 0x81ED, 0x821F, 0x8490,
 0x8846, 0x8972, 0x8B90, 0x8E74, 0x8F2F, 0x9031, 0x914B, 0x916C,
 0x96C6, 0x919C, 0x4EC0, 0x4F4F, 0x5145, 0x5341, 0x5F93, 0x620E,
 0x67D4, 0x6C41, 0x6E0B, 0x7363, 0x7E26, 0x91CD, 0x9283, 0x53D4,
 0x5919, 0x5BBF, 0x6DD1, 0x795D, 0x7E2E, 0x7C9B, 0x587E, 0x719F,
 0x51FA, 0x8853, 0x8FF0, 0x4FCA, 0x5CFB, 0x6625, 0x77AC, 0x7AE3,
 0x821C, 0x99FF, 0x51C6, 0x5FAA, 0x65EC, 0x696F, 0x6B89, 0x6DF3,
 0x6E96, 0x6F64, 0x76FE, 0x7D14, 0x5DE1, 0x9075, 0x9187, 0x9806,
 0x51E6, 0x521D, 0x6240, 0x6691, 0x66D9, 0x6E1A, 0x5EB6, 0x7DD2,
 0x7F72, 0x66F8, 0x85AF, 0x85F7, 0x8AF8, 0x52A9, 0x53D9, 0x5973,
 0x5E8F, 0x5F90, 0x6055, 0x92E4, 0x9664, 0x50B7, 0x511F,
};
const unsigned short euc_to_utf8_BE[] = {
         0x52DD, 0x5320, 0x5347, 0x53EC, 0x54E8, 0x5546, 0x5531,
 0x5617, 0x5968, 0x59BE, 0x5A3C, 0x5BB5, 0x5C06, 0x5C0F, 0x5C11,
 0x5C1A, 0x5E84, 0x5E8A, 0x5EE0, 0x5F70, 0x627F, 0x6284, 0x62DB,
 0x638C, 0x6377, 0x6607, 0x660C, 0x662D, 0x6676, 0x677E, 0x68A2,
 0x6A1F, 0x6A35, 0x6CBC, 0x6D88, 0x6E09, 0x6E58, 0x713C, 0x7126,
 0x7167, 0x75C7, 0x7701, 0x785D, 0x7901, 0x7965, 0x79F0, 0x7AE0,
 0x7B11, 0x7CA7, 0x7D39, 0x8096, 0x83D6, 0x848B, 0x8549, 0x885D,
 0x88F3, 0x8A1F, 0x8A3C, 0x8A54, 0x8A73, 0x8C61, 0x8CDE, 0x91A4,
 0x9266, 0x937E, 0x9418, 0x969C, 0x9798, 0x4E0A, 0x4E08, 0x4E1E,
 0x4E57, 0x5197, 0x5270, 0x57CE, 0x5834, 0x58CC, 0x5B22, 0x5E38,
 0x60C5, 0x64FE, 0x6761, 0x6756, 0x6D44, 0x72B6, 0x7573, 0x7A63,
 0x84B8, 0x8B72, 0x91B8, 0x9320, 0x5631, 0x57F4, 0x98FE,
};
const unsigned short euc_to_utf8_BF[] = {
         0x62ED, 0x690D, 0x6B96, 0x71ED, 0x7E54, 0x8077, 0x8272,
 0x89E6, 0x98DF, 0x8755, 0x8FB1, 0x5C3B, 0x4F38, 0x4FE1, 0x4FB5,
 0x5507, 0x5A20, 0x5BDD, 0x5BE9, 0x5FC3, 0x614E, 0x632F, 0x65B0,
 0x664B, 0x68EE, 0x699B, 0x6D78, 0x6DF1, 0x7533, 0x75B9, 0x771F,
 0x795E, 0x79E6, 0x7D33, 0x81E3, 0x82AF, 0x85AA, 0x89AA, 0x8A3A,
 0x8EAB, 0x8F9B, 0x9032, 0x91DD, 0x9707, 0x4EBA, 0x4EC1, 0x5203,
 0x5875, 0x58EC, 0x5C0B, 0x751A, 0x5C3D, 0x814E, 0x8A0A, 0x8FC5,
 0x9663, 0x976D, 0x7B25, 0x8ACF, 0x9808, 0x9162, 0x56F3, 0x53A8,
 0x9017, 0x5439, 0x5782, 0x5E25, 0x63A8, 0x6C34, 0x708A, 0x7761,
 0x7C8B, 0x7FE0, 0x8870, 0x9042, 0x9154, 0x9310, 0x9318, 0x968F,
 0x745E, 0x9AC4, 0x5D07, 0x5D69, 0x6570, 0x67A2, 0x8DA8, 0x96DB,
 0x636E, 0x6749, 0x6919, 0x83C5, 0x9817, 0x96C0, 0x88FE,
};
const unsigned short euc_to_utf8_C0[] = {
         0x6F84, 0x647A, 0x5BF8, 0x4E16, 0x702C, 0x755D, 0x662F,
 0x51C4, 0x5236, 0x52E2, 0x59D3, 0x5F81, 0x6027, 0x6210, 0x653F,
 0x6574, 0x661F, 0x6674, 0x68F2, 0x6816, 0x6B63, 0x6E05, 0x7272,
 0x751F, 0x76DB, 0x7CBE, 0x8056, 0x58F0, 0x88FD, 0x897F, 0x8AA0,
 0x8A93, 0x8ACB, 0x901D, 0x9192, 0x9752, 0x9759, 0x6589, 0x7A0E,
 0x8106, 0x96BB, 0x5E2D, 0x60DC, 0x621A, 0x65A5, 0x6614, 0x6790,
 0x77F3, 0x7A4D, 0x7C4D, 0x7E3E, 0x810A, 0x8CAC, 0x8D64, 0x8DE1,
 0x8E5F, 0x78A9, 0x5207, 0x62D9, 0x63A5, 0x6442, 0x6298, 0x8A2D,
 0x7A83, 0x7BC0, 0x8AAC, 0x96EA, 0x7D76, 0x820C, 0x8749, 0x4ED9,
 0x5148, 0x5343, 0x5360, 0x5BA3, 0x5C02, 0x5C16, 0x5DDD, 0x6226,
 0x6247, 0x64B0, 0x6813, 0x6834, 0x6CC9, 0x6D45, 0x6D17, 0x67D3,
 0x6F5C, 0x714E, 0x717D, 0x65CB, 0x7A7F, 0x7BAD, 0x7DDA,
};
const unsigned short euc_to_utf8_C1[] = {
         0x7E4A, 0x7FA8, 0x817A, 0x821B, 0x8239, 0x85A6, 0x8A6E,
 0x8CCE, 0x8DF5, 0x9078, 0x9077, 0x92AD, 0x9291, 0x9583, 0x9BAE,
 0x524D, 0x5584, 0x6F38, 0x7136, 0x5168, 0x7985, 0x7E55, 0x81B3,
 0x7CCE, 0x564C, 0x5851, 0x5CA8, 0x63AA, 0x66FE, 0x66FD, 0x695A,
 0x72D9, 0x758F, 0x758E, 0x790E, 0x7956, 0x79DF, 0x7C97, 0x7D20,
 0x7D44, 0x8607, 0x8A34, 0x963B, 0x9061, 0x9F20, 0x50E7, 0x5275,
 0x53CC, 0x53E2, 0x5009, 0x55AA, 0x58EE, 0x594F, 0x723D, 0x5B8B,
 0x5C64, 0x531D, 0x60E3, 0x60F3, 0x635C, 0x6383, 0x633F, 0x63BB,
 0x64CD, 0x65E9, 0x66F9, 0x5DE3, 0x69CD, 0x69FD, 0x6F15, 0x71E5,
 0x4E89, 0x75E9, 0x76F8, 0x7A93, 0x7CDF, 0x7DCF, 0x7D9C, 0x8061,
 0x8349, 0x8358, 0x846C, 0x84BC, 0x85FB, 0x88C5, 0x8D70, 0x9001,
 0x906D, 0x9397, 0x971C, 0x9A12, 0x50CF, 0x5897, 0x618E,
};
const unsigned short euc_to_utf8_C2[] = {
         0x81D3, 0x8535, 0x8D08, 0x9020, 0x4FC3, 0x5074, 0x5247,
 0x5373, 0x606F, 0x6349, 0x675F, 0x6E2C, 0x8DB3, 0x901F, 0x4FD7,
 0x5C5E, 0x8CCA, 0x65CF, 0x7D9A, 0x5352, 0x8896, 0x5176, 0x63C3,
 0x5B58, 0x5B6B, 0x5C0A, 0x640D, 0x6751, 0x905C, 0x4ED6, 0x591A,
 0x592A, 0x6C70, 0x8A51, 0x553E, 0x5815, 0x59A5, 0x60F0, 0x6253,
 0x67C1, 0x8235, 0x6955, 0x9640, 0x99C4, 0x9A28, 0x4F53, 0x5806,
 0x5BFE, 0x8010, 0x5CB1, 0x5E2F, 0x5F85, 0x6020, 0x614B, 0x6234,
 0x66FF, 0x6CF0, 0x6EDE, 0x80CE, 0x817F, 0x82D4, 0x888B, 0x8CB8,
 0x9000, 0x902E, 0x968A, 0x9EDB, 0x9BDB, 0x4EE3, 0x53F0, 0x5927,
 0x7B2C, 0x918D, 0x984C, 0x9DF9, 0x6EDD, 0x7027, 0x5353, 0x5544,
 0x5B85, 0x6258, 0x629E, 0x62D3, 0x6CA2, 0x6FEF, 0x7422, 0x8A17,
 0x9438, 0x6FC1, 0x8AFE, 0x8338, 0x51E7, 0x86F8, 0x53EA,
};
const unsigned short euc_to_utf8_C3[] = {
         0x53E9, 0x4F46, 0x9054, 0x8FB0, 0x596A, 0x8131, 0x5DFD,
 0x7AEA, 0x8FBF, 0x68DA, 0x8C37, 0x72F8, 0x9C48, 0x6A3D, 0x8AB0,
 0x4E39, 0x5358, 0x5606, 0x5766, 0x62C5, 0x63A2, 0x65E6, 0x6B4E,
 0x6DE1, 0x6E5B, 0x70AD, 0x77ED, 0x7AEF, 0x7BAA, 0x7DBB, 0x803D,
 0x80C6, 0x86CB, 0x8A95, 0x935B, 0x56E3, 0x58C7, 0x5F3E, 0x65AD,
 0x6696, 0x6A80, 0x6BB5, 0x7537, 0x8AC7, 0x5024, 0x77E5, 0x5730,
 0x5F1B, 0x6065, 0x667A, 0x6C60, 0x75F4, 0x7A1A, 0x7F6E, 0x81F4,
 0x8718, 0x9045, 0x99B3, 0x7BC9, 0x755C, 0x7AF9, 0x7B51, 0x84C4,
 0x9010, 0x79E9, 0x7A92, 0x8336, 0x5AE1, 0x7740, 0x4E2D, 0x4EF2,
 0x5B99, 0x5FE0, 0x62BD, 0x663C, 0x67F1, 0x6CE8, 0x866B, 0x8877,
 0x8A3B, 0x914E, 0x92F3, 0x99D0, 0x6A17, 0x7026, 0x732A, 0x82E7,
 0x8457, 0x8CAF, 0x4E01, 0x5146, 0x51CB, 0x558B, 0x5BF5,
};
const unsigned short euc_to_utf8_C4[] = {
         0x5E16, 0x5E33, 0x5E81, 0x5F14, 0x5F35, 0x5F6B, 0x5FB4,
 0x61F2, 0x6311, 0x66A2, 0x671D, 0x6F6E, 0x7252, 0x753A, 0x773A,
 0x8074, 0x8139, 0x8178, 0x8776, 0x8ABF, 0x8ADC, 0x8D85, 0x8DF3,
 0x929A, 0x9577, 0x9802, 0x9CE5, 0x52C5, 0x6357, 0x76F4, 0x6715,
 0x6C88, 0x73CD, 0x8CC3, 0x93AE, 0x9673, 0x6D25, 0x589C, 0x690E,
 0x69CC, 0x8FFD, 0x939A, 0x75DB, 0x901A, 0x585A, 0x6802, 0x63B4,
 0x69FB, 0x4F43, 0x6F2C, 0x67D8, 0x8FBB, 0x8526, 0x7DB4, 0x9354,
 0x693F, 0x6F70, 0x576A, 0x58F7, 0x5B2C, 0x7D2C, 0x722A, 0x540A,
 0x91E3, 0x9DB4, 0x4EAD, 0x4F4E, 0x505C, 0x5075, 0x5243, 0x8C9E,
 0x5448, 0x5824, 0x5B9A, 0x5E1D, 0x5E95, 0x5EAD, 0x5EF7, 0x5F1F,
 0x608C, 0x62B5, 0x633A, 0x63D0, 0x68AF, 0x6C40, 0x7887, 0x798E,
 0x7A0B, 0x7DE0, 0x8247, 0x8A02, 0x8AE6, 0x8E44, 0x9013,
};
const unsigned short euc_to_utf8_C5[] = {
         0x90B8, 0x912D, 0x91D8, 0x9F0E, 0x6CE5, 0x6458, 0x64E2,
 0x6575, 0x6EF4, 0x7684, 0x7B1B, 0x9069, 0x93D1, 0x6EBA, 0x54F2,
 0x5FB9, 0x64A4, 0x8F4D, 0x8FED, 0x9244, 0x5178, 0x586B, 0x5929,
 0x5C55, 0x5E97, 0x6DFB, 0x7E8F, 0x751C, 0x8CBC, 0x8EE2, 0x985B,
 0x70B9, 0x4F1D, 0x6BBF, 0x6FB1, 0x7530, 0x96FB, 0x514E, 0x5410,
 0x5835, 0x5857, 0x59AC, 0x5C60, 0x5F92, 0x6597, 0x675C, 0x6E21,
 0x767B, 0x83DF, 0x8CED, 0x9014, 0x90FD, 0x934D, 0x7825, 0x783A,
 0x52AA, 0x5EA6, 0x571F, 0x5974, 0x6012, 0x5012, 0x515A, 0x51AC,
 0x51CD, 0x5200, 0x5510, 0x5854, 0x5858, 0x5957, 0x5B95, 0x5CF6,
 0x5D8B, 0x60BC, 0x6295, 0x642D, 0x6771, 0x6843, 0x68BC, 0x68DF,
 0x76D7, 0x6DD8, 0x6E6F, 0x6D9B, 0x706F, 0x71C8, 0x5F53, 0x75D8,
 0x7977, 0x7B49, 0x7B54, 0x7B52, 0x7CD6, 0x7D71, 0x5230,
};
const unsigned short euc_to_utf8_C6[] = {
         0x8463, 0x8569, 0x85E4, 0x8A0E, 0x8B04, 0x8C46, 0x8E0F,
 0x9003, 0x900F, 0x9419, 0x9676, 0x982D, 0x9A30, 0x95D8, 0x50CD,
 0x52D5, 0x540C, 0x5802, 0x5C0E, 0x61A7, 0x649E, 0x6D1E, 0x77B3,
 0x7AE5, 0x80F4, 0x8404, 0x9053, 0x9285, 0x5CE0, 0x9D07, 0x533F,
 0x5F97, 0x5FB3, 0x6D9C, 0x7279, 0x7763, 0x79BF, 0x7BE4, 0x6BD2,
 0x72EC, 0x8AAD, 0x6803, 0x6A61, 0x51F8, 0x7A81, 0x6934, 0x5C4A,
 0x9CF6, 0x82EB, 0x5BC5, 0x9149, 0x701E, 0x5678, 0x5C6F, 0x60C7,
 0x6566, 0x6C8C, 0x8C5A, 0x9041, 0x9813, 0x5451, 0x66C7, 0x920D,
 0x5948, 0x90A3, 0x5185, 0x4E4D, 0x51EA, 0x8599, 0x8B0E, 0x7058,
 0x637A, 0x934B, 0x6962, 0x99B4, 0x7E04, 0x7577, 0x5357, 0x6960,
 0x8EDF, 0x96E3, 0x6C5D, 0x4E8C, 0x5C3C, 0x5F10, 0x8FE9, 0x5302,
 0x8CD1, 0x8089, 0x8679, 0x5EFF, 0x65E5, 0x4E73, 0x5165,
};
const unsigned short euc_to_utf8_C7[] = {
         0x5982, 0x5C3F, 0x97EE, 0x4EFB, 0x598A, 0x5FCD, 0x8A8D,
 0x6FE1, 0x79B0, 0x7962, 0x5BE7, 0x8471, 0x732B, 0x71B1, 0x5E74,
 0x5FF5, 0x637B, 0x649A, 0x71C3, 0x7C98, 0x4E43, 0x5EFC, 0x4E4B,
 0x57DC, 0x56A2, 0x60A9, 0x6FC3, 0x7D0D, 0x80FD, 0x8133, 0x81BF,
 0x8FB2, 0x8997, 0x86A4, 0x5DF4, 0x628A, 0x64AD, 0x8987, 0x6777,
 0x6CE2, 0x6D3E, 0x7436, 0x7834, 0x5A46, 0x7F75, 0x82AD, 0x99AC,
 0x4FF3, 0x5EC3, 0x62DD, 0x6392, 0x6557, 0x676F, 0x76C3, 0x724C,
 0x80CC, 0x80BA, 0x8F29, 0x914D, 0x500D, 0x57F9, 0x5A92, 0x6885,
 0x6973, 0x7164, 0x72FD, 0x8CB7, 0x58F2, 0x8CE0, 0x966A, 0x9019,
 0x877F, 0x79E4, 0x77E7, 0x8429, 0x4F2F, 0x5265, 0x535A, 0x62CD,
 0x67CF, 0x6CCA, 0x767D, 0x7B94, 0x7C95, 0x8236, 0x8584, 0x8FEB,
 0x66DD, 0x6F20, 0x7206, 0x7E1B, 0x83AB, 0x99C1, 0x9EA6,
};
const unsigned short euc_to_utf8_C8[] = {
         0x51FD, 0x7BB1, 0x7872, 0x7BB8, 0x8087, 0x7B48, 0x6AE8,
 0x5E61, 0x808C, 0x7551, 0x7560, 0x516B, 0x9262, 0x6E8C, 0x767A,
 0x9197, 0x9AEA, 0x4F10, 0x7F70, 0x629C, 0x7B4F, 0x95A5, 0x9CE9,
 0x567A, 0x5859, 0x86E4, 0x96BC, 0x4F34, 0x5224, 0x534A, 0x53CD,
 0x53DB, 0x5E06, 0x642C, 0x6591, 0x677F, 0x6C3E, 0x6C4E, 0x7248,
 0x72AF, 0x73ED, 0x7554, 0x7E41, 0x822C, 0x85E9, 0x8CA9, 0x7BC4,
 0x91C6, 0x7169, 0x9812, 0x98EF, 0x633D, 0x6669, 0x756A, 0x76E4,
 0x78D0, 0x8543, 0x86EE, 0x532A, 0x5351, 0x5426, 0x5983, 0x5E87,
 0x5F7C, 0x60B2, 0x6249, 0x6279, 0x62AB, 0x6590, 0x6BD4, 0x6CCC,
 0x75B2, 0x76AE, 0x7891, 0x79D8, 0x7DCB, 0x7F77, 0x80A5, 0x88AB,
 0x8AB9, 0x8CBB, 0x907F, 0x975E, 0x98DB, 0x6A0B, 0x7C38, 0x5099,
 0x5C3E, 0x5FAE, 0x6787, 0x6BD8, 0x7435, 0x7709, 0x7F8E,
};
const unsigned short euc_to_utf8_C9[] = {
         0x9F3B, 0x67CA, 0x7A17, 0x5339, 0x758B, 0x9AED, 0x5F66,
 0x819D, 0x83F1, 0x8098, 0x5F3C, 0x5FC5, 0x7562, 0x7B46, 0x903C,
 0x6867, 0x59EB, 0x5A9B, 0x7D10, 0x767E, 0x8B2C, 0x4FF5, 0x5F6A,
 0x6A19, 0x6C37, 0x6F02, 0x74E2, 0x7968, 0x8868, 0x8A55, 0x8C79,
 0x5EDF, 0x63CF, 0x75C5, 0x79D2, 0x82D7, 0x9328, 0x92F2, 0x849C,
 0x86ED, 0x9C2D, 0x54C1, 0x5F6C, 0x658C, 0x6D5C, 0x7015, 0x8CA7,
 0x8CD3, 0x983B, 0x654F, 0x74F6, 0x4E0D, 0x4ED8, 0x57E0, 0x592B,
 0x5A66, 0x5BCC, 0x51A8, 0x5E03, 0x5E9C, 0x6016, 0x6276, 0x6577,
 0x65A7, 0x666E, 0x6D6E, 0x7236, 0x7B26, 0x8150, 0x819A, 0x8299,
 0x8B5C, 0x8CA0, 0x8CE6, 0x8D74, 0x961C, 0x9644, 0x4FAE, 0x64AB,
 0x6B66, 0x821E, 0x8461, 0x856A, 0x90E8, 0x5C01, 0x6953, 0x98A8,
 0x847A, 0x8557, 0x4F0F, 0x526F, 0x5FA9, 0x5E45, 0x670D,
};
const unsigned short euc_to_utf8_CA[] = {
         0x798F, 0x8179, 0x8907, 0x8986, 0x6DF5, 0x5F17, 0x6255,
 0x6CB8, 0x4ECF, 0x7269, 0x9B92, 0x5206, 0x543B, 0x5674, 0x58B3,
 0x61A4, 0x626E, 0x711A, 0x596E, 0x7C89, 0x7CDE, 0x7D1B, 0x96F0,
 0x6587, 0x805E, 0x4E19, 0x4F75, 0x5175, 0x5840, 0x5E63, 0x5E73,
 0x5F0A, 0x67C4, 0x4E26, 0x853D, 0x9589, 0x965B, 0x7C73, 0x9801,
 0x50FB, 0x58C1, 0x7656, 0x78A7, 0x5225, 0x77A5, 0x8511, 0x7B86,
 0x504F, 0x5909, 0x7247, 0x7BC7, 0x7DE8, 0x8FBA, 0x8FD4, 0x904D,
 0x4FBF, 0x52C9, 0x5A29, 0x5F01, 0x97AD, 0x4FDD, 0x8217, 0x92EA,
 0x5703, 0x6355, 0x6B69, 0x752B, 0x88DC, 0x8F14, 0x7A42, 0x52DF,
 0x5893, 0x6155, 0x620A, 0x66AE, 0x6BCD, 0x7C3F, 0x83E9, 0x5023,
 0x4FF8, 0x5305, 0x5446, 0x5831, 0x5949, 0x5B9D, 0x5CF0, 0x5CEF,
 0x5D29, 0x5E96, 0x62B1, 0x6367, 0x653E, 0x65B9, 0x670B,
};
const unsigned short euc_to_utf8_CB[] = {
         0x6CD5, 0x6CE1, 0x70F9, 0x7832, 0x7E2B, 0x80DE, 0x82B3,
 0x840C, 0x84EC, 0x8702, 0x8912, 0x8A2A, 0x8C4A, 0x90A6, 0x92D2,
 0x98FD, 0x9CF3, 0x9D6C, 0x4E4F, 0x4EA1, 0x508D, 0x5256, 0x574A,
 0x59A8, 0x5E3D, 0x5FD8, 0x5FD9, 0x623F, 0x66B4, 0x671B, 0x67D0,
 0x68D2, 0x5192, 0x7D21, 0x80AA, 0x81A8, 0x8B00, 0x8C8C, 0x8CBF,
 0x927E, 0x9632, 0x5420, 0x982C, 0x5317, 0x50D5, 0x535C, 0x58A8,
 0x64B2, 0x6734, 0x7267, 0x7766, 0x7A46, 0x91E6, 0x52C3, 0x6CA1,
 0x6B86, 0x5800, 0x5E4C, 0x5954, 0x672C, 0x7FFB, 0x51E1, 0x76C6,
 0x6469, 0x78E8, 0x9B54, 0x9EBB, 0x57CB, 0x59B9, 0x6627, 0x679A,
 0x6BCE, 0x54E9, 0x69D9, 0x5E55, 0x819C, 0x6795, 0x9BAA, 0x67FE,
 0x9C52, 0x685D, 0x4EA6, 0x4FE3, 0x53C8, 0x62B9, 0x672B, 0x6CAB,
 0x8FC4, 0x4FAD, 0x7E6D, 0x9EBF, 0x4E07, 0x6162, 0x6E80,
};
const unsigned short euc_to_utf8_CC[] = {
         0x6F2B, 0x8513, 0x5473, 0x672A, 0x9B45, 0x5DF3, 0x7B95,
 0x5CAC, 0x5BC6, 0x871C, 0x6E4A, 0x84D1, 0x7A14, 0x8108, 0x5999,
 0x7C8D, 0x6C11, 0x7720, 0x52D9, 0x5922, 0x7121, 0x725F, 0x77DB,
 0x9727, 0x9D61, 0x690B, 0x5A7F, 0x5A18, 0x51A5, 0x540D, 0x547D,
 0x660E, 0x76DF, 0x8FF7, 0x9298, 0x9CF4, 0x59EA, 0x725D, 0x6EC5,
 0x514D, 0x68C9, 0x7DBF, 0x7DEC, 0x9762, 0x9EBA, 0x6478, 0x6A21,
 0x8302, 0x5984, 0x5B5F, 0x6BDB, 0x731B, 0x76F2, 0x7DB2, 0x8017,
 0x8499, 0x5132, 0x6728, 0x9ED9, 0x76EE, 0x6762, 0x52FF, 0x9905,
 0x5C24, 0x623B, 0x7C7E, 0x8CB0, 0x554F, 0x60B6, 0x7D0B, 0x9580,
 0x5301, 0x4E5F, 0x51B6, 0x591C, 0x723A, 0x8036, 0x91CE, 0x5F25,
 0x77E2, 0x5384, 0x5F79, 0x7D04, 0x85AC, 0x8A33, 0x8E8D, 0x9756,
 0x67F3, 0x85AE, 0x9453, 0x6109, 0x6108, 0x6CB9, 0x7652,
};
const unsigned short euc_to_utf8_CD[] = {
         0x8AED, 0x8F38, 0x552F, 0x4F51, 0x512A, 0x52C7, 0x53CB,
 0x5BA5, 0x5E7D, 0x60A0, 0x6182, 0x63D6, 0x6709, 0x67DA, 0x6E67,
 0x6D8C, 0x7336, 0x7337, 0x7531, 0x7950, 0x88D5, 0x8A98, 0x904A,
 0x9091, 0x90F5, 0x96C4, 0x878D, 0x5915, 0x4E88, 0x4F59, 0x4E0E,
 0x8A89, 0x8F3F, 0x9810, 0x50AD, 0x5E7C, 0x5996, 0x5BB9, 0x5EB8,
 0x63DA, 0x63FA, 0x64C1, 0x66DC, 0x694A, 0x69D8, 0x6D0B, 0x6EB6,
 0x7194, 0x7528, 0x7AAF, 0x7F8A, 0x8000, 0x8449, 0x84C9, 0x8981,
 0x8B21, 0x8E0A, 0x9065, 0x967D, 0x990A, 0x617E, 0x6291, 0x6B32,
 0x6C83, 0x6D74, 0x7FCC, 0x7FFC, 0x6DC0, 0x7F85, 0x87BA, 0x88F8,
 0x6765, 0x83B1, 0x983C, 0x96F7, 0x6D1B, 0x7D61, 0x843D, 0x916A,
 0x4E71, 0x5375, 0x5D50, 0x6B04, 0x6FEB, 0x85CD, 0x862D, 0x89A7,
 0x5229, 0x540F, 0x5C65, 0x674E, 0x68A8, 0x7406, 0x7483,
};
const unsigned short euc_to_utf8_CE[] = {
         0x75E2, 0x88CF, 0x88E1, 0x91CC, 0x96E2, 0x9678, 0x5F8B,
 0x7387, 0x7ACB, 0x844E, 0x63A0, 0x7565, 0x5289, 0x6D41, 0x6E9C,
 0x7409, 0x7559, 0x786B, 0x7C92, 0x9686, 0x7ADC, 0x9F8D, 0x4FB6,
 0x616E, 0x65C5, 0x865C, 0x4E86, 0x4EAE, 0x50DA, 0x4E21, 0x51CC,
 0x5BEE, 0x6599, 0x6881, 0x6DBC, 0x731F, 0x7642, 0x77AD, 0x7A1C,
 0x7CE7, 0x826F, 0x8AD2, 0x907C, 0x91CF, 0x9675, 0x9818, 0x529B,
 0x7DD1, 0x502B, 0x5398, 0x6797, 0x6DCB, 0x71D0, 0x7433, 0x81E8,
 0x8F2A, 0x96A3, 0x9C57, 0x9E9F, 0x7460, 0x5841, 0x6D99, 0x7D2F,
 0x985E, 0x4EE4, 0x4F36, 0x4F8B, 0x51B7, 0x52B1, 0x5DBA, 0x601C,
 0x73B2, 0x793C, 0x82D3, 0x9234, 0x96B7, 0x96F6, 0x970A, 0x9E97,
 0x9F62, 0x66A6, 0x6B74, 0x5217, 0x52A3, 0x70C8, 0x88C2, 0x5EC9,
 0x604B, 0x6190, 0x6F23, 0x7149, 0x7C3E, 0x7DF4, 0x806F,
};
const unsigned short euc_to_utf8_CF[] = {
         0x84EE, 0x9023, 0x932C, 0x5442, 0x9B6F, 0x6AD3, 0x7089,
 0x8CC2, 0x8DEF, 0x9732, 0x52B4, 0x5A41, 0x5ECA, 0x5F04, 0x6717,
 0x697C, 0x6994, 0x6D6A, 0x6F0F, 0x7262, 0x72FC, 0x7BED, 0x8001,
 0x807E, 0x874B, 0x90CE, 0x516D, 0x9E93, 0x7984, 0x808B, 0x9332,
 0x8AD6, 0x502D, 0x548C, 0x8A71, 0x6B6A, 0x8CC4, 0x8107, 0x60D1,
 0x67A0, 0x9DF2, 0x4E99, 0x4E98, 0x9C10, 0x8A6B, 0x85C1, 0x8568,
 0x6900, 0x6E7E, 0x7897, 0x8155,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short euc_to_utf8_D0[] = {
         0x5F0C, 0x4E10, 0x4E15, 0x4E2A, 0x4E31, 0x4E36, 0x4E3C,
 0x4E3F, 0x4E42, 0x4E56, 0x4E58, 0x4E82, 0x4E85, 0x8C6B, 0x4E8A,
 0x8212, 0x5F0D, 0x4E8E, 0x4E9E, 0x4E9F, 0x4EA0, 0x4EA2, 0x4EB0,
 0x4EB3, 0x4EB6, 0x4ECE, 0x4ECD, 0x4EC4, 0x4EC6, 0x4EC2, 0x4ED7,
 0x4EDE, 0x4EED, 0x4EDF, 0x4EF7, 0x4F09, 0x4F5A, 0x4F30, 0x4F5B,
 0x4F5D, 0x4F57, 0x4F47, 0x4F76, 0x4F88, 0x4F8F, 0x4F98, 0x4F7B,
 0x4F69, 0x4F70, 0x4F91, 0x4F6F, 0x4F86, 0x4F96, 0x5118, 0x4FD4,
 0x4FDF, 0x4FCE, 0x4FD8, 0x4FDB, 0x4FD1, 0x4FDA, 0x4FD0, 0x4FE4,
 0x4FE5, 0x501A, 0x5028, 0x5014, 0x502A, 0x5025, 0x5005, 0x4F1C,
 0x4FF6, 0x5021, 0x5029, 0x502C, 0x4FFE, 0x4FEF, 0x5011, 0x5006,
 0x5043, 0x5047, 0x6703, 0x5055, 0x5050, 0x5048, 0x505A, 0x5056,
 0x506C, 0x5078, 0x5080, 0x509A, 0x5085, 0x50B4, 0x50B2,
};
const unsigned short euc_to_utf8_D1[] = {
         0x50C9, 0x50CA, 0x50B3, 0x50C2, 0x50D6, 0x50DE, 0x50E5,
 0x50ED, 0x50E3, 0x50EE, 0x50F9, 0x50F5, 0x5109, 0x5101, 0x5102,
 0x5116, 0x5115, 0x5114, 0x511A, 0x5121, 0x513A, 0x5137, 0x513C,
 0x513B, 0x513F, 0x5140, 0x5152, 0x514C, 0x5154, 0x5162, 0x7AF8,
 0x5169, 0x516A, 0x516E, 0x5180, 0x5182, 0x56D8, 0x518C, 0x5189,
 0x518F, 0x5191, 0x5193, 0x5195, 0x5196, 0x51A4, 0x51A6, 0x51A2,
 0x51A9, 0x51AA, 0x51AB, 0x51B3, 0x51B1, 0x51B2, 0x51B0, 0x51B5,
 0x51BD, 0x51C5, 0x51C9, 0x51DB, 0x51E0, 0x8655, 0x51E9, 0x51ED,
 0x51F0, 0x51F5, 0x51FE, 0x5204, 0x520B, 0x5214, 0x520E, 0x5227,
 0x522A, 0x522E, 0x5233, 0x5239, 0x524F, 0x5244, 0x524B, 0x524C,
 0x525E, 0x5254, 0x526A, 0x5274, 0x5269, 0x5273, 0x527F, 0x527D,
 0x528D, 0x5294, 0x5292, 0x5271, 0x5288, 0x5291, 0x8FA8,
};
const unsigned short euc_to_utf8_D2[] = {
         0x8FA7, 0x52AC, 0x52AD, 0x52BC, 0x52B5, 0x52C1, 0x52CD,
 0x52D7, 0x52DE, 0x52E3, 0x52E6, 0x98ED, 0x52E0, 0x52F3, 0x52F5,
 0x52F8, 0x52F9, 0x5306, 0x5308, 0x7538, 0x530D, 0x5310, 0x530F,
 0x5315, 0x531A, 0x5323, 0x532F, 0x5331, 0x5333, 0x5338, 0x5340,
 0x5346, 0x5345, 0x4E17, 0x5349, 0x534D, 0x51D6, 0x535E, 0x5369,
 0x536E, 0x5918, 0x537B, 0x5377, 0x5382, 0x5396, 0x53A0, 0x53A6,
 0x53A5, 0x53AE, 0x53B0, 0x53B6, 0x53C3, 0x7C12, 0x96D9, 0x53DF,
 0x66FC, 0x71EE, 0x53EE, 0x53E8, 0x53ED, 0x53FA, 0x5401, 0x543D,
 0x5440, 0x542C, 0x542D, 0x543C, 0x542E, 0x5436, 0x5429, 0x541D,
 0x544E, 0x548F, 0x5475, 0x548E, 0x545F, 0x5471, 0x5477, 0x5470,
 0x5492, 0x547B, 0x5480, 0x5476, 0x5484, 0x5490, 0x5486, 0x54C7,
 0x54A2, 0x54B8, 0x54A5, 0x54AC, 0x54C4, 0x54C8, 0x54A8,
};
const unsigned short euc_to_utf8_D3[] = {
         0x54AB, 0x54C2, 0x54A4, 0x54BE, 0x54BC, 0x54D8, 0x54E5,
 0x54E6, 0x550F, 0x5514, 0x54FD, 0x54EE, 0x54ED, 0x54FA, 0x54E2,
 0x5539, 0x5540, 0x5563, 0x554C, 0x552E, 0x555C, 0x5545, 0x5556,
 0x5557, 0x5538, 0x5533, 0x555D, 0x5599, 0x5580, 0x54AF, 0x558A,
 0x559F, 0x557B, 0x557E, 0x5598, 0x559E, 0x55AE, 0x557C, 0x5583,
 0x55A9, 0x5587, 0x55A8, 0x55DA, 0x55C5, 0x55DF, 0x55C4, 0x55DC,
 0x55E4, 0x55D4, 0x5614, 0x55F7, 0x5616, 0x55FE, 0x55FD, 0x561B,
 0x55F9, 0x564E, 0x5650, 0x71DF, 0x5634, 0x5636, 0x5632, 0x5638,
 0x566B, 0x5664, 0x562F, 0x566C, 0x566A, 0x5686, 0x5680, 0x568A,
 0x56A0, 0x5694, 0x568F, 0x56A5, 0x56AE, 0x56B6, 0x56B4, 0x56C2,
 0x56BC, 0x56C1, 0x56C3, 0x56C0, 0x56C8, 0x56CE, 0x56D1, 0x56D3,
 0x56D7, 0x56EE, 0x56F9, 0x5700, 0x56FF, 0x5704, 0x5709,
};
const unsigned short euc_to_utf8_D4[] = {
         0x5708, 0x570B, 0x570D, 0x5713, 0x5718, 0x5716, 0x55C7,
 0x571C, 0x5726, 0x5737, 0x5738, 0x574E, 0x573B, 0x5740, 0x574F,
 0x5769, 0x57C0, 0x5788, 0x5761, 0x577F, 0x5789, 0x5793, 0x57A0,
 0x57B3, 0x57A4, 0x57AA, 0x57B0, 0x57C3, 0x57C6, 0x57D4, 0x57D2,
 0x57D3, 0x580A, 0x57D6, 0x57E3, 0x580B, 0x5819, 0x581D, 0x5872,
 0x5821, 0x5862, 0x584B, 0x5870, 0x6BC0, 0x5852, 0x583D, 0x5879,
 0x5885, 0x58B9, 0x589F, 0x58AB, 0x58BA, 0x58DE, 0x58BB, 0x58B8,
 0x58AE, 0x58C5, 0x58D3, 0x58D1, 0x58D7, 0x58D9, 0x58D8, 0x58E5,
 0x58DC, 0x58E4, 0x58DF, 0x58EF, 0x58FA, 0x58F9, 0x58FB, 0x58FC,
 0x58FD, 0x5902, 0x590A, 0x5910, 0x591B, 0x68A6, 0x5925, 0x592C,
 0x592D, 0x5932, 0x5938, 0x593E, 0x7AD2, 0x5955, 0x5950, 0x594E,
 0x595A, 0x5958, 0x5962, 0x5960, 0x5967, 0x596C, 0x5969,
};
const unsigned short euc_to_utf8_D5[] = {
         0x5978, 0x5981, 0x599D, 0x4F5E, 0x4FAB, 0x59A3, 0x59B2,
 0x59C6, 0x59E8, 0x59DC, 0x598D, 0x59D9, 0x59DA, 0x5A25, 0x5A1F,
 0x5A11, 0x5A1C, 0x5A09, 0x5A1A, 0x5A40, 0x5A6C, 0x5A49, 0x5A35,
 0x5A36, 0x5A62, 0x5A6A, 0x5A9A, 0x5ABC, 0x5ABE, 0x5ACB, 0x5AC2,
 0x5ABD, 0x5AE3, 0x5AD7, 0x5AE6, 0x5AE9, 0x5AD6, 0x5AFA, 0x5AFB,
 0x5B0C, 0x5B0B, 0x5B16, 0x5B32, 0x5AD0, 0x5B2A, 0x5B36, 0x5B3E,
 0x5B43, 0x5B45, 0x5B40, 0x5B51, 0x5B55, 0x5B5A, 0x5B5B, 0x5B65,
 0x5B69, 0x5B70, 0x5B73, 0x5B75, 0x5B78, 0x6588, 0x5B7A, 0x5B80,
 0x5B83, 0x5BA6, 0x5BB8, 0x5BC3, 0x5BC7, 0x5BC9, 0x5BD4, 0x5BD0,
 0x5BE4, 0x5BE6, 0x5BE2, 0x5BDE, 0x5BE5, 0x5BEB, 0x5BF0, 0x5BF6,
 0x5BF3, 0x5C05, 0x5C07, 0x5C08, 0x5C0D, 0x5C13, 0x5C20, 0x5C22,
 0x5C28, 0x5C38, 0x5C39, 0x5C41, 0x5C46, 0x5C4E, 0x5C53,
};
const unsigned short euc_to_utf8_D6[] = {
         0x5C50, 0x5C4F, 0x5B71, 0x5C6C, 0x5C6E, 0x4E62, 0x5C76,
 0x5C79, 0x5C8C, 0x5C91, 0x5C94, 0x599B, 0x5CAB, 0x5CBB, 0x5CB6,
 0x5CBC, 0x5CB7, 0x5CC5, 0x5CBE, 0x5CC7, 0x5CD9, 0x5CE9, 0x5CFD,
 0x5CFA, 0x5CED, 0x5D8C, 0x5CEA, 0x5D0B, 0x5D15, 0x5D17, 0x5D5C,
 0x5D1F, 0x5D1B, 0x5D11, 0x5D14, 0x5D22, 0x5D1A, 0x5D19, 0x5D18,
 0x5D4C, 0x5D52, 0x5D4E, 0x5D4B, 0x5D6C, 0x5D73, 0x5D76, 0x5D87,
 0x5D84, 0x5D82, 0x5DA2, 0x5D9D, 0x5DAC, 0x5DAE, 0x5DBD, 0x5D90,
 0x5DB7, 0x5DBC, 0x5DC9, 0x5DCD, 0x5DD3, 0x5DD2, 0x5DD6, 0x5DDB,
 0x5DEB, 0x5DF2, 0x5DF5, 0x5E0B, 0x5E1A, 0x5E19, 0x5E11, 0x5E1B,
 0x5E36, 0x5E37, 0x5E44, 0x5E43, 0x5E40, 0x5E4E, 0x5E57, 0x5E54,
 0x5E5F, 0x5E62, 0x5E64, 0x5E47, 0x5E75, 0x5E76, 0x5E7A, 0x9EBC,
 0x5E7F, 0x5EA0, 0x5EC1, 0x5EC2, 0x5EC8, 0x5ED0, 0x5ECF,
};
const unsigned short euc_to_utf8_D7[] = {
         0x5ED6, 0x5EE3, 0x5EDD, 0x5EDA, 0x5EDB, 0x5EE2, 0x5EE1,
 0x5EE8, 0x5EE9, 0x5EEC, 0x5EF1, 0x5EF3, 0x5EF0, 0x5EF4, 0x5EF8,
 0x5EFE, 0x5F03, 0x5F09, 0x5F5D, 0x5F5C, 0x5F0B, 0x5F11, 0x5F16,
 0x5F29, 0x5F2D, 0x5F38, 0x5F41, 0x5F48, 0x5F4C, 0x5F4E, 0x5F2F,
 0x5F51, 0x5F56, 0x5F57, 0x5F59, 0x5F61, 0x5F6D, 0x5F73, 0x5F77,
 0x5F83, 0x5F82, 0x5F7F, 0x5F8A, 0x5F88, 0x5F91, 0x5F87, 0x5F9E,
 0x5F99, 0x5F98, 0x5FA0, 0x5FA8, 0x5FAD, 0x5FBC, 0x5FD6, 0x5FFB,
 0x5FE4, 0x5FF8, 0x5FF1, 0x5FDD, 0x60B3, 0x5FFF, 0x6021, 0x6060,
 0x6019, 0x6010, 0x6029, 0x600E, 0x6031, 0x601B, 0x6015, 0x602B,
 0x6026, 0x600F, 0x603A, 0x605A, 0x6041, 0x606A, 0x6077, 0x605F,
 0x604A, 0x6046, 0x604D, 0x6063, 0x6043, 0x6064, 0x6042, 0x606C,
 0x606B, 0x6059, 0x6081, 0x608D, 0x60E7, 0x6083, 0x609A,
};
const unsigned short euc_to_utf8_D8[] = {
         0x6084, 0x609B, 0x6096, 0x6097, 0x6092, 0x60A7, 0x608B,
 0x60E1, 0x60B8, 0x60E0, 0x60D3, 0x60B4, 0x5FF0, 0x60BD, 0x60C6,
 0x60B5, 0x60D8, 0x614D, 0x6115, 0x6106, 0x60F6, 0x60F7, 0x6100,
 0x60F4, 0x60FA, 0x6103, 0x6121, 0x60FB, 0x60F1, 0x610D, 0x610E,
 0x6147, 0x613E, 0x6128, 0x6127, 0x614A, 0x613F, 0x613C, 0x612C,
 0x6134, 0x613D, 0x6142, 0x6144, 0x6173, 0x6177, 0x6158, 0x6159,
 0x615A, 0x616B, 0x6174, 0x616F, 0x6165, 0x6171, 0x615F, 0x615D,
 0x6153, 0x6175, 0x6199, 0x6196, 0x6187, 0x61AC, 0x6194, 0x619A,
 0x618A, 0x6191, 0x61AB, 0x61AE, 0x61CC, 0x61CA, 0x61C9, 0x61F7,
 0x61C8, 0x61C3, 0x61C6, 0x61BA, 0x61CB, 0x7F79, 0x61CD, 0x61E6,
 0x61E3, 0x61F6, 0x61FA, 0x61F4, 0x61FF, 0x61FD, 0x61FC, 0x61FE,
 0x6200, 0x6208, 0x6209, 0x620D, 0x620C, 0x6214, 0x621B,
};
const unsigned short euc_to_utf8_D9[] = {
         0x621E, 0x6221, 0x622A, 0x622E, 0x6230, 0x6232, 0x6233,
 0x6241, 0x624E, 0x625E, 0x6263, 0x625B, 0x6260, 0x6268, 0x627C,
 0x6282, 0x6289, 0x627E, 0x6292, 0x6293, 0x6296, 0x62D4, 0x6283,
 0x6294, 0x62D7, 0x62D1, 0x62BB, 0x62CF, 0x62FF, 0x62C6, 0x64D4,
 0x62C8, 0x62DC, 0x62CC, 0x62CA, 0x62C2, 0x62C7, 0x629B, 0x62C9,
 0x630C, 0x62EE, 0x62F1, 0x6327, 0x6302, 0x6308, 0x62EF, 0x62F5,
 0x6350, 0x633E, 0x634D, 0x641C, 0x634F, 0x6396, 0x638E, 0x6380,
 0x63AB, 0x6376, 0x63A3, 0x638F, 0x6389, 0x639F, 0x63B5, 0x636B,
 0x6369, 0x63BE, 0x63E9, 0x63C0, 0x63C6, 0x63E3, 0x63C9, 0x63D2,
 0x63F6, 0x63C4, 0x6416, 0x6434, 0x6406, 0x6413, 0x6426, 0x6436,
 0x651D, 0x6417, 0x6428, 0x640F, 0x6467, 0x646F, 0x6476, 0x644E,
 0x652A, 0x6495, 0x6493, 0x64A5, 0x64A9, 0x6488, 0x64BC,
};
const unsigned short euc_to_utf8_DA[] = {
         0x64DA, 0x64D2, 0x64C5, 0x64C7, 0x64BB, 0x64D8, 0x64C2,
 0x64F1, 0x64E7, 0x8209, 0x64E0, 0x64E1, 0x62AC, 0x64E3, 0x64EF,
 0x652C, 0x64F6, 0x64F4, 0x64F2, 0x64FA, 0x6500, 0x64FD, 0x6518,
 0x651C, 0x6505, 0x6524, 0x6523, 0x652B, 0x6534, 0x6535, 0x6537,
 0x6536, 0x6538, 0x754B, 0x6548, 0x6556, 0x6555, 0x654D, 0x6558,
 0x655E, 0x655D, 0x6572, 0x6578, 0x6582, 0x6583, 0x8B8A, 0x659B,
 0x659F, 0x65AB, 0x65B7, 0x65C3, 0x65C6, 0x65C1, 0x65C4, 0x65CC,
 0x65D2, 0x65DB, 0x65D9, 0x65E0, 0x65E1, 0x65F1, 0x6772, 0x660A,
 0x6603, 0x65FB, 0x6773, 0x6635, 0x6636, 0x6634, 0x661C, 0x664F,
 0x6644, 0x6649, 0x6641, 0x665E, 0x665D, 0x6664, 0x6667, 0x6668,
 0x665F, 0x6662, 0x6670, 0x6683, 0x6688, 0x668E, 0x6689, 0x6684,
 0x6698, 0x669D, 0x66C1, 0x66B9, 0x66C9, 0x66BE, 0x66BC,
};
const unsigned short euc_to_utf8_DB[] = {
         0x66C4, 0x66B8, 0x66D6, 0x66DA, 0x66E0, 0x663F, 0x66E6,
 0x66E9, 0x66F0, 0x66F5, 0x66F7, 0x670F, 0x6716, 0x671E, 0x6726,
 0x6727, 0x9738, 0x672E, 0x673F, 0x6736, 0x6741, 0x6738, 0x6737,
 0x6746, 0x675E, 0x6760, 0x6759, 0x6763, 0x6764, 0x6789, 0x6770,
 0x67A9, 0x677C, 0x676A, 0x678C, 0x678B, 0x67A6, 0x67A1, 0x6785,
 0x67B7, 0x67EF, 0x67B4, 0x67EC, 0x67B3, 0x67E9, 0x67B8, 0x67E4,
 0x67DE, 0x67DD, 0x67E2, 0x67EE, 0x67B9, 0x67CE, 0x67C6, 0x67E7,
 0x6A9C, 0x681E, 0x6846, 0x6829, 0x6840, 0x684D, 0x6832, 0x684E,
 0x68B3, 0x682B, 0x6859, 0x6863, 0x6877, 0x687F, 0x689F, 0x688F,
 0x68AD, 0x6894, 0x689D, 0x689B, 0x6883, 0x6AAE, 0x68B9, 0x6874,
 0x68B5, 0x68A0, 0x68BA, 0x690F, 0x688D, 0x687E, 0x6901, 0x68CA,
 0x6908, 0x68D8, 0x6922, 0x6926, 0x68E1, 0x690C, 0x68CD,
};
const unsigned short euc_to_utf8_DC[] = {
         0x68D4, 0x68E7, 0x68D5, 0x6936, 0x6912, 0x6904, 0x68D7,
 0x68E3, 0x6925, 0x68F9, 0x68E0, 0x68EF, 0x6928, 0x692A, 0x691A,
 0x6923, 0x6921, 0x68C6, 0x6979, 0x6977, 0x695C, 0x6978, 0x696B,
 0x6954, 0x697E, 0x696E, 0x6939, 0x6974, 0x693D, 0x6959, 0x6930,
 0x6961, 0x695E, 0x695D, 0x6981, 0x696A, 0x69B2, 0x69AE, 0x69D0,
 0x69BF, 0x69C1, 0x69D3, 0x69BE, 0x69CE, 0x5BE8, 0x69CA, 0x69DD,
 0x69BB, 0x69C3, 0x69A7, 0x6A2E, 0x6991, 0x69A0, 0x699C, 0x6995,
 0x69B4, 0x69DE, 0x69E8, 0x6A02, 0x6A1B, 0x69FF, 0x6B0A, 0x69F9,
 0x69F2, 0x69E7, 0x6A05, 0x69B1, 0x6A1E, 0x69ED, 0x6A14, 0x69EB,
 0x6A0A, 0x6A12, 0x6AC1, 0x6A23, 0x6A13, 0x6A44, 0x6A0C, 0x6A72,
 0x6A36, 0x6A78, 0x6A47, 0x6A62, 0x6A59, 0x6A66, 0x6A48, 0x6A38,
 0x6A22, 0x6A90, 0x6A8D, 0x6AA0, 0x6A84, 0x6AA2, 0x6AA3,
};
const unsigned short euc_to_utf8_DD[] = {
         0x6A97, 0x8617, 0x6ABB, 0x6AC3, 0x6AC2, 0x6AB8, 0x6AB3,
 0x6AAC, 0x6ADE, 0x6AD1, 0x6ADF, 0x6AAA, 0x6ADA, 0x6AEA, 0x6AFB,
 0x6B05, 0x8616, 0x6AFA, 0x6B12, 0x6B16, 0x9B31, 0x6B1F, 0x6B38,
 0x6B37, 0x76DC, 0x6B39, 0x98EE, 0x6B47, 0x6B43, 0x6B49, 0x6B50,
 0x6B59, 0x6B54, 0x6B5B, 0x6B5F, 0x6B61, 0x6B78, 0x6B79, 0x6B7F,
 0x6B80, 0x6B84, 0x6B83, 0x6B8D, 0x6B98, 0x6B95, 0x6B9E, 0x6BA4,
 0x6BAA, 0x6BAB, 0x6BAF, 0x6BB2, 0x6BB1, 0x6BB3, 0x6BB7, 0x6BBC,
 0x6BC6, 0x6BCB, 0x6BD3, 0x6BDF, 0x6BEC, 0x6BEB, 0x6BF3, 0x6BEF,
 0x9EBE, 0x6C08, 0x6C13, 0x6C14, 0x6C1B, 0x6C24, 0x6C23, 0x6C5E,
 0x6C55, 0x6C62, 0x6C6A, 0x6C82, 0x6C8D, 0x6C9A, 0x6C81, 0x6C9B,
 0x6C7E, 0x6C68, 0x6C73, 0x6C92, 0x6C90, 0x6CC4, 0x6CF1, 0x6CD3,
 0x6CBD, 0x6CD7, 0x6CC5, 0x6CDD, 0x6CAE, 0x6CB1, 0x6CBE,
};
const unsigned short euc_to_utf8_DE[] = {
         0x6CBA, 0x6CDB, 0x6CEF, 0x6CD9, 0x6CEA, 0x6D1F, 0x884D,
 0x6D36, 0x6D2B, 0x6D3D, 0x6D38, 0x6D19, 0x6D35, 0x6D33, 0x6D12,
 0x6D0C, 0x6D63, 0x6D93, 0x6D64, 0x6D5A, 0x6D79, 0x6D59, 0x6D8E,
 0x6D95, 0x6FE4, 0x6D85, 0x6DF9, 0x6E15, 0x6E0A, 0x6DB5, 0x6DC7,
 0x6DE6, 0x6DB8, 0x6DC6, 0x6DEC, 0x6DDE, 0x6DCC, 0x6DE8, 0x6DD2,
 0x6DC5, 0x6DFA, 0x6DD9, 0x6DE4, 0x6DD5, 0x6DEA, 0x6DEE, 0x6E2D,
 0x6E6E, 0x6E2E, 0x6E19, 0x6E72, 0x6E5F, 0x6E3E, 0x6E23, 0x6E6B,
 0x6E2B, 0x6E76, 0x6E4D, 0x6E1F, 0x6E43, 0x6E3A, 0x6E4E, 0x6E24,
 0x6EFF, 0x6E1D, 0x6E38, 0x6E82, 0x6EAA, 0x6E98, 0x6EC9, 0x6EB7,
 0x6ED3, 0x6EBD, 0x6EAF, 0x6EC4, 0x6EB2, 0x6ED4, 0x6ED5, 0x6E8F,
 0x6EA5, 0x6EC2, 0x6E9F, 0x6F41, 0x6F11, 0x704C, 0x6EEC, 0x6EF8,
 0x6EFE, 0x6F3F, 0x6EF2, 0x6F31, 0x6EEF, 0x6F32, 0x6ECC,
};
const unsigned short euc_to_utf8_DF[] = {
         0x6F3E, 0x6F13, 0x6EF7, 0x6F86, 0x6F7A, 0x6F78, 0x6F81,
 0x6F80, 0x6F6F, 0x6F5B, 0x6FF3, 0x6F6D, 0x6F82, 0x6F7C, 0x6F58,
 0x6F8E, 0x6F91, 0x6FC2, 0x6F66, 0x6FB3, 0x6FA3, 0x6FA1, 0x6FA4,
 0x6FB9, 0x6FC6, 0x6FAA, 0x6FDF, 0x6FD5, 0x6FEC, 0x6FD4, 0x6FD8,
 0x6FF1, 0x6FEE, 0x6FDB, 0x7009, 0x700B, 0x6FFA, 0x7011, 0x7001,
 0x700F, 0x6FFE, 0x701B, 0x701A, 0x6F74, 0x701D, 0x7018, 0x701F,
 0x7030, 0x703E, 0x7032, 0x7051, 0x7063, 0x7099, 0x7092, 0x70AF,
 0x70F1, 0x70AC, 0x70B8, 0x70B3, 0x70AE, 0x70DF, 0x70CB, 0x70DD,
 0x70D9, 0x7109, 0x70FD, 0x711C, 0x7119, 0x7165, 0x7155, 0x7188,
 0x7166, 0x7162, 0x714C, 0x7156, 0x716C, 0x718F, 0x71FB, 0x7184,
 0x7195, 0x71A8, 0x71AC, 0x71D7, 0x71B9, 0x71BE, 0x71D2, 0x71C9,
 0x71D4, 0x71CE, 0x71E0, 0x71EC, 0x71E7, 0x71F5, 0x71FC,
};
const unsigned short euc_to_utf8_E0[] = {
         0x71F9, 0x71FF, 0x720D, 0x7210, 0x721B, 0x7228, 0x722D,
 0x722C, 0x7230, 0x7232, 0x723B, 0x723C, 0x723F, 0x7240, 0x7246,
 0x724B, 0x7258, 0x7274, 0x727E, 0x7282, 0x7281, 0x7287, 0x7292,
 0x7296, 0x72A2, 0x72A7, 0x72B9, 0x72B2, 0x72C3, 0x72C6, 0x72C4,
 0x72CE, 0x72D2, 0x72E2, 0x72E0, 0x72E1, 0x72F9, 0x72F7, 0x500F,
 0x7317, 0x730A, 0x731C, 0x7316, 0x731D, 0x7334, 0x732F, 0x7329,
 0x7325, 0x733E, 0x734E, 0x734F, 0x9ED8, 0x7357, 0x736A, 0x7368,
 0x7370, 0x7378, 0x7375, 0x737B, 0x737A, 0x73C8, 0x73B3, 0x73CE,
 0x73BB, 0x73C0, 0x73E5, 0x73EE, 0x73DE, 0x74A2, 0x7405, 0x746F,
 0x7425, 0x73F8, 0x7432, 0x743A, 0x7455, 0x743F, 0x745F, 0x7459,
 0x7441, 0x745C, 0x7469, 0x7470, 0x7463, 0x746A, 0x7476, 0x747E,
 0x748B, 0x749E, 0x74A7, 0x74CA, 0x74CF, 0x74D4, 0x73F1,
};
const unsigned short euc_to_utf8_E1[] = {
         0x74E0, 0x74E3, 0x74E7, 0x74E9, 0x74EE, 0x74F2, 0x74F0,
 0x74F1, 0x74F8, 0x74F7, 0x7504, 0x7503, 0x7505, 0x750C, 0x750E,
 0x750D, 0x7515, 0x7513, 0x751E, 0x7526, 0x752C, 0x753C, 0x7544,
 0x754D, 0x754A, 0x7549, 0x755B, 0x7546, 0x755A, 0x7569, 0x7564,
 0x7567, 0x756B, 0x756D, 0x7578, 0x7576, 0x7586, 0x7587, 0x7574,
 0x758A, 0x7589, 0x7582, 0x7594, 0x759A, 0x759D, 0x75A5, 0x75A3,
 0x75C2, 0x75B3, 0x75C3, 0x75B5, 0x75BD, 0x75B8, 0x75BC, 0x75B1,
 0x75CD, 0x75CA, 0x75D2, 0x75D9, 0x75E3, 0x75DE, 0x75FE, 0x75FF,
 0x75FC, 0x7601, 0x75F0, 0x75FA, 0x75F2, 0x75F3, 0x760B, 0x760D,
 0x7609, 0x761F, 0x7627, 0x7620, 0x7621, 0x7622, 0x7624, 0x7634,
 0x7630, 0x763B, 0x7647, 0x7648, 0x7646, 0x765C, 0x7658, 0x7661,
 0x7662, 0x7668, 0x7669, 0x766A, 0x7667, 0x766C, 0x7670,
};
const unsigned short euc_to_utf8_E2[] = {
         0x7672, 0x7676, 0x7678, 0x767C, 0x7680, 0x7683, 0x7688,
 0x768B, 0x768E, 0x7696, 0x7693, 0x7699, 0x769A, 0x76B0, 0x76B4,
 0x76B8, 0x76B9, 0x76BA, 0x76C2, 0x76CD, 0x76D6, 0x76D2, 0x76DE,
 0x76E1, 0x76E5, 0x76E7, 0x76EA, 0x862F, 0x76FB, 0x7708, 0x7707,
 0x7704, 0x7729, 0x7724, 0x771E, 0x7725, 0x7726, 0x771B, 0x7737,
 0x7738, 0x7747, 0x775A, 0x7768, 0x776B, 0x775B, 0x7765, 0x777F,
 0x777E, 0x7779, 0x778E, 0x778B, 0x7791, 0x77A0, 0x779E, 0x77B0,
 0x77B6, 0x77B9, 0x77BF, 0x77BC, 0x77BD, 0x77BB, 0x77C7, 0x77CD,
 0x77D7, 0x77DA, 0x77DC, 0x77E3, 0x77EE, 0x77FC, 0x780C, 0x7812,
 0x7926, 0x7820, 0x792A, 0x7845, 0x788E, 0x7874, 0x7886, 0x787C,
 0x789A, 0x788C, 0x78A3, 0x78B5, 0x78AA, 0x78AF, 0x78D1, 0x78C6,
 0x78CB, 0x78D4, 0x78BE, 0x78BC, 0x78C5, 0x78CA, 0x78EC,
};
const unsigned short euc_to_utf8_E3[] = {
         0x78E7, 0x78DA, 0x78FD, 0x78F4, 0x7907, 0x7912, 0x7911,
 0x7919, 0x792C, 0x792B, 0x7940, 0x7960, 0x7957, 0x795F, 0x795A,
 0x7955, 0x7953, 0x797A, 0x797F, 0x798A, 0x799D, 0x79A7, 0x9F4B,
 0x79AA, 0x79AE, 0x79B3, 0x79B9, 0x79BA, 0x79C9, 0x79D5, 0x79E7,
 0x79EC, 0x79E1, 0x79E3, 0x7A08, 0x7A0D, 0x7A18, 0x7A19, 0x7A20,
 0x7A1F, 0x7980, 0x7A31, 0x7A3B, 0x7A3E, 0x7A37, 0x7A43, 0x7A57,
 0x7A49, 0x7A61, 0x7A62, 0x7A69, 0x9F9D, 0x7A70, 0x7A79, 0x7A7D,
 0x7A88, 0x7A97, 0x7A95, 0x7A98, 0x7A96, 0x7AA9, 0x7AC8, 0x7AB0,
 0x7AB6, 0x7AC5, 0x7AC4, 0x7ABF, 0x9083, 0x7AC7, 0x7ACA, 0x7ACD,
 0x7ACF, 0x7AD5, 0x7AD3, 0x7AD9, 0x7ADA, 0x7ADD, 0x7AE1, 0x7AE2,
 0x7AE6, 0x7AED, 0x7AF0, 0x7B02, 0x7B0F, 0x7B0A, 0x7B06, 0x7B33,
 0x7B18, 0x7B19, 0x7B1E, 0x7B35, 0x7B28, 0x7B36, 0x7B50,
};
const unsigned short euc_to_utf8_E4[] = {
         0x7B7A, 0x7B04, 0x7B4D, 0x7B0B, 0x7B4C, 0x7B45, 0x7B75,
 0x7B65, 0x7B74, 0x7B67, 0x7B70, 0x7B71, 0x7B6C, 0x7B6E, 0x7B9D,
 0x7B98, 0x7B9F, 0x7B8D, 0x7B9C, 0x7B9A, 0x7B8B, 0x7B92, 0x7B8F,
 0x7B5D, 0x7B99, 0x7BCB, 0x7BC1, 0x7BCC, 0x7BCF, 0x7BB4, 0x7BC6,
 0x7BDD, 0x7BE9, 0x7C11, 0x7C14, 0x7BE6, 0x7BE5, 0x7C60, 0x7C00,
 0x7C07, 0x7C13, 0x7BF3, 0x7BF7, 0x7C17, 0x7C0D, 0x7BF6, 0x7C23,
 0x7C27, 0x7C2A, 0x7C1F, 0x7C37, 0x7C2B, 0x7C3D, 0x7C4C, 0x7C43,
 0x7C54, 0x7C4F, 0x7C40, 0x7C50, 0x7C58, 0x7C5F, 0x7C64, 0x7C56,
 0x7C65, 0x7C6C, 0x7C75, 0x7C83, 0x7C90, 0x7CA4, 0x7CAD, 0x7CA2,
 0x7CAB, 0x7CA1, 0x7CA8, 0x7CB3, 0x7CB2, 0x7CB1, 0x7CAE, 0x7CB9,
 0x7CBD, 0x7CC0, 0x7CC5, 0x7CC2, 0x7CD8, 0x7CD2, 0x7CDC, 0x7CE2,
 0x9B3B, 0x7CEF, 0x7CF2, 0x7CF4, 0x7CF6, 0x7CFA, 0x7D06,
};
const unsigned short euc_to_utf8_E5[] = {
         0x7D02, 0x7D1C, 0x7D15, 0x7D0A, 0x7D45, 0x7D4B, 0x7D2E,
 0x7D32, 0x7D3F, 0x7D35, 0x7D46, 0x7D73, 0x7D56, 0x7D4E, 0x7D72,
 0x7D68, 0x7D6E, 0x7D4F, 0x7D63, 0x7D93, 0x7D89, 0x7D5B, 0x7D8F,
 0x7D7D, 0x7D9B, 0x7DBA, 0x7DAE, 0x7DA3, 0x7DB5, 0x7DC7, 0x7DBD,
 0x7DAB, 0x7E3D, 0x7DA2, 0x7DAF, 0x7DDC, 0x7DB8, 0x7D9F, 0x7DB0,
 0x7DD8, 0x7DDD, 0x7DE4, 0x7DDE, 0x7DFB, 0x7DF2, 0x7DE1, 0x7E05,
 0x7E0A, 0x7E23, 0x7E21, 0x7E12, 0x7E31, 0x7E1F, 0x7E09, 0x7E0B,
 0x7E22, 0x7E46, 0x7E66, 0x7E3B, 0x7E35, 0x7E39, 0x7E43, 0x7E37,
 0x7E32, 0x7E3A, 0x7E67, 0x7E5D, 0x7E56, 0x7E5E, 0x7E59, 0x7E5A,
 0x7E79, 0x7E6A, 0x7E69, 0x7E7C, 0x7E7B, 0x7E83, 0x7DD5, 0x7E7D,
 0x8FAE, 0x7E7F, 0x7E88, 0x7E89, 0x7E8C, 0x7E92, 0x7E90, 0x7E93,
 0x7E94, 0x7E96, 0x7E8E, 0x7E9B, 0x7E9C, 0x7F38, 0x7F3A,
};
const unsigned short euc_to_utf8_E6[] = {
         0x7F45, 0x7F4C, 0x7F4D, 0x7F4E, 0x7F50, 0x7F51, 0x7F55,
 0x7F54, 0x7F58, 0x7F5F, 0x7F60, 0x7F68, 0x7F69, 0x7F67, 0x7F78,
 0x7F82, 0x7F86, 0x7F83, 0x7F88, 0x7F87, 0x7F8C, 0x7F94, 0x7F9E,
 0x7F9D, 0x7F9A, 0x7FA3, 0x7FAF, 0x7FB2, 0x7FB9, 0x7FAE, 0x7FB6,
 0x7FB8, 0x8B71, 0x7FC5, 0x7FC6, 0x7FCA, 0x7FD5, 0x7FD4, 0x7FE1,
 0x7FE6, 0x7FE9, 0x7FF3, 0x7FF9, 0x98DC, 0x8006, 0x8004, 0x800B,
 0x8012, 0x8018, 0x8019, 0x801C, 0x8021, 0x8028, 0x803F, 0x803B,
 0x804A, 0x8046, 0x8052, 0x8058, 0x805A, 0x805F, 0x8062, 0x8068,
 0x8073, 0x8072, 0x8070, 0x8076, 0x8079, 0x807D, 0x807F, 0x8084,
 0x8086, 0x8085, 0x809B, 0x8093, 0x809A, 0x80AD, 0x5190, 0x80AC,
 0x80DB, 0x80E5, 0x80D9, 0x80DD, 0x80C4, 0x80DA, 0x80D6, 0x8109,
 0x80EF, 0x80F1, 0x811B, 0x8129, 0x8123, 0x812F, 0x814B,
};
const unsigned short euc_to_utf8_E7[] = {
         0x968B, 0x8146, 0x813E, 0x8153, 0x8151, 0x80FC, 0x8171,
 0x816E, 0x8165, 0x8166, 0x8174, 0x8183, 0x8188, 0x818A, 0x8180,
 0x8182, 0x81A0, 0x8195, 0x81A4, 0x81A3, 0x815F, 0x8193, 0x81A9,
 0x81B0, 0x81B5, 0x81BE, 0x81B8, 0x81BD, 0x81C0, 0x81C2, 0x81BA,
 0x81C9, 0x81CD, 0x81D1, 0x81D9, 0x81D8, 0x81C8, 0x81DA, 0x81DF,
 0x81E0, 0x81E7, 0x81FA, 0x81FB, 0x81FE, 0x8201, 0x8202, 0x8205,
 0x8207, 0x820A, 0x820D, 0x8210, 0x8216, 0x8229, 0x822B, 0x8238,
 0x8233, 0x8240, 0x8259, 0x8258, 0x825D, 0x825A, 0x825F, 0x8264,
 0x8262, 0x8268, 0x826A, 0x826B, 0x822E, 0x8271, 0x8277, 0x8278,
 0x827E, 0x828D, 0x8292, 0x82AB, 0x829F, 0x82BB, 0x82AC, 0x82E1,
 0x82E3, 0x82DF, 0x82D2, 0x82F4, 0x82F3, 0x82FA, 0x8393, 0x8303,
 0x82FB, 0x82F9, 0x82DE, 0x8306, 0x82DC, 0x8309, 0x82D9,
};
const unsigned short euc_to_utf8_E8[] = {
         0x8335, 0x8334, 0x8316, 0x8332, 0x8331, 0x8340, 0x8339,
 0x8350, 0x8345, 0x832F, 0x832B, 0x8317, 0x8318, 0x8385, 0x839A,
 0x83AA, 0x839F, 0x83A2, 0x8396, 0x8323, 0x838E, 0x8387, 0x838A,
 0x837C, 0x83B5, 0x8373, 0x8375, 0x83A0, 0x8389, 0x83A8, 0x83F4,
 0x8413, 0x83EB, 0x83CE, 0x83FD, 0x8403, 0x83D8, 0x840B, 0x83C1,
 0x83F7, 0x8407, 0x83E0, 0x83F2, 0x840D, 0x8422, 0x8420, 0x83BD,
 0x8438, 0x8506, 0x83FB, 0x846D, 0x842A, 0x843C, 0x855A, 0x8484,
 0x8477, 0x846B, 0x84AD, 0x846E, 0x8482, 0x8469, 0x8446, 0x842C,
 0x846F, 0x8479, 0x8435, 0x84CA, 0x8462, 0x84B9, 0x84BF, 0x849F,
 0x84D9, 0x84CD, 0x84BB, 0x84DA, 0x84D0, 0x84C1, 0x84C6, 0x84D6,
 0x84A1, 0x8521, 0x84FF, 0x84F4, 0x8517, 0x8518, 0x852C, 0x851F,
 0x8515, 0x8514, 0x84FC, 0x8540, 0x8563, 0x8558, 0x8548,
};
const unsigned short euc_to_utf8_E9[] = {
         0x8541, 0x8602, 0x854B, 0x8555, 0x8580, 0x85A4, 0x8588,
 0x8591, 0x858A, 0x85A8, 0x856D, 0x8594, 0x859B, 0x85EA, 0x8587,
 0x859C, 0x8577, 0x857E, 0x8590, 0x85C9, 0x85BA, 0x85CF, 0x85B9,
 0x85D0, 0x85D5, 0x85DD, 0x85E5, 0x85DC, 0x85F9, 0x860A, 0x8613,
 0x860B, 0x85FE, 0x85FA, 0x8606, 0x8622, 0x861A, 0x8630, 0x863F,
 0x864D, 0x4E55, 0x8654, 0x865F, 0x8667, 0x8671, 0x8693, 0x86A3,
 0x86A9, 0x86AA, 0x868B, 0x868C, 0x86B6, 0x86AF, 0x86C4, 0x86C6,
 0x86B0, 0x86C9, 0x8823, 0x86AB, 0x86D4, 0x86DE, 0x86E9, 0x86EC,
 0x86DF, 0x86DB, 0x86EF, 0x8712, 0x8706, 0x8708, 0x8700, 0x8703,
 0x86FB, 0x8711, 0x8709, 0x870D, 0x86F9, 0x870A, 0x8734, 0x873F,
 0x8737, 0x873B, 0x8725, 0x8729, 0x871A, 0x8760, 0x875F, 0x8778,
 0x874C, 0x874E, 0x8774, 0x8757, 0x8768, 0x876E, 0x8759,
};
const unsigned short euc_to_utf8_EA[] = {
         0x8753, 0x8763, 0x876A, 0x8805, 0x87A2, 0x879F, 0x8782,
 0x87AF, 0x87CB, 0x87BD, 0x87C0, 0x87D0, 0x96D6, 0x87AB, 0x87C4,
 0x87B3, 0x87C7, 0x87C6, 0x87BB, 0x87EF, 0x87F2, 0x87E0, 0x880F,
 0x880D, 0x87FE, 0x87F6, 0x87F7, 0x880E, 0x87D2, 0x8811, 0x8816,
 0x8815, 0x8822, 0x8821, 0x8831, 0x8836, 0x8839, 0x8827, 0x883B,
 0x8844, 0x8842, 0x8852, 0x8859, 0x885E, 0x8862, 0x886B, 0x8881,
 0x887E, 0x889E, 0x8875, 0x887D, 0x88B5, 0x8872, 0x8882, 0x8897,
 0x8892, 0x88AE, 0x8899, 0x88A2, 0x888D, 0x88A4, 0x88B0, 0x88BF,
 0x88B1, 0x88C3, 0x88C4, 0x88D4, 0x88D8, 0x88D9, 0x88DD, 0x88F9,
 0x8902, 0x88FC, 0x88F4, 0x88E8, 0x88F2, 0x8904, 0x890C, 0x890A,
 0x8913, 0x8943, 0x891E, 0x8925, 0x892A, 0x892B, 0x8941, 0x8944,
 0x893B, 0x8936, 0x8938, 0x894C, 0x891D, 0x8960, 0x895E,
};
const unsigned short euc_to_utf8_EB[] = {
         0x8966, 0x8964, 0x896D, 0x896A, 0x896F, 0x8974, 0x8977,
 0x897E, 0x8983, 0x8988, 0x898A, 0x8993, 0x8998, 0x89A1, 0x89A9,
 0x89A6, 0x89AC, 0x89AF, 0x89B2, 0x89BA, 0x89BD, 0x89BF, 0x89C0,
 0x89DA, 0x89DC, 0x89DD, 0x89E7, 0x89F4, 0x89F8, 0x8A03, 0x8A16,
 0x8A10, 0x8A0C, 0x8A1B, 0x8A1D, 0x8A25, 0x8A36, 0x8A41, 0x8A5B,
 0x8A52, 0x8A46, 0x8A48, 0x8A7C, 0x8A6D, 0x8A6C, 0x8A62, 0x8A85,
 0x8A82, 0x8A84, 0x8AA8, 0x8AA1, 0x8A91, 0x8AA5, 0x8AA6, 0x8A9A,
 0x8AA3, 0x8AC4, 0x8ACD, 0x8AC2, 0x8ADA, 0x8AEB, 0x8AF3, 0x8AE7,
 0x8AE4, 0x8AF1, 0x8B14, 0x8AE0, 0x8AE2, 0x8AF7, 0x8ADE, 0x8ADB,
 0x8B0C, 0x8B07, 0x8B1A, 0x8AE1, 0x8B16, 0x8B10, 0x8B17, 0x8B20,
 0x8B33, 0x97AB, 0x8B26, 0x8B2B, 0x8B3E, 0x8B28, 0x8B41, 0x8B4C,
 0x8B4F, 0x8B4E, 0x8B49, 0x8B56, 0x8B5B, 0x8B5A, 0x8B6B,
};
const unsigned short euc_to_utf8_EC[] = {
         0x8B5F, 0x8B6C, 0x8B6F, 0x8B74, 0x8B7D, 0x8B80, 0x8B8C,
 0x8B8E, 0x8B92, 0x8B93, 0x8B96, 0x8B99, 0x8B9A, 0x8C3A, 0x8C41,
 0x8C3F, 0x8C48, 0x8C4C, 0x8C4E, 0x8C50, 0x8C55, 0x8C62, 0x8C6C,
 0x8C78, 0x8C7A, 0x8C82, 0x8C89, 0x8C85, 0x8C8A, 0x8C8D, 0x8C8E,
 0x8C94, 0x8C7C, 0x8C98, 0x621D, 0x8CAD, 0x8CAA, 0x8CBD, 0x8CB2,
 0x8CB3, 0x8CAE, 0x8CB6, 0x8CC8, 0x8CC1, 0x8CE4, 0x8CE3, 0x8CDA,
 0x8CFD, 0x8CFA, 0x8CFB, 0x8D04, 0x8D05, 0x8D0A, 0x8D07, 0x8D0F,
 0x8D0D, 0x8D10, 0x9F4E, 0x8D13, 0x8CCD, 0x8D14, 0x8D16, 0x8D67,
 0x8D6D, 0x8D71, 0x8D73, 0x8D81, 0x8D99, 0x8DC2, 0x8DBE, 0x8DBA,
 0x8DCF, 0x8DDA, 0x8DD6, 0x8DCC, 0x8DDB, 0x8DCB, 0x8DEA, 0x8DEB,
 0x8DDF, 0x8DE3, 0x8DFC, 0x8E08, 0x8E09, 0x8DFF, 0x8E1D, 0x8E1E,
 0x8E10, 0x8E1F, 0x8E42, 0x8E35, 0x8E30, 0x8E34, 0x8E4A,
};
const unsigned short euc_to_utf8_ED[] = {
         0x8E47, 0x8E49, 0x8E4C, 0x8E50, 0x8E48, 0x8E59, 0x8E64,
 0x8E60, 0x8E2A, 0x8E63, 0x8E55, 0x8E76, 0x8E72, 0x8E7C, 0x8E81,
 0x8E87, 0x8E85, 0x8E84, 0x8E8B, 0x8E8A, 0x8E93, 0x8E91, 0x8E94,
 0x8E99, 0x8EAA, 0x8EA1, 0x8EAC, 0x8EB0, 0x8EC6, 0x8EB1, 0x8EBE,
 0x8EC5, 0x8EC8, 0x8ECB, 0x8EDB, 0x8EE3, 0x8EFC, 0x8EFB, 0x8EEB,
 0x8EFE, 0x8F0A, 0x8F05, 0x8F15, 0x8F12, 0x8F19, 0x8F13, 0x8F1C,
 0x8F1F, 0x8F1B, 0x8F0C, 0x8F26, 0x8F33, 0x8F3B, 0x8F39, 0x8F45,
 0x8F42, 0x8F3E, 0x8F4C, 0x8F49, 0x8F46, 0x8F4E, 0x8F57, 0x8F5C,
 0x8F62, 0x8F63, 0x8F64, 0x8F9C, 0x8F9F, 0x8FA3, 0x8FAD, 0x8FAF,
 0x8FB7, 0x8FDA, 0x8FE5, 0x8FE2, 0x8FEA, 0x8FEF, 0x9087, 0x8FF4,
 0x9005, 0x8FF9, 0x8FFA, 0x9011, 0x9015, 0x9021, 0x900D, 0x901E,
 0x9016, 0x900B, 0x9027, 0x9036, 0x9035, 0x9039, 0x8FF8,
};
const unsigned short euc_to_utf8_EE[] = {
         0x904F, 0x9050, 0x9051, 0x9052, 0x900E, 0x9049, 0x903E,
 0x9056, 0x9058, 0x905E, 0x9068, 0x906F, 0x9076, 0x96A8, 0x9072,
 0x9082, 0x907D, 0x9081, 0x9080, 0x908A, 0x9089, 0x908F, 0x90A8,
 0x90AF, 0x90B1, 0x90B5, 0x90E2, 0x90E4, 0x6248, 0x90DB, 0x9102,
 0x9112, 0x9119, 0x9132, 0x9130, 0x914A, 0x9156, 0x9158, 0x9163,
 0x9165, 0x9169, 0x9173, 0x9172, 0x918B, 0x9189, 0x9182, 0x91A2,
 0x91AB, 0x91AF, 0x91AA, 0x91B5, 0x91B4, 0x91BA, 0x91C0, 0x91C1,
 0x91C9, 0x91CB, 0x91D0, 0x91D6, 0x91DF, 0x91E1, 0x91DB, 0x91FC,
 0x91F5, 0x91F6, 0x921E, 0x91FF, 0x9214, 0x922C, 0x9215, 0x9211,
 0x925E, 0x9257, 0x9245, 0x9249, 0x9264, 0x9248, 0x9295, 0x923F,
 0x924B, 0x9250, 0x929C, 0x9296, 0x9293, 0x929B, 0x925A, 0x92CF,
 0x92B9, 0x92B7, 0x92E9, 0x930F, 0x92FA, 0x9344, 0x932E,
};
const unsigned short euc_to_utf8_EF[] = {
         0x9319, 0x9322, 0x931A, 0x9323, 0x933A, 0x9335, 0x933B,
 0x935C, 0x9360, 0x937C, 0x936E, 0x9356, 0x93B0, 0x93AC, 0x93AD,
 0x9394, 0x93B9, 0x93D6, 0x93D7, 0x93E8, 0x93E5, 0x93D8, 0x93C3,
 0x93DD, 0x93D0, 0x93C8, 0x93E4, 0x941A, 0x9414, 0x9413, 0x9403,
 0x9407, 0x9410, 0x9436, 0x942B, 0x9435, 0x9421, 0x943A, 0x9441,
 0x9452, 0x9444, 0x945B, 0x9460, 0x9462, 0x945E, 0x946A, 0x9229,
 0x9470, 0x9475, 0x9477, 0x947D, 0x945A, 0x947C, 0x947E, 0x9481,
 0x947F, 0x9582, 0x9587, 0x958A, 0x9594, 0x9596, 0x9598, 0x9599,
 0x95A0, 0x95A8, 0x95A7, 0x95AD, 0x95BC, 0x95BB, 0x95B9, 0x95BE,
 0x95CA, 0x6FF6, 0x95C3, 0x95CD, 0x95CC, 0x95D5, 0x95D4, 0x95D6,
 0x95DC, 0x95E1, 0x95E5, 0x95E2, 0x9621, 0x9628, 0x962E, 0x962F,
 0x9642, 0x964C, 0x964F, 0x964B, 0x9677, 0x965C, 0x965E,
};
const unsigned short euc_to_utf8_F0[] = {
         0x965D, 0x965F, 0x9666, 0x9672, 0x966C, 0x968D, 0x9698,
 0x9695, 0x9697, 0x96AA, 0x96A7, 0x96B1, 0x96B2, 0x96B0, 0x96B4,
 0x96B6, 0x96B8, 0x96B9, 0x96CE, 0x96CB, 0x96C9, 0x96CD, 0x894D,
 0x96DC, 0x970D, 0x96D5, 0x96F9, 0x9704, 0x9706, 0x9708, 0x9713,
 0x970E, 0x9711, 0x970F, 0x9716, 0x9719, 0x9724, 0x972A, 0x9730,
 0x9739, 0x973D, 0x973E, 0x9744, 0x9746, 0x9748, 0x9742, 0x9749,
 0x975C, 0x9760, 0x9764, 0x9766, 0x9768, 0x52D2, 0x976B, 0x9771,
 0x9779, 0x9785, 0x977C, 0x9781, 0x977A, 0x9786, 0x978B, 0x978F,
 0x9790, 0x979C, 0x97A8, 0x97A6, 0x97A3, 0x97B3, 0x97B4, 0x97C3,
 0x97C6, 0x97C8, 0x97CB, 0x97DC, 0x97ED, 0x9F4F, 0x97F2, 0x7ADF,
 0x97F6, 0x97F5, 0x980F, 0x980C, 0x9838, 0x9824, 0x9821, 0x9837,
 0x983D, 0x9846, 0x984F, 0x984B, 0x986B, 0x986F, 0x9870,
};
const unsigned short euc_to_utf8_F1[] = {
         0x9871, 0x9874, 0x9873, 0x98AA, 0x98AF, 0x98B1, 0x98B6,
 0x98C4, 0x98C3, 0x98C6, 0x98E9, 0x98EB, 0x9903, 0x9909, 0x9912,
 0x9914, 0x9918, 0x9921, 0x991D, 0x991E, 0x9924, 0x9920, 0x992C,
 0x992E, 0x993D, 0x993E, 0x9942, 0x9949, 0x9945, 0x9950, 0x994B,
 0x9951, 0x9952, 0x994C, 0x9955, 0x9997, 0x9998, 0x99A5, 0x99AD,
 0x99AE, 0x99BC, 0x99DF, 0x99DB, 0x99DD, 0x99D8, 0x99D1, 0x99ED,
 0x99EE, 0x99F1, 0x99F2, 0x99FB, 0x99F8, 0x9A01, 0x9A0F, 0x9A05,
 0x99E2, 0x9A19, 0x9A2B, 0x9A37, 0x9A45, 0x9A42, 0x9A40, 0x9A43,
 0x9A3E, 0x9A55, 0x9A4D, 0x9A5B, 0x9A57, 0x9A5F, 0x9A62, 0x9A65,
 0x9A64, 0x9A69, 0x9A6B, 0x9A6A, 0x9AAD, 0x9AB0, 0x9ABC, 0x9AC0,
 0x9ACF, 0x9AD1, 0x9AD3, 0x9AD4, 0x9ADE, 0x9ADF, 0x9AE2, 0x9AE3,
 0x9AE6, 0x9AEF, 0x9AEB, 0x9AEE, 0x9AF4, 0x9AF1, 0x9AF7,
};
const unsigned short euc_to_utf8_F2[] = {
         0x9AFB, 0x9B06, 0x9B18, 0x9B1A, 0x9B1F, 0x9B22, 0x9B23,
 0x9B25, 0x9B27, 0x9B28, 0x9B29, 0x9B2A, 0x9B2E, 0x9B2F, 0x9B32,
 0x9B44, 0x9B43, 0x9B4F, 0x9B4D, 0x9B4E, 0x9B51, 0x9B58, 0x9B74,
 0x9B93, 0x9B83, 0x9B91, 0x9B96, 0x9B97, 0x9B9F, 0x9BA0, 0x9BA8,
 0x9BB4, 0x9BC0, 0x9BCA, 0x9BB9, 0x9BC6, 0x9BCF, 0x9BD1, 0x9BD2,
 0x9BE3, 0x9BE2, 0x9BE4, 0x9BD4, 0x9BE1, 0x9C3A, 0x9BF2, 0x9BF1,
 0x9BF0, 0x9C15, 0x9C14, 0x9C09, 0x9C13, 0x9C0C, 0x9C06, 0x9C08,
 0x9C12, 0x9C0A, 0x9C04, 0x9C2E, 0x9C1B, 0x9C25, 0x9C24, 0x9C21,
 0x9C30, 0x9C47, 0x9C32, 0x9C46, 0x9C3E, 0x9C5A, 0x9C60, 0x9C67,
 0x9C76, 0x9C78, 0x9CE7, 0x9CEC, 0x9CF0, 0x9D09, 0x9D08, 0x9CEB,
 0x9D03, 0x9D06, 0x9D2A, 0x9D26, 0x9DAF, 0x9D23, 0x9D1F, 0x9D44,
 0x9D15, 0x9D12, 0x9D41, 0x9D3F, 0x9D3E, 0x9D46, 0x9D48,
};
const unsigned short euc_to_utf8_F3[] = {
         0x9D5D, 0x9D5E, 0x9D64, 0x9D51, 0x9D50, 0x9D59, 0x9D72,
 0x9D89, 0x9D87, 0x9DAB, 0x9D6F, 0x9D7A, 0x9D9A, 0x9DA4, 0x9DA9,
 0x9DB2, 0x9DC4, 0x9DC1, 0x9DBB, 0x9DB8, 0x9DBA, 0x9DC6, 0x9DCF,
 0x9DC2, 0x9DD9, 0x9DD3, 0x9DF8, 0x9DE6, 0x9DED, 0x9DEF, 0x9DFD,
 0x9E1A, 0x9E1B, 0x9E1E, 0x9E75, 0x9E79, 0x9E7D, 0x9E81, 0x9E88,
 0x9E8B, 0x9E8C, 0x9E92, 0x9E95, 0x9E91, 0x9E9D, 0x9EA5, 0x9EA9,
 0x9EB8, 0x9EAA, 0x9EAD, 0x9761, 0x9ECC, 0x9ECE, 0x9ECF, 0x9ED0,
 0x9ED4, 0x9EDC, 0x9EDE, 0x9EDD, 0x9EE0, 0x9EE5, 0x9EE8, 0x9EEF,
 0x9EF4, 0x9EF6, 0x9EF7, 0x9EF9, 0x9EFB, 0x9EFC, 0x9EFD, 0x9F07,
 0x9F08, 0x76B7, 0x9F15, 0x9F21, 0x9F2C, 0x9F3E, 0x9F4A, 0x9F52,
 0x9F54, 0x9F63, 0x9F5F, 0x9F60, 0x9F61, 0x9F66, 0x9F67, 0x9F6C,
 0x9F6A, 0x9F77, 0x9F72, 0x9F76, 0x9F95, 0x9F9C, 0x9FA0,
};
const unsigned short euc_to_utf8_F4[] = {
         0x582F, 0x69C7, 0x9059, 0x7464, 0x51DC, 0x7199,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short euc_to_utf8_F5[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0xFE33,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0xFE31,      0,      0,
      0,      0,      0,      0,      0, 0xFE30,      0,      0,
      0,      0, 0xFE35, 0xFE36, 0xFE39, 0xFE3A,      0,      0,
 0xFE37, 0xFE38, 0xFE3F, 0xFE40, 0xFE3D, 0xFE3E, 0xFE41, 0xFE42,
 0xFE43, 0xFE44, 0xFE3B, 0xFE3C,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short euc_to_utf8_F9[] = {
         0x7E8A, 0x891C, 0x9348, 0x9288, 0x84DC, 0x4FC9, 0x70BB,
 0x6631, 0x68C8, 0x92F9, 0x66FB, 0x5F45, 0x4E28, 0x4EE1, 0x4EFC,
 0x4F00, 0x4F03, 0x4F39, 0x4F56, 0x4F92, 0x4F8A, 0x4F9A, 0x4F94,
 0x4FCD, 0x5040, 0x5022, 0x4FFF, 0x501E, 0x5046, 0x5070, 0x5042,
 0x5094, 0x50F4, 0x50D8, 0x514A, 0x5164, 0x519D, 0x51BE, 0x51EC,
 0x5215, 0x529C, 0x52A6, 0x52C0, 0x52DB, 0x5300, 0x5307, 0x5324,
 0x5372, 0x5393, 0x53B2, 0x53DD, 0xFA0E, 0x549C, 0x548A, 0x54A9,
 0x54FF, 0x5586, 0x5759, 0x5765, 0x57AC, 0x57C8, 0x57C7, 0xFA0F,
 0xFA10, 0x589E, 0x58B2, 0x590B, 0x5953, 0x595B, 0x595D, 0x5963,
 0x59A4, 0x59BA, 0x5B56, 0x5BC0, 0x752F, 0x5BD8, 0x5BEC, 0x5C1E,
 0x5CA6, 0x5CBA, 0x5CF5, 0x5D27, 0x5D53, 0xFA11, 0x5D42, 0x5D6D,
 0x5DB8, 0x5DB9, 0x5DD0, 0x5F21, 0x5F34, 0x5F67, 0x5FB7,
};
const unsigned short euc_to_utf8_FA[] = {
         0x5FDE, 0x605D, 0x6085, 0x608A, 0x60DE, 0x60D5, 0x6120,
 0x60F2, 0x6111, 0x6137, 0x6130, 0x6198, 0x6213, 0x62A6, 0x63F5,
 0x6460, 0x649D, 0x64CE, 0x654E, 0x6600, 0x6615, 0x663B, 0x6609,
 0x662E, 0x661E, 0x6624, 0x6665, 0x6657, 0x6659, 0xFA12, 0x6673,
 0x6699, 0x66A0, 0x66B2, 0x66BF, 0x66FA, 0x670E, 0xF929, 0x6766,
 0x67BB, 0x6852, 0x67C0, 0x6801, 0x6844, 0x68CF, 0xFA13, 0x6968,
 0xFA14, 0x6998, 0x69E2, 0x6A30, 0x6A6B, 0x6A46, 0x6A73, 0x6A7E,
 0x6AE2, 0x6AE4, 0x6BD6, 0x6C3F, 0x6C5C, 0x6C86, 0x6C6F, 0x6CDA,
 0x6D04, 0x6D87, 0x6D6F, 0x6D96, 0x6DAC, 0x6DCF, 0x6DF8, 0x6DF2,
 0x6DFC, 0x6E39, 0x6E5C, 0x6E27, 0x6E3C, 0x6EBF, 0x6F88, 0x6FB5,
 0x6FF5, 0x7005, 0x7007, 0x7028, 0x7085, 0x70AB, 0x710F, 0x7104,
 0x715C, 0x7146, 0x7147, 0xFA15, 0x71C1, 0x71FE, 0x72B1,
};
const unsigned short euc_to_utf8_FB[] = {
         0x72BE, 0x7324, 0xFA16, 0x7377, 0x73BD, 0x73C9, 0x73D6,
 0x73E3, 0x73D2, 0x7407, 0x73F5, 0x7426, 0x742A, 0x7429, 0x742E,
 0x7462, 0x7489, 0x749F, 0x7501, 0x756F, 0x7682, 0x769C, 0x769E,
 0x769B, 0x76A6, 0xFA17, 0x7746, 0x52AF, 0x7821, 0x784E, 0x7864,
 0x787A, 0x7930, 0xFA18, 0xFA19, 0xFA1A, 0x7994, 0xFA1B, 0x799B,
 0x7AD1, 0x7AE7, 0xFA1C, 0x7AEB, 0x7B9E, 0xFA1D, 0x7D48, 0x7D5C,
 0x7DB7, 0x7DA0, 0x7DD6, 0x7E52, 0x7F47, 0x7FA1, 0xFA1E, 0x8301,
 0x8362, 0x837F, 0x83C7, 0x83F6, 0x8448, 0x84B4, 0x8553, 0x8559,
 0x856B, 0xFA1F, 0x85B0, 0xFA20, 0xFA21, 0x8807, 0x88F5, 0x8A12,
 0x8A37, 0x8A79, 0x8AA7, 0x8ABE, 0x8ADF, 0xFA22, 0x8AF6, 0x8B53,
 0x8B7F, 0x8CF0, 0x8CF4, 0x8D12, 0x8D76, 0xFA23, 0x8ECF, 0xFA24,
 0xFA25, 0x9067, 0x90DE, 0xFA26, 0x9115, 0x9127, 0x91DA,
};
const unsigned short euc_to_utf8_FC[] = {
         0x91D7, 0x91DE, 0x91ED, 0x91EE, 0x91E4, 0x91E5, 0x9206,
 0x9210, 0x920A, 0x923A, 0x9240, 0x923C, 0x924E, 0x9259, 0x9251,
 0x9239, 0x9267, 0x92A7, 0x9277, 0x9278, 0x92E7, 0x92D7, 0x92D9,
 0x92D0, 0xFA27, 0x92D5, 0x92E0, 0x92D3, 0x9325, 0x9321, 0x92FB,
 0xFA28, 0x931E, 0x92FF, 0x931D, 0x9302, 0x9370, 0x9357, 0x93A4,
 0x93C6, 0x93DE, 0x93F8, 0x9431, 0x9445, 0x9448, 0x9592, 0xF9DC,
 0xFA29, 0x969D, 0x96AF, 0x9733, 0x973B, 0x9743, 0x974D, 0x974F,
 0x9751, 0x9755, 0x9857, 0x9865, 0xFA2A, 0xFA2B, 0x9927, 0xFA2C,
 0x999E, 0x9A4E, 0x9AD9, 0x9ADC, 0x9B75, 0x9B72, 0x9B8F, 0x9BB1,
 0x9BBB, 0x9C00, 0x9D70, 0x9D6B, 0xFA2D, 0x9E19, 0x9ED1,      0,
      0, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176,
 0x2177, 0x2178, 0x2179, 0xFFE2, 0x00A6, 0xFF07, 0xFF02,
};

/* Microsoft UCS Mapping Compatible */
const unsigned short euc_to_utf8_FC_ms[] = {
         0x91D7, 0x91DE, 0x91ED, 0x91EE, 0x91E4, 0x91E5, 0x9206,
 0x9210, 0x920A, 0x923A, 0x9240, 0x923C, 0x924E, 0x9259, 0x9251,
 0x9239, 0x9267, 0x92A7, 0x9277, 0x9278, 0x92E7, 0x92D7, 0x92D9,
 0x92D0, 0xFA27, 0x92D5, 0x92E0, 0x92D3, 0x9325, 0x9321, 0x92FB,
 0xFA28, 0x931E, 0x92FF, 0x931D, 0x9302, 0x9370, 0x9357, 0x93A4,
 0x93C6, 0x93DE, 0x93F8, 0x9431, 0x9445, 0x9448, 0x9592, 0xF9DC,
 0xFA29, 0x969D, 0x96AF, 0x9733, 0x973B, 0x9743, 0x974D, 0x974F,
 0x9751, 0x9755, 0x9857, 0x9865, 0xFA2A, 0xFA2B, 0x9927, 0xFA2C,
 0x999E, 0x9A4E, 0x9AD9, 0x9ADC, 0x9B75, 0x9B72, 0x9B8F, 0x9BB1,
 0x9BBB, 0x9C00, 0x9D70, 0x9D6B, 0xFA2D, 0x9E19, 0x9ED1,      0,
      0, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176,
 0x2177, 0x2178, 0x2179, 0xFFE2, 0xFFE4, 0xFF07, 0xFF02,
};

#ifdef X0212_ENABLE
const unsigned short euc_to_utf8_8FA2[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x02D8,
 0x02C7, 0x00B8, 0x02D9, 0x02DD, 0x00AF, 0x02DB, 0x02DA, 0xFF5E,
 0x0384, 0x0385,      0,      0,      0,      0,      0,      0,
      0,      0, 0x00A1, 0x00A6, 0x00BF,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x00BA, 0x00AA, 0x00A9, 0x00AE, 0x2122,
 0x00A4, 0x2116,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short euc_to_utf8_8FA6[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x0386, 0x0388, 0x0389, 0x038A, 0x03AA,      0, 0x038C,
      0, 0x038E, 0x03AB,      0, 0x038F,      0,      0,      0,
      0, 0x03AC, 0x03AD, 0x03AE, 0x03AF, 0x03CA, 0x0390, 0x03CC,
 0x03C2, 0x03CD, 0x03CB, 0x03B0, 0x03CE,      0,      0,
};
const unsigned short euc_to_utf8_8FA7[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407,
 0x0408, 0x0409, 0x040A, 0x040B, 0x040C, 0x040E, 0x040F,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457,
 0x0458, 0x0459, 0x045A, 0x045B, 0x045C, 0x045E, 0x045F,
};
const unsigned short euc_to_utf8_8FA9[] = {
         0x00C6, 0x0110,      0, 0x0126,      0, 0x0132,      0,
 0x0141, 0x013F,      0, 0x014A, 0x00D8, 0x0152,      0, 0x0166,
 0x00DE,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x00E6, 0x0111, 0x00F0, 0x0127, 0x0131, 0x0133, 0x0138,
 0x0142, 0x0140, 0x0149, 0x014B, 0x00F8, 0x0153, 0x00DF, 0x0167,
 0x00FE,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short euc_to_utf8_8FAA[] = {
         0x00C1, 0x00C0, 0x00C4, 0x00C2, 0x0102, 0x01CD, 0x0100,
 0x0104, 0x00C5, 0x00C3, 0x0106, 0x0108, 0x010C, 0x00C7, 0x010A,
 0x010E, 0x00C9, 0x00C8, 0x00CB, 0x00CA, 0x011A, 0x0116, 0x0112,
 0x0118,      0, 0x011C, 0x011E, 0x0122, 0x0120, 0x0124, 0x00CD,
 0x00CC, 0x00CF, 0x00CE, 0x01CF, 0x0130, 0x012A, 0x012E, 0x0128,
 0x0134, 0x0136, 0x0139, 0x013D, 0x013B, 0x0143, 0x0147, 0x0145,
 0x00D1, 0x00D3, 0x00D2, 0x00D6, 0x00D4, 0x01D1, 0x0150, 0x014C,
 0x00D5, 0x0154, 0x0158, 0x0156, 0x015A, 0x015C, 0x0160, 0x015E,
 0x0164, 0x0162, 0x00DA, 0x00D9, 0x00DC, 0x00DB, 0x016C, 0x01D3,
 0x0170, 0x016A, 0x0172, 0x016E, 0x0168, 0x01D7, 0x01DB, 0x01D9,
 0x01D5, 0x0174, 0x00DD, 0x0178, 0x0176, 0x0179, 0x017D, 0x017B,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short euc_to_utf8_8FAB[] = {
         0x00E1, 0x00E0, 0x00E4, 0x00E2, 0x0103, 0x01CE, 0x0101,
 0x0105, 0x00E5, 0x00E3, 0x0107, 0x0109, 0x010D, 0x00E7, 0x010B,
 0x010F, 0x00E9, 0x00E8, 0x00EB, 0x00EA, 0x011B, 0x0117, 0x0113,
 0x0119, 0x01F5, 0x011D, 0x011F,      0, 0x0121, 0x0125, 0x00ED,
 0x00EC, 0x00EF, 0x00EE, 0x01D0,      0, 0x012B, 0x012F, 0x0129,
 0x0135, 0x0137, 0x013A, 0x013E, 0x013C, 0x0144, 0x0148, 0x0146,
 0x00F1, 0x00F3, 0x00F2, 0x00F6, 0x00F4, 0x01D2, 0x0151, 0x014D,
 0x00F5, 0x0155, 0x0159, 0x0157, 0x015B, 0x015D, 0x0161, 0x015F,
 0x0165, 0x0163, 0x00FA, 0x00F9, 0x00FC, 0x00FB, 0x016D, 0x01D4,
 0x0171, 0x016B, 0x0173, 0x016F, 0x0169, 0x01D8, 0x01DC, 0x01DA,
 0x01D6, 0x0175, 0x00FD, 0x00FF, 0x0177, 0x017A, 0x017E, 0x017C,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short euc_to_utf8_8FB0[] = {
         0x4E02, 0x4E04, 0x4E05, 0x4E0C, 0x4E12, 0x4E1F, 0x4E23,
 0x4E24, 0x4E28, 0x4E2B, 0x4E2E, 0x4E2F, 0x4E30, 0x4E35, 0x4E40,
 0x4E41, 0x4E44, 0x4E47, 0x4E51, 0x4E5A, 0x4E5C, 0x4E63, 0x4E68,
 0x4E69, 0x4E74, 0x4E75, 0x4E79, 0x4E7F, 0x4E8D, 0x4E96, 0x4E97,
 0x4E9D, 0x4EAF, 0x4EB9, 0x4EC3, 0x4ED0, 0x4EDA, 0x4EDB, 0x4EE0,
 0x4EE1, 0x4EE2, 0x4EE8, 0x4EEF, 0x4EF1, 0x4EF3, 0x4EF5, 0x4EFD,
 0x4EFE, 0x4EFF, 0x4F00, 0x4F02, 0x4F03, 0x4F08, 0x4F0B, 0x4F0C,
 0x4F12, 0x4F15, 0x4F16, 0x4F17, 0x4F19, 0x4F2E, 0x4F31, 0x4F60,
 0x4F33, 0x4F35, 0x4F37, 0x4F39, 0x4F3B, 0x4F3E, 0x4F40, 0x4F42,
 0x4F48, 0x4F49, 0x4F4B, 0x4F4C, 0x4F52, 0x4F54, 0x4F56, 0x4F58,
 0x4F5F, 0x4F63, 0x4F6A, 0x4F6C, 0x4F6E, 0x4F71, 0x4F77, 0x4F78,
 0x4F79, 0x4F7A, 0x4F7D, 0x4F7E, 0x4F81, 0x4F82, 0x4F84,
};
const unsigned short euc_to_utf8_8FB1[] = {
         0x4F85, 0x4F89, 0x4F8A, 0x4F8C, 0x4F8E, 0x4F90, 0x4F92,
 0x4F93, 0x4F94, 0x4F97, 0x4F99, 0x4F9A, 0x4F9E, 0x4F9F, 0x4FB2,
 0x4FB7, 0x4FB9, 0x4FBB, 0x4FBC, 0x4FBD, 0x4FBE, 0x4FC0, 0x4FC1,
 0x4FC5, 0x4FC6, 0x4FC8, 0x4FC9, 0x4FCB, 0x4FCC, 0x4FCD, 0x4FCF,
 0x4FD2, 0x4FDC, 0x4FE0, 0x4FE2, 0x4FF0, 0x4FF2, 0x4FFC, 0x4FFD,
 0x4FFF, 0x5000, 0x5001, 0x5004, 0x5007, 0x500A, 0x500C, 0x500E,
 0x5010, 0x5013, 0x5017, 0x5018, 0x501B, 0x501C, 0x501D, 0x501E,
 0x5022, 0x5027, 0x502E, 0x5030, 0x5032, 0x5033, 0x5035, 0x5040,
 0x5041, 0x5042, 0x5045, 0x5046, 0x504A, 0x504C, 0x504E, 0x5051,
 0x5052, 0x5053, 0x5057, 0x5059, 0x505F, 0x5060, 0x5062, 0x5063,
 0x5066, 0x5067, 0x506A, 0x506D, 0x5070, 0x5071, 0x503B, 0x5081,
 0x5083, 0x5084, 0x5086, 0x508A, 0x508E, 0x508F, 0x5090,
};
const unsigned short euc_to_utf8_8FB2[] = {
         0x5092, 0x5093, 0x5094, 0x5096, 0x509B, 0x509C, 0x509E,
 0x509F, 0x50A0, 0x50A1, 0x50A2, 0x50AA, 0x50AF, 0x50B0, 0x50B9,
 0x50BA, 0x50BD, 0x50C0, 0x50C3, 0x50C4, 0x50C7, 0x50CC, 0x50CE,
 0x50D0, 0x50D3, 0x50D4, 0x50D8, 0x50DC, 0x50DD, 0x50DF, 0x50E2,
 0x50E4, 0x50E6, 0x50E8, 0x50E9, 0x50EF, 0x50F1, 0x50F6, 0x50FA,
 0x50FE, 0x5103, 0x5106, 0x5107, 0x5108, 0x510B, 0x510C, 0x510D,
 0x510E, 0x50F2, 0x5110, 0x5117, 0x5119, 0x511B, 0x511C, 0x511D,
 0x511E, 0x5123, 0x5127, 0x5128, 0x512C, 0x512D, 0x512F, 0x5131,
 0x5133, 0x5134, 0x5135, 0x5138, 0x5139, 0x5142, 0x514A, 0x514F,
 0x5153, 0x5155, 0x5157, 0x5158, 0x515F, 0x5164, 0x5166, 0x517E,
 0x5183, 0x5184, 0x518B, 0x518E, 0x5198, 0x519D, 0x51A1, 0x51A3,
 0x51AD, 0x51B8, 0x51BA, 0x51BC, 0x51BE, 0x51BF, 0x51C2,
};
const unsigned short euc_to_utf8_8FB3[] = {
         0x51C8, 0x51CF, 0x51D1, 0x51D2, 0x51D3, 0x51D5, 0x51D8,
 0x51DE, 0x51E2, 0x51E5, 0x51EE, 0x51F2, 0x51F3, 0x51F4, 0x51F7,
 0x5201, 0x5202, 0x5205, 0x5212, 0x5213, 0x5215, 0x5216, 0x5218,
 0x5222, 0x5228, 0x5231, 0x5232, 0x5235, 0x523C, 0x5245, 0x5249,
 0x5255, 0x5257, 0x5258, 0x525A, 0x525C, 0x525F, 0x5260, 0x5261,
 0x5266, 0x526E, 0x5277, 0x5278, 0x5279, 0x5280, 0x5282, 0x5285,
 0x528A, 0x528C, 0x5293, 0x5295, 0x5296, 0x5297, 0x5298, 0x529A,
 0x529C, 0x52A4, 0x52A5, 0x52A6, 0x52A7, 0x52AF, 0x52B0, 0x52B6,
 0x52B7, 0x52B8, 0x52BA, 0x52BB, 0x52BD, 0x52C0, 0x52C4, 0x52C6,
 0x52C8, 0x52CC, 0x52CF, 0x52D1, 0x52D4, 0x52D6, 0x52DB, 0x52DC,
 0x52E1, 0x52E5, 0x52E8, 0x52E9, 0x52EA, 0x52EC, 0x52F0, 0x52F1,
 0x52F4, 0x52F6, 0x52F7, 0x5300, 0x5303, 0x530A, 0x530B,
};
const unsigned short euc_to_utf8_8FB4[] = {
         0x530C, 0x5311, 0x5313, 0x5318, 0x531B, 0x531C, 0x531E,
 0x531F, 0x5325, 0x5327, 0x5328, 0x5329, 0x532B, 0x532C, 0x532D,
 0x5330, 0x5332, 0x5335, 0x533C, 0x533D, 0x533E, 0x5342, 0x534C,
 0x534B, 0x5359, 0x535B, 0x5361, 0x5363, 0x5365, 0x536C, 0x536D,
 0x5372, 0x5379, 0x537E, 0x5383, 0x5387, 0x5388, 0x538E, 0x5393,
 0x5394, 0x5399, 0x539D, 0x53A1, 0x53A4, 0x53AA, 0x53AB, 0x53AF,
 0x53B2, 0x53B4, 0x53B5, 0x53B7, 0x53B8, 0x53BA, 0x53BD, 0x53C0,
 0x53C5, 0x53CF, 0x53D2, 0x53D3, 0x53D5, 0x53DA, 0x53DD, 0x53DE,
 0x53E0, 0x53E6, 0x53E7, 0x53F5, 0x5402, 0x5413, 0x541A, 0x5421,
 0x5427, 0x5428, 0x542A, 0x542F, 0x5431, 0x5434, 0x5435, 0x5443,
 0x5444, 0x5447, 0x544D, 0x544F, 0x545E, 0x5462, 0x5464, 0x5466,
 0x5467, 0x5469, 0x546B, 0x546D, 0x546E, 0x5474, 0x547F,
};
const unsigned short euc_to_utf8_8FB5[] = {
         0x5481, 0x5483, 0x5485, 0x5488, 0x5489, 0x548D, 0x5491,
 0x5495, 0x5496, 0x549C, 0x549F, 0x54A1, 0x54A6, 0x54A7, 0x54A9,
 0x54AA, 0x54AD, 0x54AE, 0x54B1, 0x54B7, 0x54B9, 0x54BA, 0x54BB,
 0x54BF, 0x54C6, 0x54CA, 0x54CD, 0x54CE, 0x54E0, 0x54EA, 0x54EC,
 0x54EF, 0x54F6, 0x54FC, 0x54FE, 0x54FF, 0x5500, 0x5501, 0x5505,
 0x5508, 0x5509, 0x550C, 0x550D, 0x550E, 0x5515, 0x552A, 0x552B,
 0x5532, 0x5535, 0x5536, 0x553B, 0x553C, 0x553D, 0x5541, 0x5547,
 0x5549, 0x554A, 0x554D, 0x5550, 0x5551, 0x5558, 0x555A, 0x555B,
 0x555E, 0x5560, 0x5561, 0x5564, 0x5566, 0x557F, 0x5581, 0x5582,
 0x5586, 0x5588, 0x558E, 0x558F, 0x5591, 0x5592, 0x5593, 0x5594,
 0x5597, 0x55A3, 0x55A4, 0x55AD, 0x55B2, 0x55BF, 0x55C1, 0x55C3,
 0x55C6, 0x55C9, 0x55CB, 0x55CC, 0x55CE, 0x55D1, 0x55D2,
};
const unsigned short euc_to_utf8_8FB6[] = {
         0x55D3, 0x55D7, 0x55D8, 0x55DB, 0x55DE, 0x55E2, 0x55E9,
 0x55F6, 0x55FF, 0x5605, 0x5608, 0x560A, 0x560D, 0x560E, 0x560F,
 0x5610, 0x5611, 0x5612, 0x5619, 0x562C, 0x5630, 0x5633, 0x5635,
 0x5637, 0x5639, 0x563B, 0x563C, 0x563D, 0x563F, 0x5640, 0x5641,
 0x5643, 0x5644, 0x5646, 0x5649, 0x564B, 0x564D, 0x564F, 0x5654,
 0x565E, 0x5660, 0x5661, 0x5662, 0x5663, 0x5666, 0x5669, 0x566D,
 0x566F, 0x5671, 0x5672, 0x5675, 0x5684, 0x5685, 0x5688, 0x568B,
 0x568C, 0x5695, 0x5699, 0x569A, 0x569D, 0x569E, 0x569F, 0x56A6,
 0x56A7, 0x56A8, 0x56A9, 0x56AB, 0x56AC, 0x56AD, 0x56B1, 0x56B3,
 0x56B7, 0x56BE, 0x56C5, 0x56C9, 0x56CA, 0x56CB, 0x56CF, 0x56D0,
 0x56CC, 0x56CD, 0x56D9, 0x56DC, 0x56DD, 0x56DF, 0x56E1, 0x56E4,
 0x56E5, 0x56E6, 0x56E7, 0x56E8, 0x56F1, 0x56EB, 0x56ED,
};
const unsigned short euc_to_utf8_8FB7[] = {
         0x56F6, 0x56F7, 0x5701, 0x5702, 0x5707, 0x570A, 0x570C,
 0x5711, 0x5715, 0x571A, 0x571B, 0x571D, 0x5720, 0x5722, 0x5723,
 0x5724, 0x5725, 0x5729, 0x572A, 0x572C, 0x572E, 0x572F, 0x5733,
 0x5734, 0x573D, 0x573E, 0x573F, 0x5745, 0x5746, 0x574C, 0x574D,
 0x5752, 0x5762, 0x5765, 0x5767, 0x5768, 0x576B, 0x576D, 0x576E,
 0x576F, 0x5770, 0x5771, 0x5773, 0x5774, 0x5775, 0x5777, 0x5779,
 0x577A, 0x577B, 0x577C, 0x577E, 0x5781, 0x5783, 0x578C, 0x5794,
 0x5797, 0x5799, 0x579A, 0x579C, 0x579D, 0x579E, 0x579F, 0x57A1,
 0x5795, 0x57A7, 0x57A8, 0x57A9, 0x57AC, 0x57B8, 0x57BD, 0x57C7,
 0x57C8, 0x57CC, 0x57CF, 0x57D5, 0x57DD, 0x57DE, 0x57E4, 0x57E6,
 0x57E7, 0x57E9, 0x57ED, 0x57F0, 0x57F5, 0x57F6, 0x57F8, 0x57FD,
 0x57FE, 0x57FF, 0x5803, 0x5804, 0x5808, 0x5809, 0x57E1,
};
const unsigned short euc_to_utf8_8FB8[] = {
         0x580C, 0x580D, 0x581B, 0x581E, 0x581F, 0x5820, 0x5826,
 0x5827, 0x582D, 0x5832, 0x5839, 0x583F, 0x5849, 0x584C, 0x584D,
 0x584F, 0x5850, 0x5855, 0x585F, 0x5861, 0x5864, 0x5867, 0x5868,
 0x5878, 0x587C, 0x587F, 0x5880, 0x5881, 0x5887, 0x5888, 0x5889,
 0x588A, 0x588C, 0x588D, 0x588F, 0x5890, 0x5894, 0x5896, 0x589D,
 0x58A0, 0x58A1, 0x58A2, 0x58A6, 0x58A9, 0x58B1, 0x58B2, 0x58C4,
 0x58BC, 0x58C2, 0x58C8, 0x58CD, 0x58CE, 0x58D0, 0x58D2, 0x58D4,
 0x58D6, 0x58DA, 0x58DD, 0x58E1, 0x58E2, 0x58E9, 0x58F3, 0x5905,
 0x5906, 0x590B, 0x590C, 0x5912, 0x5913, 0x5914, 0x8641, 0x591D,
 0x5921, 0x5923, 0x5924, 0x5928, 0x592F, 0x5930, 0x5933, 0x5935,
 0x5936, 0x593F, 0x5943, 0x5946, 0x5952, 0x5953, 0x5959, 0x595B,
 0x595D, 0x595E, 0x595F, 0x5961, 0x5963, 0x596B, 0x596D,
};
const unsigned short euc_to_utf8_8FB9[] = {
         0x596F, 0x5972, 0x5975, 0x5976, 0x5979, 0x597B, 0x597C,
 0x598B, 0x598C, 0x598E, 0x5992, 0x5995, 0x5997, 0x599F, 0x59A4,
 0x59A7, 0x59AD, 0x59AE, 0x59AF, 0x59B0, 0x59B3, 0x59B7, 0x59BA,
 0x59BC, 0x59C1, 0x59C3, 0x59C4, 0x59C8, 0x59CA, 0x59CD, 0x59D2,
 0x59DD, 0x59DE, 0x59DF, 0x59E3, 0x59E4, 0x59E7, 0x59EE, 0x59EF,
 0x59F1, 0x59F2, 0x59F4, 0x59F7, 0x5A00, 0x5A04, 0x5A0C, 0x5A0D,
 0x5A0E, 0x5A12, 0x5A13, 0x5A1E, 0x5A23, 0x5A24, 0x5A27, 0x5A28,
 0x5A2A, 0x5A2D, 0x5A30, 0x5A44, 0x5A45, 0x5A47, 0x5A48, 0x5A4C,
 0x5A50, 0x5A55, 0x5A5E, 0x5A63, 0x5A65, 0x5A67, 0x5A6D, 0x5A77,
 0x5A7A, 0x5A7B, 0x5A7E, 0x5A8B, 0x5A90, 0x5A93, 0x5A96, 0x5A99,
 0x5A9C, 0x5A9E, 0x5A9F, 0x5AA0, 0x5AA2, 0x5AA7, 0x5AAC, 0x5AB1,
 0x5AB2, 0x5AB3, 0x5AB5, 0x5AB8, 0x5ABA, 0x5ABB, 0x5ABF,
};
const unsigned short euc_to_utf8_8FBA[] = {
         0x5AC4, 0x5AC6, 0x5AC8, 0x5ACF, 0x5ADA, 0x5ADC, 0x5AE0,
 0x5AE5, 0x5AEA, 0x5AEE, 0x5AF5, 0x5AF6, 0x5AFD, 0x5B00, 0x5B01,
 0x5B08, 0x5B17, 0x5B34, 0x5B19, 0x5B1B, 0x5B1D, 0x5B21, 0x5B25,
 0x5B2D, 0x5B38, 0x5B41, 0x5B4B, 0x5B4C, 0x5B52, 0x5B56, 0x5B5E,
 0x5B68, 0x5B6E, 0x5B6F, 0x5B7C, 0x5B7D, 0x5B7E, 0x5B7F, 0x5B81,
 0x5B84, 0x5B86, 0x5B8A, 0x5B8E, 0x5B90, 0x5B91, 0x5B93, 0x5B94,
 0x5B96, 0x5BA8, 0x5BA9, 0x5BAC, 0x5BAD, 0x5BAF, 0x5BB1, 0x5BB2,
 0x5BB7, 0x5BBA, 0x5BBC, 0x5BC0, 0x5BC1, 0x5BCD, 0x5BCF, 0x5BD6,
 0x5BD7, 0x5BD8, 0x5BD9, 0x5BDA, 0x5BE0, 0x5BEF, 0x5BF1, 0x5BF4,
 0x5BFD, 0x5C0C, 0x5C17, 0x5C1E, 0x5C1F, 0x5C23, 0x5C26, 0x5C29,
 0x5C2B, 0x5C2C, 0x5C2E, 0x5C30, 0x5C32, 0x5C35, 0x5C36, 0x5C59,
 0x5C5A, 0x5C5C, 0x5C62, 0x5C63, 0x5C67, 0x5C68, 0x5C69,
};
const unsigned short euc_to_utf8_8FBB[] = {
         0x5C6D, 0x5C70, 0x5C74, 0x5C75, 0x5C7A, 0x5C7B, 0x5C7C,
 0x5C7D, 0x5C87, 0x5C88, 0x5C8A, 0x5C8F, 0x5C92, 0x5C9D, 0x5C9F,
 0x5CA0, 0x5CA2, 0x5CA3, 0x5CA6, 0x5CAA, 0x5CB2, 0x5CB4, 0x5CB5,
 0x5CBA, 0x5CC9, 0x5CCB, 0x5CD2, 0x5CDD, 0x5CD7, 0x5CEE, 0x5CF1,
 0x5CF2, 0x5CF4, 0x5D01, 0x5D06, 0x5D0D, 0x5D12, 0x5D2B, 0x5D23,
 0x5D24, 0x5D26, 0x5D27, 0x5D31, 0x5D34, 0x5D39, 0x5D3D, 0x5D3F,
 0x5D42, 0x5D43, 0x5D46, 0x5D48, 0x5D55, 0x5D51, 0x5D59, 0x5D4A,
 0x5D5F, 0x5D60, 0x5D61, 0x5D62, 0x5D64, 0x5D6A, 0x5D6D, 0x5D70,
 0x5D79, 0x5D7A, 0x5D7E, 0x5D7F, 0x5D81, 0x5D83, 0x5D88, 0x5D8A,
 0x5D92, 0x5D93, 0x5D94, 0x5D95, 0x5D99, 0x5D9B, 0x5D9F, 0x5DA0,
 0x5DA7, 0x5DAB, 0x5DB0, 0x5DB4, 0x5DB8, 0x5DB9, 0x5DC3, 0x5DC7,
 0x5DCB, 0x5DD0, 0x5DCE, 0x5DD8, 0x5DD9, 0x5DE0, 0x5DE4,
};
const unsigned short euc_to_utf8_8FBC[] = {
         0x5DE9, 0x5DF8, 0x5DF9, 0x5E00, 0x5E07, 0x5E0D, 0x5E12,
 0x5E14, 0x5E15, 0x5E18, 0x5E1F, 0x5E20, 0x5E2E, 0x5E28, 0x5E32,
 0x5E35, 0x5E3E, 0x5E4B, 0x5E50, 0x5E49, 0x5E51, 0x5E56, 0x5E58,
 0x5E5B, 0x5E5C, 0x5E5E, 0x5E68, 0x5E6A, 0x5E6B, 0x5E6C, 0x5E6D,
 0x5E6E, 0x5E70, 0x5E80, 0x5E8B, 0x5E8E, 0x5EA2, 0x5EA4, 0x5EA5,
 0x5EA8, 0x5EAA, 0x5EAC, 0x5EB1, 0x5EB3, 0x5EBD, 0x5EBE, 0x5EBF,
 0x5EC6, 0x5ECC, 0x5ECB, 0x5ECE, 0x5ED1, 0x5ED2, 0x5ED4, 0x5ED5,
 0x5EDC, 0x5EDE, 0x5EE5, 0x5EEB, 0x5F02, 0x5F06, 0x5F07, 0x5F08,
 0x5F0E, 0x5F19, 0x5F1C, 0x5F1D, 0x5F21, 0x5F22, 0x5F23, 0x5F24,
 0x5F28, 0x5F2B, 0x5F2C, 0x5F2E, 0x5F30, 0x5F34, 0x5F36, 0x5F3B,
 0x5F3D, 0x5F3F, 0x5F40, 0x5F44, 0x5F45, 0x5F47, 0x5F4D, 0x5F50,
 0x5F54, 0x5F58, 0x5F5B, 0x5F60, 0x5F63, 0x5F64, 0x5F67,
};
const unsigned short euc_to_utf8_8FBD[] = {
         0x5F6F, 0x5F72, 0x5F74, 0x5F75, 0x5F78, 0x5F7A, 0x5F7D,
 0x5F7E, 0x5F89, 0x5F8D, 0x5F8F, 0x5F96, 0x5F9C, 0x5F9D, 0x5FA2,
 0x5FA7, 0x5FAB, 0x5FA4, 0x5FAC, 0x5FAF, 0x5FB0, 0x5FB1, 0x5FB8,
 0x5FC4, 0x5FC7, 0x5FC8, 0x5FC9, 0x5FCB, 0x5FD0, 0x5FD1, 0x5FD2,
 0x5FD3, 0x5FD4, 0x5FDE, 0x5FE1, 0x5FE2, 0x5FE8, 0x5FE9, 0x5FEA,
 0x5FEC, 0x5FED, 0x5FEE, 0x5FEF, 0x5FF2, 0x5FF3, 0x5FF6, 0x5FFA,
 0x5FFC, 0x6007, 0x600A, 0x600D, 0x6013, 0x6014, 0x6017, 0x6018,
 0x601A, 0x601F, 0x6024, 0x602D, 0x6033, 0x6035, 0x6040, 0x6047,
 0x6048, 0x6049, 0x604C, 0x6051, 0x6054, 0x6056, 0x6057, 0x605D,
 0x6061, 0x6067, 0x6071, 0x607E, 0x607F, 0x6082, 0x6086, 0x6088,
 0x608A, 0x608E, 0x6091, 0x6093, 0x6095, 0x6098, 0x609D, 0x609E,
 0x60A2, 0x60A4, 0x60A5, 0x60A8, 0x60B0, 0x60B1, 0x60B7,
};
const unsigned short euc_to_utf8_8FBE[] = {
         0x60BB, 0x60BE, 0x60C2, 0x60C4, 0x60C8, 0x60C9, 0x60CA,
 0x60CB, 0x60CE, 0x60CF, 0x60D4, 0x60D5, 0x60D9, 0x60DB, 0x60DD,
 0x60DE, 0x60E2, 0x60E5, 0x60F2, 0x60F5, 0x60F8, 0x60FC, 0x60FD,
 0x6102, 0x6107, 0x610A, 0x610C, 0x6110, 0x6111, 0x6112, 0x6113,
 0x6114, 0x6116, 0x6117, 0x6119, 0x611C, 0x611E, 0x6122, 0x612A,
 0x612B, 0x6130, 0x6131, 0x6135, 0x6136, 0x6137, 0x6139, 0x6141,
 0x6145, 0x6146, 0x6149, 0x615E, 0x6160, 0x616C, 0x6172, 0x6178,
 0x617B, 0x617C, 0x617F, 0x6180, 0x6181, 0x6183, 0x6184, 0x618B,
 0x618D, 0x6192, 0x6193, 0x6197, 0x6198, 0x619C, 0x619D, 0x619F,
 0x61A0, 0x61A5, 0x61A8, 0x61AA, 0x61AD, 0x61B8, 0x61B9, 0x61BC,
 0x61C0, 0x61C1, 0x61C2, 0x61CE, 0x61CF, 0x61D5, 0x61DC, 0x61DD,
 0x61DE, 0x61DF, 0x61E1, 0x61E2, 0x61E7, 0x61E9, 0x61E5,
};
const unsigned short euc_to_utf8_8FBF[] = {
         0x61EC, 0x61ED, 0x61EF, 0x6201, 0x6203, 0x6204, 0x6207,
 0x6213, 0x6215, 0x621C, 0x6220, 0x6222, 0x6223, 0x6227, 0x6229,
 0x622B, 0x6239, 0x623D, 0x6242, 0x6243, 0x6244, 0x6246, 0x624C,
 0x6250, 0x6251, 0x6252, 0x6254, 0x6256, 0x625A, 0x625C, 0x6264,
 0x626D, 0x626F, 0x6273, 0x627A, 0x627D, 0x628D, 0x628E, 0x628F,
 0x6290, 0x62A6, 0x62A8, 0x62B3, 0x62B6, 0x62B7, 0x62BA, 0x62BE,
 0x62BF, 0x62C4, 0x62CE, 0x62D5, 0x62D6, 0x62DA, 0x62EA, 0x62F2,
 0x62F4, 0x62FC, 0x62FD, 0x6303, 0x6304, 0x630A, 0x630B, 0x630D,
 0x6310, 0x6313, 0x6316, 0x6318, 0x6329, 0x632A, 0x632D, 0x6335,
 0x6336, 0x6339, 0x633C, 0x6341, 0x6342, 0x6343, 0x6344, 0x6346,
 0x634A, 0x634B, 0x634E, 0x6352, 0x6353, 0x6354, 0x6358, 0x635B,
 0x6365, 0x6366, 0x636C, 0x636D, 0x6371, 0x6374, 0x6375,
};
const unsigned short euc_to_utf8_8FC0[] = {
         0x6378, 0x637C, 0x637D, 0x637F, 0x6382, 0x6384, 0x6387,
 0x638A, 0x6390, 0x6394, 0x6395, 0x6399, 0x639A, 0x639E, 0x63A4,
 0x63A6, 0x63AD, 0x63AE, 0x63AF, 0x63BD, 0x63C1, 0x63C5, 0x63C8,
 0x63CE, 0x63D1, 0x63D3, 0x63D4, 0x63D5, 0x63DC, 0x63E0, 0x63E5,
 0x63EA, 0x63EC, 0x63F2, 0x63F3, 0x63F5, 0x63F8, 0x63F9, 0x6409,
 0x640A, 0x6410, 0x6412, 0x6414, 0x6418, 0x641E, 0x6420, 0x6422,
 0x6424, 0x6425, 0x6429, 0x642A, 0x642F, 0x6430, 0x6435, 0x643D,
 0x643F, 0x644B, 0x644F, 0x6451, 0x6452, 0x6453, 0x6454, 0x645A,
 0x645B, 0x645C, 0x645D, 0x645F, 0x6460, 0x6461, 0x6463, 0x646D,
 0x6473, 0x6474, 0x647B, 0x647D, 0x6485, 0x6487, 0x648F, 0x6490,
 0x6491, 0x6498, 0x6499, 0x649B, 0x649D, 0x649F, 0x64A1, 0x64A3,
 0x64A6, 0x64A8, 0x64AC, 0x64B3, 0x64BD, 0x64BE, 0x64BF,
};
const unsigned short euc_to_utf8_8FC1[] = {
         0x64C4, 0x64C9, 0x64CA, 0x64CB, 0x64CC, 0x64CE, 0x64D0,
 0x64D1, 0x64D5, 0x64D7, 0x64E4, 0x64E5, 0x64E9, 0x64EA, 0x64ED,
 0x64F0, 0x64F5, 0x64F7, 0x64FB, 0x64FF, 0x6501, 0x6504, 0x6508,
 0x6509, 0x650A, 0x650F, 0x6513, 0x6514, 0x6516, 0x6519, 0x651B,
 0x651E, 0x651F, 0x6522, 0x6526, 0x6529, 0x652E, 0x6531, 0x653A,
 0x653C, 0x653D, 0x6543, 0x6547, 0x6549, 0x6550, 0x6552, 0x6554,
 0x655F, 0x6560, 0x6567, 0x656B, 0x657A, 0x657D, 0x6581, 0x6585,
 0x658A, 0x6592, 0x6595, 0x6598, 0x659D, 0x65A0, 0x65A3, 0x65A6,
 0x65AE, 0x65B2, 0x65B3, 0x65B4, 0x65BF, 0x65C2, 0x65C8, 0x65C9,
 0x65CE, 0x65D0, 0x65D4, 0x65D6, 0x65D8, 0x65DF, 0x65F0, 0x65F2,
 0x65F4, 0x65F5, 0x65F9, 0x65FE, 0x65FF, 0x6600, 0x6604, 0x6608,
 0x6609, 0x660D, 0x6611, 0x6612, 0x6615, 0x6616, 0x661D,
};
const unsigned short euc_to_utf8_8FC2[] = {
         0x661E, 0x6621, 0x6622, 0x6623, 0x6624, 0x6626, 0x6629,
 0x662A, 0x662B, 0x662C, 0x662E, 0x6630, 0x6631, 0x6633, 0x6639,
 0x6637, 0x6640, 0x6645, 0x6646, 0x664A, 0x664C, 0x6651, 0x664E,
 0x6657, 0x6658, 0x6659, 0x665B, 0x665C, 0x6660, 0x6661, 0x66FB,
 0x666A, 0x666B, 0x666C, 0x667E, 0x6673, 0x6675, 0x667F, 0x6677,
 0x6678, 0x6679, 0x667B, 0x6680, 0x667C, 0x668B, 0x668C, 0x668D,
 0x6690, 0x6692, 0x6699, 0x669A, 0x669B, 0x669C, 0x669F, 0x66A0,
 0x66A4, 0x66AD, 0x66B1, 0x66B2, 0x66B5, 0x66BB, 0x66BF, 0x66C0,
 0x66C2, 0x66C3, 0x66C8, 0x66CC, 0x66CE, 0x66CF, 0x66D4, 0x66DB,
 0x66DF, 0x66E8, 0x66EB, 0x66EC, 0x66EE, 0x66FA, 0x6705, 0x6707,
 0x670E, 0x6713, 0x6719, 0x671C, 0x6720, 0x6722, 0x6733, 0x673E,
 0x6745, 0x6747, 0x6748, 0x674C, 0x6754, 0x6755, 0x675D,
};
const unsigned short euc_to_utf8_8FC3[] = {
         0x6766, 0x676C, 0x676E, 0x6774, 0x6776, 0x677B, 0x6781,
 0x6784, 0x678E, 0x678F, 0x6791, 0x6793, 0x6796, 0x6798, 0x6799,
 0x679B, 0x67B0, 0x67B1, 0x67B2, 0x67B5, 0x67BB, 0x67BC, 0x67BD,
 0x67F9, 0x67C0, 0x67C2, 0x67C3, 0x67C5, 0x67C8, 0x67C9, 0x67D2,
 0x67D7, 0x67D9, 0x67DC, 0x67E1, 0x67E6, 0x67F0, 0x67F2, 0x67F6,
 0x67F7, 0x6852, 0x6814, 0x6819, 0x681D, 0x681F, 0x6828, 0x6827,
 0x682C, 0x682D, 0x682F, 0x6830, 0x6831, 0x6833, 0x683B, 0x683F,
 0x6844, 0x6845, 0x684A, 0x684C, 0x6855, 0x6857, 0x6858, 0x685B,
 0x686B, 0x686E, 0x686F, 0x6870, 0x6871, 0x6872, 0x6875, 0x6879,
 0x687A, 0x687B, 0x687C, 0x6882, 0x6884, 0x6886, 0x6888, 0x6896,
 0x6898, 0x689A, 0x689C, 0x68A1, 0x68A3, 0x68A5, 0x68A9, 0x68AA,
 0x68AE, 0x68B2, 0x68BB, 0x68C5, 0x68C8, 0x68CC, 0x68CF,
};
const unsigned short euc_to_utf8_8FC4[] = {
         0x68D0, 0x68D1, 0x68D3, 0x68D6, 0x68D9, 0x68DC, 0x68DD,
 0x68E5, 0x68E8, 0x68EA, 0x68EB, 0x68EC, 0x68ED, 0x68F0, 0x68F1,
 0x68F5, 0x68F6, 0x68FB, 0x68FC, 0x68FD, 0x6906, 0x6909, 0x690A,
 0x6910, 0x6911, 0x6913, 0x6916, 0x6917, 0x6931, 0x6933, 0x6935,
 0x6938, 0x693B, 0x6942, 0x6945, 0x6949, 0x694E, 0x6957, 0x695B,
 0x6963, 0x6964, 0x6965, 0x6966, 0x6968, 0x6969, 0x696C, 0x6970,
 0x6971, 0x6972, 0x697A, 0x697B, 0x697F, 0x6980, 0x698D, 0x6992,
 0x6996, 0x6998, 0x69A1, 0x69A5, 0x69A6, 0x69A8, 0x69AB, 0x69AD,
 0x69AF, 0x69B7, 0x69B8, 0x69BA, 0x69BC, 0x69C5, 0x69C8, 0x69D1,
 0x69D6, 0x69D7, 0x69E2, 0x69E5, 0x69EE, 0x69EF, 0x69F1, 0x69F3,
 0x69F5, 0x69FE, 0x6A00, 0x6A01, 0x6A03, 0x6A0F, 0x6A11, 0x6A15,
 0x6A1A, 0x6A1D, 0x6A20, 0x6A24, 0x6A28, 0x6A30, 0x6A32,
};
const unsigned short euc_to_utf8_8FC5[] = {
         0x6A34, 0x6A37, 0x6A3B, 0x6A3E, 0x6A3F, 0x6A45, 0x6A46,
 0x6A49, 0x6A4A, 0x6A4E, 0x6A50, 0x6A51, 0x6A52, 0x6A55, 0x6A56,
 0x6A5B, 0x6A64, 0x6A67, 0x6A6A, 0x6A71, 0x6A73, 0x6A7E, 0x6A81,
 0x6A83, 0x6A86, 0x6A87, 0x6A89, 0x6A8B, 0x6A91, 0x6A9B, 0x6A9D,
 0x6A9E, 0x6A9F, 0x6AA5, 0x6AAB, 0x6AAF, 0x6AB0, 0x6AB1, 0x6AB4,
 0x6ABD, 0x6ABE, 0x6ABF, 0x6AC6, 0x6AC9, 0x6AC8, 0x6ACC, 0x6AD0,
 0x6AD4, 0x6AD5, 0x6AD6, 0x6ADC, 0x6ADD, 0x6AE4, 0x6AE7, 0x6AEC,
 0x6AF0, 0x6AF1, 0x6AF2, 0x6AFC, 0x6AFD, 0x6B02, 0x6B03, 0x6B06,
 0x6B07, 0x6B09, 0x6B0F, 0x6B10, 0x6B11, 0x6B17, 0x6B1B, 0x6B1E,
 0x6B24, 0x6B28, 0x6B2B, 0x6B2C, 0x6B2F, 0x6B35, 0x6B36, 0x6B3B,
 0x6B3F, 0x6B46, 0x6B4A, 0x6B4D, 0x6B52, 0x6B56, 0x6B58, 0x6B5D,
 0x6B60, 0x6B67, 0x6B6B, 0x6B6E, 0x6B70, 0x6B75, 0x6B7D,
};
const unsigned short euc_to_utf8_8FC6[] = {
         0x6B7E, 0x6B82, 0x6B85, 0x6B97, 0x6B9B, 0x6B9F, 0x6BA0,
 0x6BA2, 0x6BA3, 0x6BA8, 0x6BA9, 0x6BAC, 0x6BAD, 0x6BAE, 0x6BB0,
 0x6BB8, 0x6BB9, 0x6BBD, 0x6BBE, 0x6BC3, 0x6BC4, 0x6BC9, 0x6BCC,
 0x6BD6, 0x6BDA, 0x6BE1, 0x6BE3, 0x6BE6, 0x6BE7, 0x6BEE, 0x6BF1,
 0x6BF7, 0x6BF9, 0x6BFF, 0x6C02, 0x6C04, 0x6C05, 0x6C09, 0x6C0D,
 0x6C0E, 0x6C10, 0x6C12, 0x6C19, 0x6C1F, 0x6C26, 0x6C27, 0x6C28,
 0x6C2C, 0x6C2E, 0x6C33, 0x6C35, 0x6C36, 0x6C3A, 0x6C3B, 0x6C3F,
 0x6C4A, 0x6C4B, 0x6C4D, 0x6C4F, 0x6C52, 0x6C54, 0x6C59, 0x6C5B,
 0x6C5C, 0x6C6B, 0x6C6D, 0x6C6F, 0x6C74, 0x6C76, 0x6C78, 0x6C79,
 0x6C7B, 0x6C85, 0x6C86, 0x6C87, 0x6C89, 0x6C94, 0x6C95, 0x6C97,
 0x6C98, 0x6C9C, 0x6C9F, 0x6CB0, 0x6CB2, 0x6CB4, 0x6CC2, 0x6CC6,
 0x6CCD, 0x6CCF, 0x6CD0, 0x6CD1, 0x6CD2, 0x6CD4, 0x6CD6,
};
const unsigned short euc_to_utf8_8FC7[] = {
         0x6CDA, 0x6CDC, 0x6CE0, 0x6CE7, 0x6CE9, 0x6CEB, 0x6CEC,
 0x6CEE, 0x6CF2, 0x6CF4, 0x6D04, 0x6D07, 0x6D0A, 0x6D0E, 0x6D0F,
 0x6D11, 0x6D13, 0x6D1A, 0x6D26, 0x6D27, 0x6D28, 0x6C67, 0x6D2E,
 0x6D2F, 0x6D31, 0x6D39, 0x6D3C, 0x6D3F, 0x6D57, 0x6D5E, 0x6D5F,
 0x6D61, 0x6D65, 0x6D67, 0x6D6F, 0x6D70, 0x6D7C, 0x6D82, 0x6D87,
 0x6D91, 0x6D92, 0x6D94, 0x6D96, 0x6D97, 0x6D98, 0x6DAA, 0x6DAC,
 0x6DB4, 0x6DB7, 0x6DB9, 0x6DBD, 0x6DBF, 0x6DC4, 0x6DC8, 0x6DCA,
 0x6DCE, 0x6DCF, 0x6DD6, 0x6DDB, 0x6DDD, 0x6DDF, 0x6DE0, 0x6DE2,
 0x6DE5, 0x6DE9, 0x6DEF, 0x6DF0, 0x6DF4, 0x6DF6, 0x6DFC, 0x6E00,
 0x6E04, 0x6E1E, 0x6E22, 0x6E27, 0x6E32, 0x6E36, 0x6E39, 0x6E3B,
 0x6E3C, 0x6E44, 0x6E45, 0x6E48, 0x6E49, 0x6E4B, 0x6E4F, 0x6E51,
 0x6E52, 0x6E53, 0x6E54, 0x6E57, 0x6E5C, 0x6E5D, 0x6E5E,
};
const unsigned short euc_to_utf8_8FC8[] = {
         0x6E62, 0x6E63, 0x6E68, 0x6E73, 0x6E7B, 0x6E7D, 0x6E8D,
 0x6E93, 0x6E99, 0x6EA0, 0x6EA7, 0x6EAD, 0x6EAE, 0x6EB1, 0x6EB3,
 0x6EBB, 0x6EBF, 0x6EC0, 0x6EC1, 0x6EC3, 0x6EC7, 0x6EC8, 0x6ECA,
 0x6ECD, 0x6ECE, 0x6ECF, 0x6EEB, 0x6EED, 0x6EEE, 0x6EF9, 0x6EFB,
 0x6EFD, 0x6F04, 0x6F08, 0x6F0A, 0x6F0C, 0x6F0D, 0x6F16, 0x6F18,
 0x6F1A, 0x6F1B, 0x6F26, 0x6F29, 0x6F2A, 0x6F2F, 0x6F30, 0x6F33,
 0x6F36, 0x6F3B, 0x6F3C, 0x6F2D, 0x6F4F, 0x6F51, 0x6F52, 0x6F53,
 0x6F57, 0x6F59, 0x6F5A, 0x6F5D, 0x6F5E, 0x6F61, 0x6F62, 0x6F68,
 0x6F6C, 0x6F7D, 0x6F7E, 0x6F83, 0x6F87, 0x6F88, 0x6F8B, 0x6F8C,
 0x6F8D, 0x6F90, 0x6F92, 0x6F93, 0x6F94, 0x6F96, 0x6F9A, 0x6F9F,
 0x6FA0, 0x6FA5, 0x6FA6, 0x6FA7, 0x6FA8, 0x6FAE, 0x6FAF, 0x6FB0,
 0x6FB5, 0x6FB6, 0x6FBC, 0x6FC5, 0x6FC7, 0x6FC8, 0x6FCA,
};
const unsigned short euc_to_utf8_8FC9[] = {
         0x6FDA, 0x6FDE, 0x6FE8, 0x6FE9, 0x6FF0, 0x6FF5, 0x6FF9,
 0x6FFC, 0x6FFD, 0x7000, 0x7005, 0x7006, 0x7007, 0x700D, 0x7017,
 0x7020, 0x7023, 0x702F, 0x7034, 0x7037, 0x7039, 0x703C, 0x7043,
 0x7044, 0x7048, 0x7049, 0x704A, 0x704B, 0x7054, 0x7055, 0x705D,
 0x705E, 0x704E, 0x7064, 0x7065, 0x706C, 0x706E, 0x7075, 0x7076,
 0x707E, 0x7081, 0x7085, 0x7086, 0x7094, 0x7095, 0x7096, 0x7097,
 0x7098, 0x709B, 0x70A4, 0x70AB, 0x70B0, 0x70B1, 0x70B4, 0x70B7,
 0x70CA, 0x70D1, 0x70D3, 0x70D4, 0x70D5, 0x70D6, 0x70D8, 0x70DC,
 0x70E4, 0x70FA, 0x7103, 0x7104, 0x7105, 0x7106, 0x7107, 0x710B,
 0x710C, 0x710F, 0x711E, 0x7120, 0x712B, 0x712D, 0x712F, 0x7130,
 0x7131, 0x7138, 0x7141, 0x7145, 0x7146, 0x7147, 0x714A, 0x714B,
 0x7150, 0x7152, 0x7157, 0x715A, 0x715C, 0x715E, 0x7160,
};
const unsigned short euc_to_utf8_8FCA[] = {
         0x7168, 0x7179, 0x7180, 0x7185, 0x7187, 0x718C, 0x7192,
 0x719A, 0x719B, 0x71A0, 0x71A2, 0x71AF, 0x71B0, 0x71B2, 0x71B3,
 0x71BA, 0x71BF, 0x71C0, 0x71C1, 0x71C4, 0x71CB, 0x71CC, 0x71D3,
 0x71D6, 0x71D9, 0x71DA, 0x71DC, 0x71F8, 0x71FE, 0x7200, 0x7207,
 0x7208, 0x7209, 0x7213, 0x7217, 0x721A, 0x721D, 0x721F, 0x7224,
 0x722B, 0x722F, 0x7234, 0x7238, 0x7239, 0x7241, 0x7242, 0x7243,
 0x7245, 0x724E, 0x724F, 0x7250, 0x7253, 0x7255, 0x7256, 0x725A,
 0x725C, 0x725E, 0x7260, 0x7263, 0x7268, 0x726B, 0x726E, 0x726F,
 0x7271, 0x7277, 0x7278, 0x727B, 0x727C, 0x727F, 0x7284, 0x7289,
 0x728D, 0x728E, 0x7293, 0x729B, 0x72A8, 0x72AD, 0x72AE, 0x72B1,
 0x72B4, 0x72BE, 0x72C1, 0x72C7, 0x72C9, 0x72CC, 0x72D5, 0x72D6,
 0x72D8, 0x72DF, 0x72E5, 0x72F3, 0x72F4, 0x72FA, 0x72FB,
};
const unsigned short euc_to_utf8_8FCB[] = {
         0x72FE, 0x7302, 0x7304, 0x7305, 0x7307, 0x730B, 0x730D,
 0x7312, 0x7313, 0x7318, 0x7319, 0x731E, 0x7322, 0x7324, 0x7327,
 0x7328, 0x732C, 0x7331, 0x7332, 0x7335, 0x733A, 0x733B, 0x733D,
 0x7343, 0x734D, 0x7350, 0x7352, 0x7356, 0x7358, 0x735D, 0x735E,
 0x735F, 0x7360, 0x7366, 0x7367, 0x7369, 0x736B, 0x736C, 0x736E,
 0x736F, 0x7371, 0x7377, 0x7379, 0x737C, 0x7380, 0x7381, 0x7383,
 0x7385, 0x7386, 0x738E, 0x7390, 0x7393, 0x7395, 0x7397, 0x7398,
 0x739C, 0x739E, 0x739F, 0x73A0, 0x73A2, 0x73A5, 0x73A6, 0x73AA,
 0x73AB, 0x73AD, 0x73B5, 0x73B7, 0x73B9, 0x73BC, 0x73BD, 0x73BF,
 0x73C5, 0x73C6, 0x73C9, 0x73CB, 0x73CC, 0x73CF, 0x73D2, 0x73D3,
 0x73D6, 0x73D9, 0x73DD, 0x73E1, 0x73E3, 0x73E6, 0x73E7, 0x73E9,
 0x73F4, 0x73F5, 0x73F7, 0x73F9, 0x73FA, 0x73FB, 0x73FD,
};
const unsigned short euc_to_utf8_8FCC[] = {
         0x73FF, 0x7400, 0x7401, 0x7404, 0x7407, 0x740A, 0x7411,
 0x741A, 0x741B, 0x7424, 0x7426, 0x7428, 0x7429, 0x742A, 0x742B,
 0x742C, 0x742D, 0x742E, 0x742F, 0x7430, 0x7431, 0x7439, 0x7440,
 0x7443, 0x7444, 0x7446, 0x7447, 0x744B, 0x744D, 0x7451, 0x7452,
 0x7457, 0x745D, 0x7462, 0x7466, 0x7467, 0x7468, 0x746B, 0x746D,
 0x746E, 0x7471, 0x7472, 0x7480, 0x7481, 0x7485, 0x7486, 0x7487,
 0x7489, 0x748F, 0x7490, 0x7491, 0x7492, 0x7498, 0x7499, 0x749A,
 0x749C, 0x749F, 0x74A0, 0x74A1, 0x74A3, 0x74A6, 0x74A8, 0x74A9,
 0x74AA, 0x74AB, 0x74AE, 0x74AF, 0x74B1, 0x74B2, 0x74B5, 0x74B9,
 0x74BB, 0x74BF, 0x74C8, 0x74C9, 0x74CC, 0x74D0, 0x74D3, 0x74D8,
 0x74DA, 0x74DB, 0x74DE, 0x74DF, 0x74E4, 0x74E8, 0x74EA, 0x74EB,
 0x74EF, 0x74F4, 0x74FA, 0x74FB, 0x74FC, 0x74FF, 0x7506,
};
const unsigned short euc_to_utf8_8FCD[] = {
         0x7512, 0x7516, 0x7517, 0x7520, 0x7521, 0x7524, 0x7527,
 0x7529, 0x752A, 0x752F, 0x7536, 0x7539, 0x753D, 0x753E, 0x753F,
 0x7540, 0x7543, 0x7547, 0x7548, 0x754E, 0x7550, 0x7552, 0x7557,
 0x755E, 0x755F, 0x7561, 0x756F, 0x7571, 0x7579, 0x757A, 0x757B,
 0x757C, 0x757D, 0x757E, 0x7581, 0x7585, 0x7590, 0x7592, 0x7593,
 0x7595, 0x7599, 0x759C, 0x75A2, 0x75A4, 0x75B4, 0x75BA, 0x75BF,
 0x75C0, 0x75C1, 0x75C4, 0x75C6, 0x75CC, 0x75CE, 0x75CF, 0x75D7,
 0x75DC, 0x75DF, 0x75E0, 0x75E1, 0x75E4, 0x75E7, 0x75EC, 0x75EE,
 0x75EF, 0x75F1, 0x75F9, 0x7600, 0x7602, 0x7603, 0x7604, 0x7607,
 0x7608, 0x760A, 0x760C, 0x760F, 0x7612, 0x7613, 0x7615, 0x7616,
 0x7619, 0x761B, 0x761C, 0x761D, 0x761E, 0x7623, 0x7625, 0x7626,
 0x7629, 0x762D, 0x7632, 0x7633, 0x7635, 0x7638, 0x7639,
};
const unsigned short euc_to_utf8_8FCE[] = {
         0x763A, 0x763C, 0x764A, 0x7640, 0x7641, 0x7643, 0x7644,
 0x7645, 0x7649, 0x764B, 0x7655, 0x7659, 0x765F, 0x7664, 0x7665,
 0x766D, 0x766E, 0x766F, 0x7671, 0x7674, 0x7681, 0x7685, 0x768C,
 0x768D, 0x7695, 0x769B, 0x769C, 0x769D, 0x769F, 0x76A0, 0x76A2,
 0x76A3, 0x76A4, 0x76A5, 0x76A6, 0x76A7, 0x76A8, 0x76AA, 0x76AD,
 0x76BD, 0x76C1, 0x76C5, 0x76C9, 0x76CB, 0x76CC, 0x76CE, 0x76D4,
 0x76D9, 0x76E0, 0x76E6, 0x76E8, 0x76EC, 0x76F0, 0x76F1, 0x76F6,
 0x76F9, 0x76FC, 0x7700, 0x7706, 0x770A, 0x770E, 0x7712, 0x7714,
 0x7715, 0x7717, 0x7719, 0x771A, 0x771C, 0x7722, 0x7728, 0x772D,
 0x772E, 0x772F, 0x7734, 0x7735, 0x7736, 0x7739, 0x773D, 0x773E,
 0x7742, 0x7745, 0x7746, 0x774A, 0x774D, 0x774E, 0x774F, 0x7752,
 0x7756, 0x7757, 0x775C, 0x775E, 0x775F, 0x7760, 0x7762,
};
const unsigned short euc_to_utf8_8FCF[] = {
         0x7764, 0x7767, 0x776A, 0x776C, 0x7770, 0x7772, 0x7773,
 0x7774, 0x777A, 0x777D, 0x7780, 0x7784, 0x778C, 0x778D, 0x7794,
 0x7795, 0x7796, 0x779A, 0x779F, 0x77A2, 0x77A7, 0x77AA, 0x77AE,
 0x77AF, 0x77B1, 0x77B5, 0x77BE, 0x77C3, 0x77C9, 0x77D1, 0x77D2,
 0x77D5, 0x77D9, 0x77DE, 0x77DF, 0x77E0, 0x77E4, 0x77E6, 0x77EA,
 0x77EC, 0x77F0, 0x77F1, 0x77F4, 0x77F8, 0x77FB, 0x7805, 0x7806,
 0x7809, 0x780D, 0x780E, 0x7811, 0x781D, 0x7821, 0x7822, 0x7823,
 0x782D, 0x782E, 0x7830, 0x7835, 0x7837, 0x7843, 0x7844, 0x7847,
 0x7848, 0x784C, 0x784E, 0x7852, 0x785C, 0x785E, 0x7860, 0x7861,
 0x7863, 0x7864, 0x7868, 0x786A, 0x786E, 0x787A, 0x787E, 0x788A,
 0x788F, 0x7894, 0x7898, 0x78A1, 0x789D, 0x789E, 0x789F, 0x78A4,
 0x78A8, 0x78AC, 0x78AD, 0x78B0, 0x78B1, 0x78B2, 0x78B3,
};
const unsigned short euc_to_utf8_8FD0[] = {
         0x78BB, 0x78BD, 0x78BF, 0x78C7, 0x78C8, 0x78C9, 0x78CC,
 0x78CE, 0x78D2, 0x78D3, 0x78D5, 0x78D6, 0x78E4, 0x78DB, 0x78DF,
 0x78E0, 0x78E1, 0x78E6, 0x78EA, 0x78F2, 0x78F3, 0x7900, 0x78F6,
 0x78F7, 0x78FA, 0x78FB, 0x78FF, 0x7906, 0x790C, 0x7910, 0x791A,
 0x791C, 0x791E, 0x791F, 0x7920, 0x7925, 0x7927, 0x7929, 0x792D,
 0x7931, 0x7934, 0x7935, 0x793B, 0x793D, 0x793F, 0x7944, 0x7945,
 0x7946, 0x794A, 0x794B, 0x794F, 0x7951, 0x7954, 0x7958, 0x795B,
 0x795C, 0x7967, 0x7969, 0x796B, 0x7972, 0x7979, 0x797B, 0x797C,
 0x797E, 0x798B, 0x798C, 0x7991, 0x7993, 0x7994, 0x7995, 0x7996,
 0x7998, 0x799B, 0x799C, 0x79A1, 0x79A8, 0x79A9, 0x79AB, 0x79AF,
 0x79B1, 0x79B4, 0x79B8, 0x79BB, 0x79C2, 0x79C4, 0x79C7, 0x79C8,
 0x79CA, 0x79CF, 0x79D4, 0x79D6, 0x79DA, 0x79DD, 0x79DE,
};
const unsigned short euc_to_utf8_8FD1[] = {
         0x79E0, 0x79E2, 0x79E5, 0x79EA, 0x79EB, 0x79ED, 0x79F1,
 0x79F8, 0x79FC, 0x7A02, 0x7A03, 0x7A07, 0x7A09, 0x7A0A, 0x7A0C,
 0x7A11, 0x7A15, 0x7A1B, 0x7A1E, 0x7A21, 0x7A27, 0x7A2B, 0x7A2D,
 0x7A2F, 0x7A30, 0x7A34, 0x7A35, 0x7A38, 0x7A39, 0x7A3A, 0x7A44,
 0x7A45, 0x7A47, 0x7A48, 0x7A4C, 0x7A55, 0x7A56, 0x7A59, 0x7A5C,
 0x7A5D, 0x7A5F, 0x7A60, 0x7A65, 0x7A67, 0x7A6A, 0x7A6D, 0x7A75,
 0x7A78, 0x7A7E, 0x7A80, 0x7A82, 0x7A85, 0x7A86, 0x7A8A, 0x7A8B,
 0x7A90, 0x7A91, 0x7A94, 0x7A9E, 0x7AA0, 0x7AA3, 0x7AAC, 0x7AB3,
 0x7AB5, 0x7AB9, 0x7ABB, 0x7ABC, 0x7AC6, 0x7AC9, 0x7ACC, 0x7ACE,
 0x7AD1, 0x7ADB, 0x7AE8, 0x7AE9, 0x7AEB, 0x7AEC, 0x7AF1, 0x7AF4,
 0x7AFB, 0x7AFD, 0x7AFE, 0x7B07, 0x7B14, 0x7B1F, 0x7B23, 0x7B27,
 0x7B29, 0x7B2A, 0x7B2B, 0x7B2D, 0x7B2E, 0x7B2F, 0x7B30,
};
const unsigned short euc_to_utf8_8FD2[] = {
         0x7B31, 0x7B34, 0x7B3D, 0x7B3F, 0x7B40, 0x7B41, 0x7B47,
 0x7B4E, 0x7B55, 0x7B60, 0x7B64, 0x7B66, 0x7B69, 0x7B6A, 0x7B6D,
 0x7B6F, 0x7B72, 0x7B73, 0x7B77, 0x7B84, 0x7B89, 0x7B8E, 0x7B90,
 0x7B91, 0x7B96, 0x7B9B, 0x7B9E, 0x7BA0, 0x7BA5, 0x7BAC, 0x7BAF,
 0x7BB0, 0x7BB2, 0x7BB5, 0x7BB6, 0x7BBA, 0x7BBB, 0x7BBC, 0x7BBD,
 0x7BC2, 0x7BC5, 0x7BC8, 0x7BCA, 0x7BD4, 0x7BD6, 0x7BD7, 0x7BD9,
 0x7BDA, 0x7BDB, 0x7BE8, 0x7BEA, 0x7BF2, 0x7BF4, 0x7BF5, 0x7BF8,
 0x7BF9, 0x7BFA, 0x7BFC, 0x7BFE, 0x7C01, 0x7C02, 0x7C03, 0x7C04,
 0x7C06, 0x7C09, 0x7C0B, 0x7C0C, 0x7C0E, 0x7C0F, 0x7C19, 0x7C1B,
 0x7C20, 0x7C25, 0x7C26, 0x7C28, 0x7C2C, 0x7C31, 0x7C33, 0x7C34,
 0x7C36, 0x7C39, 0x7C3A, 0x7C46, 0x7C4A, 0x7C55, 0x7C51, 0x7C52,
 0x7C53, 0x7C59, 0x7C5A, 0x7C5B, 0x7C5C, 0x7C5D, 0x7C5E,
};
const unsigned short euc_to_utf8_8FD3[] = {
         0x7C61, 0x7C63, 0x7C67, 0x7C69, 0x7C6D, 0x7C6E, 0x7C70,
 0x7C72, 0x7C79, 0x7C7C, 0x7C7D, 0x7C86, 0x7C87, 0x7C8F, 0x7C94,
 0x7C9E, 0x7CA0, 0x7CA6, 0x7CB0, 0x7CB6, 0x7CB7, 0x7CBA, 0x7CBB,
 0x7CBC, 0x7CBF, 0x7CC4, 0x7CC7, 0x7CC8, 0x7CC9, 0x7CCD, 0x7CCF,
 0x7CD3, 0x7CD4, 0x7CD5, 0x7CD7, 0x7CD9, 0x7CDA, 0x7CDD, 0x7CE6,
 0x7CE9, 0x7CEB, 0x7CF5, 0x7D03, 0x7D07, 0x7D08, 0x7D09, 0x7D0F,
 0x7D11, 0x7D12, 0x7D13, 0x7D16, 0x7D1D, 0x7D1E, 0x7D23, 0x7D26,
 0x7D2A, 0x7D2D, 0x7D31, 0x7D3C, 0x7D3D, 0x7D3E, 0x7D40, 0x7D41,
 0x7D47, 0x7D48, 0x7D4D, 0x7D51, 0x7D53, 0x7D57, 0x7D59, 0x7D5A,
 0x7D5C, 0x7D5D, 0x7D65, 0x7D67, 0x7D6A, 0x7D70, 0x7D78, 0x7D7A,
 0x7D7B, 0x7D7F, 0x7D81, 0x7D82, 0x7D83, 0x7D85, 0x7D86, 0x7D88,
 0x7D8B, 0x7D8C, 0x7D8D, 0x7D91, 0x7D96, 0x7D97, 0x7D9D,
};
const unsigned short euc_to_utf8_8FD4[] = {
         0x7D9E, 0x7DA6, 0x7DA7, 0x7DAA, 0x7DB3, 0x7DB6, 0x7DB7,
 0x7DB9, 0x7DC2, 0x7DC3, 0x7DC4, 0x7DC5, 0x7DC6, 0x7DCC, 0x7DCD,
 0x7DCE, 0x7DD7, 0x7DD9, 0x7E00, 0x7DE2, 0x7DE5, 0x7DE6, 0x7DEA,
 0x7DEB, 0x7DED, 0x7DF1, 0x7DF5, 0x7DF6, 0x7DF9, 0x7DFA, 0x7E08,
 0x7E10, 0x7E11, 0x7E15, 0x7E17, 0x7E1C, 0x7E1D, 0x7E20, 0x7E27,
 0x7E28, 0x7E2C, 0x7E2D, 0x7E2F, 0x7E33, 0x7E36, 0x7E3F, 0x7E44,
 0x7E45, 0x7E47, 0x7E4E, 0x7E50, 0x7E52, 0x7E58, 0x7E5F, 0x7E61,
 0x7E62, 0x7E65, 0x7E6B, 0x7E6E, 0x7E6F, 0x7E73, 0x7E78, 0x7E7E,
 0x7E81, 0x7E86, 0x7E87, 0x7E8A, 0x7E8D, 0x7E91, 0x7E95, 0x7E98,
 0x7E9A, 0x7E9D, 0x7E9E, 0x7F3C, 0x7F3B, 0x7F3D, 0x7F3E, 0x7F3F,
 0x7F43, 0x7F44, 0x7F47, 0x7F4F, 0x7F52, 0x7F53, 0x7F5B, 0x7F5C,
 0x7F5D, 0x7F61, 0x7F63, 0x7F64, 0x7F65, 0x7F66, 0x7F6D,
};
const unsigned short euc_to_utf8_8FD5[] = {
         0x7F71, 0x7F7D, 0x7F7E, 0x7F7F, 0x7F80, 0x7F8B, 0x7F8D,
 0x7F8F, 0x7F90, 0x7F91, 0x7F96, 0x7F97, 0x7F9C, 0x7FA1, 0x7FA2,
 0x7FA6, 0x7FAA, 0x7FAD, 0x7FB4, 0x7FBC, 0x7FBF, 0x7FC0, 0x7FC3,
 0x7FC8, 0x7FCE, 0x7FCF, 0x7FDB, 0x7FDF, 0x7FE3, 0x7FE5, 0x7FE8,
 0x7FEC, 0x7FEE, 0x7FEF, 0x7FF2, 0x7FFA, 0x7FFD, 0x7FFE, 0x7FFF,
 0x8007, 0x8008, 0x800A, 0x800D, 0x800E, 0x800F, 0x8011, 0x8013,
 0x8014, 0x8016, 0x801D, 0x801E, 0x801F, 0x8020, 0x8024, 0x8026,
 0x802C, 0x802E, 0x8030, 0x8034, 0x8035, 0x8037, 0x8039, 0x803A,
 0x803C, 0x803E, 0x8040, 0x8044, 0x8060, 0x8064, 0x8066, 0x806D,
 0x8071, 0x8075, 0x8081, 0x8088, 0x808E, 0x809C, 0x809E, 0x80A6,
 0x80A7, 0x80AB, 0x80B8, 0x80B9, 0x80C8, 0x80CD, 0x80CF, 0x80D2,
 0x80D4, 0x80D5, 0x80D7, 0x80D8, 0x80E0, 0x80ED, 0x80EE,
};
const unsigned short euc_to_utf8_8FD6[] = {
         0x80F0, 0x80F2, 0x80F3, 0x80F6, 0x80F9, 0x80FA, 0x80FE,
 0x8103, 0x810B, 0x8116, 0x8117, 0x8118, 0x811C, 0x811E, 0x8120,
 0x8124, 0x8127, 0x812C, 0x8130, 0x8135, 0x813A, 0x813C, 0x8145,
 0x8147, 0x814A, 0x814C, 0x8152, 0x8157, 0x8160, 0x8161, 0x8167,
 0x8168, 0x8169, 0x816D, 0x816F, 0x8177, 0x8181, 0x8190, 0x8184,
 0x8185, 0x8186, 0x818B, 0x818E, 0x8196, 0x8198, 0x819B, 0x819E,
 0x81A2, 0x81AE, 0x81B2, 0x81B4, 0x81BB, 0x81CB, 0x81C3, 0x81C5,
 0x81CA, 0x81CE, 0x81CF, 0x81D5, 0x81D7, 0x81DB, 0x81DD, 0x81DE,
 0x81E1, 0x81E4, 0x81EB, 0x81EC, 0x81F0, 0x81F1, 0x81F2, 0x81F5,
 0x81F6, 0x81F8, 0x81F9, 0x81FD, 0x81FF, 0x8200, 0x8203, 0x820F,
 0x8213, 0x8214, 0x8219, 0x821A, 0x821D, 0x8221, 0x8222, 0x8228,
 0x8232, 0x8234, 0x823A, 0x8243, 0x8244, 0x8245, 0x8246,
};
const unsigned short euc_to_utf8_8FD7[] = {
         0x824B, 0x824E, 0x824F, 0x8251, 0x8256, 0x825C, 0x8260,
 0x8263, 0x8267, 0x826D, 0x8274, 0x827B, 0x827D, 0x827F, 0x8280,
 0x8281, 0x8283, 0x8284, 0x8287, 0x8289, 0x828A, 0x828E, 0x8291,
 0x8294, 0x8296, 0x8298, 0x829A, 0x829B, 0x82A0, 0x82A1, 0x82A3,
 0x82A4, 0x82A7, 0x82A8, 0x82A9, 0x82AA, 0x82AE, 0x82B0, 0x82B2,
 0x82B4, 0x82B7, 0x82BA, 0x82BC, 0x82BE, 0x82BF, 0x82C6, 0x82D0,
 0x82D5, 0x82DA, 0x82E0, 0x82E2, 0x82E4, 0x82E8, 0x82EA, 0x82ED,
 0x82EF, 0x82F6, 0x82F7, 0x82FD, 0x82FE, 0x8300, 0x8301, 0x8307,
 0x8308, 0x830A, 0x830B, 0x8354, 0x831B, 0x831D, 0x831E, 0x831F,
 0x8321, 0x8322, 0x832C, 0x832D, 0x832E, 0x8330, 0x8333, 0x8337,
 0x833A, 0x833C, 0x833D, 0x8342, 0x8343, 0x8344, 0x8347, 0x834D,
 0x834E, 0x8351, 0x8355, 0x8356, 0x8357, 0x8370, 0x8378,
};
const unsigned short euc_to_utf8_8FD8[] = {
         0x837D, 0x837F, 0x8380, 0x8382, 0x8384, 0x8386, 0x838D,
 0x8392, 0x8394, 0x8395, 0x8398, 0x8399, 0x839B, 0x839C, 0x839D,
 0x83A6, 0x83A7, 0x83A9, 0x83AC, 0x83BE, 0x83BF, 0x83C0, 0x83C7,
 0x83C9, 0x83CF, 0x83D0, 0x83D1, 0x83D4, 0x83DD, 0x8353, 0x83E8,
 0x83EA, 0x83F6, 0x83F8, 0x83F9, 0x83FC, 0x8401, 0x8406, 0x840A,
 0x840F, 0x8411, 0x8415, 0x8419, 0x83AD, 0x842F, 0x8439, 0x8445,
 0x8447, 0x8448, 0x844A, 0x844D, 0x844F, 0x8451, 0x8452, 0x8456,
 0x8458, 0x8459, 0x845A, 0x845C, 0x8460, 0x8464, 0x8465, 0x8467,
 0x846A, 0x8470, 0x8473, 0x8474, 0x8476, 0x8478, 0x847C, 0x847D,
 0x8481, 0x8485, 0x8492, 0x8493, 0x8495, 0x849E, 0x84A6, 0x84A8,
 0x84A9, 0x84AA, 0x84AF, 0x84B1, 0x84B4, 0x84BA, 0x84BD, 0x84BE,
 0x84C0, 0x84C2, 0x84C7, 0x84C8, 0x84CC, 0x84CF, 0x84D3,
};
const unsigned short euc_to_utf8_8FD9[] = {
         0x84DC, 0x84E7, 0x84EA, 0x84EF, 0x84F0, 0x84F1, 0x84F2,
 0x84F7, 0x8532, 0x84FA, 0x84FB, 0x84FD, 0x8502, 0x8503, 0x8507,
 0x850C, 0x850E, 0x8510, 0x851C, 0x851E, 0x8522, 0x8523, 0x8524,
 0x8525, 0x8527, 0x852A, 0x852B, 0x852F, 0x8533, 0x8534, 0x8536,
 0x853F, 0x8546, 0x854F, 0x8550, 0x8551, 0x8552, 0x8553, 0x8556,
 0x8559, 0x855C, 0x855D, 0x855E, 0x855F, 0x8560, 0x8561, 0x8562,
 0x8564, 0x856B, 0x856F, 0x8579, 0x857A, 0x857B, 0x857D, 0x857F,
 0x8581, 0x8585, 0x8586, 0x8589, 0x858B, 0x858C, 0x858F, 0x8593,
 0x8598, 0x859D, 0x859F, 0x85A0, 0x85A2, 0x85A5, 0x85A7, 0x85B4,
 0x85B6, 0x85B7, 0x85B8, 0x85BC, 0x85BD, 0x85BE, 0x85BF, 0x85C2,
 0x85C7, 0x85CA, 0x85CB, 0x85CE, 0x85AD, 0x85D8, 0x85DA, 0x85DF,
 0x85E0, 0x85E6, 0x85E8, 0x85ED, 0x85F3, 0x85F6, 0x85FC,
};
const unsigned short euc_to_utf8_8FDA[] = {
         0x85FF, 0x8600, 0x8604, 0x8605, 0x860D, 0x860E, 0x8610,
 0x8611, 0x8612, 0x8618, 0x8619, 0x861B, 0x861E, 0x8621, 0x8627,
 0x8629, 0x8636, 0x8638, 0x863A, 0x863C, 0x863D, 0x8640, 0x8642,
 0x8646, 0x8652, 0x8653, 0x8656, 0x8657, 0x8658, 0x8659, 0x865D,
 0x8660, 0x8661, 0x8662, 0x8663, 0x8664, 0x8669, 0x866C, 0x866F,
 0x8675, 0x8676, 0x8677, 0x867A, 0x868D, 0x8691, 0x8696, 0x8698,
 0x869A, 0x869C, 0x86A1, 0x86A6, 0x86A7, 0x86A8, 0x86AD, 0x86B1,
 0x86B3, 0x86B4, 0x86B5, 0x86B7, 0x86B8, 0x86B9, 0x86BF, 0x86C0,
 0x86C1, 0x86C3, 0x86C5, 0x86D1, 0x86D2, 0x86D5, 0x86D7, 0x86DA,
 0x86DC, 0x86E0, 0x86E3, 0x86E5, 0x86E7, 0x8688, 0x86FA, 0x86FC,
 0x86FD, 0x8704, 0x8705, 0x8707, 0x870B, 0x870E, 0x870F, 0x8710,
 0x8713, 0x8714, 0x8719, 0x871E, 0x871F, 0x8721, 0x8723,
};
const unsigned short euc_to_utf8_8FDB[] = {
         0x8728, 0x872E, 0x872F, 0x8731, 0x8732, 0x8739, 0x873A,
 0x873C, 0x873D, 0x873E, 0x8740, 0x8743, 0x8745, 0x874D, 0x8758,
 0x875D, 0x8761, 0x8764, 0x8765, 0x876F, 0x8771, 0x8772, 0x877B,
 0x8783, 0x8784, 0x8785, 0x8786, 0x8787, 0x8788, 0x8789, 0x878B,
 0x878C, 0x8790, 0x8793, 0x8795, 0x8797, 0x8798, 0x8799, 0x879E,
 0x87A0, 0x87A3, 0x87A7, 0x87AC, 0x87AD, 0x87AE, 0x87B1, 0x87B5,
 0x87BE, 0x87BF, 0x87C1, 0x87C8, 0x87C9, 0x87CA, 0x87CE, 0x87D5,
 0x87D6, 0x87D9, 0x87DA, 0x87DC, 0x87DF, 0x87E2, 0x87E3, 0x87E4,
 0x87EA, 0x87EB, 0x87ED, 0x87F1, 0x87F3, 0x87F8, 0x87FA, 0x87FF,
 0x8801, 0x8803, 0x8806, 0x8809, 0x880A, 0x880B, 0x8810, 0x8819,
 0x8812, 0x8813, 0x8814, 0x8818, 0x881A, 0x881B, 0x881C, 0x881E,
 0x881F, 0x8828, 0x882D, 0x882E, 0x8830, 0x8832, 0x8835,
};
const unsigned short euc_to_utf8_8FDC[] = {
         0x883A, 0x883C, 0x8841, 0x8843, 0x8845, 0x8848, 0x8849,
 0x884A, 0x884B, 0x884E, 0x8851, 0x8855, 0x8856, 0x8858, 0x885A,
 0x885C, 0x885F, 0x8860, 0x8864, 0x8869, 0x8871, 0x8879, 0x887B,
 0x8880, 0x8898, 0x889A, 0x889B, 0x889C, 0x889F, 0x88A0, 0x88A8,
 0x88AA, 0x88BA, 0x88BD, 0x88BE, 0x88C0, 0x88CA, 0x88CB, 0x88CC,
 0x88CD, 0x88CE, 0x88D1, 0x88D2, 0x88D3, 0x88DB, 0x88DE, 0x88E7,
 0x88EF, 0x88F0, 0x88F1, 0x88F5, 0x88F7, 0x8901, 0x8906, 0x890D,
 0x890E, 0x890F, 0x8915, 0x8916, 0x8918, 0x8919, 0x891A, 0x891C,
 0x8920, 0x8926, 0x8927, 0x8928, 0x8930, 0x8931, 0x8932, 0x8935,
 0x8939, 0x893A, 0x893E, 0x8940, 0x8942, 0x8945, 0x8946, 0x8949,
 0x894F, 0x8952, 0x8957, 0x895A, 0x895B, 0x895C, 0x8961, 0x8962,
 0x8963, 0x896B, 0x896E, 0x8970, 0x8973, 0x8975, 0x897A,
};
const unsigned short euc_to_utf8_8FDD[] = {
         0x897B, 0x897C, 0x897D, 0x8989, 0x898D, 0x8990, 0x8994,
 0x8995, 0x899B, 0x899C, 0x899F, 0x89A0, 0x89A5, 0x89B0, 0x89B4,
 0x89B5, 0x89B6, 0x89B7, 0x89BC, 0x89D4, 0x89D5, 0x89D6, 0x89D7,
 0x89D8, 0x89E5, 0x89E9, 0x89EB, 0x89ED, 0x89F1, 0x89F3, 0x89F6,
 0x89F9, 0x89FD, 0x89FF, 0x8A04, 0x8A05, 0x8A07, 0x8A0F, 0x8A11,
 0x8A12, 0x8A14, 0x8A15, 0x8A1E, 0x8A20, 0x8A22, 0x8A24, 0x8A26,
 0x8A2B, 0x8A2C, 0x8A2F, 0x8A35, 0x8A37, 0x8A3D, 0x8A3E, 0x8A40,
 0x8A43, 0x8A45, 0x8A47, 0x8A49, 0x8A4D, 0x8A4E, 0x8A53, 0x8A56,
 0x8A57, 0x8A58, 0x8A5C, 0x8A5D, 0x8A61, 0x8A65, 0x8A67, 0x8A75,
 0x8A76, 0x8A77, 0x8A79, 0x8A7A, 0x8A7B, 0x8A7E, 0x8A7F, 0x8A80,
 0x8A83, 0x8A86, 0x8A8B, 0x8A8F, 0x8A90, 0x8A92, 0x8A96, 0x8A97,
 0x8A99, 0x8A9F, 0x8AA7, 0x8AA9, 0x8AAE, 0x8AAF, 0x8AB3,
};
const unsigned short euc_to_utf8_8FDE[] = {
         0x8AB6, 0x8AB7, 0x8ABB, 0x8ABE, 0x8AC3, 0x8AC6, 0x8AC8,
 0x8AC9, 0x8ACA, 0x8AD1, 0x8AD3, 0x8AD4, 0x8AD5, 0x8AD7, 0x8ADD,
 0x8ADF, 0x8AEC, 0x8AF0, 0x8AF4, 0x8AF5, 0x8AF6, 0x8AFC, 0x8AFF,
 0x8B05, 0x8B06, 0x8B0B, 0x8B11, 0x8B1C, 0x8B1E, 0x8B1F, 0x8B0A,
 0x8B2D, 0x8B30, 0x8B37, 0x8B3C, 0x8B42, 0x8B43, 0x8B44, 0x8B45,
 0x8B46, 0x8B48, 0x8B52, 0x8B53, 0x8B54, 0x8B59, 0x8B4D, 0x8B5E,
 0x8B63, 0x8B6D, 0x8B76, 0x8B78, 0x8B79, 0x8B7C, 0x8B7E, 0x8B81,
 0x8B84, 0x8B85, 0x8B8B, 0x8B8D, 0x8B8F, 0x8B94, 0x8B95, 0x8B9C,
 0x8B9E, 0x8B9F, 0x8C38, 0x8C39, 0x8C3D, 0x8C3E, 0x8C45, 0x8C47,
 0x8C49, 0x8C4B, 0x8C4F, 0x8C51, 0x8C53, 0x8C54, 0x8C57, 0x8C58,
 0x8C5B, 0x8C5D, 0x8C59, 0x8C63, 0x8C64, 0x8C66, 0x8C68, 0x8C69,
 0x8C6D, 0x8C73, 0x8C75, 0x8C76, 0x8C7B, 0x8C7E, 0x8C86,
};
const unsigned short euc_to_utf8_8FDF[] = {
         0x8C87, 0x8C8B, 0x8C90, 0x8C92, 0x8C93, 0x8C99, 0x8C9B,
 0x8C9C, 0x8CA4, 0x8CB9, 0x8CBA, 0x8CC5, 0x8CC6, 0x8CC9, 0x8CCB,
 0x8CCF, 0x8CD6, 0x8CD5, 0x8CD9, 0x8CDD, 0x8CE1, 0x8CE8, 0x8CEC,
 0x8CEF, 0x8CF0, 0x8CF2, 0x8CF5, 0x8CF7, 0x8CF8, 0x8CFE, 0x8CFF,
 0x8D01, 0x8D03, 0x8D09, 0x8D12, 0x8D17, 0x8D1B, 0x8D65, 0x8D69,
 0x8D6C, 0x8D6E, 0x8D7F, 0x8D82, 0x8D84, 0x8D88, 0x8D8D, 0x8D90,
 0x8D91, 0x8D95, 0x8D9E, 0x8D9F, 0x8DA0, 0x8DA6, 0x8DAB, 0x8DAC,
 0x8DAF, 0x8DB2, 0x8DB5, 0x8DB7, 0x8DB9, 0x8DBB, 0x8DC0, 0x8DC5,
 0x8DC6, 0x8DC7, 0x8DC8, 0x8DCA, 0x8DCE, 0x8DD1, 0x8DD4, 0x8DD5,
 0x8DD7, 0x8DD9, 0x8DE4, 0x8DE5, 0x8DE7, 0x8DEC, 0x8DF0, 0x8DBC,
 0x8DF1, 0x8DF2, 0x8DF4, 0x8DFD, 0x8E01, 0x8E04, 0x8E05, 0x8E06,
 0x8E0B, 0x8E11, 0x8E14, 0x8E16, 0x8E20, 0x8E21, 0x8E22,
};
const unsigned short euc_to_utf8_8FE0[] = {
         0x8E23, 0x8E26, 0x8E27, 0x8E31, 0x8E33, 0x8E36, 0x8E37,
 0x8E38, 0x8E39, 0x8E3D, 0x8E40, 0x8E41, 0x8E4B, 0x8E4D, 0x8E4E,
 0x8E4F, 0x8E54, 0x8E5B, 0x8E5C, 0x8E5D, 0x8E5E, 0x8E61, 0x8E62,
 0x8E69, 0x8E6C, 0x8E6D, 0x8E6F, 0x8E70, 0x8E71, 0x8E79, 0x8E7A,
 0x8E7B, 0x8E82, 0x8E83, 0x8E89, 0x8E90, 0x8E92, 0x8E95, 0x8E9A,
 0x8E9B, 0x8E9D, 0x8E9E, 0x8EA2, 0x8EA7, 0x8EA9, 0x8EAD, 0x8EAE,
 0x8EB3, 0x8EB5, 0x8EBA, 0x8EBB, 0x8EC0, 0x8EC1, 0x8EC3, 0x8EC4,
 0x8EC7, 0x8ECF, 0x8ED1, 0x8ED4, 0x8EDC, 0x8EE8, 0x8EEE, 0x8EF0,
 0x8EF1, 0x8EF7, 0x8EF9, 0x8EFA, 0x8EED, 0x8F00, 0x8F02, 0x8F07,
 0x8F08, 0x8F0F, 0x8F10, 0x8F16, 0x8F17, 0x8F18, 0x8F1E, 0x8F20,
 0x8F21, 0x8F23, 0x8F25, 0x8F27, 0x8F28, 0x8F2C, 0x8F2D, 0x8F2E,
 0x8F34, 0x8F35, 0x8F36, 0x8F37, 0x8F3A, 0x8F40, 0x8F41,
};
const unsigned short euc_to_utf8_8FE1[] = {
         0x8F43, 0x8F47, 0x8F4F, 0x8F51, 0x8F52, 0x8F53, 0x8F54,
 0x8F55, 0x8F58, 0x8F5D, 0x8F5E, 0x8F65, 0x8F9D, 0x8FA0, 0x8FA1,
 0x8FA4, 0x8FA5, 0x8FA6, 0x8FB5, 0x8FB6, 0x8FB8, 0x8FBE, 0x8FC0,
 0x8FC1, 0x8FC6, 0x8FCA, 0x8FCB, 0x8FCD, 0x8FD0, 0x8FD2, 0x8FD3,
 0x8FD5, 0x8FE0, 0x8FE3, 0x8FE4, 0x8FE8, 0x8FEE, 0x8FF1, 0x8FF5,
 0x8FF6, 0x8FFB, 0x8FFE, 0x9002, 0x9004, 0x9008, 0x900C, 0x9018,
 0x901B, 0x9028, 0x9029, 0x902F, 0x902A, 0x902C, 0x902D, 0x9033,
 0x9034, 0x9037, 0x903F, 0x9043, 0x9044, 0x904C, 0x905B, 0x905D,
 0x9062, 0x9066, 0x9067, 0x906C, 0x9070, 0x9074, 0x9079, 0x9085,
 0x9088, 0x908B, 0x908C, 0x908E, 0x9090, 0x9095, 0x9097, 0x9098,
 0x9099, 0x909B, 0x90A0, 0x90A1, 0x90A2, 0x90A5, 0x90B0, 0x90B2,
 0x90B3, 0x90B4, 0x90B6, 0x90BD, 0x90CC, 0x90BE, 0x90C3,
};
const unsigned short euc_to_utf8_8FE2[] = {
         0x90C4, 0x90C5, 0x90C7, 0x90C8, 0x90D5, 0x90D7, 0x90D8,
 0x90D9, 0x90DC, 0x90DD, 0x90DF, 0x90E5, 0x90D2, 0x90F6, 0x90EB,
 0x90EF, 0x90F0, 0x90F4, 0x90FE, 0x90FF, 0x9100, 0x9104, 0x9105,
 0x9106, 0x9108, 0x910D, 0x9110, 0x9114, 0x9116, 0x9117, 0x9118,
 0x911A, 0x911C, 0x911E, 0x9120, 0x9125, 0x9122, 0x9123, 0x9127,
 0x9129, 0x912E, 0x912F, 0x9131, 0x9134, 0x9136, 0x9137, 0x9139,
 0x913A, 0x913C, 0x913D, 0x9143, 0x9147, 0x9148, 0x914F, 0x9153,
 0x9157, 0x9159, 0x915A, 0x915B, 0x9161, 0x9164, 0x9167, 0x916D,
 0x9174, 0x9179, 0x917A, 0x917B, 0x9181, 0x9183, 0x9185, 0x9186,
 0x918A, 0x918E, 0x9191, 0x9193, 0x9194, 0x9195, 0x9198, 0x919E,
 0x91A1, 0x91A6, 0x91A8, 0x91AC, 0x91AD, 0x91AE, 0x91B0, 0x91B1,
 0x91B2, 0x91B3, 0x91B6, 0x91BB, 0x91BC, 0x91BD, 0x91BF,
};
const unsigned short euc_to_utf8_8FE3[] = {
         0x91C2, 0x91C3, 0x91C5, 0x91D3, 0x91D4, 0x91D7, 0x91D9,
 0x91DA, 0x91DE, 0x91E4, 0x91E5, 0x91E9, 0x91EA, 0x91EC, 0x91ED,
 0x91EE, 0x91EF, 0x91F0, 0x91F1, 0x91F7, 0x91F9, 0x91FB, 0x91FD,
 0x9200, 0x9201, 0x9204, 0x9205, 0x9206, 0x9207, 0x9209, 0x920A,
 0x920C, 0x9210, 0x9212, 0x9213, 0x9216, 0x9218, 0x921C, 0x921D,
 0x9223, 0x9224, 0x9225, 0x9226, 0x9228, 0x922E, 0x922F, 0x9230,
 0x9233, 0x9235, 0x9236, 0x9238, 0x9239, 0x923A, 0x923C, 0x923E,
 0x9240, 0x9242, 0x9243, 0x9246, 0x9247, 0x924A, 0x924D, 0x924E,
 0x924F, 0x9251, 0x9258, 0x9259, 0x925C, 0x925D, 0x9260, 0x9261,
 0x9265, 0x9267, 0x9268, 0x9269, 0x926E, 0x926F, 0x9270, 0x9275,
 0x9276, 0x9277, 0x9278, 0x9279, 0x927B, 0x927C, 0x927D, 0x927F,
 0x9288, 0x9289, 0x928A, 0x928D, 0x928E, 0x9292, 0x9297,
};
const unsigned short euc_to_utf8_8FE4[] = {
         0x9299, 0x929F, 0x92A0, 0x92A4, 0x92A5, 0x92A7, 0x92A8,
 0x92AB, 0x92AF, 0x92B2, 0x92B6, 0x92B8, 0x92BA, 0x92BB, 0x92BC,
 0x92BD, 0x92BF, 0x92C0, 0x92C1, 0x92C2, 0x92C3, 0x92C5, 0x92C6,
 0x92C7, 0x92C8, 0x92CB, 0x92CC, 0x92CD, 0x92CE, 0x92D0, 0x92D3,
 0x92D5, 0x92D7, 0x92D8, 0x92D9, 0x92DC, 0x92DD, 0x92DF, 0x92E0,
 0x92E1, 0x92E3, 0x92E5, 0x92E7, 0x92E8, 0x92EC, 0x92EE, 0x92F0,
 0x92F9, 0x92FB, 0x92FF, 0x9300, 0x9302, 0x9308, 0x930D, 0x9311,
 0x9314, 0x9315, 0x931C, 0x931D, 0x931E, 0x931F, 0x9321, 0x9324,
 0x9325, 0x9327, 0x9329, 0x932A, 0x9333, 0x9334, 0x9336, 0x9337,
 0x9347, 0x9348, 0x9349, 0x9350, 0x9351, 0x9352, 0x9355, 0x9357,
 0x9358, 0x935A, 0x935E, 0x9364, 0x9365, 0x9367, 0x9369, 0x936A,
 0x936D, 0x936F, 0x9370, 0x9371, 0x9373, 0x9374, 0x9376,
};
const unsigned short euc_to_utf8_8FE5[] = {
         0x937A, 0x937D, 0x937F, 0x9380, 0x9381, 0x9382, 0x9388,
 0x938A, 0x938B, 0x938D, 0x938F, 0x9392, 0x9395, 0x9398, 0x939B,
 0x939E, 0x93A1, 0x93A3, 0x93A4, 0x93A6, 0x93A8, 0x93AB, 0x93B4,
 0x93B5, 0x93B6, 0x93BA, 0x93A9, 0x93C1, 0x93C4, 0x93C5, 0x93C6,
 0x93C7, 0x93C9, 0x93CA, 0x93CB, 0x93CC, 0x93CD, 0x93D3, 0x93D9,
 0x93DC, 0x93DE, 0x93DF, 0x93E2, 0x93E6, 0x93E7, 0x93F9, 0x93F7,
 0x93F8, 0x93FA, 0x93FB, 0x93FD, 0x9401, 0x9402, 0x9404, 0x9408,
 0x9409, 0x940D, 0x940E, 0x940F, 0x9415, 0x9416, 0x9417, 0x941F,
 0x942E, 0x942F, 0x9431, 0x9432, 0x9433, 0x9434, 0x943B, 0x943F,
 0x943D, 0x9443, 0x9445, 0x9448, 0x944A, 0x944C, 0x9455, 0x9459,
 0x945C, 0x945F, 0x9461, 0x9463, 0x9468, 0x946B, 0x946D, 0x946E,
 0x946F, 0x9471, 0x9472, 0x9484, 0x9483, 0x9578, 0x9579,
};
const unsigned short euc_to_utf8_8FE6[] = {
         0x957E, 0x9584, 0x9588, 0x958C, 0x958D, 0x958E, 0x959D,
 0x959E, 0x959F, 0x95A1, 0x95A6, 0x95A9, 0x95AB, 0x95AC, 0x95B4,
 0x95B6, 0x95BA, 0x95BD, 0x95BF, 0x95C6, 0x95C8, 0x95C9, 0x95CB,
 0x95D0, 0x95D1, 0x95D2, 0x95D3, 0x95D9, 0x95DA, 0x95DD, 0x95DE,
 0x95DF, 0x95E0, 0x95E4, 0x95E6, 0x961D, 0x961E, 0x9622, 0x9624,
 0x9625, 0x9626, 0x962C, 0x9631, 0x9633, 0x9637, 0x9638, 0x9639,
 0x963A, 0x963C, 0x963D, 0x9641, 0x9652, 0x9654, 0x9656, 0x9657,
 0x9658, 0x9661, 0x966E, 0x9674, 0x967B, 0x967C, 0x967E, 0x967F,
 0x9681, 0x9682, 0x9683, 0x9684, 0x9689, 0x9691, 0x9696, 0x969A,
 0x969D, 0x969F, 0x96A4, 0x96A5, 0x96A6, 0x96A9, 0x96AE, 0x96AF,
 0x96B3, 0x96BA, 0x96CA, 0x96D2, 0x5DB2, 0x96D8, 0x96DA, 0x96DD,
 0x96DE, 0x96DF, 0x96E9, 0x96EF, 0x96F1, 0x96FA, 0x9702,
};
const unsigned short euc_to_utf8_8FE7[] = {
         0x9703, 0x9705, 0x9709, 0x971A, 0x971B, 0x971D, 0x9721,
 0x9722, 0x9723, 0x9728, 0x9731, 0x9733, 0x9741, 0x9743, 0x974A,
 0x974E, 0x974F, 0x9755, 0x9757, 0x9758, 0x975A, 0x975B, 0x9763,
 0x9767, 0x976A, 0x976E, 0x9773, 0x9776, 0x9777, 0x9778, 0x977B,
 0x977D, 0x977F, 0x9780, 0x9789, 0x9795, 0x9796, 0x9797, 0x9799,
 0x979A, 0x979E, 0x979F, 0x97A2, 0x97AC, 0x97AE, 0x97B1, 0x97B2,
 0x97B5, 0x97B6, 0x97B8, 0x97B9, 0x97BA, 0x97BC, 0x97BE, 0x97BF,
 0x97C1, 0x97C4, 0x97C5, 0x97C7, 0x97C9, 0x97CA, 0x97CC, 0x97CD,
 0x97CE, 0x97D0, 0x97D1, 0x97D4, 0x97D7, 0x97D8, 0x97D9, 0x97DD,
 0x97DE, 0x97E0, 0x97DB, 0x97E1, 0x97E4, 0x97EF, 0x97F1, 0x97F4,
 0x97F7, 0x97F8, 0x97FA, 0x9807, 0x980A, 0x9819, 0x980D, 0x980E,
 0x9814, 0x9816, 0x981C, 0x981E, 0x9820, 0x9823, 0x9826,
};
const unsigned short euc_to_utf8_8FE8[] = {
         0x982B, 0x982E, 0x982F, 0x9830, 0x9832, 0x9833, 0x9835,
 0x9825, 0x983E, 0x9844, 0x9847, 0x984A, 0x9851, 0x9852, 0x9853,
 0x9856, 0x9857, 0x9859, 0x985A, 0x9862, 0x9863, 0x9865, 0x9866,
 0x986A, 0x986C, 0x98AB, 0x98AD, 0x98AE, 0x98B0, 0x98B4, 0x98B7,
 0x98B8, 0x98BA, 0x98BB, 0x98BF, 0x98C2, 0x98C5, 0x98C8, 0x98CC,
 0x98E1, 0x98E3, 0x98E5, 0x98E6, 0x98E7, 0x98EA, 0x98F3, 0x98F6,
 0x9902, 0x9907, 0x9908, 0x9911, 0x9915, 0x9916, 0x9917, 0x991A,
 0x991B, 0x991C, 0x991F, 0x9922, 0x9926, 0x9927, 0x992B, 0x9931,
 0x9932, 0x9933, 0x9934, 0x9935, 0x9939, 0x993A, 0x993B, 0x993C,
 0x9940, 0x9941, 0x9946, 0x9947, 0x9948, 0x994D, 0x994E, 0x9954,
 0x9958, 0x9959, 0x995B, 0x995C, 0x995E, 0x995F, 0x9960, 0x999B,
 0x999D, 0x999F, 0x99A6, 0x99B0, 0x99B1, 0x99B2, 0x99B5,
};
const unsigned short euc_to_utf8_8FE9[] = {
         0x99B9, 0x99BA, 0x99BD, 0x99BF, 0x99C3, 0x99C9, 0x99D3,
 0x99D4, 0x99D9, 0x99DA, 0x99DC, 0x99DE, 0x99E7, 0x99EA, 0x99EB,
 0x99EC, 0x99F0, 0x99F4, 0x99F5, 0x99F9, 0x99FD, 0x99FE, 0x9A02,
 0x9A03, 0x9A04, 0x9A0B, 0x9A0C, 0x9A10, 0x9A11, 0x9A16, 0x9A1E,
 0x9A20, 0x9A22, 0x9A23, 0x9A24, 0x9A27, 0x9A2D, 0x9A2E, 0x9A33,
 0x9A35, 0x9A36, 0x9A38, 0x9A47, 0x9A41, 0x9A44, 0x9A4A, 0x9A4B,
 0x9A4C, 0x9A4E, 0x9A51, 0x9A54, 0x9A56, 0x9A5D, 0x9AAA, 0x9AAC,
 0x9AAE, 0x9AAF, 0x9AB2, 0x9AB4, 0x9AB5, 0x9AB6, 0x9AB9, 0x9ABB,
 0x9ABE, 0x9ABF, 0x9AC1, 0x9AC3, 0x9AC6, 0x9AC8, 0x9ACE, 0x9AD0,
 0x9AD2, 0x9AD5, 0x9AD6, 0x9AD7, 0x9ADB, 0x9ADC, 0x9AE0, 0x9AE4,
 0x9AE5, 0x9AE7, 0x9AE9, 0x9AEC, 0x9AF2, 0x9AF3, 0x9AF5, 0x9AF9,
 0x9AFA, 0x9AFD, 0x9AFF, 0x9B00, 0x9B01, 0x9B02, 0x9B03,
};
const unsigned short euc_to_utf8_8FEA[] = {
         0x9B04, 0x9B05, 0x9B08, 0x9B09, 0x9B0B, 0x9B0C, 0x9B0D,
 0x9B0E, 0x9B10, 0x9B12, 0x9B16, 0x9B19, 0x9B1B, 0x9B1C, 0x9B20,
 0x9B26, 0x9B2B, 0x9B2D, 0x9B33, 0x9B34, 0x9B35, 0x9B37, 0x9B39,
 0x9B3A, 0x9B3D, 0x9B48, 0x9B4B, 0x9B4C, 0x9B55, 0x9B56, 0x9B57,
 0x9B5B, 0x9B5E, 0x9B61, 0x9B63, 0x9B65, 0x9B66, 0x9B68, 0x9B6A,
 0x9B6B, 0x9B6C, 0x9B6D, 0x9B6E, 0x9B73, 0x9B75, 0x9B77, 0x9B78,
 0x9B79, 0x9B7F, 0x9B80, 0x9B84, 0x9B85, 0x9B86, 0x9B87, 0x9B89,
 0x9B8A, 0x9B8B, 0x9B8D, 0x9B8F, 0x9B90, 0x9B94, 0x9B9A, 0x9B9D,
 0x9B9E, 0x9BA6, 0x9BA7, 0x9BA9, 0x9BAC, 0x9BB0, 0x9BB1, 0x9BB2,
 0x9BB7, 0x9BB8, 0x9BBB, 0x9BBC, 0x9BBE, 0x9BBF, 0x9BC1, 0x9BC7,
 0x9BC8, 0x9BCE, 0x9BD0, 0x9BD7, 0x9BD8, 0x9BDD, 0x9BDF, 0x9BE5,
 0x9BE7, 0x9BEA, 0x9BEB, 0x9BEF, 0x9BF3, 0x9BF7, 0x9BF8,
};
const unsigned short euc_to_utf8_8FEB[] = {
         0x9BF9, 0x9BFA, 0x9BFD, 0x9BFF, 0x9C00, 0x9C02, 0x9C0B,
 0x9C0F, 0x9C11, 0x9C16, 0x9C18, 0x9C19, 0x9C1A, 0x9C1C, 0x9C1E,
 0x9C22, 0x9C23, 0x9C26, 0x9C27, 0x9C28, 0x9C29, 0x9C2A, 0x9C31,
 0x9C35, 0x9C36, 0x9C37, 0x9C3D, 0x9C41, 0x9C43, 0x9C44, 0x9C45,
 0x9C49, 0x9C4A, 0x9C4E, 0x9C4F, 0x9C50, 0x9C53, 0x9C54, 0x9C56,
 0x9C58, 0x9C5B, 0x9C5D, 0x9C5E, 0x9C5F, 0x9C63, 0x9C69, 0x9C6A,
 0x9C5C, 0x9C6B, 0x9C68, 0x9C6E, 0x9C70, 0x9C72, 0x9C75, 0x9C77,
 0x9C7B, 0x9CE6, 0x9CF2, 0x9CF7, 0x9CF9, 0x9D0B, 0x9D02, 0x9D11,
 0x9D17, 0x9D18, 0x9D1C, 0x9D1D, 0x9D1E, 0x9D2F, 0x9D30, 0x9D32,
 0x9D33, 0x9D34, 0x9D3A, 0x9D3C, 0x9D45, 0x9D3D, 0x9D42, 0x9D43,
 0x9D47, 0x9D4A, 0x9D53, 0x9D54, 0x9D5F, 0x9D63, 0x9D62, 0x9D65,
 0x9D69, 0x9D6A, 0x9D6B, 0x9D70, 0x9D76, 0x9D77, 0x9D7B,
};
const unsigned short euc_to_utf8_8FEC[] = {
         0x9D7C, 0x9D7E, 0x9D83, 0x9D84, 0x9D86, 0x9D8A, 0x9D8D,
 0x9D8E, 0x9D92, 0x9D93, 0x9D95, 0x9D96, 0x9D97, 0x9D98, 0x9DA1,
 0x9DAA, 0x9DAC, 0x9DAE, 0x9DB1, 0x9DB5, 0x9DB9, 0x9DBC, 0x9DBF,
 0x9DC3, 0x9DC7, 0x9DC9, 0x9DCA, 0x9DD4, 0x9DD5, 0x9DD6, 0x9DD7,
 0x9DDA, 0x9DDE, 0x9DDF, 0x9DE0, 0x9DE5, 0x9DE7, 0x9DE9, 0x9DEB,
 0x9DEE, 0x9DF0, 0x9DF3, 0x9DF4, 0x9DFE, 0x9E0A, 0x9E02, 0x9E07,
 0x9E0E, 0x9E10, 0x9E11, 0x9E12, 0x9E15, 0x9E16, 0x9E19, 0x9E1C,
 0x9E1D, 0x9E7A, 0x9E7B, 0x9E7C, 0x9E80, 0x9E82, 0x9E83, 0x9E84,
 0x9E85, 0x9E87, 0x9E8E, 0x9E8F, 0x9E96, 0x9E98, 0x9E9B, 0x9E9E,
 0x9EA4, 0x9EA8, 0x9EAC, 0x9EAE, 0x9EAF, 0x9EB0, 0x9EB3, 0x9EB4,
 0x9EB5, 0x9EC6, 0x9EC8, 0x9ECB, 0x9ED5, 0x9EDF, 0x9EE4, 0x9EE7,
 0x9EEC, 0x9EED, 0x9EEE, 0x9EF0, 0x9EF1, 0x9EF2, 0x9EF5,
};
const unsigned short euc_to_utf8_8FED[] = {
         0x9EF8, 0x9EFF, 0x9F02, 0x9F03, 0x9F09, 0x9F0F, 0x9F10,
 0x9F11, 0x9F12, 0x9F14, 0x9F16, 0x9F17, 0x9F19, 0x9F1A, 0x9F1B,
 0x9F1F, 0x9F22, 0x9F26, 0x9F2A, 0x9F2B, 0x9F2F, 0x9F31, 0x9F32,
 0x9F34, 0x9F37, 0x9F39, 0x9F3A, 0x9F3C, 0x9F3D, 0x9F3F, 0x9F41,
 0x9F43, 0x9F44, 0x9F45, 0x9F46, 0x9F47, 0x9F53, 0x9F55, 0x9F56,
 0x9F57, 0x9F58, 0x9F5A, 0x9F5D, 0x9F5E, 0x9F68, 0x9F69, 0x9F6D,
 0x9F6E, 0x9F6F, 0x9F70, 0x9F71, 0x9F73, 0x9F75, 0x9F7A, 0x9F7D,
 0x9F8F, 0x9F90, 0x9F91, 0x9F92, 0x9F94, 0x9F96, 0x9F97, 0x9F9E,
 0x9FA1, 0x9FA2, 0x9FA3, 0x9FA5,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
#endif /* X0212_ENABLE */

const unsigned short euc_to_utf8_1byte[] = {
         0xFF61, 0xFF62, 0xFF63, 0xFF64, 0xFF65, 0xFF66, 0xFF67,
 0xFF68, 0xFF69, 0xFF6A, 0xFF6B, 0xFF6C, 0xFF6D, 0xFF6E, 0xFF6F,
 0xFF70, 0xFF71, 0xFF72, 0xFF73, 0xFF74, 0xFF75, 0xFF76, 0xFF77,
 0xFF78, 0xFF79, 0xFF7A, 0xFF7B, 0xFF7C, 0xFF7D, 0xFF7E, 0xFF7F,
 0xFF80, 0xFF81, 0xFF82, 0xFF83, 0xFF84, 0xFF85, 0xFF86, 0xFF87,
 0xFF88, 0xFF89, 0xFF8A, 0xFF8B, 0xFF8C, 0xFF8D, 0xFF8E, 0xFF8F,
 0xFF90, 0xFF91, 0xFF92, 0xFF93, 0xFF94, 0xFF95, 0xFF96, 0xFF97,
 0xFF98, 0xFF99, 0xFF9A, 0xFF9B, 0xFF9C, 0xFF9D, 0xFF9E, 0xFF9F,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0x00A9, 0x2122,
};
const unsigned short *const euc_to_utf8_2bytes[] = {
                 euc_to_utf8_A1, euc_to_utf8_A2, euc_to_utf8_A3,
 euc_to_utf8_A4, euc_to_utf8_A5, euc_to_utf8_A6, euc_to_utf8_A7,
 euc_to_utf8_A8, euc_to_utf8_A9, euc_to_utf8_AA, euc_to_utf8_AB,
 euc_to_utf8_AC, euc_to_utf8_AD, euc_to_utf8_AE, euc_to_utf8_AF,
 euc_to_utf8_B0, euc_to_utf8_B1, euc_to_utf8_B2, euc_to_utf8_B3,
 euc_to_utf8_B4, euc_to_utf8_B5, euc_to_utf8_B6, euc_to_utf8_B7,
 euc_to_utf8_B8, euc_to_utf8_B9, euc_to_utf8_BA, euc_to_utf8_BB,
 euc_to_utf8_BC, euc_to_utf8_BD, euc_to_utf8_BE, euc_to_utf8_BF,
 euc_to_utf8_C0, euc_to_utf8_C1, euc_to_utf8_C2, euc_to_utf8_C3,
 euc_to_utf8_C4, euc_to_utf8_C5, euc_to_utf8_C6, euc_to_utf8_C7,
 euc_to_utf8_C8, euc_to_utf8_C9, euc_to_utf8_CA, euc_to_utf8_CB,
 euc_to_utf8_CC, euc_to_utf8_CD, euc_to_utf8_CE, euc_to_utf8_CF,
 euc_to_utf8_D0, euc_to_utf8_D1, euc_to_utf8_D2, euc_to_utf8_D3,
 euc_to_utf8_D4, euc_to_utf8_D5, euc_to_utf8_D6, euc_to_utf8_D7,
 euc_to_utf8_D8, euc_to_utf8_D9, euc_to_utf8_DA, euc_to_utf8_DB,
 euc_to_utf8_DC, euc_to_utf8_DD, euc_to_utf8_DE, euc_to_utf8_DF,
 euc_to_utf8_E0, euc_to_utf8_E1, euc_to_utf8_E2, euc_to_utf8_E3,
 euc_to_utf8_E4, euc_to_utf8_E5, euc_to_utf8_E6, euc_to_utf8_E7,
 euc_to_utf8_E8, euc_to_utf8_E9, euc_to_utf8_EA, euc_to_utf8_EB,
 euc_to_utf8_EC, euc_to_utf8_ED, euc_to_utf8_EE, euc_to_utf8_EF,
 euc_to_utf8_F0, euc_to_utf8_F1, euc_to_utf8_F2, euc_to_utf8_F3,
 euc_to_utf8_F4, euc_to_utf8_F5,              0,              0,
              0, euc_to_utf8_F9, euc_to_utf8_FA, euc_to_utf8_FB,
 euc_to_utf8_FC,              0,              0,
};
/* Microsoft UCS Mapping Compatible */
const unsigned short *const euc_to_utf8_2bytes_ms[] = {
                 euc_to_utf8_A1_ms, euc_to_utf8_A2_ms, euc_to_utf8_A3,
 euc_to_utf8_A4, euc_to_utf8_A5, euc_to_utf8_A6, euc_to_utf8_A7,
 euc_to_utf8_A8, euc_to_utf8_A9, euc_to_utf8_AA, euc_to_utf8_AB,
 euc_to_utf8_AC, euc_to_utf8_AD, euc_to_utf8_AE, euc_to_utf8_AF,
 euc_to_utf8_B0, euc_to_utf8_B1, euc_to_utf8_B2, euc_to_utf8_B3,
 euc_to_utf8_B4, euc_to_utf8_B5, euc_to_utf8_B6, euc_to_utf8_B7,
 euc_to_utf8_B8, euc_to_utf8_B9, euc_to_utf8_BA, euc_to_utf8_BB,
 euc_to_utf8_BC, euc_to_utf8_BD, euc_to_utf8_BE, euc_to_utf8_BF,
 euc_to_utf8_C0, euc_to_utf8_C1, euc_to_utf8_C2, euc_to_utf8_C3,
 euc_to_utf8_C4, euc_to_utf8_C5, euc_to_utf8_C6, euc_to_utf8_C7,
 euc_to_utf8_C8, euc_to_utf8_C9, euc_to_utf8_CA, euc_to_utf8_CB,
 euc_to_utf8_CC, euc_to_utf8_CD, euc_to_utf8_CE, euc_to_utf8_CF,
 euc_to_utf8_D0, euc_to_utf8_D1, euc_to_utf8_D2, euc_to_utf8_D3,
 euc_to_utf8_D4, euc_to_utf8_D5, euc_to_utf8_D6, euc_to_utf8_D7,
 euc_to_utf8_D8, euc_to_utf8_D9, euc_to_utf8_DA, euc_to_utf8_DB,
 euc_to_utf8_DC, euc_to_utf8_DD, euc_to_utf8_DE, euc_to_utf8_DF,
 euc_to_utf8_E0, euc_to_utf8_E1, euc_to_utf8_E2, euc_to_utf8_E3,
 euc_to_utf8_E4, euc_to_utf8_E5, euc_to_utf8_E6, euc_to_utf8_E7,
 euc_to_utf8_E8, euc_to_utf8_E9, euc_to_utf8_EA, euc_to_utf8_EB,
 euc_to_utf8_EC, euc_to_utf8_ED, euc_to_utf8_EE, euc_to_utf8_EF,
 euc_to_utf8_F0, euc_to_utf8_F1, euc_to_utf8_F2, euc_to_utf8_F3,
 euc_to_utf8_F4, euc_to_utf8_F5,              0,              0,
              0, euc_to_utf8_F9, euc_to_utf8_FA, euc_to_utf8_FB,
 euc_to_utf8_FC_ms,              0,              0,
};

#ifdef X0212_ENABLE
const unsigned short *const x0212_to_utf8_2bytes[] = {
                              0, euc_to_utf8_8FA2,              0,
              0,              0, euc_to_utf8_8FA6, euc_to_utf8_8FA7,
              0, euc_to_utf8_8FA9, euc_to_utf8_8FAA, euc_to_utf8_8FAB,
              0,              0,              0,              0,
 euc_to_utf8_8FB0, euc_to_utf8_8FB1, euc_to_utf8_8FB2, euc_to_utf8_8FB3,
 euc_to_utf8_8FB4, euc_to_utf8_8FB5, euc_to_utf8_8FB6, euc_to_utf8_8FB7,
 euc_to_utf8_8FB8, euc_to_utf8_8FB9, euc_to_utf8_8FBA, euc_to_utf8_8FBB,
 euc_to_utf8_8FBC, euc_to_utf8_8FBD, euc_to_utf8_8FBE, euc_to_utf8_8FBF,
 euc_to_utf8_8FC0, euc_to_utf8_8FC1, euc_to_utf8_8FC2, euc_to_utf8_8FC3,
 euc_to_utf8_8FC4, euc_to_utf8_8FC5, euc_to_utf8_8FC6, euc_to_utf8_8FC7,
 euc_to_utf8_8FC8, euc_to_utf8_8FC9, euc_to_utf8_8FCA, euc_to_utf8_8FCB,
 euc_to_utf8_8FCC, euc_to_utf8_8FCD, euc_to_utf8_8FCE, euc_to_utf8_8FCF,
 euc_to_utf8_8FD0, euc_to_utf8_8FD1, euc_to_utf8_8FD2, euc_to_utf8_8FD3,
 euc_to_utf8_8FD4, euc_to_utf8_8FD5, euc_to_utf8_8FD6, euc_to_utf8_8FD7,
 euc_to_utf8_8FD8, euc_to_utf8_8FD9, euc_to_utf8_8FDA, euc_to_utf8_8FDB,
 euc_to_utf8_8FDC, euc_to_utf8_8FDD, euc_to_utf8_8FDE, euc_to_utf8_8FDF,
 euc_to_utf8_8FE0, euc_to_utf8_8FE1, euc_to_utf8_8FE2, euc_to_utf8_8FE3,
 euc_to_utf8_8FE4, euc_to_utf8_8FE5, euc_to_utf8_8FE6, euc_to_utf8_8FE7,
 euc_to_utf8_8FE8, euc_to_utf8_8FE9, euc_to_utf8_8FEA, euc_to_utf8_8FEB,
 euc_to_utf8_8FEC, euc_to_utf8_8FED,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,};
#endif /* X0212_ENABLE */
#endif /* UTF8_OUTPUT_ENABLE */

#ifdef UTF8_INPUT_ENABLE
const unsigned short utf8_to_euc_C2[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x0E20, 0xA242, 0x2171, 0x2172, 0xA270,      0, 0xA243, 0x2178,
 0x212F, 0x0E7D, 0xA26C,      0, 0x224C,      0, 0xA26E, 0xA234,
 0x216B, 0x215E,      0,      0, 0x212D,      0, 0x2279,      0,
 0xA231,      0, 0xA26B,      0,      0,      0,      0, 0xA244,
};
const unsigned short utf8_to_euc_C3[] = {
 0xAA22, 0xAA21, 0xAA24, 0xAA2A, 0xAA23, 0xAA29, 0xA921, 0xAA2E,
 0xAA32, 0xAA31, 0xAA34, 0xAA33, 0xAA40, 0xAA3F, 0xAA42, 0xAA41,
      0, 0xAA50, 0xAA52, 0xAA51, 0xAA54, 0xAA58, 0xAA53, 0x215F,
 0xA92C, 0xAA63, 0xAA62, 0xAA65, 0xAA64, 0xAA72, 0xA930, 0xA94E,
 0xAB22, 0xAB21, 0xAB24, 0xAB2A, 0xAB23, 0xAB29, 0xA941, 0xAB2E,
 0xAB32, 0xAB31, 0xAB34, 0xAB33, 0xAB40, 0xAB3F, 0xAB42, 0xAB41,
 0xA943, 0xAB50, 0xAB52, 0xAB51, 0xAB54, 0xAB58, 0xAB53, 0x2160,
 0xA94C, 0xAB63, 0xAB62, 0xAB65, 0xAB64, 0xAB72, 0xA950, 0xAB73,
};
const unsigned short utf8_to_euc_C4[] = {
 0xAA27, 0xAB27, 0xAA25, 0xAB25, 0xAA28, 0xAB28, 0xAA2B, 0xAB2B,
 0xAA2C, 0xAB2C, 0xAA2F, 0xAB2F, 0xAA2D, 0xAB2D, 0xAA30, 0xAB30,
 0xA922, 0xA942, 0xAA37, 0xAB37,      0,      0, 0xAA36, 0xAB36,
 0xAA38, 0xAB38, 0xAA35, 0xAB35, 0xAA3A, 0xAB3A, 0xAA3B, 0xAB3B,
 0xAA3D, 0xAB3D, 0xAA3C,      0, 0xAA3E, 0xAB3E, 0xA924, 0xA944,
 0xAA47, 0xAB47, 0xAA45, 0xAB45,      0,      0, 0xAA46, 0xAB46,
 0xAA44, 0xA945, 0xA926, 0xA946, 0xAA48, 0xAB48, 0xAA49, 0xAB49,
 0xA947, 0xAA4A, 0xAB4A, 0xAA4C, 0xAB4C, 0xAA4B, 0xAB4B, 0xA929,
};
const unsigned short utf8_to_euc_C5[] = {
 0xA949, 0xA928, 0xA948, 0xAA4D, 0xAB4D, 0xAA4F, 0xAB4F, 0xAA4E,
 0xAB4E, 0xA94A, 0xA92B, 0xA94B, 0xAA57, 0xAB57,      0,      0,
 0xAA56, 0xAB56, 0xA92D, 0xA94D, 0xAA59, 0xAB59, 0xAA5B, 0xAB5B,
 0xAA5A, 0xAB5A, 0xAA5C, 0xAB5C, 0xAA5D, 0xAB5D, 0xAA5F, 0xAB5F,
 0xAA5E, 0xAB5E, 0xAA61, 0xAB61, 0xAA60, 0xAB60, 0xA92F, 0xA94F,
 0xAA6C, 0xAB6C, 0xAA69, 0xAB69, 0xAA66, 0xAB66, 0xAA6B, 0xAB6B,
 0xAA68, 0xAB68, 0xAA6A, 0xAB6A, 0xAA71, 0xAB71, 0xAA74, 0xAB74,
 0xAA73, 0xAA75, 0xAB75, 0xAA77, 0xAB77, 0xAA76, 0xAB76,      0,
};
const unsigned short utf8_to_euc_C7[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0xAA26, 0xAB26, 0xAA43,
 0xAB43, 0xAA55, 0xAB55, 0xAA67, 0xAB67, 0xAA70, 0xAB70, 0xAA6D,
 0xAB6D, 0xAA6F, 0xAB6F, 0xAA6E, 0xAB6E,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0xAB39,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_CB[] = {
      0,      0,      0,      0,      0,      0,      0, 0xA230,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0xA22F, 0xA232, 0xA236, 0xA235,      0, 0xA233,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_CE[] = {
      0,      0,      0,      0, 0xA238, 0xA239, 0xA661,      0,
 0xA662, 0xA663, 0xA664,      0, 0xA667,      0, 0xA669, 0xA66C,
 0xA676, 0x2621, 0x2622, 0x2623, 0x2624, 0x2625, 0x2626, 0x2627,
 0x2628, 0x2629, 0x262A, 0x262B, 0x262C, 0x262D, 0x262E, 0x262F,
 0x2630, 0x2631,      0, 0x2632, 0x2633, 0x2634, 0x2635, 0x2636,
 0x2637, 0x2638, 0xA665, 0xA66A, 0xA671, 0xA672, 0xA673, 0xA674,
 0xA67B, 0x2641, 0x2642, 0x2643, 0x2644, 0x2645, 0x2646, 0x2647,
 0x2648, 0x2649, 0x264A, 0x264B, 0x264C, 0x264D, 0x264E, 0x264F,
};
const unsigned short utf8_to_euc_CF[] = {
 0x2650, 0x2651, 0xA678, 0x2652, 0x2653, 0x2654, 0x2655, 0x2656,
 0x2657, 0x2658, 0xA675, 0xA67A, 0xA677, 0xA679, 0xA67C,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_D0[] = {
      0, 0x2727, 0xA742, 0xA743, 0xA744, 0xA745, 0xA746, 0xA747,
 0xA748, 0xA749, 0xA74A, 0xA74B, 0xA74C,      0, 0xA74D, 0xA74E,
 0x2721, 0x2722, 0x2723, 0x2724, 0x2725, 0x2726, 0x2728, 0x2729,
 0x272A, 0x272B, 0x272C, 0x272D, 0x272E, 0x272F, 0x2730, 0x2731,
 0x2732, 0x2733, 0x2734, 0x2735, 0x2736, 0x2737, 0x2738, 0x2739,
 0x273A, 0x273B, 0x273C, 0x273D, 0x273E, 0x273F, 0x2740, 0x2741,
 0x2751, 0x2752, 0x2753, 0x2754, 0x2755, 0x2756, 0x2758, 0x2759,
 0x275A, 0x275B, 0x275C, 0x275D, 0x275E, 0x275F, 0x2760, 0x2761,
};
const unsigned short utf8_to_euc_D1[] = {
 0x2762, 0x2763, 0x2764, 0x2765, 0x2766, 0x2767, 0x2768, 0x2769,
 0x276A, 0x276B, 0x276C, 0x276D, 0x276E, 0x276F, 0x2770, 0x2771,
      0, 0x2757, 0xA772, 0xA773, 0xA774, 0xA775, 0xA776, 0xA777,
 0xA778, 0xA779, 0xA77A, 0xA77B, 0xA77C,      0, 0xA77D, 0xA77E,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E280[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x213E,      0,      0,      0, 0x213D, 0x213D, 0x2142,      0,
 0x2146, 0x2147,      0,      0, 0x2148, 0x2149,      0,      0,
 0x2277, 0x2278,      0,      0,      0, 0x2145, 0x2144,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x2273,      0, 0x216C, 0x216D,      0,      0,      0,      0,
      0,      0,      0, 0x2228,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E284[] = {
      0,      0,      0, 0x216E,      0,      0,      0,      0,
      0, 0x2B37,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x2B31,      0,      0, 0x2D62,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x2D64, 0x0E7E,      0,      0,      0,      0,      0,
      0,      0,      0, 0x2272,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E285[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x2D35, 0x2D36, 0x2D37, 0x2D38, 0x2D39, 0x2D3A, 0x2D3B, 0x2D3C,
 0x2D3D, 0x2D3E, 0x2A2B, 0x2A2C,      0,      0,      0,      0,
 0x7C71, 0x7C72, 0x7C73, 0x7C74, 0x7C75, 0x7C76, 0x7C77, 0x7C78,
 0x7C79, 0x7C7A, 0x2A3F, 0x2A40,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E286[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x222B, 0x222C, 0x222A, 0x222D,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E287[] = {
      0,      0,      0,      0, 0x2C4E, 0x2C4F, 0x2C4D,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x224D,      0, 0x224E,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x2C52, 0x2C53,
 0x2C51, 0x2C54,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E288[] = {
 0x224F,      0, 0x225F, 0x2250,      0,      0,      0, 0x2260,
 0x223A,      0,      0, 0x223B,      0,      0,      0,      0,
      0, 0x2D74, 0x215D,      0,      0,      0,      0,      0,
      0,      0, 0x2265,      0,      0, 0x2267, 0x2167, 0x2D78,
 0x225C,      0,      0,      0,      0, 0x2142,      0, 0x224A,
 0x224B, 0x2241, 0x2240, 0x2269, 0x226A,      0, 0x2D73,      0,
      0,      0,      0,      0, 0x2168, 0x2268,      0,      0,
      0,      0,      0,      0,      0, 0x2266,      0,      0,
};
const unsigned short utf8_to_euc_E289[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x2262,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x2162, 0x2261,      0,      0,      0,      0, 0x2165, 0x2166,
      0,      0, 0x2263, 0x2264,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E28A[] = {
      0,      0, 0x223E, 0x223F,      0,      0, 0x223C, 0x223D,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0x225D,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x2D79,
};
const unsigned short utf8_to_euc_E28C[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x225E,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E291[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x2D21, 0x2D22, 0x2D23, 0x2D24, 0x2D25, 0x2D26, 0x2D27, 0x2D28,
 0x2D29, 0x2D2A, 0x2D2B, 0x2D2C, 0x2D2D, 0x2D2E, 0x2D2F, 0x2D30,
 0x2D31, 0x2D32, 0x2D33, 0x2D34, 0x293F, 0x2940, 0x2941, 0x2942,
 0x2943, 0x2944, 0x2945, 0x2946, 0x2947, 0x2948, 0x2949, 0x294A,
};
const unsigned short utf8_to_euc_E292[] = {
 0x294B, 0x294C, 0x294D, 0x294E, 0x294F, 0x2950, 0x2951, 0x2952,
 0x2972, 0x2973, 0x2974, 0x2975, 0x2976, 0x2977, 0x2978, 0x2979,
 0x297A,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x2A5D, 0x2A5E, 0x2A5F, 0x2A60,
 0x2A61, 0x2A62, 0x2A63, 0x2A64, 0x2A65, 0x2A66, 0x2A67, 0x2A68,
 0x2A69, 0x2A6A, 0x2A6B, 0x2A6C, 0x2A6D, 0x2A6E, 0x2A6F, 0x2A70,
 0x2A71, 0x2A72, 0x2A73, 0x2A74, 0x2A75, 0x2A76,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E294[] = {
 0x2821, 0x282C, 0x2822, 0x282D,      0,      0,      0,      0,
      0,      0,      0,      0, 0x2823,      0,      0, 0x282E,
 0x2824,      0,      0, 0x282F, 0x2826,      0,      0, 0x2831,
 0x2825,      0,      0, 0x2830, 0x2827, 0x283C,      0,      0,
 0x2837,      0,      0, 0x2832, 0x2829, 0x283E,      0,      0,
 0x2839,      0,      0, 0x2834, 0x2828,      0,      0, 0x2838,
 0x283D,      0,      0, 0x2833, 0x282A,      0,      0, 0x283A,
 0x283F,      0,      0, 0x2835, 0x282B,      0,      0, 0x283B,
};
const unsigned short utf8_to_euc_E295[] = {
      0,      0, 0x2840,      0,      0,      0,      0,      0,
      0,      0,      0, 0x2836,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E296[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x2223, 0x2222,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x2225, 0x2224,      0,      0,      0,      0,
      0,      0,      0,      0, 0x2227, 0x2226,      0,      0,
};
const unsigned short utf8_to_euc_E297[] = {
      0,      0,      0,      0,      0,      0, 0x2221, 0x217E,
      0,      0,      0, 0x217B,      0,      0, 0x217D, 0x217C,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x227E,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E298[] = {
      0,      0,      0,      0,      0, 0x217A, 0x2179,      0,
      0,      0,      0,      0,      0,      0, 0x2C36,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x2C4A, 0x2C4B, 0x2C49, 0x2C4C,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E299[] = {
 0x216A,      0, 0x2169,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x2C25, 0x2C23, 0x2C24, 0x2C26, 0x2C21, 0x2C27, 0x2C28, 0x2C22,
      0,      0, 0x2276,      0,      0, 0x2275,      0, 0x2274,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E29D[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x295D, 0x295E,
 0x295F, 0x2960, 0x2961, 0x2962, 0x2963, 0x2964, 0x2965,      0,
};
const unsigned short utf8_to_euc_E380[] = {
 0x2121, 0x2122, 0x2123, 0x2137, 0x2C37, 0x2139, 0x213A, 0x213B,
 0x2152, 0x2153, 0x2154, 0x2155, 0x2156, 0x2157, 0x2158, 0x2159,
 0x215A, 0x215B, 0x2229, 0x222E, 0x214C, 0x214D,      0,      0,
      0,      0,      0,      0, 0x2141, 0x2D60,      0, 0x2D61,
 0x2C35,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E381[] = {
      0, 0x2421, 0x2422, 0x2423, 0x2424, 0x2425, 0x2426, 0x2427,
 0x2428, 0x2429, 0x242A, 0x242B, 0x242C, 0x242D, 0x242E, 0x242F,
 0x2430, 0x2431, 0x2432, 0x2433, 0x2434, 0x2435, 0x2436, 0x2437,
 0x2438, 0x2439, 0x243A, 0x243B, 0x243C, 0x243D, 0x243E, 0x243F,
 0x2440, 0x2441, 0x2442, 0x2443, 0x2444, 0x2445, 0x2446, 0x2447,
 0x2448, 0x2449, 0x244A, 0x244B, 0x244C, 0x244D, 0x244E, 0x244F,
 0x2450, 0x2451, 0x2452, 0x2453, 0x2454, 0x2455, 0x2456, 0x2457,
 0x2458, 0x2459, 0x245A, 0x245B, 0x245C, 0x245D, 0x245E, 0x245F,
};
const unsigned short utf8_to_euc_E382[] = {
 0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467,
 0x2468, 0x2469, 0x246A, 0x246B, 0x246C, 0x246D, 0x246E, 0x246F,
 0x2470, 0x2471, 0x2472, 0x2473, 0x2F49,      0,      0,      0,
      0, 0x0E5E, 0x0E5F, 0x212B, 0x212C, 0x2135, 0x2136,      0,
      0, 0x2521, 0x2522, 0x2523, 0x2524, 0x2525, 0x2526, 0x2527,
 0x2528, 0x2529, 0x252A, 0x252B, 0x252C, 0x252D, 0x252E, 0x252F,
 0x2530, 0x2531, 0x2532, 0x2533, 0x2534, 0x2535, 0x2536, 0x2537,
 0x2538, 0x2539, 0x253A, 0x253B, 0x253C, 0x253D, 0x253E, 0x253F,
};
const unsigned short utf8_to_euc_E383[] = {
 0x2540, 0x2541, 0x2542, 0x2543, 0x2544, 0x2545, 0x2546, 0x2547,
 0x2548, 0x2549, 0x254A, 0x254B, 0x254C, 0x254D, 0x254E, 0x254F,
 0x2550, 0x2551, 0x2552, 0x2553, 0x2554, 0x2555, 0x2556, 0x2557,
 0x2558, 0x2559, 0x255A, 0x255B, 0x255C, 0x255D, 0x255E, 0x255F,
 0x2560, 0x2561, 0x2562, 0x2563, 0x2564, 0x2565, 0x2566, 0x2567,
 0x2568, 0x2569, 0x256A, 0x256B, 0x256C, 0x256D, 0x256E, 0x256F,
 0x2570, 0x2571, 0x2572, 0x2573, 0x2574, 0x2575, 0x2576, 0x2F4B,
 0x2F4C, 0x2F4D, 0x2F4E, 0x2126, 0x213C, 0x2133, 0x2134,      0,
};
const unsigned short utf8_to_euc_E388[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x2D22, 0x2D23, 0x2D24, 0x2D25, 0x2D26, 0x2D27,
 0x2D21, 0x2D6A, 0x2D6B, 0x2D34, 0x2D30, 0x2D35, 0x2D33, 0x2D29,
 0x2D39, 0x2D6C, 0x2D2D, 0x2D32, 0x2D36, 0x2D37, 0x2D2F, 0x2D38,
};
const unsigned short utf8_to_euc_E389[] = {
 0x2D28,      0, 0x2D2A, 0x2D2B,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E38A[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x2D79,      0,
 0x2D7B, 0x2D7E,      0,      0,      0, 0x2D7A, 0x2D7C,      0,
      0,      0,      0,      0, 0x2D65, 0x2D66, 0x2D67, 0x2D68,
 0x2D69, 0x2D78,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E38C[] = {
 0x2E3F,      0,      0, 0x2D46,      0, 0x2E26,      0,      0,
      0,      0,      0,      0,      0, 0x2D4A,      0,      0,
      0,      0,      0,      0, 0x2D41, 0x2E2C, 0x2E25,      0,
 0x2D44,      0,      0,      0,      0,      0, 0x2E40,      0,
      0,      0, 0x2D42, 0x2D4C,      0,      0, 0x2D4B, 0x2D45,
      0,      0, 0x2E41, 0x2D4D,      0,      0,      0,      0,
      0, 0x2E42,      0, 0x2E27,      0,      0, 0x2D47,      0,
      0, 0x2E30,      0, 0x2D4F,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E38D[] = {
      0,      0, 0x2E33,      0,      0,      0,      0, 0x2E43,
      0, 0x2D40, 0x2D4E,      0,      0, 0x2D43, 0x2E28,      0,
      0, 0x2D48,      0,      0,      0,      0,      0, 0x2D49,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x2D5F, 0x2D6F, 0x2D6E, 0x2D6D, 0x2E7C,
};
const unsigned short utf8_to_euc_E38E[] = {
      0,      0,      0,      0,      0, 0x2B3B, 0x2B3C, 0x2B3D,
      0,      0,      0,      0,      0,      0, 0x2D53, 0x2D54,
 0x2B3A,      0,      0,      0,      0,      0, 0x2B2F, 0x2B30,
 0x2B32,      0,      0,      0, 0x2D50, 0x2D51, 0x2D52, 0x2B22,
 0x2B24, 0x2D56, 0x2B2A,      0, 0x2B25, 0x2B28,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x2B36, 0x2B35, 0x2B34, 0x2B33,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E38F[] = {
      0,      0,      0,      0, 0x2D55,      0,      0,      0,
      0,      0,      0, 0x2B39,      0, 0x2D63,      0,      0,
      0,      0,      0,      0, 0x2B38,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E4B8[] = {
 0x306C, 0x437A, 0xB021, 0x3C37, 0xB022, 0xB023,      0, 0x4B7C,
 0x3E66, 0x3B30, 0x3E65, 0x323C, 0xB024, 0x4954, 0x4D3F,      0,
 0x5022, 0x312F, 0xB025,      0, 0x336E, 0x5023, 0x4024, 0x5242,
 0x3556, 0x4A3A,      0,      0,      0,      0, 0x3E67, 0xB026,
      0, 0x4E3E,      0, 0xB027, 0xB028,      0, 0x4A42,      0,
 0x792D,      0, 0x5024, 0xB02A,      0, 0x4366, 0xB02B, 0xB02C,
 0xB02D, 0x5025, 0x367A,      0,      0, 0xB02E, 0x5026,      0,
 0x345D, 0x4330,      0, 0x3C67, 0x5027,      0,      0, 0x5028,
};
const unsigned short utf8_to_euc_E4B9[] = {
 0xB02F, 0xB030, 0x5029, 0x4735, 0xB031, 0x3557,      0, 0xB032,
      0,      0,      0, 0x4737,      0, 0x4663, 0x3843, 0x4B33,
      0, 0xB033,      0,      0,      0, 0x6949, 0x502A, 0x3E68,
 0x502B, 0x3235, 0xB034,      0, 0xB035, 0x3665, 0x3870, 0x4C69,
      0,      0, 0x5626, 0xB036,      0,      0,      0,      0,
 0xB037, 0xB038,      0,      0,      0,      0,      0,      0,
      0, 0x4D70,      0, 0x467D, 0xB039, 0xB03A,      0,      0,
      0, 0xB03B,      0,      0,      0,      0, 0x3425, 0xB03C,
};
const unsigned short utf8_to_euc_E4BA[] = {
 0x3535,      0, 0x502C,      0,      0, 0x502D, 0x4E3B,      0,
 0x4D3D, 0x4168, 0x502F, 0x3B76, 0x4673, 0xB03D, 0x5032,      0,
      0, 0x313E, 0x385F,      0, 0x385E, 0x3066, 0xB03E, 0xB03F,
 0x4F4B, 0x4F4A,      0, 0x3A33, 0x3021, 0xB040, 0x5033, 0x5034,
 0x5035, 0x4B34, 0x5036,      0, 0x3872, 0x3067, 0x4B72,      0,
 0x357C,      0,      0, 0x357D, 0x357E, 0x4462, 0x4E3C, 0xB041,
 0x5037,      0,      0, 0x5038,      0,      0, 0x5039,      0,
      0, 0xB042, 0x3F4D,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E4BB[] = {
 0x3D3A, 0x3F4E, 0x503E, 0xB043, 0x503C,      0, 0x503D, 0x3558,
      0,      0, 0x3A23, 0x3270,      0, 0x503B, 0x503A, 0x4A29,
 0xB044,      0,      0,      0, 0x3B46, 0x3B45, 0x423E, 0x503F,
 0x4955, 0x4067, 0xB045, 0xB046,      0, 0x2138, 0x5040, 0x5042,
 0xB047, 0x792E, 0xB049, 0x4265, 0x4E61, 0x304A,      0,      0,
 0xB04A,      0,      0,      0,      0, 0x5041, 0x323E, 0xB04B,
 0x3644, 0xB04C, 0x4367, 0xB04D,      0, 0xB04E, 0x376F, 0x5043,
      0,      0,      0, 0x4724, 0x792F, 0xB04F, 0xB050, 0xB051,
};
const unsigned short utf8_to_euc_E4BC[] = {
 0x7930, 0x346B, 0xB053, 0x7931,      0,      0,      0,      0,
 0xB055, 0x5044, 0x304B, 0xB056, 0xB057, 0x3860, 0x346C, 0x497A,
 0x4832, 0x3559, 0xB058,      0,      0, 0xB059, 0xB05A, 0xB05B,
      0, 0xB05C, 0x3271,      0, 0x5067, 0x4541,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0xB05D, 0x476C,
 0x5046, 0xB05E,      0, 0xB060, 0x483C, 0xB061, 0x4E62, 0xB062,
 0x3F2D, 0x7932, 0x3B47, 0xB064, 0x3B77, 0x3240, 0xB065,      0,
};
const unsigned short utf8_to_euc_E4BD[] = {
 0xB066,      0, 0xB067, 0x4451,      0,      0, 0x4322, 0x504A,
 0xB068, 0xB069,      0, 0xB06A, 0xB06B, 0x304C, 0x4463, 0x3D3B,
 0x3A34, 0x4D24, 0xB06C, 0x424E, 0xB06D, 0x323F, 0x7933, 0x5049,
 0xB06F, 0x4D3E, 0x5045, 0x5047, 0x3A6E, 0x5048, 0x5524, 0xB070,
 0xB05F,      0,      0, 0xB071,      0,      0,      0,      0,
      0, 0x5050, 0xB072,      0, 0xB073,      0, 0xB074, 0x5053,
 0x5051, 0xB075,      0, 0x3242,      0, 0x4A3B, 0x504B, 0xB076,
 0xB077, 0xB078, 0xB079, 0x504F, 0x3873, 0xB07A, 0xB07B, 0x3B48,
};
const unsigned short utf8_to_euc_E4BE[] = {
      0, 0xB07C, 0xB07D, 0x3426, 0xB07E, 0xB121, 0x5054,      0,
 0x504C, 0xB122, 0x7935, 0x4E63, 0xB124, 0x3B78, 0xB125, 0x504D,
 0xB126, 0x5052, 0x7934, 0xB128, 0x7937,      0, 0x5055, 0xB12A,
 0x504E, 0xB12B, 0x7936, 0x3621,      0, 0x304D, 0xB12D, 0xB12E,
 0x3622, 0x3241,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x5525,      0, 0x4B79, 0x496E, 0x3874,
      0,      0, 0xB12F,      0,      0, 0x3F2F, 0x4E37, 0xB130,
      0, 0xB131,      0, 0xB132, 0xB133, 0xB134, 0xB135, 0x4A58,
};
const unsigned short utf8_to_euc_E4BF[] = {
 0xB136, 0xB137, 0x3738, 0x4225, 0x3264, 0xB138, 0xB139,      0,
 0xB13A, 0x7926, 0x3D53, 0xB13C, 0xB13D, 0x7938, 0x5059, 0xB13F,
 0x505E, 0x505C, 0xB140,      0, 0x5057,      0,      0, 0x422F,
 0x505A,      0, 0x505D, 0x505B, 0xB141, 0x4A5D,      0, 0x5058,
 0xB142, 0x3F2E, 0xB143, 0x4B73, 0x505F, 0x5060,      0,      0,
      0,      0,      0,      0,      0,      0, 0x3D24, 0x506D,
 0xB144,      0, 0xB145, 0x4750,      0, 0x4936, 0x5068,      0,
 0x4A70,      0, 0x3236,      0, 0xB146, 0xB147, 0x506C, 0x793B,
};
const unsigned short utf8_to_euc_E580[] = {
 0xB149, 0xB14A,      0,      0, 0xB14B, 0x5066, 0x506F, 0xB14C,
      0, 0x4152, 0xB14D, 0x3844, 0xB14E, 0x475C, 0xB14F, 0x6047,
 0xB150, 0x506E, 0x455D, 0xB151, 0x5063,      0, 0x3876, 0xB152,
 0xB153, 0x3875, 0x5061, 0xB154, 0xB155, 0xB156, 0x793C, 0x3C5A,
      0, 0x5069, 0x793A, 0x4A6F, 0x434D, 0x5065, 0x3771, 0xB159,
 0x5062, 0x506A, 0x5064, 0x4E51, 0x506B, 0x4F41, 0xB15A,      0,
 0xB15B,      0, 0xB15C, 0xB15D,      0, 0xB15E, 0x3666,      0,
      0, 0x3770,      0, 0xB176,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E581[] = {
 0x7939, 0xB160, 0x793F, 0x5070,      0, 0xB162, 0x793D, 0x5071,
 0x5075, 0x304E, 0xB164,      0, 0xB165,      0, 0xB166, 0x4A50,
 0x5074, 0xB167, 0xB168, 0xB169,      0, 0x5073, 0x5077, 0xB16A,
      0, 0xB16B, 0x5076,      0, 0x4464,      0,      0, 0xB16C,
 0xB16D,      0, 0xB16E, 0xB16F,      0, 0x3772, 0xB170, 0xB171,
      0,      0, 0xB172,      0, 0x5078, 0xB173,      0,      0,
 0x793E, 0xB175, 0x3C45,      0, 0x4226, 0x4465, 0x3676,      0,
 0x5079,      0,      0,      0,      0, 0x3536,      0,      0,
};
const unsigned short utf8_to_euc_E582[] = {
 0x507A, 0xB177,      0, 0xB178, 0xB179, 0x507C, 0xB17A,      0,
      0,      0, 0xB17B,      0,      0, 0x4B35, 0xB17C, 0xB17D,
 0xB17E, 0x3766, 0xB221, 0xB222, 0x7940,      0, 0xB224,      0,
 0x3B31, 0x4877, 0x507B, 0xB225, 0xB226,      0, 0xB227, 0xB228,
 0xB229, 0xB22A, 0xB22B,      0,      0,      0,      0,      0,
      0,      0, 0xB22C,      0, 0x3A45, 0x4D43,      0, 0xB22D,
 0xB22E,      0, 0x507E, 0x5123, 0x507D, 0x3A44,      0, 0x3D7D,
      0, 0xB22F, 0xB230,      0,      0, 0xB231, 0x3739,      0,
};
const unsigned short utf8_to_euc_E583[] = {
 0xB232,      0, 0x5124, 0xB233, 0xB234, 0x364F,      0, 0xB235,
      0, 0x5121, 0x5122,      0, 0xB236, 0x462F, 0xB237, 0x417C,
 0xB238, 0x3623,      0, 0xB239, 0xB23A, 0x4B4D, 0x5125,      0,
 0x7942,      0, 0x4E3D,      0, 0xB23C, 0xB23D, 0x5126, 0xB23E,
      0,      0, 0xB23F, 0x5129, 0xB240, 0x5127, 0xB241, 0x414E,
 0xB242, 0xB243,      0,      0,      0, 0x5128, 0x512A, 0xB244,
      0, 0xB245, 0xB251,      0, 0x7941, 0x512C, 0xB246,      0,
      0, 0x512B, 0xB247, 0x4A48,      0,      0, 0xB248,      0,
};
const unsigned short utf8_to_euc_E584[] = {
 0x3537, 0x512E, 0x512F, 0xB249, 0x322F,      0, 0xB24A, 0xB24B,
 0xB24C, 0x512D,      0, 0xB24D, 0xB24E, 0xB24F, 0xB250,      0,
 0xB252,      0, 0x3C74,      0, 0x5132, 0x5131, 0x5130, 0xB253,
 0x5056, 0xB254, 0x5133, 0xB255, 0xB256, 0xB257, 0xB258, 0x3D7E,
      0, 0x5134,      0, 0xB259,      0,      0,      0, 0xB25A,
 0xB25B,      0, 0x4D25,      0, 0xB25C, 0xB25D,      0, 0xB25E,
      0, 0xB25F, 0x4C59, 0xB260, 0xB261, 0xB262,      0, 0x5136,
 0xB263, 0xB264, 0x5135, 0x5138, 0x5137,      0,      0, 0x5139,
};
const unsigned short utf8_to_euc_E585[] = {
 0x513A, 0x3074, 0xB265, 0x3835, 0x373B, 0x3D3C, 0x437B, 0x3624,
 0x4068, 0x3877, 0x7943, 0x396E, 0x513C, 0x4C48, 0x4546, 0xB267,
 0x3B79,      0, 0x513B, 0xB268, 0x513D, 0xB269,      0, 0xB26A,
 0xB26B,      0, 0x455E,      0, 0x3375,      0,      0, 0xB26C,
      0,      0, 0x513E,      0, 0x7944, 0x467E, 0xB26E,      0,
 0x4134, 0x5140, 0x5141, 0x482C, 0x3878, 0x4F3B, 0x5142,      0,
      0, 0x3626,      0,      0,      0, 0x4A3C, 0x4236, 0x3671,
 0x4535,      0,      0,      0, 0x3773,      0, 0xB26F,      0,
};
const unsigned short utf8_to_euc_E586[] = {
 0x5143,      0, 0x5144, 0xB270, 0xB271, 0x4662, 0x315F,      0,
      0, 0x5147, 0x3A7D, 0xB272, 0x5146, 0x3A46, 0xB273, 0x5148,
 0x666E, 0x5149, 0x4B41, 0x514A,      0, 0x514B, 0x514C, 0x3E69,
 0xB274, 0x3C4C,      0,      0,      0, 0x7945,      0,      0,
 0x3427, 0xB276, 0x514F, 0xB277, 0x514D, 0x4C3D, 0x514E,      0,
 0x495A, 0x5150, 0x5151, 0x5152, 0x455F, 0xB278,      0,      0,
 0x5156, 0x5154, 0x5155, 0x5153, 0x3A63, 0x5157, 0x4C6A, 0x4E64,
 0xB279,      0, 0xB27A,      0, 0xB27B, 0x5158, 0x7946, 0xB27D,
};
const unsigned short utf8_to_euc_E587[] = {
      0,      0, 0xB27E,      0, 0x4028, 0x5159, 0x3D5A,      0,
 0xB321, 0x515A,      0, 0x437C, 0x4E3F, 0x4560,      0, 0xB322,
      0, 0xB323, 0xB324, 0xB325,      0, 0xB326, 0x5245,      0,
 0xB327,      0,      0, 0x515B, 0x7425, 0x3645, 0xB328,      0,
 0x515C, 0x4B5E, 0xB329,      0,      0, 0xB32A, 0x3D68, 0x427C,
      0, 0x515E, 0x4664,      0, 0x7947, 0x515F, 0xB32B,      0,
 0x5160, 0x332E, 0xB32C, 0xB32D, 0xB32E, 0x5161, 0x3627, 0xB32F,
 0x464C, 0x317A, 0x3D50,      0,      0, 0x4821, 0x5162,      0,
};
const unsigned short utf8_to_euc_E588[] = {
 0x4561, 0xB330, 0xB331, 0x3F4F, 0x5163, 0xB332, 0x4A2C, 0x405A,
 0x3422,      0, 0x3429, 0x5164,      0,      0, 0x5166,      0,
      0, 0x373A, 0xB333, 0xB334, 0x5165, 0x7948, 0xB336, 0x4E73,
 0xB337,      0,      0,      0,      0, 0x3D69,      0,      0,
      0,      0, 0xB338,      0, 0x483D, 0x4A4C,      0, 0x5167,
 0xB339, 0x4D78, 0x5168,      0,      0,      0, 0x5169,      0,
 0x457E, 0xB33A, 0xB33B, 0x516A,      0, 0xB33C, 0x4029, 0x3A7E,
 0x3774, 0x516B, 0x3B49, 0x396F, 0xB33D,      0,      0,      0,
};
const unsigned short utf8_to_euc_E589[] = {
      0,      0,      0, 0x4466, 0x516D, 0xB33E,      0, 0x4227,
      0, 0xB33F, 0x3A6F, 0x516E, 0x516F, 0x4130,      0, 0x516C,
      0,      0,      0,      0, 0x5171, 0xB340, 0x4B36, 0xB341,
 0xB342,      0, 0xB343, 0x3964, 0xB344,      0, 0x5170, 0xB345,
 0xB346, 0xB347,      0, 0x3775, 0x3A5E, 0x476D, 0xB348,      0,
      0, 0x5174, 0x5172,      0,      0,      0, 0xB349, 0x497B,
 0x3E6A, 0x517B, 0x3364, 0x5175, 0x5173, 0x414F,      0, 0xB34A,
 0xB34B, 0xB34C,      0,      0,      0, 0x5177,      0, 0x5176,
};
const unsigned short utf8_to_euc_E58A[] = {
 0xB34D,      0, 0xB34E, 0x3344,      0, 0xB34F,      0, 0x3760,
 0x517C, 0x4E2D, 0xB350,      0, 0xB351, 0x5178,      0,      0,
      0, 0x517D, 0x517A, 0xB352, 0x5179, 0xB353, 0xB354, 0xB355,
 0xB356,      0, 0xB357, 0x4E4F, 0x7949,      0,      0, 0x3879,
 0x3243,      0,      0, 0x4E74, 0xB359, 0xB35A, 0x794A, 0xB35C,
      0, 0x3D75, 0x4558, 0x3965, 0x5222, 0x5223,      0, 0x7B3C,
 0xB35E, 0x4E65,      0,      0, 0x4F2B, 0x5225, 0xB35F, 0xB360,
 0xB361, 0x387A, 0xB362, 0xB363, 0x5224, 0xB364, 0x332F,      0,
};
const unsigned short utf8_to_euc_E58B[] = {
 0x794B, 0x5226,      0, 0x4B56, 0xB366, 0x443C, 0xB367, 0x4D26,
 0xB368, 0x4A59,      0,      0, 0xB369, 0x5227,      0, 0xB36A,
      0, 0xB36B, 0x7055,      0, 0xB36C, 0x4630, 0xB36D, 0x5228,
 0x342A, 0x4C33,      0, 0x794C, 0xB36F, 0x3E21, 0x5229, 0x4A67,
 0x522D, 0xB370, 0x402A, 0x522A, 0x3650, 0xB371, 0x522B, 0x342B,
 0xB372, 0xB373, 0xB374,      0, 0xB375,      0,      0,      0,
 0xB376, 0xB377, 0x372E, 0x522E, 0xB378, 0x522F, 0xB379, 0xB37A,
 0x5230, 0x5231, 0x3C5B,      0,      0,      0, 0x387B, 0x4C5E,
};
const unsigned short utf8_to_euc_E58C[] = {
 0x794D, 0x4C68, 0x4677, 0xB37C,      0, 0x4A71, 0x5232, 0x794E,
 0x5233,      0, 0xB37D, 0xB37E, 0xB421, 0x5235,      0, 0x5237,
 0x5236, 0xB422,      0, 0xB423,      0, 0x5238, 0x323D, 0x4B4C,
 0xB424, 0x3A7C, 0x5239, 0xB425, 0xB426, 0x4159, 0xB427, 0xB428,
 0x3E22, 0x3629,      0, 0x523A, 0x794F, 0xB429,      0, 0xB42A,
 0xB42B, 0xB42C, 0x485B, 0xB42D, 0xB42E, 0xB42F,      0, 0x523B,
 0xB430, 0x523C, 0xB431, 0x523D,      0, 0xB432,      0,      0,
 0x523E, 0x4924, 0x3668, 0x3065, 0xB433, 0xB434, 0xB435, 0x463F,
};
const unsigned short utf8_to_euc_E58D[] = {
 0x523F, 0x3D3D, 0xB436, 0x4069,      0, 0x5241, 0x5240, 0x3E23,
 0x3861, 0x5243, 0x483E, 0xB438, 0xB437, 0x5244,      0,      0,
      0, 0x485C, 0x4234, 0x426E, 0x3628,      0,      0, 0x466E,
 0x4331, 0xB439, 0x476E, 0xB43A, 0x4B4E,      0, 0x5246,      0,
 0x406A, 0xB43B,      0, 0xB43C,      0, 0xB43D, 0x3735,      0,
      0, 0x5247,      0,      0, 0xB43E, 0xB43F, 0x5248, 0x312C,
 0x3075, 0x346D, 0x7950, 0x4228, 0x3551, 0x4D71,      0, 0x524B,
 0x3237, 0xB441,      0, 0x524A,      0,      0, 0xB442, 0x362A,
};
const unsigned short utf8_to_euc_E58E[] = {
      0,      0, 0x524C, 0xB443, 0x4C71,      0,      0, 0xB444,
 0xB445,      0,      0,      0,      0,      0, 0xB446,      0,
      0,      0,      0, 0x7951, 0xB448,      0, 0x524D,      0,
 0x4E52, 0xB449, 0x387C,      0,      0, 0xB44A,      0, 0x3836,
 0x524E, 0xB44B,      0,      0, 0xB44C, 0x5250, 0x524F,      0,
 0x3F5F, 0x3139, 0xB44D, 0xB44E,      0, 0x315E, 0x5251, 0xB44F,
 0x5252,      0, 0x7952, 0x3837, 0xB451, 0xB452, 0x5253, 0xB453,
 0xB454,      0, 0xB455, 0x356E,      0, 0xB456,      0,      0,
};
const unsigned short utf8_to_euc_E58F[] = {
 0xB457,      0, 0x3B32, 0x5254,      0, 0xB458,      0,      0,
 0x4B74, 0x3A35, 0x355A, 0x4D27, 0x4150, 0x483F, 0x3C7D, 0xB459,
      0,      0, 0xB45A, 0xB45B, 0x3D47, 0xB45C, 0x3C68, 0x3C75,
      0, 0x3D76, 0xB45D, 0x4840,      0, 0x7953, 0xB45F, 0x5257,
 0xB460, 0x3143, 0x4151, 0x387D, 0x3845, 0x3667, 0xB461, 0xB462,
 0x525B, 0x4321, 0x427E, 0x362B, 0x3E24, 0x525C, 0x525A, 0x3244,
 0x4266, 0x3C38, 0x3B4B, 0x3126,      0, 0xB463, 0x3370, 0x3966,
 0x3B4A,      0, 0x525D,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E590[] = {
      0, 0x525E, 0xB464, 0x3549, 0x3346,      0,      0,      0,
 0x3967, 0x3548, 0x445F, 0x3125, 0x4631, 0x4C3E, 0x3921, 0x4D79,
 0x4547, 0x387E,      0, 0xB465,      0,      0,      0,      0,
      0,      0, 0xB466, 0x372F,      0, 0x5267,      0, 0x3663,
 0x4B4A, 0xB467,      0,      0,      0,      0, 0x485D, 0xB468,
 0xB469, 0x5266, 0xB46A, 0x345E, 0x5261, 0x5262, 0x5264, 0xB46B,
      0, 0xB46C,      0,      0, 0xB46D, 0xB46E, 0x5265,      0,
 0x355B, 0x3F61,      0, 0x4A2D, 0x5263, 0x525F, 0x3863,      0,
};
const unsigned short utf8_to_euc_E591[] = {
 0x5260,      0, 0x4F24, 0xB46F, 0xB470,      0, 0x4A72, 0xB471,
 0x4468, 0x3862, 0x3970,      0,      0, 0xB472, 0x5268, 0xB473,
      0, 0x465D,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0xB474, 0x526C,
      0,      0, 0xB475,      0, 0xB476,      0, 0xB477, 0xB478,
 0x3C7E, 0xB479, 0x3C76, 0xB47A,      0, 0xB47B, 0xB47C,      0,
 0x526F, 0x526D,      0, 0x4C23, 0xB47D, 0x526A, 0x5273, 0x526E,
      0,      0,      0, 0x5271, 0x3846, 0x4C3F,      0, 0xB47E,
};
const unsigned short utf8_to_euc_E592[] = {
 0x5272, 0xB521,      0, 0xB522, 0x5274, 0xB523, 0x5276,      0,
 0xB524, 0xB525, 0x7956, 0x3A70, 0x4F42, 0xB526, 0x526B, 0x5269,
 0x5275, 0xB527, 0x5270,      0,      0, 0xB528, 0xB529,      0,
      0,      0,      0,      0, 0x7955,      0,      0, 0xB52B,
      0, 0xB52C, 0x5278,      0, 0x5323, 0x527A, 0xB52D, 0xB52E,
 0x527E, 0x7957, 0xB530, 0x5321, 0x527B, 0xB531, 0xB532, 0x533E,
      0, 0xB533, 0x3A69, 0x3331,      0,      0,      0, 0xB534,
 0x5279, 0xB535, 0xB536, 0xB537, 0x5325, 0x3076, 0x5324, 0xB538,
};
const unsigned short utf8_to_euc_E593[] = {
 0x3025, 0x494A, 0x5322,      0, 0x527C,      0, 0xB539, 0x5277,
 0x527D, 0x3A48, 0xB53A,      0,      0, 0xB53B, 0xB53C,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x5326,      0,      0,      0,      0,      0,      0,      0,
 0xB53D, 0x3077, 0x532F,      0,      0, 0x5327, 0x5328,      0,
 0x3E25, 0x4B69, 0xB53E,      0, 0xB53F, 0x532D, 0x532C, 0xB540,
      0,      0, 0x452F,      0,      0,      0, 0xB541,      0,
      0,      0, 0x532E,      0, 0xB542, 0x532B, 0xB543, 0x7958,
};
const unsigned short utf8_to_euc_E594[] = {
 0xB545, 0xB546,      0,      0, 0x3134, 0xB547, 0x3A36, 0x3F30,
 0xB548, 0xB549,      0,      0, 0xB54A, 0xB54B, 0xB54C, 0x5329,
 0x4562,      0,      0,      0, 0x532A, 0xB54D, 0x3022,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0xB54E, 0xB54F,      0,      0, 0x5334, 0x4D23,
      0, 0x3E27, 0xB550, 0x533A,      0, 0xB551, 0xB552,      0,
 0x5339, 0x5330,      0, 0xB553, 0xB554, 0xB555, 0x4243,      0,
};
const unsigned short utf8_to_euc_E595[] = {
 0x5331, 0xB556,      0,      0, 0x426F, 0x5336, 0x3E26, 0xB557,
      0, 0xB558, 0xB559,      0, 0x5333, 0xB55A,      0, 0x4C64,
 0xB55B, 0xB55C,      0, 0x373C,      0,      0, 0x5337, 0x5338,
 0xB55D,      0, 0xB55E, 0xB55F, 0x5335, 0x533B, 0xB560,      0,
 0xB561, 0xB562,      0, 0x5332, 0xB563,      0, 0xB564,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x5341, 0x5346,      0, 0x5342, 0xB565,
};
const unsigned short utf8_to_euc_E596[] = {
 0x533D, 0xB566, 0xB567, 0x5347, 0x4131,      0, 0x7959, 0x5349,
 0xB569, 0x3922, 0x533F, 0x437D,      0,      0, 0xB56A, 0xB56B,
      0, 0xB56C, 0xB56D, 0xB56E, 0xB56F,      0,      0, 0xB570,
 0x5343, 0x533C, 0x342D,      0, 0x346E, 0x3365, 0x5344, 0x5340,
      0,      0,      0, 0xB571, 0xB572,      0,      0, 0x3776,
 0x534A, 0x5348, 0x4153, 0x354A, 0x362C, 0xB573, 0x5345,      0,
 0x3674,      0, 0xB574,      0,      0,      0, 0x3144,      0,
      0,      0,      0,      0,      0,      0,      0, 0xB575,
};
const unsigned short utf8_to_euc_E597[] = {
      0, 0xB576,      0, 0xB577, 0x534E, 0x534C, 0xB578, 0x5427,
      0, 0xB579,      0, 0xB57A, 0xB57B,      0, 0xB57C,      0,
      0, 0xB57D, 0xB57E, 0xB621, 0x5351,      0,      0, 0xB622,
 0xB623,      0, 0x534B, 0xB624, 0x534F,      0, 0xB625, 0x534D,
      0,      0, 0xB626, 0x3B4C, 0x5350,      0,      0,      0,
      0, 0xB627,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0xB628, 0x5353,
      0, 0x5358,      0,      0,      0, 0x5356, 0x5355, 0xB629,
};
const unsigned short utf8_to_euc_E598[] = {
      0,      0,      0,      0,      0, 0xB62A, 0x4332,      0,
 0xB62B, 0x3245, 0xB62C,      0,      0, 0xB62D, 0xB62E, 0xB62F,
 0xB630, 0xB631, 0xB632,      0, 0x5352,      0, 0x5354, 0x3E28,
 0x3133, 0xB633,      0, 0x5357,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x325E,      0,      0, 0xB634,      0,      0, 0x5362,
 0xB635, 0x3E7C, 0x535E, 0xB636, 0x535C, 0xB637, 0x535D, 0xB638,
 0x535F, 0xB639,      0, 0xB63A, 0xB63B, 0xB63C,      0, 0xB63D,
};
const unsigned short utf8_to_euc_E599[] = {
 0xB63E, 0xB63F, 0x313D, 0xB640, 0xB641,      0, 0xB642,      0,
      0, 0xB643,      0, 0xB644, 0x4139, 0xB645, 0x5359, 0xB646,
 0x535A,      0,      0,      0, 0xB647,      0,      0,      0,
      0,      0,      0, 0x337A,      0,      0, 0xB648,      0,
 0xB649, 0xB64A, 0xB64B, 0xB64C, 0x5361,      0, 0xB64D,      0,
 0x346F, 0xB64E, 0x5364, 0x5360, 0x5363, 0xB64F,      0, 0xB650,
      0, 0xB651, 0xB652,      0, 0x4A2E, 0xB653,      0,      0,
 0x4655,      0, 0x4838,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E59A[] = {
 0x5366,      0,      0,      0, 0xB654, 0xB655, 0x5365, 0x3345,
 0xB656,      0, 0x5367, 0xB657, 0xB658,      0,      0, 0x536A,
      0,      0,      0,      0, 0x5369, 0xB659,      0,      0,
      0, 0xB65A, 0xB65B,      0,      0, 0xB65C, 0xB65D, 0xB65E,
 0x5368,      0, 0x4739,      0,      0, 0x536B, 0xB65F, 0xB660,
 0xB661, 0xB662,      0, 0xB663, 0xB664, 0xB665, 0x536C,      0,
      0, 0xB666,      0, 0xB667, 0x536E,      0, 0x536D, 0xB668,
      0,      0,      0,      0, 0x5370,      0, 0xB669,      0,
};
const unsigned short utf8_to_euc_E59B[] = {
 0x5373, 0x5371, 0x536F, 0x5372,      0, 0xB66A,      0,      0,
 0x5374, 0xB66B, 0xB66C, 0xB66D, 0xB670, 0xB671, 0x5375, 0xB66E,
 0xB66F, 0x5376,      0, 0x5377,      0,      0,      0, 0x5378,
 0x5145, 0xB672, 0x3C7C, 0x3B4D, 0xB673, 0xB674, 0x3273, 0xB675,
 0x3078, 0xB676,      0, 0x4344, 0xB677, 0xB678, 0xB679, 0xB67A,
 0xB67B,      0,      0, 0xB67D,      0, 0xB67E, 0x5379,      0,
 0x3A24, 0xB67C, 0x304F, 0x3F5E,      0,      0, 0xB721, 0xB722,
      0, 0x537A, 0x3847,      0,      0, 0x3971,      0, 0x537C,
};
const unsigned short utf8_to_euc_E59C[] = {
 0x537B, 0xB723, 0xB724, 0x4A60, 0x537D,      0,      0, 0xB725,
 0x5421, 0x537E, 0xB726, 0x5422, 0xB727, 0x5423,      0, 0x3777,
      0, 0xB728, 0x3160, 0x5424,      0, 0xB729, 0x5426,      0,
 0x5425,      0, 0xB72A, 0xB72B, 0x5428, 0xB72C,      0, 0x455A,
 0xB72D,      0, 0xB72E, 0xB72F, 0xB730, 0xB731, 0x5429, 0x3035,
 0x3A5F, 0xB732, 0xB733,      0, 0xB734, 0x373D, 0xB735, 0xB736,
 0x434F,      0,      0, 0xB737, 0xB738,      0,      0, 0x542A,
 0x542B,      0,      0, 0x542D,      0, 0xB739, 0xB73A, 0xB73B,
};
const unsigned short utf8_to_euc_E59D[] = {
 0x542E,      0, 0x3A64,      0,      0, 0xB73C, 0xB73D, 0x3651,
      0,      0, 0x4B37,      0, 0xB73E, 0xB73F, 0x542C, 0x542F,
 0x3A41, 0x3923, 0xB740,      0,      0,      0,      0,      0,
      0, 0x795A,      0,      0,      0,      0,      0,      0,
      0, 0x5433, 0xB741,      0, 0x3A25, 0x795B, 0x4333, 0xB743,
 0xB744, 0x5430, 0x445A, 0xB745,      0, 0xB746, 0xB747, 0xB748,
 0xB749, 0xB74A,      0, 0xB74B, 0xB74C, 0xB74D,      0, 0xB74E,
      0, 0xB74F, 0xB750, 0xB751, 0xB752,      0, 0xB753, 0x5434,
};
const unsigned short utf8_to_euc_E59E[] = {
      0, 0xB754, 0x3F62, 0xB755,      0,      0,      0,      0,
 0x5432, 0x5435,      0, 0x373F, 0xB756,      0,      0,      0,
      0,      0,      0, 0x5436, 0xB757, 0xB760,      0, 0xB758,
      0, 0xB759, 0xB75A,      0, 0xB75B, 0xB75C, 0xB75D, 0xB75E,
 0x5437, 0xB75F, 0x3924, 0x3340, 0x5439,      0,      0, 0xB761,
 0xB762, 0xB763, 0x543A,      0, 0x795C,      0,      0,      0,
 0x543B,      0,      0, 0x5438,      0,      0,      0,      0,
 0xB765,      0,      0,      0,      0, 0xB766,      0,      0,
};
const unsigned short utf8_to_euc_E59F[] = {
 0x5431,      0,      0, 0x543C,      0,      0, 0x543D, 0x795E,
 0x795D,      0,      0, 0x4B64, 0xB769,      0, 0x3E6B, 0xB76A,
      0,      0, 0x543F, 0x5440, 0x543E, 0xB76B, 0x5442,      0,
      0,      0,      0,      0, 0x4738, 0xB76C, 0xB76D, 0x3068,
 0x4956, 0xB77E,      0, 0x5443, 0xB76E,      0, 0xB76F, 0xB770,
      0, 0xB771,      0,      0,      0, 0xB772,      0,      0,
 0xB773,      0,      0,      0, 0x3E7D, 0xB774, 0xB775, 0x3C39,
 0xB776, 0x475D, 0x3470,      0, 0x3A6B, 0xB777, 0xB778, 0xB779,
};
const unsigned short utf8_to_euc_E5A0[] = {
 0x4B59,      0, 0x4632, 0xB77A, 0xB77B, 0x3778, 0x424F,      0,
 0xB77C, 0xB77D, 0x5441, 0x5444, 0xB821, 0xB822,      0,      0,
      0,      0,      0,      0,      0, 0x4244,      0,      0,
      0, 0x5445,      0, 0xB823,      0, 0x5446, 0xB824, 0xB825,
 0xB826, 0x5448,      0,      0, 0x4469,      0, 0xB827, 0xB828,
      0,      0, 0x342E,      0,      0, 0xB829,      0, 0x7421,
 0x3161, 0x4A73, 0xB82A,      0, 0x3E6C, 0x4548,      0,      0,
      0, 0xB82B, 0x3A66,      0,      0, 0x544E,      0, 0xB82C,
};
const unsigned short utf8_to_euc_E5A1[] = {
 0x4A3D, 0x4E5D,      0,      0,      0,      0,      0,      0,
      0, 0xB82D, 0x3274, 0x544A, 0xB82E, 0xB82F,      0, 0xB830,
 0xB831, 0x413A, 0x544D,      0, 0x4563, 0xB832,      0, 0x4549,
 0x4564, 0x4839, 0x444D,      0,      0,      0, 0x3A49, 0xB833,
      0, 0xB834, 0x5449,      0, 0xB835,      0,      0, 0xB836,
 0xB837, 0x3176,      0, 0x4536,      0,      0,      0,      0,
 0x544B,      0, 0x5447,      0,      0, 0x3F50,      0,      0,
 0xB838, 0x544F,      0,      0, 0xB839,      0, 0x3D4E, 0xB83A,
};
const unsigned short utf8_to_euc_E5A2[] = {
 0xB83B, 0xB83C,      0, 0x362D,      0, 0x5450,      0, 0xB83D,
 0xB83E, 0xB83F, 0xB840,      0, 0xB841, 0xB842,      0, 0xB843,
 0xB844,      0,      0, 0x4A68, 0xB845,      0, 0xB846, 0x417D,
      0,      0,      0,      0, 0x4446, 0xB847, 0x7961, 0x5452,
 0xB848, 0xB849, 0xB84A,      0,      0,      0, 0xB84B,      0,
 0x4B4F, 0xB84C,      0, 0x5453,      0,      0, 0x5458,      0,
      0, 0xB84D, 0x7962, 0x4A2F,      0,      0,      0,      0,
 0x5457, 0x5451, 0x5454, 0x5456, 0xB850,      0, 0x3A26,      0,
};
const unsigned short utf8_to_euc_E5A3[] = {
      0, 0x4A49, 0xB851,      0, 0xB84F, 0x5459,      0, 0x4345,
 0xB852,      0, 0x3275,      0, 0x3E6D, 0xB853, 0xB854,      0,
 0xB855, 0x545B, 0xB856, 0x545A, 0xB857, 0x3968, 0xB858, 0x545C,
 0x545E, 0x545D, 0xB859,      0, 0x5460, 0xB85A, 0x5455, 0x5462,
      0, 0xB85B, 0xB85C,      0, 0x5461, 0x545F,      0,      0,
      0, 0xB85D,      0, 0x3B4E, 0x3F51,      0, 0x4154, 0x5463,
 0x403C, 0x306D, 0x4764, 0xB85E,      0,      0,      0, 0x445B,
      0, 0x5465, 0x5464, 0x5466, 0x5467, 0x5468,      0,      0,
};
const unsigned short utf8_to_euc_E5A4[] = {
      0,      0, 0x5469,      0,      0, 0xB85F, 0xB860,      0,
      0, 0x4A51, 0x546A, 0x7963, 0xB862,      0,      0, 0x3246,
 0x546B,      0, 0xB863, 0xB864, 0xB865, 0x4D3C, 0x3330,      0,
 0x5249, 0x3D48, 0x423F, 0x546C, 0x4C6B, 0xB867,      0,      0,
      0, 0xB868, 0x4C34, 0xB869, 0xB86A, 0x546E,      0, 0x4267,
 0xB86B, 0x4537, 0x4240, 0x4957, 0x546F, 0x5470, 0x317B, 0xB86C,
 0xB86D, 0x3C3A, 0x5471, 0xB86E,      0, 0xB86F, 0xB870, 0x3050,
 0x5472,      0,      0,      0,      0,      0, 0x5473, 0xB871,
};
const unsigned short utf8_to_euc_E5A5[] = {
      0,      0,      0, 0xB872, 0x3162,      0, 0xB873, 0x3471,
 0x4660, 0x4A74,      0,      0,      0,      0, 0x5477, 0x4155,
 0x5476, 0x3740, 0xB874, 0x7964, 0x4B5B, 0x5475,      0, 0x4565,
 0x5479, 0xB876, 0x5478, 0x7965,      0, 0x7966, 0xB879, 0xB87A,
 0x547B, 0xB87B, 0x547A, 0x7967,      0, 0x317C,      0, 0x547C,
 0x3E29, 0x547E, 0x4325, 0xB87D, 0x547D, 0xB87E, 0x4A33, 0xB921,
      0,      0, 0xB922, 0x3D77, 0x455B, 0xB923, 0xB924,      0,
 0x5521, 0xB925,      0, 0xB926, 0xB927, 0x3925,      0,      0,
};
const unsigned short utf8_to_euc_E5A6[] = {
      0, 0x5522, 0x4721, 0x485E, 0x4C51,      0,      0,      0,
      0,      0, 0x4725, 0xB928, 0xB929, 0x552B, 0xB92A,      0,
      0,      0, 0xB92B, 0x3538,      0, 0xB92C, 0x4D45, 0xB92D,
      0, 0x4C2F,      0, 0x562C,      0, 0x5523,      0, 0xB92E,
      0,      0,      0, 0x5526, 0x7968, 0x4245,      0, 0xB930,
 0x4B38,      0,      0,      0, 0x454A, 0xB931, 0xB932, 0xB933,
 0xB934,      0, 0x5527, 0xB935,      0,      0,      0, 0xB936,
      0, 0x4B65, 0x7969, 0x3A4A, 0xB938,      0, 0x3E2A,      0,
};
const unsigned short utf8_to_euc_E5A7[] = {
      0, 0xB939,      0, 0xB93A, 0xB93B,      0, 0x5528,      0,
 0xB93C, 0x3B50, 0xB93D, 0x3B4F,      0, 0xB93E,      0,      0,
 0x3039, 0x3848, 0xB93F, 0x402B, 0x3051,      0,      0,      0,
      0, 0x552C, 0x552D,      0, 0x552A, 0xB940, 0xB941, 0xB942,
      0,      0,      0, 0xB943, 0xB944, 0x3138, 0x342F, 0xB945,
 0x5529,      0, 0x4C45, 0x4931,      0,      0, 0xB946, 0xB947,
      0, 0xB948, 0xB949,      0, 0xB94A,      0, 0x3028, 0xB94B,
      0,      0,      0, 0x3079,      0,      0,      0, 0x3B51,
};
const unsigned short utf8_to_euc_E5A8[] = {
 0xB94C, 0x3052,      0, 0x3023, 0xB94D,      0,      0,      0,
      0, 0x5532,      0,      0, 0xB94E, 0xB94F, 0xB950,      0,
      0, 0x5530, 0xB951, 0xB952,      0,      0,      0,      0,
 0x4C3C,      0, 0x5533,      0, 0x5531,      0, 0xB953, 0x552F,
 0x3F31,      0,      0, 0xB954, 0xB955, 0x552E,      0, 0xB956,
 0xB957, 0x4A5A, 0xB958,      0,      0, 0xB959,      0, 0x3864,
 0xB95A,      0,      0,      0,      0, 0x5537, 0x5538,      0,
      0,      0,      0,      0, 0x3E2B,      0,      0,      0,
};
const unsigned short utf8_to_euc_E5A9[] = {
 0x5534, 0x4F2C,      0,      0, 0xB95B, 0xB95C, 0x474C, 0xB95D,
 0xB95E, 0x5536,      0,      0, 0xB95F,      0,      0,      0,
 0xB960,      0,      0,      0,      0, 0xB961,      0,      0,
      0,      0, 0x3A27,      0,      0,      0, 0xB962,      0,
      0,      0, 0x5539, 0xB963,      0, 0xB964, 0x4958, 0xB965,
      0,      0, 0x553A,      0, 0x5535, 0xB966,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0xB967,
      0,      0, 0xB968, 0xB969,      0,      0, 0xB96A, 0x4C3B,
};
const unsigned short utf8_to_euc_E5AA[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0xB96B,      0,      0,      0,      0,
 0xB96C,      0, 0x475E, 0xB96D,      0,      0, 0xB96E,      0,
      0, 0xB96F, 0x553B, 0x4932, 0xB970,      0, 0xB971, 0xB972,
 0xB973,      0, 0xB974,      0,      0,      0,      0, 0xB975,
      0,      0,      0,      0, 0xB976,      0,      0,      0,
      0, 0xB977, 0xB978, 0xB979,      0, 0xB97A,      0,      0,
 0xB97B,      0, 0xB97C, 0xB97D, 0x553C, 0x5540, 0x553D, 0xB97E,
};
const unsigned short utf8_to_euc_E5AB[] = {
      0, 0x3247, 0x553F,      0, 0xBA21,      0, 0xBA22,      0,
 0xBA23, 0x3C3B,      0, 0x553E, 0x3779,      0,      0, 0xBA24,
 0x554C,      0,      0,      0,      0,      0, 0x5545, 0x5542,
      0,      0, 0xBA25,      0, 0xBA26,      0,      0,      0,
 0xBA27, 0x4364,      0, 0x5541,      0, 0xBA28, 0x5543,      0,
      0, 0x5544, 0xBA29,      0,      0,      0, 0xBA2A,      0,
      0,      0,      0,      0,      0, 0xBA2B, 0xBA2C,      0,
      0,      0, 0x5546, 0x5547,      0, 0xBA2D,      0,      0,
};
const unsigned short utf8_to_euc_E5AC[] = {
 0xBA2E, 0xBA2F,      0,      0,      0,      0,      0,      0,
 0xBA30, 0x3472,      0, 0x5549, 0x5548,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x554A, 0xBA31,
      0, 0xBA33,      0, 0xBA34,      0, 0xBA35,      0,      0,
      0, 0xBA36, 0x3E6E,      0,      0, 0xBA37,      0,      0,
      0,      0, 0x554D,      0, 0x445C, 0xBA38,      0,      0,
 0x3145,      0, 0x554B,      0, 0xBA32,      0, 0x554E,      0,
 0xBA39,      0,      0,      0,      0,      0, 0x554F,      0,
};
const unsigned short utf8_to_euc_E5AD[] = {
 0x5552, 0xBA3A,      0, 0x5550,      0, 0x5551,      0,      0,
      0,      0,      0, 0xBA3B, 0xBA3C,      0,      0,      0,
 0x3B52, 0x5553, 0xBA3D,      0, 0x3926, 0x5554, 0x796A, 0x3B7A,
 0x4238,      0, 0x5555, 0x5556, 0x3B5A, 0x3927, 0xBA3F, 0x4C52,
      0,      0,      0, 0x3528, 0x3849, 0x5557, 0x3358,      0,
 0xBA40, 0x5558,      0, 0x4239,      0,      0, 0xBA41, 0xBA42,
 0x5559, 0x5623,      0, 0x555A,      0, 0x555B,      0,      0,
 0x555C,      0, 0x555E,      0, 0xBA43, 0xBA44, 0xBA45, 0xBA46,
};
const unsigned short utf8_to_euc_E5AE[] = {
 0x555F, 0xBA47,      0, 0x5560, 0xBA48, 0x4270, 0xBA49, 0x3127,
 0x3C69, 0x3042, 0xBA4A, 0x4157, 0x3430, 0x3C35, 0xBA4B, 0x3928,
 0xBA4C, 0xBA4D,      0, 0xBA4E, 0xBA4F, 0x4566, 0xBA50, 0x3D21,
 0x3431, 0x4368, 0x446A, 0x3038, 0x3539, 0x4A75,      0, 0x3C42,
      0,      0, 0x3552, 0x406B, 0x3C3C, 0x4D28, 0x5561,      0,
 0xBA51, 0xBA52,      0,      0, 0xBA53, 0xBA54, 0x355C, 0xBA55,
 0x3A4B, 0xBA56, 0xBA57, 0x3332, 0x3163, 0x3E2C, 0x3248, 0xBA58,
 0x5562, 0x4D46, 0xBA59,      0, 0xBA5A,      0,      0, 0x3D49,
};
const unsigned short utf8_to_euc_E5AF[] = {
 0x796B, 0xBA5C, 0x3C64, 0x5563, 0x3473, 0x4652, 0x4C29, 0x5564,
      0, 0x5565,      0,      0, 0x4959, 0xBA5D,      0, 0xBA5E,
 0x5567,      0, 0x3428, 0x3677, 0x5566,      0, 0xBA5F, 0xBA60,
 0x796D, 0xBA62, 0xBA63, 0x3432,      0, 0x3F32, 0x556B, 0x3B21,
 0xBA64, 0x3249, 0x556A,      0, 0x5568, 0x556C, 0x5569, 0x472B,
 0x5C4D, 0x3F33,      0, 0x556D, 0x796E,      0, 0x4E40, 0xBA65,
 0x556E, 0xBA66,      0, 0x5570, 0xBA67, 0x437E, 0x556F,      0,
 0x4023,      0, 0x3B7B,      0,      0, 0xBA68, 0x4250, 0x3C77,
};
const unsigned short utf8_to_euc_E5B0[] = {
      0, 0x4975, 0x406C,      0, 0x3C4D, 0x5571, 0x3E2D, 0x5572,
 0x5573, 0x3053, 0x423A, 0x3F52, 0xBA69, 0x5574, 0x4633, 0x3E2E,
      0, 0x3E2F,      0, 0x5575,      0,      0, 0x406D, 0xBA6A,
      0,      0, 0x3E30,      0,      0,      0, 0x796F, 0xBA6C,
 0x5576,      0, 0x5577, 0xBA6D, 0x4C60,      0, 0xBA6E,      0,
 0x5578, 0xBA6F,      0, 0xBA70, 0xBA71, 0x3646, 0xBA72,      0,
 0xBA73, 0x3D22, 0xBA74,      0,      0, 0xBA75, 0xBA76,      0,
 0x5579, 0x557A, 0x3C5C, 0x3F2C, 0x4674, 0x3F54, 0x4878, 0x4722,
};
const unsigned short utf8_to_euc_E5B1[] = {
 0x3649, 0x557B,      0,      0,      0, 0x356F, 0x557C,      0,
 0x367E,      0, 0x464F, 0x3230,      0, 0x3B53, 0x557D, 0x5622,
 0x5621, 0x367D,      0, 0x557E,      0, 0x4538,      0,      0,
      0, 0xBA77, 0xBA78,      0, 0xBA79,      0, 0x4230,      0,
 0x454B, 0x3C48, 0xBA7A, 0xBA7B, 0x4158, 0x4D7A,      0, 0xBA7C,
 0xBA7D, 0xBA7E,      0,      0, 0x5624, 0xBB21, 0x5625, 0x4656,
 0xBB22, 0x3B33,      0,      0, 0xBB23, 0xBB24, 0x5627,      0,
      0, 0x5628, 0xBB25, 0xBB26, 0xBB27, 0xBB28,      0,      0,
};
const unsigned short utf8_to_euc_E5B2[] = {
      0,      0,      0,      0,      0,      0,      0, 0xBB29,
 0xBB2A,      0, 0xBB2B,      0, 0x5629,      0,      0, 0xBB2C,
 0x3474, 0x562A, 0xBB2D,      0, 0x562B,      0,      0,      0,
      0,      0,      0,      0,      0, 0xBB2E,      0, 0xBB2F,
 0xBB30, 0x322C, 0xBB31, 0xBB32,      0,      0, 0x7970,      0,
 0x413B, 0x3464, 0xBB34, 0x562D, 0x4C28,      0,      0,      0,
      0, 0x4252, 0xBB35, 0x3359, 0xBB36, 0xBB37, 0x562F, 0x5631,
 0x345F,      0, 0x7971, 0x562E, 0x5630,      0, 0x5633,      0,
};
const unsigned short utf8_to_euc_E5B3[] = {
      0,      0,      0,      0,      0, 0x5632,      0, 0x5634,
      0, 0xBB39,      0, 0xBB3A,      0,      0,      0,      0,
      0,      0, 0xBB3B,      0,      0,      0,      0, 0xBB3D,
      0, 0x5635,      0,      0,      0, 0xBB3C,      0,      0,
 0x463D, 0x362E,      0,      0,      0,      0,      0,      0,
 0x3265, 0x5636, 0x563B,      0,      0, 0x5639, 0xBB3E, 0x4A77,
 0x4A76, 0xBB3F, 0xBB40,      0, 0xBB41, 0x7972, 0x4567,      0,
      0,      0, 0x5638, 0x3D54,      0, 0x5637,      0,      0,
};
const unsigned short utf8_to_euc_E5B4[] = {
      0, 0xBB42,      0,      0,      0,      0, 0xBB43, 0x3F72,
      0,      0,      0, 0x563C,      0, 0xBB44, 0x3A6A,      0,
      0, 0x5642, 0xBB45,      0, 0x5643, 0x563D, 0x3333, 0x563E,
 0x5647, 0x5646, 0x5645, 0x5641,      0,      0,      0, 0x5640,
      0,      0, 0x5644, 0xBB47, 0xBB48,      0, 0xBB49, 0x7973,
      0, 0x4A78,      0, 0xBB46,      0,      0,      0,      0,
      0, 0xBB4B,      0,      0, 0xBB4C,      0,      0,      0,
      0, 0xBB4D,      0,      0,      0, 0xBB4E,      0, 0xBB4F,
};
const unsigned short utf8_to_euc_E5B5[] = {
      0,      0, 0x7976, 0xBB51,      0,      0, 0xBB52,      0,
 0xBB53,      0, 0xBB57, 0x564B, 0x5648,      0, 0x564A,      0,
 0x4D72, 0xBB55, 0x5649, 0x7974,      0, 0xBB54,      0,      0,
      0, 0xBB56,      0,      0, 0x563F,      0,      0, 0xBB58,
 0xBB59, 0xBB5A, 0xBB5B,      0, 0xBB5C,      0,      0,      0,
      0, 0x3F73, 0xBB5D,      0, 0x564C, 0x7977,      0, 0x3A37,
 0xBB5F,      0,      0, 0x564D,      0,      0, 0x564E,      0,
      0, 0xBB60, 0xBB61,      0,      0,      0, 0xBB62, 0xBB63,
};
const unsigned short utf8_to_euc_E5B6[] = {
      0, 0xBB64, 0x5651, 0xBB65, 0x5650,      0,      0, 0x564F,
 0xBB66,      0, 0xBB67, 0x4568, 0x563A,      0,      0,      0,
 0x5657,      0, 0xBB68, 0xBB69, 0xBB6A, 0xBB6B,      0,      0,
      0, 0xBB6C,      0, 0xBB6D,      0, 0x5653,      0, 0xBB6E,
 0xBB6F,      0, 0x5652,      0,      0,      0,      0, 0xBB70,
      0,      0,      0, 0xBB71, 0x5654,      0, 0x5655,      0,
 0xBB72,      0, 0xE674,      0, 0xBB73,      0,      0, 0x5658,
 0x7978, 0x7979, 0x4E66,      0, 0x5659, 0x5656,      0,      0,
};
const unsigned short utf8_to_euc_E5B7[] = {
      0,      0,      0, 0xBB76,      0,      0,      0, 0xBB77,
      0, 0x565A,      0, 0xBB78, 0x3460, 0x565B, 0xBB7A,      0,
 0x797A,      0, 0x565D, 0x565C,      0,      0, 0x565E,      0,
 0xBB7B, 0xBB7C,      0, 0x565F,      0, 0x406E, 0x3D23,      0,
 0xBB7D, 0x3D64,      0, 0x4163, 0xBB7E, 0x3929, 0x3A38, 0x392A,
 0x3570, 0xBC21,      0, 0x5660,      0,      0, 0x3A39,      0,
      0, 0x384A, 0x5661, 0x4C26, 0x4743, 0x5662,      0, 0x392B,
 0xBC22, 0xBC23,      0, 0x342C,      0, 0x4327, 0x3652,      0,
};
const unsigned short utf8_to_euc_E5B8[] = {
 0xBC24,      0, 0x3B54, 0x495B,      0,      0, 0x4841, 0xBC25,
      0,      0,      0, 0x5663, 0x3475, 0xBC26,      0,      0,
      0, 0x5666, 0xBC27,      0, 0xBC28, 0xBC29, 0x4421,      0,
 0xBC2A, 0x5665, 0x5664, 0x5667,      0, 0x446B,      0, 0xBC2B,
 0xBC2C,      0,      0,      0,      0, 0x3F63,      0,      0,
 0xBC2E,      0,      0, 0x3B55,      0, 0x404A, 0xBC2D, 0x4253,
 0x3522,      0, 0xBC2F, 0x4422,      0, 0xBC30, 0x5668, 0x5669,
 0x3E6F,      0,      0,      0,      0, 0x4B39, 0xBC31,      0,
};
const unsigned short utf8_to_euc_E5B9[] = {
 0x566C,      0,      0, 0x566B, 0x566A, 0x497D,      0, 0x5673,
      0, 0xBC34,      0, 0xBC32, 0x4B5A,      0, 0x566D,      0,
 0xBC33, 0xBC35,      0,      0, 0x566F, 0x4B6B, 0xBC36, 0x566E,
 0xBC37,      0,      0, 0xBC38, 0xBC39,      0, 0xBC3A, 0x5670,
      0, 0x4828, 0x5671, 0x4A3E, 0x5672,      0,      0,      0,
 0xBC3B,      0, 0xBC3C, 0xBC3D, 0xBC3E, 0xBC3F, 0xBC40,      0,
 0xBC41,      0, 0x3433, 0x4A3F, 0x472F, 0x5674, 0x5675,      0,
 0x392C, 0x3434, 0x5676, 0x3838, 0x4D44, 0x4D29, 0x3476, 0x5678,
};
const unsigned short utf8_to_euc_E5BA[] = {
 0xBC42, 0x4423,      0, 0x392D, 0x3E31,      0,      0, 0x485F,
      0,      0, 0x3E32, 0xBC43,      0,      0, 0xBC44, 0x3D78,
      0,      0,      0,      0,      0, 0x446C, 0x4A79, 0x4539,
      0,      0, 0x392E,      0, 0x495C,      0,      0,      0,
 0x5679,      0, 0xBC45,      0, 0xBC46, 0xBC47, 0x4559, 0x3A42,
 0xBC48,      0, 0xBC49, 0x384B, 0xBC4A, 0x446D,      0,      0,
      0, 0xBC4B,      0, 0xBC4C,      0, 0x3043, 0x3D6E, 0x392F,
 0x4D47,      0,      0,      0,      0, 0xBC4D, 0xBC4E, 0xBC4F,
};
const unsigned short utf8_to_euc_E5BB[] = {
      0, 0x567A, 0x567B, 0x4751,      0,      0, 0xBC50,      0,
 0x567C, 0x4E77, 0x4F2D, 0xBC52, 0xBC51,      0, 0xBC53, 0x567E,
 0x567D, 0xBC54, 0xBC55, 0x3347, 0xBC56, 0xBC57, 0x5721,      0,
      0,      0, 0x5724, 0x5725, 0xBC58, 0x5723, 0xBC59, 0x4940,
 0x3E33, 0x5727, 0x5726, 0x5722,      0, 0xBC5A,      0,      0,
 0x5728, 0x5729,      0, 0xBC5B, 0x572A,      0,      0,      0,
 0x572D, 0x572B,      0, 0x572C, 0x572E,      0, 0x3164, 0x446E,
 0x572F,      0, 0x377A, 0x3276, 0x4736,      0, 0x5730, 0x467B,
};
const unsigned short utf8_to_euc_E5BC[] = {
      0, 0x4A5B, 0xBC5C, 0x5731, 0x4F2E,      0, 0xBC5D, 0xBC5E,
 0xBC5F, 0x5732, 0x4A40, 0x5735, 0x5021, 0x5031, 0xBC60, 0x3C30,
 0x4675, 0x5736,      0, 0x355D, 0x4424, 0x307A, 0x5737, 0x4A26,
 0x3930, 0xBC61,      0, 0x4350, 0xBC62, 0xBC63,      0, 0x446F,
      0, 0x797B, 0xBC65, 0xBC66, 0xBC67, 0x4C6F, 0x3839, 0x384C,
 0xBC68, 0x5738,      0, 0xBC69, 0xBC6A, 0x5739, 0xBC6B, 0x573F,
 0xBC6C, 0x3C65,      0,      0, 0x797C, 0x4425, 0xBC6E, 0x362F,
 0x573A,      0,      0, 0xBC6F, 0x492B, 0xBC70, 0x4346, 0xBC71,
};
const unsigned short utf8_to_euc_E5BD[] = {
 0xBC72, 0x573B,      0,      0, 0xBC73, 0x792C,      0, 0xBC75,
 0x573C,      0, 0x3630,      0, 0x573D, 0xBC76, 0x573E,      0,
 0xBC77, 0x5740,      0, 0x4576, 0xBC78,      0, 0x5741, 0x5742,
 0xBC79, 0x5743,      0, 0xBC7A, 0x5734, 0x5733,      0,      0,
 0xBC7B, 0x5744, 0x3741, 0xBC7C, 0xBC7D,      0, 0x4927, 0x797D,
      0, 0x3A4C, 0x4937, 0x4426, 0x494B, 0x5745,      0, 0xBD21,
 0x3E34, 0x3146, 0xBD22, 0x5746, 0xBD23, 0xBD24,      0, 0x5747,
 0xBD25, 0x4C72, 0xBD26,      0, 0x4860, 0xBD27, 0xBD28, 0x574A,
};
const unsigned short utf8_to_euc_E5BE[] = {
 0x317D, 0x402C, 0x5749, 0x5748, 0x3742, 0x4254,      0, 0x574E,
 0x574C, 0xBD29, 0x574B, 0x4E27, 0x3865, 0xBD2A,      0, 0xBD2B,
 0x3D79, 0x574D, 0x454C, 0x3D3E,      0,      0, 0xBD2C, 0x4640,
 0x5751, 0x5750,      0,      0, 0xBD2D, 0xBD2E, 0x574F,      0,
 0x5752, 0x3866, 0xBD2F,      0, 0xBD32,      0,      0, 0xBD30,
 0x5753, 0x497C, 0x3D5B, 0xBD31, 0xBD33, 0x5754, 0x4879, 0xBD34,
 0xBD35, 0xBD36,      0, 0x4641, 0x4427,      0,      0, 0x797E,
 0xBD37, 0x4530,      0,      0, 0x5755, 0x352B,      0,      0,
};
const unsigned short utf8_to_euc_E5BF[] = {
      0,      0,      0, 0x3F34, 0xBD38, 0x492C,      0, 0xBD39,
 0xBD3A, 0xBD3B,      0, 0xBD3C, 0x3477, 0x4726,      0,      0,
 0xBD3D, 0xBD3E, 0xBD3F, 0xBD40, 0xBD41,      0, 0x5756, 0x3B56,
 0x4B3A, 0x4B3B,      0,      0, 0x317E, 0x575B, 0x7A21,      0,
 0x4369, 0xBD43, 0xBD44,      0, 0x5758,      0,      0,      0,
 0xBD45, 0xBD46, 0xBD47, 0x3277, 0xBD48, 0xBD49, 0xBD4A, 0xBD4B,
 0x582D, 0x575A, 0xBD4C, 0xBD4D,      0, 0x4730, 0xBD4E,      0,
 0x5759,      0, 0xBD4F, 0x5757, 0xBD50, 0x397A,      0, 0x575D,
};
const unsigned short utf8_to_euc_E680[] = {
      0,      0,      0,      0,      0,      0,      0, 0xBD51,
      0,      0, 0xBD52,      0,      0, 0xBD53, 0x5763, 0x5769,
 0x5761,      0, 0x455C, 0xBD54, 0xBD55, 0x5766, 0x495D, 0xBD56,
 0xBD57, 0x5760, 0xBD58, 0x5765, 0x4E67, 0x3B57,      0, 0xBD59,
 0x4255, 0x575E,      0,      0, 0xBD5A, 0x355E, 0x5768, 0x402D,
 0x3165, 0x5762, 0x3278, 0x5767,      0, 0xBD5B,      0, 0x3631,
      0, 0x5764,      0, 0xBD5C,      0, 0xBD5D,      0,      0,
      0,      0, 0x576A,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E681[] = {
 0xBD5E, 0x576C, 0x5776, 0x5774,      0,      0, 0x5771, 0xBD5F,
 0xBD60, 0xBD61, 0x5770, 0x4E78, 0xBD62, 0x5772,      0,      0,
 0x3632, 0xBD63, 0x3931,      0, 0xBD64, 0x3D7A, 0xBD65, 0xBD66,
      0, 0x5779, 0x576B,      0,      0, 0x7A22,      0, 0x576F,
 0x575F, 0xBD68, 0x327A, 0x5773, 0x5775, 0x4351,      0, 0xBD69,
 0x3A28, 0x3238, 0x576D, 0x5778, 0x5777, 0x3633,      0, 0x4229,
 0x3366, 0xBD6A,      0,      0,      0, 0x3743,      0, 0x576E,
      0,      0,      0,      0,      0,      0, 0xBD6B, 0xBD6C,
};
const unsigned short utf8_to_euc_E682[] = {
      0, 0x577A, 0xBD6D, 0x577D, 0x5821, 0x7A23, 0xBD6E,      0,
 0xBD6F, 0x3C3D, 0x7A24, 0x5827, 0x4470, 0x577B, 0xBD71,      0,
      0, 0xBD72, 0x5825, 0xBD73, 0x3279, 0xBD74, 0x5823, 0x5824,
 0xBD75,      0, 0x577E, 0x5822,      0, 0xBD76, 0xBD77, 0x3867,
 0x4D2A,      0, 0xBD78, 0x3435, 0xBD79, 0xBD7A, 0x3159, 0x5826,
 0xBD7B, 0x473A, 0x302D,      0,      0,      0,      0,      0,
 0xBD7C, 0xBD7D, 0x4861, 0x575C, 0x582C, 0x5830, 0x4C65, 0xBD7E,
 0x5829,      0,      0, 0xBE21, 0x4569, 0x582E, 0xBE22,      0,
};
const unsigned short utf8_to_euc_E683[] = {
      0,      0, 0xBE23,      0, 0xBE24, 0x3E70, 0x582F, 0x4657,
 0xBE25, 0xBE26, 0xBE27, 0xBE28,      0,      0, 0xBE29, 0xBE2A,
      0, 0x4F47,      0, 0x582B, 0xBE2B, 0x7A26,      0,      0,
 0x5831, 0xBE2D, 0x397B, 0xBE2E, 0x404B, 0xBE2F, 0x7A25, 0x3054,
 0x582A, 0x5828, 0xBE31, 0x415A,      0, 0xBE32,      0, 0x577C,
 0x3B34,      0,      0,      0,      0,      0,      0,      0,
 0x4246, 0x583D, 0x7A28, 0x415B, 0x5838, 0xBE34, 0x5835, 0x5836,
 0xBE35, 0x3C66, 0x5839, 0x583C, 0xBE36, 0xBE37,      0,      0,
};
const unsigned short utf8_to_euc_E684[] = {
 0x5837, 0x3D25, 0xBE38, 0x583A,      0,      0, 0x5834, 0xBE39,
 0x4C7C, 0x4C7B, 0xBE3A,      0, 0xBE3B, 0x583E, 0x583F, 0x3055,
 0xBE3C, 0x7A29, 0xBE3E, 0xBE3F, 0xBE40, 0x5833, 0xBE41, 0xBE42,
      0, 0xBE43, 0x3672, 0x3026, 0xBE44,      0, 0xBE45, 0x3436,
 0x7A27, 0x583B, 0xBE46,      0,      0,      0,      0, 0x5843,
 0x5842,      0, 0xBE47, 0xBE48, 0x5847,      0,      0,      0,
 0x7A2B, 0xBE4A,      0,      0, 0x5848, 0xBE4B, 0xBE4C, 0x7A2A,
      0, 0xBE4E,      0,      0, 0x5846, 0x5849, 0x5841, 0x5845,
};
const unsigned short utf8_to_euc_E685[] = {
      0, 0xBE4F, 0x584A,      0, 0x584B, 0xBE50, 0xBE51, 0x5840,
 0x3B7C, 0xBE52, 0x5844, 0x4256, 0x3932, 0x5832, 0x3F35,      0,
      0,      0,      0, 0x5858,      0, 0x4A69,      0,      0,
 0x584E, 0x584F, 0x5850,      0,      0, 0x5857, 0xBE53, 0x5856,
 0xBE54,      0, 0x4B7D, 0x3437,      0, 0x5854,      0, 0x3745,
 0x3334,      0,      0, 0x5851, 0xBE55,      0, 0x4E38, 0x5853,
 0x3056, 0x5855, 0xBE56, 0x584C, 0x5852, 0x5859, 0x3744, 0x584D,
 0xBE57,      0,      0, 0xBE58, 0xBE59,      0, 0x4D5D, 0xBE5A,
};
const unsigned short utf8_to_euc_E686[] = {
 0xBE5B, 0xBE5C, 0x4D2B, 0xBE5D, 0xBE5E,      0,      0, 0x585C,
      0,      0, 0x5860, 0xBE5F,      0, 0xBE60, 0x417E,      0,
 0x4E79, 0x5861, 0xBE61, 0xBE62, 0x585E,      0, 0x585B, 0xBE63,
 0x7A2C, 0x585A, 0x585F,      0, 0xBE65, 0xBE66,      0, 0xBE67,
 0xBE68,      0,      0,      0, 0x4A30, 0xBE69,      0, 0x4634,
 0xBE6A, 0x3746, 0xBE6B, 0x5862, 0x585D, 0xBE6C, 0x5863,      0,
      0,      0, 0x377B,      0,      0,      0, 0x3231,      0,
 0xBE6D, 0xBE6E, 0x586B,      0, 0xBE6F,      0, 0x3438,      0,
};
const unsigned short utf8_to_euc_E687[] = {
 0xBE70, 0xBE71, 0xBE72, 0x5869,      0,      0, 0x586A, 0x3A29,
 0x5868, 0x5866, 0x5865, 0x586C, 0x5864, 0x586E, 0xBE73, 0xBE74,
 0x327B,      0,      0,      0,      0, 0xBE75,      0,      0,
      0,      0,      0,      0, 0xBE76, 0xBE77, 0xBE78, 0xBE79,
      0, 0xBE7A, 0xBE7B, 0x5870,      0, 0xBE7E, 0x586F, 0xBE7C,
      0, 0xBE7D,      0,      0, 0xBF21, 0xBF22,      0, 0xBF23,
      0,      0, 0x4428,      0, 0x5873,      0, 0x5871, 0x5867,
 0x377C,      0, 0x5872,      0, 0x5876, 0x5875, 0x5877, 0x5874,
};
const unsigned short utf8_to_euc_E688[] = {
 0x5878, 0xBF24,      0, 0xBF25, 0xBF26,      0,      0, 0xBF27,
 0x5879, 0x587A, 0x4A6A,      0, 0x587C, 0x587B, 0x3D3F,      0,
 0x402E, 0x3266, 0x327C, 0x7A2D, 0x587D, 0xBF29, 0x303F,      0,
      0,      0, 0x404C, 0x587E, 0xBF2A, 0x6C43, 0x5921, 0x3761,
 0xBF2B, 0x5922, 0xBF2C, 0xBF2D,      0,      0, 0x406F, 0xBF2E,
      0, 0xBF2F, 0x5923, 0xBF30,      0,      0, 0x5924, 0x353A,
 0x5925,      0, 0x5926, 0x5927, 0x4257,      0,      0,      0,
 0x384D, 0xBF31,      0, 0x4C61,      0, 0xBF32,      0, 0x4B3C,
};
const unsigned short utf8_to_euc_E689[] = {
 0x3D6A, 0x5928, 0xBF33, 0xBF34, 0xBF35,      0, 0xBF36, 0x4070,
 0x6E3D, 0x4862,      0, 0x3C6A, 0xBF37, 0x3A4D, 0x5929,      0,
 0xBF38, 0xBF39, 0xBF3A, 0x4247, 0xBF3B, 0x4A27, 0xBF3C,      0,
 0x4271,      0, 0xBF3D, 0x592C, 0xBF3E,      0, 0x592A,      0,
 0x592D,      0,      0, 0x592B, 0xBF3F,      0,      0,      0,
 0x592E,      0,      0,      0,      0, 0xBF40, 0x4A31, 0xBF41,
      0, 0x3037,      0, 0xBF42,      0,      0, 0x495E,      0,
      0, 0x4863, 0xBF43,      0, 0x592F, 0xBF44, 0x5932, 0x3E35,
};
const unsigned short utf8_to_euc_E68A[] = {
 0x353B,      0, 0x5930, 0x5937, 0x3E36,      0,      0,      0,
      0, 0x5931, 0x4744,      0,      0, 0xBF45, 0xBF46, 0xBF47,
 0xBF48, 0x4D5E, 0x5933, 0x5934, 0x5938, 0x456A, 0x5935, 0x3933,
 0x405E,      0,      0, 0x5946, 0x4834,      0, 0x4272,      0,
      0,      0,      0,      0,      0,      0, 0x7A2E,      0,
 0xBF4A,      0,      0, 0x4864, 0x5A2D,      0,      0,      0,
      0, 0x4A7A,      0, 0xBF4B,      0, 0x4471, 0xBF4C, 0xBF4D,
      0, 0x4B75, 0xBF4E, 0x593B, 0x3221, 0x436A, 0xBF4F, 0xBF50,
};
const unsigned short utf8_to_euc_E68B[] = {
      0,      0, 0x5944,      0, 0xBF51, 0x4334, 0x593E, 0x5945,
 0x5940, 0x5947, 0x5943,      0, 0x5942, 0x476F, 0xBF52, 0x593C,
 0x327D, 0x593A, 0x3571, 0x4273, 0x5936, 0xBF53, 0xBF54, 0x5939,
 0x3934, 0x405B, 0xBF55, 0x3E37, 0x5941, 0x4752,      0,      0,
 0x3572, 0x3348,      0,      0,      0,      0,      0,      0,
      0,      0, 0xBF56,      0, 0x3367, 0x3F21, 0x5949, 0x594E,
      0, 0x594A, 0xBF57, 0x377D, 0xBF58, 0x594F, 0x3B22, 0x3969,
      0,      0,      0,      0, 0xBF59, 0xBF5A, 0x3D26, 0x593D,
};
const unsigned short utf8_to_euc_E68C[] = {
      0, 0x3B7D, 0x594C, 0xBF5B, 0xBF5C,      0,      0, 0x3B58,
 0x594D, 0x3044, 0xBF5D, 0xBF5E, 0x5948, 0xBF5F,      0,      0,
 0xBF60, 0x4429,      0, 0xBF61,      0,      0, 0xBF62,      0,
 0xBF63, 0x3573,      0,      0,      0,      0,      0, 0x3634,
      0,      0,      0,      0,      0,      0,      0, 0x594B,
 0x3027, 0xBF64, 0xBF65, 0x3A43,      0, 0xBF66,      0, 0x3F36,
      0,      0,      0,      0,      0, 0xBF67, 0xBF68,      0,
      0, 0xBF69, 0x4472,      0, 0xBF6A, 0x4854, 0x5951, 0x415E,
};
const unsigned short utf8_to_euc_E68D[] = {
      0, 0xBF6B, 0xBF6C, 0xBF6D, 0xBF6E,      0, 0xBF6F,      0,
      0, 0x422A, 0xBF70, 0xBF71, 0x3B2B, 0x5952, 0xBF72, 0x5954,
 0x5950,      0, 0xBF73, 0xBF74, 0xBF75, 0x4A61,      0, 0x443D,
 0xBF76,      0,      0, 0xBF77, 0x415C,      0,      0,      0,
      0,      0,      0,      0,      0, 0xBF78, 0xBF79, 0x4A7B,
 0x3C4E, 0x5960,      0, 0x595F, 0xBF7A, 0xBF7B, 0x3F78,      0,
      0, 0xBF7C, 0x377E,      0, 0xBF7D, 0xBF7E, 0x5959, 0x3E39,
 0xC021,      0, 0x4668, 0x4731, 0xC022, 0xC023,      0, 0xC024,
};
const unsigned short utf8_to_euc_E68E[] = {
 0x5957,      0, 0xC025, 0x415D, 0xC026,      0,      0, 0xC027,
 0x3C78, 0x595C, 0xC028,      0, 0x3E38,      0, 0x5956, 0x595B,
 0xC029,      0, 0x4753,      0, 0xC02A, 0xC02B, 0x5955,      0,
 0x3721, 0xC02C, 0xC02D, 0x335D,      0,      0, 0xC02E, 0x595D,
 0x4E2B, 0x3A4E, 0x4335, 0x595A, 0xC02F, 0x405C, 0xC030, 0x3935,
 0x3F64, 0x3166, 0x413C, 0x5958, 0x3545, 0xC031, 0xC032, 0xC033,
      0,      0, 0x3747,      0, 0x444F, 0x595E,      0,      0,
      0,      0,      0, 0x415F,      0, 0xC034, 0x5961,      0,
};
const unsigned short utf8_to_euc_E68F[] = {
 0x5963, 0xC035,      0, 0x4237, 0x5969, 0xC036, 0x5964,      0,
 0xC037, 0x5966,      0,      0,      0,      0, 0xC038, 0x4941,
 0x4473, 0xC039, 0x5967, 0xC03A, 0xC03B, 0xC03C, 0x4D2C,      0,
      0,      0, 0x4D48, 0x3439, 0xC03D,      0,      0,      0,
 0xC03E, 0x302E,      0, 0x5965,      0, 0xC03F,      0,      0,
      0, 0x5962, 0xC040,      0, 0xC041,      0, 0x3478,      0,
      0,      0, 0xC042, 0xC043, 0x3167, 0x7A2F, 0x5968,      0,
 0xC045, 0xC046, 0x4D49,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E690[] = {
      0,      0,      0,      0,      0,      0, 0x596C,      0,
      0, 0xC047, 0xC048,      0,      0, 0x423B,      0, 0x5973,
 0xC049,      0, 0xC04A, 0x596D, 0xC04B,      0, 0x596A, 0x5971,
 0xC04C,      0,      0,      0, 0x5953,      0, 0xC04D,      0,
 0xC04E,      0, 0xC04F,      0, 0xC050, 0xC051, 0x596E,      0,
 0x5972, 0xC052, 0xC053,      0, 0x4842, 0x456B,      0, 0xC054,
 0xC055,      0,      0,      0, 0x596B, 0xC056, 0x596F,      0,
      0,      0, 0x3748,      0,      0, 0xC057, 0x3A71, 0xC058,
};
const unsigned short utf8_to_euc_E691[] = {
      0,      0, 0x405D,      0,      0,      0,      0,      0,
      0,      0,      0, 0xC059,      0,      0, 0x5977, 0xC05A,
      0, 0xC05B, 0xC05C, 0xC05D, 0xC05E,      0,      0,      0,
 0x4526,      0, 0xC05F, 0xC060, 0xC061, 0xC062,      0, 0xC063,
 0x7A30, 0xC065,      0, 0xC066,      0,      0,      0, 0x5974,
      0, 0x4B60,      0,      0,      0, 0xC067,      0, 0x5975,
      0,      0,      0, 0xC068, 0xC069,      0, 0x5976,      0,
 0x4C4E,      0, 0x4022, 0xC06A,      0, 0xC06B,      0,      0,
};
const unsigned short utf8_to_euc_E692[] = {
      0,      0,      0, 0x3762,      0, 0xC06C,      0, 0xC06D,
 0x597D,      0,      0,      0,      0,      0,      0, 0xC06E,
 0xC06F, 0xC070, 0x3B35, 0x597A,      0, 0x5979,      0,      0,
 0xC071, 0xC072, 0x4732, 0xC073,      0, 0x7A31, 0x4635, 0xC075,
      0, 0xC076,      0, 0xC077, 0x4531, 0x597B, 0xC078,      0,
 0xC079, 0x597C,      0, 0x496F, 0xC07A, 0x4745, 0x3B23,      0,
 0x4071,      0, 0x4B50, 0xC07B,      0,      0,      0,      0,
      0, 0x3349,      0, 0x5A25, 0x597E, 0xC07C, 0xC07D, 0xC07E,
};
const unsigned short utf8_to_euc_E693[] = {
      0, 0x4D4A, 0x5A27,      0, 0xC121, 0x5A23,      0, 0x5A24,
      0, 0xC122, 0xC123, 0xC124, 0xC125, 0x4160, 0x7A32,      0,
 0xC127, 0xC128, 0x5A22,      0, 0x593F, 0xC129,      0, 0xC12A,
 0x5A26,      0, 0x5A21,      0,      0,      0,      0,      0,
 0x5A2B, 0x5A2C, 0x4527, 0x5A2E, 0xC12B, 0xC12C, 0x3B24, 0x5A29,
      0, 0xC12D, 0xC12E,      0, 0x353C, 0xC12F,      0, 0x5A2F,
 0xC130, 0x5A28, 0x5A33,      0, 0x5A32, 0xC131, 0x5A31, 0xC132,
      0,      0, 0x5A34, 0xC133,      0, 0x5A36, 0x3E71, 0xC134,
};
const unsigned short utf8_to_euc_E694[] = {
 0x5A35, 0xC135,      0,      0, 0xC136, 0x5A39,      0,      0,
 0xC137, 0xC138, 0xC139,      0,      0,      0,      0, 0xC13A,
      0,      0,      0, 0xC13B, 0xC13C,      0, 0xC13D,      0,
 0x5A37, 0xC13E,      0, 0xC13F, 0x5A38, 0x5970, 0xC140, 0xC141,
      0,      0, 0xC142, 0x5A3B, 0x5A3A,      0, 0xC143,      0,
      0, 0xC144, 0x5978, 0x5A3C, 0x5A30,      0, 0xC145, 0x3B59,
      0, 0xC146,      0,      0, 0x5A3D, 0x5A3E, 0x5A40, 0x5A3F,
 0x5A41, 0x327E, 0xC147, 0x3936, 0xC148, 0xC149, 0x4A7C, 0x402F,
};
const unsigned short utf8_to_euc_E695[] = {
      0,      0,      0, 0xC14A,      0, 0x384E,      0, 0xC14B,
 0x5A43, 0xC14C,      0,      0,      0, 0x5A46, 0x7A33, 0x4952,
 0xC14D, 0x355F, 0xC14E,      0, 0xC14F, 0x5A45, 0x5A44, 0x4754,
 0x5A47, 0x3635,      0,      0,      0, 0x5A49, 0x5A48, 0xC150,
 0xC151,      0, 0x343A, 0x3B36,      0,      0, 0x4658, 0xC152,
      0,      0,      0, 0xC153, 0x3749,      0,      0,      0,
 0x3F74,      0, 0x5A4A,      0, 0x4030, 0x4528,      0, 0x495F,
 0x5A4B,      0, 0xC154,      0,      0, 0xC155,      0,      0,
};
const unsigned short utf8_to_euc_E696[] = {
      0, 0xC156, 0x5A4C, 0x5A4D,      0, 0xC157,      0, 0x4A38,
 0x555D, 0x4046, 0xC158,      0, 0x494C,      0, 0x3A58,      0,
 0x4865, 0x4843, 0xC159,      0,      0, 0xC15A,      0, 0x454D,
 0xC15B, 0x4E41,      0, 0x5A4F, 0x3C50, 0xC15C,      0, 0x5A50,
 0xC15D, 0x3036,      0, 0xC15E, 0x3654, 0x404D, 0xC15F, 0x4960,
      0,      0,      0, 0x5A51, 0x3B42, 0x4347, 0xC160, 0x3B5B,
 0x3F37,      0, 0xC161, 0xC162, 0xC163,      0,      0, 0x5A52,
      0, 0x4A7D,      0,      0, 0x3177, 0x3B5C,      0, 0xC164,
};
const unsigned short utf8_to_euc_E697[] = {
      0, 0x5A55, 0xC165, 0x5A53, 0x5A56, 0x4E39, 0x5A54,      0,
 0xC166, 0xC167,      0, 0x407B, 0x5A57,      0, 0xC168, 0x4232,
 0xC169,      0, 0x5A58,      0, 0xC16A,      0, 0xC16B, 0x347A,
 0xC16C, 0x5A5A,      0, 0x5A59,      0,      0,      0, 0xC16D,
 0x5A5B, 0x5A5C, 0x347B,      0,      0, 0x467C, 0x4336, 0x356C,
 0x3B5D, 0x4161,      0,      0, 0x3D5C, 0x3030,      0,      0,
 0xC16E, 0x5A5D, 0xC16F,      0, 0xC170, 0xC171,      0,      0,
      0, 0xC172, 0x3222, 0x5A61,      0,      0, 0xC173, 0xC174,
};
const unsigned short utf8_to_euc_E698[] = {
 0x7A34,      0, 0x3937, 0x5A60, 0xC176,      0, 0x3A2B, 0x3E3A,
 0xC177, 0x7A37, 0x5A5F,      0, 0x3E3B, 0xC179, 0x4C40, 0x3A2A,
      0, 0xC17A, 0xC17B, 0x3057, 0x404E, 0x7A35, 0xC17D,      0,
      0,      0,      0,      0, 0x5A66, 0xC17E, 0x7A39, 0x4031,
 0x3147, 0xC222, 0xC223, 0xC224, 0x7A3A, 0x3D55, 0xC226, 0x4B66,
 0x3A72, 0xC227, 0xC228, 0xC229, 0xC22A, 0x3E3C, 0x7A38, 0x4027,
 0xC22C, 0x7928,      0, 0xC22E, 0x5A65, 0x5A63, 0x5A64, 0xC230,
      0, 0xC22F,      0, 0x7A36, 0x436B,      0,      0, 0x5B26,
};
const unsigned short utf8_to_euc_E699[] = {
 0xC231, 0x5A6A, 0x3B7E, 0x3938, 0x5A68, 0xC232, 0xC233,      0,
      0, 0x5A69, 0xC234, 0x3F38, 0xC235,      0, 0xC237, 0x5A67,
      0, 0xC236, 0x3B2F,      0,      0,      0,      0, 0x7A3C,
 0xC239, 0x7A3D,      0, 0xC23B, 0xC23C, 0x5A6C, 0x5A6B, 0x5A70,
 0xC23D, 0xC23E, 0x5A71,      0, 0x5A6D, 0x7A3B, 0x3322, 0x5A6E,
 0x5A6F, 0x4855, 0xC240, 0xC241, 0xC242,      0, 0x4961, 0x374A,
 0x5A72,      0,      0, 0x7A3F, 0x4032, 0xC245, 0x3E3D, 0xC247,
 0xC248, 0xC249, 0x4352, 0xC24A, 0xC24C,      0, 0xC243, 0xC246,
};
const unsigned short utf8_to_euc_E69A[] = {
 0xC24B, 0x3647,      0, 0x5A73, 0x5A77,      0,      0, 0x324B,
 0x5A74, 0x5A76,      0, 0xC24D, 0xC24E, 0xC24F, 0x5A75,      0,
 0xC250, 0x3D6B, 0xC251,      0,      0,      0, 0x4348, 0x3045,
 0x5A78, 0x7A40, 0xC253, 0xC254, 0xC255, 0x5A79,      0, 0xC256,
 0x7A41,      0, 0x442A,      0, 0xC258,      0, 0x4E71,      0,
      0,      0,      0, 0x3B43,      0, 0xC259, 0x4A6B,      0,
      0, 0xC25A, 0x7A42,      0, 0x4B3D, 0xC25C,      0,      0,
 0x5B22, 0x5A7B,      0, 0xC25D, 0x5A7E,      0, 0x5A7D, 0x7A43,
};
const unsigned short utf8_to_euc_E69B[] = {
 0xC25F, 0x5A7A, 0xC260, 0xC261, 0x5B21,      0,      0, 0x465E,
 0xC262, 0x5A7C,      0,      0, 0xC263,      0, 0xC264, 0xC265,
      0,      0,      0,      0, 0xC266,      0, 0x5B23,      0,
      0, 0x3D6C, 0x5B24, 0xC267, 0x4D4B, 0x4778,      0, 0xC268,
 0x5B25,      0,      0,      0,      0,      0, 0x5B27,      0,
 0xC269, 0x5B28,      0, 0xC26A, 0xC26B,      0, 0xC26C,      0,
 0x5B29,      0, 0x364A, 0x3148, 0x3939, 0x5B2A,      0, 0x5B2B,
 0x3D71, 0x4162, 0x7A44, 0x792B, 0x5258, 0x413E, 0x413D, 0x4258,
};
const unsigned short utf8_to_euc_E69C[] = {
 0x3A47,      0,      0, 0x5072,      0, 0xC26E,      0, 0xC26F,
 0x376E, 0x4D2D,      0, 0x4A7E,      0, 0x497E, 0x7A45, 0x5B2C,
      0,      0,      0, 0xC271, 0x3A73, 0x443F, 0x5B2D, 0x4F2F,
      0, 0xC272,      0, 0x4B3E, 0xC273, 0x442B, 0x5B2E, 0x347C,
 0xC274,      0, 0xC275,      0,      0,      0, 0x5B2F, 0x5B30,
 0x4C5A,      0, 0x4C24, 0x4B76, 0x4B5C, 0x3B25, 0x5B32,      0,
      0, 0x3C6B,      0, 0xC276, 0x4B51,      0, 0x5B34, 0x5B37,
 0x5B36,      0, 0x3479,      0,      0, 0x3560, 0xC277, 0x5B33,
};
const unsigned short utf8_to_euc_E69D[] = {
      0, 0x5B35,      0,      0,      0, 0xC278, 0x5B38, 0xC279,
 0xC27A, 0x3F79,      0,      0, 0xC27B,      0, 0x4D7B, 0x3049,
 0x3A60, 0x423C,      0, 0x3C5D, 0xC27C, 0xC27D, 0x3E73,      0,
      0, 0x5B3B,      0,      0, 0x454E, 0xC27E, 0x5B39, 0x422B,
 0x5B3A, 0x3E72, 0x4C5D, 0x5B3C, 0x5B3D, 0x4D68, 0x7A47,      0,
      0,      0, 0x5B42,      0, 0xC322, 0x393A, 0xC323, 0x4755,
 0x5B3F, 0x456C, 0x5A5E, 0x5A62, 0xC324, 0x354F, 0xC325, 0x4747,
      0,      0,      0, 0xC326, 0x5B41,      0, 0x3E3E, 0x4844,
};
const unsigned short utf8_to_euc_E69E[] = {
      0, 0xC327,      0,      0, 0xC328, 0x5B47,      0, 0x487A,
      0, 0x5B3E,      0, 0x5B44, 0x5B43,      0, 0xC329, 0xC32A,
 0x404F, 0xC32B,      0, 0xC32C,      0, 0x4B6D, 0xC32D, 0x4E53,
 0xC32E, 0xC32F, 0x4B67, 0xC330, 0x324C, 0x3B5E,      0,      0,
 0x4F48, 0x5B46, 0x3F75,      0,      0,      0, 0x5B45,      0,
      0, 0x5B40,      0,      0,      0,      0,      0, 0x384F,
 0xC331, 0xC332, 0xC333, 0x5B4C, 0x5B4A, 0xC334, 0x324D, 0x5B48,
 0x5B4E, 0x5B54,      0, 0x7A48, 0xC336, 0xC337,      0,      0,
};
const unsigned short utf8_to_euc_E69F[] = {
 0x7A4A, 0x4248, 0xC33A, 0xC33B, 0x4A41, 0xC33C, 0x5B56,      0,
 0xC33D, 0xC33E, 0x4922,      0,      0,      0, 0x5B55, 0x4770,
 0x4B3F, 0x343B, 0xC33F, 0x4077, 0x3D40,      0,      0, 0xC340,
 0x4453, 0xC341, 0x4D2E,      0, 0xC342, 0x5B51, 0x5B50,      0,
      0, 0xC343, 0x5B52,      0, 0x5B4F,      0, 0xC344, 0x5B57,
      0, 0x5B4D,      0,      0, 0x5B4B,      0, 0x5B53, 0x5B49,
 0xC345, 0x436C, 0xC346, 0x4C78, 0x3C46, 0x3A74, 0xC347, 0xC348,
      0, 0xC338,      0, 0x3A3A,      0,      0, 0x4B6F, 0x3341,
};
const unsigned short utf8_to_euc_E6A0[] = {
      0, 0x7A4B, 0x444E, 0x464A, 0x3149,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x4072, 0xC34A,      0, 0x4034, 0x372A,
      0, 0xC34B,      0,      0,      0, 0xC34C, 0x5B59, 0xC34D,
      0, 0x393B, 0x337C,      0,      0,      0,      0, 0xC34F,
 0xC34E, 0x5B5B, 0x3374, 0x5B61, 0xC350, 0xC351,      0, 0xC352,
 0xC353, 0xC354, 0x5B5E, 0xC355, 0x4073,      0,      0,      0,
 0x334B, 0x3A2C,      0, 0xC356, 0x334A, 0x3A4F,      0, 0xC357,
};
const unsigned short utf8_to_euc_E6A1[] = {
 0x5B5C, 0x3765, 0x374B, 0x456D, 0x7A4C, 0xC359, 0x5B5A,      0,
 0x3046,      0, 0xC35A,      0, 0xC35B, 0x5B5D, 0x5B5F,      0,
 0x364D, 0x372C, 0x7A49, 0x343C, 0x354B, 0xC35C,      0, 0xC35D,
 0xC35E, 0x5B62,      0, 0xC35F, 0x3A79, 0x4B71,      0, 0x3B37,
      0,      0,      0, 0x5B63,      0,      0,      0, 0x4930,
      0,      0,      0, 0xC360,      0,      0, 0xC361, 0xC362,
 0xC363, 0xC364, 0xC365,      0, 0x5B6F, 0xC366, 0x3233, 0x5B64,
      0, 0xC367, 0xC368, 0xC369, 0xC36A,      0, 0x5B75, 0x5B65,
};
const unsigned short utf8_to_euc_E6A2[] = {
      0, 0x4E42, 0xC36B, 0x5B6C, 0xC36C, 0x475F, 0xC36D,      0,
 0xC36E,      0,      0,      0,      0, 0x5B74,      0, 0x5B67,
      0,      0,      0, 0x3034, 0x5B69,      0, 0xC36F, 0x393C,
 0xC370,      0, 0xC371, 0x5B6B, 0xC372, 0x5B6A,      0, 0x5B66,
 0x5B71, 0xC373, 0x3E3F, 0xC374,      0, 0xC375, 0x546D, 0x3868,
 0x4D7C, 0xC376, 0xC377,      0,      0, 0x5B68, 0xC378, 0x4474,
 0x3323, 0x3A2D, 0xC379, 0x5B60,      0, 0x5B70, 0x3361,      0,
      0, 0x5B6E, 0x5B72, 0xC37A, 0x456E,      0,      0,      0,
};
const unsigned short utf8_to_euc_E6A3[] = {
      0,      0,      0,      0, 0x347E, 0xC37B, 0x5C32,      0,
 0x7929, 0x4C49, 0x5B77, 0x347D, 0xC37D, 0x5B7E,      0, 0x7A4D,
 0xC421, 0xC422, 0x4B40, 0xC423, 0x5C21, 0x5C23, 0xC424, 0x5C27,
 0x5B79, 0xC425, 0x432A,      0, 0xC426, 0xC427,      0, 0x456F,
 0x5C2B, 0x5B7C,      0, 0x5C28,      0, 0xC428,      0, 0x5C22,
 0xC429,      0, 0xC42A, 0xC42B, 0xC42C, 0xC42D, 0x3F39, 0x5C2C,
 0xC42E, 0xC42F, 0x4033,      0,      0, 0xC430, 0xC431,      0,
      0, 0x5C2A, 0x343D, 0xC432, 0xC433, 0xC434,      0,      0,
};
const unsigned short utf8_to_euc_E6A4[] = {
 0x4F50, 0x5B76,      0,      0, 0x5C26, 0x3058, 0xC435,      0,
 0x5B78, 0xC436, 0xC437, 0x4C3A, 0x5B7D, 0x3F22, 0x4447, 0x5B73,
 0xC438, 0xC439, 0x5C25, 0xC43A,      0,      0, 0xC43B, 0xC43C,
      0, 0x3F7A, 0x5C2F, 0x3371, 0x3821,      0,      0,      0,
      0, 0x5C31, 0x5B7A, 0x5C30,      0, 0x5C29, 0x5B7B,      0,
 0x5C2D,      0, 0x5C2E,      0,      0,      0,      0,      0,
 0x5C3F, 0xC43D,      0, 0xC43E, 0x464E, 0xC43F, 0x5C24,      0,
 0xC440, 0x5C3B,      0, 0xC441,      0, 0x5C3D,      0, 0x4458,
};
const unsigned short utf8_to_euc_E6A5[] = {
      0,      0, 0xC442,      0,      0, 0xC443,      0,      0,
      0, 0xC444, 0x4D4C,      0,      0,      0, 0xC445,      0,
      0,      0,      0, 0x4976, 0x5C38, 0x424A,      0, 0xC446,
      0, 0x5C3E, 0x413F, 0xC447, 0x5C35, 0x5C42, 0x5C41,      0,
 0x466F, 0x5C40, 0x466A, 0xC448, 0xC449, 0xC44A, 0xC44B,      0,
 0x7A4F, 0xC44D, 0x5C44, 0x5C37, 0xC44E, 0x3648, 0x5C3A, 0x3D5D,
 0xC44F, 0xC450, 0xC451, 0x4760, 0x5C3C, 0x364B,      0, 0x5C34,
 0x5C36, 0x5C33, 0xC452, 0xC453, 0x4F30, 0x335A, 0x5C39, 0xC454,
};
const unsigned short utf8_to_euc_E6A6[] = {
 0xC455, 0x5C43, 0x3335,      0,      0,      0,      0,      0,
      0,      0, 0x3A67,      0,      0, 0xC456, 0x315D,      0,
      0, 0x5C54, 0xC457,      0, 0x4F31, 0x5C57, 0xC458,      0,
 0x7A51,      0,      0, 0x3F3A, 0x5C56,      0,      0,      0,
 0x5C55, 0xC45A,      0,      0,      0, 0xC45B, 0xC45C, 0x5C52,
 0xC45D,      0,      0, 0xC45E,      0, 0xC45F, 0x5C46, 0xC460,
      0, 0x5C63, 0x5C45,      0, 0x5C58,      0,      0, 0xC461,
 0xC462,      0, 0xC463, 0x5C50, 0xC464,      0, 0x5C4B, 0x5C48,
};
const unsigned short utf8_to_euc_E6A7[] = {
      0, 0x5C49,      0, 0x5C51,      0, 0xC465,      0, 0x7422,
 0xC466,      0, 0x5C4E, 0x393D, 0x4448, 0x4164, 0x5C4C,      0,
 0x5C47, 0xC467,      0, 0x5C4A,      0,      0, 0xC468, 0xC469,
 0x4D4D, 0x4B6A,      0,      0,      0, 0x5C4F, 0x5C59,      0,
      0,      0, 0x7A52,      0,      0, 0xC46B,      0, 0x5C61,
 0x5C5A,      0,      0, 0x5C67,      0, 0x5C65, 0xC46C, 0xC46D,
      0, 0xC46E, 0x5C60, 0xC46F,      0, 0xC470,      0,      0,
      0, 0x5C5F,      0, 0x4450,      0, 0x4165, 0xC471, 0x5C5D,
};
const unsigned short utf8_to_euc_E6A8[] = {
 0xC472, 0xC473, 0x5C5B, 0xC474,      0, 0x5C62,      0,      0,
      0,      0, 0x5C68, 0x4875, 0x5C6E,      0,      0, 0xC475,
      0, 0xC476, 0x5C69, 0x5C6C, 0x5C66, 0xC477,      0, 0x4374,
      0, 0x4938, 0xC478, 0x5C5C,      0, 0xC479, 0x5C64, 0x3E40,
 0xC47A, 0x4C4F, 0x5C78, 0x5C6B, 0xC47B,      0,      0,      0,
 0xC47C, 0x3822, 0x3223, 0x335F,      0,      0, 0x5C53,      0,
 0x7A53,      0, 0xC47E,      0, 0xC521, 0x3E41, 0x5C70, 0xC522,
 0x5C77, 0x3C79, 0x3372, 0xC523,      0, 0x432E, 0xC524, 0xC525,
};
const unsigned short utf8_to_euc_E6A9[] = {
      0,      0,      0,      0, 0x5C6D, 0xC526, 0x7A55, 0x5C72,
 0x5C76, 0xC528, 0xC529, 0x3636,      0,      0, 0xC52A,      0,
 0xC52B, 0xC52C, 0xC52D,      0,      0, 0xC52E, 0xC52F,      0,
 0x354C, 0x5C74,      0, 0xC530,      0,      0,      0, 0x3521,
      0, 0x464B, 0x5C73,      0, 0xC531,      0, 0x5C75, 0xC532,
      0,      0, 0xC533, 0x7A54,      0,      0,      0,      0,
      0, 0xC534, 0x5C6F, 0x7A56,      0,      0,      0,      0,
 0x5C71,      0,      0,      0,      0,      0, 0x7A57, 0x3360,
};
const unsigned short utf8_to_euc_E6AA[] = {
 0x4349, 0xC537,      0, 0xC538, 0x5C7C,      0, 0xC539, 0xC53A,
      0, 0xC53B,      0, 0xC53C,      0, 0x5C7A, 0x3869,      0,
 0x5C79, 0xC53D,      0,      0,      0,      0,      0, 0x5D21,
      0,      0,      0, 0xC53E, 0x5B58, 0xC53F, 0xC540, 0xC541,
 0x5C7B,      0, 0x5C7D, 0x5C7E,      0, 0xC542,      0,      0,
      0,      0, 0x5D2C, 0xC543, 0x5D28,      0, 0x5B6D, 0xC544,
 0xC545, 0xC546,      0, 0x5D27, 0xC547,      0,      0,      0,
 0x5D26,      0,      0, 0x5D23,      0, 0xC548, 0xC549, 0xC54A,
};
const unsigned short utf8_to_euc_E6AB[] = {
      0, 0x5C6A, 0x5D25, 0x5D24,      0,      0, 0xC54B,      0,
 0xC54D, 0xC54C,      0,      0, 0xC54E,      0,      0,      0,
 0xC54F, 0x5D2A,      0, 0x4F26, 0xC550, 0xC551, 0xC552,      0,
      0,      0, 0x5D2D, 0x367B, 0xC553, 0xC554, 0x5D29, 0x5D2B,
      0,      0, 0x7A58,      0, 0x7A59,      0,      0, 0xC556,
 0x4827,      0, 0x5D2E,      0, 0xC557,      0,      0,      0,
 0xC558, 0xC559, 0xC55A,      0,      0,      0,      0,      0,
      0,      0, 0x5D32, 0x5D2F, 0xC55B, 0xC55C,      0,      0,
};
const unsigned short utf8_to_euc_E6AC[] = {
      0,      0, 0xC55D, 0xC55E, 0x4D73, 0x5D30, 0xC55F, 0xC560,
      0, 0xC561, 0x5C5E,      0,      0,      0,      0, 0xC562,
 0xC563, 0xC564, 0x5D33,      0,      0,      0, 0x5D34, 0xC565,
      0,      0,      0, 0xC566,      0, 0x3135, 0xC567, 0x5D36,
 0x3767, 0x3C21,      0, 0x3655, 0xC568,      0,      0, 0x3224,
 0xC569,      0,      0, 0xC56A, 0xC56B,      0,      0, 0xC56C,
      0,      0, 0x4D5F,      0,      0, 0xC56D, 0xC56E, 0x5D38,
 0x5D37, 0x5D3A, 0x353D, 0xC56F,      0, 0x3656, 0x343E, 0xC570,
};
const unsigned short utf8_to_euc_E6AD[] = {
      0,      0,      0, 0x5D3D,      0,      0, 0xC571, 0x5D3C,
      0, 0x5D3E, 0xC572,      0, 0x324E, 0xC573, 0x4337,      0,
 0x5D3F,      0, 0xC574, 0x343F, 0x5D41,      0, 0xC575,      0,
 0xC576, 0x5D40,      0, 0x5D42,      0, 0xC577,      0, 0x5D43,
 0xC578, 0x5D44, 0x3B5F, 0x4035, 0x3A21,      0, 0x4970, 0xC579,
      0, 0x4A62, 0x4F44, 0xC57A,      0,      0, 0xC57B, 0x3B75,
 0xC57C,      0,      0, 0x3A50, 0x4E72, 0xC57D,      0,      0,
 0x5D45, 0x5D46,      0, 0x3B60,      0, 0xC57E, 0xC621, 0x5D47,
};
const unsigned short utf8_to_euc_E6AE[] = {
 0x5D48,      0, 0xC622, 0x5D4A, 0x5D49, 0xC623, 0x4B58,      0,
      0, 0x3D5E, 0x3C6C, 0x3B44,      0, 0x5D4B,      0,      0,
      0,      0,      0,      0,      0, 0x5D4D, 0x3F23, 0xC624,
 0x5D4C,      0,      0, 0xC625,      0,      0, 0x5D4E, 0xC626,
 0xC627,      0, 0xC628, 0xC629, 0x5D4F,      0,      0,      0,
 0xC62A, 0xC62B, 0x5D50, 0x5D51, 0xC62C, 0xC62D, 0xC62E, 0x5D52,
 0xC62F, 0x5D54, 0x5D53, 0x5D55, 0x3225, 0x434A,      0, 0x5D56,
 0xC630, 0xC631, 0x3B26, 0x334C, 0x5D57, 0xC632, 0xC633, 0x4542,
};
const unsigned short utf8_to_euc_E6AF[] = {
 0x544C,      0,      0, 0xC634, 0xC635, 0x3523, 0x5D58,      0,
      0, 0xC636,      0, 0x5D59, 0xC637, 0x4A6C, 0x4B68,      0,
      0,      0, 0x4647, 0x5D5A, 0x4866,      0, 0x7A5A,      0,
 0x487B,      0, 0xC639, 0x4C53,      0,      0,      0, 0x5D5B,
      0, 0xC63A,      0, 0xC63B,      0,      0, 0xC63C, 0xC63D,
      0,      0,      0, 0x5D5D, 0x5D5C,      0, 0xC63E, 0x5D5F,
      0, 0xC63F,      0, 0x5D5E,      0,      0,      0, 0xC640,
      0, 0xC641,      0,      0,      0,      0,      0, 0xC642,
};
const unsigned short utf8_to_euc_E6B0[] = {
      0,      0, 0xC643,      0, 0xC644, 0xC645,      0,      0,
 0x5D61, 0xC646,      0,      0,      0, 0xC647, 0xC648, 0x3B61,
 0xC649, 0x4C31, 0xC64A, 0x5D62, 0x5D63,      0,      0, 0x3524,
      0, 0xC64B,      0, 0x5D64,      0,      0,      0, 0xC64C,
      0,      0,      0, 0x5D66, 0x5D65,      0, 0xC64D, 0xC64E,
 0xC64F,      0,      0,      0, 0xC650,      0, 0xC651,      0,
      0,      0,      0, 0xC652, 0x3F65, 0xC653, 0xC654, 0x4939,
 0x314A,      0, 0xC655, 0xC656,      0,      0, 0x4845, 0x7A5B,
};
const unsigned short utf8_to_euc_E6B1[] = {
 0x4475, 0x3D41, 0x3561,      0,      0,      0,      0,      0,
      0,      0, 0xC658, 0xC659,      0, 0xC65A, 0x4846, 0xC65B,
 0x3C2E,      0, 0xC65C,      0, 0xC65D, 0x5D68,      0, 0x3440,
      0, 0xC65E, 0x3178, 0xC65F, 0x7A5C, 0x4672, 0x5D67, 0x393E,
 0x4353,      0, 0x5D69,      0,      0,      0,      0, 0xC736,
 0x5D71,      0, 0x5D6A, 0xC661,      0, 0xC662,      0, 0x7A5E,
 0x4241,      0, 0x3562, 0x5D72, 0xC664,      0, 0xC665,      0,
 0xC666, 0xC667, 0x3768, 0xC668,      0, 0x3525, 0x5D70,      0,
};
const unsigned short utf8_to_euc_E6B2[] = {
      0, 0x5D6E, 0x5D6B, 0x4D60,      0, 0xC669, 0x7A5D, 0xC66B,
 0x4440, 0xC66C,      0,      0, 0x4659, 0x5D6C,      0,      0,
 0x5D74,      0, 0x5D73, 0x3723, 0xC66D, 0xC66E, 0x322D, 0xC66F,
 0xC670, 0x3A3B, 0x5D6D, 0x5D6F, 0xC671,      0,      0, 0xC672,
      0, 0x4B57, 0x4274,      0,      0,      0,      0,      0,
      0,      0,      0, 0x4B77,      0,      0, 0x5D7C,      0,
 0xC673, 0x5D7D, 0xC674, 0x324F, 0xC675,      0,      0,      0,
 0x4A28, 0x4C7D, 0x5E21, 0x3C23, 0x3E42, 0x5D78, 0x5D7E, 0x3168,
};
const unsigned short utf8_to_euc_E6B3[] = {
      0, 0x3637, 0xC676,      0, 0x5D75, 0x5D7A, 0xC677,      0,
      0, 0x4074, 0x4771,      0, 0x4867, 0xC678,      0, 0xC679,
 0xC67A, 0xC67B, 0xC67C, 0x5D77, 0xC67D, 0x4B21, 0xC67E, 0x5D79,
      0, 0x5E24, 0x7A5F, 0x5E22, 0xC722, 0x5D7B,      0,      0,
 0xC723, 0x4B22, 0x4748, 0x3563,      0, 0x4525,      0, 0xC724,
 0x436D, 0xC725, 0x5E25, 0xC726, 0xC727,      0, 0xC728, 0x5E23,
 0x4259, 0x5D76, 0xC729, 0x314B, 0xC72A,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E6B4[] = {
      0,      0,      0,      0, 0x7A60,      0,      0, 0xC72C,
      0,      0, 0xC72D, 0x4D4E, 0x5E30,      0, 0xC72E, 0xC72F,
      0, 0xC730, 0x5E2F, 0xC731,      0,      0,      0, 0x4076,
      0, 0x5E2C, 0xC732, 0x4D6C,      0,      0, 0x4636, 0x5E26,
      0,      0,      0,      0,      0, 0x4445, 0xC733, 0xC734,
 0xC735, 0x314C, 0x393F, 0x5E29,      0,      0, 0xC737, 0xC738,
      0, 0xC739, 0x3D27, 0x5E2E,      0, 0x5E2D, 0x5E28,      0,
 0x5E2B, 0xC73A,      0, 0x3368, 0xC73B, 0x5E2A, 0x4749, 0xC73C,
};
const unsigned short utf8_to_euc_E6B5[] = {
      0, 0x4E2E,      0,      0, 0x3E74, 0x4075,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0xC73D,
      0, 0x5E36, 0x5E34,      0, 0x494D,      0, 0xC73E, 0xC73F,
      0, 0xC740,      0, 0x5E31, 0x5E33, 0xC741, 0x313A, 0xC742,
      0, 0x3940, 0x4F32,      0, 0x333D,      0, 0x4962, 0x7A62,
 0xC744,      0,      0,      0, 0x4D61,      0,      0, 0x3324,
 0x3F3B, 0x5E35,      0,      0, 0xC745,      0,      0,      0,
};
const unsigned short utf8_to_euc_E6B6[] = {
      0,      0, 0xC746,      0,      0, 0x5E3A,      0, 0x7A61,
 0x3E43,      0,      0,      0, 0x4D30,      0, 0x5E37,      0,
      0, 0xC748, 0xC749, 0x5E32, 0xC74A, 0x5E38, 0x7A63, 0xC74C,
 0xC74D, 0x4E5E,      0, 0x4573, 0x4642,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0xC74E,      0, 0x7A64,      0,      0, 0x3336,
      0,      0, 0x3155,      0, 0xC750, 0x5E3E,      0, 0xC751,
 0x5E41, 0xC752,      0,      0, 0x4E43, 0xC753,      0, 0xC754,
};
const unsigned short utf8_to_euc_E6B7[] = {
 0x4D64,      0,      0,      0, 0xC755, 0x5E48, 0x5E42, 0x5E3F,
 0xC756,      0, 0xC757, 0x4E54, 0x5E45,      0, 0xC758, 0x7A65,
      0, 0x3D4A, 0x5E47,      0,      0, 0x5E4C, 0xC75A,      0,
 0x4571, 0x5E4A,      0, 0xC75B,      0, 0xC75C, 0x5E44, 0xC75D,
 0xC75E, 0x4338, 0xC75F,      0, 0x5E4B, 0xC760, 0x5E40,      0,
 0x5E46, 0xC761, 0x5E4D, 0x307C, 0x5E43,      0, 0x5E4E, 0xC762,
 0xC763, 0x3F3C, 0x7A67, 0x3D5F, 0xC764, 0x4A25, 0xC765, 0x3A2E,
 0x7A66, 0x5E3B, 0x5E49, 0x453A, 0x7A68,      0,      0,      0,
};
const unsigned short utf8_to_euc_E6B8[] = {
 0xC767,      0,      0,      0, 0xC768, 0x4036,      0, 0x3369,
 0x3A51, 0x3E44, 0x5E3D, 0x3D42,      0,      0,      0,      0,
      0,      0,      0, 0x374C,      0, 0x5E3C,      0,      0,
      0, 0x5E52, 0x3D6D, 0x383A,      0, 0x5E61, 0xC769, 0x5E5B,
 0x3574, 0x454F, 0xC76A, 0x5E56, 0x5E5F, 0x302F, 0x3132, 0x7A6B,
      0, 0x3239,      0, 0x5E58, 0x422C, 0x5E4F, 0x5E51, 0x3941,
      0,      0, 0xC76C,      0,      0,      0, 0xC76D,      0,
 0x5E62, 0x7A69, 0x5E5D, 0xC76F, 0x7A6C,      0, 0x5E55,      0,
};
const unsigned short utf8_to_euc_E6B9[] = {
      0,      0,      0, 0x5E5C, 0xC771, 0xC772,      0,      0,
 0xC773, 0xC774, 0x4C2B, 0xC775,      0, 0x5E5A, 0x5E5E, 0xC776,
      0, 0xC777, 0xC778, 0xC779, 0xC77A,      0, 0x3850, 0xC77B,
 0x3E45,      0,      0, 0x4339, 0x7A6A, 0xC77D, 0xC77E, 0x5E54,
      0,      0, 0xC821, 0xC822,      0,      0,      0, 0x4D2F,
 0xC823,      0,      0, 0x5E57,      0,      0, 0x5E50, 0x4572,
      0,      0, 0x5E53, 0xC824,      0,      0, 0x5E59,      0,
      0,      0,      0, 0xC825,      0, 0xC826, 0x4F51, 0x3C3E,
};
const unsigned short utf8_to_euc_E6BA[] = {
 0x4B7E,      0, 0x5E63,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x482E, 0xC827,      0, 0x5E6F,
 0x383B,      0,      0, 0xC828,      0,      0, 0x3D60,      0,
 0x5E65, 0xC829,      0,      0, 0x4E2F, 0x3942,      0, 0x5E72,
 0xC82A,      0, 0x306E,      0,      0, 0x5E70,      0, 0xC82B,
      0,      0, 0x5E64,      0,      0, 0xC82C, 0xC82D, 0x5E6A,
      0, 0xC82E, 0x5E6C, 0xC82F,      0,      0, 0x4D4F, 0x5E67,
      0,      0, 0x452E, 0xC830,      0, 0x5E69,      0, 0x7A6D,
};
const unsigned short utf8_to_euc_E6BB[] = {
 0xC832, 0xC833, 0x5E71, 0xC834, 0x5E6B, 0x4C47,      0, 0xC835,
 0xC836, 0x5E66, 0xC837, 0x3C22, 0x5E7E, 0xC838, 0xC839, 0xC83A,
      0, 0x336A,      0, 0x5E68, 0x5E6D, 0x5E6E,      0,      0,
      0,      0,      0,      0,      0, 0x426C, 0x425A,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0xC83B, 0x5E76, 0xC83C, 0xC83D, 0x5E7C,
      0,      0, 0x5E7A,      0, 0x4529,      0,      0, 0x5F23,
 0x5E77, 0xC83E,      0, 0xC83F,      0, 0xC840, 0x5E78, 0x5E60,
};
const unsigned short utf8_to_euc_E6BC[] = {
      0, 0x3579, 0x493A,      0, 0xC841,      0, 0x3C3F,      0,
 0xC842, 0x3977, 0xC843,      0, 0xC844, 0xC845,      0, 0x4F33,
      0, 0x5E74,      0, 0x5F22, 0x3169, 0x4166, 0xC846,      0,
 0xC847,      0, 0xC848, 0xC849,      0,      0,      0,      0,
 0x4779,      0, 0x3441, 0x4E7A,      0,      0, 0xC84A,      0,
      0, 0xC84B, 0xC84C, 0x4C21, 0x4452, 0xC853,      0, 0xC84D,
 0xC84E, 0x5E7B, 0x5E7D, 0xC84F,      0,      0, 0xC850,      0,
 0x4132,      0,      0, 0xC851, 0xC852,      0, 0x5F21, 0x5E79,
};
const unsigned short utf8_to_euc_E6BD[] = {
      0, 0x5E73,      0,      0,      0, 0x3443,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0xC854,
      0, 0xC855, 0xC856, 0xC857, 0x3769,      0,      0, 0xC858,
 0x5F2F, 0xC859, 0xC85A, 0x5F2A, 0x4078, 0xC85B, 0xC85C, 0x3363,
      0, 0xC85D, 0xC85E,      0, 0x3D61,      0, 0x5F33,      0,
 0xC85F,      0,      0,      0, 0xC860, 0x5F2C, 0x442C, 0x5F29,
 0x4459,      0,      0,      0, 0x5F4C,      0,      0,      0,
 0x5F26,      0, 0x5F25,      0, 0x5F2E, 0xC861, 0xC862,      0,
};
const unsigned short utf8_to_euc_E6BE[] = {
 0x5F28, 0x5F27, 0x5F2D, 0xC863, 0x4021,      0, 0x5F24, 0xC864,
 0x7A6E,      0,      0, 0xC866, 0xC867, 0xC868, 0x5F30,      0,
 0xC869, 0x5F31, 0xC86A, 0xC86B, 0xC86C,      0, 0xC86D, 0x3442,
      0,      0, 0xC86E,      0,      0,      0,      0, 0xC86F,
 0xC870, 0x5F36,      0, 0x5F35, 0x5F37, 0xC871, 0xC872, 0xC873,
 0xC874,      0, 0x5F3A,      0,      0,      0, 0xC875, 0xC876,
 0xC877, 0x4543,      0, 0x5F34,      0, 0x7A6F, 0xC879,      0,
      0, 0x5F38,      0,      0, 0xC87A,      0,      0,      0,
};
const unsigned short utf8_to_euc_E6BF[] = {
 0x3763, 0x4279, 0x5F32, 0x473B,      0, 0xC87B, 0x5F39, 0xC87C,
 0xC87D,      0, 0xC87E,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x5F3E, 0x5F3C,      0,      0,
 0x5F3F,      0, 0xC921, 0x5F42,      0,      0, 0xC922, 0x5F3B,
 0x396A, 0x4728,      0,      0, 0x5E39,      0,      0,      0,
 0xC923, 0xC924,      0, 0x4D74, 0x5F3D,      0, 0x5F41, 0x4275,
 0xC925, 0x5F40,      0, 0x5F2B,      0, 0x7A70, 0x6F69,      0,
      0, 0xC927, 0x5F45,      0, 0xC928, 0xC929, 0x5F49,      0,
};
const unsigned short utf8_to_euc_E780[] = {
 0xC92A, 0x5F47,      0,      0,      0, 0x7A71, 0xC92C, 0x7A72,
      0, 0x5F43,      0, 0x5F44,      0, 0xC92E,      0, 0x5F48,
      0, 0x5F46,      0,      0,      0, 0x494E,      0, 0xC92F,
 0x5F4E,      0, 0x5F4B, 0x5F4A,      0, 0x5F4D, 0x4654, 0x5F4F,
 0xC930,      0,      0, 0xC931,      0,      0, 0x4375, 0x426D,
 0x7A73,      0,      0,      0, 0x4025,      0,      0, 0xC932,
 0x5F50,      0, 0x5F52,      0, 0xC933,      0,      0, 0xC934,
      0, 0xC935,      0,      0, 0xC936,      0, 0x5F51,      0,
};
const unsigned short utf8_to_euc_E781[] = {
      0,      0,      0, 0xC937, 0xC938,      0,      0,      0,
 0xC939, 0xC93A, 0xC93B, 0xC93C, 0x5E75,      0, 0xC941,      0,
      0, 0x5F53,      0,      0, 0xC93D, 0xC93E,      0,      0,
 0x4667,      0,      0,      0,      0, 0xC93F, 0xC940,      0,
      0,      0,      0, 0x5F54, 0xC942, 0xC943,      0,      0,
      0,      0,      0, 0x3250, 0xC944,      0, 0xC945, 0x4574,
 0x3325,      0,      0,      0,      0, 0xC946, 0xC947,      0,
 0x3564,      0,      0,      0, 0x3C5E, 0x3A52, 0xC948,      0,
};
const unsigned short utf8_to_euc_E782[] = {
      0, 0xC949,      0,      0,      0, 0x7A74, 0xC94B,      0,
      0, 0x4F27, 0x3F66,      0,      0,      0, 0x316A,      0,
      0,      0, 0x5F56,      0, 0xC94C, 0xC94D, 0xC94E, 0xC94F,
 0xC950, 0x5F55,      0, 0xC951,      0,      0,      0,      0,
      0,      0,      0,      0, 0xC952,      0,      0,      0,
      0,      0,      0, 0x7A75, 0x5F59, 0x433A, 0x5F5C, 0x5F57,
 0xC954, 0xC955,      0, 0x5F5B, 0xC956,      0,      0, 0xC957,
 0x5F5A, 0x4540, 0x3059, 0x7927,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E783[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
 0x4E75,      0, 0xC958, 0x5F5E,      0,      0,      0, 0x3128,
      0, 0xC959,      0, 0xC95A, 0xC95B, 0xC95C, 0xC95D,      0,
 0xC95E, 0x5F60,      0,      0, 0xC95F, 0x5F5F,      0, 0x5F5D,
      0,      0,      0,      0, 0xC960,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x5F58,      0,      0,      0,      0,      0,      0,
      0, 0x4B23, 0xC961,      0,      0, 0x5F62,      0,      0,
};
const unsigned short utf8_to_euc_E784[] = {
      0,      0,      0, 0xC962, 0x7A77, 0xC964, 0xC965, 0xC966,
      0, 0x5F61,      0, 0xC967, 0xC968,      0,      0, 0x7A76,
      0,      0,      0,      0, 0x316B,      0,      0,      0,
      0, 0x5F64, 0x4A32,      0, 0x5F63,      0, 0xC96A,      0,
 0xC96B, 0x4C35,      0,      0,      0,      0, 0x3E47,      0,
      0,      0,      0, 0xC96C,      0, 0xC96D,      0, 0xC96E,
 0xC96F, 0xC970,      0,      0,      0,      0, 0x4133,      0,
 0xC971,      0,      0,      0, 0x3E46,      0,      0,      0,
};
const unsigned short utf8_to_euc_E785[] = {
      0, 0xC972,      0,      0,      0, 0xC973, 0x7A79, 0x7A7A,
      0, 0x4E7B, 0xC976, 0xC977, 0x5F6A,      0, 0x4079,      0,
 0xC978,      0, 0xC979,      0,      0, 0x5F66, 0x5F6B, 0xC97A,
      0, 0x316C, 0xC97B,      0, 0x7A78,      0, 0xC97D,      0,
 0xC97E,      0, 0x5F69,      0, 0x4761, 0x5F65, 0x5F68, 0x3E48,
 0xCA21, 0x4851,      0,      0, 0x5F6C,      0, 0x3C51,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0xCA22,      0,      0,      0, 0x407A,      0,      0,
};
const unsigned short utf8_to_euc_E786[] = {
 0xCA23,      0,      0,      0, 0x5F6F, 0xCA24,      0, 0xCA25,
 0x5F67,      0, 0x3727,      0, 0xCA26,      0,      0, 0x5F6D,
      0,      0, 0xCA27,      0, 0x4D50, 0x5F70,      0,      0,
      0, 0x7426, 0xCA28, 0xCA29,      0,      0,      0, 0x3D4F,
 0xCA2A,      0, 0xCA2B,      0,      0,      0,      0,      0,
 0x5F71,      0,      0,      0, 0x5F72,      0,      0, 0xCA2C,
 0xCA2D, 0x472E, 0xCA2E, 0xCA2F,      0,      0,      0,      0,
      0, 0x5F74, 0xCA30,      0,      0,      0, 0x5F75, 0xCA31,
};
const unsigned short utf8_to_euc_E787[] = {
 0xCA32, 0x7A7C,      0, 0x4733, 0xCA34,      0,      0,      0,
 0x4575, 0x5F77,      0, 0xCA35, 0xCA36,      0, 0x5F79,      0,
 0x4E55,      0, 0x5F76, 0xCA37, 0x5F78, 0x316D, 0xCA38, 0x5F73,
      0, 0xCA39, 0xCA3A,      0, 0xCA3B,      0,      0, 0x535B,
 0x5F7A,      0,      0,      0,      0, 0x4167, 0x3B38, 0x5F7C,
      0,      0,      0,      0, 0x5F7B, 0x3F24, 0x5259,      0,
      0,      0,      0,      0,      0, 0x5F7D,      0,      0,
 0xCA3C, 0x6021,      0, 0x5F6E, 0x5F7E,      0, 0x7A7D, 0x6022,
};
const unsigned short utf8_to_euc_E788[] = {
 0xCA3E,      0,      0,      0,      0,      0, 0x477A, 0xCA3F,
 0xCA40, 0xCA41,      0,      0,      0, 0x6023,      0,      0,
 0x6024,      0,      0, 0xCA42,      0,      0,      0, 0xCA43,
      0,      0, 0xCA44, 0x6025,      0, 0xCA45,      0, 0xCA46,
      0,      0,      0,      0, 0xCA47,      0,      0,      0,
 0x6026,      0, 0x445E, 0xCA48, 0x6028, 0x6027,      0, 0xCA49,
 0x6029,      0, 0x602A,      0, 0xCA4A, 0x3C5F, 0x4963,      0,
 0xCA4B, 0xCA4C, 0x4C6C, 0x602B, 0x602C, 0x4156, 0x3C24, 0x602D,
};
const unsigned short utf8_to_euc_E789[] = {
 0x602E, 0xCA4D, 0xCA4E, 0xCA4F,      0, 0xCA50, 0x602F, 0x4A52,
 0x4847,      0,      0, 0x6030, 0x4757,      0, 0xCA51, 0xCA52,
 0xCA53,      0, 0x442D, 0xCA54,      0, 0xCA55, 0xCA56,      0,
 0x6031, 0x3267, 0xCA57, 0x356D, 0xCA58, 0x4C46, 0xCA59, 0x4C36,
 0xCA5A, 0x3234, 0x4F34, 0xCA5B,      0,      0,      0, 0x4B52,
 0xCA5C, 0x4A2A,      0, 0xCA5D,      0,      0, 0xCA5E, 0xCA5F,
      0, 0xCA60, 0x4037,      0, 0x6032,      0,      0, 0xCA61,
 0xCA62, 0x4643,      0, 0xCA63, 0xCA64, 0x3823, 0x6033, 0xCA65,
};
const unsigned short utf8_to_euc_E78A[] = {
 0x3A54, 0x6035, 0x6034,      0, 0xCA66,      0,      0, 0x6036,
      0, 0xCA67,      0,      0,      0, 0xCA68, 0xCA69,      0,
      0,      0, 0x6037, 0xCA6A,      0,      0, 0x6038,      0,
      0,      0,      0, 0xCA6B,      0,      0,      0,      0,
 0x353E,      0, 0x6039,      0,      0,      0,      0, 0x603A,
 0xCA6C,      0,      0,      0, 0x3824, 0xCA6D, 0xCA6E, 0x4848,
      0, 0x7A7E, 0x603C,      0, 0xCA70,      0, 0x3E75,      0,
      0, 0x603B,      0,      0,      0,      0, 0x7B21,      0,
};
const unsigned short utf8_to_euc_E78B[] = {
      0, 0xCA72, 0x3638, 0x603D, 0x603F,      0, 0x603E, 0xCA73,
      0, 0xCA74,      0,      0, 0xCA75,      0, 0x6040,      0,
 0x3851,      0, 0x6041,      0,      0, 0xCA76, 0xCA77, 0x3669,
 0xCA78, 0x4140,      0, 0x397D,      0,      0,      0, 0xCA79,
 0x6043, 0x6044, 0x6042,      0,      0, 0xCA7A,      0,      0,
      0, 0x3C6D,      0,      0, 0x4648, 0x3639,      0,      0,
      0,      0,      0, 0xCA7B, 0xCA7C,      0,      0, 0x6046,
 0x432C, 0x6045, 0xCA7D, 0xCA7E, 0x4F35, 0x4762, 0xCB21,      0,
};
const unsigned short utf8_to_euc_E78C[] = {
      0,      0, 0xCB22,      0, 0xCB23, 0xCB24,      0, 0xCB25,
      0,      0, 0x6049, 0xCB26,      0, 0xCB27,      0,      0,
      0,      0, 0xCB28, 0xCB29,      0,      0, 0x604B, 0x6048,
 0xCB2A, 0xCB2B,      0, 0x4C54, 0x604A, 0x604C, 0xCB2C, 0x4E44,
      0,      0, 0xCB2D,      0, 0x7B22, 0x6050,      0, 0xCB2F,
 0xCB30, 0x604F, 0x4376, 0x472D, 0xCB31,      0, 0x3825, 0x604E,
      0, 0xCB32, 0xCB33,      0, 0x604D, 0xCB34, 0x4D31, 0x4D32,
      0,      0, 0xCB35, 0xCB36,      0, 0xCB37, 0x6051, 0x316E,
};
const unsigned short utf8_to_euc_E78D[] = {
      0,      0,      0, 0xCB38, 0x3976, 0x3B62,      0,      0,
      0,      0,      0,      0,      0, 0xCB39, 0x6052, 0x6053,
 0xCB3A,      0, 0xCB3B,      0,      0,      0, 0xCB3C, 0x6055,
 0xCB3D,      0,      0,      0,      0, 0xCB3E, 0xCB3F, 0xCB40,
 0xCB41,      0,      0, 0x3D43,      0,      0, 0xCB42, 0xCB43,
 0x6057, 0xCB44, 0x6056, 0xCB45, 0xCB46,      0, 0xCB47, 0xCB48,
 0x6058, 0xCB49, 0x334D,      0,      0, 0x605A,      0, 0x7B24,
 0x6059, 0xCB4B, 0x605C, 0x605B, 0xCB4C,      0,      0,      0,
};
const unsigned short utf8_to_euc_E78E[] = {
 0xCB4D, 0xCB4E,      0, 0xCB4F, 0x383C, 0xCB50, 0xCB51, 0x4E28,
      0, 0x364C,      0, 0x3226,      0,      0, 0xCB52,      0,
 0xCB53,      0,      0, 0xCB54,      0, 0xCB55, 0x366A, 0xCB56,
 0xCB57,      0,      0,      0, 0xCB58,      0, 0xCB59, 0xCB5A,
 0xCB5B,      0, 0xCB5C,      0,      0, 0xCB5D, 0xCB5E,      0,
      0, 0x3461, 0xCB5F, 0xCB60,      0, 0xCB61,      0,      0,
      0,      0, 0x4E68, 0x605E,      0, 0xCB62,      0, 0xCB63,
      0, 0xCB64,      0, 0x6060, 0xCB65, 0x7B25,      0, 0xCB67,
};
const unsigned short utf8_to_euc_E78F[] = {
 0x6061,      0, 0x3251,      0,      0, 0xCB68, 0xCB69,      0,
 0x605D, 0x7B26, 0x3B39, 0xCB6B, 0xCB6C, 0x4441, 0x605F, 0xCB6D,
      0,      0, 0x7B29, 0xCB6F,      0,      0, 0x7B27,      0,
      0, 0xCB71,      0,      0,      0, 0xCB72, 0x6064,      0,
 0x3C6E, 0xCB73,      0, 0x7B28,      0, 0x6062, 0xCB75, 0xCB76,
      0, 0xCB77, 0x373E,      0,      0, 0x4849, 0x6063,      0,
      0, 0x607E,      0,      0, 0xCB78, 0x7B2B,      0, 0xCB7A,
 0x6069, 0xCB7B, 0xCB7C, 0xCB7D,      0, 0xCB7E, 0x383D, 0xCC21,
};
const unsigned short utf8_to_euc_E790[] = {
 0xCC22, 0xCC23,      0, 0x3565, 0xCC24, 0x6066, 0x4D7D, 0x7B2A,
      0, 0x4E30, 0xCC26,      0,      0,      0,      0,      0,
      0, 0xCC27,      0,      0,      0,      0,      0,      0,
      0,      0, 0xCC28, 0xCC29,      0,      0,      0,      0,
      0,      0, 0x4276,      0, 0xCC2A, 0x6068, 0x7B2C,      0,
 0xCC2C, 0x7B2E, 0x7B2D, 0xCC2F, 0xCC30, 0xCC31, 0x7B2F, 0xCC33,
 0xCC34, 0xCC35, 0x606A, 0x4E56, 0x3657, 0x487C, 0x474A,      0,
      0, 0xCC36, 0x606B,      0,      0,      0,      0, 0x606D,
};
const unsigned short utf8_to_euc_E791[] = {
 0xCC37, 0x6070,      0, 0xCC38, 0xCC39,      0, 0xCC3A, 0xCC3B,
      0,      0,      0, 0xCC3C,      0, 0xCC3D,      0,      0,
      0, 0xCC3E, 0xCC3F,      0,      0, 0x606C,      0, 0xCC40,
      0, 0x606F, 0x386A, 0x314D, 0x6071, 0xCC41, 0x3F70, 0x606E,
 0x4E5C,      0, 0x7B30, 0x6074, 0x7424,      0, 0xCC43, 0xCC44,
 0xCC45, 0x6072, 0x6075, 0xCC46,      0, 0xCC47, 0xCC48, 0x6067,
 0x6073, 0xCC49, 0xCC4A, 0x3A3C,      0,      0, 0x6076,      0,
      0,      0,      0,      0,      0,      0, 0x6077,      0,
};
const unsigned short utf8_to_euc_E792[] = {
 0xCC4B, 0xCC4C,      0, 0x4D7E,      0, 0xCC4D, 0xCC4E, 0xCC4F,
      0, 0x7B31,      0, 0x6078,      0,      0,      0, 0xCC51,
 0xCC52, 0xCC53, 0xCC54,      0,      0,      0,      0,      0,
 0xCC55, 0xCC56, 0xCC57,      0, 0xCC58,      0, 0x6079, 0x7B32,
 0xCC5A, 0xCC5B, 0x6065, 0xCC5C,      0,      0, 0xCC5D, 0x607A,
 0xCC5E, 0xCC5F, 0xCC60, 0xCC61,      0,      0, 0xCC62, 0xCC63,
 0x3444, 0xCC64, 0xCC65,      0,      0, 0xCC66,      0,      0,
      0, 0xCC67,      0, 0xCC68,      0, 0x3C25,      0, 0xCC69,
};
const unsigned short utf8_to_euc_E793[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
 0xCC6A, 0xCC6B, 0x607B,      0, 0xCC6C,      0,      0, 0x607C,
 0xCC6D,      0,      0, 0xCC6E, 0x607D,      0,      0,      0,
 0xCC6F,      0, 0xCC70, 0xCC71, 0x313B,      0, 0xCC72, 0xCC73,
 0x6121,      0, 0x493B, 0x6122, 0xCC74,      0, 0x3424, 0x6123,
 0xCC75, 0x6124, 0xCC76, 0xCC77,      0,      0, 0x6125, 0xCC78,
 0x6127, 0x6128, 0x6126,      0, 0xCC79,      0, 0x4953, 0x612A,
 0x6129,      0, 0xCC7A, 0xCC7B, 0xCC7C,      0,      0, 0xCC7D,
};
const unsigned short utf8_to_euc_E794[] = {
      0, 0x7B33,      0, 0x612C, 0x612B, 0x612D, 0xCC7E,      0,
      0,      0,      0,      0, 0x612E, 0x6130, 0x612F,      0,
      0, 0x3979, 0xCD21, 0x6132,      0, 0x6131, 0xCD22, 0xCD23,
 0x3445,      0, 0x3F53,      0, 0x453C,      0, 0x6133, 0x4038,
 0xCD24, 0xCD25,      0, 0x3B3A, 0xCD26, 0x3179, 0x6134, 0xCD27,
 0x4D51, 0xCD28, 0xCD29, 0x4A63, 0x6135,      0,      0, 0x796C,
 0x4544, 0x4D33, 0x3943, 0x3F3D,      0,      0, 0xCD2B, 0x434B,
 0x5234, 0xCD2C, 0x442E, 0x3268, 0x6136, 0xCD2D, 0xCD2E, 0xCD2F,
};
const unsigned short utf8_to_euc_E795[] = {
 0xCD30,      0,      0, 0xCD31, 0x6137,      0, 0x613C, 0xCD32,
 0xCD33, 0x613A, 0x6139, 0x5A42, 0x3326, 0x6138, 0xCD34, 0x305A,
 0xCD35, 0x482A, 0xCD36,      0, 0x484A,      0,      0, 0xCD37,
      0, 0x4E31, 0x613D, 0x613B, 0x435C, 0x4026, 0xCD38, 0xCD39,
 0x482B, 0xCD3A, 0x492D,      0, 0x613F, 0x4E2C, 0x374D, 0x6140,
      0, 0x613E, 0x4856, 0x6141,      0, 0x6142,      0, 0x7B34,
 0x305B, 0xCD3C,      0, 0x3E76, 0x6147,      0, 0x6144, 0x466D,
 0x6143, 0xCD3D, 0xCD3E, 0xCD3F, 0xCD40, 0xCD41, 0xCD42, 0x3526,
};
const unsigned short utf8_to_euc_E796[] = {
      0, 0xCD43, 0x614A,      0,      0, 0xCD44, 0x6145, 0x6146,
      0, 0x6149, 0x6148, 0x4925,      0,      0, 0x4142, 0x4141,
 0xCD45, 0x353F, 0xCD46, 0xCD47, 0x614B, 0xCD48,      0,      0,
      0, 0xCD49, 0x614C,      0, 0xCD4A, 0x614D,      0,      0,
      0,      0, 0xCD4B, 0x614F, 0xCD4C, 0x614E,      0,      0,
      0,      0,      0, 0x3156,      0,      0,      0,      0,
      0, 0x6157, 0x4868, 0x6151, 0xCD4D, 0x6153,      0,      0,
 0x6155, 0x3F3E, 0xCD4E,      0, 0x6156, 0x6154, 0x3C40, 0xCD4F,
};
const unsigned short utf8_to_euc_E797[] = {
 0xCD50, 0xCD51, 0x6150, 0x6152, 0xCD52, 0x4942, 0xCD53, 0x3E49,
      0,      0, 0x6159,      0, 0xCD54, 0x6158, 0xCD55, 0xCD56,
      0,      0, 0x615A,      0, 0x3C26, 0x3A2F,      0, 0xCD57,
 0x4577, 0x615B,      0, 0x444B, 0xCD58,      0, 0x615D, 0xCD59,
 0xCD5A, 0xCD5B, 0x4E21, 0x615C, 0xCD5C,      0,      0, 0xCD5D,
      0, 0x4169,      0,      0, 0xCD5E,      0, 0xCD5F, 0xCD60,
 0x6162, 0xCD61, 0x6164, 0x6165, 0x4354,      0,      0,      0,
      0, 0xCD62, 0x6163,      0, 0x6160,      0, 0x615E, 0x615F,
};
const unsigned short utf8_to_euc_E798[] = {
 0xCD63, 0x6161, 0xCD64, 0xCD65, 0xCD66,      0,      0, 0xCD67,
 0xCD68, 0x6168, 0xCD69, 0x6166, 0xCD6A, 0x6167,      0, 0xCD6B,
      0,      0, 0xCD6C, 0xCD6D,      0, 0xCD6E, 0xCD6F,      0,
      0, 0xCD70,      0, 0xCD71, 0xCD72, 0xCD73, 0xCD74, 0x6169,
 0x616B, 0x616C, 0x616D, 0xCD75, 0x616E, 0xCD76, 0xCD77, 0x616A,
      0, 0xCD78,      0,      0,      0, 0xCD79,      0,      0,
 0x6170,      0, 0xCD7A, 0xCD7B, 0x616F, 0xCD7C,      0,      0,
 0xCD7D, 0xCD7E, 0xCE21, 0x6171, 0xCE22,      0,      0,      0,
};
const unsigned short utf8_to_euc_E799[] = {
 0xCE24, 0xCE25, 0x4E45, 0xCE26, 0xCE27, 0xCE28, 0x6174, 0x6172,
 0x6173, 0xCE29, 0xCE23, 0xCE2A, 0x3462,      0,      0,      0,
      0,      0, 0x4C7E,      0,      0, 0xCE2B, 0x4A4A,      0,
 0x6176, 0xCE2C,      0,      0, 0x6175,      0,      0, 0xCE2D,
      0, 0x6177, 0x6178,      0, 0xCE2E, 0xCE2F,      0, 0x617C,
 0x6179, 0x617A, 0x617B,      0, 0x617D, 0xCE30, 0xCE31, 0xCE32,
 0x617E, 0xCE33, 0x6221,      0, 0xCE34,      0, 0x6222,      0,
 0x6223,      0, 0x482F, 0x4550, 0x6224, 0x4772, 0x4934,      0,
};
const unsigned short utf8_to_euc_E79A[] = {
 0x6225, 0xCE35, 0x7B35, 0x6226, 0x452A, 0xCE36, 0x3327, 0x3944,
 0x6227,      0,      0, 0x6228, 0xCE37, 0xCE38, 0x6229,      0,
 0x3B29,      0,      0, 0x622B,      0, 0xCE39, 0x622A,      0,
      0, 0x622C, 0x622D, 0x7B38, 0x7B36, 0xCE3C, 0x7B37, 0xCE3D,
 0xCE3E,      0, 0xCE3F, 0xCE40, 0xCE41, 0xCE42, 0x7B39, 0xCE44,
 0xCE45,      0, 0xCE46,      0,      0, 0xCE47, 0x4869,      0,
 0x622E,      0,      0,      0, 0x622F,      0,      0, 0x7369,
 0x6230, 0x6231, 0x6232,      0,      0, 0xCE48,      0, 0x3B2E,
};
const unsigned short utf8_to_euc_E79B[] = {
      0, 0xCE49, 0x6233, 0x4756,      0, 0xCE4A, 0x4B5F,      0,
 0x314E, 0xCE4B, 0x3157, 0xCE4C, 0xCE4D, 0x6234, 0xCE4E,      0,
      0,      0, 0x6236,      0, 0xCE4F,      0, 0x6235, 0x4570,
      0, 0xCE50,      0, 0x4039, 0x5D39,      0, 0x6237, 0x4C41,
 0xCE51, 0x6238,      0, 0x3446, 0x4857, 0x6239, 0xCE52, 0x623A,
 0xCE53,      0, 0x623B,      0, 0xCE54,      0, 0x4C5C,      0,
 0xCE55, 0xCE56, 0x4C55,      0, 0x443E,      0, 0xCE57,      0,
 0x416A, 0xCE58,      0, 0x623D, 0xCE59,      0, 0x3D62,      0,
};
const unsigned short utf8_to_euc_E79C[] = {
 0xCE5A, 0x3E4A,      0,      0, 0x6240,      0, 0xCE5B, 0x623F,
 0x623E, 0x487D, 0xCE5C, 0x3447, 0x3829,      0, 0xCE5D,      0,
      0,      0, 0xCE5E,      0, 0xCE5F, 0xCE60,      0, 0xCE61,
      0, 0xCE62, 0xCE63, 0x6246, 0xCE64,      0, 0x6243, 0x3F3F,
 0x4C32,      0, 0xCE65,      0, 0x6242, 0x6244, 0x6245,      0,
 0xCE66, 0x6241,      0,      0,      0, 0xCE67, 0xCE68, 0xCE69,
      0,      0,      0,      0, 0xCE6A, 0xCE6B, 0xCE6C, 0x6247,
 0x6248, 0xCE6D, 0x442F,      0, 0x3463, 0xCE6E, 0xCE6F,      0,
};
const unsigned short utf8_to_euc_E79D[] = {
 0x4365,      0, 0xCE70,      0,      0, 0xCE71, 0x7B3B, 0x6249,
      0,      0, 0xCE73,      0,      0, 0xCE74, 0xCE75, 0xCE76,
      0,      0, 0xCE77,      0,      0,      0, 0xCE78, 0xCE79,
      0,      0, 0x624A, 0x624D, 0xCE7A,      0, 0xCE7B, 0xCE7C,
 0xCE7D, 0x3F67, 0xCE7E, 0x4644, 0xCF21, 0x624E, 0x4B53, 0xCF22,
 0x624B,      0, 0xCF23, 0x624C, 0xCF24,      0,      0,      0,
 0xCF25,      0, 0xCF26, 0xCF27, 0xCF28,      0,      0,      0,
      0, 0x6251, 0xCF29,      0,      0, 0xCF2A, 0x6250, 0x624F,
};
const unsigned short utf8_to_euc_E79E[] = {
 0xCF2B,      0,      0,      0, 0xCF2C,      0,      0,      0,
      0,      0,      0, 0x6253, 0xCF2D, 0xCF2E, 0x6252,      0,
      0, 0x6254,      0,      0, 0xCF2F, 0xCF30, 0xCF31,      0,
      0,      0, 0xCF32,      0,      0,      0, 0x6256, 0xCF33,
 0x6255,      0, 0xCF34,      0,      0, 0x4A4D,      0, 0xCF35,
      0,      0, 0xCF36,      0, 0x3D56, 0x4E46, 0xCF37, 0xCF38,
 0x6257, 0xCF39,      0, 0x4637,      0, 0xCF3A, 0x6258,      0,
      0, 0x6259,      0, 0x625D, 0x625B, 0x625C, 0xCF3B, 0x625A,
};
const unsigned short utf8_to_euc_E79F[] = {
      0,      0,      0, 0xCF3C,      0,      0,      0, 0x625E,
      0, 0xCF3D,      0,      0,      0, 0x625F,      0,      0,
      0, 0xCF3E, 0xCF3F,      0,      0, 0xCF40,      0, 0x6260,
      0, 0xCF41, 0x6261, 0x4C37, 0x6262,      0, 0xCF42, 0xCF43,
 0xCF44,      0, 0x4C70, 0x6263, 0xCF45, 0x434E, 0xCF46, 0x476A,
      0, 0x366B, 0xCF47,      0, 0xCF48, 0x433B, 0x6264, 0x363A,
 0xCF49, 0xCF4A,      0, 0x4050, 0xCF4B,      0,      0,      0,
 0xCF4C,      0,      0, 0xCF4D, 0x6265,      0,      0,      0,
};
const unsigned short utf8_to_euc_E7A0[] = {
      0,      0, 0x3A3D,      0,      0, 0xCF4E, 0xCF4F,      0,
      0, 0xCF50,      0,      0, 0x6266, 0xCF51, 0xCF52,      0,
      0, 0xCF53, 0x6267,      0, 0x3826, 0x3A55,      0,      0,
      0,      0,      0,      0,      0, 0xCF54,      0,      0,
 0x6269, 0x7B3D, 0xCF56, 0xCF57,      0, 0x4556, 0x3A56, 0x354E,
      0,      0,      0,      0,      0, 0xCF58, 0xCF59,      0,
 0xCF5A,      0, 0x4B24,      0, 0x474B, 0xCF5B,      0, 0xCF5C,
      0,      0, 0x4557,      0,      0,      0,      0, 0x395C,
};
const unsigned short utf8_to_euc_E7A1[] = {
      0,      0,      0, 0xCF5D, 0xCF5E, 0x626B,      0, 0xCF5F,
 0xCF60,      0,      0,      0, 0xCF61,      0, 0x7B3E,      0,
      0,      0, 0xCF63,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0xCF64, 0x3E4B, 0xCF65,      0,
 0xCF66, 0xCF67,      0, 0xCF68, 0x7B3F,      0,      0,      0,
 0xCF6A,      0, 0xCF6B, 0x4E32, 0x3945,      0, 0xCF6C, 0x3827,
      0,      0, 0x4823,      0, 0x626D,      0,      0,      0,
      0,      0, 0x7B40,      0, 0x626F,      0, 0xCF6E,      0,
};
const unsigned short utf8_to_euc_E7A2[] = {
      0, 0x386B,      0,      0,      0,      0, 0x626E, 0x4476,
      0,      0, 0xCF6F,      0, 0x6271, 0x3337, 0x626C, 0xCF70,
      0, 0x486A,      0, 0x3130, 0xCF71, 0x3A6C,      0, 0x4F52,
 0xCF72,      0, 0x6270,      0,      0, 0xCF74, 0xCF75, 0xCF76,
      0, 0xCF73,      0, 0x6272, 0xCF77,      0,      0, 0x4A4B,
 0xCF78, 0x4059, 0x6274,      0, 0xCF79, 0xCF7A,      0, 0x6275,
 0xCF7B, 0xCF7C, 0xCF7D, 0xCF7E,      0, 0x6273,      0,      0,
      0,      0, 0x334E, 0xD021, 0x627B, 0xD022, 0x627A, 0xD023,
};
const unsigned short utf8_to_euc_E7A3[] = {
      0, 0x3C27,      0,      0,      0, 0x627C, 0x6277, 0xD024,
 0xD025, 0xD026, 0x627D, 0x6278, 0xD027,      0, 0xD028,      0,
 0x4858, 0x6276, 0xD029, 0xD02A, 0x6279, 0xD02B, 0xD02C,      0,
      0,      0, 0x6322, 0xD02E,      0,      0,      0, 0xD02F,
 0xD030, 0xD031,      0,      0, 0xD02D,      0, 0xD032, 0x6321,
 0x4B61,      0, 0xD033,      0, 0x627E,      0,      0, 0x306B,
      0,      0, 0xD034, 0xD035, 0x6324,      0, 0xD037, 0xD038,
      0,      0, 0xD039, 0xD03A,      0, 0x6323,      0, 0xD03B,
};
const unsigned short utf8_to_euc_E7A4[] = {
 0xD036, 0x3E4C,      0,      0,      0,      0, 0xD03C, 0x6325,
      0,      0,      0,      0, 0xD03D,      0, 0x4143,      0,
 0xD03E, 0x6327, 0x6326,      0,      0,      0,      0,      0,
      0, 0x6328, 0xD03F,      0, 0xD040,      0, 0xD041, 0xD042,
 0xD043,      0,      0,      0,      0, 0xD044, 0x6268, 0xD045,
      0, 0xD046, 0x626A, 0x632A, 0x6329, 0xD047,      0,      0,
 0x7B41, 0xD048,      0,      0, 0xD049, 0xD04A,      0,      0,
      0,      0, 0x3C28, 0xD04B, 0x4E69, 0xD04C, 0x3C52, 0xD04D,
};
const unsigned short utf8_to_euc_E7A5[] = {
 0x632B, 0x3737,      0,      0, 0xD04E, 0xD04F, 0xD050, 0x3540,
 0x3527, 0x3B63, 0xD051, 0xD052,      0,      0,      0, 0xD053,
 0x4D34, 0xD054,      0, 0x6331, 0xD055, 0x6330, 0x4144, 0x632D,
 0xD056,      0, 0x632F, 0xD057, 0xD058, 0x3D4B, 0x3F40, 0x632E,
 0x632C,      0, 0x472A,      0,      0, 0x3E4D,      0, 0xD059,
 0x493C, 0xD05A,      0, 0xD05B,      0, 0x3A57,      0,      0,
      0,      0, 0xD05C,      0,      0,      0,      0, 0x4578,
      0, 0xD05D, 0x6332, 0xD05E, 0xD05F,      0, 0xD060, 0x6333,
};
const unsigned short utf8_to_euc_E7A6[] = {
 0x6349, 0x3658,      0,      0, 0x4F3D, 0x4135,      0,      0,
      0,      0, 0x6334, 0xD061, 0xD062, 0x3252, 0x4477, 0x4A21,
      0, 0xD063,      0, 0xD064, 0x7B45, 0xD066, 0xD067,      0,
 0xD068,      0,      0, 0x7B47, 0xD06A, 0x6335,      0,      0,
      0, 0xD06B,      0,      0,      0,      0, 0x357A, 0x6336,
 0xD06C, 0xD06D, 0x6338, 0xD06E,      0,      0, 0x6339, 0xD06F,
 0x4729, 0xD070,      0, 0x633A, 0xD071,      0,      0,      0,
 0xD072, 0x633B, 0x633C, 0xD073,      0, 0x3659, 0x3253, 0x4645,
};
const unsigned short utf8_to_euc_E7A7[] = {
 0x3D28, 0x3B64, 0xD074,      0, 0xD075,      0,      0, 0xD076,
 0xD077, 0x633D, 0xD078, 0x3D29,      0,      0,      0, 0xD079,
      0, 0x324A, 0x4943,      0, 0xD07A, 0x633E, 0xD07B,      0,
 0x486B,      0, 0xD07C,      0,      0, 0xD07D, 0xD07E, 0x4145,
 0xD121, 0x6341, 0xD122, 0x6342, 0x4769, 0xD123, 0x3F41, 0x633F,
      0, 0x4361, 0xD124, 0xD125, 0x6340, 0xD126,      0,      0,
 0x3E4E, 0xD127,      0,      0,      0,      0,      0,      0,
 0xD128,      0,      0, 0x305C, 0xD129,      0,      0,      0,
};
const unsigned short utf8_to_euc_E7A8[] = {
 0x3529,      0, 0xD12A, 0xD12B,      0,      0,      0, 0xD12C,
 0x6343, 0xD12D, 0xD12E, 0x4478, 0xD12F, 0x6344, 0x4047,      0,
      0, 0xD130,      0,      0, 0x4C2D, 0xD131,      0, 0x4923,
 0x6345, 0x6346, 0x4355, 0xD132, 0x4E47,      0, 0xD133, 0x6348,
 0x6347, 0xD134,      0,      0,      0,      0,      0, 0xD135,
      0,      0,      0, 0xD136,      0, 0xD137, 0x3C6F, 0xD138,
 0xD139, 0x634A, 0x3070,      0, 0xD13A, 0xD13B,      0, 0x634D,
 0xD13C, 0xD13D, 0xD13E, 0x634B, 0x3254, 0x374E, 0x634C, 0x3946,
};
const unsigned short utf8_to_euc_E7A9[] = {
 0x3972,      0, 0x4A66, 0x634E, 0xD13F, 0xD140, 0x4B54, 0xD141,
 0xD142, 0x6350,      0,      0, 0xD143, 0x4051, 0x314F, 0x323A,
 0x302C,      0,      0,      0,      0, 0xD144, 0xD145, 0x634F,
      0, 0xD146,      0,      0, 0xD147, 0xD148,      0, 0xD149,
 0xD14A, 0x6351, 0x6352, 0x3E77,      0, 0xD14B,      0, 0xD14C,
      0, 0x6353, 0xD14D, 0x334F,      0, 0xD14E,      0,      0,
 0x6355,      0,      0,      0, 0x376A, 0xD14F, 0x3566,      0,
 0xD150, 0x6356, 0x3675,      0,      0, 0x6357, 0xD151, 0x407C,
};
const unsigned short utf8_to_euc_E7AA[] = {
 0xD152, 0x464D, 0xD153, 0x4060, 0x3A75, 0xD154, 0xD155,      0,
 0x6358,      0, 0xD156, 0xD157,      0,      0,      0,      0,
 0xD158, 0xD159, 0x4362, 0x416B, 0xD15A, 0x635A, 0x635C, 0x6359,
 0x635B,      0,      0,      0,      0,      0, 0xD15B, 0x3722,
 0xD15C,      0,      0, 0xD15D,      0,      0,      0,      0,
      0, 0x635D, 0x3726,      0, 0xD15E,      0, 0x3567, 0x4D52,
 0x635F,      0,      0, 0xD15F,      0, 0xD160, 0x6360,      0,
      0, 0xD161, 0x312E, 0xD162, 0xD163,      0,      0, 0x6363,
};
const unsigned short utf8_to_euc_E7AB[] = {
      0,      0,      0, 0x3376, 0x6362, 0x6361, 0xD164, 0x6365,
 0x635E, 0xD165, 0x6366, 0x4E29, 0xD166, 0x6367, 0xD167, 0x6368,
      0, 0x7B48, 0x5474, 0x636A,      0, 0x6369,      0,      0,
      0, 0x636B, 0x636C, 0xD169, 0x4E35, 0x636D,      0, 0x706F,
 0x3E4F, 0x636E, 0x636F, 0x3D57,      0, 0x4638, 0x6370, 0x7B49,
 0xD16A, 0xD16B, 0x4328, 0x7B4B, 0xD16D, 0x6371,      0, 0x433C,
 0x6372, 0xD16E,      0,      0, 0xD16F,      0, 0x3625,      0,
 0x513F, 0x435D, 0x3C33, 0xD170,      0, 0xD171, 0xD172, 0x3448,
};
const unsigned short utf8_to_euc_E7AC[] = {
      0,      0, 0x6373,      0, 0x6422,      0, 0x6376, 0xD173,
 0x3568,      0, 0x6375, 0x6424,      0,      0,      0, 0x6374,
      0, 0x3E50,      0,      0, 0xD174,      0,      0,      0,
 0x6378, 0x6379,      0, 0x452B,      0,      0, 0x637A, 0xD175,
 0x335E,      0,      0, 0xD176,      0, 0x3F5A, 0x4964, 0xD177,
 0x637C, 0xD178, 0xD179, 0xD17A, 0x4268, 0xD17B, 0xD17C, 0xD17D,
 0xD17E, 0xD221,      0, 0x6377, 0xD222, 0x637B, 0x637D,      0,
      0, 0x3A7B,      0,      0,      0, 0xD223,      0, 0xD224,
};
const unsigned short utf8_to_euc_E7AD[] = {
 0xD225, 0xD226,      0,      0,      0, 0x6426, 0x492E, 0xD227,
 0x4826, 0x4579,      0, 0x365A, 0x6425, 0x6423, 0xD228, 0x4835,
 0x637E, 0x435E, 0x457B,      0, 0x457A, 0xD229, 0x3A76,      0,
      0,      0,      0,      0,      0, 0x6438,      0,      0,
 0xD22A,      0,      0,      0, 0xD22B, 0x6428, 0xD22C, 0x642A,
      0, 0xD22D, 0xD22E,      0, 0x642D, 0xD22F, 0x642E, 0xD230,
 0x642B, 0x642C, 0xD231, 0xD232, 0x6429, 0x6427,      0, 0xD233,
      0,      0, 0x6421,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E7AE[] = {
      0,      0,      0,      0, 0xD234,      0, 0x4A4F, 0x3255,
      0, 0xD235,      0, 0x6435,      0, 0x6432, 0xD236, 0x6437,
 0xD237, 0xD238, 0x6436,      0, 0x4773, 0x4C27, 0xD239, 0x3B3B,
 0x6430, 0x6439, 0x6434, 0xD23A, 0x6433, 0x642F, 0x7B4C, 0x6431,
 0xD23C, 0x3449,      0,      0,      0, 0xD23D,      0,      0,
      0,      0, 0x433D,      0, 0xD23E, 0x407D,      0, 0xD23F,
 0xD240, 0x4822, 0xD241,      0, 0x643E, 0xD242, 0xD243,      0,
 0x4824,      0, 0xD244, 0xD245, 0xD246, 0xD247,      0,      0,
};
const unsigned short utf8_to_euc_E7AF[] = {
 0x4061, 0x643B, 0xD248,      0, 0x484F, 0xD249, 0x643F, 0x4A53,
 0xD24A, 0x435B, 0xD24B, 0x643A, 0x643C,      0,      0, 0x643D,
      0,      0,      0,      0, 0xD24C,      0, 0xD24D, 0xD24E,
      0, 0xD24F, 0xD250, 0xD251,      0, 0x6440,      0,      0,
 0x3C44,      0,      0,      0, 0x4646, 0x6445, 0x6444,      0,
 0xD252, 0x6441, 0xD253,      0,      0, 0x4F36,      0,      0,
      0,      0, 0xD254, 0x644A, 0xD255, 0xD256, 0x644E, 0x644B,
 0xD257, 0xD258, 0xD259,      0, 0xD25A,      0, 0xD25B,      0,
};
const unsigned short utf8_to_euc_E7B0[] = {
 0x6447, 0xD25C, 0xD25D, 0xD25E, 0xD25F,      0, 0xD260, 0x6448,
      0, 0xD261,      0, 0xD262, 0xD263, 0x644D, 0xD264, 0xD265,
      0, 0x6442, 0x5255, 0x6449, 0x6443,      0,      0, 0x644C,
      0, 0xD266,      0, 0xD267,      0,      0,      0, 0x6452,
 0xD268, 0x344A,      0, 0x644F,      0, 0xD269, 0xD26A, 0x6450,
 0xD26B,      0, 0x6451, 0x6454, 0xD26C,      0,      0,      0,
      0, 0xD26D,      0, 0xD26E, 0xD26F,      0, 0xD270, 0x6453,
 0x4876, 0xD271, 0xD272,      0,      0, 0x6455, 0x4E7C, 0x4A6D,
};
const unsigned short utf8_to_euc_E7B1[] = {
 0x645A,      0,      0, 0x6457,      0,      0, 0xD273,      0,
      0,      0, 0xD274,      0, 0x6456, 0x4052,      0, 0x6459,
 0x645B, 0xD276, 0xD277, 0xD278, 0x6458, 0xD275, 0x645F,      0,
 0x645C, 0xD279, 0xD27A, 0xD27B, 0xD27C, 0xD27D, 0xD27E, 0x645D,
 0x6446, 0xD321,      0, 0xD322, 0x645E, 0x6460,      0, 0xD323,
      0, 0xD324,      0,      0, 0x6461, 0xD325, 0xD326,      0,
 0xD327,      0, 0xD328, 0x4A46,      0, 0x6462,      0,      0,
      0, 0xD329,      0,      0, 0xD32A, 0xD32B, 0x4C62,      0,
};
const unsigned short utf8_to_euc_E7B2[] = {
      0, 0x364E, 0x3729, 0x6463,      0,      0, 0xD32C, 0xD32D,
      0, 0x4A34,      0, 0x3F68,      0, 0x4C30,      0, 0xD32E,
 0x6464,      0, 0x4E33,      0, 0xD32F, 0x4774,      0, 0x4146,
 0x4734,      0,      0, 0x3D4D,      0,      0, 0xD330, 0x3040,
 0xD331, 0x6469, 0x6467,      0, 0x6465, 0x3421, 0xD332, 0x3E51,
 0x646A,      0,      0, 0x6468,      0, 0x6466, 0x646E,      0,
 0xD333, 0x646D, 0x646C, 0x646B,      0,      0, 0xD334, 0xD335,
      0, 0x646F, 0xD336, 0xD337, 0xD338, 0x6470, 0x403A, 0xD339,
};
const unsigned short utf8_to_euc_E7B3[] = {
 0x6471,      0, 0x6473,      0, 0xD33A, 0x6472,      0, 0xD33B,
 0xD33C, 0xD33D, 0x3852,      0,      0, 0xD33E, 0x4138, 0xD33F,
      0,      0, 0x6475, 0xD340, 0xD341, 0xD342, 0x457C, 0xD343,
 0x6474, 0xD344, 0xD345,      0, 0x6476, 0xD346, 0x4A35, 0x416C,
 0x3947,      0, 0x6477,      0,      0,      0, 0xD347, 0x4E48,
      0, 0xD348,      0, 0xD349,      0,      0,      0, 0x6479,
      0,      0, 0x647A,      0, 0x647B, 0xD34A, 0x647C,      0,
 0x3B65,      0, 0x647D, 0x374F,      0,      0, 0x356A,      0,
};
const unsigned short utf8_to_euc_E7B4[] = {
 0x352A,      0, 0x6521, 0xD34B, 0x4C73, 0x3948, 0x647E, 0xD34C,
 0xD34D, 0xD34E, 0x6524, 0x4C66,      0, 0x473C,      0, 0xD34F,
 0x4933, 0xD350, 0xD351, 0xD352, 0x3D63, 0x6523, 0xD353, 0x3C53,
 0x3949, 0x3B66, 0x3569, 0x4A36, 0x6522, 0xD354, 0xD355,      0,
 0x4147, 0x4B42, 0x3A77, 0xD356,      0,      0, 0xD357,      0,
      0,      0, 0xD358, 0x3B67, 0x445D, 0xD359, 0x6527, 0x4E5F,
 0x3A59, 0xD35A, 0x6528, 0x3F42,      0, 0x652A,      0,      0,
      0, 0x3E52, 0x3A30,      0, 0xD35B, 0xD35C, 0xD35D, 0x6529,
};
const unsigned short utf8_to_euc_E7B5[] = {
 0xD35E, 0xD35F, 0x3D2A, 0x383E, 0x4148, 0x6525, 0x652B, 0xD360,
 0x7B4E,      0,      0, 0x6526, 0x3750, 0xD362, 0x652E, 0x6532,
 0x376B, 0xD363,      0, 0xD364,      0,      0, 0x652D, 0xD365,
      0, 0xD366, 0xD367, 0x6536, 0x7B4F, 0xD369, 0x394A,      0,
      0, 0x4D6D, 0x303C, 0x6533,      0, 0xD36A, 0x356B, 0xD36B,
 0x6530,      0, 0xD36C,      0,      0,      0, 0x6531,      0,
 0xD36D, 0x457D, 0x652F, 0x652C,      0, 0x3328, 0x4064,      0,
 0xD36E, 0x3828, 0xD36F, 0xD370,      0, 0x6538,      0, 0xD371,
};
const unsigned short utf8_to_euc_E7B6[] = {
      0, 0xD372, 0xD373, 0xD374,      0, 0xD375, 0xD376,      0,
 0xD377, 0x6535,      0, 0xD378, 0xD379, 0xD37A,      0, 0x6537,
      0, 0xD37B,      0, 0x6534,      0,      0, 0xD37C, 0xD37D,
      0, 0x3751, 0x4233, 0x6539, 0x416E, 0xD37E, 0xD421, 0x6546,
 0x7B51,      0, 0x6542, 0x653C,      0,      0, 0xD422, 0xD423,
      0,      0, 0xD424, 0x6540, 0x3C7A, 0x305D, 0x653B, 0x6543,
 0x6547, 0x394B, 0x4C56, 0xD425, 0x4456, 0x653D, 0xD426, 0x7B50,
 0x6545, 0xD428, 0x653A, 0x433E,      0, 0x653F, 0x303D, 0x4C4A,
};
const unsigned short utf8_to_euc_E7B7[] = {
      0,      0, 0xD429, 0xD42A, 0xD42B, 0xD42C, 0xD42D, 0x653E,
      0,      0, 0x365B, 0x486C, 0xD42E, 0xD42F, 0xD430, 0x416D,
      0, 0x4E50, 0x3D6F,      0,      0, 0x656E, 0x7B52, 0xD431,
 0x6548, 0xD432, 0x407E,      0, 0x6544, 0x6549, 0x654B,      0,
 0x4479, 0x654E, 0xD434,      0, 0x654A, 0xD435, 0xD436,      0,
 0x4A54, 0x344B, 0xD437, 0xD438, 0x4C4B, 0xD439,      0, 0x305E,
      0, 0xD43A, 0x654D,      0, 0x4E7D, 0xD43B, 0xD43C,      0,
      0, 0xD43D, 0xD43E, 0x654C,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E7B8[] = {
 0xD433, 0x316F,      0,      0, 0x466C, 0x654F,      0,      0,
 0xD43F, 0x6556, 0x6550, 0x6557,      0,      0,      0,      0,
 0xD440, 0xD441, 0x6553,      0,      0, 0xD442,      0, 0xD443,
      0,      0,      0, 0x477B, 0xD444, 0xD445, 0x3C4A, 0x6555,
 0xD446, 0x6552, 0x6558, 0x6551,      0,      0, 0x3D44, 0xD447,
 0xD448,      0,      0, 0x4B25, 0xD449, 0xD44A, 0x3D4C, 0xD44B,
      0, 0x6554, 0x6560, 0xD44C,      0, 0x655C, 0xD44D, 0x655F,
      0, 0x655D, 0x6561, 0x655B,      0, 0x6541, 0x4053, 0xD44E,
};
const unsigned short utf8_to_euc_E7B9[] = {
      0, 0x484B,      0, 0x655E, 0xD44F, 0xD450, 0x6559, 0xD451,
      0,      0, 0x4121, 0x3752,      0, 0x3D2B, 0xD452,      0,
 0xD453,      0, 0x7B53,      0, 0x3F25, 0x4136, 0x6564,      0,
 0xD455, 0x6566, 0x6567,      0,      0, 0x6563, 0x6565, 0xD456,
      0, 0xD457, 0xD458,      0,      0, 0xD459, 0x655A, 0x6562,
      0, 0x656A, 0x6569, 0xD45A,      0, 0x4B7A, 0xD45B, 0xD45C,
 0x372B,      0,      0, 0xD45D,      0,      0,      0,      0,
 0xD45E, 0x6568,      0, 0x656C, 0x656B, 0x656F, 0xD45F, 0x6571,
};
const unsigned short utf8_to_euc_E7BA[] = {
      0, 0xD460, 0x3B3C, 0x656D,      0,      0, 0xD461, 0xD462,
 0x6572, 0x6573, 0x7921,      0, 0x6574, 0xD464, 0x657A, 0x453B,
 0x6576, 0xD465, 0x6575, 0x6577, 0x6578, 0xD466, 0x6579,      0,
 0xD467,      0, 0xD468, 0x657B, 0x657C, 0xD469, 0xD46A,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E7BC[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x344C,      0,
 0x657D,      0, 0x657E, 0xD46C, 0xD46B, 0xD46D, 0xD46E, 0xD46F,
};
const unsigned short utf8_to_euc_E7BD[] = {
      0,      0,      0, 0xD470, 0xD471, 0x6621,      0, 0x7B54,
      0,      0,      0,      0, 0x6622, 0x6623, 0x6624, 0xD473,
 0x6625, 0x6626, 0xD474, 0xD475, 0x6628, 0x6627,      0,      0,
 0x6629,      0,      0, 0xD476, 0xD477, 0xD478,      0, 0x662A,
 0x662B, 0xD479,      0, 0xD47A, 0xD47B, 0xD47C, 0xD47D, 0x662E,
 0x662C, 0x662D, 0x3A61, 0x3753,      0, 0xD47E, 0x4356,      0,
 0x4833, 0xD521, 0x3D70,      0,      0, 0x474D,      0, 0x486D,
 0x662F, 0x586D,      0,      0,      0, 0xD522, 0xD523, 0xD524,
};
const unsigned short utf8_to_euc_E7BE[] = {
 0xD525,      0, 0x6630, 0x6632,      0, 0x4D65, 0x6631, 0x6634,
 0x6633,      0, 0x4D53, 0xD526, 0x6635, 0xD527, 0x487E, 0xD528,
 0xD529, 0xD52A,      0,      0, 0x6636,      0, 0xD52B, 0xD52C,
      0,      0, 0x6639,      0, 0xD52D, 0x6638, 0x6637,      0,
      0, 0x7B55, 0xD52F, 0x663A, 0x3732,      0, 0xD530,      0,
 0x4122, 0x3541, 0xD531,      0,      0, 0xD532, 0x663E, 0x663B,
      0,      0, 0x663C,      0, 0xD533,      0, 0x663F,      0,
 0x6640, 0x663D,      0,      0, 0xD534, 0x3129,      0, 0xD535,
};
const unsigned short utf8_to_euc_E7BF[] = {
 0xD536, 0x3227,      0, 0xD537,      0, 0x6642, 0x6643,      0,
 0xD538,      0, 0x6644,      0, 0x4D62,      0, 0xD539, 0xD53A,
      0,      0, 0x3D2C,      0, 0x6646, 0x6645,      0,      0,
      0,      0,      0, 0xD53B,      0,      0,      0, 0xD53C,
 0x3F69, 0x6647,      0, 0xD53D,      0, 0xD53E, 0x6648,      0,
 0xD53F, 0x6649,      0, 0x3465, 0xD540,      0, 0xD541, 0xD542,
 0x344D,      0, 0xD543, 0x664A,      0,      0,      0,      0,
      0, 0x664B, 0xD544, 0x4B5D, 0x4D63, 0xD545, 0xD546, 0xD547,
};
const unsigned short utf8_to_euc_E880[] = {
 0x4D54, 0x4F37,      0, 0x394D, 0x664E, 0x3C54, 0x664D, 0xD548,
 0xD549,      0, 0xD54A, 0x664F, 0x3C29, 0xD54B, 0xD54C, 0xD54D,
 0x4251, 0xD54E, 0x6650, 0xD54F, 0xD550, 0x394C, 0xD551, 0x4C57,
 0x6651, 0x6652,      0,      0, 0x6653, 0xD552, 0xD553, 0xD554,
 0xD555, 0x6654,      0,      0, 0xD556,      0, 0xD557,      0,
 0x6655,      0,      0,      0, 0xD558,      0, 0xD559,      0,
 0xD55A,      0,      0, 0x3C2A, 0xD55B, 0xD55C, 0x4C6D, 0xD55D,
      0, 0xD55E, 0xD55F, 0x6657, 0xD560, 0x433F, 0xD561, 0x6656,
};
const unsigned short utf8_to_euc_E881[] = {
 0xD562,      0,      0,      0, 0xD563,      0, 0x6659,      0,
      0,      0, 0x6658,      0,      0,      0,      0,      0,
      0,      0, 0x665A,      0,      0,      0, 0x403B,      0,
 0x665B,      0, 0x665C,      0,      0,      0, 0x4A39, 0x665D,
 0xD564, 0x416F, 0x665E,      0, 0xD565,      0, 0xD566,      0,
 0x665F,      0,      0,      0,      0, 0xD567,      0, 0x4E7E,
 0x6662, 0xD568, 0x6661, 0x6660, 0x4430, 0xD569, 0x6663, 0x3F26,
      0, 0x6664,      0,      0,      0, 0x6665, 0x4F38, 0x6666,
};
const unsigned short utf8_to_euc_E882[] = {
      0, 0xD56A,      0,      0, 0x6667, 0x6669, 0x6668, 0x4825,
 0xD56B, 0x4679,      0, 0x4F3E, 0x4829,      0, 0xD56C,      0,
      0,      0,      0, 0x666B,      0,      0, 0x3E53,      0,
 0x492A,      0, 0x666C, 0x666A, 0xD56D, 0x344E, 0xD56E,      0,
      0, 0x3854, 0x3B68,      0,      0, 0x486E, 0xD56F, 0xD570,
      0, 0x382A, 0x4B43, 0xD571, 0x666F, 0x666D,      0, 0x394E,
      0, 0x394F, 0x3069,      0, 0x3A68,      0,      0,      0,
 0xD572, 0xD573, 0x4759,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E883[] = {
      0,      0,      0, 0x305F, 0x6674,      0, 0x4340,      0,
 0xD574,      0,      0,      0, 0x4758, 0xD575, 0x425B, 0xD576,
      0,      0, 0xD577,      0, 0xD578, 0xD579, 0x6676, 0xD57A,
 0xD57B, 0x6672, 0x6675, 0x6670,      0, 0x6673, 0x4B26,      0,
 0xD57C, 0x3855,      0,      0, 0x307D, 0x6671,      0,      0,
      0,      0,      0,      0,      0, 0xD57D, 0xD57E, 0x6678,
 0xD621, 0x6679, 0xD622, 0xD623, 0x4639,      0, 0xD624,      0,
 0x363B, 0xD625, 0xD626,      0, 0x6726, 0x473D, 0xD627,      0,
};
const unsigned short utf8_to_euc_E884[] = {
      0,      0, 0x3B69, 0xD628,      0, 0x363C, 0x4048, 0x4F46,
 0x4C2E, 0x6677, 0x4054, 0xD629,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0xD62A, 0xD62B,
 0xD62C,      0, 0x3553, 0x667A, 0xD62D,      0, 0xD62E,      0,
 0xD62F,      0,      0, 0x667C, 0xD630,      0,      0, 0xD631,
      0, 0x667B,      0,      0, 0xD632,      0,      0, 0x667D,
 0xD633, 0x4326,      0, 0x473E,      0, 0xD634,      0,      0,
      0, 0x4431, 0xD635,      0, 0xD636,      0, 0x6723,      0,
};
const unsigned short utf8_to_euc_E885[] = {
      0,      0,      0,      0,      0, 0xD637, 0x6722, 0xD638,
      0,      0, 0xD639, 0x667E, 0xD63A,      0, 0x3F55,      0,
 0x4965, 0x6725, 0xD63B, 0x6724, 0x3950, 0x4F53,      0, 0xD63C,
      0,      0,      0,      0,      0,      0,      0, 0x6735,
 0xD63D, 0xD63E,      0,      0,      0, 0x6729, 0x672A, 0xD63F,
 0xD640, 0xD641,      0, 0x3C70,      0, 0xD642, 0x6728, 0xD643,
 0x3978, 0x6727,      0,      0, 0x672B,      0,      0, 0xD644,
 0x4432, 0x4A22, 0x4123,      0,      0,      0,      0, 0x425C,
};
const unsigned short utf8_to_euc_E886[] = {
 0x672F, 0xD645, 0x6730, 0x672C, 0xD647, 0xD648, 0xD649,      0,
 0x672D,      0, 0x672E, 0xD64A,      0,      0, 0xD64B, 0x3951,
 0xD646,      0,      0, 0x6736,      0, 0x6732, 0xD64C,      0,
 0xD64D,      0, 0x4966, 0xD64E, 0x4B6C, 0x4928, 0xD64F,      0,
 0x6731,      0, 0xD650, 0x6734, 0x6733,      0,      0,      0,
 0x4B44, 0x6737,      0,      0,      0,      0, 0xD651,      0,
 0x6738,      0, 0xD652, 0x4137, 0xD653, 0x6739,      0,      0,
 0x673B,      0, 0x673F, 0xD654,      0, 0x673C, 0x673A, 0x473F,
};
const unsigned short utf8_to_euc_E887[] = {
 0x673D,      0, 0x673E, 0xD656,      0, 0xD657, 0x3232,      0,
 0x6745, 0x6740, 0xD658, 0xD655,      0, 0x6741, 0xD659, 0xD65A,
      0, 0x6742,      0, 0x4221,      0, 0xD65B,      0, 0xD65C,
 0x6744, 0x6743, 0x6746, 0xD65D,      0, 0xD65E, 0xD65F, 0x6747,
 0x6748, 0xD660,      0, 0x3F43, 0xD661, 0x3269,      0, 0x6749,
 0x4E57,      0, 0x3C2B, 0xD662, 0xD663, 0x3D2D,      0,      0,
 0xD664, 0xD665, 0xD666, 0x3B6A, 0x4357, 0xD667, 0xD668,      0,
 0xD669, 0xD66A, 0x674A, 0x674B, 0x3131, 0xD66B, 0x674C, 0xD66C,
};
const unsigned short utf8_to_euc_E888[] = {
 0xD66D, 0x674D, 0x674E, 0xD66E,      0, 0x674F,      0, 0x6750,
 0x363D, 0x5A2A, 0x6751,      0, 0x4065, 0x6752, 0x3C4B, 0xD66F,
 0x6753,      0, 0x5030, 0xD670, 0xD671,      0, 0x6754, 0x4A5E,
 0x345C, 0xD672, 0xD673, 0x4124, 0x3D58, 0xD674, 0x4971, 0x3D2E,
      0, 0xD675, 0xD676,      0,      0,      0,      0,      0,
 0xD677, 0x6755, 0x3952, 0x6756, 0x484C,      0, 0x6764,      0,
      0,      0, 0xD678, 0x6758, 0xD679, 0x4249, 0x4775, 0x383F,
 0x6757, 0x4125, 0xD67A,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E889[] = {
 0x6759,      0,      0, 0xD67B, 0xD67C, 0xD67D, 0xD67E, 0x447A,
      0,      0,      0, 0xD721,      0,      0, 0xD722, 0xD723,
      0, 0xD724,      0,      0,      0,      0, 0xD725,      0,
 0x675B, 0x675A, 0x675D,      0, 0xD726, 0x675C,      0, 0x675E,
 0xD727,      0, 0x6760, 0xD728, 0x675F,      0, 0x344F, 0xD729,
 0x6761,      0, 0x6762, 0x6763,      0, 0xD72A, 0x3A31, 0x4E49,
      0, 0x6765, 0x3F27,      0, 0xD72B,      0, 0x3170, 0x6766,
 0x6767,      0,      0, 0xD72C,      0, 0xD72D, 0x6768, 0xD72E,
};
const unsigned short utf8_to_euc_E88A[] = {
 0xD72F, 0xD730,      0, 0xD731, 0xD732,      0,      0, 0xD733,
      0, 0xD734, 0xD735, 0x3072,      0, 0x6769, 0xD736,      0,
      0, 0xD737, 0x676A,      0, 0xD738,      0, 0xD739,      0,
 0xD73A, 0x4967, 0xD73B, 0xD73C,      0, 0x3C47,      0, 0x676C,
 0xD73D, 0xD73E,      0, 0xD73F, 0xD740, 0x3329, 0x3032, 0xD741,
 0xD742, 0xD743, 0xD744, 0x676B, 0x676E, 0x474E, 0xD745, 0x3F44,
 0xD746, 0x3256, 0xD747, 0x4B27, 0xD748,      0,      0, 0xD749,
 0x375D, 0x365C, 0xD74A, 0x676D, 0xD74B, 0x326A, 0xD74C, 0xD74D,
};
const unsigned short utf8_to_euc_E88B[] = {
      0,      0,      0,      0,      0, 0x3423, 0xD74E,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0xD74F, 0x3171, 0x6772, 0x4E6A, 0x425D, 0xD750,      0, 0x4944,
      0, 0x677E, 0xD751, 0x3257, 0x677C,      0, 0x677A, 0x6771,
 0xD752, 0x676F, 0xD753, 0x6770, 0xD754, 0x3C63, 0x366C, 0x4377,
 0xD755,      0, 0xD756, 0x4651,      0, 0xD757,      0, 0xD758,
      0, 0x3151,      0, 0x6774, 0x6773,      0, 0xD759, 0xD75A,
      0, 0x6779, 0x6775, 0x6778,      0, 0xD75B, 0xD75C,      0,
};
const unsigned short utf8_to_euc_E88C[] = {
 0xD75D, 0x7B57, 0x4C50, 0x6777, 0x3258, 0x337D, 0x677B, 0xD75F,
 0xD760, 0x677D, 0xD761, 0xD762,      0,      0, 0x3754,      0,
      0,      0,      0,      0,      0,      0, 0x6823, 0x682C,
 0x682D,      0,      0, 0xD764, 0x302B, 0xD765, 0xD766, 0xD767,
      0, 0xD768, 0xD769, 0x6834,      0,      0,      0,      0,
 0x3071,      0,      0, 0x682B, 0xD76A, 0xD76B, 0xD76C, 0x682A,
 0xD76D, 0x6825, 0x6824, 0xD76E, 0x6822, 0x6821, 0x4363, 0xD76F,
 0x427B, 0x6827, 0xD770,      0, 0xD771, 0xD772,      0,      0,
};
const unsigned short utf8_to_euc_E88D[] = {
 0x6826,      0, 0xD773, 0xD774, 0xD775, 0x6829,      0, 0xD776,
      0, 0x4170, 0x3755,      0,      0, 0xD777, 0xD778, 0x3141,
 0x6828, 0xD779, 0x3953, 0xD83E, 0xD763, 0xD77A, 0xD77B, 0xD77C,
 0x4171,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x7B58,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0xD77D,      0,      0, 0x683A,      0, 0x683B,      0, 0x3259,
 0xD77E,      0,      0, 0x322E, 0x6838, 0xD821,      0, 0x7B59,
};
const unsigned short utf8_to_euc_E88E[] = {
 0xD823,      0, 0xD824,      0, 0xD825, 0x682E, 0xD826, 0x6836,
      0, 0x683D, 0x6837,      0,      0, 0xD827, 0x6835,      0,
      0,      0, 0xD828, 0x6776, 0xD829, 0xD82A, 0x6833,      0,
 0xD82B, 0xD82C, 0x682F, 0xD82D, 0xD82E, 0xD82F, 0x3450, 0x6831,
 0x683C,      0, 0x6832,      0,      0,      0, 0xD830, 0xD831,
 0x683E, 0xD832, 0x6830, 0x477C, 0xD833, 0xD84C,      0,      0,
      0, 0x4D69,      0,      0,      0, 0x6839,      0,      0,
      0,      0,      0,      0,      0, 0x684F, 0xD834, 0xD835,
};
const unsigned short utf8_to_euc_E88F[] = {
 0xD836, 0x6847,      0,      0,      0, 0x3F7B,      0, 0x7B5A,
      0, 0xD838, 0x3546,      0, 0x365D,      0, 0x6842, 0xD839,
 0xD83A, 0xD83B,      0, 0x325B, 0xD83C,      0, 0x3E54,      0,
 0x6845,      0,      0,      0, 0x3A5A, 0xD83D,      0, 0x4551,
 0x684A,      0,      0,      0,      0,      0,      0,      0,
 0xD83F, 0x4A6E, 0xD840, 0x6841,      0,      0,      0, 0x325A,
 0x3856, 0x4929, 0x684B,      0, 0x683F,      0, 0x7B5B, 0x6848,
 0xD842, 0xD843,      0, 0x6852, 0xD844, 0x6843,      0,      0,
};
const unsigned short utf8_to_euc_E890[] = {
      0, 0xD845,      0, 0x6844, 0x463A,      0, 0xD846, 0x6849,
      0,      0, 0xD847, 0x6846, 0x4B28, 0x684C, 0x3060, 0xD848,
      0, 0xD849,      0, 0x6840,      0, 0xD84A,      0,      0,
      0, 0xD84B,      0,      0,      0,      0,      0,      0,
 0x684E,      0, 0x684D,      0,      0,      0,      0,      0,
      0, 0x476B, 0x6854,      0, 0x685F,      0,      0, 0xD84D,
      0, 0x337E,      0,      0,      0, 0x6862,      0,      0,
 0x6850, 0xD84E,      0,      0, 0x6855, 0x4D6E,      0,      0,
};
const unsigned short utf8_to_euc_E891[] = {
      0,      0,      0,      0,      0, 0xD84F, 0x685E, 0xD850,
 0x7B5C, 0x4D55, 0xD852,      0,      0, 0xD853, 0x4E2A, 0xD854,
      0, 0xD855, 0xD856,      0,      0,      0, 0xD857, 0x4378,
 0xD858, 0xD859, 0xD85A, 0x336B, 0xD85B,      0,      0,      0,
 0xD85C, 0x4972, 0x6864, 0x4621, 0xD85D, 0xD85E, 0x3031, 0xD85F,
      0, 0x685D, 0xD860, 0x6859, 0x4172, 0x6853, 0x685B, 0x6860,
 0xD861, 0x472C,      0, 0xD862, 0xD863, 0x302A, 0xD864, 0x6858,
 0xD865, 0x6861, 0x4978,      0, 0xD866, 0xD867,      0,      0,
};
const unsigned short utf8_to_euc_E892[] = {
      0, 0xD868, 0x685C,      0, 0x6857, 0xD869,      0,      0,
      0,      0,      0, 0x3E55,      0,      0,      0,      0,
 0x3D2F,      0, 0xD86A, 0xD86B, 0x3C2C, 0xD86C,      0,      0,
      0, 0x4C58,      0,      0, 0x4947,      0, 0xD86D, 0x6867,
      0, 0x6870,      0,      0,      0,      0, 0xD86E,      0,
 0xD86F, 0xD870, 0xD871,      0,      0, 0x685A,      0, 0xD872,
      0, 0xD873, 0x3377,      0, 0x7B5D,      0,      0,      0,
 0x3E78, 0x6865, 0xD875, 0x686A, 0x4173, 0xD876, 0xD877, 0x6866,
};
const unsigned short utf8_to_euc_E893[] = {
 0xD878, 0x686D, 0xD879,      0, 0x435F,      0, 0x686E, 0xD87A,
 0xD87B, 0x4D56, 0x6863, 0x3338, 0xD87C, 0x6869,      0, 0xD87D,
 0x686C, 0x4C2C,      0, 0xD87E,      0,      0, 0x686F,      0,
      0, 0x6868, 0x686B,      0, 0x7925,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0xD922,
      0,      0, 0xD923,      0, 0x4B29,      0, 0x4F21, 0xD924,
 0xD925, 0xD926, 0xD927,      0, 0x6873,      0,      0, 0xD928,
      0,      0, 0xD92A, 0xD92B, 0x687A, 0xD92C,      0, 0x6872,
};
const unsigned short utf8_to_euc_E894[] = {
 0x3C43,      0, 0xD92D, 0xD92E,      0,      0, 0x6851, 0xD92F,
      0,      0,      0,      0, 0xD930,      0, 0xD931,      0,
 0xD932, 0x4A4E,      0, 0x4C22, 0x6879, 0x6878,      0, 0x6874,
 0x6875,      0, 0x3136,      0, 0xD933,      0, 0xD934, 0x6877,
      0, 0x6871, 0xD935, 0xD936, 0xD937, 0xD938, 0x4455, 0xD939,
      0,      0, 0xD93A, 0xD93B, 0x6876, 0x307E,      0, 0xD93C,
      0,      0, 0xD929, 0xD93D, 0xD93E, 0x4222, 0xD93F,      0,
      0,      0,      0,      0,      0, 0x4A43,      0, 0xD940,
};
const unsigned short utf8_to_euc_E895[] = {
 0x687B, 0x6921,      0, 0x4859,      0,      0, 0xD941,      0,
 0x687E, 0x3E56, 0x3C49, 0x6923,      0,      0, 0x363E, 0xD942,
 0xD943, 0xD944, 0xD945, 0x7B5E,      0, 0x6924, 0xD947, 0x4979,
 0x687D, 0x7B5F, 0x6856,      0, 0xD949, 0xD94A, 0xD94B, 0xD94C,
 0xD94D, 0xD94E, 0xD94F, 0x687C, 0xD950,      0,      0,      0,
 0x4F4F, 0x4622, 0x4973, 0x7B60,      0, 0x692B,      0, 0xD952,
      0,      0,      0,      0,      0,      0,      0, 0x6931,
      0, 0xD953, 0xD954, 0xD955,      0, 0xD956, 0x6932, 0xD957,
};
const unsigned short utf8_to_euc_E896[] = {
 0x6925, 0xD958,      0,      0, 0x4776, 0xD959, 0xD95A, 0x692F,
 0x6927, 0xD95B, 0x6929, 0xD95C, 0xD95D,      0,      0, 0xD95E,
 0x6933, 0x6928,      0, 0xD95F, 0x692C,      0,      0, 0x3172,
 0xD960, 0x4665,      0, 0x692D, 0x6930, 0xD961,      0, 0xD962,
 0xD963,      0, 0xD964,      0, 0x6926, 0xD965, 0x4126, 0xD966,
 0x692A, 0x3B27, 0x3F45, 0x3730, 0x4C74, 0xD974, 0x4C79, 0x3D72,
 0x7B62,      0,      0,      0, 0xD967,      0, 0xD968, 0xD969,
 0xD96A, 0x6937, 0x6935,      0, 0xD96B, 0xD96C, 0xD96D, 0xD96E,
};
const unsigned short utf8_to_euc_E897[] = {
      0, 0x4F4E, 0xD96F,      0,      0,      0,      0, 0xD970,
      0, 0x6934, 0xD971, 0xD972,      0, 0x4D75, 0xD973, 0x6936,
 0x6938,      0,      0,      0,      0, 0x6939,      0,      0,
 0xD975,      0, 0xD976,      0, 0x693C, 0x693A,      0, 0xD977,
 0xD978,      0,      0,      0, 0x4623, 0x693B, 0xD979,      0,
 0xD97A, 0x484D, 0x692E,      0,      0, 0xD97B,      0,      0,
      0,      0,      0, 0xD97C,      0,      0, 0xD97D, 0x3D73,
      0, 0x693D, 0x6942, 0x4174, 0xD97E,      0, 0x6941, 0xDA21,
};
const unsigned short utf8_to_euc_E898[] = {
 0xDA22,      0, 0x6922,      0, 0xDA23, 0xDA24, 0x6943, 0x4149,
      0,      0, 0x693E, 0x6940,      0, 0xDA25, 0xDA26,      0,
 0xDA27, 0xDA28, 0xDA29, 0x693F,      0,      0, 0x5D31, 0x5D22,
 0xDA2A, 0xDA2B, 0x6945, 0xDA2C,      0,      0, 0xDA2D,      0,
      0, 0xDA2E, 0x6944,      0,      0,      0,      0, 0xDA2F,
      0, 0xDA30,      0,      0,      0, 0x4D76,      0, 0x623C,
 0x6946,      0,      0,      0,      0,      0, 0xDA31,      0,
 0xDA32,      0, 0xDA33,      0, 0xDA34, 0xDA35,      0, 0x6947,
};
const unsigned short utf8_to_euc_E899[] = {
 0xDA36, 0xB866, 0xDA37,      0,      0,      0, 0xDA38,      0,
      0,      0,      0,      0,      0, 0x6948, 0x3857,      0,
 0x3554,      0, 0xDA39, 0xDA3A, 0x694A, 0x515D, 0xDA3B, 0xDA3C,
 0xDA3D, 0xDA3E, 0x3575,      0, 0x4E3A, 0xDA3F, 0x3673, 0x694B,
 0xDA40, 0xDA41, 0xDA42, 0xDA43, 0xDA44,      0,      0, 0x694C,
      0, 0xDA45,      0, 0x436E, 0xDA46,      0,      0, 0xDA47,
      0, 0x694D,      0,      0,      0, 0xDA48, 0xDA49, 0xDA4A,
      0, 0x467A, 0xDA4B, 0x303A,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E89A[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
 0xDA6D,      0, 0x3263, 0x6952, 0x6953, 0xDA4C,      0,      0,
      0, 0xDA4D,      0, 0x694E,      0, 0x3B3D, 0xDA4E,      0,
 0xDA4F,      0, 0xDA50,      0, 0xDA51,      0,      0,      0,
      0, 0xDA52,      0, 0x694F, 0x4742,      0, 0xDA53, 0xDA54,
 0xDA55, 0x6950, 0x6951, 0x695B,      0, 0xDA56,      0, 0x6955,
 0x6958, 0xDA57,      0, 0xDA58, 0xDA59, 0xDA5A, 0x6954, 0xDA5B,
 0xDA5C, 0xDA5D,      0,      0,      0,      0,      0, 0xDA5E,
};
const unsigned short utf8_to_euc_E89B[] = {
 0xDA5F, 0xDA60,      0, 0xDA61, 0x6956, 0xDA62, 0x6957, 0x3C58,
      0, 0x6959,      0, 0x4341,      0, 0x3756, 0x3342,      0,
      0, 0xDA63, 0xDA64,      0, 0x695C, 0xDA65,      0, 0xDA66,
      0, 0x333F, 0xDA67, 0x6961, 0xDA68,      0, 0x695D, 0x6960,
 0xDA69,      0,      0, 0xDA6A, 0x483A, 0xDA6B,      0, 0xDA6C,
      0, 0x695E,      0,      0, 0x695F, 0x4948, 0x485A, 0x6962,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x427D, 0x696C, 0xDA6E, 0x6968, 0xDA6F, 0xDA70, 0x326B,      0,
};
const unsigned short utf8_to_euc_E89C[] = {
 0x6966,      0, 0x4B2A, 0x6967, 0xDA71, 0xDA72, 0x6964, 0xDA73,
 0x6965, 0x696A, 0x696D, 0xDA74,      0, 0x696B, 0xDA75, 0xDA76,
 0xDA77, 0x6969, 0x6963, 0xDA78, 0xDA79,      0,      0,      0,
 0x4358, 0xDA7A, 0x6974,      0, 0x4C2A,      0, 0xDA7B, 0xDA7C,
      0, 0xDA7D,      0, 0xDA7E,      0, 0x6972,      0,      0,
 0xDB21, 0x6973,      0,      0,      0,      0, 0xDB22, 0xDB23,
      0, 0xDB24, 0xDB25,      0, 0x696E,      0,      0, 0x6970,
      0, 0xDB26, 0xDB27, 0x6971, 0xDB28, 0xDB29, 0xDB2A, 0x696F,
};
const unsigned short utf8_to_euc_E89D[] = {
 0xDB2B,      0,      0, 0xDB2C,      0, 0xDB2D,      0,      0,
      0, 0x4066,      0, 0x4F39, 0x6978, 0xDB2E, 0x6979,      0,
      0,      0,      0, 0x6A21,      0, 0x3F2A,      0, 0x697B,
 0xDB2F, 0x697E,      0,      0,      0, 0xDB30,      0, 0x6976,
 0x6975, 0xDB31,      0, 0x6A22, 0xDB32, 0xDB33, 0x325C,      0,
 0x697C,      0, 0x6A23,      0,      0,      0, 0x697D, 0xDB34,
      0, 0xDB35, 0xDB36,      0, 0x697A,      0, 0x4433,      0,
 0x6977,      0,      0, 0xDB37,      0,      0,      0, 0x4768,
};
const unsigned short utf8_to_euc_E89E[] = {
      0,      0, 0x6A27, 0xDB38, 0xDB39, 0xDB3A, 0xDB3B, 0xDB3C,
 0xDB3D, 0xDB3E,      0, 0xDB3F, 0xDB40, 0x4D3B,      0,      0,
 0xDB41,      0,      0, 0xDB42,      0, 0xDB43,      0, 0xDB44,
 0xDB45, 0xDB46,      0,      0,      0,      0, 0xDB47, 0x6A26,
 0xDB48,      0, 0x6A25, 0xDB49,      0,      0,      0, 0xDB4A,
      0,      0,      0, 0x6A2E, 0xDB4B, 0xDB4C, 0xDB4D, 0x6A28,
      0, 0xDB4E,      0, 0x6A30,      0, 0xDB4F,      0,      0,
      0,      0, 0x4D66, 0x6A33,      0, 0x6A2A, 0xDB50, 0xDB51,
};
const unsigned short utf8_to_euc_E89F[] = {
 0x6A2B, 0xDB52,      0,      0, 0x6A2F,      0, 0x6A32, 0x6A31,
 0xDB53, 0xDB54, 0xDB55, 0x6A29,      0,      0, 0xDB56,      0,
 0x6A2C,      0, 0x6A3D,      0,      0, 0xDB57, 0xDB58,      0,
      0, 0xDB59, 0xDB5A,      0, 0xDB5B,      0,      0, 0xDB5C,
 0x6A36,      0, 0xDB5D, 0xDB5E, 0xDB5F,      0,      0,      0,
      0,      0, 0xDB60, 0xDB61,      0, 0xDB62,      0, 0x6A34,
      0, 0xDB63, 0x6A35, 0xDB64,      0,      0, 0x6A3A, 0x6A3B,
 0xDB65, 0x332A, 0xDB66, 0x3542,      0,      0, 0x6A39, 0xDB67,
};
const unsigned short utf8_to_euc_E8A0[] = {
      0, 0xDB68,      0, 0xDB69,      0, 0x6A24, 0xDB6A, 0x7B65,
      0, 0xDB6B, 0xDB6C, 0xDB6D,      0, 0x6A38, 0x6A3C, 0x6A37,
 0xDB6E, 0x6A3E, 0xDB70, 0xDB71, 0xDB72, 0x6A40, 0x6A3F,      0,
 0xDB73, 0xDB6F, 0xDB74, 0xDB75, 0xDB76,      0, 0xDB77, 0xDB78,
      0, 0x6A42, 0x6A41, 0x695A,      0,      0,      0, 0x6A46,
 0xDB79,      0,      0,      0,      0, 0xDB7A, 0xDB7B,      0,
 0xDB7C, 0x6A43, 0xDB7D,      0,      0, 0xDB7E, 0x6A44,      0,
      0, 0x6A45, 0xDC21, 0x6A47, 0xDC22,      0,      0,      0,
};
const unsigned short utf8_to_euc_E8A1[] = {
 0x376C, 0xDC23, 0x6A49, 0xDC24, 0x6A48, 0xDC25, 0x3D30,      0,
 0xDC26, 0xDC27, 0xDC28, 0xDC29, 0x3954, 0x5E27, 0xDC2A,      0,
      0, 0xDC2B, 0x6A4A, 0x3D51,      0, 0xDC2C, 0xDC2D, 0x3339,
 0xDC2E, 0x6A4B, 0xDC2F, 0x3152, 0xDC30, 0x3E57, 0x6A4C, 0xDC31,
 0xDC32, 0x3955, 0x6A4D, 0x3061, 0xDC33,      0,      0,      0,
 0x493D, 0xDC34,      0, 0x6A4E,      0,      0,      0,      0,
 0x3F6A, 0xDC35, 0x6A55,      0,      0, 0x6A52,      0, 0x436F,
      0, 0xDC36,      0, 0xDC37,      0, 0x6A53, 0x6A50, 0x365E,
};
const unsigned short utf8_to_euc_E8A2[] = {
 0xDC38, 0x6A4F, 0x6A56,      0,      0,      0,      0,      0,
 0x3736,      0,      0, 0x425E,      0, 0x6A5C,      0,      0,
      0,      0, 0x6A58,      0,      0,      0, 0x4235, 0x6A57,
 0xDC39, 0x6A5A, 0xDC3A, 0xDC3B, 0xDC3C,      0, 0x6A51, 0xDC3D,
 0xDC3E,      0, 0x6A5B,      0, 0x6A5D,      0,      0,      0,
 0xDC3F,      0, 0xDC40, 0x486F,      0,      0, 0x6A59,      0,
 0x6A5E, 0x6A60,      0,      0, 0x3853, 0x6A54,      0, 0x3041,
      0,      0, 0xDC41,      0,      0, 0xDC42, 0xDC43, 0x6A5F,
};
const unsigned short utf8_to_euc_E8A3[] = {
 0xDC44, 0x3A5B, 0x4E76, 0x6A61, 0x6A62, 0x4175,      0,      0,
      0,      0, 0xDC45, 0xDC46, 0xDC47, 0xDC48, 0xDC49, 0x4E22,
      0, 0xDC4A, 0xDC4B, 0xDC4C, 0x6A63, 0x4D35,      0,      0,
 0x6A64, 0x6A65,      0, 0xDC4D, 0x4A64, 0x6A66, 0xDC4E, 0x3A40,
      0, 0x4E23,      0,      0,      0,      0,      0, 0xDC4F,
 0x6A6B,      0,      0,      0,      0,      0,      0, 0xDC50,
 0xDC51, 0xDC52, 0x6A6C, 0x3E58, 0x6A6A, 0x7B66,      0, 0xDC54,
 0x4D67, 0x6A67,      0,      0, 0x6A69, 0x403D, 0x3F7E,      0,
};
const unsigned short utf8_to_euc_E8A4[] = {
      0, 0xDC55, 0x6A68,      0, 0x6A6D,      0, 0xDC56, 0x4A23,
      0,      0, 0x6A6F,      0, 0x6A6E, 0xDC57, 0xDC58, 0xDC59,
 0x336C,      0, 0x4B2B, 0x6A70,      0, 0xDC5A, 0xDC5B,      0,
 0xDC5C, 0xDC5D, 0xDC5E,      0, 0x7922, 0x6A7C, 0x6A72,      0,
 0xDC60,      0,      0,      0,      0, 0x6A73, 0xDC61, 0xDC62,
 0xDC63,      0, 0x6A74, 0x6A75,      0,      0,      0,      0,
 0xDC64, 0xDC65, 0xDC66,      0,      0, 0xDC67, 0x6A79,      0,
 0x6A7A, 0xDC68, 0xDC69, 0x6A78,      0,      0, 0xDC6A,      0,
};
const unsigned short utf8_to_euc_E8A5[] = {
 0xDC6B, 0x6A76, 0xDC6C, 0x6A71, 0x6A77, 0xDC6D, 0xDC6E,      0,
      0, 0xDC6F,      0,      0, 0x6A7B, 0x7037,      0, 0xDC70,
      0,      0, 0xDC71,      0,      0,      0, 0x3228, 0xDC72,
      0,      0, 0xDC73, 0xDC74, 0xDC75,      0, 0x6A7E, 0x365F,
 0x6A7D, 0xDC76, 0xDC77, 0xDC78, 0x6B22,      0, 0x6B21,      0,
      0,      0, 0x6B24, 0xDC79,      0, 0x6B23, 0xDC7A, 0x6B25,
 0xDC7B,      0, 0x3D31, 0xDC7C, 0x6B26, 0xDC7D,      0, 0x6B27,
      0,      0, 0xDC7E, 0xDD21, 0xDD22, 0xDD23, 0x6B28, 0x403E,
};
const unsigned short utf8_to_euc_E8A6[] = {
      0, 0x4D57,      0, 0x6B29,      0,      0, 0x4A24, 0x4746,
 0x6B2A, 0xDD24, 0x6B2B, 0x382B,      0, 0xDD25,      0, 0x352C,
 0xDD26,      0,      0, 0x6B2C, 0xDD27, 0xDD28, 0x3B6B, 0x4741,
 0x6B2D,      0, 0x3350, 0xDD29, 0xDD2A,      0,      0, 0xDD2B,
 0xDD2C, 0x6B2E,      0,      0,      0, 0xDD2D, 0x6B30, 0x4D77,
      0, 0x6B2F, 0x3F46,      0, 0x6B31,      0,      0, 0x6B32,
 0xDD2E,      0, 0x6B33, 0x3451, 0xDD2F, 0xDD30, 0xDD31, 0xDD32,
      0,      0, 0x6B34,      0, 0xDD33, 0x6B35,      0, 0x6B36,
};
const unsigned short utf8_to_euc_E8A7[] = {
 0x6B37,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0x3351,      0, 0xDD34, 0xDD35, 0xDD36, 0xDD37,
 0xDD38,      0, 0x6B38,      0, 0x6B39, 0x6B3A,      0,      0,
      0,      0,      0, 0x3272,      0, 0xDD39, 0x3F28, 0x6B3B,
      0, 0xDD3A,      0, 0xDD3B,      0, 0xDD3C,      0,      0,
      0, 0xDD3D,      0, 0xDD3E, 0x6B3C,      0, 0xDD3F,      0,
 0x6B3D, 0xDD40,      0,      0,      0, 0xDD41,      0, 0xDD42,
};
const unsigned short utf8_to_euc_E8A8[] = {
 0x3840,      0, 0x447B, 0x6B3E, 0xDD43, 0xDD44,      0, 0xDD45,
 0x3757,      0, 0x3F56,      0, 0x6B41,      0, 0x4624, 0xDD46,
 0x6B40, 0xDD47, 0x7B67, 0x3731, 0xDD49, 0xDD4A, 0x6B3F, 0x4277,
 0x352D,      0,      0, 0x6B42,      0, 0x6B43, 0xDD4B, 0x3E59,
 0xDD4C,      0, 0xDD4D, 0x376D, 0xDD4E, 0x6B44, 0xDD4F,      0,
      0,      0, 0x4B2C, 0xDD50, 0xDD51, 0x405F,      0, 0xDD52,
      0, 0x3576,      0, 0x4C75, 0x414A, 0xDD53, 0x6B45, 0x7B68,
      0,      0, 0x3F47, 0x4370, 0x3E5A, 0xDD55, 0xDD56,      0,
};
const unsigned short utf8_to_euc_E8A9[] = {
 0xDD57, 0x6B46,      0, 0xDD58,      0, 0xDD59, 0x6B49, 0xDD5A,
 0x6B4A, 0xDD5B,      0,      0,      0, 0xDD5C, 0xDD5D,      0,
 0x3A3E, 0x4242, 0x6B48, 0xDD5E, 0x3E5B, 0x493E, 0xDD5F, 0xDD60,
 0xDD61,      0,      0, 0x6B47, 0xDD62, 0xDD63, 0x3B6C,      0,
 0x3153, 0xDD64, 0x6B4E, 0x3758,      0, 0xDD65, 0x3B6E, 0xDD66,
      0, 0x3B6D,      0, 0x4F4D, 0x6B4D, 0x6B4C, 0x4127,      0,
 0x354D, 0x4F43, 0x333A, 0x3E5C,      0, 0xDD67, 0xDD68, 0xDD69,
      0, 0x7B69, 0xDD6B, 0xDD6C, 0x6B4B,      0, 0xDD6D, 0xDD6E,
};
const unsigned short utf8_to_euc_E8AA[] = {
 0xDD6F,      0, 0x6B50, 0xDD70, 0x6B51, 0x6B4F, 0xDD71, 0x3858,
      0, 0x4D40,      0, 0xDD72, 0x3B6F, 0x4727,      0, 0xDD73,
 0xDD74, 0x6B54, 0xDD75, 0x4040,      0, 0x4342, 0xDD76, 0xDD77,
 0x4D36, 0xDD78, 0x6B57,      0,      0,      0, 0x386C, 0xDD79,
 0x403F, 0x6B53,      0, 0x6B58, 0x386D, 0x6B55, 0x6B56, 0x7B6A,
 0x6B52, 0xDD7B,      0,      0, 0x4062, 0x4649, 0xDD7C, 0xDD7D,
 0x432F,      0, 0x325D, 0xDD7E,      0,      0, 0xDE21, 0xDE22,
      0, 0x4870,      0, 0xDE23, 0x3543,      0, 0x7B6B, 0x4434,
};
const unsigned short utf8_to_euc_E8AB[] = {
      0,      0, 0x6B5B, 0xDE25, 0x6B59,      0, 0xDE26, 0x434C,
 0xDE27, 0xDE28, 0xDE29, 0x4041, 0x3452, 0x6B5A,      0, 0x3F5B,
      0, 0xDE2A, 0x4E4A, 0xDE2B, 0xDE2C, 0xDE2D, 0x4F40, 0xDE2E,
      0,      0, 0x6B5C, 0x6B67, 0x4435, 0xDE2F, 0x6B66, 0x7B6C,
 0x6B63, 0x6B6B, 0x6B64,      0, 0x6B60,      0, 0x447C, 0x6B5F,
      0,      0,      0, 0x6B5D, 0xDE31, 0x4D21, 0x3B70,      0,
 0xDE32, 0x6B61,      0, 0x6B5E, 0xDE33, 0xDE34, 0x7B6E, 0x6B65,
 0x3D74,      0, 0x3841,      0, 0xDE36,      0, 0x427A, 0xDE37,
};
const unsigned short utf8_to_euc_E8AC[] = {
 0x4B45, 0x315A, 0x3062,      0, 0x4625, 0xDE38, 0xDE39, 0x6B69,
      0,      0, 0xDE3F, 0xDE3A, 0x6B68,      0, 0x4666,      0,
 0x6B6D, 0xDE3B,      0,      0, 0x6B62,      0, 0x6B6C, 0x6B6E,
      0, 0x382C, 0x6B6A, 0x3956, 0xDE3C, 0x3C55, 0xDE3D, 0xDE3E,
 0x6B6F, 0x4D58,      0,      0,      0,      0, 0x6B72,      0,
 0x6B75,      0,      0, 0x6B73, 0x4935, 0xDE40,      0,      0,
 0xDE41,      0,      0, 0x6B70,      0,      0,      0, 0xDE42,
      0, 0x3660,      0,      0, 0xDE43,      0, 0x6B74,      0,
};
const unsigned short utf8_to_euc_E8AD[] = {
      0, 0x6B76, 0xDE44, 0xDE45, 0xDE46, 0xDE47, 0xDE48,      0,
 0xDE49, 0x6B7A,      0,      0, 0x6B77, 0xDE4E, 0x6B79, 0x6B78,
      0,      0, 0xDE4A, 0x7B6F, 0xDE4C,      0, 0x6B7B,      0,
 0x3C31, 0xDE4D, 0x6B7D, 0x6B7C, 0x4968,      0, 0xDE4F, 0x6C21,
      0,      0,      0, 0xDE50,      0,      0, 0x3759,      0,
      0,      0,      0, 0x6B7E, 0x6C22, 0xDE51,      0, 0x6C23,
 0x3544, 0x6641, 0x3E79,      0, 0x6C24,      0, 0xDE52, 0x386E,
 0xDE53, 0xDE54,      0,      0, 0xDE55, 0x6C25, 0xDE56, 0x7B70,
};
const unsigned short utf8_to_euc_E8AE[] = {
 0x6C26, 0xDE57,      0, 0x3B3E, 0xDE58, 0xDE59,      0,      0,
      0,      0, 0x5A4E, 0xDE5A, 0x6C27, 0xDE5B, 0x6C28, 0xDE5C,
 0x3D32,      0, 0x6C29, 0x6C2A, 0xDE5D, 0xDE5E, 0x6C2B,      0,
      0, 0x6C2C, 0x6C2D,      0, 0xDE5F,      0, 0xDE60, 0xDE61,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E8B0[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x432B,
 0xDE62, 0xDE63, 0x6C2E,      0,      0, 0xDE64, 0xDE65, 0x6C30,
};
const unsigned short utf8_to_euc_E8B1[] = {
      0, 0x6C2F,      0,      0,      0, 0xDE66, 0x4626, 0xDE67,
 0x6C31, 0xDE68, 0x4B2D, 0xDE69, 0x6C32,      0, 0x6C33, 0xDE6A,
 0x6C34, 0xDE6B,      0, 0xDE6C, 0xDE6D, 0x6C35,      0, 0xDE6E,
 0xDE6F, 0xDE72, 0x465A, 0xDE70,      0, 0xDE71,      0,      0,
      0, 0x3E5D, 0x6C36, 0xDE73, 0xDE74,      0, 0xDE75,      0,
 0xDE76, 0xDE77, 0x396B, 0x502E, 0x6C37, 0xDE78,      0,      0,
      0,      0,      0, 0xDE79,      0, 0xDE7A, 0xDE7B,      0,
 0x6C38, 0x493F, 0x6C39, 0xDE7C, 0x6C41,      0, 0xDE7D,      0,
};
const unsigned short utf8_to_euc_E8B2[] = {
      0,      0, 0x6C3A,      0,      0, 0x6C3C, 0xDE7E, 0xDF21,
      0, 0x6C3B, 0x6C3D, 0xDF22, 0x4B46, 0x6C3E, 0x6C3F,      0,
 0xDF23,      0, 0xDF24, 0xDF25, 0x6C40,      0,      0,      0,
 0x6C42, 0xDF26,      0, 0xDF27, 0xDF28, 0x332D, 0x4467,      0,
 0x4969, 0x3A62, 0x3957,      0, 0xDF29,      0,      0, 0x494F,
 0x325F, 0x484E, 0x6C45, 0x3453, 0x4055, 0x6C44, 0x6C49, 0x4379,
 0x4C63,      0, 0x6C47, 0x6C48, 0x352E,      0, 0x6C4A, 0x4763,
 0x425F, 0xDF2A, 0xDF2B, 0x4871, 0x453D, 0x6C46,      0, 0x4B47,
};
const unsigned short utf8_to_euc_E8B3[] = {
 0x326C, 0x6C4C, 0x4F28, 0x4442, 0x4F45, 0xDF2C, 0xDF2D, 0x3B71,
 0x6C4B, 0xDF2E, 0x4231, 0xDF2F,      0, 0x6C5C, 0x4128, 0xDF30,
      0, 0x4678,      0, 0x4950,      0, 0xDF32, 0xDF31,      0,
      0, 0xDF33, 0x6C4F, 0x3B3F, 0x3B72, 0xDF34, 0x3E5E,      0,
 0x4765, 0xDF35, 0x382D, 0x6C4E, 0x6C4D,      0, 0x496A,      0,
 0xDF36,      0, 0x3C41,      0, 0xDF37, 0x4552,      0, 0xDF38,
 0x7B71,      0, 0xDF3A,      0, 0x7B72, 0xDF3B,      0, 0xDF3C,
 0xDF3D,      0, 0x6C51, 0x6C52, 0x3958, 0x6C50, 0xDF3E, 0xDF3F,
};
const unsigned short utf8_to_euc_E8B4[] = {
      0, 0xDF40,      0, 0xDF41, 0x6C53, 0x6C54,      0, 0x6C56,
 0x4223, 0xDF42, 0x6C55, 0x3466,      0, 0x6C58,      0, 0x6C57,
 0x6C59,      0, 0x7B73, 0x6C5B, 0x6C5D,      0, 0x6C5E, 0xDF44,
      0,      0,      0, 0xDF45,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E8B5[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x4056, 0xDF46, 0x3C4F, 0x6C5F,
      0, 0xDF47,      0, 0x3352, 0xDF48, 0x6C60, 0xDF49,      0,
 0x4176, 0x6C61,      0, 0x6C62, 0x496B,      0, 0x7B74, 0x352F,
      0,      0,      0,      0,      0,      0,      0, 0xDF4A,
};
const unsigned short utf8_to_euc_E8B6[] = {
      0, 0x6C63, 0xDF4B,      0, 0xDF4C, 0x4436,      0,      0,
 0xDF4D,      0, 0x315B,      0,      0, 0xDF4E,      0,      0,
 0xDF4F, 0xDF50,      0,      0,      0, 0xDF51,      0,      0,
      0, 0x6C64,      0,      0,      0,      0, 0xDF52, 0xDF53,
 0xDF54,      0,      0, 0x3C71,      0,      0, 0xDF55,      0,
 0x3F76,      0,      0, 0xDF56, 0xDF57,      0,      0, 0xDF58,
      0,      0, 0xDF59, 0x422D,      0, 0xDF5A,      0, 0xDF5B,
      0, 0xDF5C, 0x6C67, 0xDF5D, 0xDF6F,      0, 0x6C66,      0,
};
const unsigned short utf8_to_euc_E8B7[] = {
 0xDF5E,      0, 0x6C65,      0,      0, 0xDF5F, 0xDF60, 0xDF61,
 0xDF62,      0, 0xDF63, 0x6C6D, 0x6C6B,      0, 0xDF64, 0x6C68,
      0, 0xDF65,      0,      0, 0xDF66, 0xDF67, 0x6C6A, 0xDF68,
      0, 0xDF69, 0x6C69, 0x6C6C,      0, 0x3577,      0, 0x6C70,
      0, 0x4057,      0, 0x6C71, 0xDF6A, 0xDF6B,      0, 0xDF6C,
 0x3859,      0, 0x6C6E, 0x6C6F, 0xDF6D,      0,      0, 0x4F29,
 0xDF6E, 0xDF70, 0xDF71, 0x4437, 0xDF72, 0x4129,      0,      0,
      0,      0,      0,      0, 0x6C72, 0xDF73,      0, 0x6C75,
};
const unsigned short utf8_to_euc_E8B8[] = {
      0, 0xDF74,      0,      0, 0xDF75, 0xDF76, 0xDF77,      0,
 0x6C73, 0x6C74, 0x4D59, 0xDF78,      0,      0,      0, 0x4627,
 0x6C78, 0xDF79,      0,      0, 0xDF7A,      0, 0xDF7B,      0,
      0,      0,      0,      0,      0, 0x6C76, 0x6C77, 0x6C79,
 0xDF7C, 0xDF7D, 0xDF7E, 0xE021,      0,      0, 0xE022, 0xE023,
      0,      0, 0x6D29,      0,      0,      0,      0,      0,
 0x6C7C, 0xE024,      0, 0xE025, 0x6C7D, 0x6C7B, 0xE026, 0xE027,
 0xE028, 0xE029,      0,      0,      0, 0xE02A,      0,      0,
};
const unsigned short utf8_to_euc_E8B9[] = {
 0xE02B, 0xE02C, 0x6C7A,      0, 0x447D,      0,      0, 0x6D21,
 0x6D25, 0x6D22, 0x6C7E, 0xE02D, 0x6D23, 0xE02E, 0xE02F, 0xE030,
 0x6D24,      0,      0,      0, 0xE031, 0x6D2B,      0,      0,
      0, 0x6D26,      0, 0xE032, 0xE033, 0xE034, 0xE035, 0x4058,
 0x6D28, 0xE036, 0xE037, 0x6D2A, 0x6D27,      0,      0,      0,
      0, 0xE038,      0,      0, 0xE039, 0xE03A,      0, 0xE03B,
 0xE03C, 0xE03D, 0x6D2D,      0, 0x3D33,      0, 0x6D2C,      0,
      0, 0xE03E, 0xE03F, 0xE040, 0x6D2E,      0,      0,      0,
};
const unsigned short utf8_to_euc_E8BA[] = {
      0, 0x6D2F, 0xE041, 0xE042, 0x6D32, 0x6D31,      0, 0x6D30,
      0, 0xE043, 0x6D34, 0x6D33,      0, 0x4C76,      0,      0,
 0xE044, 0x6D36, 0xE045, 0x6D35, 0x6D37, 0xE046,      0,      0,
      0, 0x6D38, 0xE047, 0xE048,      0, 0xE049, 0xE04A,      0,
      0, 0x6D3A, 0xE04B,      0,      0,      0,      0, 0xE04C,
      0, 0xE04D, 0x6D39, 0x3F48, 0x6D3B, 0xE04E, 0xE04F, 0x366D,
 0x6D3C, 0x6D3E,      0, 0xE050,      0, 0xE051,      0,      0,
      0,      0, 0xE052, 0xE053,      0,      0, 0x6D3F,      0,
};
const unsigned short utf8_to_euc_E8BB[] = {
 0xE054, 0xE055,      0, 0xE056, 0xE057, 0x6D40, 0x6D3D, 0xE058,
 0x6D41,      0, 0x3C56, 0x6D42, 0x3530, 0x3733,      0, 0x7B76,
      0, 0xE05A, 0x382E,      0, 0xE05B,      0,      0,      0,
      0,      0,      0, 0x6D43, 0xE05C,      0,      0, 0x4670,
      0,      0, 0x453E, 0x6D44,      0,      0,      0,      0,
 0xE05D,      0,      0, 0x6D47,      0, 0xE064, 0xE05E,      0,
 0xE05F, 0xE060,      0,      0,      0,      0,      0, 0xE061,
 0x3C34, 0xE062, 0xE063, 0x6D46, 0x6D45, 0x375A, 0x6D48,      0,
};
const unsigned short utf8_to_euc_E8BC[] = {
 0xE065,      0, 0xE066, 0x3353,      0, 0x6D4A,      0, 0xE067,
 0xE068, 0x3A5C, 0x6D49,      0, 0x6D52,      0,      0, 0xE069,
 0xE06A,      0, 0x6D4C, 0x6D4E, 0x4A65, 0x6D4B, 0xE06B, 0xE06C,
 0xE06D, 0x6D4D,      0, 0x6D51, 0x6D4F, 0x3531, 0xE06E, 0x6D50,
 0xE06F, 0xE070,      0, 0xE071,      0, 0xE072, 0x6D53, 0xE073,
 0xE074, 0x475A, 0x4E58,      0, 0xE075, 0xE076, 0xE077, 0x3D34,
      0,      0,      0, 0x6D54, 0xE078, 0xE079, 0xE07A, 0xE07B,
 0x4D22, 0x6D56, 0xE07C, 0x6D55,      0,      0, 0x6D59, 0x4D41,
};
const unsigned short utf8_to_euc_E8BD[] = {
 0xE07D, 0xE07E, 0x6D58, 0xE121, 0x336D, 0x6D57, 0x6D5C, 0xE122,
      0, 0x6D5B,      0,      0, 0x6D5A, 0x4532, 0x6D5D, 0xE123,
      0, 0xE124, 0xE125, 0xE126, 0xE127, 0xE128,      0, 0x6D5E,
 0xE129,      0,      0,      0, 0x6D5F, 0xE12A, 0xE12B, 0x396C,
      0, 0x3725, 0x6D60, 0x6D61, 0x6D62, 0xE12C,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E8BE[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x3F49, 0x6D63, 0xE12D, 0x3C2D, 0x6D64,
 0xE12E, 0xE12F,      0, 0x6D65, 0xE130, 0xE131, 0xE132, 0x5221,
 0x517E,      0,      0,      0,      0, 0x6D66, 0x6570, 0x6D67,
 0x4324, 0x3F2B, 0x4740,      0,      0, 0xE133, 0xE134, 0x6D68,
 0xE135,      0, 0x4A55, 0x4454, 0x397E,      0, 0xE136, 0x4329,
};
const unsigned short utf8_to_euc_E8BF[] = {
 0xE137, 0xE138, 0x312A,      0, 0x4B78, 0x3F57, 0xE139,      0,
      0,      0, 0xE13A, 0xE13B,      0, 0xE13C, 0x375E,      0,
 0xE13D, 0x3661, 0xE13E, 0xE13F, 0x4A56, 0xE140,      0,      0,
      0,      0, 0x6D69,      0,      0,      0,      0,      0,
 0xE141,      0, 0x6D6B, 0xE142, 0xE143, 0x6D6A, 0x3260,      0,
 0xE144, 0x4676, 0x6D6C, 0x4777,      0, 0x4533, 0xE145, 0x6D6D,
 0x3D52, 0xE146,      0,      0, 0x6D6F, 0xE147, 0xE148, 0x4C42,
 0x6D7E, 0x6D71, 0x6D72, 0xE149,      0, 0x4449, 0xE14A,      0,
};
const unsigned short utf8_to_euc_E980[] = {
 0x4260, 0x4177, 0xE14B, 0x4628, 0xE14C, 0x6D70, 0x3555,      0,
 0xE14D,      0,      0, 0x6D79, 0xE14E, 0x6D76, 0x6E25, 0x4629,
 0x4360, 0x6D73,      0, 0x447E, 0x4553, 0x6D74, 0x6D78, 0x3F60,
 0xE14F, 0x4767, 0x444C, 0xE150,      0, 0x4042, 0x6D77, 0x422E,
 0x4224, 0x6D75, 0x3029, 0x4F22,      0,      0,      0, 0x6D7A,
 0xE151, 0xE152, 0xE154,      0, 0xE155, 0xE156, 0x4261, 0xE153,
      0, 0x3D35, 0x3F4A, 0xE157, 0xE158, 0x6D7C, 0x6D7B, 0xE159,
 0x306F, 0x6D7D,      0,      0, 0x492F,      0, 0x6E27, 0xE15A,
};
const unsigned short utf8_to_euc_E981[] = {
      0, 0x465B, 0x3F6B, 0xE15B, 0xE15C, 0x4359,      0, 0x3678,
      0, 0x6E26, 0x4D37, 0x313F, 0xE15D, 0x4A57, 0x3261, 0x6E21,
 0x6E22, 0x6E23, 0x6E24, 0x463B, 0x4323, 0x3063, 0x6E28,      0,
 0x6E29, 0x7423,      0, 0xE15E, 0x423D, 0xE15F, 0x6E2A,      0,
 0x3173, 0x414C, 0xE160, 0x382F,      0, 0x4D5A, 0xE161, 0x7B79,
 0x6E2B, 0x452C,      0,      0, 0xE163, 0x4178, 0x3C57, 0x6E2C,
 0xE164,      0, 0x6E2F,      0, 0xE165, 0x3D65, 0x6E2D, 0x412B,
 0x412A, 0xE166, 0x3064,      0, 0x4E4B, 0x6E31,      0, 0x4872,
};
const unsigned short utf8_to_euc_E982[] = {
 0x6E33, 0x6E32, 0x6E30, 0x6364, 0x3454, 0xE167,      0, 0x6D6E,
 0xE168, 0x6E35, 0x6E34, 0xE169, 0xE16A,      0, 0xE16B, 0x6E36,
 0xE16C, 0x4D38,      0,      0,      0, 0xE16D,      0, 0xE16E,
 0xE16F, 0xE170,      0, 0xE171,      0,      0,      0,      0,
 0xE172, 0xE173, 0xE174, 0x4661,      0, 0xE175, 0x4B2E,      0,
 0x6E37,      0, 0x3C59,      0,      0,      0,      0, 0x6E38,
 0xE176, 0x6E39, 0xE177, 0xE178, 0xE179, 0x6E3A, 0xE17A,      0,
 0x4521,      0,      0,      0,      0, 0xE17B, 0xE17D,      0,
};
const unsigned short utf8_to_euc_E983[] = {
      0, 0x306A,      0, 0xE17E, 0xE221, 0xE222,      0, 0xE223,
 0xE224,      0, 0x3959,      0, 0xE17C,      0, 0x4F3A,      0,
      0,      0, 0xE22D,      0,      0, 0xE225,      0, 0xE226,
 0xE227, 0xE228,      0, 0x6E3E, 0xE229, 0xE22A, 0x7B7A, 0xE22B,
      0, 0x3734, 0x6E3B,      0, 0x6E3C, 0xE22C,      0,      0,
 0x4974,      0,      0, 0xE22F,      0, 0x3354,      0, 0xE230,
 0xE231,      0,      0,      0, 0xE232, 0x4D39, 0xE22E, 0x363F,
      0,      0,      0,      0,      0, 0x4554, 0xE233, 0xE234,
};
const unsigned short utf8_to_euc_E984[] = {
 0xE235,      0, 0x6E3F,      0, 0xE236, 0xE237, 0xE238,      0,
 0xE239,      0,      0,      0,      0, 0xE23A,      0,      0,
 0xE23B,      0, 0x6E40,      0, 0xE23C, 0x7B7C, 0xE23D, 0xE23E,
 0xE23F, 0x6E41, 0xE240,      0, 0xE241,      0, 0xE242,      0,
 0xE243,      0, 0xE245, 0xE246,      0, 0xE244,      0, 0x7B7D,
      0, 0xE248,      0,      0,      0, 0x4522, 0xE249, 0xE24A,
 0x6E43, 0xE24B, 0x6E42,      0, 0xE24C,      0, 0xE24D, 0xE24E,
      0, 0xE24F, 0xE250,      0, 0xE251, 0xE252,      0,      0,
};
const unsigned short utf8_to_euc_E985[] = {
      0,      0,      0, 0xE253,      0,      0,      0, 0xE254,
 0xE255, 0x4653, 0x6E44, 0x3D36, 0x3C60, 0x475B, 0x4371, 0xE256,
      0,      0, 0x3C72, 0xE257, 0x3F6C,      0, 0x6E45, 0xE258,
 0x6E46, 0xE259, 0xE25A, 0xE25B,      0,      0,      0,      0,
      0, 0xE25C, 0x3F5D, 0x6E47, 0xE25D, 0x6E48,      0, 0xE25E,
      0, 0x6E49, 0x4D6F,      0, 0x3D37, 0xE25F,      0,      0,
      0,      0, 0x6E4B, 0x6E4A, 0xE260, 0x395A,      0, 0x3973,
 0x3B40, 0xE261, 0xE262, 0xE263,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E986[] = {
      0, 0xE264, 0x6E4E, 0xE265,      0, 0xE266, 0xE267, 0x3D66,
      0, 0x6E4D, 0xE268, 0x6E4C,      0, 0x4269, 0xE269,      0,
 0x386F, 0xE26A, 0x4043, 0xE26B, 0xE26C, 0xE26D,      0, 0x4830,
 0xE26E,      0,      0,      0, 0x3D39,      0, 0xE26F,      0,
      0, 0xE270, 0x6E4F,      0, 0x3E5F,      0, 0xE271,      0,
 0xE272,      0, 0x6E52, 0x6E50, 0xE273, 0xE274, 0xE275, 0x6E51,
 0xE276, 0xE277, 0xE278, 0xE279, 0x6E54, 0x6E53, 0xE27A,      0,
 0x3E7A,      0, 0x6E55, 0xE27B, 0xE27C, 0xE27D,      0, 0xE27E,
};
const unsigned short utf8_to_euc_E987[] = {
 0x6E56, 0x6E57, 0xE321, 0xE322,      0, 0xE323, 0x4850, 0x3A53,
 0x3C61, 0x6E58,      0, 0x6E59, 0x4E24, 0x3D45, 0x4C6E, 0x4E4C,
 0x6E5A, 0x3662,      0, 0xE324, 0xE325,      0, 0x6E5B, 0x7C21,
 0x4523, 0xE327, 0x7B7E, 0x6E5E, 0x3378, 0x3F4B, 0x7C22, 0x6E5C,
      0, 0x6E5D,      0, 0x4460, 0x7C25, 0x7C26, 0x4B55, 0x367C,
      0, 0xE32C, 0xE32D,      0, 0xE32E, 0x7C23, 0x7C24, 0xE331,
 0xE332, 0xE333,      0,      0,      0, 0x6E60, 0x6E61, 0xE334,
      0, 0xE335,      0, 0xE336, 0x6E5F, 0xE337,      0, 0x6E63,
};
const unsigned short utf8_to_euc_E988[] = {
 0xE338, 0xE339,      0,      0, 0xE33A, 0xE33B, 0x7C27, 0xE33D,
      0, 0xE33E, 0x7C29,      0, 0xE340, 0x465F, 0x3343,      0,
 0x7C28, 0x6E67, 0xE342, 0xE343, 0x6E64, 0x6E66, 0xE344,      0,
 0xE345,      0,      0,      0, 0xE346, 0xE347, 0x6E62,      0,
      0,      0,      0, 0xE348, 0xE349, 0xE34A, 0xE34B,      0,
 0xE34C, 0x6F4F,      0,      0, 0x6E65,      0, 0xE34D, 0xE34E,
 0xE34F,      0,      0, 0xE350, 0x4E6B, 0xE351, 0xE352, 0x385A,
 0xE353, 0x7C30, 0x7C2A,      0, 0x7C2C,      0, 0xE357, 0x6E6F,
};
const unsigned short utf8_to_euc_E989[] = {
 0x7C2B,      0, 0xE359, 0xE35A, 0x4534, 0x6E6A, 0xE35B, 0xE35C,
 0x6E6D, 0x6E6B, 0xE35D, 0x6E70,      0, 0xE35E, 0x7C2D, 0xE360,
 0x6E71, 0x7C2F,      0,      0,      0,      0,      0, 0x6E69,
 0xE362, 0x7C2E, 0x6E76, 0x3174, 0xE364, 0xE365, 0x6E68,      0,
 0xE366, 0xE367, 0x482D,      0, 0x6E6C, 0xE368, 0x3E60, 0x7C31,
 0xE36A, 0xE36B,      0,      0,      0,      0, 0xE36C, 0xE36D,
 0xE36E, 0x395B,      0,      0,      0, 0xE36F, 0xE370, 0x7C33,
 0x7C34, 0xE373,      0, 0xE374, 0xE375, 0xE376, 0x4B48, 0xE377,
};
const unsigned short utf8_to_euc_E98A[] = {
 0x3664,      0,      0, 0x3D46,      0, 0x463C,      0,      0,
 0x7924, 0xE379, 0xE37A,      0,      0, 0xE37B, 0xE37C,      0,
      0, 0x412D, 0xE37D, 0x6E74,      0, 0x6E6E, 0x6E73, 0xE37E,
 0x4C43, 0xE421, 0x4438, 0x6E75, 0x6E72,      0,      0, 0xE422,
 0xE423,      0,      0,      0, 0xE424, 0xE425,      0, 0x7C32,
 0xE427,      0,      0, 0xE428,      0, 0x412C,      0, 0xE429,
      0,      0, 0xE42A,      0,      0,      0, 0xE42B, 0x6E79,
 0xE42C, 0x6E78, 0xE42D, 0xE42E, 0xE42F, 0xE430,      0, 0xE431,
};
const unsigned short utf8_to_euc_E98B[] = {
 0xE432, 0xE433, 0xE434, 0xE435,      0, 0xE436, 0xE437, 0xE438,
 0xE439,      0,      0, 0xE43A, 0xE43B, 0xE43C, 0xE43D, 0x6E77,
 0x7C38,      0, 0x4B2F, 0x7C3C,      0, 0x7C3A,      0, 0x7C36,
 0xE442, 0x7C37,      0,      0, 0xE444, 0xE445,      0, 0xE446,
 0x7C3B, 0xE448,      0, 0xE449, 0x3D7B, 0xE44A,      0, 0x7C35,
 0xE44C, 0x6E7A, 0x4A5F,      0, 0xE44D, 0x3154, 0xE44E,      0,
 0xE44F,      0, 0x4946, 0x4372,      0,      0,      0,      0,
 0x3578, 0x792A, 0x6E7C, 0x7C3F, 0x395D,      0,      0, 0x7C42,
};
const unsigned short utf8_to_euc_E98C[] = {
 0xE453,      0, 0x7C44,      0,      0,      0, 0x3B2C,      0,
 0xE455,      0,      0,      0,      0, 0xE456,      0, 0x6E7B,
 0x3F6D, 0xE457,      0,      0, 0xE458, 0xE459,      0,      0,
 0x3F6E, 0x6F21, 0x6F23,      0, 0xE45A, 0x7C43, 0x7C41, 0xE45D,
 0x3E7B, 0x7C3E, 0x6F22, 0x6F24, 0xE45F, 0x7C3D, 0x3653, 0xE461,
 0x4945, 0xE462, 0xE463, 0x3C62, 0x4F23,      0, 0x6E7E, 0x3A78,
      0,      0, 0x4F3F, 0xE464, 0xE465, 0x6F26, 0xE466, 0xE467,
      0,      0, 0x6F25, 0x6F27,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E98D[] = {
      0,      0,      0,      0, 0x6E7D,      0,      0, 0xE468,
 0x7923, 0xE46A,      0, 0x4669,      0, 0x4555,      0,      0,
 0xE46B, 0xE46C, 0xE46D,      0, 0x4457, 0xE46E, 0x6F2C, 0x7C46,
 0xE470,      0, 0xE471, 0x4343, 0x6F28,      0, 0xE472,      0,
 0x6F29,      0,      0,      0, 0xE473, 0xE474,      0, 0xE475,
      0, 0xE476, 0xE477,      0, 0x372D, 0xE478, 0x6F2B, 0xE479,
 0x7C45, 0xE47B,      0, 0xE47C, 0xE47D, 0x3830, 0xE47E,      0,
      0,      0, 0xE521,      0, 0x6F2A, 0xE522, 0x3E61, 0xE523,
};
const unsigned short utf8_to_euc_E98E[] = {
 0xE524, 0xE525, 0xE526,      0,      0,      0,      0,      0,
 0xE527,      0, 0xE528, 0xE529, 0x3379, 0xE52A,      0, 0xE52B,
      0,      0, 0xE52C,      0, 0x6F30, 0xE52D, 0x3A3F, 0x4179,
 0xE52E,      0, 0x444A, 0xE52F,      0,      0, 0xE530,      0,
      0, 0xE531,      0, 0xE532, 0x7C47,      0, 0xE534, 0x333B,
 0xE535, 0xE53B,      0, 0xE536, 0x6F2E, 0x6F2F, 0x4443,      0,
 0x6F2D,      0,      0,      0, 0xE537, 0xE538, 0xE539,      0,
      0, 0x6F31, 0xE53A,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E98F[] = {
      0, 0xE53C,      0, 0x6F37, 0xE53D, 0xE53E, 0x7C48, 0xE540,
 0x6F3A, 0xE541, 0xE542, 0xE543, 0xE544, 0xE545,      0,      0,
 0x6F39, 0x452D,      0, 0xE546,      0,      0, 0x6F32, 0x6F33,
 0x6F36, 0xE547,      0,      0, 0xE548, 0x6F38, 0x7C49, 0xE54A,
      0, 0x3640, 0xE54B,      0, 0x6F3B, 0x6F35, 0xE54C, 0xE54D,
 0x6F34,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0xE54F,
 0x7C4A, 0xE54E, 0xE551, 0xE552,      0, 0xE553,      0,      0,
};
const unsigned short utf8_to_euc_E990[] = {
      0, 0xE554, 0xE555, 0x6F3F, 0xE556,      0,      0, 0x6F40,
 0xE557, 0xE558,      0,      0,      0, 0xE559, 0xE55A, 0xE55B,
 0x6F41,      0,      0, 0x6F3E, 0x6F3D, 0xE55C, 0xE55D, 0xE55E,
 0x3E62, 0x462A, 0x6F3C,      0,      0,      0,      0, 0xE55F,
      0, 0x6F45,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x6F43,      0,      0, 0xE560, 0xE561,
      0, 0x7C4B, 0xE563, 0xE564, 0xE565, 0x6F44, 0x6F42,      0,
 0x4278,      0, 0x6F46, 0xE566,      0, 0xE568,      0, 0xE567,
};
const unsigned short utf8_to_euc_E991[] = {
      0, 0x6F47,      0, 0xE569, 0x6F49, 0x7C4C,      0,      0,
 0x7C4D,      0, 0xE56C,      0, 0xE56D,      0,      0,      0,
      0, 0x3455, 0x6F48, 0x4C7A,      0, 0xE56E,      0,      0,
      0, 0xE56F, 0x6F54, 0x6F4A, 0xE570,      0, 0x6F4D, 0xE571,
 0x6F4B, 0xE572, 0x6F4C, 0xE573,      0,      0,      0,      0,
 0xE574,      0, 0x6F4E, 0xE575,      0, 0xE576, 0xE577, 0xE578,
 0x6F50, 0xE579, 0xE57A,      0,      0, 0x6F51,      0, 0x6F52,
      0,      0,      0,      0, 0x6F55, 0x6F53, 0x6F56, 0x6F58,
};
const unsigned short utf8_to_euc_E992[] = {
      0, 0x6F57,      0, 0xE57C, 0xE57B,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E995[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0x4439,
 0xE57D, 0xE57E,      0,      0,      0,      0, 0xE621,      0,
};
const unsigned short utf8_to_euc_E996[] = {
 0x4C67,      0, 0x6F59, 0x412E, 0xE622,      0,      0, 0x6F5A,
 0xE623, 0x4A44, 0x6F5B, 0x332B, 0xE624, 0xE625, 0xE626, 0x313C,
      0, 0x3457, 0x7C4E, 0x3456, 0x6F5C,      0, 0x6F5D,      0,
 0x6F5E, 0x6F5F,      0,      0,      0, 0xE627, 0xE628, 0xE629,
 0x6F60, 0xE62A, 0x3458, 0x3355, 0x395E, 0x4836, 0xE62B, 0x6F62,
 0x6F61, 0xE62C,      0, 0xE62D, 0xE62E, 0x6F63,      0,      0,
      0,      0, 0x315C,      0, 0xE62F,      0, 0xE630,      0,
      0, 0x6F66, 0xE631, 0x6F65, 0x6F64, 0xE632, 0x6F67, 0xE633,
};
const unsigned short utf8_to_euc_E997[] = {
      0,      0,      0, 0x6F6A,      0,      0, 0xE634, 0x3047,
 0xE635, 0xE636, 0x6F68, 0xE637, 0x6F6C, 0x6F6B,      0,      0,
 0xE638, 0xE639, 0xE63A, 0xE63B, 0x6F6E, 0x6F6D, 0x6F6F,      0,
 0x462E, 0xE63C, 0xE63D,      0, 0x6F70, 0xE63E, 0xE63F, 0xE640,
 0xE641, 0x6F71, 0x6F73,      0, 0xE642, 0x6F72, 0xE643,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E998[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x496C, 0xE644, 0xE645,      0,
      0, 0x6F74, 0xE646,      0, 0xE647, 0xE648, 0xE649,      0,
 0x6F75,      0, 0x3A65,      0, 0xE64A,      0, 0x6F76, 0x6F77,
      0, 0xE64B, 0x4B49, 0xE64C,      0,      0,      0, 0xE64D,
 0xE64E, 0xE64F, 0xE650, 0x414B, 0xE651, 0xE652,      0, 0x3024,
};
const unsigned short utf8_to_euc_E999[] = {
 0x424B, 0xE653, 0x6F78,      0, 0x496D,      0,      0,      0,
      0,      0,      0, 0x6F7B, 0x6F79, 0x395F,      0, 0x6F7A,
 0x3842,      0, 0xE654,      0, 0xE655,      0, 0xE656, 0xE657,
 0xE658,      0,      0, 0x4A45, 0x6F7D, 0x7021, 0x6F7E, 0x7022,
      0, 0xE659, 0x3121, 0x3F58, 0x3D7C, 0x3459, 0x7023,      0,
      0,      0, 0x4766,      0, 0x7025,      0, 0xE65A,      0,
 0x3122,      0, 0x7024, 0x4444, 0xE65B, 0x4E4D, 0x462B, 0x6F7C,
 0x4E26,      0, 0x3831, 0xE65C, 0xE65D, 0x4D5B, 0xE65E, 0xE65F,
};
const unsigned short utf8_to_euc_E99A[] = {
      0, 0xE660, 0xE661, 0xE662, 0xE663, 0x3679, 0x4E34,      0,
 0x3728, 0xE664, 0x4262, 0x6721,      0, 0x7026, 0x332C, 0x3F6F,
      0, 0xE665,      0,      0, 0x3356, 0x7028, 0xE666, 0x7029,
 0x7027, 0x3764, 0xE667, 0x3A5D, 0x3E63, 0x7C51,      0, 0xE669,
 0x3123,      0,      0, 0x4E59, 0xE66A, 0xE66B, 0xE66C, 0x702B,
 0x6E2E, 0xE66D, 0x702A,      0,      0,      0, 0xE66E, 0x7C52,
 0x702E, 0x702C, 0x702D, 0xE670, 0x702F,      0, 0x7030, 0x4E6C,
 0x7031, 0x7032, 0xE671, 0x4049, 0x483B,      0,      0,      0,
};
const unsigned short utf8_to_euc_E99B[] = {
 0x3F7D, 0x3467,      0,      0, 0x4D3A, 0x326D, 0x3D38, 0x385B,
      0, 0x7035, 0xE672, 0x7034, 0x3B73, 0x7036, 0x7033,      0,
      0, 0x3B28, 0xE673,      0,      0, 0x703A, 0x6A2D,      0,
 0xE675, 0x5256, 0xE676, 0x3F77, 0x7038, 0xE677, 0xE678, 0xE679,
      0,      0, 0x4E25, 0x4671,      0,      0,      0,      0,
 0x312B, 0xE67A, 0x4063, 0x3C36,      0,      0,      0, 0xE67B,
 0x4A37, 0xE67C, 0x3140,      0,      0,      0, 0x4E6D, 0x4D6B,
      0, 0x703B, 0xE67D, 0x4545,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E99C[] = {
 0x3C7B,      0, 0xE67E, 0xE721, 0x703C, 0xE722, 0x703D, 0x3F4C,
 0x703E, 0xE723, 0x4E6E,      0,      0, 0x7039, 0x7040, 0x7042,
      0, 0x7041,      0, 0x703F,      0,      0, 0x7043,      0,
      0, 0x7044, 0xE724, 0xE725, 0x417A, 0xE726, 0x3262,      0,
      0, 0xE727, 0xE728, 0xE729, 0x7045,      0,      0, 0x4C38,
 0xE72A,      0, 0x7046,      0,      0,      0,      0,      0,
 0x7047, 0xE72B, 0x4F2A, 0x7C53,      0,      0,      0,      0,
 0x5B31, 0x7048,      0, 0x7C54,      0, 0x7049, 0x704A,      0,
};
const unsigned short utf8_to_euc_E99D[] = {
      0, 0xE72D, 0x704E, 0x7C55, 0x704B,      0, 0x704C,      0,
 0x704D, 0x704F, 0xE72F,      0,      0, 0x7C56, 0xE730, 0x7C57,
      0, 0x7C58, 0x4044,      0,      0, 0x7C59, 0x4C77, 0xE733,
 0xE734, 0x4045, 0xE735, 0xE736, 0x7050,      0, 0x4873,      0,
 0x7051, 0x7353, 0x4C4C, 0xE737, 0x7052,      0, 0x7053, 0xE738,
 0x7054, 0x3357, 0xE739, 0x7056,      0, 0x3F59, 0xE73A,      0,
      0, 0x7057,      0, 0xE73B, 0x3724,      0, 0xE73C, 0xE73D,
 0xE73E, 0x7058, 0x705C, 0xE73F, 0x705A, 0xE740,      0, 0xE741,
};
const unsigned short utf8_to_euc_E99E[] = {
 0xE742, 0x705B,      0,      0, 0x3373, 0x7059, 0x705D,      0,
      0, 0xE743,      0, 0x705E,      0, 0x3048,      0, 0x705F,
 0x7060,      0,      0,      0,      0, 0xE744, 0xE745, 0xE746,
 0x3E64, 0xE747, 0xE748,      0, 0x7061,      0, 0xE749, 0xE74A,
 0x3547,      0, 0xE74B, 0x7064,      0,      0, 0x7063,      0,
 0x7062,      0,      0, 0x6B71, 0xE74C, 0x4A5C, 0xE74D,      0,
      0, 0xE74E, 0xE74F, 0x7065, 0x7066, 0xE750, 0xE751,      0,
 0xE752, 0xE753, 0xE754,      0, 0xE755,      0, 0xE756, 0xE757,
};
const unsigned short utf8_to_euc_E99F[] = {
      0, 0xE758,      0, 0x7067, 0xE759, 0xE75A, 0x7068, 0xE75B,
 0x7069, 0xE75C, 0xE75D, 0x706A, 0xE75E, 0xE75F, 0xE760,      0,
 0xE761, 0xE762,      0, 0x345A, 0xE763,      0,      0, 0xE764,
 0xE765, 0xE766,      0, 0xE76A, 0x706B, 0xE767, 0xE768,      0,
 0xE769, 0xE76B,      0,      0, 0xE76C,      0,      0,      0,
      0,      0,      0,      0,      0, 0x706C, 0x4723, 0xE76D,
      0, 0xE76E, 0x706E, 0x323B, 0xE76F, 0x7071, 0x7070, 0xE770,
 0xE771,      0, 0xE772, 0x3124,      0,      0,      0, 0x3641,
};
const unsigned short utf8_to_euc_E9A0[] = {
      0, 0x4A47, 0x443A, 0x3A22,      0, 0x3960, 0x3D67, 0xE773,
 0x3F5C,      0, 0xE774,      0, 0x7073, 0xE776, 0xE777, 0x7072,
 0x4D42, 0x3468, 0x4852, 0x465C, 0xE778,      0, 0xE779, 0x3F7C,
 0x4E4E, 0xE775, 0x375B,      0, 0xE77A,      0, 0xE77B,      0,
 0xE77C, 0x7076,      0, 0xE77D, 0x7075, 0xE828, 0xE77E,      0,
      0,      0,      0, 0xE821, 0x4B4B, 0x462C, 0xE822, 0xE823,
 0xE824,      0, 0xE825, 0xE826, 0x3150, 0xE827,      0, 0x7077,
 0x7074,      0,      0, 0x4951, 0x4D6A, 0x7078, 0xE829,      0,
};
const unsigned short utf8_to_euc_E9A1[] = {
      0,      0,      0,      0, 0xE82A,      0, 0x7079, 0xE82B,
      0,      0, 0xE82C, 0x707B, 0x426A, 0x335B, 0x335C, 0x707A,
      0, 0xE82D, 0xE82E, 0xE82F, 0x3469, 0x3832, 0xE830, 0x7C5A,
 0x346A, 0xE832, 0xE833, 0x453F,      0,      0, 0x4E60,      0,
      0,      0, 0xE834, 0xE835,      0, 0x7C5B, 0xE837, 0x385C,
      0,      0, 0xE838, 0x707C, 0xE839,      0,      0, 0x707D,
 0x707E, 0x7121,      0, 0x7123, 0x7122,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E9A2[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x4977,      0, 0x7124, 0xE83A,      0, 0xE83B, 0xE83C, 0x7125,
 0xE83D, 0x7126,      0,      0, 0xE83E,      0, 0x7127, 0xE83F,
 0xE840,      0, 0xE841, 0xE842,      0,      0,      0, 0xE843,
};
const unsigned short utf8_to_euc_E9A3[] = {
      0,      0, 0xE844, 0x7129, 0x7128, 0xE845, 0x712A,      0,
 0xE846,      0,      0,      0, 0xE847,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0x4874, 0x664C,      0,      0, 0x3F29,
      0, 0xE848, 0x3532, 0xE849,      0, 0xE84A, 0xE84B, 0xE84C,
      0, 0x712B, 0xE84D, 0x712C,      0, 0x522C, 0x5D3B, 0x4853,
      0,      0, 0x307B, 0xE84E, 0x303B,      0, 0xE84F,      0,
      0,      0,      0,      0, 0x3B74, 0x4B30, 0x3E7E,      0,
};
const unsigned short utf8_to_euc_E9A4[] = {
      0,      0, 0xE850, 0x712D,      0, 0x4C5F,      0, 0xE851,
 0xE852, 0x712E, 0x4D5C,      0, 0x3142,      0,      0,      0,
 0x3B41, 0xE853, 0x712F, 0x326E, 0x7130, 0xE854, 0xE855, 0xE856,
 0x7131,      0, 0xE857, 0xE858, 0xE859, 0x7133, 0x7134, 0xE85A,
 0x7136, 0x7132, 0xE85B,      0, 0x7135,      0, 0xE85C, 0x7C5E,
 0x345B,      0,      0, 0xE85E, 0x7137,      0, 0x7138,      0,
      0, 0xE85F, 0xE860, 0xE861, 0xE862, 0xE863,      0,      0,
      0, 0xE864, 0xE865, 0xE866, 0xE867, 0x7139, 0x713A,      0,
};
const unsigned short utf8_to_euc_E9A5[] = {
 0xE868, 0xE869, 0x713B,      0,      0, 0x713D, 0xE86A, 0xE86B,
 0xE86C, 0x713C,      0, 0x713F, 0x7142, 0xE86D, 0xE86E,      0,
 0x713E, 0x7140, 0x7141,      0, 0xE86F, 0x7143,      0, 0x3642,
 0xE870, 0xE871,      0, 0xE872, 0xE873,      0, 0xE874, 0xE875,
 0xE876,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E9A6[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x3C73, 0x7144,
 0x7145, 0x3961,      0, 0xE877,      0, 0xE878, 0x7C60, 0xE879,
      0,      0,      0,      0,      0, 0x7146, 0xE87A,      0,
 0x333E,      0,      0,      0, 0x474F, 0x7147, 0x7148,      0,
 0xE87B, 0xE87C, 0xE87D, 0x435A, 0x466B, 0xE87E,      0,      0,
      0, 0xE921, 0xE922,      0, 0x7149, 0xE923,      0, 0xE924,
};
const unsigned short utf8_to_euc_E9A7[] = {
      0, 0x477D,      0, 0xE925, 0x424C, 0x3158, 0x366E,      0,
 0x366F, 0xE926,      0,      0,      0,      0,      0,      0,
 0x4373, 0x714E, 0x3670, 0xE927, 0xE928, 0x326F,      0,      0,
 0x714D, 0xE929, 0xE92A, 0x714B, 0xE92B, 0x714C, 0xE92C, 0x714A,
      0,      0, 0x7158,      0,      0,      0,      0, 0xE92D,
      0,      0, 0xE92E, 0xE92F, 0xE930, 0x714F, 0x7150,      0,
 0xE931, 0x7151, 0x7152,      0, 0xE932, 0xE933,      0,      0,
 0x7154, 0xE934,      0, 0x7153,      0, 0xE935, 0xE936, 0x3D59,
};
const unsigned short utf8_to_euc_E9A8[] = {
      0, 0x7155, 0xE937, 0xE938, 0xE939, 0x7157,      0,      0,
      0,      0,      0, 0xE93A, 0xE93B,      0, 0x3533, 0x7156,
 0xE93C, 0xE93D, 0x417B, 0x3833,      0,      0, 0xE93E,      0,
      0, 0x7159,      0,      0,      0,      0, 0xE93F,      0,
 0xE940,      0, 0xE941, 0xE942, 0xE943,      0,      0, 0xE944,
 0x424D,      0,      0, 0x715A,      0, 0xE945, 0xE946,      0,
 0x462D,      0,      0, 0xE947,      0, 0xE948, 0xE949, 0x715B,
 0xE94A,      0,      0,      0,      0,      0, 0x7160,      0,
};
const unsigned short utf8_to_euc_E9A9[] = {
 0x715E, 0xE94C, 0x715D, 0x715F, 0xE94D, 0x715C,      0, 0xE94B,
      0,      0, 0xE94E, 0xE94F, 0xE950, 0x7162, 0x7C61,      0,
      0, 0xE952,      0,      0, 0xE953, 0x7161, 0xE954, 0x7164,
      0,      0, 0x3643, 0x7163,      0, 0xE955,      0, 0x7165,
      0,      0, 0x7166,      0, 0x7168, 0x7167,      0,      0,
      0, 0x7169, 0x716B, 0x716A,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E9AA[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x397C,      0, 0xE956,      0, 0xE957, 0x716C, 0xE958, 0xE959,
 0x716D,      0, 0xE95A,      0, 0xE95B, 0xE95C, 0xE95D,      0,
 0x333C, 0xE95E,      0, 0xE95F, 0x716E,      0, 0xE960, 0xE961,
};
const unsigned short utf8_to_euc_E9AB[] = {
 0x716F, 0xE962,      0, 0xE963, 0x3F71,      0, 0xE964,      0,
 0xE965,      0,      0,      0,      0,      0, 0xE966, 0x7170,
 0xE967, 0x7171, 0xE968, 0x7172, 0x7173, 0xE969, 0xE96A, 0xE96B,
 0x3962, 0x7C62,      0, 0xE96C, 0x7C63,      0, 0x7174, 0x7175,
 0xE96E,      0, 0x7176, 0x7177, 0xE96F, 0xE970, 0x7178, 0xE971,
      0, 0xE972, 0x4831, 0x717A, 0xE973, 0x4926, 0x717B, 0x7179,
      0, 0x717D, 0xE974, 0xE975, 0x717C, 0xE976,      0, 0x717E,
      0, 0xE977, 0xE978, 0x7221,      0, 0xE979,      0, 0xE97A,
};
const unsigned short utf8_to_euc_E9AC[] = {
 0xE97B, 0xE97C, 0xE97D, 0xE97E, 0xEA21, 0xEA22, 0x7222,      0,
 0xEA23, 0xEA24,      0, 0xEA25, 0xEA26, 0xEA27, 0xEA28,      0,
 0xEA29,      0, 0xEA2A,      0,      0,      0, 0xEA2B,      0,
 0x7223, 0xEA2C, 0x7224, 0xEA2D, 0xEA2E,      0,      0, 0x7225,
 0xEA2F,      0, 0x7226, 0x7227,      0, 0x7228, 0xEA30, 0x7229,
 0x722A, 0x722B, 0x722C, 0xEA31,      0, 0xEA32, 0x722D, 0x722E,
      0, 0x5D35, 0x722F, 0xEA33, 0xEA34, 0xEA35,      0, 0xEA36,
      0, 0xEA37, 0xEA38, 0x6478, 0x3534, 0xEA39,      0,      0,
};
const unsigned short utf8_to_euc_E9AD[] = {
      0, 0x3321, 0x3A32, 0x7231, 0x7230, 0x4C25,      0,      0,
 0xEA3A,      0,      0, 0xEA3B, 0xEA3C, 0x7233, 0x7234, 0x7232,
      0, 0x7235,      0,      0, 0x4B62, 0xEA3D, 0xEA3E, 0xEA3F,
 0x7236,      0, 0x357B, 0xEA40,      0,      0, 0xEA41,      0,
      0, 0xEA42,      0, 0xEA43,      0, 0xEA44, 0xEA45,      0,
 0xEA46,      0, 0xEA47, 0xEA48, 0xEA49, 0xEA4A, 0xEA4B, 0x4F25,
      0,      0, 0x7C65, 0xEA4C, 0x7237, 0x7C64,      0, 0xEA4E,
 0xEA4F, 0xEA50,      0,      0,      0,      0,      0, 0xEA51,
};
const unsigned short utf8_to_euc_E9AE[] = {
 0xEA52,      0,      0, 0x7239, 0xEA53, 0xEA54, 0xEA55, 0xEA56,
      0, 0xEA57, 0xEA58, 0xEA59,      0, 0xEA5A, 0x303E, 0x7C66,
 0xEA5C, 0x723A, 0x4A2B, 0x7238, 0xEA5D,      0, 0x723B, 0x723C,
      0,      0, 0xEA5E,      0,      0, 0xEA5F, 0xEA60, 0x723D,
 0x723E,      0,      0,      0,      0,      0, 0xEA61, 0xEA62,
 0x723F, 0xEA63, 0x4B6E, 0x3B2D, 0xEA64, 0x3A7A, 0x412F,      0,
 0xEA65, 0x7C67, 0xEA67,      0, 0x7240,      0,      0, 0xEA68,
 0xEA69, 0x7243,      0, 0x7C68, 0xEA6B,      0, 0xEA6C, 0xEA6D,
};
const unsigned short utf8_to_euc_E9AF[] = {
 0x7241, 0xEA6E,      0,      0,      0,      0, 0x7244, 0xEA6F,
 0xEA70, 0x3871, 0x7242,      0,      0,      0, 0xEA71, 0x7245,
 0xEA72, 0x7246, 0x7247,      0, 0x724B,      0, 0x3B2A, 0xEA73,
 0xEA74,      0,      0, 0x4264,      0, 0xEA75,      0, 0xEA76,
      0, 0x724C, 0x7249, 0x7248, 0x724A, 0xEA77,      0, 0xEA78,
 0x375F,      0, 0xEA79, 0xEA7A,      0,      0,      0, 0xEA7B,
 0x7250, 0x724F, 0x724E, 0xEA7C,      0, 0x3033,      0, 0xEA7D,
 0xEA7E, 0xEB21, 0xEB22,      0,      0, 0xEB23,      0, 0xEB24,
};
const unsigned short utf8_to_euc_E9B0[] = {
 0x7C69,      0, 0xEB26,      0, 0x725A,      0, 0x7256,      0,
 0x7257, 0x7253, 0x7259, 0xEB27, 0x7255, 0x3362,      0, 0xEB28,
 0x4F4C, 0xEB29, 0x7258, 0x7254, 0x7252, 0x7251, 0xEB2A,      0,
 0xEB2B, 0xEB2C, 0xEB2D, 0x725C, 0xEB2E,      0, 0xEB2F,      0,
      0, 0x725F, 0xEB30, 0xEB31, 0x725E, 0x725D, 0xEB32, 0xEB33,
 0xEB34, 0xEB35, 0xEB36,      0,      0, 0x4949, 0x725B, 0x3073,
 0x7260, 0xEB37, 0x7262,      0,      0, 0xEB38, 0xEB39, 0xEB3A,
      0, 0x336F, 0x724D, 0x3137,      0, 0xEB3B, 0x7264,      0,
};
const unsigned short utf8_to_euc_E9B1[] = {
      0, 0xEB3C,      0, 0xEB3D, 0xEB3E, 0xEB3F, 0x7263, 0x7261,
 0x432D, 0xEB40, 0xEB41,      0,      0,      0, 0xEB42, 0xEB43,
 0xEB44,      0, 0x4B70, 0xEB45, 0xEB46,      0, 0xEB47, 0x4E5A,
 0xEB48,      0, 0x7265, 0xEB49, 0xEB50, 0xEB4A, 0xEB4B, 0xEB4C,
 0x7266,      0,      0, 0xEB4D,      0,      0,      0, 0x7267,
 0xEB52, 0xEB4E, 0xEB4F, 0xEB51,      0,      0, 0xEB53,      0,
 0xEB54,      0, 0xEB55,      0,      0, 0xEB56, 0x7268, 0xEB57,
 0x7269,      0,      0, 0xEB58,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E9B3[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0x443B, 0xEB59, 0x726A,
      0, 0x4837,      0, 0x726F, 0x726B,      0,      0,      0,
 0x726C,      0, 0xEB5A, 0x4B31, 0x4C44,      0, 0x4650, 0xEB5B,
      0, 0xEB5C,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E9B4[] = {
      0,      0, 0xEB5E, 0x7270,      0,      0, 0x7271, 0x463E,
 0x726E, 0x726D,      0, 0xEB5D,      0,      0, 0x322A,      0,
      0, 0xEB5F, 0x7279,      0,      0, 0x7278,      0, 0xEB60,
 0xEB61,      0,      0, 0x3175, 0xEB62, 0xEB63, 0xEB64, 0x7276,
      0,      0,      0, 0x7275,      0,      0, 0x7273,      0,
 0x337B,      0, 0x7272, 0x3C32, 0x3229,      0,      0, 0xEB65,
 0xEB66,      0, 0xEB67, 0xEB68, 0xEB69,      0,      0,      0,
      0,      0, 0xEB6A, 0x3963, 0xEB6B, 0xEB6D, 0x727C, 0x727B,
};
const unsigned short utf8_to_euc_E9B5[] = {
      0, 0x727A, 0xEB6E, 0xEB6F, 0x7277, 0xEB6C, 0x727D, 0xEB70,
 0x727E,      0, 0xEB71,      0,      0,      0,      0,      0,
 0x7325, 0x7324,      0, 0xEB72, 0xEB73,      0,      0,      0,
      0, 0x7326,      0,      0, 0x312D, 0x7321, 0x7322, 0xEB74,
 0x3974, 0x4C39, 0xEB76, 0xEB75, 0x7323, 0xEB77,      0,      0,
      0, 0xEB78, 0xEB79, 0x7C6B, 0x4B32,      0,      0, 0x732B,
 0x7C6A,      0, 0x7327,      0,      0,      0, 0xEB7C, 0xEB7D,
      0,      0, 0x732C, 0xEB7E, 0xEC21,      0, 0xEC22,      0,
};
const unsigned short utf8_to_euc_E9B6[] = {
      0,      0,      0, 0xEC23, 0xEC24,      0, 0xEC25, 0x7329,
      0, 0x7328, 0xEC26,      0,      0, 0xEC27, 0xEC28, 0x375C,
      0,      0, 0xEC29, 0xEC2A,      0, 0xEC2B, 0xEC2C, 0xEC2D,
 0xEC2E,      0, 0x732D,      0,      0,      0,      0,      0,
      0, 0xEC2F,      0,      0, 0x732E,      0,      0,      0,
      0, 0x732F, 0xEC30, 0x732A, 0xEC31,      0, 0xEC32, 0x7274,
      0, 0xEC33, 0x7330,      0, 0x4461, 0xEC34,      0,      0,
 0x7334, 0xEC35, 0x7335, 0x7333, 0xEC36,      0,      0, 0xEC37,
};
const unsigned short utf8_to_euc_E9B7[] = {
      0, 0x7332, 0x7338, 0xEC38, 0x7331,      0, 0x7336, 0xEC39,
      0, 0xEC3A, 0xEC3B,      0,      0,      0,      0, 0x7337,
      0,      0,      0, 0x733A, 0xEC3C, 0xEC3D, 0xEC3E, 0xEC3F,
      0, 0x7339, 0xEC40,      0,      0,      0, 0xEC41, 0xEC42,
 0xEC43,      0,      0,      0,      0, 0xEC44, 0x733C, 0xEC45,
      0, 0xEC46,      0, 0xEC47,      0, 0x733D, 0xEC48, 0x733E,
 0xEC49,      0, 0x4F49, 0xEC4A, 0xEC4B,      0,      0,      0,
 0x733B, 0x426B, 0x3A6D,      0,      0, 0x733F, 0xEC4C,      0,
};
const unsigned short utf8_to_euc_E9B8[] = {
      0,      0, 0xEC4E,      0,      0,      0,      0, 0xEC4F,
      0,      0, 0xEC4D,      0,      0,      0, 0xEC50,      0,
 0xEC51, 0xEC52, 0xEC53,      0,      0, 0xEC54, 0xEC55,      0,
      0, 0x7C6D, 0x7340, 0x7341, 0xEC57, 0xEC58, 0x7342,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_E9B9[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0x7343,      0,      0,
 0x3834, 0x7344, 0xEC59, 0xEC5A, 0xEC5B, 0x7345,      0, 0x3C2F,
};
const unsigned short utf8_to_euc_E9BA[] = {
 0xEC5C, 0x7346, 0xEC5D, 0xEC5E, 0xEC5F, 0xEC60,      0, 0xEC61,
 0x7347,      0,      0, 0x7348, 0x7349,      0, 0xEC62, 0xEC63,
      0, 0x734C, 0x734A, 0x4F3C,      0, 0x734B, 0xEC64, 0x4E6F,
 0xEC65,      0,      0, 0xEC66,      0, 0x734D, 0xEC67, 0x4E5B,
      0,      0,      0,      0, 0xEC68, 0x734E, 0x477E,      0,
 0xEC69, 0x734F, 0x7351,      0, 0xEC6A, 0x7352, 0xEC6B, 0xEC6C,
 0xEC6D,      0,      0, 0xEC6E, 0xEC6F, 0xEC70,      0,      0,
 0x7350, 0x396D, 0x4C4D, 0x4B63, 0x5677,      0, 0x5D60, 0x4B7B,
};
const unsigned short utf8_to_euc_E9BB[] = {
      0,      0,      0,      0, 0x322B,      0, 0xEC71,      0,
 0xEC72,      0,      0, 0xEC73, 0x7354, 0x3550, 0x7355, 0x7356,
 0x7357, 0x7C6E, 0x3975,      0, 0x7358, 0xEC74,      0,      0,
 0x6054, 0x4C5B,      0, 0x4263, 0x7359, 0x735B, 0x735A, 0xEC75,
 0x735C,      0,      0,      0, 0xEC76, 0x735D,      0, 0xEC77,
 0x735E,      0,      0,      0, 0xEC78, 0xEC79, 0xEC7A, 0x735F,
 0xEC7B, 0xEC7C, 0xEC7D,      0, 0x7360, 0xEC7E, 0x7361, 0x7362,
 0xED21, 0x7363,      0, 0x7364, 0x7365, 0x7366,      0, 0xED22,
};
const unsigned short utf8_to_euc_E9BC[] = {
      0,      0, 0xED23, 0xED24,      0,      0,      0, 0x7367,
 0x7368, 0xED25,      0,      0,      0,      0, 0x4524, 0xED26,
 0xED27, 0xED28, 0xED29, 0x385D, 0xED2A, 0x736A, 0xED2B, 0xED2C,
      0, 0xED2D, 0xED2E, 0xED2F,      0,      0,      0, 0xED30,
 0x414D, 0x736B, 0xED31,      0,      0,      0, 0xED32,      0,
      0,      0, 0xED33, 0xED34, 0x736C,      0,      0, 0xED35,
      0, 0xED36, 0xED37,      0, 0xED38,      0,      0, 0xED39,
      0, 0xED3A, 0xED3B, 0x4921, 0xED3C, 0xED3D, 0x736D, 0xED3E,
};
const unsigned short utf8_to_euc_E9BD[] = {
      0, 0xED3F,      0, 0xED40, 0xED41, 0xED42, 0xED43, 0xED44,
      0,      0, 0x736E, 0x6337,      0,      0, 0x6C5A, 0x706D,
      0,      0, 0x736F, 0xED45, 0x7370, 0xED46, 0xED47, 0xED48,
 0xED49,      0, 0xED4A,      0,      0, 0xED4B, 0xED4C, 0x7372,
 0x7373, 0x7374, 0x4E70, 0x7371,      0,      0, 0x7375, 0x7376,
 0xED4D, 0xED4E, 0x7378,      0, 0x7377, 0xED4F, 0xED50, 0xED51,
 0xED52, 0xED53, 0x737A, 0xED54,      0, 0xED55, 0x737B, 0x7379,
      0,      0, 0xED56,      0,      0, 0xED57,      0,      0,
};
const unsigned short utf8_to_euc_E9BE[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0x4E36,      0, 0xED58,
 0xED59, 0xED5A, 0xED5B,      0, 0xED5C, 0x737C, 0xED5D, 0xED5E,
      0,      0,      0,      0, 0x737D, 0x6354, 0xED5F,      0,
 0x737E, 0xED60, 0xED61, 0xED62,      0, 0xED63,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_EFA4[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0x7A46,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_EFA7[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0x7C4F,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_EFA8[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0x7954, 0x795F,
 0x7960, 0x7975, 0x7A3E, 0x7A4E, 0x7A50, 0x7A7B, 0x7B23, 0x7B3A,
 0x7B42, 0x7B43, 0x7B44, 0x7B46, 0x7B4A, 0x7B4D, 0x7B56, 0x7B61,
 0x7B63, 0x7B64, 0x7B6D, 0x7B75, 0x7B77, 0x7B78, 0x7B7B, 0x7C39,
 0x7C40, 0x7C50, 0x7C5C, 0x7C5D, 0x7C5F, 0x7C6C,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_EFB8[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x7545, 0x753D,      0, 0x7532,      0, 0x754A, 0x754B, 0x7550,
 0x7551, 0x754C, 0x754D, 0x755A, 0x755B, 0x7554, 0x7555, 0x7552,
};
const unsigned short utf8_to_euc_EFB9[] = {
 0x7553, 0x7556, 0x7557, 0x7558, 0x7559,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_EFBC[] = {
      0, 0x212A, 0x7C7E, 0x2174, 0x2170, 0x2173, 0x2175, 0x7C7D,
 0x214A, 0x214B, 0x2176, 0x215C, 0x2124, 0x215D, 0x2125, 0x213F,
 0x2330, 0x2331, 0x2332, 0x2333, 0x2334, 0x2335, 0x2336, 0x2337,
 0x2338, 0x2339, 0x2127, 0x2128, 0x2163, 0x2161, 0x2164, 0x2129,
 0x2177, 0x2341, 0x2342, 0x2343, 0x2344, 0x2345, 0x2346, 0x2347,
 0x2348, 0x2349, 0x234A, 0x234B, 0x234C, 0x234D, 0x234E, 0x234F,
 0x2350, 0x2351, 0x2352, 0x2353, 0x2354, 0x2355, 0x2356, 0x2357,
 0x2358, 0x2359, 0x235A, 0x214E, 0x2140, 0x214F, 0x2130, 0x2132,
};
const unsigned short utf8_to_euc_EFBD[] = {
 0x212E, 0x2361, 0x2362, 0x2363, 0x2364, 0x2365, 0x2366, 0x2367,
 0x2368, 0x2369, 0x236A, 0x236B, 0x236C, 0x236D, 0x236E, 0x236F,
 0x2370, 0x2371, 0x2372, 0x2373, 0x2374, 0x2375, 0x2376, 0x2377,
 0x2378, 0x2379, 0x237A, 0x2150, 0x2143, 0x2151, 0x2141,      0,
      0, 0x0E21, 0x0E22, 0x0E23, 0x0E24, 0x0E25, 0x0E26, 0x0E27,
 0x0E28, 0x0E29, 0x0E2A, 0x0E2B, 0x0E2C, 0x0E2D, 0x0E2E, 0x0E2F,
 0x0E30, 0x0E31, 0x0E32, 0x0E33, 0x0E34, 0x0E35, 0x0E36, 0x0E37,
 0x0E38, 0x0E39, 0x0E3A, 0x0E3B, 0x0E3C, 0x0E3D, 0x0E3E, 0x0E3F,
};
const unsigned short utf8_to_euc_EFBE[] = {
 0x0E40, 0x0E41, 0x0E42, 0x0E43, 0x0E44, 0x0E45, 0x0E46, 0x0E47,
 0x0E48, 0x0E49, 0x0E4A, 0x0E4B, 0x0E4C, 0x0E4D, 0x0E4E, 0x0E4F,
 0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57,
 0x0E58, 0x0E59, 0x0E5A, 0x0E5B, 0x0E5C, 0x0E5D, 0x0E5E, 0x0E5F,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short utf8_to_euc_EFBF[] = {
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0x2171, 0x2172, 0x224C, 0x2131, 0x7C7C, 0x216F,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short *const utf8_to_euc_E2[] = {
 utf8_to_euc_E280,                0,                0,                0,
 utf8_to_euc_E284, utf8_to_euc_E285, utf8_to_euc_E286, utf8_to_euc_E287,
 utf8_to_euc_E288, utf8_to_euc_E289, utf8_to_euc_E28A,                0,
 utf8_to_euc_E28C,                0,                0,                0,
                0, utf8_to_euc_E291, utf8_to_euc_E292,                0,
 utf8_to_euc_E294, utf8_to_euc_E295, utf8_to_euc_E296, utf8_to_euc_E297,
 utf8_to_euc_E298, utf8_to_euc_E299,                0,                0,
                0, utf8_to_euc_E29D,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
};
const unsigned short *const utf8_to_euc_E3[] = {
 utf8_to_euc_E380, utf8_to_euc_E381, utf8_to_euc_E382, utf8_to_euc_E383,
                0,                0,                0,                0,
 utf8_to_euc_E388, utf8_to_euc_E389, utf8_to_euc_E38A,                0,
 utf8_to_euc_E38C, utf8_to_euc_E38D, utf8_to_euc_E38E, utf8_to_euc_E38F,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
};
const unsigned short *const utf8_to_euc_E4[] = {
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
 utf8_to_euc_E4B8, utf8_to_euc_E4B9, utf8_to_euc_E4BA, utf8_to_euc_E4BB,
 utf8_to_euc_E4BC, utf8_to_euc_E4BD, utf8_to_euc_E4BE, utf8_to_euc_E4BF,
};
const unsigned short *const utf8_to_euc_E5[] = {
 utf8_to_euc_E580, utf8_to_euc_E581, utf8_to_euc_E582, utf8_to_euc_E583,
 utf8_to_euc_E584, utf8_to_euc_E585, utf8_to_euc_E586, utf8_to_euc_E587,
 utf8_to_euc_E588, utf8_to_euc_E589, utf8_to_euc_E58A, utf8_to_euc_E58B,
 utf8_to_euc_E58C, utf8_to_euc_E58D, utf8_to_euc_E58E, utf8_to_euc_E58F,
 utf8_to_euc_E590, utf8_to_euc_E591, utf8_to_euc_E592, utf8_to_euc_E593,
 utf8_to_euc_E594, utf8_to_euc_E595, utf8_to_euc_E596, utf8_to_euc_E597,
 utf8_to_euc_E598, utf8_to_euc_E599, utf8_to_euc_E59A, utf8_to_euc_E59B,
 utf8_to_euc_E59C, utf8_to_euc_E59D, utf8_to_euc_E59E, utf8_to_euc_E59F,
 utf8_to_euc_E5A0, utf8_to_euc_E5A1, utf8_to_euc_E5A2, utf8_to_euc_E5A3,
 utf8_to_euc_E5A4, utf8_to_euc_E5A5, utf8_to_euc_E5A6, utf8_to_euc_E5A7,
 utf8_to_euc_E5A8, utf8_to_euc_E5A9, utf8_to_euc_E5AA, utf8_to_euc_E5AB,
 utf8_to_euc_E5AC, utf8_to_euc_E5AD, utf8_to_euc_E5AE, utf8_to_euc_E5AF,
 utf8_to_euc_E5B0, utf8_to_euc_E5B1, utf8_to_euc_E5B2, utf8_to_euc_E5B3,
 utf8_to_euc_E5B4, utf8_to_euc_E5B5, utf8_to_euc_E5B6, utf8_to_euc_E5B7,
 utf8_to_euc_E5B8, utf8_to_euc_E5B9, utf8_to_euc_E5BA, utf8_to_euc_E5BB,
 utf8_to_euc_E5BC, utf8_to_euc_E5BD, utf8_to_euc_E5BE, utf8_to_euc_E5BF,
};
const unsigned short *const utf8_to_euc_E6[] = {
 utf8_to_euc_E680, utf8_to_euc_E681, utf8_to_euc_E682, utf8_to_euc_E683,
 utf8_to_euc_E684, utf8_to_euc_E685, utf8_to_euc_E686, utf8_to_euc_E687,
 utf8_to_euc_E688, utf8_to_euc_E689, utf8_to_euc_E68A, utf8_to_euc_E68B,
 utf8_to_euc_E68C, utf8_to_euc_E68D, utf8_to_euc_E68E, utf8_to_euc_E68F,
 utf8_to_euc_E690, utf8_to_euc_E691, utf8_to_euc_E692, utf8_to_euc_E693,
 utf8_to_euc_E694, utf8_to_euc_E695, utf8_to_euc_E696, utf8_to_euc_E697,
 utf8_to_euc_E698, utf8_to_euc_E699, utf8_to_euc_E69A, utf8_to_euc_E69B,
 utf8_to_euc_E69C, utf8_to_euc_E69D, utf8_to_euc_E69E, utf8_to_euc_E69F,
 utf8_to_euc_E6A0, utf8_to_euc_E6A1, utf8_to_euc_E6A2, utf8_to_euc_E6A3,
 utf8_to_euc_E6A4, utf8_to_euc_E6A5, utf8_to_euc_E6A6, utf8_to_euc_E6A7,
 utf8_to_euc_E6A8, utf8_to_euc_E6A9, utf8_to_euc_E6AA, utf8_to_euc_E6AB,
 utf8_to_euc_E6AC, utf8_to_euc_E6AD, utf8_to_euc_E6AE, utf8_to_euc_E6AF,
 utf8_to_euc_E6B0, utf8_to_euc_E6B1, utf8_to_euc_E6B2, utf8_to_euc_E6B3,
 utf8_to_euc_E6B4, utf8_to_euc_E6B5, utf8_to_euc_E6B6, utf8_to_euc_E6B7,
 utf8_to_euc_E6B8, utf8_to_euc_E6B9, utf8_to_euc_E6BA, utf8_to_euc_E6BB,
 utf8_to_euc_E6BC, utf8_to_euc_E6BD, utf8_to_euc_E6BE, utf8_to_euc_E6BF,
};
const unsigned short *const utf8_to_euc_E7[] = {
 utf8_to_euc_E780, utf8_to_euc_E781, utf8_to_euc_E782, utf8_to_euc_E783,
 utf8_to_euc_E784, utf8_to_euc_E785, utf8_to_euc_E786, utf8_to_euc_E787,
 utf8_to_euc_E788, utf8_to_euc_E789, utf8_to_euc_E78A, utf8_to_euc_E78B,
 utf8_to_euc_E78C, utf8_to_euc_E78D, utf8_to_euc_E78E, utf8_to_euc_E78F,
 utf8_to_euc_E790, utf8_to_euc_E791, utf8_to_euc_E792, utf8_to_euc_E793,
 utf8_to_euc_E794, utf8_to_euc_E795, utf8_to_euc_E796, utf8_to_euc_E797,
 utf8_to_euc_E798, utf8_to_euc_E799, utf8_to_euc_E79A, utf8_to_euc_E79B,
 utf8_to_euc_E79C, utf8_to_euc_E79D, utf8_to_euc_E79E, utf8_to_euc_E79F,
 utf8_to_euc_E7A0, utf8_to_euc_E7A1, utf8_to_euc_E7A2, utf8_to_euc_E7A3,
 utf8_to_euc_E7A4, utf8_to_euc_E7A5, utf8_to_euc_E7A6, utf8_to_euc_E7A7,
 utf8_to_euc_E7A8, utf8_to_euc_E7A9, utf8_to_euc_E7AA, utf8_to_euc_E7AB,
 utf8_to_euc_E7AC, utf8_to_euc_E7AD, utf8_to_euc_E7AE, utf8_to_euc_E7AF,
 utf8_to_euc_E7B0, utf8_to_euc_E7B1, utf8_to_euc_E7B2, utf8_to_euc_E7B3,
 utf8_to_euc_E7B4, utf8_to_euc_E7B5, utf8_to_euc_E7B6, utf8_to_euc_E7B7,
 utf8_to_euc_E7B8, utf8_to_euc_E7B9, utf8_to_euc_E7BA,                0,
 utf8_to_euc_E7BC, utf8_to_euc_E7BD, utf8_to_euc_E7BE, utf8_to_euc_E7BF,
};
const unsigned short *const utf8_to_euc_E8[] = {
 utf8_to_euc_E880, utf8_to_euc_E881, utf8_to_euc_E882, utf8_to_euc_E883,
 utf8_to_euc_E884, utf8_to_euc_E885, utf8_to_euc_E886, utf8_to_euc_E887,
 utf8_to_euc_E888, utf8_to_euc_E889, utf8_to_euc_E88A, utf8_to_euc_E88B,
 utf8_to_euc_E88C, utf8_to_euc_E88D, utf8_to_euc_E88E, utf8_to_euc_E88F,
 utf8_to_euc_E890, utf8_to_euc_E891, utf8_to_euc_E892, utf8_to_euc_E893,
 utf8_to_euc_E894, utf8_to_euc_E895, utf8_to_euc_E896, utf8_to_euc_E897,
 utf8_to_euc_E898, utf8_to_euc_E899, utf8_to_euc_E89A, utf8_to_euc_E89B,
 utf8_to_euc_E89C, utf8_to_euc_E89D, utf8_to_euc_E89E, utf8_to_euc_E89F,
 utf8_to_euc_E8A0, utf8_to_euc_E8A1, utf8_to_euc_E8A2, utf8_to_euc_E8A3,
 utf8_to_euc_E8A4, utf8_to_euc_E8A5, utf8_to_euc_E8A6, utf8_to_euc_E8A7,
 utf8_to_euc_E8A8, utf8_to_euc_E8A9, utf8_to_euc_E8AA, utf8_to_euc_E8AB,
 utf8_to_euc_E8AC, utf8_to_euc_E8AD, utf8_to_euc_E8AE,                0,
 utf8_to_euc_E8B0, utf8_to_euc_E8B1, utf8_to_euc_E8B2, utf8_to_euc_E8B3,
 utf8_to_euc_E8B4, utf8_to_euc_E8B5, utf8_to_euc_E8B6, utf8_to_euc_E8B7,
 utf8_to_euc_E8B8, utf8_to_euc_E8B9, utf8_to_euc_E8BA, utf8_to_euc_E8BB,
 utf8_to_euc_E8BC, utf8_to_euc_E8BD, utf8_to_euc_E8BE, utf8_to_euc_E8BF,
};
const unsigned short *const utf8_to_euc_E9[] = {
 utf8_to_euc_E980, utf8_to_euc_E981, utf8_to_euc_E982, utf8_to_euc_E983,
 utf8_to_euc_E984, utf8_to_euc_E985, utf8_to_euc_E986, utf8_to_euc_E987,
 utf8_to_euc_E988, utf8_to_euc_E989, utf8_to_euc_E98A, utf8_to_euc_E98B,
 utf8_to_euc_E98C, utf8_to_euc_E98D, utf8_to_euc_E98E, utf8_to_euc_E98F,
 utf8_to_euc_E990, utf8_to_euc_E991, utf8_to_euc_E992,                0,
                0, utf8_to_euc_E995, utf8_to_euc_E996, utf8_to_euc_E997,
 utf8_to_euc_E998, utf8_to_euc_E999, utf8_to_euc_E99A, utf8_to_euc_E99B,
 utf8_to_euc_E99C, utf8_to_euc_E99D, utf8_to_euc_E99E, utf8_to_euc_E99F,
 utf8_to_euc_E9A0, utf8_to_euc_E9A1, utf8_to_euc_E9A2, utf8_to_euc_E9A3,
 utf8_to_euc_E9A4, utf8_to_euc_E9A5, utf8_to_euc_E9A6, utf8_to_euc_E9A7,
 utf8_to_euc_E9A8, utf8_to_euc_E9A9, utf8_to_euc_E9AA, utf8_to_euc_E9AB,
 utf8_to_euc_E9AC, utf8_to_euc_E9AD, utf8_to_euc_E9AE, utf8_to_euc_E9AF,
 utf8_to_euc_E9B0, utf8_to_euc_E9B1,                0, utf8_to_euc_E9B3,
 utf8_to_euc_E9B4, utf8_to_euc_E9B5, utf8_to_euc_E9B6, utf8_to_euc_E9B7,
 utf8_to_euc_E9B8, utf8_to_euc_E9B9, utf8_to_euc_E9BA, utf8_to_euc_E9BB,
 utf8_to_euc_E9BC, utf8_to_euc_E9BD, utf8_to_euc_E9BE,                0,
};
const unsigned short *const utf8_to_euc_EF[] = {
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
 utf8_to_euc_EFA4,                0,                0, utf8_to_euc_EFA7,
 utf8_to_euc_EFA8,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
                0,                0,                0,                0,
 utf8_to_euc_EFB8, utf8_to_euc_EFB9,                0,                0,
 utf8_to_euc_EFBC, utf8_to_euc_EFBD, utf8_to_euc_EFBE, utf8_to_euc_EFBF,
};
const unsigned short *const utf8_to_euc_2bytes[] = {
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0, utf8_to_euc_C2, utf8_to_euc_C3,
 utf8_to_euc_C4, utf8_to_euc_C5,              0, utf8_to_euc_C7,
              0,              0,              0, utf8_to_euc_CB,
              0,              0, utf8_to_euc_CE, utf8_to_euc_CF,
 utf8_to_euc_D0, utf8_to_euc_D1,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
};
const unsigned short *const *const utf8_to_euc_3bytes[] = {
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0,              0,              0,
              0,              0, utf8_to_euc_E2, utf8_to_euc_E3,
 utf8_to_euc_E4, utf8_to_euc_E5, utf8_to_euc_E6, utf8_to_euc_E7,
 utf8_to_euc_E8, utf8_to_euc_E9,              0,              0,
              0,              0,              0, utf8_to_euc_EF,
};

#ifdef UNICODE_NORMALIZATION

/* Normalization Table by Apple */
/* http://developer.apple.com/technotes/tn/tn1150table.html */

const struct normalization_pair normalization_table[] = {
    {{0xcd,0xbe},       {0x3b}},
    {{0xc3,0x80},       {0x41,0xcc,0x80,0x00}},
    {{0xc3,0x81},       {0x41,0xcc,0x81}},
    {{0xc3,0x82},       {0x41,0xcc,0x82}},
    {{0xe1,0xba,0xa6},  {0x41,0xcc,0x82,0xcc,0x80}},
    {{0xe1,0xba,0xa4},  {0x41,0xcc,0x82,0xcc,0x81}},
    {{0xe1,0xba,0xaa},  {0x41,0xcc,0x82,0xcc,0x83}},
    {{0xe1,0xba,0xa8},  {0x41,0xcc,0x82,0xcc,0x89}},
    {{0xc3,0x83},       {0x41,0xcc,0x83}},
    {{0xc4,0x80},       {0x41,0xcc,0x84}},
    {{0xc4,0x82},       {0x41,0xcc,0x86}},
    {{0xe1,0xba,0xb0},  {0x41,0xcc,0x86,0xcc,0x80}},
    {{0xe1,0xba,0xae},  {0x41,0xcc,0x86,0xcc,0x81}},
    {{0xe1,0xba,0xb4},  {0x41,0xcc,0x86,0xcc,0x83}},
    {{0xe1,0xba,0xb2},  {0x41,0xcc,0x86,0xcc,0x89}},
    {{0xc7,0xa0},       {0x41,0xcc,0x87,0xcc,0x84}},
    {{0xc3,0x84},       {0x41,0xcc,0x88}},
    {{0xc7,0x9e},       {0x41,0xcc,0x88,0xcc,0x84}},
    {{0xe1,0xba,0xa2},  {0x41,0xcc,0x89}},
    {{0xc3,0x85},       {0x41,0xcc,0x8a}},
    {{0xc7,0xba},       {0x41,0xcc,0x8a,0xcc,0x81}},
    {{0xc7,0x8d},       {0x41,0xcc,0x8c}},
    {{0xc8,0x80},       {0x41,0xcc,0x8f}},
    {{0xc8,0x82},       {0x41,0xcc,0x91}},
    {{0xe1,0xba,0xa0},  {0x41,0xcc,0xa3}},
    {{0xe1,0xba,0xac},  {0x41,0xcc,0xa3,0xcc,0x82}},
    {{0xe1,0xba,0xb6},  {0x41,0xcc,0xa3,0xcc,0x86}},
    {{0xe1,0xb8,0x80},  {0x41,0xcc,0xa5}},
    {{0xc4,0x84},       {0x41,0xcc,0xa8}},
    {{0xe1,0xb8,0x82},  {0x42,0xcc,0x87}},
    {{0xe1,0xb8,0x84},  {0x42,0xcc,0xa3}},
    {{0xe1,0xb8,0x86},  {0x42,0xcc,0xb1}},
    {{0xc4,0x86},       {0x43,0xcc,0x81}},
    {{0xc4,0x88},       {0x43,0xcc,0x82}},
    {{0xc4,0x8a},       {0x43,0xcc,0x87}},
    {{0xc4,0x8c},       {0x43,0xcc,0x8c}},
    {{0xc3,0x87},       {0x43,0xcc,0xa7}},
    {{0xe1,0xb8,0x88},  {0x43,0xcc,0xa7,0xcc,0x81}},
    {{0xe1,0xb8,0x8a},  {0x44,0xcc,0x87}},
    {{0xc4,0x8e},       {0x44,0xcc,0x8c}},
    {{0xe1,0xb8,0x8c},  {0x44,0xcc,0xa3}},
    {{0xe1,0xb8,0x90},  {0x44,0xcc,0xa7}},
    {{0xe1,0xb8,0x92},  {0x44,0xcc,0xad}},
    {{0xe1,0xb8,0x8e},  {0x44,0xcc,0xb1}},
    {{0xc3,0x88},       {0x45,0xcc,0x80}},
    {{0xc3,0x89},       {0x45,0xcc,0x81}},
    {{0xc3,0x8a},       {0x45,0xcc,0x82}},
    {{0xe1,0xbb,0x80},  {0x45,0xcc,0x82,0xcc,0x80}},
    {{0xe1,0xba,0xbe},  {0x45,0xcc,0x82,0xcc,0x81}},
    {{0xe1,0xbb,0x84},  {0x45,0xcc,0x82,0xcc,0x83}},
    {{0xe1,0xbb,0x82},  {0x45,0xcc,0x82,0xcc,0x89}},
    {{0xe1,0xba,0xbc},  {0x45,0xcc,0x83}},
    {{0xc4,0x92},       {0x45,0xcc,0x84}},
    {{0xe1,0xb8,0x94},  {0x45,0xcc,0x84,0xcc,0x80}},
    {{0xe1,0xb8,0x96},  {0x45,0xcc,0x84,0xcc,0x81}},
    {{0xc4,0x94},       {0x45,0xcc,0x86}},
    {{0xc4,0x96},       {0x45,0xcc,0x87}},
    {{0xc3,0x8b},       {0x45,0xcc,0x88}},
    {{0xe1,0xba,0xba},  {0x45,0xcc,0x89}},
    {{0xc4,0x9a},       {0x45,0xcc,0x8c}},
    {{0xc8,0x84},       {0x45,0xcc,0x8f}},
    {{0xc8,0x86},       {0x45,0xcc,0x91}},
    {{0xe1,0xba,0xb8},  {0x45,0xcc,0xa3}},
    {{0xe1,0xbb,0x86},  {0x45,0xcc,0xa3,0xcc,0x82}},
    {{0xe1,0xb8,0x9c},  {0x45,0xcc,0xa7,0xcc,0x86}},
    {{0xc4,0x98},       {0x45,0xcc,0xa8}},
    {{0xe1,0xb8,0x98},  {0x45,0xcc,0xad}},
    {{0xe1,0xb8,0x9a},  {0x45,0xcc,0xb0}},
    {{0xe1,0xb8,0x9e},  {0x46,0xcc,0x87}},
    {{0xc7,0xb4},       {0x47,0xcc,0x81}},
    {{0xc4,0x9c},       {0x47,0xcc,0x82}},
    {{0xe1,0xb8,0xa0},  {0x47,0xcc,0x84}},
    {{0xc4,0x9e},       {0x47,0xcc,0x86}},
    {{0xc4,0xa0},       {0x47,0xcc,0x87}},
    {{0xc7,0xa6},       {0x47,0xcc,0x8c}},
    {{0xc4,0xa2},       {0x47,0xcc,0xa7}},
    {{0xc4,0xa4},       {0x48,0xcc,0x82}},
    {{0xe1,0xb8,0xa2},  {0x48,0xcc,0x87}},
    {{0xe1,0xb8,0xa6},  {0x48,0xcc,0x88}},
    {{0xe1,0xb8,0xa4},  {0x48,0xcc,0xa3}},
    {{0xe1,0xb8,0xa8},  {0x48,0xcc,0xa7}},
    {{0xe1,0xb8,0xaa},  {0x48,0xcc,0xae}},
    {{0xc3,0x8c},       {0x49,0xcc,0x80}},
    {{0xc3,0x8d},       {0x49,0xcc,0x81}},
    {{0xc3,0x8e},       {0x49,0xcc,0x82}},
    {{0xc4,0xa8},       {0x49,0xcc,0x83}},
    {{0xc4,0xaa},       {0x49,0xcc,0x84}},
    {{0xc4,0xac},       {0x49,0xcc,0x86}},
    {{0xc4,0xb0},       {0x49,0xcc,0x87}},
    {{0xc3,0x8f},       {0x49,0xcc,0x88}},
    {{0xe1,0xb8,0xae},  {0x49,0xcc,0x88,0xcc,0x81}},
    {{0xe1,0xbb,0x88},  {0x49,0xcc,0x89}},
    {{0xc7,0x8f},       {0x49,0xcc,0x8c}},
    {{0xc8,0x88},       {0x49,0xcc,0x8f}},
    {{0xc8,0x8a},       {0x49,0xcc,0x91}},
    {{0xe1,0xbb,0x8a},  {0x49,0xcc,0xa3}},
    {{0xc4,0xae},       {0x49,0xcc,0xa8}},
    {{0xe1,0xb8,0xac},  {0x49,0xcc,0xb0}},
    {{0xc4,0xb4},       {0x4a,0xcc,0x82}},
    {{0xe1,0xb8,0xb0},  {0x4b,0xcc,0x81}},
    {{0xc7,0xa8},       {0x4b,0xcc,0x8c}},
    {{0xe1,0xb8,0xb2},  {0x4b,0xcc,0xa3}},
    {{0xc4,0xb6},       {0x4b,0xcc,0xa7}},
    {{0xe1,0xb8,0xb4},  {0x4b,0xcc,0xb1}},
    {{0xc4,0xb9},       {0x4c,0xcc,0x81}},
    {{0xc4,0xbd},       {0x4c,0xcc,0x8c}},
    {{0xe1,0xb8,0xb6},  {0x4c,0xcc,0xa3}},
    {{0xe1,0xb8,0xb8},  {0x4c,0xcc,0xa3,0xcc,0x84}},
    {{0xc4,0xbb},       {0x4c,0xcc,0xa7}},
    {{0xe1,0xb8,0xbc},  {0x4c,0xcc,0xad}},
    {{0xe1,0xb8,0xba},  {0x4c,0xcc,0xb1}},
    {{0xe1,0xb8,0xbe},  {0x4d,0xcc,0x81}},
    {{0xe1,0xb9,0x80},  {0x4d,0xcc,0x87}},
    {{0xe1,0xb9,0x82},  {0x4d,0xcc,0xa3}},
    {{0xc5,0x83},       {0x4e,0xcc,0x81}},
    {{0xc3,0x91},       {0x4e,0xcc,0x83}},
    {{0xe1,0xb9,0x84},  {0x4e,0xcc,0x87}},
    {{0xc5,0x87},       {0x4e,0xcc,0x8c}},
    {{0xe1,0xb9,0x86},  {0x4e,0xcc,0xa3}},
    {{0xc5,0x85},       {0x4e,0xcc,0xa7}},
    {{0xe1,0xb9,0x8a},  {0x4e,0xcc,0xad}},
    {{0xe1,0xb9,0x88},  {0x4e,0xcc,0xb1}},
    {{0xc3,0x92},       {0x4f,0xcc,0x80}},
    {{0xc3,0x93},       {0x4f,0xcc,0x81}},
    {{0xc3,0x94},       {0x4f,0xcc,0x82}},
    {{0xe1,0xbb,0x92},  {0x4f,0xcc,0x82,0xcc,0x80}},
    {{0xe1,0xbb,0x90},  {0x4f,0xcc,0x82,0xcc,0x81}},
    {{0xe1,0xbb,0x96},  {0x4f,0xcc,0x82,0xcc,0x83}},
    {{0xe1,0xbb,0x94},  {0x4f,0xcc,0x82,0xcc,0x89}},
    {{0xc3,0x95},       {0x4f,0xcc,0x83}},
    {{0xe1,0xb9,0x8c},  {0x4f,0xcc,0x83,0xcc,0x81}},
    {{0xe1,0xb9,0x8e},  {0x4f,0xcc,0x83,0xcc,0x88}},
    {{0xc5,0x8c},       {0x4f,0xcc,0x84}},
    {{0xe1,0xb9,0x90},  {0x4f,0xcc,0x84,0xcc,0x80}},
    {{0xe1,0xb9,0x92},  {0x4f,0xcc,0x84,0xcc,0x81}},
    {{0xc5,0x8e},       {0x4f,0xcc,0x86}},
    {{0xc3,0x96},       {0x4f,0xcc,0x88}},
    {{0xe1,0xbb,0x8e},  {0x4f,0xcc,0x89}},
    {{0xc5,0x90},       {0x4f,0xcc,0x8b}},
    {{0xc7,0x91},       {0x4f,0xcc,0x8c}},
    {{0xc8,0x8c},       {0x4f,0xcc,0x8f}},
    {{0xc8,0x8e},       {0x4f,0xcc,0x91}},
    {{0xc6,0xa0},       {0x4f,0xcc,0x9b}},
    {{0xe1,0xbb,0x9c},  {0x4f,0xcc,0x9b,0xcc,0x80}},
    {{0xe1,0xbb,0x9a},  {0x4f,0xcc,0x9b,0xcc,0x81}},
    {{0xe1,0xbb,0xa0},  {0x4f,0xcc,0x9b,0xcc,0x83}},
    {{0xe1,0xbb,0x9e},  {0x4f,0xcc,0x9b,0xcc,0x89}},
    {{0xe1,0xbb,0xa2},  {0x4f,0xcc,0x9b,0xcc,0xa3}},
    {{0xe1,0xbb,0x8c},  {0x4f,0xcc,0xa3}},
    {{0xe1,0xbb,0x98},  {0x4f,0xcc,0xa3,0xcc,0x82}},
    {{0xc7,0xaa},       {0x4f,0xcc,0xa8}},
    {{0xc7,0xac},       {0x4f,0xcc,0xa8,0xcc,0x84}},
    {{0xe1,0xb9,0x94},  {0x50,0xcc,0x81}},
    {{0xe1,0xb9,0x96},  {0x50,0xcc,0x87}},
    {{0xc5,0x94},       {0x52,0xcc,0x81}},
    {{0xe1,0xb9,0x98},  {0x52,0xcc,0x87}},
    {{0xc5,0x98},       {0x52,0xcc,0x8c}},
    {{0xc8,0x90},       {0x52,0xcc,0x8f}},
    {{0xc8,0x92},       {0x52,0xcc,0x91}},
    {{0xe1,0xb9,0x9a},  {0x52,0xcc,0xa3}},
    {{0xe1,0xb9,0x9c},  {0x52,0xcc,0xa3,0xcc,0x84}},
    {{0xc5,0x96},       {0x52,0xcc,0xa7}},
    {{0xe1,0xb9,0x9e},  {0x52,0xcc,0xb1}},
    {{0xc5,0x9a},       {0x53,0xcc,0x81}},
    {{0xe1,0xb9,0xa4},  {0x53,0xcc,0x81,0xcc,0x87}},
    {{0xc5,0x9c},       {0x53,0xcc,0x82}},
    {{0xe1,0xb9,0xa0},  {0x53,0xcc,0x87}},
    {{0xc5,0xa0},       {0x53,0xcc,0x8c}},
    {{0xe1,0xb9,0xa6},  {0x53,0xcc,0x8c,0xcc,0x87}},
    {{0xe1,0xb9,0xa2},  {0x53,0xcc,0xa3}},
    {{0xe1,0xb9,0xa8},  {0x53,0xcc,0xa3,0xcc,0x87}},
    {{0xc5,0x9e},       {0x53,0xcc,0xa7}},
    {{0xe1,0xb9,0xaa},  {0x54,0xcc,0x87}},
    {{0xc5,0xa4},       {0x54,0xcc,0x8c}},
    {{0xe1,0xb9,0xac},  {0x54,0xcc,0xa3}},
    {{0xc5,0xa2},       {0x54,0xcc,0xa7}},
    {{0xe1,0xb9,0xb0},  {0x54,0xcc,0xad}},
    {{0xe1,0xb9,0xae},  {0x54,0xcc,0xb1}},
    {{0xc3,0x99},       {0x55,0xcc,0x80}},
    {{0xc3,0x9a},       {0x55,0xcc,0x81}},
    {{0xc3,0x9b},       {0x55,0xcc,0x82}},
    {{0xc5,0xa8},       {0x55,0xcc,0x83}},
    {{0xe1,0xb9,0xb8},  {0x55,0xcc,0x83,0xcc,0x81}},
    {{0xc5,0xaa},       {0x55,0xcc,0x84}},
    {{0xe1,0xb9,0xba},  {0x55,0xcc,0x84,0xcc,0x88}},
    {{0xc5,0xac},       {0x55,0xcc,0x86}},
    {{0xc3,0x9c},       {0x55,0xcc,0x88}},
    {{0xc7,0x9b},       {0x55,0xcc,0x88,0xcc,0x80}},
    {{0xc7,0x97},       {0x55,0xcc,0x88,0xcc,0x81}},
    {{0xc7,0x95},       {0x55,0xcc,0x88,0xcc,0x84}},
    {{0xc7,0x99},       {0x55,0xcc,0x88,0xcc,0x8c}},
    {{0xe1,0xbb,0xa6},  {0x55,0xcc,0x89}},
    {{0xc5,0xae},       {0x55,0xcc,0x8a}},
    {{0xc5,0xb0},       {0x55,0xcc,0x8b}},
    {{0xc7,0x93},       {0x55,0xcc,0x8c}},
    {{0xc8,0x94},       {0x55,0xcc,0x8f}},
    {{0xc8,0x96},       {0x55,0xcc,0x91}},
    {{0xc6,0xaf},       {0x55,0xcc,0x9b}},
    {{0xe1,0xbb,0xaa},  {0x55,0xcc,0x9b,0xcc,0x80}},
    {{0xe1,0xbb,0xa8},  {0x55,0xcc,0x9b,0xcc,0x81}},
    {{0xe1,0xbb,0xae},  {0x55,0xcc,0x9b,0xcc,0x83}},
    {{0xe1,0xbb,0xac},  {0x55,0xcc,0x9b,0xcc,0x89}},
    {{0xe1,0xbb,0xb0},  {0x55,0xcc,0x9b,0xcc,0xa3}},
    {{0xe1,0xbb,0xa4},  {0x55,0xcc,0xa3}},
    {{0xe1,0xb9,0xb2},  {0x55,0xcc,0xa4}},
    {{0xc5,0xb2},       {0x55,0xcc,0xa8}},
    {{0xe1,0xb9,0xb6},  {0x55,0xcc,0xad}},
    {{0xe1,0xb9,0xb4},  {0x55,0xcc,0xb0}},
    {{0xe1,0xb9,0xbc},  {0x56,0xcc,0x83}},
    {{0xe1,0xb9,0xbe},  {0x56,0xcc,0xa3}},
    {{0xe1,0xba,0x80},  {0x57,0xcc,0x80}},
    {{0xe1,0xba,0x82},  {0x57,0xcc,0x81}},
    {{0xc5,0xb4},       {0x57,0xcc,0x82}},
    {{0xe1,0xba,0x86},  {0x57,0xcc,0x87}},
    {{0xe1,0xba,0x84},  {0x57,0xcc,0x88}},
    {{0xe1,0xba,0x88},  {0x57,0xcc,0xa3}},
    {{0xe1,0xba,0x8a},  {0x58,0xcc,0x87}},
    {{0xe1,0xba,0x8c},  {0x58,0xcc,0x88}},
    {{0xe1,0xbb,0xb2},  {0x59,0xcc,0x80}},
    {{0xc3,0x9d},       {0x59,0xcc,0x81}},
    {{0xc5,0xb6},       {0x59,0xcc,0x82}},
    {{0xe1,0xbb,0xb8},  {0x59,0xcc,0x83}},
    {{0xe1,0xba,0x8e},  {0x59,0xcc,0x87}},
    {{0xc5,0xb8},       {0x59,0xcc,0x88}},
    {{0xe1,0xbb,0xb6},  {0x59,0xcc,0x89}},
    {{0xe1,0xbb,0xb4},  {0x59,0xcc,0xa3}},
    {{0xc5,0xb9},       {0x5a,0xcc,0x81}},
    {{0xe1,0xba,0x90},  {0x5a,0xcc,0x82}},
    {{0xc5,0xbb},       {0x5a,0xcc,0x87}},
    {{0xc5,0xbd},       {0x5a,0xcc,0x8c}},
    {{0xe1,0xba,0x92},  {0x5a,0xcc,0xa3}},
    {{0xe1,0xba,0x94},  {0x5a,0xcc,0xb1}},
    {{0xe1,0xbf,0xaf},  {0x60}},
    {{0xc3,0xa0},       {0x61,0xcc,0x80}},
    {{0xc3,0xa1},       {0x61,0xcc,0x81}},
    {{0xc3,0xa2},       {0x61,0xcc,0x82}},
    {{0xe1,0xba,0xa7},  {0x61,0xcc,0x82,0xcc,0x80}},
    {{0xe1,0xba,0xa5},  {0x61,0xcc,0x82,0xcc,0x81}},
    {{0xe1,0xba,0xab},  {0x61,0xcc,0x82,0xcc,0x83}},
    {{0xe1,0xba,0xa9},  {0x61,0xcc,0x82,0xcc,0x89}},
    {{0xc3,0xa3},       {0x61,0xcc,0x83}},
    {{0xc4,0x81},       {0x61,0xcc,0x84}},
    {{0xc4,0x83},       {0x61,0xcc,0x86}},
    {{0xe1,0xba,0xb1},  {0x61,0xcc,0x86,0xcc,0x80}},
    {{0xe1,0xba,0xaf},  {0x61,0xcc,0x86,0xcc,0x81}},
    {{0xe1,0xba,0xb5},  {0x61,0xcc,0x86,0xcc,0x83}},
    {{0xe1,0xba,0xb3},  {0x61,0xcc,0x86,0xcc,0x89}},
    {{0xc7,0xa1},       {0x61,0xcc,0x87,0xcc,0x84}},
    {{0xc3,0xa4},       {0x61,0xcc,0x88}},
    {{0xc7,0x9f},       {0x61,0xcc,0x88,0xcc,0x84}},
    {{0xe1,0xba,0xa3},  {0x61,0xcc,0x89}},
    {{0xc3,0xa5},       {0x61,0xcc,0x8a}},
    {{0xc7,0xbb},       {0x61,0xcc,0x8a,0xcc,0x81}},
    {{0xc7,0x8e},       {0x61,0xcc,0x8c}},
    {{0xc8,0x81},       {0x61,0xcc,0x8f}},
    {{0xc8,0x83},       {0x61,0xcc,0x91}},
    {{0xe1,0xba,0xa1},  {0x61,0xcc,0xa3}},
    {{0xe1,0xba,0xad},  {0x61,0xcc,0xa3,0xcc,0x82}},
    {{0xe1,0xba,0xb7},  {0x61,0xcc,0xa3,0xcc,0x86}},
    {{0xe1,0xb8,0x81},  {0x61,0xcc,0xa5}},
    {{0xc4,0x85},       {0x61,0xcc,0xa8}},
    {{0xe1,0xb8,0x83},  {0x62,0xcc,0x87}},
    {{0xe1,0xb8,0x85},  {0x62,0xcc,0xa3}},
    {{0xe1,0xb8,0x87},  {0x62,0xcc,0xb1}},
    {{0xc4,0x87},       {0x63,0xcc,0x81}},
    {{0xc4,0x89},       {0x63,0xcc,0x82}},
    {{0xc4,0x8b},       {0x63,0xcc,0x87}},
    {{0xc4,0x8d},       {0x63,0xcc,0x8c}},
    {{0xc3,0xa7},       {0x63,0xcc,0xa7}},
    {{0xe1,0xb8,0x89},  {0x63,0xcc,0xa7,0xcc,0x81}},
    {{0xe1,0xb8,0x8b},  {0x64,0xcc,0x87}},
    {{0xc4,0x8f},       {0x64,0xcc,0x8c}},
    {{0xe1,0xb8,0x8d},  {0x64,0xcc,0xa3}},
    {{0xe1,0xb8,0x91},  {0x64,0xcc,0xa7}},
    {{0xe1,0xb8,0x93},  {0x64,0xcc,0xad}},
    {{0xe1,0xb8,0x8f},  {0x64,0xcc,0xb1}},
    {{0xc3,0xa8},       {0x65,0xcc,0x80}},
    {{0xc3,0xa9},       {0x65,0xcc,0x81}},
    {{0xc3,0xaa},       {0x65,0xcc,0x82}},
    {{0xe1,0xbb,0x81},  {0x65,0xcc,0x82,0xcc,0x80}},
    {{0xe1,0xba,0xbf},  {0x65,0xcc,0x82,0xcc,0x81}},
    {{0xe1,0xbb,0x85},  {0x65,0xcc,0x82,0xcc,0x83}},
    {{0xe1,0xbb,0x83},  {0x65,0xcc,0x82,0xcc,0x89}},
    {{0xe1,0xba,0xbd},  {0x65,0xcc,0x83}},
    {{0xc4,0x93},       {0x65,0xcc,0x84}},
    {{0xe1,0xb8,0x95},  {0x65,0xcc,0x84,0xcc,0x80}},
    {{0xe1,0xb8,0x97},  {0x65,0xcc,0x84,0xcc,0x81}},
    {{0xc4,0x95},       {0x65,0xcc,0x86}},
    {{0xc4,0x97},       {0x65,0xcc,0x87}},
    {{0xc3,0xab},       {0x65,0xcc,0x88}},
    {{0xe1,0xba,0xbb},  {0x65,0xcc,0x89}},
    {{0xc4,0x9b},       {0x65,0xcc,0x8c}},
    {{0xc8,0x85},       {0x65,0xcc,0x8f}},
    {{0xc8,0x87},       {0x65,0xcc,0x91}},
    {{0xe1,0xba,0xb9},  {0x65,0xcc,0xa3}},
    {{0xe1,0xbb,0x87},  {0x65,0xcc,0xa3,0xcc,0x82}},
    {{0xe1,0xb8,0x9d},  {0x65,0xcc,0xa7,0xcc,0x86}},
    {{0xc4,0x99},       {0x65,0xcc,0xa8}},
    {{0xe1,0xb8,0x99},  {0x65,0xcc,0xad}},
    {{0xe1,0xb8,0x9b},  {0x65,0xcc,0xb0}},
    {{0xe1,0xb8,0x9f},  {0x66,0xcc,0x87}},
    {{0xc7,0xb5},       {0x67,0xcc,0x81}},
    {{0xc4,0x9d},       {0x67,0xcc,0x82}},
    {{0xe1,0xb8,0xa1},  {0x67,0xcc,0x84}},
    {{0xc4,0x9f},       {0x67,0xcc,0x86}},
    {{0xc4,0xa1},       {0x67,0xcc,0x87}},
    {{0xc7,0xa7},       {0x67,0xcc,0x8c}},
    {{0xc4,0xa3},       {0x67,0xcc,0xa7}},
    {{0xc4,0xa5},       {0x68,0xcc,0x82}},
    {{0xe1,0xb8,0xa3},  {0x68,0xcc,0x87}},
    {{0xe1,0xb8,0xa7},  {0x68,0xcc,0x88}},
    {{0xe1,0xb8,0xa5},  {0x68,0xcc,0xa3}},
    {{0xe1,0xb8,0xa9},  {0x68,0xcc,0xa7}},
    {{0xe1,0xb8,0xab},  {0x68,0xcc,0xae}},
    {{0xe1,0xba,0x96},  {0x68,0xcc,0xb1}},
    {{0xc3,0xac},       {0x69,0xcc,0x80}},
    {{0xc3,0xad},       {0x69,0xcc,0x81}},
    {{0xc3,0xae},       {0x69,0xcc,0x82}},
    {{0xc4,0xa9},       {0x69,0xcc,0x83}},
    {{0xc4,0xab},       {0x69,0xcc,0x84}},
    {{0xc4,0xad},       {0x69,0xcc,0x86}},
    {{0xc3,0xaf},       {0x69,0xcc,0x88}},
    {{0xe1,0xb8,0xaf},  {0x69,0xcc,0x88,0xcc,0x81}},
    {{0xe1,0xbb,0x89},  {0x69,0xcc,0x89}},
    {{0xc7,0x90},       {0x69,0xcc,0x8c}},
    {{0xc8,0x89},       {0x69,0xcc,0x8f}},
    {{0xc8,0x8b},       {0x69,0xcc,0x91}},
    {{0xe1,0xbb,0x8b},  {0x69,0xcc,0xa3}},
    {{0xc4,0xaf},       {0x69,0xcc,0xa8}},
    {{0xe1,0xb8,0xad},  {0x69,0xcc,0xb0}},
    {{0xc4,0xb5},       {0x6a,0xcc,0x82}},
    {{0xc7,0xb0},       {0x6a,0xcc,0x8c}},
    {{0xe1,0xb8,0xb1},  {0x6b,0xcc,0x81}},
    {{0xc7,0xa9},       {0x6b,0xcc,0x8c}},
    {{0xe1,0xb8,0xb3},  {0x6b,0xcc,0xa3}},
    {{0xc4,0xb7},       {0x6b,0xcc,0xa7}},
    {{0xe1,0xb8,0xb5},  {0x6b,0xcc,0xb1}},
    {{0xc4,0xba},       {0x6c,0xcc,0x81}},
    {{0xc4,0xbe},       {0x6c,0xcc,0x8c}},
    {{0xe1,0xb8,0xb7},  {0x6c,0xcc,0xa3}},
    {{0xe1,0xb8,0xb9},  {0x6c,0xcc,0xa3,0xcc,0x84}},
    {{0xc4,0xbc},       {0x6c,0xcc,0xa7}},
    {{0xe1,0xb8,0xbd},  {0x6c,0xcc,0xad}},
    {{0xe1,0xb8,0xbb},  {0x6c,0xcc,0xb1}},
    {{0xe1,0xb8,0xbf},  {0x6d,0xcc,0x81}},
    {{0xe1,0xb9,0x81},  {0x6d,0xcc,0x87}},
    {{0xe1,0xb9,0x83},  {0x6d,0xcc,0xa3}},
    {{0xc5,0x84},       {0x6e,0xcc,0x81}},
    {{0xc3,0xb1},       {0x6e,0xcc,0x83}},
    {{0xe1,0xb9,0x85},  {0x6e,0xcc,0x87}},
    {{0xc5,0x88},       {0x6e,0xcc,0x8c}},
    {{0xe1,0xb9,0x87},  {0x6e,0xcc,0xa3}},
    {{0xc5,0x86},       {0x6e,0xcc,0xa7}},
    {{0xe1,0xb9,0x8b},  {0x6e,0xcc,0xad}},
    {{0xe1,0xb9,0x89},  {0x6e,0xcc,0xb1}},
    {{0xc3,0xb2},       {0x6f,0xcc,0x80}},
    {{0xc3,0xb3},       {0x6f,0xcc,0x81}},
    {{0xc3,0xb4},       {0x6f,0xcc,0x82}},
    {{0xe1,0xbb,0x93},  {0x6f,0xcc,0x82,0xcc,0x80}},
    {{0xe1,0xbb,0x91},  {0x6f,0xcc,0x82,0xcc,0x81}},
    {{0xe1,0xbb,0x97},  {0x6f,0xcc,0x82,0xcc,0x83}},
    {{0xe1,0xbb,0x95},  {0x6f,0xcc,0x82,0xcc,0x89}},
    {{0xc3,0xb5},       {0x6f,0xcc,0x83}},
    {{0xe1,0xb9,0x8d},  {0x6f,0xcc,0x83,0xcc,0x81}},
    {{0xe1,0xb9,0x8f},  {0x6f,0xcc,0x83,0xcc,0x88}},
    {{0xc5,0x8d},       {0x6f,0xcc,0x84}},
    {{0xe1,0xb9,0x91},  {0x6f,0xcc,0x84,0xcc,0x80}},
    {{0xe1,0xb9,0x93},  {0x6f,0xcc,0x84,0xcc,0x81}},
    {{0xc5,0x8f},       {0x6f,0xcc,0x86}},
    {{0xc3,0xb6},       {0x6f,0xcc,0x88}},
    {{0xe1,0xbb,0x8f},  {0x6f,0xcc,0x89}},
    {{0xc5,0x91},       {0x6f,0xcc,0x8b}},
    {{0xc7,0x92},       {0x6f,0xcc,0x8c}},
    {{0xc8,0x8d},       {0x6f,0xcc,0x8f}},
    {{0xc8,0x8f},       {0x6f,0xcc,0x91}},
    {{0xc6,0xa1},       {0x6f,0xcc,0x9b}},
    {{0xe1,0xbb,0x9d},  {0x6f,0xcc,0x9b,0xcc,0x80}},
    {{0xe1,0xbb,0x9b},  {0x6f,0xcc,0x9b,0xcc,0x81}},
    {{0xe1,0xbb,0xa1},  {0x6f,0xcc,0x9b,0xcc,0x83}},
    {{0xe1,0xbb,0x9f},  {0x6f,0xcc,0x9b,0xcc,0x89}},
    {{0xe1,0xbb,0xa3},  {0x6f,0xcc,0x9b,0xcc,0xa3}},
    {{0xe1,0xbb,0x8d},  {0x6f,0xcc,0xa3}},
    {{0xe1,0xbb,0x99},  {0x6f,0xcc,0xa3,0xcc,0x82}},
    {{0xc7,0xab},       {0x6f,0xcc,0xa8}},
    {{0xc7,0xad},       {0x6f,0xcc,0xa8,0xcc,0x84}},
    {{0xe1,0xb9,0x95},  {0x70,0xcc,0x81}},
    {{0xe1,0xb9,0x97},  {0x70,0xcc,0x87}},
    {{0xc5,0x95},       {0x72,0xcc,0x81}},
    {{0xe1,0xb9,0x99},  {0x72,0xcc,0x87}},
    {{0xc5,0x99},       {0x72,0xcc,0x8c}},
    {{0xc8,0x91},       {0x72,0xcc,0x8f}},
    {{0xc8,0x93},       {0x72,0xcc,0x91}},
    {{0xe1,0xb9,0x9b},  {0x72,0xcc,0xa3}},
    {{0xe1,0xb9,0x9d},  {0x72,0xcc,0xa3,0xcc,0x84}},
    {{0xc5,0x97},       {0x72,0xcc,0xa7}},
    {{0xe1,0xb9,0x9f},  {0x72,0xcc,0xb1}},
    {{0xc5,0x9b},       {0x73,0xcc,0x81}},
    {{0xe1,0xb9,0xa5},  {0x73,0xcc,0x81,0xcc,0x87}},
    {{0xc5,0x9d},       {0x73,0xcc,0x82}},
    {{0xe1,0xb9,0xa1},  {0x73,0xcc,0x87}},
    {{0xc5,0xa1},       {0x73,0xcc,0x8c}},
    {{0xe1,0xb9,0xa7},  {0x73,0xcc,0x8c,0xcc,0x87}},
    {{0xe1,0xb9,0xa3},  {0x73,0xcc,0xa3}},
    {{0xe1,0xb9,0xa9},  {0x73,0xcc,0xa3,0xcc,0x87}},
    {{0xc5,0x9f},       {0x73,0xcc,0xa7}},
    {{0xe1,0xb9,0xab},  {0x74,0xcc,0x87}},
    {{0xe1,0xba,0x97},  {0x74,0xcc,0x88}},
    {{0xc5,0xa5},       {0x74,0xcc,0x8c}},
    {{0xe1,0xb9,0xad},  {0x74,0xcc,0xa3}},
    {{0xc5,0xa3},       {0x74,0xcc,0xa7}},
    {{0xe1,0xb9,0xb1},  {0x74,0xcc,0xad}},
    {{0xe1,0xb9,0xaf},  {0x74,0xcc,0xb1}},
    {{0xc3,0xb9},       {0x75,0xcc,0x80}},
    {{0xc3,0xba},       {0x75,0xcc,0x81}},
    {{0xc3,0xbb},       {0x75,0xcc,0x82}},
    {{0xc5,0xa9},       {0x75,0xcc,0x83}},
    {{0xe1,0xb9,0xb9},  {0x75,0xcc,0x83,0xcc,0x81}},
    {{0xc5,0xab},       {0x75,0xcc,0x84}},
    {{0xe1,0xb9,0xbb},  {0x75,0xcc,0x84,0xcc,0x88}},
    {{0xc5,0xad},       {0x75,0xcc,0x86}},
    {{0xc3,0xbc},       {0x75,0xcc,0x88}},
    {{0xc7,0x9c},       {0x75,0xcc,0x88,0xcc,0x80}},
    {{0xc7,0x98},       {0x75,0xcc,0x88,0xcc,0x81}},
    {{0xc7,0x96},       {0x75,0xcc,0x88,0xcc,0x84}},
    {{0xc7,0x9a},       {0x75,0xcc,0x88,0xcc,0x8c}},
    {{0xe1,0xbb,0xa7},  {0x75,0xcc,0x89}},
    {{0xc5,0xaf},       {0x75,0xcc,0x8a}},
    {{0xc5,0xb1},       {0x75,0xcc,0x8b}},
    {{0xc7,0x94},       {0x75,0xcc,0x8c}},
    {{0xc8,0x95},       {0x75,0xcc,0x8f}},
    {{0xc8,0x97},       {0x75,0xcc,0x91}},
    {{0xc6,0xb0},       {0x75,0xcc,0x9b}},
    {{0xe1,0xbb,0xab},  {0x75,0xcc,0x9b,0xcc,0x80}},
    {{0xe1,0xbb,0xa9},  {0x75,0xcc,0x9b,0xcc,0x81}},
    {{0xe1,0xbb,0xaf},  {0x75,0xcc,0x9b,0xcc,0x83}},
    {{0xe1,0xbb,0xad},  {0x75,0xcc,0x9b,0xcc,0x89}},
    {{0xe1,0xbb,0xb1},  {0x75,0xcc,0x9b,0xcc,0xa3}},
    {{0xe1,0xbb,0xa5},  {0x75,0xcc,0xa3}},
    {{0xe1,0xb9,0xb3},  {0x75,0xcc,0xa4}},
    {{0xc5,0xb3},       {0x75,0xcc,0xa8}},
    {{0xe1,0xb9,0xb7},  {0x75,0xcc,0xad}},
    {{0xe1,0xb9,0xb5},  {0x75,0xcc,0xb0}},
    {{0xe1,0xb9,0xbd},  {0x76,0xcc,0x83}},
    {{0xe1,0xb9,0xbf},  {0x76,0xcc,0xa3}},
    {{0xe1,0xba,0x81},  {0x77,0xcc,0x80}},
    {{0xe1,0xba,0x83},  {0x77,0xcc,0x81}},
    {{0xc5,0xb5},       {0x77,0xcc,0x82}},
    {{0xe1,0xba,0x87},  {0x77,0xcc,0x87}},
    {{0xe1,0xba,0x85},  {0x77,0xcc,0x88}},
    {{0xe1,0xba,0x98},  {0x77,0xcc,0x8a}},
    {{0xe1,0xba,0x89},  {0x77,0xcc,0xa3}},
    {{0xe1,0xba,0x8b},  {0x78,0xcc,0x87}},
    {{0xe1,0xba,0x8d},  {0x78,0xcc,0x88}},
    {{0xe1,0xbb,0xb3},  {0x79,0xcc,0x80}},
    {{0xc3,0xbd},       {0x79,0xcc,0x81}},
    {{0xc5,0xb7},       {0x79,0xcc,0x82}},
    {{0xe1,0xbb,0xb9},  {0x79,0xcc,0x83}},
    {{0xe1,0xba,0x8f},  {0x79,0xcc,0x87}},
    {{0xc3,0xbf},       {0x79,0xcc,0x88}},
    {{0xe1,0xbb,0xb7},  {0x79,0xcc,0x89}},
    {{0xe1,0xba,0x99},  {0x79,0xcc,0x8a}},
    {{0xe1,0xbb,0xb5},  {0x79,0xcc,0xa3}},
    {{0xc5,0xba},       {0x7a,0xcc,0x81}},
    {{0xe1,0xba,0x91},  {0x7a,0xcc,0x82}},
    {{0xc5,0xbc},       {0x7a,0xcc,0x87}},
    {{0xc5,0xbe},       {0x7a,0xcc,0x8c}},
    {{0xe1,0xba,0x93},  {0x7a,0xcc,0xa3}},
    {{0xe1,0xba,0x95},  {0x7a,0xcc,0xb1}},
    {{0xe1,0xbf,0xad},  {0xc2,0xa8,0xcc,0x80}},
    {{0xe1,0xbf,0xae},  {0xc2,0xa8,0xcc,0x81}},
    {{0xce,0x85},       {0xc2,0xa8,0xcc,0x8d}},
    {{0xe1,0xbf,0x81},  {0xc2,0xa8,0xcd,0x82}},
    {{0xe1,0xbf,0xbd},  {0xc2,0xb4}},
    {{0xce,0x87},       {0xc2,0xb7}},
    {{0xd3,0x94},       {0xc3,0x86}},
    {{0xc7,0xbc},       {0xc3,0x86,0xcc,0x81}},
    {{0xc7,0xa2},       {0xc3,0x86,0xcc,0x84}},
    {{0xc7,0xbe},       {0xc3,0x98,0xcc,0x81}},
    {{0xd3,0x95},       {0xc3,0xa6}},
    {{0xc7,0xbd},       {0xc3,0xa6,0xcc,0x81}},
    {{0xc7,0xa3},       {0xc3,0xa6,0xcc,0x84}},
    {{0xc7,0xbf},       {0xc3,0xb8,0xcc,0x81}},
    {{0xe1,0xba,0x9b},  {0xc5,0xbf,0xcc,0x87}},
    {{0xd3,0x98},       {0xc6,0x8f}},
    {{0xd3,0x9a},       {0xc6,0x8f,0xcc,0x88}},
    {{0xd3,0xa8},       {0xc6,0x9f}},
    {{0xd3,0xaa},       {0xc6,0x9f,0xcc,0x88}},
    {{0xd3,0xa0},       {0xc6,0xb7}},
    {{0xc7,0xae},       {0xc6,0xb7,0xcc,0x8c}},
    {{0xd3,0x99},       {0xc9,0x99}},
    {{0xd3,0x9b},       {0xc9,0x99,0xcc,0x88}},
    {{0xd3,0xa9},       {0xc9,0xb5}},
    {{0xd3,0xab},       {0xc9,0xb5,0xcc,0x88}},
    {{0xd3,0xa1},       {0xca,0x92}},
    {{0xc7,0xaf},       {0xca,0x92,0xcc,0x8c}},
    {{0xcd,0xb4},       {0xca,0xb9}},
    {{0xcd,0x80},       {0xcc,0x80}},
    {{0xcd,0x81},       {0xcc,0x81}},
    {{0xcc,0x90},       {0xcc,0x86,0xcc,0x87}},
    {{0xcd,0x84},       {0xcc,0x88,0xcc,0x8d}},
    {{0xcd,0x83},       {0xcc,0x93}},
    {{0xe1,0xbe,0xba},  {0xce,0x91,0xcc,0x80}},
    {{0xe1,0xbe,0xbb},  {0xce,0x91,0xcc,0x81}},
    {{0xe1,0xbe,0xb9},  {0xce,0x91,0xcc,0x84}},
    {{0xe1,0xbe,0xb8},  {0xce,0x91,0xcc,0x86}},
    {{0xce,0x86},       {0xce,0x91,0xcc,0x8d}},
    {{0xe1,0xbc,0x88},  {0xce,0x91,0xcc,0x93}},
    {{0xe1,0xbc,0x8a},  {0xce,0x91,0xcc,0x93,0xcc,0x80}},
    {{0xe1,0xbc,0x8c},  {0xce,0x91,0xcc,0x93,0xcc,0x81}},
    {{0xe1,0xbc,0x8e},  {0xce,0x91,0xcc,0x93,0xcd,0x82}},
    {{0xe1,0xbc,0x89},  {0xce,0x91,0xcc,0x94}},
    {{0xe1,0xbc,0x8b},  {0xce,0x91,0xcc,0x94,0xcc,0x80}},
    {{0xe1,0xbc,0x8d},  {0xce,0x91,0xcc,0x94,0xcc,0x81}},
    {{0xe1,0xbc,0x8f},  {0xce,0x91,0xcc,0x94,0xcd,0x82}},
    {{0xe1,0xbe,0xbc},  {0xce,0x91,0xcd,0x85}},
    {{0xe1,0xbe,0x88},  {0xce,0x91,0xcd,0x85,0xcc,0x93}},
    {{0xe1,0xbe,0x8a},  {0xce,0x91,0xcd,0x85,0xcc,0x93,0xcc,0x80}},
    {{0xe1,0xbe,0x8c},  {0xce,0x91,0xcd,0x85,0xcc,0x93,0xcc,0x81}},
    {{0xe1,0xbe,0x8e},  {0xce,0x91,0xcd,0x85,0xcc,0x93,0xcd,0x82}},
    {{0xe1,0xbe,0x89},  {0xce,0x91,0xcd,0x85,0xcc,0x94}},
    {{0xe1,0xbe,0x8b},  {0xce,0x91,0xcd,0x85,0xcc,0x94,0xcc,0x80}},
    {{0xe1,0xbe,0x8d},  {0xce,0x91,0xcd,0x85,0xcc,0x94,0xcc,0x81}},
    {{0xe1,0xbe,0x8f},  {0xce,0x91,0xcd,0x85,0xcc,0x94,0xcd,0x82}},
    {{0xe1,0xbf,0x88},  {0xce,0x95,0xcc,0x80}},
    {{0xe1,0xbf,0x89},  {0xce,0x95,0xcc,0x81}},
    {{0xce,0x88},       {0xce,0x95,0xcc,0x8d}},
    {{0xe1,0xbc,0x98},  {0xce,0x95,0xcc,0x93}},
    {{0xe1,0xbc,0x9a},  {0xce,0x95,0xcc,0x93,0xcc,0x80}},
    {{0xe1,0xbc,0x9c},  {0xce,0x95,0xcc,0x93,0xcc,0x81}},
    {{0xe1,0xbc,0x99},  {0xce,0x95,0xcc,0x94}},
    {{0xe1,0xbc,0x9b},  {0xce,0x95,0xcc,0x94,0xcc,0x80}},
    {{0xe1,0xbc,0x9d},  {0xce,0x95,0xcc,0x94,0xcc,0x81}},
    {{0xe1,0xbf,0x8a},  {0xce,0x97,0xcc,0x80}},
    {{0xe1,0xbf,0x8b},  {0xce,0x97,0xcc,0x81}},
    {{0xce,0x89},       {0xce,0x97,0xcc,0x8d}},
    {{0xe1,0xbc,0xa8},  {0xce,0x97,0xcc,0x93}},
    {{0xe1,0xbc,0xaa},  {0xce,0x97,0xcc,0x93,0xcc,0x80}},
    {{0xe1,0xbc,0xac},  {0xce,0x97,0xcc,0x93,0xcc,0x81}},
    {{0xe1,0xbc,0xae},  {0xce,0x97,0xcc,0x93,0xcd,0x82}},
    {{0xe1,0xbc,0xa9},  {0xce,0x97,0xcc,0x94}},
    {{0xe1,0xbc,0xab},  {0xce,0x97,0xcc,0x94,0xcc,0x80}},
    {{0xe1,0xbc,0xad},  {0xce,0x97,0xcc,0x94,0xcc,0x81}},
    {{0xe1,0xbc,0xaf},  {0xce,0x97,0xcc,0x94,0xcd,0x82}},
    {{0xe1,0xbf,0x8c},  {0xce,0x97,0xcd,0x85}},
    {{0xe1,0xbe,0x98},  {0xce,0x97,0xcd,0x85,0xcc,0x93}},
    {{0xe1,0xbe,0x9a},  {0xce,0x97,0xcd,0x85,0xcc,0x93,0xcc,0x80}},
    {{0xe1,0xbe,0x9c},  {0xce,0x97,0xcd,0x85,0xcc,0x93,0xcc,0x81}},
    {{0xe1,0xbe,0x9e},  {0xce,0x97,0xcd,0x85,0xcc,0x93,0xcd,0x82}},
    {{0xe1,0xbe,0x99},  {0xce,0x97,0xcd,0x85,0xcc,0x94}},
    {{0xe1,0xbe,0x9b},  {0xce,0x97,0xcd,0x85,0xcc,0x94,0xcc,0x80}},
    {{0xe1,0xbe,0x9d},  {0xce,0x97,0xcd,0x85,0xcc,0x94,0xcc,0x81}},
    {{0xe1,0xbe,0x9f},  {0xce,0x97,0xcd,0x85,0xcc,0x94,0xcd,0x82}},
    {{0xe1,0xbf,0x9a},  {0xce,0x99,0xcc,0x80}},
    {{0xe1,0xbf,0x9b},  {0xce,0x99,0xcc,0x81}},
    {{0xe1,0xbf,0x99},  {0xce,0x99,0xcc,0x84}},
    {{0xe1,0xbf,0x98},  {0xce,0x99,0xcc,0x86}},
    {{0xce,0xaa},       {0xce,0x99,0xcc,0x88}},
    {{0xce,0x8a},       {0xce,0x99,0xcc,0x8d}},
    {{0xe1,0xbc,0xb8},  {0xce,0x99,0xcc,0x93}},
    {{0xe1,0xbc,0xba},  {0xce,0x99,0xcc,0x93,0xcc,0x80}},
    {{0xe1,0xbc,0xbc},  {0xce,0x99,0xcc,0x93,0xcc,0x81}},
    {{0xe1,0xbc,0xbe},  {0xce,0x99,0xcc,0x93,0xcd,0x82}},
    {{0xe1,0xbc,0xb9},  {0xce,0x99,0xcc,0x94}},
    {{0xe1,0xbc,0xbb},  {0xce,0x99,0xcc,0x94,0xcc,0x80}},
    {{0xe1,0xbc,0xbd},  {0xce,0x99,0xcc,0x94,0xcc,0x81}},
    {{0xe1,0xbc,0xbf},  {0xce,0x99,0xcc,0x94,0xcd,0x82}},
    {{0xe1,0xbf,0xb8},  {0xce,0x9f,0xcc,0x80}},
    {{0xe1,0xbf,0xb9},  {0xce,0x9f,0xcc,0x81}},
    {{0xce,0x8c},       {0xce,0x9f,0xcc,0x8d}},
    {{0xe1,0xbd,0x88},  {0xce,0x9f,0xcc,0x93}},
    {{0xe1,0xbd,0x8a},  {0xce,0x9f,0xcc,0x93,0xcc,0x80}},
    {{0xe1,0xbd,0x8c},  {0xce,0x9f,0xcc,0x93,0xcc,0x81}},
    {{0xe1,0xbd,0x89},  {0xce,0x9f,0xcc,0x94}},
    {{0xe1,0xbd,0x8b},  {0xce,0x9f,0xcc,0x94,0xcc,0x80}},
    {{0xe1,0xbd,0x8d},  {0xce,0x9f,0xcc,0x94,0xcc,0x81}},
    {{0xe1,0xbf,0xac},  {0xce,0xa1,0xcc,0x94}},
    {{0xe1,0xbf,0xaa},  {0xce,0xa5,0xcc,0x80}},
    {{0xe1,0xbf,0xab},  {0xce,0xa5,0xcc,0x81}},
    {{0xe1,0xbf,0xa9},  {0xce,0xa5,0xcc,0x84}},
    {{0xe1,0xbf,0xa8},  {0xce,0xa5,0xcc,0x86}},
    {{0xce,0xab},       {0xce,0xa5,0xcc,0x88}},
    {{0xce,0x8e},       {0xce,0xa5,0xcc,0x8d}},
    {{0xe1,0xbd,0x99},  {0xce,0xa5,0xcc,0x94}},
    {{0xe1,0xbd,0x9b},  {0xce,0xa5,0xcc,0x94,0xcc,0x80}},
    {{0xe1,0xbd,0x9d},  {0xce,0xa5,0xcc,0x94,0xcc,0x81}},
    {{0xe1,0xbd,0x9f},  {0xce,0xa5,0xcc,0x94,0xcd,0x82}},
    {{0xe1,0xbf,0xba},  {0xce,0xa9,0xcc,0x80}},
    {{0xe1,0xbf,0xbb},  {0xce,0xa9,0xcc,0x81}},
    {{0xce,0x8f},       {0xce,0xa9,0xcc,0x8d}},
    {{0xe1,0xbd,0xa8},  {0xce,0xa9,0xcc,0x93}},
    {{0xe1,0xbd,0xaa},  {0xce,0xa9,0xcc,0x93,0xcc,0x80}},
    {{0xe1,0xbd,0xac},  {0xce,0xa9,0xcc,0x93,0xcc,0x81}},
    {{0xe1,0xbd,0xae},  {0xce,0xa9,0xcc,0x93,0xcd,0x82}},
    {{0xe1,0xbd,0xa9},  {0xce,0xa9,0xcc,0x94}},
    {{0xe1,0xbd,0xab},  {0xce,0xa9,0xcc,0x94,0xcc,0x80}},
    {{0xe1,0xbd,0xad},  {0xce,0xa9,0xcc,0x94,0xcc,0x81}},
    {{0xe1,0xbd,0xaf},  {0xce,0xa9,0xcc,0x94,0xcd,0x82}},
    {{0xe1,0xbf,0xbc},  {0xce,0xa9,0xcd,0x85}},
    {{0xe1,0xbe,0xa8},  {0xce,0xa9,0xcd,0x85,0xcc,0x93}},
    {{0xe1,0xbe,0xaa},  {0xce,0xa9,0xcd,0x85,0xcc,0x93,0xcc,0x80}},
    {{0xe1,0xbe,0xac},  {0xce,0xa9,0xcd,0x85,0xcc,0x93,0xcc,0x81}},
    {{0xe1,0xbe,0xae},  {0xce,0xa9,0xcd,0x85,0xcc,0x93,0xcd,0x82}},
    {{0xe1,0xbe,0xa9},  {0xce,0xa9,0xcd,0x85,0xcc,0x94}},
    {{0xe1,0xbe,0xab},  {0xce,0xa9,0xcd,0x85,0xcc,0x94,0xcc,0x80}},
    {{0xe1,0xbe,0xad},  {0xce,0xa9,0xcd,0x85,0xcc,0x94,0xcc,0x81}},
    {{0xe1,0xbe,0xaf},  {0xce,0xa9,0xcd,0x85,0xcc,0x94,0xcd,0x82}},
    {{0xe1,0xbd,0xb0},  {0xce,0xb1,0xcc,0x80}},
    {{0xe1,0xbd,0xb1},  {0xce,0xb1,0xcc,0x81}},
    {{0xe1,0xbe,0xb1},  {0xce,0xb1,0xcc,0x84}},
    {{0xe1,0xbe,0xb0},  {0xce,0xb1,0xcc,0x86}},
    {{0xce,0xac},       {0xce,0xb1,0xcc,0x8d}},
    {{0xe1,0xbc,0x80},  {0xce,0xb1,0xcc,0x93}},
    {{0xe1,0xbc,0x82},  {0xce,0xb1,0xcc,0x93,0xcc,0x80}},
    {{0xe1,0xbc,0x84},  {0xce,0xb1,0xcc,0x93,0xcc,0x81}},
    {{0xe1,0xbc,0x86},  {0xce,0xb1,0xcc,0x93,0xcd,0x82}},
    {{0xe1,0xbc,0x81},  {0xce,0xb1,0xcc,0x94}},
    {{0xe1,0xbc,0x83},  {0xce,0xb1,0xcc,0x94,0xcc,0x80}},
    {{0xe1,0xbc,0x85},  {0xce,0xb1,0xcc,0x94,0xcc,0x81}},
    {{0xe1,0xbc,0x87},  {0xce,0xb1,0xcc,0x94,0xcd,0x82}},
    {{0xe1,0xbe,0xb6},  {0xce,0xb1,0xcd,0x82}},
    {{0xe1,0xbe,0xb3},  {0xce,0xb1,0xcd,0x85}},
    {{0xe1,0xbe,0xb2},  {0xce,0xb1,0xcd,0x85,0xcc,0x80}},
    {{0xe1,0xbe,0xb4},  {0xce,0xb1,0xcd,0x85,0xcc,0x81}},
    {{0xe1,0xbe,0x80},  {0xce,0xb1,0xcd,0x85,0xcc,0x93}},
    {{0xe1,0xbe,0x82},  {0xce,0xb1,0xcd,0x85,0xcc,0x93,0xcc,0x80}},
    {{0xe1,0xbe,0x84},  {0xce,0xb1,0xcd,0x85,0xcc,0x93,0xcc,0x81}},
    {{0xe1,0xbe,0x86},  {0xce,0xb1,0xcd,0x85,0xcc,0x93,0xcd,0x82}},
    {{0xe1,0xbe,0x81},  {0xce,0xb1,0xcd,0x85,0xcc,0x94}},
    {{0xe1,0xbe,0x83},  {0xce,0xb1,0xcd,0x85,0xcc,0x94,0xcc,0x80}},
    {{0xe1,0xbe,0x85},  {0xce,0xb1,0xcd,0x85,0xcc,0x94,0xcc,0x81}},
    {{0xe1,0xbe,0x87},  {0xce,0xb1,0xcd,0x85,0xcc,0x94,0xcd,0x82}},
    {{0xe1,0xbe,0xb7},  {0xce,0xb1,0xcd,0x85,0xcd,0x82}},
    {{0xe1,0xbd,0xb2},  {0xce,0xb5,0xcc,0x80}},
    {{0xe1,0xbd,0xb3},  {0xce,0xb5,0xcc,0x81}},
    {{0xce,0xad},       {0xce,0xb5,0xcc,0x8d}},
    {{0xe1,0xbc,0x90},  {0xce,0xb5,0xcc,0x93}},
    {{0xe1,0xbc,0x92},  {0xce,0xb5,0xcc,0x93,0xcc,0x80}},
    {{0xe1,0xbc,0x94},  {0xce,0xb5,0xcc,0x93,0xcc,0x81}},
    {{0xe1,0xbc,0x91},  {0xce,0xb5,0xcc,0x94}},
    {{0xe1,0xbc,0x93},  {0xce,0xb5,0xcc,0x94,0xcc,0x80}},
    {{0xe1,0xbc,0x95},  {0xce,0xb5,0xcc,0x94,0xcc,0x81}},
    {{0xe1,0xbd,0xb4},  {0xce,0xb7,0xcc,0x80}},
    {{0xe1,0xbd,0xb5},  {0xce,0xb7,0xcc,0x81}},
    {{0xce,0xae},       {0xce,0xb7,0xcc,0x8d}},
    {{0xe1,0xbc,0xa0},  {0xce,0xb7,0xcc,0x93}},
    {{0xe1,0xbc,0xa2},  {0xce,0xb7,0xcc,0x93,0xcc,0x80}},
    {{0xe1,0xbc,0xa4},  {0xce,0xb7,0xcc,0x93,0xcc,0x81}},
    {{0xe1,0xbc,0xa6},  {0xce,0xb7,0xcc,0x93,0xcd,0x82}},
    {{0xe1,0xbc,0xa1},  {0xce,0xb7,0xcc,0x94}},
    {{0xe1,0xbc,0xa3},  {0xce,0xb7,0xcc,0x94,0xcc,0x80}},
    {{0xe1,0xbc,0xa5},  {0xce,0xb7,0xcc,0x94,0xcc,0x81}},
    {{0xe1,0xbc,0xa7},  {0xce,0xb7,0xcc,0x94,0xcd,0x82}},
    {{0xe1,0xbf,0x86},  {0xce,0xb7,0xcd,0x82}},
    {{0xe1,0xbf,0x83},  {0xce,0xb7,0xcd,0x85}},
    {{0xe1,0xbf,0x82},  {0xce,0xb7,0xcd,0x85,0xcc,0x80}},
    {{0xe1,0xbf,0x84},  {0xce,0xb7,0xcd,0x85,0xcc,0x81}},
    {{0xe1,0xbe,0x90},  {0xce,0xb7,0xcd,0x85,0xcc,0x93}},
    {{0xe1,0xbe,0x92},  {0xce,0xb7,0xcd,0x85,0xcc,0x93,0xcc,0x80}},
    {{0xe1,0xbe,0x94},  {0xce,0xb7,0xcd,0x85,0xcc,0x93,0xcc,0x81}},
    {{0xe1,0xbe,0x96},  {0xce,0xb7,0xcd,0x85,0xcc,0x93,0xcd,0x82}},
    {{0xe1,0xbe,0x91},  {0xce,0xb7,0xcd,0x85,0xcc,0x94}},
    {{0xe1,0xbe,0x93},  {0xce,0xb7,0xcd,0x85,0xcc,0x94,0xcc,0x80}},
    {{0xe1,0xbe,0x95},  {0xce,0xb7,0xcd,0x85,0xcc,0x94,0xcc,0x81}},
    {{0xe1,0xbe,0x97},  {0xce,0xb7,0xcd,0x85,0xcc,0x94,0xcd,0x82}},
    {{0xe1,0xbf,0x87},  {0xce,0xb7,0xcd,0x85,0xcd,0x82}},
    {{0xe1,0xbe,0xbe},  {0xce,0xb9}},
    {{0xe1,0xbd,0xb6},  {0xce,0xb9,0xcc,0x80}},
    {{0xe1,0xbd,0xb7},  {0xce,0xb9,0xcc,0x81}},
    {{0xe1,0xbf,0x91},  {0xce,0xb9,0xcc,0x84}},
    {{0xe1,0xbf,0x90},  {0xce,0xb9,0xcc,0x86}},
    {{0xcf,0x8a},       {0xce,0xb9,0xcc,0x88}},
    {{0xe1,0xbf,0x92},  {0xce,0xb9,0xcc,0x88,0xcc,0x80}},
    {{0xe1,0xbf,0x93},  {0xce,0xb9,0xcc,0x88,0xcc,0x81}},
    {{0xce,0x90},       {0xce,0xb9,0xcc,0x88,0xcc,0x8d}},
    {{0xe1,0xbf,0x97},  {0xce,0xb9,0xcc,0x88,0xcd,0x82}},
    {{0xce,0xaf},       {0xce,0xb9,0xcc,0x8d}},
    {{0xe1,0xbc,0xb0},  {0xce,0xb9,0xcc,0x93}},
    {{0xe1,0xbc,0xb2},  {0xce,0xb9,0xcc,0x93,0xcc,0x80}},
    {{0xe1,0xbc,0xb4},  {0xce,0xb9,0xcc,0x93,0xcc,0x81}},
    {{0xe1,0xbc,0xb6},  {0xce,0xb9,0xcc,0x93,0xcd,0x82}},
    {{0xe1,0xbc,0xb1},  {0xce,0xb9,0xcc,0x94}},
    {{0xe1,0xbc,0xb3},  {0xce,0xb9,0xcc,0x94,0xcc,0x80}},
    {{0xe1,0xbc,0xb5},  {0xce,0xb9,0xcc,0x94,0xcc,0x81}},
    {{0xe1,0xbc,0xb7},  {0xce,0xb9,0xcc,0x94,0xcd,0x82}},
    {{0xe1,0xbf,0x96},  {0xce,0xb9,0xcd,0x82}},
    {{0xe1,0xbd,0xb8},  {0xce,0xbf,0xcc,0x80}},
    {{0xe1,0xbd,0xb9},  {0xce,0xbf,0xcc,0x81}},
    {{0xcf,0x8c},       {0xce,0xbf,0xcc,0x8d}},
    {{0xe1,0xbd,0x80},  {0xce,0xbf,0xcc,0x93}},
    {{0xe1,0xbd,0x82},  {0xce,0xbf,0xcc,0x93,0xcc,0x80}},
    {{0xe1,0xbd,0x84},  {0xce,0xbf,0xcc,0x93,0xcc,0x81}},
    {{0xe1,0xbd,0x81},  {0xce,0xbf,0xcc,0x94}},
    {{0xe1,0xbd,0x83},  {0xce,0xbf,0xcc,0x94,0xcc,0x80}},
    {{0xe1,0xbd,0x85},  {0xce,0xbf,0xcc,0x94,0xcc,0x81}},
    {{0xe1,0xbf,0xb4},  {0xce,0xbf,0xcd,0x85,0xcc,0x81}},
    {{0xe1,0xbf,0xa4},  {0xcf,0x81,0xcc,0x93}},
    {{0xe1,0xbf,0xa5},  {0xcf,0x81,0xcc,0x94}},
    {{0xe1,0xbd,0xba},  {0xcf,0x85,0xcc,0x80}},
    {{0xe1,0xbd,0xbb},  {0xcf,0x85,0xcc,0x81}},
    {{0xe1,0xbf,0xa1},  {0xcf,0x85,0xcc,0x84}},
    {{0xe1,0xbf,0xa0},  {0xcf,0x85,0xcc,0x86}},
    {{0xcf,0x8b},       {0xcf,0x85,0xcc,0x88}},
    {{0xe1,0xbf,0xa2},  {0xcf,0x85,0xcc,0x88,0xcc,0x80}},
    {{0xe1,0xbf,0xa3},  {0xcf,0x85,0xcc,0x88,0xcc,0x81}},
    {{0xce,0xb0},       {0xcf,0x85,0xcc,0x88,0xcc,0x8d}},
    {{0xe1,0xbf,0xa7},  {0xcf,0x85,0xcc,0x88,0xcd,0x82}},
    {{0xcf,0x8d},       {0xcf,0x85,0xcc,0x8d}},
    {{0xe1,0xbd,0x90},  {0xcf,0x85,0xcc,0x93}},
    {{0xe1,0xbd,0x92},  {0xcf,0x85,0xcc,0x93,0xcc,0x80}},
    {{0xe1,0xbd,0x94},  {0xcf,0x85,0xcc,0x93,0xcc,0x81}},
    {{0xe1,0xbd,0x96},  {0xcf,0x85,0xcc,0x93,0xcd,0x82}},
    {{0xe1,0xbd,0x91},  {0xcf,0x85,0xcc,0x94}},
    {{0xe1,0xbd,0x93},  {0xcf,0x85,0xcc,0x94,0xcc,0x80}},
    {{0xe1,0xbd,0x95},  {0xcf,0x85,0xcc,0x94,0xcc,0x81}},
    {{0xe1,0xbd,0x97},  {0xcf,0x85,0xcc,0x94,0xcd,0x82}},
    {{0xe1,0xbf,0xa6},  {0xcf,0x85,0xcd,0x82}},
    {{0xe1,0xbd,0xbc},  {0xcf,0x89,0xcc,0x80}},
    {{0xe1,0xbd,0xbd},  {0xcf,0x89,0xcc,0x81}},
    {{0xcf,0x8e},       {0xcf,0x89,0xcc,0x8d}},
    {{0xe1,0xbd,0xa0},  {0xcf,0x89,0xcc,0x93}},
    {{0xe1,0xbd,0xa2},  {0xcf,0x89,0xcc,0x93,0xcc,0x80}},
    {{0xe1,0xbd,0xa4},  {0xcf,0x89,0xcc,0x93,0xcc,0x81}},
    {{0xe1,0xbd,0xa6},  {0xcf,0x89,0xcc,0x93,0xcd,0x82}},
    {{0xe1,0xbd,0xa1},  {0xcf,0x89,0xcc,0x94}},
    {{0xe1,0xbd,0xa3},  {0xcf,0x89,0xcc,0x94,0xcc,0x80}},
    {{0xe1,0xbd,0xa5},  {0xcf,0x89,0xcc,0x94,0xcc,0x81}},
    {{0xe1,0xbd,0xa7},  {0xcf,0x89,0xcc,0x94,0xcd,0x82}},
    {{0xe1,0xbf,0xb6},  {0xcf,0x89,0xcd,0x82}},
    {{0xe1,0xbf,0xb3},  {0xcf,0x89,0xcd,0x85}},
    {{0xe1,0xbf,0xb2},  {0xcf,0x89,0xcd,0x85,0xcc,0x80}},
    {{0xe1,0xbe,0xa0},  {0xcf,0x89,0xcd,0x85,0xcc,0x93}},
    {{0xe1,0xbe,0xa2},  {0xcf,0x89,0xcd,0x85,0xcc,0x93,0xcc,0x80}},
    {{0xe1,0xbe,0xa4},  {0xcf,0x89,0xcd,0x85,0xcc,0x93,0xcc,0x81}},
    {{0xe1,0xbe,0xa6},  {0xcf,0x89,0xcd,0x85,0xcc,0x93,0xcd,0x82}},
    {{0xe1,0xbe,0xa1},  {0xcf,0x89,0xcd,0x85,0xcc,0x94}},
    {{0xe1,0xbe,0xa3},  {0xcf,0x89,0xcd,0x85,0xcc,0x94,0xcc,0x80}},
    {{0xe1,0xbe,0xa5},  {0xcf,0x89,0xcd,0x85,0xcc,0x94,0xcc,0x81}},
    {{0xe1,0xbe,0xa7},  {0xcf,0x89,0xcd,0x85,0xcc,0x94,0xcd,0x82}},
    {{0xe1,0xbf,0xb7},  {0xcf,0x89,0xcd,0x85,0xcd,0x82}},
    {{0xcf,0x94},       {0xcf,0x92,0xcc,0x88}},
    {{0xcf,0x93},       {0xcf,0x92,0xcc,0x8d}},
    {{0xd0,0x87},       {0xd0,0x86,0xcc,0x88}},
    {{0xd3,0x90},       {0xd0,0x90,0xcc,0x86}},
    {{0xd3,0x92},       {0xd0,0x90,0xcc,0x88}},
    {{0xd0,0x83},       {0xd0,0x93,0xcc,0x81}},
    {{0xd3,0x96},       {0xd0,0x95,0xcc,0x86}},
    {{0xd0,0x81},       {0xd0,0x95,0xcc,0x88}},
    {{0xd3,0x81},       {0xd0,0x96,0xcc,0x86}},
    {{0xd3,0x9c},       {0xd0,0x96,0xcc,0x88}},
    {{0xd3,0x9e},       {0xd0,0x97,0xcc,0x88}},
    {{0xd3,0xa2},       {0xd0,0x98,0xcc,0x84}},
    {{0xd0,0x99},       {0xd0,0x98,0xcc,0x86}},
    {{0xd3,0xa4},       {0xd0,0x98,0xcc,0x88}},
    {{0xd0,0x8c},       {0xd0,0x9a,0xcc,0x81}},
    {{0xd3,0xa6},       {0xd0,0x9e,0xcc,0x88}},
    {{0xd3,0xae},       {0xd0,0xa3,0xcc,0x84}},
    {{0xd0,0x8e},       {0xd0,0xa3,0xcc,0x86}},
    {{0xd3,0xb0},       {0xd0,0xa3,0xcc,0x88}},
    {{0xd3,0xb2},       {0xd0,0xa3,0xcc,0x8b}},
    {{0xd3,0xb4},       {0xd0,0xa7,0xcc,0x88}},
    {{0xd3,0xb8},       {0xd0,0xab,0xcc,0x88}},
    {{0xd3,0x91},       {0xd0,0xb0,0xcc,0x86}},
    {{0xd3,0x93},       {0xd0,0xb0,0xcc,0x88}},
    {{0xd1,0x93},       {0xd0,0xb3,0xcc,0x81}},
    {{0xd3,0x97},       {0xd0,0xb5,0xcc,0x86}},
    {{0xd1,0x91},       {0xd0,0xb5,0xcc,0x88}},
    {{0xd3,0x82},       {0xd0,0xb6,0xcc,0x86}},
    {{0xd3,0x9d},       {0xd0,0xb6,0xcc,0x88}},
    {{0xd3,0x9f},       {0xd0,0xb7,0xcc,0x88}},
    {{0xd3,0xa3},       {0xd0,0xb8,0xcc,0x84}},
    {{0xd0,0xb9},       {0xd0,0xb8,0xcc,0x86}},
    {{0xd3,0xa5},       {0xd0,0xb8,0xcc,0x88}},
    {{0xd1,0x9c},       {0xd0,0xba,0xcc,0x81}},
    {{0xd3,0xa7},       {0xd0,0xbe,0xcc,0x88}},
    {{0xd3,0xaf},       {0xd1,0x83,0xcc,0x84}},
    {{0xd1,0x9e},       {0xd1,0x83,0xcc,0x86}},
    {{0xd3,0xb1},       {0xd1,0x83,0xcc,0x88}},
    {{0xd3,0xb3},       {0xd1,0x83,0xcc,0x8b}},
    {{0xd3,0xb5},       {0xd1,0x87,0xcc,0x88}},
    {{0xd3,0xb9},       {0xd1,0x8b,0xcc,0x88}},
    {{0xd1,0x97},       {0xd1,0x96,0xcc,0x88}},
    {{0xd1,0xb6},       {0xd1,0xb4,0xcc,0x8f}},
    {{0xd1,0xb7},       {0xd1,0xb5,0xcc,0x8f}},
    {{0xef,0xac,0xae},  {0xd7,0x90,0xd6,0xb7}},
    {{0xef,0xac,0xaf},  {0xd7,0x90,0xd6,0xb8}},
    {{0xef,0xac,0xb0},  {0xd7,0x90,0xd6,0xbc}},
    {{0xef,0xac,0xb1},  {0xd7,0x91,0xd6,0xbc}},
    {{0xef,0xad,0x8c},  {0xd7,0x91,0xd6,0xbf}},
    {{0xef,0xac,0xb2},  {0xd7,0x92,0xd6,0xbc}},
    {{0xef,0xac,0xb3},  {0xd7,0x93,0xd6,0xbc}},
    {{0xef,0xac,0xb4},  {0xd7,0x94,0xd6,0xbc}},
    {{0xef,0xad,0x8b},  {0xd7,0x95,0xd6,0xb9}},
    {{0xef,0xac,0xb5},  {0xd7,0x95,0xd6,0xbc}},
    {{0xef,0xac,0xb6},  {0xd7,0x96,0xd6,0xbc}},
    {{0xef,0xac,0xb8},  {0xd7,0x98,0xd6,0xbc}},
    {{0xef,0xac,0xb9},  {0xd7,0x99,0xd6,0xbc}},
    {{0xef,0xac,0xba},  {0xd7,0x9a,0xd6,0xbc}},
    {{0xef,0xac,0xbb},  {0xd7,0x9b,0xd6,0xbc}},
    {{0xef,0xad,0x8d},  {0xd7,0x9b,0xd6,0xbf}},
    {{0xef,0xac,0xbc},  {0xd7,0x9c,0xd6,0xbc}},
    {{0xef,0xac,0xbe},  {0xd7,0x9e,0xd6,0xbc}},
    {{0xef,0xad,0x80},  {0xd7,0xa0,0xd6,0xbc}},
    {{0xef,0xad,0x81},  {0xd7,0xa1,0xd6,0xbc}},
    {{0xef,0xad,0x83},  {0xd7,0xa3,0xd6,0xbc}},
    {{0xef,0xad,0x84},  {0xd7,0xa4,0xd6,0xbc}},
    {{0xef,0xad,0x8e},  {0xd7,0xa4,0xd6,0xbf}},
    {{0xef,0xad,0x86},  {0xd7,0xa6,0xd6,0xbc}},
    {{0xef,0xad,0x87},  {0xd7,0xa7,0xd6,0xbc}},
    {{0xef,0xad,0x88},  {0xd7,0xa8,0xd6,0xbc}},
    {{0xef,0xad,0x89},  {0xd7,0xa9,0xd6,0xbc}},
    {{0xef,0xac,0xac},  {0xd7,0xa9,0xd6,0xbc,0xd7,0x81}},
    {{0xef,0xac,0xad},  {0xd7,0xa9,0xd6,0xbc,0xd7,0x82}},
    {{0xef,0xac,0xaa},  {0xd7,0xa9,0xd7,0x81}},
    {{0xef,0xac,0xab},  {0xd7,0xa9,0xd7,0x82}},
    {{0xef,0xad,0x8a},  {0xd7,0xaa,0xd6,0xbc}},
    {{0xef,0xac,0x9f},  {0xd7,0xb2,0xd6,0xb7}},
    {{0xe0,0xa5,0x98},  {0xe0,0xa4,0x95,0xe0,0xa4,0xbc}},
    {{0xe0,0xa5,0x99},  {0xe0,0xa4,0x96,0xe0,0xa4,0xbc}},
    {{0xe0,0xa5,0x9a},  {0xe0,0xa4,0x97,0xe0,0xa4,0xbc}},
    {{0xe0,0xa5,0x9b},  {0xe0,0xa4,0x9c,0xe0,0xa4,0xbc}},
    {{0xe0,0xa5,0x9c},  {0xe0,0xa4,0xa1,0xe0,0xa4,0xbc}},
    {{0xe0,0xa5,0x9d},  {0xe0,0xa4,0xa2,0xe0,0xa4,0xbc}},
    {{0xe0,0xa4,0xa9},  {0xe0,0xa4,0xa8,0xe0,0xa4,0xbc}},
    {{0xe0,0xa5,0x9e},  {0xe0,0xa4,0xab,0xe0,0xa4,0xbc}},
    {{0xe0,0xa5,0x9f},  {0xe0,0xa4,0xaf,0xe0,0xa4,0xbc}},
    {{0xe0,0xa4,0xb1},  {0xe0,0xa4,0xb0,0xe0,0xa4,0xbc}},
    {{0xe0,0xa4,0xb4},  {0xe0,0xa4,0xb3,0xe0,0xa4,0xbc}},
    {{0xe0,0xa7,0x9c},  {0xe0,0xa6,0xa1,0xe0,0xa6,0xbc}},
    {{0xe0,0xa7,0x9d},  {0xe0,0xa6,0xa2,0xe0,0xa6,0xbc}},
    {{0xe0,0xa6,0xb0},  {0xe0,0xa6,0xac,0xe0,0xa6,0xbc}},
    {{0xe0,0xa7,0x9f},  {0xe0,0xa6,0xaf,0xe0,0xa6,0xbc}},
    {{0xe0,0xa7,0x8b},  {0xe0,0xa7,0x87,0xe0,0xa6,0xbe}},
    {{0xe0,0xa7,0x8c},  {0xe0,0xa7,0x87,0xe0,0xa7,0x97}},
    {{0xe0,0xa9,0x99},  {0xe0,0xa8,0x96,0xe0,0xa8,0xbc}},
    {{0xe0,0xa9,0x9a},  {0xe0,0xa8,0x97,0xe0,0xa8,0xbc}},
    {{0xe0,0xa9,0x9b},  {0xe0,0xa8,0x9c,0xe0,0xa8,0xbc}},
    {{0xe0,0xa9,0x9c},  {0xe0,0xa8,0xa1,0xe0,0xa8,0xbc}},
    {{0xe0,0xa9,0x9e},  {0xe0,0xa8,0xab,0xe0,0xa8,0xbc}},
    {{0xe0,0xad,0x9c},  {0xe0,0xac,0xa1,0xe0,0xac,0xbc}},
    {{0xe0,0xad,0x9d},  {0xe0,0xac,0xa2,0xe0,0xac,0xbc}},
    {{0xe0,0xad,0x9f},  {0xe0,0xac,0xaf,0xe0,0xac,0xbc}},
    {{0xe0,0xad,0x8b},  {0xe0,0xad,0x87,0xe0,0xac,0xbe}},
    {{0xe0,0xad,0x88},  {0xe0,0xad,0x87,0xe0,0xad,0x96}},
    {{0xe0,0xad,0x8c},  {0xe0,0xad,0x87,0xe0,0xad,0x97}},
    {{0xe0,0xae,0x94},  {0xe0,0xae,0x92,0xe0,0xaf,0x97}},
    {{0xe0,0xaf,0x8a},  {0xe0,0xaf,0x86,0xe0,0xae,0xbe}},
    {{0xe0,0xaf,0x8c},  {0xe0,0xaf,0x86,0xe0,0xaf,0x97}},
    {{0xe0,0xaf,0x8b},  {0xe0,0xaf,0x87,0xe0,0xae,0xbe}},
    {{0xe0,0xb1,0x88},  {0xe0,0xb1,0x86,0xe0,0xb1,0x96}},
    {{0xe0,0xb3,0x80},  {0xe0,0xb2,0xbf,0xe0,0xb3,0x95}},
    {{0xe0,0xb3,0x8a},  {0xe0,0xb3,0x86,0xe0,0xb3,0x82}},
    {{0xe0,0xb3,0x8b},  {0xe0,0xb3,0x86,0xe0,0xb3,0x82,0xe0,0xb3,0x95}},
    {{0xe0,0xb3,0x87},  {0xe0,0xb3,0x86,0xe0,0xb3,0x95}},
    {{0xe0,0xb3,0x88},  {0xe0,0xb3,0x86,0xe0,0xb3,0x96}},
    {{0xe0,0xb5,0x8a},  {0xe0,0xb5,0x86,0xe0,0xb4,0xbe}},
    {{0xe0,0xb5,0x8c},  {0xe0,0xb5,0x86,0xe0,0xb5,0x97}},
    {{0xe0,0xb5,0x8b},  {0xe0,0xb5,0x87,0xe0,0xb4,0xbe}},
    {{0xe0,0xb8,0xb3},  {0xe0,0xb9,0x8d,0xe0,0xb8,0xb2}},
    {{0xe0,0xba,0xb3},  {0xe0,0xbb,0x8d,0xe0,0xba,0xb2}},
    {{0xe0,0xbd,0xa9},  {0xe0,0xbd,0x80,0xe0,0xbe,0xb5}},
    {{0xe0,0xbd,0x83},  {0xe0,0xbd,0x82,0xe0,0xbe,0xb7}},
    {{0xe0,0xbd,0x8d},  {0xe0,0xbd,0x8c,0xe0,0xbe,0xb7}},
    {{0xe0,0xbd,0x92},  {0xe0,0xbd,0x91,0xe0,0xbe,0xb7}},
    {{0xe0,0xbd,0x97},  {0xe0,0xbd,0x96,0xe0,0xbe,0xb7}},
    {{0xe0,0xbd,0x9c},  {0xe0,0xbd,0x9b,0xe0,0xbe,0xb7}},
    {{0xe0,0xbd,0xb3},  {0xe0,0xbd,0xb2,0xe0,0xbd,0xb1}},
    {{0xe0,0xbd,0xb5},  {0xe0,0xbd,0xb4,0xe0,0xbd,0xb1}},
    {{0xe0,0xbe,0x81},  {0xe0,0xbe,0x80,0xe0,0xbd,0xb1}},
    {{0xe0,0xbe,0xb9},  {0xe0,0xbe,0x90,0xe0,0xbe,0xb5}},
    {{0xe0,0xbe,0x93},  {0xe0,0xbe,0x92,0xe0,0xbe,0xb7}},
    {{0xe0,0xbe,0x9d},  {0xe0,0xbe,0x9c,0xe0,0xbe,0xb7}},
    {{0xe0,0xbe,0xa2},  {0xe0,0xbe,0xa1,0xe0,0xbe,0xb7}},
    {{0xe0,0xbe,0xa7},  {0xe0,0xbe,0xa6,0xe0,0xbe,0xb7}},
    {{0xe0,0xbe,0xac},  {0xe0,0xbe,0xab,0xe0,0xbe,0xb7}},
    {{0xe0,0xbd,0xb6},  {0xe0,0xbe,0xb2,0xe0,0xbe,0x80}},
    {{0xe0,0xbd,0xb7},  {0xe0,0xbe,0xb2,0xe0,0xbe,0x80,0xe0,0xbd,0xb1}},
    {{0xe0,0xbd,0xb8},  {0xe0,0xbe,0xb3,0xe0,0xbe,0x80}},
    {{0xe0,0xbd,0xb9},  {0xe0,0xbe,0xb3,0xe0,0xbe,0x80,0xe0,0xbd,0xb1}},
    {{0xe1,0xbf,0x8d},  {0xe1,0xbe,0xbf,0xcc,0x80}},
    {{0xe1,0xbf,0x8e},  {0xe1,0xbe,0xbf,0xcc,0x81}},
    {{0xe1,0xbf,0x8f},  {0xe1,0xbe,0xbf,0xcd,0x82}},
    {{0xe1,0xbf,0x9d},  {0xe1,0xbf,0xbe,0xcc,0x80}},
    {{0xe1,0xbf,0x9e},  {0xe1,0xbf,0xbe,0xcc,0x81}},
    {{0xe1,0xbf,0x9f},  {0xe1,0xbf,0xbe,0xcd,0x82}},
    {{0xe3,0x82,0x94},  {0xe3,0x81,0x86,0xe3,0x82,0x99}},
    {{0xe3,0x81,0x8c},  {0xe3,0x81,0x8b,0xe3,0x82,0x99}},
    {{0xe3,0x81,0x8e},  {0xe3,0x81,0x8d,0xe3,0x82,0x99}},
    {{0xe3,0x81,0x90},  {0xe3,0x81,0x8f,0xe3,0x82,0x99}},
    {{0xe3,0x81,0x92},  {0xe3,0x81,0x91,0xe3,0x82,0x99}},
    {{0xe3,0x81,0x94},  {0xe3,0x81,0x93,0xe3,0x82,0x99}},
    {{0xe3,0x81,0x96},  {0xe3,0x81,0x95,0xe3,0x82,0x99}},
    {{0xe3,0x81,0x98},  {0xe3,0x81,0x97,0xe3,0x82,0x99}},
    {{0xe3,0x81,0x9a},  {0xe3,0x81,0x99,0xe3,0x82,0x99}},
    {{0xe3,0x81,0x9c},  {0xe3,0x81,0x9b,0xe3,0x82,0x99}},
    {{0xe3,0x81,0x9e},  {0xe3,0x81,0x9d,0xe3,0x82,0x99}},
    {{0xe3,0x81,0xa0},  {0xe3,0x81,0x9f,0xe3,0x82,0x99}},
    {{0xe3,0x81,0xa2},  {0xe3,0x81,0xa1,0xe3,0x82,0x99}},
    {{0xe3,0x81,0xa5},  {0xe3,0x81,0xa4,0xe3,0x82,0x99}},
    {{0xe3,0x81,0xa7},  {0xe3,0x81,0xa6,0xe3,0x82,0x99}},
    {{0xe3,0x81,0xa9},  {0xe3,0x81,0xa8,0xe3,0x82,0x99}},
    {{0xe3,0x81,0xb0},  {0xe3,0x81,0xaf,0xe3,0x82,0x99}},
    {{0xe3,0x81,0xb1},  {0xe3,0x81,0xaf,0xe3,0x82,0x9a}},
    {{0xe3,0x81,0xb3},  {0xe3,0x81,0xb2,0xe3,0x82,0x99}},
    {{0xe3,0x81,0xb4},  {0xe3,0x81,0xb2,0xe3,0x82,0x9a}},
    {{0xe3,0x81,0xb6},  {0xe3,0x81,0xb5,0xe3,0x82,0x99}},
    {{0xe3,0x81,0xb7},  {0xe3,0x81,0xb5,0xe3,0x82,0x9a}},
    {{0xe3,0x81,0xb9},  {0xe3,0x81,0xb8,0xe3,0x82,0x99}},
    {{0xe3,0x81,0xba},  {0xe3,0x81,0xb8,0xe3,0x82,0x9a}},
    {{0xe3,0x81,0xbc},  {0xe3,0x81,0xbb,0xe3,0x82,0x99}},
    {{0xe3,0x81,0xbd},  {0xe3,0x81,0xbb,0xe3,0x82,0x9a}},
    {{0xe3,0x82,0x9e},  {0xe3,0x82,0x9d,0xe3,0x82,0x99}},
    {{0xe3,0x83,0xb4},  {0xe3,0x82,0xa6,0xe3,0x82,0x99}},
    {{0xe3,0x82,0xac},  {0xe3,0x82,0xab,0xe3,0x82,0x99}},
    {{0xe3,0x82,0xae},  {0xe3,0x82,0xad,0xe3,0x82,0x99}},
    {{0xe3,0x82,0xb0},  {0xe3,0x82,0xaf,0xe3,0x82,0x99}},
    {{0xe3,0x82,0xb2},  {0xe3,0x82,0xb1,0xe3,0x82,0x99}},
    {{0xe3,0x82,0xb4},  {0xe3,0x82,0xb3,0xe3,0x82,0x99}},
    {{0xe3,0x82,0xb6},  {0xe3,0x82,0xb5,0xe3,0x82,0x99}},
    {{0xe3,0x82,0xb8},  {0xe3,0x82,0xb7,0xe3,0x82,0x99}},
    {{0xe3,0x82,0xba},  {0xe3,0x82,0xb9,0xe3,0x82,0x99}},
    {{0xe3,0x82,0xbc},  {0xe3,0x82,0xbb,0xe3,0x82,0x99}},
    {{0xe3,0x82,0xbe},  {0xe3,0x82,0xbd,0xe3,0x82,0x99}},
    {{0xe3,0x83,0x80},  {0xe3,0x82,0xbf,0xe3,0x82,0x99}},
    {{0xe3,0x83,0x82},  {0xe3,0x83,0x81,0xe3,0x82,0x99}},
    {{0xe3,0x83,0x85},  {0xe3,0x83,0x84,0xe3,0x82,0x99}},
    {{0xe3,0x83,0x87},  {0xe3,0x83,0x86,0xe3,0x82,0x99}},
    {{0xe3,0x83,0x89},  {0xe3,0x83,0x88,0xe3,0x82,0x99}},
    {{0xe3,0x83,0x90},  {0xe3,0x83,0x8f,0xe3,0x82,0x99}},
    {{0xe3,0x83,0x91},  {0xe3,0x83,0x8f,0xe3,0x82,0x9a}},
    {{0xe3,0x83,0x93},  {0xe3,0x83,0x92,0xe3,0x82,0x99}},
    {{0xe3,0x83,0x94},  {0xe3,0x83,0x92,0xe3,0x82,0x9a}},
    {{0xe3,0x83,0x96},  {0xe3,0x83,0x95,0xe3,0x82,0x99}},
    {{0xe3,0x83,0x97},  {0xe3,0x83,0x95,0xe3,0x82,0x9a}},
    {{0xe3,0x83,0x99},  {0xe3,0x83,0x98,0xe3,0x82,0x99}},
    {{0xe3,0x83,0x9a},  {0xe3,0x83,0x98,0xe3,0x82,0x9a}},
    {{0xe3,0x83,0x9c},  {0xe3,0x83,0x9b,0xe3,0x82,0x99}},
    {{0xe3,0x83,0x9d},  {0xe3,0x83,0x9b,0xe3,0x82,0x9a}},
    {{0xe3,0x83,0xb7},  {0xe3,0x83,0xaf,0xe3,0x82,0x99}},
    {{0xe3,0x83,0xb8},  {0xe3,0x83,0xb0,0xe3,0x82,0x99}},
    {{0xe3,0x83,0xb9},  {0xe3,0x83,0xb1,0xe3,0x82,0x99}},
    {{0xe3,0x83,0xba},  {0xe3,0x83,0xb2,0xe3,0x82,0x99}},
    {{0xe3,0x83,0xbe},  {0xe3,0x83,0xbd,0xe3,0x82,0x99}},
};
#endif /* UNICODE_NORMALIZATION */
#endif /* UTF8_INPUT_ENABLE */

#ifdef SHIFTJIS_CP932
const unsigned short shiftjis_cp932[3][189] = {
 {
  0xEEEF, 0xEEF0, 0xEEF1, 0xEEF2, 0xEEF3, 0xEEF4, 0xEEF5, 0xEEF6,
  0xEEF7, 0xEEF8, 0x8754, 0x8755, 0x8756, 0x8757, 0x8758, 0x8759,
  0x875A, 0x875B, 0x875C, 0x875D, 0x81CA, 0xEEFA, 0xEEFB, 0xEEFC,
  0x878A, 0x8782, 0x8784, 0x81E6, 0xED40, 0xED41, 0xED42, 0xED43,
  0xED44, 0xED45, 0xED46, 0xED47, 0xED48, 0xED49, 0xED4A, 0xED4B,
  0xED4C, 0xED4D, 0xED4E, 0xED4F, 0xED50, 0xED51, 0xED52, 0xED53,
  0xED54, 0xED55, 0xED56, 0xED57, 0xED58, 0xED59, 0xED5A, 0xED5B,
  0xED5C, 0xED5D, 0xED5E, 0xED5F, 0xED60, 0xED61, 0xED62,      0,
  0xED63, 0xED64, 0xED65, 0xED66, 0xED67, 0xED68, 0xED69, 0xED6A,
  0xED6B, 0xED6C, 0xED6D, 0xED6E, 0xED6F, 0xED70, 0xED71, 0xED72,
  0xED73, 0xED74, 0xED75, 0xED76, 0xED77, 0xED78, 0xED79, 0xED7A,
  0xED7B, 0xED7C, 0xED7D, 0xED7E, 0xED80, 0xED81, 0xED82, 0xED83,
  0xED84, 0xED85, 0xED86, 0xED87, 0xED88, 0xED89, 0xED8A, 0xED8B,
  0xED8C, 0xED8D, 0xED8E, 0xED8F, 0xED90, 0xED91, 0xED92, 0xED93,
  0xED94, 0xED95, 0xED96, 0xED97, 0xED98, 0xED99, 0xED9A, 0xED9B,
  0xED9C, 0xED9D, 0xED9E, 0xED9F, 0xEDA0, 0xEDA1, 0xEDA2, 0xEDA3,
  0xEDA4, 0xEDA5, 0xEDA6, 0xEDA7, 0xEDA8, 0xEDA9, 0xEDAA, 0xEDAB,
  0xEDAC, 0xEDAD, 0xEDAE, 0xEDAF, 0xEDB0, 0xEDB1, 0xEDB2, 0xEDB3,
  0xEDB4, 0xEDB5, 0xEDB6, 0xEDB7, 0xEDB8, 0xEDB9, 0xEDBA, 0xEDBB,
  0xEDBC, 0xEDBD, 0xEDBE, 0xEDBF, 0xEDC0, 0xEDC1, 0xEDC2, 0xEDC3,
  0xEDC4, 0xEDC5, 0xEDC6, 0xEDC7, 0xEDC8, 0xEDC9, 0xEDCA, 0xEDCB,
  0xEDCC, 0xEDCD, 0xEDCE, 0xEDCF, 0xEDD0, 0xEDD1, 0xEDD2, 0xEDD3,
  0xEDD4, 0xEDD5, 0xEDD6, 0xEDD7, 0xEDD8, 0xEDD9, 0xEDDA, 0xEDDB,
  0xEDDC, 0xEDDD, 0xEDDE, 0xEDDF, 0xEDE0,
 },
 {
  0xEDE1, 0xEDE2, 0xEDE3, 0xEDE4, 0xEDE5, 0xEDE6, 0xEDE7, 0xEDE8,
  0xEDE9, 0xEDEA, 0xEDEB, 0xEDEC, 0xEDED, 0xEDEE, 0xEDEF, 0xEDF0,
  0xEDF1, 0xEDF2, 0xEDF3, 0xEDF4, 0xEDF5, 0xEDF6, 0xEDF7, 0xEDF8,
  0xEDF9, 0xEDFA, 0xEDFB, 0xEDFC, 0xEE40, 0xEE41, 0xEE42, 0xEE43,
  0xEE44, 0xEE45, 0xEE46, 0xEE47, 0xEE48, 0xEE49, 0xEE4A, 0xEE4B,
  0xEE4C, 0xEE4D, 0xEE4E, 0xEE4F, 0xEE50, 0xEE51, 0xEE52, 0xEE53,
  0xEE54, 0xEE55, 0xEE56, 0xEE57, 0xEE58, 0xEE59, 0xEE5A, 0xEE5B,
  0xEE5C, 0xEE5D, 0xEE5E, 0xEE5F, 0xEE60, 0xEE61, 0xEE62,      0,
  0xEE63, 0xEE64, 0xEE65, 0xEE66, 0xEE67, 0xEE68, 0xEE69, 0xEE6A,
  0xEE6B, 0xEE6C, 0xEE6D, 0xEE6E, 0xEE6F, 0xEE70, 0xEE71, 0xEE72,
  0xEE73, 0xEE74, 0xEE75, 0xEE76, 0xEE77, 0xEE78, 0xEE79, 0xEE7A,
  0xEE7B, 0xEE7C, 0xEE7D, 0xEE7E, 0xEE80, 0xEE81, 0xEE82, 0xEE83,
  0xEE84, 0xEE85, 0xEE86, 0xEE87, 0xEE88, 0xEE89, 0xEE8A, 0xEE8B,
  0xEE8C, 0xEE8D, 0xEE8E, 0xEE8F, 0xEE90, 0xEE91, 0xEE92, 0xEE93,
  0xEE94, 0xEE95, 0xEE96, 0xEE97, 0xEE98, 0xEE99, 0xEE9A, 0xEE9B,
  0xEE9C, 0xEE9D, 0xEE9E, 0xEE9F, 0xEEA0, 0xEEA1, 0xEEA2, 0xEEA3,
  0xEEA4, 0xEEA5, 0xEEA6, 0xEEA7, 0xEEA8, 0xEEA9, 0xEEAA, 0xEEAB,
  0xEEAC, 0xEEAD, 0xEEAE, 0xEEAF, 0xEEB0, 0xEEB1, 0xEEB2, 0xEEB3,
  0xEEB4, 0xEEB5, 0xEEB6, 0xEEB7, 0xEEB8, 0xEEB9, 0xEEBA, 0xEEBB,
  0xEEBC, 0xEEBD, 0xEEBE, 0xEEBF, 0xEEC0, 0xEEC1, 0xEEC2, 0xEEC3,
  0xEEC4, 0xEEC5, 0xEEC6, 0xEEC7, 0xEEC8, 0xEEC9, 0xEECA, 0xEECB,
  0xEECC, 0xEECD, 0xEECE, 0xEECF, 0xEED0, 0xEED1, 0xEED2, 0xEED3,
  0xEED4, 0xEED5, 0xEED6, 0xEED7, 0xEED8, 0xEED9, 0xEEDA, 0xEEDB,
  0xEEDC, 0xEEDD, 0xEEDE, 0xEEDF, 0xEEE0,
 },
 {
  0xEEE1, 0xEEE2, 0xEEE3, 0xEEE4, 0xEEE5, 0xEEE6, 0xEEE7, 0xEEE8,
  0xEEE9, 0xEEEA, 0xEEEB, 0xEEEC,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,
 },
};
const unsigned short cp932inv[2][189] = {
 {
  0xFA5C, 0xFA5D, 0xFA5E, 0xFA5F, 0xFA60, 0xFA61, 0xFA62, 0xFA63,
  0xFA64, 0xFA65, 0xFA66, 0xFA67, 0xFA68, 0xFA69, 0xFA6A, 0xFA6B,
  0xFA6C, 0xFA6D, 0xFA6E, 0xFA6F, 0xFA70, 0xFA71, 0xFA72, 0xFA73,
  0xFA74, 0xFA75, 0xFA76, 0xFA77, 0xFA78, 0xFA79, 0xFA7A, 0xFA7B,
  0xFA7C, 0xFA7D, 0xFA7E, 0xFA80, 0xFA81, 0xFA82, 0xFA83, 0xFA84,
  0xFA85, 0xFA86, 0xFA87, 0xFA88, 0xFA89, 0xFA8A, 0xFA8B, 0xFA8C,
  0xFA8D, 0xFA8E, 0xFA8F, 0xFA90, 0xFA91, 0xFA92, 0xFA93, 0xFA94,
  0xFA95, 0xFA96, 0xFA97, 0xFA98, 0xFA99, 0xFA9A, 0xFA9B,      0,
  0xFA9C, 0xFA9D, 0xFA9E, 0xFA9F, 0xFAA0, 0xFAA1, 0xFAA2, 0xFAA3,
  0xFAA4, 0xFAA5, 0xFAA6, 0xFAA7, 0xFAA8, 0xFAA9, 0xFAAA, 0xFAAB,
  0xFAAC, 0xFAAD, 0xFAAE, 0xFAAF, 0xFAB0, 0xFAB1, 0xFAB2, 0xFAB3,
  0xFAB4, 0xFAB5, 0xFAB6, 0xFAB7, 0xFAB8, 0xFAB9, 0xFABA, 0xFABB,
  0xFABC, 0xFABD, 0xFABE, 0xFABF, 0xFAC0, 0xFAC1, 0xFAC2, 0xFAC3,
  0xFAC4, 0xFAC5, 0xFAC6, 0xFAC7, 0xFAC8, 0xFAC9, 0xFACA, 0xFACB,
  0xFACC, 0xFACD, 0xFACE, 0xFACF, 0xFAD0, 0xFAD1, 0xFAD2, 0xFAD3,
  0xFAD4, 0xFAD5, 0xFAD6, 0xFAD7, 0xFAD8, 0xFAD9, 0xFADA, 0xFADB,
  0xFADC, 0xFADD, 0xFADE, 0xFADF, 0xFAE0, 0xFAE1, 0xFAE2, 0xFAE3,
  0xFAE4, 0xFAE5, 0xFAE6, 0xFAE7, 0xFAE8, 0xFAE9, 0xFAEA, 0xFAEB,
  0xFAEC, 0xFAED, 0xFAEE, 0xFAEF, 0xFAF0, 0xFAF1, 0xFAF2, 0xFAF3,
  0xFAF4, 0xFAF5, 0xFAF6, 0xFAF7, 0xFAF8, 0xFAF9, 0xFAFA, 0xFAFB,
  0xFAFC, 0xFB40, 0xFB41, 0xFB42, 0xFB43, 0xFB44, 0xFB45, 0xFB46,
  0xFB47, 0xFB48, 0xFB49, 0xFB4A, 0xFB4B, 0xFB4C, 0xFB4D, 0xFB4E,
  0xFB4F, 0xFB50, 0xFB51, 0xFB52, 0xFB53, 0xFB54, 0xFB55, 0xFB56,
  0xFB57, 0xFB58, 0xFB59, 0xFB5A, 0xFB5B,
 },
 {
  0xFB5C, 0xFB5D, 0xFB5E, 0xFB5F, 0xFB60, 0xFB61, 0xFB62, 0xFB63,
  0xFB64, 0xFB65, 0xFB66, 0xFB67, 0xFB68, 0xFB69, 0xFB6A, 0xFB6B,
  0xFB6C, 0xFB6D, 0xFB6E, 0xFB6F, 0xFB70, 0xFB71, 0xFB72, 0xFB73,
  0xFB74, 0xFB75, 0xFB76, 0xFB77, 0xFB78, 0xFB79, 0xFB7A, 0xFB7B,
  0xFB7C, 0xFB7D, 0xFB7E, 0xFB80, 0xFB81, 0xFB82, 0xFB83, 0xFB84,
  0xFB85, 0xFB86, 0xFB87, 0xFB88, 0xFB89, 0xFB8A, 0xFB8B, 0xFB8C,
  0xFB8D, 0xFB8E, 0xFB8F, 0xFB90, 0xFB91, 0xFB92, 0xFB93, 0xFB94,
  0xFB95, 0xFB96, 0xFB97, 0xFB98, 0xFB99, 0xFB9A, 0xFB9B,      0,
  0xFB9C, 0xFB9D, 0xFB9E, 0xFB9F, 0xFBA0, 0xFBA1, 0xFBA2, 0xFBA3,
  0xFBA4, 0xFBA5, 0xFBA6, 0xFBA7, 0xFBA8, 0xFBA9, 0xFBAA, 0xFBAB,
  0xFBAC, 0xFBAD, 0xFBAE, 0xFBAF, 0xFBB0, 0xFBB1, 0xFBB2, 0xFBB3,
  0xFBB4, 0xFBB5, 0xFBB6, 0xFBB7, 0xFBB8, 0xFBB9, 0xFBBA, 0xFBBB,
  0xFBBC, 0xFBBD, 0xFBBE, 0xFBBF, 0xFBC0, 0xFBC1, 0xFBC2, 0xFBC3,
  0xFBC4, 0xFBC5, 0xFBC6, 0xFBC7, 0xFBC8, 0xFBC9, 0xFBCA, 0xFBCB,
  0xFBCC, 0xFBCD, 0xFBCE, 0xFBCF, 0xFBD0, 0xFBD1, 0xFBD2, 0xFBD3,
  0xFBD4, 0xFBD5, 0xFBD6, 0xFBD7, 0xFBD8, 0xFBD9, 0xFBDA, 0xFBDB,
  0xFBDC, 0xFBDD, 0xFBDE, 0xFBDF, 0xFBE0, 0xFBE1, 0xFBE2, 0xFBE3,
  0xFBE4, 0xFBE5, 0xFBE6, 0xFBE7, 0xFBE8, 0xFBE9, 0xFBEA, 0xFBEB,
  0xFBEC, 0xFBED, 0xFBEE, 0xFBEF, 0xFBF0, 0xFBF1, 0xFBF2, 0xFBF3,
  0xFBF4, 0xFBF5, 0xFBF6, 0xFBF7, 0xFBF8, 0xFBF9, 0xFBFA, 0xFBFB,
  0xFBFC, 0xFC40, 0xFC41, 0xFC42, 0xFC43, 0xFC44, 0xFC45, 0xFC46,
  0xFC47, 0xFC48, 0xFC49, 0xFC4A, 0xFC4B,      0,      0, 0xFA40,
  0xFA41, 0xFA42, 0xFA43, 0xFA44, 0xFA45, 0xFA46, 0xFA47, 0xFA48,
  0xFA49,      0, 0xFA55, 0xFA56, 0xFA57,
 },
};
#endif /* SHIFTJIS_CP932 */

#ifdef X0212_ENABLE
const unsigned short shiftjis_x0212[3][189] = {
 {
  0xF373, 0xF374, 0xF375, 0xF376, 0xF377, 0xF378, 0xF379, 0xF37A,
  0xF37B, 0xF37C, 0xF37D, 0xF37E, 0xF421, 0xF422, 0xF423, 0xF424,
  0xF425, 0xF426, 0xF427, 0xF428, 0x224C, 0xA243, 0xF429, 0xF42A,
  0xF42B, 0xF42C, 0xF42D, 0x2268, 0xD463, 0xDC5F, 0xE469, 0xE378,
  0xD921, 0xB13B, 0xF42E, 0xC22D, 0xC37C, 0xE450, 0xC23F, 0xBC74,
  0xB029, 0xB048, 0xF42F, 0xB052, 0xB054, 0xB063, 0xB06E, 0xB127,
  0xB123, 0xB12C, 0xB129, 0xB13E, 0xB15F, 0xB158, 0xB148, 0xB157,
  0xB163, 0xB174, 0xB161, 0xB223, 0xF430, 0xB23B, 0xB266,      0,
  0xB26D, 0xB275, 0xB27C, 0xF431, 0xB335, 0xB358, 0xB35B, 0xB365,
  0xB36E, 0xB37B, 0xF432, 0xF433, 0xB440, 0xB447, 0xB450, 0xB45E,
  0xF434, 0xB52A, 0xF435, 0xB52F, 0xB544, 0xB568, 0xF436, 0xB742,
  0xB764, 0xB768, 0xB767, 0xF437, 0xF438, 0xF439, 0xB84E, 0xB861,
  0xB875, 0xB877, 0xB878, 0xB87C, 0xB92F, 0xB937, 0xBA3E, 0xBA5B,
  0xCD2A, 0xBA61, 0xF43A, 0xBA6B, 0xBB33, 0xBB38, 0xF43B, 0xBB4A,
  0xF43C, 0xF43D, 0xBB50, 0xBB5E, 0xBB74, 0xBB75, 0xBB79, 0xBC64,
  0xBC6D, 0xBC7E, 0xF43E, 0xBD42, 0xBD67, 0xF43F, 0xBD70, 0xBE30,
  0xBE2C, 0xF440, 0xBE33, 0xBE3D, 0xBE4D, 0xBE49, 0xBE64, 0xBF28,
  0xBF49, 0xC044, 0xC064, 0xC074, 0xC126, 0xF441, 0xC175, 0xC17C,
  0xF442, 0xC178, 0xC22B, 0xC221, 0xC225, 0xF443, 0xC238, 0xC23A,
  0xF444, 0xC244, 0xC252, 0xC257, 0xC25B, 0xC25E, 0xC26D, 0xC270,
  0xF445, 0xC321, 0xC335, 0xC349, 0xC339, 0xF446, 0xC358, 0xC37E,
  0xF447, 0xC44C, 0xF448, 0xC459, 0xC46A, 0xC47D, 0xF449, 0xC527,
  0xC535, 0xC536, 0xF44A, 0xC555, 0xC638, 0xC657, 0xC660, 0xC66A,
  0xC663, 0xC721, 0xC72B, 0xC747, 0xC743,
 },
 {
  0xC74B, 0xC74F, 0xC759, 0xF44B, 0xF44C, 0xC766, 0xC76E, 0xC77C,
  0xC76B, 0xC770, 0xC831, 0xC865, 0xC878, 0xC926, 0xC92B, 0xC92D,
  0xF44D, 0xC94A, 0xC953, 0xC969, 0xC963, 0xC97C, 0xC974, 0xC975,
  0xF44E, 0xCA33, 0xCA3D, 0xCA6F, 0xCA71, 0xCB2E, 0xF44F, 0xCB4A,
  0xCB66, 0xCB6A, 0xCB70, 0xCB74, 0xCB6E, 0xCC25, 0xCB79, 0xCC2B,
  0xCC2E, 0xCC2D, 0xCC32, 0xCC42, 0xCC50, 0xCC59, 0xF450, 0xCD3B,
  0xF451, 0xCE3B, 0xF452, 0xCE3A, 0xCE43, 0xF453, 0xCE72, 0xB35D,
  0xCF55, 0xCF62, 0xCF69, 0xCF6D, 0xF454, 0xF455, 0xF456,      0,
  0xF457, 0xD065, 0xF458, 0xD069, 0xD168, 0xF459, 0xF45A, 0xD16C,
  0xD23B, 0xF45B, 0xD361, 0xD368, 0xD427, 0xF45C, 0xF45D, 0xD454,
  0xD472, 0xD52E, 0xF45E, 0xD75E, 0xF45F, 0xD822, 0xD837, 0xD841,
  0xD851, 0xD874, 0xD946, 0xD948, 0xD951, 0xF460, 0xF461, 0xF462,
  0xF463, 0xF464, 0xDC53, 0xDD48, 0xDD54, 0xDD6A, 0xDD7A, 0xDE24,
  0xDE30, 0xF465, 0xDE35, 0xDE4B, 0xF466, 0xDF39, 0xF467, 0xDF43,
  0xF468, 0xF469, 0xE059, 0xF46A, 0xF46B, 0xE162, 0xF46C, 0xF46D,
  0xF46E, 0xE247, 0xE328, 0xE326, 0xE329, 0xE32F, 0xE330, 0xE32A,
  0xE32B, 0xE33C, 0xE341, 0xE33F, 0xE355, 0xE358, 0xE356, 0xE35F,
  0xE363, 0xE361, 0xE354, 0xE369, 0xE426, 0xE371, 0xE372, 0xE44B,
  0xE441, 0xE443, 0xE43E, 0xF46F, 0xE440, 0xE447, 0xE43F, 0xE460,
  0xE45E, 0xE451, 0xF470, 0xE45C, 0xE452, 0xE45B, 0xE454, 0xE47A,
  0xE46F, 0xE533, 0xE53F, 0xE549, 0xE550, 0xE562, 0xE56A, 0xE56B,
  0xF471, 0xF472, 0xF473, 0xE668, 0xE66F, 0xE72C, 0xF474, 0xE72E,
  0xF475, 0xE731, 0xF476, 0xE732, 0xE831, 0xE836, 0xF477, 0xF478,
  0xE85D, 0xF479, 0xF47A, 0xE951, 0xF47B,
 },
 {
  0xE96D, 0xEA4D, 0xF47C, 0xEA5B, 0xEA66, 0xEA6A, 0xEB25, 0xEB7B,
  0xEB7A, 0xF47D, 0xEC56, 0xF47E,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,
 },
};

const unsigned short x0212_shiftjis_A2[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0xFA55,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_B0[] = {
              0,      0,      0,      0,      0,      0,      0,
      0, 0xFA68,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0xFA69,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0xFA6B,      0, 0xFA6C,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0xFA6D,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0xFA6E,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_B1[] = {
              0,      0, 0xFA70,      0,      0,      0, 0xFA6F,
      0, 0xFA72,      0,      0, 0xFA71,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0xFA61,      0,      0, 0xFA73,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0xFA76,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0xFA77,
 0xFA75,      0,      0,      0,      0,      0,      0, 0xFA74,
      0, 0xFA7A,      0, 0xFA78,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0xFA79,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_B2[] = {
              0,      0, 0xFA7B,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0xFA7D,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0xFA7E,      0,
      0,      0,      0,      0,      0, 0xFA80,      0,      0,
      0,      0,      0,      0,      0, 0xFA81,      0,      0,
      0,      0,      0,      0, 0xFA82,      0,      0,
};
const unsigned short x0212_shiftjis_B3[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0xFA84,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0xFA85,      0,      0, 0xFA86,      0, 0xFB77,      0,      0,
      0,      0,      0,      0,      0, 0xFA87,      0,      0,
      0,      0,      0,      0,      0,      0, 0xFA88,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0xFA89,      0,      0,      0,
};
const unsigned short x0212_shiftjis_B4[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0xFA8C,      0,      0,      0,      0,      0,      0, 0xFA8D,
      0,      0,      0,      0,      0,      0,      0,      0,
 0xFA8E,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0xFA8F,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_B5[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0, 0xFA91,      0,      0,      0,      0, 0xFA93,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0xFA94,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0xFA95,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_B7[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0xFA97,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0xFA98,      0,      0, 0xFA9A,
 0xFA99,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_B8[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0xFA9E,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0xFA9F,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0xFAA0,      0, 0xFAA1,
 0xFAA2,      0,      0,      0, 0xFAA3,      0,      0,
};
const unsigned short x0212_shiftjis_B9[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0xFAA4,
      0,      0,      0,      0,      0,      0,      0, 0xFAA5,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_BA[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0xFAA6,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0xFAA7,      0,      0,      0,      0,
      0, 0xFAA9,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0xFAAB,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_BB[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0xFAAC,      0,      0,      0,      0,
 0xFAAD,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0xFAAF,      0,      0,      0,      0,      0,
 0xFAB2,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0xFAB3,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0xFAB4, 0xFAB5,      0,      0,
      0, 0xFAB6,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_BC[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0xFAB7,      0,      0,      0,
      0,      0,      0,      0,      0, 0xFAB8,      0,      0,
      0,      0,      0,      0, 0xFA67,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0xFAB9,
};
const unsigned short x0212_shiftjis_BD[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0xFABB,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0xFABC,
      0,      0,      0,      0,      0,      0,      0,      0,
 0xFABE,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_BE[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0xFAC0,      0,      0,      0,
 0xFABF,      0,      0, 0xFAC2,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0xFAC3,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0xFAC5,      0,      0,      0, 0xFAC4,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0xFAC6,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_BF[] = {
              0,      0,      0,      0,      0,      0,      0,
 0xFAC7,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0xFAC8,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_C0[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0xFAC9,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0xFACA,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0xFACB,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_C1[] = {
              0,      0,      0,      0,      0, 0xFACC,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0xFACE,      0,      0,
 0xFAD1,      0,      0,      0, 0xFACF,      0,      0,
};
const unsigned short x0212_shiftjis_C2[] = {
         0xFAD3,      0,      0,      0, 0xFAD4,      0,      0,
      0,      0,      0, 0xFAD2,      0, 0xFA63,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0xFAD6,      0, 0xFAD7,      0,      0,      0,      0, 0xFA66,
      0,      0,      0,      0, 0xFAD9,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0xFADA,      0,      0,      0,      0, 0xFADB,
      0,      0,      0, 0xFADC,      0,      0, 0xFADD,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0xFADE,      0,      0,
 0xFADF,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_C3[] = {
         0xFAE1,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0xFAE2,      0,      0,
      0, 0xFAE4,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0xFAE3,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0xFAE6,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0xFA64,      0, 0xFAE7,
};
const unsigned short x0212_shiftjis_C4[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0xFAE9,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0xFAEB,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0xFAEC,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0xFAED,      0,
};
const unsigned short x0212_shiftjis_C5[] = {
              0,      0,      0,      0,      0,      0, 0xFAEF,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0xFAF0, 0xFAF1,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0xFAF3,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_C6[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0xFAF4,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0xFAF5,
      0,      0,      0,      0,      0,      0,      0,      0,
 0xFAF6,      0,      0, 0xFAF8,      0,      0,      0,      0,
      0,      0, 0xFAF7,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_C7[] = {
         0xFAF9,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0xFAFA,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0xFAFC,      0,      0,      0, 0xFAFB,
      0,      0,      0, 0xFB40,      0,      0,      0, 0xFB41,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0xFB42,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0xFB45,      0,
      0,      0,      0, 0xFB48,      0,      0, 0xFB46,      0,
 0xFB49,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0xFB47,      0,      0,
};
const unsigned short x0212_shiftjis_C8[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0xFB4A,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0xFB4B,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0xFB4C,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_C9[] = {
              0,      0,      0,      0,      0, 0xFB4D,      0,
      0,      0,      0, 0xFB4E,      0, 0xFB4F,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0xFB51,      0,      0,      0,      0,      0,
      0,      0,      0, 0xFB52,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0xFB54,      0,      0,      0,      0,
      0, 0xFB53,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0xFB56, 0xFB57,      0,      0,
      0,      0,      0,      0, 0xFB55,      0,      0,
};
const unsigned short x0212_shiftjis_CA[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0xFB59,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0xFB5A,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0xFB5B,
      0, 0xFB5C,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_CB[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0xFB5D,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0xFB5F,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0xFB60,      0,
      0,      0, 0xFB61,      0,      0,      0, 0xFB64,      0,
 0xFB62,      0,      0,      0, 0xFB63,      0,      0,      0,
      0, 0xFB66,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_CC[] = {
              0,      0,      0,      0, 0xFB65,      0,      0,
      0,      0,      0, 0xFB67,      0, 0xFB69, 0xFB68,      0,
      0,      0, 0xFB6A,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0xFB6B,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0xFB6C,      0,      0,      0,      0,      0,      0,      0,
      0, 0xFB6D,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_CD[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0, 0xFAA8,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0xFB6F,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_CE[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0xFB73, 0xFB71,      0,      0,      0,      0,
      0,      0,      0, 0xFB74,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0xFB76,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_CF[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0xFB78,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0xFB79,      0,      0,      0,      0,      0,
      0, 0xFB7A,      0,      0,      0, 0xFB7B,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_D0[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0xFB81,      0,      0,
      0, 0xFB83,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_D1[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0xFB84,      0,      0,      0, 0xFB87,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_D2[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0xFB88,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_D3[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0xFB8A,      0,      0,      0,      0,      0,      0,
 0xFB8B,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_D4[] = {
              0,      0,      0,      0,      0,      0, 0xFB8C,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0xFB8F,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0xFA5C,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0xFB90,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_D5[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0xFB91,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_D7[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0xFB93,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_D8[] = {
              0, 0xFB95,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0xFB96,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0xFB97,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0xFB98,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0xFB99,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_D9[] = {
         0xFA60,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0xFB9A,      0,
 0xFB9B,      0,      0,      0,      0,      0,      0,      0,
      0, 0xFB9C,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_DC[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0xFBA2,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0xFA5D,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_DD[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0xFBA3,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0xFBA4,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0xFBA5,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0xFBA6,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_DE[] = {
              0,      0,      0, 0xFBA7,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0xFBA8,      0,      0,      0,      0, 0xFBAA,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0xFBAB,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_DF[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0xFBAD,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0xFBAF,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_E0[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0xFBB2,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_E1[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0xFBB5,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_E2[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0xFBB9,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_E3[] = {
              0,      0,      0,      0,      0, 0xFBBB,      0,
 0xFBBA, 0xFBBC, 0xFBBF, 0xFBC0,      0,      0,      0, 0xFBBD,
 0xFBBE,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0xFBC1,      0,      0, 0xFBC3,
      0, 0xFBC2,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0xFBCA, 0xFBC4, 0xFBC6,      0,
 0xFBC5,      0,      0,      0,      0,      0,      0, 0xFBC7,
      0, 0xFBC9,      0, 0xFBC8,      0,      0,      0,      0,
      0, 0xFBCB,      0,      0,      0,      0,      0,      0,
      0, 0xFBCD, 0xFBCE,      0,      0,      0,      0,      0,
 0xFA5F,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_E4[] = {
              0,      0,      0,      0,      0, 0xFBCC,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0xFBD2, 0xFBD6,
 0xFBD4, 0xFBD0,      0, 0xFBD1,      0,      0,      0, 0xFBD5,
      0,      0,      0, 0xFBCF,      0,      0,      0,      0,
 0xFA65, 0xFBD9, 0xFBDC,      0, 0xFBDE,      0,      0,      0,
      0,      0,      0, 0xFBDD, 0xFBDB,      0, 0xFBD8,      0,
 0xFBD7,      0,      0,      0,      0,      0,      0,      0,
      0, 0xFA5E,      0,      0,      0,      0,      0, 0xFBE0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0xFBDF,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_E5[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0xFBE1,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0, 0xFBE2,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0xFBE3,      0,      0,      0,      0,      0,      0,
 0xFBE4,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0xFBE5,      0,      0,      0,      0,      0,
      0,      0, 0xFBE6, 0xFBE7,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_E6[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
 0xFBEB,      0,      0,      0,      0,      0,      0, 0xFBEC,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_E7[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0, 0xFBED,      0, 0xFBEF,      0,
      0, 0xFBF1, 0xFBF3,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_E8[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0xFBF4,      0,      0,      0,      0, 0xFBF5,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0xFBF8,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_E9[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0, 0xFBFB,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0xFC40,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_EA[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0, 0xFC41,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0xFC43,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0xFC44,      0,
      0,      0, 0xFC45,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_EB[] = {
              0,      0,      0,      0, 0xFC46,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0, 0xFC48, 0xFC47,      0,      0,      0,
};
const unsigned short x0212_shiftjis_EC[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0, 0xFC4A,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,
};
const unsigned short x0212_shiftjis_F3[] = {
              0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0,      0,      0,      0,      0,      0,
      0,      0,      0, 0xFA40, 0xFA41, 0xFA42, 0xFA43, 0xFA44,
 0xFA45, 0xFA46, 0xFA47, 0xFA48, 0xFA49, 0xFA4A, 0xFA4B,
};
const unsigned short x0212_shiftjis_F4[] = {
         0xFA4C, 0xFA4D, 0xFA4E, 0xFA4F, 0xFA50, 0xFA51, 0xFA52,
 0xFA53, 0xFA56, 0xFA57, 0xFA58, 0xFA59, 0xFA5A, 0xFA62, 0xFA6A,
 0xFA7C, 0xFA83, 0xFA8A, 0xFA8B, 0xFA90, 0xFA92, 0xFA96, 0xFA9B,
 0xFA9C, 0xFA9D, 0xFAAA, 0xFAAE, 0xFAB0, 0xFAB1, 0xFABA, 0xFABD,
 0xFAC1, 0xFACD, 0xFAD0, 0xFAD5, 0xFAD8, 0xFAE0, 0xFAE5, 0xFAE8,
 0xFAEA, 0xFAEE, 0xFAF2, 0xFB43, 0xFB44, 0xFB50, 0xFB58, 0xFB5E,
 0xFB6E, 0xFB70, 0xFB72, 0xFB75, 0xFB7C, 0xFB7D, 0xFB7E, 0xFB80,
 0xFB82, 0xFB85, 0xFB86, 0xFB89, 0xFB8D, 0xFB8E, 0xFB92, 0xFB94,
 0xFB9D, 0xFB9E, 0xFB9F, 0xFBA0, 0xFBA1, 0xFBA9, 0xFBAC, 0xFBAE,
 0xFBB0, 0xFBB1, 0xFBB3, 0xFBB4, 0xFBB6, 0xFBB7, 0xFBB8, 0xFBD3,
 0xFBDA, 0xFBE8, 0xFBE9, 0xFBEA, 0xFBEE, 0xFBF0, 0xFBF2, 0xFBF6,
 0xFBF7, 0xFBF9, 0xFBFA, 0xFBFC, 0xFC42, 0xFC49, 0xFC4B,
};
const unsigned short *const x0212_shiftjis[] = {
                                    0, x0212_shiftjis_A2,                 0,
                 0,                 0,                 0,                 0,
                 0,                 0,                 0,                 0,
                 0,                 0,                 0,                 0,
 x0212_shiftjis_B0, x0212_shiftjis_B1, x0212_shiftjis_B2, x0212_shiftjis_B3,
 x0212_shiftjis_B4, x0212_shiftjis_B5,                 0, x0212_shiftjis_B7,
 x0212_shiftjis_B8, x0212_shiftjis_B9, x0212_shiftjis_BA, x0212_shiftjis_BB,
 x0212_shiftjis_BC, x0212_shiftjis_BD, x0212_shiftjis_BE, x0212_shiftjis_BF,
 x0212_shiftjis_C0, x0212_shiftjis_C1, x0212_shiftjis_C2, x0212_shiftjis_C3,
 x0212_shiftjis_C4, x0212_shiftjis_C5, x0212_shiftjis_C6, x0212_shiftjis_C7,
 x0212_shiftjis_C8, x0212_shiftjis_C9, x0212_shiftjis_CA, x0212_shiftjis_CB,
 x0212_shiftjis_CC, x0212_shiftjis_CD, x0212_shiftjis_CE, x0212_shiftjis_CF,
 x0212_shiftjis_D0, x0212_shiftjis_D1, x0212_shiftjis_D2, x0212_shiftjis_D3,
 x0212_shiftjis_D4, x0212_shiftjis_D5,                 0, x0212_shiftjis_D7,
 x0212_shiftjis_D8, x0212_shiftjis_D9,                 0,                 0,
 x0212_shiftjis_DC, x0212_shiftjis_DD, x0212_shiftjis_DE, x0212_shiftjis_DF,
 x0212_shiftjis_E0, x0212_shiftjis_E1, x0212_shiftjis_E2, x0212_shiftjis_E3,
 x0212_shiftjis_E4, x0212_shiftjis_E5, x0212_shiftjis_E6, x0212_shiftjis_E7,
 x0212_shiftjis_E8, x0212_shiftjis_E9, x0212_shiftjis_EA, x0212_shiftjis_EB,
 x0212_shiftjis_EC,                 0,                 0,                 0,
                 0,                 0,                 0, x0212_shiftjis_F3,
 x0212_shiftjis_F4,                 0,                 0,                 0,
                 0,                 0,                 0,                 0,
                 0,                 0,                 0,
};
#endif /* X0212_ENABLE */
;
/* [<][>][^][v][top][bottom][index] [help] */


ext/openssl/openssl_missing.c

root/ext/openssl/openssl_missing.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. HMAC_CTX_copy
  2. X509_STORE_set_ex_data
  3. X509_STORE_get_ex_data
  4. EVP_MD_CTX_create
  5. EVP_MD_CTX_cleanup
  6. EVP_MD_CTX_destroy
  7. EVP_MD_CTX_init
  8. HMAC_CTX_init
  9. HMAC_CTX_cleanup
  10. EVP_CIPHER_CTX_copy
  11. X509_CRL_set_version
  12. X509_CRL_set_issuer_name
  13. X509_CRL_sort
  14. OSSL_X509_REVOKED_cmp
  15. X509_CRL_add0_revoked
  16. BN_mod_sqr
  17. BN_nnmod
  18. BN_mod_add
  19. BN_mod_sub
  20. bn_rand_range
  21. BN_rand_range
  22. BN_pseudo_rand_range
  23. CONF_get1_default_config_file
  24. PEM_def_callback
/*
 * $Id: openssl_missing.c,v 1.5 2005/07/26 03:59:39 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ST_ENGINE)
# include <openssl/engine.h>
#endif
#include <openssl/x509_vfy.h>

#if !defined(OPENSSL_NO_HMAC)
#include <string.h> /* memcpy() */
#include <openssl/hmac.h>

#if !defined(HAVE_HMAC_CTX_COPY)
int
HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in)
{
    if (!out || !in) return 0;
    memcpy(out, in, sizeof(HMAC_CTX));

    if (!EVP_MD_CTX_copy(&out->md_ctx, &in->md_ctx)
            || !EVP_MD_CTX_copy(&out->i_ctx, &in->i_ctx)
            || !EVP_MD_CTX_copy(&out->o_ctx, &in->o_ctx))
        return 0;
    return 1;
}
#endif /* HAVE_HMAC_CTX_COPY */
#endif /* NO_HMAC */

#if !defined(HAVE_X509_STORE_SET_EX_DATA)

int X509_STORE_set_ex_data(X509_STORE *str, int idx, void *data)
{
    return CRYPTO_set_ex_data(&str->ex_data, idx, data);
}

void *X509_STORE_get_ex_data(X509_STORE *str, int idx)
{
    return CRYPTO_get_ex_data(&str->ex_data, idx);
}
#endif

#if !defined(HAVE_EVP_MD_CTX_CREATE)
EVP_MD_CTX *
EVP_MD_CTX_create(void)
{
    EVP_MD_CTX *ctx = OPENSSL_malloc(sizeof(EVP_MD_CTX));
    if (!ctx) return NULL;

    memset(ctx, 0, sizeof(EVP_MD_CTX));

    return ctx;
}
#endif

#if !defined(HAVE_EVP_MD_CTX_CLEANUP)
int
EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx)
{
    /* FIXME!!! */
    memset(ctx, 0, sizeof(EVP_MD_CTX));

    return 1;
}
#endif

#if !defined(HAVE_EVP_MD_CTX_DESTROY)
void
EVP_MD_CTX_destroy(EVP_MD_CTX *ctx)
{
    EVP_MD_CTX_cleanup(ctx);
    OPENSSL_free(ctx);
}
#endif

#if !defined(HAVE_EVP_MD_CTX_INIT)
void
EVP_MD_CTX_init(EVP_MD_CTX *ctx)
{
    memset(ctx, 0, sizeof(EVP_MD_CTX));
}
#endif

#if !defined(HAVE_HMAC_CTX_INIT)
void
HMAC_CTX_init(HMAC_CTX *ctx)
{
    EVP_MD_CTX_init(&ctx->i_ctx);
    EVP_MD_CTX_init(&ctx->o_ctx);
    EVP_MD_CTX_init(&ctx->md_ctx);
}
#endif

#if !defined(HAVE_HMAC_CTX_CLEANUP)
void
HMAC_CTX_cleanup(HMAC_CTX *ctx)
{
    EVP_MD_CTX_cleanup(&ctx->i_ctx);
    EVP_MD_CTX_cleanup(&ctx->o_ctx);
    EVP_MD_CTX_cleanup(&ctx->md_ctx);
    memset(ctx, 0, sizeof(HMAC_CTX));
}
#endif

#if !defined(HAVE_EVP_CIPHER_CTX_COPY)
/*
 * this function does not exist in OpenSSL yet... or ever?.
 * a future version may break this function.
 * tested on 0.9.7d.
 */
int
EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, EVP_CIPHER_CTX *in)
{
    memcpy(out, in, sizeof(EVP_CIPHER_CTX));

#if defined(HAVE_ENGINE_ADD) && defined(HAVE_ST_ENGINE)
    if (in->engine) ENGINE_add(out->engine);
    if (in->cipher_data) {
        out->cipher_data = OPENSSL_malloc(in->cipher->ctx_size);
        memcpy(out->cipher_data, in->cipher_data, in->cipher->ctx_size);
    }
#endif

    return 1;
}
#endif

#if !defined(HAVE_X509_CRL_SET_VERSION)
int
X509_CRL_set_version(X509_CRL *x, long version)
{
    if (x == NULL || x->crl == NULL) return 0;
    if (x->crl->version == NULL) {
        x->crl->version = M_ASN1_INTEGER_new();
        if (x->crl->version == NULL) return 0;
    }
    return ASN1_INTEGER_set(x->crl->version, version);
}
#endif

#if !defined(HAVE_X509_CRL_SET_ISSUER_NAME)
int
X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name)
{
    if (x == NULL || x->crl == NULL) return 0;
    return X509_NAME_set(&x->crl->issuer, name);
}
#endif

#if !defined(HAVE_X509_CRL_SORT)
int
X509_CRL_sort(X509_CRL *c)
{
    int i;
    X509_REVOKED *r;
    /* sort the data so it will be written in serial
     * number order */
    sk_X509_REVOKED_sort(c->crl->revoked);
    for (i=0; i<sk_X509_REVOKED_num(c->crl->revoked); i++) {
        r=sk_X509_REVOKED_value(c->crl->revoked, i);
        r->sequence=i;
    }
    return 1;
}
#endif

#if !defined(HAVE_X509_CRL_ADD0_REVOKED)
static int
OSSL_X509_REVOKED_cmp(const X509_REVOKED * const *a, const X509_REVOKED * const *b)
{
    return(ASN1_STRING_cmp(
                (ASN1_STRING *)(*a)->serialNumber,
                (ASN1_STRING *)(*b)->serialNumber));
}

int
X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev)
{
    X509_CRL_INFO *inf;

    inf = crl->crl;
    if (!inf->revoked)
        inf->revoked = sk_X509_REVOKED_new(OSSL_X509_REVOKED_cmp);
    if (!inf->revoked || !sk_X509_REVOKED_push(inf->revoked, rev))
        return 0;
    return 1;
}
#endif

#if !defined(HAVE_BN_MOD_SQR)
int
BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx)
{
    if (!BN_sqr(r, (BIGNUM*)a, ctx)) return 0;
    return BN_mod(r, r, m, ctx);
}
#endif

#if !defined(HAVE_BN_MOD_ADD) || !defined(HAVE_BN_MOD_SUB)
int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx)
{
    if (!BN_mod(r,m,d,ctx)) return 0;
    if (!r->neg) return 1;
    return (d->neg ? BN_sub : BN_add)(r, r, d);
}
#endif

#if !defined(HAVE_BN_MOD_ADD)
int
BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx)
{
    if (!BN_add(r, a, b)) return 0;
    return BN_nnmod(r, r, m, ctx);
}
#endif

#if !defined(HAVE_BN_MOD_SUB)
int
BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx)
{
    if (!BN_sub(r, a, b)) return 0;
    return BN_nnmod(r, r, m, ctx);
}
#endif

#if !defined(HAVE_BN_RAND_RANGE) || !defined(HAVE_BN_PSEUDO_RAND_RANGE)
static int
bn_rand_range(int pseudo, BIGNUM *r, BIGNUM *range)
{
    int (*bn_rand)(BIGNUM *, int, int, int) = pseudo ? BN_pseudo_rand : BN_rand;
    int n;

    if (range->neg || BN_is_zero(range)) return 0;

    n = BN_num_bits(range);

    if (n == 1) {
        if (!BN_zero(r)) return 0;
    } else if (!BN_is_bit_set(range, n - 2) && !BN_is_bit_set(range, n - 3)) {
        do {
            if (!bn_rand(r, n + 1, -1, 0)) return 0;
            if (BN_cmp(r ,range) >= 0) {
                if (!BN_sub(r, r, range)) return 0;
                if (BN_cmp(r, range) >= 0)
                    if (!BN_sub(r, r, range)) return 0;
            }
        } while (BN_cmp(r, range) >= 0);
    } else {
        do {
            if (!bn_rand(r, n, -1, 0)) return 0;
        } while (BN_cmp(r, range) >= 0);
    }

    return 1;
}
#endif

#if !defined(HAVE_BN_RAND_RANGE)
int
BN_rand_range(BIGNUM *r, BIGNUM *range)
{
    return bn_rand_range(0, r, range);
}
#endif

#if !defined(HAVE_BN_PSEUDO_RAND_RANGE)
int
BN_pseudo_rand_range(BIGNUM *r, BIGNUM *range)
{
    return bn_rand_range(1, r, range);
}
#endif

#if !defined(HAVE_CONF_GET1_DEFAULT_CONFIG_FILE)
#define OPENSSL_CONF "openssl.cnf"
char *
CONF_get1_default_config_file(void)
{
    char *file;
    int len;

    file = getenv("OPENSSL_CONF");
    if (file) return BUF_strdup(file);
    len = strlen(X509_get_default_cert_area());
#ifndef OPENSSL_SYS_VMS
    len++;
#endif
    len += strlen(OPENSSL_CONF);
    file = OPENSSL_malloc(len + 1);
    if (!file) return NULL;
    strcpy(file,X509_get_default_cert_area());
#ifndef OPENSSL_SYS_VMS
    strcat(file,"/");
#endif
    strcat(file,OPENSSL_CONF);

    return file;
}
#endif

#if !defined(HAVE_PEM_DEF_CALLBACK)
#define OSSL_PASS_MIN_LENGTH 4
int
PEM_def_callback(char *buf, int num, int w, void *key)
{
    int i,j;
    const char *prompt;

    if (key) {
        i = strlen(key);
        i = (i > num) ? num : i;
        memcpy(buf, key, i);
        return i;
    }

    prompt = EVP_get_pw_prompt();
    if (prompt == NULL) prompt = "Enter PEM pass phrase:";
    for (;;) {
        i = EVP_read_pw_string(buf, num, prompt, w);
        if (i != 0) {
            memset(buf, 0, (unsigned int)num);
            return(-1);
        }
        j = strlen(buf);
        if (j < OSSL_PASS_MIN_LENGTH) {
            fprintf(stderr,
                    "phrase is too short, needs to be at least %d chars\n",
                    OSSL_PASS_MIN_LENGTH);
        }
        else break;
    }
    return j;
}
#endif
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/openssl_missing.h

root/ext/openssl/openssl_missing.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/*
 * $Id: openssl_missing.h,v 1.4 2005/04/15 19:14:54 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#if !defined(_OSSL_OPENSSL_MISSING_H_)
#define _OSSL_OPENSSL_MISSING_H_

#if defined(__cplusplus)
extern "C" {
#endif

/*
 * These functions are not included in headers of OPENSSL <= 0.9.6b
 */

#if !defined(PEM_read_bio_DSAPublicKey)
# define PEM_read_bio_DSAPublicKey(bp,x,cb,u) (DSA *)PEM_ASN1_read_bio( \
        (char *(*)())d2i_DSAPublicKey,PEM_STRING_DSA_PUBLIC,bp,(char **)x,cb,u)
#endif

#if !defined(PEM_write_bio_DSAPublicKey)
# define PEM_write_bio_DSAPublicKey(bp,x) \
        PEM_ASN1_write_bio((int (*)())i2d_DSAPublicKey,\
                PEM_STRING_DSA_PUBLIC,\
                bp,(char *)x, NULL, NULL, 0, NULL, NULL)
#endif

#if !defined(DSAPrivateKey_dup)
# define DSAPrivateKey_dup(dsa) (DSA *)ASN1_dup((int (*)())i2d_DSAPrivateKey, \
        (char *(*)())d2i_DSAPrivateKey,(char *)dsa)
#endif

#if !defined(DSAPublicKey_dup)
# define DSAPublicKey_dup(dsa) (DSA *)ASN1_dup((int (*)())i2d_DSAPublicKey, \
        (char *(*)())d2i_DSAPublicKey,(char *)dsa)
#endif

#if !defined(X509_REVOKED_dup)
# define X509_REVOKED_dup(rev) (X509_REVOKED *)ASN1_dup((int (*)())i2d_X509_REVOKED, \
        (char *(*)())d2i_X509_REVOKED, (char *)rev)
#endif

#if !defined(PKCS7_SIGNER_INFO_dup)
#  define PKCS7_SIGNER_INFO_dup(si) (PKCS7_SIGNER_INFO *)ASN1_dup((int (*)())i2d_PKCS7_SIGNER_INFO, \
        (char *(*)())d2i_PKCS7_SIGNER_INFO, (char *)si)
#endif

#if !defined(PKCS7_RECIP_INFO_dup)
#  define PKCS7_RECIP_INFO_dup(ri) (PKCS7_RECIP_INFO *)ASN1_dup((int (*)())i2d_PKCS7_RECIP_INFO, \
        (char *(*)())d2i_PKCS7_RECIP_INFO, (char *)ri)
#endif

void HMAC_CTX_init(HMAC_CTX *ctx);
int HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in);
void HMAC_CTX_cleanup(HMAC_CTX *ctx);

EVP_MD_CTX *EVP_MD_CTX_create(void);
void EVP_MD_CTX_init(EVP_MD_CTX *ctx);
int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx);
void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx);

#if !defined(HAVE_EVP_CIPHER_CTX_COPY)
int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, EVP_CIPHER_CTX *in);
#endif

#if !defined(HAVE_EVP_DIGESTINIT_EX)
#  define EVP_DigestInit_ex(ctx, md, engine) EVP_DigestInit(ctx, md)
#endif
#if !defined(HAVE_EVP_DIGESTFINAL_EX)
#  define EVP_DigestFinal_ex(ctx, buf, len) EVP_DigestFinal(ctx, buf, len)
#endif

#if !defined(HAVE_EVP_CIPHERINIT_EX)
#  define EVP_CipherInit_ex(ctx, type, impl, key, iv, enc) EVP_CipherInit(ctx, type, key, iv, enc)
#endif
#if !defined(HAVE_EVP_CIPHERFINAL_EX)
#  define EVP_CipherFinal_ex(ctx, outm, outl) EVP_CipherFinal(ctx, outm, outl)
#endif

#if !defined(EVP_CIPHER_name)
#  define EVP_CIPHER_name(e) OBJ_nid2sn(EVP_CIPHER_nid(e))
#endif

#if !defined(EVP_MD_name)
#  define EVP_MD_name(e) OBJ_nid2sn(EVP_MD_type(e))
#endif

#if !defined(HAVE_EVP_HMAC_INIT_EX)
#  define HMAC_Init_ex(ctx, key, len, digest, engine) HMAC_Init(ctx, key, len, digest)
#endif

#if !defined(PKCS7_is_detached)
#  define PKCS7_is_detached(p7) (PKCS7_type_is_signed(p7) && PKCS7_get_detached(p7))
#endif

#if !defined(PKCS7_type_is_encrypted)
#  define PKCS7_type_is_encrypted(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_encrypted)
#endif

#if !defined(HAVE_OPENSSL_CLEANSE)
#define OPENSSL_cleanse(p, l) memset(p, 0, l)
#endif

void *X509_STORE_get_ex_data(X509_STORE *str, int idx);
int X509_STORE_set_ex_data(X509_STORE *str, int idx, void *data);
int X509_CRL_set_version(X509_CRL *x, long version);
int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name);
int X509_CRL_sort(X509_CRL *c);
int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx);
int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx);
int BN_rand_range(BIGNUM *r, BIGNUM *range);
int BN_pseudo_rand_range(BIGNUM *r, BIGNUM *range);
char *CONF_get1_default_config_file(void);
int PEM_def_callback(char *buf, int num, int w, void *key);

#if defined(__cplusplus)
}
#endif

#endif /* _OSSL_OPENSSL_MISSING_H_ */
/* [<][>][^][v][top][bottom][index] [help] */


ext/openssl/ossl.c

root/ext/openssl/ossl.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. string2hex
  2. STACK_OF
  3. STACK_OF
  4. STACK_OF
  5. OSSL_IMPL_SK2ARY
  6. ossl_buf2str
  7. ossl_pem_passwd_cb0
  8. ossl_pem_passwd_cb
  9. ossl_call_verify_cb_proc
  10. ossl_verify_cb
  11. ossl_to_der
  12. ossl_to_der_if_possible
  13. ossl_raise
  14. ossl_get_errors
  15. ossl_debug
  16. ossl_debug_get
  17. ossl_debug_set
  18. Init_openssl
  19. main
/*
 * $Id: ossl.c,v 1.17 2005/11/01 01:51:49 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#include "ossl.h"
#include <stdarg.h> /* for ossl_raise */

/*
 * String to HEXString conversion
 */
int
string2hex(char *buf, int buf_len, char **hexbuf, int *hexbuf_len)
{
    static const char hex[]="0123456789abcdef";
    int i, len = 2 * buf_len;

    if (buf_len < 0 || len < buf_len) { /* PARANOIA? */
        return -1;
    }
    if (!hexbuf) { /* if no buf, return calculated len */
        if (hexbuf_len) {
            *hexbuf_len = len;
        }
        return len;
    }
    if (!(*hexbuf = OPENSSL_malloc(len + 1))) {
        return -1;
    }
    for (i = 0; i < buf_len; i++) {
        (*hexbuf)[2 * i] = hex[((unsigned char)buf[i]) >> 4];
        (*hexbuf)[2 * i + 1] = hex[buf[i] & 0x0f];
    }
    (*hexbuf)[2 * i] = '\0';

    if (hexbuf_len) {
        *hexbuf_len = len;
    }
    return len;
}

/*
 * Data Conversion
 */
STACK_OF(X509) *
ossl_x509_ary2sk0(VALUE ary)
{
    STACK_OF(X509) *sk;
    VALUE val;
    X509 *x509;
    int i;

    Check_Type(ary, T_ARRAY);
    sk = sk_X509_new_null();
    if (!sk) ossl_raise(eOSSLError, NULL);

    for (i = 0; i < RARRAY(ary)->len; i++) {
        val = rb_ary_entry(ary, i);
        if (!rb_obj_is_kind_of(val, cX509Cert)) {
            sk_X509_pop_free(sk, X509_free);
            ossl_raise(eOSSLError, "object not X509 cert in array");
        }
        x509 = DupX509CertPtr(val); /* NEED TO DUP */
        sk_X509_push(sk, x509);
    }
    return sk;
}

STACK_OF(X509) *
ossl_protect_x509_ary2sk(VALUE ary, int *status)
{
    return (STACK_OF(X509)*)rb_protect((VALUE(*)_((VALUE)))ossl_x509_ary2sk0,
                                       ary, status);
}

STACK_OF(X509) *
ossl_x509_ary2sk(VALUE ary)
{
    STACK_OF(X509) *sk;
    int status = 0;

    sk = ossl_protect_x509_ary2sk(ary, &status);
    if(status) rb_jump_tag(status);

    return sk;
}

#define OSSL_IMPL_SK2ARY(name, type)            \
VALUE                                           \
ossl_##name##_sk2ary(STACK *sk)                 \
{                                               \
    type *t;                                    \
    int i, num;                                 \
    VALUE ary;                                  \
                                                \
    if (!sk) {                                  \
        OSSL_Debug("empty sk!");                \
        return Qnil;                            \
    }                                           \
    num = sk_num(sk);                           \
    if (num < 0) {                              \
        OSSL_Debug("items in sk < -1???");      \
        return rb_ary_new();                    \
    }                                           \
    ary = rb_ary_new2(num);                     \
                                                \
    for (i=0; i<num; i++) {                     \
        t = (type *)sk_value(sk, i);            \
        rb_ary_push(ary, ossl_##name##_new(t)); \
    }                                           \
    return ary;                                 \
}
OSSL_IMPL_SK2ARY(x509, X509)
OSSL_IMPL_SK2ARY(x509crl, X509_CRL)

static VALUE
ossl_str_new(int size)
{
    return rb_str_new(0, size);
}

VALUE
ossl_buf2str(char *buf, int len)
{
    VALUE str;
    int status = 0;

    str = rb_protect((VALUE(*)_((VALUE)))ossl_str_new, len, &status);
    if(!NIL_P(str)) memcpy(RSTRING(str)->ptr, buf, len);
    OPENSSL_free(buf);
    if(status) rb_jump_tag(status);

    return str;
}

/*
 * our default PEM callback
 */
static VALUE
ossl_pem_passwd_cb0(VALUE flag)
{
    VALUE pass;

    pass = rb_yield(flag);
    SafeStringValue(pass);

    return pass;
}

int
ossl_pem_passwd_cb(char *buf, int max_len, int flag, void *pwd)
{
    int len, status = 0;
    VALUE rflag, pass;

    if (pwd || !rb_block_given_p())
        return PEM_def_callback(buf, max_len, flag, pwd);

    while (1) {
        /*
         * when the flag is nonzero, this passphrase
         * will be used to perform encryption; otherwise it will
         * be used to perform decryption.
         */
        rflag = flag ? Qtrue : Qfalse;
        pass  = rb_protect(ossl_pem_passwd_cb0, rflag, &status);
        if (status) return -1; /* exception was raised. */
        len = RSTRING(pass)->len;
        if (len < 4) { /* 4 is OpenSSL hardcoded limit */
            rb_warning("password must be longer than 4 bytes");
            continue;
        }
        if (len > max_len) {
            rb_warning("password must be shorter then %d bytes", max_len-1);
            continue;
        }
        memcpy(buf, RSTRING(pass)->ptr, len);
        break;
    }
    return len;
}

/*
 * Verify callback
 */
int ossl_verify_cb_idx;

VALUE
ossl_call_verify_cb_proc(struct ossl_verify_cb_args *args)
{
    return rb_funcall(args->proc, rb_intern("call"), 2,
                      args->preverify_ok, args->store_ctx);
}

int
ossl_verify_cb(int ok, X509_STORE_CTX *ctx)
{
    VALUE proc, rctx, ret;
    struct ossl_verify_cb_args args;
    int state = 0;

    proc = (VALUE)X509_STORE_CTX_get_ex_data(ctx, ossl_verify_cb_idx);
    if ((void*)proc == 0)
        proc = (VALUE)X509_STORE_get_ex_data(ctx->ctx, ossl_verify_cb_idx);
    if ((void*)proc == 0)
        return ok;
    if (!NIL_P(proc)) {
        rctx = rb_protect((VALUE(*)(VALUE))ossl_x509stctx_new,
                          (VALUE)ctx, &state);
        ret = Qfalse;
        if (!state) {
            args.proc = proc;
            args.preverify_ok = ok ? Qtrue : Qfalse;
            args.store_ctx = rctx;
            ret = rb_ensure(ossl_call_verify_cb_proc, (VALUE)&args,
                            ossl_x509stctx_clear_ptr, rctx);
        }
        if (ret == Qtrue) {
            X509_STORE_CTX_set_error(ctx, X509_V_OK);
            ok = 1;
        }
        else{
            if (X509_STORE_CTX_get_error(ctx) == X509_V_OK) {
                X509_STORE_CTX_set_error(ctx, X509_V_ERR_CERT_REJECTED);
            }
            ok = 0;
        }
    }

    return ok;
}

/*
 * main module
 */
VALUE mOSSL;

/*
 * OpenSSLError < StandardError
 */
VALUE eOSSLError;

/*
 * Convert to DER string
 */
ID ossl_s_to_der;

VALUE
ossl_to_der(VALUE obj)
{
    VALUE tmp;

    tmp = rb_funcall(obj, ossl_s_to_der, 0);
    StringValue(tmp);

    return tmp;
}

VALUE
ossl_to_der_if_possible(VALUE obj)
{
    if(rb_respond_to(obj, ossl_s_to_der))
        return ossl_to_der(obj);
    return obj;
}

/*
 * Errors
 */
void
ossl_raise(VALUE exc, const char *fmt, ...)
{
    va_list args;
    char buf[BUFSIZ];
    const char *msg;
    long e;
    int len = 0;

#ifdef HAVE_ERR_PEEK_LAST_ERROR
    e = ERR_peek_last_error();
#else
    e = ERR_peek_error();
#endif
    if (fmt) {
        va_start(args, fmt);
        len = vsnprintf(buf, BUFSIZ, fmt, args);
        va_end(args);
    }
    if (len < BUFSIZ && e) {
        if (dOSSL == Qtrue) /* FULL INFO */
            msg = ERR_error_string(e, NULL);
        else
            msg = ERR_reason_error_string(e);
        fmt = len ? ": %s" : "%s";
        len += snprintf(buf+len, BUFSIZ-len, fmt, msg);
    }
    if (dOSSL == Qtrue){ /* show all errors on the stack */
        while ((e = ERR_get_error()) != 0){
            rb_warn("error on stack: %s", ERR_error_string(e, NULL));
        }
    }
    ERR_clear_error();

    if(len > BUFSIZ) len = strlen(buf);
    rb_exc_raise(rb_exc_new(exc, buf, len));
}

VALUE
ossl_get_errors()
{
    VALUE ary;
    long e;

    ary = rb_ary_new();
    while ((e = ERR_get_error()) != 0){
        rb_ary_push(ary, rb_str_new2(ERR_error_string(e, NULL)));
    }

    return ary;
}

/*
 * Debug
 */
VALUE dOSSL;

#if !defined(HAVE_VA_ARGS_MACRO)
void
ossl_debug(const char *fmt, ...)
{
    va_list args;

    if (dOSSL == Qtrue) {
        fprintf(stderr, "OSSL_DEBUG: ");
        va_start(args, fmt);
        vfprintf(stderr, fmt, args);
        va_end(args);
        fprintf(stderr, " [CONTEXT N/A]\n");
    }
}
#endif

static VALUE
ossl_debug_get(VALUE self)
{
    return dOSSL;
}

static VALUE
ossl_debug_set(VALUE self, VALUE val)
{
    VALUE old = dOSSL;
    dOSSL = val;

    if (old != dOSSL) {
        if (dOSSL == Qtrue) {
            CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
            fprintf(stderr, "OSSL_DEBUG: IS NOW ON!\n");
        } else if (old == Qtrue) {
            CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_OFF);
            fprintf(stderr, "OSSL_DEBUG: IS NOW OFF!\n");
        }
    }
    return val;
}

/*
 * OSSL library init
 */
void
Init_openssl()
{
    /*
     * Init timezone info
     */
#if 0
    tzset();
#endif

    /*
     * Init all digests, ciphers
     */
    /* CRYPTO_malloc_init(); */
    /* ENGINE_load_builtin_engines(); */
    OpenSSL_add_ssl_algorithms();
    OpenSSL_add_all_algorithms();
    ERR_load_crypto_strings();
    SSL_load_error_strings();

    /*
     * FIXME:
     * On unload do:
     */
#if 0
    CONF_modules_unload(1);
    destroy_ui_method();
    EVP_cleanup();
    ENGINE_cleanup();
    CRYPTO_cleanup_all_ex_data();
    ERR_remove_state(0);
    ERR_free_strings();
#endif

    /*
     * Init main module
     */
    mOSSL = rb_define_module("OpenSSL");

    /*
     * Constants
     */
    rb_define_const(mOSSL, "VERSION", rb_str_new2(OSSL_VERSION));
    rb_define_const(mOSSL, "OPENSSL_VERSION", rb_str_new2(OPENSSL_VERSION_TEXT));
    rb_define_const(mOSSL, "OPENSSL_VERSION_NUMBER", INT2NUM(OPENSSL_VERSION_NUMBER));

    /*
     * Generic error,
     * common for all classes under OpenSSL module
     */
    eOSSLError = rb_define_class_under(mOSSL,"OpenSSLError",rb_eStandardError);

    /*
     * Verify callback Proc index for ext-data
     */
    ossl_verify_cb_idx =
        X509_STORE_CTX_get_ex_new_index(0, "ossl_verify_cb_idx", 0, 0, 0);

    /*
     * Init debug core
     */
    dOSSL = Qfalse;
    rb_define_module_function(mOSSL, "debug", ossl_debug_get, 0);
    rb_define_module_function(mOSSL, "debug=", ossl_debug_set, 1);
    rb_define_module_function(mOSSL, "errors", ossl_get_errors, 0);

    /*
     * Get ID of to_der
     */
    ossl_s_to_der = rb_intern("to_der");

    /*
     * Init components
     */
    Init_ossl_bn();
    Init_ossl_cipher();
    Init_ossl_config();
    Init_ossl_digest();
    Init_ossl_hmac();
    Init_ossl_ns_spki();
    Init_ossl_pkcs12();
    Init_ossl_pkcs7();
    Init_ossl_pkey();
    Init_ossl_rand();
    Init_ossl_ssl();
    Init_ossl_x509();
    Init_ossl_ocsp();
    Init_ossl_engine();
    Init_ossl_asn1();
}

#if defined(OSSL_DEBUG)
/*
 * Check if all symbols are OK with 'make LDSHARED=gcc all'
 */
int
main(int argc, char *argv[], char *env[])
{
    return 0;
}
#endif /* OSSL_DEBUG */
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl.h

root/ext/openssl/ossl.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/*
 * $Id: ossl.h,v 1.16 2005/11/07 07:25:25 usa Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#if !defined(_OSSL_H_)
#define _OSSL_H_

#if defined(__cplusplus)
extern "C" {
#endif

/*
 * Check the OpenSSL version
 * The only supported are:
 *      OpenSSL >= 0.9.7
 */
#include <openssl/opensslv.h>

#ifdef HAVE_ASSERT_H
#  include <assert.h>
#else
#  define assert(condition)
#endif

#if defined(_WIN32)
#  define OpenFile WINAPI_OpenFile
#  define OSSL_NO_CONF_API 1
#  include <winsock2.h>
#endif
#include <errno.h>
#include <openssl/err.h>
#include <openssl/asn1_mac.h>
#include <openssl/x509v3.h>
#include <openssl/ssl.h>
#include <openssl/pkcs12.h>
#include <openssl/pkcs7.h>
#include <openssl/hmac.h>
#include <openssl/rand.h>
#include <openssl/conf.h>
#include <openssl/conf_api.h>
#undef X509_NAME
#undef PKCS7_SIGNER_INFO
#if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ST_ENGINE)
#  define OSSL_ENGINE_ENABLED
#  include <openssl/engine.h>
#endif
#if defined(HAVE_OPENSSL_OCSP_H)
#  define OSSL_OCSP_ENABLED
#  include <openssl/ocsp.h>
#endif
#if defined(_WIN32)
#  undef OpenFile
#endif

/*
 * OpenSSL has defined RFILE and Ruby has defined RFILE - so undef it!
 */
#if defined(RFILE) /*&& !defined(OSSL_DEBUG)*/
#  undef RFILE
#endif
#include <ruby.h>
#include <rubyio.h>

/*
 * Common Module
 */
extern VALUE mOSSL;

/*
 * Common Error Class
 */
extern VALUE eOSSLError;

/*
 * CheckTypes
 */
#define OSSL_Check_Kind(obj, klass) do {\
  if (!rb_obj_is_kind_of(obj, klass)) {\
    ossl_raise(rb_eTypeError, "wrong argument (%s)! (Expected kind of %s)",\
               rb_obj_classname(obj), rb_class2name(klass));\
  }\
} while (0)

#define OSSL_Check_Instance(obj, klass) do {\
  if (!rb_obj_is_instance_of(obj, klass)) {\
    ossl_raise(rb_eTypeError, "wrong argument (%s)! (Expected instance of %s)",\
               rb_obj_classname(obj), rb_class2name(klass));\
  }\
} while (0)

#define OSSL_Check_Same_Class(obj1, obj2) do {\
  if (!rb_obj_is_instance_of(obj1, rb_obj_class(obj2))) {\
    ossl_raise(rb_eTypeError, "wrong argument type");\
  }\
} while (0)

/*
 * String to HEXString conversion
 */
int string2hex(char *, int, char **, int *);

/*
 * Data Conversion
 */
STACK_OF(X509) *ossl_x509_ary2sk0(VALUE);
STACK_OF(X509) *ossl_x509_ary2sk(VALUE);
STACK_OF(X509) *ossl_protect_x509_ary2sk(VALUE,int*);
VALUE ossl_x509_sk2ary(STACK_OF(X509) *certs);
VALUE ossl_x509crl_sk2ary(STACK_OF(X509_CRL) *crl);
VALUE ossl_buf2str(char *buf, int len);
#define ossl_str_adjust(str, p) \
do{\
    int len = RSTRING(str)->len;\
    int newlen = (p) - (unsigned char*)RSTRING(str)->ptr;\
    assert(newlen <= len);\
    RSTRING(str)->len = newlen;\
    RSTRING(str)->ptr[newlen] = 0;\
}while(0)

/*
 * our default PEM callback
 */
int ossl_pem_passwd_cb(char *, int, int, void *);

/*
 * ERRor messages
 */
#define OSSL_ErrMsg() ERR_reason_error_string(ERR_get_error())
NORETURN(void ossl_raise(VALUE, const char *, ...));

/*
 * Verify callback
 */
extern int ossl_verify_cb_idx;

struct ossl_verify_cb_args {
    VALUE proc;
    VALUE preverify_ok;
    VALUE store_ctx;
};

VALUE ossl_call_verify_cb_proc(struct ossl_verify_cb_args *);
int ossl_verify_cb(int, X509_STORE_CTX *);

/*
 * String to DER String
 */
extern ID ossl_s_to_der;
VALUE ossl_to_der(VALUE);
VALUE ossl_to_der_if_possible(VALUE);

/*
 * Debug
 */
extern VALUE dOSSL;

#if defined(HAVE_VA_ARGS_MACRO)
#define OSSL_Debug(fmt, ...) do { \
  if (dOSSL == Qtrue) { \
    fprintf(stderr, "OSSL_DEBUG: "); \
    fprintf(stderr, fmt, ##__VA_ARGS__); \
    fprintf(stderr, " [in %s (%s:%d)]\n", __func__, __FILE__, __LINE__); \
  } \
} while (0)

#define OSSL_Warning(fmt, ...) do { \
  OSSL_Debug(fmt, ##__VA_ARGS__); \
  rb_warning(fmt, ##__VA_ARGS__); \
} while (0)

#define OSSL_Warn(fmt, ...) do { \
  OSSL_Debug(fmt, ##__VA_ARGS__); \
  rb_warn(fmt, ##__VA_ARGS__); \
} while (0)
#else
void ossl_debug(const char *, ...);
#define OSSL_Debug ossl_debug
#define OSSL_Warning rb_warning
#define OSSL_Warn rb_warn
#endif

/*
 * Include all parts
 */
#include "openssl_missing.h"
#include "ruby_missing.h"
#include "ossl_asn1.h"
#include "ossl_bio.h"
#include "ossl_bn.h"
#include "ossl_cipher.h"
#include "ossl_config.h"
#include "ossl_digest.h"
#include "ossl_hmac.h"
#include "ossl_ns_spki.h"
#include "ossl_ocsp.h"
#include "ossl_pkcs12.h"
#include "ossl_pkcs7.h"
#include "ossl_pkey.h"
#include "ossl_rand.h"
#include "ossl_ssl.h"
#include "ossl_version.h"
#include "ossl_x509.h"
#include "ossl_engine.h"

void Init_openssl(void);

#if defined(__cplusplus)
}
#endif

#endif /* _OSSL_H_ */
/* [<][>][^][v][top][bottom][index] [help] */


ext/openssl/ossl_asn1.c

root/ext/openssl/ossl_asn1.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. asn1time_to_time
  2. time_to_time_t
  3. asn1str_to_str
  4. asn1integer_to_num
  5. num_to_asn1integer
  6. num_to_asn1integer
  7. obj_to_asn1bool
  8. obj_to_asn1int
  9. obj_to_asn1bstr
  10. obj_to_asn1str
  11. obj_to_asn1null
  12. obj_to_asn1obj
  13. obj_to_asn1utime
  14. obj_to_asn1gtime
  15. obj_to_asn1derstr
  16. decode_bool
  17. decode_int
  18. decode_bstr
  19. decode_enum
  20. decode_null
  21. decode_obj
  22. decode_time
  23. ossl_asn1_info_t
  24. ossl_asn1_get_asn1type
  25. ossl_asn1_default_tag
  26. ossl_asn1_tag
  27. ossl_asn1_is_explicit
  28. ossl_asn1_tag_class
  29. ossl_asn1_class2sym
  30. ossl_asn1data_initialize
  31. join_der_i
  32. join_der
  33. ossl_asn1data_to_der
  34. ossl_asn1_decode0
  35. ossl_asn1_traverse
  36. ossl_asn1_decode
  37. ossl_asn1_decode_all
  38. ossl_asn1_initialize
  39. ossl_i2d_ASN1_TYPE
  40. ossl_ASN1_TYPE_free
  41. ossl_asn1prim_to_der
  42. ossl_asn1cons_to_der
  43. ossl_asn1cons_each
  44. ossl_asn1obj_s_register
  45. ossl_asn1obj_get_sn
  46. ossl_asn1obj_get_ln
  47. ossl_asn1obj_get_oid
  48. OSSL_ASN1_IMPL_FACTORY_METHOD
/*
 * $Id: ossl_asn1.c,v 1.12 2005/09/07 07:40:53 gotoyuzo Exp $
 * 'OpenSSL for Ruby' team members
 * Copyright (C) 2003
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#include "ossl.h"

#if defined(HAVE_SYS_TIME_H)
#  include <sys/time.h>
#elif !defined(NT) && !defined(_WIN32)
struct timeval {
    long tv_sec;        /* seconds */
    long tv_usec;       /* and microseconds */
};
#endif

/*
 * DATE conversion
 */
VALUE
asn1time_to_time(ASN1_TIME *time)
{
    struct tm tm;
    VALUE argv[6];

    if (!time || !time->data) return Qnil;
    memset(&tm, 0, sizeof(struct tm));

    switch (time->type) {
    case V_ASN1_UTCTIME:
        if (sscanf(time->data, "%2d%2d%2d%2d%2d%2dZ", &tm.tm_year, &tm.tm_mon,
                &tm.tm_mday, &tm.tm_hour, &tm.tm_min, &tm.tm_sec) != 6) {
            ossl_raise(rb_eTypeError, "bad UTCTIME format");
        }
        if (tm.tm_year < 69) {
            tm.tm_year += 2000;
        } else {
            tm.tm_year += 1900;
        }
        break;
    case V_ASN1_GENERALIZEDTIME:
        if (sscanf(time->data, "%4d%2d%2d%2d%2d%2dZ", &tm.tm_year, &tm.tm_mon,
                &tm.tm_mday, &tm.tm_hour, &tm.tm_min, &tm.tm_sec) != 6) {
            ossl_raise(rb_eTypeError, "bad GENERALIZEDTIME format" );
        }
        break;
    default:
        rb_warning("unknown time format");
        return Qnil;
    }
    argv[0] = INT2NUM(tm.tm_year);
    argv[1] = INT2NUM(tm.tm_mon);
    argv[2] = INT2NUM(tm.tm_mday);
    argv[3] = INT2NUM(tm.tm_hour);
    argv[4] = INT2NUM(tm.tm_min);
    argv[5] = INT2NUM(tm.tm_sec);

    return rb_funcall2(rb_cTime, rb_intern("utc"), 6, argv);
}

/*
 * This function is not exported in Ruby's *.h
 */
extern struct timeval rb_time_timeval(VALUE);

time_t
time_to_time_t(VALUE time)
{
    return (time_t)NUM2LONG(rb_Integer(time));
}

/*
 * STRING conversion
 */
VALUE
asn1str_to_str(ASN1_STRING *str)
{
    return rb_str_new(str->data, str->length);
}

/*
 * ASN1_INTEGER conversions
 * TODO: Make a decision what's the right way to do this.
 */
#define DO_IT_VIA_RUBY 0
VALUE
asn1integer_to_num(ASN1_INTEGER *ai)
{
    BIGNUM *bn;
#if DO_IT_VIA_RUBY
    char *txt;
#endif
    VALUE num;

    if (!ai) {
        ossl_raise(rb_eTypeError, "ASN1_INTEGER is NULL!");
    }
    if (!(bn = ASN1_INTEGER_to_BN(ai, NULL))) {
        ossl_raise(eOSSLError, NULL);
    }
#if DO_IT_VIA_RUBY
    if (!(txt = BN_bn2dec(bn))) {
        BN_free(bn);
        ossl_raise(eOSSLError, NULL);
    }
    num = rb_cstr_to_inum(txt, 10, Qtrue);
    OPENSSL_free(txt);
#else
    num = ossl_bn_new(bn);
#endif
    BN_free(bn);

    return num;
}

#if DO_IT_VIA_RUBY
ASN1_INTEGER *
num_to_asn1integer(VALUE obj, ASN1_INTEGER *ai)
{
    BIGNUM *bn = NULL;

    if (RTEST(rb_obj_is_kind_of(obj, cBN))) {
        bn = GetBNPtr(obj);
    } else {
        obj = rb_String(obj);
        if (!BN_dec2bn(&bn, StringValuePtr(obj))) {
            ossl_raise(eOSSLError, NULL);
        }
    }
    if (!(ai = BN_to_ASN1_INTEGER(bn, ai))) {
        BN_free(bn);
        ossl_raise(eOSSLError, NULL);
    }
    BN_free(bn);
    return ai;
}
#else
ASN1_INTEGER *
num_to_asn1integer(VALUE obj, ASN1_INTEGER *ai)
{
    BIGNUM *bn = GetBNPtr(obj);

    if (!(ai = BN_to_ASN1_INTEGER(bn, ai))) {
        ossl_raise(eOSSLError, NULL);
    }
    return ai;
}
#endif

/********/
/*
 * ASN1 module
 */
#define ossl_asn1_get_value(o)       rb_attr_get((o),rb_intern("@value"))
#define ossl_asn1_get_tag(o)         rb_attr_get((o),rb_intern("@tag"))
#define ossl_asn1_get_tagging(o)     rb_attr_get((o),rb_intern("@tagging"))
#define ossl_asn1_get_tag_class(o)   rb_attr_get((o),rb_intern("@tag_class"))

#define ossl_asn1_set_value(o,v)     rb_iv_set((o),"@value",(v))
#define ossl_asn1_set_tag(o,v)       rb_iv_set((o),"@tag",(v))
#define ossl_asn1_set_tagging(o,v)   rb_iv_set((o),"@tagging",(v))
#define ossl_asn1_set_tag_class(o,v) rb_iv_set((o),"@tag_class",(v))

VALUE mASN1;
VALUE eASN1Error;

VALUE cASN1Data;
VALUE cASN1Primitive;
VALUE cASN1Constructive;

VALUE cASN1Boolean;                           /* BOOLEAN           */
VALUE cASN1Integer, cASN1Enumerated;          /* INTEGER           */
VALUE cASN1BitString;                         /* BIT STRING        */
VALUE cASN1OctetString, cASN1UTF8String;      /* STRINGs           */
VALUE cASN1NumericString, cASN1PrintableString;
VALUE cASN1T61String, cASN1VideotexString;
VALUE cASN1IA5String, cASN1GraphicString;
VALUE cASN1ISO64String, cASN1GeneralString;
VALUE cASN1UniversalString, cASN1BMPString;
VALUE cASN1Null;                              /* NULL              */
VALUE cASN1ObjectId;                          /* OBJECT IDENTIFIER */
VALUE cASN1UTCTime, cASN1GeneralizedTime;     /* TIME              */
VALUE cASN1Sequence, cASN1Set;                /* CONSTRUCTIVE      */

static ID sIMPLICIT, sEXPLICIT;
static ID sUNIVERSAL, sAPPLICATION, sCONTEXT_SPECIFIC, sPRIVATE;

/*
 * Ruby to ASN1 converters
 */
static ASN1_BOOLEAN
obj_to_asn1bool(VALUE obj)
{
     return RTEST(obj) ? 0xff : 0x100;
}

static ASN1_INTEGER*
obj_to_asn1int(VALUE obj)
{
    return num_to_asn1integer(obj, NULL);
}

static ASN1_BIT_STRING*
obj_to_asn1bstr(VALUE obj, long unused_bits)
{
    ASN1_BIT_STRING *bstr;

    if(unused_bits < 0) unused_bits = 0;
    StringValue(obj);
    if(!(bstr = ASN1_BIT_STRING_new()))
        ossl_raise(eASN1Error, NULL);
    ASN1_BIT_STRING_set(bstr, RSTRING(obj)->ptr, RSTRING(obj)->len);
    bstr->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT|0x07); /* clear */
    bstr->flags |= ASN1_STRING_FLAG_BITS_LEFT|(unused_bits&0x07);

    return bstr;
}

static ASN1_STRING*
obj_to_asn1str(VALUE obj)
{
    ASN1_STRING *str;

    StringValue(obj);
    if(!(str = ASN1_STRING_new()))
        ossl_raise(eASN1Error, NULL);
    ASN1_STRING_set(str, RSTRING(obj)->ptr, RSTRING(obj)->len);

    return str;
}

static ASN1_NULL*
obj_to_asn1null(VALUE obj)
{
    ASN1_NULL *null;

    if(!NIL_P(obj))
        ossl_raise(eASN1Error, "nil expected");
    if(!(null = ASN1_NULL_new()))
        ossl_raise(eASN1Error, NULL);

    return null;
}

static ASN1_OBJECT*
obj_to_asn1obj(VALUE obj)
{
    ASN1_OBJECT *a1obj;

    StringValue(obj);
    a1obj = OBJ_txt2obj(RSTRING(obj)->ptr, 0);
    if(!a1obj) a1obj = OBJ_txt2obj(RSTRING(obj)->ptr, 1);
    if(!a1obj) ossl_raise(eASN1Error, "invalid OBJECT ID");

    return a1obj;
}

static ASN1_UTCTIME*
obj_to_asn1utime(VALUE time)
{
    time_t sec;
    ASN1_UTCTIME *t;

    sec = time_to_time_t(time);
    if(!(t = ASN1_UTCTIME_set(NULL, sec)))
        ossl_raise(eASN1Error, NULL);

    return t;
}

static ASN1_GENERALIZEDTIME*
obj_to_asn1gtime(VALUE time)
{
    time_t sec;
    ASN1_GENERALIZEDTIME *t;

    sec = time_to_time_t(time);
    if(!(t =ASN1_GENERALIZEDTIME_set(NULL, sec)))
        ossl_raise(eASN1Error, NULL);

    return t;
}

static ASN1_STRING*
obj_to_asn1derstr(VALUE obj)
{
    ASN1_STRING *a1str;
    VALUE str;

    str = ossl_to_der(obj);
    if(!(a1str = ASN1_STRING_new()))
        ossl_raise(eASN1Error, NULL);
    ASN1_STRING_set(a1str, RSTRING(str)->ptr, RSTRING(str)->len);

    return a1str;
}

/*
 * DER to Ruby converters
 */
static VALUE
decode_bool(unsigned char* der, int length)
{
    int bool;
    unsigned char *p;

    p = der;
    if((bool = d2i_ASN1_BOOLEAN(NULL, &p, length)) < 0)
        ossl_raise(eASN1Error, NULL);

    return bool ? Qtrue : Qfalse;
}

static VALUE
decode_int(unsigned char* der, int length)
{
    ASN1_INTEGER *ai;
    unsigned char *p;
    VALUE ret;
    int status = 0;

    p = der;
    if(!(ai = d2i_ASN1_INTEGER(NULL, &p, length)))
        ossl_raise(eASN1Error, NULL);
    ret = rb_protect((VALUE(*)_((VALUE)))asn1integer_to_num,
                     (VALUE)ai, &status);
    ASN1_INTEGER_free(ai);
    if(status) rb_jump_tag(status);

    return ret;
}

static VALUE
decode_bstr(unsigned char* der, int length, long *unused_bits)
{
    ASN1_BIT_STRING *bstr;
    unsigned char *p, *buf;
    long len;
    VALUE ret;

    p = der;
    if(!(bstr = d2i_ASN1_BIT_STRING(NULL, &p, length)))
        ossl_raise(eASN1Error, NULL);
    len = bstr->length;
    if(!(buf = OPENSSL_malloc(len))){
        ASN1_BIT_STRING_free(bstr);
        ossl_raise(eASN1Error, NULL);
    }
    *unused_bits = 0;
    if(bstr->flags & ASN1_STRING_FLAG_BITS_LEFT)
        *unused_bits = bstr->flags & 0x07;
    memcpy(buf, bstr->data, len);
    ASN1_BIT_STRING_free(bstr);
    ret = ossl_buf2str(buf, len);

    return ret;
}

static VALUE
decode_enum(unsigned char* der, int length)
{
    ASN1_ENUMERATED *ai;
    unsigned char *p;
    VALUE ret;
    int status = 0;

    p = der;
    if(!(ai = d2i_ASN1_ENUMERATED(NULL, &p, length)))
        ossl_raise(eASN1Error, NULL);
    ret = rb_protect((VALUE(*)_((VALUE)))asn1integer_to_num,
                     (VALUE)ai, &status);
    ASN1_ENUMERATED_free(ai);
    if(status) rb_jump_tag(status);

    return ret;
}

static VALUE
decode_null(unsigned char* der, int length)
{
    ASN1_NULL *null;
    unsigned char *p;

    p = der;
    if(!(null = d2i_ASN1_NULL(NULL, &p, length)))
        ossl_raise(eASN1Error, NULL);
    ASN1_NULL_free(null);

    return Qnil;
}

static VALUE
decode_obj(unsigned char* der, int length)
{
    ASN1_OBJECT *obj;
    unsigned char *p;
    VALUE ret;
    int nid;
    BIO *bio;

    p = der;
    if(!(obj = d2i_ASN1_OBJECT(NULL, &p, length)))
        ossl_raise(eASN1Error, NULL);
    if((nid = OBJ_obj2nid(obj)) != NID_undef){
        ASN1_OBJECT_free(obj);
        ret = rb_str_new2(OBJ_nid2sn(nid));
    }
    else{
        if(!(bio = BIO_new(BIO_s_mem()))){
            ASN1_OBJECT_free(obj);
            ossl_raise(eASN1Error, NULL);
        }
        i2a_ASN1_OBJECT(bio, obj);
        ASN1_OBJECT_free(obj);
        ret = ossl_membio2str(bio);
    }

    return ret;
}

static VALUE
decode_time(unsigned char* der, int length)
{
    ASN1_TIME *time;
    unsigned char *p;
    VALUE ret;
    int status = 0;

    p = der;
    if(!(time = d2i_ASN1_TIME(NULL, &p, length)))
        ossl_raise(eASN1Error, NULL);
    ret = rb_protect((VALUE(*)_((VALUE)))asn1time_to_time,
                     (VALUE)time, &status);
    ASN1_TIME_free(time);
    if(status) rb_jump_tag(status);

    return ret;
}

/********/

typedef struct {
    char *name;
    VALUE *klass;
} ossl_asn1_info_t;

static ossl_asn1_info_t ossl_asn1_info[] = {
    { "EOC",               NULL,                  },  /*  0 */
    { "BOOLEAN",           &cASN1Boolean,         },  /*  1 */
    { "INTEGER",           &cASN1Integer,         },  /*  2 */
    { "BIT_STRING",        &cASN1BitString,       },  /*  3 */
    { "OCTET_STRING",      &cASN1OctetString,     },  /*  4 */
    { "NULL",              &cASN1Null,            },  /*  5 */
    { "OBJECT",            &cASN1ObjectId,        },  /*  6 */
    { "OBJECT_DESCRIPTOR", NULL,                  },  /*  7 */
    { "EXTERNAL",          NULL,                  },  /*  8 */
    { "REAL",              NULL,                  },  /*  9 */
    { "ENUMERATED",        &cASN1Enumerated,      },  /* 10 */
    { "EMBEDDED_PDV",      NULL,                  },  /* 11 */
    { "UTF8STRING",        &cASN1UTF8String,      },  /* 12 */
    { "RELATIVE_OID",      NULL,                  },  /* 13 */
    { "[UNIVERSAL 14]",    NULL,                  },  /* 14 */
    { "[UNIVERSAL 15]",    NULL,                  },  /* 15 */
    { "SEQUENCE",          &cASN1Sequence,        },  /* 16 */
    { "SET",               &cASN1Set,             },  /* 17 */
    { "NUMERICSTRING",     &cASN1NumericString,   },  /* 18 */
    { "PRINTABLESTRING",   &cASN1PrintableString, },  /* 19 */
    { "T61STRING",         &cASN1T61String,       },  /* 20 */
    { "VIDEOTEXSTRING",    &cASN1VideotexString,  },  /* 21 */
    { "IA5STRING",         &cASN1IA5String,       },  /* 22 */
    { "UTCTIME",           &cASN1UTCTime,         },  /* 23 */
    { "GENERALIZEDTIME",   &cASN1GeneralizedTime, },  /* 24 */
    { "GRAPHICSTRING",     &cASN1GraphicString,   },  /* 25 */
    { "ISO64STRING",       &cASN1ISO64String,     },  /* 26 */
    { "GENERALSTRING",     &cASN1GeneralString,   },  /* 27 */
    { "UNIVERSALSTRING",   &cASN1UniversalString, },  /* 28 */
    { "CHARACTER_STRING",  NULL,                  },  /* 29 */
    { "BMPSTRING",         &cASN1BMPString,       },  /* 30 */
};

int ossl_asn1_info_size = (sizeof(ossl_asn1_info)/sizeof(ossl_asn1_info[0]));

static int ossl_asn1_default_tag(VALUE obj);

ASN1_TYPE*
ossl_asn1_get_asn1type(VALUE obj)
{
    ASN1_TYPE *ret;
    VALUE value, rflag;
    void *ptr;
    void (*free_func)();
    long tag, flag;

    tag = ossl_asn1_default_tag(obj);
    value = ossl_asn1_get_value(obj);
    switch(tag){
    case V_ASN1_BOOLEAN:
        ptr = (void*)obj_to_asn1bool(value);
        free_func = NULL;
        break;
    case V_ASN1_INTEGER:         /* FALLTHROUGH */
    case V_ASN1_ENUMERATED:
        ptr = obj_to_asn1int(value);
        free_func = ASN1_INTEGER_free;
        break;
    case V_ASN1_BIT_STRING:
        rflag = rb_attr_get(obj, rb_intern("@unused_bits"));
        flag = NIL_P(rflag) ? -1 : NUM2INT(rflag);
        ptr = obj_to_asn1bstr(value, flag);
        free_func = ASN1_BIT_STRING_free;
        break;
    case V_ASN1_NULL:
        ptr = obj_to_asn1null(value);
        free_func = ASN1_NULL_free;
        break;
    case V_ASN1_OCTET_STRING:    /* FALLTHROUGH */
    case V_ASN1_UTF8STRING:      /* FALLTHROUGH */
    case V_ASN1_NUMERICSTRING:   /* FALLTHROUGH */
    case V_ASN1_PRINTABLESTRING: /* FALLTHROUGH */
    case V_ASN1_T61STRING:       /* FALLTHROUGH */
    case V_ASN1_VIDEOTEXSTRING:  /* FALLTHROUGH */
    case V_ASN1_IA5STRING:       /* FALLTHROUGH */
    case V_ASN1_GRAPHICSTRING:   /* FALLTHROUGH */
    case V_ASN1_ISO64STRING:     /* FALLTHROUGH */
    case V_ASN1_GENERALSTRING:   /* FALLTHROUGH */
    case V_ASN1_UNIVERSALSTRING: /* FALLTHROUGH */
    case V_ASN1_BMPSTRING:
        ptr = obj_to_asn1str(value);
        free_func = ASN1_STRING_free;
        break;
    case V_ASN1_OBJECT:
        ptr = obj_to_asn1obj(value);
        free_func = ASN1_OBJECT_free;
        break;
    case V_ASN1_UTCTIME:
        ptr = obj_to_asn1utime(value);
        free_func = ASN1_TIME_free;
        break;
    case V_ASN1_GENERALIZEDTIME:
        ptr = obj_to_asn1gtime(value);
        free_func = ASN1_TIME_free;
        break;
    case V_ASN1_SET:             /* FALLTHROUGH */
    case V_ASN1_SEQUENCE:
        ptr = obj_to_asn1derstr(obj);
        free_func = ASN1_STRING_free;
        break;
    default:
        ossl_raise(eASN1Error, "unsupported ASN.1 type");
    }
    if(!(ret = OPENSSL_malloc(sizeof(ASN1_TYPE)))){
        if(free_func) free_func(ptr);
        ossl_raise(eASN1Error, "ASN1_TYPE alloc failure");
    }
    memset(ret, 0, sizeof(ASN1_TYPE));
    ASN1_TYPE_set(ret, tag, ptr);

    return ret;
}

static int
ossl_asn1_default_tag(VALUE obj)
{
    int i;

    for(i = 0; i < ossl_asn1_info_size; i++){
        if(ossl_asn1_info[i].klass &&
           rb_obj_is_kind_of(obj, *ossl_asn1_info[i].klass)){
            return i;
        }
    }
    ossl_raise(eASN1Error, "universal tag for %s not found",
               rb_class2name(CLASS_OF(obj)));

    return -1; /* dummy */
}

static int
ossl_asn1_tag(VALUE obj)
{
    VALUE tag;

    tag = ossl_asn1_get_tag(obj);
    if(NIL_P(tag))
        ossl_raise(eASN1Error, "tag number not specified");

    return NUM2INT(tag);
}

static int
ossl_asn1_is_explicit(VALUE obj)
{
    VALUE s;
    int ret = -1;

    s = ossl_asn1_get_tagging(obj);
    if(NIL_P(s)) return 0;
    else if(SYMBOL_P(s)){
        if (SYM2ID(s) == sIMPLICIT)
            ret = 0;
        else if (SYM2ID(s) == sEXPLICIT)
            ret = 1;
    }
    if(ret < 0){
        ossl_raise(eASN1Error, "invalid tag default");
    }

    return ret;
}

static int
ossl_asn1_tag_class(VALUE obj)
{
    VALUE s;
    int ret = -1;

    s = ossl_asn1_get_tag_class(obj);
    if(NIL_P(s)) ret = V_ASN1_UNIVERSAL;
    else if(SYMBOL_P(s)){
        if (SYM2ID(s) == sUNIVERSAL)
            ret = V_ASN1_UNIVERSAL;
        else if (SYM2ID(s) == sAPPLICATION)
            ret = V_ASN1_APPLICATION;
        else if (SYM2ID(s) == sCONTEXT_SPECIFIC)
            ret = V_ASN1_CONTEXT_SPECIFIC;
        else if (SYM2ID(s) == sPRIVATE)
            ret = V_ASN1_PRIVATE;
    }
    if(ret < 0){
        ossl_raise(eASN1Error, "invalid tag class");
    }

    return ret;
}

static VALUE
ossl_asn1_class2sym(int tc)
{
    if((tc & V_ASN1_PRIVATE) == V_ASN1_PRIVATE)
        return ID2SYM(sPRIVATE);
    else if((tc & V_ASN1_CONTEXT_SPECIFIC) == V_ASN1_CONTEXT_SPECIFIC)
        return ID2SYM(sCONTEXT_SPECIFIC);
    else if((tc & V_ASN1_APPLICATION) == V_ASN1_APPLICATION)
        return ID2SYM(sAPPLICATION);
    else
        return ID2SYM(sUNIVERSAL);
}

static VALUE
ossl_asn1data_initialize(VALUE self, VALUE value, VALUE tag, VALUE tag_class)
{
    if(!SYMBOL_P(tag_class))
        ossl_raise(eASN1Error, "invalid tag class");
    if((SYM2ID(tag_class) == sUNIVERSAL) && NUM2INT(tag) > 31)
        ossl_raise(eASN1Error, "tag number for Universal too large");
    ossl_asn1_set_tag(self, tag);
    ossl_asn1_set_value(self, value);
    ossl_asn1_set_tag_class(self, tag_class);

    return self;
}

static VALUE
join_der_i(VALUE i, VALUE str)
{
    i = ossl_to_der_if_possible(i);
    StringValue(i);
    rb_str_append(str, i);
    return Qnil;
}

static VALUE
join_der(VALUE enumerable)
{
    VALUE str = rb_str_new(0, 0);
    rb_iterate(rb_each, enumerable, join_der_i, str);
    return str;
}

static VALUE
ossl_asn1data_to_der(VALUE self)
{
    VALUE value, der;
    int tag, tag_class, is_cons = 0;
    long length;
    unsigned char *p;

    value = ossl_asn1_get_value(self);
    if(rb_obj_is_kind_of(value, rb_cArray)){
        is_cons = 1;
        value = join_der(value);
    }
    StringValue(value);

    tag = ossl_asn1_tag(self);
    tag_class = ossl_asn1_tag_class(self);
    if((length = ASN1_object_size(1, RSTRING(value)->len, tag)) <= 0)
        ossl_raise(eASN1Error, NULL);
    der = rb_str_new(0, length);
    p = RSTRING(der)->ptr;
    ASN1_put_object(&p, is_cons, RSTRING(value)->len, tag, tag_class);
    memcpy(p, RSTRING(value)->ptr, RSTRING(value)->len);
    p += RSTRING(value)->len;
    ossl_str_adjust(der, p);

    return der;
}

static VALUE
ossl_asn1_decode0(unsigned char **pp, long length, long *offset, long depth,
                  int once, int yield)
{
    unsigned char *start, *p;
    long len, off = *offset;
    int hlen, tag, tc, j;
    VALUE ary, asn1data, value, tag_class;

    ary = rb_ary_new();
    p = *pp;
    while(length > 0){
        start = p;
        j = ASN1_get_object(&p, &len, &tag, &tc, length);
        if(j & 0x80) ossl_raise(eASN1Error, NULL);
        hlen = p - start;
        if(yield){
            VALUE arg = rb_ary_new();
            rb_ary_push(arg, LONG2NUM(depth));
            rb_ary_push(arg, LONG2NUM(off));
            rb_ary_push(arg, LONG2NUM(hlen));
            rb_ary_push(arg, LONG2NUM(len));
            rb_ary_push(arg, (j & V_ASN1_CONSTRUCTED) ? Qtrue : Qfalse);
            rb_ary_push(arg, ossl_asn1_class2sym(tc));
            rb_ary_push(arg, INT2NUM(tag));
            rb_yield(arg);
        }
        length -= hlen;
        off += hlen;
        if(len > length) ossl_raise(eASN1Error, "value is too short");
        if((tc & V_ASN1_PRIVATE) == V_ASN1_PRIVATE)
            tag_class = sPRIVATE;
        else if((tc & V_ASN1_CONTEXT_SPECIFIC) == V_ASN1_CONTEXT_SPECIFIC)
            tag_class = sCONTEXT_SPECIFIC;
        else if((tc & V_ASN1_APPLICATION) == V_ASN1_APPLICATION)
            tag_class = sAPPLICATION;
        else
            tag_class = sUNIVERSAL;
        if(j & V_ASN1_CONSTRUCTED){
            /* TODO: if j == 0x21 it is indefinite length object. */
            if((j == 0x21) && (len == 0)){
                long lastoff = off;
                value = ossl_asn1_decode0(&p, length, &off, depth+1, 0, yield);
                len = off - lastoff;
            }
            else value = ossl_asn1_decode0(&p, len, &off, depth+1, 0, yield);
        }
        else{
            value = rb_str_new(p, len);
            p += len;
            off += len;
        }
        if(tag_class == sUNIVERSAL &&
           tag < ossl_asn1_info_size && ossl_asn1_info[tag].klass){
            VALUE klass = *ossl_asn1_info[tag].klass;
            long flag;
            if(!rb_obj_is_kind_of(value, rb_cArray)){
                switch(tag){
                case V_ASN1_BOOLEAN:
                    value = decode_bool(start, hlen+len);
                    break;
                case V_ASN1_INTEGER:
                    value = decode_int(start, hlen+len);
                    break;
                case V_ASN1_BIT_STRING:
                    value = decode_bstr(start, hlen+len, &flag);
                    break;
                case V_ASN1_NULL:
                    value = decode_null(start, hlen+len);
                    break;
                case V_ASN1_ENUMERATED:
                    value = decode_enum(start, hlen+len);
                    break;
                case V_ASN1_OBJECT:
                    value = decode_obj(start, hlen+len);
                    break;
                case V_ASN1_UTCTIME:           /* FALLTHROUGH */
                case V_ASN1_GENERALIZEDTIME:
                    value = decode_time(start, hlen+len);
                    break;
                default:
                    /* use original value */
                    break;
                }
            }
            asn1data = rb_funcall(klass, rb_intern("new"), 1, value);
            if(tag == V_ASN1_BIT_STRING){
                rb_iv_set(asn1data, "@unused_bits", LONG2NUM(flag));
            }
        }
        else{
            asn1data = rb_funcall(cASN1Data, rb_intern("new"), 3,
                                  value, INT2NUM(tag), ID2SYM(tag_class));
        }
        rb_ary_push(ary, asn1data);
        length -= len;
        if(once) break;
    }
    *pp = p;
    *offset = off;

    return ary;
}

static VALUE
ossl_asn1_traverse(VALUE self, VALUE obj)
{
    unsigned char *p;
    long offset = 0;
    volatile VALUE tmp;

    obj = ossl_to_der_if_possible(obj);
    tmp = rb_str_new4(StringValue(obj));
    p = RSTRING(tmp)->ptr;
    ossl_asn1_decode0(&p, RSTRING(tmp)->len, &offset, 0, 0, 1);

    return Qnil;
}

static VALUE
ossl_asn1_decode(VALUE self, VALUE obj)
{
    VALUE ret, ary;
    unsigned char *p;
    long offset = 0;
    volatile VALUE tmp;

    obj = ossl_to_der_if_possible(obj);
    tmp = rb_str_new4(StringValue(obj));
    p = RSTRING(tmp)->ptr;
    ary = ossl_asn1_decode0(&p, RSTRING(tmp)->len, &offset, 0, 1, 0);
    ret = rb_ary_entry(ary, 0);

    return ret;
}

static VALUE
ossl_asn1_decode_all(VALUE self, VALUE obj)
{
    VALUE ret;
    unsigned char *p;
    long offset = 0;
    volatile VALUE tmp;

    obj = ossl_to_der_if_possible(obj);
    tmp = rb_str_new4(StringValue(obj));
    p = RSTRING(tmp)->ptr;
    ret = ossl_asn1_decode0(&p, RSTRING(tmp)->len, &offset, 0, 0, 0);

    return ret;
}

static VALUE
ossl_asn1_initialize(int argc, VALUE *argv, VALUE self)
{
    VALUE value, tag, tagging, tag_class;

    rb_scan_args(argc, argv, "13", &value, &tag, &tagging, &tag_class);
    if(argc > 1){
        if(NIL_P(tag))
            ossl_raise(eASN1Error, "must specify tag number");
        if(NIL_P(tagging))
            tagging = ID2SYM(sEXPLICIT);
        if(!SYMBOL_P(tagging))
            ossl_raise(eASN1Error, "invalid tag default");
        if(NIL_P(tag_class))
            tag_class = ID2SYM(sCONTEXT_SPECIFIC);
        if(!SYMBOL_P(tag_class))
            ossl_raise(eASN1Error, "invalid tag class");
        if(SYM2ID(tagging) == sIMPLICIT && NUM2INT(tag) > 31)
            ossl_raise(eASN1Error, "tag number for Universal too large");
    }
    else{
        tag = INT2NUM(ossl_asn1_default_tag(self));
        tagging = Qnil;
        tag_class = ID2SYM(sUNIVERSAL);
    }
    ossl_asn1_set_tag(self, tag);
    ossl_asn1_set_value(self, value);
    ossl_asn1_set_tagging(self, tagging);
    ossl_asn1_set_tag_class(self, tag_class);

    return self;
}

static int
ossl_i2d_ASN1_TYPE(ASN1_TYPE *a, unsigned char **pp)
{
#if OPENSSL_VERSION_NUMBER < 0x00907000L
    if(!a) return 0;
    if(a->type == V_ASN1_BOOLEAN)
        return i2d_ASN1_BOOLEAN(a->value.boolean, pp);
#endif
    return i2d_ASN1_TYPE(a, pp);
}

static void
ossl_ASN1_TYPE_free(ASN1_TYPE *a)
{
#if OPENSSL_VERSION_NUMBER < 0x00907000L
    if(!a) return;
    if(a->type == V_ASN1_BOOLEAN){
        OPENSSL_free(a);
        return;
    }
#endif
    ASN1_TYPE_free(a);
}

static VALUE
ossl_asn1prim_to_der(VALUE self)
{
    ASN1_TYPE *asn1;
    int tn, tc, explicit;
    long length, reallen;
    unsigned char *buf, *p;
    VALUE str;

    tn = NUM2INT(ossl_asn1_get_tag(self));
    tc = ossl_asn1_tag_class(self);
    explicit = ossl_asn1_is_explicit(self);
    asn1 = ossl_asn1_get_asn1type(self);

    length = ASN1_object_size(1, ossl_i2d_ASN1_TYPE(asn1, NULL), tn);
    if(!(buf = OPENSSL_malloc(length))){
        ossl_ASN1_TYPE_free(asn1);
        ossl_raise(eASN1Error, "cannot alloc buffer");
    }
    p = buf;
    if(tc == V_ASN1_UNIVERSAL) ossl_i2d_ASN1_TYPE(asn1, &p);
    else{
        if(explicit){
            ASN1_put_object(&p, 1, ossl_i2d_ASN1_TYPE(asn1, NULL), tn, tc);
            ossl_i2d_ASN1_TYPE(asn1, &p);
        }
        else{
            ossl_i2d_ASN1_TYPE(asn1, &p);
            *buf = tc | tn | (*buf & V_ASN1_CONSTRUCTED);
        }
    }
    ossl_ASN1_TYPE_free(asn1);
    reallen = p - buf;
    assert(reallen <= length);
    str = ossl_buf2str(buf, reallen); /* buf will be free in ossl_buf2str */

    return str;
}

static VALUE
ossl_asn1cons_to_der(VALUE self)
{
    int tag, tn, tc, explicit;
    long seq_len, length;
    unsigned char *p;
    VALUE value, str;

    tag = ossl_asn1_default_tag(self);
    tn = NUM2INT(ossl_asn1_get_tag(self));
    tc = ossl_asn1_tag_class(self);
    explicit = ossl_asn1_is_explicit(self);
    value = join_der(ossl_asn1_get_value(self));

    seq_len = ASN1_object_size(1, RSTRING(value)->len, tag);
    length = ASN1_object_size(1, seq_len, tn);
    str = rb_str_new(0, length);
    p = RSTRING(str)->ptr;
    if(tc == V_ASN1_UNIVERSAL)
        ASN1_put_object(&p, 1, RSTRING(value)->len, tn, tc);
    else{
        if(explicit){
            ASN1_put_object(&p, 1, seq_len, tn, tc);
            ASN1_put_object(&p, 1, RSTRING(value)->len, tag, V_ASN1_UNIVERSAL);
        }
        else ASN1_put_object(&p, 1, RSTRING(value)->len, tn, tc);
    }
    memcpy(p, RSTRING(value)->ptr, RSTRING(value)->len);
    p += RSTRING(value)->len;
    ossl_str_adjust(str, p);

    return str;
}

static VALUE
ossl_asn1cons_each(VALUE self)
{
    rb_ary_each(ossl_asn1_get_value(self));
    return self;
}

static VALUE
ossl_asn1obj_s_register(VALUE self, VALUE oid, VALUE sn, VALUE ln)
{
    StringValue(oid);
    StringValue(sn);
    StringValue(ln);

    if(!OBJ_create(RSTRING(oid)->ptr, RSTRING(sn)->ptr, RSTRING(ln)->ptr))
        ossl_raise(eASN1Error, NULL);

    return Qtrue;
}

static VALUE
ossl_asn1obj_get_sn(VALUE self)
{
    VALUE val, ret = Qnil;
    int nid;

    val = ossl_asn1_get_value(self);
    if ((nid = OBJ_txt2nid(StringValuePtr(val))) != NID_undef)
        ret = rb_str_new2(OBJ_nid2sn(nid));

    return ret;
}

static VALUE
ossl_asn1obj_get_ln(VALUE self)
{
    VALUE val, ret = Qnil;
    int nid;

    val = ossl_asn1_get_value(self);
    if ((nid = OBJ_txt2nid(StringValuePtr(val))) != NID_undef)
        ret = rb_str_new2(OBJ_nid2ln(nid));

    return ret;
}

static VALUE
ossl_asn1obj_get_oid(VALUE self)
{
    VALUE val;
    ASN1_OBJECT *a1obj;
    char buf[128];

    val = ossl_asn1_get_value(self);
    a1obj = obj_to_asn1obj(val);
    OBJ_obj2txt(buf, sizeof(buf), a1obj, 1);
    ASN1_OBJECT_free(a1obj);

    return rb_str_new2(buf);
}

#define OSSL_ASN1_IMPL_FACTORY_METHOD(klass) \
static VALUE ossl_asn1_##klass(int argc, VALUE *argv, VALUE self)\
{ return rb_funcall3(cASN1##klass, rb_intern("new"), argc, argv); }

OSSL_ASN1_IMPL_FACTORY_METHOD(Boolean)
OSSL_ASN1_IMPL_FACTORY_METHOD(Integer)
OSSL_ASN1_IMPL_FACTORY_METHOD(Enumerated)
OSSL_ASN1_IMPL_FACTORY_METHOD(BitString)
OSSL_ASN1_IMPL_FACTORY_METHOD(OctetString)
OSSL_ASN1_IMPL_FACTORY_METHOD(UTF8String)
OSSL_ASN1_IMPL_FACTORY_METHOD(NumericString)
OSSL_ASN1_IMPL_FACTORY_METHOD(PrintableString)
OSSL_ASN1_IMPL_FACTORY_METHOD(T61String)
OSSL_ASN1_IMPL_FACTORY_METHOD(VideotexString)
OSSL_ASN1_IMPL_FACTORY_METHOD(IA5String)
OSSL_ASN1_IMPL_FACTORY_METHOD(GraphicString)
OSSL_ASN1_IMPL_FACTORY_METHOD(ISO64String)
OSSL_ASN1_IMPL_FACTORY_METHOD(GeneralString)
OSSL_ASN1_IMPL_FACTORY_METHOD(UniversalString)
OSSL_ASN1_IMPL_FACTORY_METHOD(BMPString)
OSSL_ASN1_IMPL_FACTORY_METHOD(Null)
OSSL_ASN1_IMPL_FACTORY_METHOD(ObjectId)
OSSL_ASN1_IMPL_FACTORY_METHOD(UTCTime)
OSSL_ASN1_IMPL_FACTORY_METHOD(GeneralizedTime)
OSSL_ASN1_IMPL_FACTORY_METHOD(Sequence)
OSSL_ASN1_IMPL_FACTORY_METHOD(Set)

void
Init_ossl_asn1()
{
    VALUE ary;
    int i;

    sUNIVERSAL = rb_intern("UNIVERSAL");
    sCONTEXT_SPECIFIC = rb_intern("CONTEXT_SPECIFIC");
    sAPPLICATION = rb_intern("APPLICATION");
    sPRIVATE = rb_intern("PRIVATE");
    sEXPLICIT = rb_intern("EXPLICIT");
    sIMPLICIT = rb_intern("IMPLICIT");

    mASN1 = rb_define_module_under(mOSSL, "ASN1");
    eASN1Error = rb_define_class_under(mASN1, "ASN1Error", eOSSLError);
    rb_define_module_function(mASN1, "traverse", ossl_asn1_traverse, 1);
    rb_define_module_function(mASN1, "decode", ossl_asn1_decode, 1);
    rb_define_module_function(mASN1, "decode_all", ossl_asn1_decode_all, 1);
    ary = rb_ary_new();
    rb_define_const(mASN1, "UNIVERSAL_TAG_NAME", ary);
    for(i = 0; i < ossl_asn1_info_size; i++){
        if(ossl_asn1_info[i].name[0] == '[') continue;
        rb_define_const(mASN1, ossl_asn1_info[i].name, INT2NUM(i));
        rb_ary_store(ary, i, rb_str_new2(ossl_asn1_info[i].name));
    }

    cASN1Data = rb_define_class_under(mASN1, "ASN1Data", rb_cObject);
    rb_attr(cASN1Data, rb_intern("value"), 1, 1, Qtrue);
    rb_attr(cASN1Data, rb_intern("tag"), 1, 1, Qtrue);
    rb_attr(cASN1Data, rb_intern("tag_class"), 1, 1, Qtrue);
    rb_define_method(cASN1Data, "initialize", ossl_asn1data_initialize, 3);
    rb_define_method(cASN1Data, "to_der", ossl_asn1data_to_der, 0);

    cASN1Primitive = rb_define_class_under(mASN1, "Primitive", cASN1Data);
    rb_attr(cASN1Primitive, rb_intern("tagging"), 1, 1, Qtrue);
    rb_define_method(cASN1Primitive, "initialize", ossl_asn1_initialize, -1);
    rb_define_method(cASN1Primitive, "to_der", ossl_asn1prim_to_der, 0);

    cASN1Constructive = rb_define_class_under(mASN1,"Constructive", cASN1Data);
    rb_include_module(cASN1Constructive, rb_mEnumerable);
    rb_attr(cASN1Constructive, rb_intern("tagging"), 1, 1, Qtrue);
    rb_define_method(cASN1Constructive, "initialize", ossl_asn1_initialize, -1);
    rb_define_method(cASN1Constructive, "to_der", ossl_asn1cons_to_der, 0);
    rb_define_method(cASN1Constructive, "each", ossl_asn1cons_each, 0);

#define OSSL_ASN1_DEFINE_CLASS(name, super) \
do{\
    cASN1##name = rb_define_class_under(mASN1, #name, cASN1##super);\
    rb_define_module_function(mASN1, #name, ossl_asn1_##name, -1);\
}while(0)

    OSSL_ASN1_DEFINE_CLASS(Boolean, Primitive);
    OSSL_ASN1_DEFINE_CLASS(Integer, Primitive);
    OSSL_ASN1_DEFINE_CLASS(Enumerated, Primitive);
    OSSL_ASN1_DEFINE_CLASS(BitString, Primitive);
    OSSL_ASN1_DEFINE_CLASS(OctetString, Primitive);
    OSSL_ASN1_DEFINE_CLASS(UTF8String, Primitive);
    OSSL_ASN1_DEFINE_CLASS(NumericString, Primitive);
    OSSL_ASN1_DEFINE_CLASS(PrintableString, Primitive);
    OSSL_ASN1_DEFINE_CLASS(T61String, Primitive);
    OSSL_ASN1_DEFINE_CLASS(VideotexString, Primitive);
    OSSL_ASN1_DEFINE_CLASS(IA5String, Primitive);
    OSSL_ASN1_DEFINE_CLASS(GraphicString, Primitive);
    OSSL_ASN1_DEFINE_CLASS(ISO64String, Primitive);
    OSSL_ASN1_DEFINE_CLASS(GeneralString, Primitive);
    OSSL_ASN1_DEFINE_CLASS(UniversalString, Primitive);
    OSSL_ASN1_DEFINE_CLASS(BMPString, Primitive);
    OSSL_ASN1_DEFINE_CLASS(Null, Primitive);
    OSSL_ASN1_DEFINE_CLASS(ObjectId, Primitive);
    OSSL_ASN1_DEFINE_CLASS(UTCTime, Primitive);
    OSSL_ASN1_DEFINE_CLASS(GeneralizedTime, Primitive);

    OSSL_ASN1_DEFINE_CLASS(Sequence, Constructive);
    OSSL_ASN1_DEFINE_CLASS(Set, Constructive);

    rb_define_singleton_method(cASN1ObjectId, "register", ossl_asn1obj_s_register, 3);
    rb_define_method(cASN1ObjectId, "sn", ossl_asn1obj_get_sn, 0);
    rb_define_method(cASN1ObjectId, "ln", ossl_asn1obj_get_ln, 0);
    rb_define_method(cASN1ObjectId, "oid", ossl_asn1obj_get_oid, 0);
    rb_define_alias(cASN1ObjectId, "short_name", "sn");
    rb_define_alias(cASN1ObjectId, "long_name", "ln");
    rb_attr(cASN1BitString, rb_intern("unused_bits"), 1, 1, Qtrue);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl_asn1.h

root/ext/openssl/ossl_asn1.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/*
 * $Id: ossl_asn1.h,v 1.4 2005/09/07 07:40:53 gotoyuzo Exp $
 * 'OpenSSL for Ruby' team members
 * Copyright (C) 2003
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#if !defined(_OSSL_ASN1_H_)
#define _OSSL_ASN1_H_

/*
 * ASN1_DATE conversions
 */
VALUE asn1time_to_time(ASN1_TIME *);
time_t time_to_time_t(VALUE);

/*
 * ASN1_STRING conversions
 */
VALUE asn1str_to_str(ASN1_STRING *);

/*
 * ASN1_INTEGER conversions
 */
VALUE asn1integer_to_num(ASN1_INTEGER *);
ASN1_INTEGER *num_to_asn1integer(VALUE, ASN1_INTEGER *);

/*
 * ASN1 module
 */
extern VALUE mASN1;
extern VALUE eASN1Error;

extern VALUE cASN1Data;
extern VALUE cASN1Primitive;
extern VALUE cASN1Constructive;

extern VALUE cASN1Boolean;                           /* BOOLEAN           */
extern VALUE cASN1Integer, cASN1Enumerated;          /* INTEGER           */
extern VALUE cASN1BitString;                         /* BIT STRING        */
extern VALUE cASN1OctetString, cASN1UTF8String;      /* STRINGs           */
extern VALUE cASN1NumericString, cASN1PrintableString;
extern VALUE cASN1T61String, cASN1VideotexString;
extern VALUE cASN1IA5String, cASN1GraphicString;
extern VALUE cASN1ISO64String, cASN1GeneralString;
extern VALUE cASN1UniversalString, cASN1BMPString;
extern VALUE cASN1Null;                              /* NULL              */
extern VALUE cASN1ObjectId;                          /* OBJECT IDENTIFIER */
extern VALUE cASN1UTCTime, cASN1GeneralizedTime;     /* TIME              */
extern VALUE cASN1Sequence, cASN1Set;                /* CONSTRUCTIVE      */

ASN1_TYPE *ossl_asn1_get_asn1type(VALUE);

void Init_ossl_asn1(void);

#endif
/* [<][>][^][v][top][bottom][index] [help] */


ext/openssl/ossl_bio.c

root/ext/openssl/ossl_bio.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. ossl_obj2bio
  2. ossl_protect_obj2bio
  3. ossl_membio2str0
  4. ossl_protect_membio2str
  5. ossl_membio2str
/*
 * $Id: ossl_bio.c,v 1.4 2005/06/19 16:28:19 gotoyuzo Exp $
 * 'OpenSSL for Ruby' team members
 * Copyright (C) 2003
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#include "ossl.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

BIO *
ossl_obj2bio(VALUE obj)
{
    BIO *bio;

    if (TYPE(obj) == T_FILE) {
        OpenFile *fptr;
        FILE *fp;
        int fd;

        GetOpenFile(obj, fptr);
        rb_io_check_readable(fptr);
        if ((fd = dup(fptr->fd)) < 0){
            rb_sys_fail(0);
        }
        if (!(fp = fdopen(fd, "r"))){
            close(fd);
            rb_sys_fail(0);
        }
        if (!(bio = BIO_new_fp(fp, BIO_CLOSE))){
            fclose(fp);
            ossl_raise(eOSSLError, NULL);
        }
    }
    else {
        StringValue(obj);
        bio = BIO_new_mem_buf(RSTRING(obj)->ptr, RSTRING(obj)->len);
        if (!bio) ossl_raise(eOSSLError, NULL);
    }

    return bio;
}

BIO *
ossl_protect_obj2bio(VALUE obj, int *status)
{
     BIO *ret = NULL;
     ret = (BIO*)rb_protect((VALUE(*)_((VALUE)))ossl_obj2bio, obj, status);
     return ret;
}

VALUE
ossl_membio2str0(BIO *bio)
{
    VALUE ret;
    BUF_MEM *buf;

    BIO_get_mem_ptr(bio, &buf);
    ret = rb_str_new(buf->data, buf->length);

    return ret;
}

VALUE
ossl_protect_membio2str(BIO *bio, int *status)
{
    return rb_protect((VALUE(*)_((VALUE)))ossl_membio2str0, (VALUE)bio, status);
}

VALUE
ossl_membio2str(BIO *bio)
{
    VALUE ret;
    int status = 0;

    ret = ossl_protect_membio2str(bio, &status);
    BIO_free(bio);
    if(status) rb_jump_tag(status);

    return ret;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl_bio.h

root/ext/openssl/ossl_bio.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/*
 * $Id: ossl_bio.h,v 1.2 2003/09/17 09:05:01 gotoyuzo Exp $
 * 'OpenSSL for Ruby' team members
 * Copyright (C) 2003
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#if !defined(_OSSL_BIO_H_)
#define _OSSL_BIO_H_

BIO *ossl_obj2bio(VALUE);
BIO *ossl_protect_obj2bio(VALUE,int*);
VALUE ossl_membio2str0(BIO*);
VALUE ossl_membio2str(BIO*);
VALUE ossl_protect_membio2str(BIO*,int*);

#endif
/* [<][>][^][v][top][bottom][index] [help] */


ext/openssl/ossl_bn.c

root/ext/openssl/ossl_bn.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. ossl_bn_new
  2. GetBNPtr
  3. ossl_bn_alloc
  4. ossl_bn_initialize
  5. ossl_bn_to_s
  6. ossl_bn_to_i
  7. ossl_bn_to_bn
  8. ossl_bn_coerce
  9. ossl_bn_div
  10. ossl_bn_is_bit_set
  11. ossl_bn_s_generate_prime
  12. ossl_bn_copy
  13. ossl_bn_eql
  14. ossl_bn_is_prime
  15. ossl_bn_is_prime_fasttest
  16. Init_ossl_bn
/*
 * $Id: ossl_bn.c,v 1.6 2004/12/15 06:35:53 matz Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Technorama team <oss-ruby@technorama.net>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
/* modified by Michal Rokos <m.rokos@sh.cvut.cz> */
#include "ossl.h"

#define WrapBN(klass, obj, bn) do { \
  if (!bn) { \
    ossl_raise(rb_eRuntimeError, "BN wasn't initialized!"); \
  } \
  obj = Data_Wrap_Struct(klass, 0, BN_clear_free, bn); \
} while (0)

#define GetBN(obj, bn) do { \
  Data_Get_Struct(obj, BIGNUM, bn); \
  if (!bn) { \
    ossl_raise(rb_eRuntimeError, "BN wasn't initialized!"); \
  } \
} while (0)

#define SafeGetBN(obj, bn) do { \
  OSSL_Check_Kind(obj, cBN); \
  GetBN(obj, bn); \
} while (0)

/*
 * Classes
 */
VALUE cBN;
VALUE eBNError;

/*
 * Public
 */
VALUE
ossl_bn_new(BIGNUM *bn)
{
    BIGNUM *newbn;
    VALUE obj;

    newbn = bn ? BN_dup(bn) : BN_new();
    if (!newbn) {
        ossl_raise(eBNError, NULL);
    }
    WrapBN(cBN, obj, newbn);

    return obj;
}

BIGNUM *
GetBNPtr(VALUE obj)
{
    BIGNUM *bn = NULL;

    if (RTEST(rb_obj_is_kind_of(obj, cBN))) {
        GetBN(obj, bn);
    } else switch (TYPE(obj)) {
    case T_FIXNUM:
    case T_BIGNUM:
        obj = rb_String(obj);
        if (!BN_dec2bn(&bn, StringValuePtr(obj))) {
            ossl_raise(eBNError, NULL);
        }
        WrapBN(cBN, obj, bn); /* Handle potencial mem leaks */
        break;
    default:
        ossl_raise(rb_eTypeError, "Cannot convert into OpenSSL::BN");
    }
    return bn;
}

/*
 * Private
 */
/*
 * BN_CTX - is used in more difficult math. ops
 * (Why just 1? Because Ruby itself isn't thread safe,
 *  we don't need to care about threads)
 */
BN_CTX *ossl_bn_ctx;

static VALUE
ossl_bn_alloc(VALUE klass)
{
    BIGNUM *bn;
    VALUE obj;

    if (!(bn = BN_new())) {
        ossl_raise(eBNError, NULL);
    }
    WrapBN(klass, obj, bn);

    return obj;
}

static VALUE
ossl_bn_initialize(int argc, VALUE *argv, VALUE self)
{
    BIGNUM *bn;
    VALUE str, bs;
    int base = 10;

    if (rb_scan_args(argc, argv, "11", &str, &bs) == 2) {
        base = NUM2INT(bs);
    }
    StringValue(str);
    GetBN(self, bn);
    if (RTEST(rb_obj_is_kind_of(str, cBN))) {
        BIGNUM *other;

        GetBN(str, other); /* Safe - we checked kind_of? above */
        if (!BN_copy(bn, other)) {
            ossl_raise(eBNError, NULL);
        }
        return self;
    }

    switch (base) {
    case 0:
        if (!BN_mpi2bn(RSTRING(str)->ptr, RSTRING(str)->len, bn)) {
            ossl_raise(eBNError, NULL);
        }
        break;
    case 2:
        if (!BN_bin2bn(RSTRING(str)->ptr, RSTRING(str)->len, bn)) {
            ossl_raise(eBNError, NULL);
        }
        break;
    case 10:
        if (!BN_dec2bn(&bn, RSTRING(str)->ptr)) {
            ossl_raise(eBNError, NULL);
        }
        break;
    case 16:
        if (!BN_hex2bn(&bn, RSTRING(str)->ptr)) {
            ossl_raise(eBNError, NULL);
        }
        break;
    default:
        ossl_raise(rb_eArgError, "illegal radix %d", base);
    }
    return self;
}

static VALUE
ossl_bn_to_s(int argc, VALUE *argv, VALUE self)
{
    BIGNUM *bn;
    VALUE str, bs;
    int base = 10, len;
    char *buf;

    if (rb_scan_args(argc, argv, "01", &bs) == 1) {
        base = NUM2INT(bs);
    }
    GetBN(self, bn);
    switch (base) {
    case 0:
        len = BN_bn2mpi(bn, NULL);
        str = rb_str_new(0, len);
        if (BN_bn2mpi(bn, RSTRING(str)->ptr) != len)
            ossl_raise(eBNError, NULL);
        break;
    case 2:
        len = BN_num_bytes(bn);
        str = rb_str_new(0, len);
        if (BN_bn2bin(bn, RSTRING(str)->ptr) != len)
            ossl_raise(eBNError, NULL);
        break;
    case 10:
        if (!(buf = BN_bn2dec(bn))) ossl_raise(eBNError, NULL);
        str = ossl_buf2str(buf, strlen(buf));
        break;
    case 16:
        if (!(buf = BN_bn2hex(bn))) ossl_raise(eBNError, NULL);
        str = ossl_buf2str(buf, strlen(buf));
        break;
    default:
        ossl_raise(rb_eArgError, "illegal radix %d", base);
    }

    return str;
}

static VALUE
ossl_bn_to_i(VALUE self)
{
    BIGNUM *bn;
    char *txt;
    VALUE num;

    GetBN(self, bn);

    if (!(txt = BN_bn2dec(bn))) {
        ossl_raise(eBNError, NULL);
    }
    num = rb_cstr_to_inum(txt, 10, Qtrue);
    OPENSSL_free(txt);

    return num;
}

static VALUE
ossl_bn_to_bn(VALUE self)
{
    return self;
}

static VALUE
ossl_bn_coerce(VALUE self, VALUE other)
{
    switch(TYPE(other)) {
    case T_STRING:
        self = ossl_bn_to_s(0, NULL, self);
        break;
    case T_FIXNUM:
    case T_BIGNUM:
        self = ossl_bn_to_i(self);
        break;
    default:
        if (!RTEST(rb_obj_is_kind_of(other, cBN))) {
            ossl_raise(rb_eTypeError, "Don't know how to coerce");
        }
    }
    return rb_assoc_new(other, self);
}

#define BIGNUM_BOOL1(func)                              \
    static VALUE                                        \
    ossl_bn_##func(VALUE self)                          \
    {                                                   \
        BIGNUM *bn;                                     \
        GetBN(self, bn);                                \
        if (BN_##func(bn)) {                            \
            return Qtrue;                               \
        }                                               \
        return Qfalse;                                  \
    }
BIGNUM_BOOL1(is_zero);
BIGNUM_BOOL1(is_one);
BIGNUM_BOOL1(is_odd);

#define BIGNUM_1c(func)                                 \
    static VALUE                                        \
    ossl_bn_##func(VALUE self)                          \
    {                                                   \
        BIGNUM *bn, *result;                            \
        VALUE obj;                                      \
        GetBN(self, bn);                                \
        if (!(result = BN_new())) {                     \
            ossl_raise(eBNError, NULL);                 \
        }                                               \
        if (!BN_##func(result, bn, ossl_bn_ctx)) {      \
            BN_free(result);                            \
            ossl_raise(eBNError, NULL);                 \
        }                                               \
        WrapBN(CLASS_OF(self), obj, result);            \
        return obj;                                     \
    }
BIGNUM_1c(sqr);

#define BIGNUM_2(func)                                  \
    static VALUE                                        \
    ossl_bn_##func(VALUE self, VALUE other)             \
    {                                                   \
        BIGNUM *bn1, *bn2 = GetBNPtr(other), *result;   \
        VALUE obj;                                      \
        GetBN(self, bn1);                               \
        if (!(result = BN_new())) {                     \
            ossl_raise(eBNError, NULL);                 \
        }                                               \
        if (!BN_##func(result, bn1, bn2)) {             \
            BN_free(result);                            \
            ossl_raise(eBNError, NULL);                 \
        }                                               \
        WrapBN(CLASS_OF(self), obj, result);            \
        return obj;                                     \
    }
BIGNUM_2(add);
BIGNUM_2(sub);

#define BIGNUM_2c(func)                                         \
    static VALUE                                                \
    ossl_bn_##func(VALUE self, VALUE other)                     \
    {                                                           \
        BIGNUM *bn1, *bn2 = GetBNPtr(other), *result;           \
        VALUE obj;                                              \
        GetBN(self, bn1);                                       \
        if (!(result = BN_new())) {                             \
            ossl_raise(eBNError, NULL);                         \
        }                                                       \
        if (!BN_##func(result, bn1, bn2, ossl_bn_ctx)) {        \
            BN_free(result);                                    \
            ossl_raise(eBNError, NULL);                         \
        }                                                       \
        WrapBN(CLASS_OF(self), obj, result);                    \
        return obj;                                             \
    }
BIGNUM_2c(mul);
BIGNUM_2c(mod);
BIGNUM_2c(exp);
BIGNUM_2c(gcd);
BIGNUM_2c(mod_sqr);
BIGNUM_2c(mod_inverse);

static VALUE
ossl_bn_div(VALUE self, VALUE other)
{
    BIGNUM *bn1, *bn2 = GetBNPtr(other), *r1, *r2;
    VALUE obj1, obj2;

    GetBN(self, bn1);

    if (!(r1 = BN_new())) {
        ossl_raise(eBNError, NULL);
    }
    if (!(r2 = BN_new())) {
        BN_free(r1);
        ossl_raise(eBNError, NULL);
    }
    if (!BN_div(r1, r2, bn1, bn2, ossl_bn_ctx)) {
        BN_free(r1);
        BN_free(r2);
        ossl_raise(eBNError, NULL);
    }
    WrapBN(CLASS_OF(self), obj1, r1);
    WrapBN(CLASS_OF(self), obj2, r2);

    return rb_ary_new3(2, obj1, obj2);
}

#define BIGNUM_3c(func)                                         \
    static VALUE                                                \
    ossl_bn_##func(VALUE self, VALUE other1, VALUE other2)      \
    {                                                           \
        BIGNUM *bn1, *bn2 = GetBNPtr(other1);                   \
        BIGNUM *bn3 = GetBNPtr(other2), *result;                \
        VALUE obj;                                              \
        GetBN(self, bn1);                                       \
        if (!(result = BN_new())) {                             \
            ossl_raise(eBNError, NULL);                         \
        }                                                       \
        if (!BN_##func(result, bn1, bn2, bn3, ossl_bn_ctx)) {   \
            BN_free(result);                                    \
            ossl_raise(eBNError, NULL);                         \
        }                                                       \
        WrapBN(CLASS_OF(self), obj, result);                    \
        return obj;                                             \
    }
BIGNUM_3c(mod_add);
BIGNUM_3c(mod_sub);
BIGNUM_3c(mod_mul);
BIGNUM_3c(mod_exp);

#define BIGNUM_BIT(func)                                \
    static VALUE                                        \
    ossl_bn_##func(VALUE self, VALUE bit)               \
    {                                                   \
        BIGNUM *bn;                                     \
        GetBN(self, bn);                                \
        if (!BN_##func(bn, NUM2INT(bit))) {             \
            ossl_raise(eBNError, NULL);                 \
        }                                               \
        return self;                                    \
    }
BIGNUM_BIT(set_bit);
BIGNUM_BIT(clear_bit);
BIGNUM_BIT(mask_bits);

static VALUE
ossl_bn_is_bit_set(VALUE self, VALUE bit)
{
    int b;
    BIGNUM *bn;

    b = NUM2INT(bit);
    GetBN(self, bn);
    if (BN_is_bit_set(bn, b)) {
        return Qtrue;
    }
    return Qfalse;
}

#define BIGNUM_SHIFT(func)                              \
    static VALUE                                        \
    ossl_bn_##func(VALUE self, VALUE bits)              \
    {                                                   \
        BIGNUM *bn, *result;                            \
        int b;                                          \
        VALUE obj;                                      \
        b = NUM2INT(bits);                              \
        GetBN(self, bn);                                \
        if (!(result = BN_new())) {                     \
                ossl_raise(eBNError, NULL);             \
        }                                               \
        if (!BN_##func(result, bn, b)) {                \
                BN_free(result);                        \
                ossl_raise(eBNError, NULL);             \
        }                                               \
        WrapBN(CLASS_OF(self), obj, result);            \
        return obj;                                     \
    }
BIGNUM_SHIFT(lshift);
BIGNUM_SHIFT(rshift);

#define BIGNUM_RAND(func)                                       \
    static VALUE                                                \
    ossl_bn_s_##func(int argc, VALUE *argv, VALUE klass)        \
    {                                                           \
        BIGNUM *result;                                         \
        int bottom = 0, top = 0, b;                             \
        VALUE bits, fill, odd, obj;                             \
                                                                \
        switch (rb_scan_args(argc, argv, "12", &bits, &fill, &odd)) {   \
        case 3:                                                 \
            bottom = (odd == Qtrue) ? 1 : 0;                    \
            /* FALLTHROUGH */                                   \
        case 2:                                                 \
            top = FIX2INT(fill);                                \
        }                                                       \
        b = NUM2INT(bits);                                      \
        if (!(result = BN_new())) {                             \
            ossl_raise(eBNError, NULL);                         \
        }                                                       \
        if (!BN_##func(result, b, top, bottom)) {               \
            BN_free(result);                                    \
            ossl_raise(eBNError, NULL);                         \
        }                                                       \
        WrapBN(klass, obj, result);                             \
        return obj;                                             \
    }
BIGNUM_RAND(rand);
BIGNUM_RAND(pseudo_rand);

#define BIGNUM_RAND_RANGE(func)                                 \
    static VALUE                                                \
    ossl_bn_s_##func##_range(VALUE klass, VALUE range)          \
    {                                                           \
        BIGNUM *bn = GetBNPtr(range), *result;                  \
        VALUE obj;                                              \
        if (!(result = BN_new())) {                             \
            ossl_raise(eBNError, NULL);                         \
        }                                                       \
        if (!BN_##func##_range(result, bn)) {                   \
            BN_free(result);                                    \
            ossl_raise(eBNError, NULL);                         \
        }                                                       \
        WrapBN(klass, obj, result);                             \
        return obj;                                             \
    }
BIGNUM_RAND_RANGE(rand);
BIGNUM_RAND_RANGE(pseudo_rand);

static VALUE
ossl_bn_s_generate_prime(int argc, VALUE *argv, VALUE klass)
{
    BIGNUM *add = NULL, *rem = NULL, *result;
    int safe = 1, num;
    VALUE vnum, vsafe, vadd, vrem, obj;

    rb_scan_args(argc, argv, "13", &vnum, &vsafe, &vadd, &vrem);

    num = NUM2INT(vnum);

    if (vsafe == Qfalse) {
        safe = 0;
    }
    if (!NIL_P(vadd)) {
        if (NIL_P(vrem)) {
            ossl_raise(rb_eArgError,
                       "if ADD is specified, REM must be also given");
        }
        add = GetBNPtr(vadd);
        rem = GetBNPtr(vrem);
    }
    if (!(result = BN_new())) {
        ossl_raise(eBNError, NULL);
    }
    if (!BN_generate_prime(result, num, safe, add, rem, NULL, NULL)) {
        BN_free(result);
        ossl_raise(eBNError, NULL);
    }
    WrapBN(klass, obj, result);

        return obj;
}

#define BIGNUM_NUM(func)                        \
    static VALUE                                \
    ossl_bn_##func(VALUE self)                  \
    {                                           \
        BIGNUM *bn;                             \
        GetBN(self, bn);                        \
        return INT2FIX(BN_##func(bn));          \
    }
BIGNUM_NUM(num_bytes);
BIGNUM_NUM(num_bits);

static VALUE
ossl_bn_copy(VALUE self, VALUE other)
{
    BIGNUM *bn1, *bn2;

    rb_check_frozen(self);

    if (self == other) return self;

    GetBN(self, bn1);
    bn2 = GetBNPtr(other);

    if (!BN_copy(bn1, bn2)) {
        ossl_raise(eBNError, NULL);
    }
    return self;
}

#define BIGNUM_CMP(func)                                \
    static VALUE                                        \
    ossl_bn_##func(VALUE self, VALUE other)             \
    {                                                   \
        BIGNUM *bn1, *bn2 = GetBNPtr(other);            \
        GetBN(self, bn1);                               \
        return INT2FIX(BN_##func(bn1, bn2));            \
    }
BIGNUM_CMP(cmp);
BIGNUM_CMP(ucmp);

static VALUE
ossl_bn_eql(VALUE self, VALUE other)
{
    if (ossl_bn_cmp(self, other) == INT2FIX(0)) {
        return Qtrue;
    }
    return Qfalse;
}

static VALUE
ossl_bn_is_prime(int argc, VALUE *argv, VALUE self)
{
    BIGNUM *bn;
    VALUE vchecks;
    int checks = BN_prime_checks;

    if (rb_scan_args(argc, argv, "01", &vchecks) == 0) {
        checks = NUM2INT(vchecks);
    }
    GetBN(self, bn);
    switch (BN_is_prime(bn, checks, NULL, ossl_bn_ctx, NULL)) {
    case 1:
        return Qtrue;
    case 0:
        return Qfalse;
    default:
        ossl_raise(eBNError, NULL);
    }
    /* not reachable */
    return Qnil;
}

static VALUE
ossl_bn_is_prime_fasttest(int argc, VALUE *argv, VALUE self)
{
    BIGNUM *bn;
    VALUE vchecks, vtrivdiv;
    int checks = BN_prime_checks, do_trial_division = 1;

    rb_scan_args(argc, argv, "02", &vchecks, &vtrivdiv);

    if (!NIL_P(vchecks)) {
        checks = NUM2INT(vchecks);
    }
    GetBN(self, bn);
    /* handle true/false */
    if (vtrivdiv == Qfalse) {
        do_trial_division = 0;
    }
    switch (BN_is_prime_fasttest(bn, checks, NULL, ossl_bn_ctx, NULL, do_trial_division)) {
    case 1:
        return Qtrue;
    case 0:
        return Qfalse;
    default:
        ossl_raise(eBNError, NULL);
    }
    /* not reachable */
    return Qnil;
}

/*
 * INIT
 * (NOTE: ordering of methods is the same as in 'man bn')
 */
void
Init_ossl_bn()
{
    if (!(ossl_bn_ctx = BN_CTX_new())) {
        ossl_raise(rb_eRuntimeError, "Cannot init BN_CTX");
    }

    eBNError = rb_define_class_under(mOSSL, "BNError", eOSSLError);

    cBN = rb_define_class_under(mOSSL, "BN", rb_cObject);

    rb_define_alloc_func(cBN, ossl_bn_alloc);
    rb_define_method(cBN, "initialize", ossl_bn_initialize, -1);

    rb_define_copy_func(cBN, ossl_bn_copy);
    rb_define_method(cBN, "copy", ossl_bn_copy, 1);

    /* swap (=coerce?) */

    rb_define_method(cBN, "num_bytes", ossl_bn_num_bytes, 0);
    rb_define_method(cBN, "num_bits", ossl_bn_num_bits, 0);
    /* num_bits_word */

    rb_define_method(cBN, "+", ossl_bn_add, 1);
    rb_define_method(cBN, "-", ossl_bn_sub, 1);
    rb_define_method(cBN, "*", ossl_bn_mul, 1);
    rb_define_method(cBN, "sqr", ossl_bn_sqr, 0);
    rb_define_method(cBN, "/", ossl_bn_div, 1);
    rb_define_method(cBN, "%", ossl_bn_mod, 1);
    /* nnmod */

    rb_define_method(cBN, "mod_add", ossl_bn_mod_add, 2);
    rb_define_method(cBN, "mod_sub", ossl_bn_mod_sub, 2);
    rb_define_method(cBN, "mod_mul", ossl_bn_mod_mul, 2);
    rb_define_method(cBN, "mod_sqr", ossl_bn_mod_sqr, 1);
    rb_define_method(cBN, "**", ossl_bn_exp, 1);
    rb_define_method(cBN, "mod_exp", ossl_bn_mod_exp, 2);
    rb_define_method(cBN, "gcd", ossl_bn_gcd, 1);

    /* add_word
     * sub_word
     * mul_word
     * div_word
     * mod_word */

    rb_define_method(cBN, "cmp", ossl_bn_cmp, 1);
    rb_define_alias(cBN, "<=>", "cmp");
    rb_define_method(cBN, "ucmp", ossl_bn_ucmp, 1);
    rb_define_method(cBN, "eql?", ossl_bn_eql, 1);
    rb_define_alias(cBN, "==", "eql?");
    rb_define_alias(cBN, "===", "eql?");
    rb_define_method(cBN, "zero?", ossl_bn_is_zero, 0);
    rb_define_method(cBN, "one?", ossl_bn_is_one, 0);
    /* is_word */
    rb_define_method(cBN, "odd?", ossl_bn_is_odd, 0);

    /* zero
     * one
     * value_one - DON'T IMPL.
     * set_word
     * get_word */

    rb_define_singleton_method(cBN, "rand", ossl_bn_s_rand, -1);
    rb_define_singleton_method(cBN, "pseudo_rand", ossl_bn_s_pseudo_rand, -1);
    rb_define_singleton_method(cBN, "rand_range", ossl_bn_s_rand_range, 1);
    rb_define_singleton_method(cBN, "pseudo_rand_range", ossl_bn_s_pseudo_rand_range, 1);

    rb_define_singleton_method(cBN, "generate_prime", ossl_bn_s_generate_prime, -1);
    rb_define_method(cBN, "prime?", ossl_bn_is_prime, -1);

    rb_define_method(cBN, "set_bit!", ossl_bn_set_bit, 1);
    rb_define_method(cBN, "clear_bit!", ossl_bn_clear_bit, 1);
    rb_define_method(cBN, "bit_set?", ossl_bn_is_bit_set, 1);
    rb_define_method(cBN, "mask_bits!", ossl_bn_mask_bits, 1);
    rb_define_method(cBN, "<<", ossl_bn_lshift, 1);
    /* lshift1 - DON'T IMPL. */
    rb_define_method(cBN, ">>", ossl_bn_rshift, 1);
    /* rshift1 - DON'T IMPL. */

    /*
     * bn2bin
     * bin2bn
     * bn2hex
     * bn2dec
     * hex2bn
     * dec2bn - all these are implemented in ossl_bn_initialize, and ossl_bn_to_s
     * print - NOT IMPL.
     * print_fp - NOT IMPL.
     * bn2mpi
     * mpi2bn
     */
    rb_define_method(cBN, "to_s", ossl_bn_to_s, -1);
    rb_define_method(cBN, "to_i", ossl_bn_to_i, 0);
    rb_define_alias(cBN, "to_int", "to_i");
    rb_define_method(cBN, "to_bn", ossl_bn_to_bn, 0);
    rb_define_method(cBN, "coerce", ossl_bn_coerce, 1);

    /*
     * TODO:
     * But how to: from_bin, from_mpi? PACK?
     * to_bin
     * to_mpi
     */

    rb_define_method(cBN, "mod_inverse", ossl_bn_mod_inverse, 1);

    /* RECiProcal
     * MONTgomery */

    /*
     * TODO:
     * Where to belong these?
     */
    rb_define_method(cBN, "prime_fasttest?", ossl_bn_is_prime_fasttest, -1);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl_bn.h

root/ext/openssl/ossl_bn.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/*
 * $Id: ossl_bn.h,v 1.1 2003/07/23 16:11:29 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#if !defined(_OSSL_BN_H_)
#define _OSSL_BN_H_

extern VALUE cBN;
extern VALUE eBNError;

VALUE ossl_bn_new(BIGNUM *);
BIGNUM *GetBNPtr(VALUE);
void Init_ossl_bn(void);

#endif /* _OSS_BN_H_ */
/* [<][>][^][v][top][bottom][index] [help] */


ext/openssl/ossl_cipher.c

root/ext/openssl/ossl_cipher.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. GetCipherPtr
  2. ossl_cipher_new
  3. ossl_cipher_free
  4. ossl_cipher_alloc
  5. ossl_cipher_initialize
  6. ossl_cipher_copy
  7. ossl_cipher_reset
  8. ossl_cipher_init
  9. ossl_cipher_encrypt
  10. ossl_cipher_decrypt
  11. ossl_cipher_pkcs5_keyivgen
  12. ossl_cipher_update
  13. ossl_cipher_final
  14. ossl_cipher_name
  15. ossl_cipher_set_key
  16. ossl_cipher_set_iv
  17. ossl_cipher_set_key_length
  18. ossl_cipher_set_padding
  19. CIPHER_0ARG_INT
/*
 * $Id: ossl_cipher.c,v 1.10 2005/10/30 20:49:49 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#include "ossl.h"

#define MakeCipher(obj, klass, ctx) \
    obj = Data_Make_Struct(klass, EVP_CIPHER_CTX, 0, ossl_cipher_free, ctx)
#define GetCipher(obj, ctx) do { \
    Data_Get_Struct(obj, EVP_CIPHER_CTX, ctx); \
    if (!ctx) { \
        ossl_raise(rb_eRuntimeError, "Cipher not inititalized!"); \
    } \
} while (0)
#define SafeGetCipher(obj, ctx) do { \
    OSSL_Check_Kind(obj, cCipher); \
    GetCipher(obj, ctx); \
} while (0)

/*
 * Classes
 */
VALUE mCipher;
VALUE cCipher;
VALUE eCipherError;

static VALUE ossl_cipher_alloc(VALUE klass);

/*
 * PUBLIC
 */
const EVP_CIPHER *
GetCipherPtr(VALUE obj)
{
    EVP_CIPHER_CTX *ctx;

    SafeGetCipher(obj, ctx);

    return EVP_CIPHER_CTX_cipher(ctx);
}

VALUE
ossl_cipher_new(const EVP_CIPHER *cipher)
{
    VALUE ret;
    EVP_CIPHER_CTX *ctx;

    ret = ossl_cipher_alloc(cCipher);
    GetCipher(ret, ctx);
    EVP_CIPHER_CTX_init(ctx);
    if (EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL, -1) != 1)
        ossl_raise(eCipherError, NULL);

    return ret;
}

/*
 * PRIVATE
 */
static void
ossl_cipher_free(EVP_CIPHER_CTX *ctx)
{
    if (ctx) {
        EVP_CIPHER_CTX_cleanup(ctx);
        free(ctx);
    }
}

static VALUE
ossl_cipher_alloc(VALUE klass)
{
    EVP_CIPHER_CTX *ctx;
    VALUE obj;

    MakeCipher(obj, klass, ctx);
    EVP_CIPHER_CTX_init(ctx);

    return obj;
}

static VALUE
ossl_cipher_initialize(VALUE self, VALUE str)
{
    EVP_CIPHER_CTX *ctx;
    const EVP_CIPHER *cipher;
    char *name;

    name = StringValuePtr(str);
    GetCipher(self, ctx);
    if (!(cipher = EVP_get_cipherbyname(name))) {
        ossl_raise(rb_eRuntimeError, "unsupported cipher algorithm (%s)", name);
    }
    if (EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL, -1) != 1)
        ossl_raise(eCipherError, NULL);

    return self;
}
static VALUE
ossl_cipher_copy(VALUE self, VALUE other)
{
    EVP_CIPHER_CTX *ctx1, *ctx2;

    rb_check_frozen(self);
    if (self == other) return self;

    GetCipher(self, ctx1);
    SafeGetCipher(other, ctx2);
    if (EVP_CIPHER_CTX_copy(ctx1, ctx2) != 1)
        ossl_raise(eCipherError, NULL);

    return self;
}

static VALUE
ossl_cipher_reset(VALUE self)
{
    EVP_CIPHER_CTX *ctx;

    GetCipher(self, ctx);
    if (EVP_CipherInit_ex(ctx, NULL, NULL, NULL, NULL, -1) != 1)
        ossl_raise(eCipherError, NULL);

    return self;
}

static VALUE
ossl_cipher_init(int argc, VALUE *argv, VALUE self, int mode)
{
    EVP_CIPHER_CTX *ctx;
    unsigned char key[EVP_MAX_KEY_LENGTH], *p_key = NULL;
    unsigned char iv[EVP_MAX_IV_LENGTH], *p_iv = NULL;
    VALUE pass, init_v;

    if(rb_scan_args(argc, argv, "02", &pass, &init_v) > 0){
        /*
         * oops. this code mistakes salt for IV.
         * We deprecated the arguments for this method, but we decided
         * keeping this behaviour for backward compatibility.
         */
        StringValue(pass);
        GetCipher(self, ctx);
        if (NIL_P(init_v)) memcpy(iv, "OpenSSL for Ruby rulez!", sizeof(iv));
        else{
            char *cname  = rb_class2name(rb_obj_class(self));
            rb_warning("key derivation by %s#encrypt is deprecated; "
                       "use %s::pkcs5_keyivgen instead", cname, cname);
            StringValue(init_v);
            if (EVP_MAX_IV_LENGTH > RSTRING(init_v)->len) {
                memset(iv, 0, EVP_MAX_IV_LENGTH);
                memcpy(iv, RSTRING(init_v)->ptr, RSTRING(init_v)->len);
            }
            else memcpy(iv, RSTRING(init_v)->ptr, sizeof(iv));
        }
        EVP_BytesToKey(EVP_CIPHER_CTX_cipher(ctx), EVP_md5(), iv,
                       RSTRING(pass)->ptr, RSTRING(pass)->len, 1, key, NULL);
        p_key = key;
        p_iv = iv;
    }
    else {
        GetCipher(self, ctx);
    }
    if (EVP_CipherInit_ex(ctx, NULL, NULL, p_key, p_iv, mode) != 1) {
        ossl_raise(eCipherError, NULL);
    }

    return self;
}

static VALUE
ossl_cipher_encrypt(int argc, VALUE *argv, VALUE self)
{
    return ossl_cipher_init(argc, argv, self, 1);
}

static VALUE
ossl_cipher_decrypt(int argc, VALUE *argv, VALUE self)
{
    return ossl_cipher_init(argc, argv, self, 0);
}

static VALUE
ossl_cipher_pkcs5_keyivgen(int argc, VALUE *argv, VALUE self)
{
    EVP_CIPHER_CTX *ctx;
    const EVP_MD *digest;
    VALUE vpass, vsalt, viter, vdigest;
    unsigned char key[EVP_MAX_KEY_LENGTH], iv[EVP_MAX_IV_LENGTH], *salt = NULL;
    int iter;

    rb_scan_args(argc, argv, "13", &vpass, &vsalt, &viter, &vdigest);
    StringValue(vpass);
    if(!NIL_P(vsalt)){
        StringValue(vsalt);
        if(RSTRING(vsalt)->len != PKCS5_SALT_LEN)
            rb_raise(eCipherError, "salt must be an 8-octet string");
        salt = RSTRING(vsalt)->ptr;
    }
    iter = NIL_P(viter) ? 2048 : NUM2INT(viter);
    digest = NIL_P(vdigest) ? EVP_md5() : GetDigestPtr(vdigest);
    GetCipher(self, ctx);
    EVP_BytesToKey(EVP_CIPHER_CTX_cipher(ctx), digest, salt,
                   RSTRING(vpass)->ptr, RSTRING(vpass)->len, iter, key, iv);
    if (EVP_CipherInit_ex(ctx, NULL, NULL, key, iv, -1) != 1)
        ossl_raise(eCipherError, NULL);
    OPENSSL_cleanse(key, sizeof key);
    OPENSSL_cleanse(iv, sizeof iv);

    return Qnil;
}

static VALUE
ossl_cipher_update(VALUE self, VALUE data)
{
    EVP_CIPHER_CTX *ctx;
    char *in;
    int in_len, out_len;
    VALUE str;

    StringValue(data);
    in = RSTRING(data)->ptr;
    if ((in_len = RSTRING(data)->len) == 0)
        rb_raise(rb_eArgError, "data must not be empty");
    GetCipher(self, ctx);
    str = rb_str_new(0, in_len+EVP_CIPHER_CTX_block_size(ctx));
    if (!EVP_CipherUpdate(ctx, RSTRING(str)->ptr, &out_len, in, in_len))
        ossl_raise(eCipherError, NULL);
    assert(out_len < RSTRING(str)->len);
    RSTRING(str)->len = out_len;
    RSTRING(str)->ptr[out_len] = 0;

    return str;
}

static VALUE
ossl_cipher_final(VALUE self)
{
    EVP_CIPHER_CTX *ctx;
    int out_len;
    VALUE str;

    GetCipher(self, ctx);
    str = rb_str_new(0, EVP_CIPHER_CTX_block_size(ctx));
    if (!EVP_CipherFinal_ex(ctx, RSTRING(str)->ptr, &out_len))
        ossl_raise(eCipherError, NULL);
    assert(out_len <= RSTRING(str)->len);
    RSTRING(str)->len = out_len;
    RSTRING(str)->ptr[out_len] = 0;

    return str;
}

static VALUE
ossl_cipher_name(VALUE self)
{
    EVP_CIPHER_CTX *ctx;

    GetCipher(self, ctx);

    return rb_str_new2(EVP_CIPHER_name(EVP_CIPHER_CTX_cipher(ctx)));
}

static VALUE
ossl_cipher_set_key(VALUE self, VALUE key)
{
    EVP_CIPHER_CTX *ctx;

    StringValue(key);
    GetCipher(self, ctx);

    if (RSTRING(key)->len < EVP_CIPHER_CTX_key_length(ctx))
        ossl_raise(eCipherError, "key length too short");

    if (EVP_CipherInit_ex(ctx, NULL, NULL, RSTRING(key)->ptr, NULL, -1) != 1)
        ossl_raise(eCipherError, NULL);

    return key;
}

static VALUE
ossl_cipher_set_iv(VALUE self, VALUE iv)
{
    EVP_CIPHER_CTX *ctx;

    StringValue(iv);
    GetCipher(self, ctx);

    if (RSTRING(iv)->len < EVP_CIPHER_CTX_iv_length(ctx))
        ossl_raise(eCipherError, "iv length too short");

    if (EVP_CipherInit_ex(ctx, NULL, NULL, NULL, RSTRING(iv)->ptr, -1) != 1)
        ossl_raise(eCipherError, NULL);

    return iv;
}

static VALUE
ossl_cipher_set_key_length(VALUE self, VALUE key_length)
{
    int len = NUM2INT(key_length);
    EVP_CIPHER_CTX *ctx;

    GetCipher(self, ctx);
    if (EVP_CIPHER_CTX_set_key_length(ctx, len) != 1)
        ossl_raise(eCipherError, NULL);

    return key_length;
}

static VALUE
ossl_cipher_set_padding(VALUE self, VALUE padding)
{
#if defined(HAVE_EVP_CIPHER_CTX_SET_PADDING)
    EVP_CIPHER_CTX *ctx;
    int pad = NUM2INT(padding);

    GetCipher(self, ctx);
    if (EVP_CIPHER_CTX_set_padding(ctx, pad) != 1)
        ossl_raise(eCipherError, NULL);
#else
    rb_notimplement();
#endif
    return padding;
}

#define CIPHER_0ARG_INT(func)                                   \
    static VALUE                                                \
    ossl_cipher_##func(VALUE self)                              \
    {                                                           \
        EVP_CIPHER_CTX *ctx;                                    \
        GetCipher(self, ctx);                                   \
        return INT2NUM(EVP_CIPHER_##func(EVP_CIPHER_CTX_cipher(ctx)));  \
    }
CIPHER_0ARG_INT(key_length)
CIPHER_0ARG_INT(iv_length)
CIPHER_0ARG_INT(block_size)

/*
 * INIT
 */
void
Init_ossl_cipher(void)
{
    mCipher = rb_define_module_under(mOSSL, "Cipher");
    eCipherError = rb_define_class_under(mOSSL, "CipherError", eOSSLError);
    cCipher = rb_define_class_under(mCipher, "Cipher", rb_cObject);

    rb_define_alloc_func(cCipher, ossl_cipher_alloc);
    rb_define_copy_func(cCipher, ossl_cipher_copy);
    rb_define_method(cCipher, "initialize", ossl_cipher_initialize, 1);
    rb_define_method(cCipher, "reset", ossl_cipher_reset, 0);
    rb_define_method(cCipher, "encrypt", ossl_cipher_encrypt, -1);
    rb_define_method(cCipher, "decrypt", ossl_cipher_decrypt, -1);
    rb_define_method(cCipher, "pkcs5_keyivgen", ossl_cipher_pkcs5_keyivgen, -1);
    rb_define_method(cCipher, "update", ossl_cipher_update, 1);
    rb_define_method(cCipher, "final", ossl_cipher_final, 0);
    rb_define_method(cCipher, "name", ossl_cipher_name, 0);
    rb_define_method(cCipher, "key=", ossl_cipher_set_key, 1);
    rb_define_method(cCipher, "key_len=", ossl_cipher_set_key_length, 1);
    rb_define_method(cCipher, "key_len", ossl_cipher_key_length, 0);
    rb_define_method(cCipher, "iv=", ossl_cipher_set_iv, 1);
    rb_define_method(cCipher, "iv_len", ossl_cipher_iv_length, 0);
    rb_define_method(cCipher, "block_size", ossl_cipher_block_size, 0);
    rb_define_method(cCipher, "padding=", ossl_cipher_set_padding, 1);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl_cipher.h

root/ext/openssl/ossl_cipher.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/*
 * $Id: ossl_cipher.h,v 1.2 2003/09/05 09:08:40 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#if !defined(_OSSL_CIPHER_H_)
#define _OSSL_CIPHER_H_

extern VALUE mCipher;
extern VALUE cCipher;
extern VALUE eCipherError;

const EVP_CIPHER *GetCipherPtr(VALUE);
VALUE ossl_cipher_new(const EVP_CIPHER *);
void Init_ossl_cipher(void);

#endif /* _OSSL_CIPHER_H_ */
/* [<][>][^][v][top][bottom][index] [help] */


ext/openssl/ossl_config.c

root/ext/openssl/ossl_config.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. GetConfigPtr
  2. DupConfigPtr
  3. parse_config
  4. ossl_config_s_parse
  5. ossl_config_s_alloc
  6. ossl_config_copy
  7. ossl_config_initialize
  8. ossl_config_add_value
  9. ossl_config_get_value
  10. ossl_config_get_value_old
  11. set_conf_section_i
  12. ossl_config_set_section
  13. ossl_config_get_section
  14. ossl_config_get_section_old
  15. get_conf_section
  16. ossl_config_get_sections
  17. dump_conf_value
  18. dump_conf
  19. ossl_config_to_s
  20. each_conf_value
  21. ossl_config_each
  22. ossl_config_get_sections
  23. ossl_config_to_s
  24. ossl_config_each
  25. ossl_config_inspect
  26. Init_ossl_config
/*
 * $Id: ossl_config.c,v 1.11 2004/12/15 06:35:53 matz Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#include "ossl.h"

#define WrapConfig(klass, obj, conf) do { \
    if (!conf) { \
        ossl_raise(rb_eRuntimeError, "Config wasn't intitialized!"); \
    } \
    obj = Data_Wrap_Struct(klass, 0, NCONF_free, conf); \
} while (0)
#define GetConfig(obj, conf) do { \
    Data_Get_Struct(obj, CONF, conf); \
    if (!conf) { \
        ossl_raise(rb_eRuntimeError, "Config wasn't intitialized!"); \
    } \
} while (0)
#define SafeGetConfig(obj, conf) do { \
    OSSL_Check_Kind(obj, cConfig); \
    GetConfig(obj, conf); \
} while(0);

/*
 * Classes
 */
VALUE cConfig;
VALUE eConfigError;

/*
 * Public
 */

static CONF *parse_config(VALUE, CONF*);

CONF *
GetConfigPtr(VALUE obj)
{
    CONF *conf;

    SafeGetConfig(obj, conf);

    return conf;
}

CONF *
DupConfigPtr(VALUE obj)
{
    VALUE str;

    OSSL_Check_Kind(obj, cConfig);
    str = rb_funcall(obj, rb_intern("to_s"), 0);

    return parse_config(str, NULL);
}

/*
 * Private
 */
static CONF *
parse_config(VALUE str, CONF *dst)
{
    CONF *conf;
    BIO *bio;
    long eline = -1;

    bio = ossl_obj2bio(str);
    conf = dst ? dst : NCONF_new(NULL);
    if(!conf){
        BIO_free(bio);
        ossl_raise(eConfigError, NULL);
    }
    if(!NCONF_load_bio(conf, bio, &eline)){
        BIO_free(bio);
        if(!dst) NCONF_free(conf);
        if (eline <= 0) ossl_raise(eConfigError, "wrong config format");
        else ossl_raise(eConfigError, "error in line %d", eline);
        ossl_raise(eConfigError, NULL);
    }
    BIO_free(bio);

    return conf;
}

static VALUE
ossl_config_s_parse(VALUE klass, VALUE str)
{
    CONF *conf;
    VALUE obj;

    conf = parse_config(str, NULL);
    WrapConfig(klass, obj, conf);

    return obj;
}

static VALUE
ossl_config_s_alloc(VALUE klass)
{
    CONF *conf;
    VALUE obj;

    if(!(conf = NCONF_new(NULL)))
        ossl_raise(eConfigError, NULL);
    WrapConfig(klass, obj, conf);

    return obj;
}

static VALUE
ossl_config_copy(VALUE self, VALUE other)
{
    VALUE str;
    CONF *conf;

    str = rb_funcall(self, rb_intern("to_s"), 0);
    GetConfig(other, conf);
    parse_config(str, conf);

    return self;
}

static VALUE
ossl_config_initialize(int argc, VALUE *argv, VALUE self)
{
    CONF *conf;
    long eline = -1;
    char *filename;
    VALUE path;

    rb_scan_args(argc, argv, "01", &path);
    if(!NIL_P(path)){
        SafeStringValue(path);
        filename = StringValuePtr(path);
        GetConfig(self, conf);
        if (!NCONF_load(conf, filename, &eline)){
            if (eline <= 0)
                ossl_raise(eConfigError, "wrong config file %s", filename);
            else
                ossl_raise(eConfigError, "error in %s:%d", filename, eline);
        }
    }
#ifdef OSSL_NO_CONF_API
    else rb_raise(rb_eArgError, "wrong number of arguments (0 for 1)");
#else
    else {
        GetConfig(self, conf);
        _CONF_new_data(conf);
    }
#endif

    return self;
}

static VALUE
ossl_config_add_value(VALUE self, VALUE section, VALUE name, VALUE value)
{
#ifdef OSSL_NO_CONF_API
    rb_notimplement();
#else
    CONF *conf;
    CONF_VALUE *sv, *cv;

    StringValue(section);
    StringValue(name);
    StringValue(value);
    GetConfig(self, conf);
    if(!(sv = _CONF_get_section(conf, RSTRING(section)->ptr))){
        if(!(sv = _CONF_new_section(conf, RSTRING(section)->ptr))){
            ossl_raise(eConfigError, NULL);
        }
    }
    if(!(cv = OPENSSL_malloc(sizeof(CONF_VALUE)))){
        ossl_raise(eConfigError, NULL);
    }
    cv->name = BUF_strdup(RSTRING(name)->ptr);
    cv->value = BUF_strdup(RSTRING(value)->ptr);
    if(!cv->name || !cv->value || !_CONF_add_string(conf, sv, cv)){
        OPENSSL_free(cv->name);
        OPENSSL_free(cv->value);
        OPENSSL_free(cv);
        ossl_raise(eConfigError, "_CONF_add_string failure");
    }

    return value;
#endif
}

static VALUE
ossl_config_get_value(VALUE self, VALUE section, VALUE name)
{
    CONF *conf;
    char *str;

    StringValue(section);
    StringValue(name);
    GetConfig(self, conf);
    str = NCONF_get_string(conf, RSTRING(section)->ptr, RSTRING(name)->ptr);
    if(!str){
        ERR_clear_error();
        return Qnil;
    }

    return rb_str_new2(str);
}

static VALUE
ossl_config_get_value_old(int argc, VALUE *argv, VALUE self)
{
    VALUE section, name;

    rb_scan_args(argc, argv, "11", &section, &name);

    /* support conf.value(nil, "HOME") -> conf.get_value("", "HOME") */
    if (NIL_P(section)) section = rb_str_new2("");
    /* support conf.value("HOME") -> conf.get_value("", "HOME") */
    if (NIL_P(name)) {
        name = section;
        section = rb_str_new2("");
    }
    /* NOTE: Don't care about conf.get_value(nil, nil) */
    rb_warn("Config#value is deprecated; use Config#get_value");
    return ossl_config_get_value(self, section, name);
}

static VALUE
set_conf_section_i(VALUE i, VALUE *arg)
{
    VALUE name, value;

    Check_Type(i, T_ARRAY);
    name = rb_ary_entry(i, 0);
    value = rb_ary_entry(i, 1);
    ossl_config_add_value(arg[0], arg[1], name, value);

    return Qnil;
}

static VALUE
ossl_config_set_section(VALUE self, VALUE section, VALUE hash)
{
    VALUE arg[2] = { self, section };
    rb_iterate(rb_each, hash, set_conf_section_i, (VALUE)arg);
    return hash;
}

/*
 * Get all numbers as strings - use str.to_i to convert
 * long number = CONF_get_number(confp->config, sect, StringValuePtr(item));
 */
static VALUE
ossl_config_get_section(VALUE self, VALUE section)
{
    CONF *conf;
    STACK_OF(CONF_VALUE) *sk;
    CONF_VALUE *entry;
    int i, entries;
    VALUE hash;

    hash = rb_hash_new();
    StringValue(section);
    GetConfig(self, conf);
    if (!(sk = NCONF_get_section(conf, StringValuePtr(section)))) {
        ERR_clear_error();
        return hash;
    }
    if ((entries = sk_CONF_VALUE_num(sk)) < 0) {
        OSSL_Debug("# of items in section is < 0?!?");
        return hash;
    }
    for (i=0; i<entries; i++) {
        entry = sk_CONF_VALUE_value(sk, i);
        rb_hash_aset(hash, rb_str_new2(entry->name), rb_str_new2(entry->value));
    }

    return hash;
}

static VALUE
ossl_config_get_section_old(VALUE self, VALUE section)
{
    rb_warn("Config#section is deprecated; use Config#[]");
    return ossl_config_get_section(self, section);
}

#ifdef IMPLEMENT_LHASH_DOALL_ARG_FN
static void
get_conf_section(CONF_VALUE *cv, VALUE ary)
{
    if(cv->name) return;
    rb_ary_push(ary, rb_str_new2(cv->section));
}

static IMPLEMENT_LHASH_DOALL_ARG_FN(get_conf_section, CONF_VALUE*, VALUE);

static VALUE
ossl_config_get_sections(VALUE self)
{
    CONF *conf;
    VALUE ary;

    GetConfig(self, conf);
    ary = rb_ary_new();
    lh_doall_arg(conf->data, LHASH_DOALL_ARG_FN(get_conf_section), (void*)ary);

    return ary;
}

static void
dump_conf_value(CONF_VALUE *cv, VALUE str)
{
    STACK_OF(CONF_VALUE) *sk;
    CONF_VALUE *v;
    int i, num;

    if (cv->name) return;
    sk = (STACK_OF(CONF_VALUE)*)cv->value;
    num = sk_CONF_VALUE_num(sk);
    rb_str_cat2(str, "[ ");
    rb_str_cat2(str, cv->section);
    rb_str_cat2(str, " ]\n");
    for(i = 0; i < num; i++){
        v = sk_CONF_VALUE_value(sk, i);
        rb_str_cat2(str, v->name ? v->name : "None");
        rb_str_cat2(str, "=");
        rb_str_cat2(str, v->value ? v->value : "None");
        rb_str_cat2(str, "\n");
    }
    rb_str_cat2(str, "\n");
}

static IMPLEMENT_LHASH_DOALL_ARG_FN(dump_conf_value, CONF_VALUE*, VALUE);

static VALUE
dump_conf(CONF *conf)
{
    VALUE str;

    str = rb_str_new(0, 0);
    lh_doall_arg(conf->data, LHASH_DOALL_ARG_FN(dump_conf_value), (void*)str);

    return str;
}

static VALUE
ossl_config_to_s(VALUE self)
{
    CONF *conf;

    GetConfig(self, conf);

    return dump_conf(conf);
}

static void
each_conf_value(CONF_VALUE *cv, void* dummy)
{
    STACK_OF(CONF_VALUE) *sk;
    CONF_VALUE *v;
    VALUE section, name, value, args;
    int i, num;

    if (cv->name) return;
    sk = (STACK_OF(CONF_VALUE)*)cv->value;
    num = sk_CONF_VALUE_num(sk);
    section = rb_str_new2(cv->section);
    for(i = 0; i < num; i++){
        v = sk_CONF_VALUE_value(sk, i);
        name = v->name ? rb_str_new2(v->name) : Qnil;
        value = v->value ? rb_str_new2(v->value) : Qnil;
        args = rb_ary_new3(3, section, name, value);
        rb_yield(args);
    }
}

static IMPLEMENT_LHASH_DOALL_ARG_FN(each_conf_value, CONF_VALUE*, void*);

static VALUE
ossl_config_each(VALUE self)
{
    CONF *conf;

    GetConfig(self, conf);
    lh_doall_arg(conf->data, LHASH_DOALL_ARG_FN(each_conf_value), (void*)NULL);

    return self;
}
#else
static VALUE
ossl_config_get_sections(VALUE self)
{
    rb_warn("#sections don't work with %s", OPENSSL_VERSION_TEXT);
    return rb_ary_new();
}

static VALUE
ossl_config_to_s(VALUE self)
{
    rb_warn("#to_s don't work with %s", OPENSSL_VERSION_TEXT);
    return rb_str_new(0, 0);
}

static VALUE
ossl_config_each(VALUE self)
{
    rb_warn("#each don't work with %s", OPENSSL_VERSION_TEXT);
    return self;
}
#endif

static VALUE
ossl_config_inspect(VALUE self)
{
    VALUE str, ary = ossl_config_get_sections(self);
    char *cname = rb_class2name(rb_obj_class(self));

    str = rb_str_new2("#<");
    rb_str_cat2(str, cname);
    rb_str_cat2(str, " sections=");
    rb_str_append(str, rb_inspect(ary));
    rb_str_cat2(str, ">");

    return str;
}

/*
 * INIT
 */
void
Init_ossl_config()
{
    eConfigError = rb_define_class_under(mOSSL, "ConfigError", eOSSLError);
    cConfig = rb_define_class_under(mOSSL, "Config", rb_cObject);

    rb_define_const(cConfig, "DEFAULT_CONFIG_FILE",
                    rb_str_new2(CONF_get1_default_config_file()));
    rb_include_module(cConfig, rb_mEnumerable);
    rb_define_singleton_method(cConfig, "parse", ossl_config_s_parse, 1);
    rb_define_alias(CLASS_OF(cConfig), "load", "new");
    rb_define_alloc_func(cConfig, ossl_config_s_alloc);
    rb_define_copy_func(cConfig, ossl_config_copy);
    rb_define_method(cConfig, "initialize", ossl_config_initialize, -1);
    rb_define_method(cConfig, "get_value", ossl_config_get_value, 2);
    rb_define_method(cConfig, "value", ossl_config_get_value_old, -1);
    rb_define_method(cConfig, "add_value", ossl_config_add_value, 3);
    rb_define_method(cConfig, "[]", ossl_config_get_section, 1);
    rb_define_method(cConfig, "section", ossl_config_get_section_old, 1);
    rb_define_method(cConfig, "[]=", ossl_config_set_section, 2);
    rb_define_method(cConfig, "sections", ossl_config_get_sections, 0);
    rb_define_method(cConfig, "to_s", ossl_config_to_s, 0);
    rb_define_method(cConfig, "each", ossl_config_each, 0);
    rb_define_method(cConfig, "inspect", ossl_config_inspect, 0);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl_config.h

root/ext/openssl/ossl_config.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/*
 * $Id: ossl_config.h,v 1.2 2003/09/08 10:31:38 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#if !defined(_OSSL_CONFIG_H_)
#define _OSSL_CONFIG_H_

extern VALUE cConfig;
extern VALUE eConfigError;

CONF* GetConfigPtr(VALUE obj);
CONF* DupConfigPtr(VALUE obj);
void Init_ossl_config(void);

#endif /* _OSSL_CONFIG_H_ */
/* [<][>][^][v][top][bottom][index] [help] */


ext/openssl/ossl_digest.c

root/ext/openssl/ossl_digest.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. GetDigestPtr
  2. ossl_digest_new
  3. ossl_digest_alloc
  4. ossl_digest_initialize
  5. ossl_digest_copy
  6. ossl_digest_reset
  7. ossl_digest_update
  8. digest_final
  9. ossl_digest_digest
  10. ossl_digest_hexdigest
  11. ossl_digest_s_digest
  12. ossl_digest_s_hexdigest
  13. ossl_digest_equal
  14. ossl_digest_name
  15. ossl_digest_size
  16. Init_ossl_digest
/*
 * $Id: ossl_digest.c,v 1.6 2004/12/15 06:35:53 matz Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#include "ossl.h"

#define GetDigest(obj, ctx) do { \
    Data_Get_Struct(obj, EVP_MD_CTX, ctx); \
    if (!ctx) { \
        ossl_raise(rb_eRuntimeError, "Digest CTX wasn't initialized!"); \
    } \
} while (0)
#define SafeGetDigest(obj, ctx) do { \
    OSSL_Check_Kind(obj, cDigest); \
    GetDigest(obj, ctx); \
} while (0)

/*
 * Classes
 */
VALUE mDigest;
VALUE cDigest;
VALUE eDigestError;

static VALUE ossl_digest_alloc(VALUE klass);

/*
 * Public
 */
const EVP_MD *
GetDigestPtr(VALUE obj)
{
    EVP_MD_CTX *ctx;

    SafeGetDigest(obj, ctx);

    return EVP_MD_CTX_md(ctx); /*== ctx->digest*/
}

VALUE
ossl_digest_new(const EVP_MD *md)
{
    VALUE ret;
    EVP_MD_CTX *ctx;

    ret = ossl_digest_alloc(cDigest);
    GetDigest(ret, ctx);
    EVP_MD_CTX_init(ctx);
    EVP_DigestInit_ex(ctx, md, NULL);

    return ret;
}

/*
 * Private
 */
static VALUE
ossl_digest_alloc(VALUE klass)
{
    EVP_MD_CTX *ctx;
    VALUE obj;

    ctx = EVP_MD_CTX_create();
    if (ctx == NULL)
        ossl_raise(rb_eRuntimeError, "EVP_MD_CTX_create() failed");
    EVP_MD_CTX_init(ctx);
    obj = Data_Wrap_Struct(klass, 0, EVP_MD_CTX_destroy, ctx);

    return obj;
}

VALUE ossl_digest_update(VALUE, VALUE);

static VALUE
ossl_digest_initialize(int argc, VALUE *argv, VALUE self)
{
    EVP_MD_CTX *ctx;
    const EVP_MD *md;
    char *name;
    VALUE type, data;

    rb_scan_args(argc, argv, "11", &type, &data);
    StringValue(type);
    if (!NIL_P(data)) StringValue(data);
    name = StringValuePtr(type);

    md = EVP_get_digestbyname(name);
    if (!md) {
        ossl_raise(rb_eRuntimeError, "Unsupported digest algorithm (%s).", name);
    }
    GetDigest(self, ctx);
    EVP_DigestInit_ex(ctx, md, NULL);

    if (!NIL_P(data)) return ossl_digest_update(self, data);
    return self;
}

static VALUE
ossl_digest_copy(VALUE self, VALUE other)
{
    EVP_MD_CTX *ctx1, *ctx2;

    rb_check_frozen(self);
    if (self == other) return self;

    GetDigest(self, ctx1);
    SafeGetDigest(other, ctx2);

    if (!EVP_MD_CTX_copy(ctx1, ctx2)) {
        ossl_raise(eDigestError, NULL);
    }
    return self;
}

static VALUE
ossl_digest_reset(VALUE self)
{
    EVP_MD_CTX *ctx;

    GetDigest(self, ctx);
    EVP_DigestInit_ex(ctx, EVP_MD_CTX_md(ctx), NULL);

    return self;
}

VALUE
ossl_digest_update(VALUE self, VALUE data)
{
    EVP_MD_CTX *ctx;

    StringValue(data);
    GetDigest(self, ctx);
    EVP_DigestUpdate(ctx, RSTRING(data)->ptr, RSTRING(data)->len);

    return self;
}

static void
digest_final(EVP_MD_CTX *ctx, char **buf, int *buf_len)
{
    EVP_MD_CTX final;

    if (!EVP_MD_CTX_copy(&final, ctx)) {
        ossl_raise(eDigestError, NULL);
    }
    if (!(*buf = OPENSSL_malloc(EVP_MD_CTX_size(&final)))) {
        EVP_MD_CTX_cleanup(&final);
        ossl_raise(eDigestError, "Cannot allocate mem for digest");
    }
    EVP_DigestFinal_ex(&final, *buf, buf_len);
    EVP_MD_CTX_cleanup(&final);
}

static VALUE
ossl_digest_digest(VALUE self)
{
    EVP_MD_CTX *ctx;
    char *buf;
    int buf_len;
    VALUE digest;

    GetDigest(self, ctx);
    digest_final(ctx, &buf, &buf_len);
    digest = ossl_buf2str(buf, buf_len);

    return digest;
}

static VALUE
ossl_digest_hexdigest(VALUE self)
{
    EVP_MD_CTX *ctx;
    char *buf, *hexbuf;
    int buf_len;
    VALUE hexdigest;

    GetDigest(self, ctx);
    digest_final(ctx, &buf, &buf_len);
    if (string2hex(buf, buf_len, &hexbuf, NULL) != 2 * buf_len) {
        OPENSSL_free(buf);
        ossl_raise(eDigestError, "Memory alloc error");
    }
    OPENSSL_free(buf);
    hexdigest = ossl_buf2str(hexbuf, 2 * buf_len);

    return hexdigest;
}

static VALUE
ossl_digest_s_digest(VALUE klass, VALUE str, VALUE data)
{
    VALUE obj = rb_class_new_instance(1, &str, klass);

    ossl_digest_update(obj, data);

    return ossl_digest_digest(obj);
}

static VALUE
ossl_digest_s_hexdigest(VALUE klass, VALUE str, VALUE data)
{
    VALUE obj = rb_class_new_instance(1, &str, klass);

    ossl_digest_update(obj, data);

    return ossl_digest_hexdigest(obj);
}

static VALUE
ossl_digest_equal(VALUE self, VALUE other)
{
    EVP_MD_CTX *ctx;
    VALUE str1, str2;

    if (rb_obj_is_kind_of(other, cDigest) == Qtrue) {
        str2 = ossl_digest_digest(other);
    } else {
        StringValue(other);
        str2 = other;
    }
    GetDigest(self, ctx);
    if (RSTRING(str2)->len == EVP_MD_CTX_size(ctx)) {
        str1 = ossl_digest_digest(self);
    } else {
        str1 = ossl_digest_hexdigest(self);
    }
    if (RSTRING(str1)->len == RSTRING(str2)->len
        && rb_str_cmp(str1, str2) == 0) {
        return Qtrue;
    }

    return Qfalse;
}

static VALUE
ossl_digest_name(VALUE self)
{
    EVP_MD_CTX *ctx;

    GetDigest(self, ctx);

    return rb_str_new2(EVP_MD_name(EVP_MD_CTX_md(ctx)));
}

static VALUE
ossl_digest_size(VALUE self)
{
    EVP_MD_CTX *ctx;

    GetDigest(self, ctx);

    return INT2NUM(EVP_MD_CTX_size(ctx));
}

/*
 * INIT
 */
void
Init_ossl_digest()
{
    mDigest = rb_define_module_under(mOSSL, "Digest");

    eDigestError = rb_define_class_under(mDigest, "DigestError", eOSSLError);

    cDigest = rb_define_class_under(mDigest, "Digest", rb_cObject);

    rb_define_alloc_func(cDigest, ossl_digest_alloc);
    rb_define_singleton_method(cDigest, "digest", ossl_digest_s_digest, 2);
    rb_define_singleton_method(cDigest, "hexdigest", ossl_digest_s_hexdigest, 2);

    rb_define_method(cDigest, "initialize", ossl_digest_initialize, -1);
    rb_define_method(cDigest, "reset", ossl_digest_reset, 0);

    rb_define_copy_func(cDigest, ossl_digest_copy);

    rb_define_method(cDigest, "digest", ossl_digest_digest, 0);
    rb_define_method(cDigest, "hexdigest", ossl_digest_hexdigest, 0);
    rb_define_alias(cDigest, "inspect", "hexdigest");
    rb_define_alias(cDigest, "to_s", "hexdigest");

    rb_define_method(cDigest, "update", ossl_digest_update, 1);
    rb_define_alias(cDigest, "<<", "update");

    rb_define_method(cDigest, "==", ossl_digest_equal, 1);

    rb_define_method(cDigest, "name", ossl_digest_name, 0);
    rb_define_method(cDigest, "size", ossl_digest_size, 0);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl_digest.h

root/ext/openssl/ossl_digest.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/*
 * $Id: ossl_digest.h,v 1.2 2003/09/05 09:08:40 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#if !defined(_OSSL_DIGEST_H_)
#define _OSSL_DIGEST_H_

extern VALUE mDigest;
extern VALUE cDigest;
extern VALUE eDigestError;

const EVP_MD *GetDigestPtr(VALUE);
VALUE ossl_digest_new(const EVP_MD *);
void Init_ossl_digest(void);

#endif /* _OSSL_DIGEST_H_ */
/* [<][>][^][v][top][bottom][index] [help] */


ext/openssl/ossl_engine.c

root/ext/openssl/ossl_engine.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. ossl_engine_s_load
  2. ossl_engine_s_cleanup
  3. ossl_engine_s_engines
  4. ossl_engine_s_by_id
  5. ossl_engine_s_alloc
  6. ossl_engine_get_id
  7. ossl_engine_get_name
  8. ossl_engine_finish
  9. ossl_engine_get_cipher
  10. ossl_engine_get_digest
  11. ossl_engine_load_privkey
  12. ossl_engine_load_pubkey
  13. ossl_engine_set_default
  14. ossl_engine_ctrl_cmd
  15. ossl_engine_cmd_flag_to_name
  16. ossl_engine_get_cmds
  17. ossl_engine_inspect
  18. Init_ossl_engine
  19. Init_ossl_engine
/*
 * $Id: ossl_engine.c,v 1.10 2005/09/18 22:55:41 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2003  GOTOU Yuuzou <gotoyuzo@notwork.org>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#include "ossl.h"

#if defined(OSSL_ENGINE_ENABLED)

#define WrapEngine(klass, obj, engine) do { \
    if (!engine) { \
        ossl_raise(rb_eRuntimeError, "ENGINE wasn't initialized."); \
    } \
    obj = Data_Wrap_Struct(klass, 0, ENGINE_free, engine); \
} while(0)
#define GetEngine(obj, engine) do { \
    Data_Get_Struct(obj, ENGINE, engine); \
    if (!engine) { \
        ossl_raise(rb_eRuntimeError, "ENGINE wasn't initialized."); \
    } \
} while (0)
#define SafeGetEngine(obj, engine) do { \
    OSSL_Check_Kind(obj, cEngine); \
    GetPKCS7(obj, engine); \
} while (0)

/*
 * Classes
 */
VALUE cEngine;
VALUE eEngineError;

/*
 * Private
 */
#define OSSL_ENGINE_LOAD_IF_MATCH(x) \
do{\
  if(!strcmp(#x, RSTRING(name)->ptr)){\
    ENGINE_load_##x();\
    return Qtrue;\
  }\
}while(0)

static VALUE
ossl_engine_s_load(int argc, VALUE *argv, VALUE klass)
{
#if !defined(HAVE_ENGINE_LOAD_BUILTIN_ENGINES)
    return Qnil;
#else
    VALUE name;

    rb_scan_args(argc, argv, "01", &name);
    if(NIL_P(name)){
        ENGINE_load_builtin_engines();
        return Qtrue;
    }
    StringValue(name);
#ifndef OPENSSL_NO_STATIC_ENGINE
    OSSL_ENGINE_LOAD_IF_MATCH(dynamic);
    OSSL_ENGINE_LOAD_IF_MATCH(cswift);
    OSSL_ENGINE_LOAD_IF_MATCH(chil);
    OSSL_ENGINE_LOAD_IF_MATCH(atalla);
    OSSL_ENGINE_LOAD_IF_MATCH(nuron);
    OSSL_ENGINE_LOAD_IF_MATCH(ubsec);
    OSSL_ENGINE_LOAD_IF_MATCH(aep);
    OSSL_ENGINE_LOAD_IF_MATCH(sureware);
    OSSL_ENGINE_LOAD_IF_MATCH(4758cca);
#endif
#ifdef HAVE_ENGINE_LOAD_OPENBSD_DEV_CRYPTO
    OSSL_ENGINE_LOAD_IF_MATCH(openbsd_dev_crypto);
#endif
    OSSL_ENGINE_LOAD_IF_MATCH(openssl);
    rb_warning("no such builtin loader for `%s'", RSTRING(name)->ptr);
    return Qnil;
#endif /* HAVE_ENGINE_LOAD_BUILTIN_ENGINES */
}

static VALUE
ossl_engine_s_cleanup(VALUE self)
{
#if defined(HAVE_ENGINE_CLEANUP)
    ENGINE_cleanup();
#endif
    return Qnil;
}

static VALUE
ossl_engine_s_engines(VALUE klass)
{
    ENGINE *e;
    VALUE ary, obj;

    ary = rb_ary_new();
    for(e = ENGINE_get_first(); e; e = ENGINE_get_next(e)){
        WrapEngine(klass, obj, e);
        rb_ary_push(ary, obj);
    }

    return ary;
}

static VALUE
ossl_engine_s_by_id(VALUE klass, VALUE id)
{
    ENGINE *e;
    VALUE obj;

    StringValue(id);
    ossl_engine_s_load(1, &id, klass);
    if(!(e = ENGINE_by_id(RSTRING(id)->ptr)))
        ossl_raise(eEngineError, NULL);
    WrapEngine(klass, obj, e);
    if(rb_block_given_p()) rb_yield(obj);
    if(!ENGINE_init(e))
        ossl_raise(eEngineError, NULL);
    ENGINE_ctrl(e, ENGINE_CTRL_SET_PASSWORD_CALLBACK,
                0, NULL, (void(*)())ossl_pem_passwd_cb);
    ERR_clear_error();

    return obj;
}

static VALUE
ossl_engine_s_alloc(VALUE klass)
{
    ENGINE *e;
    VALUE obj;

    if (!(e = ENGINE_new())) {
       ossl_raise(eEngineError, NULL);
    }
    WrapEngine(klass, obj, e);

    return obj;
}

static VALUE
ossl_engine_get_id(VALUE self)
{
    ENGINE *e;
    GetEngine(self, e);
    return rb_str_new2(ENGINE_get_id(e));
}

static VALUE
ossl_engine_get_name(VALUE self)
{
    ENGINE *e;
    GetEngine(self, e);
    return rb_str_new2(ENGINE_get_name(e));
}

static VALUE
ossl_engine_finish(VALUE self)
{
    ENGINE *e;

    GetEngine(self, e);
    if(!ENGINE_finish(e)) ossl_raise(eEngineError, NULL);

    return Qnil;
}

static VALUE
ossl_engine_get_cipher(VALUE self, VALUE name)
{
#if defined(HAVE_ENGINE_GET_CIPHER)
    ENGINE *e;
    const EVP_CIPHER *ciph, *tmp;
    char *s;
    int nid;

    s = StringValuePtr(name);
    tmp = EVP_get_cipherbyname(s);
    if(!tmp) ossl_raise(eEngineError, "no such cipher `%s'", s);
    nid = EVP_CIPHER_nid(tmp);
    GetEngine(self, e);
    ciph = ENGINE_get_cipher(e, nid);
    if(!ciph) ossl_raise(eEngineError, NULL);

    return ossl_cipher_new(ciph);
#else
    rb_notimplement();
#endif
}

static VALUE
ossl_engine_get_digest(VALUE self, VALUE name)
{
#if defined(HAVE_ENGINE_GET_DIGEST)
    ENGINE *e;
    const EVP_MD *md, *tmp;
    char *s;
    int nid;

    s = StringValuePtr(name);
    tmp = EVP_get_digestbyname(s);
    if(!tmp) ossl_raise(eEngineError, "no such digest `%s'", s);
    nid = EVP_MD_nid(tmp);
    GetEngine(self, e);
    md = ENGINE_get_digest(e, nid);
    if(!md) ossl_raise(eEngineError, NULL);

    return ossl_digest_new(md);
#else
    rb_notimplement();
#endif
}

static VALUE
ossl_engine_load_privkey(int argc, VALUE *argv, VALUE self)
{
    ENGINE *e;
    EVP_PKEY *pkey;
    VALUE id, data, obj;
    char *sid, *sdata;

    rb_scan_args(argc, argv, "02", &id, &data);
    sid = NIL_P(id) ? NULL : StringValuePtr(id);
    sdata = NIL_P(data) ? NULL : StringValuePtr(data);
    GetEngine(self, e);
#if OPENSSL_VERSION_NUMBER < 0x00907000L
    pkey = ENGINE_load_private_key(e, sid, sdata);
#else
    pkey = ENGINE_load_private_key(e, sid, NULL, sdata);
#endif
    if (!pkey) ossl_raise(eEngineError, NULL);
    obj = ossl_pkey_new(pkey);
    OSSL_PKEY_SET_PRIVATE(obj);

    return obj;
}

static VALUE
ossl_engine_load_pubkey(int argc, VALUE *argv, VALUE self)
{
    ENGINE *e;
    EVP_PKEY *pkey;
    VALUE id, data;
    char *sid, *sdata;

    rb_scan_args(argc, argv, "02", &id, &data);
    sid = NIL_P(id) ? NULL : StringValuePtr(id);
    sdata = NIL_P(data) ? NULL : StringValuePtr(data);
    GetEngine(self, e);
#if OPENSSL_VERSION_NUMBER < 0x00907000L
    pkey = ENGINE_load_public_key(e, sid, sdata);
#else
    pkey = ENGINE_load_public_key(e, sid, NULL, sdata);
#endif
    if (!pkey) ossl_raise(eEngineError, NULL);

    return ossl_pkey_new(pkey);
}

static VALUE
ossl_engine_set_default(VALUE self, VALUE flag)
{
    ENGINE *e;
    int f = NUM2INT(flag);

    GetEngine(self, e);
    ENGINE_set_default(e, f);

    return Qtrue;
}

static VALUE
ossl_engine_ctrl_cmd(int argc, VALUE *argv, VALUE self)
{
    ENGINE *e;
    VALUE cmd, val;
    int ret;

    GetEngine(self, e);
    rb_scan_args(argc, argv, "11", &cmd, &val);
    StringValue(cmd);
    if (!NIL_P(val)) StringValue(val);
    ret = ENGINE_ctrl_cmd_string(e, RSTRING(cmd)->ptr,
                                 NIL_P(val) ? NULL : RSTRING(val)->ptr, 0);
    if (!ret) ossl_raise(eEngineError, NULL);

    return self;
}

static VALUE
ossl_engine_cmd_flag_to_name(int flag)
{
    switch(flag){
    case ENGINE_CMD_FLAG_NUMERIC:  return rb_str_new2("NUMERIC");
    case ENGINE_CMD_FLAG_STRING:   return rb_str_new2("STRING");
    case ENGINE_CMD_FLAG_NO_INPUT: return rb_str_new2("NO_INPUT");
    case ENGINE_CMD_FLAG_INTERNAL: return rb_str_new2("INTERNAL");
    default: return rb_str_new2("UNKNOWN");
    }
}

static VALUE
ossl_engine_get_cmds(VALUE self)
{
    ENGINE *e;
    const ENGINE_CMD_DEFN *defn, *p;
    VALUE ary, tmp;

    GetEngine(self, e);
    ary = rb_ary_new();
    if ((defn = ENGINE_get_cmd_defns(e)) != NULL){
        for (p = defn; p->cmd_num > 0; p++){
            tmp = rb_ary_new();
            rb_ary_push(tmp, rb_str_new2(p->cmd_name));
            rb_ary_push(tmp, rb_str_new2(p->cmd_desc));
            rb_ary_push(tmp, ossl_engine_cmd_flag_to_name(p->cmd_flags));
            rb_ary_push(ary, tmp);
        }
    }

    return ary;
}

static VALUE
ossl_engine_inspect(VALUE self)
{
    VALUE str;
    char *cname = rb_class2name(rb_obj_class(self));

    str = rb_str_new2("#<");
    rb_str_cat2(str, cname);
    rb_str_cat2(str, " id=\"");
    rb_str_append(str, ossl_engine_get_id(self));
    rb_str_cat2(str, "\" name=\"");
    rb_str_append(str, ossl_engine_get_name(self));
    rb_str_cat2(str, "\">");

    return str;
}

#define DefEngineConst(x) rb_define_const(cEngine, #x, INT2NUM(ENGINE_##x))

void
Init_ossl_engine()
{
    cEngine = rb_define_class_under(mOSSL, "Engine", rb_cObject);
    eEngineError = rb_define_class_under(cEngine, "EngineError", eOSSLError);

    rb_define_alloc_func(cEngine, ossl_engine_s_alloc);
    rb_define_singleton_method(cEngine, "load", ossl_engine_s_load, -1);
    rb_define_singleton_method(cEngine, "cleanup", ossl_engine_s_cleanup, 0);
    rb_define_singleton_method(cEngine, "engines", ossl_engine_s_engines, 0);
    rb_define_singleton_method(cEngine, "by_id", ossl_engine_s_by_id, 1);
    rb_undef_method(CLASS_OF(cEngine), "new");

    rb_define_method(cEngine, "id", ossl_engine_get_id, 0);
    rb_define_method(cEngine, "name", ossl_engine_get_name, 0);
    rb_define_method(cEngine, "finish", ossl_engine_finish, 0);
    rb_define_method(cEngine, "cipher", ossl_engine_get_cipher, 1);
    rb_define_method(cEngine, "digest",  ossl_engine_get_digest, 1);
    rb_define_method(cEngine, "load_private_key", ossl_engine_load_privkey, -1);
    rb_define_method(cEngine, "load_public_key", ossl_engine_load_pubkey, -1);
    rb_define_method(cEngine, "set_default", ossl_engine_set_default, 1);
    rb_define_method(cEngine, "ctrl_cmd", ossl_engine_ctrl_cmd, -1);
    rb_define_method(cEngine, "cmds", ossl_engine_get_cmds, 0);
    rb_define_method(cEngine, "inspect", ossl_engine_inspect, 0);

    DefEngineConst(METHOD_RSA);
    DefEngineConst(METHOD_DSA);
    DefEngineConst(METHOD_DH);
    DefEngineConst(METHOD_RAND);
#ifdef ENGINE_METHOD_BN_MOD_EXP
    DefEngineConst(METHOD_BN_MOD_EXP);
#endif
#ifdef ENGINE_METHOD_BN_MOD_EXP_CRT
    DefEngineConst(METHOD_BN_MOD_EXP_CRT);
#endif
#ifdef ENGINE_METHOD_CIPHERS
    DefEngineConst(METHOD_CIPHERS);
#endif
#ifdef ENGINE_METHOD_DIGESTS
    DefEngineConst(METHOD_DIGESTS);
#endif
    DefEngineConst(METHOD_ALL);
    DefEngineConst(METHOD_NONE);
}
#else
void
Init_ossl_engine()
{
}
#endif
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl_engine.h

root/ext/openssl/ossl_engine.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/*
 * $Id: ossl_engine.h,v 1.1 2003/10/02 08:47:11 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2003  Michal Rokos <m.rokos@sh.cvut.cz>
 * Copyright (C) 2003  GOTOU Yuuzou <gotoyuzo@notwork.org>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#if !defined(OSSL_ENGINE_H)
#define OSSL_ENGINE_H

extern VALUE cEngine;
extern VALUE eEngineError;

void Init_ossl_engine(void);

#endif /* OSSL_ENGINE_H */
/* [<][>][^][v][top][bottom][index] [help] */


ext/openssl/ossl_hmac.c

root/ext/openssl/ossl_hmac.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. ossl_hmac_free
  2. ossl_hmac_alloc
  3. ossl_hmac_initialize
  4. ossl_hmac_copy
  5. ossl_hmac_update
  6. hmac_final
  7. ossl_hmac_digest
  8. ossl_hmac_hexdigest
  9. ossl_hmac_s_digest
  10. ossl_hmac_s_hexdigest
  11. Init_ossl_hmac
  12. Init_ossl_hmac
/*
 * $Id: ossl_hmac.c,v 1.6 2004/12/15 06:35:53 matz Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#if !defined(OPENSSL_NO_HMAC)

#include "ossl.h"

#define MakeHMAC(obj, klass, ctx) \
    obj = Data_Make_Struct(klass, HMAC_CTX, 0, ossl_hmac_free, ctx)
#define GetHMAC(obj, ctx) do { \
    Data_Get_Struct(obj, HMAC_CTX, ctx); \
    if (!ctx) { \
        ossl_raise(rb_eRuntimeError, "HMAC wasn't initialized"); \
    } \
} while (0)
#define SafeGetHMAC(obj, ctx) do { \
    OSSL_Check_Kind(obj, cHMAC); \
    GetHMAC(obj, ctx); \
} while (0)

/*
 * Classes
 */
VALUE cHMAC;
VALUE eHMACError;

/*
 * Public
 */

/*
 * Private
 */
static void
ossl_hmac_free(HMAC_CTX *ctx)
{
    HMAC_CTX_cleanup(ctx);
    free(ctx);
}

static VALUE
ossl_hmac_alloc(VALUE klass)
{
    HMAC_CTX *ctx;
    VALUE obj;

    MakeHMAC(obj, klass, ctx);
    HMAC_CTX_init(ctx);

    return obj;
}

static VALUE
ossl_hmac_initialize(VALUE self, VALUE key, VALUE digest)
{
    HMAC_CTX *ctx;

    StringValue(key);
    GetHMAC(self, ctx);
    HMAC_Init_ex(ctx, RSTRING(key)->ptr, RSTRING(key)->len,
                 GetDigestPtr(digest), NULL);

    return self;
}

static VALUE
ossl_hmac_copy(VALUE self, VALUE other)
{
    HMAC_CTX *ctx1, *ctx2;

    rb_check_frozen(self);
    if (self == other) return self;

    GetHMAC(self, ctx1);
    SafeGetHMAC(other, ctx2);

    if (!HMAC_CTX_copy(ctx1, ctx2)) {
        ossl_raise(eHMACError, NULL);
    }
    return self;
}

static VALUE
ossl_hmac_update(VALUE self, VALUE data)
{
    HMAC_CTX *ctx;

    StringValue(data);
    GetHMAC(self, ctx);
    HMAC_Update(ctx, RSTRING(data)->ptr, RSTRING(data)->len);

    return self;
}

static void
hmac_final(HMAC_CTX *ctx, char **buf, int *buf_len)
{
    HMAC_CTX final;

    if (!HMAC_CTX_copy(&final, ctx)) {
        ossl_raise(eHMACError, NULL);
    }
    if (!(*buf = OPENSSL_malloc(HMAC_size(&final)))) {
        HMAC_CTX_cleanup(&final);
        OSSL_Debug("Allocating %d mem", HMAC_size(&final));
        ossl_raise(eHMACError, "Cannot allocate memory for hmac");
    }
    HMAC_Final(&final, *buf, buf_len);
    HMAC_CTX_cleanup(&final);
}

static VALUE
ossl_hmac_digest(VALUE self)
{
    HMAC_CTX *ctx;
    char *buf;
    int buf_len;
    VALUE digest;

    GetHMAC(self, ctx);
    hmac_final(ctx, &buf, &buf_len);
    digest = ossl_buf2str(buf, buf_len);

    return digest;
}

static VALUE
ossl_hmac_hexdigest(VALUE self)
{
    HMAC_CTX *ctx;
    char *buf, *hexbuf;
    int buf_len;
    VALUE hexdigest;

    GetHMAC(self, ctx);
    hmac_final(ctx, &buf, &buf_len);
    if (string2hex(buf, buf_len, &hexbuf, NULL) != 2 * buf_len) {
        OPENSSL_free(buf);
        ossl_raise(eHMACError, "Memory alloc error");
    }
    OPENSSL_free(buf);
    hexdigest = ossl_buf2str(hexbuf, 2 * buf_len);

    return hexdigest;
}

static VALUE
ossl_hmac_s_digest(VALUE klass, VALUE digest, VALUE key, VALUE data)
{
    char *buf;
    int buf_len;

    StringValue(key);
    StringValue(data);
    buf = HMAC(GetDigestPtr(digest), RSTRING(key)->ptr, RSTRING(key)->len,
               RSTRING(data)->ptr, RSTRING(data)->len, NULL, &buf_len);

    return rb_str_new(buf, buf_len);
}

static VALUE
ossl_hmac_s_hexdigest(VALUE klass, VALUE digest, VALUE key, VALUE data)
{
    char *buf, *hexbuf;
    int buf_len;
    VALUE hexdigest;

    StringValue(key);
    StringValue(data);

    buf = HMAC(GetDigestPtr(digest), RSTRING(key)->ptr, RSTRING(key)->len,
               RSTRING(data)->ptr, RSTRING(data)->len, NULL, &buf_len);
    if (string2hex(buf, buf_len, &hexbuf, NULL) != 2 * buf_len) {
        ossl_raise(eHMACError, "Cannot convert buf to hexbuf");
    }
    hexdigest = ossl_buf2str(hexbuf, 2 * buf_len);

    return hexdigest;
}

/*
 * INIT
 */
void
Init_ossl_hmac()
{
    eHMACError = rb_define_class_under(mOSSL, "HMACError", eOSSLError);

    cHMAC = rb_define_class_under(mOSSL, "HMAC", rb_cObject);

    rb_define_alloc_func(cHMAC, ossl_hmac_alloc);
    rb_define_singleton_method(cHMAC, "digest", ossl_hmac_s_digest, 3);
    rb_define_singleton_method(cHMAC, "hexdigest", ossl_hmac_s_hexdigest, 3);

    rb_define_method(cHMAC, "initialize", ossl_hmac_initialize, 2);
    rb_define_copy_func(cHMAC, ossl_hmac_copy);

    rb_define_method(cHMAC, "update", ossl_hmac_update, 1);
    rb_define_alias(cHMAC, "<<", "update");
    rb_define_method(cHMAC, "digest", ossl_hmac_digest, 0);
    rb_define_method(cHMAC, "hexdigest", ossl_hmac_hexdigest, 0);
    rb_define_alias(cHMAC, "inspect", "hexdigest");
    rb_define_alias(cHMAC, "to_s", "hexdigest");
}

#else /* NO_HMAC */
#  warning >>> OpenSSL is compiled without HMAC support <<<
void
Init_ossl_hmac()
{
    rb_warning("HMAC will NOT be avaible: OpenSSL is compiled without HMAC.");
}
#endif /* NO_HMAC */
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl_hmac.h

root/ext/openssl/ossl_hmac.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/*
 * $Id: ossl_hmac.h,v 1.1 2003/07/23 16:11:29 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#if !defined(_OSSL_HMAC_H_)
#define _OSSL_HMAC_H_

extern VALUE cHMAC;
extern VALUE eHMACError;

void Init_ossl_hmac(void);

#endif /* _OSSL_HMAC_H_ */
/* [<][>][^][v][top][bottom][index] [help] */


ext/openssl/ossl_ns_spki.c

root/ext/openssl/ossl_ns_spki.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. ossl_spki_alloc
  2. ossl_spki_initialize
  3. ossl_spki_to_der
  4. ossl_spki_to_pem
  5. ossl_spki_print
  6. ossl_spki_get_public_key
  7. ossl_spki_set_public_key
  8. ossl_spki_get_challenge
  9. ossl_spki_set_challenge
  10. ossl_spki_sign
  11. ossl_spki_verify
  12. Init_ossl_ns_spki
/*
 * $Id: ossl_ns_spki.c,v 1.6 2005/08/22 20:47:53 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#include "ossl.h"

#define WrapSPKI(klass, obj, spki) do { \
    if (!spki) { \
        ossl_raise(rb_eRuntimeError, "SPKI wasn't initialized!"); \
    } \
    obj = Data_Wrap_Struct(klass, 0, NETSCAPE_SPKI_free, spki); \
} while (0)
#define GetSPKI(obj, spki) do { \
    Data_Get_Struct(obj, NETSCAPE_SPKI, spki); \
    if (!spki) { \
        ossl_raise(rb_eRuntimeError, "SPKI wasn't initialized!"); \
    } \
} while (0)

/*
 * Classes
 */
VALUE mNetscape;
VALUE cSPKI;
VALUE eSPKIError;

/*
 * Public functions
 */

/*
 * Private functions
 */
static VALUE
ossl_spki_alloc(VALUE klass)
{
    NETSCAPE_SPKI *spki;
    VALUE obj;

    if (!(spki = NETSCAPE_SPKI_new())) {
        ossl_raise(eSPKIError, NULL);
    }
    WrapSPKI(klass, obj, spki);

    return obj;
}

static VALUE
ossl_spki_initialize(int argc, VALUE *argv, VALUE self)
{
    NETSCAPE_SPKI *spki;
    VALUE buffer;
    unsigned char *p;

    if (rb_scan_args(argc, argv, "01", &buffer) == 0) {
        return self;
    }
    StringValue(buffer);
    if (!(spki = NETSCAPE_SPKI_b64_decode(RSTRING(buffer)->ptr, -1))) {
        p = RSTRING(buffer)->ptr;
        if (!(spki = d2i_NETSCAPE_SPKI(NULL, &p, RSTRING(buffer)->len))) {
            ossl_raise(eSPKIError, NULL);
        }
    }
    NETSCAPE_SPKI_free(DATA_PTR(self));
    DATA_PTR(self) = spki;

    return self;
}

static VALUE
ossl_spki_to_der(VALUE self)
{
    NETSCAPE_SPKI *spki;
    VALUE str;
    long len;
    unsigned char *p;

    GetSPKI(self, spki);
    if ((len = i2d_NETSCAPE_SPKI(spki, NULL)) <= 0)
        ossl_raise(eX509CertError, NULL);
    str = rb_str_new(0, len);
    p = RSTRING(str)->ptr;
    if (i2d_NETSCAPE_SPKI(spki, &p) <= 0)
        ossl_raise(eX509CertError, NULL);
    ossl_str_adjust(str, p);

    return str;
}

static VALUE
ossl_spki_to_pem(VALUE self)
{
    NETSCAPE_SPKI *spki;
    char *data;
    VALUE str;

    GetSPKI(self, spki);
    if (!(data = NETSCAPE_SPKI_b64_encode(spki))) {
        ossl_raise(eSPKIError, NULL);
    }
    str = ossl_buf2str(data, strlen(data));

    return str;
}

static VALUE
ossl_spki_print(VALUE self)
{
    NETSCAPE_SPKI *spki;
    BIO *out;
    BUF_MEM *buf;
    VALUE str;

    GetSPKI(self, spki);
    if (!(out = BIO_new(BIO_s_mem()))) {
        ossl_raise(eSPKIError, NULL);
    }
    if (!NETSCAPE_SPKI_print(out, spki)) {
        BIO_free(out);
        ossl_raise(eSPKIError, NULL);
    }
    BIO_get_mem_ptr(out, &buf);
    str = rb_str_new(buf->data, buf->length);
    BIO_free(out);

    return str;
}

static VALUE
ossl_spki_get_public_key(VALUE self)
{
    NETSCAPE_SPKI *spki;
    EVP_PKEY *pkey;

    GetSPKI(self, spki);
    if (!(pkey = NETSCAPE_SPKI_get_pubkey(spki))) { /* adds an reference */
        ossl_raise(eSPKIError, NULL);
    }

    return ossl_pkey_new(pkey); /* NO DUP - OK */
}

static VALUE
ossl_spki_set_public_key(VALUE self, VALUE key)
{
    NETSCAPE_SPKI *spki;

    GetSPKI(self, spki);
    if (!NETSCAPE_SPKI_set_pubkey(spki, GetPKeyPtr(key))) { /* NO NEED TO DUP */
        ossl_raise(eSPKIError, NULL);
    }

    return key;
}

static VALUE
ossl_spki_get_challenge(VALUE self)
{
    NETSCAPE_SPKI *spki;

    GetSPKI(self, spki);
    if (spki->spkac->challenge->length <= 0) {
        OSSL_Debug("Challenge.length <= 0?");
        return rb_str_new2(NULL);
    }

    return rb_str_new(spki->spkac->challenge->data,
                      spki->spkac->challenge->length);
}

static VALUE
ossl_spki_set_challenge(VALUE self, VALUE str)
{
    NETSCAPE_SPKI *spki;

    StringValue(str);
    GetSPKI(self, spki);
    if (!ASN1_STRING_set(spki->spkac->challenge, RSTRING(str)->ptr,
                         RSTRING(str)->len)) {
        ossl_raise(eSPKIError, NULL);
    }

    return str;
}

static VALUE
ossl_spki_sign(VALUE self, VALUE key, VALUE digest)
{
    NETSCAPE_SPKI *spki;
    EVP_PKEY *pkey;
    const EVP_MD *md;

    pkey = GetPrivPKeyPtr(key); /* NO NEED TO DUP */
    md = GetDigestPtr(digest);
    GetSPKI(self, spki);
    if (!NETSCAPE_SPKI_sign(spki, pkey, md)) {
        ossl_raise(eSPKIError, NULL);
    }

    return self;
}

/*
 * Checks that cert signature is made with PRIVversion of this PUBLIC 'key'
 */
static VALUE
ossl_spki_verify(VALUE self, VALUE key)
{
    NETSCAPE_SPKI *spki;

    GetSPKI(self, spki);
    switch (NETSCAPE_SPKI_verify(spki, GetPKeyPtr(key))) { /* NO NEED TO DUP */
    case 0:
        return Qfalse;
    case 1:
        return Qtrue;
    default:
        ossl_raise(eSPKIError, NULL);
    }
    return Qnil; /* dummy */
}

/*
 * NETSCAPE_SPKI init
 */
void
Init_ossl_ns_spki()
{
    mNetscape = rb_define_module_under(mOSSL, "Netscape");

    eSPKIError = rb_define_class_under(mNetscape, "SPKIError", eOSSLError);

    cSPKI = rb_define_class_under(mNetscape, "SPKI", rb_cObject);

    rb_define_alloc_func(cSPKI, ossl_spki_alloc);
    rb_define_method(cSPKI, "initialize", ossl_spki_initialize, -1);

    rb_define_method(cSPKI, "to_der", ossl_spki_to_der, 0);
    rb_define_method(cSPKI, "to_pem", ossl_spki_to_pem, 0);
    rb_define_alias(cSPKI, "to_s", "to_pem");
    rb_define_method(cSPKI, "to_text", ossl_spki_print, 0);
    rb_define_method(cSPKI, "public_key", ossl_spki_get_public_key, 0);
    rb_define_method(cSPKI, "public_key=", ossl_spki_set_public_key, 1);
    rb_define_method(cSPKI, "sign", ossl_spki_sign, 2);
    rb_define_method(cSPKI, "verify", ossl_spki_verify, 1);
    rb_define_method(cSPKI, "challenge", ossl_spki_get_challenge, 0);
    rb_define_method(cSPKI, "challenge=", ossl_spki_set_challenge, 1);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl_ns_spki.h

root/ext/openssl/ossl_ns_spki.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/*
 * $Id: ossl_ns_spki.h,v 1.1 2003/07/23 16:11:29 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#if !defined(_OSSL_NS_SPKI_H_)
#define _OSSL_NS_SPKI_H_

extern VALUE mNetscape;
extern VALUE cSPKI;
extern VALUE eSPKIError;

void Init_ossl_ns_spki(void);

#endif /* _OSSL_NS_SPKI_H_ */
/* [<][>][^][v][top][bottom][index] [help] */


ext/openssl/ossl_ocsp.c

root/ext/openssl/ossl_ocsp.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. ossl_ocspcertid_new
  2. ossl_ocspreq_alloc
  3. ossl_ocspreq_initialize
  4. ossl_ocspreq_add_nonce
  5. ossl_ocspreq_check_nonce
  6. ossl_ocspreq_add_certid
  7. ossl_ocspreq_get_certid
  8. ossl_ocspreq_sign
  9. ossl_ocspreq_verify
  10. ossl_ocspreq_to_der
  11. ossl_ocspres_s_create
  12. ossl_ocspres_alloc
  13. ossl_ocspres_initialize
  14. ossl_ocspres_status
  15. ossl_ocspres_status_string
  16. ossl_ocspres_get_basic
  17. ossl_ocspres_to_der
  18. ossl_ocspbres_alloc
  19. ossl_ocspbres_initialize
  20. ossl_ocspbres_copy_nonce
  21. ossl_ocspbres_add_nonce
  22. ossl_ocspbres_add_status
  23. ossl_ocspbres_get_status
  24. ossl_ocspbres_sign
  25. ossl_ocspbres_verify
  26. ossl_ocspcid_alloc
  27. ossl_ocspcid_initialize
  28. ossl_ocspcid_cmp
  29. ossl_ocspcid_cmp_issuer
  30. ossl_ocspcid_get_serial
  31. Init_ossl_ocsp
  32. Init_ossl_ocsp
/*
 * $Id: ossl_ocsp.c,v 1.6 2005/01/22 20:26:29 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2003  Michal Rokos <m.rokos@sh.cvut.cz>
 * Copyright (C) 2003  GOTOU Yuuzou <gotoyuzo@notwork.org>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#include "ossl.h"

#if defined(OSSL_OCSP_ENABLED)

#define WrapOCSPReq(klass, obj, req) do { \
    if(!req) ossl_raise(rb_eRuntimeError, "Request wasn't initialized!"); \
    obj = Data_Wrap_Struct(klass, 0, OCSP_REQUEST_free, req); \
} while (0)
#define GetOCSPReq(obj, req) do { \
    Data_Get_Struct(obj, OCSP_REQUEST, req); \
    if(!req) ossl_raise(rb_eRuntimeError, "Request wasn't initialized!"); \
} while (0)
#define SafeGetOCSPReq(obj, req) do { \
    OSSL_Check_Kind(obj, cOCSPReq); \
    GetOCSPReq(obj, req); \
} while (0)

#define WrapOCSPRes(klass, obj, res) do { \
    if(!res) ossl_raise(rb_eRuntimeError, "Response wasn't initialized!"); \
    obj = Data_Wrap_Struct(klass, 0, OCSP_RESPONSE_free, res); \
} while (0)
#define GetOCSPRes(obj, res) do { \
    Data_Get_Struct(obj, OCSP_RESPONSE, res); \
    if(!res) ossl_raise(rb_eRuntimeError, "Response wasn't initialized!"); \
} while (0)
#define SafeGetOCSPRes(obj, res) do { \
    OSSL_Check_Kind(obj, cOCSPRes); \
    GetOCSPRes(obj, res); \
} while (0)

#define WrapOCSPBasicRes(klass, obj, res) do { \
    if(!res) ossl_raise(rb_eRuntimeError, "Response wasn't initialized!"); \
    obj = Data_Wrap_Struct(klass, 0, OCSP_BASICRESP_free, res); \
} while (0)
#define GetOCSPBasicRes(obj, res) do { \
    Data_Get_Struct(obj, OCSP_BASICRESP, res); \
    if(!res) ossl_raise(rb_eRuntimeError, "Response wasn't initialized!"); \
} while (0)
#define SafeGetOCSPBasicRes(obj, res) do { \
    OSSL_Check_Kind(obj, cOCSPBasicRes); \
    GetOCSPBasicRes(obj, res); \
} while (0)

#define WrapOCSPCertId(klass, obj, cid) do { \
    if(!cid) ossl_raise(rb_eRuntimeError, "Cert ID wasn't initialized!"); \
    obj = Data_Wrap_Struct(klass, 0, OCSP_CERTID_free, cid); \
} while (0)
#define GetOCSPCertId(obj, cid) do { \
    Data_Get_Struct(obj, OCSP_CERTID, cid); \
    if(!cid) ossl_raise(rb_eRuntimeError, "Cert ID wasn't initialized!"); \
} while (0)
#define SafeGetOCSPCertId(obj, cid) do { \
    OSSL_Check_Kind(obj, cOCSPCertId); \
    GetOCSPCertId(obj, cid); \
} while (0)

VALUE mOCSP;
VALUE eOCSPError;
VALUE cOCSPReq;
VALUE cOCSPRes;
VALUE cOCSPBasicRes;
VALUE cOCSPCertId;

/*
 * Public
 */
static VALUE
ossl_ocspcertid_new(OCSP_CERTID *cid)
{
    VALUE obj;
    WrapOCSPCertId(cOCSPCertId, obj, cid);
    return obj;
}

/*
 * OCSP::Resquest
 */
static VALUE
ossl_ocspreq_alloc(VALUE klass)
{
    OCSP_REQUEST *req;
    VALUE obj;

    if (!(req = OCSP_REQUEST_new()))
        ossl_raise(eOCSPError, NULL);
    WrapOCSPReq(klass, obj, req);

    return obj;
}

static VALUE
ossl_ocspreq_initialize(int argc, VALUE *argv, VALUE self)
{
    VALUE arg;
    unsigned char *p;

    rb_scan_args(argc, argv, "01", &arg);
    if(!NIL_P(arg)){
        arg = ossl_to_der_if_possible(arg);
        StringValue(arg);
        p = (unsigned char*)RSTRING(arg)->ptr;
        if(!d2i_OCSP_REQUEST((OCSP_REQUEST**)&DATA_PTR(self), &p,
                             RSTRING(arg)->len)){
            ossl_raise(eOCSPError, "cannot load DER encoded request");
        }
    }

    return self;
}

static VALUE
ossl_ocspreq_add_nonce(int argc, VALUE *argv, VALUE self)
{
    OCSP_REQUEST *req;
    VALUE val;
    int ret;

    rb_scan_args(argc, argv, "01", &val);
    if(NIL_P(val)) {
        GetOCSPReq(self, req);
        ret = OCSP_request_add1_nonce(req, NULL, -1);
    }
    else{
        StringValue(val);
        GetOCSPReq(self, req);
        ret = OCSP_request_add1_nonce(req, RSTRING(val)->ptr, RSTRING(val)->len);
    }
    if(!ret) ossl_raise(eOCSPError, NULL);

    return self;
}

/* Check nonce validity in a request and response.
 * Return value reflects result:
 *  1: nonces present and equal.
 *  2: nonces both absent.
 *  3: nonce present in response only.
 *  0: nonces both present and not equal.
 * -1: nonce in request only.
 *
 *  For most responders clients can check return > 0.
 *  If responder doesn't handle nonces return != 0 may be
 *  necessary. return == 0 is always an error.
 */
static VALUE
ossl_ocspreq_check_nonce(VALUE self, VALUE basic_resp)
{
    OCSP_REQUEST *req;
    OCSP_BASICRESP *bs;
    int res;

    GetOCSPReq(self, req);
    SafeGetOCSPBasicRes(basic_resp, bs);
    res = OCSP_check_nonce(req, bs);

    return INT2NUM(res);
}

static VALUE
ossl_ocspreq_add_certid(VALUE self, VALUE certid)
{
    OCSP_REQUEST *req;
    OCSP_CERTID *id;

    GetOCSPReq(self, req);
    GetOCSPCertId(certid, id);
    if(!OCSP_request_add0_id(req, OCSP_CERTID_dup(id)))
        ossl_raise(eOCSPError, NULL);

    return self;
}

static VALUE
ossl_ocspreq_get_certid(VALUE self)
{
    OCSP_REQUEST *req;
    OCSP_ONEREQ *one;
    OCSP_CERTID *id;
    VALUE ary, tmp;
    int i, count;

    GetOCSPReq(self, req);
    count = OCSP_request_onereq_count(req);
    ary = (count > 0) ? rb_ary_new() : Qnil;
    for(i = 0; i < count; i++){
        one = OCSP_request_onereq_get0(req, i);
        if(!(id = OCSP_CERTID_dup(OCSP_onereq_get0_id(one))))
            ossl_raise(eOCSPError, NULL);
        WrapOCSPCertId(cOCSPCertId, tmp, id);
        rb_ary_push(ary, tmp);
    }

    return ary;
}

static VALUE
ossl_ocspreq_sign(int argc, VALUE *argv, VALUE self)
{
    VALUE signer_cert, signer_key, certs, flags;
    OCSP_REQUEST *req;
    X509 *signer;
    EVP_PKEY *key;
    STACK_OF(X509) *x509s;
    unsigned long flg;
    int ret;

    rb_scan_args(argc, argv, "22", &signer_cert, &signer_key, &certs, &flags);
    signer = GetX509CertPtr(signer_cert);
    key = GetPrivPKeyPtr(signer_key);
    flg = NIL_P(flags) ? 0 : NUM2INT(flags);
    if(NIL_P(certs)){
        x509s = sk_X509_new_null();
        flags |= OCSP_NOCERTS;
    }
    else x509s = ossl_x509_ary2sk(certs);
    GetOCSPReq(self, req);
    ret = OCSP_request_sign(req, signer, key, EVP_sha1(), x509s, flg);
    sk_X509_pop_free(x509s, X509_free);
    if(!ret) ossl_raise(eOCSPError, NULL);

    return self;
}

static VALUE
ossl_ocspreq_verify(int argc, VALUE *argv, VALUE self)
{
    VALUE certs, store, flags;
    OCSP_REQUEST *req;
    STACK_OF(X509) *x509s;
    X509_STORE *x509st;
    int flg, result;

    rb_scan_args(argc, argv, "21", &certs, &store, &flags);
    x509st = GetX509StorePtr(store);
    flg = NIL_P(flags) ? 0 : INT2NUM(flags);
    x509s = ossl_x509_ary2sk(certs);
    GetOCSPReq(self, req);
    result = OCSP_request_verify(req, x509s, x509st, flg);
    sk_X509_pop_free(x509s, X509_free);
    if(!result) rb_warn("%s", ERR_error_string(ERR_peek_error(), NULL));

    return result ? Qtrue : Qfalse;
}

static VALUE
ossl_ocspreq_to_der(VALUE self)
{
    OCSP_REQUEST *req;
    VALUE str;
    unsigned char *p;
    long len;

    GetOCSPReq(self, req);
    if((len = i2d_OCSP_REQUEST(req, NULL)) <= 0)
        ossl_raise(eOCSPError, NULL);
    str = rb_str_new(0, len);
    p = RSTRING(str)->ptr;
    if(i2d_OCSP_REQUEST(req, &p) <= 0)
        ossl_raise(eOCSPError, NULL);
    ossl_str_adjust(str, p);

    return str;
}

/*
 * OCSP::Response
 */
static VALUE
ossl_ocspres_s_create(VALUE klass, VALUE status, VALUE basic_resp)
{
    OCSP_BASICRESP *bs;
    OCSP_RESPONSE *res;
    VALUE obj;
    int st = NUM2INT(status);

    if(NIL_P(basic_resp)) bs = NULL;
    else GetOCSPBasicRes(basic_resp, bs); /* NO NEED TO DUP */
    if(!(res = OCSP_response_create(st, bs)))
        ossl_raise(eOCSPError, NULL);
    WrapOCSPRes(klass, obj, res);

    return obj;
}

static VALUE
ossl_ocspres_alloc(VALUE klass)
{
    OCSP_RESPONSE *res;
    VALUE obj;

    if(!(res = OCSP_RESPONSE_new()))
        ossl_raise(eOCSPError, NULL);
    WrapOCSPRes(klass, obj, res);

    return obj;
}

static VALUE
ossl_ocspres_initialize(int argc, VALUE *argv, VALUE self)
{
    VALUE arg;
    unsigned char *p;

    rb_scan_args(argc, argv, "01", &arg);
    if(!NIL_P(arg)){
        arg = ossl_to_der_if_possible(arg);
        StringValue(arg);
        p = RSTRING(arg)->ptr;
        if(!d2i_OCSP_RESPONSE((OCSP_RESPONSE**)&DATA_PTR(self), &p,
                              RSTRING(arg)->len)){
            ossl_raise(eOCSPError, "cannot load DER encoded response");
        }
    }

    return self;
}

static VALUE
ossl_ocspres_status(VALUE self)
{
    OCSP_RESPONSE *res;
    int st;

    GetOCSPRes(self, res);
    st = OCSP_response_status(res);

    return INT2NUM(st);
}

static VALUE
ossl_ocspres_status_string(VALUE self)
{
    OCSP_RESPONSE *res;
    int st;

    GetOCSPRes(self, res);
    st = OCSP_response_status(res);

    return rb_str_new2(OCSP_response_status_str(st));
}

static VALUE
ossl_ocspres_get_basic(VALUE self)
{
    OCSP_RESPONSE *res;
    OCSP_BASICRESP *bs;
    VALUE ret;

    GetOCSPRes(self, res);
    if(!(bs = OCSP_response_get1_basic(res)))
        return Qnil;
    WrapOCSPBasicRes(cOCSPBasicRes, ret, bs);

    return ret;
}

static VALUE
ossl_ocspres_to_der(VALUE self)
{
    OCSP_RESPONSE *res;
    VALUE str;
    long len;
    unsigned char *p;

    GetOCSPRes(self, res);
    if((len = i2d_OCSP_RESPONSE(res, NULL)) <= 0)
        ossl_raise(eOCSPError, NULL);
    str = rb_str_new(0, len);
    p = RSTRING(str)->ptr;
    if(i2d_OCSP_RESPONSE(res, NULL) <= 0)
        ossl_raise(eOCSPError, NULL);
    ossl_str_adjust(str, p);

    return str;
}

/*
 * OCSP::BasicResponse
 */
static VALUE
ossl_ocspbres_alloc(VALUE klass)
{
    OCSP_BASICRESP *bs;
    VALUE obj;

    if(!(bs = OCSP_BASICRESP_new()))
        ossl_raise(eOCSPError, NULL);
    WrapOCSPBasicRes(klass, obj, bs);

    return obj;
}

static VALUE
ossl_ocspbres_initialize(int argc, VALUE *argv, VALUE self)
{
    return self;
}

static VALUE
ossl_ocspbres_copy_nonce(VALUE self, VALUE request)
{
    OCSP_BASICRESP *bs;
    OCSP_REQUEST *req;
    int ret;

    GetOCSPBasicRes(self, bs);
    SafeGetOCSPReq(request, req);
    ret = OCSP_copy_nonce(bs, req);

    return INT2NUM(ret);
}

static VALUE
ossl_ocspbres_add_nonce(int argc, VALUE *argv, VALUE self)
{
    OCSP_BASICRESP *bs;
    VALUE val;
    int ret;

    rb_scan_args(argc, argv, "01", &val);
    if(NIL_P(val)) {
        GetOCSPBasicRes(self, bs);
        ret = OCSP_basic_add1_nonce(bs, NULL, -1);
    }
    else{
        StringValue(val);
        GetOCSPBasicRes(self, bs);
        ret = OCSP_basic_add1_nonce(bs, RSTRING(val)->ptr, RSTRING(val)->len);
    }
    if(!ret) ossl_raise(eOCSPError, NULL);

    return self;
}

static VALUE
ossl_ocspbres_add_status(VALUE self, VALUE cid, VALUE status,
                         VALUE reason, VALUE revtime,
                         VALUE thisupd, VALUE nextupd, VALUE ext)
{
    OCSP_BASICRESP *bs;
    OCSP_SINGLERESP *single;
    OCSP_CERTID *id;
    int st, rsn;
    ASN1_TIME *ths, *nxt, *rev;
    int error, i, rstatus = 0;
    VALUE tmp;

    st = NUM2INT(status);
    rsn = NIL_P(status) ? 0 : NUM2INT(reason);
    if(!NIL_P(ext)){
        /* All ary's members should be X509Extension */
        Check_Type(ext, T_ARRAY);
        for (i = 0; i < RARRAY(ext)->len; i++)
            OSSL_Check_Kind(RARRAY(ext)->ptr[i], cX509Ext);
    }

    error = 0;
    ths = nxt = rev = NULL;
    if(!NIL_P(revtime)){
        tmp = rb_protect(rb_Integer, revtime, &rstatus);
        if(rstatus) goto err;
        rev = X509_gmtime_adj(NULL, NUM2INT(tmp));
    }
    tmp = rb_protect(rb_Integer, thisupd, &rstatus);
    if(rstatus) goto err;
    ths = X509_gmtime_adj(NULL, NUM2INT(tmp));
    tmp = rb_protect(rb_Integer, nextupd, &rstatus);
    if(rstatus) goto err;
    nxt = X509_gmtime_adj(NULL, NUM2INT(tmp));

    GetOCSPBasicRes(self, bs);
    SafeGetOCSPCertId(cid, id);
    if(!(single = OCSP_basic_add1_status(bs, id, st, rsn, rev, ths, nxt))){
        error = 1;
        goto err;
    }

    if(!NIL_P(ext)){
        X509_EXTENSION *x509ext;
        sk_X509_EXTENSION_pop_free(single->singleExtensions, X509_EXTENSION_free);
        single->singleExtensions = NULL;
        for(i = 0; i < RARRAY(ext)->len; i++){
            x509ext = DupX509ExtPtr(RARRAY(ext)->ptr[i]);
            if(!OCSP_SINGLERESP_add_ext(single, x509ext, -1)){
                X509_EXTENSION_free(x509ext);
                error = 1;
                goto err;
            }
            X509_EXTENSION_free(x509ext);
        }
    }

 err:
    ASN1_TIME_free(ths);
    ASN1_TIME_free(nxt);
    ASN1_TIME_free(rev);
    if(error) ossl_raise(eOCSPError, NULL);
    if(rstatus) rb_jump_tag(rstatus);

    return self;
}

static VALUE
ossl_ocspbres_get_status(VALUE self)
{
    OCSP_BASICRESP *bs;
    OCSP_SINGLERESP *single;
    OCSP_CERTID *cid;
    ASN1_TIME *revtime, *thisupd, *nextupd;
    int status, reason;
    X509_EXTENSION *x509ext;
    VALUE ret, ary, ext;
    int count, ext_count, i, j;

    GetOCSPBasicRes(self, bs);
    ret = rb_ary_new();
    count = OCSP_resp_count(bs);
    for(i = 0; i < count; i++){
        single = OCSP_resp_get0(bs, i);
        if(!single) continue;

        revtime = thisupd = nextupd = NULL;
        status = OCSP_single_get0_status(single, &reason, &revtime,
                                         &thisupd, &nextupd);
        if(status < 0) continue;
        if(!(cid = OCSP_CERTID_dup(single->certId)))
            ossl_raise(eOCSPError, NULL);
        ary = rb_ary_new();
        rb_ary_push(ary, ossl_ocspcertid_new(cid));
        rb_ary_push(ary, INT2NUM(status));
        rb_ary_push(ary, INT2NUM(reason));
        rb_ary_push(ary, revtime ? asn1time_to_time(revtime) : Qnil);
        rb_ary_push(ary, thisupd ? asn1time_to_time(thisupd) : Qnil);
        rb_ary_push(ary, nextupd ? asn1time_to_time(nextupd) : Qnil);
        ext = rb_ary_new();
        ext_count = OCSP_SINGLERESP_get_ext_count(single);
        for(j = 0; j < ext_count; j++){
            x509ext = OCSP_SINGLERESP_get_ext(single, j);
            rb_ary_push(ext, ossl_x509ext_new(x509ext));
        }
        rb_ary_push(ary, ext);
        rb_ary_push(ret, ary);
    }

    return ret;
}

static VALUE
ossl_ocspbres_sign(int argc, VALUE *argv, VALUE self)
{
    VALUE signer_cert, signer_key, certs, flags;
    OCSP_BASICRESP *bs;
    X509 *signer;
    EVP_PKEY *key;
    STACK_OF(X509) *x509s;
    unsigned long flg;
    int ret;

    rb_scan_args(argc, argv, "22", &signer_cert, &signer_key, &certs, &flags);
    signer = GetX509CertPtr(signer_cert);
    key = GetPrivPKeyPtr(signer_key);
    flg = NIL_P(flags) ? 0 : NUM2INT(flags);
    if(NIL_P(certs)){
        x509s = sk_X509_new_null();
        flg |= OCSP_NOCERTS;
    }
    else{
        x509s = ossl_x509_ary2sk(certs);
    }
    GetOCSPBasicRes(self, bs);
    ret = OCSP_basic_sign(bs, signer, key, EVP_sha1(), x509s, flg);
    sk_X509_pop_free(x509s, X509_free);
    if(!ret) ossl_raise(eOCSPError, NULL);

    return self;
}

static VALUE
ossl_ocspbres_verify(int argc, VALUE *argv, VALUE self)
{
    VALUE certs, store, flags;
    OCSP_BASICRESP *bs;
    STACK_OF(X509) *x509s;
    X509_STORE *x509st;
    int flg, result;

    rb_scan_args(argc, argv, "21", &certs, &store, &flags);
    x509st = GetX509StorePtr(store);
    flg = NIL_P(flags) ? 0 : INT2NUM(flags);
    x509s = ossl_x509_ary2sk(certs);
    GetOCSPBasicRes(self, bs);
    result = OCSP_basic_verify(bs, x509s, x509st, flg);
    sk_X509_pop_free(x509s, X509_free);
    if(!result) rb_warn("%s", ERR_error_string(ERR_peek_error(), NULL));

    return result ? Qtrue : Qfalse;
}

/*
 * OCSP::CertificateId
 */
static VALUE
ossl_ocspcid_alloc(VALUE klass)
{
    OCSP_CERTID *id;
    VALUE obj;

    if(!(id = OCSP_CERTID_new()))
        ossl_raise(eOCSPError, NULL);
    WrapOCSPCertId(klass, obj, id);

    return obj;
}

static VALUE
ossl_ocspcid_initialize(VALUE self, VALUE subject, VALUE issuer)
{
    OCSP_CERTID *id, *newid;
    X509 *x509s, *x509i;

    x509s = GetX509CertPtr(subject); /* NO NEED TO DUP */
    x509i = GetX509CertPtr(issuer); /* NO NEED TO DUP */
    if(!(newid = OCSP_cert_to_id(NULL, x509s, x509i)))
        ossl_raise(eOCSPError, NULL);
    GetOCSPCertId(self, id);
    OCSP_CERTID_free(id);
    RDATA(self)->data = newid;

    return self;
}

static VALUE
ossl_ocspcid_cmp(VALUE self, VALUE other)
{
    OCSP_CERTID *id, *id2;
    int result;

    GetOCSPCertId(self, id);
    SafeGetOCSPCertId(other, id2);
    result = OCSP_id_cmp(id, id2);

    return (result == 0) ? Qtrue : Qfalse;
}

static VALUE
ossl_ocspcid_cmp_issuer(VALUE self, VALUE other)
{
    OCSP_CERTID *id, *id2;
    int result;

    GetOCSPCertId(self, id);
    SafeGetOCSPCertId(other, id2);
    result = OCSP_id_issuer_cmp(id, id2);

    return (result == 0) ? Qtrue : Qfalse;
}

static VALUE
ossl_ocspcid_get_serial(VALUE self)
{
    OCSP_CERTID *id;

    GetOCSPCertId(self, id);

    return asn1integer_to_num(id->serialNumber);
}

void
Init_ossl_ocsp()
{
    mOCSP = rb_define_module_under(mOSSL, "OCSP");

    eOCSPError = rb_define_class_under(mOCSP, "OCSPError", rb_cObject);

    cOCSPReq = rb_define_class_under(mOCSP, "Request", rb_cObject);
    rb_define_alloc_func(cOCSPReq, ossl_ocspreq_alloc);
    rb_define_method(cOCSPReq, "initialize", ossl_ocspreq_initialize, -1);
    rb_define_method(cOCSPReq, "add_nonce", ossl_ocspreq_add_nonce, -1);
    rb_define_method(cOCSPReq, "check_nonce", ossl_ocspreq_check_nonce, 1);
    rb_define_method(cOCSPReq, "add_certid", ossl_ocspreq_add_certid, 1);
    rb_define_method(cOCSPReq, "certid", ossl_ocspreq_get_certid, 0);
    rb_define_method(cOCSPReq, "sign", ossl_ocspreq_sign, -1);
    rb_define_method(cOCSPReq, "verify", ossl_ocspreq_verify, -1);
    rb_define_method(cOCSPReq, "to_der", ossl_ocspreq_to_der, 0);

    cOCSPRes = rb_define_class_under(mOCSP, "Response", rb_cObject);
    rb_define_singleton_method(cOCSPRes, "create", ossl_ocspres_s_create, 2);
    rb_define_alloc_func(cOCSPRes, ossl_ocspres_alloc);
    rb_define_method(cOCSPRes, "initialize", ossl_ocspres_initialize, -1);
    rb_define_method(cOCSPRes, "status", ossl_ocspres_status, 0);
    rb_define_method(cOCSPRes, "status_string", ossl_ocspres_status_string, 0);
    rb_define_method(cOCSPRes, "basic", ossl_ocspres_get_basic, 0);
    rb_define_method(cOCSPRes, "to_der", ossl_ocspres_to_der, 0);

    cOCSPBasicRes = rb_define_class_under(mOCSP, "BasicResponse", rb_cObject);
    rb_define_alloc_func(cOCSPBasicRes, ossl_ocspbres_alloc);
    rb_define_method(cOCSPBasicRes, "initialize", ossl_ocspbres_initialize, -1);
    rb_define_method(cOCSPBasicRes, "copy_nonce", ossl_ocspbres_copy_nonce, 1);
    rb_define_method(cOCSPBasicRes, "add_nonce", ossl_ocspbres_add_nonce, -1);
    rb_define_method(cOCSPBasicRes, "add_status", ossl_ocspbres_add_status, 7);
    rb_define_method(cOCSPBasicRes, "status", ossl_ocspbres_get_status, 0);
    rb_define_method(cOCSPBasicRes, "sign", ossl_ocspbres_sign, -1);
    rb_define_method(cOCSPBasicRes, "verify", ossl_ocspbres_verify, -1);

    cOCSPCertId = rb_define_class_under(mOCSP, "CertificateId", rb_cObject);
    rb_define_alloc_func(cOCSPCertId, ossl_ocspcid_alloc);
    rb_define_method(cOCSPCertId, "initialize", ossl_ocspcid_initialize, 2);
    rb_define_method(cOCSPCertId, "cmp", ossl_ocspcid_cmp, 1);
    rb_define_method(cOCSPCertId, "cmp_issuer", ossl_ocspcid_cmp_issuer, 1);
    rb_define_method(cOCSPCertId, "serial", ossl_ocspcid_get_serial, 0);

#define DefOCSPConst(x) rb_define_const(mOCSP, #x, INT2NUM(OCSP_##x))

    DefOCSPConst(RESPONSE_STATUS_SUCCESSFUL);
    DefOCSPConst(RESPONSE_STATUS_MALFORMEDREQUEST);
    DefOCSPConst(RESPONSE_STATUS_INTERNALERROR);
    DefOCSPConst(RESPONSE_STATUS_TRYLATER);
    DefOCSPConst(RESPONSE_STATUS_SIGREQUIRED);
    DefOCSPConst(RESPONSE_STATUS_UNAUTHORIZED);

    DefOCSPConst(REVOKED_STATUS_NOSTATUS);
    DefOCSPConst(REVOKED_STATUS_UNSPECIFIED);
    DefOCSPConst(REVOKED_STATUS_KEYCOMPROMISE);
    DefOCSPConst(REVOKED_STATUS_CACOMPROMISE);
    DefOCSPConst(REVOKED_STATUS_AFFILIATIONCHANGED);
    DefOCSPConst(REVOKED_STATUS_SUPERSEDED);
    DefOCSPConst(REVOKED_STATUS_CESSATIONOFOPERATION);
    DefOCSPConst(REVOKED_STATUS_CERTIFICATEHOLD);
    DefOCSPConst(REVOKED_STATUS_REMOVEFROMCRL);

    DefOCSPConst(NOCERTS);
    DefOCSPConst(NOINTERN);
    DefOCSPConst(NOSIGS);
    DefOCSPConst(NOCHAIN);
    DefOCSPConst(NOVERIFY);
    DefOCSPConst(NOEXPLICIT);
    DefOCSPConst(NOCASIGN);
    DefOCSPConst(NODELEGATED);
    DefOCSPConst(NOCHECKS);
    DefOCSPConst(TRUSTOTHER);
    DefOCSPConst(RESPID_KEY);
    DefOCSPConst(NOTIME);

#define DefOCSPVConst(x) rb_define_const(mOCSP, "V_" #x, INT2NUM(V_OCSP_##x))

    DefOCSPVConst(CERTSTATUS_GOOD);
    DefOCSPVConst(CERTSTATUS_REVOKED);
    DefOCSPVConst(CERTSTATUS_UNKNOWN);
    DefOCSPVConst(RESPID_NAME);
    DefOCSPVConst(RESPID_KEY);
}

#else /* ! OSSL_OCSP_ENABLED */
void
Init_ossl_ocsp()
{
}
#endif
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl_ocsp.h

root/ext/openssl/ossl_ocsp.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/*
 * $Id: ossl_ocsp.h,v 1.1 2003/07/23 16:11:29 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2003  Michal Rokos <m.rokos@sh.cvut.cz>
 * Copyright (C) 2003  GOTOU Yuuzou <gotoyuzo@notwork.org>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#if !defined(_OSSL_OCSP_H_)
#define _OSSL_OCSP_H_

#if defined(OSSL_OCSP_ENABLED)
extern VALUE mOCSP;
extern VALUE cOPCSReq;
extern VALUE cOPCSRes;
extern VALUE cOPCSBasicRes;
#endif

void Init_ossl_ocsp(void);

#endif /* _OSSL_OCSP_H_ */
/* [<][>][^][v][top][bottom][index] [help] */


ext/openssl/ossl_pkcs12.c

root/ext/openssl/ossl_pkcs12.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. ossl_pkcs12_s_allocate
  2. ossl_pkcs12_s_create
  3. ossl_pkcs12_initialize
  4. ossl_pkcs12_to_der
  5. Init_ossl_pkcs12
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 * $Id: ossl_pkcs12.c,v 1.2 2003/12/15 00:30:12 usa Exp $
 */
#include "ossl.h"

#define WrapPKCS12(klass, obj, p12) do { \
    if(!p12) ossl_raise(rb_eRuntimeError, "PKCS12 wasn't initialized."); \
    obj = Data_Wrap_Struct(klass, 0, PKCS12_free, p12); \
} while (0)

#define GetPKCS12(obj, p12) do { \
    Data_Get_Struct(obj, PKCS12, p12); \
    if(!p12) ossl_raise(rb_eRuntimeError, "PKCS12 wasn't initialized."); \
} while (0)

#define SafeGetPKCS12(obj, p12) do { \
    OSSL_Check_Kind(obj, cPKCS12); \
    GetPKCS12(obj, p12); \
} while (0)

#define ossl_pkcs12_set_key(o,v)      rb_iv_set((o), "@key", (v))
#define ossl_pkcs12_set_cert(o,v)     rb_iv_set((o), "@certificate", (v))
#define ossl_pkcs12_set_ca_certs(o,v) rb_iv_set((o), "@ca_certs", (v))
#define ossl_pkcs12_get_key(o)        rb_iv_get((o), "@key")
#define ossl_pkcs12_get_cert(o)       rb_iv_get((o), "@certificate")
#define ossl_pkcs12_get_ca_certs(o)   rb_iv_get((o), "@ca_certs")

/*
 * Classes
 */
VALUE mPKCS12;
VALUE cPKCS12;
VALUE ePKCS12Error;

/*
 * Private
 */
static VALUE
ossl_pkcs12_s_allocate(VALUE klass)
{
    PKCS12 *p12;
    VALUE obj;

    if(!(p12 = PKCS12_new())) ossl_raise(ePKCS12Error, NULL);
    WrapPKCS12(klass, obj, p12);

    return obj;
}

static VALUE
ossl_pkcs12_s_create(int argc, VALUE *argv, VALUE self)
{
    VALUE pass, name, pkey, cert, ca;
    VALUE obj;
    char *passphrase, *friendlyname;
    EVP_PKEY *key;
    X509 *x509;
    STACK_OF(X509) *x509s;
    PKCS12 *p12;

    rb_scan_args(argc, argv, "41", &pass, &name, &pkey, &cert, &ca);
    passphrase = NIL_P(pass) ? NULL : StringValuePtr(pass);
    friendlyname = NIL_P(name) ? NULL : StringValuePtr(name);
    key = GetPKeyPtr(pkey);
    x509 = GetX509CertPtr(cert);
    x509s = NIL_P(ca) ? NULL : ossl_x509_ary2sk(ca);
    p12 = PKCS12_create(passphrase, friendlyname, key, x509, x509s,
                        0, 0, 0, 0, 0);
    sk_X509_pop_free(x509s, X509_free);
    if(!p12) ossl_raise(ePKCS12Error, NULL);
    WrapPKCS12(cPKCS12, obj, p12);

    return obj;
}

static VALUE
ossl_pkcs12_initialize(int argc, VALUE *argv, VALUE self)
{
    BIO *in;
    VALUE arg, pass, pkey, cert, ca;
    char *passphrase;
    EVP_PKEY *key;
    X509 *x509;
    STACK_OF(X509) *x509s = NULL;
    int st = 0;

    if(rb_scan_args(argc, argv, "02", &arg, &pass) == 0) return self;
    passphrase = NIL_P(pass) ? NULL : StringValuePtr(pass);
    in = ossl_obj2bio(arg);
    d2i_PKCS12_bio(in, (PKCS12 **)&DATA_PTR(self));
    BIO_free(in);

    pkey = cert = ca = Qnil;
    if(!PKCS12_parse((PKCS12*)DATA_PTR(self), passphrase, &key, &x509, &x509s))
        ossl_raise(ePKCS12Error, NULL);
    pkey = rb_protect((VALUE(*)_((VALUE)))ossl_pkey_new, (VALUE)key,
                      &st); /* NO DUP */
    if(st) goto err;
    cert = rb_protect((VALUE(*)_((VALUE)))ossl_x509_new, (VALUE)x509, &st);
    if(st) goto err;
    if(x509s){
        ca =
            rb_protect((VALUE(*)_((VALUE)))ossl_x509_sk2ary, (VALUE)x509s, &st);
        if(st) goto err;
    }

  err:
    X509_free(x509);
    sk_X509_pop_free(x509s, X509_free);
    ossl_pkcs12_set_key(self, pkey);
    ossl_pkcs12_set_cert(self, cert);
    ossl_pkcs12_set_ca_certs(self, ca);
    if(st) rb_jump_tag(st);

    return self;
}

static VALUE
ossl_pkcs12_to_der(VALUE self)
{
    PKCS12 *p12;
    VALUE str;
    long len;
    unsigned char *p;

    GetPKCS12(self, p12);
    if((len = i2d_PKCS12(p12, NULL)) <= 0)
        ossl_raise(ePKCS12Error, NULL);
    str = rb_str_new(0, len);
    p = RSTRING(str)->ptr;
    if(i2d_PKCS12(p12, &p) <= 0)
        ossl_raise(ePKCS12Error, NULL);
    ossl_str_adjust(str, p);

    return str;
}

void
Init_ossl_pkcs12()
{
    mPKCS12 = rb_define_module_under(mOSSL, "PKCS12");
    cPKCS12 = rb_define_class_under(mPKCS12, "PKCS12", rb_cObject);
    ePKCS12Error = rb_define_class_under(mPKCS12, "PKCS12Error", eOSSLError);
    rb_define_module_function(mPKCS12, "create", ossl_pkcs12_s_create, -1);

    rb_define_alloc_func(cPKCS12, ossl_pkcs12_s_allocate);
    rb_attr(cPKCS12, rb_intern("key"), 1, 0, Qfalse);
    rb_attr(cPKCS12, rb_intern("certificate"), 1, 0, Qfalse);
    rb_attr(cPKCS12, rb_intern("ca_certs"), 1, 0, Qfalse);
    rb_define_method(cPKCS12, "initialize", ossl_pkcs12_initialize, -1);
    rb_define_method(cPKCS12, "to_der", ossl_pkcs12_to_der, 0);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl_pkcs12.h

root/ext/openssl/ossl_pkcs12.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 * $Id: ossl_pkcs12.h,v 1.2 2005/06/19 16:28:19 gotoyuzo Exp $
 */
#if !defined(_OSSL_PKCS12_H_)
#define _OSSL_PKCS12_H_

extern VALUE mPKCS12;
extern VALUE cPKCS12;
extern VALUE ePKCS12Error;

void Init_ossl_pkcs12(void);

#endif /* _OSSL_PKCS12_H_ */
/* [<][>][^][v][top][bottom][index] [help] */


ext/openssl/ossl_pkcs7.c

root/ext/openssl/ossl_pkcs7.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. ossl_pkcs7si_new
  2. DupPKCS7SignerPtr
  3. ossl_pkcs7ri_new
  4. DupPKCS7RecipientPtr
  5. ossl_pkcs7_s_read_smime
  6. ossl_pkcs7_s_write_smime
  7. ossl_pkcs7_s_sign
  8. ossl_pkcs7_s_encrypt
  9. ossl_pkcs7_alloc
  10. ossl_pkcs7_initialize
  11. ossl_pkcs7_copy
  12. ossl_pkcs7_sym2typeid
  13. ossl_pkcs7_set_type
  14. ossl_pkcs7_get_type
  15. ossl_pkcs7_set_detached
  16. ossl_pkcs7_get_detached
  17. ossl_pkcs7_detached_p
  18. ossl_pkcs7_set_cipher
  19. ossl_pkcs7_add_signer
  20. ossl_pkcs7_get_signer
  21. ossl_pkcs7_add_recipient
  22. ossl_pkcs7_get_recipient
  23. ossl_pkcs7_add_certificate
  24. pkcs7_get_certs_or_crls
  25. ossl_pkcs7_set_certs_i
  26. ossl_pkcs7_set_certificates
  27. ossl_pkcs7_get_certificates
  28. ossl_pkcs7_add_crl
  29. ossl_pkcs7_set_crls_i
  30. ossl_pkcs7_set_crls
  31. ossl_pkcs7_get_crls
  32. ossl_pkcs7_verify
  33. ossl_pkcs7_decrypt
  34. ossl_pkcs7_add_data
  35. ossl_pkcs7_to_der
  36. ossl_pkcs7_to_pem
  37. ossl_pkcs7si_alloc
  38. ossl_pkcs7si_initialize
  39. ossl_pkcs7si_get_issuer
  40. ossl_pkcs7si_get_serial
  41. ossl_pkcs7si_get_signed_time
  42. ossl_pkcs7ri_alloc
  43. ossl_pkcs7ri_initialize
  44. ossl_pkcs7ri_get_issuer
  45. ossl_pkcs7ri_get_serial
  46. ossl_pkcs7ri_get_enc_key
  47. Init_ossl_pkcs7
/*
 * $Id: ossl_pkcs7.c,v 1.8 2005/09/07 07:40:53 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#include "ossl.h"

#define WrapPKCS7(klass, obj, pkcs7) do { \
    if (!pkcs7) { \
        ossl_raise(rb_eRuntimeError, "PKCS7 wasn't initialized."); \
    } \
    obj = Data_Wrap_Struct(klass, 0, PKCS7_free, pkcs7); \
} while (0)
#define GetPKCS7(obj, pkcs7) do { \
    Data_Get_Struct(obj, PKCS7, pkcs7); \
    if (!pkcs7) { \
        ossl_raise(rb_eRuntimeError, "PKCS7 wasn't initialized."); \
    } \
} while (0)
#define SafeGetPKCS7(obj, pkcs7) do { \
    OSSL_Check_Kind(obj, cPKCS7); \
    GetPKCS7(obj, pkcs7); \
} while (0)

#define WrapPKCS7si(klass, obj, p7si) do { \
    if (!p7si) { \
        ossl_raise(rb_eRuntimeError, "PKCS7si wasn't initialized."); \
    } \
    obj = Data_Wrap_Struct(klass, 0, PKCS7_SIGNER_INFO_free, p7si); \
} while (0)
#define GetPKCS7si(obj, p7si) do { \
    Data_Get_Struct(obj, PKCS7_SIGNER_INFO, p7si); \
    if (!p7si) { \
        ossl_raise(rb_eRuntimeError, "PKCS7si wasn't initialized."); \
    } \
} while (0)
#define SafeGetPKCS7si(obj, p7si) do { \
    OSSL_Check_Kind(obj, cPKCS7Signer); \
    GetPKCS7si(obj, p7si); \
} while (0)

#define WrapPKCS7ri(klass, obj, p7ri) do { \
    if (!p7ri) { \
        ossl_raise(rb_eRuntimeError, "PKCS7ri wasn't initialized."); \
    } \
    obj = Data_Wrap_Struct(klass, 0, PKCS7_RECIP_INFO_free, p7ri); \
} while (0)
#define GetPKCS7ri(obj, p7ri) do { \
    Data_Get_Struct(obj, PKCS7_RECIP_INFO, p7ri); \
    if (!p7ri) { \
        ossl_raise(rb_eRuntimeError, "PKCS7ri wasn't initialized."); \
    } \
} while (0)
#define SafeGetPKCS7ri(obj, p7ri) do { \
    OSSL_Check_Kind(obj, cPKCS7Recipient); \
    GetPKCS7ri(obj, p7ri); \
} while (0)

#define numberof(ary) (sizeof(ary)/sizeof(ary[0]))

#define ossl_pkcs7_set_data(o,v)       rb_iv_set((o), "@data", (v))
#define ossl_pkcs7_get_data(o)         rb_iv_get((o), "@data")
#define ossl_pkcs7_set_err_string(o,v) rb_iv_set((o), "@error_string", (v))
#define ossl_pkcs7_get_err_string(o)   rb_iv_get((o), "@error_string")

/*
 * Classes
 */
VALUE mPKCS7;
VALUE cPKCS7;
VALUE cPKCS7Signer;
VALUE cPKCS7Recipient;
VALUE ePKCS7Error;

/*
 * Public
 * (MADE PRIVATE UNTIL SOMEBODY WILL NEED THEM)
 */
static VALUE
ossl_pkcs7si_new(PKCS7_SIGNER_INFO *p7si)
{
    PKCS7_SIGNER_INFO *pkcs7;
    VALUE obj;

    pkcs7 = p7si ? PKCS7_SIGNER_INFO_dup(p7si) : PKCS7_SIGNER_INFO_new();
    if (!pkcs7) ossl_raise(ePKCS7Error, NULL);
    WrapPKCS7si(cPKCS7Signer, obj, pkcs7);

    return obj;
}

static PKCS7_SIGNER_INFO *
DupPKCS7SignerPtr(VALUE obj)
{
    PKCS7_SIGNER_INFO *p7si, *pkcs7;

    SafeGetPKCS7si(obj, p7si);
    if (!(pkcs7 = PKCS7_SIGNER_INFO_dup(p7si))) {
        ossl_raise(ePKCS7Error, NULL);
    }

    return pkcs7;
}

static VALUE
ossl_pkcs7ri_new(PKCS7_RECIP_INFO *p7ri)
{
    PKCS7_RECIP_INFO *pkcs7;
    VALUE obj;

    pkcs7 = p7ri ? PKCS7_RECIP_INFO_dup(p7ri) : PKCS7_RECIP_INFO_new();
    if (!pkcs7) ossl_raise(ePKCS7Error, NULL);
    WrapPKCS7ri(cPKCS7Recipient, obj, pkcs7);

    return obj;
}

static PKCS7_RECIP_INFO *
DupPKCS7RecipientPtr(VALUE obj)
{
    PKCS7_RECIP_INFO *p7ri, *pkcs7;

    SafeGetPKCS7ri(obj, p7ri);
    if (!(pkcs7 = PKCS7_RECIP_INFO_dup(p7ri))) {
        ossl_raise(ePKCS7Error, NULL);
    }

    return pkcs7;
}

/*
 * Private
 */
static VALUE
ossl_pkcs7_s_read_smime(VALUE klass, VALUE arg)
{
    BIO *in, *out;
    PKCS7 *pkcs7;
    VALUE ret, data;

    in = ossl_obj2bio(arg);
    out = NULL;
    pkcs7 = SMIME_read_PKCS7(in, &out);
    BIO_free(in);
    if(!pkcs7) ossl_raise(ePKCS7Error, NULL);
    data = out ? ossl_membio2str(out) : Qnil;
    WrapPKCS7(cPKCS7, ret, pkcs7);
    ossl_pkcs7_set_data(ret, data);
    ossl_pkcs7_set_err_string(ret, Qnil);

    return ret;
}

static VALUE
ossl_pkcs7_s_write_smime(int argc, VALUE *argv, VALUE klass)
{
    VALUE pkcs7, data, flags;
    BIO *out, *in;
    PKCS7 *p7;
    VALUE str;
    int flg;

    rb_scan_args(argc, argv, "12", &pkcs7, &data, &flags);
    flg = NIL_P(flags) ? 0 : NUM2INT(flags);
    if(NIL_P(data)) data = ossl_pkcs7_get_data(pkcs7);
    SafeGetPKCS7(pkcs7, p7);
    if(!NIL_P(data) && PKCS7_is_detached(p7))
        flg |= PKCS7_DETACHED;
    in = NIL_P(data) ? NULL : ossl_obj2bio(data);
    if(!(out = BIO_new(BIO_s_mem()))){
        BIO_free(in);
        ossl_raise(ePKCS7Error, NULL);
    }
    if(!SMIME_write_PKCS7(out, p7, in, flg)){
        BIO_free(out);
        BIO_free(in);
        ossl_raise(ePKCS7Error, NULL);
    }
    BIO_free(in);
    str = ossl_membio2str(out);

    return str;
}

static VALUE
ossl_pkcs7_s_sign(int argc, VALUE *argv, VALUE klass)
{
    VALUE cert, key, data, certs, flags;
    X509 *x509;
    EVP_PKEY *pkey;
    BIO *in;
    STACK_OF(X509) *x509s;
    int flg, status = 0;
    PKCS7 *pkcs7;
    VALUE ret;

    rb_scan_args(argc, argv, "32", &cert, &key, &data, &certs, &flags);
    x509 = GetX509CertPtr(cert); /* NO NEED TO DUP */
    pkey = GetPrivPKeyPtr(key); /* NO NEED TO DUP */
    flg = NIL_P(flags) ? 0 : NUM2INT(flags);
    in = ossl_obj2bio(data);
    if(NIL_P(certs)) x509s = NULL;
    else{
        x509s = ossl_protect_x509_ary2sk(certs, &status);
        if(status){
            BIO_free(in);
            rb_jump_tag(status);
        }
    }
    if(!(pkcs7 = PKCS7_sign(x509, pkey, x509s, in, flg))){
        BIO_free(in);
        sk_X509_pop_free(x509s, X509_free);
        ossl_raise(ePKCS7Error, NULL);
    }
    WrapPKCS7(cPKCS7, ret, pkcs7);
    ossl_pkcs7_set_data(ret, data);
    ossl_pkcs7_set_err_string(ret, Qnil);
    BIO_free(in);
    sk_X509_pop_free(x509s, X509_free);

    return ret;
}

static VALUE
ossl_pkcs7_s_encrypt(int argc, VALUE *argv, VALUE klass)
{
    VALUE certs, data, cipher, flags;
    STACK_OF(X509) *x509s;
    BIO *in;
    const EVP_CIPHER *ciph;
    int flg, status = 0;
    VALUE ret;
    PKCS7 *p7;

    rb_scan_args(argc, argv, "22", &certs, &data, &cipher, &flags);
    if(NIL_P(cipher)){
#if !defined(OPENSSL_NO_RC2)
        ciph = EVP_rc2_40_cbc();
#elif !defined(OPENSSL_NO_DES)
        ciph = EVP_des_ede3_cbc();
#elif !defined(OPENSSL_NO_RC2)
        ciph = EVP_rc2_40_cbc();
#elif !defined(OPENSSL_NO_AES)
        ciph = EVP_EVP_aes_128_cbc();
#else
        ossl_raise(ePKCS7Error, "Must specify cipher");
#endif

    }
    else ciph = GetCipherPtr(cipher); /* NO NEED TO DUP */
    flg = NIL_P(flags) ? 0 : NUM2INT(flags);
    in = ossl_obj2bio(data);
    x509s = ossl_protect_x509_ary2sk(certs, &status);
    if(status){
        BIO_free(in);
        rb_jump_tag(status);
    }
    if(!(p7 = PKCS7_encrypt(x509s, in, (EVP_CIPHER*)ciph, flg))){
        BIO_free(in);
        sk_X509_pop_free(x509s, X509_free);
        ossl_raise(ePKCS7Error, NULL);
    }
    BIO_free(in);
    WrapPKCS7(cPKCS7, ret, p7);
    ossl_pkcs7_set_data(ret, data);
    sk_X509_pop_free(x509s, X509_free);

    return ret;
}

static VALUE
ossl_pkcs7_alloc(VALUE klass)
{
    PKCS7 *pkcs7;
    VALUE obj;

    if (!(pkcs7 = PKCS7_new())) {
        ossl_raise(ePKCS7Error, NULL);
    }
    WrapPKCS7(klass, obj, pkcs7);

    return obj;
}

static VALUE
ossl_pkcs7_initialize(int argc, VALUE *argv, VALUE self)
{
    PKCS7 *p7;
    BIO *in;
    VALUE arg;

    if(rb_scan_args(argc, argv, "01", &arg) == 0)
        return self;
    arg = ossl_to_der_if_possible(arg);
    in = ossl_obj2bio(arg);
    p7 = PEM_read_bio_PKCS7(in, (PKCS7 **)&DATA_PTR(self), NULL, NULL);
    if (!p7) {
        BIO_reset(in);
        p7 = d2i_PKCS7_bio(in, (PKCS7 **)&DATA_PTR(self));
    }
    BIO_free(in);
    ossl_pkcs7_set_data(self, Qnil);
    ossl_pkcs7_set_err_string(self, Qnil);

    return self;
}

static VALUE
ossl_pkcs7_copy(VALUE self, VALUE other)
{
    PKCS7 *a, *b, *pkcs7;

    rb_check_frozen(self);
    if (self == other) return self;

    GetPKCS7(self, a);
    SafeGetPKCS7(other, b);

    pkcs7 = PKCS7_dup(b);
    if (!pkcs7) {
        ossl_raise(ePKCS7Error, NULL);
    }
    DATA_PTR(self) = pkcs7;
    PKCS7_free(a);

    return self;
}

static int
ossl_pkcs7_sym2typeid(VALUE sym)
{
    int i, ret = Qnil;
    char *s;

    static struct {
        const char *name;
        int nid;
    } p7_type_tab[] = {
        { "signed",             NID_pkcs7_signed },
        { "data",               NID_pkcs7_data },
        { "signedAndEnveloped", NID_pkcs7_signedAndEnveloped },
        { "enveloped",          NID_pkcs7_enveloped },
        { "encrypted",          NID_pkcs7_encrypted },
        { "digest",             NID_pkcs7_digest },
        { NULL,                 0 },
    };

    if(TYPE(sym) == T_SYMBOL) s = rb_id2name(SYM2ID(sym));
    else s = StringValuePtr(sym);
    for(i = 0; i < numberof(p7_type_tab); i++){
        if(p7_type_tab[i].name == NULL)
            ossl_raise(ePKCS7Error, "unknown type \"%s\"", s);
        if(strcmp(p7_type_tab[i].name, s) == 0){
            ret = p7_type_tab[i].nid;
            break;
        }
    }

    return ret;
}

static VALUE
ossl_pkcs7_set_type(VALUE self, VALUE type)
{
    PKCS7 *p7;

    GetPKCS7(self, p7);
    if(!PKCS7_set_type(p7, ossl_pkcs7_sym2typeid(type)))
        ossl_raise(ePKCS7Error, NULL);

    return type;
}

static VALUE
ossl_pkcs7_get_type(VALUE self)
{
    PKCS7 *p7;

    GetPKCS7(self, p7);
    if(PKCS7_type_is_signed(p7))
        return ID2SYM(rb_intern("signed"));
    if(PKCS7_type_is_encrypted(p7))
        return ID2SYM(rb_intern("encrypted"));
    if(PKCS7_type_is_enveloped(p7))
        return ID2SYM(rb_intern("enveloped"));
    if(PKCS7_type_is_signedAndEnveloped(p7))
        return ID2SYM(rb_intern("signedAndEnveloped"));
    if(PKCS7_type_is_data(p7))
        return ID2SYM(rb_intern("data"));
    return Qnil;
}

static VALUE
ossl_pkcs7_set_detached(VALUE self, VALUE flag)
{
    PKCS7 *p7;

    GetPKCS7(self, p7);
    if(flag != Qtrue && flag != Qfalse)
        ossl_raise(ePKCS7Error, "must specify a boolean");
    if(!PKCS7_set_detached(p7, flag == Qtrue ? 1 : 0))
        ossl_raise(ePKCS7Error, NULL);

    return flag;
}

static VALUE
ossl_pkcs7_get_detached(VALUE self)
{
    PKCS7 *p7;
    GetPKCS7(self, p7);
    return PKCS7_get_detached(p7) ? Qtrue : Qfalse;
}

static VALUE
ossl_pkcs7_detached_p(VALUE self)
{
    PKCS7 *p7;
    GetPKCS7(self, p7);
    return PKCS7_is_detached(p7) ? Qtrue : Qfalse;
}

static VALUE
ossl_pkcs7_set_cipher(VALUE self, VALUE cipher)
{
    PKCS7 *pkcs7;

    GetPKCS7(self, pkcs7);
    if (!PKCS7_set_cipher(pkcs7, GetCipherPtr(cipher))) {
        ossl_raise(ePKCS7Error, NULL);
    }

    return cipher;
}

static VALUE
ossl_pkcs7_add_signer(VALUE self, VALUE signer)
{
    PKCS7 *pkcs7;
    PKCS7_SIGNER_INFO *p7si;

    p7si = DupPKCS7SignerPtr(signer); /* NEED TO DUP */
    GetPKCS7(self, pkcs7);
    if (!PKCS7_add_signer(pkcs7, p7si)) {
        PKCS7_SIGNER_INFO_free(p7si);
        ossl_raise(ePKCS7Error, "Could not add signer.");
    }
    if (PKCS7_type_is_signed(pkcs7)){
        PKCS7_add_signed_attribute(p7si, NID_pkcs9_contentType,
                                   V_ASN1_OBJECT, OBJ_nid2obj(NID_pkcs7_data));
    }

    return self;
}

static VALUE
ossl_pkcs7_get_signer(VALUE self)
{
    PKCS7 *pkcs7;
    STACK_OF(PKCS7_SIGNER_INFO) *sk;
    PKCS7_SIGNER_INFO *si;
    int num, i;
    VALUE ary;

    GetPKCS7(self, pkcs7);
    if (!(sk = PKCS7_get_signer_info(pkcs7))) {
        OSSL_Debug("OpenSSL::PKCS7#get_signer_info == NULL!");
        return rb_ary_new();
    }
    if ((num = sk_PKCS7_SIGNER_INFO_num(sk)) < 0) {
        ossl_raise(ePKCS7Error, "Negative number of signers!");
    }
    ary = rb_ary_new2(num);
    for (i=0; i<num; i++) {
        si = sk_PKCS7_SIGNER_INFO_value(sk, i);
        rb_ary_push(ary, ossl_pkcs7si_new(si));
    }

    return ary;
}

static VALUE
ossl_pkcs7_add_recipient(VALUE self, VALUE recip)
{
    PKCS7 *pkcs7;
    PKCS7_RECIP_INFO *ri;

    ri = DupPKCS7RecipientPtr(recip); /* NEED TO DUP */
    GetPKCS7(self, pkcs7);
    if (!PKCS7_add_recipient_info(pkcs7, ri)) {
        PKCS7_RECIP_INFO_free(ri);
        ossl_raise(ePKCS7Error, "Could not add recipient.");
    }

    return self;
}

static VALUE
ossl_pkcs7_get_recipient(VALUE self)
{
    PKCS7 *pkcs7;
    STACK_OF(PKCS7_RECIP_INFO) *sk;
    PKCS7_RECIP_INFO *si;
    int num, i;
    VALUE ary;

    GetPKCS7(self, pkcs7);
    if (PKCS7_type_is_enveloped(pkcs7))
        sk = pkcs7->d.enveloped->recipientinfo;
    else if (PKCS7_type_is_signedAndEnveloped(pkcs7))
        sk = pkcs7->d.signed_and_enveloped->recipientinfo;
    else sk = NULL;
    if (!sk) return rb_ary_new();
    if ((num = sk_PKCS7_RECIP_INFO_num(sk)) < 0) {
        ossl_raise(ePKCS7Error, "Negative number of recipient!");
    }
    ary = rb_ary_new2(num);
    for (i=0; i<num; i++) {
        si = sk_PKCS7_RECIP_INFO_value(sk, i);
        rb_ary_push(ary, ossl_pkcs7ri_new(si));
    }

    return ary;
}

static VALUE
ossl_pkcs7_add_certificate(VALUE self, VALUE cert)
{
    PKCS7 *pkcs7;
    X509 *x509;

    GetPKCS7(self, pkcs7);
    x509 = GetX509CertPtr(cert);  /* NO NEED TO DUP */
    if (!PKCS7_add_certificate(pkcs7, x509)){
        ossl_raise(ePKCS7Error, NULL);
    }

    return self;
}

static STACK *
pkcs7_get_certs_or_crls(VALUE self, int want_certs)
{
    PKCS7 *pkcs7;
    STACK_OF(X509) *certs;
    STACK_OF(X509_CRL) *crls;
    int i;

    GetPKCS7(self, pkcs7);
    i = OBJ_obj2nid(pkcs7->type);
    switch(i){
    case NID_pkcs7_signed:
        certs = pkcs7->d.sign->cert;
        crls = pkcs7->d.sign->crl;
        break;
    case NID_pkcs7_signedAndEnveloped:
        certs = pkcs7->d.signed_and_enveloped->cert;
        crls = pkcs7->d.signed_and_enveloped->crl;
        break;
    default:
        certs = crls = NULL;
    }

    return want_certs ? certs : crls;
}

static VALUE
ossl_pkcs7_set_certs_i(VALUE i, VALUE arg)
{
    return ossl_pkcs7_add_certificate(arg, i);
}

static VALUE
ossl_pkcs7_set_certificates(VALUE self, VALUE ary)
{
    STACK_OF(X509) *certs;
    X509 *cert;

    certs = pkcs7_get_certs_or_crls(self, 1);
    while((cert = sk_X509_pop(certs))) X509_free(cert);
    rb_iterate(rb_each, ary, ossl_pkcs7_set_certs_i, self);

    return ary;
}

static VALUE
ossl_pkcs7_get_certificates(VALUE self)
{
    return ossl_x509_sk2ary(pkcs7_get_certs_or_crls(self, 1));
}

static VALUE
ossl_pkcs7_add_crl(VALUE self, VALUE crl)
{
    PKCS7 *pkcs7;
    X509_CRL *x509crl;

    GetPKCS7(self, pkcs7); /* NO DUP needed! */
    x509crl = GetX509CRLPtr(crl);
    if (!PKCS7_add_crl(pkcs7, x509crl)) {
        ossl_raise(ePKCS7Error, NULL);
    }

    return self;
}

static VALUE
ossl_pkcs7_set_crls_i(VALUE i, VALUE arg)
{
    return ossl_pkcs7_add_crl(arg, i);
}

static VALUE
ossl_pkcs7_set_crls(VALUE self, VALUE ary)
{
    STACK_OF(X509_CRL) *crls;
    X509_CRL *crl;

    crls = pkcs7_get_certs_or_crls(self, 0);
    while((crl = sk_X509_CRL_pop(crls))) X509_CRL_free(crl);
    rb_iterate(rb_each, ary, ossl_pkcs7_set_crls_i, self);

    return ary;
}

static VALUE
ossl_pkcs7_get_crls(VALUE self)
{
    return ossl_x509crl_sk2ary(pkcs7_get_certs_or_crls(self, 0));
}

static VALUE
ossl_pkcs7_verify(int argc, VALUE *argv, VALUE self)
{
    VALUE certs, store, indata, flags;
    STACK_OF(X509) *x509s;
    X509_STORE *x509st;
    int flg, ok, status = 0;
    BIO *in, *out;
    PKCS7 *p7;
    VALUE data;
    const char *msg;

    rb_scan_args(argc, argv, "22", &certs, &store, &indata, &flags);
    flg = NIL_P(flags) ? 0 : NUM2INT(flags);
    if(NIL_P(indata)) indata = ossl_pkcs7_get_data(self);
    in = NIL_P(indata) ? NULL : ossl_obj2bio(indata);
    if(NIL_P(certs)) x509s = NULL;
    else{
        x509s = ossl_protect_x509_ary2sk(certs, &status);
        if(status){
            BIO_free(in);
            rb_jump_tag(status);
        }
    }
    x509st = GetX509StorePtr(store);
    GetPKCS7(self, p7);
    if(!(out = BIO_new(BIO_s_mem()))){
        BIO_free(in);
        sk_X509_pop_free(x509s, X509_free);
        ossl_raise(ePKCS7Error, NULL);
    }
    ok = PKCS7_verify(p7, x509s, x509st, in, out, flg);
    BIO_free(in);
    msg = ERR_reason_error_string(ERR_get_error());
    ossl_pkcs7_set_err_string(self, msg ? rb_str_new2(msg) : Qnil);
    data = ossl_membio2str(out);
    ossl_pkcs7_set_data(self, data);
    sk_X509_pop_free(x509s, X509_free);

    return (ok == 1) ? Qtrue : Qfalse;
}

static VALUE
ossl_pkcs7_decrypt(int argc, VALUE *argv, VALUE self)
{
    VALUE pkey, cert, flags;
    EVP_PKEY *key;
    X509 *x509;
    int flg;
    PKCS7 *p7;
    BIO *out;
    VALUE str;

    rb_scan_args(argc, argv, "21", &pkey, &cert, &flags);
    key = GetPrivPKeyPtr(pkey); /* NO NEED TO DUP */
    x509 = GetX509CertPtr(cert); /* NO NEED TO DUP */
    flg = NIL_P(flags) ? 0 : NUM2INT(flags);
    GetPKCS7(self, p7);
    if(!(out = BIO_new(BIO_s_mem())))
        ossl_raise(ePKCS7Error, NULL);
    if(!PKCS7_decrypt(p7, key, x509, out, flg)){
        BIO_free(out);
        ossl_raise(ePKCS7Error, NULL);
    }
    str = ossl_membio2str(out); /* out will be free */

    return str;
}

static VALUE
ossl_pkcs7_add_data(VALUE self, VALUE data)
{
    PKCS7 *pkcs7;
    BIO *out, *in;
    char buf[4096];
    int len;

    in = ossl_obj2bio(data);
    GetPKCS7(self, pkcs7);
    if(PKCS7_type_is_signed(pkcs7)){
        if(!PKCS7_content_new(pkcs7, NID_pkcs7_data))
            ossl_raise(ePKCS7Error, NULL);
    }
    if(!(out = PKCS7_dataInit(pkcs7, NULL))) goto err;
    for(;;){
        if((len = BIO_read(in, buf, sizeof(buf))) <= 0)
            break;
        if(BIO_write(out, buf, len) != len)
            goto err;
    }
    if(!PKCS7_dataFinal(pkcs7, out)) goto err;
    ossl_pkcs7_set_data(self, Qnil);

 err:
    BIO_free(out);
    BIO_free(in);
    if(ERR_peek_error()){
        ossl_raise(ePKCS7Error, NULL);
    }

    return data;
}

static VALUE
ossl_pkcs7_to_der(VALUE self)
{
    PKCS7 *pkcs7;
    VALUE str;
    long len;
    unsigned char *p;

    GetPKCS7(self, pkcs7);
    if((len = i2d_PKCS7(pkcs7, NULL)) <= 0)
        ossl_raise(ePKCS7Error, NULL);
    str = rb_str_new(0, len);
    p = RSTRING(str)->ptr;
    if(i2d_PKCS7(pkcs7, &p) <= 0)
        ossl_raise(ePKCS7Error, NULL);
    ossl_str_adjust(str, p);

    return str;
}

static VALUE
ossl_pkcs7_to_pem(VALUE self)
{
    PKCS7 *pkcs7;
    BIO *out;
    VALUE str;

    GetPKCS7(self, pkcs7);
    if (!(out = BIO_new(BIO_s_mem()))) {
        ossl_raise(ePKCS7Error, NULL);
    }
    if (!PEM_write_bio_PKCS7(out, pkcs7)) {
        BIO_free(out);
        ossl_raise(ePKCS7Error, NULL);
    }
    str = ossl_membio2str(out);

    return str;
}

/*
 * SIGNER INFO
 */
static VALUE
ossl_pkcs7si_alloc(VALUE klass)
{
    PKCS7_SIGNER_INFO *p7si;
    VALUE obj;

    if (!(p7si = PKCS7_SIGNER_INFO_new())) {
        ossl_raise(ePKCS7Error, NULL);
    }
    WrapPKCS7si(klass, obj, p7si);

    return obj;
}

static VALUE
ossl_pkcs7si_initialize(VALUE self, VALUE cert, VALUE key, VALUE digest)
{
    PKCS7_SIGNER_INFO *p7si;
    EVP_PKEY *pkey;
    X509 *x509;
    const EVP_MD *md;

    pkey = GetPrivPKeyPtr(key); /* NO NEED TO DUP */
    x509 = GetX509CertPtr(cert); /* NO NEED TO DUP */
    md = GetDigestPtr(digest);
    GetPKCS7si(self, p7si);
    if (!(PKCS7_SIGNER_INFO_set(p7si, x509, pkey, (EVP_MD*)md))) {
        ossl_raise(ePKCS7Error, NULL);
    }

    return self;
}

static VALUE
ossl_pkcs7si_get_issuer(VALUE self)
{
    PKCS7_SIGNER_INFO *p7si;

    GetPKCS7si(self, p7si);

    return ossl_x509name_new(p7si->issuer_and_serial->issuer);
}

static VALUE
ossl_pkcs7si_get_serial(VALUE self)
{
    PKCS7_SIGNER_INFO *p7si;

    GetPKCS7si(self, p7si);

    return asn1integer_to_num(p7si->issuer_and_serial->serial);
}

static VALUE
ossl_pkcs7si_get_signed_time(VALUE self)
{
    PKCS7_SIGNER_INFO *p7si;
    ASN1_TYPE *asn1obj;

    GetPKCS7si(self, p7si);

    if (!(asn1obj = PKCS7_get_signed_attribute(p7si, NID_pkcs9_signingTime))) {
        ossl_raise(ePKCS7Error, NULL);
    }
    if (asn1obj->type == V_ASN1_UTCTIME) {
        return asn1time_to_time(asn1obj->value.utctime);
    }
    /*
     * OR
     * ossl_raise(ePKCS7Error, "...");
     * ?
     */

    return Qnil;
}

/*
 * RECIPIENT INFO
 */
static VALUE
ossl_pkcs7ri_alloc(VALUE klass)
{
    PKCS7_RECIP_INFO *p7ri;
    VALUE obj;

    if (!(p7ri = PKCS7_RECIP_INFO_new())) {
        ossl_raise(ePKCS7Error, NULL);
    }
    WrapPKCS7ri(klass, obj, p7ri);

    return obj;
}

static VALUE
ossl_pkcs7ri_initialize(VALUE self, VALUE cert)
{
    PKCS7_RECIP_INFO *p7ri;
    X509 *x509;

    x509 = GetX509CertPtr(cert); /* NO NEED TO DUP */
    GetPKCS7ri(self, p7ri);
    if (!PKCS7_RECIP_INFO_set(p7ri, x509)) {
        ossl_raise(ePKCS7Error, NULL);
    }

    return self;
}

static VALUE
ossl_pkcs7ri_get_issuer(VALUE self)
{
    PKCS7_RECIP_INFO *p7ri;

    GetPKCS7ri(self, p7ri);

    return ossl_x509name_new(p7ri->issuer_and_serial->issuer);
}

static VALUE
ossl_pkcs7ri_get_serial(VALUE self)
{
    PKCS7_RECIP_INFO *p7ri;

    GetPKCS7ri(self, p7ri);

    return asn1integer_to_num(p7ri->issuer_and_serial->serial);
}

static VALUE
ossl_pkcs7ri_get_enc_key(VALUE self)
{
    PKCS7_RECIP_INFO *p7ri;

    GetPKCS7ri(self, p7ri);

    return asn1str_to_str(p7ri->enc_key);
}

/*
 * INIT
 */
void
Init_ossl_pkcs7()
{
    mPKCS7 = rb_define_module_under(mOSSL, "PKCS7");

    ePKCS7Error = rb_define_class_under(mPKCS7, "PKCS7Error", eOSSLError);

    cPKCS7 = rb_define_class_under(mPKCS7, "PKCS7", rb_cObject);
    rb_define_singleton_method(mPKCS7, "read_smime", ossl_pkcs7_s_read_smime, 1);
    rb_define_singleton_method(mPKCS7, "write_smime", ossl_pkcs7_s_write_smime, -1);
    rb_define_singleton_method(mPKCS7, "sign",  ossl_pkcs7_s_sign, -1);
    rb_define_singleton_method(mPKCS7, "encrypt", ossl_pkcs7_s_encrypt, -1);
    rb_attr(cPKCS7, rb_intern("data"), 1, 0, Qfalse);
    rb_attr(cPKCS7, rb_intern("error_string"), 1, 1, Qfalse);
    rb_define_alloc_func(cPKCS7, ossl_pkcs7_alloc);
    rb_define_copy_func(cPKCS7, ossl_pkcs7_copy);
    rb_define_method(cPKCS7, "initialize", ossl_pkcs7_initialize, -1);
    rb_define_method(cPKCS7, "type=", ossl_pkcs7_set_type, 1);
    rb_define_method(cPKCS7, "type", ossl_pkcs7_get_type, 0);
    rb_define_method(cPKCS7, "detached=", ossl_pkcs7_set_detached, 1);
    rb_define_method(cPKCS7, "detached", ossl_pkcs7_get_detached, 0);
    rb_define_method(cPKCS7, "detached?", ossl_pkcs7_detached_p, 0);
    rb_define_method(cPKCS7, "cipher=", ossl_pkcs7_set_cipher, 1);
    rb_define_method(cPKCS7, "add_signer", ossl_pkcs7_add_signer, 1);
    rb_define_method(cPKCS7, "signers", ossl_pkcs7_get_signer, 0);
    rb_define_method(cPKCS7, "add_recipient", ossl_pkcs7_add_recipient, 1);
    rb_define_method(cPKCS7, "recipients", ossl_pkcs7_get_recipient, 0);
    rb_define_method(cPKCS7, "add_certificate", ossl_pkcs7_add_certificate, 1);
    rb_define_method(cPKCS7, "certificates=", ossl_pkcs7_set_certificates, 1);
    rb_define_method(cPKCS7, "certificates", ossl_pkcs7_get_certificates, 0);
    rb_define_method(cPKCS7, "add_crl", ossl_pkcs7_add_crl, 1);
    rb_define_method(cPKCS7, "crls=", ossl_pkcs7_set_crls, 1);
    rb_define_method(cPKCS7, "crls", ossl_pkcs7_get_crls, 0);
    rb_define_method(cPKCS7, "add_data", ossl_pkcs7_add_data, 1);
    rb_define_alias(cPKCS7,  "data=", "add_data");
    rb_define_method(cPKCS7, "verify", ossl_pkcs7_verify, -1);
    rb_define_method(cPKCS7, "decrypt", ossl_pkcs7_decrypt, -1);
    rb_define_method(cPKCS7, "to_pem", ossl_pkcs7_to_pem, 0);
    rb_define_alias(cPKCS7,  "to_s", "to_pem");
    rb_define_method(cPKCS7, "to_der", ossl_pkcs7_to_der, 0);

    cPKCS7Signer = rb_define_class_under(mPKCS7, "SignerInfo", rb_cObject);
    rb_define_const(mPKCS7, "Signer", cPKCS7Signer);
    rb_define_alloc_func(cPKCS7Signer, ossl_pkcs7si_alloc);
    rb_define_method(cPKCS7Signer, "initialize", ossl_pkcs7si_initialize,3);
    rb_define_method(cPKCS7Signer, "issuer", ossl_pkcs7si_get_issuer, 0);
    rb_define_alias(cPKCS7Signer, "name", "issuer");
    rb_define_method(cPKCS7Signer, "serial", ossl_pkcs7si_get_serial,0);
    rb_define_method(cPKCS7Signer,"signed_time",ossl_pkcs7si_get_signed_time,0);

    cPKCS7Recipient = rb_define_class_under(mPKCS7,"RecipientInfo",rb_cObject);
    rb_define_alloc_func(cPKCS7Recipient, ossl_pkcs7ri_alloc);
    rb_define_method(cPKCS7Recipient, "initialize", ossl_pkcs7ri_initialize,1);
    rb_define_method(cPKCS7Recipient, "issuer", ossl_pkcs7ri_get_issuer,0);
    rb_define_method(cPKCS7Recipient, "serial", ossl_pkcs7ri_get_serial,0);
    rb_define_method(cPKCS7Recipient, "enc_key", ossl_pkcs7ri_get_enc_key,0);

#define DefPKCS7Const(x) rb_define_const(mPKCS7, #x, INT2NUM(PKCS7_##x))

    DefPKCS7Const(TEXT);
    DefPKCS7Const(NOCERTS);
    DefPKCS7Const(NOSIGS);
    DefPKCS7Const(NOCHAIN);
    DefPKCS7Const(NOINTERN);
    DefPKCS7Const(NOVERIFY);
    DefPKCS7Const(DETACHED);
    DefPKCS7Const(BINARY);
    DefPKCS7Const(NOATTR);
    DefPKCS7Const(NOSMIMECAP);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl_pkcs7.h

root/ext/openssl/ossl_pkcs7.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/*
 * $Id: ossl_pkcs7.h,v 1.2 2005/09/07 07:40:53 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#if !defined(_OSSL_PKCS7_H_)
#define _OSSL_PKCS7_H_

extern VALUE mPKCS7;
extern VALUE cPKCS7;
extern VALUE cPKCS7Signer;
extern VALUE cPKCS7Recipient;
extern VALUE ePKCS7Error;

void Init_ossl_pkcs7(void);

#endif /* _OSSL_PKCS7_H_ */
/* [<][>][^][v][top][bottom][index] [help] */


ext/openssl/ossl_pkey.c

root/ext/openssl/ossl_pkey.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. ossl_generate_cb
  2. ossl_pkey_new
  3. ossl_pkey_new_from_file
  4. GetPKeyPtr
  5. GetPrivPKeyPtr
  6. DupPKeyPtr
  7. DupPrivPKeyPtr
  8. ossl_pkey_alloc
  9. ossl_pkey_initialize
  10. ossl_pkey_sign
  11. ossl_pkey_verify
  12. Init_ossl_pkey
/*
 * $Id: ossl_pkey.c,v 1.6 2005/03/09 10:45:41 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#include "ossl.h"

/*
 * Classes
 */
VALUE mPKey;
VALUE cPKey;
VALUE ePKeyError;
ID id_private_q;

/*
 * callback for generating keys
 */
void
ossl_generate_cb(int p, int n, void *arg)
{
    VALUE ary;

    ary = rb_ary_new2(2);
    rb_ary_store(ary, 0, INT2NUM(p));
    rb_ary_store(ary, 1, INT2NUM(n));

    rb_yield(ary);
}

/*
 * Public
 */
VALUE
ossl_pkey_new(EVP_PKEY *pkey)
{
    if (!pkey) {
        ossl_raise(ePKeyError, "Cannot make new key from NULL.");
    }
    switch (EVP_PKEY_type(pkey->type)) {
#if !defined(OPENSSL_NO_RSA)
    case EVP_PKEY_RSA:
        return ossl_rsa_new(pkey);
#endif
#if !defined(OPENSSL_NO_DSA)
    case EVP_PKEY_DSA:
        return ossl_dsa_new(pkey);
#endif
#if !defined(OPENSSL_NO_DH)
    case EVP_PKEY_DH:
        return ossl_dh_new(pkey);
#endif
    default:
        ossl_raise(ePKeyError, "unsupported key type");
    }
    return Qnil; /* not reached */
}

VALUE
ossl_pkey_new_from_file(VALUE filename)
{
    FILE *fp;
    EVP_PKEY *pkey;

    SafeStringValue(filename);
    if (!(fp = fopen(RSTRING(filename)->ptr, "r"))) {
        ossl_raise(ePKeyError, "%s", strerror(errno));
    }

    pkey = PEM_read_PrivateKey(fp, NULL, ossl_pem_passwd_cb, NULL);
    fclose(fp);
    if (!pkey) {
        ossl_raise(ePKeyError, NULL);
    }

    return ossl_pkey_new(pkey);
}

EVP_PKEY *
GetPKeyPtr(VALUE obj)
{
    EVP_PKEY *pkey;

    SafeGetPKey(obj, pkey);

    return pkey;
}

EVP_PKEY *
GetPrivPKeyPtr(VALUE obj)
{
    EVP_PKEY *pkey;

    if (rb_funcall(obj, id_private_q, 0, NULL) != Qtrue) {
        ossl_raise(rb_eArgError, "Private key is needed.");
    }
    SafeGetPKey(obj, pkey);

    return pkey;
}

EVP_PKEY *
DupPKeyPtr(VALUE obj)
{
    EVP_PKEY *pkey;

    SafeGetPKey(obj, pkey);
    CRYPTO_add(&pkey->references, 1, CRYPTO_LOCK_EVP_PKEY);

    return pkey;
}

EVP_PKEY *
DupPrivPKeyPtr(VALUE obj)
{
    EVP_PKEY *pkey;

    if (rb_funcall(obj, id_private_q, 0, NULL) != Qtrue) {
        ossl_raise(rb_eArgError, "Private key is needed.");
    }
    SafeGetPKey(obj, pkey);
    CRYPTO_add(&pkey->references, 1, CRYPTO_LOCK_EVP_PKEY);

    return pkey;
}

/*
 * Private
 */
static VALUE
ossl_pkey_alloc(VALUE klass)
{
    EVP_PKEY *pkey;
    VALUE obj;

    if (!(pkey = EVP_PKEY_new())) {
        ossl_raise(ePKeyError, NULL);
    }
    WrapPKey(klass, obj, pkey);

    return obj;
}

static VALUE
ossl_pkey_initialize(VALUE self)
{
    if (rb_obj_is_instance_of(self, cPKey)) {
        ossl_raise(rb_eNotImpError, "OpenSSL::PKey::PKey is an abstract class.");
    }
    return self;
}

static VALUE
ossl_pkey_sign(VALUE self, VALUE digest, VALUE data)
{
    EVP_PKEY *pkey;
    EVP_MD_CTX ctx;
    int buf_len;
    VALUE str;

    if (rb_funcall(self, id_private_q, 0, NULL) != Qtrue) {
        ossl_raise(rb_eArgError, "Private key is needed.");
    }
    GetPKey(self, pkey);
    EVP_SignInit(&ctx, GetDigestPtr(digest));
    StringValue(data);
    EVP_SignUpdate(&ctx, RSTRING(data)->ptr, RSTRING(data)->len);
    str = rb_str_new(0, EVP_PKEY_size(pkey)+16);
    if (!EVP_SignFinal(&ctx, RSTRING(str)->ptr, &buf_len, pkey))
        ossl_raise(ePKeyError, NULL);
    assert(buf_len <= RSTRING(str)->len);
    RSTRING(str)->len = buf_len;
    RSTRING(str)->ptr[buf_len] = 0;

    return str;
}

static VALUE
ossl_pkey_verify(VALUE self, VALUE digest, VALUE sig, VALUE data)
{
    EVP_PKEY *pkey;
    EVP_MD_CTX ctx;

    GetPKey(self, pkey);
    EVP_VerifyInit(&ctx, GetDigestPtr(digest));
    StringValue(sig);
    StringValue(data);
    EVP_VerifyUpdate(&ctx, RSTRING(data)->ptr, RSTRING(data)->len);
    switch (EVP_VerifyFinal(&ctx, RSTRING(sig)->ptr, RSTRING(sig)->len, pkey)) {
    case 0:
        return Qfalse;
    case 1:
        return Qtrue;
    default:
        ossl_raise(ePKeyError, NULL);
    }
    return Qnil; /* dummy */
}

/*
 * INIT
 */
void
Init_ossl_pkey()
{
    mPKey = rb_define_module_under(mOSSL, "PKey");

    ePKeyError = rb_define_class_under(mPKey, "PKeyError", eOSSLError);

    cPKey = rb_define_class_under(mPKey, "PKey", rb_cObject);

    rb_define_alloc_func(cPKey, ossl_pkey_alloc);
    rb_define_method(cPKey, "initialize", ossl_pkey_initialize, 0);

    rb_define_method(cPKey, "sign", ossl_pkey_sign, 2);
    rb_define_method(cPKey, "verify", ossl_pkey_verify, 3);

    id_private_q = rb_intern("private?");

    /*
     * INIT rsa, dsa
     */
    Init_ossl_rsa();
    Init_ossl_dsa();
    Init_ossl_dh();
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl_pkey.h

root/ext/openssl/ossl_pkey.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/*
 * $Id: ossl_pkey.h,v 1.4 2005/09/18 22:55:41 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001 Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#if !defined(_OSSL_PKEY_H_)
#define _OSSL_PKEY_H_

extern VALUE mPKey;
extern VALUE cPKey;
extern VALUE ePKeyError;
extern ID id_private_q;

#define OSSL_PKEY_SET_PRIVATE(obj) rb_iv_set((obj), "private", Qtrue)
#define OSSL_PKEY_SET_PUBLIC(obj)  rb_iv_set((obj), "private", Qfalse)
#define OSSL_PKEY_IS_PRIVATE(obj)  (rb_iv_get((obj), "private") == Qtrue)

#define WrapPKey(klass, obj, pkey) do { \
    if (!pkey) { \
        rb_raise(rb_eRuntimeError, "PKEY wasn't initialized!"); \
    } \
    obj = Data_Wrap_Struct(klass, 0, EVP_PKEY_free, pkey); \
    OSSL_PKEY_SET_PUBLIC(obj); \
} while (0)
#define GetPKey(obj, pkey) do {\
    Data_Get_Struct(obj, EVP_PKEY, pkey);\
    if (!pkey) { \
        rb_raise(rb_eRuntimeError, "PKEY wasn't initialized!");\
    } \
} while (0)
#define SafeGetPKey(obj, pkey) do { \
    OSSL_Check_Kind(obj, cPKey); \
    GetPKey(obj, pkey); \
} while (0)

void ossl_generate_cb(int, int, void *);

VALUE ossl_pkey_new(EVP_PKEY *);
VALUE ossl_pkey_new_from_file(VALUE);
EVP_PKEY *GetPKeyPtr(VALUE);
EVP_PKEY *DupPKeyPtr(VALUE);
EVP_PKEY *GetPrivPKeyPtr(VALUE);
EVP_PKEY *DupPrivPKeyPtr(VALUE);
void Init_ossl_pkey(void);

/*
 * RSA
 */
extern VALUE cRSA;
extern VALUE eRSAError;

VALUE ossl_rsa_new(EVP_PKEY *);
void Init_ossl_rsa(void);

/*
 * DSA
 */
extern VALUE cDSA;
extern VALUE eDSAError;

VALUE ossl_dsa_new(EVP_PKEY *);
void Init_ossl_dsa(void);

/*
 * DH
 */
extern VALUE cDH;
extern VALUE eDHError;
extern DH *OSSL_DEFAULT_DH_512;
extern DH *OSSL_DEFAULT_DH_1024;

VALUE ossl_dh_new(EVP_PKEY *);
void Init_ossl_dh(void);

#define OSSL_PKEY_BN(keytype, name)                                     \
static VALUE ossl_##keytype##_get_##name(VALUE self)                    \
{                                                                       \
        EVP_PKEY *pkey;                                                 \
        BIGNUM *bn;                                                     \
                                                                        \
        GetPKey(self, pkey);                                            \
        bn = pkey->pkey.keytype->name;                                  \
        if (bn == NULL)                                                 \
                return Qnil;                                            \
        return ossl_bn_new(bn);                                         \
}                                                                       \
static VALUE ossl_##keytype##_set_##name(VALUE self, VALUE bignum)      \
{                                                                       \
        EVP_PKEY *pkey;                                                 \
        BIGNUM *bn;                                                     \
                                                                        \
        GetPKey(self, pkey);                                            \
        if (NIL_P(bignum)) {                                            \
                BN_clear_free(pkey->pkey.keytype->name);                \
                pkey->pkey.keytype->name = NULL;                        \
                return Qnil;                                            \
        }                                                               \
                                                                        \
        bn = GetBNPtr(bignum);                                          \
        if (pkey->pkey.keytype->name == NULL)                           \
                pkey->pkey.keytype->name = BN_new();                    \
        if (pkey->pkey.keytype->name == NULL)                           \
                ossl_raise(eBNError, NULL);                             \
        if (BN_copy(pkey->pkey.keytype->name, bn) == NULL)              \
                ossl_raise(eBNError, NULL);                             \
        return bignum;                                                  \
}

#define DEF_OSSL_PKEY_BN(class, keytype, name)                          \
do {                                                                    \
        rb_define_method(class, #name, ossl_##keytype##_get_##name, 0); \
        rb_define_method(class, #name "=", ossl_##keytype##_set_##name, 1);\
} while (0)

#endif /* _OSSL_PKEY_H_ */
/* [<][>][^][v][top][bottom][index] [help] */


ext/openssl/ossl_pkey_dh.c

root/ext/openssl/ossl_pkey_dh.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. dh_instance
  2. ossl_dh_new
  3. dh_generate
  4. ossl_dh_s_generate
  5. ossl_dh_initialize
  6. ossl_dh_is_public
  7. ossl_dh_is_private
  8. ossl_dh_export
  9. ossl_dh_to_der
  10. ossl_dh_get_params
  11. ossl_dh_to_text
  12. ossl_dh_to_public_key
  13. ossl_dh_check_params
  14. ossl_dh_generate_key
  15. ossl_dh_compute_key
  16. ossl_create_dh
  17. Init_ossl_dh
  18. Init_ossl_dh
/*
 * $Id: ossl_pkey_dh.c,v 1.8 2005/03/12 17:15:29 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#if !defined(OPENSSL_NO_DH)

#include "ossl.h"

#define GetPKeyDH(obj, pkey) do { \
    GetPKey(obj, pkey); \
    if (EVP_PKEY_type(pkey->type) != EVP_PKEY_DH) { /* PARANOIA? */ \
        ossl_raise(rb_eRuntimeError, "THIS IS NOT A DH!") ; \
    } \
} while (0)

#define DH_HAS_PRIVATE(dh) ((dh)->priv_key)

#ifdef OSSL_ENGINE_ENABLED
#  define DH_PRIVATE(dh) (DH_HAS_PRIVATE(dh) || (dh)->engine)
#else
#  define DH_PRIVATE(dh) DH_HAS_PRIVATE(dh)
#endif

/*
 * Classes
 */
VALUE cDH;
VALUE eDHError;

/*
 * Public
 */
static VALUE
dh_instance(VALUE klass, DH *dh)
{
    EVP_PKEY *pkey;
    VALUE obj;

    if (!dh) {
        return Qfalse;
    }
    if (!(pkey = EVP_PKEY_new())) {
        return Qfalse;
    }
    if (!EVP_PKEY_assign_DH(pkey, dh)) {
        EVP_PKEY_free(pkey);
        return Qfalse;
    }
    WrapPKey(klass, obj, pkey);

    return obj;
}

VALUE
ossl_dh_new(EVP_PKEY *pkey)
{
    VALUE obj;

    if (!pkey) {
        obj = dh_instance(cDH, DH_new());
    } else {
        if (EVP_PKEY_type(pkey->type) != EVP_PKEY_DH) {
            ossl_raise(rb_eTypeError, "Not a DH key!");
        }
        WrapPKey(cDH, obj, pkey);
    }
    if (obj == Qfalse) {
        ossl_raise(eDHError, NULL);
    }

    return obj;
}

/*
 * Private
 */
static DH *
dh_generate(int size, int gen)
{
    DH *dh;

    dh = DH_generate_parameters(size, gen,
            rb_block_given_p() ? ossl_generate_cb : NULL,
            NULL);
    if (!dh) return 0;

    if (!DH_generate_key(dh)) {
        DH_free(dh);
        return 0;
    }

    return dh;
}

static VALUE
ossl_dh_s_generate(int argc, VALUE *argv, VALUE klass)
{
    DH *dh ;
    int g = 2;
    VALUE size, gen, obj;

    if (rb_scan_args(argc, argv, "11", &size, &gen) == 2) {
        g = FIX2INT(gen);
    }
    dh = dh_generate(FIX2INT(size), g);
    obj = dh_instance(klass, dh);
    if (obj == Qfalse) {
        DH_free(dh);
        ossl_raise(eDHError, NULL);
    }

    return obj;
}

static VALUE
ossl_dh_initialize(int argc, VALUE *argv, VALUE self)
{
    EVP_PKEY *pkey;
    DH *dh;
    int g = 2;
    BIO *in;
    VALUE arg, gen;

    GetPKey(self, pkey);
    if(rb_scan_args(argc, argv, "02", &arg, &gen) == 0) {
      dh = DH_new();
    }
    else if (FIXNUM_P(arg)) {
        if (!NIL_P(gen)) {
            g = FIX2INT(gen);
        }
        if (!(dh = dh_generate(FIX2INT(arg), g))) {
            ossl_raise(eDHError, NULL);
        }
    }
    else {
        arg = ossl_to_der_if_possible(arg);
        in = ossl_obj2bio(arg);
        dh = PEM_read_bio_DHparams(in, NULL, NULL, NULL);
        if (!dh){
            BIO_reset(in);
            dh = d2i_DHparams_bio(in, NULL);
        }
        BIO_free(in);
        if (!dh) ossl_raise(eDHError, NULL);
    }
    if (!EVP_PKEY_assign_DH(pkey, dh)) {
        DH_free(dh);
        ossl_raise(eDHError, NULL);
    }
    return self;
}

static VALUE
ossl_dh_is_public(VALUE self)
{
    EVP_PKEY *pkey;

    GetPKeyDH(self, pkey);
    /*
     * Do we need to check dhp->dh->public_pkey?
     * return Qtrue;
     */
    return (pkey->pkey.dh->pub_key) ? Qtrue : Qfalse;
}

static VALUE
ossl_dh_is_private(VALUE self)
{
    EVP_PKEY *pkey;

    GetPKeyDH(self, pkey);

    return (DH_PRIVATE(pkey->pkey.dh)) ? Qtrue : Qfalse;
}

static VALUE
ossl_dh_export(VALUE self)
{
    EVP_PKEY *pkey;
    BIO *out;
    VALUE str;

    GetPKeyDH(self, pkey);
    if (!(out = BIO_new(BIO_s_mem()))) {
        ossl_raise(eDHError, NULL);
    }
    if (!PEM_write_bio_DHparams(out, pkey->pkey.dh)) {
        BIO_free(out);
        ossl_raise(eDHError, NULL);
    }
    str = ossl_membio2str(out);

    return str;
}

static VALUE
ossl_dh_to_der(VALUE self)
{
    EVP_PKEY *pkey;
    unsigned char *p;
    long len;
    VALUE str;

    GetPKeyDH(self, pkey);
    if((len = i2d_DHparams(pkey->pkey.dh, NULL)) <= 0)
        ossl_raise(eDHError, NULL);
    str = rb_str_new(0, len);
    p = RSTRING(str)->ptr;
    if(i2d_DHparams(pkey->pkey.dh, &p) < 0)
        ossl_raise(eDHError, NULL);
    ossl_str_adjust(str, p);

    return str;
}

/*
 * Stores all parameters of key to the hash
 * INSECURE: PRIVATE INFORMATIONS CAN LEAK OUT!!!
 * Don't use :-)) (I's up to you)
 */
static VALUE
ossl_dh_get_params(VALUE self)
{
    EVP_PKEY *pkey;
    VALUE hash;

    GetPKeyDH(self, pkey);

    hash = rb_hash_new();

    rb_hash_aset(hash, rb_str_new2("p"), ossl_bn_new(pkey->pkey.dh->p));
    rb_hash_aset(hash, rb_str_new2("g"), ossl_bn_new(pkey->pkey.dh->g));
    rb_hash_aset(hash, rb_str_new2("pub_key"), ossl_bn_new(pkey->pkey.dh->pub_key));
    rb_hash_aset(hash, rb_str_new2("priv_key"), ossl_bn_new(pkey->pkey.dh->priv_key));

    return hash;
}

/*
 * Prints all parameters of key to buffer
 * INSECURE: PRIVATE INFORMATIONS CAN LEAK OUT!!!
 * Don't use :-)) (I's up to you)
 */
static VALUE
ossl_dh_to_text(VALUE self)
{
    EVP_PKEY *pkey;
    BIO *out;
    VALUE str;

    GetPKeyDH(self, pkey);
    if (!(out = BIO_new(BIO_s_mem()))) {
        ossl_raise(eDHError, NULL);
    }
    if (!DHparams_print(out, pkey->pkey.dh)) {
        BIO_free(out);
        ossl_raise(eDHError, NULL);
    }
    str = ossl_membio2str(out);

    return str;
}

/*
 * Makes new instance DH PUBLIC_KEY from PRIVATE_KEY
 */
static VALUE
ossl_dh_to_public_key(VALUE self)
{
    EVP_PKEY *pkey;
    DH *dh;
    VALUE obj;

    GetPKeyDH(self, pkey);
    dh = DHparams_dup(pkey->pkey.dh); /* err check perfomed by dh_instance */
    obj = dh_instance(CLASS_OF(self), dh);
    if (obj == Qfalse) {
        DH_free(dh);
        ossl_raise(eDHError, NULL);
    }

    return obj;
}

static VALUE
ossl_dh_check_params(VALUE self)
{
    DH *dh;
    EVP_PKEY *pkey;
    int codes;

    GetPKeyDH(self, pkey);
    dh = pkey->pkey.dh;

    if (!DH_check(dh, &codes)) {
        return Qfalse;
    }

    return codes == 0 ? Qtrue : Qfalse;
}

static VALUE
ossl_dh_generate_key(VALUE self)
{
    DH *dh;
    EVP_PKEY *pkey;

    GetPKeyDH(self, pkey);
    dh = pkey->pkey.dh;

    if (!DH_generate_key(dh))
        ossl_raise(eDHError, "Failed to generate key");
    return self;
}

static VALUE
ossl_dh_compute_key(VALUE self, VALUE pub)
{
    DH *dh;
    EVP_PKEY *pkey;
    BIGNUM *pub_key;
    VALUE str;
    int len;

    GetPKeyDH(self, pkey);
    dh = pkey->pkey.dh;
    pub_key = GetBNPtr(pub);
    len = DH_size(dh);
    str = rb_str_new(0, len);
    if ((len = DH_compute_key(RSTRING(str)->ptr, pub_key, dh)) < 0) {
        ossl_raise(eDHError, NULL);
    }
    RSTRING(str)->len = len;
    RSTRING(str)->ptr[len] = 0;

    return str;
}

OSSL_PKEY_BN(dh, p);
OSSL_PKEY_BN(dh, g);
OSSL_PKEY_BN(dh, pub_key);
OSSL_PKEY_BN(dh, priv_key);

/*
 * -----BEGIN DH PARAMETERS-----
 * MEYCQQD0zXHljRg/mJ9PYLACLv58Cd8VxBxxY7oEuCeURMiTqEhMym16rhhKgZG2
 * zk2O9uUIBIxSj+NKMURHGaFKyIvLAgEC
 * -----END DH PARAMETERS-----
 */
static unsigned char DEFAULT_DH_512_PRIM[] = {
    0xf4, 0xcd, 0x71, 0xe5, 0x8d, 0x18, 0x3f, 0x98,
    0x9f, 0x4f, 0x60, 0xb0, 0x02, 0x2e, 0xfe, 0x7c,
    0x09, 0xdf, 0x15, 0xc4, 0x1c, 0x71, 0x63, 0xba,
    0x04, 0xb8, 0x27, 0x94, 0x44, 0xc8, 0x93, 0xa8,
    0x48, 0x4c, 0xca, 0x6d, 0x7a, 0xae, 0x18, 0x4a,
    0x81, 0x91, 0xb6, 0xce, 0x4d, 0x8e, 0xf6, 0xe5,
    0x08, 0x04, 0x8c, 0x52, 0x8f, 0xe3, 0x4a, 0x31,
    0x44, 0x47, 0x19, 0xa1, 0x4a, 0xc8, 0x8b, 0xcb,
};
static unsigned char DEFAULT_DH_512_GEN[] = { 0x02 };
DH *OSSL_DEFAULT_DH_512 = NULL;

/*
 * -----BEGIN DH PARAMETERS-----
 * MIGHAoGBAJ0lOVy0VIr/JebWn0zDwY2h+rqITFOpdNr6ugsgvkDXuucdcChhYExJ
 * AV/ZD2AWPbrTqV76mGRgJg4EddgT1zG0jq3rnFdMj2XzkBYx3BVvfR0Arnby0RHR
 * T4h7KZ/2zmjvV+eF8kBUHBJAojUlzxKj4QeO2x20FP9X5xmNUXeDAgEC
 * -----END DH PARAMETERS-----
 */
static unsigned char DEFAULT_DH_1024_PRIM[] = {
    0x9d, 0x25, 0x39, 0x5c, 0xb4, 0x54, 0x8a, 0xff,
    0x25, 0xe6, 0xd6, 0x9f, 0x4c, 0xc3, 0xc1, 0x8d,
    0xa1, 0xfa, 0xba, 0x88, 0x4c, 0x53, 0xa9, 0x74,
    0xda, 0xfa, 0xba, 0x0b, 0x20, 0xbe, 0x40, 0xd7,
    0xba, 0xe7, 0x1d, 0x70, 0x28, 0x61, 0x60, 0x4c,
    0x49, 0x01, 0x5f, 0xd9, 0x0f, 0x60, 0x16, 0x3d,
    0xba, 0xd3, 0xa9, 0x5e, 0xfa, 0x98, 0x64, 0x60,
    0x26, 0x0e, 0x04, 0x75, 0xd8, 0x13, 0xd7, 0x31,
    0xb4, 0x8e, 0xad, 0xeb, 0x9c, 0x57, 0x4c, 0x8f,
    0x65, 0xf3, 0x90, 0x16, 0x31, 0xdc, 0x15, 0x6f,
    0x7d, 0x1d, 0x00, 0xae, 0x76, 0xf2, 0xd1, 0x11,
    0xd1, 0x4f, 0x88, 0x7b, 0x29, 0x9f, 0xf6, 0xce,
    0x68, 0xef, 0x57, 0xe7, 0x85, 0xf2, 0x40, 0x54,
    0x1c, 0x12, 0x40, 0xa2, 0x35, 0x25, 0xcf, 0x12,
    0xa3, 0xe1, 0x07, 0x8e, 0xdb, 0x1d, 0xb4, 0x14,
    0xff, 0x57, 0xe7, 0x19, 0x8d, 0x51, 0x77, 0x83
};
static unsigned char DEFAULT_DH_1024_GEN[] = { 0x02 };
DH *OSSL_DEFAULT_DH_1024 = NULL;

static DH*
ossl_create_dh(unsigned char *p, size_t plen, unsigned char *g, size_t glen)
{
    DH *dh;

    if ((dh = DH_new()) == NULL) ossl_raise(eDHError, NULL);
    dh->p = BN_bin2bn(p, plen, NULL);
    dh->g = BN_bin2bn(g, glen, NULL);
    if (dh->p == NULL || dh->g == NULL){
        DH_free(dh);
        ossl_raise(eDHError, NULL);
    }

    return dh;
}

/*
 * INIT
 */
void
Init_ossl_dh()
{
    eDHError = rb_define_class_under(mPKey, "DHError", ePKeyError);
    cDH = rb_define_class_under(mPKey, "DH", cPKey);
    rb_define_singleton_method(cDH, "generate", ossl_dh_s_generate, -1);
    rb_define_method(cDH, "initialize", ossl_dh_initialize, -1);
    rb_define_method(cDH, "public?", ossl_dh_is_public, 0);
    rb_define_method(cDH, "private?", ossl_dh_is_private, 0);
    rb_define_method(cDH, "to_text", ossl_dh_to_text, 0);
    rb_define_method(cDH, "export", ossl_dh_export, 0);
    rb_define_alias(cDH, "to_pem", "export");
    rb_define_alias(cDH, "to_s", "export");
    rb_define_method(cDH, "to_der", ossl_dh_to_der, 0);
    rb_define_method(cDH, "public_key", ossl_dh_to_public_key, 0);
    rb_define_method(cDH, "params_ok?", ossl_dh_check_params, 0);
    rb_define_method(cDH, "generate_key!", ossl_dh_generate_key, 0);
    rb_define_method(cDH, "compute_key", ossl_dh_compute_key, 1);
    DEF_OSSL_PKEY_BN(cDH, dh, p);
    DEF_OSSL_PKEY_BN(cDH, dh, g);
    DEF_OSSL_PKEY_BN(cDH, dh, pub_key);
    DEF_OSSL_PKEY_BN(cDH, dh, priv_key);
    rb_define_method(cDH, "params", ossl_dh_get_params, 0);

    OSSL_DEFAULT_DH_512 = ossl_create_dh(
        DEFAULT_DH_512_PRIM, sizeof(DEFAULT_DH_512_PRIM),
        DEFAULT_DH_512_GEN, sizeof(DEFAULT_DH_512_GEN));
    OSSL_DEFAULT_DH_1024 = ossl_create_dh(
        DEFAULT_DH_1024_PRIM, sizeof(DEFAULT_DH_1024_PRIM),
        DEFAULT_DH_1024_GEN, sizeof(DEFAULT_DH_1024_GEN));
}

#else /* defined NO_DH */
#   warning >>> OpenSSL is compiled without DH support <<<
void
Init_ossl_dh()
{
    rb_warning("OpenSSL is compiled without DH support");
}
#endif /* NO_DH */
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl_pkey_dsa.c

root/ext/openssl/ossl_pkey_dsa.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. dsa_instance
  2. ossl_dsa_new
  3. dsa_generate
  4. ossl_dsa_s_generate
  5. ossl_dsa_initialize
  6. ossl_dsa_is_public
  7. ossl_dsa_is_private
  8. ossl_dsa_export
  9. ossl_dsa_to_der
  10. ossl_dsa_get_params
  11. ossl_dsa_to_text
  12. ossl_dsa_to_public_key
  13. ossl_dsa_sign
  14. ossl_dsa_verify
  15. Init_ossl_dsa
  16. Init_ossl_dsa
/*
 * $Id: ossl_pkey_dsa.c,v 1.8 2005/09/18 22:55:41 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#if !defined(OPENSSL_NO_DSA)

#include "ossl.h"

#define GetPKeyDSA(obj, pkey) do { \
    GetPKey(obj, pkey); \
    if (EVP_PKEY_type(pkey->type) != EVP_PKEY_DSA) { /* PARANOIA? */ \
        ossl_raise(rb_eRuntimeError, "THIS IS NOT A DSA!"); \
    } \
} while (0)

#define DSA_HAS_PRIVATE(dsa) ((dsa)->priv_key)
#define DSA_PRIVATE(obj,dsa) (DSA_HAS_PRIVATE(dsa)||OSSL_PKEY_IS_PRIVATE(obj))

/*
 * Classes
 */
VALUE cDSA;
VALUE eDSAError;

/*
 * Public
 */
static VALUE
dsa_instance(VALUE klass, DSA *dsa)
{
    EVP_PKEY *pkey;
    VALUE obj;

    if (!dsa) {
        return Qfalse;
    }
    if (!(pkey = EVP_PKEY_new())) {
        return Qfalse;
    }
    if (!EVP_PKEY_assign_DSA(pkey, dsa)) {
        EVP_PKEY_free(pkey);
        return Qfalse;
    }
    WrapPKey(klass, obj, pkey);

    return obj;
}

VALUE
ossl_dsa_new(EVP_PKEY *pkey)
{
    VALUE obj;

    if (!pkey) {
        obj = dsa_instance(cDSA, DSA_new());
    } else {
        if (EVP_PKEY_type(pkey->type) != EVP_PKEY_DSA) {
            ossl_raise(rb_eTypeError, "Not a DSA key!");
        }
        WrapPKey(cDSA, obj, pkey);
    }
    if (obj == Qfalse) {
        ossl_raise(eDSAError, NULL);
    }

    return obj;
}

/*
 * Private
 */
static DSA *
dsa_generate(int size)
{
    DSA *dsa;
    unsigned char seed[20];
    int seed_len = 20, counter;
    unsigned long h;

    if (!RAND_bytes(seed, seed_len)) {
        return 0;
    }
    dsa = DSA_generate_parameters(size, seed, seed_len, &counter, &h,
            rb_block_given_p() ? ossl_generate_cb : NULL,
            NULL);
    if(!dsa) return 0;

    if (!DSA_generate_key(dsa)) {
        DSA_free(dsa);
        return 0;
    }

    return dsa;
}

static VALUE
ossl_dsa_s_generate(VALUE klass, VALUE size)
{
    DSA *dsa = dsa_generate(FIX2INT(size)); /* err handled by dsa_instance */
    VALUE obj = dsa_instance(klass, dsa);

    if (obj == Qfalse) {
        DSA_free(dsa);
        ossl_raise(eDSAError, NULL);
    }

    return obj;
}

static VALUE
ossl_dsa_initialize(int argc, VALUE *argv, VALUE self)
{
    EVP_PKEY *pkey;
    DSA *dsa;
    BIO *in;
    char *passwd = NULL;
    VALUE arg, pass;

    GetPKey(self, pkey);
    if(rb_scan_args(argc, argv, "02", &arg, &pass) == 0) {
        dsa = DSA_new();
    }
    else if (FIXNUM_P(arg)) {
        if (!(dsa = dsa_generate(FIX2INT(arg)))) {
            ossl_raise(eDSAError, NULL);
        }
    }
    else {
        if (!NIL_P(pass)) passwd = StringValuePtr(pass);
        arg = ossl_to_der_if_possible(arg);
        in = ossl_obj2bio(arg);
        dsa = PEM_read_bio_DSAPrivateKey(in, NULL, ossl_pem_passwd_cb, passwd);
        if (!dsa) {
            BIO_reset(in);
            dsa = PEM_read_bio_DSAPublicKey(in, NULL, NULL, NULL);
        }
        if (!dsa) {
            BIO_reset(in);
            dsa = PEM_read_bio_DSA_PUBKEY(in, NULL, NULL, NULL);
        }
        if (!dsa) {
            BIO_reset(in);
            dsa = d2i_DSAPrivateKey_bio(in, NULL);
        }
        if (!dsa) {
            BIO_reset(in);
            dsa = d2i_DSA_PUBKEY_bio(in, NULL);
        }
        BIO_free(in);
        if (!dsa) ossl_raise(eDSAError, "Neither PUB key nor PRIV key:");
    }
    if (!EVP_PKEY_assign_DSA(pkey, dsa)) {
        DSA_free(dsa);
        ossl_raise(eDSAError, NULL);
    }

    return self;
}

static VALUE
ossl_dsa_is_public(VALUE self)
{
    EVP_PKEY *pkey;

    GetPKeyDSA(self, pkey);

    /*
     * Do we need to check dsap->dsa->public_pkey?
     * return Qtrue;
     */
    return (pkey->pkey.dsa->pub_key) ? Qtrue : Qfalse;
}

static VALUE
ossl_dsa_is_private(VALUE self)
{
    EVP_PKEY *pkey;

    GetPKeyDSA(self, pkey);

    return (DSA_PRIVATE(self, pkey->pkey.dsa)) ? Qtrue : Qfalse;
}

static VALUE
ossl_dsa_export(int argc, VALUE *argv, VALUE self)
{
    EVP_PKEY *pkey;
    BIO *out;
    const EVP_CIPHER *ciph = NULL;
    char *passwd = NULL;
    VALUE cipher, pass, str;

    GetPKeyDSA(self, pkey);
    rb_scan_args(argc, argv, "02", &cipher, &pass);
    if (!NIL_P(cipher)) {
        ciph = GetCipherPtr(cipher);
        if (!NIL_P(pass)) {
            passwd = StringValuePtr(pass);
        }
    }
    if (!(out = BIO_new(BIO_s_mem()))) {
        ossl_raise(eDSAError, NULL);
    }
    if (DSA_HAS_PRIVATE(pkey->pkey.dsa)) {
        if (!PEM_write_bio_DSAPrivateKey(out, pkey->pkey.dsa, ciph,
                                         NULL, 0, ossl_pem_passwd_cb, passwd)){
            BIO_free(out);
            ossl_raise(eDSAError, NULL);
        }
    } else {
        if (!PEM_write_bio_DSAPublicKey(out, pkey->pkey.dsa)) {
            BIO_free(out);
            ossl_raise(eDSAError, NULL);
        }
    }
    str = ossl_membio2str(out);

    return str;
}

static VALUE
ossl_dsa_to_der(VALUE self)
{
    EVP_PKEY *pkey;
    int (*i2d_func)_((DSA*, unsigned char**));
    unsigned char *p;
    long len;
    VALUE str;

    GetPKeyDSA(self, pkey);
    if(DSA_HAS_PRIVATE(pkey->pkey.dsa))
        i2d_func = (int(*)_((DSA*,unsigned char**)))i2d_DSAPrivateKey;
    else
        i2d_func = i2d_DSA_PUBKEY;
    if((len = i2d_func(pkey->pkey.dsa, NULL)) <= 0)
        ossl_raise(eDSAError, NULL);
    str = rb_str_new(0, len);
    p = RSTRING(str)->ptr;
    if(i2d_func(pkey->pkey.dsa, &p) < 0)
        ossl_raise(eDSAError, NULL);
    ossl_str_adjust(str, p);

    return str;
}

/*
 * Stores all parameters of key to the hash
 * INSECURE: PRIVATE INFORMATIONS CAN LEAK OUT!!!
 * Don't use :-)) (I's up to you)
 */
static VALUE
ossl_dsa_get_params(VALUE self)
{
    EVP_PKEY *pkey;
    VALUE hash;

    GetPKeyDSA(self, pkey);

    hash = rb_hash_new();

    rb_hash_aset(hash, rb_str_new2("p"), ossl_bn_new(pkey->pkey.dsa->p));
    rb_hash_aset(hash, rb_str_new2("q"), ossl_bn_new(pkey->pkey.dsa->q));
    rb_hash_aset(hash, rb_str_new2("g"), ossl_bn_new(pkey->pkey.dsa->g));
    rb_hash_aset(hash, rb_str_new2("pub_key"), ossl_bn_new(pkey->pkey.dsa->pub_key));
    rb_hash_aset(hash, rb_str_new2("priv_key"), ossl_bn_new(pkey->pkey.dsa->priv_key));

    return hash;
}

/*
 * Prints all parameters of key to buffer
 * INSECURE: PRIVATE INFORMATIONS CAN LEAK OUT!!!
 * Don't use :-)) (I's up to you)
 */
static VALUE
ossl_dsa_to_text(VALUE self)
{
    EVP_PKEY *pkey;
    BIO *out;
    VALUE str;

    GetPKeyDSA(self, pkey);
    if (!(out = BIO_new(BIO_s_mem()))) {
        ossl_raise(eDSAError, NULL);
    }
    if (!DSA_print(out, pkey->pkey.dsa, 0)) { /* offset = 0 */
        BIO_free(out);
        ossl_raise(eDSAError, NULL);
    }
    str = ossl_membio2str(out);

    return str;
}

/*
 * Makes new instance DSA PUBLIC_KEY from PRIVATE_KEY
 */
static VALUE
ossl_dsa_to_public_key(VALUE self)
{
    EVP_PKEY *pkey;
    DSA *dsa;
    VALUE obj;

    GetPKeyDSA(self, pkey);
    /* err check performed by dsa_instance */
    dsa = DSAPublicKey_dup(pkey->pkey.dsa);
    obj = dsa_instance(CLASS_OF(self), dsa);
    if (obj == Qfalse) {
        DSA_free(dsa);
        ossl_raise(eDSAError, NULL);
    }
    return obj;
}

#define ossl_dsa_buf_size(pkey) (DSA_size((pkey)->pkey.dsa)+16)

static VALUE
ossl_dsa_sign(VALUE self, VALUE data)
{
    EVP_PKEY *pkey;
    int buf_len;
    VALUE str;

    GetPKeyDSA(self, pkey);
    StringValue(data);
    if (!DSA_PRIVATE(self, pkey->pkey.dsa)) {
        ossl_raise(eDSAError, "Private DSA key needed!");
    }
    str = rb_str_new(0, ossl_dsa_buf_size(pkey));
    if (!DSA_sign(0, RSTRING(data)->ptr, RSTRING(data)->len, RSTRING(str)->ptr,
                  &buf_len, pkey->pkey.dsa)) { /* type is ignored (0) */
        ossl_raise(eDSAError, NULL);
    }
    RSTRING(str)->len = buf_len;
    RSTRING(str)->ptr[buf_len] = 0;

    return str;
}

static VALUE
ossl_dsa_verify(VALUE self, VALUE digest, VALUE sig)
{
    EVP_PKEY *pkey;
    int ret;

    GetPKeyDSA(self, pkey);
    StringValue(digest);
    StringValue(sig);
    /* type is ignored (0) */
    ret = DSA_verify(0, RSTRING(digest)->ptr, RSTRING(digest)->len,
                     RSTRING(sig)->ptr, RSTRING(sig)->len, pkey->pkey.dsa);
    if (ret < 0) {
        ossl_raise(eDSAError, NULL);
    }
    else if (ret == 1) {
        return Qtrue;
    }

    return Qfalse;
}

OSSL_PKEY_BN(dsa, p);
OSSL_PKEY_BN(dsa, q);
OSSL_PKEY_BN(dsa, g);
OSSL_PKEY_BN(dsa, pub_key);
OSSL_PKEY_BN(dsa, priv_key);

/*
 * INIT
 */
void
Init_ossl_dsa()
{
    eDSAError = rb_define_class_under(mPKey, "DSAError", ePKeyError);

    cDSA = rb_define_class_under(mPKey, "DSA", cPKey);

    rb_define_singleton_method(cDSA, "generate", ossl_dsa_s_generate, 1);
    rb_define_method(cDSA, "initialize", ossl_dsa_initialize, -1);

    rb_define_method(cDSA, "public?", ossl_dsa_is_public, 0);
    rb_define_method(cDSA, "private?", ossl_dsa_is_private, 0);
    rb_define_method(cDSA, "to_text", ossl_dsa_to_text, 0);
    rb_define_method(cDSA, "export", ossl_dsa_export, -1);
    rb_define_alias(cDSA, "to_pem", "export");
    rb_define_alias(cDSA, "to_s", "export");
    rb_define_method(cDSA, "to_der", ossl_dsa_to_der, 0);
    rb_define_method(cDSA, "public_key", ossl_dsa_to_public_key, 0);
    rb_define_method(cDSA, "syssign", ossl_dsa_sign, 1);
    rb_define_method(cDSA, "sysverify", ossl_dsa_verify, 2);

    DEF_OSSL_PKEY_BN(cDSA, dsa, p);
    DEF_OSSL_PKEY_BN(cDSA, dsa, q);
    DEF_OSSL_PKEY_BN(cDSA, dsa, g);
    DEF_OSSL_PKEY_BN(cDSA, dsa, pub_key);
    DEF_OSSL_PKEY_BN(cDSA, dsa, priv_key);

    rb_define_method(cDSA, "params", ossl_dsa_get_params, 0);
}

#else /* defined NO_DSA */
#   warning >>> OpenSSL is compiled without DSA support <<<

void
Init_ossl_dsa()
{
    rb_warning("OpenSSL is compiled without DSA support");
}

#endif /* NO_DSA */
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl_pkey_rsa.c

root/ext/openssl/ossl_pkey_rsa.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. rsa_instance
  2. ossl_rsa_new
  3. rsa_generate
  4. ossl_rsa_s_generate
  5. ossl_rsa_initialize
  6. ossl_rsa_is_public
  7. ossl_rsa_is_private
  8. ossl_rsa_export
  9. ossl_rsa_to_der
  10. ossl_rsa_public_encrypt
  11. ossl_rsa_public_decrypt
  12. ossl_rsa_private_encrypt
  13. ossl_rsa_private_decrypt
  14. ossl_rsa_get_params
  15. ossl_rsa_to_text
  16. ossl_rsa_to_public_key
  17. Init_ossl_rsa
  18. Init_ossl_rsa
/*
 * $Id: ossl_pkey_rsa.c,v 1.9 2005/09/18 22:55:41 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#if !defined(OPENSSL_NO_RSA)

#include "ossl.h"

#define GetPKeyRSA(obj, pkey) do { \
    GetPKey(obj, pkey); \
    if (EVP_PKEY_type(pkey->type) != EVP_PKEY_RSA) { /* PARANOIA? */ \
        ossl_raise(rb_eRuntimeError, "THIS IS NOT A RSA!") ; \
    } \
} while (0)

#define RSA_HAS_PRIVATE(rsa) ((rsa)->p && (rsa)->q)
#define RSA_PRIVATE(obj,rsa) (RSA_HAS_PRIVATE(rsa)||OSSL_PKEY_IS_PRIVATE(obj))

/*
 * Classes
 */
VALUE cRSA;
VALUE eRSAError;

/*
 * Public
 */
static VALUE
rsa_instance(VALUE klass, RSA *rsa)
{
    EVP_PKEY *pkey;
    VALUE obj;

    if (!rsa) {
        return Qfalse;
    }
    if (!(pkey = EVP_PKEY_new())) {
        return Qfalse;
    }
    if (!EVP_PKEY_assign_RSA(pkey, rsa)) {
        EVP_PKEY_free(pkey);
        return Qfalse;
    }
    WrapPKey(klass, obj, pkey);

    return obj;
}

VALUE
ossl_rsa_new(EVP_PKEY *pkey)
{
    VALUE obj;

    if (!pkey) {
        obj = rsa_instance(cRSA, RSA_new());
    }
    else {
        if (EVP_PKEY_type(pkey->type) != EVP_PKEY_RSA) {
            ossl_raise(rb_eTypeError, "Not a RSA key!");
        }
        WrapPKey(cRSA, obj, pkey);
    }
    if (obj == Qfalse) {
        ossl_raise(eRSAError, NULL);
    }

    return obj;
}

/*
 * Private
 */
static RSA *
rsa_generate(int size, int exp)
{
    return RSA_generate_key(size, exp,
            rb_block_given_p() ? ossl_generate_cb : NULL,
            NULL);
}

static VALUE
ossl_rsa_s_generate(int argc, VALUE *argv, VALUE klass)
{
    RSA *rsa;
    VALUE size, exp;
    VALUE obj;

    rb_scan_args(argc, argv, "11", &size, &exp);

    rsa = rsa_generate(NUM2INT(size), NIL_P(exp) ? RSA_F4 : NUM2INT(exp)); /* err handled by rsa_instance */
    obj = rsa_instance(klass, rsa);

    if (obj == Qfalse) {
        RSA_free(rsa);
        ossl_raise(eRSAError, NULL);
    }

    return obj;
}

static VALUE
ossl_rsa_initialize(int argc, VALUE *argv, VALUE self)
{
    EVP_PKEY *pkey;
    RSA *rsa;
    BIO *in;
    char *passwd = NULL;
    VALUE arg, pass;

    GetPKey(self, pkey);
    if(rb_scan_args(argc, argv, "02", &arg, &pass) == 0) {
        rsa = RSA_new();
    }
    else if (FIXNUM_P(arg)) {
        rsa = rsa_generate(FIX2INT(arg), NIL_P(pass) ? RSA_F4 : NUM2INT(pass));
        if (!rsa) ossl_raise(eRSAError, NULL);
    }
    else {
        if (!NIL_P(pass)) passwd = StringValuePtr(pass);
        arg = ossl_to_der_if_possible(arg);
        in = ossl_obj2bio(arg);
        rsa = PEM_read_bio_RSAPrivateKey(in, NULL, ossl_pem_passwd_cb, passwd);
        if (!rsa) {
            BIO_reset(in);
            rsa = PEM_read_bio_RSAPublicKey(in, NULL, NULL, NULL);
        }
        if (!rsa) {
            BIO_reset(in);
            rsa = PEM_read_bio_RSA_PUBKEY(in, NULL, NULL, NULL);
        }
        if (!rsa) {
            BIO_reset(in);
            rsa = d2i_RSAPrivateKey_bio(in, NULL);
        }
        if (!rsa) {
            BIO_reset(in);
            rsa = d2i_RSAPublicKey_bio(in, NULL);
        }
        if (!rsa) {
            BIO_reset(in);
            rsa = d2i_RSA_PUBKEY_bio(in, NULL);
        }
        BIO_free(in);
        if (!rsa) ossl_raise(eRSAError, "Neither PUB key nor PRIV key:");
    }
    if (!EVP_PKEY_assign_RSA(pkey, rsa)) {
        RSA_free(rsa);
        ossl_raise(eRSAError, NULL);
    }

    return self;
}

static VALUE
ossl_rsa_is_public(VALUE self)
{
    EVP_PKEY *pkey;

    GetPKeyRSA(self, pkey);
    /*
     * SURPRISE! :-))
     * Every key is public at the same time!
     */
    return Qtrue;
}

static VALUE
ossl_rsa_is_private(VALUE self)
{
    EVP_PKEY *pkey;

    GetPKeyRSA(self, pkey);

    return (RSA_PRIVATE(self, pkey->pkey.rsa)) ? Qtrue : Qfalse;
}

static VALUE
ossl_rsa_export(int argc, VALUE *argv, VALUE self)
{
    EVP_PKEY *pkey;
    BIO *out;
    const EVP_CIPHER *ciph = NULL;
    char *passwd = NULL;
    VALUE cipher, pass, str;

    GetPKeyRSA(self, pkey);

    rb_scan_args(argc, argv, "02", &cipher, &pass);

    if (!NIL_P(cipher)) {
        ciph = GetCipherPtr(cipher);
        if (!NIL_P(pass)) {
            passwd = StringValuePtr(pass);
        }
    }
    if (!(out = BIO_new(BIO_s_mem()))) {
        ossl_raise(eRSAError, NULL);
    }
    if (RSA_HAS_PRIVATE(pkey->pkey.rsa)) {
        if (!PEM_write_bio_RSAPrivateKey(out, pkey->pkey.rsa, ciph,
                                         NULL, 0, ossl_pem_passwd_cb, passwd)) {
            BIO_free(out);
            ossl_raise(eRSAError, NULL);
        }
    } else {
        if (!PEM_write_bio_RSAPublicKey(out, pkey->pkey.rsa)) {
            BIO_free(out);
            ossl_raise(eRSAError, NULL);
        }
    }
    str = ossl_membio2str(out);

    return str;
}

static VALUE
ossl_rsa_to_der(VALUE self)
{
    EVP_PKEY *pkey;
    int (*i2d_func)_((const RSA*, unsigned char**));
    unsigned char *p;
    long len;
    VALUE str;

    GetPKeyRSA(self, pkey);
    if(RSA_HAS_PRIVATE(pkey->pkey.rsa))
        i2d_func = i2d_RSAPrivateKey;
    else
        i2d_func = i2d_RSAPublicKey;
    if((len = i2d_func(pkey->pkey.rsa, NULL)) <= 0)
        ossl_raise(eRSAError, NULL);
    str = rb_str_new(0, len);
    p = RSTRING(str)->ptr;
    if(i2d_func(pkey->pkey.rsa, &p) < 0)
        ossl_raise(eRSAError, NULL);
    ossl_str_adjust(str, p);

    return str;
}

#define ossl_rsa_buf_size(pkey) (RSA_size((pkey)->pkey.rsa)+16)

static VALUE
ossl_rsa_public_encrypt(int argc, VALUE *argv, VALUE self)
{
    EVP_PKEY *pkey;
    int buf_len, pad;
    VALUE str, buffer, padding;

    GetPKeyRSA(self, pkey);
    rb_scan_args(argc, argv, "11", &buffer, &padding);
    pad = (argc == 1) ? RSA_PKCS1_PADDING : NUM2INT(padding);
    StringValue(buffer);
    str = rb_str_new(0, ossl_rsa_buf_size(pkey));
    buf_len = RSA_public_encrypt(RSTRING(buffer)->len, RSTRING(buffer)->ptr,
                                 RSTRING(str)->ptr, pkey->pkey.rsa,
                                 pad);
    if (buf_len < 0) ossl_raise(eRSAError, NULL);
    RSTRING(str)->len = buf_len;
    RSTRING(str)->ptr[buf_len] = 0;

    return str;
}

static VALUE
ossl_rsa_public_decrypt(int argc, VALUE *argv, VALUE self)
{
    EVP_PKEY *pkey;
    int buf_len, pad;
    VALUE str, buffer, padding;

    GetPKeyRSA(self, pkey);
    rb_scan_args(argc, argv, "11", &buffer, &padding);
    pad = (argc == 1) ? RSA_PKCS1_PADDING : NUM2INT(padding);
    StringValue(buffer);
    str = rb_str_new(0, ossl_rsa_buf_size(pkey));
    buf_len = RSA_public_decrypt(RSTRING(buffer)->len, RSTRING(buffer)->ptr,
                                 RSTRING(str)->ptr, pkey->pkey.rsa,
                                 pad);
    if (buf_len < 0) ossl_raise(eRSAError, NULL);
    RSTRING(str)->len = buf_len;
    RSTRING(str)->ptr[buf_len] = 0;

    return str;
}

static VALUE
ossl_rsa_private_encrypt(int argc, VALUE *argv, VALUE self)
{
    EVP_PKEY *pkey;
    int buf_len, pad;
    VALUE str, buffer, padding;

    GetPKeyRSA(self, pkey);
    if (!RSA_PRIVATE(self, pkey->pkey.rsa)) {
        ossl_raise(eRSAError, "private key needed.");
    }
    rb_scan_args(argc, argv, "11", &buffer, &padding);
    pad = (argc == 1) ? RSA_PKCS1_PADDING : NUM2INT(padding);
    StringValue(buffer);
    str = rb_str_new(0, ossl_rsa_buf_size(pkey));
    buf_len = RSA_private_encrypt(RSTRING(buffer)->len, RSTRING(buffer)->ptr,
                                  RSTRING(str)->ptr, pkey->pkey.rsa,
                                  pad);
    if (buf_len < 0) ossl_raise(eRSAError, NULL);
    RSTRING(str)->len = buf_len;
    RSTRING(str)->ptr[buf_len] = 0;

    return str;
}

static VALUE
ossl_rsa_private_decrypt(int argc, VALUE *argv, VALUE self)
{
    EVP_PKEY *pkey;
    int buf_len, pad;
    VALUE str, buffer, padding;

    GetPKeyRSA(self, pkey);
    if (!RSA_PRIVATE(self, pkey->pkey.rsa)) {
        ossl_raise(eRSAError, "private key needed.");
    }
    rb_scan_args(argc, argv, "11", &buffer, &padding);
    pad = (argc == 1) ? RSA_PKCS1_PADDING : NUM2INT(padding);
    StringValue(buffer);
    str = rb_str_new(0, ossl_rsa_buf_size(pkey));
    buf_len = RSA_private_decrypt(RSTRING(buffer)->len, RSTRING(buffer)->ptr,
                                  RSTRING(str)->ptr, pkey->pkey.rsa,
                                  pad);
    if (buf_len < 0) ossl_raise(eRSAError, NULL);
    RSTRING(str)->len = buf_len;
    RSTRING(str)->ptr[buf_len] = 0;

    return str;
}

/*
 * Stores all parameters of key to the hash
 * INSECURE: PRIVATE INFORMATIONS CAN LEAK OUT!!!
 * Don't use :-)) (I's up to you)
 */
static VALUE
ossl_rsa_get_params(VALUE self)
{
    EVP_PKEY *pkey;
    VALUE hash;

    GetPKeyRSA(self, pkey);

    hash = rb_hash_new();

    rb_hash_aset(hash, rb_str_new2("n"), ossl_bn_new(pkey->pkey.rsa->n));
    rb_hash_aset(hash, rb_str_new2("e"), ossl_bn_new(pkey->pkey.rsa->e));
    rb_hash_aset(hash, rb_str_new2("d"), ossl_bn_new(pkey->pkey.rsa->d));
    rb_hash_aset(hash, rb_str_new2("p"), ossl_bn_new(pkey->pkey.rsa->p));
    rb_hash_aset(hash, rb_str_new2("q"), ossl_bn_new(pkey->pkey.rsa->q));
    rb_hash_aset(hash, rb_str_new2("dmp1"), ossl_bn_new(pkey->pkey.rsa->dmp1));
    rb_hash_aset(hash, rb_str_new2("dmq1"), ossl_bn_new(pkey->pkey.rsa->dmq1));
    rb_hash_aset(hash, rb_str_new2("iqmp"), ossl_bn_new(pkey->pkey.rsa->iqmp));

    return hash;
}

/*
 * Prints all parameters of key to buffer
 * INSECURE: PRIVATE INFORMATIONS CAN LEAK OUT!!!
 * Don't use :-)) (It's up to you)
 */
static VALUE
ossl_rsa_to_text(VALUE self)
{
    EVP_PKEY *pkey;
    BIO *out;
    VALUE str;

    GetPKeyRSA(self, pkey);
    if (!(out = BIO_new(BIO_s_mem()))) {
        ossl_raise(eRSAError, NULL);
    }
    if (!RSA_print(out, pkey->pkey.rsa, 0)) { /* offset = 0 */
        BIO_free(out);
        ossl_raise(eRSAError, NULL);
    }
    str = ossl_membio2str(out);

    return str;
}

/*
 * Makes new instance RSA PUBLIC_KEY from PRIVATE_KEY
 */
static VALUE
ossl_rsa_to_public_key(VALUE self)
{
    EVP_PKEY *pkey;
    RSA *rsa;
    VALUE obj;

    GetPKeyRSA(self, pkey);
    /* err check performed by rsa_instance */
    rsa = RSAPublicKey_dup(pkey->pkey.rsa);
    obj = rsa_instance(CLASS_OF(self), rsa);
    if (obj == Qfalse) {
        RSA_free(rsa);
        ossl_raise(eRSAError, NULL);
    }
    return obj;
}

/*
 * TODO: Test me
extern BN_CTX *ossl_bn_ctx;

static VALUE
ossl_rsa_blinding_on(VALUE self)
{
    EVP_PKEY *pkey;

    GetPKeyRSA(self, pkey);

    if (RSA_blinding_on(pkey->pkey.rsa, ossl_bn_ctx) != 1) {
        ossl_raise(eRSAError, NULL);
    }
    return self;
}

static VALUE
ossl_rsa_blinding_off(VALUE self)
{
    EVP_PKEY *pkey;

    GetPKeyRSA(self, pkey);
    RSA_blinding_off(pkey->pkey.rsa);

    return self;
}
 */

OSSL_PKEY_BN(rsa, n);
OSSL_PKEY_BN(rsa, e);
OSSL_PKEY_BN(rsa, d);
OSSL_PKEY_BN(rsa, p);
OSSL_PKEY_BN(rsa, q);
OSSL_PKEY_BN(rsa, dmp1);
OSSL_PKEY_BN(rsa, dmq1);
OSSL_PKEY_BN(rsa, iqmp);

/*
 * INIT
 */
#define DefRSAConst(x) rb_define_const(cRSA, #x,INT2FIX(RSA_##x))

void
Init_ossl_rsa()
{
    eRSAError = rb_define_class_under(mPKey, "RSAError", ePKeyError);

    cRSA = rb_define_class_under(mPKey, "RSA", cPKey);

    rb_define_singleton_method(cRSA, "generate", ossl_rsa_s_generate, -1);
    rb_define_method(cRSA, "initialize", ossl_rsa_initialize, -1);

    rb_define_method(cRSA, "public?", ossl_rsa_is_public, 0);
    rb_define_method(cRSA, "private?", ossl_rsa_is_private, 0);
    rb_define_method(cRSA, "to_text", ossl_rsa_to_text, 0);
    rb_define_method(cRSA, "export", ossl_rsa_export, -1);
    rb_define_alias(cRSA, "to_pem", "export");
    rb_define_alias(cRSA, "to_s", "export");
    rb_define_method(cRSA, "to_der", ossl_rsa_to_der, 0);
    rb_define_method(cRSA, "public_key", ossl_rsa_to_public_key, 0);
    rb_define_method(cRSA, "public_encrypt", ossl_rsa_public_encrypt, -1);
    rb_define_method(cRSA, "public_decrypt", ossl_rsa_public_decrypt, -1);
    rb_define_method(cRSA, "private_encrypt", ossl_rsa_private_encrypt, -1);
    rb_define_method(cRSA, "private_decrypt", ossl_rsa_private_decrypt, -1);

    DEF_OSSL_PKEY_BN(cRSA, rsa, n);
    DEF_OSSL_PKEY_BN(cRSA, rsa, e);
    DEF_OSSL_PKEY_BN(cRSA, rsa, d);
    DEF_OSSL_PKEY_BN(cRSA, rsa, p);
    DEF_OSSL_PKEY_BN(cRSA, rsa, q);
    DEF_OSSL_PKEY_BN(cRSA, rsa, dmp1);
    DEF_OSSL_PKEY_BN(cRSA, rsa, dmq1);
    DEF_OSSL_PKEY_BN(cRSA, rsa, iqmp);

    rb_define_method(cRSA, "params", ossl_rsa_get_params, 0);

    DefRSAConst(PKCS1_PADDING);
    DefRSAConst(SSLV23_PADDING);
    DefRSAConst(NO_PADDING);
    DefRSAConst(PKCS1_OAEP_PADDING);

/*
 * TODO: Test it
    rb_define_method(cRSA, "blinding_on!", ossl_rsa_blinding_on, 0);
    rb_define_method(cRSA, "blinding_off!", ossl_rsa_blinding_off, 0);
 */
}

#else /* defined NO_RSA */
#   warning >>> OpenSSL is compiled without RSA support <<<
void
Init_ossl_rsa()
{
    rb_warning("OpenSSL is compiled without RSA support");
}
#endif /* NO_RSA */
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl_rand.c

root/ext/openssl/ossl_rand.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. ossl_rand_seed
  2. ossl_rand_load_file
  3. ossl_rand_write_file
  4. ossl_rand_bytes
  5. ossl_rand_pseudo_bytes
  6. ossl_rand_egd
  7. ossl_rand_egd_bytes
  8. Init_ossl_rand
/*
 * $Id: ossl_rand.c,v 1.2 2003/09/17 09:05:02 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#include "ossl.h"

/*
 * Classes
 */
VALUE mRandom;
VALUE eRandomError;

/*
 * Struct
 */

/*
 * Public
 */

/*
 * Private
 */
static VALUE
ossl_rand_seed(VALUE self, VALUE str)
{
    StringValue(str);
    RAND_seed(RSTRING(str)->ptr, RSTRING(str)->len);

    return str;
}

static VALUE
ossl_rand_load_file(VALUE self, VALUE filename)
{
    SafeStringValue(filename);

    if(!RAND_load_file(RSTRING(filename)->ptr, -1)) {
        ossl_raise(eRandomError, NULL);
    }
    return Qtrue;
}

static VALUE
ossl_rand_write_file(VALUE self, VALUE filename)
{
    SafeStringValue(filename);
    if (RAND_write_file(RSTRING(filename)->ptr) == -1) {
        ossl_raise(eRandomError, NULL);
    }
    return Qtrue;
}

static VALUE
ossl_rand_bytes(VALUE self, VALUE len)
{
    VALUE str;

    str = rb_str_new(0, FIX2INT(len));
    if (!RAND_bytes(RSTRING(str)->ptr, FIX2INT(len))) {
        ossl_raise(eRandomError, NULL);
    }

    return str;
}

static VALUE
ossl_rand_pseudo_bytes(VALUE self, VALUE len)
{
    VALUE str;

    str = rb_str_new(0, FIX2INT(len));
    if (!RAND_pseudo_bytes(RSTRING(str)->ptr, FIX2INT(len))) {
        ossl_raise(eRandomError, NULL);
    }

    return str;
}

static VALUE
ossl_rand_egd(VALUE self, VALUE filename)
{
    SafeStringValue(filename);

    if(!RAND_egd(RSTRING(filename)->ptr)) {
        ossl_raise(eRandomError, NULL);
    }
    return Qtrue;
}

static VALUE
ossl_rand_egd_bytes(VALUE self, VALUE filename, VALUE len)
{
    SafeStringValue(filename);

    if (!RAND_egd_bytes(RSTRING(filename)->ptr, FIX2INT(len))) {
        ossl_raise(eRandomError, NULL);
    }
    return Qtrue;
}

#define DEFMETH(class, name, func, argc) \
        rb_define_method(class, name, func, argc); \
        rb_define_singleton_method(class, name, func, argc);

/*
 * INIT
 */
void
Init_ossl_rand()
{
    mRandom = rb_define_module_under(mOSSL, "Random");

    eRandomError = rb_define_class_under(mRandom, "RandomError", eOSSLError);

    DEFMETH(mRandom, "seed", ossl_rand_seed, 1);
    DEFMETH(mRandom, "load_random_file", ossl_rand_load_file, 1);
    DEFMETH(mRandom, "write_random_file", ossl_rand_write_file, 1);
    DEFMETH(mRandom, "random_bytes", ossl_rand_bytes, 1);
    DEFMETH(mRandom, "pseudo_bytes", ossl_rand_pseudo_bytes, 1);
    DEFMETH(mRandom, "egd", ossl_rand_egd, 1);
    DEFMETH(mRandom, "egd_bytes", ossl_rand_egd_bytes, 2);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl_rand.h

root/ext/openssl/ossl_rand.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/*
 * $Id: ossl_rand.h,v 1.1 2003/07/23 16:11:29 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#if !defined(_OSSL_RAND_H_)
#define _OSSL_RAND_H_

extern VALUE mRandom;
extern VALUE eRandomError;

void Init_ossl_rand(void);

#endif /* _OSSL_RAND_H_ */
/* [<][>][^][v][top][bottom][index] [help] */


ext/openssl/ossl_ssl.c

root/ext/openssl/ossl_ssl.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. ossl_sslctx_free
  2. ossl_sslctx_s_alloc
  3. ossl_sslctx_initialize
  4. ossl_call_client_cert_cb
  5. ossl_client_cert_cb
  6. ossl_call_tmp_dh_callback
  7. ossl_tmp_dh_callback
  8. ossl_default_tmp_dh_callback
  9. ossl_ssl_verify_callback
  10. ossl_sslctx_add_extra_chain_cert_i
  11. ossl_sslctx_setup
  12. ossl_ssl_cipher_to_ary
  13. ossl_sslctx_get_ciphers
  14. ossl_sslctx_set_ciphers
  15. ossl_ssl_shutdown
  16. ossl_ssl_free
  17. ossl_ssl_s_alloc
  18. ossl_ssl_initialize
  19. ossl_ssl_setup
  20. ossl_start_ssl
  21. ossl_ssl_connect
  22. ossl_ssl_accept
  23. ossl_ssl_read
  24. ossl_ssl_write
  25. ossl_ssl_close
  26. ossl_ssl_get_cert
  27. ossl_ssl_get_peer_cert
  28. ossl_ssl_get_peer_cert_chain
  29. ossl_ssl_get_cipher
  30. ossl_ssl_get_state
  31. ossl_ssl_pending
  32. Init_ossl_ssl
/*
 * $Id: ossl_ssl.c,v 1.28 2005/09/24 00:17:43 akr Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2000-2002  GOTOU Yuuzou <gotoyuzo@notwork.org>
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#include "ossl.h"
#include <rubysig.h>
#include <rubyio.h>

#if defined(HAVE_UNISTD_H)
#  include <unistd.h> /* for read(), and write() */
#endif

#define numberof(ary) (sizeof(ary)/sizeof(ary[0]))

#ifdef _WIN32
#  define TO_SOCKET(s) _get_osfhandle(s)
#else
#  define TO_SOCKET(s) s
#endif

VALUE mSSL;
VALUE eSSLError;
VALUE cSSLContext;
VALUE cSSLSocket;

#define ossl_sslctx_set_cert(o,v)        rb_iv_set((o),"@cert",(v))
#define ossl_sslctx_set_key(o,v)         rb_iv_set((o),"@key",(v))
#define ossl_sslctx_set_client_ca(o,v)   rb_iv_set((o),"@client_ca",(v))
#define ossl_sslctx_set_ca_file(o,v)     rb_iv_set((o),"@ca_file",(v))
#define ossl_sslctx_set_ca_path(o,v)     rb_iv_set((o),"@ca_path",(v))
#define ossl_sslctx_set_timeout(o,v)     rb_iv_set((o),"@timeout",(v))
#define ossl_sslctx_set_verify_mode(o,v) rb_iv_set((o),"@verify_mode",(v))
#define ossl_sslctx_set_verify_dep(o,v)  rb_iv_set((o),"@verify_depth",(v))
#define ossl_sslctx_set_verify_cb(o,v)   rb_iv_set((o),"@verify_callback",(v))
#define ossl_sslctx_set_options(o,v)     rb_iv_set((o),"@options",(v))
#define ossl_sslctx_set_cert_store(o,v)  rb_iv_set((o),"@cert_store",(v))
#define ossl_sslctx_set_extra_cert(o,v)  rb_iv_set((o),"@extra_chain_cert",(v))
#define ossl_sslctx_set_client_cert_cb(o,v) rb_iv_set((o),"@client_cert_cb",(v))
#define ossl_sslctx_set_tmp_dh_cb(o,v)   rb_iv_set((o),"@tmp_dh_callback",(v))
#define ossl_sslctx_set_sess_id_ctx(o, v) rb_iv_get((o),"@session_id_context"(v))

#define ossl_sslctx_get_cert(o)          rb_iv_get((o),"@cert")
#define ossl_sslctx_get_key(o)           rb_iv_get((o),"@key")
#define ossl_sslctx_get_client_ca(o)     rb_iv_get((o),"@client_ca")
#define ossl_sslctx_get_ca_file(o)       rb_iv_get((o),"@ca_file")
#define ossl_sslctx_get_ca_path(o)       rb_iv_get((o),"@ca_path")
#define ossl_sslctx_get_timeout(o)       rb_iv_get((o),"@timeout")
#define ossl_sslctx_get_verify_mode(o)   rb_iv_get((o),"@verify_mode")
#define ossl_sslctx_get_verify_dep(o)    rb_iv_get((o),"@verify_depth")
#define ossl_sslctx_get_verify_cb(o)     rb_iv_get((o),"@verify_callback")
#define ossl_sslctx_get_options(o)       rb_iv_get((o),"@options")
#define ossl_sslctx_get_cert_store(o)    rb_iv_get((o),"@cert_store")
#define ossl_sslctx_get_extra_cert(o)    rb_iv_get((o),"@extra_chain_cert")
#define ossl_sslctx_get_client_cert_cb(o) rb_iv_get((o),"@client_cert_cb")
#define ossl_sslctx_get_tmp_dh_cb(o)     rb_iv_get((o),"@tmp_dh_callback")
#define ossl_sslctx_get_sess_id_ctx(o)   rb_iv_get((o),"@session_id_context")

static char *ossl_sslctx_attrs[] = {
    "cert", "key", "client_ca", "ca_file", "ca_path",
    "timeout", "verify_mode", "verify_depth",
    "verify_callback", "options", "cert_store", "extra_chain_cert",
    "client_cert_cb", "tmp_dh_callback", "session_id_context",
};

#define ossl_ssl_get_io(o)           rb_iv_get((o),"@io")
#define ossl_ssl_get_ctx(o)          rb_iv_get((o),"@context")
#define ossl_ssl_get_sync_close(o)   rb_iv_get((o),"@sync_close")
#define ossl_ssl_get_x509(o)         rb_iv_get((o),"@x509")
#define ossl_ssl_get_key(o)          rb_iv_get((o),"@key")
#define ossl_ssl_get_tmp_dh(o)       rb_iv_get((o),"@tmp_dh")

#define ossl_ssl_set_io(o,v)         rb_iv_set((o),"@io",(v))
#define ossl_ssl_set_ctx(o,v)        rb_iv_set((o),"@context",(v))
#define ossl_ssl_set_sync_close(o,v) rb_iv_set((o),"@sync_close",(v))
#define ossl_ssl_set_x509(o,v)       rb_iv_set((o),"@x509",(v))
#define ossl_ssl_set_key(o,v)        rb_iv_set((o),"@key",(v))
#define ossl_ssl_set_tmp_dh(o,v)     rb_iv_set((o),"@tmp_dh",(v))

static char *ossl_ssl_attr_readers[] = { "io", "context", };
static char *ossl_ssl_attrs[] = { "sync_close", };

/*
 * SSLContext class
 */
struct {
    const char *name;
    SSL_METHOD *(*func)(void);
} ossl_ssl_method_tab[] = {
#define OSSL_SSL_METHOD_ENTRY(name) { #name, name##_method }
    OSSL_SSL_METHOD_ENTRY(TLSv1),
    OSSL_SSL_METHOD_ENTRY(TLSv1_server),
    OSSL_SSL_METHOD_ENTRY(TLSv1_client),
    OSSL_SSL_METHOD_ENTRY(SSLv2),
    OSSL_SSL_METHOD_ENTRY(SSLv2_server),
    OSSL_SSL_METHOD_ENTRY(SSLv2_client),
    OSSL_SSL_METHOD_ENTRY(SSLv3),
    OSSL_SSL_METHOD_ENTRY(SSLv3_server),
    OSSL_SSL_METHOD_ENTRY(SSLv3_client),
    OSSL_SSL_METHOD_ENTRY(SSLv23),
    OSSL_SSL_METHOD_ENTRY(SSLv23_server),
    OSSL_SSL_METHOD_ENTRY(SSLv23_client),
#undef OSSL_SSL_METHOD_ENTRY
};

int ossl_ssl_ex_vcb_idx;
int ossl_ssl_ex_store_p;
int ossl_ssl_ex_ptr_idx;
int ossl_ssl_ex_client_cert_cb_idx;
int ossl_ssl_ex_tmp_dh_callback_idx;

static void
ossl_sslctx_free(SSL_CTX *ctx)
{
    if(ctx && SSL_CTX_get_ex_data(ctx, ossl_ssl_ex_store_p)== (void*)1)
        ctx->cert_store = NULL;
    SSL_CTX_free(ctx);
}

static VALUE
ossl_sslctx_s_alloc(VALUE klass)
{
    SSL_CTX *ctx;

    ctx = SSL_CTX_new(SSLv23_method());
    if (!ctx) {
        ossl_raise(eSSLError, "SSL_CTX_new:");
    }
    SSL_CTX_set_mode(ctx, SSL_MODE_ENABLE_PARTIAL_WRITE);
    SSL_CTX_set_options(ctx, SSL_OP_ALL);
    return Data_Wrap_Struct(klass, 0, ossl_sslctx_free, ctx);
}

static VALUE
ossl_sslctx_initialize(int argc, VALUE *argv, VALUE self)
{
    VALUE ssl_method;
    SSL_METHOD *method = NULL;
    SSL_CTX *ctx;
    int i;
    char *s;

    for(i = 0; i < numberof(ossl_sslctx_attrs); i++){
        char buf[32];
        snprintf(buf, sizeof(buf), "@%s", ossl_sslctx_attrs[i]);
        rb_iv_set(self, buf, Qnil);
    }
    if (rb_scan_args(argc, argv, "01", &ssl_method) == 0){
        return self;
    }
    if(TYPE(ssl_method) == T_SYMBOL)
        s = rb_id2name(SYM2ID(ssl_method));
    else
        s =  StringValuePtr(ssl_method);
    for (i = 0; i < numberof(ossl_ssl_method_tab); i++) {
        if (strcmp(ossl_ssl_method_tab[i].name, s) == 0) {
            method = ossl_ssl_method_tab[i].func();
            break;
        }
    }
    if (!method) {
        ossl_raise(rb_eArgError, "unknown SSL method `%s'.", s);
    }
    Data_Get_Struct(self, SSL_CTX, ctx);
    if (SSL_CTX_set_ssl_version(ctx, method) != 1) {
        ossl_raise(eSSLError, "SSL_CTX_set_ssl_version:");
    }

    return self;
}

static VALUE
ossl_call_client_cert_cb(VALUE obj)
{
    VALUE cb, ary, cert, key;
    SSL *ssl;

    Data_Get_Struct(obj, SSL, ssl);
    cb = (VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_client_cert_cb_idx);
    if (NIL_P(cb)) return Qfalse;
    ary = rb_funcall(cb, rb_intern("call"), 1, obj);
    Check_Type(ary, T_ARRAY);
    GetX509CertPtr(cert = rb_ary_entry(ary, 0));
    GetPKeyPtr(key = rb_ary_entry(ary, 1));
    ossl_ssl_set_x509(obj, cert);
    ossl_ssl_set_key(obj, key);

    return Qtrue;
}

static int
ossl_client_cert_cb(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
{
    VALUE obj;
    int status, success;

    obj = (VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_ptr_idx);
    success = rb_protect((VALUE(*)_((VALUE)))ossl_call_client_cert_cb,
                         obj, &status);
    if (status || !success) return 0;
    *x509 = DupX509CertPtr(ossl_ssl_get_x509(obj));
    *pkey = DupPKeyPtr(ossl_ssl_get_key(obj));

    return 1;
}

#if !defined(OPENSSL_NO_DH)
static VALUE
ossl_call_tmp_dh_callback(VALUE *args)
{
    SSL *ssl;
    VALUE cb, dh;
    EVP_PKEY *pkey;

    Data_Get_Struct(args[0], SSL, ssl);
    cb = (VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_tmp_dh_callback_idx);
    if (NIL_P(cb)) return Qfalse;
    dh = rb_funcall(cb, rb_intern("call"), 3, args[0], args[1], args[2]);
    pkey = GetPKeyPtr(dh);
    if (EVP_PKEY_type(pkey->type) != EVP_PKEY_DH) return Qfalse;
    ossl_ssl_set_tmp_dh(args[0], dh);

    return Qtrue;
}

static DH*
ossl_tmp_dh_callback(SSL *ssl, int is_export, int keylength)
{
    VALUE args[3];
    int status, success;

    args[0] = (VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_ptr_idx);
    args[1] = INT2FIX(is_export);
    args[2] = INT2FIX(keylength);
    success = rb_protect((VALUE(*)_((VALUE)))ossl_call_tmp_dh_callback,
                         (VALUE)args, &status);
    if (status || !success) return NULL;

    return GetPKeyPtr(ossl_ssl_get_tmp_dh(args[0]))->pkey.dh;
}

static DH*
ossl_default_tmp_dh_callback(SSL *ssl, int is_export, int keylength)
{
    switch(keylength){
    case 512:
        return OSSL_DEFAULT_DH_512;
    case 1024:
        return OSSL_DEFAULT_DH_1024;
    }
    return NULL;
}
#endif /* OPENSSL_NO_DH */

static int
ossl_ssl_verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
{
    VALUE cb;
    SSL *ssl;

    ssl = X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx());
    cb = (VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_vcb_idx);
    X509_STORE_CTX_set_ex_data(ctx, ossl_verify_cb_idx, (void*)cb);
    return ossl_verify_cb(preverify_ok, ctx);
}

static VALUE
ossl_sslctx_add_extra_chain_cert_i(VALUE i, VALUE arg)
{
    X509 *x509;
    SSL_CTX *ctx;

    Data_Get_Struct(arg, SSL_CTX, ctx);
    x509 = DupX509CertPtr(i);
    if(!SSL_CTX_add_extra_chain_cert(ctx, x509)){
        ossl_raise(eSSLError, NULL);
    }

    return i;
}

static VALUE
ossl_sslctx_setup(VALUE self)
{
    SSL_CTX *ctx;
    X509 *cert = NULL, *client_ca = NULL;
    X509_STORE *store;
    EVP_PKEY *key = NULL;
    char *ca_path = NULL, *ca_file = NULL;
    int i, verify_mode;
    VALUE val;

    if(OBJ_FROZEN(self)) return Qnil;
    Data_Get_Struct(self, SSL_CTX, ctx);

#if !defined(OPENSSL_NO_DH)
    if (RTEST(ossl_sslctx_get_tmp_dh_cb(self))){
        SSL_CTX_set_tmp_dh_callback(ctx, ossl_tmp_dh_callback);
    }
    else{
        rb_warning("using default DH parameters.");
        SSL_CTX_set_tmp_dh_callback(ctx, ossl_default_tmp_dh_callback);
    }
#endif

    val = ossl_sslctx_get_cert_store(self);
    if(!NIL_P(val)){
        /*
         * WORKAROUND:
         *   X509_STORE can count references, but
         *   X509_STORE_free() doesn't care it.
         *   So we won't increment it but mark it by ex_data.
         */
        store = GetX509StorePtr(val); /* NO NEED TO DUP */
        SSL_CTX_set_cert_store(ctx, store);
        SSL_CTX_set_ex_data(ctx, ossl_ssl_ex_store_p, (void*)1);
    }

    val = ossl_sslctx_get_extra_cert(self);
    if(!NIL_P(val)){
        rb_iterate(rb_each, val, ossl_sslctx_add_extra_chain_cert_i, self);
    }

    /* private key may be bundled in certificate file. */
    val = ossl_sslctx_get_cert(self);
    cert = NIL_P(val) ? NULL : GetX509CertPtr(val); /* NO DUP NEEDED */
    val = ossl_sslctx_get_key(self);
    key = NIL_P(val) ? NULL : GetPKeyPtr(val); /* NO DUP NEEDED */
    if (cert && key) {
        if (!SSL_CTX_use_certificate(ctx, cert)) {
            /* Adds a ref => Safe to FREE */
            ossl_raise(eSSLError, "SSL_CTX_use_certificate:");
        }
        if (!SSL_CTX_use_PrivateKey(ctx, key)) {
            /* Adds a ref => Safe to FREE */
            ossl_raise(eSSLError, "SSL_CTX_use_PrivateKey:");
        }
        if (!SSL_CTX_check_private_key(ctx)) {
            ossl_raise(eSSLError, "SSL_CTX_check_private_key:");
        }
    }

    val = ossl_sslctx_get_client_ca(self);
    if(!NIL_P(val)){
        if(TYPE(val) == T_ARRAY){
            for(i = 0; i < RARRAY(val)->len; i++){
                client_ca = GetX509CertPtr(RARRAY(val)->ptr[i]);
                if (!SSL_CTX_add_client_CA(ctx, client_ca)){
                    /* Copies X509_NAME => FREE it. */
                    ossl_raise(eSSLError, "SSL_CTX_add_client_CA");
                }
            }
        }
        else{
            client_ca = GetX509CertPtr(val); /* NO DUP NEEDED. */
            if (!SSL_CTX_add_client_CA(ctx, client_ca)){
                /* Copies X509_NAME => FREE it. */
                ossl_raise(eSSLError, "SSL_CTX_add_client_CA");
            }
        }
    }

    val = ossl_sslctx_get_ca_file(self);
    ca_file = NIL_P(val) ? NULL : StringValuePtr(val);
    val = ossl_sslctx_get_ca_path(self);
    ca_path = NIL_P(val) ? NULL : StringValuePtr(val);
    if(ca_file || ca_path){
        if (!SSL_CTX_load_verify_locations(ctx, ca_file, ca_path))
            rb_warning("can't set verify locations");
    }

    val = ossl_sslctx_get_verify_mode(self);
    verify_mode = NIL_P(val) ? SSL_VERIFY_NONE : NUM2INT(val);
    SSL_CTX_set_verify(ctx, verify_mode, ossl_ssl_verify_callback);
    if (RTEST(ossl_sslctx_get_client_cert_cb(self)))
        SSL_CTX_set_client_cert_cb(ctx, ossl_client_cert_cb);

    val = ossl_sslctx_get_timeout(self);
    if(!NIL_P(val)) SSL_CTX_set_timeout(ctx, NUM2LONG(val));

    val = ossl_sslctx_get_verify_dep(self);
    if(!NIL_P(val)) SSL_CTX_set_verify_depth(ctx, NUM2LONG(val));

    val = ossl_sslctx_get_options(self);
    if(!NIL_P(val)) SSL_CTX_set_options(ctx, NUM2LONG(val));
    rb_obj_freeze(self);

    val = ossl_sslctx_get_sess_id_ctx(self);
    if (!NIL_P(val)){
        StringValue(val);
        if (!SSL_CTX_set_session_id_context(ctx, RSTRING(val)->ptr,
                                            RSTRING(val)->len)){
            ossl_raise(eSSLError, "SSL_CTX_set_session_id_context:");
        }
    }

    return Qtrue;
}

static VALUE
ossl_ssl_cipher_to_ary(SSL_CIPHER *cipher)
{
    VALUE ary;
    int bits, alg_bits;

    ary = rb_ary_new2(4);
    rb_ary_push(ary, rb_str_new2(SSL_CIPHER_get_name(cipher)));
    rb_ary_push(ary, rb_str_new2(SSL_CIPHER_get_version(cipher)));
    bits = SSL_CIPHER_get_bits(cipher, &alg_bits);
    rb_ary_push(ary, INT2FIX(bits));
    rb_ary_push(ary, INT2FIX(alg_bits));

    return ary;
}

static VALUE
ossl_sslctx_get_ciphers(VALUE self)
{
    SSL_CTX *ctx;
    STACK_OF(SSL_CIPHER) *ciphers;
    SSL_CIPHER *cipher;
    VALUE ary;
    int i, num;

    Data_Get_Struct(self, SSL_CTX, ctx);
    if(!ctx){
        rb_warning("SSL_CTX is not initialized.");
        return Qnil;
    }
    ciphers = ctx->cipher_list;

    if (!ciphers)
        return rb_ary_new();

    num = sk_num((STACK*)ciphers);
    ary = rb_ary_new2(num);
    for(i = 0; i < num; i++){
        cipher = (SSL_CIPHER*)sk_value((STACK*)ciphers, i);
        rb_ary_push(ary, ossl_ssl_cipher_to_ary(cipher));
    }
    return ary;
}

static VALUE
ossl_sslctx_set_ciphers(VALUE self, VALUE v)
{
    SSL_CTX *ctx;
    VALUE str, elem;
    int i;

    rb_check_frozen(self);
    if (NIL_P(v))
        return v;
    else if (TYPE(v) == T_ARRAY) {
        str = rb_str_new2(NULL);
        for (i = 0; i < RARRAY(v)->len; i++) {
            elem = rb_ary_entry(v, i);
            if (TYPE(elem) == T_ARRAY) elem = rb_ary_entry(elem, 0);
            elem = rb_String(elem);
            rb_str_append(str, elem);
            if (i < RARRAY(v)->len-1) rb_str_cat2(str, ":");
        }
    } else {
        str = v;
        StringValue(str);
    }

    Data_Get_Struct(self, SSL_CTX, ctx);
    if(!ctx){
        ossl_raise(eSSLError, "SSL_CTX is not initialized.");
        return Qnil;
    }
    if (!SSL_CTX_set_cipher_list(ctx, RSTRING(str)->ptr)) {
        ossl_raise(eSSLError, "SSL_CTX_set_cipher_list:");
    }

    return v;
}

/*
 * SSLSocket class
 */
static void
ossl_ssl_shutdown(SSL *ssl)
{
    if (ssl) {
        SSL_shutdown(ssl);
        SSL_clear(ssl);
    }
}

static void
ossl_ssl_free(SSL *ssl)
{
    ossl_ssl_shutdown(ssl);
    SSL_free(ssl);
}

static VALUE
ossl_ssl_s_alloc(VALUE klass)
{
    return Data_Wrap_Struct(klass, 0, ossl_ssl_free, NULL);
}

static VALUE
ossl_ssl_initialize(int argc, VALUE *argv, VALUE self)
{
    VALUE io, ctx;

    if (rb_scan_args(argc, argv, "11", &io, &ctx) == 1) {
        ctx = rb_funcall(cSSLContext, rb_intern("new"), 0);
    }
    OSSL_Check_Kind(ctx, cSSLContext);
    Check_Type(io, T_FILE);
    ossl_ssl_set_io(self, io);
    ossl_ssl_set_ctx(self, ctx);
    ossl_ssl_set_sync_close(self, Qfalse);
    ossl_sslctx_setup(ctx);
    rb_call_super(0, 0);

    return self;
}

static VALUE
ossl_ssl_setup(VALUE self)
{
    VALUE io, v_ctx, cb;
    SSL_CTX *ctx;
    SSL *ssl;
    OpenFile *fptr;

    Data_Get_Struct(self, SSL, ssl);
    if(!ssl){
        v_ctx = ossl_ssl_get_ctx(self);
        Data_Get_Struct(v_ctx, SSL_CTX, ctx);

        ssl = SSL_new(ctx);
        if (!ssl) {
            ossl_raise(eSSLError, "SSL_new:");
        }
        DATA_PTR(self) = ssl;

        io = ossl_ssl_get_io(self);
        GetOpenFile(io, fptr);
        rb_io_check_readable(fptr);
        rb_io_check_writable(fptr);
        SSL_set_fd(ssl, TO_SOCKET(fptr->fd));
        SSL_set_ex_data(ssl, ossl_ssl_ex_ptr_idx, (void*)self);
        cb = ossl_sslctx_get_verify_cb(v_ctx);
        SSL_set_ex_data(ssl, ossl_ssl_ex_vcb_idx, (void*)cb);
        cb = ossl_sslctx_get_client_cert_cb(v_ctx);
        SSL_set_ex_data(ssl, ossl_ssl_ex_client_cert_cb_idx, (void*)cb);
        cb = ossl_sslctx_get_tmp_dh_cb(v_ctx);
        SSL_set_ex_data(ssl, ossl_ssl_ex_tmp_dh_callback_idx, (void*)cb);
    }

    return Qtrue;
}

#ifdef _WIN32
#define ssl_get_error(ssl, ret) (errno = WSAGetLastError(), SSL_get_error(ssl, ret))
#else
#define ssl_get_error(ssl, ret) SSL_get_error(ssl, ret)
#endif

static VALUE
ossl_start_ssl(VALUE self, int (*func)())
{
    SSL *ssl;
    OpenFile *fptr;
    int ret;

    Data_Get_Struct(self, SSL, ssl);
    GetOpenFile(ossl_ssl_get_io(self), fptr);
    for(;;){
        if((ret = func(ssl)) > 0) break;
        switch(ssl_get_error(ssl, ret)){
        case SSL_ERROR_WANT_WRITE:
            rb_io_wait_writable(fptr->fd);
            continue;
        case SSL_ERROR_WANT_READ:
            rb_io_wait_readable(fptr->fd);
            continue;
        case SSL_ERROR_SYSCALL:
            if (errno) rb_sys_fail(0);
        default:
            ossl_raise(eSSLError, NULL);
        }
    }

    return self;
}

static VALUE
ossl_ssl_connect(VALUE self)
{
    ossl_ssl_setup(self);
    return ossl_start_ssl(self, SSL_connect);
}

static VALUE
ossl_ssl_accept(VALUE self)
{
    ossl_ssl_setup(self);
    return ossl_start_ssl(self, SSL_accept);
}

static VALUE
ossl_ssl_read(int argc, VALUE *argv, VALUE self)
{
    SSL *ssl;
    int ilen, nread = 0;
    VALUE len, str;
    OpenFile *fptr;

    rb_scan_args(argc, argv, "11", &len, &str);
    ilen = NUM2INT(len);
    if(NIL_P(str)) str = rb_str_new(0, ilen);
    else{
        StringValue(str);
        rb_str_modify(str);
        rb_str_resize(str, ilen);
    }
    if(ilen == 0) return str;

    Data_Get_Struct(self, SSL, ssl);
    GetOpenFile(ossl_ssl_get_io(self), fptr);
    if (ssl) {
        if(SSL_pending(ssl) <= 0)
            rb_thread_wait_fd(fptr->fd);
        for (;;){
            nread = SSL_read(ssl, RSTRING(str)->ptr, RSTRING(str)->len);
            switch(ssl_get_error(ssl, nread)){
            case SSL_ERROR_NONE:
                goto end;
            case SSL_ERROR_ZERO_RETURN:
                rb_eof_error();
            case SSL_ERROR_WANT_WRITE:
                rb_io_wait_writable(fptr->fd);
                continue;
            case SSL_ERROR_WANT_READ:
                rb_io_wait_readable(fptr->fd);
                continue;
            case SSL_ERROR_SYSCALL:
                if(ERR_peek_error() == 0 && nread == 0) rb_eof_error();
                rb_sys_fail(0);
            default:
                ossl_raise(eSSLError, "SSL_read:");
            }
        }
    }
    else {
        ID id_sysread = rb_intern("sysread");
        rb_warning("SSL session is not started yet.");
        return rb_funcall(ossl_ssl_get_io(self), id_sysread, 2, len, str);
    }

  end:
    RSTRING(str)->len = nread;
    RSTRING(str)->ptr[nread] = 0;
    OBJ_TAINT(str);

    return str;
}

static VALUE
ossl_ssl_write(VALUE self, VALUE str)
{
    SSL *ssl;
    int nwrite = 0;
    OpenFile *fptr;

    StringValue(str);
    Data_Get_Struct(self, SSL, ssl);
    GetOpenFile(ossl_ssl_get_io(self), fptr);

    if (ssl) {
        for (;;){
            nwrite = SSL_write(ssl, RSTRING(str)->ptr, RSTRING(str)->len);
            switch(ssl_get_error(ssl, nwrite)){
            case SSL_ERROR_NONE:
                goto end;
            case SSL_ERROR_WANT_WRITE:
                rb_io_wait_writable(fptr->fd);
                continue;
            case SSL_ERROR_WANT_READ:
                rb_io_wait_readable(fptr->fd);
                continue;
            case SSL_ERROR_SYSCALL:
                if (errno) rb_sys_fail(0);
            default:
                ossl_raise(eSSLError, "SSL_write:");
            }
        }
    }
    else {
        ID id_syswrite = rb_intern("syswrite");
        rb_warning("SSL session is not started yet.");
        return rb_funcall(ossl_ssl_get_io(self), id_syswrite, 1, str);
    }

  end:
    return INT2NUM(nwrite);
}

static VALUE
ossl_ssl_close(VALUE self)
{
    SSL *ssl;

    Data_Get_Struct(self, SSL, ssl);
    ossl_ssl_shutdown(ssl);
    if (RTEST(ossl_ssl_get_sync_close(self)))
        rb_funcall(ossl_ssl_get_io(self), rb_intern("close"), 0);

    return Qnil;
}

static VALUE
ossl_ssl_get_cert(VALUE self)
{
    SSL *ssl;
    X509 *cert = NULL;

    Data_Get_Struct(self, SSL, ssl);
    if (ssl) {
        rb_warning("SSL session is not started yet.");
        return Qnil;
    }

    /*
     * Is this OpenSSL bug? Should add a ref?
     * TODO: Ask for.
     */
    cert = SSL_get_certificate(ssl); /* NO DUPs => DON'T FREE. */

    if (!cert) {
        return Qnil;
    }
    return ossl_x509_new(cert);
}

static VALUE
ossl_ssl_get_peer_cert(VALUE self)
{
    SSL *ssl;
    X509 *cert = NULL;
    VALUE obj;

    Data_Get_Struct(self, SSL, ssl);

    if (!ssl){
        rb_warning("SSL session is not started yet.");
        return Qnil;
    }

    cert = SSL_get_peer_certificate(ssl); /* Adds a ref => Safe to FREE. */

    if (!cert) {
        return Qnil;
    }
    obj = ossl_x509_new(cert);
    X509_free(cert);

    return obj;
}

static VALUE
ossl_ssl_get_peer_cert_chain(VALUE self)
{
    SSL *ssl;
    STACK_OF(X509) *chain;
    X509 *cert;
    VALUE ary;
    int i, num;

    Data_Get_Struct(self, SSL, ssl);
    if(!ssl){
        rb_warning("SSL session is not started yet.");
        return Qnil;
    }
    chain = SSL_get_peer_cert_chain(ssl);
    if(!chain) return Qnil;
    num = sk_num(chain);
    ary = rb_ary_new2(num);
    for (i = 0; i < num; i++){
        cert = (X509*)sk_value(chain, i);
        rb_ary_push(ary, ossl_x509_new(cert));
    }

    return ary;
}

static VALUE
ossl_ssl_get_cipher(VALUE self)
{
    SSL *ssl;
    SSL_CIPHER *cipher;

    Data_Get_Struct(self, SSL, ssl);
    if (!ssl) {
        rb_warning("SSL session is not started yet.");
        return Qnil;
    }
    cipher = SSL_get_current_cipher(ssl);

    return ossl_ssl_cipher_to_ary(cipher);
}

static VALUE
ossl_ssl_get_state(VALUE self)
{
    SSL *ssl;
    VALUE ret;

    Data_Get_Struct(self, SSL, ssl);
    if (!ssl) {
        rb_warning("SSL session is not started yet.");
        return Qnil;
    }
    ret = rb_str_new2(SSL_state_string(ssl));
    if (ruby_verbose) {
        rb_str_cat2(ret, ": ");
        rb_str_cat2(ret, SSL_state_string_long(ssl));
    }
    return ret;
}

static VALUE
ossl_ssl_pending(VALUE self)
{
    SSL *ssl;

    Data_Get_Struct(self, SSL, ssl);
    if (!ssl) {
        rb_warning("SSL session is not started yet.");
        return Qnil;
    }

    return INT2NUM(SSL_pending(ssl));
}

void
Init_ossl_ssl()
{
    int i;

    ossl_ssl_ex_vcb_idx = SSL_get_ex_new_index(0,"ossl_ssl_ex_vcb_idx",0,0,0);
    ossl_ssl_ex_store_p = SSL_get_ex_new_index(0,"ossl_ssl_ex_store_p",0,0,0);
    ossl_ssl_ex_ptr_idx = SSL_get_ex_new_index(0,"ossl_ssl_ex_ptr_idx",0,0,0);
    ossl_ssl_ex_client_cert_cb_idx =
        SSL_get_ex_new_index(0,"ossl_ssl_ex_client_cert_cb_idx",0,0,0);
    ossl_ssl_ex_tmp_dh_callback_idx =
        SSL_get_ex_new_index(0,"ossl_ssl_ex_tmp_dh_callback_idx",0,0,0);

    mSSL = rb_define_module_under(mOSSL, "SSL");
    eSSLError = rb_define_class_under(mSSL, "SSLError", eOSSLError);

    /* class SSLContext */
    cSSLContext = rb_define_class_under(mSSL, "SSLContext", rb_cObject);
    rb_define_alloc_func(cSSLContext, ossl_sslctx_s_alloc);
    for(i = 0; i < numberof(ossl_sslctx_attrs); i++)
        rb_attr(cSSLContext, rb_intern(ossl_sslctx_attrs[i]), 1, 1, Qfalse);
    rb_define_method(cSSLContext, "initialize",  ossl_sslctx_initialize, -1);
    rb_define_method(cSSLContext, "ciphers",     ossl_sslctx_get_ciphers, 0);
    rb_define_method(cSSLContext, "ciphers=",    ossl_sslctx_set_ciphers, 1);

    /* class SSLSocket */
    cSSLSocket = rb_define_class_under(mSSL, "SSLSocket", rb_cObject);
    rb_define_alloc_func(cSSLSocket, ossl_ssl_s_alloc);
    for(i = 0; i < numberof(ossl_ssl_attr_readers); i++)
        rb_attr(cSSLSocket, rb_intern(ossl_ssl_attr_readers[i]), 1, 0, Qfalse);
    for(i = 0; i < numberof(ossl_ssl_attrs); i++)
        rb_attr(cSSLSocket, rb_intern(ossl_ssl_attrs[i]), 1, 1, Qfalse);
    rb_define_alias(cSSLSocket, "to_io", "io");
    rb_define_method(cSSLSocket, "initialize", ossl_ssl_initialize, -1);
    rb_define_method(cSSLSocket, "connect",    ossl_ssl_connect, 0);
    rb_define_method(cSSLSocket, "accept",     ossl_ssl_accept, 0);
    rb_define_method(cSSLSocket, "sysread",    ossl_ssl_read, -1);
    rb_define_method(cSSLSocket, "syswrite",   ossl_ssl_write, 1);
    rb_define_method(cSSLSocket, "sysclose",   ossl_ssl_close, 0);
    rb_define_method(cSSLSocket, "cert",       ossl_ssl_get_cert, 0);
    rb_define_method(cSSLSocket, "peer_cert",  ossl_ssl_get_peer_cert, 0);
    rb_define_method(cSSLSocket, "peer_cert_chain", ossl_ssl_get_peer_cert_chain, 0);
    rb_define_method(cSSLSocket, "cipher",     ossl_ssl_get_cipher, 0);
    rb_define_method(cSSLSocket, "state",      ossl_ssl_get_state, 0);
    rb_define_method(cSSLSocket, "pending",    ossl_ssl_pending, 0);

#define ossl_ssl_def_const(x) rb_define_const(mSSL, #x, INT2FIX(SSL_##x))

    ossl_ssl_def_const(VERIFY_NONE);
    ossl_ssl_def_const(VERIFY_PEER);
    ossl_ssl_def_const(VERIFY_FAIL_IF_NO_PEER_CERT);
    ossl_ssl_def_const(VERIFY_CLIENT_ONCE);
    /* Not introduce constants included in OP_ALL such as...
     * ossl_ssl_def_const(OP_MICROSOFT_SESS_ID_BUG);
     * ossl_ssl_def_const(OP_NETSCAPE_CHALLENGE_BUG);
     * ossl_ssl_def_const(OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG);
     * ossl_ssl_def_const(OP_SSLREF2_REUSE_CERT_TYPE_BUG);
     * ossl_ssl_def_const(OP_MICROSOFT_BIG_SSLV3_BUFFER);
     * ossl_ssl_def_const(OP_MSIE_SSLV2_RSA_PADDING);
     * ossl_ssl_def_const(OP_SSLEAY_080_CLIENT_DH_BUG);
     * ossl_ssl_def_const(OP_TLS_D5_BUG);
     * ossl_ssl_def_const(OP_TLS_BLOCK_PADDING_BUG);
     * ossl_ssl_def_const(OP_DONT_INSERT_EMPTY_FRAGMENTS);
     */
    ossl_ssl_def_const(OP_ALL);
#if defined(SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION)
    ossl_ssl_def_const(OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION);
#endif
#if defined(SSL_OP_SINGLE_ECDH_USE)
    ossl_ssl_def_const(OP_SINGLE_ECDH_USE);
#endif
    ossl_ssl_def_const(OP_SINGLE_DH_USE);
    ossl_ssl_def_const(OP_EPHEMERAL_RSA);
#if defined(SSL_OP_CIPHER_SERVER_PREFERENCE)
    ossl_ssl_def_const(OP_CIPHER_SERVER_PREFERENCE);
#endif
    ossl_ssl_def_const(OP_TLS_ROLLBACK_BUG);
    ossl_ssl_def_const(OP_NO_SSLv2);
    ossl_ssl_def_const(OP_NO_SSLv3);
    ossl_ssl_def_const(OP_NO_TLSv1);
    ossl_ssl_def_const(OP_PKCS1_CHECK_1);
    ossl_ssl_def_const(OP_PKCS1_CHECK_2);
    ossl_ssl_def_const(OP_NETSCAPE_CA_DN_BUG);
    ossl_ssl_def_const(OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl_ssl.h

root/ext/openssl/ossl_ssl.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/*
 * $Id: ossl_ssl.h,v 1.1 2003/07/23 16:11:29 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#if !defined(_OSSL_SSL_H_)
#define _OSSL_SSL_H_

extern VALUE mSSL;
extern VALUE eSSLError;
extern VALUE cSSLSocket;
extern VALUE cSSLContext;

void Init_ossl_ssl(void);

#endif /* _OSSL_SSL_H_ */
/* [<][>][^][v][top][bottom][index] [help] */


ext/openssl/ossl_version.h

root/ext/openssl/ossl_version.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/*
 * $Id: ossl_version.h,v 1.1 2003/07/23 16:11:29 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#if !defined(_OSSL_VERSION_H_)
#define _OSSL_VERSION_H_

#define OSSL_VERSION "1.0.0"

#endif /* _OSSL_VERSION_H_ */
/* [<][>][^][v][top][bottom][index] [help] */


ext/openssl/ossl_x509.c

root/ext/openssl/ossl_x509.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. Init_ossl_x509
/*
 * $Id: ossl_x509.c,v 1.2 2003/09/08 10:31:38 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#include "ossl.h"

VALUE mX509;

#define DefX509Const(x) rb_define_const(mX509, #x,INT2FIX(X509_##x))
#define DefX509Default(x,i) \
  rb_define_const(mX509, "DEFAULT_" #x, rb_str_new2(X509_get_default_##i()))

void
Init_ossl_x509()
{
    mX509 = rb_define_module_under(mOSSL, "X509");

    Init_ossl_x509attr();
    Init_ossl_x509cert();
    Init_ossl_x509crl();
    Init_ossl_x509ext();
    Init_ossl_x509name();
    Init_ossl_x509req();
    Init_ossl_x509revoked();
    Init_ossl_x509store();

    DefX509Const(V_OK);
    DefX509Const(V_ERR_UNABLE_TO_GET_ISSUER_CERT);
    DefX509Const(V_ERR_UNABLE_TO_GET_CRL);
    DefX509Const(V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE);
    DefX509Const(V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE);
    DefX509Const(V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY);
    DefX509Const(V_ERR_CERT_SIGNATURE_FAILURE);
    DefX509Const(V_ERR_CRL_SIGNATURE_FAILURE);
    DefX509Const(V_ERR_CERT_NOT_YET_VALID);
    DefX509Const(V_ERR_CERT_HAS_EXPIRED);
    DefX509Const(V_ERR_CRL_NOT_YET_VALID);
    DefX509Const(V_ERR_CRL_HAS_EXPIRED);
    DefX509Const(V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD);
    DefX509Const(V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD);
    DefX509Const(V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD);
    DefX509Const(V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD);
    DefX509Const(V_ERR_OUT_OF_MEM);
    DefX509Const(V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT);
    DefX509Const(V_ERR_SELF_SIGNED_CERT_IN_CHAIN);
    DefX509Const(V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY);
    DefX509Const(V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE);
    DefX509Const(V_ERR_CERT_CHAIN_TOO_LONG);
    DefX509Const(V_ERR_CERT_REVOKED);
    DefX509Const(V_ERR_INVALID_CA);
    DefX509Const(V_ERR_PATH_LENGTH_EXCEEDED);
    DefX509Const(V_ERR_INVALID_PURPOSE);
    DefX509Const(V_ERR_CERT_UNTRUSTED);
    DefX509Const(V_ERR_CERT_REJECTED);
    DefX509Const(V_ERR_SUBJECT_ISSUER_MISMATCH);
    DefX509Const(V_ERR_AKID_SKID_MISMATCH);
    DefX509Const(V_ERR_AKID_ISSUER_SERIAL_MISMATCH);
    DefX509Const(V_ERR_KEYUSAGE_NO_CERTSIGN);
    DefX509Const(V_ERR_APPLICATION_VERIFICATION);

#if defined(X509_V_FLAG_CRL_CHECK)
    DefX509Const(V_FLAG_CRL_CHECK);
#endif
#if defined(X509_V_FLAG_CRL_CHECK_ALL)
    DefX509Const(V_FLAG_CRL_CHECK_ALL);
#endif

    DefX509Const(PURPOSE_SSL_CLIENT);
    DefX509Const(PURPOSE_SSL_SERVER);
    DefX509Const(PURPOSE_NS_SSL_SERVER);
    DefX509Const(PURPOSE_SMIME_SIGN);
    DefX509Const(PURPOSE_SMIME_ENCRYPT);
    DefX509Const(PURPOSE_CRL_SIGN);
    DefX509Const(PURPOSE_ANY);
#if defined(X509_PURPOSE_OCSP_HELPER)
    DefX509Const(PURPOSE_OCSP_HELPER);
#endif

    DefX509Const(TRUST_COMPAT);
    DefX509Const(TRUST_SSL_CLIENT);
    DefX509Const(TRUST_SSL_SERVER);
    DefX509Const(TRUST_EMAIL);
    DefX509Const(TRUST_OBJECT_SIGN);
#if defined(X509_TRUST_OCSP_SIGN)
    DefX509Const(TRUST_OCSP_SIGN);
#endif
#if defined(X509_TRUST_OCSP_REQUEST)
    DefX509Const(TRUST_OCSP_REQUEST);
#endif

    DefX509Default(CERT_AREA, cert_area);
    DefX509Default(CERT_DIR, cert_dir);
    DefX509Default(CERT_FILE, cert_file);
    DefX509Default(CERT_DIR_ENV, cert_dir_env);
    DefX509Default(CERT_FILE_ENV, cert_file_env);
    DefX509Default(PRIVATE_DIR, private_dir);
}
/* [<][>][^][v] [top][bottom][index] [help] */


ext/openssl/ossl_x509.h

root/ext/openssl/ossl_x509.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/*
 * $Id: ossl_x509.h,v 1.2 2003/11/01 09:24:55 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#if !defined(_OSSL_X509_H_)
#define _OSSL_X509_H_

/*
 * X509 main module
 */
extern VALUE mX509;

void Init_ossl_x509(void);

/*
 * X509Attr
 */
extern VALUE cX509Attr;
extern VALUE eX509AttrError;

VALUE ossl_x509attr_new(X509_ATTRIBUTE *);
X509_ATTRIBUTE *DupX509AttrPtr(VALUE);
void Init_ossl_x509attr(void);

/*
 * X509Cert
 */
extern VALUE cX509Cert;
extern VALUE eX509CertError;

VALUE ossl_x509_new(X509 *);
VALUE ossl_x509_new_from_file(VALUE);
X509 *GetX509CertPtr(VALUE);
X509 *DupX509CertPtr(VALUE);
void Init_ossl_x509cert(void);

/*
 * X509CRL
 */
extern VALUE cX509CRL;
extern VALUE eX509CRLError;

VALUE ossl_x509crl_new(X509_CRL *);
X509_CRL *GetX509CRLPtr(VALUE);
X509_CRL *DupX509CRLPtr(VALUE);
void Init_ossl_x509crl(void);

/*
 * X509Extension
 */
extern VALUE cX509Ext;
extern VALUE cX509ExtFactory;
extern VALUE eX509ExtError;

VALUE ossl_x509ext_new(X509_EXTENSION *);
X509_EXTENSION *GetX509ExtPtr(VALUE);
X509_EXTENSION *DupX509ExtPtr(VALUE);
void Init_ossl_x509ext(void);

/*
 * X509Name
 */
extern VALUE cX509Name;
extern VALUE eX509NameError;

VALUE ossl_x509name_new(X509_NAME *);
X509_NAME *GetX509NamePtr(VALUE);
void Init_ossl_x509name(void);

/*
 * X509Request
 */
extern VALUE cX509Req;
extern VALUE eX509ReqError;

VALUE ossl_x509req_new(X509_REQ *);
X509_REQ *GetX509ReqPtr(VALUE);
X509_REQ *DupX509ReqPtr(VALUE);
void Init_ossl_x509req(void);

/*
 * X509Revoked
 */
extern VALUE cX509Rev;
extern VALUE eX509RevError;

VALUE ossl_x509revoked_new(X509_REVOKED *);
X509_REVOKED *DupX509RevokedPtr(VALUE);
void Init_ossl_x509revoked(void);

/*
 * X509Store and X509StoreContext
 */
extern VALUE cX509Store;
extern VALUE cX509StoreContext;
extern VALUE eX509StoreError;

VALUE ossl_x509store_new(X509_STORE *);
X509_STORE *GetX509StorePtr(VALUE);
X509_STORE *DupX509StorePtr(VALUE);

VALUE ossl_x509stctx_new(X509_STORE_CTX *);
VALUE ossl_x509stctx_clear_ptr(VALUE);
X509_STORE_CTX *GetX509StCtxtPtr(VALUE);

void Init_ossl_x509store(void);

#endif /* _OSSL_X509_H_ */
/* [<][>][^][v][top][bottom][index] [help] */


ext/openssl/ossl_x509attr.c

root/ext/openssl/ossl_x509attr.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. ossl_x509attr_new
  2. DupX509AttrPtr
  3. ossl_x509attr_alloc
  4. ossl_x509attr_initialize
  5. ossl_x509attr_set_oid
  6. ossl_x509attr_get_oid
  7. ossl_x509attr_set_value
  8. ossl_x509attr_get_value
  9. ossl_x509attr_to_der
  10. Init_ossl_x509attr
/*
 * $Id: ossl_x509attr.c,v 1.6 2004/12/15 06:35:53 matz Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001 Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#include "ossl.h"

#define WrapX509Attr(klass, obj, attr) do { \
    if (!attr) { \
        ossl_raise(rb_eRuntimeError, "ATTR wasn't initialized!"); \
    } \
    obj = Data_Wrap_Struct(klass, 0, X509_ATTRIBUTE_free, attr); \
} while (0)
#define GetX509Attr(obj, attr) do { \
    Data_Get_Struct(obj, X509_ATTRIBUTE, attr); \
    if (!attr) { \
        ossl_raise(rb_eRuntimeError, "ATTR wasn't initialized!"); \
    } \
} while (0)
#define SafeGetX509Attr(obj, attr) do { \
    OSSL_Check_Kind(obj, cX509Attr); \
    GetX509Attr(obj, attr); \
} while (0)

/*
 * Classes
 */
VALUE cX509Attr;
VALUE eX509AttrError;

/*
 * Public
 */
VALUE
ossl_x509attr_new(X509_ATTRIBUTE *attr)
{
    X509_ATTRIBUTE *new;
    VALUE obj;

    if (!attr) {
        new = X509_ATTRIBUTE_new();
    } else {
        new = X509_ATTRIBUTE_dup(attr);
    }
    if (!new) {
        ossl_raise(eX509AttrError, NULL);
    }
    WrapX509Attr(cX509Attr, obj, new);

    return obj;
}

X509_ATTRIBUTE *
DupX509AttrPtr(VALUE obj)
{
    X509_ATTRIBUTE *attr, *new;

    SafeGetX509Attr(obj, attr);
    if (!(new = X509_ATTRIBUTE_dup(attr))) {
        ossl_raise(eX509AttrError, NULL);
    }

    return new;
}

/*
 * Private
 */
static VALUE
ossl_x509attr_alloc(VALUE klass)
{
    X509_ATTRIBUTE *attr;
    VALUE obj;

    if (!(attr = X509_ATTRIBUTE_new()))
        ossl_raise(eX509AttrError, NULL);
    WrapX509Attr(klass, obj, attr);

    return obj;
}

static VALUE
ossl_x509attr_initialize(int argc, VALUE *argv, VALUE self)
{
    VALUE oid, value;
    X509_ATTRIBUTE *attr;
    unsigned char *p;

    GetX509Attr(self, attr);
    if(rb_scan_args(argc, argv, "11", &oid, &value) == 1){
        oid = ossl_to_der_if_possible(oid);
        StringValue(oid);
        p = RSTRING(oid)->ptr;
        if(!d2i_X509_ATTRIBUTE((X509_ATTRIBUTE**)&DATA_PTR(self),
                               &p, RSTRING(oid)->len)){
            ossl_raise(eX509AttrError, NULL);
        }
        return self;
    }
    rb_funcall(self, rb_intern("oid="), 1, oid);
    rb_funcall(self, rb_intern("value="), 1, value);

    return self;
}

static VALUE
ossl_x509attr_set_oid(VALUE self, VALUE oid)
{
    X509_ATTRIBUTE *attr;
    ASN1_OBJECT *obj;
    char *s;

    s = StringValuePtr(oid);
    obj = OBJ_txt2obj(s, 0);
    if(!obj) obj = OBJ_txt2obj(s, 1);
    if(!obj) ossl_raise(eX509AttrError, NULL);
    GetX509Attr(self, attr);
    X509_ATTRIBUTE_set1_object(attr, obj);

    return oid;
}

static VALUE
ossl_x509attr_get_oid(VALUE self)
{
    X509_ATTRIBUTE *attr;
    ASN1_OBJECT *oid;
    BIO *out;
    VALUE ret;
    int nid;

    GetX509Attr(self, attr);
    oid = X509_ATTRIBUTE_get0_object(attr);
    if ((nid = OBJ_obj2nid(oid)) != NID_undef)
        ret = rb_str_new2(OBJ_nid2sn(nid));
    else{
        if (!(out = BIO_new(BIO_s_mem())))
            ossl_raise(eX509AttrError, NULL);
        i2a_ASN1_OBJECT(out, oid);
        ret = ossl_membio2str(out);
    }

    return ret;
}

#if defined(HAVE_ST_X509_ATTRIBUTE_SINGLE) || defined(HAVE_ST_SINGLE)
#  define OSSL_X509ATTR_IS_SINGLE(attr)  ((attr)->single)
#  define OSSL_X509ATTR_SET_SINGLE(attr) ((attr)->single = 1)
#else
#  define OSSL_X509ATTR_IS_SINGLE(attr)  (!(attr)->set)
#  define OSSL_X509ATTR_SET_SINGLE(attr) ((attr)->set = 0)
#endif

static VALUE
ossl_x509attr_set_value(VALUE self, VALUE value)
{
    X509_ATTRIBUTE *attr;
    ASN1_TYPE *a1type;

    if(!(a1type = ossl_asn1_get_asn1type(value)))
        ossl_raise(eASN1Error, "could not get ASN1_TYPE");
    if(ASN1_TYPE_get(a1type) == V_ASN1_SEQUENCE){
        ASN1_TYPE_free(a1type);
        ossl_raise(eASN1Error, "couldn't set SEQUENCE for attribute value.");
    }
    GetX509Attr(self, attr);
    if(attr->value.set){
        if(OSSL_X509ATTR_IS_SINGLE(attr)) ASN1_TYPE_free(attr->value.single);
        else sk_ASN1_TYPE_free(attr->value.set);
    }
    OSSL_X509ATTR_SET_SINGLE(attr);
    attr->value.single = a1type;

    return value;
}

static VALUE
ossl_x509attr_get_value(VALUE self)
{
    X509_ATTRIBUTE *attr;
    VALUE str, asn1;
    long length;
    unsigned char *p;

    GetX509Attr(self, attr);
    if(attr->value.ptr == NULL) return Qnil;
    if(OSSL_X509ATTR_IS_SINGLE(attr)){
        length = i2d_ASN1_TYPE(attr->value.single, NULL);
        str = rb_str_new(0, length);
        p = RSTRING(str)->ptr;
        i2d_ASN1_TYPE(attr->value.single, &p);
        ossl_str_adjust(str, p);
    }
    else{
        length = i2d_ASN1_SET_OF_ASN1_TYPE(attr->value.set, NULL,
                        i2d_ASN1_TYPE, V_ASN1_SET, V_ASN1_UNIVERSAL, 0);
        str = rb_str_new(0, length);
        p = RSTRING(str)->ptr;
        i2d_ASN1_SET_OF_ASN1_TYPE(attr->value.set, &p,
                        i2d_ASN1_TYPE, V_ASN1_SET, V_ASN1_UNIVERSAL, 0);
        ossl_str_adjust(str, p);
    }
    asn1 = rb_funcall(mASN1, rb_intern("decode"), 1, str);

    return asn1;
}

static VALUE
ossl_x509attr_to_der(VALUE self)
{
    X509_ATTRIBUTE *attr;
    VALUE str;
    int len;
    unsigned char *p;

    GetX509Attr(self, attr);
    if((len = i2d_X509_ATTRIBUTE(attr, NULL)) <= 0)
        ossl_raise(eX509AttrError, NULL);
    str = rb_str_new(0, len);
    p = RSTRING(str)->ptr;
    if(i2d_X509_ATTRIBUTE(attr, &p) <= 0)
        ossl_raise(eX509AttrError, NULL);
    RSTRING(str)->len = p - (unsigned char*)RSTRING(str)->ptr;

    return str;
}

/*
 * X509_ATTRIBUTE init
 */
void
Init_ossl_x509attr()
{
    eX509AttrError = rb_define_class_under(mX509, "AttributeError", eOSSLError);

    cX509Attr = rb_define_class_under(mX509, "Attribute", rb_cObject);
    rb_define_alloc_func(cX509Attr, ossl_x509attr_alloc);
    rb_define_method(cX509Attr, "initialize", ossl_x509attr_initialize, -1);
    rb_define_method(cX509Attr, "oid=", ossl_x509attr_set_oid, 1);
    rb_define_method(cX509Attr, "oid", ossl_x509attr_get_oid, 0);
    rb_define_method(cX509Attr, "value=", ossl_x509attr_set_value, 1);
    rb_define_method(cX509Attr, "value", ossl_x509attr_get_value, 0);
    rb_define_method(cX509Attr, "to_der", ossl_x509attr_to_der, 0);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl_x509cert.c

root/ext/openssl/ossl_x509cert.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. ossl_x509_new
  2. ossl_x509_new_from_file
  3. GetX509CertPtr
  4. DupX509CertPtr
  5. ossl_x509_alloc
  6. ossl_x509_initialize
  7. ossl_x509_copy
  8. ossl_x509_to_der
  9. ossl_x509_to_pem
  10. ossl_x509_to_text
  11. ossl_x509_to_req
  12. ossl_x509_get_version
  13. ossl_x509_set_version
  14. ossl_x509_get_serial
  15. ossl_x509_set_serial
  16. ossl_x509_get_signature_algorithm
  17. ossl_x509_get_subject
  18. ossl_x509_set_subject
  19. ossl_x509_get_issuer
  20. ossl_x509_set_issuer
  21. ossl_x509_get_not_before
  22. ossl_x509_set_not_before
  23. ossl_x509_get_not_after
  24. ossl_x509_set_not_after
  25. ossl_x509_get_public_key
  26. ossl_x509_set_public_key
  27. ossl_x509_sign
  28. ossl_x509_verify
  29. ossl_x509_check_private_key
  30. ossl_x509_get_extensions
  31. ossl_x509_set_extensions
  32. ossl_x509_add_extension
  33. ossl_x509_inspect
  34. Init_ossl_x509cert
/*
 * $Id: ossl_x509cert.c,v 1.4 2004/12/15 06:35:53 matz Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#include "ossl.h"

#define WrapX509(klass, obj, x509) do { \
    if (!x509) { \
        ossl_raise(rb_eRuntimeError, "CERT wasn't initialized!"); \
    } \
    obj = Data_Wrap_Struct(klass, 0, X509_free, x509); \
} while (0)
#define GetX509(obj, x509) do { \
    Data_Get_Struct(obj, X509, x509); \
    if (!x509) { \
        ossl_raise(rb_eRuntimeError, "CERT wasn't initialized!"); \
    } \
} while (0)
#define SafeGetX509(obj, x509) do { \
    OSSL_Check_Kind(obj, cX509Cert); \
    GetX509(obj, x509); \
} while (0)

/*
 * Classes
 */
VALUE cX509Cert;
VALUE eX509CertError;

/*
 * Public
 */
VALUE
ossl_x509_new(X509 *x509)
{
    X509 *new;
    VALUE obj;

    if (!x509) {
        new = X509_new();
    } else {
        new = X509_dup(x509);
    }
    if (!new) {
        ossl_raise(eX509CertError, NULL);
    }
    WrapX509(cX509Cert, obj, new);

    return obj;
}

VALUE
ossl_x509_new_from_file(VALUE filename)
{
    X509 *x509;
    FILE *fp;
    VALUE obj;

    SafeStringValue(filename);
    if (!(fp = fopen(RSTRING(filename)->ptr, "r"))) {
        ossl_raise(eX509CertError, "%s", strerror(errno));
    }
    x509 = PEM_read_X509(fp, NULL, NULL, NULL);
    /*
     * prepare for DER...
#if !defined(OPENSSL_NO_FP_API)
    if (!x509) {
        rewind(fp);

        x509 = d2i_X509_fp(fp, NULL);
    }
#endif
    */
    fclose(fp);
    if (!x509) {
        ossl_raise(eX509CertError, NULL);
    }
    WrapX509(cX509Cert, obj, x509);

    return obj;
}

X509 *
GetX509CertPtr(VALUE obj)
{
    X509 *x509;

    SafeGetX509(obj, x509);

    return x509;
}

X509 *
DupX509CertPtr(VALUE obj)
{
    X509 *x509;

    SafeGetX509(obj, x509);

    CRYPTO_add(&x509->references, 1, CRYPTO_LOCK_X509);

    return x509;
}

/*
 * Private
 */
static VALUE
ossl_x509_alloc(VALUE klass)
{
    X509 *x509;
    VALUE obj;

    x509 = X509_new();
    if (!x509) ossl_raise(eX509CertError, NULL);

    WrapX509(klass, obj, x509);

    return obj;
}

static VALUE
ossl_x509_initialize(int argc, VALUE *argv, VALUE self)
{
    BIO *in;
    X509 *x509;
    VALUE arg;

    if (rb_scan_args(argc, argv, "01", &arg) == 0) {
        /* create just empty X509Cert */
        return self;
    }
    arg = ossl_to_der_if_possible(arg);
    in = ossl_obj2bio(arg);
    x509 = PEM_read_bio_X509(in, (X509 **)&DATA_PTR(self), NULL, NULL);
    if (!x509) {
        BIO_reset(in);
        x509 = d2i_X509_bio(in, (X509 **)&DATA_PTR(self));
    }
    BIO_free(in);
    if (!x509) ossl_raise(eX509CertError, NULL);

    return self;
}

static VALUE
ossl_x509_copy(VALUE self, VALUE other)
{
    X509 *a, *b, *x509;

    rb_check_frozen(self);
    if (self == other) return self;

    GetX509(self, a);
    SafeGetX509(other, b);

    x509 = X509_dup(b);
    if (!x509) ossl_raise(eX509CertError, NULL);

    DATA_PTR(self) = x509;
    X509_free(a);

    return self;
}

static VALUE
ossl_x509_to_der(VALUE self)
{
    X509 *x509;
    VALUE str;
    long len;
    unsigned char *p;

    GetX509(self, x509);
    if ((len = i2d_X509(x509, NULL)) <= 0)
        ossl_raise(eX509CertError, NULL);
    str = rb_str_new(0, len);
    p = RSTRING(str)->ptr;
    if (i2d_X509(x509, &p) <= 0)
        ossl_raise(eX509CertError, NULL);
    ossl_str_adjust(str, p);

    return str;
}

static VALUE
ossl_x509_to_pem(VALUE self)
{
    X509 *x509;
    BIO *out;
    VALUE str;

    GetX509(self, x509);
    out = BIO_new(BIO_s_mem());
    if (!out) ossl_raise(eX509CertError, NULL);

    if (!PEM_write_bio_X509(out, x509)) {
        BIO_free(out);
        ossl_raise(eX509CertError, NULL);
    }
    str = ossl_membio2str(out);

    return str;
}

static VALUE
ossl_x509_to_text(VALUE self)
{
    X509 *x509;
    BIO *out;
    VALUE str;

    GetX509(self, x509);

    out = BIO_new(BIO_s_mem());
    if (!out) ossl_raise(eX509CertError, NULL);

    if (!X509_print(out, x509)) {
        BIO_free(out);
        ossl_raise(eX509CertError, NULL);
    }
    str = ossl_membio2str(out);

    return str;
}

#if 0
/*
 * Makes from X509 X509_REQuest
 */
static VALUE
ossl_x509_to_req(VALUE self)
{
    X509 *x509;
    X509_REQ *req;
    VALUE obj;

    GetX509(self, x509);
    if (!(req = X509_to_X509_REQ(x509, NULL, EVP_md5()))) {
        ossl_raise(eX509CertError, NULL);
    }
    obj = ossl_x509req_new(req);
    X509_REQ_free(req);

    return obj;
}
#endif

static VALUE
ossl_x509_get_version(VALUE self)
{
    X509 *x509;

    GetX509(self, x509);

    return LONG2NUM(X509_get_version(x509));
}

static VALUE
ossl_x509_set_version(VALUE self, VALUE version)
{
    X509 *x509;
    long ver;

    if ((ver = NUM2LONG(version)) < 0) {
        ossl_raise(eX509CertError, "version must be >= 0!");
    }
    GetX509(self, x509);
    if (!X509_set_version(x509, ver)) {
        ossl_raise(eX509CertError, NULL);
    }

    return version;
}

static VALUE
ossl_x509_get_serial(VALUE self)
{
    X509 *x509;

    GetX509(self, x509);

    return asn1integer_to_num(X509_get_serialNumber(x509));
}

static VALUE
ossl_x509_set_serial(VALUE self, VALUE num)
{
    X509 *x509;

    GetX509(self, x509);

    x509->cert_info->serialNumber =
        num_to_asn1integer(num, X509_get_serialNumber(x509));

    return num;
}

static VALUE
ossl_x509_get_signature_algorithm(VALUE self)
{
    X509 *x509;
    BIO *out;
    VALUE str;

    GetX509(self, x509);
    out = BIO_new(BIO_s_mem());
    if (!out) ossl_raise(eX509CertError, NULL);

    if (!i2a_ASN1_OBJECT(out, x509->cert_info->signature->algorithm)) {
        BIO_free(out);
        ossl_raise(eX509CertError, NULL);
    }
    str = ossl_membio2str(out);

    return str;
}

static VALUE
ossl_x509_get_subject(VALUE self)
{
    X509 *x509;
    X509_NAME *name;

    GetX509(self, x509);
    if (!(name = X509_get_subject_name(x509))) { /* NO DUP - don't free! */
        ossl_raise(eX509CertError, NULL);
    }

    return ossl_x509name_new(name);
}

static VALUE
ossl_x509_set_subject(VALUE self, VALUE subject)
{
    X509 *x509;

    GetX509(self, x509);
    if (!X509_set_subject_name(x509, GetX509NamePtr(subject))) { /* DUPs name */
        ossl_raise(eX509CertError, NULL);
    }

    return subject;
}

static VALUE
ossl_x509_get_issuer(VALUE self)
{
    X509 *x509;
    X509_NAME *name;

    GetX509(self, x509);
    if(!(name = X509_get_issuer_name(x509))) { /* NO DUP - don't free! */
        ossl_raise(eX509CertError, NULL);
    }

    return ossl_x509name_new(name);
}

static VALUE
ossl_x509_set_issuer(VALUE self, VALUE issuer)
{
    X509 *x509;

    GetX509(self, x509);
    if (!X509_set_issuer_name(x509, GetX509NamePtr(issuer))) { /* DUPs name */
        ossl_raise(eX509CertError, NULL);
    }

    return issuer;
}

static VALUE
ossl_x509_get_not_before(VALUE self)
{
    X509 *x509;
    ASN1_UTCTIME *asn1time;

    GetX509(self, x509);
    if (!(asn1time = X509_get_notBefore(x509))) { /* NO DUP - don't free! */
        ossl_raise(eX509CertError, NULL);
    }

    return asn1time_to_time(asn1time);
}

static VALUE
ossl_x509_set_not_before(VALUE self, VALUE time)
{
    X509 *x509;
    time_t sec;

    sec = time_to_time_t(time);
    GetX509(self, x509);
    if (!X509_time_adj(X509_get_notBefore(x509), 0, &sec)) {
        ossl_raise(eX509CertError, NULL);
    }

    return time;
}

static VALUE
ossl_x509_get_not_after(VALUE self)
{
    X509 *x509;
    ASN1_TIME *asn1time;

    GetX509(self, x509);
    if (!(asn1time = X509_get_notAfter(x509))) { /* NO DUP - don't free! */
        ossl_raise(eX509CertError, NULL);
    }

    return asn1time_to_time(asn1time);
}

static VALUE
ossl_x509_set_not_after(VALUE self, VALUE time)
{
    X509 *x509;
    time_t sec;

    sec = time_to_time_t(time);
    GetX509(self, x509);
    if (!X509_time_adj(X509_get_notAfter(x509), 0, &sec)) {
        ossl_raise(eX509CertError, NULL);
    }

    return time;
}

static VALUE
ossl_x509_get_public_key(VALUE self)
{
    X509 *x509;
    EVP_PKEY *pkey;

    GetX509(self, x509);
    if (!(pkey = X509_get_pubkey(x509))) { /* adds an reference */
        ossl_raise(eX509CertError, NULL);
    }

    return ossl_pkey_new(pkey); /* NO DUP - OK */
}

static VALUE
ossl_x509_set_public_key(VALUE self, VALUE key)
{
    X509 *x509;

    GetX509(self, x509);
    if (!X509_set_pubkey(x509, GetPKeyPtr(key))) { /* DUPs pkey */
        ossl_raise(eX509CertError, NULL);
    }

    return key;
}

static VALUE
ossl_x509_sign(VALUE self, VALUE key, VALUE digest)
{
    X509 *x509;
    EVP_PKEY *pkey;
    const EVP_MD *md;

    pkey = GetPrivPKeyPtr(key); /* NO NEED TO DUP */
    md = GetDigestPtr(digest);
    GetX509(self, x509);
    if (!X509_sign(x509, pkey, md)) {
        ossl_raise(eX509CertError, NULL);
    }

    return self;
}

/*
 * Checks that cert signature is made with PRIVversion of this PUBLIC 'key'
 */
static VALUE
ossl_x509_verify(VALUE self, VALUE key)
{
    X509 *x509;
    EVP_PKEY *pkey;
    int i;

    pkey = GetPKeyPtr(key); /* NO NEED TO DUP */
    GetX509(self, x509);
    if ((i = X509_verify(x509, pkey)) < 0) {
        ossl_raise(eX509CertError, NULL);
    }
    if (i > 0) {
        return Qtrue;
    }

    return Qfalse;
}

/*
 * Checks if 'key' is PRIV key for this cert
 */
static VALUE
ossl_x509_check_private_key(VALUE self, VALUE key)
{
    X509 *x509;
    EVP_PKEY *pkey;

    /* not needed private key, but should be */
    pkey = GetPrivPKeyPtr(key); /* NO NEED TO DUP */
    GetX509(self, x509);
    if (!X509_check_private_key(x509, pkey)) {
        OSSL_Warning("Check private key:%s", OSSL_ErrMsg());
        return Qfalse;
    }

    return Qtrue;
}

/*
 * Gets X509v3 extensions as array of X509Ext objects
 */
static VALUE
ossl_x509_get_extensions(VALUE self)
{
    X509 *x509;
    int count, i;
    X509_EXTENSION *ext;
    VALUE ary;

    GetX509(self, x509);
    count = X509_get_ext_count(x509);
    if (count < 0) {
        return rb_ary_new();
    }
    ary = rb_ary_new2(count);
    for (i=0; i<count; i++) {
        ext = X509_get_ext(x509, i); /* NO DUP - don't free! */
        rb_ary_push(ary, ossl_x509ext_new(ext));
    }

    return ary;
}

/*
 * Sets X509_EXTENSIONs
 */
static VALUE
ossl_x509_set_extensions(VALUE self, VALUE ary)
{
    X509 *x509;
    X509_EXTENSION *ext;
    int i;

    Check_Type(ary, T_ARRAY);
    /* All ary's members should be X509Extension */
    for (i=0; i<RARRAY(ary)->len; i++) {
        OSSL_Check_Kind(RARRAY(ary)->ptr[i], cX509Ext);
    }
    GetX509(self, x509);
    sk_X509_EXTENSION_pop_free(x509->cert_info->extensions, X509_EXTENSION_free);
    x509->cert_info->extensions = NULL;
    for (i=0; i<RARRAY(ary)->len; i++) {
        ext = DupX509ExtPtr(RARRAY(ary)->ptr[i]);

        if (!X509_add_ext(x509, ext, -1)) { /* DUPs ext - FREE it */
            X509_EXTENSION_free(ext);
            ossl_raise(eX509CertError, NULL);
        }
        X509_EXTENSION_free(ext);
    }

    return ary;
}

static VALUE
ossl_x509_add_extension(VALUE self, VALUE extension)
{
    X509 *x509;
    X509_EXTENSION *ext;

    GetX509(self, x509);
    ext = DupX509ExtPtr(extension);
    if (!X509_add_ext(x509, ext, -1)) { /* DUPs ext - FREE it */
        X509_EXTENSION_free(ext);
        ossl_raise(eX509CertError, NULL);
    }
    X509_EXTENSION_free(ext);

    return extension;
}

static VALUE
ossl_x509_inspect(VALUE self)
{
    VALUE str;
    char *cname = rb_class2name(rb_obj_class(self));

    str = rb_str_new2("#<");
    rb_str_cat2(str, cname);
    rb_str_cat2(str, " ");

    rb_str_cat2(str, "subject=");
    rb_str_append(str, rb_inspect(ossl_x509_get_subject(self)));
    rb_str_cat2(str, ", ");

    rb_str_cat2(str, "issuer=");
    rb_str_append(str, rb_inspect(ossl_x509_get_issuer(self)));
    rb_str_cat2(str, ", ");

    rb_str_cat2(str, "serial=");
    rb_str_append(str, rb_inspect(ossl_x509_get_serial(self)));
    rb_str_cat2(str, ", ");

    rb_str_cat2(str, "not_before=");
    rb_str_append(str, rb_inspect(ossl_x509_get_not_before(self)));
    rb_str_cat2(str, ", ");

    rb_str_cat2(str, "not_after=");
    rb_str_append(str, rb_inspect(ossl_x509_get_not_after(self)));

    str = rb_str_cat2(str, ">");

    return str;
}

/*
 * INIT
 */
void
Init_ossl_x509cert()
{
    eX509CertError = rb_define_class_under(mX509, "CertificateError", eOSSLError);

    cX509Cert = rb_define_class_under(mX509, "Certificate", rb_cObject);

    rb_define_alloc_func(cX509Cert, ossl_x509_alloc);
    rb_define_method(cX509Cert, "initialize", ossl_x509_initialize, -1);
    rb_define_copy_func(cX509Cert, ossl_x509_copy);

    rb_define_method(cX509Cert, "to_der", ossl_x509_to_der, 0);
    rb_define_method(cX509Cert, "to_pem", ossl_x509_to_pem, 0);
    rb_define_alias(cX509Cert, "to_s", "to_pem");
    rb_define_method(cX509Cert, "to_text", ossl_x509_to_text, 0);
    rb_define_method(cX509Cert, "version", ossl_x509_get_version, 0);
    rb_define_method(cX509Cert, "version=", ossl_x509_set_version, 1);
    rb_define_method(cX509Cert, "signature_algorithm", ossl_x509_get_signature_algorithm, 0);
    rb_define_method(cX509Cert, "serial", ossl_x509_get_serial, 0);
    rb_define_method(cX509Cert, "serial=", ossl_x509_set_serial, 1);
    rb_define_method(cX509Cert, "subject", ossl_x509_get_subject, 0);
    rb_define_method(cX509Cert, "subject=", ossl_x509_set_subject, 1);
    rb_define_method(cX509Cert, "issuer", ossl_x509_get_issuer, 0);
    rb_define_method(cX509Cert, "issuer=", ossl_x509_set_issuer, 1);
    rb_define_method(cX509Cert, "not_before", ossl_x509_get_not_before, 0);
    rb_define_method(cX509Cert, "not_before=", ossl_x509_set_not_before, 1);
    rb_define_method(cX509Cert, "not_after", ossl_x509_get_not_after, 0);
    rb_define_method(cX509Cert, "not_after=", ossl_x509_set_not_after, 1);
    rb_define_method(cX509Cert, "public_key", ossl_x509_get_public_key, 0);
    rb_define_method(cX509Cert, "public_key=", ossl_x509_set_public_key, 1);
    rb_define_method(cX509Cert, "sign", ossl_x509_sign, 2);
    rb_define_method(cX509Cert, "verify", ossl_x509_verify, 1);
    rb_define_method(cX509Cert, "check_private_key", ossl_x509_check_private_key, 1);
    rb_define_method(cX509Cert, "extensions", ossl_x509_get_extensions, 0);
    rb_define_method(cX509Cert, "extensions=", ossl_x509_set_extensions, 1);
    rb_define_method(cX509Cert, "add_extension", ossl_x509_add_extension, 1);
    rb_define_method(cX509Cert, "inspect", ossl_x509_inspect, 0);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl_x509crl.c

root/ext/openssl/ossl_x509crl.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. GetX509CRLPtr
  2. DupX509CRLPtr
  3. ossl_x509crl_new
  4. ossl_x509crl_alloc
  5. ossl_x509crl_initialize
  6. ossl_x509crl_copy
  7. ossl_x509crl_get_version
  8. ossl_x509crl_set_version
  9. ossl_x509crl_get_signature_algorithm
  10. ossl_x509crl_get_issuer
  11. ossl_x509crl_set_issuer
  12. ossl_x509crl_get_last_update
  13. ossl_x509crl_set_last_update
  14. ossl_x509crl_get_next_update
  15. ossl_x509crl_set_next_update
  16. ossl_x509crl_get_revoked
  17. ossl_x509crl_set_revoked
  18. ossl_x509crl_add_revoked
  19. ossl_x509crl_sign
  20. ossl_x509crl_verify
  21. ossl_x509crl_to_der
  22. ossl_x509crl_to_pem
  23. ossl_x509crl_to_text
  24. ossl_x509crl_get_extensions
  25. ossl_x509crl_set_extensions
  26. ossl_x509crl_add_extension
  27. Init_ossl_x509crl
/*
 * $Id: ossl_x509crl.c,v 1.4 2004/12/15 06:35:53 matz Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002 Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#include "ossl.h"

#define WrapX509CRL(klass, obj, crl) do { \
    if (!crl) { \
        ossl_raise(rb_eRuntimeError, "CRL wasn't initialized!"); \
    } \
    obj = Data_Wrap_Struct(klass, 0, X509_CRL_free, crl); \
} while (0)
#define GetX509CRL(obj, crl) do { \
    Data_Get_Struct(obj, X509_CRL, crl); \
    if (!crl) { \
        ossl_raise(rb_eRuntimeError, "CRL wasn't initialized!"); \
    } \
} while (0)
#define SafeGetX509CRL(obj, crl) do { \
    OSSL_Check_Kind(obj, cX509CRL); \
    GetX509CRL(obj, crl); \
} while (0)

/*
 * Classes
 */
VALUE cX509CRL;
VALUE eX509CRLError;

/*
 * PUBLIC
 */
X509_CRL *
GetX509CRLPtr(VALUE obj)
{
    X509_CRL *crl;

    SafeGetX509CRL(obj, crl);

    return crl;
}

X509_CRL *
DupX509CRLPtr(VALUE obj)
{
    X509_CRL *crl;

    SafeGetX509CRL(obj, crl);
    CRYPTO_add(&crl->references, 1, CRYPTO_LOCK_X509_CRL);

    return crl;
}

VALUE
ossl_x509crl_new(X509_CRL *crl)
{
    X509_CRL *tmp;
    VALUE obj;

    tmp = crl ? X509_CRL_dup(crl) : X509_CRL_new();
    if(!tmp) ossl_raise(eX509CRLError, NULL);
    WrapX509CRL(cX509CRL, obj, tmp);

    return obj;
}

/*
 * PRIVATE
 */
static VALUE
ossl_x509crl_alloc(VALUE klass)
{
    X509_CRL *crl;
    VALUE obj;

    if (!(crl = X509_CRL_new())) {
        ossl_raise(eX509CRLError, NULL);
    }
    WrapX509CRL(klass, obj, crl);

    return obj;
}

static VALUE
ossl_x509crl_initialize(int argc, VALUE *argv, VALUE self)
{
    BIO *in;
    X509_CRL *crl;
    VALUE arg;

    if (rb_scan_args(argc, argv, "01", &arg) == 0) {
        return self;
    }
    arg = ossl_to_der_if_possible(arg);
    in = ossl_obj2bio(arg);
    crl = PEM_read_bio_X509_CRL(in, (X509_CRL **)&DATA_PTR(self), NULL, NULL);
    if (!crl) {
        BIO_reset(in);
        crl = d2i_X509_CRL_bio(in, (X509_CRL **)&DATA_PTR(self));
    }
    BIO_free(in);
    if (!crl) ossl_raise(eX509CRLError, NULL);

    return self;
}

static VALUE
ossl_x509crl_copy(VALUE self, VALUE other)
{
    X509_CRL *a, *b, *crl;

    rb_check_frozen(self);
    if (self == other) return self;
    GetX509CRL(self, a);
    SafeGetX509CRL(other, b);
    if (!(crl = X509_CRL_dup(b))) {
        ossl_raise(eX509CRLError, NULL);
    }
    X509_CRL_free(a);
    DATA_PTR(self) = crl;

    return self;
}

static VALUE
ossl_x509crl_get_version(VALUE self)
{
    X509_CRL *crl;
    long ver;

    GetX509CRL(self, crl);
    ver = X509_CRL_get_version(crl);

    return LONG2NUM(ver);
}

static VALUE
ossl_x509crl_set_version(VALUE self, VALUE version)
{
    X509_CRL *crl;
    long ver;

    if ((ver = NUM2LONG(version)) < 0) {
        ossl_raise(eX509CRLError, "version must be >= 0!");
    }
    GetX509CRL(self, crl);
    if (!X509_CRL_set_version(crl, ver)) {
        ossl_raise(eX509CRLError, NULL);
    }

    return version;
}

static VALUE
ossl_x509crl_get_signature_algorithm(VALUE self)
{
    X509_CRL *crl;
    BIO *out;
    BUF_MEM *buf;
    VALUE str;

    GetX509CRL(self, crl);
    if (!(out = BIO_new(BIO_s_mem()))) {
        ossl_raise(eX509CRLError, NULL);
    }
    if (!i2a_ASN1_OBJECT(out, crl->sig_alg->algorithm)) {
        BIO_free(out);
        ossl_raise(eX509CRLError, NULL);
    }
    BIO_get_mem_ptr(out, &buf);
    str = rb_str_new(buf->data, buf->length);
    BIO_free(out);
    return str;
}

static VALUE
ossl_x509crl_get_issuer(VALUE self)
{
    X509_CRL *crl;

    GetX509CRL(self, crl);

    return ossl_x509name_new(X509_CRL_get_issuer(crl)); /* NO DUP - don't free */
}

static VALUE
ossl_x509crl_set_issuer(VALUE self, VALUE issuer)
{
    X509_CRL *crl;

    GetX509CRL(self, crl);

    if (!X509_CRL_set_issuer_name(crl, GetX509NamePtr(issuer))) { /* DUPs name */
        ossl_raise(eX509CRLError, NULL);
    }
    return issuer;
}

static VALUE
ossl_x509crl_get_last_update(VALUE self)
{
    X509_CRL *crl;

    GetX509CRL(self, crl);

    return asn1time_to_time(X509_CRL_get_lastUpdate(crl));
}

static VALUE
ossl_x509crl_set_last_update(VALUE self, VALUE time)
{
    X509_CRL *crl;
    time_t sec;

    sec = time_to_time_t(time);
    GetX509CRL(self, crl);
    if (!X509_time_adj(crl->crl->lastUpdate, 0, &sec)) {
        ossl_raise(eX509CRLError, NULL);
    }

    return time;
}

static VALUE
ossl_x509crl_get_next_update(VALUE self)
{
    X509_CRL *crl;

    GetX509CRL(self, crl);

    return asn1time_to_time(X509_CRL_get_nextUpdate(crl));
}

static VALUE
ossl_x509crl_set_next_update(VALUE self, VALUE time)
{
    X509_CRL *crl;
    time_t sec;

    sec = time_to_time_t(time);
    GetX509CRL(self, crl);
    /* This must be some thinko in OpenSSL */
    if (!(crl->crl->nextUpdate = X509_time_adj(crl->crl->nextUpdate, 0, &sec))){
        ossl_raise(eX509CRLError, NULL);
    }

    return time;
}

static VALUE
ossl_x509crl_get_revoked(VALUE self)
{
    X509_CRL *crl;
    int i, num;
    X509_REVOKED *rev;
    VALUE ary, revoked;

    GetX509CRL(self, crl);
    num = sk_X509_CRL_num(X509_CRL_get_REVOKED(crl));
    if (num < 0) {
        OSSL_Debug("num < 0???");
        return rb_ary_new();
    }
    ary = rb_ary_new2(num);
    for(i=0; i<num; i++) {
        /* NO DUP - don't free! */
        rev = (X509_REVOKED *)sk_X509_CRL_value(X509_CRL_get_REVOKED(crl), i);
        revoked = ossl_x509revoked_new(rev);
        rb_ary_push(ary, revoked);
    }

    return ary;
}

static VALUE
ossl_x509crl_set_revoked(VALUE self, VALUE ary)
{
    X509_CRL *crl;
    X509_REVOKED *rev;
    int i;

    Check_Type(ary, T_ARRAY);
    /* All ary members should be X509 Revoked */
    for (i=0; i<RARRAY(ary)->len; i++) {
        OSSL_Check_Kind(RARRAY(ary)->ptr[i], cX509Rev);
    }
    GetX509CRL(self, crl);
    sk_X509_REVOKED_pop_free(crl->crl->revoked, X509_REVOKED_free);
    crl->crl->revoked = NULL;
    for (i=0; i<RARRAY(ary)->len; i++) {
        rev = DupX509RevokedPtr(RARRAY(ary)->ptr[i]);
        if (!X509_CRL_add0_revoked(crl, rev)) { /* NO DUP - don't free! */
            ossl_raise(eX509CRLError, NULL);
        }
    }
    X509_CRL_sort(crl);

    return ary;
}

static VALUE
ossl_x509crl_add_revoked(VALUE self, VALUE revoked)
{
    X509_CRL *crl;
    X509_REVOKED *rev;

    GetX509CRL(self, crl);
    rev = DupX509RevokedPtr(revoked);
    if (!X509_CRL_add0_revoked(crl, rev)) { /* NO DUP - don't free! */
        ossl_raise(eX509CRLError, NULL);
    }
    X509_CRL_sort(crl);

    return revoked;
}

static VALUE
ossl_x509crl_sign(VALUE self, VALUE key, VALUE digest)
{
    X509_CRL *crl;
    EVP_PKEY *pkey;
    const EVP_MD *md;

    GetX509CRL(self, crl);
    pkey = GetPrivPKeyPtr(key); /* NO NEED TO DUP */
    md = GetDigestPtr(digest);
    if (!X509_CRL_sign(crl, pkey, md)) {
        ossl_raise(eX509CRLError, NULL);
    }

    return self;
}

static VALUE
ossl_x509crl_verify(VALUE self, VALUE key)
{
    X509_CRL *crl;
    int ret;

    GetX509CRL(self, crl);
    if ((ret = X509_CRL_verify(crl, GetPKeyPtr(key))) < 0) {
        ossl_raise(eX509CRLError, NULL);
    }
    if (ret == 1) {
        return Qtrue;
    }

    return Qfalse;
}

static VALUE
ossl_x509crl_to_der(VALUE self)
{
    X509_CRL *crl;
    BIO *out;
    BUF_MEM *buf;
    VALUE str;

    GetX509CRL(self, crl);
    if (!(out = BIO_new(BIO_s_mem()))) {
        ossl_raise(eX509CRLError, NULL);
    }
    if (!i2d_X509_CRL_bio(out, crl)) {
        BIO_free(out);
        ossl_raise(eX509CRLError, NULL);
    }
    BIO_get_mem_ptr(out, &buf);
    str = rb_str_new(buf->data, buf->length);
    BIO_free(out);

    return str;
}

static VALUE
ossl_x509crl_to_pem(VALUE self)
{
    X509_CRL *crl;
    BIO *out;
    BUF_MEM *buf;
    VALUE str;

    GetX509CRL(self, crl);
    if (!(out = BIO_new(BIO_s_mem()))) {
        ossl_raise(eX509CRLError, NULL);
    }
    if (!PEM_write_bio_X509_CRL(out, crl)) {
        BIO_free(out);
        ossl_raise(eX509CRLError, NULL);
    }
    BIO_get_mem_ptr(out, &buf);
    str = rb_str_new(buf->data, buf->length);
    BIO_free(out);

    return str;
}

static VALUE
ossl_x509crl_to_text(VALUE self)
{
    X509_CRL *crl;
    BIO *out;
    BUF_MEM *buf;
    VALUE str;

    GetX509CRL(self, crl);
    if (!(out = BIO_new(BIO_s_mem()))) {
        ossl_raise(eX509CRLError, NULL);
    }
    if (!X509_CRL_print(out, crl)) {
        BIO_free(out);
        ossl_raise(eX509CRLError, NULL);
    }
    BIO_get_mem_ptr(out, &buf);
    str = rb_str_new(buf->data, buf->length);
    BIO_free(out);

    return str;
}

/*
 * Gets X509v3 extensions as array of X509Ext objects
 */
static VALUE
ossl_x509crl_get_extensions(VALUE self)
{
    X509_CRL *crl;
    int count, i;
    X509_EXTENSION *ext;
    VALUE ary;

    GetX509CRL(self, crl);
    count = X509_CRL_get_ext_count(crl);
    if (count < 0) {
        OSSL_Debug("count < 0???");
        return rb_ary_new();
    }
    ary = rb_ary_new2(count);
    for (i=0; i<count; i++) {
        ext = X509_CRL_get_ext(crl, i); /* NO DUP - don't free! */
        rb_ary_push(ary, ossl_x509ext_new(ext));
    }

    return ary;
}

/*
 * Sets X509_EXTENSIONs
 */
static VALUE
ossl_x509crl_set_extensions(VALUE self, VALUE ary)
{
    X509_CRL *crl;
    X509_EXTENSION *ext;
    int i;

    Check_Type(ary, T_ARRAY);
    /* All ary members should be X509 Extensions */
    for (i=0; i<RARRAY(ary)->len; i++) {
        OSSL_Check_Kind(RARRAY(ary)->ptr[i], cX509Ext);
    }
    GetX509CRL(self, crl);
    sk_X509_EXTENSION_pop_free(crl->crl->extensions, X509_EXTENSION_free);
    crl->crl->extensions = NULL;
    for (i=0; i<RARRAY(ary)->len; i++) {
        ext = DupX509ExtPtr(RARRAY(ary)->ptr[i]);
        if(!X509_CRL_add_ext(crl, ext, -1)) { /* DUPs ext - FREE it */
            X509_EXTENSION_free(ext);
            ossl_raise(eX509CRLError, NULL);
        }
        X509_EXTENSION_free(ext);
    }

    return ary;
}

static VALUE
ossl_x509crl_add_extension(VALUE self, VALUE extension)
{
    X509_CRL *crl;
    X509_EXTENSION *ext;

    GetX509CRL(self, crl);
    ext = DupX509ExtPtr(extension);
    if (!X509_CRL_add_ext(crl, ext, -1)) { /* DUPs ext - FREE it */
        X509_EXTENSION_free(ext);
        ossl_raise(eX509CRLError, NULL);
    }
    X509_EXTENSION_free(ext);

    return extension;
}

/*
 * INIT
 */
void
Init_ossl_x509crl()
{
    eX509CRLError = rb_define_class_under(mX509, "CRLError", eOSSLError);

    cX509CRL = rb_define_class_under(mX509, "CRL", rb_cObject);

    rb_define_alloc_func(cX509CRL, ossl_x509crl_alloc);
    rb_define_method(cX509CRL, "initialize", ossl_x509crl_initialize, -1);
    rb_define_copy_func(cX509CRL, ossl_x509crl_copy);

    rb_define_method(cX509CRL, "version", ossl_x509crl_get_version, 0);
    rb_define_method(cX509CRL, "version=", ossl_x509crl_set_version, 1);
    rb_define_method(cX509CRL, "signature_algorithm", ossl_x509crl_get_signature_algorithm, 0);
    rb_define_method(cX509CRL, "issuer", ossl_x509crl_get_issuer, 0);
    rb_define_method(cX509CRL, "issuer=", ossl_x509crl_set_issuer, 1);
    rb_define_method(cX509CRL, "last_update", ossl_x509crl_get_last_update, 0);
    rb_define_method(cX509CRL, "last_update=", ossl_x509crl_set_last_update, 1);
    rb_define_method(cX509CRL, "next_update", ossl_x509crl_get_next_update, 0);
    rb_define_method(cX509CRL, "next_update=", ossl_x509crl_set_next_update, 1);
    rb_define_method(cX509CRL, "revoked", ossl_x509crl_get_revoked, 0);
    rb_define_method(cX509CRL, "revoked=", ossl_x509crl_set_revoked, 1);
    rb_define_method(cX509CRL, "add_revoked", ossl_x509crl_add_revoked, 1);
    rb_define_method(cX509CRL, "sign", ossl_x509crl_sign, 2);
    rb_define_method(cX509CRL, "verify", ossl_x509crl_verify, 1);
    rb_define_method(cX509CRL, "to_der", ossl_x509crl_to_der, 0);
    rb_define_method(cX509CRL, "to_pem", ossl_x509crl_to_pem, 0);
    rb_define_alias(cX509CRL, "to_s", "to_pem");
    rb_define_method(cX509CRL, "to_text", ossl_x509crl_to_text, 0);
    rb_define_method(cX509CRL, "extensions", ossl_x509crl_get_extensions, 0);
    rb_define_method(cX509CRL, "extensions=", ossl_x509crl_set_extensions, 1);
    rb_define_method(cX509CRL, "add_extension", ossl_x509crl_add_extension, 1);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl_x509ext.c

root/ext/openssl/ossl_x509ext.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. ossl_x509ext_new
  2. GetX509ExtPtr
  3. DupX509ExtPtr
  4. ossl_x509extfactory_free
  5. ossl_x509extfactory_alloc
  6. ossl_x509extfactory_set_issuer_cert
  7. ossl_x509extfactory_set_subject_cert
  8. ossl_x509extfactory_set_subject_req
  9. ossl_x509extfactory_set_crl
  10. ossl_x509extfactory_set_config
  11. ossl_x509extfactory_initialize
  12. ossl_x509extfactory_create_ext
  13. ossl_x509ext_alloc
  14. ossl_x509ext_initialize
  15. ossl_x509ext_set_oid
  16. ossl_x509ext_set_value
  17. ossl_x509ext_set_critical
  18. ossl_x509ext_get_oid
  19. ossl_x509ext_get_value
  20. ossl_x509ext_get_critical
  21. ossl_x509ext_to_der
  22. Init_ossl_x509ext
/*
 * $Id: ossl_x509ext.c,v 1.11 2005/11/22 22:29:13 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#include "ossl.h"

#define WrapX509Ext(klass, obj, ext) do { \
    if (!ext) { \
        ossl_raise(rb_eRuntimeError, "EXT wasn't initialized!"); \
    } \
    obj = Data_Wrap_Struct(klass, 0, X509_EXTENSION_free, ext); \
} while (0)
#define GetX509Ext(obj, ext) do { \
    Data_Get_Struct(obj, X509_EXTENSION, ext); \
    if (!ext) { \
        ossl_raise(rb_eRuntimeError, "EXT wasn't initialized!"); \
    } \
} while (0)
#define SafeGetX509Ext(obj, ext) do { \
    OSSL_Check_Kind(obj, cX509Ext); \
    GetX509Ext(obj, ext); \
} while (0)
#define MakeX509ExtFactory(klass, obj, ctx) do { \
    if (!(ctx = OPENSSL_malloc(sizeof(X509V3_CTX)))) \
        ossl_raise(rb_eRuntimeError, "CTX wasn't allocated!"); \
    X509V3_set_ctx(ctx, NULL, NULL, NULL, NULL, 0); \
    obj = Data_Wrap_Struct(klass, 0, ossl_x509extfactory_free, ctx); \
} while (0)
#define GetX509ExtFactory(obj, ctx) do { \
    Data_Get_Struct(obj, X509V3_CTX, ctx); \
    if (!ctx) { \
        ossl_raise(rb_eRuntimeError, "CTX wasn't initialized!"); \
    } \
} while (0)

/*
 * Classes
 */
VALUE cX509Ext;
VALUE cX509ExtFactory;
VALUE eX509ExtError;

/*
 * Public
 */
VALUE
ossl_x509ext_new(X509_EXTENSION *ext)
{
    X509_EXTENSION *new;
    VALUE obj;

    if (!ext) {
        new = X509_EXTENSION_new();
    } else {
        new = X509_EXTENSION_dup(ext);
    }
    if (!new) {
        ossl_raise(eX509ExtError, NULL);
    }
    WrapX509Ext(cX509Ext, obj, new);

    return obj;
}

X509_EXTENSION *
GetX509ExtPtr(VALUE obj)
{
    X509_EXTENSION *ext;

    SafeGetX509Ext(obj, ext);

    return ext;
}

X509_EXTENSION *
DupX509ExtPtr(VALUE obj)
{
    X509_EXTENSION *ext, *new;

    SafeGetX509Ext(obj, ext);
    if (!(new = X509_EXTENSION_dup(ext))) {
        ossl_raise(eX509ExtError, NULL);
    }

    return new;
}

/*
 * Private
 */
/*
 * Ext factory
 */
static void
ossl_x509extfactory_free(X509V3_CTX *ctx)
{
    OPENSSL_free(ctx);
}

static VALUE
ossl_x509extfactory_alloc(VALUE klass)
{
    X509V3_CTX *ctx;
    VALUE obj;

    MakeX509ExtFactory(klass, obj, ctx);

    return obj;
}

static VALUE
ossl_x509extfactory_set_issuer_cert(VALUE self, VALUE cert)
{
    X509V3_CTX *ctx;

    GetX509ExtFactory(self, ctx);
    rb_iv_set(self, "@issuer_certificate", cert);
    ctx->issuer_cert = GetX509CertPtr(cert); /* NO DUP NEEDED */

    return cert;
}

static VALUE
ossl_x509extfactory_set_subject_cert(VALUE self, VALUE cert)
{
    X509V3_CTX *ctx;

    GetX509ExtFactory(self, ctx);
    rb_iv_set(self, "@subject_certificate", cert);
    ctx->subject_cert = GetX509CertPtr(cert); /* NO DUP NEEDED */

    return cert;
}

static VALUE
ossl_x509extfactory_set_subject_req(VALUE self, VALUE req)
{
    X509V3_CTX *ctx;

    GetX509ExtFactory(self, ctx);
    rb_iv_set(self, "@subject_request", req);
    ctx->subject_req = GetX509ReqPtr(req); /* NO DUP NEEDED */

    return req;
}

static VALUE
ossl_x509extfactory_set_crl(VALUE self, VALUE crl)
{
    X509V3_CTX *ctx;

    GetX509ExtFactory(self, ctx);
    rb_iv_set(self, "@crl", crl);
    ctx->crl = GetX509CRLPtr(crl); /* NO DUP NEEDED */

    return crl;
}

static VALUE
ossl_x509extfactory_set_config(VALUE self, VALUE config)
{
#ifdef HAVE_X509V3_SET_NCONF
    X509V3_CTX *ctx;
    CONF *conf;

    GetX509ExtFactory(self, ctx);
    rb_iv_set(self, "@config", config);
    conf = GetConfigPtr(config);  /* NO DUP NEEDED */
    X509V3_set_nconf(ctx, conf);

    return config;
#else
    rb_notimplement();
#endif
}

static VALUE
ossl_x509extfactory_initialize(int argc, VALUE *argv, VALUE self)
{
    /*X509V3_CTX *ctx;*/
    VALUE issuer_cert, subject_cert, subject_req, crl;

    /*GetX509ExtFactory(self, ctx);*/

    rb_scan_args(argc, argv, "04",
                 &issuer_cert, &subject_cert, &subject_req, &crl);
    if (!NIL_P(issuer_cert))
        ossl_x509extfactory_set_issuer_cert(self, issuer_cert);
    if (!NIL_P(subject_cert))
        ossl_x509extfactory_set_subject_cert(self, subject_cert);
    if (!NIL_P(subject_req))
        ossl_x509extfactory_set_subject_req(self, subject_req);
    if (!NIL_P(crl))
        ossl_x509extfactory_set_crl(self, crl);

    return self;
}

/*
 * Array to X509_EXTENSION
 * Structure:
 * ["ln", "value", bool_critical] or
 * ["sn", "value", bool_critical] or
 * ["ln", "critical,value"] or the same for sn
 * ["ln", "value"] => not critical
 */
static VALUE
ossl_x509extfactory_create_ext(int argc, VALUE *argv, VALUE self)
{
    X509V3_CTX *ctx;
    X509_EXTENSION *ext;
    VALUE oid, value, critical, valstr, obj;
    int nid;
#ifdef HAVE_X509V3_EXT_NCONF_NID
    VALUE rconf;
    CONF *conf;
#else
    static LHASH *empty_lhash;
#endif

    rb_scan_args(argc, argv, "21", &oid, &value, &critical);
    StringValue(oid);
    StringValue(value);
    if(NIL_P(critical)) critical = Qfalse;

    nid = OBJ_ln2nid(RSTRING(oid)->ptr);
    if(!nid) nid = OBJ_sn2nid(RSTRING(oid)->ptr);
    if(!nid) ossl_raise(eX509ExtError, "unknown OID `%s'", RSTRING(oid)->ptr);
    valstr = rb_str_new2(RTEST(critical) ? "critical," : "");
    rb_str_append(valstr, value);
    GetX509ExtFactory(self, ctx);
#ifdef HAVE_X509V3_EXT_NCONF_NID
    rconf = rb_iv_get(self, "@config");
    conf = NIL_P(rconf) ? NULL : GetConfigPtr(rconf);
    ext = X509V3_EXT_nconf_nid(conf, ctx, nid, RSTRING(valstr)->ptr);
#else
    if (!empty_lhash) empty_lhash = lh_new(NULL, NULL);
    ext = X509V3_EXT_conf_nid(empty_lhash, ctx, nid, RSTRING(valstr)->ptr);
#endif
    if (!ext){
        ossl_raise(eX509ExtError, "%s = %s",
                   RSTRING(oid)->ptr, RSTRING(value)->ptr);
    }
    WrapX509Ext(cX509Ext, obj, ext);

    return obj;
}

/*
 * Ext
 */
static VALUE
ossl_x509ext_alloc(VALUE klass)
{
    X509_EXTENSION *ext;
    VALUE obj;

    if(!(ext = X509_EXTENSION_new())){
        ossl_raise(eX509ExtError, NULL);
    }
    WrapX509Ext(klass, obj, ext);

    return obj;
}

static VALUE
ossl_x509ext_initialize(int argc, VALUE *argv, VALUE self)
{
    VALUE oid, value, critical;
    unsigned char *p;
    X509_EXTENSION *ext;

    GetX509Ext(self, ext);
    if(rb_scan_args(argc, argv, "12", &oid, &value, &critical) == 1){
        oid = ossl_to_der_if_possible(oid);
        StringValue(oid);
        p  = RSTRING(oid)->ptr;
        if(!d2i_X509_EXTENSION((X509_EXTENSION**)&DATA_PTR(self),
                               &p, RSTRING(oid)->len))
            ossl_raise(eX509ExtError, NULL);
        return self;
    }
    rb_funcall(self, rb_intern("oid="), 1, oid);
    rb_funcall(self, rb_intern("value="), 1, value);
    if(argc > 2) rb_funcall(self, rb_intern("critical="), 1, critical);

    return self;
}

static VALUE
ossl_x509ext_set_oid(VALUE self, VALUE oid)
{
    X509_EXTENSION *ext;
    ASN1_OBJECT *obj;
    char *s;

    s = StringValuePtr(oid);
    obj = OBJ_txt2obj(s, 0);
    if(!obj) obj = OBJ_txt2obj(s, 1);
    if(!obj) ossl_raise(eX509ExtError, NULL);
    GetX509Ext(self, ext);
    X509_EXTENSION_set_object(ext, obj);

    return oid;
}

static VALUE
ossl_x509ext_set_value(VALUE self, VALUE data)
{
    X509_EXTENSION *ext;
    ASN1_OCTET_STRING *asn1s;
    char *s;

    data = ossl_to_der_if_possible(data);
    StringValue(data);
    if(!(s = OPENSSL_malloc(RSTRING(data)->len)))
        ossl_raise(eX509ExtError, "malloc error");
    memcpy(s, RSTRING(data)->ptr, RSTRING(data)->len);
    if(!(asn1s = ASN1_OCTET_STRING_new())){
        free(s);
        ossl_raise(eX509ExtError, NULL);
    }
    if(!M_ASN1_OCTET_STRING_set(asn1s, s, RSTRING(data)->len)){
        free(s);
        ASN1_OCTET_STRING_free(asn1s);
        ossl_raise(eX509ExtError, NULL);
    }
    GetX509Ext(self, ext);
    X509_EXTENSION_set_data(ext, asn1s);

    return data;
}

static VALUE
ossl_x509ext_set_critical(VALUE self, VALUE flag)
{
    X509_EXTENSION *ext;

    GetX509Ext(self, ext);
    X509_EXTENSION_set_critical(ext, RTEST(flag) ? 1 : 0);

    return flag;
}

static VALUE
ossl_x509ext_get_oid(VALUE obj)
{
    X509_EXTENSION *ext;
    ASN1_OBJECT *extobj;
    BIO *out;
    VALUE ret;
    int nid;

    GetX509Ext(obj, ext);
    extobj = X509_EXTENSION_get_object(ext);
    if ((nid = OBJ_obj2nid(extobj)) != NID_undef)
        ret = rb_str_new2(OBJ_nid2sn(nid));
    else{
        if (!(out = BIO_new(BIO_s_mem())))
            ossl_raise(eX509ExtError, NULL);
        i2a_ASN1_OBJECT(out, extobj);
        ret = ossl_membio2str(out);
    }

    return ret;
}

static VALUE
ossl_x509ext_get_value(VALUE obj)
{
    X509_EXTENSION *ext;
    BIO *out;
    VALUE ret;

    GetX509Ext(obj, ext);
    if (!(out = BIO_new(BIO_s_mem())))
        ossl_raise(eX509ExtError, NULL);
    if (!X509V3_EXT_print(out, ext, 0, 0))
        M_ASN1_OCTET_STRING_print(out, ext->value);
    ret = ossl_membio2str(out);

    return ret;
}

static VALUE
ossl_x509ext_get_critical(VALUE obj)
{
    X509_EXTENSION *ext;

    GetX509Ext(obj, ext);
    return X509_EXTENSION_get_critical(ext) ? Qtrue : Qfalse;
}

static VALUE
ossl_x509ext_to_der(VALUE obj)
{
    X509_EXTENSION *ext;
    unsigned char *p;
    long len;
    VALUE str;

    GetX509Ext(obj, ext);
    if((len = i2d_X509_EXTENSION(ext, NULL)) <= 0)
        ossl_raise(eX509ExtError, NULL);
    str = rb_str_new(0, len);
    p = RSTRING(str)->ptr;
    if(i2d_X509_EXTENSION(ext, &p) < 0)
        ossl_raise(eX509ExtError, NULL);
    ossl_str_adjust(str, p);

    return str;
}

/*
 * INIT
 */
void
Init_ossl_x509ext()
{
    eX509ExtError = rb_define_class_under(mX509, "ExtensionError", eOSSLError);

    cX509ExtFactory = rb_define_class_under(mX509, "ExtensionFactory", rb_cObject);

    rb_define_alloc_func(cX509ExtFactory, ossl_x509extfactory_alloc);
    rb_define_method(cX509ExtFactory, "initialize", ossl_x509extfactory_initialize, -1);

    rb_attr(cX509ExtFactory, rb_intern("issuer_certificate"), 1, 0, Qfalse);
    rb_attr(cX509ExtFactory, rb_intern("subject_certificate"), 1, 0, Qfalse);
    rb_attr(cX509ExtFactory, rb_intern("subject_request"), 1, 0, Qfalse);
    rb_attr(cX509ExtFactory, rb_intern("crl"), 1, 0, Qfalse);
    rb_attr(cX509ExtFactory, rb_intern("config"), 1, 0, Qfalse);

    rb_define_method(cX509ExtFactory, "issuer_certificate=", ossl_x509extfactory_set_issuer_cert, 1);
    rb_define_method(cX509ExtFactory, "subject_certificate=", ossl_x509extfactory_set_subject_cert, 1);
    rb_define_method(cX509ExtFactory, "subject_request=", ossl_x509extfactory_set_subject_req, 1);
    rb_define_method(cX509ExtFactory, "crl=", ossl_x509extfactory_set_crl, 1);
    rb_define_method(cX509ExtFactory, "config=", ossl_x509extfactory_set_config, 1);
    rb_define_method(cX509ExtFactory, "create_ext", ossl_x509extfactory_create_ext, -1);

    cX509Ext = rb_define_class_under(mX509, "Extension", rb_cObject);
    rb_define_alloc_func(cX509Ext, ossl_x509ext_alloc);
    rb_define_method(cX509Ext, "initialize", ossl_x509ext_initialize, -1);
    rb_define_method(cX509Ext, "oid=", ossl_x509ext_set_oid, 1);
    rb_define_method(cX509Ext, "value=", ossl_x509ext_set_value, 1);
    rb_define_method(cX509Ext, "critical=", ossl_x509ext_set_critical, 1);
    rb_define_method(cX509Ext, "oid", ossl_x509ext_get_oid, 0);
    rb_define_method(cX509Ext, "value", ossl_x509ext_get_value, 0);
    rb_define_method(cX509Ext, "critical?", ossl_x509ext_get_critical, 0);
    rb_define_method(cX509Ext, "to_der", ossl_x509ext_to_der, 0);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl_x509name.c

root/ext/openssl/ossl_x509name.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. ossl_x509name_new
  2. GetX509NamePtr
  3. ossl_x509name_alloc
  4. ossl_x509name_init_i
  5. ossl_x509name_initialize
  6. ossl_x509name_add_entry
  7. ossl_x509name_to_s_old
  8. ossl_x509name_to_s
  9. ossl_x509name_to_a
  10. ossl_x509name_cmp0
  11. ossl_x509name_cmp
  12. ossl_x509name_eql
  13. ossl_x509name_hash
  14. ossl_x509name_to_der
  15. Init_ossl_x509name
/*
 * $Id: ossl_x509name.c,v 1.12 2004/12/27 07:54:58 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001 Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#include "ossl.h"

#define WrapX509Name(klass, obj, name) do { \
    if (!name) { \
        ossl_raise(rb_eRuntimeError, "Name wasn't initialized."); \
    } \
    obj = Data_Wrap_Struct(klass, 0, X509_NAME_free, name); \
} while (0)
#define GetX509Name(obj, name) do { \
    Data_Get_Struct(obj, X509_NAME, name); \
    if (!name) { \
        ossl_raise(rb_eRuntimeError, "Name wasn't initialized."); \
    } \
} while (0)
#define SafeGetX509Name(obj, name) do { \
    OSSL_Check_Kind(obj, cX509Name); \
    GetX509Name(obj, name); \
} while (0)

#define OBJECT_TYPE_TEMPLATE \
  rb_const_get(cX509Name, rb_intern("OBJECT_TYPE_TEMPLATE"))
#define DEFAULT_OBJECT_TYPE \
  rb_const_get(cX509Name, rb_intern("DEFAULT_OBJECT_TYPE"))

/*
 * Classes
 */
VALUE cX509Name;
VALUE eX509NameError;

/*
 * Public
 */
VALUE
ossl_x509name_new(X509_NAME *name)
{
    X509_NAME *new;
    VALUE obj;

    if (!name) {
        new = X509_NAME_new();
    } else {
        new = X509_NAME_dup(name);
    }
    if (!new) {
        ossl_raise(eX509NameError, NULL);
    }
    WrapX509Name(cX509Name, obj, new);

    return obj;
}

X509_NAME *
GetX509NamePtr(VALUE obj)
{
    X509_NAME *name;

    SafeGetX509Name(obj, name);

    return name;
}

/*
 * Private
 */
static VALUE
ossl_x509name_alloc(VALUE klass)
{
    X509_NAME *name;
    VALUE obj;

    if (!(name = X509_NAME_new())) {
        ossl_raise(eX509NameError, NULL);
    }
    WrapX509Name(klass, obj, name);

    return obj;
}

static int id_aref;
static VALUE ossl_x509name_add_entry(int, VALUE*, VALUE);
#define rb_aref(obj, key) rb_funcall(obj, id_aref, 1, key)

static VALUE
ossl_x509name_init_i(VALUE i, VALUE args)
{
    VALUE self = rb_ary_entry(args, 0);
    VALUE template = rb_ary_entry(args, 1);
    VALUE entry[3];

    Check_Type(i, T_ARRAY);
    entry[0] = rb_ary_entry(i, 0);
    entry[1] = rb_ary_entry(i, 1);
    entry[2] = rb_ary_entry(i, 2);
    if(NIL_P(entry[2])) entry[2] = rb_aref(template, entry[0]);
    if(NIL_P(entry[2])) entry[2] = DEFAULT_OBJECT_TYPE;
    ossl_x509name_add_entry(3, entry, self);

    return Qnil;
}

static VALUE
ossl_x509name_initialize(int argc, VALUE *argv, VALUE self)
{
    X509_NAME *name;
    VALUE arg, template;

    GetX509Name(self, name);
    if (rb_scan_args(argc, argv, "02", &arg, &template) == 0) {
        return self;
    }
    else {
        VALUE tmp = rb_check_array_type(arg);
        if (!NIL_P(tmp)) {
            VALUE args;
            if(NIL_P(template)) template = OBJECT_TYPE_TEMPLATE;
            args = rb_ary_new3(2, self, template);
            rb_iterate(rb_each, tmp, ossl_x509name_init_i, args);
        }
        else{
            unsigned char *p;
            VALUE str = ossl_to_der_if_possible(arg);
            StringValue(str);
            p = RSTRING(str)->ptr;
            if(!d2i_X509_NAME((X509_NAME**)&DATA_PTR(self), &p, RSTRING(str)->len)){
                ossl_raise(eX509NameError, NULL);
            }
        }
    }

    return self;
}

static
VALUE ossl_x509name_add_entry(int argc, VALUE *argv, VALUE self)
{
    X509_NAME *name;
    VALUE oid, value, type;

    rb_scan_args(argc, argv, "21", &oid, &value, &type);
    StringValue(oid);
    StringValue(value);
    if(NIL_P(type)) type = rb_aref(OBJECT_TYPE_TEMPLATE, oid);
    GetX509Name(self, name);
    if (!X509_NAME_add_entry_by_txt(name, RSTRING(oid)->ptr, NUM2INT(type),
                RSTRING(value)->ptr, RSTRING(value)->len, -1, 0)) {
        ossl_raise(eX509NameError, NULL);
    }

    return self;
}

static VALUE
ossl_x509name_to_s_old(VALUE self)
{
    X509_NAME *name;
    char *buf;
    VALUE str;

    GetX509Name(self, name);
    buf = X509_NAME_oneline(name, NULL, 0);
    str = rb_str_new2(buf);
    OPENSSL_free(buf);

    return str;
}

static VALUE
ossl_x509name_to_s(int argc, VALUE *argv, VALUE self)
{
    X509_NAME *name;
    VALUE flag, str;
    BIO *out;
    unsigned long iflag;

    rb_scan_args(argc, argv, "01", &flag);
    if (NIL_P(flag))
        return ossl_x509name_to_s_old(self);
    else iflag = NUM2ULONG(flag);
    if (!(out = BIO_new(BIO_s_mem())))
        rb_raise(eX509NameError, NULL);
    GetX509Name(self, name);
    if (!X509_NAME_print_ex(out, name, 0, iflag)){
        BIO_free(out);
        rb_raise(eX509NameError, NULL);
    }
    str = ossl_membio2str(out);

    return str;
}

static VALUE
ossl_x509name_to_a(VALUE self)
{
    X509_NAME *name;
    X509_NAME_ENTRY *entry;
    int i,entries;
    char long_name[512];
    const char *short_name;
    VALUE ary, ret;

    GetX509Name(self, name);
    entries = X509_NAME_entry_count(name);
    if (entries < 0) {
        OSSL_Debug("name entries < 0!");
        return rb_ary_new();
    }
    ret = rb_ary_new2(entries);
    for (i=0; i<entries; i++) {
        if (!(entry = X509_NAME_get_entry(name, i))) {
            ossl_raise(eX509NameError, NULL);
        }
        if (!i2t_ASN1_OBJECT(long_name, sizeof(long_name), entry->object)) {
            ossl_raise(eX509NameError, NULL);
        }
        short_name = OBJ_nid2sn(OBJ_ln2nid(long_name));
        ary = rb_ary_new3(3, rb_str_new2(short_name),
                          rb_str_new(entry->value->data, entry->value->length),
                          INT2FIX(entry->value->type));
        rb_ary_push(ret, ary);
    }
    return ret;
}

static int
ossl_x509name_cmp0(VALUE self, VALUE other)
{
    X509_NAME *name1, *name2;

    GetX509Name(self, name1);
    SafeGetX509Name(other, name2);

    return X509_NAME_cmp(name1, name2);
}

static VALUE
ossl_x509name_cmp(VALUE self, VALUE other)
{
    int result;

    result = ossl_x509name_cmp0(self, other);
    if (result < 0) return INT2FIX(-1);
    if (result > 1) return INT2FIX(1);

    return INT2FIX(0);
}

static VALUE
ossl_x509name_eql(VALUE self, VALUE other)
{
    int result;

    if(CLASS_OF(other) != cX509Name) return Qfalse;
    result = ossl_x509name_cmp0(self, other);

    return (result == 0) ? Qtrue : Qfalse;
}

static VALUE
ossl_x509name_hash(VALUE self)
{
    X509_NAME *name;
    unsigned long hash;

    GetX509Name(self, name);

    hash = X509_NAME_hash(name);

    return ULONG2NUM(hash);
}

static VALUE
ossl_x509name_to_der(VALUE self)
{
    X509_NAME *name;
    VALUE str;
    long len;
    unsigned char *p;

    GetX509Name(self, name);
    if((len = i2d_X509_NAME(name, NULL)) <= 0)
        ossl_raise(eX509NameError, NULL);
    str = rb_str_new(0, len);
    p = RSTRING(str)->ptr;
    if(i2d_X509_NAME(name, &p) <= 0)
        ossl_raise(eX509NameError, NULL);
    ossl_str_adjust(str, p);

    return str;
}

/*
 * INIT
 */
void
Init_ossl_x509name()
{
    VALUE utf8str, ptrstr, ia5str, hash;

    id_aref = rb_intern("[]");
    eX509NameError = rb_define_class_under(mX509, "NameError", eOSSLError);
    cX509Name = rb_define_class_under(mX509, "Name", rb_cObject);

    rb_define_alloc_func(cX509Name, ossl_x509name_alloc);
    rb_define_method(cX509Name, "initialize", ossl_x509name_initialize, -1);
    rb_define_method(cX509Name, "add_entry", ossl_x509name_add_entry, -1);
    rb_define_method(cX509Name, "to_s", ossl_x509name_to_s, -1);
    rb_define_method(cX509Name, "to_a", ossl_x509name_to_a, 0);
    rb_define_method(cX509Name, "cmp", ossl_x509name_cmp, 1);
    rb_define_alias(cX509Name, "<=>", "cmp");
    rb_define_method(cX509Name, "eql?", ossl_x509name_eql, 1);
    rb_define_method(cX509Name, "hash", ossl_x509name_hash, 0);
    rb_define_method(cX509Name, "to_der", ossl_x509name_to_der, 0);

    utf8str = INT2NUM(V_ASN1_UTF8STRING);
    ptrstr = INT2NUM(V_ASN1_PRINTABLESTRING);
    ia5str = INT2NUM(V_ASN1_IA5STRING);
    rb_define_const(cX509Name, "DEFAULT_OBJECT_TYPE", utf8str);
    hash = rb_hash_new();
    RHASH(hash)->ifnone = utf8str;
    rb_hash_aset(hash, rb_str_new2("C"), ptrstr);
    rb_hash_aset(hash, rb_str_new2("countryName"), ptrstr);
    rb_hash_aset(hash, rb_str_new2("serialNumber"), ptrstr);
    rb_hash_aset(hash, rb_str_new2("dnQualifier"), ptrstr);
    rb_hash_aset(hash, rb_str_new2("DC"), ia5str);
    rb_hash_aset(hash, rb_str_new2("domainComponent"), ia5str);
    rb_hash_aset(hash, rb_str_new2("emailAddress"), ia5str);
    rb_define_const(cX509Name, "OBJECT_TYPE_TEMPLATE", hash);

    rb_define_const(cX509Name, "COMPAT", ULONG2NUM(XN_FLAG_COMPAT));
    rb_define_const(cX509Name, "RFC2253", ULONG2NUM(XN_FLAG_RFC2253));
    rb_define_const(cX509Name, "ONELINE", ULONG2NUM(XN_FLAG_ONELINE));
    rb_define_const(cX509Name, "MULTILINE", ULONG2NUM(XN_FLAG_MULTILINE));
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl_x509req.c

root/ext/openssl/ossl_x509req.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. ossl_x509req_new
  2. GetX509ReqPtr
  3. DupX509ReqPtr
  4. ossl_x509req_alloc
  5. ossl_x509req_initialize
  6. ossl_x509req_copy
  7. ossl_x509req_to_pem
  8. ossl_x509req_to_der
  9. ossl_x509req_to_text
  10. ossl_x509req_to_x509
  11. ossl_x509req_get_version
  12. ossl_x509req_set_version
  13. ossl_x509req_get_subject
  14. ossl_x509req_set_subject
  15. ossl_x509req_get_signature_algorithm
  16. ossl_x509req_get_public_key
  17. ossl_x509req_set_public_key
  18. ossl_x509req_sign
  19. ossl_x509req_verify
  20. ossl_x509req_get_attributes
  21. ossl_x509req_set_attributes
  22. ossl_x509req_add_attribute
  23. Init_ossl_x509req
/*
 * $Id: ossl_x509req.c,v 1.7 2005/08/22 20:47:53 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#include "ossl.h"

#define WrapX509Req(klass, obj, req) do { \
    if (!req) { \
        ossl_raise(rb_eRuntimeError, "Req wasn't initialized!"); \
    } \
    obj = Data_Wrap_Struct(klass, 0, X509_REQ_free, req); \
} while (0)
#define GetX509Req(obj, req) do { \
    Data_Get_Struct(obj, X509_REQ, req); \
    if (!req) { \
        ossl_raise(rb_eRuntimeError, "Req wasn't initialized!"); \
    } \
} while (0)
#define SafeGetX509Req(obj, req) do { \
    OSSL_Check_Kind(obj, cX509Req); \
    GetX509Req(obj, req); \
} while (0)

/*
 * Classes
 */
VALUE cX509Req;
VALUE eX509ReqError;

/*
 * Public functions
 */
VALUE
ossl_x509req_new(X509_REQ *req)
{
    X509_REQ *new;
    VALUE obj;

    if (!req) {
        new = X509_REQ_new();
    } else {
        new = X509_REQ_dup(req);
    }
    if (!new) {
        ossl_raise(eX509ReqError, NULL);
    }
    WrapX509Req(cX509Req, obj, new);

    return obj;
}

X509_REQ *
GetX509ReqPtr(VALUE obj)
{
    X509_REQ *req;

    SafeGetX509Req(obj, req);

    return req;
}

X509_REQ *
DupX509ReqPtr(VALUE obj)
{
    X509_REQ *req, *new;

    SafeGetX509Req(obj, req);
    if (!(new = X509_REQ_dup(req))) {
        ossl_raise(eX509ReqError, NULL);
    }

    return new;
}

/*
 * Private functions
 */
static VALUE
ossl_x509req_alloc(VALUE klass)
{
    X509_REQ *req;
    VALUE obj;

    if (!(req = X509_REQ_new())) {
        ossl_raise(eX509ReqError, NULL);
    }
    WrapX509Req(klass, obj, req);

    return obj;
}

static VALUE
ossl_x509req_initialize(int argc, VALUE *argv, VALUE self)
{
    BIO *in;
    X509_REQ *req;
    VALUE arg;

    if (rb_scan_args(argc, argv, "01", &arg) == 0) {
        return self;
    }
    arg = ossl_to_der_if_possible(arg);
    in = ossl_obj2bio(arg);
    req = PEM_read_bio_X509_REQ(in, (X509_REQ **)&DATA_PTR(self), NULL, NULL);
    if (!req) {
        BIO_reset(in);
        req = d2i_X509_REQ_bio(in, (X509_REQ **)&DATA_PTR(self));
    }
    BIO_free(in);
    if (!req) ossl_raise(eX509ReqError, NULL);

    return self;
}

static VALUE
ossl_x509req_copy(VALUE self, VALUE other)
{
    X509_REQ *a, *b, *req;

    rb_check_frozen(self);
    if (self == other) return self;
    GetX509Req(self, a);
    SafeGetX509Req(other, b);
    if (!(req = X509_REQ_dup(b))) {
        ossl_raise(eX509ReqError, NULL);
    }
    X509_REQ_free(a);
    DATA_PTR(self) = req;

    return self;
}

static VALUE
ossl_x509req_to_pem(VALUE self)
{
    X509_REQ *req;
    BIO *out;
    BUF_MEM *buf;
    VALUE str;

    GetX509Req(self, req);
    if (!(out = BIO_new(BIO_s_mem()))) {
        ossl_raise(eX509ReqError, NULL);
    }
    if (!PEM_write_bio_X509_REQ(out, req)) {
        BIO_free(out);
        ossl_raise(eX509ReqError, NULL);
    }
    BIO_get_mem_ptr(out, &buf);
    str = rb_str_new(buf->data, buf->length);
    BIO_free(out);

    return str;
}

static VALUE
ossl_x509req_to_der(VALUE self)
{
    X509_REQ *req;
    VALUE str;
    long len;
    unsigned char *p;

    GetX509Req(self, req);
    if ((len = i2d_X509_REQ(req, NULL)) <= 0)
        ossl_raise(eX509CertError, NULL);
    str = rb_str_new(0, len);
    p = RSTRING(str)->ptr;
    if (i2d_X509_REQ(req, &p) <= 0)
        ossl_raise(eX509ReqError, NULL);
    ossl_str_adjust(str, p);

    return str;
}

static VALUE
ossl_x509req_to_text(VALUE self)
{
    X509_REQ *req;
    BIO *out;
    BUF_MEM *buf;
    VALUE str;

    GetX509Req(self, req);
    if (!(out = BIO_new(BIO_s_mem()))) {
        ossl_raise(eX509ReqError, NULL);
    }
    if (!X509_REQ_print(out, req)) {
        BIO_free(out);
        ossl_raise(eX509ReqError, NULL);
    }
    BIO_get_mem_ptr(out, &buf);
    str = rb_str_new(buf->data, buf->length);
    BIO_free(out);

    return str;
}

#if 0
/*
 * Makes X509 from X509_REQuest
 */
static VALUE
ossl_x509req_to_x509(VALUE self, VALUE days, VALUE key)
{
    X509_REQ *req;
    X509 *x509;

    GetX509Req(self, req);
    ...
    if (!(x509 = X509_REQ_to_X509(req, d, pkey))) {
        ossl_raise(eX509ReqError, NULL);
    }

    return ossl_x509_new(x509);
}
#endif

static VALUE
ossl_x509req_get_version(VALUE self)
{
    X509_REQ *req;
    long version;

    GetX509Req(self, req);
    version = X509_REQ_get_version(req);

    return LONG2FIX(version);
}

static VALUE
ossl_x509req_set_version(VALUE self, VALUE version)
{
    X509_REQ *req;
    long ver;

    if ((ver = FIX2LONG(version)) < 0) {
        ossl_raise(eX509ReqError, "version must be >= 0!");
    }
    GetX509Req(self, req);
    if (!X509_REQ_set_version(req, ver)) {
        ossl_raise(eX509ReqError, NULL);
    }

    return version;
}

static VALUE
ossl_x509req_get_subject(VALUE self)
{
    X509_REQ *req;
    X509_NAME *name;

    GetX509Req(self, req);
    if (!(name = X509_REQ_get_subject_name(req))) { /* NO DUP - don't free */
        ossl_raise(eX509ReqError, NULL);
    }

    return ossl_x509name_new(name);
}

static VALUE
ossl_x509req_set_subject(VALUE self, VALUE subject)
{
    X509_REQ *req;

    GetX509Req(self, req);
    /* DUPs name */
    if (!X509_REQ_set_subject_name(req, GetX509NamePtr(subject))) {
        ossl_raise(eX509ReqError, NULL);
    }

    return subject;
}

static VALUE
ossl_x509req_get_signature_algorithm(VALUE self)
{
    X509_REQ *req;
    BIO *out;
    BUF_MEM *buf;
    VALUE str;

    GetX509Req(self, req);

    if (!(out = BIO_new(BIO_s_mem()))) {
        ossl_raise(eX509ReqError, NULL);
    }
    if (!i2a_ASN1_OBJECT(out, req->sig_alg->algorithm)) {
        BIO_free(out);
        ossl_raise(eX509ReqError, NULL);
    }
    BIO_get_mem_ptr(out, &buf);
    str = rb_str_new(buf->data, buf->length);
    BIO_free(out);
    return str;
}

static VALUE
ossl_x509req_get_public_key(VALUE self)
{
    X509_REQ *req;
    EVP_PKEY *pkey;

    GetX509Req(self, req);
    if (!(pkey = X509_REQ_get_pubkey(req))) { /* adds reference */
        ossl_raise(eX509ReqError, NULL);
    }

    return ossl_pkey_new(pkey); /* NO DUP - OK */
}

static VALUE
ossl_x509req_set_public_key(VALUE self, VALUE key)
{
    X509_REQ *req;
    EVP_PKEY *pkey;

    GetX509Req(self, req);
    pkey = GetPKeyPtr(key); /* NO NEED TO DUP */
    if (!X509_REQ_set_pubkey(req, pkey)) {
        ossl_raise(eX509ReqError, NULL);
    }

    return key;
}

static VALUE
ossl_x509req_sign(VALUE self, VALUE key, VALUE digest)
{
    X509_REQ *req;
    EVP_PKEY *pkey;
    const EVP_MD *md;

    GetX509Req(self, req);
    pkey = GetPrivPKeyPtr(key); /* NO NEED TO DUP */
    md = GetDigestPtr(digest);
    if (!X509_REQ_sign(req, pkey, md)) {
        ossl_raise(eX509ReqError, NULL);
    }

    return self;
}

/*
 * Checks that cert signature is made with PRIVversion of this PUBLIC 'key'
 */
static VALUE
ossl_x509req_verify(VALUE self, VALUE key)
{
    X509_REQ *req;
    EVP_PKEY *pkey;
    int i;

    GetX509Req(self, req);
    pkey = GetPKeyPtr(key); /* NO NEED TO DUP */
    if ((i = X509_REQ_verify(req, pkey)) < 0) {
        ossl_raise(eX509ReqError, NULL);
    }
    if (i > 0) {
        return Qtrue;
    }

    return Qfalse;
}

static VALUE
ossl_x509req_get_attributes(VALUE self)
{
    X509_REQ *req;
    int count, i;
    X509_ATTRIBUTE *attr;
    VALUE ary;

    GetX509Req(self, req);

    count = X509_REQ_get_attr_count(req);
    if (count < 0) {
        OSSL_Debug("count < 0???");
        return rb_ary_new();
    }
    ary = rb_ary_new2(count);
    for (i=0; i<count; i++) {
        attr = X509_REQ_get_attr(req, i);
        rb_ary_push(ary, ossl_x509attr_new(attr));
    }

    return ary;
}

static VALUE
ossl_x509req_set_attributes(VALUE self, VALUE ary)
{
    X509_REQ *req;
    X509_ATTRIBUTE *attr;
    int i;
    VALUE item;

    Check_Type(ary, T_ARRAY);
    for (i=0;i<RARRAY(ary)->len; i++) {
        OSSL_Check_Kind(RARRAY(ary)->ptr[i], cX509Attr);
    }
    GetX509Req(self, req);
    sk_X509_ATTRIBUTE_pop_free(req->req_info->attributes, X509_ATTRIBUTE_free);
    req->req_info->attributes = NULL;
    for (i=0;i<RARRAY(ary)->len; i++) {
        item = RARRAY(ary)->ptr[i];
        attr = DupX509AttrPtr(item);
        if (!X509_REQ_add1_attr(req, attr)) {
            ossl_raise(eX509ReqError, NULL);
        }
    }
    return ary;
}

static VALUE
ossl_x509req_add_attribute(VALUE self, VALUE attr)
{
    X509_REQ *req;

    GetX509Req(self, req);
    if (!X509_REQ_add1_attr(req, DupX509AttrPtr(attr))) {
        ossl_raise(eX509ReqError, NULL);
    }

    return attr;
}

/*
 * X509_REQUEST init
 */
void
Init_ossl_x509req()
{
    eX509ReqError = rb_define_class_under(mX509, "RequestError", eOSSLError);

    cX509Req = rb_define_class_under(mX509, "Request", rb_cObject);

    rb_define_alloc_func(cX509Req, ossl_x509req_alloc);
    rb_define_method(cX509Req, "initialize", ossl_x509req_initialize, -1);
    rb_define_copy_func(cX509Req, ossl_x509req_copy);

    rb_define_method(cX509Req, "to_pem", ossl_x509req_to_pem, 0);
    rb_define_method(cX509Req, "to_der", ossl_x509req_to_der, 0);
    rb_define_alias(cX509Req, "to_s", "to_pem");
    rb_define_method(cX509Req, "to_text", ossl_x509req_to_text, 0);
    rb_define_method(cX509Req, "version", ossl_x509req_get_version, 0);
    rb_define_method(cX509Req, "version=", ossl_x509req_set_version, 1);
    rb_define_method(cX509Req, "subject", ossl_x509req_get_subject, 0);
    rb_define_method(cX509Req, "subject=", ossl_x509req_set_subject, 1);
    rb_define_method(cX509Req, "signature_algorithm", ossl_x509req_get_signature_algorithm, 0);
    rb_define_method(cX509Req, "public_key", ossl_x509req_get_public_key, 0);
    rb_define_method(cX509Req, "public_key=", ossl_x509req_set_public_key, 1);
    rb_define_method(cX509Req, "sign", ossl_x509req_sign, 2);
    rb_define_method(cX509Req, "verify", ossl_x509req_verify, 1);
    rb_define_method(cX509Req, "attributes", ossl_x509req_get_attributes, 0);
    rb_define_method(cX509Req, "attributes=", ossl_x509req_set_attributes, 1);
    rb_define_method(cX509Req, "add_attribute", ossl_x509req_add_attribute, 1);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl_x509revoked.c

root/ext/openssl/ossl_x509revoked.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. ossl_x509revoked_new
  2. DupX509RevokedPtr
  3. ossl_x509revoked_alloc
  4. ossl_x509revoked_initialize
  5. ossl_x509revoked_get_serial
  6. ossl_x509revoked_set_serial
  7. ossl_x509revoked_get_time
  8. ossl_x509revoked_set_time
  9. ossl_x509revoked_get_extensions
  10. ossl_x509revoked_set_extensions
  11. ossl_x509revoked_add_extension
  12. Init_ossl_x509revoked
/*
 * $Id: ossl_x509revoked.c,v 1.3 2004/12/15 06:35:53 matz Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#include "ossl.h"

#define WrapX509Rev(klass, obj, rev) do { \
    if (!rev) { \
        ossl_raise(rb_eRuntimeError, "REV wasn't initialized!"); \
    } \
    obj = Data_Wrap_Struct(klass, 0, X509_REVOKED_free, rev); \
} while (0)
#define GetX509Rev(obj, rev) do { \
    Data_Get_Struct(obj, X509_REVOKED, rev); \
    if (!rev) { \
        ossl_raise(rb_eRuntimeError, "REV wasn't initialized!"); \
    } \
} while (0)
#define SafeGetX509Rev(obj, rev) do { \
    OSSL_Check_Kind(obj, cX509Rev); \
    GetX509Rev(obj, rev); \
} while (0)

/*
 * Classes
 */
VALUE cX509Rev;
VALUE eX509RevError;

/*
 * PUBLIC
 */
VALUE
ossl_x509revoked_new(X509_REVOKED *rev)
{
    X509_REVOKED *new;
    VALUE obj;

    if (!rev) {
        new = X509_REVOKED_new();
    } else {
        new = X509_REVOKED_dup(rev);
    }
    if (!new) {
        ossl_raise(eX509RevError, NULL);
    }
    WrapX509Rev(cX509Rev, obj, new);

    return obj;
}

X509_REVOKED *
DupX509RevokedPtr(VALUE obj)
{
    X509_REVOKED *rev, *new;

    SafeGetX509Rev(obj, rev);
    if (!(new = X509_REVOKED_dup(rev))) {
        ossl_raise(eX509RevError, NULL);
    }

    return new;
}

/*
 * PRIVATE
 */
static VALUE
ossl_x509revoked_alloc(VALUE klass)
{
    X509_REVOKED *rev;
    VALUE obj;

    if (!(rev = X509_REVOKED_new())) {
        ossl_raise(eX509RevError, NULL);
    }
    WrapX509Rev(klass, obj, rev);

    return obj;
}

static VALUE
ossl_x509revoked_initialize(int argc, VALUE *argv, VALUE self)
{
    /* EMPTY */
    return self;
}

static VALUE
ossl_x509revoked_get_serial(VALUE self)
{
    X509_REVOKED *rev;

    GetX509Rev(self, rev);

    return asn1integer_to_num(rev->serialNumber);
}

static VALUE
ossl_x509revoked_set_serial(VALUE self, VALUE num)
{
    X509_REVOKED *rev;

    GetX509Rev(self, rev);
    rev->serialNumber = num_to_asn1integer(num, rev->serialNumber);

    return num;
}

static VALUE
ossl_x509revoked_get_time(VALUE self)
{
    X509_REVOKED *rev;

    GetX509Rev(self, rev);

    return asn1time_to_time(rev->revocationDate);
}

static VALUE
ossl_x509revoked_set_time(VALUE self, VALUE time)
{
    X509_REVOKED *rev;
    time_t sec;

    sec = time_to_time_t(time);
    GetX509Rev(self, rev);
    if (!X509_time_adj(rev->revocationDate, 0, &sec)) {
        ossl_raise(eX509RevError, NULL);
    }

    return time;
}
/*
 * Gets X509v3 extensions as array of X509Ext objects
 */
static VALUE
ossl_x509revoked_get_extensions(VALUE self)
{
    X509_REVOKED *rev;
    int count, i;
    X509_EXTENSION *ext;
    VALUE ary;

    GetX509Rev(self, rev);
    count = X509_REVOKED_get_ext_count(rev);
    if (count < 0) {
        OSSL_Debug("count < 0???");
        return rb_ary_new();
    }
    ary = rb_ary_new2(count);
    for (i=0; i<count; i++) {
        ext = X509_REVOKED_get_ext(rev, i);
        rb_ary_push(ary, ossl_x509ext_new(ext));
    }

    return ary;
}

/*
 * Sets X509_EXTENSIONs
 */
static VALUE
ossl_x509revoked_set_extensions(VALUE self, VALUE ary)
{
    X509_REVOKED *rev;
    X509_EXTENSION *ext;
    int i;
    VALUE item;

    Check_Type(ary, T_ARRAY);
    for (i=0; i<RARRAY(ary)->len; i++) {
        OSSL_Check_Kind(RARRAY(ary)->ptr[i], cX509Ext);
    }
    GetX509Rev(self, rev);
    sk_X509_EXTENSION_pop_free(rev->extensions, X509_EXTENSION_free);
    rev->extensions = NULL;
    for (i=0; i<RARRAY(ary)->len; i++) {
        item = RARRAY(ary)->ptr[i];
        ext = DupX509ExtPtr(item);
        if(!X509_REVOKED_add_ext(rev, ext, -1)) {
            ossl_raise(eX509RevError, NULL);
        }
    }

    return ary;
}

static VALUE
ossl_x509revoked_add_extension(VALUE self, VALUE ext)
{
    X509_REVOKED *rev;

    GetX509Rev(self, rev);
    if(!X509_REVOKED_add_ext(rev, DupX509ExtPtr(ext), -1)) {
        ossl_raise(eX509RevError, NULL);
    }

    return ext;
}

/*
 * INIT
 */
void
Init_ossl_x509revoked()
{
    eX509RevError = rb_define_class_under(mX509, "RevokedError", eOSSLError);

    cX509Rev = rb_define_class_under(mX509, "Revoked", rb_cObject);

    rb_define_alloc_func(cX509Rev, ossl_x509revoked_alloc);
    rb_define_method(cX509Rev, "initialize", ossl_x509revoked_initialize, -1);

    rb_define_method(cX509Rev, "serial", ossl_x509revoked_get_serial, 0);
    rb_define_method(cX509Rev, "serial=", ossl_x509revoked_set_serial, 1);
    rb_define_method(cX509Rev, "time", ossl_x509revoked_get_time, 0);
    rb_define_method(cX509Rev, "time=", ossl_x509revoked_set_time, 1);
    rb_define_method(cX509Rev, "extensions", ossl_x509revoked_get_extensions, 0);
    rb_define_method(cX509Rev, "extensions=", ossl_x509revoked_set_extensions, 1);
    rb_define_method(cX509Rev, "add_extension", ossl_x509revoked_add_extension, 1);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ossl_x509store.c

root/ext/openssl/ossl_x509store.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. ossl_x509store_new
  2. GetX509StorePtr
  3. DupX509StorePtr
  4. ossl_x509store_alloc
  5. ossl_x509store_set_vfy_cb
  6. ossl_x509store_initialize
  7. ossl_x509store_set_flags
  8. ossl_x509store_set_purpose
  9. ossl_x509store_set_trust
  10. ossl_x509store_set_time
  11. ossl_x509store_add_file
  12. ossl_x509store_add_path
  13. ossl_x509store_set_default_paths
  14. ossl_x509store_add_cert
  15. ossl_x509store_add_crl
  16. ossl_x509store_verify
  17. ossl_x509stctx_new
  18. ossl_x509stctx_clear_ptr
  19. ossl_x509stctx_free
  20. ossl_x509stctx_alloc
  21. ossl_x509stctx_initialize
  22. ossl_x509stctx_verify
  23. ossl_x509stctx_get_chain
  24. ossl_x509stctx_get_err
  25. ossl_x509stctx_set_error
  26. ossl_x509stctx_get_err_string
  27. ossl_x509stctx_get_err_depth
  28. ossl_x509stctx_get_curr_cert
  29. ossl_x509stctx_get_curr_crl
  30. ossl_x509stctx_cleanup
  31. ossl_x509stctx_set_flags
  32. ossl_x509stctx_set_purpose
  33. ossl_x509stctx_set_trust
  34. ossl_x509stctx_set_time
  35. Init_ossl_x509store
/*
 * $Id: ossl_x509store.c,v 1.7 2005/08/22 20:47:53 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#include "ossl.h"
#include <rubysig.h>

#define WrapX509Store(klass, obj, st) do { \
    if (!st) { \
        ossl_raise(rb_eRuntimeError, "STORE wasn't initialized!"); \
    } \
    obj = Data_Wrap_Struct(klass, 0, X509_STORE_free, st); \
} while (0)
#define GetX509Store(obj, st) do { \
    Data_Get_Struct(obj, X509_STORE, st); \
    if (!st) { \
        ossl_raise(rb_eRuntimeError, "STORE wasn't initialized!"); \
    } \
} while (0)
#define SafeGetX509Store(obj, st) do { \
    OSSL_Check_Kind(obj, cX509Store); \
    GetX509Store(obj, st); \
} while (0)

#define WrapX509StCtx(klass, obj, ctx) do { \
    if (!ctx) { \
        ossl_raise(rb_eRuntimeError, "STORE_CTX wasn't initialized!"); \
    } \
    obj = Data_Wrap_Struct(klass, 0, ossl_x509stctx_free, ctx); \
} while (0)
#define GetX509StCtx(obj, ctx) do { \
    Data_Get_Struct(obj, X509_STORE_CTX, ctx); \
    if (!ctx) { \
        ossl_raise(rb_eRuntimeError, "STORE_CTX is out of scope!"); \
    } \
} while (0)
#define SafeGetX509StCtx(obj, storep) do { \
    OSSL_Check_Kind(obj, cX509StoreContext); \
    GetX509Store(obj, ctx); \
} while (0)

/*
 * Classes
 */
VALUE cX509Store;
VALUE cX509StoreContext;
VALUE eX509StoreError;

/*
 * Public functions
 */
VALUE
ossl_x509store_new(X509_STORE *store)
{
    VALUE obj;

    WrapX509Store(cX509Store, obj, store);

    return obj;
}

X509_STORE *
GetX509StorePtr(VALUE obj)
{
    X509_STORE *store;

    SafeGetX509Store(obj, store);

    return store;
}

X509_STORE *
DupX509StorePtr(VALUE obj)
{
    X509_STORE *store;

    SafeGetX509Store(obj, store);
    CRYPTO_add(&store->references, 1, CRYPTO_LOCK_X509_STORE);

    return store;
}

/*
 * Private functions
 */
static VALUE
ossl_x509store_alloc(VALUE klass)
{
    X509_STORE *store;
    VALUE obj;

    if((store = X509_STORE_new()) == NULL){
        ossl_raise(eX509StoreError, NULL);
    }
    WrapX509Store(klass, obj, store);

    return obj;
}

/*
 * General callback for OpenSSL verify
 */
static VALUE
ossl_x509store_set_vfy_cb(VALUE self, VALUE cb)
{
    X509_STORE *store;

    GetX509Store(self, store);
    X509_STORE_set_ex_data(store, ossl_verify_cb_idx, (void*)cb);
    rb_iv_set(self, "@verify_callback", cb);

    return cb;
}

static VALUE
ossl_x509store_initialize(int argc, VALUE *argv, VALUE self)
{
    X509_STORE *store;

    GetX509Store(self, store);
    X509_STORE_set_verify_cb_func(store, ossl_verify_cb);
    ossl_x509store_set_vfy_cb(self, Qnil);

#if (OPENSSL_VERSION_NUMBER < 0x00907000L)
    rb_iv_set(self, "@flags", INT2NUM(0));
    rb_iv_set(self, "@purpose", INT2NUM(0));
    rb_iv_set(self, "@trust", INT2NUM(0));
#endif

    /* last verification status */
    rb_iv_set(self, "@error", Qnil);
    rb_iv_set(self, "@error_string", Qnil);
    rb_iv_set(self, "@chain", Qnil);
    rb_iv_set(self, "@time", Qnil);

    return self;
}

static VALUE
ossl_x509store_set_flags(VALUE self, VALUE flags)
{
#if (OPENSSL_VERSION_NUMBER >= 0x00907000L)
    X509_STORE *store;
    long f = NUM2LONG(flags);

    GetX509Store(self, store);
    X509_STORE_set_flags(store, f);
#else
    rb_iv_set(self, "@flags", flags);
#endif

    return flags;
}

static VALUE
ossl_x509store_set_purpose(VALUE self, VALUE purpose)
{
#if (OPENSSL_VERSION_NUMBER >= 0x00907000L)
    X509_STORE *store;
    long p = NUM2LONG(purpose);

    GetX509Store(self, store);
    X509_STORE_set_purpose(store, p);
#else
    rb_iv_set(self, "@purpose", purpose);
#endif

    return purpose;
}

static VALUE
ossl_x509store_set_trust(VALUE self, VALUE trust)
{
#if (OPENSSL_VERSION_NUMBER >= 0x00907000L)
    X509_STORE *store;
    long t = NUM2LONG(trust);

    GetX509Store(self, store);
    X509_STORE_set_trust(store, t);
#else
    rb_iv_set(self, "@trust", trust);
#endif

    return trust;
}

static VALUE
ossl_x509store_set_time(VALUE self, VALUE time)
{
    rb_iv_set(self, "@time", time);
    return time;
}

static VALUE
ossl_x509store_add_file(VALUE self, VALUE file)
{
    X509_STORE *store;
    X509_LOOKUP *lookup;
    char *path = NULL;

    if(file != Qnil){
        Check_SafeStr(file);
        path = RSTRING(file)->ptr;
    }
    GetX509Store(self, store);
    lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file());
    if(lookup == NULL) ossl_raise(eX509StoreError, NULL);
    if(X509_LOOKUP_load_file(lookup, path, X509_FILETYPE_PEM) != 1){
        ossl_raise(eX509StoreError, NULL);
    }

    return self;
}

static VALUE
ossl_x509store_add_path(VALUE self, VALUE dir)
{
    X509_STORE *store;
    X509_LOOKUP *lookup;
    char *path = NULL;

    if(dir != Qnil){
        Check_SafeStr(dir);
        path = RSTRING(dir)->ptr;
    }
    GetX509Store(self, store);
    lookup = X509_STORE_add_lookup(store, X509_LOOKUP_hash_dir());
    if(lookup == NULL) ossl_raise(eX509StoreError, NULL);
    if(X509_LOOKUP_add_dir(lookup, path, X509_FILETYPE_PEM) != 1){
        ossl_raise(eX509StoreError, NULL);
    }

    return self;
}

static VALUE
ossl_x509store_set_default_paths(VALUE self)
{
    X509_STORE *store;

    GetX509Store(self, store);
    if (X509_STORE_set_default_paths(store) != 1){
        ossl_raise(eX509StoreError, NULL);
    }

    return Qnil;
}

static VALUE
ossl_x509store_add_cert(VALUE self, VALUE arg)
{
    X509_STORE *store;
    X509 *cert;

    cert = GetX509CertPtr(arg); /* NO NEED TO DUP */
    GetX509Store(self, store);
    if (X509_STORE_add_cert(store, cert) != 1){
        ossl_raise(eX509StoreError, NULL);
    }

    return self;
}

static VALUE
ossl_x509store_add_crl(VALUE self, VALUE arg)
{
    X509_STORE *store;
    X509_CRL *crl;

    crl = GetX509CRLPtr(arg); /* NO NEED TO DUP */
    GetX509Store(self, store);
    if (X509_STORE_add_crl(store, crl) != 1){
        ossl_raise(eX509StoreError, NULL);
    }

    return self;
}

static VALUE ossl_x509stctx_get_err(VALUE);
static VALUE ossl_x509stctx_get_err_string(VALUE);
static VALUE ossl_x509stctx_get_chain(VALUE);

static VALUE
ossl_x509store_verify(int argc, VALUE *argv, VALUE self)
{
    VALUE cert, chain;
    VALUE ctx, proc, result;

    rb_scan_args(argc, argv, "11", &cert, &chain);
    ctx = rb_funcall(cX509StoreContext, rb_intern("new"), 3, self, cert, chain);
    proc = rb_block_given_p() ?  rb_block_proc() :
           rb_iv_get(self, "@verify_callback");
    rb_iv_set(ctx, "@verify_callback", proc);
    result = rb_funcall(ctx, rb_intern("verify"), 0);

    rb_iv_set(self, "@error", ossl_x509stctx_get_err(ctx));
    rb_iv_set(self, "@error_string", ossl_x509stctx_get_err_string(ctx));
    rb_iv_set(self, "@chain", ossl_x509stctx_get_chain(ctx));

    return result;
}

/*
 * Public Functions
 */
static void ossl_x509stctx_free(X509_STORE_CTX*);

VALUE
ossl_x509stctx_new(X509_STORE_CTX *ctx)
{
    VALUE obj;

    WrapX509StCtx(cX509StoreContext, obj, ctx);

    return obj;
}

VALUE
ossl_x509stctx_clear_ptr(VALUE obj)
{
    OSSL_Check_Kind(obj, cX509StoreContext);
    RDATA(obj)->data = NULL;

    return obj;
}

/*
 * Private functions
 */
static void
ossl_x509stctx_free(X509_STORE_CTX *ctx)
{
    if(ctx->untrusted)
        sk_X509_pop_free(ctx->untrusted, X509_free);
    if(ctx->cert)
        X509_free(ctx->cert);
    X509_STORE_CTX_free(ctx);
}

static VALUE
ossl_x509stctx_alloc(VALUE klass)
{
    X509_STORE_CTX *ctx;
    VALUE obj;

    if((ctx = X509_STORE_CTX_new()) == NULL){
        ossl_raise(eX509StoreError, NULL);
    }
    WrapX509StCtx(klass, obj, ctx);

    return obj;
}

static VALUE ossl_x509stctx_set_flags(VALUE, VALUE);
static VALUE ossl_x509stctx_set_purpose(VALUE, VALUE);
static VALUE ossl_x509stctx_set_trust(VALUE, VALUE);
static VALUE ossl_x509stctx_set_time(VALUE, VALUE);

static VALUE
ossl_x509stctx_initialize(int argc, VALUE *argv, VALUE self)
{
    VALUE store, cert, chain, t;
    X509_STORE_CTX *ctx;
    X509_STORE *x509st;
    X509 *x509 = NULL;
    STACK_OF(X509) *x509s = NULL;

    rb_scan_args(argc, argv, "12", &store, &cert, &chain);
    GetX509StCtx(self, ctx);
    SafeGetX509Store(store, x509st);
    if(!NIL_P(cert)) x509 = DupX509CertPtr(cert); /* NEED TO DUP */
    if(!NIL_P(chain)) x509s = ossl_x509_ary2sk(chain);
#if (OPENSSL_VERSION_NUMBER >= 0x00907000L)
    if(X509_STORE_CTX_init(ctx, x509st, x509, x509s) != 1){
        sk_X509_pop_free(x509s, X509_free);
        ossl_raise(eX509StoreError, NULL);
    }
#else
    X509_STORE_CTX_init(ctx, x509st, x509, x509s);
    ossl_x509stctx_set_flags(self, rb_iv_get(store, "@flags"));
    ossl_x509stctx_set_purpose(self, rb_iv_get(store, "@purpose"));
    ossl_x509stctx_set_trust(self, rb_iv_get(store, "@trust"));
#endif
    if (!NIL_P(t = rb_iv_get(store, "@time")))
        ossl_x509stctx_set_time(self, t);
    rb_iv_set(self, "@verify_callback", rb_iv_get(store, "@verify_callback"));
    rb_iv_set(self, "@cert", cert);

    return self;
}

static VALUE
ossl_x509stctx_verify(VALUE self)
{
    X509_STORE_CTX *ctx;
    int result;

    GetX509StCtx(self, ctx);
    X509_STORE_CTX_set_ex_data(ctx, ossl_verify_cb_idx,
                               (void*)rb_iv_get(self, "@verify_callback"));
    result = X509_verify_cert(ctx);

    return result ? Qtrue : Qfalse;
}

static VALUE
ossl_x509stctx_get_chain(VALUE self)
{
    X509_STORE_CTX *ctx;
    STACK_OF(X509) *chain;
    X509 *x509;
    int i, num;
    VALUE ary;

    GetX509StCtx(self, ctx);
    if((chain = X509_STORE_CTX_get_chain(ctx)) == NULL){
        return Qnil;
    }
    if((num = sk_X509_num(chain)) < 0){
        OSSL_Debug("certs in chain < 0???");
        return rb_ary_new();
    }
    ary = rb_ary_new2(num);
    for(i = 0; i < num; i++) {
        x509 = sk_X509_value(chain, i);
        rb_ary_push(ary, ossl_x509_new(x509));
    }

    return ary;
}

static VALUE
ossl_x509stctx_get_err(VALUE self)
{
    X509_STORE_CTX *ctx;

    GetX509StCtx(self, ctx);

    return INT2FIX(X509_STORE_CTX_get_error(ctx));
}

static VALUE
ossl_x509stctx_set_error(VALUE self, VALUE err)
{
    X509_STORE_CTX *ctx;

    GetX509StCtx(self, ctx);
    X509_STORE_CTX_set_error(ctx, FIX2INT(err));

    return err;
}

static VALUE
ossl_x509stctx_get_err_string(VALUE self)
{
    X509_STORE_CTX *ctx;
    long err;

    GetX509StCtx(self, ctx);
    err = X509_STORE_CTX_get_error(ctx);

    return rb_str_new2(X509_verify_cert_error_string(err));
}

static VALUE
ossl_x509stctx_get_err_depth(VALUE self)
{
    X509_STORE_CTX *ctx;

    GetX509StCtx(self, ctx);

    return INT2FIX(X509_STORE_CTX_get_error_depth(ctx));
}

static VALUE
ossl_x509stctx_get_curr_cert(VALUE self)
{
    X509_STORE_CTX *ctx;

    GetX509StCtx(self, ctx);

    return ossl_x509_new(X509_STORE_CTX_get_current_cert(ctx));
}

static VALUE
ossl_x509stctx_get_curr_crl(VALUE self)
{
#if (OPENSSL_VERSION_NUMBER >= 0x00907000L)
    X509_STORE_CTX *ctx;

    GetX509StCtx(self, ctx);
    if(!ctx->current_crl) return Qnil;

    return ossl_x509crl_new(ctx->current_crl);
#else
    return Qnil;
#endif
}

static VALUE
ossl_x509stctx_cleanup(VALUE self)
{
    X509_STORE_CTX *ctx;

    GetX509StCtx(self, ctx);
    X509_STORE_CTX_cleanup(ctx);

    return self;
}

static VALUE
ossl_x509stctx_set_flags(VALUE self, VALUE flags)
{
    X509_STORE_CTX *store;
    long f = NUM2LONG(flags);

    GetX509StCtx(self, store);
    X509_STORE_CTX_set_flags(store, f);

    return flags;
}

static VALUE
ossl_x509stctx_set_purpose(VALUE self, VALUE purpose)
{
    X509_STORE_CTX *store;
    long p = NUM2LONG(purpose);

    GetX509StCtx(self, store);
    X509_STORE_CTX_set_purpose(store, p);

    return purpose;
}

static VALUE
ossl_x509stctx_set_trust(VALUE self, VALUE trust)
{
    X509_STORE_CTX *store;
    long t = NUM2LONG(trust);

    GetX509StCtx(self, store);
    X509_STORE_CTX_set_trust(store, t);

    return trust;
}

static VALUE
ossl_x509stctx_set_time(VALUE self, VALUE time)
{
    X509_STORE_CTX *store;
    long t;

    t = NUM2LONG(rb_Integer(time));
    GetX509StCtx(self, store);
    X509_STORE_CTX_set_time(store, 0, t);

    return time;
}

/*
 * INIT
 */
void
Init_ossl_x509store()
{
    VALUE x509stctx;

    eX509StoreError = rb_define_class_under(mX509, "StoreError", eOSSLError);

    cX509Store = rb_define_class_under(mX509, "Store", rb_cObject);
    rb_attr(cX509Store, rb_intern("verify_callback"), 1, 0, Qfalse);
    rb_attr(cX509Store, rb_intern("error"), 1, 0, Qfalse);
    rb_attr(cX509Store, rb_intern("error_string"), 1, 0, Qfalse);
    rb_attr(cX509Store, rb_intern("chain"), 1, 0, Qfalse);
    rb_define_alloc_func(cX509Store, ossl_x509store_alloc);
    rb_define_method(cX509Store, "initialize",   ossl_x509store_initialize, -1);
    rb_define_method(cX509Store, "verify_callback=", ossl_x509store_set_vfy_cb, 1);
    rb_define_method(cX509Store, "flags=",       ossl_x509store_set_flags, 1);
    rb_define_method(cX509Store, "purpose=",     ossl_x509store_set_purpose, 1);
    rb_define_method(cX509Store, "trust=",       ossl_x509store_set_trust, 1);
    rb_define_method(cX509Store, "time=",        ossl_x509store_set_time, 1);
    rb_define_method(cX509Store, "add_path",     ossl_x509store_add_path, 1);
    rb_define_method(cX509Store, "add_file",     ossl_x509store_add_file, 1);
    rb_define_method(cX509Store, "set_default_paths", ossl_x509store_set_default_paths, 0);
    rb_define_method(cX509Store, "add_cert",     ossl_x509store_add_cert, 1);
    rb_define_method(cX509Store, "add_crl",      ossl_x509store_add_crl, 1);
    rb_define_method(cX509Store, "verify",       ossl_x509store_verify, -1);

    cX509StoreContext = rb_define_class_under(mX509,"StoreContext",rb_cObject);
    x509stctx = cX509StoreContext;
    rb_define_alloc_func(cX509StoreContext, ossl_x509stctx_alloc);
    rb_define_method(x509stctx,"initialize",  ossl_x509stctx_initialize, -1);
    rb_define_method(x509stctx,"verify",      ossl_x509stctx_verify, 0);
    rb_define_method(x509stctx,"chain",       ossl_x509stctx_get_chain,0);
    rb_define_method(x509stctx,"error",       ossl_x509stctx_get_err, 0);
    rb_define_method(x509stctx,"error=",      ossl_x509stctx_set_error, 1);
    rb_define_method(x509stctx,"error_string",ossl_x509stctx_get_err_string,0);
    rb_define_method(x509stctx,"error_depth", ossl_x509stctx_get_err_depth, 0);
    rb_define_method(x509stctx,"current_cert",ossl_x509stctx_get_curr_cert, 0);
    rb_define_method(x509stctx,"current_crl", ossl_x509stctx_get_curr_crl, 0);
    rb_define_method(x509stctx,"cleanup",     ossl_x509stctx_cleanup, 0);
    rb_define_method(x509stctx,"flags=",      ossl_x509stctx_set_flags, 1);
    rb_define_method(x509stctx,"purpose=",    ossl_x509stctx_set_purpose, 1);
    rb_define_method(x509stctx,"trust=",      ossl_x509stctx_set_trust, 1);
    rb_define_method(x509stctx,"time=",       ossl_x509stctx_set_time, 1);

}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/openssl/ruby_missing.h

root/ext/openssl/ruby_missing.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/*
 * $Id: ruby_missing.h,v 1.3 2003/09/06 08:56:57 gotoyuzo Exp $
 * 'OpenSSL for Ruby' project
 * Copyright (C) 2001-2003  Michal Rokos <m.rokos@sh.cvut.cz>
 * All rights reserved.
 */
/*
 * This program is licenced under the same licence as Ruby.
 * (See the file 'LICENCE'.)
 */
#if !defined(_OSSL_RUBY_MISSING_H_)
#define _OSS_RUBY_MISSING_H_

#define rb_define_copy_func(klass, func) \
        rb_define_method(klass, "initialize_copy", func, 1)

#endif /* _OSS_RUBY_MISSING_H_ */
/* [<][>][^][v][top][bottom][index] [help] */


ext/pty/pty.c

root/ext/pty/pty.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. echild_status
  2. raise_from_wait
  3. pty_syswait
  4. pty_exec
  5. establishShell
  6. pty_finalize_syswait
  7. getDevice
  8. getDevice
  9. getDevice
  10. freeDevice
  11. pty_getpty
  12. pty_protect
  13. pty_reset_signal
  14. Init_pty
#include        "config.h"
#include        <stdio.h>
#include        <sys/types.h>
#include        <sys/stat.h>
#include        <sys/file.h>
#include        <fcntl.h>
#include        <errno.h>
#include        <pwd.h>
#ifdef HAVE_SYS_IOCTL_H
#include        <sys/ioctl.h>
#endif
#ifdef HAVE_LIBUTIL_H
#include        <libutil.h>
#endif
#ifdef HAVE_PTY_H
#include        <pty.h>
#endif
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#else
#define WIFSTOPPED(status)    (((status) & 0xff) == 0x7f)
#endif
#include <ctype.h>

#include "ruby.h"
#include "rubyio.h"
#include "util.h"

#include <signal.h>
#ifdef HAVE_SYS_STROPTS_H
#include <sys/stropts.h>
#endif

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#define DEVICELEN       16

#if !defined(HAVE_OPENPTY)
#if defined(__hpux)
static
char    *MasterDevice = "/dev/ptym/pty%s",
        *SlaveDevice =  "/dev/pty/tty%s",
        *deviceNo[] = {
                "p0","p1","p2","p3","p4","p5","p6","p7",
                "p8","p9","pa","pb","pc","pd","pe","pf",
                "q0","q1","q2","q3","q4","q5","q6","q7",
                "q8","q9","qa","qb","qc","qd","qe","qf",
                "r0","r1","r2","r3","r4","r5","r6","r7",
                "r8","r9","ra","rb","rc","rd","re","rf",
                "s0","s1","s2","s3","s4","s5","s6","s7",
                "s8","s9","sa","sb","sc","sd","se","sf",
                "t0","t1","t2","t3","t4","t5","t6","t7",
                "t8","t9","ta","tb","tc","td","te","tf",
                "u0","u1","u2","u3","u4","u5","u6","u7",
                "u8","u9","ua","ub","uc","ud","ue","uf",
                "v0","v1","v2","v3","v4","v5","v6","v7",
                "v8","v9","va","vb","vc","vd","ve","vf",
                "w0","w1","w2","w3","w4","w5","w6","w7",
                "w8","w9","wa","wb","wc","wd","we","wf",
                0,
        };
#elif defined(_IBMESA)  /* AIX/ESA */
static
char    *MasterDevice = "/dev/ptyp%s",
        *SlaveDevice = "/dev/ttyp%s",
        *deviceNo[] = {
"00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f",
"10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f",
"20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f",
"30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f",
"40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f",
"50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f",
"60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f",
"70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f",
"80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f",
"90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f",
"a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af",
"b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf",
"c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf",
"d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df",
"e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef",
"f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff",
                };
#elif !defined(HAVE_PTSNAME)
static
char    *MasterDevice = "/dev/pty%s",
        *SlaveDevice = "/dev/tty%s",
        *deviceNo[] = {
                "p0","p1","p2","p3","p4","p5","p6","p7",
                "p8","p9","pa","pb","pc","pd","pe","pf",
                "q0","q1","q2","q3","q4","q5","q6","q7",
                "q8","q9","qa","qb","qc","qd","qe","qf",
                "r0","r1","r2","r3","r4","r5","r6","r7",
                "r8","r9","ra","rb","rc","rd","re","rf",
                "s0","s1","s2","s3","s4","s5","s6","s7",
                "s8","s9","sa","sb","sc","sd","se","sf",
                0,
        };
#endif
#endif /* !defined(HAVE_OPENPTY) */

static char SlaveName[DEVICELEN];

#ifndef HAVE_SETEUID
# ifdef HAVE_SETREUID
#  define seteuid(e)    setreuid(-1, (e))
# else /* NOT HAVE_SETREUID */
#  ifdef HAVE_SETRESUID
#   define seteuid(e)   setresuid(-1, (e), -1)
#  else /* NOT HAVE_SETRESUID */
    /* I can't set euid. (;_;) */
#  endif /* HAVE_SETRESUID */
# endif /* HAVE_SETREUID */
#endif /* NO_SETEUID */

static VALUE eChildExited;

static VALUE
echild_status(self)
    VALUE self;
{
    return rb_ivar_get(self, rb_intern("status"));
}

struct pty_info {
    int fd;
    rb_pid_t child_pid;
    VALUE thread;
};

static void
raise_from_wait(state, info)
    struct pty_info *info;
    char *state;
{
    extern VALUE rb_last_status;
    char buf[1024];
    VALUE exc;

    snprintf(buf, sizeof(buf), "pty - %s: %d", state, info->child_pid);
    exc = rb_exc_new2(eChildExited, buf);
    rb_iv_set(exc, "status", rb_last_status);
    rb_funcall(info->thread, rb_intern("raise"), 1, exc);
}

static VALUE
pty_syswait(info)
    struct pty_info *info;
{
    int cpid, status;

    for (;;) {
        cpid = rb_waitpid(info->child_pid, &status, WUNTRACED);
        if (cpid == -1) return Qnil;

#if defined(IF_STOPPED)
        if (IF_STOPPED(status)) { /* suspend */
            raise_from_wait("stopped", info);
        }
#elif defined(WIFSTOPPED)
        if (WIFSTOPPED(status)) { /* suspend */
            raise_from_wait("stopped", info);
        }
#else
---->> Either IF_STOPPED or WIFSTOPPED is needed <<----
#endif /* WIFSTOPPED | IF_STOPPED */
        else if (kill(info->child_pid, 0) == 0) {
            raise_from_wait("changed", info);
        }
        else {
            raise_from_wait("exited", info);
            return Qnil;
        }
    }
}

static void getDevice _((int*, int*));

struct exec_info {
    int argc;
    VALUE *argv;
};

static VALUE
pty_exec(arg)
    struct exec_info *arg;
{
    return rb_f_exec(arg->argc, arg->argv);
}

static void
establishShell(argc, argv, info)
    int argc;
    VALUE *argv;
    struct pty_info *info;
{
    static int          i,master,slave,currentPid;
    char                *p,*getenv();
    struct passwd       *pwent;
    VALUE               v;
    struct exec_info    arg;
    int                 status;

    if (argc == 0) {
        char *shellname;

        if ((p = getenv("SHELL")) != NULL) {
            shellname = p;
        }
        else {
            pwent = getpwuid(getuid());
            if (pwent && pwent->pw_shell)
                shellname = pwent->pw_shell;
            else
                shellname = "/bin/sh";
        }
        v = rb_str_new2(shellname);
        argc = 1;
        argv = &v;
    }
    getDevice(&master,&slave);

    info->thread = rb_thread_current();
    currentPid = getpid();
    if((i = fork()) < 0) {
        close(master);
        close(slave);
        rb_sys_fail("fork failed");
    }

    if(i == 0) {        /* child */
        currentPid = getpid();

        /*
         * Set free from process group and controlling terminal
         */
#ifdef HAVE_SETSID
        (void) setsid();
#else /* HAS_SETSID */
# ifdef HAVE_SETPGRP
#  ifdef SETGRP_VOID
        if (setpgrp() == -1)
            perror("setpgrp()");
#  else /* SETGRP_VOID */
        if (setpgrp(0, currentPid) == -1)
            rb_sys_fail("setpgrp()");
        if ((i = open("/dev/tty", O_RDONLY)) < 0)
            rb_sys_fail("/dev/tty");
        else {
            if (ioctl(i, TIOCNOTTY, (char *)0))
                perror("ioctl(TIOCNOTTY)");
            close(i);
        }
#  endif /* SETGRP_VOID */
# endif /* HAVE_SETPGRP */
#endif /* HAS_SETSID */

        /*
         * obtain new controlling terminal
         */
#if defined(TIOCSCTTY)
        close(master);
        (void) ioctl(slave, TIOCSCTTY, (char *)0);
        /* errors ignored for sun */
#else
        close(slave);
        slave = open(SlaveName, O_RDWR);
        if (slave < 0) {
            perror("open: pty slave");
            _exit(1);
        }
        close(master);
#endif
        dup2(slave,0);
        dup2(slave,1);
        dup2(slave,2);
        close(slave);
#if defined(HAVE_SETEUID) || defined(HAVE_SETREUID) || defined(HAVE_SETRESUID)
        seteuid(getuid());
#endif

        arg.argc = argc;
        arg.argv = argv;
        rb_protect(pty_exec, (VALUE)&arg, &status);
        sleep(1);
        _exit(1);
    }

    close(slave);

    info->child_pid = i;
    info->fd = master;
}

static VALUE
pty_finalize_syswait(info)
    struct pty_info *info;
{
    rb_thread_kill(info->thread);
    rb_funcall(info->thread, rb_intern("value"), 0);
    rb_detach_process(info->child_pid);
    return Qnil;
}

#ifdef HAVE_OPENPTY
/*
 * Use openpty(3) of 4.3BSD Reno and later,
 * or the same interface function.
 */
static void
getDevice(master,slave)
    int *master,*slave;
{
    if (openpty(master, slave, SlaveName,
                (struct termios *)0, (struct winsize *)0) == -1) {
        rb_raise(rb_eRuntimeError, "openpty() failed");
    }
}
#else /* HAVE_OPENPTY */
#ifdef HAVE__GETPTY
static void
getDevice(master,slave)
    int *master,*slave;
{
    char *name;

    if (!(name = _getpty(master, O_RDWR, 0622, 0))) {
        rb_raise(rb_eRuntimeError, "_getpty() failed");
    }

    *slave = open(name, O_RDWR);
    strcpy(SlaveName, name);
}
#else /* HAVE__GETPTY */
static void
getDevice(master,slave)
    int *master,*slave;
{
    int  i,j;

#ifdef HAVE_PTSNAME
    char *pn;
    void (*s)();

    extern char *ptsname(int);
    extern int unlockpt(int);
    extern int grantpt(int);

    if((i = open("/dev/ptmx", O_RDWR, 0)) != -1) {
        s = signal(SIGCHLD, SIG_DFL);
        if(grantpt(i) != -1) {
            signal(SIGCHLD, s);
            if(unlockpt(i) != -1) {
                if((pn = ptsname(i)) != NULL) {
                    if((j = open(pn, O_RDWR, 0)) != -1) {
#if defined I_PUSH && !defined linux
                        if(ioctl(j, I_PUSH, "ptem") != -1) {
                            if(ioctl(j, I_PUSH, "ldterm") != -1) {
#endif
                                *master = i;
                                *slave = j;
                                strcpy(SlaveName, pn);
                                return;
#if defined I_PUSH && !defined linux
                            }
                        }
#endif
                    }
                }
            }
        }
        close(i);
    }
    rb_raise(rb_eRuntimeError, "can't get Master/Slave device");
#else
    char **p;
    char MasterName[DEVICELEN];

    for (p = deviceNo; *p != NULL; p++) {
        sprintf(MasterName,MasterDevice,*p);
        if ((i = open(MasterName,O_RDWR,0)) >= 0) {
            *master = i;
            sprintf(SlaveName,SlaveDevice,*p);
            if ((j = open(SlaveName,O_RDWR,0)) >= 0) {
                *slave = j;
                chown(SlaveName, getuid(), getgid());
                chmod(SlaveName, 0622);
                return;
            }
            close(i);
        }
    }
    rb_raise(rb_eRuntimeError, "can't get %s", SlaveName);
#endif
}
#endif /* HAVE__GETPTY */
#endif /* HAVE_OPENPTY */

static void
freeDevice()
{
    chmod(SlaveName, 0666);
    chown(SlaveName, 0, 0);
}

/* ruby function: getpty */
static VALUE
pty_getpty(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    VALUE res;
    struct pty_info info;
    struct pty_info thinfo;
    OpenFile *wfptr,*rfptr;
    VALUE rport = rb_obj_alloc(rb_cFile);
    VALUE wport = rb_obj_alloc(rb_cFile);

    MakeOpenFile(rport, rfptr);
    MakeOpenFile(wport, wfptr);

    establishShell(argc, argv, &info);

    rfptr->mode = rb_io_mode_flags("r");
    rfptr->fd = info.fd;
    rfptr->path = strdup(SlaveName);

    wfptr->mode = rb_io_mode_flags("w") | FMODE_SYNC;
    wfptr->fd = dup(info.fd);
    wfptr->path = strdup(SlaveName);

    res = rb_ary_new2(3);
    rb_ary_store(res,0,(VALUE)rport);
    rb_ary_store(res,1,(VALUE)wport);
    rb_ary_store(res,2,INT2FIX(info.child_pid));

    thinfo.thread = rb_thread_create(pty_syswait, (void*)&info);
    thinfo.child_pid = info.child_pid;
    rb_thread_schedule();

    if (rb_block_given_p()) {
        rb_ensure(rb_yield, res, pty_finalize_syswait, (VALUE)&thinfo);
        return Qnil;
    }
    return res;
}

/* ruby function: protect_signal - obsolete */
static VALUE
pty_protect(self)
    VALUE self;
{
    rb_warn("PTY::protect_signal is no longer needed");
    rb_yield(Qnil);
    return self;
}

/* ruby function: reset_signal - obsolete */
static VALUE
pty_reset_signal(self)
    VALUE self;
{
    rb_warn("PTY::reset_signal is no longer needed");
    return self;
}

static VALUE cPTY;

void
Init_pty()
{
    cPTY = rb_define_module("PTY");
    rb_define_module_function(cPTY,"getpty",pty_getpty,-1);
    rb_define_module_function(cPTY,"spawn",pty_getpty,-1);
    rb_define_module_function(cPTY,"protect_signal",pty_protect,0);
    rb_define_module_function(cPTY,"reset_signal",pty_reset_signal,0);

    eChildExited = rb_define_class_under(cPTY,"ChildExited",rb_eRuntimeError);
    rb_define_method(eChildExited,"status",echild_status,0);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/racc/cparse/cparse.c

root/ext/racc/cparse/cparse.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. value_to_id
  2. num_to_long
  3. get_stack_tail
  4. cut_stack_tail
  5. racc_cparse
  6. racc_yyparse
  7. call_lexer
  8. lexer_iter
  9. lexer_i
  10. assert_array
  11. assert_hash
  12. assert_integer
  13. initialize_params
  14. extract_user_token
  15. parse_main
  16. shift
  17. reduce
  18. catch_iter
  19. reduce0
  20. Init_cparse
/*

    cparse.c -- racc runtime core

    Copyright (c) 1999-2003 Minero Aoki <aamine@loveruby.net>

    This library is free software.
    You can distribute/modify this program under the same terms of ruby.

    $raccId: cparse.c,v 1.3 2003/11/03 12:20:54 aamine Exp $

*/

#include "ruby.h"
#include <stdio.h>

/* -----------------------------------------------------------------------
                        Important Constants
----------------------------------------------------------------------- */

#define RACC_VERSION "1.4.4"

#define DEFAULT_TOKEN -1
#define ERROR_TOKEN    1
#define FINAL_TOKEN    0

#define vDEFAULT_TOKEN  INT2FIX(DEFAULT_TOKEN)
#define vERROR_TOKEN    INT2FIX(ERROR_TOKEN)
#define vFINAL_TOKEN    INT2FIX(FINAL_TOKEN)

/* -----------------------------------------------------------------------
                          File Local Variables
----------------------------------------------------------------------- */

static VALUE RaccBug;
static VALUE CparseParams;

static ID id_yydebug;
static ID id_nexttoken;
static ID id_onerror;
static ID id_noreduce;
static ID id_catch;
static VALUE sym_raccjump;
static ID id_errstatus;

static ID id_d_shift;
static ID id_d_reduce;
static ID id_d_accept;
static ID id_d_read_token;
static ID id_d_next_state;
static ID id_d_e_pop;

/* -----------------------------------------------------------------------
                              Utils
----------------------------------------------------------------------- */

static ID value_to_id _((VALUE v));
static inline long num_to_long _((VALUE n));

#ifdef ID2SYM
# define id_to_value(i) ID2SYM(i)
#else
# define id_to_value(i) ULONG2NUM(i)
#endif

static ID
value_to_id(v)
    VALUE v;
{
#ifndef SYMBOL_P
#  define SYMBOL_P(v) FIXNUM_P(v)
#endif
    if (! SYMBOL_P(v)) {
        rb_raise(rb_eTypeError, "not symbol");
    }
#ifdef SYM2ID
    return SYM2ID(v);
#else
    return (ID)NUM2ULONG(v);
#endif
}

#ifndef LONG2NUM
#  define LONG2NUM(i) INT2NUM(i)
#endif

static inline long
num_to_long(n)
    VALUE n;
{
    return NUM2LONG(n);
}

#define AREF(s, idx) \
    ((0 <= idx && idx < RARRAY(s)->len) ? RARRAY(s)->ptr[idx] : Qnil)

/* -----------------------------------------------------------------------
                        Parser Stack Interfaces
----------------------------------------------------------------------- */

static VALUE get_stack_tail _((VALUE stack, long len));
static void cut_stack_tail _((VALUE stack, long len));

static VALUE
get_stack_tail(stack, len)
    VALUE stack;
    long len;
{
    if (len < 0) return Qnil;  /* system error */
    if (len > RARRAY(stack)->len) len = RARRAY(stack)->len;
    return rb_ary_new4(len, RARRAY(stack)->ptr + RARRAY(stack)->len - len);
}

static void
cut_stack_tail(stack, len)
    VALUE stack;
    long len;
{
    while (len > 0) {
        rb_ary_pop(stack);
        len--;
    }
}

#define STACK_INIT_LEN 64
#define NEW_STACK() rb_ary_new2(STACK_INIT_LEN)
#define PUSH(s, i) rb_ary_store(s, RARRAY(s)->len, i)
#define POP(s) rb_ary_pop(s)
#define LAST_I(s) \
    ((RARRAY(s)->len > 0) ? RARRAY(s)->ptr[RARRAY(s)->len - 1] : Qnil)
#define GET_TAIL(s, len) get_stack_tail(s, len)
#define CUT_TAIL(s, len) cut_stack_tail(s, len)

/* -----------------------------------------------------------------------
                       struct cparse_params
----------------------------------------------------------------------- */

struct cparse_params {
    VALUE value_v;         /* VALUE version of this struct */

    VALUE parser;          /* parser object */

    int   lex_is_iterator;
    VALUE lexer;           /* scanner object */
    ID    lexmid;          /* name of scanner method (must be an iterator) */

    /* State transition tables (immutable)
       Data structure is from Dragon Book 4.9 */
    /* action table */
    VALUE action_table;
    VALUE action_check;
    VALUE action_default;
    VALUE action_pointer;
    /* goto table */
    VALUE goto_table;
    VALUE goto_check;
    VALUE goto_default;
    VALUE goto_pointer;

    long  nt_base;         /* NonTerminal BASE index */
    VALUE reduce_table;    /* reduce data table */
    VALUE token_table;     /* token conversion table */

    /* parser stacks and parameters */
    VALUE state;
    long curstate;
    VALUE vstack;
    VALUE tstack;
    VALUE t;
    long shift_n;
    long reduce_n;
    long ruleno;

    long errstatus;         /* nonzero in error recovering mode */
    long nerr;              /* number of error */

    int use_result_var;

    VALUE retval;           /* return value of parser routine */
    long fin;               /* parse result status */
#define CP_FIN_ACCEPT  1
#define CP_FIN_EOT     2
#define CP_FIN_CANTPOP 3

    int debug;              /* user level debug */
    int sys_debug;          /* system level debug */

    long i;                 /* table index */
};

/* -----------------------------------------------------------------------
                        Parser Main Routines
----------------------------------------------------------------------- */

static VALUE racc_cparse _((VALUE parser, VALUE arg, VALUE sysdebug));
static VALUE racc_yyparse _((VALUE parser, VALUE lexer, VALUE lexmid,
                             VALUE arg, VALUE sysdebug));

static void call_lexer _((struct cparse_params *v));
static VALUE lexer_iter _((VALUE data));
static VALUE lexer_i _((VALUE block_args, VALUE data, VALUE self));

static VALUE assert_array _((VALUE a));
static long assert_integer _((VALUE n));
static VALUE assert_hash _((VALUE h));
static void initialize_params _((struct cparse_params *v,
                                 VALUE parser, VALUE arg,
                                 VALUE lexer, VALUE lexmid));

static void parse_main _((struct cparse_params *v,
                         VALUE tok, VALUE val, int resume));
static void extract_user_token _((struct cparse_params *v,
                                  VALUE block_args, VALUE *tok, VALUE *val));
static void shift _((struct cparse_params* v, long act, VALUE tok, VALUE val));
static int reduce _((struct cparse_params* v, long act));
static VALUE catch_iter _((VALUE dummy));
static VALUE reduce0 _((VALUE block_args, VALUE data, VALUE self));

#ifdef DEBUG
# define D_puts(msg)        if (v->sys_debug) puts(msg)
# define D_printf(fmt,arg)  if (v->sys_debug) printf(fmt,arg)
#else
# define D_puts(msg)
# define D_printf(fmt,arg)
#endif

static VALUE
racc_cparse(parser, arg, sysdebug)
    VALUE parser, arg, sysdebug;
{
    struct cparse_params params;
    struct cparse_params *v = &params;

    D_puts("starting cparse");
    v->sys_debug = RTEST(sysdebug);
    initialize_params(v, parser, arg, Qnil, Qnil);
    v->lex_is_iterator = Qfalse;
    parse_main(v, Qnil, Qnil, 0);

    return v->retval;
}

static VALUE
racc_yyparse(parser, lexer, lexmid, arg, sysdebug)
    VALUE parser, lexer, lexmid, arg, sysdebug;
{
    struct cparse_params params;
    struct cparse_params *v = &params;

    v->sys_debug = RTEST(sysdebug);
    D_puts("start C yyparse");
    initialize_params(v, parser, arg, lexer, lexmid);
    v->lex_is_iterator = Qtrue;
    D_puts("params initialized");
    parse_main(v, Qnil, Qnil, 0);
    call_lexer(v);
    if (!v->fin) {
        rb_raise(rb_eArgError, "%s() is finished before EndOfToken",
                 rb_id2name(v->lexmid));
    }

    return v->retval;
}

static void
call_lexer(v)
    struct cparse_params *v;
{
    rb_iterate(lexer_iter, v->value_v, lexer_i, v->value_v);
}

static VALUE
lexer_iter(data)
    VALUE data;
{
    struct cparse_params *v;

    Data_Get_Struct(data, struct cparse_params, v);
    rb_funcall(v->lexer, v->lexmid, 0);
    return Qnil;
}

static VALUE
lexer_i(block_args, data, self)
    VALUE block_args, data, self;
{
    struct cparse_params *v;
    VALUE tok, val;

    Data_Get_Struct(data, struct cparse_params, v);
    if (v->fin)
        rb_raise(rb_eArgError, "extra token after EndOfToken");
    extract_user_token(v, block_args, &tok, &val);
    parse_main(v, tok, val, 1);
    if (v->fin && v->fin != CP_FIN_ACCEPT)
       rb_iter_break();
    return Qnil;
}

static VALUE
assert_array(a)
    VALUE a;
{
    Check_Type(a, T_ARRAY);
    return a;
}

static VALUE
assert_hash(h)
    VALUE h;
{
    Check_Type(h, T_HASH);
    return h;
}

static long
assert_integer(n)
    VALUE n;
{
    return NUM2LONG(n);
}

static void
initialize_params(v, parser, arg, lexer, lexmid)
    struct cparse_params *v;
    VALUE parser, arg, lexer, lexmid;
{
    v->value_v = Data_Wrap_Struct(CparseParams, 0, 0, v);

    v->parser = parser;
    v->lexer = lexer;
    if (! NIL_P(lexmid))
        v->lexmid = value_to_id(lexmid);

    v->debug = RTEST(rb_ivar_get(parser, id_yydebug));

    Check_Type(arg, T_ARRAY);
    if (!(13 <= RARRAY(arg)->len && RARRAY(arg)->len <= 14))
        rb_raise(RaccBug, "[Racc Bug] wrong arg.size %ld", RARRAY(arg)->len);
    v->action_table   = assert_array  (RARRAY(arg)->ptr[ 0]);
    v->action_check   = assert_array  (RARRAY(arg)->ptr[ 1]);
    v->action_default = assert_array  (RARRAY(arg)->ptr[ 2]);
    v->action_pointer = assert_array  (RARRAY(arg)->ptr[ 3]);
    v->goto_table     = assert_array  (RARRAY(arg)->ptr[ 4]);
    v->goto_check     = assert_array  (RARRAY(arg)->ptr[ 5]);
    v->goto_default   = assert_array  (RARRAY(arg)->ptr[ 6]);
    v->goto_pointer   = assert_array  (RARRAY(arg)->ptr[ 7]);
    v->nt_base        = assert_integer(RARRAY(arg)->ptr[ 8]);
    v->reduce_table   = assert_array  (RARRAY(arg)->ptr[ 9]);
    v->token_table    = assert_hash   (RARRAY(arg)->ptr[10]);
    v->shift_n        = assert_integer(RARRAY(arg)->ptr[11]);
    v->reduce_n       = assert_integer(RARRAY(arg)->ptr[12]);
    if (RARRAY(arg)->len > 13) {
        v->use_result_var = RTEST(RARRAY(arg)->ptr[13]);
    }
    else {
        v->use_result_var = Qtrue;
    }

    v->tstack = v->debug ? NEW_STACK() : Qnil;
    v->vstack = NEW_STACK();
    v->state = NEW_STACK();
    v->curstate = 0;
    PUSH(v->state, INT2FIX(0));
    v->t = INT2FIX(FINAL_TOKEN + 1);   /* must not init to FINAL_TOKEN */
    v->nerr = 0;
    v->errstatus = 0;
    rb_ivar_set(parser, id_errstatus, LONG2NUM(v->errstatus));

    v->retval = Qnil;
    v->fin = 0;

    v->lex_is_iterator = Qfalse;
}

static void
extract_user_token(v, block_args, tok, val)
    struct cparse_params *v;
    VALUE block_args;
    VALUE *tok, *val;
{
    if (NIL_P(block_args)) {
        /* EOF */
        *tok = Qfalse;
        *val = rb_str_new("$", 1);
        return;
    }

    if (TYPE(block_args) != T_ARRAY) {
        rb_raise(rb_eTypeError,
                 "%s() %s %s (must be Array[2])",
                 v->lex_is_iterator ? rb_id2name(v->lexmid) : "next_token",
                 v->lex_is_iterator ? "yielded" : "returned",
                 rb_class2name(CLASS_OF(block_args)));
    }
    if (RARRAY(block_args)->len != 2) {
        rb_raise(rb_eArgError,
                 "%s() %s wrong size of array (%ld for 2)",
                 v->lex_is_iterator ? rb_id2name(v->lexmid) : "next_token",
                 v->lex_is_iterator ? "yielded" : "returned",
                 RARRAY(block_args)->len);
    }
    *tok = AREF(block_args, 0);
    *val = AREF(block_args, 1);
}

#define SHIFT(v,act,tok,val) shift(v,act,tok,val)
#define REDUCE(v,act) do {\
    switch (reduce(v,act)) {  \
      case 0: /* normal */    \
        break;                \
      case 1: /* yyerror */   \
        goto user_yyerror;    \
      case 2: /* yyaccept */  \
        D_puts("u accept");   \
        goto accept;          \
      default:                \
        break;                \
    }                         \
} while (0)

static void
parse_main(v, tok, val, resume)
    struct cparse_params *v;
    VALUE tok, val;
    int resume;
{
    long i;              /* table index */
    long act;            /* action type */
    VALUE act_value;     /* action type, VALUE version */
    int read_next = 1;   /* true if we need to read next token */
    VALUE tmp;

    if (resume)
        goto resume;

    while (1) {
        D_puts("");
        D_puts("---- enter new loop ----");
        D_puts("");

        D_printf("(act) k1=%ld\n", v->curstate);
        tmp = AREF(v->action_pointer, v->curstate);
        if (NIL_P(tmp)) goto notfound;
        D_puts("(act) pointer[k1] ok");
        i = NUM2LONG(tmp);

        D_printf("read_next=%d\n", read_next);
        if (read_next && (v->t != vFINAL_TOKEN)) {
            if (v->lex_is_iterator) {
                D_puts("resuming...");
                if (v->fin) rb_raise(rb_eArgError, "token given after EOF");
                v->i = i;  /* save i */
                return;
              resume:
                D_puts("resumed");
                i = v->i;  /* load i */
            }
            else {
                D_puts("next_token");
                tmp = rb_funcall(v->parser, id_nexttoken, 0);
                extract_user_token(v, tmp, &tok, &val);
            }
            /* convert token */
            tmp = rb_hash_aref(v->token_table, tok);
            v->t = NIL_P(tmp) ? vERROR_TOKEN : tmp;
            D_printf("(act) t(k2)=%ld\n", NUM2LONG(v->t));
            if (v->debug) {
                rb_funcall(v->parser, id_d_read_token,
                           3, v->t, tok, val);
            }
        }
        read_next = 0;

        i += NUM2LONG(v->t);
        D_printf("(act) i=%ld\n", i);
        if (i < 0) goto notfound;

        act_value = AREF(v->action_table, i);
        if (NIL_P(act_value)) goto notfound;
        act = NUM2LONG(act_value);
        D_printf("(act) table[i]=%ld\n", act);

        tmp = AREF(v->action_check, i);
        if (NIL_P(tmp)) goto notfound;
        if (NUM2LONG(tmp) != v->curstate) goto notfound;
        D_printf("(act) check[i]=%ld\n", NUM2LONG(tmp));

        D_puts("(act) found");
      act_fixed:
        D_printf("act=%ld\n", act);
        goto handle_act;

      notfound:
        D_puts("(act) not found: use default");
        act_value = AREF(v->action_default, v->curstate);
        act = NUM2LONG(act_value);
        goto act_fixed;

      handle_act:
        if (act > 0 && act < v->shift_n) {
            D_puts("shift");
            if (v->errstatus > 0) {
                v->errstatus--;
                rb_ivar_set(v->parser, id_errstatus, LONG2NUM(v->errstatus));
            }
            SHIFT(v, act, v->t, val);
            read_next = 1;
        }
        else if (act < 0 && act > -(v->reduce_n)) {
            D_puts("reduce");
            REDUCE(v, act);
        }
        else if (act == -(v->reduce_n)) {
            goto error;
          error_recovered:
            ;   /* goto label requires stmt */
        }
        else if (act == v->shift_n) {
            D_puts("accept");
            goto accept;
        }
        else {
            rb_raise(RaccBug, "[Racc Bug] unknown act value %ld", act);
        }

        if (v->debug) {
            rb_funcall(v->parser, id_d_next_state,
                       2, LONG2NUM(v->curstate), v->state);
        }
    }
    /* not reach */

  accept:
    if (v->debug) rb_funcall(v->parser, id_d_accept, 0);
    v->retval = RARRAY(v->vstack)->ptr[0];
    v->fin = CP_FIN_ACCEPT;
    return;

  error:
    D_printf("error detected, status=%ld\n", v->errstatus);
    if (v->errstatus == 0) {
        v->nerr++;
        rb_funcall(v->parser, id_onerror,
                   3, v->t, val, v->vstack);
    }
  user_yyerror:
    if (v->errstatus == 3) {
        if (v->t == vFINAL_TOKEN) {
            v->retval = Qfalse;
            v->fin = CP_FIN_EOT;
            return;
        }
        read_next = 1;
    }
    v->errstatus = 3;
    rb_ivar_set(v->parser, id_errstatus, LONG2NUM(v->errstatus));

    /* check if we can shift/reduce error token */
    D_printf("(err) k1=%ld\n", v->curstate);
    D_printf("(err) k2=%d (error)\n", ERROR_TOKEN);
    while (1) {
        tmp = AREF(v->action_pointer, v->curstate);
        if (NIL_P(tmp)) goto error_pop;
        D_puts("(err) pointer[k1] ok");

        i = NUM2LONG(tmp) + ERROR_TOKEN;
        D_printf("(err) i=%ld\n", i);
        if (i < 0) goto error_pop;

        act_value = AREF(v->action_table, i);
        if (NIL_P(act_value)) {
            D_puts("(err) table[i] == nil");
            goto error_pop;
        }
        act = NUM2LONG(act_value);
        D_printf("(err) table[i]=%ld\n", act);

        tmp = AREF(v->action_check, i);
        if (NIL_P(tmp)) {
            D_puts("(err) check[i] == nil");
            goto error_pop;
        }
        if (NUM2LONG(tmp) != v->curstate) {
            D_puts("(err) check[i] != k1");
            goto error_pop;
        }

        D_puts("(err) found: can handle error token");
        break;

      error_pop:
        D_puts("(err) act not found: can't handle error token; pop");

        if (RARRAY(v->state)->len <= 1) {
            v->retval = Qnil;
            v->fin = CP_FIN_CANTPOP;
            return;
        }
        POP(v->state);
        POP(v->vstack);
        v->curstate = num_to_long(LAST_I(v->state));
        if (v->debug) {
            POP(v->tstack);
            rb_funcall(v->parser, id_d_e_pop,
                       3, v->state, v->tstack, v->vstack);
        }
    }

    /* shift/reduce error token */
    if (act > 0 && act < v->shift_n) {
        D_puts("e shift");
        SHIFT(v, act, ERROR_TOKEN, val);
    }
    else if (act < 0 && act > -(v->reduce_n)) {
        D_puts("e reduce");
        REDUCE(v, act);
    }
    else if (act == v->shift_n) {
        D_puts("e accept");
        goto accept;
    }
    else {
        rb_raise(RaccBug, "[Racc Bug] unknown act value %ld", act);
    }
    goto error_recovered;
}

static void
shift(v, act, tok, val)
    struct cparse_params *v;
    long act;
    VALUE tok, val;
{
    PUSH(v->vstack, val);
    if (v->debug) {
        PUSH(v->tstack, tok);
        rb_funcall(v->parser, id_d_shift,
                   3, tok, v->tstack, v->vstack);
    }
    v->curstate = act;
    PUSH(v->state, LONG2NUM(v->curstate));
}

static int
reduce(v, act)
    struct cparse_params *v;
    long act;
{
    VALUE code;
    v->ruleno = -act * 3;
    code = rb_iterate(catch_iter, Qnil, reduce0, v->value_v);
    v->errstatus = num_to_long(rb_ivar_get(v->parser, id_errstatus));
    return NUM2INT(code);
}

static VALUE
catch_iter(dummy)
    VALUE dummy;
{
    return rb_funcall(rb_mKernel, id_catch, 1, sym_raccjump);
}

static VALUE
reduce0(val, data, self)
    VALUE val, data, self;
{
    struct cparse_params *v;
    VALUE reduce_to, reduce_len, method_id;
    long len;
    ID mid;
    VALUE tmp, tmp_t, tmp_v;
    long i, k1, k2;
    VALUE goto_state;

    Data_Get_Struct(data, struct cparse_params, v);
    reduce_len = RARRAY(v->reduce_table)->ptr[v->ruleno];
    reduce_to  = RARRAY(v->reduce_table)->ptr[v->ruleno+1];
    method_id  = RARRAY(v->reduce_table)->ptr[v->ruleno+2];
    len = NUM2LONG(reduce_len);
    mid = value_to_id(method_id);

    /* call action */
    if (len == 0) {
        tmp = Qnil;
        if (mid != id_noreduce)
            tmp_v = rb_ary_new();
        if (v->debug)
            tmp_t = rb_ary_new();
    }
    else {
        if (mid != id_noreduce) {
            tmp_v = GET_TAIL(v->vstack, len);
            tmp = RARRAY(tmp_v)->ptr[0];
        }
        else {
            tmp = RARRAY(v->vstack)->ptr[ RARRAY(v->vstack)->len - len ];
        }
        CUT_TAIL(v->vstack, len);
        if (v->debug) {
            tmp_t = GET_TAIL(v->tstack, len);
            CUT_TAIL(v->tstack, len);
        }
        CUT_TAIL(v->state, len);
    }
    if (mid != id_noreduce) {
        if (v->use_result_var) {
            tmp = rb_funcall(v->parser, mid,
                             3, tmp_v, v->vstack, tmp);
        }
        else {
            tmp = rb_funcall(v->parser, mid,
                             2, tmp_v, v->vstack);
        }
    }

    /* then push result */
    PUSH(v->vstack, tmp);
    if (v->debug) {
        PUSH(v->tstack, reduce_to);
        rb_funcall(v->parser, id_d_reduce,
                   4, tmp_t, reduce_to, v->tstack, v->vstack);
    }

    /* calculate transition state */
    if (RARRAY(v->state)->len == 0)
        rb_raise(RaccBug, "state stack unexpectedly empty");
    k2 = num_to_long(LAST_I(v->state));
    k1 = num_to_long(reduce_to) - v->nt_base;
    D_printf("(goto) k1=%ld\n", k1);
    D_printf("(goto) k2=%ld\n", k2);

    tmp = AREF(v->goto_pointer, k1);
    if (NIL_P(tmp)) goto notfound;

    i = NUM2LONG(tmp) + k2;
    D_printf("(goto) i=%ld\n", i);
    if (i < 0) goto notfound;

    goto_state = AREF(v->goto_table, i);
    if (NIL_P(goto_state)) {
        D_puts("(goto) table[i] == nil");
        goto notfound;
    }
    D_printf("(goto) table[i]=%ld (goto_state)\n", NUM2LONG(goto_state));

    tmp = AREF(v->goto_check, i);
    if (NIL_P(tmp)) {
        D_puts("(goto) check[i] == nil");
        goto notfound;
    }
    if (tmp != LONG2NUM(k1)) {
        D_puts("(goto) check[i] != table[i]");
        goto notfound;
    }
    D_printf("(goto) check[i]=%ld\n", NUM2LONG(tmp));

    D_puts("(goto) found");
  transit:
    PUSH(v->state, goto_state);
    v->curstate = NUM2LONG(goto_state);
    return INT2FIX(0);

  notfound:
    D_puts("(goto) not found: use default");
    /* overwrite `goto-state' by default value */
    goto_state = AREF(v->goto_default, k1);
    goto transit;
}

/* -----------------------------------------------------------------------
                          Ruby Interface
----------------------------------------------------------------------- */

void
Init_cparse()
{
    VALUE Racc, Parser;
    ID id_racc = rb_intern("Racc");

    if (rb_const_defined(rb_cObject, id_racc)) {
        Racc = rb_const_get(rb_cObject, id_racc);
        Parser = rb_const_get_at(Racc, rb_intern("Parser"));
    }
    else {
        Racc = rb_define_module("Racc");
        Parser = rb_define_class_under(Racc, "Parser", rb_cObject);
    }
    rb_define_private_method(Parser, "_racc_do_parse_c", racc_cparse, 2);
    rb_define_private_method(Parser, "_racc_yyparse_c", racc_yyparse, 4);
    rb_define_const(Parser, "Racc_Runtime_Core_Version_C",
                    rb_str_new2(RACC_VERSION));
    rb_define_const(Parser, "Racc_Runtime_Core_Id_C",
        rb_str_new2("$raccId: cparse.c,v 1.3 2003/11/03 12:20:54 aamine Exp $"));

    CparseParams = rb_define_class_under(Racc, "CparseParams", rb_cObject);

    RaccBug = rb_eRuntimeError;

    id_yydebug      = rb_intern("@yydebug");
    id_nexttoken    = rb_intern("next_token");
    id_onerror      = rb_intern("on_error");
    id_noreduce     = rb_intern("_reduce_none");
    id_catch        = rb_intern("catch");
    id_errstatus    = rb_intern("@racc_error_status");
    sym_raccjump    = id_to_value(rb_intern("racc_jump"));

    id_d_shift       = rb_intern("racc_shift");
    id_d_reduce      = rb_intern("racc_reduce");
    id_d_accept      = rb_intern("racc_accept");
    id_d_read_token  = rb_intern("racc_read_token");
    id_d_next_state  = rb_intern("racc_next_state");
    id_d_e_pop       = rb_intern("racc_e_pop");
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/readline/readline.c

root/ext/readline/readline.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. readline_event
  2. readline_readline
  3. readline_s_set_input
  4. readline_s_set_output
  5. readline_s_set_completion_proc
  6. readline_s_get_completion_proc
  7. readline_s_set_completion_case_fold
  8. readline_s_get_completion_case_fold
  9. readline_attempted_completion_function
  10. readline_s_vi_editing_mode
  11. readline_s_emacs_editing_mode
  12. readline_s_set_completion_append_character
  13. readline_s_get_completion_append_character
  14. readline_s_set_basic_word_break_characters
  15. readline_s_get_basic_word_break_characters
  16. readline_s_set_completer_word_break_characters
  17. readline_s_get_completer_word_break_characters
  18. readline_s_set_basic_quote_characters
  19. readline_s_get_basic_quote_characters
  20. readline_s_set_completer_quote_characters
  21. readline_s_get_completer_quote_characters
  22. readline_s_set_filename_quote_characters
  23. readline_s_get_filename_quote_characters
  24. hist_to_s
  25. hist_get
  26. hist_set
  27. hist_push
  28. hist_push_method
  29. rb_remove_history
  30. hist_pop
  31. hist_shift
  32. hist_each
  33. hist_length
  34. hist_empty_p
  35. hist_delete_at
  36. filename_completion_proc_call
  37. username_completion_proc_call
  38. Init_readline
/* readline.c -- GNU Readline module
   Copyright (C) 1997-2001  Shugo Maeda */

#include <errno.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#ifdef HAVE_READLINE_READLINE_H
#include <readline/readline.h>
#endif
#ifdef HAVE_READLINE_HISTORY_H
#include <readline/history.h>
#endif
#ifdef HAVE_EDITLINE_READLINE_H
#include <editline/readline.h>
#endif

#include "ruby.h"
#include "rubyio.h"
#include "rubysig.h"

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

static VALUE mReadline;

#define TOLOWER(c) (isupper(c) ? tolower(c) : c)

#define COMPLETION_PROC "completion_proc"
#define COMPLETION_CASE_FOLD "completion_case_fold"
static ID completion_proc, completion_case_fold;

#ifndef HAVE_RL_FILENAME_COMPLETION_FUNCTION
# define rl_filename_completion_function filename_completion_function
# define rl_username_completion_function username_completion_function
# define rl_completion_matches completion_matches
#endif

static int readline_event(void);
static char **readline_attempted_completion_function(const char *text,
                                                     int start, int end);

static int
readline_event()
{
    CHECK_INTS;
    rb_thread_schedule();
    return 0;
}

static VALUE
readline_readline(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    VALUE tmp, add_hist, result;
    char *prompt = NULL;
    char *buff;
    int status;

    rb_secure(4);
    if (rb_scan_args(argc, argv, "02", &tmp, &add_hist) > 0) {
        SafeStringValue(tmp);
        prompt = RSTRING(tmp)->ptr;
    }

    if (!isatty(0) && errno == EBADF) rb_raise(rb_eIOError, "stdin closed");

    buff = (char*)rb_protect((VALUE(*)_((VALUE)))readline, (VALUE)prompt,
                              &status);
    if (status) {
#if defined HAVE_RL_CLEANUP_AFTER_SIGNAL
        /* restore terminal mode and signal handler*/
        rl_cleanup_after_signal();
#elif defined HAVE_RL_DEPREP_TERM_FUNCTION
        /* restore terminal mode */
        (*rl_deprep_term_function)();
#else
        rl_deprep_terminal();
#endif
        rb_jump_tag(status);
    }

    if (RTEST(add_hist) && buff) {
        add_history(buff);
    }
    if (buff)
        result = rb_tainted_str_new2(buff);
    else
        result = Qnil;
    if (buff) free(buff);
    return result;
}

static VALUE
readline_s_set_input(self, input)
    VALUE self, input;
{
    OpenFile *ifp;

    rb_secure(4);
    Check_Type(input, T_FILE);
    GetOpenFile(input, ifp);
    rl_instream = rb_io_stdio_file(ifp);
    return input;
}

static VALUE
readline_s_set_output(self, output)
    VALUE self, output;
{
    OpenFile *ofp;

    rb_secure(4);
    Check_Type(output, T_FILE);
    GetOpenFile(output, ofp);
    rl_outstream = rb_io_stdio_file(ofp);
    return output;
}

static VALUE
readline_s_set_completion_proc(self, proc)
    VALUE self;
    VALUE proc;
{
    rb_secure(4);
    if (!rb_respond_to(proc, rb_intern("call")))
        rb_raise(rb_eArgError, "argument must respond to `call'");
    return rb_ivar_set(mReadline, completion_proc, proc);
}

static VALUE
readline_s_get_completion_proc(self)
    VALUE self;
{
    rb_secure(4);
    return rb_attr_get(mReadline, completion_proc);
}

static VALUE
readline_s_set_completion_case_fold(self, val)
    VALUE self;
    VALUE val;
{
    rb_secure(4);
    return rb_ivar_set(mReadline, completion_case_fold, val);
}

static VALUE
readline_s_get_completion_case_fold(self)
    VALUE self;
{
    rb_secure(4);
    return rb_attr_get(mReadline, completion_case_fold);
}

static char **
readline_attempted_completion_function(text, start, end)
    const char *text;
    int start;
    int end;
{
    VALUE proc, ary, temp;
    char **result;
    int case_fold;
    int i, matches;

    proc = rb_attr_get(mReadline, completion_proc);
    if (NIL_P(proc))
        return NULL;
#ifdef HAVE_RL_ATTEMPTED_COMPLETION_OVER
    rl_attempted_completion_over = 1;
#endif
    case_fold = RTEST(rb_attr_get(mReadline, completion_case_fold));
    ary = rb_funcall(proc, rb_intern("call"), 1, rb_tainted_str_new2(text));
    if (TYPE(ary) != T_ARRAY)
        ary = rb_Array(ary);
    matches = RARRAY(ary)->len;
    if (matches == 0)
        return NULL;
    result = ALLOC_N(char *, matches + 2);
    for (i = 0; i < matches; i++) {
        temp = rb_obj_as_string(RARRAY(ary)->ptr[i]);
        result[i + 1] = ALLOC_N(char, RSTRING(temp)->len + 1);
        strcpy(result[i + 1], RSTRING(temp)->ptr);
    }
    result[matches + 1] = NULL;

    if (matches == 1) {
        result[0] = strdup(result[1]);
    }
    else {
        register int i = 1;
        int low = 100000;

        while (i < matches) {
            register int c1, c2, si;

            if (case_fold) {
                for (si = 0;
                     (c1 = TOLOWER(result[i][si])) &&
                         (c2 = TOLOWER(result[i + 1][si]));
                     si++)
                    if (c1 != c2) break;
            } else {
                for (si = 0;
                     (c1 = result[i][si]) &&
                         (c2 = result[i + 1][si]);
                     si++)
                    if (c1 != c2) break;
            }

            if (low > si) low = si;
            i++;
        }
        result[0] = ALLOC_N(char, low + 1);
        strncpy(result[0], result[1], low);
        result[0][low] = '\0';
    }

    return result;
}

static VALUE
readline_s_vi_editing_mode(self)
    VALUE self;
{
#ifdef HAVE_RL_VI_EDITING_MODE
    rb_secure(4);
    rl_vi_editing_mode(1,0);
    return Qnil;
#else
    rb_notimplement();
    return Qnil; /* not reached */
#endif /* HAVE_RL_VI_EDITING_MODE */
}

static VALUE
readline_s_emacs_editing_mode(self)
    VALUE self;
{
#ifdef HAVE_RL_EMACS_EDITING_MODE
    rb_secure(4);
    rl_emacs_editing_mode(1,0);
    return Qnil;
#else
    rb_notimplement();
    return Qnil; /* not reached */
#endif /* HAVE_RL_EMACS_EDITING_MODE */
}

static VALUE
readline_s_set_completion_append_character(self, str)
    VALUE self, str;
{
#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
    rb_secure(4);
    if (NIL_P(str)) {
        rl_completion_append_character = '\0';
    }
    else {
        SafeStringValue(str);
        if (RSTRING(str)->len == 0) {
            rl_completion_append_character = '\0';
        } else {
            rl_completion_append_character = RSTRING(str)->ptr[0];
        }
    }
    return self;
#else
    rb_notimplement();
    return Qnil; /* not reached */
#endif /* HAVE_RL_COMPLETION_APPEND_CHARACTER */
}

static VALUE
readline_s_get_completion_append_character(self)
    VALUE self;
{
#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
    VALUE str;

    rb_secure(4);
    if (rl_completion_append_character == '\0')
        return Qnil;

    str = rb_str_new("", 1);
    RSTRING(str)->ptr[0] = rl_completion_append_character;
    return str;
#else
    rb_notimplement();
    return Qnil; /* not reached */
#endif /* HAVE_RL_COMPLETION_APPEND_CHARACTER */
}

static VALUE
readline_s_set_basic_word_break_characters(self, str)
    VALUE self, str;
{
#ifdef HAVE_RL_BASIC_WORD_BREAK_CHARACTERS
    static char *basic_word_break_characters = NULL;

    rb_secure(4);
    SafeStringValue(str);
    if (basic_word_break_characters == NULL) {
        basic_word_break_characters =
            ALLOC_N(char, RSTRING(str)->len + 1);
    }
    else {
        REALLOC_N(basic_word_break_characters, char, RSTRING(str)->len + 1);
    }
    strncpy(basic_word_break_characters,
            RSTRING(str)->ptr, RSTRING(str)->len);
    basic_word_break_characters[RSTRING(str)->len] = '\0';
    rl_basic_word_break_characters = basic_word_break_characters;
    return self;
#else
    rb_notimplement();
    return Qnil; /* not reached */
#endif /* HAVE_RL_BASIC_WORD_BREAK_CHARACTERS */
}

static VALUE
readline_s_get_basic_word_break_characters(self, str)
    VALUE self, str;
{
#ifdef HAVE_RL_BASIC_WORD_BREAK_CHARACTERS
    rb_secure(4);
    if (rl_basic_word_break_characters == NULL)
        return Qnil;
    return rb_tainted_str_new2(rl_basic_word_break_characters);
#else
    rb_notimplement();
    return Qnil; /* not reached */
#endif /* HAVE_RL_BASIC_WORD_BREAK_CHARACTERS */
}

static VALUE
readline_s_set_completer_word_break_characters(self, str)
    VALUE self, str;
{
#ifdef HAVE_RL_COMPLETER_WORD_BREAK_CHARACTERS
    static char *completer_word_break_characters = NULL;

    rb_secure(4);
    SafeStringValue(str);
    if (completer_word_break_characters == NULL) {
        completer_word_break_characters =
            ALLOC_N(char, RSTRING(str)->len + 1);
    }
    else {
        REALLOC_N(completer_word_break_characters, char, RSTRING(str)->len + 1);
    }
    strncpy(completer_word_break_characters,
            RSTRING(str)->ptr, RSTRING(str)->len);
    completer_word_break_characters[RSTRING(str)->len] = '\0';
    rl_completer_word_break_characters = completer_word_break_characters;
    return self;
#else
    rb_notimplement();
    return Qnil; /* not reached */
#endif /* HAVE_RL_COMPLETER_WORD_BREAK_CHARACTERS */
}

static VALUE
readline_s_get_completer_word_break_characters(self, str)
    VALUE self, str;
{
#ifdef HAVE_RL_COMPLETER_WORD_BREAK_CHARACTERS
    rb_secure(4);
    if (rl_completer_word_break_characters == NULL)
        return Qnil;
    return rb_tainted_str_new2(rl_completer_word_break_characters);
#else
    rb_notimplement();
    return Qnil; /* not reached */
#endif /* HAVE_RL_COMPLETER_WORD_BREAK_CHARACTERS */
}

static VALUE
readline_s_set_basic_quote_characters(self, str)
    VALUE self, str;
{
#ifdef HAVE_RL_BASIC_QUOTE_CHARACTERS
    static char *basic_quote_characters = NULL;

    rb_secure(4);
    SafeStringValue(str);
    if (basic_quote_characters == NULL) {
        basic_quote_characters =
            ALLOC_N(char, RSTRING(str)->len + 1);
    }
    else {
        REALLOC_N(basic_quote_characters, char, RSTRING(str)->len + 1);
    }
    strncpy(basic_quote_characters,
            RSTRING(str)->ptr, RSTRING(str)->len);
    basic_quote_characters[RSTRING(str)->len] = '\0';
    rl_basic_quote_characters = basic_quote_characters;

    return self;
#else
    rb_notimplement();
    return Qnil; /* not reached */
#endif /* HAVE_RL_BASIC_QUOTE_CHARACTERS */
}

static VALUE
readline_s_get_basic_quote_characters(self, str)
    VALUE self, str;
{
#ifdef HAVE_RL_BASIC_QUOTE_CHARACTERS
    rb_secure(4);
    if (rl_basic_quote_characters == NULL)
        return Qnil;
    return rb_tainted_str_new2(rl_basic_quote_characters);
#else
    rb_notimplement();
    return Qnil; /* not reached */
#endif /* HAVE_RL_BASIC_QUOTE_CHARACTERS */
}

static VALUE
readline_s_set_completer_quote_characters(self, str)
    VALUE self, str;
{
#ifdef HAVE_RL_COMPLETER_QUOTE_CHARACTERS
    static char *completer_quote_characters = NULL;

    rb_secure(4);
    SafeStringValue(str);
    if (completer_quote_characters == NULL) {
        completer_quote_characters =
            ALLOC_N(char, RSTRING(str)->len + 1);
    }
    else {
        REALLOC_N(completer_quote_characters, char, RSTRING(str)->len + 1);
    }
    strncpy(completer_quote_characters,
            RSTRING(str)->ptr, RSTRING(str)->len);
    completer_quote_characters[RSTRING(str)->len] = '\0';
    rl_completer_quote_characters = completer_quote_characters;

    return self;
#else
    rb_notimplement();
    return Qnil; /* not reached */
#endif /* HAVE_RL_COMPLETER_QUOTE_CHARACTERS */
}

static VALUE
readline_s_get_completer_quote_characters(self, str)
    VALUE self, str;
{
#ifdef HAVE_RL_COMPLETER_QUOTE_CHARACTERS
    rb_secure(4);
    if (rl_completer_quote_characters == NULL)
        return Qnil;
    return rb_tainted_str_new2(rl_completer_quote_characters);
#else
    rb_notimplement();
    return Qnil; /* not reached */
#endif /* HAVE_RL_COMPLETER_QUOTE_CHARACTERS */
}

static VALUE
readline_s_set_filename_quote_characters(self, str)
    VALUE self, str;
{
#ifdef HAVE_RL_FILENAME_QUOTE_CHARACTERS
    static char *filename_quote_characters = NULL;

    rb_secure(4);
    SafeStringValue(str);
    if (filename_quote_characters == NULL) {
        filename_quote_characters =
            ALLOC_N(char, RSTRING(str)->len + 1);
    }
    else {
        REALLOC_N(filename_quote_characters, char, RSTRING(str)->len + 1);
    }
    strncpy(filename_quote_characters,
            RSTRING(str)->ptr, RSTRING(str)->len);
    filename_quote_characters[RSTRING(str)->len] = '\0';
    rl_filename_quote_characters = filename_quote_characters;

    return self;
#else
    rb_notimplement();
    return Qnil; /* not reached */
#endif /* HAVE_RL_FILENAME_QUOTE_CHARACTERS */
}

static VALUE
readline_s_get_filename_quote_characters(self, str)
    VALUE self, str;
{
#ifdef HAVE_RL_FILENAME_QUOTE_CHARACTERS
    rb_secure(4);
    if (rl_filename_quote_characters == NULL)
        return Qnil;
    return rb_tainted_str_new2(rl_filename_quote_characters);
#else
    rb_notimplement();
    return Qnil; /* not reached */
#endif /* HAVE_RL_FILENAME_QUOTE_CHARACTERS */
}

static VALUE
hist_to_s(self)
    VALUE self;
{
    return rb_str_new2("HISTORY");
}

static VALUE
hist_get(self, index)
    VALUE self;
    VALUE index;
{
    HIST_ENTRY *entry;
    int i;

    rb_secure(4);
    i = NUM2INT(index);
    if (i < 0) {
        i += history_length;
    }
    entry = history_get(history_base + i);
    if (entry == NULL) {
        rb_raise(rb_eIndexError, "invalid index");
    }
    return rb_tainted_str_new2(entry->line);
}

static VALUE
hist_set(self, index, str)
    VALUE self;
    VALUE index;
    VALUE str;
{
#ifdef HAVE_REPLACE_HISTORY_ENTRY
    HIST_ENTRY *entry;
    int i;

    rb_secure(4);
    i = NUM2INT(index);
    SafeStringValue(str);
    if (i < 0) {
        i += history_length;
    }
    entry = replace_history_entry(i, RSTRING(str)->ptr, NULL);
    if (entry == NULL) {
        rb_raise(rb_eIndexError, "invalid index");
    }
    return str;
#else
    rb_notimplement();
    return Qnil; /* not reached */
#endif
}

static VALUE
hist_push(self, str)
    VALUE self;
    VALUE str;
{
    rb_secure(4);
    SafeStringValue(str);
    add_history(RSTRING(str)->ptr);
    return self;
}

static VALUE
hist_push_method(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    VALUE str;

    rb_secure(4);
    while (argc--) {
        str = *argv++;
        SafeStringValue(str);
        add_history(RSTRING(str)->ptr);
    }
    return self;
}

static VALUE
rb_remove_history(index)
    int index;
{
#ifdef HAVE_REMOVE_HISTORY
    HIST_ENTRY *entry;
    VALUE val;

    rb_secure(4);
    entry = remove_history(index);
    if (entry) {
        val = rb_tainted_str_new2(entry->line);
        free(entry->line);
        free(entry);
        return val;
    }
    return Qnil;
#else
    rb_notimplement();
    return Qnil; /* not reached */
#endif
}

static VALUE
hist_pop(self)
    VALUE self;
{
    rb_secure(4);
    if (history_length > 0) {
        return rb_remove_history(history_length - 1);
    } else {
        return Qnil;
    }
}

static VALUE
hist_shift(self)
    VALUE self;
{
    rb_secure(4);
    if (history_length > 0) {
        return rb_remove_history(0);
    } else {
        return Qnil;
    }
}

static VALUE
hist_each(self)
    VALUE self;
{
    HIST_ENTRY *entry;
    int i;

    rb_secure(4);
    for (i = 0; i < history_length; i++) {
        entry = history_get(history_base + i);
        if (entry == NULL)
            break;
        rb_yield(rb_tainted_str_new2(entry->line));
    }
    return self;
}

static VALUE
hist_length(self)
    VALUE self;
{
    rb_secure(4);
    return INT2NUM(history_length);
}

static VALUE
hist_empty_p(self)
    VALUE self;
{
    rb_secure(4);
    return history_length == 0 ? Qtrue : Qfalse;
}

static VALUE
hist_delete_at(self, index)
    VALUE self;
    VALUE index;
{
    int i;

    rb_secure(4);
    i = NUM2INT(index);
    if (i < 0)
        i += history_length;
    if (i < 0 || i > history_length - 1) {
        rb_raise(rb_eIndexError, "invalid index");
    }
    return rb_remove_history(i);
}

static VALUE
filename_completion_proc_call(self, str)
    VALUE self;
    VALUE str;
{
    VALUE result;
    char **matches;
    int i;

    matches = rl_completion_matches(StringValuePtr(str),
                                    rl_filename_completion_function);
    if (matches) {
        result = rb_ary_new();
        for (i = 0; matches[i]; i++) {
            rb_ary_push(result, rb_tainted_str_new2(matches[i]));
            free(matches[i]);
        }
        free(matches);
        if (RARRAY(result)->len >= 2)
            rb_ary_shift(result);
    }
    else {
        result = Qnil;
    }
    return result;
}

static VALUE
username_completion_proc_call(self, str)
    VALUE self;
    VALUE str;
{
    VALUE result;
    char **matches;
    int i;

    matches = rl_completion_matches(StringValuePtr(str),
                                    rl_username_completion_function);
    if (matches) {
        result = rb_ary_new();
        for (i = 0; matches[i]; i++) {
            rb_ary_push(result, rb_tainted_str_new2(matches[i]));
            free(matches[i]);
        }
        free(matches);
        if (RARRAY(result)->len >= 2)
            rb_ary_shift(result);
    }
    else {
        result = Qnil;
    }
    return result;
}

void
Init_readline()
{
    VALUE history, fcomp, ucomp;

    /* Allow conditional parsing of the ~/.inputrc file. */
    rl_readline_name = "Ruby";

    using_history();

    completion_proc = rb_intern(COMPLETION_PROC);
    completion_case_fold = rb_intern(COMPLETION_CASE_FOLD);

    mReadline = rb_define_module("Readline");
    rb_define_module_function(mReadline, "readline",
                              readline_readline, -1);
    rb_define_singleton_method(mReadline, "input=",
                               readline_s_set_input, 1);
    rb_define_singleton_method(mReadline, "output=",
                               readline_s_set_output, 1);
    rb_define_singleton_method(mReadline, "completion_proc=",
                               readline_s_set_completion_proc, 1);
    rb_define_singleton_method(mReadline, "completion_proc",
                               readline_s_get_completion_proc, 0);
    rb_define_singleton_method(mReadline, "completion_case_fold=",
                               readline_s_set_completion_case_fold, 1);
    rb_define_singleton_method(mReadline, "completion_case_fold",
                               readline_s_get_completion_case_fold, 0);
    rb_define_singleton_method(mReadline, "vi_editing_mode",
                               readline_s_vi_editing_mode, 0);
    rb_define_singleton_method(mReadline, "emacs_editing_mode",
                               readline_s_emacs_editing_mode, 0);
    rb_define_singleton_method(mReadline, "completion_append_character=",
                               readline_s_set_completion_append_character, 1);
    rb_define_singleton_method(mReadline, "completion_append_character",
                               readline_s_get_completion_append_character, 0);
    rb_define_singleton_method(mReadline, "basic_word_break_characters=",
                               readline_s_set_basic_word_break_characters, 1);
    rb_define_singleton_method(mReadline, "basic_word_break_characters",
                               readline_s_get_basic_word_break_characters, 0);
    rb_define_singleton_method(mReadline, "completer_word_break_characters=",
                               readline_s_set_completer_word_break_characters, 1);
    rb_define_singleton_method(mReadline, "completer_word_break_characters",
                               readline_s_get_completer_word_break_characters, 0);
    rb_define_singleton_method(mReadline, "basic_quote_characters=",
                               readline_s_set_basic_quote_characters, 1);
    rb_define_singleton_method(mReadline, "basic_quote_characters",
                               readline_s_get_basic_quote_characters, 0);
    rb_define_singleton_method(mReadline, "completer_quote_characters=",
                               readline_s_set_completer_quote_characters, 1);
    rb_define_singleton_method(mReadline, "completer_quote_characters",
                               readline_s_get_completer_quote_characters, 0);
    rb_define_singleton_method(mReadline, "filename_quote_characters=",
                               readline_s_set_filename_quote_characters, 1);
    rb_define_singleton_method(mReadline, "filename_quote_characters",
                               readline_s_get_filename_quote_characters, 0);

    history = rb_obj_alloc(rb_cObject);
    rb_extend_object(history, rb_mEnumerable);
    rb_define_singleton_method(history,"to_s", hist_to_s, 0);
    rb_define_singleton_method(history,"[]", hist_get, 1);
    rb_define_singleton_method(history,"[]=", hist_set, 2);
    rb_define_singleton_method(history,"<<", hist_push, 1);
    rb_define_singleton_method(history,"push", hist_push_method, -1);
    rb_define_singleton_method(history,"pop", hist_pop, 0);
    rb_define_singleton_method(history,"shift", hist_shift, 0);
    rb_define_singleton_method(history,"each", hist_each, 0);
    rb_define_singleton_method(history,"length", hist_length, 0);
    rb_define_singleton_method(history,"size", hist_length, 0);
    rb_define_singleton_method(history,"empty?", hist_empty_p, 0);
    rb_define_singleton_method(history,"delete_at", hist_delete_at, 1);
    rb_define_const(mReadline, "HISTORY", history);

    fcomp = rb_obj_alloc(rb_cObject);
    rb_define_singleton_method(fcomp, "call",
                               filename_completion_proc_call, 1);
    rb_define_const(mReadline, "FILENAME_COMPLETION_PROC", fcomp);

    ucomp = rb_obj_alloc(rb_cObject);
    rb_define_singleton_method(ucomp, "call",
                               username_completion_proc_call, 1);
    rb_define_const(mReadline, "USERNAME_COMPLETION_PROC", ucomp);
#if defined HAVE_RL_LIBRARY_VERSION
    rb_define_const(mReadline, "VERSION", rb_str_new2(rl_library_version));
#else
    rb_define_const(mReadline, "VERSION", rb_str_new2("2.0 or prior version"));
#endif

    rl_attempted_completion_function = readline_attempted_completion_function;
#ifdef HAVE_RL_EVENT_HOOK
    rl_event_hook = readline_event;
#endif
#ifdef HAVE_RL_CLEAR_SIGNALS
    rl_clear_signals();
#endif
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/ripper/eventids2.c

root/ext/ripper/eventids2.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. ripper_init_eventids2
  2. ripper_token2eventid
#define tIGNORED_NL      (tLAST_TOKEN + 1)
#define tCOMMENT         (tLAST_TOKEN + 2)
#define tEMBDOC_BEG      (tLAST_TOKEN + 3)
#define tEMBDOC          (tLAST_TOKEN + 4)
#define tEMBDOC_END      (tLAST_TOKEN + 5)
#define tSP              (tLAST_TOKEN + 6)
#define tHEREDOC_BEG     (tLAST_TOKEN + 7)
#define tHEREDOC_END     (tLAST_TOKEN + 8)
#define k__END__         (tLAST_TOKEN + 9)
#define tCHAR            (tLAST_TOKEN + 10)

static ID ripper_id_backref;
static ID ripper_id_backtick;
static ID ripper_id_comma;
static ID ripper_id_const;
static ID ripper_id_cvar;
static ID ripper_id_embexpr_beg;
static ID ripper_id_embexpr_end;
static ID ripper_id_embvar;
static ID ripper_id_float;
static ID ripper_id_gvar;
static ID ripper_id_ident;
static ID ripper_id_int;
static ID ripper_id_ivar;
static ID ripper_id_kw;
static ID ripper_id_lbrace;
static ID ripper_id_lbracket;
static ID ripper_id_lparen;
static ID ripper_id_nl;
static ID ripper_id_op;
static ID ripper_id_period;
static ID ripper_id_rbrace;
static ID ripper_id_rbracket;
static ID ripper_id_rparen;
static ID ripper_id_semicolon;
static ID ripper_id_symbeg;
static ID ripper_id_tstring_beg;
static ID ripper_id_tstring_content;
static ID ripper_id_tstring_end;
static ID ripper_id_words_beg;
static ID ripper_id_qwords_beg;
static ID ripper_id_words_sep;
static ID ripper_id_regexp_beg;
static ID ripper_id_regexp_end;
static ID ripper_id_label;
static ID ripper_id_tlambda;
static ID ripper_id_tlambda_arg;
static ID ripper_id_tlambeg;

static ID ripper_id_ignored_nl;
static ID ripper_id_comment;
static ID ripper_id_embdoc_beg;
static ID ripper_id_embdoc;
static ID ripper_id_embdoc_end;
static ID ripper_id_sp;
static ID ripper_id_heredoc_beg;
static ID ripper_id_heredoc_end;
static ID ripper_id___end__;
static ID ripper_id_CHAR;

#include "eventids2table.c"

static void
ripper_init_eventids2(VALUE self)
{
    ripper_id_backref = rb_intern("on_backref");
    ripper_id_backtick = rb_intern("on_backtick");
    ripper_id_comma = rb_intern("on_comma");
    ripper_id_const = rb_intern("on_const");
    ripper_id_cvar = rb_intern("on_cvar");
    ripper_id_embexpr_beg = rb_intern("on_embexpr_beg");
    ripper_id_embexpr_end = rb_intern("on_embexpr_end");
    ripper_id_embvar = rb_intern("on_embvar");
    ripper_id_float = rb_intern("on_float");
    ripper_id_gvar = rb_intern("on_gvar");
    ripper_id_ident = rb_intern("on_ident");
    ripper_id_int = rb_intern("on_int");
    ripper_id_ivar = rb_intern("on_ivar");
    ripper_id_kw = rb_intern("on_kw");
    ripper_id_lbrace = rb_intern("on_lbrace");
    ripper_id_lbracket = rb_intern("on_lbracket");
    ripper_id_lparen = rb_intern("on_lparen");
    ripper_id_nl = rb_intern("on_nl");
    ripper_id_op = rb_intern("on_op");
    ripper_id_period = rb_intern("on_period");
    ripper_id_rbrace = rb_intern("on_rbrace");
    ripper_id_rbracket = rb_intern("on_rbracket");
    ripper_id_rparen = rb_intern("on_rparen");
    ripper_id_semicolon = rb_intern("on_semicolon");
    ripper_id_symbeg = rb_intern("on_symbeg");
    ripper_id_tstring_beg = rb_intern("on_tstring_beg");
    ripper_id_tstring_content = rb_intern("on_tstring_content");
    ripper_id_tstring_end = rb_intern("on_tstring_end");
    ripper_id_words_beg = rb_intern("on_words_beg");
    ripper_id_qwords_beg = rb_intern("on_qwords_beg");
    ripper_id_words_sep = rb_intern("on_words_sep");
    ripper_id_regexp_beg = rb_intern("on_regexp_beg");
    ripper_id_regexp_end = rb_intern("on_regexp_end");
    ripper_id_label = rb_intern("on_label");
    ripper_id_tlambda = rb_intern("on_tlambda");
    ripper_id_tlambda_arg = rb_intern("on_tlambda_arg");
    ripper_id_tlambeg = rb_intern("on_tlambeg");

    ripper_id_ignored_nl = rb_intern("on_ignored_nl");
    ripper_id_comment = rb_intern("on_comment");
    ripper_id_embdoc_beg = rb_intern("on_embdoc_beg");
    ripper_id_embdoc = rb_intern("on_embdoc");
    ripper_id_embdoc_end = rb_intern("on_embdoc_end");
    ripper_id_sp = rb_intern("on_sp");
    ripper_id_heredoc_beg = rb_intern("on_heredoc_beg");
    ripper_id_heredoc_end = rb_intern("on_heredoc_end");
    ripper_id___end__ = rb_intern("on___end__");
    ripper_id_CHAR = rb_intern("on_CHAR");

    ripper_init_eventids2_table(self);
}

static struct token_assoc {
    int token;
    ID *id;
} token_to_eventid[] = {
    {' ',               &ripper_id_words_sep},
    {'!',               &ripper_id_op},
    {'%',               &ripper_id_op},
    {'&',               &ripper_id_op},
    {'*',               &ripper_id_op},
    {'+',               &ripper_id_op},
    {'-',               &ripper_id_op},
    {'/',               &ripper_id_op},
    {'<',               &ripper_id_op},
    {'=',               &ripper_id_op},
    {'>',               &ripper_id_op},
    {'?',               &ripper_id_op},
    {'^',               &ripper_id_op},
    {'|',               &ripper_id_op},
    {'~',               &ripper_id_op},
    {':',               &ripper_id_op},
    {',',               &ripper_id_comma},
    {'.',               &ripper_id_period},
    {';',               &ripper_id_semicolon},
    {'`',               &ripper_id_backtick},
    {'\n',              &ripper_id_nl},
    {kALIAS,            &ripper_id_kw},
    {kAND,              &ripper_id_kw},
    {kBEGIN,            &ripper_id_kw},
    {kBREAK,            &ripper_id_kw},
    {kCASE,             &ripper_id_kw},
    {kCLASS,            &ripper_id_kw},
    {kDEF,              &ripper_id_kw},
    {kDEFINED,          &ripper_id_kw},
    {kDO,               &ripper_id_kw},
    {kDO_BLOCK,         &ripper_id_kw},
    {kDO_COND,          &ripper_id_kw},
    {kELSE,             &ripper_id_kw},
    {kELSIF,            &ripper_id_kw},
    {kEND,              &ripper_id_kw},
    {kENSURE,           &ripper_id_kw},
    {kFALSE,            &ripper_id_kw},
    {kFOR,              &ripper_id_kw},
    {kIF,               &ripper_id_kw},
    {kIF_MOD,           &ripper_id_kw},
    {kIN,               &ripper_id_kw},
    {kMODULE,           &ripper_id_kw},
    {kNEXT,             &ripper_id_kw},
    {kNIL,              &ripper_id_kw},
    {kNOT,              &ripper_id_kw},
    {kOR,               &ripper_id_kw},
    {kREDO,             &ripper_id_kw},
    {kRESCUE,           &ripper_id_kw},
    {kRESCUE_MOD,       &ripper_id_kw},
    {kRETRY,            &ripper_id_kw},
    {kRETURN,           &ripper_id_kw},
    {kSELF,             &ripper_id_kw},
    {kSUPER,            &ripper_id_kw},
    {kTHEN,             &ripper_id_kw},
    {kTRUE,             &ripper_id_kw},
    {kUNDEF,            &ripper_id_kw},
    {kUNLESS,           &ripper_id_kw},
    {kUNLESS_MOD,       &ripper_id_kw},
    {kUNTIL,            &ripper_id_kw},
    {kUNTIL_MOD,        &ripper_id_kw},
    {kWHEN,             &ripper_id_kw},
    {kWHILE,            &ripper_id_kw},
    {kWHILE_MOD,        &ripper_id_kw},
    {kYIELD,            &ripper_id_kw},
    {k__FILE__,         &ripper_id_kw},
    {k__LINE__,         &ripper_id_kw},
    {klBEGIN,           &ripper_id_kw},
    {klEND,             &ripper_id_kw},
    {tAMPER,            &ripper_id_op},
    {tANDOP,            &ripper_id_op},
    {tAREF,             &ripper_id_op},
    {tASET,             &ripper_id_op},
    {tASSOC,            &ripper_id_op},
    {tBACK_REF,         &ripper_id_backref},
    {tCMP,              &ripper_id_op},
    {tCOLON2,           &ripper_id_op},
    {tCOLON3,           &ripper_id_op},
    {tCONSTANT,         &ripper_id_const},
    {tCVAR,             &ripper_id_cvar},
    {tDOT2,             &ripper_id_op},
    {tDOT3,             &ripper_id_op},
    {tEQ,               &ripper_id_op},
    {tEQQ,              &ripper_id_op},
    {tFID,              &ripper_id_ident},
    {tFLOAT,            &ripper_id_float},
    {tGEQ,              &ripper_id_op},
    {tGVAR,             &ripper_id_gvar},
    {tIDENTIFIER,       &ripper_id_ident},
    {tINTEGER,          &ripper_id_int},
    {tIVAR,             &ripper_id_ivar},
    {tLBRACE,           &ripper_id_lbrace},
    {tLBRACE_ARG,       &ripper_id_lbrace},
    {'{',               &ripper_id_lbrace},
    {'}',               &ripper_id_rbrace},
    {tLBRACK,           &ripper_id_lbracket},
    {'[',               &ripper_id_lbracket},
    {']',               &ripper_id_rbracket},
    {tLEQ,              &ripper_id_op},
    {tLPAREN,           &ripper_id_lparen},
    {tLPAREN_ARG,       &ripper_id_lparen},
    {'(',               &ripper_id_lparen},
    {')',               &ripper_id_rparen},
    {tLSHFT,            &ripper_id_op},
    {tMATCH,            &ripper_id_op},
    {tNEQ,              &ripper_id_op},
    {tNMATCH,           &ripper_id_op},
    {tNTH_REF,          &ripper_id_backref},
    {tOP_ASGN,          &ripper_id_op},
    {tOROP,             &ripper_id_op},
    {tPOW,              &ripper_id_op},
    {tQWORDS_BEG,       &ripper_id_qwords_beg},
    {tREGEXP_BEG,       &ripper_id_regexp_beg},
    {tREGEXP_END,       &ripper_id_regexp_end},
    {tRPAREN,           &ripper_id_rparen},
    {tRSHFT,            &ripper_id_op},
    {tSTAR,             &ripper_id_op},
    {tSTRING_BEG,       &ripper_id_tstring_beg},
    {tSTRING_CONTENT,   &ripper_id_tstring_content},
    {tSTRING_DBEG,      &ripper_id_embexpr_beg},
    {tSTRING_DVAR,      &ripper_id_embvar},
    {tSTRING_END,       &ripper_id_tstring_end},
    {tSYMBEG,           &ripper_id_symbeg},
    {tUMINUS,           &ripper_id_op},
    {tUMINUS_NUM,       &ripper_id_op},
    {tUPLUS,            &ripper_id_op},
    {tWORDS_BEG,        &ripper_id_words_beg},
    {tXSTRING_BEG,      &ripper_id_backtick},
    {tLABEL,            &ripper_id_label},
    {tLAMBDA,           &ripper_id_tlambda},
    {tLAMBDA_ARG,       &ripper_id_tlambda_arg},
    {tLAMBEG,           &ripper_id_tlambeg},

    /* ripper specific tokens */
    {tIGNORED_NL,       &ripper_id_ignored_nl},
    {tCOMMENT,          &ripper_id_comment},
    {tEMBDOC_BEG,       &ripper_id_embdoc_beg},
    {tEMBDOC,           &ripper_id_embdoc},
    {tEMBDOC_END,       &ripper_id_embdoc_end},
    {tSP,               &ripper_id_sp},
    {tHEREDOC_BEG,      &ripper_id_heredoc_beg},
    {tHEREDOC_END,      &ripper_id_heredoc_end},
    {k__END__,          &ripper_id___end__},
    {0, NULL}
};

static ID
ripper_token2eventid(tok)
    int tok;
{
    struct token_assoc *a;

    for (a = token_to_eventid; a->id != NULL; a++) {
        if (a->token == tok)
            return *a->id;
    }
    if (tok < 256) {
        return ripper_id_CHAR;
    }
    rb_raise(rb_eRuntimeError, "[Ripper FATAL] unknown token %d", tok);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/sdbm/_sdbm.c

root/ext/sdbm/_sdbm.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. sdbm_open
  2. sdbm_prep
  3. sdbm_close
  4. sdbm_fetch
  5. sdbm_delete
  6. sdbm_store
  7. makroom
  8. sdbm_firstkey
  9. sdbm_nextkey
  10. getpage
  11. getdbit
  12. setdbit
  13. getnext
  14. fitpair
  15. putpair
  16. getpair
  17. duppair
  18. getnkey
  19. delpair
  20. seepair
  21. splpage
  22. chkpage
  23. sdbm_hash
/*
 * sdbm - ndbm work-alike hashed database library
 * based on Per-Aake Larson's Dynamic Hashing algorithms. BIT 18 (1978).
 * author: oz@nexus.yorku.ca
 * status: public domain.
 *
 * core routines
 */

#ifndef lint
/*char sdbm_rcsid[] = "$Id: _sdbm.c,v 1.6 2005/09/08 06:00:56 matz Exp $";*/
#endif

#include "sdbm.h"
#include "config.h"

/*
 * sdbm - ndbm work-alike hashed database library
 * tuning and portability constructs [not nearly enough]
 * author: oz@nexus.yorku.ca
 */

#define BYTESIZ         8

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#ifdef BSD42
#define SEEK_SET        L_SET
#define memset(s,c,n)   bzero(s, n)             /* only when c is zero */
#define memcpy(s1,s2,n) bcopy(s2, s1, n)
#define memcmp(s1,s2,n) bcmp(s1,s2,n)
#endif

/*
 * important tuning parms (hah)
 */

#define SEEDUPS         /* always detect duplicates */
#define BADMESS         /* generate a message for worst case:
                           cannot make room after SPLTMAX splits */
/*
 * misc
 */
#ifdef DEBUG
#define debug(x)        printf x
#else
#define debug(x)
#endif

#ifdef BIG_E
#define GET_SHORT(p, i) (((unsigned)((unsigned char *)(p))[(i)*2] << 8) + (((unsigned char *)(p))[(i)*2 + 1]))
#define PUT_SHORT(p, i, s) (((unsigned char *)(p))[(i)*2] = (unsigned char)((s) >> 8), ((unsigned char *)(p))[(i)*2 + 1] = (unsigned char)(s))
#else
#define GET_SHORT(p, i) ((p)[i])
#define PUT_SHORT(p, i, s)      ((p)[i] = (s))
#endif

/*#include "pair.h"*/
static int   fitpair proto((char *, int));
static void  putpair proto((char *, datum, datum));
static datum getpair proto((char *, datum));
static int   delpair proto((char *, datum));
static int   chkpage proto((char *));
static datum getnkey proto((char *, int));
static void  splpage proto((char *, char *, long));
#ifdef SEEDUPS
static int   duppair proto((char *, datum));
#endif

#include <stdio.h>
#include <stdlib.h>
#ifdef MSDOS
#include <io.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#ifdef BSD42
#include <sys/file.h>
#else
#include <fcntl.h>
/*#include <memory.h>*/
#endif
#ifndef O_BINARY
#define O_BINARY        0
#endif

#include <errno.h>
#ifndef EPERM
#define EPERM   EACCES
#endif
#include <string.h>

#ifdef __STDC__
#include <stddef.h>
#endif

#ifndef NULL
#define NULL    0
#endif

/*
 * externals
 */
#if !defined sun && !defined MSDOS && !defined _WIN32 && !defined __CYGWIN__ && !defined(errno)
extern int errno;
#endif

/*
 * forward
 */
static int getdbit proto((DBM *, long));
static int setdbit proto((DBM *, long));
static int getpage proto((DBM *, long));
static datum getnext proto((DBM *));
static int makroom proto((DBM *, long, int));

/*
 * useful macros
 */
#define bad(x)          ((x).dptr == NULL || (x).dsize < 0)
#define exhash(item)    sdbm_hash((item).dptr, (item).dsize)
#define ioerr(db)       ((db)->flags |= DBM_IOERR)

#define OFF_PAG(off)    (long) (off) * PBLKSIZ
#define OFF_DIR(off)    (long) (off) * DBLKSIZ

static long masks[] = {
        000000000000L, 000000000001L, 000000000003L,
        000000000007L, 000000000017L, 000000000037L,
        000000000077L, 000000000177L, 000000000377L,
        000000000777L, 000000001777L, 000000003777L,
        000000007777L, 000000017777L, 000000037777L,
        000000077777L, 000000177777L, 000000377777L,
        000000777777L, 000001777777L, 000003777777L,
        000007777777L, 000017777777L, 000037777777L,
        000077777777L, 000177777777L, 000377777777L,
        000777777777L, 001777777777L, 003777777777L,
        007777777777L, 017777777777L
};

datum nullitem = {NULL, 0};

DBM *
sdbm_open(file, flags, mode)
register char *file;
register int flags;
register int mode;
{
        register DBM *db;
        register char *dirname;
        register char *pagname;
        register int n;

        if (file == NULL || !*file)
                return errno = EINVAL, (DBM *) NULL;
/*
 * need space for two seperate filenames
 */
        n = strlen(file) * 2 + strlen(DIRFEXT) + strlen(PAGFEXT) + 2;

        if ((dirname = malloc((unsigned) n)) == NULL)
                return errno = ENOMEM, (DBM *) NULL;
/*
 * build the file names
 */
        dirname = strcat(strcpy(dirname, file), DIRFEXT);
        pagname = strcpy(dirname + strlen(dirname) + 1, file);
        pagname = strcat(pagname, PAGFEXT);

        db = sdbm_prep(dirname, pagname, flags, mode);
        free((char *) dirname);
        return db;
}

DBM *
sdbm_prep(dirname, pagname, flags, mode)
char *dirname;
char *pagname;
int flags;
int mode;
{
        register DBM *db;
        struct stat dstat;

        if ((db = (DBM *) malloc(sizeof(DBM))) == NULL)
                return errno = ENOMEM, (DBM *) NULL;

        db->flags = 0;
        db->hmask = 0;
        db->blkptr = 0;
        db->keyptr = 0;
/*
 * adjust user flags so that WRONLY becomes RDWR,
 * as required by this package. Also set our internal
 * flag for RDONLY.
 */
        if (flags & O_WRONLY)
                flags = (flags & ~O_WRONLY) | O_RDWR;
        if (flags & O_RDONLY)
                db->flags = DBM_RDONLY;
/*
 * open the files in sequence, and stat the dirfile.
 * If we fail anywhere, undo everything, return NULL.
 */
        flags |= O_BINARY;
        if ((db->pagf = open(pagname, flags, mode)) > -1) {
                if ((db->dirf = open(dirname, flags, mode)) > -1) {
/*
 * need the dirfile size to establish max bit number.
 */
                        if (fstat(db->dirf, &dstat) == 0) {
/*
 * zero size: either a fresh database, or one with a single,
 * unsplit data page: dirpage is all zeros.
 */
                                db->dirbno = (!dstat.st_size) ? 0 : -1;
                                db->pagbno = -1;
                                db->maxbno = dstat.st_size * (long) BYTESIZ;

                                (void) memset(db->pagbuf, 0, PBLKSIZ);
                                (void) memset(db->dirbuf, 0, DBLKSIZ);
                        /*
                         * success
                         */
                                return db;
                        }
                        (void) close(db->dirf);
                }
                (void) close(db->pagf);
        }
        free((char *) db);
        return (DBM *) NULL;
}

void
sdbm_close(db)
register DBM *db;
{
        if (db == NULL)
                errno = EINVAL;
        else {
                (void) close(db->dirf);
                (void) close(db->pagf);
                free((char *) db);
        }
}

datum
sdbm_fetch(db, key)
register DBM *db;
datum key;
{
        if (db == NULL || bad(key))
                return errno = EINVAL, nullitem;

        if (getpage(db, exhash(key)))
                return getpair(db->pagbuf, key);

        return ioerr(db), nullitem;
}

int
sdbm_delete(db, key)
register DBM *db;
datum key;
{
        if (db == NULL || bad(key))
                return errno = EINVAL, -1;
        if (sdbm_rdonly(db))
                return errno = EPERM, -1;

        if (getpage(db, exhash(key))) {
                if (!delpair(db->pagbuf, key))
                        return -1;
/*
 * update the page file
 */
                if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0
                    || write(db->pagf, db->pagbuf, PBLKSIZ) < 0)
                        return ioerr(db), -1;

                return 0;
        }

        return ioerr(db), -1;
}

int
sdbm_store(db, key, val, flags)
register DBM *db;
datum key;
datum val;
int flags;
{
        int need;
        register long hash;

        if (db == NULL || bad(key))
                return errno = EINVAL, -1;
        if (sdbm_rdonly(db))
                return errno = EPERM, -1;

        need = key.dsize + val.dsize;
/*
 * is the pair too big (or too small) for this database ??
 */
        if (need < 0 || need > PAIRMAX)
                return errno = EINVAL, -1;

        if (getpage(db, (hash = exhash(key)))) {
/*
 * if we need to replace, delete the key/data pair
 * first. If it is not there, ignore.
 */
                if (flags == DBM_REPLACE)
                        (void) delpair(db->pagbuf, key);
#ifdef SEEDUPS
                else if (duppair(db->pagbuf, key))
                        return 1;
#endif
/*
 * if we do not have enough room, we have to split.
 */
                if (!fitpair(db->pagbuf, need))
                        if (!makroom(db, hash, need))
                                return ioerr(db), -1;
/*
 * we have enough room or split is successful. insert the key,
 * and update the page file.
 */
                (void) putpair(db->pagbuf, key, val);

                if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0
                    || write(db->pagf, db->pagbuf, PBLKSIZ) < 0)
                        return ioerr(db), -1;
        /*
         * success
         */
                return 0;
        }

        return ioerr(db), -1;
}

/*
 * makroom - make room by splitting the overfull page
 * this routine will attempt to make room for SPLTMAX times before
 * giving up.
 */
static int
makroom(db, hash, need)
register DBM *db;
long hash;
int need;
{
        long newp;
        char twin[PBLKSIZ];
#if defined MSDOS || (defined _WIN32 && !defined __CYGWIN__)
        char zer[PBLKSIZ];
        long oldtail;
#endif
        char *pag = db->pagbuf;
        char *new = twin;
        register int smax = SPLTMAX;

        do {
/*
 * split the current page
 */
                (void) splpage(pag, new, db->hmask + 1);
/*
 * address of the new page
 */
                newp = (hash & db->hmask) | (db->hmask + 1);
                debug(("newp: %ld\n", newp));
/*
 * write delay, read avoidence/cache shuffle:
 * select the page for incoming pair: if key is to go to the new page,
 * write out the previous one, and copy the new one over, thus making
 * it the current page. If not, simply write the new page, and we are
 * still looking at the page of interest. current page is not updated
 * here, as sdbm_store will do so, after it inserts the incoming pair.
 */

#if defined MSDOS || (defined _WIN32 && !defined __CYGWIN__)
        /*
         * Fill hole with 0 if made it.
         * (hole is NOT read as 0)
         */
        oldtail = lseek(db->pagf, 0L, SEEK_END);
        memset(zer, 0, PBLKSIZ);
        while (OFF_PAG(newp) > oldtail) {
                if (lseek(db->pagf, 0L, SEEK_END) < 0 ||
                    write(db->pagf, zer, PBLKSIZ) < 0) {

                        return 0;
                }
                oldtail += PBLKSIZ;
        }
#endif

                if (hash & (db->hmask + 1)) {
                        if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0
                            || write(db->pagf, db->pagbuf, PBLKSIZ) < 0)
                                return 0;
                        db->pagbno = newp;
                        (void) memcpy(pag, new, PBLKSIZ);
                }
                else if (lseek(db->pagf, OFF_PAG(newp), SEEK_SET) < 0
                         || write(db->pagf, new, PBLKSIZ) < 0)
                        return 0;

                if (!setdbit(db, db->curbit))
                        return 0;
/*
 * see if we have enough room now
 */
                if (fitpair(pag, need))
                        return 1;
/*
 * try again... update curbit and hmask as getpage would have
 * done. because of our update of the current page, we do not
 * need to read in anything. BUT we have to write the current
 * [deferred] page out, as the window of failure is too great.
 */
                db->curbit = 2 * db->curbit +
                        ((hash & (db->hmask + 1)) ? 2 : 1);
                db->hmask |= (db->hmask + 1);

                if (lseek(db->pagf, OFF_PAG(db->pagbno), SEEK_SET) < 0
                    || write(db->pagf, db->pagbuf, PBLKSIZ) < 0)
                        return 0;

        } while (--smax);
/*
 * if we are here, this is real bad news. After SPLTMAX splits,
 * we still cannot fit the key. say goodnight.
 */
#ifdef BADMESS
        (void) write(2, "sdbm: cannot insert after SPLTMAX attempts.\n", 44);
#endif
        return 0;

}

/*
 * the following two routines will break if
 * deletions aren't taken into account. (ndbm bug)
 */
datum
sdbm_firstkey(db)
register DBM *db;
{
        if (db == NULL)
                return errno = EINVAL, nullitem;
/*
 * start at page 0
 */
        (void) memset(db->pagbuf, 0, PBLKSIZ);
        if (lseek(db->pagf, OFF_PAG(0), SEEK_SET) < 0
            || read(db->pagf, db->pagbuf, PBLKSIZ) < 0)
                return ioerr(db), nullitem;
        db->pagbno = 0;
        db->blkptr = 0;
        db->keyptr = 0;

        return getnext(db);
}

datum
sdbm_nextkey(db)
register DBM *db;
{
        if (db == NULL)
                return errno = EINVAL, nullitem;
        return getnext(db);
}

/*
 * all important binary trie traversal
 */
static int
getpage(db, hash)
register DBM *db;
register long hash;
{
        register int hbit;
        register long dbit;
        register long pagb;

        dbit = 0;
        hbit = 0;
        while (dbit < db->maxbno && getdbit(db, dbit))
                dbit = 2 * dbit + ((hash & ((long) 1 << hbit++)) ? 2 : 1);

        debug(("dbit: %d...", dbit));

        db->curbit = dbit;
        db->hmask = masks[hbit];

        pagb = hash & db->hmask;
/*
 * see if the block we need is already in memory.
 * note: this lookaside cache has about 10% hit rate.
 */
        if (pagb != db->pagbno) {
/*
 * note: here, we assume a "hole" is read as 0s.
 * if not, must zero pagbuf first.
 */
                (void) memset(db->pagbuf, 0, PBLKSIZ);

                if (lseek(db->pagf, OFF_PAG(pagb), SEEK_SET) < 0
                    || read(db->pagf, db->pagbuf, PBLKSIZ) < 0)
                        return 0;
                if (!chkpage(db->pagbuf)) {
                        return 0;
                }
                db->pagbno = pagb;

                debug(("pag read: %d\n", pagb));
        }
        return 1;
}

static int
getdbit(db, dbit)
register DBM *db;
register long dbit;
{
        register long c;
        register long dirb;

        c = dbit / BYTESIZ;
        dirb = c / DBLKSIZ;

        if (dirb != db->dirbno) {
                if (lseek(db->dirf, OFF_DIR(dirb), SEEK_SET) < 0
                    || read(db->dirf, db->dirbuf, DBLKSIZ) < 0)
                        return 0;
                db->dirbno = dirb;

                debug(("dir read: %d\n", dirb));
        }

        return db->dirbuf[c % DBLKSIZ] & (1 << (dbit % BYTESIZ));
}

static int
setdbit(db, dbit)
register DBM *db;
register long dbit;
{
        register long c;
        register long dirb;

        c = dbit / BYTESIZ;
        dirb = c / DBLKSIZ;

        if (dirb != db->dirbno) {
                if (lseek(db->dirf, OFF_DIR(dirb), SEEK_SET) < 0
                    || read(db->dirf, db->dirbuf, DBLKSIZ) < 0)
                        return 0;
                db->dirbno = dirb;

                debug(("dir read: %d\n", dirb));
        }

        db->dirbuf[c % DBLKSIZ] |= (1 << (dbit % BYTESIZ));

        if (dbit >= db->maxbno)
                db->maxbno += (long) DBLKSIZ * BYTESIZ;

        if (lseek(db->dirf, OFF_DIR(dirb), SEEK_SET) < 0
            || write(db->dirf, db->dirbuf, DBLKSIZ) < 0)
                return 0;

        return 1;
}

/*
 * getnext - get the next key in the page, and if done with
 * the page, try the next page in sequence
 */
static datum
getnext(db)
register DBM *db;
{
        datum key;

        for (;;) {
                db->keyptr++;
                key = getnkey(db->pagbuf, db->keyptr);
                if (key.dptr != NULL)
                        return key;
/*
 * we either run out, or there is nothing on this page..
 * try the next one... If we lost our position on the
 * file, we will have to seek.
 */
                db->keyptr = 0;
                if (db->pagbno != db->blkptr++)
                        if (lseek(db->pagf, OFF_PAG(db->blkptr), SEEK_SET) < 0)
                                break;
                db->pagbno = db->blkptr;
                if (read(db->pagf, db->pagbuf, PBLKSIZ) <= 0)
                        break;
                if (!chkpage(db->pagbuf)) {
                        break;
                }
        }

        return ioerr(db), nullitem;
}

/* pair.c */
/*
 * sdbm - ndbm work-alike hashed database library
 * based on Per-Aake Larson's Dynamic Hashing algorithms. BIT 18 (1978).
 * author: oz@nexus.yorku.ca
 * status: public domain.
 *
 * page-level routines
 */

#ifndef lint
/*char pair_rcsid[] = "$Id: _sdbm.c,v 1.6 2005/09/08 06:00:56 matz Exp $";*/
#endif

#ifndef BSD42
/*#include <memory.h>*/
#endif

#define exhash(item)    sdbm_hash((item).dptr, (item).dsize)

/*
 * forward
 */
static int seepair proto((char *, int, char *, int));

/*
 * page format:
 *      +------------------------------+
 * ino  | n | keyoff | datoff | keyoff |
 *      +------------+--------+--------+
 *      | datoff | - - - ---->         |
 *      +--------+---------------------+
 *      |        F R E E A R E A       |
 *      +--------------+---------------+
 *      |  <---- - - - | data          |
 *      +--------+-----+----+----------+
 *      |  key   | data     | key      |
 *      +--------+----------+----------+
 *
 * calculating the offsets for free area:  if the number
 * of entries (ino[0]) is zero, the offset to the END of
 * the free area is the block size. Otherwise, it is the
 * nth (ino[ino[0]]) entry's offset.
 */

static int
fitpair(pag, need)
char *pag;
int need;
{
        register int n;
        register int off;
        register int free;
        register short *ino = (short *) pag;

        off = ((n = GET_SHORT(ino,0)) > 0) ? GET_SHORT(ino,n) : PBLKSIZ;
        free = off - (n + 1) * sizeof(short);
        need += 2 * sizeof(short);

        debug(("free %d need %d\n", free, need));

        return need <= free;
}

static void
putpair(pag, key, val)
char *pag;
datum key;
datum val;
{
        register int n;
        register int off;
        register short *ino = (short *) pag;

        off = ((n = GET_SHORT(ino,0)) > 0) ? GET_SHORT(ino,n) : PBLKSIZ;
/*
 * enter the key first
 */
        off -= key.dsize;
        if (key.dsize)
                (void) memcpy(pag + off, key.dptr, key.dsize);
        PUT_SHORT(ino,n + 1,off);
/*
 * now the data
 */
        off -= val.dsize;
        if (val.dsize)
                (void) memcpy(pag + off, val.dptr, val.dsize);
        PUT_SHORT(ino,n + 2,off);
/*
 * adjust item count
 */
        PUT_SHORT(ino,0,GET_SHORT(ino,0) + 2);
}

static datum
getpair(pag, key)
char *pag;
datum key;
{
        register int i;
        register int n;
        datum val;
        register short *ino = (short *) pag;

        if ((n = GET_SHORT(ino,0)) == 0)
                return nullitem;

        if ((i = seepair(pag, n, key.dptr, key.dsize)) == 0)
                return nullitem;

        val.dptr = pag + GET_SHORT(ino,i + 1);
        val.dsize = GET_SHORT(ino,i) - GET_SHORT(ino,i + 1);
        return val;
}

#ifdef SEEDUPS
static int
duppair(pag, key)
char *pag;
datum key;
{
        register short *ino = (short *) pag;
        return GET_SHORT(ino,0) > 0 &&
                   seepair(pag, GET_SHORT(ino,0), key.dptr, key.dsize) > 0;
}
#endif

static datum
getnkey(pag, num)
char *pag;
int num;
{
        datum key;
        register int off;
        register short *ino = (short *) pag;

        num = num * 2 - 1;
        if (GET_SHORT(ino,0) == 0 || num > GET_SHORT(ino,0))
                return nullitem;

        off = (num > 1) ? GET_SHORT(ino,num - 1) : PBLKSIZ;

        key.dptr = pag + GET_SHORT(ino,num);
        key.dsize = off - GET_SHORT(ino,num);

        return key;
}

static int
delpair(pag, key)
char *pag;
datum key;
{
        register int n;
        register int i;
        register short *ino = (short *) pag;

        if ((n = GET_SHORT(ino,0)) == 0)
                return 0;

        if ((i = seepair(pag, n, key.dptr, key.dsize)) == 0)
                return 0;
/*
 * found the key. if it is the last entry
 * [i.e. i == n - 1] we just adjust the entry count.
 * hard case: move all data down onto the deleted pair,
 * shift offsets onto deleted offsets, and adjust them.
 * [note: 0 < i < n]
 */
        if (i < n - 1) {
                register int m;
                register char *dst = pag + (i == 1 ? PBLKSIZ : GET_SHORT(ino,i - 1));
                register char *src = pag + GET_SHORT(ino,i + 1);
                register int   zoo = dst - src;

                debug(("free-up %d ", zoo));
/*
 * shift data/keys down
 */
                m = GET_SHORT(ino,i + 1) - GET_SHORT(ino,n);
#ifdef DUFF
#define MOVB    *--dst = *--src

                if (m > 0) {
                        register int loop = (m + 8 - 1) >> 3;

                        switch (m & (8 - 1)) {
                        case 0: do {
                                MOVB;   case 7: MOVB;
                        case 6: MOVB;   case 5: MOVB;
                        case 4: MOVB;   case 3: MOVB;
                        case 2: MOVB;   case 1: MOVB;
                                } while (--loop);
                        }
                }
#else
#ifdef MEMMOVE
                memmove(dst, src, m);
#else
                while (m--)
                        *--dst = *--src;
#endif
#endif
/*
 * adjust offset index up
 */
                while (i < n - 1) {
                        PUT_SHORT(ino,i, GET_SHORT(ino,i + 2) + zoo);
                        i++;
                }
        }
        PUT_SHORT(ino, 0, GET_SHORT(ino, 0) - 2);
        return 1;
}

/*
 * search for the key in the page.
 * return offset index in the range 0 < i < n.
 * return 0 if not found.
 */
static int
seepair(pag, n, key, siz)
char *pag;
register int n;
register char *key;
register int siz;
{
        register int i;
        register int off = PBLKSIZ;
        register short *ino = (short *) pag;

        for (i = 1; i < n; i += 2) {
                if (siz == off - GET_SHORT(ino,i) &&
                    memcmp(key, pag + GET_SHORT(ino,i), siz) == 0)
                        return i;
                off = GET_SHORT(ino,i + 1);
        }
        return 0;
}

static void
splpage(pag, new, sbit)
char *pag;
char *new;
long sbit;
{
        datum key;
        datum val;

        register int n;
        register int off = PBLKSIZ;
        char cur[PBLKSIZ];
        register short *ino = (short *) cur;

        (void) memcpy(cur, pag, PBLKSIZ);
        (void) memset(pag, 0, PBLKSIZ);
        (void) memset(new, 0, PBLKSIZ);

        n = GET_SHORT(ino,0);
        for (ino++; n > 0; ino += 2) {
                key.dptr = cur + GET_SHORT(ino,0);
                key.dsize = off - GET_SHORT(ino,0);
                val.dptr = cur + GET_SHORT(ino,1);
                val.dsize = GET_SHORT(ino,0) - GET_SHORT(ino,1);
/*
 * select the page pointer (by looking at sbit) and insert
 */
                (void) putpair((exhash(key) & sbit) ? new : pag, key, val);

                off = GET_SHORT(ino,1);
                n -= 2;
        }

        debug(("%d split %d/%d\n", ((short *) cur)[0] / 2,
               ((short *) new)[0] / 2,
               ((short *) pag)[0] / 2));
}

/*
 * check page sanity:
 * number of entries should be something
 * reasonable, and all offsets in the index should be in order.
 * this could be made more rigorous.
 */
static int
chkpage(pag)
char *pag;
{
        register int n;
        register int off;
        register short *ino = (short *) pag;

        if ((n = GET_SHORT(ino,0)) < 0 || n > PBLKSIZ / sizeof(short))
                return 0;

        if (n > 0) {
                off = PBLKSIZ;
                for (ino++; n > 0; ino += 2) {
                        if (GET_SHORT(ino,0) > off || GET_SHORT(ino,1) > off ||
                            GET_SHORT(ino,1) > GET_SHORT(ino,0))
                                return 0;
                        off = GET_SHORT(ino,1);
                        n -= 2;
                }
        }
        return 1;
}

/* hash.c */
/*
 * sdbm - ndbm work-alike hashed database library
 * based on Per-Aake Larson's Dynamic Hashing algorithms. BIT 18 (1978).
 * author: oz@nexus.yorku.ca
 * status: public domain. keep it that way.
 *
 * hashing routine
 */

/*
 * polynomial conversion ignoring overflows
 * [this seems to work remarkably well, in fact better
 * then the ndbm hash function. Replace at your own risk]
 * use: 65599   nice.
 *      65587   even better.
 */
long
sdbm_hash(str, len)
register char *str;
register int len;
{
        register unsigned long n = 0;

#ifdef DUFF

#define HASHC   n = *str++ + 65599 * n

        if (len > 0) {
                register int loop = (len + 8 - 1) >> 3;

                switch(len & (8 - 1)) {
                case 0: do {
                        HASHC;  case 7: HASHC;
                case 6: HASHC;  case 5: HASHC;
                case 4: HASHC;  case 3: HASHC;
                case 2: HASHC;  case 1: HASHC;
                        } while (--loop);
                }

        }
#else
        while (len--)
                n = ((*str++) & 255) + 65587L * n;
#endif
        return n;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/sdbm/init.c

root/ext/sdbm/init.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. closed_sdbm
  2. free_sdbm
  3. fsdbm_close
  4. fsdbm_closed
  5. fsdbm_alloc
  6. fsdbm_initialize
  7. fsdbm_s_open
  8. fsdbm_fetch
  9. fsdbm_aref
  10. fsdbm_fetch_m
  11. fsdbm_index
  12. fsdbm_select
  13. fsdbm_values_at
  14. fdbm_modify
  15. fsdbm_delete
  16. fsdbm_shift
  17. fsdbm_delete_if
  18. fsdbm_clear
  19. fsdbm_invert
  20. each_pair
  21. update_i
  22. fsdbm_update
  23. fsdbm_replace
  24. fsdbm_store
  25. fsdbm_length
  26. fsdbm_empty_p
  27. fsdbm_each_value
  28. fsdbm_each_key
  29. fsdbm_each_pair
  30. fsdbm_keys
  31. fsdbm_values
  32. fsdbm_has_key
  33. fsdbm_has_value
  34. fsdbm_to_a
  35. fsdbm_to_hash
  36. fsdbm_reject
  37. Init_sdbm
/************************************************

  sdbminit.c -

  $Author: akr $
  $Date: 2005/09/24 00:17:43 $
  created at: Fri May  7 08:34:24 JST 1999

  Copyright (C) 1995-2001 Yukihiro Matsumoto

************************************************/

#include "ruby.h"

#include "sdbm.h"
#include <fcntl.h>
#include <errno.h>

static VALUE rb_cDBM, rb_eDBMError;

struct dbmdata {
    int  di_size;
    DBM *di_dbm;
};

static void
closed_sdbm()
{
    rb_raise(rb_eDBMError, "closed SDBM file");
}

#define GetDBM(obj, dbmp) {\
    Data_Get_Struct(obj, struct dbmdata, dbmp);\
    if (dbmp == 0) closed_sdbm();\
    if (dbmp->di_dbm == 0) closed_sdbm();\
}

#define GetDBM2(obj, data, dbm) {\
    GetDBM(obj, data);\
    (dbm) = dbmp->di_dbm;\
}

static void
free_sdbm(dbmp)
    struct dbmdata *dbmp;
{

    if (dbmp->di_dbm) sdbm_close(dbmp->di_dbm);
    free(dbmp);
}

static VALUE
fsdbm_close(obj)
    VALUE obj;
{
    struct dbmdata *dbmp;

    GetDBM(obj, dbmp);
    sdbm_close(dbmp->di_dbm);
    dbmp->di_dbm = 0;

    return Qnil;
}

static VALUE
fsdbm_closed(obj)
    VALUE obj;
{
    struct dbmdata *dbmp;

    Data_Get_Struct(obj, struct dbmdata, dbmp);
    if (dbmp == 0)
        return Qtrue;
    if (dbmp->di_dbm == 0)
        return Qtrue;

    return Qfalse;
}

static VALUE fsdbm_alloc _((VALUE));
static VALUE
fsdbm_alloc(klass)
    VALUE klass;
{
    return Data_Wrap_Struct(klass, 0, free_sdbm, 0);
}

static VALUE
fsdbm_initialize(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    VALUE file, vmode;
    DBM *dbm;
    struct dbmdata *dbmp;
    int mode;

    if (rb_scan_args(argc, argv, "11", &file, &vmode) == 1) {
        mode = 0666;            /* default value */
    }
    else if (NIL_P(vmode)) {
        mode = -1;              /* return nil if DB not exist */
    }
    else {
        mode = NUM2INT(vmode);
    }
    SafeStringValue(file);

    dbm = 0;
    if (mode >= 0)
        dbm = sdbm_open(RSTRING(file)->ptr, O_RDWR|O_CREAT, mode);
    if (!dbm)
        dbm = sdbm_open(RSTRING(file)->ptr, O_RDWR, 0);
    if (!dbm)
        dbm = sdbm_open(RSTRING(file)->ptr, O_RDONLY, 0);

    if (!dbm) {
        if (mode == -1) return Qnil;
        rb_sys_fail(RSTRING(file)->ptr);
    }

    dbmp = ALLOC(struct dbmdata);
    DATA_PTR(obj) = dbmp;
    dbmp->di_dbm = dbm;
    dbmp->di_size = -1;

    return obj;
}

static VALUE
fsdbm_s_open(argc, argv, klass)
    int argc;
    VALUE *argv;
    VALUE klass;
{
    VALUE obj = Data_Wrap_Struct(klass, 0, free_sdbm, 0);

    if (NIL_P(fsdbm_initialize(argc, argv, obj))) {
        return Qnil;
    }

    if (rb_block_given_p()) {
        return rb_ensure(rb_yield, obj, fsdbm_close, obj);
    }

    return obj;
}

static VALUE
fsdbm_fetch(obj, keystr, ifnone)
    VALUE obj, keystr, ifnone;
{
    datum key, value;
    struct dbmdata *dbmp;
    DBM *dbm;

    StringValue(keystr);
    key.dptr = RSTRING(keystr)->ptr;
    key.dsize = RSTRING(keystr)->len;

    GetDBM2(obj, dbmp, dbm);
    value = sdbm_fetch(dbm, key);
    if (value.dptr == 0) {
        if (ifnone == Qnil && rb_block_given_p())
            return rb_yield(rb_tainted_str_new(key.dptr, key.dsize));
        return ifnone;
    }
    return rb_tainted_str_new(value.dptr, value.dsize);
}

static VALUE
fsdbm_aref(obj, keystr)
    VALUE obj, keystr;
{
    return fsdbm_fetch(obj, keystr, Qnil);
}

static VALUE
fsdbm_fetch_m(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    VALUE keystr, valstr, ifnone;

    rb_scan_args(argc, argv, "11", &keystr, &ifnone);
    valstr = fsdbm_fetch(obj, keystr, ifnone);
    if (argc == 1 && !rb_block_given_p() && NIL_P(valstr))
        rb_raise(rb_eIndexError, "key not found");

    return valstr;
}

static VALUE
fsdbm_index(obj, valstr)
    VALUE obj, valstr;
{
    datum key, val;
    struct dbmdata *dbmp;
    DBM *dbm;

    StringValue(valstr);
    val.dptr = RSTRING(valstr)->ptr;
    val.dsize = RSTRING(valstr)->len;

    GetDBM2(obj, dbmp, dbm);
    for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
        val = sdbm_fetch(dbm, key);
        if (val.dsize == RSTRING(valstr)->len &&
            memcmp(val.dptr, RSTRING(valstr)->ptr, val.dsize) == 0)
            return rb_tainted_str_new(key.dptr, key.dsize);
    }
    return Qnil;
}

static VALUE
fsdbm_select(obj)
    VALUE obj;
{
    VALUE new = rb_ary_new();
    datum key, val;
    DBM *dbm;
    struct dbmdata *dbmp;

    GetDBM2(obj, dbmp, dbm);
    for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
        VALUE assoc, v;
        val = sdbm_fetch(dbm, key);
        assoc = rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize),
                             rb_tainted_str_new(val.dptr, val.dsize));
        v = rb_yield(assoc);
        if (RTEST(v)) {
            rb_ary_push(new, assoc);
        }
        GetDBM2(obj, dbmp, dbm);
    }

    return new;
}

static VALUE
fsdbm_values_at(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    VALUE new = rb_ary_new2(argc);
    int i;

    for (i=0; i<argc; i++) {
        rb_ary_push(new, fsdbm_fetch(obj, argv[i], Qnil));
    }

    return new;
}

static void
fdbm_modify(obj)
    VALUE obj;
{
    rb_secure(4);
    if (OBJ_FROZEN(obj)) rb_error_frozen("SDBM");
}

static VALUE
fsdbm_delete(obj, keystr)
    VALUE obj, keystr;
{
    datum key, value;
    struct dbmdata *dbmp;
    DBM *dbm;
    VALUE valstr;

    fdbm_modify(obj);
    StringValue(keystr);
    key.dptr = RSTRING(keystr)->ptr;
    key.dsize = RSTRING(keystr)->len;

    GetDBM2(obj, dbmp, dbm);
    dbmp->di_size = -1;

    value = sdbm_fetch(dbm, key);
    if (value.dptr == 0) {
        if (rb_block_given_p()) return rb_yield(keystr);
        return Qnil;
    }

    /* need to save value before sdbm_delete() */
    valstr = rb_tainted_str_new(value.dptr, value.dsize);

    if (sdbm_delete(dbm, key)) {
        dbmp->di_size = -1;
        rb_raise(rb_eDBMError, "dbm_delete failed");
    }
    else if (dbmp->di_size >= 0) {
        dbmp->di_size--;
    }
    return valstr;
}

static VALUE
fsdbm_shift(obj)
    VALUE obj;
{
    datum key, val;
    struct dbmdata *dbmp;
    DBM *dbm;
    VALUE keystr, valstr;

    fdbm_modify(obj);
    GetDBM2(obj, dbmp, dbm);
    key = sdbm_firstkey(dbm);
    if (!key.dptr) return Qnil;
    val = sdbm_fetch(dbm, key);
    keystr = rb_tainted_str_new(key.dptr, key.dsize);
    valstr = rb_tainted_str_new(val.dptr, val.dsize);
    sdbm_delete(dbm, key);
    if (dbmp->di_size >= 0) {
        dbmp->di_size--;
    }

    return rb_assoc_new(keystr, valstr);
}

static VALUE
fsdbm_delete_if(obj)
    VALUE obj;
{
    datum key, val;
    struct dbmdata *dbmp;
    DBM *dbm;
    VALUE keystr, valstr;
    VALUE ret, ary = rb_ary_new();
    int i, status = 0, n;

    fdbm_modify(obj);
    GetDBM2(obj, dbmp, dbm);
    n = dbmp->di_size;
    dbmp->di_size = -1;
    for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
        val = sdbm_fetch(dbm, key);
        keystr = rb_tainted_str_new(key.dptr, key.dsize);
        valstr = rb_tainted_str_new(val.dptr, val.dsize);
        ret = rb_protect(rb_yield, rb_assoc_new(rb_str_dup(keystr), valstr), &status);
        if (status != 0) break;
        if (RTEST(ret)) rb_ary_push(ary, keystr);
        GetDBM2(obj, dbmp, dbm);
    }

    for (i = 0; i < RARRAY(ary)->len; i++) {
        keystr = RARRAY(ary)->ptr[i];
        StringValue(keystr);
        key.dptr = RSTRING(keystr)->ptr;
        key.dsize = RSTRING(keystr)->len;
        if (sdbm_delete(dbm, key)) {
            rb_raise(rb_eDBMError, "sdbm_delete failed");
        }
    }
    if (status) rb_jump_tag(status);
    if (n > 0) dbmp->di_size = n - RARRAY(ary)->len;

    return obj;
}

static VALUE
fsdbm_clear(obj)
    VALUE obj;
{
    datum key;
    struct dbmdata *dbmp;
    DBM *dbm;

    fdbm_modify(obj);
    GetDBM2(obj, dbmp, dbm);
    dbmp->di_size = -1;
    while (key = sdbm_firstkey(dbm), key.dptr) {
        if (sdbm_delete(dbm, key)) {
            rb_raise(rb_eDBMError, "sdbm_delete failed");
        }
    }
    dbmp->di_size = 0;

    return obj;
}

static VALUE
fsdbm_invert(obj)
    VALUE obj;
{
    datum key, val;
    struct dbmdata *dbmp;
    DBM *dbm;
    VALUE keystr, valstr;
    VALUE hash = rb_hash_new();

    GetDBM2(obj, dbmp, dbm);
    for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
        val = sdbm_fetch(dbm, key);
        keystr = rb_tainted_str_new(key.dptr, key.dsize);
        valstr = rb_tainted_str_new(val.dptr, val.dsize);
        rb_hash_aset(hash, valstr, keystr);
    }
    return hash;
}

static VALUE each_pair _((VALUE));

static VALUE
each_pair(obj)
    VALUE obj;
{
    return rb_funcall(obj, rb_intern("each_pair"), 0, 0);
}

static VALUE fsdbm_store _((VALUE,VALUE,VALUE));

static VALUE
update_i(pair, dbm)
    VALUE pair, dbm;
{
    Check_Type(pair, T_ARRAY);
    if (RARRAY(pair)->len < 2) {
        rb_raise(rb_eArgError, "pair must be [key, value]");
    }
    fsdbm_store(dbm, RARRAY(pair)->ptr[0], RARRAY(pair)->ptr[1]);
    return Qnil;
}

static VALUE
fsdbm_update(obj, other)
    VALUE obj, other;
{
    rb_iterate(each_pair, other, update_i, obj);
    return obj;
}

static VALUE
fsdbm_replace(obj, other)
    VALUE obj, other;
{
    fsdbm_clear(obj);
    rb_iterate(each_pair, other, update_i, obj);
    return obj;
}

static VALUE
fsdbm_store(obj, keystr, valstr)
    VALUE obj, keystr, valstr;
{
    datum key, val;
    struct dbmdata *dbmp;
    DBM *dbm;

    if (valstr == Qnil) {
        fsdbm_delete(obj, keystr);
        return Qnil;
    }

    fdbm_modify(obj);
    StringValue(keystr);
    StringValue(valstr);

    key.dptr = RSTRING(keystr)->ptr;
    key.dsize = RSTRING(keystr)->len;

    val.dptr = RSTRING(valstr)->ptr;
    val.dsize = RSTRING(valstr)->len;

    GetDBM2(obj, dbmp, dbm);
    dbmp->di_size = -1;
    if (sdbm_store(dbm, key, val, DBM_REPLACE)) {
#ifdef HAVE_DBM_CLAERERR
        sdbm_clearerr(dbm);
#endif
        if (errno == EPERM) rb_sys_fail(0);
        rb_raise(rb_eDBMError, "sdbm_store failed");
    }

    return valstr;
}

static VALUE
fsdbm_length(obj)
    VALUE obj;
{
    datum key;
    struct dbmdata *dbmp;
    DBM *dbm;
    int i = 0;

    GetDBM2(obj, dbmp, dbm);
    if (dbmp->di_size > 0) return INT2FIX(dbmp->di_size);

    for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
        i++;
    }
    dbmp->di_size = i;

    return INT2FIX(i);
}

static VALUE
fsdbm_empty_p(obj)
    VALUE obj;
{
    datum key;
    struct dbmdata *dbmp;
    DBM *dbm;
    int i = 0;

    GetDBM(obj, dbmp);
    if (dbmp->di_size < 0) {
        dbm = dbmp->di_dbm;

        for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
            i++;
        }
    }
    else {
        i = dbmp->di_size;
    }
    if (i == 0) return Qtrue;
    return Qfalse;
}

static VALUE
fsdbm_each_value(obj)
    VALUE obj;
{
    datum key, val;
    struct dbmdata *dbmp;
    DBM *dbm;

    GetDBM2(obj, dbmp, dbm);
    for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
        val = sdbm_fetch(dbm, key);
        rb_yield(rb_tainted_str_new(val.dptr, val.dsize));
        GetDBM2(obj, dbmp, dbm);
    }
    return obj;
}

static VALUE
fsdbm_each_key(obj)
    VALUE obj;
{
    datum key;
    struct dbmdata *dbmp;
    DBM *dbm;

    GetDBM2(obj, dbmp, dbm);
    for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
        rb_yield(rb_tainted_str_new(key.dptr, key.dsize));
        GetDBM2(obj, dbmp, dbm);
    }
    return obj;
}

static VALUE
fsdbm_each_pair(obj)
    VALUE obj;
{
    datum key, val;
    DBM *dbm;
    struct dbmdata *dbmp;
    VALUE keystr, valstr;

    GetDBM2(obj, dbmp, dbm);
    for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
        val = sdbm_fetch(dbm, key);
        keystr = rb_tainted_str_new(key.dptr, key.dsize);
        valstr = rb_tainted_str_new(val.dptr, val.dsize);
        rb_yield(rb_assoc_new(keystr, valstr));
        GetDBM2(obj, dbmp, dbm);
    }

    return obj;
}

static VALUE
fsdbm_keys(obj)
    VALUE obj;
{
    datum key;
    struct dbmdata *dbmp;
    DBM *dbm;
    VALUE ary;

    GetDBM2(obj, dbmp, dbm);
    ary = rb_ary_new();
    for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
        rb_ary_push(ary, rb_tainted_str_new(key.dptr, key.dsize));
    }

    return ary;
}

static VALUE
fsdbm_values(obj)
    VALUE obj;
{
    datum key, val;
    struct dbmdata *dbmp;
    DBM *dbm;
    VALUE ary;

    GetDBM2(obj, dbmp, dbm);
    ary = rb_ary_new();
    for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
        val = sdbm_fetch(dbm, key);
        rb_ary_push(ary, rb_tainted_str_new(val.dptr, val.dsize));
    }

    return ary;
}

static VALUE
fsdbm_has_key(obj, keystr)
    VALUE obj, keystr;
{
    datum key, val;
    struct dbmdata *dbmp;
    DBM *dbm;

    StringValue(keystr);
    key.dptr = RSTRING(keystr)->ptr;
    key.dsize = RSTRING(keystr)->len;

    GetDBM2(obj, dbmp, dbm);
    val = sdbm_fetch(dbm, key);
    if (val.dptr) return Qtrue;
    return Qfalse;
}

static VALUE
fsdbm_has_value(obj, valstr)
    VALUE obj, valstr;
{
    datum key, val;
    struct dbmdata *dbmp;
    DBM *dbm;

    StringValue(valstr);
    val.dptr = RSTRING(valstr)->ptr;
    val.dsize = RSTRING(valstr)->len;

    GetDBM2(obj, dbmp, dbm);
    for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
        val = sdbm_fetch(dbm, key);
        if (val.dsize == RSTRING(valstr)->len &&
            memcmp(val.dptr, RSTRING(valstr)->ptr, val.dsize) == 0)
            return Qtrue;
    }
    return Qfalse;
}

static VALUE
fsdbm_to_a(obj)
    VALUE obj;
{
    datum key, val;
    struct dbmdata *dbmp;
    DBM *dbm;
    VALUE ary;

    GetDBM2(obj, dbmp, dbm);
    ary = rb_ary_new();
    for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
        val = sdbm_fetch(dbm, key);
        rb_ary_push(ary, rb_assoc_new(rb_tainted_str_new(key.dptr, key.dsize),
                                      rb_tainted_str_new(val.dptr, val.dsize)));
    }

    return ary;
}

static VALUE
fsdbm_to_hash(obj)
    VALUE obj;
{
    datum key, val;
    struct dbmdata *dbmp;
    DBM *dbm;
    VALUE hash;

    GetDBM2(obj, dbmp, dbm);
    hash = rb_hash_new();
    for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
        val = sdbm_fetch(dbm, key);
        rb_hash_aset(hash, rb_tainted_str_new(key.dptr, key.dsize),
                           rb_tainted_str_new(val.dptr, val.dsize));
    }

    return hash;
}

static VALUE
fsdbm_reject(obj)
    VALUE obj;
{
    return rb_hash_delete_if(fsdbm_to_hash(obj));
}

void
Init_sdbm()
{
    rb_cDBM = rb_define_class("SDBM", rb_cObject);
    rb_eDBMError = rb_define_class("SDBMError", rb_eStandardError);
    rb_include_module(rb_cDBM, rb_mEnumerable);

    rb_define_alloc_func(rb_cDBM, fsdbm_alloc);
    rb_define_singleton_method(rb_cDBM, "open", fsdbm_s_open, -1);

    rb_define_method(rb_cDBM, "initialize", fsdbm_initialize, -1);
    rb_define_method(rb_cDBM, "close", fsdbm_close, 0);
    rb_define_method(rb_cDBM, "closed?", fsdbm_closed, 0);
    rb_define_method(rb_cDBM, "[]", fsdbm_aref, 1);
    rb_define_method(rb_cDBM, "fetch", fsdbm_fetch_m, -1);
    rb_define_method(rb_cDBM, "[]=", fsdbm_store, 2);
    rb_define_method(rb_cDBM, "store", fsdbm_store, 2);
    rb_define_method(rb_cDBM, "index",  fsdbm_index, 1);
    rb_define_method(rb_cDBM, "select",  fsdbm_select, 0);
    rb_define_method(rb_cDBM, "values_at",  fsdbm_values_at, -1);
    rb_define_method(rb_cDBM, "length", fsdbm_length, 0);
    rb_define_method(rb_cDBM, "size", fsdbm_length, 0);
    rb_define_method(rb_cDBM, "empty?", fsdbm_empty_p, 0);
    rb_define_method(rb_cDBM, "each", fsdbm_each_pair, 0);
    rb_define_method(rb_cDBM, "each_value", fsdbm_each_value, 0);
    rb_define_method(rb_cDBM, "each_key", fsdbm_each_key, 0);
    rb_define_method(rb_cDBM, "each_pair", fsdbm_each_pair, 0);
    rb_define_method(rb_cDBM, "keys", fsdbm_keys, 0);
    rb_define_method(rb_cDBM, "values", fsdbm_values, 0);
    rb_define_method(rb_cDBM, "shift", fsdbm_shift, 0);
    rb_define_method(rb_cDBM, "delete", fsdbm_delete, 1);
    rb_define_method(rb_cDBM, "delete_if", fsdbm_delete_if, 0);
    rb_define_method(rb_cDBM, "reject!", fsdbm_delete_if, 0);
    rb_define_method(rb_cDBM, "reject", fsdbm_reject, 0);
    rb_define_method(rb_cDBM, "clear", fsdbm_clear, 0);
    rb_define_method(rb_cDBM,"invert", fsdbm_invert, 0);
    rb_define_method(rb_cDBM,"update", fsdbm_update, 1);
    rb_define_method(rb_cDBM,"replace", fsdbm_replace, 1);

    rb_define_method(rb_cDBM, "include?", fsdbm_has_key, 1);
    rb_define_method(rb_cDBM, "has_key?", fsdbm_has_key, 1);
    rb_define_method(rb_cDBM, "member?", fsdbm_has_key, 1);
    rb_define_method(rb_cDBM, "has_value?", fsdbm_has_value, 1);
    rb_define_method(rb_cDBM, "key?", fsdbm_has_key, 1);
    rb_define_method(rb_cDBM, "value?", fsdbm_has_value, 1);

    rb_define_method(rb_cDBM, "to_a", fsdbm_to_a, 0);
    rb_define_method(rb_cDBM, "to_hash", fsdbm_to_hash, 0);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/sdbm/sdbm.h

root/ext/sdbm/sdbm.h

/* [<][>][^] [v][top][bottom] [index] [help] */

INCLUDED FROM

DEFINITIONS

This source file includes following definitions.
  1. DBM
  2. datum
/*
 * sdbm - ndbm work-alike hashed database library
 * based on Per-Ake Larson's Dynamic Hashing algorithms. BIT 18 (1978).
 * author: oz@nexus.yorku.ca
 * status: public domain.
 */
#ifndef _SDBM_H_
#define _SDBM_H_

#define DBLKSIZ 4096
#define PBLKSIZ 1024
#define PAIRMAX 1008                    /* arbitrary on PBLKSIZ-N */
#define SPLTMAX 10                      /* maximum allowed splits */
                                        /* for a single insertion */
#define DIRFEXT ".dir"
#define PAGFEXT ".pag"

typedef struct {
        int dirf;                      /* directory file descriptor */
        int pagf;                      /* page file descriptor */
        int flags;                     /* status/error flags, see below */
        long maxbno;                   /* size of dirfile in bits */
        long curbit;                   /* current bit number */
        long hmask;                    /* current hash mask */
        long blkptr;                   /* current block for nextkey */
        int keyptr;                    /* current key for nextkey */
        long blkno;                    /* current page to read/write */
        long pagbno;                   /* current page in pagbuf */
        char pagbuf[PBLKSIZ];          /* page file block buffer */
        long dirbno;                   /* current block in dirbuf */
        char dirbuf[DBLKSIZ];          /* directory file block buffer */
} DBM;

#define DBM_RDONLY      0x1            /* data base open read-only */
#define DBM_IOERR       0x2            /* data base I/O error */

/*
 * utility macros
 */
#define sdbm_rdonly(db)         ((db)->flags & DBM_RDONLY)
#define sdbm_error(db)          ((db)->flags & DBM_IOERR)

#define sdbm_clearerr(db)       ((db)->flags &= ~DBM_IOERR)  /* ouch */

#define sdbm_dirfno(db) ((db)->dirf)
#define sdbm_pagfno(db) ((db)->pagf)

typedef struct {
        char *dptr;
        int dsize;
} datum;

extern datum nullitem;

#if defined(__STDC__) || defined(MSDOS)
#define proto(p) p
#else
#define proto(p) ()
#endif

/*
 * flags to sdbm_store
 */
#define DBM_INSERT      0
#define DBM_REPLACE     1

/*
 * ndbm interface
 */
extern DBM *sdbm_open proto((char *, int, int));
extern void sdbm_close proto((DBM *));
extern datum sdbm_fetch proto((DBM *, datum));
extern int sdbm_delete proto((DBM *, datum));
extern int sdbm_store proto((DBM *, datum, datum, int));
extern datum sdbm_firstkey proto((DBM *));
extern datum sdbm_nextkey proto((DBM *));

/*
 * other
 */
extern DBM *sdbm_prep proto((char *, char *, int, int));
extern long sdbm_hash proto((char *, int));

#endif  /* _SDBM_H_ */
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/socket/addrinfo.h

root/ext/socket/addrinfo.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/*
 * Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. Neither the name of the project nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#ifndef ADDR_INFO_H
#define ADDR_INFO_H
#ifndef HAVE_GETADDRINFO

/* special compatibility hack */
#undef EAI_ADDRFAMILY
#undef EAI_AGAIN
#undef EAI_BADFLAGS
#undef EAI_FAIL
#undef EAI_FAMILY
#undef EAI_MEMORY
#undef EAI_NODATA
#undef EAI_NONAME
#undef EAI_SERVICE
#undef EAI_SOCKTYPE
#undef EAI_SYSTEM
#undef EAI_BADHINTS
#undef EAI_PROTOCOL
#undef EAI_MAX

#undef AI_PASSIVE
#undef AI_CANONNAME
#undef AI_NUMERICHOST
#undef AI_ALL
#undef AI_ADDRCONFIG
#undef AI_V4MAPPED
#undef AI_DEFAULT

#undef NI_NOFQDN
#undef NI_NUMERICHOST
#undef NI_NAMEREQD
#undef NI_NUMERICSERV
#undef NI_DGRAM

#define addrinfo addrinfo__compat
#define getaddrinfo getaddrinfo__compat
#define getnameinfo getnameinfo__compat
#define freehostent freehostent__compat
#define freeaddrinfo freeaddrinfo__compat

#ifndef __P
# ifdef HAVE_PROTOTYPES
#  define __P(args) args
# else
#  define __P(args) ()
# endif
#endif

/* special compatibility hack -- end*/

/*
 * Error return codes from getaddrinfo()
 */
#define EAI_ADDRFAMILY   1      /* address family for hostname not supported */
#define EAI_AGAIN        2      /* temporary failure in name resolution */
#define EAI_BADFLAGS     3      /* invalid value for ai_flags */
#define EAI_FAIL         4      /* non-recoverable failure in name resolution */
#define EAI_FAMILY       5      /* ai_family not supported */
#define EAI_MEMORY       6      /* memory allocation failure */
#define EAI_NODATA       7      /* no address associated with hostname */
#define EAI_NONAME       8      /* hostname nor servname provided, or not known */
#define EAI_SERVICE      9      /* servname not supported for ai_socktype */
#define EAI_SOCKTYPE    10      /* ai_socktype not supported */
#define EAI_SYSTEM      11      /* system error returned in errno */
#define EAI_BADHINTS    12
#define EAI_PROTOCOL    13
#define EAI_MAX         14

/*
 * Flag values for getaddrinfo()
 */
#define AI_PASSIVE      0x00000001 /* get address to use bind() */
#define AI_CANONNAME    0x00000002 /* fill ai_canonname */
#define AI_NUMERICHOST  0x00000004 /* prevent name resolution */
/* valid flags for addrinfo */
#define AI_MASK         (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST)

#define AI_ALL          0x00000100 /* IPv6 and IPv4-mapped (with AI_V4MAPPED) */
#define AI_V4MAPPED_CFG 0x00000200 /* accept IPv4-mapped if kernel supports */
#define AI_ADDRCONFIG   0x00000400 /* only if any address is assigned */
#define AI_V4MAPPED     0x00000800 /* accept IPv4-mapped IPv6 address */
/* special recommended flags for getipnodebyname */
#define AI_DEFAULT      (AI_V4MAPPED_CFG | AI_ADDRCONFIG)

/*
 * Constants for getnameinfo()
 */
#ifndef NI_MAXHOST
#define NI_MAXHOST      1025
#define NI_MAXSERV      32
#endif

/*
 * Flag values for getnameinfo()
 */
#define NI_NOFQDN       0x00000001
#define NI_NUMERICHOST  0x00000002
#define NI_NAMEREQD     0x00000004
#define NI_NUMERICSERV  0x00000008
#define NI_DGRAM        0x00000010

struct addrinfo {
        int     ai_flags;       /* AI_PASSIVE, AI_CANONNAME */
        int     ai_family;      /* PF_xxx */
        int     ai_socktype;    /* SOCK_xxx */
        int     ai_protocol;    /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
        size_t  ai_addrlen;     /* length of ai_addr */
        char    *ai_canonname;  /* canonical name for hostname */
        struct sockaddr *ai_addr;       /* binary address */
        struct addrinfo *ai_next;       /* next structure in linked list */
};

extern int getaddrinfo __P((
        const char *hostname, const char *servname,
        const struct addrinfo *hints,
        struct addrinfo **res));

extern int getnameinfo __P((
        const struct sockaddr *sa,
        size_t salen,
        char *host,
        size_t hostlen,
        char *serv,
        size_t servlen,
        int flags));

extern void freehostent __P((struct hostent *));
extern void freeaddrinfo __P((struct addrinfo *));
#if defined __UCLIBC__
const
#endif
extern char *gai_strerror __P((int));

/* In case there is no definition of offsetof() provided - though any proper
Standard C system should have one. */

#ifndef offsetof
#define offsetof(p_type,field) ((size_t)&(((p_type *)0)->field))
#endif

#endif
#endif
/* [<][>][^][v][top][bottom][index] [help] */


ext/socket/getaddrinfo.c

root/ext/socket/getaddrinfo.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. gai_strerror
  2. freeaddrinfo
  3. str_isnumber
  4. inet_pton
  5. getaddrinfo
  6. get_name
  7. get_addr
/*
 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. Neither the name of the project nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

/*
 * "#ifdef FAITH" part is local hack for supporting IPv4-v6 translator.
 *
 * Issues to be discussed:
 * - Thread safe-ness must be checked.
 * - Return values.  There are nonstandard return values defined and used
 *   in the source code.  This is because RFC2133 is silent about which error
 *   code must be returned for which situation.
 * - PF_UNSPEC case would be handled in getipnodebyname() with the AI_ALL flag.
 */

#include "config.h"
#include <sys/types.h>
#ifndef _WIN32
#include <sys/param.h>
#if defined(__BEOS__)
# include <net/socket.h>
#else
# include <sys/socket.h>
#endif
#include <netinet/in.h>
#if defined(HAVE_ARPA_INET_H)
#include <arpa/inet.h>
#endif
#if defined(HAVE_ARPA_NAMESER_H)
#include <arpa/nameser.h>
#endif
#include <netdb.h>
#if defined(HAVE_RESOLV_H)
#ifdef _SX
#include <stdio.h>
#endif
#include <resolv.h>
#endif
#include <unistd.h>
#else
#include <winsock2.h>
#include <io.h>
#endif
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <ctype.h>

#ifdef SOCKS5
#include <socks.h>
#endif

#include "addrinfo.h"
#include "sockport.h"

#if defined(__KAME__) && defined(INET6)
# define FAITH
#endif

#define SUCCESS 0
#define ANY 0
#define YES 1
#define NO  0

#ifdef FAITH
static int translate = NO;
static struct in6_addr faith_prefix = IN6ADDR_ANY_INIT;
#endif

static const char in_addrany[] = { 0, 0, 0, 0 };
static const char in6_addrany[] = {
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
static const char in_loopback[] = { 127, 0, 0, 1 };
static const char in6_loopback[] = {
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
};

struct sockinet {
        u_char  si_len;
        u_char  si_family;
        u_short si_port;
};

static const struct afd {
        int a_af;
        int a_addrlen;
        int a_socklen;
        int a_off;
        const char *a_addrany;
        const char *a_loopback;
} afdl [] = {
#ifdef INET6
#define N_INET6 0
        {PF_INET6, sizeof(struct in6_addr),
         sizeof(struct sockaddr_in6),
         offsetof(struct sockaddr_in6, sin6_addr),
         in6_addrany, in6_loopback},
#define N_INET  1
#else
#define N_INET  0
#endif
        {PF_INET, sizeof(struct in_addr),
         sizeof(struct sockaddr_in),
         offsetof(struct sockaddr_in, sin_addr),
         in_addrany, in_loopback},
        {0, 0, 0, 0, NULL, NULL},
};

#ifdef INET6
#define PTON_MAX        16
#else
#define PTON_MAX        4
#endif

static int get_name __P((const char *, const struct afd *,
                          struct addrinfo **, char *, struct addrinfo *,
                          int));
static int get_addr __P((const char *, int, struct addrinfo **,
                        struct addrinfo *, int));
static int str_isnumber __P((const char *));

static const char *const ai_errlist[] = {
        "success.",
        "address family for hostname not supported.",   /* EAI_ADDRFAMILY */
        "temporary failure in name resolution.",        /* EAI_AGAIN      */
        "invalid value for ai_flags.",                  /* EAI_BADFLAGS   */
        "non-recoverable failure in name resolution.",  /* EAI_FAIL       */
        "ai_family not supported.",                     /* EAI_FAMILY     */
        "memory allocation failure.",                   /* EAI_MEMORY     */
        "no address associated with hostname.",         /* EAI_NODATA     */
        "hostname nor servname provided, or not known.",/* EAI_NONAME     */
        "servname not supported for ai_socktype.",      /* EAI_SERVICE    */
        "ai_socktype not supported.",                   /* EAI_SOCKTYPE   */
        "system error returned in errno.",              /* EAI_SYSTEM     */
        "invalid value for hints.",                     /* EAI_BADHINTS   */
        "resolved protocol is unknown.",                /* EAI_PROTOCOL   */
        "unknown error.",                               /* EAI_MAX        */
};

#define GET_CANONNAME(ai, str) \
if (pai->ai_flags & AI_CANONNAME) {\
        if (((ai)->ai_canonname = (char *)malloc(strlen(str) + 1)) != NULL) {\
                strcpy((ai)->ai_canonname, (str));\
        } else {\
                error = EAI_MEMORY;\
                goto free;\
        }\
}

#define GET_AI(ai, afd, addr, port) {\
        char *p;\
        if (((ai) = (struct addrinfo *)malloc(sizeof(struct addrinfo) +\
                                              ((afd)->a_socklen)))\
            == NULL) {\
                error = EAI_MEMORY;\
                goto free;\
        }\
        memcpy(ai, pai, sizeof(struct addrinfo));\
        (ai)->ai_addr = (struct sockaddr *)((ai) + 1);\
        memset((ai)->ai_addr, 0, (afd)->a_socklen);\
        SET_SA_LEN((ai)->ai_addr, (ai)->ai_addrlen = (afd)->a_socklen);\
        (ai)->ai_addr->sa_family = (ai)->ai_family = (afd)->a_af;\
        ((struct sockinet *)(ai)->ai_addr)->si_port = port;\
        p = (char *)((ai)->ai_addr);\
        memcpy(p + (afd)->a_off, (addr), (afd)->a_addrlen);\
}

#define ERR(err) { error = (err); goto bad; }

#if defined __UCLIBC__
const
#endif
char *
gai_strerror(ecode)
        int ecode;
{
        if (ecode < 0 || ecode > EAI_MAX)
                ecode = EAI_MAX;
        return (char *)ai_errlist[ecode];
}

void
freeaddrinfo(ai)
        struct addrinfo *ai;
{
        struct addrinfo *next;

        do {
                next = ai->ai_next;
                if (ai->ai_canonname)
                        free(ai->ai_canonname);
                /* no need to free(ai->ai_addr) */
                free(ai);
        } while ((ai = next) != NULL);
}

static int
str_isnumber(p)
        const char *p;
{
        char *q = (char *)p;
        while (*q) {
                if (! isdigit(*q))
                        return NO;
                q++;
        }
        return YES;
}

#ifndef HAVE_INET_PTON

static int
inet_pton(af, hostname, pton)
        int af;
        const char *hostname;
        void *pton;
{
        struct in_addr in;

#ifdef HAVE_INET_ATON
        if (!inet_aton(hostname, &in))
            return 0;
#else
        int d1, d2, d3, d4;
        char ch;

        if (sscanf(hostname, "%d.%d.%d.%d%c", &d1, &d2, &d3, &d4, &ch) == 4 &&
            0 <= d1 && d1 <= 255 && 0 <= d2 && d2 <= 255 &&
            0 <= d3 && d3 <= 255 && 0 <= d4 && d4 <= 255) {
            in.s_addr = htonl(
                ((long) d1 << 24) | ((long) d2 << 16) |
                ((long) d3 << 8) | ((long) d4 << 0));
        }
        else {
            return 0;
        }
#endif
        memcpy(pton, &in, sizeof(in));
        return 1;
}
#endif

int
getaddrinfo(hostname, servname, hints, res)
        const char *hostname, *servname;
        const struct addrinfo *hints;
        struct addrinfo **res;
{
        struct addrinfo sentinel;
        struct addrinfo *top = NULL;
        struct addrinfo *cur;
        int i, error = 0;
        char pton[PTON_MAX];
        struct addrinfo ai;
        struct addrinfo *pai;
        u_short port;

#ifdef FAITH
        static int firsttime = 1;

        if (firsttime) {
                /* translator hack */
                {
                        char *q = getenv("GAI");
                        if (q && inet_pton(AF_INET6, q, &faith_prefix) == 1)
                                translate = YES;
                }
                firsttime = 0;
        }
#endif

        /* initialize file static vars */
        sentinel.ai_next = NULL;
        cur = &sentinel;
        pai = &ai;
        pai->ai_flags = 0;
        pai->ai_family = PF_UNSPEC;
        pai->ai_socktype = ANY;
        pai->ai_protocol = ANY;
        pai->ai_addrlen = 0;
        pai->ai_canonname = NULL;
        pai->ai_addr = NULL;
        pai->ai_next = NULL;
        port = ANY;

        if (hostname == NULL && servname == NULL)
                return EAI_NONAME;
        if (hints) {
                /* error check for hints */
                if (hints->ai_addrlen || hints->ai_canonname ||
                    hints->ai_addr || hints->ai_next)
                        ERR(EAI_BADHINTS); /* xxx */
                if (hints->ai_flags & ~AI_MASK)
                        ERR(EAI_BADFLAGS);
                switch (hints->ai_family) {
                case PF_UNSPEC:
                case PF_INET:
#ifdef INET6
                case PF_INET6:
#endif
                        break;
                default:
                        ERR(EAI_FAMILY);
                }
                memcpy(pai, hints, sizeof(*pai));
                switch (pai->ai_socktype) {
                case ANY:
                        switch (pai->ai_protocol) {
                        case ANY:
                                break;
                        case IPPROTO_UDP:
                                pai->ai_socktype = SOCK_DGRAM;
                                break;
                        case IPPROTO_TCP:
                                pai->ai_socktype = SOCK_STREAM;
                                break;
                        default:
#if defined(SOCK_RAW)
                                pai->ai_socktype = SOCK_RAW;
#endif
                                break;
                        }
                        break;
#if defined(SOCK_RAW)
                case SOCK_RAW:
                        break;
#endif
                case SOCK_DGRAM:
                        if (pai->ai_protocol != IPPROTO_UDP &&
                            pai->ai_protocol != ANY)
                                ERR(EAI_BADHINTS);      /*xxx*/
                        pai->ai_protocol = IPPROTO_UDP;
                        break;
                case SOCK_STREAM:
                        if (pai->ai_protocol != IPPROTO_TCP &&
                            pai->ai_protocol != ANY)
                                ERR(EAI_BADHINTS);      /*xxx*/
                        pai->ai_protocol = IPPROTO_TCP;
                        break;
                default:
                        ERR(EAI_SOCKTYPE);
                        break;
                }
        }

        /*
         * service port
         */
        if (servname) {
                if (str_isnumber(servname)) {
                        if (pai->ai_socktype == ANY) {
                                /* caller accept *ANY* socktype */
                                pai->ai_socktype = SOCK_DGRAM;
                                pai->ai_protocol = IPPROTO_UDP;
                        }
                        port = htons((unsigned short)atoi(servname));
                } else {
                        struct servent *sp;
                        char *proto;

                        proto = NULL;
                        switch (pai->ai_socktype) {
                        case ANY:
                                proto = NULL;
                                break;
                        case SOCK_DGRAM:
                                proto = "udp";
                                break;
                        case SOCK_STREAM:
                                proto = "tcp";
                                break;
                        default:
                                fprintf(stderr, "panic!\n");
                                break;
                        }
                        if ((sp = getservbyname((char*)servname, proto)) == NULL)
                                ERR(EAI_SERVICE);
                        port = sp->s_port;
                        if (pai->ai_socktype == ANY)
                                if (strcmp(sp->s_proto, "udp") == 0) {
                                        pai->ai_socktype = SOCK_DGRAM;
                                        pai->ai_protocol = IPPROTO_UDP;
                                } else if (strcmp(sp->s_proto, "tcp") == 0) {
                                        pai->ai_socktype = SOCK_STREAM;
                                        pai->ai_protocol = IPPROTO_TCP;
                                } else
                                        ERR(EAI_PROTOCOL);      /*xxx*/
                }
        }

        /*
         * hostname == NULL.
         * passive socket -> anyaddr (0.0.0.0 or ::)
         * non-passive socket -> localhost (127.0.0.1 or ::1)
         */
        if (hostname == NULL) {
                const struct afd *afd;
                int s;

                for (afd = &afdl[0]; afd->a_af; afd++) {
                        if (!(pai->ai_family == PF_UNSPEC
                           || pai->ai_family == afd->a_af)) {
                                continue;
                        }

                        /*
                         * filter out AFs that are not supported by the kernel
                         * XXX errno?
                         */
                        s = socket(afd->a_af, SOCK_DGRAM, 0);
                        if (s < 0)
                                continue;
#if defined(__BEOS__)
                        closesocket(s);
#else
                        close(s);
#endif

                        if (pai->ai_flags & AI_PASSIVE) {
                                GET_AI(cur->ai_next, afd, afd->a_addrany, port);
                                /* xxx meaningless?
                                 * GET_CANONNAME(cur->ai_next, "anyaddr");
                                 */
                        } else {
                                GET_AI(cur->ai_next, afd, afd->a_loopback,
                                        port);
                                /* xxx meaningless?
                                 * GET_CANONNAME(cur->ai_next, "localhost");
                                 */
                        }
                        cur = cur->ai_next;
                }
                top = sentinel.ai_next;
                if (top)
                        goto good;
                else
                        ERR(EAI_FAMILY);
        }

        /* hostname as numeric name */
        for (i = 0; afdl[i].a_af; i++) {
                if (inet_pton(afdl[i].a_af, hostname, pton)) {
                        u_long v4a;
#ifdef INET6
                        u_char pfx;
#endif

                        switch (afdl[i].a_af) {
                        case AF_INET:
                                v4a = ((struct in_addr *)pton)->s_addr;
                                if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a))
                                        pai->ai_flags &= ~AI_CANONNAME;
                                v4a >>= IN_CLASSA_NSHIFT;
                                if (v4a == 0 || v4a == IN_LOOPBACKNET)
                                        pai->ai_flags &= ~AI_CANONNAME;
                                break;
#ifdef INET6
                        case AF_INET6:
#ifdef HAVE_ADDR8
                                pfx = ((struct in6_addr *)pton)->s6_addr8[0];
#else
                                pfx = ((struct in6_addr *)pton)->s6_addr[0];
#endif
                                if (pfx == 0 || pfx == 0xfe || pfx == 0xff)
                                        pai->ai_flags &= ~AI_CANONNAME;
                                break;
#endif
                        }

                        if (pai->ai_family == afdl[i].a_af ||
                            pai->ai_family == PF_UNSPEC) {
                                if (! (pai->ai_flags & AI_CANONNAME)) {
                                        GET_AI(top, &afdl[i], pton, port);
                                        goto good;
                                }
                                /*
                                 * if AI_CANONNAME and if reverse lookup
                                 * fail, return ai anyway to pacify
                                 * calling application.
                                 *
                                 * XXX getaddrinfo() is a name->address
                                 * translation function, and it looks strange
                                 * that we do addr->name translation here.
                                 */
                                get_name(pton, &afdl[i], &top, pton, pai, port);
                                goto good;
                        } else
                                ERR(EAI_FAMILY);        /*xxx*/
                }
        }

        if (pai->ai_flags & AI_NUMERICHOST)
                ERR(EAI_NONAME);

        /* hostname as alphabetical name */
        error = get_addr(hostname, pai->ai_family, &top, pai, port);
        if (error == 0) {
                if (top) {
 good:
                        *res = top;
                        return SUCCESS;
                } else
                        error = EAI_FAIL;
        }
 free:
        if (top)
                freeaddrinfo(top);
 bad:
        *res = NULL;
        return error;
}

static int
get_name(addr, afd, res, numaddr, pai, port0)
        const char *addr;
        const struct afd *afd;
        struct addrinfo **res;
        char *numaddr;
        struct addrinfo *pai;
        int port0;
{
        u_short port = port0 & 0xffff;
        struct hostent *hp;
        struct addrinfo *cur;
        int error = 0;
#ifdef INET6
        int h_error;
#endif

#ifdef INET6
        hp = getipnodebyaddr(addr, afd->a_addrlen, afd->a_af, &h_error);
#else
        hp = gethostbyaddr((char*)addr, afd->a_addrlen, AF_INET);
#endif
        if (hp && hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) {
                GET_AI(cur, afd, hp->h_addr_list[0], port);
                GET_CANONNAME(cur, hp->h_name);
        } else
                GET_AI(cur, afd, numaddr, port);

#ifdef INET6
        if (hp)
                freehostent(hp);
#endif
        *res = cur;
        return SUCCESS;
 free:
        if (cur)
                freeaddrinfo(cur);
#ifdef INET6
        if (hp)
                freehostent(hp);
#endif
 /* bad: */
        *res = NULL;
        return error;
}

static int
get_addr(hostname, af, res, pai, port0)
        const char *hostname;
        int af;
        struct addrinfo **res;
        struct addrinfo *pai;
        int port0;
{
        u_short port = port0 & 0xffff;
        struct addrinfo sentinel;
        struct hostent *hp;
        struct addrinfo *top, *cur;
        const struct afd *afd;
        int i, error = 0, h_error;
        char *ap;

        top = NULL;
        sentinel.ai_next = NULL;
        cur = &sentinel;
#ifdef INET6
        if (af == AF_UNSPEC) {
                hp = getipnodebyname(hostname, AF_INET6,
                                AI_ADDRCONFIG|AI_ALL|AI_V4MAPPED, &h_error);
        } else
                hp = getipnodebyname(hostname, af, AI_ADDRCONFIG, &h_error);
#else
        hp = gethostbyname((char*)hostname);
        h_error = h_errno;
#endif
        if (hp == NULL) {
                switch (h_error) {
                case HOST_NOT_FOUND:
                case NO_DATA:
                        error = EAI_NODATA;
                        break;
                case TRY_AGAIN:
                        error = EAI_AGAIN;
                        break;
                case NO_RECOVERY:
                default:
                        error = EAI_FAIL;
                        break;
                }
                goto bad;
        }

        if ((hp->h_name == NULL) || (hp->h_name[0] == 0) ||
            (hp->h_addr_list[0] == NULL))
                ERR(EAI_FAIL);

        for (i = 0; (ap = hp->h_addr_list[i]) != NULL; i++) {
                switch (af) {
#ifdef INET6
                case AF_INET6:
                        afd = &afdl[N_INET6];
                        break;
#endif
#ifndef INET6
                default:        /* AF_UNSPEC */
#endif
                case AF_INET:
                        afd = &afdl[N_INET];
                        break;
#ifdef INET6
                default:        /* AF_UNSPEC */
                        if (IN6_IS_ADDR_V4MAPPED((struct in6_addr *)ap)) {
                                ap += sizeof(struct in6_addr) -
                                        sizeof(struct in_addr);
                                afd = &afdl[N_INET];
                        } else
                                afd = &afdl[N_INET6];
                        break;
#endif
                }
#ifdef FAITH
                if (translate && afd->a_af == AF_INET) {
                        struct in6_addr *in6;

                        GET_AI(cur->ai_next, &afdl[N_INET6], ap, port);
                        in6 = &((struct sockaddr_in6 *)cur->ai_next->ai_addr)->sin6_addr;
                        memcpy(&in6->s6_addr32[0], &faith_prefix,
                            sizeof(struct in6_addr) - sizeof(struct in_addr));
                        memcpy(&in6->s6_addr32[3], ap, sizeof(struct in_addr));
                } else
#endif /* FAITH */
                GET_AI(cur->ai_next, afd, ap, port);
                if (cur == &sentinel) {
                        top = cur->ai_next;
                        GET_CANONNAME(top, hp->h_name);
                }
                cur = cur->ai_next;
        }
#ifdef INET6
        freehostent(hp);
#endif
        *res = top;
        return SUCCESS;
 free:
        if (top)
                freeaddrinfo(top);
#ifdef INET6
        if (hp)
                freehostent(hp);
#endif
 bad:
        *res = NULL;
        return error;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/socket/getnameinfo.c

root/ext/socket/getnameinfo.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. inet_ntop
  2. getnameinfo
/*
 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. Neither the name of the project nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

/*
 * Issues to be discussed:
 * - Thread safe-ness must be checked
 * - Return values.  There seems to be no standard for return value (RFC2133)
 *   but INRIA implementation returns EAI_xxx defined for getaddrinfo().
 */

#include "config.h"
#include <sys/types.h>
#ifndef _WIN32
#if defined(__BEOS__)
# include <net/socket.h>
#else
# include <sys/socket.h>
#endif
#include <netinet/in.h>
#if defined(HAVE_ARPA_INET_H)
#include <arpa/inet.h>
#endif
#if defined(HAVE_ARPA_NAMESER_H)
#include <arpa/nameser.h>
#endif
#include <netdb.h>
#if defined(HAVE_RESOLV_H)
#ifdef _SX
#include <stdio.h>
#endif
#include <resolv.h>
#endif
#endif
#ifdef _WIN32
#include <winsock2.h>
#include <stdio.h>
#define snprintf _snprintf
#endif

#include <string.h>
#include <stddef.h>

#ifdef SOCKS5
#include <socks.h>
#endif

#include "addrinfo.h"
#include "sockport.h"

#define SUCCESS 0
#define ANY 0
#define YES 1
#define NO  0

struct sockinet {
        u_char  si_len;
        u_char  si_family;
        u_short si_port;
};

static struct afd {
        int a_af;
        int a_addrlen;
        int a_socklen;
        int a_off;
} afdl [] = {
#ifdef INET6
#define N_INET6 0
        {PF_INET6, sizeof(struct in6_addr),
         sizeof(struct sockaddr_in6),
         offsetof(struct sockaddr_in6, sin6_addr)},
#define N_INET  1
#else
#define N_INET  0
#endif
        {PF_INET, sizeof(struct in_addr),
         sizeof(struct sockaddr_in),
         offsetof(struct sockaddr_in, sin_addr)},
        {0, 0, 0, 0},
};

#define ENI_NOSOCKET    0
#define ENI_NOSERVNAME  1
#define ENI_NOHOSTNAME  2
#define ENI_MEMORY      3
#define ENI_SYSTEM      4
#define ENI_FAMILY      5
#define ENI_SALEN       6

#ifndef HAVE_INET_NTOP
static const char *
inet_ntop(af, addr, numaddr, numaddr_len)
        int af;
        const void *addr;
        char *numaddr;
        size_t numaddr_len;
{
#ifdef HAVE_INET_NTOA
        struct in_addr in;
        memcpy(&in.s_addr, addr, sizeof(in.s_addr));
        snprintf(numaddr, numaddr_len, "%s", inet_ntoa(in));
#else
        unsigned long x = ntohl(*(unsigned long*)addr);
        snprintf(numaddr, numaddr_len, "%d.%d.%d.%d",
                 (int) (x>>24) & 0xff, (int) (x>>16) & 0xff,
                 (int) (x>> 8) & 0xff, (int) (x>> 0) & 0xff);
#endif
        return numaddr;
}
#endif

int
getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
        const struct sockaddr *sa;
        size_t salen;
        char *host;
        size_t hostlen;
        char *serv;
        size_t servlen;
        int flags;
{
        struct afd *afd;
        struct servent *sp;
        struct hostent *hp;
        u_short port;
        int family, len, i;
        char *addr, *p;
        u_long v4a;
#ifdef INET6
        u_char pfx;
#endif
        int h_error;
        char numserv[512];
        char numaddr[512];

        if (sa == NULL)
                return ENI_NOSOCKET;

        len = SA_LEN(sa);
        if (len != salen) return ENI_SALEN;

        family = sa->sa_family;
        for (i = 0; afdl[i].a_af; i++)
                if (afdl[i].a_af == family) {
                        afd = &afdl[i];
                        goto found;
                }
        return ENI_FAMILY;

 found:
        if (len != afd->a_socklen) return ENI_SALEN;

        port = ((struct sockinet *)sa)->si_port; /* network byte order */
        addr = (char *)sa + afd->a_off;

        if (serv == NULL || servlen == 0) {
                /* what we should do? */
        } else if (flags & NI_NUMERICSERV) {
                snprintf(numserv, sizeof(numserv), "%d", ntohs(port));
                if (strlen(numserv) + 1 > servlen)
                        return ENI_MEMORY;
                strcpy(serv, numserv);
        } else {
#if defined(HAVE_GETSERVBYPORT)
                sp = getservbyport(port, (flags & NI_DGRAM) ? "udp" : "tcp");
                if (sp) {
                        if (strlen(sp->s_name) + 1 > servlen)
                                return ENI_MEMORY;
                        strcpy(serv, sp->s_name);
                } else
                        return ENI_NOSERVNAME;
#else
                return ENI_NOSERVNAME;
#endif
        }

        switch (sa->sa_family) {
        case AF_INET:
                v4a = ntohl(((struct sockaddr_in *)sa)->sin_addr.s_addr);
                if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a))
                        flags |= NI_NUMERICHOST;
                v4a >>= IN_CLASSA_NSHIFT;
                if (v4a == 0)
                        flags |= NI_NUMERICHOST;
                break;
#ifdef INET6
        case AF_INET6:
#ifdef HAVE_ADDR8
                pfx = ((struct sockaddr_in6 *)sa)->sin6_addr.s6_addr8[0];
#else
                pfx = ((struct sockaddr_in6 *)sa)->sin6_addr.s6_addr[0];
#endif
                if (pfx == 0 || pfx == 0xfe || pfx == 0xff)
                        flags |= NI_NUMERICHOST;
                break;
#endif
        }
        if (host == NULL || hostlen == 0) {
                /* what should we do? */
        } else if (flags & NI_NUMERICHOST) {
                if (inet_ntop(afd->a_af, addr, numaddr, sizeof(numaddr))
                    == NULL)
                        return ENI_SYSTEM;
                if (strlen(numaddr) > hostlen)
                        return ENI_MEMORY;
                strcpy(host, numaddr);
        } else {
#ifdef INET6
                hp = getipnodebyaddr(addr, afd->a_addrlen, afd->a_af, &h_error);
#else
                hp = gethostbyaddr(addr, afd->a_addrlen, afd->a_af);
                h_error = h_errno;
#endif

                if (hp) {
                        if (flags & NI_NOFQDN) {
                                p = strchr(hp->h_name, '.');
                                if (p) *p = '\0';
                        }
                        if (strlen(hp->h_name) + 1 > hostlen) {
#ifdef INET6
                                freehostent(hp);
#endif
                                return ENI_MEMORY;
                        }
                        strcpy(host, hp->h_name);
#ifdef INET6
                        freehostent(hp);
#endif
                } else {
                        if (flags & NI_NAMEREQD)
                                return ENI_NOHOSTNAME;
                        if (inet_ntop(afd->a_af, addr, numaddr, sizeof(numaddr))
                            == NULL)
                                return ENI_NOHOSTNAME;
                        if (strlen(numaddr) > hostlen)
                                return ENI_MEMORY;
                        strcpy(host, numaddr);
                }
        }
        return SUCCESS;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/socket/socket.c

root/ext/socket/socket.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. ruby_getaddrinfo
  2. ruby_getaddrinfo__aix
  3. init_sock
  4. bsock_s_for_fd
  5. bsock_shutdown
  6. bsock_close_read
  7. bsock_close_write
  8. bsock_setsockopt
  9. bsock_getsockopt
  10. bsock_getsockname
  11. bsock_getpeername
  12. bsock_send
  13. bsock_do_not_reverse_lookup
  14. bsock_do_not_reverse_lookup_set
  15. s_recvfrom
  16. bsock_recv
  17. bsock_do_not_rev_lookup
  18. bsock_do_not_rev_lookup_set
  19. raise_socket_error
  20. make_ipaddr0
  21. make_ipaddr
  22. make_inetaddr
  23. str_isnumber
  24. host_str
  25. port_str
  26. sock_addrinfo
  27. ipaddr
  28. ruby_socket
  29. wait_connectable0
  30. try_wait_connectable
  31. wait_connectable_ensure
  32. wait_connectable
  33. ruby_connect
  34. inetsock_cleanup
  35. init_inetsock_internal
  36. init_inetsock
  37. tcp_init
  38. socks_init
  39. socks_s_close
  40. make_hostent_internal
  41. make_hostent
  42. tcp_sockaddr
  43. tcp_s_gethostbyname
  44. tcp_svr_init
  45. s_accept
  46. tcp_accept
  47. tcp_sysaccept
  48. unixsock_connect_internal
  49. init_unixsock
  50. ip_addr
  51. ip_peeraddr
  52. ip_recvfrom
  53. ip_s_getaddress
  54. udp_init
  55. udp_connect_internal
  56. udp_connect
  57. udp_bind
  58. udp_send
  59. unix_init
  60. unix_path
  61. unix_svr_init
  62. unix_recvfrom
  63. unix_send_io
  64. unix_recv_io
  65. unix_accept
  66. unix_sysaccept
  67. unixaddr
  68. unix_addr
  69. unix_peeraddr
  70. setup_domain_and_type
  71. sock_initialize
  72. sock_s_socketpair
  73. unix_s_socketpair
  74. sock_connect
  75. sock_bind
  76. sock_listen
  77. sock_recvfrom
  78. sock_accept
  79. sock_sysaccept
  80. sock_gethostname
  81. sock_gethostname
  82. sock_gethostname
  83. make_addrinfo
  84. sock_sockaddr
  85. sock_s_gethostbyname
  86. sock_s_gethostbyaddr
  87. sock_s_getservbyname
  88. sock_s_getservbyport
  89. sock_s_getaddrinfo
  90. sock_s_getnameinfo
  91. sock_s_pack_sockaddr_in
  92. sock_s_unpack_sockaddr_in
  93. sock_s_pack_sockaddr_un
  94. sock_s_unpack_sockaddr_un
  95. sock_define_const
  96. Init_socket
/************************************************

  socket.c -

  $Author: usa $
  $Date: 2005/11/28 09:56:16 $
  created at: Thu Mar 31 12:21:29 JST 1994

  Copyright (C) 1993-2001 Yukihiro Matsumoto

************************************************/

#include "ruby.h"
#include "rubyio.h"
#include "rubysig.h"
#include "util.h"
#include <stdio.h>
#include <sys/types.h>

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#ifdef HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif

#ifndef _WIN32
#if defined(__BEOS__)
# include <net/socket.h>
#else
# include <sys/socket.h>
#endif
#include <netinet/in.h>
#ifdef HAVE_NETINET_IN_SYSTM_H
# include <netinet/in_systm.h>
#endif
#ifdef HAVE_NETINET_TCP_H
# include <netinet/tcp.h>
#endif
#ifdef HAVE_NETINET_UDP_H
# include <netinet/udp.h>
#endif
#include <netdb.h>
#endif
#include <errno.h>
#ifdef HAVE_SYS_UN_H
#include <sys/un.h>
#endif

#if defined(HAVE_FCNTL)
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#endif
#ifndef EWOULDBLOCK
#define EWOULDBLOCK EAGAIN
#endif
#ifndef HAVE_GETADDRINFO
# include "addrinfo.h"
#endif
#include "sockport.h"

static int do_not_reverse_lookup = 0;
#define FMODE_NOREVLOOKUP 0x100

VALUE rb_cBasicSocket;
VALUE rb_cIPSocket;
VALUE rb_cTCPSocket;
VALUE rb_cTCPServer;
VALUE rb_cUDPSocket;
#ifdef AF_UNIX
VALUE rb_cUNIXSocket;
VALUE rb_cUNIXServer;
#endif
VALUE rb_cSocket;

static VALUE rb_eSocket;

#ifdef SOCKS
VALUE rb_cSOCKSSocket;
#ifdef SOCKS5
#include <socks.h>
#else
void SOCKSinit();
int Rconnect();
#endif
#endif

#define INET_CLIENT 0
#define INET_SERVER 1
#define INET_SOCKS  2

#ifndef HAVE_SOCKADDR_STORAGE
/*
 * RFC 2553: protocol-independent placeholder for socket addresses
 */
#define _SS_MAXSIZE     128
#define _SS_ALIGNSIZE   (sizeof(double))
#define _SS_PAD1SIZE    (_SS_ALIGNSIZE - sizeof(unsigned char) * 2)
#define _SS_PAD2SIZE    (_SS_MAXSIZE - sizeof(unsigned char) * 2 - \
                                _SS_PAD1SIZE - _SS_ALIGNSIZE)

struct sockaddr_storage {
#ifdef HAVE_SA_LEN
        unsigned char ss_len;           /* address length */
        unsigned char ss_family;        /* address family */
#else
        unsigned short ss_family;
#endif
        char    __ss_pad1[_SS_PAD1SIZE];
        double  __ss_align;     /* force desired structure storage alignment */
        char    __ss_pad2[_SS_PAD2SIZE];
};
#endif

#if defined(INET6) && (defined(LOOKUP_ORDER_HACK_INET) || defined(LOOKUP_ORDER_HACK_INET6))
#define LOOKUP_ORDERS           3
static int lookup_order_table[LOOKUP_ORDERS] = {
#if defined(LOOKUP_ORDER_HACK_INET)
    PF_INET, PF_INET6, PF_UNSPEC,
#elif defined(LOOKUP_ORDER_HACK_INET6)
    PF_INET6, PF_INET, PF_UNSPEC,
#else
    /* should not happen */
#endif
};

static int
ruby_getaddrinfo(nodename, servname, hints, res)
     char *nodename;
     char *servname;
     struct addrinfo *hints;
     struct addrinfo **res;
{
    struct addrinfo tmp_hints;
    int i, af, error;

    if (hints->ai_family != PF_UNSPEC) {
        return getaddrinfo(nodename, servname, hints, res);
    }

    for (i = 0; i < LOOKUP_ORDERS; i++) {
        af = lookup_order_table[i];
        MEMCPY(&tmp_hints, hints, struct addrinfo, 1);
        tmp_hints.ai_family = af;
        error = getaddrinfo(nodename, servname, &tmp_hints, res);
        if (error) {
            if (tmp_hints.ai_family == PF_UNSPEC) {
                break;
            }
        }
        else {
            break;
        }
    }

    return error;
}
#define getaddrinfo(node,serv,hints,res) ruby_getaddrinfo((node),(serv),(hints),(res))
#endif

#if defined(_AIX)
static int
ruby_getaddrinfo__aix(nodename, servname, hints, res)
     char *nodename;
     char *servname;
     struct addrinfo *hints;
     struct addrinfo **res;
{
    int error = getaddrinfo(nodename, servname, hints, res);
    struct addrinfo *r;
    if (error)
        return error;
    for (r = *res; r != NULL; r = r->ai_next) {
        if (r->ai_addr->sa_family == 0)
            r->ai_addr->sa_family = r->ai_family;
        if (r->ai_addr->sa_len == 0)
            r->ai_addr->sa_len = r->ai_addrlen;
    }
    return 0;
}
#undef getaddrinfo
#define getaddrinfo(node,serv,hints,res) ruby_getaddrinfo__aix((node),(serv),(hints),(res))
#endif

#ifdef __BEOS__
#undef close
#define close closesocket
#endif

static VALUE
init_sock(sock, fd)
    VALUE sock;
    int fd;
{
    OpenFile *fp;

    MakeOpenFile(sock, fp);
    fp->fd = fd;
    fp->mode = FMODE_READWRITE|FMODE_DUPLEX;
    if (do_not_reverse_lookup) {
        fp->mode |= FMODE_NOREVLOOKUP;
    }
    rb_io_synchronized(fp);

    return sock;
}

static VALUE
bsock_s_for_fd(klass, fd)
    VALUE klass, fd;
{
    OpenFile *fptr;
    VALUE sock = init_sock(rb_obj_alloc(klass), NUM2INT(fd));

    GetOpenFile(sock, fptr);

    return sock;
}

static VALUE
bsock_shutdown(argc, argv, sock)
    int argc;
    VALUE *argv;
    VALUE sock;
{
    VALUE howto;
    int how;
    OpenFile *fptr;

    if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) {
        rb_raise(rb_eSecurityError, "Insecure: can't shutdown socket");
    }
    rb_scan_args(argc, argv, "01", &howto);
    if (howto == Qnil)
        how = 2;
    else {
        how = NUM2INT(howto);
        if (how < 0 || 2 < how) {
            rb_raise(rb_eArgError, "`how' should be either 0, 1, 2");
        }
    }
    GetOpenFile(sock, fptr);
    if (shutdown(fptr->fd, how) == -1)
        rb_sys_fail(0);

    return INT2FIX(0);
}

static VALUE
bsock_close_read(sock)
    VALUE sock;
{
    OpenFile *fptr;

    if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) {
        rb_raise(rb_eSecurityError, "Insecure: can't close socket");
    }
    GetOpenFile(sock, fptr);
    shutdown(fptr->fd, 0);
    if (!(fptr->mode & FMODE_WRITABLE)) {
        return rb_io_close(sock);
    }
    fptr->mode &= ~FMODE_READABLE;

    return Qnil;
}

static VALUE
bsock_close_write(sock)
    VALUE sock;
{
    OpenFile *fptr;

    if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) {
        rb_raise(rb_eSecurityError, "Insecure: can't close socket");
    }
    GetOpenFile(sock, fptr);
    if (!(fptr->mode & FMODE_READABLE)) {
        return rb_io_close(sock);
    }
    shutdown(fptr->fd, 1);
    fptr->mode &= ~FMODE_WRITABLE;

    return Qnil;
}

/*
 * Document-method: setsockopt
 * call-seq: setsockopt(level, optname, optval)
 *
 * Sets a socket option. These are protocol and system specific, see your
 * local sytem documentation for details.
 *
 * === Parameters
 * * +level+ is an integer, usually one of the SOL_ constants such as
 *   Socket::SOL_SOCKET, or a protocol level.
 * * +optname+ is an integer, usually one of the SO_ constants, such
 *   as Socket::SO_REUSEADDR.
 * * +optval+ is the value of the option, it is passed to the underlying
 *   setsockopt() as a pointer to a certain number of bytes. How this is
 *   done depends on the type:
 *   - Fixnum: value is assigned to an int, and a pointer to the int is
 *     passed, with length of sizeof(int).
 *   - true or false: 1 or 0 (respectively) is assigned to an int, and the
 *     int is passed as for a Fixnum. Note that +false+ must be passed,
 *     not +nil+.
 *   - String: the string's data and length is passed to the socket.
 *
 * === Examples
 *
 * Some socket options are integers with boolean values, in this case
 * #setsockopt could be called like this:
 *   sock.setsockopt(Socket::SOL_SOCKET,Socket::SO_REUSEADDR, true)
 *
 * Some socket options are integers with numeric values, in this case
 * #setsockopt could be called like this:
 *   sock.setsockopt(Socket::IPPROTO_IP, Socket::IP_TTL, 255)
 *
 * Option values may be structs. Passing them can be complex as it involves
 * examining your system headers to determine the correct definition. An
 * example is an +ip_mreq+, which may be defined in your system headers as:
 *   struct ip_mreq {
 *     struct  in_addr imr_multiaddr;
 *     struct  in_addr imr_interface;
 *   };
 *
 * In this case #setsockopt could be called like this:
 *   optval =  IPAddr.new("224.0.0.251") + Socket::INADDR_ANY
 *   sock.setsockopt(Socket::IPPROTO_IP, Socket::IP_ADD_MEMBERSHIP, optval)
 *
*/
static VALUE
bsock_setsockopt(sock, lev, optname, val)
    VALUE sock, lev, optname, val;
{
    int level, option;
    OpenFile *fptr;
    int i;
    char *v;
    int vlen;

    rb_secure(2);
    level = NUM2INT(lev);
    option = NUM2INT(optname);

    switch (TYPE(val)) {
      case T_FIXNUM:
        i = FIX2INT(val);
        goto numval;
      case T_FALSE:
        i = 0;
        goto numval;
      case T_TRUE:
        i = 1;
      numval:
        v = (char*)&i; vlen = sizeof(i);
        break;
      default:
        StringValue(val);
        v = RSTRING(val)->ptr;
        vlen = RSTRING(val)->len;
        break;
    }

    GetOpenFile(sock, fptr);
    if (setsockopt(fptr->fd, level, option, v, vlen) < 0)
        rb_sys_fail(fptr->path);

    return INT2FIX(0);
}

/*
 * Document-method: getsockopt
 * call-seq: getsockopt(level, optname)
 *
 * Gets a socket option. These are protocol and system specific, see your
 * local sytem documentation for details. The option is returned as
 * a String with the data being the binary value of the socket option.
 *
 * === Parameters
 * * +level+ is an integer, usually one of the SOL_ constants such as
 *   Socket::SOL_SOCKET, or a protocol level.
 * * +optname+ is an integer, usually one of the SO_ constants, such
 *   as Socket::SO_REUSEADDR.
 *
 * === Examples
 *
 * Some socket options are integers with boolean values, in this case
 * #getsockopt could be called like this:
 *   optval = sock.getsockopt(Socket::SOL_SOCKET,Socket::SO_REUSEADDR)
 *   optval = optval.unpack "i"
 *   reuseaddr = optval[0] == 0 ? false : true
 *
 * Some socket options are integers with numeric values, in this case
 * #getsockopt could be called like this:
 *   optval = sock.getsockopt(Socket::IPPROTO_IP, Socket::IP_TTL)
 *   ipttl = optval.unpack("i")[0]
 *
 * Option values may be structs. Decoding them can be complex as it involves
 * examining your system headers to determine the correct definition. An
 * example is a +struct linger+, which may be defined in your system headers
 * as:
 *   struct linger {
 *     int l_onoff;
 *     int l_linger;
 *   };
 *
 * In this case #getsockopt could be called like this:
 *   optval =  sock.getsockopt(Socket::SOL_SOCKET, Socket::SO_LINGER)
 *   onoff, linger = optval.unpack "ii"
*/
static VALUE
bsock_getsockopt(sock, lev, optname)
    VALUE sock, lev, optname;
{
#if !defined(__BEOS__)
    int level, option;
    socklen_t len;
    char *buf;
    OpenFile *fptr;

    level = NUM2INT(lev);
    option = NUM2INT(optname);
    len = 256;
    buf = ALLOCA_N(char,len);

    GetOpenFile(sock, fptr);
    if (getsockopt(fptr->fd, level, option, buf, &len) < 0)
        rb_sys_fail(fptr->path);

    return rb_str_new(buf, len);
#else
    rb_notimplement();
#endif
}

static VALUE
bsock_getsockname(sock)
    VALUE sock;
{
    char buf[1024];
    socklen_t len = sizeof buf;
    OpenFile *fptr;

    GetOpenFile(sock, fptr);
    if (getsockname(fptr->fd, (struct sockaddr*)buf, &len) < 0)
        rb_sys_fail("getsockname(2)");
    return rb_str_new(buf, len);
}

static VALUE
bsock_getpeername(sock)
    VALUE sock;
{
    char buf[1024];
    socklen_t len = sizeof buf;
    OpenFile *fptr;

    GetOpenFile(sock, fptr);
    if (getpeername(fptr->fd, (struct sockaddr*)buf, &len) < 0)
        rb_sys_fail("getpeername(2)");
    return rb_str_new(buf, len);
}

static VALUE
bsock_send(argc, argv, sock)
    int argc;
    VALUE *argv;
    VALUE sock;
{
    VALUE mesg, to;
    VALUE flags;
    OpenFile *fptr;
    int fd, n;

    rb_secure(4);
    rb_scan_args(argc, argv, "21", &mesg, &flags, &to);

    StringValue(mesg);
    if (!NIL_P(to)) StringValue(to);
    GetOpenFile(sock, fptr);
    fd = fptr->fd;
    rb_thread_fd_writable(fd);
  retry:
    if (!NIL_P(to)) {
        TRAP_BEG;
        n = sendto(fd, RSTRING(mesg)->ptr, RSTRING(mesg)->len, NUM2INT(flags),
                   (struct sockaddr*)RSTRING(to)->ptr, RSTRING(to)->len);
        TRAP_END;
    }
    else {
        TRAP_BEG;
        n = send(fd, RSTRING(mesg)->ptr, RSTRING(mesg)->len, NUM2INT(flags));
        TRAP_END;
    }
    if (n < 0) {
        if (rb_io_wait_writable(fd)) {
            goto retry;
        }
        rb_sys_fail("send(2)");
    }
    return INT2FIX(n);
}

static VALUE
bsock_do_not_reverse_lookup(sock)
    VALUE sock;
{
    OpenFile *fptr;

    GetOpenFile(sock, fptr);
    return (fptr->mode & FMODE_NOREVLOOKUP) ? Qtrue : Qfalse;
}

static VALUE
bsock_do_not_reverse_lookup_set(sock, state)
    VALUE sock;
    VALUE state;
{
    OpenFile *fptr;

    rb_secure(4);
    GetOpenFile(sock, fptr);
    if (RTEST(state)) {
        fptr->mode |= FMODE_NOREVLOOKUP;
    }
    else {
        fptr->mode &= ~FMODE_NOREVLOOKUP;
    }
    return sock;
}

static VALUE ipaddr _((struct sockaddr*, int));
#ifdef HAVE_SYS_UN_H
static VALUE unixaddr _((struct sockaddr_un*));
#endif

enum sock_recv_type {
    RECV_RECV,                  /* BasicSocket#recv(no from) */
    RECV_IP,                    /* IPSocket#recvfrom */
    RECV_UNIX,                  /* UNIXSocket#recvfrom */
    RECV_SOCKET                 /* Socket#recvfrom */
};

static VALUE
s_recvfrom(sock, argc, argv, from)
    VALUE sock;
    int argc;
    VALUE *argv;
    enum sock_recv_type from;
{
    OpenFile *fptr;
    VALUE str;
    char buf[1024];
    socklen_t alen = sizeof buf;
    VALUE len, flg;
    long buflen;
    long slen;
    int fd, flags;

    rb_scan_args(argc, argv, "11", &len, &flg);

    if (flg == Qnil) flags = 0;
    else             flags = NUM2INT(flg);
    buflen = NUM2INT(len);

    GetOpenFile(sock, fptr);
    if (rb_io_read_pending(fptr)) {
        rb_raise(rb_eIOError, "recv for buffered IO");
    }
    fd = fptr->fd;

    str = rb_tainted_str_new(0, buflen);

  retry:
    rb_thread_wait_fd(fd);
    rb_io_check_closed(fptr);
    if (RSTRING(str)->len != buflen) {
        rb_raise(rb_eRuntimeError, "buffer string modified");
    }
    TRAP_BEG;
    slen = recvfrom(fd, RSTRING(str)->ptr, buflen, flags, (struct sockaddr*)buf, &alen);
    TRAP_END;

    if (slen < 0) {
        if (rb_io_wait_readable(fd)) {
            goto retry;
        }
        rb_sys_fail("recvfrom(2)");
    }
    if (slen < RSTRING(str)->len) {
        RSTRING(str)->len = slen;
        RSTRING(str)->ptr[slen] = '\0';
    }
    rb_obj_taint(str);
    switch (from) {
      case RECV_RECV:
        return (VALUE)str;
      case RECV_IP:
#if 0
        if (alen != sizeof(struct sockaddr_in)) {
            rb_raise(rb_eTypeError, "sockaddr size differs - should not happen");
        }
#endif
        if (alen) /* OSX doesn't return a from result for connection-oriented sockets */
          return rb_assoc_new(str, ipaddr((struct sockaddr*)buf, fptr->mode & FMODE_NOREVLOOKUP));
        else
          return rb_assoc_new(str, Qnil);

#ifdef HAVE_SYS_UN_H
      case RECV_UNIX:
        return rb_assoc_new(str, unixaddr((struct sockaddr_un*)buf));
#endif
      case RECV_SOCKET:
        return rb_assoc_new(str, rb_str_new(buf, alen));
      default:
        rb_bug("s_recvfrom called with bad value");
    }
}

static VALUE
bsock_recv(argc, argv, sock)
    int argc;
    VALUE *argv;
    VALUE sock;
{
    return s_recvfrom(sock, argc, argv, RECV_RECV);
}

static VALUE
bsock_do_not_rev_lookup()
{
    return do_not_reverse_lookup?Qtrue:Qfalse;
}

static VALUE
bsock_do_not_rev_lookup_set(self, val)
    VALUE self, val;
{
    rb_secure(4);
    do_not_reverse_lookup = RTEST(val);
    return val;
}

NORETURN(static void raise_socket_error _((char *, int)));
static void
raise_socket_error(reason, error)
    char *reason;
    int error;
{
#ifdef EAI_SYSTEM
    if (error == EAI_SYSTEM) rb_sys_fail(reason);
#endif
    rb_raise(rb_eSocket, "%s: %s", reason, gai_strerror(error));
}

static void
make_ipaddr0(addr, buf, len)
    struct sockaddr *addr;
    char *buf;
    size_t len;
{
    int error;

    error = getnameinfo(addr, SA_LEN(addr), buf, len, NULL, 0, NI_NUMERICHOST);
    if (error) {
        raise_socket_error("getnameinfo", error);
    }
}

static VALUE
make_ipaddr(addr)
    struct sockaddr *addr;
{
    char buf[1024];

    make_ipaddr0(addr, buf, sizeof(buf));
    return rb_str_new2(buf);
}

static void
make_inetaddr(host, buf, len)
    long host;
    char *buf;
    size_t len;
{
    struct sockaddr_in sin;

    MEMZERO(&sin, struct sockaddr_in, 1);
    sin.sin_family = AF_INET;
    SET_SIN_LEN(&sin, sizeof(sin));
    sin.sin_addr.s_addr = host;
    make_ipaddr0((struct sockaddr*)&sin, buf, len);
}

static int
str_isnumber(p)
        const char *p;
{
    char *ep;

    if (!p || *p == '\0')
       return 0;
    ep = NULL;
    (void)strtoul(p, &ep, 10);
    if (ep && *ep == '\0')
       return 1;
    else
       return 0;
}

static char *
host_str(host, hbuf, len)
    VALUE host;
    char *hbuf;
    size_t len;
{
    if (NIL_P(host)) {
        return NULL;
    }
    else if (rb_obj_is_kind_of(host, rb_cInteger)) {
        long i = NUM2LONG(host);

        make_inetaddr(htonl(i), hbuf, len);
        return hbuf;
    }
    else {
        char *name;

        SafeStringValue(host);
        name = RSTRING(host)->ptr;
        if (!name || *name == 0 || (name[0] == '<' && strcmp(name, "<any>") == 0)) {
            make_inetaddr(INADDR_ANY, hbuf, len);
        }
        else if (name[0] == '<' && strcmp(name, "<broadcast>") == 0) {
            make_inetaddr(INADDR_BROADCAST, hbuf, len);
        }
        else if (strlen(name) >= len) {
            rb_raise(rb_eArgError, "hostname too long (%d)", strlen(name));
        }
        else {
            strcpy(hbuf, name);
        }
        return hbuf;
    }
}

static char *
port_str(port, pbuf, len)
    VALUE port;
    char *pbuf;
    size_t len;
{
    if (NIL_P(port)) {
        return 0;
    }
    else if (FIXNUM_P(port)) {
        snprintf(pbuf, len, "%ld", FIX2LONG(port));
        return pbuf;
    }
    else {
        char *serv;

        SafeStringValue(port);
        serv = RSTRING(port)->ptr;
        if (strlen(serv) >= len) {
            rb_raise(rb_eArgError, "service name too long (%d)", strlen(serv));
        }
        strcpy(pbuf, serv);
        return pbuf;
    }
}

#ifndef NI_MAXHOST
# define 1025
#endif
#ifndef NI_MAXSERV
# define 32
#endif

static struct addrinfo*
sock_addrinfo(host, port, socktype, flags)
    VALUE host, port;
    int socktype, flags;
{
    struct addrinfo hints;
    struct addrinfo* res = NULL;
    char *hostp, *portp;
    int error;
    char hbuf[NI_MAXHOST], pbuf[NI_MAXSERV];

    hostp = host_str(host, hbuf, sizeof(hbuf));
    portp = port_str(port, pbuf, sizeof(pbuf));

    if (socktype == 0 && flags == 0 && str_isnumber(portp)) {
       socktype = SOCK_DGRAM;
    }

    MEMZERO(&hints, struct addrinfo, 1);
    hints.ai_family = AF_UNSPEC;
    hints.ai_socktype = socktype;
    hints.ai_flags = flags;
    error = getaddrinfo(hostp, portp, &hints, &res);
    if (error) {
        if (hostp && hostp[strlen(hostp)-1] == '\n') {
            rb_raise(rb_eSocket, "newline at the end of hostname");
        }
        raise_socket_error("getaddrinfo", error);
    }

#if defined(__APPLE__) && defined(__MACH__)
    {
        struct addrinfo *r;
       r = res;
       while (r) {
            if (! r->ai_socktype) r->ai_socktype = hints.ai_socktype;
            if (! r->ai_protocol) {
                if (r->ai_socktype == SOCK_DGRAM) {
                    r->ai_protocol = IPPROTO_UDP;
                } else if (r->ai_socktype == SOCK_STREAM) {
                    r->ai_protocol = IPPROTO_TCP;
                }
            }
            r = r->ai_next;
        }
    }
#endif
    return res;
}

static VALUE
ipaddr(sockaddr, norevlookup)
    struct sockaddr *sockaddr;
    int norevlookup;
{
    VALUE family, port, addr1, addr2;
    VALUE ary;
    int error;
    char hbuf[1024], pbuf[1024];

    switch (sockaddr->sa_family) {
    case AF_UNSPEC:
        family = rb_str_new2("AF_UNSPEC");
        break;
    case AF_INET:
        family = rb_str_new2("AF_INET");
        break;
#ifdef INET6
    case AF_INET6:
        family = rb_str_new2("AF_INET6");
        break;
#endif
#ifdef AF_LOCAL
    case AF_LOCAL:
        family = rb_str_new2("AF_LOCAL");
        break;
#elif  AF_UNIX
    case AF_UNIX:
        family = rb_str_new2("AF_UNIX");
        break;
#endif
    default:
        sprintf(pbuf, "unknown:%d", sockaddr->sa_family);
        family = rb_str_new2(pbuf);
        break;
    }

    addr1 = Qnil;
    if (!norevlookup) {
        error = getnameinfo(sockaddr, SA_LEN(sockaddr), hbuf, sizeof(hbuf),
                            NULL, 0, 0);
        if (! error) {
            addr1 = rb_str_new2(hbuf);
        }
    }
    error = getnameinfo(sockaddr, SA_LEN(sockaddr), hbuf, sizeof(hbuf),
                        pbuf, sizeof(pbuf), NI_NUMERICHOST | NI_NUMERICSERV);
    if (error) {
        raise_socket_error("getnameinfo", error);
    }
    addr2 = rb_str_new2(hbuf);
    if (addr1 == Qnil) {
        addr1 = addr2;
    }
    port = INT2FIX(atoi(pbuf));
    ary = rb_ary_new3(4, family, port, addr1, addr2);

    return ary;
}

static int
ruby_socket(domain, type, proto)
    int domain, type, proto;
{
    int fd;

    fd = socket(domain, type, proto);
    if (fd < 0) {
        if (errno == EMFILE || errno == ENFILE) {
            rb_gc();
            fd = socket(domain, type, proto);
        }
    }
    return fd;
}

static int
wait_connectable0(fd, fds_w, fds_e)
    int fd;
    rb_fdset_t *fds_w, *fds_e;
{
    int sockerr;
    socklen_t sockerrlen;

    for (;;) {
        rb_fd_zero(fds_w);
        rb_fd_zero(fds_e);

        rb_fd_set(fd, fds_w);
        rb_fd_set(fd, fds_e);

        rb_thread_select(fd+1, 0, rb_fd_ptr(fds_w), rb_fd_ptr(fds_e), 0);

        if (rb_fd_isset(fd, fds_w)) {
            return 0;
        }
        else if (rb_fd_isset(fd, fds_e)) {
            sockerrlen = sizeof(sockerr);
            if (getsockopt(fd, SOL_SOCKET, SO_ERROR, (void *)&sockerr,
                           &sockerrlen) == 0) {
                if (sockerr == 0)
                    continue;   /* workaround for winsock */
                errno = sockerr;
            }
            return -1;
        }
    }

    return 0;
}

struct wait_connectable_arg {
    int fd;
    rb_fdset_t fds_w;
    rb_fdset_t fds_e;
};

#ifdef HAVE_RB_FD_INIT
static VALUE
try_wait_connectable(arg)
    VALUE arg;
{
    struct wait_connectable_arg *p = (struct wait_connectable_arg *)arg;
    return (VALUE)wait_connectable0(p->fd, &p->fds_w, &p->fds_e);
}

static VALUE
wait_connectable_ensure(arg)
    VALUE arg;
{
    struct wait_connectable_arg *p = (struct wait_connectable_arg *)arg;
    rb_fd_term(&p->fds_w);
    rb_fd_term(&p->fds_e);
    return Qnil;
}
#endif

static int
wait_connectable(fd)
    int fd;
{
    struct wait_connectable_arg arg;

    rb_fd_init(&arg.fds_w);
    rb_fd_init(&arg.fds_e);
#ifdef HAVE_RB_FD_INIT
    arg.fd = fd;
    return (int)rb_ensure(try_wait_connectable, (VALUE)&arg,
                          wait_connectable_ensure,(VALUE)&arg);
#else
    return wait_connectable0(fd, &arg.fds_w, &arg.fds_e);
#endif
}

#ifdef __CYGWIN__
#define WAIT_IN_PROGRESS 10
#endif
#ifdef __APPLE__
#define WAIT_IN_PROGRESS 10
#endif
#ifdef __linux__
/* returns correct error */
#define WAIT_IN_PROGRESS 0
#endif
#ifndef WAIT_IN_PROGRESS
/* BSD origin code apparently has a problem */
#define WAIT_IN_PROGRESS 1
#endif

static int
ruby_connect(fd, sockaddr, len, socks)
    int fd;
    struct sockaddr *sockaddr;
    int len;
    int socks;
{
    int status;
    int mode;
#if WAIT_IN_PROGRESS > 0
    int wait_in_progress = -1;
    int sockerr, sockerrlen;
#endif

#if defined(HAVE_FCNTL)
# if defined(F_GETFL)
    mode = fcntl(fd, F_GETFL, 0);
# else
    mode = 0;
# endif

#ifdef O_NDELAY
# define NONBLOCKING O_NDELAY
#else
#ifdef O_NBIO
# define NONBLOCKING O_NBIO
#else
# define NONBLOCKING O_NONBLOCK
#endif
#endif
#ifdef SOCKS5
    if (!socks)
#endif
    fcntl(fd, F_SETFL, mode|NONBLOCKING);
#endif /* HAVE_FCNTL */

    for (;;) {
#if defined(SOCKS) && !defined(SOCKS5)
        if (socks) {
            status = Rconnect(fd, sockaddr, len);
        }
        else
#endif
        {
            status = connect(fd, sockaddr, len);
        }
        if (status < 0) {
            switch (errno) {
              case EAGAIN:
#ifdef EINPROGRESS
              case EINPROGRESS:
#endif
#if WAIT_IN_PROGRESS > 0
                sockerrlen = sizeof(sockerr);
                status = getsockopt(fd, SOL_SOCKET, SO_ERROR, (void *)&sockerr, &sockerrlen);
                if (status) break;
                if (sockerr) {
                    status = -1;
                    errno = sockerr;
                    break;
                }
#endif
#ifdef EALREADY
              case EALREADY:
#endif
#if WAIT_IN_PROGRESS > 0
                wait_in_progress = WAIT_IN_PROGRESS;
#endif
                status = wait_connectable(fd);
                if (status) {
                    break;
                }
                errno = 0;
                continue;

#if WAIT_IN_PROGRESS > 0
              case EINVAL:
                if (wait_in_progress-- > 0) {
                    /*
                     * connect() after EINPROGRESS returns EINVAL on
                     * some platforms, need to check true error
                     * status.
                     */
                    sockerrlen = sizeof(sockerr);
                    status = getsockopt(fd, SOL_SOCKET, SO_ERROR, (void *)&sockerr, &sockerrlen);
                    if (!status && !sockerr) {
                        struct timeval tv = {0, 100000};
                        rb_thread_wait_for(tv);
                        continue;
                    }
                    status = -1;
                    errno = sockerr;
                }
                break;
#endif

#ifdef EISCONN
              case EISCONN:
                status = 0;
                errno = 0;
                break;
#endif
              default:
                break;
            }
        }
#ifdef HAVE_FCNTL
        fcntl(fd, F_SETFL, mode);
#endif
        return status;
    }
}

struct inetsock_arg
{
    VALUE sock;
    struct {
        VALUE host, serv;
        struct addrinfo *res;
    } remote, local;
    int type;
    int fd;
};

static VALUE
inetsock_cleanup(arg)
    struct inetsock_arg *arg;
{
    if (arg->remote.res) {
        freeaddrinfo(arg->remote.res);
        arg->remote.res = 0;
    }
    if (arg->local.res) {
        freeaddrinfo(arg->local.res);
        arg->local.res = 0;
    }
    if (arg->fd >= 0) {
        close(arg->fd);
    }
    return Qnil;
}

static VALUE
init_inetsock_internal(arg)
    struct inetsock_arg *arg;
{
    int type = arg->type;
    struct addrinfo *res;
    int fd, status = 0;
    char *syscall;

    arg->remote.res = sock_addrinfo(arg->remote.host, arg->remote.serv, SOCK_STREAM,
                                    (type == INET_SERVER) ? AI_PASSIVE : 0);
    /*
     * Maybe also accept a local address
     */

    if (type != INET_SERVER && (!NIL_P(arg->local.host) || !NIL_P(arg->local.serv))) {
        arg->local.res = sock_addrinfo(arg->local.host, arg->local.serv, SOCK_STREAM, 0);
    }

    arg->fd = fd = -1;
    for (res = arg->remote.res; res; res = res->ai_next) {
        status = ruby_socket(res->ai_family,res->ai_socktype,res->ai_protocol);
        syscall = "socket(2)";
        fd = status;
        if (fd < 0) {
            continue;
        }
        arg->fd = fd;
        if (type == INET_SERVER) {
#if !defined(_WIN32) && !defined(__CYGWIN__)
            status = 1;
            setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
                       (char*)&status, sizeof(status));
#endif
            status = bind(fd, res->ai_addr, res->ai_addrlen);
            syscall = "bind(2)";
        }
        else {
            if (arg->local.res) {
                status = bind(fd, arg->local.res->ai_addr, arg->local.res->ai_addrlen);
                syscall = "bind(2)";
            }

            if (status >= 0) {
                status = ruby_connect(fd, res->ai_addr, res->ai_addrlen,
                                      (type == INET_SOCKS));
                syscall = "connect(2)";
            }
        }

        if (status < 0) {
            close(fd);
            arg->fd = fd = -1;
            continue;
        } else
            break;
    }
    if (status < 0) {
        rb_sys_fail(syscall);
    }

    arg->fd = -1;

    if (type == INET_SERVER)
        listen(fd, 5);

    /* create new instance */
    return init_sock(arg->sock, fd);
}

static VALUE
init_inetsock(sock, remote_host, remote_serv, local_host, local_serv, type)
    VALUE sock, remote_host, remote_serv, local_host, local_serv;
    int type;
{
    struct inetsock_arg arg;
    arg.sock = sock;
    arg.remote.host = remote_host;
    arg.remote.serv = remote_serv;
    arg.remote.res = 0;
    arg.local.host = local_host;
    arg.local.serv = local_serv;
    arg.local.res = 0;
    arg.type = type;
    arg.fd = -1;
    return rb_ensure(init_inetsock_internal, (VALUE)&arg,
                     inetsock_cleanup, (VALUE)&arg);
}

static VALUE
tcp_init(argc, argv, sock)
     int argc;
     VALUE *argv;
     VALUE sock;
{
    VALUE remote_host, remote_serv;
    VALUE local_host, local_serv;

    rb_scan_args(argc, argv, "22", &remote_host, &remote_serv,
                        &local_host, &local_serv);

    return init_inetsock(sock, remote_host, remote_serv,
                        local_host, local_serv, INET_CLIENT);
}

#ifdef SOCKS
static VALUE
socks_init(sock, host, serv)
    VALUE sock, host, serv;
{
    static init = 0;

    if (init == 0) {
        SOCKSinit("ruby");
        init = 1;
    }

    return init_inetsock(sock, host, serv, Qnil, Qnil, INET_SOCKS);
}

#ifdef SOCKS5
static VALUE
socks_s_close(sock)
    VALUE sock;
{
    OpenFile *fptr;

    if (rb_safe_level() >= 4 && !OBJ_TAINTED(sock)) {
        rb_raise(rb_eSecurityError, "Insecure: can't close socket");
    }
    GetOpenFile(sock, fptr);
    shutdown(fptr->fd, 2);
    return rb_io_close(sock);
}
#endif
#endif

struct hostent_arg {
    VALUE host;
    struct addrinfo* addr;
    VALUE (*ipaddr)_((struct sockaddr*, size_t));
};

static VALUE
make_hostent_internal(arg)
    struct hostent_arg *arg;
{
    VALUE host = arg->host;
    struct addrinfo* addr = arg->addr;
    VALUE (*ipaddr)_((struct sockaddr*, size_t)) = arg->ipaddr;

    struct addrinfo *ai;
    struct hostent *h;
    VALUE ary, names;
    char **pch;
    const char* hostp;
    char hbuf[NI_MAXHOST];

    ary = rb_ary_new();
    if (addr->ai_canonname) {
        hostp = addr->ai_canonname;
    }
    else {
        hostp = host_str(host, hbuf, sizeof(hbuf));
    }
    rb_ary_push(ary, rb_str_new2(hostp));

    if (addr->ai_canonname && (h = gethostbyname(addr->ai_canonname))) {
        names = rb_ary_new();
        if (h->h_aliases != NULL) {
            for (pch = h->h_aliases; *pch; pch++) {
                rb_ary_push(names, rb_str_new2(*pch));
            }
        }
    }
    else {
        names = rb_ary_new2(0);
    }
    rb_ary_push(ary, names);
    rb_ary_push(ary, INT2NUM(addr->ai_family));
    for (ai = addr; ai; ai = ai->ai_next) {
        rb_ary_push(ary, (*ipaddr)(ai->ai_addr, ai->ai_addrlen));
    }

    return ary;
}

static VALUE
make_hostent(host, addr, ipaddr)
    VALUE host;
    struct addrinfo* addr;
    VALUE (*ipaddr)_((struct sockaddr*, size_t));
{
    struct hostent_arg arg;

    arg.host = host;
    arg.addr = addr;
    arg.ipaddr = ipaddr;
    return rb_ensure(make_hostent_internal, (VALUE)&arg,
                     RUBY_METHOD_FUNC(freeaddrinfo), (VALUE)addr);
}

VALUE
tcp_sockaddr(addr, len)
    struct sockaddr *addr;
    size_t len;
{
    return make_ipaddr(addr);
}

static VALUE
tcp_s_gethostbyname(obj, host)
    VALUE obj, host;
{
    rb_secure(3);
    return make_hostent(host, sock_addrinfo(host, Qnil, SOCK_STREAM, AI_CANONNAME), tcp_sockaddr);
}

static VALUE
tcp_svr_init(argc, argv, sock)
    int argc;
    VALUE *argv;
    VALUE sock;
{
    VALUE arg1, arg2;

    if (rb_scan_args(argc, argv, "11", &arg1, &arg2) == 2)
        return init_inetsock(sock, arg1, arg2, Qnil, Qnil, INET_SERVER);
    else
        return init_inetsock(sock, Qnil, arg1, Qnil, Qnil, INET_SERVER);
}

static VALUE
s_accept(klass, fd, sockaddr, len)
    VALUE klass;
    int fd;
    struct sockaddr *sockaddr;
    socklen_t *len;
{
    int fd2;
    int retry = 0;

    rb_secure(3);
  retry:
    rb_thread_wait_fd(fd);
#if defined(_nec_ews)
    fd2 = accept(fd, sockaddr, len);
#else
    TRAP_BEG;
    fd2 = accept(fd, sockaddr, len);
    TRAP_END;
#endif
    if (fd2 < 0) {
        switch (errno) {
          case EMFILE:
          case ENFILE:
            if (retry) break;
            rb_gc();
            retry = 1;
            goto retry;
          case EWOULDBLOCK:
            break;
          default:
            if (!rb_io_wait_readable(fd)) break;
            retry = 0;
            goto retry;
        }
        rb_sys_fail(0);
    }
    if (!klass) return INT2NUM(fd2);
    return init_sock(rb_obj_alloc(klass), fd2);
}

static VALUE
tcp_accept(sock)
    VALUE sock;
{
    OpenFile *fptr;
    struct sockaddr_storage from;
    socklen_t fromlen;

    GetOpenFile(sock, fptr);
    fromlen = sizeof(from);
    return s_accept(rb_cTCPSocket, fptr->fd,
                    (struct sockaddr*)&from, &fromlen);
}

static VALUE
tcp_sysaccept(sock)
    VALUE sock;
{
    OpenFile *fptr;
    struct sockaddr_storage from;
    socklen_t fromlen;

    GetOpenFile(sock, fptr);
    fromlen = sizeof(from);
    return s_accept(0, fptr->fd, (struct sockaddr*)&from, &fromlen);
}

#ifdef HAVE_SYS_UN_H
struct unixsock_arg {
    struct sockaddr_un *sockaddr;
    int fd;
};

static VALUE
unixsock_connect_internal(arg)
    struct unixsock_arg *arg;
{
    return (VALUE)ruby_connect(arg->fd, arg->sockaddr, sizeof(*arg->sockaddr), 0);
}

static VALUE
init_unixsock(sock, path, server)
    VALUE sock;
    VALUE path;
    int server;
{
    struct sockaddr_un sockaddr;
    int fd, status;
    OpenFile *fptr;

    SafeStringValue(path);
    fd = ruby_socket(AF_UNIX, SOCK_STREAM, 0);
    if (fd < 0) {
        rb_sys_fail("socket(2)");
    }

    MEMZERO(&sockaddr, struct sockaddr_un, 1);
    sockaddr.sun_family = AF_UNIX;
    strncpy(sockaddr.sun_path, RSTRING(path)->ptr, sizeof(sockaddr.sun_path)-1);
    sockaddr.sun_path[sizeof(sockaddr.sun_path)-1] = '\0';

    if (server) {
        status = bind(fd, (struct sockaddr*)&sockaddr, sizeof(sockaddr));
    }
    else {
        int prot;
        struct unixsock_arg arg;
        arg.sockaddr = &sockaddr;
        arg.fd = fd;
        status = rb_protect(unixsock_connect_internal, (VALUE)&arg, &prot);
        if (prot) {
            close(fd);
            rb_jump_tag(prot);
        }
    }

    if (status < 0) {
        close(fd);
        rb_sys_fail(sockaddr.sun_path);
    }

    if (server) listen(fd, 5);

    init_sock(sock, fd);
    GetOpenFile(sock, fptr);
    fptr->path = strdup(RSTRING(path)->ptr);

    return sock;
}
#endif

static VALUE
ip_addr(sock)
    VALUE sock;
{
    OpenFile *fptr;
    struct sockaddr_storage addr;
    socklen_t len = sizeof addr;

    GetOpenFile(sock, fptr);

    if (getsockname(fptr->fd, (struct sockaddr*)&addr, &len) < 0)
        rb_sys_fail("getsockname(2)");
    return ipaddr((struct sockaddr*)&addr, fptr->mode & FMODE_NOREVLOOKUP);
}

static VALUE
ip_peeraddr(sock)
    VALUE sock;
{
    OpenFile *fptr;
    struct sockaddr_storage addr;
    socklen_t len = sizeof addr;

    GetOpenFile(sock, fptr);

    if (getpeername(fptr->fd, (struct sockaddr*)&addr, &len) < 0)
        rb_sys_fail("getpeername(2)");
    return ipaddr((struct sockaddr*)&addr, fptr->mode & FMODE_NOREVLOOKUP);
}

static VALUE
ip_recvfrom(argc, argv, sock)
    int argc;
    VALUE *argv;
    VALUE sock;
{
    return s_recvfrom(sock, argc, argv, RECV_IP);
}

static VALUE
ip_s_getaddress(obj, host)
    VALUE obj, host;
{
    struct sockaddr_storage addr;
    struct addrinfo *res = sock_addrinfo(host, Qnil, SOCK_STREAM, 0);

    /* just take the first one */
    memcpy(&addr, res->ai_addr, res->ai_addrlen);
    freeaddrinfo(res);

    return make_ipaddr((struct sockaddr*)&addr);
}

static VALUE
udp_init(argc, argv, sock)
    int argc;
    VALUE *argv;
    VALUE sock;
{
    VALUE arg;
    int socktype = AF_INET;
    int fd;

    rb_secure(3);
    if (rb_scan_args(argc, argv, "01", &arg) == 1) {
        socktype = NUM2INT(arg);
    }
    fd = ruby_socket(socktype, SOCK_DGRAM, 0);
    if (fd < 0) {
        rb_sys_fail("socket(2) - udp");
    }

    return init_sock(sock, fd);
}

struct udp_arg
{
    struct addrinfo *res;
    int fd;
};

static VALUE
udp_connect_internal(arg)
    struct udp_arg *arg;
{
    int fd = arg->fd;
    struct addrinfo *res;

    for (res = arg->res; res; res = res->ai_next) {
        if (ruby_connect(fd, res->ai_addr, res->ai_addrlen, 0) >= 0) {
            return Qtrue;
        }
    }
    return Qfalse;
}

static VALUE
udp_connect(sock, host, port)
    VALUE sock, host, port;
{
    OpenFile *fptr;
    struct udp_arg arg;
    VALUE ret;

    rb_secure(3);
    arg.res = sock_addrinfo(host, port, SOCK_DGRAM, 0);
    GetOpenFile(sock, fptr);
    arg.fd = fptr->fd;
    ret = rb_ensure(udp_connect_internal, (VALUE)&arg,
                    RUBY_METHOD_FUNC(freeaddrinfo), (VALUE)arg.res);
    if (!ret) rb_sys_fail("connect(2)");
    return INT2FIX(0);
}

static VALUE
udp_bind(sock, host, port)
    VALUE sock, host, port;
{
    OpenFile *fptr;
    struct addrinfo *res0, *res;

    rb_secure(3);
    res0 = sock_addrinfo(host, port, SOCK_DGRAM, 0);
    GetOpenFile(sock, fptr);
    for (res = res0; res; res = res->ai_next) {
        if (bind(fptr->fd, res->ai_addr, res->ai_addrlen) < 0) {
            continue;
        }
        freeaddrinfo(res0);
        return INT2FIX(0);
    }
    freeaddrinfo(res0);
    rb_sys_fail("bind(2)");
    return INT2FIX(0);
}

static VALUE
udp_send(argc, argv, sock)
    int argc;
    VALUE *argv;
    VALUE sock;
{
    VALUE mesg, flags, host, port;
    OpenFile *fptr;
    int n;
    struct addrinfo *res0, *res;

    if (argc == 2 || argc == 3) {
        return bsock_send(argc, argv, sock);
    }
    rb_secure(4);
    rb_scan_args(argc, argv, "4", &mesg, &flags, &host, &port);

    StringValue(mesg);
    res0 = sock_addrinfo(host, port, SOCK_DGRAM, 0);
    GetOpenFile(sock, fptr);
    for (res = res0; res; res = res->ai_next) {
      retry:
        n = sendto(fptr->fd, RSTRING(mesg)->ptr, RSTRING(mesg)->len, NUM2INT(flags),
                   res->ai_addr, res->ai_addrlen);
        if (n >= 0) {
            freeaddrinfo(res0);
            return INT2FIX(n);
        }
        if (rb_io_wait_writable(fptr->fd)) {
            goto retry;
        }
    }
    freeaddrinfo(res0);
    rb_sys_fail("sendto(2)");
    return INT2FIX(n);
}

#ifdef HAVE_SYS_UN_H
static VALUE
unix_init(sock, path)
    VALUE sock, path;
{
    return init_unixsock(sock, path, 0);
}

static VALUE
unix_path(sock)
    VALUE sock;
{
    OpenFile *fptr;

    GetOpenFile(sock, fptr);
    if (fptr->path == 0) {
        struct sockaddr_un addr;
        socklen_t len = sizeof(addr);
        if (getsockname(fptr->fd, (struct sockaddr*)&addr, &len) < 0)
            rb_sys_fail(0);
        fptr->path = strdup(addr.sun_path);
    }
    return rb_str_new2(fptr->path);
}

static VALUE
unix_svr_init(sock, path)
    VALUE sock, path;
{
    return init_unixsock(sock, path, 1);
}

static VALUE
unix_recvfrom(argc, argv, sock)
    int argc;
    VALUE *argv;
    VALUE sock;
{
    return s_recvfrom(sock, argc, argv, RECV_UNIX);
}

#if defined(HAVE_ST_MSG_CONTROL) && defined(SCM_RIGHTS)
#define FD_PASSING_BY_MSG_CONTROL 1
#else
#define FD_PASSING_BY_MSG_CONTROL 0
#endif

#if defined(HAVE_ST_MSG_ACCRIGHTS)
#define FD_PASSING_BY_MSG_ACCRIGHTS 1
#else
#define FD_PASSING_BY_MSG_ACCRIGHTS 0
#endif

static VALUE
unix_send_io(sock, val)
    VALUE sock, val;
{
#if defined(HAVE_SENDMSG) && (FD_PASSING_BY_MSG_CONTROL || FD_PASSING_BY_MSG_ACCRIGHTS)
    int fd;
    OpenFile *fptr;
    struct msghdr msg;
    struct iovec vec[1];
    char buf[1];

#if FD_PASSING_BY_MSG_CONTROL
    struct {
        struct cmsghdr hdr;
        int fd;
    } cmsg;
#endif

    if (rb_obj_is_kind_of(val, rb_cIO)) {
        OpenFile *valfptr;
        GetOpenFile(val, valfptr);
        fd = valfptr->fd;
    }
    else if (FIXNUM_P(val)) {
        fd = FIX2INT(val);
    }
    else {
        rb_raise(rb_eTypeError, "neither IO nor file descriptor");
    }

    GetOpenFile(sock, fptr);

    msg.msg_name = NULL;
    msg.msg_namelen = 0;

    /* Linux and Solaris doesn't work if msg_iov is NULL. */
    buf[0] = '\0';
    vec[0].iov_base = buf;
    vec[0].iov_len = 1;
    msg.msg_iov = vec;
    msg.msg_iovlen = 1;

#if FD_PASSING_BY_MSG_CONTROL
    msg.msg_control = (caddr_t)&cmsg;
    msg.msg_controllen = CMSG_SPACE(sizeof(int));
    msg.msg_flags = 0;
    cmsg.hdr.cmsg_len = CMSG_LEN(sizeof(int));
    cmsg.hdr.cmsg_level = SOL_SOCKET;
    cmsg.hdr.cmsg_type = SCM_RIGHTS;
    cmsg.fd = fd;
#else
    msg.msg_accrights = (caddr_t)&fd;
    msg.msg_accrightslen = sizeof(fd);
#endif

    if (sendmsg(fptr->fd, &msg, 0) == -1)
        rb_sys_fail("sendmsg(2)");

    return Qnil;
#else
    rb_notimplement();
    return Qnil;                /* not reached */
#endif
}

static VALUE
unix_recv_io(argc, argv, sock)
    int argc;
    VALUE *argv;
    VALUE sock;
{
#if defined(HAVE_RECVMSG) && (FD_PASSING_BY_MSG_CONTROL || FD_PASSING_BY_MSG_ACCRIGHTS)
    VALUE klass, mode;
    OpenFile *fptr;
    struct msghdr msg;
    struct iovec vec[2];
    char buf[1];

    int fd;
#if FD_PASSING_BY_MSG_CONTROL
    struct {
        struct cmsghdr hdr;
        int fd;
    } cmsg;
#endif

    rb_scan_args(argc, argv, "02", &klass, &mode);
    if (argc == 0)
        klass = rb_cIO;
    if (argc <= 1)
        mode = Qnil;

    GetOpenFile(sock, fptr);

    rb_io_wait_readable(fptr->fd);

    msg.msg_name = NULL;
    msg.msg_namelen = 0;

    vec[0].iov_base = buf;
    vec[0].iov_len = sizeof(buf);
    msg.msg_iov = vec;
    msg.msg_iovlen = 1;

#if FD_PASSING_BY_MSG_CONTROL
    msg.msg_control = (caddr_t)&cmsg;
    msg.msg_controllen = CMSG_SPACE(sizeof(int));
    msg.msg_flags = 0;
    cmsg.hdr.cmsg_len = CMSG_LEN(sizeof(int));
    cmsg.hdr.cmsg_level = SOL_SOCKET;
    cmsg.hdr.cmsg_type = SCM_RIGHTS;
    cmsg.fd = -1;
#else
    msg.msg_accrights = (caddr_t)&fd;
    msg.msg_accrightslen = sizeof(fd);
    fd = -1;
#endif

    if (recvmsg(fptr->fd, &msg, 0) == -1)
        rb_sys_fail("recvmsg(2)");

#if FD_PASSING_BY_MSG_CONTROL
    if (msg.msg_controllen != CMSG_SPACE(sizeof(int))) {
      rb_raise(rb_eSocket,
          "file descriptor was not passed (msg_controllen : %d != %d)",
          msg.msg_controllen, CMSG_SPACE(sizeof(int)));
    }
    if (cmsg.hdr.cmsg_len != CMSG_SPACE(0) + sizeof(int)) {
      rb_raise(rb_eSocket,
          "file descriptor was not passed (cmsg_len : %d != %d)",
          cmsg.hdr.cmsg_len, CMSG_SPACE(0) + sizeof(int));
    }
    if (cmsg.hdr.cmsg_level != SOL_SOCKET) {
      rb_raise(rb_eSocket,
          "file descriptor was not passed (cmsg_level : %d != %d)",
          cmsg.hdr.cmsg_level, SOL_SOCKET);
    }
    if (cmsg.hdr.cmsg_type != SCM_RIGHTS) {
      rb_raise(rb_eSocket,
          "file descriptor was not passed (cmsg_type : %d != %d)",
          cmsg.hdr.cmsg_type, SCM_RIGHTS);
    }
#else
    if (msg.msg_accrightslen != sizeof(fd)) {
        rb_raise(rb_eSocket,
            "file descriptor was not passed (accrightslen) : %d != %d",
            msg.msg_accrightslen, sizeof(fd));
    }
#endif

#if FD_PASSING_BY_MSG_CONTROL
    fd = cmsg.fd;
#endif

    if (klass == Qnil)
        return INT2FIX(fd);
    else {
        static ID for_fd = 0;
        int ff_argc;
        VALUE ff_argv[2];
        if (!for_fd)
            for_fd = rb_intern("for_fd");
        ff_argc = mode == Qnil ? 1 : 2;
        ff_argv[0] = INT2FIX(fd);
        ff_argv[1] = mode;
        return rb_funcall2(klass, for_fd, ff_argc, ff_argv);
    }
#else
    rb_notimplement();
    return Qnil;                /* not reached */
#endif
}

static VALUE
unix_accept(sock)
    VALUE sock;
{
    OpenFile *fptr;
    struct sockaddr_un from;
    socklen_t fromlen;

    GetOpenFile(sock, fptr);
    fromlen = sizeof(struct sockaddr_un);
    return s_accept(rb_cUNIXSocket, fptr->fd,
                    (struct sockaddr*)&from, &fromlen);
}

static VALUE
unix_sysaccept(sock)
    VALUE sock;
{
    OpenFile *fptr;
    struct sockaddr_un from;
    socklen_t fromlen;

    GetOpenFile(sock, fptr);
    fromlen = sizeof(struct sockaddr_un);
    return s_accept(0, fptr->fd, (struct sockaddr*)&from, &fromlen);
}

#ifdef HAVE_SYS_UN_H
static VALUE
unixaddr(sockaddr)
    struct sockaddr_un *sockaddr;
{
    return rb_assoc_new(rb_str_new2("AF_UNIX"),
                        rb_str_new2(sockaddr->sun_path));
}
#endif

static VALUE
unix_addr(sock)
    VALUE sock;
{
    OpenFile *fptr;
    struct sockaddr_un addr;
    socklen_t len = sizeof addr;

    GetOpenFile(sock, fptr);

    if (getsockname(fptr->fd, (struct sockaddr*)&addr, &len) < 0)
        rb_sys_fail("getsockname(2)");
    if (len == 0)
        addr.sun_path[0] = '\0';
    return unixaddr(&addr);
}

static VALUE
unix_peeraddr(sock)
    VALUE sock;
{
    OpenFile *fptr;
    struct sockaddr_un addr;
    socklen_t len = sizeof addr;

    GetOpenFile(sock, fptr);

    if (getpeername(fptr->fd, (struct sockaddr*)&addr, &len) < 0)
        rb_sys_fail("getsockname(2)");
    if (len == 0)
        addr.sun_path[0] = '\0';
    return unixaddr(&addr);
}
#endif

static void
setup_domain_and_type(domain, dv, type, tv)
    VALUE domain, type;
    int *dv, *tv;
{
    VALUE tmp;
    char *ptr;

    tmp = rb_check_string_type(domain);
    if (!NIL_P(tmp)) {
        domain = tmp;
        rb_check_safe_obj(domain);
        ptr = RSTRING(domain)->ptr;
        if (strcmp(ptr, "AF_INET") == 0)
            *dv = AF_INET;
#ifdef AF_UNIX
        else if (strcmp(ptr, "AF_UNIX") == 0)
            *dv = AF_UNIX;
#endif
#ifdef AF_ISO
        else if (strcmp(ptr, "AF_ISO") == 0)
            *dv = AF_ISO;
#endif
#ifdef AF_NS
        else if (strcmp(ptr, "AF_NS") == 0)
            *dv = AF_NS;
#endif
#ifdef AF_IMPLINK
        else if (strcmp(ptr, "AF_IMPLINK") == 0)
            *dv = AF_IMPLINK;
#endif
#ifdef PF_INET
        else if (strcmp(ptr, "PF_INET") == 0)
            *dv = PF_INET;
#endif
#ifdef PF_UNIX
        else if (strcmp(ptr, "PF_UNIX") == 0)
            *dv = PF_UNIX;
#endif
#ifdef PF_IMPLINK
        else if (strcmp(ptr, "PF_IMPLINK") == 0)
            *dv = PF_IMPLINK;
        else if (strcmp(ptr, "AF_IMPLINK") == 0)
            *dv = AF_IMPLINK;
#endif
#ifdef PF_AX25
        else if (strcmp(ptr, "PF_AX25") == 0)
            *dv = PF_AX25;
#endif
#ifdef PF_IPX
        else if (strcmp(ptr, "PF_IPX") == 0)
            *dv = PF_IPX;
#endif
        else
            rb_raise(rb_eSocket, "unknown socket domain %s", ptr);
    }
    else {
        *dv = NUM2INT(domain);
    }
    tmp = rb_check_string_type(type);
    if (!NIL_P(tmp)) {
        type = tmp;
        rb_check_safe_obj(type);
        ptr = RSTRING(type)->ptr;
        if (strcmp(ptr, "SOCK_STREAM") == 0)
            *tv = SOCK_STREAM;
        else if (strcmp(ptr, "SOCK_DGRAM") == 0)
            *tv = SOCK_DGRAM;
#ifdef SOCK_RAW
        else if (strcmp(ptr, "SOCK_RAW") == 0)
            *tv = SOCK_RAW;
#endif
#ifdef SOCK_SEQPACKET
        else if (strcmp(ptr, "SOCK_SEQPACKET") == 0)
            *tv = SOCK_SEQPACKET;
#endif
#ifdef SOCK_RDM
        else if (strcmp(ptr, "SOCK_RDM") == 0)
            *tv = SOCK_RDM;
#endif
#ifdef SOCK_PACKET
        else if (strcmp(ptr, "SOCK_PACKET") == 0)
            *tv = SOCK_PACKET;
#endif
        else
            rb_raise(rb_eSocket, "unknown socket type %s", ptr);
    }
    else {
        *tv = NUM2INT(type);
    }
}

static VALUE
sock_initialize(sock, domain, type, protocol)
    VALUE sock, domain, type, protocol;
{
    int fd;
    int d, t;

    rb_secure(3);
    setup_domain_and_type(domain, &d, type, &t);
    fd = ruby_socket(d, t, NUM2INT(protocol));
    if (fd < 0) rb_sys_fail("socket(2)");

    return init_sock(sock, fd);
}

static VALUE
sock_s_socketpair(klass, domain, type, protocol)
    VALUE klass, domain, type, protocol;
{
#if !defined(_WIN32) && !defined(__BEOS__) && !defined(__EMX__) && !defined(__QNXNTO__)
    int d, t, sp[2];

    setup_domain_and_type(domain, &d, type, &t);
  again:
    if (socketpair(d, t, NUM2INT(protocol), sp) < 0) {
        if (errno == EMFILE || errno == ENFILE) {
            rb_gc();
            goto again;
        }
        rb_sys_fail("socketpair(2)");
    }

    return rb_assoc_new(init_sock(rb_obj_alloc(klass), sp[0]),
                        init_sock(rb_obj_alloc(klass), sp[1]));
#else
    rb_notimplement();
#endif
}

#ifdef HAVE_SYS_UN_H
static VALUE
unix_s_socketpair(argc, argv, klass)
    int argc;
    VALUE *argv;
    VALUE klass;
{
    VALUE domain, type, protocol;
    domain = INT2FIX(PF_UNIX);

    rb_scan_args(argc, argv, "02", &type, &protocol);
    if (argc == 0)
        type = INT2FIX(SOCK_STREAM);
    if (argc <= 1)
        protocol = INT2FIX(0);

    return sock_s_socketpair(klass, domain, type, protocol);
}
#endif

/*
 * call-seq:
 *      socket.connect( sockaddr ) => 0
 *
 * Requests a connection to be made on the given +sockaddr+. Returns 0 if
 * successful, otherwise an exception is raised.
 *
 * === Parameter
 * * +sockaddr+ - the +struct+ sockaddr contained in a string
 *
 * === Example:
 *      # Pull down Google's web page
 *      require 'socket'
 *      include Socket::Constants
 *      socket = Socket.new( AF_INET, SOCK_STREAM, 0 )
 *      sockaddr = Socket.pack_sockaddr_in( 80, 'www.google.com' )
 *      socket.connect( sockaddr )
 *      socket.write( "GET / HTTP/1.0\n\n" )
 *      results = socket.read
 *
 * === Unix-based Exceptions
 * On unix-based systems the following system exceptions may be raised if
 * the call to _connect_ fails:
 * * Errno::EACCES - search permission is denied for a component of the prefix
 *   path or write access to the +socket+ is denided
 * * Errno::EADDRINUSE - the _sockaddr_ is already in use
 * * Errno::EADDRNOTAVAIL - the specified _sockaddr_ is not available from the
 *   local machine
 * * Errno::EAFNOSUPPORT - the specified _sockaddr_ is not a valid address for
 *   the address family of the specified +socket+
 * * Errno::EALREADY - a connection is already in progress for the specified
 *   socket
 * * Errno::EBADF - the +socket+ is not a valid file descriptor
 * * Errno::ECONNREFUSED - the target _sockaddr_ was not listening for connections
 *   refused the connection request
 * * Errno::ECONNRESET - the remote host reset the connection request
 * * Errno::EFAULT - the _sockaddr_ cannot be accessed
 * * Errno::EHOSTUNREACH - the destination host cannot be reached (probably
 *   because the host is down or a remote router cannot reach it)
 * * Errno::EINPROGRESS - the O_NONBLOCK is set for the +socket+ and the
 *   connection cnanot be immediately established; the connection will be
 *   established asynchronously
 * * Errno::EINTR - the attempt to establish the connection was interrupted by
 *   delivery of a signal that was caught; the connection will be established
 *   asynchronously
 * * Errno::EISCONN - the specified +socket+ is already connected
 * * Errno::EINVAL - the address length used for the _sockaddr_ is not a valid
 *   length for the address family or there is an invalid family in _sockaddr_
 * * Errno::ENAMETOOLONG - the pathname resolved had a length which exceeded
 *   PATH_MAX
 * * Errno::ENETDOWN - the local interface used to reach the destination is down
 * * Errno::ENETUNREACH - no route to the network is present
 * * Errno::ENOBUFS - no buffer space is available
 * * Errno::ENOSR - there were insufficient STREAMS resources available to
 *   complete the operation
 * * Errno::ENOTSOCK - the +socket+ argument does not refer to a socket
 * * Errno::EOPNOTSUPP - the calling +socket+ is listening and cannot be connected
 * * Errno::EPROTOTYPE - the _sockaddr_ has a different type than the socket
 *   bound to the specified peer address
 * * Errno::ETIMEDOUT - the attempt to connect time out before a connection
 *   was made.
 *
 * On unix-based systems if the address family of the calling +socket+ is
 * AF_UNIX the follow exceptions may be raised if the call to _connect_
 * fails:
 * * Errno::EIO - an i/o error occured while reading from or writing to the
 *   file system
 * * Errno::ELOOP - too many symbolic links were encountered in translating
 *   the pathname in _sockaddr_
 * * Errno::ENAMETOOLLONG - a component of a pathname exceeded NAME_MAX
 *   characters, or an entired pathname exceeded PATH_MAX characters
 * * Errno::ENOENT - a component of the pathname does not name an existing file
 *   or the pathname is an empty string
 * * Errno::ENOTDIR - a component of the path prefix of the pathname in _sockaddr_
 *   is not a directory
 *
 * === Windows Exceptions
 * On Windows systems the following system exceptions may be raised if
 * the call to _connect_ fails:
 * * Errno::ENETDOWN - the network is down
 * * Errno::EADDRINUSE - the socket's local address is already in use
 * * Errno::EINTR - the socket was cancelled
 * * Errno::EINPROGRESS - a blocking socket is in progress or the service provider
 *   is still processing a callback function. Or a nonblocking connect call is
 *   in progress on the +socket+.
 * * Errno::EALREADY - see Errno::EINVAL
 * * Errno::EADDRNOTAVAIL - the remote address is not a valid address, such as
 *   ADDR_ANY TODO check ADDRANY TO INADDR_ANY
 * * Errno::EAFNOSUPPORT - addresses in the specified family cannot be used with
 *   with this +socket+
 * * Errno::ECONNREFUSED - the target _sockaddr_ was not listening for connections
 *   refused the connection request
 * * Errno::EFAULT - the socket's internal address or address length parameter
 *   is too small or is not a valid part of the user space address
 * * Errno::EINVAL - the +socket+ is a listening socket
 * * Errno::EISCONN - the +socket+ is already connected
 * * Errno::ENETUNREACH - the network cannot be reached from this host at this time
 * * Errno::EHOSTUNREACH - no route to the network is present
 * * Errno::ENOBUFS - no buffer space is available
 * * Errno::ENOTSOCK - the +socket+ argument does not refer to a socket
 * * Errno::ETIMEDOUT - the attempt to connect time out before a connection
 *   was made.
 * * Errno::EWOULDBLOCK - the socket is marked as nonblocking and the
 *   connection cannot be completed immediately
 * * Errno::EACCES - the attempt to connect the datagram socket to the
 *   broadcast address failed
 *
 * === See
 * * connect manual pages on unix-based systems
 * * connect function in Microsoft's Winsock functions reference
 */
static VALUE
sock_connect(sock, addr)
    VALUE sock, addr;
{
    OpenFile *fptr;
    int fd, n;
    volatile VALUE tmpaddr;

    StringValue(addr);
    addr = rb_str_new4(addr);
    GetOpenFile(sock, fptr);
    fd = fptr->fd;
    n = ruby_connect(fd, (struct sockaddr*)RSTRING(addr)->ptr, RSTRING(addr)->len, 0);
    if (n < 0) {
        rb_sys_fail("connect(2)");
    }

    return INT2FIX(n);
}

/*
 * call-seq:
 *      socket.bind( sockaddr ) => 0
 *
 * Binds to the given +struct+ sockaddr.
 *
 * === Parameter
 * * +sockaddr+ - the +struct+ sockaddr contained in a string
 *
 * === Example
 *      require 'socket'
 *      include Socket::Constants
 *      socket = Socket.new( AF_INET, SOCK_STREAM, 0 )
 *      sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' )
 *      socket.bind( sockaddr )
 *
 * === Unix-based Exceptions
 * On unix-based based systems the following system exceptions may be raised if
 * the call to _bind_ fails:
 * * Errno::EACCES - the specified _sockaddr_ is protected and the current
 *   user does not have permission to bind to it
 * * Errno::EADDRINUSE - the specified _sockaddr_ is already in use
 * * Errno::EADDRNOTAVAIL - the specified _sockaddr_ is not available from the
 *   local machine
 * * Errno::EAFNOSUPPORT - the specified _sockaddr_ isnot a valid address for
 *   the family of the calling +socket+
 * * Errno::EBADF - the _sockaddr_ specified is not a valid file descriptor
 * * Errno::EFAULT - the _sockaddr_ argument cannot be accessed
 * * Errno::EINVAL - the +socket+ is already bound to an address, and the
 *   protocol does not support binding to the new _sockaddr_ or the +socket+
 *   has been shut down.
 * * Errno::EINVAL - the address length is not a valid length for the address
 *   family
 * * Errno::ENAMETOOLONG - the pathname resolved had a length which exceeded
 *   PATH_MAX
 * * Errno::ENOBUFS - no buffer space is available
 * * Errno::ENOSR - there were insufficient STREAMS resources available to
 *   complete the operation
 * * Errno::ENOTSOCK - the +socket+ does not refer to a socket
 * * Errno::EOPNOTSUPP - the socket type of the +socket+ does not support
 *   binding to an address
 *
 * On unix-based based systems if the address family of the calling +socket+ is
 * Socket::AF_UNIX the follow exceptions may be raised if the call to _bind_
 * fails:
 * * Errno::EACCES - search permission is denied for a component of the prefix
 *   path or write access to the +socket+ is denided
 * * Errno::EDESTADDRREQ - the _sockaddr_ argument is a null pointer
 * * Errno::EISDIR - same as Errno::EDESTADDRREQ
 * * Errno::EIO - an i/o error occurred
 * * Errno::ELOOP - too many symbolic links were encountered in translating
 *   the pathname in _sockaddr_
 * * Errno::ENAMETOOLLONG - a component of a pathname exceeded NAME_MAX
 *   characters, or an entired pathname exceeded PATH_MAX characters
 * * Errno::ENOENT - a component of the pathname does not name an existing file
 *   or the pathname is an empty string
 * * Errno::ENOTDIR - a component of the path prefix of the pathname in _sockaddr_
 *   is not a directory
 * * Errno::EROFS - the name would reside on a read only filesystem
 *
 * === Windows Exceptions
 * On Windows systems the following system exceptions may be raised if
 * the call to _bind_ fails:
 * * Errno::ENETDOWN-- the network is down
 * * Errno::EACCES - the attempt to connect the datagram socket to the
 *   broadcast address failed
 * * Errno::EADDRINUSE - the socket's local address is already in use
 * * Errno::EADDRNOTAVAIL - the specified address is not a valid address for this
 *   computer
 * * Errno::EFAULT - the socket's internal address or address length parameter
 *   is too small or is not a valid part of the user space addressed
 * * Errno::EINVAL - the +socket+ is already bound to an address
 * * Errno::ENOBUFS - no buffer space is available
 * * Errno::ENOTSOCK - the +socket+ argument does not refer to a socket
 *
 * === See
 * * bind manual pages on unix-based systems
 * * bind function in Microsoft's Winsock functions reference
 */
static VALUE
sock_bind(sock, addr)
    VALUE sock, addr;
{
    OpenFile *fptr;

    StringValue(addr);
    GetOpenFile(sock, fptr);
    if (bind(fptr->fd, (struct sockaddr*)RSTRING(addr)->ptr, RSTRING(addr)->len) < 0)
        rb_sys_fail("bind(2)");

    return INT2FIX(0);
}

/*
 * call-seq:
 *      socket.listen( int ) => 0
 *
 * Listens for connections, using the specified +int+ as the backlog. A call
 * to _listen_ only applies if the +socket+ is of type SOCK_STREAM or
 * SOCK_SEQPACKET.
 *
 * === Parameter
 * * +backlog+ - the maximum length of the queue for pending connections.
 *
 * === Example 1
 *      require 'socket'
 *      include Socket::Constants
 *      socket = Socket.new( AF_INET, SOCK_STREAM, 0 )
 *      sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' )
 *      socket.bind( sockaddr )
 *      socket.listen( 5 )
 *
 * === Example 2 (listening on an arbitary port, unix-based systems only):
 *      require 'socket'
 *      include Socket::Constants
 *      socket = Socket.new( AF_INET, SOCK_STREAM, 0 )
 *      socket.listen( 1 )
 *
 * === Unix-based Exceptions
 * On unix based systems the above will work because a new +sockaddr+ struct
 * is created on the address ADDR_ANY, for an arbitrary port number as handed
 * off by the kernel. It will not work on Windows, because Windows requires that
 * the +socket+ is bound by calling _bind_ before it can _listen_.
 *
 * If the _backlog_ amount exceeds the implementation-dependent maximum
 * queue length, the implementation's maximum queue length will be used.
 *
 * On unix-based based systems the following system exceptions may be raised if the
 * call to _listen_ fails:
 * * Errno::EBADF - the _socket_ argument is not a valid file descriptor
 * * Errno::EDESTADDRREQ - the _socket_ is not bound to a local address, and
 *   the protocol does not support listening on an unbound socket
 * * Errno::EINVAL - the _socket_ is already connected
 * * Errno::ENOTSOCK - the _socket_ argument does not refer to a socket
 * * Errno::EOPNOTSUPP - the _socket_ protocol does not support listen
 * * Errno::EACCES - the calling process does not have approriate privileges
 * * Errno::EINVAL - the _socket_ has been shut down
 * * Errno::ENOBUFS - insufficient resources are available in the system to
 *   complete the call
 *
 * === Windows Exceptions
 * On Windows systems the following system exceptions may be raised if
 * the call to _listen_ fails:
 * * Errno::ENETDOWN - the network is down
 * * Errno::EADDRINUSE - the socket's local address is already in use. This
 *   usually occurs during the execution of _bind_ but could be delayed
 *   if the call to _bind_ was to a partially wildcard address (involving
 *   ADDR_ANY) and if a specific address needs to be commmitted at the
 *   time of the call to _listen_
 * * Errno::EINPROGRESS - a Windows Sockets 1.1 call is in progress or the
 *   service provider is still processing a callback function
 * * Errno::EINVAL - the +socket+ has not been bound with a call to _bind_.
 * * Errno::EISCONN - the +socket+ is already connected
 * * Errno::EMFILE - no more socket descriptors are available
 * * Errno::ENOBUFS - no buffer space is available
 * * Errno::ENOTSOC - +socket+ is not a socket
 * * Errno::EOPNOTSUPP - the referenced +socket+ is not a type that supports
 *   the _listen_ method
 *
 * === See
 * * listen manual pages on unix-based systems
 * * listen function in Microsoft's Winsock functions reference
 */
static VALUE
sock_listen(sock, log)
    VALUE sock, log;
{
    OpenFile *fptr;
    int backlog;

    rb_secure(4);
    backlog = NUM2INT(log);
    GetOpenFile(sock, fptr);
    if (listen(fptr->fd, backlog) < 0)
        rb_sys_fail("listen(2)");

    return INT2FIX(0);
}

/*
 * call-seq:
 *      socket.recvfrom( len ) => [ data, sender ]
 *      socket.recvfrom( len, flags ) => [ data, sender ]
 *
 * Receives up to _len_ bytes from +socket+. _flags_ is zero or more
 * of the +MSG_+ options. The first element of the results is the data
 * received. The second element contains protocol-specific information
 * on the snder
 *
 * === Parameters
 * * +len+ - the number of bytes to receive from the socket
 * * +flags+ - zero or more of the +MSG_+ options
 *
 * === Example
 *      # In one file, start this first
 *      require 'socket'
 *      include Socket::Constants
 *      socket = Socket.new( AF_INET, SOCK_STREAM, 0 )
 *      sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' )
 *      socket.bind( sockaddr )
 *      socket.listen( 5 )
 *      client, client_sockaddr = socket.accept
 *      data = client.recvfrom( 20 )[0].chomp
 *      puts "I only received 20 bytes '#{data}'"
 *      sleep 1
 *      socket.close
 *
 *      # In another file, start this second
 *      require 'socket'
 *      include Socket::Constants
 *      socket = Socket.new( AF_INET, SOCK_STREAM, 0 )
 *      sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' )
 *      socket.connect( sockaddr )
 *      socket.puts "Watch this get cut short!"
 *      socket.close
 *
 * === Unix-based Exceptions
 * On unix-based based systems the following system exceptions may be raised if the
 * call to _recvfrom_ fails:
 * * Errno::EAGAIN - the +socket+ file descriptor is marked as O_NONBLOCK and no
 *   data is waiting to be received; or MSG_OOB is set and no out-of-band data
 *   is available and either the +socket+ file descriptor is marked as
 *   O_NONBLOCK or the +socket+ does not support blocking to wait for
 *   out-of-band-data
 * * Errno::EWOULDBLOCK - see Errno::EAGAIN
 * * Errno::EBADF - the +socket+ is not a valid file descriptor
 * * Errno::ECONNRESET - a connection was forcibly closed by a peer
 * * Errno::EFAULT - the socket's internal buffer, address or address length
 *   cannot be accessed or written
 * * Errno::EINTR - a signal interupted _recvfrom_ before any data was available
 * * Errno::EINVAL - the MSG_OOB flag is set and no out-of-band data is available
 * * Errno::EIO - an i/o error occurred while reading from or writing to the
 *   filesystem
 * * Errno::ENOBUFS - insufficient resources were available in the system to
 *   perform the operation
 * * Errno::ENOMEM - insufficient memory was available to fulfill the request
 * * Errno::ENOSR - there were insufficient STREAMS resources available to
 *   complete the operation
 * * Errno::ENOTCONN - a receive is attempted on a connection-mode socket that
 *   is not connected
 * * Errno::ENOTSOCK - the +socket+ does not refer to a socket
 * * Errno::EOPNOTSUPP - the specified flags are not supported for this socket type
 * * Errno::ETIMEDOUT - the connection timed out during connection establishment
 *   or due to a transmission timeout on an active connection
 *
 * === Windows Exceptions
 * On Windows systems the following system exceptions may be raised if
 * the call to _recvfrom_ fails:
 * * Errno::ENETDOWN - the network is down
 * * Errno::EFAULT - the internal buffer and from parameters on +socket+ are not
 *   part of the user address space, or the internal fromlen parameter is
 *   too small to accomodate the peer address
 * * Errno::EINTR - the (blocking) call was cancelled by an internal call to
 *   the WinSock function WSACancelBlockingCall
 * * Errno::EINPROGRESS - a blocking Windows Sockets 1.1 call is in progress or
 *   the service provider is still processing a callback function
 * * Errno::EINVAL - +socket+ has not been bound with a call to _bind_, or an
 *   unknown flag was specified, or MSG_OOB was specified for a socket with
 *   SO_OOBINLINE enabled, or (for byte stream-style sockets only) the internal
 *   len parameter on +socket+ was zero or negative
 * * Errno::EISCONN - +socket+ is already connected. The call to _recvfrom_ is
 *   not permitted with a connected socket on a socket that is connetion
 *   oriented or connectionless.
 * * Errno::ENETRESET - the connection has been broken due to the keep-alive
 *   activity detecting a failure while the operation was in progress.
 * * Errno::EOPNOTSUPP - MSG_OOB was specified, but +socket+ is not stream-style
 *   such as type SOCK_STREAM. OOB data is not supported in the communication
 *   domain associated with +socket+, or +socket+ is unidirectional and
 *   supports only send operations
 * * Errno::ESHUTDOWN - +socket+ has been shutdown. It is not possible to
 *   call _recvfrom_ on a socket after _shutdown_ has been invoked.
 * * Errno::EWOULDBLOCK - +socket+ is marked as nonblocking and a  call to
 *   _recvfrom_ would block.
 * * Errno::EMSGSIZE - the message was too large to fit into the specified buffer
 *   and was truncated.
 * * Errno::ETIMEDOUT - the connection has been dropped, because of a network
 *   failure or because the system on the other end went down without
 *   notice
 * * Errno::ECONNRESET - the virtual circuit was reset by the remote side
 *   executing a hard or abortive close. The application should close the
 *   socket; it is no longer usable. On a UDP-datagram socket this error
 *   indicates a previous send operation resulted in an ICMP Port Unreachable
 *   message.
 */
static VALUE
sock_recvfrom(argc, argv, sock)
    int argc;
    VALUE *argv;
    VALUE sock;
{
    return s_recvfrom(sock, argc, argv, RECV_SOCKET);
}

static VALUE
sock_accept(sock)
    VALUE sock;
{
    OpenFile *fptr;
    VALUE sock2;
    char buf[1024];
    socklen_t len = sizeof buf;

    GetOpenFile(sock, fptr);
    sock2 = s_accept(rb_cSocket,fptr->fd,(struct sockaddr*)buf,&len);

    return rb_assoc_new(sock2, rb_str_new(buf, len));
}

/*
 * call-seq:
 *      socket.sysaccept => [ socket_fd, address ]
 *
 * Accepts an incoming connection returnings an array containg the (integer)
 * file descriptor for the incoming connection and a string that contains the
 * +struct+ sockaddr information about the caller.
 *
 * === Example
 *      # In one script, start this first
 *      require 'socket'
 *      include Socket::Constants
 *      socket = Socket.new( AF_INET, SOCK_STREAM, 0 )
 *      sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' )
 *      socket.bind( sockaddr )
 *      socket.listen( 5 )
 *      client_fd, client_sockaddr = socket.sysaccept
 *      puts "The client said, '#{socket.readline.chomp}'"
 *      client_socket = Socket.for_fd( client_fd )
 *      client_socket.puts "Hello from script one!"
 *      socket.close
 *
 *      # In another script, start this second
 *      require 'socket'
 *      include Socket::Constants
 *      socket = Socket.new( AF_INET, SOCK_STREAM, 0 )
 *      sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' )
 *      socket.connect( sockaddr )
 *      socket.puts "Hello from script 2."
 *      puts "The server said, '#{socket.readline.chomp}'"
 *      socket.close
 *
 * Refer to Socket#accept for the exceptions that may be thrown if the call
 * to _sysaccept_ fails.
 *
 * === See
 * * Socket#accept
 */
static VALUE
sock_sysaccept(sock)
    VALUE sock;
{
    OpenFile *fptr;
    VALUE sock2;
    char buf[1024];
    socklen_t len = sizeof buf;

    GetOpenFile(sock, fptr);
    sock2 = s_accept(0,fptr->fd,(struct sockaddr*)buf,&len);

    return rb_assoc_new(sock2, rb_str_new(buf, len));
}

#ifdef HAVE_GETHOSTNAME
static VALUE
sock_gethostname(obj)
    VALUE obj;
{
    char buf[1024];

    rb_secure(3);
    if (gethostname(buf, (int)sizeof buf - 1) < 0)
        rb_sys_fail("gethostname");

    buf[sizeof buf - 1] = '\0';
    return rb_str_new2(buf);
}
#else
#ifdef HAVE_UNAME

#include <sys/utsname.h>

static VALUE
sock_gethostname(obj)
    VALUE obj;
{
    struct utsname un;

    rb_secure(3);
    uname(&un);
    return rb_str_new2(un.nodename);
}
#else
static VALUE
sock_gethostname(obj)
    VALUE obj;
{
    rb_notimplement();
}
#endif
#endif

static VALUE
make_addrinfo(res0)
    struct addrinfo *res0;
{
    VALUE base, ary;
    struct addrinfo *res;

    if (res0 == NULL) {
        rb_raise(rb_eSocket, "host not found");
    }
    base = rb_ary_new();
    for (res = res0; res; res = res->ai_next) {
        ary = ipaddr(res->ai_addr, do_not_reverse_lookup);
        if (res->ai_canonname) {
            RARRAY(ary)->ptr[2] = rb_str_new2(res->ai_canonname);
        }
        rb_ary_push(ary, INT2FIX(res->ai_family));
        rb_ary_push(ary, INT2FIX(res->ai_socktype));
        rb_ary_push(ary, INT2FIX(res->ai_protocol));
        rb_ary_push(base, ary);
    }
    return base;
}

VALUE
sock_sockaddr(addr, len)
    struct sockaddr *addr;
    size_t len;
{
    char *ptr;

    switch (addr->sa_family) {
      case AF_INET:
        ptr = (char*)&((struct sockaddr_in*)addr)->sin_addr.s_addr;
        len = sizeof(((struct sockaddr_in*)addr)->sin_addr.s_addr);
        break;
#ifdef INET6
      case AF_INET6:
        ptr = (char*)&((struct sockaddr_in6*)addr)->sin6_addr.s6_addr;
        len = sizeof(((struct sockaddr_in6*)addr)->sin6_addr.s6_addr);
        break;
#endif
      default:
        rb_raise(rb_eSocket, "unknown socket family:%d", addr->sa_family);
        break;
    }
    return rb_str_new(ptr, len);
}

static VALUE
sock_s_gethostbyname(obj, host)
    VALUE obj, host;
{
    rb_secure(3);
    return make_hostent(host, sock_addrinfo(host, Qnil, SOCK_STREAM, AI_CANONNAME), sock_sockaddr);
}

static VALUE
sock_s_gethostbyaddr(argc, argv)
    int argc;
    VALUE *argv;
{
    VALUE addr, type;
    struct hostent *h;
    struct sockaddr *sa;
    char **pch;
    VALUE ary, names;
    int t = AF_INET;

    rb_scan_args(argc, argv, "11", &addr, &type);
    sa = (struct sockaddr*)StringValuePtr(addr);
    if (!NIL_P(type)) {
        t = NUM2INT(type);
    }
#ifdef INET6
    else if (RSTRING(addr)->len == 16) {
        t = AF_INET6;
    }
#endif
    h = gethostbyaddr(RSTRING(addr)->ptr, RSTRING(addr)->len, t);
    if (h == NULL) {
#ifdef HAVE_HSTRERROR
        extern int h_errno;
        rb_raise(rb_eSocket, "%s", (char*)hstrerror(h_errno));
#else
        rb_raise(rb_eSocket, "host not found");
#endif
    }
    ary = rb_ary_new();
    rb_ary_push(ary, rb_str_new2(h->h_name));
    names = rb_ary_new();
    rb_ary_push(ary, names);
    if (h->h_aliases != NULL) {
        for (pch = h->h_aliases; *pch; pch++) {
            rb_ary_push(names, rb_str_new2(*pch));
        }
    }
    rb_ary_push(ary, INT2NUM(h->h_addrtype));
#ifdef h_addr
    for (pch = h->h_addr_list; *pch; pch++) {
        rb_ary_push(ary, rb_str_new(*pch, h->h_length));
    }
#else
    rb_ary_push(ary, rb_str_new(h->h_addr, h->h_length));
#endif

    return ary;
}

static VALUE
sock_s_getservbyname(argc, argv)
    int argc;
    VALUE *argv;
{
    VALUE service, proto;
    struct servent *sp;
    int port;

    rb_scan_args(argc, argv, "11", &service, &proto);
    if (NIL_P(proto)) proto = rb_str_new2("tcp");
    StringValue(service);
    StringValue(proto);

    sp = getservbyname(StringValueCStr(service),  StringValueCStr(proto));
    if (sp) {
        port = ntohs(sp->s_port);
    }
    else {
        char *s = RSTRING(service)->ptr;
        char *end;

        port = strtoul(s, &end, 0);
        if (*end != '\0') {
            rb_raise(rb_eSocket, "no such service %s/%s", s, RSTRING(proto)->ptr);
        }
    }
    return INT2FIX(port);
}

static VALUE
sock_s_getservbyport(argc, argv)
    int argc;
    VALUE *argv;
{
    VALUE port, proto;
    struct servent *sp;

    rb_scan_args(argc, argv, "11", &port, &proto);
    if (NIL_P(proto)) proto = rb_str_new2("tcp");
    StringValue(proto);

    sp = getservbyport(NUM2INT(port),  StringValueCStr(proto));
    if (!sp) {
        rb_raise(rb_eSocket, "no such service for port %d/%s", NUM2INT(port), RSTRING(proto)->ptr);
    }
    return rb_tainted_str_new2(sp->s_name);
}

static VALUE
sock_s_getaddrinfo(argc, argv)
    int argc;
    VALUE *argv;
{
    VALUE host, port, family, socktype, protocol, flags, ret;
    char hbuf[1024], pbuf[1024];
    char *hptr, *pptr, *ap;
    struct addrinfo hints, *res;
    int error;

    host = port = family = socktype = protocol = flags = Qnil;
    rb_scan_args(argc, argv, "24", &host, &port, &family, &socktype, &protocol, &flags);
    if (NIL_P(host)) {
        hptr = NULL;
    }
    else {
        strncpy(hbuf, StringValuePtr(host), sizeof(hbuf));
        hbuf[sizeof(hbuf) - 1] = '\0';
        hptr = hbuf;
    }
    if (NIL_P(port)) {
        pptr = NULL;
    }
    else if (FIXNUM_P(port)) {
        snprintf(pbuf, sizeof(pbuf), "%ld", FIX2LONG(port));
        pptr = pbuf;
    }
    else {
        strncpy(pbuf, StringValuePtr(port), sizeof(pbuf));
        pbuf[sizeof(pbuf) - 1] = '\0';
        pptr = pbuf;
    }

    MEMZERO(&hints, struct addrinfo, 1);
    if (NIL_P(family)) {
        hints.ai_family = PF_UNSPEC;
    }
    else if (FIXNUM_P(family)) {
        hints.ai_family = FIX2INT(family);
    }
    else if ((ap = StringValuePtr(family)) != 0) {
        if (strcmp(ap, "AF_INET") == 0) {
            hints.ai_family = PF_INET;
        }
#ifdef INET6
        else if (strcmp(ap, "AF_INET6") == 0) {
            hints.ai_family = PF_INET6;
        }
#endif
    }

    if (!NIL_P(socktype)) {
        hints.ai_socktype = NUM2INT(socktype);
    }
    if (!NIL_P(protocol)) {
        hints.ai_protocol = NUM2INT(protocol);
    }
    if (!NIL_P(flags)) {
        hints.ai_flags = NUM2INT(flags);
    }
    error = getaddrinfo(hptr, pptr, &hints, &res);
    if (error) {
        raise_socket_error("getaddrinfo", error);
    }

    ret = make_addrinfo(res);
    freeaddrinfo(res);
    return ret;
}

static VALUE
sock_s_getnameinfo(argc, argv)
    int argc;
    VALUE *argv;
{
    VALUE sa, af = Qnil, host = Qnil, port = Qnil, flags, tmp;
    char *hptr, *pptr;
    char hbuf[1024], pbuf[1024];
    int fl;
    struct addrinfo hints, *res = NULL, *r;
    int error;
    struct sockaddr_storage ss;
    struct sockaddr *sap;
    char *ap;

    sa = flags = Qnil;
    rb_scan_args(argc, argv, "11", &sa, &flags);

    fl = 0;
    if (!NIL_P(flags)) {
        fl = NUM2INT(flags);
    }
    tmp = rb_check_string_type(sa);
    if (!NIL_P(tmp)) {
        sa = tmp;
        if (sizeof(ss) < RSTRING(sa)->len) {
            rb_raise(rb_eTypeError, "sockaddr length too big");
        }
        memcpy(&ss, RSTRING(sa)->ptr, RSTRING(sa)->len);
        if (RSTRING(sa)->len != SA_LEN((struct sockaddr*)&ss)) {
            rb_raise(rb_eTypeError, "sockaddr size differs - should not happen");
        }
        sap = (struct sockaddr*)&ss;
        goto call_nameinfo;
    }
    tmp = rb_check_array_type(sa);
    if (!NIL_P(tmp)) {
        sa = tmp;
        MEMZERO(&hints, struct addrinfo, 1);
        if (RARRAY(sa)->len == 3) {
            af = RARRAY(sa)->ptr[0];
            port = RARRAY(sa)->ptr[1];
            host = RARRAY(sa)->ptr[2];
        }
        else if (RARRAY(sa)->len >= 4) {
            af = RARRAY(sa)->ptr[0];
            port = RARRAY(sa)->ptr[1];
            host = RARRAY(sa)->ptr[3];
            if (NIL_P(host)) {
                host = RARRAY(sa)->ptr[2];
            }
            else {
                /*
                 * 4th element holds numeric form, don't resolve.
                 * see ipaddr().
                 */
#ifdef AI_NUMERICHOST /* AIX 4.3.3 doesn't have AI_NUMERICHOST. */
                hints.ai_flags |= AI_NUMERICHOST;
#endif
            }
        }
        else {
            rb_raise(rb_eArgError, "array size should be 3 or 4, %ld given",
                     RARRAY(sa)->len);
        }
        /* host */
        if (NIL_P(host)) {
            hptr = NULL;
        }
        else {
            strncpy(hbuf, StringValuePtr(host), sizeof(hbuf));
            hbuf[sizeof(hbuf) - 1] = '\0';
            hptr = hbuf;
        }
        /* port */
        if (NIL_P(port)) {
            strcpy(pbuf, "0");
            pptr = NULL;
        }
        else if (FIXNUM_P(port)) {
            snprintf(pbuf, sizeof(pbuf), "%ld", NUM2LONG(port));
            pptr = pbuf;
        }
        else {
            strncpy(pbuf, StringValuePtr(port), sizeof(pbuf));
            pbuf[sizeof(pbuf) - 1] = '\0';
            pptr = pbuf;
        }
        hints.ai_socktype = (fl & NI_DGRAM) ? SOCK_DGRAM : SOCK_STREAM;
        /* af */
        if (NIL_P(af)) {
            hints.ai_family = PF_UNSPEC;
        }
        else if (FIXNUM_P(af)) {
            hints.ai_family = FIX2INT(af);
        }
        else if ((ap = StringValuePtr(af)) != 0) {
            if (strcmp(ap, "AF_INET") == 0) {
                hints.ai_family = PF_INET;
            }
#ifdef INET6
            else if (strcmp(ap, "AF_INET6") == 0) {
                hints.ai_family = PF_INET6;
            }
#endif
        }
        error = getaddrinfo(hptr, pptr, &hints, &res);
        if (error) goto error_exit_addr;
        sap = res->ai_addr;
    }
    else {
        rb_raise(rb_eTypeError, "expecting String or Array");
    }

  call_nameinfo:
    error = getnameinfo(sap, SA_LEN(sap), hbuf, sizeof(hbuf),
                        pbuf, sizeof(pbuf), fl);
    if (error) goto error_exit_name;
    if (res) {
        for (r = res->ai_next; r; r = r->ai_next) {
            char hbuf2[1024], pbuf2[1024];

            sap = r->ai_addr;
            error = getnameinfo(sap, SA_LEN(sap), hbuf2, sizeof(hbuf2),
                                pbuf2, sizeof(pbuf2), fl);
            if (error) goto error_exit_name;
            if (strcmp(hbuf, hbuf2) != 0|| strcmp(pbuf, pbuf2) != 0) {
                freeaddrinfo(res);
                rb_raise(rb_eSocket, "sockaddr resolved to multiple nodename");
            }
        }
        freeaddrinfo(res);
    }
    return rb_assoc_new(rb_str_new2(hbuf), rb_str_new2(pbuf));

  error_exit_addr:
    if (res) freeaddrinfo(res);
    raise_socket_error("getaddrinfo", error);

  error_exit_name:
    if (res) freeaddrinfo(res);
    raise_socket_error("getnameinfo", error);
}

static VALUE
sock_s_pack_sockaddr_in(self, port, host)
    VALUE self, port, host;
{
    struct addrinfo *res = sock_addrinfo(host, port, 0, 0);
    VALUE addr = rb_str_new((char*)res->ai_addr, res->ai_addrlen);

    freeaddrinfo(res);
    OBJ_INFECT(addr, port);
    OBJ_INFECT(addr, host);

    return addr;
}

static VALUE
sock_s_unpack_sockaddr_in(self, addr)
    VALUE self, addr;
{
    struct sockaddr_in * sockaddr;
    VALUE host;

    sockaddr = (struct sockaddr_in*)StringValuePtr(addr);
    host = make_ipaddr((struct sockaddr*)sockaddr);
    OBJ_INFECT(host, addr);
    return rb_assoc_new(INT2NUM(ntohs(sockaddr->sin_port)), host);
}

#ifdef HAVE_SYS_UN_H
static VALUE
sock_s_pack_sockaddr_un(self, path)
    VALUE self, path;
{
    struct sockaddr_un sockaddr;
    VALUE addr;

    MEMZERO(&sockaddr, struct sockaddr_un, 1);
    sockaddr.sun_family = AF_UNIX;
    strncpy(sockaddr.sun_path, StringValuePtr(path), sizeof(sockaddr.sun_path)-1);
    addr = rb_str_new((char*)&sockaddr, sizeof(sockaddr));
    OBJ_INFECT(addr, path);

    return addr;
}

static VALUE
sock_s_unpack_sockaddr_un(self, addr)
    VALUE self, addr;
{
    struct sockaddr_un * sockaddr;
    VALUE path;

    sockaddr = (struct sockaddr_un*)StringValuePtr(addr);
    if (RSTRING(addr)->len != sizeof(struct sockaddr_un)) {
        rb_raise(rb_eTypeError, "sockaddr_un size differs - %ld required; %d given",
                 RSTRING(addr)->len, sizeof(struct sockaddr_un));
    }
    /* xxx: should I check against sun_path size? */
    path = rb_str_new2(sockaddr->sun_path);
    OBJ_INFECT(path, addr);
    return path;
}
#endif

static VALUE mConst;

static void
sock_define_const(name, value)
    char *name;
    int value;
{
    rb_define_const(rb_cSocket, name, INT2FIX(value));
    rb_define_const(mConst, name, INT2FIX(value));
}

/*
 * Class +Socket+ provides access to the underlying operating system
 * socket implementations. It can be used to provide more operating system
 * specific functionality than the protocol-specific socket classes but at the
 * expense of greater complexity. In particular, the class handles addresses
 * using +struct+ sockaddr structures packed into Ruby strings, which can be
 * a joy to manipulate.
 *
 * === Exception Handling
 * Ruby's implementation of +Socket+ causes an exception to be raised
 * based on the error generated by the system dependent implementation.
 * This is why the methods are documented in a way that isolate
 * Unix-based system exceptions from Windows based exceptions. If more
 * information on particular exception is needed please refer to the
 * Unix manual pages or the Windows WinSock reference.
 *
 *
 * === Documentation by
 * * Zach Dennis
 * * Sam Roberts
 * * <em>Programming Ruby</em> from The Pragmatic Bookshelf.
 *
 * Much material in this documentation is taken with permission from
 * <em>Programming Ruby</em> from The Pragmatic Bookshelf.
 */
void
Init_socket()
{
    rb_eSocket = rb_define_class("SocketError", rb_eStandardError);

    rb_cBasicSocket = rb_define_class("BasicSocket", rb_cIO);
    rb_undef_method(rb_cBasicSocket, "initialize");

    rb_define_singleton_method(rb_cBasicSocket, "do_not_reverse_lookup",
                               bsock_do_not_rev_lookup, 0);
    rb_define_singleton_method(rb_cBasicSocket, "do_not_reverse_lookup=",
                               bsock_do_not_rev_lookup_set, 1);
    rb_define_singleton_method(rb_cBasicSocket, "for_fd", bsock_s_for_fd, 1);

    rb_define_method(rb_cBasicSocket, "close_read", bsock_close_read, 0);
    rb_define_method(rb_cBasicSocket, "close_write", bsock_close_write, 0);
    rb_define_method(rb_cBasicSocket, "shutdown", bsock_shutdown, -1);
    rb_define_method(rb_cBasicSocket, "setsockopt", bsock_setsockopt, 3);
    rb_define_method(rb_cBasicSocket, "getsockopt", bsock_getsockopt, 2);
    rb_define_method(rb_cBasicSocket, "getsockname", bsock_getsockname, 0);
    rb_define_method(rb_cBasicSocket, "getpeername", bsock_getpeername, 0);
    rb_define_method(rb_cBasicSocket, "send", bsock_send, -1);
    rb_define_method(rb_cBasicSocket, "recv", bsock_recv, -1);
    rb_define_method(rb_cBasicSocket, "do_not_reverse_lookup", bsock_do_not_reverse_lookup, 0);
    rb_define_method(rb_cBasicSocket, "do_not_reverse_lookup=", bsock_do_not_reverse_lookup_set, 1);

    rb_cIPSocket = rb_define_class("IPSocket", rb_cBasicSocket);
    rb_define_global_const("IPsocket", rb_cIPSocket);
    rb_define_method(rb_cIPSocket, "addr", ip_addr, 0);
    rb_define_method(rb_cIPSocket, "peeraddr", ip_peeraddr, 0);
    rb_define_method(rb_cIPSocket, "recvfrom", ip_recvfrom, -1);
    rb_define_singleton_method(rb_cIPSocket, "getaddress", ip_s_getaddress, 1);

    rb_cTCPSocket = rb_define_class("TCPSocket", rb_cIPSocket);
    rb_define_global_const("TCPsocket", rb_cTCPSocket);
    rb_define_singleton_method(rb_cTCPSocket, "gethostbyname", tcp_s_gethostbyname, 1);
    rb_define_method(rb_cTCPSocket, "initialize", tcp_init, -1);

#ifdef SOCKS
    rb_cSOCKSSocket = rb_define_class("SOCKSSocket", rb_cTCPSocket);
    rb_define_global_const("SOCKSsocket", rb_cSOCKSSocket);
    rb_define_method(rb_cSOCKSSocket, "initialize", socks_init, 2);
#ifdef SOCKS5
    rb_define_method(rb_cSOCKSSocket, "close", socks_s_close, 0);
#endif
#endif

    rb_cTCPServer = rb_define_class("TCPServer", rb_cTCPSocket);
    rb_define_global_const("TCPserver", rb_cTCPServer);
    rb_define_method(rb_cTCPServer, "accept", tcp_accept, 0);
    rb_define_method(rb_cTCPServer, "sysaccept", tcp_sysaccept, 0);
    rb_define_method(rb_cTCPServer, "initialize", tcp_svr_init, -1);
    rb_define_method(rb_cTCPServer, "listen", sock_listen, 1);

    rb_cUDPSocket = rb_define_class("UDPSocket", rb_cIPSocket);
    rb_define_global_const("UDPsocket", rb_cUDPSocket);
    rb_define_method(rb_cUDPSocket, "initialize", udp_init, -1);
    rb_define_method(rb_cUDPSocket, "connect", udp_connect, 2);
    rb_define_method(rb_cUDPSocket, "bind", udp_bind, 2);
    rb_define_method(rb_cUDPSocket, "send", udp_send, -1);

#ifdef HAVE_SYS_UN_H
    rb_cUNIXSocket = rb_define_class("UNIXSocket", rb_cBasicSocket);
    rb_define_global_const("UNIXsocket", rb_cUNIXSocket);
    rb_define_method(rb_cUNIXSocket, "initialize", unix_init, 1);
    rb_define_method(rb_cUNIXSocket, "path", unix_path, 0);
    rb_define_method(rb_cUNIXSocket, "addr", unix_addr, 0);
    rb_define_method(rb_cUNIXSocket, "peeraddr", unix_peeraddr, 0);
    rb_define_method(rb_cUNIXSocket, "recvfrom", unix_recvfrom, -1);
    rb_define_method(rb_cUNIXSocket, "send_io", unix_send_io, 1);
    rb_define_method(rb_cUNIXSocket, "recv_io", unix_recv_io, -1);
    rb_define_singleton_method(rb_cUNIXSocket, "socketpair", unix_s_socketpair, -1);
    rb_define_singleton_method(rb_cUNIXSocket, "pair", unix_s_socketpair, -1);

    rb_cUNIXServer = rb_define_class("UNIXServer", rb_cUNIXSocket);
    rb_define_global_const("UNIXserver", rb_cUNIXServer);
    rb_define_method(rb_cUNIXServer, "initialize", unix_svr_init, 1);
    rb_define_method(rb_cUNIXServer, "accept", unix_accept, 0);
    rb_define_method(rb_cUNIXServer, "sysaccept", unix_sysaccept, 0);
    rb_define_method(rb_cUNIXServer, "listen", sock_listen, 1);
#endif

    rb_cSocket = rb_define_class("Socket", rb_cBasicSocket);

    rb_define_method(rb_cSocket, "initialize", sock_initialize, 3);
    rb_define_method(rb_cSocket, "connect", sock_connect, 1);
    rb_define_method(rb_cSocket, "bind", sock_bind, 1);
    rb_define_method(rb_cSocket, "listen", sock_listen, 1);
    rb_define_method(rb_cSocket, "accept", sock_accept, 0);
    rb_define_method(rb_cSocket, "sysaccept", sock_sysaccept, 0);

    rb_define_method(rb_cSocket, "recvfrom", sock_recvfrom, -1);

    rb_define_singleton_method(rb_cSocket, "socketpair", sock_s_socketpair, 3);
    rb_define_singleton_method(rb_cSocket, "pair", sock_s_socketpair, 3);
    rb_define_singleton_method(rb_cSocket, "gethostname", sock_gethostname, 0);
    rb_define_singleton_method(rb_cSocket, "gethostbyname", sock_s_gethostbyname, 1);
    rb_define_singleton_method(rb_cSocket, "gethostbyaddr", sock_s_gethostbyaddr, -1);
    rb_define_singleton_method(rb_cSocket, "getservbyname", sock_s_getservbyname, -1);
    rb_define_singleton_method(rb_cSocket, "getservbyport", sock_s_getservbyport, -1);
    rb_define_singleton_method(rb_cSocket, "getaddrinfo", sock_s_getaddrinfo, -1);
    rb_define_singleton_method(rb_cSocket, "getnameinfo", sock_s_getnameinfo, -1);
    rb_define_singleton_method(rb_cSocket, "sockaddr_in", sock_s_pack_sockaddr_in, 2);
    rb_define_singleton_method(rb_cSocket, "pack_sockaddr_in", sock_s_pack_sockaddr_in, 2);
    rb_define_singleton_method(rb_cSocket, "unpack_sockaddr_in", sock_s_unpack_sockaddr_in, 1);
#ifdef HAVE_SYS_UN_H
    rb_define_singleton_method(rb_cSocket, "sockaddr_un", sock_s_pack_sockaddr_un, 1);
    rb_define_singleton_method(rb_cSocket, "pack_sockaddr_un", sock_s_pack_sockaddr_un, 1);
    rb_define_singleton_method(rb_cSocket, "unpack_sockaddr_un", sock_s_unpack_sockaddr_un, 1);
#endif

    /* constants */
    mConst = rb_define_module_under(rb_cSocket, "Constants");
#include "constants.h"
#ifdef INET6 /* IPv6 is not supported although AF_INET6 is defined on bcc32/mingw */
    sock_define_const("AF_INET6", AF_INET6);
    sock_define_const("PF_INET6", PF_INET6);
#endif
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/socket/sockport.h

root/ext/socket/sockport.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/************************************************

  sockport.h -

  $Author: eban $
  $Date: 2000/08/24 06:29:30 $
  created at: Fri Apr 30 23:19:34 JST 1999

************************************************/

#ifndef SOCKPORT_H
#define SOCKPORT_H

#ifndef SA_LEN
# ifdef HAVE_SA_LEN
#  define SA_LEN(sa) (sa)->sa_len
# else
#  ifdef INET6
#   define SA_LEN(sa) \
        (((sa)->sa_family == AF_INET6) ? sizeof(struct sockaddr_in6) \
                                       : sizeof(struct sockaddr))
#  else
    /* by tradition, sizeof(struct sockaddr) covers most of the sockaddrs */
#   define SA_LEN(sa)   (sizeof(struct sockaddr))
#  endif
# endif
#endif

#ifdef HAVE_SA_LEN
# define SET_SA_LEN(sa, len) (sa)->sa_len = (len)
#else
# define SET_SA_LEN(sa, len) (len)
#endif

#ifdef HAVE_SIN_LEN
# define SIN_LEN(si) (si)->sin_len
# define SET_SIN_LEN(si,len) (si)->sin_len = (len)
#else
# define SIN_LEN(si) sizeof(struct sockaddr_in)
# define SET_SIN_LEN(si,len)
#endif

#ifndef IN_MULTICAST
# define IN_CLASSD(i)   (((long)(i) & 0xf0000000) == 0xe0000000)
# define IN_MULTICAST(i)        IN_CLASSD(i)
#endif

#ifndef IN_EXPERIMENTAL
# define IN_EXPERIMENTAL(i) ((((long)(i)) & 0xe0000000) == 0xe0000000)
#endif

#ifndef IN_CLASSA_NSHIFT
# define IN_CLASSA_NSHIFT 24
#endif

#ifndef IN_LOOPBACKNET
# define IN_LOOPBACKNET 127
#endif

#ifndef AF_UNSPEC
# define AF_UNSPEC 0
#endif

#ifndef PF_UNSPEC
# define PF_UNSPEC AF_UNSPEC
#endif

#ifndef PF_INET
# define PF_INET AF_INET
#endif

#if defined(HOST_NOT_FOUND) && !defined(h_errno) && !defined(__CYGWIN__)
extern int h_errno;
#endif

#endif
/* [<][>][^][v][top][bottom][index] [help] */


ext/stringio/stringio.c

root/ext/stringio/stringio.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. strio_alloc
  2. strio_mark
  3. strio_free
  4. check_strio
  5. get_strio
  6. readable
  7. writable
  8. check_modifiable
  9. strio_s_allocate
  10. strio_s_open
  11. strio_initialize
  12. strio_finalize
  13. strio_false
  14. strio_nil
  15. strio_self
  16. strio_0
  17. strio_first
  18. strio_unimpl
  19. strio_get_string
  20. strio_set_string
  21. strio_close
  22. strio_close_read
  23. strio_close_write
  24. strio_closed
  25. strio_closed_read
  26. strio_closed_write
  27. strio_eof
  28. strio_copy
  29. strio_get_lineno
  30. strio_set_lineno
  31. strio_reopen
  32. strio_get_pos
  33. strio_set_pos
  34. strio_rewind
  35. strio_seek
  36. strio_get_sync
  37. strio_each_byte
  38. strio_getc
  39. strio_extend
  40. strio_ungetc
  41. strio_readchar
  42. bm_init_skip
  43. bm_search
  44. strio_getline
  45. strio_gets
  46. strio_readline
  47. strio_each
  48. strio_readlines
  49. strio_write
  50. strio_putc
  51. strio_read
  52. strio_sysread
  53. strio_size
  54. strio_truncate
  55. Init_stringio
/**********************************************************************

  stringio.c -

  $Author: nobu $
  $Date: 2005/08/13 09:35:56 $
  $RoughId: stringio.c,v 1.13 2002/03/14 03:24:18 nobu Exp $
  created at: Tue Feb 19 04:10:38 JST 2002

  All the files in this distribution are covered under the Ruby's
  license (see the file COPYING).

**********************************************************************/

#include "ruby.h"
#include "rubyio.h"
#if defined(HAVE_FCNTL_H) || defined(_WIN32)
#include <fcntl.h>
#elif defined(HAVE_SYS_FCNTL_H)
#include <sys/fcntl.h>
#endif

struct StringIO {
    VALUE string;
    long pos;
    long lineno;
    int flags;
    int count;
};

static struct StringIO* strio_alloc _((void));
static void strio_mark _((struct StringIO *));
static void strio_free _((struct StringIO *));
static struct StringIO* check_strio _((VALUE));
static struct StringIO* get_strio _((VALUE));
static struct StringIO* readable _((struct StringIO *));
static struct StringIO* writable _((struct StringIO *));
static void check_modifiable _((struct StringIO *));

#define IS_STRIO(obj) (RDATA(obj)->dmark == (RUBY_DATA_FUNC)strio_mark)
#define error_inval(msg) (errno = EINVAL, rb_sys_fail(msg))

static struct StringIO *
strio_alloc()
{
    struct StringIO *ptr = ALLOC(struct StringIO);
    ptr->string = Qnil;
    ptr->pos = 0;
    ptr->lineno = 0;
    ptr->flags = 0;
    ptr->count = 1;
    return ptr;
}

static void
strio_mark(ptr)
    struct StringIO *ptr;
{
    if (ptr) {
        rb_gc_mark(ptr->string);
    }
}

static void
strio_free(ptr)
    struct StringIO *ptr;
{
    if (--ptr->count <= 0) {
        xfree(ptr);
    }
}

static struct StringIO*
check_strio(self)
    VALUE self;
{
    Check_Type(self, T_DATA);
    if (!IS_STRIO(self)) {
        rb_raise(rb_eTypeError, "wrong argument type %s (expected StringIO)",
                 rb_class2name(CLASS_OF(self)));
    }
    return DATA_PTR(self);
}

static struct StringIO*
get_strio(self)
    VALUE self;
{
    struct StringIO *ptr = check_strio(self);

    if (!ptr) {
        rb_raise(rb_eIOError, "uninitialized stream");
    }
    return ptr;
}

#define StringIO(obj) get_strio(obj)

#define CLOSED(ptr) (!((ptr)->flags & FMODE_READWRITE))
#define READABLE(ptr) ((ptr)->flags & FMODE_READABLE)
#define WRITABLE(ptr) ((ptr)->flags & FMODE_WRITABLE)

static struct StringIO*
readable(ptr)
    struct StringIO *ptr;
{
    if (!READABLE(ptr)) {
        rb_raise(rb_eIOError, "not opened for reading");
    }
    return ptr;
}

static struct StringIO*
writable(ptr)
    struct StringIO *ptr;
{
    if (!WRITABLE(ptr)) {
        rb_raise(rb_eIOError, "not opened for writing");
    }
    if (!OBJ_TAINTED(ptr->string)) {
        rb_secure(4);
    }
    return ptr;
}

static void
check_modifiable(ptr)
    struct StringIO *ptr;
{
    if (OBJ_FROZEN(ptr->string)) {
        rb_raise(rb_eIOError, "not modifiable string");
    }
}

static VALUE strio_s_allocate _((VALUE));
static VALUE strio_s_open _((int, VALUE *, VALUE));
static VALUE strio_initialize _((int, VALUE *, VALUE));
static VALUE strio_finalize _((VALUE));
static VALUE strio_self _((VALUE));
static VALUE strio_false _((VALUE));
static VALUE strio_nil _((VALUE));
static VALUE strio_0 _((VALUE));
static VALUE strio_first _((VALUE, VALUE));
static VALUE strio_unimpl _((int, VALUE *, VALUE));
static VALUE strio_get_string _((VALUE));
static VALUE strio_set_string _((VALUE, VALUE));
static VALUE strio_close _((VALUE));
static VALUE strio_close_read _((VALUE));
static VALUE strio_close_write _((VALUE));
static VALUE strio_closed _((VALUE));
static VALUE strio_closed_read _((VALUE));
static VALUE strio_closed_write _((VALUE));
static VALUE strio_eof _((VALUE));
static VALUE strio_get_lineno _((VALUE));
static VALUE strio_set_lineno _((VALUE, VALUE));
static VALUE strio_get_pos _((VALUE));
static VALUE strio_set_pos _((VALUE, VALUE));
static VALUE strio_rewind _((VALUE));
static VALUE strio_seek _((int, VALUE *, VALUE));
static VALUE strio_get_sync _((VALUE));
static VALUE strio_each_byte _((VALUE));
static VALUE strio_getc _((VALUE));
static VALUE strio_ungetc _((VALUE, VALUE));
static VALUE strio_readchar _((VALUE));
static VALUE strio_getline _((int, VALUE *, struct StringIO *));
static VALUE strio_gets _((int, VALUE *, VALUE));
static VALUE strio_readline _((int, VALUE *, VALUE));
static VALUE strio_each _((int, VALUE *, VALUE));
static VALUE strio_readlines _((int, VALUE *, VALUE));
static VALUE strio_write _((VALUE, VALUE));
static VALUE strio_putc _((VALUE, VALUE));
static VALUE strio_read _((int, VALUE *, VALUE));
static VALUE strio_size _((VALUE));
static VALUE strio_truncate _((VALUE, VALUE));
void Init_stringio _((void));

/* Boyer-Moore search: copied from regex.c */
static void bm_init_skip _((long *, const char *, long));
static long bm_search _((const char *, long, const char *, long, const long *));

static VALUE
strio_s_allocate(klass)
    VALUE klass;
{
    return Data_Wrap_Struct(klass, strio_mark, strio_free, 0);
}

/*
 * call-seq: StringIO.open(string=""[, mode]) {|strio| ...}
 *
 * Equivalent to StringIO.new except that when it is called with a block, it
 * yields with the new instance and closes it, and returns the result which
 * returned from the block.
 */
static VALUE
strio_s_open(argc, argv, klass)
    int argc;
    VALUE *argv;
    VALUE klass;
{
    VALUE obj = rb_class_new_instance(argc, argv, klass);
    if (!rb_block_given_p()) return obj;
    return rb_ensure(rb_yield, obj, strio_finalize, obj);
}

/*
 * call-seq: StringIO.new(string=""[, mode])
 *
 * Creates new StringIO instance from with _string_ and _mode_.
 */
static VALUE
strio_initialize(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    struct StringIO *ptr = check_strio(self);
    VALUE string, mode;
    int trunc = Qfalse;

    if (!ptr) {
        DATA_PTR(self) = ptr = strio_alloc();
    }
    rb_call_super(0, 0);
    switch (rb_scan_args(argc, argv, "02", &string, &mode)) {
      case 2:
        if (FIXNUM_P(mode)) {
            int flags = FIX2INT(mode);
            ptr->flags = rb_io_modenum_flags(flags);
            trunc = flags & O_TRUNC;
        }
        else {
            const char *m = StringValueCStr(mode);
            ptr->flags = rb_io_mode_flags(m);
            trunc = *m == 'w';
        }
        StringValue(string);
        if ((ptr->flags & FMODE_WRITABLE) && OBJ_FROZEN(string)) {
            errno = EACCES;
            rb_sys_fail(0);
        }
        if (trunc) {
            rb_str_resize(string, 0);
        }
        break;
      case 1:
        StringValue(string);
        ptr->flags = OBJ_FROZEN(string) ? FMODE_READABLE : FMODE_READWRITE;
        break;
      case 0:
        string = rb_str_new("", 0);
        ptr->flags = FMODE_READWRITE;
        break;
    }
    ptr->string = string;
    return self;
}

static VALUE
strio_finalize(self)
    VALUE self;
{
    struct StringIO *ptr = StringIO(self);
    ptr->string = Qnil;
    ptr->flags &= ~FMODE_READWRITE;
    return self;
}

/*
 * Returns +false+.  Just for compatibility to IO.
 */
static VALUE
strio_false(self)
    VALUE self;
{
    StringIO(self);
    return Qfalse;
}

/*
 * Returns +nil+.  Just for compatibility to IO.
 */
static VALUE
strio_nil(self)
    VALUE self;
{
    StringIO(self);
    return Qnil;
}

/*
 * Returns *strio* itself.  Just for compatibility to IO.
 */
static VALUE
strio_self(self)
    VALUE self;
{
    StringIO(self);
    return self;
}

/*
 * Returns 0.  Just for compatibility to IO.
 */
static VALUE
strio_0(self)
    VALUE self;
{
    StringIO(self);
    return INT2FIX(0);
}

/*
 * Returns the argument unchanged.  Just for compatibility to IO.
 */
static VALUE
strio_first(self, arg)
    VALUE self, arg;
{
    StringIO(self);
    return arg;
}

/*
 * Raises NotImplementedError.
 */
static VALUE
strio_unimpl(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    StringIO(self);
    rb_notimplement();
    return Qnil;                /* not reached */
}

/*
 * call-seq: strio.string     -> string
 *
 * Returns underlying String object, the subject of IO.
 */
static VALUE
strio_get_string(self)
    VALUE self;
{
    return StringIO(self)->string;
}

/*
 * call-seq:
 *   strio.string = string  -> string
 *
 * Changes underlying String object, the subject of IO.
 */
static VALUE
strio_set_string(self, string)
    VALUE self, string;
{
    struct StringIO *ptr = StringIO(self);

    if (!OBJ_TAINTED(self)) rb_secure(4);
    ptr->flags &= ~FMODE_READWRITE;
    StringValue(string);
    ptr->flags = OBJ_FROZEN(string) ? FMODE_READABLE : FMODE_READWRITE;
    ptr->pos = 0;
    ptr->lineno = 0;
    return ptr->string = string;
}

/*
 * call-seq:
 *   strio.close  -> nil
 *
 * Closes strio.  The *strio* is unavailable for any further data
 * operations; an +IOError+ is raised if such an attempt is made.
 */
static VALUE
strio_close(self)
    VALUE self;
{
    struct StringIO *ptr = StringIO(self);
    if (CLOSED(ptr)) {
        rb_raise(rb_eIOError, "closed stream");
    }
    ptr->flags &= ~FMODE_READWRITE;
    return Qnil;
}

/*
 * call-seq:
 *   strio.close_read    -> nil
 *
 * Closes the read end of a StringIO.  Will raise an +IOError+ if the
 * *strio* is not readable.
 */
static VALUE
strio_close_read(self)
    VALUE self;
{
    struct StringIO *ptr = StringIO(self);
    if (!READABLE(ptr)) {
        rb_raise(rb_eIOError, "closing non-duplex IO for reading");
    }
    ptr->flags &= ~FMODE_READABLE;
    return Qnil;
}

/*
 * call-seq:
 *   strio.close_write    -> nil
 *
 * Closes the write end of a StringIO.  Will raise an  +IOError+ if the
 * *strio* is not writeable.
 */
static VALUE
strio_close_write(self)
    VALUE self;
{
    struct StringIO *ptr = StringIO(self);
    if (!WRITABLE(ptr)) {
        rb_raise(rb_eIOError, "closing non-duplex IO for writing");
    }
    ptr->flags &= ~FMODE_WRITABLE;
    return Qnil;
}

/*
 * call-seq:
 *   strio.closed?    -> true or false
 *
 * Returns +true+ if *strio* is completely closed, +false+ otherwise.
 */
static VALUE
strio_closed(self)
    VALUE self;
{
    struct StringIO *ptr = StringIO(self);
    if (!CLOSED(ptr)) return Qfalse;
    return Qtrue;
}

/*
 * call-seq:
 *   strio.closed_read?    -> true or false
 *
 * Returns +true+ if *strio* is not readable, +false+ otherwise.
 */
static VALUE
strio_closed_read(self)
    VALUE self;
{
    struct StringIO *ptr = StringIO(self);
    if (READABLE(ptr)) return Qfalse;
    return Qtrue;
}

/*
 * call-seq:
 *   strio.closed_write?    -> true or false
 *
 * Returns +true+ if *strio* is not writable, +false+ otherwise.
 */
static VALUE
strio_closed_write(self)
    VALUE self;
{
    struct StringIO *ptr = StringIO(self);
    if (WRITABLE(ptr)) return Qfalse;
    return Qtrue;
}

/*
 * call-seq:
 *   strio.eof     -> true or false
 *   strio.eof?    -> true or false
 *
 * Returns true if *strio* is at end of file. The stringio must be
 * opened for reading or an +IOError+ will be raised.
 */
static VALUE
strio_eof(self)
    VALUE self;
{
    struct StringIO *ptr = readable(StringIO(self));
    if (ptr->pos < RSTRING(ptr->string)->len) return Qfalse;
    return Qtrue;
}

/* :nodoc: */
static VALUE
strio_copy(copy, orig)
    VALUE copy, orig;
{
    struct StringIO *ptr;

    orig = rb_convert_type(orig, T_DATA, "StringIO", "to_strio");
    if (copy == orig) return copy;
    ptr = StringIO(orig);
    if (check_strio(copy)) {
        strio_free(DATA_PTR(copy));
    }
    DATA_PTR(copy) = ptr;
    OBJ_INFECT(copy, orig);
    ++ptr->count;
    return copy;
}

/*
 * call-seq:
 *   strio.lineno    -> integer
 *
 * Returns the current line number in *strio*. The stringio must be
 * opened for reading. +lineno+ counts the number of times  +gets+ is
 * called, rather than the number of newlines  encountered. The two
 * values will differ if +gets+ is  called with a separator other than
 * newline.  See also the  <code>$.</code> variable.
 */
static VALUE
strio_get_lineno(self)
    VALUE self;
{
    return LONG2NUM(StringIO(self)->lineno);
}

/*
 * call-seq:
 *   strio.lineno = integer    -> integer
 *
 * Manually sets the current line number to the given value.
 * <code>$.</code> is updated only on the next read.
 */
static VALUE
strio_set_lineno(self, lineno)
    VALUE self, lineno;
{
    StringIO(self)->lineno = NUM2LONG(lineno);
    return lineno;
}

/* call-seq: strio.binmode -> true */
#define strio_binmode strio_self

/* call-seq: strio.fcntl */
#define strio_fcntl strio_unimpl

/* call-seq: strio.flush -> strio */
#define strio_flush strio_self

/* call-seq: strio.fsync -> 0 */
#define strio_fsync strio_0

/*
 * call-seq:
 *   strio.reopen(other_StrIO)     -> strio
 *   strio.reopen(string, mode)    -> strio
 *
 * Reinitializes *strio* with the given <i>other_StrIO</i> or _string_
 * and _mode_ (see StringIO#new).
 */
static VALUE
strio_reopen(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    if (!OBJ_TAINTED(self)) rb_secure(4);
    if (argc == 1 && TYPE(*argv) != T_STRING) {
        return strio_copy(self, *argv);
    }
    return strio_initialize(argc, argv, self);
}

/*
 * call-seq:
 *   strio.pos     -> integer
 *   strio.tell    -> integer
 *
 * Returns the current offset (in bytes) of *strio*.
 */
static VALUE
strio_get_pos(self)
    VALUE self;
{
    return LONG2NUM(StringIO(self)->pos);
}

/*
 * call-seq:
 *   strio.pos = integer    -> integer
 *
 * Seeks to the given position (in bytes) in *strio*.
 */
static VALUE
strio_set_pos(self, pos)
    VALUE self;
    VALUE pos;
{
    struct StringIO *ptr = StringIO(self);
    long p = NUM2LONG(pos);
    if (p < 0) {
        error_inval(0);
    }
    ptr->pos = p;
    return pos;
}

/*
 * call-seq:
 *   strio.rewind    -> 0
 *
 * Positions *strio* to the beginning of input, resetting
 * +lineno+ to zero.
 */
static VALUE
strio_rewind(self)
    VALUE self;
{
    struct StringIO *ptr = StringIO(self);
    ptr->pos = 0;
    ptr->lineno = 0;
    return INT2FIX(0);
}

/*
 * call-seq:
 *   strio.seek(amount, whence=SEEK_SET) -> 0
 *
 * Seeks to a given offset _amount_ in the stream according to
 * the value of _whence_ (see IO#seek).
 */
static VALUE
strio_seek(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    VALUE whence;
    struct StringIO *ptr = StringIO(self);
    long offset;

    rb_scan_args(argc, argv, "11", NULL, &whence);
    offset = NUM2LONG(argv[0]);
    switch (NIL_P(whence) ? 0 : NUM2LONG(whence)) {
      case 0:
        break;
      case 1:
        offset += ptr->pos;
        break;
      case 2:
        offset += RSTRING(ptr->string)->len;
        break;
      default:
        rb_raise(rb_eArgError, "invalid whence %ld", NUM2LONG(whence));
    }
    if (offset < 0) {
        error_inval(0);
    }
    ptr->pos = offset;
    return INT2FIX(0);
}

/*
 * call-seq:
 *   strio.sync    -> true
 *
 * Returns +true+ always.
 */
static VALUE
strio_get_sync(self)
    VALUE self;
{
    StringIO(self);
    return Qtrue;
}

/* call-seq: strio.sync = boolean -> boolean */
#define strio_set_sync strio_first

#define strio_tell strio_get_pos

/*
 * call-seq:
 *   strio.each_byte {|byte| block }  -> strio
 *
 * See IO#each_byte.
 */
static VALUE
strio_each_byte(self)
    VALUE self;
{
    struct StringIO *ptr = readable(StringIO(self));
    while (ptr->pos < RSTRING(ptr->string)->len) {
        char c = RSTRING(ptr->string)->ptr[ptr->pos++];
        rb_yield(CHR2FIX(c));
    }
    return Qnil;
}

/*
 * call-seq:
 *   strio.getc   -> fixnum or nil
 *
 * See IO#getc.
 */
static VALUE
strio_getc(self)
    VALUE self;
{
    struct StringIO *ptr = readable(StringIO(self));
    int c;
    if (ptr->pos >= RSTRING(ptr->string)->len) {
        return Qnil;
    }
    c = RSTRING(ptr->string)->ptr[ptr->pos++];
    return CHR2FIX(c);
}

static void
strio_extend(ptr, pos, len)
    struct StringIO *ptr;
    long pos, len;
{
    long olen;

    check_modifiable(ptr);
    olen = RSTRING(ptr->string)->len;
    if (pos + len > olen) {
        rb_str_resize(ptr->string, pos + len);
        if (pos > olen)
            MEMZERO(RSTRING(ptr->string)->ptr + olen, char, pos - olen);
    }
    else {
        rb_str_modify(ptr->string);
    }
}

/*
 * call-seq:
 *   strio.ungetc(integer)   -> nil
 *
 * Pushes back one character (passed as a parameter) onto *strio*
 * such that a subsequent buffered read will return it.  Pushing back
 * behind the beginning of the buffer string is not possible.  Nothing
 * will be done if such an attempt is made.
 * In other case, there is no limitation for multiple pushbacks.
 */
static VALUE
strio_ungetc(self, ch)
    VALUE self, ch;
{
    struct StringIO *ptr = readable(StringIO(self));
    int cc = NUM2INT(ch);
    long len, pos = ptr->pos;

    if (cc != EOF && pos > 0) {
        if ((len = RSTRING(ptr->string)->len) < pos-- ||
            (unsigned char)RSTRING(ptr->string)->ptr[pos] !=
            (unsigned char)cc) {
            strio_extend(ptr, pos, 1);
            RSTRING(ptr->string)->ptr[pos] = cc;
            OBJ_INFECT(ptr->string, self);
        }
        --ptr->pos;
    }
    return Qnil;
}

/*
 * call-seq:
 *   strio.readchar   -> fixnum
 *
 * See IO#readchar.
 */
static VALUE
strio_readchar(self)
    VALUE self;
{
    VALUE c = strio_getc(self);
    if (NIL_P(c)) rb_eof_error();
    return c;
}

static void
bm_init_skip(skip, pat, m)
     long *skip;
     const char *pat;
     long m;
{
    int c;

    for (c = 0; c < (1 << CHAR_BIT); c++) {
        skip[c] = m;
    }
    while (--m) {
        skip[(unsigned char)*pat++] = m;
    }
}

static long
bm_search(little, llen, big, blen, skip)
    const char *little;
    long llen;
    const char *big;
    long blen;
    const long *skip;
{
    long i, j, k;

    i = llen - 1;
    while (i < blen) {
        k = i;
        j = llen - 1;
        while (j >= 0 && big[k] == little[j]) {
            k--;
            j--;
        }
        if (j < 0) return k + 1;
        i += skip[(unsigned char)big[i]];
    }
    return -1;
}

static VALUE
strio_getline(argc, argv, ptr)
    int argc;
    VALUE *argv;
    struct StringIO *ptr;
{
    const char *s, *e, *p;
    long n;
    VALUE str;

    if (argc == 0) {
        str = rb_rs;
    }
    else {
        rb_scan_args(argc, argv, "1", &str);
        if (!NIL_P(str)) StringValue(str);
    }

    if (ptr->pos >= (n = RSTRING(ptr->string)->len)) {
        return Qnil;
    }
    s = RSTRING(ptr->string)->ptr;
    e = s + RSTRING(ptr->string)->len;
    s += ptr->pos;
    if (NIL_P(str)) {
        str = rb_str_substr(ptr->string, ptr->pos, e - s);
    }
    else if ((n = RSTRING(str)->len) == 0) {
        p = s;
        while (*p == '\n') {
            if (++p == e) {
                return Qnil;
            }
        }
        s = p;
        while ((p = memchr(p, '\n', e - p)) && (p != e)) {
            if (*++p == '\n') {
                e = p;
                break;
            }
        }
        str = rb_str_substr(ptr->string, s - RSTRING(ptr->string)->ptr, e - s);
    }
    else if (n == 1) {
        if ((p = memchr(s, RSTRING(str)->ptr[0], e - s)) != 0) {
            e = p + 1;
        }
        str = rb_str_substr(ptr->string, ptr->pos, e - s);
    }
    else {
        if (n < e - s) {
            if (e - s < 1024) {
                for (p = s; p + n <= e; ++p) {
                    if (MEMCMP(p, RSTRING(str)->ptr, char, n) == 0) {
                        e = p + n;
                        break;
                    }
                }
            }
            else {
                long skip[1 << CHAR_BIT], pos;
                p = RSTRING(str)->ptr;
                bm_init_skip(skip, p, n);
                if ((pos = bm_search(p, n, s, e - s, skip)) >= 0) {
                    e = s + pos + n;
                }
            }
        }
        str = rb_str_substr(ptr->string, ptr->pos, e - s);
    }
    ptr->pos = e - RSTRING(ptr->string)->ptr;
    ptr->lineno++;
    return str;
}

/*
 * call-seq:
 *   strio.gets(sep_string=$/)   -> string or nil
 *
 * See IO#gets.
 */
static VALUE
strio_gets(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    VALUE str = strio_getline(argc, argv, readable(StringIO(self)));

    rb_lastline_set(str);
    return str;
}

/*
 * call-seq:
 *   strio.readline(sep_string=$/)   -> string
 *
 * See IO#readline.
 */
static VALUE
strio_readline(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    VALUE line = strio_getline(argc, argv, readable(StringIO(self)));
    if (NIL_P(line)) rb_eof_error();
    return line;
}

/*
 * call-seq:
 *   strio.each(sep_string=$/)      {|line| block }  -> strio
 *   strio.each_line(sep_string=$/) {|line| block }  -> strio
 *
 * See IO#each.
 */
static VALUE
strio_each(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    struct StringIO *ptr = StringIO(self);
    VALUE line;

    while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) {
        rb_yield(line);
    }
    return self;
}

/*
 * call-seq:
 *   strio.readlines(sep_string=$/)  ->   array
 *
 * See IO#readlines.
 */
static VALUE
strio_readlines(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    struct StringIO *ptr = StringIO(self);
    VALUE ary = rb_ary_new(), line;
    while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) {
        rb_ary_push(ary, line);
    }
    return ary;
}

/*
 * call-seq:
 *   strio.write(string)    -> integer
 *   strio.syswrite(string) -> integer
 *
 * Appends the given string to the underlying buffer string of *strio*.
 * The stream must be opened for writing.  If the argument is not a
 * string, it will be converted to a string using <code>to_s</code>.
 * Returns the number of bytes written.  See IO#write.
 */
static VALUE
strio_write(self, str)
    VALUE self, str;
{
    struct StringIO *ptr = writable(StringIO(self));
    long len, olen;

    if (TYPE(str) != T_STRING)
        str = rb_obj_as_string(str);
    len = RSTRING(str)->len;
    if (!len) return INT2FIX(0);
    check_modifiable(ptr);
    olen = RSTRING(ptr->string)->len;
    if (ptr->flags & FMODE_APPEND) {
        ptr->pos = olen;
    }
    if (ptr->pos == olen) {
        rb_str_cat(ptr->string, RSTRING(str)->ptr, len);
    }
    else {
        strio_extend(ptr, ptr->pos, len);
        rb_str_update(ptr->string, ptr->pos, len, str);
    }
    OBJ_INFECT(ptr->string, self);
    ptr->pos += len;
    return LONG2NUM(len);
}

/*
 * call-seq:
 *   strio << obj     -> strio
 *
 * See IO#<<.
 */
#define strio_addstr rb_io_addstr

/*
 * call-seq:
 *   strio.print()             -> nil
 *   strio.print(obj, ...)     -> nil
 *
 * See IO#print.
 */
#define strio_print rb_io_print

/*
 * call-seq:
 *   strio.printf(format_string [, obj, ...] )   -> nil
 *
 * See IO#printf.
 */
#define strio_printf rb_io_printf

/*
 * call-seq:
 *   strio.putc(obj)    -> obj
 *
 * See IO#putc.
 */
static VALUE
strio_putc(self, ch)
    VALUE self, ch;
{
    struct StringIO *ptr = writable(StringIO(self));
    int c = NUM2CHR(ch);
    long olen;

    check_modifiable(ptr);
    olen = RSTRING(ptr->string)->len;
    if (ptr->flags & FMODE_APPEND) {
        ptr->pos = olen;
    }
    strio_extend(ptr, ptr->pos, 1);
    RSTRING(ptr->string)->ptr[ptr->pos++] = c;
    OBJ_INFECT(ptr->string, self);
    return ch;
}

/*
 * call-seq:
 *   strio.puts(obj, ...)    -> nil
 *
 * See IO#puts.
 */
#define strio_puts rb_io_puts

/*
 * call-seq:
 *   strio.read([length [, buffer]])    -> string, buffer, or nil
 *
 * See IO#read.
 */
static VALUE
strio_read(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    struct StringIO *ptr = readable(StringIO(self));
    VALUE str = Qnil;
    long len, olen;

    switch (argc) {
      case 2:
        str = argv[1];
        StringValue(str);
        rb_str_modify(str);
      case 1:
        if (!NIL_P(argv[0])) {
            len = olen = NUM2LONG(argv[0]);
            if (len < 0) {
                rb_raise(rb_eArgError, "negative length %ld given", len);
            }
            if (len > 0 && ptr->pos >= RSTRING(ptr->string)->len) {
                if (!NIL_P(str)) rb_str_resize(str, 0);
                return Qnil;
            }
            break;
        }
        /* fall through */
      case 0:
        olen = -1;
        len = RSTRING(ptr->string)->len;
        if (len <= ptr->pos) {
            if (NIL_P(str)) {
                str = rb_str_new(0, 0);
            }
            else {
                rb_str_resize(str, 0);
            }
            return str;
        }
        else {
            len -= ptr->pos;
        }
        break;
      default:
        rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc);
    }
    if (NIL_P(str)) {
        str = rb_str_substr(ptr->string, ptr->pos, len);
    }
    else {
        long rest = RSTRING(ptr->string)->len - ptr->pos;
        if (len > rest) len = rest;
        rb_str_resize(str, len);
        MEMCPY(RSTRING(str)->ptr, RSTRING(ptr->string)->ptr + ptr->pos, char, len);
    }
    if (NIL_P(str)) {
        str = rb_str_new(0, 0);
        len = 0;
    }
    else {
        ptr->pos += len = RSTRING(str)->len;
    }
    return str;
}

/*
 * call-seq:
 *   strio.sysread(integer[, outbuf])    -> string
 *
 * Similar to #read, but raises +EOFError+ at end of string instead of
 * returning +nil+, as well as IO#sysread does.
 */
static VALUE
strio_sysread(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    VALUE val = strio_read(argc, argv, self);
    if (NIL_P(val) || RSTRING(val)->len == 0) {
        rb_eof_error();
    }
    return val;
}

#define strio_syswrite strio_write

/* call-seq: strio.path -> nil */
#define strio_path strio_nil

/*
 * call-seq:
 *   strio.isatty -> nil
 *   strio.tty? -> nil
 *
 */
#define strio_isatty strio_false

/* call-seq: strio.pid -> nil */
#define strio_pid strio_nil

/* call-seq: strio.fileno -> nil */
#define strio_fileno strio_nil

/*
 * call-seq:
 *   strio.size   -> integer
 *
 * Returns the size of the buffer string.
 */
static VALUE
strio_size(self)
    VALUE self;
{
    VALUE string = StringIO(self)->string;
    if (NIL_P(string)) {
        rb_raise(rb_eIOError, "not opened");
    }
    return ULONG2NUM(RSTRING(string)->len);
}

/*
 * call-seq:
 *   strio.truncate(integer)    -> 0
 *
 * Truncates the buffer string to at most _integer_ bytes. The *strio*
 * must be opened for writing.
 */
static VALUE
strio_truncate(self, len)
    VALUE self, len;
{
    VALUE string = writable(StringIO(self))->string;
    long l = NUM2LONG(len);
    long plen = RSTRING(string)->len;
    if (l < 0) {
        error_inval("negative legnth");
    }
    rb_str_resize(string, l);
    if (plen < l) {
        MEMZERO(RSTRING(string)->ptr + plen, char, l - plen);
    }
    return len;
}

/*
 * Pseudo I/O on String object.
 */
void
Init_stringio()
{
    VALUE StringIO = rb_define_class("StringIO", rb_cData);

    rb_include_module(StringIO, rb_mEnumerable);
    rb_define_alloc_func(StringIO, strio_s_allocate);
    rb_define_singleton_method(StringIO, "open", strio_s_open, -1);
    rb_define_method(StringIO, "initialize", strio_initialize, -1);
    rb_define_method(StringIO, "initialize_copy", strio_copy, 1);
    rb_define_method(StringIO, "reopen", strio_reopen, -1);

    rb_define_method(StringIO, "string", strio_get_string, 0);
    rb_define_method(StringIO, "string=", strio_set_string, 1);
    rb_define_method(StringIO, "lineno", strio_get_lineno, 0);
    rb_define_method(StringIO, "lineno=", strio_set_lineno, 1);

    rb_define_method(StringIO, "binmode", strio_binmode, 0);
    rb_define_method(StringIO, "close", strio_close, 0);
    rb_define_method(StringIO, "close_read", strio_close_read, 0);
    rb_define_method(StringIO, "close_write", strio_close_write, 0);
    rb_define_method(StringIO, "closed?", strio_closed, 0);
    rb_define_method(StringIO, "closed_read?", strio_closed_read, 0);
    rb_define_method(StringIO, "closed_write?", strio_closed_write, 0);
    rb_define_method(StringIO, "eof", strio_eof, 0);
    rb_define_method(StringIO, "eof?", strio_eof, 0);
    rb_define_method(StringIO, "fcntl", strio_fcntl, -1);
    rb_define_method(StringIO, "flush", strio_flush, 0);
    rb_define_method(StringIO, "fsync", strio_fsync, 0);
    rb_define_method(StringIO, "pos", strio_get_pos, 0);
    rb_define_method(StringIO, "pos=", strio_set_pos, 1);
    rb_define_method(StringIO, "rewind", strio_rewind, 0);
    rb_define_method(StringIO, "seek", strio_seek, -1);
    rb_define_method(StringIO, "sync", strio_get_sync, 0);
    rb_define_method(StringIO, "sync=", strio_set_sync, 1);
    rb_define_method(StringIO, "tell", strio_tell, 0);
    rb_define_method(StringIO, "path", strio_path, 0);

    rb_define_method(StringIO, "each", strio_each, -1);
    rb_define_method(StringIO, "each_byte", strio_each_byte, 0);
    rb_define_method(StringIO, "each_line", strio_each, -1);
    rb_define_method(StringIO, "getc", strio_getc, 0);
    rb_define_method(StringIO, "ungetc", strio_ungetc, 1);
    rb_define_method(StringIO, "readchar", strio_readchar, 0);
    rb_define_method(StringIO, "gets", strio_gets, -1);
    rb_define_method(StringIO, "readline", strio_readline, -1);
    rb_define_method(StringIO, "readlines", strio_readlines, -1);
    rb_define_method(StringIO, "read", strio_read, -1);
    rb_define_method(StringIO, "sysread", strio_sysread, -1);
    rb_define_method(StringIO, "readpartial", strio_sysread, -1);

    rb_define_method(StringIO, "write", strio_write, 1);
    rb_define_method(StringIO, "<<", strio_addstr, 1);
    rb_define_method(StringIO, "print", strio_print, -1);
    rb_define_method(StringIO, "printf", strio_printf, -1);
    rb_define_method(StringIO, "putc", strio_putc, 1);
    rb_define_method(StringIO, "puts", strio_puts, -1);
    rb_define_method(StringIO, "syswrite", strio_syswrite, 1);

    rb_define_method(StringIO, "isatty", strio_isatty, 0);
    rb_define_method(StringIO, "tty?", strio_isatty, 0);
    rb_define_method(StringIO, "pid", strio_pid, 0);
    rb_define_method(StringIO, "fileno", strio_fileno, 0);
    rb_define_method(StringIO, "size", strio_size, 0);
    rb_define_method(StringIO, "length", strio_size, 0);
    rb_define_method(StringIO, "truncate", strio_truncate, 1);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/strscan/strscan.c

root/ext/strscan/strscan.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. infect
  2. extract_range
  3. extract_beg_len
  4. strscan_mark
  5. strscan_free
  6. strscan_s_allocate
  7. strscan_initialize
  8. check_strscan
  9. strscan_init_copy
  10. strscan_s_mustc
  11. strscan_reset
  12. strscan_terminate
  13. strscan_clear
  14. strscan_get_string
  15. strscan_set_string
  16. strscan_concat
  17. strscan_get_pos
  18. strscan_set_pos
  19. strscan_do_scan
  20. strscan_scan
  21. strscan_match_p
  22. strscan_skip
  23. strscan_check
  24. strscan_scan_full
  25. strscan_scan_until
  26. strscan_exist_p
  27. strscan_skip_until
  28. strscan_check_until
  29. strscan_search_full
  30. adjust_registers_to_matched
  31. strscan_getch
  32. strscan_get_byte
  33. strscan_getbyte
  34. strscan_peek
  35. strscan_peep
  36. strscan_unscan
  37. strscan_bol_p
  38. strscan_eos_p
  39. strscan_empty_p
  40. strscan_rest_p
  41. strscan_matched_p
  42. strscan_matched
  43. strscan_matched_size
  44. strscan_matchedsize
  45. strscan_aref
  46. strscan_pre_match
  47. strscan_post_match
  48. strscan_rest
  49. strscan_rest_size
  50. strscan_restsize
  51. strscan_inspect
  52. inspect1
  53. inspect2
  54. Init_strscan
/*
    $Id: strscan.c,v 1.22 2005/10/06 11:11:23 aamine Exp $

    Copyright (c) 1999-2005 Minero Aoki

    This program is free software.
    You can distribute/modify this program under the terms of
    the Ruby License. For details, see the file COPYING.
*/

#include "ruby.h"
#include "re.h"

#define STRSCAN_VERSION "0.7.0"

/* =======================================================================
                         Data Type Definitions
   ======================================================================= */

static VALUE StringScanner;
static VALUE ScanError;

struct strscanner
{
    /* multi-purpose flags */
    unsigned long flags;
#define FLAG_MATCHED (1 << 0)

    /* the string to scan */
    VALUE str;

    /* scan pointers */
    long prev;   /* legal only when MATCHED_P(s) */
    long curr;   /* always legal */

    /* the regexp register; legal only when MATCHED_P(s) */
    struct re_registers regs;
};

#define MATCHED_P(s)          ((s)->flags & FLAG_MATCHED)
#define MATCHED(s)             (s)->flags |= FLAG_MATCHED
#define CLEAR_MATCH_STATUS(s)  (s)->flags &= ~FLAG_MATCHED

#define S_PBEG(s)  (RSTRING((s)->str)->ptr)
#define S_LEN(s)  (RSTRING((s)->str)->len)
#define S_PEND(s)  (S_PBEG(s) + S_LEN(s))
#define CURPTR(s) (S_PBEG(s) + (s)->curr)
#define S_RESTLEN(s) (S_LEN(s) - (s)->curr)

#define EOS_P(s) ((s)->curr >= RSTRING(p->str)->len)

#define GET_SCANNER(obj,var) do {\
    Data_Get_Struct(obj, struct strscanner, var);\
    if (NIL_P(var->str)) rb_raise(rb_eArgError, "uninitialized StringScanner object");\
} while (0)

/* =======================================================================
                            Function Prototypes
   ======================================================================= */

static VALUE infect _((VALUE str, struct strscanner *p));
static VALUE extract_range _((struct strscanner *p, long beg_i, long end_i));
static VALUE extract_beg_len _((struct strscanner *p, long beg_i, long len));

void check_strscan _((VALUE obj));
static void strscan_mark _((struct strscanner *p));
static void strscan_free _((struct strscanner *p));
static VALUE strscan_s_allocate _((VALUE klass));
static VALUE strscan_initialize _((int argc, VALUE *argv, VALUE self));
static VALUE strscan_init_copy _((VALUE vself, VALUE vorig));

static VALUE strscan_s_mustc _((VALUE self));
static VALUE strscan_terminate _((VALUE self));
static VALUE strscan_clear _((VALUE self));
static VALUE strscan_get_string _((VALUE self));
static VALUE strscan_set_string _((VALUE self, VALUE str));
static VALUE strscan_concat _((VALUE self, VALUE str));
static VALUE strscan_get_pos _((VALUE self));
static VALUE strscan_set_pos _((VALUE self, VALUE pos));
static VALUE strscan_do_scan _((VALUE self, VALUE regex,
                                int succptr, int getstr, int headonly));
static VALUE strscan_scan _((VALUE self, VALUE re));
static VALUE strscan_match_p _((VALUE self, VALUE re));
static VALUE strscan_skip _((VALUE self, VALUE re));
static VALUE strscan_check _((VALUE self, VALUE re));
static VALUE strscan_scan_full _((VALUE self, VALUE re,
                                  VALUE succp, VALUE getp));
static VALUE strscan_scan_until _((VALUE self, VALUE re));
static VALUE strscan_skip_until _((VALUE self, VALUE re));
static VALUE strscan_check_until _((VALUE self, VALUE re));
static VALUE strscan_search_full _((VALUE self, VALUE re,
                                    VALUE succp, VALUE getp));
static void adjust_registers_to_matched _((struct strscanner *p));
static VALUE strscan_getch _((VALUE self));
static VALUE strscan_get_byte _((VALUE self));
static VALUE strscan_getbyte _((VALUE self));
static VALUE strscan_peek _((VALUE self, VALUE len));
static VALUE strscan_peep _((VALUE self, VALUE len));
static VALUE strscan_unscan _((VALUE self));
static VALUE strscan_bol_p _((VALUE self));
static VALUE strscan_eos_p _((VALUE self));
static VALUE strscan_empty_p _((VALUE self));
static VALUE strscan_rest_p _((VALUE self));
static VALUE strscan_matched_p _((VALUE self));
static VALUE strscan_matched _((VALUE self));
static VALUE strscan_matched_size _((VALUE self));
static VALUE strscan_aref _((VALUE self, VALUE idx));
static VALUE strscan_pre_match _((VALUE self));
static VALUE strscan_post_match _((VALUE self));
static VALUE strscan_rest _((VALUE self));
static VALUE strscan_rest_size _((VALUE self));

static VALUE strscan_inspect _((VALUE self));
static VALUE inspect1 _((struct strscanner *p));
static VALUE inspect2 _((struct strscanner *p));

/* =======================================================================
                                   Utils
   ======================================================================= */

static VALUE
infect(str, p)
    VALUE str;
    struct strscanner *p;
{
    OBJ_INFECT(str, p->str);
    return str;
}

static VALUE
extract_range(p, beg_i, end_i)
    struct strscanner *p;
    long beg_i, end_i;
{
    if (beg_i > S_LEN(p)) return Qnil;
    if (end_i > S_LEN(p))
        end_i = S_LEN(p);
    return infect(rb_str_new(S_PBEG(p) + beg_i, end_i - beg_i), p);
}

static VALUE
extract_beg_len(p, beg_i, len)
    struct strscanner *p;
    long beg_i, len;
{
    if (beg_i > S_LEN(p)) return Qnil;
    if (beg_i + len > S_LEN(p))
        len = S_LEN(p) - beg_i;
    return infect(rb_str_new(S_PBEG(p) + beg_i, len), p);
}

/* =======================================================================
                               Constructor
   ======================================================================= */

static void
strscan_mark(p)
    struct strscanner *p;
{
    rb_gc_mark(p->str);
}

static void
strscan_free(p)
    struct strscanner *p;
{
    onig_region_free(&(p->regs), 0);
    free(p);
}

static VALUE
strscan_s_allocate(klass)
    VALUE klass;
{
    struct strscanner *p;

    p = ALLOC(struct strscanner);
    MEMZERO(p, struct strscanner, 1);
    CLEAR_MATCH_STATUS(p);
    onig_region_init(&(p->regs));
    p->str = Qnil;
    return Data_Wrap_Struct(klass, strscan_mark, strscan_free, p);
}

/*
 * call-seq: StringScanner.new(string, dup = false)
 *
 * Creates a new StringScanner object to scan over the given +string+.
 * +dup+ argument is obsolete and not used now.
 */
static VALUE
strscan_initialize(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    struct strscanner *p;
    VALUE str, need_dup;

    Data_Get_Struct(self, struct strscanner, p);
    rb_scan_args(argc, argv, "11", &str, &need_dup);
    StringValue(str);
    p->str = str;

    return self;
}

void
check_strscan(obj)
    VALUE obj;
{
    if (TYPE(obj) != T_DATA || RDATA(obj)->dmark != (RUBY_DATA_FUNC)strscan_mark) {
        rb_raise(rb_eTypeError,
                 "wrong argument type %s (expected StringScanner)",
                 rb_obj_classname(obj));
    }
}

/*
 * call-seq:
 *   dup
 *   clone
 *
 * Duplicates a StringScanner object.
 */
static VALUE
strscan_init_copy(vself, vorig)
    VALUE vself, vorig;
{
    struct strscanner *self, *orig;

    Data_Get_Struct(vself, struct strscanner, self);
    check_strscan(vorig);
    Data_Get_Struct(vorig, struct strscanner, orig);
    if (self != orig) {
        self->flags = orig->flags;
        self->str = orig->str;
        self->prev = orig->prev;
        self->curr = orig->curr;
        onig_region_copy(&self->regs, &orig->regs);
    }

    return vself;
}

/* =======================================================================
                          Instance Methods
   ======================================================================= */

/*
 * call-seq: StringScanner.must_C_version
 *
 * This method is defined for backward compatibility.
 */
static VALUE
strscan_s_mustc(self)
    VALUE self;
{
    return self;
}

/*
 * Reset the scan pointer (index 0) and clear matching data.
 */
static VALUE
strscan_reset(self)
    VALUE self;
{
    struct strscanner *p;

    GET_SCANNER(self, p);
    p->curr = 0;
    CLEAR_MATCH_STATUS(p);
    return self;
}

/*
 * call-seq:
 *   terminate
 *   clear
 *
 * Set the scan pointer to the end of the string and clear matching data.
 */
static VALUE
strscan_terminate(self)
    VALUE self;
{
    struct strscanner *p;

    GET_SCANNER(self, p);
    p->curr = S_LEN(p);
    CLEAR_MATCH_STATUS(p);
    return self;
}

/*
 * Equivalent to #terminate.
 * This method is obsolete; use #terminate instead.
 */
static VALUE
strscan_clear(self)
    VALUE self;
{
    rb_warning("StringScanner#clear is obsolete; use #terminate instead");
    return strscan_terminate(self);
}

/*
 * Returns the string being scanned.
 */
static VALUE
strscan_get_string(self)
    VALUE self;
{
    struct strscanner *p;

    GET_SCANNER(self, p);
    return p->str;
}

/*
 * call-seq: string=(str)
 *
 * Changes the string being scanned to +str+ and resets the scanner.
 * Returns +str+.
 */
static VALUE
strscan_set_string(self, str)
    VALUE self, str;
{
    struct strscanner *p;

    Data_Get_Struct(self, struct strscanner, p);
    StringValue(str);
    p->str = rb_str_dup(str);
    rb_obj_freeze(p->str);
    p->curr = 0;
    CLEAR_MATCH_STATUS(p);
    return str;
}

/*
 * call-seq:
 *   concat(str)
 *   <<(str)
 *
 * Appends +str+ to the string being scanned.
 * This method does not affect scan pointer.
 *
 *   s = StringScanner.new("Fri Dec 12 1975 14:39")
 *   s.scan(/Fri /)
 *   s << " +1000 GMT"
 *   s.string            # -> "Fri Dec 12 1975 14:39 +1000 GMT"
 *   s.scan(/Dec/)       # -> "Dec"
 */
static VALUE
strscan_concat(self, str)
    VALUE self, str;
{
    struct strscanner *p;

    GET_SCANNER(self, p);
    StringValue(str);
    rb_str_append(p->str, str);
    return self;
}

/*
 * Returns the position of the scan pointer.  In the 'reset' position, this
 * value is zero.  In the 'terminated' position (i.e. the string is exhausted),
 * this value is the length of the string.
 *
 * In short, it's a 0-based index into the string.
 *
 *   s = StringScanner.new('test string')
 *   s.pos               # -> 0
 *   s.scan_until /str/  # -> "test str"
 *   s.pos               # -> 8
 *   s.terminate         # -> #<StringScanner fin>
 *   s.pos               # -> 11
 */
static VALUE
strscan_get_pos(self)
    VALUE self;
{
    struct strscanner *p;

    GET_SCANNER(self, p);
    return INT2FIX(p->curr);
}

/*
 * call-seq: pos=(n)
 *
 * Modify the scan pointer.
 *
 *   s = StringScanner.new('test string')
 *   s.pos = 7            # -> 7
 *   s.rest               # -> "ring"
 */
static VALUE
strscan_set_pos(self, v)
    VALUE self, v;
{
    struct strscanner *p;
    long i;

    GET_SCANNER(self, p);
    i = NUM2INT(v);
    if (i < 0) i += S_LEN(p);
    if (i < 0) rb_raise(rb_eRangeError, "index out of range");
    if (i > S_LEN(p)) rb_raise(rb_eRangeError, "index out of range");
    p->curr = i;
    return INT2NUM(i);
}

/* I should implement this function? */
#define strscan_prepare_re(re)  /* none */

static VALUE
strscan_do_scan(self, regex, succptr, getstr, headonly)
    VALUE self, regex;
    int succptr, getstr, headonly;
{
    struct strscanner *p;
    int ret;

    Check_Type(regex, T_REGEXP);
    GET_SCANNER(self, p);

    CLEAR_MATCH_STATUS(p);
    if (EOS_P(p)) {
        return Qnil;
    }
    strscan_prepare_re(regex);
    if (headonly) {
        ret = onig_match(RREGEXP(regex)->ptr, (UChar* )CURPTR(p),
                         (UChar* )(CURPTR(p) + S_RESTLEN(p)),
                         (UChar* )CURPTR(p), &(p->regs), ONIG_OPTION_NONE);
    }
    else {
        ret = onig_search(RREGEXP(regex)->ptr,
                          (UChar* )CURPTR(p), (UChar* )(CURPTR(p) + S_RESTLEN(p)),
                          (UChar* )CURPTR(p), (UChar* )(CURPTR(p) + S_RESTLEN(p)),
                          &(p->regs), ONIG_OPTION_NONE);
    }

    if (ret == -2) rb_raise(ScanError, "regexp buffer overflow");
    if (ret < 0) {
        /* not matched */
        return Qnil;
    }

    MATCHED(p);
    p->prev = p->curr;
    if (succptr) {
        p->curr += p->regs.end[0];
    }
    if (getstr) {
        return extract_beg_len(p, p->prev, p->regs.end[0]);
    }
    else {
        return INT2FIX(p->regs.end[0]);
    }
}

/*
 * call-seq: scan(pattern) => String
 *
 * Tries to match with +pattern+ at the current position. If there's a match,
 * the scanner advances the "scan pointer" and returns the matched string.
 * Otherwise, the scanner returns +nil+.
 *
 *   s = StringScanner.new('test string')
 *   p s.scan(/\w+/)   # -> "test"
 *   p s.scan(/\w+/)   # -> nil
 *   p s.scan(/\s+/)   # -> " "
 *   p s.scan(/\w+/)   # -> "string"
 *   p s.scan(/./)     # -> nil
 *
 */
static VALUE
strscan_scan(self, re)
    VALUE self, re;
{
    return strscan_do_scan(self, re, 1, 1, 1);
}

/*
 * call-seq: match?(pattern)
 *
 * Tests whether the given +pattern+ is matched from the current scan pointer.
 * Returns the length of the match, or +nil+.  The scan pointer is not advanced.
 *
 *   s = StringScanner.new('test string')
 *   p s.match?(/\w+/)   # -> 4
 *   p s.match?(/\w+/)   # -> 4
 *   p s.match?(/\s+/)   # -> nil
 */
static VALUE
strscan_match_p(self, re)
    VALUE self, re;
{
    return strscan_do_scan(self, re, 0, 0, 1);
}

/*
 * call-seq: skip(pattern)
 *
 * Attempts to skip over the given +pattern+ beginning with the scan pointer.
 * If it matches, the scan pointer is advanced to the end of the match, and the
 * length of the match is returned.  Otherwise, +nil+ is returned.
 *
 * It's similar to #scan, but without returning the matched string.
 *
 *   s = StringScanner.new('test string')
 *   p s.skip(/\w+/)   # -> 4
 *   p s.skip(/\w+/)   # -> nil
 *   p s.skip(/\s+/)   # -> 1
 *   p s.skip(/\w+/)   # -> 6
 *   p s.skip(/./)     # -> nil
 *
 */
static VALUE
strscan_skip(self, re)
    VALUE self, re;
{
    return strscan_do_scan(self, re, 1, 0, 1);
}

/*
 * call-seq: check(pattern)
 *
 * This returns the value that #scan would return, without advancing the scan
 * pointer.  The match register is affected, though.
 *
 *   s = StringScanner.new("Fri Dec 12 1975 14:39")
 *   s.check /Fri/               # -> "Fri"
 *   s.pos                       # -> 0
 *   s.matched                   # -> "Fri"
 *   s.check /12/                # -> nil
 *   s.matched                   # -> nil
 *
 * Mnemonic: it "checks" to see whether a #scan will return a value.
 */
static VALUE
strscan_check(self, re)
    VALUE self, re;
{
    return strscan_do_scan(self, re, 0, 1, 1);
}

/*
 * call-seq: scan_full(pattern, return_string_p, advance_pointer_p)
 *
 * Tests whether the given +pattern+ is matched from the current scan pointer.
 * Returns the matched string if +return_string_p+ is true.
 * Advances the scan pointer if +advance_pointer_p+ is true.
 * The match register is affected.
 *
 * "full" means "#scan with full parameters".
 */
static VALUE
strscan_scan_full(self, re, s, f)
    VALUE self, re, s, f;
{
    return strscan_do_scan(self, re, RTEST(s), RTEST(f), 1);
}

/*
 * call-seq: scan_until(pattern)
 *
 * Scans the string _until_ the +pattern+ is matched.  Returns the substring up
 * to and including the end of the match, advancing the scan pointer to that
 * location. If there is no match, +nil+ is returned.
 *
 *   s = StringScanner.new("Fri Dec 12 1975 14:39")
 *   s.scan_until(/1/)        # -> "Fri Dec 1"
 *   s.pre_match              # -> "Fri Dec "
 *   s.scan_until(/XYZ/)      # -> nil
 */
static VALUE
strscan_scan_until(self, re)
    VALUE self, re;
{
    return strscan_do_scan(self, re, 1, 1, 0);
}

/*
 * call-seq: exist?(pattern)
 *
 * Looks _ahead_ to see if the +pattern+ exists _anywhere_ in the string,
 * without advancing the scan pointer.  This predicates whether a #scan_until
 * will return a value.
 *
 *   s = StringScanner.new('test string')
 *   s.exist? /s/            # -> 3
 *   s.scan /test/           # -> "test"
 *   s.exist? /s/            # -> 6
 *   s.exist? /e/            # -> nil
 */
static VALUE
strscan_exist_p(self, re)
    VALUE self, re;
{
    return strscan_do_scan(self, re, 0, 0, 0);
}

/*
 * call-seq: skip_until(pattern)
 *
 * Advances the scan pointer until +pattern+ is matched and consumed.  Returns
 * the number of bytes advanced, or +nil+ if no match was found.
 *
 * Look ahead to match +pattern+, and advance the scan pointer to the _end_
 * of the match.  Return the number of characters advanced, or +nil+ if the
 * match was unsuccessful.
 *
 * It's similar to #scan_until, but without returning the intervening string.
 *
 *   s = StringScanner.new("Fri Dec 12 1975 14:39")
 *   s.skip_until /12/           # -> 10
 *   s                           #
 */
static VALUE
strscan_skip_until(self, re)
    VALUE self, re;
{
    return strscan_do_scan(self, re, 1, 0, 0);
}

/*
 * call-seq: check_until(pattern)
 *
 * This returns the value that #scan_until would return, without advancing the
 * scan pointer.  The match register is affected, though.
 *
 *   s = StringScanner.new("Fri Dec 12 1975 14:39")
 *   s.check_until /12/          # -> "Fri Dec 12"
 *   s.pos                       # -> 0
 *   s.matched                   # -> 12
 *
 * Mnemonic: it "checks" to see whether a #scan_until will return a value.
 */
static VALUE
strscan_check_until(self, re)
    VALUE self, re;
{
    return strscan_do_scan(self, re, 0, 1, 0);
}

/*
 * call-seq: search_full(pattern, return_string_p, advance_pointer_p)
 *
 * Scans the string _until_ the +pattern+ is matched.
 * Returns the matched string if +return_string_p+ is true, otherwise
 * returns the number of bytes advanced.
 * Advances the scan pointer if +advance_pointer_p+, otherwise not.
 * This method does affect the match register.
 */
static VALUE
strscan_search_full(self, re, s, f)
    VALUE self, re, s, f;
{
    return strscan_do_scan(self, re, RTEST(s), RTEST(f), 0);
}

static void
adjust_registers_to_matched(p)
    struct strscanner *p;
{
    onig_region_clear(&(p->regs));
    onig_region_set(&(p->regs), 0, 0, p->curr - p->prev);
}

/*
 * Scans one character and returns it.
 * This method is multibyte character sensitive.
 *
 *   s = StringScanner.new("ab")
 *   s.getch           # => "a"
 *   s.getch           # => "b"
 *   s.getch           # => nil
 *
 *   $KCODE = 'EUC'
 *   s = StringScanner.new("\244\242")
 *   s.getch           # => "\244\242"   # Japanese hira-kana "A" in EUC-JP
 *   s.getch           # => nil
 */
static VALUE
strscan_getch(self)
    VALUE self;
{
    struct strscanner *p;
    long len;

    GET_SCANNER(self, p);
    CLEAR_MATCH_STATUS(p);
    if (EOS_P(p))
        return Qnil;

    len = mbclen(*CURPTR(p));
    if (p->curr + len > S_LEN(p)) {
        len = S_LEN(p) - p->curr;
    }
    p->prev = p->curr;
    p->curr += len;
    MATCHED(p);
    adjust_registers_to_matched(p);
    return extract_range(p, p->prev + p->regs.beg[0],
                            p->prev + p->regs.end[0]);
}

/*
 * Scans one byte and returns it.
 * This method is not multibyte character sensitive.
 * See also: #getch.
 *
 *   s = StringScanner.new('ab')
 *   s.get_byte         # => "a"
 *   s.get_byte         # => "b"
 *   s.get_byte         # => nil
 *
 *   $KCODE = 'EUC'
 *   s = StringScanner.new("\244\242")
 *   s.get_byte         # => "\244"
 *   s.get_byte         # => "\242"
 *   s.get_byte         # => nil
 */
static VALUE
strscan_get_byte(self)
    VALUE self;
{
    struct strscanner *p;

    GET_SCANNER(self, p);
    CLEAR_MATCH_STATUS(p);
    if (EOS_P(p))
        return Qnil;

    p->prev = p->curr;
    p->curr++;
    MATCHED(p);
    adjust_registers_to_matched(p);
    return extract_range(p, p->prev + p->regs.beg[0],
                            p->prev + p->regs.end[0]);
}

/*
 * Equivalent to #get_byte.
 * This method is obsolete; use #get_byte instead.
 */
static VALUE
strscan_getbyte(self)
    VALUE self;
{
    rb_warning("StringScanner#getbyte is obsolete; use #get_byte instead");
    return strscan_get_byte(self);
}

/*
 * call-seq: peek(len)
 *
 * Extracts a string corresponding to <tt>string[pos,len]</tt>, without
 * advancing the scan pointer.
 *
 *   s = StringScanner.new('test string')
 *   s.peek(7)          # => "test st"
 *   s.peek(7)          # => "test st"
 *
 */
static VALUE
strscan_peek(self, vlen)
    VALUE self, vlen;
{
    struct strscanner *p;
    long len;

    GET_SCANNER(self, p);

    len = NUM2LONG(vlen);
    if (EOS_P(p))
        return infect(rb_str_new("", 0), p);

    if (p->curr + len > S_LEN(p))
        len = S_LEN(p) - p->curr;
    return extract_beg_len(p, p->curr, len);
}

/*
 * Equivalent to #peek.
 * This method is obsolete; use #peek instead.
 */
static VALUE
strscan_peep(self, vlen)
    VALUE self, vlen;
{
    rb_warning("StringScanner#peep is obsolete; use #peek instead");
    return strscan_peek(self, vlen);
}

/*
 * Set the scan pointer to the previous position.  Only one previous position is
 * remembered, and it changes with each scanning operation.
 *
 *   s = StringScanner.new('test string')
 *   s.scan(/\w+/)        # => "test"
 *   s.unscan
 *   s.scan(/../)         # => "te"
 *   s.scan(/\d/)         # => nil
 *   s.unscan             # ScanError: unscan failed: previous match record not exist
 */
static VALUE
strscan_unscan(self)
    VALUE self;
{
    struct strscanner *p;

    GET_SCANNER(self, p);
    if (! MATCHED_P(p))
        rb_raise(ScanError, "unscan failed: previous match record not exist");
    p->curr = p->prev;
    CLEAR_MATCH_STATUS(p);
    return self;
}

/*
 * Returns +true+ iff the scan pointer is at the beginning of the line.
 *
 *   s = StringScanner.new("test\ntest\n")
 *   s.bol?           # => true
 *   s.scan(/te/)
 *   s.bol?           # => false
 *   s.scan(/st\n/)
 *   s.bol?           # => true
 *   s.terminate
 *   s.bol?           # => true
 */
static VALUE
strscan_bol_p(self)
    VALUE self;
{
    struct strscanner *p;

    GET_SCANNER(self, p);
    if (CURPTR(p) > S_PEND(p)) return Qnil;
    if (p->curr == 0) return Qtrue;
    return (*(CURPTR(p) - 1) == '\n') ? Qtrue : Qfalse;
}

/*
 * Returns +true+ if the scan pointer is at the end of the string.
 *
 *   s = StringScanner.new('test string')
 *   p s.eos?          # => false
 *   s.scan(/test/)
 *   p s.eos?          # => false
 *   s.terminate
 *   p s.eos?          # => true
 */
static VALUE
strscan_eos_p(self)
    VALUE self;
{
    struct strscanner *p;

    GET_SCANNER(self, p);
    return EOS_P(p) ? Qtrue : Qfalse;
}

/*
 * Equivalent to #eos?.
 * This method is obsolete, use #eos? instead.
 */
static VALUE
strscan_empty_p(self)
    VALUE self;
{
    rb_warning("StringScanner#empty? is obsolete; use #eos? instead");
    return strscan_eos_p(self);
}

/*
 * Returns true iff there is more data in the string.  See #eos?.
 * This method is obsolete; use #eos? instead.
 *
 *   s = StringScanner.new('test string')
 *   s.eos?              # These two
 *   s.rest?             # are opposites.
 */
static VALUE
strscan_rest_p(self)
    VALUE self;
{
    struct strscanner *p;

    GET_SCANNER(self, p);
    return EOS_P(p) ? Qfalse : Qtrue;
}

/*
 * Returns +true+ iff the last match was successful.
 *
 *   s = StringScanner.new('test string')
 *   s.match?(/\w+/)     # => 4
 *   s.matched?          # => true
 *   s.match?(/\d+/)     # => nil
 *   s.matched?          # => false
 */
static VALUE
strscan_matched_p(self)
    VALUE self;
{
    struct strscanner *p;

    GET_SCANNER(self, p);
    return MATCHED_P(p) ? Qtrue : Qfalse;
}

/*
 * Returns the last matched string.
 *
 *   s = StringScanner.new('test string')
 *   s.match?(/\w+/)     # -> 4
 *   s.matched           # -> "test"
 */
static VALUE
strscan_matched(self)
    VALUE self;
{
    struct strscanner *p;

    GET_SCANNER(self, p);
    if (! MATCHED_P(p)) return Qnil;
    return extract_range(p, p->prev + p->regs.beg[0],
                            p->prev + p->regs.end[0]);
}

/*
 * Returns the size of the most recent match (see #matched), or +nil+ if there
 * was no recent match.
 *
 *   s = StringScanner.new('test string')
 *   s.check /\w+/           # -> "test"
 *   s.matched_size          # -> 4
 *   s.check /\d+/           # -> nil
 *   s.matched_size          # -> nil
 */
static VALUE
strscan_matched_size(self)
    VALUE self;
{
    struct strscanner *p;

    GET_SCANNER(self, p);
    if (! MATCHED_P(p)) return Qnil;
    return INT2NUM(p->regs.end[0] - p->regs.beg[0]);
}

/*
 * Equivalent to #matched_size.
 * This method is obsolete; use #matched_size instead.
 */
static VALUE
strscan_matchedsize(self)
    VALUE self;
{
    rb_warning("StringScanner#matchedsize is obsolete; use #matched_size instead");
    return strscan_matched_size(self);
}

/*
 * call-seq: [](n)
 *
 * Return the n-th subgroup in the most recent match.
 *
 *   s = StringScanner.new("Fri Dec 12 1975 14:39")
 *   s.scan(/(\w+) (\w+) (\d+) /)       # -> "Fri Dec 12 "
 *   s[0]                               # -> "Fri Dec 12 "
 *   s[1]                               # -> "Fri"
 *   s[2]                               # -> "Dec"
 *   s[3]                               # -> "12"
 *   s.post_match                       # -> "1975 14:39"
 *   s.pre_match                        # -> ""
 */
static VALUE
strscan_aref(self, idx)
    VALUE self, idx;
{
    struct strscanner *p;
    long i;

    GET_SCANNER(self, p);
    if (! MATCHED_P(p))        return Qnil;

    i = NUM2LONG(idx);
    if (i < 0)
        i += p->regs.num_regs;
    if (i < 0)                 return Qnil;
    if (i >= p->regs.num_regs) return Qnil;
    if (p->regs.beg[i] == -1)  return Qnil;

    return extract_range(p, p->prev + p->regs.beg[i],
                            p->prev + p->regs.end[i]);
}

/*
 * Return the <i><b>pre</b>-match</i> (in the regular expression sense) of the last scan.
 *
 *   s = StringScanner.new('test string')
 *   s.scan(/\w+/)           # -> "test"
 *   s.scan(/\s+/)           # -> " "
 *   s.pre_match             # -> "test"
 *   s.post_match            # -> "string"
 */
static VALUE
strscan_pre_match(self)
    VALUE self;
{
    struct strscanner *p;

    GET_SCANNER(self, p);
    if (! MATCHED_P(p)) return Qnil;
    return extract_range(p, 0, p->prev + p->regs.beg[0]);
}

/*
 * Return the <i><b>post</b>-match</i> (in the regular expression sense) of the last scan.
 *
 *   s = StringScanner.new('test string')
 *   s.scan(/\w+/)           # -> "test"
 *   s.scan(/\s+/)           # -> " "
 *   s.pre_match             # -> "test"
 *   s.post_match            # -> "string"
 */
static VALUE
strscan_post_match(self)
    VALUE self;
{
    struct strscanner *p;

    GET_SCANNER(self, p);
    if (! MATCHED_P(p)) return Qnil;
    return extract_range(p, p->prev + p->regs.end[0], S_LEN(p));
}

/*
 * Returns the "rest" of the string (i.e. everything after the scan pointer).
 * If there is no more data (eos? = true), it returns <tt>""</tt>.
 */
static VALUE
strscan_rest(self)
    VALUE self;
{
    struct strscanner *p;

    GET_SCANNER(self, p);
    if (EOS_P(p)) {
        return infect(rb_str_new("", 0), p);
    }
    return extract_range(p, p->curr, S_LEN(p));
}

/*
 * <tt>s.rest_size</tt> is equivalent to <tt>s.rest.size</tt>.
 */
static VALUE
strscan_rest_size(self)
    VALUE self;
{
    struct strscanner *p;
    long i;

    GET_SCANNER(self, p);
    if (EOS_P(p)) {
        return INT2FIX(0);
    }
    i = S_LEN(p) - p->curr;
    return INT2FIX(i);
}

/*
 * <tt>s.restsize</tt> is equivalent to <tt>s.rest_size</tt>.
 * This method is obsolete; use #rest_size instead.
 */
static VALUE
strscan_restsize(self)
    VALUE self;
{
    rb_warning("StringScanner#restsize is obsolete; use #rest_size instead");
    return strscan_rest_size(self);
}

#define INSPECT_LENGTH 5
#define BUFSIZE 256

/*
 * Returns a string that represents the StringScanner object, showing:
 * - the current position
 * - the size of the string
 * - the characters surrounding the scan pointer
 *
 *   s = StringScanner.new("Fri Dec 12 1975 14:39")
 *   s.inspect            # -> '#<StringScanner 0/21 @ "Fri D...">'
 *   s.scan_until /12/    # -> "Fri Dec 12"
 *   s.inspect            # -> '#<StringScanner 10/21 "...ec 12" @ " 1975...">'
 */
static VALUE
strscan_inspect(self)
    VALUE self;
{
    struct strscanner *p;
    char buf[BUFSIZE];
    long len;
    VALUE a, b;

    Data_Get_Struct(self, struct strscanner, p);
    if (NIL_P(p->str)) {
        len = snprintf(buf, BUFSIZE, "#<%s (uninitialized)>",
                       rb_class2name(CLASS_OF(self)));
        return infect(rb_str_new(buf, len), p);
    }
    if (EOS_P(p)) {
        len = snprintf(buf, BUFSIZE, "#<%s fin>",
                       rb_class2name(CLASS_OF(self)));
        return infect(rb_str_new(buf, len), p);
    }
    if (p->curr == 0) {
        b = inspect2(p);
        len = snprintf(buf, BUFSIZE, "#<%s %ld/%ld @ %s>",
                       rb_class2name(CLASS_OF(self)),
                       p->curr, S_LEN(p),
                       RSTRING(b)->ptr);
        return infect(rb_str_new(buf, len), p);
    }
    a = inspect1(p);
    b = inspect2(p);
    len = snprintf(buf, BUFSIZE, "#<%s %ld/%ld %s @ %s>",
                   rb_class2name(CLASS_OF(self)),
                   p->curr, S_LEN(p),
                   RSTRING(a)->ptr,
                   RSTRING(b)->ptr);
    return infect(rb_str_new(buf, len), p);
}

static VALUE
inspect1(p)
    struct strscanner *p;
{
    char buf[BUFSIZE];
    char *bp = buf;
    long len;

    if (p->curr == 0) return rb_str_new2("");
    if (p->curr > INSPECT_LENGTH) {
        strcpy(bp, "..."); bp += 3;
        len = INSPECT_LENGTH;
    }
    else {
        len = p->curr;
    }
    memcpy(bp, CURPTR(p) - len, len); bp += len;
    return rb_str_dump(rb_str_new(buf, bp - buf));
}

static VALUE
inspect2(p)
    struct strscanner *p;
{
    char buf[BUFSIZE];
    char *bp = buf;
    long len;

    if (EOS_P(p)) return rb_str_new2("");
    len = S_LEN(p) - p->curr;
    if (len > INSPECT_LENGTH) {
        len = INSPECT_LENGTH;
        memcpy(bp, CURPTR(p), len); bp += len;
        strcpy(bp, "..."); bp += 3;
    }
    else {
        memcpy(bp, CURPTR(p), len); bp += len;
    }
    return rb_str_dump(rb_str_new(buf, bp - buf));
}

/* =======================================================================
                              Ruby Interface
   ======================================================================= */

/*
 * Document-class: StringScanner
 *
 * StringScanner provides for lexical scanning operations on a String.  Here is
 * an example of its usage:
 *
 *   s = StringScanner.new('This is an example string')
 *   s.eos?               # -> false
 *
 *   p s.scan(/\w+/)      # -> "This"
 *   p s.scan(/\w+/)      # -> nil
 *   p s.scan(/\s+/)      # -> " "
 *   p s.scan(/\s+/)      # -> nil
 *   p s.scan(/\w+/)      # -> "is"
 *   s.eos?               # -> false
 *
 *   p s.scan(/\s+/)      # -> " "
 *   p s.scan(/\w+/)      # -> "an"
 *   p s.scan(/\s+/)      # -> " "
 *   p s.scan(/\w+/)      # -> "example"
 *   p s.scan(/\s+/)      # -> " "
 *   p s.scan(/\w+/)      # -> "string"
 *   s.eos?               # -> true
 *
 *   p s.scan(/\s+/)      # -> nil
 *   p s.scan(/\w+/)      # -> nil
 *
 * Scanning a string means remembering the position of a <i>scan pointer</i>,
 * which is just an index.  The point of scanning is to move forward a bit at
 * a time, so matches are sought after the scan pointer; usually immediately
 * after it.
 *
 * Given the string "test string", here are the pertinent scan pointer
 * positions:
 *
 *     t e s t   s t r i n g
 *   0 1 2 ...             1
 *                         0
 *
 * When you #scan for a pattern (a regular expression), the match must occur
 * at the character after the scan pointer.  If you use #scan_until, then the
 * match can occur anywhere after the scan pointer.  In both cases, the scan
 * pointer moves <i>just beyond</i> the last character of the match, ready to
 * scan again from the next character onwards.  This is demonstrated by the
 * example above.
 *
 * == Method Categories
 *
 * There are other methods besides the plain scanners.  You can look ahead in
 * the string without actually scanning.  You can access the most recent match.
 * You can modify the string being scanned, reset or terminate the scanner,
 * find out or change the position of the scan pointer, skip ahead, and so on.
 *
 * === Advancing the Scan Pointer
 *
 * - #getch
 * - #get_byte
 * - #scan
 * - #scan_until
 * - #skip
 * - #skip_until
 *
 * === Looking Ahead
 *
 * - #check
 * - #check_until
 * - #exist?
 * - #match?
 * - #peek
 *
 * === Finding Where we Are
 *
 * - #beginning_of_line? (#bol?)
 * - #eos?
 * - #rest?
 * - #rest_size
 * - #pos
 *
 * === Setting Where we Are
 *
 * - #reset
 * - #terminate
 * - #pos=
 *
 * === Match Data
 *
 * - #matched
 * - #matched?
 * - #matched_size
 * - []
 * - #pre_match
 * - #post_match
 *
 * === Miscellaneous
 *
 * - <<
 * - #concat
 * - #string
 * - #string=
 * - #unscan
 *
 * There are aliases to several of the methods.
 */
void
Init_strscan()
{
    ID id_scanerr = rb_intern("ScanError");
    VALUE tmp;

    StringScanner = rb_define_class("StringScanner", rb_cObject);
    ScanError = rb_define_class_under(StringScanner, "Error", rb_eStandardError);
    if (!rb_const_defined(rb_cObject, id_scanerr)) {
        rb_const_set(rb_cObject, id_scanerr, ScanError);
    }
    tmp = rb_str_new2(STRSCAN_VERSION);
    rb_obj_freeze(tmp);
    rb_const_set(StringScanner, rb_intern("Version"), tmp);
    tmp = rb_str_new2("$Id: strscan.c,v 1.22 2005/10/06 11:11:23 aamine Exp $");
    rb_obj_freeze(tmp);
    rb_const_set(StringScanner, rb_intern("Id"), tmp);

    rb_define_alloc_func(StringScanner, strscan_s_allocate);
    rb_define_private_method(StringScanner, "initialize", strscan_initialize, -1);
    rb_define_private_method(StringScanner, "initialize_copy", strscan_init_copy, 1);
    rb_define_singleton_method(StringScanner, "must_C_version", strscan_s_mustc, 0);
    rb_define_method(StringScanner, "reset",       strscan_reset,       0);
    rb_define_method(StringScanner, "terminate",   strscan_terminate,   0);
    rb_define_method(StringScanner, "clear",       strscan_clear,       0);
    rb_define_method(StringScanner, "string",      strscan_get_string,  0);
    rb_define_method(StringScanner, "string=",     strscan_set_string,  1);
    rb_define_method(StringScanner, "concat",      strscan_concat,      1);
    rb_define_method(StringScanner, "<<",          strscan_concat,      1);
    rb_define_method(StringScanner, "pos",         strscan_get_pos,     0);
    rb_define_method(StringScanner, "pos=",        strscan_set_pos,     1);
    rb_define_method(StringScanner, "pointer",     strscan_get_pos,     0);
    rb_define_method(StringScanner, "pointer=",    strscan_set_pos,     1);

    rb_define_method(StringScanner, "scan",        strscan_scan,        1);
    rb_define_method(StringScanner, "skip",        strscan_skip,        1);
    rb_define_method(StringScanner, "match?",      strscan_match_p,     1);
    rb_define_method(StringScanner, "check",       strscan_check,       1);
    rb_define_method(StringScanner, "scan_full",   strscan_scan_full,   3);

    rb_define_method(StringScanner, "scan_until",  strscan_scan_until,  1);
    rb_define_method(StringScanner, "skip_until",  strscan_skip_until,  1);
    rb_define_method(StringScanner, "exist?",      strscan_exist_p,     1);
    rb_define_method(StringScanner, "check_until", strscan_check_until, 1);
    rb_define_method(StringScanner, "search_full", strscan_search_full, 3);

    rb_define_method(StringScanner, "getch",       strscan_getch,       0);
    rb_define_method(StringScanner, "get_byte",    strscan_get_byte,    0);
    rb_define_method(StringScanner, "getbyte",     strscan_getbyte,     0);
    rb_define_method(StringScanner, "peek",        strscan_peek,        1);
    rb_define_method(StringScanner, "peep",        strscan_peep,        1);

    rb_define_method(StringScanner, "unscan",      strscan_unscan,      0);

    rb_define_method(StringScanner, "beginning_of_line?", strscan_bol_p, 0);
    rb_alias(StringScanner, rb_intern("bol?"), rb_intern("beginning_of_line?"));
    rb_define_method(StringScanner, "eos?",        strscan_eos_p,       0);
    rb_define_method(StringScanner, "empty?",      strscan_empty_p,     0);
    rb_define_method(StringScanner, "rest?",       strscan_rest_p,      0);

    rb_define_method(StringScanner, "matched?",    strscan_matched_p,   0);
    rb_define_method(StringScanner, "matched",     strscan_matched,     0);
    rb_define_method(StringScanner, "matched_size", strscan_matched_size, 0);
    rb_define_method(StringScanner, "matchedsize", strscan_matchedsize, 0);
    rb_define_method(StringScanner, "[]",          strscan_aref,        1);
    rb_define_method(StringScanner, "pre_match",   strscan_pre_match,   0);
    rb_define_method(StringScanner, "post_match",  strscan_post_match,  0);

    rb_define_method(StringScanner, "rest",        strscan_rest,        0);
    rb_define_method(StringScanner, "rest_size",   strscan_rest_size,   0);
    rb_define_method(StringScanner, "restsize",    strscan_restsize,    0);

    rb_define_method(StringScanner, "inspect",     strscan_inspect,     0);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/syck/bytecode.c

root/ext/syck/bytecode.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. sycklex_bytecode_utf8
  2. get_inline
/* Generated by re2c 0.9.10 on Mon Sep 19 23:21:26 2005 */
#line 1 "bytecode.re"
/*
 * bytecode.re
 *
 * $Author: why $
 * $Date: 2005/09/20 06:50:19 $
 *
 * Copyright (C) 2003 why the lucky stiff
 */
#include "ruby.h"
#include "syck.h"
#include "gram.h"

#define QUOTELEN 128

/*
 * They do my bidding...
 */
#define YYCTYPE     char
#define YYCURSOR    parser->cursor
#define YYMARKER    parser->marker
#define YYLIMIT     parser->limit
#define YYTOKEN     parser->token
#define YYTOKTMP    parser->toktmp
#define YYLINEPTR   parser->lineptr
#define YYLINECTPTR parser->linectptr
#define YYLINE      parser->linect
#define YYFILL(n)   syck_parser_read(parser)

extern SyckParser *syck_parser_ptr;

char *get_inline( SyckParser *parser );

/*
 * Repositions the cursor at `n' offset from the token start.
 * Only works in `Header' and `Document' sections.
 */
#define YYPOS(n)    YYCURSOR = YYTOKEN + n

/*
 * Track line numbers
 */
#define CHK_NL(ptr)    if ( *( ptr - 1 ) == '\n' && ptr > YYLINECTPTR ) { YYLINEPTR = ptr; YYLINE++; YYLINECTPTR = YYLINEPTR; }

/*
 * I like seeing the level operations as macros...
 */
#define ADD_LEVEL(len, status)  syck_parser_add_level( parser, len, status )
#define POP_LEVEL()     syck_parser_pop_level( parser )
#define CURRENT_LEVEL() syck_parser_current_level( parser )

/*
 * Force a token next time around sycklex()
 */
#define FORCE_NEXT_TOKEN(tok)    parser->force_token = tok;

/*
 * Adding levels in bytecode requires us to make sure
 * we've got all our tokens worked out.
 */
#define ADD_BYTE_LEVEL(lvl, len, s ) \
        switch ( lvl->status ) \
        { \
            case syck_lvl_seq: \
                lvl->ncount++; \
                ADD_LEVEL(len, syck_lvl_open); \
                YYPOS(0); \
            return '-'; \
        \
            case syck_lvl_map: \
                lvl->ncount++; \
                ADD_LEVEL(len, s); \
            break; \
        \
            case syck_lvl_open: \
                lvl->status = s; \
            break; \
        \
            default: \
                ADD_LEVEL(len, s); \
            break; \
        }

/*
 * Nice little macro to ensure we're YAML_IOPENed to the current level.
 * * Only use this macro in the "Document" section *
 */
#define ENSURE_YAML_IOPEN(last_lvl, lvl_type, to_len, reset) \
        if ( last_lvl->spaces < to_len ) \
        { \
            if ( last_lvl->status == syck_lvl_iseq || last_lvl->status == syck_lvl_imap ) \
            { \
                goto Document; \
            } \
            else \
            { \
                ADD_LEVEL( to_len, lvl_type ); \
                if ( reset == 1 ) YYPOS(0); \
                return YAML_IOPEN; \
            } \
        }

/*
 * Nice little macro to ensure closure of levels.
 * * Only use this macro in the "Document" section *
 */
#define ENSURE_YAML_IEND(last_lvl, to_len) \
        if ( last_lvl->spaces > to_len ) \
        { \
            syck_parser_pop_level( parser ); \
            YYPOS(0); \
            return YAML_IEND; \
        }

/*
 * Concatenates string items and manages allocation
 * to the string
 */
#define CAT(s, c, i, l) \
        { \
            if ( i + 1 >= c ) \
            { \
                c += QUOTELEN; \
                S_REALLOC_N( s, char, c ); \
            } \
            s[i++] = l; \
            s[i] = '\0'; \
        }

/*
 * Parser for standard YAML Bytecode [UTF-8]
 */
int
sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
{
    SyckLevel *lvl;
    syck_parser_ptr = parser;
    if ( YYCURSOR == NULL )
    {
        syck_parser_read( parser );
    }

    if ( parser->force_token != 0 )
    {
        int t = parser->force_token;
        parser->force_token = 0;
        return t;
    }

#line 172 "bytecode.re"

    lvl = CURRENT_LEVEL();
    if ( lvl->status == syck_lvl_doc )
    {
        goto Document;
    }

/* Header: */

    YYTOKEN = YYCURSOR;

#line 165 "<stdout>"
{
        YYCTYPE yych;
        unsigned int yyaccept;
        goto yy0;
        ++YYCURSOR;
yy0:
        if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
        yych = *YYCURSOR;
        switch(yych){
        case 0x00:      goto yy2;
        case 'D':       goto yy3;
        default:        goto yy5;
        }
yy2:    YYCURSOR = YYMARKER;
        switch(yyaccept){
        case 0: goto yy4;
        }
yy3:    yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case 0x0A:      goto yy6;
        case 0x0D:      goto yy8;
        default:        goto yy4;
        }
yy4:
#line 199 "bytecode.re"
{   YYPOS(0);
            goto Document;
        }
#line 195 "<stdout>"
yy5:    yych = *++YYCURSOR;
        goto yy4;
yy6:    ++YYCURSOR;
        goto yy7;
yy7:
#line 186 "bytecode.re"
{   if ( lvl->status == syck_lvl_header )
            {
                CHK_NL(YYCURSOR);
                goto Directive;
            }
            else
            {
                ENSURE_YAML_IEND(lvl, -1);
                YYPOS(0);
                return 0;
            }
        }
#line 214 "<stdout>"
yy8:    ++YYCURSOR;
        switch((yych = *YYCURSOR)) {
        case 0x0A:      goto yy6;
        default:        goto yy2;
        }
}
#line 203 "bytecode.re"

Document:
    {
        lvl = CURRENT_LEVEL();
        if ( lvl->status == syck_lvl_header )
        {
            lvl->status = syck_lvl_doc;
        }

        YYTOKEN = YYCURSOR;

#line 235 "<stdout>"
{
        YYCTYPE yych;
        goto yy9;
        ++YYCURSOR;
yy9:
        if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
        yych = *YYCURSOR;
        switch(yych){
        case 0x00:      goto yy30;
        case 0x0A:      goto yy27;
        case 0x0D:      goto yy29;
        case 'A':       goto yy19;
        case 'D':       goto yy12;
        case 'E':       goto yy16;
        case 'M':       goto yy14;
        case 'P':       goto yy13;
        case 'Q':       goto yy15;
        case 'R':       goto yy21;
        case 'S':       goto yy17;
        case 'T':       goto yy23;
        case 'c':       goto yy25;
        default:        goto yy11;
        }
yy11:yy12:      yych = *++YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy41;
        case 0x0D:      goto yy44;
        default:        goto yy11;
        }
yy13:   yych = *++YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy41;
        case 0x0D:      goto yy43;
        default:        goto yy11;
        }
yy14:   yych = *++YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy38;
        case 0x0D:      goto yy40;
        default:        goto yy11;
        }
yy15:   yych = *++YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy35;
        case 0x0D:      goto yy37;
        default:        goto yy11;
        }
yy16:   yych = *++YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy32;
        case 0x0D:      goto yy34;
        default:        goto yy11;
        }
yy17:   ++YYCURSOR;
        goto yy18;
yy18:
#line 288 "bytecode.re"
{   ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
            goto Scalar;
        }
#line 296 "<stdout>"
yy19:   ++YYCURSOR;
        goto yy20;
yy20:
#line 292 "bytecode.re"
{   ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
            sycklval->name = get_inline( parser );
            syck_hdlr_remove_anchor( parser, sycklval->name );
            CHK_NL(YYCURSOR);
            return YAML_ANCHOR;
        }
#line 307 "<stdout>"
yy21:   ++YYCURSOR;
        goto yy22;
yy22:
#line 299 "bytecode.re"
{   ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
            sycklval->name = get_inline( parser );
            POP_LEVEL();
            if ( *( YYCURSOR - 1 ) == '\n' ) YYCURSOR--;
            return YAML_ALIAS;
        }
#line 318 "<stdout>"
yy23:   ++YYCURSOR;
        goto yy24;
yy24:
#line 306 "bytecode.re"
{   char *qstr;
            ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
            qstr = get_inline( parser );
            CHK_NL(YYCURSOR);
            if ( qstr[0] == '!' )
            {
                int qidx = strlen( qstr );
                if ( qstr[1] == '\0' )
                {
                    free( qstr );
                    return YAML_ITRANSFER;
                }

                lvl = CURRENT_LEVEL();

                /*
                 * URL Prefixing
                 */
                if ( qstr[1] == '^' )
                {
                    sycklval->name = S_ALLOC_N( char, qidx + strlen( lvl->domain ) );
                    sycklval->name[0] = '\0';
                    strcat( sycklval->name, lvl->domain );
                    strncat( sycklval->name, qstr + 2, qidx - 2 );
                    free( qstr );
                }
                else
                {
                    char *carat = qstr + 1;
                    char *qend = qstr + qidx;
                    while ( (++carat) < qend )
                    {
                        if ( *carat == '^' )
                            break;
                    }

                    if ( carat < qend )
                    {
                        free( lvl->domain );
                        lvl->domain = syck_strndup( qstr + 1, carat - ( qstr + 1 ) );
                        sycklval->name = S_ALLOC_N( char, ( qend - carat ) + strlen( lvl->domain ) );
                        sycklval->name[0] = '\0';
                        strcat( sycklval->name, lvl->domain );
                        strncat( sycklval->name, carat + 1, ( qend - carat ) - 1 );
                        free( qstr );
                    }
                    else
                    {
                        sycklval->name = S_ALLOC_N( char, strlen( qstr ) );
                        sycklval->name[0] = '\0';
                        S_MEMCPY( sycklval->name, qstr + 1, char, strlen( qstr ) );
                        free( qstr );
                    }
                }
                return YAML_TRANSFER;
            }
            sycklval->name = qstr;
            return YAML_TAGURI;
        }
#line 382 "<stdout>"
yy25:   ++YYCURSOR;
        goto yy26;
yy26:
#line 366 "bytecode.re"
{   goto Comment; }
#line 388 "<stdout>"
yy27:   ++YYCURSOR;
        goto yy28;
yy28:
#line 368 "bytecode.re"
{   CHK_NL(YYCURSOR);
            if ( lvl->status == syck_lvl_seq )
            {
                return YAML_INDENT;
            }
            else if ( lvl->status == syck_lvl_map )
            {
                if ( lvl->ncount % 2 == 1 ) return ':';
                else                        return YAML_INDENT;
            }
            goto Document;
        }
#line 405 "<stdout>"
yy29:   yych = *++YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy27;
        default:        goto yy11;
        }
yy30:   ++YYCURSOR;
        goto yy31;
yy31:
#line 381 "bytecode.re"
{   ENSURE_YAML_IEND(lvl, -1);
            YYPOS(0);
            return 0;
        }
#line 419 "<stdout>"
yy32:   ++YYCURSOR;
        goto yy33;
yy33:
#line 252 "bytecode.re"
{   if ( lvl->status == syck_lvl_seq && lvl->ncount == 0 )
            {
                lvl->ncount++;
                YYPOS(0);
                FORCE_NEXT_TOKEN( ']' );
                return '[';
            }
            else if ( lvl->status == syck_lvl_map && lvl->ncount == 0 )
            {
                lvl->ncount++;
                YYPOS(0);
                FORCE_NEXT_TOKEN( '}' );
                return '{';
            }

            POP_LEVEL();
            lvl = CURRENT_LEVEL();
            if ( lvl->status == syck_lvl_seq )
            {
                FORCE_NEXT_TOKEN(YAML_INDENT);
            }
            else if ( lvl->status == syck_lvl_map )
            {
                if ( lvl->ncount % 2 == 1 )
                {
                    FORCE_NEXT_TOKEN(':');
                }
                else
                {
                    FORCE_NEXT_TOKEN(YAML_INDENT);
                }
            }
            CHK_NL(YYCURSOR);
            return YAML_IEND;
        }
#line 459 "<stdout>"
yy34:   yych = *++YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy32;
        default:        goto yy11;
        }
yy35:   ++YYCURSOR;
        goto yy36;
yy36:
#line 237 "bytecode.re"
{   int complex = 0;
            if ( lvl->ncount % 2 == 0 && ( lvl->status == syck_lvl_map || lvl->status == syck_lvl_seq ) )
            {
                complex = 1;
            }
            ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_seq);
            CHK_NL(YYCURSOR);
            if ( complex )
            {
                FORCE_NEXT_TOKEN( YAML_IOPEN );
                return '?';
            }
            return YAML_IOPEN;
        }
#line 483 "<stdout>"
yy37:   yych = *++YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy35;
        default:        goto yy11;
        }
yy38:   ++YYCURSOR;
        goto yy39;
yy39:
#line 222 "bytecode.re"
{   int complex = 0;
            if ( lvl->ncount % 2 == 0 && ( lvl->status == syck_lvl_map || lvl->status == syck_lvl_seq ) )
            {
                complex = 1;
            }
            ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_map);
            CHK_NL(YYCURSOR);
            if ( complex )
            {
                FORCE_NEXT_TOKEN( YAML_IOPEN );
                return '?';
            }
            return YAML_IOPEN;
        }
#line 507 "<stdout>"
yy40:   yych = *++YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy38;
        default:        goto yy11;
        }
yy41:   ++YYCURSOR;
        goto yy42;
yy42:
#line 217 "bytecode.re"
{   ENSURE_YAML_IEND(lvl, -1);
                YYPOS(0);
                return 0;
            }
#line 521 "<stdout>"
yy43:   yych = *++YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy41;
        default:        goto yy11;
        }
yy44:   ++YYCURSOR;
        switch((yych = *YYCURSOR)) {
        case 0x0A:      goto yy41;
        default:        goto yy11;
        }
}
#line 386 "bytecode.re"

    }

Directive:
    {
        YYTOKEN = YYCURSOR;

#line 543 "<stdout>"
{
        YYCTYPE yych;
        unsigned int yyaccept;
        goto yy45;
        ++YYCURSOR;
yy45:
        if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
        yych = *YYCURSOR;
        switch(yych){
        case 0x00:      goto yy47;
        case 'V':       goto yy48;
        default:        goto yy50;
        }
yy47:   YYCURSOR = YYMARKER;
        switch(yyaccept){
        case 0: goto yy49;
        }
yy48:   yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case '.':
        case '/':
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':
        case ':':
        case ';':
        case '<':
        case '=':
        case '>':
        case '?':
        case '@':
        case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':
        case '[':
        case '\\':
        case ']':
        case '^':
        case '_':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':       goto yy51;
        default:        goto yy49;
        }
yy49:
#line 399 "bytecode.re"
{   YYCURSOR = YYTOKEN;
               return YAML_DOCSEP;
           }
#line 646 "<stdout>"
yy50:   yych = *++YYCURSOR;
        goto yy49;
yy51:   ++YYCURSOR;
        if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
        yych = *YYCURSOR;
        goto yy52;
yy52:   switch(yych){
        case '.':
        case '/':
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       case ';':
        case '<':
        case '=':
        case '>':
        case '?':
        case '@':
        case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':
        case '[':
        case '\\':
        case ']':
        case '^':
        case '_':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':       goto yy51;
        case ':':       goto yy53;
        default:        goto yy47;
        }
yy53:   yych = *++YYCURSOR;
        switch(yych){
        case '.':
        case '/':
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':
        case ':':
        case ';':
        case '<':
        case '=':
        case '>':
        case '?':
        case '@':
        case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':
        case '[':
        case '\\':
        case ']':
        case '^':
        case '_':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':       goto yy54;
        default:        goto yy47;
        }
yy54:   ++YYCURSOR;
        if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
        yych = *YYCURSOR;
        goto yy55;
yy55:   switch(yych){
        case 0x0A:      goto yy56;
        case 0x0D:      goto yy58;
        case '.':
        case '/':
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':
        case ':':
        case ';':
        case '<':
        case '=':
        case '>':
        case '?':
        case '@':
        case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':
        case '[':
        case '\\':
        case ']':
        case '^':
        case '_':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':       goto yy54;
        default:        goto yy47;
        }
yy56:   ++YYCURSOR;
        goto yy57;
yy57:
#line 396 "bytecode.re"
{   CHK_NL(YYCURSOR);
               goto Directive; }
#line 899 "<stdout>"
yy58:   ++YYCURSOR;
        switch((yych = *YYCURSOR)) {
        case 0x0A:      goto yy56;
        default:        goto yy47;
        }
}
#line 402 "bytecode.re"

    }

Comment:
    {
        YYTOKEN = YYCURSOR;

#line 916 "<stdout>"
{
        YYCTYPE yych;
        goto yy59;
        ++YYCURSOR;
yy59:
        if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
        yych = *YYCURSOR;
        switch(yych){
        case 0x00:      goto yy61;
        case 0x0A:      goto yy62;
        case 0x0D:      goto yy64;
        default:        goto yy66;
        }
yy61:yy62:      ++YYCURSOR;
        goto yy63;
yy63:
#line 412 "bytecode.re"
{   CHK_NL(YYCURSOR);
                goto Document; }
#line 936 "<stdout>"
yy64:   ++YYCURSOR;
        switch((yych = *YYCURSOR)) {
        case 0x0A:      goto yy67;
        default:        goto yy65;
        }
yy65:
#line 415 "bytecode.re"
{   goto Comment; }
#line 945 "<stdout>"
yy66:   yych = *++YYCURSOR;
        goto yy65;
yy67:   ++YYCURSOR;
        yych = *YYCURSOR;
        goto yy63;
}
#line 417 "bytecode.re"

    }

Scalar:
    {
    int idx = 0;
    int cap = 100;
    char *str = S_ALLOC_N( char, cap );
    char *tok;

    str[0] = '\0';

Scalar2:
    tok = YYCURSOR;

#line 970 "<stdout>"
{
        YYCTYPE yych;
        goto yy68;
        ++YYCURSOR;
yy68:
        if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
        yych = *YYCURSOR;
        switch(yych){
        case 0x00:      goto yy74;
        case 0x0A:      goto yy70;
        case 0x0D:      goto yy72;
        default:        goto yy76;
        }
yy70:   ++YYCURSOR;
        switch((yych = *YYCURSOR)) {
        case 'C':       goto yy78;
        case 'N':       goto yy80;
        case 'Z':       goto yy83;
        default:        goto yy71;
        }
yy71:
#line 461 "bytecode.re"
{   YYCURSOR = tok;
            goto ScalarEnd;
        }
#line 996 "<stdout>"
yy72:   ++YYCURSOR;
        switch((yych = *YYCURSOR)) {
        case 0x0A:      goto yy77;
        default:        goto yy73;
        }
yy73:
#line 469 "bytecode.re"
{   CAT(str, cap, idx, tok[0]);
            goto Scalar2;
        }
#line 1007 "<stdout>"
yy74:   ++YYCURSOR;
        goto yy75;
yy75:
#line 465 "bytecode.re"
{   YYCURSOR = tok;
            goto ScalarEnd;
        }
#line 1015 "<stdout>"
yy76:   yych = *++YYCURSOR;
        goto yy73;
yy77:   yych = *++YYCURSOR;
        switch(yych){
        case 'C':       goto yy78;
        case 'N':       goto yy80;
        case 'Z':       goto yy83;
        default:        goto yy71;
        }
yy78:   ++YYCURSOR;
        goto yy79;
yy79:
#line 435 "bytecode.re"
{   CHK_NL(tok+1);
            goto Scalar2; }
#line 1031 "<stdout>"
yy80:   ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy81;
yy81:   switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy80;
        default:        goto yy82;
        }
yy82:
#line 438 "bytecode.re"
{   CHK_NL(tok+1);
            if ( tok + 2 < YYCURSOR )
            {
                char *count = tok + 2;
                int total = strtod( count, NULL );
                int i;
                for ( i = 0; i < total; i++ )
                {
                    CAT(str, cap, idx, '\n');
                }
            }
            else
            {
                CAT(str, cap, idx, '\n');
            }
            goto Scalar2;
        }
#line 1068 "<stdout>"
yy83:   ++YYCURSOR;
        goto yy84;
yy84:
#line 456 "bytecode.re"
{   CHK_NL(tok+1);
            CAT(str, cap, idx, '\0');
            goto Scalar2;
        }
#line 1077 "<stdout>"
}
#line 473 "bytecode.re"

ScalarEnd:
        {
            SyckNode *n = syck_alloc_str();
            n->data.str->ptr = str;
            n->data.str->len = idx;
            sycklval->nodeData = n;
            POP_LEVEL();
            if ( parser->implicit_typing == 1 )
            {
                try_tag_implicit( sycklval->nodeData, parser->taguri_expansion );
            }
            return YAML_PLAIN;
        }
    }

}

char *
get_inline( SyckParser *parser )
{
    int idx = 0;
    int cap = 100;
    char *str = S_ALLOC_N( char, cap );
    char *tok;

    str[0] = '\0';

Inline:
    {
        tok = YYCURSOR;

#line 1114 "<stdout>"
{
        YYCTYPE yych;
        goto yy85;
        ++YYCURSOR;
yy85:
        if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
        yych = *YYCURSOR;
        switch(yych){
        case 0x00:      goto yy91;
        case 0x0A:      goto yy87;
        case 0x0D:      goto yy89;
        default:        goto yy93;
        }
yy87:   ++YYCURSOR;
        goto yy88;
yy88:
#line 508 "bytecode.re"
{   CHK_NL(YYCURSOR);
                return str; }
#line 1134 "<stdout>"
yy89:   ++YYCURSOR;
        switch((yych = *YYCURSOR)) {
        case 0x0A:      goto yy94;
        default:        goto yy90;
        }
yy90:
#line 515 "bytecode.re"
{   CAT(str, cap, idx, tok[0]);
                goto Inline;
            }
#line 1145 "<stdout>"
yy91:   ++YYCURSOR;
        goto yy92;
yy92:
#line 511 "bytecode.re"
{   YYCURSOR = tok;
                return str;
            }
#line 1153 "<stdout>"
yy93:   yych = *++YYCURSOR;
        goto yy90;
yy94:   ++YYCURSOR;
        yych = *YYCURSOR;
        goto yy88;
}
#line 519 "bytecode.re"

    }

}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/syck/emitter.c

root/ext/syck/emitter.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. syck_base64enc
  2. syck_base64dec
  3. syck_new_emitter
  4. syck_st_free_anchors
  5. syck_emitter_st_free
  6. syck_emitter_current_level
  7. syck_emitter_parent_level
  8. syck_emitter_pop_level
  9. syck_emitter_add_level
  10. syck_emitter_reset_levels
  11. syck_emitter_handler
  12. syck_output_handler
  13. syck_free_emitter
  14. syck_emitter_clear
  15. syck_emitter_write
  16. syck_emitter_flush
  17. syck_emit
  18. syck_emit_tag
  19. syck_emit_indent
  20. syck_scan_scalar
  21. syck_emit_scalar
  22. syck_emitter_escape
  23. syck_emit_1quoted
  24. syck_emit_2quoted
  25. syck_emit_literal
  26. syck_emit_folded
  27. syck_emit_seq
  28. syck_emit_map
  29. syck_emit_item
  30. syck_emit_end
  31. syck_emitter_mark_node
/*
 * emitter.c
 *
 * $Author: why $
 * $Date: 2005/09/20 06:50:19 $
 *
 * Copyright (C) 2003 why the lucky stiff
 *
 * All Base64 code from Ruby's pack.c.
 * Ruby is Copyright (C) 1993-2003 Yukihiro Matsumoto
 */
#include "ruby.h"

#include <stdio.h>
#include <string.h>

#include "syck.h"

#define DEFAULT_ANCHOR_FORMAT "id%03d"

const char hex_table[] =
"0123456789ABCDEF";
static char b64_table[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

/*
 * Built-in base64 (from Ruby's pack.c)
 */
char *
syck_base64enc( char *s, long len )
{
    long i = 0;
    int padding = '=';
    char *buff = S_ALLOC_N(char, len * 4 / 3 + 6);

    while (len >= 3) {
        buff[i++] = b64_table[077 & (*s >> 2)];
        buff[i++] = b64_table[077 & (((*s << 4) & 060) | ((s[1] >> 4) & 017))];
        buff[i++] = b64_table[077 & (((s[1] << 2) & 074) | ((s[2] >> 6) & 03))];
        buff[i++] = b64_table[077 & s[2]];
        s += 3;
        len -= 3;
    }
    if (len == 2) {
        buff[i++] = b64_table[077 & (*s >> 2)];
        buff[i++] = b64_table[077 & (((*s << 4) & 060) | ((s[1] >> 4) & 017))];
        buff[i++] = b64_table[077 & (((s[1] << 2) & 074) | (('\0' >> 6) & 03))];
        buff[i++] = padding;
    }
    else if (len == 1) {
        buff[i++] = b64_table[077 & (*s >> 2)];
        buff[i++] = b64_table[077 & (((*s << 4) & 060) | (('\0' >> 4) & 017))];
        buff[i++] = padding;
        buff[i++] = padding;
    }
    buff[i++] = '\n';
    return buff;
}

char *
syck_base64dec( char *s, long len )
{
    int a = -1,b = -1,c = 0,d;
    static int first = 1;
    static int b64_xtable[256];
    char *ptr = syck_strndup( s, len );
    char *end = ptr;
    char *send = s + len;

    if (first) {
        int i;
        first = 0;

        for (i = 0; i < 256; i++) {
        b64_xtable[i] = -1;
        }
        for (i = 0; i < 64; i++) {
        b64_xtable[(int)b64_table[i]] = i;
        }
    }
    while (s < send) {
        while (s[0] == '\r' || s[0] == '\n') { s++; }
        if ((a = b64_xtable[(int)s[0]]) == -1) break;
        if ((b = b64_xtable[(int)s[1]]) == -1) break;
        if ((c = b64_xtable[(int)s[2]]) == -1) break;
        if ((d = b64_xtable[(int)s[3]]) == -1) break;
        *end++ = a << 2 | b >> 4;
        *end++ = b << 4 | c >> 2;
        *end++ = c << 6 | d;
        s += 4;
    }
    if (a != -1 && b != -1) {
        if (s + 2 < send && s[2] == '=')
        *end++ = a << 2 | b >> 4;
        if (c != -1 && s + 3 < send && s[3] == '=') {
        *end++ = a << 2 | b >> 4;
        *end++ = b << 4 | c >> 2;
        }
    }
    *end = '\0';
    /*RSTRING(buf)->len = ptr - RSTRING(buf)->ptr;*/
    return ptr;
}

/*
 * Allocate an emitter
 */
SyckEmitter *
syck_new_emitter()
{
    SyckEmitter *e;
    e = S_ALLOC( SyckEmitter );
    e->headless = 0;
    e->use_header = 0;
    e->use_version = 0;
    e->sort_keys = 0;
    e->anchor_format = NULL;
    e->explicit_typing = 0;
    e->best_width = 80;
    e->style = scalar_none;
    e->stage = doc_open;
    e->indent = 2;
    e->level = -1;
    e->anchors = NULL;
    e->markers = NULL;
    e->anchored = NULL;
    e->bufsize = SYCK_BUFFERSIZE;
    e->buffer = NULL;
    e->marker = NULL;
    e->bufpos = 0;
    e->emitter_handler = NULL;
    e->output_handler = NULL;
    e->lvl_idx = 0;
    e->lvl_capa = ALLOC_CT;
    e->levels = S_ALLOC_N( SyckLevel, e->lvl_capa );
    syck_emitter_reset_levels( e );
    e->bonus = NULL;
    return e;
}

int
syck_st_free_anchors( char *key, char *name, char *arg )
{
    S_FREE( name );
    return ST_CONTINUE;
}

void
syck_emitter_st_free( SyckEmitter *e )
{
    /*
     * Free the anchor tables
     */
    if ( e->anchors != NULL )
    {
        st_foreach( e->anchors, syck_st_free_anchors, 0 );
        st_free_table( e->anchors );
        e->anchors = NULL;
    }

    if ( e->anchored != NULL )
    {
        st_free_table( e->anchored );
        e->anchored = NULL;
    }

    /*
     * Free the markers tables
     */
    if ( e->markers != NULL )
    {
        st_free_table( e->markers );
        e->markers = NULL;
    }
}

SyckLevel *
syck_emitter_current_level( SyckEmitter *e )
{
    return &e->levels[e->lvl_idx-1];
}

SyckLevel *
syck_emitter_parent_level( SyckEmitter *e )
{
    return &e->levels[e->lvl_idx-2];
}

void
syck_emitter_pop_level( SyckEmitter *e )
{
    ASSERT( e != NULL );

    /* The root level should never be popped */
    if ( e->lvl_idx <= 1 ) return;

    e->lvl_idx -= 1;
    free( e->levels[e->lvl_idx].domain );
}

void
syck_emitter_add_level( SyckEmitter *e, int len, enum syck_level_status status )
{
    ASSERT( e != NULL );
    if ( e->lvl_idx + 1 > e->lvl_capa )
    {
        e->lvl_capa += ALLOC_CT;
        S_REALLOC_N( e->levels, SyckLevel, e->lvl_capa );
    }

    ASSERT( len > e->levels[e->lvl_idx-1].spaces );
    e->levels[e->lvl_idx].spaces = len;
    e->levels[e->lvl_idx].ncount = 0;
    e->levels[e->lvl_idx].domain = syck_strndup( e->levels[e->lvl_idx-1].domain, strlen( e->levels[e->lvl_idx-1].domain ) );
    e->levels[e->lvl_idx].status = status;
    e->levels[e->lvl_idx].anctag = 0;
    e->lvl_idx += 1;
}

void
syck_emitter_reset_levels( SyckEmitter *e )
{
    while ( e->lvl_idx > 1 )
    {
        syck_emitter_pop_level( e );
    }

    if ( e->lvl_idx < 1 )
    {
        e->lvl_idx = 1;
        e->levels[0].spaces = -1;
        e->levels[0].ncount = 0;
        e->levels[0].domain = syck_strndup( "", 0 );
        e->levels[0].anctag = 0;
    }
    e->levels[0].status = syck_lvl_header;
}

void
syck_emitter_handler( SyckEmitter *e, SyckEmitterHandler hdlr )
{
    e->emitter_handler = hdlr;
}

void
syck_output_handler( SyckEmitter *e, SyckOutputHandler hdlr )
{
    e->output_handler = hdlr;
}

void
syck_free_emitter( SyckEmitter *e )
{
    /*
     * Free tables
     */
    syck_emitter_st_free( e );
    syck_emitter_reset_levels( e );
    S_FREE( e->levels[0].domain );
    S_FREE( e->levels );
    if ( e->buffer != NULL )
    {
        S_FREE( e->buffer );
    }
    S_FREE( e );
}

void
syck_emitter_clear( SyckEmitter *e )
{
    if ( e->buffer == NULL )
    {
        e->buffer = S_ALLOC_N( char, e->bufsize );
        S_MEMZERO( e->buffer, char, e->bufsize );
    }
    e->buffer[0] = '\0';
    e->marker = e->buffer;
    e->bufpos = 0;
}

/*
 * Raw write to the emitter buffer.
 */
void
syck_emitter_write( SyckEmitter *e, char *str, long len )
{
    long at;
    ASSERT( str != NULL )
    if ( e->buffer == NULL )
    {
        syck_emitter_clear( e );
    }

    /*
     * Flush if at end of buffer
     */
    at = e->marker - e->buffer;
    if ( len + at >= e->bufsize )
    {
        syck_emitter_flush( e, 0 );
        for (;;) {
            long rest = e->bufsize - (e->marker - e->buffer);
            if (len <= rest) break;
            S_MEMCPY( e->marker, str, char, rest );
            e->marker += rest;
            str += rest;
            len -= rest;
            syck_emitter_flush( e, 0 );
        }
    }

    /*
     * Write to buffer
     */
    S_MEMCPY( e->marker, str, char, len );
    e->marker += len;
    e->marker[0] = '\0';
}

/*
 * Write a chunk of data out.
 */
void
syck_emitter_flush( SyckEmitter *e, long check_room )
{
    /*
     * Check for enough space in the buffer for check_room length.
     */
    if ( check_room > 0 )
    {
        if ( e->bufsize > ( e->marker - e->buffer ) + check_room )
        {
            return;
        }
    }
    else
    {
        check_room = e->bufsize;
    }

    /*
     * Commit buffer.
     */
    if ( check_room > e->marker - e->buffer )
    {
        check_room = e->marker - e->buffer;
    }
    (e->output_handler)( e, e->buffer, check_room );
    e->bufpos += check_room;
    e->marker -= check_room;
}

/*
 * Start emitting from the given node, check for anchoring and then
 * issue the callback to the emitter handler.
 */
void
syck_emit( SyckEmitter *e, st_data_t n )
{
    SYMID oid;
    char *anchor_name = NULL;
    int indent = 0;
    long x = 0;
    SyckLevel *lvl = syck_emitter_current_level( e );

    /*
     * Determine headers.
     */
    if ( e->stage == doc_open && ( e->headless == 0 || e->use_header == 1 ) )
    {
        if ( e->use_version == 1 )
        {
            char *header = S_ALLOC_N( char, 64 );
            S_MEMZERO( header, char, 64 );
            sprintf( header, "--- %%YAML:%d.%d ", SYCK_YAML_MAJOR, SYCK_YAML_MINOR );
            syck_emitter_write( e, header, strlen( header ) );
            S_FREE( header );
        }
        else
        {
            syck_emitter_write( e, "--- ", 4 );
        }
        e->stage = doc_processing;
    }

    /* Add new level */
    if ( lvl->spaces >= 0 ) {
        indent = lvl->spaces + e->indent;
    }
    syck_emitter_add_level( e, indent, syck_lvl_open );
    lvl = syck_emitter_current_level( e );

    /* Look for anchor */
    if ( e->anchors != NULL &&
        st_lookup( e->markers, n, (st_data_t *)&oid ) &&
        st_lookup( e->anchors, (st_data_t)oid, (st_data_t *)&anchor_name ) )
    {
        if ( e->anchored == NULL )
        {
            e->anchored = st_init_numtable();
        }

        if ( ! st_lookup( e->anchored, (st_data_t)anchor_name, (st_data_t *)&x ) )
        {
            char *an = S_ALLOC_N( char, strlen( anchor_name ) + 3 );
            sprintf( an, "&%s ", anchor_name );
            syck_emitter_write( e, an, strlen( anchor_name ) + 2 );
            free( an );

            x = 1;
            st_insert( e->anchored, (st_data_t)anchor_name, (st_data_t)x );
            lvl->anctag = 1;
        }
        else
        {
            char *an = S_ALLOC_N( char, strlen( anchor_name ) + 2 );
            sprintf( an, "*%s", anchor_name );
            syck_emitter_write( e, an, strlen( anchor_name ) + 1 );
            free( an );

            goto end_emit;
        }
    }

    (e->emitter_handler)( e, n );

    /* Pop the level */
end_emit:
    syck_emitter_pop_level( e );
    if ( e->lvl_idx == 1 ) {
        syck_emitter_write( e, "\n", 1 );
        e->headless = 0;
        e->stage = doc_open;
    }
}

/*
 * Determine what tag needs to be written, based on the taguri of the node
 * and the implicit tag which would be assigned to this node.  If a tag is
 * required, write the tag.
 */
void syck_emit_tag( SyckEmitter *e, char *tag, char *ignore )
{
    SyckLevel *lvl;
    if ( tag == NULL ) return;
    if ( ignore != NULL && syck_tagcmp( tag, ignore ) == 0 && e->explicit_typing == 0 ) return;
    lvl = syck_emitter_current_level( e );

    /* implicit */
    if ( strlen( tag ) == 0 ) {
        syck_emitter_write( e, "! ", 2 );

    /* global types */
    } else if ( strncmp( tag, "tag:", 4 ) == 0 ) {
        int taglen = strlen( tag );
        syck_emitter_write( e, "!", 1 );
        if ( strncmp( tag + 4, YAML_DOMAIN, strlen( YAML_DOMAIN ) ) == 0 ) {
            int skip = 4 + strlen( YAML_DOMAIN ) + 1;
            syck_emitter_write( e, tag + skip, taglen - skip );
        } else {
            char *subd = tag + 4;
            while ( *subd != ':' && *subd != '\0' ) subd++;
            if ( *subd == ':' ) {
                if ( subd - tag > ( strlen( YAML_DOMAIN ) + 5 ) &&
                     strncmp( subd - strlen( YAML_DOMAIN ), YAML_DOMAIN, strlen( YAML_DOMAIN ) ) == 0 ) {
                    syck_emitter_write( e, tag + 4, subd - strlen( YAML_DOMAIN ) - ( tag + 4 ) - 1 );
                    syck_emitter_write( e, "/", 1 );
                    syck_emitter_write( e, subd + 1, ( tag + taglen ) - ( subd + 1 ) );
                } else {
                    syck_emitter_write( e, tag + 4, subd - ( tag + 4 ) );
                    syck_emitter_write( e, "/", 1 );
                    syck_emitter_write( e, subd + 1, ( tag + taglen ) - ( subd + 1 ) );
                }
            } else {
                /* TODO: Invalid tag (no colon after domain) */
                return;
            }
        }
        syck_emitter_write( e, " ", 1 );

    /* private types */
    } else if ( strncmp( tag, "x-private:", 10 ) == 0 ) {
        syck_emitter_write( e, "!!", 2 );
        syck_emitter_write( e, tag + 10, strlen( tag ) - 10 );
        syck_emitter_write( e, " ", 1 );
    }
    lvl->anctag = 1;
}

/*
 * Emit a newline and an appropriately spaced indent.
 */
void syck_emit_indent( SyckEmitter *e )
{
    int i;
    SyckLevel *lvl = syck_emitter_current_level( e );
    if ( e->bufpos == 0 && ( e->marker - e->buffer ) == 0 ) return;
    if ( lvl->spaces >= 0 ) {
        char *spcs = S_ALLOC_N( char, lvl->spaces + 2 );

        spcs[0] = '\n'; spcs[lvl->spaces + 1] = '\0';
        for ( i = 0; i < lvl->spaces; i++ ) spcs[i+1] = ' ';
        syck_emitter_write( e, spcs, lvl->spaces + 1 );
        free( spcs );
    }
}

/* Clear the scan */
#define SCAN_NONE       0
/* All printable characters? */
#define SCAN_NONPRINT   1
/* Any indented lines? */
#define SCAN_INDENTED   2
/* Larger than the requested width? */
#define SCAN_WIDE       4
/* Opens or closes with whitespace? */
#define SCAN_WHITEEDGE  8
/* Contains a newline */
#define SCAN_NEWLINE    16
/* Contains a single quote */
#define SCAN_SINGLEQ    32
/* Contains a double quote */
#define SCAN_DOUBLEQ    64
/* Starts with a token */
#define SCAN_INDIC_S    128
/* Contains a flow indicator */
#define SCAN_INDIC_C    256
/* Ends without newlines */
#define SCAN_NONL_E     512
/* Ends with many newlines */
#define SCAN_MANYNL_E   1024
/* Contains flow map indicators */
#define SCAN_FLOWMAP    2048
/* Contains flow seq indicators */
#define SCAN_FLOWSEQ    4096
/* Contains a valid doc separator */
#define SCAN_DOCSEP     8192

/*
 * Basic printable test for LATIN-1 characters.
 */
int
syck_scan_scalar( int req_width, char *cursor, long len )
{
    long i = 0, start = 0;
    int flags = SCAN_NONE;

    if ( len < 1 )  return flags;

    /* c-indicators from the spec */
    if ( cursor[0] == '[' || cursor[0] == ']' ||
         cursor[0] == '{' || cursor[0] == '}' ||
         cursor[0] == '!' || cursor[0] == '*' ||
         cursor[0] == '&' || cursor[0] == '|' ||
         cursor[0] == '>' || cursor[0] == '\'' ||
         cursor[0] == '"' || cursor[0] == '#' ||
         cursor[0] == '%' || cursor[0] == '@' ||
         cursor[0] == '&' ) {
            flags |= SCAN_INDIC_S;
    }
    if ( ( cursor[0] == '-' || cursor[0] == ':' ||
           cursor[0] == '?' || cursor[0] == ',' ) &&
           ( cursor[1] == ' ' || cursor[1] == '\n' || len == 1 ) )
    {
            flags |= SCAN_INDIC_S;
    }

    /* whitespace edges */
    if ( cursor[len-1] != '\n' ) {
        flags |= SCAN_NONL_E;
    } else if ( len > 1 && cursor[len-2] == '\n' ) {
        flags |= SCAN_MANYNL_E;
    }
    if (
        ( len > 0 && ( cursor[0] == ' ' || cursor[0] == '\t' ) ) ||
        ( len > 1 && ( cursor[len-1] == ' ' || cursor[len-1] == '\t' ) )
    ) {
        flags |= SCAN_WHITEEDGE;
    }

    /* opening doc sep */
    if ( len >= 3 && strncmp( cursor, "---", 3 ) == 0 )
        flags |= SCAN_DOCSEP;

    /* scan string */
    for ( i = 0; i < len; i++ ) {

        if ( ! ( cursor[i] == 0x9 ||
                 cursor[i] == 0xA ||
                 cursor[i] == 0xD ||
               ( cursor[i] >= 0x20 && cursor[i] <= 0x7E ) )
        ) {
            flags |= SCAN_NONPRINT;
        }
        else if ( cursor[i] == '\n' ) {
            flags |= SCAN_NEWLINE;
            if ( len - i >= 3 && strncmp( &cursor[i+1], "---", 3 ) == 0 )
                flags |= SCAN_DOCSEP;
            if ( cursor[i+1] == ' ' || cursor[i+1] == '\t' )
                flags |= SCAN_INDENTED;
            if ( req_width > 0 && i - start > req_width )
                flags |= SCAN_WIDE;
            start = i;
        }
        else if ( cursor[i] == '\'' )
        {
            flags |= SCAN_SINGLEQ;
        }
        else if ( cursor[i] == '"' )
        {
            flags |= SCAN_DOUBLEQ;
        }
        else if ( cursor[i] == ']' )
        {
            flags |= SCAN_FLOWSEQ;
        }
        else if ( cursor[i] == '}' )
        {
            flags |= SCAN_FLOWMAP;
        }
        /* remember, if plain collections get implemented, to add nb-plain-flow-char */
        else if ( ( cursor[i] == ' ' && cursor[i+1] == '#' ) ||
                  ( cursor[i] == ':' &&
                    ( cursor[i+1] == ' ' || cursor[i+1] == '\n' || i == len - 1 ) ) )
        {
            flags |= SCAN_INDIC_C;
        }
        else if ( cursor[i] == ',' &&
                  ( cursor[i+1] == ' ' || cursor[i+1] == '\n' || i == len - 1 ) )
        {
            flags |= SCAN_FLOWMAP;
            flags |= SCAN_FLOWSEQ;
        }
    }

    /* printf( "---STR---\n%s\nFLAGS: %d\n", cursor, flags ); */
    return flags;
}
/*
 * All scalars should be emitted through this function, which determines an appropriate style,
 * tag and indent.
 */
void syck_emit_scalar( SyckEmitter *e, char *tag, enum scalar_style force_style, int force_indent, int force_width,
                       char keep_nl, char *str, long len )
{
    enum scalar_style favor_style = scalar_literal;
    SyckLevel *parent = syck_emitter_parent_level( e );
    SyckLevel *lvl = syck_emitter_current_level( e );
    int scan = 0;
    char *implicit;

    if ( str == NULL ) str = "";

    /* No empty nulls as map keys */
    if ( len == 0 && ( parent->status == syck_lvl_map || parent->status == syck_lvl_imap ) &&
         parent->ncount % 2 == 1 && syck_tagcmp( tag, "tag:yaml.org,2002:null" ) == 0 )
    {
        str = "~";
        len = 1;
    }

    scan = syck_scan_scalar( force_width, str, len );
    implicit = syck_match_implicit( str, len );

    /* quote strings which default to implicits */
    implicit = syck_taguri( YAML_DOMAIN, implicit, strlen( implicit ) );
    if ( syck_tagcmp( tag, implicit ) != 0 && syck_tagcmp( tag, "tag:yaml.org,2002:str" ) == 0 ) {
        force_style = scalar_2quote;
    } else {
        /* complex key */
        if ( parent->status == syck_lvl_map && parent->ncount % 2 == 1 &&
             ( !( tag == NULL ||
             ( implicit != NULL && syck_tagcmp( tag, implicit ) == 0 && e->explicit_typing == 0 ) ) ) )
        {
            syck_emitter_write( e, "? ", 2 );
            parent->status = syck_lvl_mapx;
        }
        syck_emit_tag( e, tag, implicit );
    }
    S_FREE( implicit );

    /* if still arbitrary, sniff a good block style. */
    if ( force_style == scalar_none ) {
        if ( scan & SCAN_NEWLINE ) {
            force_style = scalar_literal;
        } else {
            force_style = scalar_plain;
        }
    }

    if ( e->style == scalar_fold ) {
        favor_style = scalar_fold;
    }

    /* Determine block style */
    if ( scan & SCAN_NONPRINT ) {
        force_style = scalar_2quote;
    } else if ( scan & SCAN_WHITEEDGE ) {
        force_style = scalar_2quote;
    } else if ( force_style != scalar_fold && ( scan & SCAN_INDENTED ) ) {
        force_style = scalar_literal;
    } else if ( force_style == scalar_plain && ( scan & SCAN_NEWLINE ) ) {
        force_style = favor_style;
    } else if ( force_style == scalar_plain && parent->status == syck_lvl_iseq && ( scan & SCAN_FLOWSEQ ) ) {
        force_style = scalar_2quote;
    } else if ( force_style == scalar_plain && parent->status == syck_lvl_imap && ( scan & SCAN_FLOWMAP ) ) {
        force_style = scalar_2quote;
    /* } else if ( force_style == scalar_fold && ( ! ( scan & SCAN_WIDE ) ) ) {
        force_style = scalar_literal; */
    } else if ( force_style == scalar_plain && ( scan & SCAN_INDIC_S || scan & SCAN_INDIC_C ) ) {
        if ( scan & SCAN_NEWLINE ) {
            force_style = favor_style;
        } else {
            force_style = scalar_2quote;
        }
    }

    if ( force_indent > 0 ) {
        lvl->spaces = parent->spaces + force_indent;
    } else if ( scan & SCAN_DOCSEP ) {
        lvl->spaces = parent->spaces + e->indent;
    }

    /* For now, all ambiguous keys are going to be double-quoted */
    if ( ( parent->status == syck_lvl_map || parent->status == syck_lvl_mapx ) && parent->ncount % 2 == 1 ) {
        if ( force_style != scalar_plain ) {
            force_style = scalar_2quote;
        }
    }

    /* If the parent is an inline, double quote anything complex */
    if ( parent->status == syck_lvl_imap || parent->status == syck_lvl_iseq ) {
        if ( force_style != scalar_plain && force_style != scalar_1quote ) {
            force_style = scalar_2quote;
        }
    }

    /* Fix the ending newlines */
    if ( scan & SCAN_NONL_E ) {
        keep_nl = NL_CHOMP;
    } else if ( scan & SCAN_MANYNL_E ) {
        keep_nl = NL_KEEP;
    }

    /* Write the text node */
    switch ( force_style )
    {
        case scalar_1quote:
            syck_emit_1quoted( e, force_width, str, len );
        break;

        case scalar_none:
        case scalar_2quote:
            syck_emit_2quoted( e, force_width, str, len );
        break;

        case scalar_fold:
            syck_emit_folded( e, force_width, keep_nl, str, len );
        break;

        case scalar_literal:
            syck_emit_literal( e, keep_nl, str, len );
        break;

        case scalar_plain:
            syck_emitter_write( e, str, len );
        break;
    }

    if ( parent->status == syck_lvl_mapx )
    {
        syck_emitter_write( e, "\n", 1 );
    }
}

void
syck_emitter_escape( SyckEmitter *e, char *src, long len )
{
    int i;
    for( i = 0; i < len; i++ )
    {
        if( (src[i] < 0x20) || (0x7E < src[i]) )
        {
            syck_emitter_write( e, "\\", 1 );
            if( '\0' == src[i] )
                syck_emitter_write( e, "0", 1 );
            else
            {
                syck_emitter_write( e, "x", 1 );
                syck_emitter_write( e, (char *)hex_table + ((src[i] & 0xF0) >> 4), 1 );
                syck_emitter_write( e, (char *)hex_table + (src[i] & 0x0F), 1 );
            }
        }
        else
        {
            syck_emitter_write( e, src + i, 1 );
            if( '\\' == src[i] )
                syck_emitter_write( e, "\\", 1 );
        }
    }
}

/*
 * Outputs a single-quoted block.
 */
void syck_emit_1quoted( SyckEmitter *e, int width, char *str, long len )
{
    char do_indent = 0;
    char *mark = str;
    char *start = str;
    char *end = str;
    syck_emitter_write( e, "'", 1 );
    while ( mark < str + len ) {
        if ( do_indent ) {
            syck_emit_indent( e );
            do_indent = 0;
        }
        switch ( *mark ) {
            case '\'':  syck_emitter_write( e, "'", 1 ); break;

            case '\n':
                end = mark + 1;
                if ( *start != ' ' && *start != '\n' && *end != '\n' && *end != ' ' ) {
                    syck_emitter_write( e, "\n\n", 2 );
                } else {
                    syck_emitter_write( e, "\n", 1 );
                }
                do_indent = 1;
                start = mark + 1;
            break;

            case ' ':
                if ( width > 0 && *start != ' ' && mark - end > width ) {
                    do_indent = 1;
                    end = mark + 1;
                } else {
                    syck_emitter_write( e, " ", 1 );
                }
            break;

            default:
                syck_emitter_write( e, mark, 1 );
            break;
        }
        mark++;
    }
    syck_emitter_write( e, "'", 1 );
}

/*
 * Outputs a double-quoted block.
 */
void syck_emit_2quoted( SyckEmitter *e, int width, char *str, long len )
{
    char do_indent = 0;
    char *mark = str;
    char *start = str;
    char *end = str;
    syck_emitter_write( e, "\"", 1 );
    while ( mark < str + len ) {
        if ( do_indent > 0 ) {
            if ( do_indent == 2 ) {
                syck_emitter_write( e, "\\", 1 );
            }
            syck_emit_indent( e );
            do_indent = 0;
        }
        switch ( *mark ) {

            /* Escape sequences allowed within double quotes. */
            case '"':  syck_emitter_write( e, "\\\"", 2 ); break;
            case '\\': syck_emitter_write( e, "\\\\", 2 ); break;
            case '\0': syck_emitter_write( e, "\\0",  2 ); break;
            case '\a': syck_emitter_write( e, "\\a",  2 ); break;
            case '\b': syck_emitter_write( e, "\\b",  2 ); break;
            case '\f': syck_emitter_write( e, "\\f",  2 ); break;
            case '\r': syck_emitter_write( e, "\\r",  2 ); break;
            case '\t': syck_emitter_write( e, "\\t",  2 ); break;
            case '\v': syck_emitter_write( e, "\\v",  2 ); break;
            case 0x1b: syck_emitter_write( e, "\\e",  2 ); break;

            case '\n':
                end = mark + 1;
                syck_emitter_write( e, "\\n", 2 );
                do_indent = 2;
                start = mark + 1;
                if ( start < str + len && ( *start == ' ' || *start == '\n' ) ) {
                    do_indent = 0;
                }
            break;

            case ' ':
                if ( width > 0 && *start != ' ' && mark - end > width ) {
                    do_indent = 1;
                    end = mark + 1;
                } else {
                    syck_emitter_write( e, " ", 1 );
                }
            break;

            default:
                syck_emitter_escape( e, mark, 1 );
            break;
        }
        mark++;
    }
    syck_emitter_write( e, "\"", 1 );
}

/*
 * Outputs a literal block.
 */
void syck_emit_literal( SyckEmitter *e, char keep_nl, char *str, long len )
{
    char *mark = str;
    char *start = str;
    char *end = str;
    syck_emitter_write( e, "|", 1 );
    if ( keep_nl == NL_CHOMP ) {
        syck_emitter_write( e, "-", 1 );
    } else if ( keep_nl == NL_KEEP ) {
        syck_emitter_write( e, "+", 1 );
    }
    syck_emit_indent( e );
    while ( mark < str + len ) {
        if ( *mark == '\n' ) {
            end = mark;
            if ( *start != ' ' && *start != '\n' && *end != '\n' && *end != ' ' ) end += 1;
            syck_emitter_write( e, start, end - start );
            if ( mark + 1 == str + len ) {
                if ( keep_nl != NL_KEEP ) syck_emitter_write( e, "\n", 1 );
            } else {
                syck_emit_indent( e );
            }
            start = mark + 1;
        }
        mark++;
    }
    end = str + len;
    if ( start < end ) {
        syck_emitter_write( e, start, end - start );
    }
}

/*
 * Outputs a folded block.
 */
void syck_emit_folded( SyckEmitter *e, int width, char keep_nl, char *str, long len )
{
    char *mark = str;
    char *start = str;
    char *end = str;
    syck_emitter_write( e, ">", 1 );
    if ( keep_nl == NL_CHOMP ) {
        syck_emitter_write( e, "-", 1 );
    } else if ( keep_nl == NL_KEEP ) {
        syck_emitter_write( e, "+", 1 );
    }
    syck_emit_indent( e );
    if ( width <= 0 ) width = e->best_width;
    while ( mark < str + len ) {
        switch ( *mark ) {
            case '\n':
                syck_emitter_write( e, end, mark - end );
                end = mark + 1;
                if ( *start != ' ' && *start != '\n' && *end != '\n' && *end != ' ' ) {
                    syck_emitter_write( e, "\n", 1 );
                }
                if ( mark + 1 == str + len ) {
                    if ( keep_nl != NL_KEEP ) syck_emitter_write( e, "\n", 1 );
                } else {
                    syck_emit_indent( e );
                }
                start = mark + 1;
            break;

            case ' ':
                if ( *start != ' ' ) {
                    if ( mark - end > width ) {
                        syck_emitter_write( e, end, mark - end );
                        syck_emit_indent( e );
                        end = mark + 1;
                    }
                }
            break;
        }
        mark++;
    }
    if ( end < mark ) {
        syck_emitter_write( e, end, mark - end );
    }
}

/*
 * Begins emission of a sequence.
 */
void syck_emit_seq( SyckEmitter *e, char *tag, enum seq_style style )
{
    SyckLevel *parent = syck_emitter_parent_level( e );
    SyckLevel *lvl = syck_emitter_current_level( e );
    syck_emit_tag( e, tag, "tag:yaml.org,2002:seq" );
    if ( style == seq_inline || ( parent->status == syck_lvl_imap || parent->status == syck_lvl_iseq ) ) {
        syck_emitter_write( e, "[", 1 );
        lvl->status = syck_lvl_iseq;
    } else {
        lvl->status = syck_lvl_seq;
    }
}

/*
 * Begins emission of a mapping.
 */
void syck_emit_map( SyckEmitter *e, char *tag, enum map_style style )
{
    SyckLevel *parent = syck_emitter_parent_level( e );
    SyckLevel *lvl = syck_emitter_current_level( e );
    syck_emit_tag( e, tag, "tag:yaml.org,2002:map" );
    if ( style == map_inline || ( parent->status == syck_lvl_imap || parent->status == syck_lvl_iseq ) ) {
        syck_emitter_write( e, "{", 1 );
        lvl->status = syck_lvl_imap;
    } else {
        lvl->status = syck_lvl_map;
    }
}

/*
 * Handles emitting of a collection item (for both
 * sequences and maps)
 */
void syck_emit_item( SyckEmitter *e, st_data_t n )
{
    SyckLevel *lvl = syck_emitter_current_level( e );
    switch ( lvl->status )
    {
        case syck_lvl_seq:
        {
            SyckLevel *parent = syck_emitter_parent_level( e );

            /* seq-in-map shortcut */
            if ( parent->status == syck_lvl_map && lvl->ncount == 0 ) {
                /* complex key */
                if ( parent->ncount % 2 == 1 ) {
                    syck_emitter_write( e, "?", 1 );
                    parent->status = syck_lvl_mapx;
                /* shortcut -- the lvl->anctag check should be unneccesary but
                 * there is a nasty shift/reduce in the parser on this point and
                 * i'm not ready to tickle it. */
                } else if ( lvl->anctag == 0 ) {
                    lvl->spaces = parent->spaces;
                }
            }

            /* seq-in-seq shortcut */
            else if ( lvl->anctag == 0 && parent->status == syck_lvl_seq && lvl->ncount == 0 ) {
                int spcs = ( lvl->spaces - parent->spaces ) - 2;
                if ( spcs >= 0 ) {
                    int i = 0;
                    for ( i = 0; i < spcs; i++ ) {
                        syck_emitter_write( e, " ", 1 );
                    }
                    syck_emitter_write( e, "- ", 2 );
                    break;
                }
            }

            syck_emit_indent( e );
            syck_emitter_write( e, "- ", 2 );
        }
        break;

        case syck_lvl_iseq:
        {
            if ( lvl->ncount > 0 ) {
                syck_emitter_write( e, ", ", 2 );
            }
        }
        break;

        case syck_lvl_map:
        {
            SyckLevel *parent = syck_emitter_parent_level( e );

            /* map-in-map */
            if ( parent->status == syck_lvl_map && lvl->ncount == 0 ) {
                /* complex key */
                if ( parent->ncount % 2 == 1 ) {
                    syck_emitter_write( e, "?", 1 );
                    parent->status = syck_lvl_mapx;
                }
            }

            /* map-in-seq shortcut */
            if ( lvl->anctag == 0 && parent->status == syck_lvl_seq && lvl->ncount == 0 ) {
                int spcs = ( lvl->spaces - parent->spaces ) - 2;
                if ( spcs >= 0 ) {
                    int i = 0;
                    for ( i = 0; i < spcs; i++ ) {
                        syck_emitter_write( e, " ", 1 );
                    }
                    break;
                }
            }

            if ( lvl->ncount % 2 == 0 ) {
                syck_emit_indent( e );
            } else {
                syck_emitter_write( e, ": ", 2 );
            }
        }
        break;

        case syck_lvl_mapx:
        {
            if ( lvl->ncount % 2 == 0 ) {
                syck_emit_indent( e );
                lvl->status = syck_lvl_map;
            } else {
                int i;
                if ( lvl->spaces > 0 ) {
                    char *spcs = S_ALLOC_N( char, lvl->spaces + 1 );

                    spcs[lvl->spaces] = '\0';
                    for ( i = 0; i < lvl->spaces; i++ ) spcs[i] = ' ';
                    syck_emitter_write( e, spcs, lvl->spaces );
                    S_FREE( spcs );
                }
                syck_emitter_write( e, ": ", 2 );
            }
        }
        break;

        case syck_lvl_imap:
        {
            if ( lvl->ncount > 0 ) {
                if ( lvl->ncount % 2 == 0 ) {
                    syck_emitter_write( e, ", ", 2 );
                } else {
                    syck_emitter_write( e, ": ", 2 );
                }
            }
        }
        break;

        default: break;
    }
    lvl->ncount++;

    syck_emit( e, n );
}

/*
 * Closes emission of a collection.
 */
void syck_emit_end( SyckEmitter *e )
{
    SyckLevel *lvl = syck_emitter_current_level( e );
    SyckLevel *parent = syck_emitter_parent_level( e );
    switch ( lvl->status )
    {
        case syck_lvl_seq:
            if ( lvl->ncount == 0 ) {
                syck_emitter_write( e, "[]\n", 3 );
            } else if ( parent->status == syck_lvl_mapx ) {
                syck_emitter_write( e, "\n", 1 );
            }
        break;

        case syck_lvl_iseq:
            syck_emitter_write( e, "]\n", 1 );
        break;

        case syck_lvl_map:
            if ( lvl->ncount == 0 ) {
                syck_emitter_write( e, "{}\n", 3 );
            } else if ( lvl->ncount % 2 == 1 ) {
                syck_emitter_write( e, ":\n", 1 );
            } else if ( parent->status == syck_lvl_mapx ) {
                syck_emitter_write( e, "\n", 1 );
            }
        break;

        case syck_lvl_imap:
            syck_emitter_write( e, "}\n", 1 );
        break;

        default: break;
    }
}

/*
 * Fill markers table with emitter nodes in the
 * soon-to-be-emitted tree.
 */
SYMID
syck_emitter_mark_node( SyckEmitter *e, st_data_t n )
{
    SYMID oid = 0;
    char *anchor_name = NULL;

    /*
     * Ensure markers table is initialized.
     */
    if ( e->markers == NULL )
    {
        e->markers = st_init_numtable();
    }

    /*
     * Markers table initially marks the string position of the
     * object.  Doesn't yet create an anchor, simply notes the
     * position.
     */
    if ( ! st_lookup( e->markers, n, (st_data_t *)&oid ) )
    {
        /*
         * Store all markers
         */
        oid = e->markers->num_entries + 1;
        st_insert( e->markers, n, (st_data_t)oid );
    }
    else
    {
        if ( e->anchors == NULL )
        {
            e->anchors = st_init_numtable();
        }

        if ( ! st_lookup( e->anchors, (st_data_t)oid, (st_data_t *)&anchor_name ) )
        {
            int idx = 0;
            char *anc = ( e->anchor_format == NULL ? DEFAULT_ANCHOR_FORMAT : e->anchor_format );

            /*
             * Second time hitting this object, let's give it an anchor
             */
            idx = e->anchors->num_entries + 1;
            anchor_name = S_ALLOC_N( char, strlen( anc ) + 10 );
            S_MEMZERO( anchor_name, char, strlen( anc ) + 10 );
            sprintf( anchor_name, anc, idx );

            /*
             * Insert into anchors table
             */
            st_insert( e->anchors, (st_data_t)oid, (st_data_t)anchor_name );
        }
    }
    return oid;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/syck/gram.c

root/ext/syck/gram.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. YYSTYPE
  2. yy_stack_print
  3. yy_reduce_print
  4. yystrlen
  5. yystpcpy
  6. yysymprint
  7. yydestruct
  8. yyparse
  9. apply_seq_in_map
/* A Bison parser, made by GNU Bison 1.875d.  */

/* Skeleton parser for Yacc-like parsing with Bison,
   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.  */

/* As a special exception, when this file is copied by Bison into a
   Bison output file, you may use that output file without restriction.
   This special exception was added by the Free Software Foundation
   in version 1.24 of Bison.  */

/* Written by Richard Stallman by simplifying the original so called
   ``semantic'' parser.  */

/* All symbols defined below should begin with yy or YY, to avoid
   infringing on user name space.  This should be done even for local
   variables, as they might otherwise be expanded by user macros.
   There are some unavoidable exceptions within include files to
   define necessary library symbols; they are noted "INFRINGES ON
   USER NAME SPACE" below.  */

/* Identify Bison output.  */
#define YYBISON 1

/* Skeleton name.  */
#define YYSKELETON_NAME "yacc.c"

/* Pure parsers.  */
#define YYPURE 1

/* Using locations.  */
#define YYLSP_NEEDED 0

/* If NAME_PREFIX is specified substitute the variables and functions
   names.  */
#define yyparse syckparse
#define yylex   sycklex
#define yyerror syckerror
#define yylval  sycklval
#define yychar  syckchar
#define yydebug syckdebug
#define yynerrs sycknerrs

/* Tokens.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
   /* Put the tokens into the symbol table, so that GDB and other debuggers
      know about them.  */
   enum yytokentype {
     YAML_ANCHOR = 258,
     YAML_ALIAS = 259,
     YAML_TRANSFER = 260,
     YAML_TAGURI = 261,
     YAML_ITRANSFER = 262,
     YAML_WORD = 263,
     YAML_PLAIN = 264,
     YAML_BLOCK = 265,
     YAML_DOCSEP = 266,
     YAML_IOPEN = 267,
     YAML_INDENT = 268,
     YAML_IEND = 269
   };
#endif
#define YAML_ANCHOR 258
#define YAML_ALIAS 259
#define YAML_TRANSFER 260
#define YAML_TAGURI 261
#define YAML_ITRANSFER 262
#define YAML_WORD 263
#define YAML_PLAIN 264
#define YAML_BLOCK 265
#define YAML_DOCSEP 266
#define YAML_IOPEN 267
#define YAML_INDENT 268
#define YAML_IEND 269

/* Copy the first part of user declarations.  */
#line 14 "gram.y"

#include "syck.h"

void apply_seq_in_map( SyckParser *parser, SyckNode *n );

#define YYPARSE_PARAM   parser
#define YYLEX_PARAM     parser

#define NULL_NODE(parser, node) \
        SyckNode *node = syck_new_str( "", scalar_plain ); \
        if ( ((SyckParser *)parser)->taguri_expansion == 1 ) \
        { \
            node->type_id = syck_taguri( YAML_DOMAIN, "null", 4 ); \
        } \
        else \
        { \
            node->type_id = syck_strndup( "null", 4 ); \
        }

/* Enabling traces.  */
#ifndef YYDEBUG
# define YYDEBUG 1
#endif

/* Enabling verbose error messages.  */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif

#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
#line 35 "gram.y"
typedef union YYSTYPE {
    SYMID nodeId;
    SyckNode *nodeData;
    char *name;
} YYSTYPE;
/* Line 191 of yacc.c.  */
#line 140 "gram.c"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif

/* Copy the second part of user declarations.  */

/* Line 214 of yacc.c.  */
#line 152 "gram.c"

#if ! defined (yyoverflow) || YYERROR_VERBOSE

# ifndef YYFREE
#  define YYFREE free
# endif
# ifndef YYMALLOC
#  define YYMALLOC malloc
# endif

/* The parser invokes alloca or malloc; define the necessary symbols.  */

# ifdef YYSTACK_USE_ALLOCA
#  if YYSTACK_USE_ALLOCA
#   define YYSTACK_ALLOC alloca
#  endif
# else
#  if defined (alloca) || defined (_ALLOCA_H)
#   define YYSTACK_ALLOC alloca
#  else
#   ifdef __GNUC__
#    define YYSTACK_ALLOC __builtin_alloca
#   endif
#  endif
# endif

# ifdef YYSTACK_ALLOC
   /* Pacify GCC's `empty if-body' warning. */
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# else
#  if defined (__STDC__) || defined (__cplusplus)
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
#   define YYSIZE_T size_t
#  endif
#  define YYSTACK_ALLOC YYMALLOC
#  define YYSTACK_FREE YYFREE
# endif
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */

#if (! defined (yyoverflow) \
     && (! defined (__cplusplus) \
         || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))

/* A type that is properly aligned for any stack member.  */
union yyalloc
{
  short int yyss;
  YYSTYPE yyvs;
  };

/* The size of the maximum gap between one aligned stack and the next.  */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)

/* The size of an array large to enough to hold all stacks, each with
   N elements.  */
# define YYSTACK_BYTES(N) \
     ((N) * (sizeof (short int) + sizeof (YYSTYPE))                     \
      + YYSTACK_GAP_MAXIMUM)

/* Copy COUNT objects from FROM to TO.  The source and destination do
   not overlap.  */
# ifndef YYCOPY
#  if defined (__GNUC__) && 1 < __GNUC__
#   define YYCOPY(To, From, Count) \
      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
#  else
#   define YYCOPY(To, From, Count)              \
      do                                        \
        {                                       \
          register YYSIZE_T yyi;                \
          for (yyi = 0; yyi < (Count); yyi++)   \
            (To)[yyi] = (From)[yyi];            \
        }                                       \
      while (0)
#  endif
# endif

/* Relocate STACK from its old location to the new one.  The
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
   elements in the stack, and YYPTR gives the new location of the
   stack.  Advance YYPTR to a properly aligned location for the next
   stack.  */
# define YYSTACK_RELOCATE(Stack)                                        \
    do                                                                  \
      {                                                                 \
        YYSIZE_T yynewbytes;                                            \
        YYCOPY (&yyptr->Stack, Stack, yysize);                          \
        Stack = &yyptr->Stack;                                          \
        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
        yyptr += yynewbytes / sizeof (*yyptr);                          \
      }                                                                 \
    while (0)

#endif

#if defined (__STDC__) || defined (__cplusplus)
   typedef signed char yysigned_char;
#else
   typedef short int yysigned_char;
#endif

/* YYFINAL -- State number of the termination state. */
#define YYFINAL  52
/* YYLAST -- Last index in YYTABLE.  */
#define YYLAST   396

/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS  23
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS  29
/* YYNRULES -- Number of rules. */
#define YYNRULES  79
/* YYNRULES -- Number of states. */
#define YYNSTATES  128

/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
#define YYUNDEFTOK  2
#define YYMAXUTOK   269

#define YYTRANSLATE(YYX)                                                \
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
static const unsigned char yytranslate[] =
{
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,    21,    15,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,    16,     2,
       2,     2,     2,    22,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,    17,     2,    18,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,    19,     2,    20,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
       5,     6,     7,     8,     9,    10,    11,    12,    13,    14
};

#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
   YYRHS.  */
static const unsigned char yyprhs[] =
{
       0,     0,     3,     5,     8,     9,    11,    13,    15,    18,
      21,    24,    28,    30,    32,    36,    37,    40,    43,    46,
      49,    51,    54,    56,    58,    60,    63,    66,    69,    72,
      75,    77,    79,    81,    85,    87,    89,    91,    93,    95,
      99,   103,   106,   110,   113,   117,   120,   124,   127,   129,
     133,   136,   140,   143,   145,   149,   151,   153,   157,   161,
     165,   168,   172,   175,   179,   182,   184,   188,   190,   194,
     196,   200,   204,   207,   211,   215,   218,   220,   224,   226
};

/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yysigned_char yyrhs[] =
{
      24,     0,    -1,    25,    -1,    11,    27,    -1,    -1,    33,
      -1,    26,    -1,    34,    -1,     5,    26,    -1,     6,    26,
      -1,     3,    26,    -1,    29,    26,    32,    -1,    25,    -1,
      28,    -1,    29,    28,    30,    -1,    -1,     7,    28,    -1,
       5,    28,    -1,     6,    28,    -1,     3,    28,    -1,    12,
      -1,    29,    13,    -1,    14,    -1,    13,    -1,    14,    -1,
      31,    32,    -1,     5,    33,    -1,     6,    33,    -1,     7,
      33,    -1,     3,    33,    -1,     4,    -1,     8,    -1,     9,
      -1,    29,    33,    32,    -1,    10,    -1,    35,    -1,    39,
      -1,    42,    -1,    49,    -1,    29,    37,    30,    -1,    29,
      38,    30,    -1,    15,    27,    -1,     5,    31,    38,    -1,
       5,    37,    -1,     6,    31,    38,    -1,     6,    37,    -1,
       3,    31,    38,    -1,     3,    37,    -1,    36,    -1,    38,
      31,    36,    -1,    38,    31,    -1,    17,    40,    18,    -1,
      17,    18,    -1,    41,    -1,    40,    21,    41,    -1,    25,
      -1,    48,    -1,    29,    43,    30,    -1,    29,    47,    30,
      -1,     5,    31,    47,    -1,     5,    43,    -1,     6,    31,
      47,    -1,     6,    43,    -1,     3,    31,    47,    -1,     3,
      43,    -1,    33,    -1,    22,    25,    31,    -1,    27,    -1,
      44,    16,    45,    -1,    46,    -1,    47,    31,    36,    -1,
      47,    31,    46,    -1,    47,    31,    -1,    25,    16,    27,
      -1,    19,    50,    20,    -1,    19,    20,    -1,    51,    -1,
      50,    21,    51,    -1,    25,    -1,    48,    -1
};

/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
static const unsigned short int yyrline[] =
{
       0,    56,    56,    60,    65,    70,    71,    74,    75,    80,
      85,    94,   100,   101,   104,   109,   113,   121,   126,   131,
     145,   146,   149,   152,   155,   156,   164,   169,   174,   182,
     186,   194,   207,   208,   218,   219,   220,   221,   222,   228,
     232,   238,   244,   249,   254,   259,   264,   268,   274,   278,
     283,   292,   296,   302,   306,   313,   314,   320,   325,   332,
     337,   342,   347,   352,   356,   362,   363,   369,   379,   396,
     397,   409,   417,   426,   434,   438,   444,   445,   454,   461
};
#endif

#if YYDEBUG || YYERROR_VERBOSE
/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
   First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
  "$end", "error", "$undefined", "YAML_ANCHOR", "YAML_ALIAS",
  "YAML_TRANSFER", "YAML_TAGURI", "YAML_ITRANSFER", "YAML_WORD",
  "YAML_PLAIN", "YAML_BLOCK", "YAML_DOCSEP", "YAML_IOPEN", "YAML_INDENT",
  "YAML_IEND", "'-'", "':'", "'['", "']'", "'{'", "'}'", "','", "'?'",
  "$accept", "doc", "atom", "ind_rep", "atom_or_empty", "empty",
  "indent_open", "indent_end", "indent_sep", "indent_flex_end", "word_rep",
  "struct_rep", "implicit_seq", "basic_seq", "top_imp_seq",
  "in_implicit_seq", "inline_seq", "in_inline_seq", "inline_seq_atom",
  "implicit_map", "top_imp_map", "complex_key", "complex_value",
  "complex_mapping", "in_implicit_map", "basic_mapping", "inline_map",
  "in_inline_map", "inline_map_atom", 0
};
#endif

# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
   token YYLEX-NUM.  */
static const unsigned short int yytoknum[] =
{
       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
     265,   266,   267,   268,   269,    45,    58,    91,    93,   123,
     125,    44,    63
};
# endif

/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
static const unsigned char yyr1[] =
{
       0,    23,    24,    24,    24,    25,    25,    26,    26,    26,
      26,    26,    27,    27,    28,    28,    28,    28,    28,    28,
      29,    29,    30,    31,    32,    32,    33,    33,    33,    33,
      33,    33,    33,    33,    34,    34,    34,    34,    34,    35,
      35,    36,    37,    37,    37,    37,    37,    37,    38,    38,
      38,    39,    39,    40,    40,    41,    41,    42,    42,    43,
      43,    43,    43,    43,    43,    44,    44,    45,    46,    47,
      47,    47,    47,    48,    49,    49,    50,    50,    51,    51
};

/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
static const unsigned char yyr2[] =
{
       0,     2,     1,     2,     0,     1,     1,     1,     2,     2,
       2,     3,     1,     1,     3,     0,     2,     2,     2,     2,
       1,     2,     1,     1,     1,     2,     2,     2,     2,     2,
       1,     1,     1,     3,     1,     1,     1,     1,     1,     3,
       3,     2,     3,     2,     3,     2,     3,     2,     1,     3,
       2,     3,     2,     1,     3,     1,     1,     3,     3,     3,
       2,     3,     2,     3,     2,     1,     3,     1,     3,     1,
       3,     3,     2,     3,     3,     2,     1,     3,     1,     1
};

/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
   means the default is an error.  */
static const unsigned char yydefact[] =
{
       4,     0,    30,     0,     0,     0,    31,    32,    34,    15,
      20,     0,     0,     0,     2,     6,     0,     5,     7,    35,
      36,    37,    38,    10,    29,     8,    26,     9,    27,     0,
       0,     0,     0,    28,    15,    15,    15,    15,    12,     3,
      13,    15,    52,    55,     0,    53,    56,    75,    78,    79,
       0,    76,     1,     0,     0,     0,    21,    15,     0,     0,
      65,    48,     0,     0,     0,     0,    69,     0,     0,    19,
      17,    18,    15,    15,    15,    16,    15,    15,    15,    15,
       0,    15,    51,     0,    74,     0,    23,     0,    47,    64,
       0,    43,    60,     0,    45,    62,    41,     0,    24,     0,
      11,    33,    22,    39,    40,    50,    57,    15,    58,    72,
      14,    73,    54,    77,    65,    46,    63,    42,    59,    44,
      61,    66,    25,    49,    67,    68,    70,    71
};

/* YYDEFGOTO[NTERM-NUM]. */
static const yysigned_char yydefgoto[] =
{
      -1,    13,    38,    15,    39,    40,    16,   103,    99,   101,
      17,    18,    19,    61,    62,    63,    20,    44,    45,    21,
      64,    65,   125,    66,    67,    46,    22,    50,    51
};

/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
   STATE-NUM.  */
#define YYPACT_NINF -97
static const short int yypact[] =
{
     250,   318,   -97,   318,   318,   374,   -97,   -97,   -97,   335,
     -97,   267,   232,     7,   -97,   -97,   192,   -97,   -97,   -97,
     -97,   -97,   -97,   -97,   -97,   -97,   -97,   -97,   -97,   374,
     374,   374,   352,   -97,   335,   335,   335,   384,   -97,   -97,
     -97,   212,   -97,    10,     0,   -97,   -97,   -97,    10,   -97,
      -4,   -97,   -97,   284,   284,   284,   -97,   335,   318,    30,
      30,   -97,    -2,    36,    -2,    16,   -97,    36,    30,   -97,
     -97,   -97,   384,   384,   384,   -97,   363,   301,   301,   301,
      -2,   335,   -97,   318,   -97,   318,   -97,   158,   -97,   -97,
     158,   -97,   -97,   158,   -97,   -97,   -97,    24,   -97,    30,
     -97,   -97,   -97,   -97,   -97,    26,   -97,   335,   -97,   158,
     -97,   -97,   -97,   -97,   -97,    24,    24,    24,    24,    24,
      24,   -97,   -97,   -97,   -97,   -97,   -97,   -97
};

/* YYPGOTO[NTERM-NUM].  */
static const yysigned_char yypgoto[] =
{
     -97,   -97,     8,    81,   -56,   109,    33,   -53,    74,   -54,
      -1,   -97,   -97,   -96,   -31,   -32,   -97,   -97,   -44,   -97,
      77,   -97,   -97,   -52,     9,    -6,   -97,   -97,   -29
};

/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
   positive, shift that token.  If negative, reduce the rule which
   number is the opposite.  If zero, do what YYDEFACT says.
   If YYTABLE_NINF, syntax error.  */
#define YYTABLE_NINF -1
static const unsigned char yytable[] =
{
      24,    96,    26,    28,    33,   100,    49,    52,    14,   123,
     104,   106,   102,   126,   108,    60,    84,    85,    82,    43,
      48,    83,    88,    91,    94,   111,    81,   110,    24,    26,
      28,    68,   107,    24,    26,    28,    33,    86,    32,   112,
      60,    57,    41,    86,    98,   122,    88,    91,    94,    86,
     102,   124,    24,    26,    28,   115,   113,   127,   117,     0,
       0,   119,    32,    32,    32,    32,    97,    41,    41,    41,
      76,    24,    26,    28,    41,    68,    24,    26,    28,    49,
       0,     0,    23,     0,    25,    27,   114,     0,     0,   114,
      41,    43,   114,    48,     0,     0,   116,    59,     0,   118,
       0,     0,   120,     0,     0,    76,    76,    76,   114,    76,
      41,    41,    41,     0,    41,    23,    25,    27,     0,     0,
      32,     0,    59,    32,     0,     0,    32,    87,    90,    93,
      89,    92,    95,     0,    23,    25,    27,   105,     0,     0,
      41,   109,    32,    69,    70,    71,    75,     0,     0,     0,
      80,    87,    90,    93,    89,    92,    95,     0,    23,    25,
      27,    29,     2,    30,    31,     5,     6,     7,     0,     0,
      10,   121,     0,    57,     0,     0,     0,     0,     0,     0,
      58,    69,    70,    71,     0,    80,    69,    70,    71,   105,
     109,   105,   109,   105,   109,    53,     2,    54,    55,     5,
       6,     7,     8,     0,    10,    56,     0,    57,     0,    11,
       0,    12,     0,     0,    58,    77,     2,    78,    79,    37,
       6,     7,     8,     0,    10,    56,     0,    57,     0,    11,
       0,    12,     0,     0,    58,     1,     2,     3,     4,     5,
       6,     7,     8,     0,    10,     0,     0,     0,     0,    11,
       0,    12,    47,     1,     2,     3,     4,     5,     6,     7,
       8,     9,    10,     0,     0,     0,     0,    11,     0,    12,
       1,     2,     3,     4,     5,     6,     7,     8,     0,    10,
       0,     0,     0,     0,    11,    42,    12,    53,     2,    54,
      55,     5,     6,     7,     8,     0,    10,    86,     0,     0,
       0,    11,     0,    12,    77,     2,    78,    79,    37,     6,
       7,     8,     0,    10,    86,     0,     0,     0,    11,     0,
      12,     1,     2,     3,     4,     5,     6,     7,     8,     0,
      10,     0,     0,     0,     0,    11,     0,    12,    34,     2,
      35,    36,    37,     6,     7,     8,     0,    10,     0,     0,
       0,     0,    11,     0,    12,    29,     2,    30,    31,     5,
       6,     7,     0,     0,    10,    56,    72,     2,    73,    74,
      37,     6,     7,     0,     0,    10,    56,    29,     2,    30,
      31,     5,     6,     7,     0,     0,    10,    72,     2,    73,
      74,    37,     6,     7,     0,     0,    10
};

static const yysigned_char yycheck[] =
{
       1,    57,     3,     4,     5,    59,    12,     0,     0,   105,
      63,    64,    14,   109,    67,    16,    20,    21,    18,    11,
      12,    21,    53,    54,    55,    81,    16,    80,    29,    30,
      31,    32,    16,    34,    35,    36,    37,    13,     5,    83,
      41,    15,     9,    13,    14,    99,    77,    78,    79,    13,
      14,   107,    53,    54,    55,    87,    85,   109,    90,    -1,
      -1,    93,    29,    30,    31,    32,    58,    34,    35,    36,
      37,    72,    73,    74,    41,    76,    77,    78,    79,    85,
      -1,    -1,     1,    -1,     3,     4,    87,    -1,    -1,    90,
      57,    83,    93,    85,    -1,    -1,    87,    16,    -1,    90,
      -1,    -1,    93,    -1,    -1,    72,    73,    74,   109,    76,
      77,    78,    79,    -1,    81,    34,    35,    36,    -1,    -1,
      87,    -1,    41,    90,    -1,    -1,    93,    53,    54,    55,
      53,    54,    55,    -1,    53,    54,    55,    63,    -1,    -1,
     107,    67,   109,    34,    35,    36,    37,    -1,    -1,    -1,
      41,    77,    78,    79,    77,    78,    79,    -1,    77,    78,
      79,     3,     4,     5,     6,     7,     8,     9,    -1,    -1,
      12,    97,    -1,    15,    -1,    -1,    -1,    -1,    -1,    -1,
      22,    72,    73,    74,    -1,    76,    77,    78,    79,   115,
     116,   117,   118,   119,   120,     3,     4,     5,     6,     7,
       8,     9,    10,    -1,    12,    13,    -1,    15,    -1,    17,
      -1,    19,    -1,    -1,    22,     3,     4,     5,     6,     7,
       8,     9,    10,    -1,    12,    13,    -1,    15,    -1,    17,
      -1,    19,    -1,    -1,    22,     3,     4,     5,     6,     7,
       8,     9,    10,    -1,    12,    -1,    -1,    -1,    -1,    17,
      -1,    19,    20,     3,     4,     5,     6,     7,     8,     9,
      10,    11,    12,    -1,    -1,    -1,    -1,    17,    -1,    19,
       3,     4,     5,     6,     7,     8,     9,    10,    -1,    12,
      -1,    -1,    -1,    -1,    17,    18,    19,     3,     4,     5,
       6,     7,     8,     9,    10,    -1,    12,    13,    -1,    -1,
      -1,    17,    -1,    19,     3,     4,     5,     6,     7,     8,
       9,    10,    -1,    12,    13,    -1,    -1,    -1,    17,    -1,
      19,     3,     4,     5,     6,     7,     8,     9,    10,    -1,
      12,    -1,    -1,    -1,    -1,    17,    -1,    19,     3,     4,
       5,     6,     7,     8,     9,    10,    -1,    12,    -1,    -1,
      -1,    -1,    17,    -1,    19,     3,     4,     5,     6,     7,
       8,     9,    -1,    -1,    12,    13,     3,     4,     5,     6,
       7,     8,     9,    -1,    -1,    12,    13,     3,     4,     5,
       6,     7,     8,     9,    -1,    -1,    12,     3,     4,     5,
       6,     7,     8,     9,    -1,    -1,    12
};

/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
   symbol of state STATE-NUM.  */
static const unsigned char yystos[] =
{
       0,     3,     4,     5,     6,     7,     8,     9,    10,    11,
      12,    17,    19,    24,    25,    26,    29,    33,    34,    35,
      39,    42,    49,    26,    33,    26,    33,    26,    33,     3,
       5,     6,    29,    33,     3,     5,     6,     7,    25,    27,
      28,    29,    18,    25,    40,    41,    48,    20,    25,    48,
      50,    51,     0,     3,     5,     6,    13,    15,    22,    26,
      33,    36,    37,    38,    43,    44,    46,    47,    33,    28,
      28,    28,     3,     5,     6,    28,    29,     3,     5,     6,
      28,    16,    18,    21,    20,    21,    13,    31,    37,    43,
      31,    37,    43,    31,    37,    43,    27,    25,    14,    31,
      32,    32,    14,    30,    30,    31,    30,    16,    30,    31,
      30,    27,    41,    51,    33,    38,    47,    38,    47,    38,
      47,    31,    32,    36,    27,    45,    36,    46
};

#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
# define YYSIZE_T __SIZE_TYPE__
#endif
#if ! defined (YYSIZE_T) && defined (size_t)
# define YYSIZE_T size_t
#endif
#if ! defined (YYSIZE_T)
# if defined (__STDC__) || defined (__cplusplus)
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  define YYSIZE_T size_t
# endif
#endif
#if ! defined (YYSIZE_T)
# define YYSIZE_T unsigned int
#endif

#define yyerrok         (yyerrstatus = 0)
#define yyclearin       (yychar = YYEMPTY)
#define YYEMPTY         (-2)
#define YYEOF           0

#define YYACCEPT        goto yyacceptlab
#define YYABORT         goto yyabortlab
#define YYERROR         goto yyerrorlab

/* Like YYERROR except do call yyerror.  This remains here temporarily
   to ease the transition to the new meaning of YYERROR, for GCC.
   Once GCC version 2 has supplanted version 1, this can go.  */

#define YYFAIL          goto yyerrlab

#define YYRECOVERING()  (!!yyerrstatus)

#define YYBACKUP(Token, Value)                                  \
do                                                              \
  if (yychar == YYEMPTY && yylen == 1)                          \
    {                                                           \
      yychar = (Token);                                         \
      yylval = (Value);                                         \
      yytoken = YYTRANSLATE (yychar);                           \
      YYPOPSTACK;                                               \
      goto yybackup;                                            \
    }                                                           \
  else                                                          \
    {                                                           \
      yyerror ("syntax error: cannot back up");\
      YYERROR;                                                  \
    }                                                           \
while (0)

#define YYTERROR        1
#define YYERRCODE       256

/* YYLLOC_DEFAULT -- Compute the default location (before the actions
   are run).  */

#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N)                \
   ((Current).first_line   = (Rhs)[1].first_line,       \
    (Current).first_column = (Rhs)[1].first_column,     \
    (Current).last_line    = (Rhs)[N].last_line,        \
    (Current).last_column  = (Rhs)[N].last_column)
#endif

/* YYLEX -- calling `yylex' with the right arguments.  */

#ifdef YYLEX_PARAM
# define YYLEX yylex (&yylval, YYLEX_PARAM)
#else
# define YYLEX yylex (&yylval)
#endif

/* Enable debugging if requested.  */
#if YYDEBUG

# ifndef YYFPRINTF
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
#  define YYFPRINTF fprintf
# endif

# define YYDPRINTF(Args)                        \
do {                                            \
  if (yydebug)                                  \
    YYFPRINTF Args;                             \
} while (0)

# define YYDSYMPRINT(Args)                      \
do {                                            \
  if (yydebug)                                  \
    yysymprint Args;                            \
} while (0)

# define YYDSYMPRINTF(Title, Token, Value, Location)            \
do {                                                            \
  if (yydebug)                                                  \
    {                                                           \
      YYFPRINTF (stderr, "%s ", Title);                         \
      yysymprint (stderr,                                       \
                  Token, Value);        \
      YYFPRINTF (stderr, "\n");                                 \
    }                                                           \
} while (0)

/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (included).                                                   |
`------------------------------------------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yy_stack_print (short int *bottom, short int *top)
#else
static void
yy_stack_print (bottom, top)
    short int *bottom;
    short int *top;
#endif
{
  YYFPRINTF (stderr, "Stack now");
  for (/* Nothing. */; bottom <= top; ++bottom)
    YYFPRINTF (stderr, " %d", *bottom);
  YYFPRINTF (stderr, "\n");
}

# define YY_STACK_PRINT(Bottom, Top)                            \
do {                                                            \
  if (yydebug)                                                  \
    yy_stack_print ((Bottom), (Top));                           \
} while (0)

/*------------------------------------------------.
| Report that the YYRULE is going to be reduced.  |
`------------------------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yy_reduce_print (int yyrule)
#else
static void
yy_reduce_print (yyrule)
    int yyrule;
#endif
{
  int yyi;
  unsigned int yylno = yyrline[yyrule];
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
             yyrule - 1, yylno);
  /* Print the symbols being reduced, and their result.  */
  for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
    YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
  YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
}

# define YY_REDUCE_PRINT(Rule)          \
do {                                    \
  if (yydebug)                          \
    yy_reduce_print (Rule);             \
} while (0)

/* Nonzero means print parse trace.  It is left uninitialized so that
   multiple parsers can coexist.  */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
# define YYDSYMPRINT(Args)
# define YYDSYMPRINTF(Title, Token, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */

/* YYINITDEPTH -- initial size of the parser's stacks.  */
#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif

/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
   if the built-in stack extension method is used).

   Do not make this value too large; the results are undefined if
   SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
   evaluated with infinite-precision integer arithmetic.  */

#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
# undef YYMAXDEPTH
#endif

#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif

#if YYERROR_VERBOSE

# ifndef yystrlen
#  if defined (__GLIBC__) && defined (_STRING_H)
#   define yystrlen strlen
#  else
/* Return the length of YYSTR.  */
static YYSIZE_T
#   if defined (__STDC__) || defined (__cplusplus)
yystrlen (const char *yystr)
#   else
yystrlen (yystr)
     const char *yystr;
#   endif
{
  register const char *yys = yystr;

  while (*yys++ != '\0')
    continue;

  return yys - yystr - 1;
}
#  endif
# endif

# ifndef yystpcpy
#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
#   define yystpcpy stpcpy
#  else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
   YYDEST.  */
static char *
#   if defined (__STDC__) || defined (__cplusplus)
yystpcpy (char *yydest, const char *yysrc)
#   else
yystpcpy (yydest, yysrc)
     char *yydest;
     const char *yysrc;
#   endif
{
  register char *yyd = yydest;
  register const char *yys = yysrc;

  while ((*yyd++ = *yys++) != '\0')
    continue;

  return yyd - 1;
}
#  endif
# endif

#endif /* !YYERROR_VERBOSE */

#if YYDEBUG
/*--------------------------------.
| Print this symbol on YYOUTPUT.  |
`--------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
#else
static void
yysymprint (yyoutput, yytype, yyvaluep)
    FILE *yyoutput;
    int yytype;
    YYSTYPE *yyvaluep;
#endif
{
  /* Pacify ``unused variable'' warnings.  */
  (void) yyvaluep;

  if (yytype < YYNTOKENS)
    {
      YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
# ifdef YYPRINT
      YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# endif
    }
  else
    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);

  switch (yytype)
    {
      default:
        break;
    }
  YYFPRINTF (yyoutput, ")");
}

#endif /* ! YYDEBUG */
/*-----------------------------------------------.
| Release the memory associated to this symbol.  |
`-----------------------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yydestruct (int yytype, YYSTYPE *yyvaluep)
#else
static void
yydestruct (yytype, yyvaluep)
    int yytype;
    YYSTYPE *yyvaluep;
#endif
{
  /* Pacify ``unused variable'' warnings.  */
  (void) yyvaluep;

  switch (yytype)
    {

      default:
        break;
    }
}

/* Prevent warnings from -Wmissing-prototypes.  */

#ifdef YYPARSE_PARAM
# if defined (__STDC__) || defined (__cplusplus)
int yyparse (void *YYPARSE_PARAM);
# else
int yyparse ();
# endif
#else /* ! YYPARSE_PARAM */
#if defined (__STDC__) || defined (__cplusplus)
int yyparse (void);
#else
int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */

/*----------.
| yyparse.  |
`----------*/

#ifdef YYPARSE_PARAM
# if defined (__STDC__) || defined (__cplusplus)
int yyparse (void *YYPARSE_PARAM)
# else
int yyparse (YYPARSE_PARAM)
  void *YYPARSE_PARAM;
# endif
#else /* ! YYPARSE_PARAM */
#if defined (__STDC__) || defined (__cplusplus)
int
yyparse (void)
#else
int
yyparse ()

#endif
#endif
{
  /* The lookahead symbol.  */
int yychar;

/* The semantic value of the lookahead symbol.  */
YYSTYPE yylval;

/* Number of syntax errors so far.  */
int yynerrs;

  register int yystate;
  register int yyn;
  int yyresult;
  /* Number of tokens to shift before error messages enabled.  */
  int yyerrstatus;
  /* Lookahead token as an internal (translated) token number.  */
  int yytoken = 0;

  /* Three stacks and their tools:
     `yyss': related to states,
     `yyvs': related to semantic values,
     `yyls': related to locations.

     Refer to the stacks thru separate pointers, to allow yyoverflow
     to reallocate them elsewhere.  */

  /* The state stack.  */
  short int yyssa[YYINITDEPTH];
  short int *yyss = yyssa;
  register short int *yyssp;

  /* The semantic value stack.  */
  YYSTYPE yyvsa[YYINITDEPTH];
  YYSTYPE *yyvs = yyvsa;
  register YYSTYPE *yyvsp;

#define YYPOPSTACK   (yyvsp--, yyssp--)

  YYSIZE_T yystacksize = YYINITDEPTH;

  /* The variables used to return semantic value and location from the
     action routines.  */
  YYSTYPE yyval;

  /* When reducing, the number of symbols on the RHS of the reduced
     rule.  */
  int yylen;

  YYDPRINTF ((stderr, "Starting parse\n"));

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
  yychar = YYEMPTY;             /* Cause a token to be read.  */

  /* Initialize stack pointers.
     Waste one element of value and location stack
     so that they stay on the same level as the state stack.
     The wasted elements are never initialized.  */

  yyssp = yyss;
  yyvsp = yyvs;

  goto yysetstate;

/*------------------------------------------------------------.
| yynewstate -- Push a new state, which is found in yystate.  |
`------------------------------------------------------------*/
 yynewstate:
  /* In all cases, when you get here, the value and location stacks
     have just been pushed. so pushing a state here evens the stacks.
     */
  yyssp++;

 yysetstate:
  *yyssp = yystate;

  if (yyss + yystacksize - 1 <= yyssp)
    {
      /* Get the current used size of the three stacks, in elements.  */
      YYSIZE_T yysize = yyssp - yyss + 1;

#ifdef yyoverflow
      {
        /* Give user a chance to reallocate the stack. Use copies of
           these so that the &'s don't force the real ones into
           memory.  */
        YYSTYPE *yyvs1 = yyvs;
        short int *yyss1 = yyss;

        /* Each stack pointer address is followed by the size of the
           data in use in that stack, in bytes.  This used to be a
           conditional around just the two extra args, but that might
           be undefined if yyoverflow is a macro.  */
        yyoverflow ("parser stack overflow",
                    &yyss1, yysize * sizeof (*yyssp),
                    &yyvs1, yysize * sizeof (*yyvsp),

                    &yystacksize);

        yyss = yyss1;
        yyvs = yyvs1;
      }
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
      goto yyoverflowlab;
# else
      /* Extend the stack our own way.  */
      if (YYMAXDEPTH <= yystacksize)
        goto yyoverflowlab;
      yystacksize *= 2;
      if (YYMAXDEPTH < yystacksize)
        yystacksize = YYMAXDEPTH;

      {
        short int *yyss1 = yyss;
        union yyalloc *yyptr =
          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
        if (! yyptr)
          goto yyoverflowlab;
        YYSTACK_RELOCATE (yyss);
        YYSTACK_RELOCATE (yyvs);

#  undef YYSTACK_RELOCATE
        if (yyss1 != yyssa)
          YYSTACK_FREE (yyss1);
      }
# endif
#endif /* no yyoverflow */

      yyssp = yyss + yysize - 1;
      yyvsp = yyvs + yysize - 1;

      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
                  (unsigned long int) yystacksize));

      if (yyss + yystacksize - 1 <= yyssp)
        YYABORT;
    }

  YYDPRINTF ((stderr, "Entering state %d\n", yystate));

  goto yybackup;

/*-----------.
| yybackup.  |
`-----------*/
yybackup:

/* Do appropriate processing given the current state.  */
/* Read a lookahead token if we need one and don't already have one.  */
/* yyresume: */

  /* First try to decide what to do without reference to lookahead token.  */

  yyn = yypact[yystate];
  if (yyn == YYPACT_NINF)
    goto yydefault;

  /* Not known => get a lookahead token if don't already have one.  */

  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
  if (yychar == YYEMPTY)
    {
      YYDPRINTF ((stderr, "Reading a token: "));
      yychar = YYLEX;
    }

  if (yychar <= YYEOF)
    {
      yychar = yytoken = YYEOF;
      YYDPRINTF ((stderr, "Now at end of input.\n"));
    }
  else
    {
      yytoken = YYTRANSLATE (yychar);
      YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
    }

  /* If the proper action on seeing token YYTOKEN is to reduce or to
     detect an error, take that action.  */
  yyn += yytoken;
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
    goto yydefault;
  yyn = yytable[yyn];
  if (yyn <= 0)
    {
      if (yyn == 0 || yyn == YYTABLE_NINF)
        goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }

  if (yyn == YYFINAL)
    YYACCEPT;

  /* Shift the lookahead token.  */
  YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));

  /* Discard the token being shifted unless it is eof.  */
  if (yychar != YYEOF)
    yychar = YYEMPTY;

  *++yyvsp = yylval;

  /* Count tokens shifted since error; after three, turn off error
     status.  */
  if (yyerrstatus)
    yyerrstatus--;

  yystate = yyn;
  goto yynewstate;

/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state.  |
`-----------------------------------------------------------*/
yydefault:
  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;
  goto yyreduce;

/*-----------------------------.
| yyreduce -- Do a reduction.  |
`-----------------------------*/
yyreduce:
  /* yyn is the number of a rule to reduce with.  */
  yylen = yyr2[yyn];

  /* If YYLEN is nonzero, implement the default value of the action:
     `$$ = $1'.

     Otherwise, the following line sets YYVAL to garbage.
     This behavior is undocumented and Bison
     users should not rely upon it.  Assigning to YYVAL
     unconditionally makes the parser a bit smaller, and it avoids a
     GCC warning that YYVAL may be used uninitialized.  */
  yyval = yyvsp[1-yylen];

  YY_REDUCE_PRINT (yyn);
  switch (yyn)
    {
        case 2:
#line 57 "gram.y"
    {
           ((SyckParser *)parser)->root = syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData );
        }
    break;

  case 3:
#line 61 "gram.y"
    {
           ((SyckParser *)parser)->root = syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData );
        }
    break;

  case 4:
#line 65 "gram.y"
    {
           ((SyckParser *)parser)->eof = 1;
        }
    break;

  case 8:
#line 76 "gram.y"
    {
            syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
            yyval.nodeData = yyvsp[0].nodeData;
        }
    break;

  case 9:
#line 81 "gram.y"
    {
            syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 );
            yyval.nodeData = yyvsp[0].nodeData;
        }
    break;

  case 10:
#line 86 "gram.y"
    {
           /*
            * _Anchors_: The language binding must keep a separate symbol table
            * for anchors.  The actual ID in the symbol table is returned to the
            * higher nodes, though.
            */
           yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
        }
    break;

  case 11:
#line 95 "gram.y"
    {
           yyval.nodeData = yyvsp[-1].nodeData;
        }
    break;

  case 14:
#line 105 "gram.y"
    {
                    yyval.nodeData = yyvsp[-1].nodeData;
                }
    break;

  case 15:
#line 109 "gram.y"
    {
                    NULL_NODE( parser, n );
                    yyval.nodeData = n;
                }
    break;

  case 16:
#line 114 "gram.y"
    {
                   if ( ((SyckParser *)parser)->implicit_typing == 1 )
                   {
                      try_tag_implicit( yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
                   }
                   yyval.nodeData = yyvsp[0].nodeData;
                }
    break;

  case 17:
#line 122 "gram.y"
    {
                    syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
                    yyval.nodeData = yyvsp[0].nodeData;
                }
    break;

  case 18:
#line 127 "gram.y"
    {
                    syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 );
                    yyval.nodeData = yyvsp[0].nodeData;
                }
    break;

  case 19:
#line 132 "gram.y"
    {
                   /*
                    * _Anchors_: The language binding must keep a separate symbol table
                    * for anchors.  The actual ID in the symbol table is returned to the
                    * higher nodes, though.
                    */
                   yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
                }
    break;

  case 26:
#line 165 "gram.y"
    {
               syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
               yyval.nodeData = yyvsp[0].nodeData;
            }
    break;

  case 27:
#line 170 "gram.y"
    {
               syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 );
               yyval.nodeData = yyvsp[0].nodeData;
            }
    break;

  case 28:
#line 175 "gram.y"
    {
               if ( ((SyckParser *)parser)->implicit_typing == 1 )
               {
                  try_tag_implicit( yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
               }
               yyval.nodeData = yyvsp[0].nodeData;
            }
    break;

  case 29:
#line 183 "gram.y"
    {
               yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
            }
    break;

  case 30:
#line 187 "gram.y"
    {
               /*
                * _Aliases_: The anchor symbol table is scanned for the anchor name.
                * The anchor's ID in the language's symbol table is returned.
                */
               yyval.nodeData = syck_hdlr_get_anchor( (SyckParser *)parser, yyvsp[0].name );
            }
    break;

  case 31:
#line 195 "gram.y"
    {
               SyckNode *n = yyvsp[0].nodeData;
               if ( ((SyckParser *)parser)->taguri_expansion == 1 )
               {
                   n->type_id = syck_taguri( YAML_DOMAIN, "str", 3 );
               }
               else
               {
                   n->type_id = syck_strndup( "str", 3 );
               }
               yyval.nodeData = n;
            }
    break;

  case 33:
#line 209 "gram.y"
    {
               yyval.nodeData = yyvsp[-1].nodeData;
            }
    break;

  case 39:
#line 229 "gram.y"
    {
                    yyval.nodeData = yyvsp[-1].nodeData;
                }
    break;

  case 40:
#line 233 "gram.y"
    {
                    yyval.nodeData = yyvsp[-1].nodeData;
                }
    break;

  case 41:
#line 239 "gram.y"
    {
                    yyval.nodeId = syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData );
                }
    break;

  case 42:
#line 245 "gram.y"
    {
                    syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
                    yyval.nodeData = yyvsp[0].nodeData;
                }
    break;

  case 43:
#line 250 "gram.y"
    {
                    syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
                    yyval.nodeData = yyvsp[0].nodeData;
                }
    break;

  case 44:
#line 255 "gram.y"
    {
                    syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, 0 );
                    yyval.nodeData = yyvsp[0].nodeData;
                }
    break;

  case 45:
#line 260 "gram.y"
    {
                    syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 );
                    yyval.nodeData = yyvsp[0].nodeData;
                }
    break;

  case 46:
#line 265 "gram.y"
    {
                    yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-2].name, yyvsp[0].nodeData );
                }
    break;

  case 47:
#line 269 "gram.y"
    {
                    yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
                }
    break;

  case 48:
#line 275 "gram.y"
    {
                    yyval.nodeData = syck_new_seq( yyvsp[0].nodeId );
                }
    break;

  case 49:
#line 279 "gram.y"
    {
                    syck_seq_add( yyvsp[-2].nodeData, yyvsp[0].nodeId );
                    yyval.nodeData = yyvsp[-2].nodeData;
                                }
    break;

  case 50:
#line 284 "gram.y"
    {
                    yyval.nodeData = yyvsp[-1].nodeData;
                                }
    break;

  case 51:
#line 293 "gram.y"
    {
                    yyval.nodeData = yyvsp[-1].nodeData;
                }
    break;

  case 52:
#line 297 "gram.y"
    {
                    yyval.nodeData = syck_alloc_seq();
                }
    break;

  case 53:
#line 303 "gram.y"
    {
                    yyval.nodeData = syck_new_seq( syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
                }
    break;

  case 54:
#line 307 "gram.y"
    {
                    syck_seq_add( yyvsp[-2].nodeData, syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
                    yyval.nodeData = yyvsp[-2].nodeData;
                                }
    break;

  case 57:
#line 321 "gram.y"
    {
                    apply_seq_in_map( (SyckParser *)parser, yyvsp[-1].nodeData );
                    yyval.nodeData = yyvsp[-1].nodeData;
                }
    break;

  case 58:
#line 326 "gram.y"
    {
                    apply_seq_in_map( (SyckParser *)parser, yyvsp[-1].nodeData );
                    yyval.nodeData = yyvsp[-1].nodeData;
                }
    break;

  case 59:
#line 333 "gram.y"
    {
                    syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
                    yyval.nodeData = yyvsp[0].nodeData;
                }
    break;

  case 60:
#line 338 "gram.y"
    {
                    syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, ((SyckParser *)parser)->taguri_expansion );
                    yyval.nodeData = yyvsp[0].nodeData;
                }
    break;

  case 61:
#line 343 "gram.y"
    {
                    syck_add_transfer( yyvsp[-2].name, yyvsp[0].nodeData, 0 );
                    yyval.nodeData = yyvsp[0].nodeData;
                }
    break;

  case 62:
#line 348 "gram.y"
    {
                    syck_add_transfer( yyvsp[-1].name, yyvsp[0].nodeData, 0 );
                    yyval.nodeData = yyvsp[0].nodeData;
                }
    break;

  case 63:
#line 353 "gram.y"
    {
                    yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-2].name, yyvsp[0].nodeData );
                }
    break;

  case 64:
#line 357 "gram.y"
    {
                    yyval.nodeData = syck_hdlr_add_anchor( (SyckParser *)parser, yyvsp[-1].name, yyvsp[0].nodeData );
                }
    break;

  case 66:
#line 364 "gram.y"
    {
                    yyval.nodeData = yyvsp[-1].nodeData;
                }
    break;

  case 68:
#line 380 "gram.y"
    {
                    yyval.nodeData = syck_new_map(
                        syck_hdlr_add_node( (SyckParser *)parser, yyvsp[-2].nodeData ),
                        syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
                }
    break;

  case 70:
#line 398 "gram.y"
    {
                    if ( yyvsp[-2].nodeData->shortcut == NULL )
                    {
                        yyvsp[-2].nodeData->shortcut = syck_new_seq( yyvsp[0].nodeId );
                    }
                    else
                    {
                        syck_seq_add( yyvsp[-2].nodeData->shortcut, yyvsp[0].nodeId );
                    }
                    yyval.nodeData = yyvsp[-2].nodeData;
                }
    break;

  case 71:
#line 410 "gram.y"
    {
                    apply_seq_in_map( (SyckParser *)parser, yyvsp[-2].nodeData );
                    syck_map_update( yyvsp[-2].nodeData, yyvsp[0].nodeData );
                    syck_free_node( yyvsp[0].nodeData );
                    yyvsp[0].nodeData = NULL;
                    yyval.nodeData = yyvsp[-2].nodeData;
                }
    break;

  case 72:
#line 418 "gram.y"
    {
                    yyval.nodeData = yyvsp[-1].nodeData;
                }
    break;

  case 73:
#line 427 "gram.y"
    {
                    yyval.nodeData = syck_new_map(
                        syck_hdlr_add_node( (SyckParser *)parser, yyvsp[-2].nodeData ),
                        syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ) );
                }
    break;

  case 74:
#line 435 "gram.y"
    {
                    yyval.nodeData = yyvsp[-1].nodeData;
                }
    break;

  case 75:
#line 439 "gram.y"
    {
                    yyval.nodeData = syck_alloc_map();
                }
    break;

  case 77:
#line 446 "gram.y"
    {
                    syck_map_update( yyvsp[-2].nodeData, yyvsp[0].nodeData );
                    syck_free_node( yyvsp[0].nodeData );
                    yyvsp[0].nodeData = NULL;
                    yyval.nodeData = yyvsp[-2].nodeData;
                                }
    break;

  case 78:
#line 455 "gram.y"
    {
                    NULL_NODE( parser, n );
                    yyval.nodeData = syck_new_map(
                        syck_hdlr_add_node( (SyckParser *)parser, yyvsp[0].nodeData ),
                        syck_hdlr_add_node( (SyckParser *)parser, n ) );
                }
    break;

    }

/* Line 1010 of yacc.c.  */
#line 1651 "gram.c"

  yyvsp -= yylen;
  yyssp -= yylen;

  YY_STACK_PRINT (yyss, yyssp);

  *++yyvsp = yyval;

  /* Now `shift' the result of the reduction.  Determine what state
     that goes to, based on the state we popped back to and the rule
     number reduced by.  */

  yyn = yyr1[yyn];

  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    yystate = yytable[yystate];
  else
    yystate = yydefgoto[yyn - YYNTOKENS];

  goto yynewstate;

/*------------------------------------.
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
  /* If not already recovering from an error, report this error.  */
  if (!yyerrstatus)
    {
      ++yynerrs;
#if YYERROR_VERBOSE
      yyn = yypact[yystate];

      if (YYPACT_NINF < yyn && yyn < YYLAST)
        {
          YYSIZE_T yysize = 0;
          int yytype = YYTRANSLATE (yychar);
          const char* yyprefix;
          char *yymsg;
          int yyx;

          /* Start YYX at -YYN if negative to avoid negative indexes in
             YYCHECK.  */
          int yyxbegin = yyn < 0 ? -yyn : 0;

          /* Stay within bounds of both yycheck and yytname.  */
          int yychecklim = YYLAST - yyn;
          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
          int yycount = 0;

          yyprefix = ", expecting ";
          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
              {
                yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
                yycount += 1;
                if (yycount == 5)
                  {
                    yysize = 0;
                    break;
                  }
              }
          yysize += (sizeof ("syntax error, unexpected ")
                     + yystrlen (yytname[yytype]));
          yymsg = (char *) YYSTACK_ALLOC (yysize);
          if (yymsg != 0)
            {
              char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
              yyp = yystpcpy (yyp, yytname[yytype]);

              if (yycount < 5)
                {
                  yyprefix = ", expecting ";
                  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
                    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
                      {
                        yyp = yystpcpy (yyp, yyprefix);
                        yyp = yystpcpy (yyp, yytname[yyx]);
                        yyprefix = " or ";
                      }
                }
              yyerror (yymsg);
              YYSTACK_FREE (yymsg);
            }
          else
            yyerror ("syntax error; also virtual memory exhausted");
        }
      else
#endif /* YYERROR_VERBOSE */
        yyerror ("syntax error");
    }

  if (yyerrstatus == 3)
    {
      /* If just tried and failed to reuse lookahead token after an
         error, discard it.  */

      if (yychar <= YYEOF)
        {
          /* If at end of input, pop the error token,
             then the rest of the stack, then return failure.  */
          if (yychar == YYEOF)
             for (;;)
               {
                 YYPOPSTACK;
                 if (yyssp == yyss)
                   YYABORT;
                 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
                 yydestruct (yystos[*yyssp], yyvsp);
               }
        }
      else
        {
          YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
          yydestruct (yytoken, &yylval);
          yychar = YYEMPTY;

        }
    }

  /* Else will try to reuse lookahead token after shifting the error
     token.  */
  goto yyerrlab1;

/*---------------------------------------------------.
| yyerrorlab -- error raised explicitly by YYERROR.  |
`---------------------------------------------------*/
yyerrorlab:

#ifdef __GNUC__
  /* Pacify GCC when the user code never invokes YYERROR and the label
     yyerrorlab therefore never appears in user code.  */
  if (0)
     goto yyerrorlab;
#endif

  yyvsp -= yylen;
  yyssp -= yylen;
  yystate = *yyssp;
  goto yyerrlab1;

/*-------------------------------------------------------------.
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
`-------------------------------------------------------------*/
yyerrlab1:
  yyerrstatus = 3;      /* Each real token shifted decrements this.  */

  for (;;)
    {
      yyn = yypact[yystate];
      if (yyn != YYPACT_NINF)
        {
          yyn += YYTERROR;
          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
            {
              yyn = yytable[yyn];
              if (0 < yyn)
                break;
            }
        }

      /* Pop the current state because it cannot handle the error token.  */
      if (yyssp == yyss)
        YYABORT;

      YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
      yydestruct (yystos[yystate], yyvsp);
      YYPOPSTACK;
      yystate = *yyssp;
      YY_STACK_PRINT (yyss, yyssp);
    }

  if (yyn == YYFINAL)
    YYACCEPT;

  YYDPRINTF ((stderr, "Shifting error token, "));

  *++yyvsp = yylval;

  yystate = yyn;
  goto yynewstate;

/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here.  |
`-------------------------------------*/
yyacceptlab:
  yyresult = 0;
  goto yyreturn;

/*-----------------------------------.
| yyabortlab -- YYABORT comes here.  |
`-----------------------------------*/
yyabortlab:
  yyresult = 1;
  goto yyreturn;

#ifndef yyoverflow
/*----------------------------------------------.
| yyoverflowlab -- parser overflow comes here.  |
`----------------------------------------------*/
yyoverflowlab:
  yyerror ("parser stack overflow");
  yyresult = 2;
  /* Fall through.  */
#endif

yyreturn:
#ifndef yyoverflow
  if (yyss != yyssa)
    YYSTACK_FREE (yyss);
#endif
  return yyresult;
}

#line 464 "gram.y"

void
apply_seq_in_map( SyckParser *parser, SyckNode *n )
{
    long map_len;
    if ( n->shortcut == NULL )
    {
        return;
    }

    map_len = syck_map_count( n );
    syck_map_assign( n, map_value, map_len - 1,
        syck_hdlr_add_node( parser, n->shortcut ) );

    n->shortcut = NULL;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/syck/gram.h

root/ext/syck/gram.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

DEFINITIONS

This source file includes following definitions.
  1. YYSTYPE
/* A Bison parser, made by GNU Bison 1.875d.  */

/* Skeleton parser for Yacc-like parsing with Bison,
   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.  */

/* As a special exception, when this file is copied by Bison into a
   Bison output file, you may use that output file without restriction.
   This special exception was added by the Free Software Foundation
   in version 1.24 of Bison.  */

/* Tokens.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
   /* Put the tokens into the symbol table, so that GDB and other debuggers
      know about them.  */
   enum yytokentype {
     YAML_ANCHOR = 258,
     YAML_ALIAS = 259,
     YAML_TRANSFER = 260,
     YAML_TAGURI = 261,
     YAML_ITRANSFER = 262,
     YAML_WORD = 263,
     YAML_PLAIN = 264,
     YAML_BLOCK = 265,
     YAML_DOCSEP = 266,
     YAML_IOPEN = 267,
     YAML_INDENT = 268,
     YAML_IEND = 269
   };
#endif
#define YAML_ANCHOR 258
#define YAML_ALIAS 259
#define YAML_TRANSFER 260
#define YAML_TAGURI 261
#define YAML_ITRANSFER 262
#define YAML_WORD 263
#define YAML_PLAIN 264
#define YAML_BLOCK 265
#define YAML_DOCSEP 266
#define YAML_IOPEN 267
#define YAML_INDENT 268
#define YAML_IEND 269

#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
#line 35 "gram.y"
typedef union YYSTYPE {
    SYMID nodeId;
    SyckNode *nodeData;
    char *name;
} YYSTYPE;
/* Line 1285 of yacc.c.  */
#line 71 "gram.h"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif
/* [<][>][^][v] [top][bottom][index] [help] */


ext/syck/handler.c

root/ext/syck/handler.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. syck_hdlr_add_node
  2. syck_hdlr_add_anchor
  3. syck_hdlr_remove_anchor
  4. syck_hdlr_get_anchor
  5. syck_add_transfer
  6. syck_xprivate
  7. syck_taguri
  8. syck_try_implicit
/*
 * handler.c
 *
 * $Author: why $
 * $Date: 2005/09/20 06:50:19 $
 *
 * Copyright (C) 2003 why the lucky stiff
 */

#include "ruby.h"
#include "syck.h"

SYMID
syck_hdlr_add_node( SyckParser *p, SyckNode *n )
{
    SYMID id;

    if ( ! n->id )
    {
        n->id = (p->handler)( p, n );
    }
    id = n->id;

    if ( n->anchor == NULL )
    {
        syck_free_node( n );
    }
    return id;
}

SyckNode *
syck_hdlr_add_anchor( SyckParser *p, char *a, SyckNode *n )
{
    SyckNode *ntmp = NULL;

    n->anchor = a;
    if ( p->bad_anchors != NULL )
    {
        SyckNode *bad;
        if ( st_lookup( p->bad_anchors, (st_data_t)a, (st_data_t *)&bad ) )
        {
            if ( n->kind != syck_str_kind )
            {
                n->id = bad->id;
                (p->handler)( p, n );
            }
        }
    }
    if ( p->anchors == NULL )
    {
        p->anchors = st_init_strtable();
    }
    if ( st_lookup( p->anchors, (st_data_t)a, (st_data_t *)&ntmp ) )
    {
        if ( ntmp != (void *)1 )
        {
            syck_free_node( ntmp );
        }
    }
    st_insert( p->anchors, (st_data_t)a, (st_data_t)n );
    return n;
}

void
syck_hdlr_remove_anchor( SyckParser *p, char *a )
{
    char *atmp = a;
    SyckNode *ntmp;
    if ( p->anchors == NULL )
    {
        p->anchors = st_init_strtable();
    }
    if ( st_delete( p->anchors, (st_data_t *)&atmp, (st_data_t *)&ntmp ) )
    {
        if ( ntmp != (void *)1 )
        {
            syck_free_node( ntmp );
        }
    }
    st_insert( p->anchors, (st_data_t)a, (st_data_t)1 );
}

SyckNode *
syck_hdlr_get_anchor( SyckParser *p, char *a )
{
    SyckNode *n = NULL;

    if ( p->anchors != NULL )
    {
        if ( st_lookup( p->anchors, (st_data_t)a, (st_data_t *)&n ) )
        {
            if ( n != (void *)1 )
            {
                S_FREE( a );
                return n;
            }
            else
            {
                if ( p->bad_anchors == NULL )
                {
                    p->bad_anchors = st_init_strtable();
                }
                if ( ! st_lookup( p->bad_anchors, (st_data_t)a, (st_data_t *)&n ) )
                {
                    n = (p->bad_anchor_handler)( p, a );
                    st_insert( p->bad_anchors, (st_data_t)a, (st_data_t)n );
                }
            }
        }
    }

    if ( n == NULL )
    {
        n = (p->bad_anchor_handler)( p, a );
    }

    if ( n->anchor )
    {
        S_FREE( a );
    }
    else
    {
        n->anchor = a;
    }

    return n;
}

void
syck_add_transfer( char *uri, SyckNode *n, int taguri )
{
    if ( n->type_id != NULL )
    {
        S_FREE( n->type_id );
    }

    if ( taguri == 0 )
    {
        n->type_id = uri;
        return;
    }

    n->type_id = syck_type_id_to_uri( uri );
    S_FREE( uri );
}

char *
syck_xprivate( char *type_id, int type_len )
{
    char *uri = S_ALLOC_N( char, type_len + 14 );
    uri[0] = '\0';
    strcat( uri, "x-private:" );
    strncat( uri, type_id, type_len );
    return uri;
}

char *
syck_taguri( char *domain, char *type_id, int type_len )
{
    char *uri = S_ALLOC_N( char, strlen( domain ) + type_len + 14 );
    uri[0] = '\0';
    strcat( uri, "tag:" );
    strcat( uri, domain );
    strcat( uri, ":" );
    strncat( uri, type_id, type_len );
    return uri;
}

int
syck_try_implicit( SyckNode *n )
{
    return 1;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/syck/implicit.c

root/ext/syck/implicit.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. try_tag_implicit
  2. syck_match_implicit
  3. syck_tagcmp
  4. syck_type_id_to_uri
/* Generated by re2c 0.9.10 on Mon Sep 19 21:46:50 2005 */
#line 1 "implicit.re"
/*
 * implicit.re
 *
 * $Author: ocean $
 * $Date: 2005/10/26 00:27:35 $
 *
 * Copyright (C) 2003 why the lucky stiff
 */

#include "ruby.h"
#include "syck.h"

#define YYCTYPE     char
#define YYCURSOR    cursor
#define YYMARKER    marker
#define YYLIMIT     limit
#define YYFILL(n)

void
try_tag_implicit( SyckNode *n, int taguri )
{
    char *tid = "";
    switch ( n->kind )
    {
        case syck_str_kind:
            tid = syck_match_implicit( n->data.str->ptr, n->data.str->len );
        break;

        case syck_seq_kind:
            tid = "seq";
        break;

        case syck_map_kind:
            tid = "map";
        break;
    }
    if ( n->type_id != NULL ) S_FREE( n->type_id );
    if ( taguri == 1 )
    {
        n->type_id = syck_taguri( YAML_DOMAIN, tid, strlen( tid ) );
    } else {
        n->type_id = syck_strndup( tid, strlen( tid ) );
    }
}

char *syck_match_implicit( char *str, size_t len )
{
    char *cursor, *limit, *marker;
    cursor = str;
    limit = str + len;

#line 55 "<stdout>"
{
        YYCTYPE yych;
        unsigned int yyaccept;
        goto yy0;
        ++YYCURSOR;
yy0:
        if((YYLIMIT - YYCURSOR) < 26) YYFILL(26);
        yych = *YYCURSOR;
        switch(yych){
        case 0x00:      goto yy6;
        case '+':       goto yy16;
        case '-':       goto yy17;
        case '.':       goto yy20;
        case '0':       goto yy18;
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy19;
        case '<':       goto yy22;
        case '=':       goto yy21;
        case 'F':       goto yy15;
        case 'N':       goto yy5;
        case 'O':       goto yy13;
        case 'T':       goto yy11;
        case 'Y':       goto yy9;
        case 'f':       goto yy14;
        case 'n':       goto yy4;
        case 'o':       goto yy12;
        case 't':       goto yy10;
        case 'y':       goto yy8;
        case '~':       goto yy2;
        default:        goto yy23;
        }
yy2:    ++YYCURSOR;
        if((yych = *YYCURSOR) <= 0x00)  goto yy6;
        goto yy3;
yy3:
#line 123 "implicit.re"
{   return "str"; }
#line 100 "<stdout>"
yy4:    yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case 'o':       goto yy172;
        case 'u':       goto yy200;
        default:        goto yy3;
        }
yy5:    yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case 'O':       case 'o':       goto yy172;
        case 'U':       goto yy195;
        case 'u':       goto yy196;
        default:        goto yy3;
        }
yy6:    ++YYCURSOR;
        goto yy7;
yy7:
#line 85 "implicit.re"
{   return "null"; }
#line 121 "<stdout>"
yy8:    yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case 'e':       goto yy194;
        default:        goto yy3;
        }
yy9:    yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case 'E':       goto yy192;
        case 'e':       goto yy193;
        default:        goto yy3;
        }
yy10:   yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case 'r':       goto yy190;
        default:        goto yy3;
        }
yy11:   yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case 'R':       goto yy186;
        case 'r':       goto yy187;
        default:        goto yy3;
        }
yy12:   yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case 'f':       goto yy185;
        case 'n':       goto yy182;
        default:        goto yy3;
        }
yy13:   yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case 'F':       goto yy180;
        case 'N':       case 'n':       goto yy182;
        case 'f':       goto yy181;
        default:        goto yy3;
        }
yy14:   yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case 'a':       goto yy177;
        default:        goto yy3;
        }
yy15:   yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case 'A':       goto yy168;
        case 'a':       goto yy169;
        default:        goto yy3;
        }
yy16:   yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case '.':       goto yy167;
        case '0':       goto yy158;
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy47;
        default:        goto yy3;
        }
yy17:   yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case '.':       goto yy157;
        case '0':       goto yy158;
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy47;
        default:        goto yy3;
        }
yy18:   yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case 0x00:      goto yy52;
        case ',':       goto yy142;
        case '.':       goto yy50;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':       goto yy140;
        case '8':
        case '9':       goto yy141;
        case ':':       goto yy49;
        case 'x':       goto yy144;
        default:        goto yy3;
        }
yy19:   yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case 0x00:      goto yy52;
        case ',':       goto yy47;
        case '.':       goto yy50;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy46;
        case ':':       goto yy49;
        default:        goto yy3;
        }
yy20:   yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case 'I':       goto yy33;
        case 'N':       goto yy31;
        case 'i':       goto yy32;
        case 'n':       goto yy30;
        default:        goto yy3;
        }
yy21:   yych = *++YYCURSOR;
        if(yych <= 0x00)        goto yy28;
        goto yy3;
yy22:   yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case '<':       goto yy24;
        default:        goto yy3;
        }
yy23:   yych = *++YYCURSOR;
        goto yy3;
yy24:   yych = *++YYCURSOR;
        if(yych <= 0x00)        goto yy26;
        goto yy25;
yy25:   YYCURSOR = YYMARKER;
        switch(yyaccept){
        case 0: goto yy3;
        }
yy26:   ++YYCURSOR;
        goto yy27;
yy27:
#line 121 "implicit.re"
{   return "merge"; }
#line 279 "<stdout>"
yy28:   ++YYCURSOR;
        goto yy29;
yy29:
#line 119 "implicit.re"
{   return "default"; }
#line 285 "<stdout>"
yy30:   yych = *++YYCURSOR;
        switch(yych){
        case 'a':       goto yy45;
        default:        goto yy25;
        }
yy31:   yych = *++YYCURSOR;
        switch(yych){
        case 'A':       goto yy40;
        case 'a':       goto yy41;
        default:        goto yy25;
        }
yy32:   yych = *++YYCURSOR;
        switch(yych){
        case 'n':       goto yy39;
        default:        goto yy25;
        }
yy33:   yych = *++YYCURSOR;
        switch(yych){
        case 'N':       goto yy34;
        case 'n':       goto yy35;
        default:        goto yy25;
        }
yy34:   yych = *++YYCURSOR;
        switch(yych){
        case 'F':       goto yy36;
        default:        goto yy25;
        }
yy35:   yych = *++YYCURSOR;
        switch(yych){
        case 'f':       goto yy36;
        default:        goto yy25;
        }
yy36:   yych = *++YYCURSOR;
        if(yych >= 0x01)        goto yy25;
        goto yy37;
yy37:   ++YYCURSOR;
        goto yy38;
yy38:
#line 105 "implicit.re"
{   return "float#inf"; }
#line 326 "<stdout>"
yy39:   yych = *++YYCURSOR;
        switch(yych){
        case 'f':       goto yy36;
        default:        goto yy25;
        }
yy40:   yych = *++YYCURSOR;
        switch(yych){
        case 'N':       goto yy42;
        default:        goto yy25;
        }
yy41:   yych = *++YYCURSOR;
        switch(yych){
        case 'N':       goto yy42;
        default:        goto yy25;
        }
yy42:   yych = *++YYCURSOR;
        if(yych >= 0x01)        goto yy25;
        goto yy43;
yy43:   ++YYCURSOR;
        goto yy44;
yy44:
#line 109 "implicit.re"
{   return "float#nan"; }
#line 350 "<stdout>"
yy45:   yych = *++YYCURSOR;
        switch(yych){
        case 'n':       goto yy42;
        default:        goto yy25;
        }
yy46:   yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy74;
        default:        goto yy48;
        }
yy47:   ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy48;
yy48:   switch(yych){
        case 0x00:      goto yy52;
        case ',':       case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy47;
        case '.':       goto yy50;
        case ':':       goto yy49;
        default:        goto yy25;
        }
yy49:   ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':       goto yy66;
        case '6':
        case '7':
        case '8':
        case '9':       goto yy67;
        default:        goto yy25;
        }
yy50:   ++YYCURSOR;
        if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
        yych = *YYCURSOR;
        goto yy51;
yy51:   switch(yych){
        case 0x00:      goto yy56;
        case ',':       goto yy54;
        case '.':       goto yy58;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy50;
        case 'E':       case 'e':       goto yy60;
        default:        goto yy25;
        }
yy52:   ++YYCURSOR;
        goto yy53;
yy53:
#line 97 "implicit.re"
{   return "int"; }
#line 432 "<stdout>"
yy54:   ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy55;
yy55:   switch(yych){
        case 0x00:      goto yy56;
        case ',':       case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy54;
        default:        goto yy25;
        }
yy56:   ++YYCURSOR;
        goto yy57;
yy57:
#line 99 "implicit.re"
{   return "float#fix"; }
#line 456 "<stdout>"
yy58:   ++YYCURSOR;
        if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
        yych = *YYCURSOR;
        goto yy59;
yy59:   switch(yych){
        case '.':       case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy58;
        case 'E':       case 'e':       goto yy60;
        default:        goto yy25;
        }
yy60:   yych = *++YYCURSOR;
        switch(yych){
        case '+':       case '-':       goto yy61;
        default:        goto yy25;
        }
yy61:   yych = *++YYCURSOR;
        if(yych <= 0x00)        goto yy25;
        goto yy63;
yy62:   ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy63;
yy63:   switch(yych){
        case 0x00:      goto yy64;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy62;
        default:        goto yy25;
        }
yy64:   ++YYCURSOR;
        goto yy65;
yy65:
#line 101 "implicit.re"
{   return "float#exp"; }
#line 506 "<stdout>"
yy66:   ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        switch(yych){
        case 0x00:      goto yy70;
        case '.':       goto yy68;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy67;
        case ':':       goto yy49;
        default:        goto yy25;
        }
yy67:   ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        switch(yych){
        case 0x00:      goto yy70;
        case '.':       goto yy68;
        case ':':       goto yy49;
        default:        goto yy25;
        }
yy68:   ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy69;
yy69:   switch(yych){
        case 0x00:      goto yy72;
        case ',':       case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy68;
        default:        goto yy25;
        }
yy70:   ++YYCURSOR;
        goto yy71;
yy71:
#line 95 "implicit.re"
{   return "int#base60"; }
#line 558 "<stdout>"
yy72:   ++YYCURSOR;
        goto yy73;
yy73:
#line 103 "implicit.re"
{   return "float#base60"; }
#line 564 "<stdout>"
yy74:   yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy75;
        default:        goto yy48;
        }
yy75:   yych = *++YYCURSOR;
        switch(yych){
        case '-':       goto yy76;
        default:        goto yy48;
        }
yy76:   yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy77;
        default:        goto yy25;
        }
yy77:   yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy78;
        default:        goto yy25;
        }
yy78:   yych = *++YYCURSOR;
        switch(yych){
        case '-':       goto yy79;
        default:        goto yy25;
        }
yy79:   yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy80;
        default:        goto yy25;
        }
yy80:   yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy81;
        default:        goto yy25;
        }
yy81:   yych = *++YYCURSOR;
        switch(yych){
        case 0x00:      goto yy82;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy25;
        case 'T':       goto yy84;
        case 't':       goto yy85;
        default:        goto yy87;
        }
yy82:   ++YYCURSOR;
        goto yy83;
yy83:
#line 111 "implicit.re"
{   return "timestamp#ymd"; }
#line 667 "<stdout>"
yy84:   yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy126;
        default:        goto yy25;
        }
yy85:   yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy108;
        default:        goto yy25;
        }
yy86:   ++YYCURSOR;
        if((YYLIMIT - YYCURSOR) < 9) YYFILL(9);
        yych = *YYCURSOR;
        goto yy87;
yy87:   switch(yych){
        case 0x09:      case ' ':       goto yy86;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy88;
        default:        goto yy25;
        }
yy88:   yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy89;
        default:        goto yy25;
        }
yy89:   yych = *++YYCURSOR;
        switch(yych){
        case ':':       goto yy90;
        default:        goto yy25;
        }
yy90:   yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy91;
        default:        goto yy25;
        }
yy91:   yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy92;
        default:        goto yy25;
        }
yy92:   yych = *++YYCURSOR;
        switch(yych){
        case ':':       goto yy93;
        default:        goto yy25;
        }
yy93:   yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy94;
        default:        goto yy25;
        }
yy94:   yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy95;
        default:        goto yy25;
        }
yy95:   yych = *++YYCURSOR;
        switch(yych){
        case 0x09:      case ' ':       goto yy98;
        case '.':       goto yy96;
        default:        goto yy25;
        }
yy96:   ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy97;
yy97:   switch(yych){
        case 0x09:      case ' ':       goto yy98;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy96;
        default:        goto yy25;
        }
yy98:   ++YYCURSOR;
        if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
        yych = *YYCURSOR;
        goto yy99;
yy99:   switch(yych){
        case 0x09:      case ' ':       goto yy98;
        case '+':       case '-':       goto yy101;
        case 'Z':       goto yy100;
        default:        goto yy25;
        }
yy100:  yych = *++YYCURSOR;
        if(yych <= 0x00)        goto yy105;
        goto yy25;
yy101:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy102;
        default:        goto yy25;
        }
yy102:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy103;
        default:        goto yy25;
        }
yy103:  yych = *++YYCURSOR;
        switch(yych){
        case 0x00:      goto yy105;
        case ':':       goto yy104;
        default:        goto yy25;
        }
yy104:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy107;
        default:        goto yy25;
        }
yy105:  ++YYCURSOR;
        goto yy106;
yy106:
#line 115 "implicit.re"
{   return "timestamp#spaced"; }
#line 884 "<stdout>"
yy107:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy100;
        default:        goto yy25;
        }
yy108:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy109;
        default:        goto yy25;
        }
yy109:  yych = *++YYCURSOR;
        switch(yych){
        case ':':       goto yy110;
        default:        goto yy25;
        }
yy110:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy111;
        default:        goto yy25;
        }
yy111:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy112;
        default:        goto yy25;
        }
yy112:  yych = *++YYCURSOR;
        switch(yych){
        case ':':       goto yy113;
        default:        goto yy25;
        }
yy113:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy114;
        default:        goto yy25;
        }
yy114:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy115;
        default:        goto yy25;
        }
yy115:  yych = *++YYCURSOR;
        switch(yych){
        case '.':       goto yy116;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy25;
        default:        goto yy117;
        }
yy116:  ++YYCURSOR;
        if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
        yych = *YYCURSOR;
        goto yy117;
yy117:  switch(yych){
        case '+':       case '-':       goto yy119;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy116;
        case 'Z':       goto yy118;
        default:        goto yy25;
        }
yy118:  yych = *++YYCURSOR;
        if(yych <= 0x00)        goto yy123;
        goto yy25;
yy119:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy120;
        default:        goto yy25;
        }
yy120:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy121;
        default:        goto yy25;
        }
yy121:  yych = *++YYCURSOR;
        switch(yych){
        case 0x00:      goto yy123;
        case ':':       goto yy122;
        default:        goto yy25;
        }
yy122:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy125;
        default:        goto yy25;
        }
yy123:  ++YYCURSOR;
        goto yy124;
yy124:
#line 113 "implicit.re"
{   return "timestamp#iso8601"; }
#line 1069 "<stdout>"
yy125:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy118;
        default:        goto yy25;
        }
yy126:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy127;
        default:        goto yy25;
        }
yy127:  yych = *++YYCURSOR;
        switch(yych){
        case ':':       goto yy128;
        default:        goto yy25;
        }
yy128:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy129;
        default:        goto yy25;
        }
yy129:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy130;
        default:        goto yy25;
        }
yy130:  yych = *++YYCURSOR;
        switch(yych){
        case ':':       goto yy131;
        default:        goto yy25;
        }
yy131:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy132;
        default:        goto yy25;
        }
yy132:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy133;
        default:        goto yy25;
        }
yy133:  yych = *++YYCURSOR;
        switch(yych){
        case '.':       goto yy134;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy25;
        case 'Z':       goto yy136;
        default:        goto yy135;
        }
yy134:  ++YYCURSOR;
        if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
        yych = *YYCURSOR;
        goto yy135;
yy135:  switch(yych){
        case '+':       case '-':       goto yy119;
        case '0':       goto yy134;
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy138;
        case 'Z':       goto yy118;
        default:        goto yy25;
        }
yy136:  yych = *++YYCURSOR;
        if(yych >= 0x01)        goto yy25;
        goto yy137;
yy137:  yych = *++YYCURSOR;
        goto yy124;
yy138:  ++YYCURSOR;
        if((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
        yych = *YYCURSOR;
        goto yy139;
yy139:  switch(yych){
        case '+':       case '-':       goto yy119;
        case '0':       goto yy134;
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy138;
        case 'Z':       goto yy136;
        default:        goto yy25;
        }
yy140:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':       goto yy155;
        case '8':
        case '9':       goto yy153;
        default:        goto yy143;
        }
yy141:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy153;
        default:        goto yy152;
        }
yy142:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy143;
yy143:  switch(yych){
        case 0x00:      goto yy149;
        case ',':       case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':       goto yy142;
        case '.':       goto yy50;
        case '8':
        case '9':       goto yy151;
        case ':':       goto yy49;
        default:        goto yy25;
        }
yy144:  yych = *++YYCURSOR;
        if(yych <= 0x00)        goto yy25;
        goto yy146;
yy145:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy146;
yy146:  switch(yych){
        case 0x00:      goto yy147;
        case ',':       case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':       goto yy145;
        default:        goto yy25;
        }
yy147:  ++YYCURSOR;
        goto yy148;
yy148:
#line 91 "implicit.re"
{   return "int#hex"; }
#line 1307 "<stdout>"
yy149:  ++YYCURSOR;
        goto yy150;
yy150:
#line 93 "implicit.re"
{   return "int#oct"; }
#line 1313 "<stdout>"
yy151:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy152;
yy152:  switch(yych){
        case ',':       case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy151;
        case '.':       goto yy50;
        case ':':       goto yy49;
        default:        goto yy25;
        }
yy153:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy154;
        default:        goto yy152;
        }
yy154:  yych = *++YYCURSOR;
        switch(yych){
        case '-':       goto yy76;
        default:        goto yy152;
        }
yy155:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':       goto yy156;
        case '8':
        case '9':       goto yy154;
        default:        goto yy143;
        }
yy156:  yych = *++YYCURSOR;
        switch(yych){
        case '-':       goto yy76;
        default:        goto yy143;
        }
yy157:  yych = *++YYCURSOR;
        switch(yych){
        case 'I':       goto yy160;
        case 'i':       goto yy159;
        default:        goto yy25;
        }
yy158:  yych = *++YYCURSOR;
        switch(yych){
        case 0x00:      goto yy52;
        case 'x':       goto yy144;
        default:        goto yy143;
        }
yy159:  yych = *++YYCURSOR;
        switch(yych){
        case 'n':       goto yy166;
        default:        goto yy25;
        }
yy160:  yych = *++YYCURSOR;
        switch(yych){
        case 'N':       goto yy161;
        case 'n':       goto yy162;
        default:        goto yy25;
        }
yy161:  yych = *++YYCURSOR;
        switch(yych){
        case 'F':       goto yy163;
        default:        goto yy25;
        }
yy162:  yych = *++YYCURSOR;
        switch(yych){
        case 'f':       goto yy163;
        default:        goto yy25;
        }
yy163:  yych = *++YYCURSOR;
        if(yych >= 0x01)        goto yy25;
        goto yy164;
yy164:  ++YYCURSOR;
        goto yy165;
yy165:
#line 107 "implicit.re"
{   return "float#neginf"; }
#line 1412 "<stdout>"
yy166:  yych = *++YYCURSOR;
        switch(yych){
        case 'f':       goto yy163;
        default:        goto yy25;
        }
yy167:  yych = *++YYCURSOR;
        switch(yych){
        case 'I':       goto yy33;
        case 'i':       goto yy32;
        default:        goto yy25;
        }
yy168:  yych = *++YYCURSOR;
        switch(yych){
        case 'L':       goto yy175;
        default:        goto yy25;
        }
yy169:  yych = *++YYCURSOR;
        switch(yych){
        case 'l':       goto yy170;
        default:        goto yy25;
        }
yy170:  yych = *++YYCURSOR;
        switch(yych){
        case 's':       goto yy171;
        default:        goto yy25;
        }
yy171:  yych = *++YYCURSOR;
        switch(yych){
        case 'e':       goto yy172;
        default:        goto yy25;
        }
yy172:  yych = *++YYCURSOR;
        if(yych >= 0x01)        goto yy25;
        goto yy173;
yy173:  ++YYCURSOR;
        goto yy174;
yy174:
#line 89 "implicit.re"
{   return "bool#no"; }
#line 1452 "<stdout>"
yy175:  yych = *++YYCURSOR;
        switch(yych){
        case 'S':       goto yy176;
        default:        goto yy25;
        }
yy176:  yych = *++YYCURSOR;
        switch(yych){
        case 'E':       goto yy172;
        default:        goto yy25;
        }
yy177:  yych = *++YYCURSOR;
        switch(yych){
        case 'l':       goto yy178;
        default:        goto yy25;
        }
yy178:  yych = *++YYCURSOR;
        switch(yych){
        case 's':       goto yy179;
        default:        goto yy25;
        }
yy179:  yych = *++YYCURSOR;
        switch(yych){
        case 'e':       goto yy172;
        default:        goto yy25;
        }
yy180:  yych = *++YYCURSOR;
        switch(yych){
        case 'F':       goto yy172;
        default:        goto yy25;
        }
yy181:  yych = *++YYCURSOR;
        switch(yych){
        case 'f':       goto yy172;
        default:        goto yy25;
        }
yy182:  yych = *++YYCURSOR;
        if(yych >= 0x01)        goto yy25;
        goto yy183;
yy183:  ++YYCURSOR;
        goto yy184;
yy184:
#line 87 "implicit.re"
{   return "bool#yes"; }
#line 1496 "<stdout>"
yy185:  yych = *++YYCURSOR;
        switch(yych){
        case 'f':       goto yy172;
        default:        goto yy25;
        }
yy186:  yych = *++YYCURSOR;
        switch(yych){
        case 'U':       goto yy189;
        default:        goto yy25;
        }
yy187:  yych = *++YYCURSOR;
        switch(yych){
        case 'u':       goto yy188;
        default:        goto yy25;
        }
yy188:  yych = *++YYCURSOR;
        switch(yych){
        case 'e':       goto yy182;
        default:        goto yy25;
        }
yy189:  yych = *++YYCURSOR;
        switch(yych){
        case 'E':       goto yy182;
        default:        goto yy25;
        }
yy190:  yych = *++YYCURSOR;
        switch(yych){
        case 'u':       goto yy191;
        default:        goto yy25;
        }
yy191:  yych = *++YYCURSOR;
        switch(yych){
        case 'e':       goto yy182;
        default:        goto yy25;
        }
yy192:  yych = *++YYCURSOR;
        switch(yych){
        case 'S':       goto yy182;
        default:        goto yy25;
        }
yy193:  yych = *++YYCURSOR;
        switch(yych){
        case 's':       goto yy182;
        default:        goto yy25;
        }
yy194:  yych = *++YYCURSOR;
        switch(yych){
        case 's':       goto yy182;
        default:        goto yy25;
        }
yy195:  yych = *++YYCURSOR;
        switch(yych){
        case 'L':       goto yy199;
        default:        goto yy25;
        }
yy196:  yych = *++YYCURSOR;
        switch(yych){
        case 'l':       goto yy197;
        default:        goto yy25;
        }
yy197:  yych = *++YYCURSOR;
        switch(yych){
        case 'l':       goto yy198;
        default:        goto yy25;
        }
yy198:  yych = *++YYCURSOR;
        if(yych <= 0x00)        goto yy6;
        goto yy25;
yy199:  yych = *++YYCURSOR;
        switch(yych){
        case 'L':       goto yy198;
        default:        goto yy25;
        }
yy200:  yych = *++YYCURSOR;
        switch(yych){
        case 'l':       goto yy201;
        default:        goto yy25;
        }
yy201:  ++YYCURSOR;
        switch((yych = *YYCURSOR)) {
        case 'l':       goto yy198;
        default:        goto yy25;
        }
}
#line 125 "implicit.re"

}

/* Remove ending fragment and compare types */
int
syck_tagcmp( char *tag1, char *tag2 )
{
    if ( tag1 == tag2 ) return 1;
    if ( tag1 == NULL || tag2 == NULL ) return 0;
    else {
        int i;
        char *othorpe;
        char *tmp1 = syck_strndup( tag1, strlen( tag1 ) );
        char *tmp2 = syck_strndup( tag2, strlen( tag2 ) );
        othorpe = strstr( tmp1, "#" );
                if ( othorpe != NULL ) {
            othorpe[0] = '\0';
        }
        othorpe = strstr( tmp2, "#" );
                if ( othorpe != NULL ) {
            othorpe[0] = '\0';
        }
        i = strcmp( tmp1, tmp2 );
        S_FREE( tmp1 ); S_FREE( tmp2 );
        return i;
    }
}

char *
syck_type_id_to_uri( char *type_id )
{
    char *cursor, *limit, *marker;

    cursor = type_id;
    limit = type_id + strlen( type_id );

#line 1620 "<stdout>"
{
        YYCTYPE yych;
        unsigned int yyaccept;
        goto yy202;
        ++YYCURSOR;
yy202:
        if((YYLIMIT - YYCURSOR) < 11) YYFILL(11);
        yych = *YYCURSOR;
        switch(yych){
        case 0x00:      goto yy204;
        case '!':       goto yy208;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':       case '_':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':       case 'u':
        case 'v':
        case 'w':       case 'y':
        case 'z':       goto yy210;
        case 't':       goto yy205;
        case 'x':       goto yy207;
        default:        goto yy211;
        }
yy204:  YYCURSOR = YYMARKER;
        switch(yyaccept){
        case 0: goto yy206;
        }
yy205:  yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case ',':       goto yy216;
        case '-':       goto yy212;
        case '.':       goto yy217;
        case '/':       goto yy218;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':       case '_':       case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':       goto yy214;
        case 'a':       goto yy246;
        default:        goto yy206;
        }
yy206:
#line 202 "implicit.re"
{   return syck_taguri( YAML_DOMAIN, type_id, strlen( type_id ) ); }
#line 1768 "<stdout>"
yy207:  yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case ',':       case '.':
        case '/':
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':       case '_':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':       goto yy215;
        case '-':       goto yy236;
        default:        goto yy206;
        }
yy208:  ++YYCURSOR;
        goto yy209;
yy209:
#line 176 "implicit.re"
{   return syck_xprivate( type_id + 1, strlen( type_id ) - 1 ); }
#line 1842 "<stdout>"
yy210:  yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case ',':       goto yy216;
        case '-':       goto yy212;
        case '.':       goto yy217;
        case '/':       goto yy218;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':       case '_':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':       goto yy214;
        default:        goto yy206;
        }
yy211:  yych = *++YYCURSOR;
        goto yy206;
yy212:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy213;
yy213:  switch(yych){
        case '-':       goto yy212;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':       case '_':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':       goto yy214;
        default:        goto yy204;
        }
yy214:  ++YYCURSOR;
        if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
        yych = *YYCURSOR;
        goto yy215;
yy215:  switch(yych){
        case ',':       goto yy216;
        case '-':       goto yy212;
        case '.':       goto yy217;
        case '/':       goto yy218;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':       case '_':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':       goto yy214;
        default:        goto yy204;
        }
yy216:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy224;
        default:        goto yy204;
        }
yy217:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':       case '_':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':       goto yy220;
        default:        goto yy204;
        }
yy218:  ++YYCURSOR;
        goto yy219;
yy219:
#line 178 "implicit.re"
{   char *domain = S_ALLOC_N( char, ( YYCURSOR - type_id ) + 15 );
                    char *uri;

                    domain[0] = '\0';
                    strncat( domain, type_id, ( YYCURSOR - type_id ) - 1 );
                    strcat( domain, "." );
                    strcat( domain, YAML_DOMAIN );
                    uri = syck_taguri( domain, YYCURSOR, YYLIMIT - YYCURSOR );

                    S_FREE( domain );
                    return uri;
                }
#line 2149 "<stdout>"
yy220:  ++YYCURSOR;
        if((YYLIMIT - YYCURSOR) < 12) YYFILL(12);
        yych = *YYCURSOR;
        goto yy221;
yy221:  switch(yych){
        case ',':       goto yy216;
        case '-':       goto yy222;
        case '.':       goto yy217;
        case '/':       goto yy218;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':       case '_':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':       goto yy220;
        default:        goto yy204;
        }
yy222:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy223;
yy223:  switch(yych){
        case '-':       goto yy222;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':       case '_':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':       goto yy220;
        default:        goto yy204;
        }
yy224:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy225;
        default:        goto yy204;
        }
yy225:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy226;
        default:        goto yy204;
        }
yy226:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy227;
        default:        goto yy204;
        }
yy227:  yych = *++YYCURSOR;
        switch(yych){
        case '-':       goto yy228;
        case '/':       goto yy229;
        default:        goto yy204;
        }
yy228:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy231;
        default:        goto yy204;
        }
yy229:  ++YYCURSOR;
        goto yy230;
yy230:
#line 191 "implicit.re"
{   char *domain = S_ALLOC_N( char, YYCURSOR - type_id );
                               char *uri;

                               domain[0] = '\0';
                               strncat( domain, type_id, ( YYCURSOR - type_id ) - 1 );
                               uri = syck_taguri( domain, YYCURSOR, YYLIMIT - YYCURSOR );

                               S_FREE( domain );
                               return uri;
                            }
#line 2365 "<stdout>"
yy231:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy232;
        default:        goto yy204;
        }
yy232:  yych = *++YYCURSOR;
        switch(yych){
        case '-':       goto yy233;
        case '/':       goto yy229;
        default:        goto yy204;
        }
yy233:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy234;
        default:        goto yy204;
        }
yy234:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy235;
        default:        goto yy204;
        }
yy235:  yych = *++YYCURSOR;
        switch(yych){
        case '/':       goto yy229;
        default:        goto yy204;
        }
yy236:  yych = *++YYCURSOR;
        switch(yych){
        case 'p':       goto yy237;
        default:        goto yy213;
        }
yy237:  yych = *++YYCURSOR;
        switch(yych){
        case ',':       goto yy216;
        case '.':       goto yy217;
        case '/':       goto yy218;
        case 'r':       goto yy238;
        default:        goto yy213;
        }
yy238:  yych = *++YYCURSOR;
        switch(yych){
        case ',':       goto yy216;
        case '.':       goto yy217;
        case '/':       goto yy218;
        case 'i':       goto yy239;
        default:        goto yy213;
        }
yy239:  yych = *++YYCURSOR;
        switch(yych){
        case ',':       goto yy216;
        case '.':       goto yy217;
        case '/':       goto yy218;
        case 'v':       goto yy240;
        default:        goto yy213;
        }
yy240:  yych = *++YYCURSOR;
        switch(yych){
        case ',':       goto yy216;
        case '.':       goto yy217;
        case '/':       goto yy218;
        case 'a':       goto yy241;
        default:        goto yy213;
        }
yy241:  yych = *++YYCURSOR;
        switch(yych){
        case ',':       goto yy216;
        case '.':       goto yy217;
        case '/':       goto yy218;
        case 't':       goto yy242;
        default:        goto yy213;
        }
yy242:  yych = *++YYCURSOR;
        switch(yych){
        case ',':       goto yy216;
        case '.':       goto yy217;
        case '/':       goto yy218;
        case 'e':       goto yy243;
        default:        goto yy213;
        }
yy243:  yych = *++YYCURSOR;
        switch(yych){
        case ',':       goto yy216;
        case '.':       goto yy217;
        case '/':       goto yy218;
        case ':':       goto yy244;
        default:        goto yy213;
        }
yy244:  ++YYCURSOR;
        goto yy245;
yy245:
#line 174 "implicit.re"
{   return syck_strndup( type_id, strlen( type_id ) ); }
#line 2485 "<stdout>"
yy246:  yych = *++YYCURSOR;
        switch(yych){
        case ',':       goto yy216;
        case '.':       goto yy217;
        case '/':       goto yy218;
        case 'g':       goto yy247;
        default:        goto yy213;
        }
yy247:  yych = *++YYCURSOR;
        switch(yych){
        case ',':       goto yy216;
        case '.':       goto yy217;
        case '/':       goto yy218;
        case ':':       goto yy248;
        default:        goto yy213;
        }
yy248:  yych = *++YYCURSOR;
        switch(yych){
        case ',':
        case '-':
        case '.':       goto yy204;
        default:        goto yy250;
        }
yy249:  ++YYCURSOR;
        if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
        yych = *YYCURSOR;
        goto yy250;
yy250:  switch(yych){
        case ',':       goto yy253;
        case '-':       goto yy251;
        case '.':       goto yy254;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':       case '_':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':       goto yy249;
        default:        goto yy204;
        }
yy251:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy252;
yy252:  switch(yych){
        case '-':       goto yy251;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':       case '_':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':       goto yy249;
        default:        goto yy204;
        }
yy253:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy259;
        default:        goto yy204;
        }
yy254:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':       case '_':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':       goto yy255;
        default:        goto yy204;
        }
yy255:  ++YYCURSOR;
        if((YYLIMIT - YYCURSOR) < 12) YYFILL(12);
        yych = *YYCURSOR;
        goto yy256;
yy256:  switch(yych){
        case ',':       goto yy253;
        case '-':       goto yy257;
        case '.':       goto yy254;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':       case '_':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':       goto yy255;
        default:        goto yy204;
        }
yy257:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy258;
yy258:  switch(yych){
        case '-':       goto yy257;
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':       case '_':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':       goto yy255;
        default:        goto yy204;
        }
yy259:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy260;
        default:        goto yy204;
        }
yy260:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy261;
        default:        goto yy204;
        }
yy261:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy262;
        default:        goto yy204;
        }
yy262:  yych = *++YYCURSOR;
        switch(yych){
        case '-':       goto yy263;
        case ':':       goto yy264;
        default:        goto yy204;
        }
yy263:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy266;
        default:        goto yy204;
        }
yy264:  ++YYCURSOR;
        goto yy265;
yy265:
#line 172 "implicit.re"
{   return syck_strndup( type_id, strlen( type_id ) ); }
#line 2932 "<stdout>"
yy266:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy267;
        default:        goto yy204;
        }
yy267:  yych = *++YYCURSOR;
        switch(yych){
        case '-':       goto yy268;
        case ':':       goto yy264;
        default:        goto yy204;
        }
yy268:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy269;
        default:        goto yy204;
        }
yy269:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy270;
        default:        goto yy204;
        }
yy270:  ++YYCURSOR;
        switch((yych = *YYCURSOR)) {
        case ':':       goto yy264;
        default:        goto yy204;
        }
}
#line 204 "implicit.re"

}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/syck/node.c

root/ext/syck/node.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. syck_alloc_node
  2. syck_free_node
  3. syck_alloc_map
  4. syck_alloc_seq
  5. syck_alloc_str
  6. syck_new_str
  7. syck_new_str2
  8. syck_replace_str
  9. syck_replace_str2
  10. syck_str_blow_away_commas
  11. syck_str_read
  12. syck_new_map
  13. syck_map_empty
  14. syck_map_add
  15. syck_map_update
  16. syck_map_count
  17. syck_map_assign
  18. syck_map_read
  19. syck_new_seq
  20. syck_seq_empty
  21. syck_seq_add
  22. syck_seq_count
  23. syck_seq_assign
  24. syck_seq_read
  25. syck_free_members
/*
 * node.c
 *
 * $Author: matz $
 * $Date: 2005/09/16 09:37:44 $
 *
 * Copyright (C) 2003 why the lucky stiff
 */

#include "ruby.h"
#include "syck.h"

/*
 * Node allocation functions
 */
SyckNode *
syck_alloc_node( enum syck_kind_tag type )
{
    SyckNode *s;

    s = S_ALLOC( SyckNode );
    s->kind = type;
    s->id = 0;
    s->type_id = NULL;
    s->anchor = NULL;
    s->shortcut = NULL;

    return s;
}

void
syck_free_node( SyckNode *n )
{
    syck_free_members( n );
    if ( n->type_id != NULL )
    {
        S_FREE( n->type_id );
        n->type_id = NULL;
    }
    if ( n->anchor != NULL )
    {
        S_FREE( n->anchor );
        n->anchor = NULL;
    }
    S_FREE( n );
}

SyckNode *
syck_alloc_map()
{
    SyckNode *n;
    struct SyckMap *m;

    m = S_ALLOC( struct SyckMap );
    m->style = map_none;
    m->idx = 0;
    m->capa = ALLOC_CT;
    m->keys = S_ALLOC_N( SYMID, m->capa );
    m->values = S_ALLOC_N( SYMID, m->capa );

    n = syck_alloc_node( syck_map_kind );
    n->data.pairs = m;

    return n;
}

SyckNode *
syck_alloc_seq()
{
    SyckNode *n;
    struct SyckSeq *s;

    s = S_ALLOC( struct SyckSeq );
    s->style = seq_none;
    s->idx = 0;
    s->capa = ALLOC_CT;
    s->items = S_ALLOC_N( SYMID, s->capa );

    n = syck_alloc_node( syck_seq_kind );
    n->data.list = s;

    return n;
}

SyckNode *
syck_alloc_str()
{
    SyckNode *n;
    struct SyckStr *s;

    s = S_ALLOC( struct SyckStr );
    s->len = 0;
    s->ptr = NULL;
    s->style = scalar_none;

    n = syck_alloc_node( syck_str_kind );
    n->data.str = s;

    return n;
}

SyckNode *
syck_new_str( char *str, enum scalar_style style )
{
    return syck_new_str2( str, strlen( str ), style );
}

SyckNode *
syck_new_str2( char *str, long len, enum scalar_style style )
{
    SyckNode *n;

    n = syck_alloc_str();
    n->data.str->ptr = S_ALLOC_N( char, len + 1 );
    n->data.str->len = len;
    n->data.str->style = style;
    memcpy( n->data.str->ptr, str, len );
    n->data.str->ptr[len] = '\0';

    return n;
}

void
syck_replace_str( SyckNode *n, char *str, enum scalar_style style )
{
    syck_replace_str2( n, str, strlen( str ), style );
}

void
syck_replace_str2( SyckNode *n, char *str, long len, enum scalar_style style )
{
    if ( n->data.str != NULL )
    {
        S_FREE( n->data.str->ptr );
        n->data.str->ptr = NULL;
        n->data.str->len = 0;
    }
    n->data.str->ptr = S_ALLOC_N( char, len + 1 );
    n->data.str->len = len;
    n->data.str->style = style;
    memcpy( n->data.str->ptr, str, len );
    n->data.str->ptr[len] = '\0';
}

void
syck_str_blow_away_commas( SyckNode *n )
{
    char *go, *end;

    go = n->data.str->ptr;
    end = go + n->data.str->len;
    while ( *(++go) != '\0' )
    {
        if ( *go == ',' )
        {
            n->data.str->len -= 1;
            memmove( go, go + 1, end - go );
            end -= 1;
        }
    }
}

char *
syck_str_read( SyckNode *n )
{
    ASSERT( n != NULL );
    return n->data.str->ptr;
}

SyckNode *
syck_new_map( SYMID key, SYMID value )
{
    SyckNode *n;

    n = syck_alloc_map();
    syck_map_add( n, key, value );

    return n;
}

void
syck_map_empty( SyckNode *n )
{
    struct SyckMap *m;
    ASSERT( n != NULL );
    ASSERT( n->data.list != NULL );

    S_FREE( n->data.pairs->keys );
    S_FREE( n->data.pairs->values );
    m = n->data.pairs;
    m->idx = 0;
    m->capa = ALLOC_CT;
    m->keys = S_ALLOC_N( SYMID, m->capa );
    m->values = S_ALLOC_N( SYMID, m->capa );
}

void
syck_map_add( SyckNode *map, SYMID key, SYMID value )
{
    struct SyckMap *m;
    long idx;

    ASSERT( map != NULL );
    ASSERT( map->data.pairs != NULL );

    m = map->data.pairs;
    idx = m->idx;
    m->idx += 1;
    if ( m->idx > m->capa )
    {
        m->capa += ALLOC_CT;
        S_REALLOC_N( m->keys, SYMID, m->capa );
        S_REALLOC_N( m->values, SYMID, m->capa );
    }
    m->keys[idx] = key;
    m->values[idx] = value;
}

void
syck_map_update( SyckNode *map1, SyckNode *map2 )
{
    struct SyckMap *m1, *m2;
    long new_idx, new_capa;
    ASSERT( map1 != NULL );
    ASSERT( map2 != NULL );

    m1 = map1->data.pairs;
    m2 = map2->data.pairs;
    if ( m2->idx < 1 ) return;

    new_idx = m1->idx;
    new_idx += m2->idx;
    new_capa = m1->capa;
    while ( new_idx > new_capa )
    {
        new_capa += ALLOC_CT;
    }
    if ( new_capa > m1->capa )
    {
        m1->capa = new_capa;
        S_REALLOC_N( m1->keys, SYMID, m1->capa );
        S_REALLOC_N( m1->values, SYMID, m1->capa );
    }
    for ( new_idx = 0; new_idx < m2->idx; m1->idx++, new_idx++ )
    {
        m1->keys[m1->idx] = m2->keys[new_idx];
        m1->values[m1->idx] = m2->values[new_idx];
    }
}

long
syck_map_count( SyckNode *map )
{
    ASSERT( map != NULL );
    ASSERT( map->data.pairs != NULL );
    return map->data.pairs->idx;
}

void
syck_map_assign( SyckNode *map, enum map_part p, long idx, SYMID id )
{
    struct SyckMap *m;

    ASSERT( map != NULL );
    m = map->data.pairs;
    ASSERT( m != NULL );
    if ( p == map_key )
    {
        m->keys[idx] = id;
    }
    else
    {
        m->values[idx] = id;
    }
}

SYMID
syck_map_read( SyckNode *map, enum map_part p, long idx )
{
    struct SyckMap *m;

    ASSERT( map != NULL );
    m = map->data.pairs;
    ASSERT( m != NULL );
    if ( p == map_key )
    {
        return m->keys[idx];
    }
    else
    {
        return m->values[idx];
    }
}

SyckNode *
syck_new_seq( SYMID value )
{
    SyckNode *n;

    n = syck_alloc_seq();
    syck_seq_add( n, value );

    return n;
}

void
syck_seq_empty( SyckNode *n )
{
    struct SyckSeq *s;
    ASSERT( n != NULL );
    ASSERT( n->data.list != NULL );

    S_FREE( n->data.list->items );
    s = n->data.list;
    s->idx = 0;
    s->capa = ALLOC_CT;
    s->items = S_ALLOC_N( SYMID, s->capa );
}

void
syck_seq_add( SyckNode *arr, SYMID value )
{
    struct SyckSeq *s;
    long idx;

    ASSERT( arr != NULL );
    ASSERT( arr->data.list != NULL );

    s = arr->data.list;
    idx = s->idx;
    s->idx += 1;
    if ( s->idx > s->capa )
    {
        s->capa += ALLOC_CT;
        S_REALLOC_N( s->items, SYMID, s->capa );
    }
    s->items[idx] = value;
}

long
syck_seq_count( SyckNode *seq )
{
    ASSERT( seq != NULL );
    ASSERT( seq->data.list != NULL );
    return seq->data.list->idx;
}

void
syck_seq_assign( SyckNode *seq, long idx, SYMID id )
{
    struct SyckSeq *s;

    ASSERT( map != NULL );
    s = seq->data.list;
    ASSERT( m != NULL );
    s->items[idx] = id;
}

SYMID
syck_seq_read( SyckNode *seq, long idx )
{
    struct SyckSeq *s;

    ASSERT( seq != NULL );
    s = seq->data.list;
    ASSERT( s != NULL );
    return s->items[idx];
}

void
syck_free_members( SyckNode *n )
{
    if ( n == NULL ) return;

    switch ( n->kind  )
    {
        case syck_str_kind:
            if ( n->data.str != NULL )
            {
                S_FREE( n->data.str->ptr );
                n->data.str->ptr = NULL;
                n->data.str->len = 0;
                S_FREE( n->data.str );
                n->data.str = NULL;
            }
        break;

        case syck_seq_kind:
            if ( n->data.list != NULL )
            {
                S_FREE( n->data.list->items );
                S_FREE( n->data.list );
                n->data.list = NULL;
            }
        break;

        case syck_map_kind:
            if ( n->data.pairs != NULL )
            {
                S_FREE( n->data.pairs->keys );
                S_FREE( n->data.pairs->values );
                S_FREE( n->data.pairs );
                n->data.pairs = NULL;
            }
        break;
    }
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/syck/rubyext.c

root/ext/syck/rubyext.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. RVALUE
  2. bytestring_t
  3. S_zero
  4. S_one
  5. S_inf
  6. S_nan
  7. rb_syck_compile
  8. rb_syck_io_str_read
  9. syck_parser_assign_io
  10. syck_get_hash_aref
  11. rb_syck_mktime
  12. syck_merge_i
  13. yaml_org_handler
  14. rb_syck_load_handler
  15. rb_syck_err_handler
  16. rb_syck_bad_anchor_handler
  17. syck_set_model
  18. syck_st_mark_nodes
  19. syck_mark_parser
  20. rb_syck_free_parser
  21. syck_parser_s_alloc
  22. syck_parser_initialize
  23. syck_parser_bufsize_set
  24. syck_parser_bufsize_get
  25. syck_parser_load
  26. syck_parser_load_documents
  27. syck_parser_set_resolver
  28. syck_resolver_initialize
  29. syck_resolver_add_type
  30. syck_resolver_use_types_at
  31. syck_resolver_detect_implicit
  32. syck_resolver_node_import
  33. syck_set_ivars
  34. syck_const_find
  35. syck_resolver_transfer
  36. syck_resolver_tagurize
  37. syck_defaultresolver_detect_implicit
  38. syck_defaultresolver_node_import
  39. syck_genericresolver_node_import
  40. syck_badalias_initialize
  41. syck_badalias_cmp
  42. syck_domaintype_initialize
  43. syck_yobject_initialize
  44. syck_privatetype_initialize
  45. syck_node_mark
  46. syck_scalar_alloc
  47. syck_scalar_initialize
  48. syck_scalar_style_set
  49. syck_scalar_value_set
  50. syck_seq_alloc
  51. syck_seq_initialize
  52. syck_seq_value_set
  53. syck_seq_add_m
  54. syck_seq_style_set
  55. syck_map_alloc
  56. syck_map_initialize
  57. syck_map_value_set
  58. syck_map_add_m
  59. syck_map_style_set
  60. syck_node_init_copy
  61. syck_node_type_id_set
  62. syck_node_transform
  63. rb_syck_emitter_handler
  64. rb_syck_output_handler
  65. syck_out_mark
  66. syck_mark_emitter
  67. rb_syck_free_emitter
  68. syck_emitter_s_alloc
  69. syck_emitter_reset
  70. syck_emitter_emit
  71. syck_emitter_node_export
  72. syck_emitter_set_resolver
  73. syck_out_initialize
  74. syck_out_map
  75. syck_out_seq
  76. syck_out_scalar
  77. Init_syck
/* -*- indent-tabs-mode: nil -*- */
/*
 * rubyext.c
 *
 * $Author: ocean $
 * $Date: 2005/12/31 10:57:06 $
 *
 * Copyright (C) 2003-2005 why the lucky stiff
 */

#include "ruby.h"
#include "syck.h"
#include <sys/types.h>
#include <time.h>

typedef struct RVALUE {
    union {
#if 0
    struct {
        unsigned long flags;    /* always 0 for freed obj */
        struct RVALUE *next;
    } free;
#endif
    struct RBasic  basic;
    struct RObject object;
    struct RClass  klass;
    /*struct RFloat  flonum;*/
    /*struct RString string;*/
    struct RArray  array;
    /*struct RRegexp regexp;*/
    struct RHash   hash;
    /*struct RData   data;*/
    struct RStruct rstruct;
    /*struct RBignum bignum;*/
    /*struct RFile   file;*/
    } as;
} RVALUE;

typedef struct {
   long hash;
   char *buffer;
   long length;
   long remaining;
   int  printed;
} bytestring_t;

#define RUBY_DOMAIN   "ruby.yaml.org,2002"

/*
 * symbols and constants
 */
static ID s_new, s_utc, s_at, s_to_f, s_to_i, s_read, s_binmode, s_call, s_cmp, s_transfer, s_update, s_dup, s_haskey, s_match, s_keys, s_unpack, s_tr_bang, s_default_set, s_tag_read_class, s_tag_subclasses, s_resolver, s_push, s_emitter, s_level, s_detect_implicit, s_node_import, s_out, s_input, s_intern, s_transform, s_yaml_new, s_yaml_initialize, s_node_export, s_to_yaml, s_write, s_set_resolver;
static ID s_tags, s_domain, s_kind, s_name, s_options, s_type_id, s_type_id_set, s_style, s_style_set, s_value, s_value_set;
static VALUE sym_model, sym_generic, sym_input, sym_bytecode;
static VALUE sym_scalar, sym_seq, sym_map;
static VALUE sym_1quote, sym_2quote, sym_fold, sym_literal, sym_plain, sym_inline;
static VALUE cDate, cNode, cMap, cSeq, cScalar, cOut, cParser, cResolver, cPrivateType, cDomainType, cYObject, cBadAlias, cDefaultKey, cMergeKey, cEmitter;
static VALUE oDefaultResolver, oGenericResolver;

/*
 * my private collection of numerical oddities.
 */
static double S_zero()    { return 0.0; }
static double S_one() { return 1.0; }
static double S_inf() { return S_one() / S_zero(); }
static double S_nan() { return S_zero() / S_zero(); }

static VALUE syck_node_transform( VALUE );

/*
 * handler prototypes
 */
SYMID rb_syck_load_handler _((SyckParser *, SyckNode *));
void rb_syck_err_handler _((SyckParser *, char *));
SyckNode * rb_syck_bad_anchor_handler _((SyckParser *, char *));
void rb_syck_output_handler _((SyckEmitter *, char *, long));
void rb_syck_emitter_handler _((SyckEmitter *, st_data_t));
int syck_parser_assign_io _((SyckParser *, VALUE *));
VALUE syck_scalar_alloc _((VALUE class));
VALUE syck_seq_alloc _((VALUE class));
VALUE syck_map_alloc _((VALUE class));

struct parser_xtra {
    VALUE data;  /* Borrowed this idea from marshal.c to fix [ruby-core:8067] problem */
    VALUE proc;
    VALUE resolver;
    int taint;
};

struct emitter_xtra {
    VALUE oid;
    VALUE data;
    VALUE port;
};

/*
 * Convert YAML to bytecode
 */
VALUE
rb_syck_compile(self, port)
    VALUE self, port;
{
    SYMID oid;
    int taint;
    char *ret;
    VALUE bc;
    bytestring_t *sav;

    SyckParser *parser = syck_new_parser();
    taint = syck_parser_assign_io(parser, &port);
    syck_parser_handler( parser, syck_yaml2byte_handler );
    syck_parser_error_handler( parser, NULL );
    syck_parser_implicit_typing( parser, 0 );
    syck_parser_taguri_expansion( parser, 0 );
    oid = syck_parse( parser );
    syck_lookup_sym( parser, oid, (char **)&sav );

    ret = S_ALLOCA_N( char, strlen( sav->buffer ) + 3 );
    ret[0] = '\0';
    strcat( ret, "D\n" );
    strcat( ret, sav->buffer );

    syck_free_parser( parser );

    bc = rb_str_new2( ret );
    if ( taint )      OBJ_TAINT( bc );
    return bc;
}

/*
 * read from io.
 */
long
rb_syck_io_str_read( char *buf, SyckIoStr *str, long max_size, long skip )
{
    long len = 0;

    ASSERT( str != NULL );
    max_size -= skip;

    if ( max_size <= 0 ) max_size = 0;
    else
    {
        /*
         * call io#read.
         */
        VALUE src = (VALUE)str->ptr;
        VALUE n = LONG2NUM(max_size);
        VALUE str2 = rb_funcall2(src, s_read, 1, &n);
        if (!NIL_P(str2))
        {
            StringValue(str2);
            len = RSTRING(str2)->len;
            memcpy( buf + skip, RSTRING(str2)->ptr, len );
        }
    }
    len += skip;
    buf[len] = '\0';
    return len;
}

/*
 * determine: are we reading from a string or io?
 * (returns tainted? boolean)
 */
int
syck_parser_assign_io(parser, pport)
    SyckParser *parser;
    VALUE *pport;
{
    int taint = Qtrue;
    VALUE tmp, port = *pport;
    if (!NIL_P(tmp = rb_check_string_type(port))) {
        taint = OBJ_TAINTED(port); /* original taintedness */
        port = tmp;
        syck_parser_str( parser, RSTRING(port)->ptr, RSTRING(port)->len, NULL );
    }
    else if (rb_respond_to(port, s_read)) {
        if (rb_respond_to(port, s_binmode)) {
            rb_funcall2(port, s_binmode, 0, 0);
        }
        syck_parser_str( parser, (char *)port, 0, rb_syck_io_str_read );
    }
    else {
        rb_raise(rb_eTypeError, "instance of IO needed");
    }
    *pport = port;
    return taint;
}

/*
 * Get value in hash by key, forcing an empty hash if nil.
 */
VALUE
syck_get_hash_aref(hsh, key)
    VALUE hsh, key;
{
   VALUE val = rb_hash_aref( hsh, key );
   if ( NIL_P( val ) )
   {
       val = rb_hash_new();
       rb_hash_aset(hsh, key, val);
   }
   return val;
}

/*
 * creating timestamps
 */
SYMID
rb_syck_mktime(str, len)
    char *str;
    long len;
{
    VALUE time;
    char *ptr = str;
    VALUE year = INT2FIX(0);
    VALUE mon = INT2FIX(0);
    VALUE day = INT2FIX(0);
    VALUE hour = INT2FIX(0);
    VALUE min = INT2FIX(0);
    VALUE sec = INT2FIX(0);
    long usec;

    /* Year*/
    if ( ptr[0] != '\0' && len > 0 ) {
        year = INT2FIX(strtol(ptr, NULL, 10));
    }

    /* Month*/
    ptr += 4;
    if ( ptr[0] != '\0' && len > ptr - str ) {
        while ( !ISDIGIT( *ptr ) ) ptr++;
        mon = INT2FIX(strtol(ptr, NULL, 10));
    }

    /* Day*/
    ptr += 2;
    if ( ptr[0] != '\0' && len > ptr - str ) {
        while ( !ISDIGIT( *ptr ) ) ptr++;
        day = INT2FIX(strtol(ptr, NULL, 10));
    }

    /* Hour*/
    ptr += 2;
    if ( ptr[0] != '\0' && len > ptr - str ) {
        while ( !ISDIGIT( *ptr ) ) ptr++;
        hour = INT2FIX(strtol(ptr, NULL, 10));
    }

    /* Minute */
    ptr += 2;
    if ( ptr[0] != '\0' && len > ptr - str ) {
        while ( !ISDIGIT( *ptr ) ) ptr++;
        min = INT2FIX(strtol(ptr, NULL, 10));
    }

    /* Second */
    ptr += 2;
    if ( ptr[0] != '\0' && len > ptr - str ) {
        while ( !ISDIGIT( *ptr ) ) ptr++;
        sec = INT2FIX(strtol(ptr, NULL, 10));
    }

    /* Millisecond */
    ptr += 2;
    if ( len > ptr - str && *ptr == '.' )
    {
        char padded[] = "000000";
        char *end = ptr + 1;
        while ( isdigit( *end ) ) end++;
        MEMCPY(padded, ptr + 1, char, end - (ptr + 1));
        usec = strtol(padded, NULL, 10);
    }
    else
    {
        usec = 0;
    }

    /* Time Zone*/
    while ( len > ptr - str && *ptr != 'Z' && *ptr != '+' && *ptr != '-' && *ptr != '\0' ) ptr++;
    if ( len > ptr - str && ( *ptr == '-' || *ptr == '+' ) )
    {
        time_t tz_offset = strtol(ptr, NULL, 10) * 3600;
        time_t tmp;

        while ( *ptr != ':' && *ptr != '\0' ) ptr++;
        if ( *ptr == ':' )
        {
            ptr += 1;
            if ( tz_offset < 0 )
            {
                tz_offset -= strtol(ptr, NULL, 10) * 60;
            }
            else
            {
                tz_offset += strtol(ptr, NULL, 10) * 60;
            }
        }

        /* Make TZ time*/
        time = rb_funcall(rb_cTime, s_utc, 6, year, mon, day, hour, min, sec);
        tmp = NUM2LONG(rb_funcall(time, s_to_i, 0)) - tz_offset;
        return rb_funcall(rb_cTime, s_at, 2, LONG2NUM(tmp), LONG2NUM(usec));
    }
    else
    {
        /* Make UTC time*/
        return rb_funcall(rb_cTime, s_utc, 7, year, mon, day, hour, min, sec, LONG2NUM(usec));
    }
}

/*
 * handles merging of an array of hashes
 * (see http://www.yaml.org/type/merge/)
 */
VALUE
syck_merge_i( entry, hsh )
    VALUE entry, hsh;
{
    VALUE tmp;
    if ( !NIL_P(tmp = rb_check_convert_type(entry, T_HASH, "Hash", "to_hash")) )
    {
        entry = tmp;
        rb_funcall( hsh, s_update, 1, entry );
    }
    return Qnil;
}

/*
 * default handler for ruby.yaml.org types
 */
int
yaml_org_handler( n, ref )
    SyckNode *n;
    VALUE *ref;
{
    char *type_id = n->type_id;
    int transferred = 0;
    long i = 0;
    VALUE obj = Qnil;

    if ( type_id != NULL && strncmp( type_id, "tag:yaml.org,2002:", 18 ) == 0 )
    {
        type_id += 18;
    }

    switch (n->kind)
    {
        case syck_str_kind:
            transferred = 1;
            if ( type_id == NULL )
            {
                obj = rb_str_new( n->data.str->ptr, n->data.str->len );
            }
            else if ( strcmp( type_id, "null" ) == 0 )
            {
                obj = Qnil;
            }
            else if ( strcmp( type_id, "binary" ) == 0 )
            {
                VALUE arr;
                obj = rb_str_new( n->data.str->ptr, n->data.str->len );
                rb_funcall( obj, s_tr_bang, 2, rb_str_new2( "\n\t " ), rb_str_new2( "" ) );
                arr = rb_funcall( obj, s_unpack, 1, rb_str_new2( "m" ) );
                obj = rb_ary_shift( arr );
            }
            else if ( strcmp( type_id, "bool#yes" ) == 0 )
            {
                obj = Qtrue;
            }
            else if ( strcmp( type_id, "bool#no" ) == 0 )
            {
                obj = Qfalse;
            }
            else if ( strcmp( type_id, "int#hex" ) == 0 )
            {
                syck_str_blow_away_commas( n );
                obj = rb_cstr2inum( n->data.str->ptr, 16 );
            }
            else if ( strcmp( type_id, "int#oct" ) == 0 )
            {
                syck_str_blow_away_commas( n );
                obj = rb_cstr2inum( n->data.str->ptr, 8 );
            }
            else if ( strcmp( type_id, "int#base60" ) == 0 )
            {
                char *ptr, *end;
                long sixty = 1;
                long total = 0;
                syck_str_blow_away_commas( n );
                ptr = n->data.str->ptr;
                end = n->data.str->ptr + n->data.str->len;
                while ( end > ptr )
                {
                    long bnum = 0;
                    char *colon = end - 1;
                    while ( colon >= ptr && *colon != ':' )
                    {
                        colon--;
                    }
                    if ( colon >= ptr && *colon == ':' ) *colon = '\0';

                    bnum = strtol( colon + 1, NULL, 10 );
                    total += bnum * sixty;
                    sixty *= 60;
                    end = colon;
                }
                obj = INT2FIX(total);
            }
            else if ( strncmp( type_id, "int", 3 ) == 0 )
            {
                syck_str_blow_away_commas( n );
                obj = rb_cstr2inum( n->data.str->ptr, 10 );
            }
            else if ( strcmp( type_id, "float#base60" ) == 0 )
            {
                char *ptr, *end;
                long sixty = 1;
                double total = 0.0;
                syck_str_blow_away_commas( n );
                ptr = n->data.str->ptr;
                end = n->data.str->ptr + n->data.str->len;
                while ( end > ptr )
                {
                    double bnum = 0;
                    char *colon = end - 1;
                    while ( colon >= ptr && *colon != ':' )
                    {
                        colon--;
                    }
                    if ( colon >= ptr && *colon == ':' ) *colon = '\0';

                    bnum = strtod( colon + 1, NULL );
                    total += bnum * sixty;
                    sixty *= 60;
                    end = colon;
                }
                obj = rb_float_new( total );
            }
            else if ( strcmp( type_id, "float#nan" ) == 0 )
            {
                obj = rb_float_new( S_nan() );
            }
            else if ( strcmp( type_id, "float#inf" ) == 0 )
            {
                obj = rb_float_new( S_inf() );
            }
            else if ( strcmp( type_id, "float#neginf" ) == 0 )
            {
                obj = rb_float_new( -S_inf() );
            }
            else if ( strncmp( type_id, "float", 5 ) == 0 )
            {
                double f;
                syck_str_blow_away_commas( n );
                f = strtod( n->data.str->ptr, NULL );
                obj = rb_float_new( f );
            }
            else if ( strcmp( type_id, "timestamp#iso8601" ) == 0 )
            {
                obj = rb_syck_mktime( n->data.str->ptr, n->data.str->len );
            }
            else if ( strcmp( type_id, "timestamp#spaced" ) == 0 )
            {
                obj = rb_syck_mktime( n->data.str->ptr, n->data.str->len );
            }
            else if ( strcmp( type_id, "timestamp#ymd" ) == 0 )
            {
                char *ptr = n->data.str->ptr;
                VALUE year, mon, day;

                /* Year*/
                ptr[4] = '\0';
                year = INT2FIX(strtol(ptr, NULL, 10));

                /* Month*/
                ptr += 4;
                while ( !ISDIGIT( *ptr ) ) ptr++;
                mon = INT2FIX(strtol(ptr, NULL, 10));

                /* Day*/
                ptr += 2;
                while ( !ISDIGIT( *ptr ) ) ptr++;
                day = INT2FIX(strtol(ptr, NULL, 10));

                if ( !cDate ) {
                    /*
                     * Load Date module
                     */
                    rb_require( "date" );
                    cDate = rb_const_get( rb_cObject, rb_intern("Date") );
                }

                obj = rb_funcall( cDate, s_new, 3, year, mon, day );
            }
            else if ( strncmp( type_id, "timestamp", 9 ) == 0 )
            {
                obj = rb_syck_mktime( n->data.str->ptr, n->data.str->len );
            }
            else if ( strncmp( type_id, "merge", 5 ) == 0 )
            {
                obj = rb_funcall( cMergeKey, s_new, 0 );
            }
            else if ( strncmp( type_id, "default", 7 ) == 0 )
            {
                obj = rb_funcall( cDefaultKey, s_new, 0 );
            }
            else if ( n->data.str->style == scalar_plain &&
                      n->data.str->len > 1 &&
                      strncmp( n->data.str->ptr, ":", 1 ) == 0 )
            {
                obj = rb_funcall( oDefaultResolver, s_transfer, 2,
                                  rb_str_new2( "tag:ruby.yaml.org,2002:sym" ),
                                  rb_str_new( n->data.str->ptr + 1, n->data.str->len - 1 ) );
            }
            else if ( strcmp( type_id, "str" ) == 0 )
            {
                obj = rb_str_new( n->data.str->ptr, n->data.str->len );
            }
            else
            {
                transferred = 0;
                obj = rb_str_new( n->data.str->ptr, n->data.str->len );
            }
        break;

        case syck_seq_kind:
            if ( type_id == NULL || strcmp( type_id, "seq" ) == 0 )
            {
                transferred = 1;
            }
            obj = rb_ary_new2( n->data.list->idx );
            for ( i = 0; i < n->data.list->idx; i++ )
            {
                rb_ary_store( obj, i, syck_seq_read( n, i ) );
            }
        break;

        case syck_map_kind:
            if ( type_id == NULL || strcmp( type_id, "map" ) == 0 )
            {
                transferred = 1;
            }
            obj = rb_hash_new();
            for ( i = 0; i < n->data.pairs->idx; i++ )
            {
                VALUE k = syck_map_read( n, map_key, i );
                VALUE v = syck_map_read( n, map_value, i );
                int skip_aset = 0;

                /*
                 * Handle merge keys
                 */
                if ( rb_obj_is_kind_of( k, cMergeKey ) )
                {
                    VALUE tmp;
                    if ( !NIL_P(tmp = rb_check_convert_type(v, T_HASH, "Hash", "to_hash")) )
                    {
                        VALUE dup = rb_funcall( tmp, s_dup, 0 );
                        rb_funcall( dup, s_update, 1, obj );
                        obj = dup;
                        skip_aset = 1;
                    }
                    else if ( !NIL_P(tmp = rb_check_array_type(v)) )
                    {
                        VALUE end = rb_ary_pop( tmp );
                        VALUE tmph = rb_check_convert_type(end, T_HASH, "Hash", "to_hash");
                        if ( !NIL_P(tmph) )
                        {
                            VALUE dup = rb_funcall( tmph, s_dup, 0 );
                            tmp = rb_ary_reverse( tmp );
                            rb_ary_push( tmp, obj );
                            rb_iterate( rb_each, tmp, syck_merge_i, dup );
                            obj = dup;
                            skip_aset = 1;
                        }
                    }
                }
                else if ( rb_obj_is_kind_of( k, cDefaultKey ) )
                {
                    rb_funcall( obj, s_default_set, 1, v );
                    skip_aset = 1;
                }

                if ( ! skip_aset )
                {
                    rb_hash_aset( obj, k, v );
                }
            }
        break;
    }

    *ref = obj;
    return transferred;
}

static void syck_node_mark( SyckNode *n );

/*
 * {native mode} node handler
 * - Converts data into native Ruby types
 */
SYMID
rb_syck_load_handler(p, n)
    SyckParser *p;
    SyckNode *n;
{
    VALUE obj = Qnil;
    struct parser_xtra *bonus = (struct parser_xtra *)p->bonus;
    VALUE resolver = bonus->resolver;
    if ( NIL_P( resolver ) )
    {
        resolver = oDefaultResolver;
    }

    /*
     * Create node,
     */
    obj = rb_funcall( resolver, s_node_import, 1, Data_Wrap_Struct( cNode, NULL, NULL, n ) );

    /*
     * ID already set, let's alter the symbol table to accept the new object
     */
    if (n->id > 0 && !NIL_P(obj))
    {
        MEMCPY((void *)n->id, (void *)obj, RVALUE, 1);
        MEMZERO((void *)obj, RVALUE, 1);
        obj = n->id;
    }

    if ( bonus->taint)      OBJ_TAINT( obj );
    if ( bonus->proc != 0 ) rb_funcall(bonus->proc, s_call, 1, obj);

    rb_hash_aset(bonus->data, INT2FIX(RHASH(bonus->data)->tbl->num_entries), obj);
    return obj;
}

/*
 * friendly errors.
 */
void
rb_syck_err_handler(p, msg)
    SyckParser *p;
    char *msg;
{
    char *endl = p->cursor;

    while ( *endl != '\0' && *endl != '\n' )
        endl++;

    endl[0] = '\0';
    rb_raise(rb_eArgError, "%s on line %d, col %d: `%s'",
           msg,
           p->linect,
           p->cursor - p->lineptr,
           p->lineptr);
}

/*
 * provide bad anchor object to the parser.
 */
SyckNode *
rb_syck_bad_anchor_handler(p, a)
    SyckParser *p;
    char *a;
{
    VALUE anchor_name = rb_str_new2( a );
    SyckNode *badanc = syck_new_map( rb_str_new2( "name" ), anchor_name );
    badanc->type_id = syck_strndup( "tag:ruby.yaml.org,2002:object:YAML::Syck::BadAlias", 53 );
    return badanc;
}

/*
 * data loaded based on the model requested.
 */
void
syck_set_model( p, input, model )
    VALUE p, input, model;
{
    SyckParser *parser;
    Data_Get_Struct(p, SyckParser, parser);
    syck_parser_handler( parser, rb_syck_load_handler );
    /* WARN: gonna be obsoleted soon!! */
    if ( model == sym_generic )
    {
        rb_funcall( p, s_set_resolver, 1, oGenericResolver );
    }
    syck_parser_implicit_typing( parser, 1 );
    syck_parser_taguri_expansion( parser, 1 );

    if ( NIL_P( input ) )
    {
        input = rb_ivar_get( p, s_input );
    }
    if ( input == sym_bytecode )
    {
        syck_parser_set_input_type( parser, syck_bytecode_utf8 );
    }
    else
    {
        syck_parser_set_input_type( parser, syck_yaml_utf8 );
    }
    syck_parser_error_handler( parser, rb_syck_err_handler );
    syck_parser_bad_anchor_handler( parser, rb_syck_bad_anchor_handler );
}

static int
syck_st_mark_nodes( char *key, SyckNode *n, char *arg )
{
    if ( n != (void *)1 ) syck_node_mark( n );
    return ST_CONTINUE;
}

/*
 * mark parser nodes
 */
static void
syck_mark_parser(parser)
    SyckParser *parser;
{
    struct parser_xtra *bonus = (struct parser_xtra *)parser->bonus;
    rb_gc_mark_maybe(parser->root);
    rb_gc_mark_maybe(parser->root_on_error);
    rb_gc_mark( bonus->data );
    rb_gc_mark( bonus->proc );
    rb_gc_mark( bonus->resolver );

    if ( parser->anchors != NULL )
    {
        st_foreach( parser->anchors, syck_st_mark_nodes, 0 );
    }
    if ( parser->bad_anchors != NULL )
    {
        st_foreach( parser->bad_anchors, syck_st_mark_nodes, 0 );
    }
}

/*
 * Free the parser and any bonus attachment.
 */
void
rb_syck_free_parser(p)
    SyckParser *p;
{
    S_FREE( p->bonus );
    syck_free_parser(p);
}

/*
 * YAML::Syck::Parser.allocate
 */
VALUE syck_parser_s_alloc _((VALUE));
VALUE
syck_parser_s_alloc(class)
    VALUE class;
{
    VALUE pobj;
    SyckParser *parser = syck_new_parser();

    parser->bonus = S_ALLOC( struct parser_xtra );
    S_MEMZERO( parser->bonus, struct parser_xtra, 1 );

    pobj = Data_Wrap_Struct( class, syck_mark_parser, rb_syck_free_parser, parser );

    syck_parser_set_root_on_error( parser, Qnil );

    return pobj;
}

/*
 * YAML::Syck::Parser.initialize( resolver, options )
 */
static VALUE
syck_parser_initialize(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    VALUE options;
    if (rb_scan_args(argc, argv, "01", &options) == 0)
    {
        options = rb_hash_new();
    }
    else
    {
        Check_Type(options, T_HASH);
    }
    rb_ivar_set(self, s_options, options);
    rb_ivar_set(self, s_input, Qnil);
    return self;
}

/*
 * YAML::Syck::Parser.bufsize = Integer
 */
static VALUE
syck_parser_bufsize_set( self, size )
    VALUE self, size;
{
    SyckParser *parser;

    if ( rb_respond_to( size, s_to_i ) ) {
        int n = NUM2INT(rb_funcall(size, s_to_i, 0));
        Data_Get_Struct(self, SyckParser, parser);
        parser->bufsize = n;
    }
    return self;
}

/*
 * YAML::Syck::Parser.bufsize => Integer
 */
static VALUE
syck_parser_bufsize_get( self )
    VALUE self;
{
    SyckParser *parser;

    Data_Get_Struct(self, SyckParser, parser);
    return INT2FIX( parser->bufsize );
}

/*
 * YAML::Syck::Parser.load( IO or String )
 */
VALUE
syck_parser_load(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    VALUE port, proc, model, input;
    SyckParser *parser;
    struct parser_xtra *bonus;

    rb_scan_args(argc, argv, "11", &port, &proc);

    input = rb_hash_aref( rb_attr_get( self, s_options ), sym_input );
    model = rb_hash_aref( rb_attr_get( self, s_options ), sym_model );
    Data_Get_Struct(self, SyckParser, parser);
    syck_set_model( self, input, model );

    bonus = (struct parser_xtra *)parser->bonus;
    bonus->taint = syck_parser_assign_io(parser, &port);
    bonus->data = rb_hash_new();
    bonus->resolver = rb_attr_get( self, s_resolver );
    if ( NIL_P( proc ) ) bonus->proc = 0;
    else                 bonus->proc = proc;

    return syck_parse( parser );
}

/*
 * YAML::Syck::Parser.load_documents( IO or String ) { |doc| }
 */
VALUE
syck_parser_load_documents(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    VALUE port, proc, v, input, model;
    SyckParser *parser;
    struct parser_xtra *bonus;

    rb_scan_args(argc, argv, "1&", &port, &proc);

    input = rb_hash_aref( rb_attr_get( self, s_options ), sym_input );
    model = rb_hash_aref( rb_attr_get( self, s_options ), sym_model );
    Data_Get_Struct(self, SyckParser, parser);
    syck_set_model( self, input, model );

    bonus = (struct parser_xtra *)parser->bonus;
    bonus->taint = syck_parser_assign_io(parser, &port);
    bonus->resolver = rb_attr_get( self, s_resolver );
    bonus->proc = 0;

    while ( 1 )
    {
        /* Reset hash for tracking nodes */
        bonus->data = rb_hash_new();

        /* Parse a document */
        v = syck_parse( parser );
        if ( parser->eof == 1 )
        {
            break;
        }

        /* Pass document to block */
        rb_funcall( proc, s_call, 1, v );
    }

    return Qnil;
}

/*
 * YAML::Syck::Parser#set_resolver
 */
VALUE
syck_parser_set_resolver( self, resolver )
    VALUE self, resolver;
{
    rb_ivar_set( self, s_resolver, resolver );
    return self;
}

/*
 * YAML::Syck::Resolver.initialize
 */
static VALUE
syck_resolver_initialize( self )
    VALUE self;
{
    VALUE tags = rb_hash_new();
    rb_ivar_set(self, s_tags, rb_hash_new());
    return self;
}

/*
 * YAML::Syck::Resolver#add_type
 */
VALUE
syck_resolver_add_type( self, taguri, cls )
    VALUE self, taguri, cls;
{
    VALUE tags = rb_attr_get(self, s_tags);
    rb_hash_aset( tags, taguri, cls );
    return Qnil;
}

/*
 * YAML::Syck::Resolver#use_types_at
 */
VALUE
syck_resolver_use_types_at( self, hsh )
    VALUE self, hsh;
{
    rb_ivar_set( self, s_tags, hsh );
    return Qnil;
}

/*
 * YAML::Syck::Resolver#detect_implicit
 */
VALUE
syck_resolver_detect_implicit( self, val )
    VALUE self, val;
{
    char *type_id;
    return rb_str_new2( "" );
}

/*
 * YAML::Syck::Resolver#node_import
 */
VALUE
syck_resolver_node_import( self, node )
    VALUE self, node;
{
    SyckNode *n;
    VALUE obj;
    int i = 0;
    Data_Get_Struct(node, SyckNode, n);

    switch (n->kind)
    {
        case syck_str_kind:
            obj = rb_str_new( n->data.str->ptr, n->data.str->len );
        break;

        case syck_seq_kind:
            obj = rb_ary_new2( n->data.list->idx );
            for ( i = 0; i < n->data.list->idx; i++ )
            {
                rb_ary_store( obj, i, syck_seq_read( n, i ) );
            }
        break;

        case syck_map_kind:
            obj = rb_hash_new();
            for ( i = 0; i < n->data.pairs->idx; i++ )
            {
                VALUE k = syck_map_read( n, map_key, i );
                VALUE v = syck_map_read( n, map_value, i );
                int skip_aset = 0;

                /*
                 * Handle merge keys
                 */
                if ( rb_obj_is_kind_of( k, cMergeKey ) )
                {
                    if ( rb_obj_is_kind_of( v, rb_cHash ) )
                    {
                        VALUE dup = rb_funcall( v, s_dup, 0 );
                        rb_funcall( dup, s_update, 1, obj );
                        obj = dup;
                        skip_aset = 1;
                    }
                    else if ( rb_obj_is_kind_of( v, rb_cArray ) )
                    {
                        VALUE end = rb_ary_pop( v );
                        if ( rb_obj_is_kind_of( end, rb_cHash ) )
                        {
                            VALUE dup = rb_funcall( end, s_dup, 0 );
                            v = rb_ary_reverse( v );
                            rb_ary_push( v, obj );
                            rb_iterate( rb_each, v, syck_merge_i, dup );
                            obj = dup;
                            skip_aset = 1;
                        }
                    }
                }
                else if ( rb_obj_is_kind_of( k, cDefaultKey ) )
                {
                    rb_funcall( obj, s_default_set, 1, v );
                    skip_aset = 1;
                }

                if ( ! skip_aset )
                {
                    rb_hash_aset( obj, k, v );
                }
            }
        break;
    }

    if ( n->type_id != NULL )
    {
        obj = rb_funcall( self, s_transfer, 2, rb_str_new2( n->type_id ), obj );
    }
    return obj;
}

/*
 * Set instance variables
 */
VALUE
syck_set_ivars( vars, obj )
    VALUE vars, obj;
{
    VALUE ivname = rb_ary_entry( vars, 0 );
    char *ivn;
    StringValue( ivname );
    ivn = S_ALLOCA_N( char, RSTRING(ivname)->len + 2 );
    ivn[0] = '@';
    ivn[1] = '\0';
    strncat( ivn, RSTRING(ivname)->ptr, RSTRING(ivname)->len );
    rb_iv_set( obj, ivn, rb_ary_entry( vars, 1 ) );
    return Qnil;
}

/*
 * YAML::Syck::Resolver#const_find
 */
VALUE
syck_const_find( const_name )
    VALUE const_name;
{
    VALUE tclass = rb_cObject;
    VALUE tparts = rb_str_split( const_name, "::" );
    int i = 0;
    for ( i = 0; i < RARRAY(tparts)->len; i++ ) {
        VALUE tpart = rb_to_id( rb_ary_entry( tparts, i ) );
        if ( !rb_const_defined( tclass, tpart ) ) return Qnil;
        tclass = rb_const_get( tclass, tpart );
    }
    return tclass;
}

/*
 * YAML::Syck::Resolver#transfer
 */
VALUE
syck_resolver_transfer( self, type, val )
    VALUE self, type, val;
{
    if (NIL_P(type) || RSTRING(StringValue(type))->len == 0)
    {
        type = rb_funcall( self, s_detect_implicit, 1, val );
    }

    if ( ! (NIL_P(type) || RSTRING(StringValue(type))->len == 0) )
    {
        VALUE str_xprivate = rb_str_new2( "x-private" );
        VALUE colon = rb_str_new2( ":" );
        VALUE tags = rb_attr_get(self, s_tags);
        VALUE target_class = rb_hash_aref( tags, type );
        VALUE subclass = target_class;
        VALUE obj = Qnil;

        /*
         * Should no tag match exactly, check for subclass format
         */
        if ( NIL_P( target_class ) )
        {
            VALUE subclass_parts = rb_ary_new();
            VALUE parts = rb_str_split( type, ":" );

            while ( RARRAY(parts)->len > 1 )
            {
                VALUE partial;
                rb_ary_unshift( subclass_parts, rb_ary_pop( parts ) );
                partial = rb_ary_join( parts, colon );
                target_class = rb_hash_aref( tags, partial );
                if ( NIL_P( target_class ) )
                {
                    rb_str_append( partial, colon );
                    target_class = rb_hash_aref( tags, partial );
                }

                /*
                 * Possible subclass found, see if it supports subclassing
                 */
                if ( ! NIL_P( target_class ) )
                {
                    subclass = target_class;
                    if ( RARRAY(subclass_parts)->len > 0 && rb_respond_to( target_class, s_tag_subclasses ) &&
                         RTEST( rb_funcall( target_class, s_tag_subclasses, 0 ) ) )
                    {
                        VALUE subclass_v;
                        subclass = rb_ary_join( subclass_parts, colon );
                        subclass = rb_funcall( target_class, s_tag_read_class, 1, subclass );
                        subclass_v = syck_const_find( subclass );

                        if ( subclass_v != Qnil )
                        {
                            subclass = subclass_v;
                        }
                        else if ( rb_cObject == target_class && subclass_v == Qnil )
                        {
                            target_class = cYObject;
                            type = subclass;
                            subclass = cYObject;
                        }
                    }
                    break;
                }
            }
        }

        /* rb_raise(rb_eTypeError, "invalid typing scheme: %s given",
         *         scheme);
         */

        if ( rb_respond_to( target_class, s_call ) )
        {
            obj = rb_funcall( target_class, s_call, 2, type, val );
        }
        else
        {
            if ( rb_respond_to( target_class, s_yaml_new ) )
            {
                obj = rb_funcall( target_class, s_yaml_new, 3, subclass, type, val );
            }
            else if ( !NIL_P( target_class ) )
            {
                obj = rb_obj_alloc( subclass );
                if ( rb_respond_to( obj, s_yaml_initialize ) )
                {
                    rb_funcall( obj, s_yaml_initialize, 2, type, val );
                }
                else if ( !NIL_P( obj ) && rb_obj_is_instance_of( val, rb_cHash ) )
                {
                    rb_iterate( rb_each, val, syck_set_ivars, obj );
                }
            }
            else
            {
                VALUE parts = rb_str_split( type, ":" );
                VALUE scheme = rb_ary_shift( parts );
                if ( rb_str_cmp( scheme, str_xprivate ) == 0 )
                {
                    VALUE name = rb_ary_join( parts, colon );
                    obj = rb_funcall( cPrivateType, s_new, 2, name, val );
                }
                else
                {
                    VALUE domain = rb_ary_shift( parts );
                    VALUE name = rb_ary_join( parts, colon );
                    obj = rb_funcall( cDomainType, s_new, 3, domain, name, val );
                }
            }
        }
        val = obj;
    }

    return val;
}

/*
 * YAML::Syck::Resolver#tagurize
 */
VALUE
syck_resolver_tagurize( self, val )
    VALUE self, val;
{
    VALUE tmp = rb_check_string_type(val);

    if ( !NIL_P(tmp) )
    {
        char *taguri = syck_type_id_to_uri( RSTRING(tmp)->ptr );
        val = rb_str_new2( taguri );
        S_FREE( taguri );
    }

    return val;
}

/*
 * YAML::Syck::DefaultResolver#detect_implicit
 */
VALUE
syck_defaultresolver_detect_implicit( self, val )
    VALUE self, val;
{
    char *type_id;
    VALUE tmp = rb_check_string_type(val);

    if ( !NIL_P(tmp) )
    {
        val = tmp;
        type_id = syck_match_implicit( RSTRING(val)->ptr, RSTRING(val)->len );
        return rb_str_new2( type_id );
    }

    return rb_str_new2( "" );
}

/*
 * YAML::Syck::DefaultResolver#node_import
 */
VALUE
syck_defaultresolver_node_import( self, node )
    VALUE self, node;
{
    SyckNode *n;
    VALUE obj;
    Data_Get_Struct( node, SyckNode, n );
    if ( !yaml_org_handler( n, &obj ) )
    {
        obj = rb_funcall( self, s_transfer, 2, rb_str_new2( n->type_id ), obj );
    }
    return obj;
}

/*
 * YAML::Syck::GenericResolver#node_import
 */
VALUE
syck_genericresolver_node_import( self, node )
    VALUE self, node;
{
    SyckNode *n;
    int i = 0;
    VALUE t = Qnil, obj = Qnil, v = Qnil, style = Qnil;
    Data_Get_Struct(node, SyckNode, n);

    if ( n->type_id != NULL )
    {
        t = rb_str_new2(n->type_id);
    }

    switch (n->kind)
    {
        case syck_str_kind:
        {
            v = rb_str_new( n->data.str->ptr, n->data.str->len );
            if ( n->data.str->style == scalar_1quote )
            {
                style = sym_1quote;
            }
            else if ( n->data.str->style == scalar_2quote )
            {
                style = sym_2quote;
            }
            else if ( n->data.str->style == scalar_fold )
            {
                style = sym_fold;
            }
            else if ( n->data.str->style == scalar_literal )
            {
                style = sym_literal;
            }
            else if ( n->data.str->style == scalar_plain )
            {
                style = sym_plain;
            }
            obj = rb_funcall( cScalar, s_new, 3, t, v, style );
        }
        break;

        case syck_seq_kind:
            rb_iv_set(obj, "@kind", sym_seq);
            v = rb_ary_new2( syck_seq_count( n ) );
            for ( i = 0; i < syck_seq_count( n ); i++ )
            {
                rb_ary_store( v, i, syck_seq_read( n, i ) );
            }
            if ( n->data.list->style == seq_inline )
            {
                style = sym_inline;
            }
            obj = rb_funcall( cSeq, s_new, 3, t, v, style );
        break;

        case syck_map_kind:
            rb_iv_set(obj, "@kind", sym_map);
            v = rb_hash_new();
            for ( i = 0; i < syck_map_count( n ); i++ )
            {
                rb_hash_aset( v, syck_map_read( n, map_key, i ), syck_map_read( n, map_value, i ) );
            }
            if ( n->data.pairs->style == map_inline )
            {
                style = sym_inline;
            }
            obj = rb_funcall( cMap, s_new, 3, t, v, style );
        break;
    }

    return obj;
}

/*
 * YAML::Syck::BadAlias.initialize
 */
VALUE
syck_badalias_initialize( self, val )
    VALUE self, val;
{
    rb_iv_set( self, "@name", val );
    return self;
}

/*
 * YAML::Syck::BadAlias.<=>
 */
VALUE
syck_badalias_cmp( alias1, alias2 )
    VALUE alias1, alias2;
{
    VALUE str1 = rb_ivar_get( alias1, s_name );
    VALUE str2 = rb_ivar_get( alias2, s_name );
    VALUE val = rb_funcall( str1, s_cmp, 1, str2 );
    return val;
}

/*
 * YAML::DomainType.initialize
 */
VALUE
syck_domaintype_initialize( self, domain, type_id, val )
    VALUE self, domain, type_id, val;
{
    rb_iv_set( self, "@domain", domain );
    rb_iv_set( self, "@type_id", type_id );
    rb_iv_set( self, "@value", val );
    return self;
}

/*
 * YAML::Object.initialize
 */
VALUE
syck_yobject_initialize( self, klass, ivars )
    VALUE self, klass, ivars;
{
    rb_iv_set( self, "@class", klass );
    rb_iv_set( self, "@ivars", ivars );
    return self;
}

/*
 * YAML::PrivateType.initialize
 */
VALUE
syck_privatetype_initialize( self, type_id, val )
    VALUE self, type_id, val;
{
    rb_iv_set( self, "@type_id", type_id );
    rb_iv_set( self, "@value", val );
    return self;
}

/*
 * Mark node contents.
 */
static void
syck_node_mark( n )
    SyckNode *n;
{
    int i;
    rb_gc_mark_maybe( n->id );
    switch ( n->kind )
    {
        case syck_seq_kind:
            for ( i = 0; i < n->data.list->idx; i++ )
            {
                rb_gc_mark( syck_seq_read( n, i ) );
            }
        break;

        case syck_map_kind:
            for ( i = 0; i < n->data.pairs->idx; i++ )
            {
                rb_gc_mark( syck_map_read( n, map_key, i ) );
                rb_gc_mark( syck_map_read( n, map_value, i ) );
            }
        break;
    }
#if 0 /* maybe needed */
    if ( n->shortcut ) syck_node_mark( n->shortcut ); /* caution: maybe cyclic */
#endif
}

/*
 * YAML::Syck::Scalar.allocate
 */
VALUE
syck_scalar_alloc( class )
    VALUE class;
{
    SyckNode *node = syck_alloc_str();
    VALUE obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node );
    node->id = obj;
    return obj;
}

/*
 * YAML::Syck::Scalar.initialize
 */
VALUE
syck_scalar_initialize( self, type_id, val, style )
    VALUE self, type_id, val, style;
{
    rb_iv_set( self, "@kind", sym_scalar );
    rb_funcall( self, s_type_id_set, 1, type_id );
    rb_funcall( self, s_value_set, 1, val );
    rb_funcall( self, s_style_set, 1, style );
    return self;
}

/*
 * YAML::Syck::Scalar.style=
 */
VALUE
syck_scalar_style_set( self, style )
    VALUE self, style;
{
    SyckNode *node;
    Data_Get_Struct( self, SyckNode, node );

    if ( NIL_P( style ) )
    {
        node->data.str->style = scalar_none;
    }
    else if ( style == sym_1quote )
    {
        node->data.str->style = scalar_1quote;
    }
    else if ( style == sym_2quote )
    {
        node->data.str->style = scalar_2quote;
    }
    else if ( style == sym_fold )
    {
        node->data.str->style = scalar_fold;
    }
    else if ( style == sym_literal )
    {
        node->data.str->style = scalar_literal;
    }
    else if ( style == sym_plain )
    {
        node->data.str->style = scalar_plain;
    }

    rb_iv_set( self, "@style", style );
    return self;
}

/*
 * YAML::Syck::Scalar.value=
 */
VALUE
syck_scalar_value_set( self, val )
    VALUE self, val;
{
    SyckNode *node;
    Data_Get_Struct( self, SyckNode, node );

    StringValue( val );
    node->data.str->ptr = syck_strndup( RSTRING(val)->ptr, RSTRING(val)->len );
    node->data.str->len = RSTRING(val)->len;
    node->data.str->style = scalar_none;

    rb_iv_set( self, "@value", val );
    return val;
}

/*
 * YAML::Syck::Seq.allocate
 */
VALUE
syck_seq_alloc( class )
    VALUE class;
{
    SyckNode *node;
    VALUE obj;
    node = syck_alloc_seq();
    obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node );
    node->id = obj;
    return obj;
}

/*
 * YAML::Syck::Seq.initialize
 */
VALUE
syck_seq_initialize( self, type_id, val, style )
    VALUE self, type_id, val, style;
{
    SyckNode *node;
    Data_Get_Struct( self, SyckNode, node );

    rb_iv_set( self, "@kind", sym_seq );
    rb_funcall( self, s_type_id_set, 1, type_id );
    rb_funcall( self, s_value_set, 1, val );
    rb_funcall( self, s_style_set, 1, style );
    return self;
}

/*
 * YAML::Syck::Seq.value=
 */
VALUE
syck_seq_value_set( self, val )
    VALUE self, val;
{
    SyckNode *node;
    Data_Get_Struct( self, SyckNode, node );

    val = rb_check_array_type( val );
    if ( !NIL_P( val ) ) {
        int i;
        syck_seq_empty( node );
        for ( i = 0; i < RARRAY( val )->len; i++ )
        {
            syck_seq_add( node, rb_ary_entry(val, i) );
        }
    }

    rb_iv_set( self, "@value", val );
    return val;
}

/*
 * YAML::Syck::Seq.add
 */
VALUE
syck_seq_add_m( self, val )
    VALUE self, val;
{
    SyckNode *node;
    VALUE emitter = rb_ivar_get( self, s_emitter );
    Data_Get_Struct( self, SyckNode, node );

    if ( rb_respond_to( emitter, s_node_export ) ) {
        val = rb_funcall( emitter, s_node_export, 1, val );
    }
    syck_seq_add( node, val );
    rb_ary_push( rb_ivar_get( self, s_value ), val );

    return self;
}

/*
 * YAML::Syck::Seq.style=
 */
VALUE
syck_seq_style_set( self, style )
    VALUE self, style;
{
    SyckNode *node;
    Data_Get_Struct( self, SyckNode, node );

    if ( style == sym_inline )
    {
        node->data.list->style = seq_inline;
    }
    else
    {
        node->data.list->style = seq_none;
    }

    rb_iv_set( self, "@style", style );
    return self;
}

/*
 * YAML::Syck::Map.allocate
 */
VALUE
syck_map_alloc( class )
    VALUE class;
{
    SyckNode *node;
    VALUE obj;
    node = syck_alloc_map();
    obj = Data_Wrap_Struct( class, syck_node_mark, syck_free_node, node );
    node->id = obj;
    return obj;
}

/*
 * YAML::Syck::Map.initialize
 */
VALUE
syck_map_initialize( self, type_id, val, style )
    VALUE self, type_id, val, style;
{
    SyckNode *node;
    Data_Get_Struct( self, SyckNode, node );

    if ( !NIL_P( val ) )
    {
        VALUE hsh = rb_check_convert_type(val, T_HASH, "Hash", "to_hash");
        VALUE keys;
        int i;
        if ( NIL_P(hsh) )
        {
            rb_raise( rb_eTypeError, "wrong argument type" );
        }

        keys = rb_funcall( hsh, s_keys, 0 );
        for ( i = 0; i < RARRAY(keys)->len; i++ )
        {
            VALUE key = rb_ary_entry(keys, i);
            syck_map_add( node, key, rb_hash_aref(hsh, key) );
        }
    }

    rb_iv_set( self, "@kind", sym_seq );
    rb_funcall( self, s_type_id_set, 1, type_id );
    rb_funcall( self, s_value_set, 1, val );
    rb_funcall( self, s_style_set, 1, style );
    return self;
}

/*
 * YAML::Syck::Map.value=
 */
VALUE
syck_map_value_set( self, val )
    VALUE self, val;
{
    SyckNode *node;
    Data_Get_Struct( self, SyckNode, node );

    if ( !NIL_P( val ) )
    {
        VALUE hsh = rb_check_convert_type(val, T_HASH, "Hash", "to_hash");
        VALUE keys;
        int i;
        if ( NIL_P(hsh) )
        {
            rb_raise( rb_eTypeError, "wrong argument type" );
        }

        syck_map_empty( node );
        keys = rb_funcall( hsh, s_keys, 0 );
        for ( i = 0; i < RARRAY(keys)->len; i++ )
        {
            VALUE key = rb_ary_entry(keys, i);
            syck_map_add( node, key, rb_hash_aref(hsh, key) );
        }
    }

    rb_iv_set( self, "@value", val );
    return val;
}

/*
 * YAML::Syck::Map.add
 */
VALUE
syck_map_add_m( self, key, val )
    VALUE self, key, val;
{
    SyckNode *node;
    VALUE emitter = rb_ivar_get( self, s_emitter );
    Data_Get_Struct( self, SyckNode, node );

    if ( rb_respond_to( emitter, s_node_export ) ) {
        key = rb_funcall( emitter, s_node_export, 1, key );
        val = rb_funcall( emitter, s_node_export, 1, val );
    }
    syck_map_add( node, key, val );
    rb_hash_aset( rb_ivar_get( self, s_value ), key, val );

    return self;
}

/*
 * YAML::Syck::Map.style=
 */
VALUE
syck_map_style_set( self, style )
    VALUE self, style;
{
    SyckNode *node;
    Data_Get_Struct( self, SyckNode, node );

    if ( style == sym_inline )
    {
        node->data.pairs->style = map_inline;
    }
    else
    {
        node->data.pairs->style = map_none;
    }

    rb_iv_set( self, "@style", style );
    return self;
}

/*
 * Cloning method for all node types
 */
VALUE
syck_node_init_copy( copy, orig )
    VALUE copy, orig;
{
    SyckNode *copy_n;
    SyckNode *orig_n;

    if ( copy == orig )
        return copy;

    if ( TYPE( orig ) != T_DATA )
    {
        rb_raise( rb_eTypeError, "wrong argument type" );
    }

    Data_Get_Struct( orig, SyckNode, orig_n );
    Data_Get_Struct( copy, SyckNode, copy_n );
    MEMCPY( copy_n, orig_n, SyckNode, 1 );
    return copy;
}

/*
 * YAML::Syck::Node#type_id=
 */
VALUE
syck_node_type_id_set( self, type_id )
    VALUE self, type_id;
{
    SyckNode *node;
    Data_Get_Struct( self, SyckNode, node );

    S_FREE( node->type_id );

    if ( !NIL_P( type_id ) ) {
        StringValue( type_id );
        node->type_id = syck_strndup( RSTRING(type_id)->ptr, RSTRING(type_id)->len );
    }

    rb_iv_set( self, "@type_id", type_id );
    return type_id;
}

/*
 * YAML::Syck::Node.transform
 */
VALUE
syck_node_transform( self )
    VALUE self;
{
    VALUE t;
    SyckNode *n;
    SyckNode *orig_n;
    Data_Get_Struct(self, SyckNode, orig_n);
    t = Data_Wrap_Struct( cNode, syck_node_mark, syck_free_node, 0 );

    switch (orig_n->kind)
    {
        case syck_map_kind:
            {
                int i;
                DATA_PTR(t) = n = syck_alloc_map();
                for ( i = 0; i < orig_n->data.pairs->idx; i++ )
                {
                    syck_map_add( n, rb_funcall( syck_map_read( orig_n, map_key, i ), s_transform, 0 ),
                                     rb_funcall( syck_map_read( orig_n, map_value, i ), s_transform, 0 ) );
                }
            }
        break;

        case syck_seq_kind:
            {
                int i;
                DATA_PTR(t) = n = syck_alloc_seq();
                for ( i = 0; i < orig_n->data.list->idx; i++ )
                {
                    syck_seq_add( n, rb_funcall( syck_seq_read( orig_n, i ), s_transform, 0 ) );
                }
            }
        break;

        case syck_str_kind:
            DATA_PTR(t) = n = syck_new_str2( orig_n->data.str->ptr, orig_n->data.str->len, orig_n->data.str->style );
        break;
    }

    if ( orig_n->type_id != NULL )
    {
        n->type_id = syck_strndup( orig_n->type_id, strlen( orig_n->type_id ) );
    }
    if ( orig_n->anchor != NULL )
    {
        n->anchor = syck_strndup( orig_n->anchor, strlen( orig_n->anchor ) );
    }
    n->id = t;
    return rb_funcall( oDefaultResolver, s_node_import, 1, t );
}

/*
 * Emitter callback: assembles YAML document events from
 * Ruby symbols.  This is a brilliant way to do it.
 * No one could possibly object.
 */
void
rb_syck_emitter_handler(e, data)
    SyckEmitter *e;
    st_data_t data;
{
    SyckNode *n;
    Data_Get_Struct((VALUE)data, SyckNode, n);

    switch (n->kind)
    {
        case syck_map_kind:
            {
                int i;
                syck_emit_map( e, n->type_id, n->data.pairs->style );
                for ( i = 0; i < n->data.pairs->idx; i++ )
                {
                    syck_emit_item( e, syck_map_read( n, map_key, i ) );
                    syck_emit_item( e, syck_map_read( n, map_value, i ) );
                }
                syck_emit_end( e );
            }
        break;

        case syck_seq_kind:
            {
                int i;
                syck_emit_seq( e, n->type_id, n->data.list->style );
                for ( i = 0; i < n->data.list->idx; i++ )
                {
                    syck_emit_item( e, syck_seq_read( n, i ) );
                }
                syck_emit_end( e );
            }
        break;

        case syck_str_kind:
            {
                syck_emit_scalar( e, n->type_id, n->data.str->style, 0, 0, 0, n->data.str->ptr, n->data.str->len );
            }
        break;
    }
}

/*
 * Handle output from the emitter
 */
void
rb_syck_output_handler( emitter, str, len )
    SyckEmitter *emitter;
    char *str;
    long len;
{
    struct emitter_xtra *bonus = (struct emitter_xtra *)emitter->bonus;
    VALUE dest = bonus->port;
    if (TYPE(dest) == T_STRING) {
        rb_str_cat( dest, str, len );
    } else {
        rb_io_write( dest, rb_str_new( str, len ) );
    }
}

/*
 * Helper function for marking nodes in the anchor
 * symbol table.
 */
void
syck_out_mark( emitter, node )
    VALUE emitter, node;
{
    SyckEmitter *emitterPtr;
    struct emitter_xtra *bonus;
    Data_Get_Struct(emitter, SyckEmitter, emitterPtr);
    bonus = (struct emitter_xtra *)emitterPtr->bonus;
    rb_ivar_set( node, s_emitter, emitter );
    /* syck_emitter_mark_node( emitterPtr, (st_data_t)node ); */
    if ( !NIL_P( bonus->oid ) ) {
        rb_hash_aset( bonus->data, bonus->oid, node );
    }
}

/*
 * Mark emitter values.
 */
static void
syck_mark_emitter(emitter)
    SyckEmitter *emitter;
{
    struct emitter_xtra *bonus = (struct emitter_xtra *)emitter->bonus;
    rb_gc_mark( bonus->oid  );
    rb_gc_mark( bonus->data );
    rb_gc_mark( bonus->port );
}

/*
 * Free the emitter and any bonus attachment.
 */
void
rb_syck_free_emitter(e)
    SyckEmitter *e;
{
    S_FREE( e->bonus );
    syck_free_emitter(e);
}

/*
 * YAML::Syck::Emitter.allocate
 */
VALUE syck_emitter_s_alloc _((VALUE));
VALUE
syck_emitter_s_alloc(class)
    VALUE class;
{
    VALUE pobj;
    SyckEmitter *emitter = syck_new_emitter();

    emitter->bonus = S_ALLOC( struct emitter_xtra );
    S_MEMZERO( emitter->bonus, struct emitter_xtra, 1 );

    pobj = Data_Wrap_Struct( class, syck_mark_emitter, rb_syck_free_emitter, emitter );
    syck_emitter_handler( emitter, rb_syck_emitter_handler );
    syck_output_handler( emitter, rb_syck_output_handler );

    rb_ivar_set( pobj, s_out, rb_funcall( cOut, s_new, 1, pobj ) );
    return pobj;
}

/*
 * YAML::Syck::Emitter.reset( options )
 */
VALUE
syck_emitter_reset( argc, argv, self )
    int argc;
    VALUE *argv;
    VALUE self;
{
    VALUE options, tmp;
    SyckEmitter *emitter;
    struct emitter_xtra *bonus;

    Data_Get_Struct(self, SyckEmitter, emitter);
    bonus = (struct emitter_xtra *)emitter->bonus;

    bonus->oid = Qnil;
    bonus->port = rb_str_new2( "" );
    bonus->data = rb_hash_new();

    if (rb_scan_args(argc, argv, "01", &options) == 0)
    {
        options = rb_hash_new();
        rb_ivar_set(self, s_options, options);
    }
    else if ( !NIL_P(tmp = rb_check_string_type(options)) )
    {
        bonus->port = tmp;
    }
    else if ( rb_respond_to( options, s_write ) )
    {
        bonus->port = options;
    }
    else
    {
        Check_Type(options, T_HASH);
        rb_ivar_set(self, s_options, options);
    }

    emitter->headless = 0;
    rb_ivar_set(self, s_level, INT2FIX(0));
    rb_ivar_set(self, s_resolver, Qnil);
    return self;
}

/*
 * YAML::Syck::Emitter.emit( object_id ) { |out| ... }
 */
VALUE
syck_emitter_emit( argc, argv, self )
    int argc;
    VALUE *argv;
    VALUE self;
{
    VALUE oid, proc;
    char *anchor_name;
    SyckEmitter *emitter;
    struct emitter_xtra *bonus;
    SYMID symple;
    int level = FIX2INT(rb_ivar_get(self, s_level)) + 1;
    rb_ivar_set(self, s_level, INT2FIX(level));

    rb_scan_args(argc, argv, "1&", &oid, &proc);
    Data_Get_Struct(self, SyckEmitter, emitter);
    bonus = (struct emitter_xtra *)emitter->bonus;

    /* Calculate anchors, normalize nodes, build a simpler symbol table */
    bonus->oid = oid;
    if ( !NIL_P( oid ) && RTEST( rb_funcall( bonus->data, s_haskey, 1, oid ) ) ) {
        symple = rb_hash_aref( bonus->data, oid );
    } else {
        symple = rb_funcall( proc, s_call, 1, rb_ivar_get( self, s_out ) );
    }
    syck_emitter_mark_node( emitter, (st_data_t)symple );

    /* Second pass, build emitted string */
    level -= 1;
    rb_ivar_set(self, s_level, INT2FIX(level));
    if ( level == 0 )
    {
        syck_emit(emitter, (st_data_t)symple);
        syck_emitter_flush(emitter, 0);

        return bonus->port;
    }

    return symple;
}

/*
 * YAML::Syck::Emitter#node_export
 */
VALUE
syck_emitter_node_export( self, node )
    VALUE self, node;
{
    return rb_funcall( node, s_to_yaml, 1, self );
}

/*
 * YAML::Syck::Emitter#set_resolver
 */
VALUE
syck_emitter_set_resolver( self, resolver )
    VALUE self, resolver;
{
    rb_ivar_set( self, s_resolver, resolver );
    return self;
}

/*
 * YAML::Syck::Out::initialize
 */
VALUE
syck_out_initialize( self, emitter )
    VALUE self, emitter;
{
    rb_ivar_set( self, s_emitter, emitter );
    return self;
}

/*
 * YAML::Syck::Out::map
 */
VALUE
syck_out_map( argc, argv, self )
    int argc;
    VALUE *argv;
    VALUE self;
{
    VALUE type_id, style, map;
    if (rb_scan_args(argc, argv, "11", &type_id, &style) == 1) {
        style = Qnil;
    }
    map = rb_funcall( cMap, s_new, 3, type_id, rb_hash_new(), style );
    syck_out_mark( rb_ivar_get( self, s_emitter ), map );
    rb_yield( map );
    return map;
}

/*
 * YAML::Syck::Out::seq
 */
VALUE
syck_out_seq( argc, argv, self )
    int argc;
    VALUE *argv;
    VALUE self;
{
    VALUE type_id, style, seq;
    if (rb_scan_args(argc, argv, "11", &type_id, &style) == 1) {
        style = Qnil;
    }
    seq = rb_funcall( cSeq, s_new, 3, type_id, rb_ary_new(), style );
    syck_out_mark( rb_ivar_get( self, s_emitter ), seq );
    rb_yield( seq );
    return seq;
}

/*
 * YAML::Syck::Out::scalar
syck_out_scalar( self, type_id, str, style )
    VALUE self, type_id, str, style;
 */
VALUE
syck_out_scalar( argc, argv, self )
    int argc;
    VALUE *argv;
    VALUE self;
{
    VALUE type_id, str, style, scalar;
    if (rb_scan_args(argc, argv, "21", &type_id, &str, &style) == 2) {
        style = Qnil;
    }
    scalar = rb_funcall( cScalar, s_new, 3, type_id, str, style );
    syck_out_mark( rb_ivar_get( self, s_emitter ), scalar );
    return scalar;
}

/*
 * Initialize Syck extension
 */
void
Init_syck()
{
    VALUE rb_yaml = rb_define_module( "YAML" );
    VALUE rb_syck = rb_define_module_under( rb_yaml, "Syck" );
    rb_define_const( rb_syck, "VERSION", rb_str_new2( SYCK_VERSION ) );
    rb_define_module_function( rb_syck, "compile", rb_syck_compile, 1 );

    /*
     * Global symbols
     */
    s_new = rb_intern("new");
    s_utc = rb_intern("utc");
    s_at = rb_intern("at");
    s_to_f = rb_intern("to_f");
    s_to_i = rb_intern("to_i");
    s_read = rb_intern("read");
    s_binmode = rb_intern("binmode");
    s_transfer = rb_intern("transfer");
    s_call = rb_intern("call");
    s_cmp = rb_intern("<=>");
    s_intern = rb_intern("intern");
    s_update = rb_intern("update");
    s_detect_implicit = rb_intern("detect_implicit");
    s_dup = rb_intern("dup");
    s_default_set = rb_intern("default=");
    s_match = rb_intern("match");
    s_push = rb_intern("push");
    s_haskey = rb_intern("has_key?");
    s_keys = rb_intern("keys");
    s_node_import = rb_intern("node_import");
    s_tr_bang = rb_intern("tr!");
    s_unpack = rb_intern("unpack");
    s_write = rb_intern("write");
    s_tag_read_class = rb_intern( "yaml_tag_read_class" );
    s_tag_subclasses = rb_intern( "yaml_tag_subclasses?" );
    s_emitter = rb_intern( "emitter" );
    s_set_resolver = rb_intern( "set_resolver" );
    s_node_export = rb_intern( "node_export" );
    s_to_yaml = rb_intern( "to_yaml" );
    s_transform = rb_intern( "transform" );
    s_yaml_new = rb_intern("yaml_new");
    s_yaml_initialize = rb_intern("yaml_initialize");

    s_tags = rb_intern("@tags");
    s_name = rb_intern("@name");
    s_options = rb_intern("@options");
    s_kind = rb_intern("@kind");
    s_type_id = rb_intern("@type_id");
    s_type_id_set = rb_intern("type_id=");
    s_resolver = rb_intern("@resolver");
    s_level = rb_intern( "@level" );
    s_style = rb_intern("@style");
    s_style_set = rb_intern("style=");
    s_value = rb_intern("@value");
    s_value_set = rb_intern("value=");
    s_out = rb_intern("@out");
    s_input = rb_intern("@input");

    sym_model = ID2SYM(rb_intern("Model"));
    sym_generic = ID2SYM(rb_intern("Generic"));
    sym_bytecode = ID2SYM(rb_intern("bytecode"));
    sym_map = ID2SYM(rb_intern("map"));
    sym_scalar = ID2SYM(rb_intern("scalar"));
    sym_seq = ID2SYM(rb_intern("seq"));
    sym_1quote = ID2SYM(rb_intern("quote1"));
    sym_2quote = ID2SYM(rb_intern("quote2"));
    sym_fold = ID2SYM(rb_intern("fold"));
    sym_literal = ID2SYM(rb_intern("literal"));
    sym_plain = ID2SYM(rb_intern("plain"));
    sym_inline = ID2SYM(rb_intern("inline"));

    /*
     * Define YAML::Syck::Resolver class
     */
    cResolver = rb_define_class_under( rb_syck, "Resolver", rb_cObject );
    rb_define_attr( cResolver, "tags", 1, 1 );
    rb_define_method( cResolver, "initialize", syck_resolver_initialize, 0 );
    rb_define_method( cResolver, "add_type", syck_resolver_add_type, 2 );
    rb_define_method( cResolver, "use_types_at", syck_resolver_use_types_at, 1 );
    rb_define_method( cResolver, "detect_implicit", syck_resolver_detect_implicit, 1 );
    rb_define_method( cResolver, "transfer", syck_resolver_transfer, 2 );
    rb_define_method( cResolver, "node_import", syck_resolver_node_import, 1 );
    rb_define_method( cResolver, "tagurize", syck_resolver_tagurize, 1 );

    rb_global_variable( &oDefaultResolver );
    oDefaultResolver = rb_funcall( cResolver, rb_intern( "new" ), 0 );
    rb_define_singleton_method( oDefaultResolver, "node_import", syck_defaultresolver_node_import, 1 );
    rb_define_singleton_method( oDefaultResolver, "detect_implicit", syck_defaultresolver_detect_implicit, 1 );
    rb_define_const( rb_syck, "DefaultResolver", oDefaultResolver );
    rb_global_variable( &oGenericResolver );
    oGenericResolver = rb_funcall( cResolver, rb_intern( "new" ), 0 );
    rb_define_singleton_method( oGenericResolver, "node_import", syck_genericresolver_node_import, 1 );
    rb_define_const( rb_syck, "GenericResolver", oGenericResolver );

    /*
     * Define YAML::Syck::Parser class
     */
    cParser = rb_define_class_under( rb_syck, "Parser", rb_cObject );
    rb_define_attr( cParser, "options", 1, 1 );
    rb_define_attr( cParser, "resolver", 1, 1 );
    rb_define_attr( cParser, "input", 1, 1 );
    rb_define_alloc_func( cParser, syck_parser_s_alloc );
    rb_define_method(cParser, "initialize", syck_parser_initialize, -1 );
    rb_define_method(cParser, "bufsize=", syck_parser_bufsize_set, 1 );
    rb_define_method(cParser, "bufsize", syck_parser_bufsize_get, 0 );
    rb_define_method(cParser, "load", syck_parser_load, -1);
    rb_define_method(cParser, "load_documents", syck_parser_load_documents, -1);
    rb_define_method(cParser, "set_resolver", syck_parser_set_resolver, 1);

    /*
     * Define YAML::Syck::Node class
     */
    cNode = rb_define_class_under( rb_syck, "Node", rb_cObject );
    rb_define_method( cNode, "initialize_copy", syck_node_init_copy, 1 );
    rb_define_attr( cNode, "emitter", 1, 1 );
    rb_define_attr( cNode, "resolver", 1, 1 );
    rb_define_attr( cNode, "kind", 1, 0 );
    rb_define_attr( cNode, "type_id", 1, 0 );
    rb_define_attr( cNode, "value", 1, 0 );
    rb_define_method( cNode, "type_id=", syck_node_type_id_set, 1 );
    rb_define_method( cNode, "transform", syck_node_transform, 0);

    /*
     * Define YAML::Syck::Scalar, YAML::Syck::Seq, YAML::Syck::Map --
     *     all are the publicly usable variants of YAML::Syck::Node
     */
    cScalar = rb_define_class_under( rb_syck, "Scalar", cNode );
    rb_define_alloc_func( cScalar, syck_scalar_alloc );
    rb_define_attr( cNode, "value", 1, 0 );
    rb_define_method( cScalar, "initialize", syck_scalar_initialize, 3 );
    rb_define_method( cScalar, "value=", syck_scalar_value_set, 1 );
    rb_define_method( cScalar, "style=", syck_scalar_style_set, 1 );
    cSeq = rb_define_class_under( rb_syck, "Seq", cNode );
    rb_define_alloc_func( cSeq, syck_seq_alloc );
    rb_define_method( cSeq, "initialize", syck_seq_initialize, 3 );
    rb_define_method( cSeq, "value=", syck_seq_value_set, 1 );
    rb_define_method( cSeq, "add", syck_seq_add_m, 1 );
    rb_define_method( cSeq, "style=", syck_seq_style_set, 1 );
    cMap = rb_define_class_under( rb_syck, "Map", cNode );
    rb_define_alloc_func( cMap, syck_map_alloc );
    rb_define_method( cMap, "initialize", syck_map_initialize, 3 );
    rb_define_method( cMap, "value=", syck_map_value_set, 1 );
    rb_define_method( cMap, "add", syck_map_add_m, 2 );
    rb_define_method( cMap, "style=", syck_map_style_set, 1 );

    /*
     * Define YAML::PrivateType class
     */
    cPrivateType = rb_define_class_under( rb_yaml, "PrivateType", rb_cObject );
    rb_define_attr( cPrivateType, "type_id", 1, 1 );
    rb_define_attr( cPrivateType, "value", 1, 1 );
    rb_define_method( cPrivateType, "initialize", syck_privatetype_initialize, 2);

    /*
     * Define YAML::DomainType class
     */
    cDomainType = rb_define_class_under( rb_yaml, "DomainType", rb_cObject );
    rb_define_attr( cDomainType, "domain", 1, 1 );
    rb_define_attr( cDomainType, "type_id", 1, 1 );
    rb_define_attr( cDomainType, "value", 1, 1 );
    rb_define_method( cDomainType, "initialize", syck_domaintype_initialize, 3);

    /*
     * Define YAML::Object class
     */
    cYObject = rb_define_class_under( rb_yaml, "Object", rb_cObject );
    rb_define_attr( cYObject, "class", 1, 1 );
    rb_define_attr( cYObject, "ivars", 1, 1 );
    rb_define_method( cYObject, "initialize", syck_yobject_initialize, 2);
    rb_define_method( cYObject, "yaml_initialize", syck_yobject_initialize, 2);

    /*
     * Define YAML::Syck::BadAlias class
     */
    cBadAlias = rb_define_class_under( rb_syck, "BadAlias", rb_cObject );
    rb_define_attr( cBadAlias, "name", 1, 1 );
    rb_define_method( cBadAlias, "initialize", syck_badalias_initialize, 1);
    rb_define_method( cBadAlias, "<=>", syck_badalias_cmp, 1);
    rb_include_module( cBadAlias, rb_const_get( rb_cObject, rb_intern("Comparable") ) );

    /*
     * Define YAML::Syck::MergeKey class
     */
    cMergeKey = rb_define_class_under( rb_syck, "MergeKey", rb_cObject );

    /*
     * Define YAML::Syck::DefaultKey class
     */
    cDefaultKey = rb_define_class_under( rb_syck, "DefaultKey", rb_cObject );

    /*
     * Define YAML::Syck::Out classes
     */
    cOut = rb_define_class_under( rb_syck, "Out", rb_cObject );
    rb_define_attr( cOut, "emitter", 1, 1 );
    rb_define_method( cOut, "initialize", syck_out_initialize, 1 );
    rb_define_method( cOut, "map", syck_out_map, -1 );
    rb_define_method( cOut, "seq", syck_out_seq, -1 );
    rb_define_method( cOut, "scalar", syck_out_scalar, -1 );

    /*
     * Define YAML::Syck::Emitter class
     */
    cEmitter = rb_define_class_under( rb_syck, "Emitter", rb_cObject );
    rb_define_attr( cEmitter, "level", 1, 1 );
    rb_define_alloc_func( cEmitter, syck_emitter_s_alloc );
    rb_define_method( cEmitter, "initialize", syck_emitter_reset, -1 );
    rb_define_method( cEmitter, "reset", syck_emitter_reset, -1 );
    rb_define_method( cEmitter, "emit", syck_emitter_emit, -1 );
    rb_define_method( cEmitter, "set_resolver", syck_emitter_set_resolver, 1);
    rb_define_method( cEmitter, "node_export", syck_emitter_node_export, 1);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/syck/syck.c

root/ext/syck/syck.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. syck_assert
  2. syck_strndup
  3. syck_io_file_read
  4. syck_io_str_read
  5. syck_parser_reset_levels
  6. syck_parser_reset_cursor
  7. syck_parser_set_root_on_error
  8. syck_new_parser
  9. syck_add_sym
  10. syck_lookup_sym
  11. syck_st_free_nodes
  12. syck_st_free
  13. syck_free_parser
  14. syck_parser_handler
  15. syck_parser_implicit_typing
  16. syck_parser_taguri_expansion
  17. syck_parser_error_handler
  18. syck_parser_bad_anchor_handler
  19. syck_parser_set_input_type
  20. syck_parser_file
  21. syck_parser_str
  22. syck_parser_str_auto
  23. syck_parser_current_level
  24. syck_parser_pop_level
  25. syck_parser_add_level
  26. free_any_io
  27. syck_move_tokens
  28. syck_check_limit
  29. syck_parser_read
  30. syck_parser_readlen
  31. syck_parse
  32. syck_default_error_handler
/*
 * syck.c
 *
 * $Author: why $
 * $Date: 2005/09/13 03:55:17 $
 *
 * Copyright (C) 2003 why the lucky stiff
 */
#include "ruby.h"

#include <stdio.h>
#include <string.h>

#include "syck.h"

void syck_parser_pop_level( SyckParser * );

/*
 * Custom assert
 */
void
syck_assert( char *file_name, unsigned line_num )
{
    fflush( NULL );
    fprintf( stderr, "\nAssertion failed: %s, line %u\n",
             file_name, line_num );
    fflush( stderr );
    abort();
}

/*
 * Allocates and copies a string
 */
char *
syck_strndup( char *buf, long len )
{
    char *new = S_ALLOC_N( char, len + 1 );
    S_MEMZERO( new, char, len + 1 );
    S_MEMCPY( new, buf, char, len );
    return new;
}

/*
 * Default FILE IO function
 */
long
syck_io_file_read( char *buf, SyckIoFile *file, long max_size, long skip )
{
    long len = 0;

    ASSERT( file != NULL );

    max_size -= skip;
    len = fread( buf + skip, sizeof( char ), max_size, file->ptr );
    len += skip;
    buf[len] = '\0';

    return len;
}

/*
 * Default string IO function
 */
long
syck_io_str_read( char *buf, SyckIoStr *str, long max_size, long skip )
{
    char *beg;
    long len = 0;

    ASSERT( str != NULL );
    beg = str->ptr;
    if ( max_size >= 0 )
    {
        max_size -= skip;
        if ( max_size <= 0 )  max_size = 0;
        else                  str->ptr += max_size;

        if ( str->ptr > str->end )
        {
            str->ptr = str->end;
        }
    }
    else
    {
        /* Use exact string length */
        while ( str->ptr < str->end ) {
            if (*(str->ptr++) == '\n') break;
        }
    }
    if ( beg < str->ptr )
    {
        len = ( str->ptr - beg );
        S_MEMCPY( buf + skip, beg, char, len );
    }
    len += skip;
    buf[len] = '\0';

    return len;
}

void
syck_parser_reset_levels( SyckParser *p )
{
    while ( p->lvl_idx > 1 )
    {
        syck_parser_pop_level( p );
    }

    if ( p->lvl_idx < 1 )
    {
        p->lvl_idx = 1;
        p->levels[0].spaces = -1;
        p->levels[0].ncount = 0;
        p->levels[0].domain = syck_strndup( "", 0 );
    }
    p->levels[0].status = syck_lvl_header;
}

void
syck_parser_reset_cursor( SyckParser *p )
{
    if ( p->buffer == NULL )
    {
        p->buffer = S_ALLOC_N( char, p->bufsize );
        S_MEMZERO( p->buffer, char, p->bufsize );
    }
    p->buffer[0] = '\0';

    p->cursor = NULL;
    p->lineptr = NULL;
    p->linectptr = NULL;
    p->token = NULL;
    p->toktmp = NULL;
    p->marker = NULL;
    p->limit = NULL;

    p->root = 0;
    p->root_on_error = 0;
    p->linect = 0;
    p->eof = 0;
    p->last_token = 0;
    p->force_token = 0;
}

/*
 * Value to return on a parse error
 */
void
syck_parser_set_root_on_error( SyckParser *p, SYMID roer )
{
    p->root_on_error = roer;
}

/*
 * Allocate the parser
 */
SyckParser *
syck_new_parser()
{
    SyckParser *p;
    p = S_ALLOC( SyckParser );
    S_MEMZERO( p, SyckParser, 1 );
    p->lvl_capa = ALLOC_CT;
    p->levels = S_ALLOC_N( SyckLevel, p->lvl_capa );
    p->input_type = syck_yaml_utf8;
    p->io_type = syck_io_str;
    p->io.str = NULL;
    p->syms = NULL;
    p->anchors = NULL;
    p->bad_anchors = NULL;
    p->implicit_typing = 1;
    p->taguri_expansion = 0;
    p->bufsize = SYCK_BUFFERSIZE;
    p->buffer = NULL;
    p->lvl_idx = 0;
    syck_parser_reset_levels( p );
    return p;
}

int
syck_add_sym( SyckParser *p, char *data )
{
    SYMID id = 0;
    if ( p->syms == NULL )
    {
        p->syms = st_init_numtable();
    }
    id = p->syms->num_entries + 1;
    st_insert( p->syms, id, (st_data_t)data );
    return id;
}

int
syck_lookup_sym( SyckParser *p, SYMID id, char **data )
{
    if ( p->syms == NULL ) return 0;
    return st_lookup( p->syms, id, (st_data_t *)data );
}

int
syck_st_free_nodes( char *key, SyckNode *n, char *arg )
{
    if ( n != (void *)1 ) syck_free_node( n );
    n = NULL;
    return ST_CONTINUE;
}

void
syck_st_free( SyckParser *p )
{
    /*
     * Free the anchor tables
     */
    if ( p->anchors != NULL )
    {
        st_foreach( p->anchors, syck_st_free_nodes, 0 );
        st_free_table( p->anchors );
        p->anchors = NULL;
    }

    if ( p->bad_anchors != NULL )
    {
        st_foreach( p->bad_anchors, syck_st_free_nodes, 0 );
        st_free_table( p->bad_anchors );
        p->bad_anchors = NULL;
    }
}

void
syck_free_parser( SyckParser *p )
{
    /*
     * Free the adhoc symbol table
     */
    if ( p->syms != NULL )
    {
        st_free_table( p->syms );
        p->syms = NULL;
    }

    /*
     * Free tables, levels
     */
    syck_st_free( p );
    syck_parser_reset_levels( p );
    S_FREE( p->levels[0].domain );
    S_FREE( p->levels );

    if ( p->buffer != NULL )
    {
        S_FREE( p->buffer );
    }
    free_any_io( p );
    S_FREE( p );
}

void
syck_parser_handler( SyckParser *p, SyckNodeHandler hdlr )
{
    ASSERT( p != NULL );
    p->handler = hdlr;
}

void
syck_parser_implicit_typing( SyckParser *p, int flag )
{
    p->implicit_typing = ( flag == 0 ? 0 : 1 );
}

void
syck_parser_taguri_expansion( SyckParser *p, int flag )
{
    p->taguri_expansion = ( flag == 0 ? 0 : 1 );
}

void
syck_parser_error_handler( SyckParser *p, SyckErrorHandler hdlr )
{
    ASSERT( p != NULL );
    p->error_handler = hdlr;
}

void
syck_parser_bad_anchor_handler( SyckParser *p, SyckBadAnchorHandler hdlr )
{
    ASSERT( p != NULL );
    p->bad_anchor_handler = hdlr;
}

void
syck_parser_set_input_type( SyckParser *p, enum syck_parser_input input_type )
{
    ASSERT( p != NULL );
    p->input_type = input_type;
}

void
syck_parser_file( SyckParser *p, FILE *fp, SyckIoFileRead read )
{
    ASSERT( p != NULL );
    free_any_io( p );
        syck_parser_reset_cursor( p );
    p->io_type = syck_io_file;
    p->io.file = S_ALLOC( SyckIoFile );
    p->io.file->ptr = fp;
    if ( read != NULL )
    {
        p->io.file->read = read;
    }
    else
    {
        p->io.file->read = syck_io_file_read;
    }
}

void
syck_parser_str( SyckParser *p, char *ptr, long len, SyckIoStrRead read )
{
    ASSERT( p != NULL );
    free_any_io( p );
        syck_parser_reset_cursor( p );
    p->io_type = syck_io_str;
    p->io.str = S_ALLOC( SyckIoStr );
    p->io.str->beg = ptr;
    p->io.str->ptr = ptr;
    p->io.str->end = ptr + len;
    if ( read != NULL )
    {
        p->io.str->read = read;
    }
    else
    {
        p->io.str->read = syck_io_str_read;
    }
}

void
syck_parser_str_auto( SyckParser *p, char *ptr, SyckIoStrRead read )
{
    syck_parser_str( p, ptr, strlen( ptr ), read );
}

SyckLevel *
syck_parser_current_level( SyckParser *p )
{
    return &p->levels[p->lvl_idx-1];
}

void
syck_parser_pop_level( SyckParser *p )
{
    ASSERT( p != NULL );

    /* The root level should never be popped */
    if ( p->lvl_idx <= 1 ) return;

    p->lvl_idx -= 1;
    free( p->levels[p->lvl_idx].domain );
}

void
syck_parser_add_level( SyckParser *p, int len, enum syck_level_status status )
{
    ASSERT( p != NULL );
    if ( p->lvl_idx + 1 > p->lvl_capa )
    {
        p->lvl_capa += ALLOC_CT;
        S_REALLOC_N( p->levels, SyckLevel, p->lvl_capa );
    }

    ASSERT( len > p->levels[p->lvl_idx-1].spaces );
    p->levels[p->lvl_idx].spaces = len;
    p->levels[p->lvl_idx].ncount = 0;
    p->levels[p->lvl_idx].domain = syck_strndup( p->levels[p->lvl_idx-1].domain, strlen( p->levels[p->lvl_idx-1].domain ) );
    p->levels[p->lvl_idx].status = status;
    p->lvl_idx += 1;
}

void
free_any_io( SyckParser *p )
{
    ASSERT( p != NULL );
    switch ( p->io_type )
    {
        case syck_io_str:
            if ( p->io.str != NULL )
            {
                S_FREE( p->io.str );
                p->io.str = NULL;
            }
        break;

        case syck_io_file:
            if ( p->io.file != NULL )
            {
                S_FREE( p->io.file );
                p->io.file = NULL;
            }
        break;
    }
}

long
syck_move_tokens( SyckParser *p )
{
    long count, skip;
    ASSERT( p->buffer != NULL );

    if ( p->token == NULL )
        return 0;

    skip = p->limit - p->token;
    if ( skip < 1 )
        return 0;

    if ( ( count = p->token - p->buffer ) )
    {
        S_MEMMOVE( p->buffer, p->token, char, skip );
        p->token = p->buffer;
        p->marker -= count;
        p->cursor -= count;
        p->toktmp -= count;
        p->limit -= count;
        p->lineptr -= count;
        p->linectptr -= count;
    }
    return skip;
}

void
syck_check_limit( SyckParser *p, long len )
{
    if ( p->cursor == NULL )
    {
        p->cursor = p->buffer;
        p->lineptr = p->buffer;
        p->linectptr = p->buffer;
        p->marker = p->buffer;
    }
    p->limit = p->buffer + len;
}

long
syck_parser_read( SyckParser *p )
{
    long len = 0;
    long skip = 0;
    ASSERT( p != NULL );
    switch ( p->io_type )
    {
        case syck_io_str:
            skip = syck_move_tokens( p );
            len = (p->io.str->read)( p->buffer, p->io.str, SYCK_BUFFERSIZE - 1, skip );
            break;

        case syck_io_file:
            skip = syck_move_tokens( p );
            len = (p->io.file->read)( p->buffer, p->io.file, SYCK_BUFFERSIZE - 1, skip );
            break;
    }
    syck_check_limit( p, len );
    return len;
}

long
syck_parser_readlen( SyckParser *p, long max_size )
{
    long len = 0;
    long skip = 0;
    ASSERT( p != NULL );
    switch ( p->io_type )
    {
        case syck_io_str:
            skip = syck_move_tokens( p );
            len = (p->io.str->read)( p->buffer, p->io.str, max_size, skip );
            break;

        case syck_io_file:
            skip = syck_move_tokens( p );
            len = (p->io.file->read)( p->buffer, p->io.file, max_size, skip );
            break;
    }
    syck_check_limit( p, len );
    return len;
}

SYMID
syck_parse( SyckParser *p )
{
    ASSERT( p != NULL );

    syck_st_free( p );
    syck_parser_reset_levels( p );
    syckparse( p );
    return p->root;
}

void
syck_default_error_handler( SyckParser *p, char *msg )
{
    printf( "Error at [Line %d, Col %d]: %s\n",
        p->linect,
        p->cursor - p->lineptr,
        msg );
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/syck/syck.h

root/ext/syck/syck.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/*
 * syck.h
 *
 * $Author: ocean $
 * $Date: 2005/12/19 14:13:27 $
 *
 * Copyright (C) 2003 why the lucky stiff
 */

#ifndef SYCK_H
#define SYCK_H

#define SYCK_YAML_MAJOR 1
#define SYCK_YAML_MINOR 0

#define SYCK_VERSION    "0.60"
#define YAML_DOMAIN     "yaml.org,2002"

#include <stdio.h>
#include <ctype.h>
#include "st.h"

#if defined(__cplusplus)
extern "C" {
#endif

/*
 * Memory Allocation
 */
#if defined(HAVE_ALLOCA_H) && !defined(__GNUC__)
#include <alloca.h>
#endif

#if DEBUG
  void syck_assert( char *, unsigned );
# define ASSERT(f) \
    if ( f ) \
        {}   \
    else     \
        syck_assert( __FILE__, __LINE__ )
#else
# define ASSERT(f)
#endif

#ifndef NULL
# define NULL (void *)0
#endif

#define ALLOC_CT 8
#define SYCK_BUFFERSIZE 4096
#define S_ALLOC_N(type,n) (type*)malloc(sizeof(type)*(n))
#define S_ALLOC(type) (type*)malloc(sizeof(type))
#define S_REALLOC_N(var,type,n) (var)=(type*)realloc((char*)(var),sizeof(type)*(n))
#define S_FREE(n) if (n) { free(n); n = NULL; }

#define S_ALLOCA_N(type,n) (type*)alloca(sizeof(type)*(n))

#define S_MEMZERO(p,type,n) memset((p), 0, sizeof(type)*(n))
#define S_MEMCPY(p1,p2,type,n) memcpy((p1), (p2), sizeof(type)*(n))
#define S_MEMMOVE(p1,p2,type,n) memmove((p1), (p2), sizeof(type)*(n))
#define S_MEMCMP(p1,p2,type,n) memcmp((p1), (p2), sizeof(type)*(n))

#define BLOCK_FOLD  10
#define BLOCK_LIT   20
#define BLOCK_PLAIN 30
#define NL_CHOMP    40
#define NL_KEEP     50

/*
 * Node definitions
 */
#ifndef ST_DATA_T_DEFINED
typedef long st_data_t;
#endif

#define SYMID unsigned long

typedef struct _syck_node SyckNode;

enum syck_kind_tag {
    syck_map_kind,
    syck_seq_kind,
    syck_str_kind
};

enum map_part {
    map_key,
    map_value
};

enum map_style {
    map_none,
    map_inline
};

enum seq_style {
    seq_none,
    seq_inline
};

enum scalar_style {
    scalar_none,
    scalar_1quote,
    scalar_2quote,
    scalar_fold,
    scalar_literal,
    scalar_plain
};

/*
 * Node metadata struct
 */
struct _syck_node {
    /* Symbol table ID */
    SYMID id;
    /* Underlying kind */
    enum syck_kind_tag kind;
    /* Fully qualified tag-uri for type */
    char *type_id;
    /* Anchor name */
    char *anchor;
    union {
        /* Storage for map data */
        struct SyckMap {
            enum map_style style;
            SYMID *keys;
            SYMID *values;
            long capa;
            long idx;
        } *pairs;
        /* Storage for sequence data */
        struct SyckSeq {
            enum seq_style style;
            SYMID *items;
            long capa;
            long idx;
        } *list;
        /* Storage for string data */
        struct SyckStr {
            enum scalar_style style;
            char *ptr;
            long len;
        } *str;
    } data;
    /* Shortcut node */
    void *shortcut;
};

/*
 * Parser definitions
 */
typedef struct _syck_parser SyckParser;
typedef struct _syck_file SyckIoFile;
typedef struct _syck_str SyckIoStr;
typedef struct _syck_level SyckLevel;

typedef SYMID (*SyckNodeHandler)(SyckParser *, SyckNode *);
typedef void (*SyckErrorHandler)(SyckParser *, char *);
typedef SyckNode * (*SyckBadAnchorHandler)(SyckParser *, char *);
typedef long (*SyckIoFileRead)(char *, SyckIoFile *, long, long);
typedef long (*SyckIoStrRead)(char *, SyckIoStr *, long, long);

enum syck_io_type {
    syck_io_str,
    syck_io_file
};

enum syck_parser_input {
    syck_yaml_utf8,
    syck_yaml_utf16,
    syck_yaml_utf32,
    syck_bytecode_utf8
};

enum syck_level_status {
    syck_lvl_header,
    syck_lvl_doc,
    syck_lvl_open,
    syck_lvl_seq,
    syck_lvl_map,
    syck_lvl_block,
    syck_lvl_str,
    syck_lvl_iseq,
    syck_lvl_imap,
    syck_lvl_end,
    syck_lvl_pause,
    syck_lvl_anctag,
    syck_lvl_mapx,
    syck_lvl_seqx
};

/*
 * Parser structs
 */
struct _syck_file {
    /* File pointer */
    FILE *ptr;
    /* Function which FILE -> buffer */
    SyckIoFileRead read;
};

struct _syck_str {
    /* String buffer pointers */
    char *beg, *ptr, *end;
    /* Function which string -> buffer */
    SyckIoStrRead read;
};

struct _syck_level {
    /* Indent */
    int spaces;
    /* Counts nodes emitted at this level, useful for parsing
     * keys and pairs in bytecode */
    int ncount;
    /* Does node have anchors or tags? */
    int anctag;
    /* Domain prefixing at the given level */
    char *domain;
    /* Keeps a node status */
    enum syck_level_status status;
};

struct _syck_parser {
    /* Root node */
    SYMID root, root_on_error;
    /* Implicit typing flag */
    int implicit_typing, taguri_expansion;
    /* Scripting language function to handle nodes */
    SyckNodeHandler handler;
    /* Error handler */
    SyckErrorHandler error_handler;
    /* InvalidAnchor handler */
    SyckBadAnchorHandler bad_anchor_handler;
    /* Parser input type */
    enum syck_parser_input input_type;
    /* IO type */
    enum syck_io_type io_type;
    /* Custom buffer size */
    size_t bufsize;
    /* Buffer pointers */
    char *buffer, *linectptr, *lineptr, *toktmp, *token, *cursor, *marker, *limit;
    /* Line counter */
    int linect;
    /* Last token from yylex() */
    int last_token;
    /* Force a token upon next call to yylex() */
    int force_token;
    /* EOF flag */
    int eof;
    union {
        SyckIoFile *file;
        SyckIoStr *str;
    } io;
    /* Symbol table for anchors */
    st_table *anchors, *bad_anchors;
    /* Optional symbol table for SYMIDs */
    st_table *syms;
    /* Levels of indentation */
    SyckLevel *levels;
    int lvl_idx;
    int lvl_capa;
    /* Pointer for extension's use */
    void *bonus;
};

/*
 * Emitter definitions
 */
typedef struct _syck_emitter SyckEmitter;
typedef struct _syck_emitter_node SyckEmitterNode;

typedef void (*SyckOutputHandler)(SyckEmitter *, char *, long);
typedef void (*SyckEmitterHandler)(SyckEmitter *, st_data_t);

enum doc_stage {
    doc_open,
    doc_processing
};

/*
 * Emitter struct
 */
struct _syck_emitter {
    /* Headerless doc flag */
    int headless;
    /* Force header? */
    int use_header;
    /* Force version? */
    int use_version;
    /* Sort hash keys */
    int sort_keys;
    /* Anchor format */
    char *anchor_format;
    /* Explicit typing on all collections? */
    int explicit_typing;
    /* Best width on folded scalars */
    int best_width;
    /* Use literal[1] or folded[2] blocks on all text? */
    enum scalar_style style;
    /* Stage of written document */
    enum doc_stage stage;
    /* Level counter */
    int level;
    /* Default indentation */
    int indent;
    /* Object ignore ID */
    SYMID ignore_id;
    /* Symbol table for anchors */
    st_table *markers, *anchors, *anchored;
    /* Custom buffer size */
    size_t bufsize;
    /* Buffer */
    char *buffer, *marker;
    /* Absolute position of the buffer */
    long bufpos;
    /* Handler for emitter nodes */
    SyckEmitterHandler emitter_handler;
    /* Handler for output */
    SyckOutputHandler output_handler;
    /* Levels of indentation */
    SyckLevel *levels;
    int lvl_idx;
    int lvl_capa;
    /* Pointer for extension's use */
    void *bonus;
};

/*
 * Emitter node metadata struct
 */
struct _syck_emitter_node {
    /* Node buffer position */
    long pos;
    /* Current indent */
    long indent;
    /* Collection? */
    int is_shortcut;
};

/*
 * Handler prototypes
 */
SYMID syck_hdlr_add_node( SyckParser *, SyckNode * );
SyckNode *syck_hdlr_add_anchor( SyckParser *, char *, SyckNode * );
void syck_hdlr_remove_anchor( SyckParser *, char * );
SyckNode *syck_hdlr_get_anchor( SyckParser *, char * );
void syck_add_transfer( char *, SyckNode *, int );
char *syck_xprivate( char *, int );
char *syck_taguri( char *, char *, int );
int syck_tagcmp( char *, char * );
int syck_add_sym( SyckParser *, char * );
int syck_lookup_sym( SyckParser *, SYMID, char ** );
int syck_try_implicit( SyckNode * );
char *syck_type_id_to_uri( char * );
void try_tag_implicit( SyckNode *, int );
char *syck_match_implicit( char *, size_t );

/*
 * API prototypes
 */
char *syck_strndup( char *, long );
long syck_io_file_read( char *, SyckIoFile *, long, long );
long syck_io_str_read( char *, SyckIoStr *, long, long );
char *syck_base64enc( char *, long );
char *syck_base64dec( char *, long );
SyckEmitter *syck_new_emitter();
SYMID syck_emitter_mark_node( SyckEmitter *, st_data_t );
void syck_emitter_ignore_id( SyckEmitter *, SYMID );
void syck_output_handler( SyckEmitter *, SyckOutputHandler );
void syck_emitter_handler( SyckEmitter *, SyckEmitterHandler );
void syck_free_emitter( SyckEmitter * );
void syck_emitter_clear( SyckEmitter * );
void syck_emitter_write( SyckEmitter *, char *, long );
void syck_emitter_escape( SyckEmitter *, char *, long );
void syck_emitter_flush( SyckEmitter *, long );
void syck_emit( SyckEmitter *, st_data_t );
void syck_emit_scalar( SyckEmitter *, char *, enum scalar_style, int, int, char, char *, long );
void syck_emit_1quoted( SyckEmitter *, int, char *, long );
void syck_emit_2quoted( SyckEmitter *, int, char *, long );
void syck_emit_folded( SyckEmitter *, int, char, char *, long );
void syck_emit_literal( SyckEmitter *, char, char *, long );
void syck_emit_seq( SyckEmitter *, char *, enum seq_style );
void syck_emit_item( SyckEmitter *, st_data_t );
void syck_emit_map( SyckEmitter *, char *, enum map_style );
void syck_emit_end( SyckEmitter * );
void syck_emit_tag( SyckEmitter *, char *, char * );
void syck_emit_indent( SyckEmitter * );
SyckLevel *syck_emitter_current_level( SyckEmitter * );
SyckLevel *syck_emitter_parent_level( SyckEmitter * );
void syck_emitter_pop_level( SyckEmitter * );
void syck_emitter_add_level( SyckEmitter *, int, enum syck_level_status );
void syck_emitter_reset_levels( SyckEmitter * );
SyckParser *syck_new_parser();
void syck_free_parser( SyckParser * );
void syck_parser_set_root_on_error( SyckParser *, SYMID );
void syck_parser_implicit_typing( SyckParser *, int );
void syck_parser_taguri_expansion( SyckParser *, int );
int syck_scan_scalar( int, char *, long );
void syck_parser_handler( SyckParser *, SyckNodeHandler );
void syck_parser_error_handler( SyckParser *, SyckErrorHandler );
void syck_parser_bad_anchor_handler( SyckParser *, SyckBadAnchorHandler );
void syck_parser_file( SyckParser *, FILE *, SyckIoFileRead );
void syck_parser_str( SyckParser *, char *, long, SyckIoStrRead );
void syck_parser_str_auto( SyckParser *, char *, SyckIoStrRead );
SyckLevel *syck_parser_current_level( SyckParser * );
void syck_parser_add_level( SyckParser *, int, enum syck_level_status );
void syck_parser_pop_level( SyckParser * );
void free_any_io( SyckParser * );
long syck_parser_read( SyckParser * );
long syck_parser_readlen( SyckParser *, long );
SYMID syck_parse( SyckParser * );
void syck_default_error_handler( SyckParser *, char * );
SYMID syck_yaml2byte_handler( SyckParser *, SyckNode * );
char *syck_yaml2byte( char * );

/*
 * Allocation prototypes
 */
SyckNode *syck_alloc_map();
SyckNode *syck_alloc_seq();
SyckNode *syck_alloc_str();
void syck_free_node( SyckNode * );
void syck_free_members( SyckNode * );
SyckNode *syck_new_str( char *, enum scalar_style );
SyckNode *syck_new_str2( char *, long, enum scalar_style );
void syck_replace_str( SyckNode *, char *, enum scalar_style );
void syck_replace_str2( SyckNode *, char *, long, enum scalar_style );
void syck_str_blow_away_commas( SyckNode * );
char *syck_str_read( SyckNode * );
SyckNode *syck_new_map( SYMID, SYMID );
void syck_map_empty( SyckNode * );
void syck_map_add( SyckNode *, SYMID, SYMID );
SYMID syck_map_read( SyckNode *, enum map_part, long );
void syck_map_assign( SyckNode *, enum map_part, long, SYMID );
long syck_map_count( SyckNode * );
void syck_map_update( SyckNode *, SyckNode * );
SyckNode *syck_new_seq( SYMID );
void syck_seq_empty( SyckNode * );
void syck_seq_add( SyckNode *, SYMID );
void syck_seq_assign( SyckNode *, long, SYMID );
SYMID syck_seq_read( SyckNode *, long );
long syck_seq_count( SyckNode * );

/*
 * Lexer prototypes
 */
void syckerror( char * );
int syckparse( void * );
union YYSTYPE;
int sycklex( union YYSTYPE *, SyckParser * );

#if defined(__cplusplus)
}  /* extern "C" { */
#endif

#endif /* ifndef SYCK_H */
/* [<][>][^][v][top][bottom][index] [help] */


ext/syck/token.c

root/ext/syck/token.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. sycklex
  2. sycklex_yaml_utf8
  3. eat_comments
  4. escape_seq
  5. is_newline
  6. newline_len
  7. syckwrap
  8. syckerror
/* Generated by re2c 0.9.10 on Tue Sep 20 17:46:17 2005 */
#line 1 "token.re"
/*
 * token.re
 *
 * $Author: why $
 * $Date: 2005/09/20 23:58:18 $
 *
 * Copyright (C) 2003 why the lucky stiff
 */
#include "ruby.h"
#include "syck.h"
#include "gram.h"

/*
 * Allocate quoted strings in chunks
 */
#define QUOTELEN    1024

/*
 * They do my bidding...
 */
#define YYCTYPE     char
#define YYCURSOR    parser->cursor
#define YYMARKER    parser->marker
#define YYLIMIT     parser->limit
#define YYTOKEN     parser->token
#define YYTOKTMP    parser->toktmp
#define YYLINEPTR   parser->lineptr
#define YYLINECTPTR parser->linectptr
#define YYLINE      parser->linect
#define YYFILL(n)   syck_parser_read(parser)

/*
 * Repositions the cursor at `n' offset from the token start.
 * Only works in `Header' and `Document' sections.
 */
#define YYPOS(n)    YYCURSOR = YYTOKEN + n

/*
 * Track line numbers
 */
#define NEWLINE(ptr)    YYLINEPTR = ptr + newline_len(ptr); if ( YYLINEPTR > YYLINECTPTR ) { YYLINE++; YYLINECTPTR = YYLINEPTR; }

/*
 * I like seeing the level operations as macros...
 */
#define ADD_LEVEL(len, status)  syck_parser_add_level( parser, len, status )
#define POP_LEVEL()     syck_parser_pop_level( parser )
#define CURRENT_LEVEL() syck_parser_current_level( parser )

/*
 * Force a token next time around sycklex()
 */
#define FORCE_NEXT_TOKEN(tok)    parser->force_token = tok;

/*
 * Nice little macro to ensure we're YAML_IOPENed to the current level.
 * * Only use this macro in the "Document" section *
 */
#define ENSURE_YAML_IOPEN(last_lvl, to_len, reset) \
        if ( last_lvl->spaces < to_len ) \
        { \
            if ( last_lvl->status == syck_lvl_iseq || last_lvl->status == syck_lvl_imap ) \
            { \
                goto Document; \
            } \
            else \
            { \
                ADD_LEVEL( to_len, syck_lvl_doc ); \
                if ( reset == 1 ) YYPOS(0); \
                return YAML_IOPEN; \
            } \
        }

/*
 * Nice little macro to ensure closure of levels.
 * * Only use this macro in the "Document" section *
 */
#define ENSURE_YAML_IEND(last_lvl, to_len) \
        if ( last_lvl->spaces > to_len ) \
        { \
            syck_parser_pop_level( parser ); \
            YYPOS(0); \
            return YAML_IEND; \
        }

/*
 * Concatenates quoted string items and manages allocation
 * to the quoted string
 */
#define QUOTECAT(s, c, i, l) \
        { \
            if ( i + 1 >= c ) \
            { \
                c += QUOTELEN; \
                S_REALLOC_N( s, char, c ); \
            } \
            s[i++] = l; \
            s[i] = '\0'; \
        }

#define QUOTECATS(s, c, i, cs, cl) \
        { \
            while ( i + cl >= c ) \
            { \
                c += QUOTELEN; \
                S_REALLOC_N( s, char, c ); \
            } \
            S_MEMCPY( s + i, cs, char, cl ); \
            i += cl; \
            s[i] = '\0'; \
        }

/*
 * Tags a plain scalar with a transfer method
 * * Use only in "Plain" section *
 */
#define RETURN_IMPLICIT() \
    { \
        SyckNode *n = syck_alloc_str(); \
        YYCURSOR = YYTOKEN; \
        n->data.str->ptr = qstr; \
        n->data.str->len = qidx; \
        n->data.str->style = scalar_plain; \
        sycklval->nodeData = n; \
        if ( parser->implicit_typing == 1 ) \
        { \
            try_tag_implicit( sycklval->nodeData, parser->taguri_expansion ); \
        } \
        return YAML_PLAIN; \
    }

/* concat the inline characters to the plain scalar */
#define PLAIN_NOT_INL() \
    if ( *(YYCURSOR - 1) == ' ' || is_newline( YYCURSOR - 1 ) ) \
    { \
        YYCURSOR--; \
    } \
    QUOTECATS(qstr, qcapa, qidx, YYTOKEN, YYCURSOR - YYTOKEN); \
    goto Plain2;

/* trim spaces off the end in case of indent */
#define PLAIN_IS_INL() \
    char *walker = qstr + qidx - 1; \
    while ( walker > qstr && ( *walker == '\n' || *walker == ' ' || *walker == '\t' ) ) \
    { \
        qidx--; \
        walker[0] = '\0'; \
        walker--; \
    }

/*
 * Keep or chomp block?
 * * Use only in "ScalarBlock" section *
 */
#define RETURN_YAML_BLOCK() \
    { \
        SyckNode *n = syck_alloc_str(); \
        if ( ((SyckParser *)parser)->taguri_expansion == 1 ) \
        { \
            n->type_id = syck_taguri( YAML_DOMAIN, "str", 3 ); \
        } \
        else \
        { \
            n->type_id = syck_strndup( "str", 3 ); \
        } \
        n->data.str->ptr = qstr; \
        n->data.str->len = qidx; \
        if ( blockType == BLOCK_LIT ) { \
            n->data.str->style = scalar_literal; \
        } else { \
            n->data.str->style = scalar_fold; \
        } \
        if ( qidx > 0 ) \
        { \
            if ( nlDoWhat != NL_KEEP ) \
            { \
                char *fc = n->data.str->ptr + n->data.str->len - 1; \
                while ( is_newline( fc ) ) fc--; \
                if ( nlDoWhat != NL_CHOMP && fc < n->data.str->ptr + n->data.str->len - 1 ) \
                    fc += 1; \
                n->data.str->len = fc - n->data.str->ptr + 1; \
            } \
        } \
        sycklval->nodeData = n; \
        return YAML_BLOCK; \
    }

/*
 * Handles newlines, calculates indent
 */
#define GOBBLE_UP_YAML_INDENT( ict, start ) \
    char *indent = start; \
    NEWLINE(indent); \
    while ( indent < YYCURSOR ) \
    { \
        if ( is_newline( ++indent ) ) \
        { \
            NEWLINE(indent); \
        } \
    } \
    ict = 0; \
    if ( *YYCURSOR == '\0' ) \
    { \
        ict = -1; \
        start = YYCURSOR - 1; \
    } \
    else if ( *YYLINEPTR == ' ' ) \
    { \
        ict = YYCURSOR - YYLINEPTR; \
    }

/*
 * If an indent exists at the current level, back up.
 */
#define GET_TRUE_YAML_INDENT(indt_len) \
    { \
        SyckLevel *lvl_deep = CURRENT_LEVEL(); \
        indt_len = lvl_deep->spaces; \
        if ( lvl_deep->status == syck_lvl_seq || ( indt_len == YYCURSOR - YYLINEPTR && lvl_deep->status != syck_lvl_map )  ) \
        { \
            SyckLevel *lvl_over; \
            parser->lvl_idx--; \
            lvl_over = CURRENT_LEVEL(); \
            indt_len = lvl_over->spaces; \
            parser->lvl_idx++; \
        } \
    }

/*
 * Argjh!  I hate globals!  Here for syckerror() only!
 */
SyckParser *syck_parser_ptr = NULL;

/*
 * Accessory funcs later in this file.
 */
void eat_comments( SyckParser * );
char escape_seq( char );
int is_newline( char *ptr );
int newline_len( char *ptr );
int sycklex_yaml_utf8( YYSTYPE *, SyckParser * );
int sycklex_bytecode_utf8( YYSTYPE *, SyckParser * );
int syckwrap();

/*
 * My own re-entrant sycklex() using re2c.
 * You really get used to the limited regexp.
 * It's really nice to not rely on backtracking and such.
 */
int
sycklex( YYSTYPE *sycklval, SyckParser *parser )
{
    switch ( parser->input_type )
    {
        case syck_yaml_utf8:
        return sycklex_yaml_utf8( sycklval, parser );

        case syck_yaml_utf16:
            syckerror( "UTF-16 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
        break;

        case syck_yaml_utf32:
            syckerror( "UTF-32 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
        break;

        case syck_bytecode_utf8:
        return sycklex_bytecode_utf8( sycklval, parser );
    }
    return YAML_DOCSEP;
}

/*
 * Parser for standard YAML [UTF-8]
 */
int
sycklex_yaml_utf8( YYSTYPE *sycklval, SyckParser *parser )
{
    int doc_level = 0;
    syck_parser_ptr = parser;
    if ( YYCURSOR == NULL )
    {
        syck_parser_read( parser );
    }

    if ( parser->force_token != 0 )
    {
        int t = parser->force_token;
        parser->force_token = 0;
        return t;
    }

#line 315 "token.re"

    if ( YYLINEPTR != YYCURSOR )
    {
        goto Document;
    }

Header:

    YYTOKEN = YYCURSOR;

#line 307 "<stdout>"
{
        YYCTYPE yych;
        unsigned int yyaccept;
        goto yy0;
        ++YYCURSOR;
yy0:
        if((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
        yych = *YYCURSOR;
        switch(yych){
        case 0x00:      goto yy7;
        case 0x09:      case ' ':       goto yy12;
        case 0x0A:      goto yy9;
        case 0x0D:      goto yy11;
        case '#':       goto yy5;
        case '-':       goto yy2;
        case '.':       goto yy4;
        default:        goto yy14;
        }
yy2:    yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case '-':       goto yy28;
        default:        goto yy3;
        }
yy3:
#line 374 "token.re"
{   YYPOS(0);
                        goto Document;
                    }
#line 337 "<stdout>"
yy4:    yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case '.':       goto yy21;
        default:        goto yy3;
        }
yy5:    ++YYCURSOR;
        goto yy6;
yy6:
#line 356 "token.re"
{   eat_comments( parser );
                        goto Header;
                    }
#line 351 "<stdout>"
yy7:    ++YYCURSOR;
        goto yy8;
yy8:
#line 360 "token.re"
{   SyckLevel *lvl = CURRENT_LEVEL();
                        ENSURE_YAML_IEND(lvl, -1);
                        YYPOS(0);
                        return 0;
                    }
#line 361 "<stdout>"
yy9:    yyaccept = 1;
        yych = *(YYMARKER = ++YYCURSOR);
        goto yy18;
yy10:
#line 366 "token.re"
{   GOBBLE_UP_YAML_INDENT( doc_level, YYTOKEN );
                        goto Header;
                    }
#line 370 "<stdout>"
yy11:   yych = *++YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy17;
        default:        goto yy3;
        }
yy12:   ++YYCURSOR;
        yych = *YYCURSOR;
        goto yy16;
yy13:
#line 370 "token.re"
{   doc_level = YYCURSOR - YYLINEPTR;
                        goto Header;
                    }
#line 384 "<stdout>"
yy14:   yych = *++YYCURSOR;
        goto yy3;
yy15:   ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy16;
yy16:   switch(yych){
        case 0x09:      case ' ':       goto yy15;
        default:        goto yy13;
        }
yy17:   yyaccept = 1;
        YYMARKER = ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy18;
yy18:   switch(yych){
        case 0x0A:      case ' ':       goto yy17;
        case 0x0D:      goto yy19;
        default:        goto yy10;
        }
yy19:   ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy17;
        default:        goto yy20;
        }
yy20:   YYCURSOR = YYMARKER;
        switch(yyaccept){
        case 1: goto yy10;
        case 0: goto yy3;
        }
yy21:   yych = *++YYCURSOR;
        switch(yych){
        case '.':       goto yy22;
        default:        goto yy20;
        }
yy22:   yych = *++YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy23;
        case 0x0D:      goto yy27;
        case ' ':       goto yy25;
        default:        goto yy20;
        }
yy23:   ++YYCURSOR;
        goto yy24;
yy24:
#line 342 "token.re"
{   SyckLevel *lvl = CURRENT_LEVEL();
                        if ( lvl->status == syck_lvl_header )
                        {
                            goto Header;
                        }
                        else
                        {
                            ENSURE_YAML_IEND(lvl, -1);
                            YYPOS(0);
                            return 0;
                        }
                        return 0;
                    }
#line 446 "<stdout>"
yy25:   ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy26;
yy26:   switch(yych){
        case ' ':       goto yy25;
        default:        goto yy24;
        }
yy27:   yych = *++YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy23;
        default:        goto yy20;
        }
yy28:   yych = *++YYCURSOR;
        switch(yych){
        case '-':       goto yy29;
        default:        goto yy20;
        }
yy29:   yych = *++YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy30;
        case 0x0D:      goto yy34;
        case ' ':       goto yy32;
        default:        goto yy20;
        }
yy30:   ++YYCURSOR;
        goto yy31;
yy31:
#line 328 "token.re"
{   SyckLevel *lvl = CURRENT_LEVEL();
                        if ( lvl->status == syck_lvl_header )
                        {
                            YYPOS(3);
                            goto Directive;
                        }
                        else
                        {
                            ENSURE_YAML_IEND(lvl, -1);
                            YYPOS(0);
                            return 0;
                        }
                    }
#line 489 "<stdout>"
yy32:   ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy33;
yy33:   switch(yych){
        case ' ':       goto yy32;
        default:        goto yy31;
        }
yy34:   ++YYCURSOR;
        switch((yych = *YYCURSOR)) {
        case 0x0A:      goto yy30;
        default:        goto yy20;
        }
}
#line 378 "token.re"

Document:
    {
        SyckLevel *lvl = CURRENT_LEVEL();
        if ( lvl->status == syck_lvl_header )
        {
            lvl->status = syck_lvl_doc;
        }

        YYTOKEN = YYCURSOR;

#line 518 "<stdout>"
{
        YYCTYPE yych;
        unsigned int yyaccept;
        goto yy35;
        ++YYCURSOR;
yy35:
        if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
        yych = *YYCURSOR;
        switch(yych){
        case 0x00:      goto yy62;
        case 0x09:      case ' ':       goto yy60;
        case 0x0A:      goto yy37;
        case 0x0D:      goto yy39;
        case '!':       goto yy51;
        case '"':       goto yy55;
        case '#':       goto yy58;
        case '&':       goto yy49;
        case '\'':      goto yy53;
        case '*':       goto yy50;
        case ',':       case ':':       goto yy47;
        case '-':       case '?':       goto yy48;
        case '>':       case '|':       goto yy57;
        case '[':       goto yy41;
        case ']':       case '}':       goto yy45;
        case '{':       goto yy43;
        default:        goto yy64;
        }
yy37:   yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        goto yy92;
yy38:
#line 392 "token.re"
{   /* Isolate spaces */
                        int indt_len;
                        GOBBLE_UP_YAML_INDENT( indt_len, YYTOKEN );
                        lvl = CURRENT_LEVEL();
                        doc_level = 0;

                        /* XXX: Comment lookahead */
                        if ( *YYCURSOR == '#' )
                        {
                            goto Document;
                        }

                        /* Ignore indentation inside inlines */
                        if ( lvl->status == syck_lvl_iseq || lvl->status == syck_lvl_imap )
                        {
                            goto Document;
                        }

                        /* Check for open indent */
                        ENSURE_YAML_IEND(lvl, indt_len);
                        ENSURE_YAML_IOPEN(lvl, indt_len, 0);
                        if ( indt_len == -1 )
                        {
                            return 0;
                        }
                        return YAML_INDENT;
                    }
#line 578 "<stdout>"
yy39:   ++YYCURSOR;
        switch((yych = *YYCURSOR)) {
        case 0x0A:      goto yy91;
        default:        goto yy40;
        }
yy40:
#line 497 "token.re"
{   ENSURE_YAML_IOPEN(lvl, doc_level, 1);
                        goto Plain;
                    }
#line 589 "<stdout>"
yy41:   ++YYCURSOR;
        goto yy42;
yy42:
#line 420 "token.re"
{   ENSURE_YAML_IOPEN(lvl, doc_level, 1);
                        lvl = CURRENT_LEVEL();
                        ADD_LEVEL(lvl->spaces + 1, syck_lvl_iseq);
                        return YYTOKEN[0];
                    }
#line 599 "<stdout>"
yy43:   ++YYCURSOR;
        goto yy44;
yy44:
#line 426 "token.re"
{   ENSURE_YAML_IOPEN(lvl, doc_level, 1);
                        lvl = CURRENT_LEVEL();
                        ADD_LEVEL(lvl->spaces + 1, syck_lvl_imap);
                        return YYTOKEN[0];
                    }
#line 609 "<stdout>"
yy45:   ++YYCURSOR;
        goto yy46;
yy46:
#line 432 "token.re"
{   POP_LEVEL();
                        return YYTOKEN[0];
                    }
#line 617 "<stdout>"
yy47:   yyaccept = 1;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case 0x0A:      goto yy86;
        case 0x0D:      goto yy90;
        case ' ':       goto yy88;
        default:        goto yy40;
        }
yy48:   yyaccept = 1;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case 0x0A:      goto yy81;
        case 0x0D:      goto yy85;
        case ' ':       goto yy83;
        default:        goto yy40;
        }
yy49:   yych = *++YYCURSOR;
        switch(yych){
        case '-':       case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':       case '_':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':       goto yy78;
        default:        goto yy40;
        }
yy50:   yych = *++YYCURSOR;
        switch(yych){
        case '-':       case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':       case '_':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':       goto yy75;
        default:        goto yy40;
        }
yy51:   ++YYCURSOR;
        goto yy52;
yy52:
#line 471 "token.re"
{   goto TransferMethod; }
#line 767 "<stdout>"
yy53:   ++YYCURSOR;
        goto yy54;
yy54:
#line 473 "token.re"
{   ENSURE_YAML_IOPEN(lvl, doc_level, 1);
                        goto SingleQuote; }
#line 774 "<stdout>"
yy55:   ++YYCURSOR;
        goto yy56;
yy56:
#line 476 "token.re"
{   ENSURE_YAML_IOPEN(lvl, doc_level, 1);
                        goto DoubleQuote; }
#line 781 "<stdout>"
yy57:   yyaccept = 1;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case 0x0A:      goto yy70;
        case 0x0D:      goto yy74;
        case ' ':       goto yy72;
        case '+':       case '-':       case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy67;
        default:        goto yy40;
        }
yy58:   ++YYCURSOR;
        goto yy59;
yy59:
#line 486 "token.re"
{   eat_comments( parser );
                        goto Document;
                    }
#line 807 "<stdout>"
yy60:   ++YYCURSOR;
        yych = *YYCURSOR;
        goto yy66;
yy61:
#line 490 "token.re"
{   goto Document; }
#line 814 "<stdout>"
yy62:   ++YYCURSOR;
        goto yy63;
yy63:
#line 492 "token.re"
{   ENSURE_YAML_IEND(lvl, -1);
                        YYPOS(0);
                        return 0;
                    }
#line 823 "<stdout>"
yy64:   yych = *++YYCURSOR;
        goto yy40;
yy65:   ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy66;
yy66:   switch(yych){
        case 0x09:      case ' ':       goto yy65;
        default:        goto yy61;
        }
yy67:   ++YYCURSOR;
        if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
        yych = *YYCURSOR;
        goto yy68;
yy68:   switch(yych){
        case 0x0A:      goto yy70;
        case 0x0D:      goto yy74;
        case ' ':       goto yy72;
        case '+':       case '-':       case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       goto yy67;
        default:        goto yy69;
        }
yy69:   YYCURSOR = YYMARKER;
        switch(yyaccept){
        case 0: goto yy38;
        case 1: goto yy40;
        }
yy70:   ++YYCURSOR;
        goto yy71;
yy71:
#line 479 "token.re"
{   if ( is_newline( YYCURSOR - 1 ) )
                        {
                            YYCURSOR--;
                        }
                        goto ScalarBlock;
                    }
#line 869 "<stdout>"
yy72:   ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy73;
yy73:   switch(yych){
        case ' ':       goto yy72;
        default:        goto yy71;
        }
yy74:   yych = *++YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy70;
        default:        goto yy69;
        }
yy75:   ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy76;
yy76:   switch(yych){
        case '-':       case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':       case '_':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':       goto yy75;
        default:        goto yy77;
        }
yy77:
#line 466 "token.re"
{   ENSURE_YAML_IOPEN(lvl, doc_level, 1);
                        sycklval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 );
                        return YAML_ALIAS;
                    }
#line 956 "<stdout>"
yy78:   ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy79;
yy79:   switch(yych){
        case '-':       case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':       case '_':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':       goto yy78;
        default:        goto yy80;
        }
yy80:
#line 455 "token.re"
{   sycklval->name = syck_strndup( YYTOKEN + 1, YYCURSOR - YYTOKEN - 1 );

                        /*
                         * Remove previous anchors of the same name.  Since the parser will likely
                         * construct deeper nodes first, we want those nodes to be placed in the
                         * queue for matching at a higher level of indentation.
                         */
                        syck_hdlr_remove_anchor(parser, sycklval->name);
                        return YAML_ANCHOR;
                    }
#line 1036 "<stdout>"
yy81:   ++YYCURSOR;
        goto yy82;
yy82:
#line 441 "token.re"
{   ENSURE_YAML_IOPEN(lvl, YYTOKEN - YYLINEPTR, 1);
                        FORCE_NEXT_TOKEN(YAML_IOPEN);
                        if ( *YYCURSOR == '#' || is_newline( YYCURSOR ) || is_newline( YYCURSOR - 1 ) )
                        {
                            YYCURSOR--;
                            ADD_LEVEL((YYTOKEN + 1) - YYLINEPTR, syck_lvl_seq);
                        }
                        else /* spaces followed by content uses the space as indentation */
                        {
                            ADD_LEVEL(YYCURSOR - YYLINEPTR, syck_lvl_seq);
                        }
                        return YYTOKEN[0];
                    }
#line 1054 "<stdout>"
yy83:   ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy84;
yy84:   switch(yych){
        case ' ':       goto yy83;
        default:        goto yy82;
        }
yy85:   yych = *++YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy81;
        default:        goto yy69;
        }
yy86:   ++YYCURSOR;
        goto yy87;
yy87:
#line 436 "token.re"
{   if ( *YYTOKEN == ':' && lvl->status != syck_lvl_imap ) lvl->status = syck_lvl_map;
                        YYPOS(1);
                        return YYTOKEN[0];
                    }
#line 1076 "<stdout>"
yy88:   ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy89;
yy89:   switch(yych){
        case ' ':       goto yy88;
        default:        goto yy87;
        }
yy90:   yych = *++YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy86;
        default:        goto yy69;
        }
yy91:   yyaccept = 0;
        YYMARKER = ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy92;
yy92:   switch(yych){
        case 0x0A:      case ' ':       goto yy91;
        case 0x0D:      goto yy93;
        default:        goto yy38;
        }
yy93:   ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy91;
        default:        goto yy69;
        }
}
#line 501 "token.re"

    }

Directive:
    {
        YYTOKTMP = YYCURSOR;

#line 1117 "<stdout>"
{
        YYCTYPE yych;
        unsigned int yyaccept;
        goto yy94;
        ++YYCURSOR;
yy94:
        if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
        yych = *YYCURSOR;
        switch(yych){
        case 0x00:      goto yy96;
        case 0x09:      case ' ':       goto yy99;
        case '%':       goto yy97;
        default:        goto yy101;
        }
yy96:   YYCURSOR = YYMARKER;
        switch(yyaccept){
        case 0: goto yy98;
        }
yy97:   yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case '.':
        case '/':
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':
        case ':':
        case ';':
        case '<':
        case '=':
        case '>':
        case '?':
        case '@':
        case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':
        case '[':
        case '\\':
        case ']':
        case '^':
        case '_':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':       goto yy104;
        default:        goto yy98;
        }
yy98:
#line 514 "token.re"
{   YYCURSOR = YYTOKTMP;
                        return YAML_DOCSEP;
                    }
#line 1221 "<stdout>"
yy99:   ++YYCURSOR;
        yych = *YYCURSOR;
        goto yy103;
yy100:
#line 512 "token.re"
{   goto Directive; }
#line 1228 "<stdout>"
yy101:  yych = *++YYCURSOR;
        goto yy98;
yy102:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy103;
yy103:  switch(yych){
        case 0x09:      case ' ':       goto yy102;
        default:        goto yy100;
        }
yy104:  ++YYCURSOR;
        if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
        yych = *YYCURSOR;
        goto yy105;
yy105:  switch(yych){
        case '.':
        case '/':
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       case ';':
        case '<':
        case '=':
        case '>':
        case '?':
        case '@':
        case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':
        case '[':
        case '\\':
        case ']':
        case '^':
        case '_':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':       goto yy104;
        case ':':       goto yy106;
        default:        goto yy96;
        }
yy106:  yych = *++YYCURSOR;
        switch(yych){
        case '.':
        case '/':
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':
        case ':':
        case ';':
        case '<':
        case '=':
        case '>':
        case '?':
        case '@':
        case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':
        case '[':
        case '\\':
        case ']':
        case '^':
        case '_':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':       goto yy107;
        default:        goto yy96;
        }
yy107:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy108;
yy108:  switch(yych){
        case '.':
        case '/':
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':
        case ':':
        case ';':
        case '<':
        case '=':
        case '>':
        case '?':
        case '@':
        case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'U':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':
        case '[':
        case '\\':
        case ']':
        case '^':
        case '_':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'p':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':       goto yy107;
        default:        goto yy109;
        }
yy109:
#line 510 "token.re"
{   goto Directive; }
#line 1484 "<stdout>"
}
#line 517 "token.re"

    }

Plain:
    {
        int qidx = 0;
        int qcapa = 100;
        char *qstr = S_ALLOC_N( char, qcapa );
        SyckLevel *plvl;
        int parentIndent;

        YYCURSOR = YYTOKEN;
        plvl = CURRENT_LEVEL();
        GET_TRUE_YAML_INDENT(parentIndent);

Plain2:
        YYTOKEN = YYCURSOR;

Plain3:

#line 1509 "<stdout>"
{
        YYCTYPE yych;
        unsigned int yyaccept;
        goto yy110;
        ++YYCURSOR;
yy110:
        if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
        yych = *YYCURSOR;
        switch(yych){
        case 0x00:      goto yy124;
        case 0x09:      goto yy126;
        case 0x0A:      goto yy112;
        case 0x0D:      goto yy114;
        case ' ':       goto yy122;
        case ',':       goto yy117;
        case ':':       goto yy116;
        case ']':       goto yy120;
        case '}':       goto yy118;
        default:        goto yy127;
        }
yy112:  yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        goto yy142;
yy113:
#line 540 "token.re"
{   int indt_len, nl_count = 0;
                        SyckLevel *lvl;
                        char *tok = YYTOKEN;
                        GOBBLE_UP_YAML_INDENT( indt_len, tok );
                        lvl = CURRENT_LEVEL();

                        if ( indt_len <= parentIndent )
                        {
                            RETURN_IMPLICIT();
                        }

                        while ( YYTOKEN < YYCURSOR )
                        {
                            int nl_len = newline_len( YYTOKEN++ );
                            if ( nl_len )
                            {
                                nl_count++;
                                YYTOKEN += nl_len - 1;
                            }
                        }
                        if ( nl_count <= 1 )
                        {
                            QUOTECAT(qstr, qcapa, qidx, ' ');
                        }
                        else
                        {
                            int i;
                            for ( i = 0; i < nl_count - 1; i++ )
                            {
                                QUOTECAT(qstr, qcapa, qidx, '\n');
                            }
                        }

                        goto Plain2;
                    }
#line 1570 "<stdout>"
yy114:  ++YYCURSOR;
        switch((yych = *YYCURSOR)) {
        case 0x0A:      goto yy141;
        default:        goto yy115;
        }
yy115:
#line 627 "token.re"
{   QUOTECATS(qstr, qcapa, qidx, YYTOKEN, YYCURSOR - YYTOKEN);
                        goto Plain2;
                    }
#line 1581 "<stdout>"
yy116:  yyaccept = 1;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case 0x0A:      goto yy136;
        case 0x0D:      goto yy140;
        case ' ':       goto yy138;
        default:        goto yy115;
        }
yy117:  yyaccept = 1;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case 0x0A:      goto yy130;
        case 0x0D:      goto yy134;
        case ' ':       goto yy132;
        default:        goto yy115;
        }
yy118:  ++YYCURSOR;
        goto yy119;
yy119:
#line 589 "token.re"
{   if ( plvl->status != syck_lvl_imap )
                        {
                            PLAIN_NOT_INL();
                        }
                        else
                        {
                            PLAIN_IS_INL();
                        }
                        RETURN_IMPLICIT();
                    }
#line 1612 "<stdout>"
yy120:  ++YYCURSOR;
        goto yy121;
yy121:
#line 600 "token.re"
{   if ( plvl->status != syck_lvl_iseq )
                        {
                            PLAIN_NOT_INL();
                        }
                        else
                        {
                            PLAIN_IS_INL();
                        }
                        RETURN_IMPLICIT();
                    }
#line 1627 "<stdout>"
yy122:  ++YYCURSOR;
        switch((yych = *YYCURSOR)) {
        case '#':       goto yy128;
        default:        goto yy123;
        }
yy123:
#line 617 "token.re"
{   if ( qidx == 0 )
                        {
                            goto Plain2;
                        }
                        else
                        {
                            goto Plain3;
                        }
                    }
#line 1644 "<stdout>"
yy124:  ++YYCURSOR;
        goto yy125;
yy125:
#line 615 "token.re"
{   RETURN_IMPLICIT(); }
#line 1650 "<stdout>"
yy126:  yych = *++YYCURSOR;
        goto yy123;
yy127:  yych = *++YYCURSOR;
        goto yy115;
yy128:  ++YYCURSOR;
        goto yy129;
yy129:
#line 611 "token.re"
{   eat_comments( parser );
                        RETURN_IMPLICIT();
                    }
#line 1662 "<stdout>"
yy130:  ++YYCURSOR;
        goto yy131;
yy131:
#line 578 "token.re"
{   if ( plvl->status != syck_lvl_iseq && plvl->status != syck_lvl_imap )
                        {
                            PLAIN_NOT_INL();
                        }
                        else
                        {
                            PLAIN_IS_INL();
                        }
                        RETURN_IMPLICIT();
                    }
#line 1677 "<stdout>"
yy132:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy133;
yy133:  switch(yych){
        case ' ':       goto yy132;
        default:        goto yy131;
        }
yy134:  yych = *++YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy130;
        default:        goto yy135;
        }
yy135:  YYCURSOR = YYMARKER;
        switch(yyaccept){
        case 0: goto yy113;
        case 1: goto yy115;
        }
yy136:  ++YYCURSOR;
        goto yy137;
yy137:
#line 576 "token.re"
{   RETURN_IMPLICIT(); }
#line 1701 "<stdout>"
yy138:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy139;
yy139:  switch(yych){
        case ' ':       goto yy138;
        default:        goto yy137;
        }
yy140:  yych = *++YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy136;
        default:        goto yy135;
        }
yy141:  yyaccept = 0;
        YYMARKER = ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy142;
yy142:  switch(yych){
        case 0x0A:      case ' ':       goto yy141;
        case 0x0D:      goto yy143;
        default:        goto yy113;
        }
yy143:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy141;
        default:        goto yy135;
        }
}
#line 631 "token.re"

    }

SingleQuote:
    {
        int qidx = 0;
        int qcapa = 100;
        char *qstr = S_ALLOC_N( char, qcapa );

SingleQuote2:
        YYTOKEN = YYCURSOR;

#line 1747 "<stdout>"
{
        YYCTYPE yych;
        unsigned int yyaccept;
        goto yy144;
        ++YYCURSOR;
yy144:
        if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
        yych = *YYCURSOR;
        switch(yych){
        case 0x00:      goto yy152;
        case 0x0A:      goto yy146;
        case 0x0D:      goto yy148;
        case '\'':      goto yy150;
        default:        goto yy153;
        }
yy146:  yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        goto yy157;
yy147:
#line 645 "token.re"
{   int indt_len;
                        int nl_count = 0;
                        SyckLevel *lvl;
                        GOBBLE_UP_YAML_INDENT( indt_len, YYTOKEN );
                        lvl = CURRENT_LEVEL();

                        if ( lvl->status != syck_lvl_str )
                        {
                            ADD_LEVEL( indt_len, syck_lvl_str );
                        }
                        else if ( indt_len < lvl->spaces )
                        {
                            /* Error! */
                        }

                        while ( YYTOKEN < YYCURSOR )
                        {
                            int nl_len = newline_len( YYTOKEN++ );
                            if ( nl_len )
                            {
                                nl_count++;
                                YYTOKEN += nl_len - 1;
                            }
                        }
                        if ( nl_count <= 1 )
                        {
                            QUOTECAT(qstr, qcapa, qidx, ' ');
                        }
                        else
                        {
                            int i;
                            for ( i = 0; i < nl_count - 1; i++ )
                            {
                                QUOTECAT(qstr, qcapa, qidx, '\n');
                            }
                        }

                        goto SingleQuote2;
                    }
#line 1807 "<stdout>"
yy148:  ++YYCURSOR;
        switch((yych = *YYCURSOR)) {
        case 0x0A:      goto yy156;
        default:        goto yy149;
        }
yy149:
#line 712 "token.re"
{   QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
                        goto SingleQuote2;
                    }
#line 1818 "<stdout>"
yy150:  ++YYCURSOR;
        switch((yych = *YYCURSOR)) {
        case '\'':      goto yy154;
        default:        goto yy151;
        }
yy151:
#line 689 "token.re"
{   SyckLevel *lvl;
                        SyckNode *n = syck_alloc_str();
                        lvl = CURRENT_LEVEL();

                        if ( lvl->status == syck_lvl_str )
                        {
                            POP_LEVEL();
                        }
                        if ( ((SyckParser *)parser)->taguri_expansion == 1 )
                        {
                            n->type_id = syck_taguri( YAML_DOMAIN, "str", 3 );
                        }
                        else
                        {
                            n->type_id = syck_strndup( "str", 3 );
                        }
                        n->data.str->ptr = qstr;
                        n->data.str->len = qidx;
                        n->data.str->style = scalar_1quote;
                        sycklval->nodeData = n;
                        return YAML_PLAIN;
                    }
#line 1848 "<stdout>"
yy152:  yych = *++YYCURSOR;
        goto yy151;
yy153:  yych = *++YYCURSOR;
        goto yy149;
yy154:  ++YYCURSOR;
        goto yy155;
yy155:
#line 685 "token.re"
{   QUOTECAT(qstr, qcapa, qidx, '\'');
                        goto SingleQuote2;
                    }
#line 1860 "<stdout>"
yy156:  yyaccept = 0;
        YYMARKER = ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy157;
yy157:  switch(yych){
        case 0x0A:      case ' ':       goto yy156;
        case 0x0D:      goto yy158;
        default:        goto yy147;
        }
yy158:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy156;
        default:        goto yy159;
        }
yy159:  YYCURSOR = YYMARKER;
        switch(yyaccept){
        case 0: goto yy147;
        }
}
#line 716 "token.re"

    }

DoubleQuote:
    {
        int keep_nl = 1;
        int qidx = 0;
        int qcapa = 100;
        char *qstr = S_ALLOC_N( char, qcapa );

DoubleQuote2:
        YYTOKEN = YYCURSOR;

#line 1901 "<stdout>"
{
        YYCTYPE yych;
        unsigned int yyaccept;
        goto yy160;
        ++YYCURSOR;
yy160:
        if((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
        yych = *YYCURSOR;
        switch(yych){
        case 0x00:      goto yy167;
        case 0x0A:      goto yy162;
        case 0x0D:      goto yy164;
        case '"':       goto yy169;
        case '\\':      goto yy166;
        default:        goto yy170;
        }
yy162:  yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        goto yy184;
yy163:
#line 734 "token.re"
{   int indt_len;
                        int nl_count = 0;
                        SyckLevel *lvl;
                        GOBBLE_UP_YAML_INDENT( indt_len, YYTOKEN );
                        lvl = CURRENT_LEVEL();

                        if ( lvl->status != syck_lvl_str )
                        {
                            ADD_LEVEL( indt_len, syck_lvl_str );
                        }
                        else if ( indt_len < lvl->spaces )
                        {
                            /* FIXME */
                        }

                        if ( keep_nl == 1 )
                        {
                            while ( YYTOKEN < YYCURSOR )
                            {
                                int nl_len = newline_len( YYTOKEN++ );
                                if ( nl_len )
                                {
                                    nl_count++;
                                    YYTOKEN += nl_len - 1;
                                }
                            }
                            if ( nl_count <= 1 )
                            {
                                QUOTECAT(qstr, qcapa, qidx, ' ');
                            }
                            else
                            {
                                int i;
                                for ( i = 0; i < nl_count - 1; i++ )
                                {
                                    QUOTECAT(qstr, qcapa, qidx, '\n');
                                }
                            }
                        }

                        keep_nl = 1;
                        goto DoubleQuote2;
                    }
#line 1966 "<stdout>"
yy164:  ++YYCURSOR;
        switch((yych = *YYCURSOR)) {
        case 0x0A:      goto yy183;
        default:        goto yy165;
        }
yy165:
#line 820 "token.re"
{   QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
                        goto DoubleQuote2;
                    }
#line 1977 "<stdout>"
yy166:  yyaccept = 1;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case 0x0A:      goto yy174;
        case 0x0D:      goto yy176;
        case ' ':       goto yy171;
        case '"':       case '0':       case '\\':      case 'a':
        case 'b':       case 'e':
        case 'f':       case 'n':       case 'r':       case 't':       case 'v':       goto yy178;
        case 'x':       goto yy177;
        default:        goto yy165;
        }
yy167:  ++YYCURSOR;
        goto yy168;
yy168:
#line 797 "token.re"
{   SyckLevel *lvl;
                        SyckNode *n = syck_alloc_str();
                        lvl = CURRENT_LEVEL();

                        if ( lvl->status == syck_lvl_str )
                        {
                            POP_LEVEL();
                        }
                        if ( ((SyckParser *)parser)->taguri_expansion == 1 )
                        {
                            n->type_id = syck_taguri( YAML_DOMAIN, "str", 3 );
                        }
                        else
                        {
                            n->type_id = syck_strndup( "str", 3 );
                        }
                        n->data.str->ptr = qstr;
                        n->data.str->len = qidx;
                        n->data.str->style = scalar_2quote;
                        sycklval->nodeData = n;
                        return YAML_PLAIN;
                    }
#line 2016 "<stdout>"
yy169:  yych = *++YYCURSOR;
        goto yy168;
yy170:  yych = *++YYCURSOR;
        goto yy165;
yy171:  ++YYCURSOR;
        if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
        yych = *YYCURSOR;
        goto yy172;
yy172:  switch(yych){
        case 0x0A:      goto yy174;
        case 0x0D:      goto yy176;
        case ' ':       goto yy171;
        default:        goto yy173;
        }
yy173:  YYCURSOR = YYMARKER;
        switch(yyaccept){
        case 0: goto yy163;
        case 1: goto yy165;
        }
yy174:  ++YYCURSOR;
        goto yy175;
yy175:
#line 792 "token.re"
{   keep_nl = 0;
                        YYCURSOR--;
                        goto DoubleQuote2;
                    }
#line 2044 "<stdout>"
yy176:  yych = *++YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy174;
        default:        goto yy173;
        }
yy177:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':       goto yy180;
        default:        goto yy173;
        }
yy178:  ++YYCURSOR;
        goto yy179;
yy179:
#line 778 "token.re"
{   char ch = *( YYCURSOR - 1 );
                        QUOTECAT(qstr, qcapa, qidx, escape_seq( ch ));
                        goto DoubleQuote2;
                    }
#line 2082 "<stdout>"
yy180:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':       goto yy181;
        default:        goto yy173;
        }
yy181:  ++YYCURSOR;
        goto yy182;
yy182:
#line 783 "token.re"
{   long ch;
                        char *chr_text = syck_strndup( YYTOKEN, 4 );
                        chr_text[0] = '0';
                        ch = strtol( chr_text, NULL, 16 );
                        free( chr_text );
                        QUOTECAT(qstr, qcapa, qidx, ch);
                        goto DoubleQuote2;
                    }
#line 2119 "<stdout>"
yy183:  yyaccept = 0;
        YYMARKER = ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy184;
yy184:  switch(yych){
        case 0x0A:      case ' ':       goto yy183;
        case 0x0D:      goto yy185;
        default:        goto yy163;
        }
yy185:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy183;
        default:        goto yy173;
        }
}
#line 824 "token.re"

    }

TransferMethod:
    {
        int qidx = 0;
        int qcapa = 100;
        char *qstr = S_ALLOC_N( char, qcapa );

TransferMethod2:
        YYTOKTMP = YYCURSOR;

#line 2152 "<stdout>"
{
        YYCTYPE yych;
        unsigned int yyaccept;
        goto yy186;
        ++YYCURSOR;
yy186:
        if((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
        yych = *YYCURSOR;
        switch(yych){
        case 0x00:      goto yy188;
        case 0x0A:      goto yy190;
        case 0x0D:      goto yy192;
        case ' ':       goto yy191;
        case '\\':      goto yy194;
        default:        goto yy195;
        }
yy188:  ++YYCURSOR;
        goto yy189;
yy189:
#line 838 "token.re"
{   SyckLevel *lvl;
                        YYCURSOR = YYTOKTMP;
                        if ( YYCURSOR == YYTOKEN + 1 )
                        {
                            free( qstr );
                            return YAML_ITRANSFER;
                        }

                        lvl = CURRENT_LEVEL();

                        /*
                         * URL Prefixing
                         */
                        if ( *qstr == '^' )
                        {
                            sycklval->name = S_ALLOC_N( char, qidx + strlen( lvl->domain ) );
                            sycklval->name[0] = '\0';
                            strcat( sycklval->name, lvl->domain );
                            strncat( sycklval->name, qstr + 1, qidx - 1 );
                            free( qstr );
                        }
                        else
                        {
                            char *carat = qstr;
                            char *qend = qstr + qidx;
                            while ( (++carat) < qend )
                            {
                                if ( *carat == '^' )
                                    break;
                            }

                            if ( carat < qend )
                            {
                                free( lvl->domain );
                                lvl->domain = syck_strndup( qstr, carat - qstr );
                                sycklval->name = S_ALLOC_N( char, ( qend - carat ) + strlen( lvl->domain ) );
                                sycklval->name[0] = '\0';
                                strcat( sycklval->name, lvl->domain );
                                strncat( sycklval->name, carat + 1, ( qend - carat ) - 1 );
                                free( qstr );
                            }
                            else
                            {
                                sycklval->name = qstr;
                            }
                        }

                        return YAML_TRANSFER;
                    }
#line 2222 "<stdout>"
yy190:  yych = *++YYCURSOR;
        goto yy189;
yy191:  yych = *++YYCURSOR;
        goto yy204;
yy192:  ++YYCURSOR;
        switch((yych = *YYCURSOR)) {
        case 0x0A:      goto yy188;
        default:        goto yy193;
        }
yy193:
#line 905 "token.re"
{   QUOTECAT(qstr, qcapa, qidx, *(YYCURSOR - 1));
                        goto TransferMethod2;
                    }
#line 2237 "<stdout>"
yy194:  yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case '"':       case '0':       case '\\':      case 'a':
        case 'b':       case 'e':
        case 'f':       case 'n':       case 'r':       case 't':       case 'v':       goto yy198;
        case 'x':       goto yy196;
        default:        goto yy193;
        }
yy195:  yych = *++YYCURSOR;
        goto yy193;
yy196:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':       goto yy200;
        default:        goto yy197;
        }
yy197:  YYCURSOR = YYMARKER;
        switch(yyaccept){
        case 0: goto yy193;
        }
yy198:  ++YYCURSOR;
        goto yy199;
yy199:
#line 891 "token.re"
{  char ch = *( YYCURSOR - 1 );
                        QUOTECAT(qstr, qcapa, qidx, escape_seq( ch ));
                        goto TransferMethod2;
                    }
#line 2285 "<stdout>"
yy200:  yych = *++YYCURSOR;
        switch(yych){
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':       case 'A':
        case 'B':
        case 'C':
        case 'D':
        case 'E':
        case 'F':       case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':       goto yy201;
        default:        goto yy197;
        }
yy201:  ++YYCURSOR;
        goto yy202;
yy202:
#line 896 "token.re"
{   long ch;
                        char *chr_text = syck_strndup( YYTOKTMP, 4 );
                        chr_text[0] = '0';
                        ch = strtol( chr_text, NULL, 16 );
                        free( chr_text );
                        QUOTECAT(qstr, qcapa, qidx, ch);
                        goto TransferMethod2;
                    }
#line 2322 "<stdout>"
yy203:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy204;
yy204:  switch(yych){
        case ' ':       goto yy203;
        default:        goto yy189;
        }
}
#line 910 "token.re"

    }

ScalarBlock:
    {
        int qidx = 0;
        int qcapa = 100;
        char *qstr = S_ALLOC_N( char, qcapa );
        int blockType = 0;
        int nlDoWhat = 0;
        int lastIndent = 0;
        int forceIndent = -1;
        char *yyt = YYTOKEN;
        SyckLevel *lvl = CURRENT_LEVEL();
        int parentIndent = -1;

        switch ( *yyt )
        {
            case '|': blockType = BLOCK_LIT; break;
            case '>': blockType = BLOCK_FOLD; break;
        }

        while ( ++yyt <= YYCURSOR )
        {
            if ( *yyt == '-' )
            {
                nlDoWhat = NL_CHOMP;
            }
            else if ( *yyt == '+' )
            {
                nlDoWhat = NL_KEEP;
            }
            else if ( isdigit( *yyt ) )
            {
                forceIndent = strtol( yyt, NULL, 10 );
            }
        }

        qstr[0] = '\0';
        YYTOKEN = YYCURSOR;

ScalarBlock2:
        YYTOKEN = YYCURSOR;

#line 2378 "<stdout>"
{
        YYCTYPE yych;
        unsigned int yyaccept;
        goto yy205;
        ++YYCURSOR;
yy205:
        if((YYLIMIT - YYCURSOR) < 5) YYFILL(5);
        yych = *YYCURSOR;
        switch(yych){
        case 0x00:      goto yy213;
        case 0x0A:      goto yy207;
        case 0x0D:      goto yy209;
        case '#':       goto yy211;
        case '-':       goto yy215;
        default:        goto yy216;
        }
yy207:  yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        goto yy226;
yy208:
#line 956 "token.re"
{   char *pacer;
                        char *tok = YYTOKEN;
                        int indt_len = 0, nl_count = 0, fold_nl = 0, nl_begin = 0;
                        GOBBLE_UP_YAML_INDENT( indt_len, tok );
                        lvl = CURRENT_LEVEL();

                        if ( lvl->status != syck_lvl_block )
                        {
                            GET_TRUE_YAML_INDENT(parentIndent);
                            if ( forceIndent > 0 ) forceIndent += parentIndent;
                            if ( indt_len > parentIndent )
                            {
                                int new_spaces = forceIndent > 0 ? forceIndent : indt_len;
                                ADD_LEVEL( new_spaces, syck_lvl_block );
                                lastIndent = indt_len - new_spaces;
                                nl_begin = 1;
                                lvl = CURRENT_LEVEL();
                            }
                            else
                            {
                                YYCURSOR = YYTOKEN;
                                RETURN_YAML_BLOCK();
                            }
                        }

                        /*
                         * Fold only in the event of two lines being on the leftmost
                         * indentation.
                         */
                        if ( blockType == BLOCK_FOLD && lastIndent == 0 && ( indt_len - lvl->spaces ) == 0 )
                        {
                            fold_nl = 1;
                        }

                        pacer = YYTOKEN;
                        while ( pacer < YYCURSOR )
                        {
                            int nl_len = newline_len( pacer++ );
                            if ( nl_len )
                            {
                                nl_count++;
                                pacer += nl_len - 1;
                            }
                        }

                        if ( fold_nl == 1 || nl_begin == 1 )
                        {
                            nl_count--;
                        }

                        if ( nl_count < 1 && nl_begin == 0 )
                        {
                            QUOTECAT(qstr, qcapa, qidx, ' ');
                        }
                        else
                        {
                            int i;
                            for ( i = 0; i < nl_count; i++ )
                            {
                                QUOTECAT(qstr, qcapa, qidx, '\n');
                            }
                        }

                        lastIndent = indt_len - lvl->spaces;
                        YYCURSOR -= lastIndent;

                        if ( indt_len < lvl->spaces )
                        {
                            POP_LEVEL();
                            YYCURSOR = YYTOKEN;
                            RETURN_YAML_BLOCK();
                        }
                        goto ScalarBlock2;
                    }
#line 2474 "<stdout>"
yy209:  ++YYCURSOR;
        switch((yych = *YYCURSOR)) {
        case 0x0A:      goto yy225;
        default:        goto yy210;
        }
yy210:
#line 1070 "token.re"
{   QUOTECAT(qstr, qcapa, qidx, *YYTOKEN);
                        goto ScalarBlock2;
                    }
#line 2485 "<stdout>"
yy211:  ++YYCURSOR;
        goto yy212;
yy212:
#line 1032 "token.re"
{   lvl = CURRENT_LEVEL();
                        if ( lvl->status != syck_lvl_block )
                        {
                            eat_comments( parser );
                            YYTOKEN = YYCURSOR;
                        }
                        else
                        {
                            QUOTECAT(qstr, qcapa, qidx, *YYTOKEN);
                        }
                        goto ScalarBlock2;
                    }
#line 2502 "<stdout>"
yy213:  ++YYCURSOR;
        goto yy214;
yy214:
#line 1046 "token.re"
{   YYCURSOR--;
                        POP_LEVEL();
                        RETURN_YAML_BLOCK();
                    }
#line 2511 "<stdout>"
yy215:  yyaccept = 1;
        yych = *(YYMARKER = ++YYCURSOR);
        switch(yych){
        case '-':       goto yy217;
        default:        goto yy210;
        }
yy216:  yych = *++YYCURSOR;
        goto yy210;
yy217:  yych = *++YYCURSOR;
        switch(yych){
        case '-':       goto yy219;
        default:        goto yy218;
        }
yy218:  YYCURSOR = YYMARKER;
        switch(yyaccept){
        case 0: goto yy208;
        case 1: goto yy210;
        }
yy219:  yych = *++YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy220;
        case 0x0D:      goto yy224;
        case ' ':       goto yy222;
        default:        goto yy218;
        }
yy220:  ++YYCURSOR;
        goto yy221;
yy221:
#line 1051 "token.re"
{   if ( YYTOKEN == YYLINEPTR )
                        {
                            if ( blockType == BLOCK_FOLD && qidx > 0 )
                            {
                                qidx -= 1;
                            }
                            QUOTECAT(qstr, qcapa, qidx, '\n');
                            POP_LEVEL();
                            YYCURSOR = YYTOKEN;
                            RETURN_YAML_BLOCK();
                        }
                        else
                        {
                            QUOTECAT(qstr, qcapa, qidx, *YYTOKEN);
                            YYCURSOR = YYTOKEN + 1;
                            goto ScalarBlock2;
                        }
                    }
#line 2559 "<stdout>"
yy222:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy223;
yy223:  switch(yych){
        case ' ':       goto yy222;
        default:        goto yy221;
        }
yy224:  yych = *++YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy220;
        default:        goto yy218;
        }
yy225:  yyaccept = 0;
        YYMARKER = ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy226;
yy226:  switch(yych){
        case 0x0A:      case ' ':       goto yy225;
        case 0x0D:      goto yy227;
        default:        goto yy208;
        }
yy227:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy225;
        default:        goto yy218;
        }
}
#line 1075 "token.re"

    }

    return 0;

}

void
eat_comments( SyckParser *parser )
{
Comment:
    {
        YYTOKEN = YYCURSOR;

#line 2607 "<stdout>"
{
        YYCTYPE yych;
        unsigned int yyaccept;
        goto yy228;
        ++YYCURSOR;
yy228:
        if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
        yych = *YYCURSOR;
        switch(yych){
        case 0x00:      goto yy230;
        case 0x0A:      goto yy232;
        case 0x0D:      goto yy233;
        default:        goto yy235;
        }
yy230:  ++YYCURSOR;
        goto yy231;
yy231:
#line 1091 "token.re"
{   YYCURSOR = YYTOKEN;
                        return;
                    }
#line 2629 "<stdout>"
yy232:  yyaccept = 0;
        yych = *(YYMARKER = ++YYCURSOR);
        goto yy237;
yy233:  ++YYCURSOR;
        switch((yych = *YYCURSOR)) {
        case 0x0A:      goto yy236;
        default:        goto yy234;
        }
yy234:
#line 1095 "token.re"
{   goto Comment;
                    }
#line 2642 "<stdout>"
yy235:  yych = *++YYCURSOR;
        goto yy234;
yy236:  yyaccept = 0;
        YYMARKER = ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        goto yy237;
yy237:  switch(yych){
        case 0x0A:      goto yy236;
        case 0x0D:      goto yy238;
        default:        goto yy231;
        }
yy238:  ++YYCURSOR;
        if(YYLIMIT == YYCURSOR) YYFILL(1);
        yych = *YYCURSOR;
        switch(yych){
        case 0x0A:      goto yy236;
        default:        goto yy239;
        }
yy239:  YYCURSOR = YYMARKER;
        switch(yyaccept){
        case 0: goto yy231;
        }
}
#line 1098 "token.re"

    }

}

char
escape_seq( char ch )
{
    switch ( ch )
    {
        case '0': return '\0';
        case 'a': return 7;
        case 'b': return '\010';
        case 'e': return '\033';
        case 'f': return '\014';
        case 'n': return '\n';
        case 'r': return '\015';
        case 't': return '\t';
        case 'v': return '\013';
        default: return ch;
    }
}

int
is_newline( char *ptr )
{
    return newline_len( ptr );
}

int
newline_len( char *ptr )
{
    if ( *ptr == '\n' )
        return 1;

    if ( *ptr == '\r' && *( ptr + 1 ) == '\n' )
        return 2;

    return 0;
}

int
syckwrap()
{
    return 1;
}

void
syckerror( char *msg )
{
    if ( syck_parser_ptr->error_handler == NULL )
        syck_parser_ptr->error_handler = syck_default_error_handler;

    syck_parser_ptr->root = syck_parser_ptr->root_on_error;
    (syck_parser_ptr->error_handler)(syck_parser_ptr, msg);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/syck/yaml2byte.c

root/ext/syck/yaml2byte.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. bytestring_t
  2. bytestring_alloc
  3. bytestring_append
  4. bytestring_extend
  5. syck_yaml2byte_handler
  6. syck_yaml2byte
  7. main
/*
 * yaml2byte.c
 *
 * $Author: why $
 * $Date: 2005/09/20 06:50:20 $
 *
 * Copyright (C) 2003 why the lucky stiff, clark evans
 *
 *   WARNING WARNING WARNING  --- THIS IS *NOT JUST* PLAYING
 *   ANYMORE! -- WHY HAS EMBRACED THIS AS THE REAL THING!
 */
#include "ruby.h"
#include <syck.h>
#include <assert.h>
#define YAMLBYTE_UTF8
#include "yamlbyte.h"

#include <stdio.h>
#define TRACE0(a)  \
    do { printf(a); printf("\n"); fflush(stdout); } while(0)
#define TRACE1(a,b) \
    do { printf(a,b); printf("\n"); fflush(stdout); } while(0)
#define TRACE2(a,b,c) \
    do { printf(a,b,c); printf("\n"); fflush(stdout); } while(0)
#define TRACE3(a,b,c,d) \
    do { printf(a,b,c,d); printf("\n"); fflush(stdout); } while(0)

/* Reinvent the wheel... */
#define CHUNKSIZE 64
#define HASH ((long)0xCAFECAFE)
typedef struct {
   long hash;
   char *buffer;
   long length;
   long remaining;
   int  printed;
} bytestring_t;
bytestring_t *bytestring_alloc() {
    bytestring_t *ret;
    /*TRACE0("bytestring_alloc()");*/
    ret = S_ALLOC(bytestring_t);
    ret->hash   = HASH;
    ret->length = CHUNKSIZE;
    ret->remaining = ret->length;
    ret->buffer = S_ALLOC_N(char, ret->length + 1 );
    ret->buffer[0] = 0;
    ret->printed = 0;
    return ret;
}
void bytestring_append(bytestring_t *str, char code,
                       char *start, char *finish)
{
    long grow;
    long length = 2;   /* CODE + LF */
    char *curr;
    assert(str && HASH == str->hash);
    /*TRACE0("bytestring_append()");*/
    if(start) {
        if(!finish)
            finish = start + strlen(start);
        length += (finish-start);
    }
    if(length > str->remaining) {
        grow = (length - str->remaining) + CHUNKSIZE;
        str->remaining += grow;
        str->length    += grow;
        str->buffer = S_REALLOC_N( str->buffer, char, str->length + 1 );
        assert(str->buffer);
    }
    curr = str->buffer + (str->length - str->remaining);
    *curr = code;
    curr += 1;
    if(start)
        while(start < finish)
            *curr ++ = *start ++;
    *curr = '\n';
    curr += 1;
    *curr = 0;
    str->remaining = str->remaining - length;
    assert( (str->buffer + str->length) - str->remaining );
}
void bytestring_extend(bytestring_t *str, bytestring_t *ext)
{
    char *from;
    char *curr;
    char *stop;
    long grow;
    long length;
    assert(str && HASH == str->hash);
    assert(ext && HASH == ext->hash);
    if(ext->printed) {
        assert(ext->buffer[0] ==YAMLBYTE_ANCHOR);
        curr = ext->buffer;
        while( '\n' != *curr)
            curr++;
        bytestring_append(str, YAMLBYTE_ALIAS, ext->buffer + 1, curr);
    } else {
        ext->printed = 1;
        length  = (ext->length - ext->remaining);
        if(length > str->remaining) {
            grow = (length - str->remaining) + CHUNKSIZE;
            str->remaining += grow;
            str->length    += grow;
            str->buffer = S_REALLOC_N( str->buffer, char, str->length + 1 );
        }
        curr = str->buffer + (str->length - str->remaining);
        from = ext->buffer;
        stop = ext->buffer + length;
        while( from < stop )
            *curr ++ = *from ++;
        *curr = 0;
        str->remaining = str->remaining - length;
        assert( (str->buffer + str->length) - str->remaining );
    }
}

/* convert SyckNode into yamlbyte_buffer_t objects */
SYMID
syck_yaml2byte_handler(p, n)
    SyckParser *p;
    SyckNode *n;
{
    SYMID oid;
    long i;
    char ch;
    char nextcode;
    char *start;
    char *current;
    char *finish;
    bytestring_t *val = NULL;
    bytestring_t *sav = NULL;
    /*TRACE0("syck_yaml2byte_handler()");*/
    val = bytestring_alloc();
    if(n->anchor) bytestring_append(val,YAMLBYTE_ANCHOR, n->anchor, NULL);
    if ( n->type_id )
    {
        if ( p->taguri_expansion )
        {
            bytestring_append(val,YAMLBYTE_TRANSFER, n->type_id, NULL);
        }
        else
        {
            char *type_tag = S_ALLOC_N( char, strlen( n->type_id ) + 1 );
            type_tag[0] = '\0';
            strcat( type_tag, "!" );
            strcat( type_tag, n->type_id );
            bytestring_append( val, YAMLBYTE_TRANSFER, type_tag, NULL);
        }
    }
    switch (n->kind)
    {
        case syck_str_kind:
            nextcode = YAMLBYTE_SCALAR;
            start  = n->data.str->ptr;
            finish = start + n->data.str->len - 1;
            current = start;
            /*TRACE2("SCALAR: %s %d", start, n->data.str->len); */
            while(1) {
                ch = *current;
                if('\n' == ch || 0 == ch || current > finish) {
                    if(current >= start) {
                        bytestring_append(val, nextcode, start, current);
                        nextcode = YAMLBYTE_CONTINUE;
                    }
                    start = current + 1;
                    if(current > finish)
                    {
                        break;
                    }
                    else if('\n' == ch )
                    {
                        bytestring_append(val,YAMLBYTE_NEWLINE,NULL,NULL);
                    }
                    else if(0 == ch)
                    {
                        bytestring_append(val,YAMLBYTE_NULLCHAR,NULL,NULL);
                    }
                    else
                    {
                        assert("oops");
                    }
                }
                current += 1;
            }
        break;
        case syck_seq_kind:
            bytestring_append(val,YAMLBYTE_SEQUENCE,NULL,NULL);
            for ( i = 0; i < n->data.list->idx; i++ )
            {
                oid = syck_seq_read( n, i );
                syck_lookup_sym( p, oid, (char **)&sav );
                bytestring_extend(val, sav);
            }
            bytestring_append(val,YAMLBYTE_END_BRANCH,NULL,NULL);
        break;
        case syck_map_kind:
            bytestring_append(val,YAMLBYTE_MAPPING,NULL,NULL);
            for ( i = 0; i < n->data.pairs->idx; i++ )
            {
                oid = syck_map_read( n, map_key, i );
                syck_lookup_sym( p, oid, (char **)&sav );
                bytestring_extend(val, sav);
                oid = syck_map_read( n, map_value, i );
                syck_lookup_sym( p, oid, (char **)&sav );
                bytestring_extend(val, sav);
            }
            bytestring_append(val,YAMLBYTE_END_BRANCH,NULL,NULL);
        break;
    }
    oid = syck_add_sym( p, (char *) val );
    /*TRACE1("Saving: %s", val->buffer );*/
    return oid;
}

char *
syck_yaml2byte(char *yamlstr)
{
    SYMID oid;
    char *ret;
    bytestring_t *sav;

    SyckParser *parser = syck_new_parser();
    syck_parser_str_auto( parser, yamlstr, NULL );
    syck_parser_handler( parser, syck_yaml2byte_handler );
    syck_parser_error_handler( parser, NULL );
    syck_parser_implicit_typing( parser, 1 );
    syck_parser_taguri_expansion( parser, 1 );
    oid = syck_parse( parser );

    if ( syck_lookup_sym( parser, oid, (char **)&sav ) == 1 ) {
        ret = S_ALLOC_N( char, strlen( sav->buffer ) + 3 );
        ret[0] = '\0';
        strcat( ret, "D\n" );
        strcat( ret, sav->buffer );
    }
    else
    {
        ret = NULL;
    }

    syck_free_parser( parser );
    return ret;
}

#ifdef TEST_YBEXT
#include <stdio.h>
int main() {
   char *yaml = "test: 1\nand: \"with new\\nline\\n\"\nalso: &3 three\nmore: *3";
   printf("--- # YAML \n");
   printf(yaml);
   printf("\n...\n");
   printf(syck_yaml2byte(yaml));
   return 0;
}
#endif
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/syck/yamlbyte.h

root/ext/syck/yamlbyte.h

/* [<][>][^] [v][top][bottom] [index] [help] */

INCLUDED FROM

DEFINITIONS

This source file includes following definitions.
  1. YAMLBYTE_OK
  2. YAMLBYTE_E_MEMORY
  3. YAMLBYTE_E_READ
  4. YAMLBYTE_E_WRITE
  5. YAMLBYTE_E_OTHER
  6. YAMLBYTE_E_PARSE
  7. yamlbyte_result_t
  8. yamlbyte_inst_t
/*  yamlbyte.h
 *
 *  The YAML bytecode "C" interface header file.   See the YAML bytecode
 *  reference for bytecode sequence rules and for the meaning of each
 *  bytecode.
 */

#ifndef YAMLBYTE_H
#define YAMLBYTE_H
#include <stddef.h>

/* define what a character is */
typedef unsigned char yamlbyte_utf8_t;
typedef unsigned short yamlbyte_utf16_t;
#ifdef YAMLBYTE_UTF8
  #ifdef YAMLBYTE_UTF16
    #error Must only define YAMLBYTE_UTF8 or YAMLBYTE_UTF16
  #endif
  typedef yamlbyte_utf8_t yamlbyte_char_t;
#else
  #ifdef YAMLBYTE_UTF16
    typedef yamlbyte_utf16_t yamlbyte_char_t;
  #else
    #error Must define YAMLBYTE_UTF8 or YAMLBYTE_UTF16
  #endif
#endif

/* specify list of bytecodes */
#define YAMLBYTE_FINISH          ((yamlbyte_char_t) 0)
#define YAMLBYTE_DOCUMENT        ((yamlbyte_char_t)'D')
#define YAMLBYTE_DIRECTIVE       ((yamlbyte_char_t)'V')
#define YAMLBYTE_PAUSE           ((yamlbyte_char_t)'P')
#define YAMLBYTE_MAPPING         ((yamlbyte_char_t)'M')
#define YAMLBYTE_SEQUENCE        ((yamlbyte_char_t)'Q')
#define YAMLBYTE_END_BRANCH      ((yamlbyte_char_t)'E')
#define YAMLBYTE_SCALAR          ((yamlbyte_char_t)'S')
#define YAMLBYTE_CONTINUE        ((yamlbyte_char_t)'C')
#define YAMLBYTE_NEWLINE         ((yamlbyte_char_t)'N')
#define YAMLBYTE_NULLCHAR        ((yamlbyte_char_t)'Z')
#define YAMLBYTE_ANCHOR          ((yamlbyte_char_t)'A')
#define YAMLBYTE_ALIAS           ((yamlbyte_char_t)'R')
#define YAMLBYTE_TRANSFER        ((yamlbyte_char_t)'T')
/* formatting bytecodes */
#define YAMLBYTE_COMMENT         ((yamlbyte_char_t)'c')
#define YAMLBYTE_INDENT          ((yamlbyte_char_t)'i')
#define YAMLBYTE_STYLE           ((yamlbyte_char_t)'s')
/* other bytecodes */
#define YAMLBYTE_LINE_NUMBER     ((yamlbyte_char_t)'#')
#define YAMLBYTE_WHOLE_SCALAR    ((yamlbyte_char_t)'<')
#define YAMLBYTE_NOTICE          ((yamlbyte_char_t)'!')
#define YAMLBYTE_SPAN            ((yamlbyte_char_t)')')
#define YAMLBYTE_ALLOC           ((yamlbyte_char_t)'@')

/* second level style bytecodes, ie "s>" */
#define YAMLBYTE_FLOW            ((yamlbyte_char_t)'>')
#define YAMLBYTE_LITERAL         ((yamlbyte_char_t)'|')
#define YAMLBYTE_BLOCK           ((yamlbyte_char_t)'b')
#define YAMLBYTE_PLAIN           ((yamlbyte_char_t)'p')
#define YAMLBYTE_INLINE_MAPPING  ((yamlbyte_char_t)'{')
#define YAMLBYTE_INLINE_SEQUENCE ((yamlbyte_char_t)'[')
#define YAMLBYTE_SINGLE_QUOTED   ((yamlbyte_char_t)39)
#define YAMLBYTE_DOUBLE_QUOTED   ((yamlbyte_char_t)'"')

/*
 * The "C" API has two variants, one based on instructions,
 * with events delivered via pointers; and the other one
 * is character based where one or more instructions are
 * serialized into a buffer.
 *
 * Note: In the instruction based API, WHOLE_SCALAR does
 *       not have the '<here' marshalling stuff.
 */

typedef void * yamlbyte_consumer_t;
typedef void * yamlbyte_producer_t;

/* push and pull APIs need a way to communicate results */
typedef enum {
    YAMLBYTE_OK          = 0,     /* proceed                        */
    YAMLBYTE_E_MEMORY    = 'M',   /* could not allocate memory      */
    YAMLBYTE_E_READ      = 'R',   /* input stream read error        */
    YAMLBYTE_E_WRITE     = 'W',   /* output stream write error      */
    YAMLBYTE_E_OTHER     = '?',   /* some other error condition     */
    YAMLBYTE_E_PARSE     = 'P',   /* parse error, check bytecodes   */
} yamlbyte_result_t;

typedef const yamlbyte_char_t *yamlbyte_buff_t;

/*
 *  The "Instruction" API
 */

typedef struct yaml_instruction {
    yamlbyte_char_t bytecode;
    yamlbyte_buff_t start;
    yamlbyte_buff_t finish;  /* open range, *finish is _not_ part */
} *yamlbyte_inst_t;

/* producer pushes the instruction with one bytecode event to the
 * consumer; if the consumer's result is not YAMLBYTE_OK, then
 * the producer should stop */
typedef
  yamlbyte_result_t
   (*yamlbyte_push_t)(
     yamlbyte_consumer_t self,
     yamlbyte_inst_t  inst
   );

/* consumer pulls a bytecode instruction from the producer; in this
 * case the instruction (and is buffer) are owned by the producer and
 * will remain valid till the pull function is called once again;
 * if the instruction is NULL, then there are no more results; and
 * it is important to call the pull function till it returns NULL so
 * that the producer can clean up its memory allocations */
typedef
   yamlbyte_result_t
    (*yamlbyte_pull_t)(
      yamlbyte_producer_t self,
      yamlbyte_inst_t *inst   /* to be filled in by the producer */
    );

/*
 *  Buffer based API
 */

/* producer pushes a null terminated buffer filled with one or more
 * bytecode events to the consumer; if the consumer's result is not
 * YAMLBYTE_OK, then the producer should stop */
typedef
  yamlbyte_result_t
   (*yamlbyte_pushbuff_t)(
     yamlbyte_consumer_t self,
     yamlbyte_buff_t  buff
   );

/* consumer pulls bytecode events from the producer; in this case
 * the buffer is owned by the producer, and will remain valid till
 * the pull function is called once again; if the buffer pointer
 * is set to NULL, then there are no more results; it is important
 * to call the pull function till it returns NULL so that the
 * producer can clean up its memory allocations */
typedef
   yamlbyte_result_t
    (*yamlbyte_pullbuff_t)(
      yamlbyte_producer_t self,
      yamlbyte_buff_t *buff   /* to be filled in by the producer */
    );

/* convert a pull interface to a push interface; the reverse process
 * requires threads and thus is language dependent */
#define YAMLBYTE_PULL2PUSH(pull,producer,push,consumer,result)       \
    do {                                                         \
        yamlbyte_pullbuff_t _pull = (pull);                              \
        yamlbyte_pushbuff_t _push = (push);                              \
        yamlbyte_result_t _result = YAMLBYTE_OK;                         \
        yamlbyte_producer_t _producer = (producer);                  \
        yamlbyte_consumer_t _consumer = (consumer);                  \
        while(1) {                                               \
            yamlbyte_buff_t buff = NULL;                           \
            _result = _pull(_producer,&buff);                    \
            if(YAMLBYTE_OK != result || NULL == buff)                \
                break;                                           \
            _result = _push(_consumer,buff);                     \
            if(YAMLBYTE_OK != result)                                \
                break;                                           \
        }                                                        \
        (result) = _result;                                      \
    } while(0)

#endif
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/syslog/syslog.c

root/ext/syslog/syslog.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. syslog_write
  2. mSyslog_close
  3. mSyslog_open
  4. mSyslog_reopen
  5. mSyslog_isopen
  6. mSyslog_ident
  7. mSyslog_options
  8. mSyslog_facility
  9. mSyslog_get_mask
  10. mSyslog_set_mask
  11. mSyslog_log
  12. mSyslog_inspect
  13. mSyslog_instance
  14. define_syslog_shortcut_method
  15. mSyslogConstants_LOG_UPTO
  16. Init_syslog
/*
 * UNIX Syslog extension for Ruby
 * Amos Gouaux, University of Texas at Dallas
 * <amos+ruby@utdallas.edu>
 *
 * $RoughId: syslog.c,v 1.21 2002/02/25 12:21:17 knu Exp $
 * $Id: syslog.c,v 1.9 2004/03/29 07:54:25 matz Exp $
 */

#include "ruby.h"
#include "util.h"
#include <syslog.h>

/* Syslog class */
static VALUE mSyslog, mSyslogConstants;
static const char *syslog_ident = NULL;
static int syslog_options = -1, syslog_facility = -1, syslog_mask = -1;
static int syslog_opened = 0;

/* Package helper routines */
static void syslog_write(int pri, int argc, VALUE *argv)
{
    VALUE str;

    if (argc < 1) {
        rb_raise(rb_eArgError, "no log message supplied");
    }

    if (!syslog_opened) {
        rb_raise(rb_eRuntimeError, "must open syslog before write");
    }

    str = rb_f_sprintf(argc, argv);

    syslog(pri, "%s", RSTRING(str)->ptr);
}

/* Syslog module methods */
static VALUE mSyslog_close(VALUE self)
{
    if (!syslog_opened) {
        rb_raise(rb_eRuntimeError, "syslog not opened");
    }

    closelog();

    free((void *)syslog_ident);
    syslog_ident = NULL;
    syslog_options = syslog_facility = syslog_mask = -1;
    syslog_opened = 0;

    return Qnil;
}

static VALUE mSyslog_open(int argc, VALUE *argv, VALUE self)
{
    VALUE ident, opt, fac;

    if (syslog_opened) {
        rb_raise(rb_eRuntimeError, "syslog already open");
    }

    rb_scan_args(argc, argv, "03", &ident, &opt, &fac);

    if (NIL_P(ident)) {
        ident = rb_gv_get("$0");
    }
#ifdef SafeStringValue
    SafeStringValue(ident);
#else
    Check_SafeStr(ident);
#endif
    syslog_ident = strdup(RSTRING(ident)->ptr);

    if (NIL_P(opt)) {
        syslog_options = LOG_PID | LOG_CONS;
    } else {
        syslog_options = NUM2INT(opt);
    }

    if (NIL_P(fac)) {
        syslog_facility = LOG_USER;
    } else {
        syslog_facility = NUM2INT(fac);
    }

    openlog(syslog_ident, syslog_options, syslog_facility);

    syslog_opened = 1;

    setlogmask(syslog_mask = setlogmask(0));

    /* be like File.new.open {...} */
    if (rb_block_given_p()) {
        rb_ensure(rb_yield, self, mSyslog_close, self);
    }

    return self;
}

static VALUE mSyslog_reopen(int argc, VALUE *argv, VALUE self)
{
    mSyslog_close(self);

    return mSyslog_open(argc, argv, self);
}

static VALUE mSyslog_isopen(VALUE self)
{
    return syslog_opened ? Qtrue : Qfalse;
}

static VALUE mSyslog_ident(VALUE self)
{
    return syslog_opened ? rb_str_new2(syslog_ident) : Qnil;
}

static VALUE mSyslog_options(VALUE self)
{
    return syslog_opened ? INT2NUM(syslog_options) : Qnil;
}

static VALUE mSyslog_facility(VALUE self)
{
    return syslog_opened ? INT2NUM(syslog_facility) : Qnil;
}

static VALUE mSyslog_get_mask(VALUE self)
{
    return syslog_opened ? INT2NUM(syslog_mask) : Qnil;
}

static VALUE mSyslog_set_mask(VALUE self, VALUE mask)
{
    if (!syslog_opened) {
        rb_raise(rb_eRuntimeError, "must open syslog before setting log mask");
    }

    setlogmask(syslog_mask = NUM2INT(mask));

    return mask;
}

static VALUE mSyslog_log(int argc, VALUE *argv, VALUE self)
{
    VALUE pri;

    if (argc < 2) {
        rb_raise(rb_eArgError, "wrong number of arguments (%d for 2+)", argc);
    }

    argc--;
    pri = *argv++;

    if (!FIXNUM_P(pri)) {
      rb_raise(rb_eTypeError, "type mismatch: %s given", rb_class2name(CLASS_OF(pri)));
    }

    syslog_write(FIX2INT(pri), argc, argv);

    return self;
}

static VALUE mSyslog_inspect(VALUE self)
{
    char buf[1024];

    if (syslog_opened) {
        snprintf(buf, sizeof(buf),
          "<#%s: opened=true, ident=\"%s\", options=%d, facility=%d, mask=%d>",
          rb_class2name(self),
          syslog_ident,
          syslog_options,
          syslog_facility,
          syslog_mask);
    } else {
        snprintf(buf, sizeof(buf),
          "<#%s: opened=false>", rb_class2name(self));
    }

    return rb_str_new2(buf);
}

static VALUE mSyslog_instance(VALUE self)
{
    return self;
}

#define define_syslog_shortcut_method(pri, name) \
static VALUE mSyslog_##name(int argc, VALUE *argv, VALUE self) \
{ \
    syslog_write(pri, argc, argv); \
\
    return self; \
}

#ifdef LOG_EMERG
define_syslog_shortcut_method(LOG_EMERG, emerg)
#endif
#ifdef LOG_ALERT
define_syslog_shortcut_method(LOG_ALERT, alert)
#endif
#ifdef LOG_CRIT
define_syslog_shortcut_method(LOG_CRIT, crit)
#endif
#ifdef LOG_ERR
define_syslog_shortcut_method(LOG_ERR, err)
#endif
#ifdef LOG_WARNING
define_syslog_shortcut_method(LOG_WARNING, warning)
#endif
#ifdef LOG_NOTICE
define_syslog_shortcut_method(LOG_NOTICE, notice)
#endif
#ifdef LOG_INFO
define_syslog_shortcut_method(LOG_INFO, info)
#endif
#ifdef LOG_DEBUG
define_syslog_shortcut_method(LOG_DEBUG, debug)
#endif

static VALUE mSyslogConstants_LOG_MASK(VALUE klass, VALUE pri)
{
    return INT2FIX(LOG_MASK(FIX2INT(pri)));
}

static VALUE mSyslogConstants_LOG_UPTO(VALUE klass, VALUE pri)
{
    return INT2FIX(LOG_UPTO(FIX2INT(pri)));
}

/* Init for package syslog */
void Init_syslog()
{
    mSyslog = rb_define_module("Syslog");

    mSyslogConstants = rb_define_module_under(mSyslog, "Constants");

    rb_include_module(mSyslog, mSyslogConstants);

    rb_define_module_function(mSyslog, "open", mSyslog_open, -1);
    rb_define_module_function(mSyslog, "reopen", mSyslog_reopen, -1);
    rb_define_module_function(mSyslog, "open!", mSyslog_reopen, -1);
    rb_define_module_function(mSyslog, "opened?", mSyslog_isopen, 0);

    rb_define_module_function(mSyslog, "ident", mSyslog_ident, 0);
    rb_define_module_function(mSyslog, "options", mSyslog_options, 0);
    rb_define_module_function(mSyslog, "facility", mSyslog_facility, 0);

    rb_define_module_function(mSyslog, "log", mSyslog_log, -1);
    rb_define_module_function(mSyslog, "close", mSyslog_close, 0);
    rb_define_module_function(mSyslog, "mask", mSyslog_get_mask, 0);
    rb_define_module_function(mSyslog, "mask=", mSyslog_set_mask, 1);

    rb_define_module_function(mSyslog, "LOG_MASK", mSyslogConstants_LOG_MASK, 1);
    rb_define_module_function(mSyslog, "LOG_UPTO", mSyslogConstants_LOG_UPTO, 1);

    rb_define_module_function(mSyslog, "inspect", mSyslog_inspect, 0);
    rb_define_module_function(mSyslog, "instance", mSyslog_instance, 0);

    rb_define_module_function(mSyslogConstants, "LOG_MASK", mSyslogConstants_LOG_MASK, 1);
    rb_define_module_function(mSyslogConstants, "LOG_UPTO", mSyslogConstants_LOG_UPTO, 1);

#define rb_define_syslog_const(id) \
    rb_define_const(mSyslogConstants, #id, INT2NUM(id))

    /* Various options when opening log */
#ifdef LOG_PID
    rb_define_syslog_const(LOG_PID);
#endif
#ifdef LOG_CONS
    rb_define_syslog_const(LOG_CONS);
#endif
#ifdef LOG_ODELAY
    rb_define_syslog_const(LOG_ODELAY); /* deprecated */
#endif
#ifdef LOG_NDELAY
    rb_define_syslog_const(LOG_NDELAY);
#endif
#ifdef LOG_NOWAIT
    rb_define_syslog_const(LOG_NOWAIT); /* deprecated */
#endif
#ifdef LOG_PERROR
    rb_define_syslog_const(LOG_PERROR);
#endif

    /* Various syslog facilities */
#ifdef LOG_AUTH
    rb_define_syslog_const(LOG_AUTH);
#endif
#ifdef LOG_AUTHPRIV
    rb_define_syslog_const(LOG_AUTHPRIV);
#endif
#ifdef LOG_CONSOLE
    rb_define_syslog_const(LOG_CONSOLE);
#endif
#ifdef LOG_CRON
    rb_define_syslog_const(LOG_CRON);
#endif
#ifdef LOG_DAEMON
    rb_define_syslog_const(LOG_DAEMON);
#endif
#ifdef LOG_FTP
    rb_define_syslog_const(LOG_FTP);
#endif
#ifdef LOG_KERN
    rb_define_syslog_const(LOG_KERN);
#endif
#ifdef LOG_LPR
    rb_define_syslog_const(LOG_LPR);
#endif
#ifdef LOG_MAIL
    rb_define_syslog_const(LOG_MAIL);
#endif
#ifdef LOG_NEWS
    rb_define_syslog_const(LOG_NEWS);
#endif
#ifdef LOG_NTP
   rb_define_syslog_const(LOG_NTP);
#endif
#ifdef LOG_SECURITY
    rb_define_syslog_const(LOG_SECURITY);
#endif
#ifdef LOG_SYSLOG
    rb_define_syslog_const(LOG_SYSLOG);
#endif
#ifdef LOG_USER
    rb_define_syslog_const(LOG_USER);
#endif
#ifdef LOG_UUCP
    rb_define_syslog_const(LOG_UUCP);
#endif
#ifdef LOG_LOCAL0
    rb_define_syslog_const(LOG_LOCAL0);
#endif
#ifdef LOG_LOCAL1
    rb_define_syslog_const(LOG_LOCAL1);
#endif
#ifdef LOG_LOCAL2
    rb_define_syslog_const(LOG_LOCAL2);
#endif
#ifdef LOG_LOCAL3
    rb_define_syslog_const(LOG_LOCAL3);
#endif
#ifdef LOG_LOCAL4
    rb_define_syslog_const(LOG_LOCAL4);
#endif
#ifdef LOG_LOCAL5
    rb_define_syslog_const(LOG_LOCAL5);
#endif
#ifdef LOG_LOCAL6
    rb_define_syslog_const(LOG_LOCAL6);
#endif
#ifdef LOG_LOCAL7
    rb_define_syslog_const(LOG_LOCAL7);
#endif

#define rb_define_syslog_shortcut(name) \
    rb_define_module_function(mSyslog, #name, mSyslog_##name, -1)

    /* Various syslog priorities and the shortcut methods */
#ifdef LOG_EMERG
    rb_define_syslog_const(LOG_EMERG);
    rb_define_syslog_shortcut(emerg);
#endif
#ifdef LOG_ALERT
    rb_define_syslog_const(LOG_ALERT);
    rb_define_syslog_shortcut(alert);
#endif
#ifdef LOG_CRIT
    rb_define_syslog_const(LOG_CRIT);
    rb_define_syslog_shortcut(crit);
#endif
#ifdef LOG_ERR
    rb_define_syslog_const(LOG_ERR);
    rb_define_syslog_shortcut(err);
#endif
#ifdef LOG_WARNING
    rb_define_syslog_const(LOG_WARNING);
    rb_define_syslog_shortcut(warning);
#endif
#ifdef LOG_NOTICE
    rb_define_syslog_const(LOG_NOTICE);
    rb_define_syslog_shortcut(notice);
#endif
#ifdef LOG_INFO
    rb_define_syslog_const(LOG_INFO);
    rb_define_syslog_shortcut(info);
#endif
#ifdef LOG_DEBUG
    rb_define_syslog_const(LOG_DEBUG);
    rb_define_syslog_shortcut(debug);
#endif
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/tk/stubs.c

root/ext/tk/stubs.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. _macinit
  2. _nativethread_consistency_check
  3. ruby_open_tcl_dll
  4. ruby_open_tk_dll
  5. ruby_open_tcltk_dll
  6. tcl_stubs_init_p
  7. tk_stubs_init_p
  8. ruby_tcl_create_ip_and_stubs_init
  9. ruby_tcl_stubs_init
  10. ruby_tk_stubs_init
  11. ruby_tk_stubs_safeinit
  12. ruby_tcltk_stubs
  13. ruby_open_tcl_dll
  14. ruby_open_tk_dll
  15. ruby_open_tcltk_dll
  16. tcl_stubs_init_p
  17. tk_stubs_init_p
  18. ruby_tcl_create_ip_and_stubs_init
  19. ruby_tcl_stubs_init
  20. ruby_tk_stubs_init
  21. ruby_tk_stubs_safeinit
  22. ruby_tcltk_stubs
#include "stubs.h"
#include "ruby.h"
#include <tcl.h>
#include <tk.h>

/*------------------------------*/

#ifdef __MACOS__
# include <tkMac.h>
# include <Quickdraw.h>

static int call_macinit = 0;

static void
_macinit()
{
    if (!call_macinit) {
        tcl_macQdPtr = &qd; /* setup QuickDraw globals */
        Tcl_MacSetEventProc(TkMacConvertEvent); /* setup event handler */
        call_macinit = 1;
    }
}
#endif

/*------------------------------*/

static int nativethread_checked = 0;

static void
_nativethread_consistency_check(ip)
    Tcl_Interp *ip;
{
    if (nativethread_checked || ip == (Tcl_Interp *)NULL) {
        return;
    }

    /* If the variable "tcl_platform(threaded)" exists,
       then the Tcl interpreter was compiled with threads enabled. */
    if (Tcl_GetVar2(ip, "tcl_platform", "threaded", TCL_GLOBAL_ONLY) != (char*)NULL) {
#ifdef HAVE_NATIVETHREAD
        /* consistent */
#else
        rb_warn("Inconsistency. Loaded Tcl/Tk libraries are enabled nativethread-support. But `tcltklib' is not. The inconsistency causes SEGV or other troubles frequently.");
#endif
    } else {
#ifdef HAVE_NATIVETHREAD
        rb_warning("Inconsistency.`tcltklib' is enabled nativethread-support. But loaded Tcl/Tk libraries are not. (Probably, the inconsistency doesn't cause any troubles.)");
#else
        /* consistent */
#endif
    }

    Tcl_ResetResult(ip);

    nativethread_checked = 1;
}

/*------------------------------*/

#if defined USE_TCL_STUBS && defined USE_TK_STUBS

#if defined _WIN32 || defined __CYGWIN__
# include "util.h"
# include <windows.h>
  typedef HINSTANCE DL_HANDLE;
# define DL_OPEN LoadLibrary
# define DL_SYM GetProcAddress
# define TCL_INDEX 4
# define TK_INDEX 3
# define TCL_NAME "tcl89%s"
# define TK_NAME "tk89%s"
# undef DLEXT
# define DLEXT ".dll"
#elif defined HAVE_DLOPEN
# include <dlfcn.h>
  typedef void *DL_HANDLE;
# define DL_OPEN(file) dlopen(file, RTLD_LAZY|RTLD_GLOBAL)
# define DL_SYM dlsym
# define TCL_INDEX 8
# define TK_INDEX 7
# define TCL_NAME "libtcl8.9%s"
# define TK_NAME "libtk8.9%s"
#endif

static DL_HANDLE tcl_dll = (DL_HANDLE)0;
static DL_HANDLE tk_dll  = (DL_HANDLE)0;

int
ruby_open_tcl_dll(appname)
    char *appname;
{
    void (*p_Tcl_FindExecutable)(const char *);
    int n;
    char *ruby_tcl_dll = 0;
    char tcl_name[20];

    if (tcl_dll) return TCLTK_STUBS_OK;

    ruby_tcl_dll = getenv("RUBY_TCL_DLL");
#if defined _WIN32
    if (ruby_tcl_dll) ruby_tcl_dll = ruby_strdup(ruby_tcl_dll);
#endif
    if (ruby_tcl_dll) {
        tcl_dll = (DL_HANDLE)DL_OPEN(ruby_tcl_dll);
    } else {
        snprintf(tcl_name, sizeof tcl_name, TCL_NAME, DLEXT);
        /* examine from 8.9 to 8.1 */
        for (n = '9'; n > '0'; n--) {
            tcl_name[TCL_INDEX] = n;
            tcl_dll = (DL_HANDLE)DL_OPEN(tcl_name);
            if (tcl_dll)
                break;
        }
    }

#if defined _WIN32
    if (ruby_tcl_dll) ruby_xfree(ruby_tcl_dll);
#endif

    if (!tcl_dll)
        return NO_TCL_DLL;

    p_Tcl_FindExecutable = (void (*)(const char *))DL_SYM(tcl_dll, "Tcl_FindExecutable");
    if (!p_Tcl_FindExecutable)
        return NO_FindExecutable;

    if (appname) {
        p_Tcl_FindExecutable(appname);
    } else {
        p_Tcl_FindExecutable("ruby");
    }

    return TCLTK_STUBS_OK;
}

int
ruby_open_tk_dll()
{
    int n;
    char *ruby_tk_dll = 0;
    char tk_name[20];

    if (!tcl_dll) {
        int ret = ruby_open_tcl_dll(RSTRING(rb_argv0)->ptr);
        if (ret != TCLTK_STUBS_OK) return ret;
    }

    if (tk_dll) return TCLTK_STUBS_OK;

    ruby_tk_dll = getenv("RUBY_TK_DLL");
    if (ruby_tk_dll) {
        tk_dll = (DL_HANDLE)DL_OPEN(ruby_tk_dll);
    } else {
        snprintf(tk_name, sizeof tk_name, TK_NAME, DLEXT);
        /* examine from 8.9 to 8.1 */
        for (n = '9'; n > '0'; n--) {
            tk_name[TK_INDEX] = n;
            tk_dll = (DL_HANDLE)DL_OPEN(tk_name);
            if (tk_dll)
                break;
        }
    }

    if (!tk_dll)
        return NO_TK_DLL;

    return TCLTK_STUBS_OK;
}

int
ruby_open_tcltk_dll(appname)
    char *appname;
{
    return( ruby_open_tcl_dll(appname) || ruby_open_tk_dll() );
}

int
tcl_stubs_init_p()
{
    return(tclStubsPtr != (TclStubs*)NULL);
}

int
tk_stubs_init_p()
{
    return(tkStubsPtr != (TkStubs*)NULL);
}

Tcl_Interp *
ruby_tcl_create_ip_and_stubs_init(st)
    int *st;
{
    Tcl_Interp *tcl_ip;

    if (st) *st = 0;

    if (tcl_stubs_init_p()) {
        tcl_ip = Tcl_CreateInterp();

        if (!tcl_ip) {
            if (st) *st = FAIL_CreateInterp;
            return (Tcl_Interp*)NULL;
        }

        _nativethread_consistency_check(tcl_ip);

        return tcl_ip;

    } else {
        Tcl_Interp *(*p_Tcl_CreateInterp)();
        Tcl_Interp *(*p_Tcl_DeleteInterp)();

        if (!tcl_dll) {
            int ret = ruby_open_tcl_dll(RSTRING(rb_argv0)->ptr);
            if (ret != TCLTK_STUBS_OK) {
                if (st) *st = ret;
                return (Tcl_Interp*)NULL;
            }
        }

        p_Tcl_CreateInterp
            = (Tcl_Interp *(*)())DL_SYM(tcl_dll, "Tcl_CreateInterp");
        if (!p_Tcl_CreateInterp) {
            if (st) *st = NO_CreateInterp;
            return (Tcl_Interp*)NULL;
        }

        p_Tcl_DeleteInterp
            = (Tcl_Interp *(*)())DL_SYM(tcl_dll, "Tcl_DeleteInterp");
        if (!p_Tcl_DeleteInterp) {
            if (st) *st = NO_DeleteInterp;
            return (Tcl_Interp*)NULL;
        }

        tcl_ip = (*p_Tcl_CreateInterp)();
        if (!tcl_ip) {
            if (st) *st = FAIL_CreateInterp;
            return (Tcl_Interp*)NULL;
        }

        if (!Tcl_InitStubs(tcl_ip, "8.1", 0)) {
            if (st) *st = FAIL_Tcl_InitStubs;
            (*p_Tcl_DeleteInterp)(tcl_ip);
            return (Tcl_Interp*)NULL;
        }

        _nativethread_consistency_check(tcl_ip);

        return tcl_ip;
    }
}

int
ruby_tcl_stubs_init()
{
    int st;
    Tcl_Interp *tcl_ip;

    if (!tcl_stubs_init_p()) {
        tcl_ip = ruby_tcl_create_ip_and_stubs_init(&st);

        if (!tcl_ip) return st;

        Tcl_DeleteInterp(tcl_ip);
    }

    return TCLTK_STUBS_OK;
}

int
ruby_tk_stubs_init(tcl_ip)
    Tcl_Interp *tcl_ip;
{
    Tcl_ResetResult(tcl_ip);

    if (tk_stubs_init_p()) {
        if (Tk_Init(tcl_ip) == TCL_ERROR) {
            return FAIL_Tk_Init;
        }
    } else {
        int (*p_Tk_Init)(Tcl_Interp *);

        if (!tk_dll) {
            int ret = ruby_open_tk_dll();
            if (ret != TCLTK_STUBS_OK) return ret;
        }

        p_Tk_Init = (int (*)(Tcl_Interp *))DL_SYM(tk_dll, "Tk_Init");
        if (!p_Tk_Init)
            return NO_Tk_Init;

        if ((*p_Tk_Init)(tcl_ip) == TCL_ERROR)
            return FAIL_Tk_Init;

        if (!Tk_InitStubs(tcl_ip, "8.1", 0))
            return FAIL_Tk_InitStubs;

#ifdef __MACOS__
        _macinit();
#endif
    }

    return TCLTK_STUBS_OK;
}

int
ruby_tk_stubs_safeinit(tcl_ip)
    Tcl_Interp *tcl_ip;
{
    Tcl_ResetResult(tcl_ip);

    if (tk_stubs_init_p()) {
        if (Tk_SafeInit(tcl_ip) == TCL_ERROR)
            return FAIL_Tk_Init;
    } else {
        int (*p_Tk_SafeInit)(Tcl_Interp *);

        if (!tk_dll) {
            int ret = ruby_open_tk_dll();
            if (ret != TCLTK_STUBS_OK) return ret;
        }

        p_Tk_SafeInit = (int (*)(Tcl_Interp *))DL_SYM(tk_dll, "Tk_SafeInit");
        if (!p_Tk_SafeInit)
            return NO_Tk_Init;

        if ((*p_Tk_SafeInit)(tcl_ip) == TCL_ERROR)
            return FAIL_Tk_Init;

        if (!Tk_InitStubs(tcl_ip, "8.1", 0))
            return FAIL_Tk_InitStubs;

#ifdef __MACOS__
        _macinit();
#endif
    }

    return TCLTK_STUBS_OK;
}

int
ruby_tcltk_stubs()
{
    int st;
    Tcl_Interp *tcl_ip;

    st = ruby_open_tcltk_dll(RSTRING(rb_argv0)->ptr);
    switch(st) {
    case NO_FindExecutable:
        return -7;
    case NO_TCL_DLL:
    case NO_TK_DLL:
        return -1;
    }

    tcl_ip = ruby_tcl_create_ip_and_stubs_init(&st);
    if (!tcl_ip) {
        switch(st) {
        case NO_CreateInterp:
        case NO_DeleteInterp:
            return -2;
        case FAIL_CreateInterp:
            return -3;
        case FAIL_Tcl_InitStubs:
            return -5;
        }
    }

    st = ruby_tk_stubs_init(tcl_ip);
    switch(st) {
    case NO_Tk_Init:
        Tcl_DeleteInterp(tcl_ip);
        return -4;
    case FAIL_Tk_Init:
    case FAIL_Tk_InitStubs:
        Tcl_DeleteInterp(tcl_ip);
        return -6;
    }

    Tcl_DeleteInterp(tcl_ip);

    return 0;
}

/*###################################################*/
#else /* ! USE_TCL_STUBS || ! USE_TK_STUBS) */
/*###################################################*/

static int open_tcl_dll = 0;
static int call_tk_stubs_init = 0;

int
ruby_open_tcl_dll(appname)
    char *appname;
{
    if (appname) {
        Tcl_FindExecutable(appname);
    } else {
        Tcl_FindExecutable("ruby");
    }
    open_tcl_dll = 1;

    return TCLTK_STUBS_OK;
}

int ruby_open_tk_dll()
{
    if (!open_tcl_dll) {
        ruby_open_tcl_dll(RSTRING(rb_argv0)->ptr);
    }

    return TCLTK_STUBS_OK;
}

int ruby_open_tcltk_dll(appname)
    char *appname;
{
    return( ruby_open_tcl_dll(appname) || ruby_open_tk_dll() );
}

int
tcl_stubs_init_p()
{
    return 1;
}

int
tk_stubs_init_p()
{
    return call_tk_stubs_init;
}

Tcl_Interp *
ruby_tcl_create_ip_and_stubs_init(st)
    int *st;
{
    Tcl_Interp *tcl_ip;

    if (!open_tcl_dll) {
        ruby_open_tcl_dll(RSTRING(rb_argv0)->ptr);
    }

    if (st) *st = 0;
    tcl_ip = Tcl_CreateInterp();
    if (!tcl_ip) {
        if (st) *st = FAIL_CreateInterp;
        return (Tcl_Interp*)NULL;
    }

    _nativethread_consistency_check(tcl_ip);

    return tcl_ip;
}

int
ruby_tcl_stubs_init()
{
    return TCLTK_STUBS_OK;
}

int
ruby_tk_stubs_init(tcl_ip)
    Tcl_Interp *tcl_ip;
{
    if (Tk_Init(tcl_ip) == TCL_ERROR)
        return FAIL_Tk_Init;

    if (!call_tk_stubs_init) {
#ifdef __MACOS__
        _macinit();
#endif
        call_tk_stubs_init = 1;
    }

    return TCLTK_STUBS_OK;
}

int
ruby_tk_stubs_safeinit(tcl_ip)
    Tcl_Interp *tcl_ip;
{
#if TCL_MAJOR_VERSION >= 8
    if (Tk_SafeInit(tcl_ip) == TCL_ERROR)
        return FAIL_Tk_Init;

    if (!call_tk_stubs_init) {
#ifdef __MACOS__
        _macinit();
#endif
        call_tk_stubs_init = 1;
    }

    return TCLTK_STUBS_OK;

#else /* TCL_MAJOR_VERSION < 8 */

    return FAIL_Tk_Init;
#endif
}

int
ruby_tcltk_stubs()
{
    Tcl_FindExecutable(RSTRING(rb_argv0)->ptr);
    return 0;
}

#endif
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/tk/stubs.h

root/ext/tk/stubs.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

#include <tcl.h>

extern int ruby_open_tcl_dll(char *);
extern int ruby_open_tk_dll();
extern int ruby_open_tcltk_dll(char *);
extern int tcl_stubs_init_p();
extern int tk_stubs_init_p();
extern Tcl_Interp *ruby_tcl_create_ip_and_stubs_init(int*);
extern int ruby_tcl_stubs_init();
extern int ruby_tk_stubs_init(Tcl_Interp*);
extern int ruby_tk_stubs_safeinit(Tcl_Interp*);
extern int ruby_tcltk_stubs();

/* no error */
#define TCLTK_STUBS_OK     (0)

/* return value of ruby_open_tcl_dll() */
#define NO_TCL_DLL         (1)
#define NO_FindExecutable  (2)

/* return value of ruby_open_tk_dll() */
#define NO_TK_DLL         (-1)

/* status value of ruby_tcl_create_ip_and_stubs_init(st) */
#define NO_CreateInterp    (3)
#define NO_DeleteInterp    (4)
#define FAIL_CreateInterp  (5)
#define FAIL_Tcl_InitStubs (6)

/* return value of ruby_tk_stubs_init() */
#define NO_Tk_Init         (7)
#define FAIL_Tk_Init       (8)
#define FAIL_Tk_InitStubs  (9)
/* [<][>][^][v][top][bottom][index] [help] */


ext/tk/tcltklib.c

root/ext/tk/tcltklib.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. tcl_eval
  2. tcl_global_eval
  3. Tcl_GetVar2Ex
  4. Tcl_SetVar2Ex
  5. invoke_queue_mark
  6. eval_queue_mark
  7. call_queue_mark
  8. CallFrame
  9. CallFrame
  10. DummyInterp
  11. Tcl_PopCallFrame
  12. Tcl_PushCallFrame
  13. get_ip
  14. deleted_ip
  15. rbtk_preserve_ip
  16. rbtk_release_ip
  17. create_ip_exc
  18. tcl_stubs_check
  19. tcltkip_init_tk
  20. pending_exception_check0
  21. pending_exception_check1
  22. call_original_exit
  23. _timer_for_tcl
  24. set_eventloop_tick
  25. get_eventloop_tick
  26. ip_set_eventloop_tick
  27. ip_get_eventloop_tick
  28. set_no_event_wait
  29. get_no_event_wait
  30. ip_set_no_event_wait
  31. ip_get_no_event_wait
  32. set_eventloop_weight
  33. get_eventloop_weight
  34. ip_set_eventloop_weight
  35. ip_get_eventloop_weight
  36. set_max_block_time
  37. lib_evloop_thread_p
  38. lib_evloop_abort_on_exc
  39. ip_evloop_abort_on_exc
  40. lib_evloop_abort_on_exc_set
  41. ip_evloop_abort_on_exc_set
  42. lib_num_of_mainwindows
  43. call_DoOneEvent
  44. eventloop_sleep
  45. lib_eventloop_core
  46. lib_eventloop_main_core
  47. lib_eventloop_main
  48. lib_eventloop_ensure
  49. lib_eventloop_launcher
  50. lib_mainloop
  51. ip_mainloop
  52. watchdog_evloop_launcher
  53. lib_watchdog_core
  54. lib_watchdog_ensure
  55. lib_mainloop_watchdog
  56. ip_mainloop_watchdog
  57. _thread_call_proc_arg_mark
  58. _thread_call_proc_core
  59. _thread_call_proc_ensure
  60. _thread_call_proc
  61. _thread_call_proc_value
  62. lib_thread_callback
  63. lib_do_one_event_core
  64. lib_do_one_event
  65. ip_do_one_event
  66. ip_set_exc_message
  67. TkStringValue
  68. tcl_protect_core
  69. tcl_protect
  70. ip_ruby_eval
  71. ip_ruby_cmd_core
  72. ip_ruby_cmd
  73. ip_InterpExitObjCmd
  74. ip_RubyExitObjCmd
  75. ip_rbUpdateObjCmd
  76. rb_threadUpdateProc
  77. ip_rb_threadUpdateObjCmd
  78. VwaitVarProc
  79. ip_rbVwaitObjCmd
  80. WaitVariableProc
  81. WaitVisibilityProc
  82. WaitWindowProc
  83. ip_rbTkWaitObjCmd
  84. rb_threadVwaitProc
  85. rb_threadWaitVisibilityProc
  86. rb_threadWaitWindowProc
  87. ip_rb_threadVwaitObjCmd
  88. ip_rb_threadTkWaitObjCmd
  89. ip_thread_vwait
  90. ip_thread_tkwait
  91. delete_slaves
  92. delete_slaves
  93. ip_finalize
  94. ip_free
  95. ip_alloc
  96. ip_replace_wait_commands
  97. ip_rbNamespaceObjCmd
  98. ip_wrap_namespace_command
  99. ip_CallWhenDeleted
  100. ip_init
  101. ip_create_slave_core
  102. ip_create_slave
  103. ip_is_slave_of_p
  104. ip_create_console_core
  105. ip_create_console
  106. ip_make_safe_core
  107. ip_make_safe
  108. ip_is_safe_p
  109. ip_allow_ruby_exit_p
  110. ip_allow_ruby_exit_set
  111. ip_delete
  112. ip_has_invalid_namespace_p
  113. ip_is_deleted_p
  114. ip_has_mainwindow_p
  115. get_str_from_obj
  116. get_obj_from_str
  117. ip_get_result_string_obj
  118. callq_safelevel_handler
  119. call_queue_handler
  120. tk_funcall
  121. call_tcl_eval
  122. ip_eval_real
  123. evq_safelevel_handler
  124. eval_queue_handler
  125. ip_eval
  126. lib_restart_core
  127. lib_restart
  128. ip_restart
  129. lib_toUTF8_core
  130. lib_toUTF8
  131. ip_toUTF8
  132. lib_fromUTF8_core
  133. lib_fromUTF8
  134. ip_fromUTF8
  135. lib_UTF_backslash_core
  136. lib_UTF_backslash
  137. lib_Tcl_backslash
  138. lib_get_system_encoding
  139. lib_set_system_encoding
  140. invoke_tcl_proc
  141. ip_invoke_core
  142. alloc_invoke_arguments
  143. free_invoke_arguments
  144. ip_invoke_real
  145. ivq_safelevel_handler
  146. invoke_queue_handler
  147. ip_invoke_with_position
  148. ip_retval
  149. ip_invoke
  150. ip_invoke_immediate
  151. ip_get_variable2_core
  152. ip_get_variable2
  153. ip_get_variable
  154. ip_set_variable2_core
  155. ip_set_variable2
  156. ip_set_variable
  157. ip_unset_variable2_core
  158. ip_unset_variable2
  159. ip_unset_variable
  160. ip_get_global_var
  161. ip_get_global_var2
  162. ip_set_global_var
  163. ip_set_global_var2
  164. ip_unset_global_var
  165. ip_unset_global_var2
  166. lib_split_tklist_core
  167. lib_split_tklist
  168. ip_split_tklist
  169. lib_merge_tklist
  170. lib_conv_listelement
  171. tcltklib_compile_info
  172. Init_tcltklib
/*
 *      tcltklib.c
 *              Aug. 27, 1997   Y. Shigehiro
 *              Oct. 24, 1997   Y. Matsumoto
 */

#define TCLTKLIB_RELEASE_DATE "2005-12-07"

#include "ruby.h"
#include "rubysig.h"
#include "version.h"
#undef EXTERN   /* avoid conflict with tcl.h of tcl8.2 or before */
#include <stdio.h>
#ifdef HAVE_STDARG_PROTOTYPES
#include <stdarg.h>
#define va_init_list(a,b) va_start(a,b)
#else
#include <varargs.h>
#define va_init_list(a,b) va_start(a)
#endif
#include <string.h>
#include <tcl.h>
#include <tk.h>

#include "stubs.h"

#ifndef TCL_ALPHA_RELEASE
#define TCL_ALPHA_RELEASE       0
#define TCL_BETA_RELEASE        1
#define TCL_FINAL_RELEASE       2
#endif

#if TCL_MAJOR_VERSION >= 8
# ifndef CONST84
#  if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION <= 4 /* Tcl8.0.x -- 8.4b1 */
#   define CONST84
#  else /* unknown (maybe TCL_VERSION >= 8.5) */
#   ifdef CONST
#    define CONST84 CONST
#   else
#    define CONST84
#   endif
#  endif
# endif
#else  /* TCL_MAJOR_VERSION < 8 */
# ifdef CONST
#  define CONST84 CONST
# else
#  define CONST
#  define CONST84
# endif
#endif

/* copied from eval.c */
#define TAG_RETURN      0x1
#define TAG_BREAK       0x2
#define TAG_NEXT        0x3
#define TAG_RETRY       0x4
#define TAG_REDO        0x5
#define TAG_RAISE       0x6
#define TAG_THROW       0x7
#define TAG_FATAL       0x8

/* for ruby_debug */
#define DUMP1(ARG1) if (ruby_debug) { fprintf(stderr, "tcltklib: %s\n", ARG1); fflush(stderr); }
#define DUMP2(ARG1, ARG2) if (ruby_debug) { fprintf(stderr, "tcltklib: ");\
fprintf(stderr, ARG1, ARG2); fprintf(stderr, "\n"); fflush(stderr); }
#define DUMP3(ARG1, ARG2, ARG3) if (ruby_debug) { fprintf(stderr, "tcltklib: ");\
fprintf(stderr, ARG1, ARG2, ARG3); fprintf(stderr, "\n"); fflush(stderr); }
/*
#define DUMP1(ARG1)
#define DUMP2(ARG1, ARG2)
#define DUMP3(ARG1, ARG2, ARG3)
*/

/* release date */
const char tcltklib_release_date[] = TCLTKLIB_RELEASE_DATE;

/* finalize_proc_name */
static char *finalize_hook_name = "INTERP_FINALIZE_HOOK";

static void ip_finalize _((Tcl_Interp*));

/* for callback break & continue */
static VALUE eTkCallbackReturn;
static VALUE eTkCallbackBreak;
static VALUE eTkCallbackContinue;

static VALUE eLocalJumpError;

static VALUE eTkLocalJumpError;
static VALUE eTkCallbackRetry;
static VALUE eTkCallbackRedo;
static VALUE eTkCallbackThrow;

static VALUE tcltkip_class;

static ID ID_at_enc;
static ID ID_at_interp;

static ID ID_stop_p;
static ID ID_alive_p;
static ID ID_kill;
static ID ID_join;
static ID ID_value;

static ID ID_call;
static ID ID_backtrace;
static ID ID_message;

static ID ID_at_reason;
static ID ID_return;
static ID ID_break;
static ID ID_next;

static ID ID_to_s;
static ID ID_inspect;

static VALUE ip_invoke_real _((int, VALUE*, VALUE));
static VALUE ip_invoke _((int, VALUE*, VALUE));

static VALUE tk_funcall _((VALUE(), int, VALUE*, VALUE));

/* safe Tcl_Eval and Tcl_GlobalEval */
static int
tcl_eval(interp, cmd)
    Tcl_Interp *interp;
    const char *cmd; /* don't have to be writable */
{
    char *buf = strdup(cmd);
    const int ret = Tcl_Eval(interp, buf);
    free(buf);
    return ret;
}

#undef Tcl_Eval
#define Tcl_Eval tcl_eval

static int
tcl_global_eval(interp, cmd)
    Tcl_Interp *interp;
    const char *cmd; /* don't have to be writable */
{
    char *buf = strdup(cmd);
    const int ret = Tcl_GlobalEval(interp, buf);
    free(buf);
    return ret;
}

#undef Tcl_GlobalEval
#define Tcl_GlobalEval tcl_global_eval

/* Tcl_{Incr|Decr}RefCount for tcl7.x or earlier */
#if TCL_MAJOR_VERSION < 8
#define Tcl_IncrRefCount(obj) (1)
#define Tcl_DecrRefCount(obj) (1)
#endif

/* Tcl_GetStringResult for tcl7.x or earlier */
#if TCL_MAJOR_VERSION < 8
#define Tcl_GetStringResult(interp) ((interp)->result)
#endif

/* Tcl_[GS]etVar2Ex for tcl8.0 */
#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0
static Tcl_Obj *
Tcl_GetVar2Ex(interp, name1, name2, flags)
    Tcl_Interp *interp;
    CONST char *name1;
    CONST char *name2;
    int flags;
{
    Tcl_Obj *nameObj1, *nameObj2 = NULL, *retObj;

    nameObj1 = Tcl_NewStringObj((char*)name1, -1);
    Tcl_IncrRefCount(nameObj1);

    if (name2) {
        nameObj2 = Tcl_NewStringObj((char*)name2, -1);
        Tcl_IncrRefCount(nameObj2);
    }

    retObj = Tcl_ObjGetVar2(interp, nameObj1, nameObj2, flags);

    if (name2) {
        Tcl_DecrRefCount(nameObj2);
    }

    Tcl_DecrRefCount(nameObj1);

    return retObj;
}

static Tcl_Obj *
Tcl_SetVar2Ex(interp, name1, name2, newValObj, flags)
    Tcl_Interp *interp;
    CONST char *name1;
    CONST char *name2;
    Tcl_Obj *newValObj;
    int flags;
{
    Tcl_Obj *nameObj1, *nameObj2 = NULL, *retObj;

    nameObj1 = Tcl_NewStringObj((char*)name1, -1);
    Tcl_IncrRefCount(nameObj1);

    if (name2) {
        nameObj2 = Tcl_NewStringObj((char*)name2, -1);
        Tcl_IncrRefCount(nameObj2);
    }

    retObj = Tcl_ObjSetVar2(interp, nameObj1, nameObj2, newValObj, flags);

    if (name2) {
        Tcl_DecrRefCount(nameObj2);
    }

    Tcl_DecrRefCount(nameObj1);

    return retObj;
}
#endif

/* from tkAppInit.c */

#if TCL_MAJOR_VERSION < 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 4)
#  if !defined __MINGW32__ && !defined __BORLANDC__
/*
 * The following variable is a special hack that is needed in order for
 * Sun shared libraries to be used for Tcl.
 */

extern int matherr();
int *tclDummyMathPtr = (int *) matherr;
#  endif
#endif

/*---- module TclTkLib ----*/

struct invoke_queue {
    Tcl_Event ev;
    int argc;
#if TCL_MAJOR_VERSION >= 8
    Tcl_Obj **argv;
#else /* TCL_MAJOR_VERSION < 8 */
    char **argv;
#endif
    VALUE interp;
    int *done;
    int safe_level;
    VALUE result;
    VALUE thread;
};

struct eval_queue {
    Tcl_Event ev;
    char *str;
    int len;
    VALUE interp;
    int *done;
    int safe_level;
    VALUE result;
    VALUE thread;
};

struct call_queue {
    Tcl_Event ev;
    VALUE (*func)();
    int argc;
    VALUE *argv;
    VALUE interp;
    int *done;
    int safe_level;
    VALUE result;
    VALUE thread;
};

void
invoke_queue_mark(struct invoke_queue *q)
{
    rb_gc_mark(q->interp);
    rb_gc_mark(q->result);
    rb_gc_mark(q->thread);
}

void
eval_queue_mark(struct eval_queue *q)
{
    rb_gc_mark(q->interp);
    rb_gc_mark(q->result);
    rb_gc_mark(q->thread);
}

void
call_queue_mark(struct call_queue *q)
{
    int i;

    for(i = 0; i < q->argc; i++) {
        rb_gc_mark(q->argv[i]);
    }

    rb_gc_mark(q->interp);
    rb_gc_mark(q->result);
    rb_gc_mark(q->thread);
}

static VALUE eventloop_thread;
static VALUE eventloop_stack;

static VALUE watchdog_thread;

Tcl_Interp  *current_interp;

/*
 *  'event_loop_max' is a maximum events which the eventloop processes in one
 *  term of thread scheduling. 'no_event_tick' is the count-up value when
 *  there are no event for processing.
 *  'timer_tick' is a limit of one term of thread scheduling.
 *  If 'timer_tick' == 0, then not use the timer for thread scheduling.
 */
#define DEFAULT_EVENT_LOOP_MAX    800/*counts*/
#define DEFAULT_NO_EVENT_TICK      10/*counts*/
#define DEFAULT_NO_EVENT_WAIT      20/*milliseconds ( 1 -- 999 ) */
#define WATCHDOG_INTERVAL          10/*milliseconds ( 1 -- 999 ) */
#define DEFAULT_TIMER_TICK          0/*milliseconds ( 0 -- 999 ) */
#define NO_THREAD_INTERRUPT_TIME  100/*milliseconds ( 1 -- 999 ) */

static int event_loop_max = DEFAULT_EVENT_LOOP_MAX;
static int no_event_tick  = DEFAULT_NO_EVENT_TICK;
static int no_event_wait  = DEFAULT_NO_EVENT_WAIT;
static int timer_tick     = DEFAULT_TIMER_TICK;
static int req_timer_tick = DEFAULT_TIMER_TICK;
static int run_timer_flag = 0;

static int event_loop_wait_event   = 0;
static int event_loop_abort_on_exc = 1;
static int loop_counter = 0;

static int check_rootwidget_flag = 0;

/* call ruby interpreter */
#if TCL_MAJOR_VERSION >= 8
static int ip_ruby_eval _((ClientData, Tcl_Interp *, int, Tcl_Obj *CONST*));
static int ip_ruby_cmd _((ClientData, Tcl_Interp *, int, Tcl_Obj *CONST*));
#else /* TCL_MAJOR_VERSION < 8 */
static int ip_ruby_eval _((ClientData, Tcl_Interp *, int, char **));
static int ip_ruby_cmd _((ClientData, Tcl_Interp *, int, char **));
#endif

struct cmd_body_arg {
    VALUE receiver;
    ID    method;
    VALUE args;
};

/*----------------------------*/
/* use Tcl internal functions */
/*----------------------------*/
#ifndef TCL_NAMESPACE_DEBUG
#define TCL_NAMESPACE_DEBUG 0
#endif

#if TCL_NAMESPACE_DEBUG

#if TCL_MAJOR_VERSION >= 8
EXTERN struct TclIntStubs *tclIntStubsPtr;
#endif

/*-- Tcl_GetCurrentNamespace --*/
#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 5
/* Tcl7.x doesn't have namespace support.                            */
/* Tcl8.5+ has definition of Tcl_GetCurrentNamespace() in tclDecls.h */
#  ifndef Tcl_GetCurrentNamespace
EXTERN Tcl_Namespace *  Tcl_GetCurrentNamespace _((Tcl_Interp *));
#  endif
#  if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
#    ifndef Tcl_GetCurrentNamespace
#      ifndef FunctionNum_of_GetCurrentNamespace
#define FunctionNum_of_GetCurrentNamespace 124
#      endif
struct DummyTclIntStubs_for_GetCurrentNamespace {
    int magic;
    struct TclIntStubHooks *hooks;
    void (*func[FunctionNum_of_GetCurrentNamespace])();
    Tcl_Namespace * (*tcl_GetCurrentNamespace) _((Tcl_Interp *));
};

#define Tcl_GetCurrentNamespace \
   (((struct DummyTclIntStubs_for_GetCurrentNamespace *)tclIntStubsPtr)->tcl_GetCurrentNamespace)
#    endif
#  endif
#endif

/* namespace check */
/* ip_null_namespace(Tcl_Interp *interp) */
#if TCL_MAJOR_VERSION < 8
#define ip_null_namespace(interp) (0)
#else /* support namespace */
#define ip_null_namespace(interp) \
    (Tcl_GetCurrentNamespace(interp) == (Tcl_Namespace *)NULL)
#endif

/* rbtk_invalid_namespace(tcltkip *ptr) */
#if TCL_MAJOR_VERSION < 8
#define rbtk_invalid_namespace(ptr) (0)
#else /* support namespace */
#define rbtk_invalid_namespace(ptr) \
    ((ptr)->default_ns == (Tcl_Namespace*)NULL || Tcl_GetCurrentNamespace((ptr)->ip) != (ptr)->default_ns)
#endif

/*-- Tcl_PopCallFrame & Tcl_PushCallFrame --*/
#if TCL_MAJOR_VERSION >= 8
#  ifndef CallFrame
typedef struct CallFrame {
    Tcl_Namespace *nsPtr;
    int dummy1;
    int dummy2;
    char *dummy3;
    struct CallFrame *callerPtr;
    struct CallFrame *callerVarPtr;
    int level;
    char *dummy7;
    char *dummy8;
    int dummy9;
    char* dummy10;
} CallFrame;
#  endif

#  if !defined(TclGetFrame) && !defined(TclGetFrame_TCL_DECLARED)
EXTERN int  TclGetFrame _((Tcl_Interp *, CONST char *, CallFrame **));
#  endif
#  if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
#    ifndef TclGetFrame
#      ifndef FunctionNum_of_GetFrame
#define FunctionNum_of_GetFrame 32
#      endif
struct DummyTclIntStubs_for_GetFrame {
    int magic;
    struct TclIntStubHooks *hooks;
    void (*func[FunctionNum_of_GetFrame])();
    int (*tclGetFrame) _((Tcl_Interp *, CONST char *, CallFrame **));
};
#define TclGetFrame \
   (((struct DummyTclIntStubs_for_GetFrame *)tclIntStubsPtr)->tclGetFrame)
#    endif
#  endif

#  if !defined(Tcl_PopCallFrame) && !defined(Tcl_PopCallFrame_TCL_DECLARED)
EXTERN void Tcl_PopCallFrame _((Tcl_Interp *));
EXTERN int  Tcl_PushCallFrame _((Tcl_Interp *, Tcl_CallFrame *, Tcl_Namespace *, int));
#  endif
#  if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
#    ifndef Tcl_PopCallFrame
#      ifndef FunctionNum_of_PopCallFrame
#define FunctionNum_of_PopCallFrame 128
#      endif
struct DummyTclIntStubs_for_PopCallFrame {
    int magic;
    struct TclIntStubHooks *hooks;
    void (*func[FunctionNum_of_PopCallFrame])();
    void (*tcl_PopCallFrame) _((Tcl_Interp *));
    int  (*tcl_PushCallFrame) _((Tcl_Interp *, Tcl_CallFrame *, Tcl_Namespace *, int));
};

#define Tcl_PopCallFrame \
   (((struct DummyTclIntStubs_for_PopCallFrame *)tclIntStubsPtr)->tcl_PopCallFrame)
#define Tcl_PushCallFrame \
   (((struct DummyTclIntStubs_for_PopCallFrame *)tclIntStubsPtr)->tcl_PushCallFrame)
#    endif
#  endif

#else /* Tcl7.x */
#  ifndef CallFrame
typedef struct CallFrame {
    Tcl_HashTable varTable;
    int level;
    int argc;
    char **argv;
    struct CallFrame *callerPtr;
    struct CallFrame *callerVarPtr;
} CallFrame;
#  endif
#  ifndef Tcl_CallFrame
#define Tcl_CallFrame CallFrame
#  endif

#  if !defined(TclGetFrame) && !defined(TclGetFrame_TCL_DECLARED)
EXTERN int  TclGetFrame _((Tcl_Interp *, CONST char *, CallFrame **));
#  endif

#  if !defined(Tcl_PopCallFrame) && !defined(Tcl_PopCallFrame_TCL_DECLARED)
typedef struct DummyInterp {
    char *dummy1;
    char *dummy2;
    int  dummy3;
    Tcl_HashTable dummy4;
    Tcl_HashTable dummy5;
    Tcl_HashTable dummy6;
    int numLevels;
    int maxNestingDepth;
    CallFrame *framePtr;
    CallFrame *varFramePtr;
} DummyInterp;

static void
Tcl_PopCallFrame(interp)
    Tcl_Interp *interp;
{
    DummyInterp *iPtr = (DummyInterp*)interp;
    CallFrame *frame = iPtr->varFramePtr;

    /* **** DUMMY **** */
    iPtr->framePtr = frame.callerPtr;
    iPtr->varFramePtr = frame.callerVarPtr;

    return TCL_OK;
}

/* dummy */
#define Tcl_Namespace char

static int
Tcl_PushCallFrame(interp, framePtr, nsPtr, isProcCallFrame)
    Tcl_Interp *interp;
    Tcl_CallFrame *framePtr;
    Tcl_Namespace *nsPtr;
    int isProcCallFrame;
{
    DummyInterp *iPtr = (DummyInterp*)interp;
    CallFrame *frame = (CallFrame *)framePtr;

    /* **** DUMMY **** */
    Tcl_InitHashTable(&frame.varTable, TCL_STRING_KEYS);
    if (iPtr->varFramePtr != NULL) {
        frame.level = iPtr->varFramePtr->level + 1;
    } else {
        frame.level = 1;
    }
    frame.callerPtr = iPtr->framePtr;
    frame.callerVarPtr = iPtr->varFramePtr;
    iPtr->framePtr = &frame;
    iPtr->varFramePtr = &frame;

    return TCL_OK;
}
#  endif

#endif

#endif /* TCL_NAMESPACE_DEBUG */

/*---- class TclTkIp ----*/
struct tcltkip {
    Tcl_Interp *ip;              /* the interpreter */
#if TCL_NAMESPACE_DEBUG
    Tcl_Namespace *default_ns;   /* default namespace */
#endif
    int has_orig_exit;           /* has original 'exit' command ? */
    Tcl_CmdInfo orig_exit_info;  /* command info of original 'exit' command */
    int ref_count;               /* reference count of rbtk_preserve_ip call */
    int allow_ruby_exit;         /* allow exiting ruby by 'exit' function */
    int return_value;            /* return value */
};

static struct tcltkip *
get_ip(self)
    VALUE self;
{
    struct tcltkip *ptr;

    Data_Get_Struct(self, struct tcltkip, ptr);
    if (ptr == 0) {
        /* rb_raise(rb_eTypeError, "uninitialized TclTkIp"); */
        return((struct tcltkip *)NULL);
    }
    if (ptr->ip == (Tcl_Interp*)NULL) {
        /* rb_raise(rb_eRuntimeError, "deleted IP"); */
        return((struct tcltkip *)NULL);
    }
    return ptr;
}

static int
deleted_ip(ptr)
    struct tcltkip *ptr;
{
    if (!ptr || !ptr->ip || Tcl_InterpDeleted(ptr->ip)
#if TCL_NAMESPACE_DEBUG
          || rbtk_invalid_namespace(ptr)
#endif
    ) {
        DUMP1("ip is deleted");
        return Qtrue;
    }
    return Qfalse;
}

/* increment/decrement reference count of tcltkip */
static int
rbtk_preserve_ip(ptr)
    struct tcltkip *ptr;
{
    ptr->ref_count++;
    if (ptr->ip == (Tcl_Interp*)NULL) {
        /* deleted IP */
        ptr->ref_count = 0;
    } else {
        Tcl_Preserve((ClientData)ptr->ip);
    }
    return(ptr->ref_count);
}

static int
rbtk_release_ip(ptr)
    struct tcltkip *ptr;
{
    ptr->ref_count--;
    if (ptr->ref_count < 0) {
        ptr->ref_count = 0;
    } else if (ptr->ip == (Tcl_Interp*)NULL) {
        /* deleted IP */
        ptr->ref_count = 0;
    } else {
        Tcl_Release((ClientData)ptr->ip);
    }
    return(ptr->ref_count);
}

static VALUE
#ifdef HAVE_STDARG_PROTOTYPES
create_ip_exc(VALUE interp, VALUE exc, const char *fmt, ...)
#else
create_ip_exc(interp, exc, fmt, va_alist)
    VALUE interp:
    VALUE exc;
    const char *fmt;
    va_dcl
#endif
{
    va_list args;
    char buf[BUFSIZ];
    VALUE einfo;
    struct tcltkip *ptr = get_ip(interp);

    va_init_list(args,fmt);
    vsnprintf(buf, BUFSIZ, fmt, args);
    buf[BUFSIZ - 1] = '\0';
    va_end(args);
    einfo = rb_exc_new2(exc, buf);
    rb_ivar_set(einfo, ID_at_interp, interp);
    if (ptr) {
        Tcl_ResetResult(ptr->ip);
    }

    return einfo;
}

/* stub status */
static void
tcl_stubs_check()
{
    if (!tcl_stubs_init_p()) {
        int st = ruby_tcl_stubs_init();
        switch(st) {
        case TCLTK_STUBS_OK:
            break;
        case NO_TCL_DLL:
            rb_raise(rb_eLoadError, "tcltklib: fail to open tcl_dll");
        case NO_FindExecutable:
            rb_raise(rb_eLoadError, "tcltklib: can't find Tcl_FindExecutable");
        case NO_CreateInterp:
            rb_raise(rb_eLoadError, "tcltklib: can't find Tcl_CreateInterp()");
        case NO_DeleteInterp:
            rb_raise(rb_eLoadError, "tcltklib: can't find Tcl_DeleteInterp()");
        case FAIL_CreateInterp:
            rb_raise(rb_eRuntimeError, "tcltklib: fail to create a new IP to call Tcl_InitStubs()");
        case FAIL_Tcl_InitStubs:
            rb_raise(rb_eRuntimeError, "tcltklib: fail to Tcl_InitStubs()");
        default:
            rb_raise(rb_eRuntimeError, "tcltklib: unknown error(%d) on ruby_tcl_stubs_init()", st);
        }
    }
}

static VALUE
tcltkip_init_tk(interp)
    VALUE interp;
{
    struct tcltkip *ptr = get_ip(interp);

#if TCL_MAJOR_VERSION >= 8
    int  st;

    if (Tcl_IsSafe(ptr->ip)) {
        DUMP1("Tk_SafeInit");
        st = ruby_tk_stubs_safeinit(ptr->ip);
        switch(st) {
        case TCLTK_STUBS_OK:
            break;
        case NO_Tk_Init:
            return rb_exc_new2(rb_eLoadError,
                               "tcltklib: can't find Tk_SafeInit()");
        case FAIL_Tk_Init:
            return create_ip_exc(interp, rb_eRuntimeError,
                                 "tcltklib: fail to Tk_SafeInit(). %s",
                                 Tcl_GetStringResult(ptr->ip));
        case FAIL_Tk_InitStubs:
            return create_ip_exc(interp, rb_eRuntimeError,
                                 "tcltklib: fail to Tk_InitStubs(). %s",
                                 Tcl_GetStringResult(ptr->ip));
        default:
            return create_ip_exc(interp, rb_eRuntimeError,
                                 "tcltklib: unknown error(%d) on ruby_tk_stubs_safeinit", st);
        }
    } else {
        DUMP1("Tk_Init");
        st = ruby_tk_stubs_init(ptr->ip);
        switch(st) {
        case TCLTK_STUBS_OK:
            break;
        case NO_Tk_Init:
            return rb_exc_new2(rb_eLoadError,
                               "tcltklib: can't find Tk_Init()");
        case FAIL_Tk_Init:
            return create_ip_exc(interp, rb_eRuntimeError,
                                 "tcltklib: fail to Tk_Init(). %s",
                                 Tcl_GetStringResult(ptr->ip));
        case FAIL_Tk_InitStubs:
            return create_ip_exc(interp, rb_eRuntimeError,
                                 "tcltklib: fail to Tk_InitStubs(). %s",
                                 Tcl_GetStringResult(ptr->ip));
        default:
            return create_ip_exc(interp, rb_eRuntimeError,
                                 "tcltklib: unknown error(%d) on ruby_tk_stubs_init", st);
        }
    }

#else /* TCL_MAJOR_VERSION < 8 */
    DUMP1("Tk_Init");
    if (ruby_tk_stubs_init(ptr->ip) != TCLTK_STUBS_OK) {
        return rb_exc_new2(rb_eRuntimeError, ptr->ip->result);
    }
#endif

    return Qnil;
}

/* treat excetiopn on Tcl side */
static VALUE rbtk_pending_exception;
static int rbtk_eventloop_depth = 0;

static int
pending_exception_check0()
{
    volatile VALUE exc = rbtk_pending_exception;

    if (!NIL_P(exc) && rb_obj_is_kind_of(exc, rb_eException)) {
        DUMP1("find a pending exception");
        if (rbtk_eventloop_depth > 0) {
            return 1; /* pending */
        } else {
            rbtk_pending_exception = Qnil;

            if (rb_obj_is_kind_of(exc, eTkCallbackRetry)) {
                DUMP1("pending_exception_check0: call rb_jump_tag(retry)");
                rb_jump_tag(TAG_RETRY);
            } else if (rb_obj_is_kind_of(exc, eTkCallbackRedo)) {
                DUMP1("pending_exception_check0: call rb_jump_tag(redo)");
                rb_jump_tag(TAG_REDO);
            } else if (rb_obj_is_kind_of(exc, eTkCallbackThrow)) {
                DUMP1("pending_exception_check0: call rb_jump_tag(throw)");
                rb_jump_tag(TAG_THROW);
            }

            rb_exc_raise(exc);
        }
    } else {
        return 0;
    }
}

static int
pending_exception_check1(thr_crit_bup, ptr)
    int thr_crit_bup;
    struct tcltkip *ptr;
{
    volatile VALUE exc = rbtk_pending_exception;

    if (!NIL_P(exc) && rb_obj_is_kind_of(exc, rb_eException)) {
        DUMP1("find a pending exception");

        if (rbtk_eventloop_depth > 0) {
            return 1; /* pending */
        } else {
            rbtk_pending_exception = Qnil;

            if (ptr != (struct tcltkip *)NULL) {
                /* Tcl_Release(ptr->ip); */
                rbtk_release_ip(ptr);
            }

            rb_thread_critical = thr_crit_bup;

            if (rb_obj_is_kind_of(exc, eTkCallbackRetry)) {
                DUMP1("pending_exception_check1: call rb_jump_tag(retry)");
                rb_jump_tag(TAG_RETRY);
            } else if (rb_obj_is_kind_of(exc, eTkCallbackRedo)) {
                DUMP1("pending_exception_check1: call rb_jump_tag(redo)");
                rb_jump_tag(TAG_REDO);
            } else if (rb_obj_is_kind_of(exc, eTkCallbackThrow)) {
                DUMP1("pending_exception_check1: call rb_jump_tag(throw)");
                rb_jump_tag(TAG_THROW);
            }
            rb_exc_raise(exc);
        }
    } else {
        return 0;
    }
}

/* call original 'exit' command */
static void
call_original_exit(ptr, state)
    struct tcltkip *ptr;
    int state;
{
    int  thr_crit_bup;
    Tcl_CmdInfo *info;
#if TCL_MAJOR_VERSION >= 8
    Tcl_Obj *state_obj;
#endif

    if (!(ptr->has_orig_exit)) return;

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

    Tcl_ResetResult(ptr->ip);

    info = &(ptr->orig_exit_info);

    /* memory allocation for arguments of this command */
#if TCL_MAJOR_VERSION >= 8
    state_obj = Tcl_NewIntObj(state);
    Tcl_IncrRefCount(state_obj);

    if (info->isNativeObjectProc) {
        Tcl_Obj **argv;
        argv = (Tcl_Obj **)ALLOC_N(Tcl_Obj *, 3);
        argv[0] = Tcl_NewStringObj("exit", 4);
        argv[1] = state_obj;
        argv[2] = (Tcl_Obj *)NULL;

        ptr->return_value
            = (*(info->objProc))(info->objClientData, ptr->ip, 2, argv);

        free(argv);

    } else {
        /* string interface */
        char **argv;
        argv = (char **)ALLOC_N(char *, 3);
        argv[0] = "exit";
        /* argv[1] = Tcl_GetString(state_obj); */
        argv[1] = Tcl_GetStringFromObj(state_obj, (int*)NULL);
        argv[2] = (char *)NULL;

        ptr->return_value = (*(info->proc))(info->clientData, ptr->ip,
                                            2, (CONST84 char **)argv);

        free(argv);
    }

    Tcl_DecrRefCount(state_obj);

#else /* TCL_MAJOR_VERSION < 8 */
    {
        /* string interface */
        char **argv;
        argv = (char **)ALLOC_N(char *, 3);
        argv[0] = "exit";
        argv[1] = RSTRING(rb_fix2str(INT2NUM(state), 10))->ptr;
        argv[2] = (char *)NULL;

        ptr->return_value = (*(info->proc))(info->clientData, ptr->ip,
                                            2, argv);

        free(argv);
    }
#endif

    rb_thread_critical = thr_crit_bup;
}

/* Tk_ThreadTimer */
static Tcl_TimerToken timer_token = (Tcl_TimerToken)NULL;

/* timer callback */
static void _timer_for_tcl _((ClientData));
static void
_timer_for_tcl(clientData)
    ClientData clientData;
{
    int thr_crit_bup;

    /* struct invoke_queue *q, *tmp; */
    /* VALUE thread; */

    DUMP1("call _timer_for_tcl");

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

    Tcl_DeleteTimerHandler(timer_token);

    run_timer_flag = 1;

    if (timer_tick > 0) {
        timer_token = Tcl_CreateTimerHandler(timer_tick, _timer_for_tcl,
                                             (ClientData)0);
    } else {
        timer_token = (Tcl_TimerToken)NULL;
    }

    rb_thread_critical = thr_crit_bup;

    /* rb_thread_schedule(); */
    /* tick_counter += event_loop_max; */
}

static VALUE
set_eventloop_tick(self, tick)
    VALUE self;
    VALUE tick;
{
    int ttick = NUM2INT(tick);
    int thr_crit_bup;

    rb_secure(4);

    if (ttick < 0) {
        rb_raise(rb_eArgError,
                 "timer-tick parameter must be 0 or positive number");
    }

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

    /* delete old timer callback */
    Tcl_DeleteTimerHandler(timer_token);

    timer_tick = req_timer_tick = ttick;
    if (timer_tick > 0) {
        /* start timer callback */
        timer_token = Tcl_CreateTimerHandler(timer_tick, _timer_for_tcl,
                                             (ClientData)0);
    } else {
        timer_token = (Tcl_TimerToken)NULL;
    }

    rb_thread_critical = thr_crit_bup;

    return tick;
}

static VALUE
get_eventloop_tick(self)
    VALUE self;
{
    return INT2NUM(timer_tick);
}

static VALUE
ip_set_eventloop_tick(self, tick)
    VALUE self;
    VALUE tick;
{
    struct tcltkip *ptr = get_ip(self);

    /* ip is deleted? */
    if (deleted_ip(ptr)) {
        return get_eventloop_tick(self);
    }

    if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
        /* slave IP */
        return get_eventloop_tick(self);
    }
    return set_eventloop_tick(self, tick);
}

static VALUE
ip_get_eventloop_tick(self)
    VALUE self;
{
    return get_eventloop_tick(self);
}

static VALUE
set_no_event_wait(self, wait)
    VALUE self;
    VALUE wait;
{
    int t_wait = NUM2INT(wait);

    rb_secure(4);

    if (t_wait <= 0) {
        rb_raise(rb_eArgError,
                 "no_event_wait parameter must be positive number");
    }

    no_event_wait = t_wait;

    return wait;
}

static VALUE
get_no_event_wait(self)
    VALUE self;
{
    return INT2NUM(no_event_wait);
}

static VALUE
ip_set_no_event_wait(self, wait)
    VALUE self;
    VALUE wait;
{
    struct tcltkip *ptr = get_ip(self);

    /* ip is deleted? */
    if (deleted_ip(ptr)) {
        return get_no_event_wait(self);
    }

    if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
        /* slave IP */
        return get_no_event_wait(self);
    }
    return set_no_event_wait(self, wait);
}

static VALUE
ip_get_no_event_wait(self)
    VALUE self;
{
    return get_no_event_wait(self);
}

static VALUE
set_eventloop_weight(self, loop_max, no_event)
    VALUE self;
    VALUE loop_max;
    VALUE no_event;
{
    int lpmax = NUM2INT(loop_max);
    int no_ev = NUM2INT(no_event);

    rb_secure(4);

    if (lpmax <= 0 || no_ev <= 0) {
        rb_raise(rb_eArgError, "weight parameters must be positive numbers");
    }

    event_loop_max = lpmax;
    no_event_tick  = no_ev;

    return rb_ary_new3(2, loop_max, no_event);
}

static VALUE
get_eventloop_weight(self)
    VALUE self;
{
    return rb_ary_new3(2, INT2NUM(event_loop_max), INT2NUM(no_event_tick));
}

static VALUE
ip_set_eventloop_weight(self, loop_max, no_event)
    VALUE self;
    VALUE loop_max;
    VALUE no_event;
{
    struct tcltkip *ptr = get_ip(self);

    /* ip is deleted? */
    if (deleted_ip(ptr)) {
        return get_eventloop_weight(self);
    }

    if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
        /* slave IP */
        return get_eventloop_weight(self);
    }
    return set_eventloop_weight(self, loop_max, no_event);
}

static VALUE
ip_get_eventloop_weight(self)
    VALUE self;
{
    return get_eventloop_weight(self);
}

static VALUE
set_max_block_time(self, time)
    VALUE self;
    VALUE time;
{
    struct Tcl_Time tcl_time;
    VALUE divmod;

    switch(TYPE(time)) {
    case T_FIXNUM:
    case T_BIGNUM:
        /* time is micro-second value */
        divmod = rb_funcall(time, rb_intern("divmod"), 1, LONG2NUM(1000000));
        tcl_time.sec  = NUM2LONG(RARRAY(divmod)->ptr[0]);
        tcl_time.usec = NUM2LONG(RARRAY(divmod)->ptr[1]);
        break;

    case T_FLOAT:
        /* time is second value */
        divmod = rb_funcall(time, rb_intern("divmod"), 1, INT2FIX(1));
        tcl_time.sec  = NUM2LONG(RARRAY(divmod)->ptr[0]);
        tcl_time.usec = (long)(NUM2DBL(RARRAY(divmod)->ptr[1]) * 1000000);

    default:
        rb_raise(rb_eArgError, "invalid value for time: '%s'",
                 RSTRING(rb_funcall(time, ID_inspect, 0, 0))->ptr);
    }

    Tcl_SetMaxBlockTime(&tcl_time);

    return Qnil;
}

static VALUE
lib_evloop_thread_p(self)
    VALUE self;
{
    if (NIL_P(eventloop_thread)) {
        return Qnil;    /* no eventloop */
    } else if (rb_thread_current() == eventloop_thread) {
        return Qtrue;   /* is eventloop */
    } else {
        return Qfalse;  /* not eventloop */
    }
}

static VALUE
lib_evloop_abort_on_exc(self)
    VALUE self;
{
    if (event_loop_abort_on_exc > 0) {
        return Qtrue;
    } else if (event_loop_abort_on_exc == 0) {
        return Qfalse;
    } else {
        return Qnil;
    }
}

static VALUE
ip_evloop_abort_on_exc(self)
    VALUE self;
{
    return lib_evloop_abort_on_exc(self);
}

static VALUE
lib_evloop_abort_on_exc_set(self, val)
    VALUE self, val;
{
    rb_secure(4);
    if (RTEST(val)) {
        event_loop_abort_on_exc =  1;
    } else if (NIL_P(val)) {
        event_loop_abort_on_exc = -1;
    } else {
        event_loop_abort_on_exc =  0;
    }
    return lib_evloop_abort_on_exc(self);
}

static VALUE
ip_evloop_abort_on_exc_set(self, val)
    VALUE self, val;
{
    struct tcltkip *ptr = get_ip(self);

    rb_secure(4);

    /* ip is deleted? */
    if (deleted_ip(ptr)) {
        return lib_evloop_abort_on_exc(self);
    }

    if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
        /* slave IP */
        return lib_evloop_abort_on_exc(self);
    }
    return lib_evloop_abort_on_exc_set(self, val);
}

static VALUE
lib_num_of_mainwindows(self)
    VALUE self;
{
    if (tk_stubs_init_p()) {
        return INT2FIX(Tk_GetNumMainWindows());
    } else {
        return INT2FIX(0);
    }
}

static VALUE
call_DoOneEvent(flag_val)
    VALUE flag_val;
{
    int flag;

    flag = FIX2INT(flag_val);
    if (Tcl_DoOneEvent(flag)) {
        return Qtrue;
    } else {
        return Qfalse;
    }
}

static VALUE
eventloop_sleep(dummy)
    VALUE dummy;
{
    struct timeval t;

    t.tv_sec = (time_t)0;
    t.tv_usec = (time_t)(no_event_wait*1000.0);

#ifdef HAVE_NATIVETHREAD
    if (!is_ruby_native_thread()) {
        rb_bug("cross-thread violation on eventloop_sleep()");
    }
#endif

    rb_thread_wait_for(t);

#ifdef HAVE_NATIVETHREAD
    if (!is_ruby_native_thread()) {
        rb_bug("cross-thread violation on eventloop_sleep()");
    }
#endif

    return Qnil;
}

static int
lib_eventloop_core(check_root, update_flag, check_var, interp)
    int check_root;
    int update_flag;
    int *check_var;
    Tcl_Interp *interp;
{
    volatile VALUE current = eventloop_thread;
    int found_event = 1;
    int event_flag;
    struct timeval t;
    int thr_crit_bup;
    int status;
    int depth = rbtk_eventloop_depth;

    if (update_flag) DUMP1("update loop start!!");

    t.tv_sec = (time_t)0;
    t.tv_usec = (time_t)(no_event_wait*1000.0);

    Tcl_DeleteTimerHandler(timer_token);
    run_timer_flag = 0;
    if (timer_tick > 0) {
        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;
        timer_token = Tcl_CreateTimerHandler(timer_tick, _timer_for_tcl,
                                             (ClientData)0);
        rb_thread_critical = thr_crit_bup;
    } else {
        timer_token = (Tcl_TimerToken)NULL;
    }

    for(;;) {
        if (rb_thread_alone()) {
            DUMP1("no other thread");
            event_loop_wait_event = 0;

            if (update_flag) {
                event_flag = update_flag | TCL_DONT_WAIT; /* for safety */
            } else {
                event_flag = TCL_ALL_EVENTS;
            }

            if (timer_tick == 0 && update_flag == 0) {
                timer_tick = NO_THREAD_INTERRUPT_TIME;
                timer_token = Tcl_CreateTimerHandler(timer_tick,
                                                     _timer_for_tcl,
                                                     (ClientData)0);
            }

            if (check_var != (int *)NULL) {
                if (*check_var || !found_event) {
                    return found_event;
                }
                if (interp != (Tcl_Interp*)NULL
                    && Tcl_InterpDeleted(interp)) {
                    /* IP for check_var is deleted */
                    return 0;
                }
            }

            /* found_event = Tcl_DoOneEvent(event_flag); */
            found_event = RTEST(rb_protect(call_DoOneEvent,
                                           INT2FIX(event_flag), &status));
            if (status) {
                switch (status) {
                case TAG_RAISE:
                    if (NIL_P(ruby_errinfo)) {
                        rbtk_pending_exception
                            = rb_exc_new2(rb_eException, "unknown exception");
                    } else {
                        rbtk_pending_exception = ruby_errinfo;

                        if (!NIL_P(rbtk_pending_exception)) {
                            if (rbtk_eventloop_depth == 0) {
                                VALUE exc = rbtk_pending_exception;
                                rbtk_pending_exception = Qnil;
                                rb_exc_raise(exc);
                            } else {
                                return 0;
                            }
                        }
                    }
                    break;

                case TAG_FATAL:
                    if (NIL_P(ruby_errinfo)) {
                        rb_exc_raise(rb_exc_new2(rb_eFatal, "FATAL"));
                    } else {
                        rb_exc_raise(ruby_errinfo);
                    }
                }
            }

            if (depth != rbtk_eventloop_depth) {
                DUMP2("DoOneEvent(1) abnormal exit!! %d",
                      rbtk_eventloop_depth);
            }

            if (check_var != (int*)NULL && !NIL_P(rbtk_pending_exception)) {
                DUMP1("exception on wait");
                return 0;
            }

            if (pending_exception_check0()) {
                /* pending -> upper level */
                return 0;
            }

            if (update_flag != 0) {
              if (found_event) {
                DUMP1("next update loop");
                continue;
              } else {
                DUMP1("update complete");
                return 0;
              }
            }

            DUMP1("trap check");
            if (rb_trap_pending) {
                run_timer_flag = 0;
                if (rb_prohibit_interrupt || check_var != (int*)NULL) {
                    /* pending or on wait command */
                    return 0;
                } else {
                    rb_trap_exec();
                }
            }

            DUMP1("check Root Widget");
            if (check_root && tk_stubs_init_p() && Tk_GetNumMainWindows() == 0) {
                run_timer_flag = 0;
                if (rb_trap_pending) {
                    if (rb_prohibit_interrupt || check_var != (int*)NULL) {
                        /* pending or on wait command */
                        return 0;
                    } else {
                        rb_trap_exec();
                    }
                }
                return 1;
            }

            if (loop_counter++ > 30000) {
                /* fprintf(stderr, "loop_counter > 30000\n"); */
                loop_counter = 0;
            }

        } else {
            int tick_counter;

            DUMP1("there are other threads");
            event_loop_wait_event = 1;

            found_event = 1;

            if (update_flag) {
                event_flag = update_flag | TCL_DONT_WAIT; /* for safety */
            } else {
                event_flag = TCL_ALL_EVENTS | TCL_DONT_WAIT;
            }

            timer_tick = req_timer_tick;
            tick_counter = 0;
            while(tick_counter < event_loop_max) {
                if (check_var != (int *)NULL) {
                    if (*check_var || !found_event) {
                        return found_event;
                    }
                    if (interp != (Tcl_Interp*)NULL
                        && Tcl_InterpDeleted(interp)) {
                        /* IP for check_var is deleted */
                        return 0;
                    }
                }

                if (NIL_P(eventloop_thread) || current == eventloop_thread) {
                    int st;
                    int status;

                    /* st = Tcl_DoOneEvent(event_flag); */
                    st = RTEST(rb_protect(call_DoOneEvent,
                                          INT2FIX(event_flag), &status));
                    if (status) {
                        switch (status) {
                        case TAG_RAISE:
                            if (NIL_P(ruby_errinfo)) {
                                rbtk_pending_exception
                                    = rb_exc_new2(rb_eException,
                                                  "unknown exception");
                            } else {
                                rbtk_pending_exception = ruby_errinfo;

                                if (!NIL_P(rbtk_pending_exception)) {
                                    if (rbtk_eventloop_depth == 0) {
                                        VALUE exc = rbtk_pending_exception;
                                        rbtk_pending_exception = Qnil;
                                        rb_exc_raise(exc);
                                    } else {
                                        return 0;
                                    }
                                }
                            }
                            break;

                        case TAG_FATAL:
                            if (NIL_P(ruby_errinfo)) {
                                rb_exc_raise(rb_exc_new2(rb_eFatal, "FATAL"));
                            } else {
                                rb_exc_raise(ruby_errinfo);
                            }
                        }
                    }

                    if (depth != rbtk_eventloop_depth) {
                        DUMP2("DoOneEvent(2) abnormal exit!! %d",
                              rbtk_eventloop_depth);
                        return 0;
                    }

                    DUMP1("trap check");
                    if (rb_trap_pending) {
                        run_timer_flag = 0;
                        if (rb_prohibit_interrupt || check_var != (int*)NULL) {
                            /* pending or on wait command */
                            return 0;
                        } else {
                            rb_trap_exec();
                        }
                    }

                    if (check_var != (int*)NULL
                        && !NIL_P(rbtk_pending_exception)) {
                        DUMP1("exception on wait");
                        return 0;
                    }

                    if (pending_exception_check0()) {
                        /* pending -> upper level */
                        return 0;
                    }

                    if (st) {
                        tick_counter++;
                    } else {
                        if (update_flag != 0) {
                            DUMP1("update complete");
                            return 0;
                        }

                        tick_counter += no_event_tick;

                        /* rb_thread_wait_for(t); */
                        rb_protect(eventloop_sleep, Qnil, &status);

                        if (status) {
                            switch (status) {
                            case TAG_RAISE:
                                if (NIL_P(ruby_errinfo)) {
                                    rbtk_pending_exception
                                        = rb_exc_new2(rb_eException,
                                                      "unknown exception");
                                } else {
                                    rbtk_pending_exception = ruby_errinfo;

                                    if (!NIL_P(rbtk_pending_exception)) {
                                        if (rbtk_eventloop_depth == 0) {
                                            VALUE exc = rbtk_pending_exception;
                                            rbtk_pending_exception = Qnil;
                                            rb_exc_raise(exc);
                                        } else {
                                            return 0;
                                        }
                                    }
                                }
                                break;

                            case TAG_FATAL:
                                if (NIL_P(ruby_errinfo)) {
                                    rb_exc_raise(rb_exc_new2(rb_eFatal,
                                                             "FATAL"));
                                } else {
                                    rb_exc_raise(ruby_errinfo);
                                }
                            }
                        }
                    }

                } else {
                    DUMP2("sleep eventloop %lx", current);
                    DUMP2("eventloop thread is %lx", eventloop_thread);
                    rb_thread_stop();
                }

                if (!NIL_P(watchdog_thread) && eventloop_thread != current) {
                    return 1;
                }

                DUMP1("trap check");
                if (rb_trap_pending) {
                    run_timer_flag = 0;
                    if (rb_prohibit_interrupt || check_var != (int*)NULL) {
                        /* pending or on wait command */
                        return 0;
                    } else {
                        rb_trap_exec();
                    }
                }

                DUMP1("check Root Widget");
                if (check_root && tk_stubs_init_p() && Tk_GetNumMainWindows() == 0) {
                    run_timer_flag = 0;
                    if (rb_trap_pending) {
                        if (rb_prohibit_interrupt || check_var != (int*)NULL) {
                            /* pending or on wait command */
                            return 0;
                        } else {
                            rb_trap_exec();
                        }
                    }
                    return 1;
                }

                if (loop_counter++ > 30000) {
                    /* fprintf(stderr, "loop_counter > 30000\n"); */
                    loop_counter = 0;
                }

                if (run_timer_flag) {
                    /*
                    DUMP1("timer interrupt");
                    run_timer_flag = 0;
                    */
                    break; /* switch to other thread */
                }
            }
        }

        DUMP1("trap check & thread scheduling");
        if (update_flag == 0) CHECK_INTS;

    }
    return 1;
}

struct evloop_params {
    int check_root;
    int update_flag;
    int *check_var;
    Tcl_Interp *interp;
    int thr_crit_bup;
};

VALUE
lib_eventloop_main_core(args)
    VALUE args;
{
    struct evloop_params *params = (struct evloop_params *)args;

    check_rootwidget_flag = params->check_root;

    if (lib_eventloop_core(params->check_root,
                           params->update_flag,
                           params->check_var,
                           params->interp)) {
        return Qtrue;
    } else {
        return Qfalse;
    }
}

VALUE
lib_eventloop_main(args)
    VALUE args;
{
    return lib_eventloop_main_core(args);

#if 0
    volatile VALUE ret;
    int status = 0;

    ret = rb_protect(lib_eventloop_main_core, args, &status);

    switch (status) {
    case TAG_RAISE:
        if (NIL_P(ruby_errinfo)) {
            rbtk_pending_exception
                = rb_exc_new2(rb_eException, "unknown exception");
        } else {
            rbtk_pending_exception = ruby_errinfo;
        }
        return Qnil;

    case TAG_FATAL:
        if (NIL_P(ruby_errinfo)) {
            rbtk_pending_exception = rb_exc_new2(rb_eFatal, "FATAL");
        } else {
            rbtk_pending_exception = ruby_errinfo;
        }
        return Qnil;
    }

    return ret;
#endif
}

VALUE
lib_eventloop_ensure(args)
    VALUE args;
{
    struct evloop_params *ptr = (struct evloop_params *)args;
    volatile VALUE current_evloop = rb_thread_current();

    DUMP2("eventloop_ensure: current-thread : %lx", current_evloop);
    DUMP2("eventloop_ensure: eventloop-thread : %lx", eventloop_thread);
    if (eventloop_thread != current_evloop) {
        DUMP2("finish eventloop %lx (NOT current eventloop)", current_evloop);

        rb_thread_critical = ptr->thr_crit_bup;

        return Qnil;
    }

    while((eventloop_thread = rb_ary_pop(eventloop_stack))) {
        DUMP2("eventloop-ensure: new eventloop-thread -> %lx",
              eventloop_thread);

        if (eventloop_thread == current_evloop) {
            rbtk_eventloop_depth--;
            DUMP2("eventloop %lx : back from recursive call", current_evloop);
            break;
        }

        if (NIL_P(eventloop_thread)) {
          Tcl_DeleteTimerHandler(timer_token);
          timer_token = (Tcl_TimerToken)NULL;

          break;
        }

        if (RTEST(rb_funcall(eventloop_thread, ID_alive_p, 0, 0))) {
            DUMP2("eventloop-enshure: wake up parent %lx", eventloop_thread);
            rb_thread_wakeup(eventloop_thread);

            break;
        }
    }

    free(ptr);

    rb_thread_critical = ptr->thr_crit_bup;

    DUMP2("finish current eventloop %lx", current_evloop);
    return Qnil;
}

static VALUE
lib_eventloop_launcher(check_root, update_flag, check_var, interp)
    int check_root;
    int update_flag;
    int *check_var;
    Tcl_Interp *interp;
{
    volatile VALUE parent_evloop = eventloop_thread;
    struct evloop_params *args = ALLOC(struct evloop_params);

    tcl_stubs_check();

    eventloop_thread = rb_thread_current();

    if (parent_evloop == eventloop_thread) {
        DUMP2("eventloop: recursive call on %lx", parent_evloop);
        rbtk_eventloop_depth++;
    }

    if (!NIL_P(parent_evloop) && parent_evloop != eventloop_thread) {
        DUMP2("wait for stop of parent_evloop %lx", parent_evloop);
        while(!RTEST(rb_funcall(parent_evloop, ID_stop_p, 0))) {
            DUMP2("parent_evloop %lx doesn't stop", parent_evloop);
            rb_thread_run(parent_evloop);
        }
        DUMP1("succeed to stop parent");
    }

    rb_ary_push(eventloop_stack, parent_evloop);

    DUMP3("tcltklib: eventloop-thread : %lx -> %lx\n",
                parent_evloop, eventloop_thread);

    args->check_root   = check_root;
    args->update_flag  = update_flag;
    args->check_var    = check_var;
    args->interp       = interp;
    args->thr_crit_bup = rb_thread_critical;

    rb_thread_critical = Qfalse;

#if 0
    return rb_ensure(lib_eventloop_main, (VALUE)args,
                     lib_eventloop_ensure, (VALUE)args);
#endif
    return rb_ensure(lib_eventloop_main_core, (VALUE)args,
                     lib_eventloop_ensure, (VALUE)args);
}

/* execute Tk_MainLoop */
static VALUE
lib_mainloop(argc, argv, self)
    int   argc;
    VALUE *argv;
    VALUE self;
{
    VALUE check_rootwidget;

    if (rb_scan_args(argc, argv, "01", &check_rootwidget) == 0) {
        check_rootwidget = Qtrue;
    } else if (RTEST(check_rootwidget)) {
        check_rootwidget = Qtrue;
    } else {
        check_rootwidget = Qfalse;
    }

    return lib_eventloop_launcher(RTEST(check_rootwidget), 0,
                                  (int*)NULL, (Tcl_Interp*)NULL);
}

static VALUE
ip_mainloop(argc, argv, self)
    int   argc;
    VALUE *argv;
    VALUE self;
{
    struct tcltkip *ptr = get_ip(self);

    /* ip is deleted? */
    if (deleted_ip(ptr)) {
        return Qnil;
    }

    if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
        /* slave IP */
        return Qnil;
    }
    return lib_mainloop(argc, argv, self);
}

static VALUE
watchdog_evloop_launcher(check_rootwidget)
    VALUE check_rootwidget;
{
    return lib_eventloop_launcher(RTEST(check_rootwidget), 0,
                                  (int*)NULL, (Tcl_Interp*)NULL);
}

#define EVLOOP_WAKEUP_CHANCE 3

static VALUE
lib_watchdog_core(check_rootwidget)
    VALUE check_rootwidget;
{
    VALUE evloop;
    int   prev_val = -1;
    int   chance = 0;
    int   check = RTEST(check_rootwidget);
    struct timeval t0, t1;

    t0.tv_sec  = (time_t)0;
    t0.tv_usec = (time_t)((NO_THREAD_INTERRUPT_TIME)*1000.0);
    t1.tv_sec  = (time_t)0;
    t1.tv_usec = (time_t)((WATCHDOG_INTERVAL)*1000.0);

    /* check other watchdog thread */
    if (!NIL_P(watchdog_thread)) {
        if (RTEST(rb_funcall(watchdog_thread, ID_stop_p, 0))) {
            rb_funcall(watchdog_thread, ID_kill, 0);
        } else {
            return Qnil;
        }
    }
    watchdog_thread = rb_thread_current();

    /* watchdog start */
    do {
        if (NIL_P(eventloop_thread)
            || (loop_counter == prev_val && chance >= EVLOOP_WAKEUP_CHANCE)) {
            /* start new eventloop thread */
            DUMP2("eventloop thread %lx is sleeping or dead",
                  eventloop_thread);
            evloop = rb_thread_create(watchdog_evloop_launcher,
                                      (void*)&check_rootwidget);
            DUMP2("create new eventloop thread %lx", evloop);
            loop_counter = -1;
            chance = 0;
            rb_thread_run(evloop);
        } else {
            prev_val = loop_counter;
            if (RTEST(rb_funcall(eventloop_thread, ID_stop_p, 0))) {
                ++chance;
            } else {
                chance = 0;
            }
            if (event_loop_wait_event) {
                rb_thread_wait_for(t0);
            } else {
                rb_thread_wait_for(t1);
            }
            /* rb_thread_schedule(); */
        }
    } while(!check || !tk_stubs_init_p() || Tk_GetNumMainWindows() != 0);

    return Qnil;
}

VALUE
lib_watchdog_ensure(arg)
    VALUE arg;
{
    eventloop_thread = Qnil; /* stop eventloops */
    return Qnil;
}

static VALUE
lib_mainloop_watchdog(argc, argv, self)
    int   argc;
    VALUE *argv;
    VALUE self;
{
    VALUE check_rootwidget;

    if (rb_scan_args(argc, argv, "01", &check_rootwidget) == 0) {
        check_rootwidget = Qtrue;
    } else if (RTEST(check_rootwidget)) {
        check_rootwidget = Qtrue;
    } else {
        check_rootwidget = Qfalse;
    }

    return rb_ensure(lib_watchdog_core, check_rootwidget,
                     lib_watchdog_ensure, Qnil);
}

static VALUE
ip_mainloop_watchdog(argc, argv, self)
    int   argc;
    VALUE *argv;
    VALUE self;
{
    struct tcltkip *ptr = get_ip(self);

    /* ip is deleted? */
    if (deleted_ip(ptr)) {
        return Qnil;
    }

    if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
        /* slave IP */
        return Qnil;
    }
    return lib_mainloop_watchdog(argc, argv, self);
}

/* thread-safe(?) interaction between Ruby and Tk */
struct thread_call_proc_arg {
    VALUE proc;
    int *done;
};

void
_thread_call_proc_arg_mark(struct thread_call_proc_arg *q)
{
    rb_gc_mark(q->proc);
}

static VALUE
_thread_call_proc_core(arg)
    VALUE arg;
{
    struct thread_call_proc_arg *q = (struct thread_call_proc_arg*)arg;
    return rb_funcall(q->proc, ID_call, 0);
}

static VALUE
_thread_call_proc_ensure(arg)
    VALUE arg;
{
    struct thread_call_proc_arg *q = (struct thread_call_proc_arg*)arg;
    *(q->done) = 1;
    return Qnil;
}

static VALUE
_thread_call_proc(arg)
    VALUE arg;
{
    struct thread_call_proc_arg *q = (struct thread_call_proc_arg*)arg;

    return rb_ensure(_thread_call_proc_core, (VALUE)q,
                     _thread_call_proc_ensure, (VALUE)q);
}

static VALUE
_thread_call_proc_value(th)
    VALUE th;
{
    return rb_funcall(th, ID_value, 0);
}

static VALUE
lib_thread_callback(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    struct thread_call_proc_arg *q;
    VALUE proc, th, ret;
    int status, foundEvent;

    if (rb_scan_args(argc, argv, "01", &proc) == 0) {
        proc = rb_block_proc();
    }

    q = (struct thread_call_proc_arg *)ALLOC(struct thread_call_proc_arg);
    q->proc = proc;
    q->done = (int*)ALLOC(int);
    *(q->done) = 0;

    /* create call-proc thread */
    th = rb_thread_create(_thread_call_proc, (void*)q);

    rb_thread_schedule();

    /* start sub-eventloop */
    foundEvent = RTEST(lib_eventloop_launcher(/* not check root-widget */0, 0,
                                              q->done, (Tcl_Interp*)NULL));

    if (RTEST(rb_funcall(th, ID_alive_p, 0))) {
        rb_funcall(th, ID_kill, 0);
        ret = Qnil;
    } else {
        ret = rb_protect(_thread_call_proc_value, th, &status);
    }

    free(q->done);
    free(q);

    if (NIL_P(rbtk_pending_exception)) {
        /* return ruby_errinfo; */
        if (status) {
            rb_exc_raise(ruby_errinfo);
        }
    } else {
        VALUE exc = rbtk_pending_exception;
        rbtk_pending_exception = Qnil;
        /* return exc; */
        rb_exc_raise(exc);
    }

    return ret;
}

/* do_one_event */
static VALUE
lib_do_one_event_core(argc, argv, self, is_ip)
    int   argc;
    VALUE *argv;
    VALUE self;
    int   is_ip;
{
    volatile VALUE vflags;
    int flags;
    int found_event;

    if (!NIL_P(eventloop_thread)) {
        rb_raise(rb_eRuntimeError, "eventloop is already running");
    }

    tcl_stubs_check();

    if (rb_scan_args(argc, argv, "01", &vflags) == 0) {
        flags = TCL_ALL_EVENTS | TCL_DONT_WAIT;
    } else {
        Check_Type(vflags, T_FIXNUM);
        flags = FIX2INT(vflags);
    }

    if (rb_safe_level() >= 4 || (rb_safe_level() >=1 && OBJ_TAINTED(vflags))) {
      flags |= TCL_DONT_WAIT;
    }

    if (is_ip) {
        /* check IP */
        struct tcltkip *ptr = get_ip(self);

        /* ip is deleted? */
        if (deleted_ip(ptr)) {
            return Qfalse;
        }

        if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
            /* slave IP */
            flags |= TCL_DONT_WAIT;
        }
    }

    /* found_event = Tcl_DoOneEvent(TCL_ALL_EVENTS | TCL_DONT_WAIT); */
    found_event = Tcl_DoOneEvent(flags);

    if (pending_exception_check0()) {
        return Qfalse;
    }

    if (found_event) {
        return Qtrue;
    } else {
        return Qfalse;
    }
}

static VALUE
lib_do_one_event(argc, argv, self)
    int   argc;
    VALUE *argv;
    VALUE self;
{
    return lib_do_one_event_core(argc, argv, self, 0);
}

static VALUE
ip_do_one_event(argc, argv, self)
    int   argc;
    VALUE *argv;
    VALUE self;
{
    return lib_do_one_event_core(argc, argv, self, 0);
}

static void
ip_set_exc_message(interp, exc)
    Tcl_Interp *interp;
    VALUE exc;
{
    char *buf;
    Tcl_DString dstr;
    volatile VALUE msg;
    int thr_crit_bup;

#if TCL_MAJOR_VERSION > 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION > 0)
    volatile VALUE enc;
    Tcl_Encoding encoding;
#endif

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

    msg = rb_funcall(exc, ID_message, 0, 0);

#if TCL_MAJOR_VERSION > 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION > 0)
    enc = rb_attr_get(exc, ID_at_enc);
    if (NIL_P(enc)) {
        enc = rb_attr_get(msg, ID_at_enc);
    }
    if (NIL_P(enc)) {
        encoding = (Tcl_Encoding)NULL;
    } else if (TYPE(enc) == T_STRING) {
        encoding = Tcl_GetEncoding(interp, RSTRING(enc)->ptr);
    } else {
        enc = rb_funcall(enc, ID_to_s, 0, 0);
        encoding = Tcl_GetEncoding(interp, RSTRING(enc)->ptr);
    }

    /* to avoid a garbled error message dialog */
    buf = ALLOC_N(char, (RSTRING(msg)->len)+1);
    memcpy(buf, RSTRING(msg)->ptr, RSTRING(msg)->len);
    buf[RSTRING(msg)->len] = 0;

    Tcl_DStringInit(&dstr);
    Tcl_DStringFree(&dstr);
    Tcl_ExternalToUtfDString(encoding, buf, RSTRING(msg)->len, &dstr);

    Tcl_AppendResult(interp, Tcl_DStringValue(&dstr), (char*)NULL);
    DUMP2("error message:%s", Tcl_DStringValue(&dstr));
    Tcl_DStringFree(&dstr);
    free(buf);

#else /* TCL_VERSION <= 8.0 */
    Tcl_AppendResult(interp, RSTRING(msg)->ptr, (char*)NULL);
#endif

    rb_thread_critical = thr_crit_bup;
}

static VALUE
TkStringValue(obj)
    VALUE obj;
{
    switch(TYPE(obj)) {
    case T_STRING:
        return obj;

    case T_NIL:
        return rb_str_new2("");

    case T_TRUE:
        return rb_str_new2("1");

    case T_FALSE:
        return rb_str_new2("0");

    case T_ARRAY:
        return rb_funcall(obj, ID_join, 1, rb_str_new2(" "));

    default:
        if (rb_respond_to(obj, ID_to_s)) {
            return rb_funcall(obj, ID_to_s, 0, 0);
        }
    }

    return rb_funcall(obj, ID_inspect, 0, 0);
}

static int
tcl_protect_core(interp, proc, data) /* should not raise exception */
    Tcl_Interp *interp;
    VALUE (*proc)();
    VALUE data;
{
    volatile VALUE ret, exc = Qnil;
    int status = 0;
    int thr_crit_bup = rb_thread_critical;

    rb_thread_critical = Qfalse;
    ret = rb_protect(proc, data, &status);
    rb_thread_critical = Qtrue;
    if (status) {
        char *buf;
        VALUE old_gc, type, str;

        old_gc = rb_gc_disable();

        switch(status) {
        case TAG_RETURN:
            type = eTkCallbackReturn;
            goto error;
        case TAG_BREAK:
            type = eTkCallbackBreak;
            goto error;
        case TAG_NEXT:
            type = eTkCallbackContinue;
            goto error;
        error:
            str = rb_str_new2("LocalJumpError: ");
            rb_str_append(str, rb_obj_as_string(ruby_errinfo));
            exc = rb_exc_new3(type, str);
            break;

        case TAG_RETRY:
            if (NIL_P(ruby_errinfo)) {
                DUMP1("rb_protect: retry");
                exc = rb_exc_new2(eTkCallbackRetry, "retry jump error");
            } else {
                exc = ruby_errinfo;
            }
            break;

        case TAG_REDO:
            if (NIL_P(ruby_errinfo)) {
                DUMP1("rb_protect: redo");
                exc = rb_exc_new2(eTkCallbackRedo,  "redo jump error");
            } else {
                exc = ruby_errinfo;
            }
            break;

        case TAG_RAISE:
            if (NIL_P(ruby_errinfo)) {
                exc = rb_exc_new2(rb_eException, "unknown exception");
            } else {
                exc = ruby_errinfo;
            }
            break;

        case TAG_FATAL:
            if (NIL_P(ruby_errinfo)) {
                exc = rb_exc_new2(rb_eFatal, "FATAL");
            } else {
                exc = ruby_errinfo;
            }
            break;

        case TAG_THROW:
            if (NIL_P(ruby_errinfo)) {
                DUMP1("rb_protect: throw");
                exc = rb_exc_new2(eTkCallbackThrow,  "throw jump error");
            } else {
                exc = ruby_errinfo;
            }
            break;

        default:
            buf = ALLOC_N(char, 256);
            sprintf(buf, "unknown loncaljmp status %d", status);
            exc = rb_exc_new2(rb_eException, buf);
            free(buf);
            break;
        }

        if (old_gc == Qfalse) rb_gc_enable();

        ret = Qnil;
    }

    rb_thread_critical = thr_crit_bup;

    Tcl_ResetResult(interp);

    /* status check */
    if (!NIL_P(exc)) {
        volatile VALUE eclass = rb_obj_class(exc);
        volatile VALUE backtrace;

        DUMP1("(failed)");

        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;

        DUMP1("set backtrace");
        if (!NIL_P(backtrace = rb_funcall(exc, ID_backtrace, 0, 0))) {
            backtrace = rb_ary_join(backtrace, rb_str_new2("\n"));
            Tcl_AddErrorInfo(interp, StringValuePtr(backtrace));
        }

        rb_thread_critical = thr_crit_bup;

        ip_set_exc_message(interp, exc);

        if (eclass == eTkCallbackReturn)
            return TCL_RETURN;

        if (eclass == eTkCallbackBreak)
            return TCL_BREAK;

        if (eclass == eTkCallbackContinue)
            return TCL_CONTINUE;

        if (eclass == rb_eSystemExit || eclass == rb_eInterrupt) {
            rbtk_pending_exception = exc;
            return TCL_RETURN;
        }

        if (rb_obj_is_kind_of(exc, eTkLocalJumpError)) {
            rbtk_pending_exception = exc;
            return TCL_ERROR;
        }

        if (rb_obj_is_kind_of(exc, eLocalJumpError)) {
            VALUE reason = rb_ivar_get(exc, ID_at_reason);

            if (TYPE(reason) == T_SYMBOL) {
                if (SYM2ID(reason) == ID_return)
                    return TCL_RETURN;

                if (SYM2ID(reason) == ID_break)
                    return TCL_BREAK;

                if (SYM2ID(reason) == ID_next)
                    return TCL_CONTINUE;
            }
        }

        return TCL_ERROR;
    }

    /* result must be string or nil */
    if (!NIL_P(ret)) {
        /* copy result to the tcl interpreter */
        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;

        ret = TkStringValue(ret);
        DUMP1("Tcl_AppendResult");
        Tcl_AppendResult(interp, RSTRING(ret)->ptr, (char *)NULL);

        rb_thread_critical = thr_crit_bup;
    }

    DUMP2("(result) %s", NIL_P(ret) ? "nil" : RSTRING(ret)->ptr);

    return TCL_OK;
}

static int
tcl_protect(interp, proc, data)
    Tcl_Interp *interp;
    VALUE (*proc)();
    VALUE data;
{
    int old_trapflag = rb_trap_immediate;
    int code;

#ifdef HAVE_NATIVETHREAD
    if (!is_ruby_native_thread()) {
        rb_bug("cross-thread violation on tcl_protect()");
    }
#endif

    rb_trap_immediate = 0;
    code = tcl_protect_core(interp, proc, data);
    rb_trap_immediate = old_trapflag;

    return code;
}

static int
#if TCL_MAJOR_VERSION >= 8
ip_ruby_eval(clientData, interp, argc, argv)
    ClientData clientData;
    Tcl_Interp *interp;
    int argc;
    Tcl_Obj *CONST argv[];
#else /* TCL_MAJOR_VERSION < 8 */
ip_ruby_eval(clientData, interp, argc, argv)
    ClientData clientData;
    Tcl_Interp *interp;
    int argc;
    char *argv[];
#endif
{
    char *arg;
    int thr_crit_bup;
    int code;

    if (interp == (Tcl_Interp*)NULL) {
        rbtk_pending_exception = rb_exc_new2(rb_eRuntimeError,
                                             "IP is deleted");
        return TCL_ERROR;
    }

    /* ruby command has 1 arg. */
    if (argc != 2) {
#if 0
        rb_raise(rb_eArgError,
                 "wrong number of arguments (%d for 1)", argc - 1);
#else
        char buf[sizeof(int)*8 + 1];
        Tcl_ResetResult(interp);
        sprintf(buf, "%d", argc-1);
        Tcl_AppendResult(interp, "wrong number of arguments (",
                         buf, " for 1)", (char *)NULL);
        rbtk_pending_exception = rb_exc_new2(rb_eArgError,
                                             Tcl_GetStringResult(interp));
        return TCL_ERROR;
#endif
    }

    /* get C string from Tcl object */
#if TCL_MAJOR_VERSION >= 8
    {
      char *str;
      int  len;

      thr_crit_bup = rb_thread_critical;
      rb_thread_critical = Qtrue;

      str = Tcl_GetStringFromObj(argv[1], &len);
      arg = ALLOC_N(char, len + 1);
      memcpy(arg, str, len);
      arg[len] = 0;

      rb_thread_critical = thr_crit_bup;

    }
#else /* TCL_MAJOR_VERSION < 8 */
    arg = argv[1];
#endif

    /* evaluate the argument string by ruby */
    DUMP2("rb_eval_string(%s)", arg);

    code = tcl_protect(interp, rb_eval_string, (VALUE)arg);

#if TCL_MAJOR_VERSION >= 8
    free(arg);
#endif

    return code;
}

/* Tcl command `ruby_cmd' */
static VALUE
ip_ruby_cmd_core(arg)
    struct cmd_body_arg *arg;
{
    volatile VALUE ret;
    int thr_crit_bup;

    DUMP1("call ip_ruby_cmd_core");
    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qfalse;
    ret = rb_apply(arg->receiver, arg->method, arg->args);
    rb_thread_critical = thr_crit_bup;
    DUMP1("finish ip_ruby_cmd_core");

    return ret;
}

/* ruby_cmd receiver method arg ... */
static int
#if TCL_MAJOR_VERSION >= 8
ip_ruby_cmd(clientData, interp, argc, argv)
    ClientData clientData;
    Tcl_Interp *interp;
    int argc;
    Tcl_Obj *CONST argv[];
#else /* TCL_MAJOR_VERSION < 8 */
ip_ruby_cmd(clientData, interp, argc, argv)
    ClientData clientData;
    Tcl_Interp *interp;
    int argc;
    char *argv[];
#endif
{
    volatile VALUE receiver;
    volatile ID method;
    volatile VALUE args;
    char *str;
    int i;
    int  len;
    struct cmd_body_arg *arg;
    int thr_crit_bup;
    VALUE old_gc;
    int code;

    if (interp == (Tcl_Interp*)NULL) {
        rbtk_pending_exception = rb_exc_new2(rb_eRuntimeError,
                                             "IP is deleted");
        return TCL_ERROR;
    }

    if (argc < 3) {
#if 0
        rb_raise(rb_eArgError, "too few arguments");
#else
        Tcl_ResetResult(interp);
        Tcl_AppendResult(interp, "too few arguments", (char *)NULL);
        rbtk_pending_exception = rb_exc_new2(rb_eArgError,
                                             Tcl_GetStringResult(interp));
        return TCL_ERROR;
#endif
    }

    /* allocate */
    arg = ALLOC(struct cmd_body_arg);

    /* get arguments from Tcl objects */
    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;
    old_gc = rb_gc_disable();

    /* get receiver */
#if TCL_MAJOR_VERSION >= 8
    str = Tcl_GetStringFromObj(argv[1], &len);
#else /* TCL_MAJOR_VERSION < 8 */
    str = argv[1];
#endif
    DUMP2("receiver:%s",str);
    if (str[0] == ':' || ('A' <= str[0] && str[0] <= 'Z')) {
        /* class | module | constant */
        receiver = rb_const_get(rb_cObject, rb_intern(str));
    } else if (str[0] == '$') {
        /* global variable */
        receiver = rb_gv_get(str);
    } else {
        /* global variable omitted '$' */
        char *buf;

        len = strlen(str);
        buf = ALLOC_N(char, len + 2);
        buf[0] = '$';
        memcpy(buf + 1, str, len);
        buf[len + 1] = 0;
        receiver = rb_gv_get(buf);
        free(buf);
    }
    if (NIL_P(receiver)) {
#if 0
        rb_raise(rb_eArgError,
                 "unknown class/module/global-variable '%s'", str);
#else
        Tcl_ResetResult(interp);
        Tcl_AppendResult(interp, "unknown class/module/global-variable '",
                         str, "'", (char *)NULL);
        rbtk_pending_exception = rb_exc_new2(rb_eArgError,
                                             Tcl_GetStringResult(interp));
        return TCL_ERROR;
#endif
    }

    /* get metrhod */
#if TCL_MAJOR_VERSION >= 8
    str = Tcl_GetStringFromObj(argv[2], &len);
#else /* TCL_MAJOR_VERSION < 8 */
    str = argv[2];
#endif
    method = rb_intern(str);

    /* get args */
    args = rb_ary_new2(argc - 2);
    RARRAY(args)->len = 0;
    for(i = 3; i < argc; i++) {
#if TCL_MAJOR_VERSION >= 8
        str = Tcl_GetStringFromObj(argv[i], &len);
        DUMP2("arg:%s",str);
        RARRAY(args)->ptr[RARRAY(args)->len++] = rb_tainted_str_new(str, len);
#else /* TCL_MAJOR_VERSION < 8 */
        DUMP2("arg:%s",argv[i]);
        RARRAY(args)->ptr[RARRAY(args)->len++] = rb_tainted_str_new2(argv[i]);
#endif
    }

    if (old_gc == Qfalse) rb_gc_enable();
    rb_thread_critical = thr_crit_bup;

    arg->receiver = receiver;
    arg->method = method;
    arg->args = args;

    /* evaluate the argument string by ruby */
    code = tcl_protect(interp, ip_ruby_cmd_core, (VALUE)arg);

    free(arg);

    return code;
}

/*****************************/
/* relpace of 'exit' command */
/*****************************/
static int
#if TCL_MAJOR_VERSION >= 8
ip_InterpExitObjCmd(clientData, interp, argc, argv)
    ClientData clientData;
    Tcl_Interp *interp;
    int argc;
    Tcl_Obj *CONST argv[];
#else /* TCL_MAJOR_VERSION < 8 */
ip_InterpExitCommand(clientData, interp, argc, argv)
    ClientData clientData;
    Tcl_Interp *interp;
    int argc;
    char *argv[];
#endif
{
    DUMP1("start ip_InterpExitCommand");
    if (interp != (Tcl_Interp*)NULL
        && !Tcl_InterpDeleted(interp)
#if TCL_NAMESPACE_DEBUG
        && !ip_null_namespace(interp)
#endif
        ) {
        Tcl_ResetResult(interp);
        /* Tcl_Preserve(interp); */
        /* Tcl_Eval(interp, "interp eval {} {destroy .}; interp delete {}"); */
        ip_finalize(interp);
        Tcl_DeleteInterp(interp);
        Tcl_Release(interp);
    }
    return TCL_OK;
}

static int
#if TCL_MAJOR_VERSION >= 8
ip_RubyExitObjCmd(clientData, interp, argc, argv)
    ClientData clientData;
    Tcl_Interp *interp;
    int argc;
    Tcl_Obj *CONST argv[];
#else /* TCL_MAJOR_VERSION < 8 */
ip_RubyExitCommand(clientData, interp, argc, argv)
    ClientData clientData;
    Tcl_Interp *interp;
    int argc;
    char *argv[];
#endif
{
    int state;
    char *cmd, *param;
#if TCL_MAJOR_VERSION < 8
    char *endptr;
    cmd = argv[0];
#endif

    DUMP1("start ip_RubyExitCommand");

#if TCL_MAJOR_VERSION >= 8
    /* cmd = Tcl_GetString(argv[0]); */
    cmd = Tcl_GetStringFromObj(argv[0], (int*)NULL);
#endif

    if (argc < 1 || argc > 2) {
        /* arguemnt error */
        Tcl_AppendResult(interp,
                         "wrong number of arguments: should be \"",
                         cmd, " ?returnCode?\"", (char *)NULL);
        return TCL_ERROR;
    }

    if (interp == (Tcl_Interp*)NULL) return TCL_OK;

    Tcl_ResetResult(interp);

    if (rb_safe_level() >= 4 || Tcl_IsSafe(interp)) {
        ip_finalize(interp);
        Tcl_DeleteInterp(interp);
        Tcl_Release(interp);
        return TCL_OK;
    }

    switch(argc) {
    case 1:
        /* rb_exit(0); */ /* not return if succeed */
        Tcl_AppendResult(interp,
                         "fail to call \"", cmd, "\"", (char *)NULL);

        rbtk_pending_exception = rb_exc_new2(rb_eSystemExit,
                                             Tcl_GetStringResult(interp));
        rb_iv_set(rbtk_pending_exception, "status", INT2FIX(0));

        return TCL_RETURN;

    case 2:
#if TCL_MAJOR_VERSION >= 8
        if (Tcl_GetIntFromObj(interp, argv[1], &state) == TCL_ERROR) {
            return TCL_ERROR;
        }
        /* param = Tcl_GetString(argv[1]); */
        param = Tcl_GetStringFromObj(argv[1], (int*)NULL);
#else /* TCL_MAJOR_VERSION < 8 */
        state = (int)strtol(argv[1], &endptr, 0);
        if (*endptr) {
            Tcl_AppendResult(interp,
                             "expected integer but got \"",
                             argv[1], "\"", (char *)NULL);
            return TCL_ERROR;
        }
        param = argv[1];
#endif
        /* rb_exit(state); */ /* not return if succeed */

        Tcl_AppendResult(interp, "fail to call \"", cmd, " ",
                         param, "\"", (char *)NULL);

        rbtk_pending_exception = rb_exc_new2(rb_eSystemExit,
                                             Tcl_GetStringResult(interp));
        rb_iv_set(rbtk_pending_exception, "status", INT2FIX(state));

        return TCL_RETURN;

    default:
        /* arguemnt error */
        Tcl_AppendResult(interp,
                         "wrong number of arguments: should be \"",
                         cmd, " ?returnCode?\"", (char *)NULL);
        return TCL_ERROR;
    }
}

/**************************/
/*  based on tclEvent.c   */
/**************************/

/*********************/
/* replace of update */
/*********************/
#if TCL_MAJOR_VERSION >= 8
static int ip_rbUpdateObjCmd _((ClientData, Tcl_Interp *, int,
                               Tcl_Obj *CONST []));
static int
ip_rbUpdateObjCmd(clientData, interp, objc, objv)
    ClientData clientData;
    Tcl_Interp *interp;
    int objc;
    Tcl_Obj *CONST objv[];
#else /* TCL_MAJOR_VERSION < 8 */
static int ip_rbUpdateCommand _((ClientData, Tcl_Interp *, int, char *[]));
static int
ip_rbUpdateCommand(clientData, interp, objc, objv)
    ClientData clientData;
    Tcl_Interp *interp;
    int objc;
    char *objv[];
#endif
{
    int  optionIndex;
    int  ret;
    int  flags = 0;
    static CONST char *updateOptions[] = {"idletasks", (char *) NULL};
    enum updateOptions {REGEXP_IDLETASKS};

    DUMP1("Ruby's 'update' is called");
    if (interp == (Tcl_Interp*)NULL) {
        rbtk_pending_exception = rb_exc_new2(rb_eRuntimeError,
                                             "IP is deleted");
        return TCL_ERROR;
    }
#ifdef HAVE_NATIVETHREAD
    if (!is_ruby_native_thread()) {
        rb_bug("cross-thread violation on ip_ruby_eval()");
    }
#endif

    if (objc == 1) {
        flags = TCL_DONT_WAIT;

    } else if (objc == 2) {
#if TCL_MAJOR_VERSION >= 8
        if (Tcl_GetIndexFromObj(interp, objv[1], (CONST84 char **)updateOptions,
                "option", 0, &optionIndex) != TCL_OK) {
            return TCL_ERROR;
        }
        switch ((enum updateOptions) optionIndex) {
            case REGEXP_IDLETASKS: {
                flags = TCL_IDLE_EVENTS;
                break;
            }
            default: {
                rb_bug("ip_rbUpdateObjCmd: bad option index to UpdateOptions");
            }
        }
#else
        if (strncmp(objv[1], "idletasks", strlen(objv[1])) != 0) {
            Tcl_AppendResult(interp, "bad option \"", objv[1],
                    "\": must be idletasks", (char *) NULL);
            return TCL_ERROR;
        }
        flags = TCL_IDLE_EVENTS;
#endif
    } else {
#ifdef Tcl_WrongNumArgs
        Tcl_WrongNumArgs(interp, 1, objv, "[ idletasks ]");
#else
# if TCL_MAJOR_VERSION >= 8
        int  dummy;
        Tcl_AppendResult(interp, "wrong number of arguments: should be \"",
                         Tcl_GetStringFromObj(objv[0], &dummy),
                         " [ idletasks ]\"",
                         (char *) NULL);
# else /* TCL_MAJOR_VERSION < 8 */
        Tcl_AppendResult(interp, "wrong number of arguments: should be \"",
                         objv[0], " [ idletasks ]\"", (char *) NULL);
# endif
#endif
        return TCL_ERROR;
    }

    Tcl_Preserve(interp);

    /* call eventloop */
    /* ret = lib_eventloop_core(0, flags, (int *)NULL);*/ /* ignore result */
    ret = RTEST(lib_eventloop_launcher(0, flags, (int *)NULL, interp)); /* ignore result */

    /* exception check */
    if (!NIL_P(rbtk_pending_exception)) {
        Tcl_Release(interp);

        /*
        if (rb_obj_is_kind_of(rbtk_pending_exception, rb_eSystemExit)) {
        */
        if (rb_obj_is_kind_of(rbtk_pending_exception, rb_eSystemExit)
            || rb_obj_is_kind_of(rbtk_pending_exception, rb_eInterrupt)) {
            return TCL_RETURN;
        } else{
            return TCL_ERROR;
        }
    }

    /* trap check */
    if (rb_trap_pending) {
        Tcl_Release(interp);

        return TCL_RETURN;
    }

    /*
     * Must clear the interpreter's result because event handlers could
     * have executed commands.
     */

    DUMP2("last result '%s'", Tcl_GetStringResult(interp));
    Tcl_ResetResult(interp);
    Tcl_Release(interp);

    DUMP1("finish Ruby's 'update'");
    return TCL_OK;
}

/**********************/
/* update with thread */
/**********************/
struct th_update_param {
    VALUE thread;
    int   done;
};

static void rb_threadUpdateProc _((ClientData));
static void
rb_threadUpdateProc(clientData)
    ClientData clientData;      /* Pointer to integer to set to 1. */
{
    struct th_update_param *param = (struct th_update_param *) clientData;

    DUMP1("threadUpdateProc is called");
    param->done = 1;
    rb_thread_wakeup(param->thread);

    return;
}

#if TCL_MAJOR_VERSION >= 8
static int ip_rb_threadUpdateObjCmd _((ClientData, Tcl_Interp *, int,
                                       Tcl_Obj *CONST []));
static int
ip_rb_threadUpdateObjCmd(clientData, interp, objc, objv)
    ClientData clientData;
    Tcl_Interp *interp;
    int objc;
    Tcl_Obj *CONST objv[];
#else /* TCL_MAJOR_VERSION < 8 */
static int ip_rb_threadUpdateCommand _((ClientData, Tcl_Interp *, int,
                                       char *[]));
static int
ip_rb_threadUpdateCommand(clientData, interp, objc, objv)
    ClientData clientData;
    Tcl_Interp *interp;
    int objc;
    char *objv[];
#endif
{
    int  optionIndex;
    int  flags = 0;
    struct th_update_param *param;
    static CONST char *updateOptions[] = {"idletasks", (char *) NULL};
    enum updateOptions {REGEXP_IDLETASKS};
    volatile VALUE current_thread = rb_thread_current();

    DUMP1("Ruby's 'thread_update' is called");
    if (interp == (Tcl_Interp*)NULL) {
        rbtk_pending_exception = rb_exc_new2(rb_eRuntimeError,
                                             "IP is deleted");
        return TCL_ERROR;
    }
#ifdef HAVE_NATIVETHREAD
    if (!is_ruby_native_thread()) {
        rb_bug("cross-thread violation on ip_ruby_eval()");
    }
#endif

    if (rb_thread_alone()
        || NIL_P(eventloop_thread) || eventloop_thread == current_thread) {
#if TCL_MAJOR_VERSION >= 8
        DUMP1("call ip_rbUpdateObjCmd");
        return ip_rbUpdateObjCmd(clientData, interp, objc, objv);
#else /* TCL_MAJOR_VERSION < 8 */
        DUMP1("call ip_rbUpdateCommand");
        return ip_rbUpdateCommand(clientData, interp, objc, objv);
#endif
    }

    DUMP1("start Ruby's 'thread_update' body");

    if (objc == 1) {
        flags = TCL_DONT_WAIT;

    } else if (objc == 2) {
#if TCL_MAJOR_VERSION >= 8
        if (Tcl_GetIndexFromObj(interp, objv[1], (CONST84 char **)updateOptions,
                "option", 0, &optionIndex) != TCL_OK) {
            return TCL_ERROR;
        }
        switch ((enum updateOptions) optionIndex) {
            case REGEXP_IDLETASKS: {
                flags = TCL_IDLE_EVENTS;
                break;
            }
            default: {
                rb_bug("ip_rb_threadUpdateObjCmd: bad option index to UpdateOptions");
            }
        }
#else
        if (strncmp(objv[1], "idletasks", strlen(objv[1])) != 0) {
            Tcl_AppendResult(interp, "bad option \"", objv[1],
                    "\": must be idletasks", (char *) NULL);
            return TCL_ERROR;
        }
        flags = TCL_IDLE_EVENTS;
#endif
    } else {
#ifdef Tcl_WrongNumArgs
        Tcl_WrongNumArgs(interp, 1, objv, "[ idletasks ]");
#else
# if TCL_MAJOR_VERSION >= 8
        int  dummy;
        Tcl_AppendResult(interp, "wrong number of arguments: should be \"",
                         Tcl_GetStringFromObj(objv[0], &dummy),
                         " [ idletasks ]\"",
                         (char *) NULL);
# else /* TCL_MAJOR_VERSION < 8 */
        Tcl_AppendResult(interp, "wrong number of arguments: should be \"",
                         objv[0], " [ idletasks ]\"", (char *) NULL);
# endif
#endif
        return TCL_ERROR;
    }

    DUMP1("pass argument check");

    param = (struct th_update_param *)Tcl_Alloc(sizeof(struct th_update_param));
    Tcl_Preserve(param);
    param->thread = current_thread;
    param->done = 0;

    DUMP1("set idle proc");
    Tcl_DoWhenIdle(rb_threadUpdateProc, (ClientData) param);

    while(!param->done) {
        DUMP1("wait for complete idle proc");
        rb_thread_stop();
    }

    Tcl_Release(param);
    Tcl_Free((char *)param);

    DUMP1("finish Ruby's 'thread_update'");
    return TCL_OK;
}

/***************************/
/* replace of vwait/tkwait */
/***************************/
#if TCL_MAJOR_VERSION >= 8
static int ip_rbVwaitObjCmd _((ClientData, Tcl_Interp *, int,
                               Tcl_Obj *CONST []));
static int ip_rb_threadVwaitObjCmd _((ClientData, Tcl_Interp *, int,
                                      Tcl_Obj *CONST []));
static int ip_rbTkWaitObjCmd _((ClientData, Tcl_Interp *, int,
                                Tcl_Obj *CONST []));
static int ip_rb_threadTkWaitObjCmd _((ClientData, Tcl_Interp *, int,
                                       Tcl_Obj *CONST []));
#else
static int ip_rbVwaitCommand _((ClientData, Tcl_Interp *, int, char *[]));
static int ip_rb_threadVwaitCommand _((ClientData, Tcl_Interp *, int,
                                       char *[]));
static int ip_rbTkWaitCommand _((ClientData, Tcl_Interp *, int, char *[]));
static int ip_rb_threadTkWaitCommand _((ClientData, Tcl_Interp *, int,
                                        char *[]));
#endif

#if TCL_MAJOR_VERSION >= 8
static char *VwaitVarProc _((ClientData, Tcl_Interp *,
                             CONST84 char *,CONST84 char *, int));
static char *
VwaitVarProc(clientData, interp, name1, name2, flags)
    ClientData clientData;      /* Pointer to integer to set to 1. */
    Tcl_Interp *interp;         /* Interpreter containing variable. */
    CONST84 char *name1;        /* Name of variable. */
    CONST84 char *name2;        /* Second part of variable name. */
    int flags;                  /* Information about what happened. */
#else /* TCL_MAJOR_VERSION < 8 */
static char *VwaitVarProc _((ClientData, Tcl_Interp *, char *, char *, int));
static char *
VwaitVarProc(clientData, interp, name1, name2, flags)
    ClientData clientData;      /* Pointer to integer to set to 1. */
    Tcl_Interp *interp;         /* Interpreter containing variable. */
    char *name1;                /* Name of variable. */
    char *name2;                /* Second part of variable name. */
    int flags;                  /* Information about what happened. */
#endif
{
    int *donePtr = (int *) clientData;

    *donePtr = 1;
    return (char *) NULL;
}

#if TCL_MAJOR_VERSION >= 8
static int
ip_rbVwaitObjCmd(clientData, interp, objc, objv)
    ClientData clientData;
    Tcl_Interp *interp;
    int objc;
    Tcl_Obj *CONST objv[];
#else /* TCL_MAJOR_VERSION < 8 */
static int
ip_rbVwaitCommand(clientData, interp, objc, objv)
    ClientData clientData;
    Tcl_Interp *interp;
    int objc;
    char *objv[];
#endif
{
    int  ret, done, foundEvent;
    char *nameString;
    int  dummy;
    int thr_crit_bup;

    DUMP1("Ruby's 'vwait' is called");
    if (interp == (Tcl_Interp*)NULL) {
        rbtk_pending_exception = rb_exc_new2(rb_eRuntimeError,
                                             "IP is deleted");
        return TCL_ERROR;
    }

#if 0
    if (!rb_thread_alone()
        && eventloop_thread != Qnil
        && eventloop_thread != rb_thread_current()) {
#if TCL_MAJOR_VERSION >= 8
        DUMP1("call ip_rb_threadVwaitObjCmd");
        return ip_rb_threadVwaitObjCmd(clientData, interp, objc, objv);
#else /* TCL_MAJOR_VERSION < 8 */
        DUMP1("call ip_rb_threadVwaitCommand");
        return ip_rb_threadVwaitCommand(clientData, interp, objc, objv);
#endif
    }
#endif

    Tcl_Preserve(interp);
#ifdef HAVE_NATIVETHREAD
    if (!is_ruby_native_thread()) {
        rb_bug("cross-thread violation on ip_ruby_eval()");
    }
#endif

    if (objc != 2) {
#ifdef Tcl_WrongNumArgs
        Tcl_WrongNumArgs(interp, 1, objv, "name");
#else
        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;

#if TCL_MAJOR_VERSION >= 8
        /* nameString = Tcl_GetString(objv[0]); */
        nameString = Tcl_GetStringFromObj(objv[0], &dummy);
#else /* TCL_MAJOR_VERSION < 8 */
        nameString = objv[0];
#endif
        Tcl_AppendResult(interp, "wrong number of arguments: should be \"",
                         nameString, " name\"", (char *) NULL);

        rb_thread_critical = thr_crit_bup;
#endif

        Tcl_Release(interp);
        return TCL_ERROR;
    }

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

#if TCL_MAJOR_VERSION >= 8
    Tcl_IncrRefCount(objv[1]);
    /* nameString = Tcl_GetString(objv[1]); */
    nameString = Tcl_GetStringFromObj(objv[1], &dummy);
#else /* TCL_MAJOR_VERSION < 8 */
    nameString = objv[1];
#endif

    /*
    if (Tcl_TraceVar(interp, nameString,
                     TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
                     VwaitVarProc, (ClientData) &done) != TCL_OK) {
        return TCL_ERROR;
    }
    */
    ret = Tcl_TraceVar(interp, nameString,
                       TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
                       VwaitVarProc, (ClientData) &done);

    rb_thread_critical = thr_crit_bup;

    if (ret != TCL_OK) {
#if TCL_MAJOR_VERSION >= 8
        Tcl_DecrRefCount(objv[1]);
#endif
        Tcl_Release(interp);
        return TCL_ERROR;
    }

    done = 0;

    foundEvent = RTEST(lib_eventloop_launcher(/* not check root-widget */0,
                                              0, &done, interp));

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

    Tcl_UntraceVar(interp, nameString,
                   TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
                   VwaitVarProc, (ClientData) &done);

    rb_thread_critical = thr_crit_bup;

    /* exception check */
    if (!NIL_P(rbtk_pending_exception)) {
#if TCL_MAJOR_VERSION >= 8
        Tcl_DecrRefCount(objv[1]);
#endif
        Tcl_Release(interp);

/*
        if (rb_obj_is_kind_of(rbtk_pending_exception, rb_eSystemExit)) {
*/
        if (rb_obj_is_kind_of(rbtk_pending_exception, rb_eSystemExit)
            || rb_obj_is_kind_of(rbtk_pending_exception, rb_eInterrupt)) {
            return TCL_RETURN;
        } else{
            return TCL_ERROR;
        }
    }

    /* trap check */
    if (rb_trap_pending) {
#if TCL_MAJOR_VERSION >= 8
        Tcl_DecrRefCount(objv[1]);
#endif
        Tcl_Release(interp);

        return TCL_RETURN;
    }

    /*
     * Clear out the interpreter's result, since it may have been set
     * by event handlers.
     */

    Tcl_ResetResult(interp);
    if (!foundEvent) {
        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;

        Tcl_AppendResult(interp, "can't wait for variable \"", nameString,
                         "\":  would wait forever", (char *) NULL);

        rb_thread_critical = thr_crit_bup;

#if TCL_MAJOR_VERSION >= 8
        Tcl_DecrRefCount(objv[1]);
#endif
        Tcl_Release(interp);
        return TCL_ERROR;
    }

#if TCL_MAJOR_VERSION >= 8
    Tcl_DecrRefCount(objv[1]);
#endif
    Tcl_Release(interp);
    return TCL_OK;
}

/**************************/
/*  based on tkCmd.c      */
/**************************/
#if TCL_MAJOR_VERSION >= 8
static char *WaitVariableProc _((ClientData, Tcl_Interp *,
                                 CONST84 char *,CONST84 char *, int));
static char *
WaitVariableProc(clientData, interp, name1, name2, flags)
    ClientData clientData;      /* Pointer to integer to set to 1. */
    Tcl_Interp *interp;         /* Interpreter containing variable. */
    CONST84 char *name1;        /* Name of variable. */
    CONST84 char *name2;        /* Second part of variable name. */
    int flags;                  /* Information about what happened. */
#else /* TCL_MAJOR_VERSION < 8 */
static char *WaitVariableProc _((ClientData, Tcl_Interp *,
                                 char *, char *, int));
static char *
WaitVariableProc(clientData, interp, name1, name2, flags)
    ClientData clientData;      /* Pointer to integer to set to 1. */
    Tcl_Interp *interp;         /* Interpreter containing variable. */
    char *name1;                /* Name of variable. */
    char *name2;                /* Second part of variable name. */
    int flags;                  /* Information about what happened. */
#endif
{
    int *donePtr = (int *) clientData;

    *donePtr = 1;
    return (char *) NULL;
}

static void WaitVisibilityProc _((ClientData, XEvent *));
static void
WaitVisibilityProc(clientData, eventPtr)
    ClientData clientData;      /* Pointer to integer to set to 1. */
    XEvent *eventPtr;           /* Information about event (not used). */
{
    int *donePtr = (int *) clientData;

    if (eventPtr->type == VisibilityNotify) {
        *donePtr = 1;
    }
    if (eventPtr->type == DestroyNotify) {
        *donePtr = 2;
    }
}

static void WaitWindowProc _((ClientData, XEvent *));
static void
WaitWindowProc(clientData, eventPtr)
    ClientData clientData;      /* Pointer to integer to set to 1. */
    XEvent *eventPtr;           /* Information about event. */
{
    int *donePtr = (int *) clientData;

    if (eventPtr->type == DestroyNotify) {
        *donePtr = 1;
    }
}

#if TCL_MAJOR_VERSION >= 8
static int
ip_rbTkWaitObjCmd(clientData, interp, objc, objv)
    ClientData clientData;
    Tcl_Interp *interp;
    int objc;
    Tcl_Obj *CONST objv[];
#else /* TCL_MAJOR_VERSION < 8 */
static int
ip_rbTkWaitCommand(clientData, interp, objc, objv)
    ClientData clientData;
    Tcl_Interp *interp;
    int objc;
    char *objv[];
#endif
{
    Tk_Window tkwin = (Tk_Window) clientData;
    Tk_Window window;
    int done, index;
    static CONST char *optionStrings[] = { "variable", "visibility", "window",
                                           (char *) NULL };
    enum options { TKWAIT_VARIABLE, TKWAIT_VISIBILITY, TKWAIT_WINDOW };
    char *nameString;
    int ret, dummy;
    int thr_crit_bup;

    DUMP1("Ruby's 'tkwait' is called");
    if (interp == (Tcl_Interp*)NULL) {
        rbtk_pending_exception = rb_exc_new2(rb_eRuntimeError,
                                             "IP is deleted");
        return TCL_ERROR;
    }

#if 0
    if (!rb_thread_alone()
        && eventloop_thread != Qnil
        && eventloop_thread != rb_thread_current()) {
#if TCL_MAJOR_VERSION >= 8
        DUMP1("call ip_rb_threadTkWaitObjCmd");
        return ip_rb_threadTkWaitObjCmd(clientData, interp, objc, objv);
#else /* TCL_MAJOR_VERSION < 8 */
        DUMP1("call ip_rb_threadTkWaitCommand");
        return ip_rb_threadTkWwaitCommand(clientData, interp, objc, objv);
#endif
    }
#endif

    Tcl_Preserve(interp);

    if (objc != 3) {
#ifdef Tcl_WrongNumArgs
        Tcl_WrongNumArgs(interp, 1, objv, "variable|visibility|window name");
#else
        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;

#if TCL_MAJOR_VERSION >= 8
        Tcl_AppendResult(interp, "wrong number of arguments: should be \"",
                         Tcl_GetStringFromObj(objv[0], &dummy),
                         " variable|visibility|window name\"",
                         (char *) NULL);
#else /* TCL_MAJOR_VERSION < 8 */
        Tcl_AppendResult(interp, "wrong number of arguments: should be \"",
                         objv[0], " variable|visibility|window name\"",
                         (char *) NULL);
#endif

        rb_thread_critical = thr_crit_bup;
#endif

        Tcl_Release(interp);
        return TCL_ERROR;
    }

#if TCL_MAJOR_VERSION >= 8
    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

    /*
    if (Tcl_GetIndexFromObj(interp, objv[1],
                            (CONST84 char **)optionStrings,
                            "option", 0, &index) != TCL_OK) {
        return TCL_ERROR;
    }
    */
    ret = Tcl_GetIndexFromObj(interp, objv[1],
                              (CONST84 char **)optionStrings,
                              "option", 0, &index);

    rb_thread_critical = thr_crit_bup;

    if (ret != TCL_OK) {
        Tcl_Release(interp);
        return TCL_ERROR;
    }
#else /* TCL_MAJOR_VERSION < 8 */
    {
        int c = objv[1][0];
        size_t length = strlen(objv[1]);

        if ((c == 'v') && (strncmp(objv[1], "variable", length) == 0)
            && (length >= 2)) {
            index = TKWAIT_VARIABLE;
        } else if ((c == 'v') && (strncmp(objv[1], "visibility", length) == 0)
                   && (length >= 2)) {
            index = TKWAIT_VISIBILITY;
        } else if ((c == 'w') && (strncmp(objv[1], "window", length) == 0)) {
            index = TKWAIT_WINDOW;
        } else {
            Tcl_AppendResult(interp, "bad option \"", objv[1],
                             "\": must be variable, visibility, or window",
                             (char *) NULL);
            Tcl_Release(interp);
            return TCL_ERROR;
        }
    }
#endif

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

#if TCL_MAJOR_VERSION >= 8
    Tcl_IncrRefCount(objv[2]);
    /* nameString = Tcl_GetString(objv[2]); */
    nameString = Tcl_GetStringFromObj(objv[2], &dummy);
#else /* TCL_MAJOR_VERSION < 8 */
    nameString = objv[2];
#endif

    rb_thread_critical = thr_crit_bup;

    switch ((enum options) index) {
    case TKWAIT_VARIABLE:
        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;
        /*
        if (Tcl_TraceVar(interp, nameString,
                         TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
                         WaitVariableProc, (ClientData) &done) != TCL_OK) {
            return TCL_ERROR;
        }
        */
        ret = Tcl_TraceVar(interp, nameString,
                           TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
                           WaitVariableProc, (ClientData) &done);

        rb_thread_critical = thr_crit_bup;

        if (ret != TCL_OK) {
#if TCL_MAJOR_VERSION >= 8
            Tcl_DecrRefCount(objv[2]);
#endif
            Tcl_Release(interp);
            return TCL_ERROR;
        }

        done = 0;
        /* lib_eventloop_core(check_rootwidget_flag, 0, &done); */
        lib_eventloop_launcher(check_rootwidget_flag, 0, &done, interp);

        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;

        Tcl_UntraceVar(interp, nameString,
                       TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
                       WaitVariableProc, (ClientData) &done);

#if TCL_MAJOR_VERSION >= 8
        Tcl_DecrRefCount(objv[2]);
#endif

        rb_thread_critical = thr_crit_bup;

        /* exception check */
        if (!NIL_P(rbtk_pending_exception)) {
            Tcl_Release(interp);

            /*
            if (rb_obj_is_kind_of(rbtk_pending_exception, rb_eSystemExit)) {
            */
            if (rb_obj_is_kind_of(rbtk_pending_exception, rb_eSystemExit)
                || rb_obj_is_kind_of(rbtk_pending_exception, rb_eInterrupt)) {
                return TCL_RETURN;
            } else{
                return TCL_ERROR;
            }
        }

        /* trap check */
        if (rb_trap_pending) {
            Tcl_Release(interp);

            return TCL_RETURN;
        }

        break;

    case TKWAIT_VISIBILITY:
        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;

        if (!tk_stubs_init_p() || Tk_MainWindow(interp) == (Tk_Window)NULL) {
            window = NULL;
        } else {
            window = Tk_NameToWindow(interp, nameString, tkwin);
        }

        if (window == NULL) {
            Tcl_AppendResult(interp, "tkwait: ",
                             "no main-window (not Tk application?)",
                             (char*)NULL);
            rb_thread_critical = thr_crit_bup;
#if TCL_MAJOR_VERSION >= 8
            Tcl_DecrRefCount(objv[2]);
#endif
            Tcl_Release(interp);
            return TCL_ERROR;
        }

        Tk_CreateEventHandler(window,
                              VisibilityChangeMask|StructureNotifyMask,
                              WaitVisibilityProc, (ClientData) &done);

        rb_thread_critical = thr_crit_bup;

        done = 0;
        /* lib_eventloop_core(check_rootwidget_flag, 0, &done); */
        lib_eventloop_launcher(check_rootwidget_flag, 0, &done, interp);

        /* exception check */
        if (!NIL_P(rbtk_pending_exception)) {
#if TCL_MAJOR_VERSION >= 8
            Tcl_DecrRefCount(objv[2]);
#endif
            Tcl_Release(interp);

            /*
            if (rb_obj_is_kind_of(rbtk_pending_exception, rb_eSystemExit)) {
            */
            if (rb_obj_is_kind_of(rbtk_pending_exception, rb_eSystemExit)
                || rb_obj_is_kind_of(rbtk_pending_exception, rb_eInterrupt)) {
                return TCL_RETURN;
            } else{
                return TCL_ERROR;
            }
        }

        /* trap check */
        if (rb_trap_pending) {
#if TCL_MAJOR_VERSION >= 8
            Tcl_DecrRefCount(objv[2]);
#endif
            Tcl_Release(interp);

            return TCL_RETURN;
        }

        if (done != 1) {
            /*
             * Note that we do not delete the event handler because it
             * was deleted automatically when the window was destroyed.
             */
            thr_crit_bup = rb_thread_critical;
            rb_thread_critical = Qtrue;

            Tcl_ResetResult(interp);
            Tcl_AppendResult(interp, "window \"", nameString,
                             "\" was deleted before its visibility changed",
                             (char *) NULL);

            rb_thread_critical = thr_crit_bup;

#if TCL_MAJOR_VERSION >= 8
            Tcl_DecrRefCount(objv[2]);
#endif
            Tcl_Release(interp);
            return TCL_ERROR;
        }

        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;

#if TCL_MAJOR_VERSION >= 8
        Tcl_DecrRefCount(objv[2]);
#endif

        Tk_DeleteEventHandler(window,
                              VisibilityChangeMask|StructureNotifyMask,
                              WaitVisibilityProc, (ClientData) &done);

        rb_thread_critical = thr_crit_bup;

        break;

    case TKWAIT_WINDOW:
        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;

        if (!tk_stubs_init_p() || Tk_MainWindow(interp) == (Tk_Window)NULL) {
            window = NULL;
        } else {
            window = Tk_NameToWindow(interp, nameString, tkwin);
        }

#if TCL_MAJOR_VERSION >= 8
        Tcl_DecrRefCount(objv[2]);
#endif

        if (window == NULL) {
            Tcl_AppendResult(interp, "tkwait: ",
                             "no main-window (not Tk application?)",
                             (char*)NULL);
            rb_thread_critical = thr_crit_bup;
            Tcl_Release(interp);
            return TCL_ERROR;
        }

        Tk_CreateEventHandler(window, StructureNotifyMask,
                              WaitWindowProc, (ClientData) &done);

        rb_thread_critical = thr_crit_bup;

        done = 0;
        /* lib_eventloop_core(check_rootwidget_flag, 0, &done); */
        lib_eventloop_launcher(check_rootwidget_flag, 0, &done, interp);

        /* exception check */
        if (!NIL_P(rbtk_pending_exception)) {
            Tcl_Release(interp);

            /*
            if (rb_obj_is_kind_of(rbtk_pending_exception, rb_eSystemExit)) {
            */
            if (rb_obj_is_kind_of(rbtk_pending_exception, rb_eSystemExit)
                || rb_obj_is_kind_of(rbtk_pending_exception, rb_eInterrupt)) {
                return TCL_RETURN;
            } else{
                return TCL_ERROR;
            }
        }

        /* trap check */
        if (rb_trap_pending) {
            Tcl_Release(interp);

            return TCL_RETURN;
        }

        /*
         * Note:  there's no need to delete the event handler.  It was
         * deleted automatically when the window was destroyed.
         */
        break;
    }

    /*
     * Clear out the interpreter's result, since it may have been set
     * by event handlers.
     */

    Tcl_ResetResult(interp);
    Tcl_Release(interp);
    return TCL_OK;
}

/****************************/
/* vwait/tkwait with thread */
/****************************/
struct th_vwait_param {
    VALUE thread;
    int   done;
};

#if TCL_MAJOR_VERSION >= 8
static char *rb_threadVwaitProc _((ClientData, Tcl_Interp *,
                                   CONST84 char *,CONST84 char *, int));
static char *
rb_threadVwaitProc(clientData, interp, name1, name2, flags)
    ClientData clientData;      /* Pointer to integer to set to 1. */
    Tcl_Interp *interp;         /* Interpreter containing variable. */
    CONST84 char *name1;        /* Name of variable. */
    CONST84 char *name2;        /* Second part of variable name. */
    int flags;                  /* Information about what happened. */
#else /* TCL_MAJOR_VERSION < 8 */
static char *rb_threadVwaitProc _((ClientData, Tcl_Interp *,
                                   char *, char *, int));
static char *
rb_threadVwaitProc(clientData, interp, name1, name2, flags)
    ClientData clientData;      /* Pointer to integer to set to 1. */
    Tcl_Interp *interp;         /* Interpreter containing variable. */
    char *name1;                /* Name of variable. */
    char *name2;                /* Second part of variable name. */
    int flags;                  /* Information about what happened. */
#endif
{
    struct th_vwait_param *param = (struct th_vwait_param *) clientData;

    if (flags & (TCL_INTERP_DESTROYED | TCL_TRACE_DESTROYED)) {
        param->done = -1;
    } else {
        param->done = 1;
    }
    rb_thread_wakeup(param->thread);

    return (char *)NULL;
}

#define TKWAIT_MODE_VISIBILITY 1
#define TKWAIT_MODE_DESTROY    2

static void rb_threadWaitVisibilityProc _((ClientData, XEvent *));
static void
rb_threadWaitVisibilityProc(clientData, eventPtr)
    ClientData clientData;      /* Pointer to integer to set to 1. */
    XEvent *eventPtr;           /* Information about event (not used). */
{
    struct th_vwait_param *param = (struct th_vwait_param *) clientData;

    if (eventPtr->type == VisibilityNotify) {
        param->done = TKWAIT_MODE_VISIBILITY;
    }
    if (eventPtr->type == DestroyNotify) {
        param->done = TKWAIT_MODE_DESTROY;
    }
    rb_thread_wakeup(param->thread);
}

static void rb_threadWaitWindowProc _((ClientData, XEvent *));
static void
rb_threadWaitWindowProc(clientData, eventPtr)
    ClientData clientData;      /* Pointer to integer to set to 1. */
    XEvent *eventPtr;           /* Information about event. */
{
    struct th_vwait_param *param = (struct th_vwait_param *) clientData;

    if (eventPtr->type == DestroyNotify) {
        param->done = TKWAIT_MODE_DESTROY;
    }
    rb_thread_wakeup(param->thread);
}

#if TCL_MAJOR_VERSION >= 8
static int
ip_rb_threadVwaitObjCmd(clientData, interp, objc, objv)
    ClientData clientData;
    Tcl_Interp *interp;
    int objc;
    Tcl_Obj *CONST objv[];
#else /* TCL_MAJOR_VERSION < 8 */
static int
ip_rb_threadVwaitCommand(clientData, interp, objc, objv)
    ClientData clientData;
    Tcl_Interp *interp;
    int objc;
    char *objv[];
#endif
{
    struct th_vwait_param *param;
    char *nameString;
    int ret, dummy;
    int thr_crit_bup;
    volatile VALUE current_thread = rb_thread_current();

    DUMP1("Ruby's 'thread_vwait' is called");
    if (interp == (Tcl_Interp*)NULL) {
        rbtk_pending_exception = rb_exc_new2(rb_eRuntimeError,
                                             "IP is deleted");
        return TCL_ERROR;
    }

    if (rb_thread_alone() || eventloop_thread == current_thread) {
#if TCL_MAJOR_VERSION >= 8
        DUMP1("call ip_rbVwaitObjCmd");
        return ip_rbVwaitObjCmd(clientData, interp, objc, objv);
#else /* TCL_MAJOR_VERSION < 8 */
        DUMP1("call ip_rbVwaitCommand");
        return ip_rbVwaitCommand(clientData, interp, objc, objv);
#endif
    }

    Tcl_Preserve(interp);

    if (objc != 2) {
#ifdef Tcl_WrongNumArgs
        Tcl_WrongNumArgs(interp, 1, objv, "name");
#else
        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;

#if TCL_MAJOR_VERSION >= 8
        /* nameString = Tcl_GetString(objv[0]); */
        nameString = Tcl_GetStringFromObj(objv[0], &dummy);
#else /* TCL_MAJOR_VERSION < 8 */
        nameString = objv[0];
#endif
        Tcl_AppendResult(interp, "wrong number of arguments: should be \"",
                         nameString, " name\"", (char *) NULL);

        rb_thread_critical = thr_crit_bup;
#endif

        Tcl_Release(interp);
        return TCL_ERROR;
    }

#if TCL_MAJOR_VERSION >= 8
    Tcl_IncrRefCount(objv[1]);
    /* nameString = Tcl_GetString(objv[1]); */
    nameString = Tcl_GetStringFromObj(objv[1], &dummy);
#else /* TCL_MAJOR_VERSION < 8 */
    nameString = objv[1];
#endif
    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

    param = (struct th_vwait_param *)Tcl_Alloc(sizeof(struct th_vwait_param));
    Tcl_Preserve(param);
    param->thread = current_thread;
    param->done = 0;

    /*
    if (Tcl_TraceVar(interp, nameString,
                     TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
                     rb_threadVwaitProc, (ClientData) param) != TCL_OK) {
        return TCL_ERROR;
    }
    */
    ret = Tcl_TraceVar(interp, nameString,
                       TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
                       rb_threadVwaitProc, (ClientData) param);

    rb_thread_critical = thr_crit_bup;

    if (ret != TCL_OK) {
        Tcl_Release(param);
        Tcl_Free((char *)param);

#if TCL_MAJOR_VERSION >= 8
        Tcl_DecrRefCount(objv[1]);
#endif
        Tcl_Release(interp);
        return TCL_ERROR;
    }

    /* if (!param->done) { */
    while(!param->done) {
        rb_thread_stop();
    }

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

    if (param->done > 0) {
        Tcl_UntraceVar(interp, nameString,
                       TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
                       rb_threadVwaitProc, (ClientData) param);
    }

    Tcl_Release(param);
    Tcl_Free((char *)param);

    rb_thread_critical = thr_crit_bup;

#if TCL_MAJOR_VERSION >= 8
    Tcl_DecrRefCount(objv[1]);
#endif
    Tcl_Release(interp);
    return TCL_OK;
}

#if TCL_MAJOR_VERSION >= 8
static int
ip_rb_threadTkWaitObjCmd(clientData, interp, objc, objv)
    ClientData clientData;
    Tcl_Interp *interp;
    int objc;
    Tcl_Obj *CONST objv[];
#else /* TCL_MAJOR_VERSION < 8 */
static int
ip_rb_threadTkWaitCommand(clientData, interp, objc, objv)
    ClientData clientData;
    Tcl_Interp *interp;
    int objc;
    char *objv[];
#endif
{
    struct th_vwait_param *param;
    Tk_Window tkwin = (Tk_Window) clientData;
    Tk_Window window;
    int index;
    static CONST char *optionStrings[] = { "variable", "visibility", "window",
                                           (char *) NULL };
    enum options { TKWAIT_VARIABLE, TKWAIT_VISIBILITY, TKWAIT_WINDOW };
    char *nameString;
    int ret, dummy;
    int thr_crit_bup;
    volatile VALUE current_thread = rb_thread_current();

    DUMP1("Ruby's 'thread_tkwait' is called");
    if (interp == (Tcl_Interp*)NULL) {
        rbtk_pending_exception = rb_exc_new2(rb_eRuntimeError,
                                             "IP is deleted");
        return TCL_ERROR;
    }

    if (rb_thread_alone() || eventloop_thread == current_thread) {
#if TCL_MAJOR_VERSION >= 8
        DUMP1("call ip_rbTkWaitObjCmd");
        return ip_rbTkWaitObjCmd(clientData, interp, objc, objv);
#else /* TCL_MAJOR_VERSION < 8 */
        DUMP1("call rb_VwaitCommand");
        return ip_rbTkWaitCommand(clientData, interp, objc, objv);
#endif
    }

    Tcl_Preserve(interp);
    Tcl_Preserve(tkwin);

    if (objc != 3) {
#ifdef Tcl_WrongNumArgs
        Tcl_WrongNumArgs(interp, 1, objv, "variable|visibility|window name");
#else
        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;

#if TCL_MAJOR_VERSION >= 8
        Tcl_AppendResult(interp, "wrong number of arguments: should be \"",
                         Tcl_GetStringFromObj(objv[0], &dummy),
                         " variable|visibility|window name\"",
                         (char *) NULL);
#else /* TCL_MAJOR_VERSION < 8 */
        Tcl_AppendResult(interp, "wrong number of arguments: should be \"",
                         objv[0], " variable|visibility|window name\"",
                         (char *) NULL);
#endif

        rb_thread_critical = thr_crit_bup;
#endif

        Tcl_Release(tkwin);
        Tcl_Release(interp);
        return TCL_ERROR;
    }

#if TCL_MAJOR_VERSION >= 8
    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;
    /*
    if (Tcl_GetIndexFromObj(interp, objv[1],
                            (CONST84 char **)optionStrings,
                            "option", 0, &index) != TCL_OK) {
        return TCL_ERROR;
    }
    */
    ret = Tcl_GetIndexFromObj(interp, objv[1],
                              (CONST84 char **)optionStrings,
                              "option", 0, &index);

    rb_thread_critical = thr_crit_bup;

    if (ret != TCL_OK) {
        Tcl_Release(tkwin);
        Tcl_Release(interp);
        return TCL_ERROR;
    }
#else /* TCL_MAJOR_VERSION < 8 */
    {
        int c = objv[1][0];
        size_t length = strlen(objv[1]);

        if ((c == 'v') && (strncmp(objv[1], "variable", length) == 0)
            && (length >= 2)) {
            index = TKWAIT_VARIABLE;
        } else if ((c == 'v') && (strncmp(objv[1], "visibility", length) == 0)
                   && (length >= 2)) {
            index = TKWAIT_VISIBILITY;
        } else if ((c == 'w') && (strncmp(objv[1], "window", length) == 0)) {
            index = TKWAIT_WINDOW;
        } else {
            Tcl_AppendResult(interp, "bad option \"", objv[1],
                             "\": must be variable, visibility, or window",
                             (char *) NULL);
            Tcl_Release(tkwin);
            Tcl_Release(interp);
            return TCL_ERROR;
        }
    }
#endif

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

#if TCL_MAJOR_VERSION >= 8
    Tcl_IncrRefCount(objv[2]);
    /* nameString = Tcl_GetString(objv[2]); */
    nameString = Tcl_GetStringFromObj(objv[2], &dummy);
#else /* TCL_MAJOR_VERSION < 8 */
    nameString = objv[2];
#endif

    param = (struct th_vwait_param *)Tcl_Alloc(sizeof(struct th_vwait_param));
    Tcl_Preserve(param);
    param->thread = current_thread;
    param->done = 0;

    rb_thread_critical = thr_crit_bup;

    switch ((enum options) index) {
    case TKWAIT_VARIABLE:
        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;
        /*
        if (Tcl_TraceVar(interp, nameString,
                         TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
                         rb_threadVwaitProc, (ClientData) param) != TCL_OK) {
            return TCL_ERROR;
        }
        */
        ret = Tcl_TraceVar(interp, nameString,
                         TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
                         rb_threadVwaitProc, (ClientData) param);

        rb_thread_critical = thr_crit_bup;

        if (ret != TCL_OK) {
            Tcl_Release(param);
            Tcl_Free((char *)param);

#if TCL_MAJOR_VERSION >= 8
            Tcl_DecrRefCount(objv[2]);
#endif

            Tcl_Release(tkwin);
            Tcl_Release(interp);
            return TCL_ERROR;
        }

        /* if (!param->done) { */
        while(!param->done) {
            rb_thread_stop();
        }

        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;

        if (param->done > 0) {
            Tcl_UntraceVar(interp, nameString,
                           TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
                           rb_threadVwaitProc, (ClientData) param);
        }

#if TCL_MAJOR_VERSION >= 8
        Tcl_DecrRefCount(objv[2]);
#endif

        rb_thread_critical = thr_crit_bup;

        break;

    case TKWAIT_VISIBILITY:
        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;

        if (!tk_stubs_init_p() || Tk_MainWindow(interp) == (Tk_Window)NULL) {
            window = NULL;
        } else {
            window = Tk_NameToWindow(interp, nameString, tkwin);
        }

        if (window == NULL) {
            Tcl_AppendResult(interp, "thread_tkwait: ",
                             "no main-window (not Tk application?)",
                             (char*)NULL);

            rb_thread_critical = thr_crit_bup;

            Tcl_Release(param);
            Tcl_Free((char *)param);

#if TCL_MAJOR_VERSION >= 8
            Tcl_DecrRefCount(objv[2]);
#endif
            Tcl_Release(tkwin);
            Tcl_Release(interp);
            return TCL_ERROR;
        }
        Tcl_Preserve(window);

        Tk_CreateEventHandler(window,
                              VisibilityChangeMask|StructureNotifyMask,
                              rb_threadWaitVisibilityProc, (ClientData) param);

        rb_thread_critical = thr_crit_bup;

        /* if (!param->done) { */
        /*
        while(!param->done) {
            rb_thread_stop();
        }
        */
        while(param->done != TKWAIT_MODE_VISIBILITY) {
            if (param->done == TKWAIT_MODE_DESTROY) break;
            rb_thread_stop();
        }

        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;

        /* when a window is destroyed, no need to call Tk_DeleteEventHandler */
        if (param->done != TKWAIT_MODE_DESTROY) {
            Tk_DeleteEventHandler(window,
                                  VisibilityChangeMask|StructureNotifyMask,
                                  rb_threadWaitVisibilityProc,
                                  (ClientData) param);
        }

        if (param->done != 1) {
            Tcl_ResetResult(interp);
            Tcl_AppendResult(interp, "window \"", nameString,
                             "\" was deleted before its visibility changed",
                             (char *) NULL);

            rb_thread_critical = thr_crit_bup;

            Tcl_Release(window);

            Tcl_Release(param);
            Tcl_Free((char *)param);

#if TCL_MAJOR_VERSION >= 8
            Tcl_DecrRefCount(objv[2]);
#endif

            Tcl_Release(tkwin);
            Tcl_Release(interp);
            return TCL_ERROR;
        }

        Tcl_Release(window);

#if TCL_MAJOR_VERSION >= 8
        Tcl_DecrRefCount(objv[2]);
#endif

        rb_thread_critical = thr_crit_bup;

        break;

    case TKWAIT_WINDOW:
        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;

        if (!tk_stubs_init_p() || Tk_MainWindow(interp) == (Tk_Window)NULL) {
            window = NULL;
        } else {
            window = Tk_NameToWindow(interp, nameString, tkwin);
        }

#if TCL_MAJOR_VERSION >= 8
        Tcl_DecrRefCount(objv[2]);
#endif

        if (window == NULL) {
            Tcl_AppendResult(interp, "thread_tkwait: ",
                             "no main-window (not Tk application?)",
                             (char*)NULL);

            rb_thread_critical = thr_crit_bup;

            Tcl_Release(param);
            Tcl_Free((char *)param);

            Tcl_Release(tkwin);
            Tcl_Release(interp);
            return TCL_ERROR;
        }

        Tcl_Preserve(window);

        Tk_CreateEventHandler(window, StructureNotifyMask,
                              rb_threadWaitWindowProc, (ClientData) param);

        rb_thread_critical = thr_crit_bup;

        /* if (!param->done) { */
        /*
        while(!param->done) {
            rb_thread_stop();
        }
        */
        while(param->done != TKWAIT_MODE_DESTROY) {
            rb_thread_stop();
        }

        Tcl_Release(window);

        /* when a window is destroyed, no need to call Tk_DeleteEventHandler
        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;

        Tk_DeleteEventHandler(window, StructureNotifyMask,
                              rb_threadWaitWindowProc, (ClientData) param);

        rb_thread_critical = thr_crit_bup;
        */

        break;
    } /* end of 'switch' statement */

    Tcl_Release(param);
    Tcl_Free((char *)param);

    /*
     * Clear out the interpreter's result, since it may have been set
     * by event handlers.
     */

    Tcl_ResetResult(interp);

    Tcl_Release(tkwin);
    Tcl_Release(interp);
    return TCL_OK;
}

static VALUE
ip_thread_vwait(self, var)
    VALUE self;
    VALUE var;
{
    VALUE argv[2];
    volatile VALUE cmd_str = rb_str_new2("thread_vwait");

    argv[0] = cmd_str;
    argv[1] = var;

    return ip_invoke_real(2, argv, self);
}

static VALUE
ip_thread_tkwait(self, mode, target)
    VALUE self;
    VALUE mode;
    VALUE target;
{
    VALUE argv[3];
    volatile VALUE cmd_str = rb_str_new2("thread_tkwait");

    argv[0] = cmd_str;
    argv[1] = mode;
    argv[2] = target;

    return ip_invoke_real(3, argv, self);
}

/* delete slave interpreters */
#if TCL_MAJOR_VERSION >= 8
static void
delete_slaves(ip)
    Tcl_Interp *ip;
{
    int  thr_crit_bup;
    Tcl_Interp *slave;
    Tcl_Obj *slave_list, *elem;
    char *slave_name;
    int i, len;

    DUMP1("delete slaves");
    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

    if (!Tcl_InterpDeleted(ip) && Tcl_Eval(ip, "interp slaves") == TCL_OK) {
        slave_list = Tcl_GetObjResult(ip);
        Tcl_IncrRefCount(slave_list);

        if (Tcl_ListObjLength((Tcl_Interp*)NULL, slave_list, &len) == TCL_OK) {
            for(i = 0; i < len; i++) {
                Tcl_ListObjIndex((Tcl_Interp*)NULL, slave_list, i, &elem);
                Tcl_IncrRefCount(elem);

                if (elem == (Tcl_Obj*)NULL) continue;

                /* get slave */
                /* slave_name = Tcl_GetString(elem); */
                slave_name = Tcl_GetStringFromObj(elem, (int*)NULL);
                DUMP2("delete slave:'%s'", slave_name);

                Tcl_DecrRefCount(elem);

                slave = Tcl_GetSlave(ip, slave_name);
                if (slave == (Tcl_Interp*)NULL) continue;

                /* call ip_finalize */
                ip_finalize(slave);

                Tcl_DeleteInterp(slave);
                /* Tcl_Release(slave); */
            }
        }

        Tcl_DecrRefCount(slave_list);
    }

    rb_thread_critical = thr_crit_bup;
}
#else /* TCL_MAJOR_VERSION < 8 */
static void
delete_slaves(ip)
    Tcl_Interp *ip;
{
    int  thr_crit_bup;
    Tcl_Interp *slave;
    int argc;
    char **argv;
    char *slave_list;
    char *slave_name;
    int i, len;

    DUMP1("delete slaves");
    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

    if (!Tcl_InterpDeleted(ip) && Tcl_Eval(ip, "interp slaves") == TCL_OK) {
        slave_list = ip->result;
        if (Tcl_SplitList((Tcl_Interp*)NULL,
                          slave_list, &argc, &argv) == TCL_OK) {
            for(i = 0; i < argc; i++) {
                slave_name = argv[i];

                DUMP2("delete slave:'%s'", slave_name);

                slave = Tcl_GetSlave(ip, slave_name);
                if (slave == (Tcl_Interp*)NULL) continue;

                /* call ip_finalize */
                ip_finalize(slave);

                Tcl_DeleteInterp(slave);
            }
        }
    }

    rb_thread_critical = thr_crit_bup;
}
#endif

/* finalize operation */
static void
ip_finalize(ip)
    Tcl_Interp *ip;
{
    Tcl_CmdInfo info;
    int  thr_crit_bup;
    int  rb_debug_bup;  /* When ruby is exiting, printing debug messages in
                           some callback operations from Tcl-IP sometimes
                           cause SEGV. I don't know the reason. But I got
                           SEGV when calling "rb_io_write(rb_stdout, ...)".
                           So, in some part of this function, debug mode is
                           disabled. If you know the reason, please fix it.
                           --  Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) */

    DUMP1("start ip_finalize");

    if (ip == (Tcl_Interp*)NULL) {
        DUMP1("ip is NULL");
        return;
    }

#if TCL_NAMESPACE_DEBUG
    if (ip_null_namespace(ip)) {
        DUMP2("ip(%lx) has null namespace", ip);
        return;
    }
#endif

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

    rb_debug_bup = ruby_debug;

    Tcl_Preserve(ip);

    /* delete slaves */
    delete_slaves(ip);

    /* delete root widget */
#if 0
    DUMP1("check `destroy'");
    if (Tcl_GetCommandInfo(ip, "destroy", &info)) {
        DUMP1("call `destroy'");
        Tcl_GlobalEval(ip, "destroy .");
    }
#endif
#if 1
    DUMP1("destroy root widget");
    if (tk_stubs_init_p() && Tk_MainWindow(ip) != (Tk_Window)NULL) {
        DUMP1("call Tk_DestroyWindow");
        ruby_debug = 0;
        Tk_DestroyWindow(Tk_MainWindow(ip));
        ruby_debug = rb_debug_bup;
    }
#endif

    /* call finalize-hook-proc */
    DUMP1("check `finalize-hook-proc'");
    if (Tcl_GetCommandInfo(ip, finalize_hook_name, &info)) {
        DUMP2("call finalize hook proc '%s'", finalize_hook_name);
        ruby_debug = 0;
        Tcl_GlobalEval(ip, finalize_hook_name);
        ruby_debug = rb_debug_bup;
    }

    DUMP1("check `foreach' & `after'");
    if ( Tcl_GetCommandInfo(ip, "foreach", &info)
         && Tcl_GetCommandInfo(ip, "after", &info) ) {
        DUMP1("cancel after callbacks");
        ruby_debug = 0;
        Tcl_GlobalEval(ip, "foreach id [after info] {after cancel $id}");
        ruby_debug = rb_debug_bup;
    }

    Tcl_Release(ip);

    DUMP1("finish ip_finalize");
    ruby_debug = rb_debug_bup;
    rb_thread_critical = thr_crit_bup;
}

/* destroy interpreter */
static void
ip_free(ptr)
    struct tcltkip *ptr;
{
    int  thr_crit_bup;

    DUMP2("free Tcl Interp %lx", (unsigned long)ptr->ip);
    if (ptr) {
        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;

        if ( ptr->ip != (Tcl_Interp*)NULL
             && !Tcl_InterpDeleted(ptr->ip)
             && Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL
             && !Tcl_InterpDeleted(Tcl_GetMaster(ptr->ip)) ) {
            DUMP2("parent IP(%lx) is not deleted",
                  (unsigned long)Tcl_GetMaster(ptr->ip));
            DUMP2("slave IP(%lx) should not be deleted",
                  (unsigned long)ptr->ip);
            free(ptr);
            rb_thread_critical = thr_crit_bup;
            return;
        }

        if (ptr->ip == (Tcl_Interp*)NULL) {
            DUMP1("ip_free is called for deleted IP");
            free(ptr);
            rb_thread_critical = thr_crit_bup;
            return;
        }

        ip_finalize(ptr->ip);
        Tcl_DeleteInterp(ptr->ip);
        Tcl_Release(ptr->ip);

        free(ptr);

        rb_thread_critical = thr_crit_bup;
    }

    DUMP1("complete freeing Tcl Interp");
}

/* create and initialize interpreter */
static VALUE ip_alloc _((VALUE));
static VALUE
ip_alloc(self)
    VALUE self;
{
    return Data_Wrap_Struct(self, 0, ip_free, 0);
}

static void
ip_replace_wait_commands(interp, mainWin)
    Tcl_Interp *interp;
    Tk_Window mainWin;
{
    /* replace 'vwait' command */
#if TCL_MAJOR_VERSION >= 8
    DUMP1("Tcl_CreateObjCommand(\"vwait\")");
    Tcl_CreateObjCommand(interp, "vwait", ip_rbVwaitObjCmd,
                         (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
#else /* TCL_MAJOR_VERSION < 8 */
    DUMP1("Tcl_CreateCommand(\"vwait\")");
    Tcl_CreateCommand(interp, "vwait", ip_rbVwaitCommand,
                      (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
#endif

    /* replace 'tkwait' command */
#if TCL_MAJOR_VERSION >= 8
    DUMP1("Tcl_CreateObjCommand(\"tkwait\")");
    Tcl_CreateObjCommand(interp, "tkwait", ip_rbTkWaitObjCmd,
                         (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
#else /* TCL_MAJOR_VERSION < 8 */
    DUMP1("Tcl_CreateCommand(\"tkwait\")");
    Tcl_CreateCommand(interp, "tkwait", ip_rbTkWaitCommand,
                      (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
#endif

    /* add 'thread_vwait' command */
#if TCL_MAJOR_VERSION >= 8
    DUMP1("Tcl_CreateObjCommand(\"thread_vwait\")");
    Tcl_CreateObjCommand(interp, "thread_vwait", ip_rb_threadVwaitObjCmd,
                         (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
#else /* TCL_MAJOR_VERSION < 8 */
    DUMP1("Tcl_CreateCommand(\"thread_vwait\")");
    Tcl_CreateCommand(interp, "thread_vwait", ip_rb_threadVwaitCommand,
                      (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
#endif

    /* add 'thread_tkwait' command */
#if TCL_MAJOR_VERSION >= 8
    DUMP1("Tcl_CreateObjCommand(\"thread_tkwait\")");
    Tcl_CreateObjCommand(interp, "thread_tkwait", ip_rb_threadTkWaitObjCmd,
                         (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
#else /* TCL_MAJOR_VERSION < 8 */
    DUMP1("Tcl_CreateCommand(\"thread_tkwait\")");
    Tcl_CreateCommand(interp, "thread_tkwait", ip_rb_threadTkWaitCommand,
                      (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
#endif

    /* replace 'update' command */
#if TCL_MAJOR_VERSION >= 8
    DUMP1("Tcl_CreateObjCommand(\"update\")");
    Tcl_CreateObjCommand(interp, "update", ip_rbUpdateObjCmd,
                         (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
#else /* TCL_MAJOR_VERSION < 8 */
    DUMP1("Tcl_CreateCommand(\"update\")");
    Tcl_CreateCommand(interp, "update", ip_rbUpdateCommand,
                      (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
#endif

    /* add 'thread_update' command */
#if TCL_MAJOR_VERSION >= 8
    DUMP1("Tcl_CreateObjCommand(\"thread_update\")");
    Tcl_CreateObjCommand(interp, "thread_update", ip_rb_threadUpdateObjCmd,
                         (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
#else /* TCL_MAJOR_VERSION < 8 */
    DUMP1("Tcl_CreateCommand(\"thread_update\")");
    Tcl_CreateCommand(interp, "thread_update", ip_rb_threadUpdateCommand,
                      (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
#endif
}

#if TCL_MAJOR_VERSION >= 8
static int ip_rbNamespaceObjCmd _((ClientData, Tcl_Interp *, int,
                                   Tcl_Obj *CONST []));
static int
ip_rbNamespaceObjCmd(clientData, interp, objc, objv)
    ClientData clientData;
    Tcl_Interp *interp;
    int objc;
    Tcl_Obj *CONST objv[];
{
    Tcl_CmdInfo info;
    int ret;

    if (!Tcl_GetCommandInfo(interp, "__orig_namespace_command__", &(info))) {
        Tcl_ResetResult(interp);
        Tcl_AppendResult(interp,
                         "invalid command name \"namespace\"", (char*)NULL);
        return TCL_ERROR;
    }

    rbtk_eventloop_depth++;
    DUMP2("namespace wrapper enter depth == %d", rbtk_eventloop_depth);

    if (info.isNativeObjectProc) {
        ret = (*(info.objProc))(info.objClientData, interp, objc, objv);
    } else {
        /* string interface */
        int i;
        char **argv;

        argv = (char **)Tcl_Alloc(sizeof(char *) * (objc + 1));

        for(i = 0; i < objc; i++) {
            /* argv[i] = Tcl_GetString(objv[i]); */
            argv[i] = Tcl_GetStringFromObj(objv[i], (int*)NULL);
        }
        argv[objc] = (char *)NULL;

        ret = (*(info.proc))(info.clientData, interp,
                              objc, (CONST84 char **)argv);

        Tcl_Free((char*)argv);
    }

    DUMP2("namespace wrapper exit depth == %d", rbtk_eventloop_depth);
    rbtk_eventloop_depth--;

    return ret;
}
#endif

static void
ip_wrap_namespace_command(interp)
    Tcl_Interp *interp;
{
#if TCL_MAJOR_VERSION >= 8
    Tcl_CmdInfo orig_info;

    if (!Tcl_GetCommandInfo(interp, "namespace", &(orig_info))) {
        return;
    }

    if (orig_info.isNativeObjectProc) {
        Tcl_CreateObjCommand(interp, "__orig_namespace_command__",
                             orig_info.objProc, orig_info.objClientData,
                             orig_info.deleteProc);
    } else {
        Tcl_CreateCommand(interp, "__orig_namespace_command__",
                          orig_info.proc, orig_info.clientData,
                          orig_info.deleteProc);
    }

    Tcl_CreateObjCommand(interp, "namespace", ip_rbNamespaceObjCmd,
                         (ClientData) 0, (Tcl_CmdDeleteProc *)NULL);
#endif
}

/* call when interpreter is deleted */
static void
ip_CallWhenDeleted(clientData, ip)
    ClientData clientData;
    Tcl_Interp *ip;
{
    int  thr_crit_bup;
    /* Tk_Window main_win = (Tk_Window) clientData; */

    DUMP1("start ip_CallWhenDeleted");
    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

    ip_finalize(ip);

    DUMP1("finish ip_CallWhenDeleted");
    rb_thread_critical = thr_crit_bup;
}

/* initialize interpreter */
static VALUE
ip_init(argc, argv, self)
    int   argc;
    VALUE *argv;
    VALUE self;
{
    struct tcltkip *ptr;        /* tcltkip data struct */
    VALUE argv0, opts;
    int cnt;
    int st;
    int with_tk = 1;
    Tk_Window mainWin = (Tk_Window)NULL;

    /* security check */
    if (ruby_safe_level >= 4) {
        rb_raise(rb_eSecurityError,
                 "Cannot create a TclTkIp object at level %d",
                 ruby_safe_level);
    }

    /* create object */
    Data_Get_Struct(self, struct tcltkip, ptr);
    ptr = ALLOC(struct tcltkip);
    DATA_PTR(self) = ptr;
    ptr->ref_count = 0;
    ptr->allow_ruby_exit = 1;
    ptr->return_value = 0;

    /* from Tk_Main() */
    DUMP1("Tcl_CreateInterp");
    ptr->ip = ruby_tcl_create_ip_and_stubs_init(&st);
    if (ptr->ip == NULL) {
        switch(st) {
        case TCLTK_STUBS_OK:
            break;
        case NO_TCL_DLL:
            rb_raise(rb_eLoadError, "tcltklib: fail to open tcl_dll");
        case NO_FindExecutable:
            rb_raise(rb_eLoadError, "tcltklib: can't find Tcl_FindExecutable");
        case NO_CreateInterp:
            rb_raise(rb_eLoadError, "tcltklib: can't find Tcl_CreateInterp()");
        case NO_DeleteInterp:
            rb_raise(rb_eLoadError, "tcltklib: can't find Tcl_DeleteInterp()");
        case FAIL_CreateInterp:
            rb_raise(rb_eRuntimeError, "tcltklib: fail to create a new IP");
        case FAIL_Tcl_InitStubs:
            rb_raise(rb_eRuntimeError, "tcltklib: fail to Tcl_InitStubs()");
        default:
            rb_raise(rb_eRuntimeError, "tcltklib: unknown error(%d) on ruby_tcl_create_ip_and_stubs_init", st);
        }
    }

#if TCL_MAJOR_VERSION >= 8
#if TCL_NAMESPACE_DEBUG
    DUMP1("get current namespace");
    if ((ptr->default_ns = Tcl_GetCurrentNamespace(ptr->ip))
        == (Tcl_Namespace*)NULL) {
      rb_raise(rb_eRuntimeError, "a new Tk interpreter has a NULL namespace");
    }
#endif
#endif

    rbtk_preserve_ip(ptr);
    DUMP2("IP ref_count = %d", ptr->ref_count);
    current_interp = ptr->ip;

    ptr->has_orig_exit
        = Tcl_GetCommandInfo(ptr->ip, "exit", &(ptr->orig_exit_info));

    /* from Tcl_AppInit() */
    DUMP1("Tcl_Init");
    if (Tcl_Init(ptr->ip) == TCL_ERROR) {
        rb_raise(rb_eRuntimeError, "%s", Tcl_GetStringResult(ptr->ip));
    }

    /* set variables */
    cnt = rb_scan_args(argc, argv, "02", &argv0, &opts);
    switch(cnt) {
    case 2:
        /* options */
        if (NIL_P(opts) || opts == Qfalse) {
            /* without Tk */
            with_tk = 0;
        } else {
            /* Tcl_SetVar(ptr->ip, "argv", StringValuePtr(opts), 0); */
            Tcl_SetVar(ptr->ip, "argv", StringValuePtr(opts), TCL_GLOBAL_ONLY);
        }
    case 1:
        /* argv0 */
        if (!NIL_P(argv0)) {
            if (strncmp(StringValuePtr(argv0), "-e", 3) == 0
                || strncmp(StringValuePtr(argv0), "-", 2) == 0) {
                Tcl_SetVar(ptr->ip, "argv0", "ruby", TCL_GLOBAL_ONLY);
            } else {
                /* Tcl_SetVar(ptr->ip, "argv0", StringValuePtr(argv0), 0); */
                Tcl_SetVar(ptr->ip, "argv0", StringValuePtr(argv0),
                           TCL_GLOBAL_ONLY);
            }
        }
    case 0:
        /* no args */
        ;
    }

    /* from Tcl_AppInit() */
    if (with_tk) {
        DUMP1("Tk_Init");
        st = ruby_tk_stubs_init(ptr->ip);
        switch(st) {
        case TCLTK_STUBS_OK:
            break;
        case NO_Tk_Init:
            rb_raise(rb_eLoadError, "tcltklib: can't find Tk_Init()");
        case FAIL_Tk_Init:
            rb_raise(rb_eRuntimeError, "tcltklib: fail to Tk_Init(). %s",
                     Tcl_GetStringResult(ptr->ip));
        case FAIL_Tk_InitStubs:
            rb_raise(rb_eRuntimeError, "tcltklib: fail to Tk_InitStubs(). %s",
                     Tcl_GetStringResult(ptr->ip));
        default:
            rb_raise(rb_eRuntimeError, "tcltklib: unknown error(%d) on ruby_tk_stubs_init", st);
        }

        DUMP1("Tcl_StaticPackage(\"Tk\")");
#if TCL_MAJOR_VERSION >= 8
        Tcl_StaticPackage(ptr->ip, "Tk", Tk_Init, Tk_SafeInit);
#else /* TCL_MAJOR_VERSION < 8 */
        Tcl_StaticPackage(ptr->ip, "Tk", Tk_Init,
                          (Tcl_PackageInitProc *) NULL);
#endif

        /* get main window */
        mainWin = Tk_MainWindow(ptr->ip);
        Tk_Preserve((ClientData)mainWin);
    }

    /* add ruby command to the interpreter */
#if TCL_MAJOR_VERSION >= 8
    DUMP1("Tcl_CreateObjCommand(\"ruby\")");
    Tcl_CreateObjCommand(ptr->ip, "ruby", ip_ruby_eval, (ClientData)NULL,
                         (Tcl_CmdDeleteProc *)NULL);
    DUMP1("Tcl_CreateObjCommand(\"ruby_eval\")");
    Tcl_CreateObjCommand(ptr->ip, "ruby_eval", ip_ruby_eval, (ClientData)NULL,
                         (Tcl_CmdDeleteProc *)NULL);
    DUMP1("Tcl_CreateObjCommand(\"ruby_cmd\")");
    Tcl_CreateObjCommand(ptr->ip, "ruby_cmd", ip_ruby_cmd, (ClientData)NULL,
                         (Tcl_CmdDeleteProc *)NULL);
#else /* TCL_MAJOR_VERSION < 8 */
    DUMP1("Tcl_CreateCommand(\"ruby\")");
    Tcl_CreateCommand(ptr->ip, "ruby", ip_ruby_eval, (ClientData)NULL,
                      (Tcl_CmdDeleteProc *)NULL);
    DUMP1("Tcl_CreateCommand(\"ruby_eval\")");
    Tcl_CreateCommand(ptr->ip, "ruby_eval", ip_ruby_eval, (ClientData)NULL,
                      (Tcl_CmdDeleteProc *)NULL);
    DUMP1("Tcl_CreateCommand(\"ruby_cmd\")");
    Tcl_CreateCommand(ptr->ip, "ruby_cmd", ip_ruby_cmd, (ClientData)NULL,
                      (Tcl_CmdDeleteProc *)NULL);
#endif

    /* add 'interp_exit', 'ruby_exit' and replace 'exit' command */
#if TCL_MAJOR_VERSION >= 8
    DUMP1("Tcl_CreateObjCommand(\"interp_exit\")");
    Tcl_CreateObjCommand(ptr->ip, "interp_exit", ip_InterpExitObjCmd,
                         (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
    DUMP1("Tcl_CreateObjCommand(\"ruby_exit\")");
    Tcl_CreateObjCommand(ptr->ip, "ruby_exit", ip_RubyExitObjCmd,
                         (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
    DUMP1("Tcl_CreateObjCommand(\"exit\") --> \"ruby_exit\"");
    Tcl_CreateObjCommand(ptr->ip, "exit", ip_RubyExitObjCmd,
                         (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
#else /* TCL_MAJOR_VERSION < 8 */
    DUMP1("Tcl_CreateCommand(\"interp_exit\")");
    Tcl_CreateCommand(ptr->ip, "interp_exit", ip_InterpExitCommand,
                      (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
    DUMP1("Tcl_CreateCommand(\"ruby_exit\")");
    Tcl_CreateCommand(ptr->ip, "ruby_exit", ip_RubyExitCommand,
                      (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
    DUMP1("Tcl_CreateCommand(\"exit\") --> \"ruby_exit\"");
    Tcl_CreateCommand(ptr->ip, "exit", ip_RubyExitCommand,
                      (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
#endif

    /* replace vwait and tkwait */
    ip_replace_wait_commands(ptr->ip, mainWin);

    /* wrap namespace command */
    ip_wrap_namespace_command(ptr->ip);

    /* set finalizer */
    Tcl_CallWhenDeleted(ptr->ip, ip_CallWhenDeleted, (ClientData)mainWin);

    if (mainWin != (Tk_Window)NULL) {
        Tk_Release((ClientData)mainWin);
    }

    return self;
}

static VALUE
ip_create_slave_core(interp, argc, argv)
    VALUE interp;
    int   argc;
    VALUE *argv;
{
    struct tcltkip *master = get_ip(interp);
    struct tcltkip *slave = ALLOC(struct tcltkip);
    VALUE safemode;
    VALUE name;
    int safe;
    int thr_crit_bup;
    Tk_Window mainWin;

    /* ip is deleted? */
    if (deleted_ip(master)) {
        return rb_exc_new2(rb_eRuntimeError,
                           "deleted master cannot create a new slave");
    }

    name     = argv[0];
    safemode = argv[1];

    if (Tcl_IsSafe(master->ip) == 1) {
        safe = 1;
    } else if (safemode == Qfalse || NIL_P(safemode)) {
        safe = 0;
        /* rb_secure(4); */ /* already checked */
    } else {
        safe = 1;
    }

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

#if 0
    /* init Tk */
    if (RTEST(with_tk)) {
        volatile VALUE exc;
        if (!tk_stubs_init_p()) {
            exc = tcltkip_init_tk(interp);
            if (!NIL_P(exc)) {
                rb_thread_critical = thr_crit_bup;
                return exc;
            }
        }
    }
#endif

    /* create slave-ip */
    slave->ref_count = 0;
    slave->allow_ruby_exit = 0;
    slave->return_value = 0;

    slave->ip = Tcl_CreateSlave(master->ip, RSTRING(name)->ptr, safe);
    if (slave->ip == NULL) {
        rb_thread_critical = thr_crit_bup;
        return rb_exc_new2(rb_eRuntimeError,
                           "fail to create the new slave interpreter");
    }
#if TCL_MAJOR_VERSION >= 8
#if TCL_NAMESPACE_DEBUG
    slave->default_ns = Tcl_GetCurrentNamespace(slave->ip);
#endif
#endif
    rbtk_preserve_ip(slave);

    slave->has_orig_exit
        = Tcl_GetCommandInfo(slave->ip, "exit", &(slave->orig_exit_info));

    /* replace 'exit' command --> 'interp_exit' command */
    mainWin = (tk_stubs_init_p())? Tk_MainWindow(slave->ip): (Tk_Window)NULL;
#if TCL_MAJOR_VERSION >= 8
    DUMP1("Tcl_CreateObjCommand(\"exit\") --> \"interp_exit\"");
    Tcl_CreateObjCommand(slave->ip, "exit", ip_InterpExitObjCmd,
                         (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
#else /* TCL_MAJOR_VERSION < 8 */
    DUMP1("Tcl_CreateCommand(\"exit\") --> \"interp_exit\"");
    Tcl_CreateCommand(slave->ip, "exit", ip_InterpExitCommand,
                      (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
#endif

    /* replace vwait and tkwait */
    ip_replace_wait_commands(slave->ip, mainWin);

    /* wrap namespace command */
    ip_wrap_namespace_command(slave->ip);

    /* set finalizer */
    Tcl_CallWhenDeleted(slave->ip, ip_CallWhenDeleted, (ClientData)mainWin);

    rb_thread_critical = thr_crit_bup;

    return Data_Wrap_Struct(CLASS_OF(interp), 0, ip_free, slave);
}

static VALUE
ip_create_slave(argc, argv, self)
    int   argc;
    VALUE *argv;
    VALUE self;
{
    struct tcltkip *master = get_ip(self);
    VALUE safemode;
    VALUE name;
    VALUE callargv[2];

    /* ip is deleted? */
    if (deleted_ip(master)) {
        rb_raise(rb_eRuntimeError,
                 "deleted master cannot create a new slave interpreter");
    }

    /* argument check */
    if (rb_scan_args(argc, argv, "11", &name, &safemode) == 1) {
        safemode = Qfalse;
    }
    if (Tcl_IsSafe(master->ip) != 1
        && (safemode == Qfalse || NIL_P(safemode))) {
        rb_secure(4);
    }

    StringValue(name);
    callargv[0] = name;
    callargv[1] = safemode;

    return tk_funcall(ip_create_slave_core, 2, callargv, self);
}

/* self is slave of master? */
static VALUE
ip_is_slave_of_p(self, master)
    VALUE self, master;
{
    if (!rb_obj_is_kind_of(master, tcltkip_class)) {
        rb_raise(rb_eArgError, "expected TclTkIp object");
    }

    if (Tcl_GetMaster(get_ip(self)->ip) == get_ip(master)->ip) {
      return Qtrue;
    } else {
      return Qfalse;
    }
}

/* create console (if supported) */
#if defined(MAC_TCL) || defined(__WIN32__)
#if TCL_MAJOR_VERSION < 8 \
    || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) \
    || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 1 \
        && (TCL_RELEASE_LEVEL == TCL_ALPHA_RELEASE \
           || (TCL_RELEASE_LEVEL == TCL_BETA_RELEASE \
               && TCL_RELEASE_SERIAL < 2) ) )
EXTERN void TkConsoleCreate _((void));
#endif
#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 1 \
    && ( (TCL_RELEASE_LEVEL == TCL_FINAL_RELEASE \
          && TCL_RELEASE_SERIAL == 0) \
       || (TCL_RELEASE_LEVEL == TCL_BETA_RELEASE \
           && TCL_RELEASE_SERIAL >= 2) )
EXTERN void TkConsoleCreate_ _((void));
#endif
#endif
static VALUE
ip_create_console_core(interp, argc, argv)
    VALUE interp;
    int   argc;   /* dummy */
    VALUE *argv;  /* dummy */
{
    struct tcltkip *ptr = get_ip(interp);

    if (!tk_stubs_init_p()) {
        tcltkip_init_tk(interp);
    }

    if (Tcl_GetVar(ptr->ip,"tcl_interactive",TCL_GLOBAL_ONLY) == (char*)NULL) {
        Tcl_SetVar(ptr->ip, "tcl_interactive", "0", TCL_GLOBAL_ONLY);
    }

#if TCL_MAJOR_VERSION > 8 \
    || (TCL_MAJOR_VERSION == 8 \
        && (TCL_MINOR_VERSION > 1 \
            || (TCL_MINOR_VERSION == 1 \
                 && TCL_RELEASE_LEVEL == TCL_FINAL_RELEASE \
                 && TCL_RELEASE_SERIAL >= 1) ) )
    Tk_InitConsoleChannels(ptr->ip);

    if (Tk_CreateConsoleWindow(ptr->ip) != TCL_OK) {
        rb_raise(rb_eRuntimeError, "fail to create console-window");
    }
#else
#if defined(MAC_TCL) || defined(__WIN32__)
#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 1 \
    && ( (TCL_RELEASE_LEVEL == TCL_FINAL_RELEASE && TCL_RELEASE_SERIAL == 0) \
        || (TCL_RELEASE_LEVEL == TCL_BETA_RELEASE && TCL_RELEASE_SERIAL >= 2) )
    TkConsoleCreate_();
#else
    TkConsoleCreate();
#endif

    if (TkConsoleInit(ptr->ip) != TCL_OK) {
        rb_raise(rb_eRuntimeError, "fail to create console-window");
    }
#else
    rb_notimplement();
#endif
#endif

    return interp;
}

static VALUE
ip_create_console(self)
    VALUE self;
{
    struct tcltkip *ptr = get_ip(self);

    /* ip is deleted? */
    if (deleted_ip(ptr)) {
        rb_raise(rb_eRuntimeError, "interpreter is deleted");
    }

    return tk_funcall(ip_create_console_core, 0, (VALUE*)NULL, self);
}

/* make ip "safe" */
static VALUE
ip_make_safe_core(interp, argc, argv)
    VALUE interp;
    int   argc;   /* dummy */
    VALUE *argv;  /* dummy */
{
    struct tcltkip *ptr = get_ip(interp);
    Tk_Window mainWin;

    /* ip is deleted? */
    if (deleted_ip(ptr)) {
        return rb_exc_new2(rb_eRuntimeError, "interpreter is deleted");
    }

    if (Tcl_MakeSafe(ptr->ip) == TCL_ERROR) {
        return rb_exc_new2(rb_eRuntimeError, Tcl_GetStringResult(ptr->ip));
    }

    ptr->allow_ruby_exit = 0;

    /* replace 'exit' command --> 'interp_exit' command */
    mainWin = (tk_stubs_init_p())? Tk_MainWindow(ptr->ip): (Tk_Window)NULL;
#if TCL_MAJOR_VERSION >= 8
    DUMP1("Tcl_CreateObjCommand(\"exit\") --> \"interp_exit\"");
    Tcl_CreateObjCommand(ptr->ip, "exit", ip_InterpExitObjCmd,
                         (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
#else /* TCL_MAJOR_VERSION < 8 */
    DUMP1("Tcl_CreateCommand(\"exit\") --> \"interp_exit\"");
    Tcl_CreateCommand(ptr->ip, "exit", ip_InterpExitCommand,
                      (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
#endif

    return interp;
}

static VALUE
ip_make_safe(self)
    VALUE self;
{
    struct tcltkip *ptr = get_ip(self);

    /* ip is deleted? */
    if (deleted_ip(ptr)) {
        rb_raise(rb_eRuntimeError, "interpreter is deleted");
    }

    return tk_funcall(ip_make_safe_core, 0, (VALUE*)NULL, self);
}

/* is safe? */
static VALUE
ip_is_safe_p(self)
    VALUE self;
{
    struct tcltkip *ptr = get_ip(self);

    /* ip is deleted? */
    if (deleted_ip(ptr)) {
        rb_raise(rb_eRuntimeError, "interpreter is deleted");
    }

    if (Tcl_IsSafe(ptr->ip)) {
        return Qtrue;
    } else {
        return Qfalse;
    }
}

/* allow_ruby_exit? */
static VALUE
ip_allow_ruby_exit_p(self)
    VALUE self;
{
    struct tcltkip *ptr = get_ip(self);

    /* ip is deleted? */
    if (deleted_ip(ptr)) {
        rb_raise(rb_eRuntimeError, "interpreter is deleted");
    }

    if (ptr->allow_ruby_exit) {
        return Qtrue;
    } else {
        return Qfalse;
    }
}

/* allow_ruby_exit = mode */
static VALUE
ip_allow_ruby_exit_set(self, val)
    VALUE self, val;
{
    struct tcltkip *ptr = get_ip(self);
    Tk_Window mainWin;

    rb_secure(4);

    /* ip is deleted? */
    if (deleted_ip(ptr)) {
        rb_raise(rb_eRuntimeError, "interpreter is deleted");
    }

    if (Tcl_IsSafe(ptr->ip)) {
        rb_raise(rb_eSecurityError,
                 "insecure operation on a safe interpreter");
    }

    mainWin = (tk_stubs_init_p())? Tk_MainWindow(ptr->ip): (Tk_Window)NULL;

    if (RTEST(val)) {
        ptr->allow_ruby_exit = 1;
#if TCL_MAJOR_VERSION >= 8
        DUMP1("Tcl_CreateObjCommand(\"exit\") --> \"ruby_exit\"");
        Tcl_CreateObjCommand(ptr->ip, "exit", ip_RubyExitObjCmd,
                             (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
#else /* TCL_MAJOR_VERSION < 8 */
        DUMP1("Tcl_CreateCommand(\"exit\") --> \"ruby_exit\"");
        Tcl_CreateCommand(ptr->ip, "exit", ip_RubyExitCommand,
                          (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
#endif
        return Qtrue;

    } else {
        ptr->allow_ruby_exit = 0;
#if TCL_MAJOR_VERSION >= 8
        DUMP1("Tcl_CreateObjCommand(\"exit\") --> \"interp_exit\"");
        Tcl_CreateObjCommand(ptr->ip, "exit", ip_InterpExitObjCmd,
                             (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
#else /* TCL_MAJOR_VERSION < 8 */
        DUMP1("Tcl_CreateCommand(\"exit\") --> \"interp_exit\"");
        Tcl_CreateCommand(ptr->ip, "exit", ip_InterpExitCommand,
                          (ClientData)mainWin, (Tcl_CmdDeleteProc *)NULL);
#endif
        return Qfalse;
    }
}

/* delete interpreter */
static VALUE
ip_delete(self)
    VALUE self;
{
    int  thr_crit_bup;
    struct tcltkip *ptr = get_ip(self);

    if (ptr == (struct tcltkip *)NULL || ptr->ip == (Tcl_Interp*)NULL) {
        DUMP1("delete deleted IP");
        return Qnil;
    }

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

    DUMP1("call ip_finalize");
    ip_finalize(ptr->ip);

    DUMP1("delete interp");
    Tcl_DeleteInterp(ptr->ip);
    Tcl_Release(ptr->ip);

    ptr->ip = (Tcl_Interp*)NULL;

    rb_thread_critical = thr_crit_bup;

    return Qnil;
}

/* is deleted? */
static VALUE
ip_has_invalid_namespace_p(self)
    VALUE self;
{
    struct tcltkip *ptr = get_ip(self);

    if (ptr == (struct tcltkip *)NULL || ptr->ip == (Tcl_Interp *)NULL) {
        /* deleted IP */
        return Qtrue;
    }

#if TCL_NAMESPACE_DEBUG
    if (rbtk_invalid_namespace(ptr)) {
        return Qtrue;
    } else {
        return Qfalse;
    }
#else
    return Qfalse;
#endif
}

static VALUE
ip_is_deleted_p(self)
    VALUE self;
{
    struct tcltkip *ptr = get_ip(self);

    if (deleted_ip(ptr)) {
        return Qtrue;
    } else {
        return Qfalse;
    }
}

static VALUE
ip_has_mainwindow_p(self)
    VALUE self;
{
    struct tcltkip *ptr = get_ip(self);

    if (deleted_ip(ptr) || !tk_stubs_init_p()) {
        return Qnil;
    } else if (Tk_MainWindow(ptr->ip) == (Tk_Window)NULL) {
        return Qfalse;
    } else {
        return Qtrue;
    }
}

/*** ruby string <=> tcl object ***/
#if TCL_MAJOR_VERSION >= 8
static VALUE
get_str_from_obj(obj)
    Tcl_Obj *obj;
{
    int len, binary = 0;
    const char *s;
    volatile VALUE str;

#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0
    s = Tcl_GetStringFromObj(obj, &len);
#else /* TCL_VERSION >= 8.1 */
    if (Tcl_GetCharLength(obj) != Tcl_UniCharLen(Tcl_GetUnicode(obj))) {
        /* possibly binary string */
        s = Tcl_GetByteArrayFromObj(obj, &len);
        binary = 1;
    } else {
        /* possibly text string */
        s = Tcl_GetStringFromObj(obj, &len);
    }
#endif
    str = s ? rb_str_new(s, len) : rb_str_new2("");
    if (binary) rb_ivar_set(str, ID_at_enc, rb_str_new2("binary"));
    return str;
}

static Tcl_Obj *
get_obj_from_str(str)
    VALUE str;
{
    const char *s = StringValuePtr(str);

#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0
    return Tcl_NewStringObj((char*)s, RSTRING(str)->len);
#else /* TCL_VERSION >= 8.1 */
    VALUE enc = rb_attr_get(str, ID_at_enc);

    if (!NIL_P(enc)) {
        StringValue(enc);
        if (strcmp(RSTRING(enc)->ptr, "binary") == 0) {
            /* binary string */
            return Tcl_NewByteArrayObj(s, RSTRING(str)->len);
        } else {
            /* text string */
            return Tcl_NewStringObj(s, RSTRING(str)->len);
        }
    } else if (strlen(s) != RSTRING(str)->len) {
        /* probably binary string */
        return Tcl_NewByteArrayObj(s, RSTRING(str)->len);
    } else {
        /* probably text string */
        return Tcl_NewStringObj(s, RSTRING(str)->len);
    }
#endif
}
#endif /* ruby string <=> tcl object */

static VALUE
ip_get_result_string_obj(interp)
    Tcl_Interp *interp;
{
#if TCL_MAJOR_VERSION >= 8
    Tcl_Obj *retObj;
    volatile VALUE strval;

    retObj = Tcl_GetObjResult(interp);
    Tcl_IncrRefCount(retObj);
    strval = get_str_from_obj(retObj);
    OBJ_TAINT(strval);
    Tcl_DecrRefCount(retObj);
    return strval;
#else
    return rb_tainted_str_new2(interp->result);
#endif
}

/* call Tcl/Tk functions on the eventloop thread */
static VALUE
callq_safelevel_handler(arg, callq)
    VALUE arg;
    VALUE callq;
{
    struct call_queue *q;

    Data_Get_Struct(callq, struct call_queue, q);
    DUMP2("(safe-level handler) $SAFE = %d", q->safe_level);
    rb_set_safe_level(q->safe_level);
    return((q->func)(q->interp, q->argc, q->argv));
}

static int call_queue_handler _((Tcl_Event *, int));
static int
call_queue_handler(evPtr, flags)
    Tcl_Event *evPtr;
    int flags;
{
    struct call_queue *q = (struct call_queue *)evPtr;
    volatile VALUE ret;
    volatile VALUE q_dat;
    struct tcltkip *ptr;

    DUMP2("do_call_queue_handler : evPtr = %p", evPtr);
    DUMP2("queue_handler thread : %lx", rb_thread_current());
    DUMP2("added by thread : %lx", q->thread);

    if (*(q->done)) {
        DUMP1("processed by another event-loop");
        return 0;
    } else {
        DUMP1("process it on current event-loop");
    }

    /* process it */
    *(q->done) = 1;

    /* deleted ipterp ? */
    ptr = get_ip(q->interp);
    if (deleted_ip(ptr)) {
        /* deleted IP --> ignore */
        return 1;
    }

    /* check safe-level */
    if (rb_safe_level() != q->safe_level) {
        /* q_dat = Data_Wrap_Struct(rb_cData,0,0,q); */
        q_dat = Data_Wrap_Struct(rb_cData,call_queue_mark,0,q);
        ret = rb_funcall(rb_proc_new(callq_safelevel_handler, q_dat),
                         ID_call, 0);
        rb_gc_force_recycle(q_dat);
    } else {
        DUMP2("call function (for caller thread:%lx)", q->thread);
        DUMP2("call function (current thread:%lx)", rb_thread_current());
        ret = (q->func)(q->interp, q->argc, q->argv);
    }

    /* set result */
    RARRAY(q->result)->ptr[0] = ret;

    /* complete */
    *(q->done) = -1;

    /* back to caller */
    DUMP2("back to caller (caller thread:%lx)", q->thread);
    DUMP2("               (current thread:%lx)", rb_thread_current());
    rb_thread_run(q->thread);
    DUMP1("finish back to caller");

    /* end of handler : remove it */
    return 1;
}

static VALUE
tk_funcall(func, argc, argv, obj)
    VALUE (*func)();
    int argc;
    VALUE *argv;
    VALUE obj;
{
    struct call_queue *callq;
    int  *alloc_done;
    int  thr_crit_bup;
    volatile VALUE current = rb_thread_current();
    volatile VALUE ip_obj = obj;
    volatile VALUE result;
    volatile VALUE ret;

    if (!NIL_P(ip_obj) && deleted_ip(get_ip(ip_obj))) {
        return Qnil;
    }

    if (NIL_P(eventloop_thread) || current == eventloop_thread) {
        if (NIL_P(eventloop_thread)) {
            DUMP2("tk_funcall from thread:%lx but no eventloop", current);
        } else {
            DUMP2("tk_funcall from current eventloop %lx", current);
        }
        result = (func)(ip_obj, argc, argv);
        if (rb_obj_is_kind_of(result, rb_eException)) {
            rb_exc_raise(result);
        }
        return result;
    }

    DUMP2("tk_funcall from thread %lx (NOT current eventloop)", current);

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

    /* allocate memory (argv cross over thread : must be in heap) */
    if (argv) {
        VALUE *temp = ALLOC_N(VALUE, argc);
        MEMCPY(temp, argv, VALUE, argc);
        argv = temp;
    }

    /* allocate memory (keep result) */
    alloc_done = (int*)ALLOC(int);
    *alloc_done = 0;

    /* allocate memory (freed by Tcl_ServiceEvent) */
    callq = (struct call_queue *)Tcl_Alloc(sizeof(struct call_queue));
    Tcl_Preserve(callq);

    /* allocate result obj */
    result = rb_ary_new2(1);
    RARRAY(result)->ptr[0] = Qnil;
    RARRAY(result)->len = 1;

    /* construct event data */
    callq->done = alloc_done;
    callq->func = func;
    callq->argc = argc;
    callq->argv = argv;
    callq->interp = ip_obj;
    callq->result = result;
    callq->thread = current;
    callq->safe_level = rb_safe_level();
    callq->ev.proc = call_queue_handler;

    /* add the handler to Tcl event queue */
    DUMP1("add handler");
    Tcl_QueueEvent(&(callq->ev), TCL_QUEUE_HEAD);

    rb_thread_critical = thr_crit_bup;

    /* wait for the handler to be processed */
    DUMP2("wait for handler (current thread:%lx)", current);
    while(*alloc_done >= 0) {
        rb_thread_stop();
    }
    DUMP2("back from handler (current thread:%lx)", current);

    /* get result & free allocated memory */
    ret = RARRAY(result)->ptr[0];
    free(alloc_done);
    if (argv) free(argv);

    Tcl_Release(callq);

    /* exception? */
    if (rb_obj_is_kind_of(ret, rb_eException)) {
        DUMP1("raise exception");
        rb_exc_raise(ret);
    }

    DUMP1("exit tk_funcall");
    return ret;
}

/* eval string in tcl by Tcl_Eval() */
#if TCL_MAJOR_VERSION >= 8
struct call_eval_info {
    struct tcltkip *ptr;
    Tcl_Obj *cmd;
};

static VALUE
call_tcl_eval(arg)
    VALUE arg;
{
    struct call_eval_info *inf = (struct call_eval_info *)arg;

    inf->ptr->return_value = Tcl_EvalObj(inf->ptr->ip, inf->cmd);

    return Qnil;
}
#endif

static VALUE
ip_eval_real(self, cmd_str, cmd_len)
    VALUE self;
    char *cmd_str;
    int  cmd_len;
{
    volatile VALUE ret;
    struct tcltkip *ptr = get_ip(self);
    int thr_crit_bup;

#if TCL_MAJOR_VERSION >= 8
    /* call Tcl_EvalObj() */
    {
      Tcl_Obj *cmd;

      thr_crit_bup = rb_thread_critical;
      rb_thread_critical = Qtrue;

      cmd = Tcl_NewStringObj(cmd_str, cmd_len);
      Tcl_IncrRefCount(cmd);

      /* ip is deleted? */
      if (deleted_ip(ptr)) {
          Tcl_DecrRefCount(cmd);
          rb_thread_critical = thr_crit_bup;
          ptr->return_value = TCL_OK;
          return rb_tainted_str_new2("");
      } else {
          int status;
          struct call_eval_info inf;

          /* Tcl_Preserve(ptr->ip); */
          rbtk_preserve_ip(ptr);

#if 0
          ptr->return_value = Tcl_EvalObj(ptr->ip, cmd);
          /* ptr->return_value = Tcl_GlobalEvalObj(ptr->ip, cmd); */
#else
          inf.ptr = ptr;
          inf.cmd = cmd;
          ret = rb_protect(call_tcl_eval, (VALUE)&inf, &status);
          switch(status) {
          case TAG_RAISE:
              if (NIL_P(ruby_errinfo)) {
                  rbtk_pending_exception = rb_exc_new2(rb_eException,
                                                       "unknown exception");
              } else {
                  rbtk_pending_exception = ruby_errinfo;
              }
              break;

          case TAG_FATAL:
              if (NIL_P(ruby_errinfo)) {
                  rbtk_pending_exception = rb_exc_new2(rb_eFatal, "FATAL");
              } else {
                  rbtk_pending_exception = ruby_errinfo;
              }
          }
#endif
      }

      Tcl_DecrRefCount(cmd);

    }

    if (pending_exception_check1(thr_crit_bup, ptr)) {
        rbtk_release_ip(ptr);
        return rbtk_pending_exception;
    }

    if (ptr->return_value == TCL_ERROR) {
        if (event_loop_abort_on_exc > 0 && !Tcl_InterpDeleted(ptr->ip)) {
            volatile VALUE exc;
            exc = create_ip_exc(self, rb_eRuntimeError,
                                "%s", Tcl_GetStringResult(ptr->ip));
            rbtk_release_ip(ptr);
            rb_thread_critical = thr_crit_bup;
            return exc;
        } else {
            if (event_loop_abort_on_exc < 0) {
                rb_warning("%s (ignore)", Tcl_GetStringResult(ptr->ip));
            } else {
                rb_warn("%s (ignore)", Tcl_GetStringResult(ptr->ip));
            }
            Tcl_ResetResult(ptr->ip);
            rbtk_release_ip(ptr);
            rb_thread_critical = thr_crit_bup;
            return rb_tainted_str_new2("");
        }
    }

    /* pass back the result (as string) */
    ret =  ip_get_result_string_obj(ptr->ip);
    rbtk_release_ip(ptr);
    rb_thread_critical = thr_crit_bup;
    return ret;

#else /* TCL_MAJOR_VERSION < 8 */
    DUMP2("Tcl_Eval(%s)", cmd_str);

    /* ip is deleted? */
    if (deleted_ip(ptr)) {
        ptr->return_value = TCL_OK;
        return rb_tainted_str_new2("");
    } else {
        /* Tcl_Preserve(ptr->ip); */
        rbtk_preserve_ip(ptr);
        ptr->return_value = Tcl_Eval(ptr->ip, cmd_str);
        /* ptr->return_value = Tcl_GlobalEval(ptr->ip, cmd_str); */
    }

    if (pending_exception_check1(thr_crit_bup, ptr)) {
        rbtk_release_ip(ptr);
        return rbtk_pending_exception;
    }

    if (ptr->return_value == TCL_ERROR) {
        volatile VALUE exc;

        exc = create_ip_exc(self, rb_eRuntimeError, "%s", ptr->ip->result);

        rbtk_release_ip(ptr);
        return exc;
    }
    DUMP2("(TCL_Eval result) %d", ptr->return_value);

    /* pass back the result (as string) */
    ret =  ip_get_result_string_obj(ptr->ip);
    rbtk_release_ip(ptr);
    return ret;
#endif
}

static VALUE
evq_safelevel_handler(arg, evq)
    VALUE arg;
    VALUE evq;
{
    struct eval_queue *q;

    Data_Get_Struct(evq, struct eval_queue, q);
    DUMP2("(safe-level handler) $SAFE = %d", q->safe_level);
    rb_set_safe_level(q->safe_level);
    return ip_eval_real(q->interp, q->str, q->len);
}

int eval_queue_handler _((Tcl_Event *, int));
int
eval_queue_handler(evPtr, flags)
    Tcl_Event *evPtr;
    int flags;
{
    struct eval_queue *q = (struct eval_queue *)evPtr;
    volatile VALUE ret;
    volatile VALUE q_dat;

    if (*(q->done)) {
        DUMP1("processed by another event-loop");
        return 0;
    } else {
        DUMP1("process it on current event-loop");
    }

    /* process it */
    *(q->done) = 1;

    /* check safe-level */
    if (rb_safe_level() != q->safe_level) {
#ifdef HAVE_NATIVETHREAD
        if (!is_ruby_native_thread()) {
            rb_bug("cross-thread violation on eval_queue_handler()");
        }
#endif
        /* q_dat = Data_Wrap_Struct(rb_cData,0,0,q); */
        q_dat = Data_Wrap_Struct(rb_cData,eval_queue_mark,0,q);
        ret = rb_funcall(rb_proc_new(evq_safelevel_handler, q_dat),
                         ID_call, 0);
        rb_gc_force_recycle(q_dat);
    } else {
        ret = ip_eval_real(q->interp, q->str, q->len);
    }

    /* set result */
    RARRAY(q->result)->ptr[0] = ret;

    /* complete */
    *(q->done) = -1;

    /* back to caller */
    DUMP2("back to caller (caller thread:%lx)", q->thread);
    DUMP2("               (current thread:%lx)", rb_thread_current());
    rb_thread_run(q->thread);
    DUMP1("finish back to caller");

    /* end of handler : remove it */
    return 1;
}

static VALUE
ip_eval(self, str)
    VALUE self;
    VALUE str;
{
    struct eval_queue *evq;
    char *eval_str;
    int  *alloc_done;
    int  thr_crit_bup;
    volatile VALUE current = rb_thread_current();
    volatile VALUE ip_obj = self;
    volatile VALUE result;
    volatile VALUE ret;
    Tcl_QueuePosition position;

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;
    StringValue(str);
    rb_thread_critical = thr_crit_bup;

    if (NIL_P(eventloop_thread) || current == eventloop_thread) {
        if (NIL_P(eventloop_thread)) {
            DUMP2("eval from thread:%lx but no eventloop", current);
        } else {
            DUMP2("eval from current eventloop %lx", current);
        }
        result = ip_eval_real(self, RSTRING(str)->ptr, RSTRING(str)->len);
        if (rb_obj_is_kind_of(result, rb_eException)) {
            rb_exc_raise(result);
        }
        return result;
    }

    DUMP2("eval from thread %lx (NOT current eventloop)", current);

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

    /* allocate memory (protected from Tcl_ServiceEvent) */
    alloc_done = (int*)ALLOC(int);
    *alloc_done = 0;

    eval_str = ALLOC_N(char, RSTRING(str)->len + 1);
    memcpy(eval_str, RSTRING(str)->ptr, RSTRING(str)->len);
    eval_str[RSTRING(str)->len] = 0;

    /* allocate memory (freed by Tcl_ServiceEvent) */
    evq = (struct eval_queue *)Tcl_Alloc(sizeof(struct eval_queue));
    Tcl_Preserve(evq);

    /* allocate result obj */
    result = rb_ary_new2(1);
    RARRAY(result)->ptr[0] = Qnil;
    RARRAY(result)->len = 1;

    /* construct event data */
    evq->done = alloc_done;
    evq->str = eval_str;
    evq->len = RSTRING(str)->len;
    evq->interp = ip_obj;
    evq->result = result;
    evq->thread = current;
    evq->safe_level = rb_safe_level();
    evq->ev.proc = eval_queue_handler;

    position = TCL_QUEUE_TAIL;

    /* add the handler to Tcl event queue */
    DUMP1("add handler");
    Tcl_QueueEvent(&(evq->ev), position);

    rb_thread_critical = thr_crit_bup;

    /* wait for the handler to be processed */
    DUMP2("wait for handler (current thread:%lx)", current);
    while(*alloc_done >= 0) {
        rb_thread_stop();
    }
    DUMP2("back from handler (current thread:%lx)", current);

    /* get result & free allocated memory */
    ret = RARRAY(result)->ptr[0];

    free(alloc_done);
    free(eval_str);
    Tcl_Release(evq);

    if (rb_obj_is_kind_of(ret, rb_eException)) {
        rb_exc_raise(ret);
    }

    return ret;
}

/* restart Tk */
static VALUE
lib_restart_core(interp, argc, argv)
    VALUE interp;
    int   argc;   /* dummy */
    VALUE *argv;  /* dummy */
{
    volatile VALUE exc;
    struct tcltkip *ptr = get_ip(interp);
    int  thr_crit_bup;

    /* rb_secure(4); */ /* already checked */

    /* tcl_stubs_check(); */ /* already checked */

    /* ip is deleted? */
    if (deleted_ip(ptr)) {
        return rb_exc_new2(rb_eRuntimeError, "interpreter is deleted");
    }

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

    /* Tcl_Preserve(ptr->ip); */
    rbtk_preserve_ip(ptr);

    /* destroy the root wdiget */
    ptr->return_value = Tcl_Eval(ptr->ip, "destroy .");
    /* ignore ERROR */
    DUMP2("(TCL_Eval result) %d", ptr->return_value);
    Tcl_ResetResult(ptr->ip);

#if TCL_MAJOR_VERSION >= 8
    /* delete namespace ( tested on tk8.4.5 ) */
    ptr->return_value = Tcl_Eval(ptr->ip, "namespace delete ::tk::msgcat");
    /* ignore ERROR */
    DUMP2("(TCL_Eval result) %d", ptr->return_value);
    Tcl_ResetResult(ptr->ip);
#endif

    /* delete trace proc ( tested on tk8.4.5 ) */
    ptr->return_value = Tcl_Eval(ptr->ip, "trace vdelete ::tk_strictMotif w ::tk::EventMotifBindings");
    /* ignore ERROR */
    DUMP2("(TCL_Eval result) %d", ptr->return_value);
    Tcl_ResetResult(ptr->ip);

    /* execute Tk_Init or Tk_SafeInit */
    exc = tcltkip_init_tk(interp);
    if (!NIL_P(exc)) {
        rb_thread_critical = thr_crit_bup;
        rbtk_release_ip(ptr);
        return exc;
    }

    /* Tcl_Release(ptr->ip); */
    rbtk_release_ip(ptr);

    rb_thread_critical = thr_crit_bup;

    /* return Qnil; */
    return interp;
}

static VALUE
lib_restart(self)
    VALUE self;
{
    struct tcltkip *ptr = get_ip(self);

    rb_secure(4);

    tcl_stubs_check();

    /* ip is deleted? */
    if (deleted_ip(ptr)) {
        rb_raise(rb_eRuntimeError, "interpreter is deleted");
    }

    return tk_funcall(lib_restart_core, 0, (VALUE*)NULL, self);
}

static VALUE
ip_restart(self)
    VALUE self;
{
    struct tcltkip *ptr = get_ip(self);

    rb_secure(4);

    tcl_stubs_check();

    /* ip is deleted? */
    if (deleted_ip(ptr)) {
        rb_raise(rb_eRuntimeError, "interpreter is deleted");
    }

    if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) {
        /* slave IP */
        return Qnil;
    }
    return lib_restart(self);
}

static VALUE
lib_toUTF8_core(ip_obj, src, encodename)
    VALUE ip_obj;
    VALUE src;
    VALUE encodename;
{
    volatile VALUE str = src;

#ifdef TCL_UTF_MAX
    Tcl_Interp *interp;
    Tcl_Encoding encoding;
    Tcl_DString dstr;
    int taint_flag = OBJ_TAINTED(str);
    struct tcltkip *ptr;
    char *buf;
    int thr_crit_bup;
#endif

    tcl_stubs_check();

    if (NIL_P(src)) {
      return rb_str_new2("");
    }

#ifdef TCL_UTF_MAX
    if (NIL_P(ip_obj)) {
        interp = (Tcl_Interp *)NULL;
    } else {
        ptr = get_ip(ip_obj);

        /* ip is deleted? */
        if (deleted_ip(ptr)) {
            interp = (Tcl_Interp *)NULL;
        } else {
            interp = ptr->ip;
        }
    }

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

    if (NIL_P(encodename)) {
        if (TYPE(str) == T_STRING) {
            volatile VALUE enc;
            enc = rb_attr_get(str, ID_at_enc);
            if (NIL_P(enc)) {
                if (NIL_P(ip_obj)) {
                    encoding = (Tcl_Encoding)NULL;
                } else {
                    enc = rb_attr_get(ip_obj, ID_at_enc);
                    if (NIL_P(enc)) {
                        encoding = (Tcl_Encoding)NULL;
                    } else {
                        StringValue(enc);
                        encoding = Tcl_GetEncoding(interp, RSTRING(enc)->ptr);
                        if (encoding == (Tcl_Encoding)NULL) {
                            rb_warning("Tk-interp has unknown encoding information (@encoding:'%s')", RSTRING(enc)->ptr);
                        }
                    }
                }
            } else {
                StringValue(enc);
                if (strcmp(RSTRING(enc)->ptr, "binary") == 0) {
                    rb_thread_critical = thr_crit_bup;
                    return str;
                }
                encoding = Tcl_GetEncoding(interp, RSTRING(enc)->ptr);
                if (encoding == (Tcl_Encoding)NULL) {
                    rb_warning("string has unknown encoding information (@encoding:'%s')", RSTRING(enc)->ptr);
                }
            }
        } else {
            encoding = (Tcl_Encoding)NULL;
        }
    } else {
        StringValue(encodename);
        encoding = Tcl_GetEncoding(interp, RSTRING(encodename)->ptr);
        if (encoding == (Tcl_Encoding)NULL) {
            /*
            rb_warning("unknown encoding name '%s'",
                       RSTRING(encodename)->ptr);
            */
            rb_raise(rb_eArgError, "unknown encoding name '%s'",
                     RSTRING(encodename)->ptr);
        }
    }

    StringValue(str);
    if (!RSTRING(str)->len) {
        rb_thread_critical = thr_crit_bup;
        return str;
    }
    buf = ALLOC_N(char,(RSTRING(str)->len)+1);
    memcpy(buf, RSTRING(str)->ptr, RSTRING(str)->len);
    buf[RSTRING(str)->len] = 0;

    Tcl_DStringInit(&dstr);
    Tcl_DStringFree(&dstr);
    /* Tcl_ExternalToUtfDString(encoding,buf,strlen(buf),&dstr); */
    Tcl_ExternalToUtfDString(encoding, buf, RSTRING(str)->len, &dstr);

    /* str = rb_tainted_str_new2(Tcl_DStringValue(&dstr)); */
    /* str = rb_str_new2(Tcl_DStringValue(&dstr)); */
    str = rb_str_new(Tcl_DStringValue(&dstr), Tcl_DStringLength(&dstr));
    rb_ivar_set(str, ID_at_enc, rb_tainted_str_new2("utf-8"));
    if (taint_flag) OBJ_TAINT(str);

    if (encoding != (Tcl_Encoding)NULL) {
        Tcl_FreeEncoding(encoding);
    }
    Tcl_DStringFree(&dstr);

    free(buf);

    rb_thread_critical = thr_crit_bup;
#endif

    return str;
}

static VALUE
lib_toUTF8(argc, argv, self)
    int   argc;
    VALUE *argv;
    VALUE self;
{
    VALUE str, encodename;

    if (rb_scan_args(argc, argv, "11", &str, &encodename) == 1) {
        encodename = Qnil;
    }
    return lib_toUTF8_core(Qnil, str, encodename);
}

static VALUE
ip_toUTF8(argc, argv, self)
    int   argc;
    VALUE *argv;
    VALUE self;
{
    VALUE str, encodename;

    if (rb_scan_args(argc, argv, "11", &str, &encodename) == 1) {
        encodename = Qnil;
    }
    return lib_toUTF8_core(self, str, encodename);
}

static VALUE
lib_fromUTF8_core(ip_obj, src, encodename)
    VALUE ip_obj;
    VALUE src;
    VALUE encodename;
{
    volatile VALUE str = src;

#ifdef TCL_UTF_MAX
    Tcl_Interp *interp;
    Tcl_Encoding encoding;
    Tcl_DString dstr;
    int taint_flag = OBJ_TAINTED(str);
    char *buf;
    int thr_crit_bup;
#endif

    tcl_stubs_check();

    if (NIL_P(src)) {
      return rb_str_new2("");
    }

#ifdef TCL_UTF_MAX
    if (NIL_P(ip_obj)) {
        interp = (Tcl_Interp *)NULL;
    } else if (get_ip(ip_obj) == (struct tcltkip *)NULL) {
        interp = (Tcl_Interp *)NULL;
    } else {
        interp = get_ip(ip_obj)->ip;
    }

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

    if (NIL_P(encodename)) {
        volatile VALUE enc;

        if (TYPE(str) == T_STRING) {
            enc = rb_attr_get(str, ID_at_enc);
            if (!NIL_P(enc)) {
                StringValue(enc);
                if (strcmp(RSTRING(enc)->ptr, "binary") == 0) {
                    rb_thread_critical = thr_crit_bup;
                    return str;
                }
            }
        }

        if (NIL_P(ip_obj)) {
            encoding = (Tcl_Encoding)NULL;
        } else {
            enc = rb_attr_get(ip_obj, ID_at_enc);
            if (NIL_P(enc)) {
                encoding = (Tcl_Encoding)NULL;
            } else {
                StringValue(enc);
                encoding = Tcl_GetEncoding(interp, RSTRING(enc)->ptr);
                if (encoding == (Tcl_Encoding)NULL) {
                    rb_warning("Tk-interp has unknown encoding information (@encoding:'%s')", RSTRING(enc)->ptr);
                } else {
                  encodename = rb_obj_dup(enc);
                }
            }
        }

    } else {
        StringValue(encodename);

        if (strcmp(RSTRING(encodename)->ptr, "binary") == 0) {
            char *s;
            int  len;

            s = Tcl_GetByteArrayFromObj(Tcl_NewStringObj(RSTRING(str)->ptr,
                                                         RSTRING(str)->len),
                                        &len);
            str = rb_tainted_str_new(s, len);
            rb_ivar_set(str, ID_at_enc, rb_tainted_str_new2("binary"));

            rb_thread_critical = thr_crit_bup;
            return str;
        }

        encoding = Tcl_GetEncoding(interp, RSTRING(encodename)->ptr);
        if (encoding == (Tcl_Encoding)NULL) {
            /*
            rb_warning("unknown encoding name '%s'",
                       RSTRING(encodename)->ptr);
            encodename = Qnil;
            */
            rb_raise(rb_eArgError, "unknown encoding name '%s'",
                     RSTRING(encodename)->ptr);
        }
    }

    StringValue(str);

    if (RSTRING(str)->len == 0) {
        rb_thread_critical = thr_crit_bup;
        return rb_tainted_str_new2("");
    }

    buf = ALLOC_N(char,strlen(RSTRING(str)->ptr)+1);
    memcpy(buf, RSTRING(str)->ptr, RSTRING(str)->len);
    buf[RSTRING(str)->len] = 0;

    Tcl_DStringInit(&dstr);
    Tcl_DStringFree(&dstr);
    /* Tcl_UtfToExternalDString(encoding,buf,strlen(buf),&dstr); */
    Tcl_UtfToExternalDString(encoding,buf,RSTRING(str)->len,&dstr);

    /* str = rb_tainted_str_new2(Tcl_DStringValue(&dstr)); */
    /* str = rb_str_new2(Tcl_DStringValue(&dstr)); */
    str = rb_str_new(Tcl_DStringValue(&dstr), Tcl_DStringLength(&dstr));
    rb_ivar_set(str, ID_at_enc, encodename);

    if (taint_flag) OBJ_TAINT(str);

    if (encoding != (Tcl_Encoding)NULL) {
        Tcl_FreeEncoding(encoding);
    }
    Tcl_DStringFree(&dstr);

    free(buf);

    rb_thread_critical = thr_crit_bup;
#endif

    return str;
}

static VALUE
lib_fromUTF8(argc, argv, self)
    int   argc;
    VALUE *argv;
    VALUE self;
{
    VALUE str, encodename;

    if (rb_scan_args(argc, argv, "11", &str, &encodename) == 1) {
        encodename = Qnil;
    }
    return lib_fromUTF8_core(Qnil, str, encodename);
}

static VALUE
ip_fromUTF8(argc, argv, self)
    int   argc;
    VALUE *argv;
    VALUE self;
{
    VALUE str, encodename;

    if (rb_scan_args(argc, argv, "11", &str, &encodename) == 1) {
        encodename = Qnil;
    }
    return lib_fromUTF8_core(self, str, encodename);
}

static VALUE
lib_UTF_backslash_core(self, str, all_bs)
    VALUE self;
    VALUE str;
    int all_bs;
{
#ifdef TCL_UTF_MAX
    char *src_buf, *dst_buf, *ptr;
    int read_len = 0, dst_len = 0;
    int taint_flag = OBJ_TAINTED(str);
    int thr_crit_bup;

    tcl_stubs_check();

    StringValue(str);
    if (!RSTRING(str)->len) {
        return str;
    }

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

    src_buf = ALLOC_N(char,(RSTRING(str)->len)+1);
    memcpy(src_buf, RSTRING(str)->ptr, RSTRING(str)->len);
    src_buf[RSTRING(str)->len] = 0;

    dst_buf = ALLOC_N(char,(RSTRING(str)->len)+1);

    ptr = src_buf;
    while(RSTRING(str)->len > ptr - src_buf) {
        if (*ptr == '\\' && (all_bs || *(ptr + 1) == 'u')) {
            dst_len += Tcl_UtfBackslash(ptr, &read_len, (dst_buf + dst_len));
            ptr += read_len;
        } else {
            *(dst_buf + (dst_len++)) = *(ptr++);
        }
    }

    str = rb_str_new(dst_buf, dst_len);
    if (taint_flag) OBJ_TAINT(str);

    free(src_buf);
    free(dst_buf);

    rb_thread_critical = thr_crit_bup;
#endif

    return str;
}

static VALUE
lib_UTF_backslash(self, str)
    VALUE self;
    VALUE str;
{
    return lib_UTF_backslash_core(self, str, 0);
}

static VALUE
lib_Tcl_backslash(self, str)
    VALUE self;
    VALUE str;
{
    return lib_UTF_backslash_core(self, str, 1);
}

static VALUE
lib_get_system_encoding(self)
    VALUE self;
{
#if TCL_MAJOR_VERSION > 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION > 0)
    tcl_stubs_check();
    return rb_str_new2(Tcl_GetEncodingName((Tcl_Encoding)NULL));
#else
    return Qnil;
#endif
}

static VALUE
lib_set_system_encoding(self, enc_name)
    VALUE self;
    VALUE enc_name;
{
#if TCL_MAJOR_VERSION > 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION > 0)
    tcl_stubs_check();

    if (NIL_P(enc_name)) {
        Tcl_SetSystemEncoding((Tcl_Interp *)NULL, (CONST char *)NULL);
        return lib_get_system_encoding(self);
    }

    enc_name = rb_funcall(enc_name, ID_to_s, 0, 0);
    if (Tcl_SetSystemEncoding((Tcl_Interp *)NULL,
                              RSTRING(enc_name)->ptr) != TCL_OK) {
        rb_raise(rb_eArgError, "unknown encoding name '%s'",
                 RSTRING(enc_name)->ptr);
    }

    return enc_name;
#else
    return Qnil;
#endif
}

/* invoke Tcl proc */
struct invoke_info {
    struct tcltkip *ptr;
    Tcl_CmdInfo cmdinfo;
#if TCL_MAJOR_VERSION >= 8
    int objc;
    Tcl_Obj **objv;
#else
    int argc;
    char **argv;
#endif
};

static VALUE
invoke_tcl_proc(arg)
    VALUE arg;
{
    struct invoke_info *inf = (struct invoke_info *)arg;
    int i, len;
#if TCL_MAJOR_VERSION >= 8
    int argc = inf->objc;
    char **argv = (char **)NULL;
#endif

    /* memory allocation for arguments of this command */
#if TCL_MAJOR_VERSION >= 8
    if (!inf->cmdinfo.isNativeObjectProc) {
        /* string interface */
        argv = (char **)ALLOC_N(char *, argc+1);
        for (i = 0; i < argc; ++i) {
            argv[i] = Tcl_GetStringFromObj(inf->objv[i], &len);
        }
        argv[argc] = (char *)NULL;
    }
#endif

    Tcl_ResetResult(inf->ptr->ip);

    /* Invoke the C procedure */
#if TCL_MAJOR_VERSION >= 8
    if (inf->cmdinfo.isNativeObjectProc) {
        inf->ptr->return_value
            = (*(inf->cmdinfo.objProc))(inf->cmdinfo.objClientData,
                                        inf->ptr->ip, inf->objc, inf->objv);
    }
    else
#endif
    {
#if TCL_MAJOR_VERSION >= 8
        inf->ptr->return_value
            = (*(inf->cmdinfo.proc))(inf->cmdinfo.clientData, inf->ptr->ip,
                                     argc, (CONST84 char **)argv);

        free(argv);

#else /* TCL_MAJOR_VERSION < 8 */
        inf->ptr->return_value
            = (*(inf->cmdinfo.proc))(inf->cmdinfo.clientData, inf->ptr->ip,
                                     inf->argc, inf->argv);
#endif
    }

    return Qnil;
}

#if TCL_MAJOR_VERSION >= 8
static VALUE
ip_invoke_core(interp, objc, objv)
    VALUE interp;
    int objc;
    Tcl_Obj **objv;
#else
static VALUE
ip_invoke_core(interp, argc, argv)
    VALUE interp;
    int argc;
    char **argv;
#endif
{
    struct tcltkip *ptr;
    Tcl_CmdInfo info;
    char *cmd;
    int  len;
    int  thr_crit_bup;
    int unknown_flag = 0;

#if 1 /* wrap tcl-proc call */
    struct invoke_info inf;
    int status;
    VALUE ret;
#else
#if TCL_MAJOR_VERSION >= 8
    int argc = objc;
    char **argv = (char **)NULL;
    /* Tcl_Obj *resultPtr; */
#endif
#endif

    /* get the command name string */
#if TCL_MAJOR_VERSION >= 8
    cmd = Tcl_GetStringFromObj(objv[0], &len);
#else /* TCL_MAJOR_VERSION < 8 */
    cmd = argv[0];
#endif

    /* get the data struct */
    ptr = get_ip(interp);

    /* ip is deleted? */
    if (deleted_ip(ptr)) {
        return rb_tainted_str_new2("");
    }

    /* Tcl_Preserve(ptr->ip); */
    rbtk_preserve_ip(ptr);

    /* map from the command name to a C procedure */
    DUMP2("call Tcl_GetCommandInfo, %s", cmd);
    if (!Tcl_GetCommandInfo(ptr->ip, cmd, &info)) {
        DUMP1("error Tcl_GetCommandInfo");
        DUMP1("try auto_load (call 'unknown' command)");
        if (!Tcl_GetCommandInfo(ptr->ip,
#if TCL_MAJOR_VERSION >= 8
                                "::unknown",
#else
                                "unknown",
#endif
                                &info)) {
            DUMP1("fail to get 'unknown' command");
            /* if (event_loop_abort_on_exc || cmd[0] != '.') { */
            if (event_loop_abort_on_exc > 0) {
                /* Tcl_Release(ptr->ip); */
                rbtk_release_ip(ptr);
                /*rb_ip_raise(obj,rb_eNameError,"invalid command name `%s'",cmd);*/
                return create_ip_exc(interp, rb_eNameError,
                                     "invalid command name `%s'", cmd);
            } else {
                if (event_loop_abort_on_exc < 0) {
                    rb_warning("invalid command name `%s' (ignore)", cmd);
                } else {
                    rb_warn("invalid command name `%s' (ignore)", cmd);
                }
                Tcl_ResetResult(ptr->ip);
                /* Tcl_Release(ptr->ip); */
                rbtk_release_ip(ptr);
                return rb_tainted_str_new2("");
            }
        } else {
#if TCL_MAJOR_VERSION >= 8
            Tcl_Obj **unknown_objv;
#else
            char **unknown_argv;
#endif
            DUMP1("find 'unknown' command -> set arguemnts");
            unknown_flag = 1;

#if TCL_MAJOR_VERSION >= 8
            unknown_objv = (Tcl_Obj **)ALLOC_N(Tcl_Obj *, objc+2);
            unknown_objv[0] = Tcl_NewStringObj("::unknown", 9);
            Tcl_IncrRefCount(unknown_objv[0]);
            memcpy(unknown_objv + 1, objv, sizeof(Tcl_Obj *)*objc);
            unknown_objv[++objc] = (Tcl_Obj*)NULL;
            objv = unknown_objv;
#else
            unknown_argv = (char **)ALLOC_N(char *, argc+2);
            unknown_argv[0] = strdup("unknown");
            memcpy(unknown_argv + 1, argv, sizeof(char *)*argc);
            unknown_argv[++argc] = (char *)NULL;
            argv = unknown_argv;
#endif
        }
    }
    DUMP1("end Tcl_GetCommandInfo");

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

#if 1 /* wrap tcl-proc call */
    /* setup params */
    inf.ptr = ptr;
    inf.cmdinfo = info;
#if TCL_MAJOR_VERSION >= 8
    inf.objc = objc;
    inf.objv = objv;
#else
    inf.argc = argc;
    inf.argv = argv;
#endif

    /* invoke tcl-proc */
    ret = rb_protect(invoke_tcl_proc, (VALUE)&inf, &status);
    switch(status) {
    case TAG_RAISE:
        if (NIL_P(ruby_errinfo)) {
            rbtk_pending_exception = rb_exc_new2(rb_eException,
                                                 "unknown exception");
        } else {
            rbtk_pending_exception = ruby_errinfo;
        }
        break;

    case TAG_FATAL:
        if (NIL_P(ruby_errinfo)) {
            rbtk_pending_exception = rb_exc_new2(rb_eFatal, "FATAL");
        } else {
            rbtk_pending_exception = ruby_errinfo;
        }
    }

#else /* !wrap tcl-proc call */

    /* memory allocation for arguments of this command */
#if TCL_MAJOR_VERSION >= 8
    if (!info.isNativeObjectProc) {
        int i;

        /* string interface */
        argv = (char **)ALLOC_N(char *, argc+1);
        for (i = 0; i < argc; ++i) {
            argv[i] = Tcl_GetStringFromObj(objv[i], &len);
        }
        argv[argc] = (char *)NULL;
    }
#endif

    Tcl_ResetResult(ptr->ip);

    /* Invoke the C procedure */
#if TCL_MAJOR_VERSION >= 8
    if (info.isNativeObjectProc) {
        ptr->return_value = (*info.objProc)(info.objClientData, ptr->ip,
                                            objc, objv);
#if 0
        /* get the string value from the result object */
        resultPtr = Tcl_GetObjResult(ptr->ip);
        Tcl_SetResult(ptr->ip, Tcl_GetStringFromObj(resultPtr, &len),
                      TCL_VOLATILE);
#endif
    }
    else
#endif
    {
#if TCL_MAJOR_VERSION >= 8
        ptr->return_value = (*info.proc)(info.clientData, ptr->ip,
                                         argc, (CONST84 char **)argv);

        free(argv);

#else /* TCL_MAJOR_VERSION < 8 */
        ptr->return_value = (*info.proc)(info.clientData, ptr->ip,
                                         argc, argv);
#endif
    }
#endif /* ! wrap tcl-proc call */

    /* free allocated memory for calling 'unknown' command */
    if (unknown_flag) {
#if TCL_MAJOR_VERSION >= 8
        Tcl_DecrRefCount(objv[0]);
        free(objv);
#else
        free(argv[0]);
        free(argv);
#endif
    }

    /* exception on mainloop */
    if (pending_exception_check1(thr_crit_bup, ptr)) {
        return rbtk_pending_exception;
    }

    rb_thread_critical = thr_crit_bup;

    if (ptr->return_value == TCL_ERROR) {
        if (event_loop_abort_on_exc > 0 && !Tcl_InterpDeleted(ptr->ip)) {

            return create_ip_exc(interp, rb_eRuntimeError,
                                 "%s", Tcl_GetStringResult(ptr->ip));
        } else {
            if (event_loop_abort_on_exc < 0) {
                rb_warning("%s (ignore)", Tcl_GetStringResult(ptr->ip));
            } else {
                rb_warn("%s (ignore)", Tcl_GetStringResult(ptr->ip));
            }
            Tcl_ResetResult(ptr->ip);
            return rb_tainted_str_new2("");
        }
    }

    /* pass back the result (as string) */
    return ip_get_result_string_obj(ptr->ip);
}

#if TCL_MAJOR_VERSION >= 8
static Tcl_Obj **
#else /* TCL_MAJOR_VERSION < 8 */
static char **
#endif
alloc_invoke_arguments(argc, argv)
    int argc;
    VALUE *argv;
{
    int i;
    int thr_crit_bup;

#if TCL_MAJOR_VERSION >= 8
    Tcl_Obj **av;
#else /* TCL_MAJOR_VERSION < 8 */
    char **av;
#endif

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

    /* memory allocation */
#if TCL_MAJOR_VERSION >= 8
    av = ALLOC_N(Tcl_Obj *, argc+1);
    for (i = 0; i < argc; ++i) {
        av[i] = get_obj_from_str(argv[i]);
        Tcl_IncrRefCount(av[i]);
    }
    av[argc] = NULL;

#else /* TCL_MAJOR_VERSION < 8 */
    /* string interface */
    av = ALLOC_N(char *, argc+1);
    for (i = 0; i < argc; ++i) {
        av[i] = strdup(StringValuePtr(argv[i]));
    }
    av[argc] = NULL;
#endif

    rb_thread_critical = thr_crit_bup;

    return av;
}

static void
free_invoke_arguments(argc, av)
    int argc;
#if TCL_MAJOR_VERSION >= 8
    Tcl_Obj **av;
#else /* TCL_MAJOR_VERSION < 8 */
    char **av;
#endif
{
    int i;

    for (i = 0; i < argc; ++i) {
#if TCL_MAJOR_VERSION >= 8
        Tcl_DecrRefCount(av[i]);
#else /* TCL_MAJOR_VERSION < 8 */
        free(av[i]);
#endif
    }
    free(av);
}

static VALUE
ip_invoke_real(argc, argv, interp)
    int argc;
    VALUE *argv;
    VALUE interp;
{
    VALUE v;
    struct tcltkip *ptr;        /* tcltkip data struct */

#if TCL_MAJOR_VERSION >= 8
    Tcl_Obj **av = (Tcl_Obj **)NULL;
#else /* TCL_MAJOR_VERSION < 8 */
    char **av = (char **)NULL;
#endif

    DUMP2("invoke_real called by thread:%lx", rb_thread_current());

    /* get the data struct */
    ptr = get_ip(interp);

    /* ip is deleted? */
    if (deleted_ip(ptr)) {
        return rb_tainted_str_new2("");
    }

    /* allocate memory for arguments */
    av = alloc_invoke_arguments(argc, argv);

    /* Invoke the C procedure */
    Tcl_ResetResult(ptr->ip);
    v = ip_invoke_core(interp, argc, av);

    /* free allocated memory */
    free_invoke_arguments(argc, av);

    return v;
}

VALUE
ivq_safelevel_handler(arg, ivq)
    VALUE arg;
    VALUE ivq;
{
    struct invoke_queue *q;

    Data_Get_Struct(ivq, struct invoke_queue, q);
    DUMP2("(safe-level handler) $SAFE = %d", q->safe_level);
    rb_set_safe_level(q->safe_level);
    return ip_invoke_core(q->interp, q->argc, q->argv);
}

int invoke_queue_handler _((Tcl_Event *, int));
int
invoke_queue_handler(evPtr, flags)
    Tcl_Event *evPtr;
    int flags;
{
    struct invoke_queue *q = (struct invoke_queue *)evPtr;
    volatile VALUE ret;
    volatile VALUE q_dat;

    DUMP2("do_invoke_queue_handler : evPtr = %p", evPtr);
    DUMP2("invoke queue_thread : %lx", rb_thread_current());
    DUMP2("added by thread : %lx", q->thread);

    if (*(q->done)) {
        DUMP1("processed by another event-loop");
        return 0;
    } else {
        DUMP1("process it on current event-loop");
    }

    /* process it */
    *(q->done) = 1;

    /* check safe-level */
    if (rb_safe_level() != q->safe_level) {
        /* q_dat = Data_Wrap_Struct(rb_cData,0,0,q); */
        q_dat = Data_Wrap_Struct(rb_cData,invoke_queue_mark,0,q);
        ret = rb_funcall(rb_proc_new(ivq_safelevel_handler, q_dat),
                         ID_call, 0);
        rb_gc_force_recycle(q_dat);
    } else {
        DUMP2("call invoke_real (for caller thread:%lx)", q->thread);
        DUMP2("call invoke_real (current thread:%lx)", rb_thread_current());
        ret = ip_invoke_core(q->interp, q->argc, q->argv);
    }

    /* set result */
    RARRAY(q->result)->ptr[0] = ret;

    /* complete */
    *(q->done) = -1;

    /* back to caller */
    DUMP2("back to caller (caller thread:%lx)", q->thread);
    DUMP2("               (current thread:%lx)", rb_thread_current());
    rb_thread_run(q->thread);
    DUMP1("finish back to caller");

    /* end of handler : remove it */
    return 1;
}

static VALUE
ip_invoke_with_position(argc, argv, obj, position)
    int argc;
    VALUE *argv;
    VALUE obj;
    Tcl_QueuePosition position;
{
    struct invoke_queue *ivq;
    int  *alloc_done;
    int  thr_crit_bup;
    volatile VALUE current = rb_thread_current();
    volatile VALUE ip_obj = obj;
    volatile VALUE result;
    volatile VALUE ret;

#if TCL_MAJOR_VERSION >= 8
    Tcl_Obj **av = (Tcl_Obj **)NULL;
#else /* TCL_MAJOR_VERSION < 8 */
    char **av = (char **)NULL;
#endif

    if (argc < 1) {
        rb_raise(rb_eArgError, "command name missing");
    }
    if (NIL_P(eventloop_thread) || current == eventloop_thread) {
        if (NIL_P(eventloop_thread)) {
            DUMP2("invoke from thread:%lx but no eventloop", current);
        } else {
            DUMP2("invoke from current eventloop %lx", current);
        }
        result = ip_invoke_real(argc, argv, ip_obj);
        if (rb_obj_is_kind_of(result, rb_eException)) {
            rb_exc_raise(result);
        }
        return result;
    }

    DUMP2("invoke from thread %lx (NOT current eventloop)", current);

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

    /* allocate memory (for arguments) */
    av = alloc_invoke_arguments(argc, argv);

    /* allocate memory (keep result) */
    alloc_done = (int*)ALLOC(int);
    *alloc_done = 0;

    /* allocate memory (freed by Tcl_ServiceEvent) */
    ivq = (struct invoke_queue *)Tcl_Alloc(sizeof(struct invoke_queue));
    Tcl_Preserve(ivq);

    /* allocate result obj */
    result = rb_ary_new2(1);
    RARRAY(result)->ptr[0] = Qnil;
    RARRAY(result)->len = 1;

    /* construct event data */
    ivq->done = alloc_done;
    ivq->argc = argc;
    ivq->argv = av;
    ivq->interp = ip_obj;
    ivq->result = result;
    ivq->thread = current;
    ivq->safe_level = rb_safe_level();
    ivq->ev.proc = invoke_queue_handler;

    /* add the handler to Tcl event queue */
    DUMP1("add handler");
    Tcl_QueueEvent(&(ivq->ev), position);

    rb_thread_critical = thr_crit_bup;

    /* wait for the handler to be processed */
    DUMP2("wait for handler (current thread:%lx)", current);
    while(*alloc_done >= 0) {
        rb_thread_stop();
    }
    DUMP2("back from handler (current thread:%lx)", current);

    /* get result & free allocated memory */
    ret = RARRAY(result)->ptr[0];
    free(alloc_done);

    Tcl_Release(ivq);

    /* free allocated memory */
    free_invoke_arguments(argc, av);

    /* exception? */
    if (rb_obj_is_kind_of(ret, rb_eException)) {
        DUMP1("raise exception");
        rb_exc_raise(ret);
    }

    DUMP1("exit ip_invoke");
    return ret;
}

/* get return code from Tcl_Eval() */
static VALUE
ip_retval(self)
    VALUE self;
{
    struct tcltkip *ptr;        /* tcltkip data struct */

    /* get the data strcut */
    ptr = get_ip(self);

    /* ip is deleted? */
    if (deleted_ip(ptr)) {
        return rb_tainted_str_new2("");
    }

    return (INT2FIX(ptr->return_value));
}

static VALUE
ip_invoke(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    return ip_invoke_with_position(argc, argv, obj, TCL_QUEUE_TAIL);
}

static VALUE
ip_invoke_immediate(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    /* POTENTIALY INSECURE : can create infinite loop */
    rb_secure(4);
    return ip_invoke_with_position(argc, argv, obj, TCL_QUEUE_HEAD);
}

/* access Tcl variables */
static VALUE
ip_get_variable2_core(interp, argc, argv)
    VALUE interp;
    int   argc;
    VALUE *argv;
{
    struct tcltkip *ptr = get_ip(interp);
    int thr_crit_bup;
    volatile VALUE varname, index, flag;

    varname = argv[0];
    index   = argv[1];
    flag    = argv[2];

    /*
    StringValue(varname);
    if (!NIL_P(index)) StringValue(index);
    */

#if TCL_MAJOR_VERSION >= 8
    {
        Tcl_Obj *ret;
        volatile VALUE strval;

        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;

        /* ip is deleted? */
        if (deleted_ip(ptr)) {
            rb_thread_critical = thr_crit_bup;
            return rb_tainted_str_new2("");
        } else {
            /* Tcl_Preserve(ptr->ip); */
            rbtk_preserve_ip(ptr);
            ret = Tcl_GetVar2Ex(ptr->ip, RSTRING(varname)->ptr,
                                NIL_P(index) ? NULL : RSTRING(index)->ptr,
                                FIX2INT(flag));
        }

        if (ret == (Tcl_Obj*)NULL) {
            volatile VALUE exc;
            exc = rb_exc_new2(rb_eRuntimeError, Tcl_GetStringResult(ptr->ip));
            /* Tcl_Release(ptr->ip); */
            rbtk_release_ip(ptr);
            rb_thread_critical = thr_crit_bup;
            return exc;
        }

        Tcl_IncrRefCount(ret);
        strval = get_str_from_obj(ret);
        OBJ_TAINT(strval);
        Tcl_DecrRefCount(ret);

        /* Tcl_Release(ptr->ip); */
        rbtk_release_ip(ptr);
        rb_thread_critical = thr_crit_bup;
        return(strval);
    }
#else /* TCL_MAJOR_VERSION < 8 */
    {
        char *ret;
        volatile VALUE strval;

        /* ip is deleted? */
        if (deleted_ip(ptr)) {
            return rb_tainted_str_new2("");
        } else {
            /* Tcl_Preserve(ptr->ip); */
            rbtk_preserve_ip(ptr);
            ret = Tcl_GetVar2(ptr->ip, RSTRING(varname)->ptr,
                              NIL_P(index) ? NULL : RSTRING(index)->ptr,
                              FIX2INT(flag));
        }

        if (ret == (char*)NULL) {
            volatile VALUE exc;
            exc = rb_exc_new2(rb_eRuntimeError, Tcl_GetStringResult(ptr->ip));
            /* Tcl_Release(ptr->ip); */
            rbtk_release_ip(ptr);
            rb_thread_critical = thr_crit_bup;
            return exc;
        }

        strval = rb_tainted_str_new2(ret);
        /* Tcl_Release(ptr->ip); */
        rbtk_release_ip(ptr);
        rb_thread_critical = thr_crit_bup;

        return(strval);
    }
#endif
}

static VALUE
ip_get_variable2(self, varname, index, flag)
    VALUE self;
    VALUE varname;
    VALUE index;
    VALUE flag;
{
    VALUE argv[3];
    VALUE retval;

    StringValue(varname);
    if (!NIL_P(index)) StringValue(index);

    argv[0] = varname;
    argv[1] = index;
    argv[2] = flag;

    retval = tk_funcall(ip_get_variable2_core, 3, argv, self);

    if (NIL_P(retval)) {
        return rb_tainted_str_new2("");
    } else {
        return retval;
    }
}

static VALUE
ip_get_variable(self, varname, flag)
    VALUE self;
    VALUE varname;
    VALUE flag;
{
    return ip_get_variable2(self, varname, Qnil, flag);
}

static VALUE
ip_set_variable2_core(interp, argc, argv)
    VALUE interp;
    int   argc;
    VALUE *argv;
{
    struct tcltkip *ptr = get_ip(interp);
    int thr_crit_bup;
    volatile VALUE varname, index, value, flag;

    varname = argv[0];
    index   = argv[1];
    value   = argv[2];
    flag    = argv[3];

    /*
    StringValue(varname);
    if (!NIL_P(index)) StringValue(index);
    StringValue(value);
    */

#if TCL_MAJOR_VERSION >= 8
    {
        Tcl_Obj *valobj, *ret;
        volatile VALUE strval;

        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;

        valobj = get_obj_from_str(value);
        Tcl_IncrRefCount(valobj);

        /* ip is deleted? */
        if (deleted_ip(ptr)) {
            Tcl_DecrRefCount(valobj);
            rb_thread_critical = thr_crit_bup;
            return rb_tainted_str_new2("");
        } else {
            /* Tcl_Preserve(ptr->ip); */
            rbtk_preserve_ip(ptr);
            ret = Tcl_SetVar2Ex(ptr->ip, RSTRING(varname)->ptr,
                                NIL_P(index) ? NULL : RSTRING(index)->ptr,
                                valobj, FIX2INT(flag));
        }

        Tcl_DecrRefCount(valobj);

        if (ret == (Tcl_Obj*)NULL) {
            volatile VALUE exc;
            exc = rb_exc_new2(rb_eRuntimeError, Tcl_GetStringResult(ptr->ip));
            /* Tcl_Release(ptr->ip); */
            rbtk_release_ip(ptr);
            rb_thread_critical = thr_crit_bup;
            return exc;
        }

        Tcl_IncrRefCount(ret);
        strval = get_str_from_obj(ret);
        OBJ_TAINT(strval);
        Tcl_DecrRefCount(ret);

        /* Tcl_Release(ptr->ip); */
        rbtk_release_ip(ptr);
        rb_thread_critical = thr_crit_bup;

        return(strval);
    }
#else /* TCL_MAJOR_VERSION < 8 */
    {
        CONST char *ret;
        volatile VALUE strval;

        /* ip is deleted? */
        if (deleted_ip(ptr)) {
            return rb_tainted_str_new2("");
        } else {
            /* Tcl_Preserve(ptr->ip); */
            rbtk_preserve_ip(ptr);
            ret = Tcl_SetVar2(ptr->ip, RSTRING(varname)->ptr,
                              NIL_P(index) ? NULL : RSTRING(index)->ptr,
                              RSTRING(value)->ptr, FIX2INT(flag));
        }

        if (ret == (char*)NULL) {
            return rb_exc_new2(rb_eRuntimeError, ptr->ip->result);
        }

        strval = rb_tainted_str_new2(ret);

        /* Tcl_Release(ptr->ip); */
        rbtk_release_ip(ptr);
        rb_thread_critical = thr_crit_bup;

        return(strval);
    }
#endif
}

static VALUE
ip_set_variable2(self, varname, index, value, flag)
    VALUE self;
    VALUE varname;
    VALUE index;
    VALUE value;
    VALUE flag;
{
    VALUE argv[4];
    VALUE retval;

    StringValue(varname);
    if (!NIL_P(index)) StringValue(index);
    StringValue(value);

    argv[0] = varname;
    argv[1] = index;
    argv[2] = value;
    argv[3] = flag;

    retval = tk_funcall(ip_set_variable2_core, 4, argv, self);

    if (NIL_P(retval)) {
        return rb_tainted_str_new2("");
    } else {
        return retval;
    }
}

static VALUE
ip_set_variable(self, varname, value, flag)
    VALUE self;
    VALUE varname;
    VALUE value;
    VALUE flag;
{
    return ip_set_variable2(self, varname, Qnil, value, flag);
}

static VALUE
ip_unset_variable2_core(interp, argc, argv)
    VALUE interp;
    int   argc;
    VALUE *argv;
{
    struct tcltkip *ptr = get_ip(interp);
    volatile VALUE varname, index, flag;

    varname = argv[0];
    index   = argv[1];
    flag    = argv[2];

    /*
    StringValue(varname);
    if (!NIL_P(index)) StringValue(index);
    */

    /* ip is deleted? */
    if (deleted_ip(ptr)) {
        return Qtrue;
    }

    ptr->return_value = Tcl_UnsetVar2(ptr->ip, RSTRING(varname)->ptr,
                                      NIL_P(index) ? NULL : RSTRING(index)->ptr,
                                      FIX2INT(flag));

    if (ptr->return_value == TCL_ERROR) {
        if (FIX2INT(flag) & TCL_LEAVE_ERR_MSG) {
            return rb_exc_new2(rb_eRuntimeError, Tcl_GetStringResult(ptr->ip));
        }
        return Qfalse;
    }
    return Qtrue;
}

static VALUE
ip_unset_variable2(self, varname, index, flag)
    VALUE self;
    VALUE varname;
    VALUE index;
    VALUE flag;
{
    VALUE argv[3];
    VALUE retval;

    StringValue(varname);
    if (!NIL_P(index)) StringValue(index);

    argv[0] = varname;
    argv[1] = index;
    argv[2] = flag;

    retval = tk_funcall(ip_unset_variable2_core, 3, argv, self);

    if (NIL_P(retval)) {
        return rb_tainted_str_new2("");
    } else {
        return retval;
    }
}

static VALUE
ip_unset_variable(self, varname, flag)
    VALUE self;
    VALUE varname;
    VALUE flag;
{
    return ip_unset_variable2(self, varname, Qnil, flag);
}

static VALUE
ip_get_global_var(self, varname)
    VALUE self;
    VALUE varname;
{
    return ip_get_variable(self, varname,
                           INT2FIX(TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG));
}

static VALUE
ip_get_global_var2(self, varname, index)
    VALUE self;
    VALUE varname;
    VALUE index;
{
    return ip_get_variable2(self, varname, index,
                            INT2FIX(TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG));
}

static VALUE
ip_set_global_var(self, varname, value)
    VALUE self;
    VALUE varname;
    VALUE value;
{
    return ip_set_variable(self, varname, value,
                           INT2FIX(TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG));
}

static VALUE
ip_set_global_var2(self, varname, index, value)
    VALUE self;
    VALUE varname;
    VALUE index;
    VALUE value;
{
    return ip_set_variable2(self, varname, index, value,
                            INT2FIX(TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG));
}

static VALUE
ip_unset_global_var(self, varname)
    VALUE self;
    VALUE varname;
{
    return ip_unset_variable(self, varname,
                             INT2FIX(TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG));
}

static VALUE
ip_unset_global_var2(self, varname, index)
    VALUE self;
    VALUE varname;
    VALUE index;
{
    return ip_unset_variable2(self, varname, index,
                              INT2FIX(TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG));
}

/* treat Tcl_List */
static VALUE
lib_split_tklist_core(ip_obj, list_str)
    VALUE ip_obj;
    VALUE list_str;
{
    Tcl_Interp *interp;
    volatile VALUE ary, elem;
    int idx;
    int taint_flag = OBJ_TAINTED(list_str);
    int result;
    VALUE old_gc;

    tcl_stubs_check();

    if (NIL_P(ip_obj)) {
        interp = (Tcl_Interp *)NULL;
    } else if (get_ip(ip_obj) == (struct tcltkip *)NULL) {
        interp = (Tcl_Interp *)NULL;
    } else {
        interp = get_ip(ip_obj)->ip;
    }

    StringValue(list_str);

    {
#if TCL_MAJOR_VERSION >= 8
        /* object style interface */
        Tcl_Obj *listobj;
        int     objc;
        Tcl_Obj **objv;
        int thr_crit_bup;

        listobj = get_obj_from_str(list_str);

        Tcl_IncrRefCount(listobj);

        result = Tcl_ListObjGetElements(interp, listobj, &objc, &objv);

        if (result == TCL_ERROR) {
            Tcl_DecrRefCount(listobj);
            if (interp == (Tcl_Interp*)NULL) {
                rb_raise(rb_eRuntimeError, "can't get elements from list");
            } else {
                rb_raise(rb_eRuntimeError, "%s", Tcl_GetStringResult(interp));
            }
        }

        for(idx = 0; idx < objc; idx++) {
            Tcl_IncrRefCount(objv[idx]);
        }

        thr_crit_bup = rb_thread_critical;
        rb_thread_critical = Qtrue;

        ary = rb_ary_new2(objc);
        if (taint_flag) OBJ_TAINT(ary);

        old_gc = rb_gc_disable();

        for(idx = 0; idx < objc; idx++) {
            elem = get_str_from_obj(objv[idx]);
            if (taint_flag) OBJ_TAINT(elem);
            RARRAY(ary)->ptr[idx] = elem;
        }

        RARRAY(ary)->len = objc;

        if (old_gc == Qfalse) rb_gc_enable();

        rb_thread_critical = thr_crit_bup;

        for(idx = 0; idx < objc; idx++) {
            Tcl_DecrRefCount(objv[idx]);
        }

        Tcl_DecrRefCount(listobj);

#else /* TCL_MAJOR_VERSION < 8 */
        /* string style interface */
        int  argc;
        char **argv;

        if (Tcl_SplitList(interp, RSTRING(list_str)->ptr,
                          &argc, &argv) == TCL_ERROR) {
            if (interp == (Tcl_Interp*)NULL) {
                rb_raise(rb_eRuntimeError, "can't get elements from list");
            } else {
                rb_raise(rb_eRuntimeError, "%s", interp->result);
            }
        }

        ary = rb_ary_new2(argc);
        if (taint_flag) OBJ_TAINT(ary);

        old_gc = rb_gc_disable();

        for(idx = 0; idx < argc; idx++) {
            if (taint_flag) {
                elem = rb_tainted_str_new2(argv[idx]);
            } else {
                elem = rb_str_new2(argv[idx]);
            }
            /* rb_ivar_set(elem, ID_at_enc, rb_str_new2("binary")); */
            RARRAY(ary)->ptr[idx] = elem;
        }
        RARRAY(ary)->len = argc;

        if (old_gc == Qfalse) rb_gc_enable();
#endif
    }

    return ary;
}

static VALUE
lib_split_tklist(self, list_str)
    VALUE self;
    VALUE list_str;
{
    return lib_split_tklist_core(Qnil, list_str);
}

static VALUE
ip_split_tklist(self, list_str)
    VALUE self;
    VALUE list_str;
{
    return lib_split_tklist_core(self, list_str);
}

static VALUE
lib_merge_tklist(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    int  num, len;
    int  *flagPtr;
    char *dst, *result;
    volatile VALUE str;
    int taint_flag = 0;
    int thr_crit_bup;
    VALUE old_gc;

    if (argc == 0) return rb_str_new2("");

    tcl_stubs_check();

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;
    old_gc = rb_gc_disable();

    /* based on Tcl/Tk's Tcl_Merge() */
    flagPtr = ALLOC_N(int, argc);

    /* pass 1 */
    len = 1;
    for(num = 0; num < argc; num++) {
        if (OBJ_TAINTED(argv[num])) taint_flag = 1;
        dst = StringValuePtr(argv[num]);
#if TCL_MAJOR_VERSION >= 8
        len += Tcl_ScanCountedElement(dst, RSTRING(argv[num])->len,
                                      &flagPtr[num]) + 1;
#else /* TCL_MAJOR_VERSION < 8 */
        len += Tcl_ScanElement(dst, &flagPtr[num]) + 1;
#endif
    }

    /* pass 2 */
    result = (char *)Tcl_Alloc(len);
    dst = result;
    for(num = 0; num < argc; num++) {
#if TCL_MAJOR_VERSION >= 8
        len = Tcl_ConvertCountedElement(RSTRING(argv[num])->ptr,
                                        RSTRING(argv[num])->len,
                                        dst, flagPtr[num]);
#else /* TCL_MAJOR_VERSION < 8 */
        len = Tcl_ConvertElement(RSTRING(argv[num])->ptr, dst, flagPtr[num]);
#endif
        dst += len;
        *dst = ' ';
        dst++;
    }
    if (dst == result) {
        *dst = 0;
    } else {
        dst[-1] = 0;
    }

    free(flagPtr);

    /* create object */
    str = rb_str_new(result, dst - result - 1);
    if (taint_flag) OBJ_TAINT(str);
    Tcl_Free(result);

    if (old_gc == Qfalse) rb_gc_enable();
    rb_thread_critical = thr_crit_bup;

    return str;
}

static VALUE
lib_conv_listelement(self, src)
    VALUE self;
    VALUE src;
{
    int   len, scan_flag;
    volatile VALUE dst;
    int   taint_flag = OBJ_TAINTED(src);
    int thr_crit_bup;

    tcl_stubs_check();

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

    StringValue(src);

#if TCL_MAJOR_VERSION >= 8
    len = Tcl_ScanCountedElement(RSTRING(src)->ptr, RSTRING(src)->len,
                                 &scan_flag);
    dst = rb_str_new(0, len + 1);
    len = Tcl_ConvertCountedElement(RSTRING(src)->ptr, RSTRING(src)->len,
                                    RSTRING(dst)->ptr, scan_flag);
#else /* TCL_MAJOR_VERSION < 8 */
    len = Tcl_ScanElement(RSTRING(src)->ptr, &scan_flag);
    dst = rb_str_new(0, len + 1);
    len = Tcl_ConvertElement(RSTRING(src)->ptr, RSTRING(dst)->ptr, scan_flag);
#endif

    RSTRING(dst)->len = len;
    RSTRING(dst)->ptr[len] = '\0';
    if (taint_flag) OBJ_TAINT(dst);

    rb_thread_critical = thr_crit_bup;

    return dst;
}

static VALUE
tcltklib_compile_info()
{
    volatile VALUE ret;
    int size;
    char form[]
      = "tcltklib %s :: Ruby%s (%s) %s pthread :: Tcl%s(%s)/Tk%s(%s) %s";
    char *info;

    size = strlen(form)
        + strlen(TCLTKLIB_RELEASE_DATE)
        + strlen(RUBY_VERSION)
        + strlen(RUBY_RELEASE_DATE)
        + strlen("without")
        + strlen(TCL_PATCH_LEVEL)
        + strlen("without stub")
        + strlen(TK_PATCH_LEVEL)
        + strlen("without stub")
        + strlen("unknown tcl_threads");

    info = ALLOC_N(char, size);

    sprintf(info, form,
            TCLTKLIB_RELEASE_DATE,
            RUBY_VERSION, RUBY_RELEASE_DATE,
#ifdef HAVE_NATIVETHREAD
            "with",
#else
            "without",
#endif
            TCL_PATCH_LEVEL,
#ifdef USE_TCL_STUBS
            "with stub",
#else
            "without stub",
#endif
            TK_PATCH_LEVEL,
#ifdef USE_TK_STUBS
            "with stub",
#else
            "without stub",
#endif
#ifdef WITH_TCL_ENABLE_THREAD
# if WITH_TCL_ENABLE_THREAD
            "with tcl_threads"
# else
            "without tcl_threads"
# endif
#else
            "unknown tcl_threads"
#endif
        );

    ret = rb_obj_freeze(rb_str_new2(info));

    free(info);

    return ret;
}

/*---- initialization ----*/
void
Init_tcltklib()
{
    int  ret;

    VALUE lib = rb_define_module("TclTkLib");
    VALUE ip = rb_define_class("TclTkIp", rb_cObject);

    VALUE ev_flag = rb_define_module_under(lib, "EventFlag");
    VALUE var_flag = rb_define_module_under(lib, "VarAccessFlag");

    /* --------------------------------------------------------------- */

    tcltkip_class = ip;

    /* --------------------------------------------------------------- */

    rb_global_variable(&eTkCallbackReturn);
    rb_global_variable(&eTkCallbackBreak);
    rb_global_variable(&eTkCallbackContinue);

    rb_global_variable(&eventloop_thread);
    rb_global_variable(&eventloop_stack);
    rb_global_variable(&watchdog_thread);

    rb_global_variable(&rbtk_pending_exception);

   /* --------------------------------------------------------------- */

    rb_define_const(lib, "COMPILE_INFO", tcltklib_compile_info());

    rb_define_const(lib, "RELEASE_DATE",
                    rb_obj_freeze(rb_str_new2(tcltklib_release_date)));

    rb_define_const(lib, "FINALIZE_PROC_NAME",
                    rb_str_new2(finalize_hook_name));

   /* --------------------------------------------------------------- */

    rb_define_const(ev_flag, "NONE",      INT2FIX(0));
    rb_define_const(ev_flag, "WINDOW",    INT2FIX(TCL_WINDOW_EVENTS));
    rb_define_const(ev_flag, "FILE",      INT2FIX(TCL_FILE_EVENTS));
    rb_define_const(ev_flag, "TIMER",     INT2FIX(TCL_TIMER_EVENTS));
    rb_define_const(ev_flag, "IDLE",      INT2FIX(TCL_IDLE_EVENTS));
    rb_define_const(ev_flag, "ALL",       INT2FIX(TCL_ALL_EVENTS));
    rb_define_const(ev_flag, "DONT_WAIT", INT2FIX(TCL_DONT_WAIT));

    /* --------------------------------------------------------------- */

    rb_define_const(var_flag, "NONE",           INT2FIX(0));
    rb_define_const(var_flag, "GLOBAL_ONLY",    INT2FIX(TCL_GLOBAL_ONLY));
#ifdef TCL_NAMESPACE_ONLY
    rb_define_const(var_flag, "NAMESPACE_ONLY", INT2FIX(TCL_NAMESPACE_ONLY));
#else /* probably Tcl7.6 */
    rb_define_const(var_flag, "NAMESPACE_ONLY", INT2FIX(0));
#endif
    rb_define_const(var_flag, "LEAVE_ERR_MSG",  INT2FIX(TCL_LEAVE_ERR_MSG));
    rb_define_const(var_flag, "APPEND_VALUE",   INT2FIX(TCL_APPEND_VALUE));
    rb_define_const(var_flag, "LIST_ELEMENT",   INT2FIX(TCL_LIST_ELEMENT));
#ifdef TCL_PARSE_PART1
    rb_define_const(var_flag, "PARSE_VARNAME",  INT2FIX(TCL_PARSE_PART1));
#else /* probably Tcl7.6 */
    rb_define_const(var_flag, "PARSE_VARNAME",  INT2FIX(0));
#endif

    /* --------------------------------------------------------------- */

    eTkCallbackReturn = rb_define_class("TkCallbackReturn", rb_eStandardError);
    eTkCallbackBreak = rb_define_class("TkCallbackBreak", rb_eStandardError);
    eTkCallbackContinue = rb_define_class("TkCallbackContinue",
                                          rb_eStandardError);

    /* --------------------------------------------------------------- */

    eLocalJumpError = rb_const_get(rb_cObject, rb_intern("LocalJumpError"));

    eTkLocalJumpError = rb_define_class("TkLocalJumpError", eLocalJumpError);

    eTkCallbackRetry  = rb_define_class("TkCallbackRetry", eTkLocalJumpError);
    eTkCallbackRedo   = rb_define_class("TkCallbackRedo",  eTkLocalJumpError);
    eTkCallbackThrow  = rb_define_class("TkCallbackThrow", eTkLocalJumpError);

    /* --------------------------------------------------------------- */

    ID_at_enc = rb_intern("@encoding");
    ID_at_interp = rb_intern("@interp");

    ID_stop_p = rb_intern("stop?");
    ID_alive_p = rb_intern("alive?");
    ID_kill = rb_intern("kill");
    ID_join = rb_intern("join");
    ID_value = rb_intern("value");

    ID_call = rb_intern("call");
    ID_backtrace = rb_intern("backtrace");
    ID_message = rb_intern("message");

    ID_at_reason = rb_intern("@reason");
    ID_return = rb_intern("return");
    ID_break = rb_intern("break");
    ID_next = rb_intern("next");

    ID_to_s = rb_intern("to_s");
    ID_inspect = rb_intern("inspect");

    /* --------------------------------------------------------------- */

    rb_define_module_function(lib, "mainloop", lib_mainloop, -1);
    rb_define_module_function(lib, "mainloop_thread?",
                              lib_evloop_thread_p, 0);
    rb_define_module_function(lib, "mainloop_watchdog",
                              lib_mainloop_watchdog, -1);
    rb_define_module_function(lib, "do_thread_callback",
                              lib_thread_callback, -1);
    rb_define_module_function(lib, "do_one_event", lib_do_one_event, -1);
    rb_define_module_function(lib, "mainloop_abort_on_exception",
                             lib_evloop_abort_on_exc, 0);
    rb_define_module_function(lib, "mainloop_abort_on_exception=",
                             lib_evloop_abort_on_exc_set, 1);
    rb_define_module_function(lib, "set_eventloop_tick",set_eventloop_tick,1);
    rb_define_module_function(lib, "get_eventloop_tick",get_eventloop_tick,0);
    rb_define_module_function(lib, "set_no_event_wait", set_no_event_wait, 1);
    rb_define_module_function(lib, "get_no_event_wait", get_no_event_wait, 0);
    rb_define_module_function(lib, "set_eventloop_weight",
                              set_eventloop_weight, 2);
    rb_define_module_function(lib, "set_max_block_time", set_max_block_time,1);
    rb_define_module_function(lib, "get_eventloop_weight",
                              get_eventloop_weight, 0);
    rb_define_module_function(lib, "num_of_mainwindows",
                              lib_num_of_mainwindows, 0);

    /* --------------------------------------------------------------- */

    rb_define_module_function(lib, "_split_tklist", lib_split_tklist, 1);
    rb_define_module_function(lib, "_merge_tklist", lib_merge_tklist, -1);
    rb_define_module_function(lib, "_conv_listelement",
                              lib_conv_listelement, 1);
    rb_define_module_function(lib, "_toUTF8", lib_toUTF8, -1);
    rb_define_module_function(lib, "_fromUTF8", lib_fromUTF8, -1);
    rb_define_module_function(lib, "_subst_UTF_backslash",
                              lib_UTF_backslash, 1);
    rb_define_module_function(lib, "_subst_Tcl_backslash",
                              lib_Tcl_backslash, 1);

    rb_define_module_function(lib, "encoding_system",
                              lib_get_system_encoding, 0);
    rb_define_module_function(lib, "encoding_system=",
                              lib_set_system_encoding, 1);
    rb_define_module_function(lib, "encoding",
                              lib_get_system_encoding, 0);
    rb_define_module_function(lib, "encoding=",
                              lib_set_system_encoding, 1);

    /* --------------------------------------------------------------- */

    rb_define_alloc_func(ip, ip_alloc);
    rb_define_method(ip, "initialize", ip_init, -1);
    rb_define_method(ip, "create_slave", ip_create_slave, -1);
    rb_define_method(ip, "slave_of?", ip_is_slave_of_p, 1);
    rb_define_method(ip, "make_safe", ip_make_safe, 0);
    rb_define_method(ip, "safe?", ip_is_safe_p, 0);
    rb_define_method(ip, "allow_ruby_exit?", ip_allow_ruby_exit_p, 0);
    rb_define_method(ip, "allow_ruby_exit=", ip_allow_ruby_exit_set, 1);
    rb_define_method(ip, "delete", ip_delete, 0);
    rb_define_method(ip, "deleted?", ip_is_deleted_p, 0);
    rb_define_method(ip, "has_mainwindow?", ip_has_mainwindow_p, 0);
    rb_define_method(ip, "invalid_namespace?", ip_has_invalid_namespace_p, 0);
    rb_define_method(ip, "_eval", ip_eval, 1);
    rb_define_method(ip, "_toUTF8", ip_toUTF8, -1);
    rb_define_method(ip, "_fromUTF8", ip_fromUTF8, -1);
    rb_define_method(ip, "_thread_vwait", ip_thread_vwait, 1);
    rb_define_method(ip, "_thread_tkwait", ip_thread_tkwait, 2);
    rb_define_method(ip, "_invoke", ip_invoke, -1);
    rb_define_method(ip, "_immediate_invoke", ip_invoke_immediate, -1);
    rb_define_method(ip, "_return_value", ip_retval, 0);

    rb_define_method(ip, "_create_console", ip_create_console, 0);

    /* --------------------------------------------------------------- */

    rb_define_method(ip, "_get_variable", ip_get_variable, 2);
    rb_define_method(ip, "_get_variable2", ip_get_variable2, 3);
    rb_define_method(ip, "_set_variable", ip_set_variable, 3);
    rb_define_method(ip, "_set_variable2", ip_set_variable2, 4);
    rb_define_method(ip, "_unset_variable", ip_unset_variable, 2);
    rb_define_method(ip, "_unset_variable2", ip_unset_variable2, 3);
    rb_define_method(ip, "_get_global_var", ip_get_global_var, 1);
    rb_define_method(ip, "_get_global_var2", ip_get_global_var2, 2);
    rb_define_method(ip, "_set_global_var", ip_set_global_var, 2);
    rb_define_method(ip, "_set_global_var2", ip_set_global_var2, 3);
    rb_define_method(ip, "_unset_global_var", ip_unset_global_var, 1);
    rb_define_method(ip, "_unset_global_var2", ip_unset_global_var2, 2);

    /* --------------------------------------------------------------- */

    rb_define_method(ip, "_split_tklist", ip_split_tklist, 1);
    rb_define_method(ip, "_merge_tklist", lib_merge_tklist, -1);
    rb_define_method(ip, "_conv_listelement", lib_conv_listelement, 1);

    /* --------------------------------------------------------------- */

    rb_define_method(ip, "mainloop", ip_mainloop, -1);
    rb_define_method(ip, "mainloop_watchdog", ip_mainloop_watchdog, -1);
    rb_define_method(ip, "do_one_event", ip_do_one_event, -1);
    rb_define_method(ip, "mainloop_abort_on_exception",
                    ip_evloop_abort_on_exc, 0);
    rb_define_method(ip, "mainloop_abort_on_exception=",
                    ip_evloop_abort_on_exc_set, 1);
    rb_define_method(ip, "set_eventloop_tick", ip_set_eventloop_tick, 1);
    rb_define_method(ip, "get_eventloop_tick", ip_get_eventloop_tick, 0);
    rb_define_method(ip, "set_no_event_wait", ip_set_no_event_wait, 1);
    rb_define_method(ip, "get_no_event_wait", ip_get_no_event_wait, 0);
    rb_define_method(ip, "set_eventloop_weight", ip_set_eventloop_weight, 2);
    rb_define_method(ip, "get_eventloop_weight", ip_get_eventloop_weight, 0);
    rb_define_method(ip, "set_max_block_time", set_max_block_time, 1);
    rb_define_method(ip, "restart", ip_restart, 0);

    /* --------------------------------------------------------------- */

    eventloop_thread = Qnil;

#ifndef DEFAULT_EVENTLOOP_DEPTH
#define DEFAULT_EVENTLOOP_DEPTH 7
#endif
    eventloop_stack = rb_ary_new2(DEFAULT_EVENTLOOP_DEPTH);
    OBJ_TAINT(eventloop_stack);

    watchdog_thread  = Qnil;

    rbtk_pending_exception = Qnil;

    /* --------------------------------------------------------------- */

    /* if ruby->nativethread-supprt and tcltklib->doen't,
       the following will cause link-error. */
    is_ruby_native_thread();

    /* --------------------------------------------------------------- */

    ret = ruby_open_tcl_dll(RSTRING(rb_argv0)->ptr);
    switch(ret) {
    case TCLTK_STUBS_OK:
        break;
    case NO_TCL_DLL:
        rb_raise(rb_eLoadError, "tcltklib: fail to open tcl_dll");
    case NO_FindExecutable:
        rb_raise(rb_eLoadError, "tcltklib: can't find Tcl_FindExecutable");
    default:
        rb_raise(rb_eLoadError, "tcltklib: unknown error(%d) on ruby_open_tcl_dll", ret);
    }

    /* --------------------------------------------------------------- */
}

/* eof */
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/tk/tkutil/tkutil.c

root/ext/tk/tkutil/tkutil.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. tk_s_new
  2. tkNone_to_s
  3. tk_eval_cmd
  4. tk_do_callback
  5. tk_install_cmd_core
  6. tk_install_cmd
  7. tk_uninstall_cmd
  8. tk_toUTF8
  9. tk_fromUTF8
  10. fromDefaultEnc_toUTF8
  11. fromUTF8_toDefaultEnc
  12. to_strkey
  13. tk_symbolkey2str
  14. ary2list
  15. ary2list2
  16. key2keyname
  17. assoc2kv
  18. assoc2kv_enc
  19. push_kv
  20. hash2kv
  21. push_kv_enc
  22. hash2kv_enc
  23. hash2list
  24. hash2list_enc
  25. tk_hash_kv
  26. get_eval_string_core
  27. tk_get_eval_string
  28. tk_get_eval_enc_str
  29. tk_conv_args
  30. tcl2rb_bool
  31. tkstr_to_dec
  32. tkstr_to_int
  33. tkstr_to_float
  34. tkstr_invalid_numstr
  35. tkstr_rescue_float
  36. tkstr_to_number
  37. tcl2rb_number
  38. tkstr_to_str
  39. tcl2rb_string
  40. tcl2rb_num_or_str
  41. subst_mark
  42. subst_free
  43. cbsubst_init
  44. cbsubst_initialize
  45. cbsubst_ret_val
  46. each_attr_def
  47. cbsubst_def_attr_aliases
  48. cbsubst_get_subst_arg
  49. cbsubst_get_subst_key
  50. cbsubst_get_all_subst_keys
  51. cbsubst_table_setup
  52. cbsubst_get_extra_args_tbl
  53. cbsubst_scan_args
  54. cbsubst_inspect
  55. substinfo_inspect
  56. tk_cbe_inspect
  57. tkobj_path
  58. Init_tkutil
/************************************************

  tkutil.c -

  $Author: nagai $
  $Date: 2005/11/07 04:46:42 $
  created at: Fri Nov  3 00:47:54 JST 1995

************************************************/

#define TKUTIL_RELEASE_DATE "2005-11-07"

#include "ruby.h"
#include "rubysig.h"
#include "st.h"

static VALUE cMethod;

static VALUE cTclTkLib;

static VALUE cTkObject;
static VALUE cTkCallbackEntry;

static VALUE TK_None;

static VALUE cCB_SUBST;
static VALUE cSUBST_INFO;

static ID ID_split_tklist;
static ID ID_toUTF8;
static ID ID_fromUTF8;
static ID ID_path;
static ID ID_at_path;
static ID ID_at_enc;
static ID ID_to_eval;
static ID ID_to_s;
static ID ID_source;
static ID ID_downcase;
static ID ID_install_cmd;
static ID ID_merge_tklist;
static ID ID_encoding;
static ID ID_encoding_system;
static ID ID_call;

static ID ID_SUBST_INFO;

static VALUE CALLBACK_TABLE;
static unsigned long CALLBACK_ID_NUM = 0;

/*************************************/

static VALUE
tk_s_new(argc, argv, klass)
    int argc;
    VALUE *argv;
    VALUE klass;
{
    VALUE obj = rb_class_new_instance(argc, argv, klass);

    if (rb_block_given_p()) rb_obj_instance_eval(0, 0, obj);
    return obj;
}

/*************************************/

static VALUE
tkNone_to_s(self)
    VALUE self;
{
    return rb_str_new2("None");
}

/*************************************/

static VALUE
tk_eval_cmd(argc, argv, self)
    int argc;
    VALUE argv[];
    VALUE self;
{
    volatile VALUE cmd, rest;

    rb_scan_args(argc, argv, "1*", &cmd, &rest);
    return rb_eval_cmd(cmd, rest, 0);
}

static VALUE
tk_do_callback(argc, argv, self)
    int   argc;
    VALUE *argv;
    VALUE self;
{
#if 0
    volatile VALUE id;
    volatile VALUE rest;

    rb_scan_args(argc, argv, "1*", &id, &rest);
    return rb_apply(rb_hash_aref(CALLBACK_TABLE, id), ID_call, rest);
#endif
    return rb_funcall2(rb_hash_aref(CALLBACK_TABLE, argv[0]),
                       ID_call, argc - 1, argv + 1);
}

static char *cmd_id_head = "ruby_cmd TkUtil callback ";
static char *cmd_id_prefix = "cmd";

static VALUE
tk_install_cmd_core(cmd)
    VALUE cmd;
{
    volatile VALUE id_num;

    id_num = ULONG2NUM(CALLBACK_ID_NUM++);
    id_num = rb_funcall(id_num, ID_to_s, 0, 0);
    id_num = rb_str_append(rb_str_new2(cmd_id_prefix), id_num);
    rb_hash_aset(CALLBACK_TABLE, id_num, cmd);
    return rb_str_append(rb_str_new2(cmd_id_head), id_num);
}

static VALUE
tk_install_cmd(argc, argv, self)
    int   argc;
    VALUE *argv;
    VALUE self;
{
    volatile VALUE cmd;

#if 0
    if (rb_scan_args(argc, argv, "01", &cmd) == 0) {
        cmd = rb_block_proc();
    }
    return tk_install_cmd_core(cmd);
#endif
    if (argc == 0) {
        cmd = rb_block_proc();
    } else {
        cmd = argv[0];
    }
    return tk_install_cmd_core(cmd);
}

static VALUE
tk_uninstall_cmd(self, cmd_id)
    VALUE self;
    VALUE cmd_id;
{
    int head_len = strlen(cmd_id_head);
    int prefix_len = strlen(cmd_id_prefix);

    StringValue(cmd_id);
    if (strncmp(cmd_id_head, RSTRING(cmd_id)->ptr, head_len) != 0) {
        return Qnil;
    }
    if (strncmp(cmd_id_prefix,
                RSTRING(cmd_id)->ptr + head_len, prefix_len) != 0) {
        return Qnil;
    }

    return rb_hash_delete(CALLBACK_TABLE,
                          rb_str_new2(RSTRING(cmd_id)->ptr + head_len));
}

static VALUE
tk_toUTF8(argc, argv, self)
    int   argc;
    VALUE *argv;
    VALUE self;
{
    return rb_funcall2(cTclTkLib, ID_toUTF8, argc, argv);
}

static VALUE
tk_fromUTF8(argc, argv, self)
    int   argc;
    VALUE *argv;
    VALUE self;
{
    return rb_funcall2(cTclTkLib, ID_fromUTF8, argc, argv);
}

static VALUE
fromDefaultEnc_toUTF8(str, self)
    VALUE str;
    VALUE self;
{
    VALUE argv[1];

    argv[0] = str;
    return tk_toUTF8(1, argv, self);
}

static VALUE
fromUTF8_toDefaultEnc(str, self)
    VALUE str;
    VALUE self;
{
    VALUE argv[1];

    argv[0] = str;
    return tk_fromUTF8(1, argv, self);
}

static int
to_strkey(key, value, hash)
    VALUE key;
    VALUE value;
    VALUE hash;
{
    if (key == Qundef) return ST_CONTINUE;
    rb_hash_aset(hash, rb_funcall(key, ID_to_s, 0, 0), value);
    return ST_CHECK;
}

static VALUE
tk_symbolkey2str(self, keys)
    VALUE self;
    VALUE keys;
{
    volatile VALUE new_keys = rb_hash_new();

    if NIL_P(keys) return new_keys;
    keys = rb_convert_type(keys, T_HASH, "Hash", "to_hash");
    st_foreach(RHASH(keys)->tbl, to_strkey, new_keys);
    return new_keys;
}

static VALUE get_eval_string_core _((VALUE, VALUE, VALUE));
static VALUE ary2list _((VALUE, VALUE, VALUE));
static VALUE ary2list2 _((VALUE, VALUE, VALUE));
static VALUE hash2list _((VALUE, VALUE));
static VALUE hash2list_enc _((VALUE, VALUE));
static VALUE hash2kv _((VALUE, VALUE, VALUE));
static VALUE hash2kv_enc _((VALUE, VALUE, VALUE));

static VALUE
ary2list(ary, enc_flag, self)
    VALUE ary;
    VALUE enc_flag;
    VALUE self;
{
    int idx, idx2, size, size2, req_chk_flag;
    volatile VALUE val, val2, str_val;
    volatile VALUE dst;
    volatile VALUE sys_enc, dst_enc, str_enc;

    sys_enc = rb_funcall(cTclTkLib, ID_encoding, 0, 0);
    if (NIL_P(sys_enc)) {
      sys_enc = rb_funcall(cTclTkLib, ID_encoding_system, 0, 0);
      sys_enc = rb_funcall(sys_enc, ID_to_s, 0, 0);
    }

    if NIL_P(enc_flag) {
        dst_enc = sys_enc;
        req_chk_flag = 1;
    } else if (TYPE(enc_flag) == T_TRUE || TYPE(enc_flag) == T_FALSE) {
        dst_enc = enc_flag;
        req_chk_flag = 0;
    } else {
        dst_enc = rb_funcall(enc_flag, ID_to_s, 0, 0);
        req_chk_flag = 0;
    }

    /* size = RARRAY(ary)->len; */
    size = 0;
    for(idx = 0; idx < RARRAY(ary)->len; idx++) {
        if (TYPE(RARRAY(ary)->ptr[idx]) == T_HASH) {
            size += 2 * RHASH(RARRAY(ary)->ptr[idx])->tbl->num_entries;
        } else {
            size++;
        }
    }

    dst = rb_ary_new2(size);
    RARRAY(dst)->len = 0;
    for(idx = 0; idx < RARRAY(ary)->len; idx++) {
        val = RARRAY(ary)->ptr[idx];
        str_val = Qnil;
        switch(TYPE(val)) {
        case T_ARRAY:
            str_val = ary2list(val, enc_flag, self);
            RARRAY(dst)->ptr[RARRAY(dst)->len++] = str_val;

            if (req_chk_flag) {
                str_enc = rb_ivar_get(str_val, ID_at_enc);
                if (!NIL_P(str_enc)) {
                    str_enc = rb_funcall(str_enc, ID_to_s, 0, 0);
                } else {
                    str_enc = sys_enc;
                }
                if (!rb_str_cmp(str_enc, dst_enc)) {
                    dst_enc = Qtrue;
                    req_chk_flag = 0;
                }
            }

            break;

        case T_HASH:
            /* RARRAY(dst)->ptr[RARRAY(dst)->len++] = hash2list(val, self); */
            if (RTEST(enc_flag)) {
                val = hash2kv_enc(val, Qnil, self);
            } else {
                val = hash2kv(val, Qnil, self);
            }
            size2 = RARRAY(val)->len;
            for(idx2 = 0; idx2 < size2; idx2++) {
                val2 = RARRAY(val)->ptr[idx2];
                switch(TYPE(val2)) {
                case T_ARRAY:
                    str_val = ary2list(val2, enc_flag, self);
                    RARRAY(dst)->ptr[RARRAY(dst)->len++] = str_val;
                    break;

                case T_HASH:
                    if (RTEST(enc_flag)) {
                        str_val = hash2list_enc(val2, self);
                    } else {
                        str_val = hash2list(val2, self);
                    }
                    RARRAY(dst)->ptr[RARRAY(dst)->len++] = str_val;
                    break;

                default:
                    if (val2 != TK_None) {
                        str_val = get_eval_string_core(val2, enc_flag, self);
                        RARRAY(dst)->ptr[RARRAY(dst)->len++] = str_val;
                    }
                }

                if (req_chk_flag) {
                    str_enc = rb_ivar_get(str_val, ID_at_enc);
                    if (!NIL_P(str_enc)) {
                        str_enc = rb_funcall(str_enc, ID_to_s, 0, 0);
                    } else {
                        str_enc = sys_enc;
                    }
                    if (!rb_str_cmp(str_enc, dst_enc)) {
                        dst_enc = Qtrue;
                        req_chk_flag = 0;
                    }
                }
            }
            break;

        default:
            if (val != TK_None) {
                str_val = get_eval_string_core(val, enc_flag, self);
                RARRAY(dst)->ptr[RARRAY(dst)->len++] = str_val;

                if (req_chk_flag) {
                    str_enc = rb_ivar_get(str_val, ID_at_enc);
                    if (!NIL_P(str_enc)) {
                        str_enc = rb_funcall(str_enc, ID_to_s, 0, 0);
                    } else {
                        str_enc = sys_enc;
                    }
                    if (!rb_str_cmp(str_enc, dst_enc)) {
                        dst_enc = Qtrue;
                        req_chk_flag = 0;
                    }
                }
            }
        }
    }

    if (RTEST(dst_enc) && !NIL_P(sys_enc)) {
        for(idx = 0; idx < RARRAY(dst)->len; idx++) {
            str_val = RARRAY(dst)->ptr[idx];
            if (rb_obj_respond_to(self, ID_toUTF8, Qtrue)) {
                str_val = rb_funcall(self, ID_toUTF8, 1, str_val);
            } else {
                str_val = rb_funcall(cTclTkLib, ID_toUTF8, 1, str_val);
            }
            RARRAY(dst)->ptr[idx] = str_val;
        }
        val = rb_apply(cTclTkLib, ID_merge_tklist, dst);
        if (TYPE(dst_enc) == T_STRING) {
            val = rb_funcall(cTclTkLib, ID_fromUTF8, 2, val, dst_enc);
            rb_ivar_set(val, ID_at_enc, dst_enc);
        } else {
            rb_ivar_set(val, ID_at_enc, rb_str_new2("utf-8"));
        }
        return val;
    } else {
        return rb_apply(cTclTkLib, ID_merge_tklist, dst);
    }
}

static VALUE
ary2list2(ary, enc_flag, self)
    VALUE ary;
    VALUE enc_flag;
    VALUE self;
{
    int idx, size, req_chk_flag;
    volatile VALUE val, str_val;
    volatile VALUE dst;
    volatile VALUE sys_enc, dst_enc, str_enc;

    sys_enc = rb_funcall(cTclTkLib, ID_encoding, 0, 0);
    if NIL_P(sys_enc) {
      sys_enc = rb_funcall(cTclTkLib, ID_encoding_system, 0, 0);
      sys_enc = rb_funcall(sys_enc, ID_to_s, 0, 0);
    }

    if NIL_P(enc_flag) {
        dst_enc = sys_enc;
        req_chk_flag = 1;
    } else if (TYPE(enc_flag) == T_TRUE || TYPE(enc_flag) == T_FALSE) {
        dst_enc = enc_flag;
        req_chk_flag = 0;
    } else {
        dst_enc = rb_funcall(enc_flag, ID_to_s, 0, 0);
        req_chk_flag = 0;
    }

    size = RARRAY(ary)->len;
    dst = rb_ary_new2(size);
    RARRAY(dst)->len = 0;
    for(idx = 0; idx < RARRAY(ary)->len; idx++) {
        val = RARRAY(ary)->ptr[idx];
        str_val = Qnil;
        switch(TYPE(val)) {
        case T_ARRAY:
            str_val = ary2list(val, enc_flag, self);
            break;

        case T_HASH:
            if (RTEST(enc_flag)) {
                str_val = hash2list(val, self);
            } else {
                str_val = hash2list_enc(val, self);
            }
            break;

        default:
            if (val != TK_None) {
                str_val = get_eval_string_core(val, enc_flag, self);
            }
        }

        if (!NIL_P(str_val)) {
            RARRAY(dst)->ptr[RARRAY(dst)->len++] = str_val;

            if (req_chk_flag) {
                str_enc = rb_ivar_get(str_val, ID_at_enc);
                if (!NIL_P(str_enc)) {
                    str_enc = rb_funcall(str_enc, ID_to_s, 0, 0);
                } else {
                    str_enc = sys_enc;
                }
                if (!rb_str_cmp(str_enc, dst_enc)) {
                    dst_enc = Qtrue;
                    req_chk_flag = 0;
                }
            }
        }
    }

    if (RTEST(dst_enc) && !NIL_P(sys_enc)) {
        for(idx = 0; idx < RARRAY(dst)->len; idx++) {
            str_val = RARRAY(dst)->ptr[idx];
            if (rb_obj_respond_to(self, ID_toUTF8, Qtrue)) {
                str_val = rb_funcall(self, ID_toUTF8, 1, str_val);
            } else {
                str_val = rb_funcall(cTclTkLib, ID_toUTF8, 1, str_val);
            }
            RARRAY(dst)->ptr[idx] = str_val;
        }
        val = rb_apply(cTclTkLib, ID_merge_tklist, dst);
        if (TYPE(dst_enc) == T_STRING) {
            val = rb_funcall(cTclTkLib, ID_fromUTF8, 2, val, dst_enc);
            rb_ivar_set(val, ID_at_enc, dst_enc);
        } else {
            rb_ivar_set(val, ID_at_enc, rb_str_new2("utf-8"));
        }
        return val;
    } else {
        return rb_apply(cTclTkLib, ID_merge_tklist, dst);
    }
}

static VALUE
key2keyname(key)
    VALUE key;
{
    return rb_str_append(rb_str_new2("-"), rb_funcall(key, ID_to_s, 0, 0));
}

static VALUE
assoc2kv(assoc, ary, self)
    VALUE assoc;
    VALUE ary;
    VALUE self;
{
    int i, j, len;
    volatile VALUE pair;
    volatile VALUE val;
    volatile VALUE dst = rb_ary_new2(2 * RARRAY(assoc)->len);

    len = RARRAY(assoc)->len;

    for(i = 0; i < len; i++) {
        pair = RARRAY(assoc)->ptr[i];
        if (TYPE(pair) != T_ARRAY) {
            RARRAY(dst)->ptr[RARRAY(dst)->len++] = key2keyname(pair);
            continue;
        }
        switch(RARRAY(assoc)->len) {
        case 2:
            RARRAY(dst)->ptr[RARRAY(dst)->len++] = RARRAY(pair)->ptr[2];

        case 1:
            RARRAY(dst)->ptr[RARRAY(dst)->len++]
                = key2keyname(RARRAY(pair)->ptr[0]);

        case 0:
            continue;

        default:
            RARRAY(dst)->ptr[RARRAY(dst)->len++]
                = key2keyname(RARRAY(pair)->ptr[0]);

            val = rb_ary_new2(RARRAY(pair)->len - 1);
            RARRAY(val)->len = 0;
            for(j = 1; j < RARRAY(pair)->len; j++) {
                RARRAY(val)->ptr[RARRAY(val)->len++] = RARRAY(pair)->ptr[j];
            }

            RARRAY(dst)->ptr[RARRAY(dst)->len++] = val;
        }
    }

    if (NIL_P(ary)) {
        return dst;
    } else {
        return rb_ary_plus(ary, dst);
    }
}

static VALUE
assoc2kv_enc(assoc, ary, self)
    VALUE assoc;
    VALUE ary;
    VALUE self;
{
    int i, j, len;
    volatile VALUE pair;
    volatile VALUE val;
    volatile VALUE dst = rb_ary_new2(2 * RARRAY(assoc)->len);

    len = RARRAY(assoc)->len;

    for(i = 0; i < len; i++) {
        pair = RARRAY(assoc)->ptr[i];
        if (TYPE(pair) != T_ARRAY) {
            RARRAY(dst)->ptr[RARRAY(dst)->len++] = key2keyname(pair);
            continue;
        }
        switch(RARRAY(assoc)->len) {
        case 2:
            RARRAY(dst)->ptr[RARRAY(dst)->len++]
                = get_eval_string_core(RARRAY(pair)->ptr[2], Qtrue, self);

        case 1:
            RARRAY(dst)->ptr[RARRAY(dst)->len++]
                = key2keyname(RARRAY(pair)->ptr[0]);

        case 0:
            continue;

        default:
            RARRAY(dst)->ptr[RARRAY(dst)->len++]
                = key2keyname(RARRAY(pair)->ptr[0]);

            val = rb_ary_new2(RARRAY(pair)->len - 1);
            RARRAY(val)->len = 0;
            for(j = 1; j < RARRAY(pair)->len; j++) {
                RARRAY(val)->ptr[RARRAY(val)->len++] = RARRAY(pair)->ptr[j];
            }

            RARRAY(dst)->ptr[RARRAY(dst)->len++]
                = get_eval_string_core(val, Qtrue, self);
        }
    }

    if (NIL_P(ary)) {
        return dst;
    } else {
        return rb_ary_plus(ary, dst);
    }
}

static int
push_kv(key, val, args)
    VALUE key;
    VALUE val;
    VALUE args;
{
    volatile VALUE ary;

    ary = RARRAY(args)->ptr[0];

    if (key == Qundef) return ST_CONTINUE;
#if 0
    rb_ary_push(ary, key2keyname(key));
    if (val != TK_None) rb_ary_push(ary, val);
#endif
    RARRAY(ary)->ptr[RARRAY(ary)->len++] = key2keyname(key);

    if (val == TK_None) return ST_CHECK;

    RARRAY(ary)->ptr[RARRAY(ary)->len++]
        = get_eval_string_core(val, Qnil, RARRAY(args)->ptr[1]);

    return ST_CHECK;
}

static VALUE
hash2kv(hash, ary, self)
    VALUE hash;
    VALUE ary;
    VALUE self;
{
    volatile VALUE args = rb_ary_new2(2);
    volatile VALUE dst = rb_ary_new2(2 * RHASH(hash)->tbl->num_entries);

    RARRAY(dst)->len = 0;

    RARRAY(args)->ptr[0] = dst;
    RARRAY(args)->ptr[1] = self;
    RARRAY(args)->len = 2;
    st_foreach(RHASH(hash)->tbl, push_kv, args);

    if (NIL_P(ary)) {
        return dst;
    } else {
        return rb_ary_concat(ary, dst);
    }
}

static int
push_kv_enc(key, val, args)
    VALUE key;
    VALUE val;
    VALUE args;
{
    volatile VALUE ary;

    ary = RARRAY(args)->ptr[0];

    if (key == Qundef) return ST_CONTINUE;
#if 0
    rb_ary_push(ary, key2keyname(key));
    if (val != TK_None) {
        rb_ary_push(ary, get_eval_string_core(val, Qtrue,
                                              RARRAY(args)->ptr[1]));
    }
#endif
    RARRAY(ary)->ptr[RARRAY(ary)->len++] = key2keyname(key);

    if (val == TK_None) return ST_CHECK;

    RARRAY(ary)->ptr[RARRAY(ary)->len++]
        = get_eval_string_core(val, Qtrue, RARRAY(args)->ptr[1]);

    return ST_CHECK;
}

static VALUE
hash2kv_enc(hash, ary, self)
    VALUE hash;
    VALUE ary;
    VALUE self;
{
    volatile VALUE args = rb_ary_new2(2);
    volatile VALUE dst = rb_ary_new2(2 * RHASH(hash)->tbl->num_entries);

    RARRAY(dst)->len = 0;

    RARRAY(args)->ptr[0] = dst;
    RARRAY(args)->ptr[1] = self;
    RARRAY(args)->len = 2;
    st_foreach(RHASH(hash)->tbl, push_kv_enc, args);

    if (NIL_P(ary)) {
        return dst;
    } else {
        return rb_ary_concat(ary, dst);
    }
}

static VALUE
hash2list(hash, self)
    VALUE hash;
    VALUE self;
{
    return ary2list2(hash2kv(hash, Qnil, self), Qfalse, self);
}

static VALUE
hash2list_enc(hash, self)
    VALUE hash;
    VALUE self;
{
    return ary2list2(hash2kv_enc(hash, Qnil, self), Qfalse, self);
}

static VALUE
tk_hash_kv(argc, argv, self)
    int   argc;
    VALUE *argv;
    VALUE self;
{
    volatile VALUE hash, enc_flag, ary;

    ary = Qnil;
    enc_flag = Qnil;
    switch(argc) {
    case 3:
        ary = argv[2];
    case 2:
        enc_flag = argv[1];
    case 1:
        hash = argv[0];
        break;
    case 0:
        rb_raise(rb_eArgError, "too few arguments");
    default: /* >= 3 */
        rb_raise(rb_eArgError, "too many arguments");
    }

    switch(TYPE(hash)) {
    case T_ARRAY:
        if (RTEST(enc_flag)) {
            return assoc2kv_enc(hash, ary, self);
        } else {
            return assoc2kv(hash, ary, self);
        }

    case T_HASH:
        if (RTEST(enc_flag)) {
            return hash2kv_enc(hash, ary, self);
        } else {
            return hash2kv(hash, ary, self);
        }

    case T_NIL:
        if (NIL_P(ary)) {
            return rb_ary_new();
        } else {
            return ary;
        }

    default:
        if (hash == TK_None) {
            if (NIL_P(ary)) {
                return rb_ary_new();
            } else {
                return ary;
            }
        }
        rb_raise(rb_eArgError, "Hash is expected for 1st argument");
    }
}

static VALUE
get_eval_string_core(obj, enc_flag, self)
    VALUE obj;
    VALUE enc_flag;
    VALUE self;
{
    switch(TYPE(obj)) {
    case T_FLOAT:
    case T_FIXNUM:
    case T_BIGNUM:
        return rb_funcall(obj, ID_to_s, 0, 0);

    case T_STRING:
        if (RTEST(enc_flag)) {
            if (rb_obj_respond_to(self, ID_toUTF8, Qtrue)) {
                return rb_funcall(self, ID_toUTF8, 1, obj);
            } else {
                return fromDefaultEnc_toUTF8(obj, self);
            }
        } else {
            return obj;
        }

    case T_SYMBOL:
        if (RTEST(enc_flag)) {
            if (rb_obj_respond_to(self, ID_toUTF8, Qtrue)) {
                return rb_funcall(self, ID_toUTF8, 1,
                                  rb_str_new2(rb_id2name(SYM2ID(obj))));
            } else {
                return fromDefaultEnc_toUTF8(rb_str_new2(rb_id2name(SYM2ID(obj))), self);
            }
        } else {
            return rb_str_new2(rb_id2name(SYM2ID(obj)));
        }

    case T_HASH:
        if (RTEST(enc_flag)) {
            return hash2list_enc(obj, self);
        } else {
            return hash2list(obj, self);
        }

    case T_ARRAY:
        return ary2list(obj, enc_flag, self);

    case T_FALSE:
        return rb_str_new2("0");

    case T_TRUE:
        return rb_str_new2("1");

    case T_NIL:
        return rb_str_new2("");

    case T_REGEXP:
        return rb_funcall(obj, ID_source, 0, 0);

    default:
        if (rb_obj_is_kind_of(obj, cTkObject)) {
            /* return rb_str_new3(rb_funcall(obj, ID_path, 0, 0)); */
            return get_eval_string_core(rb_funcall(obj, ID_path, 0, 0),
                                        enc_flag, self);
        }

        if (rb_obj_is_kind_of(obj, rb_cProc)
            || rb_obj_is_kind_of(obj, cMethod)
            || rb_obj_is_kind_of(obj, cTkCallbackEntry)) {
            if (rb_obj_respond_to(self, ID_install_cmd, Qtrue)) {
                return rb_funcall(self, ID_install_cmd, 1, obj);
            } else {
                return tk_install_cmd_core(obj);
            }
        }

        if (obj == TK_None)  return Qnil;

        if (rb_obj_respond_to(obj, ID_to_eval, Qtrue)) {
            /* return rb_funcall(obj, ID_to_eval, 0, 0); */
            return get_eval_string_core(rb_funcall(obj, ID_to_eval, 0, 0),
                                        enc_flag, self);
        } else if (rb_obj_respond_to(obj, ID_path, Qtrue)) {
            /* return rb_funcall(obj, ID_path, 0, 0); */
            return get_eval_string_core(rb_funcall(obj, ID_path, 0, 0),
                                        enc_flag, self);
        } else if (rb_obj_respond_to(obj, ID_to_s, Qtrue)) {
            return rb_funcall(obj, ID_to_s, 0, 0);
        }
    }

    rb_warning("fail to convert '%s' to string for Tk",
               RSTRING(rb_funcall(obj, rb_intern("inspect"), 0, 0))->ptr);

    return obj;
}

static VALUE
tk_get_eval_string(argc, argv, self)
    int   argc;
    VALUE *argv;
    VALUE self;
{
    volatile VALUE obj, enc_flag;

    if (rb_scan_args(argc, argv, "11", &obj, &enc_flag) == 1) {
        enc_flag = Qnil;
    }

    return get_eval_string_core(obj, enc_flag, self);
}

static VALUE
tk_get_eval_enc_str(self, obj)
    VALUE self;
    VALUE obj;
{
    if (obj == TK_None) {
        return obj;
    } else {
        return get_eval_string_core(obj, Qtrue, self);
    }
}

static VALUE
tk_conv_args(argc, argv, self)
    int   argc;
    VALUE *argv; /* [0]:base_array, [1]:enc_mode, [2]..[n]:args */
    VALUE self;
{
    int idx, size;
    volatile VALUE dst;
    int thr_crit_bup;
    VALUE old_gc;

    if (argc < 2) {
      rb_raise(rb_eArgError, "too few arguments");
    }

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;
    old_gc = rb_gc_disable();

    for(size = 0, idx = 2; idx < argc; idx++) {
        if (TYPE(argv[idx]) == T_HASH) {
            size += 2 * RHASH(argv[idx])->tbl->num_entries;
        } else {
            size++;
        }
    }
    /* dst = rb_ary_new2(argc - 2); */
    dst = rb_ary_new2(size);
    RARRAY(dst)->len = 0;
    for(idx = 2; idx < argc; idx++) {
        if (TYPE(argv[idx]) == T_HASH) {
            if (RTEST(argv[1])) {
                hash2kv_enc(argv[idx], dst, self);
            } else {
                hash2kv(argv[idx], dst, self);
            }
        } else if (argv[idx] != TK_None) {
            RARRAY(dst)->ptr[RARRAY(dst)->len++]
                = get_eval_string_core(argv[idx], argv[1], self);
        }
    }

    if (old_gc == Qfalse) rb_gc_enable();
    rb_thread_critical = thr_crit_bup;

    return rb_ary_plus(argv[0], dst);
}

/*************************************/

static VALUE
tcl2rb_bool(self, value)
    VALUE self;
    VALUE value;
{
    if (TYPE(value) == T_FIXNUM) {
        if (NUM2INT(value) == 0) {
            return Qfalse;
        } else {
            return Qtrue;
        }
    }

    if (TYPE(value) == T_TRUE || TYPE(value) == T_FALSE) {
        return value;
    }

    rb_check_type(value, T_STRING);

    value = rb_funcall(value, ID_downcase, 0);

    if (RSTRING(value)->ptr == (char*)NULL) return Qnil;

    if (RSTRING(value)->ptr[0] == '\0'
        || strcmp(RSTRING(value)->ptr, "0") == 0
        || strcmp(RSTRING(value)->ptr, "no") == 0
        || strcmp(RSTRING(value)->ptr, "off") == 0
        || strcmp(RSTRING(value)->ptr, "false") == 0) {
        return Qfalse;
    } else {
        return Qtrue;
    }
}

static VALUE
tkstr_to_dec(value)
    VALUE value;
{
    return rb_cstr_to_inum(RSTRING(value)->ptr, 10, 1);
}

static VALUE
tkstr_to_int(value)
    VALUE value;
{
    return rb_cstr_to_inum(RSTRING(value)->ptr, 0, 1);
}

static VALUE
tkstr_to_float(value)
    VALUE value;
{
    return rb_float_new(rb_cstr_to_dbl(RSTRING(value)->ptr, 1));
}

static VALUE
tkstr_invalid_numstr(value)
    VALUE value;
{
    rb_raise(rb_eArgError,
             "invalid value for Number: '%s'", RSTRING(value)->ptr);
    return Qnil; /*dummy*/
}

static VALUE
tkstr_rescue_float(value)
    VALUE value;
{
    return rb_rescue2(tkstr_to_float, value,
                      tkstr_invalid_numstr, value,
                      rb_eArgError, 0);
}

static VALUE
tkstr_to_number(value)
    VALUE value;
{
    rb_check_type(value, T_STRING);

    if (RSTRING(value)->ptr == (char*)NULL) return INT2FIX(0);

    return rb_rescue2(tkstr_to_int, value,
                      tkstr_rescue_float, value,
                      rb_eArgError, 0);
}

static VALUE
tcl2rb_number(self, value)
    VALUE self;
    VALUE value;
{
    return tkstr_to_number(value);
}

static VALUE
tkstr_to_str(value)
    VALUE value;
{
    char * ptr;
    int len;

    ptr = RSTRING(value)->ptr;
    len = RSTRING(value)->len;

    if (len > 1 && *ptr == '{' && *(ptr + len - 1) == '}') {
        return rb_str_new(ptr + 1, len - 2);
    }
    return value;
}

static VALUE
tcl2rb_string(self, value)
    VALUE self;
    VALUE value;
{
    rb_check_type(value, T_STRING);

    if (RSTRING(value)->ptr == (char*)NULL) return rb_tainted_str_new2("");

    return tkstr_to_str(value);
}

static VALUE
tcl2rb_num_or_str(self, value)
    VALUE self;
    VALUE value;
{
    rb_check_type(value, T_STRING);

    if (RSTRING(value)->ptr == (char*)NULL) return rb_tainted_str_new2("");

    return rb_rescue2(tkstr_to_number, value,
                      tkstr_to_str, value,
                      rb_eArgError, 0);
}

/*************************************/

struct cbsubst_info {
    int   size;
    char  *key;
    char  *type;
    ID    *ivar;
    VALUE proc;
    VALUE aliases;
};

static void
subst_mark(ptr)
    struct cbsubst_info *ptr;
{
    rb_gc_mark(ptr->proc);
    rb_gc_mark(ptr->aliases);
}

static void
subst_free(ptr)
    struct cbsubst_info *ptr;
{
    if (ptr) {
        if (ptr->key != (char*)NULL) free(ptr->key);
        if (ptr->type != (char*)NULL) free(ptr->type);
        if (ptr->ivar != (ID*)NULL) free(ptr->ivar);
        free(ptr);
    }
}

static void
cbsubst_init()
{
    struct cbsubst_info *inf;
    ID *ivar;
    volatile VALUE proc, aliases;

    inf = ALLOC(struct cbsubst_info);

    inf->size = 0;

    inf->key = ALLOC_N(char, 1);
    inf->key[0] = '\0';

    inf->type = ALLOC_N(char, 1);
    inf->type[0] = '\0';

    ivar = ALLOC_N(ID, 1);
    inf->ivar = ivar;

    proc = rb_hash_new();
    inf->proc = proc;

    aliases = rb_hash_new();
    inf->aliases = aliases;

    rb_const_set(cCB_SUBST, ID_SUBST_INFO,
                 Data_Wrap_Struct(cSUBST_INFO, subst_mark, subst_free, inf));
}

static VALUE
cbsubst_initialize(argc, argv, self)
    int   argc;
    VALUE *argv;
    VALUE self;
{
    struct cbsubst_info *inf;
    int idx;

    Data_Get_Struct(rb_const_get(rb_obj_class(self), ID_SUBST_INFO),
                    struct cbsubst_info, inf);

    for(idx = 0; idx < argc; idx++) {
        rb_ivar_set(self, inf->ivar[idx], argv[idx]);
    }

    return self;
}

static VALUE
cbsubst_ret_val(self, val)
    VALUE self;
    VALUE val;
{
    return val;
}

static int
each_attr_def(key, value, klass)
    VALUE key, value, klass;
{
    ID key_id, value_id;

    if (key == Qundef) return ST_CONTINUE;

    switch(TYPE(key)) {
    case T_STRING:
        key_id = rb_intern(RSTRING(key)->ptr);
        break;
    case T_SYMBOL:
        key_id = SYM2ID(key);
        break;
    default:
        rb_raise(rb_eArgError,
                 "includes invalid key(s). expected a String or a Symbol");
    }

    switch(TYPE(value)) {
    case T_STRING:
        value_id = rb_intern(RSTRING(value)->ptr);
        break;
    case T_SYMBOL:
        value_id = SYM2ID(value);
        break;
    default:
        rb_raise(rb_eArgError,
                 "includes invalid value(s). expected a String or a Symbol");
    }

    rb_alias(klass, key_id, value_id);

    return ST_CONTINUE;
}

static VALUE
cbsubst_def_attr_aliases(self, tbl)
    VALUE self;
    VALUE tbl;
{
    struct cbsubst_info *inf;

    if (TYPE(tbl) != T_HASH) {
        rb_raise(rb_eArgError, "expected a Hash");
    }

    Data_Get_Struct(rb_const_get(self, ID_SUBST_INFO),
                    struct cbsubst_info, inf);

    rb_hash_foreach(tbl, each_attr_def, self);

    return rb_funcall(inf->aliases, rb_intern("update"), 1, tbl);
}

static VALUE
cbsubst_get_subst_arg(argc, argv, self)
    int   argc;
    VALUE *argv;
    VALUE self;
{
    struct cbsubst_info *inf;
    char *str, *buf, *ptr;
    int i, j, len;
    ID id;
    volatile VALUE arg_sym, ret;

    Data_Get_Struct(rb_const_get(self, ID_SUBST_INFO),
                    struct cbsubst_info, inf);

    buf = ALLOC_N(char, 3*argc + 1);
    ptr = buf;
    len = strlen(inf->key);

    for(i = 0; i < argc; i++) {
        switch(TYPE(argv[i])) {
        case T_STRING:
            str = RSTRING(argv[i])->ptr;
            arg_sym = ID2SYM(rb_intern(str));
            break;
        case T_SYMBOL:
            arg_sym = argv[i];
            str = rb_id2name(SYM2ID(arg_sym));
            break;
        default:
            rb_raise(rb_eArgError, "arg #%d is not a String or a Symbol", i);
        }

        if (!NIL_P(ret = rb_hash_aref(inf->aliases, arg_sym))) {
            str = rb_id2name(SYM2ID(ret));
        }

        id = rb_intern(RSTRING(rb_str_cat2(rb_str_new2("@"), str))->ptr);

        for(j = 0; j < len; j++) {
            if (inf->ivar[j] == id) break;
        }

        if (j >= len) {
            rb_raise(rb_eArgError, "cannot find attribute :%s", str);
        }

        *(ptr++) = '%';
        *(ptr++) = *(inf->key + j);
        *(ptr++) = ' ';
    }

    *ptr = '\0';

    ret = rb_str_new2(buf);

    free(buf);

    return ret;
}

static VALUE
cbsubst_get_subst_key(self, str)
    VALUE self;
    VALUE str;
{
    volatile VALUE list;
    volatile VALUE ret;
    int i, len;
    char *buf, *ptr;

    list = rb_funcall(cTclTkLib, ID_split_tklist, 1, str);

    len = RARRAY(list)->len;
    buf = ALLOC_N(char, len + 1);

    for(i = 0; i < len; i++) {
        ptr = RSTRING(RARRAY(list)->ptr[i])->ptr;
        if (*ptr == '%' && *(ptr + 2) == '\0') {
            *(buf + i) = *(ptr + 1);
        } else {
            *(buf + i) = ' ';
        }
    }
    *(buf + len) = '\0';

    ret = rb_str_new2(buf);
    free(buf);
    return ret;
}

static VALUE
cbsubst_get_all_subst_keys(self)
    VALUE self;
{
    struct cbsubst_info *inf;
    char *buf, *ptr;
    int i, len;
    volatile VALUE ret;

    Data_Get_Struct(rb_const_get(self, ID_SUBST_INFO),
                    struct cbsubst_info, inf);

    len = strlen(inf->key);
    buf = ALLOC_N(char, 3*len + 1);
    ptr = buf;
    for(i = 0; i < len; i++) {
        *(ptr++) = '%';
        *(ptr++) = *(inf->key + i);
        *(ptr++) = ' ';
    }
    *(buf + 3*len) = '\0';

    ret = rb_ary_new3(2, rb_str_new2(inf->key), rb_str_new2(buf));

    free(buf);

    return ret;
}

static VALUE
cbsubst_table_setup(self, key_inf, proc_inf)
    VALUE self;
    VALUE key_inf;
    VALUE proc_inf;
{
    struct cbsubst_info *subst_inf;
    int idx;
    int len = RARRAY(key_inf)->len;
    int real_len = 0;
    char *key = ALLOC_N(char, len + 1);
    char *type = ALLOC_N(char, len + 1);
    ID *ivar = ALLOC_N(ID, len + 1);
    volatile VALUE proc = rb_hash_new();
    volatile VALUE aliases = rb_hash_new();
    volatile VALUE inf;

    /* init */
    subst_inf = ALLOC(struct cbsubst_info);
    /* subst_inf->size = len; */
    subst_inf->key  = key;
    subst_inf->type = type;
    subst_inf->ivar = ivar;
    subst_inf->proc = proc;
    subst_inf->aliases = aliases;

    /*
     * keys : array of [subst, type, ivar]
     *         subst ==> char code
     *         type  ==> char code
     *         ivar  ==> symbol
     */
    for(idx = 0; idx < len; idx++) {
        inf = RARRAY(key_inf)->ptr[idx];
        if (TYPE(inf) != T_ARRAY) continue;
        *(key  + real_len) = (char)NUM2INT(RARRAY(inf)->ptr[0]);
        *(type + real_len) = (char)NUM2INT(RARRAY(inf)->ptr[1]);

        *(ivar + real_len)
            = rb_intern(
                RSTRING(
                  rb_str_cat2(rb_str_new2("@"),
                              rb_id2name(SYM2ID(RARRAY(inf)->ptr[2])))
                )->ptr
              );

        rb_attr(self, SYM2ID(RARRAY(inf)->ptr[2]), 1, 0, Qtrue);
        real_len++;
    }
    *(key + real_len) = '\0';
    *(type + real_len) = '\0';
    subst_inf->size = real_len;

    /*
     * procs : array of [type, proc]
     *         type  ==> char code
     *         proc  ==> proc/method/obj (must respond to 'call')
     */
    len = RARRAY(proc_inf)->len;
    for(idx = 0; idx < len; idx++) {
        inf = RARRAY(proc_inf)->ptr[idx];
        if (TYPE(inf) != T_ARRAY) continue;
        rb_hash_aset(proc, RARRAY(inf)->ptr[0], RARRAY(inf)->ptr[1]);
    }

    rb_const_set(self, ID_SUBST_INFO,
                 Data_Wrap_Struct(cSUBST_INFO, subst_mark,
                                  subst_free, subst_inf));

    return self;
}

static VALUE
cbsubst_get_extra_args_tbl(self)
    VALUE self;
{
  return rb_ary_new();
}

static VALUE
cbsubst_scan_args(self, arg_key, val_ary)
    VALUE self;
    VALUE arg_key;
    VALUE val_ary;
{
    struct cbsubst_info *inf;
    int idx;
    int len = RARRAY(val_ary)->len;
    char c;
    char *ptr;
    volatile VALUE dst = rb_ary_new2(len);
    volatile VALUE proc;
    int thr_crit_bup;
    VALUE old_gc;

    thr_crit_bup = rb_thread_critical;
    rb_thread_critical = Qtrue;

    old_gc = rb_gc_disable();

    Data_Get_Struct(rb_const_get(self, ID_SUBST_INFO),
                    struct cbsubst_info, inf);

    RARRAY(dst)->len = 0;
    for(idx = 0; idx < len; idx++) {
        if (idx >= RSTRING(arg_key)->len) {
            proc = Qnil;
        } else if (*(RSTRING(arg_key)->ptr + idx) == ' ') {
            proc = Qnil;
        } else {
          ptr = strchr(inf->key, *(RSTRING(arg_key)->ptr + idx));
          if (ptr == (char*)NULL) {
            proc = Qnil;
          } else {
            c = *(inf->type + (ptr - inf->key));
            proc = rb_hash_aref(inf->proc, INT2FIX(c));
          }
        }

        if (NIL_P(proc)) {
            RARRAY(dst)->ptr[RARRAY(dst)->len++] = RARRAY(val_ary)->ptr[idx];
        } else {
            RARRAY(dst)->ptr[RARRAY(dst)->len++]
                = rb_funcall(proc, ID_call, 1, RARRAY(val_ary)->ptr[idx]);
        }
    }

    if (old_gc == Qfalse) rb_gc_enable();
    rb_thread_critical = thr_crit_bup;

    return dst;
}

static VALUE
cbsubst_inspect(self)
    VALUE self;
{
    return rb_str_new2("CallbackSubst");
}

static VALUE
substinfo_inspect(self)
    VALUE self;
{
    return rb_str_new2("SubstInfo");
}

/*************************************/

static VALUE
tk_cbe_inspect(self)
    VALUE self;
{
    return rb_str_new2("TkCallbackEntry");
}

/*************************************/

static VALUE
tkobj_path(self)
    VALUE self;
{
    return rb_ivar_get(self, ID_at_path);
}

/*************************************/
/* release date */
const char tkutil_release_date[] = TKUTIL_RELEASE_DATE;

void
Init_tkutil()
{
    VALUE cTK = rb_define_class("TkKernel", rb_cObject);
    VALUE mTK = rb_define_module("TkUtil");

    /* --------------------- */

    rb_define_const(mTK, "RELEASE_DATE",
                    rb_obj_freeze(rb_str_new2(tkutil_release_date)));

    /* --------------------- */
    rb_global_variable(&cMethod);
    cMethod = rb_const_get(rb_cObject, rb_intern("Method"));

    ID_path = rb_intern("path");
    ID_at_path = rb_intern("@path");
    ID_at_enc = rb_intern("@encoding");
    ID_to_eval = rb_intern("to_eval");
    ID_to_s = rb_intern("to_s");
    ID_source = rb_intern("source");
    ID_downcase = rb_intern("downcase");
    ID_install_cmd = rb_intern("install_cmd");
    ID_merge_tklist = rb_intern("_merge_tklist");
    ID_encoding = rb_intern("encoding");
    ID_encoding_system = rb_intern("encoding_system");
    ID_call = rb_intern("call");

    /* --------------------- */
    cCB_SUBST = rb_define_class_under(mTK, "CallbackSubst", rb_cObject);
    rb_define_singleton_method(cCB_SUBST, "inspect", cbsubst_inspect, 0);

    cSUBST_INFO = rb_define_class_under(cCB_SUBST, "Info", rb_cObject);
    rb_define_singleton_method(cSUBST_INFO, "inspect", substinfo_inspect, 0);

    ID_SUBST_INFO = rb_intern("SUBST_INFO");
    rb_define_singleton_method(cCB_SUBST, "ret_val", cbsubst_ret_val, 1);
    rb_define_singleton_method(cCB_SUBST, "scan_args", cbsubst_scan_args, 2);
    rb_define_singleton_method(cCB_SUBST, "subst_arg",
                               cbsubst_get_subst_arg, -1);
    rb_define_singleton_method(cCB_SUBST, "_get_subst_key",
                               cbsubst_get_subst_key,  1);
    rb_define_singleton_method(cCB_SUBST, "_get_all_subst_keys",
                               cbsubst_get_all_subst_keys,  0);
    rb_define_singleton_method(cCB_SUBST, "_setup_subst_table",
                               cbsubst_table_setup, 2);
    rb_define_singleton_method(cCB_SUBST, "_get_extra_args_tbl",
                               cbsubst_get_extra_args_tbl,  0);
    rb_define_singleton_method(cCB_SUBST, "_define_attribute_aliases",
                               cbsubst_def_attr_aliases,  1);

    rb_define_method(cCB_SUBST, "initialize", cbsubst_initialize, -1);

    cbsubst_init();

    /* --------------------- */
    rb_global_variable(&cTkCallbackEntry);
    cTkCallbackEntry = rb_define_class("TkCallbackEntry", cTK);
    rb_define_singleton_method(cTkCallbackEntry, "inspect", tk_cbe_inspect, 0);

    /* --------------------- */
    rb_global_variable(&cTkObject);
    cTkObject = rb_define_class("TkObject", cTK);
    rb_define_method(cTkObject, "path", tkobj_path, 0);

    /* --------------------- */
    rb_require("tcltklib");
    rb_global_variable(&cTclTkLib);
    cTclTkLib = rb_const_get(rb_cObject, rb_intern("TclTkLib"));
    ID_split_tklist = rb_intern("_split_tklist");
    ID_toUTF8 = rb_intern("_toUTF8");
    ID_fromUTF8 = rb_intern("_fromUTF8");

    /* --------------------- */
    rb_define_singleton_method(cTK, "new", tk_s_new, -1);

    /* --------------------- */
    rb_global_variable(&TK_None);
    TK_None = rb_obj_alloc(rb_cObject);
    rb_define_const(mTK, "None", TK_None);
    rb_define_singleton_method(TK_None, "to_s", tkNone_to_s, 0);
    rb_define_singleton_method(TK_None, "inspect", tkNone_to_s, 0);
    OBJ_FREEZE(TK_None);

    /* --------------------- */
    rb_global_variable(&CALLBACK_TABLE);
    CALLBACK_TABLE = rb_hash_new();

    /* --------------------- */
    rb_define_singleton_method(mTK, "eval_cmd", tk_eval_cmd, -1);
    rb_define_singleton_method(mTK, "callback", tk_do_callback, -1);
    rb_define_singleton_method(mTK, "install_cmd", tk_install_cmd, -1);
    rb_define_singleton_method(mTK, "uninstall_cmd", tk_uninstall_cmd, 1);
    rb_define_singleton_method(mTK, "_symbolkey2str", tk_symbolkey2str, 1);
    rb_define_singleton_method(mTK, "hash_kv", tk_hash_kv, -1);
    rb_define_singleton_method(mTK, "_get_eval_string",
                               tk_get_eval_string, -1);
    rb_define_singleton_method(mTK, "_get_eval_enc_str",
                               tk_get_eval_enc_str, 1);
    rb_define_singleton_method(mTK, "_conv_args", tk_conv_args, -1);

    rb_define_singleton_method(mTK, "bool", tcl2rb_bool, 1);
    rb_define_singleton_method(mTK, "number", tcl2rb_number, 1);
    rb_define_singleton_method(mTK, "string", tcl2rb_string, 1);
    rb_define_singleton_method(mTK, "num_or_str", tcl2rb_num_or_str, 1);

    rb_define_method(mTK, "_toUTF8", tk_toUTF8, -1);
    rb_define_method(mTK, "_fromUTF8", tk_fromUTF8, -1);
    rb_define_method(mTK, "_symbolkey2str", tk_symbolkey2str, 1);
    rb_define_method(mTK, "hash_kv", tk_hash_kv, -1);
    rb_define_method(mTK, "_get_eval_string", tk_get_eval_string, -1);
    rb_define_method(mTK, "_get_eval_enc_str", tk_get_eval_enc_str, 1);
    rb_define_method(mTK, "_conv_args", tk_conv_args, -1);

    rb_define_method(mTK, "bool", tcl2rb_bool, 1);
    rb_define_method(mTK, "number", tcl2rb_number, 1);
    rb_define_method(mTK, "string", tcl2rb_string, 1);
    rb_define_method(mTK, "num_or_str", tcl2rb_num_or_str, 1);

    /* --------------------- */
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/win32ole/win32ole.c

root/ext/win32ole/win32ole.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. IEventSink
  2. PEVENTSINK
  3. IEVENTSINKOBJ
  4. PIEVENTSINKOBJ
  5. Win32OLEIDispatch
  6. ULONG
  7. ULONG
  8. val2dispatch
  9. time2d
  10. d2time
  11. civil2jd
  12. jd2civil
  13. double2time
  14. time_object2date
  15. date2time_str
  16. ole_wc2mb
  17. ole_hresult2msg
  18. ole_excepinfo2msg
  19. ole_raise
  20. ole_uninitialize
  21. ole_initialize
  22. ole_msg_loop
  23. ole_free
  24. oletype_free
  25. olemethod_free
  26. olevariable_free
  27. oleparam_free
  28. ole_mb2wc
  29. ole_wc2vstr
  30. ole_ary_m_entry
  31. ole_set_safe_array
  32. ole_val2variant
  33. ole_val2ptr_variant
  34. ole_var2ptr_var
  35. ole_val2olevariantdata
  36. ole_val2variant2
  37. ole_set_member
  38. fole_s_allocate
  39. create_win32ole_object
  40. ole_variant2val
  41. reg_open_key
  42. reg_open_vkey
  43. reg_enum_key
  44. reg_get_val
  45. reg_get_typelib_file_path
  46. typelib_file_from_clsid
  47. typelib_file_from_typelib
  48. typelib_file
  49. ole_const_load
  50. clsid_from_remote
  51. ole_create_dcom
  52. ole_bind_obj
  53. fole_s_connect
  54. fole_s_const_load
  55. ole_classes_from_typelib
  56. reference_count
  57. fole_s_reference_count
  58. fole_s_free
  59. ole_show_help
  60. fole_s_show_help
  61. fole_s_get_code_page
  62. fole_s_set_code_page
  63. fole_initialize
  64. hash2named_arg
  65. set_argv
  66. ole_invoke
  67. fole_invoke
  68. ole_invoke2
  69. fole_invoke2
  70. fole_getproperty2
  71. fole_setproperty2
  72. fole_setproperty
  73. fole_getproperty
  74. ole_propertyput
  75. fole_free
  76. ole_each_sub
  77. ole_ienum_free
  78. fole_each
  79. fole_missing
  80. ole_method_sub
  81. olemethod_from_typeinfo
  82. ole_methods_sub
  83. ole_methods_from_typeinfo
  84. typeinfo_from_ole
  85. ole_methods
  86. fole_methods
  87. fole_get_methods
  88. fole_put_methods
  89. fole_func_methods
  90. ole_type_from_itypeinfo
  91. fole_type
  92. make_oletypelib_obj
  93. ole_typelib_from_itypeinfo
  94. fole_typelib
  95. ole_docinfo_from_type
  96. ole_usertype2val
  97. ole_ptrtype2val
  98. ole_typedesc2val
  99. fole_method_help
  100. foletype_s_ole_classes
  101. foletype_s_typelibs
  102. foletype_s_progids
  103. foletype_s_allocate
  104. oletype_set_member
  105. oleclass_from_typelib
  106. oletypelib_set_member
  107. foletypelib_s_typelibs
  108. make_version_str
  109. oletypelib_search_registry2
  110. oletypelib_search_registry
  111. foletypelib_initialize
  112. foletypelib_guid
  113. foletypelib_name
  114. foletypelib_version
  115. foletypelib_major_version
  116. foletypelib_minor_version
  117. oletypelib_path
  118. foletypelib_path
  119. foletypelib_ole_classes
  120. foletype_initialize
  121. foletype_name
  122. ole_ole_type
  123. foletype_ole_type
  124. ole_type_guid
  125. foletype_guid
  126. ole_type_progid
  127. foletype_progid
  128. ole_type_visible
  129. foletype_visible
  130. ole_type_major_version
  131. foletype_major_version
  132. ole_type_minor_version
  133. foletype_minor_version
  134. ole_type_typekind
  135. foletype_typekind
  136. ole_type_helpstring
  137. foletype_helpstring
  138. ole_type_src_type
  139. foletype_src_type
  140. ole_type_helpfile
  141. foletype_helpfile
  142. ole_type_helpcontext
  143. foletype_helpcontext
  144. foletype_ole_typelib
  145. ole_type_impl_ole_types
  146. foletype_impl_ole_types
  147. ole_variables
  148. foletype_variables
  149. foletype_methods
  150. folevariable_name
  151. ole_variable_ole_type
  152. folevariable_ole_type
  153. ole_variable_ole_type_detail
  154. folevariable_ole_type_detail
  155. ole_variable_value
  156. folevariable_value
  157. ole_variable_visible
  158. folevariable_visible
  159. ole_variable_kind
  160. folevariable_variable_kind
  161. ole_variable_varkind
  162. folevariable_varkind
  163. olemethod_set_member
  164. folemethod_s_allocate
  165. folemethod_initialize
  166. folemethod_name
  167. ole_method_return_type
  168. folemethod_return_type
  169. ole_method_return_vtype
  170. folemethod_return_vtype
  171. ole_method_return_type_detail
  172. folemethod_return_type_detail
  173. ole_method_invkind
  174. ole_method_invoke_kind
  175. folemethod_invkind
  176. folemethod_invoke_kind
  177. ole_method_visible
  178. folemethod_visible
  179. ole_method_event
  180. folemethod_event
  181. folemethod_event_interface
  182. ole_method_docinfo_from_type
  183. ole_method_helpstring
  184. folemethod_helpstring
  185. ole_method_helpfile
  186. folemethod_helpfile
  187. ole_method_helpcontext
  188. folemethod_helpcontext
  189. ole_method_dispid
  190. folemethod_dispid
  191. ole_method_offset_vtbl
  192. folemethod_offset_vtbl
  193. ole_method_size_params
  194. folemethod_size_params
  195. ole_method_size_opt_params
  196. folemethod_size_opt_params
  197. ole_method_params
  198. folemethod_params
  199. foleparam_name
  200. ole_param_ole_type
  201. foleparam_ole_type
  202. ole_param_ole_type_detail
  203. foleparam_ole_type_detail
  204. ole_param_flag_mask
  205. foleparam_input
  206. foleparam_output
  207. foleparam_optional
  208. foleparam_retval
  209. ole_param_default
  210. foleparam_default
  211. EVENTSINK_QueryInterface
  212. STDMETHODIMP_
  213. STDMETHODIMP_
  214. EVENTSINK_GetTypeInfoCount
  215. EVENTSINK_GetTypeInfo
  216. EVENTSINK_GetIDsOfNames
  217. ole_search_event_at
  218. ole_search_event
  219. ary2ptr_dispparams
  220. EVENTSINK_Invoke
  221. EVENTSINK_Constructor
  222. EVENTSINK_Destructor
  223. find_iid
  224. find_default_source
  225. ole_event_free
  226. fev_s_allocate
  227. fev_initialize
  228. fev_s_msg_loop
  229. add_event_call_back
  230. ev_on_event
  231. fev_on_event
  232. fev_on_event_with_outargs
  233. olevariant_free
  234. folevariant_s_allocate
  235. folevariant_initialize
  236. folevariant_value
  237. Init_win32ole
/*
 *  (c) 1995 Microsoft Corporation. All rights reserved.
 *  Developed by ActiveWare Internet Corp., http://www.ActiveWare.com
 *
 *  Other modifications Copyright (c) 1997, 1998 by Gurusamy Sarathy
 *  <gsar@umich.edu> and Jan Dubois <jan.dubois@ibm.net>
 *
 *  You may distribute under the terms of either the GNU General Public
 *  License or the Artistic License, as specified in the README file
 *  of the Perl distribution.
 *
 */

/*
  $Date: 2005/12/12 00:35:07 $
  modified for win32ole (ruby) by Masaki.Suketa <masaki.suketa@nifty.ne.jp>
 */

#include "ruby.h"
#include "st.h"
#include <ctype.h>
#include <windows.h>
#include <ocidl.h>
#include <olectl.h>
#include <ole2.h>
#ifdef HAVE_STDARG_PROTOTYPES
#include <stdarg.h>
#define va_init_list(a,b) va_start(a,b)
#else
#include <varargs.h>
#define va_init_list(a,b) va_start(a)
#endif

#define DOUT fprintf(stderr,"[%d]\n",__LINE__)
#define DOUTS(x) fprintf(stderr,"[%d]:" #x "=%s\n",__LINE__,x)
#define DOUTMSG(x) fprintf(stderr, "[%d]:" #x "\n",__LINE__)
#define DOUTI(x) fprintf(stderr, "[%ld]:" #x "=%d\n",__LINE__,x)
#define DOUTD(x) fprintf(stderr, "[%d]:" #x "=%f\n",__LINE__,x)

#if defined NONAMELESSUNION && __GNUC__
#define V_UNION1(X, Y) ((X)->u.Y)
#else
#define V_UNION1(X, Y) ((X)->Y)
#endif

#if defined NONAMELESSUNION && __GNUC__
#undef V_UNION
#define V_UNION(X,Y) ((X)->n1.n2.n3.Y)

#undef V_VT
#define V_VT(X) ((X)->n1.n2.vt)

#undef V_BOOL
#define V_BOOL(X) V_UNION(X,boolVal)
#endif

#define OLE_RELEASE(X) (X) ? ((X)->lpVtbl->Release(X)) : 0

#define OLE_ADDREF(X) (X) ? ((X)->lpVtbl->AddRef(X)) : 0

#define OLE_GET_TYPEATTR(X, Y) ((X)->lpVtbl->GetTypeAttr((X), (Y)))
#define OLE_RELEASE_TYPEATTR(X, Y) ((X)->lpVtbl->ReleaseTypeAttr((X), (Y)))

#define OLE_FREE(x) {\
    if(gOLEInitialized == Qtrue) {\
        if(x) {\
            OLE_RELEASE(x);\
            (x) = 0;\
        }\
    }\
}

#define OLEData_Get_Struct(obj, pole) {\
    Data_Get_Struct(obj, struct oledata, pole);\
    if(!pole->pDispatch) {\
        rb_raise(rb_eRuntimeError, "failed to get Dispatch Interface");\
    }\
}

#define WC2VSTR(x) ole_wc2vstr((x), TRUE)

#define WIN32OLE_VERSION "0.6.9"

typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX)
    (REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*);

typedef HWND (WINAPI FNHTMLHELP)(HWND hwndCaller, LPCSTR pszFile,
                                 UINT uCommand, DWORD dwData);
typedef struct {
    struct IEventSinkVtbl * lpVtbl;
} IEventSink, *PEVENTSINK;

typedef struct IEventSinkVtbl IEventSinkVtbl;

struct IEventSinkVtbl {
    STDMETHOD(QueryInterface)(
        PEVENTSINK,
        REFIID,
        LPVOID *);
    STDMETHOD_(ULONG, AddRef)(PEVENTSINK);
    STDMETHOD_(ULONG, Release)(PEVENTSINK);

    STDMETHOD(GetTypeInfoCount)(
        PEVENTSINK,
        UINT *);
    STDMETHOD(GetTypeInfo)(
        PEVENTSINK,
        UINT,
        LCID,
        ITypeInfo **);
    STDMETHOD(GetIDsOfNames)(
        PEVENTSINK,
        REFIID,
        OLECHAR **,
        UINT,
        LCID,
        DISPID *);
    STDMETHOD(Invoke)(
        PEVENTSINK,
        DISPID,
        REFIID,
        LCID,
        WORD,
        DISPPARAMS *,
        VARIANT *,
        EXCEPINFO *,
        UINT *);
};

typedef struct tagIEVENTSINKOBJ {
    IEventSinkVtbl *lpVtbl;
    DWORD m_cRef;
    IID m_iid;
    int m_event_id;
    DWORD m_dwCookie;
    IConnectionPoint *pConnectionPoint;
    ITypeInfo *pTypeInfo;
    int *ptr_freed;
}IEVENTSINKOBJ, *PIEVENTSINKOBJ;

VALUE cWIN32OLE;
VALUE cWIN32OLE_TYPELIB;
VALUE cWIN32OLE_TYPE;
VALUE cWIN32OLE_VARIABLE;
VALUE cWIN32OLE_METHOD;
VALUE cWIN32OLE_PARAM;
VALUE cWIN32OLE_EVENT;
VALUE cWIN32OLE_VARIANT;
VALUE eWIN32OLE_RUNTIME_ERROR;
VALUE mWIN32OLE_VARIANT;

static VALUE ary_ole_event;
static ID id_events;
static BOOL gOLEInitialized = Qfalse;
static HINSTANCE ghhctrl = NULL;
static HINSTANCE gole32 = NULL;
static FNCOCREATEINSTANCEEX *gCoCreateInstanceEx = NULL;
static VALUE com_hash;
static IDispatchVtbl com_vtbl;
static UINT  cWIN32OLE_cp = CP_ACP;
static VARTYPE g_nil_to = VT_ERROR;

struct oledata {
    IDispatch *pDispatch;
};

struct oletypedata {
    ITypeInfo *pTypeInfo;
};

struct olemethoddata {
    ITypeInfo *pOwnerTypeInfo;
    ITypeInfo *pTypeInfo;
    UINT index;
};

struct olevariabledata {
    ITypeInfo *pTypeInfo;
    UINT index;
};

struct oleparamdata {
    ITypeInfo *pTypeInfo;
    UINT method_index;
    UINT index;
};

struct oleeventdata {
    IEVENTSINKOBJ *pEvent;
    int freed;
};

struct oleparam {
    DISPPARAMS dp;
    OLECHAR** pNamedArgs;
};

struct olevariantdata {
    VARIANT realvar;
    VARIANT var;
};

static VALUE folemethod_s_allocate _((VALUE));
static VALUE olemethod_set_member _((VALUE, ITypeInfo *, ITypeInfo *, int, VALUE));
static VALUE foletype_s_allocate _((VALUE));
static VALUE oletype_set_member  _((VALUE, ITypeInfo *, VALUE));
static VALUE olemethod_from_typeinfo _((VALUE, ITypeInfo *, VALUE));
static HRESULT ole_docinfo_from_type _((ITypeInfo *, BSTR *, BSTR *, DWORD *, BSTR *));
static char *ole_wc2mb(LPWSTR);
static VALUE ole_variant2val(VARIANT*);
static void ole_val2variant(VALUE, VARIANT*);

typedef struct _Win32OLEIDispatch
{
    IDispatch dispatch;
    ULONG refcount;
    VALUE obj;
} Win32OLEIDispatch;

static HRESULT ( STDMETHODCALLTYPE QueryInterface )(
    IDispatch __RPC_FAR * This,
    /* [in] */ REFIID riid,
    /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject)
{
    if (MEMCMP(riid, &IID_IUnknown, GUID, 1) == 0
        || MEMCMP(riid, &IID_IDispatch, GUID, 1) == 0)
    {
        Win32OLEIDispatch* p = (Win32OLEIDispatch*)This;
        p->refcount++;
        *ppvObject = This;
        return S_OK;
    }
    return E_NOINTERFACE;
}

static ULONG ( STDMETHODCALLTYPE AddRef )(
    IDispatch __RPC_FAR * This)
{
    Win32OLEIDispatch* p = (Win32OLEIDispatch*)This;
    return ++(p->refcount);
}

static ULONG ( STDMETHODCALLTYPE Release )(
    IDispatch __RPC_FAR * This)
{
    Win32OLEIDispatch* p = (Win32OLEIDispatch*)This;
    ULONG u = --(p->refcount);
    if (u == 0) {
        st_data_t key = p->obj;
        st_delete(DATA_PTR(com_hash), &key, 0);
        free(p);
    }
    return u;
}

static HRESULT ( STDMETHODCALLTYPE GetTypeInfoCount )(
    IDispatch __RPC_FAR * This,
    /* [out] */ UINT __RPC_FAR *pctinfo)
{
    return E_NOTIMPL;
}

static HRESULT ( STDMETHODCALLTYPE GetTypeInfo )(
    IDispatch __RPC_FAR * This,
    /* [in] */ UINT iTInfo,
    /* [in] */ LCID lcid,
    /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo)
{
    return E_NOTIMPL;
}

static HRESULT ( STDMETHODCALLTYPE GetIDsOfNames )(
    IDispatch __RPC_FAR * This,
    /* [in] */ REFIID riid,
    /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames,
    /* [in] */ UINT cNames,
    /* [in] */ LCID lcid,
    /* [size_is][out] */ DISPID __RPC_FAR *rgDispId)
{
    /*
    Win32OLEIDispatch* p = (Win32OLEIDispatch*)This;
    */
    char* psz = ole_wc2mb(*rgszNames); // support only one method
    *rgDispId = rb_intern(psz);
    free(psz);
    return S_OK;
}

static /* [local] */ HRESULT ( STDMETHODCALLTYPE Invoke )(
    IDispatch __RPC_FAR * This,
    /* [in] */ DISPID dispIdMember,
    /* [in] */ REFIID riid,
    /* [in] */ LCID lcid,
    /* [in] */ WORD wFlags,
    /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams,
    /* [out] */ VARIANT __RPC_FAR *pVarResult,
    /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo,
    /* [out] */ UINT __RPC_FAR *puArgErr)
{
    VALUE v;
    int i;
    int args = pDispParams->cArgs;
    Win32OLEIDispatch* p = (Win32OLEIDispatch*)This;
    VALUE* parg = ALLOCA_N(VALUE, args);
    for (i = 0; i < args; i++) {
        *(parg + i) = ole_variant2val(&pDispParams->rgvarg[args - i - 1]);
    }
    if (dispIdMember == DISPID_VALUE) {
        if (wFlags == DISPATCH_METHOD) {
            dispIdMember = rb_intern("call");
        } else if (wFlags & DISPATCH_PROPERTYGET) {
            dispIdMember = rb_intern("value");
        }
    }
    v = rb_funcall2(p->obj, dispIdMember, args, parg);
    ole_val2variant(v, pVarResult);
    return S_OK;
}

static IDispatch*
val2dispatch(val)
    VALUE val;
{
    struct st_table *tbl = DATA_PTR(com_hash);
    Win32OLEIDispatch* pdisp;
    st_data_t data;

    if (st_lookup(tbl, val, &data)) {
        pdisp = (Win32OLEIDispatch *)(data & ~FIXNUM_FLAG);
        pdisp->refcount++;
    }
    else {
        pdisp = ALLOC(Win32OLEIDispatch);
        pdisp->dispatch.lpVtbl = &com_vtbl;
        pdisp->refcount = 1;
        pdisp->obj = val;
        st_insert(tbl, val, (VALUE)pdisp | FIXNUM_FLAG);
    }
    return &pdisp->dispatch;
}

static void
time2d(hh, mm, ss, pv)
    int hh, mm, ss;
    double *pv;
{
    *pv =  (hh * 60.0 * 60.0 + mm * 60.0 + ss) / 86400.0;
}

static void
d2time(v, hh, mm, ss)
    double v;
    int *hh, *mm, *ss;
{
    double d_hh, d_mm, d_ss;
    int    i_hh, i_mm, i_ss;

    double d = v * 86400.0;

    d_hh = d / 3600.0;
    i_hh = (int)d_hh;

    d = d - i_hh * 3600.0;

    d_mm = d / 60.0;
    i_mm = (int)d_mm;

    d = d - i_mm * 60.0;

    d_ss = d * 10.0 + 5;

    i_ss = (int)d_ss / 10;

    if(i_ss == 60) {
        i_mm += 1;
        i_ss = 0;
    }

    if (i_mm == 60) {
        i_hh += 1;
        i_mm = 0;
    }
    if (i_hh == 24) {
        i_hh = 0;
    }

    *hh = i_hh;
    *mm = i_mm;
    *ss = i_ss;
}

static void
civil2jd(y, m, d, jd)
    int y, m, d;
    long *jd;
{
    long a, b;
    if (m <= 2) {
        y -= 1;
        m += 12;
    }
    a = (long)(y / 100.0);
    b = 2 - a + (long)(a / 4.0);
    *jd = (long)(365.25 * (double)(y + 4716))
         + (long)(30.6001 * (m + 1))
         + d + b - 1524;
}

static void
jd2civil(day, yy, mm, dd)
    long day;
    int *yy, *mm, *dd;
{
    long x, a, b, c, d, e;
    x = (long)(((double)day - 1867216.25) / 36524.25);
    a = day + 1 + x - (long)(x / 4.0);
    b = a + 1524;
    c = (long)(((double)b -122.1) /365.25);
    d = (long)(365.25 * c);
    e = (long)((double)(b - d) / 30.6001);
    *dd = b - d - (long)(30.6001 * e);
    if (e <= 13) {
        *mm = e - 1;
        *yy = c - 4716;
    }
    else {
        *mm = e - 13;
        *yy = c - 4715;
    }
}

static void
double2time(v, y, m, d, hh, mm, ss)
    double v;
    int *y, *m, *d, *hh, *mm, *ss;
{
    long day;
    double t;

    day = (long)v;
    t = v - day;
    jd2civil(2415019 + day, y, m, d);

    d2time(t, hh, mm, ss);
}

static double
time_object2date(tmobj)
    VALUE tmobj;
{
    long y, m, d, hh, mm, ss;
    long day;
    double t;
    y = FIX2INT(rb_funcall(tmobj, rb_intern("year"), 0));
    m = FIX2INT(rb_funcall(tmobj, rb_intern("month"), 0));
    d = FIX2INT(rb_funcall(tmobj, rb_intern("mday"), 0));
    hh = FIX2INT(rb_funcall(tmobj, rb_intern("hour"), 0));
    mm = FIX2INT(rb_funcall(tmobj, rb_intern("min"), 0));
    ss = FIX2INT(rb_funcall(tmobj, rb_intern("sec"), 0));
    civil2jd(y, m, d, &day);
    time2d(hh, mm, ss, &t);
    return t + day - 2415019;
}

static VALUE
date2time_str(date)
    double date;
{
    int y, m, d, hh, mm, ss;
    char szTime[20];
    double2time(date, &y, &m, &d, &hh, &mm, &ss);
    sprintf(szTime,
            "%04d/%02d/%02d %02d:%02d:%02d",
            y, m, d, hh, mm, ss);
    return rb_str_new2(szTime);
}

static void ole_val2variant();

static char *
ole_wc2mb(pw)
    LPWSTR pw;
{
    int size;
    LPSTR pm;
    size = WideCharToMultiByte(cWIN32OLE_cp, 0, pw, -1, NULL, 0, NULL, NULL);
    if (size) {
        pm = ALLOC_N(char, size);
        WideCharToMultiByte(cWIN32OLE_cp, 0, pw, -1, pm, size, NULL, NULL);
    }
    else {
        pm = ALLOC_N(char, 1);
        *pm = '\0';
    }
    return pm;
}

static VALUE
ole_hresult2msg(hr)
    HRESULT hr;
{
    VALUE msg = Qnil;
    char *p_msg = NULL;
    char *term = NULL;
    DWORD dwCount;

    char strhr[100];
    sprintf(strhr, "    HRESULT error code:0x%08x\n      ", (unsigned)hr);
    msg = rb_str_new2(strhr);

    dwCount = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
                            FORMAT_MESSAGE_FROM_SYSTEM |
                            FORMAT_MESSAGE_IGNORE_INSERTS,
                            NULL, hr, LOCALE_SYSTEM_DEFAULT,
                            (LPTSTR)&p_msg, 0, NULL);
    if (dwCount > 0) {
        term = p_msg + strlen(p_msg);
        while (p_msg < term) {
            term--;
            if (*term == '\r' || *term == '\n')
                *term = '\0';
            else break;
        }
        if (p_msg[0] != '\0') {
            rb_str_cat2(msg, p_msg);
        }
    }
    LocalFree(p_msg);
    return msg;
}

static VALUE
ole_excepinfo2msg(pExInfo)
    EXCEPINFO *pExInfo;
{
    char error_code[40];
    char *pSource = NULL;
    char *pDescription = NULL;
    VALUE error_msg;
    if(pExInfo->pfnDeferredFillIn != NULL) {
        (*pExInfo->pfnDeferredFillIn)(pExInfo);
    }
    if (pExInfo->bstrSource != NULL) {
        pSource = ole_wc2mb(pExInfo->bstrSource);
    }
    if (pExInfo->bstrDescription != NULL) {
        pDescription = ole_wc2mb(pExInfo->bstrDescription);
    }
    if(pExInfo->wCode == 0) {
        sprintf(error_code, "\n    OLE error code:%lX in ", pExInfo->scode);
    }
    else{
        sprintf(error_code, "\n    OLE error code:%u in ", pExInfo->wCode);
    }
    error_msg = rb_str_new2(error_code);
    if(pSource != NULL) {
        rb_str_cat(error_msg, pSource, strlen(pSource));
    }
    else {
        rb_str_cat(error_msg, "<Unknown>", 9);
    }
    rb_str_cat2(error_msg, "\n      ");
    if(pDescription != NULL) {
        rb_str_cat2(error_msg, pDescription);
    }
    else {
        rb_str_cat2(error_msg, "<No Description>");
    }
    if(pSource) free(pSource);
    if(pDescription) free(pDescription);
    SysFreeString(pExInfo->bstrDescription);
    SysFreeString(pExInfo->bstrSource);
    SysFreeString(pExInfo->bstrHelpFile);
    return error_msg;
}

static void
#ifdef HAVE_STDARG_PROTOTYPES
ole_raise(HRESULT hr, VALUE ecs, const char *fmt, ...)
#else
ole_raise(hr, exc, fmt, va_alist)
    HRESULT hr;
    VALUE exc;
    const char *fmt;
    va_dcl
#endif
{
    va_list args;
    char buf[BUFSIZ];
    VALUE err_msg;
    va_init_list(args, fmt);
    vsnprintf(buf, BUFSIZ, fmt, args);
    va_end(args);

    err_msg = ole_hresult2msg(hr);
    if(err_msg != Qnil) {
        rb_raise(ecs, "%s\n%s", buf, StringValuePtr(err_msg));
    }
    else {
        rb_raise(ecs, "%s", buf);
    }
}

void
ole_uninitialize()
{
    OleUninitialize();
    gOLEInitialized = Qfalse;
}

static void
ole_initialize()
{
    HRESULT hr;

    if(gOLEInitialized == Qfalse) {
        hr = OleInitialize(NULL);
        if(FAILED(hr)) {
            ole_raise(hr, rb_eRuntimeError, "fail: OLE initialize");
        }
        gOLEInitialized = Qtrue;
        /*
         * In some situation, OleUninitialize does not work fine. ;-<
         */
        /*
        atexit((void (*)(void))ole_uninitialize);
        */
    }
}

static void
ole_msg_loop() {
    MSG msg;
    while(PeekMessage(&msg,NULL,0,0,PM_REMOVE)) {
        TranslateMessage(&msg);
        DispatchMessage(&msg);
    }
}

static void
ole_free(pole)
    struct oledata *pole;
{
    OLE_FREE(pole->pDispatch);
}

static void
oletype_free(poletype)
    struct oletypedata *poletype;
{
    OLE_FREE(poletype->pTypeInfo);
}

static void
olemethod_free(polemethod)
    struct olemethoddata *polemethod;
{
    OLE_FREE(polemethod->pTypeInfo);
    OLE_FREE(polemethod->pOwnerTypeInfo);
}

static void
olevariable_free(polevar)
    struct olevariabledata *polevar;
{
    OLE_FREE(polevar->pTypeInfo);
}

static void
oleparam_free(pole)
    struct oleparamdata *pole;
{
    OLE_FREE(pole->pTypeInfo);
}

static LPWSTR
ole_mb2wc(pm, len)
    char *pm;
    int  len;
{
    int size;
    LPWSTR pw;
    size = MultiByteToWideChar(cWIN32OLE_cp, 0, pm, len, NULL, 0);
    pw = SysAllocStringLen(NULL, size - 1);
    MultiByteToWideChar(cWIN32OLE_cp, 0, pm, len, pw, size);
    return pw;
}

static VALUE
ole_wc2vstr(pw, isfree)
    LPWSTR pw;
    BOOL isfree;
{
    char *p = ole_wc2mb(pw);
    VALUE vstr = rb_str_new2(p);
    if(isfree)
        SysFreeString(pw);
    free(p);
    return vstr;
}

static VALUE
ole_ary_m_entry(val, pid)
    VALUE val;
    long *pid;
{
    VALUE obj = Qnil;
    int i = 0;
    obj = val;
    while(TYPE(obj) == T_ARRAY) {
        obj = rb_ary_entry(obj, pid[i]);
        i++;
    }
    return obj;
}

static void
ole_set_safe_array(n, psa, pid, pub, val, dim)
    long n;
    SAFEARRAY *psa;
    long *pid;
    long *pub;
    VALUE val;
    long dim;
{
    VALUE val1;
    VARIANT var;
    VariantInit(&var);
    if(n < 0) return;
    if(n == dim) {
        val1 = ole_ary_m_entry(val, pid);
        ole_val2variant(val1, &var);
        SafeArrayPutElement(psa, pid, &var);
    }
    pid[n] += 1;
    if (pid[n] < pub[n]) {
        ole_set_safe_array(dim, psa, pid, pub, val, dim);
    }
    else {
        pid[n] = 0;
        ole_set_safe_array(n-1, psa, pid, pub, val, dim);
    }
}

static void
ole_val2variant(val, var)
    VALUE val;
    VARIANT *var;
{
    struct oledata *pole;
    if(rb_obj_is_kind_of(val, cWIN32OLE)) {
        Data_Get_Struct(val, struct oledata, pole);
        OLE_ADDREF(pole->pDispatch);
        V_VT(var) = VT_DISPATCH;
        V_DISPATCH(var) = pole->pDispatch;
        return;
    }
    if (rb_obj_is_kind_of(val, rb_cTime)) {
        V_VT(var) = VT_DATE;
        V_DATE(var) = time_object2date(val);
        return;
    }
    switch (TYPE(val)) {
    case T_ARRAY:
    {
        VALUE val1;
        long dim = 0;
        int  i = 0;

        HRESULT hr;
        SAFEARRAYBOUND *psab;
        SAFEARRAY *psa;
        long      *pub, *pid;

        val1 = val;
        while(TYPE(val1) == T_ARRAY) {
            val1 = rb_ary_entry(val1, 0);
            dim += 1;
        }
        psab = ALLOC_N(SAFEARRAYBOUND, dim);
        pub  = ALLOC_N(long, dim);
        pid  = ALLOC_N(long, dim);

        if(!psab || !pub || !pid) {
            if(pub) free(pub);
            if(psab) free(psab);
            if(pid) free(pid);
            rb_raise(rb_eRuntimeError, "memory allocation error");
        }
        val1 = val;
        i = 0;
        while(TYPE(val1) == T_ARRAY) {
            psab[i].cElements = RARRAY(val1)->len;
            psab[i].lLbound = 0;
            pub[i] = psab[i].cElements;
            pid[i] = 0;
            i ++;
            val1 = rb_ary_entry(val1, 0);
        }
        /* Create and fill VARIANT array */
        psa = SafeArrayCreate(VT_VARIANT, dim, psab);
        if (psa == NULL)
            hr = E_OUTOFMEMORY;
        else
            hr = SafeArrayLock(psa);
        if (SUCCEEDED(hr)) {
            ole_set_safe_array(dim-1, psa, pid, pub, val, dim-1);
            hr = SafeArrayUnlock(psa);
        }
        if(pub) free(pub);
        if(psab) free(psab);
        if(pid) free(pid);

        if (SUCCEEDED(hr)) {
            V_VT(var) = VT_VARIANT | VT_ARRAY;
            V_ARRAY(var) = psa;
        }
        else if (psa != NULL)
            SafeArrayDestroy(psa);
        break;
    }
    case T_STRING:
        V_VT(var) = VT_BSTR;
        V_BSTR(var) = ole_mb2wc(StringValuePtr(val), -1);
        break;
    case T_FIXNUM:
        V_VT(var) = VT_I4;
        V_I4(var) = NUM2INT(val);
        break;
    case T_BIGNUM:
        V_VT(var) = VT_R8;
        V_R8(var) = rb_big2dbl(val);
        break;
    case T_FLOAT:
        V_VT(var) = VT_R8;
        V_R8(var) = NUM2DBL(val);
        break;
    case T_TRUE:
        V_VT(var) = VT_BOOL;
        V_BOOL(var) = VARIANT_TRUE;
        break;
    case T_FALSE:
        V_VT(var) = VT_BOOL;
        V_BOOL(var) = VARIANT_FALSE;
        break;
    case T_NIL:
        if (g_nil_to == VT_ERROR) {
            V_VT(var) = VT_ERROR;
            V_ERROR(var) = DISP_E_PARAMNOTFOUND;
        }else {
            V_VT(var) = VT_EMPTY;
        }
        break;
    default:
        V_VT(var) = VT_DISPATCH;
        V_DISPATCH(var) = val2dispatch(val);
        break;
    }
}

static void
ole_val2ptr_variant(val, var)
    VALUE val;
    VARIANT *var;
{
    switch (TYPE(val)) {
    case T_STRING:
        if (V_VT(var) == (VT_BSTR | VT_BYREF)) {
            *V_BSTRREF(var) = ole_mb2wc(StringValuePtr(val), -1);
        }
        break;
    case T_FIXNUM:
        switch(V_VT(var)) {
        case (VT_UI1 | VT_BYREF) :
            *V_UI1REF(var) = NUM2CHR(val);
            break;
        case (VT_I2 | VT_BYREF) :
            *V_I2REF(var) = (short)NUM2INT(val);
            break;
        case (VT_I4 | VT_BYREF) :
            *V_I4REF(var) = NUM2INT(val);
            break;
        case (VT_R4 | VT_BYREF) :
            *V_R4REF(var) = (float)NUM2INT(val);
            break;
        case (VT_R8 | VT_BYREF) :
            *V_R8REF(var) = NUM2INT(val);
            break;
        default:
            break;
        }
        break;
    case T_FLOAT:
        switch(V_VT(var)) {
        case (VT_I2 | VT_BYREF) :
            *V_I2REF(var) = (short)NUM2INT(val);
            break;
        case (VT_I4 | VT_BYREF) :
            *V_I4REF(var) = NUM2INT(val);
            break;
        case (VT_R4 | VT_BYREF) :
            *V_R4REF(var) = (float)NUM2DBL(val);
            break;
        case (VT_R8 | VT_BYREF) :
            *V_R8REF(var) = NUM2DBL(val);
            break;
        default:
            break;
        }
        break;
    case T_BIGNUM:
        if (V_VT(var) == (VT_R8 | VT_BYREF)) {
            *V_R8REF(var) = rb_big2dbl(val);
        }
        break;
    case T_TRUE:
        if (V_VT(var) == (VT_BOOL | VT_BYREF)) {
            *V_BOOLREF(var) = VARIANT_TRUE;
        }
        break;
    case T_FALSE:
        if (V_VT(var) == (VT_BOOL | VT_BYREF)) {
            *V_BOOLREF(var) = VARIANT_FALSE;
        }
        break;
    default:
        break;
    }
}

static void
ole_var2ptr_var(var, pvar)
    VARIANT *var;
    VARIANT *pvar;
{
    VARTYPE vt = V_VT(var);
    V_VT(pvar) = V_VT(var) | VT_BYREF;
    switch(vt) {
    case VT_UI1:
        V_UI1REF(pvar) = &V_UI1(var);
        break;
    case VT_I2:
        V_I2REF(pvar) = &V_I2(var);
        break;
    case VT_I4:
        V_I4REF(pvar) = &V_I4(var);
        break;
    case VT_UI4:
        V_UI4REF(pvar) = &V_UI4(var);
        break;
/*
    case VT_I8:
        V_I8REF(pvar) = &V_I8(var);
        break;
*/
    case VT_R4:
        V_R4REF(pvar) = &V_R4(var);
        break;
    case VT_R8:
        V_R8REF(pvar) = &V_R8(var);
        break;
    case VT_CY:
        V_CYREF(pvar) = &V_CY(var);
        break;
    case VT_DATE:
        V_DATEREF(pvar) = &V_DATE(var);
        break;
    case VT_BSTR:
        V_BSTRREF(pvar) = &V_BSTR(var);
        break;
    case VT_DISPATCH:
        V_DISPATCHREF(pvar) = &V_DISPATCH(var);
        break;
    case VT_ERROR:
        V_ERRORREF(pvar) = &V_ERROR(var);
        break;
    case VT_BOOL:
        V_BOOLREF(pvar) = &V_BOOL(var);
        break;
/*
    case VT_VARIANT:
        V_VARIANTREF(pvar) = &V_VARIANT(var);
        break;
*/
    case VT_UNKNOWN:
        V_UNKNOWNREF(pvar) = &V_UNKNOWN(var);
        break;
    case VT_ARRAY:
        V_ARRAYREF(pvar) = &V_ARRAY(var);
        break;
    default:
        break;
    }
}

static void
ole_val2olevariantdata(val, vtype, pvar)
    VALUE val;
    VARTYPE vtype;
    struct olevariantdata *pvar;
{
    HRESULT hr = S_OK;
    VARIANT var;
    ole_val2variant(val, &(pvar->realvar));
    if (vtype & VT_BYREF) {
        if ( (vtype & ~VT_BYREF) == V_VT(&(pvar->realvar))) {
            ole_var2ptr_var(&(pvar->realvar), &(pvar->var));
        } else {
            VariantInit(&var);
            hr = VariantChangeTypeEx(&(var), &(pvar->realvar),
                                     LOCALE_SYSTEM_DEFAULT, 0, (VARTYPE)(vtype & ~VT_BYREF));
            if (SUCCEEDED(hr)) {
                VariantClear(&(pvar->realvar));
                hr = VariantCopy(&(pvar->realvar), &var);
                VariantClear(&var);
                ole_var2ptr_var(&(pvar->realvar), &(pvar->var));
            }
        }
    } else {
        if (vtype == V_VT(&(pvar->realvar))) {
            hr = VariantCopy(&(pvar->var), &(pvar->realvar));
        } else {
            hr = VariantChangeTypeEx(&(pvar->var), &(pvar->realvar),
                                     LOCALE_SYSTEM_DEFAULT, 0, vtype);
        }
    }
    if (FAILED(hr)) {
        ole_raise(hr, rb_eRuntimeError, "failed to change type");
    }
}

static void
ole_val2variant2(val, var)
    VALUE val;
    VARIANT *var;
{
    g_nil_to = VT_EMPTY;
    ole_val2variant(val, var);
    g_nil_to = VT_ERROR;
}

static VALUE
ole_set_member(self, dispatch)
    VALUE self;
    IDispatch * dispatch;
{
    struct oledata *pole;
    Data_Get_Struct(self, struct oledata, pole);
    if (pole->pDispatch) {
        OLE_RELEASE(pole->pDispatch);
        pole->pDispatch = NULL;
    }
    pole->pDispatch = dispatch;
    return self;
}

static VALUE fole_s_allocate _((VALUE));
static VALUE
fole_s_allocate(klass)
    VALUE klass;
{
    struct oledata *pole;
    VALUE obj;
    ole_initialize();
    obj = Data_Make_Struct(klass,struct oledata,0,ole_free,pole);
    pole->pDispatch = NULL;
    return obj;
}

static VALUE
create_win32ole_object(klass, pDispatch, argc, argv)
    VALUE klass;
    IDispatch *pDispatch;
    int argc;
    VALUE *argv;
{
    VALUE obj = fole_s_allocate(klass);
    ole_set_member(obj, pDispatch);
    return obj;
}

static VALUE
ole_variant2val(pvar)
    VARIANT *pvar;
{
    VALUE obj = Qnil;
    HRESULT hr;
    while ( V_VT(pvar) == (VT_BYREF | VT_VARIANT) )
        pvar = V_VARIANTREF(pvar);

    if(V_ISARRAY(pvar)) {
        SAFEARRAY *psa = V_ISBYREF(pvar) ? *V_ARRAYREF(pvar) : V_ARRAY(pvar);
        long i;
        long *pID, *pLB, *pUB;
        VARIANT variant;
        VALUE val;
        VALUE val2 = Qnil;

        int dim = SafeArrayGetDim(psa);
        VariantInit(&variant);
        V_VT(&variant) = (V_VT(pvar) & ~VT_ARRAY) | VT_BYREF;

        pID = ALLOC_N(long, dim);
        pLB = ALLOC_N(long, dim);
        pUB = ALLOC_N(long, dim);

        if(!pID || !pLB || !pUB) {
            if(pID) free(pID);
            if(pLB) free(pLB);
            if(pUB) free(pUB);
            rb_raise(rb_eRuntimeError, "memory allocation error");
        }

        obj = Qnil;

        for(i = 0; i < dim; ++i) {
            SafeArrayGetLBound(psa, i+1, &pLB[i]);
            SafeArrayGetLBound(psa, i+1, &pID[i]);
            SafeArrayGetUBound(psa, i+1, &pUB[i]);
        }

        hr = SafeArrayLock(psa);
        if (SUCCEEDED(hr)) {
            val2 = rb_ary_new();
            while (i >= 0) {
                hr = SafeArrayPtrOfIndex(psa, pID, &V_BYREF(&variant));
                if (FAILED(hr))
                    break;

                val = ole_variant2val(&variant);
                rb_ary_push(val2, val);
                for (i = dim-1 ; i >= 0 ; --i) {
                    if (++pID[i] <= pUB[i])
                        break;

                    pID[i] = pLB[i];
                    if (i > 0) {
                        if (obj == Qnil)
                            obj = rb_ary_new();
                        rb_ary_push(obj, val2);
                        val2 = rb_ary_new();
                    }
                }
            }
            SafeArrayUnlock(psa);
        }
        if(pID) free(pID);
        if(pLB) free(pLB);
        if(pUB) free(pUB);
        return (obj == Qnil) ? val2 : obj;
    }
    switch(V_VT(pvar) & ~VT_BYREF){
    case VT_EMPTY:
        break;
    case VT_NULL:
        break;
    case VT_UI1:
        if(V_ISBYREF(pvar))
            obj = INT2NUM((long)*V_UI1REF(pvar));
        else
            obj = INT2NUM((long)V_UI1(pvar));
        break;

    case VT_I2:
        if(V_ISBYREF(pvar))
            obj = INT2NUM((long)*V_I2REF(pvar));
        else
            obj = INT2NUM((long)V_I2(pvar));
        break;

    case VT_I4:
        if(V_ISBYREF(pvar))
            obj = INT2NUM((long)*V_I4REF(pvar));
        else
            obj = INT2NUM((long)V_I4(pvar));
        break;

    case VT_R4:
        if(V_ISBYREF(pvar))
            obj = rb_float_new(*V_R4REF(pvar));
        else
            obj = rb_float_new(V_R4(pvar));
        break;

    case VT_R8:
        if(V_ISBYREF(pvar))
            obj = rb_float_new(*V_R8REF(pvar));
        else
            obj = rb_float_new(V_R8(pvar));
        break;

    case VT_BSTR:
    {
        char *p;
        if(V_ISBYREF(pvar))
            p = ole_wc2mb(*V_BSTRREF(pvar));
        else
            p = ole_wc2mb(V_BSTR(pvar));
        obj = rb_str_new2(p);
        if(p) free(p);
        break;
    }

    case VT_ERROR:
        if(V_ISBYREF(pvar))
            obj = INT2NUM(*V_ERRORREF(pvar));
        else
            obj = INT2NUM(V_ERROR(pvar));
        break;

    case VT_BOOL:
        if (V_ISBYREF(pvar))
            obj = (*V_BOOLREF(pvar) ? Qtrue : Qfalse);
        else
            obj = (V_BOOL(pvar) ? Qtrue : Qfalse);
        break;

    case VT_DISPATCH:
    {
        IDispatch *pDispatch;

        if (V_ISBYREF(pvar))
            pDispatch = *V_DISPATCHREF(pvar);
        else
            pDispatch = V_DISPATCH(pvar);

        if (pDispatch != NULL ) {
            OLE_ADDREF(pDispatch);
            obj = create_win32ole_object(cWIN32OLE, pDispatch, 0, 0);
        }
        break;
    }

    case VT_UNKNOWN:
    {

        /* get IDispatch interface from IUnknown interface */
        IUnknown *punk;
        IDispatch *pDispatch;
        HRESULT hr;

        if (V_ISBYREF(pvar))
            punk = *V_UNKNOWNREF(pvar);
        else
            punk = V_UNKNOWN(pvar);

        if(punk != NULL) {
           hr = punk->lpVtbl->QueryInterface(punk, &IID_IDispatch,
                                             (void **)&pDispatch);
           if(SUCCEEDED(hr)) {
               obj = create_win32ole_object(cWIN32OLE, pDispatch, 0, 0);
           }
        }
        break;
    }

    case VT_DATE:
    {
        DATE date;
        if(V_ISBYREF(pvar))
            date = *V_DATEREF(pvar);
        else
            date = V_DATE(pvar);

        obj =  date2time_str(date);
        break;
    }
    case VT_CY:
    default:
        {
        HRESULT hr;
        VARIANT variant;
        VariantInit(&variant);
        hr = VariantChangeTypeEx(&variant, pvar,
                                  LOCALE_SYSTEM_DEFAULT, 0, VT_BSTR);
        if (SUCCEEDED(hr) && V_VT(&variant) == VT_BSTR) {
            char *p = ole_wc2mb(V_BSTR(&variant));
            obj = rb_str_new2(p);
            if(p) free(p);
        }
        VariantClear(&variant);
        break;
        }
    }
    return obj;
}

static LONG reg_open_key(hkey, name, phkey)
    HKEY hkey;
    const char *name;
    HKEY *phkey;
{
    return RegOpenKeyEx(hkey, name, 0, KEY_READ, phkey);
}

static LONG reg_open_vkey(hkey, key, phkey)
    HKEY hkey;
    VALUE key;
    HKEY *phkey;
{
    return reg_open_key(hkey, StringValuePtr(key), phkey);
}

static VALUE
reg_enum_key(hkey, i)
    HKEY hkey;
    DWORD i;
{
    char buf[BUFSIZ];
    DWORD size_buf = sizeof(buf);
    FILETIME ft;
    LONG err = RegEnumKeyEx(hkey, i, buf, &size_buf,
                            NULL, NULL, NULL, &ft);
    if(err == ERROR_SUCCESS) {
        return rb_str_new2(buf);
    }
    return Qnil;
}

static VALUE
reg_get_val(hkey, subkey)
    HKEY hkey;
    const char *subkey;
{
    char buf[BUFSIZ];
    LONG size_buf = sizeof(buf);
    LONG err = RegQueryValue(hkey, subkey, buf, &size_buf);
    if (err == ERROR_SUCCESS) {
        return rb_str_new2(buf);
    }
    return Qnil;
}

static VALUE
reg_get_typelib_file_path(hkey)
    HKEY hkey;
{
    VALUE path = Qnil;
    path = reg_get_val(hkey, "win32");
    if (path == Qnil) {
        path = reg_get_val(hkey, "win16");
    }
    return path;
}

static VALUE
typelib_file_from_clsid(ole)
    VALUE ole;
{
    OLECHAR *pbuf;
    CLSID clsid;
    HRESULT hr;
    HKEY hroot, hclsid;
    LONG err;
    VALUE typelib;
    VALUE vclsid;

    pbuf  = ole_mb2wc(StringValuePtr(ole), -1);
    hr = CLSIDFromProgID(pbuf, &clsid);
    SysFreeString(pbuf);
    if (FAILED(hr)) {
        return Qnil;
    }
    StringFromCLSID(&clsid, &pbuf);
    vclsid = WC2VSTR(pbuf);
    err = reg_open_key(HKEY_CLASSES_ROOT, "CLSID", &hroot);
    if (err != ERROR_SUCCESS) {
        return Qnil;
    }
    err = reg_open_key(hroot, StringValuePtr(vclsid), &hclsid);
    if (err != ERROR_SUCCESS) {
        RegCloseKey(hroot);
        return Qnil;
    }
    typelib = reg_get_val(hclsid, "InprocServer32");
    RegCloseKey(hroot);
    RegCloseKey(hclsid);
    return typelib;
}

static VALUE
typelib_file_from_typelib(ole)
    VALUE ole;
{
    HKEY htypelib, hclsid, hversion, hlang;
    double fver;
    DWORD i, j, k;
    LONG err;
    BOOL found = FALSE;
    VALUE typelib;
    VALUE file = Qnil;
    VALUE clsid;
    VALUE ver;
    VALUE lang;

    err = reg_open_key(HKEY_CLASSES_ROOT, "TypeLib", &htypelib);
    if(err != ERROR_SUCCESS) {
        return Qnil;
    }
    for(i = 0; !found; i++) {
        clsid = reg_enum_key(htypelib, i);
        if (clsid == Qnil)
            break;
        err = reg_open_vkey(htypelib, clsid, &hclsid);
        if (err != ERROR_SUCCESS)
            continue;
        fver = 0;
        for(j = 0; !found; j++) {
            ver = reg_enum_key(hclsid, j);
            if (ver == Qnil)
                break;
            err = reg_open_vkey(hclsid, ver, &hversion);
            if (err != ERROR_SUCCESS || fver > atof(StringValuePtr(ver)))
                continue;
            fver = atof(StringValuePtr(ver));
            typelib = reg_get_val(hversion, NULL);
            if (typelib == Qnil)
                continue;
            if (rb_str_cmp(typelib, ole) == 0) {
                for(k = 0; !found; k++) {
                    lang = reg_enum_key(hversion, k);
                    if (lang == Qnil)
                        break;
                    err = reg_open_vkey(hversion, lang, &hlang);
                    if (err == ERROR_SUCCESS) {
                        if ((file = reg_get_typelib_file_path(hlang)) != Qnil)
                            found = TRUE;
                        RegCloseKey(hlang);
                    }
                }
            }
            RegCloseKey(hversion);
        }
        RegCloseKey(hclsid);
    }
    RegCloseKey(htypelib);
    return  file;
}

static VALUE
typelib_file(ole)
    VALUE ole;
{
    VALUE file = typelib_file_from_clsid(ole);
    if (file != Qnil) {
        return file;
    }
    return typelib_file_from_typelib(ole);
}

static void
ole_const_load(pTypeLib, klass, self)
    ITypeLib *pTypeLib;
    VALUE klass;
    VALUE self;
{
    unsigned int count;
    unsigned int index;
    int iVar;
    ITypeInfo *pTypeInfo;
    TYPEATTR  *pTypeAttr;
    VARDESC   *pVarDesc;
    HRESULT hr;
    unsigned int len;
    BSTR bstr;
    char *pName = NULL;
    VALUE val;
    VALUE constant;
    ID id;
    constant = rb_hash_new();
    count = pTypeLib->lpVtbl->GetTypeInfoCount(pTypeLib);
    for (index = 0; index < count; index++) {
        hr = pTypeLib->lpVtbl->GetTypeInfo(pTypeLib, index, &pTypeInfo);
        if (FAILED(hr))
            continue;
        hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
        if(FAILED(hr)) {
            OLE_RELEASE(pTypeInfo);
            continue;
        }
        for(iVar = 0; iVar < pTypeAttr->cVars; iVar++) {
            hr = pTypeInfo->lpVtbl->GetVarDesc(pTypeInfo, iVar, &pVarDesc);
            if(FAILED(hr))
                continue;
            if(pVarDesc->varkind == VAR_CONST &&
               !(pVarDesc->wVarFlags & (VARFLAG_FHIDDEN |
                                        VARFLAG_FRESTRICTED |
                                        VARFLAG_FNONBROWSABLE))) {
                hr = pTypeInfo->lpVtbl->GetNames(pTypeInfo, pVarDesc->memid, &bstr,
                                                 1, &len);
                if(FAILED(hr) || len == 0 || !bstr)
                    continue;
                pName = ole_wc2mb(bstr);
                val = ole_variant2val(V_UNION1(pVarDesc, lpvarValue));
                *pName = toupper(*pName);
                id = rb_intern(pName);
                if (rb_is_const_id(id)) {
                    rb_define_const(klass, pName, val);
                }
                else {
                    rb_hash_aset(constant, rb_str_new2(pName), val);
                }
                SysFreeString(bstr);
                if(pName) {
                    free(pName);
                    pName = NULL;
                }
            }
            pTypeInfo->lpVtbl->ReleaseVarDesc(pTypeInfo, pVarDesc);
        }
        pTypeInfo->lpVtbl->ReleaseTypeAttr(pTypeInfo, pTypeAttr);
        OLE_RELEASE(pTypeInfo);
    }
    rb_define_const(klass, "CONSTANTS", constant);
}

static HRESULT
clsid_from_remote(host, com, pclsid)
    VALUE host;
    VALUE com;
    CLSID *pclsid;
{
    HKEY hlm;
    HKEY hpid;
    VALUE subkey;
    LONG err;
    char clsid[100];
    OLECHAR *pbuf;
    DWORD len;
    DWORD dwtype;
    HRESULT hr = S_OK;
    err = RegConnectRegistry(StringValuePtr(host), HKEY_LOCAL_MACHINE, &hlm);
    if (err != ERROR_SUCCESS)
        return HRESULT_FROM_WIN32(err);
    subkey = rb_str_new2("SOFTWARE\\Classes\\");
    rb_str_concat(subkey, com);
    rb_str_cat2(subkey, "\\CLSID");
    err = RegOpenKeyEx(hlm, StringValuePtr(subkey), 0, KEY_READ, &hpid);
    if (err != ERROR_SUCCESS)
        hr = HRESULT_FROM_WIN32(err);
    else {
        len = sizeof(clsid);
        err = RegQueryValueEx(hpid, "", NULL, &dwtype, clsid, &len);
        if (err == ERROR_SUCCESS && dwtype == REG_SZ) {
            pbuf  = ole_mb2wc(clsid, -1);
            hr = CLSIDFromString(pbuf, pclsid);
            SysFreeString(pbuf);
        }
        else {
            hr = HRESULT_FROM_WIN32(err);
        }
        RegCloseKey(hpid);
    }
    RegCloseKey(hlm);
    return hr;
}

static VALUE
ole_create_dcom(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    VALUE ole, host, others;
    HRESULT hr;
    CLSID   clsid;
    OLECHAR *pbuf;

    COSERVERINFO serverinfo;
    MULTI_QI multi_qi;
    DWORD clsctx = CLSCTX_REMOTE_SERVER;

    if (!gole32)
        gole32 = LoadLibrary("OLE32");
    if (!gole32)
        rb_raise(rb_eRuntimeError, "failed to load OLE32");
    if (!gCoCreateInstanceEx)
        gCoCreateInstanceEx = (FNCOCREATEINSTANCEEX*)
            GetProcAddress(gole32, "CoCreateInstanceEx");
    if (!gCoCreateInstanceEx)
        rb_raise(rb_eRuntimeError, "CoCreateInstanceEx is not supported in this environment");
    rb_scan_args(argc, argv, "2*", &ole, &host, &others);

    pbuf  = ole_mb2wc(StringValuePtr(ole), -1);
    hr = CLSIDFromProgID(pbuf, &clsid);
    if (FAILED(hr))
        hr = clsid_from_remote(host, ole, &clsid);
    if (FAILED(hr))
        hr = CLSIDFromString(pbuf, &clsid);
    SysFreeString(pbuf);
    if (FAILED(hr))
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
                  "unknown OLE server: `%s'",
                  StringValuePtr(ole));
    memset(&serverinfo, 0, sizeof(COSERVERINFO));
    serverinfo.pwszName = ole_mb2wc(StringValuePtr(host), -1);
    memset(&multi_qi, 0, sizeof(MULTI_QI));
    multi_qi.pIID = &IID_IDispatch;
    hr = gCoCreateInstanceEx(&clsid, NULL, clsctx, &serverinfo, 1, &multi_qi);
    SysFreeString(serverinfo.pwszName);
    if (FAILED(hr))
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
                  "failed to create DCOM server `%s' in `%s'",
                  StringValuePtr(ole),
                  StringValuePtr(host));

    ole_set_member(self, (IDispatch*)multi_qi.pItf);
    return self;
}

static VALUE
ole_bind_obj(moniker, argc, argv, self)
    VALUE moniker;
    int argc;
    VALUE *argv;
    VALUE self;
{
    IBindCtx *pBindCtx;
    IMoniker *pMoniker;
    IDispatch *pDispatch;
    HRESULT hr;
    OLECHAR *pbuf;
    ULONG eaten = 0;

    ole_initialize();

    hr = CreateBindCtx(0, &pBindCtx);
    if(FAILED(hr)) {
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
                  "failed to create bind context");
    }

    pbuf  = ole_mb2wc(StringValuePtr(moniker), -1);
    hr = MkParseDisplayName(pBindCtx, pbuf, &eaten, &pMoniker);
    SysFreeString(pbuf);
    if(FAILED(hr)) {
        OLE_RELEASE(pBindCtx);
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
                  "failed to parse display name of moniker `%s'",
                  StringValuePtr(moniker));
    }
    hr = pMoniker->lpVtbl->BindToObject(pMoniker, pBindCtx, NULL,
                                        &IID_IDispatch,
                                        (void**)&pDispatch);
    OLE_RELEASE(pMoniker);
    OLE_RELEASE(pBindCtx);

    if(FAILED(hr)) {
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
                  "failed to bind moniker `%s'",
                  StringValuePtr(moniker));
    }
    return create_win32ole_object(self, pDispatch, argc, argv);
}

/*
 *  call-seq:
 *     WIN32OLE.connect( ole ) --> aWIN32OLE
 *
 *  Returns running OLE Automation object or WIN32OLE object from moniker.
 *  1st argument should be OLE program id or class id or moniker.
 *
 *     WIN32OLE.connect('Excel.Application') # => WIN32OLE object which represents running Excel.
 */
static VALUE
fole_s_connect(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    VALUE svr_name;
    VALUE others;
    HRESULT hr;
    CLSID   clsid;
    OLECHAR *pBuf;
    IDispatch *pDispatch;
    IUnknown *pUnknown;

    rb_secure(4);
    /* initialize to use OLE */
    ole_initialize();

    rb_scan_args(argc, argv, "1*", &svr_name, &others);
    if (ruby_safe_level > 0 && OBJ_TAINTED(svr_name)) {
        rb_raise(rb_eSecurityError, "Insecure Object Connection - %s",
                 StringValuePtr(svr_name));
    }

    /* get CLSID from OLE server name */
    pBuf  = ole_mb2wc(StringValuePtr(svr_name), -1);
    hr = CLSIDFromProgID(pBuf, &clsid);
    if(FAILED(hr)) {
        hr = CLSIDFromString(pBuf, &clsid);
    }
    SysFreeString(pBuf);
    if(FAILED(hr)) {
        return ole_bind_obj(svr_name, argc, argv, self);
    }

    hr = GetActiveObject(&clsid, 0, &pUnknown);
    if (FAILED(hr)) {
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
                  "OLE server `%s' not running", StringValuePtr(svr_name));
    }
    hr = pUnknown->lpVtbl->QueryInterface(pUnknown, &IID_IDispatch,
                                             (void **)&pDispatch);
    if(FAILED(hr)) {
        OLE_RELEASE(pUnknown);
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
                  "failed to create WIN32OLE server `%s'",
                  StringValuePtr(svr_name));
    }

    OLE_RELEASE(pUnknown);

    return create_win32ole_object(self, pDispatch, argc, argv);
}

/*
 *  call-seq:
 *     WIN32OLE.const_load( ole, mod = WIN32OLE)
 *
 *  Defines the constants of OLE Automation server as mod's constants.
 *  The first argument is WIN32OLE object or type library name.
 *  If 2nd argument is omitted, the default is WIN32OLE.
 *  The first letter of Ruby's constant variable name is upper case,
 *  so constant variable name of WIN32OLE object is capitalized.
 *  For example, the 'xlTop' constant of Excel is changed to 'XlTop'
 *  in WIN32OLE.
 *  If the first letter of constant variabl is not [A-Z], then
 *  the constant is defined as CONSTANTS hash element.
 *
 *     module EXCEL_CONST
 *     end
 *     excel = WIN32OLE.new('Excel.Application')
 *     WIN32OLE.const_load(excel, EXCEL_CONST)
 *     puts EXCEL_CONST::XlTop # => -4160
 *     puts EXCEL_CONST::CONSTANTS['_xlDialogChartSourceData'] # => 541
 *
 *     WIN32OLE.const_load(excel)
 *     puts WIN32OLE::XlTop # => -4160
 *
 *     module MSO
 *     end
 *     WIN32OLE.const_load('Microsoft Office 9.0 Object Library', MSO)
 *     puts MSO::MsoLineSingle # => 1
 */
static VALUE
fole_s_const_load(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    VALUE ole;
    VALUE klass;
    struct oledata *pole;
    ITypeInfo *pTypeInfo;
    ITypeLib *pTypeLib;
    unsigned int index;
    HRESULT hr;
    OLECHAR *pBuf;
    VALUE file;
    LCID    lcid = LOCALE_SYSTEM_DEFAULT;

    rb_secure(4);
    rb_scan_args(argc, argv, "11", &ole, &klass);
    if (TYPE(klass) != T_CLASS &&
        TYPE(klass) != T_MODULE &&
        TYPE(klass) != T_NIL) {
        rb_raise(rb_eTypeError, "2nd parameter must be Class or Module");
    }
    if (rb_obj_is_kind_of(ole, cWIN32OLE)) {
        OLEData_Get_Struct(ole, pole);
        hr = pole->pDispatch->lpVtbl->GetTypeInfo(pole->pDispatch,
                                                  0, lcid, &pTypeInfo);
        if(FAILED(hr)) {
            ole_raise(hr, rb_eRuntimeError, "failed to GetTypeInfo");
        }
        hr = pTypeInfo->lpVtbl->GetContainingTypeLib(pTypeInfo, &pTypeLib, &index);
        if(FAILED(hr)) {
            OLE_RELEASE(pTypeInfo);
            ole_raise(hr, rb_eRuntimeError, "failed to GetContainingTypeLib");
        }
        OLE_RELEASE(pTypeInfo);
        if(TYPE(klass) != T_NIL) {
            ole_const_load(pTypeLib, klass, self);
        }
        else {
            ole_const_load(pTypeLib, cWIN32OLE, self);
        }
        OLE_RELEASE(pTypeLib);
    }
    else if(TYPE(ole) == T_STRING) {
        file = typelib_file(ole);
        if (file == Qnil) {
            file = ole;
        }
        pBuf = ole_mb2wc(StringValuePtr(file), -1);
        hr = LoadTypeLibEx(pBuf, REGKIND_NONE, &pTypeLib);
        SysFreeString(pBuf);
        if (FAILED(hr))
          ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to LoadTypeLibEx");
        if(TYPE(klass) != T_NIL) {
            ole_const_load(pTypeLib, klass, self);
        }
        else {
            ole_const_load(pTypeLib, cWIN32OLE, self);
        }
        OLE_RELEASE(pTypeLib);
    }
    else {
        rb_raise(rb_eTypeError, "1st parameter must be WIN32OLE instance");
    }
    return Qnil;
}

static VALUE
ole_classes_from_typelib(pTypeLib, classes)
    ITypeLib *pTypeLib;
    VALUE classes;
{

    long count;
    int i;
    HRESULT hr;
    BSTR bstr;
    ITypeInfo *pTypeInfo;
    VALUE type;

    rb_secure(4);
    count = pTypeLib->lpVtbl->GetTypeInfoCount(pTypeLib);
    for (i = 0; i < count; i++) {
        hr = pTypeLib->lpVtbl->GetDocumentation(pTypeLib, i,
                                                &bstr, NULL, NULL, NULL);
        if (FAILED(hr))
            continue;

        hr = pTypeLib->lpVtbl->GetTypeInfo(pTypeLib, i, &pTypeInfo);
        if (FAILED(hr))
            continue;

        type = foletype_s_allocate(cWIN32OLE_TYPE);
        oletype_set_member(type, pTypeInfo, WC2VSTR(bstr));

        rb_ary_push(classes, type);
        OLE_RELEASE(pTypeInfo);
    }
    return classes;
}

static ULONG
reference_count(pole)
    struct oledata * pole;
{
    ULONG n = 0;
    if(pole->pDispatch) {
        OLE_ADDREF(pole->pDispatch);
        n = OLE_RELEASE(pole->pDispatch);
    }
    return n;
}

/*
 *  call-seq:
 *     WIN32OLE.ole_reference_count(aWIN32OLE) --> number
 *
 *  Returns reference counter of Dispatch interface of WIN32OLE object.
 *  You should not use this method because this method
 *  exists only for debugging WIN32OLE.
 */
static VALUE
fole_s_reference_count(self, obj)
    VALUE self;
    VALUE obj;
{
    struct oledata * pole;
    OLEData_Get_Struct(obj, pole);
    return INT2NUM(reference_count(pole));
}

/*
 *  call-seq:
 *     WIN32OLE.ole_free(aWIN32OLE) --> number
 *
 *  Invokes Release method of Dispatch interface of WIN32OLE object.
 *  You should not use this method because this method
 *  exists only for debugging WIN32OLE.
 *  The return value is reference counter of OLE object.
 */
static VALUE
fole_s_free(self, obj)
    VALUE self;
    VALUE obj;
{
    ULONG n = 0;
    struct oledata * pole;
    OLEData_Get_Struct(obj, pole);
    if(pole->pDispatch) {
        if (reference_count(pole) > 0) {
            n = OLE_RELEASE(pole->pDispatch);
        }
    }
    return INT2NUM(n);
}

static HWND
ole_show_help(helpfile, helpcontext)
    VALUE helpfile;
    VALUE helpcontext;
{
    FNHTMLHELP *pfnHtmlHelp;
    HWND hwnd = 0;

    if(!ghhctrl)
        ghhctrl = LoadLibrary("HHCTRL.OCX");
    if (!ghhctrl)
        return hwnd;
    pfnHtmlHelp = (FNHTMLHELP*)GetProcAddress(ghhctrl, "HtmlHelpA");
    if (!pfnHtmlHelp)
        return hwnd;
    hwnd = pfnHtmlHelp(GetDesktopWindow(), StringValuePtr(helpfile),
                    0x0f, NUM2INT(helpcontext));
    if (hwnd == 0)
        hwnd = pfnHtmlHelp(GetDesktopWindow(), StringValuePtr(helpfile),
                 0,  NUM2INT(helpcontext));
    return hwnd;
}

/*
 *  call-seq:
 *     WIN32OLE.ole_show_help(obj [,helpcontext])
 *
 *  Displays helpfile. The 1st argument specifies WIN32OLE_TYPE
 *  object or WIN32OLE_METHOD object or helpfile.
 *
 *     excel = WIN32OLE.new('Excel.Application')
 *     typeobj = excel.ole_type
 *     WIN32OLE.ole_show_help(typeobj)
 */
static VALUE
fole_s_show_help(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    VALUE target;
    VALUE helpcontext;
    VALUE helpfile;
    VALUE name;
    HWND  hwnd;
    rb_scan_args(argc, argv, "11", &target, &helpcontext);
    if (rb_obj_is_kind_of(target, cWIN32OLE_TYPE) ||
        rb_obj_is_kind_of(target, cWIN32OLE_METHOD)) {
        helpfile = rb_funcall(target, rb_intern("helpfile"), 0);
        if(strlen(StringValuePtr(helpfile)) == 0) {
            name = rb_ivar_get(target, rb_intern("name"));
            rb_raise(rb_eRuntimeError, "no helpfile of `%s'",
                     StringValuePtr(name));
        }
        helpcontext = rb_funcall(target, rb_intern("helpcontext"), 0);
    } else {
        helpfile = target;
    }
    if (TYPE(helpfile) != T_STRING) {
        rb_raise(rb_eTypeError, "1st parameter must be (String|WIN32OLE_TYPE|WIN32OLE_METHOD)");
    }
    hwnd = ole_show_help(helpfile, helpcontext);
    if(hwnd == 0) {
        rb_raise(rb_eRuntimeError, "failed to open help file `%s'",
                 StringValuePtr(helpfile));
    }
    return Qnil;
}

/*
 *  call-seq:
 *     WIN32OLE.codepage
 *
 *  Returns current codepage.
 *     WIN32OLE.codepage # => WIN32OLE::CP_ACP
 */
static VALUE
fole_s_get_code_page(self)
    VALUE self;
{
    return INT2FIX(cWIN32OLE_cp);
}

/*
 *  call-seq:
 *     WIN32OLE.codepage = CP
 *
 *  Sets current codepage.
 *     WIN32OLE.codepage = WIN32OLE::CP_UTF8
 */
static VALUE
fole_s_set_code_page(self, vcp)
    VALUE self;
    VALUE vcp;
{
    UINT cp = FIX2INT(vcp);

    switch(cp) {
    case CP_ACP:
    case CP_OEMCP:
    case CP_MACCP:
    case CP_THREAD_ACP:
    case CP_SYMBOL:
    case CP_UTF7:
    case CP_UTF8:
        cWIN32OLE_cp = cp;
        break;
    default:
        rb_raise(eWIN32OLE_RUNTIME_ERROR, "codepage should be WIN32OLE::CP_ACP, WIN32OLE::CP_OEMCP, WIN32OLE::CP_MACCP, WIN32OLE::CP_THREAD_ACP, WIN32OLE::CP_SYMBOL, WIN32OLE::CP_UTF7, WIN32OLE::CP_UTF8");
        break;
    }

    /*
     * Should this method return old codepage?
     */
    return Qnil;
}

/*
 * Document-class: WIN32OLE
 *
 *   <code>WIN32OLE</code> objects represent OLE Automation object in Ruby.
 */

/*
 *  call-seq:
 *     WIN32OLE.new(server, [host]) -> WIN32OLE object
 *
 *  Returns a new WIN32OLE object(OLE Automation object).
 *  The first argument server specifies OLE Automation server.
 *  The first argument should be CLSID or PROGID.
 *  If second argument host specified, then returns OLE Automation
 *  object on host.
 *
 *      WIN32OLE.new('Excel.Application') # => Excel OLE Automation WIN32OLE object.
 *      WIN32OLE.new('{00024500-0000-0000-C000-000000000046}') # => Excel OLE Automation WIN32OLE object.
 */
static VALUE
fole_initialize(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    VALUE svr_name;
    VALUE host;
    VALUE others;
    HRESULT hr;
    CLSID   clsid;
    OLECHAR *pBuf;
    IDispatch *pDispatch;

    rb_secure(4);
    rb_call_super(0, 0);
    rb_scan_args(argc, argv, "11*", &svr_name, &host, &others);

    if (ruby_safe_level > 0 && OBJ_TAINTED(svr_name)) {
        rb_raise(rb_eSecurityError, "Insecure Object Creation - %s",
                 StringValuePtr(svr_name));
    }
    if (!NIL_P(host)) {
        if (ruby_safe_level > 0 && OBJ_TAINTED(host)) {
            rb_raise(rb_eSecurityError, "Insecure Object Creation - %s",
                     StringValuePtr(svr_name));
        }
        return ole_create_dcom(argc, argv, self);
    }

    /* get CLSID from OLE server name */
    pBuf  = ole_mb2wc(StringValuePtr(svr_name), -1);
    hr = CLSIDFromProgID(pBuf, &clsid);
    if(FAILED(hr)) {
        hr = CLSIDFromString(pBuf, &clsid);
    }
    SysFreeString(pBuf);
    if(FAILED(hr)) {
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
                  "unknown OLE server: `%s'",
                  StringValuePtr(svr_name));
    }

    /* get IDispatch interface */
    hr = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER,
                          &IID_IDispatch, (void**)&pDispatch);
    if(FAILED(hr)) {
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
                  "failed to create WIN32OLE object from `%s'",
                  StringValuePtr(svr_name));
    }

    ole_set_member(self, pDispatch);
    return self;
}

static VALUE
hash2named_arg(pair, pOp)
    VALUE pair;
    struct oleparam* pOp;
{
    unsigned int index, i;
    VALUE key, value;
    index = pOp->dp.cNamedArgs;

    /*-------------------------------------
      the data-type of key must be String
    ---------------------------------------*/
    key = rb_ary_entry(pair, 0);
    if(TYPE(key) != T_STRING) {
        /* clear name of dispatch parameters */
        for(i = 1; i < index + 1; i++) {
            SysFreeString(pOp->pNamedArgs[i]);
        }
        /* clear dispatch parameters */
        for(i = 0; i < index; i++ ) {
            VariantClear(&(pOp->dp.rgvarg[i]));
        }
        /* raise an exception */
        Check_Type(key, T_STRING);
    }

    /* pNamedArgs[0] is <method name>, so "index + 1" */
    pOp->pNamedArgs[index + 1] = ole_mb2wc(StringValuePtr(key), -1);

    value = rb_ary_entry(pair, 1);
    VariantInit(&(pOp->dp.rgvarg[index]));
    ole_val2variant(value, &(pOp->dp.rgvarg[index]));

    pOp->dp.cNamedArgs += 1;
    return Qnil;
}

static VALUE
set_argv(realargs, beg, end)
    VARIANTARG* realargs;
    unsigned int beg, end;
{
    VALUE argv = rb_const_get(cWIN32OLE, rb_intern("ARGV"));

    Check_Type(argv, T_ARRAY);
    rb_ary_clear(argv);
    while (end-- > beg) {
        rb_ary_push(argv, ole_variant2val(&realargs[end]));
        VariantClear(&realargs[end]);
    }
    return argv;
}

static VALUE
ole_invoke(argc, argv, self, wFlags)
    int argc;
    VALUE *argv;
    VALUE self;
    USHORT wFlags;
{
    LCID    lcid = LOCALE_SYSTEM_DEFAULT;
    struct oledata *pole;
    HRESULT hr;
    VALUE cmd;
    VALUE paramS;
    VALUE param;
    VALUE obj;
    VALUE v;

    BSTR wcmdname;

    DISPID DispID;
    DISPID* pDispID;
    EXCEPINFO excepinfo;
    VARIANT result;
    VARIANTARG* realargs = NULL;
    unsigned int argErr = 0;
    unsigned int i;
    unsigned int cNamedArgs;
    int n;
    struct oleparam op;
    struct olevariantdata *pvar;
    memset(&excepinfo, 0, sizeof(EXCEPINFO));

    VariantInit(&result);

    op.dp.rgvarg = NULL;
    op.dp.rgdispidNamedArgs = NULL;
    op.dp.cNamedArgs = 0;
    op.dp.cArgs = 0;

    rb_scan_args(argc, argv, "1*", &cmd, &paramS);
    OLEData_Get_Struct(self, pole);
    if(!pole->pDispatch) {
        rb_raise(rb_eRuntimeError, "failed to get dispatch interface");
    }
    wcmdname = ole_mb2wc(StringValuePtr(cmd), -1);
    hr = pole->pDispatch->lpVtbl->GetIDsOfNames( pole->pDispatch, &IID_NULL,
                                                 &wcmdname, 1, lcid, &DispID);
    SysFreeString(wcmdname);
    if(FAILED(hr)) {
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
                  "unknown property or method: `%s'",
                  StringValuePtr(cmd));
    }

    /* pick up last argument of method */
    param = rb_ary_entry(paramS, argc-2);

    op.dp.cNamedArgs = 0;

    /* if last arg is hash object */
    if(TYPE(param) == T_HASH) {
        /*------------------------------------------
          hash object ==> named dispatch parameters
        --------------------------------------------*/
        cNamedArgs = NUM2INT(rb_funcall(param, rb_intern("length"), 0));
        op.dp.cArgs = cNamedArgs + argc - 2;
        op.pNamedArgs = ALLOCA_N(OLECHAR*, cNamedArgs + 1);
        op.dp.rgvarg = ALLOCA_N(VARIANTARG, op.dp.cArgs);
        rb_iterate(rb_each, param, hash2named_arg, (VALUE)&op);

        pDispID = ALLOCA_N(DISPID, cNamedArgs + 1);
        op.pNamedArgs[0] = ole_mb2wc(StringValuePtr(cmd), -1);
        hr = pole->pDispatch->lpVtbl->GetIDsOfNames(pole->pDispatch,
                                                    &IID_NULL,
                                                    op.pNamedArgs,
                                                    op.dp.cNamedArgs + 1,
                                                    lcid, pDispID);
        for(i = 0; i < op.dp.cNamedArgs + 1; i++) {
            SysFreeString(op.pNamedArgs[i]);
            op.pNamedArgs[i] = NULL;
        }
        if(FAILED(hr)) {
            /* clear dispatch parameters */
            for(i = 0; i < op.dp.cArgs; i++ ) {
                VariantClear(&op.dp.rgvarg[i]);
            }
            ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
                      "failed to get named argument info: `%s'",
                      StringValuePtr(cmd));
        }
        op.dp.rgdispidNamedArgs = &(pDispID[1]);
    }
    else {
        cNamedArgs = 0;
        op.dp.cArgs = argc - 1;
        op.pNamedArgs = ALLOCA_N(OLECHAR*, cNamedArgs + 1);
        if (op.dp.cArgs > 0) {
            op.dp.rgvarg  = ALLOCA_N(VARIANTARG, op.dp.cArgs);
        }
    }
    /*--------------------------------------
      non hash args ==> dispatch parameters
     ----------------------------------------*/
    if(op.dp.cArgs > cNamedArgs) {
        realargs = ALLOCA_N(VARIANTARG, op.dp.cArgs-cNamedArgs+1);
        for(i = cNamedArgs; i < op.dp.cArgs; i++) {
            n = op.dp.cArgs - i + cNamedArgs - 1;
            VariantInit(&realargs[n]);
            VariantInit(&op.dp.rgvarg[n]);
            param = rb_ary_entry(paramS, i-cNamedArgs);
            if (rb_obj_is_kind_of(param, cWIN32OLE_VARIANT)) {
                Data_Get_Struct(param, struct olevariantdata, pvar);
                VariantCopy(&op.dp.rgvarg[n], &(pvar->var));
            } else {
                ole_val2variant(param, &realargs[n]);
                V_VT(&op.dp.rgvarg[n]) = VT_VARIANT | VT_BYREF;
                V_VARIANTREF(&op.dp.rgvarg[n]) = &realargs[n];
            }
        }
    }
    /* apparent you need to call propput, you need this */
    if (wFlags & DISPATCH_PROPERTYPUT) {
        if (op.dp.cArgs == 0)
            return ResultFromScode(E_INVALIDARG);

        op.dp.cNamedArgs = 1;
        op.dp.rgdispidNamedArgs = ALLOCA_N( DISPID, 1 );
        op.dp.rgdispidNamedArgs[0] = DISPID_PROPERTYPUT;
    }

    hr = pole->pDispatch->lpVtbl->Invoke(pole->pDispatch, DispID,
                                         &IID_NULL, lcid, wFlags, &op.dp,
                                         &result, &excepinfo, &argErr);

    if (FAILED(hr)) {
        /* retry to call args by value */
        if(op.dp.cArgs > cNamedArgs) {
            for(i = cNamedArgs; i < op.dp.cArgs; i++) {
                n = op.dp.cArgs - i + cNamedArgs - 1;
                param = rb_ary_entry(paramS, i-cNamedArgs);
                ole_val2variant(param, &op.dp.rgvarg[n]);
            }
            memset(&excepinfo, 0, sizeof(EXCEPINFO));
            VariantInit(&result);
            hr = pole->pDispatch->lpVtbl->Invoke(pole->pDispatch, DispID,
                                                 &IID_NULL, lcid, wFlags,
                                                 &op.dp, &result,
                                                 &excepinfo, &argErr);

            for(i = cNamedArgs; i < op.dp.cArgs; i++) {
                n = op.dp.cArgs - i + cNamedArgs - 1;
                VariantClear(&op.dp.rgvarg[n]);
            }
        }

        if (FAILED(hr)) {
            /* retry after converting nil to VT_EMPTY */
            if (op.dp.cArgs > cNamedArgs) {
                for(i = cNamedArgs; i < op.dp.cArgs; i++) {
                    n = op.dp.cArgs - i + cNamedArgs - 1;
                    param = rb_ary_entry(paramS, i-cNamedArgs);
                    ole_val2variant2(param, &op.dp.rgvarg[n]);
                }
                memset(&excepinfo, 0, sizeof(EXCEPINFO));
                VariantInit(&result);
                hr = pole->pDispatch->lpVtbl->Invoke(pole->pDispatch, DispID,
                        &IID_NULL, lcid, wFlags,
                        &op.dp, &result,
                        &excepinfo, &argErr);
                for(i = cNamedArgs; i < op.dp.cArgs; i++) {
                    n = op.dp.cArgs - i + cNamedArgs - 1;
                    VariantClear(&op.dp.rgvarg[n]);
                }
            }
        }

        /* mega kludge. if a method in WORD is called and we ask
         * for a result when one is not returned then
         * hResult == DISP_E_EXCEPTION. this only happens on
         * functions whose DISPID > 0x8000 */
        if (hr == DISP_E_EXCEPTION && DispID > 0x8000) {
            VariantInit(&result);
            memset(&excepinfo, 0, sizeof(EXCEPINFO));
            hr = pole->pDispatch->lpVtbl->Invoke(pole->pDispatch, DispID,
                                                 &IID_NULL, lcid, wFlags,
                                                 &op.dp, &result,
                                                 &excepinfo, &argErr);

        }
    }
    /* clear dispatch parameter */
    if(op.dp.cArgs > cNamedArgs) {
        set_argv(realargs, cNamedArgs, op.dp.cArgs);
    }
    else {
        for(i = 0; i < op.dp.cArgs; i++) {
            VariantClear(&op.dp.rgvarg[i]);
        }
    }

    if (FAILED(hr)) {
        v = ole_excepinfo2msg(&excepinfo);
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "%s%s",
                  StringValuePtr(cmd), StringValuePtr(v));
    }
    obj = ole_variant2val(&result);
    VariantClear(&result);
    return obj;
}

/*
 *  call-seq:
 *     WIN32OLE#invoke(method, [arg1,...])  => return value of method.
 *
 *  Runs OLE method.
 *  The first argument specifies the method name of OLE Automation object.
 *  The others specify argument of the <i>method</i>.
 *  If you can not execute <i>method</i> directly, then use this method instead.
 *
 *    excel = WIN32OLE.new('Excel.Application')
 *    excel.invoke('Quit')  # => same as excel.Quit
 *
 */
static VALUE
fole_invoke(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    return ole_invoke(argc, argv, self, DISPATCH_METHOD|DISPATCH_PROPERTYGET);
}

static VALUE
ole_invoke2(self, dispid, args, types, dispkind)
    VALUE self;
    VALUE dispid;
    VALUE args;
    VALUE types;
    USHORT dispkind;
{
    HRESULT hr;
    struct oledata *pole;
    unsigned int argErr = 0;
    EXCEPINFO excepinfo;
    VARIANT result;
    DISPPARAMS dispParams;
    VARIANTARG* realargs = NULL;
    int i, j;
    VALUE obj = Qnil;
    VALUE tp, param;
    VALUE v;
    VARTYPE vt;

    Check_Type(args, T_ARRAY);
    Check_Type(types, T_ARRAY);

    memset(&excepinfo, 0, sizeof(EXCEPINFO));
    memset(&dispParams, 0, sizeof(DISPPARAMS));
    VariantInit(&result);
    OLEData_Get_Struct(self, pole);

    dispParams.cArgs = RARRAY(args)->len;
    dispParams.rgvarg = ALLOCA_N(VARIANTARG, dispParams.cArgs);
    realargs = ALLOCA_N(VARIANTARG, dispParams.cArgs);
    for (i = 0, j = dispParams.cArgs - 1; i < (int)dispParams.cArgs; i++, j--)
    {
        VariantInit(&realargs[i]);
        VariantInit(&dispParams.rgvarg[i]);
        tp = rb_ary_entry(types, j);
        vt = (VARTYPE)FIX2INT(tp);
        V_VT(&dispParams.rgvarg[i]) = vt;
        param = rb_ary_entry(args, j);
        if (param == Qnil)
        {

            V_VT(&dispParams.rgvarg[i]) = V_VT(&realargs[i]) = VT_ERROR;
            V_ERROR(&dispParams.rgvarg[i]) = V_ERROR(&realargs[i]) = DISP_E_PARAMNOTFOUND;
        }
        else
        {
            if (vt & VT_ARRAY)
            {
                int ent;
                LPBYTE pb;
                short* ps;
                LPLONG pl;
                VARIANT* pv;
                CY *py;
                VARTYPE v;
                SAFEARRAYBOUND rgsabound[1];
                Check_Type(param, T_ARRAY);
                rgsabound[0].lLbound = 0;
                rgsabound[0].cElements = RARRAY(param)->len;
                v = vt & ~(VT_ARRAY | VT_BYREF);
                V_ARRAY(&realargs[i]) = SafeArrayCreate(v, 1, rgsabound);
                V_VT(&realargs[i]) = VT_ARRAY | v;
                SafeArrayLock(V_ARRAY(&realargs[i]));
                pb = V_ARRAY(&realargs[i])->pvData;
                ps = V_ARRAY(&realargs[i])->pvData;
                pl = V_ARRAY(&realargs[i])->pvData;
                py = V_ARRAY(&realargs[i])->pvData;
                pv = V_ARRAY(&realargs[i])->pvData;
                for (ent = 0; ent < (int)rgsabound[0].cElements; ent++)
                {
                    VARIANT velem;
                    VALUE elem = rb_ary_entry(param, ent);
                    ole_val2variant(elem, &velem);
                    if (v != VT_VARIANT)
                    {
                        VariantChangeTypeEx(&velem, &velem,
                            LOCALE_SYSTEM_DEFAULT, 0, v);
                    }
                    switch (v)
                    {
                    /* 128 bits */
                    case VT_VARIANT:
                        *pv++ = velem;
                        break;
                    /* 64 bits */
                    case VT_R8:
                    case VT_CY:
                    case VT_DATE:
                        *py++ = V_CY(&velem);
                        break;
                    /* 16 bits */
                    case VT_BOOL:
                    case VT_I2:
                    case VT_UI2:
                        *ps++ = V_I2(&velem);
                        break;
                    /* 8 bites */
                    case VT_UI1:
                    case VT_I1:
                        *pb++ = V_UI1(&velem);
                        break;
                    /* 32 bits */
                    default:
                        *pl++ = V_I4(&velem);
                        break;
                    }
                }
                SafeArrayUnlock(V_ARRAY(&realargs[i]));
            }
            else
            {
                ole_val2variant(param, &realargs[i]);
                if ((vt & (~VT_BYREF)) != VT_VARIANT)
                {
                    hr = VariantChangeTypeEx(&realargs[i], &realargs[i],
                                             LOCALE_SYSTEM_DEFAULT, 0,
                                             (VARTYPE)(vt & (~VT_BYREF)));
                    if (hr != S_OK)
                    {
                        rb_raise(rb_eTypeError, "not valid value");
                    }
                }
            }
            if ((vt & VT_BYREF) || vt == VT_VARIANT)
            {
                if (vt == VT_VARIANT)
                    V_VT(&dispParams.rgvarg[i]) = VT_VARIANT | VT_BYREF;
                switch (vt & (~VT_BYREF))
                {
                /* 128 bits */
                case VT_VARIANT:
                    V_VARIANTREF(&dispParams.rgvarg[i]) = &realargs[i];
                    break;
                /* 64 bits */
                case VT_R8:
                case VT_CY:
                case VT_DATE:
                    V_CYREF(&dispParams.rgvarg[i]) = &V_CY(&realargs[i]);
                    break;
                /* 16 bits */
                case VT_BOOL:
                case VT_I2:
                case VT_UI2:
                    V_I2REF(&dispParams.rgvarg[i]) = &V_I2(&realargs[i]);
                    break;
                /* 8 bites */
                case VT_UI1:
                case VT_I1:
                    V_UI1REF(&dispParams.rgvarg[i]) = &V_UI1(&realargs[i]);
                    break;
                /* 32 bits */
                default:
                    V_I4REF(&dispParams.rgvarg[i]) = &V_I4(&realargs[i]);
                    break;
                }
            }
            else
            {
                /* copy 64 bits of data */
                V_CY(&dispParams.rgvarg[i]) = V_CY(&realargs[i]);
            }
        }
    }

    if (dispkind & DISPATCH_PROPERTYPUT) {
        dispParams.cNamedArgs = 1;
        dispParams.rgdispidNamedArgs = ALLOCA_N( DISPID, 1 );
        dispParams.rgdispidNamedArgs[0] = DISPID_PROPERTYPUT;
    }

    hr = pole->pDispatch->lpVtbl->Invoke(pole->pDispatch, NUM2INT(dispid),
                                         &IID_NULL, LOCALE_SYSTEM_DEFAULT,
                                         dispkind,
                                         &dispParams, &result,
                                         &excepinfo, &argErr);

    if (FAILED(hr)) {
        v = ole_excepinfo2msg(&excepinfo);
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "_invoke %s",
                  StringValuePtr(v));
    }

    /* clear dispatch parameter */
    if(dispParams.cArgs > 0) {
        set_argv(realargs, 0, dispParams.cArgs);
    }

    obj = ole_variant2val(&result);
    VariantClear(&result);
    return obj;
}

/*
 *   call-seq:
 *      WIN32OLE#_invoke(dispid, args, types)
 *
 *   Runs the early binding method.
 *   The 1st argument specifies dispatch ID,
 *   the 2nd argument specifies the array of arguments,
 *   the 3rd argument specifies the array of the type of arguments.
 *
 *      excel = WIN32OLE.new('Excel.Application')
 *      excel._invoke(302, [], []) #  same effect as excel.Quit
 */
static VALUE
fole_invoke2(self, dispid, args, types)
    VALUE self;
    VALUE dispid;
    VALUE args;
    VALUE types;
{
    return ole_invoke2(self, dispid, args, types, DISPATCH_METHOD);
}

/*
 *  call-seq:
 *     WIN32OLE#_getproperty(dispid, args, types)
 *
 *  Runs the early binding method to get property.
 *  The 1st argument specifies dispatch ID,
 *  the 2nd argument specifies the array of arguments,
 *  the 3rd argument specifies the array of the type of arguments.
 *
 *     excel = WIN32OLE.new('Excel.Application')
 *     puts excel._getproperty(558, [], []) # same effect as puts excel.visible
 */
static VALUE
fole_getproperty2(self, dispid, args, types)
    VALUE self;
    VALUE dispid;
    VALUE args;
    VALUE types;
{
    return ole_invoke2(self, dispid, args, types, DISPATCH_PROPERTYGET);
}

/*
 *   call-seq:
 *      WIN32OLE#_setproperty(dispid, args, types)
 *
 *   Runs the early binding method to set property.
 *   The 1st argument specifies dispatch ID,
 *   the 2nd argument specifies the array of arguments,
 *   the 3rd argument specifies the array of the type of arguments.
 *
 *      excel = WIN32OLE.new('Excel.Application')
 *      excel._setproperty(558, [true], [WIN32OLE::VARIANT::VT_BOOL]) # same effect as excel.visible = true
 */
static VALUE
fole_setproperty2(self, dispid, args, types)
    VALUE self;
    VALUE dispid;
    VALUE args;
    VALUE types;
{
    return ole_invoke2(self, dispid, args, types, DISPATCH_PROPERTYPUT);
}

/*
 *  call-seq:
 *     WIN32OLE['property']=val
 *     WIN32OLE.setproperty('property', [arg1, arg2,...] val)
 *
 *  Sets property of OLE object.
 *  When you want to set property with argument, you can use this method.
 *
 *     excel = WIN32OLE.new('Excel.Application')
 *     excel['Visible'] = true
 *     book = excel.workbooks.add
 *     sheet = book.worksheets(1)
 *     sheet.setproperty('Cells', 1, 2, 10) # => The B1 cell value is 10.
 */
static VALUE
fole_setproperty(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    return ole_invoke(argc, argv, self, DISPATCH_PROPERTYPUT);
}

/*
 *  call-seq:
 *     WIN32OLE['property']
 *
 *  Returns property of OLE object.
 *
 *     excel = WIN32OLE.new('Excel.Application')
 *     puts excel['Visible'] # => false
 */
static VALUE
fole_getproperty(self, property)
    VALUE self, property;
{
    return ole_invoke(1, &property, self, DISPATCH_PROPERTYGET);
}

static VALUE
ole_propertyput(self, property, value)
    VALUE self, property, value;
{
    struct oledata *pole;
    unsigned argErr;
    unsigned int index;
    HRESULT hr;
    EXCEPINFO excepinfo;
    DISPID dispID = DISPID_VALUE;
    DISPID dispIDParam = DISPID_PROPERTYPUT;
    USHORT wFlags = DISPATCH_PROPERTYPUT;
    DISPPARAMS dispParams;
    VARIANTARG propertyValue[2];
    OLECHAR* pBuf[1];
    VALUE v;
    LCID    lcid = LOCALE_SYSTEM_DEFAULT;
    dispParams.rgdispidNamedArgs = &dispIDParam;
    dispParams.rgvarg = propertyValue;
    dispParams.cNamedArgs = 1;
    dispParams.cArgs = 1;

    VariantInit(&propertyValue[0]);
    VariantInit(&propertyValue[1]);
    memset(&excepinfo, 0, sizeof(excepinfo));

    OLEData_Get_Struct(self, pole);

    /* get ID from property name */
    pBuf[0]  = ole_mb2wc(StringValuePtr(property), -1);
    hr = pole->pDispatch->lpVtbl->GetIDsOfNames(pole->pDispatch, &IID_NULL,
                                                pBuf, 1, lcid, &dispID);
    SysFreeString(pBuf[0]);
    pBuf[0] = NULL;

    if(FAILED(hr)) {
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR,
                  "unknown property or method: `%s'",
                  StringValuePtr(property));
    }
    /* set property value */
    ole_val2variant(value, &propertyValue[0]);
    hr = pole->pDispatch->lpVtbl->Invoke(pole->pDispatch, dispID, &IID_NULL,
                                         lcid, wFlags, &dispParams,
                                         NULL, &excepinfo, &argErr);

    for(index = 0; index < dispParams.cArgs; ++index) {
        VariantClear(&propertyValue[index]);
    }
    if (FAILED(hr)) {
        v = ole_excepinfo2msg(&excepinfo);
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, StringValuePtr(v));
    }
    return Qnil;
}

/*
 *  call-seq:
 *     WIN32OLE#ole_free
 *
 *  invokes Release method of Dispatch interface of WIN32OLE object.
 *  Usually, you do not need to call this method because Release method
 *  called automatically when WIN32OLE object garbaged.
 *
 */
static VALUE
fole_free(self)
    VALUE self;
{
    struct oledata *pole;
    rb_secure(4);
    OLEData_Get_Struct(self, pole);
    OLE_FREE(pole->pDispatch);
    pole->pDispatch = NULL;
    return Qnil;
}

static VALUE
ole_each_sub(pEnumV)
    VALUE pEnumV;
{
    VARIANT variant;
    VALUE obj = Qnil;
    IEnumVARIANT *pEnum = (IEnumVARIANT *)pEnumV;
    VariantInit(&variant);
    while(pEnum->lpVtbl->Next(pEnum, 1, &variant, NULL) == S_OK) {
        obj = ole_variant2val(&variant);
        VariantClear(&variant);
        VariantInit(&variant);
        rb_yield(obj);
    }
    return Qnil;
}

static VALUE
ole_ienum_free(pEnumV)
    VALUE pEnumV;
{
    IEnumVARIANT *pEnum = (IEnumVARIANT *)pEnumV;
    OLE_RELEASE(pEnum);
    return Qnil;
}

/*
 *  call-seq:
 *     WIN32OLE#each {|i|...}
 *
 *  Iterates over each item of OLE collection which has IEnumVARIANT interface.
 *
 *     excel = WIN32OLE.new('Excel.Application')
 *     book = excel.workbooks.add
 *     sheets = book.worksheets(1)
 *     cells = sheets.cells("A1:A5")
 *     cells.each do |cell|
 *       cell.value = 10
 *     end
 */
static VALUE
fole_each(self)
    VALUE self;
{
    LCID    lcid = LOCALE_SYSTEM_DEFAULT;

    struct oledata *pole;

    unsigned int argErr;
    EXCEPINFO excepinfo;
    DISPPARAMS dispParams;
    VARIANT result;
    HRESULT hr;
    IEnumVARIANT *pEnum = NULL;

    VariantInit(&result);
    dispParams.rgvarg = NULL;
    dispParams.rgdispidNamedArgs = NULL;
    dispParams.cNamedArgs = 0;
    dispParams.cArgs = 0;
    memset(&excepinfo, 0, sizeof(excepinfo));

    OLEData_Get_Struct(self, pole);
    hr = pole->pDispatch->lpVtbl->Invoke(pole->pDispatch, DISPID_NEWENUM,
                                         &IID_NULL, lcid,
                                         DISPATCH_METHOD | DISPATCH_PROPERTYGET,
                                         &dispParams, &result,
                                         &excepinfo, &argErr);

    if (FAILED(hr)) {
        VariantClear(&result);
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to get IEnum Interface");
    }

    if (V_VT(&result) == VT_UNKNOWN)
        hr = V_UNKNOWN(&result)->lpVtbl->QueryInterface(V_UNKNOWN(&result),
                                                        &IID_IEnumVARIANT,
                                                        (void**)&pEnum);
    else if (V_VT(&result) == VT_DISPATCH)
        hr = V_DISPATCH(&result)->lpVtbl->QueryInterface(V_DISPATCH(&result),
                                                         &IID_IEnumVARIANT,
                                                         (void**)&pEnum);
    if (FAILED(hr) || !pEnum) {
        VariantClear(&result);
        ole_raise(hr, rb_eRuntimeError, "failed to get IEnum Interface");
    }

    VariantClear(&result);
    rb_ensure(ole_each_sub, (VALUE)pEnum, ole_ienum_free, (VALUE)pEnum);
    return Qnil;
}

/*
 *  call-seq:
 *     WIN32OLE#method_missing(id [,arg1, arg2, ...])
 *
 *  Calls WIN32OLE#invoke method.
 */
static VALUE
fole_missing(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    ID id;
    char* mname;
    int n;
    id = rb_to_id(argv[0]);
    mname = rb_id2name(id);
    if(!mname) {
        rb_raise(rb_eRuntimeError, "fail: unknown method or property");
    }
    n = strlen(mname);
    if(mname[n-1] == '=') {
        argv[0] = rb_str_new(mname, n-1);

        return ole_propertyput(self, argv[0], argv[1]);
    }
    else {
        argv[0] = rb_str_new2(mname);
        return ole_invoke(argc, argv, self, DISPATCH_METHOD|DISPATCH_PROPERTYGET);
    }
}

static VALUE
ole_method_sub(self, pOwnerTypeInfo, pTypeInfo, name)
    VALUE self;
    ITypeInfo *pOwnerTypeInfo;
    ITypeInfo *pTypeInfo;
    VALUE name;
{
    HRESULT hr;
    TYPEATTR *pTypeAttr;
    BSTR bstr;
    FUNCDESC *pFuncDesc;
    WORD i;
    VALUE fname;
    VALUE method = Qnil;
    hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
    if (FAILED(hr)) {
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
    }
    for(i = 0; i < pTypeAttr->cFuncs && method == Qnil; i++) {
        hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, i, &pFuncDesc);
        if (FAILED(hr))
             continue;

        hr = pTypeInfo->lpVtbl->GetDocumentation(pTypeInfo, pFuncDesc->memid,
                                                 &bstr, NULL, NULL, NULL);
        if (FAILED(hr)) {
            pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
            continue;
        }
        fname = WC2VSTR(bstr);
        if (strcasecmp(StringValuePtr(name), StringValuePtr(fname)) == 0) {
            olemethod_set_member(self, pTypeInfo, pOwnerTypeInfo, i, fname);
            method = self;
        }
        pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
        pFuncDesc=NULL;
    }
    OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
    return method;
}

static VALUE
olemethod_from_typeinfo(self, pTypeInfo, name)
    VALUE self;
    ITypeInfo *pTypeInfo;
    VALUE name;
{
    HRESULT hr;
    TYPEATTR *pTypeAttr;
    WORD i;
    HREFTYPE href;
    ITypeInfo *pRefTypeInfo;
    VALUE method = Qnil;
    hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
    if (FAILED(hr)) {
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
    }
    method = ole_method_sub(self, 0, pTypeInfo, name);
    if (method != Qnil) {
       return method;
    }
    for(i=0; i < pTypeAttr->cImplTypes && method == Qnil; i++){
       hr = pTypeInfo->lpVtbl->GetRefTypeOfImplType(pTypeInfo, i, &href);
       if(FAILED(hr))
           continue;
       hr = pTypeInfo->lpVtbl->GetRefTypeInfo(pTypeInfo, href, &pRefTypeInfo);
       if (FAILED(hr))
           continue;
       method = ole_method_sub(self, pTypeInfo, pRefTypeInfo, name);
       OLE_RELEASE(pRefTypeInfo);
    }
    OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
    return method;
}

static VALUE
ole_methods_sub(pOwnerTypeInfo, pTypeInfo, methods, mask)
    ITypeInfo *pOwnerTypeInfo;
    ITypeInfo *pTypeInfo;
    VALUE     methods;
    int       mask;
{
    HRESULT hr;
    TYPEATTR *pTypeAttr;
    BSTR bstr;
    char *pstr;
    FUNCDESC *pFuncDesc;
    VALUE method;
    WORD i;
    hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
    if (FAILED(hr)) {
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
    }
    for(i = 0; i < pTypeAttr->cFuncs; i++) {
        pstr = NULL;
        hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, i, &pFuncDesc);
        if (FAILED(hr))
             continue;

        hr = pTypeInfo->lpVtbl->GetDocumentation(pTypeInfo, pFuncDesc->memid,
                                                 &bstr, NULL, NULL, NULL);
        if (FAILED(hr)) {
            pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
            continue;
        }
        if(pFuncDesc->invkind & mask) {
            method = folemethod_s_allocate(cWIN32OLE_METHOD);
            olemethod_set_member(method, pTypeInfo, pOwnerTypeInfo,
                                 i, WC2VSTR(bstr));
            rb_ary_push(methods, method);
        }
        pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
        pFuncDesc=NULL;
    }
    OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);

    return methods;
}

static VALUE
ole_methods_from_typeinfo(pTypeInfo, mask)
    ITypeInfo *pTypeInfo;
    int mask;
{
    HRESULT hr;
    TYPEATTR *pTypeAttr;
    WORD i;
    HREFTYPE href;
    ITypeInfo *pRefTypeInfo;
    VALUE methods = rb_ary_new();
    hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
    if (FAILED(hr)) {
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
    }

    ole_methods_sub(0, pTypeInfo, methods, mask);
    for(i=0; i < pTypeAttr->cImplTypes; i++){
       hr = pTypeInfo->lpVtbl->GetRefTypeOfImplType(pTypeInfo, i, &href);
       if(FAILED(hr))
           continue;
       hr = pTypeInfo->lpVtbl->GetRefTypeInfo(pTypeInfo, href, &pRefTypeInfo);
       if (FAILED(hr))
           continue;
       ole_methods_sub(pTypeInfo, pRefTypeInfo, methods, mask);
       OLE_RELEASE(pRefTypeInfo);
    }
    OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
    return methods;
}

static HRESULT
typeinfo_from_ole(pole, ppti)
    struct oledata *pole;
    ITypeInfo **ppti;
{
    ITypeInfo *pTypeInfo;
    ITypeLib *pTypeLib;
    BSTR bstr;
    VALUE type;
    UINT i;
    UINT count;
    LCID    lcid = LOCALE_SYSTEM_DEFAULT;
    HRESULT hr = pole->pDispatch->lpVtbl->GetTypeInfo(pole->pDispatch,
                                                      0, lcid, &pTypeInfo);
    if(FAILED(hr)) {
        ole_raise(hr, rb_eRuntimeError, "failed to GetTypeInfo");
    }
    hr = pTypeInfo->lpVtbl->GetDocumentation(pTypeInfo,
                                             -1,
                                             &bstr,
                                             NULL, NULL, NULL);
    type = WC2VSTR(bstr);
    hr = pTypeInfo->lpVtbl->GetContainingTypeLib(pTypeInfo, &pTypeLib, &i);
    OLE_RELEASE(pTypeInfo);
    if (FAILED(hr)) {
        ole_raise(hr, rb_eRuntimeError, "failed to GetContainingTypeLib");
    }
    count = pTypeLib->lpVtbl->GetTypeInfoCount(pTypeLib);
    for (i = 0; i < count; i++) {
        hr = pTypeLib->lpVtbl->GetDocumentation(pTypeLib, i,
                                                &bstr, NULL, NULL, NULL);
        if (SUCCEEDED(hr) && rb_str_cmp(WC2VSTR(bstr), type) == 0) {
            hr = pTypeLib->lpVtbl->GetTypeInfo(pTypeLib, i, &pTypeInfo);
            if (SUCCEEDED(hr)) {
                *ppti = pTypeInfo;
                break;
            }
        }
    }
    OLE_RELEASE(pTypeLib);
    return hr;
}

static VALUE
ole_methods(self,mask)
    VALUE self;
    int mask;
{
    ITypeInfo *pTypeInfo;
    HRESULT hr;
    VALUE methods;
    struct oledata *pole;

    OLEData_Get_Struct(self, pole);
    methods = rb_ary_new();

    hr = typeinfo_from_ole(pole, &pTypeInfo);
    if(FAILED(hr))
        return methods;
    rb_ary_concat(methods, ole_methods_from_typeinfo(pTypeInfo, mask));
    OLE_RELEASE(pTypeInfo);
    return methods;
}

/*
 *  call-seq:
 *     WIN32OLE#ole_methods
 *
 *  Returns the array of WIN32OLE_METHOD object.
 *  The element is OLE method of WIN32OLE object.
 *
 *     excel = WIN32OLE.new('Excel.Application')
 *     methods = excel.ole_methods
 *
 */
static VALUE
fole_methods( self )
    VALUE self;
{
    return ole_methods( self, INVOKE_FUNC | INVOKE_PROPERTYGET | INVOKE_PROPERTYPUT);
}

/*
 *  call-seq:
 *     WIN32OLE#ole_get_methods
 *
 *  Returns the array of WIN32OLE_METHOD object .
 *  The element of the array is property (gettable) of WIN32OLE object.
 *
 *     excel = WIN32OLE.new('Excel.Application')
 *     properties = excel.ole_get_methods
 */
static VALUE
fole_get_methods( self )
    VALUE self;
{
    return ole_methods( self, INVOKE_PROPERTYGET);
}

/*
 *  call-seq:
 *     WIN32OLE#ole_put_methods
 *
 *  Returns the array of WIN32OLE_METHOD object .
 *  The element of the array is property (settable) of WIN32OLE object.
 *
 *     excel = WIN32OLE.new('Excel.Application')
 *     properties = excel.ole_put_methods
 */
static VALUE
fole_put_methods( self )
    VALUE self;
{
    return ole_methods( self, INVOKE_PROPERTYPUT);
}

/*
 *  call-seq:
 *     WIN32OLE#ole_func_methods
 *
 *  Returns the array of WIN32OLE_METHOD object .
 *  The element of the array is property (settable) of WIN32OLE object.
 *
 *     excel = WIN32OLE.new('Excel.Application')
 *     properties = excel.ole_func_methods
 *
 */
static VALUE
fole_func_methods( self )
    VALUE self;
{
    return ole_methods( self, INVOKE_FUNC);
}

static VALUE
ole_type_from_itypeinfo(pTypeInfo)
    ITypeInfo *pTypeInfo;
{
    ITypeLib *pTypeLib;
    VALUE type = Qnil;
    HRESULT hr;
    unsigned int index;
    BSTR bstr;

    hr = pTypeInfo->lpVtbl->GetContainingTypeLib( pTypeInfo, &pTypeLib, &index );
    if(FAILED(hr)) {
        return Qnil;
    }
    hr = pTypeLib->lpVtbl->GetDocumentation( pTypeLib, index,
                                             &bstr, NULL, NULL, NULL);
    OLE_RELEASE(pTypeLib);
    if (FAILED(hr)) {
        return Qnil;
    }
    type = foletype_s_allocate(cWIN32OLE_TYPE);
    oletype_set_member(type, pTypeInfo, WC2VSTR(bstr));
    return type;
}

/*
 *   call-seq:
 *      WIN32OLE#ole_type
 *
 *   Returns WIN32OLE_TYPE object.
 *
 *      excel = WIN32OLE.new('Excel.Application')
 *      tobj = excel.ole_type
 */
static VALUE
fole_type( self )
    VALUE self;
{
    ITypeInfo *pTypeInfo;
    HRESULT hr;
    struct oledata *pole;
    LCID  lcid = LOCALE_SYSTEM_DEFAULT;
    VALUE type = Qnil;

    OLEData_Get_Struct(self, pole);

    hr = pole->pDispatch->lpVtbl->GetTypeInfo( pole->pDispatch, 0, lcid, &pTypeInfo );
    if(FAILED(hr)) {
        ole_raise(hr, rb_eRuntimeError, "failed to GetTypeInfo");
    }
    type = ole_type_from_itypeinfo(pTypeInfo);
    OLE_RELEASE(pTypeInfo);
    if (type == Qnil) {
        rb_raise(rb_eRuntimeError, "failed to create WIN32OLE_TYPE obj from ITypeInfo");
    }
    return type;
}

static VALUE
make_oletypelib_obj(guid, major_version, minor_version)
    VALUE guid;
    VALUE major_version;
    VALUE minor_version;
{
    VALUE args = rb_ary_new();
    rb_ary_push(args, guid);
    rb_ary_push(args, major_version);
    rb_ary_push(args, minor_version);
    return rb_apply(cWIN32OLE_TYPELIB, rb_intern("new"), args);
}

static VALUE
ole_typelib_from_itypeinfo(pTypeInfo)
    ITypeInfo *pTypeInfo;
{
    HRESULT hr;
    ITypeLib *pTypeLib;
    TLIBATTR *pTLibAttr;
    OLECHAR bstr[80];
    int len;
    VALUE guid = Qnil;
    VALUE major;
    VALUE minor;
    unsigned int index;

    hr = pTypeInfo->lpVtbl->GetContainingTypeLib(pTypeInfo, &pTypeLib, &index);
    if(FAILED(hr)) {
        return Qnil;
    }

    hr = pTypeLib->lpVtbl->GetLibAttr(pTypeLib, &pTLibAttr);

    len = StringFromGUID2(&pTLibAttr->guid, bstr, sizeof(bstr)/sizeof(OLECHAR));
    if (len > 3) {
        guid = ole_wc2vstr(bstr, FALSE);
    }
    major = INT2NUM(pTLibAttr->wMajorVerNum);
    minor = INT2NUM(pTLibAttr->wMinorVerNum);
    pTypeLib->lpVtbl->ReleaseTLibAttr(pTypeLib, pTLibAttr);
    OLE_RELEASE(pTypeLib);
    if (guid == Qnil) {
        return Qnil;
    }
    return make_oletypelib_obj(guid, major, minor);
}

/*
 *  call-seq:
 *     WIN32OLE#ole_typelib -> The WIN32OLE_TYPELIB object
 *
 *  Returns the WIN32OLE_TYPELIB object. The object represents the
 *  type library which contains the WIN32OLE object.
 *
 *     excel = WIN32OLE.new('Excel.Application')
 *     tlib = excel.ole_typelib
 *     puts tlib.name  # -> 'Microsoft Excel 9.0 Object Library'
 */
static VALUE
fole_typelib(self)
    VALUE self;
{
    struct oledata *pole;
    HRESULT hr;
    ITypeInfo *pTypeInfo;
    LCID  lcid = LOCALE_SYSTEM_DEFAULT;
    VALUE vtlib = Qnil;

    OLEData_Get_Struct(self, pole);
    hr = pole->pDispatch->lpVtbl->GetTypeInfo(pole->pDispatch,
                                              0, lcid, &pTypeInfo);
    if(FAILED(hr)) {
        ole_raise(hr, rb_eRuntimeError, "failed to GetTypeInfo");
    }
    vtlib = ole_typelib_from_itypeinfo(pTypeInfo);
    OLE_RELEASE(pTypeInfo);
    if (vtlib == Qnil) {
        rb_raise(rb_eRuntimeError, "failed to get type library info.");
    }
    return vtlib;
}

static HRESULT
ole_docinfo_from_type(pTypeInfo, name, helpstr, helpcontext, helpfile)
    ITypeInfo *pTypeInfo;
    BSTR *name;
    BSTR *helpstr;
    DWORD *helpcontext;
    BSTR *helpfile;
{
    HRESULT hr;
    ITypeLib *pTypeLib;
    UINT i;

    hr = pTypeInfo->lpVtbl->GetContainingTypeLib(pTypeInfo, &pTypeLib, &i);
    if (FAILED(hr)) {
        return hr;
    }

    hr = pTypeLib->lpVtbl->GetDocumentation(pTypeLib, i,
                                            name, helpstr,
                                            helpcontext, helpfile);
    if (FAILED(hr)) {
        OLE_RELEASE(pTypeLib);
        return hr;
    }
    OLE_RELEASE(pTypeLib);
    return hr;
}

static VALUE
ole_usertype2val(pTypeInfo, pTypeDesc, typedetails)
    ITypeInfo *pTypeInfo;
    TYPEDESC *pTypeDesc;
    VALUE typedetails;
{
    HRESULT hr;
    BSTR bstr;
    ITypeInfo *pRefTypeInfo;
    VALUE type = Qnil;

    hr = pTypeInfo->lpVtbl->GetRefTypeInfo(pTypeInfo,
                                           V_UNION1(pTypeDesc, hreftype),
                                           &pRefTypeInfo);
    if(FAILED(hr))
        return Qnil;
    hr = ole_docinfo_from_type(pRefTypeInfo, &bstr, NULL, NULL, NULL);
    if(FAILED(hr)) {
        OLE_RELEASE(pRefTypeInfo);
        return Qnil;
    }
    OLE_RELEASE(pRefTypeInfo);
    type = WC2VSTR(bstr);
    if(typedetails != Qnil)
        rb_ary_push(typedetails, type);
    return type;
}

static VALUE ole_typedesc2val();
static VALUE
ole_ptrtype2val(pTypeInfo, pTypeDesc, typedetails)
    ITypeInfo *pTypeInfo;
    TYPEDESC *pTypeDesc;
    VALUE typedetails;
{
    TYPEDESC *p = pTypeDesc;
    VALUE type = rb_str_new2("");
    while(p->vt == VT_PTR || p->vt == VT_SAFEARRAY) {
        p = V_UNION1(p, lptdesc);
        if(strlen(StringValuePtr(type)) == 0) {
           type = ole_typedesc2val(pTypeInfo, p, typedetails);
        } else {
           rb_str_cat(type, ",", 1);
           rb_str_concat(type, ole_typedesc2val(pTypeInfo, p, typedetails));
        }
    }
    return type;
}

static VALUE
ole_typedesc2val(pTypeInfo, pTypeDesc, typedetails)
    ITypeInfo *pTypeInfo;
    TYPEDESC *pTypeDesc;
    VALUE typedetails;
{
    VALUE str;
    switch(pTypeDesc->vt) {
    case VT_I2:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("I2"));
        return rb_str_new2("I2");
    case VT_I4:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("I4"));
        return rb_str_new2("I4");
    case VT_R4:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("R4"));
        return rb_str_new2("R4");
    case VT_R8:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("R8"));
        return rb_str_new2("R8");
    case VT_CY:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("CY"));
        return rb_str_new2("CY");
    case VT_DATE:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("DATE"));
        return rb_str_new2("DATE");
    case VT_BSTR:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("BSTR"));
        return rb_str_new2("BSTR");
    case VT_BOOL:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("BOOL"));
        return rb_str_new2("BOOL");
    case VT_VARIANT:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("VARIANT"));
        return rb_str_new2("VARIANT");
    case VT_DECIMAL:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("DECIMAL"));
        return rb_str_new2("DECIMAL");
    case VT_I1:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("I1"));
        return rb_str_new2("I1");
    case VT_UI1:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("UI1"));
        return rb_str_new2("UI1");
    case VT_UI2:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("UI2"));
        return rb_str_new2("UI2");
    case VT_UI4:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("UI4"));
        return rb_str_new2("UI4");
    case VT_I8:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("I8"));
        return rb_str_new2("I8");
    case VT_UI8:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("UI8"));
        return rb_str_new2("UI8");
    case VT_INT:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("INT"));
        return rb_str_new2("INT");
    case VT_UINT:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("UINT"));
        return rb_str_new2("UINT");
    case VT_VOID:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("VOID"));
        return rb_str_new2("VOID");
    case VT_HRESULT:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("HRESULT"));
        return rb_str_new2("HRESULT");
    case VT_PTR:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("PTR"));
        return ole_ptrtype2val(pTypeInfo, pTypeDesc, typedetails);
    case VT_SAFEARRAY:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("SAFEARRAY"));
        return ole_ptrtype2val(pTypeInfo, pTypeDesc, typedetails);
    case VT_CARRAY:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("CARRAY"));
        return rb_str_new2("CARRAY");
    case VT_USERDEFINED:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("USERDEFINED"));
        str = ole_usertype2val(pTypeInfo, pTypeDesc, typedetails);
        if (str != Qnil) {
            return str;
        }
        return rb_str_new2("USERDEFINED");
    case VT_UNKNOWN:
        return rb_str_new2("UNKNOWN");
    case VT_DISPATCH:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("DISPATCH"));
        return rb_str_new2("DISPATCH");
    case VT_ERROR:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("ERROR"));
        return rb_str_new2("ERROR");

    case VT_LPWSTR:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("LPWSTR"));
        return rb_str_new2("LPWSTR");
    case VT_LPSTR:
        if(typedetails != Qnil)
            rb_ary_push(typedetails, rb_str_new2("LPSTR"));
        return rb_str_new2("LPSTR");
    default:
        str = rb_str_new2("Unknown Type ");
        rb_str_concat(str, rb_fix2str(INT2FIX(pTypeDesc->vt), 10));
        return str;
    }
}

/*
 *   call-seq:
 *      WIN32OLE#ole_method_help(method)
 *
 *   Returns WIN32OLE_METHOD object corresponding with method
 *   specified by 1st argument.
 *
 *      excel = WIN32OLE.new('Excel.Application')
 *      method = excel.ole_method_help('Quit')
 *
 */
static VALUE
fole_method_help( self, cmdname )
    VALUE self;
    VALUE cmdname;
{
    ITypeInfo *pTypeInfo;
    HRESULT hr;
    struct oledata *pole;
    VALUE method, obj;

    Check_SafeStr(cmdname);
    OLEData_Get_Struct(self, pole);
    hr = typeinfo_from_ole(pole, &pTypeInfo);
    if(FAILED(hr))
        ole_raise(hr, rb_eRuntimeError, "failed to get ITypeInfo");
    method = folemethod_s_allocate(cWIN32OLE_METHOD);
    obj = olemethod_from_typeinfo(method, pTypeInfo, cmdname);
    OLE_RELEASE(pTypeInfo);
    if (obj == Qnil)
        rb_raise(eWIN32OLE_RUNTIME_ERROR, "not found %s",
                 StringValuePtr(cmdname));
    return obj;
}

/*
 *   call-seq:
 *      WIN32OLE_TYPE.ole_classes(typelib)
 *
 *   Returns array of WIN32OLE_TYPE objects defined by the <i>typelib</i> type library.
 *   This method will be OBSOLETE. Use WIN32OLE_TYPELIB.new(typelib).ole_classes instead.
 */
static VALUE
foletype_s_ole_classes(self, typelib)
    VALUE self;
    VALUE typelib;
{
    VALUE file, classes;
    OLECHAR * pbuf;
    ITypeLib *pTypeLib;
    HRESULT hr;

    /*
    rb_warn("%s is obsolete; use %s instead.",
            "WIN32OLE_TYPE.ole_classes",
            "WIN32OLE_TYPELIB.new(typelib).ole_classes");
    */
    rb_secure(4);
    classes = rb_ary_new();
    if(TYPE(typelib) == T_STRING) {
        file = typelib_file(typelib);
        if (file == Qnil) {
            file = typelib;
        }
        pbuf = ole_mb2wc(StringValuePtr(file), -1);
        hr = LoadTypeLibEx(pbuf, REGKIND_NONE, &pTypeLib);
        if (FAILED(hr))
          ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to LoadTypeLibEx");
        SysFreeString(pbuf);
        ole_classes_from_typelib(pTypeLib, classes);
        OLE_RELEASE(pTypeLib);
    } else {
        rb_raise(rb_eTypeError, "1st argument should be TypeLib string");
    }
    return classes;
}

/*
 *  call-seq:
 *     WIN32OLE_TYPE.typelibs
 *
 *  Returns array of type libraries.
 *  This method will be OBSOLETE. Use WIN32OLE_TYPELIB.typelibs.collect{|t| t.name} instead.
 *
 */
static VALUE
foletype_s_typelibs(self)
    VALUE self;
{
    HKEY htypelib, hclsid;
    double fversion;
    DWORD i, j;
    LONG err;
    VALUE clsid;
    VALUE ver;
    VALUE v = Qnil;
    VALUE typelibs = rb_ary_new();

    /*
    rb_warn("%s is obsolete. use %s instead.",
            "WIN32OLE_TYPE.typelibs",
            "WIN32OLE_TYPELIB.typelibs.collect{t|t.name}");
    */
    err = reg_open_key(HKEY_CLASSES_ROOT, "TypeLib", &htypelib);
    if(err != ERROR_SUCCESS) {
        return typelibs;
    }
    for(i = 0; ; i++) {
        clsid = reg_enum_key(htypelib, i);
        if (clsid == Qnil)
            break;
        err = reg_open_vkey(htypelib, clsid, &hclsid);
        if (err != ERROR_SUCCESS)
            continue;
        fversion = 0;
        for(j = 0; ; j++) {
            ver = reg_enum_key(hclsid, j);
            if (ver == Qnil)
                break;
            if (fversion > atof(StringValuePtr(ver)))
                continue;
            fversion = atof(StringValuePtr(ver));
            if ( (v = reg_get_val(hclsid, StringValuePtr(ver))) != Qnil ) {
                rb_ary_push(typelibs, v);
            }
        }
        RegCloseKey(hclsid);
    }
    RegCloseKey(htypelib);
    return typelibs;
}

/*
 *  call-seq:
 *     WIN32OLE_TYPE.progids
 *
 *  Returns array of ProgID.
 */
static VALUE
foletype_s_progids(self)
    VALUE self;
{
    HKEY hclsids, hclsid;
    DWORD i;
    LONG err;
    VALUE clsid;
    VALUE v = rb_str_new2("");
    VALUE progids = rb_ary_new();

    err = reg_open_key(HKEY_CLASSES_ROOT, "CLSID", &hclsids);
    if(err != ERROR_SUCCESS) {
        return progids;
    }
    for(i = 0; ; i++) {
        clsid = reg_enum_key(hclsids, i);
        if (clsid == Qnil)
            break;
        err = reg_open_vkey(hclsids, clsid, &hclsid);
        if (err != ERROR_SUCCESS)
            continue;
        if ((v = reg_get_val(hclsid, "ProgID")) != Qnil)
            rb_ary_push(progids, v);
        if ((v = reg_get_val(hclsid, "VersionIndependentProgID")) != Qnil)
            rb_ary_push(progids, v);
        RegCloseKey(hclsid);
    }
    RegCloseKey(hclsids);
    return progids;
}

static VALUE
foletype_s_allocate(klass)
    VALUE klass;
{
    struct oletypedata *poletype;
    VALUE obj;
    ole_initialize();
    obj = Data_Make_Struct(klass,struct oletypedata,0,oletype_free,poletype);
    poletype->pTypeInfo = NULL;
    return obj;
}

static VALUE
oletype_set_member(self, pTypeInfo, name)
    VALUE self;
    ITypeInfo *pTypeInfo;
    VALUE name;
{
    struct oletypedata *ptype;
    Data_Get_Struct(self, struct oletypedata, ptype);
    rb_ivar_set(self, rb_intern("name"), name);
    ptype->pTypeInfo = pTypeInfo;
    if(pTypeInfo) OLE_ADDREF(pTypeInfo);
    return self;
}

static VALUE
oleclass_from_typelib(self, pTypeLib, oleclass)
    VALUE self;
    ITypeLib *pTypeLib;
    VALUE oleclass;
{

    long count;
    int i;
    HRESULT hr;
    BSTR bstr;
    VALUE typelib;
    ITypeInfo *pTypeInfo;

    VALUE found = Qfalse;

    count = pTypeLib->lpVtbl->GetTypeInfoCount(pTypeLib);
    for (i = 0; i < count && found == Qfalse; i++) {
        hr = pTypeLib->lpVtbl->GetTypeInfo(pTypeLib, i, &pTypeInfo);
        if (FAILED(hr))
            continue;
        hr = pTypeLib->lpVtbl->GetDocumentation(pTypeLib, i,
                                                &bstr, NULL, NULL, NULL);
        if (FAILED(hr))
            continue;
        typelib = WC2VSTR(bstr);
        if (rb_str_cmp(oleclass, typelib) == 0) {
            oletype_set_member(self, pTypeInfo, typelib);
            found = Qtrue;
        }
        OLE_RELEASE(pTypeInfo);
    }
    return found;
}

/*
 * Document-class: WIN32OLE_TYPELIB
 *
 *   <code>WIN32OLE_TYPELIB</code> objects represent OLE tyblib information.
 */

static VALUE
oletypelib_set_member(self, typelib, guid, version)
    VALUE self;
    VALUE typelib;
    VALUE guid;
    VALUE version;
{
    rb_ivar_set(self, rb_intern("name"), typelib);
    rb_ivar_set(self, rb_intern("guid"), guid);
    rb_ivar_set(self, rb_intern("version"), version);
    return self;
}

/*
 *  call-seq:
 *
 *     WIN32OLE_TYPELIB.typelibs
 *
 *  Returns the array of WIN32OLE_TYPELIB object.
 *
 *     tlibs = WIN32OLE_TYPELIB.typelibs
 *
 */
static VALUE
foletypelib_s_typelibs(self)
    VALUE self;
{
    HKEY htypelib, hguid;
    DWORD i, j;
    LONG err;
    VALUE guid;
    VALUE version;
    VALUE name = Qnil;
    VALUE typelibs = rb_ary_new();
    VALUE typelib = Qnil;

    err = reg_open_key(HKEY_CLASSES_ROOT, "TypeLib", &htypelib);
    if(err != ERROR_SUCCESS) {
        return typelibs;
    }
    for(i = 0; ; i++) {
        guid = reg_enum_key(htypelib, i);
        if (guid == Qnil)
            break;
        err = reg_open_vkey(htypelib, guid, &hguid);
        if (err != ERROR_SUCCESS)
            continue;
        for(j = 0; ; j++) {
            version = reg_enum_key(hguid, j);
            if (version == Qnil)
                break;
            if ( (name = reg_get_val(hguid, StringValuePtr(version))) != Qnil ) {
                typelib = rb_funcall(cWIN32OLE_TYPELIB, rb_intern("allocate"), 0);
                oletypelib_set_member(typelib, name, guid, version);
                rb_ary_push(typelibs, typelib);
            }
        }
        RegCloseKey(hguid);
    }
    RegCloseKey(htypelib);
    return typelibs;
}

static VALUE
make_version_str(major, minor)
    VALUE major;
    VALUE minor;
{
    VALUE version_str = Qnil;
    VALUE minor_str = Qnil;
    if (major == Qnil) {
        return Qnil;
    }
    version_str = rb_String(major);
    if (minor != Qnil) {
        minor_str = rb_String(minor);
        rb_str_cat2(version_str, ".");
        rb_str_append(version_str, minor_str);
    }
    return version_str;
}

static VALUE
oletypelib_search_registry2(self, args)
    VALUE self;
    VALUE args;
{
    HKEY htypelib, hguid, hversion;
    double fver;
    DWORD j;
    LONG err;
    VALUE found = Qfalse;
    VALUE tlib;
    VALUE ver;
    VALUE version_str;
    VALUE version = Qnil;
    VALUE typelib = Qnil;

    VALUE guid = rb_ary_entry(args, 0);
    version_str = make_version_str(rb_ary_entry(args, 1), rb_ary_entry(args, 2));

    err = reg_open_key(HKEY_CLASSES_ROOT, "TypeLib", &htypelib);
    if(err != ERROR_SUCCESS) {
        return Qfalse;
    }
    err = reg_open_vkey(htypelib, guid, &hguid);
    if (err != ERROR_SUCCESS) {
        RegCloseKey(htypelib);
        return Qfalse;
    }
    if (version_str != Qnil) {
        err = reg_open_vkey(hguid, version_str, &hversion);
        if (err == ERROR_SUCCESS) {
            tlib = reg_get_val(hversion, NULL);
            if (tlib != Qnil) {
                typelib = tlib;
                version = version_str;
            }
        }
        RegCloseKey(hversion);
    } else {
        fver = 0.0;
            for(j = 0; ;j++) {
                ver = reg_enum_key(hguid, j);
                if (ver == Qnil)
                    break;
                err = reg_open_vkey(hguid, ver, &hversion);
                if (err != ERROR_SUCCESS)
                    continue;
                tlib = reg_get_val(hversion, NULL);
                if (tlib == Qnil) {
                     RegCloseKey(hversion);
                     continue;
                }
                if (fver < atof(StringValuePtr(ver))) {
                    fver = atof(StringValuePtr(ver));
                    version = ver;
                    typelib = tlib;
                }
                RegCloseKey(hversion);
            }
    }
    RegCloseKey(hguid);
    RegCloseKey(htypelib);
    if (typelib != Qnil) {
        found = Qtrue;
        oletypelib_set_member(self, typelib, guid, version);
    }
    return found;
}

static VALUE
oletypelib_search_registry(self, typelib)
    VALUE self;
    VALUE typelib;
{
    HKEY htypelib, hguid, hversion;
    DWORD i, j;
    LONG err;
    VALUE found = Qfalse;
    VALUE tlib;
    VALUE guid;
    VALUE ver;

    err = reg_open_key(HKEY_CLASSES_ROOT, "TypeLib", &htypelib);
    if(err != ERROR_SUCCESS) {
        return Qfalse;
    }
    for(i = 0; !found; i++) {
        guid = reg_enum_key(htypelib, i);
        if (guid == Qnil)
            break;
        err = reg_open_vkey(htypelib, guid, &hguid);
        if (err != ERROR_SUCCESS)
            continue;
        for(j = 0; found == Qfalse; j++) {
            ver = reg_enum_key(hguid, j);
            if (ver == Qnil)
                break;
            err = reg_open_vkey(hguid, ver, &hversion);
            if (err != ERROR_SUCCESS)
                continue;
            tlib = reg_get_val(hversion, NULL);
            if (tlib == Qnil) {
                RegCloseKey(hversion);
                continue;
            }
            if (rb_str_cmp(typelib, tlib) == 0) {
                oletypelib_set_member(self, typelib, guid, ver);
                found = Qtrue;
            }
            RegCloseKey(hversion);
        }
        RegCloseKey(hguid);
    }
    RegCloseKey(htypelib);
    return  found;
}

/*
 * call-seq:
 *    WIN32OLE_TYPELIB.new(typelib [, version1, version2]) -> WIN32OLE_TYPELIB object
 *
 * Returns a new WIN32OLE_TYPELIB object.
 *
 * The first argument <i>typelib</i>  specifies OLE type library name or GUID.
 * The second argument is major version or version of the type library.
 * The third argument is minor version.
 * The second argument and third argument are optional.
 * If the first argument is type library name, then the second and third argument
 * are ignored.
 *
 *     tlib1 = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
 *     tlib2 = WIN32OLE_TYPELIB.new('{00020813-0000-0000-C000-000000000046}')
 *     tlib3 = WIN32OLE_TYPELIB.new('{00020813-0000-0000-C000-000000000046}', 1.3)
 *     tlib4 = WIN32OLE_TYPELIB.new('{00020813-0000-0000-C000-000000000046}', 1, 3)
 *     puts tlib1.name  # -> 'Microsoft Excel 9.0 Object Library'
 *     puts tlib2.name  # -> 'Microsoft Excel 9.0 Object Library'
 *     puts tlib3.name  # -> 'Microsoft Excel 9.0 Object Library'
 *     puts tlib4.name  # -> 'Microsoft Excel 9.0 Object Library'
 *
 */
static VALUE
foletypelib_initialize(self, args)
    VALUE self;
    VALUE args;
{
    VALUE found = Qfalse;
    VALUE typelib = Qnil;
    int len = 0;

    len = RARRAY(args)->len;
    if (len < 1 || len > 3) {
        rb_raise(rb_eArgError, "wrong number of arguments (%d for 1..3)", len);
    }

    typelib = rb_ary_entry(args, 0);

    Check_SafeStr(typelib);

    found = oletypelib_search_registry(self, typelib);
    if (found == Qfalse) {
        found = oletypelib_search_registry2(self, args);
    }

    if (found == Qfalse) {
        rb_raise(eWIN32OLE_RUNTIME_ERROR, "not found type library `%s`",
                 StringValuePtr(typelib));
    }
    return self;
}

/*
 *  call-seq:
 *     WIN32OLE_TYPELIB#guid -> The guid string.
 *
 *  Returns guid string which specifies type library.
 *
 *     tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
 *     guid = tlib.guid # -> '{00020813-0000-0000-C000-000000000046}'
 */
static VALUE
foletypelib_guid(self)
    VALUE self;
{
    return rb_ivar_get(self, rb_intern("guid"));
}

/*
 *  call-seq:
 *     WIN32OLE_TYPELIB#name -> The type library name
 *
 *  Returns the type library name.
 *
 *     tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
 *     name = tlib.name # -> 'Microsoft Excel 9.0 Object Library'
 */
static VALUE
foletypelib_name(self)
    VALUE self;
{
    return rb_ivar_get(self, rb_intern("name"));
}

/*
 *  call-seq:
 *     WIN32OLE_TYPELIB#version -> The type library version.
 *
 *  Returns the type library version.
 *
 *     tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
 *     puts tlib.version #-> 1.3
 */
static VALUE
foletypelib_version(self)
    VALUE self;
{
    VALUE ver = rb_ivar_get(self, rb_intern("version"));
    return rb_Float(ver);
}

/*
 *  call-seq:
 *     WIN32OLE_TYPELIB#major_version -> The type library major version.
 *
 *  Returns the type library major version.
 *
 *     tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
 *     puts tlib.major_version # -> 1
 */
static VALUE
foletypelib_major_version(self)
    VALUE self;
{
    VALUE ver = rb_ivar_get(self, rb_intern("version"));
    VALUE ary = rb_str_split(ver, ".");
    return rb_Integer(rb_ary_entry(ary, 0));
}

/*
 *  call-seq:
 *     WIN32OLE_TYPELIB#minor_version -> The type library minor version.
 *
 *  Returns the type library minor version.
 *
 *     tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
 *     puts tlib.minor_version # -> 3
 */
static VALUE
foletypelib_minor_version(self)
    VALUE self;
{
    VALUE ver = rb_ivar_get(self, rb_intern("version"));
    VALUE ary = rb_str_split(ver, ".");
    return rb_Integer(rb_ary_entry(ary, 1));
}

static VALUE
oletypelib_path(guid, version)
    VALUE guid;
    VALUE version;
{
    int k;
    LONG err;
    HKEY hkey;
    HKEY hlang;
    VALUE lang;
    VALUE path = Qnil;

    VALUE key = rb_str_new2("TypeLib\\");
    rb_str_concat(key, guid);
    rb_str_cat2(key, "\\");
    rb_str_concat(key, version);

    err = reg_open_vkey(HKEY_CLASSES_ROOT, key, &hkey);
    if (err != ERROR_SUCCESS) {
        return Qnil;
    }
    for(k = 0; path == Qnil; k++) {
        lang = reg_enum_key(hkey, k);
        if (lang == Qnil)
            break;
        err = reg_open_vkey(hkey, lang, &hlang);
        if (err == ERROR_SUCCESS) {
            path = reg_get_typelib_file_path(hlang);
            RegCloseKey(hlang);
        }
    }
    RegCloseKey(hkey);
    return path;
}

/*
 *  call-seq:
 *     WIN32OLE_TYPELIB#path -> The type library file path.
 *
 *  Returns the type library file path.
 *
 *     tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
 *     puts tlib.path #-> 'C:\...\EXCEL9.OLB'
 */
static VALUE
foletypelib_path(self)
    VALUE self;
{
    VALUE guid = rb_ivar_get(self, rb_intern("guid"));
    VALUE version = rb_ivar_get(self, rb_intern("version"));
    return oletypelib_path(guid, version);
}

/*
 *  call-seq:
 *     WIN32OLE_TYPELIB#ole_classes -> The array of WIN32OLE_TYPE object included the type library.
 *
 *  Returns the type library file path.
 *
 *     tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
 *     classes = tlib.ole_classes.collect{|k| k.name} # -> ['AddIn', 'AddIns' ...]
 */
static VALUE
foletypelib_ole_classes(self)
    VALUE self;
{
    OLECHAR * pbuf;
    HRESULT hr;
    ITypeLib *pTypeLib;
    VALUE path = Qnil;
    VALUE classes = rb_ary_new();
    path = rb_funcall(self, rb_intern("path"), 0);
    if (path != Qnil) {
        pbuf = ole_mb2wc(StringValuePtr(path), -1);
        hr = LoadTypeLibEx(pbuf, REGKIND_NONE, &pTypeLib);
        SysFreeString(pbuf);
        if (FAILED(hr))
            ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to LoadTypeLibEx from `%s'",
                      StringValuePtr(path));
        ole_classes_from_typelib(pTypeLib, classes);
        OLE_RELEASE(pTypeLib);
    } else {
        rb_raise(eWIN32OLE_RUNTIME_ERROR, "failed to get type library path");
    }
    return classes;
}

/*
 * Document-class: WIN32OLE_TYPE
 *
 *   <code>WIN32OLE_TYPE</code> objects represent OLE type libarary information.
 */

/*
 *  call-seq:
 *     WIN32OLE_TYPE.new(typelib, ole_class) -> WIN32OLE_TYPE object
 *
 *  Returns a new WIN32OLE_TYPE object.
 *  The first argument <i>typelib</i> specifies OLE type library name.
 *  The second argument specifies OLE class name.
 *
 *      WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application')
 *          # => WIN32OLE_TYPE object of Application class of Excel.
 */
static VALUE
foletype_initialize(self, typelib, oleclass)
    VALUE self;
    VALUE typelib;
    VALUE oleclass;
{
    VALUE file;
    OLECHAR * pbuf;
    ITypeLib *pTypeLib;
    HRESULT hr;

    Check_SafeStr(oleclass);
    Check_SafeStr(typelib);
    file = typelib_file(typelib);
    if (file == Qnil) {
        file = typelib;
    }
    pbuf = ole_mb2wc(StringValuePtr(file), -1);
    hr = LoadTypeLibEx(pbuf, REGKIND_NONE, &pTypeLib);
    if (FAILED(hr))
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to LoadTypeLibEx");
    SysFreeString(pbuf);
    if (oleclass_from_typelib(self, pTypeLib, oleclass) == Qfalse) {
        OLE_RELEASE(pTypeLib);
        rb_raise(eWIN32OLE_RUNTIME_ERROR, "not found `%s` in `%s`",
                 StringValuePtr(oleclass), StringValuePtr(typelib));
    }
    OLE_RELEASE(pTypeLib);
    return self;
}

/*
 * call-seq:
 *    WIN32OLE_TYPE#name #=> OLE type name
 *
 * Returns OLE type name.
 *    tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application')
 *    puts tobj.name  # => Application
 */
static VALUE
foletype_name(self)
    VALUE self;
{
    return rb_ivar_get(self, rb_intern("name"));
}

static VALUE
ole_ole_type(pTypeInfo)
    ITypeInfo *pTypeInfo;
{
    HRESULT hr;
    TYPEATTR *pTypeAttr;
    VALUE type = Qnil;
    hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
    if(FAILED(hr)){
        return type;
    }
    switch(pTypeAttr->typekind) {
    case TKIND_ENUM:
        type = rb_str_new2("Enum");
        break;
    case TKIND_RECORD:
        type = rb_str_new2("Record");
        break;
    case TKIND_MODULE:
        type = rb_str_new2("Module");
        break;
    case TKIND_INTERFACE:
        type = rb_str_new2("Interface");
        break;
    case TKIND_DISPATCH:
        type = rb_str_new2("Dispatch");
        break;
    case TKIND_COCLASS:
        type = rb_str_new2("Class");
        break;
    case TKIND_ALIAS:
        type = rb_str_new2("Alias");
        break;
    case TKIND_UNION:
        type = rb_str_new2("Union");
        break;
    case TKIND_MAX:
        type = rb_str_new2("Max");
        break;
    default:
        type = Qnil;
        break;
    }
    OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
    return type;
}

/*
 *  call-seq:
 *     WIN32OLE_TYPE#ole_type #=> OLE type string.
 *
 *  returns type of OLE class.
 *    tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application')
 *    puts tobj.ole_type  # => Class
 */
static VALUE
foletype_ole_type(self)
    VALUE self;
{
    struct oletypedata *ptype;
    Data_Get_Struct(self, struct oletypedata, ptype);
    return ole_ole_type(ptype->pTypeInfo);
}

static VALUE
ole_type_guid(pTypeInfo)
    ITypeInfo *pTypeInfo;
{
    HRESULT hr;
    TYPEATTR *pTypeAttr;
    int len;
    OLECHAR bstr[80];
    VALUE guid = Qnil;
    hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
    if (FAILED(hr))
        return guid;
    len = StringFromGUID2(&pTypeAttr->guid, bstr, sizeof(bstr)/sizeof(OLECHAR));
    if (len > 3) {
        guid = ole_wc2vstr(bstr, FALSE);
    }
    OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
    return guid;
}

/*
 *  call-seq:
 *     WIN32OLE_TYPE#guid  #=> GUID
 *
 *  Returns GUID.
 *    tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application')
 *    puts tobj.guid  # => {00024500-0000-0000-C000-000000000046}
 */
static VALUE
foletype_guid(self)
    VALUE self;
{
    struct oletypedata *ptype;
    Data_Get_Struct(self, struct oletypedata, ptype);
    return ole_type_guid(ptype->pTypeInfo);
}

static VALUE
ole_type_progid(pTypeInfo)
    ITypeInfo *pTypeInfo;
{
    HRESULT hr;
    TYPEATTR *pTypeAttr;
    OLECHAR *pbuf;
    VALUE progid = Qnil;
    hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
    if (FAILED(hr))
        return progid;
    hr = ProgIDFromCLSID(&pTypeAttr->guid, &pbuf);
    if (SUCCEEDED(hr))
        progid = WC2VSTR(pbuf);
    OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
    return progid;
}

/*
 * call-seq:
 *    WIN32OLE_TYPE#progid  #=> ProgID
 *
 * Returns ProgID if it exists. If not found, then returns nil.
 *    tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application')
 *    puts tobj.progid  # =>   Excel.Application.9
 */
static VALUE
foletype_progid(self)
    VALUE self;
{
    struct oletypedata *ptype;
    Data_Get_Struct(self, struct oletypedata, ptype);
    return ole_type_progid(ptype->pTypeInfo);
}

static VALUE
ole_type_visible(pTypeInfo)
    ITypeInfo *pTypeInfo;
{
    HRESULT hr;
    TYPEATTR *pTypeAttr;
    VALUE visible;
    hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
    if (FAILED(hr))
        return Qtrue;
    if (pTypeAttr->wTypeFlags & (TYPEFLAG_FHIDDEN | TYPEFLAG_FRESTRICTED)) {
        visible = Qfalse;
    } else {
        visible = Qtrue;
    }
    OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
    return visible;
}

/*
 *  call-seq:
 *    WIN32OLE_TYPE#visible  #=> true or false
 *
 *  Returns true if the OLE class is public.
 *    tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application')
 *    puts tobj.visible  # => true
 */
static VALUE
foletype_visible(self)
    VALUE self;
{
    struct oletypedata *ptype;
    Data_Get_Struct(self, struct oletypedata, ptype);
    return ole_type_visible(ptype->pTypeInfo);
}

static VALUE
ole_type_major_version(pTypeInfo)
    ITypeInfo *pTypeInfo;
{
    VALUE ver;
    TYPEATTR *pTypeAttr;
    HRESULT hr;
    hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
    if (FAILED(hr))
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
    ver = INT2FIX(pTypeAttr->wMajorVerNum);
    OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
    return ver;
}

/*
 *  call-seq:
 *     WIN32OLE_TYPE#major_version
 *
 *  Returns major version.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Word 10.0 Object Library', 'Documents')
 *     puts tobj.major_version # => 8
 */
static VALUE
foletype_major_version(self)
    VALUE self;
{
    struct oletypedata *ptype;
    Data_Get_Struct(self, struct oletypedata, ptype);
    return ole_type_major_version(ptype->pTypeInfo);
}

static VALUE
ole_type_minor_version(pTypeInfo)
    ITypeInfo *pTypeInfo;
{
    VALUE ver;
    TYPEATTR *pTypeAttr;
    HRESULT hr;
    hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
    if (FAILED(hr))
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
    ver = INT2FIX(pTypeAttr->wMinorVerNum);
    OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
    return ver;
}

/*
 *  call-seq:
 *    WIN32OLE_TYPE#minor_version #=> OLE minor version
 *
 *  Returns minor version.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Word 10.0 Object Library', 'Documents')
 *     puts tobj.minor_version # => 2
 */
static VALUE
foletype_minor_version(self)
    VALUE self;
{
    struct oletypedata *ptype;
    Data_Get_Struct(self, struct oletypedata, ptype);
    return ole_type_minor_version(ptype->pTypeInfo);
}

static VALUE
ole_type_typekind(pTypeInfo)
    ITypeInfo *pTypeInfo;
{
    VALUE typekind;
    TYPEATTR *pTypeAttr;
    HRESULT hr;
    hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
    if (FAILED(hr))
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
    typekind = INT2FIX(pTypeAttr->typekind);
    OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
    return typekind;
}

/*
 *  call-seq:
 *    WIN32OLE_TYPE#typekind #=> number of type.
 *
 *  Returns number which represents type.
 *    tobj = WIN32OLE_TYPE.new('Microsoft Word 10.0 Object Library', 'Documents')
 *    puts tobj.typekind # => 4
 *
 */
static VALUE
foletype_typekind(self)
    VALUE self;
{
    struct oletypedata *ptype;
    Data_Get_Struct(self, struct oletypedata, ptype);
    return ole_type_typekind(ptype->pTypeInfo);
}

static VALUE
ole_type_helpstring(pTypeInfo)
    ITypeInfo *pTypeInfo;
{
    HRESULT hr;
    BSTR bhelpstr;
    hr = ole_docinfo_from_type(pTypeInfo, NULL, &bhelpstr, NULL, NULL);
    if(FAILED(hr)) {
        return Qnil;
    }
    return WC2VSTR(bhelpstr);
}

/*
 *  call-seq:
 *    WIN32OLE_TYPE#helpstring #=> help string.
 *
 *  Returns help string.
 *    tobj = WIN32OLE_TYPE.new('Microsoft Internet Controls', 'IWebBrowser')
 *    puts tobj.helpstring # => Web Browser interface
 */
static VALUE
foletype_helpstring(self)
    VALUE self;
{
    struct oletypedata *ptype;
    Data_Get_Struct(self, struct oletypedata, ptype);
    return ole_type_helpstring(ptype->pTypeInfo);
}

static VALUE
ole_type_src_type(pTypeInfo)
    ITypeInfo *pTypeInfo;
{
    HRESULT hr;
    TYPEATTR *pTypeAttr;
    VALUE alias = Qnil;
    hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
    if (FAILED(hr))
        return alias;
    if(pTypeAttr->typekind != TKIND_ALIAS) {
        OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
        return alias;
    }
    alias = ole_typedesc2val(pTypeInfo, &(pTypeAttr->tdescAlias), Qnil);
    OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
    return alias;
}

/*
 *  call-seq:
 *     WIN32OLE_TYPE#src_type #=> OLE source class
 *
 *  Returns source class when the OLE class is 'Alias'.
 *     tobj =  WIN32OLE_TYPE.new('Microsoft Office 9.0 Object Library', 'MsoRGBType')
 *     puts tobj.src_type # => I4
 *
 */
static VALUE
foletype_src_type(self)
    VALUE self;
{
    struct oletypedata *ptype;
    Data_Get_Struct(self, struct oletypedata, ptype);
    return ole_type_src_type(ptype->pTypeInfo);
}

static VALUE
ole_type_helpfile(pTypeInfo)
    ITypeInfo *pTypeInfo;
{
    HRESULT hr;
    BSTR bhelpfile;
    hr = ole_docinfo_from_type(pTypeInfo, NULL, NULL, NULL, &bhelpfile);
    if(FAILED(hr)) {
        return Qnil;
    }
    return WC2VSTR(bhelpfile);
}

/*
 *  call-seq:
 *     WIN32OLE_TYPE#helpfile
 *
 *  Returns helpfile path. If helpfile is not found, then returns nil.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Worksheet')
 *     puts tobj.helpfile # => C:\...\VBAXL9.CHM
 *
 */
static VALUE
foletype_helpfile(self)
    VALUE self;
{
    struct oletypedata *ptype;
    Data_Get_Struct(self, struct oletypedata, ptype);
    return ole_type_helpfile(ptype->pTypeInfo);
}

static VALUE
ole_type_helpcontext(pTypeInfo)
    ITypeInfo *pTypeInfo;
{
    HRESULT hr;
    DWORD helpcontext;
    hr = ole_docinfo_from_type(pTypeInfo, NULL, NULL,
                               &helpcontext, NULL);
    if(FAILED(hr))
        return Qnil;
    return INT2FIX(helpcontext);
}

/*
 *  call-seq:
 *     WIN32OLE_TYPE#helpcontext
 *
 *  Returns helpcontext. If helpcontext is not found, then returns nil.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Worksheet')
 *     puts tobj.helpfile # => 131185
 */
static VALUE
foletype_helpcontext(self)
    VALUE self;
{
    struct oletypedata *ptype;
    Data_Get_Struct(self, struct oletypedata, ptype);
    return ole_type_helpcontext(ptype->pTypeInfo);
}

/*
 *  call-seq:
 *     WIN32OLE_TYPE#ole_typelib
 *
 *  Returns the WIN32OLE_TYPELIB object which is including the WIN32OLE_TYPE
 *  object. If it is not found, then returns nil.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Worksheet')
 *     puts tobj.ole_typelib # => 'Microsoft Excel 9.0 Object Library'
 */
static VALUE
foletype_ole_typelib(self)
    VALUE self;
{
    struct oletypedata *ptype;
    Data_Get_Struct(self, struct oletypedata, ptype);
    return ole_typelib_from_itypeinfo(ptype->pTypeInfo);
}

static VALUE
ole_type_impl_ole_types(pTypeInfo)
    ITypeInfo *pTypeInfo;
{
    HRESULT hr;
    ITypeInfo *pRefTypeInfo;
    HREFTYPE href;
    WORD i;
    VALUE type;
    TYPEATTR *pTypeAttr;
    int flags;

    VALUE types = rb_ary_new();
    hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
    if (FAILED(hr)) {
        return types;
    }
    for (i = 0; i < pTypeAttr->cImplTypes; i++) {
        hr = pTypeInfo->lpVtbl->GetImplTypeFlags(pTypeInfo, i, &flags);
        if (FAILED(hr))
            continue;

        hr = pTypeInfo->lpVtbl->GetRefTypeOfImplType(pTypeInfo, i, &href);
        if (FAILED(hr))
            continue;
        hr = pTypeInfo->lpVtbl->GetRefTypeInfo(pTypeInfo, href, &pRefTypeInfo);
        if (FAILED(hr))
            continue;
        type = ole_type_from_itypeinfo(pRefTypeInfo);
        if (type != Qnil) {
            rb_ary_push(types, type);
        }

        OLE_RELEASE(pRefTypeInfo);
    }
    OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
    return types;
}

/*
 *  call-seq:
 *     WIN32OLE_TYPE#implemented_ole_types
 *
 *  Returns the array of WIN32OLE_TYPE object which is implemented by the WIN32OLE_TYPE
 *  object.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Worksheet')
 *     p tobj.implemented_ole_types # => [_Worksheet, DocEvents]
 */
static VALUE
foletype_impl_ole_types(self)
    VALUE self;
{
    struct oletypedata *ptype;
    Data_Get_Struct(self, struct oletypedata, ptype);
    return ole_type_impl_ole_types(ptype->pTypeInfo);
}

static VALUE
ole_variables(pTypeInfo)
    ITypeInfo *pTypeInfo;
{
    HRESULT hr;
    TYPEATTR *pTypeAttr;
    WORD i;
    UINT len;
    BSTR bstr;
    char *pstr;
    VARDESC *pVarDesc;
    struct olevariabledata *pvar;
    VALUE var;
    VALUE variables = rb_ary_new();
    hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
    if (FAILED(hr)) {
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetTypeAttr");
    }

    for(i = 0; i < pTypeAttr->cVars; i++) {
        hr = pTypeInfo->lpVtbl->GetVarDesc(pTypeInfo, i, &pVarDesc);
        if(FAILED(hr))
            continue;
        len = 0;
        pstr = NULL;
        hr = pTypeInfo->lpVtbl->GetNames(pTypeInfo, pVarDesc->memid, &bstr,
                                         1, &len);
        if(FAILED(hr) || len == 0 || !bstr)
            continue;

        var = Data_Make_Struct(cWIN32OLE_VARIABLE, struct olevariabledata,
                               0,olevariable_free,pvar);
        pvar->pTypeInfo = pTypeInfo;
        OLE_ADDREF(pTypeInfo);
        pvar->index = i;
        rb_ivar_set(var, rb_intern("name"), WC2VSTR(bstr));
        rb_ary_push(variables, var);

        pTypeInfo->lpVtbl->ReleaseVarDesc(pTypeInfo, pVarDesc);
        pVarDesc = NULL;
    }
    OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
    return variables;
}

/*
 *  call-seq:
 *     WIN32OLE_TYPE#variables
 *
 *  Returns array of WIN32OLE_VARIABLE objects which represent variables
 *  defined in OLE class.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
 *     vars = tobj.variables
 *     vars.each do |v|
 *       puts "#{v.name} = #{v.value}"
 *     end
 *
 *     The result of above sample script is follows:
 *       xlChart = -4109
 *       xlDialogSheet = -4116
 *       xlExcel4IntlMacroSheet = 4
 *       xlExcel4MacroSheet = 3
 *       xlWorksheet = -4167
 *
 */
static VALUE
foletype_variables(self)
    VALUE self;
{
    struct oletypedata *ptype;
    Data_Get_Struct(self, struct oletypedata, ptype);
    return ole_variables(ptype->pTypeInfo);
}

/*
 *  call-seq:
 *     WIN32OLE_TYPE#ole_methods # the array of WIN32OLE_METHOD objects.
 *
 *  Returns array of WIN32OLE_METHOD objects which represent OLE method defined in
 *  OLE type library.
 *    tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Worksheet')
 *    methods = tobj.ole_methods.collect{|m|
 *      m.name
 *    }
 *    # => ['Activate', 'Copy', 'Delete',....]
 */
static VALUE
foletype_methods(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    struct oletypedata *ptype;
    Data_Get_Struct(self, struct oletypedata, ptype);
    return ole_methods_from_typeinfo(ptype->pTypeInfo, INVOKE_FUNC | INVOKE_PROPERTYGET | INVOKE_PROPERTYPUT | INVOKE_PROPERTYPUTREF);
}

/*
 * Document-class: WIN32OLE_VARIABLE
 *
 *   <code>WIN32OLE_VARIABLE</code> objects represent OLE variable information.
 */

/*
 *  call-seq:
 *     WIN32OLE_VARIABLE#name
 *
 *  Returns the name of variable.
 *
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
 *     variables = tobj.variables
 *     variables.each do |variable|
 *       puts "#{variable.name}"
 *     end
 *
 *     The result of above script is following:
 *       xlChart
 *       xlDialogSheet
 *       xlExcel4IntlMacroSheet
 *       xlExcel4MacroSheet
 *       xlWorksheet
 *
 */
static VALUE
folevariable_name(self)
    VALUE self;
{
    return rb_ivar_get(self, rb_intern("name"));
}

static VALUE
ole_variable_ole_type(pTypeInfo, var_index)
    ITypeInfo *pTypeInfo;
    UINT var_index;
{
    VARDESC *pVarDesc;
    HRESULT hr;
    VALUE type;
    hr = pTypeInfo->lpVtbl->GetVarDesc(pTypeInfo, var_index, &pVarDesc);
    if (FAILED(hr))
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetVarDesc");
    type = ole_typedesc2val(pTypeInfo, &(pVarDesc->elemdescVar.tdesc), Qnil);
    pTypeInfo->lpVtbl->ReleaseVarDesc(pTypeInfo, pVarDesc);
    return type;
}

/*
 *   call-seq:
 *      WIN32OLE_VARIABLE#ole_type
 *
 *   Returns OLE type string.
 *
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
 *     variables = tobj.variables
 *     variables.each do |variable|
 *       puts "#{variable.ole_type} #{variable.name}"
 *     end
 *
 *     The result of above script is following:
 *       INT xlChart
 *       INT xlDialogSheet
 *       INT xlExcel4IntlMacroSheet
 *       INT xlExcel4MacroSheet
 *       INT xlWorksheet
 *
 */
static VALUE
folevariable_ole_type(self)
    VALUE self;
{
    struct olevariabledata *pvar;
    Data_Get_Struct(self, struct olevariabledata, pvar);
    return ole_variable_ole_type(pvar->pTypeInfo, pvar->index);
}

static VALUE
ole_variable_ole_type_detail(pTypeInfo, var_index)
    ITypeInfo *pTypeInfo;
    UINT var_index;
{
    VARDESC *pVarDesc;
    HRESULT hr;
    VALUE type = rb_ary_new();
    hr = pTypeInfo->lpVtbl->GetVarDesc(pTypeInfo, var_index, &pVarDesc);
    if (FAILED(hr))
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetVarDesc");
    ole_typedesc2val(pTypeInfo, &(pVarDesc->elemdescVar.tdesc), type);
    pTypeInfo->lpVtbl->ReleaseVarDesc(pTypeInfo, pVarDesc);
    return type;
}

/*
 *  call-seq:
 *     WIN32OLE_VARIABLE#ole_type_detail
 *
 *  Returns detail information of type. The information is array of type.
 *
 *     tobj = WIN32OLE_TYPE.new('DirectX 7 for Visual Basic Type Library', 'D3DCLIPSTATUS')
 *     variable = tobj.variables.find {|variable| variable.name == 'lFlags'}
 *     tdetail  = variable.ole_type_detail
 *     p tdetail # => ["USERDEFINED", "CONST_D3DCLIPSTATUSFLAGS"]
 *
 */
static VALUE
folevariable_ole_type_detail(self)
    VALUE self;
{
    struct olevariabledata *pvar;
    Data_Get_Struct(self, struct olevariabledata, pvar);
    return ole_variable_ole_type_detail(pvar->pTypeInfo, pvar->index);
}

static VALUE
ole_variable_value(pTypeInfo, var_index)
    ITypeInfo *pTypeInfo;
    UINT var_index;
{
    VARDESC *pVarDesc;
    HRESULT hr;
    VALUE val = Qnil;
    hr = pTypeInfo->lpVtbl->GetVarDesc(pTypeInfo, var_index, &pVarDesc);
    if (FAILED(hr))
        return Qnil;
    if(pVarDesc->varkind == VAR_CONST)
        val = ole_variant2val(V_UNION1(pVarDesc, lpvarValue));
    pTypeInfo->lpVtbl->ReleaseVarDesc(pTypeInfo, pVarDesc);
    return val;
}

/*
 *  call-seq:
 *     WIN32OLE_VARIABLE#value
 *
 *  Returns value if value is exists. If the value does not exist,
 *  this method returns nil.
 *
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
 *     variables = tobj.variables
 *     variables.each do |variable|
 *       puts "#{variable.name} #{variable.value}"
 *     end
 *
 *     The result of above script is following:
 *       xlChart = -4109
 *       xlDialogSheet = -4116
 *       xlExcel4IntlMacroSheet = 4
 *       xlExcel4MacroSheet = 3
 *       xlWorksheet = -4167
 *
 */
static VALUE
folevariable_value(self)
    VALUE self;
{
    struct olevariabledata *pvar;
    Data_Get_Struct(self, struct olevariabledata, pvar);
    return ole_variable_value(pvar->pTypeInfo, pvar->index);
}

static VALUE
ole_variable_visible(pTypeInfo, var_index)
    ITypeInfo *pTypeInfo;
    UINT var_index;
{
    VARDESC *pVarDesc;
    HRESULT hr;
    VALUE visible = Qfalse;
    hr = pTypeInfo->lpVtbl->GetVarDesc(pTypeInfo, var_index, &pVarDesc);
    if (FAILED(hr))
        return visible;
    if (!(pVarDesc->wVarFlags & (VARFLAG_FHIDDEN |
                                 VARFLAG_FRESTRICTED |
                                 VARFLAG_FNONBROWSABLE))) {
        visible = Qtrue;
    }
    pTypeInfo->lpVtbl->ReleaseVarDesc(pTypeInfo, pVarDesc);
    return visible;
}

/*
 *  call-seq:
 *     WIN32OLE_VARIABLE#visible?
 *
 *  Returns true if the variable is public.
 *
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
 *     variables = tobj.variables
 *     variables.each do |variable|
 *       puts "#{variable.name} #{variable.visible?}"
 *     end
 *
 *     The result of above script is following:
 *       xlChart true
 *       xlDialogSheet true
 *       xlExcel4IntlMacroSheet true
 *       xlExcel4MacroSheet true
 *       xlWorksheet true
 *
 */
static VALUE
folevariable_visible(self)
    VALUE self;
{
    struct olevariabledata *pvar;
    Data_Get_Struct(self, struct olevariabledata, pvar);
    return ole_variable_visible(pvar->pTypeInfo, pvar->index);
}

static VALUE
ole_variable_kind(pTypeInfo, var_index)
    ITypeInfo *pTypeInfo;
    UINT var_index;
{
    VARDESC *pVarDesc;
    HRESULT hr;
    VALUE kind = rb_str_new2("UNKNOWN");
    hr = pTypeInfo->lpVtbl->GetVarDesc(pTypeInfo, var_index, &pVarDesc);
    if (FAILED(hr))
        return kind;
    switch(pVarDesc->varkind) {
    case VAR_PERINSTANCE:
        kind = rb_str_new2("PERINSTANCE");
        break;
    case VAR_STATIC:
        kind = rb_str_new2("STATIC");
        break;
    case VAR_CONST:
        kind = rb_str_new2("CONSTANT");
        break;
    case VAR_DISPATCH:
        kind = rb_str_new2("DISPATCH");
        break;
    default:
        break;
    }
    pTypeInfo->lpVtbl->ReleaseVarDesc(pTypeInfo, pVarDesc);
    return kind;
}

/*
 * call-seq:
 *   WIN32OLE_VARIABLE#variable_kind
 *
 * Returns variable kind string.
 *
 *    tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
 *    variables = tobj.variables
 *    variables.each do |variable|
 *      puts "#{variable.name} #{variable.variable_kind}"
 *    end
 *
 *    The result of above script is following:
 *      xlChart CONSTANT
 *      xlDialogSheet CONSTANT
 *      xlExcel4IntlMacroSheet CONSTANT
 *      xlExcel4MacroSheet CONSTANT
 *      xlWorksheet CONSTANT
 */
static VALUE
folevariable_variable_kind(self)
    VALUE self;
{
    struct olevariabledata *pvar;
    Data_Get_Struct(self, struct olevariabledata, pvar);
    return ole_variable_kind(pvar->pTypeInfo, pvar->index);
}

static VALUE
ole_variable_varkind(pTypeInfo, var_index)
    ITypeInfo *pTypeInfo;
    UINT var_index;
{
    VARDESC *pVarDesc;
    HRESULT hr;
    VALUE kind = Qnil;
    hr = pTypeInfo->lpVtbl->GetVarDesc(pTypeInfo, var_index, &pVarDesc);
    if (FAILED(hr))
        return kind;
    pTypeInfo->lpVtbl->ReleaseVarDesc(pTypeInfo, pVarDesc);
    kind = INT2FIX(pVarDesc->varkind);
    return kind;
}

/*
 *  call-seq:
 *     WIN32OLE_VARIABLE#varkind
 *
 *  Returns the number which represents variable kind.
 *    tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
 *    variables = tobj.variables
 *    variables.each do |variable|
 *      puts "#{variable.name} #{variable.varkind}"
 *    end
 *
 *    The result of above script is following:
 *       xlChart 2
 *       xlDialogSheet 2
 *       xlExcel4IntlMacroSheet 2
 *       xlExcel4MacroSheet 2
 *       xlWorksheet 2
 */
static VALUE
folevariable_varkind(self)
    VALUE self;
{
    struct olevariabledata *pvar;
    Data_Get_Struct(self, struct olevariabledata, pvar);
    return ole_variable_varkind(pvar->pTypeInfo, pvar->index);
}

/*
 * Document-class: WIN32OLE_METHOD
 *
 *   <code>WIN32OLE_METHOD</code> objects represent OLE method information.
 */

static VALUE
olemethod_set_member(self, pTypeInfo, pOwnerTypeInfo, index, name)
    VALUE self;
    ITypeInfo *pTypeInfo;
    ITypeInfo *pOwnerTypeInfo;
    int index;
    VALUE name;
{
    struct olemethoddata *pmethod;
    Data_Get_Struct(self, struct olemethoddata, pmethod);
    pmethod->pTypeInfo = pTypeInfo;
    OLE_ADDREF(pTypeInfo);
    pmethod->pOwnerTypeInfo = pOwnerTypeInfo;
    if(pOwnerTypeInfo) OLE_ADDREF(pOwnerTypeInfo);
    pmethod->index = index;
    rb_ivar_set(self, rb_intern("name"), name);
    return self;
}

static VALUE
folemethod_s_allocate(klass)
    VALUE klass;
{
    struct olemethoddata *pmethod;
    VALUE obj;
    obj = Data_Make_Struct(klass,
                           struct olemethoddata,
                           0, olemethod_free, pmethod);
    pmethod->pTypeInfo = NULL;
    pmethod->pOwnerTypeInfo = NULL;
    pmethod->index = 0;
    return obj;
}

/*
 *  call-seq:
 *     WIN32OLE_METHOD.new(ole_type,  method) -> WIN32OLE_METHOD object
 *
 *  Returns a new WIN32OLE_METHOD object which represents the information
 *  about OLE method.
 *  The first argument <i>ole_type</i> specifies WIN32OLE_TYPE object.
 *  The second argument <i>method</i> specifies OLE method name defined OLE class
 *  which represents WIN32OLE_TYPE object.
 *
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
 *     method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
 */
static VALUE
folemethod_initialize(self, oletype, method)
    VALUE self;
    VALUE oletype;
    VALUE method;
{
    struct oletypedata *ptype;
    VALUE obj = Qnil;
    if (rb_obj_is_kind_of(oletype, cWIN32OLE_TYPE)) {
        Check_SafeStr(method);
        Data_Get_Struct(oletype, struct oletypedata, ptype);
        obj = olemethod_from_typeinfo(self, ptype->pTypeInfo, method);
        if (obj == Qnil) {
            rb_raise(eWIN32OLE_RUNTIME_ERROR, "not found %s",
                     StringValuePtr(method));
        }
    }
    else {
        rb_raise(rb_eTypeError, "1st argument should be WIN32OLE_TYPE object");
    }
    return obj;
}

/*
 *  call-seq
 *     WIN32OLE_METHOD#name
 *
 *  Returns the name of the method.
 *
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
 *     method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
 *     puts method.name # => SaveAs
 *
 */
static VALUE
folemethod_name(self)
    VALUE self;
{
    return rb_ivar_get(self, rb_intern("name"));
}

static VALUE
ole_method_return_type(pTypeInfo, method_index)
    ITypeInfo *pTypeInfo;
    UINT method_index;
{
    FUNCDESC *pFuncDesc;
    HRESULT hr;
    VALUE type;

    hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc);
    if (FAILED(hr))
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetFuncDesc");

    type = ole_typedesc2val(pTypeInfo, &(pFuncDesc->elemdescFunc.tdesc), Qnil);
    pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
    return type;
}

/*
 *  call-seq:
 *     WIN32OLE_METHOD#return_type
 *
 *  Returns string of return value type of method.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
 *     method = WIN32OLE_METHOD.new(tobj, 'Add')
 *     puts method.return_type # => Workbook
 *
 */
static VALUE
folemethod_return_type(self)
    VALUE self;
{
    struct olemethoddata *pmethod;
    Data_Get_Struct(self, struct olemethoddata, pmethod);
    return ole_method_return_type(pmethod->pTypeInfo, pmethod->index);
}

static VALUE
ole_method_return_vtype(pTypeInfo, method_index)
    ITypeInfo *pTypeInfo;
    UINT method_index;
{
    FUNCDESC *pFuncDesc;
    HRESULT hr;
    VALUE vt;

    hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc);
    if (FAILED(hr))
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetFuncDesc");

    vt = INT2FIX(pFuncDesc->elemdescFunc.tdesc.vt);
    pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
    return vt;
}

/*
 *  call-seq:
 *     WIN32OLE_METHOD#return_vtype
 *
 *  Returns number of return value type of method.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
 *     method = WIN32OLE_METHOD.new(tobj, 'Add')
 *     puts method.return_vtype # => 26
 *
 */
static VALUE
folemethod_return_vtype(self)
    VALUE self;
{
    struct olemethoddata *pmethod;
    Data_Get_Struct(self, struct olemethoddata, pmethod);
    return ole_method_return_vtype(pmethod->pTypeInfo, pmethod->index);
}

static VALUE
ole_method_return_type_detail(pTypeInfo, method_index)
    ITypeInfo *pTypeInfo;
    UINT method_index;
{
    FUNCDESC *pFuncDesc;
    HRESULT hr;
    VALUE type = rb_ary_new();

    hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc);
    if (FAILED(hr))
        return type;

    ole_typedesc2val(pTypeInfo, &(pFuncDesc->elemdescFunc.tdesc), type);
    pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
    return type;
}

/*
 *  call-seq:
 *     WIN32OLE_METHOD#return_type_detail
 *
 *  Returns detail information of return value type of method.
 *  The information is array.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
 *     method = WIN32OLE_METHOD.new(tobj, 'Add')
 *     p method.return_type_detail # => ["PTR", "USERDEFINED", "Workbook"]
 */
static VALUE
folemethod_return_type_detail(self)
    VALUE self;
{
    struct olemethoddata *pmethod;
    Data_Get_Struct(self, struct olemethoddata, pmethod);
    return ole_method_return_type_detail(pmethod->pTypeInfo, pmethod->index);
}

static VALUE
ole_method_invkind(pTypeInfo, method_index)
    ITypeInfo *pTypeInfo;
    UINT method_index;
{
    FUNCDESC *pFuncDesc;
    HRESULT hr;
    VALUE invkind;
    hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc);
    if(FAILED(hr))
        ole_raise(hr, eWIN32OLE_RUNTIME_ERROR, "failed to GetFuncDesc");
    invkind = INT2FIX(pFuncDesc->invkind);
    pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
    return invkind;
}

static VALUE
ole_method_invoke_kind(pTypeInfo, method_index)
    ITypeInfo *pTypeInfo;
    WORD method_index;
{
    VALUE type = rb_str_new2("UNKNOWN");
    VALUE invkind = ole_method_invkind(pTypeInfo, method_index);
    if((FIX2INT(invkind) & INVOKE_PROPERTYGET) &&
       (FIX2INT(invkind) & INVOKE_PROPERTYPUT) ) {
        type = rb_str_new2("PROPERTY");
    } else if(FIX2INT(invkind) & INVOKE_PROPERTYGET) {
        type =  rb_str_new2("PROPERTYGET");
    } else if(FIX2INT(invkind) & INVOKE_PROPERTYPUT) {
        type = rb_str_new2("PROPERTYPUT");
    } else if(FIX2INT(invkind) & INVOKE_PROPERTYPUTREF) {
        type = rb_str_new2("PROPERTYPUTREF");
    } else if(FIX2INT(invkind) & INVOKE_FUNC) {
        type = rb_str_new2("FUNC");
    }
    return type;
}

/*
 *   call-seq:
 *      WIN32OLE_MTHOD#invkind
 *
 *   Returns the method invoke kind.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
 *     method = WIN32OLE_METHOD.new(tobj, 'Add')
 *     puts method.invkind # => 1
 *
 */
static VALUE
folemethod_invkind(self)
    VALUE self;
{
    struct olemethoddata *pmethod;
    Data_Get_Struct(self, struct olemethoddata, pmethod);
    return ole_method_invkind(pmethod->pTypeInfo, pmethod->index);
}

/*
 *  call-seq:
 *     WIN32OLE_METHOD#invoke_kind
 *
 *  Returns the method kind string. The string is "UNKNOWN" or "PROPERTY"
 *  or "PROPERTY" or "PROPERTYGET" or "PROPERTYPUT" or "PROPERTYPPUTREF"
 *  or "FUNC".
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
 *     method = WIN32OLE_METHOD.new(tobj, 'Add')
 *     puts method.invoke_kind # => "FUNC"
 */
static VALUE
folemethod_invoke_kind(self)
    VALUE self;
{
    struct olemethoddata *pmethod;
    Data_Get_Struct(self, struct olemethoddata, pmethod);
    return ole_method_invoke_kind(pmethod->pTypeInfo, pmethod->index);
}

static VALUE
ole_method_visible(pTypeInfo, method_index)
    ITypeInfo *pTypeInfo;
    UINT method_index;
{
    FUNCDESC *pFuncDesc;
    HRESULT hr;
    VALUE visible;
    hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc);
    if(FAILED(hr))
        return Qfalse;
    if (pFuncDesc->wFuncFlags & (FUNCFLAG_FRESTRICTED |
                                 FUNCFLAG_FHIDDEN |
                                 FUNCFLAG_FNONBROWSABLE)) {
        visible = Qfalse;
    } else {
        visible = Qtrue;
    }
    pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
    return visible;
}

/*
 *  call-seq:
 *     WIN32OLE_METHOD#visible?
 *
 *  Returns true if the method is public.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
 *     method = WIN32OLE_METHOD.new(tobj, 'Add')
 *     puts method.visible? # => true
 */
static VALUE
folemethod_visible(self)
    VALUE self;
{
    struct olemethoddata *pmethod;
    Data_Get_Struct(self, struct olemethoddata, pmethod);
    return ole_method_visible(pmethod->pTypeInfo, pmethod->index);
}

static VALUE
ole_method_event(pTypeInfo, method_index, method_name)
    ITypeInfo *pTypeInfo;
    WORD method_index;
    VALUE method_name;
{
    TYPEATTR *pTypeAttr;
    HRESULT hr;
    WORD i;
    int flags;
    HREFTYPE href;
    ITypeInfo *pRefTypeInfo;
    FUNCDESC *pFuncDesc;
    BSTR bstr;
    VALUE name;
    VALUE event = Qfalse;

    hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
    if (FAILED(hr))
        return event;
    if(pTypeAttr->typekind != TKIND_COCLASS) {
        pTypeInfo->lpVtbl->ReleaseTypeAttr(pTypeInfo, pTypeAttr);
        return event;
    }
    for (i = 0; i < pTypeAttr->cImplTypes; i++) {
        hr = pTypeInfo->lpVtbl->GetImplTypeFlags(pTypeInfo, i, &flags);
        if (FAILED(hr))
            continue;

        if (flags & IMPLTYPEFLAG_FSOURCE) {
            hr = pTypeInfo->lpVtbl->GetRefTypeOfImplType(pTypeInfo,
                                                         i, &href);
            if (FAILED(hr))
                continue;
            hr = pTypeInfo->lpVtbl->GetRefTypeInfo(pTypeInfo,
                                                   href, &pRefTypeInfo);
            if (FAILED(hr))
                continue;
            hr = pRefTypeInfo->lpVtbl->GetFuncDesc(pRefTypeInfo, method_index,
                                                   &pFuncDesc);
            if (FAILED(hr)) {
                OLE_RELEASE(pRefTypeInfo);
                continue;
            }

            hr = pRefTypeInfo->lpVtbl->GetDocumentation(pRefTypeInfo,
                                                        pFuncDesc->memid,
                                                        &bstr, NULL, NULL, NULL);
            if (FAILED(hr)) {
                pRefTypeInfo->lpVtbl->ReleaseFuncDesc(pRefTypeInfo, pFuncDesc);
                OLE_RELEASE(pRefTypeInfo);
                continue;
            }

            name = WC2VSTR(bstr);
            pRefTypeInfo->lpVtbl->ReleaseFuncDesc(pRefTypeInfo, pFuncDesc);
            OLE_RELEASE(pRefTypeInfo);
            if (rb_str_cmp(method_name, name) == 0) {
                event = Qtrue;
                break;
            }
        }
    }
    OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
    return event;
}

/*
 *  call-seq:
 *     WIN32OLE_METHOD#event?
 *
 *  Returns true if the method is event.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
 *     method = WIN32OLE_METHOD.new(tobj, 'SheetActivate')
 *     puts method.event? # => true
 *
 */
static VALUE
folemethod_event(self)
    VALUE self;
{
    struct olemethoddata *pmethod;
    Data_Get_Struct(self, struct olemethoddata, pmethod);
    if (!pmethod->pOwnerTypeInfo)
        return Qfalse;
    return ole_method_event(pmethod->pOwnerTypeInfo,
                            pmethod->index,
                            rb_ivar_get(self, rb_intern("name")));
}

/*
 *  call-seq:
 *     WIN32OLE_METHOD#event_interface
 *
 *  Returns event interface name if the method is event.
 *    tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
 *    method = WIN32OLE_METHOD.new(tobj, 'SheetActivate')
 *    puts method.event_interface # =>  WorkbookEvents
 */
static VALUE
folemethod_event_interface(self)
    VALUE self;
{
    BSTR name;
    struct olemethoddata *pmethod;
    HRESULT hr;
    Data_Get_Struct(self, struct olemethoddata, pmethod);
    if(folemethod_event(self) == Qtrue) {
        hr = ole_docinfo_from_type(pmethod->pTypeInfo, &name, NULL, NULL, NULL);
        if(SUCCEEDED(hr))
            return WC2VSTR(name);
    }
    return Qnil;
}

static VALUE
ole_method_docinfo_from_type(pTypeInfo, method_index, name, helpstr,
                             helpcontext, helpfile)
    ITypeInfo *pTypeInfo;
    UINT method_index;
    BSTR *name;
    BSTR *helpstr;
    DWORD *helpcontext;
    BSTR *helpfile;
{
    FUNCDESC *pFuncDesc;
    HRESULT hr;
    hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc);
    if (FAILED(hr))
        return hr;
    hr = pTypeInfo->lpVtbl->GetDocumentation(pTypeInfo, pFuncDesc->memid,
                                             name, helpstr,
                                             helpcontext, helpfile);
    pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
    return hr;
}

static VALUE
ole_method_helpstring(pTypeInfo, method_index)
    ITypeInfo *pTypeInfo;
    UINT method_index;
{
    HRESULT hr;
    BSTR bhelpstring;
    hr = ole_method_docinfo_from_type(pTypeInfo, method_index, NULL, &bhelpstring,
                                      NULL, NULL);
    if (FAILED(hr))
        return Qnil;
    return WC2VSTR(bhelpstring);
}

/*
 *  call-seq:
 *     WIN32OLE_METHOD#helpstring
 *
 *  Returns help string of OLE method. If the help string is not found,
 *  then the method returns nil.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Internet Controls', 'IWebBrowser')
 *     method = WIN32OLE_METHOD.new(tobj, 'Navigate')
 *     puts method.helpstring # => Navigates to a URL or file.
 *
 */
static VALUE
folemethod_helpstring(self)
    VALUE self;
{
    struct olemethoddata *pmethod;
    Data_Get_Struct(self, struct olemethoddata, pmethod);
    return ole_method_helpstring(pmethod->pTypeInfo, pmethod->index);
}

static VALUE
ole_method_helpfile(pTypeInfo, method_index)
    ITypeInfo *pTypeInfo;
    UINT method_index;
{
    HRESULT hr;
    BSTR bhelpfile;
    hr = ole_method_docinfo_from_type(pTypeInfo, method_index, NULL, NULL,
                                      NULL, &bhelpfile);
    if (FAILED(hr))
        return Qnil;
    return WC2VSTR(bhelpfile);
}

/*
 *  call-seq:
 *     WIN32OLE_METHOD#helpfile
 *
 *  Returns help file. If help file is not found, then
 *  the method returns nil.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
 *     method = WIN32OLE_METHOD.new(tobj, 'Add')
 *     puts method.helpfile # => C:\...\VBAXL9.CHM
 */
static VALUE
folemethod_helpfile(self)
    VALUE self;
{
    struct olemethoddata *pmethod;
    Data_Get_Struct(self, struct olemethoddata, pmethod);

    return ole_method_helpfile(pmethod->pTypeInfo, pmethod->index);
}

static VALUE
ole_method_helpcontext(pTypeInfo, method_index)
    ITypeInfo *pTypeInfo;
    UINT method_index;
{
    HRESULT hr;
    DWORD helpcontext = 0;
    hr = ole_method_docinfo_from_type(pTypeInfo, method_index, NULL, NULL,
                                      &helpcontext, NULL);
    if (FAILED(hr))
        return Qnil;
    return INT2FIX(helpcontext);
}

/*
 *  call-seq:
 *     WIN32OLE_METHOD#helpcontext
 *
 *  Returns help context.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
 *     method = WIN32OLE_METHOD.new(tobj, 'Add')
 *     puts method.helpcontext # => 65717
 */
static VALUE
folemethod_helpcontext(self)
    VALUE self;
{
    struct olemethoddata *pmethod;
    Data_Get_Struct(self, struct olemethoddata, pmethod);
    return ole_method_helpcontext(pmethod->pTypeInfo, pmethod->index);
}

static VALUE
ole_method_dispid(pTypeInfo, method_index)
    ITypeInfo *pTypeInfo;
    UINT method_index;
{
    FUNCDESC *pFuncDesc;
    HRESULT hr;
    VALUE dispid = Qnil;
    hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc);
    if (FAILED(hr))
        return dispid;
    dispid = INT2NUM(pFuncDesc->memid);
    pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
    return dispid;
}

/*
 *  call-seq:
 *     WIN32OLE_METHOD#dispid
 *
 *  Returns dispatch ID.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
 *     method = WIN32OLE_METHOD.new(tobj, 'Add')
 *     puts method.dispid # => 181
 */
static VALUE
folemethod_dispid(self)
    VALUE self;
{
    struct olemethoddata *pmethod;
    Data_Get_Struct(self, struct olemethoddata, pmethod);
    return ole_method_dispid(pmethod->pTypeInfo, pmethod->index);
}

static VALUE
ole_method_offset_vtbl(pTypeInfo, method_index)
    ITypeInfo *pTypeInfo;
    UINT method_index;
{
    FUNCDESC *pFuncDesc;
    HRESULT hr;
    VALUE offset_vtbl = Qnil;
    hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc);
    if (FAILED(hr))
        return offset_vtbl;
    offset_vtbl = INT2FIX(pFuncDesc->oVft);
    pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
    return offset_vtbl;
}

/*
 *  call-seq:
 *     WIN32OLE_METHOD#offset_vtbl
 *
 *  Returns the offset ov VTBL.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
 *     method = WIN32OLE_METHOD.new(tobj, 'Add')
 *     puts method.offset_vtbl # => 40
 */
static VALUE
folemethod_offset_vtbl(self)
    VALUE self;
{
    struct olemethoddata *pmethod;
    Data_Get_Struct(self, struct olemethoddata, pmethod);
    return ole_method_offset_vtbl(pmethod->pTypeInfo, pmethod->index);
}

static VALUE
ole_method_size_params(pTypeInfo, method_index)
    ITypeInfo *pTypeInfo;
    UINT method_index;
{
    FUNCDESC *pFuncDesc;
    HRESULT hr;
    VALUE size_params = Qnil;
    hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc);
    if (FAILED(hr))
        return size_params;
    size_params = INT2FIX(pFuncDesc->cParams);
    pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
    return size_params;
}

/*
 *  call-seq:
 *     WIN32OLE_METHOD#size_params
 *
 *  Returns the size of arguments of the method.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
 *     method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
 *     puts method.size_params # => 11
 *
 */
static VALUE
folemethod_size_params(self)
    VALUE self;
{
    struct olemethoddata *pmethod;
    Data_Get_Struct(self, struct olemethoddata, pmethod);
    return ole_method_size_params(pmethod->pTypeInfo, pmethod->index);
}

static VALUE
ole_method_size_opt_params(pTypeInfo, method_index)
    ITypeInfo *pTypeInfo;
    UINT method_index;
{
    FUNCDESC *pFuncDesc;
    HRESULT hr;
    VALUE size_opt_params = Qnil;
    hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc);
    if (FAILED(hr))
        return size_opt_params;
    size_opt_params = INT2FIX(pFuncDesc->cParamsOpt);
    pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
    return size_opt_params;
}

/*
 *  call-seq:
 *     WIN32OLE_METHOD#size_opt_params
 *
 *  Returns the size of optional parameters.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
 *     method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
 *     puts method.size_opt_params # => 4
 */
static VALUE
folemethod_size_opt_params(self)
    VALUE self;
{
    struct olemethoddata *pmethod;
    Data_Get_Struct(self, struct olemethoddata, pmethod);
    return ole_method_size_opt_params(pmethod->pTypeInfo, pmethod->index);
}

static VALUE
ole_method_params(pTypeInfo, method_index)
    ITypeInfo *pTypeInfo;
    UINT method_index;
{
    FUNCDESC *pFuncDesc;
    HRESULT hr;
    BSTR *bstrs;
    UINT len, i;
    struct oleparamdata *pparam;
    VALUE param;
    VALUE params = rb_ary_new();
    hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc);
    if (FAILED(hr))
        return params;

    len = 0;
    bstrs = ALLOCA_N(BSTR, pFuncDesc->cParams + 1);
    hr = pTypeInfo->lpVtbl->GetNames(pTypeInfo, pFuncDesc->memid,
                                     bstrs, pFuncDesc->cParams + 1,
                                     &len);
    if (FAILED(hr)) {
        pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
        return params;
    }
    SysFreeString(bstrs[0]);
    if (pFuncDesc->cParams > 0) {
        for(i = 1; i < len; i++) {
            param = Data_Make_Struct(cWIN32OLE_PARAM, struct oleparamdata, 0,
                                     oleparam_free, pparam);
            pparam->pTypeInfo = pTypeInfo;
            OLE_ADDREF(pTypeInfo);
            pparam->method_index = method_index;
            pparam->index = i - 1;
            rb_ivar_set(param, rb_intern("name"), WC2VSTR(bstrs[i]));
            rb_ary_push(params, param);
         }
     }
     pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
     return params;
}

/*
 *  call-seq:
 *     WIN32OLE_METHOD#params
 *
 *  returns array of WIN32OLE_PARAM object corresponding with method parameters.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
 *     method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
 *     p method.params # => [Filename, FileFormat, Password, WriteResPassword,
 *                           ReadOnlyRecommended, CreateBackup, AccessMode,
 *                           ConflictResolution, AddToMru, TextCodepage,
 *                           TextVisualLayout]
 */
static VALUE
folemethod_params(self)
    VALUE self;
{
    struct olemethoddata *pmethod;
    Data_Get_Struct(self, struct olemethoddata, pmethod);
    return ole_method_params(pmethod->pTypeInfo, pmethod->index);
}

/*
 * Document-class: WIN32OLE_PARAM
 *
 *   <code>WIN32OLE_PARAM</code> objects represent param information of
 *   the OLE method.
 */

/*
 *  call-seq:
 *     WIN32OLE_PARAM#name
 *
 *  Returns name.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
 *     method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
 *     param1 = method.params[0]
 *     puts param1.name # => Filename
 */
static VALUE
foleparam_name(self)
    VALUE self;
{
    return rb_ivar_get(self, rb_intern("name"));
}

static VALUE
ole_param_ole_type(pTypeInfo, method_index, index)
    ITypeInfo *pTypeInfo;
    UINT method_index;
    UINT index;
{
    FUNCDESC *pFuncDesc;
    HRESULT hr;
    VALUE type = rb_str_new2("UNKNOWN");
    hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc);
    if (FAILED(hr))
        return type;
    type = ole_typedesc2val(pTypeInfo,
                            &(pFuncDesc->lprgelemdescParam[index].tdesc), Qnil);
    pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
    return type;
}

/*
 *  call-seq:
 *     WIN32OLE_PARAM#ole_type
 *
 *  Returns OLE type of WIN32OLE_PARAM object(parameter of OLE method).
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
 *     method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
 *     param1 = method.params[0]
 *     puts param1.ole_type # => VARIANT
 */
static VALUE
foleparam_ole_type(self)
    VALUE self;
{
    struct oleparamdata *pparam;
    Data_Get_Struct(self, struct oleparamdata, pparam);
    return ole_param_ole_type(pparam->pTypeInfo, pparam->method_index,
                              pparam->index);
}

static VALUE
ole_param_ole_type_detail(pTypeInfo, method_index, index)
    ITypeInfo *pTypeInfo;
    UINT method_index;
    UINT index;
{
    FUNCDESC *pFuncDesc;
    HRESULT hr;
    VALUE typedetail = rb_ary_new();
    hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc);
    if (FAILED(hr))
        return typedetail;
    ole_typedesc2val(pTypeInfo,
                     &(pFuncDesc->lprgelemdescParam[index].tdesc), typedetail);
    pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
    return typedetail;
}

/*
 *  call-seq:
 *     WIN32OLE_PARAM#ole_type_detail
 *
 *  Returns detail information of type of argument.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'IWorksheetFunction')
 *     method = WIN32OLE_METHOD.new(tobj, 'SumIf')
 *     param1 = method.params[0]
 *     p param1.ole_type_detail # => ["PTR", "USERDEFINED", "Range"]
 */
static VALUE
foleparam_ole_type_detail(self)
    VALUE self;
{
    struct oleparamdata *pparam;
    Data_Get_Struct(self, struct oleparamdata, pparam);
    return ole_param_ole_type_detail(pparam->pTypeInfo, pparam->method_index,
                                     pparam->index);
}

static VALUE
ole_param_flag_mask(pTypeInfo, method_index, index, mask)
    ITypeInfo *pTypeInfo;
    UINT method_index;
    UINT index;
    USHORT mask;
{
    FUNCDESC *pFuncDesc;
    HRESULT hr;
    VALUE ret = Qfalse;
    hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc);
    if(FAILED(hr))
        return ret;
    if (V_UNION1((&(pFuncDesc->lprgelemdescParam[index])), paramdesc).wParamFlags &mask)
        ret = Qtrue;
    pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
    return ret;
}

/*
 *  call-seq:
 *     WIN32OLE_PARAM#input?
 *
 *  Returns true if the parameter is input.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
 *     method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
 *     param1 = method.params[0]
 *     puts param1.input? # => true
 */
static VALUE foleparam_input(self)
    VALUE self;
{
    struct oleparamdata *pparam;
    Data_Get_Struct(self, struct oleparamdata, pparam);
    return ole_param_flag_mask(pparam->pTypeInfo, pparam->method_index,
                               pparam->index, PARAMFLAG_FIN);
}

/*
 *  call-seq:
 *     WIN32OLE#output?
 *
 *  Returns true if argument is output.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Internet Controls', 'DWebBrowserEvents')
 *     method = WIN32OLE_METHOD.new(tobj, 'NewWindow')
 *     method.params.each do |param|
 *       puts "#{param.name} #{param.output?}"
 *     end
 *
 *     The result of above script is following:
 *       URL false
 *       Flags false
 *       TargetFrameName false
 *       PostData false
 *       Headers false
 *       Processed true
 */
static VALUE foleparam_output(self)
    VALUE self;
{
    struct oleparamdata *pparam;
    Data_Get_Struct(self, struct oleparamdata, pparam);
    return ole_param_flag_mask(pparam->pTypeInfo, pparam->method_index,
                               pparam->index, PARAMFLAG_FOUT);
}

/*
 *  call-seq:
 *     WIN32OLE_PARAM#optional?
 *
 *  Returns true if argument is optional.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
 *     method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
 *     param1 = method.params[0]
 *     puts "#{param1.name} #{param1.optional?}" # => Filename true
 */
static VALUE foleparam_optional(self)
    VALUE self;
{
    struct oleparamdata *pparam;
    Data_Get_Struct(self, struct oleparamdata, pparam);
    return ole_param_flag_mask(pparam->pTypeInfo, pparam->method_index,
                               pparam->index, PARAMFLAG_FOPT);
}

/*
 *  call-seq:
 *     WIN32OLE_PARAM#retval?
 *
 *  Returns true if argument is return value.
 *     tobj = WIN32OLE_TYPE.new('DirectX 7 for Visual Basic Type Library',
 *                              'DirectPlayLobbyConnection')
 *     method = WIN32OLE_METHOD.new(tobj, 'GetPlayerShortName')
 *     param = method.params[0]
 *     puts "#{param.name} #{param.retval?}"  # => name true
 */
static VALUE foleparam_retval(self)
    VALUE self;
{
    struct oleparamdata *pparam;
    Data_Get_Struct(self, struct oleparamdata, pparam);
    return ole_param_flag_mask(pparam->pTypeInfo, pparam->method_index,
                               pparam->index, PARAMFLAG_FRETVAL);
}

static VALUE
ole_param_default(pTypeInfo, method_index, index)
    ITypeInfo *pTypeInfo;
    UINT method_index;
    UINT index;
{
    FUNCDESC *pFuncDesc;
    ELEMDESC *pElemDesc;
    PARAMDESCEX * pParamDescEx;
    HRESULT hr;
    USHORT wParamFlags;
    USHORT mask = PARAMFLAG_FOPT|PARAMFLAG_FHASDEFAULT;
    VALUE defval = Qnil;
    hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc);
    if (FAILED(hr))
        return defval;
    pElemDesc = &pFuncDesc->lprgelemdescParam[index];
    wParamFlags = V_UNION1(pElemDesc, paramdesc).wParamFlags;
    if ((wParamFlags & mask) == mask) {
         pParamDescEx = V_UNION1(pElemDesc, paramdesc).pparamdescex;
         defval = ole_variant2val(&pParamDescEx->varDefaultValue);
    }
    pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
    return defval;
}

/*
 *  call-seq:
 *     WIN32OLE_PARAM#default
 *
 *  Returns default value. If the default value does not exist,
 *  this method returns nil.
 *     tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
 *     method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
 *     method.params.each do |param|
 *       if param.default
 *         puts "#{param.name} (= #{param.default})"
 *       else
 *         puts "#{param}"
 *       end
 *     end
 *
 *     The above script result is following:
 *         Filename
 *         FileFormat
 *         Password
 *         WriteResPassword
 *         ReadOnlyRecommended
 *         CreateBackup
 *         AccessMode (= 1)
 *         ConflictResolution
 *         AddToMru
 *         TextCodepage
 *         TextVisualLayout
 */
static VALUE foleparam_default(self)
    VALUE self;
{
    struct oleparamdata *pparam;
    Data_Get_Struct(self, struct oleparamdata, pparam);
    return ole_param_default(pparam->pTypeInfo, pparam->method_index,
                             pparam->index);
}

/*
 * Document-class: WIN32OLE_EVENT
 *
 *   <code>WIN32OLE_EVENT</code> objects controls OLE event.
 */

static IEventSinkVtbl vtEventSink;
static BOOL g_IsEventSinkVtblInitialized = FALSE;

void EVENTSINK_Destructor(PIEVENTSINKOBJ);

STDMETHODIMP
EVENTSINK_QueryInterface(
    PEVENTSINK pEV,
    REFIID     iid,
    LPVOID*    ppv
    ) {
    if (IsEqualIID(iid, &IID_IUnknown) ||
        IsEqualIID(iid, &IID_IDispatch) ||
        IsEqualIID(iid, &((PIEVENTSINKOBJ)pEV)->m_iid)) {
        *ppv = pEV;
    }
    else {
        *ppv = NULL;
        return E_NOINTERFACE;
    }
    ((LPUNKNOWN)*ppv)->lpVtbl->AddRef((LPUNKNOWN)*ppv);
    return NOERROR;
}

STDMETHODIMP_(ULONG)
EVENTSINK_AddRef(
    PEVENTSINK pEV
    ){
    PIEVENTSINKOBJ pEVObj = (PIEVENTSINKOBJ)pEV;
    return ++pEVObj->m_cRef;
}

STDMETHODIMP_(ULONG) EVENTSINK_Release(
    PEVENTSINK pEV
    ) {
    PIEVENTSINKOBJ pEVObj = (PIEVENTSINKOBJ)pEV;
    --pEVObj->m_cRef;
    if(pEVObj->m_cRef != 0)
        return pEVObj->m_cRef;
    EVENTSINK_Destructor(pEVObj);
    return 0;
}

STDMETHODIMP EVENTSINK_GetTypeInfoCount(
    PEVENTSINK pEV,
    UINT *pct
    ) {
    *pct = 0;
    return NOERROR;
}

STDMETHODIMP EVENTSINK_GetTypeInfo(
    PEVENTSINK pEV,
    UINT info,
    LCID lcid,
    ITypeInfo **pInfo
    ) {
    *pInfo = NULL;
    return DISP_E_BADINDEX;
}

STDMETHODIMP EVENTSINK_GetIDsOfNames(
    PEVENTSINK pEV,
    REFIID riid,
    OLECHAR **szNames,
    UINT cNames,
    LCID lcid,
    DISPID *pDispID
    ) {
    return DISP_E_UNKNOWNNAME;
}

static long
ole_search_event_at(ary, ev)
    VALUE ary;
    VALUE ev;
{
    VALUE event;
    VALUE def_event;
    VALUE event_name;
    long i, len;
    long ret = -1;
    def_event = Qnil;
    len = RARRAY(ary)->len;
    for(i = 0; i < len; i++) {
        event = rb_ary_entry(ary, i);
        event_name = rb_ary_entry(event, 1);
        if(NIL_P(event_name) && NIL_P(ev)) {
            ret = i;
            break;
        }
        else if (TYPE(ev) == T_STRING &&
                 TYPE(event_name) == T_STRING &&
                 rb_str_cmp(ev, event_name) == 0) {
            ret = i;
            break;
        }
    }
    return ret;
}

static VALUE
ole_search_event(ary, ev, is_default)
    VALUE ary;
    VALUE ev;
    BOOL  *is_default;
{
    VALUE event;
    VALUE def_event;
    VALUE event_name;
    int i, len;
    *is_default = FALSE;
    def_event = Qnil;
    len = RARRAY(ary)->len;
    for(i = 0; i < len; i++) {
        event = rb_ary_entry(ary, i);
        event_name = rb_ary_entry(event, 1);
        if(NIL_P(event_name)) {
            *is_default = TRUE;
            def_event = event;
        }
        else if (rb_str_cmp(ev, event_name) == 0) {
            *is_default = FALSE;
            return event;
        }
    }
    return def_event;
}

static void
ary2ptr_dispparams(ary, pdispparams)
    VALUE ary;
    DISPPARAMS *pdispparams;
{
    int i;
    VALUE v;
    VARIANT *pvar;
    for(i = 0; i < RARRAY(ary)->len && (unsigned int) i < pdispparams->cArgs; i++) {
        v = rb_ary_entry(ary, i);
        pvar = &pdispparams->rgvarg[pdispparams->cArgs-i-1];
        ole_val2ptr_variant(v, pvar);
    }
}

STDMETHODIMP EVENTSINK_Invoke(
    PEVENTSINK pEventSink,
    DISPID dispid,
    REFIID riid,
    LCID lcid,
    WORD wFlags,
    DISPPARAMS *pdispparams,
    VARIANT *pvarResult,
    EXCEPINFO *pexcepinfo,
    UINT *puArgErr
    ) {

    HRESULT hr;
    BSTR bstr;
    unsigned int count;
    unsigned int i;
    ITypeInfo *pTypeInfo;
    VARIANT *pvar;
    VALUE ary, obj, event, handler, args, argv, ev, result;
    BOOL is_default_handler = FALSE;

    PIEVENTSINKOBJ pEV = (PIEVENTSINKOBJ)pEventSink;
    pTypeInfo = pEV->pTypeInfo;

    obj = rb_ary_entry(ary_ole_event, pEV->m_event_id);
    if (!rb_obj_is_kind_of(obj, cWIN32OLE_EVENT)) {
        return NOERROR;
    }

    ary = rb_ivar_get(obj, id_events);
    if (NIL_P(ary) || TYPE(ary) != T_ARRAY) {
        return NOERROR;
    }
    hr = pTypeInfo->lpVtbl->GetNames(pTypeInfo, dispid,
                                     &bstr, 1, &count);
    if (FAILED(hr)) {
        return NOERROR;
    }
    ev = WC2VSTR(bstr);
    event = ole_search_event(ary, ev, &is_default_handler);
    if (NIL_P(event)) {
        return NOERROR;
    }
    args = rb_ary_new();
    if (is_default_handler) {
        rb_ary_push(args, ev);
    }

    /* make argument of event handler */
    for (i = 0; i < pdispparams->cArgs; ++i) {
        pvar = &pdispparams->rgvarg[pdispparams->cArgs-i-1];
        rb_ary_push(args, ole_variant2val(pvar));
    }
    handler = rb_ary_entry(event, 0);

    if (rb_ary_entry(event, 3) == Qtrue) {
        argv = rb_ary_new();
        rb_ary_push(args, argv);
        result = rb_apply(handler, rb_intern("call"), args);
        ary2ptr_dispparams(argv, pdispparams);
    }
    else {
        result = rb_apply(handler, rb_intern("call"), args);
    }

    if (pvarResult) {
        ole_val2variant(result, pvarResult);
    }

    return NOERROR;
}

PIEVENTSINKOBJ
EVENTSINK_Constructor() {
    PIEVENTSINKOBJ pEv;
    if (!g_IsEventSinkVtblInitialized) {
        vtEventSink.QueryInterface=EVENTSINK_QueryInterface;
        vtEventSink.AddRef = EVENTSINK_AddRef;
        vtEventSink.Release = EVENTSINK_Release;
        vtEventSink.Invoke = EVENTSINK_Invoke;
        vtEventSink.GetIDsOfNames = EVENTSINK_GetIDsOfNames;
        vtEventSink.GetTypeInfoCount = EVENTSINK_GetTypeInfoCount;
        vtEventSink.GetTypeInfo = EVENTSINK_GetTypeInfo;

        g_IsEventSinkVtblInitialized = TRUE;
    }
    pEv = ALLOC_N(IEVENTSINKOBJ, 1);
    if(pEv == NULL) return NULL;
    pEv->lpVtbl = &vtEventSink;
    pEv->m_cRef = 0;
    pEv->m_event_id = 0;
    pEv->m_dwCookie = 0;
    pEv->pConnectionPoint = NULL;
    pEv->pTypeInfo = NULL;
    pEv->ptr_freed = NULL;
    return pEv;
}

void EVENTSINK_Destructor(
    PIEVENTSINKOBJ pEVObj
    ) {
    if(pEVObj != NULL) {
        *(pEVObj->ptr_freed) = 1;
        free(pEVObj);
    }
}

static HRESULT
find_iid(ole, pitf, piid, ppTypeInfo)
    VALUE ole;
    char *pitf;
    IID *piid;
    ITypeInfo **ppTypeInfo;
{
    HRESULT hr;
    IDispatch *pDispatch;
    ITypeInfo *pTypeInfo;
    ITypeLib *pTypeLib;
    TYPEATTR *pTypeAttr;
    HREFTYPE RefType;
    ITypeInfo *pImplTypeInfo;
    TYPEATTR *pImplTypeAttr;

    struct oledata *pole;
    unsigned int index;
    unsigned int count;
    int type;
    BSTR bstr;
    char *pstr;

    BOOL is_found = FALSE;
    LCID    lcid = LOCALE_SYSTEM_DEFAULT;

    OLEData_Get_Struct(ole, pole);

    pDispatch = pole->pDispatch;

    hr = pDispatch->lpVtbl->GetTypeInfo(pDispatch, 0, lcid, &pTypeInfo);
    if (FAILED(hr))
        return hr;

    hr = pTypeInfo->lpVtbl->GetContainingTypeLib(pTypeInfo,
                                                 &pTypeLib,
                                                 &index);
    OLE_RELEASE(pTypeInfo);
    if (FAILED(hr))
        return hr;

    if (!pitf) {
        hr = pTypeLib->lpVtbl->GetTypeInfoOfGuid(pTypeLib,
                                                 piid,
                                                 ppTypeInfo);
        OLE_RELEASE(pTypeLib);
        return hr;
    }
    count = pTypeLib->lpVtbl->GetTypeInfoCount(pTypeLib);
    for (index = 0; index < count; index++) {
        hr = pTypeLib->lpVtbl->GetTypeInfo(pTypeLib,
                                           index,
                                           &pTypeInfo);
        if (FAILED(hr))
            break;
        hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);

        if(FAILED(hr)) {
            OLE_RELEASE(pTypeInfo);
            break;
        }
        if(pTypeAttr->typekind == TKIND_COCLASS) {
            for (type = 0; type < pTypeAttr->cImplTypes; type++) {
                hr = pTypeInfo->lpVtbl->GetRefTypeOfImplType(pTypeInfo,
                                                             type,
                                                             &RefType);
                if (FAILED(hr))
                    break;
                hr = pTypeInfo->lpVtbl->GetRefTypeInfo(pTypeInfo,
                                                       RefType,
                                                       &pImplTypeInfo);
                if (FAILED(hr))
                    break;

                hr = pImplTypeInfo->lpVtbl->GetDocumentation(pImplTypeInfo,
                                                             -1,
                                                             &bstr,
                                                             NULL, NULL, NULL);
                if (FAILED(hr)) {
                    OLE_RELEASE(pImplTypeInfo);
                    break;
                }
                pstr = ole_wc2mb(bstr);
                if (strcmp(pitf, pstr) == 0) {
                    hr = pImplTypeInfo->lpVtbl->GetTypeAttr(pImplTypeInfo,
                                                            &pImplTypeAttr);
                    if (SUCCEEDED(hr)) {
                        is_found = TRUE;
                        *piid = pImplTypeAttr->guid;
                        if (ppTypeInfo) {
                            *ppTypeInfo = pImplTypeInfo;
                            (*ppTypeInfo)->lpVtbl->AddRef((*ppTypeInfo));
                        }
                        pImplTypeInfo->lpVtbl->ReleaseTypeAttr(pImplTypeInfo,
                                                               pImplTypeAttr);
                    }
                }
                free(pstr);
                OLE_RELEASE(pImplTypeInfo);
                if (is_found || FAILED(hr))
                    break;
            }
        }

        OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
        OLE_RELEASE(pTypeInfo);
        if (is_found || FAILED(hr))
            break;
    }
    OLE_RELEASE(pTypeLib);
    if(!is_found)
        return E_NOINTERFACE;
    return hr;
}

static HRESULT
find_default_source(ole, piid, ppTypeInfo)
    VALUE ole;
    IID *piid;
    ITypeInfo **ppTypeInfo;
{
    HRESULT hr;
    IProvideClassInfo2 *pProvideClassInfo2;
    IProvideClassInfo *pProvideClassInfo;

    IDispatch *pDispatch;
    ITypeInfo *pTypeInfo;
    TYPEATTR *pTypeAttr;
    int i;
    int iFlags;
    HREFTYPE hRefType;

    struct oledata *pole;

    OLEData_Get_Struct(ole, pole);
    pDispatch = pole->pDispatch;
    hr = pDispatch->lpVtbl->QueryInterface(pDispatch,
                                           &IID_IProvideClassInfo2,
                                           (void**)&pProvideClassInfo2);
    if (SUCCEEDED(hr)) {
        hr = pProvideClassInfo2->lpVtbl->GetGUID(pProvideClassInfo2,
                                                 GUIDKIND_DEFAULT_SOURCE_DISP_IID,
                                                 piid);
        OLE_RELEASE(pProvideClassInfo2);
        return find_iid(ole, NULL, piid, ppTypeInfo);
    }
    hr = pDispatch->lpVtbl->QueryInterface(pDispatch,
                                           &IID_IProvideClassInfo,
                                           (void**)&pProvideClassInfo);
    if (FAILED(hr))
        return hr;

    hr = pProvideClassInfo->lpVtbl->GetClassInfo(pProvideClassInfo,
                                                 &pTypeInfo);
    OLE_RELEASE(pProvideClassInfo);
    if (FAILED(hr))
        return hr;

    hr = OLE_GET_TYPEATTR(pTypeInfo, &pTypeAttr);
    if (FAILED(hr)) {
        OLE_RELEASE(pTypeInfo);
        return hr;
    }
    /* Enumerate all implemented types of the COCLASS */
    for (i = 0; i < pTypeAttr->cImplTypes; i++) {
        hr = pTypeInfo->lpVtbl->GetImplTypeFlags(pTypeInfo, i, &iFlags);
        if (FAILED(hr))
            continue;

        /*
           looking for the [default] [source]
           we just hope that it is a dispinterface :-)
        */
        if ((iFlags & IMPLTYPEFLAG_FDEFAULT) &&
            (iFlags & IMPLTYPEFLAG_FSOURCE)) {

            hr = pTypeInfo->lpVtbl->GetRefTypeOfImplType(pTypeInfo,
                                                         i, &hRefType);
            if (FAILED(hr))
                continue;
            hr = pTypeInfo->lpVtbl->GetRefTypeInfo(pTypeInfo,
                                                   hRefType, ppTypeInfo);
            if (SUCCEEDED(hr))
                break;
        }
    }

    OLE_RELEASE_TYPEATTR(pTypeInfo, pTypeAttr);
    OLE_RELEASE(pTypeInfo);

    /* Now that would be a bad surprise, if we didn't find it, wouldn't it? */
    if (!*ppTypeInfo) {
        if (SUCCEEDED(hr))
            hr = E_UNEXPECTED;
        return hr;
    }

    /* Determine IID of default source interface */
    hr = (*ppTypeInfo)->lpVtbl->GetTypeAttr(*ppTypeInfo, &pTypeAttr);
    if (SUCCEEDED(hr)) {
        *piid = pTypeAttr->guid;
        (*ppTypeInfo)->lpVtbl->ReleaseTypeAttr(*ppTypeInfo, pTypeAttr);
    }
    else
        OLE_RELEASE(*ppTypeInfo);

    return hr;

}

static void
ole_event_free(poleev)
    struct oleeventdata *poleev;
{
    ITypeInfo *pti = NULL;
    IConnectionPoint *pcp = NULL;

    if (poleev->freed == 1) {
        return;
    }
    if(poleev->pEvent) {
        pti = poleev->pEvent->pTypeInfo;
        if(pti) OLE_RELEASE(pti);
        pcp = poleev->pEvent->pConnectionPoint;
        if(pcp) {
            pcp->lpVtbl->Unadvise(pcp, poleev->pEvent->m_dwCookie);
            OLE_RELEASE(pcp);
        }
    }
}

static VALUE fev_s_allocate _((VALUE));
static VALUE
fev_s_allocate(klass)
    VALUE klass;
{
    VALUE obj;
    struct oleeventdata *poleev;
    obj = Data_Make_Struct(klass,struct oleeventdata,0,ole_event_free,poleev);
    poleev->pEvent = NULL;
    return obj;
}

/*
 *  call-seq:
 *     WIN32OLE_EVENT.new(ole, event) #=> WIN32OLE_EVENT object.
 *
 *  Returns OLE event object.
 *  The first argument specifies WIN32OLE object.
 *  The second argument specifies OLE event name.
 *     ie = WIN32OLE.new('InternetExplorer.Application')
 *     ev = WIN32OLE_EVENT.new(ie, 'DWebBrowserEvents')
 */
static VALUE
fev_initialize(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    VALUE ole, itf;
    struct oledata *pole;
    char *pitf;
    HRESULT hr;
    IID iid;
    ITypeInfo *pTypeInfo;
    IDispatch *pDispatch;
    IConnectionPointContainer *pContainer;
    IConnectionPoint *pConnectionPoint;
    IEVENTSINKOBJ *pIEV;
    DWORD dwCookie;
    struct oleeventdata *poleev;

    rb_secure(4);
    rb_scan_args(argc, argv, "11", &ole, &itf);

    if (!rb_obj_is_kind_of(ole, cWIN32OLE)) {
        rb_raise(rb_eTypeError, "1st parameter must be WIN32OLE object");
    }

    if(TYPE(itf) != T_NIL) {
        if (ruby_safe_level > 0 && OBJ_TAINTED(itf)) {
            rb_raise(rb_eSecurityError, "Insecure Event Creation - %s",
                     StringValuePtr(itf));
        }
        Check_SafeStr(itf);
        pitf = StringValuePtr(itf);
        hr = find_iid(ole, pitf, &iid, &pTypeInfo);
    }
    else {
        hr = find_default_source(ole, &iid, &pTypeInfo);
    }
    if (FAILED(hr)) {
        ole_raise(hr, rb_eRuntimeError, "interface not found");
    }

    OLEData_Get_Struct(ole, pole);
    pDispatch = pole->pDispatch;
    hr = pDispatch->lpVtbl->QueryInterface(pDispatch,
                                           &IID_IConnectionPointContainer,
                                           (void **)&pContainer);
    if (FAILED(hr)) {
        OLE_RELEASE(pTypeInfo);
        ole_raise(hr, rb_eRuntimeError,
                  "failed to query IConnectionPointContainer");
    }

    hr = pContainer->lpVtbl->FindConnectionPoint(pContainer,
                                                 &iid,
                                                 &pConnectionPoint);
    OLE_RELEASE(pContainer);
    if (FAILED(hr)) {
        OLE_RELEASE(pTypeInfo);
        ole_raise(hr, rb_eRuntimeError, "failed to query IConnectionPoint");
    }
    pIEV = EVENTSINK_Constructor();
    pIEV->m_iid = iid;
    hr = pConnectionPoint->lpVtbl->Advise(pConnectionPoint,
                                          (IUnknown*)pIEV,
                                          &dwCookie);
    if (FAILED(hr)) {
        ole_raise(hr, rb_eRuntimeError, "Advise Error");
    }

    Data_Get_Struct(self, struct oleeventdata, poleev);
    poleev->pEvent = pIEV;
    poleev->pEvent->m_event_id
        = NUM2INT(rb_funcall(ary_ole_event, rb_intern("length"), 0));
    poleev->pEvent->pConnectionPoint = pConnectionPoint;
    poleev->pEvent->pTypeInfo = pTypeInfo;
    poleev->pEvent->m_dwCookie = dwCookie;
    poleev->freed = 0;
    poleev->pEvent->ptr_freed = &(poleev->freed);
    rb_ary_push(ary_ole_event, self);
    return self;
}

/*
 *  call-seq:
 *     WIN32OLE_EVENT.message_loop
 *
 *  Translates and dispatches Windows message.
 */
static VALUE
fev_s_msg_loop(klass)
    VALUE klass;
{
    ole_msg_loop();
    return Qnil;
}

static void
add_event_call_back(obj, event, data)
    VALUE obj;
    VALUE event;
    VALUE data;
{
    long at;
    VALUE events = rb_ivar_get(obj, id_events);
    if (NIL_P(events) || TYPE(events) != T_ARRAY) {
        events = rb_ary_new();
        rb_ivar_set(obj, id_events, events);
    }
    at = ole_search_event_at(events, event);
    if (at >= -1) {
        rb_ary_delete_at(events, at);
    }
    rb_ary_push(events, data);
}

static VALUE
ev_on_event(argc, argv, self, is_ary_arg)
    int argc;
    VALUE *argv;
    VALUE self;
    VALUE is_ary_arg;
{
    VALUE event, args, data;
    rb_scan_args(argc, argv, "01*", &event, &args);
    if(!NIL_P(event)) {
        Check_SafeStr(event);
    }
    data = rb_ary_new3(4, rb_block_proc(), event, args, is_ary_arg);
    add_event_call_back(self, event, data);
    return Qnil;
}

/*
 *  call-seq:
 *     WIN32OLE_EVENT#on_event([event]){...}
 *
 *  Defines the callback event.
 *  If argument is omitted, this method defines the callback of all events.
 *    ie = WIN32OLE.new('InternetExplorer.Application')
 *    ev = WIN32OLE_EVENT.new(ie, 'DWebBrowserEvents')
 *    ev.on_event("NavigateComplete") {|url| puts url}
 */
static VALUE
fev_on_event(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    return ev_on_event(argc, argv, self, Qfalse);
}

/*
 *  call-seq:
 *     WIN32OLE_EVENT#on_event_with_outargs([event]){...}
 *
 *  Defines the callback of event.
 *  If you want modify argument in callback,
 *  you should use this method instead of WIN32OLE_EVENT#on_event.
 */
static VALUE
fev_on_event_with_outargs(argc, argv, self)
    int argc;
    VALUE *argv;
    VALUE self;
{
    return ev_on_event(argc, argv, self, Qtrue);
}

static void
olevariant_free(pvar)
    struct olevariantdata *pvar;
{
    VariantClear(&(pvar->realvar));
    VariantClear(&(pvar->var));
}

static VALUE folevariant_s_allocate _((VALUE));
static VALUE
folevariant_s_allocate(klass)
    VALUE klass;
{
    struct olevariantdata *pvar;
    VALUE obj;
    ole_initialize();
    obj = Data_Make_Struct(klass,struct olevariantdata,0,olevariant_free,pvar);
    VariantInit(&(pvar->var));
    VariantInit(&(pvar->realvar));
    return obj;
}

static VALUE
folevariant_initialize(self, args)
    VALUE self;
    VALUE args;
{
    long len = 0;
    VARIANT var;
    VALUE val;
    VALUE vvt;
    VARTYPE vt;
    struct olevariantdata *pvar;

    len = RARRAY(args)->len;
    if (len < 1 || len > 3) {
        rb_raise(rb_eArgError, "wrong number of arguments (%d for 1..3)", len);
    }
    VariantInit(&var);
    val = rb_ary_entry(args, 0);
    Data_Get_Struct(self, struct olevariantdata, pvar);
    if (len == 1) {
        ole_val2variant(val, &(pvar->var));
    } else {
        vvt = rb_ary_entry(args, 1);
        vt = NUM2INT(vvt);
        ole_val2olevariantdata(val, vt, pvar);
    }
    return self;
}

static VALUE
folevariant_value(self)
    VALUE self;
{
    struct olevariantdata *pvar;
    VALUE val = Qnil;
    Data_Get_Struct(self, struct olevariantdata, pvar);
    val = ole_variant2val(&(pvar->var));
    return val;
}

void
Init_win32ole()
{
    rb_global_variable(&ary_ole_event);
    ary_ole_event = rb_ary_new();
    id_events = rb_intern("events");

    com_vtbl.QueryInterface = QueryInterface;
    com_vtbl.AddRef = AddRef;
    com_vtbl.Release = Release;
    com_vtbl.GetTypeInfoCount = GetTypeInfoCount;
    com_vtbl.GetTypeInfo = GetTypeInfo;
    com_vtbl.GetIDsOfNames = GetIDsOfNames;
    com_vtbl.Invoke = Invoke;
    rb_global_variable(&com_hash);
    com_hash = Data_Wrap_Struct(rb_cData, rb_mark_hash, st_free_table, st_init_numtable());

    cWIN32OLE = rb_define_class("WIN32OLE", rb_cObject);

    rb_define_alloc_func(cWIN32OLE, fole_s_allocate);

    rb_define_method(cWIN32OLE, "initialize", fole_initialize, -1);

    rb_define_singleton_method(cWIN32OLE, "connect", fole_s_connect, -1);
    rb_define_singleton_method(cWIN32OLE, "const_load", fole_s_const_load, -1);

    rb_define_singleton_method(cWIN32OLE, "ole_free", fole_s_free, 1);
    rb_define_singleton_method(cWIN32OLE, "ole_reference_count", fole_s_reference_count, 1);
    rb_define_singleton_method(cWIN32OLE, "ole_show_help", fole_s_show_help, -1);
    rb_define_singleton_method(cWIN32OLE, "codepage", fole_s_get_code_page, 0);
    rb_define_singleton_method(cWIN32OLE, "codepage=", fole_s_set_code_page, 1);

    rb_define_method(cWIN32OLE, "invoke", fole_invoke, -1);
    rb_define_method(cWIN32OLE, "[]", fole_getproperty, 1);
    rb_define_method(cWIN32OLE, "_invoke", fole_invoke2, 3);
    rb_define_method(cWIN32OLE, "_getproperty", fole_getproperty2, 3);
    rb_define_method(cWIN32OLE, "_setproperty", fole_setproperty2, 3);

    /* support propput method that takes an argument */
    rb_define_method(cWIN32OLE, "[]=", fole_setproperty, -1);

    rb_define_method(cWIN32OLE, "ole_free", fole_free, 0);

    rb_define_method(cWIN32OLE, "each", fole_each, 0);
    rb_define_method(cWIN32OLE, "method_missing", fole_missing, -1);

    /* support setproperty method much like Perl ;-) */
    rb_define_method(cWIN32OLE, "setproperty", fole_setproperty, -1);

    rb_define_method(cWIN32OLE, "ole_methods", fole_methods, 0);
    rb_define_method(cWIN32OLE, "ole_get_methods", fole_get_methods, 0);
    rb_define_method(cWIN32OLE, "ole_put_methods", fole_put_methods, 0);
    rb_define_method(cWIN32OLE, "ole_func_methods", fole_func_methods, 0);

    rb_define_method(cWIN32OLE, "ole_method", fole_method_help, 1);
    rb_define_alias(cWIN32OLE, "ole_method_help", "ole_method");
    rb_define_method(cWIN32OLE, "ole_type", fole_type, 0);
    rb_define_alias(cWIN32OLE, "ole_obj_help", "ole_type");
    rb_define_method(cWIN32OLE, "ole_typelib", fole_typelib, 0);

    rb_define_const(cWIN32OLE, "VERSION", rb_str_new2(WIN32OLE_VERSION));
    rb_define_const(cWIN32OLE, "ARGV", rb_ary_new());
    rb_define_const(cWIN32OLE, "CP_ACP"       ,INT2FIX(CP_ACP));
    rb_define_const(cWIN32OLE, "CP_OEMCP"     ,INT2FIX(CP_OEMCP));
    rb_define_const(cWIN32OLE, "CP_MACCP"     ,INT2FIX(CP_MACCP));
    rb_define_const(cWIN32OLE, "CP_THREAD_ACP",INT2FIX(CP_THREAD_ACP));
    rb_define_const(cWIN32OLE, "CP_SYMBOL"    ,INT2FIX(CP_SYMBOL));
    rb_define_const(cWIN32OLE, "CP_UTF7"      ,INT2FIX(CP_UTF7));
    rb_define_const(cWIN32OLE, "CP_UTF8"      ,INT2FIX(CP_UTF8));

    mWIN32OLE_VARIANT = rb_define_module_under(cWIN32OLE, "VARIANT");
    rb_define_const(mWIN32OLE_VARIANT, "VT_I2", INT2FIX(VT_I2));
    rb_define_const(mWIN32OLE_VARIANT, "VT_I4", INT2FIX(VT_I4));
    rb_define_const(mWIN32OLE_VARIANT, "VT_R4", INT2FIX(VT_R4));
    rb_define_const(mWIN32OLE_VARIANT, "VT_R8", INT2FIX(VT_R8));
    rb_define_const(mWIN32OLE_VARIANT, "VT_CY", INT2FIX(VT_CY));
    rb_define_const(mWIN32OLE_VARIANT, "VT_DATE", INT2FIX(VT_DATE));
    rb_define_const(mWIN32OLE_VARIANT, "VT_BSTR", INT2FIX(VT_BSTR));
    rb_define_const(mWIN32OLE_VARIANT, "VT_USERDEFINED", INT2FIX(VT_USERDEFINED));
    rb_define_const(mWIN32OLE_VARIANT, "VT_PTR", INT2FIX(VT_PTR));
    rb_define_const(mWIN32OLE_VARIANT, "VT_DISPATCH", INT2FIX(VT_DISPATCH));
    rb_define_const(mWIN32OLE_VARIANT, "VT_ERROR", INT2FIX(VT_ERROR));
    rb_define_const(mWIN32OLE_VARIANT, "VT_BOOL", INT2FIX(VT_BOOL));
    rb_define_const(mWIN32OLE_VARIANT, "VT_VARIANT", INT2FIX(VT_VARIANT));
    rb_define_const(mWIN32OLE_VARIANT, "VT_UNKNOWN", INT2FIX(VT_UNKNOWN));
    rb_define_const(mWIN32OLE_VARIANT, "VT_I1", INT2FIX(VT_I1));
    rb_define_const(mWIN32OLE_VARIANT, "VT_UI1", INT2FIX(VT_UI1));
    rb_define_const(mWIN32OLE_VARIANT, "VT_UI2", INT2FIX(VT_UI2));
    rb_define_const(mWIN32OLE_VARIANT, "VT_UI4", INT2FIX(VT_UI4));
    rb_define_const(mWIN32OLE_VARIANT, "VT_INT", INT2FIX(VT_INT));
    rb_define_const(mWIN32OLE_VARIANT, "VT_UINT", INT2FIX(VT_UINT));
    rb_define_const(mWIN32OLE_VARIANT, "VT_ARRAY", INT2FIX(VT_ARRAY));
    rb_define_const(mWIN32OLE_VARIANT, "VT_BYREF", INT2FIX(VT_BYREF));

    cWIN32OLE_TYPELIB = rb_define_class("WIN32OLE_TYPELIB", rb_cObject);
    rb_define_singleton_method(cWIN32OLE_TYPELIB, "typelibs", foletypelib_s_typelibs, 0);
    rb_define_method(cWIN32OLE_TYPELIB, "initialize", foletypelib_initialize, -2);
    rb_define_method(cWIN32OLE_TYPELIB, "guid", foletypelib_guid, 0);
    rb_define_method(cWIN32OLE_TYPELIB, "name", foletypelib_name, 0);
    rb_define_method(cWIN32OLE_TYPELIB, "version", foletypelib_version, 0);
    rb_define_method(cWIN32OLE_TYPELIB, "major_version", foletypelib_major_version, 0);
    rb_define_method(cWIN32OLE_TYPELIB, "minor_version", foletypelib_minor_version, 0);
    rb_define_method(cWIN32OLE_TYPELIB, "path", foletypelib_path, 0);
    rb_define_method(cWIN32OLE_TYPELIB, "ole_classes", foletypelib_ole_classes, 0);
    rb_define_alias(cWIN32OLE_TYPELIB, "to_s", "name");

    cWIN32OLE_TYPE = rb_define_class("WIN32OLE_TYPE", rb_cObject);
    rb_define_singleton_method(cWIN32OLE_TYPE, "ole_classes", foletype_s_ole_classes, 1);
    rb_define_singleton_method(cWIN32OLE_TYPE, "typelibs", foletype_s_typelibs, 0);
    rb_define_singleton_method(cWIN32OLE_TYPE, "progids", foletype_s_progids, 0);
    rb_define_alloc_func(cWIN32OLE_TYPE, foletype_s_allocate);
    rb_define_method(cWIN32OLE_TYPE, "initialize", foletype_initialize, 2);
    rb_define_method(cWIN32OLE_TYPE, "name", foletype_name, 0);
    rb_define_method(cWIN32OLE_TYPE, "ole_type", foletype_ole_type, 0);
    rb_define_method(cWIN32OLE_TYPE, "guid", foletype_guid, 0);
    rb_define_method(cWIN32OLE_TYPE, "progid", foletype_progid, 0);
    rb_define_method(cWIN32OLE_TYPE, "visible?", foletype_visible, 0);
    rb_define_alias(cWIN32OLE_TYPE, "to_s", "name");

    rb_define_method(cWIN32OLE_TYPE, "major_version", foletype_major_version, 0);
    rb_define_method(cWIN32OLE_TYPE, "minor_version", foletype_minor_version, 0);
    rb_define_method(cWIN32OLE_TYPE, "typekind", foletype_typekind, 0);
    rb_define_method(cWIN32OLE_TYPE, "helpstring", foletype_helpstring, 0);
    rb_define_method(cWIN32OLE_TYPE, "src_type", foletype_src_type, 0);
    rb_define_method(cWIN32OLE_TYPE, "helpfile", foletype_helpfile, 0);
    rb_define_method(cWIN32OLE_TYPE, "helpcontext", foletype_helpcontext, 0);
    rb_define_method(cWIN32OLE_TYPE, "variables", foletype_variables, 0);
    rb_define_method(cWIN32OLE_TYPE, "ole_methods", foletype_methods, -1);
    rb_define_method(cWIN32OLE_TYPE, "ole_typelib", foletype_ole_typelib, 0);
    rb_define_method(cWIN32OLE_TYPE, "implemented_ole_types", foletype_impl_ole_types, 0);

    cWIN32OLE_VARIABLE = rb_define_class("WIN32OLE_VARIABLE", rb_cObject);
    rb_define_method(cWIN32OLE_VARIABLE, "name", folevariable_name, 0);
    rb_define_method(cWIN32OLE_VARIABLE, "ole_type", folevariable_ole_type, 0);
    rb_define_method(cWIN32OLE_VARIABLE, "ole_type_detail", folevariable_ole_type_detail, 0);
    rb_define_method(cWIN32OLE_VARIABLE, "value", folevariable_value, 0);
    rb_define_method(cWIN32OLE_VARIABLE, "visible?", folevariable_visible, 0);
    rb_define_method(cWIN32OLE_VARIABLE, "variable_kind", folevariable_variable_kind, 0);
    rb_define_method(cWIN32OLE_VARIABLE, "varkind", folevariable_varkind, 0);
    rb_define_alias(cWIN32OLE_VARIABLE, "to_s", "name");

    cWIN32OLE_METHOD = rb_define_class("WIN32OLE_METHOD", rb_cObject);
    rb_define_alloc_func(cWIN32OLE_METHOD, folemethod_s_allocate);
    rb_define_method(cWIN32OLE_METHOD, "initialize", folemethod_initialize, 2);

    rb_define_method(cWIN32OLE_METHOD, "name", folemethod_name, 0);
    rb_define_method(cWIN32OLE_METHOD, "return_type", folemethod_return_type, 0);
    rb_define_method(cWIN32OLE_METHOD, "return_vtype", folemethod_return_vtype, 0);
    rb_define_method(cWIN32OLE_METHOD, "return_type_detail", folemethod_return_type_detail, 0);
    rb_define_method(cWIN32OLE_METHOD, "invoke_kind", folemethod_invoke_kind, 0);
    rb_define_method(cWIN32OLE_METHOD, "invkind", folemethod_invkind, 0);
    rb_define_method(cWIN32OLE_METHOD, "visible?", folemethod_visible, 0);
    rb_define_method(cWIN32OLE_METHOD, "event?", folemethod_event, 0);
    rb_define_method(cWIN32OLE_METHOD, "event_interface", folemethod_event_interface, 0);
    rb_define_method(cWIN32OLE_METHOD, "helpstring", folemethod_helpstring, 0);
    rb_define_method(cWIN32OLE_METHOD, "helpfile", folemethod_helpfile, 0);
    rb_define_method(cWIN32OLE_METHOD, "helpcontext", folemethod_helpcontext, 0);
    rb_define_method(cWIN32OLE_METHOD, "dispid", folemethod_dispid, 0);
    rb_define_method(cWIN32OLE_METHOD, "offset_vtbl", folemethod_offset_vtbl, 0);
    rb_define_method(cWIN32OLE_METHOD, "size_params", folemethod_size_params, 0);
    rb_define_method(cWIN32OLE_METHOD, "size_opt_params", folemethod_size_opt_params, 0);
    rb_define_method(cWIN32OLE_METHOD, "params", folemethod_params, 0);
    rb_define_alias(cWIN32OLE_METHOD, "to_s", "name");

    cWIN32OLE_PARAM = rb_define_class("WIN32OLE_PARAM", rb_cObject);
    rb_define_method(cWIN32OLE_PARAM, "name", foleparam_name, 0);
    rb_define_method(cWIN32OLE_PARAM, "ole_type", foleparam_ole_type, 0);
    rb_define_method(cWIN32OLE_PARAM, "ole_type_detail", foleparam_ole_type_detail, 0);
    rb_define_method(cWIN32OLE_PARAM, "input?", foleparam_input, 0);
    rb_define_method(cWIN32OLE_PARAM, "output?", foleparam_output, 0);
    rb_define_method(cWIN32OLE_PARAM, "optional?", foleparam_optional, 0);
    rb_define_method(cWIN32OLE_PARAM, "retval?", foleparam_retval, 0);
    rb_define_method(cWIN32OLE_PARAM, "default", foleparam_default, 0);
    rb_define_alias(cWIN32OLE_PARAM, "to_s", "name");

    cWIN32OLE_EVENT = rb_define_class("WIN32OLE_EVENT", rb_cObject);

    rb_define_alloc_func(cWIN32OLE_EVENT, fev_s_allocate);
    rb_define_method(cWIN32OLE_EVENT, "initialize", fev_initialize, -1);
    rb_define_singleton_method(cWIN32OLE_EVENT, "message_loop", fev_s_msg_loop, 0);

    rb_define_method(cWIN32OLE_EVENT, "on_event", fev_on_event, -1);
    rb_define_method(cWIN32OLE_EVENT, "on_event_with_outargs", fev_on_event_with_outargs, -1);

    cWIN32OLE_VARIANT = rb_define_class("WIN32OLE_VARIANT", rb_cObject);
    rb_define_alloc_func(cWIN32OLE_VARIANT, folevariant_s_allocate);
    rb_define_method(cWIN32OLE_VARIANT, "initialize", folevariant_initialize, -2);
    rb_define_method(cWIN32OLE_VARIANT, "value", folevariant_value, 0);

    eWIN32OLE_RUNTIME_ERROR = rb_define_class("WIN32OLERuntimeError", rb_eRuntimeError);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


ext/zlib/zlib.c

root/ext/zlib/zlib.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. raise_zlib_error
  2. rb_zlib_version
  3. do_checksum
  4. rb_zlib_adler32
  5. rb_zlib_crc32
  6. rb_zlib_crc_table
  7. zlib_mem_alloc
  8. zlib_mem_free
  9. zstream_init
  10. zstream_expand_buffer
  11. zstream_expand_buffer_into
  12. zstream_append_buffer
  13. zstream_detach_buffer
  14. zstream_shift_buffer
  15. zstream_buffer_ungetc
  16. zstream_append_input
  17. zstream_discard_input
  18. zstream_reset_input
  19. zstream_passthrough_input
  20. zstream_detach_input
  21. zstream_reset
  22. zstream_end
  23. zstream_run
  24. zstream_sync
  25. zstream_mark
  26. zstream_free
  27. zstream_new
  28. get_zstream
  29. rb_zstream_end
  30. rb_zstream_reset
  31. rb_zstream_finish
  32. rb_zstream_flush_next_in
  33. rb_zstream_flush_next_out
  34. rb_zstream_avail_out
  35. rb_zstream_set_avail_out
  36. rb_zstream_avail_in
  37. rb_zstream_total_in
  38. rb_zstream_total_out
  39. rb_zstream_data_type
  40. rb_zstream_adler
  41. rb_zstream_finished_p
  42. rb_zstream_closed_p
  43. rb_deflate_s_allocate
  44. rb_deflate_initialize
  45. rb_deflate_init_copy
  46. deflate_run
  47. rb_deflate_s_deflate
  48. do_deflate
  49. rb_deflate_deflate
  50. rb_deflate_addstr
  51. rb_deflate_flush
  52. rb_deflate_params
  53. rb_deflate_set_dictionary
  54. rb_inflate_s_allocate
  55. rb_inflate_initialize
  56. inflate_run
  57. rb_inflate_s_inflate
  58. do_inflate
  59. rb_inflate_inflate
  60. rb_inflate_addstr
  61. rb_inflate_sync
  62. rb_inflate_sync_point_p
  63. rb_inflate_set_dictionary
  64. gzfile_mark
  65. gzfile_free
  66. gzfile_new
  67. gzfile_reset
  68. gzfile_close
  69. gzfile_write_raw
  70. gzfile_read_raw_partial
  71. gzfile_read_raw_rescue
  72. gzfile_read_raw
  73. gzfile_read_raw_ensure
  74. gzfile_read_raw_until_zero
  75. gzfile_get16
  76. gzfile_get32
  77. gzfile_set32
  78. gzfile_make_header
  79. gzfile_make_footer
  80. gzfile_read_header
  81. gzfile_check_footer
  82. gzfile_write
  83. gzfile_read_more
  84. gzfile_calc_crc
  85. gzfile_read
  86. gzfile_readpartial
  87. gzfile_read_all
  88. gzfile_ungetc
  89. gzfile_finalize
  90. gzfile_writer_end
  91. gzfile_reader_end
  92. gzfile_reader_rewind
  93. gzfile_reader_get_unused
  94. get_gzfile
  95. gzfile_ensure_close
  96. rb_gzfile_s_wrap
  97. gzfile_s_open
  98. rb_gzfile_to_io
  99. rb_gzfile_crc
  100. rb_gzfile_mtime
  101. rb_gzfile_level
  102. rb_gzfile_os_code
  103. rb_gzfile_orig_name
  104. rb_gzfile_comment
  105. rb_gzfile_lineno
  106. rb_gzfile_set_lineno
  107. rb_gzfile_set_mtime
  108. rb_gzfile_set_orig_name
  109. rb_gzfile_set_comment
  110. rb_gzfile_close
  111. rb_gzfile_finish
  112. rb_gzfile_closed_p
  113. rb_gzfile_eof_p
  114. rb_gzfile_sync
  115. rb_gzfile_set_sync
  116. rb_gzfile_total_in
  117. rb_gzfile_total_out
  118. rb_gzwriter_s_allocate
  119. rb_gzwriter_s_open
  120. rb_gzwriter_initialize
  121. rb_gzwriter_flush
  122. rb_gzwriter_write
  123. rb_gzwriter_putc
  124. rb_gzreader_s_allocate
  125. rb_gzreader_s_open
  126. rb_gzreader_initialize
  127. rb_gzreader_rewind
  128. rb_gzreader_unused
  129. rb_gzreader_read
  130. rb_gzreader_readpartial
  131. rb_gzreader_getc
  132. rb_gzreader_readchar
  133. rb_gzreader_each_byte
  134. rb_gzreader_ungetc
  135. gzreader_skip_linebreaks
  136. rscheck
  137. gzreader_gets
  138. rb_gzreader_gets
  139. rb_gzreader_readline
  140. rb_gzreader_each
  141. rb_gzreader_readlines
  142. Init_zlib
/*
 * zlib.c - An interface for zlib.
 *
 *   Copyright (C) UENO Katsuhiro 2000-2003
 *
 * $Id: zlib.c,v 1.29 2005/12/14 16:37:24 akr Exp $
 */

#include <ruby.h>
#include <zlib.h>
#include <time.h>

#define RUBY_ZLIB_VERSION  "0.6.0"

#define OBJ_IS_FREED(val)  (RBASIC(val)->flags == 0)

#ifndef GZIP_SUPPORT
#define GZIP_SUPPORT  1
#endif

/* from zutil.h */
#ifndef DEF_MEM_LEVEL
#if MAX_MEM_LEVEL >= 8
#define DEF_MEM_LEVEL  8
#else
#define DEF_MEM_LEVEL  MAX_MEM_LEVEL
#endif
#endif

/*--------- Prototypes --------*/

static NORETURN(void raise_zlib_error _((int, const char *)));
static VALUE rb_zlib_version _((VALUE));
static VALUE do_checksum _((int, VALUE*, uLong (*) _((uLong, const Bytef*, uInt))));
static VALUE rb_zlib_adler32 _((int, VALUE*, VALUE));
static VALUE rb_zlib_crc32 _((int, VALUE*, VALUE));
static VALUE rb_zlib_crc_table _((VALUE));
static voidpf zlib_mem_alloc _((voidpf, uInt, uInt));
static void zlib_mem_free _((voidpf, voidpf));

struct zstream;
struct zstream_funcs;
static void zstream_init _((struct zstream*, const struct zstream_funcs *));
static void zstream_expand_buffer _((struct zstream*));
static void zstream_expand_buffer_into _((struct zstream*, int));
static void zstream_append_buffer _((struct zstream*, const char*, int));
static VALUE zstream_detach_buffer _((struct zstream*));
static VALUE zstream_shift_buffer _((struct zstream*, int));
static void zstream_buffer_ungetc _((struct zstream*, int));
static void zstream_append_input _((struct zstream*, const char*, unsigned int));
static void zstream_discard_input _((struct zstream*, unsigned int));
static void zstream_reset_input _((struct zstream*));
static void zstream_passthrough_input _((struct zstream*));
static VALUE zstream_detach_input _((struct zstream*));
static void zstream_reset _((struct zstream*));
static VALUE zstream_end _((struct zstream*));
static void zstream_run _((struct zstream*, Bytef*, uInt, int));
static VALUE zstream_sync _((struct zstream*, Bytef*, uInt));
static void zstream_mark _((struct zstream*));
static void zstream_free _((struct zstream*));
static VALUE zstream_new _((VALUE, const struct zstream_funcs*));
static struct zstream *get_zstream _((VALUE));

static VALUE rb_zstream_end _((VALUE));
static VALUE rb_zstream_reset _((VALUE));
static VALUE rb_zstream_finish _((VALUE));
static VALUE rb_zstream_flush_next_in _((VALUE));
static VALUE rb_zstream_flush_next_out _((VALUE));
static VALUE rb_zstream_avail_out _((VALUE));
static VALUE rb_zstream_set_avail_out _((VALUE, VALUE));
static VALUE rb_zstream_avail_in _((VALUE));
static VALUE rb_zstream_total_in _((VALUE));
static VALUE rb_zstream_total_out _((VALUE));
static VALUE rb_zstream_data_type _((VALUE));
static VALUE rb_zstream_adler _((VALUE));
static VALUE rb_zstream_finished_p _((VALUE));
static VALUE rb_zstream_closed_p _((VALUE));

static VALUE rb_deflate_s_allocate _((VALUE));
static VALUE rb_deflate_initialize _((int, VALUE*, VALUE));
static VALUE rb_deflate_init_copy _((VALUE, VALUE));
static VALUE deflate_run _((VALUE));
static VALUE rb_deflate_s_deflate _((int, VALUE*, VALUE));
static void do_deflate _((struct zstream*, VALUE, int));
static VALUE rb_deflate_deflate _((int, VALUE*, VALUE));
static VALUE rb_deflate_addstr _((VALUE, VALUE));
static VALUE rb_deflate_flush _((int, VALUE*, VALUE));
static VALUE rb_deflate_params _((VALUE, VALUE, VALUE));
static VALUE rb_deflate_set_dictionary _((VALUE, VALUE));

static VALUE inflate_run _((VALUE));
static VALUE rb_inflate_s_allocate _((VALUE));
static VALUE rb_inflate_initialize _((int, VALUE*, VALUE));
static VALUE rb_inflate_s_inflate _((VALUE, VALUE));
static void do_inflate _((struct zstream*, VALUE));
static VALUE rb_inflate_inflate _((VALUE, VALUE));
static VALUE rb_inflate_addstr _((VALUE, VALUE));
static VALUE rb_inflate_sync _((VALUE, VALUE));
static VALUE rb_inflate_sync_point_p _((VALUE));
static VALUE rb_inflate_set_dictionary _((VALUE, VALUE));

#if GZIP_SUPPORT
struct gzfile;
static void gzfile_mark _((struct gzfile*));
static void gzfile_free _((struct gzfile*));
static VALUE gzfile_new _((VALUE, const struct zstream_funcs*, void (*) _((struct gzfile*))));
static void gzfile_reset _((struct gzfile*));
static void gzfile_close _((struct gzfile*, int));
static void gzfile_write_raw _((struct gzfile*));
static VALUE gzfile_read_raw_partial _((VALUE));
static VALUE gzfile_read_raw_rescue _((VALUE));
static VALUE gzfile_read_raw _((struct gzfile*));
static int gzfile_read_raw_ensure _((struct gzfile*, int));
static char *gzfile_read_raw_until_zero _((struct gzfile*, long));
static unsigned int gzfile_get16 _((const unsigned char*));
static unsigned long gzfile_get32 _((const unsigned char*));
static void gzfile_set32 _((unsigned long n, unsigned char*));
static void gzfile_make_header _((struct gzfile*));
static void gzfile_make_footer _((struct gzfile*));
static void gzfile_read_header _((struct gzfile*));
static void gzfile_check_footer _((struct gzfile*));
static void gzfile_write _((struct gzfile*, Bytef*, uInt));
static long gzfile_read_more _((struct gzfile*));
static void gzfile_calc_crc _((struct gzfile*, VALUE));
static VALUE gzfile_read _((struct gzfile*, int));
static VALUE gzfile_read_all _((struct gzfile*));
static void gzfile_ungetc _((struct gzfile*, int));
static VALUE gzfile_finalize _((VALUE));
static void gzfile_writer_end _((struct gzfile*));
static void gzfile_reader_end _((struct gzfile*));
static void gzfile_reader_rewind _((struct gzfile*));
static VALUE gzfile_reader_get_unused _((struct gzfile*));
static struct gzfile *get_gzfile _((VALUE));
static VALUE gzfile_ensure_close _((VALUE));
static VALUE rb_gzfile_s_wrap _((int, VALUE*, VALUE));
static VALUE gzfile_s_open _((int, VALUE*, VALUE, const char*));

static VALUE rb_gzfile_to_io _((VALUE));
static VALUE rb_gzfile_crc _((VALUE));
static VALUE rb_gzfile_mtime _((VALUE));
static VALUE rb_gzfile_level _((VALUE));
static VALUE rb_gzfile_os_code _((VALUE));
static VALUE rb_gzfile_orig_name _((VALUE));
static VALUE rb_gzfile_comment _((VALUE));
static VALUE rb_gzfile_lineno _((VALUE));
static VALUE rb_gzfile_set_lineno _((VALUE, VALUE));
static VALUE rb_gzfile_set_mtime _((VALUE, VALUE));
static VALUE rb_gzfile_set_orig_name _((VALUE, VALUE));
static VALUE rb_gzfile_set_comment _((VALUE, VALUE));
static VALUE rb_gzfile_close _((VALUE));
static VALUE rb_gzfile_finish _((VALUE));
static VALUE rb_gzfile_closed_p _((VALUE));
static VALUE rb_gzfile_eof_p _((VALUE));
static VALUE rb_gzfile_sync _((VALUE));
static VALUE rb_gzfile_set_sync _((VALUE, VALUE));
static VALUE rb_gzfile_total_in _((VALUE));
static VALUE rb_gzfile_total_out _((VALUE));

static VALUE rb_gzwriter_s_allocate _((VALUE));
static VALUE rb_gzwriter_s_open _((int, VALUE*, VALUE));
static VALUE rb_gzwriter_initialize _((int, VALUE*, VALUE));
static VALUE rb_gzwriter_flush _((int, VALUE*, VALUE));
static VALUE rb_gzwriter_write _((VALUE, VALUE));
static VALUE rb_gzwriter_putc _((VALUE, VALUE));

static VALUE rb_gzreader_s_allocate _((VALUE));
static VALUE rb_gzreader_s_open _((int, VALUE*, VALUE));
static VALUE rb_gzreader_initialize _((VALUE, VALUE));
static VALUE rb_gzreader_rewind _((VALUE));
static VALUE rb_gzreader_unused _((VALUE));
static VALUE rb_gzreader_read _((int, VALUE*, VALUE));
static VALUE rb_gzreader_getc _((VALUE));
static VALUE rb_gzreader_readchar _((VALUE));
static VALUE rb_gzreader_each_byte _((VALUE));
static VALUE rb_gzreader_ungetc _((VALUE, VALUE));
static void gzreader_skip_linebreaks _((struct gzfile*));
static VALUE gzreader_gets _((int, VALUE*, VALUE));
static VALUE rb_gzreader_gets _((int, VALUE*, VALUE));
static VALUE rb_gzreader_readline _((int, VALUE*, VALUE));
static VALUE rb_gzreader_each _((int, VALUE*, VALUE));
static VALUE rb_gzreader_readlines _((int, VALUE*, VALUE));
#endif /* GZIP_SUPPORT */

void Init_zlib _((void));

/*--------- Exceptions --------*/

static VALUE cZError, cStreamEnd, cNeedDict;
static VALUE cStreamError, cDataError, cMemError, cBufError, cVersionError;

static void
raise_zlib_error(err, msg)
    int err;
    const char *msg;
{
    VALUE exc;

    if (!msg) {
        msg = zError(err);
    }

    switch(err) {
      case Z_STREAM_END:
        exc = rb_exc_new2(cStreamEnd, msg);
        break;
      case Z_NEED_DICT:
        exc = rb_exc_new2(cNeedDict, msg);
        break;
      case Z_STREAM_ERROR:
        exc = rb_exc_new2(cStreamError, msg);
        break;
      case Z_DATA_ERROR:
        exc = rb_exc_new2(cDataError, msg);
        break;
      case Z_BUF_ERROR:
        exc = rb_exc_new2(cBufError, msg);
        break;
      case Z_VERSION_ERROR:
        exc = rb_exc_new2(cVersionError, msg);
        break;
      case Z_MEM_ERROR:
        exc = rb_exc_new2(cMemError, msg);
        break;
      case Z_ERRNO:
        rb_sys_fail(msg);
        /* no return */
      default:
      {
          char buf[BUFSIZ];
          snprintf(buf, BUFSIZ, "unknown zlib error %d: %s", err, msg);
          exc = rb_exc_new2(cZError, buf);
      }
    }

    rb_exc_raise(exc);
}

/*-------- module Zlib --------*/

/*
 * Returns the string which represents the version of zlib library.
 */
static VALUE
rb_zlib_version(klass)
    VALUE klass;
{
    VALUE str;

    str = rb_str_new2(zlibVersion());
    OBJ_TAINT(str);  /* for safe */
    return str;
}

static VALUE
do_checksum(argc, argv, func)
    int argc;
    VALUE *argv;
    uLong (*func) _((uLong, const Bytef *, uInt));
{
    VALUE str, vsum;
    unsigned long sum;

    rb_scan_args(argc, argv, "02", &str, &vsum);

    if (!NIL_P(vsum)) {
        sum = NUM2ULONG(vsum);
    }
    else if (NIL_P(str)) {
        sum = 0;
    }
    else {
        sum = func(0, Z_NULL, 0);
    }

    if (NIL_P(str)) {
        sum = func(sum, Z_NULL, 0);
    }
    else {
        StringValue(str);
        sum = func(sum, RSTRING(str)->ptr, RSTRING(str)->len);
    }
    return rb_uint2inum(sum);
}

/*
 * call-seq: Zlib.adler32(string, adler)
 *
 * Calculates Alder-32 checksum for +string+, and returns updated value of
 * +adler+. If +string+ is omitted, it returns the Adler-32 initial value. If
 * +adler+ is omitted, it assumes that the initial value is given to +adler+.
 *
 * FIXME: expression.
 */
static VALUE
rb_zlib_adler32(argc, argv, klass)
    int argc;
    VALUE *argv;
    VALUE klass;
{
    return do_checksum(argc, argv, adler32);
}

/*
 * call-seq: Zlib.crc32(string, adler)
 *
 * Calculates CRC checksum for +string+, and returns updated value of +crc+. If
 * +string+ is omitted, it returns the CRC initial value. If +crc+ is omitted, it
 * assumes that the initial value is given to +crc+.
 *
 * FIXME: expression.
 */
static VALUE
rb_zlib_crc32(argc, argv, klass)
    int argc;
    VALUE *argv;
    VALUE klass;
{
    return do_checksum(argc, argv, crc32);
}

/*
 * Returns the table for calculating CRC checksum as an array.
 */
static VALUE
rb_zlib_crc_table(obj)
    VALUE obj;
{
    const unsigned long *crctbl;
    VALUE dst;
    int i;

    crctbl = get_crc_table();
    dst = rb_ary_new2(256);

    for (i = 0; i < 256; i++) {
        rb_ary_push(dst, rb_uint2inum(crctbl[i]));
    }
    return dst;
}

/*-------- zstream - internal APIs --------*/

struct zstream {
    unsigned long flags;
    VALUE buf;
    long buf_filled;
    VALUE input;
    z_stream stream;
    const struct zstream_funcs {
        int (*reset) _((z_streamp));
        int (*end) _((z_streamp));
        int (*run) _((z_streamp, int));
    } *func;
};

#define ZSTREAM_FLAG_READY      0x1
#define ZSTREAM_FLAG_IN_STREAM  0x2
#define ZSTREAM_FLAG_FINISHED   0x4
#define ZSTREAM_FLAG_FINALIZE   0x8
#define ZSTREAM_FLAG_CLOSED     0x10
#define ZSTREAM_FLAG_UNUSED     0x20

#define ZSTREAM_READY(z)       ((z)->flags |= ZSTREAM_FLAG_READY)
#define ZSTREAM_IS_READY(z)    ((z)->flags & ZSTREAM_FLAG_READY)
#define ZSTREAM_IS_FINISHED(z) ((z)->flags & ZSTREAM_FLAG_FINISHED)
#define ZSTREAM_IS_FINALIZE(z) ((z)->flags & ZSTREAM_FLAG_FINALIZE)
#define ZSTREAM_IS_CLOSED(z)   ((z)->flags & ZSTREAM_FLAG_CLOSED)

/* I think that more better value should be found,
   but I gave up finding it. B) */
#define ZSTREAM_INITIAL_BUFSIZE       1024
#define ZSTREAM_AVAIL_OUT_STEP_MAX   16384
#define ZSTREAM_AVAIL_OUT_STEP_MIN    2048

static const struct zstream_funcs deflate_funcs = {
    deflateReset, deflateEnd, deflate,
};

static const struct zstream_funcs inflate_funcs = {
    inflateReset, inflateEnd, inflate,
};

static voidpf
zlib_mem_alloc(opaque, items, size)
    voidpf opaque;
    uInt items, size;
{
    return xmalloc(items * size);
}

static void
zlib_mem_free(opaque, address)
    voidpf opaque, address;
{
    free(address);
}

static void
zstream_init(z, func)
    struct zstream *z;
    const struct zstream_funcs *func;
{
    z->flags = 0;
    z->buf = Qnil;
    z->buf_filled = 0;
    z->input = Qnil;
    z->stream.zalloc = zlib_mem_alloc;
    z->stream.zfree = zlib_mem_free;
    z->stream.opaque = Z_NULL;
    z->stream.msg = Z_NULL;
    z->stream.next_in = Z_NULL;
    z->stream.avail_in = 0;
    z->stream.next_out = Z_NULL;
    z->stream.avail_out = 0;
    z->func = func;
}

#define zstream_init_deflate(z)   zstream_init((z), &deflate_funcs)
#define zstream_init_inflate(z)   zstream_init((z), &inflate_funcs)

static void
zstream_expand_buffer(z)
    struct zstream *z;
{
    long inc;

    if (NIL_P(z->buf)) {
            /* I uses rb_str_new here not rb_str_buf_new because
               rb_str_buf_new makes a zero-length string. */
        z->buf = rb_str_new(0, ZSTREAM_INITIAL_BUFSIZE);
        z->buf_filled = 0;
        z->stream.next_out = RSTRING(z->buf)->ptr;
        z->stream.avail_out = ZSTREAM_INITIAL_BUFSIZE;
        RBASIC(z->buf)->klass = 0;
        return;
    }

    if (RSTRING(z->buf)->len - z->buf_filled >= ZSTREAM_AVAIL_OUT_STEP_MAX) {
        /* to keep other threads from freezing */
        z->stream.avail_out = ZSTREAM_AVAIL_OUT_STEP_MAX;
    }
    else {
        inc = z->buf_filled / 2;
        if (inc < ZSTREAM_AVAIL_OUT_STEP_MIN) {
            inc = ZSTREAM_AVAIL_OUT_STEP_MIN;
        }
        rb_str_resize(z->buf, z->buf_filled + inc);
        z->stream.avail_out = (inc < ZSTREAM_AVAIL_OUT_STEP_MAX) ?
            inc : ZSTREAM_AVAIL_OUT_STEP_MAX;
    }
    z->stream.next_out = RSTRING(z->buf)->ptr + z->buf_filled;
}

static void
zstream_expand_buffer_into(z, size)
    struct zstream *z;
    int size;
{
    if (NIL_P(z->buf)) {
        /* I uses rb_str_new here not rb_str_buf_new because
           rb_str_buf_new makes a zero-length string. */
        z->buf = rb_str_new(0, size);
        z->buf_filled = 0;
        z->stream.next_out = RSTRING(z->buf)->ptr;
        z->stream.avail_out = size;
        RBASIC(z->buf)->klass = 0;
    }
    else if (z->stream.avail_out != size) {
        rb_str_resize(z->buf, z->buf_filled + size);
        z->stream.next_out = RSTRING(z->buf)->ptr + z->buf_filled;
        z->stream.avail_out = size;
    }
}

static void
zstream_append_buffer(z, src, len)
    struct zstream *z;
    const char *src;
    int len;
{
    if (NIL_P(z->buf)) {
        z->buf = rb_str_buf_new(len);
        rb_str_buf_cat(z->buf, src, len);
        z->buf_filled = len;
        z->stream.next_out = RSTRING(z->buf)->ptr;
        z->stream.avail_out = 0;
        RBASIC(z->buf)->klass = 0;
        return;
    }

    if (RSTRING(z->buf)->len < z->buf_filled + len) {
        rb_str_resize(z->buf, z->buf_filled + len);
        z->stream.avail_out = 0;
    }
    else {
        if (z->stream.avail_out >= len) {
            z->stream.avail_out -= len;
        }
        else {
            z->stream.avail_out = 0;
        }
    }
    memcpy(RSTRING(z->buf)->ptr + z->buf_filled, src, len);
    z->buf_filled += len;
    z->stream.next_out = RSTRING(z->buf)->ptr + z->buf_filled;
}

#define zstream_append_buffer2(z,v) \
    zstream_append_buffer((z),RSTRING(v)->ptr,RSTRING(v)->len)

static VALUE
zstream_detach_buffer(z)
    struct zstream *z;
{
    VALUE dst;

    if (NIL_P(z->buf)) {
        dst = rb_str_new(0, 0);
    }
    else {
        dst = z->buf;
        rb_str_resize(dst, z->buf_filled);
        RBASIC(dst)->klass = rb_cString;
    }

    z->buf = Qnil;
    z->buf_filled = 0;
    z->stream.next_out = 0;
    z->stream.avail_out = 0;
    return dst;
}

static VALUE
zstream_shift_buffer(z, len)
    struct zstream *z;
    int len;
{
    VALUE dst;

    if (z->buf_filled <= len) {
        return zstream_detach_buffer(z);
    }

    dst = rb_str_substr(z->buf, 0, len);
    RBASIC(dst)->klass = rb_cString;
    z->buf_filled -= len;
    memmove(RSTRING(z->buf)->ptr, RSTRING(z->buf)->ptr + len,
            z->buf_filled);
    z->stream.next_out = RSTRING(z->buf)->ptr + z->buf_filled;
    z->stream.avail_out = RSTRING(z->buf)->len - z->buf_filled;
    if (z->stream.avail_out > ZSTREAM_AVAIL_OUT_STEP_MAX) {
        z->stream.avail_out = ZSTREAM_AVAIL_OUT_STEP_MAX;
    }

    return dst;
}

static void
zstream_buffer_ungetc(z, c)
    struct zstream *z;
    int c;
{
    if (NIL_P(z->buf) || RSTRING(z->buf)->len - z->buf_filled == 0) {
        zstream_expand_buffer(z);
    }

    memmove(RSTRING(z->buf)->ptr + 1, RSTRING(z->buf)->ptr, z->buf_filled);
    RSTRING(z->buf)->ptr[0] = (char)c;
    z->buf_filled++;
    if (z->stream.avail_out > 0) {
        z->stream.next_out++;
        z->stream.avail_out--;
    }
}

static void
zstream_append_input(z, src, len)
    struct zstream *z;
    const char *src;
    unsigned int len;
{
    if (len <= 0) return;

    if (NIL_P(z->input)) {
        z->input = rb_str_buf_new(len);
        rb_str_buf_cat(z->input, src, len);
        RBASIC(z->input)->klass = 0;
    }
    else {
        rb_str_buf_cat(z->input, src, len);
    }
}

#define zstream_append_input2(z,v)\
    zstream_append_input((z), RSTRING(v)->ptr, RSTRING(v)->len)

static void
zstream_discard_input(z, len)
    struct zstream *z;
    unsigned int len;
{
    if (NIL_P(z->input) || RSTRING(z->input)->len <= len) {
        z->input = Qnil;
    }
    else {
        memmove(RSTRING(z->input)->ptr, RSTRING(z->input)->ptr + len,
                RSTRING(z->input)->len - len);
        rb_str_resize(z->input, RSTRING(z->input)->len - len);
    }
}

static void
zstream_reset_input(z)
    struct zstream *z;
{
    z->input = Qnil;
}

static void
zstream_passthrough_input(z)
    struct zstream *z;
{
    if (!NIL_P(z->input)) {
        zstream_append_buffer2(z, z->input);
        z->input = Qnil;
    }
}

static VALUE
zstream_detach_input(z)
    struct zstream *z;
{
    VALUE dst;

    if (NIL_P(z->input)) {
        dst = rb_str_new(0, 0);
    }
    else {
        dst = z->input;
        RBASIC(dst)->klass = rb_cString;
    }
    z->input = Qnil;
    RBASIC(dst)->klass = rb_cString;
    return dst;
}

static void
zstream_reset(z)
    struct zstream *z;
{
    int err;

    err = z->func->reset(&z->stream);
    if (err != Z_OK && !ZSTREAM_IS_FINALIZE(z)) {
        raise_zlib_error(err, z->stream.msg);
    }
    z->flags = ZSTREAM_FLAG_READY;
    z->buf = Qnil;
    z->buf_filled = 0;
    z->stream.next_out = 0;
    z->stream.avail_out = 0;
    zstream_reset_input(z);
}

static VALUE
zstream_end(z)
    struct zstream *z;
{
    int err;

    if (!ZSTREAM_IS_READY(z) && !ZSTREAM_IS_FINALIZE(z)) {
        if (RTEST(ruby_debug)) {
            rb_warning("attempt to close uninitialized zstream; ignored.");
        }
        return Qnil;
    }
    if (z->flags & ZSTREAM_FLAG_IN_STREAM) {
        if (RTEST(ruby_debug)) {
            rb_warning("attempt to close unfinished zstream; reset forced.");
        }
        zstream_reset(z);
    }

    zstream_reset_input(z);
    err = z->func->end(&z->stream);
    if (err != Z_OK && !ZSTREAM_IS_FINALIZE(z)) {
        raise_zlib_error(err, z->stream.msg);
    }
    z->flags = 0;
    return Qnil;
}

static void
zstream_run(z, src, len, flush)
    struct zstream *z;
    Bytef *src;
    uInt len;
    int flush;
{
    uInt n;
    int err;
    volatile VALUE guard;

    if (NIL_P(z->input) && len == 0) {
        z->stream.next_in = "";
        z->stream.avail_in = 0;
    }
    else {
        zstream_append_input(z, src, len);
        z->stream.next_in = RSTRING(z->input)->ptr;
        z->stream.avail_in = RSTRING(z->input)->len;
        /* keep reference to `z->input' so as not to be garbage collected
           after zstream_reset_input() and prevent `z->stream.next_in'
           from dangling. */
        guard = z->input;
    }

    if (z->stream.avail_out == 0) {
        zstream_expand_buffer(z);
    }

    for (;;) {
        n = z->stream.avail_out;
        err = z->func->run(&z->stream, flush);
        z->buf_filled += n - z->stream.avail_out;
        rb_thread_schedule();

        if (err == Z_STREAM_END) {
            z->flags &= ~ZSTREAM_FLAG_IN_STREAM;
            z->flags |= ZSTREAM_FLAG_FINISHED;
            break;
        }
        if (err != Z_OK) {
            if (flush != Z_FINISH && err == Z_BUF_ERROR
                && z->stream.avail_out > 0) {
                z->flags |= ZSTREAM_FLAG_IN_STREAM;
                break;
            }
            zstream_reset_input(z);
            if (z->stream.avail_in > 0) {
                zstream_append_input(z, z->stream.next_in, z->stream.avail_in);
            }
            raise_zlib_error(err, z->stream.msg);
        }
        if (z->stream.avail_out > 0) {
            z->flags |= ZSTREAM_FLAG_IN_STREAM;
            break;
        }
        zstream_expand_buffer(z);
    }

    zstream_reset_input(z);
    if (z->stream.avail_in > 0) {
        zstream_append_input(z, z->stream.next_in, z->stream.avail_in);
        guard = Qnil; /* prevent tail call to make guard effective */
    }
}

static VALUE
zstream_sync(z, src, len)
    struct zstream *z;
    Bytef *src;
    uInt len;
{
    VALUE rest;
    int err;

    if (!NIL_P(z->input)) {
        z->stream.next_in = RSTRING(z->input)->ptr;
        z->stream.avail_in = RSTRING(z->input)->len;
        err = inflateSync(&z->stream);
        if (err == Z_OK) {
            zstream_discard_input(z,
                                  RSTRING(z->input)->len - z->stream.avail_in);
            zstream_append_input(z, src, len);
            return Qtrue;
        }
        zstream_reset_input(z);
        if (err != Z_DATA_ERROR) {
            rest = rb_str_new(z->stream.next_in, z->stream.avail_in);
            raise_zlib_error(err, z->stream.msg);
        }
    }

    if (len <= 0) return Qfalse;

    z->stream.next_in = src;
    z->stream.avail_in = len;
    err = inflateSync(&z->stream);
    if (err == Z_OK) {
        zstream_append_input(z, z->stream.next_in, z->stream.avail_in);
        return Qtrue;
    }
    if (err != Z_DATA_ERROR) {
        rest = rb_str_new(z->stream.next_in, z->stream.avail_in);
        raise_zlib_error(err, z->stream.msg);
    }
    return Qfalse;
}

static void
zstream_mark(z)
    struct zstream *z;
{
    rb_gc_mark(z->buf);
    rb_gc_mark(z->input);
}

static void
zstream_free(z)
    struct zstream *z;
{
    z->flags |= ZSTREAM_FLAG_FINALIZE;
    zstream_end(z);
    free(z);
}

static VALUE
zstream_new(klass, funcs)
    VALUE klass;
    const struct zstream_funcs *funcs;
{
    VALUE obj;
    struct zstream *z;

    obj = Data_Make_Struct(klass, struct zstream,
                           zstream_mark, zstream_free, z);
    zstream_init(z, funcs);
    return obj;
}

#define zstream_deflate_new(klass)  zstream_new((klass), &deflate_funcs)
#define zstream_inflate_new(klass)  zstream_new((klass), &inflate_funcs)

static struct zstream *
get_zstream(obj)
    VALUE obj;
{
    struct zstream *z;

    Data_Get_Struct(obj, struct zstream, z);
    if (!ZSTREAM_IS_READY(z)) {
        rb_raise(cZError, "stream is not ready");
    }
    return z;
}

/* ------------------------------------------------------------------------- */

/*
 * Document-class: Zlib::ZStream
 *
 * Zlib::ZStream is the abstract class for the stream which handles the
 * compressed data. The operations are defined in the subclasses:
 * Zlib::Deflate for compression, and Zlib::Inflate for decompression.
 *
 * An instance of Zlib::ZStream has one stream (struct zstream in the source)
 * and two variable-length buffers which associated to the input (next_in) of
 * the stream and the output (next_out) of the stream. In this document,
 * "input buffer" means the buffer for input, and "output buffer" means the
 * buffer for output.
 *
 * Data input into an instance of Zlib::ZStream are temporally stored into
 * the end of input buffer, and then data in input buffer are processed from
 * the beginning of the buffer until no more output from the stream is
 * produced (i.e. until avail_out > 0 after processing).  During processing,
 * output buffer is allocated and expanded automatically to hold all output
 * data.
 *
 * Some particular instance methods consume the data in output buffer and
 * return them as a String.
 *
 * Here is an ascii art for describing above:
 *
 *    +================ an instance of Zlib::ZStream ================+
 *    ||                                                            ||
 *    ||     +--------+          +-------+          +--------+      ||
 *    ||  +--| output |<---------|zstream|<---------| input  |<--+  ||
 *    ||  |  | buffer |  next_out+-------+next_in   | buffer |   |  ||
 *    ||  |  +--------+                             +--------+   |  ||
 *    ||  |                                                      |  ||
 *    +===|======================================================|===+
 *        |                                                      |
 *        v                                                      |
 *    "output data"                                         "input data"
 *
 * If an error occurs during processing input buffer, an exception which is a
 * subclass of Zlib::Error is raised.  At that time, both input and output
 * buffer keep their conditions at the time when the error occurs.
 *
 * == Method Catalogue
 *
 * Many of the methods in this class are fairly low-level and unlikely to be
 * of interest to users.  In fact, users are unlikely to use this class
 * directly; rather they will be interested in Zlib::Inflate and
 * Zlib::Deflate.
 *
 * The higher level methods are listed below.
 *
 * - #total_in
 * - #total_out
 * - #data_type
 * - #adler
 * - #reset
 * - #finish
 * - #finished?
 * - #close
 * - #closed?
 */

/*
 * Closes the stream. All operations on the closed stream will raise an
 * exception.
 */
static VALUE
rb_zstream_end(obj)
    VALUE obj;
{
    zstream_end(get_zstream(obj));
    return Qnil;
}

/*
 * Resets and initializes the stream. All data in both input and output buffer
 * are discarded.
 */
static VALUE
rb_zstream_reset(obj)
    VALUE obj;
{
    zstream_reset(get_zstream(obj));
    return Qnil;
}

/*
 * Finishes the stream and flushes output buffer. See Zlib::Deflate#finish and
 * Zlib::Inflate#finish for details of this behavior.
 */
static VALUE
rb_zstream_finish(obj)
    VALUE obj;
{
    struct zstream *z = get_zstream(obj);
    VALUE dst;

    zstream_run(z, "", 0, Z_FINISH);
    dst = zstream_detach_buffer(z);

    OBJ_INFECT(dst, obj);
    return dst;
}

/*
 * Flushes input buffer and returns all data in that buffer.
 */
static VALUE
rb_zstream_flush_next_in(obj)
    VALUE obj;
{
    struct zstream *z;
    VALUE dst;

    Data_Get_Struct(obj, struct zstream, z);
    dst = zstream_detach_input(z);
    OBJ_INFECT(dst, obj);
    return dst;
}

/*
 * Flushes output buffer and returns all data in that buffer.
 */
static VALUE
rb_zstream_flush_next_out(obj)
    VALUE obj;
{
    struct zstream *z;
    VALUE dst;

    Data_Get_Struct(obj, struct zstream, z);
    dst = zstream_detach_buffer(z);
    OBJ_INFECT(dst, obj);
    return dst;
}

/*
 * Returns number of bytes of free spaces in output buffer.  Because the free
 * space is allocated automatically, this method returns 0 normally.
 */
static VALUE
rb_zstream_avail_out(obj)
    VALUE obj;
{
    struct zstream *z;
    Data_Get_Struct(obj, struct zstream, z);
    return rb_uint2inum(z->stream.avail_out);
}

/*
 * Allocates +size+ bytes of free space in the output buffer. If there are more
 * than +size+ bytes already in the buffer, the buffer is truncated. Because
 * free space is allocated automatically, you usually don't need to use this
 * method.
 */
static VALUE
rb_zstream_set_avail_out(obj, size)
    VALUE obj, size;
{
    struct zstream *z = get_zstream(obj);

    Check_Type(size, T_FIXNUM);
    zstream_expand_buffer_into(z, FIX2INT(size));
    return size;
}

/*
 * Returns bytes of data in the input buffer. Normally, returns 0.
 */
static VALUE
rb_zstream_avail_in(obj)
    VALUE obj;
{
    struct zstream *z;
    Data_Get_Struct(obj, struct zstream, z);
    return INT2FIX(NIL_P(z->input) ? 0 : (int)(RSTRING(z->input)->len));
}

/*
 * Returns the total bytes of the input data to the stream.  FIXME
 */
static VALUE
rb_zstream_total_in(obj)
    VALUE obj;
{
    return rb_uint2inum(get_zstream(obj)->stream.total_in);
}

/*
 * Returns the total bytes of the output data from the stream.  FIXME
 */
static VALUE
rb_zstream_total_out(obj)
    VALUE obj;
{
    return rb_uint2inum(get_zstream(obj)->stream.total_out);
}

/*
 * Guesses the type of the data which have been inputed into the stream. The
 * returned value is either <tt>Zlib::BINARY</tt>, <tt>Zlib::ASCII</tt>, or
 * <tt>Zlib::UNKNOWN</tt>.
 */
static VALUE
rb_zstream_data_type(obj)
    VALUE obj;
{
    return INT2FIX(get_zstream(obj)->stream.data_type);
}

/*
 * Returns the adler-32 checksum.
 */
static VALUE
rb_zstream_adler(obj)
    VALUE obj;
{
        return rb_uint2inum(get_zstream(obj)->stream.adler);
}

/*
 * Returns true if the stream is finished.
 */
static VALUE
rb_zstream_finished_p(obj)
    VALUE obj;
{
    return ZSTREAM_IS_FINISHED(get_zstream(obj)) ? Qtrue : Qfalse;
}

/*
 * Returns true if the stream is closed.
 */
static VALUE
rb_zstream_closed_p(obj)
    VALUE obj;
{
    struct zstream *z;
    Data_Get_Struct(obj, struct zstream, z);
    return ZSTREAM_IS_READY(z) ? Qfalse : Qtrue;
}

/* ------------------------------------------------------------------------- */

/*
 * Document-class: Zlib::Deflate
 *
 * Zlib::Deflate is the class for compressing data.  See Zlib::Stream for more
 * information.
 */

#define FIXNUMARG(val, ifnil) \
    (NIL_P((val)) ? (ifnil) \
    : ((void)Check_Type((val), T_FIXNUM), FIX2INT((val))))

#define ARG_LEVEL(val)     FIXNUMARG((val), Z_DEFAULT_COMPRESSION)
#define ARG_WBITS(val)     FIXNUMARG((val), MAX_WBITS)
#define ARG_MEMLEVEL(val)  FIXNUMARG((val), DEF_MEM_LEVEL)
#define ARG_STRATEGY(val)  FIXNUMARG((val), Z_DEFAULT_STRATEGY)
#define ARG_FLUSH(val)     FIXNUMARG((val), Z_NO_FLUSH)

static VALUE
rb_deflate_s_allocate(klass)
    VALUE klass;
{
    return zstream_deflate_new(klass);
}

/*
 * call-seq: Zlib::Deflate.new(level=nil, windowBits=nil, memlevel=nil, strategy=nil)
 *
 * Creates a new deflate stream for compression. See zlib.h for details of
 * each argument. If an argument is nil, the default value of that argument is
 * used.
 *
 * TODO: document better!
 */
static VALUE
rb_deflate_initialize(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    struct zstream *z;
    VALUE level, wbits, memlevel, strategy;
    int err;

    rb_scan_args(argc, argv, "04", &level, &wbits, &memlevel, &strategy);
    Data_Get_Struct(obj, struct zstream, z);

    err = deflateInit2(&z->stream, ARG_LEVEL(level), Z_DEFLATED,
                       ARG_WBITS(wbits), ARG_MEMLEVEL(memlevel),
                       ARG_STRATEGY(strategy));
    if (err != Z_OK) {
        raise_zlib_error(err, z->stream.msg);
    }
    ZSTREAM_READY(z);

    return obj;
}

/*
 * Duplicates the deflate stream.
 */
static VALUE
rb_deflate_init_copy(self, orig)
    VALUE self, orig;
{
    struct zstream *z1 = get_zstream(self);
    struct zstream *z2 = get_zstream(orig);
    int err;

    err = deflateCopy(&z1->stream, &z2->stream);
    if (err != Z_OK) {
        raise_zlib_error(err, 0);
    }
    z1->flags = z2->flags;

    return self;
}

static VALUE
deflate_run(args)
    VALUE args;
{
    struct zstream *z = (struct zstream *)((VALUE *)args)[0];
    VALUE src = ((VALUE *)args)[1];

    zstream_run(z, RSTRING(src)->ptr, RSTRING(src)->len, Z_FINISH);
    return zstream_detach_buffer(z);
}

/*
 * call-seq: Zlib::Deflate.deflate(string[, level])
 *
 * Compresses the given +string+. Valid values of level are
 * <tt>Zlib::NO_COMPRESSION</tt>, <tt>Zlib::BEST_SPEED</tt>,
 * <tt>Zlib::BEST_COMPRESSION</tt>, <tt>Zlib::DEFAULT_COMPRESSION</tt>, and an
 * integer from 0 to 9.
 *
 * This method is almost equivalent to the following code:
 *
 *   def deflate(string, level)
 *     z = Zlib::Deflate.new(level)
 *     dst = z.deflate(string, Zlib::FINISH)
 *     z.close
 *     dst
 *   end
 *
 * TODO: what's default value of +level+?
 *
 */
static VALUE
rb_deflate_s_deflate(argc, argv, klass)
    int argc;
    VALUE *argv;
    VALUE klass;
{
    struct zstream z;
    VALUE src, level, dst, args[2];
    int err, lev;

    rb_scan_args(argc, argv, "11", &src, &level);

    lev = ARG_LEVEL(level);
    StringValue(src);
    zstream_init_deflate(&z);
    err = deflateInit(&z.stream, lev);
    if (err != Z_OK) {
        raise_zlib_error(err, z.stream.msg);
    }
    ZSTREAM_READY(&z);

    args[0] = (VALUE)&z;
    args[1] = src;
    dst = rb_ensure(deflate_run, (VALUE)args, zstream_end, (VALUE)&z);

    OBJ_INFECT(dst, src);
    return dst;
}

static void
do_deflate(z, src, flush)
    struct zstream *z;
    VALUE src;
    int flush;
{
    if (NIL_P(src)) {
        zstream_run(z, "", 0, Z_FINISH);
        return;
    }
    StringValue(src);
    if (flush != Z_NO_FLUSH || RSTRING(src)->len > 0) { /* prevent BUF_ERROR */
        zstream_run(z, RSTRING(src)->ptr, RSTRING(src)->len, flush);
    }
}

/*
 * call-seq: deflate(string[, flush])
 *
 * Inputs +string+ into the deflate stream and returns the output from the
 * stream.  On calling this method, both the input and the output buffers of
 * the stream are flushed. If +string+ is nil, this method finishes the
 * stream, just like Zlib::ZStream#finish.
 *
 * The value of +flush+ should be either <tt>Zlib::NO_FLUSH</tt>,
 * <tt>Zlib::SYNC_FLUSH</tt>, <tt>Zlib::FULL_FLUSH</tt>, or
 * <tt>Zlib::FINISH</tt>. See zlib.h for details.
 *
 * TODO: document better!
 */
static VALUE
rb_deflate_deflate(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    struct zstream *z = get_zstream(obj);
    VALUE src, flush, dst;

    rb_scan_args(argc, argv, "11", &src, &flush);
    OBJ_INFECT(obj, src);
    do_deflate(z, src, ARG_FLUSH(flush));
    dst = zstream_detach_buffer(z);

    OBJ_INFECT(dst, obj);
    return dst;
}

/*
 * call-seq: << string
 *
 * Inputs +string+ into the deflate stream just like Zlib::Deflate#deflate, but
 * returns the Zlib::Deflate object itself.  The output from the stream is
 * preserved in output buffer.
 */
static VALUE
rb_deflate_addstr(obj, src)
    VALUE obj, src;
{
    OBJ_INFECT(obj, src);
    do_deflate(get_zstream(obj), src, Z_NO_FLUSH);
    return obj;
}

/*
 * call-seq: flush(flush)
 *
 * This method is equivalent to <tt>deflate('', flush)</tt>.  If flush is omitted,
 * <tt>Zlib::SYNC_FLUSH</tt> is used as flush.  This method is just provided
 * to improve the readability of your Ruby program.
 *
 * TODO: document better!
 */
static VALUE
rb_deflate_flush(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    struct zstream *z = get_zstream(obj);
    VALUE v_flush, dst;
    int flush;

    rb_scan_args(argc, argv, "01", &v_flush);
    flush = FIXNUMARG(v_flush, Z_SYNC_FLUSH);
    if (flush != Z_NO_FLUSH) {  /* prevent Z_BUF_ERROR */
        zstream_run(z, "", 0, flush);
    }
    dst = zstream_detach_buffer(z);

    OBJ_INFECT(dst, obj);
    return dst;
}

/*
 * call-seq: params(level, strategy)
 *
 * Changes the parameters of the deflate stream. See zlib.h for details. The
 * output from the stream by changing the params is preserved in output
 * buffer.
 *
 * TODO: document better!
 */
static VALUE
rb_deflate_params(obj, v_level, v_strategy)
    VALUE obj, v_level, v_strategy;
{
    struct zstream *z = get_zstream(obj);
    int level, strategy;
    int err;

    level = ARG_LEVEL(v_level);
    strategy = ARG_STRATEGY(v_strategy);

    err = deflateParams(&z->stream, level, strategy);
    while (err == Z_BUF_ERROR) {
        if (RTEST(ruby_debug)) {
            rb_warning("deflateParams() returned Z_BUF_ERROR");
        }
        zstream_expand_buffer(z);
        err = deflateParams(&z->stream, level, strategy);
    }
    if (err != Z_OK) {
        raise_zlib_error(err, z->stream.msg);
    }

    return Qnil;
}

/*
 * call-seq: set_dictionary(string)
 *
 * Sets the preset dictionary and returns +string+. This method is available
 * just only after Zlib::Deflate.new or Zlib::ZStream#reset method was called.
 * See zlib.h for details.
 *
 * TODO: document better!
 */
static VALUE
rb_deflate_set_dictionary(obj, dic)
    VALUE obj, dic;
{
    struct zstream *z = get_zstream(obj);
    VALUE src = dic;
    int err;

    OBJ_INFECT(obj, dic);
    StringValue(src);
    err = deflateSetDictionary(&z->stream,
                               RSTRING(src)->ptr, RSTRING(src)->len);
    if (err != Z_OK) {
        raise_zlib_error(err, z->stream.msg);
    }

    return dic;
}

/* ------------------------------------------------------------------------- */

/*
 * Document-class: Zlib::Inflate
 *
 * Zlib:Inflate is the class for decompressing compressed data.  Unlike
 * Zlib::Deflate, an instance of this class is not able to duplicate (clone,
 * dup) itself.
 */

static VALUE
rb_inflate_s_allocate(klass)
    VALUE klass;
{
    return zstream_inflate_new(klass);
}

/*
 * call-seq: Zlib::Inflate.new(window_bits)
 *
 * Creates a new inflate stream for decompression. See zlib.h for details
 * of the argument.  If +window_bits+ is +nil+, the default value is used.
 *
 * TODO: document better!
 */
static VALUE
rb_inflate_initialize(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    struct zstream *z;
    VALUE wbits;
    int err;

    rb_scan_args(argc, argv, "01", &wbits);
    Data_Get_Struct(obj, struct zstream, z);

    err = inflateInit2(&z->stream, ARG_WBITS(wbits));
    if (err != Z_OK) {
        raise_zlib_error(err, z->stream.msg);
    }
    ZSTREAM_READY(z);

    return obj;
}

static VALUE
inflate_run(args)
    VALUE args;
{
    struct zstream *z = (struct zstream *)((VALUE *)args)[0];
    VALUE src = ((VALUE *)args)[1];

    zstream_run(z, RSTRING(src)->ptr, RSTRING(src)->len, Z_SYNC_FLUSH);
    zstream_run(z, "", 0, Z_FINISH);  /* for checking errors */
    return zstream_detach_buffer(z);
}

/*
 * call-seq: Zlib::Inflate.inflate(string)
 *
 * Decompresses +string+. Raises a Zlib::NeedDict exception if a preset
 * dictionary is needed for decompression.
 *
 * This method is almost equivalent to the following code:
 *
 *   def inflate(string)
 *     zstream = Zlib::Inflate.new
 *     buf = zstream.inflate(string)
 *     zstream.finish
 *     zstream.close
 *     buf
 *   end
 *
 */
static VALUE
rb_inflate_s_inflate(obj, src)
    VALUE obj, src;
{
    struct zstream z;
    VALUE dst, args[2];
    int err;

    StringValue(src);
    zstream_init_inflate(&z);
    err = inflateInit(&z.stream);
    if (err != Z_OK) {
        raise_zlib_error(err, z.stream.msg);
    }
    ZSTREAM_READY(&z);

    args[0] = (VALUE)&z;
    args[1] = src;
    dst = rb_ensure(inflate_run, (VALUE)args, zstream_end, (VALUE)&z);

    OBJ_INFECT(dst, src);
    return dst;
}

static void
do_inflate(z, src)
    struct zstream *z;
    VALUE src;
{
    if (NIL_P(src)) {
        zstream_run(z, "", 0, Z_FINISH);
        return;
    }
    StringValue(src);
    if (RSTRING(src)->len > 0) { /* prevent Z_BUF_ERROR */
        zstream_run(z, RSTRING(src)->ptr, RSTRING(src)->len, Z_SYNC_FLUSH);
    }
}

/*
 * call-seq: inflate(string)
 *
 * Inputs +string+ into the inflate stream and returns the output from the
 * stream.  Calling this method, both the input and the output buffer of the
 * stream are flushed.  If string is +nil+, this method finishes the stream,
 * just like Zlib::ZStream#finish.
 *
 * Raises a Zlib::NeedDict exception if a preset dictionary is needed to
 * decompress.  Set the dictionary by Zlib::Inflate#set_dictionary and then
 * call this method again with an empty string.  (<i>???</i>)
 *
 * TODO: document better!
 */
static VALUE
rb_inflate_inflate(obj, src)
    VALUE obj, src;
{
    struct zstream *z = get_zstream(obj);
    VALUE dst;

    OBJ_INFECT(obj, src);

    if (ZSTREAM_IS_FINISHED(z)) {
        if (NIL_P(src)) {
            dst = zstream_detach_buffer(z);
        }
        else {
            StringValue(src);
            zstream_append_buffer2(z, src);
            dst = rb_str_new(0, 0);
        }
    }
    else {
        do_inflate(z, src);
        dst = zstream_detach_buffer(z);
        if (ZSTREAM_IS_FINISHED(z)) {
            zstream_passthrough_input(z);
        }
    }

    OBJ_INFECT(dst, obj);
    return dst;
}

/*
 * call-seq: << string
 *
 * Inputs +string+ into the inflate stream just like Zlib::Inflate#inflate, but
 * returns the Zlib::Inflate object itself.  The output from the stream is
 * preserved in output buffer.
 */
static VALUE
rb_inflate_addstr(obj, src)
    VALUE obj, src;
{
    struct zstream *z = get_zstream(obj);

    OBJ_INFECT(obj, src);

    if (ZSTREAM_IS_FINISHED(z)) {
        if (!NIL_P(src)) {
            StringValue(src);
            zstream_append_buffer2(z, src);
        }
    }
    else {
        do_inflate(z, src);
        if (ZSTREAM_IS_FINISHED(z)) {
            zstream_passthrough_input(z);
        }
    }

    return obj;
}

/*
 * call-seq: sync(string)
 *
 * Inputs +string+ into the end of input buffer and skips data until a full
 * flush point can be found.  If the point is found in the buffer, this method
 * flushes the buffer and returns false.  Otherwise it returns +true+ and the
 * following data of full flush point is preserved in the buffer.
 */
static VALUE
rb_inflate_sync(obj, src)
    VALUE obj, src;
{
    struct zstream *z = get_zstream(obj);

    OBJ_INFECT(obj, src);
    StringValue(src);
    return zstream_sync(z, RSTRING(src)->ptr, RSTRING(src)->len);
}

/*
 * Quoted verbatim from original documentation:
 *
 *   What is this?
 *
 * <tt>:)</tt>
 */
static VALUE
rb_inflate_sync_point_p(obj)
    VALUE obj;
{
    struct zstream *z = get_zstream(obj);
    int err;

    err = inflateSyncPoint(&z->stream);
    if (err == 1) {
        return Qtrue;
    }
    if (err != Z_OK) {
        raise_zlib_error(err, z->stream.msg);
    }
    return Qfalse;
}

/*
 * Sets the preset dictionary and returns +string+.  This method is available just
 * only after a Zlib::NeedDict exception was raised.  See zlib.h for details.
 *
 * TODO: document better!
 */
static VALUE
rb_inflate_set_dictionary(obj, dic)
    VALUE obj, dic;
{
    struct zstream *z = get_zstream(obj);
    VALUE src = dic;
    int err;

    OBJ_INFECT(obj, dic);
    StringValue(src);
    err = inflateSetDictionary(&z->stream,
                               RSTRING(src)->ptr, RSTRING(src)->len);
    if (err != Z_OK) {
        raise_zlib_error(err, z->stream.msg);
    }

    return dic;
}

#if GZIP_SUPPORT

/* NOTE: Features for gzip files of Ruby/zlib are written from scratch
 *       and using undocumented feature of zlib, negative wbits.
 *       I don't think gzFile APIs of zlib are good for Ruby.
 */

/*------- .gz file header --------*/

#define GZ_MAGIC1             0x1f
#define GZ_MAGIC2             0x8b
#define GZ_METHOD_DEFLATE     8
#define GZ_FLAG_MULTIPART     0x2
#define GZ_FLAG_EXTRA         0x4
#define GZ_FLAG_ORIG_NAME     0x8
#define GZ_FLAG_COMMENT       0x10
#define GZ_FLAG_ENCRYPT       0x20
#define GZ_FLAG_UNKNOWN_MASK  0xc0

#define GZ_EXTRAFLAG_FAST     0x4
#define GZ_EXTRAFLAG_SLOW     0x2

/* from zutil.h */
#define OS_MSDOS    0x00
#define OS_AMIGA    0x01
#define OS_VMS      0x02
#define OS_UNIX     0x03
#define OS_ATARI    0x05
#define OS_OS2      0x06
#define OS_MACOS    0x07
#define OS_TOPS20   0x0a
#define OS_WIN32    0x0b

#define OS_VMCMS    0x04
#define OS_ZSYSTEM  0x08
#define OS_CPM      0x09
#define OS_QDOS     0x0c
#define OS_RISCOS   0x0d
#define OS_UNKNOWN  0xff

#ifndef OS_CODE
#define OS_CODE  OS_UNIX
#endif

static ID id_write, id_read, id_readpartial, id_flush, id_seek, id_close;
static VALUE cGzError, cNoFooter, cCRCError, cLengthError;

/*-------- gzfile internal APIs --------*/

struct gzfile {
    struct zstream z;
    VALUE io;
    int level;
    time_t mtime;       /* for header */
    int os_code;        /* for header */
    VALUE orig_name;    /* for header; must be a String */
    VALUE comment;      /* for header; must be a String */
    unsigned long crc;
    int lineno;
    int ungetc;
    void (*end)(struct gzfile *);
};

#define GZFILE_FLAG_SYNC             ZSTREAM_FLAG_UNUSED
#define GZFILE_FLAG_HEADER_FINISHED  (ZSTREAM_FLAG_UNUSED << 1)
#define GZFILE_FLAG_FOOTER_FINISHED  (ZSTREAM_FLAG_UNUSED << 2)

#define GZFILE_IS_FINISHED(gz) \
    (ZSTREAM_IS_FINISHED(&gz->z) && (gz)->z.buf_filled == 0)

#define GZFILE_READ_SIZE  2048

static void
gzfile_mark(gz)
    struct gzfile *gz;
{
    rb_gc_mark(gz->io);
    rb_gc_mark(gz->orig_name);
    rb_gc_mark(gz->comment);
    zstream_mark(&gz->z);
}

static void
gzfile_free(gz)
    struct gzfile *gz;
{
    gz->z.flags |= ZSTREAM_FLAG_FINALIZE;
    if (ZSTREAM_IS_READY(&gz->z)) {
        gz->end(gz);
    }
    free(gz);
}

static VALUE
gzfile_new(klass, funcs, endfunc)
    VALUE klass;
    const struct zstream_funcs *funcs;
    void (*endfunc) _((struct gzfile *));
{
    VALUE obj;
    struct gzfile *gz;

    obj = Data_Make_Struct(klass, struct gzfile, gzfile_mark, gzfile_free, gz);
    zstream_init(&gz->z, funcs);
    gz->io = Qnil;
    gz->level = 0;
    gz->mtime = 0;
    gz->os_code = OS_CODE;
    gz->orig_name = Qnil;
    gz->comment = Qnil;
    gz->crc = crc32(0, Z_NULL, 0);
    gz->lineno = 0;
    gz->ungetc = 0;
    gz->end = endfunc;

    return obj;
}

#define gzfile_writer_new(gz) gzfile_new((gz),&deflate_funcs,gzfile_writer_end)
#define gzfile_reader_new(gz) gzfile_new((gz),&inflate_funcs,gzfile_reader_end)

static void
gzfile_reset(gz)
    struct gzfile *gz;
{
    zstream_reset(&gz->z);
    gz->crc = crc32(0, Z_NULL, 0);
    gz->lineno = 0;
    gz->ungetc = 0;
}

static void
gzfile_close(gz, closeflag)
    struct gzfile *gz;
    int closeflag;
{
    VALUE io = gz->io;

    gz->end(gz);
    gz->io = Qnil;
    gz->orig_name = Qnil;
    gz->comment = Qnil;
    if (closeflag && rb_respond_to(io, id_close)) {
        rb_funcall(io, id_close, 0);
    }
}

static void
gzfile_write_raw(gz)
    struct gzfile *gz;
{
    VALUE str;

    if (gz->z.buf_filled > 0) {
        str = zstream_detach_buffer(&gz->z);
        OBJ_TAINT(str);  /* for safe */
        rb_funcall(gz->io, id_write, 1, str);
        if ((gz->z.flags & GZFILE_FLAG_SYNC)
            && rb_respond_to(gz->io, id_flush))
            rb_funcall(gz->io, id_flush, 0);
    }
}

static VALUE
gzfile_read_raw_partial(arg)
    VALUE arg;
{
    struct gzfile *gz = (struct gzfile *)arg;
    VALUE str;

    str = rb_funcall(gz->io, id_readpartial, 1, INT2FIX(GZFILE_READ_SIZE));
    Check_Type(str, T_STRING);
    return str;
}

static VALUE
gzfile_read_raw_rescue(arg)
    VALUE arg;
{
    struct gzfile *gz = (struct gzfile *)arg;
    VALUE str = Qnil;
    if (rb_obj_is_kind_of(ruby_errinfo, rb_eNoMethodError)) {
        str = rb_funcall(gz->io, id_read, 1, INT2FIX(GZFILE_READ_SIZE));
        if (!NIL_P(str)) {
            Check_Type(str, T_STRING);
        }
    }
    return str; /* return nil when EOFError */
}

static VALUE
gzfile_read_raw(gz)
    struct gzfile *gz;
{
    return rb_rescue2(gzfile_read_raw_partial, (VALUE)gz,
                      gzfile_read_raw_rescue, (VALUE)gz,
                      rb_eEOFError, rb_eNoMethodError, (VALUE)0);
}

static int
gzfile_read_raw_ensure(gz, size)
    struct gzfile *gz;
    int size;
{
    VALUE str;

    while (NIL_P(gz->z.input) || RSTRING(gz->z.input)->len < size) {
        str = gzfile_read_raw(gz);
        if (NIL_P(str)) return Qfalse;
        zstream_append_input2(&gz->z, str);
    }
    return Qtrue;
}

static char *
gzfile_read_raw_until_zero(gz, offset)
    struct gzfile *gz;
    long offset;
{
    VALUE str;
    char *p;

    for (;;) {
        p = memchr(RSTRING(gz->z.input)->ptr + offset, '\0',
                   RSTRING(gz->z.input)->len - offset);
        if (p) break;
        str = gzfile_read_raw(gz);
        if (NIL_P(str)) {
            rb_raise(cGzError, "unexpected end of file");
        }
        offset = RSTRING(gz->z.input)->len;
        zstream_append_input2(&gz->z, str);
    }
    return p;
}

static unsigned int
gzfile_get16(src)
    const unsigned char *src;
{
    unsigned int n;
    n  = *(src++) & 0xff;
    n |= (*(src++) & 0xff) << 8;
    return n;
}

static unsigned long
gzfile_get32(src)
    const unsigned char *src;
{
    unsigned long n;
    n  = *(src++) & 0xff;
    n |= (*(src++) & 0xff) << 8;
    n |= (*(src++) & 0xff) << 16;
    n |= (*(src++) & 0xffU) << 24;
    return n;
}

static void
gzfile_set32(n, dst)
    unsigned long n;
    unsigned char *dst;
{
    *(dst++) = n & 0xff;
    *(dst++) = (n >> 8) & 0xff;
    *(dst++) = (n >> 16) & 0xff;
    *dst     = (n >> 24) & 0xff;
}

static void
gzfile_make_header(gz)
    struct gzfile *gz;
{
    unsigned char buf[10];  /* the size of gzip header */
    unsigned char flags = 0, extraflags = 0;

    if (!NIL_P(gz->orig_name)) {
        flags |= GZ_FLAG_ORIG_NAME;
    }
    if (!NIL_P(gz->comment)) {
        flags |= GZ_FLAG_COMMENT;
    }
    if (gz->mtime == 0) {
        gz->mtime = time(0);
    }

    if (gz->level == Z_BEST_SPEED) {
        extraflags |= GZ_EXTRAFLAG_FAST;
    }
    else if (gz->level == Z_BEST_COMPRESSION) {
        extraflags |= GZ_EXTRAFLAG_SLOW;
    }

    buf[0] = GZ_MAGIC1;
    buf[1] = GZ_MAGIC2;
    buf[2] = GZ_METHOD_DEFLATE;
    buf[3] = flags;
    gzfile_set32(gz->mtime, &buf[4]);
    buf[8] = extraflags;
    buf[9] = gz->os_code;
    zstream_append_buffer(&gz->z, buf, sizeof(buf));

    if (!NIL_P(gz->orig_name)) {
        zstream_append_buffer2(&gz->z, gz->orig_name);
        zstream_append_buffer(&gz->z, "\0", 1);
    }
    if (!NIL_P(gz->comment)) {
        zstream_append_buffer2(&gz->z, gz->comment);
        zstream_append_buffer(&gz->z, "\0", 1);
    }

    gz->z.flags |= GZFILE_FLAG_HEADER_FINISHED;
}

static void
gzfile_make_footer(gz)
    struct gzfile *gz;
{
    unsigned char buf[8];  /* 8 is the size of gzip footer */

    gzfile_set32(gz->crc, buf);
    gzfile_set32(gz->z.stream.total_in, &buf[4]);
    zstream_append_buffer(&gz->z, buf, sizeof(buf));
    gz->z.flags |= GZFILE_FLAG_FOOTER_FINISHED;
}

static void
gzfile_read_header(gz)
    struct gzfile *gz;
{
    const unsigned char *head;
    long len;
    char flags, *p;

    if (!gzfile_read_raw_ensure(gz, 10)) {  /* 10 is the size of gzip header */
        rb_raise(cGzError, "not in gzip format");
    }

    head = RSTRING(gz->z.input)->ptr;

    if (head[0] != GZ_MAGIC1 || head[1] != GZ_MAGIC2) {
        rb_raise(cGzError, "not in gzip format");
    }
    if (head[2] != GZ_METHOD_DEFLATE) {
        rb_raise(cGzError, "unsupported compression method %d", head[2]);
    }

    flags = head[3];
    if (flags & GZ_FLAG_MULTIPART) {
        rb_raise(cGzError, "multi-part gzip file is not supported");
    }
    else if (flags & GZ_FLAG_ENCRYPT) {
        rb_raise(cGzError, "encrypted gzip file is not supported");
    }
    else if (flags & GZ_FLAG_UNKNOWN_MASK) {
        rb_raise(cGzError, "unknown flags 0x%02x", flags);
    }

    if (head[8] & GZ_EXTRAFLAG_FAST) {
        gz->level = Z_BEST_SPEED;
    }
    else if (head[8] & GZ_EXTRAFLAG_SLOW) {
        gz->level = Z_BEST_COMPRESSION;
    }
    else {
        gz->level = Z_DEFAULT_COMPRESSION;
    }

    gz->mtime = gzfile_get32(&head[4]);
    gz->os_code = head[9];
    zstream_discard_input(&gz->z, 10);

    if (flags & GZ_FLAG_EXTRA) {
        if (!gzfile_read_raw_ensure(gz, 2)) {
            rb_raise(cGzError, "unexpected end of file");
        }
        len = gzfile_get16(RSTRING(gz->z.input)->ptr);
        if (!gzfile_read_raw_ensure(gz, 2 + len)) {
            rb_raise(cGzError, "unexpected end of file");
        }
        zstream_discard_input(&gz->z, 2 + len);
    }
    if (flags & GZ_FLAG_ORIG_NAME) {
        p = gzfile_read_raw_until_zero(gz, 0);
        len = p - RSTRING(gz->z.input)->ptr;
        gz->orig_name = rb_str_new(RSTRING(gz->z.input)->ptr, len);
        OBJ_TAINT(gz->orig_name);  /* for safe */
        zstream_discard_input(&gz->z, len + 1);
    }
    if (flags & GZ_FLAG_COMMENT) {
        p = gzfile_read_raw_until_zero(gz, 0);
        len = p - RSTRING(gz->z.input)->ptr;
        gz->comment = rb_str_new(RSTRING(gz->z.input)->ptr, len);
        OBJ_TAINT(gz->comment);  /* for safe */
        zstream_discard_input(&gz->z, len + 1);
    }

    if (gz->z.input != Qnil && RSTRING(gz->z.input)->len > 0) {
        zstream_run(&gz->z, 0, 0, Z_SYNC_FLUSH);
    }
}

static void
gzfile_check_footer(gz)
    struct gzfile *gz;
{
    unsigned long crc, length;

    gz->z.flags |= GZFILE_FLAG_FOOTER_FINISHED;

    if (!gzfile_read_raw_ensure(gz, 8)) { /* 8 is the size of gzip footer */
        rb_raise(cNoFooter, "footer is not found");
    }

    crc = gzfile_get32(RSTRING(gz->z.input)->ptr);
    length = gzfile_get32(RSTRING(gz->z.input)->ptr + 4);

    gz->z.stream.total_in += 8;  /* to rewind correctly */
    zstream_discard_input(&gz->z, 8);

    if (gz->crc != crc) {
        rb_raise(cCRCError, "invalid compressed data -- crc error");
    }
    if (gz->z.stream.total_out != length) {
        rb_raise(cLengthError, "invalid compressed data -- length error");
    }
}

static void
gzfile_write(gz, str, len)
    struct gzfile *gz;
    Bytef *str;
    uInt len;
{
    if (!(gz->z.flags & GZFILE_FLAG_HEADER_FINISHED)) {
        gzfile_make_header(gz);
    }

    if (len > 0 || (gz->z.flags & GZFILE_FLAG_SYNC)) {
        gz->crc = crc32(gz->crc, str, len);
        zstream_run(&gz->z, str, len, (gz->z.flags & GZFILE_FLAG_SYNC)
                    ? Z_SYNC_FLUSH : Z_NO_FLUSH);
    }
    gzfile_write_raw(gz);
}

static long
gzfile_read_more(gz)
    struct gzfile *gz;
{
    volatile VALUE str;

    while (!ZSTREAM_IS_FINISHED(&gz->z)) {
        str = gzfile_read_raw(gz);
        if (NIL_P(str)) {
            if (!ZSTREAM_IS_FINISHED(&gz->z)) {
                rb_raise(cGzError, "unexpected end of file");
            }
            break;
        }
        if (RSTRING(str)->len > 0) { /* prevent Z_BUF_ERROR */
            zstream_run(&gz->z, RSTRING(str)->ptr, RSTRING(str)->len,
                        Z_SYNC_FLUSH);
        }
        if (gz->z.buf_filled > 0) break;
    }
    return gz->z.buf_filled;
}

static void
gzfile_calc_crc(gz, str)
    struct gzfile *gz;
    VALUE str;
{
    if (RSTRING(str)->len <= gz->ungetc) {
        gz->ungetc -= RSTRING(str)->len;
    }
    else {
        gz->crc = crc32(gz->crc, RSTRING(str)->ptr + gz->ungetc,
                        RSTRING(str)->len - gz->ungetc);
        gz->ungetc = 0;
    }
}

static VALUE
gzfile_read(gz, len)
    struct gzfile *gz;
    int len;
{
    VALUE dst;

    if (len < 0)
        rb_raise(rb_eArgError, "negative length %d given", len);
    if (len == 0)
        return rb_str_new(0, 0);
    while (!ZSTREAM_IS_FINISHED(&gz->z) && gz->z.buf_filled < len) {
        gzfile_read_more(gz);
    }
    if (GZFILE_IS_FINISHED(gz)) {
        if (!(gz->z.flags & GZFILE_FLAG_FOOTER_FINISHED)) {
            gzfile_check_footer(gz);
        }
        return Qnil;
    }

    dst = zstream_shift_buffer(&gz->z, len);
    gzfile_calc_crc(gz, dst);

    OBJ_TAINT(dst);  /* for safe */
    return dst;
}

static VALUE
gzfile_readpartial(gz, len, outbuf)
    struct gzfile *gz;
    int len;
    VALUE outbuf;
{
    VALUE dst;

    if (len < 0)
        rb_raise(rb_eArgError, "negative length %d given", len);

    if (!NIL_P(outbuf))
            OBJ_TAINT(outbuf);

    if (len == 0) {
        if (NIL_P(outbuf))
            return rb_str_new(0, 0);
        else {
            rb_str_resize(outbuf, 0);
            return outbuf;
        }
    }
    while (!ZSTREAM_IS_FINISHED(&gz->z) && gz->z.buf_filled == 0) {
        gzfile_read_more(gz);
    }
    if (GZFILE_IS_FINISHED(gz)) {
        if (!(gz->z.flags & GZFILE_FLAG_FOOTER_FINISHED)) {
            gzfile_check_footer(gz);
        }
        if (!NIL_P(outbuf))
            rb_str_resize(outbuf, 0);
        rb_raise(rb_eEOFError, "end of file reached");
    }

    dst = zstream_shift_buffer(&gz->z, len);
    gzfile_calc_crc(gz, dst);

    if (NIL_P(outbuf)) {
        OBJ_TAINT(dst);  /* for safe */
        return dst;
    }
    else {
        rb_str_resize(outbuf, RSTRING(dst)->len);
        memcpy(RSTRING(outbuf)->ptr, RSTRING(dst)->ptr, RSTRING(dst)->len);
        return outbuf;
    }
}

static VALUE
gzfile_read_all(gz)
    struct gzfile *gz;
{
    VALUE dst;

    while (!ZSTREAM_IS_FINISHED(&gz->z)) {
        gzfile_read_more(gz);
    }
    if (GZFILE_IS_FINISHED(gz)) {
        if (!(gz->z.flags & GZFILE_FLAG_FOOTER_FINISHED)) {
            gzfile_check_footer(gz);
        }
        return rb_str_new(0, 0);
    }

    dst = zstream_detach_buffer(&gz->z);
    gzfile_calc_crc(gz, dst);

    OBJ_TAINT(dst);  /* for safe */
    return dst;
}

static void
gzfile_ungetc(gz, c)
    struct gzfile *gz;
    int c;
{
    zstream_buffer_ungetc(&gz->z, c);
    gz->ungetc++;
}

static VALUE
gzfile_finalize(obj)
    VALUE obj;
{
    struct gzfile *gz = (struct gzfile *)obj;
    gzfile_write_raw(gz);
    return Qnil;
}

static void
gzfile_writer_end(gz)
    struct gzfile *gz;
{
    int aborted;

    if (ZSTREAM_IS_CLOSED(&gz->z)) return;
    gz->z.flags |= ZSTREAM_FLAG_CLOSED;

    if (!(gz->z.flags & GZFILE_FLAG_HEADER_FINISHED)) {
        gzfile_make_header(gz);
    }

    zstream_run(&gz->z, "", 0, Z_FINISH);
    gzfile_make_footer(gz);

    if (ZSTREAM_IS_FINALIZE(&gz->z)) {
        if (NIL_P(gz->io)) return;
        rb_warn("Zlib::GzipWriter object must be closed explicitly.");
        if (!SPECIAL_CONST_P(gz->io) && OBJ_IS_FREED(gz->io)) {
            aborted = 1;
        }
        else {
            rb_protect(gzfile_finalize, (VALUE)gz, &aborted);
        }
        if (aborted) {
            rb_warn("gzip footer is not written; broken gzip file");
        }
        zstream_end(&gz->z);
        return;
    }
    gzfile_write_raw(gz);
    zstream_end(&gz->z);
}

static void
gzfile_reader_end(gz)
    struct gzfile *gz;
{
    if (ZSTREAM_IS_CLOSED(&gz->z)) return;
    gz->z.flags |= ZSTREAM_FLAG_CLOSED;

    if (GZFILE_IS_FINISHED(gz)
        && !ZSTREAM_IS_FINALIZE(&gz->z)
        && !(gz->z.flags & GZFILE_FLAG_FOOTER_FINISHED)) {
        gzfile_check_footer(gz);
    }

    zstream_end(&gz->z);
}

static void
gzfile_reader_rewind(gz)
    struct gzfile *gz;
{
    long n;

    n = gz->z.stream.total_in;
    if (!NIL_P(gz->z.input)) {
        n += RSTRING(gz->z.input)->len;
    }

    rb_funcall(gz->io, id_seek, 2, rb_int2inum(-n), INT2FIX(1));
    gzfile_reset(gz);
}

static VALUE
gzfile_reader_get_unused(gz)
    struct gzfile *gz;
{
    VALUE str;

    if (!ZSTREAM_IS_READY(&gz->z)) return Qnil;
    if (!GZFILE_IS_FINISHED(gz)) return Qnil;
    if (!(gz->z.flags & GZFILE_FLAG_FOOTER_FINISHED)) {
        gzfile_check_footer(gz);
    }
    if (NIL_P(gz->z.input)) return Qnil;

    str = rb_str_dup(gz->z.input);
    OBJ_TAINT(str);  /* for safe */
    return str;
}

static struct gzfile *
get_gzfile(obj)
    VALUE obj;
{
    struct gzfile *gz;

    Data_Get_Struct(obj, struct gzfile, gz);
    if (!ZSTREAM_IS_READY(&gz->z)) {
        rb_raise(cGzError, "closed gzip stream");
    }
    return gz;
}

/* ------------------------------------------------------------------------- */

/*
 * Document-class: Zlib::GzipFile
 *
 * Zlib::GzipFile is an abstract class for handling a gzip formatted
 * compressed file. The operations are defined in the subclasses,
 * Zlib::GzipReader for reading, and Zlib::GzipWriter for writing.
 *
 * GzipReader should be used by associating an IO, or IO-like, object.
 */

static VALUE
gzfile_ensure_close(obj)
    VALUE obj;
{
    struct gzfile *gz;

    Data_Get_Struct(obj, struct gzfile, gz);
    if (ZSTREAM_IS_READY(&gz->z)) {
        gzfile_close(gz, 1);
    }
    return Qnil;
}

/*
 * See Zlib::GzipReader#wrap and Zlib::GzipWriter#wrap.
 */
static VALUE
rb_gzfile_s_wrap(argc, argv, klass)
    int argc;
    VALUE *argv;
    VALUE klass;
{
    VALUE obj = rb_class_new_instance(argc, argv, klass);

    if (rb_block_given_p()) {
        return rb_ensure(rb_yield, obj, gzfile_ensure_close, obj);
    }
    else {
        return obj;
    }
}

/*
 * See Zlib::GzipReader#open and Zlib::GzipWriter#open.
 */
static VALUE
gzfile_s_open(argc, argv, klass, mode)
    int argc;
    VALUE *argv;
    VALUE klass;
    const char *mode;
{
    VALUE io, filename;

    if (argc < 1) {
        rb_raise(rb_eArgError, "wrong number of arguments (0 for 1)");
    }
    filename = argv[0];
    SafeStringValue(filename);
    io = rb_file_open(RSTRING(filename)->ptr, mode);

    argv[0] = io;
    return rb_gzfile_s_wrap(argc, argv, klass);
}

/*
 * Same as IO.
 */
static VALUE
rb_gzfile_to_io(obj)
    VALUE obj;
{
    return get_gzfile(obj)->io;
}

/*
 * Returns CRC value of the uncompressed data.
 */
static VALUE
rb_gzfile_crc(obj)
    VALUE obj;
{
    return rb_uint2inum(get_gzfile(obj)->crc);
}

/*
 * Returns last modification time recorded in the gzip file header.
 */
static VALUE
rb_gzfile_mtime(obj)
    VALUE obj;
{
    return rb_time_new(get_gzfile(obj)->mtime, (time_t)0);
}

/*
 * Returns compression level.
 */
static VALUE
rb_gzfile_level(obj)
    VALUE obj;
{
    return INT2FIX(get_gzfile(obj)->level);
}

/*
 * Returns OS code number recorded in the gzip file header.
 */
static VALUE
rb_gzfile_os_code(obj)
    VALUE obj;
{
    return INT2FIX(get_gzfile(obj)->os_code);
}

/*
 * Returns original filename recorded in the gzip file header, or +nil+ if
 * original filename is not present.
 */
static VALUE
rb_gzfile_orig_name(obj)
    VALUE obj;
{
    VALUE str = get_gzfile(obj)->orig_name;
    if (!NIL_P(str)) {
        str = rb_str_dup(str);
    }
    OBJ_TAINT(str);  /* for safe */
    return str;
}

/*
 * Returns comments recorded in the gzip file header, or nil if the comments
 * is not present.
 */
static VALUE
rb_gzfile_comment(obj)
    VALUE obj;
{
    VALUE str = get_gzfile(obj)->comment;
    if (!NIL_P(str)) {
        str = rb_str_dup(str);
    }
    OBJ_TAINT(str);  /* for safe */
    return str;
}

/*
 * ???
 */
static VALUE
rb_gzfile_lineno(obj)
    VALUE obj;
{
    return INT2NUM(get_gzfile(obj)->lineno);
}

/*
 * ???
 */
static VALUE
rb_gzfile_set_lineno(obj, lineno)
    VALUE obj, lineno;
{
    struct gzfile *gz = get_gzfile(obj);
    gz->lineno = NUM2INT(lineno);
    return lineno;
}

/*
 * ???
 */
static VALUE
rb_gzfile_set_mtime(obj, mtime)
    VALUE obj, mtime;
{
    struct gzfile *gz = get_gzfile(obj);
    VALUE val;

    if (gz->z.flags & GZFILE_FLAG_HEADER_FINISHED) {
        rb_raise(cGzError, "header is already written");
    }

    if (FIXNUM_P(time)) {
        gz->mtime = FIX2INT(mtime);
    }
    else {
        val = rb_Integer(mtime);
        gz->mtime = FIXNUM_P(val) ? FIX2INT(val) : rb_big2ulong(val);
    }
    return mtime;
}

/*
 * ???
 */
static VALUE
rb_gzfile_set_orig_name(obj, str)
    VALUE obj, str;
{
    struct gzfile *gz = get_gzfile(obj);
    VALUE s;
    char *p;

    if (gz->z.flags & GZFILE_FLAG_HEADER_FINISHED) {
        rb_raise(cGzError, "header is already written");
    }
    s = rb_str_dup(rb_str_to_str(str));
    p = memchr(RSTRING(s)->ptr, '\0', RSTRING(s)->len);
    if (p) {
        rb_str_resize(s, p - RSTRING(s)->ptr);
    }
    gz->orig_name = s;
    return str;
}

/*
 * ???
 */
static VALUE
rb_gzfile_set_comment(obj, str)
    VALUE obj, str;
{
    struct gzfile *gz = get_gzfile(obj);
    VALUE s;
    char *p;

    if (gz->z.flags & GZFILE_FLAG_HEADER_FINISHED) {
        rb_raise(cGzError, "header is already written");
    }
    s = rb_str_dup(rb_str_to_str(str));
    p = memchr(RSTRING(s)->ptr, '\0', RSTRING(s)->len);
    if (p) {
        rb_str_resize(s, p - RSTRING(s)->ptr);
    }
    gz->comment = s;
    return str;
}

/*
 * Closes the GzipFile object. This method calls close method of the
 * associated IO object. Returns the associated IO object.
 */
static VALUE
rb_gzfile_close(obj)
    VALUE obj;
{
    struct gzfile *gz = get_gzfile(obj);
    VALUE io;

    io = gz->io;
    gzfile_close(gz, 1);
    return io;
}

/*
 * Closes the GzipFile object. Unlike Zlib::GzipFile#close, this method never
 * calls the close method of the associated IO object. Returns the associated IO
 * object.
 */
static VALUE
rb_gzfile_finish(obj)
    VALUE obj;
{
    struct gzfile *gz = get_gzfile(obj);
    VALUE io;

    io = gz->io;
    gzfile_close(gz, 0);
    return io;
}

/*
 * Same as IO.
 */
static VALUE
rb_gzfile_closed_p(obj)
    VALUE obj;
{
    struct gzfile *gz;
    Data_Get_Struct(obj, struct gzfile, gz);
    return NIL_P(gz->io) ? Qtrue : Qfalse;
}

/*
 * ???
 */
static VALUE
rb_gzfile_eof_p(obj)
    VALUE obj;
{
    struct gzfile *gz = get_gzfile(obj);
    return GZFILE_IS_FINISHED(gz) ? Qtrue : Qfalse;
}

/*
 * Same as IO.
 */
static VALUE
rb_gzfile_sync(obj)
    VALUE obj;
{
    return (get_gzfile(obj)->z.flags & GZFILE_FLAG_SYNC) ? Qtrue : Qfalse;
}

/*
 * call-seq: sync = flag
 *
 * Same as IO.  If flag is +true+, the associated IO object must respond to the
 * +flush+ method.  While +sync+ mode is +true+, the compression ratio
 * decreases sharply.
 */
static VALUE
rb_gzfile_set_sync(obj, mode)
    VALUE obj, mode;
{
    struct gzfile *gz = get_gzfile(obj);

    if (RTEST(mode)) {
        gz->z.flags |= GZFILE_FLAG_SYNC;
    }
    else {
        gz->z.flags &= ~GZFILE_FLAG_SYNC;
    }
    return mode;
}

/*
 * ???
 */
static VALUE
rb_gzfile_total_in(obj)
    VALUE obj;
{
    return rb_uint2inum(get_gzfile(obj)->z.stream.total_in);
}

/*
 * ???
 */
static VALUE
rb_gzfile_total_out(obj)
    VALUE obj;
{
    struct gzfile *gz = get_gzfile(obj);
    return rb_uint2inum(gz->z.stream.total_out - gz->z.buf_filled);
}

/* ------------------------------------------------------------------------- */

/*
 * Document-class: Zlib::GzipWriter
 *
 * Zlib::GzipWriter is a class for writing gzipped files.  GzipWriter should
 * be used with an instance of IO, or IO-like, object.
 *
 * For example:
 *
 *   Zlib::GzipWriter.open('hoge.gz') do |gz|
 *     gz.write 'jugemu jugemu gokou no surikire...'
 *   end
 *
 *   File.open('hoge.gz', 'w') do |f|
 *     gz = Zlib::GzipWriter.new(f)
 *     gz.write 'jugemu jugemu gokou no surikire...'
 *     gz.close
 *   end
 *
 *   # TODO: test these.  Are they equivalent?  Can GzipWriter.new take a
 *   # block?
 *
 * NOTE: Due to the limitation of Ruby's finalizer, you must explicitly close
 * GzipWriter objects by Zlib::GzipWriter#close etc.  Otherwise, GzipWriter
 * will be not able to write the gzip footer and will generate a broken gzip
 * file.
 */

static VALUE
rb_gzwriter_s_allocate(klass)
    VALUE klass;
{
    return gzfile_writer_new(klass);
}

/*
 * call-seq: Zlib::GzipWriter.open(filename, level=nil, strategy=nil) { |gz| ... }
 *
 * Opens a file specified by +filename+ for writing gzip compressed data, and
 * returns a GzipWriter object associated with that file.  Further details of
 * this method are found in Zlib::GzipWriter.new and Zlib::GzipWriter#wrap.
 */
static VALUE
rb_gzwriter_s_open(argc, argv, klass)
    int argc;
    VALUE *argv;
    VALUE klass;
{
    return gzfile_s_open(argc, argv, klass, "wb");
}

/*
 * call-seq: Zlib::GzipWriter.new(io, level, strategy)
 *
 * Creates a GzipWriter object associated with +io+. +level+ and +strategy+
 * should be the same as the arguments of Zlib::Deflate.new.  The GzipWriter
 * object writes gzipped data to +io+.  At least, +io+ must respond to the
 * +write+ method that behaves same as write method in IO class.
 */
static VALUE
rb_gzwriter_initialize(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    struct gzfile *gz;
    VALUE io, level, strategy;
    int err;

    rb_scan_args(argc, argv, "12", &io, &level, &strategy);
    Data_Get_Struct(obj, struct gzfile, gz);

    /* this is undocumented feature of zlib */
    gz->level = ARG_LEVEL(level);
    err = deflateInit2(&gz->z.stream, gz->level, Z_DEFLATED,
                       -MAX_WBITS, DEF_MEM_LEVEL, ARG_STRATEGY(strategy));
    if (err != Z_OK) {
        raise_zlib_error(err, gz->z.stream.msg);
    }
    gz->io = io;
    ZSTREAM_READY(&gz->z);

    return obj;
}

/*
 * call-seq: flush(flush=nil)
 *
 * Flushes all the internal buffers of the GzipWriter object.  The meaning of
 * +flush+ is same as in Zlib::Deflate#deflate.  <tt>Zlib::SYNC_FLUSH</tt> is used if
 * +flush+ is omitted.  It is no use giving flush <tt>Zlib::NO_FLUSH</tt>.
 */
static VALUE
rb_gzwriter_flush(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    struct gzfile *gz = get_gzfile(obj);
    VALUE v_flush;
    int flush;

    rb_scan_args(argc, argv, "01", &v_flush);

    flush = FIXNUMARG(v_flush, Z_SYNC_FLUSH);
    if (flush != Z_NO_FLUSH) {  /* prevent Z_BUF_ERROR */
        zstream_run(&gz->z, "", 0, flush);
    }

    gzfile_write_raw(gz);
    if (rb_respond_to(gz->io, id_flush)) {
        rb_funcall(gz->io, id_flush, 0);
    }
    return obj;
}

/*
 * Same as IO.
 */
static VALUE
rb_gzwriter_write(obj, str)
    VALUE obj, str;
{
    struct gzfile *gz = get_gzfile(obj);

    if (TYPE(str) != T_STRING) {
        str = rb_obj_as_string(str);
    }
    gzfile_write(gz, RSTRING(str)->ptr, RSTRING(str)->len);
    return INT2FIX(RSTRING(str)->len);
}

/*
 * Same as IO.
 */
static VALUE
rb_gzwriter_putc(obj, ch)
    VALUE obj, ch;
{
    struct gzfile *gz = get_gzfile(obj);
    char c = NUM2CHR(ch);

    gzfile_write(gz, &c, 1);
    return ch;
}

/*
 * Document-method: <<
 * Same as IO.
 */
#define rb_gzwriter_addstr  rb_io_addstr
/*
 * Document-method: printf
 * Same as IO.
 */
#define rb_gzwriter_printf  rb_io_printf
/*
 * Document-method: print
 * Same as IO.
 */
#define rb_gzwriter_print  rb_io_print
/*
 * Document-method: puts
 * Same as IO.
 */
#define rb_gzwriter_puts  rb_io_puts

/* ------------------------------------------------------------------------- */

/*
 * Document-class: Zlib::GzipReader
 *
 * Zlib::GzipReader is the class for reading a gzipped file.  GzipReader should
 * be used an IO, or -IO-lie, object.
 *
 *   Zlib::GzipReader.open('hoge.gz') {|gz|
 *     print gz.read
 *   }
 *
 *   File.open('hoge.gz') do |f|
 *     gz = Zlib::GzipReader.new(f)
 *     print gz.read
 *     gz.close
 *   end
 *
 *   # TODO: test these.  Are they equivalent?  Can GzipReader.new take a
 *   # block?
 *
 * == Method Catalogue
 *
 * The following methods in Zlib::GzipReader are just like their counterparts
 * in IO, but they raise Zlib::Error or Zlib::GzipFile::Error exception if an
 * error was found in the gzip file.
 * - #each
 * - #each_line
 * - #each_byte
 * - #gets
 * - #getc
 * - #lineno
 * - #lineno=
 * - #read
 * - #readchar
 * - #readline
 * - #readlines
 * - #ungetc
 *
 * Be careful of the footer of the gzip file. A gzip file has the checksum of
 * pre-compressed data in its footer. GzipReader checks all uncompressed data
 * against that checksum at the following cases, and if it fails, raises
 * <tt>Zlib::GzipFile::NoFooter</tt>, <tt>Zlib::GzipFile::CRCError</tt>, or
 * <tt>Zlib::GzipFile::LengthError</tt> exception.
 *
 * - When an reading request is received beyond the end of file (the end of
 *   compressed data). That is, when Zlib::GzipReader#read,
 *   Zlib::GzipReader#gets, or some other methods for reading returns nil.
 * - When Zlib::GzipFile#close method is called after the object reaches the
 *   end of file.
 * - When Zlib::GzipReader#unused method is called after the object reaches
 *   the end of file.
 *
 * The rest of the methods are adequately described in their own
 * documentation.
 */

static VALUE
rb_gzreader_s_allocate(klass)
    VALUE klass;
{
    return gzfile_reader_new(klass);
}

/*
 * call-seq: Zlib::GzipReader.open(filename) {|gz| ... }
 *
 * Opens a file specified by +filename+ as a gzipped file, and returns a
 * GzipReader object associated with that file.  Further details of this method
 * are in Zlib::GzipReader.new and ZLib::GzipReader.wrap.
 */
static VALUE
rb_gzreader_s_open(argc, argv, klass)
    int argc;
    VALUE *argv;
    VALUE klass;
{
    return gzfile_s_open(argc, argv, klass, "rb");
}

/*
 * call-seq: Zlib::GzipReader.new(io)
 *
 * Creates a GzipReader object associated with +io+. The GzipReader object reads
 * gzipped data from +io+, and parses/decompresses them.  At least, +io+ must have
 * a +read+ method that behaves same as the +read+ method in IO class.
 *
 * If the gzip file header is incorrect, raises an Zlib::GzipFile::Error
 * exception.
 */
static VALUE
rb_gzreader_initialize(obj, io)
    VALUE obj, io;
{
    struct gzfile *gz;
    int err;

    Data_Get_Struct(obj, struct gzfile, gz);

    /* this is undocumented feature of zlib */
    err = inflateInit2(&gz->z.stream, -MAX_WBITS);
    if (err != Z_OK) {
        raise_zlib_error(err, gz->z.stream.msg);
    }
    gz->io = io;
    ZSTREAM_READY(&gz->z);
    gzfile_read_header(gz);

    return obj;
}

/*
 * Resets the position of the file pointer to the point created the GzipReader
 * object.  The associated IO object needs to respond to the +seek+ method.
 */
static VALUE
rb_gzreader_rewind(obj)
    VALUE obj;
{
    struct gzfile *gz = get_gzfile(obj);
    gzfile_reader_rewind(gz);
    return INT2FIX(0);
}

/*
 * Returns the rest of the data which had read for parsing gzip format, or
 * +nil+ if the whole gzip file is not parsed yet.
 */
static VALUE
rb_gzreader_unused(obj)
    VALUE obj;
{
    struct gzfile *gz;
    Data_Get_Struct(obj, struct gzfile, gz);
    return gzfile_reader_get_unused(gz);
}

/*
 * See Zlib::GzipReader documentation for a description.
 */
static VALUE
rb_gzreader_read(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    struct gzfile *gz = get_gzfile(obj);
    VALUE vlen;
    int len;

    rb_scan_args(argc, argv, "01", &vlen);
    if (NIL_P(vlen)) {
        return gzfile_read_all(gz);
    }

    len = NUM2INT(vlen);
    if (len < 0) {
        rb_raise(rb_eArgError, "negative length %d given", len);
    }
    return gzfile_read(gz, len);
}

/*
 *  call-seq:
 *     gzipreader.readpartial(maxlen [, outbuf]) => string, outbuf
 *
 *  Reads at most <i>maxlen</i> bytes from the gziped stream but
 *  it blocks only if <em>gzipreader</em> has no data immediately available.
 *  If the optional <i>outbuf</i> argument is present,
 *  it must reference a String, which will receive the data.
 *  It raises <code>EOFError</code> on end of file.
 */
static VALUE
rb_gzreader_readpartial(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    struct gzfile *gz = get_gzfile(obj);
    VALUE vlen, outbuf;
    int len;

    rb_scan_args(argc, argv, "11", &vlen, &outbuf);

    len = NUM2INT(vlen);
    if (len < 0) {
        rb_raise(rb_eArgError, "negative length %d given", len);
    }
    if (!NIL_P(outbuf))
        Check_Type(outbuf, T_STRING);
    return gzfile_readpartial(gz, len, outbuf);
}

/*
 * See Zlib::GzipReader documentation for a description.
 */
static VALUE
rb_gzreader_getc(obj)
    VALUE obj;
{
    struct gzfile *gz = get_gzfile(obj);
    VALUE dst;

    dst = gzfile_read(gz, 1);
    if (!NIL_P(dst)) {
        dst = INT2FIX((unsigned int)(RSTRING(dst)->ptr[0]) & 0xff);
    }
    return dst;
}

/*
 * See Zlib::GzipReader documentation for a description.
 */
static VALUE
rb_gzreader_readchar(obj)
    VALUE obj;
{
    VALUE dst;
    dst = rb_gzreader_getc(obj);
    if (NIL_P(dst)) {
        rb_raise(rb_eEOFError, "end of file reached");
    }
    return dst;
}

/*
 * See Zlib::GzipReader documentation for a description.
 */
static VALUE
rb_gzreader_each_byte(obj)
    VALUE obj;
{
    VALUE c;
    while (!NIL_P(c = rb_gzreader_getc(obj))) {
        rb_yield(c);
    }
    return Qnil;
}

/*
 * See Zlib::GzipReader documentation for a description.
 */
static VALUE
rb_gzreader_ungetc(obj, ch)
    VALUE obj, ch;
{
    struct gzfile *gz = get_gzfile(obj);
    gzfile_ungetc(gz, NUM2CHR(ch));
    return Qnil;
}

static void
gzreader_skip_linebreaks(gz)
    struct gzfile *gz;
{
    VALUE str;
    char *p;
    int n;

    while (gz->z.buf_filled == 0) {
        if (GZFILE_IS_FINISHED(gz)) return;
        gzfile_read_more(gz);
    }
    n = 0;
    p = RSTRING(gz->z.buf)->ptr;

    while (n++, *(p++) == '\n') {
        if (n >= gz->z.buf_filled) {
            str = zstream_detach_buffer(&gz->z);
            gzfile_calc_crc(gz, str);
            while (gz->z.buf_filled == 0) {
                if (GZFILE_IS_FINISHED(gz)) return;
                gzfile_read_more(gz);
            }
            n = 0;
            p = RSTRING(gz->z.buf)->ptr;
        }
    }

    str = zstream_shift_buffer(&gz->z, n - 1);
    gzfile_calc_crc(gz, str);
}

static void
rscheck(rsptr, rslen, rs)
    char *rsptr;
    long rslen;
    VALUE rs;
{
    if (RSTRING(rs)->ptr != rsptr && RSTRING(rs)->len != rslen)
        rb_raise(rb_eRuntimeError, "rs modified");
}

static VALUE
gzreader_gets(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    struct gzfile *gz = get_gzfile(obj);
    volatile VALUE rs;
    VALUE dst;
    char *rsptr, *p, *res;
    long rslen, n;
    int rspara;

    if (argc == 0) {
        rs = rb_rs;
    }
    else {
        rb_scan_args(argc, argv, "1", &rs);
        if (!NIL_P(rs)) {
            Check_Type(rs, T_STRING);
        }
    }

    if (NIL_P(rs)) {
        dst = gzfile_read_all(gz);
        if (RSTRING(dst)->len != 0) gz->lineno++;
        return dst;
    }

    if (RSTRING(rs)->len == 0) {
        rsptr = "\n\n";
        rslen = 2;
        rspara = 1;
    } else {
        rsptr = RSTRING(rs)->ptr;
        rslen = RSTRING(rs)->len;
        rspara = 0;
    }

    if (rspara) {
        gzreader_skip_linebreaks(gz);
    }

    while (gz->z.buf_filled < rslen) {
        if (ZSTREAM_IS_FINISHED(&gz->z)) {
            if (gz->z.buf_filled > 0) gz->lineno++;
            return gzfile_read(gz, rslen);
        }
        gzfile_read_more(gz);
    }

    p = RSTRING(gz->z.buf)->ptr;
    n = rslen;
    for (;;) {
        if (n > gz->z.buf_filled) {
            if (ZSTREAM_IS_FINISHED(&gz->z)) break;
            gzfile_read_more(gz);
            p = RSTRING(gz->z.buf)->ptr + n - rslen;
        }
        if (!rspara) rscheck(rsptr, rslen, rs);
        res = memchr(p, rsptr[0], (gz->z.buf_filled - n + 1));
        if (!res) {
            n = gz->z.buf_filled + 1;
        } else {
            n += (long)(res - p);
            p = res;
            if (rslen == 1 || memcmp(p, rsptr, rslen) == 0) break;
            p++, n++;
        }
    }

    gz->lineno++;
    dst = gzfile_read(gz, n);
    if (rspara) {
        gzreader_skip_linebreaks(gz);
    }

    return dst;
}

/*
 * See Zlib::GzipReader documentation for a description.
 */
static VALUE
rb_gzreader_gets(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    VALUE dst;
    dst = gzreader_gets(argc, argv, obj);
    if (!NIL_P(dst)) {
        rb_lastline_set(dst);
    }
    return dst;
}

/*
 * See Zlib::GzipReader documentation for a description.
 */
static VALUE
rb_gzreader_readline(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    VALUE dst;
    dst = rb_gzreader_gets(argc, argv, obj);
    if (NIL_P(dst)) {
        rb_raise(rb_eEOFError, "end of file reached");
    }
    return dst;
}

/*
 * See Zlib::GzipReader documentation for a description.
 */
static VALUE
rb_gzreader_each(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    VALUE str;
    while (!NIL_P(str = gzreader_gets(argc, argv, obj))) {
        rb_yield(str);
    }
    return obj;
}

/*
 * See Zlib::GzipReader documentation for a description.
 */
static VALUE
rb_gzreader_readlines(argc, argv, obj)
    int argc;
    VALUE *argv;
    VALUE obj;
{
    VALUE str, dst;
    dst = rb_ary_new();
    while (!NIL_P(str = gzreader_gets(argc, argv, obj))) {
        rb_ary_push(dst, str);
    }
    return dst;
}

#endif /* GZIP_SUPPORT */

/*
 * The Zlib module contains several classes for compressing and decompressing
 * streams, and for working with "gzip" files.
 *
 * == Classes
 *
 * Following are the classes that are most likely to be of interest to the
 * user:
 * Zlib::Inflate
 * Zlib::Deflate
 * Zlib::GzipReader
 * Zlib::GzipWriter
 *
 * There are two important base classes for the classes above: Zlib::ZStream
 * and Zlib::GzipFile.  Everything else is an error class.
 *
 * == Constants
 *
 * Here's a list.
 *
 *   Zlib::VERSION
 *       The Ruby/zlib version string.
 *
 *   Zlib::ZLIB_VERSION
 *       The string which represents the version of zlib.h.
 *
 *   Zlib::BINARY
 *   Zlib::ASCII
 *   Zlib::UNKNOWN
 *       The integers representing data types which Zlib::ZStream#data_type
 *       method returns.
 *
 *   Zlib::NO_COMPRESSION
 *   Zlib::BEST_SPEED
 *   Zlib::BEST_COMPRESSION
 *   Zlib::DEFAULT_COMPRESSION
 *       The integers representing compression levels which are an argument
 *       for Zlib::Deflate.new, Zlib::Deflate#deflate, and so on.
 *
 *   Zlib::FILTERED
 *   Zlib::HUFFMAN_ONLY
 *   Zlib::DEFAULT_STRATEGY
 *       The integers representing compression methods which are an argument
 *       for Zlib::Deflate.new and Zlib::Deflate#params.
 *
 *   Zlib::DEF_MEM_LEVEL
 *   Zlib::MAX_MEM_LEVEL
 *       The integers representing memory levels which are an argument for
 *       Zlib::Deflate.new, Zlib::Deflate#params, and so on.
 *
 *   Zlib::MAX_WBITS
 *       The default value of windowBits which is an argument for
 *       Zlib::Deflate.new and Zlib::Inflate.new.
 *
 *   Zlib::NO_FLUSH
 *   Zlib::SYNC_FLUSH
 *   Zlib::FULL_FLUSH
 *   Zlib::FINISH
 *       The integers to control the output of the deflate stream, which are
 *       an argument for Zlib::Deflate#deflate and so on.
 *
 *   Zlib::OS_CODE
 *   Zlib::OS_MSDOS
 *   Zlib::OS_AMIGA
 *   Zlib::OS_VMS
 *   Zlib::OS_UNIX
 *   Zlib::OS_VMCMS
 *   Zlib::OS_ATARI
 *   Zlib::OS_OS2
 *   Zlib::OS_MACOS
 *   Zlib::OS_ZSYSTEM
 *   Zlib::OS_CPM
 *   Zlib::OS_TOPS20
 *   Zlib::OS_WIN32
 *   Zlib::OS_QDOS
 *   Zlib::OS_RISCOS
 *   Zlib::OS_UNKNOWN
 *       The return values of Zlib::GzipFile#os_code method.
 */
void Init_zlib()
{
    VALUE mZlib, cZStream, cDeflate, cInflate;
#if GZIP_SUPPORT
    VALUE cGzipFile, cGzipWriter, cGzipReader;
#endif

    mZlib = rb_define_module("Zlib");

    cZError = rb_define_class_under(mZlib, "Error", rb_eStandardError);
    cStreamEnd    = rb_define_class_under(mZlib, "StreamEnd", cZError);
    cNeedDict     = rb_define_class_under(mZlib, "NeedDict", cZError);
    cDataError    = rb_define_class_under(mZlib, "DataError", cZError);
    cStreamError  = rb_define_class_under(mZlib, "StreamError", cZError);
    cMemError     = rb_define_class_under(mZlib, "MemError", cZError);
    cBufError     = rb_define_class_under(mZlib, "BufError", cZError);
    cVersionError = rb_define_class_under(mZlib, "VersionError", cZError);

    rb_define_module_function(mZlib, "zlib_version", rb_zlib_version, 0);
    rb_define_module_function(mZlib, "adler32", rb_zlib_adler32, -1);
    rb_define_module_function(mZlib, "crc32", rb_zlib_crc32, -1);
    rb_define_module_function(mZlib, "crc_table", rb_zlib_crc_table, 0);

    rb_define_const(mZlib, "VERSION", rb_str_new2(RUBY_ZLIB_VERSION));
    rb_define_const(mZlib, "ZLIB_VERSION", rb_str_new2(ZLIB_VERSION));

    cZStream = rb_define_class_under(mZlib, "ZStream", rb_cObject);
    rb_undef_alloc_func(cZStream);
    rb_define_method(cZStream, "avail_out", rb_zstream_avail_out, 0);
    rb_define_method(cZStream, "avail_out=", rb_zstream_set_avail_out, 1);
    rb_define_method(cZStream, "avail_in", rb_zstream_avail_in, 0);
    rb_define_method(cZStream, "total_in", rb_zstream_total_in, 0);
    rb_define_method(cZStream, "total_out", rb_zstream_total_out, 0);
    rb_define_method(cZStream, "data_type", rb_zstream_data_type, 0);
    rb_define_method(cZStream, "adler", rb_zstream_adler, 0);
    rb_define_method(cZStream, "finished?", rb_zstream_finished_p, 0);
    rb_define_method(cZStream, "stream_end?", rb_zstream_finished_p, 0);
    rb_define_method(cZStream, "closed?", rb_zstream_closed_p, 0);
    rb_define_method(cZStream, "ended?", rb_zstream_closed_p, 0);
    rb_define_method(cZStream, "close", rb_zstream_end, 0);
    rb_define_method(cZStream, "end", rb_zstream_end, 0);
    rb_define_method(cZStream, "reset", rb_zstream_reset, 0);
    rb_define_method(cZStream, "finish", rb_zstream_finish, 0);
    rb_define_method(cZStream, "flush_next_in", rb_zstream_flush_next_in, 0);
    rb_define_method(cZStream, "flush_next_out", rb_zstream_flush_next_out, 0);

    rb_define_const(mZlib, "BINARY", INT2FIX(Z_BINARY));
    rb_define_const(mZlib, "ASCII", INT2FIX(Z_ASCII));
    rb_define_const(mZlib, "UNKNOWN", INT2FIX(Z_UNKNOWN));

    cDeflate = rb_define_class_under(mZlib, "Deflate", cZStream);
    rb_define_singleton_method(cDeflate, "deflate", rb_deflate_s_deflate, -1);
    rb_define_alloc_func(cDeflate, rb_deflate_s_allocate);
    rb_define_method(cDeflate, "initialize", rb_deflate_initialize, -1);
    rb_define_method(cDeflate, "initialize_copy", rb_deflate_init_copy, 0);
    rb_define_method(cDeflate, "deflate", rb_deflate_deflate, -1);
    rb_define_method(cDeflate, "<<", rb_deflate_addstr, 1);
    rb_define_method(cDeflate, "flush", rb_deflate_flush, -1);
    rb_define_method(cDeflate, "params", rb_deflate_params, 2);
    rb_define_method(cDeflate, "set_dictionary", rb_deflate_set_dictionary, 1);

    cInflate = rb_define_class_under(mZlib, "Inflate", cZStream);
    rb_define_singleton_method(cInflate, "inflate", rb_inflate_s_inflate, 1);
    rb_define_alloc_func(cInflate, rb_inflate_s_allocate);
    rb_define_method(cInflate, "initialize", rb_inflate_initialize, -1);
    rb_define_method(cInflate, "inflate", rb_inflate_inflate, 1);
    rb_define_method(cInflate, "<<", rb_inflate_addstr, 1);
    rb_define_method(cInflate, "sync", rb_inflate_sync, 1);
    rb_define_method(cInflate, "sync_point?", rb_inflate_sync_point_p, 0);
    rb_define_method(cInflate, "set_dictionary", rb_inflate_set_dictionary, 1);

    rb_define_const(mZlib, "NO_COMPRESSION", INT2FIX(Z_NO_COMPRESSION));
    rb_define_const(mZlib, "BEST_SPEED", INT2FIX(Z_BEST_SPEED));
    rb_define_const(mZlib, "BEST_COMPRESSION", INT2FIX(Z_BEST_COMPRESSION));
    rb_define_const(mZlib, "DEFAULT_COMPRESSION",
                    INT2FIX(Z_DEFAULT_COMPRESSION));

    rb_define_const(mZlib, "FILTERED", INT2FIX(Z_FILTERED));
    rb_define_const(mZlib, "HUFFMAN_ONLY", INT2FIX(Z_HUFFMAN_ONLY));
    rb_define_const(mZlib, "DEFAULT_STRATEGY", INT2FIX(Z_DEFAULT_STRATEGY));

    rb_define_const(mZlib, "MAX_WBITS", INT2FIX(MAX_WBITS));
    rb_define_const(mZlib, "DEF_MEM_LEVEL", INT2FIX(DEF_MEM_LEVEL));
    rb_define_const(mZlib, "MAX_MEM_LEVEL", INT2FIX(MAX_MEM_LEVEL));

    rb_define_const(mZlib, "NO_FLUSH", INT2FIX(Z_NO_FLUSH));
    rb_define_const(mZlib, "SYNC_FLUSH", INT2FIX(Z_SYNC_FLUSH));
    rb_define_const(mZlib, "FULL_FLUSH", INT2FIX(Z_FULL_FLUSH));
    rb_define_const(mZlib, "FINISH", INT2FIX(Z_FINISH));

#if GZIP_SUPPORT
    id_write = rb_intern("write");
    id_read = rb_intern("read");
    id_readpartial = rb_intern("readpartial");
    id_flush = rb_intern("flush");
    id_seek = rb_intern("seek");
    id_close = rb_intern("close");

    cGzipFile = rb_define_class_under(mZlib, "GzipFile", rb_cObject);
    cGzError = rb_define_class_under(cGzipFile, "Error", cZError);

    cNoFooter = rb_define_class_under(cGzipFile, "NoFooter", cGzError);
    cCRCError = rb_define_class_under(cGzipFile, "CRCError", cGzError);
    cLengthError = rb_define_class_under(cGzipFile,"LengthError",cGzError);

    cGzipWriter = rb_define_class_under(mZlib, "GzipWriter", cGzipFile);
    cGzipReader = rb_define_class_under(mZlib, "GzipReader", cGzipFile);
    rb_include_module(cGzipReader, rb_mEnumerable);

    rb_define_singleton_method(cGzipFile, "wrap", rb_gzfile_s_wrap, -1);
    rb_undef_alloc_func(cGzipFile);
    rb_define_method(cGzipFile, "to_io", rb_gzfile_to_io, 0);
    rb_define_method(cGzipFile, "crc", rb_gzfile_crc, 0);
    rb_define_method(cGzipFile, "mtime", rb_gzfile_mtime, 0);
    rb_define_method(cGzipFile, "level", rb_gzfile_level, 0);
    rb_define_method(cGzipFile, "os_code", rb_gzfile_os_code, 0);
    rb_define_method(cGzipFile, "orig_name", rb_gzfile_orig_name, 0);
    rb_define_method(cGzipFile, "comment", rb_gzfile_comment, 0);
    rb_define_method(cGzipReader, "lineno", rb_gzfile_lineno, 0);
    rb_define_method(cGzipReader, "lineno=", rb_gzfile_set_lineno, 1);
    rb_define_method(cGzipWriter, "mtime=", rb_gzfile_set_mtime, 1);
    rb_define_method(cGzipWriter, "orig_name=", rb_gzfile_set_orig_name,1);
    rb_define_method(cGzipWriter, "comment=", rb_gzfile_set_comment, 1);
    rb_define_method(cGzipFile, "close", rb_gzfile_close, 0);
    rb_define_method(cGzipFile, "finish", rb_gzfile_finish, 0);
    rb_define_method(cGzipFile, "closed?", rb_gzfile_closed_p, 0);
    rb_define_method(cGzipReader, "eof", rb_gzfile_eof_p, 0);
    rb_define_method(cGzipReader, "eof?", rb_gzfile_eof_p, 0);
    rb_define_method(cGzipFile, "sync", rb_gzfile_sync, 0);
    rb_define_method(cGzipFile, "sync=", rb_gzfile_set_sync, 1);
    rb_define_method(cGzipReader, "pos", rb_gzfile_total_out, 0);
    rb_define_method(cGzipWriter, "pos", rb_gzfile_total_in, 0);
    rb_define_method(cGzipReader, "tell", rb_gzfile_total_out, 0);
    rb_define_method(cGzipWriter, "tell", rb_gzfile_total_in, 0);

    rb_define_singleton_method(cGzipWriter, "open", rb_gzwriter_s_open,-1);
    rb_define_alloc_func(cGzipWriter, rb_gzwriter_s_allocate);
    rb_define_method(cGzipWriter, "initialize", rb_gzwriter_initialize,-1);
    rb_define_method(cGzipWriter, "flush", rb_gzwriter_flush, -1);
    rb_define_method(cGzipWriter, "write", rb_gzwriter_write, 1);
    rb_define_method(cGzipWriter, "putc", rb_gzwriter_putc, 1);
    rb_define_method(cGzipWriter, "<<", rb_gzwriter_addstr, 1);
    rb_define_method(cGzipWriter, "printf", rb_gzwriter_printf, -1);
    rb_define_method(cGzipWriter, "print", rb_gzwriter_print, -1);
    rb_define_method(cGzipWriter, "puts", rb_gzwriter_puts, -1);

    rb_define_singleton_method(cGzipReader, "open", rb_gzreader_s_open,-1);
    rb_define_alloc_func(cGzipReader, rb_gzreader_s_allocate);
    rb_define_method(cGzipReader, "initialize", rb_gzreader_initialize, 1);
    rb_define_method(cGzipReader, "rewind", rb_gzreader_rewind, 0);
    rb_define_method(cGzipReader, "unused", rb_gzreader_unused, 0);
    rb_define_method(cGzipReader, "read", rb_gzreader_read, -1);
    rb_define_method(cGzipReader, "readpartial", rb_gzreader_readpartial, -1);
    rb_define_method(cGzipReader, "getc", rb_gzreader_getc, 0);
    rb_define_method(cGzipReader, "readchar", rb_gzreader_readchar, 0);
    rb_define_method(cGzipReader, "each_byte", rb_gzreader_each_byte, 0);
    rb_define_method(cGzipReader, "ungetc", rb_gzreader_ungetc, 1);
    rb_define_method(cGzipReader, "gets", rb_gzreader_gets, -1);
    rb_define_method(cGzipReader, "readline", rb_gzreader_readline, -1);
    rb_define_method(cGzipReader, "each", rb_gzreader_each, -1);
    rb_define_method(cGzipReader, "each_line", rb_gzreader_each, -1);
    rb_define_method(cGzipReader, "readlines", rb_gzreader_readlines, -1);

    rb_define_const(mZlib, "OS_CODE", INT2FIX(OS_CODE));
    rb_define_const(mZlib, "OS_MSDOS", INT2FIX(OS_MSDOS));
    rb_define_const(mZlib, "OS_AMIGA", INT2FIX(OS_AMIGA));
    rb_define_const(mZlib, "OS_VMS", INT2FIX(OS_VMS));
    rb_define_const(mZlib, "OS_UNIX", INT2FIX(OS_UNIX));
    rb_define_const(mZlib, "OS_ATARI", INT2FIX(OS_ATARI));
    rb_define_const(mZlib, "OS_OS2", INT2FIX(OS_OS2));
    rb_define_const(mZlib, "OS_MACOS", INT2FIX(OS_MACOS));
    rb_define_const(mZlib, "OS_TOPS20", INT2FIX(OS_TOPS20));
    rb_define_const(mZlib, "OS_WIN32", INT2FIX(OS_WIN32));

    rb_define_const(mZlib, "OS_VMCMS", INT2FIX(OS_VMCMS));
    rb_define_const(mZlib, "OS_ZSYSTEM", INT2FIX(OS_ZSYSTEM));
    rb_define_const(mZlib, "OS_CPM", INT2FIX(OS_CPM));
    rb_define_const(mZlib, "OS_QDOS", INT2FIX(OS_QDOS));
    rb_define_const(mZlib, "OS_RISCOS", INT2FIX(OS_RISCOS));
    rb_define_const(mZlib, "OS_UNKNOWN", INT2FIX(OS_UNKNOWN));

#endif /* GZIP_SUPPORT */
}

/* Document error classes. */

/*
 * Document-class: Zlib::Error
 *
 * The superclass for all exceptions raised by Ruby/zlib.
 *
 * The following exceptions are defined as subclasses of Zlib::Error. These
 * exceptions are raised when zlib library functions return with an error
 * status.
 *
 * - Zlib::StreamEnd
 * - Zlib::NeedDict
 * - Zlib::DataError
 * - Zlib::StreamError
 * - Zlib::MemError
 * - Zlib::BufError
 * - Zlib::VersionError
 *
 */

/*
 * Document-class: Zlib::GzipFile::Error
 *
 * Base class of errors that occur when processing GZIP files.
 */

/*
 * Document-class: Zlib::GzipFile::NoFooter
 *
 * Raised when gzip file footer is not found.
 */

/*
 * Document-class: Zlib::GzipFile::CRCError
 *
 * Raised when the CRC checksum recorded in gzip file footer is not equivalent
 * to the CRC checksum of the actual uncompressed data.
 */

/*
 * Document-class: Zlib::GzipFile::LengthError
 *
 * Raised when the data length recorded in the gzip file footer is not equivalent
 * to the length of the actual uncompressed data.
 */
/* [<][>][^] [v] [top][bottom][index] [help] */


missing/acosh.c

root/missing/acosh.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. acosh
  2. asinh
  3. atanh
/**********************************************************************

  acosh.c -

  $Author: ocean $
  $Date: 2005/10/22 01:28:00 $
  created at: Fri Apr 12 00:34:17 JST 2002

  public domain rewrite of acosh(3), asinh(3) and atanh(3)

**********************************************************************/

#include <errno.h>
#include <float.h>
#include <math.h>

/* DBL_MANT_DIG must be less than 4 times of bits of int */
#ifndef DBL_MANT_DIG
#define DBL_MANT_DIG 53         /* in this case, at least 12 digit precision */
#endif
#define BIG_CRITERIA_BIT (1<<DBL_MANT_DIG/2)
#if BIG_CRITERIA_BIT > 0
#define BIG_CRITERIA (1.0*BIG_CRITERIA_BIT)
#else
#define BIG_CRITERIA (1.0*(1<<DBL_MANT_DIG/4)*(1<<(DBL_MANT_DIG/2+1-DBL_MANT_DIG/4)))
#endif
#define SMALL_CRITERIA_BIT (1<<(DBL_MANT_DIG/3))
#if SMALL_CRITERIA_BIT > 0
#define SMALL_CRITERIA (1.0/SMALL_CRITERIA_BIT)
#else
#define SMALL_CRITERIA (1.0*(1<<DBL_MANT_DIG/4)*(1<<(DBL_MANT_DIG/3+1-DBL_MANT_DIG/4)))
#endif

#ifndef HAVE_ACOSH
double
acosh(double x)
{
    if (x < 1)
        x = -1;                 /* NaN */
    else if (x == 1)
        return 0;
    else if (x > BIG_CRITERIA)
        x += x;
    else
        x += sqrt((x + 1) * (x - 1));
    return log(x);
}
#endif

#ifndef HAVE_ASINH
double
asinh(double x)
{
    int neg = x < 0;
    double z = fabs(x);

    if (z < SMALL_CRITERIA) return x;
    if (z < (1.0/(1<<DBL_MANT_DIG/5))) {
        double x2 = z * z;
        z *= 1 + x2 * (-1.0/6.0 + x2 * 3.0/40.0);
    }
    else if (z > BIG_CRITERIA) {
        z = log(z + z);
    }
    else {
        z = log(z + sqrt(z * z + 1));
    }
    if (neg) z = -z;
    return z;
}
#endif

#ifndef HAVE_ATANH
double
atanh(double x)
{
    int neg = x < 0;
    double z = fabs(x);

    if (z < SMALL_CRITERIA) return x;
    z = log(z > 1 ? -1 : (1 + z) / (1 - z)) / 2;
    if (neg) z = -z;
    return z;
}
#endif
/* [<][>][^] [v] [top][bottom][index] [help] */


missing/alloca.c

root/missing/alloca.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. find_stack_direction
  2. header
  3. alloca
/* alloca -- (mostly) portable public-domain implementation -- D A Gwyn

   last edit:   86/05/30        rms
   include config.h, since on VMS it renames some symbols.
   Use xmalloc instead of malloc.

   This implementation of the PWB library alloca() function,
   which is used to allocate space off the run-time stack so
   that it is automatically reclaimed upon procedure exit,
   was inspired by discussions with J. Q. Johnson of Cornell.

   It should work under any C implementation that uses an
   actual procedure stack (as opposed to a linked list of
   frames).  There are some preprocessor constants that can
   be defined when compiling for your specific system, for
   improved efficiency; however, the defaults should be okay.

   The general concept of this implementation is to keep
   track of all alloca()-allocated blocks, and reclaim any
   that are found to be deeper in the stack than the current
   invocation.  This heuristic does not reclaim storage as
   soon as it becomes invalid, but it will do so eventually.

   As a special case, alloca(0) reclaims storage without
   allocating any.  It is a good idea to use alloca(0) in
   your main control loop, etc. to force garbage collection.
*/
#ifndef lint
static char     SCCSid[] = "@(#)alloca.c        1.1";   /* for the "what" utility */
#endif

#include "config.h"
#ifdef emacs
#ifdef static
/* actually, only want this if static is defined as ""
   -- this is for usg, in which emacs must undefine static
   in order to make unexec workable
   */
#ifndef STACK_DIRECTION
you
lose
-- must know STACK_DIRECTION at compile-time
#endif /* STACK_DIRECTION undefined */
#endif /* static */
#endif /* emacs */

#ifdef X3J11
typedef void    *pointer;               /* generic pointer type */
#else
typedef char    *pointer;               /* generic pointer type */
#endif /* X3J11 */

#define NULL    0                       /* null pointer constant */

#ifdef RUBY_LIB
#define xmalloc ruby_xmalloc
#define xfree ruby_xfree
#endif

extern void     xfree();
extern pointer  xmalloc();

/*
        Define STACK_DIRECTION if you know the direction of stack
        growth for your system; otherwise it will be automatically
        deduced at run-time.

        STACK_DIRECTION > 0 => grows toward higher addresses
        STACK_DIRECTION < 0 => grows toward lower addresses
        STACK_DIRECTION = 0 => direction of growth unknown
*/

#ifndef STACK_DIRECTION
#define STACK_DIRECTION 0               /* direction unknown */
#endif

#if STACK_DIRECTION != 0

#define STACK_DIR       STACK_DIRECTION /* known at compile-time */

#else   /* STACK_DIRECTION == 0; need run-time code */

static int      stack_dir;              /* 1 or -1 once known */
#define STACK_DIR       stack_dir

static void
find_stack_direction (/* void */)
{
  static char   *addr = NULL;   /* address of first
                                   `dummy', once known */
  auto char     dummy;          /* to get stack address */

  if (addr == NULL)
    {                           /* initial entry */
      addr = &dummy;

      find_stack_direction ();  /* recurse once */
    }
  else                          /* second entry */
    if (&dummy > addr)
      stack_dir = 1;            /* stack grew upward */
    else
      stack_dir = -1;           /* stack grew downward */
}

#endif  /* STACK_DIRECTION == 0 */

/*
        An "alloca header" is used to:
        (a) chain together all alloca()ed blocks;
        (b) keep track of stack depth.

        It is very important that sizeof(header) agree with malloc()
        alignment chunk size.  The following default should work okay.
*/

#ifndef ALIGN_SIZE
#define ALIGN_SIZE      sizeof(double)
#endif

typedef union hdr
{
  char  align[ALIGN_SIZE];      /* to force sizeof(header) */
  struct
    {
      union hdr *next;          /* for chaining headers */
      char *deep;               /* for stack depth measure */
    } h;
} header;

/*
        alloca( size ) returns a pointer to at least `size' bytes of
        storage which will be automatically reclaimed upon exit from
        the procedure that called alloca().  Originally, this space
        was supposed to be taken from the current stack frame of the
        caller, but that method cannot be made to work for some
        implementations of C, for example under Gould's UTX/32.
*/

static header *last_alloca_header = NULL; /* -> last alloca header */

pointer
alloca (size)                   /* returns pointer to storage */
     unsigned   size;           /* # bytes to allocate */
{
  auto char     probe;          /* probes stack depth: */
  register char *depth = &probe;

#if STACK_DIRECTION == 0
  if (STACK_DIR == 0)           /* unknown growth direction */
    find_stack_direction ();
#endif

  /* Reclaim garbage, defined as all alloca()ed storage that
     was allocated from deeper in the stack than currently. */
  {
    register header     *hp;    /* traverses linked list */

    for (hp = last_alloca_header; hp != NULL;)
      if (STACK_DIR > 0 && hp->h.deep > depth
          || STACK_DIR < 0 && hp->h.deep < depth)
        {
          register header       *np = hp->h.next;

          xfree ((pointer) hp); /* collect garbage */

          hp = np;              /* -> next header */
        }
      else
        break;                  /* rest are not deeper */

    last_alloca_header = hp;    /* -> last valid storage */
  }

  if (size == 0)
    return NULL;                /* no allocation required */

  /* Allocate combined header + user data storage. */

  {
    register pointer    new = xmalloc (sizeof (header) + size);
    /* address of header */

    ((header *)new)->h.next = last_alloca_header;
    ((header *)new)->h.deep = depth;

    last_alloca_header = (header *)new;

    /* User storage begins just after header. */

    return (pointer)((char *)new + sizeof(header));
  }
}
/* [<][>][^] [v] [top][bottom][index] [help] */


missing/crypt.c

root/missing/crypt.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. C_block
  2. permute
  3. crypt
  4. des_setkey
  5. des_cipher
  6. init_des
  7. init_perm
  8. setkey
  9. encrypt
  10. prtab
/*
 * Copyright (c) 1989, 1993
 *      The Regents of the University of California.  All rights reserved.
 *
 * This code is derived from software contributed to Berkeley by
 * Tom Truscott.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. Neither the name of the University nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)crypt.c     8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <limits.h>
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
#include <stdio.h>
#ifndef _PASSWORD_EFMT1
#define _PASSWORD_EFMT1 '_'
#endif

/*
 * UNIX password, and DES, encryption.
 * By Tom Truscott, trt@rti.rti.org,
 * from algorithms by Robert W. Baldwin and James Gillogly.
 *
 * References:
 * "Mathematical Cryptology for Computer Scientists and Mathematicians,"
 * by Wayne Patterson, 1987, ISBN 0-8476-7438-X.
 *
 * "Password Security: A Case History," R. Morris and Ken Thompson,
 * Communications of the ACM, vol. 22, pp. 594-597, Nov. 1979.
 *
 * "DES will be Totally Insecure within Ten Years," M.E. Hellman,
 * IEEE Spectrum, vol. 16, pp. 32-39, July 1979.
 */

/* =====  Configuration ==================== */

/*
 * define "MUST_ALIGN" if your compiler cannot load/store
 * long integers at arbitrary (e.g. odd) memory locations.
 * (Either that or never pass unaligned addresses to des_cipher!)
 */
#if !defined(vax)
#define MUST_ALIGN
#endif

#ifdef CHAR_BITS
#if CHAR_BITS != 8
        #error C_block structure assumes 8 bit characters
#endif
#endif

/*
 * define "LONG_IS_32_BITS" only if sizeof(long)==4.
 * This avoids use of bit fields (your compiler may be sloppy with them).
 */
#if !defined(cray)
#define LONG_IS_32_BITS
#endif

/*
 * define "B64" to be the declaration for a 64 bit integer.
 * XXX this feature is currently unused, see "endian" comment below.
 */
#if defined(cray)
#define B64     long
#endif
#if defined(convex)
#define B64     long long
#endif

/*
 * define "LARGEDATA" to get faster permutations, by using about 72 kilobytes
 * of lookup tables.  This speeds up des_setkey() and des_cipher(), but has
 * little effect on crypt().
 */
#if defined(notdef)
#define LARGEDATA
#endif

/* compile with "-DSTATIC=int" when profiling */
#ifndef STATIC
#define STATIC  static
#endif
STATIC init_des(), init_perm(), permute();
#ifdef DEBUG
STATIC prtab();
#endif

/* ==================================== */

/*
 * Cipher-block representation (Bob Baldwin):
 *
 * DES operates on groups of 64 bits, numbered 1..64 (sigh).  One
 * representation is to store one bit per byte in an array of bytes.  Bit N of
 * the NBS spec is stored as the LSB of the Nth byte (index N-1) in the array.
 * Another representation stores the 64 bits in 8 bytes, with bits 1..8 in the
 * first byte, 9..16 in the second, and so on.  The DES spec apparently has
 * bit 1 in the MSB of the first byte, but that is particularly noxious so we
 * bit-reverse each byte so that bit 1 is the LSB of the first byte, bit 8 is
 * the MSB of the first byte.  Specifically, the 64-bit input data and key are
 * converted to LSB format, and the output 64-bit block is converted back into
 * MSB format.
 *
 * DES operates internally on groups of 32 bits which are expanded to 48 bits
 * by permutation E and shrunk back to 32 bits by the S boxes.  To speed up
 * the computation, the expansion is applied only once, the expanded
 * representation is maintained during the encryption, and a compression
 * permutation is applied only at the end.  To speed up the S-box lookups,
 * the 48 bits are maintained as eight 6 bit groups, one per byte, which
 * directly feed the eight S-boxes.  Within each byte, the 6 bits are the
 * most significant ones.  The low two bits of each byte are zero.  (Thus,
 * bit 1 of the 48 bit E expansion is stored as the "4"-valued bit of the
 * first byte in the eight byte representation, bit 2 of the 48 bit value is
 * the "8"-valued bit, and so on.)  In fact, a combined "SPE"-box lookup is
 * used, in which the output is the 64 bit result of an S-box lookup which
 * has been permuted by P and expanded by E, and is ready for use in the next
 * iteration.  Two 32-bit wide tables, SPE[0] and SPE[1], are used for this
 * lookup.  Since each byte in the 48 bit path is a multiple of four, indexed
 * lookup of SPE[0] and SPE[1] is simple and fast.  The key schedule and
 * "salt" are also converted to this 8*(6+2) format.  The SPE table size is
 * 8*64*8 = 4K bytes.
 *
 * To speed up bit-parallel operations (such as XOR), the 8 byte
 * representation is "union"ed with 32 bit values "i0" and "i1", and, on
 * machines which support it, a 64 bit value "b64".  This data structure,
 * "C_block", has two problems.  First, alignment restrictions must be
 * honored.  Second, the byte-order (e.g. little-endian or big-endian) of
 * the architecture becomes visible.
 *
 * The byte-order problem is unfortunate, since on the one hand it is good
 * to have a machine-independent C_block representation (bits 1..8 in the
 * first byte, etc.), and on the other hand it is good for the LSB of the
 * first byte to be the LSB of i0.  We cannot have both these things, so we
 * currently use the "little-endian" representation and avoid any multi-byte
 * operations that depend on byte order.  This largely precludes use of the
 * 64-bit datatype since the relative order of i0 and i1 are unknown.  It
 * also inhibits grouping the SPE table to look up 12 bits at a time.  (The
 * 12 bits can be stored in a 16-bit field with 3 low-order zeroes and 1
 * high-order zero, providing fast indexing into a 64-bit wide SPE.)  On the
 * other hand, 64-bit datatypes are currently rare, and a 12-bit SPE lookup
 * requires a 128 kilobyte table, so perhaps this is not a big loss.
 *
 * Permutation representation (Jim Gillogly):
 *
 * A transformation is defined by its effect on each of the 8 bytes of the
 * 64-bit input.  For each byte we give a 64-bit output that has the bits in
 * the input distributed appropriately.  The transformation is then the OR
 * of the 8 sets of 64-bits.  This uses 8*256*8 = 16K bytes of storage for
 * each transformation.  Unless LARGEDATA is defined, however, a more compact
 * table is used which looks up 16 4-bit "chunks" rather than 8 8-bit chunks.
 * The smaller table uses 16*16*8 = 2K bytes for each transformation.  This
 * is slower but tolerable, particularly for password encryption in which
 * the SPE transformation is iterated many times.  The small tables total 9K
 * bytes, the large tables total 72K bytes.
 *
 * The transformations used are:
 * IE3264: MSB->LSB conversion, initial permutation, and expansion.
 *      This is done by collecting the 32 even-numbered bits and applying
 *      a 32->64 bit transformation, and then collecting the 32 odd-numbered
 *      bits and applying the same transformation.  Since there are only
 *      32 input bits, the IE3264 transformation table is half the size of
 *      the usual table.
 * CF6464: Compression, final permutation, and LSB->MSB conversion.
 *      This is done by two trivial 48->32 bit compressions to obtain
 *      a 64-bit block (the bit numbering is given in the "CIFP" table)
 *      followed by a 64->64 bit "cleanup" transformation.  (It would
 *      be possible to group the bits in the 64-bit block so that 2
 *      identical 32->32 bit transformations could be used instead,
 *      saving a factor of 4 in space and possibly 2 in time, but
 *      byte-ordering and other complications rear their ugly head.
 *      Similar opportunities/problems arise in the key schedule
 *      transforms.)
 * PC1ROT: MSB->LSB, PC1 permutation, rotate, and PC2 permutation.
 *      This admittedly baroque 64->64 bit transformation is used to
 *      produce the first code (in 8*(6+2) format) of the key schedule.
 * PC2ROT[0]: Inverse PC2 permutation, rotate, and PC2 permutation.
 *      It would be possible to define 15 more transformations, each
 *      with a different rotation, to generate the entire key schedule.
 *      To save space, however, we instead permute each code into the
 *      next by using a transformation that "undoes" the PC2 permutation,
 *      rotates the code, and then applies PC2.  Unfortunately, PC2
 *      transforms 56 bits into 48 bits, dropping 8 bits, so PC2 is not
 *      invertible.  We get around that problem by using a modified PC2
 *      which retains the 8 otherwise-lost bits in the unused low-order
 *      bits of each byte.  The low-order bits are cleared when the
 *      codes are stored into the key schedule.
 * PC2ROT[1]: Same as PC2ROT[0], but with two rotations.
 *      This is faster than applying PC2ROT[0] twice,
 *
 * The Bell Labs "salt" (Bob Baldwin):
 *
 * The salting is a simple permutation applied to the 48-bit result of E.
 * Specifically, if bit i (1 <= i <= 24) of the salt is set then bits i and
 * i+24 of the result are swapped.  The salt is thus a 24 bit number, with
 * 16777216 possible values.  (The original salt was 12 bits and could not
 * swap bits 13..24 with 36..48.)
 *
 * It is possible, but ugly, to warp the SPE table to account for the salt
 * permutation.  Fortunately, the conditional bit swapping requires only
 * about four machine instructions and can be done on-the-fly with about an
 * 8% performance penalty.
 */

typedef union {
        unsigned char b[8];
        struct {
#if defined(LONG_IS_32_BITS)
                /* long is often faster than a 32-bit bit field */
                long    i0;
                long    i1;
#else
                long    i0: 32;
                long    i1: 32;
#endif
        } b32;
#if defined(B64)
        B64     b64;
#endif
} C_block;

/*
 * Convert twenty-four-bit long in host-order
 * to six bits (and 2 low-order zeroes) per char little-endian format.
 */
#define TO_SIX_BIT(rslt, src) {                         \
                C_block cvt;                            \
                cvt.b[0] = src; src >>= 6;              \
                cvt.b[1] = src; src >>= 6;              \
                cvt.b[2] = src; src >>= 6;              \
                cvt.b[3] = src;                         \
                rslt = (cvt.b32.i0 & 0x3f3f3f3fL) << 2; \
        }

/*
 * These macros may someday permit efficient use of 64-bit integers.
 */
#define ZERO(d,d0,d1)                   d0 = 0, d1 = 0
#define LOAD(d,d0,d1,bl)                d0 = (bl).b32.i0, d1 = (bl).b32.i1
#define LOADREG(d,d0,d1,s,s0,s1)        d0 = s0, d1 = s1
#define OR(d,d0,d1,bl)                  d0 |= (bl).b32.i0, d1 |= (bl).b32.i1
#define STORE(s,s0,s1,bl)               (bl).b32.i0 = s0, (bl).b32.i1 = s1
#define DCL_BLOCK(d,d0,d1)              long d0, d1

#if defined(LARGEDATA)
        /* Waste memory like crazy.  Also, do permutations in line */
#define LGCHUNKBITS     3
#define CHUNKBITS       (1<<LGCHUNKBITS)
#define PERM6464(d,d0,d1,cpp,p)                         \
        LOAD(d,d0,d1,(p)[(0<<CHUNKBITS)+(cpp)[0]]);             \
        OR (d,d0,d1,(p)[(1<<CHUNKBITS)+(cpp)[1]]);              \
        OR (d,d0,d1,(p)[(2<<CHUNKBITS)+(cpp)[2]]);              \
        OR (d,d0,d1,(p)[(3<<CHUNKBITS)+(cpp)[3]]);              \
        OR (d,d0,d1,(p)[(4<<CHUNKBITS)+(cpp)[4]]);              \
        OR (d,d0,d1,(p)[(5<<CHUNKBITS)+(cpp)[5]]);              \
        OR (d,d0,d1,(p)[(6<<CHUNKBITS)+(cpp)[6]]);              \
        OR (d,d0,d1,(p)[(7<<CHUNKBITS)+(cpp)[7]]);
#define PERM3264(d,d0,d1,cpp,p)                         \
        LOAD(d,d0,d1,(p)[(0<<CHUNKBITS)+(cpp)[0]]);             \
        OR (d,d0,d1,(p)[(1<<CHUNKBITS)+(cpp)[1]]);              \
        OR (d,d0,d1,(p)[(2<<CHUNKBITS)+(cpp)[2]]);              \
        OR (d,d0,d1,(p)[(3<<CHUNKBITS)+(cpp)[3]]);
#else
        /* "small data" */
#define LGCHUNKBITS     2
#define CHUNKBITS       (1<<LGCHUNKBITS)
#define PERM6464(d,d0,d1,cpp,p)                         \
        { C_block tblk; permute(cpp,&tblk,p,8); LOAD (d,d0,d1,tblk); }
#define PERM3264(d,d0,d1,cpp,p)                         \
        { C_block tblk; permute(cpp,&tblk,p,4); LOAD (d,d0,d1,tblk); }

STATIC
permute(cp, out, p, chars_in)
        unsigned char *cp;
        C_block *out;
        register C_block *p;
        int chars_in;
{
        register DCL_BLOCK(D,D0,D1);
        register C_block *tp;
        register int t;

        ZERO(D,D0,D1);
        do {
                t = *cp++;
                tp = &p[t&0xf]; OR(D,D0,D1,*tp); p += (1<<CHUNKBITS);
                tp = &p[t>>4];  OR(D,D0,D1,*tp); p += (1<<CHUNKBITS);
        } while (--chars_in > 0);
        STORE(D,D0,D1,*out);
}
#endif /* LARGEDATA */

/* =====  (mostly) Standard DES Tables ==================== */

static unsigned char IP[] = {           /* initial permutation */
        58, 50, 42, 34, 26, 18, 10,  2,
        60, 52, 44, 36, 28, 20, 12,  4,
        62, 54, 46, 38, 30, 22, 14,  6,
        64, 56, 48, 40, 32, 24, 16,  8,
        57, 49, 41, 33, 25, 17,  9,  1,
        59, 51, 43, 35, 27, 19, 11,  3,
        61, 53, 45, 37, 29, 21, 13,  5,
        63, 55, 47, 39, 31, 23, 15,  7,
};

/* The final permutation is the inverse of IP - no table is necessary */

static unsigned char ExpandTr[] = {     /* expansion operation */
        32,  1,  2,  3,  4,  5,
         4,  5,  6,  7,  8,  9,
         8,  9, 10, 11, 12, 13,
        12, 13, 14, 15, 16, 17,
        16, 17, 18, 19, 20, 21,
        20, 21, 22, 23, 24, 25,
        24, 25, 26, 27, 28, 29,
        28, 29, 30, 31, 32,  1,
};

static unsigned char PC1[] = {          /* permuted choice table 1 */
        57, 49, 41, 33, 25, 17,  9,
         1, 58, 50, 42, 34, 26, 18,
        10,  2, 59, 51, 43, 35, 27,
        19, 11,  3, 60, 52, 44, 36,

        63, 55, 47, 39, 31, 23, 15,
         7, 62, 54, 46, 38, 30, 22,
        14,  6, 61, 53, 45, 37, 29,
        21, 13,  5, 28, 20, 12,  4,
};

static unsigned char Rotates[] = {      /* PC1 rotation schedule */
        1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1,
};

/* note: each "row" of PC2 is left-padded with bits that make it invertible */
static unsigned char PC2[] = {          /* permuted choice table 2 */
         9, 18,    14, 17, 11, 24,  1,  5,
        22, 25,     3, 28, 15,  6, 21, 10,
        35, 38,    23, 19, 12,  4, 26,  8,
        43, 54,    16,  7, 27, 20, 13,  2,

         0,  0,    41, 52, 31, 37, 47, 55,
         0,  0,    30, 40, 51, 45, 33, 48,
         0,  0,    44, 49, 39, 56, 34, 53,
         0,  0,    46, 42, 50, 36, 29, 32,
};

static unsigned char S[8][64] = {       /* 48->32 bit substitution tables */
                                        /* S[1]                 */
        14,  4, 13,  1,  2, 15, 11,  8,  3, 10,  6, 12,  5,  9,  0,  7,
         0, 15,  7,  4, 14,  2, 13,  1, 10,  6, 12, 11,  9,  5,  3,  8,
         4,  1, 14,  8, 13,  6,  2, 11, 15, 12,  9,  7,  3, 10,  5,  0,
        15, 12,  8,  2,  4,  9,  1,  7,  5, 11,  3, 14, 10,  0,  6, 13,
                                        /* S[2]                 */
        15,  1,  8, 14,  6, 11,  3,  4,  9,  7,  2, 13, 12,  0,  5, 10,
         3, 13,  4,  7, 15,  2,  8, 14, 12,  0,  1, 10,  6,  9, 11,  5,
         0, 14,  7, 11, 10,  4, 13,  1,  5,  8, 12,  6,  9,  3,  2, 15,
        13,  8, 10,  1,  3, 15,  4,  2, 11,  6,  7, 12,  0,  5, 14,  9,
                                        /* S[3]                 */
        10,  0,  9, 14,  6,  3, 15,  5,  1, 13, 12,  7, 11,  4,  2,  8,
        13,  7,  0,  9,  3,  4,  6, 10,  2,  8,  5, 14, 12, 11, 15,  1,
        13,  6,  4,  9,  8, 15,  3,  0, 11,  1,  2, 12,  5, 10, 14,  7,
         1, 10, 13,  0,  6,  9,  8,  7,  4, 15, 14,  3, 11,  5,  2, 12,
                                        /* S[4]                 */
         7, 13, 14,  3,  0,  6,  9, 10,  1,  2,  8,  5, 11, 12,  4, 15,
        13,  8, 11,  5,  6, 15,  0,  3,  4,  7,  2, 12,  1, 10, 14,  9,
        10,  6,  9,  0, 12, 11,  7, 13, 15,  1,  3, 14,  5,  2,  8,  4,
         3, 15,  0,  6, 10,  1, 13,  8,  9,  4,  5, 11, 12,  7,  2, 14,
                                        /* S[5]                 */
         2, 12,  4,  1,  7, 10, 11,  6,  8,  5,  3, 15, 13,  0, 14,  9,
        14, 11,  2, 12,  4,  7, 13,  1,  5,  0, 15, 10,  3,  9,  8,  6,
         4,  2,  1, 11, 10, 13,  7,  8, 15,  9, 12,  5,  6,  3,  0, 14,
        11,  8, 12,  7,  1, 14,  2, 13,  6, 15,  0,  9, 10,  4,  5,  3,
                                        /* S[6]                 */
        12,  1, 10, 15,  9,  2,  6,  8,  0, 13,  3,  4, 14,  7,  5, 11,
        10, 15,  4,  2,  7, 12,  9,  5,  6,  1, 13, 14,  0, 11,  3,  8,
         9, 14, 15,  5,  2,  8, 12,  3,  7,  0,  4, 10,  1, 13, 11,  6,
         4,  3,  2, 12,  9,  5, 15, 10, 11, 14,  1,  7,  6,  0,  8, 13,
                                        /* S[7]                 */
         4, 11,  2, 14, 15,  0,  8, 13,  3, 12,  9,  7,  5, 10,  6,  1,
        13,  0, 11,  7,  4,  9,  1, 10, 14,  3,  5, 12,  2, 15,  8,  6,
         1,  4, 11, 13, 12,  3,  7, 14, 10, 15,  6,  8,  0,  5,  9,  2,
         6, 11, 13,  8,  1,  4, 10,  7,  9,  5,  0, 15, 14,  2,  3, 12,
                                        /* S[8]                 */
        13,  2,  8,  4,  6, 15, 11,  1, 10,  9,  3, 14,  5,  0, 12,  7,
         1, 15, 13,  8, 10,  3,  7,  4, 12,  5,  6, 11,  0, 14,  9,  2,
         7, 11,  4,  1,  9, 12, 14,  2,  0,  6, 10, 13, 15,  3,  5,  8,
         2,  1, 14,  7,  4, 10,  8, 13, 15, 12,  9,  0,  3,  5,  6, 11,
};

static unsigned char P32Tr[] = {        /* 32-bit permutation function */
        16,  7, 20, 21,
        29, 12, 28, 17,
         1, 15, 23, 26,
         5, 18, 31, 10,
         2,  8, 24, 14,
        32, 27,  3,  9,
        19, 13, 30,  6,
        22, 11,  4, 25,
};

static unsigned char CIFP[] = {         /* compressed/interleaved permutation */
         1,  2,  3,  4,   17, 18, 19, 20,
         5,  6,  7,  8,   21, 22, 23, 24,
         9, 10, 11, 12,   25, 26, 27, 28,
        13, 14, 15, 16,   29, 30, 31, 32,

        33, 34, 35, 36,   49, 50, 51, 52,
        37, 38, 39, 40,   53, 54, 55, 56,
        41, 42, 43, 44,   57, 58, 59, 60,
        45, 46, 47, 48,   61, 62, 63, 64,
};

static unsigned char itoa64[] =         /* 0..63 => ascii-64 */
        "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";

/* =====  Tables that are initialized at run time  ==================== */

static unsigned char a64toi[128];       /* ascii-64 => 0..63 */

/* Initial key schedule permutation */
static C_block  PC1ROT[64/CHUNKBITS][1<<CHUNKBITS];

/* Subsequent key schedule rotation permutations */
static C_block  PC2ROT[2][64/CHUNKBITS][1<<CHUNKBITS];

/* Initial permutation/expansion table */
static C_block  IE3264[32/CHUNKBITS][1<<CHUNKBITS];

/* Table that combines the S, P, and E operations.  */
static long SPE[2][8][64];

/* compressed/interleaved => final permutation table */
static C_block  CF6464[64/CHUNKBITS][1<<CHUNKBITS];

/* ==================================== */

static C_block  constdatablock;                 /* encryption constant */
static char     cryptresult[1+4+4+11+1];        /* encrypted result */

/*
 * Return a pointer to static data consisting of the "setting"
 * followed by an encryption produced by the "key" and "setting".
 */
char *
crypt(key, setting)
        register const char *key;
        register const char *setting;
{
        register char *encp;
        register long i;
        register int t;
        long salt;
        int num_iter, salt_size;
        C_block keyblock, rsltblock;

        for (i = 0; i < 8; i++) {
                if ((t = 2*(unsigned char)(*key)) != 0)
                        key++;
                keyblock.b[i] = t;
        }
        if (des_setkey((char *)keyblock.b))     /* also initializes "a64toi" */
                return (NULL);

        encp = &cryptresult[0];
        switch (*setting) {
        case _PASSWORD_EFMT1:
                /*
                 * Involve the rest of the password 8 characters at a time.
                 */
                while (*key) {
                        if (des_cipher((char *)&keyblock,
                            (char *)&keyblock, 0L, 1))
                                return (NULL);
                        for (i = 0; i < 8; i++) {
                                if ((t = 2*(unsigned char)(*key)) != 0)
                                        key++;
                                keyblock.b[i] ^= t;
                        }
                        if (des_setkey((char *)keyblock.b))
                                return (NULL);
                }

                *encp++ = *setting++;

                /* get iteration count */
                num_iter = 0;
                for (i = 4; --i >= 0; ) {
                        if ((t = (unsigned char)setting[i]) == '\0')
                                t = '.';
                        encp[i] = t;
                        num_iter = (num_iter<<6) | a64toi[t];
                }
                setting += 4;
                encp += 4;
                salt_size = 4;
                break;
        default:
                num_iter = 25;
                salt_size = 2;
        }

        salt = 0;
        for (i = salt_size; --i >= 0; ) {
                if ((t = (unsigned char)setting[i]) == '\0')
                        t = '.';
                encp[i] = t;
                salt = (salt<<6) | a64toi[t];
        }
        encp += salt_size;
        if (des_cipher((char *)&constdatablock, (char *)&rsltblock,
            salt, num_iter))
                return (NULL);

        /*
         * Encode the 64 cipher bits as 11 ascii characters.
         */
        i = ((long)((rsltblock.b[0]<<8) | rsltblock.b[1])<<8) | rsltblock.b[2];
        encp[3] = itoa64[i&0x3f];       i >>= 6;
        encp[2] = itoa64[i&0x3f];       i >>= 6;
        encp[1] = itoa64[i&0x3f];       i >>= 6;
        encp[0] = itoa64[i];            encp += 4;
        i = ((long)((rsltblock.b[3]<<8) | rsltblock.b[4])<<8) | rsltblock.b[5];
        encp[3] = itoa64[i&0x3f];       i >>= 6;
        encp[2] = itoa64[i&0x3f];       i >>= 6;
        encp[1] = itoa64[i&0x3f];       i >>= 6;
        encp[0] = itoa64[i];            encp += 4;
        i = ((long)((rsltblock.b[6])<<8) | rsltblock.b[7])<<2;
        encp[2] = itoa64[i&0x3f];       i >>= 6;
        encp[1] = itoa64[i&0x3f];       i >>= 6;
        encp[0] = itoa64[i];

        encp[3] = 0;

        return (cryptresult);
}

/*
 * The Key Schedule, filled in by des_setkey() or setkey().
 */
#define KS_SIZE 16
static C_block  KS[KS_SIZE];

/*
 * Set up the key schedule from the key.
 */
des_setkey(key)
        register const char *key;
{
        register DCL_BLOCK(K, K0, K1);
        register C_block *ptabp;
        register int i;
        static int des_ready = 0;

        if (!des_ready) {
                init_des();
                des_ready = 1;
        }

        PERM6464(K,K0,K1,(unsigned char *)key,(C_block *)PC1ROT);
        key = (char *)&KS[0];
        STORE(K&~0x03030303L, K0&~0x03030303L, K1, *(C_block *)key);
        for (i = 1; i < 16; i++) {
                key += sizeof(C_block);
                STORE(K,K0,K1,*(C_block *)key);
                ptabp = (C_block *)PC2ROT[Rotates[i]-1];
                PERM6464(K,K0,K1,(unsigned char *)key,ptabp);
                STORE(K&~0x03030303L, K0&~0x03030303L, K1, *(C_block *)key);
        }
        return (0);
}

/*
 * Encrypt (or decrypt if num_iter < 0) the 8 chars at "in" with abs(num_iter)
 * iterations of DES, using the the given 24-bit salt and the pre-computed key
 * schedule, and store the resulting 8 chars at "out" (in == out is permitted).
 *
 * NOTE: the performance of this routine is critically dependent on your
 * compiler and machine architecture.
 */
des_cipher(in, out, salt, num_iter)
        const char *in;
        char *out;
        long salt;
        int num_iter;
{
        /* variables that we want in registers, most important first */
#if defined(pdp11)
        register int j;
#endif
        register long L0, L1, R0, R1, k;
        register C_block *kp;
        register int ks_inc, loop_count;
        C_block B;

        L0 = salt;
        TO_SIX_BIT(salt, L0);   /* convert to 4*(6+2) format */

#if defined(vax) || defined(pdp11)
        salt = ~salt;   /* "x &~ y" is faster than "x & y". */
#define SALT (~salt)
#else
#define SALT salt
#endif

#if defined(MUST_ALIGN)
        B.b[0] = in[0]; B.b[1] = in[1]; B.b[2] = in[2]; B.b[3] = in[3];
        B.b[4] = in[4]; B.b[5] = in[5]; B.b[6] = in[6]; B.b[7] = in[7];
        LOAD(L,L0,L1,B);
#else
        LOAD(L,L0,L1,*(C_block *)in);
#endif
        LOADREG(R,R0,R1,L,L0,L1);
        L0 &= 0x55555555L;
        L1 &= 0x55555555L;
        L0 = (L0 << 1) | L1;    /* L0 is the even-numbered input bits */
        R0 &= 0xaaaaaaaaL;
        R1 = (R1 >> 1) & 0x55555555L;
        L1 = R0 | R1;           /* L1 is the odd-numbered input bits */
        STORE(L,L0,L1,B);
        PERM3264(L,L0,L1,B.b,  (C_block *)IE3264);      /* even bits */
        PERM3264(R,R0,R1,B.b+4,(C_block *)IE3264);      /* odd bits */

        if (num_iter >= 0)
        {               /* encryption */
                kp = &KS[0];
                ks_inc  = sizeof(*kp);
        }
        else
        {               /* decryption */
                num_iter = -num_iter;
                kp = &KS[KS_SIZE-1];
                ks_inc  = -sizeof(*kp);
        }

        while (--num_iter >= 0) {
                loop_count = 8;
                do {

#define SPTAB(t, i)     (*(long *)((unsigned char *)t + i*(sizeof(long)/4)))
#if defined(gould)
                        /* use this if B.b[i] is evaluated just once ... */
#define DOXOR(x,y,i)    x^=SPTAB(SPE[0][i],B.b[i]); y^=SPTAB(SPE[1][i],B.b[i]);
#else
#if defined(pdp11)
                        /* use this if your "long" int indexing is slow */
#define DOXOR(x,y,i)    j=B.b[i]; x^=SPTAB(SPE[0][i],j); y^=SPTAB(SPE[1][i],j);
#else
                        /* use this if "k" is allocated to a register ... */
#define DOXOR(x,y,i)    k=B.b[i]; x^=SPTAB(SPE[0][i],k); y^=SPTAB(SPE[1][i],k);
#endif
#endif

#define CRUNCH(p0, p1, q0, q1)  \
                        k = (q0 ^ q1) & SALT;   \
                        B.b32.i0 = k ^ q0 ^ kp->b32.i0;         \
                        B.b32.i1 = k ^ q1 ^ kp->b32.i1;         \
                        kp = (C_block *)((char *)kp+ks_inc);    \
                                                        \
                        DOXOR(p0, p1, 0);               \
                        DOXOR(p0, p1, 1);               \
                        DOXOR(p0, p1, 2);               \
                        DOXOR(p0, p1, 3);               \
                        DOXOR(p0, p1, 4);               \
                        DOXOR(p0, p1, 5);               \
                        DOXOR(p0, p1, 6);               \
                        DOXOR(p0, p1, 7);

                        CRUNCH(L0, L1, R0, R1);
                        CRUNCH(R0, R1, L0, L1);
                } while (--loop_count != 0);
                kp = (C_block *)((char *)kp-(ks_inc*KS_SIZE));

                /* swap L and R */
                L0 ^= R0;  L1 ^= R1;
                R0 ^= L0;  R1 ^= L1;
                L0 ^= R0;  L1 ^= R1;
        }

        /* store the encrypted (or decrypted) result */
        L0 = ((L0 >> 3) & 0x0f0f0f0fL) | ((L1 << 1) & 0xf0f0f0f0L);
        L1 = ((R0 >> 3) & 0x0f0f0f0fL) | ((R1 << 1) & 0xf0f0f0f0L);
        STORE(L,L0,L1,B);
        PERM6464(L,L0,L1,B.b, (C_block *)CF6464);
#if defined(MUST_ALIGN)
        STORE(L,L0,L1,B);
        out[0] = B.b[0]; out[1] = B.b[1]; out[2] = B.b[2]; out[3] = B.b[3];
        out[4] = B.b[4]; out[5] = B.b[5]; out[6] = B.b[6]; out[7] = B.b[7];
#else
        STORE(L,L0,L1,*(C_block *)out);
#endif
        return (0);
}

/*
 * Initialize various tables.  This need only be done once.  It could even be
 * done at compile time, if the compiler were capable of that sort of thing.
 */
STATIC
init_des()
{
        register int i, j;
        register long k;
        register int tableno;
        static unsigned char perm[64], tmp32[32];       /* "static" for speed */

        /*
         * table that converts chars "./0-9A-Za-z"to integers 0-63.
         */
        for (i = 0; i < 64; i++)
                a64toi[itoa64[i]] = i;

        /*
         * PC1ROT - bit reverse, then PC1, then Rotate, then PC2.
         */
        for (i = 0; i < 64; i++)
                perm[i] = 0;
        for (i = 0; i < 64; i++) {
                if ((k = PC2[i]) == 0)
                        continue;
                k += Rotates[0]-1;
                if ((k%28) < Rotates[0]) k -= 28;
                k = PC1[k];
                if (k > 0) {
                        k--;
                        k = (k|07) - (k&07);
                        k++;
                }
                perm[i] = k;
        }
#ifdef DEBUG
        prtab("pc1tab", perm, 8);
#endif
        init_perm(PC1ROT, perm, 8, 8);

        /*
         * PC2ROT - PC2 inverse, then Rotate (once or twice), then PC2.
         */
        for (j = 0; j < 2; j++) {
                unsigned char pc2inv[64];
                for (i = 0; i < 64; i++)
                        perm[i] = pc2inv[i] = 0;
                for (i = 0; i < 64; i++) {
                        if ((k = PC2[i]) == 0)
                                continue;
                        pc2inv[k-1] = i+1;
                }
                for (i = 0; i < 64; i++) {
                        if ((k = PC2[i]) == 0)
                                continue;
                        k += j;
                        if ((k%28) <= j) k -= 28;
                        perm[i] = pc2inv[k];
                }
#ifdef DEBUG
                prtab("pc2tab", perm, 8);
#endif
                init_perm(PC2ROT[j], perm, 8, 8);
        }

        /*
         * Bit reverse, then initial permutation, then expansion.
         */
        for (i = 0; i < 8; i++) {
                for (j = 0; j < 8; j++) {
                        k = (j < 2)? 0: IP[ExpandTr[i*6+j-2]-1];
                        if (k > 32)
                                k -= 32;
                        else if (k > 0)
                                k--;
                        if (k > 0) {
                                k--;
                                k = (k|07) - (k&07);
                                k++;
                        }
                        perm[i*8+j] = k;
                }
        }
#ifdef DEBUG
        prtab("ietab", perm, 8);
#endif
        init_perm(IE3264, perm, 4, 8);

        /*
         * Compression, then final permutation, then bit reverse.
         */
        for (i = 0; i < 64; i++) {
                k = IP[CIFP[i]-1];
                if (k > 0) {
                        k--;
                        k = (k|07) - (k&07);
                        k++;
                }
                perm[k-1] = i+1;
        }
#ifdef DEBUG
        prtab("cftab", perm, 8);
#endif
        init_perm(CF6464, perm, 8, 8);

        /*
         * SPE table
         */
        for (i = 0; i < 48; i++)
                perm[i] = P32Tr[ExpandTr[i]-1];
        for (tableno = 0; tableno < 8; tableno++) {
                for (j = 0; j < 64; j++)  {
                        k = (((j >> 0) &01) << 5)|
                            (((j >> 1) &01) << 3)|
                            (((j >> 2) &01) << 2)|
                            (((j >> 3) &01) << 1)|
                            (((j >> 4) &01) << 0)|
                            (((j >> 5) &01) << 4);
                        k = S[tableno][k];
                        k = (((k >> 3)&01) << 0)|
                            (((k >> 2)&01) << 1)|
                            (((k >> 1)&01) << 2)|
                            (((k >> 0)&01) << 3);
                        for (i = 0; i < 32; i++)
                                tmp32[i] = 0;
                        for (i = 0; i < 4; i++)
                                tmp32[4 * tableno + i] = (k >> i) & 01;
                        k = 0;
                        for (i = 24; --i >= 0; )
                                k = (k<<1) | tmp32[perm[i]-1];
                        TO_SIX_BIT(SPE[0][tableno][j], k);
                        k = 0;
                        for (i = 24; --i >= 0; )
                                k = (k<<1) | tmp32[perm[i+24]-1];
                        TO_SIX_BIT(SPE[1][tableno][j], k);
                }
        }
}

/*
 * Initialize "perm" to represent transformation "p", which rearranges
 * (perhaps with expansion and/or contraction) one packed array of bits
 * (of size "chars_in" characters) into another array (of size "chars_out"
 * characters).
 *
 * "perm" must be all-zeroes on entry to this routine.
 */
STATIC
init_perm(perm, p, chars_in, chars_out)
        C_block perm[64/CHUNKBITS][1<<CHUNKBITS];
        unsigned char p[64];
        int chars_in, chars_out;
{
        register int i, j, k, l;

        for (k = 0; k < chars_out*8; k++) {     /* each output bit position */
                l = p[k] - 1;           /* where this bit comes from */
                if (l < 0)
                        continue;       /* output bit is always 0 */
                i = l>>LGCHUNKBITS;     /* which chunk this bit comes from */
                l = 1<<(l&(CHUNKBITS-1));       /* mask for this bit */
                for (j = 0; j < (1<<CHUNKBITS); j++) {  /* each chunk value */
                        if ((j & l) != 0)
                                perm[i][j].b[k>>3] |= 1<<(k&07);
                }
        }
}

/*
 * "setkey" routine (for backwards compatibility)
 */
setkey(key)
        register const char *key;
{
        register int i, j, k;
        C_block keyblock;

        for (i = 0; i < 8; i++) {
                k = 0;
                for (j = 0; j < 8; j++) {
                        k <<= 1;
                        k |= (unsigned char)*key++;
                }
                keyblock.b[i] = k;
        }
        return (des_setkey((char *)keyblock.b));
}

/*
 * "encrypt" routine (for backwards compatibility)
 */
encrypt(block, flag)
        register char *block;
        int flag;
{
        register int i, j, k;
        C_block cblock;

        for (i = 0; i < 8; i++) {
                k = 0;
                for (j = 0; j < 8; j++) {
                        k <<= 1;
                        k |= (unsigned char)*block++;
                }
                cblock.b[i] = k;
        }
        if (des_cipher((char *)&cblock, (char *)&cblock, 0L, (flag ? -1: 1)))
                return (1);
        for (i = 7; i >= 0; i--) {
                k = cblock.b[i];
                for (j = 7; j >= 0; j--) {
                        *--block = k&01;
                        k >>= 1;
                }
        }
        return (0);
}

#ifdef DEBUG
STATIC
prtab(s, t, num_rows)
        char *s;
        unsigned char *t;
        int num_rows;
{
        register int i, j;

        (void)printf("%s:\n", s);
        for (i = 0; i < num_rows; i++) {
                for (j = 0; j < 8; j++) {
                         (void)printf("%3d", t[i*8+j]);
                }
                (void)printf("\n");
        }
        (void)printf("\n");
}
#endif
/* [<][>][^] [v] [top][bottom][index] [help] */


missing/dup2.c

root/missing/dup2.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. dup2
/*
 * Public domain dup2() lookalike
 * by Curtis Jackson @ AT&T Technologies, Burlington, NC
 * electronic address:  burl!rcj
 *
 * dup2 performs the following functions:
 *
 * Check to make sure that fd1 is a valid open file descriptor.
 * Check to see if fd2 is already open; if so, close it.
 * Duplicate fd1 onto fd2; checking to make sure fd2 is a valid fd.
 * Return fd2 if all went well; return BADEXIT otherwise.
 */

#include "config.h"

#if defined(HAVE_FCNTL)
# include <fcntl.h>
#endif

#if !defined(HAVE_FCNTL) || !defined(F_DUPFD)
# include <errno.h>
#endif

#define BADEXIT -1

int
dup2(int fd1, int fd2)
{
#if defined(HAVE_FCNTL) && defined(F_DUPFD)
        if (fd1 != fd2) {
#ifdef F_GETFL
                if (fcntl(fd1, F_GETFL) < 0)
                        return BADEXIT;
                if (fcntl(fd2, F_GETFL) >= 0)
                        close(fd2);
#else
                close(fd2);
#endif
                if (fcntl(fd1, F_DUPFD, fd2) < 0)
                        return BADEXIT;
        }
        return fd2;
#else
        extern int errno;
        int i, fd, fds[256];

        if (fd1 == fd2) return 0;
        close(fd2);
        for (i=0; i<256; i++) {
                fd = fds[i] = dup(fd1);
                if (fd == fd2) break;
        }
        while (i) {
                close(fds[i--]);
        }
        if (fd == fd2) return 0;
        errno = EMFILE;
        return BADEXIT;
#endif
}
/* [<][>][^][v] [top][bottom][index] [help] */


missing/erf.c

root/missing/erf.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. p_gamma
  2. q_gamma
  3. erf
  4. erfc
/* erf.c  - public domain implementation of error function erf(3m)

reference - Haruhiko Okumura: C-gengo niyoru saishin algorithm jiten
            (New Algorithm handbook in C language) (Gijyutsu hyouron
            sha, Tokyo, 1991) p.227 [in Japanese]                 */
#include <stdio.h>
#include <math.h>

#ifdef _WIN32
# include <float.h>
# if !defined __MINGW32__ || defined __NO_ISOCEXT
#  ifndef isnan
#   define isnan(x) _isnan(x)
#  endif
#  ifndef isinf
#   define isinf(x) (!_finite(x) && !_isnan(x))
#  endif
#  ifndef finite
#   define finite(x) _finite(x)
#  endif
# endif
#endif

static double q_gamma(double, double, double);

/* Incomplete gamma function
   1 / Gamma(a) * Int_0^x exp(-t) t^(a-1) dt  */
static double p_gamma(double a, double x, double loggamma_a)
{
    int k;
    double result, term, previous;

    if (x >= 1 + a) return 1 - q_gamma(a, x, loggamma_a);
    if (x == 0)     return 0;
    result = term = exp(a * log(x) - x - loggamma_a) / a;
    for (k = 1; k < 1000; k++) {
        term *= x / (a + k);
        previous = result;  result += term;
        if (result == previous) return result;
    }
    fprintf(stderr, "erf.c:%d:p_gamma() could not converge.", __LINE__);
    return result;
}

/* Incomplete gamma function
   1 / Gamma(a) * Int_x^inf exp(-t) t^(a-1) dt  */
static double q_gamma(double a, double x, double loggamma_a)
{
    int k;
    double result, w, temp, previous;
    double la = 1, lb = 1 + x - a;  /* Laguerre polynomial */

    if (x < 1 + a) return 1 - p_gamma(a, x, loggamma_a);
    w = exp(a * log(x) - x - loggamma_a);
    result = w / lb;
    for (k = 2; k < 1000; k++) {
        temp = ((k - 1 - a) * (lb - la) + (k + x) * lb) / k;
        la = lb;  lb = temp;
        w *= (k - 1 - a) / k;
        temp = w / (la * lb);
        previous = result;  result += temp;
        if (result == previous) return result;
    }
    fprintf(stderr, "erf.c:%d:q_gamma() could not converge.", __LINE__);
    return result;
}

#define LOG_PI_OVER_2 0.572364942924700087071713675675 /* log_e(PI)/2 */

double erf(double x)
{
    if (!finite(x)) {
        if (isnan(x)) return x;      /* erf(NaN)   = NaN   */
        return (x>0 ? 1.0 : -1.0);   /* erf(+-inf) = +-1.0 */
    }
    if (x >= 0) return   p_gamma(0.5, x * x, LOG_PI_OVER_2);
    else        return - p_gamma(0.5, x * x, LOG_PI_OVER_2);
}

double erfc(double x)
{
    if (!finite(x)) {
        if (isnan(x)) return x;      /* erfc(NaN)   = NaN      */
        return (x>0 ? 0.0 : 2.0);    /* erfc(+-inf) = 0.0, 2.0 */
    }
    if (x >= 0) return  q_gamma(0.5, x * x, LOG_PI_OVER_2);
    else        return  1 + p_gamma(0.5, x * x, LOG_PI_OVER_2);
}
/* [<][>][^] [v] [top][bottom][index] [help] */


missing/file.h

root/missing/file.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

/* This is file FILE.H */

#ifndef _FILE_H_
#define _FILE_H_

#include <fcntl.h>

#ifndef L_SET
# define L_SET  0       /* seek from beginning.  */
# define L_CURR 1       /* seek from current position.  */
# define L_INCR 1       /* ditto.  */
# define L_XTND 2       /* seek from end.  */
#endif

#ifndef R_OK
# define R_OK  4        /* test whether readable.  */
# define W_OK  2        /* test whether writable.  */
# define X_OK  1        /* test whether execubale. */
# define F_OK  0        /* test whether exist.  */
#endif

#endif
/* [<][>][^][v][top][bottom][index] [help] */


missing/fileblocks.c

root/missing/fileblocks.c

/* [<][>][^][v][top][bottom] [index] [help] */
/* dummy for autoconf */
/* [<][>][^][v][top][bottom][index] [help] */


missing/finite.c

root/missing/finite.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. finite
/* public domain rewrite of finite(3) */

int
finite(double n)
{
    return !isnan(n) && !isinf(n);
}
/* [<][>][^][v] [top][bottom][index] [help] */


missing/flock.c

root/missing/flock.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. flock
  2. flock
  3. flock
#include "config.h"

#if defined HAVE_FCNTL && defined HAVE_FCNTL_H

/* These are the flock() constants.  Since this sytems doesn't have
   flock(), the values of the constants are probably not available.
*/
# ifndef LOCK_SH
#  define LOCK_SH 1
# endif
# ifndef LOCK_EX
#  define LOCK_EX 2
# endif
# ifndef LOCK_NB
#  define LOCK_NB 4
# endif
# ifndef LOCK_UN
#  define LOCK_UN 8
# endif

#include <fcntl.h>
#include <unistd.h>
#include <errno.h>

int
flock(int fd, int operation)
{
    struct flock lock;

    switch (operation & ~LOCK_NB) {
    case LOCK_SH:
        lock.l_type = F_RDLCK;
        break;
    case LOCK_EX:
        lock.l_type = F_WRLCK;
        break;
    case LOCK_UN:
        lock.l_type = F_UNLCK;
        break;
    default:
        errno = EINVAL;
        return -1;
    }
    lock.l_whence = SEEK_SET;
    lock.l_start = lock.l_len = 0L;

    return fcntl(fd, (operation & LOCK_NB) ? F_SETLK : F_SETLKW, &lock);
}

#elif defined(HAVE_LOCKF)

#include <unistd.h>
#include <errno.h>

/*  Emulate flock() with lockf() or fcntl().  This is just to increase
    portability of scripts.  The calls might not be completely
    interchangeable.  What's really needed is a good file
    locking module.
*/

# ifndef F_ULOCK
#  define F_ULOCK       0       /* Unlock a previously locked region */
# endif
# ifndef F_LOCK
#  define F_LOCK        1       /* Lock a region for exclusive use */
# endif
# ifndef F_TLOCK
#  define F_TLOCK       2       /* Test and lock a region for exclusive use */
# endif
# ifndef F_TEST
#  define F_TEST        3       /* Test a region for other processes locks */
# endif

/* These are the flock() constants.  Since this sytems doesn't have
   flock(), the values of the constants are probably not available.
*/
# ifndef LOCK_SH
#  define LOCK_SH 1
# endif
# ifndef LOCK_EX
#  define LOCK_EX 2
# endif
# ifndef LOCK_NB
#  define LOCK_NB 4
# endif
# ifndef LOCK_UN
#  define LOCK_UN 8
# endif

int
flock(int fd, int operation)
{
    switch (operation) {

        /* LOCK_SH - get a shared lock */
      case LOCK_SH:
        rb_notimplement();
        return -1;
        /* LOCK_EX - get an exclusive lock */
      case LOCK_EX:
        return lockf (fd, F_LOCK, 0);

        /* LOCK_SH|LOCK_NB - get a non-blocking shared lock */
      case LOCK_SH|LOCK_NB:
        rb_notimplement();
        return -1;
        /* LOCK_EX|LOCK_NB - get a non-blocking exclusive lock */
      case LOCK_EX|LOCK_NB:
        return lockf (fd, F_TLOCK, 0);

        /* LOCK_UN - unlock */
      case LOCK_UN:
        return lockf (fd, F_ULOCK, 0);

        /* Default - can't decipher operation */
      default:
        errno = EINVAL;
        return -1;
    }
}
#elif !defined _WIN32
int
flock(int fd, int operation)
{
    rb_notimplement();
    return -1;
}
#endif
/* [<][>][^] [v] [top][bottom][index] [help] */


missing/hypot.c

root/missing/hypot.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. hypot
/* public domain rewrite of hypot */

#include <math.h>

double hypot(double x, double y)
{
    if (x < 0) x = -x;
    if (y < 0) y = -y;
    if (x < y) {
        double tmp = x;
        x = y; y = tmp;
    }
    if (y == 0.0) return x;
    y /= x;
    return x * sqrt(1.0+y*y);
}
/* [<][>][^][v] [top][bottom][index] [help] */


missing/isinf.c

root/missing/isinf.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. isinf
  2. isinf
  3. zero
  4. one
  5. inf
  6. isinf
/* public domain rewrite of isinf(3) */

#ifdef __osf__

#define _IEEE 1
#include <nan.h>

int
isinf(double n)
{
    if (IsNANorINF(n) && IsINF(n)) {
        return 1;
    }
    else {
        return 0;
    }
}

#else

#include "config.h"

#if defined(HAVE_FINITE) && defined(HAVE_ISNAN)

#include <math.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif

int
isinf(double n)
{
    return (!finite(n) && !isnan(n));
}

#else

#ifdef HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
#endif

static double zero(void) { return 0.0; }
static double one (void) { return 1.0; }
static double inf (void) { return one() / zero(); }

int
isinf(double n)
{
    static double pinf = 0.0;
    static double ninf = 0.0;

    if (pinf == 0.0) {
        pinf = inf();
        ninf = -pinf;
    }
    return memcmp(&n, &pinf, sizeof n) == 0
        || memcmp(&n, &ninf, sizeof n) == 0;
}
#endif
#endif
/* [<][>][^] [v] [top][bottom][index] [help] */


missing/isnan.c

root/missing/isnan.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. isnan
  2. double_ne
/* public domain rewrite of isnan(3) */

static int double_ne(double n1, double n2);

int
isnan(double n)
{
    return double_ne(n, n);
}

static int
double_ne(double n1, double n2)
{
    return n1 != n2;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


missing/memcmp.c

root/missing/memcmp.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. memcmp
/* public domain rewrite of memcmp(3) */

#include <stddef.h>

int
memcmp(const void *s1, const void *s2, size_t len)
{
    register unsigned char *a = (unsigned char*)s1;
    register unsigned char *b = (unsigned char*)s2;
    register int tmp;

    for (; len; --len) {
        if (tmp = *a++ - *b++)
            return tmp;
    }
    return 0;
}
/* [<][>][^][v] [top][bottom][index] [help] */


missing/memmove.c

root/missing/memmove.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. memmove
/* public domain rewrite of memcmp(3) */

#include <stddef.h>

void *
memmove(void *d, const void *s, size_t n)
{
    char *dst = (char *)d;
    const char *src = (const char *)s;

    if (src < dst) {
        src += n;
        dst += n;
        for (; n; --n)
            *--dst = *--src;
    }
    else if (dst < src)
        for (; n; --n)
            *dst++ = *src++;
    return d;
}
/* [<][>][^][v] [top][bottom][index] [help] */


missing/os2.c

root/missing/os2.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. chown
  2. link
  3. getcwd
  4. chdir
  5. do_spawn
/* os/2 compatibility functions -- follows Ruby's license */

#include "ruby.h"
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <process.h>
#include <limits.h>
#include <errno.h>

#define INCL_DOS
#include <os2.h>

int
chown(char *path, int owner, int group)
{
        return 0;
}

#if 0
int
link(char *from, char *to)
{
        return -1;
}
#endif

#if defined(EMX_REPLACE_GETCWD) && (EMX_REPLACE_GETCWD)  \
 || defined(EMX_REPLACE_CHDIR)  && (EMX_REPLACE_CHDIR)
#include <unistd.h>

#if defined(EMX_REPLACE_GETCWD) && (EMX_REPLACE_GETCWD)
/* to handle the drive letter and DBCS characters within a given path */
char *
getcwd(char *path, size_t len)
{
    return _getcwd2(path, (int)len);
}
#endif

#if defined(EMX_REPLACE_CHDIR) && (EMX_REPLACE_CHDIR)
/* to handle the drive letter and DBCS characters within a given path */
int
chdir(__const__ char *path)
{
    return _chdir2(path);
}
#endif
#endif

typedef char* CHARP;

int
do_spawn(cmd)
char *cmd;
{
    register char **a;
    register char *s;
    char **argv;
    char *shell, *sw, *cmd2;
    int status;

    if ((shell = getenv("RUBYSHELL")) != NULL && *shell != '\0') {
        s = shell;
        do
            *s = isupper(*s) ? tolower(*s) : *s;
        while (*++s);
        if (strstr(shell, "cmd") || strstr(shell, "4os2"))
            sw = "/c";
        else
            sw = "-c";
    } else if ((shell = getenv("SHELL")) != NULL && *shell != '\0') {
        s = shell;
        do
            *s = isupper(*s) ? tolower(*s) : *s;
        while (*++s);
        if (strstr(shell, "cmd") || strstr(shell, "4os2"))
            sw = "/c";
        else
            sw = "-c";
    } else if ((shell = getenv("COMSPEC")) != NULL && *shell != '\0') {
        s = shell;
        do
            *s = isupper(*s) ? tolower(*s) : *s;
        while (*++s);
        if (strstr(shell, "cmd") || strstr(shell, "4os2"))
            sw = "/c";
        else
            sw = "-c";
    }
    /* see if there are shell metacharacters in it */
    /*SUPPRESS 530*/
    /*    for (s = cmd; *s && isalpha(*s); s++) ;
    if (*s == '=')
    goto doshell; */
    for (s = cmd; *s; s++) {
        if (*sw == '-' && *s != ' ' &&
            !isalpha(*s) && index("$&*(){}[]'\";\\|?<>~`\n",*s)) {
            if (*s == '\n' && !s[1]) {
                *s = '\0';
                break;
            }
            goto doshell;
        } else if (*sw == '/' && *s != ' ' &&
            !isalpha(*s) && index("^()<>|&\n",*s)) {
            if (*s == '\n' && !s[1]) {
                *s = '\0';
                break;
            }
          doshell:
            status = spawnlp(P_WAIT,shell,shell,sw,cmd,(char*)NULL);
            return status;
        }
    }
    argv = ALLOC_N(CHARP,(strlen(cmd) / 2 + 2));
    cmd2 = ALLOC_N(char, (strlen(cmd) + 1));
    strcpy(cmd2, cmd);
    a = argv;
    for (s = cmd2; *s;) {
        while (*s && isspace(*s)) s++;
        if (*s)
            *(a++) = s;
        while (*s && !isspace(*s)) s++;
        if (*s)
            *s++ = '\0';
    }
    *a = NULL;
    if (argv[0]) {
        if ((status = spawnvp(P_WAIT, argv[0], argv)) == -1) {
            free(argv);
            free(cmd2);
            return -1;
        }
    }
    free(cmd2);
    free(argv);
    return status;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


missing/strcasecmp.c

root/missing/strcasecmp.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. strcasecmp
/* public domain rewrite of strcasecmp(3) */

#include <ctype.h>

int
strcasecmp(const char *p1, const char *p2)
{
    while (*p1 && *p2) {
        if (toupper(*p1) != toupper(*p2))
            return toupper(*p1) - toupper(*p2);
        p1++;
        p2++;
    }
    return strlen(p1) - strlen(p2);
}
/* [<][>][^][v] [top][bottom][index] [help] */


missing/strchr.c

root/missing/strchr.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. strchr
  2. strrchr
/* public domain rewrite of strchr(3) and strrchr(3) */

char *
strchr(const char *s, int c)
{
    if (c == 0) return (char *)s + strlen(s);
    while (*s) {
        if (*s == c)
            return (char *)s;
        s++;
    }
    return 0;
}

char *
strrchr(const char *s, int c)
{
    const char *save;

    if (c == 0) return (char *)s + strlen(s);
    save = 0;
    while (*s) {
        if (*s == c)
            save = s;
        s++;
    }
    return (char *)save;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


missing/strerror.c

root/missing/strerror.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. strerror
/* public domain rewrite of strerror(3) */

extern int sys_nerr;
extern char *sys_errlist[];

static char msg[50];

char *
strerror(int error)
{
    if (error <= sys_nerr && error > 0) {
        return sys_errlist[error];
    }
    sprintf(msg, "Unknown error (%d)", error);
    return msg;
}
/* [<][>][^][v] [top][bottom][index] [help] */


missing/strftime.c

root/missing/strftime.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. adddecl
  2. max
  3. strftime
  4. isleap
  5. iso8601wknum
  6. weeknumber
  7. strftime
  8. main
/*
 * strftime.c
 *
 * Public-domain implementation of ANSI C library routine.
 *
 * It's written in old-style C for maximal portability.
 * However, since I'm used to prototypes, I've included them too.
 *
 * If you want stuff in the System V ascftime routine, add the SYSV_EXT define.
 * For extensions from SunOS, add SUNOS_EXT.
 * For stuff needed to implement the P1003.2 date command, add POSIX2_DATE.
 * For VMS dates, add VMS_EXT.
 * For a an RFC822 time format, add MAILHEADER_EXT.
 * For ISO week years, add ISO_DATE_EXT.
 * For complete POSIX semantics, add POSIX_SEMANTICS.
 *
 * The code for %c, %x, and %X now follows the 1003.2 specification for
 * the POSIX locale.
 * This version ignores LOCALE information.
 * It also doesn't worry about multi-byte characters.
 * So there.
 *
 * This file is also shipped with GAWK (GNU Awk), gawk specific bits of
 * code are included if GAWK is defined.
 *
 * Arnold Robbins
 * January, February, March, 1991
 * Updated March, April 1992
 * Updated April, 1993
 * Updated February, 1994
 * Updated May, 1994
 * Updated January, 1995
 * Updated September, 1995
 * Updated January, 1996
 *
 * Fixes from ado@elsie.nci.nih.gov
 * February 1991, May 1992
 * Fixes from Tor Lillqvist tml@tik.vtt.fi
 * May, 1993
 * Further fixes from ado@elsie.nci.nih.gov
 * February 1994
 * %z code from chip@chinacat.unicom.com
 * Applied September 1995
 * %V code fixed (again) and %G, %g added,
 * January 1996
 */

#include "config.h"

#ifndef GAWK
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <time.h>
#endif
#if defined(TM_IN_SYS_TIME) || !defined(GAWK) && !defined(_WIN32_WCE)
#include <sys/types.h>
#include <sys/time.h>
#endif

/* defaults: season to taste */
#define SYSV_EXT        1       /* stuff in System V ascftime routine */
#define SUNOS_EXT       1       /* stuff in SunOS strftime routine */
#define POSIX2_DATE     1       /* stuff in Posix 1003.2 date command */
#define VMS_EXT         1       /* include %v for VMS date format */
#define MAILHEADER_EXT  1       /* add %z for HHMM format */
#define ISO_DATE_EXT    1       /* %G and %g for year of ISO week */
#ifndef GAWK
#define POSIX_SEMANTICS 1       /* call tzset() if TZ changes */
#endif

#if defined(ISO_DATE_EXT)
#if ! defined(POSIX2_DATE)
#define POSIX2_DATE     1
#endif
#endif

#if defined(POSIX2_DATE)
#if ! defined(SYSV_EXT)
#define SYSV_EXT        1
#endif
#if ! defined(SUNOS_EXT)
#define SUNOS_EXT       1
#endif
#endif

#if defined(POSIX2_DATE)
#define adddecl(stuff)  stuff
#else
#define adddecl(stuff)
#endif

#undef strchr   /* avoid AIX weirdness */

#ifndef __STDC__
#define const   /**/
extern void tzset();
static int weeknumber();
adddecl(static int iso8601wknum();)
#else
extern void tzset(void);
static int weeknumber(const struct tm *timeptr, int firstweekday);
adddecl(static int iso8601wknum(const struct tm *timeptr);)
#endif

#ifdef STDC_HEADERS
#include <stdlib.h>
#include <string.h>
#else
extern void *malloc();
extern void *realloc();
extern char *getenv();
extern char *strchr();
#endif

#define range(low, item, hi)    max(low, min(item, hi))

#if !defined(OS2) && !defined(MSDOS) && defined(HAVE_TZNAME)
extern char *tzname[2];
extern int daylight;
#ifdef SOLARIS
extern long timezone, altzone;
#else
#ifdef __hpux
extern long timezone;
#else
extern int timezone, altzone;
#endif
#endif
#endif

#undef min      /* just in case */

/* min --- return minimum of two numbers */

#ifndef __STDC__
static inline int
min(a, b)
int a, b;
#else
static inline int
min(int a, int b)
#endif
{
        return (a < b ? a : b);
}

#undef max      /* also, just in case */

/* max --- return maximum of two numbers */

#ifndef __STDC__
static inline int
max(a, b)
int a, b;
#else
static inline int
max(int a, int b)
#endif
{
        return (a > b ? a : b);
}

/* strftime --- produce formatted time */

#ifndef __STDC__
size_t
strftime(s, maxsize, format, timeptr)
char *s;
size_t maxsize;
const char *format;
const struct tm *timeptr;
#else
size_t
strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr)
#endif
{
        char *endp = s + maxsize;
        char *start = s;
        auto char tbuf[100];
        long off;
        int i, w;
        long y;
        static short first = 1;
#ifdef POSIX_SEMANTICS
        static char *savetz = NULL;
        static int savetzlen = 0;
        char *tz;
#endif /* POSIX_SEMANTICS */
#ifndef HAVE_TM_ZONE
#ifndef HAVE_TM_NAME
#ifndef HAVE_TZNAME
        extern char *timezone();
        struct timeval tv;
        struct timezone zone;
#else
#ifdef __hpux
        struct timeval tv;
        struct timezone zone;
#endif
#endif /* HAVE_TZNAME */
#endif /* HAVE_TM_NAME */
#endif /* HAVE_TM_ZONE */

        /* various tables, useful in North America */
        static const char *days_a[] = {
                "Sun", "Mon", "Tue", "Wed",
                "Thu", "Fri", "Sat",
        };
        static const char *days_l[] = {
                "Sunday", "Monday", "Tuesday", "Wednesday",
                "Thursday", "Friday", "Saturday",
        };
        static const char *months_a[] = {
                "Jan", "Feb", "Mar", "Apr", "May", "Jun",
                "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
        };
        static const char *months_l[] = {
                "January", "February", "March", "April",
                "May", "June", "July", "August", "September",
                "October", "November", "December",
        };
        static const char *ampm[] = { "AM", "PM", };

        if (s == NULL || format == NULL || timeptr == NULL || maxsize == 0)
                return 0;

        /* quick check if we even need to bother */
        if (strchr(format, '%') == NULL && strlen(format) + 1 >= maxsize)
                return 0;

#ifndef POSIX_SEMANTICS
        if (first) {
                tzset();
                first = 0;
        }
#else   /* POSIX_SEMANTICS */
        tz = getenv("TZ");
        if (first) {
                if (tz != NULL) {
                        int tzlen = strlen(tz);

                        savetz = (char *) malloc(tzlen + 1);
                        if (savetz != NULL) {
                                savetzlen = tzlen + 1;
                                strcpy(savetz, tz);
                        }
                }
                tzset();
                first = 0;
        }
        /* if we have a saved TZ, and it is different, recapture and reset */
        if (tz && savetz && (tz[0] != savetz[0] || strcmp(tz, savetz) != 0)) {
                i = strlen(tz) + 1;
                if (i > savetzlen) {
                        savetz = (char *) realloc(savetz, i);
                        if (savetz) {
                                savetzlen = i;
                                strcpy(savetz, tz);
                        }
                } else
                        strcpy(savetz, tz);
                tzset();
        }
#endif  /* POSIX_SEMANTICS */

        for (; *format && s < endp - 1; format++) {
                tbuf[0] = '\0';
                if (*format != '%') {
                        *s++ = *format;
                        continue;
                }
        again:
                switch (*++format) {
                case '\0':
                        *s++ = '%';
                        goto out;

                case '%':
                        *s++ = '%';
                        continue;

                case 'a':       /* abbreviated weekday name */
                        if (timeptr->tm_wday < 0 || timeptr->tm_wday > 6)
                                strcpy(tbuf, "?");
                        else
                                strcpy(tbuf, days_a[timeptr->tm_wday]);
                        break;

                case 'A':       /* full weekday name */
                        if (timeptr->tm_wday < 0 || timeptr->tm_wday > 6)
                                strcpy(tbuf, "?");
                        else
                                strcpy(tbuf, days_l[timeptr->tm_wday]);
                        break;

#ifdef SYSV_EXT
                case 'h':       /* abbreviated month name */
#endif
                case 'b':       /* abbreviated month name */
                        if (timeptr->tm_mon < 0 || timeptr->tm_mon > 11)
                                strcpy(tbuf, "?");
                        else
                                strcpy(tbuf, months_a[timeptr->tm_mon]);
                        break;

                case 'B':       /* full month name */
                        if (timeptr->tm_mon < 0 || timeptr->tm_mon > 11)
                                strcpy(tbuf, "?");
                        else
                                strcpy(tbuf, months_l[timeptr->tm_mon]);
                        break;

                case 'c':       /* appropriate date and time representation */
                        strftime(tbuf, sizeof tbuf, "%a %b %e %H:%M:%S %Y", timeptr);
                        break;

                case 'd':       /* day of the month, 01 - 31 */
                        i = range(1, timeptr->tm_mday, 31);
                        sprintf(tbuf, "%02d", i);
                        break;

                case 'H':       /* hour, 24-hour clock, 00 - 23 */
                        i = range(0, timeptr->tm_hour, 23);
                        sprintf(tbuf, "%02d", i);
                        break;

                case 'I':       /* hour, 12-hour clock, 01 - 12 */
                        i = range(0, timeptr->tm_hour, 23);
                        if (i == 0)
                                i = 12;
                        else if (i > 12)
                                i -= 12;
                        sprintf(tbuf, "%02d", i);
                        break;

                case 'j':       /* day of the year, 001 - 366 */
                        sprintf(tbuf, "%03d", timeptr->tm_yday + 1);
                        break;

                case 'm':       /* month, 01 - 12 */
                        i = range(0, timeptr->tm_mon, 11);
                        sprintf(tbuf, "%02d", i + 1);
                        break;

                case 'M':       /* minute, 00 - 59 */
                        i = range(0, timeptr->tm_min, 59);
                        sprintf(tbuf, "%02d", i);
                        break;

                case 'p':       /* am or pm based on 12-hour clock */
                        i = range(0, timeptr->tm_hour, 23);
                        if (i < 12)
                                strcpy(tbuf, ampm[0]);
                        else
                                strcpy(tbuf, ampm[1]);
                        break;

                case 'S':       /* second, 00 - 60 */
                        i = range(0, timeptr->tm_sec, 60);
                        sprintf(tbuf, "%02d", i);
                        break;

                case 'U':       /* week of year, Sunday is first day of week */
                        sprintf(tbuf, "%02d", weeknumber(timeptr, 0));
                        break;

                case 'w':       /* weekday, Sunday == 0, 0 - 6 */
                        i = range(0, timeptr->tm_wday, 6);
                        sprintf(tbuf, "%d", i);
                        break;

                case 'W':       /* week of year, Monday is first day of week */
                        sprintf(tbuf, "%02d", weeknumber(timeptr, 1));
                        break;

                case 'x':       /* appropriate date representation */
                        strftime(tbuf, sizeof tbuf, "%m/%d/%y", timeptr);
                        break;

                case 'X':       /* appropriate time representation */
                        strftime(tbuf, sizeof tbuf, "%H:%M:%S", timeptr);
                        break;

                case 'y':       /* year without a century, 00 - 99 */
                        i = timeptr->tm_year % 100;
                        sprintf(tbuf, "%02d", i);
                        break;

                case 'Y':       /* year with century */
                        sprintf(tbuf, "%ld", 1900L + timeptr->tm_year);
                        break;

#ifdef MAILHEADER_EXT
                /*
                 * From: Chip Rosenthal <chip@chinacat.unicom.com>
                 * Date: Sun, 19 Mar 1995 00:33:29 -0600 (CST)
                 *
                 * Warning: the %z [code] is implemented by inspecting the
                 * timezone name conditional compile settings, and
                 * inferring a method to get timezone offsets. I've tried
                 * this code on a couple of machines, but I don't doubt
                 * there is some system out there that won't like it.
                 * Maybe the easiest thing to do would be to bracket this
                 * with an #ifdef that can turn it off. The %z feature
                 * would be an admittedly obscure one that most folks can
                 * live without, but it would be a great help to those of
                 * us that muck around with various message processors.
                 */
                case 'z':       /* time zone offset east of GMT e.g. -0600 */
#ifdef HAVE_TM_NAME
                        /*
                         * Systems with tm_name probably have tm_tzadj as
                         * secs west of GMT.  Convert to mins east of GMT.
                         */
                        off = -timeptr->tm_tzadj / 60;
#else /* !HAVE_TM_NAME */
#ifdef HAVE_TM_ZONE
                        /*
                         * Systems with tm_zone probably have tm_gmtoff as
                         * secs east of GMT.  Convert to mins east of GMT.
                         */
                        off = timeptr->tm_gmtoff / 60;
#else /* !HAVE_TM_ZONE */
#if HAVE_TZNAME
                        /*
                         * Systems with tzname[] probably have timezone as
                         * secs west of GMT.  Convert to mins east of GMT.
                         */
#ifdef __hpux
                        gettimeofday(&tv, &zone);
                        off = -zone.tz_minuteswest;
#else
                        off = -(daylight ? timezone : altzone) / 60;
#endif
#else /* !HAVE_TZNAME */
                        gettimeofday(&tv, &zone);
                        off = -zone.tz_minuteswest;
#endif /* !HAVE_TZNAME */
#endif /* !HAVE_TM_ZONE */
#endif /* !HAVE_TM_NAME */
                        if (off < 0) {
                                tbuf[0] = '-';
                                off = -off;
                        } else {
                                tbuf[0] = '+';
                        }
                        sprintf(tbuf+1, "%02d%02d", off/60, off%60);
                        break;
#endif /* MAILHEADER_EXT */

                case 'Z':       /* time zone name or abbrevation */
#ifdef HAVE_TZNAME
                        i = (daylight && timeptr->tm_isdst > 0); /* 0 or 1 */
                        strcpy(tbuf, tzname[i]);
#else
#ifdef HAVE_TM_ZONE
                        strcpy(tbuf, timeptr->tm_zone);
#else
#ifdef HAVE_TM_NAME
                        strcpy(tbuf, timeptr->tm_name);
#else
                        gettimeofday(& tv, & zone);
#ifdef __CYGWIN__
                        strcpy(tbuf, timezone());
#else
                        strcpy(tbuf, timezone(zone.tz_minuteswest,
                                                timeptr->tm_isdst > 0));
#endif
#endif /* HAVE_TM_NAME */
#endif /* HAVE_TM_ZONE */
#endif /* HAVE_TZNAME */
                        break;

#ifdef SYSV_EXT
                case 'n':       /* same as \n */
                        tbuf[0] = '\n';
                        tbuf[1] = '\0';
                        break;

                case 't':       /* same as \t */
                        tbuf[0] = '\t';
                        tbuf[1] = '\0';
                        break;

                case 'D':       /* date as %m/%d/%y */
                        strftime(tbuf, sizeof tbuf, "%m/%d/%y", timeptr);
                        break;

                case 'e':       /* day of month, blank padded */
                        sprintf(tbuf, "%2d", range(1, timeptr->tm_mday, 31));
                        break;

                case 'r':       /* time as %I:%M:%S %p */
                        strftime(tbuf, sizeof tbuf, "%I:%M:%S %p", timeptr);
                        break;

                case 'R':       /* time as %H:%M */
                        strftime(tbuf, sizeof tbuf, "%H:%M", timeptr);
                        break;

                case 'T':       /* time as %H:%M:%S */
                        strftime(tbuf, sizeof tbuf, "%H:%M:%S", timeptr);
                        break;
#endif

#ifdef SUNOS_EXT
                case 'k':       /* hour, 24-hour clock, blank pad */
                        sprintf(tbuf, "%2d", range(0, timeptr->tm_hour, 23));
                        break;

                case 'l':       /* hour, 12-hour clock, 1 - 12, blank pad */
                        i = range(0, timeptr->tm_hour, 23);
                        if (i == 0)
                                i = 12;
                        else if (i > 12)
                                i -= 12;
                        sprintf(tbuf, "%2d", i);
                        break;
#endif

#ifdef VMS_EXT
                case 'v':       /* date as dd-bbb-YYYY */
                        sprintf(tbuf, "%2d-%3.3s-%4ld",
                                range(1, timeptr->tm_mday, 31),
                                months_a[range(0, timeptr->tm_mon, 11)],
                                timeptr->tm_year + 1900L);
                        for (i = 3; i < 6; i++)
                                if (islower(tbuf[i]))
                                        tbuf[i] = toupper(tbuf[i]);
                        break;
#endif

#ifdef POSIX2_DATE
                case 'C':
                        sprintf(tbuf, "%02ld", (timeptr->tm_year + 1900L) / 100);
                        break;

                case 'E':
                case 'O':
                        /* POSIX locale extensions, ignored for now */
                        goto again;

                case 'V':       /* week of year according ISO 8601 */
                        sprintf(tbuf, "%02d", iso8601wknum(timeptr));
                        break;

                case 'u':
                /* ISO 8601: Weekday as a decimal number [1 (Monday) - 7] */
                        sprintf(tbuf, "%d", timeptr->tm_wday == 0 ? 7 :
                                        timeptr->tm_wday);
                        break;
#endif  /* POSIX2_DATE */

#ifdef ISO_DATE_EXT
                case 'G':
                case 'g':
                        /*
                         * Year of ISO week.
                         *
                         * If it's December but the ISO week number is one,
                         * that week is in next year.
                         * If it's January but the ISO week number is 52 or
                         * 53, that week is in last year.
                         * Otherwise, it's this year.
                         */
                        w = iso8601wknum(timeptr);
                        if (timeptr->tm_mon == 11 && w == 1)
                                y = 1900L + timeptr->tm_year + 1;
                        else if (timeptr->tm_mon == 0 && w >= 52)
                                y = 1900L + timeptr->tm_year - 1;
                        else
                                y = 1900L + timeptr->tm_year;

                        if (*format == 'G')
                                sprintf(tbuf, "%ld", y);
                        else
                                sprintf(tbuf, "%02ld", y % 100);
                        break;
#endif /* ISO_DATE_EXT */
                default:
                        tbuf[0] = '%';
                        tbuf[1] = *format;
                        tbuf[2] = '\0';
                        break;
                }
                i = strlen(tbuf);
                if (i) {
                        if (s + i < endp - 1) {
                                strcpy(s, tbuf);
                                s += i;
                        } else
                                return 0;
                }
        }
out:
        if (s < endp && *format == '\0') {
                *s = '\0';
                return (s - start);
        } else
                return 0;
}

/* isleap --- is a year a leap year? */

#ifndef __STDC__
static int
isleap(year)
long year;
#else
static int
isleap(long year)
#endif
{
        return ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0);
}

#ifdef POSIX2_DATE
/* iso8601wknum --- compute week number according to ISO 8601 */

#ifndef __STDC__
static int
iso8601wknum(timeptr)
const struct tm *timeptr;
#else
static int
iso8601wknum(const struct tm *timeptr)
#endif
{
        /*
         * From 1003.2:
         *      If the week (Monday to Sunday) containing January 1
         *      has four or more days in the new year, then it is week 1;
         *      otherwise it is the highest numbered week of the previous
         *      year (52 or 53), and the next week is week 1.
         *
         * ADR: This means if Jan 1 was Monday through Thursday,
         *      it was week 1, otherwise week 52 or 53.
         *
         * XPG4 erroneously included POSIX.2 rationale text in the
         * main body of the standard. Thus it requires week 53.
         */

        int weeknum, jan1day, diff;

        /* get week number, Monday as first day of the week */
        weeknum = weeknumber(timeptr, 1);

        /*
         * With thanks and tip of the hatlo to tml@tik.vtt.fi
         *
         * What day of the week does January 1 fall on?
         * We know that
         *      (timeptr->tm_yday - jan1.tm_yday) MOD 7 ==
         *              (timeptr->tm_wday - jan1.tm_wday) MOD 7
         * and that
         *      jan1.tm_yday == 0
         * and that
         *      timeptr->tm_wday MOD 7 == timeptr->tm_wday
         * from which it follows that. . .
         */
        jan1day = timeptr->tm_wday - (timeptr->tm_yday % 7);
        if (jan1day < 0)
                jan1day += 7;

        /*
         * If Jan 1 was a Monday through Thursday, it was in
         * week 1.  Otherwise it was last year's highest week, which is
         * this year's week 0.
         *
         * What does that mean?
         * If Jan 1 was Monday, the week number is exactly right, it can
         *      never be 0.
         * If it was Tuesday through Thursday, the weeknumber is one
         *      less than it should be, so we add one.
         * Otherwise, Friday, Saturday or Sunday, the week number is
         * OK, but if it is 0, it needs to be 52 or 53.
         */
        switch (jan1day) {
        case 1:         /* Monday */
                break;
        case 2:         /* Tuesday */
        case 3:         /* Wednesday */
        case 4:         /* Thursday */
                weeknum++;
                break;
        case 5:         /* Friday */
        case 6:         /* Saturday */
        case 0:         /* Sunday */
                if (weeknum == 0) {
#ifdef USE_BROKEN_XPG4
                        /* XPG4 (as of March 1994) says 53 unconditionally */
                        weeknum = 53;
#else
                        /* get week number of last week of last year */
                        struct tm dec31ly;      /* 12/31 last year */
                        dec31ly = *timeptr;
                        dec31ly.tm_year--;
                        dec31ly.tm_mon = 11;
                        dec31ly.tm_mday = 31;
                        dec31ly.tm_wday = (jan1day == 0) ? 6 : jan1day - 1;
                        dec31ly.tm_yday = 364 + isleap(dec31ly.tm_year + 1900L);
                        weeknum = iso8601wknum(& dec31ly);
#endif
                }
                break;
        }

        if (timeptr->tm_mon == 11) {
                /*
                 * The last week of the year
                 * can be in week 1 of next year.
                 * Sigh.
                 *
                 * This can only happen if
                 *      M   T  W
                 *      29  30 31
                 *      30  31
                 *      31
                 */
                int wday, mday;

                wday = timeptr->tm_wday;
                mday = timeptr->tm_mday;
                if (   (wday == 1 && (mday >= 29 && mday <= 31))
                    || (wday == 2 && (mday == 30 || mday == 31))
                    || (wday == 3 &&  mday == 31))
                        weeknum = 1;
        }

        return weeknum;
}
#endif

/* weeknumber --- figure how many weeks into the year */

/* With thanks and tip of the hatlo to ado@elsie.nci.nih.gov */

#ifndef __STDC__
static int
weeknumber(timeptr, firstweekday)
const struct tm *timeptr;
int firstweekday;
#else
static int
weeknumber(const struct tm *timeptr, int firstweekday)
#endif
{
        int wday = timeptr->tm_wday;
        int ret;

        if (firstweekday == 1) {
                if (wday == 0)  /* sunday */
                        wday = 6;
                else
                        wday--;
        }
        ret = ((timeptr->tm_yday + 7 - wday) / 7);
        if (ret < 0)
                ret = 0;
        return ret;
}

#if 0
/* ADR --- I'm loathe to mess with ado's code ... */

Date:         Wed, 24 Apr 91 20:54:08 MDT
From: Michal Jaegermann <audfax!emory!vm.ucs.UAlberta.CA!NTOMCZAK>
To: arnold@audiofax.com

Hi Arnold,
in a process of fixing of strftime() in libraries on Atari ST I grabbed
some pieces of code from your own strftime.  When doing that it came
to mind that your weeknumber() function compiles a little bit nicer
in the following form:
/*
 * firstweekday is 0 if starting in Sunday, non-zero if in Monday
 */
{
    return (timeptr->tm_yday - timeptr->tm_wday +
            (firstweekday ? (timeptr->tm_wday ? 8 : 1) : 7)) / 7;
}
How nicer it depends on a compiler, of course, but always a tiny bit.

   Cheers,
   Michal
   ntomczak@vm.ucs.ualberta.ca
#endif

#ifdef  TEST_STRFTIME

/*
 * NAME:
 *      tst
 *
 * SYNOPSIS:
 *      tst
 *
 * DESCRIPTION:
 *      "tst" is a test driver for the function "strftime".
 *
 * OPTIONS:
 *      None.
 *
 * AUTHOR:
 *      Karl Vogel
 *      Control Data Systems, Inc.
 *      vogelke@c-17igp.wpafb.af.mil
 *
 * BUGS:
 *      None noticed yet.
 *
 * COMPILE:
 *      cc -o tst -DTEST_STRFTIME strftime.c
 */

/* ADR: I reformatted this to my liking, and deleted some unneeded code. */

#ifndef NULL
#include        <stdio.h>
#endif
#include        <sys/time.h>
#include        <string.h>

#define         MAXTIME         132

/*
 * Array of time formats.
 */

static char *array[] =
{
        "(%%A)      full weekday name, var length (Sunday..Saturday)  %A",
        "(%%B)       full month name, var length (January..December)  %B",
        "(%%C)                                               Century  %C",
        "(%%D)                                       date (%%m/%%d/%%y)  %D",
        "(%%E)                           Locale extensions (ignored)  %E",
        "(%%H)                          hour (24-hour clock, 00..23)  %H",
        "(%%I)                          hour (12-hour clock, 01..12)  %I",
        "(%%M)                                       minute (00..59)  %M",
        "(%%O)                           Locale extensions (ignored)  %O",
        "(%%R)                                 time, 24-hour (%%H:%%M)  %R",
        "(%%S)                                       second (00..60)  %S",
        "(%%T)                              time, 24-hour (%%H:%%M:%%S)  %T",
        "(%%U)    week of year, Sunday as first day of week (00..53)  %U",
        "(%%V)                    week of year according to ISO 8601  %V",
        "(%%W)    week of year, Monday as first day of week (00..53)  %W",
        "(%%X)     appropriate locale time representation (%H:%M:%S)  %X",
        "(%%Y)                           year with century (1970...)  %Y",
        "(%%Z) timezone (EDT), or blank if timezone not determinable  %Z",
        "(%%a)          locale's abbreviated weekday name (Sun..Sat)  %a",
        "(%%b)            locale's abbreviated month name (Jan..Dec)  %b",
        "(%%c)           full date (Sat Nov  4 12:02:33 1989)%n%t%t%t  %c",
        "(%%d)                             day of the month (01..31)  %d",
        "(%%e)               day of the month, blank-padded ( 1..31)  %e",
        "(%%h)                                should be same as (%%b)  %h",
        "(%%j)                            day of the year (001..366)  %j",
        "(%%k)               hour, 24-hour clock, blank pad ( 0..23)  %k",
        "(%%l)               hour, 12-hour clock, blank pad ( 0..12)  %l",
        "(%%m)                                        month (01..12)  %m",
        "(%%p)              locale's AM or PM based on 12-hour clock  %p",
        "(%%r)                   time, 12-hour (same as %%I:%%M:%%S %%p)  %r",
        "(%%u) ISO 8601: Weekday as decimal number [1 (Monday) - 7]   %u",
        "(%%v)                                VMS date (dd-bbb-YYYY)  %v",
        "(%%w)                       day of week (0..6, Sunday == 0)  %w",
        "(%%x)                appropriate locale date representation  %x",
        "(%%y)                      last two digits of year (00..99)  %y",
        "(%%z)      timezone offset east of GMT as HHMM (e.g. -0500)  %z",
        (char *) NULL
};

/* main routine. */

int
main(argc, argv)
int argc;
char **argv;
{
        long time();

        char *next;
        char string[MAXTIME];

        int k;
        int length;

        struct tm *tm;

        long clock;

        /* Call the function. */

        clock = time((long *) 0);
        tm = localtime(&clock);

        for (k = 0; next = array[k]; k++) {
                length = strftime(string, MAXTIME, next, tm);
                printf("%s\n", string);
        }

        exit(0);
}
#endif  /* TEST_STRFTIME */
/* [<][>][^] [v] [top][bottom][index] [help] */


missing/strncasecmp.c

root/missing/strncasecmp.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. strncasecmp
/* public domain rewrite of strncasecmp(3) */

#include <ctype.h>
#include <stddef.h>

int
strncasecmp(const char *p1, const char *p2, size_t len)
{
    while (len != 0) {
        if (toupper(*p1) != toupper(*p2)) {
            return toupper(*p1) - toupper(*p2);
        }
        if (*p1 == '\0') {
            return 0;
        }
        len--; p1++; p2++;
    }
    return 0;
}
/* [<][>][^][v] [top][bottom][index] [help] */


missing/strstr.c

root/missing/strstr.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. strstr
/* public domain rewrite of strstr(3) */

char *
strstr(const char *haystack, const char *needle)
{
    const char *hend;
    const char *a, *b;

    if (*needle == 0) return (char *)haystack;
    hend = haystack + strlen(haystack) - strlen(needle) + 1;
    while (haystack < hend) {
        if (*haystack == *needle) {
            a = haystack;
            b = needle;
            for (;;) {
                if (*b == 0) return (char *)haystack;
                if (*a++ != *b++) {
                    break;
                }
            }
        }
        haystack++;
    }
    return 0;
}
/* [<][>][^][v] [top][bottom][index] [help] */


missing/strtod.c

root/missing/strtod.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. strtod
/*
 * strtod.c --
 *
 *      Source code for the "strtod" library procedure.
 *
 * Copyright (c) 1988-1993 The Regents of the University of California.
 * Copyright (c) 1994 Sun Microsystems, Inc.
 *
 * Permission to use, copy, modify, and distribute this
 * software and its documentation for any purpose and without
 * fee is hereby granted, provided that the above copyright
 * notice appear in all copies.  The University of California
 * makes no representations about the suitability of this
 * software for any purpose.  It is provided "as is" without
 * express or implied warranty.
 *
 * RCS: @(#) $Id: strtod.c,v 1.3 2000/02/17 07:11:22 matz Exp $
 */

#include "config.h"
#ifdef HAVE_STDLIB_H
#   include <stdlib.h>
#endif
#include <ctype.h>
#include <errno.h>
extern  int     errno;

#ifndef __STDC__
# ifdef __GNUC__
#  define const __const__
# else
#  define const
# endif
#endif

#ifndef TRUE
#define TRUE 1
#define FALSE 0
#endif
#ifndef NULL
#define NULL 0
#endif

static int maxExponent = 511;   /* Largest possible base 10 exponent.  Any
                                 * exponent larger than this will already
                                 * produce underflow or overflow, so there's
                                 * no need to worry about additional digits.
                                 */
static double powersOf10[] = {  /* Table giving binary powers of 10.  Entry */
    10.,                        /* is 10^2^i.  Used to convert decimal */
    100.,                       /* exponents into floating-point numbers. */
    1.0e4,
    1.0e8,
    1.0e16,
    1.0e32,
    1.0e64,
    1.0e128,
    1.0e256
};

/*
 *----------------------------------------------------------------------
 *
 * strtod --
 *
 *      This procedure converts a floating-point number from an ASCII
 *      decimal representation to internal double-precision format.
 *
 * Results:
 *      The return value is the double-precision floating-point
 *      representation of the characters in string.  If endPtr isn't
 *      NULL, then *endPtr is filled in with the address of the
 *      next character after the last one that was part of the
 *      floating-point number.
 *
 * Side effects:
 *      None.
 *
 *----------------------------------------------------------------------
 */

double
strtod(string, endPtr)
    const char *string;         /* A decimal ASCII floating-point number,
                                 * optionally preceded by white space.
                                 * Must have form "-I.FE-X", where I is the
                                 * integer part of the mantissa, F is the
                                 * fractional part of the mantissa, and X
                                 * is the exponent.  Either of the signs
                                 * may be "+", "-", or omitted.  Either I
                                 * or F may be omitted, or both.  The decimal
                                 * point isn't necessary unless F is present.
                                 * The "E" may actually be an "e".  E and X
                                 * may both be omitted (but not just one).
                                 */
    char **endPtr;              /* If non-NULL, store terminating character's
                                 * address here. */
{
    int sign, expSign = FALSE;
    double fraction, dblExp, *d;
    register const char *p;
    register int c;
    int exp = 0;                /* Exponent read from "EX" field. */
    int fracExp = 0;            /* Exponent that derives from the fractional
                                 * part.  Under normal circumstatnces, it is
                                 * the negative of the number of digits in F.
                                 * However, if I is very long, the last digits
                                 * of I get dropped (otherwise a long I with a
                                 * large negative exponent could cause an
                                 * unnecessary overflow on I alone).  In this
                                 * case, fracExp is incremented one for each
                                 * dropped digit. */
    int mantSize;               /* Number of digits in mantissa. */
    int decPt;                  /* Number of mantissa digits BEFORE decimal
                                 * point. */
    const char *pExp;           /* Temporarily holds location of exponent
                                 * in string. */

    /*
     * Strip off leading blanks and check for a sign.
     */

    p = string;
    while (isspace(*p)) {
        p += 1;
    }
    if (*p == '-') {
        sign = TRUE;
        p += 1;
    } else {
        if (*p == '+') {
            p += 1;
        }
        sign = FALSE;
    }

    /*
     * Count the number of digits in the mantissa (including the decimal
     * point), and also locate the decimal point.
     */

    decPt = -1;
    for (mantSize = 0; ; mantSize += 1)
    {
        c = *p;
        if (!isdigit(c)) {
            if ((c != '.') || (decPt >= 0)) {
                break;
            }
            decPt = mantSize;
        }
        p += 1;
    }

    /*
     * Now suck up the digits in the mantissa.  Use two integers to
     * collect 9 digits each (this is faster than using floating-point).
     * If the mantissa has more than 18 digits, ignore the extras, since
     * they can't affect the value anyway.
     */

    pExp  = p;
    p -= mantSize;
    if (decPt < 0) {
        decPt = mantSize;
    } else {
        mantSize -= 1;                  /* One of the digits was the point. */
    }
    if (mantSize > 18) {
        fracExp = decPt - 18;
        mantSize = 18;
    } else {
        fracExp = decPt - mantSize;
    }
    if (mantSize == 0) {
        fraction = 0.0;
        p = string;
        goto done;
    } else {
        int frac1, frac2;
        frac1 = 0;
        for ( ; mantSize > 9; mantSize -= 1)
        {
            c = *p;
            p += 1;
            if (c == '.') {
                c = *p;
                p += 1;
            }
            frac1 = 10*frac1 + (c - '0');
        }
        frac2 = 0;
        for (; mantSize > 0; mantSize -= 1)
        {
            c = *p;
            p += 1;
            if (c == '.') {
                c = *p;
                p += 1;
            }
            frac2 = 10*frac2 + (c - '0');
        }
        fraction = (1.0e9 * frac1) + frac2;
    }

    /*
     * Skim off the exponent.
     */

    p = pExp;
    if ((*p == 'E') || (*p == 'e')) {
        p += 1;
        if (*p == '-') {
            expSign = TRUE;
            p += 1;
        } else {
            if (*p == '+') {
                p += 1;
            }
            expSign = FALSE;
        }
        while (isdigit(*p)) {
            exp = exp * 10 + (*p - '0');
            p += 1;
        }
    }
    if (expSign) {
        exp = fracExp - exp;
    } else {
        exp = fracExp + exp;
    }

    /*
     * Generate a floating-point number that represents the exponent.
     * Do this by processing the exponent one bit at a time to combine
     * many powers of 2 of 10. Then combine the exponent with the
     * fraction.
     */

    if (exp < 0) {
        expSign = TRUE;
        exp = -exp;
    } else {
        expSign = FALSE;
    }
    if (exp > maxExponent) {
        exp = maxExponent;
        errno = ERANGE;
    }
    dblExp = 1.0;
    for (d = powersOf10; exp != 0; exp >>= 1, d += 1) {
        if (exp & 01) {
            dblExp *= *d;
        }
    }
    if (expSign) {
        fraction /= dblExp;
    } else {
        fraction *= dblExp;
    }

done:
    if (endPtr != NULL) {
        *endPtr = (char *) p;
    }

    if (sign) {
        return -fraction;
    }
    return fraction;
}
/* [<][>][^][v] [top][bottom][index] [help] */


missing/strtol.c

root/missing/strtol.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. strtol
/* public domain rewrite of strtol(3) */

#include <ctype.h>

long
strtol(const char *nptr, char **endptr, int base)
{
    long result;
    const char *p = nptr;

    while (isspace(*p)) {
        p++;
    }
    if (*p == '-') {
        p++;
        result = -strtoul(p, endptr, base);
    }
    else {
        if (*p == '+') p++;
        result = strtoul(p, endptr, base);
    }
    if (endptr != 0 && *endptr == p) {
        *endptr = (char *)nptr;
    }
    return result;
}
/* [<][>][^][v] [top][bottom][index] [help] */


missing/strtoul.c

root/missing/strtoul.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. strtoul
/*
 * strtoul.c --
 *
 *      Source code for the "strtoul" library procedure.
 *
 * Copyright 1988 Regents of the University of California
 * Permission to use, copy, modify, and distribute this
 * software and its documentation for any purpose and without
 * fee is hereby granted, provided that the above copyright
 * notice appear in all copies.  The University of California
 * makes no representations about the suitability of this
 * software for any purpose.  It is provided "as is" without
 * express or implied warranty.
 */

#include <ctype.h>

/*
 * The table below is used to convert from ASCII digits to a
 * numerical equivalent.  It maps from '0' through 'z' to integers
 * (100 for non-digit characters).
 */

static const char cvtIn[] = {
    0, 1, 2, 3, 4, 5, 6, 7, 8, 9,               /* '0' - '9' */
    100, 100, 100, 100, 100, 100, 100,          /* punctuation */
    10, 11, 12, 13, 14, 15, 16, 17, 18, 19,     /* 'A' - 'Z' */
    20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
    30, 31, 32, 33, 34, 35,
    100, 100, 100, 100, 100, 100,               /* punctuation */
    10, 11, 12, 13, 14, 15, 16, 17, 18, 19,     /* 'a' - 'z' */
    20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
    30, 31, 32, 33, 34, 35};

/*
 *----------------------------------------------------------------------
 *
 * strtoul --
 *
 *      Convert an ASCII string into an integer.
 *
 * Results:
 *      The return value is the integer equivalent of string.  If endPtr
 *      is non-NULL, then *endPtr is filled in with the character
 *      after the last one that was part of the integer.  If string
 *      doesn't contain a valid integer value, then zero is returned
 *      and *endPtr is set to string.
 *
 * Side effects:
 *      None.
 *
 *----------------------------------------------------------------------
 */

unsigned long int
strtoul(
    const char *string,         /* String of ASCII digits, possibly
                                 * preceded by white space.  For bases
                                 * greater than 10, either lower- or
                                 * upper-case digits may be used.
                                 */
    char **endPtr,              /* Where to store address of terminating
                                 * character, or NULL. */
    int base)                   /* Base for conversion.  Must be less
                                 * than 37.  If 0, then the base is chosen
                                 * from the leading characters of string:
                                 * "0x" means hex, "0" means octal, anything
                                 * else means decimal.
                                 */
{
    register const char *p;
    register unsigned long int result = 0;
    register unsigned digit;
    int anyDigits = 0;

    /*
     * Skip any leading blanks.
     */

    p = string;
    while (isspace(*p)) {
        p += 1;
    }

    /*
     * If no base was provided, pick one from the leading characters
     * of the string.
     */

    if (base == 0)
    {
        if (*p == '0') {
            p += 1;
            if (*p == 'x') {
                p += 1;
                base = 16;
            } else {

                /*
                 * Must set anyDigits here, otherwise "0" produces a
                 * "no digits" error.
                 */

                anyDigits = 1;
                base = 8;
            }
        }
        else base = 10;
    } else if (base == 16) {

        /*
         * Skip a leading "0x" from hex numbers.
         */

        if ((p[0] == '0') && (p[1] == 'x')) {
            p += 2;
        }
    }

    /*
     * Sorry this code is so messy, but speed seems important.  Do
     * different things for base 8, 10, 16, and other.
     */

    if (base == 8) {
        for ( ; ; p += 1) {
            digit = *p - '0';
            if (digit > 7) {
                break;
            }
            result = (result << 3) + digit;
            anyDigits = 1;
        }
    } else if (base == 10) {
        for ( ; ; p += 1) {
            digit = *p - '0';
            if (digit > 9) {
                break;
            }
            result = (10*result) + digit;
            anyDigits = 1;
        }
    } else if (base == 16) {
        for ( ; ; p += 1) {
            digit = *p - '0';
            if (digit > ('z' - '0')) {
                break;
            }
            digit = cvtIn[digit];
            if (digit > 15) {
                break;
            }
            result = (result << 4) + digit;
            anyDigits = 1;
        }
    } else {
        for ( ; ; p += 1) {
            digit = *p - '0';
            if (digit > ('z' - '0')) {
                break;
            }
            digit = cvtIn[digit];
            if (digit >= base) {
                break;
            }
            result = result*base + digit;
            anyDigits = 1;
        }
    }

    /*
     * See if there were any digits at all.
     */

    if (!anyDigits) {
        p = string;
    }

    if (endPtr != 0) {
        *endPtr = (char *)p;
    }

    return result;
}
/* [<][>][^][v] [top][bottom][index] [help] */


missing/vsnprintf.c

root/missing/vsnprintf.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. FILE
  2. BSD__sfvwrite
  3. BSD__sprint
  4. BSD__sbprintf
  5. BSD__ultoa
  6. BSD_vfprintf
  7. cvt
  8. exponent
  9. vsnprintf
  10. snprintf
/*-
 * Copyright (c) 1990, 1993
 *      The Regents of the University of California.  All rights reserved.
 *
 * This code is derived from software contributed to Berkeley by
 * Chris Torek.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. Neither the name of the University nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

/*
 * IMPORTANT NOTE:
 * --------------
 * From ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
 * paragraph 3 above is now null and void.
 */

/* SNPRINTF.C
 * fjc 7-31-97 Modified by Mib Software to be a standalone snprintf.c module.
 *      http://www.mibsoftware.com
 * Mib Software does not warrant this software any differently than the
 * University of California, Berkeley as described above.  All warranties
 * are disclaimed.  Use this software at your own risk.
 *
 *      All code referencing FILE * functions was eliminated, since it could
 *      never be called.  All header files and necessary files are collapsed
 *      into one file, internal functions are declared static.  This should
 *      allow inclusion into libraries with less chance of namespace collisions.
 *
 *      snprintf should be the only externally visible item.
 *
 *      As of 7-31-97 FLOATING_POINT is NOT provided.  The code is somewhat
 *        non-portable, so it is disabled.
 */

/* Define FLOATING_POINT to get floating point. */
/*
#define FLOATING_POINT
*/

#include <sys/types.h>
#define u_long unsigned long
#define u_short unsigned short
#define u_int unsigned int

#if !defined(HAVE_STDARG_PROTOTYPES)
#if defined(__STDC__)
#define HAVE_STDARG_PROTOTYPES 1
#endif
#endif

#undef __P
#if defined(HAVE_STDARG_PROTOTYPES)
# include <stdarg.h>
# if !defined(__P)
#  define __P(x) x
# endif
#else
# define __P(x) ()
# if !defined(const)
#  define const
# endif
# include <varargs.h>
#endif
#ifndef _BSD_VA_LIST_
#define _BSD_VA_LIST_ va_list
#endif

#ifdef __STDC__
# include <limits.h>
#else
# ifndef LONG_MAX
#  ifdef HAVE_LIMITS_H
#   include <limits.h>
#  else
    /* assuming 32bit(2's compliment) long */
#   define LONG_MAX 2147483647
#  endif
# endif
#endif

#if defined(__hpux) && !defined(__GNUC__) && !defined(__STDC__)
#define const
#endif

#if defined(sgi)
#undef __const
#define __const
#endif /* People who don't like const sys_error */

#include <stddef.h>
#if defined(__hpux) && !defined(__GNUC__) || defined(__DECC)
#include <string.h>
#endif

#if !defined(__CYGWIN32__) && defined(__hpux) && !defined(__GNUC__)
#include <stdlib.h>
#endif

#ifndef NULL
#define NULL    0
#endif

/*
 * NB: to fit things in six character monocase externals, the stdio
 * code uses the prefix `__s' for stdio objects, typically followed
 * by a three-character attempt at a mnemonic.
 */

/* stdio buffers */
struct __sbuf {
        unsigned char *_base;
        int     _size;
};

/*
 * stdio state variables.
 *
 * The following always hold:
 *
 *      if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR),
 *              _lbfsize is -_bf._size, else _lbfsize is 0
 *      if _flags&__SRD, _w is 0
 *      if _flags&__SWR, _r is 0
 *
 * This ensures that the getc and putc macros (or inline functions) never
 * try to write or read from a file that is in `read' or `write' mode.
 * (Moreover, they can, and do, automatically switch from read mode to
 * write mode, and back, on "r+" and "w+" files.)
 *
 * _lbfsize is used only to make the inline line-buffered output stream
 * code as compact as possible.
 *
 * _ub, _up, and _ur are used when ungetc() pushes back more characters
 * than fit in the current _bf, or when ungetc() pushes back a character
 * that does not match the previous one in _bf.  When this happens,
 * _ub._base becomes non-nil (i.e., a stream has ungetc() data iff
 * _ub._base!=NULL) and _up and _ur save the current values of _p and _r.
 *
 * NB: see WARNING above before changing the layout of this structure!
 */
typedef struct __sFILE {
        unsigned char *_p;      /* current position in (some) buffer */
#if 0
        int     _r;             /* read space left for getc() */
#endif
        int     _w;             /* write space left for putc() */
        short   _flags;         /* flags, below; this FILE is free if 0 */
        short   _file;          /* fileno, if Unix descriptor, else -1 */
        struct  __sbuf _bf;     /* the buffer (at least 1 byte, if !NULL) */
        int     _lbfsize;       /* 0 or -_bf._size, for inline putc */
        int     (*vwrite)(/* struct __sFILE*, struct __suio * */);
} FILE;

#define __SLBF  0x0001          /* line buffered */
#define __SNBF  0x0002          /* unbuffered */
#define __SRD   0x0004          /* OK to read */
#define __SWR   0x0008          /* OK to write */
        /* RD and WR are never simultaneously asserted */
#define __SRW   0x0010          /* open for reading & writing */
#define __SEOF  0x0020          /* found EOF */
#define __SERR  0x0040          /* found error */
#define __SMBF  0x0080          /* _buf is from malloc */
#define __SAPP  0x0100          /* fdopen()ed in append mode */
#define __SSTR  0x0200          /* this is an sprintf/snprintf string */
#define __SOPT  0x0400          /* do fseek() optimisation */
#define __SNPT  0x0800          /* do not do fseek() optimisation */
#define __SOFF  0x1000          /* set iff _offset is in fact correct */
#define __SMOD  0x2000          /* true => fgetln modified _p text */

#define EOF     (-1)

#define __sfeof(p)      (((p)->_flags & __SEOF) != 0)
#define __sferror(p)    (((p)->_flags & __SERR) != 0)
#define __sclearerr(p)  ((void)((p)->_flags &= ~(__SERR|__SEOF)))
#define __sfileno(p)    ((p)->_file)

#undef feof
#undef ferror
#undef clearerr
#define feof(p)         __sfeof(p)
#define ferror(p)       __sferror(p)
#define clearerr(p)     __sclearerr(p)

#ifndef _ANSI_SOURCE
#define fileno(p)       __sfileno(p)
#endif

/*
 * I/O descriptors for __sfvwrite().
 */
struct __siov {
        void    *iov_base;
        size_t  iov_len;
};
struct __suio {
        struct  __siov *uio_iov;
        int     uio_iovcnt;
        int     uio_resid;
};

#if !defined(HAVE_VSNPRINTF) || !defined(HAVE_SNPRINTF)
/*
 * Write some memory regions.  Return zero on success, EOF on error.
 *
 * This routine is large and unsightly, but most of the ugliness due
 * to the three different kinds of output buffering is handled here.
 */
static int BSD__sfvwrite(fp, uio)
        register FILE *fp;
        register struct __suio *uio;
{
        register size_t len;
        register char *p;
        register struct __siov *iov;
        register int w;

        if ((len = uio->uio_resid) == 0)
                return (0);
#ifndef __hpux
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif
#define COPY(n)   (void)memcpy((void *)fp->_p, (void *)p, (size_t)(n))

        iov = uio->uio_iov;
        p = iov->iov_base;
        len = iov->iov_len;
        iov++;
#define GETIOV(extra_work) \
        while (len == 0) { \
                extra_work; \
                p = iov->iov_base; \
                len = iov->iov_len; \
                iov++; \
        }
        if (fp->_flags & __SNBF) {
        /* fjc 7-31-97 Will never happen.  We are working with
                                           strings only
        */
        } else if ((fp->_flags & __SLBF) == 0) {
        /*
                 * Fully buffered: fill partially full buffer, if any,
                 * and then flush.  If there is no partial buffer, write
                 * one _bf._size byte chunk directly (without copying).
                 *
                 * String output is a special case: write as many bytes
                 * as fit, but pretend we wrote everything.  This makes
                 * snprintf() return the number of bytes needed, rather
                 * than the number used, and avoids its write function
                 * (so that the write function can be invalid).
                 */
                do {
                        GETIOV(;);
                        w = fp->_w;
                        if (fp->_flags & __SSTR) {
                                if (len < w)
                                        w = len;
                                COPY(w);        /* copy MIN(fp->_w,len), */
                                fp->_w -= w;
                                fp->_p += w;
                                w = len;        /* but pretend copied all */
                        } else {
                                /* fjc 7-31-97 Will never happen.  We are working with
                                                                   strings only
                                */
                        }
                        p += w;
                        len -= w;
                } while ((uio->uio_resid -= w) != 0);
        } else {
                /* fjc 7-31-97 Will never happen.  We are working with
                                                   strings only
                */
        }
        return (0);
}
#endif

/*
 * Actual printf innards.
 *
 * This code is large and complicated...
 */

/*
 * Flush out all the vectors defined by the given uio,
 * then reset it so that it can be reused.
 */
static int
BSD__sprint(fp, uio)
        FILE *fp;
        register struct __suio *uio;
{
        register int err;

        if (uio->uio_resid == 0) {
                uio->uio_iovcnt = 0;
                return (0);
        }
        err = (*fp->vwrite)(fp, uio);
        uio->uio_resid = 0;
        uio->uio_iovcnt = 0;
        return (err);
}

/*
 * Helper function for `fprintf to unbuffered unix file': creates a
 * temporary buffer.  We only work on write-only files; this avoids
 * worries about ungetc buffers and so forth.
 */
static int
BSD__sbprintf(fp, fmt, ap)
        register FILE *fp;
        const char *fmt;
        va_list ap;
{
/* We don't support files. */
        return 0;
}

/*
 * Macros for converting digits to letters and vice versa
 */
#define to_digit(c)     ((c) - '0')
#define is_digit(c)     ((unsigned)to_digit(c) <= 9)
#define to_char(n)      ((n) + '0')

/*
 * Convert an unsigned long to ASCII for printf purposes, returning
 * a pointer to the first character of the string representation.
 * Octal numbers can be forced to have a leading zero; hex numbers
 * use the given digits.
 */
static char *
BSD__ultoa(val, endp, base, octzero, xdigs)
        register u_long val;
        char *endp;
        int base, octzero;
        char *xdigs;
{
        register char *cp = endp;
        register long sval;

        /*
         * Handle the three cases separately, in the hope of getting
         * better/faster code.
         */
        switch (base) {
        case 10:
                if (val < 10) { /* many numbers are 1 digit */
                        *--cp = to_char(val);
                        return (cp);
                }
                /*
                 * On many machines, unsigned arithmetic is harder than
                 * signed arithmetic, so we do at most one unsigned mod and
                 * divide; this is sufficient to reduce the range of
                 * the incoming value to where signed arithmetic works.
                 */
                if (val > LONG_MAX) {
                        *--cp = to_char(val % 10);
                        sval = val / 10;
                } else
                        sval = val;
                do {
                        *--cp = to_char(sval % 10);
                        sval /= 10;
                } while (sval != 0);
                break;

        case 8:
                do {
                        *--cp = to_char(val & 7);
                        val >>= 3;
                } while (val);
                if (octzero && *cp != '0')
                        *--cp = '0';
                break;

        case 16:
                do {
                        *--cp = xdigs[val & 15];
                        val >>= 4;
                } while (val);
                break;

        default:                        /* oops */
                /*
                abort();
                */
                break;  /* fjc 7-31-97.  Don't reference abort() here */
        }
        return (cp);
}

#ifdef FLOATING_POINT
#include <math.h>
/* #include "floatio.h" */

#ifndef MAXEXP
# define MAXEXP 1024
#endif

#ifndef MAXFRACT
# define MAXFRACT 64
#endif

#define BUF             (MAXEXP+MAXFRACT+1)     /* + decimal point */
#define DEFPREC         6

static char *cvt __P((double, int, int, char *, int *, int, int *));
static int exponent __P((char *, int, int));

#else /* no FLOATING_POINT */

#define BUF             68

#endif /* FLOATING_POINT */

/*
 * Flags used during conversion.
 */
#define ALT             0x001           /* alternate form */
#define HEXPREFIX       0x002           /* add 0x or 0X prefix */
#define LADJUST         0x004           /* left adjustment */
#define LONGDBL         0x008           /* long double; unimplemented */
#define LONGINT         0x010           /* long integer */

#ifdef _HAVE_SANE_QUAD_
#define QUADINT         0x020           /* quad integer */
#endif /* _HAVE_SANE_QUAD_ */

#define SHORTINT        0x040           /* short integer */
#define ZEROPAD         0x080           /* zero (as opposed to blank) pad */
#define FPT             0x100           /* Floating point number */
static int
BSD_vfprintf(fp, fmt0, ap)
        FILE *fp;
        const char *fmt0;
        va_list ap;
{
        register char *fmt;     /* format string */
        register int ch;        /* character from fmt */
        register int n;         /* handy integer (short term usage) */
        register char *cp;      /* handy char pointer (short term usage) */
        register struct __siov *iovp;/* for PRINT macro */
        register int flags;     /* flags as above */
        int ret;                /* return value accumulator */
        int width;              /* width from format (%8d), or 0 */
        int prec;               /* precision from format (%.3d), or -1 */
        char sign;              /* sign prefix (' ', '+', '-', or \0) */
#ifdef FLOATING_POINT
        char softsign;          /* temporary negative sign for floats */
        double _double;         /* double precision arguments %[eEfgG] */
        int expt;               /* integer value of exponent */
        int expsize;            /* character count for expstr */
        int ndig;               /* actual number of digits returned by cvt */
        char expstr[7];         /* buffer for exponent string */
#endif
        u_long  ulval;          /* integer arguments %[diouxX] */
#ifdef _HAVE_SANE_QUAD_
        u_quad_t uqval;         /* %q integers */
#endif /* _HAVE_SANE_QUAD_ */
        int base;               /* base for [diouxX] conversion */
        int dprec;              /* a copy of prec if [diouxX], 0 otherwise */
        int fieldsz;            /* field size expanded by sign, etc */
        int realsz;             /* field size expanded by dprec */
        int size;               /* size of converted field or string */
        char *xdigs;            /* digits for [xX] conversion */
#define NIOV 8
        struct __suio uio;      /* output information: summary */
        struct __siov iov[NIOV];/* ... and individual io vectors */
        char buf[BUF];          /* space for %c, %[diouxX], %[eEfgG] */
        char ox[2];             /* space for 0x hex-prefix */

        /*
         * Choose PADSIZE to trade efficiency vs. size.  If larger printf
         * fields occur frequently, increase PADSIZE and make the initialisers
         * below longer.
         */
#define PADSIZE 16              /* pad chunk size */
        static char blanks[PADSIZE] =
         {' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '};
        static char zeroes[PADSIZE] =
         {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'};

        /*
         * BEWARE, these `goto error' on error, and PAD uses `n'.
         */
#define PRINT(ptr, len) { \
        iovp->iov_base = (ptr); \
        iovp->iov_len = (len); \
        uio.uio_resid += (len); \
        iovp++; \
        if (++uio.uio_iovcnt >= NIOV) { \
                if (BSD__sprint(fp, &uio)) \
                        goto error; \
                iovp = iov; \
        } \
}
#define PAD(howmany, with) { \
        if ((n = (howmany)) > 0) { \
                while (n > PADSIZE) { \
                        PRINT(with, PADSIZE); \
                        n -= PADSIZE; \
                } \
                PRINT(with, n); \
        } \
}
#define FLUSH() { \
        if (uio.uio_resid && BSD__sprint(fp, &uio)) \
                goto error; \
        uio.uio_iovcnt = 0; \
        iovp = iov; \
}

        /*
         * To extend shorts properly, we need both signed and unsigned
         * argument extraction methods.
         */
#define SARG() \
        (flags&LONGINT ? va_arg(ap, long) : \
            flags&SHORTINT ? (long)(short)va_arg(ap, int) : \
            (long)va_arg(ap, int))
#define UARG() \
        (flags&LONGINT ? va_arg(ap, u_long) : \
            flags&SHORTINT ? (u_long)(u_short)va_arg(ap, int) : \
            (u_long)va_arg(ap, u_int))

        /* optimise fprintf(stderr) (and other unbuffered Unix files) */
        if ((fp->_flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) &&
            fp->_file >= 0)
                return (BSD__sbprintf(fp, fmt0, ap));

        fmt = (char *)fmt0;
        uio.uio_iov = iovp = iov;
        uio.uio_resid = 0;
        uio.uio_iovcnt = 0;
        ret = 0;

        /*
         * Scan the format for conversions (`%' character).
         */
        for (;;) {
                for (cp = fmt; (ch = *fmt) != '\0' && ch != '%'; fmt++)
                        /* void */;
                if ((n = fmt - cp) != 0) {
                        PRINT(cp, n);
                        ret += n;
                }
                if (ch == '\0')
                        goto done;
                fmt++;          /* skip over '%' */

                flags = 0;
                dprec = 0;
                width = 0;
                prec = -1;
                sign = '\0';

rflag:          ch = *fmt++;
reswitch:       switch (ch) {
                case ' ':
                        /*
                         * ``If the space and + flags both appear, the space
                         * flag will be ignored.''
                         *      -- ANSI X3J11
                         */
                        if (!sign)
                                sign = ' ';
                        goto rflag;
                case '#':
                        flags |= ALT;
                        goto rflag;
                case '*':
                        /*
                         * ``A negative field width argument is taken as a
                         * - flag followed by a positive field width.''
                         *      -- ANSI X3J11
                         * They don't exclude field widths read from args.
                         */
                        if ((width = va_arg(ap, int)) >= 0)
                                goto rflag;
                        width = -width;
                        /* FALLTHROUGH */
                case '-':
                        flags |= LADJUST;
                        goto rflag;
                case '+':
                        sign = '+';
                        goto rflag;
                case '.':
                        if ((ch = *fmt++) == '*') {
                                n = va_arg(ap, int);
                                prec = n < 0 ? -1 : n;
                                goto rflag;
                        }
                        n = 0;
                        while (is_digit(ch)) {
                                n = 10 * n + to_digit(ch);
                                ch = *fmt++;
                        }
                        prec = n < 0 ? -1 : n;
                        goto reswitch;
                case '0':
                        /*
                         * ``Note that 0 is taken as a flag, not as the
                         * beginning of a field width.''
                         *      -- ANSI X3J11
                         */
                        flags |= ZEROPAD;
                        goto rflag;
                case '1': case '2': case '3': case '4':
                case '5': case '6': case '7': case '8': case '9':
                        n = 0;
                        do {
                                n = 10 * n + to_digit(ch);
                                ch = *fmt++;
                        } while (is_digit(ch));
                        width = n;
                        goto reswitch;
#ifdef FLOATING_POINT
                case 'L':
                        flags |= LONGDBL;
                        goto rflag;
#endif
                case 'h':
                        flags |= SHORTINT;
                        goto rflag;
                case 'l':
                        flags |= LONGINT;
                        goto rflag;
#ifdef _HAVE_SANE_QUAD_
                case 'q':
                        flags |= QUADINT;
                        goto rflag;
#endif /* _HAVE_SANE_QUAD_ */
                case 'c':
                        *(cp = buf) = va_arg(ap, int);
                        size = 1;
                        sign = '\0';
                        break;
                case 'D':
                        flags |= LONGINT;
                        /*FALLTHROUGH*/
                case 'd':
                case 'i':
#ifdef _HAVE_SANE_QUAD_
                        if (flags & QUADINT) {
                                uqval = va_arg(ap, quad_t);
                                if ((quad_t)uqval < 0) {
                                        uqval = -uqval;
                                        sign = '-';
                                }
                        } else
#endif /* _HAVE_SANE_QUAD_ */
                        {
                                ulval = SARG();
                                if ((long)ulval < 0) {
                                        ulval = -ulval;
                                        sign = '-';
                                }
                        }
                        base = 10;
                        goto number;
#ifdef FLOATING_POINT
                case 'e':               /* anomalous precision */
                case 'E':
                        prec = (prec == -1) ?
                                DEFPREC + 1 : prec + 1;
                        /* FALLTHROUGH */
                        goto fp_begin;
                case 'f':               /* always print trailing zeroes */
                        if (prec != 0)
                                flags |= ALT;
                case 'g':
                case 'G':
                        if (prec == -1)
                                prec = DEFPREC;
fp_begin:               _double = va_arg(ap, double);
                        /* do this before tricky precision changes */
                        if (isinf(_double)) {
                                if (_double < 0)
                                        sign = '-';
                                cp = "Inf";
                                size = 3;
                                break;
                        }
                        if (isnan(_double)) {
                                cp = "NaN";
                                size = 3;
                                break;
                        }
                        flags |= FPT;
                        cp = cvt(_double, prec, flags, &softsign,
                                &expt, ch, &ndig);
                        if (ch == 'g' || ch == 'G') {
                                if (expt <= -4 || expt > prec)
                                        ch = (ch == 'g') ? 'e' : 'E';
                                else
                                        ch = 'g';
                        }
                        if (ch <= 'e') {        /* 'e' or 'E' fmt */
                                --expt;
                                expsize = exponent(expstr, expt, ch);
                                size = expsize + ndig;
                                if (ndig > 1 || flags & ALT)
                                        ++size;
                        } else if (ch == 'f') {         /* f fmt */
                                if (expt > 0) {
                                        size = expt;
                                        if (prec || flags & ALT)
                                                size += prec + 1;
                                } else  /* "0.X" */
                                        size = prec + 2;
                        } else if (expt >= ndig) {      /* fixed g fmt */
                                size = expt;
                                if (flags & ALT)
                                        ++size;
                        } else
                                size = ndig + (expt > 0 ?
                                        1 : 2 - expt);

                        if (softsign)
                                sign = '-';
                        break;
#endif /* FLOATING_POINT */
                case 'n':
#ifdef _HAVE_SANE_QUAD_
                        if (flags & QUADINT)
                                *va_arg(ap, quad_t *) = ret;
                        else if (flags & LONGINT)
#else /* _HAVE_SANE_QUAD_ */
                        if (flags & LONGINT)
#endif /* _HAVE_SANE_QUAD_ */
                                *va_arg(ap, long *) = ret;
                        else if (flags & SHORTINT)
                                *va_arg(ap, short *) = ret;
                        else
                                *va_arg(ap, int *) = ret;
                        continue;       /* no output */
                case 'O':
                        flags |= LONGINT;
                        /*FALLTHROUGH*/
                case 'o':
#ifdef _HAVE_SANE_QUAD_
                        if (flags & QUADINT)
                                uqval = va_arg(ap, u_quad_t);
                        else
#endif /* _HAVE_SANE_QUAD_ */
                                ulval = UARG();
                        base = 8;
                        goto nosign;
                case 'p':
                        /*
                         * ``The argument shall be a pointer to void.  The
                         * value of the pointer is converted to a sequence
                         * of printable characters, in an implementation-
                         * defined manner.''
                         *      -- ANSI X3J11
                         */
                        prec = sizeof(void*)*CHAR_BIT/4;
#ifdef _HAVE_LLP64_
                        uqval = (u_long)va_arg(ap, void *);
                        flags = (flags) | QUADINT | HEXPREFIX;
#else
                        ulval = (u_long)va_arg(ap, void *);
#ifdef _HAVE_SANE_QUAD_
                        flags = (flags & ~QUADINT) | HEXPREFIX;
#else /* _HAVE_SANE_QUAD_ */
                        flags = (flags) | HEXPREFIX;
#endif /* _HAVE_SANE_QUAD_ */
#endif
                        base = 16;
                        xdigs = "0123456789abcdef";
                        ch = 'x';
                        goto nosign;
                case 's':
                        if ((cp = va_arg(ap, char *)) == NULL)
                                cp = "(null)";
                        if (prec >= 0) {
                                /*
                                 * can't use strlen; can only look for the
                                 * NUL in the first `prec' characters, and
                                 * strlen() will go further.
                                 */
                                char *p = (char *)memchr(cp, 0, prec);

                                if (p != NULL) {
                                        size = p - cp;
                                        if (size > prec)
                                                size = prec;
                                } else
                                        size = prec;
                        } else
                                size = strlen(cp);
                        sign = '\0';
                        break;
                case 'U':
                        flags |= LONGINT;
                        /*FALLTHROUGH*/
                case 'u':
#ifdef _HAVE_SANE_QUAD_
                        if (flags & QUADINT)
                                uqval = va_arg(ap, u_quad_t);
                        else
#endif /* _HAVE_SANE_QUAD_ */
                                ulval = UARG();
                        base = 10;
                        goto nosign;
                case 'X':
                        xdigs = "0123456789ABCDEF";
                        goto hex;
                case 'x':
                        xdigs = "0123456789abcdef";
hex:
#ifdef _HAVE_SANE_QUAD_
                        if (flags & QUADINT)
                                uqval = va_arg(ap, u_quad_t);
                        else
#endif /* _HAVE_SANE_QUAD_ */
                                ulval = UARG();
                        base = 16;
                        /* leading 0x/X only if non-zero */
                        if (flags & ALT &&
#ifdef _HAVE_SANE_QUAD_
                            (flags & QUADINT ? uqval != 0 : ulval != 0))
#else /* _HAVE_SANE_QUAD_ */
                            ulval != 0)
#endif /* _HAVE_SANE_QUAD_ */
                                flags |= HEXPREFIX;

                        /* unsigned conversions */
nosign:                 sign = '\0';
                        /*
                         * ``... diouXx conversions ... if a precision is
                         * specified, the 0 flag will be ignored.''
                         *      -- ANSI X3J11
                         */
number:                 if ((dprec = prec) >= 0)
                                flags &= ~ZEROPAD;

                        /*
                         * ``The result of converting a zero value with an
                         * explicit precision of zero is no characters.''
                         *      -- ANSI X3J11
                         */
                        cp = buf + BUF;
#ifdef _HAVE_SANE_QUAD_
                        if (flags & QUADINT) {
                                if (uqval != 0 || prec != 0)
                                        cp = __uqtoa(uqval, cp, base,
                                            flags & ALT, xdigs);
                        } else {
#else /* _HAVE_SANE_QUAD_ */
                        {
#endif /* _HAVE_SANE_QUAD_ */
                                if (ulval != 0 || prec != 0)
                                        cp = BSD__ultoa(ulval, cp, base,
                                            flags & ALT, xdigs);
                        }
                        size = buf + BUF - cp;
                        break;
                default:        /* "%?" prints ?, unless ? is NUL */
                        if (ch == '\0')
                                goto done;
                        /* pretend it was %c with argument ch */
                        cp = buf;
                        *cp = ch;
                        size = 1;
                        sign = '\0';
                        break;
                }

                /*
                 * All reasonable formats wind up here.  At this point, `cp'
                 * points to a string which (if not flags&LADJUST) should be
                 * padded out to `width' places.  If flags&ZEROPAD, it should
                 * first be prefixed by any sign or other prefix; otherwise,
                 * it should be blank padded before the prefix is emitted.
                 * After any left-hand padding and prefixing, emit zeroes
                 * required by a decimal [diouxX] precision, then print the
                 * string proper, then emit zeroes required by any leftover
                 * floating precision; finally, if LADJUST, pad with blanks.
                 *
                 * Compute actual size, so we know how much to pad.
                 * fieldsz excludes decimal prec; realsz includes it.
                 */
                fieldsz = size;
                if (sign)
                        fieldsz++;
                else if (flags & HEXPREFIX)
                        fieldsz += 2;
                realsz = dprec > fieldsz ? dprec : fieldsz;

                /* right-adjusting blank padding */
                if ((flags & (LADJUST|ZEROPAD)) == 0)
                        PAD(width - realsz, blanks);

                /* prefix */
                if (sign) {
                        PRINT(&sign, 1);
                } else if (flags & HEXPREFIX) {
                        ox[0] = '0';
                        ox[1] = ch;
                        PRINT(ox, 2);
                }

                /* right-adjusting zero padding */
                if ((flags & (LADJUST|ZEROPAD)) == ZEROPAD)
                        PAD(width - realsz, zeroes);

                /* leading zeroes from decimal precision */
                PAD(dprec - fieldsz, zeroes);

                /* the string or number proper */
#ifdef FLOATING_POINT
                if ((flags & FPT) == 0) {
                        PRINT(cp, size);
                } else {        /* glue together f_p fragments */
                        if (ch >= 'f') {        /* 'f' or 'g' */
                                if (_double == 0) {
                                /* kludge for __dtoa irregularity */
                                        if (prec == 0 ||
                                            (flags & ALT) == 0) {
                                                PRINT("0", 1);
                                        } else {
                                                PRINT("0.", 2);
                                                PAD(ndig - 1, zeroes);
                                        }
                                } else if (expt <= 0) {
                                        PRINT("0.", 2);
                                        PAD(-expt, zeroes);
                                        PRINT(cp, ndig);
                                } else if (expt >= ndig) {
                                        PRINT(cp, ndig);
                                        PAD(expt - ndig, zeroes);
                                        if (flags & ALT)
                                                PRINT(".", 1);
                                } else {
                                        PRINT(cp, expt);
                                        cp += expt;
                                        PRINT(".", 1);
                                        PRINT(cp, ndig-expt);
                                }
                        } else {        /* 'e' or 'E' */
                                if (ndig > 1 || flags & ALT) {
                                        ox[0] = *cp++;
                                        ox[1] = '.';
                                        PRINT(ox, 2);
                                        if (_double || flags & ALT == 0) {
                                                PRINT(cp, ndig-1);
                                        } else  /* 0.[0..] */
                                                /* __dtoa irregularity */
                                                PAD(ndig - 1, zeroes);
                                } else  /* XeYYY */
                                        PRINT(cp, 1);
                                PRINT(expstr, expsize);
                        }
                }
#else
                PRINT(cp, size);
#endif
                /* left-adjusting padding (always blank) */
                if (flags & LADJUST)
                        PAD(width - realsz, blanks);

                /* finally, adjust ret */
                ret += width > realsz ? width : realsz;

                FLUSH();        /* copy out the I/O vectors */
        }
done:
        FLUSH();
error:
        return (__sferror(fp) ? EOF : ret);
        /* NOTREACHED */
}

#ifdef FLOATING_POINT

extern char *BSD__dtoa __P((double, int, int, int *, int *, char **));

static char *
cvt(value, ndigits, flags, sign, decpt, ch, length)
        double value;
        int ndigits, flags, *decpt, ch, *length;
        char *sign;
{
        int mode, dsgn;
        char *digits, *bp, *rve;

        if (ch == 'f')
                mode = 3;
        else {
                mode = 2;
        }
        if (value < 0) {
                value = -value;
                *sign = '-';
        } else if (value == 0.0 && 1.0/value < 0) {
            *sign = '-';
        } else {
            *sign = '\000';
        }
        digits = BSD__dtoa(value, mode, ndigits, decpt, &dsgn, &rve);
        if (flags & ALT) {      /* Print trailing zeros */
                bp = digits + ndigits;
                if (ch == 'f') {
                        if (*digits == '0' && value)
                                *decpt = -ndigits + 1;
                        bp += *decpt;
                }
                if (value == 0) /* kludge for __dtoa irregularity */
                        rve = bp;
                while (rve < bp)
                        *rve++ = '0';
        }
        *length = rve - digits;
        return (digits);
}

static int
exponent(p0, exp, fmtch)
        char *p0;
        int exp, fmtch;
{
        register char *p, *t;
        char expbuf[MAXEXP];

        p = p0;
        *p++ = fmtch;
        if (exp < 0) {
                exp = -exp;
                *p++ = '-';
        }
        else
                *p++ = '+';
        t = expbuf + MAXEXP;
        if (exp > 9) {
                do {
                        *--t = to_char(exp % 10);
                } while ((exp /= 10) > 9);
                *--t = to_char(exp);
                for (; t < expbuf + MAXEXP; *p++ = *t++);
        }
        else {
                *p++ = '0';
                *p++ = to_char(exp);
        }
        return (p - p0);
}
#endif /* FLOATING_POINT */

#ifndef HAVE_VSNPRINTF
int
vsnprintf(str, n, fmt, ap)
        char *str;
        size_t n;
        const char *fmt;
        _BSD_VA_LIST_ ap;
{
        int ret;
        FILE f;

        if ((int)n < 1)
                return (EOF);
        f._flags = __SWR | __SSTR;
        f._bf._base = f._p = (unsigned char *)str;
        f._bf._size = f._w = n - 1;
        f.vwrite = BSD__sfvwrite;
        ret = BSD_vfprintf(&f, fmt, ap);
        *f._p = 0;
        return (ret);
}
#endif

#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)snprintf.c  8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */

#ifndef HAVE_SNPRINTF
int
#if defined(HAVE_STDARG_PROTOTYPES)
snprintf(char *str, size_t n, char const *fmt, ...)
#else
snprintf(str, n, fmt, va_alist)
char *str, *fmt;
size_t n;
va_dcl
#endif
{
        int ret;
        va_list ap;
        FILE f;

        if ((int)n < 1)
                return (EOF);

#if defined(HAVE_STDARG_PROTOTYPES)
        va_start(ap, fmt);
#else
        va_start(ap);
#endif
        f._flags = __SWR | __SSTR;
        f._bf._base = f._p = (unsigned char *)str;
        f._bf._size = f._w = n - 1;
        f.vwrite = BSD__sfvwrite;
        ret = BSD_vfprintf(&f, fmt, ap);
        *f._p = 0;
        va_end(ap);
        return (ret);
}
#endif
/* [<][>][^] [v] [top][bottom][index] [help] */


missing/x68.c

root/missing/x68.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. link
  2. gettimeofday
/* x68 compatibility functions -- follows Ruby's license */

#include "config.h"

#if !HAVE_SELECT
#include "x68/select.c"
#endif
#if MISSING__DTOS18
#include "x68/_dtos18.c"
#endif
#if MISSING_FCONVERT
#include "x68/_round.c"
#include "x68/fconvert.c"
#endif

/* missing some basic syscalls */
int
link(const char *src, const char *dst)
{
    return symlink(src, dst);
}

#ifndef HAVE_GETTIMEOFDAY
#include <time.h>
#include <sys/time.h>

struct timezone {
    int tz_minuteswest;
    int tz_dsttime;
};

int
gettimeofday(struct timeval *tv, struct timezone *tz)
{
    tv->tv_sec = (long)time((time_t*)0);
    tv->tv_usec = 0;

    return 0;
}
#endif
/* [<][>][^] [v] [top][bottom][index] [help] */


vms/config.h

root/vms/config.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

#define HAVE_ACOSH 1
/* #define HAVE_ALLOCA_H 1 */
/* #define HAVE_CHROOT 1 */
#define HAVE_COSH 1
/* #define HAVE_CRYPT 1 */
#define HAVE_DAYLIGHT 1
#define HAVE_DECL_SYS_NERR 1
#define HAVE_DIRENT_H 1
#define HAVE_DLOPEN 1
#define HAVE_DUP2 1
/* #define HAVE_FCHMOD 1 */
#define HAVE_FCNTL 1
#define HAVE_FCNTL_H 1
#define HAVE_FINITE 1
#define HAVE_FLOCK 1
#define HAVE_FMOD 1
#define HAVE_FREXP 1
/* #define HAVE_FSEEKO 1 */
#define HAVE_FSYNC 1
/* #define HAVE_FTELLO 1 */
#define HAVE_GETCWD 1
/* #define HAVE_GETPGID 1 xxxx */
#define HAVE_GETPGRP 1
/* #define HAVE_GETPRIORITY 1 */
/* #define HAVE_GETRLIMIT 1 */
#define HAVE_PID_T 1
#define HAVE_GID_T 1
#define HAVE_UID_T 1
#define HAVE_HYPOT 1
#define HAVE_ISASCII 1
/* #define HAVE_ISINF 1 */
#define HAVE_ISNAN 1
/* #define HAVE_LCHMOD 1 */
/* #define HAVE_LCHOWN 1 */
#define HAVE_LONG_LONG 1
/* #define HAVE_LSTAT 1 */
#define HAVE_MEMCMP 1
#define HAVE_MEMMOVE 1
#define HAVE_MKDIR 1
#define HAVE_MKTIME 1
#define HAVE_MODF 1
#define HAVE_OFF_T 1
#define HAVE_PAUSE 1
/* #define HAVE_PROTOTYPES 1 */
/* #define HAVE_PWD_H 1 */
/* #define HAVE_READLINK 1 */
#define HAVE_SEEKDIR 1
/* #define HAVE_SETITIMER 1 */
/* #define HAVE_SETPGID 1 xxxx */
/* #define HAVE_SETRESGID 1 */
/* #define HAVE_SETRESUID 1 */
/* #define HAVE_SETSID 1 xxxx */
#define HAVE_SIGPROCMASK 1
#define HAVE_SINH 1
#define HAVE_STDARG_PROTOTYPES 1
#define HAVE_STDLIB_H 1
#define HAVE_STRCASECMP 1
#define HAVE_STRCHR 1
#define HAVE_STRERROR 1
#define HAVE_STRFTIME 1
#define HAVE_STRING_H 1
#define HAVE_STRNCASECMP 1
#define HAVE_STRSTR 1
#define HAVE_STRTOD 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
#define HAVE_STRUCT_TM_TM_GMTOFF 1
/* #define HAVE_ST_BLKSIZE 1 */
/* #define HAVE_ST_BLOCKS 1 */
#define HAVE_ST_RDEV 1
/* #define HAVE_SYMLINK 1 */
/* #define HAVE_SYSCALL 1 */
#define HAVE_SYS_FILE_H 1
/* #define HAVE_SYS_MKDEV_H 1 */
/* #define HAVE_SYS_PARAM_H 1 */
#define HAVE_SYS_RESOURCE_H 1
/* #define HAVE_SYS_SELECT_H 1 */
#define HAVE_SYS_TIMES_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_WAIT_H 1
#define HAVE_TANH 1
#define HAVE_TELLDIR 1
/* #define HAVE_TIMEGM 1 */
#define HAVE_TIMES 1
#define HAVE_TM_ZONE 1
#define HAVE_TRUNCATE 1
#define HAVE_TZNAME 1
#define HAVE_UNISTD_H 1
#define HAVE_UTIMES 1
#define HAVE_UTIME_H 1
/* #define HAVE_VSNPRINTF 1 */
#define HAVE_WAIT4 1
#define HAVE_WAITPID 1
 #define HAVE__SETJMP 1

#define GETGROUPS_T gid_t
#define RETSIGTYPE void

#define RSHIFT(x,y) ((x)>>y)
#define DEFAULT_KCODE KCODE_EUC
#define DLEXT ".EXE"
#define DLEXT2 ""
#define RUBY_LIB "/RUBY_LIB"
#define RUBY_SITE_LIB "/RUBY_SYSLIB"
#define RUBY_SITE_LIB2 "/SYS$SHARE"
#define RUBY_ARCHLIB ""
#define RUBY_SITE_ARCHLIB ""
#define SIZEOF_INT 4
#define SIZEOF_SHORT 2
#define SIZEOF_LONG 4
#define SIZEOF_VOIDP 4
#define SIZEOF_FLOAT 4
#define SIZEOF_DOUBLE 8

#if defined(__vax)
#define RUBY_PLATFORM "vax-vms"
#elif defined(__alpha)
#define RUBY_PLATFORM "alpha-vms"
#elif defined(__ia-64)
#define RUBY_PLATFORM "ia64-vms"
#else
#define RUBY_PLATFORM "vms"
#endif
/* [<][>][^][v][top][bottom][index] [help] */


vms/vms.h

root/vms/vms.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

#ifndef __FAST_SETJMP
#define __FAST_SETJMP   /* use decc$setjmp/decc$longjmp */
#endif

extern int isinf(double);
extern int isnan(double);
extern int flock(int fd, int oper);

extern int vsnprintf();
extern int snprintf();

#define LONG_LONG long long
#define SIZEOF_LONG_LONG sizeof(long long)
/* [<][>][^][v][top][bottom][index] [help] */


vms/vmsruby_private.c

root/vms/vmsruby_private.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. _vmsruby_init
  2. _vmsruby_set_switch
#include "vmsruby_private.h"
#include <stdio.h>
#include <stdlib.h>

void _vmsruby_init(void)
{
    _vmsruby_set_switch("DECC$WLS", "TRUE");
}

#include <starlet.h>
#include <string.h>
#include <descrip.h>
#include <lnmdef.h>

struct item_list_3 {
    short buflen;
    short itmcod;
    void *bufadr;
    void *retlen;
};

long _vmsruby_set_switch(char *name, char *value)
{
    long status;
    struct item_list_3 itemlist[20];
    int i;

    i = 0;
    itemlist[i].itmcod = LNM$_STRING;
    itemlist[i].buflen = strlen(value);
    itemlist[i].bufadr = value;
    itemlist[i].retlen = NULL;
    i++;
    itemlist[i].itmcod = 0;
    itemlist[i].buflen = 0;

    $DESCRIPTOR(TABLE_d, "LNM$PROCESS");
    $DESCRIPTOR(lognam_d, "");

    lognam_d.dsc$a_pointer = name;
    lognam_d.dsc$w_length  = strlen(name);

    status = sys$crelnm (
                 0,
                 &TABLE_d,
                 &lognam_d,
                 0,  /* usermode */
                 itemlist);

    return status;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


vms/vmsruby_private.h

root/vms/vmsruby_private.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

#ifndef VMSRUBY_H_INCLUDED
#define VMSRUBY_H_INCLUDED

void _vmsruby_init(void);
long _vmsruby_set_switch(char *, char *);

#endif /* VMSRUBY_H_INCLUDED */
/* [<][>][^][v][top][bottom][index] [help] */


win32/dir.h

root/win32/dir.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

DEFINITIONS

This source file includes following definitions.
  1. DIR
#ifndef RUBY_WIN32_DIR_H
#define RUBY_WIN32_DIR_H

#ifdef __BORLANDC__
#  ifndef WIN32_DIR_H_
#    define WIN32_DIR_H_
#    include <sys/types.h>
#  endif
#endif

struct direct
{
    long d_namlen;
    ino_t d_ino;
    char d_name[256];
    char d_isdir; /* directory */
    char d_isrep; /* reparse point */
};
typedef struct {
    char *start;
    char *curr;
    long size;
    long nfiles;
    long loc;  /* [0, nfiles) */
    struct direct dirstr;
    char *bits;  /* used for d_isdir and d_isrep */
} DIR;

DIR*           rb_w32_opendir(const char*);
struct direct* rb_w32_readdir(DIR *);
long           rb_w32_telldir(DIR *);
void           rb_w32_seekdir(DIR *, long);
void           rb_w32_rewinddir(DIR *);
void           rb_w32_closedir(DIR *);

#define opendir   rb_w32_opendir
#define readdir   rb_w32_readdir
#define telldir   rb_w32_telldir
#define seekdir   rb_w32_seekdir
#define rewinddir rb_w32_rewinddir
#define closedir  rb_w32_closedir

#endif /* RUBY_WIN32_DIR_H */
/* [<][>][^][v] [top][bottom][index] [help] */


win32/win32.c

root/win32/win32.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. map_errno
  2. rb_w32_osid
  3. GetCurrentThreadHandle
  4. flock_winnt
  5. flock_win95
  6. flock
  7. init_env
  8. NtInitialize
  9. getlogin
  10. FindFirstChildSlot
  11. FindChildSlot
  12. CloseChildHandle
  13. FindFreeChildSlot
  14. internal_match
  15. isInternalCmd
  16. rb_w32_get_osfhandle
  17. rb_w32_argv_size
  18. rb_w32_join_argv
  19. rb_w32_pipe_exec
  20. rb_w32_spawn
  21. rb_w32_aspawn
  22. CreateChild
  23. NtCmdLineElement
  24. insert
  25. cmdglob
  26. has_redirection
  27. skipspace
  28. rb_w32_cmdvector
  29. rb_w32_opendir
  30. move_to_next_entry
  31. rb_w32_readdir
  32. rb_w32_telldir
  33. rb_w32_seekdir
  34. rb_w32_rewinddir
  35. rb_w32_closedir
  36. ioinfo
  37. rb_w32_open_osfhandle
  38. init_stdhandle
  39. init_stdhandle
  40. rb_w32_open_osfhandle
  41. is_socket
  42. rb_w32_is_socket
  43. rb_w32_strerror
  44. getuid
  45. geteuid
  46. getgid
  47. getegid
  48. setuid
  49. setgid
  50. ioctl
  51. rb_w32_fdset
  52. rb_w32_fdclr
  53. rb_w32_fdisset
  54. extract_fd
  55. is_not_socket
  56. is_pipe
  57. is_readable_pipe
  58. is_console
  59. is_readable_console
  60. do_select
  61. subst
  62. rb_w32_select
  63. StartSockets
  64. rb_w32_accept
  65. rb_w32_bind
  66. rb_w32_connect
  67. rb_w32_getpeername
  68. rb_w32_getsockname
  69. rb_w32_getsockopt
  70. rb_w32_ioctlsocket
  71. rb_w32_listen
  72. rb_w32_recv
  73. rb_w32_recvfrom
  74. rb_w32_send
  75. rb_w32_sendto
  76. rb_w32_setsockopt
  77. rb_w32_shutdown
  78. open_ifs_socket
  79. rb_w32_socket
  80. rb_w32_gethostbyaddr
  81. rb_w32_gethostbyname
  82. rb_w32_gethostname
  83. rb_w32_getprotobyname
  84. rb_w32_getprotobynumber
  85. rb_w32_getservbyname
  86. rb_w32_getservbyport
  87. socketpair_internal
  88. rb_w32_socketpair
  89. endhostent
  90. endnetent
  91. endprotoent
  92. endservent
  93. getnetent
  94. getnetbyaddr
  95. getnetbyname
  96. getprotoent
  97. getservent
  98. sethostent
  99. setnetent
  100. setprotoent
  101. setservent
  102. fcntl
  103. poll_child_status
  104. waitpid
  105. gettimeofday
  106. rb_w32_getcwd
  107. chown
  108. kill
  109. link
  110. wait
  111. rb_w32_getenv
  112. rb_w32_rename
  113. isUNCRoot
  114. rb_w32_fstat
  115. filetime_to_unixtime
  116. fileattr_to_unixmode
  117. winnt_stat
  118. rb_w32_stat
  119. filetime_to_clock
  120. rb_w32_times
  121. wait_events
  122. system_state
  123. rb_w32_enter_critical
  124. rb_w32_leave_critical
  125. rb_w32_call_handler
  126. setup_handler
  127. setup_call
  128. rb_w32_main_context
  129. rb_w32_sleep
  130. rb_w32_Sleep
  131. catch_interrupt
  132. read
  133. rb_w32_getc
  134. rb_w32_putc
  135. call_asynchronous
  136. rb_w32_asynchronize
  137. rb_w32_get_environ
  138. rb_w32_free_environ
  139. rb_w32_getpid
  140. rb_w32_fclose
  141. rb_w32_close
  142. unixtime_to_filetime
  143. rb_w32_utime
  144. rb_w32_vsnprintf
  145. rb_w32_snprintf
  146. rb_w32_mkdir
  147. rb_w32_rmdir
  148. rb_w32_unlink
  149. rb_w32_isatty
  150. too_many_files
  151. rb_w32_fopen
  152. rb_w32_fdopen
  153. rb_w32_fsopen
/*
 *  Copyright (c) 1993, Intergraph Corporation
 *
 *  You may distribute under the terms of either the GNU General Public
 *  License or the Artistic License, as specified in the perl README file.
 *
 *  Various Unix compatibility functions and NT specific functions.
 *
 *  Some of this code was derived from the MSDOS port(s) and the OS/2 port.
 *
 */

#include "ruby.h"
#include "rubysig.h"
#include "dln.h"
#include <fcntl.h>
#include <process.h>
#include <sys/stat.h>
/* #include <sys/wait.h> */
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <assert.h>

#include <windows.h>
#include <winbase.h>
#include <wincon.h>
#include <shlobj.h>
#ifdef __MINGW32__
#include <mswsock.h>
#endif
#include "win32.h"
#include "win32/dir.h"
#ifdef _WIN32_WCE
#include "wince.h"
#endif
#ifndef index
#define index(x, y) strchr((x), (y))
#endif
#define isdirsep(x) ((x) == '/' || (x) == '\\')

#undef stat
#undef fclose
#undef close
#undef setsockopt

#if defined __BORLANDC__ || defined _WIN32_WCE
#  define _filbuf _fgetc
#  define _flsbuf _fputc
#  define enough_to_get(n) (--(n) >= 0)
#  define enough_to_put(n) (++(n) < 0)
#else
#  define enough_to_get(n) (--(n) >= 0)
#  define enough_to_put(n) (--(n) >= 0)
#endif

#if HAVE_WSAWAITFORMULTIPLEEVENTS
# define USE_INTERRUPT_WINSOCK 1
#endif

#if USE_INTERRUPT_WINSOCK
# define WaitForMultipleEvents WSAWaitForMultipleEvents
# define CreateSignal() (HANDLE)WSACreateEvent()
# define SetSignal(ev) WSASetEvent(ev)
# define ResetSignal(ev) WSAResetEvent(ev)
#else  /* USE_INTERRUPT_WINSOCK */
# define WaitForMultipleEvents WaitForMultipleObjectsEx
# define CreateSignal() CreateEvent(NULL, FALSE, FALSE, NULL);
# define SetSignal(ev) SetEvent(ev)
# define ResetSignal(ev) (void)0
#endif /* USE_INTERRUPT_WINSOCK */

#ifdef WIN32_DEBUG
#define Debug(something) something
#else
#define Debug(something) /* nothing */
#endif

#define TO_SOCKET(x)    _get_osfhandle(x)

static struct ChildRecord *CreateChild(const char *, const char *, SECURITY_ATTRIBUTES *, HANDLE, HANDLE, HANDLE);
static int has_redirection(const char *);
static void StartSockets(void);
static DWORD wait_events(HANDLE event, DWORD timeout);
#if !defined(_WIN32_WCE)
static int rb_w32_open_osfhandle(long osfhandle, int flags);
#else
#define rb_w32_open_osfhandle(osfhandle, flags) _open_osfhandle(osfhandle, flags)
#endif

/* errno mapping */
static struct {
    DWORD winerr;
    int err;
} errmap[] = {
    {   ERROR_INVALID_FUNCTION,         EINVAL          },
    {   ERROR_FILE_NOT_FOUND,           ENOENT          },
    {   ERROR_PATH_NOT_FOUND,           ENOENT          },
    {   ERROR_TOO_MANY_OPEN_FILES,      EMFILE          },
    {   ERROR_ACCESS_DENIED,            EACCES          },
    {   ERROR_INVALID_HANDLE,           EBADF           },
    {   ERROR_ARENA_TRASHED,            ENOMEM          },
    {   ERROR_NOT_ENOUGH_MEMORY,        ENOMEM          },
    {   ERROR_INVALID_BLOCK,            ENOMEM          },
    {   ERROR_BAD_ENVIRONMENT,          E2BIG           },
    {   ERROR_BAD_FORMAT,               ENOEXEC         },
    {   ERROR_INVALID_ACCESS,           EINVAL          },
    {   ERROR_INVALID_DATA,             EINVAL          },
    {   ERROR_INVALID_DRIVE,            ENOENT          },
    {   ERROR_CURRENT_DIRECTORY,        EACCES          },
    {   ERROR_NOT_SAME_DEVICE,          EXDEV           },
    {   ERROR_NO_MORE_FILES,            ENOENT          },
    {   ERROR_WRITE_PROTECT,            EROFS           },
    {   ERROR_BAD_UNIT,                 ENODEV          },
    {   ERROR_NOT_READY,                ENXIO           },
    {   ERROR_BAD_COMMAND,              EACCES          },
    {   ERROR_CRC,                      EACCES          },
    {   ERROR_BAD_LENGTH,               EACCES          },
    {   ERROR_SEEK,                     EIO             },
    {   ERROR_NOT_DOS_DISK,             EACCES          },
    {   ERROR_SECTOR_NOT_FOUND,         EACCES          },
    {   ERROR_OUT_OF_PAPER,             EACCES          },
    {   ERROR_WRITE_FAULT,              EIO             },
    {   ERROR_READ_FAULT,               EIO             },
    {   ERROR_GEN_FAILURE,              EACCES          },
    {   ERROR_LOCK_VIOLATION,           EACCES          },
    {   ERROR_SHARING_VIOLATION,        EACCES          },
    {   ERROR_WRONG_DISK,               EACCES          },
    {   ERROR_SHARING_BUFFER_EXCEEDED,  EACCES          },
    {   ERROR_BAD_NETPATH,              ENOENT          },
    {   ERROR_NETWORK_ACCESS_DENIED,    EACCES          },
    {   ERROR_BAD_NET_NAME,             ENOENT          },
    {   ERROR_FILE_EXISTS,              EEXIST          },
    {   ERROR_CANNOT_MAKE,              EACCES          },
    {   ERROR_FAIL_I24,                 EACCES          },
    {   ERROR_INVALID_PARAMETER,        EINVAL          },
    {   ERROR_NO_PROC_SLOTS,            EAGAIN          },
    {   ERROR_DRIVE_LOCKED,             EACCES          },
    {   ERROR_BROKEN_PIPE,              EPIPE           },
    {   ERROR_DISK_FULL,                ENOSPC          },
    {   ERROR_INVALID_TARGET_HANDLE,    EBADF           },
    {   ERROR_INVALID_HANDLE,           EINVAL          },
    {   ERROR_WAIT_NO_CHILDREN,         ECHILD          },
    {   ERROR_CHILD_NOT_COMPLETE,       ECHILD          },
    {   ERROR_DIRECT_ACCESS_HANDLE,     EBADF           },
    {   ERROR_NEGATIVE_SEEK,            EINVAL          },
    {   ERROR_SEEK_ON_DEVICE,           EACCES          },
    {   ERROR_DIR_NOT_EMPTY,            ENOTEMPTY       },
    {   ERROR_DIRECTORY,                ENOTDIR         },
    {   ERROR_NOT_LOCKED,               EACCES          },
    {   ERROR_BAD_PATHNAME,             ENOENT          },
    {   ERROR_MAX_THRDS_REACHED,        EAGAIN          },
    {   ERROR_LOCK_FAILED,              EACCES          },
    {   ERROR_ALREADY_EXISTS,           EEXIST          },
    {   ERROR_INVALID_STARTING_CODESEG, ENOEXEC         },
    {   ERROR_INVALID_STACKSEG,         ENOEXEC         },
    {   ERROR_INVALID_MODULETYPE,       ENOEXEC         },
    {   ERROR_INVALID_EXE_SIGNATURE,    ENOEXEC         },
    {   ERROR_EXE_MARKED_INVALID,       ENOEXEC         },
    {   ERROR_BAD_EXE_FORMAT,           ENOEXEC         },
    {   ERROR_ITERATED_DATA_EXCEEDS_64k,ENOEXEC         },
    {   ERROR_INVALID_MINALLOCSIZE,     ENOEXEC         },
    {   ERROR_DYNLINK_FROM_INVALID_RING,ENOEXEC         },
    {   ERROR_IOPL_NOT_ENABLED,         ENOEXEC         },
    {   ERROR_INVALID_SEGDPL,           ENOEXEC         },
    {   ERROR_AUTODATASEG_EXCEEDS_64k,  ENOEXEC         },
    {   ERROR_RING2SEG_MUST_BE_MOVABLE, ENOEXEC         },
    {   ERROR_RELOC_CHAIN_XEEDS_SEGLIM, ENOEXEC         },
    {   ERROR_INFLOOP_IN_RELOC_CHAIN,   ENOEXEC         },
    {   ERROR_FILENAME_EXCED_RANGE,     ENOENT          },
    {   ERROR_NESTING_NOT_ALLOWED,      EAGAIN          },
    {   ERROR_NOT_ENOUGH_QUOTA,         ENOMEM          },
    {   WSAENAMETOOLONG,                ENAMETOOLONG    },
    {   WSAENOTEMPTY,                   ENOTEMPTY       }
};

static int
map_errno(DWORD winerr)
{
    int i;

    if (winerr == 0) {
        return 0;
    }

    for (i = 0; i < sizeof(errmap) / sizeof(*errmap); i++) {
        if (errmap[i].winerr == winerr) {
            return errmap[i].err;
        }
    }

    if (winerr >= WSABASEERR) {
        return winerr;
    }
    return EINVAL;
}

static char *NTLoginName;

#ifdef WIN95
static DWORD Win32System = (DWORD)-1;

DWORD
rb_w32_osid(void)
{
    static OSVERSIONINFO osver;

    if (osver.dwPlatformId != Win32System) {
        memset(&osver, 0, sizeof(OSVERSIONINFO));
        osver.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
        GetVersionEx(&osver);
        Win32System = osver.dwPlatformId;
    }
    return (Win32System);
}
#endif

#define IsWinNT() rb_w32_iswinnt()
#define IsWin95() rb_w32_iswin95()

/* main thread constants */
static struct {
    HANDLE handle;
    DWORD id;
} main_thread;

/* interrupt stuff */
static HANDLE interrupted_event;

HANDLE
GetCurrentThreadHandle(void)
{
    static HANDLE current_process_handle = NULL;
    HANDLE h;

    if (!current_process_handle)
        current_process_handle = GetCurrentProcess();
    if (!DuplicateHandle(current_process_handle, GetCurrentThread(),
                         current_process_handle, &h,
                         0, FALSE, DUPLICATE_SAME_ACCESS))
        return NULL;
    return h;
}

/* simulate flock by locking a range on the file */

#define LK_ERR(f,i) ((f) ? (i = 0) : (errno = GetLastError() == ERROR_LOCK_VIOLATION ? EWOULDBLOCK : EACCES))
#define LK_LEN      ULONG_MAX

static VALUE
flock_winnt(VALUE self, int argc, VALUE* argv)
{
    OVERLAPPED o;
    int i = -1;
    const HANDLE fh = (HANDLE)self;
    const int oper = argc;

    memset(&o, 0, sizeof(o));

    switch(oper) {
      case LOCK_SH:             /* shared lock */
        LK_ERR(LockFileEx(fh, 0, 0, LK_LEN, LK_LEN, &o), i);
        break;
      case LOCK_EX:             /* exclusive lock */
        LK_ERR(LockFileEx(fh, LOCKFILE_EXCLUSIVE_LOCK, 0, LK_LEN, LK_LEN, &o), i);
        break;
      case LOCK_SH|LOCK_NB:     /* non-blocking shared lock */
        LK_ERR(LockFileEx(fh, LOCKFILE_FAIL_IMMEDIATELY, 0, LK_LEN, LK_LEN, &o), i);
        break;
      case LOCK_EX|LOCK_NB:     /* non-blocking exclusive lock */
        LK_ERR(LockFileEx(fh,
                          LOCKFILE_EXCLUSIVE_LOCK|LOCKFILE_FAIL_IMMEDIATELY,
                          0, LK_LEN, LK_LEN, &o), i);
        break;
      case LOCK_UN:             /* unlock lock */
      case LOCK_UN|LOCK_NB:     /* unlock is always non-blocking, I hope */
        LK_ERR(UnlockFileEx(fh, 0, LK_LEN, LK_LEN, &o), i);
        break;
      default:            /* unknown */
        errno = EINVAL;
        break;
    }
    return i;
}

#ifdef WIN95
static VALUE
flock_win95(VALUE self, int argc, VALUE* argv)
{
    int i = -1;
    const HANDLE fh = (HANDLE)self;
    const int oper = argc;

    switch(oper) {
      case LOCK_EX:
        do {
            LK_ERR(LockFile(fh, 0, 0, LK_LEN, LK_LEN), i);
        } while (i && errno == EWOULDBLOCK);
        break;
      case LOCK_EX|LOCK_NB:
        LK_ERR(LockFile(fh, 0, 0, LK_LEN, LK_LEN), i);
        break;
      case LOCK_UN:
      case LOCK_UN|LOCK_NB:
        LK_ERR(UnlockFile(fh, 0, 0, LK_LEN, LK_LEN), i);
        break;
      default:
        errno = EINVAL;
        break;
    }
    return i;
}
#endif

#undef LK_ERR

int
flock(int fd, int oper)
{
#ifdef WIN95
    static asynchronous_func_t locker = NULL;

    if (!locker) {
        if (IsWinNT())
            locker = flock_winnt;
        else
            locker = flock_win95;
    }
#else
    const asynchronous_func_t locker = flock_winnt;
#endif

    return rb_w32_asynchronize(locker,
                              (VALUE)_get_osfhandle(fd), oper, NULL,
                              (DWORD)-1);
}

static void
init_env(void)
{
    char env[_MAX_PATH];
    DWORD len;
    BOOL f;
    LPITEMIDLIST pidl;

    if (!GetEnvironmentVariable("HOME", env, sizeof(env))) {
        f = FALSE;
        if (GetEnvironmentVariable("HOMEDRIVE", env, sizeof(env)))
            len = strlen(env);
        else
            len = 0;
        if (GetEnvironmentVariable("HOMEPATH", env + len, sizeof(env) - len) || len) {
            f = TRUE;
        }
        else if (GetEnvironmentVariable("USERPROFILE", env, sizeof(env))) {
            f = TRUE;
        }
        else if (SHGetSpecialFolderLocation(NULL, CSIDL_PERSONAL, &pidl) == 0) {
            LPMALLOC alloc;
            f = SHGetPathFromIDList(pidl, env);
            SHGetMalloc(&alloc);
            alloc->lpVtbl->Free(alloc, pidl);
            alloc->lpVtbl->Release(alloc);
        }
        if (f) {
            char *p = env;
            while (*p) {
                if (*p == '\\') *p = '/';
                p = CharNext(p);
            }
            if (p - env == 2 && env[1] == ':') {
                *p++ = '/';
                *p = 0;
            }
            SetEnvironmentVariable("HOME", env);
        }
    }
    if (GetEnvironmentVariable("USER", env, sizeof env)) {
        len = strlen(env);
    }
    if (GetEnvironmentVariable("USERNAME", env, sizeof env)) {
        len = strlen(env);
        SetEnvironmentVariable("USER", env);
    }
    else if (GetUserName(env, (len = sizeof env, &len))) {
        SetEnvironmentVariable("USER", env);
    }
    else {
        NTLoginName = "<Unknown>";
        return;
    }
    NTLoginName = ALLOC_N(char, len+1);
    strncpy(NTLoginName, env, len);
    NTLoginName[len] = '\0';
}

static void init_stdhandle(void);

//
// Initialization stuff
//
void
NtInitialize(int *argc, char ***argv)
{

    WORD version;
    int ret;

    //
    // subvert cmd.exe's feeble attempt at command line parsing
    //
    *argc = rb_w32_cmdvector(GetCommandLine(), argv);

    //
    // Now set up the correct time stuff
    //

    tzset();

    init_env();

    init_stdhandle();

    // Initialize Winsock
    StartSockets();

#ifdef _WIN32_WCE
    // free commandline buffer
    wce_FreeCommandLine();
#endif
}

char *
getlogin(void)
{
    return NTLoginName;
}

#define MAXCHILDNUM 256 /* max num of child processes */

static struct ChildRecord {
    HANDLE hProcess;    /* process handle */
    rb_pid_t pid;       /* process id */
} ChildRecord[MAXCHILDNUM];

#define FOREACH_CHILD(v) do { \
    struct ChildRecord* v; \
    for (v = ChildRecord; v < ChildRecord + sizeof(ChildRecord) / sizeof(ChildRecord[0]); ++v)
#define END_FOREACH_CHILD } while (0)

static struct ChildRecord *
FindFirstChildSlot(void)
{
    FOREACH_CHILD(child) {
        if (child->pid) return child;
    } END_FOREACH_CHILD;
    return NULL;
}

static struct ChildRecord *
FindChildSlot(rb_pid_t pid)
{

    FOREACH_CHILD(child) {
        if (child->pid == pid) {
            return child;
        }
    } END_FOREACH_CHILD;
    return NULL;
}

static void
CloseChildHandle(struct ChildRecord *child)
{
    HANDLE h = child->hProcess;
    child->hProcess = NULL;
    child->pid = 0;
    CloseHandle(h);
}

static struct ChildRecord *
FindFreeChildSlot(void)
{
    FOREACH_CHILD(child) {
        if (!child->pid) {
            child->pid = -1;    /* lock the slot */
            child->hProcess = NULL;
            return child;
        }
    } END_FOREACH_CHILD;
    return NULL;
}

/*
  ruby -lne 'BEGIN{$cmds = Hash.new(0); $mask = 1}'
   -e '$cmds[$_.downcase] |= $mask' -e '$mask <<= 1 if ARGF.eof'
   -e 'END{$cmds.sort.each{|n,f|puts "    \"\\#{f.to_s(8)}\" #{n.dump} + 1,"}}'
   98cmd ntcmd
 */
static char *szInternalCmds[] = {
    "\2" "assoc" + 1,
    "\3" "break" + 1,
    "\3" "call" + 1,
    "\3" "cd" + 1,
    "\1" "chcp" + 1,
    "\3" "chdir" + 1,
    "\3" "cls" + 1,
    "\2" "color" + 1,
    "\3" "copy" + 1,
    "\1" "ctty" + 1,
    "\3" "date" + 1,
    "\3" "del" + 1,
    "\3" "dir" + 1,
    "\3" "echo" + 1,
    "\2" "endlocal" + 1,
    "\3" "erase" + 1,
    "\3" "exit" + 1,
    "\3" "for" + 1,
    "\2" "ftype" + 1,
    "\3" "goto" + 1,
    "\3" "if" + 1,
    "\1" "lfnfor" + 1,
    "\1" "lh" + 1,
    "\1" "lock" + 1,
    "\3" "md" + 1,
    "\3" "mkdir" + 1,
    "\2" "move" + 1,
    "\3" "path" + 1,
    "\3" "pause" + 1,
    "\2" "popd" + 1,
    "\3" "prompt" + 1,
    "\2" "pushd" + 1,
    "\3" "rd" + 1,
    "\3" "rem" + 1,
    "\3" "ren" + 1,
    "\3" "rename" + 1,
    "\3" "rmdir" + 1,
    "\3" "set" + 1,
    "\2" "setlocal" + 1,
    "\3" "shift" + 1,
    "\2" "start" + 1,
    "\3" "time" + 1,
    "\2" "title" + 1,
    "\1" "truename" + 1,
    "\3" "type" + 1,
    "\1" "unlock" + 1,
    "\3" "ver" + 1,
    "\3" "verify" + 1,
    "\3" "vol" + 1,
};

static int
internal_match(const void *key, const void *elem)
{
    return strcmp(key, *(const char *const *)elem);
}

static int
isInternalCmd(const char *cmd, const char *interp)
{
    int i, nt = 1;
    char cmdname[9], *b = cmdname, c, **nm;

    i = strlen(interp) - 11;
    if ((i == 0 || i > 0 && isdirsep(interp[i-1])) &&
        strcasecmp(interp+i, "command.com") == 0) {
        nt = 0;
    }
    do {
        if (!(c = *cmd++)) return 0;
    } while (isspace(c));
    while (isalpha(c)) {
        *b++ = tolower(c);
        if (b == cmdname + sizeof(cmdname)) return 0;
        c = *cmd++;
    }
    if (c == '.') c = *cmd;
    switch (c) {
      case '<': case '>': case '|':
        return 1;
      case '\0': case ' ': case '\t': case '\n':
        break;
      default:
        return 0;
    }
    *b = 0;
    nm = bsearch(cmdname, szInternalCmds,
                 sizeof(szInternalCmds) / sizeof(*szInternalCmds),
                 sizeof(*szInternalCmds),
                 internal_match);
    if (!nm || !(nm[0][-1] & (nt ? 2 : 1)))
        return 0;
    return 1;
}

SOCKET
rb_w32_get_osfhandle(int fh)
{
    return _get_osfhandle(fh);
}

int
rb_w32_argv_size(char *const *argv)
{
    const char *p;
    char *const *t;
    int len, n, bs, quote;

    for (t = argv, len = 0; *t; t++) {
        for (p = *t, n = quote = bs = 0; *p; ++p) {
            switch (*p) {
              case '\\':
                ++bs;
                break;
              case '"':
                n += bs + 1; bs = 0;
                quote = 1;
                break;
              case ' ': case '\t':
                quote = 1;
              default:
                bs = 0;
                p = CharNext(p) - 1;
                break;
            }
        }
        len += p - *t + n + 1;
        if (quote) len += 2;
    }
    return len;
}

char *
rb_w32_join_argv(char *cmd, char *const *argv)
{
    const char *p, *s;
    char *q, *const *t;
    int n, bs, quote;

    for (t = argv, q = cmd; p = *t; t++) {
        quote = 0;
        s = p;
        if (!*p || strpbrk(p, " \t\"")) {
            quote = 1;
            *q++ = '"';
        }
        for (bs = 0; *p; ++p) {
            switch (*p) {
              case '\\':
                ++bs;
                break;
              case '"':
                memcpy(q, s, n = p - s); q += n; s = p;
                memset(q, '\\', ++bs); q += bs; bs = 0;
                break;
              default:
                bs = 0;
                p = CharNext(p) - 1;
                break;
            }
        }
        memcpy(q, s, n = p - s);
        q += n;
        if (quote) *q++ = '"';
        *q++ = ' ';
    }
    if (q > cmd) --q;
    *q = '\0';
    return cmd;
}

static int socketpair_internal(int af, int type, int protocol, SOCKET *sv);

rb_pid_t
rb_w32_pipe_exec(const char *cmd, const char *prog, int mode, int *pipe)
{
    struct ChildRecord* child;
    HANDLE hOrg, hIn, hOut;
    HANDLE hDupFile;
    HANDLE hCurProc;
    SECURITY_ATTRIBUTES sa;
    BOOL reading, writing;
    SOCKET pair[2];
    int fd;
    int pipemode;
    int ret;

    /* Figure out what we're doing... */
    if (mode & O_RDWR) {
        if (IsWin95()) {
            errno = EINVAL;
            return -1;
        }
        reading = writing = TRUE;
        pipemode = _O_RDWR;
    }
    else if (mode & O_WRONLY) {
        reading = FALSE;
        writing = TRUE;
        pipemode = _O_WRONLY;
    }
    else {
        reading = TRUE;
        writing = FALSE;
        pipemode = _O_RDONLY;
    }
    pipemode |= (mode & O_BINARY) ? O_BINARY : O_TEXT;

    sa.nLength              = sizeof (SECURITY_ATTRIBUTES);
    sa.lpSecurityDescriptor = NULL;
    sa.bInheritHandle       = TRUE;
    ret = -1;

    RUBY_CRITICAL(do {
        /* create pipe */
        hCurProc = GetCurrentProcess();
        if (reading && writing) {
            if (socketpair_internal(AF_INET, SOCK_STREAM, 0, pair) < 0) {
                break;
            }
            if (!DuplicateHandle(hCurProc, (HANDLE)pair[1], hCurProc,
                                 &hDupFile, 0, FALSE,
                                 DUPLICATE_SAME_ACCESS)) {
                errno = map_errno(GetLastError());
                closesocket(pair[0]);
                closesocket(pair[1]);
                CloseHandle(hCurProc);
                break;
            }
            closesocket(pair[1]);
            hOrg = hIn = hOut = (HANDLE)pair[0];
        }
        else if (reading) {
            if (!CreatePipe(&hIn, &hOut, &sa, 2048L)) {
                errno = map_errno(GetLastError());
                break;
            }
            if (!DuplicateHandle(hCurProc, hIn, hCurProc, &hDupFile, 0,
                                 FALSE, DUPLICATE_SAME_ACCESS)) {
                errno = map_errno(GetLastError());
                CloseHandle(hIn);
                CloseHandle(hOut);
                break;
            }
            CloseHandle(hIn);
            hIn = NULL;
            hOrg = hOut;
        }
        else {  /* writing */
            if (!CreatePipe(&hIn, &hOut, &sa, 2048L)) {
                errno = map_errno(GetLastError());
                break;
            }
            if (!DuplicateHandle(hCurProc, hOut, hCurProc, &hDupFile, 0,
                                 FALSE, DUPLICATE_SAME_ACCESS)) {
                errno = map_errno(GetLastError());
                CloseHandle(hIn);
                CloseHandle(hOut);
                break;
            }
            CloseHandle(hOut);
            hOut = NULL;
            hOrg = hIn;
        }

        /* create child process */
        child = CreateChild(cmd, prog, &sa, hIn, hOut, NULL);
        if (!child) {
            CloseHandle(hOrg);
            CloseHandle(hDupFile);
            break;
        }

        /* associate handle to file descritor */
        *pipe = rb_w32_open_osfhandle((long)hDupFile, pipemode);
        CloseHandle(hOrg);
        if (*pipe == -1) {
            CloseHandle(hDupFile);
            CloseChildHandle(child);
            break;
        }

        ret = child->pid;
    } while (0));

    return ret;
}

extern VALUE rb_last_status;

int
rb_w32_spawn(int mode, const char *cmd, const char *prog)
{
    struct ChildRecord *child;
    DWORD exitcode;

    switch (mode) {
      case P_WAIT:
      case P_NOWAIT:
      case P_OVERLAY:
        break;
      default:
        errno = EINVAL;
        return -1;
    }

    child = CreateChild(cmd, prog, NULL, NULL, NULL, NULL);
    if (!child) {
        return -1;
    }

    switch (mode) {
      case P_WAIT:
        rb_syswait(child->pid);
        return NUM2INT(rb_last_status);
      case P_NOWAIT:
        return child->pid;
      case P_OVERLAY:
        WaitForSingleObject(child->hProcess, INFINITE);
        GetExitCodeProcess(child->hProcess, &exitcode);
        CloseChildHandle(child);
        _exit(exitcode);
      default:
        return -1;      /* not reached */
    }
}

int
rb_w32_aspawn(int mode, const char *prog, char *const *argv)
{
    int len = rb_w32_argv_size(argv);
    char *cmd = ALLOCA_N(char, len);

    if (!prog) prog = argv[0];
    return rb_w32_spawn(mode, rb_w32_join_argv(cmd, argv), prog);
}

static struct ChildRecord *
CreateChild(const char *cmd, const char *prog, SECURITY_ATTRIBUTES *psa,
            HANDLE hInput, HANDLE hOutput, HANDLE hError)
{
    BOOL fRet;
    DWORD  dwCreationFlags;
    STARTUPINFO aStartupInfo;
    PROCESS_INFORMATION aProcessInformation;
    SECURITY_ATTRIBUTES sa;
    const char *shell;
    struct ChildRecord *child;
    char *p = NULL;

    if (!cmd && !prog) {
        errno = EFAULT;
        return NULL;
    }

    child = FindFreeChildSlot();
    if (!child) {
        errno = EAGAIN;
        return NULL;
    }

    if (!psa) {
        sa.nLength              = sizeof (SECURITY_ATTRIBUTES);
        sa.lpSecurityDescriptor = NULL;
        sa.bInheritHandle       = TRUE;
        psa = &sa;
    }

    memset(&aStartupInfo, 0, sizeof (STARTUPINFO));
    memset(&aProcessInformation, 0, sizeof (PROCESS_INFORMATION));
    aStartupInfo.cb = sizeof (STARTUPINFO);
    if (hInput || hOutput || hError) {
        aStartupInfo.dwFlags = STARTF_USESTDHANDLES;
        if (hInput) {
            aStartupInfo.hStdInput  = hInput;
        }
        else {
            aStartupInfo.hStdInput  = GetStdHandle(STD_INPUT_HANDLE);
        }
        if (hOutput) {
            aStartupInfo.hStdOutput = hOutput;
        }
        else {
            aStartupInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
        }
        if (hError) {
            aStartupInfo.hStdError = hError;
        }
        else {
            aStartupInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE);
        }
    }

    dwCreationFlags = (NORMAL_PRIORITY_CLASS);

    if (prog) {
        if (!(p = dln_find_exe(prog, NULL))) {
            shell = prog;
        }
    }
    else {
        int redir = -1;
        int len = 0;
        while (ISSPACE(*cmd)) cmd++;
        for (prog = cmd; *prog; prog = CharNext(prog)) {
            if (ISSPACE(*prog)) {
                len = prog - cmd;
                do ++prog; while (ISSPACE(*prog));
                if (!*prog--) break;
            }
            else {
                len = 0;
            }
        }
        if (!len) len = strlen(cmd);
        if ((shell = getenv("RUBYSHELL")) && (redir = has_redirection(cmd))) {
            char *tmp = ALLOCA_N(char, strlen(shell) + len + sizeof(" -c ") + 2);
            sprintf(tmp, "%s -c \"%.*s\"", shell, len, cmd);
            cmd = tmp;
        }
        else if ((shell = getenv("COMSPEC")) &&
                 ((redir < 0 ? has_redirection(cmd) : redir) ||
                  isInternalCmd(cmd, shell))) {
            char *tmp = ALLOCA_N(char, strlen(shell) + len + sizeof(" /c "));
            sprintf(tmp, "%s /c %.*s", shell, len, cmd);
            cmd = tmp;
        }
        else {
            shell = NULL;
            prog = cmd;
            for (;;) {
                if (!*prog) {
                    p = dln_find_exe(cmd, NULL);
                    break;
                }
                if (strchr(".:*?\"/\\", *prog)) {
                    if (cmd[len]) {
                        char *tmp = ALLOCA_N(char, len + 1);
                        memcpy(tmp, cmd, len);
                        tmp[len] = 0;
                        cmd = tmp;
                    }
                    break;
                }
                if (ISSPACE(*prog) || strchr("<>|", *prog)) {
                    len = prog - cmd;
                    p = ALLOCA_N(char, len + 1);
                    memcpy(p, cmd, len);
                    p[len] = 0;
                    p = dln_find_exe(p, NULL);
                    break;
                }
                prog++;
            }
        }
    }
    if (p) {
        shell = p;
        while (*p) {
            if ((unsigned char)*p == '/')
                *p = '\\';
            p = CharNext(p);
        }
    }

    RUBY_CRITICAL({
        fRet = CreateProcess(shell, (char *)cmd, psa, psa,
                             psa->bInheritHandle, dwCreationFlags, NULL, NULL,
                             &aStartupInfo, &aProcessInformation);
        errno = map_errno(GetLastError());
    });

    if (!fRet) {
        child->pid = 0;         /* release the slot */
        return NULL;
    }

    CloseHandle(aProcessInformation.hThread);

    child->hProcess = aProcessInformation.hProcess;
    child->pid = (rb_pid_t)aProcessInformation.dwProcessId;

    if (!IsWinNT()) {
        /* On Win9x, make pid positive similarly to cygwin and perl */
        child->pid = -child->pid;
    }

    return child;
}

typedef struct _NtCmdLineElement {
    struct _NtCmdLineElement *next;
    char *str;
    int len;
    int flags;
} NtCmdLineElement;

//
// Possible values for flags
//

#define NTGLOB   0x1    // element contains a wildcard
#define NTMALLOC 0x2    // string in element was malloc'ed
#define NTSTRING 0x4    // element contains a quoted string

static int
insert(const char *path, VALUE vinfo)
{
    NtCmdLineElement *tmpcurr;
    NtCmdLineElement ***tail = (NtCmdLineElement ***)vinfo;

    tmpcurr = ALLOC(NtCmdLineElement);
    MEMZERO(tmpcurr, NtCmdLineElement, 1);
    tmpcurr->len = strlen(path);
    tmpcurr->str = ALLOC_N(char, tmpcurr->len + 1);
    tmpcurr->flags |= NTMALLOC;
    strcpy(tmpcurr->str, path);
    **tail = tmpcurr;
    *tail = &tmpcurr->next;

    return 0;
}

#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#else
# define MAXPATHLEN 512
#endif

static NtCmdLineElement **
cmdglob(NtCmdLineElement *patt, NtCmdLineElement **tail)
{
    char buffer[MAXPATHLEN], *buf = buffer;
    char *p;
    NtCmdLineElement **last = tail;

    if (patt->len >= MAXPATHLEN)
        buf = ruby_xmalloc(patt->len + 1);

    strncpy (buf, patt->str, patt->len);
    buf[patt->len] = '\0';
    for (p = buf; *p; p = CharNext(p))
        if (*p == '\\')
            *p = '/';
    ruby_brace_glob(buf, 0, insert, (VALUE)&tail);
    if (buf != buffer)
        free(buf);

    if (last == tail) return 0;
    if (patt->flags & NTMALLOC)
        free(patt->str);
    free(patt);
    return tail;
}

//
// Check a command string to determine if it has I/O redirection
// characters that require it to be executed by a command interpreter
//

static int
has_redirection(const char *cmd)
{
    char quote = '\0';
    const char *ptr;

    //
    // Scan the string, looking for redirection (< or >) or pipe
    // characters (|) that are not in a quoted string
    //

    for (ptr = cmd; *ptr;) {
        switch (*ptr) {
          case '\'':
          case '\"':
            if (!quote)
                quote = *ptr;
            else if (quote == *ptr)
                quote = '\0';
            ptr++;
            break;

          case '>':
          case '<':
          case '|':
            if (!quote)
                return TRUE;
            ptr++;
            break;

          case '\\':
            ptr++;
          default:
            ptr = CharNext(ptr);
            break;
        }
    }
    return FALSE;
}

static inline char *
skipspace(char *ptr)
{
    while (ISSPACE(*ptr))
        ptr++;
    return ptr;
}

int
rb_w32_cmdvector(const char *cmd, char ***vec)
{
    int cmdlen, globbing, len, i;
    int elements, strsz, done;
    int slashes, escape;
    char *ptr, *base, *buffer, *cmdline;
    char **vptr;
    char quote;
    NtCmdLineElement *curr, **tail;
    NtCmdLineElement *cmdhead = NULL, **cmdtail = &cmdhead;

    //
    // just return if we don't have a command line
    //

    while (ISSPACE(*cmd))
        cmd++;
    if (!*cmd) {
        *vec = NULL;
        return 0;
    }

    ptr = cmdline = strdup(cmd);

    //
    // Ok, parse the command line, building a list of CmdLineElements.
    // When we've finished, and it's an input command (meaning that it's
    // the processes argv), we'll do globing and then build the argument
    // vector.
    // The outer loop does one interation for each element seen.
    // The inner loop does one interation for each character in the element.
    //

    while (*(ptr = skipspace(ptr))) {
        base = ptr;
        quote = slashes = globbing = escape = 0;
        for (done = 0; !done && *ptr; ) {
            //
            // Switch on the current character. We only care about the
            // white-space characters, the  wild-card characters, and the
            // quote characters.
            //

            switch (*ptr) {
              case '\\':
                slashes++;
                break;

              case ' ':
              case '\t':
              case '\n':
                //
                // if we're not in a string, then we're finished with this
                // element
                //

                if (!quote) {
                    *ptr = 0;
                    done = 1;
                }
                break;

              case '*':
              case '?':
              case '[':
              case '{':
                //
                // record the fact that this element has a wildcard character
                // N.B. Don't glob if inside a single quoted string
                //

                if (quote != '\'')
                    globbing++;
                slashes = 0;
                break;

              case '\'':
              case '\"':
                //
                // if we're already in a string, see if this is the
                // terminating close-quote. If it is, we're finished with
                // the string, but not neccessarily with the element.
                // If we're not already in a string, start one.
                //

                if (!(slashes & 1)) {
                    if (!quote)
                        quote = *ptr;
                    else if (quote == *ptr) {
                        if (quote == '"' && quote == ptr[1])
                            ptr++;
                        quote = '\0';
                    }
                }
                escape++;
                slashes = 0;
                break;

              default:
                ptr = CharNext(ptr);
                slashes = 0;
                continue;
            }
            ptr++;
        }

        //
        // when we get here, we've got a pair of pointers to the element,
        // base and ptr. Base points to the start of the element while ptr
        // points to the character following the element.
        //

        len = ptr - base;
        if (done) --len;

        //
        // if it's an input vector element and it's enclosed by quotes,
        // we can remove them.
        //

        if (escape) {
            char *p = base, c;
            slashes = quote = 0;
            while (p < base + len) {
                switch (c = *p) {
                  case '\\':
                    p++;
                    slashes++;
                    break;

                  case '\'':
                  case '"':
                    if (!(slashes & 1) && quote && quote != c) {
                        p++;
                        slashes = 0;
                        break;
                    }
                    memcpy(p - ((slashes + 1) >> 1), p + (~slashes & 1),
                           base + len - p);
                    len -= ((slashes + 1) >> 1) + (~slashes & 1);
                    p -= (slashes + 1) >> 1;
                    if (!(slashes & 1)) {
                        if (quote) {
                            if (quote == '"' && quote == *p)
                                p++;
                            quote = '\0';
                        }
                        else
                            quote = c;
                    }
                    else
                        p++;
                    slashes = 0;
                    break;

                  default:
                    p = CharNext(p);
                    slashes = 0;
                    break;
                }
            }
        }

        curr = ALLOC(NtCmdLineElement);
        MEMZERO(curr, NtCmdLineElement, 1);
        curr->str = base;
        curr->len = len;

        if (globbing && (tail = cmdglob(curr, cmdtail))) {
            cmdtail = tail;
        }
        else {
            *cmdtail = curr;
            cmdtail = &curr->next;
        }
    }

    //
    // Almost done!
    // Count up the elements, then allocate space for a vector of pointers
    // (argv) and a string table for the elements.
    //

    for (elements = 0, strsz = 0, curr = cmdhead; curr; curr = curr->next) {
        elements++;
        strsz += (curr->len + 1);
    }

    len = (elements+1)*sizeof(char *) + strsz;
    buffer = ALLOC_N(char, len);

    //
    // make vptr point to the start of the buffer
    // and ptr point to the area we'll consider the string table.
    //
    //   buffer (*vec)
    //   |
    //   V       ^---------------------V
    //   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
    //   |   |       | ....  | NULL  |   | ..... |\0 |   | ..... |\0 |...
    //   +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
    //   |-  elements+1             -| ^ 1st element   ^ 2nd element

    vptr = (char **) buffer;

    ptr = buffer + (elements+1) * sizeof(char *);

    while (curr = cmdhead) {
        strncpy (ptr, curr->str, curr->len);
        ptr[curr->len] = '\0';
        *vptr++ = ptr;
        ptr += curr->len + 1;
        cmdhead = curr->next;
        if (curr->flags & NTMALLOC) free(curr->str);
        free(curr);
    }
    *vptr = 0;

    *vec = (char **) buffer;
    free(cmdline);
    return elements;
}

//
// UNIX compatible directory access functions for NT
//

#define PATHLEN 1024

//
// The idea here is to read all the directory names into a string table
// (separated by nulls) and when one of the other dir functions is called
// return the pointer to the current file name.
//

#define GetBit(bits, i) ((bits)[(i) / 8] &  (1 << (i) % 8))
#define SetBit(bits, i) ((bits)[(i) / 8] |= (1 << (i) % 8))

DIR *
rb_w32_opendir(const char *filename)
{
    DIR               *p;
    long               len;
    long               idx;
    char               scannamespc[PATHLEN];
    char              *scanname = scannamespc;
    struct stat        sbuf;
    WIN32_FIND_DATA fd;
    HANDLE          fh;

    //
    // check to see if we've got a directory
    //

    if (rb_w32_stat(filename, &sbuf) < 0)
        return NULL;
    if (!(sbuf.st_mode & S_IFDIR) &&
        (!ISALPHA(filename[0]) || filename[1] != ':' || filename[2] != '\0' ||
        ((1 << (filename[0] & 0x5f) - 'A') & GetLogicalDrives()) == 0)) {
        errno = ENOTDIR;
        return NULL;
    }

    //
    // Get us a DIR structure
    //

    p = xcalloc(sizeof(DIR), 1);
    if (p == NULL)
        return NULL;

    //
    // Create the search pattern
    //

    strcpy(scanname, filename);

    if (index("/\\:", *CharPrev(scanname, scanname + strlen(scanname))) == NULL)
        strcat(scanname, "/*");
    else
        strcat(scanname, "*");

    //
    // do the FindFirstFile call
    //

    fh = FindFirstFile(scanname, &fd);
    if (fh == INVALID_HANDLE_VALUE) {
        errno = map_errno(GetLastError());
        return NULL;
    }

    //
    // now allocate the first part of the string table for the
    // filenames that we find.
    //

    idx = strlen(fd.cFileName)+1;
    p->start = ALLOC_N(char, idx);
    strcpy(p->start, fd.cFileName);
    p->bits = ALLOC_N(char, 1);
    p->bits[0] = 0;
    if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
        SetBit(p->bits, 0);
    if (fd.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
        SetBit(p->bits, 1);
    p->nfiles++;

    //
    // loop finding all the files that match the wildcard
    // (which should be all of them in this directory!).
    // the variable idx should point one past the null terminator
    // of the previous string found.
    //
    while (FindNextFile(fh, &fd)) {
        len = strlen(fd.cFileName);

        //
        // bump the string table size by enough for the
        // new name and it's null terminator
        //

        #define Renew(x, y, z) (x = (z *)realloc(x, y))

        Renew (p->start, idx+len+1, char);
        if (p->start == NULL) {
            rb_fatal ("opendir: malloc failed!\n");
        }
        strcpy(&p->start[idx], fd.cFileName);

        if (p->nfiles % 4 == 0) {
            Renew (p->bits, p->nfiles / 4 + 1, char);
            if (p->bits == NULL) {
                rb_fatal ("opendir: malloc failed!\n");
            }
            p->bits[p->nfiles / 4] = 0;
        }
        if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
            SetBit(p->bits, p->nfiles * 2);
        if (fd.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
            SetBit(p->bits, p->nfiles * 2 + 1);

        p->nfiles++;
        idx += len+1;
    }
    FindClose(fh);
    p->size = idx;
    p->curr = p->start;
    return p;
}

//
// Move to next entry
//

static void
move_to_next_entry(DIR *dirp)
{
    if (dirp->curr) {
        dirp->loc++;
        dirp->curr += strlen(dirp->curr) + 1;
        if (dirp->curr >= (dirp->start + dirp->size)) {
            dirp->curr = NULL;
        }
    }
}

//
// Readdir just returns the current string pointer and bumps the
// string pointer to the next entry.
//

struct direct  *
rb_w32_readdir(DIR *dirp)
{
    static int  dummy = 0;

    if (dirp->curr) {

        //
        // first set up the structure to return
        //

        strcpy(dirp->dirstr.d_name, dirp->curr);
        dirp->dirstr.d_namlen = strlen(dirp->curr);

        //
        // Fake inode
        //
        dirp->dirstr.d_ino = dummy++;

        //
        // Attributes
        //
        dirp->dirstr.d_isdir = GetBit(dirp->bits, dirp->loc * 2);
        dirp->dirstr.d_isrep = GetBit(dirp->bits, dirp->loc * 2 + 1);

        //
        // Now set up for the next call to readdir
        //

        move_to_next_entry(dirp);

        return &(dirp->dirstr);

    } else
        return NULL;
}

//
// Telldir returns the current string pointer position
//

long
rb_w32_telldir(DIR *dirp)
{
    return dirp->loc;
}

//
// Seekdir moves the string pointer to a previously saved position
// (Saved by telldir).

void
rb_w32_seekdir(DIR *dirp, long loc)
{
    rb_w32_rewinddir(dirp);

    while (dirp->curr && dirp->loc < loc) {
        move_to_next_entry(dirp);
    }
}

//
// Rewinddir resets the string pointer to the start
//

void
rb_w32_rewinddir(DIR *dirp)
{
    dirp->curr = dirp->start;
    dirp->loc = 0;
}

//
// This just free's the memory allocated by opendir
//

void
rb_w32_closedir(DIR *dirp)
{
    free(dirp->start);
    free(dirp->bits);
    free(dirp);
}

#if (defined _MT || defined __MSVCRT__) && !defined __BORLANDC__
#define MSVCRT_THREADS
#endif
#ifdef MSVCRT_THREADS
# define MTHREAD_ONLY(x) x
# define STHREAD_ONLY(x)
#elif defined(__BORLANDC__)
# define MTHREAD_ONLY(x)
# define STHREAD_ONLY(x)
#else
# define MTHREAD_ONLY(x)
# define STHREAD_ONLY(x) x
#endif

typedef struct  {
    long osfhnd;    /* underlying OS file HANDLE */
    char osfile;    /* attributes of file (e.g., open in text mode?) */
    char pipech;    /* one char buffer for handles opened on pipes */
#ifdef MSVCRT_THREADS
    int lockinitflag;
    CRITICAL_SECTION lock;
#endif
#if _MSC_VER >= 1400
    char textmode;
    char pipech2[2];
#endif
}       ioinfo;

#if !defined _CRTIMP || defined __MINGW32__
#undef _CRTIMP
#define _CRTIMP __declspec(dllimport)
#endif

#if !defined(__BORLANDC__) && !defined(_WIN32_WCE)
EXTERN_C _CRTIMP ioinfo * __pioinfo[];

#define IOINFO_L2E                      5
#define IOINFO_ARRAY_ELTS       (1 << IOINFO_L2E)
#define _pioinfo(i)     (__pioinfo[i >> IOINFO_L2E] + (i & (IOINFO_ARRAY_ELTS - 1)))
#define _osfhnd(i)  (_pioinfo(i)->osfhnd)
#define _osfile(i)  (_pioinfo(i)->osfile)
#define _pipech(i)  (_pioinfo(i)->pipech)

#define _set_osfhnd(fh, osfh) (void)(_osfhnd(fh) = osfh)
#define _set_osflags(fh, flags) (_osfile(fh) = (flags))

#define FOPEN                   0x01    /* file handle open */
#define FNOINHERIT              0x10    /* file handle opened O_NOINHERIT */
#define FAPPEND                 0x20    /* file handle opened O_APPEND */
#define FDEV                    0x40    /* file handle refers to device */
#define FTEXT                   0x80    /* file handle is in text mode */

static int
rb_w32_open_osfhandle(long osfhandle, int flags)
{
    int fh;
    char fileflags;             /* _osfile flags */
    HANDLE hF;

    /* copy relevant flags from second parameter */
    fileflags = FDEV;

    if (flags & O_APPEND)
        fileflags |= FAPPEND;

    if (flags & O_TEXT)
        fileflags |= FTEXT;

    if (flags & O_NOINHERIT)
        fileflags |= FNOINHERIT;

    /* attempt to allocate a C Runtime file handle */
    hF = CreateFile("NUL", 0, 0, NULL, OPEN_ALWAYS, 0, NULL);
    fh = _open_osfhandle((long)hF, 0);
    CloseHandle(hF);
    if (fh == -1) {
        errno = EMFILE;         /* too many open files */
        _doserrno = 0L;         /* not an OS error */
    }
    else {

        MTHREAD_ONLY(EnterCriticalSection(&(_pioinfo(fh)->lock)));
        /* the file is open. now, set the info in _osfhnd array */
        _set_osfhnd(fh, osfhandle);

        fileflags |= FOPEN;             /* mark as open */

        _set_osflags(fh, fileflags); /* set osfile entry */
        MTHREAD_ONLY(LeaveCriticalSection(&_pioinfo(fh)->lock));
    }
    return fh;                  /* return handle */
}

static void
init_stdhandle(void)
{
    if (fileno(stdin) < 0) {
        stdin->_file = 0;
    }
    if (fileno(stdout) < 0) {
        stdout->_file = 1;
    }
    if (fileno(stderr) < 0) {
        stderr->_file = 2;
    }
}
#else

#define _set_osfhnd(fh, osfh) (void)((fh), (osfh))
#define _set_osflags(fh, flags) (void)((fh), (flags))

static void
init_stdhandle(void)
{
}
#endif

#ifdef __BORLANDC__
static int
rb_w32_open_osfhandle(long osfhandle, int flags)
{
    int fd = _open_osfhandle(osfhandle, flags);
    if (fd == -1) {
        errno = EMFILE;         /* too many open files */
        _doserrno = 0L;         /* not an OS error */
    }
    return fd;
}
#endif

#undef getsockopt

static int
is_socket(SOCKET sock)
{
    char sockbuf[80];
    int optlen;
    int retval;
    int result = TRUE;

    optlen = sizeof(sockbuf);
    RUBY_CRITICAL({
        retval = getsockopt(sock, SOL_SOCKET, SO_TYPE, sockbuf, &optlen);
        if (retval == SOCKET_ERROR) {
            int iRet;
            iRet = WSAGetLastError();
            if (iRet == WSAENOTSOCK || iRet == WSANOTINITIALISED)
                result = FALSE;
        }
    });

    //
    // If we get here, then sock is actually a socket.
    //

    return result;
}

int
rb_w32_is_socket(int fd)
{
    return is_socket(TO_SOCKET(fd));
}

//
// Since the errors returned by the socket error function
// WSAGetLastError() are not known by the library routine strerror
// we have to roll our own.
//

#undef strerror

char *
rb_w32_strerror(int e)
{
    static char buffer[512];
#if !defined __MINGW32__
    extern int sys_nerr;
#endif
    DWORD source = 0;
    char *p;

#if defined __BORLANDC__ && defined ENOTEMPTY // _sys_errlist is broken
    switch (e) {
      case ENAMETOOLONG:
        return "Filename too long";
      case ENOTEMPTY:
        return "Directory not empty";
    }
#endif

    if (e < 0 || e > sys_nerr) {
        if (e < 0)
            e = GetLastError();
        if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |
                          FORMAT_MESSAGE_IGNORE_INSERTS, &source, e, 0,
                          buffer, 512, NULL) == 0) {
            strcpy(buffer, "Unknown Error");
        }
    }
    else {
        strncpy(buffer, strerror(e), sizeof(buffer));
        buffer[sizeof(buffer) - 1] = 0;
    }

    p = buffer;
    while ((p = strpbrk(p, "\r\n")) != NULL) {
        memmove(p, p + 1, strlen(p));
    }
    return buffer;
}

//
// various stubs
//

// Ownership
//
// Just pretend that everyone is a superuser. NT will let us know if
// we don't really have permission to do something.
//

#define ROOT_UID        0
#define ROOT_GID        0

rb_uid_t
getuid(void)
{
        return ROOT_UID;
}

rb_uid_t
geteuid(void)
{
        return ROOT_UID;
}

rb_gid_t
getgid(void)
{
        return ROOT_GID;
}

rb_gid_t
getegid(void)
{
    return ROOT_GID;
}

int
setuid(rb_uid_t uid)
{
    return (uid == ROOT_UID ? 0 : -1);
}

int
setgid(rb_gid_t gid)
{
    return (gid == ROOT_GID ? 0 : -1);
}

//
// File system stuff
//

int
ioctl(int i, int u, ...)
{
    errno = EINVAL;
    return -1;
}

#undef FD_SET

void
rb_w32_fdset(int fd, fd_set *set)
{
    unsigned int i;
    SOCKET s = TO_SOCKET(fd);

    for (i = 0; i < set->fd_count; i++) {
        if (set->fd_array[i] == s) {
            return;
        }
    }
    if (i == set->fd_count) {
        if (set->fd_count < FD_SETSIZE) {
            set->fd_array[i] = s;
            set->fd_count++;
        }
    }
}

#undef FD_CLR

void
rb_w32_fdclr(int fd, fd_set *set)
{
    unsigned int i;
    SOCKET s = TO_SOCKET(fd);

    for (i = 0; i < set->fd_count; i++) {
        if (set->fd_array[i] == s) {
            while (i < set->fd_count - 1) {
                set->fd_array[i] = set->fd_array[i + 1];
                i++;
            }
            set->fd_count--;
            break;
        }
    }
}

#undef FD_ISSET

int
rb_w32_fdisset(int fd, fd_set *set)
{
    int ret;
    SOCKET s = TO_SOCKET(fd);
    if (s == (SOCKET)INVALID_HANDLE_VALUE)
        return 0;
    RUBY_CRITICAL(ret = __WSAFDIsSet(s, set));
    return ret;
}

//
// Networking trampolines
// These are used to avoid socket startup/shutdown overhead in case
// the socket routines aren't used.
//

#undef select

static int NtSocketsInitialized = 0;

static int
extract_fd(fd_set *dst, fd_set *src, int (*func)(SOCKET))
{
    int s = 0;
    if (!src || !dst) return 0;

    while (s < src->fd_count) {
        SOCKET fd = src->fd_array[s];

        if (!func || (*func)(fd)) { /* move it to dst */
            int d;

            for (d = 0; d < dst->fd_count; d++) {
                if (dst->fd_array[d] == fd) break;
            }
            if (d == dst->fd_count && dst->fd_count < FD_SETSIZE) {
                dst->fd_array[dst->fd_count++] = fd;
            }
            memmove(
                &src->fd_array[s],
                &src->fd_array[s+1],
                sizeof(src->fd_array[0]) * (--src->fd_count - s));
        }
        else s++;
    }

    return dst->fd_count;
}

static int
is_not_socket(SOCKET sock)
{
    return !is_socket(sock);
}

static int
is_pipe(SOCKET sock) /* DONT call this for SOCKET! it clains it is PIPE. */
{
    int ret;

    RUBY_CRITICAL(
        ret = (GetFileType((HANDLE)sock) == FILE_TYPE_PIPE)
    );

    return ret;
}

static int
is_readable_pipe(SOCKET sock) /* call this for pipe only */
{
    int ret;
    DWORD n = 0;

    RUBY_CRITICAL(
        if (PeekNamedPipe((HANDLE)sock, NULL, 0, NULL, &n, NULL)) {
            ret = (n > 0);
        }
        else {
            ret = (GetLastError() == ERROR_BROKEN_PIPE); /* pipe was closed */
        }
    );

    return ret;
}

static int
is_console(SOCKET sock) /* DONT call this for SOCKET! */
{
    int ret;
    DWORD n = 0;
    INPUT_RECORD ir;

    RUBY_CRITICAL(
        ret = (PeekConsoleInput((HANDLE)sock, &ir, 1, &n))
    );

    return ret;
}

static int
is_readable_console(SOCKET sock) /* call this for console only */
{
    int ret = 0;
    DWORD n = 0;
    INPUT_RECORD ir;

    RUBY_CRITICAL(
        if (PeekConsoleInput((HANDLE)sock, &ir, 1, &n) && n > 0) {
            if (ir.EventType == KEY_EVENT && ir.Event.KeyEvent.bKeyDown &&
                ir.Event.KeyEvent.uChar.AsciiChar) {
                ret = 1;
            }
            else {
                ReadConsoleInput((HANDLE)sock, &ir, 1, &n);
            }
        }
    );

    return ret;
}

static void catch_interrupt(void);
static int
do_select(int nfds, fd_set *rd, fd_set *wr, fd_set *ex,
            struct timeval *timeout)
{
    int r = 0;

    if (nfds == 0) {
        if (timeout)
            rb_w32_sleep(timeout->tv_sec * 1000 + timeout->tv_usec / 1000);
        else
            rb_w32_sleep(INFINITE);
    }
    else {
#if !USE_INTERRUPT_WINSOCK
        int trap_immediate = rb_trap_immediate;
#endif  /* !USE_INTERRUPT_WINSOCK */
        RUBY_CRITICAL(
            r = select(nfds, rd, wr, ex, timeout);
            if (r == SOCKET_ERROR) {
                errno = map_errno(WSAGetLastError());
                r = -1;
            }
        );
#if !USE_INTERRUPT_WINSOCK
        rb_trap_immediate = trap_immediate;
        catch_interrupt();
#endif  /* !USE_INTERRUPT_WINSOCK */
    }

    return r;
}

static int
subst(struct timeval *rest, const struct timeval *wait)
{
    while (rest->tv_usec < wait->tv_usec) {
        if (rest->tv_sec <= wait->tv_sec) {
            return 0;
        }
        rest->tv_sec -= 1;
        rest->tv_usec += 1000 * 1000;
    }
    rest->tv_sec -= wait->tv_sec;
    rest->tv_usec -= wait->tv_usec;
    return 1;
}

int WSAAPI
rb_w32_select(int nfds, fd_set *rd, fd_set *wr, fd_set *ex,
               struct timeval *timeout)
{
    int r;
    fd_set pipe_rd;
    fd_set cons_rd;
    fd_set else_rd;
    fd_set else_wr;
#if USE_INTERRUPT_WINSOCK
    fd_set trap;
    int ret;
#endif /* USE_INTERRUPT_WINSOCK */
    int nonsock = 0;

    if (nfds < 0 || (timeout && (timeout->tv_sec < 0 || timeout->tv_usec < 0))) {
        errno = EINVAL;
        return -1;
    }
    if (!NtSocketsInitialized) {
        StartSockets();
    }

    // assume else_{rd,wr} (other than socket, pipe reader, console reader)
    // are always readable/writable. but this implementation still has
    // problem. if pipe's buffer is full, writing to pipe will block
    // until some data is read from pipe. but ruby is single threaded system,
    // so whole system will be blocked forever.

    else_rd.fd_count = 0;
    nonsock += extract_fd(&else_rd, rd, is_not_socket);

    pipe_rd.fd_count = 0;
    extract_fd(&pipe_rd, &else_rd, is_pipe); // should not call is_pipe for socket

    cons_rd.fd_count = 0;
    extract_fd(&cons_rd, &else_rd, is_console); // ditto

    else_wr.fd_count = 0;
    nonsock += extract_fd(&else_wr, wr, is_not_socket);

    r = 0;
    if (rd && rd->fd_count > r) r = rd->fd_count;
    if (wr && wr->fd_count > r) r = wr->fd_count;
    if (ex && ex->fd_count > r) r = ex->fd_count;
    if (nfds > r) nfds = r;

#if USE_INTERRUPT_WINSOCK
    if (ex)
        trap = *ex;
    else
        trap.fd_count = 0;
    if (trap.fd_count < FD_SETSIZE)
        trap.fd_array[trap.fd_count++] = (SOCKET)interrupted_event;
    // else unable to catch interrupt.
    ex = &trap;
#endif /* USE_INTERRUPT_WINSOCK */

    if (nonsock) {
        struct timeval rest;
        struct timeval wait;
        struct timeval zero;
        if (timeout) rest = *timeout;
        wait.tv_sec = 0; wait.tv_usec = 10 * 1000; // 10ms
        zero.tv_sec = 0; zero.tv_usec = 0;         //  0ms
        do {
            // modifying {else,pipe,cons}_rd is safe because
            // if they are modified, function returns immediately.
            extract_fd(&else_rd, &pipe_rd, is_readable_pipe);
            extract_fd(&else_rd, &cons_rd, is_readable_console);

            if (else_rd.fd_count || else_wr.fd_count) {
                r = do_select(nfds, rd, wr, ex, &zero); // polling
                if (r < 0) break; // XXX: should I ignore error and return signaled handles?
                r += extract_fd(rd, &else_rd, NULL); // move all
                r += extract_fd(wr, &else_wr, NULL); // move all
                break;
            }
            else {
                fd_set orig_rd;
                fd_set orig_wr;
                fd_set orig_ex;
                if (rd) orig_rd = *rd;
                if (wr) orig_wr = *wr;
                if (ex) orig_ex = *ex;
                r = do_select(nfds, rd, wr, ex, &wait);
                if (r != 0) break; // signaled or error
                if (rd) *rd = orig_rd;
                if (wr) *wr = orig_wr;
                if (ex) *ex = orig_ex;
            }
        } while (!timeout || subst(&rest, &wait));
    }
    else
        r = do_select(nfds, rd, wr, ex, timeout);

#if USE_INTERRUPT_WINSOCK
    RUBY_CRITICAL(ret = __WSAFDIsSet((SOCKET)interrupted_event, ex));
    if (ret) {
        // In this case, we must restore all FDs. But this is only a test
        // code, so we think about that later.
        errno = EINTR;
        r = -1;
    }
#endif /* USE_INTERRUPT_WINSOCK */

    return r;
}

static void
StartSockets(void)
{
    WORD version;
    WSADATA retdata;

    //
    // initalize the winsock interface and insure that it's
    // cleaned up at exit.
    //
    version = MAKEWORD(2, 0);
    if (WSAStartup(version, &retdata))
        rb_fatal ("Unable to locate winsock library!\n");
    if (LOBYTE(retdata.wVersion) != 2)
        rb_fatal("could not find version 2 of winsock dll\n");

    atexit((void (*)(void)) WSACleanup);

    main_thread.handle = GetCurrentThreadHandle();
    main_thread.id = GetCurrentThreadId();

    interrupted_event = CreateSignal();
    if (!interrupted_event)
        rb_fatal("Unable to create interrupt event!\n");
    NtSocketsInitialized = 1;
}

#undef accept

int WSAAPI
rb_w32_accept(int s, struct sockaddr *addr, int *addrlen)
{
    SOCKET r;

    if (!NtSocketsInitialized) {
        StartSockets();
    }
    RUBY_CRITICAL({
        r = accept(TO_SOCKET(s), addr, addrlen);
        if (r == INVALID_SOCKET) {
            errno = map_errno(WSAGetLastError());
            s = -1;
        }
        else {
            s = rb_w32_open_osfhandle(r, O_RDWR|O_BINARY);
        }
    });
    return s;
}

#undef bind

int WSAAPI
rb_w32_bind(int s, const struct sockaddr *addr, int addrlen)
{
    int r;

    if (!NtSocketsInitialized) {
        StartSockets();
    }
    RUBY_CRITICAL({
        r = bind(TO_SOCKET(s), addr, addrlen);
        if (r == SOCKET_ERROR)
            errno = map_errno(WSAGetLastError());
    });
    return r;
}

#undef connect

int WSAAPI
rb_w32_connect(int s, const struct sockaddr *addr, int addrlen)
{
    int r;
    if (!NtSocketsInitialized) {
        StartSockets();
    }
    RUBY_CRITICAL({
        r = connect(TO_SOCKET(s), addr, addrlen);
        if (r == SOCKET_ERROR) {
            r = WSAGetLastError();
            if (r != WSAEWOULDBLOCK) {
                errno = map_errno(r);
            }
            else {
                errno = EINPROGRESS;
                r = -1;
            }
        }
    });
    return r;
}

#undef getpeername

int WSAAPI
rb_w32_getpeername(int s, struct sockaddr *addr, int *addrlen)
{
    int r;
    if (!NtSocketsInitialized) {
        StartSockets();
    }
    RUBY_CRITICAL({
        r = getpeername(TO_SOCKET(s), addr, addrlen);
        if (r == SOCKET_ERROR)
            errno = map_errno(WSAGetLastError());
    });
    return r;
}

#undef getsockname

int WSAAPI
rb_w32_getsockname(int s, struct sockaddr *addr, int *addrlen)
{
    int r;
    if (!NtSocketsInitialized) {
        StartSockets();
    }
    RUBY_CRITICAL({
        r = getsockname(TO_SOCKET(s), addr, addrlen);
        if (r == SOCKET_ERROR)
            errno = map_errno(WSAGetLastError());
    });
    return r;
}

int WSAAPI
rb_w32_getsockopt(int s, int level, int optname, char *optval, int *optlen)
{
    int r;
    if (!NtSocketsInitialized) {
        StartSockets();
    }
    RUBY_CRITICAL({
        r = getsockopt(TO_SOCKET(s), level, optname, optval, optlen);
        if (r == SOCKET_ERROR)
            errno = map_errno(WSAGetLastError());
    });
    return r;
}

#undef ioctlsocket

int WSAAPI
rb_w32_ioctlsocket(int s, long cmd, u_long *argp)
{
    int r;
    if (!NtSocketsInitialized) {
        StartSockets();
    }
    RUBY_CRITICAL({
        r = ioctlsocket(TO_SOCKET(s), cmd, argp);
        if (r == SOCKET_ERROR)
            errno = map_errno(WSAGetLastError());
    });
    return r;
}

#undef listen

int WSAAPI
rb_w32_listen(int s, int backlog)
{
    int r;
    if (!NtSocketsInitialized) {
        StartSockets();
    }
    RUBY_CRITICAL({
        r = listen(TO_SOCKET(s), backlog);
        if (r == SOCKET_ERROR)
            errno = map_errno(WSAGetLastError());
    });
    return r;
}

#undef recv

int WSAAPI
rb_w32_recv(int s, char *buf, int len, int flags)
{
    int r;
    if (!NtSocketsInitialized) {
        StartSockets();
    }
    RUBY_CRITICAL({
        r = recv(TO_SOCKET(s), buf, len, flags);
        if (r == SOCKET_ERROR)
            errno = map_errno(WSAGetLastError());
    });
    return r;
}

#undef recvfrom

int WSAAPI
rb_w32_recvfrom(int s, char *buf, int len, int flags,
                 struct sockaddr *from, int *fromlen)
{
    int r;
    if (!NtSocketsInitialized) {
        StartSockets();
    }
    RUBY_CRITICAL({
        r = recvfrom(TO_SOCKET(s), buf, len, flags, from, fromlen);
        if (r == SOCKET_ERROR)
            errno = map_errno(WSAGetLastError());
    });
    return r;
}

#undef send

int WSAAPI
rb_w32_send(int s, const char *buf, int len, int flags)
{
    int r;
    if (!NtSocketsInitialized) {
        StartSockets();
    }
    RUBY_CRITICAL({
        r = send(TO_SOCKET(s), buf, len, flags);
        if (r == SOCKET_ERROR)
            errno = map_errno(WSAGetLastError());
    });
    return r;
}

#undef sendto

int WSAAPI
rb_w32_sendto(int s, const char *buf, int len, int flags,
              const struct sockaddr *to, int tolen)
{
    int r;
    if (!NtSocketsInitialized) {
        StartSockets();
    }
    RUBY_CRITICAL({
        r = sendto(TO_SOCKET(s), buf, len, flags, to, tolen);
        if (r == SOCKET_ERROR)
            errno = map_errno(WSAGetLastError());
    });
    return r;
}

#undef setsockopt

int WSAAPI
rb_w32_setsockopt(int s, int level, int optname, const char *optval, int optlen)
{
    int r;
    if (!NtSocketsInitialized) {
        StartSockets();
    }
    RUBY_CRITICAL({
        r = setsockopt(TO_SOCKET(s), level, optname, optval, optlen);
        if (r == SOCKET_ERROR)
            errno = map_errno(WSAGetLastError());
    });
    return r;
}

#undef shutdown

int WSAAPI
rb_w32_shutdown(int s, int how)
{
    int r;
    if (!NtSocketsInitialized) {
        StartSockets();
    }
    RUBY_CRITICAL({
        r = shutdown(TO_SOCKET(s), how);
        if (r == SOCKET_ERROR)
            errno = map_errno(WSAGetLastError());
    });
    return r;
}

static SOCKET
open_ifs_socket(int af, int type, int protocol)
{
    unsigned long proto_buffers_len = 0;
    int error_code;
    SOCKET out = INVALID_SOCKET;

    if (WSAEnumProtocols(NULL, NULL, &proto_buffers_len) == SOCKET_ERROR) {
        error_code = WSAGetLastError();
        if (error_code == WSAENOBUFS) {
            WSAPROTOCOL_INFO *proto_buffers;
            int protocols_available = 0;

            proto_buffers = (WSAPROTOCOL_INFO *)malloc(proto_buffers_len);

            protocols_available =
                WSAEnumProtocols(NULL, proto_buffers, &proto_buffers_len);
            if (protocols_available != SOCKET_ERROR) {
                int i;
                for (i = 0; i < protocols_available; i++) {
                    if ((af != AF_UNSPEC && af != proto_buffers[i].iAddressFamily) ||
                        (type != proto_buffers[i].iSocketType) ||
                        (protocol != 0 && protocol != proto_buffers[i].iProtocol))
                        continue;

                    if ((proto_buffers[i].dwServiceFlags1 & XP1_IFS_HANDLES) == 0)
                        continue;

                    out = WSASocket(af, type, protocol, &(proto_buffers[i]), 0, 0);
                    break;
                }
            }

            free(proto_buffers);
        }
    }

    return out;
}

#undef socket

int WSAAPI
rb_w32_socket(int af, int type, int protocol)
{
    SOCKET s;
    int fd;

    if (!NtSocketsInitialized) {
        StartSockets();
    }
    RUBY_CRITICAL({
        s = open_ifs_socket(af, type, protocol);
        if (s == INVALID_SOCKET) {
            errno = map_errno(WSAGetLastError());
            fd = -1;
        }
        else {
            fd = rb_w32_open_osfhandle(s, O_RDWR|O_BINARY);
        }
    });
    return fd;
}

#undef gethostbyaddr

struct hostent * WSAAPI
rb_w32_gethostbyaddr(const char *addr, int len, int type)
{
    struct hostent *r;
    if (!NtSocketsInitialized) {
        StartSockets();
    }
    RUBY_CRITICAL({
        r = gethostbyaddr(addr, len, type);
        if (r == NULL)
            errno = map_errno(WSAGetLastError());
    });
    return r;
}

#undef gethostbyname

struct hostent * WSAAPI
rb_w32_gethostbyname(const char *name)
{
    struct hostent *r;
    if (!NtSocketsInitialized) {
        StartSockets();
    }
    RUBY_CRITICAL({
        r = gethostbyname(name);
        if (r == NULL)
            errno = map_errno(WSAGetLastError());
    });
    return r;
}

#undef gethostname

int WSAAPI
rb_w32_gethostname(char *name, int len)
{
    int r;
    if (!NtSocketsInitialized) {
        StartSockets();
    }
    RUBY_CRITICAL({
        r = gethostname(name, len);
        if (r == SOCKET_ERROR)
            errno = map_errno(WSAGetLastError());
    });
    return r;
}

#undef getprotobyname

struct protoent * WSAAPI
rb_w32_getprotobyname(const char *name)
{
    struct protoent *r;
    if (!NtSocketsInitialized) {
        StartSockets();
    }
    RUBY_CRITICAL({
        r = getprotobyname(name);
        if (r == NULL)
            errno = map_errno(WSAGetLastError());
    });
    return r;
}

#undef getprotobynumber

struct protoent * WSAAPI
rb_w32_getprotobynumber(int num)
{
    struct protoent *r;
    if (!NtSocketsInitialized) {
        StartSockets();
    }
    RUBY_CRITICAL({
        r = getprotobynumber(num);
        if (r == NULL)
            errno = map_errno(WSAGetLastError());
    });
    return r;
}

#undef getservbyname

struct servent * WSAAPI
rb_w32_getservbyname(const char *name, const char *proto)
{
    struct servent *r;
    if (!NtSocketsInitialized) {
        StartSockets();
    }
    RUBY_CRITICAL({
        r = getservbyname(name, proto);
        if (r == NULL)
            errno = map_errno(WSAGetLastError());
    });
    return r;
}

#undef getservbyport

struct servent * WSAAPI
rb_w32_getservbyport(int port, const char *proto)
{
    struct servent *r;
    if (!NtSocketsInitialized) {
        StartSockets();
    }
    RUBY_CRITICAL({
        r = getservbyport(port, proto);
        if (r == NULL)
            errno = map_errno(WSAGetLastError());
    });
    return r;
}

static int
socketpair_internal(int af, int type, int protocol, SOCKET *sv)
{
    const char *localhost = NULL;
    SOCKET svr = INVALID_SOCKET, r = INVALID_SOCKET, w = INVALID_SOCKET;
    struct sockaddr_in sock_in4;
#ifdef INET6
    struct sockaddr_in6 sock_in6;
#endif
    struct sockaddr *addr;
    int ret = -1;
    int len;

    if (!NtSocketsInitialized) {
        StartSockets();
    }

    switch (af) {
      case AF_INET:
#if defined PF_INET && PF_INET != AF_INET
      case PF_INET:
#endif
        sock_in4.sin_family = AF_INET;
        sock_in4.sin_port = 0;
        sock_in4.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
        addr = (struct sockaddr *)&sock_in4;
        len = sizeof(sock_in4);
        break;
#ifdef INET6
      case AF_INET6:
        memset(&sock_in6, 0, sizeof(sock_in6));
        sock_in6.sin6_family = AF_INET6;
        sock_in6.sin6_addr = IN6ADDR_LOOPBACK_INIT;
        addr = (struct sockaddr *)&sock_in6;
        len = sizeof(sock_in6);
        break;
#endif
      default:
        errno = EAFNOSUPPORT;
        return -1;
    }
    if (type != SOCK_STREAM) {
        errno = EPROTOTYPE;
        return -1;
    }

    RUBY_CRITICAL({
        do {
            svr = open_ifs_socket(af, type, protocol);
            if (svr == INVALID_SOCKET)
                break;
            if (bind(svr, addr, len) < 0)
                break;
            if (getsockname(svr, addr, &len) < 0)
                break;
            if (type == SOCK_STREAM)
                listen(svr, 5);

            w = open_ifs_socket(af, type, protocol);
            if (w == INVALID_SOCKET)
                break;
            if (connect(w, addr, len) < 0)
                break;

            r = accept(svr, addr, &len);
            if (r == INVALID_SOCKET)
                break;

            ret = 0;
        } while (0);

        if (ret < 0) {
            errno = map_errno(WSAGetLastError());
            if (r != INVALID_SOCKET)
                closesocket(r);
            if (w != INVALID_SOCKET)
                closesocket(w);
        }
        else {
            sv[0] = r;
            sv[1] = w;
        }
        if (svr != INVALID_SOCKET)
            closesocket(svr);
    });

    return ret;
}

int
rb_w32_socketpair(int af, int type, int protocol, int *sv)
{
    SOCKET pair[2];

    if (socketpair_internal(af, type, protocol, pair) < 0)
        return -1;
    sv[0] = rb_w32_open_osfhandle(pair[0], O_RDWR|O_BINARY);
    sv[1] = rb_w32_open_osfhandle(pair[1], O_RDWR|O_BINARY);

    return 0;
}

//
// Networking stubs
//

void endhostent(void) {}
void endnetent(void) {}
void endprotoent(void) {}
void endservent(void) {}

struct netent *getnetent (void) {return (struct netent *) NULL;}

struct netent *getnetbyaddr(long net, int type) {return (struct netent *)NULL;}

struct netent *getnetbyname(const char *name) {return (struct netent *)NULL;}

struct protoent *getprotoent (void) {return (struct protoent *) NULL;}

struct servent *getservent (void) {return (struct servent *) NULL;}

void sethostent (int stayopen) {}

void setnetent (int stayopen) {}

void setprotoent (int stayopen) {}

void setservent (int stayopen) {}

int
fcntl(int fd, int cmd, ...)
{
    SOCKET sock = TO_SOCKET(fd);
    va_list va;
    int arg;
    int ret;
    u_long ioctlArg;

    if (!is_socket(sock)) {
        errno = EBADF;
        return -1;
    }
    if (cmd != F_SETFL) {
        errno = EINVAL;
        return -1;
    }

    va_start(va, cmd);
    arg = va_arg(va, int);
    va_end(va);
    if (arg & O_NONBLOCK) {
        ioctlArg = 1;
    }
    else {
        ioctlArg = 0;
    }
    RUBY_CRITICAL({
        ret = ioctlsocket(sock, FIONBIO, &ioctlArg);
        if (ret == -1) {
            errno = map_errno(WSAGetLastError());
        }
    });

    return ret;
}

#ifndef WNOHANG
#define WNOHANG -1
#endif

static rb_pid_t
poll_child_status(struct ChildRecord *child, int *stat_loc)
{
    DWORD exitcode;
    DWORD err;

    if (!GetExitCodeProcess(child->hProcess, &exitcode)) {
        /* If an error occured, return immediatly. */
        err = GetLastError();
        if (err == ERROR_INVALID_PARAMETER)
            errno = ECHILD;
        else
            errno = map_errno(GetLastError());
        CloseChildHandle(child);
        return -1;
    }
    if (exitcode != STILL_ACTIVE) {
        /* If already died, return immediatly. */
        rb_pid_t pid = child->pid;
        CloseChildHandle(child);
        if (stat_loc) *stat_loc = exitcode << 8;
        return pid;
    }
    return 0;
}

rb_pid_t
waitpid (rb_pid_t pid, int *stat_loc, int options)
{
    DWORD timeout;

    if (options == WNOHANG) {
        timeout = 0;
    } else {
        timeout = INFINITE;
    }

    if (pid == -1) {
        int count = 0;
        DWORD ret;
        HANDLE events[MAXCHILDNUM + 1];

        FOREACH_CHILD(child) {
            if (!child->pid || child->pid < 0) continue;
            if ((pid = poll_child_status(child, stat_loc))) return pid;
            events[count++] = child->hProcess;
        } END_FOREACH_CHILD;
        if (!count) {
            errno = ECHILD;
            return -1;
        }
        events[count] = interrupted_event;

        ret = WaitForMultipleEvents(count + 1, events, FALSE, timeout, TRUE);
        if (ret == WAIT_TIMEOUT) return 0;
        if ((ret -= WAIT_OBJECT_0) == count) {
            ResetSignal(interrupted_event);
            errno = EINTR;
            return -1;
        }
        if (ret > count) {
            errno = map_errno(GetLastError());
            return -1;
        }

        return poll_child_status(ChildRecord + ret, stat_loc);
    }
    else {
        struct ChildRecord* child = FindChildSlot(pid);
        if (!child) {
            errno = ECHILD;
            return -1;
        }

        while (!(pid = poll_child_status(child, stat_loc))) {
            /* wait... */
            if (wait_events(child->hProcess, timeout) != WAIT_OBJECT_0) {
                /* still active */
                pid = 0;
                break;
            }
        }
    }

    return pid;
}

#include <sys/timeb.h>

int _cdecl
gettimeofday(struct timeval *tv, struct timezone *tz)
{
    SYSTEMTIME st;
    time_t t;
    struct tm tm;

    GetLocalTime(&st);
    tm.tm_sec = st.wSecond;
    tm.tm_min = st.wMinute;
    tm.tm_hour = st.wHour;
    tm.tm_mday = st.wDay;
    tm.tm_mon = st.wMonth - 1;
    tm.tm_year = st.wYear - 1900;
    tm.tm_isdst = -1;
    t = mktime(&tm);
    tv->tv_sec = t;
    tv->tv_usec = st.wMilliseconds * 1000;

    return 0;
}

char *
rb_w32_getcwd(char *buffer, int size)
{
    int length;
    char *bp;

#undef getcwd
#ifndef __BORLANDC__
#define getcwd _getcwd
#endif
    if (getcwd(buffer, size) == NULL) {
        return NULL;
    }
    length = strlen(buffer);
    if (length >= size) {
        return NULL;
    }

    for (bp = buffer; *bp != '\0'; bp = CharNext(bp)) {
        if (*bp == '\\') {
            *bp = '/';
        }
    }
    return buffer;
}

int
chown(const char *path, int owner, int group)
{
    return 0;
}

int
kill(int pid, int sig)
{
    int ret = 0;
    DWORD err;

    if (pid <= 0) {
        errno = EINVAL;
        return -1;
    }

    if (IsWin95()) pid = -pid;
    if ((unsigned int)pid == GetCurrentProcessId() &&
        (sig != 0 && sig != SIGKILL)) {
        if ((ret = raise(sig)) != 0) {
            /* MSVCRT doesn't set errno... */
            errno = EINVAL;
        }
        return ret;
    }

    switch (sig) {
      case 0:
        RUBY_CRITICAL({
            HANDLE hProc =
                OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, (DWORD)pid);
            if (hProc == NULL || hProc == INVALID_HANDLE_VALUE) {
                if (GetLastError() == ERROR_INVALID_PARAMETER) {
                    errno = ESRCH;
                }
                else {
                    errno = EPERM;
                }
                ret = -1;
            }
            else {
                CloseHandle(hProc);
            }
        });
        break;

      case SIGINT:
        RUBY_CRITICAL({
            if (!GenerateConsoleCtrlEvent(CTRL_C_EVENT, (DWORD)pid)) {
                if ((err = GetLastError()) == 0)
                    errno = EPERM;
                else
                    errno = map_errno(GetLastError());
                ret = -1;
            }
        });
        break;

      case SIGKILL:
        RUBY_CRITICAL({
            HANDLE hProc = OpenProcess(PROCESS_TERMINATE, FALSE, (DWORD)pid);
            if (hProc == NULL || hProc == INVALID_HANDLE_VALUE) {
                if (GetLastError() == ERROR_INVALID_PARAMETER) {
                    errno = ESRCH;
                }
                else {
                    errno = EPERM;
                }
                ret = -1;
            }
            else {
                if (!TerminateProcess(hProc, 0)) {
                    errno = EPERM;
                    ret = -1;
                }
                CloseHandle(hProc);
            }
        });
        break;

      default:
        errno = EINVAL;
        ret = -1;
        break;
    }

    return ret;
}

int
link(const char *from, const char *to)
{
    static BOOL (WINAPI *pCreateHardLink)(LPCTSTR, LPCTSTR, LPSECURITY_ATTRIBUTES) = NULL;
    static int myerrno = 0;

    if (!pCreateHardLink && !myerrno) {
        HANDLE hKernel;

        hKernel = GetModuleHandle("kernel32.dll");
        if (hKernel) {
            pCreateHardLink = (BOOL (WINAPI *)(LPCTSTR, LPCTSTR, LPSECURITY_ATTRIBUTES))GetProcAddress(hKernel, "CreateHardLinkA");
            if (!pCreateHardLink) {
                rb_notimplement();
            }
        }
        else {
            myerrno = map_errno(GetLastError());
        }
    }
    if (!pCreateHardLink) {
        errno = myerrno;
        return -1;
    }

    if (!pCreateHardLink(to, from, NULL)) {
        errno = map_errno(GetLastError());
        return -1;
    }

    return 0;
}

int
wait(int *status)
{
    return waitpid(-1, status, 0);
}

char *
rb_w32_getenv(const char *name)
{
    static char *curitem = NULL;
    static DWORD curlen = 0;
    DWORD needlen;

    if (curitem == NULL || curlen == 0) {
        curlen = 512;
        curitem = ALLOC_N(char, curlen);
    }

    needlen = GetEnvironmentVariable(name, curitem, curlen);
    if (needlen != 0) {
        while (needlen > curlen) {
            REALLOC_N(curitem, char, needlen);
            curlen = needlen;
            needlen = GetEnvironmentVariable(name, curitem, curlen);
        }
    }
    else {
        return NULL;
    }

    return curitem;
}

int
rb_w32_rename(const char *oldpath, const char *newpath)
{
    int res = 0;
    int oldatts;
    int newatts;

    oldatts = GetFileAttributes(oldpath);
    newatts = GetFileAttributes(newpath);

    if (oldatts == -1) {
        errno = map_errno(GetLastError());
        return -1;
    }

    RUBY_CRITICAL({
        if (newatts != -1 && newatts & FILE_ATTRIBUTE_READONLY)
            SetFileAttributesA(newpath, newatts & ~ FILE_ATTRIBUTE_READONLY);

        if (!MoveFile(oldpath, newpath))
            res = -1;

        if (res) {
            switch (GetLastError()) {
              case ERROR_ALREADY_EXISTS:
              case ERROR_FILE_EXISTS:
                if (IsWinNT()) {
                    if (MoveFileEx(oldpath, newpath, MOVEFILE_REPLACE_EXISTING))
                        res = 0;
                } else {
                    for (;;) {
                        if (!DeleteFile(newpath) && GetLastError() != ERROR_FILE_NOT_FOUND)
                            break;
                        else if (MoveFile(oldpath, newpath)) {
                            res = 0;
                            break;
                        }
                    }
                }
            }
        }

        if (res)
            errno = map_errno(GetLastError());
        else
            SetFileAttributes(newpath, oldatts);
    });

    return res;
}

static int
isUNCRoot(const char *path)
{
    if (path[0] == '\\' && path[1] == '\\') {
        const char *p;
        for (p = path + 2; *p; p = CharNext(p)) {
            if (*p == '\\')
                break;
        }
        if (p[0] && p[1]) {
            for (p++; *p; p = CharNext(p)) {
                if (*p == '\\')
                    break;
            }
            if (!p[0] || !p[1] || (p[1] == '.' && !p[2]))
                return 1;
        }
    }
    return 0;
}

#ifdef __BORLANDC__
#undef fstat
int
rb_w32_fstat(int fd, struct stat *st)
{
    BY_HANDLE_FILE_INFORMATION info;
    int ret = fstat(fd, st);

    if (ret) return ret;
    st->st_mode &= ~(S_IWGRP | S_IWOTH);
    if (GetFileInformationByHandle((HANDLE)_get_osfhandle(fd), &info) &&
        !(info.dwFileAttributes & FILE_ATTRIBUTE_READONLY)) {
        st->st_mode |= S_IWUSR;
    }
    return ret;
}
#endif

static time_t
filetime_to_unixtime(const FILETIME *ft)
{
    FILETIME loc;
    SYSTEMTIME st;
    struct tm tm;
    time_t t;

    if (!FileTimeToLocalFileTime(ft, &loc)) {
        return 0;
    }
    if (!FileTimeToSystemTime(&loc, &st)) {
        return 0;
    }
    memset(&tm, 0, sizeof(tm));
    tm.tm_year = st.wYear - 1900;
    tm.tm_mon = st.wMonth - 1;
    tm.tm_mday = st.wDay;
    tm.tm_hour = st.wHour;
    tm.tm_min = st.wMinute;
    tm.tm_sec = st.wSecond;
    t = mktime(&tm);
    return t == -1 ? 0 : t;
}

static unsigned
fileattr_to_unixmode(DWORD attr, const char *path)
{
    unsigned mode = 0;

    if (attr & FILE_ATTRIBUTE_READONLY) {
        mode |= S_IREAD;
    }
    else {
        mode |= S_IREAD | S_IWRITE | S_IWUSR;
    }

    if (attr & FILE_ATTRIBUTE_DIRECTORY) {
        mode |= S_IFDIR | S_IEXEC;
    }
    else {
        mode |= S_IFREG;
    }

    if (path && (mode & S_IFREG)) {
        const char *end = path + strlen(path);
        while (path < end) {
            end = CharPrev(path, end);
            if (*end == '.') {
                if ((strcmpi(end, ".bat") == 0) ||
                    (strcmpi(end, ".cmd") == 0) ||
                    (strcmpi(end, ".com") == 0) ||
                    (strcmpi(end, ".exe") == 0)) {
                    mode |= S_IEXEC;
                }
                break;
            }
        }
    }

    mode |= (mode & 0700) >> 3;
    mode |= (mode & 0700) >> 6;

    return mode;
}

static int
winnt_stat(const char *path, struct stat *st)
{
    HANDLE h;
    WIN32_FIND_DATA wfd;

    memset(st, 0, sizeof(struct stat));
    st->st_nlink = 1;

    if (_mbspbrk(path, "?*")) {
        errno = ENOENT;
        return -1;
    }
    h = FindFirstFile(path, &wfd);
    if (h != INVALID_HANDLE_VALUE) {
        FindClose(h);
        st->st_mode  = fileattr_to_unixmode(wfd.dwFileAttributes, path);
        st->st_atime = filetime_to_unixtime(&wfd.ftLastAccessTime);
        st->st_mtime = filetime_to_unixtime(&wfd.ftLastWriteTime);
        st->st_ctime = filetime_to_unixtime(&wfd.ftCreationTime);
        st->st_size  = wfd.nFileSizeLow; /* TODO: 64bit support */
    }
    else {
        // If runtime stat(2) is called for network shares, it fails on WinNT.
        // Because GetDriveType returns 1 for network shares. (Win98 returns 4)
        DWORD attr = GetFileAttributes(path);
        if (attr == -1) {
            errno = map_errno(GetLastError());
            return -1;
        }
        st->st_mode  = fileattr_to_unixmode(attr, path);
    }

    st->st_dev = st->st_rdev = (isalpha(path[0]) && path[1] == ':') ?
        toupper(path[0]) - 'A' : _getdrive() - 1;

    return 0;
}

int
rb_w32_stat(const char *path, struct stat *st)
{
    const char *p;
    char *buf1, *s, *end;
    int len;
    int ret;

    if (!path || !st) {
        errno = EFAULT;
        return -1;
    }
    buf1 = ALLOCA_N(char, strlen(path) + 2);
    for (p = path, s = buf1; *p; p++, s++) {
        if (*p == '/')
            *s = '\\';
        else
            *s = *p;
    }
    *s = '\0';
    len = s - buf1;
    if (!len || '\"' == *(--s)) {
        errno = ENOENT;
        return -1;
    }
    end = CharPrev(buf1, buf1 + len);

    if (isUNCRoot(buf1)) {
        if (*end == '.')
            *end = '\0';
        else if (*end != '\\')
            strcat(buf1, "\\");
    } else if (*end == '\\' || (buf1 + 1 == end && *end == ':'))
        strcat(buf1, ".");

    ret = IsWinNT() ? winnt_stat(buf1, st) : stat(buf1, st);
    if (ret == 0) {
        st->st_mode &= ~(S_IWGRP | S_IWOTH);
    }
    return ret;
}

static long
filetime_to_clock(FILETIME *ft)
{
    __int64 qw = ft->dwHighDateTime;
    qw <<= 32;
    qw |= ft->dwLowDateTime;
    qw /= 10000;  /* File time ticks at 0.1uS, clock at 1mS */
    return (long) qw;
}

int
rb_w32_times(struct tms *tmbuf)
{
    FILETIME create, exit, kernel, user;

    if (GetProcessTimes(GetCurrentProcess(),&create, &exit, &kernel, &user)) {
        tmbuf->tms_utime = filetime_to_clock(&user);
        tmbuf->tms_stime = filetime_to_clock(&kernel);
        tmbuf->tms_cutime = 0;
        tmbuf->tms_cstime = 0;
    }
    else {
        tmbuf->tms_utime = clock();
        tmbuf->tms_stime = 0;
        tmbuf->tms_cutime = 0;
        tmbuf->tms_cstime = 0;
    }
    return 0;
}

#undef Sleep
#define yield_once() Sleep(0)
#define yield_until(condition) do yield_once(); while (!(condition))

static DWORD
wait_events(HANDLE event, DWORD timeout)
{
    HANDLE events[2];
    int count = 0;
    DWORD ret;

    if (event) {
        events[count++] = event;
    }
    events[count++] = interrupted_event;

    ret = WaitForMultipleEvents(count, events, FALSE, timeout, TRUE);

    if (ret == WAIT_OBJECT_0 + count - 1) {
        ResetSignal(interrupted_event);
        errno = EINTR;
    }

    return ret;
}

static CRITICAL_SECTION *
system_state(void)
{
    static int initialized = 0;
    static CRITICAL_SECTION syssect;

    if (!initialized) {
        InitializeCriticalSection(&syssect);
        initialized = 1;
    }
    return &syssect;
}

static LONG flag_interrupt = -1;
static volatile DWORD tlsi_interrupt = TLS_OUT_OF_INDEXES;

void
rb_w32_enter_critical(void)
{
    if (IsWinNT()) {
        EnterCriticalSection(system_state());
        return;
    }

    if (tlsi_interrupt == TLS_OUT_OF_INDEXES) {
        tlsi_interrupt = TlsAlloc();
    }

    {
        DWORD ti = (DWORD)TlsGetValue(tlsi_interrupt);
        while (InterlockedIncrement(&flag_interrupt) > 0 && !ti) {
            InterlockedDecrement(&flag_interrupt);
            Sleep(1);
        }
        TlsSetValue(tlsi_interrupt, (PVOID)++ti);
    }
}

void
rb_w32_leave_critical(void)
{
    if (IsWinNT()) {
        LeaveCriticalSection(system_state());
        return;
    }

    InterlockedDecrement(&flag_interrupt);
    TlsSetValue(tlsi_interrupt, (PVOID)((DWORD)TlsGetValue(tlsi_interrupt) - 1));
}

struct handler_arg_t {
    void (*handler)(int);
    int arg;
    int status;
    int finished;
    HANDLE handshake;
};

static void
rb_w32_call_handler(struct handler_arg_t* h)
{
    int status;
    RUBY_CRITICAL(rb_protect((VALUE (*)(VALUE))h->handler, (VALUE)h->arg, &h->status);
                  status = h->status;
                  SetEvent(h->handshake));
    if (status) {
        rb_jump_tag(status);
    }
    h->finished = 1;
    yield_until(0);
}

static struct handler_arg_t *
setup_handler(struct handler_arg_t *harg, int arg, void (*handler)(int),
              HANDLE handshake)
{
    harg->handler = handler;
    harg->arg = arg;
    harg->status = 0;
    harg->finished = 0;
    harg->handshake = handshake;
    return harg;
}

static void
setup_call(CONTEXT* ctx, struct handler_arg_t *harg)
{
#ifdef _M_IX86
    DWORD *esp = (DWORD *)ctx->Esp;
    *--esp = (DWORD)harg;
    *--esp = ctx->Eip;
    ctx->Esp = (DWORD)esp;
    ctx->Eip = (DWORD)rb_w32_call_handler;
#else
#ifndef _WIN32_WCE
#error unsupported processor
#endif
#endif
}

int
rb_w32_main_context(int arg, void (*handler)(int))
{
    static HANDLE interrupt_done = NULL;
    struct handler_arg_t harg;
    CONTEXT ctx_orig;
    HANDLE current_thread = GetCurrentThread();
    int old_priority = GetThreadPriority(current_thread);

    if (GetCurrentThreadId() == main_thread.id) return FALSE;

    SetSignal(interrupted_event);

    RUBY_CRITICAL({             /* the main thread must be in user state */
        CONTEXT ctx;

        SuspendThread(main_thread.handle);
        SetThreadPriority(current_thread, GetThreadPriority(main_thread.handle));

        ZeroMemory(&ctx, sizeof(CONTEXT));
        ctx.ContextFlags = CONTEXT_FULL | CONTEXT_FLOATING_POINT;
        GetThreadContext(main_thread.handle, &ctx);
        ctx_orig = ctx;

        /* handler context setup */
        if (!interrupt_done) {
            interrupt_done = CreateEvent(NULL, FALSE, FALSE, NULL);
            /* anonymous one-shot event */
        }
        else {
            ResetEvent(interrupt_done);
        }
        setup_call(&ctx, setup_handler(&harg, arg, handler, interrupt_done));

        ctx.ContextFlags = CONTEXT_CONTROL;
        SetThreadContext(main_thread.handle, &ctx);
        ResumeThread(main_thread.handle);
    });

    /* give a chance to the main thread */
    yield_once();
    WaitForSingleObject(interrupt_done, INFINITE); /* handshaking */

    if (!harg.status) {
        /* no exceptions raised, restore old context. */
        RUBY_CRITICAL({
            /* ensure the main thread is in user state. */
            yield_until(harg.finished);

            SuspendThread(main_thread.handle);
            ctx_orig.ContextFlags = CONTEXT_FULL | CONTEXT_FLOATING_POINT;
            SetThreadContext(main_thread.handle, &ctx_orig);
            ResumeThread(main_thread.handle);
        });
    }
    /* otherwise leave the main thread raised */

    SetThreadPriority(current_thread, old_priority);

    return TRUE;
}

int
rb_w32_sleep(unsigned long msec)
{
    return rb_w32_Sleep(msec);
}

int WINAPI
rb_w32_Sleep(unsigned long msec)
{
    DWORD ret;
    RUBY_CRITICAL(ret = wait_events(NULL, msec));
    yield_once();
    CHECK_INTS;
    return ret != WAIT_TIMEOUT;
}

static void
catch_interrupt(void)
{
    yield_once();
    RUBY_CRITICAL(wait_events(NULL, 0));
    CHECK_INTS;
}

#if defined __BORLANDC__ || defined _WIN32_WCE
#undef read
int
read(int fd, void *buf, size_t size)
{
    int trap_immediate = rb_trap_immediate;
    int ret = _read(fd, buf, size);
    if ((ret < 0) && (errno == EPIPE)) {
        errno = 0;
        ret = 0;
    }
    rb_trap_immediate = trap_immediate;
    catch_interrupt();
    return ret;
}
#endif

#undef fgetc
int
rb_w32_getc(FILE* stream)
{
    int c, trap_immediate = rb_trap_immediate;
#ifndef _WIN32_WCE
    if (enough_to_get(stream->FILE_COUNT)) {
        c = (unsigned char)*stream->FILE_READPTR++;
        rb_trap_immediate = trap_immediate;
    }
    else
#endif
    {
        c = _filbuf(stream);
#if defined __BORLANDC__ || defined _WIN32_WCE
        if ((c == EOF) && (errno == EPIPE)) {
            clearerr(stream);
        }
#endif
        rb_trap_immediate = trap_immediate;
        catch_interrupt();
    }
    return c;
}

#undef fputc
int
rb_w32_putc(int c, FILE* stream)
{
    int trap_immediate = rb_trap_immediate;
#ifndef _WIN32_WCE
    if (enough_to_put(stream->FILE_COUNT)) {
        c = (unsigned char)(*stream->FILE_READPTR++ = (char)c);
        rb_trap_immediate = trap_immediate;
    }
    else
#endif
    {
        c = _flsbuf(c, stream);
        rb_trap_immediate = trap_immediate;
        catch_interrupt();
    }
    return c;
}

struct asynchronous_arg_t {
    /* output field */
    void* stackaddr;
    int errnum;

    /* input field */
    VALUE (*func)(VALUE self, int argc, VALUE* argv);
    VALUE self;
    int argc;
    VALUE* argv;
};

static DWORD WINAPI
call_asynchronous(PVOID argp)
{
    DWORD ret;
    struct asynchronous_arg_t *arg = argp;
    arg->stackaddr = &argp;
    ret = (DWORD)arg->func(arg->self, arg->argc, arg->argv);
    arg->errnum = errno;
    return ret;
}

VALUE
rb_w32_asynchronize(asynchronous_func_t func, VALUE self,
                    int argc, VALUE* argv, VALUE intrval)
{
    DWORD val;
    BOOL interrupted = FALSE;
    HANDLE thr;

    RUBY_CRITICAL({
        struct asynchronous_arg_t arg;

        arg.stackaddr = NULL;
        arg.errnum = 0;
        arg.func = func;
        arg.self = self;
        arg.argc = argc;
        arg.argv = argv;

        thr = CreateThread(NULL, 0, call_asynchronous, &arg, 0, &val);

        if (thr) {
            yield_until(arg.stackaddr);

            if (wait_events(thr, INFINITE) != WAIT_OBJECT_0) {
                interrupted = TRUE;

                if (TerminateThread(thr, intrval)) {
                    yield_once();
                }
            }

            GetExitCodeThread(thr, &val);
            CloseHandle(thr);

            if (interrupted) {
                /* must release stack of killed thread, why doesn't Windows? */
                MEMORY_BASIC_INFORMATION m;

                memset(&m, 0, sizeof(m));
                if (!VirtualQuery(arg.stackaddr, &m, sizeof(m))) {
                    Debug(fprintf(stderr, "couldn't get stack base:%p:%d\n",
                                  arg.stackaddr, GetLastError()));
                }
                else if (!VirtualFree(m.AllocationBase, 0, MEM_RELEASE)) {
                    Debug(fprintf(stderr, "couldn't release stack:%p:%d\n",
                                  m.AllocationBase, GetLastError()));
                }
                errno = EINTR;
            }
            else {
                errno = arg.errnum;
            }
        }
    });

    if (!thr) {
        rb_fatal("failed to launch waiter thread:%d", GetLastError());
    }

    if (interrupted) {
        CHECK_INTS;
    }

    return val;
}

char **
rb_w32_get_environ(void)
{
    char *envtop, *env;
    char **myenvtop, **myenv;
    int num;

    /*
     * We avoid values started with `='. If you want to deal those values,
     * change this function, and some functions in hash.c which recognize
     * `=' as delimiter or rb_w32_getenv() and ruby_setenv().
     * CygWin deals these values by changing first `=' to '!'. But we don't
     * use such trick and follow cmd.exe's way that just doesn't show these
     * values.
     * (U.N. 2001-11-15)
     */
    envtop = GetEnvironmentStrings();
    for (env = envtop, num = 0; *env; env += strlen(env) + 1)
        if (*env != '=') num++;

    myenvtop = ALLOC_N(char*, num + 1);
    for (env = envtop, myenv = myenvtop; *env; env += strlen(env) + 1) {
        if (*env != '=') {
            *myenv = ALLOC_N(char, strlen(env) + 1);
            strcpy(*myenv, env);
            myenv++;
        }
    }
    *myenv = NULL;
    FreeEnvironmentStrings(envtop);

    return myenvtop;
}

void
rb_w32_free_environ(char **env)
{
    char **t = env;

    while (*t) free(*t++);
    free(env);
}

#undef getpid
rb_pid_t
rb_w32_getpid(void)
{
    rb_pid_t pid;

    pid = getpid();

    if (IsWin95()) pid = -pid;

    return pid;
}

int
rb_w32_fclose(FILE *fp)
{
    int fd = fileno(fp);
    SOCKET sock = TO_SOCKET(fd);

    if (fflush(fp)) return -1;
    if (!is_socket(sock)) {
        UnlockFile((HANDLE)sock, 0, 0, LK_LEN, LK_LEN);
        return fclose(fp);
    }
    _set_osfhnd(fd, (SOCKET)INVALID_HANDLE_VALUE);
    fclose(fp);
    if (closesocket(sock) == SOCKET_ERROR) {
        errno = map_errno(WSAGetLastError());
        return -1;
    }
    return 0;
}

int
rb_w32_close(int fd)
{
    SOCKET sock = TO_SOCKET(fd);

    if (!is_socket(sock)) {
        UnlockFile((HANDLE)sock, 0, 0, LK_LEN, LK_LEN);
        return _close(fd);
    }
    _set_osfhnd(fd, (SOCKET)INVALID_HANDLE_VALUE);
    _close(fd);
    if (closesocket(sock) == SOCKET_ERROR) {
        errno = map_errno(WSAGetLastError());
        return -1;
    }
    return 0;
}

static int
unixtime_to_filetime(time_t time, FILETIME *ft)
{
    struct tm *tm;
    SYSTEMTIME st;
    FILETIME lt;

    tm = localtime(&time);
    st.wYear = tm->tm_year + 1900;
    st.wMonth = tm->tm_mon + 1;
    st.wDayOfWeek = tm->tm_wday;
    st.wDay = tm->tm_mday;
    st.wHour = tm->tm_hour;
    st.wMinute = tm->tm_min;
    st.wSecond = tm->tm_sec;
    st.wMilliseconds = 0;
    if (!SystemTimeToFileTime(&st, &lt) ||
        !LocalFileTimeToFileTime(&lt, ft)) {
        errno = map_errno(GetLastError());
        return -1;
    }
    return 0;
}

int
rb_w32_utime(const char *path, const struct utimbuf *times)
{
    HANDLE hFile;
    SYSTEMTIME st;
    FILETIME atime, mtime;
    struct tm *tm;
    struct stat stat;
    int ret = 0;

    if (rb_w32_stat(path, &stat)) {
        return -1;
    }

    if (unixtime_to_filetime(times->actime, &atime)) {
        return -1;
    }
    if (unixtime_to_filetime(times->modtime, &mtime)) {
        return -1;
    }

    RUBY_CRITICAL({
        hFile = CreateFile(path, GENERIC_WRITE, 0, 0, OPEN_EXISTING,
                           IsWin95() ? 0 : FILE_FLAG_BACKUP_SEMANTICS, 0);
        if (hFile == INVALID_HANDLE_VALUE) {
            errno = map_errno(GetLastError());
            ret = -1;
        }
        else {
            if (!SetFileTime(hFile, NULL, &atime, &mtime)) {
                errno = map_errno(GetLastError());
                ret = -1;
            }
            CloseHandle(hFile);
        }
    });

    return ret;
}

int
rb_w32_vsnprintf(char *buf, size_t size, const char *format, va_list va)
{
    int ret = _vsnprintf(buf, size, format, va);
    if (size > 0) buf[size - 1] = 0;
    return ret;
}

int
rb_w32_snprintf(char *buf, size_t size, const char *format, ...)
{
    int ret;
    va_list va;

    va_start(va, format);
    ret = vsnprintf(buf, size, format, va);
    va_end(va);
    return ret;
}

int
rb_w32_mkdir(const char *path, int mode)
{
    int ret = -1;
    RUBY_CRITICAL(do {
        if (CreateDirectory(path, NULL) == FALSE) {
            errno = map_errno(GetLastError());
            break;
        }
        if (chmod(path, mode) == -1) {
            RemoveDirectory(path);
            break;
        }
        ret = 0;
    } while (0));
    return ret;
}

int
rb_w32_rmdir(const char *path)
{
    int ret = 0;
    RUBY_CRITICAL({
        const DWORD attr = GetFileAttributes(path);
        if (attr != (DWORD)-1 && (attr & FILE_ATTRIBUTE_READONLY)) {
            SetFileAttributes(path, attr & ~FILE_ATTRIBUTE_READONLY);
        }
        if (RemoveDirectory(path) == FALSE) {
            errno = map_errno(GetLastError());
            ret = -1;
            if (attr != (DWORD)-1 && (attr & FILE_ATTRIBUTE_READONLY)) {
                SetFileAttributes(path, attr);
            }
        }
    });
    return ret;
}

int
rb_w32_unlink(const char *path)
{
    int ret = 0;
    RUBY_CRITICAL({
        const DWORD attr = GetFileAttributes(path);
        if (attr != (DWORD)-1 && (attr & FILE_ATTRIBUTE_READONLY)) {
            SetFileAttributes(path, attr & ~FILE_ATTRIBUTE_READONLY);
        }
        if (DeleteFile(path) == FALSE) {
            errno = map_errno(GetLastError());
            ret = -1;
            if (attr != (DWORD)-1 && (attr & FILE_ATTRIBUTE_READONLY)) {
                SetFileAttributes(path, attr);
            }
        }
    });
    return ret;
}

#if !defined(__BORLANDC__) && !defined(_WIN32_WCE)
int
rb_w32_isatty(int fd)
{
    if (!(_osfile(fd) & FOPEN)) {
        errno = EBADF;
        return 0;
    }
    if (!(_osfile(fd) & FDEV)) {
        errno = ENOTTY;
        return 0;
    }
    return 1;
}
#endif

//
// Fix bcc32's stdio bug
//

#ifdef __BORLANDC__
static int
too_many_files(void)
{
    FILE *f;
    for (f = _streams; f < _streams + _nfile; f++) {
        if (f->fd < 0) return 0;
    }
    return 1;
}

#undef fopen
FILE *
rb_w32_fopen(const char *path, const char *mode)
{
    FILE *f = (errno = 0, fopen(path, mode));
    if (f == NULL && errno == 0) {
        if (too_many_files())
            errno = EMFILE;
    }
    return f;
}

FILE *
rb_w32_fdopen(int handle, const char *type)
{
    FILE *f = (errno = 0, _fdopen(handle, (char *)type));
    if (f == NULL && errno == 0) {
        if (handle < 0)
            errno = EBADF;
        else if (too_many_files())
            errno = EMFILE;
    }
    return f;
}

FILE *
rb_w32_fsopen(const char *path, const char *mode, int shflags)
{
    FILE *f = (errno = 0, _fsopen(path, mode, shflags));
    if (f == NULL && errno == 0) {
        if (too_many_files())
            errno = EMFILE;
    }
    return f;
}
#endif
/* [<][>][^] [v] [top][bottom][index] [help] */


win32/win32.h

root/win32/win32.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

#ifndef RUBY_WIN32_H
#define RUBY_WIN32_H

/*
 *  Copyright (c) 1993, Intergraph Corporation
 *
 *  You may distribute under the terms of either the GNU General Public
 *  License or the Artistic License, as specified in the perl README file.
 *
 */

//
// Definitions for NT port of Perl
//

//
// Ok now we can include the normal include files.
//

// #include <stdarg.h> conflict with varargs.h?
// There is function-name conflitct, so we rename it
#if !defined(WSAAPI)
#define OpenFile  WINAPI_OpenFile
#include <winsock2.h>
#undef OpenFile
#endif

#define NT 1                    /* deprecated */

#ifdef _WIN32_WCE
#undef CharNext
#define CharNext CharNextA
#endif

//
// We're not using Microsoft's "extensions" to C for
// Structured Exception Handling (SEH) so we can nuke these
//
#undef try
#undef except
#undef finally
#undef leave

#if defined(__cplusplus)
extern "C++" {
#endif

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <direct.h>
#include <process.h>
#include <time.h>
#include <math.h>
#include <signal.h>
#include <sys/stat.h>
#include <sys/types.h>
#ifdef HAVE_SYS_UTIME_H
# include <sys/utime.h>
#else
# include <utime.h>
#endif
#include <io.h>
#include <malloc.h>

#if defined(__cplusplus)
}
#endif

#ifdef _M_IX86
# define WIN95 1
#else
# undef  WIN95
#endif

#ifdef WIN95
extern DWORD rb_w32_osid(void);
#define rb_w32_iswinnt()  (rb_w32_osid() == VER_PLATFORM_WIN32_NT)
#define rb_w32_iswin95()  (rb_w32_osid() == VER_PLATFORM_WIN32_WINDOWS)
#else
#define rb_w32_iswinnt()  TRUE
#define rb_w32_iswin95()  FALSE
#endif

#define WNOHANG -1

#undef getc
#undef putc
#undef fgetc
#undef fputc
#undef getchar
#undef putchar
#undef fgetchar
#undef fputchar
#undef utime
#define getc(_stream)           rb_w32_getc(_stream)
#define getchar()               rb_w32_getc(stdin)
#define putc(_c, _stream)       rb_w32_putc(_c, _stream)
#define putchar(_c)             rb_w32_putc(_c, stdout)
#ifdef RUBY_EXPORT
#define fgetc(_stream)          getc(_stream)
#define fputc(_c, _stream)      putc(_c, _stream)
#define fgetchar()              getchar()
#define fputchar(_c)            putchar(_c)
#define utime(_p, _t)           rb_w32_utime(_p, _t)

#define pipe(p)                 _pipe(p, 2048L, O_BINARY)
#define close(h)                rb_w32_close(h)
#define fclose(f)               rb_w32_fclose(f)
#define getpid()                rb_w32_getpid()
#define sleep(x)                rb_w32_Sleep((x)*1000)
#define Sleep(msec)             (void)rb_w32_Sleep(msec)
#ifdef __BORLANDC__
#define creat(p, m)             _creat(p, m)
#define eof()                   _eof()
#define filelength(h)           _filelength(h)
#define mktemp(t)               _mktemp(t)
#define tell(h)                 _tell(h)
#define write(h, b, l)          _write(h, b, l)
#define _open                   _sopen
#define sopen                   _sopen
#undef fstat
#define fstat(fd,st)            rb_w32_fstat(fd,st)
#undef fopen
#define fopen(p, m)             rb_w32_fopen(p, m)
#undef fdopen
#define fdopen(h, m)            rb_w32_fdopen(h, m)
#undef fsopen
#define fsopen(p, m, sh)        rb_w32_fsopen(p, m, sh)
#endif

#undef stat
#define stat(path,st)           rb_w32_stat(path,st)
#undef execv
#define execv(path,argv)        rb_w32_aspawn(P_OVERLAY,path,argv)
#if !defined(__BORLANDC__) && !defined(_WIN32_WCE)
#undef isatty
#define isatty(h)               rb_w32_isatty(h)
#endif

#undef mkdir
#define mkdir(p, m)             rb_w32_mkdir(p, m)
#undef rmdir
#define rmdir(p)                rb_w32_rmdir(p)
#undef unlink
#define unlink(p)               rb_w32_unlink(p)
#endif

#define strcasecmp(s1, s2)      stricmp(s1, s2)
#define strncasecmp(s1, s2, n)  strnicmp(s1, s2, n)
#define fsync(h)                _commit(h)

#ifdef __MINGW32__
struct timezone {
  int tz_minuteswest;
  int tz_dsttime;
};
#endif
extern void   NtInitialize(int *, char ***);
extern int    rb_w32_cmdvector(const char *, char ***);
extern rb_pid_t  rb_w32_pipe_exec(const char *, const char *, int, int *);
extern int    flock(int fd, int oper);
extern int    rb_w32_is_socket(int);
extern int    WSAAPI rb_w32_accept(int, struct sockaddr *, int *);
extern int    WSAAPI rb_w32_bind(int, const struct sockaddr *, int);
extern int    WSAAPI rb_w32_connect(int, const struct sockaddr *, int);
extern void   rb_w32_fdset(int, fd_set*);
extern void   rb_w32_fdclr(int, fd_set*);
extern int    rb_w32_fdisset(int, fd_set*);
extern int    WSAAPI rb_w32_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
extern int    WSAAPI rb_w32_getpeername(int, struct sockaddr *, int *);
extern int    WSAAPI rb_w32_getsockname(int, struct sockaddr *, int *);
extern int    WSAAPI rb_w32_getsockopt(int, int, int, char *, int *);
extern int    WSAAPI rb_w32_ioctlsocket(int, long, u_long *);
extern int    WSAAPI rb_w32_listen(int, int);
extern int    WSAAPI rb_w32_recv(int, char *, int, int);
extern int    WSAAPI rb_w32_recvfrom(int, char *, int, int, struct sockaddr *, int *);
extern int    WSAAPI rb_w32_send(int, const char *, int, int);
extern int    WSAAPI rb_w32_sendto(int, const char *, int, int, const struct sockaddr *, int);
extern int    WSAAPI rb_w32_setsockopt(int, int, int, const char *, int);
extern int    WSAAPI rb_w32_shutdown(int, int);
extern int    WSAAPI rb_w32_socket(int, int, int);
extern SOCKET rb_w32_get_osfhandle(int);
extern struct hostent *WSAAPI rb_w32_gethostbyaddr(const char *, int, int);
extern struct hostent *WSAAPI rb_w32_gethostbyname(const char *);
extern int    WSAAPI rb_w32_gethostname(char *, int);
extern struct protoent *WSAAPI rb_w32_getprotobyname(const char *);
extern struct protoent *WSAAPI rb_w32_getprotobynumber(int);
extern struct servent  *WSAAPI rb_w32_getservbyname(const char *, const char *);
extern struct servent  *WSAAPI rb_w32_getservbyport(int, const char *);
extern int    rb_w32_socketpair(int, int, int, int *);
extern char * rb_w32_getenv(const char *);
extern int    rb_w32_rename(const char *, const char *);
extern char **rb_w32_get_environ(void);
extern void   rb_w32_free_environ(char **);

#define vsnprintf(s,n,f,l) rb_w32_vsnprintf(s,n,f,l)
#define snprintf   rb_w32_snprintf
extern int rb_w32_vsnprintf(char *, size_t, const char *, va_list);
extern int rb_w32_snprintf(char *, size_t, const char *, ...);

extern int chown(const char *, int, int);
extern int link(const char *, const char *);
extern int gettimeofday(struct timeval *, struct timezone *);
extern rb_pid_t waitpid (rb_pid_t, int *, int);
extern int rb_w32_argv_size(char *const *);
extern char *rb_w32_join_argv(char *, char *const *);
extern int rb_w32_spawn(int, const char *, const char*);
extern int rb_w32_aspawn(int, const char *, char *const *);
extern int kill(int, int);
extern int fcntl(int, int, ...);
extern rb_pid_t rb_w32_getpid(void);
#if !defined(__BORLANDC__) && !defined(_WIN32_WCE)
extern int rb_w32_isatty(int);
#endif
extern int rb_w32_mkdir(const char *, int);
extern int rb_w32_rmdir(const char *);
extern int rb_w32_unlink(const char *);
extern int rb_w32_stat(const char *, struct stat *);

#ifdef __BORLANDC__
extern int rb_w32_fstat(int, struct stat *);
extern FILE *rb_w32_fopen(const char *, const char *);
extern FILE *rb_w32_fdopen(int, const char *);
extern FILE *rb_w32_fsopen(const char *, const char *, int);
#endif

#include <float.h>
#if !defined __MINGW32__ || defined __NO_ISOCEXT
#ifndef isnan
#define isnan(x) _isnan(x)
#endif
#ifndef finite
#define finite(x) _finite(x)
#endif
#ifndef copysign
#define copysign(a, b) _copysign(a, b)
#endif
#ifndef scalb
#define scalb(a, b) _scalb(a, b)
#endif
#endif

#if !defined S_IFIFO && defined _S_IFIFO
#define S_IFIFO _S_IFIFO
#endif

#if 0 && defined __BORLANDC__
#undef S_ISDIR
#undef S_ISFIFO
#undef S_ISBLK
#undef S_ISCHR
#undef S_ISREG
#define S_ISDIR(m)  (((unsigned short)(m) & S_IFMT) == S_IFDIR)
#define S_ISFIFO(m) (((unsigned short)(m) & S_IFMT) == S_IFIFO)
#define S_ISBLK(m)  (((unsigned short)(m) & S_IFMT) == S_IFBLK)
#define S_ISCHR(m)  (((unsigned short)(m) & S_IFMT) == S_IFCHR)
#define S_ISREG(m)  (((unsigned short)(m) & S_IFMT) == S_IFREG)
#endif

#if !defined S_IRUSR && !defined __MINGW32__
#define S_IRUSR 0400
#endif
#ifndef S_IRGRP
#define S_IRGRP 0040
#endif
#ifndef S_IROTH
#define S_IROTH 0004
#endif

#if !defined S_IWUSR && !defined __MINGW32__
#define S_IWUSR 0200
#endif
#ifndef S_IWGRP
#define S_IWGRP 0020
#endif
#ifndef S_IWOTH
#define S_IWOTH 0002
#endif

#if !defined S_IXUSR && !defined __MINGW32__
#define S_IXUSR 0100
#endif
#ifndef S_IXGRP
#define S_IXGRP 0010
#endif
#ifndef S_IXOTH
#define S_IXOTH 0001
#endif

//
// define this so we can do inplace editing
//

#define SUFFIX

//
// stubs
//
extern int       ioctl (int, int, ...);
extern rb_uid_t  getuid (void);
extern rb_uid_t  geteuid (void);
extern rb_gid_t  getgid (void);
extern rb_gid_t  getegid (void);
extern int       setuid (rb_uid_t);
extern int       setgid (rb_gid_t);

extern char *rb_w32_strerror(int);

#ifdef RUBY_EXPORT
#define strerror(e) rb_w32_strerror(e)
#endif

#define PIPE_BUF 1024

#define LOCK_SH 1
#define LOCK_EX 2
#define LOCK_NB 4
#define LOCK_UN 8

#ifndef SIGINT
#define SIGINT 2
#endif
#ifndef SIGKILL
#define SIGKILL 9
#endif

/* #undef va_start */
/* #undef va_end */

/* winsock error map */
#define EWOULDBLOCK     WSAEWOULDBLOCK
#define EINPROGRESS     WSAEINPROGRESS
#define EALREADY        WSAEALREADY
#define ENOTSOCK        WSAENOTSOCK
#define EDESTADDRREQ    WSAEDESTADDRREQ
#define EMSGSIZE        WSAEMSGSIZE
#define EPROTOTYPE      WSAEPROTOTYPE
#define ENOPROTOOPT     WSAENOPROTOOPT
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
#define EOPNOTSUPP      WSAEOPNOTSUPP
#define EPFNOSUPPORT    WSAEPFNOSUPPORT
#define EAFNOSUPPORT    WSAEAFNOSUPPORT
#define EADDRINUSE      WSAEADDRINUSE
#define EADDRNOTAVAIL   WSAEADDRNOTAVAIL
#define ENETDOWN        WSAENETDOWN
#define ENETUNREACH     WSAENETUNREACH
#define ENETRESET       WSAENETRESET
#define ECONNABORTED    WSAECONNABORTED
#define ECONNRESET      WSAECONNRESET
#define ENOBUFS         WSAENOBUFS
#define EISCONN         WSAEISCONN
#define ENOTCONN        WSAENOTCONN
#define ESHUTDOWN       WSAESHUTDOWN
#define ETOOMANYREFS    WSAETOOMANYREFS
#define ETIMEDOUT       WSAETIMEDOUT
#define ECONNREFUSED    WSAECONNREFUSED
#define ELOOP           WSAELOOP
/*#define ENAMETOOLONG  WSAENAMETOOLONG*/
#define EHOSTDOWN       WSAEHOSTDOWN
#define EHOSTUNREACH    WSAEHOSTUNREACH
/*#define ENOTEMPTY     WSAENOTEMPTY*/
#define EPROCLIM        WSAEPROCLIM
#define EUSERS          WSAEUSERS
#define EDQUOT          WSAEDQUOT
#define ESTALE          WSAESTALE
#define EREMOTE         WSAEREMOTE

#define F_SETFL 1
#define O_NONBLOCK 1

#undef FD_SET
#define FD_SET(f, s)            rb_w32_fdset(f, s)

#undef FD_CLR
#define FD_CLR(f, s)            rb_w32_fdclr(f, s)

#undef FD_ISSET
#define FD_ISSET(f, s)          rb_w32_fdisset(f, s)

#ifdef RUBY_EXPORT
#undef accept
#define accept(s, a, l)         rb_w32_accept(s, a, l)

#undef bind
#define bind(s, a, l)           rb_w32_bind(s, a, l)

#undef connect
#define connect(s, a, l)        rb_w32_connect(s, a, l)

#undef select
#define select(n, r, w, e, t)   rb_w32_select(n, r, w, e, t)

#undef getpeername
#define getpeername(s, a, l)    rb_w32_getpeername(s, a, l)

#undef getsockname
#define getsockname(s, a, l)    rb_w32_getsockname(s, a, l)

#undef getsockopt
#define getsockopt(s, v, n, o, l) rb_w32_getsockopt(s, v, n, o, l)

#undef ioctlsocket
#define ioctlsocket(s, c, a)    rb_w32_ioctlsocket(s, c, a)

#undef listen
#define listen(s, b)            rb_w32_listen(s, b)

#undef recv
#define recv(s, b, l, f)        rb_w32_recv(s, b, l, f)

#undef recvfrom
#define recvfrom(s, b, l, f, fr, frl) rb_w32_recvfrom(s, b, l, f, fr, frl)

#undef send
#define send(s, b, l, f)        rb_w32_send(s, b, l, f)

#undef sendto
#define sendto(s, b, l, f, t, tl) rb_w32_sendto(s, b, l, f, t, tl)

#undef setsockopt
#define setsockopt(s, v, n, o, l) rb_w32_setsockopt(s, v, n, o, l)

#undef shutdown
#define shutdown(s, h)          rb_w32_shutdown(s, h)

#undef socket
#define socket(s, t, p)         rb_w32_socket(s, t, p)

#undef gethostbyaddr
#define gethostbyaddr(a, l, t)  rb_w32_gethostbyaddr(a, l, t)

#undef gethostbyname
#define gethostbyname(n)        rb_w32_gethostbyname(n)

#undef gethostname
#define gethostname(n, l)       rb_w32_gethostname(n, l)

#undef getprotobyname
#define getprotobyname(n)       rb_w32_getprotobyname(n)

#undef getprotobynumber
#define getprotobynumber(n)     rb_w32_getprotobynumber(n)

#undef getservbyname
#define getservbyname(n, p)     rb_w32_getservbyname(n, p)

#undef getservbyport
#define getservbyport(p, pr)    rb_w32_getservbyport(p, pr)

#undef socketpair
#define socketpair(a, t, p, s)  rb_w32_socketpair(a, t, p, s)

#undef get_osfhandle
#define get_osfhandle(h)        rb_w32_get_osfhandle(h)

#undef getcwd
#define getcwd(b, s)            rb_w32_getcwd(b, s)

#undef getenv
#define getenv(n)               rb_w32_getenv(n)

#undef rename
#define rename(o, n)            rb_w32_rename(o, n)

#undef times
#define times(t)                rb_w32_times(t)
#endif

struct tms {
        long    tms_utime;
        long    tms_stime;
        long    tms_cutime;
        long    tms_cstime;
};

int rb_w32_times(struct tms *);

/* thread stuff */
HANDLE GetCurrentThreadHandle(void);
int  rb_w32_main_context(int arg, void (*handler)(int));
int  rb_w32_sleep(unsigned long msec);
void rb_w32_enter_critical(void);
void rb_w32_leave_critical(void);
int  rb_w32_putc(int, FILE*);
int  rb_w32_getc(FILE*);
int  rb_w32_close(int);
int  rb_w32_fclose(FILE*);
int  rb_w32_utime(const char *, const struct utimbuf *);
int  WINAPI rb_w32_Sleep(unsigned long msec);

/*
== ***CAUTION***
Since this function is very dangerous, ((*NEVER*))
* lock any HANDLEs(i.e. Mutex, Semaphore, CriticalSection and so on) or,
* use anything like TRAP_BEG...TRAP_END block structure,
in asynchronous_func_t.
*/
typedef DWORD (*asynchronous_func_t)(DWORD self, int argc, DWORD* argv);
DWORD rb_w32_asynchronize(asynchronous_func_t func, DWORD self, int argc, DWORD* argv, DWORD intrval);

#endif
/* [<][>][^][v][top][bottom][index] [help] */


win32/winmain.c

root/win32/winmain.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. WinMain
#include <windows.h>
#include <stdio.h>

extern int main(int, char**, char**);

int WINAPI
WinMain(HINSTANCE current, HINSTANCE prev, LPSTR cmdline, int showcmd)
{
    return main(0, NULL, NULL);
}
/* [<][>][^][v] [top][bottom][index] [help] */


wince/assert.c

root/wince/assert.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. assert
#include <windows.h>
#include <tchar.h>
#include "assert.h"

void assert( int expression )
{
        if( expression==0 )
                exit(2);
}
/* [<][>][^][v] [top][bottom][index] [help] */


wince/assert.h

root/wince/assert.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

#ifndef _ASSERT_H_
#define _ASSERT_H_

void assert( int expression );

#endif
/* [<][>][^][v][top][bottom][index] [help] */


wince/direct.c

root/wince/direct.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. getcwd
  2. _chdir
  3. _rmdir
  4. _mkdir
/***************************************************************
  direct.c
***************************************************************/

#include <windows.h>
#include <tchar.h>
#include <direct.h>
#include "wince.h" /* for wce_mbtowc */

/* global for chdir, getcwd */
char _currentdir[MAX_PATH+1];

char *getcwd(char* buffer, int maxlen)
{
        strcpy( buffer, _currentdir );
        return buffer;
}

int _chdir(const char * dirname)
{
        if( MAX_PATH < strlen(dirname) )
                return -1;

        strcpy( _currentdir, dirname );
        return 0;
}

int _rmdir(const char * dir)
{
        wchar_t *wdir;
        BOOL rc;

        /* replace with RemoveDirectory. */
        wdir = wce_mbtowc(dir);
        rc = RemoveDirectoryW(wdir);
        free(wdir);

        return rc==TRUE ? 0 : -1;
}

int _mkdir(const char * dir)
{
        wchar_t* wdir;
        BOOL rc;

        /* replace with CreateDirectory. */
        wdir = wce_mbtowc(dir);
        rc = CreateDirectoryW(wdir, NULL);
        free(wdir);

        return rc==TRUE ? 0 : -1;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


wince/direct.h

root/wince/direct.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

#ifndef DIRECT_H
#define DIRECT_H 1

#ifdef __cplusplus
extern "C" {
#endif

char *getcwd(char* buffer, int maxlen);
int _chdir(const char * dirname);
int _rmdir(const char * dir);
int _mkdir(const char * dir);

#ifdef __cplusplus
};
#endif

#define chdir      _chdir
#define rmdir      _rmdir
#define mkdir      _mkdir

#endif
/* [<][>][^][v][top][bottom][index] [help] */


wince/errno.c

root/wince/errno.c

/* [<][>][^][v][top][bottom] [index] [help] */
/***************************************************************
  errno.c
***************************************************************/

#include <errno.h>

int errno;
int _doserrno;
int _sys_nerr;
/* [<][>][^][v][top][bottom][index] [help] */


wince/errno.h

root/wince/errno.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

#ifndef ERRNO_H
#define ERRNO_H 1

#define EPERM           1
#define ENOENT          2
#define ESRCH           3
#define EINTR           4
#define EIO             5
#define ENXIO           6
#define E2BIG           7
#define ENOEXEC         8
#define EBADF           9
#define ECHILD          10
#define EAGAIN          11
#define ENOMEM          12
#define EACCES          13
#define EFAULT          14
#define EOSERR          15 // rk
#define EBUSY           16
#define EEXIST          17
#define EXDEV           18
#define ENODEV          19
#define ENOTDIR         20
#define EISDIR          21
#define EINVAL          22
#define ENFILE          23
#define EMFILE          24
#define ENOTTY          25
#define EFBIG           27
#define ENOSPC          28
#define ESPIPE          29
#define EROFS           30
#define EMLINK          31
#define EPIPE           32
#define EDOM            33
#define ERANGE          34
#define EDEADLK         36
#define ENOSYS          37

#ifdef __cplusplus
extern "C" {
#endif

extern int errno;
extern int _doserrno;
extern int _sys_nerr;

#define sys_nerr _sys_nerr

#ifdef __cplusplus
};
#endif

#endif
/* [<][>][^][v][top][bottom][index] [help] */


wince/fcntl.h

root/wince/fcntl.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

#ifndef FCNTL_H
#define FCNTL_H 1

#define F_SETFL         1
#define F_SETFD         2
#define F_GETFL         3

#define _O_RDONLY       0x0000  /* open for reading only */
#define _O_WRONLY       0x0001  /* open for writing only */
#define _O_RDWR         0x0002  /* open for reading and writing */

#define _O_NONBLOCK     0x0004

#define _O_APPEND       0x0008  /* writes done at eof */
#define _O_CREAT        0x0100  /* create and open file */
#define _O_TRUNC        0x0200  /* open and truncate */
#define _O_EXCL         0x0400  /* open only if file doesn't already exist */
#define _O_TEXT         0x4000  /* file mode is text (translated) */
#define _O_BINARY       0x8000  /* file mode is binary (untranslated) */
#define _O_ACCMODE      0x10000

#define _O_NOINHERIT    0
#define O_NOINHERIT     _O_NOINHERIT

#define O_RDONLY        _O_RDONLY
#define O_WRONLY        _O_WRONLY
#define O_RDWR          _O_RDWR

#define O_NONBLOCK      _O_NONBLOCK

#define O_APPEND        _O_APPEND
#define O_CREAT         _O_CREAT
#define O_TRUNC         _O_TRUNC
#define O_EXCL          _O_EXCL
#define O_TEXT          _O_TEXT
#define O_BINARY        _O_BINARY
#define O_ACCMODE       _O_ACCMODE

#endif
/* [<][>][^][v][top][bottom][index] [help] */


wince/io.h

root/wince/io.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

#ifndef _IO_WINCE_H_
#define _IO_WINCE_H_

#ifndef _TIME_T_DEFINED
typedef unsigned long time_t;
#define _TIME_T_DEFINED
#endif

#ifndef _FSIZE_T_DEFINED
typedef unsigned long _fsize_t; /* Could be 64 bits for Win32 */
#define _FSIZE_T_DEFINED
#endif

#ifndef _FINDDATA_T_DEFINED
struct _finddata_t {
        unsigned    attrib;
        time_t      time_create;    /* -1 for FAT file systems */
        time_t      time_access;    /* -1 for FAT file systems */
        time_t      time_write;
        _fsize_t    size;
        char        name[260];
};
#define _FINDDATA_T_DEFINED
#endif

#ifdef __cplusplus
extern "C" {
#endif

int _chsize(int handle, long size);
int _rename (const char *oldname, const char *newname);
int _unlink(const char *file);
int _umask(int cmask);
int _chmod(const char *path, int mode);
int dup( int handle );
//int dup2( int handle1, int handle2 );
int _isatty(int fd);
int _pipe(int *phandles, unsigned int psize, int textmode);
int _access(const char *filename, int flags);
int _open_osfhandle ( long osfhandle, int flags);
long _get_osfhandle( int filehandle );
int _open(const char *file, int mode,...);
int close(int fd);
int _read(int fd, void *buffer, int length);
int _write(int fd, const void *buffer, unsigned count);
long _lseek(int handle, long offset, int origin);
long _findfirst( char *filespec, struct _finddata_t *fileinfo );
int _findnext( long handle, struct _finddata_t *fileinfo );
int _findclose( long handle );

#ifdef __cplusplus
};
#endif

#define chmod      _chmod
#define chsize     _chsize
#define rename     _rename
#define unlink     _unlink
#define open       _open
//#define close    _close
#define read       _read
#define write      _write
#define umask      _umask
//#define dup        _dup
#define isatty     _isatty
#define access     _access
#define pipe       _pipe
#define setmode    _setmode
#define lseek      _lseek

#define _close     close

#endif
/* [<][>][^][v][top][bottom][index] [help] */


wince/io_wce.c

root/wince/io_wce.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. _rename
  2. _unlink
  3. _open
  4. close
  5. _read
  6. _write
  7. _lseek
  8. _findfirst
  9. _findnext
  10. _findclose
  11. _chsize
  12. _umask
  13. _chmod
  14. dup
  15. _isatty
  16. _pipe
  17. _access
  18. _open_osfhandle
  19. _get_osfhandle
/***************************************************************
  io.c

  author : uema2
  date   : Nov 30, 2002

  You can freely use, copy, modify, and redistribute
  the whole contents.
***************************************************************/

#include <windows.h>
#include <stdlib.h>
#include <io.h>
#include <fcntl.h>
#include <time.h>
#include <errno.h>
#include "wince.h" /* for wce_mbtowc */

extern int _errno;

int _rename(const char *oldname, const char *newname)
{
        wchar_t *wold, *wnew;
        BOOL rc;

        wold = wce_mbtowc(oldname);
        wnew = wce_mbtowc(newname);

        /* replace with MoveFile. */
        rc = MoveFileW(wold, wnew);

        free(wold);
        free(wnew);

        return rc==TRUE ? 0 : -1;
}

int _unlink(const char *file)
{
        wchar_t *wfile;
        BOOL rc;

        /* replace with DeleteFile. */
        wfile = wce_mbtowc(file);
        rc = DeleteFileW(wfile);
        free(wfile);

        return rc==TRUE ? 0 : -1;
}

/* replace "open" with "CreateFile", etc. */
int _open(const char *file, int mode, va_list arg)
{
        wchar_t *wfile;
        DWORD access=0, share=0, create=0;
        HANDLE h;

        if( (mode&_O_RDWR) != 0 )
                access = GENERIC_READ|GENERIC_WRITE;
        else if( (mode&_O_RDONLY) != 0 )
                access = GENERIC_READ;
        else if( (mode&_O_WRONLY) != 0 )
                access = GENERIC_WRITE;

        if( (mode&_O_CREAT) != 0 )
                create = CREATE_ALWAYS;
        else
                create = OPEN_ALWAYS;

        wfile = wce_mbtowc(file);

        h = CreateFileW(wfile, access, share, NULL,
                        create, 0, NULL );

        free(wfile);
        return (int)h;
}

int close(int fd)
{
        CloseHandle( (HANDLE)fd );
        return 0;
}

int _read(int fd, void *buffer, int length)
{
        DWORD dw;
        ReadFile( (HANDLE)fd, buffer, length, &dw, NULL );
        return (int)dw;
}

int _write(int fd, const void *buffer, unsigned count)
{
        DWORD dw;
        WriteFile( (HANDLE)fd, buffer, count, &dw, NULL );
        return (int)dw;
}

long _lseek(int handle, long offset, int origin)
{
        DWORD flag, ret;

        switch(origin)
        {
        case SEEK_SET: flag = FILE_BEGIN;   break;
        case SEEK_CUR: flag = FILE_CURRENT; break;
        case SEEK_END: flag = FILE_END;     break;
        default:       flag = FILE_CURRENT; break;
        }

        ret = SetFilePointer( (HANDLE)handle, offset, NULL, flag );
        return ret==0xFFFFFFFF ? -1 : 0;
}

/* _findfirst, _findnext, _findclose. */
/* replace them with FindFirstFile, etc. */
long _findfirst( char *file, struct _finddata_t *fi )
{
        HANDLE h;
        WIN32_FIND_DATAA fda;

        h = FindFirstFileA( file, &fda );
        if( h==NULL )
        {
                errno = EINVAL; return -1;
        }

        fi->attrib      = fda.dwFileAttributes;
        fi->time_create = wce_FILETIME2time_t( &fda.ftCreationTime );
        fi->time_access = wce_FILETIME2time_t( &fda.ftLastAccessTime );
        fi->time_write  = wce_FILETIME2time_t( &fda.ftLastWriteTime );
        fi->size        = fda.nFileSizeLow + (fda.nFileSizeHigh<<32);
        strcpy( fi->name, fda.cFileName );

        return (long)h;
}

int _findnext( long handle, struct _finddata_t *fi )
{
        WIN32_FIND_DATAA fda;
        BOOL b;

        b = FindNextFileA( (HANDLE)handle, &fda );

        if( b==FALSE )
        {
                errno = ENOENT; return -1;
        }

        fi->attrib      = fda.dwFileAttributes;
        fi->time_create = wce_FILETIME2time_t( &fda.ftCreationTime );
        fi->time_access = wce_FILETIME2time_t( &fda.ftLastAccessTime );
        fi->time_write  = wce_FILETIME2time_t( &fda.ftLastWriteTime );
        fi->size        = fda.nFileSizeLow + (fda.nFileSizeHigh<<32);
        strcpy( fi->name, fda.cFileName );

        return 0;
}

int _findclose( long handle )
{
        BOOL b;
        b = FindClose( (HANDLE)handle );
        return b==FALSE ? -1 : 0;
}

/* below functions unsupported... */
/* I have no idea how to replace... */
int _chsize(int handle, long size)
{
        errno = EACCES;
        return -1;
}

int _umask(int cmask)
{
        return 0;
}

int _chmod(const char *path, int mode)
{
        return 0;
}

/* WinCE doesn't have dup and dup2.  */
/* so, we cannot use missing/dup2.c. */
int dup( int handle )
{
        errno = EBADF;
        return -1;
}
/*
int dup2( int handle1, int handle2 )
{
        errno = EBADF;
        return -1;
}
*/
int _isatty(int fd)
{
        if( fd==(int)_fileno(stdin) ||
                fd==(int)_fileno(stdout)||
                fd==(int)_fileno(stderr) )
                return 1;
        else
                return 0;
}

int _pipe(int *phandles, unsigned int psize, int textmode)
{
        return -1;
}

int _access(const char *filename, int flags)
{
        return 0;
}

int _open_osfhandle( long osfhandle, int flags)
{
/*      return 0; */
        return (int)osfhandle;
}

long _get_osfhandle( int filehandle )
{
/*      return 0; */
        return (long)filehandle;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


wince/process.h

root/wince/process.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

#ifndef PROCESS_H
#define PROCESS_H 1

#define _P_WAIT         0
#define _P_NOWAIT       1
#define _P_OVERLAY      2
#define _P_DETACH       4

#define P_WAIT          _P_WAIT
#define P_NOWAIT        _P_NOWAIT
#define P_DETACH        _P_DETACH
#define P_OVERLAY       _P_OVERLAY

#ifndef _INTPTR_T_DEFINED
typedef int            intptr_t;
#define _INTPTR_T_DEFINED
#endif

#ifdef __cplusplus
extern "C" {
#endif

int _getpid(void);

int _cwait(int *, int, int);
void abort(void);

int _execl(const char *, const char *, ...);
//int _execv(const char *, const char * const *);
int execv(const char *path, char *const argv[]);

intptr_t _spawnle(int, const char *, const char *, ...);
intptr_t _spawnvpe(int, const char *, const char * const *,
              const char * const *);

#ifdef __cplusplus
};
#endif

//#define getpid           _getpid
#define execl      _execl
#define execv      _execv

#endif
/* [<][>][^][v][top][bottom][index] [help] */


wince/process_wce.c

root/wince/process_wce.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. _getpid
  2. _execl
  3. execv
  4. abort
  5. _cwait
  6. _spawnle
  7. _spawnvpe
/***************************************************************
  process.c
***************************************************************/

#include <windows.h>
#include "process.h"

int _getpid(void)
{
        return (int)GetCurrentProcessId();
}

/* I wonder _exec and _swawn should be replaced with CreateProcess... */
int _execl(const char *cmdname, const char *arg0,
                   va_list va_args)
{
        return 0;
}

int execv(const char *path, char *const argv[])
{
        return 0;
}

void abort(void)
{
}

int _cwait( int *termstat, int procHandle, int action )
{
        return 0;
}

intptr_t _spawnle(int mode,
        const char *cmdname, const char *arg0,
        va_list va_argn)
{
        return 0;
}

intptr_t _spawnvpe(int mode,
        const char *cmdname, const char *const *argv,
        const char *const *envp)
{
        return 0;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


wince/signal.h

root/wince/signal.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

#ifndef SIGNAL_H
#define SIGNAL_H 1

#include <sys/types.h>

#define SIGHUP          1
#define SIGINT      2
#define SIGQUIT         3
#define SIGILL      4
#define SIGPIPE     5
#define SIGFPE      8
#define SIGUSR1         10
#define SIGSEGV     11
#define SIGUSR2         12
#define SIGTERM     15
#define SIGCHLD         17
#define SIGTSTP         20
#define SIGBREAK    21
#define SIGABRT     22
#define NSIG        22

#define SA_NOCLDSTOP    1
#define SA_SHIRQ        0x04000000
#define SA_STACK        0x08000000
#define SA_RESTART      0x10000000
#define SA_INTERRUPT    0x20000000
#define SA_NOMASK       0x40000000
#define SA_ONESHOT      0x80000000

/* signal action codes */

#define SIG_DFL (void (*)(int))0           /* default signal action */
#define SIG_IGN (void (*)(int))1           /* ignore signal */
#define SIG_SGE (void (*)(int))3           /* signal gets error */
#define SIG_ACK (void (*)(int))4           /* acknowledge */
#define SIG_ERR (void (*)(int))-1          /* signal error value */

#define SIG_BLOCK          0    /* for blocking signals */
#define SIG_UNBLOCK        1    /* for unblocking signals */
#define SIG_SETMASK        2    /* for setting the signal mask */

#ifdef __cplusplus
extern "C" {
#endif

typedef void (* SIGHANDLER)(int);
typedef void (* sighandler_t)(int);

typedef int sig_atomic_t;
typedef unsigned int sigset_t;

struct sigaction{
        sighandler_t sa_handler;
        sigset_t sa_mask;
        unsigned long sa_flags;
        void (*sa_restorer)(void);
};

int raise(int sig);
//#ifndef _WIN32_WCE_EMULATION
  void (* signal(int sig, void (__cdecl *func)(int)))(int);
//#else
//  void (* signal(int sig, void (*func)));
//#endif

#ifdef __cplusplus
};
#endif

#endif
/* [<][>][^][v][top][bottom][index] [help] */


wince/signal_wce.c

root/wince/signal_wce.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. raise
  2. signal
/***************************************************************
  signal.c
***************************************************************/

#include <windows.h>
#include "signal.h"

/* lazy replacement... (^^; */
int raise(int sig)
{
        return 0;
}

//#ifdef _WIN32_WCE
//#ifdef _WIN32_WCE_EMULATION
//void (* signal(int sig, void (*func)))
//{
//      return sig;
//}
//#else
void (* signal(int sig, void (__cdecl *func)(int)))(int)
{
        return sig;
}
//#endif
//#endif
/* [<][>][^] [v] [top][bottom][index] [help] */


wince/stddef.h

root/wince/stddef.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

#ifndef _STDDEF_H_
#define _STDDEF_H_

#endif
/* [<][>][^][v][top][bottom][index] [help] */


wince/stdio.c

root/wince/stdio.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. freopen
  2. fdopen
/***************************************************************
  stdio.c
***************************************************************/

#include <windows.h>
#include "wince.h" /* for wce_mbtowc */

FILE *freopen(const char *filename, const char *mode, FILE *file)
{
        wchar_t *wfilename, *wmode;
        FILE *fp;

        wfilename = wce_mbtowc(filename);
        wmode     = wce_mbtowc(mode);

        fp = _wfreopen(wfilename, wmode, file);

        free(wfilename);
        free(wmode);

        return fp;
}

FILE *fdopen( int handle, const char *mode )
{
        wchar_t *wmode;
        FILE* fp;

        wmode = wce_mbtowc(mode);
        fp = _wfdopen( (void*)handle, wmode );

        free(wmode);
        return fp;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


wince/stdlib.c

root/wince/stdlib.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. getenv
  2. _fullpath
  3. mblen
  4. bsearch
/***************************************************************
  stdlib.c
***************************************************************/

#include <windows.h>

char **environ;
extern char * rb_w32_getenv(const char *);

/* getenv should replace with rb_w32_getenv. */
char *getenv(const char *env)
{
        return rb_w32_getenv(env);
}

char *_fullpath(char *absPath, const char *relPath,
                                size_t maxLength)
{
        strcpy( absPath, relPath );
        return absPath;
}

int mblen(const char *mbstr, size_t count)
{
        const char *p = mbstr;
        size_t i;
        int    n=0;

        for( i=0; i<count; i++ )
        {
                if( *p=='\0' ) break;
                if( IsDBCSLeadByteEx( CP_ACP, *p ) )
                        n+=2, p+=2;
                else
                        n+=1, p+=1;
        }

        return n;
}

void *bsearch( const void *key, const void *base,
                           size_t num, size_t width,
                           int ( __cdecl *compare )(const void *, const void *))
{
        size_t i;
        const void* p = base;
        const char* px;

        for( i=0; i<num; i++ )
        {
                if( 0==compare( key, p ) )
                        return (void*)p;
                px = (const char*)p; px+=width; p=(const void*)px;
        }
        return NULL;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


wince/string_wce.c

root/wince/string_wce.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. strdup
  2. strerror
  3. strnicmp
  4. strrchr
  5. stricmp
  6. strpbrk
/***************************************************************
  string.c
***************************************************************/

#include <windows.h>
#include "wince.h" /* for wce_mbtowc */

/* _strdup already exists in stdlib.h? */
char *strdup(const char * str)
{
        char *p;

        p = malloc( strlen(str)+1 );
        strcpy( p, str );
        return p;
}

char* strerror(int errno)
{
        static char buf[32]="wince::strerror called.";
        return buf;
}

/* strnicmp already exists in stdlib.h? */
int strnicmp( const char *s1, const char *s2, size_t count )
{
        wchar_t *w1, *w2;
        int n;

        w1 = wce_mbtowc(s1);
        w2 = wce_mbtowc(s2);

        n = wcsnicmp(w1, w2, count);

        free(w1);
        free(w2);

        return n;
}

#if _WIN32_WCE < 300
#include "..\missing\strtoul.c"

char *strrchr( const char *p, int c )
{
        char *pp;
        for( pp=(char*)p+strlen(p); pp!=p; pp-- )
        {
                if( *pp==c ) break;
        }
        return pp==p ? NULL : pp;
}

int stricmp( const char *s1, const char *s2 )
{
        wchar_t *w1, *w2;
        int n;

        w1 = wce_mbtowc(s1);
        w2 = wce_mbtowc(s2);

        n = wcsicmp(w1, w2);

        free(w1);
        free(w2);

        return n;
}

char *strpbrk(const char *str, const char *cs)
{
        wchar_t *wstr, *wcs, *w;
        char *s = NULL;

        wstr = wce_mbtowc(str);
        wcs  = wce_mbtowc(cs);

        w = wcspbrk(wstr, wcs);

        if( w!=NULL )
                s = str + (wcs-wstr)/sizeof(wchar_t);

        free(wstr);
        free(wcs);

        return s;
}

#endif
/* [<][>][^] [v] [top][bottom][index] [help] */


wince/time.h

root/wince/time.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

DEFINITIONS

This source file includes following definitions.
  1. transitionTime
#ifndef _TIME_WINCE_H
#define _TIME_WINCE_H 1

#include <winbase.h>
#include <sys/types.h>

#ifdef __cplusplus
extern "C" {
#endif

extern int daylight;
extern int _timezone, timezone;
extern char *tzname[2];

#if 0
#define _DAY_SEC           (24L * 60L * 60L)    /* secs in a day */
#define _YEAR_SEC          (365L * _DAY_SEC)    /* secs in a year */
#define _FOUR_YEAR_SEC     (1461L * _DAY_SEC)   /* secs in a 4 year interval */
#define _DEC_SEC           315532800L           /* secs in 1970-1979 */
#define _BASE_YEAR         70L                  /* 1970 is the base year */
#define _BASE_DOW          4                    /* 01-01-70 was a Thursday */
#define _LEAP_YEAR_ADJUST  17L                  /* Leap years 1900 - 1970 */
#define _MAX_YEAR          138L                 /* 2038 is the max year */
#endif

#ifndef _TM_DEFINED
struct tm {
  int tm_sec;     /* seconds after the minute - [0,59] */
  int tm_min;     /* minutes after the hour - [0,59] */
  int tm_hour;    /* hours since midnight - [0,23] */
  int tm_mday;    /* day of the month - [1,31] */
  int tm_mon;     /* months since January - [0,11] */
  int tm_year;    /* years since 1900 */
  int tm_wday;    /* days since Sunday - [0,6] */
  int tm_yday;    /* days since January 1 - [0,365] */
  int tm_isdst;   /* daylight savings time flag */
};
#define _TM_DEFINED
#endif

typedef struct {
                int  yr;        // year of interest
                int  yd;        // day of year
                long ms;        // milli-seconds in the day
} transitionTime;

time_t mktime(struct tm* pt);
time_t time( time_t *timer );
struct tm *localtime(const time_t *ptime);
struct tm *gmtime(const time_t *tod);
char* ctime( const time_t *t );
char* asctime(const struct tm *tptr);
void tzset();
int clock(void);
time_t wce_FILETIME2time_t(const FILETIME* pf);

#ifdef __cplusplus
};
#endif

#endif
/* [<][>][^][v] [top][bottom][index] [help] */


wince/time_wce.c

root/wince/time_wce.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. wce_FILETIME2int64
  2. wce_int642FILETIME
  3. wce_getFILETIMEFromYear
  4. wce_getYdayFromSYSTEMTIME
  5. wce_tm2SYSTEMTIME
  6. wce_SYSTEMTIME2tm
  7. wce_FILETIME2time_t
  8. wce_time_t2FILETIME
  9. time
  10. localtime
  11. mktime
  12. gmtime
  13. ctime
  14. asctime
  15. tzset
  16. clock
  17. main
/***************************************************************
  time.c

  author : uema2
  date   : Nov 30, 2002

  You can freely use, copy, modify, and redistribute
  the whole contents.
***************************************************************/

/*#define __SCRATCH_TIMEC_DEBUG__ */

#include <windows.h>
#include <tchar.h>
#include <time.h>

/* globals */
const __int64 _onesec_in100ns = (__int64)10000000;
int   timezone, _timezone, altzone;
int   daylight;
char *tzname[2];

/* __int64 <--> FILETIME */
static __int64 wce_FILETIME2int64(FILETIME f)
{
        __int64 t;

        t = f.dwHighDateTime;
        t <<= 32;
        t |= f.dwLowDateTime;
        return t;
}

static FILETIME wce_int642FILETIME(__int64 t)
{
        FILETIME f;

        f.dwHighDateTime = (DWORD)((t >> 32) & 0x00000000FFFFFFFF);
        f.dwLowDateTime  = (DWORD)( t        & 0x00000000FFFFFFFF);
        return f;
}

/* FILETIME utility */
static FILETIME wce_getFILETIMEFromYear(WORD year)
{
        SYSTEMTIME s={0};
        FILETIME f;

        s.wYear      = year;
        s.wMonth     = 1;
        s.wDayOfWeek = 1;
        s.wDay       = 1;

        SystemTimeToFileTime( &s, &f );
        return f;
}

static time_t wce_getYdayFromSYSTEMTIME(const SYSTEMTIME* s)
{
        __int64 t;
        FILETIME f1, f2;

        f1 = wce_getFILETIMEFromYear( s->wYear );
        SystemTimeToFileTime( s, &f2 );

        t = wce_FILETIME2int64(f2)-wce_FILETIME2int64(f1);

        return (time_t)((t/_onesec_in100ns)/(60*60*24));
}

/* tm <--> SYSTEMTIME */
static SYSTEMTIME wce_tm2SYSTEMTIME(struct tm *t)
{
        SYSTEMTIME s;

        s.wYear      = t->tm_year + 1900;
        s.wMonth     = t->tm_mon  + 1;
        s.wDayOfWeek = t->tm_wday;
        s.wDay       = t->tm_mday;
        s.wHour      = t->tm_hour;
        s.wMinute    = t->tm_min;
        s.wSecond    = t->tm_sec;
        s.wMilliseconds = 0;

        return s;
}

static struct tm wce_SYSTEMTIME2tm(SYSTEMTIME *s)
{
        struct tm t;

        t.tm_year  = s->wYear - 1900;
        t.tm_mon   = s->wMonth- 1;
        t.tm_wday  = s->wDayOfWeek;
        t.tm_mday  = s->wDay;
        t.tm_yday  = wce_getYdayFromSYSTEMTIME(s);
        t.tm_hour  = s->wHour;
        t.tm_min   = s->wMinute;
        t.tm_sec   = s->wSecond;
        t.tm_isdst = 0;

        return t;
}

/* FILETIME <--> time_t */
time_t wce_FILETIME2time_t(const FILETIME* f)
{
        FILETIME f1601, f1970;
        __int64 t, offset;

        f1601 = wce_getFILETIMEFromYear(1601);
        f1970 = wce_getFILETIMEFromYear(1970);

        offset = wce_FILETIME2int64(f1970) - wce_FILETIME2int64(f1601);

        t = wce_FILETIME2int64(*f);

        t -= offset;
        return (time_t)(t / _onesec_in100ns);
}

FILETIME wce_time_t2FILETIME(const time_t t)
{
        FILETIME f, f1970;
        __int64 time;

        f1970 = wce_getFILETIMEFromYear(1970);

        time = t;
        time *= _onesec_in100ns;
        time += wce_FILETIME2int64(f1970);

        f = wce_int642FILETIME(time);

        return f;
}

/* time.h difinition */
time_t time( time_t *timer )
{
        SYSTEMTIME s;
        FILETIME   f;

        if( timer==NULL ) return 0;

        GetSystemTime( &s );

        SystemTimeToFileTime( &s, &f );

        *timer = wce_FILETIME2time_t(&f);
        return *timer;
}

struct tm *localtime( const time_t *timer )
{
        SYSTEMTIME ss, ls, s;
        FILETIME   sf, lf, f;
        __int64 t, diff;
        static struct tm tms;

        GetSystemTime(&ss);
        GetLocalTime(&ls);

        SystemTimeToFileTime( &ss, &sf );
        SystemTimeToFileTime( &ls, &lf );

        diff = wce_FILETIME2int64(sf) - wce_FILETIME2int64(lf);

        f = wce_time_t2FILETIME(*timer);
        t = wce_FILETIME2int64(f) - diff;
        f = wce_int642FILETIME(t);

        FileTimeToSystemTime( &f, &s );

        tms = wce_SYSTEMTIME2tm(&s);

        return &tms;
}

time_t mktime(struct tm* pt)
{
        SYSTEMTIME ss, ls, s;
        FILETIME   sf, lf, f;
        __int64 diff;

        GetSystemTime(&ss);
        GetLocalTime(&ls);
        SystemTimeToFileTime( &ss, &sf );
        SystemTimeToFileTime( &ls, &lf );

        diff = (wce_FILETIME2int64(lf)-wce_FILETIME2int64(sf))/_onesec_in100ns;

        s = wce_tm2SYSTEMTIME(pt);
        SystemTimeToFileTime( &s, &f );
        return wce_FILETIME2time_t(&f) - (time_t)diff;
}

struct tm *gmtime(const time_t *t)
{
        FILETIME f;
        SYSTEMTIME s;
        static struct tm tms;

        f = wce_time_t2FILETIME(*t);
        FileTimeToSystemTime(&f, &s);
        tms = wce_SYSTEMTIME2tm(&s);
        return &tms;
}

char* ctime( const time_t *t )
{
        // Wed Jan 02 02:03:55 1980\n\0
        static char buf[30]={0};
        char week[] = "Sun Mon Tue Wed Thr Fri Sat ";
        char month[]= "Jan Feb Mar Apl May Jun Jul Aug Sep Oct Nov Dec ";
        struct tm tms;

        tms = *localtime(t);

        strncpy( buf,    week+tms.tm_wday*4, 4 );
        strncpy( buf+4,  month+tms.tm_mon*4, 4 );
        sprintf( buf+8,  "%02d ", tms.tm_mday );
        sprintf( buf+11, "%02d:%02d:%02d %d\n",
                tms.tm_hour, tms.tm_min, tms.tm_sec, tms.tm_year+1900 );
        return buf;
}

char *asctime(const struct tm *pt)
{
        static char buf[30]={0};
        char week[] = "Sun Mon Tue Wed Thr Fri Sat ";
        char month[]= "Jan Feb Mar Apl May Jun Jul Aug Sep Oct Nov Dec ";

        strncpy( buf,    week+pt->tm_wday*4, 4 );
        strncpy( buf+4,  month+pt->tm_mon*4, 4 );
        sprintf( buf+8,  "%02d ", pt->tm_mday );
        sprintf( buf+11, "%02d:%02d:%02d %d\n",
                pt->tm_hour, pt->tm_min, pt->tm_sec, pt->tm_year+1900 );
        return buf;
}

void tzset()
{
        daylight = 1;
        _timezone = 28800;
        timezone = 28800;
}

int clock(void)
{
        return 1;
}

//---------------------------------------------------------------
#ifdef __SCRATCH_TIMEC_DEBUG__

int main()
{
        time_t t1, t2;
        struct tm tm1, tm2;

        time( &t1 );
        tm1 = *localtime(&t1);
        t1 = mktime(&tm1);
        tm1 = *gmtime(&t1);

        _time( &t2 );
        tm2 = *_localtime(&t2);
        t2 = _mktime(&tm2);
        tm2 = *_gmtime(&t2);

        // time, mktime
        if( t1==t2 )
                OutputDebugString( "ok\n" );
        else
        {
                static char buf[128];
                wsprintf( buf, "ng : %d, %d\n", t1, t2 );
                OutputDebugString( buf );
        }

        // localtime, gmtime
        if( 0==memcmp( &tm1, &tm2, sizeof(struct tm) ) )
                OutputDebugString( "ok\n" );
        else
                OutputDebugString( "ng\n" );

        // ctime
        OutputDebugString( ctime(&t1) );
        OutputDebugString( _ctime(&t2) );

        // asctime
        OutputDebugString( asctime(&tm1) );
        OutputDebugString( _asctime(&tm2) );

        return 0;
}

#endif
/* [<][>][^] [v] [top][bottom][index] [help] */


wince/varargs.h

root/wince/varargs.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

#ifndef VARARGS_H
#define VARARGS_H 1

#ifdef  __cplusplus
extern "C" {
#endif

#ifndef _VA_LIST_DEFINED
typedef char *va_list;
#define _VA_LIST_DEFINED
#endif

//#ifdef MIPS
#define va_alist __va_alist, __va_alist2, __va_alist3, __va_alist4
#define va_dcl int __va_alist, __va_alist2, __va_alist3, __va_alist4;
#define va_start(list) list = (char *) &__va_alist
#define va_end(list)
#define va_arg(list, mode) ((mode *)(list =\
 (char *) ((((int)list + (__builtin_alignof(mode)<=4?3:7)) &\
 (__builtin_alignof(mode)<=4?-4:-8))+sizeof(mode))))[-1]
#else
#define _INTSIZEOF(n)    ( (sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1) )
#define va_dcl va_list va_alist;
#define va_start(ap) ap = (va_list)&va_alist
#define va_arg(ap,t) ( *(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) )
#define va_end(ap) ap = (va_list)0
//#endif

#ifdef  __cplusplus
}
#endif

#endif
/* [<][>][^][v][top][bottom][index] [help] */


wince/wince.c

root/wince/wince.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. GetModuleFileNameA
  2. GetProcAddressA
  3. GetCommandLineA
  4. wce_SetCommandLine
  5. wce_FreeCommandLine
  6. GetProcessTimes
  7. GetFileAttributesA
  8. SetFileAttributesA
  9. MoveFileA
  10. MoveFileEx
  11. DeleteFileA
  12. GetEnvironmentVariable
  13. SetEnvironmentVariable
  14. GetEnvironmentStrings
  15. FreeEnvironmentStrings
  16. GenerateConsoleCtrlEvent
  17. DuplicateHandle
  18. LockFile
  19. LockFileEx
  20. UnlockFile
  21. UnlockFileEx
  22. GetVersionExA
  23. WaitForMultipleObjectsEx
  24. CreateProcessA
  25. CreateEventA
  26. FormatMessageA
  27. FindFirstFileA
  28. FindNextFileA
  29. CreateFileA
  30. CharNextA
  31. CharPrevA
  32. GetLogicalDrives
  33. GetUserName
  34. LoadLibraryA
  35. LoadLibraryExA
  36. CreatePipe
  37. GetStdHandle
  38. SetStdHandle
  39. ZeroMemory
  40. ReadDataPending
  41. wce_fopen
  42. wce_SetCurrentDir
  43. wce_replaceRelativeDir
  44. wce_mbtowc
  45. wce_wctomb
/***************************************************************
  wince.c

  author : uema2
  date   : Nov 30, 2002

  You can freely use, copy, modify, and redistribute
  the whole contents.
***************************************************************/

#include <windows.h>
#include <tchar.h>
#include "wince.h"

/* global for GetCommandLineA */
char *_commandLine;

extern char _currentdir[];

/* make up Win32API except wce_* functions.  */

DWORD GetModuleFileNameA(
        HMODULE hModule, LPSTR lpFileName,
        DWORD size )
{
        LPWSTR lpFileNameW;
        LPSTR  mb;
        size_t ret;

        if( size==0 ) return 0;

        lpFileNameW = (LPWSTR)malloc( size*sizeof(wchar_t) );
        ret = GetModuleFileNameW( hModule, lpFileNameW, size );
        mb = wce_wctomb(lpFileNameW);
        strcpy(lpFileName, mb);
        free(mb);
        free(lpFileNameW);

        return ret;
}

#if _WIN32_WCE < 300
FARPROC GetProcAddressA(HMODULE hModule, LPCSTR lpProcName)
{
        FARPROC p;
        LPWSTR  lpwProcName;

        lpwProcName = wce_mbtowc( lpProcName );
        p = GetProcAddressW( hModule, lpwProcName );
        free( lpwProcName );
        return p;
}
#endif

char * GetCommandLineA(void)
{
        return _commandLine;
}

/* this is not Win32API. GetCommandLineA helper. */
void wce_SetCommandLine(LPCWSTR wcmd)
{
        char* acmd;

        acmd = wce_wctomb( wcmd );
        _commandLine = (char*)malloc( strlen(acmd)+5 );
        sprintf( _commandLine, "ruby %s", acmd );
        free(acmd);
}

/* this is not Win32API. GetCommandLineA helper. */
void wce_FreeCommandLine(void)
{
        free(_commandLine);
        _commandLine = NULL;
}

/* I have no idea how to replace this. */
BOOL GetProcessTimes(HANDLE hprocess,
        LPFILETIME lpCreationTime, LPFILETIME lpExitTime,
        LPFILETIME lpKernelTime, LPFILETIME lpUserTime)
{
        return 0;
}

/* --------------  file attributes functions. ------------------- */
DWORD GetFileAttributesA(LPCSTR lpFileName)
{
        LPWSTR lpwFileName;
        DWORD dw;

        lpwFileName = wce_mbtowc(lpFileName);
        dw = GetFileAttributesW(lpwFileName);
        free(lpwFileName);
        return dw;
}

BOOL SetFileAttributesA(
        LPCSTR lpFileName, DWORD attributes)
{
        LPWSTR lpwFileName;
        BOOL b;

        lpwFileName = wce_mbtowc(lpFileName);
        b = SetFileAttributesW(lpwFileName, attributes);
        free(lpwFileName);
        return b;
}

/* ---------------  move and remove functions. ------------------- */
BOOL MoveFileA(LPCSTR fn1, LPCSTR fn2)
{
        LPWSTR wfn1, wfn2;
        BOOL b;

        wfn1 = wce_mbtowc(fn1);
        wfn2 = wce_mbtowc(fn2);
        b = MoveFileW(wfn1, wfn2);
        free(wfn1);
        free(wfn2);
        return 0;
}

BOOL MoveFileEx(LPCSTR oldname, LPCSTR newname, DWORD dwFlags)
{
        LPWSTR woldname, wnewname;
        BOOL b;

        woldname = wce_mbtowc(oldname);
        wnewname = wce_mbtowc(newname);

        if( (dwFlags&MOVEFILE_REPLACE_EXISTING)!=0 )
                DeleteFileW( wnewname );

        b = MoveFileW( woldname, wnewname );

        free(woldname);
        free(wnewname);

        return b;
}

BOOL DeleteFileA(LPCSTR path)
{
        LPWSTR wpath;
        BOOL b;

        wpath = wce_mbtowc(path);
        b = DeleteFileW(wpath);
        free(wpath);
        return 0;
}

/* --------------- EnvironmentVariable functions. ----------------- */
DWORD GetEnvironmentVariable(
        LPCSTR name, LPSTR value, DWORD size)
{
        /* use registry instead of "environment valuable". */
        HKEY    hk;
        LONG    lret;
        LPBYTE  lpData;
        DWORD   dwType=REG_SZ, cbData;
        TCHAR   buf[MAX_PATH]={0};
        LPWSTR  wname;
        LPSTR   avalue;

        lret = RegOpenKeyEx( HKEY_LOCAL_MACHINE,
                                _T("Software\\ruby_mswince"),
                                0, KEY_QUERY_VALUE, &hk );

        if ( lret != ERROR_SUCCESS )
        {
                strcpy( value, "" );
                return 0;
        }

        lpData = (LPBYTE)buf;
        cbData = MAX_PATH*sizeof(*buf);
        wname  = wce_mbtowc( name );

        lret = RegQueryValueEx( hk, wname,
                NULL, &dwType, lpData, &cbData );
        RegCloseKey( hk );

        if ( lret != ERROR_SUCCESS )
        {
                strcpy( value, "" );
                free( wname );
                return 0;
        }

        avalue = wce_wctomb( (LPCTSTR)lpData );
        strcpy( value, avalue );
        free( avalue );
        free( wname );

        return strlen(value);
}

BOOL SetEnvironmentVariable(LPCSTR name, LPCSTR value)
{
        /* use registry instead of "environment valuable". */
        HKEY    hk;
        LONG    lret;
        LPBYTE  lpData;
        DWORD   ret, dwType=REG_SZ, cbData;
        LPWSTR  wname, wvalue;

        lret = RegCreateKeyEx( HKEY_LOCAL_MACHINE,
                        _T("Software\\ruby_mswince"),
                        0, _T(""), 0,
                        0, NULL, &hk, &ret );
        if( lret != ERROR_SUCCESS )
                return FALSE;

        wname  = wce_mbtowc(name);
        wvalue = wce_mbtowc(value);

        lpData = (LPBYTE)wvalue;
        cbData = (wcslen(wvalue) + 1) * sizeof(*wvalue);
        lret = RegSetValueEx( hk, wname,
                0, dwType, lpData, cbData );
        RegCloseKey( hk );
        free(wname);
        free(wvalue);
        return lret == ERROR_SUCCESS;
}

LPVOID GetEnvironmentStrings(VOID)
{
        return NULL;
}

BOOL FreeEnvironmentStrings(LPSTR lpszEnvironmentBlock)
{
        return FALSE;
}

/* DuplicateHandle, LockFile, etc... */
/* I have no idea...  */
BOOL GenerateConsoleCtrlEvent(DWORD dwCtrlEvent,
                DWORD dwProcessGroupID)
{
        return 0;
}

BOOL DuplicateHandle(
        HANDLE source_process, HANDLE source,
        HANDLE dest_process, HANDLE *dest,
        DWORD access, BOOL inherit, DWORD options)
{
        return 0;
}

BOOL LockFile(HANDLE hFile,
        DWORD dwFileOffsetLow, DWORD dwFileOffsetHigh,
        DWORD nNumberOfBytesToLockLow, DWORD nNumberOfBytesToLockHigh)
{
        return FALSE;
}

BOOL LockFileEx(HANDLE hFile,
        DWORD dwFlags, DWORD dwReserved,
        DWORD nNumberOfBytesToLockLow, DWORD nNumberOfBytesToLockHigh,
        LPOVERLAPPED lpOverlapped)
{
        return FALSE;
}

BOOL UnlockFile( HFILE hFile,
        DWORD dwFileOffsetLow, DWORD dwFileOffsetHigh,
        DWORD nNumberOfBytesToUnlockLow, DWORD nNumberOfBytesToUnlockHigh)
{
        return FALSE;
}

BOOL UnlockFileEx(HANDLE hFile,
        DWORD dwReserved, DWORD nNumberOfBytesToUnlockLow,
        DWORD nNumberOfBytesToUnlockHigh, LPOVERLAPPED lpOverlapped)
{
        return FALSE;
}

/* --------------------- etc, etc, etc... ----------------------- */
BOOL GetVersionExA(OSVERSIONINFOA *v)
{
        OSVERSIONINFOW wv;
        BOOL b;
        LPSTR mb;

        b = GetVersionExW(&wv);
        mb = wce_wctomb(wv.szCSDVersion);

        strcpy( v->szCSDVersion, mb );
        free(mb);
        return b;
}

DWORD WaitForMultipleObjectsEx(DWORD count,
        const HANDLE *handles, BOOL wait_all,
        DWORD timeout, BOOL alertable)
{
        return WaitForMultipleObjects(
                count, handles, wait_all,
                timeout );
}

BOOL CreateProcessA(LPCSTR appname, LPCSTR commandline,
        LPSECURITY_ATTRIBUTES att, LPSECURITY_ATTRIBUTES threadatt,
        BOOL bOpt, DWORD dwFlag, LPVOID lpEnv, LPSTR dir,
        LPSTARTUPINFO lpsi, LPPROCESS_INFORMATION lppi)
{
        LPWSTR wappname, wcommandline, wdir;
        BOOL b;

        wappname     = wce_mbtowc(appname);
        wcommandline = wce_mbtowc(commandline);
        wdir         = wce_mbtowc(dir);

        b = CreateProcessW(wappname, wcommandline,
                        att, threadatt, bOpt, dwFlag, lpEnv,
                        wdir, lpsi, lppi);

        free(wappname);
        free(wcommandline);
        free(wdir);

        return b;
}

HANDLE CreateEventA(SECURITY_ATTRIBUTES *sa,
        BOOL manual_reset, BOOL initial_state, LPCSTR name)
{
        HANDLE h;
        LPWSTR wname;

        wname = wce_mbtowc(name);
        h = CreateEventW(sa, manual_reset,
                initial_state, wname);
        free(wname);

        return h;
}

DWORD FormatMessageA(DWORD dwFlags, LPCVOID lpSource,
        DWORD dwMessageId, DWORD dwLanguageId, LPSTR lpBuffer,
        DWORD nSize, va_list* args)
{
        DWORD dw;
        LPWSTR lpWBuffer;

        lpWBuffer = wce_mbtowc(lpBuffer);
        dw = FormatMessageW( dwFlags, lpSource,
                        dwMessageId, dwLanguageId,
                        lpWBuffer, nSize, (va_list*)args );
        free(lpWBuffer);
        return dw;
}

/*---------------- FindFirstFile, FindNextFile ------------------ */
HANDLE FindFirstFileA(LPCSTR path,
                        WIN32_FIND_DATAA *data)
{
        LPWSTR wpath;
        LPSTR  mb;
        HANDLE h;
        WIN32_FIND_DATAW wdata;

        wpath = wce_mbtowc(path);
        h = FindFirstFileW( wpath, &wdata );
        free(wpath);

        mb = wce_wctomb( wdata.cFileName );
        strcpy( data->cFileName, mb );
        free(mb);

        return h;
}

BOOL FindNextFileA(HANDLE handle,
        WIN32_FIND_DATAA *data)
{
        BOOL b;
        WIN32_FIND_DATAW wdata;
        LPSTR mb1;

        b = FindNextFileW(handle, &wdata);

        mb1 = wce_wctomb( wdata.cFileName );
        strcpy( data->cFileName, mb1 );
        free(mb1);

        return b;
}

/* CreateFile doesn't support SECURITY_ATTRIBUTES in WinCE. */
/* it must be NULL. */
HANDLE CreateFileA(LPCSTR filename, DWORD access,
        DWORD sharing, LPSECURITY_ATTRIBUTES sa,
        DWORD creation, DWORD attributes, HANDLE template)
{
        LPWSTR wfilename;
        HANDLE h;

        wfilename = wce_mbtowc(filename);
        h = CreateFileW(wfilename, access, sharing,
                        NULL, creation, 0, NULL);
        free(wfilename);

        return 0;
}

/* ---------------- CharNext, CharPrev. ---------------------*/
LPSTR CharNextA(LPCSTR a)
{
        char *p=(char *)a;
        if( TRUE==IsDBCSLeadByteEx(CP_ACP, (BYTE)*a) )
                p+=2;
        else
                p++;

        return p;
}

LPSTR CharPrevA(LPCSTR start, LPCSTR ptr)
{
        if( start==ptr ) return (LPSTR)start;
        else if( start+1==ptr ) return (LPSTR)start;
        else if( TRUE==IsDBCSLeadByteEx(CP_ACP, (BYTE)*(ptr-2)) )
                return (LPSTR)(ptr-2);
        else
                return (LPSTR)(ptr-1);
}

/* WinCE doesn't have "drives". */
DWORD GetLogicalDrives(VOID)
{
        return 0;
}

/* WinCE doesn't have "user name". */
BOOL GetUserName(LPSTR lpBuffer, LPDWORD nSize)
{
        return 0;
}

/*------------------- LoadLibrary -----------------------*/
HINSTANCE LoadLibraryA(LPCSTR libname)
{
        HINSTANCE h;
        LPWSTR wlibname;

        // if starts ".\", replace current directory.
//      wlibname = wce_replaceRelativeDir(libname);

        wlibname = wce_mbtowc(libname);
        h = LoadLibraryW(wlibname);
        free(wlibname);
        return h;
}

HINSTANCE LoadLibraryExA(LPCSTR lpLibFileName, HANDLE hFile,
                        DWORD dwFlags)
{
        HINSTANCE h;
        LPWSTR wlibname;

        wlibname = wce_mbtowc(lpLibFileName);
//      wlibname = wce_replaceRelativeDir(lpLibFileName);

#if _WIN32_WCE < 300
        h = LoadLibraryW(wlibname);
#else
        h = LoadLibraryExW(wlibname, hFile, dwFlags);
#endif
        free(wlibname);
        return h;
}

/* WinCE doesn't have "CreatePipe". */
BOOL CreatePipe(PHANDLE hReadPipe, PHANDLE hWritePipe,
        LPSECURITY_ATTRIBUTES lpPipeAttributes, DWORD nSize)
{
        return FALSE;
}

/* WinCE doesn't have "Standard Devices". */
HANDLE GetStdHandle(DWORD nStdHandle)
{
        return NULL;
}

BOOL SetStdHandle(DWORD nStdHandle, HANDLE h)
{
        return FALSE;
}

#if _WIN32_WCE < 300
VOID ZeroMemory(PVOID p, DWORD length)
{
        memset(p,0,length);
}
#endif

/* need in ruby/io.c. */
int ReadDataPending()
{
        return 0;
}

/*---------------- helper functions. ---------------------------- */
FILE *wce_fopen( const char *fname, const char *mode )
{
        TCHAR* tfname = wce_replaceRelativeDir(fname);
        TCHAR* tmode = wce_mbtowc(mode);
        FILE* fp = _tfopen(tfname, tmode);
        free(tfname); free(tmode);
        return fp;
}

void wce_SetCurrentDir()
{
        WCHAR tbuf[MAX_PATH+1]={0};
        WCHAR *tp;
        char *buf;

        GetModuleFileNameW( NULL, tbuf, MAX_PATH );
        tp = _tcsrchr( tbuf, '\\' );
        if( tp!=NULL ) *tp=_T('\0');
        buf = wce_wctomb(tbuf);
        strcpy( _currentdir, buf );
        free(buf);
}

TCHAR *wce_replaceRelativeDir(const char* str)
{
        TCHAR *tbuf;

        if( 2<=strlen(str) && str[0]=='.' &&
                (str[1]=='/' || str[1]=='\\') )
        {
                char *buf;
                int len = strlen(str) + strlen(_currentdir);
                buf = malloc( len+1 );
                sprintf(buf, "%s%s", _currentdir, &str[1]);
                tbuf = wce_mbtowc(buf);
                free(buf);
        }
        else
                tbuf = wce_mbtowc(str);
        return tbuf;
}

/* char -> wchar_t */
wchar_t* wce_mbtowc(const char* a)
{
        int length;
        wchar_t *wbuf;

        length = MultiByteToWideChar(CP_ACP, 0,
                a, -1, NULL, 0);
        wbuf = (wchar_t*)malloc( (length+1)*sizeof(wchar_t) );
        MultiByteToWideChar(CP_ACP, 0,
                a, -1, wbuf, length);

        return wbuf;
}

/* wchar_t -> char */
char* wce_wctomb(const wchar_t* w)
{
        DWORD charlength;
        char* pChar;

        charlength = WideCharToMultiByte(CP_ACP, 0, w,
                                        -1, NULL, 0, NULL, NULL);
        pChar = (char*)malloc(charlength+1);
        WideCharToMultiByte(CP_ACP, 0, w,
                -1, pChar, charlength, NULL, NULL);

        return pChar;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


wince/wince.h

root/wince/wince.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

#ifndef _EXT_CE_
#define _EXT_CE_

/* unique difinition in wince platform. */

#ifndef _MIPS_
  #define CONTEXT_FLOATING_POINT  0x00000002L
#endif

/* LockFile difinition. */
#define LOCKFILE_FAIL_IMMEDIATELY   0x00000001
#define LOCKFILE_EXCLUSIVE_LOCK     0x00000002

/* Dual Mode difinition. */
#define STARTF_USESHOWWINDOW    0x00000001
#define STARTF_USESIZE          0x00000002
#define STARTF_USEPOSITION      0x00000004
#define STARTF_USECOUNTCHARS    0x00000008
#define STARTF_USEFILLATTRIBUTE 0x00000010
#define STARTF_RUNFULLSCREEN    0x00000020
#define STARTF_FORCEONFEEDBACK  0x00000040
#define STARTF_FORCEOFFFEEDBACK 0x00000080
#define STARTF_USESTDHANDLES    0x00000100
/* #define STARTF_USEHOTKEY        0x00000200 */

#define STD_INPUT_HANDLE    (DWORD)-10
#define STD_OUTPUT_HANDLE   (DWORD)-11
#define STD_ERROR_HANDLE    (DWORD)-12

#define NORMAL_PRIORITY_CLASS       0x00000020
#define IDLE_PRIORITY_CLASS         0x00000040
#define HIGH_PRIORITY_CLASS         0x00000080
#define REALTIME_PRIORITY_CLASS     0x00000100

/* WINSOCK.H? */
#define SO_SYNCHRONOUS_NONALERT 0x20

/* MoveFileEx definition. */
#define MOVEFILE_REPLACE_EXISTING       0x00000001
/*
#define MOVEFILE_COPY_ALLOWED           0x00000002
#define MOVEFILE_DELAY_UNTIL_REBOOT     0x00000004
#define MOVEFILE_WRITE_THROUGH          0x00000008
#define MOVEFILE_CREATE_HARDLINK        0x00000010
#define MOVEFILE_FAIL_IF_NOT_TRACKABLE  0x00000020
*/

#define _fgetc fgetc
#define _fputc fputc

#ifdef __cplusplus
extern "C" {
#endif

/* Win32 API redifinition. */

#undef GetCommandLine
#define GetCommandLine GetCommandLineA

#undef SetFileAttributes
#define SetFileAttributes SetFileAttributesA

#undef GetFileAttributes
#define GetFileAttributes GetFileAttributesA

#undef FormatMessage
#define FormatMessage FormatMessageA

#undef GetModuleFileName
#define GetModuleFileName GetModuleFileNameA

#undef CreateFile
#define CreateFile CreateFileA

#undef MoveFile
#define MoveFile MoveFileA

#undef DeleteFile
#define DeleteFile DeleteFileA

#undef CreateProcess
#define CreateProcess CreateProcessA

#undef CharNext
#define CharNext CharNextA

#undef CharPrev
#define CharPrev CharPrevA

#undef WIN32_FIND_DATA
#define WIN32_FIND_DATA WIN32_FIND_DATAA

#undef FindFirstFile
#define FindFirstFile FindFirstFileA

#undef FindNextFile
#define FindNextFile FindNextFileA

/* stdio.c */
FILE *freopen(const char *filename, const char *mode, FILE *file);
FILE *fdopen( int handle, const char *mode );

//#define fdopen _fdopen

/* stdlib.c */
char *getenv(const char *charstuff);
char *_fullpath(char *absPath, const char *relPath, size_t maxLength);

/* string.c */
char *strdup(const char * str);
/* char *strerror(int errno); */
int strnicmp( const char *s1, const char *s2, size_t count );

//#define strnicmp _strnicmp
#define stricmp _stricmp

/* for win32.c */
FARPROC GetProcAddressX(HMODULE hModule, LPCSTR lpProcName);

BOOL MoveFileEx(LPCSTR oldname, LPCSTR newname, DWORD dwFlags);
BOOL DuplicateHandle(
        HANDLE source_process, HANDLE source,
        HANDLE dest_process, HANDLE *dest,
        DWORD access, BOOL inherit, DWORD options);
BOOL LockFile(HANDLE hFile,
        DWORD dwFileOffsetLow, DWORD dwFileOffsetHigh,
        DWORD nNumberOfBytesToLockLow, DWORD nNumberOfBytesToLockHigh);
BOOL LockFileEx(HANDLE hFile,
        DWORD dwFlags, DWORD dwReserved,
        DWORD nNumberOfBytesToLockLow, DWORD nNumberOfBytesToLockHigh,
        LPOVERLAPPED lpOverlapped);
BOOL UnlockFile( HFILE hFile,
        DWORD dwFileOffsetLow, DWORD dwFileOffsetHigh,
        DWORD nNumberOfBytesToUnlockLow, DWORD nNumberOfBytesToUnlockHigh);
BOOL UnlockFileEx(HANDLE hFile,
        DWORD dwReserved, DWORD nNumberOfBytesToUnlockLow,
        DWORD nNumberOfBytesToUnlockHigh, LPOVERLAPPED lpOverlapped);
BOOL GetUserName(LPSTR lpBuffer, LPDWORD nSize);
BOOL CreatePipe(PHANDLE hReadPipe, PHANDLE hWritePipe,
        LPSECURITY_ATTRIBUTES lpPipeAttributes, DWORD nSize);
HANDLE GetStdHandle(DWORD nStdHandle);
BOOL SetStdHandle(DWORD nStdHandle, HANDLE h);
DWORD GetLogicalDrives(VOID);
DWORD WaitForMultipleObjectsEx(DWORD count,
        const HANDLE *handles, BOOL wait_all,
        DWORD timeout, BOOL alertable);
DWORD GetEnvironmentVariable(LPCSTR name, LPSTR value, DWORD size);
LPVOID GetEnvironmentStrings(VOID);
BOOL FreeEnvironmentStrings(LPSTR lpszEnvironmentBlock);
BOOL GenerateConsoleCtrlEvent(DWORD dwCtrlEvent,
                DWORD dwProcessGroupID);
BOOL GetProcessTimes(HANDLE hprocess,
        LPFILETIME lpCreationTime, LPFILETIME lpExitTime,
        LPFILETIME lpKernelTime, LPFILETIME lpUserTime);

/* char -> wchar_t, wchar_t -> char */
wchar_t* wce_mbtowc(const char* a);
char*    wce_wctomb(const wchar_t* w);
/* other helpers. */
void wce_SetCommandLine(LPCWSTR wcmd);
void wce_FreeCommandLine(void);
TCHAR *wce_replaceRelativeDir(const char* str);
void wce_SetCurrentDir();

#if _WIN32_WCE < 300
  /* for Handheld PC Pro. */
  char *strrchr( const char *p, int c );
  int stricmp( const char *p1, const char *p2 );
  VOID ZeroMemory(PVOID p, DWORD length);

  #define isascii(c) ( (c>=0x00&&c<=0x7f)?1:0 )
  #define isspace(c) ( ((c>=0x09&&c<=0x0d)||c==0x20)?1:0 )
  #define isdigit(c) ( (c>=0x00&&c<=0x09)?1:0 )
  #define isupper(c) ( (c>='A'&&c<='Z')?1:0 )
  #define isalpha(c) ( ((c>='A'&&c<='Z')||(c>='a'&&c<='z'))?1:0 )
  #define isprint(c) ( (c>=0x20&&c<=0x7e)?1:0 )
  #define isalnum(c) ( (isalpha(c)||isdigit(c))?1:0 )
  #define iscntrl(c) ( ((c>=0x00&&c<=0x1f)||c==0x7f)?1:0 )
  #define islower(c) ( (c>='a'&&c<='z')?1:0 )
  #define ispunct(c) ( !(isalnum(c)||isspace(c))?1:0 )
  #define isxdigit(c) ( ((c>=0&&c<=9)||(c>='A'&&c<='F')||(c>='a'&&c<='f'))?1:0 )
#endif

#ifdef __cplusplus
};
#endif

#endif /* _EXT_CE_ */
/* [<][>][^][v][top][bottom][index] [help] */


wince/wincemain.c

root/wince/wincemain.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. WinMain
#include <windows.h>
#include <stdio.h>
#include "wince.h"

extern int main(int, char**, char**);

int WINAPI
WinMain(HINSTANCE current, HINSTANCE prev, LPWSTR wcmd, int showcmd)
{
        /* wchar_t -> char */
        wce_SetCommandLine(wcmd);

        wce_SetCurrentDir();

        /* main. */
    return main(0, NULL, NULL);
}
/* [<][>][^][v] [top][bottom][index] [help] */


wince/wincon.h

root/wince/wincon.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

#ifndef _WINCON_H_
#define _WINCON_H_

#define CTRL_C_EVENT        0

#endif
/* [<][>][^][v][top][bottom][index] [help] */


wince/winsock2.c

root/wince/winsock2.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. getprotobyname
  2. getprotobynumber
  3. getservbyname
  4. getservbyport
  5. main
/***************************************************************
  winsock2.c
***************************************************************/

//#define _WINSOCK2_C_DEBUG_MAIN_

#include <windows.h>
#include "wince.h"
#ifdef _WINSOCK2_C_DEBUG_MAIN_
  #include <winsock.h>
#endif

#ifndef _WINSOCK2_C_DEBUG_MAIN_
struct  servent{
        char*  s_name;     /* official service name */
        char** s_aliases;  /* alias list */
        short  s_port;     /* port # */
        char*  s_proto;    /* protocol to use */
};
struct  protoent{
        char*  p_name;     /* official protocol name */
        char** p_aliases;  /* alias list */
        short  p_proto;    /* protocol # */
};
#endif

struct sproto{
        short num;
        char name[10];
};
struct sserv{
        short num;
        char protoname[10];
        char servname[20];
};

static struct sproto _proto_table[11]={
        0,  "ip",
        1,  "icmp",
        3,  "ggp",
        6,  "tcp",
        8,  "egp",
        12, "pup",
        17, "udp",
        20, "hmp",
        22, "xns-idp",
        27, "rdp",
        66, "rvd",
};

static struct sserv _serv_table[142]={
        7, "tcp", "echo",
        7, "udp", "echo",
        9, "tcp", "discard",
        9, "udp", "discard",
        11, "tcp", "systat",
        11, "udp", "systat",
        13, "tcp", "daytime",
        13, "udp", "daytime",
        15, "tcp", "netstat",
        17, "tcp", "qotd",
        17, "udp", "qotd",
        19, "tcp", "chargen",
        19, "udp", "chargen",
        20, "tcp", "ftp-data",
        21, "tcp", "ftp",
        23, "tcp", "telnet",
        25, "tcp", "smtp",
        37, "tcp", "time",
        37, "udp", "time",
        39, "udp", "rlp",
        42, "tcp", "name",
        42, "udp", "name",
        43, "tcp", "whois",
        53, "tcp", "domain",
        53, "udp", "domain",
        53, "tcp", "nameserver",
        53, "udp", "nameserver",
        57, "tcp", "mtp",
        67, "udp", "bootp",
        69, "udp", "tftp",
        77, "tcp", "rje",
        79, "tcp", "finger",
        87, "tcp", "link",
        95, "tcp", "supdup",
        101, "tcp", "hostnames",
        102, "tcp", "iso-tsap",
        103, "tcp", "dictionary",
        103, "tcp", "x400",
        104, "tcp", "x400-snd",
        105, "tcp", "csnet-ns",
        109, "tcp", "pop",
        109, "tcp", "pop2",
        110, "tcp", "pop3",
        111, "tcp", "portmap",
        111, "udp", "portmap",
        111, "tcp", "sunrpc",
        111, "udp", "sunrpc",
        113, "tcp", "auth",
        115, "tcp", "sftp",
        117, "tcp", "path",
        117, "tcp", "uucp-path",
        119, "tcp", "nntp",
        123, "udp", "ntp",
        137, "udp", "nbname",
        138, "udp", "nbdatagram",
        139, "tcp", "nbsession",
        144, "tcp", "NeWS",
        153, "tcp", "sgmp",
        158, "tcp", "tcprepo",
        161, "tcp", "snmp",
        162, "tcp", "snmp-trap",
        170, "tcp", "print-srv",
        175, "tcp", "vmnet",
        315, "udp", "load",
        400, "tcp", "vmnet0",
        500, "udp", "sytek",
        512, "udp", "biff",
        512, "tcp", "exec",
        513, "tcp", "login",
        513, "udp", "who",
        514, "tcp", "shell",
        514, "udp", "syslog",
        515, "tcp", "printer",
        517, "udp", "talk",
        518, "udp", "ntalk",
        520, "tcp", "efs",
        520, "udp", "route",
        525, "udp", "timed",
        526, "tcp", "tempo",
        530, "tcp", "courier",
        531, "tcp", "conference",
        531, "udp", "rvd-control",
        532, "tcp", "netnews",
        533, "udp", "netwall",
        540, "tcp", "uucp",
        543, "tcp", "klogin",
        544, "tcp", "kshell",
        550, "udp", "new-rwho",
        556, "tcp", "remotefs",
        560, "udp", "rmonitor",
        561, "udp", "monitor",
        600, "tcp", "garcon",
        601, "tcp", "maitrd",
        602, "tcp", "busboy",
        700, "udp", "acctmaster",
        701, "udp", "acctslave",
        702, "udp", "acct",
        703, "udp", "acctlogin",
        704, "udp", "acctprinter",
        704, "udp", "elcsd",
        705, "udp", "acctinfo",
        706, "udp", "acctslave2",
        707, "udp", "acctdisk",
        750, "tcp", "kerberos",
        750, "udp", "kerberos",
        751, "tcp", "kerberos_master",
        751, "udp", "kerberos_master",
        752, "udp", "passwd_server",
        753, "udp", "userreg_server",
        754, "tcp", "krb_prop",
        888, "tcp", "erlogin",
        1109, "tcp", "kpop",
        1167, "udp", "phone",
        1524, "tcp", "ingreslock",
        1666, "udp", "maze",
        2049, "udp", "nfs",
        2053, "tcp", "knetd",
        2105, "tcp", "eklogin",
        5555, "tcp", "rmt",
        5556, "tcp", "mtb",
        9535, "tcp", "man",
        9536, "tcp", "w",
        9537, "tcp", "mantst",
        10000, "tcp", "bnews",
        10000, "udp", "rscs0",
        10001, "tcp", "queue",
        10001, "udp", "rscs1",
        10002, "tcp", "poker",
        10002, "udp", "rscs2",
        10003, "tcp", "gateway",
        10003, "udp", "rscs3",
        10004, "tcp", "remp",
        10004, "udp", "rscs4",
        10005, "udp", "rscs5",
        10006, "udp", "rscs6",
        10007, "udp", "rscs7",
        10008, "udp", "rscs8",
        10009, "udp", "rscs9",
        10010, "udp", "rscsa",
        10011, "udp", "rscsb",
        10012, "tcp", "qmaster",
        10012, "udp", "qmaster",
};

/* WinCE doesn't have /etc/protocols. */
struct protoent* getprotobyname(const char* name)
{
        static struct protoent pe;
        int i;
        int len = strlen(name);

        memset( &pe, 0, sizeof(struct protoent) );

        for(i=0; i<9; i++)
        {
                if( 0==strnicmp(_proto_table[i].name, name, len) )
                {
                        pe.p_name = _proto_table[i].name;
                        pe.p_proto= _proto_table[i].num;
                        break;
                }
        }

        return &pe;
}

struct protoent* getprotobynumber(int proto)
{
        static struct protoent pe={0};
        int i;

        memset( &pe, 0, sizeof(struct protoent) );

        for(i=0; i<9; i++)
        {
                if( proto == _proto_table[i].num )
                {
                        pe.p_name = _proto_table[i].name;
                        pe.p_proto= _proto_table[i].num;
                        break;
                }
        }

        return &pe;
}

/* WinCE doesn't have /etc/services. */
struct servent* getservbyname(const char* name,
                              const char* proto)
{
        static struct servent se;
        int i;
        int slen = strlen(name), plen = strlen(proto);

        memset( &se, 0, sizeof(struct servent) );

        if( proto==NULL ) return NULL;
        if( 0!=strnicmp( proto, "tcp", 3 ) &&
                0!=strnicmp( proto, "udp", 3 ) )
                return NULL;

        for( i=0; i<142; i++ )
        {
                if( 0==strnicmp( name, _serv_table[i].servname, slen ) &&
                        0==strnicmp( proto, _serv_table[i].protoname, plen ) )
                {
                        char hc, lc;
                        se.s_name = _serv_table[i].servname;
                        se.s_proto= _serv_table[i].protoname;
                        hc = (_serv_table[i].num&0xFF00)>>8;
                        lc = _serv_table[i].num&0xFF;
                        se.s_port = (lc<<8) + hc;
                        break;
                }
        }

        return &se;
}

struct servent* getservbyport(int port, const char* proto)
{
        static struct servent se;
        int i;
        int plen = strlen(proto);
        short sport;
        char  lc, hc;

        hc = (port&0xFF00)>>8;
        lc = port&0xFF;

        sport = (lc<<8) + hc;

        memset( &se, 0, sizeof(struct servent) );

        if( proto==NULL ) return NULL;
        if( 0!=strnicmp( proto, "tcp", 3 ) &&
                0!=strnicmp( proto, "udp", 3 ) )
                return NULL;

        for( i=0; i<142; i++ )
        {
                if( sport == _serv_table[i].num &&
                        0==strnicmp( proto, _serv_table[i].protoname, plen ) )
                {
                        se.s_name = _serv_table[i].servname;
                        se.s_proto= _serv_table[i].protoname;
                        se.s_port = port;
                        break;
                }
        }

        return &se;
}

#ifdef _WINSOCK2_C_DEBUG_MAIN_

int main()
{
        WORD wVersionRequested = MAKEWORD(1,1);
        WSADATA wsaData;
        int nErrorStatus;
        struct protoent pe1, pe2;
        struct servent se1, se2;

        nErrorStatus = WSAStartup(wVersionRequested, &wsaData);
        if(nErrorStatus != 0)
                return -1;

        pe1 = *getprotobyname("UDP");
        pe2 = *_getprotobyname("UDP");

//      pe1 = *getprotobynumber(17);
//      pe2 = *_getprotobynumber(17);

//      se1 = *getservbyname("gateway", "tcp");
//      se2 = *_getservbyname("gateway", "tcp");

        se1 = *getservbyport(0x1327, "tcp");
        se2 = *_getservbyport(0x1327, "tcp");

        WSACleanup();

        return 0;
}

#endif
/* [<][>][^] [v] [top][bottom][index] [help] */


wince/sys/stat.c

root/wince/sys/stat.c

/* [<][>][^] [v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. _stat
  2. fstat
/***************************************************************
  stat.c

  author : uema2
  date   : Nov 30, 2002

  You can freely use, copy, modify, and redistribute
  the whole contents.
***************************************************************/

#include <windows.h>
#include <sys/stat.h>
#include <time.h>
#include "..\wince.h" /* for wce_mbtowc */

int _stat(const char *filename, struct _stat *st)
{
        DWORD dwAttribute;
        HANDLE h;
        DWORD dwSizeLow=0, dwSizeHigh=0, dwError=0;
        WIN32_FIND_DATAW fd;
        wchar_t *wfilename;

//      wfilename = wce_mbtowc(filename);
        wfilename = wce_replaceRelativeDir(filename);

        dwAttribute = GetFileAttributesW(wfilename);
        if(dwAttribute==0xFFFFFFFF)
        {
                free(wfilename);
                return -1;
        }

        st->st_mode = 0;
        if((dwAttribute & FILE_ATTRIBUTE_DIRECTORY) != 0)
                st->st_mode += S_IFDIR;
        else
                st->st_mode += S_IFREG;

        /* initialize */
        st->st_atime = 0;
    st->st_mtime = 0;
    st->st_ctime = 0;
        st->st_size  = 0;
        st->st_dev   = 0;

        h = FindFirstFileW(wfilename, &fd);
        if(h == INVALID_HANDLE_VALUE)
        {
                if(wfilename[wcslen(wfilename)-1]       == L'\\')
                {
                        wfilename[wcslen(wfilename)-1] = L'\0';
                        h = FindFirstFileW(wfilename, &fd);
                        if(h == INVALID_HANDLE_VALUE)
                        {
                                free(wfilename);
                                return 0;
                        }
                }
                else
                {
                        free(wfilename);
                        return 0;
                }
        }

        /* FILETIME -> time_t */
        st->st_atime = wce_FILETIME2time_t(&fd.ftLastAccessTime);
    st->st_mtime = wce_FILETIME2time_t(&fd.ftLastWriteTime);
    st->st_ctime = wce_FILETIME2time_t(&fd.ftCreationTime);
        st->st_size  = fd.nFileSizeLow;

        FindClose( h );
        free(wfilename);
        return 0;
}

int fstat(int file, struct stat *sbuf)
{
        /* GetFileSize & GetFileTime */
        DWORD dwSize;
        FILETIME ctime, atime, mtime;

        dwSize = GetFileSize( (HANDLE)file, NULL );
        if( dwSize == 0xFFFFFFFF )
                return -1;

        sbuf->st_size = dwSize;
        sbuf->st_dev  = 0;
        sbuf->st_rdev = 0;
        sbuf->st_mode = _S_IFREG;
        sbuf->st_nlink= 1;

        GetFileTime( (HANDLE)file, &ctime, &atime, &mtime );
        sbuf->st_ctime = wce_FILETIME2time_t(&ctime);
        sbuf->st_atime = wce_FILETIME2time_t(&atime);
        sbuf->st_mtime = wce_FILETIME2time_t(&mtime);

        return 0;
}
/* [<][>][^] [v] [top][bottom][index] [help] */


wince/sys/stat.h

root/wince/sys/stat.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

#ifndef SYS_STAT_H
#define SYS_STAT_H 1

#include <sys/types.h>

#define _S_IFMT         0170000         /* file type mask */
#define _S_IFDIR        0040000         /* directory */
#define _S_IFCHR        0020000         /* character special */
#define _S_IFIFO        0010000         /* pipe */
#define _S_IFREG        0100000         /* regular */
#define _S_IREAD        0000400         /* read permission, owner */
#define _S_IWRITE       0000200         /* write permission, owner */
#define _S_IEXEC        0000100         /* execute/search permission, owner */

#define S_IFMT   _S_IFMT
#define S_IFREG  _S_IFREG
#define S_IFCHR  _S_IFCHR
#define S_IFDIR  _S_IFDIR
#define S_IREAD  _S_IREAD
#define S_IWRITE _S_IWRITE
#define S_IEXEC  _S_IEXEC

#ifndef S_ISDIR
#define S_ISDIR(X) (((X) & S_IFMT) == S_IFDIR)
#endif
#ifndef S_ISREG
#define S_ISREG(X) (((X) & S_IFMT) == S_IFREG)
#endif

#ifdef __cplusplus
extern "C" {
#endif

// in sys/types.h
//typedef unsigned int _dev_t;
//typedef long _off_t;
//typedef unsigned short _ino_t;

#ifndef _STAT_DEFINED
struct stat
{
  dev_t st_dev;
  ino_t st_ino;
  unsigned short st_mode;
  short st_nlink;
  short st_uid;
  short st_gid;
  dev_t st_rdev;
  off_t st_size;
  time_t st_atime;
  time_t st_mtime;
  time_t st_ctime;
};
#define _STAT_DEFINED
#endif /* _STAT_DEFINED */

#define _stat stat

int _stat(const char *filename, struct _stat *stat);
int fstat(int file, struct stat *sbuf);

#ifdef __cplusplus
};
#endif

#endif
/* [<][>][^][v][top][bottom][index] [help] */


wince/sys/timeb.c

root/wince/sys/timeb.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. ftime
/***************************************************************
  timeb.c
***************************************************************/

#include <windows.h>
#include <time.h>
#include <sys/timeb.h>

int ftime(struct timeb *tp)
{
        SYSTEMTIME s;
        FILETIME   f;

        GetLocalTime(&s);
        SystemTimeToFileTime( &s, &f );

        tp->dstflag  = 0;
        tp->timezone = _timezone/60;
        tp->time     = wce_FILETIME2time_t(&f);
        tp->millitm  = s.wMilliseconds;

        return 0;
}
/* [<][>][^][v] [top][bottom][index] [help] */


wince/sys/timeb.h

root/wince/sys/timeb.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

#ifndef SYS_TIMEB_H
#define SYS_TIMEB_H 1

#include <sys/types.h>

struct _timeb {
        time_t time;
        unsigned short millitm;
        short timezone;
        short dstflag;
};

#define timeb _timeb

#ifdef __cplusplus
extern "C" {
#endif

int ftime(struct timeb *tp);

#ifdef __cplusplus
};
#endif

#endif
/* [<][>][^][v][top][bottom][index] [help] */


wince/sys/types.h

root/wince/sys/types.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

#ifndef SYS_TYPES_H
#define SYS_TYPES_H 1

#define BIG_ENDIAN    1234
#define LITTLE_ENDIAN 4321

#ifdef MIPS
#define BYTE_ORDER LITTLE_ENDIAN
#endif

//#if UNDER_CE > 201
//  typedef unsigned long time_t;
//  #define _TIME_T_DEFINED_
//#endif
typedef unsigned long dev_t;
typedef unsigned long ino_t;
#ifndef _MODE_T_DEFINED_
  typedef unsigned long mode_t;
  #define _MODE_T_DEFINED_
#endif

typedef long clock_t;

#ifndef _PTRDIFF_T_DEFINED
typedef long ptrdiff_t;
#define _PTRDIFF_T_DEFINED
#endif

typedef long off_t;

//typedef unsigned char u_char;
//typedef unsigned short u_short;

#ifndef _CADDR_T_DEFINED_
typedef unsigned char * caddr_t;
#define _CADDR_T_DEFINED_
#endif

#ifndef _SIZE_T_DEFINED_
typedef unsigned int size_t;
#define _SIZE_T_DEFINED_
#endif

//typedef unsigned char u_int8_t;

//typedef short int16_t;
//typedef unsigned short u_int16_t;

//typedef int int32_t;
//typedef unsigned int u_int32_t;

//typedef unsigned long u_long;
//typedef unsigned int u_int;

//#ifndef _TIME_T_DEFINED_
//typedef unsigned long time_t;
//#define _TIME_T_DEFINED_
//#endif

#endif
/* [<][>][^][v][top][bottom][index] [help] */


wince/sys/utime.c

root/wince/sys/utime.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. utime
/***************************************************************
  utime.c
***************************************************************/

#include <windows.h>
#include <sys/utime.h>
#include "..\wince.h" /* for wce_mbtowc */

#ifdef _WIN32_WCE
  #if _WIN32_WCE < 300
    #define Int32x32To64(a, b) ((LONGLONG)((LONG)(a)) * (LONGLONG)((LONG)(b)))
/*    #define Int32x32To64(a, b) ((__int64)((LONG)(a)) * (__int64)((LONG)(b))) */
  #endif
#endif

int utime(const char *f, struct utimbuf *t)
{
        HANDLE h;
        FILETIME atime={0}, mtime={0};
        __int64 time64;
        BOOL rc;
        wchar_t *w;

        w = wce_mbtowc(f);
        h = CreateFileW(w, GENERIC_WRITE,
                        FILE_SHARE_READ|FILE_SHARE_WRITE,
                        NULL, OPEN_EXISTING, 0, 0);
        free(w);

        if( h==INVALID_HANDLE_VALUE )
                return -1;

        time64 = Int32x32To64(t->actime, 10000000) + 116444736000000000;
        atime.dwLowDateTime  = (DWORD)time64;
        atime.dwHighDateTime = (DWORD)(time64 >> 32);
        time64 = Int32x32To64(t->modtime, 10000000) + 116444736000000000;
        mtime.dwLowDateTime  = (DWORD)time64;
        mtime.dwHighDateTime = (DWORD)(time64 >> 32);

        rc = SetFileTime(h, NULL, &atime, &mtime);
        return rc==TRUE ? 0 : -1;
}
/* [<][>][^][v] [top][bottom][index] [help] */


wince/sys/utime.h

root/wince/sys/utime.h

/* [<][>][^][v][top][bottom] [index] [help] */

INCLUDED FROM

#ifndef SYS_UTIME_H
#define SYS_UTIME_H 1

#include <time.h>

struct utimbuf
{
  time_t actime;
  time_t modtime;
};

#define _utimbuf utimbuf

#ifdef __cplusplus
extern "C" {
#endif

int utime(const char *f, struct utimbuf *t);

#ifdef __cplusplus
};
#endif

//#define utime _utime

#endif
/* [<][>][^][v][top][bottom][index] [help] */


x68/select.c

root/x68/select.c

/* [<][>][^][v][top][bottom] [index] [help] */

DEFINITIONS

This source file includes following definitions.
  1. select
/*
 * PROJECT C Library, X68000 PROGRAMMING INTERFACE DEFINITION
 * --------------------------------------------------------------------
 * This file is written by the Project C Library Group,  and completely
 * in public domain. You can freely use, copy, modify, and redistribute
 * the whole contents, without this notice.
 * --------------------------------------------------------------------
 * $Id: select.c,v 1.1.1.2 1999/01/20 04:59:39 matz Exp $
 */

#ifndef __IOCS_INLINE__
#define __IOCS_INLINE__
#define __DOS_INLINE__
#define __DOS_DOSCALL__
#endif

/* System headers */
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <sys/dos.h>
#include <sys/iocs.h>
#include <sys/time.h>
#include <sys/types.h>
#if 0
#include <sys/select.h>
#include <sys/xsocket.h>
#endif
#include <sys/xunistd.h>

/* Macros */
#define XFD_ISSET(fd,fds) ((fds) && FD_ISSET ((fd), (fds)))
#define isreadable(mode)  ((mode) == O_RDONLY || (mode) == O_RDWR)
#define iswritable(mode)  ((mode) == O_WRONLY || (mode) == O_RDWR)
#ifndef _POSIX_FD_SETSIZE
#define _POSIX_FD_SETSIZE OPEN_MAX
#endif

/* Functions */
int
select (int fds, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeval *timeout)
{
  fd_set oread, owrite, oexcept;
  int ticks, start;
  int nfds;

  if (fds > _POSIX_FD_SETSIZE)
    {
      errno = EINVAL;
      return -1;
    }

  FD_ZERO (&oread);
  FD_ZERO (&owrite);
  FD_ZERO (&oexcept);

  nfds = 0;
  ticks = -1;

  if (timeout)
    {
      ticks = timeout->tv_sec * 100 + timeout->tv_usec / 10000;
      if (ticks < 0)
        {
          errno = EINVAL;
          return -1;
        }
    }

  start = _iocs_ontime ();
  for (;;)
    {
      {
        int fd;

        for (fd = 0; fd < fds; fd++)
          {
            int accmode;

            if (_fddb[fd].inuse == _FD_NOTUSED)
              continue;

            accmode = _fddb[fd].oflag & O_ACCMODE;

            if (isatty (fd))
              {
                if (XFD_ISSET (fd, rfds) && isreadable (accmode) && _dos_k_keysns ())
                  {
                    FD_SET (fd, &oread);
                    nfds++;
                  }

                if (XFD_ISSET (fd, wfds) && iswritable (accmode))
                  {
                    FD_SET (fd, &owrite);
                    nfds++;
                  }
              }
#if 0
            else if (_fddb[fd].sockno >= 0)
              {
                if (XFD_ISSET (fd, rfds) && _socklen (_fddb[fd].sockno, 0))
                  {
                    FD_SET (fd, &oread);
                    nfds++;
                  }

                if (XFD_ISSET (fd, wfds) /* && _socklen (_fddb[fd].sockno, 1) == 0 */)
                  {
                    FD_SET (fd, &owrite);
                    nfds++;
                  }
              }
#endif
            else
              {
                if (XFD_ISSET (fd, rfds) && isreadable (accmode) && _dos_ioctrlis (fd))
                  {
                    FD_SET (fd, &oread);
                    nfds++;
                  }

                if (XFD_ISSET (fd, wfds) && iswritable (accmode) && _dos_ioctrlos (fd))
                  {
                    FD_SET (fd, &owrite);
                    nfds++;
                  }
              }
          }
      }

      {
        int rest;

        if ((rest = (_iocs_ontime () - start) % 8640000) < 0)
          rest += 8640000;

        if (nfds != 0)
          {
            if (ticks >= 0)
              {
                int left;

                if ((left = ticks - rest) < 0)
                  left = 0;

                timeout->tv_sec = left / 100;
                timeout->tv_usec = (left % 100) * 10000;
              }

            if (rfds)
              *rfds = oread;
            if (wfds)
              *wfds = owrite;
            if (efds)
              *efds = oexcept;

            return nfds;
          }

        if (ticks >= 0 && rest > ticks)
          return 0;
      }

      _dos_change_pr ();
    }
}
/* [<][>][^][v] [top][bottom][index] [help] */